diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 9893c8f0..276217dd 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -55,7 +55,7 @@ jobs: run: | echo "${{ steps.get_sha.outputs.sha }}" > store_sha_file - name: Archive generated artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: generated-artifacts path: | @@ -72,7 +72,7 @@ jobs: strategy: max-parallel: 6 matrix: - python-version: [3.7, 3.8, 3.9, "3.10"] + python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] steps: - name: Checkout source uses: actions/checkout@v2 @@ -82,7 +82,7 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: generated-artifacts - name: Install dependencies @@ -103,7 +103,7 @@ jobs: uses: actions/checkout@v2 with: ref: ${{ github.head_ref }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: generated-artifacts - name: Display structure of downloaded files @@ -125,7 +125,7 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.6 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: generated-artifacts - name: Display structure of downloaded files diff --git a/dev-requirements.txt b/dev-requirements.txt index e8b29ae0..d6a987f1 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,3 +1,3 @@ --prefer-binary requests -openapiart==0.3.10 +openapiart==0.3.21 diff --git a/do.py b/do.py index 492e4ae3..df8a3088 100644 --- a/do.py +++ b/do.py @@ -10,7 +10,7 @@ BLACK_VERSION = "22.1.0" -GO_VERSION = "1.20" +GO_VERSION = "1.21.0" PROTOC_VERSION = "3.20.3" # this is where go and protoc shall be installed (and expected to be present) @@ -330,6 +330,7 @@ def testgo(): # TODO: not able to run the test from main directory os.chdir("gosnappi") try: + run(["go version"], raise_exception=True, msg="could not fetch go version") run( ["go test ./... -v -coverprofile coverage.txt | tee coverage.out"], raise_exception=True, diff --git a/gosnappi/action_protocol.go b/gosnappi/action_protocol.go new file mode 100644 index 00000000..76faab64 --- /dev/null +++ b/gosnappi/action_protocol.go @@ -0,0 +1,499 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionProtocol ***** +type actionProtocol struct { + validation + obj *otg.ActionProtocol + marshaller marshalActionProtocol + unMarshaller unMarshalActionProtocol + ipv4Holder ActionProtocolIpv4 + ipv6Holder ActionProtocolIpv6 + bgpHolder ActionProtocolBgp +} + +func NewActionProtocol() ActionProtocol { + obj := actionProtocol{obj: &otg.ActionProtocol{}} + obj.setDefault() + return &obj +} + +func (obj *actionProtocol) msg() *otg.ActionProtocol { + return obj.obj +} + +func (obj *actionProtocol) setMsg(msg *otg.ActionProtocol) ActionProtocol { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionProtocol struct { + obj *actionProtocol +} + +type marshalActionProtocol interface { + // ToProto marshals ActionProtocol to protobuf object *otg.ActionProtocol + ToProto() (*otg.ActionProtocol, error) + // ToPbText marshals ActionProtocol to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionProtocol to YAML text + ToYaml() (string, error) + // ToJson marshals ActionProtocol to JSON text + ToJson() (string, error) +} + +type unMarshalactionProtocol struct { + obj *actionProtocol +} + +type unMarshalActionProtocol interface { + // FromProto unmarshals ActionProtocol from protobuf object *otg.ActionProtocol + FromProto(msg *otg.ActionProtocol) (ActionProtocol, error) + // FromPbText unmarshals ActionProtocol from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionProtocol from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionProtocol from JSON text + FromJson(value string) error +} + +func (obj *actionProtocol) Marshal() marshalActionProtocol { + if obj.marshaller == nil { + obj.marshaller = &marshalactionProtocol{obj: obj} + } + return obj.marshaller +} + +func (obj *actionProtocol) Unmarshal() unMarshalActionProtocol { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionProtocol{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionProtocol) ToProto() (*otg.ActionProtocol, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionProtocol) FromProto(msg *otg.ActionProtocol) (ActionProtocol, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionProtocol) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionProtocol) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionProtocol) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocol) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionProtocol) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocol) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionProtocol) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionProtocol) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionProtocol) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionProtocol) Clone() (ActionProtocol, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionProtocol() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionProtocol) setNil() { + obj.ipv4Holder = nil + obj.ipv6Holder = nil + obj.bgpHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionProtocol is actions associated with protocols on configured resources. +type ActionProtocol interface { + Validation + // msg marshals ActionProtocol to protobuf object *otg.ActionProtocol + // and doesn't set defaults + msg() *otg.ActionProtocol + // setMsg unmarshals ActionProtocol from protobuf object *otg.ActionProtocol + // and doesn't set defaults + setMsg(*otg.ActionProtocol) ActionProtocol + // provides marshal interface + Marshal() marshalActionProtocol + // provides unmarshal interface + Unmarshal() unMarshalActionProtocol + // validate validates ActionProtocol + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionProtocol, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ActionProtocolChoiceEnum, set in ActionProtocol + Choice() ActionProtocolChoiceEnum + // setChoice assigns ActionProtocolChoiceEnum provided by user to ActionProtocol + setChoice(value ActionProtocolChoiceEnum) ActionProtocol + // Ipv4 returns ActionProtocolIpv4, set in ActionProtocol. + // ActionProtocolIpv4 is actions associated with IPv4 on configured resources. + Ipv4() ActionProtocolIpv4 + // SetIpv4 assigns ActionProtocolIpv4 provided by user to ActionProtocol. + // ActionProtocolIpv4 is actions associated with IPv4 on configured resources. + SetIpv4(value ActionProtocolIpv4) ActionProtocol + // HasIpv4 checks if Ipv4 has been set in ActionProtocol + HasIpv4() bool + // Ipv6 returns ActionProtocolIpv6, set in ActionProtocol. + // ActionProtocolIpv6 is actions associated with IPv6 on configured resources. + Ipv6() ActionProtocolIpv6 + // SetIpv6 assigns ActionProtocolIpv6 provided by user to ActionProtocol. + // ActionProtocolIpv6 is actions associated with IPv6 on configured resources. + SetIpv6(value ActionProtocolIpv6) ActionProtocol + // HasIpv6 checks if Ipv6 has been set in ActionProtocol + HasIpv6() bool + // Bgp returns ActionProtocolBgp, set in ActionProtocol. + // ActionProtocolBgp is actions associated with BGP on configured resources. + Bgp() ActionProtocolBgp + // SetBgp assigns ActionProtocolBgp provided by user to ActionProtocol. + // ActionProtocolBgp is actions associated with BGP on configured resources. + SetBgp(value ActionProtocolBgp) ActionProtocol + // HasBgp checks if Bgp has been set in ActionProtocol + HasBgp() bool + setNil() +} + +type ActionProtocolChoiceEnum string + +// Enum of Choice on ActionProtocol +var ActionProtocolChoice = struct { + IPV4 ActionProtocolChoiceEnum + IPV6 ActionProtocolChoiceEnum + BGP ActionProtocolChoiceEnum +}{ + IPV4: ActionProtocolChoiceEnum("ipv4"), + IPV6: ActionProtocolChoiceEnum("ipv6"), + BGP: ActionProtocolChoiceEnum("bgp"), +} + +func (obj *actionProtocol) Choice() ActionProtocolChoiceEnum { + return ActionProtocolChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *actionProtocol) setChoice(value ActionProtocolChoiceEnum) ActionProtocol { + intValue, ok := otg.ActionProtocol_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ActionProtocolChoiceEnum", string(value))) + return obj + } + enumValue := otg.ActionProtocol_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Bgp = nil + obj.bgpHolder = nil + obj.obj.Ipv6 = nil + obj.ipv6Holder = nil + obj.obj.Ipv4 = nil + obj.ipv4Holder = nil + + if value == ActionProtocolChoice.IPV4 { + obj.obj.Ipv4 = NewActionProtocolIpv4().msg() + } + + if value == ActionProtocolChoice.IPV6 { + obj.obj.Ipv6 = NewActionProtocolIpv6().msg() + } + + if value == ActionProtocolChoice.BGP { + obj.obj.Bgp = NewActionProtocolBgp().msg() + } + + return obj +} + +// description is TBD +// Ipv4 returns a ActionProtocolIpv4 +func (obj *actionProtocol) Ipv4() ActionProtocolIpv4 { + if obj.obj.Ipv4 == nil { + obj.setChoice(ActionProtocolChoice.IPV4) + } + if obj.ipv4Holder == nil { + obj.ipv4Holder = &actionProtocolIpv4{obj: obj.obj.Ipv4} + } + return obj.ipv4Holder +} + +// description is TBD +// Ipv4 returns a ActionProtocolIpv4 +func (obj *actionProtocol) HasIpv4() bool { + return obj.obj.Ipv4 != nil +} + +// description is TBD +// SetIpv4 sets the ActionProtocolIpv4 value in the ActionProtocol object +func (obj *actionProtocol) SetIpv4(value ActionProtocolIpv4) ActionProtocol { + obj.setChoice(ActionProtocolChoice.IPV4) + obj.ipv4Holder = nil + obj.obj.Ipv4 = value.msg() + + return obj +} + +// description is TBD +// Ipv6 returns a ActionProtocolIpv6 +func (obj *actionProtocol) Ipv6() ActionProtocolIpv6 { + if obj.obj.Ipv6 == nil { + obj.setChoice(ActionProtocolChoice.IPV6) + } + if obj.ipv6Holder == nil { + obj.ipv6Holder = &actionProtocolIpv6{obj: obj.obj.Ipv6} + } + return obj.ipv6Holder +} + +// description is TBD +// Ipv6 returns a ActionProtocolIpv6 +func (obj *actionProtocol) HasIpv6() bool { + return obj.obj.Ipv6 != nil +} + +// description is TBD +// SetIpv6 sets the ActionProtocolIpv6 value in the ActionProtocol object +func (obj *actionProtocol) SetIpv6(value ActionProtocolIpv6) ActionProtocol { + obj.setChoice(ActionProtocolChoice.IPV6) + obj.ipv6Holder = nil + obj.obj.Ipv6 = value.msg() + + return obj +} + +// description is TBD +// Bgp returns a ActionProtocolBgp +func (obj *actionProtocol) Bgp() ActionProtocolBgp { + if obj.obj.Bgp == nil { + obj.setChoice(ActionProtocolChoice.BGP) + } + if obj.bgpHolder == nil { + obj.bgpHolder = &actionProtocolBgp{obj: obj.obj.Bgp} + } + return obj.bgpHolder +} + +// description is TBD +// Bgp returns a ActionProtocolBgp +func (obj *actionProtocol) HasBgp() bool { + return obj.obj.Bgp != nil +} + +// description is TBD +// SetBgp sets the ActionProtocolBgp value in the ActionProtocol object +func (obj *actionProtocol) SetBgp(value ActionProtocolBgp) ActionProtocol { + obj.setChoice(ActionProtocolChoice.BGP) + obj.bgpHolder = nil + obj.obj.Bgp = value.msg() + + return obj +} + +func (obj *actionProtocol) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface ActionProtocol") + } + + if obj.obj.Ipv4 != nil { + + obj.Ipv4().validateObj(vObj, set_default) + } + + if obj.obj.Ipv6 != nil { + + obj.Ipv6().validateObj(vObj, set_default) + } + + if obj.obj.Bgp != nil { + + obj.Bgp().validateObj(vObj, set_default) + } + +} + +func (obj *actionProtocol) setDefault() { + var choices_set int = 0 + var choice ActionProtocolChoiceEnum + + if obj.obj.Ipv4 != nil { + choices_set += 1 + choice = ActionProtocolChoice.IPV4 + } + + if obj.obj.Ipv6 != nil { + choices_set += 1 + choice = ActionProtocolChoice.IPV6 + } + + if obj.obj.Bgp != nil { + choices_set += 1 + choice = ActionProtocolChoice.BGP + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ActionProtocol") + } + } else { + intVal := otg.ActionProtocol_Choice_Enum_value[string(choice)] + enumValue := otg.ActionProtocol_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/action_protocol_bgp.go b/gosnappi/action_protocol_bgp.go new file mode 100644 index 00000000..585aedf8 --- /dev/null +++ b/gosnappi/action_protocol_bgp.go @@ -0,0 +1,443 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionProtocolBgp ***** +type actionProtocolBgp struct { + validation + obj *otg.ActionProtocolBgp + marshaller marshalActionProtocolBgp + unMarshaller unMarshalActionProtocolBgp + notificationHolder ActionProtocolBgpNotification + initiateGracefulRestartHolder ActionProtocolBgpInitiateGracefulRestart +} + +func NewActionProtocolBgp() ActionProtocolBgp { + obj := actionProtocolBgp{obj: &otg.ActionProtocolBgp{}} + obj.setDefault() + return &obj +} + +func (obj *actionProtocolBgp) msg() *otg.ActionProtocolBgp { + return obj.obj +} + +func (obj *actionProtocolBgp) setMsg(msg *otg.ActionProtocolBgp) ActionProtocolBgp { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionProtocolBgp struct { + obj *actionProtocolBgp +} + +type marshalActionProtocolBgp interface { + // ToProto marshals ActionProtocolBgp to protobuf object *otg.ActionProtocolBgp + ToProto() (*otg.ActionProtocolBgp, error) + // ToPbText marshals ActionProtocolBgp to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionProtocolBgp to YAML text + ToYaml() (string, error) + // ToJson marshals ActionProtocolBgp to JSON text + ToJson() (string, error) +} + +type unMarshalactionProtocolBgp struct { + obj *actionProtocolBgp +} + +type unMarshalActionProtocolBgp interface { + // FromProto unmarshals ActionProtocolBgp from protobuf object *otg.ActionProtocolBgp + FromProto(msg *otg.ActionProtocolBgp) (ActionProtocolBgp, error) + // FromPbText unmarshals ActionProtocolBgp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionProtocolBgp from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionProtocolBgp from JSON text + FromJson(value string) error +} + +func (obj *actionProtocolBgp) Marshal() marshalActionProtocolBgp { + if obj.marshaller == nil { + obj.marshaller = &marshalactionProtocolBgp{obj: obj} + } + return obj.marshaller +} + +func (obj *actionProtocolBgp) Unmarshal() unMarshalActionProtocolBgp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionProtocolBgp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionProtocolBgp) ToProto() (*otg.ActionProtocolBgp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionProtocolBgp) FromProto(msg *otg.ActionProtocolBgp) (ActionProtocolBgp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionProtocolBgp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionProtocolBgp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionProtocolBgp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolBgp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionProtocolBgp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolBgp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionProtocolBgp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionProtocolBgp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionProtocolBgp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionProtocolBgp) Clone() (ActionProtocolBgp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionProtocolBgp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionProtocolBgp) setNil() { + obj.notificationHolder = nil + obj.initiateGracefulRestartHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionProtocolBgp is actions associated with BGP on configured resources. +type ActionProtocolBgp interface { + Validation + // msg marshals ActionProtocolBgp to protobuf object *otg.ActionProtocolBgp + // and doesn't set defaults + msg() *otg.ActionProtocolBgp + // setMsg unmarshals ActionProtocolBgp from protobuf object *otg.ActionProtocolBgp + // and doesn't set defaults + setMsg(*otg.ActionProtocolBgp) ActionProtocolBgp + // provides marshal interface + Marshal() marshalActionProtocolBgp + // provides unmarshal interface + Unmarshal() unMarshalActionProtocolBgp + // validate validates ActionProtocolBgp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionProtocolBgp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ActionProtocolBgpChoiceEnum, set in ActionProtocolBgp + Choice() ActionProtocolBgpChoiceEnum + // setChoice assigns ActionProtocolBgpChoiceEnum provided by user to ActionProtocolBgp + setChoice(value ActionProtocolBgpChoiceEnum) ActionProtocolBgp + // Notification returns ActionProtocolBgpNotification, set in ActionProtocolBgp. + // ActionProtocolBgpNotification is a NOTIFICATION message is sent when an error is detected with the BGP session, such as hold timer expiring, misconfigured AS number or a BGP session reset is requested. This causes the BGP connection to close. Send explicit NOTIFICATIONs for list of specified BGP peers. If a user wants to send custom Error Code and Error Subcode the custom object should be configured. A user can send IANA defined BGP NOTIFICATIONs according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. + Notification() ActionProtocolBgpNotification + // SetNotification assigns ActionProtocolBgpNotification provided by user to ActionProtocolBgp. + // ActionProtocolBgpNotification is a NOTIFICATION message is sent when an error is detected with the BGP session, such as hold timer expiring, misconfigured AS number or a BGP session reset is requested. This causes the BGP connection to close. Send explicit NOTIFICATIONs for list of specified BGP peers. If a user wants to send custom Error Code and Error Subcode the custom object should be configured. A user can send IANA defined BGP NOTIFICATIONs according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. + SetNotification(value ActionProtocolBgpNotification) ActionProtocolBgp + // HasNotification checks if Notification has been set in ActionProtocolBgp + HasNotification() bool + // InitiateGracefulRestart returns ActionProtocolBgpInitiateGracefulRestart, set in ActionProtocolBgp. + // ActionProtocolBgpInitiateGracefulRestart is initiates BGP Graceful Restart process for the selected BGP peers. If no name is specified then Graceful Restart will be sent to all configured BGP peers. To emulate scenarios where a peer sends a Notification and stops the session, an optional Notification object is included. If the remote peer and the local peer are both configured to perform Graceful Restart for Notification triggered session , this will result in Graceful Restart scenario to be triggered as per RFC8538. + InitiateGracefulRestart() ActionProtocolBgpInitiateGracefulRestart + // SetInitiateGracefulRestart assigns ActionProtocolBgpInitiateGracefulRestart provided by user to ActionProtocolBgp. + // ActionProtocolBgpInitiateGracefulRestart is initiates BGP Graceful Restart process for the selected BGP peers. If no name is specified then Graceful Restart will be sent to all configured BGP peers. To emulate scenarios where a peer sends a Notification and stops the session, an optional Notification object is included. If the remote peer and the local peer are both configured to perform Graceful Restart for Notification triggered session , this will result in Graceful Restart scenario to be triggered as per RFC8538. + SetInitiateGracefulRestart(value ActionProtocolBgpInitiateGracefulRestart) ActionProtocolBgp + // HasInitiateGracefulRestart checks if InitiateGracefulRestart has been set in ActionProtocolBgp + HasInitiateGracefulRestart() bool + setNil() +} + +type ActionProtocolBgpChoiceEnum string + +// Enum of Choice on ActionProtocolBgp +var ActionProtocolBgpChoice = struct { + NOTIFICATION ActionProtocolBgpChoiceEnum + INITIATE_GRACEFUL_RESTART ActionProtocolBgpChoiceEnum +}{ + NOTIFICATION: ActionProtocolBgpChoiceEnum("notification"), + INITIATE_GRACEFUL_RESTART: ActionProtocolBgpChoiceEnum("initiate_graceful_restart"), +} + +func (obj *actionProtocolBgp) Choice() ActionProtocolBgpChoiceEnum { + return ActionProtocolBgpChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *actionProtocolBgp) setChoice(value ActionProtocolBgpChoiceEnum) ActionProtocolBgp { + intValue, ok := otg.ActionProtocolBgp_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ActionProtocolBgpChoiceEnum", string(value))) + return obj + } + enumValue := otg.ActionProtocolBgp_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.InitiateGracefulRestart = nil + obj.initiateGracefulRestartHolder = nil + obj.obj.Notification = nil + obj.notificationHolder = nil + + if value == ActionProtocolBgpChoice.NOTIFICATION { + obj.obj.Notification = NewActionProtocolBgpNotification().msg() + } + + if value == ActionProtocolBgpChoice.INITIATE_GRACEFUL_RESTART { + obj.obj.InitiateGracefulRestart = NewActionProtocolBgpInitiateGracefulRestart().msg() + } + + return obj +} + +// description is TBD +// Notification returns a ActionProtocolBgpNotification +func (obj *actionProtocolBgp) Notification() ActionProtocolBgpNotification { + if obj.obj.Notification == nil { + obj.setChoice(ActionProtocolBgpChoice.NOTIFICATION) + } + if obj.notificationHolder == nil { + obj.notificationHolder = &actionProtocolBgpNotification{obj: obj.obj.Notification} + } + return obj.notificationHolder +} + +// description is TBD +// Notification returns a ActionProtocolBgpNotification +func (obj *actionProtocolBgp) HasNotification() bool { + return obj.obj.Notification != nil +} + +// description is TBD +// SetNotification sets the ActionProtocolBgpNotification value in the ActionProtocolBgp object +func (obj *actionProtocolBgp) SetNotification(value ActionProtocolBgpNotification) ActionProtocolBgp { + obj.setChoice(ActionProtocolBgpChoice.NOTIFICATION) + obj.notificationHolder = nil + obj.obj.Notification = value.msg() + + return obj +} + +// description is TBD +// InitiateGracefulRestart returns a ActionProtocolBgpInitiateGracefulRestart +func (obj *actionProtocolBgp) InitiateGracefulRestart() ActionProtocolBgpInitiateGracefulRestart { + if obj.obj.InitiateGracefulRestart == nil { + obj.setChoice(ActionProtocolBgpChoice.INITIATE_GRACEFUL_RESTART) + } + if obj.initiateGracefulRestartHolder == nil { + obj.initiateGracefulRestartHolder = &actionProtocolBgpInitiateGracefulRestart{obj: obj.obj.InitiateGracefulRestart} + } + return obj.initiateGracefulRestartHolder +} + +// description is TBD +// InitiateGracefulRestart returns a ActionProtocolBgpInitiateGracefulRestart +func (obj *actionProtocolBgp) HasInitiateGracefulRestart() bool { + return obj.obj.InitiateGracefulRestart != nil +} + +// description is TBD +// SetInitiateGracefulRestart sets the ActionProtocolBgpInitiateGracefulRestart value in the ActionProtocolBgp object +func (obj *actionProtocolBgp) SetInitiateGracefulRestart(value ActionProtocolBgpInitiateGracefulRestart) ActionProtocolBgp { + obj.setChoice(ActionProtocolBgpChoice.INITIATE_GRACEFUL_RESTART) + obj.initiateGracefulRestartHolder = nil + obj.obj.InitiateGracefulRestart = value.msg() + + return obj +} + +func (obj *actionProtocolBgp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface ActionProtocolBgp") + } + + if obj.obj.Notification != nil { + + obj.Notification().validateObj(vObj, set_default) + } + + if obj.obj.InitiateGracefulRestart != nil { + + obj.InitiateGracefulRestart().validateObj(vObj, set_default) + } + +} + +func (obj *actionProtocolBgp) setDefault() { + var choices_set int = 0 + var choice ActionProtocolBgpChoiceEnum + + if obj.obj.Notification != nil { + choices_set += 1 + choice = ActionProtocolBgpChoice.NOTIFICATION + } + + if obj.obj.InitiateGracefulRestart != nil { + choices_set += 1 + choice = ActionProtocolBgpChoice.INITIATE_GRACEFUL_RESTART + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ActionProtocolBgp") + } + } else { + intVal := otg.ActionProtocolBgp_Choice_Enum_value[string(choice)] + enumValue := otg.ActionProtocolBgp_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/action_protocol_bgp_graceful_restart_notification.go b/gosnappi/action_protocol_bgp_graceful_restart_notification.go new file mode 100644 index 00000000..4b47f93e --- /dev/null +++ b/gosnappi/action_protocol_bgp_graceful_restart_notification.go @@ -0,0 +1,732 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionProtocolBgpGracefulRestartNotification ***** +type actionProtocolBgpGracefulRestartNotification struct { + validation + obj *otg.ActionProtocolBgpGracefulRestartNotification + marshaller marshalActionProtocolBgpGracefulRestartNotification + unMarshaller unMarshalActionProtocolBgpGracefulRestartNotification + ceaseHolder DeviceBgpCeaseError + messageHeaderErrorHolder DeviceBgpMessageHeaderError + openMessageErrorHolder DeviceBgpOpenMessageError + updateMessageErrorHolder DeviceBgpUpdateMessageError + holdTimerExpiredHolder DeviceBgpHoldTimerExpired + finiteStateMachineErrorHolder DeviceBgpFiniteStateMachineError + customHolder DeviceBgpCustomError +} + +func NewActionProtocolBgpGracefulRestartNotification() ActionProtocolBgpGracefulRestartNotification { + obj := actionProtocolBgpGracefulRestartNotification{obj: &otg.ActionProtocolBgpGracefulRestartNotification{}} + obj.setDefault() + return &obj +} + +func (obj *actionProtocolBgpGracefulRestartNotification) msg() *otg.ActionProtocolBgpGracefulRestartNotification { + return obj.obj +} + +func (obj *actionProtocolBgpGracefulRestartNotification) setMsg(msg *otg.ActionProtocolBgpGracefulRestartNotification) ActionProtocolBgpGracefulRestartNotification { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionProtocolBgpGracefulRestartNotification struct { + obj *actionProtocolBgpGracefulRestartNotification +} + +type marshalActionProtocolBgpGracefulRestartNotification interface { + // ToProto marshals ActionProtocolBgpGracefulRestartNotification to protobuf object *otg.ActionProtocolBgpGracefulRestartNotification + ToProto() (*otg.ActionProtocolBgpGracefulRestartNotification, error) + // ToPbText marshals ActionProtocolBgpGracefulRestartNotification to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionProtocolBgpGracefulRestartNotification to YAML text + ToYaml() (string, error) + // ToJson marshals ActionProtocolBgpGracefulRestartNotification to JSON text + ToJson() (string, error) +} + +type unMarshalactionProtocolBgpGracefulRestartNotification struct { + obj *actionProtocolBgpGracefulRestartNotification +} + +type unMarshalActionProtocolBgpGracefulRestartNotification interface { + // FromProto unmarshals ActionProtocolBgpGracefulRestartNotification from protobuf object *otg.ActionProtocolBgpGracefulRestartNotification + FromProto(msg *otg.ActionProtocolBgpGracefulRestartNotification) (ActionProtocolBgpGracefulRestartNotification, error) + // FromPbText unmarshals ActionProtocolBgpGracefulRestartNotification from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionProtocolBgpGracefulRestartNotification from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionProtocolBgpGracefulRestartNotification from JSON text + FromJson(value string) error +} + +func (obj *actionProtocolBgpGracefulRestartNotification) Marshal() marshalActionProtocolBgpGracefulRestartNotification { + if obj.marshaller == nil { + obj.marshaller = &marshalactionProtocolBgpGracefulRestartNotification{obj: obj} + } + return obj.marshaller +} + +func (obj *actionProtocolBgpGracefulRestartNotification) Unmarshal() unMarshalActionProtocolBgpGracefulRestartNotification { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionProtocolBgpGracefulRestartNotification{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionProtocolBgpGracefulRestartNotification) ToProto() (*otg.ActionProtocolBgpGracefulRestartNotification, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionProtocolBgpGracefulRestartNotification) FromProto(msg *otg.ActionProtocolBgpGracefulRestartNotification) (ActionProtocolBgpGracefulRestartNotification, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionProtocolBgpGracefulRestartNotification) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionProtocolBgpGracefulRestartNotification) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionProtocolBgpGracefulRestartNotification) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolBgpGracefulRestartNotification) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionProtocolBgpGracefulRestartNotification) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolBgpGracefulRestartNotification) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionProtocolBgpGracefulRestartNotification) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionProtocolBgpGracefulRestartNotification) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionProtocolBgpGracefulRestartNotification) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionProtocolBgpGracefulRestartNotification) Clone() (ActionProtocolBgpGracefulRestartNotification, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionProtocolBgpGracefulRestartNotification() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionProtocolBgpGracefulRestartNotification) setNil() { + obj.ceaseHolder = nil + obj.messageHeaderErrorHolder = nil + obj.openMessageErrorHolder = nil + obj.updateMessageErrorHolder = nil + obj.holdTimerExpiredHolder = nil + obj.finiteStateMachineErrorHolder = nil + obj.customHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionProtocolBgpGracefulRestartNotification is defines the explicit contents of the NOTIFICATION message to be sent when executing InitiateGracefulRestart trigger. This causes the BGP connection to close.If a user wants to send custom Error Code and Error Subcode the custom object should be configured. A user can send IANA defined BGP NOTIFICATIONs according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. +type ActionProtocolBgpGracefulRestartNotification interface { + Validation + // msg marshals ActionProtocolBgpGracefulRestartNotification to protobuf object *otg.ActionProtocolBgpGracefulRestartNotification + // and doesn't set defaults + msg() *otg.ActionProtocolBgpGracefulRestartNotification + // setMsg unmarshals ActionProtocolBgpGracefulRestartNotification from protobuf object *otg.ActionProtocolBgpGracefulRestartNotification + // and doesn't set defaults + setMsg(*otg.ActionProtocolBgpGracefulRestartNotification) ActionProtocolBgpGracefulRestartNotification + // provides marshal interface + Marshal() marshalActionProtocolBgpGracefulRestartNotification + // provides unmarshal interface + Unmarshal() unMarshalActionProtocolBgpGracefulRestartNotification + // validate validates ActionProtocolBgpGracefulRestartNotification + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionProtocolBgpGracefulRestartNotification, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ActionProtocolBgpGracefulRestartNotificationChoiceEnum, set in ActionProtocolBgpGracefulRestartNotification + Choice() ActionProtocolBgpGracefulRestartNotificationChoiceEnum + // setChoice assigns ActionProtocolBgpGracefulRestartNotificationChoiceEnum provided by user to ActionProtocolBgpGracefulRestartNotification + setChoice(value ActionProtocolBgpGracefulRestartNotificationChoiceEnum) ActionProtocolBgpGracefulRestartNotification + // HasChoice checks if Choice has been set in ActionProtocolBgpGracefulRestartNotification + HasChoice() bool + // Cease returns DeviceBgpCeaseError, set in ActionProtocolBgpGracefulRestartNotification. + // DeviceBgpCeaseError is in the absence of any fatal errors, a BGP peer can close its BGP connection by sending the NOTIFICATION message with the Error Code Cease. The 'hard_reset_code6_subcode9' subcode for Cease Notification can be used to signal a hard reset that will indicate that Graceful Restart cannot be performed, even when Notification extensions to Graceful Restart procedure is supported. + Cease() DeviceBgpCeaseError + // SetCease assigns DeviceBgpCeaseError provided by user to ActionProtocolBgpGracefulRestartNotification. + // DeviceBgpCeaseError is in the absence of any fatal errors, a BGP peer can close its BGP connection by sending the NOTIFICATION message with the Error Code Cease. The 'hard_reset_code6_subcode9' subcode for Cease Notification can be used to signal a hard reset that will indicate that Graceful Restart cannot be performed, even when Notification extensions to Graceful Restart procedure is supported. + SetCease(value DeviceBgpCeaseError) ActionProtocolBgpGracefulRestartNotification + // HasCease checks if Cease has been set in ActionProtocolBgpGracefulRestartNotification + HasCease() bool + // MessageHeaderError returns DeviceBgpMessageHeaderError, set in ActionProtocolBgpGracefulRestartNotification. + // DeviceBgpMessageHeaderError is all errors detected while processing the Message Header are indicated by sending the NOTIFICATION message with the Error Code-Message Header Error. The Error Subcode elaborates on the specific nature of the error. + MessageHeaderError() DeviceBgpMessageHeaderError + // SetMessageHeaderError assigns DeviceBgpMessageHeaderError provided by user to ActionProtocolBgpGracefulRestartNotification. + // DeviceBgpMessageHeaderError is all errors detected while processing the Message Header are indicated by sending the NOTIFICATION message with the Error Code-Message Header Error. The Error Subcode elaborates on the specific nature of the error. + SetMessageHeaderError(value DeviceBgpMessageHeaderError) ActionProtocolBgpGracefulRestartNotification + // HasMessageHeaderError checks if MessageHeaderError has been set in ActionProtocolBgpGracefulRestartNotification + HasMessageHeaderError() bool + // OpenMessageError returns DeviceBgpOpenMessageError, set in ActionProtocolBgpGracefulRestartNotification. + // DeviceBgpOpenMessageError is all errors detected while processing the OPEN message are indicated by sending the NOTIFICATION message with the Error Code-Open Message Error. The Error Subcode elaborates on the specific nature of the error. + OpenMessageError() DeviceBgpOpenMessageError + // SetOpenMessageError assigns DeviceBgpOpenMessageError provided by user to ActionProtocolBgpGracefulRestartNotification. + // DeviceBgpOpenMessageError is all errors detected while processing the OPEN message are indicated by sending the NOTIFICATION message with the Error Code-Open Message Error. The Error Subcode elaborates on the specific nature of the error. + SetOpenMessageError(value DeviceBgpOpenMessageError) ActionProtocolBgpGracefulRestartNotification + // HasOpenMessageError checks if OpenMessageError has been set in ActionProtocolBgpGracefulRestartNotification + HasOpenMessageError() bool + // UpdateMessageError returns DeviceBgpUpdateMessageError, set in ActionProtocolBgpGracefulRestartNotification. + // DeviceBgpUpdateMessageError is all errors detected while processing the UPDATE message are indicated by sending the NOTIFICATION message with the Error Code-Update Message Error. The Error Subcode elaborates on the specific nature of the error. + UpdateMessageError() DeviceBgpUpdateMessageError + // SetUpdateMessageError assigns DeviceBgpUpdateMessageError provided by user to ActionProtocolBgpGracefulRestartNotification. + // DeviceBgpUpdateMessageError is all errors detected while processing the UPDATE message are indicated by sending the NOTIFICATION message with the Error Code-Update Message Error. The Error Subcode elaborates on the specific nature of the error. + SetUpdateMessageError(value DeviceBgpUpdateMessageError) ActionProtocolBgpGracefulRestartNotification + // HasUpdateMessageError checks if UpdateMessageError has been set in ActionProtocolBgpGracefulRestartNotification + HasUpdateMessageError() bool + // HoldTimerExpired returns DeviceBgpHoldTimerExpired, set in ActionProtocolBgpGracefulRestartNotification. + // DeviceBgpHoldTimerExpired is if a system does not receive successive KEEPALIVE, UPDATE, and/or NOTIFICATION messages within the period specified in the Hold Time field of the OPEN message, then the NOTIFICATION message with the Hold Timer Expired Error Code(Error Code 4) is sent and the BGP connection is closed. The Sub Code used is 0. If a user wants to use non zero Sub Code then CustomError can be used. + HoldTimerExpired() DeviceBgpHoldTimerExpired + // SetHoldTimerExpired assigns DeviceBgpHoldTimerExpired provided by user to ActionProtocolBgpGracefulRestartNotification. + // DeviceBgpHoldTimerExpired is if a system does not receive successive KEEPALIVE, UPDATE, and/or NOTIFICATION messages within the period specified in the Hold Time field of the OPEN message, then the NOTIFICATION message with the Hold Timer Expired Error Code(Error Code 4) is sent and the BGP connection is closed. The Sub Code used is 0. If a user wants to use non zero Sub Code then CustomError can be used. + SetHoldTimerExpired(value DeviceBgpHoldTimerExpired) ActionProtocolBgpGracefulRestartNotification + // HasHoldTimerExpired checks if HoldTimerExpired has been set in ActionProtocolBgpGracefulRestartNotification + HasHoldTimerExpired() bool + // FiniteStateMachineError returns DeviceBgpFiniteStateMachineError, set in ActionProtocolBgpGracefulRestartNotification. + // DeviceBgpFiniteStateMachineError is any error detected by the BGP Finite State Machine (e.g., receipt of an unexpected event) is indicated by sending the NOTIFICATION message with the Error Code-Finite State Machine Error(Error Code 5). The Sub Code used is 0. If a user wants to use non zero Sub Code then CustomError can be used. + FiniteStateMachineError() DeviceBgpFiniteStateMachineError + // SetFiniteStateMachineError assigns DeviceBgpFiniteStateMachineError provided by user to ActionProtocolBgpGracefulRestartNotification. + // DeviceBgpFiniteStateMachineError is any error detected by the BGP Finite State Machine (e.g., receipt of an unexpected event) is indicated by sending the NOTIFICATION message with the Error Code-Finite State Machine Error(Error Code 5). The Sub Code used is 0. If a user wants to use non zero Sub Code then CustomError can be used. + SetFiniteStateMachineError(value DeviceBgpFiniteStateMachineError) ActionProtocolBgpGracefulRestartNotification + // HasFiniteStateMachineError checks if FiniteStateMachineError has been set in ActionProtocolBgpGracefulRestartNotification + HasFiniteStateMachineError() bool + // Custom returns DeviceBgpCustomError, set in ActionProtocolBgpGracefulRestartNotification. + // DeviceBgpCustomError is a BGP peer can send NOTIFICATION message with user defined Error Code and Error Subcode. + Custom() DeviceBgpCustomError + // SetCustom assigns DeviceBgpCustomError provided by user to ActionProtocolBgpGracefulRestartNotification. + // DeviceBgpCustomError is a BGP peer can send NOTIFICATION message with user defined Error Code and Error Subcode. + SetCustom(value DeviceBgpCustomError) ActionProtocolBgpGracefulRestartNotification + // HasCustom checks if Custom has been set in ActionProtocolBgpGracefulRestartNotification + HasCustom() bool + setNil() +} + +type ActionProtocolBgpGracefulRestartNotificationChoiceEnum string + +// Enum of Choice on ActionProtocolBgpGracefulRestartNotification +var ActionProtocolBgpGracefulRestartNotificationChoice = struct { + CEASE ActionProtocolBgpGracefulRestartNotificationChoiceEnum + MESSAGE_HEADER_ERROR ActionProtocolBgpGracefulRestartNotificationChoiceEnum + OPEN_MESSAGE_ERROR ActionProtocolBgpGracefulRestartNotificationChoiceEnum + UPDATE_MESSAGE_ERROR ActionProtocolBgpGracefulRestartNotificationChoiceEnum + HOLD_TIMER_EXPIRED ActionProtocolBgpGracefulRestartNotificationChoiceEnum + FINITE_STATE_MACHINE_ERROR ActionProtocolBgpGracefulRestartNotificationChoiceEnum + CUSTOM ActionProtocolBgpGracefulRestartNotificationChoiceEnum +}{ + CEASE: ActionProtocolBgpGracefulRestartNotificationChoiceEnum("cease"), + MESSAGE_HEADER_ERROR: ActionProtocolBgpGracefulRestartNotificationChoiceEnum("message_header_error"), + OPEN_MESSAGE_ERROR: ActionProtocolBgpGracefulRestartNotificationChoiceEnum("open_message_error"), + UPDATE_MESSAGE_ERROR: ActionProtocolBgpGracefulRestartNotificationChoiceEnum("update_message_error"), + HOLD_TIMER_EXPIRED: ActionProtocolBgpGracefulRestartNotificationChoiceEnum("hold_timer_expired"), + FINITE_STATE_MACHINE_ERROR: ActionProtocolBgpGracefulRestartNotificationChoiceEnum("finite_state_machine_error"), + CUSTOM: ActionProtocolBgpGracefulRestartNotificationChoiceEnum("custom"), +} + +func (obj *actionProtocolBgpGracefulRestartNotification) Choice() ActionProtocolBgpGracefulRestartNotificationChoiceEnum { + return ActionProtocolBgpGracefulRestartNotificationChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// Each BGP NOTIFICATION message includes an Error Code field indicating what type of problem occurred. For certain Error Codes, an Error Subcode field provides additional details about the specific nature of the problem. The choice value will provide the Error Code used in NOTIFICATION message. The Subcode can be set for each of the corresponding errors except for Hold Timer Expired error and BGP Finite State Machine error. In both of these cases Subcode 0 will be sent. If a user wants to use non zero Sub Code then custom choice can be used. +// Choice returns a string +func (obj *actionProtocolBgpGracefulRestartNotification) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *actionProtocolBgpGracefulRestartNotification) setChoice(value ActionProtocolBgpGracefulRestartNotificationChoiceEnum) ActionProtocolBgpGracefulRestartNotification { + intValue, ok := otg.ActionProtocolBgpGracefulRestartNotification_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ActionProtocolBgpGracefulRestartNotificationChoiceEnum", string(value))) + return obj + } + enumValue := otg.ActionProtocolBgpGracefulRestartNotification_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.customHolder = nil + obj.obj.FiniteStateMachineError = nil + obj.finiteStateMachineErrorHolder = nil + obj.obj.HoldTimerExpired = nil + obj.holdTimerExpiredHolder = nil + obj.obj.UpdateMessageError = nil + obj.updateMessageErrorHolder = nil + obj.obj.OpenMessageError = nil + obj.openMessageErrorHolder = nil + obj.obj.MessageHeaderError = nil + obj.messageHeaderErrorHolder = nil + obj.obj.Cease = nil + obj.ceaseHolder = nil + + if value == ActionProtocolBgpGracefulRestartNotificationChoice.CEASE { + obj.obj.Cease = NewDeviceBgpCeaseError().msg() + } + + if value == ActionProtocolBgpGracefulRestartNotificationChoice.MESSAGE_HEADER_ERROR { + obj.obj.MessageHeaderError = NewDeviceBgpMessageHeaderError().msg() + } + + if value == ActionProtocolBgpGracefulRestartNotificationChoice.OPEN_MESSAGE_ERROR { + obj.obj.OpenMessageError = NewDeviceBgpOpenMessageError().msg() + } + + if value == ActionProtocolBgpGracefulRestartNotificationChoice.UPDATE_MESSAGE_ERROR { + obj.obj.UpdateMessageError = NewDeviceBgpUpdateMessageError().msg() + } + + if value == ActionProtocolBgpGracefulRestartNotificationChoice.HOLD_TIMER_EXPIRED { + obj.obj.HoldTimerExpired = NewDeviceBgpHoldTimerExpired().msg() + } + + if value == ActionProtocolBgpGracefulRestartNotificationChoice.FINITE_STATE_MACHINE_ERROR { + obj.obj.FiniteStateMachineError = NewDeviceBgpFiniteStateMachineError().msg() + } + + if value == ActionProtocolBgpGracefulRestartNotificationChoice.CUSTOM { + obj.obj.Custom = NewDeviceBgpCustomError().msg() + } + + return obj +} + +// description is TBD +// Cease returns a DeviceBgpCeaseError +func (obj *actionProtocolBgpGracefulRestartNotification) Cease() DeviceBgpCeaseError { + if obj.obj.Cease == nil { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.CEASE) + } + if obj.ceaseHolder == nil { + obj.ceaseHolder = &deviceBgpCeaseError{obj: obj.obj.Cease} + } + return obj.ceaseHolder +} + +// description is TBD +// Cease returns a DeviceBgpCeaseError +func (obj *actionProtocolBgpGracefulRestartNotification) HasCease() bool { + return obj.obj.Cease != nil +} + +// description is TBD +// SetCease sets the DeviceBgpCeaseError value in the ActionProtocolBgpGracefulRestartNotification object +func (obj *actionProtocolBgpGracefulRestartNotification) SetCease(value DeviceBgpCeaseError) ActionProtocolBgpGracefulRestartNotification { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.CEASE) + obj.ceaseHolder = nil + obj.obj.Cease = value.msg() + + return obj +} + +// description is TBD +// MessageHeaderError returns a DeviceBgpMessageHeaderError +func (obj *actionProtocolBgpGracefulRestartNotification) MessageHeaderError() DeviceBgpMessageHeaderError { + if obj.obj.MessageHeaderError == nil { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.MESSAGE_HEADER_ERROR) + } + if obj.messageHeaderErrorHolder == nil { + obj.messageHeaderErrorHolder = &deviceBgpMessageHeaderError{obj: obj.obj.MessageHeaderError} + } + return obj.messageHeaderErrorHolder +} + +// description is TBD +// MessageHeaderError returns a DeviceBgpMessageHeaderError +func (obj *actionProtocolBgpGracefulRestartNotification) HasMessageHeaderError() bool { + return obj.obj.MessageHeaderError != nil +} + +// description is TBD +// SetMessageHeaderError sets the DeviceBgpMessageHeaderError value in the ActionProtocolBgpGracefulRestartNotification object +func (obj *actionProtocolBgpGracefulRestartNotification) SetMessageHeaderError(value DeviceBgpMessageHeaderError) ActionProtocolBgpGracefulRestartNotification { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.MESSAGE_HEADER_ERROR) + obj.messageHeaderErrorHolder = nil + obj.obj.MessageHeaderError = value.msg() + + return obj +} + +// description is TBD +// OpenMessageError returns a DeviceBgpOpenMessageError +func (obj *actionProtocolBgpGracefulRestartNotification) OpenMessageError() DeviceBgpOpenMessageError { + if obj.obj.OpenMessageError == nil { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.OPEN_MESSAGE_ERROR) + } + if obj.openMessageErrorHolder == nil { + obj.openMessageErrorHolder = &deviceBgpOpenMessageError{obj: obj.obj.OpenMessageError} + } + return obj.openMessageErrorHolder +} + +// description is TBD +// OpenMessageError returns a DeviceBgpOpenMessageError +func (obj *actionProtocolBgpGracefulRestartNotification) HasOpenMessageError() bool { + return obj.obj.OpenMessageError != nil +} + +// description is TBD +// SetOpenMessageError sets the DeviceBgpOpenMessageError value in the ActionProtocolBgpGracefulRestartNotification object +func (obj *actionProtocolBgpGracefulRestartNotification) SetOpenMessageError(value DeviceBgpOpenMessageError) ActionProtocolBgpGracefulRestartNotification { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.OPEN_MESSAGE_ERROR) + obj.openMessageErrorHolder = nil + obj.obj.OpenMessageError = value.msg() + + return obj +} + +// description is TBD +// UpdateMessageError returns a DeviceBgpUpdateMessageError +func (obj *actionProtocolBgpGracefulRestartNotification) UpdateMessageError() DeviceBgpUpdateMessageError { + if obj.obj.UpdateMessageError == nil { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.UPDATE_MESSAGE_ERROR) + } + if obj.updateMessageErrorHolder == nil { + obj.updateMessageErrorHolder = &deviceBgpUpdateMessageError{obj: obj.obj.UpdateMessageError} + } + return obj.updateMessageErrorHolder +} + +// description is TBD +// UpdateMessageError returns a DeviceBgpUpdateMessageError +func (obj *actionProtocolBgpGracefulRestartNotification) HasUpdateMessageError() bool { + return obj.obj.UpdateMessageError != nil +} + +// description is TBD +// SetUpdateMessageError sets the DeviceBgpUpdateMessageError value in the ActionProtocolBgpGracefulRestartNotification object +func (obj *actionProtocolBgpGracefulRestartNotification) SetUpdateMessageError(value DeviceBgpUpdateMessageError) ActionProtocolBgpGracefulRestartNotification { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.UPDATE_MESSAGE_ERROR) + obj.updateMessageErrorHolder = nil + obj.obj.UpdateMessageError = value.msg() + + return obj +} + +// description is TBD +// HoldTimerExpired returns a DeviceBgpHoldTimerExpired +func (obj *actionProtocolBgpGracefulRestartNotification) HoldTimerExpired() DeviceBgpHoldTimerExpired { + if obj.obj.HoldTimerExpired == nil { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.HOLD_TIMER_EXPIRED) + } + if obj.holdTimerExpiredHolder == nil { + obj.holdTimerExpiredHolder = &deviceBgpHoldTimerExpired{obj: obj.obj.HoldTimerExpired} + } + return obj.holdTimerExpiredHolder +} + +// description is TBD +// HoldTimerExpired returns a DeviceBgpHoldTimerExpired +func (obj *actionProtocolBgpGracefulRestartNotification) HasHoldTimerExpired() bool { + return obj.obj.HoldTimerExpired != nil +} + +// description is TBD +// SetHoldTimerExpired sets the DeviceBgpHoldTimerExpired value in the ActionProtocolBgpGracefulRestartNotification object +func (obj *actionProtocolBgpGracefulRestartNotification) SetHoldTimerExpired(value DeviceBgpHoldTimerExpired) ActionProtocolBgpGracefulRestartNotification { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.HOLD_TIMER_EXPIRED) + obj.holdTimerExpiredHolder = nil + obj.obj.HoldTimerExpired = value.msg() + + return obj +} + +// description is TBD +// FiniteStateMachineError returns a DeviceBgpFiniteStateMachineError +func (obj *actionProtocolBgpGracefulRestartNotification) FiniteStateMachineError() DeviceBgpFiniteStateMachineError { + if obj.obj.FiniteStateMachineError == nil { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.FINITE_STATE_MACHINE_ERROR) + } + if obj.finiteStateMachineErrorHolder == nil { + obj.finiteStateMachineErrorHolder = &deviceBgpFiniteStateMachineError{obj: obj.obj.FiniteStateMachineError} + } + return obj.finiteStateMachineErrorHolder +} + +// description is TBD +// FiniteStateMachineError returns a DeviceBgpFiniteStateMachineError +func (obj *actionProtocolBgpGracefulRestartNotification) HasFiniteStateMachineError() bool { + return obj.obj.FiniteStateMachineError != nil +} + +// description is TBD +// SetFiniteStateMachineError sets the DeviceBgpFiniteStateMachineError value in the ActionProtocolBgpGracefulRestartNotification object +func (obj *actionProtocolBgpGracefulRestartNotification) SetFiniteStateMachineError(value DeviceBgpFiniteStateMachineError) ActionProtocolBgpGracefulRestartNotification { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.FINITE_STATE_MACHINE_ERROR) + obj.finiteStateMachineErrorHolder = nil + obj.obj.FiniteStateMachineError = value.msg() + + return obj +} + +// description is TBD +// Custom returns a DeviceBgpCustomError +func (obj *actionProtocolBgpGracefulRestartNotification) Custom() DeviceBgpCustomError { + if obj.obj.Custom == nil { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.CUSTOM) + } + if obj.customHolder == nil { + obj.customHolder = &deviceBgpCustomError{obj: obj.obj.Custom} + } + return obj.customHolder +} + +// description is TBD +// Custom returns a DeviceBgpCustomError +func (obj *actionProtocolBgpGracefulRestartNotification) HasCustom() bool { + return obj.obj.Custom != nil +} + +// description is TBD +// SetCustom sets the DeviceBgpCustomError value in the ActionProtocolBgpGracefulRestartNotification object +func (obj *actionProtocolBgpGracefulRestartNotification) SetCustom(value DeviceBgpCustomError) ActionProtocolBgpGracefulRestartNotification { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.CUSTOM) + obj.customHolder = nil + obj.obj.Custom = value.msg() + + return obj +} + +func (obj *actionProtocolBgpGracefulRestartNotification) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Cease != nil { + + obj.Cease().validateObj(vObj, set_default) + } + + if obj.obj.MessageHeaderError != nil { + + obj.MessageHeaderError().validateObj(vObj, set_default) + } + + if obj.obj.OpenMessageError != nil { + + obj.OpenMessageError().validateObj(vObj, set_default) + } + + if obj.obj.UpdateMessageError != nil { + + obj.UpdateMessageError().validateObj(vObj, set_default) + } + + if obj.obj.HoldTimerExpired != nil { + + obj.HoldTimerExpired().validateObj(vObj, set_default) + } + + if obj.obj.FiniteStateMachineError != nil { + + obj.FiniteStateMachineError().validateObj(vObj, set_default) + } + + if obj.obj.Custom != nil { + + obj.Custom().validateObj(vObj, set_default) + } + +} + +func (obj *actionProtocolBgpGracefulRestartNotification) setDefault() { + var choices_set int = 0 + var choice ActionProtocolBgpGracefulRestartNotificationChoiceEnum + + if obj.obj.Cease != nil { + choices_set += 1 + choice = ActionProtocolBgpGracefulRestartNotificationChoice.CEASE + } + + if obj.obj.MessageHeaderError != nil { + choices_set += 1 + choice = ActionProtocolBgpGracefulRestartNotificationChoice.MESSAGE_HEADER_ERROR + } + + if obj.obj.OpenMessageError != nil { + choices_set += 1 + choice = ActionProtocolBgpGracefulRestartNotificationChoice.OPEN_MESSAGE_ERROR + } + + if obj.obj.UpdateMessageError != nil { + choices_set += 1 + choice = ActionProtocolBgpGracefulRestartNotificationChoice.UPDATE_MESSAGE_ERROR + } + + if obj.obj.HoldTimerExpired != nil { + choices_set += 1 + choice = ActionProtocolBgpGracefulRestartNotificationChoice.HOLD_TIMER_EXPIRED + } + + if obj.obj.FiniteStateMachineError != nil { + choices_set += 1 + choice = ActionProtocolBgpGracefulRestartNotificationChoice.FINITE_STATE_MACHINE_ERROR + } + + if obj.obj.Custom != nil { + choices_set += 1 + choice = ActionProtocolBgpGracefulRestartNotificationChoice.CUSTOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(ActionProtocolBgpGracefulRestartNotificationChoice.CEASE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ActionProtocolBgpGracefulRestartNotification") + } + } else { + intVal := otg.ActionProtocolBgpGracefulRestartNotification_Choice_Enum_value[string(choice)] + enumValue := otg.ActionProtocolBgpGracefulRestartNotification_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/action_protocol_bgp_initiate_graceful_restart.go b/gosnappi/action_protocol_bgp_initiate_graceful_restart.go new file mode 100644 index 00000000..20e87508 --- /dev/null +++ b/gosnappi/action_protocol_bgp_initiate_graceful_restart.go @@ -0,0 +1,418 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionProtocolBgpInitiateGracefulRestart ***** +type actionProtocolBgpInitiateGracefulRestart struct { + validation + obj *otg.ActionProtocolBgpInitiateGracefulRestart + marshaller marshalActionProtocolBgpInitiateGracefulRestart + unMarshaller unMarshalActionProtocolBgpInitiateGracefulRestart + notificationHolder ActionProtocolBgpGracefulRestartNotification +} + +func NewActionProtocolBgpInitiateGracefulRestart() ActionProtocolBgpInitiateGracefulRestart { + obj := actionProtocolBgpInitiateGracefulRestart{obj: &otg.ActionProtocolBgpInitiateGracefulRestart{}} + obj.setDefault() + return &obj +} + +func (obj *actionProtocolBgpInitiateGracefulRestart) msg() *otg.ActionProtocolBgpInitiateGracefulRestart { + return obj.obj +} + +func (obj *actionProtocolBgpInitiateGracefulRestart) setMsg(msg *otg.ActionProtocolBgpInitiateGracefulRestart) ActionProtocolBgpInitiateGracefulRestart { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionProtocolBgpInitiateGracefulRestart struct { + obj *actionProtocolBgpInitiateGracefulRestart +} + +type marshalActionProtocolBgpInitiateGracefulRestart interface { + // ToProto marshals ActionProtocolBgpInitiateGracefulRestart to protobuf object *otg.ActionProtocolBgpInitiateGracefulRestart + ToProto() (*otg.ActionProtocolBgpInitiateGracefulRestart, error) + // ToPbText marshals ActionProtocolBgpInitiateGracefulRestart to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionProtocolBgpInitiateGracefulRestart to YAML text + ToYaml() (string, error) + // ToJson marshals ActionProtocolBgpInitiateGracefulRestart to JSON text + ToJson() (string, error) +} + +type unMarshalactionProtocolBgpInitiateGracefulRestart struct { + obj *actionProtocolBgpInitiateGracefulRestart +} + +type unMarshalActionProtocolBgpInitiateGracefulRestart interface { + // FromProto unmarshals ActionProtocolBgpInitiateGracefulRestart from protobuf object *otg.ActionProtocolBgpInitiateGracefulRestart + FromProto(msg *otg.ActionProtocolBgpInitiateGracefulRestart) (ActionProtocolBgpInitiateGracefulRestart, error) + // FromPbText unmarshals ActionProtocolBgpInitiateGracefulRestart from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionProtocolBgpInitiateGracefulRestart from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionProtocolBgpInitiateGracefulRestart from JSON text + FromJson(value string) error +} + +func (obj *actionProtocolBgpInitiateGracefulRestart) Marshal() marshalActionProtocolBgpInitiateGracefulRestart { + if obj.marshaller == nil { + obj.marshaller = &marshalactionProtocolBgpInitiateGracefulRestart{obj: obj} + } + return obj.marshaller +} + +func (obj *actionProtocolBgpInitiateGracefulRestart) Unmarshal() unMarshalActionProtocolBgpInitiateGracefulRestart { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionProtocolBgpInitiateGracefulRestart{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionProtocolBgpInitiateGracefulRestart) ToProto() (*otg.ActionProtocolBgpInitiateGracefulRestart, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionProtocolBgpInitiateGracefulRestart) FromProto(msg *otg.ActionProtocolBgpInitiateGracefulRestart) (ActionProtocolBgpInitiateGracefulRestart, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionProtocolBgpInitiateGracefulRestart) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionProtocolBgpInitiateGracefulRestart) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionProtocolBgpInitiateGracefulRestart) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolBgpInitiateGracefulRestart) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionProtocolBgpInitiateGracefulRestart) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolBgpInitiateGracefulRestart) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionProtocolBgpInitiateGracefulRestart) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionProtocolBgpInitiateGracefulRestart) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionProtocolBgpInitiateGracefulRestart) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionProtocolBgpInitiateGracefulRestart) Clone() (ActionProtocolBgpInitiateGracefulRestart, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionProtocolBgpInitiateGracefulRestart() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionProtocolBgpInitiateGracefulRestart) setNil() { + obj.notificationHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionProtocolBgpInitiateGracefulRestart is initiates BGP Graceful Restart process for the selected BGP peers. If no name is specified then Graceful Restart will be sent to all configured BGP peers. To emulate scenarios where a peer sends a Notification and stops the session, an optional Notification object is included. If the remote peer and the local peer are both configured to perform Graceful Restart for Notification triggered session , this will result in Graceful Restart scenario to be triggered as per RFC8538. +type ActionProtocolBgpInitiateGracefulRestart interface { + Validation + // msg marshals ActionProtocolBgpInitiateGracefulRestart to protobuf object *otg.ActionProtocolBgpInitiateGracefulRestart + // and doesn't set defaults + msg() *otg.ActionProtocolBgpInitiateGracefulRestart + // setMsg unmarshals ActionProtocolBgpInitiateGracefulRestart from protobuf object *otg.ActionProtocolBgpInitiateGracefulRestart + // and doesn't set defaults + setMsg(*otg.ActionProtocolBgpInitiateGracefulRestart) ActionProtocolBgpInitiateGracefulRestart + // provides marshal interface + Marshal() marshalActionProtocolBgpInitiateGracefulRestart + // provides unmarshal interface + Unmarshal() unMarshalActionProtocolBgpInitiateGracefulRestart + // validate validates ActionProtocolBgpInitiateGracefulRestart + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionProtocolBgpInitiateGracefulRestart, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PeerNames returns []string, set in ActionProtocolBgpInitiateGracefulRestart. + PeerNames() []string + // SetPeerNames assigns []string provided by user to ActionProtocolBgpInitiateGracefulRestart + SetPeerNames(value []string) ActionProtocolBgpInitiateGracefulRestart + // RestartDelay returns uint32, set in ActionProtocolBgpInitiateGracefulRestart. + RestartDelay() uint32 + // SetRestartDelay assigns uint32 provided by user to ActionProtocolBgpInitiateGracefulRestart + SetRestartDelay(value uint32) ActionProtocolBgpInitiateGracefulRestart + // HasRestartDelay checks if RestartDelay has been set in ActionProtocolBgpInitiateGracefulRestart + HasRestartDelay() bool + // Notification returns ActionProtocolBgpGracefulRestartNotification, set in ActionProtocolBgpInitiateGracefulRestart. + // ActionProtocolBgpGracefulRestartNotification is defines the explicit contents of the NOTIFICATION message to be sent when executing InitiateGracefulRestart trigger. This causes the BGP connection to close.If a user wants to send custom Error Code and Error Subcode the custom object should be configured. A user can send IANA defined BGP NOTIFICATIONs according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. + Notification() ActionProtocolBgpGracefulRestartNotification + // SetNotification assigns ActionProtocolBgpGracefulRestartNotification provided by user to ActionProtocolBgpInitiateGracefulRestart. + // ActionProtocolBgpGracefulRestartNotification is defines the explicit contents of the NOTIFICATION message to be sent when executing InitiateGracefulRestart trigger. This causes the BGP connection to close.If a user wants to send custom Error Code and Error Subcode the custom object should be configured. A user can send IANA defined BGP NOTIFICATIONs according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. + SetNotification(value ActionProtocolBgpGracefulRestartNotification) ActionProtocolBgpInitiateGracefulRestart + // HasNotification checks if Notification has been set in ActionProtocolBgpInitiateGracefulRestart + HasNotification() bool + setNil() +} + +// The names of device BGP peers objects to control. +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// PeerNames returns a []string +func (obj *actionProtocolBgpInitiateGracefulRestart) PeerNames() []string { + if obj.obj.PeerNames == nil { + obj.obj.PeerNames = make([]string, 0) + } + return obj.obj.PeerNames +} + +// The names of device BGP peers objects to control. +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// SetPeerNames sets the []string value in the ActionProtocolBgpInitiateGracefulRestart object +func (obj *actionProtocolBgpInitiateGracefulRestart) SetPeerNames(value []string) ActionProtocolBgpInitiateGracefulRestart { + + if obj.obj.PeerNames == nil { + obj.obj.PeerNames = make([]string, 0) + } + obj.obj.PeerNames = value + + return obj +} + +// Duration (in seconds) after which selected BGP peers will initiate +// Graceful restart by sending the Open Message with Restart State bit set in the Graceful Restart capability. +// RestartDelay returns a uint32 +func (obj *actionProtocolBgpInitiateGracefulRestart) RestartDelay() uint32 { + + return *obj.obj.RestartDelay + +} + +// Duration (in seconds) after which selected BGP peers will initiate +// Graceful restart by sending the Open Message with Restart State bit set in the Graceful Restart capability. +// RestartDelay returns a uint32 +func (obj *actionProtocolBgpInitiateGracefulRestart) HasRestartDelay() bool { + return obj.obj.RestartDelay != nil +} + +// Duration (in seconds) after which selected BGP peers will initiate +// Graceful restart by sending the Open Message with Restart State bit set in the Graceful Restart capability. +// SetRestartDelay sets the uint32 value in the ActionProtocolBgpInitiateGracefulRestart object +func (obj *actionProtocolBgpInitiateGracefulRestart) SetRestartDelay(value uint32) ActionProtocolBgpInitiateGracefulRestart { + + obj.obj.RestartDelay = &value + return obj +} + +// Send a Notification to the peer as per configured parameters when initially bringing down a session as per +// configured parameters. +// Notification returns a ActionProtocolBgpGracefulRestartNotification +func (obj *actionProtocolBgpInitiateGracefulRestart) Notification() ActionProtocolBgpGracefulRestartNotification { + if obj.obj.Notification == nil { + obj.obj.Notification = NewActionProtocolBgpGracefulRestartNotification().msg() + } + if obj.notificationHolder == nil { + obj.notificationHolder = &actionProtocolBgpGracefulRestartNotification{obj: obj.obj.Notification} + } + return obj.notificationHolder +} + +// Send a Notification to the peer as per configured parameters when initially bringing down a session as per +// configured parameters. +// Notification returns a ActionProtocolBgpGracefulRestartNotification +func (obj *actionProtocolBgpInitiateGracefulRestart) HasNotification() bool { + return obj.obj.Notification != nil +} + +// Send a Notification to the peer as per configured parameters when initially bringing down a session as per +// configured parameters. +// SetNotification sets the ActionProtocolBgpGracefulRestartNotification value in the ActionProtocolBgpInitiateGracefulRestart object +func (obj *actionProtocolBgpInitiateGracefulRestart) SetNotification(value ActionProtocolBgpGracefulRestartNotification) ActionProtocolBgpInitiateGracefulRestart { + + obj.notificationHolder = nil + obj.obj.Notification = value.msg() + + return obj +} + +func (obj *actionProtocolBgpInitiateGracefulRestart) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RestartDelay != nil { + + if *obj.obj.RestartDelay > 3600 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= ActionProtocolBgpInitiateGracefulRestart.RestartDelay <= 3600 but Got %d", *obj.obj.RestartDelay)) + } + + } + + if obj.obj.Notification != nil { + + obj.Notification().validateObj(vObj, set_default) + } + +} + +func (obj *actionProtocolBgpInitiateGracefulRestart) setDefault() { + if obj.obj.RestartDelay == nil { + obj.SetRestartDelay(30) + } + +} diff --git a/gosnappi/action_protocol_bgp_notification.go b/gosnappi/action_protocol_bgp_notification.go new file mode 100644 index 00000000..3354762d --- /dev/null +++ b/gosnappi/action_protocol_bgp_notification.go @@ -0,0 +1,775 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionProtocolBgpNotification ***** +type actionProtocolBgpNotification struct { + validation + obj *otg.ActionProtocolBgpNotification + marshaller marshalActionProtocolBgpNotification + unMarshaller unMarshalActionProtocolBgpNotification + ceaseHolder DeviceBgpCeaseError + messageHeaderErrorHolder DeviceBgpMessageHeaderError + openMessageErrorHolder DeviceBgpOpenMessageError + updateMessageErrorHolder DeviceBgpUpdateMessageError + holdTimerExpiredHolder DeviceBgpHoldTimerExpired + finiteStateMachineErrorHolder DeviceBgpFiniteStateMachineError + customHolder DeviceBgpCustomError +} + +func NewActionProtocolBgpNotification() ActionProtocolBgpNotification { + obj := actionProtocolBgpNotification{obj: &otg.ActionProtocolBgpNotification{}} + obj.setDefault() + return &obj +} + +func (obj *actionProtocolBgpNotification) msg() *otg.ActionProtocolBgpNotification { + return obj.obj +} + +func (obj *actionProtocolBgpNotification) setMsg(msg *otg.ActionProtocolBgpNotification) ActionProtocolBgpNotification { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionProtocolBgpNotification struct { + obj *actionProtocolBgpNotification +} + +type marshalActionProtocolBgpNotification interface { + // ToProto marshals ActionProtocolBgpNotification to protobuf object *otg.ActionProtocolBgpNotification + ToProto() (*otg.ActionProtocolBgpNotification, error) + // ToPbText marshals ActionProtocolBgpNotification to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionProtocolBgpNotification to YAML text + ToYaml() (string, error) + // ToJson marshals ActionProtocolBgpNotification to JSON text + ToJson() (string, error) +} + +type unMarshalactionProtocolBgpNotification struct { + obj *actionProtocolBgpNotification +} + +type unMarshalActionProtocolBgpNotification interface { + // FromProto unmarshals ActionProtocolBgpNotification from protobuf object *otg.ActionProtocolBgpNotification + FromProto(msg *otg.ActionProtocolBgpNotification) (ActionProtocolBgpNotification, error) + // FromPbText unmarshals ActionProtocolBgpNotification from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionProtocolBgpNotification from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionProtocolBgpNotification from JSON text + FromJson(value string) error +} + +func (obj *actionProtocolBgpNotification) Marshal() marshalActionProtocolBgpNotification { + if obj.marshaller == nil { + obj.marshaller = &marshalactionProtocolBgpNotification{obj: obj} + } + return obj.marshaller +} + +func (obj *actionProtocolBgpNotification) Unmarshal() unMarshalActionProtocolBgpNotification { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionProtocolBgpNotification{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionProtocolBgpNotification) ToProto() (*otg.ActionProtocolBgpNotification, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionProtocolBgpNotification) FromProto(msg *otg.ActionProtocolBgpNotification) (ActionProtocolBgpNotification, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionProtocolBgpNotification) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionProtocolBgpNotification) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionProtocolBgpNotification) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolBgpNotification) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionProtocolBgpNotification) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolBgpNotification) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionProtocolBgpNotification) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionProtocolBgpNotification) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionProtocolBgpNotification) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionProtocolBgpNotification) Clone() (ActionProtocolBgpNotification, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionProtocolBgpNotification() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionProtocolBgpNotification) setNil() { + obj.ceaseHolder = nil + obj.messageHeaderErrorHolder = nil + obj.openMessageErrorHolder = nil + obj.updateMessageErrorHolder = nil + obj.holdTimerExpiredHolder = nil + obj.finiteStateMachineErrorHolder = nil + obj.customHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionProtocolBgpNotification is a NOTIFICATION message is sent when an error is detected with the BGP session, such as hold timer expiring, misconfigured AS number or a BGP session reset is requested. This causes the BGP connection to close. Send explicit NOTIFICATIONs for list of specified BGP peers. If a user wants to send custom Error Code and Error Subcode the custom object should be configured. A user can send IANA defined BGP NOTIFICATIONs according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. +type ActionProtocolBgpNotification interface { + Validation + // msg marshals ActionProtocolBgpNotification to protobuf object *otg.ActionProtocolBgpNotification + // and doesn't set defaults + msg() *otg.ActionProtocolBgpNotification + // setMsg unmarshals ActionProtocolBgpNotification from protobuf object *otg.ActionProtocolBgpNotification + // and doesn't set defaults + setMsg(*otg.ActionProtocolBgpNotification) ActionProtocolBgpNotification + // provides marshal interface + Marshal() marshalActionProtocolBgpNotification + // provides unmarshal interface + Unmarshal() unMarshalActionProtocolBgpNotification + // validate validates ActionProtocolBgpNotification + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionProtocolBgpNotification, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Names returns []string, set in ActionProtocolBgpNotification. + Names() []string + // SetNames assigns []string provided by user to ActionProtocolBgpNotification + SetNames(value []string) ActionProtocolBgpNotification + // Choice returns ActionProtocolBgpNotificationChoiceEnum, set in ActionProtocolBgpNotification + Choice() ActionProtocolBgpNotificationChoiceEnum + // setChoice assigns ActionProtocolBgpNotificationChoiceEnum provided by user to ActionProtocolBgpNotification + setChoice(value ActionProtocolBgpNotificationChoiceEnum) ActionProtocolBgpNotification + // HasChoice checks if Choice has been set in ActionProtocolBgpNotification + HasChoice() bool + // Cease returns DeviceBgpCeaseError, set in ActionProtocolBgpNotification. + // DeviceBgpCeaseError is in the absence of any fatal errors, a BGP peer can close its BGP connection by sending the NOTIFICATION message with the Error Code Cease. The 'hard_reset_code6_subcode9' subcode for Cease Notification can be used to signal a hard reset that will indicate that Graceful Restart cannot be performed, even when Notification extensions to Graceful Restart procedure is supported. + Cease() DeviceBgpCeaseError + // SetCease assigns DeviceBgpCeaseError provided by user to ActionProtocolBgpNotification. + // DeviceBgpCeaseError is in the absence of any fatal errors, a BGP peer can close its BGP connection by sending the NOTIFICATION message with the Error Code Cease. The 'hard_reset_code6_subcode9' subcode for Cease Notification can be used to signal a hard reset that will indicate that Graceful Restart cannot be performed, even when Notification extensions to Graceful Restart procedure is supported. + SetCease(value DeviceBgpCeaseError) ActionProtocolBgpNotification + // HasCease checks if Cease has been set in ActionProtocolBgpNotification + HasCease() bool + // MessageHeaderError returns DeviceBgpMessageHeaderError, set in ActionProtocolBgpNotification. + // DeviceBgpMessageHeaderError is all errors detected while processing the Message Header are indicated by sending the NOTIFICATION message with the Error Code-Message Header Error. The Error Subcode elaborates on the specific nature of the error. + MessageHeaderError() DeviceBgpMessageHeaderError + // SetMessageHeaderError assigns DeviceBgpMessageHeaderError provided by user to ActionProtocolBgpNotification. + // DeviceBgpMessageHeaderError is all errors detected while processing the Message Header are indicated by sending the NOTIFICATION message with the Error Code-Message Header Error. The Error Subcode elaborates on the specific nature of the error. + SetMessageHeaderError(value DeviceBgpMessageHeaderError) ActionProtocolBgpNotification + // HasMessageHeaderError checks if MessageHeaderError has been set in ActionProtocolBgpNotification + HasMessageHeaderError() bool + // OpenMessageError returns DeviceBgpOpenMessageError, set in ActionProtocolBgpNotification. + // DeviceBgpOpenMessageError is all errors detected while processing the OPEN message are indicated by sending the NOTIFICATION message with the Error Code-Open Message Error. The Error Subcode elaborates on the specific nature of the error. + OpenMessageError() DeviceBgpOpenMessageError + // SetOpenMessageError assigns DeviceBgpOpenMessageError provided by user to ActionProtocolBgpNotification. + // DeviceBgpOpenMessageError is all errors detected while processing the OPEN message are indicated by sending the NOTIFICATION message with the Error Code-Open Message Error. The Error Subcode elaborates on the specific nature of the error. + SetOpenMessageError(value DeviceBgpOpenMessageError) ActionProtocolBgpNotification + // HasOpenMessageError checks if OpenMessageError has been set in ActionProtocolBgpNotification + HasOpenMessageError() bool + // UpdateMessageError returns DeviceBgpUpdateMessageError, set in ActionProtocolBgpNotification. + // DeviceBgpUpdateMessageError is all errors detected while processing the UPDATE message are indicated by sending the NOTIFICATION message with the Error Code-Update Message Error. The Error Subcode elaborates on the specific nature of the error. + UpdateMessageError() DeviceBgpUpdateMessageError + // SetUpdateMessageError assigns DeviceBgpUpdateMessageError provided by user to ActionProtocolBgpNotification. + // DeviceBgpUpdateMessageError is all errors detected while processing the UPDATE message are indicated by sending the NOTIFICATION message with the Error Code-Update Message Error. The Error Subcode elaborates on the specific nature of the error. + SetUpdateMessageError(value DeviceBgpUpdateMessageError) ActionProtocolBgpNotification + // HasUpdateMessageError checks if UpdateMessageError has been set in ActionProtocolBgpNotification + HasUpdateMessageError() bool + // HoldTimerExpired returns DeviceBgpHoldTimerExpired, set in ActionProtocolBgpNotification. + // DeviceBgpHoldTimerExpired is if a system does not receive successive KEEPALIVE, UPDATE, and/or NOTIFICATION messages within the period specified in the Hold Time field of the OPEN message, then the NOTIFICATION message with the Hold Timer Expired Error Code(Error Code 4) is sent and the BGP connection is closed. The Sub Code used is 0. If a user wants to use non zero Sub Code then CustomError can be used. + HoldTimerExpired() DeviceBgpHoldTimerExpired + // SetHoldTimerExpired assigns DeviceBgpHoldTimerExpired provided by user to ActionProtocolBgpNotification. + // DeviceBgpHoldTimerExpired is if a system does not receive successive KEEPALIVE, UPDATE, and/or NOTIFICATION messages within the period specified in the Hold Time field of the OPEN message, then the NOTIFICATION message with the Hold Timer Expired Error Code(Error Code 4) is sent and the BGP connection is closed. The Sub Code used is 0. If a user wants to use non zero Sub Code then CustomError can be used. + SetHoldTimerExpired(value DeviceBgpHoldTimerExpired) ActionProtocolBgpNotification + // HasHoldTimerExpired checks if HoldTimerExpired has been set in ActionProtocolBgpNotification + HasHoldTimerExpired() bool + // FiniteStateMachineError returns DeviceBgpFiniteStateMachineError, set in ActionProtocolBgpNotification. + // DeviceBgpFiniteStateMachineError is any error detected by the BGP Finite State Machine (e.g., receipt of an unexpected event) is indicated by sending the NOTIFICATION message with the Error Code-Finite State Machine Error(Error Code 5). The Sub Code used is 0. If a user wants to use non zero Sub Code then CustomError can be used. + FiniteStateMachineError() DeviceBgpFiniteStateMachineError + // SetFiniteStateMachineError assigns DeviceBgpFiniteStateMachineError provided by user to ActionProtocolBgpNotification. + // DeviceBgpFiniteStateMachineError is any error detected by the BGP Finite State Machine (e.g., receipt of an unexpected event) is indicated by sending the NOTIFICATION message with the Error Code-Finite State Machine Error(Error Code 5). The Sub Code used is 0. If a user wants to use non zero Sub Code then CustomError can be used. + SetFiniteStateMachineError(value DeviceBgpFiniteStateMachineError) ActionProtocolBgpNotification + // HasFiniteStateMachineError checks if FiniteStateMachineError has been set in ActionProtocolBgpNotification + HasFiniteStateMachineError() bool + // Custom returns DeviceBgpCustomError, set in ActionProtocolBgpNotification. + // DeviceBgpCustomError is a BGP peer can send NOTIFICATION message with user defined Error Code and Error Subcode. + Custom() DeviceBgpCustomError + // SetCustom assigns DeviceBgpCustomError provided by user to ActionProtocolBgpNotification. + // DeviceBgpCustomError is a BGP peer can send NOTIFICATION message with user defined Error Code and Error Subcode. + SetCustom(value DeviceBgpCustomError) ActionProtocolBgpNotification + // HasCustom checks if Custom has been set in ActionProtocolBgpNotification + HasCustom() bool + setNil() +} + +// The names of BGP Peers to send NOTIFICATION to. If no name is specified then NOTIFICATION will be sent to all configured BGP peers. +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// Names returns a []string +func (obj *actionProtocolBgpNotification) Names() []string { + if obj.obj.Names == nil { + obj.obj.Names = make([]string, 0) + } + return obj.obj.Names +} + +// The names of BGP Peers to send NOTIFICATION to. If no name is specified then NOTIFICATION will be sent to all configured BGP peers. +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// SetNames sets the []string value in the ActionProtocolBgpNotification object +func (obj *actionProtocolBgpNotification) SetNames(value []string) ActionProtocolBgpNotification { + + if obj.obj.Names == nil { + obj.obj.Names = make([]string, 0) + } + obj.obj.Names = value + + return obj +} + +type ActionProtocolBgpNotificationChoiceEnum string + +// Enum of Choice on ActionProtocolBgpNotification +var ActionProtocolBgpNotificationChoice = struct { + CEASE ActionProtocolBgpNotificationChoiceEnum + MESSAGE_HEADER_ERROR ActionProtocolBgpNotificationChoiceEnum + OPEN_MESSAGE_ERROR ActionProtocolBgpNotificationChoiceEnum + UPDATE_MESSAGE_ERROR ActionProtocolBgpNotificationChoiceEnum + HOLD_TIMER_EXPIRED ActionProtocolBgpNotificationChoiceEnum + FINITE_STATE_MACHINE_ERROR ActionProtocolBgpNotificationChoiceEnum + CUSTOM ActionProtocolBgpNotificationChoiceEnum +}{ + CEASE: ActionProtocolBgpNotificationChoiceEnum("cease"), + MESSAGE_HEADER_ERROR: ActionProtocolBgpNotificationChoiceEnum("message_header_error"), + OPEN_MESSAGE_ERROR: ActionProtocolBgpNotificationChoiceEnum("open_message_error"), + UPDATE_MESSAGE_ERROR: ActionProtocolBgpNotificationChoiceEnum("update_message_error"), + HOLD_TIMER_EXPIRED: ActionProtocolBgpNotificationChoiceEnum("hold_timer_expired"), + FINITE_STATE_MACHINE_ERROR: ActionProtocolBgpNotificationChoiceEnum("finite_state_machine_error"), + CUSTOM: ActionProtocolBgpNotificationChoiceEnum("custom"), +} + +func (obj *actionProtocolBgpNotification) Choice() ActionProtocolBgpNotificationChoiceEnum { + return ActionProtocolBgpNotificationChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// Each BGP NOTIFICATION message includes an Error Code field indicating what type of problem occurred. For certain Error Codes, an Error Subcode field provides additional details about the specific nature of the problem. The choice value will provide the Error Code used in NOTIFICATION message. The Subcode can be set for each of the corresponding errors except for Hold Timer Expired error and BGP Finite State Machine error. In both of these cases Subcode 0 will be sent. If a user wants to use non zero Sub Code then custom choice can be used. +// Choice returns a string +func (obj *actionProtocolBgpNotification) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *actionProtocolBgpNotification) setChoice(value ActionProtocolBgpNotificationChoiceEnum) ActionProtocolBgpNotification { + intValue, ok := otg.ActionProtocolBgpNotification_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ActionProtocolBgpNotificationChoiceEnum", string(value))) + return obj + } + enumValue := otg.ActionProtocolBgpNotification_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.customHolder = nil + obj.obj.FiniteStateMachineError = nil + obj.finiteStateMachineErrorHolder = nil + obj.obj.HoldTimerExpired = nil + obj.holdTimerExpiredHolder = nil + obj.obj.UpdateMessageError = nil + obj.updateMessageErrorHolder = nil + obj.obj.OpenMessageError = nil + obj.openMessageErrorHolder = nil + obj.obj.MessageHeaderError = nil + obj.messageHeaderErrorHolder = nil + obj.obj.Cease = nil + obj.ceaseHolder = nil + + if value == ActionProtocolBgpNotificationChoice.CEASE { + obj.obj.Cease = NewDeviceBgpCeaseError().msg() + } + + if value == ActionProtocolBgpNotificationChoice.MESSAGE_HEADER_ERROR { + obj.obj.MessageHeaderError = NewDeviceBgpMessageHeaderError().msg() + } + + if value == ActionProtocolBgpNotificationChoice.OPEN_MESSAGE_ERROR { + obj.obj.OpenMessageError = NewDeviceBgpOpenMessageError().msg() + } + + if value == ActionProtocolBgpNotificationChoice.UPDATE_MESSAGE_ERROR { + obj.obj.UpdateMessageError = NewDeviceBgpUpdateMessageError().msg() + } + + if value == ActionProtocolBgpNotificationChoice.HOLD_TIMER_EXPIRED { + obj.obj.HoldTimerExpired = NewDeviceBgpHoldTimerExpired().msg() + } + + if value == ActionProtocolBgpNotificationChoice.FINITE_STATE_MACHINE_ERROR { + obj.obj.FiniteStateMachineError = NewDeviceBgpFiniteStateMachineError().msg() + } + + if value == ActionProtocolBgpNotificationChoice.CUSTOM { + obj.obj.Custom = NewDeviceBgpCustomError().msg() + } + + return obj +} + +// description is TBD +// Cease returns a DeviceBgpCeaseError +func (obj *actionProtocolBgpNotification) Cease() DeviceBgpCeaseError { + if obj.obj.Cease == nil { + obj.setChoice(ActionProtocolBgpNotificationChoice.CEASE) + } + if obj.ceaseHolder == nil { + obj.ceaseHolder = &deviceBgpCeaseError{obj: obj.obj.Cease} + } + return obj.ceaseHolder +} + +// description is TBD +// Cease returns a DeviceBgpCeaseError +func (obj *actionProtocolBgpNotification) HasCease() bool { + return obj.obj.Cease != nil +} + +// description is TBD +// SetCease sets the DeviceBgpCeaseError value in the ActionProtocolBgpNotification object +func (obj *actionProtocolBgpNotification) SetCease(value DeviceBgpCeaseError) ActionProtocolBgpNotification { + obj.setChoice(ActionProtocolBgpNotificationChoice.CEASE) + obj.ceaseHolder = nil + obj.obj.Cease = value.msg() + + return obj +} + +// description is TBD +// MessageHeaderError returns a DeviceBgpMessageHeaderError +func (obj *actionProtocolBgpNotification) MessageHeaderError() DeviceBgpMessageHeaderError { + if obj.obj.MessageHeaderError == nil { + obj.setChoice(ActionProtocolBgpNotificationChoice.MESSAGE_HEADER_ERROR) + } + if obj.messageHeaderErrorHolder == nil { + obj.messageHeaderErrorHolder = &deviceBgpMessageHeaderError{obj: obj.obj.MessageHeaderError} + } + return obj.messageHeaderErrorHolder +} + +// description is TBD +// MessageHeaderError returns a DeviceBgpMessageHeaderError +func (obj *actionProtocolBgpNotification) HasMessageHeaderError() bool { + return obj.obj.MessageHeaderError != nil +} + +// description is TBD +// SetMessageHeaderError sets the DeviceBgpMessageHeaderError value in the ActionProtocolBgpNotification object +func (obj *actionProtocolBgpNotification) SetMessageHeaderError(value DeviceBgpMessageHeaderError) ActionProtocolBgpNotification { + obj.setChoice(ActionProtocolBgpNotificationChoice.MESSAGE_HEADER_ERROR) + obj.messageHeaderErrorHolder = nil + obj.obj.MessageHeaderError = value.msg() + + return obj +} + +// description is TBD +// OpenMessageError returns a DeviceBgpOpenMessageError +func (obj *actionProtocolBgpNotification) OpenMessageError() DeviceBgpOpenMessageError { + if obj.obj.OpenMessageError == nil { + obj.setChoice(ActionProtocolBgpNotificationChoice.OPEN_MESSAGE_ERROR) + } + if obj.openMessageErrorHolder == nil { + obj.openMessageErrorHolder = &deviceBgpOpenMessageError{obj: obj.obj.OpenMessageError} + } + return obj.openMessageErrorHolder +} + +// description is TBD +// OpenMessageError returns a DeviceBgpOpenMessageError +func (obj *actionProtocolBgpNotification) HasOpenMessageError() bool { + return obj.obj.OpenMessageError != nil +} + +// description is TBD +// SetOpenMessageError sets the DeviceBgpOpenMessageError value in the ActionProtocolBgpNotification object +func (obj *actionProtocolBgpNotification) SetOpenMessageError(value DeviceBgpOpenMessageError) ActionProtocolBgpNotification { + obj.setChoice(ActionProtocolBgpNotificationChoice.OPEN_MESSAGE_ERROR) + obj.openMessageErrorHolder = nil + obj.obj.OpenMessageError = value.msg() + + return obj +} + +// description is TBD +// UpdateMessageError returns a DeviceBgpUpdateMessageError +func (obj *actionProtocolBgpNotification) UpdateMessageError() DeviceBgpUpdateMessageError { + if obj.obj.UpdateMessageError == nil { + obj.setChoice(ActionProtocolBgpNotificationChoice.UPDATE_MESSAGE_ERROR) + } + if obj.updateMessageErrorHolder == nil { + obj.updateMessageErrorHolder = &deviceBgpUpdateMessageError{obj: obj.obj.UpdateMessageError} + } + return obj.updateMessageErrorHolder +} + +// description is TBD +// UpdateMessageError returns a DeviceBgpUpdateMessageError +func (obj *actionProtocolBgpNotification) HasUpdateMessageError() bool { + return obj.obj.UpdateMessageError != nil +} + +// description is TBD +// SetUpdateMessageError sets the DeviceBgpUpdateMessageError value in the ActionProtocolBgpNotification object +func (obj *actionProtocolBgpNotification) SetUpdateMessageError(value DeviceBgpUpdateMessageError) ActionProtocolBgpNotification { + obj.setChoice(ActionProtocolBgpNotificationChoice.UPDATE_MESSAGE_ERROR) + obj.updateMessageErrorHolder = nil + obj.obj.UpdateMessageError = value.msg() + + return obj +} + +// description is TBD +// HoldTimerExpired returns a DeviceBgpHoldTimerExpired +func (obj *actionProtocolBgpNotification) HoldTimerExpired() DeviceBgpHoldTimerExpired { + if obj.obj.HoldTimerExpired == nil { + obj.setChoice(ActionProtocolBgpNotificationChoice.HOLD_TIMER_EXPIRED) + } + if obj.holdTimerExpiredHolder == nil { + obj.holdTimerExpiredHolder = &deviceBgpHoldTimerExpired{obj: obj.obj.HoldTimerExpired} + } + return obj.holdTimerExpiredHolder +} + +// description is TBD +// HoldTimerExpired returns a DeviceBgpHoldTimerExpired +func (obj *actionProtocolBgpNotification) HasHoldTimerExpired() bool { + return obj.obj.HoldTimerExpired != nil +} + +// description is TBD +// SetHoldTimerExpired sets the DeviceBgpHoldTimerExpired value in the ActionProtocolBgpNotification object +func (obj *actionProtocolBgpNotification) SetHoldTimerExpired(value DeviceBgpHoldTimerExpired) ActionProtocolBgpNotification { + obj.setChoice(ActionProtocolBgpNotificationChoice.HOLD_TIMER_EXPIRED) + obj.holdTimerExpiredHolder = nil + obj.obj.HoldTimerExpired = value.msg() + + return obj +} + +// description is TBD +// FiniteStateMachineError returns a DeviceBgpFiniteStateMachineError +func (obj *actionProtocolBgpNotification) FiniteStateMachineError() DeviceBgpFiniteStateMachineError { + if obj.obj.FiniteStateMachineError == nil { + obj.setChoice(ActionProtocolBgpNotificationChoice.FINITE_STATE_MACHINE_ERROR) + } + if obj.finiteStateMachineErrorHolder == nil { + obj.finiteStateMachineErrorHolder = &deviceBgpFiniteStateMachineError{obj: obj.obj.FiniteStateMachineError} + } + return obj.finiteStateMachineErrorHolder +} + +// description is TBD +// FiniteStateMachineError returns a DeviceBgpFiniteStateMachineError +func (obj *actionProtocolBgpNotification) HasFiniteStateMachineError() bool { + return obj.obj.FiniteStateMachineError != nil +} + +// description is TBD +// SetFiniteStateMachineError sets the DeviceBgpFiniteStateMachineError value in the ActionProtocolBgpNotification object +func (obj *actionProtocolBgpNotification) SetFiniteStateMachineError(value DeviceBgpFiniteStateMachineError) ActionProtocolBgpNotification { + obj.setChoice(ActionProtocolBgpNotificationChoice.FINITE_STATE_MACHINE_ERROR) + obj.finiteStateMachineErrorHolder = nil + obj.obj.FiniteStateMachineError = value.msg() + + return obj +} + +// description is TBD +// Custom returns a DeviceBgpCustomError +func (obj *actionProtocolBgpNotification) Custom() DeviceBgpCustomError { + if obj.obj.Custom == nil { + obj.setChoice(ActionProtocolBgpNotificationChoice.CUSTOM) + } + if obj.customHolder == nil { + obj.customHolder = &deviceBgpCustomError{obj: obj.obj.Custom} + } + return obj.customHolder +} + +// description is TBD +// Custom returns a DeviceBgpCustomError +func (obj *actionProtocolBgpNotification) HasCustom() bool { + return obj.obj.Custom != nil +} + +// description is TBD +// SetCustom sets the DeviceBgpCustomError value in the ActionProtocolBgpNotification object +func (obj *actionProtocolBgpNotification) SetCustom(value DeviceBgpCustomError) ActionProtocolBgpNotification { + obj.setChoice(ActionProtocolBgpNotificationChoice.CUSTOM) + obj.customHolder = nil + obj.obj.Custom = value.msg() + + return obj +} + +func (obj *actionProtocolBgpNotification) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Cease != nil { + + obj.Cease().validateObj(vObj, set_default) + } + + if obj.obj.MessageHeaderError != nil { + + obj.MessageHeaderError().validateObj(vObj, set_default) + } + + if obj.obj.OpenMessageError != nil { + + obj.OpenMessageError().validateObj(vObj, set_default) + } + + if obj.obj.UpdateMessageError != nil { + + obj.UpdateMessageError().validateObj(vObj, set_default) + } + + if obj.obj.HoldTimerExpired != nil { + + obj.HoldTimerExpired().validateObj(vObj, set_default) + } + + if obj.obj.FiniteStateMachineError != nil { + + obj.FiniteStateMachineError().validateObj(vObj, set_default) + } + + if obj.obj.Custom != nil { + + obj.Custom().validateObj(vObj, set_default) + } + +} + +func (obj *actionProtocolBgpNotification) setDefault() { + var choices_set int = 0 + var choice ActionProtocolBgpNotificationChoiceEnum + + if obj.obj.Cease != nil { + choices_set += 1 + choice = ActionProtocolBgpNotificationChoice.CEASE + } + + if obj.obj.MessageHeaderError != nil { + choices_set += 1 + choice = ActionProtocolBgpNotificationChoice.MESSAGE_HEADER_ERROR + } + + if obj.obj.OpenMessageError != nil { + choices_set += 1 + choice = ActionProtocolBgpNotificationChoice.OPEN_MESSAGE_ERROR + } + + if obj.obj.UpdateMessageError != nil { + choices_set += 1 + choice = ActionProtocolBgpNotificationChoice.UPDATE_MESSAGE_ERROR + } + + if obj.obj.HoldTimerExpired != nil { + choices_set += 1 + choice = ActionProtocolBgpNotificationChoice.HOLD_TIMER_EXPIRED + } + + if obj.obj.FiniteStateMachineError != nil { + choices_set += 1 + choice = ActionProtocolBgpNotificationChoice.FINITE_STATE_MACHINE_ERROR + } + + if obj.obj.Custom != nil { + choices_set += 1 + choice = ActionProtocolBgpNotificationChoice.CUSTOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(ActionProtocolBgpNotificationChoice.CEASE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ActionProtocolBgpNotification") + } + } else { + intVal := otg.ActionProtocolBgpNotification_Choice_Enum_value[string(choice)] + enumValue := otg.ActionProtocolBgpNotification_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/action_protocol_ipv4.go b/gosnappi/action_protocol_ipv4.go new file mode 100644 index 00000000..c9f1bf67 --- /dev/null +++ b/gosnappi/action_protocol_ipv4.go @@ -0,0 +1,387 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionProtocolIpv4 ***** +type actionProtocolIpv4 struct { + validation + obj *otg.ActionProtocolIpv4 + marshaller marshalActionProtocolIpv4 + unMarshaller unMarshalActionProtocolIpv4 + pingHolder ActionProtocolIpv4Ping +} + +func NewActionProtocolIpv4() ActionProtocolIpv4 { + obj := actionProtocolIpv4{obj: &otg.ActionProtocolIpv4{}} + obj.setDefault() + return &obj +} + +func (obj *actionProtocolIpv4) msg() *otg.ActionProtocolIpv4 { + return obj.obj +} + +func (obj *actionProtocolIpv4) setMsg(msg *otg.ActionProtocolIpv4) ActionProtocolIpv4 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionProtocolIpv4 struct { + obj *actionProtocolIpv4 +} + +type marshalActionProtocolIpv4 interface { + // ToProto marshals ActionProtocolIpv4 to protobuf object *otg.ActionProtocolIpv4 + ToProto() (*otg.ActionProtocolIpv4, error) + // ToPbText marshals ActionProtocolIpv4 to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionProtocolIpv4 to YAML text + ToYaml() (string, error) + // ToJson marshals ActionProtocolIpv4 to JSON text + ToJson() (string, error) +} + +type unMarshalactionProtocolIpv4 struct { + obj *actionProtocolIpv4 +} + +type unMarshalActionProtocolIpv4 interface { + // FromProto unmarshals ActionProtocolIpv4 from protobuf object *otg.ActionProtocolIpv4 + FromProto(msg *otg.ActionProtocolIpv4) (ActionProtocolIpv4, error) + // FromPbText unmarshals ActionProtocolIpv4 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionProtocolIpv4 from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionProtocolIpv4 from JSON text + FromJson(value string) error +} + +func (obj *actionProtocolIpv4) Marshal() marshalActionProtocolIpv4 { + if obj.marshaller == nil { + obj.marshaller = &marshalactionProtocolIpv4{obj: obj} + } + return obj.marshaller +} + +func (obj *actionProtocolIpv4) Unmarshal() unMarshalActionProtocolIpv4 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionProtocolIpv4{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionProtocolIpv4) ToProto() (*otg.ActionProtocolIpv4, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionProtocolIpv4) FromProto(msg *otg.ActionProtocolIpv4) (ActionProtocolIpv4, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionProtocolIpv4) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionProtocolIpv4) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionProtocolIpv4) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolIpv4) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionProtocolIpv4) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolIpv4) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionProtocolIpv4) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionProtocolIpv4) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionProtocolIpv4) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionProtocolIpv4) Clone() (ActionProtocolIpv4, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionProtocolIpv4() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionProtocolIpv4) setNil() { + obj.pingHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionProtocolIpv4 is actions associated with IPv4 on configured resources. +type ActionProtocolIpv4 interface { + Validation + // msg marshals ActionProtocolIpv4 to protobuf object *otg.ActionProtocolIpv4 + // and doesn't set defaults + msg() *otg.ActionProtocolIpv4 + // setMsg unmarshals ActionProtocolIpv4 from protobuf object *otg.ActionProtocolIpv4 + // and doesn't set defaults + setMsg(*otg.ActionProtocolIpv4) ActionProtocolIpv4 + // provides marshal interface + Marshal() marshalActionProtocolIpv4 + // provides unmarshal interface + Unmarshal() unMarshalActionProtocolIpv4 + // validate validates ActionProtocolIpv4 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionProtocolIpv4, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ActionProtocolIpv4ChoiceEnum, set in ActionProtocolIpv4 + Choice() ActionProtocolIpv4ChoiceEnum + // setChoice assigns ActionProtocolIpv4ChoiceEnum provided by user to ActionProtocolIpv4 + setChoice(value ActionProtocolIpv4ChoiceEnum) ActionProtocolIpv4 + // Ping returns ActionProtocolIpv4Ping, set in ActionProtocolIpv4. + // ActionProtocolIpv4Ping is request for initiating ping between multiple source and destination pairs. + Ping() ActionProtocolIpv4Ping + // SetPing assigns ActionProtocolIpv4Ping provided by user to ActionProtocolIpv4. + // ActionProtocolIpv4Ping is request for initiating ping between multiple source and destination pairs. + SetPing(value ActionProtocolIpv4Ping) ActionProtocolIpv4 + // HasPing checks if Ping has been set in ActionProtocolIpv4 + HasPing() bool + setNil() +} + +type ActionProtocolIpv4ChoiceEnum string + +// Enum of Choice on ActionProtocolIpv4 +var ActionProtocolIpv4Choice = struct { + PING ActionProtocolIpv4ChoiceEnum +}{ + PING: ActionProtocolIpv4ChoiceEnum("ping"), +} + +func (obj *actionProtocolIpv4) Choice() ActionProtocolIpv4ChoiceEnum { + return ActionProtocolIpv4ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *actionProtocolIpv4) setChoice(value ActionProtocolIpv4ChoiceEnum) ActionProtocolIpv4 { + intValue, ok := otg.ActionProtocolIpv4_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ActionProtocolIpv4ChoiceEnum", string(value))) + return obj + } + enumValue := otg.ActionProtocolIpv4_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ping = nil + obj.pingHolder = nil + + if value == ActionProtocolIpv4Choice.PING { + obj.obj.Ping = NewActionProtocolIpv4Ping().msg() + } + + return obj +} + +// description is TBD +// Ping returns a ActionProtocolIpv4Ping +func (obj *actionProtocolIpv4) Ping() ActionProtocolIpv4Ping { + if obj.obj.Ping == nil { + obj.setChoice(ActionProtocolIpv4Choice.PING) + } + if obj.pingHolder == nil { + obj.pingHolder = &actionProtocolIpv4Ping{obj: obj.obj.Ping} + } + return obj.pingHolder +} + +// description is TBD +// Ping returns a ActionProtocolIpv4Ping +func (obj *actionProtocolIpv4) HasPing() bool { + return obj.obj.Ping != nil +} + +// description is TBD +// SetPing sets the ActionProtocolIpv4Ping value in the ActionProtocolIpv4 object +func (obj *actionProtocolIpv4) SetPing(value ActionProtocolIpv4Ping) ActionProtocolIpv4 { + obj.setChoice(ActionProtocolIpv4Choice.PING) + obj.pingHolder = nil + obj.obj.Ping = value.msg() + + return obj +} + +func (obj *actionProtocolIpv4) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface ActionProtocolIpv4") + } + + if obj.obj.Ping != nil { + + obj.Ping().validateObj(vObj, set_default) + } + +} + +func (obj *actionProtocolIpv4) setDefault() { + var choices_set int = 0 + var choice ActionProtocolIpv4ChoiceEnum + + if obj.obj.Ping != nil { + choices_set += 1 + choice = ActionProtocolIpv4Choice.PING + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ActionProtocolIpv4") + } + } else { + intVal := otg.ActionProtocolIpv4_Choice_Enum_value[string(choice)] + enumValue := otg.ActionProtocolIpv4_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/action_protocol_ipv4_ping.go b/gosnappi/action_protocol_ipv4_ping.go new file mode 100644 index 00000000..219cc249 --- /dev/null +++ b/gosnappi/action_protocol_ipv4_ping.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionProtocolIpv4Ping ***** +type actionProtocolIpv4Ping struct { + validation + obj *otg.ActionProtocolIpv4Ping + marshaller marshalActionProtocolIpv4Ping + unMarshaller unMarshalActionProtocolIpv4Ping + requestsHolder ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter +} + +func NewActionProtocolIpv4Ping() ActionProtocolIpv4Ping { + obj := actionProtocolIpv4Ping{obj: &otg.ActionProtocolIpv4Ping{}} + obj.setDefault() + return &obj +} + +func (obj *actionProtocolIpv4Ping) msg() *otg.ActionProtocolIpv4Ping { + return obj.obj +} + +func (obj *actionProtocolIpv4Ping) setMsg(msg *otg.ActionProtocolIpv4Ping) ActionProtocolIpv4Ping { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionProtocolIpv4Ping struct { + obj *actionProtocolIpv4Ping +} + +type marshalActionProtocolIpv4Ping interface { + // ToProto marshals ActionProtocolIpv4Ping to protobuf object *otg.ActionProtocolIpv4Ping + ToProto() (*otg.ActionProtocolIpv4Ping, error) + // ToPbText marshals ActionProtocolIpv4Ping to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionProtocolIpv4Ping to YAML text + ToYaml() (string, error) + // ToJson marshals ActionProtocolIpv4Ping to JSON text + ToJson() (string, error) +} + +type unMarshalactionProtocolIpv4Ping struct { + obj *actionProtocolIpv4Ping +} + +type unMarshalActionProtocolIpv4Ping interface { + // FromProto unmarshals ActionProtocolIpv4Ping from protobuf object *otg.ActionProtocolIpv4Ping + FromProto(msg *otg.ActionProtocolIpv4Ping) (ActionProtocolIpv4Ping, error) + // FromPbText unmarshals ActionProtocolIpv4Ping from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionProtocolIpv4Ping from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionProtocolIpv4Ping from JSON text + FromJson(value string) error +} + +func (obj *actionProtocolIpv4Ping) Marshal() marshalActionProtocolIpv4Ping { + if obj.marshaller == nil { + obj.marshaller = &marshalactionProtocolIpv4Ping{obj: obj} + } + return obj.marshaller +} + +func (obj *actionProtocolIpv4Ping) Unmarshal() unMarshalActionProtocolIpv4Ping { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionProtocolIpv4Ping{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionProtocolIpv4Ping) ToProto() (*otg.ActionProtocolIpv4Ping, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionProtocolIpv4Ping) FromProto(msg *otg.ActionProtocolIpv4Ping) (ActionProtocolIpv4Ping, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionProtocolIpv4Ping) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionProtocolIpv4Ping) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionProtocolIpv4Ping) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolIpv4Ping) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionProtocolIpv4Ping) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolIpv4Ping) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionProtocolIpv4Ping) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionProtocolIpv4Ping) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionProtocolIpv4Ping) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionProtocolIpv4Ping) Clone() (ActionProtocolIpv4Ping, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionProtocolIpv4Ping() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionProtocolIpv4Ping) setNil() { + obj.requestsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionProtocolIpv4Ping is request for initiating ping between multiple source and destination pairs. +type ActionProtocolIpv4Ping interface { + Validation + // msg marshals ActionProtocolIpv4Ping to protobuf object *otg.ActionProtocolIpv4Ping + // and doesn't set defaults + msg() *otg.ActionProtocolIpv4Ping + // setMsg unmarshals ActionProtocolIpv4Ping from protobuf object *otg.ActionProtocolIpv4Ping + // and doesn't set defaults + setMsg(*otg.ActionProtocolIpv4Ping) ActionProtocolIpv4Ping + // provides marshal interface + Marshal() marshalActionProtocolIpv4Ping + // provides unmarshal interface + Unmarshal() unMarshalActionProtocolIpv4Ping + // validate validates ActionProtocolIpv4Ping + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionProtocolIpv4Ping, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Requests returns ActionProtocolIpv4PingActionProtocolIpv4PingRequestIterIter, set in ActionProtocolIpv4Ping + Requests() ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter + setNil() +} + +// List of IPv4 ping requests. +// Requests returns a []ActionProtocolIpv4PingRequest +func (obj *actionProtocolIpv4Ping) Requests() ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter { + if len(obj.obj.Requests) == 0 { + obj.obj.Requests = []*otg.ActionProtocolIpv4PingRequest{} + } + if obj.requestsHolder == nil { + obj.requestsHolder = newActionProtocolIpv4PingActionProtocolIpv4PingRequestIter(&obj.obj.Requests).setMsg(obj) + } + return obj.requestsHolder +} + +type actionProtocolIpv4PingActionProtocolIpv4PingRequestIter struct { + obj *actionProtocolIpv4Ping + actionProtocolIpv4PingRequestSlice []ActionProtocolIpv4PingRequest + fieldPtr *[]*otg.ActionProtocolIpv4PingRequest +} + +func newActionProtocolIpv4PingActionProtocolIpv4PingRequestIter(ptr *[]*otg.ActionProtocolIpv4PingRequest) ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter { + return &actionProtocolIpv4PingActionProtocolIpv4PingRequestIter{fieldPtr: ptr} +} + +type ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter interface { + setMsg(*actionProtocolIpv4Ping) ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter + Items() []ActionProtocolIpv4PingRequest + Add() ActionProtocolIpv4PingRequest + Append(items ...ActionProtocolIpv4PingRequest) ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter + Set(index int, newObj ActionProtocolIpv4PingRequest) ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter + Clear() ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter + clearHolderSlice() ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter + appendHolderSlice(item ActionProtocolIpv4PingRequest) ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter +} + +func (obj *actionProtocolIpv4PingActionProtocolIpv4PingRequestIter) setMsg(msg *actionProtocolIpv4Ping) ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&actionProtocolIpv4PingRequest{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *actionProtocolIpv4PingActionProtocolIpv4PingRequestIter) Items() []ActionProtocolIpv4PingRequest { + return obj.actionProtocolIpv4PingRequestSlice +} + +func (obj *actionProtocolIpv4PingActionProtocolIpv4PingRequestIter) Add() ActionProtocolIpv4PingRequest { + newObj := &otg.ActionProtocolIpv4PingRequest{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &actionProtocolIpv4PingRequest{obj: newObj} + newLibObj.setDefault() + obj.actionProtocolIpv4PingRequestSlice = append(obj.actionProtocolIpv4PingRequestSlice, newLibObj) + return newLibObj +} + +func (obj *actionProtocolIpv4PingActionProtocolIpv4PingRequestIter) Append(items ...ActionProtocolIpv4PingRequest) ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.actionProtocolIpv4PingRequestSlice = append(obj.actionProtocolIpv4PingRequestSlice, item) + } + return obj +} + +func (obj *actionProtocolIpv4PingActionProtocolIpv4PingRequestIter) Set(index int, newObj ActionProtocolIpv4PingRequest) ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.actionProtocolIpv4PingRequestSlice[index] = newObj + return obj +} +func (obj *actionProtocolIpv4PingActionProtocolIpv4PingRequestIter) Clear() ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.ActionProtocolIpv4PingRequest{} + obj.actionProtocolIpv4PingRequestSlice = []ActionProtocolIpv4PingRequest{} + } + return obj +} +func (obj *actionProtocolIpv4PingActionProtocolIpv4PingRequestIter) clearHolderSlice() ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter { + if len(obj.actionProtocolIpv4PingRequestSlice) > 0 { + obj.actionProtocolIpv4PingRequestSlice = []ActionProtocolIpv4PingRequest{} + } + return obj +} +func (obj *actionProtocolIpv4PingActionProtocolIpv4PingRequestIter) appendHolderSlice(item ActionProtocolIpv4PingRequest) ActionProtocolIpv4PingActionProtocolIpv4PingRequestIter { + obj.actionProtocolIpv4PingRequestSlice = append(obj.actionProtocolIpv4PingRequestSlice, item) + return obj +} + +func (obj *actionProtocolIpv4Ping) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Requests) != 0 { + + if set_default { + obj.Requests().clearHolderSlice() + for _, item := range obj.obj.Requests { + obj.Requests().appendHolderSlice(&actionProtocolIpv4PingRequest{obj: item}) + } + } + for _, item := range obj.Requests().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *actionProtocolIpv4Ping) setDefault() { + +} diff --git a/gosnappi/action_protocol_ipv4_ping_request.go b/gosnappi/action_protocol_ipv4_ping_request.go new file mode 100644 index 00000000..baf6c3f5 --- /dev/null +++ b/gosnappi/action_protocol_ipv4_ping_request.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionProtocolIpv4PingRequest ***** +type actionProtocolIpv4PingRequest struct { + validation + obj *otg.ActionProtocolIpv4PingRequest + marshaller marshalActionProtocolIpv4PingRequest + unMarshaller unMarshalActionProtocolIpv4PingRequest +} + +func NewActionProtocolIpv4PingRequest() ActionProtocolIpv4PingRequest { + obj := actionProtocolIpv4PingRequest{obj: &otg.ActionProtocolIpv4PingRequest{}} + obj.setDefault() + return &obj +} + +func (obj *actionProtocolIpv4PingRequest) msg() *otg.ActionProtocolIpv4PingRequest { + return obj.obj +} + +func (obj *actionProtocolIpv4PingRequest) setMsg(msg *otg.ActionProtocolIpv4PingRequest) ActionProtocolIpv4PingRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionProtocolIpv4PingRequest struct { + obj *actionProtocolIpv4PingRequest +} + +type marshalActionProtocolIpv4PingRequest interface { + // ToProto marshals ActionProtocolIpv4PingRequest to protobuf object *otg.ActionProtocolIpv4PingRequest + ToProto() (*otg.ActionProtocolIpv4PingRequest, error) + // ToPbText marshals ActionProtocolIpv4PingRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionProtocolIpv4PingRequest to YAML text + ToYaml() (string, error) + // ToJson marshals ActionProtocolIpv4PingRequest to JSON text + ToJson() (string, error) +} + +type unMarshalactionProtocolIpv4PingRequest struct { + obj *actionProtocolIpv4PingRequest +} + +type unMarshalActionProtocolIpv4PingRequest interface { + // FromProto unmarshals ActionProtocolIpv4PingRequest from protobuf object *otg.ActionProtocolIpv4PingRequest + FromProto(msg *otg.ActionProtocolIpv4PingRequest) (ActionProtocolIpv4PingRequest, error) + // FromPbText unmarshals ActionProtocolIpv4PingRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionProtocolIpv4PingRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionProtocolIpv4PingRequest from JSON text + FromJson(value string) error +} + +func (obj *actionProtocolIpv4PingRequest) Marshal() marshalActionProtocolIpv4PingRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalactionProtocolIpv4PingRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *actionProtocolIpv4PingRequest) Unmarshal() unMarshalActionProtocolIpv4PingRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionProtocolIpv4PingRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionProtocolIpv4PingRequest) ToProto() (*otg.ActionProtocolIpv4PingRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionProtocolIpv4PingRequest) FromProto(msg *otg.ActionProtocolIpv4PingRequest) (ActionProtocolIpv4PingRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionProtocolIpv4PingRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionProtocolIpv4PingRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionProtocolIpv4PingRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolIpv4PingRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionProtocolIpv4PingRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolIpv4PingRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionProtocolIpv4PingRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionProtocolIpv4PingRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionProtocolIpv4PingRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionProtocolIpv4PingRequest) Clone() (ActionProtocolIpv4PingRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionProtocolIpv4PingRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ActionProtocolIpv4PingRequest is under Review: Most ping request parameters are still TBD. +// +// Under Review: Most ping request parameters are still TBD. +// +// Request for initiating ping between a single source and destination pair. +// For ping request, 1 IPv4 ICMP Echo Request shall be sent and wait for ping response to either succeed or time out. The API wait timeout for each request shall be 300ms. +type ActionProtocolIpv4PingRequest interface { + Validation + // msg marshals ActionProtocolIpv4PingRequest to protobuf object *otg.ActionProtocolIpv4PingRequest + // and doesn't set defaults + msg() *otg.ActionProtocolIpv4PingRequest + // setMsg unmarshals ActionProtocolIpv4PingRequest from protobuf object *otg.ActionProtocolIpv4PingRequest + // and doesn't set defaults + setMsg(*otg.ActionProtocolIpv4PingRequest) ActionProtocolIpv4PingRequest + // provides marshal interface + Marshal() marshalActionProtocolIpv4PingRequest + // provides unmarshal interface + Unmarshal() unMarshalActionProtocolIpv4PingRequest + // validate validates ActionProtocolIpv4PingRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionProtocolIpv4PingRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // SrcName returns string, set in ActionProtocolIpv4PingRequest. + SrcName() string + // SetSrcName assigns string provided by user to ActionProtocolIpv4PingRequest + SetSrcName(value string) ActionProtocolIpv4PingRequest + // HasSrcName checks if SrcName has been set in ActionProtocolIpv4PingRequest + HasSrcName() bool + // DstIp returns string, set in ActionProtocolIpv4PingRequest. + DstIp() string + // SetDstIp assigns string provided by user to ActionProtocolIpv4PingRequest + SetDstIp(value string) ActionProtocolIpv4PingRequest + // HasDstIp checks if DstIp has been set in ActionProtocolIpv4PingRequest + HasDstIp() bool +} + +// Name of source IPv4 interface to be used. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// SrcName returns a string +func (obj *actionProtocolIpv4PingRequest) SrcName() string { + + return *obj.obj.SrcName + +} + +// Name of source IPv4 interface to be used. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// SrcName returns a string +func (obj *actionProtocolIpv4PingRequest) HasSrcName() bool { + return obj.obj.SrcName != nil +} + +// Name of source IPv4 interface to be used. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// SetSrcName sets the string value in the ActionProtocolIpv4PingRequest object +func (obj *actionProtocolIpv4PingRequest) SetSrcName(value string) ActionProtocolIpv4PingRequest { + + obj.obj.SrcName = &value + return obj +} + +// Destination IPv4 address to ping. +// DstIp returns a string +func (obj *actionProtocolIpv4PingRequest) DstIp() string { + + return *obj.obj.DstIp + +} + +// Destination IPv4 address to ping. +// DstIp returns a string +func (obj *actionProtocolIpv4PingRequest) HasDstIp() bool { + return obj.obj.DstIp != nil +} + +// Destination IPv4 address to ping. +// SetDstIp sets the string value in the ActionProtocolIpv4PingRequest object +func (obj *actionProtocolIpv4PingRequest) SetDstIp(value string) ActionProtocolIpv4PingRequest { + + obj.obj.DstIp = &value + return obj +} + +func (obj *actionProtocolIpv4PingRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + obj.addWarnings("ActionProtocolIpv4PingRequest is under review, Most ping request parameters are still TBD.") + + if obj.obj.DstIp != nil { + + err := obj.validateIpv4(obj.DstIp()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on ActionProtocolIpv4PingRequest.DstIp")) + } + + } + +} + +func (obj *actionProtocolIpv4PingRequest) setDefault() { + +} diff --git a/gosnappi/action_protocol_ipv6.go b/gosnappi/action_protocol_ipv6.go new file mode 100644 index 00000000..f6221161 --- /dev/null +++ b/gosnappi/action_protocol_ipv6.go @@ -0,0 +1,387 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionProtocolIpv6 ***** +type actionProtocolIpv6 struct { + validation + obj *otg.ActionProtocolIpv6 + marshaller marshalActionProtocolIpv6 + unMarshaller unMarshalActionProtocolIpv6 + pingHolder ActionProtocolIpv6Ping +} + +func NewActionProtocolIpv6() ActionProtocolIpv6 { + obj := actionProtocolIpv6{obj: &otg.ActionProtocolIpv6{}} + obj.setDefault() + return &obj +} + +func (obj *actionProtocolIpv6) msg() *otg.ActionProtocolIpv6 { + return obj.obj +} + +func (obj *actionProtocolIpv6) setMsg(msg *otg.ActionProtocolIpv6) ActionProtocolIpv6 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionProtocolIpv6 struct { + obj *actionProtocolIpv6 +} + +type marshalActionProtocolIpv6 interface { + // ToProto marshals ActionProtocolIpv6 to protobuf object *otg.ActionProtocolIpv6 + ToProto() (*otg.ActionProtocolIpv6, error) + // ToPbText marshals ActionProtocolIpv6 to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionProtocolIpv6 to YAML text + ToYaml() (string, error) + // ToJson marshals ActionProtocolIpv6 to JSON text + ToJson() (string, error) +} + +type unMarshalactionProtocolIpv6 struct { + obj *actionProtocolIpv6 +} + +type unMarshalActionProtocolIpv6 interface { + // FromProto unmarshals ActionProtocolIpv6 from protobuf object *otg.ActionProtocolIpv6 + FromProto(msg *otg.ActionProtocolIpv6) (ActionProtocolIpv6, error) + // FromPbText unmarshals ActionProtocolIpv6 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionProtocolIpv6 from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionProtocolIpv6 from JSON text + FromJson(value string) error +} + +func (obj *actionProtocolIpv6) Marshal() marshalActionProtocolIpv6 { + if obj.marshaller == nil { + obj.marshaller = &marshalactionProtocolIpv6{obj: obj} + } + return obj.marshaller +} + +func (obj *actionProtocolIpv6) Unmarshal() unMarshalActionProtocolIpv6 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionProtocolIpv6{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionProtocolIpv6) ToProto() (*otg.ActionProtocolIpv6, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionProtocolIpv6) FromProto(msg *otg.ActionProtocolIpv6) (ActionProtocolIpv6, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionProtocolIpv6) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionProtocolIpv6) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionProtocolIpv6) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolIpv6) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionProtocolIpv6) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolIpv6) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionProtocolIpv6) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionProtocolIpv6) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionProtocolIpv6) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionProtocolIpv6) Clone() (ActionProtocolIpv6, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionProtocolIpv6() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionProtocolIpv6) setNil() { + obj.pingHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionProtocolIpv6 is actions associated with IPv6 on configured resources. +type ActionProtocolIpv6 interface { + Validation + // msg marshals ActionProtocolIpv6 to protobuf object *otg.ActionProtocolIpv6 + // and doesn't set defaults + msg() *otg.ActionProtocolIpv6 + // setMsg unmarshals ActionProtocolIpv6 from protobuf object *otg.ActionProtocolIpv6 + // and doesn't set defaults + setMsg(*otg.ActionProtocolIpv6) ActionProtocolIpv6 + // provides marshal interface + Marshal() marshalActionProtocolIpv6 + // provides unmarshal interface + Unmarshal() unMarshalActionProtocolIpv6 + // validate validates ActionProtocolIpv6 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionProtocolIpv6, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ActionProtocolIpv6ChoiceEnum, set in ActionProtocolIpv6 + Choice() ActionProtocolIpv6ChoiceEnum + // setChoice assigns ActionProtocolIpv6ChoiceEnum provided by user to ActionProtocolIpv6 + setChoice(value ActionProtocolIpv6ChoiceEnum) ActionProtocolIpv6 + // Ping returns ActionProtocolIpv6Ping, set in ActionProtocolIpv6. + // ActionProtocolIpv6Ping is request for initiating ping between multiple source and destination pairs. + Ping() ActionProtocolIpv6Ping + // SetPing assigns ActionProtocolIpv6Ping provided by user to ActionProtocolIpv6. + // ActionProtocolIpv6Ping is request for initiating ping between multiple source and destination pairs. + SetPing(value ActionProtocolIpv6Ping) ActionProtocolIpv6 + // HasPing checks if Ping has been set in ActionProtocolIpv6 + HasPing() bool + setNil() +} + +type ActionProtocolIpv6ChoiceEnum string + +// Enum of Choice on ActionProtocolIpv6 +var ActionProtocolIpv6Choice = struct { + PING ActionProtocolIpv6ChoiceEnum +}{ + PING: ActionProtocolIpv6ChoiceEnum("ping"), +} + +func (obj *actionProtocolIpv6) Choice() ActionProtocolIpv6ChoiceEnum { + return ActionProtocolIpv6ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *actionProtocolIpv6) setChoice(value ActionProtocolIpv6ChoiceEnum) ActionProtocolIpv6 { + intValue, ok := otg.ActionProtocolIpv6_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ActionProtocolIpv6ChoiceEnum", string(value))) + return obj + } + enumValue := otg.ActionProtocolIpv6_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ping = nil + obj.pingHolder = nil + + if value == ActionProtocolIpv6Choice.PING { + obj.obj.Ping = NewActionProtocolIpv6Ping().msg() + } + + return obj +} + +// description is TBD +// Ping returns a ActionProtocolIpv6Ping +func (obj *actionProtocolIpv6) Ping() ActionProtocolIpv6Ping { + if obj.obj.Ping == nil { + obj.setChoice(ActionProtocolIpv6Choice.PING) + } + if obj.pingHolder == nil { + obj.pingHolder = &actionProtocolIpv6Ping{obj: obj.obj.Ping} + } + return obj.pingHolder +} + +// description is TBD +// Ping returns a ActionProtocolIpv6Ping +func (obj *actionProtocolIpv6) HasPing() bool { + return obj.obj.Ping != nil +} + +// description is TBD +// SetPing sets the ActionProtocolIpv6Ping value in the ActionProtocolIpv6 object +func (obj *actionProtocolIpv6) SetPing(value ActionProtocolIpv6Ping) ActionProtocolIpv6 { + obj.setChoice(ActionProtocolIpv6Choice.PING) + obj.pingHolder = nil + obj.obj.Ping = value.msg() + + return obj +} + +func (obj *actionProtocolIpv6) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface ActionProtocolIpv6") + } + + if obj.obj.Ping != nil { + + obj.Ping().validateObj(vObj, set_default) + } + +} + +func (obj *actionProtocolIpv6) setDefault() { + var choices_set int = 0 + var choice ActionProtocolIpv6ChoiceEnum + + if obj.obj.Ping != nil { + choices_set += 1 + choice = ActionProtocolIpv6Choice.PING + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ActionProtocolIpv6") + } + } else { + intVal := otg.ActionProtocolIpv6_Choice_Enum_value[string(choice)] + enumValue := otg.ActionProtocolIpv6_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/action_protocol_ipv6_ping.go b/gosnappi/action_protocol_ipv6_ping.go new file mode 100644 index 00000000..7fd9cfcf --- /dev/null +++ b/gosnappi/action_protocol_ipv6_ping.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionProtocolIpv6Ping ***** +type actionProtocolIpv6Ping struct { + validation + obj *otg.ActionProtocolIpv6Ping + marshaller marshalActionProtocolIpv6Ping + unMarshaller unMarshalActionProtocolIpv6Ping + requestsHolder ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter +} + +func NewActionProtocolIpv6Ping() ActionProtocolIpv6Ping { + obj := actionProtocolIpv6Ping{obj: &otg.ActionProtocolIpv6Ping{}} + obj.setDefault() + return &obj +} + +func (obj *actionProtocolIpv6Ping) msg() *otg.ActionProtocolIpv6Ping { + return obj.obj +} + +func (obj *actionProtocolIpv6Ping) setMsg(msg *otg.ActionProtocolIpv6Ping) ActionProtocolIpv6Ping { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionProtocolIpv6Ping struct { + obj *actionProtocolIpv6Ping +} + +type marshalActionProtocolIpv6Ping interface { + // ToProto marshals ActionProtocolIpv6Ping to protobuf object *otg.ActionProtocolIpv6Ping + ToProto() (*otg.ActionProtocolIpv6Ping, error) + // ToPbText marshals ActionProtocolIpv6Ping to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionProtocolIpv6Ping to YAML text + ToYaml() (string, error) + // ToJson marshals ActionProtocolIpv6Ping to JSON text + ToJson() (string, error) +} + +type unMarshalactionProtocolIpv6Ping struct { + obj *actionProtocolIpv6Ping +} + +type unMarshalActionProtocolIpv6Ping interface { + // FromProto unmarshals ActionProtocolIpv6Ping from protobuf object *otg.ActionProtocolIpv6Ping + FromProto(msg *otg.ActionProtocolIpv6Ping) (ActionProtocolIpv6Ping, error) + // FromPbText unmarshals ActionProtocolIpv6Ping from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionProtocolIpv6Ping from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionProtocolIpv6Ping from JSON text + FromJson(value string) error +} + +func (obj *actionProtocolIpv6Ping) Marshal() marshalActionProtocolIpv6Ping { + if obj.marshaller == nil { + obj.marshaller = &marshalactionProtocolIpv6Ping{obj: obj} + } + return obj.marshaller +} + +func (obj *actionProtocolIpv6Ping) Unmarshal() unMarshalActionProtocolIpv6Ping { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionProtocolIpv6Ping{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionProtocolIpv6Ping) ToProto() (*otg.ActionProtocolIpv6Ping, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionProtocolIpv6Ping) FromProto(msg *otg.ActionProtocolIpv6Ping) (ActionProtocolIpv6Ping, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionProtocolIpv6Ping) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionProtocolIpv6Ping) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionProtocolIpv6Ping) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolIpv6Ping) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionProtocolIpv6Ping) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolIpv6Ping) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionProtocolIpv6Ping) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionProtocolIpv6Ping) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionProtocolIpv6Ping) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionProtocolIpv6Ping) Clone() (ActionProtocolIpv6Ping, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionProtocolIpv6Ping() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionProtocolIpv6Ping) setNil() { + obj.requestsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionProtocolIpv6Ping is request for initiating ping between multiple source and destination pairs. +type ActionProtocolIpv6Ping interface { + Validation + // msg marshals ActionProtocolIpv6Ping to protobuf object *otg.ActionProtocolIpv6Ping + // and doesn't set defaults + msg() *otg.ActionProtocolIpv6Ping + // setMsg unmarshals ActionProtocolIpv6Ping from protobuf object *otg.ActionProtocolIpv6Ping + // and doesn't set defaults + setMsg(*otg.ActionProtocolIpv6Ping) ActionProtocolIpv6Ping + // provides marshal interface + Marshal() marshalActionProtocolIpv6Ping + // provides unmarshal interface + Unmarshal() unMarshalActionProtocolIpv6Ping + // validate validates ActionProtocolIpv6Ping + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionProtocolIpv6Ping, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Requests returns ActionProtocolIpv6PingActionProtocolIpv6PingRequestIterIter, set in ActionProtocolIpv6Ping + Requests() ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter + setNil() +} + +// List of IPv6 ping requests. +// Requests returns a []ActionProtocolIpv6PingRequest +func (obj *actionProtocolIpv6Ping) Requests() ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter { + if len(obj.obj.Requests) == 0 { + obj.obj.Requests = []*otg.ActionProtocolIpv6PingRequest{} + } + if obj.requestsHolder == nil { + obj.requestsHolder = newActionProtocolIpv6PingActionProtocolIpv6PingRequestIter(&obj.obj.Requests).setMsg(obj) + } + return obj.requestsHolder +} + +type actionProtocolIpv6PingActionProtocolIpv6PingRequestIter struct { + obj *actionProtocolIpv6Ping + actionProtocolIpv6PingRequestSlice []ActionProtocolIpv6PingRequest + fieldPtr *[]*otg.ActionProtocolIpv6PingRequest +} + +func newActionProtocolIpv6PingActionProtocolIpv6PingRequestIter(ptr *[]*otg.ActionProtocolIpv6PingRequest) ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter { + return &actionProtocolIpv6PingActionProtocolIpv6PingRequestIter{fieldPtr: ptr} +} + +type ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter interface { + setMsg(*actionProtocolIpv6Ping) ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter + Items() []ActionProtocolIpv6PingRequest + Add() ActionProtocolIpv6PingRequest + Append(items ...ActionProtocolIpv6PingRequest) ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter + Set(index int, newObj ActionProtocolIpv6PingRequest) ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter + Clear() ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter + clearHolderSlice() ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter + appendHolderSlice(item ActionProtocolIpv6PingRequest) ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter +} + +func (obj *actionProtocolIpv6PingActionProtocolIpv6PingRequestIter) setMsg(msg *actionProtocolIpv6Ping) ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&actionProtocolIpv6PingRequest{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *actionProtocolIpv6PingActionProtocolIpv6PingRequestIter) Items() []ActionProtocolIpv6PingRequest { + return obj.actionProtocolIpv6PingRequestSlice +} + +func (obj *actionProtocolIpv6PingActionProtocolIpv6PingRequestIter) Add() ActionProtocolIpv6PingRequest { + newObj := &otg.ActionProtocolIpv6PingRequest{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &actionProtocolIpv6PingRequest{obj: newObj} + newLibObj.setDefault() + obj.actionProtocolIpv6PingRequestSlice = append(obj.actionProtocolIpv6PingRequestSlice, newLibObj) + return newLibObj +} + +func (obj *actionProtocolIpv6PingActionProtocolIpv6PingRequestIter) Append(items ...ActionProtocolIpv6PingRequest) ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.actionProtocolIpv6PingRequestSlice = append(obj.actionProtocolIpv6PingRequestSlice, item) + } + return obj +} + +func (obj *actionProtocolIpv6PingActionProtocolIpv6PingRequestIter) Set(index int, newObj ActionProtocolIpv6PingRequest) ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.actionProtocolIpv6PingRequestSlice[index] = newObj + return obj +} +func (obj *actionProtocolIpv6PingActionProtocolIpv6PingRequestIter) Clear() ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.ActionProtocolIpv6PingRequest{} + obj.actionProtocolIpv6PingRequestSlice = []ActionProtocolIpv6PingRequest{} + } + return obj +} +func (obj *actionProtocolIpv6PingActionProtocolIpv6PingRequestIter) clearHolderSlice() ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter { + if len(obj.actionProtocolIpv6PingRequestSlice) > 0 { + obj.actionProtocolIpv6PingRequestSlice = []ActionProtocolIpv6PingRequest{} + } + return obj +} +func (obj *actionProtocolIpv6PingActionProtocolIpv6PingRequestIter) appendHolderSlice(item ActionProtocolIpv6PingRequest) ActionProtocolIpv6PingActionProtocolIpv6PingRequestIter { + obj.actionProtocolIpv6PingRequestSlice = append(obj.actionProtocolIpv6PingRequestSlice, item) + return obj +} + +func (obj *actionProtocolIpv6Ping) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Requests) != 0 { + + if set_default { + obj.Requests().clearHolderSlice() + for _, item := range obj.obj.Requests { + obj.Requests().appendHolderSlice(&actionProtocolIpv6PingRequest{obj: item}) + } + } + for _, item := range obj.Requests().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *actionProtocolIpv6Ping) setDefault() { + +} diff --git a/gosnappi/action_protocol_ipv6_ping_request.go b/gosnappi/action_protocol_ipv6_ping_request.go new file mode 100644 index 00000000..85cd5e8c --- /dev/null +++ b/gosnappi/action_protocol_ipv6_ping_request.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionProtocolIpv6PingRequest ***** +type actionProtocolIpv6PingRequest struct { + validation + obj *otg.ActionProtocolIpv6PingRequest + marshaller marshalActionProtocolIpv6PingRequest + unMarshaller unMarshalActionProtocolIpv6PingRequest +} + +func NewActionProtocolIpv6PingRequest() ActionProtocolIpv6PingRequest { + obj := actionProtocolIpv6PingRequest{obj: &otg.ActionProtocolIpv6PingRequest{}} + obj.setDefault() + return &obj +} + +func (obj *actionProtocolIpv6PingRequest) msg() *otg.ActionProtocolIpv6PingRequest { + return obj.obj +} + +func (obj *actionProtocolIpv6PingRequest) setMsg(msg *otg.ActionProtocolIpv6PingRequest) ActionProtocolIpv6PingRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionProtocolIpv6PingRequest struct { + obj *actionProtocolIpv6PingRequest +} + +type marshalActionProtocolIpv6PingRequest interface { + // ToProto marshals ActionProtocolIpv6PingRequest to protobuf object *otg.ActionProtocolIpv6PingRequest + ToProto() (*otg.ActionProtocolIpv6PingRequest, error) + // ToPbText marshals ActionProtocolIpv6PingRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionProtocolIpv6PingRequest to YAML text + ToYaml() (string, error) + // ToJson marshals ActionProtocolIpv6PingRequest to JSON text + ToJson() (string, error) +} + +type unMarshalactionProtocolIpv6PingRequest struct { + obj *actionProtocolIpv6PingRequest +} + +type unMarshalActionProtocolIpv6PingRequest interface { + // FromProto unmarshals ActionProtocolIpv6PingRequest from protobuf object *otg.ActionProtocolIpv6PingRequest + FromProto(msg *otg.ActionProtocolIpv6PingRequest) (ActionProtocolIpv6PingRequest, error) + // FromPbText unmarshals ActionProtocolIpv6PingRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionProtocolIpv6PingRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionProtocolIpv6PingRequest from JSON text + FromJson(value string) error +} + +func (obj *actionProtocolIpv6PingRequest) Marshal() marshalActionProtocolIpv6PingRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalactionProtocolIpv6PingRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *actionProtocolIpv6PingRequest) Unmarshal() unMarshalActionProtocolIpv6PingRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionProtocolIpv6PingRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionProtocolIpv6PingRequest) ToProto() (*otg.ActionProtocolIpv6PingRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionProtocolIpv6PingRequest) FromProto(msg *otg.ActionProtocolIpv6PingRequest) (ActionProtocolIpv6PingRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionProtocolIpv6PingRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionProtocolIpv6PingRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionProtocolIpv6PingRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolIpv6PingRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionProtocolIpv6PingRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionProtocolIpv6PingRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionProtocolIpv6PingRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionProtocolIpv6PingRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionProtocolIpv6PingRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionProtocolIpv6PingRequest) Clone() (ActionProtocolIpv6PingRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionProtocolIpv6PingRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ActionProtocolIpv6PingRequest is under Review: Most ping request parameters are still TBD. +// +// Under Review: Most ping request parameters are still TBD. +// +// Request for initiating ping between a single source and destination pair. +// For ping request, 1 IPv6 ICMP Echo Request shall be sent and wait for ping response to either succeed or time out. The API wait timeout for each request shall be 300ms. +type ActionProtocolIpv6PingRequest interface { + Validation + // msg marshals ActionProtocolIpv6PingRequest to protobuf object *otg.ActionProtocolIpv6PingRequest + // and doesn't set defaults + msg() *otg.ActionProtocolIpv6PingRequest + // setMsg unmarshals ActionProtocolIpv6PingRequest from protobuf object *otg.ActionProtocolIpv6PingRequest + // and doesn't set defaults + setMsg(*otg.ActionProtocolIpv6PingRequest) ActionProtocolIpv6PingRequest + // provides marshal interface + Marshal() marshalActionProtocolIpv6PingRequest + // provides unmarshal interface + Unmarshal() unMarshalActionProtocolIpv6PingRequest + // validate validates ActionProtocolIpv6PingRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionProtocolIpv6PingRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // SrcName returns string, set in ActionProtocolIpv6PingRequest. + SrcName() string + // SetSrcName assigns string provided by user to ActionProtocolIpv6PingRequest + SetSrcName(value string) ActionProtocolIpv6PingRequest + // HasSrcName checks if SrcName has been set in ActionProtocolIpv6PingRequest + HasSrcName() bool + // DstIp returns string, set in ActionProtocolIpv6PingRequest. + DstIp() string + // SetDstIp assigns string provided by user to ActionProtocolIpv6PingRequest + SetDstIp(value string) ActionProtocolIpv6PingRequest + // HasDstIp checks if DstIp has been set in ActionProtocolIpv6PingRequest + HasDstIp() bool +} + +// Name of source IPv6 interface to be used. +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// +// SrcName returns a string +func (obj *actionProtocolIpv6PingRequest) SrcName() string { + + return *obj.obj.SrcName + +} + +// Name of source IPv6 interface to be used. +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// +// SrcName returns a string +func (obj *actionProtocolIpv6PingRequest) HasSrcName() bool { + return obj.obj.SrcName != nil +} + +// Name of source IPv6 interface to be used. +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// +// SetSrcName sets the string value in the ActionProtocolIpv6PingRequest object +func (obj *actionProtocolIpv6PingRequest) SetSrcName(value string) ActionProtocolIpv6PingRequest { + + obj.obj.SrcName = &value + return obj +} + +// Destination IPv6 address to ping. +// DstIp returns a string +func (obj *actionProtocolIpv6PingRequest) DstIp() string { + + return *obj.obj.DstIp + +} + +// Destination IPv6 address to ping. +// DstIp returns a string +func (obj *actionProtocolIpv6PingRequest) HasDstIp() bool { + return obj.obj.DstIp != nil +} + +// Destination IPv6 address to ping. +// SetDstIp sets the string value in the ActionProtocolIpv6PingRequest object +func (obj *actionProtocolIpv6PingRequest) SetDstIp(value string) ActionProtocolIpv6PingRequest { + + obj.obj.DstIp = &value + return obj +} + +func (obj *actionProtocolIpv6PingRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + obj.addWarnings("ActionProtocolIpv6PingRequest is under review, Most ping request parameters are still TBD.") + + if obj.obj.DstIp != nil { + + err := obj.validateIpv6(obj.DstIp()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on ActionProtocolIpv6PingRequest.DstIp")) + } + + } + +} + +func (obj *actionProtocolIpv6PingRequest) setDefault() { + +} diff --git a/gosnappi/action_response.go b/gosnappi/action_response.go new file mode 100644 index 00000000..449dab76 --- /dev/null +++ b/gosnappi/action_response.go @@ -0,0 +1,387 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionResponse ***** +type actionResponse struct { + validation + obj *otg.ActionResponse + marshaller marshalActionResponse + unMarshaller unMarshalActionResponse + protocolHolder ActionResponseProtocol +} + +func NewActionResponse() ActionResponse { + obj := actionResponse{obj: &otg.ActionResponse{}} + obj.setDefault() + return &obj +} + +func (obj *actionResponse) msg() *otg.ActionResponse { + return obj.obj +} + +func (obj *actionResponse) setMsg(msg *otg.ActionResponse) ActionResponse { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionResponse struct { + obj *actionResponse +} + +type marshalActionResponse interface { + // ToProto marshals ActionResponse to protobuf object *otg.ActionResponse + ToProto() (*otg.ActionResponse, error) + // ToPbText marshals ActionResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionResponse to YAML text + ToYaml() (string, error) + // ToJson marshals ActionResponse to JSON text + ToJson() (string, error) +} + +type unMarshalactionResponse struct { + obj *actionResponse +} + +type unMarshalActionResponse interface { + // FromProto unmarshals ActionResponse from protobuf object *otg.ActionResponse + FromProto(msg *otg.ActionResponse) (ActionResponse, error) + // FromPbText unmarshals ActionResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionResponse from JSON text + FromJson(value string) error +} + +func (obj *actionResponse) Marshal() marshalActionResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalactionResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *actionResponse) Unmarshal() unMarshalActionResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionResponse) ToProto() (*otg.ActionResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionResponse) FromProto(msg *otg.ActionResponse) (ActionResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionResponse) Clone() (ActionResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionResponse) setNil() { + obj.protocolHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionResponse is response for action triggered against configured resources. +type ActionResponse interface { + Validation + // msg marshals ActionResponse to protobuf object *otg.ActionResponse + // and doesn't set defaults + msg() *otg.ActionResponse + // setMsg unmarshals ActionResponse from protobuf object *otg.ActionResponse + // and doesn't set defaults + setMsg(*otg.ActionResponse) ActionResponse + // provides marshal interface + Marshal() marshalActionResponse + // provides unmarshal interface + Unmarshal() unMarshalActionResponse + // validate validates ActionResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ActionResponseChoiceEnum, set in ActionResponse + Choice() ActionResponseChoiceEnum + // setChoice assigns ActionResponseChoiceEnum provided by user to ActionResponse + setChoice(value ActionResponseChoiceEnum) ActionResponse + // Protocol returns ActionResponseProtocol, set in ActionResponse. + // ActionResponseProtocol is response for actions associated with protocols on configured resources. + Protocol() ActionResponseProtocol + // SetProtocol assigns ActionResponseProtocol provided by user to ActionResponse. + // ActionResponseProtocol is response for actions associated with protocols on configured resources. + SetProtocol(value ActionResponseProtocol) ActionResponse + // HasProtocol checks if Protocol has been set in ActionResponse + HasProtocol() bool + setNil() +} + +type ActionResponseChoiceEnum string + +// Enum of Choice on ActionResponse +var ActionResponseChoice = struct { + PROTOCOL ActionResponseChoiceEnum +}{ + PROTOCOL: ActionResponseChoiceEnum("protocol"), +} + +func (obj *actionResponse) Choice() ActionResponseChoiceEnum { + return ActionResponseChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *actionResponse) setChoice(value ActionResponseChoiceEnum) ActionResponse { + intValue, ok := otg.ActionResponse_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ActionResponseChoiceEnum", string(value))) + return obj + } + enumValue := otg.ActionResponse_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Protocol = nil + obj.protocolHolder = nil + + if value == ActionResponseChoice.PROTOCOL { + obj.obj.Protocol = NewActionResponseProtocol().msg() + } + + return obj +} + +// description is TBD +// Protocol returns a ActionResponseProtocol +func (obj *actionResponse) Protocol() ActionResponseProtocol { + if obj.obj.Protocol == nil { + obj.setChoice(ActionResponseChoice.PROTOCOL) + } + if obj.protocolHolder == nil { + obj.protocolHolder = &actionResponseProtocol{obj: obj.obj.Protocol} + } + return obj.protocolHolder +} + +// description is TBD +// Protocol returns a ActionResponseProtocol +func (obj *actionResponse) HasProtocol() bool { + return obj.obj.Protocol != nil +} + +// description is TBD +// SetProtocol sets the ActionResponseProtocol value in the ActionResponse object +func (obj *actionResponse) SetProtocol(value ActionResponseProtocol) ActionResponse { + obj.setChoice(ActionResponseChoice.PROTOCOL) + obj.protocolHolder = nil + obj.obj.Protocol = value.msg() + + return obj +} + +func (obj *actionResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface ActionResponse") + } + + if obj.obj.Protocol != nil { + + obj.Protocol().validateObj(vObj, set_default) + } + +} + +func (obj *actionResponse) setDefault() { + var choices_set int = 0 + var choice ActionResponseChoiceEnum + + if obj.obj.Protocol != nil { + choices_set += 1 + choice = ActionResponseChoice.PROTOCOL + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ActionResponse") + } + } else { + intVal := otg.ActionResponse_Choice_Enum_value[string(choice)] + enumValue := otg.ActionResponse_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/action_response_protocol.go b/gosnappi/action_response_protocol.go new file mode 100644 index 00000000..2140eaeb --- /dev/null +++ b/gosnappi/action_response_protocol.go @@ -0,0 +1,443 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionResponseProtocol ***** +type actionResponseProtocol struct { + validation + obj *otg.ActionResponseProtocol + marshaller marshalActionResponseProtocol + unMarshaller unMarshalActionResponseProtocol + ipv4Holder ActionResponseProtocolIpv4 + ipv6Holder ActionResponseProtocolIpv6 +} + +func NewActionResponseProtocol() ActionResponseProtocol { + obj := actionResponseProtocol{obj: &otg.ActionResponseProtocol{}} + obj.setDefault() + return &obj +} + +func (obj *actionResponseProtocol) msg() *otg.ActionResponseProtocol { + return obj.obj +} + +func (obj *actionResponseProtocol) setMsg(msg *otg.ActionResponseProtocol) ActionResponseProtocol { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionResponseProtocol struct { + obj *actionResponseProtocol +} + +type marshalActionResponseProtocol interface { + // ToProto marshals ActionResponseProtocol to protobuf object *otg.ActionResponseProtocol + ToProto() (*otg.ActionResponseProtocol, error) + // ToPbText marshals ActionResponseProtocol to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionResponseProtocol to YAML text + ToYaml() (string, error) + // ToJson marshals ActionResponseProtocol to JSON text + ToJson() (string, error) +} + +type unMarshalactionResponseProtocol struct { + obj *actionResponseProtocol +} + +type unMarshalActionResponseProtocol interface { + // FromProto unmarshals ActionResponseProtocol from protobuf object *otg.ActionResponseProtocol + FromProto(msg *otg.ActionResponseProtocol) (ActionResponseProtocol, error) + // FromPbText unmarshals ActionResponseProtocol from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionResponseProtocol from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionResponseProtocol from JSON text + FromJson(value string) error +} + +func (obj *actionResponseProtocol) Marshal() marshalActionResponseProtocol { + if obj.marshaller == nil { + obj.marshaller = &marshalactionResponseProtocol{obj: obj} + } + return obj.marshaller +} + +func (obj *actionResponseProtocol) Unmarshal() unMarshalActionResponseProtocol { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionResponseProtocol{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionResponseProtocol) ToProto() (*otg.ActionResponseProtocol, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionResponseProtocol) FromProto(msg *otg.ActionResponseProtocol) (ActionResponseProtocol, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionResponseProtocol) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionResponseProtocol) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionResponseProtocol) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponseProtocol) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionResponseProtocol) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponseProtocol) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionResponseProtocol) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionResponseProtocol) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionResponseProtocol) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionResponseProtocol) Clone() (ActionResponseProtocol, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionResponseProtocol() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionResponseProtocol) setNil() { + obj.ipv4Holder = nil + obj.ipv6Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionResponseProtocol is response for actions associated with protocols on configured resources. +type ActionResponseProtocol interface { + Validation + // msg marshals ActionResponseProtocol to protobuf object *otg.ActionResponseProtocol + // and doesn't set defaults + msg() *otg.ActionResponseProtocol + // setMsg unmarshals ActionResponseProtocol from protobuf object *otg.ActionResponseProtocol + // and doesn't set defaults + setMsg(*otg.ActionResponseProtocol) ActionResponseProtocol + // provides marshal interface + Marshal() marshalActionResponseProtocol + // provides unmarshal interface + Unmarshal() unMarshalActionResponseProtocol + // validate validates ActionResponseProtocol + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionResponseProtocol, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ActionResponseProtocolChoiceEnum, set in ActionResponseProtocol + Choice() ActionResponseProtocolChoiceEnum + // setChoice assigns ActionResponseProtocolChoiceEnum provided by user to ActionResponseProtocol + setChoice(value ActionResponseProtocolChoiceEnum) ActionResponseProtocol + // Ipv4 returns ActionResponseProtocolIpv4, set in ActionResponseProtocol. + // ActionResponseProtocolIpv4 is response for actions associated with IPv4 on configured resources. + Ipv4() ActionResponseProtocolIpv4 + // SetIpv4 assigns ActionResponseProtocolIpv4 provided by user to ActionResponseProtocol. + // ActionResponseProtocolIpv4 is response for actions associated with IPv4 on configured resources. + SetIpv4(value ActionResponseProtocolIpv4) ActionResponseProtocol + // HasIpv4 checks if Ipv4 has been set in ActionResponseProtocol + HasIpv4() bool + // Ipv6 returns ActionResponseProtocolIpv6, set in ActionResponseProtocol. + // ActionResponseProtocolIpv6 is response for actions associated with IPv6 on configured resources. + Ipv6() ActionResponseProtocolIpv6 + // SetIpv6 assigns ActionResponseProtocolIpv6 provided by user to ActionResponseProtocol. + // ActionResponseProtocolIpv6 is response for actions associated with IPv6 on configured resources. + SetIpv6(value ActionResponseProtocolIpv6) ActionResponseProtocol + // HasIpv6 checks if Ipv6 has been set in ActionResponseProtocol + HasIpv6() bool + setNil() +} + +type ActionResponseProtocolChoiceEnum string + +// Enum of Choice on ActionResponseProtocol +var ActionResponseProtocolChoice = struct { + IPV4 ActionResponseProtocolChoiceEnum + IPV6 ActionResponseProtocolChoiceEnum +}{ + IPV4: ActionResponseProtocolChoiceEnum("ipv4"), + IPV6: ActionResponseProtocolChoiceEnum("ipv6"), +} + +func (obj *actionResponseProtocol) Choice() ActionResponseProtocolChoiceEnum { + return ActionResponseProtocolChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *actionResponseProtocol) setChoice(value ActionResponseProtocolChoiceEnum) ActionResponseProtocol { + intValue, ok := otg.ActionResponseProtocol_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ActionResponseProtocolChoiceEnum", string(value))) + return obj + } + enumValue := otg.ActionResponseProtocol_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ipv6 = nil + obj.ipv6Holder = nil + obj.obj.Ipv4 = nil + obj.ipv4Holder = nil + + if value == ActionResponseProtocolChoice.IPV4 { + obj.obj.Ipv4 = NewActionResponseProtocolIpv4().msg() + } + + if value == ActionResponseProtocolChoice.IPV6 { + obj.obj.Ipv6 = NewActionResponseProtocolIpv6().msg() + } + + return obj +} + +// description is TBD +// Ipv4 returns a ActionResponseProtocolIpv4 +func (obj *actionResponseProtocol) Ipv4() ActionResponseProtocolIpv4 { + if obj.obj.Ipv4 == nil { + obj.setChoice(ActionResponseProtocolChoice.IPV4) + } + if obj.ipv4Holder == nil { + obj.ipv4Holder = &actionResponseProtocolIpv4{obj: obj.obj.Ipv4} + } + return obj.ipv4Holder +} + +// description is TBD +// Ipv4 returns a ActionResponseProtocolIpv4 +func (obj *actionResponseProtocol) HasIpv4() bool { + return obj.obj.Ipv4 != nil +} + +// description is TBD +// SetIpv4 sets the ActionResponseProtocolIpv4 value in the ActionResponseProtocol object +func (obj *actionResponseProtocol) SetIpv4(value ActionResponseProtocolIpv4) ActionResponseProtocol { + obj.setChoice(ActionResponseProtocolChoice.IPV4) + obj.ipv4Holder = nil + obj.obj.Ipv4 = value.msg() + + return obj +} + +// description is TBD +// Ipv6 returns a ActionResponseProtocolIpv6 +func (obj *actionResponseProtocol) Ipv6() ActionResponseProtocolIpv6 { + if obj.obj.Ipv6 == nil { + obj.setChoice(ActionResponseProtocolChoice.IPV6) + } + if obj.ipv6Holder == nil { + obj.ipv6Holder = &actionResponseProtocolIpv6{obj: obj.obj.Ipv6} + } + return obj.ipv6Holder +} + +// description is TBD +// Ipv6 returns a ActionResponseProtocolIpv6 +func (obj *actionResponseProtocol) HasIpv6() bool { + return obj.obj.Ipv6 != nil +} + +// description is TBD +// SetIpv6 sets the ActionResponseProtocolIpv6 value in the ActionResponseProtocol object +func (obj *actionResponseProtocol) SetIpv6(value ActionResponseProtocolIpv6) ActionResponseProtocol { + obj.setChoice(ActionResponseProtocolChoice.IPV6) + obj.ipv6Holder = nil + obj.obj.Ipv6 = value.msg() + + return obj +} + +func (obj *actionResponseProtocol) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface ActionResponseProtocol") + } + + if obj.obj.Ipv4 != nil { + + obj.Ipv4().validateObj(vObj, set_default) + } + + if obj.obj.Ipv6 != nil { + + obj.Ipv6().validateObj(vObj, set_default) + } + +} + +func (obj *actionResponseProtocol) setDefault() { + var choices_set int = 0 + var choice ActionResponseProtocolChoiceEnum + + if obj.obj.Ipv4 != nil { + choices_set += 1 + choice = ActionResponseProtocolChoice.IPV4 + } + + if obj.obj.Ipv6 != nil { + choices_set += 1 + choice = ActionResponseProtocolChoice.IPV6 + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ActionResponseProtocol") + } + } else { + intVal := otg.ActionResponseProtocol_Choice_Enum_value[string(choice)] + enumValue := otg.ActionResponseProtocol_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/action_response_protocol_ipv4.go b/gosnappi/action_response_protocol_ipv4.go new file mode 100644 index 00000000..16d57b61 --- /dev/null +++ b/gosnappi/action_response_protocol_ipv4.go @@ -0,0 +1,387 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionResponseProtocolIpv4 ***** +type actionResponseProtocolIpv4 struct { + validation + obj *otg.ActionResponseProtocolIpv4 + marshaller marshalActionResponseProtocolIpv4 + unMarshaller unMarshalActionResponseProtocolIpv4 + pingHolder ActionResponseProtocolIpv4Ping +} + +func NewActionResponseProtocolIpv4() ActionResponseProtocolIpv4 { + obj := actionResponseProtocolIpv4{obj: &otg.ActionResponseProtocolIpv4{}} + obj.setDefault() + return &obj +} + +func (obj *actionResponseProtocolIpv4) msg() *otg.ActionResponseProtocolIpv4 { + return obj.obj +} + +func (obj *actionResponseProtocolIpv4) setMsg(msg *otg.ActionResponseProtocolIpv4) ActionResponseProtocolIpv4 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionResponseProtocolIpv4 struct { + obj *actionResponseProtocolIpv4 +} + +type marshalActionResponseProtocolIpv4 interface { + // ToProto marshals ActionResponseProtocolIpv4 to protobuf object *otg.ActionResponseProtocolIpv4 + ToProto() (*otg.ActionResponseProtocolIpv4, error) + // ToPbText marshals ActionResponseProtocolIpv4 to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionResponseProtocolIpv4 to YAML text + ToYaml() (string, error) + // ToJson marshals ActionResponseProtocolIpv4 to JSON text + ToJson() (string, error) +} + +type unMarshalactionResponseProtocolIpv4 struct { + obj *actionResponseProtocolIpv4 +} + +type unMarshalActionResponseProtocolIpv4 interface { + // FromProto unmarshals ActionResponseProtocolIpv4 from protobuf object *otg.ActionResponseProtocolIpv4 + FromProto(msg *otg.ActionResponseProtocolIpv4) (ActionResponseProtocolIpv4, error) + // FromPbText unmarshals ActionResponseProtocolIpv4 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionResponseProtocolIpv4 from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionResponseProtocolIpv4 from JSON text + FromJson(value string) error +} + +func (obj *actionResponseProtocolIpv4) Marshal() marshalActionResponseProtocolIpv4 { + if obj.marshaller == nil { + obj.marshaller = &marshalactionResponseProtocolIpv4{obj: obj} + } + return obj.marshaller +} + +func (obj *actionResponseProtocolIpv4) Unmarshal() unMarshalActionResponseProtocolIpv4 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionResponseProtocolIpv4{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionResponseProtocolIpv4) ToProto() (*otg.ActionResponseProtocolIpv4, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionResponseProtocolIpv4) FromProto(msg *otg.ActionResponseProtocolIpv4) (ActionResponseProtocolIpv4, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionResponseProtocolIpv4) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionResponseProtocolIpv4) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionResponseProtocolIpv4) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponseProtocolIpv4) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionResponseProtocolIpv4) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponseProtocolIpv4) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionResponseProtocolIpv4) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionResponseProtocolIpv4) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionResponseProtocolIpv4) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionResponseProtocolIpv4) Clone() (ActionResponseProtocolIpv4, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionResponseProtocolIpv4() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionResponseProtocolIpv4) setNil() { + obj.pingHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionResponseProtocolIpv4 is response for actions associated with IPv4 on configured resources. +type ActionResponseProtocolIpv4 interface { + Validation + // msg marshals ActionResponseProtocolIpv4 to protobuf object *otg.ActionResponseProtocolIpv4 + // and doesn't set defaults + msg() *otg.ActionResponseProtocolIpv4 + // setMsg unmarshals ActionResponseProtocolIpv4 from protobuf object *otg.ActionResponseProtocolIpv4 + // and doesn't set defaults + setMsg(*otg.ActionResponseProtocolIpv4) ActionResponseProtocolIpv4 + // provides marshal interface + Marshal() marshalActionResponseProtocolIpv4 + // provides unmarshal interface + Unmarshal() unMarshalActionResponseProtocolIpv4 + // validate validates ActionResponseProtocolIpv4 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionResponseProtocolIpv4, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ActionResponseProtocolIpv4ChoiceEnum, set in ActionResponseProtocolIpv4 + Choice() ActionResponseProtocolIpv4ChoiceEnum + // setChoice assigns ActionResponseProtocolIpv4ChoiceEnum provided by user to ActionResponseProtocolIpv4 + setChoice(value ActionResponseProtocolIpv4ChoiceEnum) ActionResponseProtocolIpv4 + // Ping returns ActionResponseProtocolIpv4Ping, set in ActionResponseProtocolIpv4. + // ActionResponseProtocolIpv4Ping is response for ping initiated between multiple source and destination pairs. + Ping() ActionResponseProtocolIpv4Ping + // SetPing assigns ActionResponseProtocolIpv4Ping provided by user to ActionResponseProtocolIpv4. + // ActionResponseProtocolIpv4Ping is response for ping initiated between multiple source and destination pairs. + SetPing(value ActionResponseProtocolIpv4Ping) ActionResponseProtocolIpv4 + // HasPing checks if Ping has been set in ActionResponseProtocolIpv4 + HasPing() bool + setNil() +} + +type ActionResponseProtocolIpv4ChoiceEnum string + +// Enum of Choice on ActionResponseProtocolIpv4 +var ActionResponseProtocolIpv4Choice = struct { + PING ActionResponseProtocolIpv4ChoiceEnum +}{ + PING: ActionResponseProtocolIpv4ChoiceEnum("ping"), +} + +func (obj *actionResponseProtocolIpv4) Choice() ActionResponseProtocolIpv4ChoiceEnum { + return ActionResponseProtocolIpv4ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *actionResponseProtocolIpv4) setChoice(value ActionResponseProtocolIpv4ChoiceEnum) ActionResponseProtocolIpv4 { + intValue, ok := otg.ActionResponseProtocolIpv4_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ActionResponseProtocolIpv4ChoiceEnum", string(value))) + return obj + } + enumValue := otg.ActionResponseProtocolIpv4_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ping = nil + obj.pingHolder = nil + + if value == ActionResponseProtocolIpv4Choice.PING { + obj.obj.Ping = NewActionResponseProtocolIpv4Ping().msg() + } + + return obj +} + +// description is TBD +// Ping returns a ActionResponseProtocolIpv4Ping +func (obj *actionResponseProtocolIpv4) Ping() ActionResponseProtocolIpv4Ping { + if obj.obj.Ping == nil { + obj.setChoice(ActionResponseProtocolIpv4Choice.PING) + } + if obj.pingHolder == nil { + obj.pingHolder = &actionResponseProtocolIpv4Ping{obj: obj.obj.Ping} + } + return obj.pingHolder +} + +// description is TBD +// Ping returns a ActionResponseProtocolIpv4Ping +func (obj *actionResponseProtocolIpv4) HasPing() bool { + return obj.obj.Ping != nil +} + +// description is TBD +// SetPing sets the ActionResponseProtocolIpv4Ping value in the ActionResponseProtocolIpv4 object +func (obj *actionResponseProtocolIpv4) SetPing(value ActionResponseProtocolIpv4Ping) ActionResponseProtocolIpv4 { + obj.setChoice(ActionResponseProtocolIpv4Choice.PING) + obj.pingHolder = nil + obj.obj.Ping = value.msg() + + return obj +} + +func (obj *actionResponseProtocolIpv4) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface ActionResponseProtocolIpv4") + } + + if obj.obj.Ping != nil { + + obj.Ping().validateObj(vObj, set_default) + } + +} + +func (obj *actionResponseProtocolIpv4) setDefault() { + var choices_set int = 0 + var choice ActionResponseProtocolIpv4ChoiceEnum + + if obj.obj.Ping != nil { + choices_set += 1 + choice = ActionResponseProtocolIpv4Choice.PING + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ActionResponseProtocolIpv4") + } + } else { + intVal := otg.ActionResponseProtocolIpv4_Choice_Enum_value[string(choice)] + enumValue := otg.ActionResponseProtocolIpv4_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/action_response_protocol_ipv4_ping.go b/gosnappi/action_response_protocol_ipv4_ping.go new file mode 100644 index 00000000..49da2e08 --- /dev/null +++ b/gosnappi/action_response_protocol_ipv4_ping.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionResponseProtocolIpv4Ping ***** +type actionResponseProtocolIpv4Ping struct { + validation + obj *otg.ActionResponseProtocolIpv4Ping + marshaller marshalActionResponseProtocolIpv4Ping + unMarshaller unMarshalActionResponseProtocolIpv4Ping + responsesHolder ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter +} + +func NewActionResponseProtocolIpv4Ping() ActionResponseProtocolIpv4Ping { + obj := actionResponseProtocolIpv4Ping{obj: &otg.ActionResponseProtocolIpv4Ping{}} + obj.setDefault() + return &obj +} + +func (obj *actionResponseProtocolIpv4Ping) msg() *otg.ActionResponseProtocolIpv4Ping { + return obj.obj +} + +func (obj *actionResponseProtocolIpv4Ping) setMsg(msg *otg.ActionResponseProtocolIpv4Ping) ActionResponseProtocolIpv4Ping { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionResponseProtocolIpv4Ping struct { + obj *actionResponseProtocolIpv4Ping +} + +type marshalActionResponseProtocolIpv4Ping interface { + // ToProto marshals ActionResponseProtocolIpv4Ping to protobuf object *otg.ActionResponseProtocolIpv4Ping + ToProto() (*otg.ActionResponseProtocolIpv4Ping, error) + // ToPbText marshals ActionResponseProtocolIpv4Ping to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionResponseProtocolIpv4Ping to YAML text + ToYaml() (string, error) + // ToJson marshals ActionResponseProtocolIpv4Ping to JSON text + ToJson() (string, error) +} + +type unMarshalactionResponseProtocolIpv4Ping struct { + obj *actionResponseProtocolIpv4Ping +} + +type unMarshalActionResponseProtocolIpv4Ping interface { + // FromProto unmarshals ActionResponseProtocolIpv4Ping from protobuf object *otg.ActionResponseProtocolIpv4Ping + FromProto(msg *otg.ActionResponseProtocolIpv4Ping) (ActionResponseProtocolIpv4Ping, error) + // FromPbText unmarshals ActionResponseProtocolIpv4Ping from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionResponseProtocolIpv4Ping from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionResponseProtocolIpv4Ping from JSON text + FromJson(value string) error +} + +func (obj *actionResponseProtocolIpv4Ping) Marshal() marshalActionResponseProtocolIpv4Ping { + if obj.marshaller == nil { + obj.marshaller = &marshalactionResponseProtocolIpv4Ping{obj: obj} + } + return obj.marshaller +} + +func (obj *actionResponseProtocolIpv4Ping) Unmarshal() unMarshalActionResponseProtocolIpv4Ping { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionResponseProtocolIpv4Ping{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionResponseProtocolIpv4Ping) ToProto() (*otg.ActionResponseProtocolIpv4Ping, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionResponseProtocolIpv4Ping) FromProto(msg *otg.ActionResponseProtocolIpv4Ping) (ActionResponseProtocolIpv4Ping, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionResponseProtocolIpv4Ping) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionResponseProtocolIpv4Ping) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionResponseProtocolIpv4Ping) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponseProtocolIpv4Ping) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionResponseProtocolIpv4Ping) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponseProtocolIpv4Ping) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionResponseProtocolIpv4Ping) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionResponseProtocolIpv4Ping) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionResponseProtocolIpv4Ping) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionResponseProtocolIpv4Ping) Clone() (ActionResponseProtocolIpv4Ping, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionResponseProtocolIpv4Ping() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionResponseProtocolIpv4Ping) setNil() { + obj.responsesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionResponseProtocolIpv4Ping is response for ping initiated between multiple source and destination pairs. +type ActionResponseProtocolIpv4Ping interface { + Validation + // msg marshals ActionResponseProtocolIpv4Ping to protobuf object *otg.ActionResponseProtocolIpv4Ping + // and doesn't set defaults + msg() *otg.ActionResponseProtocolIpv4Ping + // setMsg unmarshals ActionResponseProtocolIpv4Ping from protobuf object *otg.ActionResponseProtocolIpv4Ping + // and doesn't set defaults + setMsg(*otg.ActionResponseProtocolIpv4Ping) ActionResponseProtocolIpv4Ping + // provides marshal interface + Marshal() marshalActionResponseProtocolIpv4Ping + // provides unmarshal interface + Unmarshal() unMarshalActionResponseProtocolIpv4Ping + // validate validates ActionResponseProtocolIpv4Ping + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionResponseProtocolIpv4Ping, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Responses returns ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIterIter, set in ActionResponseProtocolIpv4Ping + Responses() ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter + setNil() +} + +// List of responses for IPv4 ping responses. +// Responses returns a []ActionResponseProtocolIpv4PingResponse +func (obj *actionResponseProtocolIpv4Ping) Responses() ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter { + if len(obj.obj.Responses) == 0 { + obj.obj.Responses = []*otg.ActionResponseProtocolIpv4PingResponse{} + } + if obj.responsesHolder == nil { + obj.responsesHolder = newActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter(&obj.obj.Responses).setMsg(obj) + } + return obj.responsesHolder +} + +type actionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter struct { + obj *actionResponseProtocolIpv4Ping + actionResponseProtocolIpv4PingResponseSlice []ActionResponseProtocolIpv4PingResponse + fieldPtr *[]*otg.ActionResponseProtocolIpv4PingResponse +} + +func newActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter(ptr *[]*otg.ActionResponseProtocolIpv4PingResponse) ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter { + return &actionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter{fieldPtr: ptr} +} + +type ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter interface { + setMsg(*actionResponseProtocolIpv4Ping) ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter + Items() []ActionResponseProtocolIpv4PingResponse + Add() ActionResponseProtocolIpv4PingResponse + Append(items ...ActionResponseProtocolIpv4PingResponse) ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter + Set(index int, newObj ActionResponseProtocolIpv4PingResponse) ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter + Clear() ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter + clearHolderSlice() ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter + appendHolderSlice(item ActionResponseProtocolIpv4PingResponse) ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter +} + +func (obj *actionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter) setMsg(msg *actionResponseProtocolIpv4Ping) ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&actionResponseProtocolIpv4PingResponse{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *actionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter) Items() []ActionResponseProtocolIpv4PingResponse { + return obj.actionResponseProtocolIpv4PingResponseSlice +} + +func (obj *actionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter) Add() ActionResponseProtocolIpv4PingResponse { + newObj := &otg.ActionResponseProtocolIpv4PingResponse{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &actionResponseProtocolIpv4PingResponse{obj: newObj} + newLibObj.setDefault() + obj.actionResponseProtocolIpv4PingResponseSlice = append(obj.actionResponseProtocolIpv4PingResponseSlice, newLibObj) + return newLibObj +} + +func (obj *actionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter) Append(items ...ActionResponseProtocolIpv4PingResponse) ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.actionResponseProtocolIpv4PingResponseSlice = append(obj.actionResponseProtocolIpv4PingResponseSlice, item) + } + return obj +} + +func (obj *actionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter) Set(index int, newObj ActionResponseProtocolIpv4PingResponse) ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.actionResponseProtocolIpv4PingResponseSlice[index] = newObj + return obj +} +func (obj *actionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter) Clear() ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.ActionResponseProtocolIpv4PingResponse{} + obj.actionResponseProtocolIpv4PingResponseSlice = []ActionResponseProtocolIpv4PingResponse{} + } + return obj +} +func (obj *actionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter) clearHolderSlice() ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter { + if len(obj.actionResponseProtocolIpv4PingResponseSlice) > 0 { + obj.actionResponseProtocolIpv4PingResponseSlice = []ActionResponseProtocolIpv4PingResponse{} + } + return obj +} +func (obj *actionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter) appendHolderSlice(item ActionResponseProtocolIpv4PingResponse) ActionResponseProtocolIpv4PingActionResponseProtocolIpv4PingResponseIter { + obj.actionResponseProtocolIpv4PingResponseSlice = append(obj.actionResponseProtocolIpv4PingResponseSlice, item) + return obj +} + +func (obj *actionResponseProtocolIpv4Ping) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Responses) != 0 { + + if set_default { + obj.Responses().clearHolderSlice() + for _, item := range obj.obj.Responses { + obj.Responses().appendHolderSlice(&actionResponseProtocolIpv4PingResponse{obj: item}) + } + } + for _, item := range obj.Responses().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *actionResponseProtocolIpv4Ping) setDefault() { + +} diff --git a/gosnappi/action_response_protocol_ipv4_ping_response.go b/gosnappi/action_response_protocol_ipv4_ping_response.go new file mode 100644 index 00000000..bef3176b --- /dev/null +++ b/gosnappi/action_response_protocol_ipv4_ping_response.go @@ -0,0 +1,386 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionResponseProtocolIpv4PingResponse ***** +type actionResponseProtocolIpv4PingResponse struct { + validation + obj *otg.ActionResponseProtocolIpv4PingResponse + marshaller marshalActionResponseProtocolIpv4PingResponse + unMarshaller unMarshalActionResponseProtocolIpv4PingResponse +} + +func NewActionResponseProtocolIpv4PingResponse() ActionResponseProtocolIpv4PingResponse { + obj := actionResponseProtocolIpv4PingResponse{obj: &otg.ActionResponseProtocolIpv4PingResponse{}} + obj.setDefault() + return &obj +} + +func (obj *actionResponseProtocolIpv4PingResponse) msg() *otg.ActionResponseProtocolIpv4PingResponse { + return obj.obj +} + +func (obj *actionResponseProtocolIpv4PingResponse) setMsg(msg *otg.ActionResponseProtocolIpv4PingResponse) ActionResponseProtocolIpv4PingResponse { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionResponseProtocolIpv4PingResponse struct { + obj *actionResponseProtocolIpv4PingResponse +} + +type marshalActionResponseProtocolIpv4PingResponse interface { + // ToProto marshals ActionResponseProtocolIpv4PingResponse to protobuf object *otg.ActionResponseProtocolIpv4PingResponse + ToProto() (*otg.ActionResponseProtocolIpv4PingResponse, error) + // ToPbText marshals ActionResponseProtocolIpv4PingResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionResponseProtocolIpv4PingResponse to YAML text + ToYaml() (string, error) + // ToJson marshals ActionResponseProtocolIpv4PingResponse to JSON text + ToJson() (string, error) +} + +type unMarshalactionResponseProtocolIpv4PingResponse struct { + obj *actionResponseProtocolIpv4PingResponse +} + +type unMarshalActionResponseProtocolIpv4PingResponse interface { + // FromProto unmarshals ActionResponseProtocolIpv4PingResponse from protobuf object *otg.ActionResponseProtocolIpv4PingResponse + FromProto(msg *otg.ActionResponseProtocolIpv4PingResponse) (ActionResponseProtocolIpv4PingResponse, error) + // FromPbText unmarshals ActionResponseProtocolIpv4PingResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionResponseProtocolIpv4PingResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionResponseProtocolIpv4PingResponse from JSON text + FromJson(value string) error +} + +func (obj *actionResponseProtocolIpv4PingResponse) Marshal() marshalActionResponseProtocolIpv4PingResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalactionResponseProtocolIpv4PingResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *actionResponseProtocolIpv4PingResponse) Unmarshal() unMarshalActionResponseProtocolIpv4PingResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionResponseProtocolIpv4PingResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionResponseProtocolIpv4PingResponse) ToProto() (*otg.ActionResponseProtocolIpv4PingResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionResponseProtocolIpv4PingResponse) FromProto(msg *otg.ActionResponseProtocolIpv4PingResponse) (ActionResponseProtocolIpv4PingResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionResponseProtocolIpv4PingResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionResponseProtocolIpv4PingResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionResponseProtocolIpv4PingResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponseProtocolIpv4PingResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionResponseProtocolIpv4PingResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponseProtocolIpv4PingResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionResponseProtocolIpv4PingResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionResponseProtocolIpv4PingResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionResponseProtocolIpv4PingResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionResponseProtocolIpv4PingResponse) Clone() (ActionResponseProtocolIpv4PingResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionResponseProtocolIpv4PingResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ActionResponseProtocolIpv4PingResponse is response for ping initiated between a single source and destination pair. +type ActionResponseProtocolIpv4PingResponse interface { + Validation + // msg marshals ActionResponseProtocolIpv4PingResponse to protobuf object *otg.ActionResponseProtocolIpv4PingResponse + // and doesn't set defaults + msg() *otg.ActionResponseProtocolIpv4PingResponse + // setMsg unmarshals ActionResponseProtocolIpv4PingResponse from protobuf object *otg.ActionResponseProtocolIpv4PingResponse + // and doesn't set defaults + setMsg(*otg.ActionResponseProtocolIpv4PingResponse) ActionResponseProtocolIpv4PingResponse + // provides marshal interface + Marshal() marshalActionResponseProtocolIpv4PingResponse + // provides unmarshal interface + Unmarshal() unMarshalActionResponseProtocolIpv4PingResponse + // validate validates ActionResponseProtocolIpv4PingResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionResponseProtocolIpv4PingResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // SrcName returns string, set in ActionResponseProtocolIpv4PingResponse. + SrcName() string + // SetSrcName assigns string provided by user to ActionResponseProtocolIpv4PingResponse + SetSrcName(value string) ActionResponseProtocolIpv4PingResponse + // DstIp returns string, set in ActionResponseProtocolIpv4PingResponse. + DstIp() string + // SetDstIp assigns string provided by user to ActionResponseProtocolIpv4PingResponse + SetDstIp(value string) ActionResponseProtocolIpv4PingResponse + // Result returns ActionResponseProtocolIpv4PingResponseResultEnum, set in ActionResponseProtocolIpv4PingResponse + Result() ActionResponseProtocolIpv4PingResponseResultEnum + // SetResult assigns ActionResponseProtocolIpv4PingResponseResultEnum provided by user to ActionResponseProtocolIpv4PingResponse + SetResult(value ActionResponseProtocolIpv4PingResponseResultEnum) ActionResponseProtocolIpv4PingResponse +} + +// Name of source IPv4 interface used for ping. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// SrcName returns a string +func (obj *actionResponseProtocolIpv4PingResponse) SrcName() string { + + return *obj.obj.SrcName + +} + +// Name of source IPv4 interface used for ping. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// SetSrcName sets the string value in the ActionResponseProtocolIpv4PingResponse object +func (obj *actionResponseProtocolIpv4PingResponse) SetSrcName(value string) ActionResponseProtocolIpv4PingResponse { + + obj.obj.SrcName = &value + return obj +} + +// Destination IPv4 address used for ping. +// DstIp returns a string +func (obj *actionResponseProtocolIpv4PingResponse) DstIp() string { + + return *obj.obj.DstIp + +} + +// Destination IPv4 address used for ping. +// SetDstIp sets the string value in the ActionResponseProtocolIpv4PingResponse object +func (obj *actionResponseProtocolIpv4PingResponse) SetDstIp(value string) ActionResponseProtocolIpv4PingResponse { + + obj.obj.DstIp = &value + return obj +} + +type ActionResponseProtocolIpv4PingResponseResultEnum string + +// Enum of Result on ActionResponseProtocolIpv4PingResponse +var ActionResponseProtocolIpv4PingResponseResult = struct { + SUCCEEDED ActionResponseProtocolIpv4PingResponseResultEnum + FAILED ActionResponseProtocolIpv4PingResponseResultEnum +}{ + SUCCEEDED: ActionResponseProtocolIpv4PingResponseResultEnum("succeeded"), + FAILED: ActionResponseProtocolIpv4PingResponseResultEnum("failed"), +} + +func (obj *actionResponseProtocolIpv4PingResponse) Result() ActionResponseProtocolIpv4PingResponseResultEnum { + return ActionResponseProtocolIpv4PingResponseResultEnum(obj.obj.Result.Enum().String()) +} + +func (obj *actionResponseProtocolIpv4PingResponse) SetResult(value ActionResponseProtocolIpv4PingResponseResultEnum) ActionResponseProtocolIpv4PingResponse { + intValue, ok := otg.ActionResponseProtocolIpv4PingResponse_Result_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ActionResponseProtocolIpv4PingResponseResultEnum", string(value))) + return obj + } + enumValue := otg.ActionResponseProtocolIpv4PingResponse_Result_Enum(intValue) + obj.obj.Result = &enumValue + + return obj +} + +func (obj *actionResponseProtocolIpv4PingResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // SrcName is required + if obj.obj.SrcName == nil { + vObj.validationErrors = append(vObj.validationErrors, "SrcName is required field on interface ActionResponseProtocolIpv4PingResponse") + } + + // DstIp is required + if obj.obj.DstIp == nil { + vObj.validationErrors = append(vObj.validationErrors, "DstIp is required field on interface ActionResponseProtocolIpv4PingResponse") + } + if obj.obj.DstIp != nil { + + err := obj.validateIpv4(obj.DstIp()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on ActionResponseProtocolIpv4PingResponse.DstIp")) + } + + } + + // Result is required + if obj.obj.Result == nil { + vObj.validationErrors = append(vObj.validationErrors, "Result is required field on interface ActionResponseProtocolIpv4PingResponse") + } +} + +func (obj *actionResponseProtocolIpv4PingResponse) setDefault() { + +} diff --git a/gosnappi/action_response_protocol_ipv6.go b/gosnappi/action_response_protocol_ipv6.go new file mode 100644 index 00000000..d6f484fc --- /dev/null +++ b/gosnappi/action_response_protocol_ipv6.go @@ -0,0 +1,387 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionResponseProtocolIpv6 ***** +type actionResponseProtocolIpv6 struct { + validation + obj *otg.ActionResponseProtocolIpv6 + marshaller marshalActionResponseProtocolIpv6 + unMarshaller unMarshalActionResponseProtocolIpv6 + pingHolder ActionResponseProtocolIpv6Ping +} + +func NewActionResponseProtocolIpv6() ActionResponseProtocolIpv6 { + obj := actionResponseProtocolIpv6{obj: &otg.ActionResponseProtocolIpv6{}} + obj.setDefault() + return &obj +} + +func (obj *actionResponseProtocolIpv6) msg() *otg.ActionResponseProtocolIpv6 { + return obj.obj +} + +func (obj *actionResponseProtocolIpv6) setMsg(msg *otg.ActionResponseProtocolIpv6) ActionResponseProtocolIpv6 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionResponseProtocolIpv6 struct { + obj *actionResponseProtocolIpv6 +} + +type marshalActionResponseProtocolIpv6 interface { + // ToProto marshals ActionResponseProtocolIpv6 to protobuf object *otg.ActionResponseProtocolIpv6 + ToProto() (*otg.ActionResponseProtocolIpv6, error) + // ToPbText marshals ActionResponseProtocolIpv6 to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionResponseProtocolIpv6 to YAML text + ToYaml() (string, error) + // ToJson marshals ActionResponseProtocolIpv6 to JSON text + ToJson() (string, error) +} + +type unMarshalactionResponseProtocolIpv6 struct { + obj *actionResponseProtocolIpv6 +} + +type unMarshalActionResponseProtocolIpv6 interface { + // FromProto unmarshals ActionResponseProtocolIpv6 from protobuf object *otg.ActionResponseProtocolIpv6 + FromProto(msg *otg.ActionResponseProtocolIpv6) (ActionResponseProtocolIpv6, error) + // FromPbText unmarshals ActionResponseProtocolIpv6 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionResponseProtocolIpv6 from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionResponseProtocolIpv6 from JSON text + FromJson(value string) error +} + +func (obj *actionResponseProtocolIpv6) Marshal() marshalActionResponseProtocolIpv6 { + if obj.marshaller == nil { + obj.marshaller = &marshalactionResponseProtocolIpv6{obj: obj} + } + return obj.marshaller +} + +func (obj *actionResponseProtocolIpv6) Unmarshal() unMarshalActionResponseProtocolIpv6 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionResponseProtocolIpv6{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionResponseProtocolIpv6) ToProto() (*otg.ActionResponseProtocolIpv6, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionResponseProtocolIpv6) FromProto(msg *otg.ActionResponseProtocolIpv6) (ActionResponseProtocolIpv6, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionResponseProtocolIpv6) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionResponseProtocolIpv6) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionResponseProtocolIpv6) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponseProtocolIpv6) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionResponseProtocolIpv6) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponseProtocolIpv6) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionResponseProtocolIpv6) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionResponseProtocolIpv6) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionResponseProtocolIpv6) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionResponseProtocolIpv6) Clone() (ActionResponseProtocolIpv6, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionResponseProtocolIpv6() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionResponseProtocolIpv6) setNil() { + obj.pingHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionResponseProtocolIpv6 is response for actions associated with IPv6 on configured resources. +type ActionResponseProtocolIpv6 interface { + Validation + // msg marshals ActionResponseProtocolIpv6 to protobuf object *otg.ActionResponseProtocolIpv6 + // and doesn't set defaults + msg() *otg.ActionResponseProtocolIpv6 + // setMsg unmarshals ActionResponseProtocolIpv6 from protobuf object *otg.ActionResponseProtocolIpv6 + // and doesn't set defaults + setMsg(*otg.ActionResponseProtocolIpv6) ActionResponseProtocolIpv6 + // provides marshal interface + Marshal() marshalActionResponseProtocolIpv6 + // provides unmarshal interface + Unmarshal() unMarshalActionResponseProtocolIpv6 + // validate validates ActionResponseProtocolIpv6 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionResponseProtocolIpv6, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ActionResponseProtocolIpv6ChoiceEnum, set in ActionResponseProtocolIpv6 + Choice() ActionResponseProtocolIpv6ChoiceEnum + // setChoice assigns ActionResponseProtocolIpv6ChoiceEnum provided by user to ActionResponseProtocolIpv6 + setChoice(value ActionResponseProtocolIpv6ChoiceEnum) ActionResponseProtocolIpv6 + // Ping returns ActionResponseProtocolIpv6Ping, set in ActionResponseProtocolIpv6. + // ActionResponseProtocolIpv6Ping is response for ping initiated between multiple source and destination pairs. + Ping() ActionResponseProtocolIpv6Ping + // SetPing assigns ActionResponseProtocolIpv6Ping provided by user to ActionResponseProtocolIpv6. + // ActionResponseProtocolIpv6Ping is response for ping initiated between multiple source and destination pairs. + SetPing(value ActionResponseProtocolIpv6Ping) ActionResponseProtocolIpv6 + // HasPing checks if Ping has been set in ActionResponseProtocolIpv6 + HasPing() bool + setNil() +} + +type ActionResponseProtocolIpv6ChoiceEnum string + +// Enum of Choice on ActionResponseProtocolIpv6 +var ActionResponseProtocolIpv6Choice = struct { + PING ActionResponseProtocolIpv6ChoiceEnum +}{ + PING: ActionResponseProtocolIpv6ChoiceEnum("ping"), +} + +func (obj *actionResponseProtocolIpv6) Choice() ActionResponseProtocolIpv6ChoiceEnum { + return ActionResponseProtocolIpv6ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *actionResponseProtocolIpv6) setChoice(value ActionResponseProtocolIpv6ChoiceEnum) ActionResponseProtocolIpv6 { + intValue, ok := otg.ActionResponseProtocolIpv6_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ActionResponseProtocolIpv6ChoiceEnum", string(value))) + return obj + } + enumValue := otg.ActionResponseProtocolIpv6_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ping = nil + obj.pingHolder = nil + + if value == ActionResponseProtocolIpv6Choice.PING { + obj.obj.Ping = NewActionResponseProtocolIpv6Ping().msg() + } + + return obj +} + +// description is TBD +// Ping returns a ActionResponseProtocolIpv6Ping +func (obj *actionResponseProtocolIpv6) Ping() ActionResponseProtocolIpv6Ping { + if obj.obj.Ping == nil { + obj.setChoice(ActionResponseProtocolIpv6Choice.PING) + } + if obj.pingHolder == nil { + obj.pingHolder = &actionResponseProtocolIpv6Ping{obj: obj.obj.Ping} + } + return obj.pingHolder +} + +// description is TBD +// Ping returns a ActionResponseProtocolIpv6Ping +func (obj *actionResponseProtocolIpv6) HasPing() bool { + return obj.obj.Ping != nil +} + +// description is TBD +// SetPing sets the ActionResponseProtocolIpv6Ping value in the ActionResponseProtocolIpv6 object +func (obj *actionResponseProtocolIpv6) SetPing(value ActionResponseProtocolIpv6Ping) ActionResponseProtocolIpv6 { + obj.setChoice(ActionResponseProtocolIpv6Choice.PING) + obj.pingHolder = nil + obj.obj.Ping = value.msg() + + return obj +} + +func (obj *actionResponseProtocolIpv6) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface ActionResponseProtocolIpv6") + } + + if obj.obj.Ping != nil { + + obj.Ping().validateObj(vObj, set_default) + } + +} + +func (obj *actionResponseProtocolIpv6) setDefault() { + var choices_set int = 0 + var choice ActionResponseProtocolIpv6ChoiceEnum + + if obj.obj.Ping != nil { + choices_set += 1 + choice = ActionResponseProtocolIpv6Choice.PING + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ActionResponseProtocolIpv6") + } + } else { + intVal := otg.ActionResponseProtocolIpv6_Choice_Enum_value[string(choice)] + enumValue := otg.ActionResponseProtocolIpv6_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/action_response_protocol_ipv6_ping.go b/gosnappi/action_response_protocol_ipv6_ping.go new file mode 100644 index 00000000..06c7e86b --- /dev/null +++ b/gosnappi/action_response_protocol_ipv6_ping.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionResponseProtocolIpv6Ping ***** +type actionResponseProtocolIpv6Ping struct { + validation + obj *otg.ActionResponseProtocolIpv6Ping + marshaller marshalActionResponseProtocolIpv6Ping + unMarshaller unMarshalActionResponseProtocolIpv6Ping + responsesHolder ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter +} + +func NewActionResponseProtocolIpv6Ping() ActionResponseProtocolIpv6Ping { + obj := actionResponseProtocolIpv6Ping{obj: &otg.ActionResponseProtocolIpv6Ping{}} + obj.setDefault() + return &obj +} + +func (obj *actionResponseProtocolIpv6Ping) msg() *otg.ActionResponseProtocolIpv6Ping { + return obj.obj +} + +func (obj *actionResponseProtocolIpv6Ping) setMsg(msg *otg.ActionResponseProtocolIpv6Ping) ActionResponseProtocolIpv6Ping { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionResponseProtocolIpv6Ping struct { + obj *actionResponseProtocolIpv6Ping +} + +type marshalActionResponseProtocolIpv6Ping interface { + // ToProto marshals ActionResponseProtocolIpv6Ping to protobuf object *otg.ActionResponseProtocolIpv6Ping + ToProto() (*otg.ActionResponseProtocolIpv6Ping, error) + // ToPbText marshals ActionResponseProtocolIpv6Ping to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionResponseProtocolIpv6Ping to YAML text + ToYaml() (string, error) + // ToJson marshals ActionResponseProtocolIpv6Ping to JSON text + ToJson() (string, error) +} + +type unMarshalactionResponseProtocolIpv6Ping struct { + obj *actionResponseProtocolIpv6Ping +} + +type unMarshalActionResponseProtocolIpv6Ping interface { + // FromProto unmarshals ActionResponseProtocolIpv6Ping from protobuf object *otg.ActionResponseProtocolIpv6Ping + FromProto(msg *otg.ActionResponseProtocolIpv6Ping) (ActionResponseProtocolIpv6Ping, error) + // FromPbText unmarshals ActionResponseProtocolIpv6Ping from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionResponseProtocolIpv6Ping from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionResponseProtocolIpv6Ping from JSON text + FromJson(value string) error +} + +func (obj *actionResponseProtocolIpv6Ping) Marshal() marshalActionResponseProtocolIpv6Ping { + if obj.marshaller == nil { + obj.marshaller = &marshalactionResponseProtocolIpv6Ping{obj: obj} + } + return obj.marshaller +} + +func (obj *actionResponseProtocolIpv6Ping) Unmarshal() unMarshalActionResponseProtocolIpv6Ping { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionResponseProtocolIpv6Ping{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionResponseProtocolIpv6Ping) ToProto() (*otg.ActionResponseProtocolIpv6Ping, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionResponseProtocolIpv6Ping) FromProto(msg *otg.ActionResponseProtocolIpv6Ping) (ActionResponseProtocolIpv6Ping, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionResponseProtocolIpv6Ping) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionResponseProtocolIpv6Ping) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionResponseProtocolIpv6Ping) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponseProtocolIpv6Ping) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionResponseProtocolIpv6Ping) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponseProtocolIpv6Ping) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionResponseProtocolIpv6Ping) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionResponseProtocolIpv6Ping) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionResponseProtocolIpv6Ping) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionResponseProtocolIpv6Ping) Clone() (ActionResponseProtocolIpv6Ping, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionResponseProtocolIpv6Ping() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *actionResponseProtocolIpv6Ping) setNil() { + obj.responsesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ActionResponseProtocolIpv6Ping is response for ping initiated between multiple source and destination pairs. +type ActionResponseProtocolIpv6Ping interface { + Validation + // msg marshals ActionResponseProtocolIpv6Ping to protobuf object *otg.ActionResponseProtocolIpv6Ping + // and doesn't set defaults + msg() *otg.ActionResponseProtocolIpv6Ping + // setMsg unmarshals ActionResponseProtocolIpv6Ping from protobuf object *otg.ActionResponseProtocolIpv6Ping + // and doesn't set defaults + setMsg(*otg.ActionResponseProtocolIpv6Ping) ActionResponseProtocolIpv6Ping + // provides marshal interface + Marshal() marshalActionResponseProtocolIpv6Ping + // provides unmarshal interface + Unmarshal() unMarshalActionResponseProtocolIpv6Ping + // validate validates ActionResponseProtocolIpv6Ping + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionResponseProtocolIpv6Ping, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Responses returns ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIterIter, set in ActionResponseProtocolIpv6Ping + Responses() ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter + setNil() +} + +// List of responses for IPv6 ping responses. +// Responses returns a []ActionResponseProtocolIpv6PingResponse +func (obj *actionResponseProtocolIpv6Ping) Responses() ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter { + if len(obj.obj.Responses) == 0 { + obj.obj.Responses = []*otg.ActionResponseProtocolIpv6PingResponse{} + } + if obj.responsesHolder == nil { + obj.responsesHolder = newActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter(&obj.obj.Responses).setMsg(obj) + } + return obj.responsesHolder +} + +type actionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter struct { + obj *actionResponseProtocolIpv6Ping + actionResponseProtocolIpv6PingResponseSlice []ActionResponseProtocolIpv6PingResponse + fieldPtr *[]*otg.ActionResponseProtocolIpv6PingResponse +} + +func newActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter(ptr *[]*otg.ActionResponseProtocolIpv6PingResponse) ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter { + return &actionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter{fieldPtr: ptr} +} + +type ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter interface { + setMsg(*actionResponseProtocolIpv6Ping) ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter + Items() []ActionResponseProtocolIpv6PingResponse + Add() ActionResponseProtocolIpv6PingResponse + Append(items ...ActionResponseProtocolIpv6PingResponse) ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter + Set(index int, newObj ActionResponseProtocolIpv6PingResponse) ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter + Clear() ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter + clearHolderSlice() ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter + appendHolderSlice(item ActionResponseProtocolIpv6PingResponse) ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter +} + +func (obj *actionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter) setMsg(msg *actionResponseProtocolIpv6Ping) ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&actionResponseProtocolIpv6PingResponse{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *actionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter) Items() []ActionResponseProtocolIpv6PingResponse { + return obj.actionResponseProtocolIpv6PingResponseSlice +} + +func (obj *actionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter) Add() ActionResponseProtocolIpv6PingResponse { + newObj := &otg.ActionResponseProtocolIpv6PingResponse{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &actionResponseProtocolIpv6PingResponse{obj: newObj} + newLibObj.setDefault() + obj.actionResponseProtocolIpv6PingResponseSlice = append(obj.actionResponseProtocolIpv6PingResponseSlice, newLibObj) + return newLibObj +} + +func (obj *actionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter) Append(items ...ActionResponseProtocolIpv6PingResponse) ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.actionResponseProtocolIpv6PingResponseSlice = append(obj.actionResponseProtocolIpv6PingResponseSlice, item) + } + return obj +} + +func (obj *actionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter) Set(index int, newObj ActionResponseProtocolIpv6PingResponse) ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.actionResponseProtocolIpv6PingResponseSlice[index] = newObj + return obj +} +func (obj *actionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter) Clear() ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.ActionResponseProtocolIpv6PingResponse{} + obj.actionResponseProtocolIpv6PingResponseSlice = []ActionResponseProtocolIpv6PingResponse{} + } + return obj +} +func (obj *actionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter) clearHolderSlice() ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter { + if len(obj.actionResponseProtocolIpv6PingResponseSlice) > 0 { + obj.actionResponseProtocolIpv6PingResponseSlice = []ActionResponseProtocolIpv6PingResponse{} + } + return obj +} +func (obj *actionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter) appendHolderSlice(item ActionResponseProtocolIpv6PingResponse) ActionResponseProtocolIpv6PingActionResponseProtocolIpv6PingResponseIter { + obj.actionResponseProtocolIpv6PingResponseSlice = append(obj.actionResponseProtocolIpv6PingResponseSlice, item) + return obj +} + +func (obj *actionResponseProtocolIpv6Ping) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Responses) != 0 { + + if set_default { + obj.Responses().clearHolderSlice() + for _, item := range obj.obj.Responses { + obj.Responses().appendHolderSlice(&actionResponseProtocolIpv6PingResponse{obj: item}) + } + } + for _, item := range obj.Responses().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *actionResponseProtocolIpv6Ping) setDefault() { + +} diff --git a/gosnappi/action_response_protocol_ipv6_ping_response.go b/gosnappi/action_response_protocol_ipv6_ping_response.go new file mode 100644 index 00000000..86b9d92b --- /dev/null +++ b/gosnappi/action_response_protocol_ipv6_ping_response.go @@ -0,0 +1,386 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ActionResponseProtocolIpv6PingResponse ***** +type actionResponseProtocolIpv6PingResponse struct { + validation + obj *otg.ActionResponseProtocolIpv6PingResponse + marshaller marshalActionResponseProtocolIpv6PingResponse + unMarshaller unMarshalActionResponseProtocolIpv6PingResponse +} + +func NewActionResponseProtocolIpv6PingResponse() ActionResponseProtocolIpv6PingResponse { + obj := actionResponseProtocolIpv6PingResponse{obj: &otg.ActionResponseProtocolIpv6PingResponse{}} + obj.setDefault() + return &obj +} + +func (obj *actionResponseProtocolIpv6PingResponse) msg() *otg.ActionResponseProtocolIpv6PingResponse { + return obj.obj +} + +func (obj *actionResponseProtocolIpv6PingResponse) setMsg(msg *otg.ActionResponseProtocolIpv6PingResponse) ActionResponseProtocolIpv6PingResponse { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalactionResponseProtocolIpv6PingResponse struct { + obj *actionResponseProtocolIpv6PingResponse +} + +type marshalActionResponseProtocolIpv6PingResponse interface { + // ToProto marshals ActionResponseProtocolIpv6PingResponse to protobuf object *otg.ActionResponseProtocolIpv6PingResponse + ToProto() (*otg.ActionResponseProtocolIpv6PingResponse, error) + // ToPbText marshals ActionResponseProtocolIpv6PingResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals ActionResponseProtocolIpv6PingResponse to YAML text + ToYaml() (string, error) + // ToJson marshals ActionResponseProtocolIpv6PingResponse to JSON text + ToJson() (string, error) +} + +type unMarshalactionResponseProtocolIpv6PingResponse struct { + obj *actionResponseProtocolIpv6PingResponse +} + +type unMarshalActionResponseProtocolIpv6PingResponse interface { + // FromProto unmarshals ActionResponseProtocolIpv6PingResponse from protobuf object *otg.ActionResponseProtocolIpv6PingResponse + FromProto(msg *otg.ActionResponseProtocolIpv6PingResponse) (ActionResponseProtocolIpv6PingResponse, error) + // FromPbText unmarshals ActionResponseProtocolIpv6PingResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ActionResponseProtocolIpv6PingResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals ActionResponseProtocolIpv6PingResponse from JSON text + FromJson(value string) error +} + +func (obj *actionResponseProtocolIpv6PingResponse) Marshal() marshalActionResponseProtocolIpv6PingResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalactionResponseProtocolIpv6PingResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *actionResponseProtocolIpv6PingResponse) Unmarshal() unMarshalActionResponseProtocolIpv6PingResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalactionResponseProtocolIpv6PingResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalactionResponseProtocolIpv6PingResponse) ToProto() (*otg.ActionResponseProtocolIpv6PingResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalactionResponseProtocolIpv6PingResponse) FromProto(msg *otg.ActionResponseProtocolIpv6PingResponse) (ActionResponseProtocolIpv6PingResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalactionResponseProtocolIpv6PingResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalactionResponseProtocolIpv6PingResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalactionResponseProtocolIpv6PingResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponseProtocolIpv6PingResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalactionResponseProtocolIpv6PingResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalactionResponseProtocolIpv6PingResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *actionResponseProtocolIpv6PingResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *actionResponseProtocolIpv6PingResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *actionResponseProtocolIpv6PingResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *actionResponseProtocolIpv6PingResponse) Clone() (ActionResponseProtocolIpv6PingResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewActionResponseProtocolIpv6PingResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ActionResponseProtocolIpv6PingResponse is response for ping initiated between a single source and destination pair. +type ActionResponseProtocolIpv6PingResponse interface { + Validation + // msg marshals ActionResponseProtocolIpv6PingResponse to protobuf object *otg.ActionResponseProtocolIpv6PingResponse + // and doesn't set defaults + msg() *otg.ActionResponseProtocolIpv6PingResponse + // setMsg unmarshals ActionResponseProtocolIpv6PingResponse from protobuf object *otg.ActionResponseProtocolIpv6PingResponse + // and doesn't set defaults + setMsg(*otg.ActionResponseProtocolIpv6PingResponse) ActionResponseProtocolIpv6PingResponse + // provides marshal interface + Marshal() marshalActionResponseProtocolIpv6PingResponse + // provides unmarshal interface + Unmarshal() unMarshalActionResponseProtocolIpv6PingResponse + // validate validates ActionResponseProtocolIpv6PingResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ActionResponseProtocolIpv6PingResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // SrcName returns string, set in ActionResponseProtocolIpv6PingResponse. + SrcName() string + // SetSrcName assigns string provided by user to ActionResponseProtocolIpv6PingResponse + SetSrcName(value string) ActionResponseProtocolIpv6PingResponse + // DstIp returns string, set in ActionResponseProtocolIpv6PingResponse. + DstIp() string + // SetDstIp assigns string provided by user to ActionResponseProtocolIpv6PingResponse + SetDstIp(value string) ActionResponseProtocolIpv6PingResponse + // Result returns ActionResponseProtocolIpv6PingResponseResultEnum, set in ActionResponseProtocolIpv6PingResponse + Result() ActionResponseProtocolIpv6PingResponseResultEnum + // SetResult assigns ActionResponseProtocolIpv6PingResponseResultEnum provided by user to ActionResponseProtocolIpv6PingResponse + SetResult(value ActionResponseProtocolIpv6PingResponseResultEnum) ActionResponseProtocolIpv6PingResponse +} + +// Name of source IPv6 interface used for ping. +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// +// SrcName returns a string +func (obj *actionResponseProtocolIpv6PingResponse) SrcName() string { + + return *obj.obj.SrcName + +} + +// Name of source IPv6 interface used for ping. +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// +// SetSrcName sets the string value in the ActionResponseProtocolIpv6PingResponse object +func (obj *actionResponseProtocolIpv6PingResponse) SetSrcName(value string) ActionResponseProtocolIpv6PingResponse { + + obj.obj.SrcName = &value + return obj +} + +// Destination IPv6 address used for ping. +// DstIp returns a string +func (obj *actionResponseProtocolIpv6PingResponse) DstIp() string { + + return *obj.obj.DstIp + +} + +// Destination IPv6 address used for ping. +// SetDstIp sets the string value in the ActionResponseProtocolIpv6PingResponse object +func (obj *actionResponseProtocolIpv6PingResponse) SetDstIp(value string) ActionResponseProtocolIpv6PingResponse { + + obj.obj.DstIp = &value + return obj +} + +type ActionResponseProtocolIpv6PingResponseResultEnum string + +// Enum of Result on ActionResponseProtocolIpv6PingResponse +var ActionResponseProtocolIpv6PingResponseResult = struct { + SUCCEEDED ActionResponseProtocolIpv6PingResponseResultEnum + FAILED ActionResponseProtocolIpv6PingResponseResultEnum +}{ + SUCCEEDED: ActionResponseProtocolIpv6PingResponseResultEnum("succeeded"), + FAILED: ActionResponseProtocolIpv6PingResponseResultEnum("failed"), +} + +func (obj *actionResponseProtocolIpv6PingResponse) Result() ActionResponseProtocolIpv6PingResponseResultEnum { + return ActionResponseProtocolIpv6PingResponseResultEnum(obj.obj.Result.Enum().String()) +} + +func (obj *actionResponseProtocolIpv6PingResponse) SetResult(value ActionResponseProtocolIpv6PingResponseResultEnum) ActionResponseProtocolIpv6PingResponse { + intValue, ok := otg.ActionResponseProtocolIpv6PingResponse_Result_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ActionResponseProtocolIpv6PingResponseResultEnum", string(value))) + return obj + } + enumValue := otg.ActionResponseProtocolIpv6PingResponse_Result_Enum(intValue) + obj.obj.Result = &enumValue + + return obj +} + +func (obj *actionResponseProtocolIpv6PingResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // SrcName is required + if obj.obj.SrcName == nil { + vObj.validationErrors = append(vObj.validationErrors, "SrcName is required field on interface ActionResponseProtocolIpv6PingResponse") + } + + // DstIp is required + if obj.obj.DstIp == nil { + vObj.validationErrors = append(vObj.validationErrors, "DstIp is required field on interface ActionResponseProtocolIpv6PingResponse") + } + if obj.obj.DstIp != nil { + + err := obj.validateIpv6(obj.DstIp()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on ActionResponseProtocolIpv6PingResponse.DstIp")) + } + + } + + // Result is required + if obj.obj.Result == nil { + vObj.validationErrors = append(vObj.validationErrors, "Result is required field on interface ActionResponseProtocolIpv6PingResponse") + } +} + +func (obj *actionResponseProtocolIpv6PingResponse) setDefault() { + +} diff --git a/gosnappi/bgp_add_path.go b/gosnappi/bgp_add_path.go new file mode 100644 index 00000000..1a68f30d --- /dev/null +++ b/gosnappi/bgp_add_path.go @@ -0,0 +1,309 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAddPath ***** +type bgpAddPath struct { + validation + obj *otg.BgpAddPath + marshaller marshalBgpAddPath + unMarshaller unMarshalBgpAddPath +} + +func NewBgpAddPath() BgpAddPath { + obj := bgpAddPath{obj: &otg.BgpAddPath{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAddPath) msg() *otg.BgpAddPath { + return obj.obj +} + +func (obj *bgpAddPath) setMsg(msg *otg.BgpAddPath) BgpAddPath { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAddPath struct { + obj *bgpAddPath +} + +type marshalBgpAddPath interface { + // ToProto marshals BgpAddPath to protobuf object *otg.BgpAddPath + ToProto() (*otg.BgpAddPath, error) + // ToPbText marshals BgpAddPath to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAddPath to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAddPath to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAddPath struct { + obj *bgpAddPath +} + +type unMarshalBgpAddPath interface { + // FromProto unmarshals BgpAddPath from protobuf object *otg.BgpAddPath + FromProto(msg *otg.BgpAddPath) (BgpAddPath, error) + // FromPbText unmarshals BgpAddPath from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAddPath from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAddPath from JSON text + FromJson(value string) error +} + +func (obj *bgpAddPath) Marshal() marshalBgpAddPath { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAddPath{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAddPath) Unmarshal() unMarshalBgpAddPath { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAddPath{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAddPath) ToProto() (*otg.BgpAddPath, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAddPath) FromProto(msg *otg.BgpAddPath) (BgpAddPath, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAddPath) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAddPath) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAddPath) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAddPath) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAddPath) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAddPath) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAddPath) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAddPath) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAddPath) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAddPath) Clone() (BgpAddPath, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAddPath() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAddPath is the BGP Additional Paths feature is a BGP extension that allows the advertisement of multiple paths for the same prefix without the new paths implicitly replacing any previous paths. +type BgpAddPath interface { + Validation + // msg marshals BgpAddPath to protobuf object *otg.BgpAddPath + // and doesn't set defaults + msg() *otg.BgpAddPath + // setMsg unmarshals BgpAddPath from protobuf object *otg.BgpAddPath + // and doesn't set defaults + setMsg(*otg.BgpAddPath) BgpAddPath + // provides marshal interface + Marshal() marshalBgpAddPath + // provides unmarshal interface + Unmarshal() unMarshalBgpAddPath + // validate validates BgpAddPath + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAddPath, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PathId returns uint32, set in BgpAddPath. + PathId() uint32 + // SetPathId assigns uint32 provided by user to BgpAddPath + SetPathId(value uint32) BgpAddPath + // HasPathId checks if PathId has been set in BgpAddPath + HasPathId() bool +} + +// The id of the additional path. +// PathId returns a uint32 +func (obj *bgpAddPath) PathId() uint32 { + + return *obj.obj.PathId + +} + +// The id of the additional path. +// PathId returns a uint32 +func (obj *bgpAddPath) HasPathId() bool { + return obj.obj.PathId != nil +} + +// The id of the additional path. +// SetPathId sets the uint32 value in the BgpAddPath object +func (obj *bgpAddPath) SetPathId(value uint32) BgpAddPath { + + obj.obj.PathId = &value + return obj +} + +func (obj *bgpAddPath) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpAddPath) setDefault() { + if obj.obj.PathId == nil { + obj.SetPathId(1) + } + +} diff --git a/gosnappi/bgp_advanced.go b/gosnappi/bgp_advanced.go new file mode 100644 index 00000000..fd3ba3ae --- /dev/null +++ b/gosnappi/bgp_advanced.go @@ -0,0 +1,559 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAdvanced ***** +type bgpAdvanced struct { + validation + obj *otg.BgpAdvanced + marshaller marshalBgpAdvanced + unMarshaller unMarshalBgpAdvanced +} + +func NewBgpAdvanced() BgpAdvanced { + obj := bgpAdvanced{obj: &otg.BgpAdvanced{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAdvanced) msg() *otg.BgpAdvanced { + return obj.obj +} + +func (obj *bgpAdvanced) setMsg(msg *otg.BgpAdvanced) BgpAdvanced { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAdvanced struct { + obj *bgpAdvanced +} + +type marshalBgpAdvanced interface { + // ToProto marshals BgpAdvanced to protobuf object *otg.BgpAdvanced + ToProto() (*otg.BgpAdvanced, error) + // ToPbText marshals BgpAdvanced to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAdvanced to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAdvanced to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAdvanced struct { + obj *bgpAdvanced +} + +type unMarshalBgpAdvanced interface { + // FromProto unmarshals BgpAdvanced from protobuf object *otg.BgpAdvanced + FromProto(msg *otg.BgpAdvanced) (BgpAdvanced, error) + // FromPbText unmarshals BgpAdvanced from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAdvanced from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAdvanced from JSON text + FromJson(value string) error +} + +func (obj *bgpAdvanced) Marshal() marshalBgpAdvanced { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAdvanced{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAdvanced) Unmarshal() unMarshalBgpAdvanced { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAdvanced{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAdvanced) ToProto() (*otg.BgpAdvanced, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAdvanced) FromProto(msg *otg.BgpAdvanced) (BgpAdvanced, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAdvanced) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAdvanced) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAdvanced) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAdvanced) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAdvanced) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAdvanced) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAdvanced) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAdvanced) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAdvanced) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAdvanced) Clone() (BgpAdvanced, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAdvanced() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAdvanced is configuration for BGP advanced settings. +type BgpAdvanced interface { + Validation + // msg marshals BgpAdvanced to protobuf object *otg.BgpAdvanced + // and doesn't set defaults + msg() *otg.BgpAdvanced + // setMsg unmarshals BgpAdvanced from protobuf object *otg.BgpAdvanced + // and doesn't set defaults + setMsg(*otg.BgpAdvanced) BgpAdvanced + // provides marshal interface + Marshal() marshalBgpAdvanced + // provides unmarshal interface + Unmarshal() unMarshalBgpAdvanced + // validate validates BgpAdvanced + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAdvanced, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // HoldTimeInterval returns uint32, set in BgpAdvanced. + HoldTimeInterval() uint32 + // SetHoldTimeInterval assigns uint32 provided by user to BgpAdvanced + SetHoldTimeInterval(value uint32) BgpAdvanced + // HasHoldTimeInterval checks if HoldTimeInterval has been set in BgpAdvanced + HasHoldTimeInterval() bool + // KeepAliveInterval returns uint32, set in BgpAdvanced. + KeepAliveInterval() uint32 + // SetKeepAliveInterval assigns uint32 provided by user to BgpAdvanced + SetKeepAliveInterval(value uint32) BgpAdvanced + // HasKeepAliveInterval checks if KeepAliveInterval has been set in BgpAdvanced + HasKeepAliveInterval() bool + // UpdateInterval returns uint32, set in BgpAdvanced. + UpdateInterval() uint32 + // SetUpdateInterval assigns uint32 provided by user to BgpAdvanced + SetUpdateInterval(value uint32) BgpAdvanced + // HasUpdateInterval checks if UpdateInterval has been set in BgpAdvanced + HasUpdateInterval() bool + // TimeToLive returns uint32, set in BgpAdvanced. + TimeToLive() uint32 + // SetTimeToLive assigns uint32 provided by user to BgpAdvanced + SetTimeToLive(value uint32) BgpAdvanced + // HasTimeToLive checks if TimeToLive has been set in BgpAdvanced + HasTimeToLive() bool + // Md5Key returns string, set in BgpAdvanced. + Md5Key() string + // SetMd5Key assigns string provided by user to BgpAdvanced + SetMd5Key(value string) BgpAdvanced + // HasMd5Key checks if Md5Key has been set in BgpAdvanced + HasMd5Key() bool + // PassiveMode returns bool, set in BgpAdvanced. + PassiveMode() bool + // SetPassiveMode assigns bool provided by user to BgpAdvanced + SetPassiveMode(value bool) BgpAdvanced + // HasPassiveMode checks if PassiveMode has been set in BgpAdvanced + HasPassiveMode() bool + // ListenPort returns uint32, set in BgpAdvanced. + ListenPort() uint32 + // SetListenPort assigns uint32 provided by user to BgpAdvanced + SetListenPort(value uint32) BgpAdvanced + // HasListenPort checks if ListenPort has been set in BgpAdvanced + HasListenPort() bool + // NeighborPort returns uint32, set in BgpAdvanced. + NeighborPort() uint32 + // SetNeighborPort assigns uint32 provided by user to BgpAdvanced + SetNeighborPort(value uint32) BgpAdvanced + // HasNeighborPort checks if NeighborPort has been set in BgpAdvanced + HasNeighborPort() bool +} + +// Number of seconds the sender proposes for the value of the Hold Timer. +// HoldTimeInterval returns a uint32 +func (obj *bgpAdvanced) HoldTimeInterval() uint32 { + + return *obj.obj.HoldTimeInterval + +} + +// Number of seconds the sender proposes for the value of the Hold Timer. +// HoldTimeInterval returns a uint32 +func (obj *bgpAdvanced) HasHoldTimeInterval() bool { + return obj.obj.HoldTimeInterval != nil +} + +// Number of seconds the sender proposes for the value of the Hold Timer. +// SetHoldTimeInterval sets the uint32 value in the BgpAdvanced object +func (obj *bgpAdvanced) SetHoldTimeInterval(value uint32) BgpAdvanced { + + obj.obj.HoldTimeInterval = &value + return obj +} + +// Number of seconds between transmissions of Keepalive messages by this peer. +// KeepAliveInterval returns a uint32 +func (obj *bgpAdvanced) KeepAliveInterval() uint32 { + + return *obj.obj.KeepAliveInterval + +} + +// Number of seconds between transmissions of Keepalive messages by this peer. +// KeepAliveInterval returns a uint32 +func (obj *bgpAdvanced) HasKeepAliveInterval() bool { + return obj.obj.KeepAliveInterval != nil +} + +// Number of seconds between transmissions of Keepalive messages by this peer. +// SetKeepAliveInterval sets the uint32 value in the BgpAdvanced object +func (obj *bgpAdvanced) SetKeepAliveInterval(value uint32) BgpAdvanced { + + obj.obj.KeepAliveInterval = &value + return obj +} + +// The time interval at which Update messages are sent to the DUT, expressed as the number of milliseconds between Update messages. The update interval 0 implies to send all the updates as fast as possible. +// UpdateInterval returns a uint32 +func (obj *bgpAdvanced) UpdateInterval() uint32 { + + return *obj.obj.UpdateInterval + +} + +// The time interval at which Update messages are sent to the DUT, expressed as the number of milliseconds between Update messages. The update interval 0 implies to send all the updates as fast as possible. +// UpdateInterval returns a uint32 +func (obj *bgpAdvanced) HasUpdateInterval() bool { + return obj.obj.UpdateInterval != nil +} + +// The time interval at which Update messages are sent to the DUT, expressed as the number of milliseconds between Update messages. The update interval 0 implies to send all the updates as fast as possible. +// SetUpdateInterval sets the uint32 value in the BgpAdvanced object +func (obj *bgpAdvanced) SetUpdateInterval(value uint32) BgpAdvanced { + + obj.obj.UpdateInterval = &value + return obj +} + +// The limited number of iterations that a unit of data can experience before the data is discarded. This is placed in the TTL field in the IP header of the transmitted packets. +// TimeToLive returns a uint32 +func (obj *bgpAdvanced) TimeToLive() uint32 { + + return *obj.obj.TimeToLive + +} + +// The limited number of iterations that a unit of data can experience before the data is discarded. This is placed in the TTL field in the IP header of the transmitted packets. +// TimeToLive returns a uint32 +func (obj *bgpAdvanced) HasTimeToLive() bool { + return obj.obj.TimeToLive != nil +} + +// The limited number of iterations that a unit of data can experience before the data is discarded. This is placed in the TTL field in the IP header of the transmitted packets. +// SetTimeToLive sets the uint32 value in the BgpAdvanced object +func (obj *bgpAdvanced) SetTimeToLive(value uint32) BgpAdvanced { + + obj.obj.TimeToLive = &value + return obj +} + +// The value to be used as a secret MD5 key for authentication. If not configured, MD5 authentication will not be enabled. +// Md5Key returns a string +func (obj *bgpAdvanced) Md5Key() string { + + return *obj.obj.Md5Key + +} + +// The value to be used as a secret MD5 key for authentication. If not configured, MD5 authentication will not be enabled. +// Md5Key returns a string +func (obj *bgpAdvanced) HasMd5Key() bool { + return obj.obj.Md5Key != nil +} + +// The value to be used as a secret MD5 key for authentication. If not configured, MD5 authentication will not be enabled. +// SetMd5Key sets the string value in the BgpAdvanced object +func (obj *bgpAdvanced) SetMd5Key(value string) BgpAdvanced { + + obj.obj.Md5Key = &value + return obj +} + +// If set to true, the local BGP peer will wait for the remote peer to initiate the BGP session +// by establishing the TCP connection, rather than initiating sessions from the local peer. +// PassiveMode returns a bool +func (obj *bgpAdvanced) PassiveMode() bool { + + return *obj.obj.PassiveMode + +} + +// If set to true, the local BGP peer will wait for the remote peer to initiate the BGP session +// by establishing the TCP connection, rather than initiating sessions from the local peer. +// PassiveMode returns a bool +func (obj *bgpAdvanced) HasPassiveMode() bool { + return obj.obj.PassiveMode != nil +} + +// If set to true, the local BGP peer will wait for the remote peer to initiate the BGP session +// by establishing the TCP connection, rather than initiating sessions from the local peer. +// SetPassiveMode sets the bool value in the BgpAdvanced object +func (obj *bgpAdvanced) SetPassiveMode(value bool) BgpAdvanced { + + obj.obj.PassiveMode = &value + return obj +} + +// The TCP port number on which to accept BGP connections from the remote peer. +// ListenPort returns a uint32 +func (obj *bgpAdvanced) ListenPort() uint32 { + + return *obj.obj.ListenPort + +} + +// The TCP port number on which to accept BGP connections from the remote peer. +// ListenPort returns a uint32 +func (obj *bgpAdvanced) HasListenPort() bool { + return obj.obj.ListenPort != nil +} + +// The TCP port number on which to accept BGP connections from the remote peer. +// SetListenPort sets the uint32 value in the BgpAdvanced object +func (obj *bgpAdvanced) SetListenPort(value uint32) BgpAdvanced { + + obj.obj.ListenPort = &value + return obj +} + +// Destination TCP port number of the BGP peer when initiating a +// session from the local BGP peer. +// NeighborPort returns a uint32 +func (obj *bgpAdvanced) NeighborPort() uint32 { + + return *obj.obj.NeighborPort + +} + +// Destination TCP port number of the BGP peer when initiating a +// session from the local BGP peer. +// NeighborPort returns a uint32 +func (obj *bgpAdvanced) HasNeighborPort() bool { + return obj.obj.NeighborPort != nil +} + +// Destination TCP port number of the BGP peer when initiating a +// session from the local BGP peer. +// SetNeighborPort sets the uint32 value in the BgpAdvanced object +func (obj *bgpAdvanced) SetNeighborPort(value uint32) BgpAdvanced { + + obj.obj.NeighborPort = &value + return obj +} + +func (obj *bgpAdvanced) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.TimeToLive != nil { + + if *obj.obj.TimeToLive > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAdvanced.TimeToLive <= 255 but Got %d", *obj.obj.TimeToLive)) + } + + } + + if obj.obj.ListenPort != nil { + + if *obj.obj.ListenPort > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAdvanced.ListenPort <= 65535 but Got %d", *obj.obj.ListenPort)) + } + + } + + if obj.obj.NeighborPort != nil { + + if *obj.obj.NeighborPort > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAdvanced.NeighborPort <= 65535 but Got %d", *obj.obj.NeighborPort)) + } + + } + +} + +func (obj *bgpAdvanced) setDefault() { + if obj.obj.HoldTimeInterval == nil { + obj.SetHoldTimeInterval(90) + } + if obj.obj.KeepAliveInterval == nil { + obj.SetKeepAliveInterval(30) + } + if obj.obj.UpdateInterval == nil { + obj.SetUpdateInterval(0) + } + if obj.obj.TimeToLive == nil { + obj.SetTimeToLive(64) + } + if obj.obj.PassiveMode == nil { + obj.SetPassiveMode(false) + } + if obj.obj.ListenPort == nil { + obj.SetListenPort(179) + } + if obj.obj.NeighborPort == nil { + obj.SetNeighborPort(179) + } + +} diff --git a/gosnappi/bgp_as_path.go b/gosnappi/bgp_as_path.go new file mode 100644 index 00000000..3ae92c56 --- /dev/null +++ b/gosnappi/bgp_as_path.go @@ -0,0 +1,442 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAsPath ***** +type bgpAsPath struct { + validation + obj *otg.BgpAsPath + marshaller marshalBgpAsPath + unMarshaller unMarshalBgpAsPath + segmentsHolder BgpAsPathBgpAsPathSegmentIter +} + +func NewBgpAsPath() BgpAsPath { + obj := bgpAsPath{obj: &otg.BgpAsPath{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAsPath) msg() *otg.BgpAsPath { + return obj.obj +} + +func (obj *bgpAsPath) setMsg(msg *otg.BgpAsPath) BgpAsPath { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAsPath struct { + obj *bgpAsPath +} + +type marshalBgpAsPath interface { + // ToProto marshals BgpAsPath to protobuf object *otg.BgpAsPath + ToProto() (*otg.BgpAsPath, error) + // ToPbText marshals BgpAsPath to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAsPath to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAsPath to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAsPath struct { + obj *bgpAsPath +} + +type unMarshalBgpAsPath interface { + // FromProto unmarshals BgpAsPath from protobuf object *otg.BgpAsPath + FromProto(msg *otg.BgpAsPath) (BgpAsPath, error) + // FromPbText unmarshals BgpAsPath from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAsPath from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAsPath from JSON text + FromJson(value string) error +} + +func (obj *bgpAsPath) Marshal() marshalBgpAsPath { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAsPath{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAsPath) Unmarshal() unMarshalBgpAsPath { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAsPath{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAsPath) ToProto() (*otg.BgpAsPath, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAsPath) FromProto(msg *otg.BgpAsPath) (BgpAsPath, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAsPath) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAsPath) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAsPath) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAsPath) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAsPath) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAsPath) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAsPath) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAsPath) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAsPath) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAsPath) Clone() (BgpAsPath, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAsPath() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAsPath) setNil() { + obj.segmentsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. +type BgpAsPath interface { + Validation + // msg marshals BgpAsPath to protobuf object *otg.BgpAsPath + // and doesn't set defaults + msg() *otg.BgpAsPath + // setMsg unmarshals BgpAsPath from protobuf object *otg.BgpAsPath + // and doesn't set defaults + setMsg(*otg.BgpAsPath) BgpAsPath + // provides marshal interface + Marshal() marshalBgpAsPath + // provides unmarshal interface + Unmarshal() unMarshalBgpAsPath + // validate validates BgpAsPath + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAsPath, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // AsSetMode returns BgpAsPathAsSetModeEnum, set in BgpAsPath + AsSetMode() BgpAsPathAsSetModeEnum + // SetAsSetMode assigns BgpAsPathAsSetModeEnum provided by user to BgpAsPath + SetAsSetMode(value BgpAsPathAsSetModeEnum) BgpAsPath + // HasAsSetMode checks if AsSetMode has been set in BgpAsPath + HasAsSetMode() bool + // Segments returns BgpAsPathBgpAsPathSegmentIterIter, set in BgpAsPath + Segments() BgpAsPathBgpAsPathSegmentIter + setNil() +} + +type BgpAsPathAsSetModeEnum string + +// Enum of AsSetMode on BgpAsPath +var BgpAsPathAsSetMode = struct { + DO_NOT_INCLUDE_LOCAL_AS BgpAsPathAsSetModeEnum + INCLUDE_AS_SEQ BgpAsPathAsSetModeEnum + INCLUDE_AS_SET BgpAsPathAsSetModeEnum + INCLUDE_AS_CONFED_SEQ BgpAsPathAsSetModeEnum + INCLUDE_AS_CONFED_SET BgpAsPathAsSetModeEnum + PREPEND_TO_FIRST_SEGMENT BgpAsPathAsSetModeEnum +}{ + DO_NOT_INCLUDE_LOCAL_AS: BgpAsPathAsSetModeEnum("do_not_include_local_as"), + INCLUDE_AS_SEQ: BgpAsPathAsSetModeEnum("include_as_seq"), + INCLUDE_AS_SET: BgpAsPathAsSetModeEnum("include_as_set"), + INCLUDE_AS_CONFED_SEQ: BgpAsPathAsSetModeEnum("include_as_confed_seq"), + INCLUDE_AS_CONFED_SET: BgpAsPathAsSetModeEnum("include_as_confed_set"), + PREPEND_TO_FIRST_SEGMENT: BgpAsPathAsSetModeEnum("prepend_to_first_segment"), +} + +func (obj *bgpAsPath) AsSetMode() BgpAsPathAsSetModeEnum { + return BgpAsPathAsSetModeEnum(obj.obj.AsSetMode.Enum().String()) +} + +// Defines how the Local AS should be included in the MP REACH NLRI. For iBGP sessions, "Do Not Include Local AS" must be chosen. For eBGP sessions, any choice other than "Do Not Include Local AS" can be chosen. +// AsSetMode returns a string +func (obj *bgpAsPath) HasAsSetMode() bool { + return obj.obj.AsSetMode != nil +} + +func (obj *bgpAsPath) SetAsSetMode(value BgpAsPathAsSetModeEnum) BgpAsPath { + intValue, ok := otg.BgpAsPath_AsSetMode_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAsPathAsSetModeEnum", string(value))) + return obj + } + enumValue := otg.BgpAsPath_AsSetMode_Enum(intValue) + obj.obj.AsSetMode = &enumValue + + return obj +} + +// The additional AS path segments to be added in the NLRI. By default, an empty AS path is always included and the local AS is added to it as per the value of 'as_set_mode' attribute. +// Segments returns a []BgpAsPathSegment +func (obj *bgpAsPath) Segments() BgpAsPathBgpAsPathSegmentIter { + if len(obj.obj.Segments) == 0 { + obj.obj.Segments = []*otg.BgpAsPathSegment{} + } + if obj.segmentsHolder == nil { + obj.segmentsHolder = newBgpAsPathBgpAsPathSegmentIter(&obj.obj.Segments).setMsg(obj) + } + return obj.segmentsHolder +} + +type bgpAsPathBgpAsPathSegmentIter struct { + obj *bgpAsPath + bgpAsPathSegmentSlice []BgpAsPathSegment + fieldPtr *[]*otg.BgpAsPathSegment +} + +func newBgpAsPathBgpAsPathSegmentIter(ptr *[]*otg.BgpAsPathSegment) BgpAsPathBgpAsPathSegmentIter { + return &bgpAsPathBgpAsPathSegmentIter{fieldPtr: ptr} +} + +type BgpAsPathBgpAsPathSegmentIter interface { + setMsg(*bgpAsPath) BgpAsPathBgpAsPathSegmentIter + Items() []BgpAsPathSegment + Add() BgpAsPathSegment + Append(items ...BgpAsPathSegment) BgpAsPathBgpAsPathSegmentIter + Set(index int, newObj BgpAsPathSegment) BgpAsPathBgpAsPathSegmentIter + Clear() BgpAsPathBgpAsPathSegmentIter + clearHolderSlice() BgpAsPathBgpAsPathSegmentIter + appendHolderSlice(item BgpAsPathSegment) BgpAsPathBgpAsPathSegmentIter +} + +func (obj *bgpAsPathBgpAsPathSegmentIter) setMsg(msg *bgpAsPath) BgpAsPathBgpAsPathSegmentIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpAsPathSegment{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpAsPathBgpAsPathSegmentIter) Items() []BgpAsPathSegment { + return obj.bgpAsPathSegmentSlice +} + +func (obj *bgpAsPathBgpAsPathSegmentIter) Add() BgpAsPathSegment { + newObj := &otg.BgpAsPathSegment{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpAsPathSegment{obj: newObj} + newLibObj.setDefault() + obj.bgpAsPathSegmentSlice = append(obj.bgpAsPathSegmentSlice, newLibObj) + return newLibObj +} + +func (obj *bgpAsPathBgpAsPathSegmentIter) Append(items ...BgpAsPathSegment) BgpAsPathBgpAsPathSegmentIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpAsPathSegmentSlice = append(obj.bgpAsPathSegmentSlice, item) + } + return obj +} + +func (obj *bgpAsPathBgpAsPathSegmentIter) Set(index int, newObj BgpAsPathSegment) BgpAsPathBgpAsPathSegmentIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpAsPathSegmentSlice[index] = newObj + return obj +} +func (obj *bgpAsPathBgpAsPathSegmentIter) Clear() BgpAsPathBgpAsPathSegmentIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpAsPathSegment{} + obj.bgpAsPathSegmentSlice = []BgpAsPathSegment{} + } + return obj +} +func (obj *bgpAsPathBgpAsPathSegmentIter) clearHolderSlice() BgpAsPathBgpAsPathSegmentIter { + if len(obj.bgpAsPathSegmentSlice) > 0 { + obj.bgpAsPathSegmentSlice = []BgpAsPathSegment{} + } + return obj +} +func (obj *bgpAsPathBgpAsPathSegmentIter) appendHolderSlice(item BgpAsPathSegment) BgpAsPathBgpAsPathSegmentIter { + obj.bgpAsPathSegmentSlice = append(obj.bgpAsPathSegmentSlice, item) + return obj +} + +func (obj *bgpAsPath) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Segments) != 0 { + + if set_default { + obj.Segments().clearHolderSlice() + for _, item := range obj.obj.Segments { + obj.Segments().appendHolderSlice(&bgpAsPathSegment{obj: item}) + } + } + for _, item := range obj.Segments().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpAsPath) setDefault() { + if obj.obj.AsSetMode == nil { + obj.SetAsSetMode(BgpAsPathAsSetMode.DO_NOT_INCLUDE_LOCAL_AS) + + } + +} diff --git a/gosnappi/bgp_as_path_segment.go b/gosnappi/bgp_as_path_segment.go new file mode 100644 index 00000000..501139da --- /dev/null +++ b/gosnappi/bgp_as_path_segment.go @@ -0,0 +1,352 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAsPathSegment ***** +type bgpAsPathSegment struct { + validation + obj *otg.BgpAsPathSegment + marshaller marshalBgpAsPathSegment + unMarshaller unMarshalBgpAsPathSegment +} + +func NewBgpAsPathSegment() BgpAsPathSegment { + obj := bgpAsPathSegment{obj: &otg.BgpAsPathSegment{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAsPathSegment) msg() *otg.BgpAsPathSegment { + return obj.obj +} + +func (obj *bgpAsPathSegment) setMsg(msg *otg.BgpAsPathSegment) BgpAsPathSegment { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAsPathSegment struct { + obj *bgpAsPathSegment +} + +type marshalBgpAsPathSegment interface { + // ToProto marshals BgpAsPathSegment to protobuf object *otg.BgpAsPathSegment + ToProto() (*otg.BgpAsPathSegment, error) + // ToPbText marshals BgpAsPathSegment to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAsPathSegment to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAsPathSegment to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAsPathSegment struct { + obj *bgpAsPathSegment +} + +type unMarshalBgpAsPathSegment interface { + // FromProto unmarshals BgpAsPathSegment from protobuf object *otg.BgpAsPathSegment + FromProto(msg *otg.BgpAsPathSegment) (BgpAsPathSegment, error) + // FromPbText unmarshals BgpAsPathSegment from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAsPathSegment from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAsPathSegment from JSON text + FromJson(value string) error +} + +func (obj *bgpAsPathSegment) Marshal() marshalBgpAsPathSegment { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAsPathSegment{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAsPathSegment) Unmarshal() unMarshalBgpAsPathSegment { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAsPathSegment{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAsPathSegment) ToProto() (*otg.BgpAsPathSegment, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAsPathSegment) FromProto(msg *otg.BgpAsPathSegment) (BgpAsPathSegment, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAsPathSegment) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAsPathSegment) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAsPathSegment) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAsPathSegment) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAsPathSegment) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAsPathSegment) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAsPathSegment) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAsPathSegment) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAsPathSegment) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAsPathSegment) Clone() (BgpAsPathSegment, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAsPathSegment() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAsPathSegment is configuration for a single BGP AS path segment +type BgpAsPathSegment interface { + Validation + // msg marshals BgpAsPathSegment to protobuf object *otg.BgpAsPathSegment + // and doesn't set defaults + msg() *otg.BgpAsPathSegment + // setMsg unmarshals BgpAsPathSegment from protobuf object *otg.BgpAsPathSegment + // and doesn't set defaults + setMsg(*otg.BgpAsPathSegment) BgpAsPathSegment + // provides marshal interface + Marshal() marshalBgpAsPathSegment + // provides unmarshal interface + Unmarshal() unMarshalBgpAsPathSegment + // validate validates BgpAsPathSegment + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAsPathSegment, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns BgpAsPathSegmentTypeEnum, set in BgpAsPathSegment + Type() BgpAsPathSegmentTypeEnum + // SetType assigns BgpAsPathSegmentTypeEnum provided by user to BgpAsPathSegment + SetType(value BgpAsPathSegmentTypeEnum) BgpAsPathSegment + // HasType checks if Type has been set in BgpAsPathSegment + HasType() bool + // AsNumbers returns []uint32, set in BgpAsPathSegment. + AsNumbers() []uint32 + // SetAsNumbers assigns []uint32 provided by user to BgpAsPathSegment + SetAsNumbers(value []uint32) BgpAsPathSegment +} + +type BgpAsPathSegmentTypeEnum string + +// Enum of Type on BgpAsPathSegment +var BgpAsPathSegmentType = struct { + AS_SEQ BgpAsPathSegmentTypeEnum + AS_SET BgpAsPathSegmentTypeEnum + AS_CONFED_SEQ BgpAsPathSegmentTypeEnum + AS_CONFED_SET BgpAsPathSegmentTypeEnum +}{ + AS_SEQ: BgpAsPathSegmentTypeEnum("as_seq"), + AS_SET: BgpAsPathSegmentTypeEnum("as_set"), + AS_CONFED_SEQ: BgpAsPathSegmentTypeEnum("as_confed_seq"), + AS_CONFED_SET: BgpAsPathSegmentTypeEnum("as_confed_set"), +} + +func (obj *bgpAsPathSegment) Type() BgpAsPathSegmentTypeEnum { + return BgpAsPathSegmentTypeEnum(obj.obj.Type.Enum().String()) +} + +// AS sequence is the most common type of AS_PATH, it contains the list of ASNs starting with the most recent ASN being added read from left to right. +// The other three AS_PATH types are used for Confederations - AS_SET is the type of AS_PATH attribute that summarizes routes using using the aggregate-address command, allowing AS_PATHs to be summarized in the update as well. - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most recent ASN to be added reading left to right - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent in BGP Updates. +// Type returns a string +func (obj *bgpAsPathSegment) HasType() bool { + return obj.obj.Type != nil +} + +func (obj *bgpAsPathSegment) SetType(value BgpAsPathSegmentTypeEnum) BgpAsPathSegment { + intValue, ok := otg.BgpAsPathSegment_Type_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAsPathSegmentTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpAsPathSegment_Type_Enum(intValue) + obj.obj.Type = &enumValue + + return obj +} + +// The AS numbers in this AS path segment. +// AsNumbers returns a []uint32 +func (obj *bgpAsPathSegment) AsNumbers() []uint32 { + if obj.obj.AsNumbers == nil { + obj.obj.AsNumbers = make([]uint32, 0) + } + return obj.obj.AsNumbers +} + +// The AS numbers in this AS path segment. +// SetAsNumbers sets the []uint32 value in the BgpAsPathSegment object +func (obj *bgpAsPathSegment) SetAsNumbers(value []uint32) BgpAsPathSegment { + + if obj.obj.AsNumbers == nil { + obj.obj.AsNumbers = make([]uint32, 0) + } + obj.obj.AsNumbers = value + + return obj +} + +func (obj *bgpAsPathSegment) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpAsPathSegment) setDefault() { + if obj.obj.Type == nil { + obj.SetType(BgpAsPathSegmentType.AS_SEQ) + + } + +} diff --git a/gosnappi/bgp_attributes.go b/gosnappi/bgp_attributes.go new file mode 100644 index 00000000..371446e7 --- /dev/null +++ b/gosnappi/bgp_attributes.go @@ -0,0 +1,1276 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributes ***** +type bgpAttributes struct { + validation + obj *otg.BgpAttributes + marshaller marshalBgpAttributes + unMarshaller unMarshalBgpAttributes + otherAttributesHolder BgpAttributesBgpAttributesOtherAttributeIter + asPathHolder BgpAttributesAsPath + as4PathHolder BgpAttributesAs4Path + nextHopHolder BgpAttributesNextHop + multiExitDiscriminatorHolder BgpAttributesMultiExitDiscriminator + localPreferenceHolder BgpAttributesLocalPreference + aggregatorHolder BgpAttributesAggregator + as4AggregatorHolder BgpAttributesAs4Aggregator + communityHolder BgpAttributesBgpAttributesCommunityIter + originatorIdHolder BgpAttributesOriginatorId + extendedCommunitiesHolder BgpAttributesBgpExtendedCommunityIter + tunnelEncapsulationHolder BgpAttributesTunnelEncapsulation + mpReachHolder BgpAttributesMpReachNlri + mpUnreachHolder BgpAttributesMpUnreachNlri +} + +func NewBgpAttributes() BgpAttributes { + obj := bgpAttributes{obj: &otg.BgpAttributes{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributes) msg() *otg.BgpAttributes { + return obj.obj +} + +func (obj *bgpAttributes) setMsg(msg *otg.BgpAttributes) BgpAttributes { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributes struct { + obj *bgpAttributes +} + +type marshalBgpAttributes interface { + // ToProto marshals BgpAttributes to protobuf object *otg.BgpAttributes + ToProto() (*otg.BgpAttributes, error) + // ToPbText marshals BgpAttributes to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributes to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributes to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributes struct { + obj *bgpAttributes +} + +type unMarshalBgpAttributes interface { + // FromProto unmarshals BgpAttributes from protobuf object *otg.BgpAttributes + FromProto(msg *otg.BgpAttributes) (BgpAttributes, error) + // FromPbText unmarshals BgpAttributes from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributes from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributes from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributes) Marshal() marshalBgpAttributes { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributes{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributes) Unmarshal() unMarshalBgpAttributes { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributes{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributes) ToProto() (*otg.BgpAttributes, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributes) FromProto(msg *otg.BgpAttributes) (BgpAttributes, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributes) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributes) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributes) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributes) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributes) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributes) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributes) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributes) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributes) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributes) Clone() (BgpAttributes, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributes() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributes) setNil() { + obj.otherAttributesHolder = nil + obj.asPathHolder = nil + obj.as4PathHolder = nil + obj.nextHopHolder = nil + obj.multiExitDiscriminatorHolder = nil + obj.localPreferenceHolder = nil + obj.aggregatorHolder = nil + obj.as4AggregatorHolder = nil + obj.communityHolder = nil + obj.originatorIdHolder = nil + obj.extendedCommunitiesHolder = nil + obj.tunnelEncapsulationHolder = nil + obj.mpReachHolder = nil + obj.mpUnreachHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributes is attributes carried in the Update packet alongwith the reach/unreach prefixes. +type BgpAttributes interface { + Validation + // msg marshals BgpAttributes to protobuf object *otg.BgpAttributes + // and doesn't set defaults + msg() *otg.BgpAttributes + // setMsg unmarshals BgpAttributes from protobuf object *otg.BgpAttributes + // and doesn't set defaults + setMsg(*otg.BgpAttributes) BgpAttributes + // provides marshal interface + Marshal() marshalBgpAttributes + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributes + // validate validates BgpAttributes + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributes, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // OtherAttributes returns BgpAttributesBgpAttributesOtherAttributeIterIter, set in BgpAttributes + OtherAttributes() BgpAttributesBgpAttributesOtherAttributeIter + // Origin returns BgpAttributesOriginEnum, set in BgpAttributes + Origin() BgpAttributesOriginEnum + // SetOrigin assigns BgpAttributesOriginEnum provided by user to BgpAttributes + SetOrigin(value BgpAttributesOriginEnum) BgpAttributes + // HasOrigin checks if Origin has been set in BgpAttributes + HasOrigin() bool + // AsPath returns BgpAttributesAsPath, set in BgpAttributes. + // BgpAttributesAsPath is the AS_PATH attribute identifies the autonomous systems through which routing information + // carried in this UPDATE message has passed. + // This contains the configuration of how to include the Local AS in the AS path + // attribute of the MP REACH NLRI. It also contains optional configuration of + // additional AS Path Segments that can be included in the AS Path attribute. + // The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that + // a routing information passes through to reach the destination. + // There are two modes in which AS numbers can be encoded in the AS Path Segments + // - When the AS Path is being exchanged between old and new BGP speakers or between two old BGP speakers , the AS numbers are encoded as 2 byte values. + // - When the AS Path is being exchanged between two new BGP speakers supporting 4 byte AS , the AS numbers are encoded as 4 byte values. + AsPath() BgpAttributesAsPath + // SetAsPath assigns BgpAttributesAsPath provided by user to BgpAttributes. + // BgpAttributesAsPath is the AS_PATH attribute identifies the autonomous systems through which routing information + // carried in this UPDATE message has passed. + // This contains the configuration of how to include the Local AS in the AS path + // attribute of the MP REACH NLRI. It also contains optional configuration of + // additional AS Path Segments that can be included in the AS Path attribute. + // The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that + // a routing information passes through to reach the destination. + // There are two modes in which AS numbers can be encoded in the AS Path Segments + // - When the AS Path is being exchanged between old and new BGP speakers or between two old BGP speakers , the AS numbers are encoded as 2 byte values. + // - When the AS Path is being exchanged between two new BGP speakers supporting 4 byte AS , the AS numbers are encoded as 4 byte values. + SetAsPath(value BgpAttributesAsPath) BgpAttributes + // HasAsPath checks if AsPath has been set in BgpAttributes + HasAsPath() bool + // As4Path returns BgpAttributesAs4Path, set in BgpAttributes. + // BgpAttributesAs4Path is the AS4_PATH attribute identifies the autonomous systems through which routing information + // carried in this UPDATE message has passed. + // This contains the configuration of how to include the Local AS in the AS path + // attribute of the MP REACH NLRI. It also contains optional configuration of + // additional AS Path Segments that can be included in the AS Path attribute. + // The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that + // a routing information passes through to reach the destination. + // AS4_PATH is only exchanged in two scenarios: + // - When an old BGP speaker has to forward a received AS4_PATH containing 4 byte AS numbers to new BGP speaker. + // - When a new BGP speaker is connected to an old BGP speaker and has to propagate 4 byte AS numbers via the old BGP speaker. + // Its usage is described in RFC4893. + As4Path() BgpAttributesAs4Path + // SetAs4Path assigns BgpAttributesAs4Path provided by user to BgpAttributes. + // BgpAttributesAs4Path is the AS4_PATH attribute identifies the autonomous systems through which routing information + // carried in this UPDATE message has passed. + // This contains the configuration of how to include the Local AS in the AS path + // attribute of the MP REACH NLRI. It also contains optional configuration of + // additional AS Path Segments that can be included in the AS Path attribute. + // The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that + // a routing information passes through to reach the destination. + // AS4_PATH is only exchanged in two scenarios: + // - When an old BGP speaker has to forward a received AS4_PATH containing 4 byte AS numbers to new BGP speaker. + // - When a new BGP speaker is connected to an old BGP speaker and has to propagate 4 byte AS numbers via the old BGP speaker. + // Its usage is described in RFC4893. + SetAs4Path(value BgpAttributesAs4Path) BgpAttributes + // HasAs4Path checks if As4Path has been set in BgpAttributes + HasAs4Path() bool + // NextHop returns BgpAttributesNextHop, set in BgpAttributes. + // BgpAttributesNextHop is next hop to be sent inside MP_REACH NLRI or as the NEXT_HOP attribute if advertised as traditional NLRI. + NextHop() BgpAttributesNextHop + // SetNextHop assigns BgpAttributesNextHop provided by user to BgpAttributes. + // BgpAttributesNextHop is next hop to be sent inside MP_REACH NLRI or as the NEXT_HOP attribute if advertised as traditional NLRI. + SetNextHop(value BgpAttributesNextHop) BgpAttributes + // HasNextHop checks if NextHop has been set in BgpAttributes + HasNextHop() bool + // MultiExitDiscriminator returns BgpAttributesMultiExitDiscriminator, set in BgpAttributes. + // BgpAttributesMultiExitDiscriminator is optional MULTI_EXIT_DISCRIMINATOR attribute sent to the peer to help in the route selection process. + MultiExitDiscriminator() BgpAttributesMultiExitDiscriminator + // SetMultiExitDiscriminator assigns BgpAttributesMultiExitDiscriminator provided by user to BgpAttributes. + // BgpAttributesMultiExitDiscriminator is optional MULTI_EXIT_DISCRIMINATOR attribute sent to the peer to help in the route selection process. + SetMultiExitDiscriminator(value BgpAttributesMultiExitDiscriminator) BgpAttributes + // HasMultiExitDiscriminator checks if MultiExitDiscriminator has been set in BgpAttributes + HasMultiExitDiscriminator() bool + // LocalPreference returns BgpAttributesLocalPreference, set in BgpAttributes. + // BgpAttributesLocalPreference is optional LOCAL_PREFERENCE attribute sent to the peer to indicate the degree of preference + // for externally learned routes.This should be included only for internal peers.It is + // used for the selection of the path for the traffic leaving the AS.The route with the + // highest local preference value is preferred. + LocalPreference() BgpAttributesLocalPreference + // SetLocalPreference assigns BgpAttributesLocalPreference provided by user to BgpAttributes. + // BgpAttributesLocalPreference is optional LOCAL_PREFERENCE attribute sent to the peer to indicate the degree of preference + // for externally learned routes.This should be included only for internal peers.It is + // used for the selection of the path for the traffic leaving the AS.The route with the + // highest local preference value is preferred. + SetLocalPreference(value BgpAttributesLocalPreference) BgpAttributes + // HasLocalPreference checks if LocalPreference has been set in BgpAttributes + HasLocalPreference() bool + // IncludeAtomicAggregator returns bool, set in BgpAttributes. + IncludeAtomicAggregator() bool + // SetIncludeAtomicAggregator assigns bool provided by user to BgpAttributes + SetIncludeAtomicAggregator(value bool) BgpAttributes + // HasIncludeAtomicAggregator checks if IncludeAtomicAggregator has been set in BgpAttributes + HasIncludeAtomicAggregator() bool + // Aggregator returns BgpAttributesAggregator, set in BgpAttributes. + // BgpAttributesAggregator is optional AGGREGATOR attribute which maybe be added by a BGP speaker which performs route aggregation. + // When AGGREGATOR attribute is being sent to a new BGP speaker , the AS number is encoded as a 4 byte value. + // When AGGREGATOR attribute is being exchanged between a new and an old BGP speaker or between two old BGP speakers, + // the AS number is encoded as a 2 byte value. + // It contain the AS number and IP address of the speaker performing the aggregation. + Aggregator() BgpAttributesAggregator + // SetAggregator assigns BgpAttributesAggregator provided by user to BgpAttributes. + // BgpAttributesAggregator is optional AGGREGATOR attribute which maybe be added by a BGP speaker which performs route aggregation. + // When AGGREGATOR attribute is being sent to a new BGP speaker , the AS number is encoded as a 4 byte value. + // When AGGREGATOR attribute is being exchanged between a new and an old BGP speaker or between two old BGP speakers, + // the AS number is encoded as a 2 byte value. + // It contain the AS number and IP address of the speaker performing the aggregation. + SetAggregator(value BgpAttributesAggregator) BgpAttributes + // HasAggregator checks if Aggregator has been set in BgpAttributes + HasAggregator() bool + // As4Aggregator returns BgpAttributesAs4Aggregator, set in BgpAttributes. + // BgpAttributesAs4Aggregator is optional AS4_AGGREGATOR attribute which maybe be added by a BGP speaker in one of two cases: + // - If it is a new BGP speaker speaking to an old BGP speaker and needs to send a 4 byte value for the AS number of the BGP route aggregator. + // - If it is a old BGP speaker speaking to a new BGP speaker and has to transparently forward a received AS4_AGGREGATOR from some other peer. + // Its usage is described in RFC4893. + As4Aggregator() BgpAttributesAs4Aggregator + // SetAs4Aggregator assigns BgpAttributesAs4Aggregator provided by user to BgpAttributes. + // BgpAttributesAs4Aggregator is optional AS4_AGGREGATOR attribute which maybe be added by a BGP speaker in one of two cases: + // - If it is a new BGP speaker speaking to an old BGP speaker and needs to send a 4 byte value for the AS number of the BGP route aggregator. + // - If it is a old BGP speaker speaking to a new BGP speaker and has to transparently forward a received AS4_AGGREGATOR from some other peer. + // Its usage is described in RFC4893. + SetAs4Aggregator(value BgpAttributesAs4Aggregator) BgpAttributes + // HasAs4Aggregator checks if As4Aggregator has been set in BgpAttributes + HasAs4Aggregator() bool + // Community returns BgpAttributesBgpAttributesCommunityIterIter, set in BgpAttributes + Community() BgpAttributesBgpAttributesCommunityIter + // OriginatorId returns BgpAttributesOriginatorId, set in BgpAttributes. + // BgpAttributesOriginatorId is optional ORIGINATOR_ID attribute (type code 9) carries the Router Id of the route's originator in the local AS. + OriginatorId() BgpAttributesOriginatorId + // SetOriginatorId assigns BgpAttributesOriginatorId provided by user to BgpAttributes. + // BgpAttributesOriginatorId is optional ORIGINATOR_ID attribute (type code 9) carries the Router Id of the route's originator in the local AS. + SetOriginatorId(value BgpAttributesOriginatorId) BgpAttributes + // HasOriginatorId checks if OriginatorId has been set in BgpAttributes + HasOriginatorId() bool + // ClusterIds returns []string, set in BgpAttributes. + ClusterIds() []string + // SetClusterIds assigns []string provided by user to BgpAttributes + SetClusterIds(value []string) BgpAttributes + // ExtendedCommunities returns BgpAttributesBgpExtendedCommunityIterIter, set in BgpAttributes + ExtendedCommunities() BgpAttributesBgpExtendedCommunityIter + // TunnelEncapsulation returns BgpAttributesTunnelEncapsulation, set in BgpAttributes. + // BgpAttributesTunnelEncapsulation is the TUNNEL_ENCAPSULATION attribute is used by a BGP speaker to inform other BGP speakers how to encapsulate packets that need to be sent to it. + // It is defined in RFC9012 and is assigned a Type code of 23. + TunnelEncapsulation() BgpAttributesTunnelEncapsulation + // SetTunnelEncapsulation assigns BgpAttributesTunnelEncapsulation provided by user to BgpAttributes. + // BgpAttributesTunnelEncapsulation is the TUNNEL_ENCAPSULATION attribute is used by a BGP speaker to inform other BGP speakers how to encapsulate packets that need to be sent to it. + // It is defined in RFC9012 and is assigned a Type code of 23. + SetTunnelEncapsulation(value BgpAttributesTunnelEncapsulation) BgpAttributes + // HasTunnelEncapsulation checks if TunnelEncapsulation has been set in BgpAttributes + HasTunnelEncapsulation() bool + // MpReach returns BgpAttributesMpReachNlri, set in BgpAttributes. + // BgpAttributesMpReachNlri is the MP_REACH attribute is an optional attribute which can be included in the attributes of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3. + // The following AFI / SAFI combinations are supported: + // - IPv4 Unicast with AFI as 1 and SAFI as 1 + // - IPv6 Unicast with AFI as 2 and SAFI as 1 + // - Segment Routing Policy for IPv4 Unicast with AFI as 1 and SAFI as 73 ( draft-ietf-idr-sr-policy-safi-02 Section 2.1 ) + // - Segment Routing Policy for IPv6 Unicast with AFI as 2 and SAFI as 73 + MpReach() BgpAttributesMpReachNlri + // SetMpReach assigns BgpAttributesMpReachNlri provided by user to BgpAttributes. + // BgpAttributesMpReachNlri is the MP_REACH attribute is an optional attribute which can be included in the attributes of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3. + // The following AFI / SAFI combinations are supported: + // - IPv4 Unicast with AFI as 1 and SAFI as 1 + // - IPv6 Unicast with AFI as 2 and SAFI as 1 + // - Segment Routing Policy for IPv4 Unicast with AFI as 1 and SAFI as 73 ( draft-ietf-idr-sr-policy-safi-02 Section 2.1 ) + // - Segment Routing Policy for IPv6 Unicast with AFI as 2 and SAFI as 73 + SetMpReach(value BgpAttributesMpReachNlri) BgpAttributes + // HasMpReach checks if MpReach has been set in BgpAttributes + HasMpReach() bool + // MpUnreach returns BgpAttributesMpUnreachNlri, set in BgpAttributes. + // BgpAttributesMpUnreachNlri is the MP_UNREACH attribute is an optional attribute which can be included in the attributes of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3. + // The following AFI / SAFI combinations are supported: + // - IPv4 Unicast with AFI as 1 and SAFI as 1 + // - IPv6 Unicast with AFI as 2 and SAFI as 1 + // - Segment Routing Policy for IPv4 Unicast with AFI as 1 and SAFI as 73 (draft-ietf-idr-sr-policy-safi-02 Section 2.1) + // - Segment Routing Policy for IPv6 Unicast with AFI as 2 and SAFI as 73 + MpUnreach() BgpAttributesMpUnreachNlri + // SetMpUnreach assigns BgpAttributesMpUnreachNlri provided by user to BgpAttributes. + // BgpAttributesMpUnreachNlri is the MP_UNREACH attribute is an optional attribute which can be included in the attributes of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3. + // The following AFI / SAFI combinations are supported: + // - IPv4 Unicast with AFI as 1 and SAFI as 1 + // - IPv6 Unicast with AFI as 2 and SAFI as 1 + // - Segment Routing Policy for IPv4 Unicast with AFI as 1 and SAFI as 73 (draft-ietf-idr-sr-policy-safi-02 Section 2.1) + // - Segment Routing Policy for IPv6 Unicast with AFI as 2 and SAFI as 73 + SetMpUnreach(value BgpAttributesMpUnreachNlri) BgpAttributes + // HasMpUnreach checks if MpUnreach has been set in BgpAttributes + HasMpUnreach() bool + setNil() +} + +// Any attributes not present in the list of configurable attributes should be added to the list of unknown attributes. +// OtherAttributes returns a []BgpAttributesOtherAttribute +func (obj *bgpAttributes) OtherAttributes() BgpAttributesBgpAttributesOtherAttributeIter { + if len(obj.obj.OtherAttributes) == 0 { + obj.obj.OtherAttributes = []*otg.BgpAttributesOtherAttribute{} + } + if obj.otherAttributesHolder == nil { + obj.otherAttributesHolder = newBgpAttributesBgpAttributesOtherAttributeIter(&obj.obj.OtherAttributes).setMsg(obj) + } + return obj.otherAttributesHolder +} + +type bgpAttributesBgpAttributesOtherAttributeIter struct { + obj *bgpAttributes + bgpAttributesOtherAttributeSlice []BgpAttributesOtherAttribute + fieldPtr *[]*otg.BgpAttributesOtherAttribute +} + +func newBgpAttributesBgpAttributesOtherAttributeIter(ptr *[]*otg.BgpAttributesOtherAttribute) BgpAttributesBgpAttributesOtherAttributeIter { + return &bgpAttributesBgpAttributesOtherAttributeIter{fieldPtr: ptr} +} + +type BgpAttributesBgpAttributesOtherAttributeIter interface { + setMsg(*bgpAttributes) BgpAttributesBgpAttributesOtherAttributeIter + Items() []BgpAttributesOtherAttribute + Add() BgpAttributesOtherAttribute + Append(items ...BgpAttributesOtherAttribute) BgpAttributesBgpAttributesOtherAttributeIter + Set(index int, newObj BgpAttributesOtherAttribute) BgpAttributesBgpAttributesOtherAttributeIter + Clear() BgpAttributesBgpAttributesOtherAttributeIter + clearHolderSlice() BgpAttributesBgpAttributesOtherAttributeIter + appendHolderSlice(item BgpAttributesOtherAttribute) BgpAttributesBgpAttributesOtherAttributeIter +} + +func (obj *bgpAttributesBgpAttributesOtherAttributeIter) setMsg(msg *bgpAttributes) BgpAttributesBgpAttributesOtherAttributeIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpAttributesOtherAttribute{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpAttributesBgpAttributesOtherAttributeIter) Items() []BgpAttributesOtherAttribute { + return obj.bgpAttributesOtherAttributeSlice +} + +func (obj *bgpAttributesBgpAttributesOtherAttributeIter) Add() BgpAttributesOtherAttribute { + newObj := &otg.BgpAttributesOtherAttribute{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpAttributesOtherAttribute{obj: newObj} + newLibObj.setDefault() + obj.bgpAttributesOtherAttributeSlice = append(obj.bgpAttributesOtherAttributeSlice, newLibObj) + return newLibObj +} + +func (obj *bgpAttributesBgpAttributesOtherAttributeIter) Append(items ...BgpAttributesOtherAttribute) BgpAttributesBgpAttributesOtherAttributeIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpAttributesOtherAttributeSlice = append(obj.bgpAttributesOtherAttributeSlice, item) + } + return obj +} + +func (obj *bgpAttributesBgpAttributesOtherAttributeIter) Set(index int, newObj BgpAttributesOtherAttribute) BgpAttributesBgpAttributesOtherAttributeIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpAttributesOtherAttributeSlice[index] = newObj + return obj +} +func (obj *bgpAttributesBgpAttributesOtherAttributeIter) Clear() BgpAttributesBgpAttributesOtherAttributeIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpAttributesOtherAttribute{} + obj.bgpAttributesOtherAttributeSlice = []BgpAttributesOtherAttribute{} + } + return obj +} +func (obj *bgpAttributesBgpAttributesOtherAttributeIter) clearHolderSlice() BgpAttributesBgpAttributesOtherAttributeIter { + if len(obj.bgpAttributesOtherAttributeSlice) > 0 { + obj.bgpAttributesOtherAttributeSlice = []BgpAttributesOtherAttribute{} + } + return obj +} +func (obj *bgpAttributesBgpAttributesOtherAttributeIter) appendHolderSlice(item BgpAttributesOtherAttribute) BgpAttributesBgpAttributesOtherAttributeIter { + obj.bgpAttributesOtherAttributeSlice = append(obj.bgpAttributesOtherAttributeSlice, item) + return obj +} + +type BgpAttributesOriginEnum string + +// Enum of Origin on BgpAttributes +var BgpAttributesOrigin = struct { + IGP BgpAttributesOriginEnum + EGP BgpAttributesOriginEnum + INCOMPLETE BgpAttributesOriginEnum +}{ + IGP: BgpAttributesOriginEnum("igp"), + EGP: BgpAttributesOriginEnum("egp"), + INCOMPLETE: BgpAttributesOriginEnum("incomplete"), +} + +func (obj *bgpAttributes) Origin() BgpAttributesOriginEnum { + return BgpAttributesOriginEnum(obj.obj.Origin.Enum().String()) +} + +// The ORIGIN attribute is a mandatory attribute which can take three values: +// the prefix originates from an interior routing protocol 'igp', it originates from 'egp' +// or the origin is 'incomplete',if the prefix is learned through other means. +// Origin returns a string +func (obj *bgpAttributes) HasOrigin() bool { + return obj.obj.Origin != nil +} + +func (obj *bgpAttributes) SetOrigin(value BgpAttributesOriginEnum) BgpAttributes { + intValue, ok := otg.BgpAttributes_Origin_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAttributesOriginEnum", string(value))) + return obj + } + enumValue := otg.BgpAttributes_Origin_Enum(intValue) + obj.obj.Origin = &enumValue + + return obj +} + +// AS_PATH attribute to be included in the Update. +// AsPath returns a BgpAttributesAsPath +func (obj *bgpAttributes) AsPath() BgpAttributesAsPath { + if obj.obj.AsPath == nil { + obj.obj.AsPath = NewBgpAttributesAsPath().msg() + } + if obj.asPathHolder == nil { + obj.asPathHolder = &bgpAttributesAsPath{obj: obj.obj.AsPath} + } + return obj.asPathHolder +} + +// AS_PATH attribute to be included in the Update. +// AsPath returns a BgpAttributesAsPath +func (obj *bgpAttributes) HasAsPath() bool { + return obj.obj.AsPath != nil +} + +// AS_PATH attribute to be included in the Update. +// SetAsPath sets the BgpAttributesAsPath value in the BgpAttributes object +func (obj *bgpAttributes) SetAsPath(value BgpAttributesAsPath) BgpAttributes { + + obj.asPathHolder = nil + obj.obj.AsPath = value.msg() + + return obj +} + +// AS4_PATH attribute to be included in the Update. +// As4Path returns a BgpAttributesAs4Path +func (obj *bgpAttributes) As4Path() BgpAttributesAs4Path { + if obj.obj.As4Path == nil { + obj.obj.As4Path = NewBgpAttributesAs4Path().msg() + } + if obj.as4PathHolder == nil { + obj.as4PathHolder = &bgpAttributesAs4Path{obj: obj.obj.As4Path} + } + return obj.as4PathHolder +} + +// AS4_PATH attribute to be included in the Update. +// As4Path returns a BgpAttributesAs4Path +func (obj *bgpAttributes) HasAs4Path() bool { + return obj.obj.As4Path != nil +} + +// AS4_PATH attribute to be included in the Update. +// SetAs4Path sets the BgpAttributesAs4Path value in the BgpAttributes object +func (obj *bgpAttributes) SetAs4Path(value BgpAttributesAs4Path) BgpAttributes { + + obj.as4PathHolder = nil + obj.obj.As4Path = value.msg() + + return obj +} + +// description is TBD +// NextHop returns a BgpAttributesNextHop +func (obj *bgpAttributes) NextHop() BgpAttributesNextHop { + if obj.obj.NextHop == nil { + obj.obj.NextHop = NewBgpAttributesNextHop().msg() + } + if obj.nextHopHolder == nil { + obj.nextHopHolder = &bgpAttributesNextHop{obj: obj.obj.NextHop} + } + return obj.nextHopHolder +} + +// description is TBD +// NextHop returns a BgpAttributesNextHop +func (obj *bgpAttributes) HasNextHop() bool { + return obj.obj.NextHop != nil +} + +// description is TBD +// SetNextHop sets the BgpAttributesNextHop value in the BgpAttributes object +func (obj *bgpAttributes) SetNextHop(value BgpAttributesNextHop) BgpAttributes { + + obj.nextHopHolder = nil + obj.obj.NextHop = value.msg() + + return obj +} + +// description is TBD +// MultiExitDiscriminator returns a BgpAttributesMultiExitDiscriminator +func (obj *bgpAttributes) MultiExitDiscriminator() BgpAttributesMultiExitDiscriminator { + if obj.obj.MultiExitDiscriminator == nil { + obj.obj.MultiExitDiscriminator = NewBgpAttributesMultiExitDiscriminator().msg() + } + if obj.multiExitDiscriminatorHolder == nil { + obj.multiExitDiscriminatorHolder = &bgpAttributesMultiExitDiscriminator{obj: obj.obj.MultiExitDiscriminator} + } + return obj.multiExitDiscriminatorHolder +} + +// description is TBD +// MultiExitDiscriminator returns a BgpAttributesMultiExitDiscriminator +func (obj *bgpAttributes) HasMultiExitDiscriminator() bool { + return obj.obj.MultiExitDiscriminator != nil +} + +// description is TBD +// SetMultiExitDiscriminator sets the BgpAttributesMultiExitDiscriminator value in the BgpAttributes object +func (obj *bgpAttributes) SetMultiExitDiscriminator(value BgpAttributesMultiExitDiscriminator) BgpAttributes { + + obj.multiExitDiscriminatorHolder = nil + obj.obj.MultiExitDiscriminator = value.msg() + + return obj +} + +// description is TBD +// LocalPreference returns a BgpAttributesLocalPreference +func (obj *bgpAttributes) LocalPreference() BgpAttributesLocalPreference { + if obj.obj.LocalPreference == nil { + obj.obj.LocalPreference = NewBgpAttributesLocalPreference().msg() + } + if obj.localPreferenceHolder == nil { + obj.localPreferenceHolder = &bgpAttributesLocalPreference{obj: obj.obj.LocalPreference} + } + return obj.localPreferenceHolder +} + +// description is TBD +// LocalPreference returns a BgpAttributesLocalPreference +func (obj *bgpAttributes) HasLocalPreference() bool { + return obj.obj.LocalPreference != nil +} + +// description is TBD +// SetLocalPreference sets the BgpAttributesLocalPreference value in the BgpAttributes object +func (obj *bgpAttributes) SetLocalPreference(value BgpAttributesLocalPreference) BgpAttributes { + + obj.localPreferenceHolder = nil + obj.obj.LocalPreference = value.msg() + + return obj +} + +// If enabled, it indicates that the ATOMIC_AGGREGATOR attribute should be included in the Update. +// Presence of this attribute Indicates that this route might not be getting sent on a fully optimized path +// since some intermediate BGP speaker has aggregated the route. +// IncludeAtomicAggregator returns a bool +func (obj *bgpAttributes) IncludeAtomicAggregator() bool { + + return *obj.obj.IncludeAtomicAggregator + +} + +// If enabled, it indicates that the ATOMIC_AGGREGATOR attribute should be included in the Update. +// Presence of this attribute Indicates that this route might not be getting sent on a fully optimized path +// since some intermediate BGP speaker has aggregated the route. +// IncludeAtomicAggregator returns a bool +func (obj *bgpAttributes) HasIncludeAtomicAggregator() bool { + return obj.obj.IncludeAtomicAggregator != nil +} + +// If enabled, it indicates that the ATOMIC_AGGREGATOR attribute should be included in the Update. +// Presence of this attribute Indicates that this route might not be getting sent on a fully optimized path +// since some intermediate BGP speaker has aggregated the route. +// SetIncludeAtomicAggregator sets the bool value in the BgpAttributes object +func (obj *bgpAttributes) SetIncludeAtomicAggregator(value bool) BgpAttributes { + + obj.obj.IncludeAtomicAggregator = &value + return obj +} + +// description is TBD +// Aggregator returns a BgpAttributesAggregator +func (obj *bgpAttributes) Aggregator() BgpAttributesAggregator { + if obj.obj.Aggregator == nil { + obj.obj.Aggregator = NewBgpAttributesAggregator().msg() + } + if obj.aggregatorHolder == nil { + obj.aggregatorHolder = &bgpAttributesAggregator{obj: obj.obj.Aggregator} + } + return obj.aggregatorHolder +} + +// description is TBD +// Aggregator returns a BgpAttributesAggregator +func (obj *bgpAttributes) HasAggregator() bool { + return obj.obj.Aggregator != nil +} + +// description is TBD +// SetAggregator sets the BgpAttributesAggregator value in the BgpAttributes object +func (obj *bgpAttributes) SetAggregator(value BgpAttributesAggregator) BgpAttributes { + + obj.aggregatorHolder = nil + obj.obj.Aggregator = value.msg() + + return obj +} + +// description is TBD +// As4Aggregator returns a BgpAttributesAs4Aggregator +func (obj *bgpAttributes) As4Aggregator() BgpAttributesAs4Aggregator { + if obj.obj.As4Aggregator == nil { + obj.obj.As4Aggregator = NewBgpAttributesAs4Aggregator().msg() + } + if obj.as4AggregatorHolder == nil { + obj.as4AggregatorHolder = &bgpAttributesAs4Aggregator{obj: obj.obj.As4Aggregator} + } + return obj.as4AggregatorHolder +} + +// description is TBD +// As4Aggregator returns a BgpAttributesAs4Aggregator +func (obj *bgpAttributes) HasAs4Aggregator() bool { + return obj.obj.As4Aggregator != nil +} + +// description is TBD +// SetAs4Aggregator sets the BgpAttributesAs4Aggregator value in the BgpAttributes object +func (obj *bgpAttributes) SetAs4Aggregator(value BgpAttributesAs4Aggregator) BgpAttributes { + + obj.as4AggregatorHolder = nil + obj.obj.As4Aggregator = value.msg() + + return obj +} + +// description is TBD +// Community returns a []BgpAttributesCommunity +func (obj *bgpAttributes) Community() BgpAttributesBgpAttributesCommunityIter { + if len(obj.obj.Community) == 0 { + obj.obj.Community = []*otg.BgpAttributesCommunity{} + } + if obj.communityHolder == nil { + obj.communityHolder = newBgpAttributesBgpAttributesCommunityIter(&obj.obj.Community).setMsg(obj) + } + return obj.communityHolder +} + +type bgpAttributesBgpAttributesCommunityIter struct { + obj *bgpAttributes + bgpAttributesCommunitySlice []BgpAttributesCommunity + fieldPtr *[]*otg.BgpAttributesCommunity +} + +func newBgpAttributesBgpAttributesCommunityIter(ptr *[]*otg.BgpAttributesCommunity) BgpAttributesBgpAttributesCommunityIter { + return &bgpAttributesBgpAttributesCommunityIter{fieldPtr: ptr} +} + +type BgpAttributesBgpAttributesCommunityIter interface { + setMsg(*bgpAttributes) BgpAttributesBgpAttributesCommunityIter + Items() []BgpAttributesCommunity + Add() BgpAttributesCommunity + Append(items ...BgpAttributesCommunity) BgpAttributesBgpAttributesCommunityIter + Set(index int, newObj BgpAttributesCommunity) BgpAttributesBgpAttributesCommunityIter + Clear() BgpAttributesBgpAttributesCommunityIter + clearHolderSlice() BgpAttributesBgpAttributesCommunityIter + appendHolderSlice(item BgpAttributesCommunity) BgpAttributesBgpAttributesCommunityIter +} + +func (obj *bgpAttributesBgpAttributesCommunityIter) setMsg(msg *bgpAttributes) BgpAttributesBgpAttributesCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpAttributesCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpAttributesBgpAttributesCommunityIter) Items() []BgpAttributesCommunity { + return obj.bgpAttributesCommunitySlice +} + +func (obj *bgpAttributesBgpAttributesCommunityIter) Add() BgpAttributesCommunity { + newObj := &otg.BgpAttributesCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpAttributesCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpAttributesCommunitySlice = append(obj.bgpAttributesCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpAttributesBgpAttributesCommunityIter) Append(items ...BgpAttributesCommunity) BgpAttributesBgpAttributesCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpAttributesCommunitySlice = append(obj.bgpAttributesCommunitySlice, item) + } + return obj +} + +func (obj *bgpAttributesBgpAttributesCommunityIter) Set(index int, newObj BgpAttributesCommunity) BgpAttributesBgpAttributesCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpAttributesCommunitySlice[index] = newObj + return obj +} +func (obj *bgpAttributesBgpAttributesCommunityIter) Clear() BgpAttributesBgpAttributesCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpAttributesCommunity{} + obj.bgpAttributesCommunitySlice = []BgpAttributesCommunity{} + } + return obj +} +func (obj *bgpAttributesBgpAttributesCommunityIter) clearHolderSlice() BgpAttributesBgpAttributesCommunityIter { + if len(obj.bgpAttributesCommunitySlice) > 0 { + obj.bgpAttributesCommunitySlice = []BgpAttributesCommunity{} + } + return obj +} +func (obj *bgpAttributesBgpAttributesCommunityIter) appendHolderSlice(item BgpAttributesCommunity) BgpAttributesBgpAttributesCommunityIter { + obj.bgpAttributesCommunitySlice = append(obj.bgpAttributesCommunitySlice, item) + return obj +} + +// description is TBD +// OriginatorId returns a BgpAttributesOriginatorId +func (obj *bgpAttributes) OriginatorId() BgpAttributesOriginatorId { + if obj.obj.OriginatorId == nil { + obj.obj.OriginatorId = NewBgpAttributesOriginatorId().msg() + } + if obj.originatorIdHolder == nil { + obj.originatorIdHolder = &bgpAttributesOriginatorId{obj: obj.obj.OriginatorId} + } + return obj.originatorIdHolder +} + +// description is TBD +// OriginatorId returns a BgpAttributesOriginatorId +func (obj *bgpAttributes) HasOriginatorId() bool { + return obj.obj.OriginatorId != nil +} + +// description is TBD +// SetOriginatorId sets the BgpAttributesOriginatorId value in the BgpAttributes object +func (obj *bgpAttributes) SetOriginatorId(value BgpAttributesOriginatorId) BgpAttributes { + + obj.originatorIdHolder = nil + obj.obj.OriginatorId = value.msg() + + return obj +} + +// When a Route Reflector reflects a route, it prepends the local CLUSTER_ID to the CLUSTER_LIST as defined in RFC4456. +// ClusterIds returns a []string +func (obj *bgpAttributes) ClusterIds() []string { + if obj.obj.ClusterIds == nil { + obj.obj.ClusterIds = make([]string, 0) + } + return obj.obj.ClusterIds +} + +// When a Route Reflector reflects a route, it prepends the local CLUSTER_ID to the CLUSTER_LIST as defined in RFC4456. +// SetClusterIds sets the []string value in the BgpAttributes object +func (obj *bgpAttributes) SetClusterIds(value []string) BgpAttributes { + + if obj.obj.ClusterIds == nil { + obj.obj.ClusterIds = make([]string, 0) + } + obj.obj.ClusterIds = value + + return obj +} + +// Optional EXTENDED_COMMUNITY attribute settings. +// The EXTENDED_COMMUNITY Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes +// are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an eight byte value. +// It is divided into two main parts. The first two bytes of the community encode a type and sub-type fields and the last six bytes carry a unique set +// of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. +// ExtendedCommunities returns a []BgpExtendedCommunity +func (obj *bgpAttributes) ExtendedCommunities() BgpAttributesBgpExtendedCommunityIter { + if len(obj.obj.ExtendedCommunities) == 0 { + obj.obj.ExtendedCommunities = []*otg.BgpExtendedCommunity{} + } + if obj.extendedCommunitiesHolder == nil { + obj.extendedCommunitiesHolder = newBgpAttributesBgpExtendedCommunityIter(&obj.obj.ExtendedCommunities).setMsg(obj) + } + return obj.extendedCommunitiesHolder +} + +type bgpAttributesBgpExtendedCommunityIter struct { + obj *bgpAttributes + bgpExtendedCommunitySlice []BgpExtendedCommunity + fieldPtr *[]*otg.BgpExtendedCommunity +} + +func newBgpAttributesBgpExtendedCommunityIter(ptr *[]*otg.BgpExtendedCommunity) BgpAttributesBgpExtendedCommunityIter { + return &bgpAttributesBgpExtendedCommunityIter{fieldPtr: ptr} +} + +type BgpAttributesBgpExtendedCommunityIter interface { + setMsg(*bgpAttributes) BgpAttributesBgpExtendedCommunityIter + Items() []BgpExtendedCommunity + Add() BgpExtendedCommunity + Append(items ...BgpExtendedCommunity) BgpAttributesBgpExtendedCommunityIter + Set(index int, newObj BgpExtendedCommunity) BgpAttributesBgpExtendedCommunityIter + Clear() BgpAttributesBgpExtendedCommunityIter + clearHolderSlice() BgpAttributesBgpExtendedCommunityIter + appendHolderSlice(item BgpExtendedCommunity) BgpAttributesBgpExtendedCommunityIter +} + +func (obj *bgpAttributesBgpExtendedCommunityIter) setMsg(msg *bgpAttributes) BgpAttributesBgpExtendedCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpExtendedCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpAttributesBgpExtendedCommunityIter) Items() []BgpExtendedCommunity { + return obj.bgpExtendedCommunitySlice +} + +func (obj *bgpAttributesBgpExtendedCommunityIter) Add() BgpExtendedCommunity { + newObj := &otg.BgpExtendedCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpExtendedCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpExtendedCommunitySlice = append(obj.bgpExtendedCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpAttributesBgpExtendedCommunityIter) Append(items ...BgpExtendedCommunity) BgpAttributesBgpExtendedCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpExtendedCommunitySlice = append(obj.bgpExtendedCommunitySlice, item) + } + return obj +} + +func (obj *bgpAttributesBgpExtendedCommunityIter) Set(index int, newObj BgpExtendedCommunity) BgpAttributesBgpExtendedCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpExtendedCommunitySlice[index] = newObj + return obj +} +func (obj *bgpAttributesBgpExtendedCommunityIter) Clear() BgpAttributesBgpExtendedCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpExtendedCommunity{} + obj.bgpExtendedCommunitySlice = []BgpExtendedCommunity{} + } + return obj +} +func (obj *bgpAttributesBgpExtendedCommunityIter) clearHolderSlice() BgpAttributesBgpExtendedCommunityIter { + if len(obj.bgpExtendedCommunitySlice) > 0 { + obj.bgpExtendedCommunitySlice = []BgpExtendedCommunity{} + } + return obj +} +func (obj *bgpAttributesBgpExtendedCommunityIter) appendHolderSlice(item BgpExtendedCommunity) BgpAttributesBgpExtendedCommunityIter { + obj.bgpExtendedCommunitySlice = append(obj.bgpExtendedCommunitySlice, item) + return obj +} + +// description is TBD +// TunnelEncapsulation returns a BgpAttributesTunnelEncapsulation +func (obj *bgpAttributes) TunnelEncapsulation() BgpAttributesTunnelEncapsulation { + if obj.obj.TunnelEncapsulation == nil { + obj.obj.TunnelEncapsulation = NewBgpAttributesTunnelEncapsulation().msg() + } + if obj.tunnelEncapsulationHolder == nil { + obj.tunnelEncapsulationHolder = &bgpAttributesTunnelEncapsulation{obj: obj.obj.TunnelEncapsulation} + } + return obj.tunnelEncapsulationHolder +} + +// description is TBD +// TunnelEncapsulation returns a BgpAttributesTunnelEncapsulation +func (obj *bgpAttributes) HasTunnelEncapsulation() bool { + return obj.obj.TunnelEncapsulation != nil +} + +// description is TBD +// SetTunnelEncapsulation sets the BgpAttributesTunnelEncapsulation value in the BgpAttributes object +func (obj *bgpAttributes) SetTunnelEncapsulation(value BgpAttributesTunnelEncapsulation) BgpAttributes { + + obj.tunnelEncapsulationHolder = nil + obj.obj.TunnelEncapsulation = value.msg() + + return obj +} + +// description is TBD +// MpReach returns a BgpAttributesMpReachNlri +func (obj *bgpAttributes) MpReach() BgpAttributesMpReachNlri { + if obj.obj.MpReach == nil { + obj.obj.MpReach = NewBgpAttributesMpReachNlri().msg() + } + if obj.mpReachHolder == nil { + obj.mpReachHolder = &bgpAttributesMpReachNlri{obj: obj.obj.MpReach} + } + return obj.mpReachHolder +} + +// description is TBD +// MpReach returns a BgpAttributesMpReachNlri +func (obj *bgpAttributes) HasMpReach() bool { + return obj.obj.MpReach != nil +} + +// description is TBD +// SetMpReach sets the BgpAttributesMpReachNlri value in the BgpAttributes object +func (obj *bgpAttributes) SetMpReach(value BgpAttributesMpReachNlri) BgpAttributes { + + obj.mpReachHolder = nil + obj.obj.MpReach = value.msg() + + return obj +} + +// description is TBD +// MpUnreach returns a BgpAttributesMpUnreachNlri +func (obj *bgpAttributes) MpUnreach() BgpAttributesMpUnreachNlri { + if obj.obj.MpUnreach == nil { + obj.obj.MpUnreach = NewBgpAttributesMpUnreachNlri().msg() + } + if obj.mpUnreachHolder == nil { + obj.mpUnreachHolder = &bgpAttributesMpUnreachNlri{obj: obj.obj.MpUnreach} + } + return obj.mpUnreachHolder +} + +// description is TBD +// MpUnreach returns a BgpAttributesMpUnreachNlri +func (obj *bgpAttributes) HasMpUnreach() bool { + return obj.obj.MpUnreach != nil +} + +// description is TBD +// SetMpUnreach sets the BgpAttributesMpUnreachNlri value in the BgpAttributes object +func (obj *bgpAttributes) SetMpUnreach(value BgpAttributesMpUnreachNlri) BgpAttributes { + + obj.mpUnreachHolder = nil + obj.obj.MpUnreach = value.msg() + + return obj +} + +func (obj *bgpAttributes) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.OtherAttributes) != 0 { + + if set_default { + obj.OtherAttributes().clearHolderSlice() + for _, item := range obj.obj.OtherAttributes { + obj.OtherAttributes().appendHolderSlice(&bgpAttributesOtherAttribute{obj: item}) + } + } + for _, item := range obj.OtherAttributes().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.AsPath != nil { + + obj.AsPath().validateObj(vObj, set_default) + } + + if obj.obj.As4Path != nil { + + obj.As4Path().validateObj(vObj, set_default) + } + + if obj.obj.NextHop != nil { + + obj.NextHop().validateObj(vObj, set_default) + } + + if obj.obj.MultiExitDiscriminator != nil { + + obj.MultiExitDiscriminator().validateObj(vObj, set_default) + } + + if obj.obj.LocalPreference != nil { + + obj.LocalPreference().validateObj(vObj, set_default) + } + + if obj.obj.Aggregator != nil { + + obj.Aggregator().validateObj(vObj, set_default) + } + + if obj.obj.As4Aggregator != nil { + + obj.As4Aggregator().validateObj(vObj, set_default) + } + + if len(obj.obj.Community) != 0 { + + if set_default { + obj.Community().clearHolderSlice() + for _, item := range obj.obj.Community { + obj.Community().appendHolderSlice(&bgpAttributesCommunity{obj: item}) + } + } + for _, item := range obj.Community().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.OriginatorId != nil { + + obj.OriginatorId().validateObj(vObj, set_default) + } + + if obj.obj.ClusterIds != nil { + + err := obj.validateIpv4Slice(obj.ClusterIds()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributes.ClusterIds")) + } + + } + + if len(obj.obj.ExtendedCommunities) != 0 { + + if set_default { + obj.ExtendedCommunities().clearHolderSlice() + for _, item := range obj.obj.ExtendedCommunities { + obj.ExtendedCommunities().appendHolderSlice(&bgpExtendedCommunity{obj: item}) + } + } + for _, item := range obj.ExtendedCommunities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.TunnelEncapsulation != nil { + + obj.TunnelEncapsulation().validateObj(vObj, set_default) + } + + if obj.obj.MpReach != nil { + + obj.MpReach().validateObj(vObj, set_default) + } + + if obj.obj.MpUnreach != nil { + + obj.MpUnreach().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributes) setDefault() { + if obj.obj.Origin == nil { + obj.SetOrigin(BgpAttributesOrigin.INCOMPLETE) + + } + if obj.obj.IncludeAtomicAggregator == nil { + obj.SetIncludeAtomicAggregator(false) + } + +} diff --git a/gosnappi/bgp_attributes_aggregator.go b/gosnappi/bgp_attributes_aggregator.go new file mode 100644 index 00000000..a1add1f7 --- /dev/null +++ b/gosnappi/bgp_attributes_aggregator.go @@ -0,0 +1,478 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesAggregator ***** +type bgpAttributesAggregator struct { + validation + obj *otg.BgpAttributesAggregator + marshaller marshalBgpAttributesAggregator + unMarshaller unMarshalBgpAttributesAggregator +} + +func NewBgpAttributesAggregator() BgpAttributesAggregator { + obj := bgpAttributesAggregator{obj: &otg.BgpAttributesAggregator{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesAggregator) msg() *otg.BgpAttributesAggregator { + return obj.obj +} + +func (obj *bgpAttributesAggregator) setMsg(msg *otg.BgpAttributesAggregator) BgpAttributesAggregator { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesAggregator struct { + obj *bgpAttributesAggregator +} + +type marshalBgpAttributesAggregator interface { + // ToProto marshals BgpAttributesAggregator to protobuf object *otg.BgpAttributesAggregator + ToProto() (*otg.BgpAttributesAggregator, error) + // ToPbText marshals BgpAttributesAggregator to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesAggregator to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesAggregator to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesAggregator struct { + obj *bgpAttributesAggregator +} + +type unMarshalBgpAttributesAggregator interface { + // FromProto unmarshals BgpAttributesAggregator from protobuf object *otg.BgpAttributesAggregator + FromProto(msg *otg.BgpAttributesAggregator) (BgpAttributesAggregator, error) + // FromPbText unmarshals BgpAttributesAggregator from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesAggregator from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesAggregator from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesAggregator) Marshal() marshalBgpAttributesAggregator { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesAggregator{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesAggregator) Unmarshal() unMarshalBgpAttributesAggregator { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesAggregator{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesAggregator) ToProto() (*otg.BgpAttributesAggregator, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesAggregator) FromProto(msg *otg.BgpAttributesAggregator) (BgpAttributesAggregator, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesAggregator) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesAggregator) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesAggregator) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesAggregator) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesAggregator) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesAggregator) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesAggregator) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesAggregator) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesAggregator) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesAggregator) Clone() (BgpAttributesAggregator, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesAggregator() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesAggregator is optional AGGREGATOR attribute which maybe be added by a BGP speaker which performs route aggregation. +// When AGGREGATOR attribute is being sent to a new BGP speaker , the AS number is encoded as a 4 byte value. +// When AGGREGATOR attribute is being exchanged between a new and an old BGP speaker or between two old BGP speakers, +// the AS number is encoded as a 2 byte value. +// It contain the AS number and IP address of the speaker performing the aggregation. +type BgpAttributesAggregator interface { + Validation + // msg marshals BgpAttributesAggregator to protobuf object *otg.BgpAttributesAggregator + // and doesn't set defaults + msg() *otg.BgpAttributesAggregator + // setMsg unmarshals BgpAttributesAggregator from protobuf object *otg.BgpAttributesAggregator + // and doesn't set defaults + setMsg(*otg.BgpAttributesAggregator) BgpAttributesAggregator + // provides marshal interface + Marshal() marshalBgpAttributesAggregator + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesAggregator + // validate validates BgpAttributesAggregator + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesAggregator, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpAttributesAggregatorChoiceEnum, set in BgpAttributesAggregator + Choice() BgpAttributesAggregatorChoiceEnum + // setChoice assigns BgpAttributesAggregatorChoiceEnum provided by user to BgpAttributesAggregator + setChoice(value BgpAttributesAggregatorChoiceEnum) BgpAttributesAggregator + // HasChoice checks if Choice has been set in BgpAttributesAggregator + HasChoice() bool + // FourByteAs returns uint32, set in BgpAttributesAggregator. + FourByteAs() uint32 + // SetFourByteAs assigns uint32 provided by user to BgpAttributesAggregator + SetFourByteAs(value uint32) BgpAttributesAggregator + // HasFourByteAs checks if FourByteAs has been set in BgpAttributesAggregator + HasFourByteAs() bool + // TwoByteAs returns uint32, set in BgpAttributesAggregator. + TwoByteAs() uint32 + // SetTwoByteAs assigns uint32 provided by user to BgpAttributesAggregator + SetTwoByteAs(value uint32) BgpAttributesAggregator + // HasTwoByteAs checks if TwoByteAs has been set in BgpAttributesAggregator + HasTwoByteAs() bool + // Ipv4Address returns string, set in BgpAttributesAggregator. + Ipv4Address() string + // SetIpv4Address assigns string provided by user to BgpAttributesAggregator + SetIpv4Address(value string) BgpAttributesAggregator + // HasIpv4Address checks if Ipv4Address has been set in BgpAttributesAggregator + HasIpv4Address() bool +} + +type BgpAttributesAggregatorChoiceEnum string + +// Enum of Choice on BgpAttributesAggregator +var BgpAttributesAggregatorChoice = struct { + FOUR_BYTE_AS BgpAttributesAggregatorChoiceEnum + TWO_BYTE_AS BgpAttributesAggregatorChoiceEnum +}{ + FOUR_BYTE_AS: BgpAttributesAggregatorChoiceEnum("four_byte_as"), + TWO_BYTE_AS: BgpAttributesAggregatorChoiceEnum("two_byte_as"), +} + +func (obj *bgpAttributesAggregator) Choice() BgpAttributesAggregatorChoiceEnum { + return BgpAttributesAggregatorChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *bgpAttributesAggregator) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpAttributesAggregator) setChoice(value BgpAttributesAggregatorChoiceEnum) BgpAttributesAggregator { + intValue, ok := otg.BgpAttributesAggregator_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAttributesAggregatorChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpAttributesAggregator_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.TwoByteAs = nil + obj.obj.FourByteAs = nil + + if value == BgpAttributesAggregatorChoice.FOUR_BYTE_AS { + defaultValue := uint32(65536) + obj.obj.FourByteAs = &defaultValue + } + + if value == BgpAttributesAggregatorChoice.TWO_BYTE_AS { + defaultValue := uint32(1) + obj.obj.TwoByteAs = &defaultValue + } + + return obj +} + +// The value of the 4 byte AS number of the BGP speaker which aggregated the route. If the value of the AS number is less than 2 octets ( 65535 or less), the AS4_AGGREGATOR object should not be sent. +// FourByteAs returns a uint32 +func (obj *bgpAttributesAggregator) FourByteAs() uint32 { + + if obj.obj.FourByteAs == nil { + obj.setChoice(BgpAttributesAggregatorChoice.FOUR_BYTE_AS) + } + + return *obj.obj.FourByteAs + +} + +// The value of the 4 byte AS number of the BGP speaker which aggregated the route. If the value of the AS number is less than 2 octets ( 65535 or less), the AS4_AGGREGATOR object should not be sent. +// FourByteAs returns a uint32 +func (obj *bgpAttributesAggregator) HasFourByteAs() bool { + return obj.obj.FourByteAs != nil +} + +// The value of the 4 byte AS number of the BGP speaker which aggregated the route. If the value of the AS number is less than 2 octets ( 65535 or less), the AS4_AGGREGATOR object should not be sent. +// SetFourByteAs sets the uint32 value in the BgpAttributesAggregator object +func (obj *bgpAttributesAggregator) SetFourByteAs(value uint32) BgpAttributesAggregator { + obj.setChoice(BgpAttributesAggregatorChoice.FOUR_BYTE_AS) + obj.obj.FourByteAs = &value + return obj +} + +// The value of the 2 byte AS number of the BGP speaker which aggregated the route. +// TwoByteAs returns a uint32 +func (obj *bgpAttributesAggregator) TwoByteAs() uint32 { + + if obj.obj.TwoByteAs == nil { + obj.setChoice(BgpAttributesAggregatorChoice.TWO_BYTE_AS) + } + + return *obj.obj.TwoByteAs + +} + +// The value of the 2 byte AS number of the BGP speaker which aggregated the route. +// TwoByteAs returns a uint32 +func (obj *bgpAttributesAggregator) HasTwoByteAs() bool { + return obj.obj.TwoByteAs != nil +} + +// The value of the 2 byte AS number of the BGP speaker which aggregated the route. +// SetTwoByteAs sets the uint32 value in the BgpAttributesAggregator object +func (obj *bgpAttributesAggregator) SetTwoByteAs(value uint32) BgpAttributesAggregator { + obj.setChoice(BgpAttributesAggregatorChoice.TWO_BYTE_AS) + obj.obj.TwoByteAs = &value + return obj +} + +// The IPv4 address of the BGP speaker which aggregated the route. +// Ipv4Address returns a string +func (obj *bgpAttributesAggregator) Ipv4Address() string { + + return *obj.obj.Ipv4Address + +} + +// The IPv4 address of the BGP speaker which aggregated the route. +// Ipv4Address returns a string +func (obj *bgpAttributesAggregator) HasIpv4Address() bool { + return obj.obj.Ipv4Address != nil +} + +// The IPv4 address of the BGP speaker which aggregated the route. +// SetIpv4Address sets the string value in the BgpAttributesAggregator object +func (obj *bgpAttributesAggregator) SetIpv4Address(value string) BgpAttributesAggregator { + + obj.obj.Ipv4Address = &value + return obj +} + +func (obj *bgpAttributesAggregator) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.TwoByteAs != nil { + + if *obj.obj.TwoByteAs > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesAggregator.TwoByteAs <= 65535 but Got %d", *obj.obj.TwoByteAs)) + } + + } + + if obj.obj.Ipv4Address != nil { + + err := obj.validateIpv4(obj.Ipv4Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesAggregator.Ipv4Address")) + } + + } + +} + +func (obj *bgpAttributesAggregator) setDefault() { + var choices_set int = 0 + var choice BgpAttributesAggregatorChoiceEnum + + if obj.obj.FourByteAs != nil { + choices_set += 1 + choice = BgpAttributesAggregatorChoice.FOUR_BYTE_AS + } + + if obj.obj.TwoByteAs != nil { + choices_set += 1 + choice = BgpAttributesAggregatorChoice.TWO_BYTE_AS + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(BgpAttributesAggregatorChoice.FOUR_BYTE_AS) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpAttributesAggregator") + } + } else { + intVal := otg.BgpAttributesAggregator_Choice_Enum_value[string(choice)] + enumValue := otg.BgpAttributesAggregator_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + + if obj.obj.Ipv4Address == nil { + obj.SetIpv4Address("0.0.0.0") + } + +} diff --git a/gosnappi/bgp_attributes_as4_aggregator.go b/gosnappi/bgp_attributes_as4_aggregator.go new file mode 100644 index 00000000..a9683c20 --- /dev/null +++ b/gosnappi/bgp_attributes_as4_aggregator.go @@ -0,0 +1,349 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesAs4Aggregator ***** +type bgpAttributesAs4Aggregator struct { + validation + obj *otg.BgpAttributesAs4Aggregator + marshaller marshalBgpAttributesAs4Aggregator + unMarshaller unMarshalBgpAttributesAs4Aggregator +} + +func NewBgpAttributesAs4Aggregator() BgpAttributesAs4Aggregator { + obj := bgpAttributesAs4Aggregator{obj: &otg.BgpAttributesAs4Aggregator{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesAs4Aggregator) msg() *otg.BgpAttributesAs4Aggregator { + return obj.obj +} + +func (obj *bgpAttributesAs4Aggregator) setMsg(msg *otg.BgpAttributesAs4Aggregator) BgpAttributesAs4Aggregator { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesAs4Aggregator struct { + obj *bgpAttributesAs4Aggregator +} + +type marshalBgpAttributesAs4Aggregator interface { + // ToProto marshals BgpAttributesAs4Aggregator to protobuf object *otg.BgpAttributesAs4Aggregator + ToProto() (*otg.BgpAttributesAs4Aggregator, error) + // ToPbText marshals BgpAttributesAs4Aggregator to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesAs4Aggregator to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesAs4Aggregator to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesAs4Aggregator struct { + obj *bgpAttributesAs4Aggregator +} + +type unMarshalBgpAttributesAs4Aggregator interface { + // FromProto unmarshals BgpAttributesAs4Aggregator from protobuf object *otg.BgpAttributesAs4Aggregator + FromProto(msg *otg.BgpAttributesAs4Aggregator) (BgpAttributesAs4Aggregator, error) + // FromPbText unmarshals BgpAttributesAs4Aggregator from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesAs4Aggregator from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesAs4Aggregator from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesAs4Aggregator) Marshal() marshalBgpAttributesAs4Aggregator { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesAs4Aggregator{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesAs4Aggregator) Unmarshal() unMarshalBgpAttributesAs4Aggregator { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesAs4Aggregator{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesAs4Aggregator) ToProto() (*otg.BgpAttributesAs4Aggregator, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesAs4Aggregator) FromProto(msg *otg.BgpAttributesAs4Aggregator) (BgpAttributesAs4Aggregator, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesAs4Aggregator) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesAs4Aggregator) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesAs4Aggregator) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesAs4Aggregator) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesAs4Aggregator) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesAs4Aggregator) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesAs4Aggregator) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesAs4Aggregator) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesAs4Aggregator) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesAs4Aggregator) Clone() (BgpAttributesAs4Aggregator, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesAs4Aggregator() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesAs4Aggregator is optional AS4_AGGREGATOR attribute which maybe be added by a BGP speaker in one of two cases: +// - If it is a new BGP speaker speaking to an old BGP speaker and needs to send a 4 byte value for the AS number of the BGP route aggregator. +// - If it is a old BGP speaker speaking to a new BGP speaker and has to transparently forward a received AS4_AGGREGATOR from some other peer. +// Its usage is described in RFC4893. +type BgpAttributesAs4Aggregator interface { + Validation + // msg marshals BgpAttributesAs4Aggregator to protobuf object *otg.BgpAttributesAs4Aggregator + // and doesn't set defaults + msg() *otg.BgpAttributesAs4Aggregator + // setMsg unmarshals BgpAttributesAs4Aggregator from protobuf object *otg.BgpAttributesAs4Aggregator + // and doesn't set defaults + setMsg(*otg.BgpAttributesAs4Aggregator) BgpAttributesAs4Aggregator + // provides marshal interface + Marshal() marshalBgpAttributesAs4Aggregator + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesAs4Aggregator + // validate validates BgpAttributesAs4Aggregator + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesAs4Aggregator, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // AsNum returns uint32, set in BgpAttributesAs4Aggregator. + AsNum() uint32 + // SetAsNum assigns uint32 provided by user to BgpAttributesAs4Aggregator + SetAsNum(value uint32) BgpAttributesAs4Aggregator + // HasAsNum checks if AsNum has been set in BgpAttributesAs4Aggregator + HasAsNum() bool + // Ipv4Address returns string, set in BgpAttributesAs4Aggregator. + Ipv4Address() string + // SetIpv4Address assigns string provided by user to BgpAttributesAs4Aggregator + SetIpv4Address(value string) BgpAttributesAs4Aggregator + // HasIpv4Address checks if Ipv4Address has been set in BgpAttributesAs4Aggregator + HasIpv4Address() bool +} + +// The value of the 4 byte AS number of the BGP speaker which aggregated the route. +// AsNum returns a uint32 +func (obj *bgpAttributesAs4Aggregator) AsNum() uint32 { + + return *obj.obj.AsNum + +} + +// The value of the 4 byte AS number of the BGP speaker which aggregated the route. +// AsNum returns a uint32 +func (obj *bgpAttributesAs4Aggregator) HasAsNum() bool { + return obj.obj.AsNum != nil +} + +// The value of the 4 byte AS number of the BGP speaker which aggregated the route. +// SetAsNum sets the uint32 value in the BgpAttributesAs4Aggregator object +func (obj *bgpAttributesAs4Aggregator) SetAsNum(value uint32) BgpAttributesAs4Aggregator { + + obj.obj.AsNum = &value + return obj +} + +// The IPv4 address of the BGP speaker which aggregated the route. +// Ipv4Address returns a string +func (obj *bgpAttributesAs4Aggregator) Ipv4Address() string { + + return *obj.obj.Ipv4Address + +} + +// The IPv4 address of the BGP speaker which aggregated the route. +// Ipv4Address returns a string +func (obj *bgpAttributesAs4Aggregator) HasIpv4Address() bool { + return obj.obj.Ipv4Address != nil +} + +// The IPv4 address of the BGP speaker which aggregated the route. +// SetIpv4Address sets the string value in the BgpAttributesAs4Aggregator object +func (obj *bgpAttributesAs4Aggregator) SetIpv4Address(value string) BgpAttributesAs4Aggregator { + + obj.obj.Ipv4Address = &value + return obj +} + +func (obj *bgpAttributesAs4Aggregator) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv4Address != nil { + + err := obj.validateIpv4(obj.Ipv4Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesAs4Aggregator.Ipv4Address")) + } + + } + +} + +func (obj *bgpAttributesAs4Aggregator) setDefault() { + if obj.obj.Ipv4Address == nil { + obj.SetIpv4Address("0.0.0.0") + } + +} diff --git a/gosnappi/bgp_attributes_as4_path.go b/gosnappi/bgp_attributes_as4_path.go new file mode 100644 index 00000000..637b2471 --- /dev/null +++ b/gosnappi/bgp_attributes_as4_path.go @@ -0,0 +1,400 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesAs4Path ***** +type bgpAttributesAs4Path struct { + validation + obj *otg.BgpAttributesAs4Path + marshaller marshalBgpAttributesAs4Path + unMarshaller unMarshalBgpAttributesAs4Path + segmentsHolder BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter +} + +func NewBgpAttributesAs4Path() BgpAttributesAs4Path { + obj := bgpAttributesAs4Path{obj: &otg.BgpAttributesAs4Path{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesAs4Path) msg() *otg.BgpAttributesAs4Path { + return obj.obj +} + +func (obj *bgpAttributesAs4Path) setMsg(msg *otg.BgpAttributesAs4Path) BgpAttributesAs4Path { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesAs4Path struct { + obj *bgpAttributesAs4Path +} + +type marshalBgpAttributesAs4Path interface { + // ToProto marshals BgpAttributesAs4Path to protobuf object *otg.BgpAttributesAs4Path + ToProto() (*otg.BgpAttributesAs4Path, error) + // ToPbText marshals BgpAttributesAs4Path to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesAs4Path to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesAs4Path to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesAs4Path struct { + obj *bgpAttributesAs4Path +} + +type unMarshalBgpAttributesAs4Path interface { + // FromProto unmarshals BgpAttributesAs4Path from protobuf object *otg.BgpAttributesAs4Path + FromProto(msg *otg.BgpAttributesAs4Path) (BgpAttributesAs4Path, error) + // FromPbText unmarshals BgpAttributesAs4Path from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesAs4Path from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesAs4Path from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesAs4Path) Marshal() marshalBgpAttributesAs4Path { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesAs4Path{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesAs4Path) Unmarshal() unMarshalBgpAttributesAs4Path { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesAs4Path{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesAs4Path) ToProto() (*otg.BgpAttributesAs4Path, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesAs4Path) FromProto(msg *otg.BgpAttributesAs4Path) (BgpAttributesAs4Path, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesAs4Path) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesAs4Path) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesAs4Path) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesAs4Path) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesAs4Path) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesAs4Path) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesAs4Path) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesAs4Path) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesAs4Path) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesAs4Path) Clone() (BgpAttributesAs4Path, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesAs4Path() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesAs4Path) setNil() { + obj.segmentsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesAs4Path is the AS4_PATH attribute identifies the autonomous systems through which routing information +// carried in this UPDATE message has passed. +// This contains the configuration of how to include the Local AS in the AS path +// attribute of the MP REACH NLRI. It also contains optional configuration of +// additional AS Path Segments that can be included in the AS Path attribute. +// The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that +// a routing information passes through to reach the destination. +// AS4_PATH is only exchanged in two scenarios: +// - When an old BGP speaker has to forward a received AS4_PATH containing 4 byte AS numbers to new BGP speaker. +// - When a new BGP speaker is connected to an old BGP speaker and has to propagate 4 byte AS numbers via the old BGP speaker. +// Its usage is described in RFC4893. +type BgpAttributesAs4Path interface { + Validation + // msg marshals BgpAttributesAs4Path to protobuf object *otg.BgpAttributesAs4Path + // and doesn't set defaults + msg() *otg.BgpAttributesAs4Path + // setMsg unmarshals BgpAttributesAs4Path from protobuf object *otg.BgpAttributesAs4Path + // and doesn't set defaults + setMsg(*otg.BgpAttributesAs4Path) BgpAttributesAs4Path + // provides marshal interface + Marshal() marshalBgpAttributesAs4Path + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesAs4Path + // validate validates BgpAttributesAs4Path + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesAs4Path, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Segments returns BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIterIter, set in BgpAttributesAs4Path + Segments() BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter + setNil() +} + +// The AS path segments containing 4 byte AS numbers to be added in the AS4_PATH attribute. +// Segments returns a []BgpAttributesFourByteAsPathSegment +func (obj *bgpAttributesAs4Path) Segments() BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter { + if len(obj.obj.Segments) == 0 { + obj.obj.Segments = []*otg.BgpAttributesFourByteAsPathSegment{} + } + if obj.segmentsHolder == nil { + obj.segmentsHolder = newBgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter(&obj.obj.Segments).setMsg(obj) + } + return obj.segmentsHolder +} + +type bgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter struct { + obj *bgpAttributesAs4Path + bgpAttributesFourByteAsPathSegmentSlice []BgpAttributesFourByteAsPathSegment + fieldPtr *[]*otg.BgpAttributesFourByteAsPathSegment +} + +func newBgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter(ptr *[]*otg.BgpAttributesFourByteAsPathSegment) BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter { + return &bgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter{fieldPtr: ptr} +} + +type BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter interface { + setMsg(*bgpAttributesAs4Path) BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter + Items() []BgpAttributesFourByteAsPathSegment + Add() BgpAttributesFourByteAsPathSegment + Append(items ...BgpAttributesFourByteAsPathSegment) BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter + Set(index int, newObj BgpAttributesFourByteAsPathSegment) BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter + Clear() BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter + clearHolderSlice() BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter + appendHolderSlice(item BgpAttributesFourByteAsPathSegment) BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter +} + +func (obj *bgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter) setMsg(msg *bgpAttributesAs4Path) BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpAttributesFourByteAsPathSegment{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter) Items() []BgpAttributesFourByteAsPathSegment { + return obj.bgpAttributesFourByteAsPathSegmentSlice +} + +func (obj *bgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter) Add() BgpAttributesFourByteAsPathSegment { + newObj := &otg.BgpAttributesFourByteAsPathSegment{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpAttributesFourByteAsPathSegment{obj: newObj} + newLibObj.setDefault() + obj.bgpAttributesFourByteAsPathSegmentSlice = append(obj.bgpAttributesFourByteAsPathSegmentSlice, newLibObj) + return newLibObj +} + +func (obj *bgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter) Append(items ...BgpAttributesFourByteAsPathSegment) BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpAttributesFourByteAsPathSegmentSlice = append(obj.bgpAttributesFourByteAsPathSegmentSlice, item) + } + return obj +} + +func (obj *bgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter) Set(index int, newObj BgpAttributesFourByteAsPathSegment) BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpAttributesFourByteAsPathSegmentSlice[index] = newObj + return obj +} +func (obj *bgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter) Clear() BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpAttributesFourByteAsPathSegment{} + obj.bgpAttributesFourByteAsPathSegmentSlice = []BgpAttributesFourByteAsPathSegment{} + } + return obj +} +func (obj *bgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter) clearHolderSlice() BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter { + if len(obj.bgpAttributesFourByteAsPathSegmentSlice) > 0 { + obj.bgpAttributesFourByteAsPathSegmentSlice = []BgpAttributesFourByteAsPathSegment{} + } + return obj +} +func (obj *bgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter) appendHolderSlice(item BgpAttributesFourByteAsPathSegment) BgpAttributesAs4PathBgpAttributesFourByteAsPathSegmentIter { + obj.bgpAttributesFourByteAsPathSegmentSlice = append(obj.bgpAttributesFourByteAsPathSegmentSlice, item) + return obj +} + +func (obj *bgpAttributesAs4Path) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Segments) != 0 { + + if set_default { + obj.Segments().clearHolderSlice() + for _, item := range obj.obj.Segments { + obj.Segments().appendHolderSlice(&bgpAttributesFourByteAsPathSegment{obj: item}) + } + } + for _, item := range obj.Segments().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpAttributesAs4Path) setDefault() { + +} diff --git a/gosnappi/bgp_attributes_as_path.go b/gosnappi/bgp_attributes_as_path.go new file mode 100644 index 00000000..6c68e583 --- /dev/null +++ b/gosnappi/bgp_attributes_as_path.go @@ -0,0 +1,465 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesAsPath ***** +type bgpAttributesAsPath struct { + validation + obj *otg.BgpAttributesAsPath + marshaller marshalBgpAttributesAsPath + unMarshaller unMarshalBgpAttributesAsPath + fourByteAsPathHolder BgpAttributesAsPathFourByteAsPath + twoByteAsPathHolder BgpAttributesAsPathTwoByteAsPath +} + +func NewBgpAttributesAsPath() BgpAttributesAsPath { + obj := bgpAttributesAsPath{obj: &otg.BgpAttributesAsPath{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesAsPath) msg() *otg.BgpAttributesAsPath { + return obj.obj +} + +func (obj *bgpAttributesAsPath) setMsg(msg *otg.BgpAttributesAsPath) BgpAttributesAsPath { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesAsPath struct { + obj *bgpAttributesAsPath +} + +type marshalBgpAttributesAsPath interface { + // ToProto marshals BgpAttributesAsPath to protobuf object *otg.BgpAttributesAsPath + ToProto() (*otg.BgpAttributesAsPath, error) + // ToPbText marshals BgpAttributesAsPath to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesAsPath to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesAsPath to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesAsPath struct { + obj *bgpAttributesAsPath +} + +type unMarshalBgpAttributesAsPath interface { + // FromProto unmarshals BgpAttributesAsPath from protobuf object *otg.BgpAttributesAsPath + FromProto(msg *otg.BgpAttributesAsPath) (BgpAttributesAsPath, error) + // FromPbText unmarshals BgpAttributesAsPath from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesAsPath from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesAsPath from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesAsPath) Marshal() marshalBgpAttributesAsPath { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesAsPath{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesAsPath) Unmarshal() unMarshalBgpAttributesAsPath { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesAsPath{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesAsPath) ToProto() (*otg.BgpAttributesAsPath, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesAsPath) FromProto(msg *otg.BgpAttributesAsPath) (BgpAttributesAsPath, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesAsPath) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesAsPath) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesAsPath) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesAsPath) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesAsPath) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesAsPath) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesAsPath) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesAsPath) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesAsPath) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesAsPath) Clone() (BgpAttributesAsPath, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesAsPath() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesAsPath) setNil() { + obj.fourByteAsPathHolder = nil + obj.twoByteAsPathHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesAsPath is the AS_PATH attribute identifies the autonomous systems through which routing information +// carried in this UPDATE message has passed. +// This contains the configuration of how to include the Local AS in the AS path +// attribute of the MP REACH NLRI. It also contains optional configuration of +// additional AS Path Segments that can be included in the AS Path attribute. +// The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that +// a routing information passes through to reach the destination. +// There are two modes in which AS numbers can be encoded in the AS Path Segments +// - When the AS Path is being exchanged between old and new BGP speakers or between two old BGP speakers , the AS numbers are encoded as 2 byte values. +// - When the AS Path is being exchanged between two new BGP speakers supporting 4 byte AS , the AS numbers are encoded as 4 byte values. +type BgpAttributesAsPath interface { + Validation + // msg marshals BgpAttributesAsPath to protobuf object *otg.BgpAttributesAsPath + // and doesn't set defaults + msg() *otg.BgpAttributesAsPath + // setMsg unmarshals BgpAttributesAsPath from protobuf object *otg.BgpAttributesAsPath + // and doesn't set defaults + setMsg(*otg.BgpAttributesAsPath) BgpAttributesAsPath + // provides marshal interface + Marshal() marshalBgpAttributesAsPath + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesAsPath + // validate validates BgpAttributesAsPath + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesAsPath, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpAttributesAsPathChoiceEnum, set in BgpAttributesAsPath + Choice() BgpAttributesAsPathChoiceEnum + // setChoice assigns BgpAttributesAsPathChoiceEnum provided by user to BgpAttributesAsPath + setChoice(value BgpAttributesAsPathChoiceEnum) BgpAttributesAsPath + // HasChoice checks if Choice has been set in BgpAttributesAsPath + HasChoice() bool + // FourByteAsPath returns BgpAttributesAsPathFourByteAsPath, set in BgpAttributesAsPath. + // BgpAttributesAsPathFourByteAsPath is aS Paths with 4 byte AS numbers can be exchanged only if both BGP speakers support 4 byte AS number extensions. + FourByteAsPath() BgpAttributesAsPathFourByteAsPath + // SetFourByteAsPath assigns BgpAttributesAsPathFourByteAsPath provided by user to BgpAttributesAsPath. + // BgpAttributesAsPathFourByteAsPath is aS Paths with 4 byte AS numbers can be exchanged only if both BGP speakers support 4 byte AS number extensions. + SetFourByteAsPath(value BgpAttributesAsPathFourByteAsPath) BgpAttributesAsPath + // HasFourByteAsPath checks if FourByteAsPath has been set in BgpAttributesAsPath + HasFourByteAsPath() bool + // TwoByteAsPath returns BgpAttributesAsPathTwoByteAsPath, set in BgpAttributesAsPath. + // BgpAttributesAsPathTwoByteAsPath is aS Paths with 2 byte AS numbers is used when any of the two scenarios occur : + // - An old BGP speaker and new BGP speaker are sending BGP Updates to one another. + // - Two old BGP speakers are sending BGP Updates to one another. + TwoByteAsPath() BgpAttributesAsPathTwoByteAsPath + // SetTwoByteAsPath assigns BgpAttributesAsPathTwoByteAsPath provided by user to BgpAttributesAsPath. + // BgpAttributesAsPathTwoByteAsPath is aS Paths with 2 byte AS numbers is used when any of the two scenarios occur : + // - An old BGP speaker and new BGP speaker are sending BGP Updates to one another. + // - Two old BGP speakers are sending BGP Updates to one another. + SetTwoByteAsPath(value BgpAttributesAsPathTwoByteAsPath) BgpAttributesAsPath + // HasTwoByteAsPath checks if TwoByteAsPath has been set in BgpAttributesAsPath + HasTwoByteAsPath() bool + setNil() +} + +type BgpAttributesAsPathChoiceEnum string + +// Enum of Choice on BgpAttributesAsPath +var BgpAttributesAsPathChoice = struct { + FOUR_BYTE_AS_PATH BgpAttributesAsPathChoiceEnum + TWO_BYTE_AS_PATH BgpAttributesAsPathChoiceEnum +}{ + FOUR_BYTE_AS_PATH: BgpAttributesAsPathChoiceEnum("four_byte_as_path"), + TWO_BYTE_AS_PATH: BgpAttributesAsPathChoiceEnum("two_byte_as_path"), +} + +func (obj *bgpAttributesAsPath) Choice() BgpAttributesAsPathChoiceEnum { + return BgpAttributesAsPathChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *bgpAttributesAsPath) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpAttributesAsPath) setChoice(value BgpAttributesAsPathChoiceEnum) BgpAttributesAsPath { + intValue, ok := otg.BgpAttributesAsPath_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAttributesAsPathChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpAttributesAsPath_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.TwoByteAsPath = nil + obj.twoByteAsPathHolder = nil + obj.obj.FourByteAsPath = nil + obj.fourByteAsPathHolder = nil + + if value == BgpAttributesAsPathChoice.FOUR_BYTE_AS_PATH { + obj.obj.FourByteAsPath = NewBgpAttributesAsPathFourByteAsPath().msg() + } + + if value == BgpAttributesAsPathChoice.TWO_BYTE_AS_PATH { + obj.obj.TwoByteAsPath = NewBgpAttributesAsPathTwoByteAsPath().msg() + } + + return obj +} + +// description is TBD +// FourByteAsPath returns a BgpAttributesAsPathFourByteAsPath +func (obj *bgpAttributesAsPath) FourByteAsPath() BgpAttributesAsPathFourByteAsPath { + if obj.obj.FourByteAsPath == nil { + obj.setChoice(BgpAttributesAsPathChoice.FOUR_BYTE_AS_PATH) + } + if obj.fourByteAsPathHolder == nil { + obj.fourByteAsPathHolder = &bgpAttributesAsPathFourByteAsPath{obj: obj.obj.FourByteAsPath} + } + return obj.fourByteAsPathHolder +} + +// description is TBD +// FourByteAsPath returns a BgpAttributesAsPathFourByteAsPath +func (obj *bgpAttributesAsPath) HasFourByteAsPath() bool { + return obj.obj.FourByteAsPath != nil +} + +// description is TBD +// SetFourByteAsPath sets the BgpAttributesAsPathFourByteAsPath value in the BgpAttributesAsPath object +func (obj *bgpAttributesAsPath) SetFourByteAsPath(value BgpAttributesAsPathFourByteAsPath) BgpAttributesAsPath { + obj.setChoice(BgpAttributesAsPathChoice.FOUR_BYTE_AS_PATH) + obj.fourByteAsPathHolder = nil + obj.obj.FourByteAsPath = value.msg() + + return obj +} + +// description is TBD +// TwoByteAsPath returns a BgpAttributesAsPathTwoByteAsPath +func (obj *bgpAttributesAsPath) TwoByteAsPath() BgpAttributesAsPathTwoByteAsPath { + if obj.obj.TwoByteAsPath == nil { + obj.setChoice(BgpAttributesAsPathChoice.TWO_BYTE_AS_PATH) + } + if obj.twoByteAsPathHolder == nil { + obj.twoByteAsPathHolder = &bgpAttributesAsPathTwoByteAsPath{obj: obj.obj.TwoByteAsPath} + } + return obj.twoByteAsPathHolder +} + +// description is TBD +// TwoByteAsPath returns a BgpAttributesAsPathTwoByteAsPath +func (obj *bgpAttributesAsPath) HasTwoByteAsPath() bool { + return obj.obj.TwoByteAsPath != nil +} + +// description is TBD +// SetTwoByteAsPath sets the BgpAttributesAsPathTwoByteAsPath value in the BgpAttributesAsPath object +func (obj *bgpAttributesAsPath) SetTwoByteAsPath(value BgpAttributesAsPathTwoByteAsPath) BgpAttributesAsPath { + obj.setChoice(BgpAttributesAsPathChoice.TWO_BYTE_AS_PATH) + obj.twoByteAsPathHolder = nil + obj.obj.TwoByteAsPath = value.msg() + + return obj +} + +func (obj *bgpAttributesAsPath) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.FourByteAsPath != nil { + + obj.FourByteAsPath().validateObj(vObj, set_default) + } + + if obj.obj.TwoByteAsPath != nil { + + obj.TwoByteAsPath().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesAsPath) setDefault() { + var choices_set int = 0 + var choice BgpAttributesAsPathChoiceEnum + + if obj.obj.FourByteAsPath != nil { + choices_set += 1 + choice = BgpAttributesAsPathChoice.FOUR_BYTE_AS_PATH + } + + if obj.obj.TwoByteAsPath != nil { + choices_set += 1 + choice = BgpAttributesAsPathChoice.TWO_BYTE_AS_PATH + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(BgpAttributesAsPathChoice.FOUR_BYTE_AS_PATH) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpAttributesAsPath") + } + } else { + intVal := otg.BgpAttributesAsPath_Choice_Enum_value[string(choice)] + enumValue := otg.BgpAttributesAsPath_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_attributes_as_path_four_byte_as_path.go b/gosnappi/bgp_attributes_as_path_four_byte_as_path.go new file mode 100644 index 00000000..1ef8a65e --- /dev/null +++ b/gosnappi/bgp_attributes_as_path_four_byte_as_path.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesAsPathFourByteAsPath ***** +type bgpAttributesAsPathFourByteAsPath struct { + validation + obj *otg.BgpAttributesAsPathFourByteAsPath + marshaller marshalBgpAttributesAsPathFourByteAsPath + unMarshaller unMarshalBgpAttributesAsPathFourByteAsPath + segmentsHolder BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter +} + +func NewBgpAttributesAsPathFourByteAsPath() BgpAttributesAsPathFourByteAsPath { + obj := bgpAttributesAsPathFourByteAsPath{obj: &otg.BgpAttributesAsPathFourByteAsPath{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesAsPathFourByteAsPath) msg() *otg.BgpAttributesAsPathFourByteAsPath { + return obj.obj +} + +func (obj *bgpAttributesAsPathFourByteAsPath) setMsg(msg *otg.BgpAttributesAsPathFourByteAsPath) BgpAttributesAsPathFourByteAsPath { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesAsPathFourByteAsPath struct { + obj *bgpAttributesAsPathFourByteAsPath +} + +type marshalBgpAttributesAsPathFourByteAsPath interface { + // ToProto marshals BgpAttributesAsPathFourByteAsPath to protobuf object *otg.BgpAttributesAsPathFourByteAsPath + ToProto() (*otg.BgpAttributesAsPathFourByteAsPath, error) + // ToPbText marshals BgpAttributesAsPathFourByteAsPath to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesAsPathFourByteAsPath to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesAsPathFourByteAsPath to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesAsPathFourByteAsPath struct { + obj *bgpAttributesAsPathFourByteAsPath +} + +type unMarshalBgpAttributesAsPathFourByteAsPath interface { + // FromProto unmarshals BgpAttributesAsPathFourByteAsPath from protobuf object *otg.BgpAttributesAsPathFourByteAsPath + FromProto(msg *otg.BgpAttributesAsPathFourByteAsPath) (BgpAttributesAsPathFourByteAsPath, error) + // FromPbText unmarshals BgpAttributesAsPathFourByteAsPath from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesAsPathFourByteAsPath from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesAsPathFourByteAsPath from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesAsPathFourByteAsPath) Marshal() marshalBgpAttributesAsPathFourByteAsPath { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesAsPathFourByteAsPath{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesAsPathFourByteAsPath) Unmarshal() unMarshalBgpAttributesAsPathFourByteAsPath { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesAsPathFourByteAsPath{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesAsPathFourByteAsPath) ToProto() (*otg.BgpAttributesAsPathFourByteAsPath, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesAsPathFourByteAsPath) FromProto(msg *otg.BgpAttributesAsPathFourByteAsPath) (BgpAttributesAsPathFourByteAsPath, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesAsPathFourByteAsPath) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesAsPathFourByteAsPath) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesAsPathFourByteAsPath) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesAsPathFourByteAsPath) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesAsPathFourByteAsPath) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesAsPathFourByteAsPath) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesAsPathFourByteAsPath) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesAsPathFourByteAsPath) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesAsPathFourByteAsPath) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesAsPathFourByteAsPath) Clone() (BgpAttributesAsPathFourByteAsPath, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesAsPathFourByteAsPath() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesAsPathFourByteAsPath) setNil() { + obj.segmentsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesAsPathFourByteAsPath is aS Paths with 4 byte AS numbers can be exchanged only if both BGP speakers support 4 byte AS number extensions. +type BgpAttributesAsPathFourByteAsPath interface { + Validation + // msg marshals BgpAttributesAsPathFourByteAsPath to protobuf object *otg.BgpAttributesAsPathFourByteAsPath + // and doesn't set defaults + msg() *otg.BgpAttributesAsPathFourByteAsPath + // setMsg unmarshals BgpAttributesAsPathFourByteAsPath from protobuf object *otg.BgpAttributesAsPathFourByteAsPath + // and doesn't set defaults + setMsg(*otg.BgpAttributesAsPathFourByteAsPath) BgpAttributesAsPathFourByteAsPath + // provides marshal interface + Marshal() marshalBgpAttributesAsPathFourByteAsPath + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesAsPathFourByteAsPath + // validate validates BgpAttributesAsPathFourByteAsPath + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesAsPathFourByteAsPath, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Segments returns BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIterIter, set in BgpAttributesAsPathFourByteAsPath + Segments() BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter + setNil() +} + +// The AS path segments containing 4 byte AS numbers to be added in the AS Path attribute. By default, an empty AS path should always be included and for EBGP at minimum the local AS number should be present in the AS Path. +// Segments returns a []BgpAttributesFourByteAsPathSegment +func (obj *bgpAttributesAsPathFourByteAsPath) Segments() BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter { + if len(obj.obj.Segments) == 0 { + obj.obj.Segments = []*otg.BgpAttributesFourByteAsPathSegment{} + } + if obj.segmentsHolder == nil { + obj.segmentsHolder = newBgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter(&obj.obj.Segments).setMsg(obj) + } + return obj.segmentsHolder +} + +type bgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter struct { + obj *bgpAttributesAsPathFourByteAsPath + bgpAttributesFourByteAsPathSegmentSlice []BgpAttributesFourByteAsPathSegment + fieldPtr *[]*otg.BgpAttributesFourByteAsPathSegment +} + +func newBgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter(ptr *[]*otg.BgpAttributesFourByteAsPathSegment) BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter { + return &bgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter{fieldPtr: ptr} +} + +type BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter interface { + setMsg(*bgpAttributesAsPathFourByteAsPath) BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter + Items() []BgpAttributesFourByteAsPathSegment + Add() BgpAttributesFourByteAsPathSegment + Append(items ...BgpAttributesFourByteAsPathSegment) BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter + Set(index int, newObj BgpAttributesFourByteAsPathSegment) BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter + Clear() BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter + clearHolderSlice() BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter + appendHolderSlice(item BgpAttributesFourByteAsPathSegment) BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter +} + +func (obj *bgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter) setMsg(msg *bgpAttributesAsPathFourByteAsPath) BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpAttributesFourByteAsPathSegment{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter) Items() []BgpAttributesFourByteAsPathSegment { + return obj.bgpAttributesFourByteAsPathSegmentSlice +} + +func (obj *bgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter) Add() BgpAttributesFourByteAsPathSegment { + newObj := &otg.BgpAttributesFourByteAsPathSegment{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpAttributesFourByteAsPathSegment{obj: newObj} + newLibObj.setDefault() + obj.bgpAttributesFourByteAsPathSegmentSlice = append(obj.bgpAttributesFourByteAsPathSegmentSlice, newLibObj) + return newLibObj +} + +func (obj *bgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter) Append(items ...BgpAttributesFourByteAsPathSegment) BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpAttributesFourByteAsPathSegmentSlice = append(obj.bgpAttributesFourByteAsPathSegmentSlice, item) + } + return obj +} + +func (obj *bgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter) Set(index int, newObj BgpAttributesFourByteAsPathSegment) BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpAttributesFourByteAsPathSegmentSlice[index] = newObj + return obj +} +func (obj *bgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter) Clear() BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpAttributesFourByteAsPathSegment{} + obj.bgpAttributesFourByteAsPathSegmentSlice = []BgpAttributesFourByteAsPathSegment{} + } + return obj +} +func (obj *bgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter) clearHolderSlice() BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter { + if len(obj.bgpAttributesFourByteAsPathSegmentSlice) > 0 { + obj.bgpAttributesFourByteAsPathSegmentSlice = []BgpAttributesFourByteAsPathSegment{} + } + return obj +} +func (obj *bgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter) appendHolderSlice(item BgpAttributesFourByteAsPathSegment) BgpAttributesAsPathFourByteAsPathBgpAttributesFourByteAsPathSegmentIter { + obj.bgpAttributesFourByteAsPathSegmentSlice = append(obj.bgpAttributesFourByteAsPathSegmentSlice, item) + return obj +} + +func (obj *bgpAttributesAsPathFourByteAsPath) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Segments) != 0 { + + if set_default { + obj.Segments().clearHolderSlice() + for _, item := range obj.obj.Segments { + obj.Segments().appendHolderSlice(&bgpAttributesFourByteAsPathSegment{obj: item}) + } + } + for _, item := range obj.Segments().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpAttributesAsPathFourByteAsPath) setDefault() { + +} diff --git a/gosnappi/bgp_attributes_as_path_two_byte_as_path.go b/gosnappi/bgp_attributes_as_path_two_byte_as_path.go new file mode 100644 index 00000000..f9147669 --- /dev/null +++ b/gosnappi/bgp_attributes_as_path_two_byte_as_path.go @@ -0,0 +1,392 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesAsPathTwoByteAsPath ***** +type bgpAttributesAsPathTwoByteAsPath struct { + validation + obj *otg.BgpAttributesAsPathTwoByteAsPath + marshaller marshalBgpAttributesAsPathTwoByteAsPath + unMarshaller unMarshalBgpAttributesAsPathTwoByteAsPath + segmentsHolder BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter +} + +func NewBgpAttributesAsPathTwoByteAsPath() BgpAttributesAsPathTwoByteAsPath { + obj := bgpAttributesAsPathTwoByteAsPath{obj: &otg.BgpAttributesAsPathTwoByteAsPath{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesAsPathTwoByteAsPath) msg() *otg.BgpAttributesAsPathTwoByteAsPath { + return obj.obj +} + +func (obj *bgpAttributesAsPathTwoByteAsPath) setMsg(msg *otg.BgpAttributesAsPathTwoByteAsPath) BgpAttributesAsPathTwoByteAsPath { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesAsPathTwoByteAsPath struct { + obj *bgpAttributesAsPathTwoByteAsPath +} + +type marshalBgpAttributesAsPathTwoByteAsPath interface { + // ToProto marshals BgpAttributesAsPathTwoByteAsPath to protobuf object *otg.BgpAttributesAsPathTwoByteAsPath + ToProto() (*otg.BgpAttributesAsPathTwoByteAsPath, error) + // ToPbText marshals BgpAttributesAsPathTwoByteAsPath to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesAsPathTwoByteAsPath to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesAsPathTwoByteAsPath to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesAsPathTwoByteAsPath struct { + obj *bgpAttributesAsPathTwoByteAsPath +} + +type unMarshalBgpAttributesAsPathTwoByteAsPath interface { + // FromProto unmarshals BgpAttributesAsPathTwoByteAsPath from protobuf object *otg.BgpAttributesAsPathTwoByteAsPath + FromProto(msg *otg.BgpAttributesAsPathTwoByteAsPath) (BgpAttributesAsPathTwoByteAsPath, error) + // FromPbText unmarshals BgpAttributesAsPathTwoByteAsPath from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesAsPathTwoByteAsPath from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesAsPathTwoByteAsPath from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesAsPathTwoByteAsPath) Marshal() marshalBgpAttributesAsPathTwoByteAsPath { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesAsPathTwoByteAsPath{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesAsPathTwoByteAsPath) Unmarshal() unMarshalBgpAttributesAsPathTwoByteAsPath { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesAsPathTwoByteAsPath{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesAsPathTwoByteAsPath) ToProto() (*otg.BgpAttributesAsPathTwoByteAsPath, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesAsPathTwoByteAsPath) FromProto(msg *otg.BgpAttributesAsPathTwoByteAsPath) (BgpAttributesAsPathTwoByteAsPath, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesAsPathTwoByteAsPath) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesAsPathTwoByteAsPath) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesAsPathTwoByteAsPath) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesAsPathTwoByteAsPath) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesAsPathTwoByteAsPath) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesAsPathTwoByteAsPath) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesAsPathTwoByteAsPath) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesAsPathTwoByteAsPath) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesAsPathTwoByteAsPath) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesAsPathTwoByteAsPath) Clone() (BgpAttributesAsPathTwoByteAsPath, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesAsPathTwoByteAsPath() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesAsPathTwoByteAsPath) setNil() { + obj.segmentsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesAsPathTwoByteAsPath is aS Paths with 2 byte AS numbers is used when any of the two scenarios occur : +// - An old BGP speaker and new BGP speaker are sending BGP Updates to one another. +// - Two old BGP speakers are sending BGP Updates to one another. +type BgpAttributesAsPathTwoByteAsPath interface { + Validation + // msg marshals BgpAttributesAsPathTwoByteAsPath to protobuf object *otg.BgpAttributesAsPathTwoByteAsPath + // and doesn't set defaults + msg() *otg.BgpAttributesAsPathTwoByteAsPath + // setMsg unmarshals BgpAttributesAsPathTwoByteAsPath from protobuf object *otg.BgpAttributesAsPathTwoByteAsPath + // and doesn't set defaults + setMsg(*otg.BgpAttributesAsPathTwoByteAsPath) BgpAttributesAsPathTwoByteAsPath + // provides marshal interface + Marshal() marshalBgpAttributesAsPathTwoByteAsPath + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesAsPathTwoByteAsPath + // validate validates BgpAttributesAsPathTwoByteAsPath + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesAsPathTwoByteAsPath, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Segments returns BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIterIter, set in BgpAttributesAsPathTwoByteAsPath + Segments() BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter + setNil() +} + +// The AS path segments containing 2 byte AS numbers to be added in the AS Path attribute. By default, an empty AS path should always be included and for EBGP the sender's AS number should be prepended to the AS Path. +// Segments returns a []BgpAttributesTwoByteAsPathSegment +func (obj *bgpAttributesAsPathTwoByteAsPath) Segments() BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter { + if len(obj.obj.Segments) == 0 { + obj.obj.Segments = []*otg.BgpAttributesTwoByteAsPathSegment{} + } + if obj.segmentsHolder == nil { + obj.segmentsHolder = newBgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter(&obj.obj.Segments).setMsg(obj) + } + return obj.segmentsHolder +} + +type bgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter struct { + obj *bgpAttributesAsPathTwoByteAsPath + bgpAttributesTwoByteAsPathSegmentSlice []BgpAttributesTwoByteAsPathSegment + fieldPtr *[]*otg.BgpAttributesTwoByteAsPathSegment +} + +func newBgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter(ptr *[]*otg.BgpAttributesTwoByteAsPathSegment) BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter { + return &bgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter{fieldPtr: ptr} +} + +type BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter interface { + setMsg(*bgpAttributesAsPathTwoByteAsPath) BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter + Items() []BgpAttributesTwoByteAsPathSegment + Add() BgpAttributesTwoByteAsPathSegment + Append(items ...BgpAttributesTwoByteAsPathSegment) BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter + Set(index int, newObj BgpAttributesTwoByteAsPathSegment) BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter + Clear() BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter + clearHolderSlice() BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter + appendHolderSlice(item BgpAttributesTwoByteAsPathSegment) BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter +} + +func (obj *bgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter) setMsg(msg *bgpAttributesAsPathTwoByteAsPath) BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpAttributesTwoByteAsPathSegment{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter) Items() []BgpAttributesTwoByteAsPathSegment { + return obj.bgpAttributesTwoByteAsPathSegmentSlice +} + +func (obj *bgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter) Add() BgpAttributesTwoByteAsPathSegment { + newObj := &otg.BgpAttributesTwoByteAsPathSegment{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpAttributesTwoByteAsPathSegment{obj: newObj} + newLibObj.setDefault() + obj.bgpAttributesTwoByteAsPathSegmentSlice = append(obj.bgpAttributesTwoByteAsPathSegmentSlice, newLibObj) + return newLibObj +} + +func (obj *bgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter) Append(items ...BgpAttributesTwoByteAsPathSegment) BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpAttributesTwoByteAsPathSegmentSlice = append(obj.bgpAttributesTwoByteAsPathSegmentSlice, item) + } + return obj +} + +func (obj *bgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter) Set(index int, newObj BgpAttributesTwoByteAsPathSegment) BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpAttributesTwoByteAsPathSegmentSlice[index] = newObj + return obj +} +func (obj *bgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter) Clear() BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpAttributesTwoByteAsPathSegment{} + obj.bgpAttributesTwoByteAsPathSegmentSlice = []BgpAttributesTwoByteAsPathSegment{} + } + return obj +} +func (obj *bgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter) clearHolderSlice() BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter { + if len(obj.bgpAttributesTwoByteAsPathSegmentSlice) > 0 { + obj.bgpAttributesTwoByteAsPathSegmentSlice = []BgpAttributesTwoByteAsPathSegment{} + } + return obj +} +func (obj *bgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter) appendHolderSlice(item BgpAttributesTwoByteAsPathSegment) BgpAttributesAsPathTwoByteAsPathBgpAttributesTwoByteAsPathSegmentIter { + obj.bgpAttributesTwoByteAsPathSegmentSlice = append(obj.bgpAttributesTwoByteAsPathSegmentSlice, item) + return obj +} + +func (obj *bgpAttributesAsPathTwoByteAsPath) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Segments) != 0 { + + if set_default { + obj.Segments().clearHolderSlice() + for _, item := range obj.obj.Segments { + obj.Segments().appendHolderSlice(&bgpAttributesTwoByteAsPathSegment{obj: item}) + } + } + for _, item := range obj.Segments().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpAttributesAsPathTwoByteAsPath) setDefault() { + +} diff --git a/gosnappi/bgp_attributes_bsid.go b/gosnappi/bgp_attributes_bsid.go new file mode 100644 index 00000000..5f53d996 --- /dev/null +++ b/gosnappi/bgp_attributes_bsid.go @@ -0,0 +1,453 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesBsid ***** +type bgpAttributesBsid struct { + validation + obj *otg.BgpAttributesBsid + marshaller marshalBgpAttributesBsid + unMarshaller unMarshalBgpAttributesBsid + mplsHolder BgpAttributesBsidMpls + srv6Holder BgpAttributesBsidSrv6 +} + +func NewBgpAttributesBsid() BgpAttributesBsid { + obj := bgpAttributesBsid{obj: &otg.BgpAttributesBsid{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesBsid) msg() *otg.BgpAttributesBsid { + return obj.obj +} + +func (obj *bgpAttributesBsid) setMsg(msg *otg.BgpAttributesBsid) BgpAttributesBsid { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesBsid struct { + obj *bgpAttributesBsid +} + +type marshalBgpAttributesBsid interface { + // ToProto marshals BgpAttributesBsid to protobuf object *otg.BgpAttributesBsid + ToProto() (*otg.BgpAttributesBsid, error) + // ToPbText marshals BgpAttributesBsid to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesBsid to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesBsid to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesBsid struct { + obj *bgpAttributesBsid +} + +type unMarshalBgpAttributesBsid interface { + // FromProto unmarshals BgpAttributesBsid from protobuf object *otg.BgpAttributesBsid + FromProto(msg *otg.BgpAttributesBsid) (BgpAttributesBsid, error) + // FromPbText unmarshals BgpAttributesBsid from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesBsid from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesBsid from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesBsid) Marshal() marshalBgpAttributesBsid { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesBsid{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesBsid) Unmarshal() unMarshalBgpAttributesBsid { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesBsid{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesBsid) ToProto() (*otg.BgpAttributesBsid, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesBsid) FromProto(msg *otg.BgpAttributesBsid) (BgpAttributesBsid, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesBsid) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesBsid) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesBsid) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesBsid) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesBsid) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesBsid) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesBsid) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesBsid) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesBsid) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesBsid) Clone() (BgpAttributesBsid, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesBsid() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesBsid) setNil() { + obj.mplsHolder = nil + obj.srv6Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesBsid is the Binding Segment Identifier is an optional sub-tlv of type 13 that can be sent with a SR Policy +// Tunnel Encapsulation attribute. +// When the active candidate path has a specified Binding Segment Identifier, the SR Policy uses that +// BSID if this value (label in MPLS, IPv6 address in SRv6) is available. +// - The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section 2.4.2 . +// - It is recommended that if SRv6 Binding SID is desired to be signalled, the SRv6 Binding SID sub-TLV that enables +// the specification of the SRv6 Endpoint Behavior should be used. +type BgpAttributesBsid interface { + Validation + // msg marshals BgpAttributesBsid to protobuf object *otg.BgpAttributesBsid + // and doesn't set defaults + msg() *otg.BgpAttributesBsid + // setMsg unmarshals BgpAttributesBsid from protobuf object *otg.BgpAttributesBsid + // and doesn't set defaults + setMsg(*otg.BgpAttributesBsid) BgpAttributesBsid + // provides marshal interface + Marshal() marshalBgpAttributesBsid + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesBsid + // validate validates BgpAttributesBsid + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesBsid, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpAttributesBsidChoiceEnum, set in BgpAttributesBsid + Choice() BgpAttributesBsidChoiceEnum + // setChoice assigns BgpAttributesBsidChoiceEnum provided by user to BgpAttributesBsid + setChoice(value BgpAttributesBsidChoiceEnum) BgpAttributesBsid + // Mpls returns BgpAttributesBsidMpls, set in BgpAttributesBsid. + // BgpAttributesBsidMpls is when the active candidate path has a specified Binding Segment Identifier, the SR Policy uses that BSID defined + // as a MPLS label.The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section 2.4.2 . + Mpls() BgpAttributesBsidMpls + // SetMpls assigns BgpAttributesBsidMpls provided by user to BgpAttributesBsid. + // BgpAttributesBsidMpls is when the active candidate path has a specified Binding Segment Identifier, the SR Policy uses that BSID defined + // as a MPLS label.The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section 2.4.2 . + SetMpls(value BgpAttributesBsidMpls) BgpAttributesBsid + // HasMpls checks if Mpls has been set in BgpAttributesBsid + HasMpls() bool + // Srv6 returns BgpAttributesBsidSrv6, set in BgpAttributesBsid. + // BgpAttributesBsidSrv6 is when the active candidate path has a specified Binding Segment Identifier, the SR Policy uses that BSID defined + // as an IPv6 Address.The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section 2.4.2 . + Srv6() BgpAttributesBsidSrv6 + // SetSrv6 assigns BgpAttributesBsidSrv6 provided by user to BgpAttributesBsid. + // BgpAttributesBsidSrv6 is when the active candidate path has a specified Binding Segment Identifier, the SR Policy uses that BSID defined + // as an IPv6 Address.The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section 2.4.2 . + SetSrv6(value BgpAttributesBsidSrv6) BgpAttributesBsid + // HasSrv6 checks if Srv6 has been set in BgpAttributesBsid + HasSrv6() bool + setNil() +} + +type BgpAttributesBsidChoiceEnum string + +// Enum of Choice on BgpAttributesBsid +var BgpAttributesBsidChoice = struct { + MPLS BgpAttributesBsidChoiceEnum + SRV6 BgpAttributesBsidChoiceEnum +}{ + MPLS: BgpAttributesBsidChoiceEnum("mpls"), + SRV6: BgpAttributesBsidChoiceEnum("srv6"), +} + +func (obj *bgpAttributesBsid) Choice() BgpAttributesBsidChoiceEnum { + return BgpAttributesBsidChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *bgpAttributesBsid) setChoice(value BgpAttributesBsidChoiceEnum) BgpAttributesBsid { + intValue, ok := otg.BgpAttributesBsid_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAttributesBsidChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpAttributesBsid_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Srv6 = nil + obj.srv6Holder = nil + obj.obj.Mpls = nil + obj.mplsHolder = nil + + if value == BgpAttributesBsidChoice.MPLS { + obj.obj.Mpls = NewBgpAttributesBsidMpls().msg() + } + + if value == BgpAttributesBsidChoice.SRV6 { + obj.obj.Srv6 = NewBgpAttributesBsidSrv6().msg() + } + + return obj +} + +// description is TBD +// Mpls returns a BgpAttributesBsidMpls +func (obj *bgpAttributesBsid) Mpls() BgpAttributesBsidMpls { + if obj.obj.Mpls == nil { + obj.setChoice(BgpAttributesBsidChoice.MPLS) + } + if obj.mplsHolder == nil { + obj.mplsHolder = &bgpAttributesBsidMpls{obj: obj.obj.Mpls} + } + return obj.mplsHolder +} + +// description is TBD +// Mpls returns a BgpAttributesBsidMpls +func (obj *bgpAttributesBsid) HasMpls() bool { + return obj.obj.Mpls != nil +} + +// description is TBD +// SetMpls sets the BgpAttributesBsidMpls value in the BgpAttributesBsid object +func (obj *bgpAttributesBsid) SetMpls(value BgpAttributesBsidMpls) BgpAttributesBsid { + obj.setChoice(BgpAttributesBsidChoice.MPLS) + obj.mplsHolder = nil + obj.obj.Mpls = value.msg() + + return obj +} + +// description is TBD +// Srv6 returns a BgpAttributesBsidSrv6 +func (obj *bgpAttributesBsid) Srv6() BgpAttributesBsidSrv6 { + if obj.obj.Srv6 == nil { + obj.setChoice(BgpAttributesBsidChoice.SRV6) + } + if obj.srv6Holder == nil { + obj.srv6Holder = &bgpAttributesBsidSrv6{obj: obj.obj.Srv6} + } + return obj.srv6Holder +} + +// description is TBD +// Srv6 returns a BgpAttributesBsidSrv6 +func (obj *bgpAttributesBsid) HasSrv6() bool { + return obj.obj.Srv6 != nil +} + +// description is TBD +// SetSrv6 sets the BgpAttributesBsidSrv6 value in the BgpAttributesBsid object +func (obj *bgpAttributesBsid) SetSrv6(value BgpAttributesBsidSrv6) BgpAttributesBsid { + obj.setChoice(BgpAttributesBsidChoice.SRV6) + obj.srv6Holder = nil + obj.obj.Srv6 = value.msg() + + return obj +} + +func (obj *bgpAttributesBsid) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface BgpAttributesBsid") + } + + if obj.obj.Mpls != nil { + + obj.Mpls().validateObj(vObj, set_default) + } + + if obj.obj.Srv6 != nil { + + obj.Srv6().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesBsid) setDefault() { + var choices_set int = 0 + var choice BgpAttributesBsidChoiceEnum + + if obj.obj.Mpls != nil { + choices_set += 1 + choice = BgpAttributesBsidChoice.MPLS + } + + if obj.obj.Srv6 != nil { + choices_set += 1 + choice = BgpAttributesBsidChoice.SRV6 + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpAttributesBsid") + } + } else { + intVal := otg.BgpAttributesBsid_Choice_Enum_value[string(choice)] + enumValue := otg.BgpAttributesBsid_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_attributes_bsid_mpls.go b/gosnappi/bgp_attributes_bsid_mpls.go new file mode 100644 index 00000000..d79ed82c --- /dev/null +++ b/gosnappi/bgp_attributes_bsid_mpls.go @@ -0,0 +1,399 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesBsidMpls ***** +type bgpAttributesBsidMpls struct { + validation + obj *otg.BgpAttributesBsidMpls + marshaller marshalBgpAttributesBsidMpls + unMarshaller unMarshalBgpAttributesBsidMpls + mplsSidHolder BgpAttributesSidMpls +} + +func NewBgpAttributesBsidMpls() BgpAttributesBsidMpls { + obj := bgpAttributesBsidMpls{obj: &otg.BgpAttributesBsidMpls{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesBsidMpls) msg() *otg.BgpAttributesBsidMpls { + return obj.obj +} + +func (obj *bgpAttributesBsidMpls) setMsg(msg *otg.BgpAttributesBsidMpls) BgpAttributesBsidMpls { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesBsidMpls struct { + obj *bgpAttributesBsidMpls +} + +type marshalBgpAttributesBsidMpls interface { + // ToProto marshals BgpAttributesBsidMpls to protobuf object *otg.BgpAttributesBsidMpls + ToProto() (*otg.BgpAttributesBsidMpls, error) + // ToPbText marshals BgpAttributesBsidMpls to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesBsidMpls to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesBsidMpls to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesBsidMpls struct { + obj *bgpAttributesBsidMpls +} + +type unMarshalBgpAttributesBsidMpls interface { + // FromProto unmarshals BgpAttributesBsidMpls from protobuf object *otg.BgpAttributesBsidMpls + FromProto(msg *otg.BgpAttributesBsidMpls) (BgpAttributesBsidMpls, error) + // FromPbText unmarshals BgpAttributesBsidMpls from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesBsidMpls from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesBsidMpls from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesBsidMpls) Marshal() marshalBgpAttributesBsidMpls { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesBsidMpls{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesBsidMpls) Unmarshal() unMarshalBgpAttributesBsidMpls { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesBsidMpls{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesBsidMpls) ToProto() (*otg.BgpAttributesBsidMpls, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesBsidMpls) FromProto(msg *otg.BgpAttributesBsidMpls) (BgpAttributesBsidMpls, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesBsidMpls) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesBsidMpls) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesBsidMpls) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesBsidMpls) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesBsidMpls) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesBsidMpls) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesBsidMpls) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesBsidMpls) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesBsidMpls) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesBsidMpls) Clone() (BgpAttributesBsidMpls, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesBsidMpls() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesBsidMpls) setNil() { + obj.mplsSidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesBsidMpls is when the active candidate path has a specified Binding Segment Identifier, the SR Policy uses that BSID defined +// as a MPLS label.The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section 2.4.2 . +type BgpAttributesBsidMpls interface { + Validation + // msg marshals BgpAttributesBsidMpls to protobuf object *otg.BgpAttributesBsidMpls + // and doesn't set defaults + msg() *otg.BgpAttributesBsidMpls + // setMsg unmarshals BgpAttributesBsidMpls from protobuf object *otg.BgpAttributesBsidMpls + // and doesn't set defaults + setMsg(*otg.BgpAttributesBsidMpls) BgpAttributesBsidMpls + // provides marshal interface + Marshal() marshalBgpAttributesBsidMpls + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesBsidMpls + // validate validates BgpAttributesBsidMpls + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesBsidMpls, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // FlagSpecifiedBsidOnly returns bool, set in BgpAttributesBsidMpls. + FlagSpecifiedBsidOnly() bool + // SetFlagSpecifiedBsidOnly assigns bool provided by user to BgpAttributesBsidMpls + SetFlagSpecifiedBsidOnly(value bool) BgpAttributesBsidMpls + // HasFlagSpecifiedBsidOnly checks if FlagSpecifiedBsidOnly has been set in BgpAttributesBsidMpls + HasFlagSpecifiedBsidOnly() bool + // FlagDropUponInvalid returns bool, set in BgpAttributesBsidMpls. + FlagDropUponInvalid() bool + // SetFlagDropUponInvalid assigns bool provided by user to BgpAttributesBsidMpls + SetFlagDropUponInvalid(value bool) BgpAttributesBsidMpls + // HasFlagDropUponInvalid checks if FlagDropUponInvalid has been set in BgpAttributesBsidMpls + HasFlagDropUponInvalid() bool + // MplsSid returns BgpAttributesSidMpls, set in BgpAttributesBsidMpls. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + MplsSid() BgpAttributesSidMpls + // SetMplsSid assigns BgpAttributesSidMpls provided by user to BgpAttributesBsidMpls. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + SetMplsSid(value BgpAttributesSidMpls) BgpAttributesBsidMpls + // HasMplsSid checks if MplsSid has been set in BgpAttributesBsidMpls + HasMplsSid() bool + setNil() +} + +// S-Flag: This flag encodes the "Specified-BSID-only" behavior. It's usage is +// described in section 6.2.3 in [RFC9256]. +// FlagSpecifiedBsidOnly returns a bool +func (obj *bgpAttributesBsidMpls) FlagSpecifiedBsidOnly() bool { + + return *obj.obj.FlagSpecifiedBsidOnly + +} + +// S-Flag: This flag encodes the "Specified-BSID-only" behavior. It's usage is +// described in section 6.2.3 in [RFC9256]. +// FlagSpecifiedBsidOnly returns a bool +func (obj *bgpAttributesBsidMpls) HasFlagSpecifiedBsidOnly() bool { + return obj.obj.FlagSpecifiedBsidOnly != nil +} + +// S-Flag: This flag encodes the "Specified-BSID-only" behavior. It's usage is +// described in section 6.2.3 in [RFC9256]. +// SetFlagSpecifiedBsidOnly sets the bool value in the BgpAttributesBsidMpls object +func (obj *bgpAttributesBsidMpls) SetFlagSpecifiedBsidOnly(value bool) BgpAttributesBsidMpls { + + obj.obj.FlagSpecifiedBsidOnly = &value + return obj +} + +// I-Flag: This flag encodes the "Drop Upon Invalid" behavior. +// It's usage is described in section 8.2 in [RFC9256]. +// FlagDropUponInvalid returns a bool +func (obj *bgpAttributesBsidMpls) FlagDropUponInvalid() bool { + + return *obj.obj.FlagDropUponInvalid + +} + +// I-Flag: This flag encodes the "Drop Upon Invalid" behavior. +// It's usage is described in section 8.2 in [RFC9256]. +// FlagDropUponInvalid returns a bool +func (obj *bgpAttributesBsidMpls) HasFlagDropUponInvalid() bool { + return obj.obj.FlagDropUponInvalid != nil +} + +// I-Flag: This flag encodes the "Drop Upon Invalid" behavior. +// It's usage is described in section 8.2 in [RFC9256]. +// SetFlagDropUponInvalid sets the bool value in the BgpAttributesBsidMpls object +func (obj *bgpAttributesBsidMpls) SetFlagDropUponInvalid(value bool) BgpAttributesBsidMpls { + + obj.obj.FlagDropUponInvalid = &value + return obj +} + +// description is TBD +// MplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesBsidMpls) MplsSid() BgpAttributesSidMpls { + if obj.obj.MplsSid == nil { + obj.obj.MplsSid = NewBgpAttributesSidMpls().msg() + } + if obj.mplsSidHolder == nil { + obj.mplsSidHolder = &bgpAttributesSidMpls{obj: obj.obj.MplsSid} + } + return obj.mplsSidHolder +} + +// description is TBD +// MplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesBsidMpls) HasMplsSid() bool { + return obj.obj.MplsSid != nil +} + +// description is TBD +// SetMplsSid sets the BgpAttributesSidMpls value in the BgpAttributesBsidMpls object +func (obj *bgpAttributesBsidMpls) SetMplsSid(value BgpAttributesSidMpls) BgpAttributesBsidMpls { + + obj.mplsSidHolder = nil + obj.obj.MplsSid = value.msg() + + return obj +} + +func (obj *bgpAttributesBsidMpls) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.MplsSid != nil { + + obj.MplsSid().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesBsidMpls) setDefault() { + if obj.obj.FlagSpecifiedBsidOnly == nil { + obj.SetFlagSpecifiedBsidOnly(false) + } + if obj.obj.FlagDropUponInvalid == nil { + obj.SetFlagDropUponInvalid(false) + } + +} diff --git a/gosnappi/bgp_attributes_bsid_srv6.go b/gosnappi/bgp_attributes_bsid_srv6.go new file mode 100644 index 00000000..21f2af5d --- /dev/null +++ b/gosnappi/bgp_attributes_bsid_srv6.go @@ -0,0 +1,387 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesBsidSrv6 ***** +type bgpAttributesBsidSrv6 struct { + validation + obj *otg.BgpAttributesBsidSrv6 + marshaller marshalBgpAttributesBsidSrv6 + unMarshaller unMarshalBgpAttributesBsidSrv6 +} + +func NewBgpAttributesBsidSrv6() BgpAttributesBsidSrv6 { + obj := bgpAttributesBsidSrv6{obj: &otg.BgpAttributesBsidSrv6{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesBsidSrv6) msg() *otg.BgpAttributesBsidSrv6 { + return obj.obj +} + +func (obj *bgpAttributesBsidSrv6) setMsg(msg *otg.BgpAttributesBsidSrv6) BgpAttributesBsidSrv6 { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesBsidSrv6 struct { + obj *bgpAttributesBsidSrv6 +} + +type marshalBgpAttributesBsidSrv6 interface { + // ToProto marshals BgpAttributesBsidSrv6 to protobuf object *otg.BgpAttributesBsidSrv6 + ToProto() (*otg.BgpAttributesBsidSrv6, error) + // ToPbText marshals BgpAttributesBsidSrv6 to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesBsidSrv6 to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesBsidSrv6 to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesBsidSrv6 struct { + obj *bgpAttributesBsidSrv6 +} + +type unMarshalBgpAttributesBsidSrv6 interface { + // FromProto unmarshals BgpAttributesBsidSrv6 from protobuf object *otg.BgpAttributesBsidSrv6 + FromProto(msg *otg.BgpAttributesBsidSrv6) (BgpAttributesBsidSrv6, error) + // FromPbText unmarshals BgpAttributesBsidSrv6 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesBsidSrv6 from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesBsidSrv6 from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesBsidSrv6) Marshal() marshalBgpAttributesBsidSrv6 { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesBsidSrv6{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesBsidSrv6) Unmarshal() unMarshalBgpAttributesBsidSrv6 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesBsidSrv6{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesBsidSrv6) ToProto() (*otg.BgpAttributesBsidSrv6, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesBsidSrv6) FromProto(msg *otg.BgpAttributesBsidSrv6) (BgpAttributesBsidSrv6, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesBsidSrv6) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesBsidSrv6) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesBsidSrv6) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesBsidSrv6) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesBsidSrv6) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesBsidSrv6) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesBsidSrv6) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesBsidSrv6) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesBsidSrv6) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesBsidSrv6) Clone() (BgpAttributesBsidSrv6, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesBsidSrv6() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesBsidSrv6 is when the active candidate path has a specified Binding Segment Identifier, the SR Policy uses that BSID defined +// as an IPv6 Address.The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section 2.4.2 . +type BgpAttributesBsidSrv6 interface { + Validation + // msg marshals BgpAttributesBsidSrv6 to protobuf object *otg.BgpAttributesBsidSrv6 + // and doesn't set defaults + msg() *otg.BgpAttributesBsidSrv6 + // setMsg unmarshals BgpAttributesBsidSrv6 from protobuf object *otg.BgpAttributesBsidSrv6 + // and doesn't set defaults + setMsg(*otg.BgpAttributesBsidSrv6) BgpAttributesBsidSrv6 + // provides marshal interface + Marshal() marshalBgpAttributesBsidSrv6 + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesBsidSrv6 + // validate validates BgpAttributesBsidSrv6 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesBsidSrv6, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // FlagSpecifiedBsidOnly returns bool, set in BgpAttributesBsidSrv6. + FlagSpecifiedBsidOnly() bool + // SetFlagSpecifiedBsidOnly assigns bool provided by user to BgpAttributesBsidSrv6 + SetFlagSpecifiedBsidOnly(value bool) BgpAttributesBsidSrv6 + // HasFlagSpecifiedBsidOnly checks if FlagSpecifiedBsidOnly has been set in BgpAttributesBsidSrv6 + HasFlagSpecifiedBsidOnly() bool + // FlagDropUponInvalid returns bool, set in BgpAttributesBsidSrv6. + FlagDropUponInvalid() bool + // SetFlagDropUponInvalid assigns bool provided by user to BgpAttributesBsidSrv6 + SetFlagDropUponInvalid(value bool) BgpAttributesBsidSrv6 + // HasFlagDropUponInvalid checks if FlagDropUponInvalid has been set in BgpAttributesBsidSrv6 + HasFlagDropUponInvalid() bool + // Ipv6Addr returns string, set in BgpAttributesBsidSrv6. + Ipv6Addr() string + // SetIpv6Addr assigns string provided by user to BgpAttributesBsidSrv6 + SetIpv6Addr(value string) BgpAttributesBsidSrv6 + // HasIpv6Addr checks if Ipv6Addr has been set in BgpAttributesBsidSrv6 + HasIpv6Addr() bool +} + +// S-Flag: This flag encodes the "Specified-BSID-only" behavior. It's usage is +// described in section 6.2.3 in [RFC9256]. +// FlagSpecifiedBsidOnly returns a bool +func (obj *bgpAttributesBsidSrv6) FlagSpecifiedBsidOnly() bool { + + return *obj.obj.FlagSpecifiedBsidOnly + +} + +// S-Flag: This flag encodes the "Specified-BSID-only" behavior. It's usage is +// described in section 6.2.3 in [RFC9256]. +// FlagSpecifiedBsidOnly returns a bool +func (obj *bgpAttributesBsidSrv6) HasFlagSpecifiedBsidOnly() bool { + return obj.obj.FlagSpecifiedBsidOnly != nil +} + +// S-Flag: This flag encodes the "Specified-BSID-only" behavior. It's usage is +// described in section 6.2.3 in [RFC9256]. +// SetFlagSpecifiedBsidOnly sets the bool value in the BgpAttributesBsidSrv6 object +func (obj *bgpAttributesBsidSrv6) SetFlagSpecifiedBsidOnly(value bool) BgpAttributesBsidSrv6 { + + obj.obj.FlagSpecifiedBsidOnly = &value + return obj +} + +// I-Flag: This flag encodes the "Drop Upon Invalid" behavior. +// It's usage is described in section 8.2 in [RFC9256]. +// FlagDropUponInvalid returns a bool +func (obj *bgpAttributesBsidSrv6) FlagDropUponInvalid() bool { + + return *obj.obj.FlagDropUponInvalid + +} + +// I-Flag: This flag encodes the "Drop Upon Invalid" behavior. +// It's usage is described in section 8.2 in [RFC9256]. +// FlagDropUponInvalid returns a bool +func (obj *bgpAttributesBsidSrv6) HasFlagDropUponInvalid() bool { + return obj.obj.FlagDropUponInvalid != nil +} + +// I-Flag: This flag encodes the "Drop Upon Invalid" behavior. +// It's usage is described in section 8.2 in [RFC9256]. +// SetFlagDropUponInvalid sets the bool value in the BgpAttributesBsidSrv6 object +func (obj *bgpAttributesBsidSrv6) SetFlagDropUponInvalid(value bool) BgpAttributesBsidSrv6 { + + obj.obj.FlagDropUponInvalid = &value + return obj +} + +// IPv6 address denoting the SRv6 SID. +// Ipv6Addr returns a string +func (obj *bgpAttributesBsidSrv6) Ipv6Addr() string { + + return *obj.obj.Ipv6Addr + +} + +// IPv6 address denoting the SRv6 SID. +// Ipv6Addr returns a string +func (obj *bgpAttributesBsidSrv6) HasIpv6Addr() bool { + return obj.obj.Ipv6Addr != nil +} + +// IPv6 address denoting the SRv6 SID. +// SetIpv6Addr sets the string value in the BgpAttributesBsidSrv6 object +func (obj *bgpAttributesBsidSrv6) SetIpv6Addr(value string) BgpAttributesBsidSrv6 { + + obj.obj.Ipv6Addr = &value + return obj +} + +func (obj *bgpAttributesBsidSrv6) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv6Addr != nil { + + err := obj.validateIpv6(obj.Ipv6Addr()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesBsidSrv6.Ipv6Addr")) + } + + } + +} + +func (obj *bgpAttributesBsidSrv6) setDefault() { + if obj.obj.FlagSpecifiedBsidOnly == nil { + obj.SetFlagSpecifiedBsidOnly(false) + } + if obj.obj.FlagDropUponInvalid == nil { + obj.SetFlagDropUponInvalid(false) + } + if obj.obj.Ipv6Addr == nil { + obj.SetIpv6Addr("0::0") + } + +} diff --git a/gosnappi/bgp_attributes_community.go b/gosnappi/bgp_attributes_community.go new file mode 100644 index 00000000..edb3c713 --- /dev/null +++ b/gosnappi/bgp_attributes_community.go @@ -0,0 +1,434 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesCommunity ***** +type bgpAttributesCommunity struct { + validation + obj *otg.BgpAttributesCommunity + marshaller marshalBgpAttributesCommunity + unMarshaller unMarshalBgpAttributesCommunity + customCommunityHolder BgpAttributesCustomCommunity +} + +func NewBgpAttributesCommunity() BgpAttributesCommunity { + obj := bgpAttributesCommunity{obj: &otg.BgpAttributesCommunity{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesCommunity) msg() *otg.BgpAttributesCommunity { + return obj.obj +} + +func (obj *bgpAttributesCommunity) setMsg(msg *otg.BgpAttributesCommunity) BgpAttributesCommunity { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesCommunity struct { + obj *bgpAttributesCommunity +} + +type marshalBgpAttributesCommunity interface { + // ToProto marshals BgpAttributesCommunity to protobuf object *otg.BgpAttributesCommunity + ToProto() (*otg.BgpAttributesCommunity, error) + // ToPbText marshals BgpAttributesCommunity to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesCommunity to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesCommunity to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesCommunity struct { + obj *bgpAttributesCommunity +} + +type unMarshalBgpAttributesCommunity interface { + // FromProto unmarshals BgpAttributesCommunity from protobuf object *otg.BgpAttributesCommunity + FromProto(msg *otg.BgpAttributesCommunity) (BgpAttributesCommunity, error) + // FromPbText unmarshals BgpAttributesCommunity from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesCommunity from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesCommunity from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesCommunity) Marshal() marshalBgpAttributesCommunity { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesCommunity{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesCommunity) Unmarshal() unMarshalBgpAttributesCommunity { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesCommunity{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesCommunity) ToProto() (*otg.BgpAttributesCommunity, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesCommunity) FromProto(msg *otg.BgpAttributesCommunity) (BgpAttributesCommunity, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesCommunity) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesCommunity) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesCommunity) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesCommunity) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesCommunity) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesCommunity) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesCommunity) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesCommunity) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesCommunity) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesCommunity) Clone() (BgpAttributesCommunity, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesCommunity() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesCommunity) setNil() { + obj.customCommunityHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesCommunity is the COMMUNITY attribute provide additional capability for tagging routes and for modifying BGP routing policy on +// upstream and downstream routers. BGP community is a 32-bit number which is broken into 16-bit AS number and a +// 16-bit custom value or it contains some pre-defined well known values. +type BgpAttributesCommunity interface { + Validation + // msg marshals BgpAttributesCommunity to protobuf object *otg.BgpAttributesCommunity + // and doesn't set defaults + msg() *otg.BgpAttributesCommunity + // setMsg unmarshals BgpAttributesCommunity from protobuf object *otg.BgpAttributesCommunity + // and doesn't set defaults + setMsg(*otg.BgpAttributesCommunity) BgpAttributesCommunity + // provides marshal interface + Marshal() marshalBgpAttributesCommunity + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesCommunity + // validate validates BgpAttributesCommunity + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesCommunity, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpAttributesCommunityChoiceEnum, set in BgpAttributesCommunity + Choice() BgpAttributesCommunityChoiceEnum + // setChoice assigns BgpAttributesCommunityChoiceEnum provided by user to BgpAttributesCommunity + setChoice(value BgpAttributesCommunityChoiceEnum) BgpAttributesCommunity + // getter for NoExport to set choice. + NoExport() + // getter for NoExportSubconfed to set choice. + NoExportSubconfed() + // getter for NoAdvertised to set choice. + NoAdvertised() + // getter for NoLlgr to set choice. + NoLlgr() + // getter for LlgrStale to set choice. + LlgrStale() + // CustomCommunity returns BgpAttributesCustomCommunity, set in BgpAttributesCommunity. + // BgpAttributesCustomCommunity is user defined COMMUNITY attribute containing 2 byte AS and custom 2 byte value defined by the administrator of the domain. + CustomCommunity() BgpAttributesCustomCommunity + // SetCustomCommunity assigns BgpAttributesCustomCommunity provided by user to BgpAttributesCommunity. + // BgpAttributesCustomCommunity is user defined COMMUNITY attribute containing 2 byte AS and custom 2 byte value defined by the administrator of the domain. + SetCustomCommunity(value BgpAttributesCustomCommunity) BgpAttributesCommunity + // HasCustomCommunity checks if CustomCommunity has been set in BgpAttributesCommunity + HasCustomCommunity() bool + setNil() +} + +type BgpAttributesCommunityChoiceEnum string + +// Enum of Choice on BgpAttributesCommunity +var BgpAttributesCommunityChoice = struct { + CUSTOM_COMMUNITY BgpAttributesCommunityChoiceEnum + NO_EXPORT BgpAttributesCommunityChoiceEnum + NO_ADVERTISED BgpAttributesCommunityChoiceEnum + NO_EXPORT_SUBCONFED BgpAttributesCommunityChoiceEnum + LLGR_STALE BgpAttributesCommunityChoiceEnum + NO_LLGR BgpAttributesCommunityChoiceEnum +}{ + CUSTOM_COMMUNITY: BgpAttributesCommunityChoiceEnum("custom_community"), + NO_EXPORT: BgpAttributesCommunityChoiceEnum("no_export"), + NO_ADVERTISED: BgpAttributesCommunityChoiceEnum("no_advertised"), + NO_EXPORT_SUBCONFED: BgpAttributesCommunityChoiceEnum("no_export_subconfed"), + LLGR_STALE: BgpAttributesCommunityChoiceEnum("llgr_stale"), + NO_LLGR: BgpAttributesCommunityChoiceEnum("no_llgr"), +} + +func (obj *bgpAttributesCommunity) Choice() BgpAttributesCommunityChoiceEnum { + return BgpAttributesCommunityChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for NoExport to set choice +func (obj *bgpAttributesCommunity) NoExport() { + obj.setChoice(BgpAttributesCommunityChoice.NO_EXPORT) +} + +// getter for NoExportSubconfed to set choice +func (obj *bgpAttributesCommunity) NoExportSubconfed() { + obj.setChoice(BgpAttributesCommunityChoice.NO_EXPORT_SUBCONFED) +} + +// getter for NoAdvertised to set choice +func (obj *bgpAttributesCommunity) NoAdvertised() { + obj.setChoice(BgpAttributesCommunityChoice.NO_ADVERTISED) +} + +// getter for NoLlgr to set choice +func (obj *bgpAttributesCommunity) NoLlgr() { + obj.setChoice(BgpAttributesCommunityChoice.NO_LLGR) +} + +// getter for LlgrStale to set choice +func (obj *bgpAttributesCommunity) LlgrStale() { + obj.setChoice(BgpAttributesCommunityChoice.LLGR_STALE) +} + +func (obj *bgpAttributesCommunity) setChoice(value BgpAttributesCommunityChoiceEnum) BgpAttributesCommunity { + intValue, ok := otg.BgpAttributesCommunity_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAttributesCommunityChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpAttributesCommunity_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.CustomCommunity = nil + obj.customCommunityHolder = nil + + if value == BgpAttributesCommunityChoice.CUSTOM_COMMUNITY { + obj.obj.CustomCommunity = NewBgpAttributesCustomCommunity().msg() + } + + return obj +} + +// description is TBD +// CustomCommunity returns a BgpAttributesCustomCommunity +func (obj *bgpAttributesCommunity) CustomCommunity() BgpAttributesCustomCommunity { + if obj.obj.CustomCommunity == nil { + obj.setChoice(BgpAttributesCommunityChoice.CUSTOM_COMMUNITY) + } + if obj.customCommunityHolder == nil { + obj.customCommunityHolder = &bgpAttributesCustomCommunity{obj: obj.obj.CustomCommunity} + } + return obj.customCommunityHolder +} + +// description is TBD +// CustomCommunity returns a BgpAttributesCustomCommunity +func (obj *bgpAttributesCommunity) HasCustomCommunity() bool { + return obj.obj.CustomCommunity != nil +} + +// description is TBD +// SetCustomCommunity sets the BgpAttributesCustomCommunity value in the BgpAttributesCommunity object +func (obj *bgpAttributesCommunity) SetCustomCommunity(value BgpAttributesCustomCommunity) BgpAttributesCommunity { + obj.setChoice(BgpAttributesCommunityChoice.CUSTOM_COMMUNITY) + obj.customCommunityHolder = nil + obj.obj.CustomCommunity = value.msg() + + return obj +} + +func (obj *bgpAttributesCommunity) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface BgpAttributesCommunity") + } + + if obj.obj.CustomCommunity != nil { + + obj.CustomCommunity().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesCommunity) setDefault() { + var choices_set int = 0 + var choice BgpAttributesCommunityChoiceEnum + + if obj.obj.CustomCommunity != nil { + choices_set += 1 + choice = BgpAttributesCommunityChoice.CUSTOM_COMMUNITY + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpAttributesCommunity") + } + } else { + intVal := otg.BgpAttributesCommunity_Choice_Enum_value[string(choice)] + enumValue := otg.BgpAttributesCommunity_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_attributes_custom_community.go b/gosnappi/bgp_attributes_custom_community.go new file mode 100644 index 00000000..e9d149be --- /dev/null +++ b/gosnappi/bgp_attributes_custom_community.go @@ -0,0 +1,362 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesCustomCommunity ***** +type bgpAttributesCustomCommunity struct { + validation + obj *otg.BgpAttributesCustomCommunity + marshaller marshalBgpAttributesCustomCommunity + unMarshaller unMarshalBgpAttributesCustomCommunity +} + +func NewBgpAttributesCustomCommunity() BgpAttributesCustomCommunity { + obj := bgpAttributesCustomCommunity{obj: &otg.BgpAttributesCustomCommunity{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesCustomCommunity) msg() *otg.BgpAttributesCustomCommunity { + return obj.obj +} + +func (obj *bgpAttributesCustomCommunity) setMsg(msg *otg.BgpAttributesCustomCommunity) BgpAttributesCustomCommunity { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesCustomCommunity struct { + obj *bgpAttributesCustomCommunity +} + +type marshalBgpAttributesCustomCommunity interface { + // ToProto marshals BgpAttributesCustomCommunity to protobuf object *otg.BgpAttributesCustomCommunity + ToProto() (*otg.BgpAttributesCustomCommunity, error) + // ToPbText marshals BgpAttributesCustomCommunity to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesCustomCommunity to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesCustomCommunity to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesCustomCommunity struct { + obj *bgpAttributesCustomCommunity +} + +type unMarshalBgpAttributesCustomCommunity interface { + // FromProto unmarshals BgpAttributesCustomCommunity from protobuf object *otg.BgpAttributesCustomCommunity + FromProto(msg *otg.BgpAttributesCustomCommunity) (BgpAttributesCustomCommunity, error) + // FromPbText unmarshals BgpAttributesCustomCommunity from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesCustomCommunity from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesCustomCommunity from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesCustomCommunity) Marshal() marshalBgpAttributesCustomCommunity { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesCustomCommunity{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesCustomCommunity) Unmarshal() unMarshalBgpAttributesCustomCommunity { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesCustomCommunity{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesCustomCommunity) ToProto() (*otg.BgpAttributesCustomCommunity, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesCustomCommunity) FromProto(msg *otg.BgpAttributesCustomCommunity) (BgpAttributesCustomCommunity, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesCustomCommunity) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesCustomCommunity) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesCustomCommunity) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesCustomCommunity) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesCustomCommunity) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesCustomCommunity) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesCustomCommunity) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesCustomCommunity) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesCustomCommunity) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesCustomCommunity) Clone() (BgpAttributesCustomCommunity, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesCustomCommunity() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesCustomCommunity is user defined COMMUNITY attribute containing 2 byte AS and custom 2 byte value defined by the administrator of the domain. +type BgpAttributesCustomCommunity interface { + Validation + // msg marshals BgpAttributesCustomCommunity to protobuf object *otg.BgpAttributesCustomCommunity + // and doesn't set defaults + msg() *otg.BgpAttributesCustomCommunity + // setMsg unmarshals BgpAttributesCustomCommunity from protobuf object *otg.BgpAttributesCustomCommunity + // and doesn't set defaults + setMsg(*otg.BgpAttributesCustomCommunity) BgpAttributesCustomCommunity + // provides marshal interface + Marshal() marshalBgpAttributesCustomCommunity + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesCustomCommunity + // validate validates BgpAttributesCustomCommunity + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesCustomCommunity, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // AsNumber returns uint32, set in BgpAttributesCustomCommunity. + AsNumber() uint32 + // SetAsNumber assigns uint32 provided by user to BgpAttributesCustomCommunity + SetAsNumber(value uint32) BgpAttributesCustomCommunity + // HasAsNumber checks if AsNumber has been set in BgpAttributesCustomCommunity + HasAsNumber() bool + // Custom returns string, set in BgpAttributesCustomCommunity. + Custom() string + // SetCustom assigns string provided by user to BgpAttributesCustomCommunity + SetCustom(value string) BgpAttributesCustomCommunity + // HasCustom checks if Custom has been set in BgpAttributesCustomCommunity + HasCustom() bool +} + +// First two octets of the community value containing a 2 byte AS number. +// AsNumber returns a uint32 +func (obj *bgpAttributesCustomCommunity) AsNumber() uint32 { + + return *obj.obj.AsNumber + +} + +// First two octets of the community value containing a 2 byte AS number. +// AsNumber returns a uint32 +func (obj *bgpAttributesCustomCommunity) HasAsNumber() bool { + return obj.obj.AsNumber != nil +} + +// First two octets of the community value containing a 2 byte AS number. +// SetAsNumber sets the uint32 value in the BgpAttributesCustomCommunity object +func (obj *bgpAttributesCustomCommunity) SetAsNumber(value uint32) BgpAttributesCustomCommunity { + + obj.obj.AsNumber = &value + return obj +} + +// Last two octets of the community value in hex. If user provides less than 4 hex bytes, it should be left-padded with 0s. +// Custom returns a string +func (obj *bgpAttributesCustomCommunity) Custom() string { + + return *obj.obj.Custom + +} + +// Last two octets of the community value in hex. If user provides less than 4 hex bytes, it should be left-padded with 0s. +// Custom returns a string +func (obj *bgpAttributesCustomCommunity) HasCustom() bool { + return obj.obj.Custom != nil +} + +// Last two octets of the community value in hex. If user provides less than 4 hex bytes, it should be left-padded with 0s. +// SetCustom sets the string value in the BgpAttributesCustomCommunity object +func (obj *bgpAttributesCustomCommunity) SetCustom(value string) BgpAttributesCustomCommunity { + + obj.obj.Custom = &value + return obj +} + +func (obj *bgpAttributesCustomCommunity) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.AsNumber != nil { + + if *obj.obj.AsNumber > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesCustomCommunity.AsNumber <= 65535 but Got %d", *obj.obj.AsNumber)) + } + + } + + if obj.obj.Custom != nil { + + if len(*obj.obj.Custom) > 4 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "None <= length of BgpAttributesCustomCommunity.Custom <= 4 but Got %d", + len(*obj.obj.Custom))) + } + + } + +} + +func (obj *bgpAttributesCustomCommunity) setDefault() { + if obj.obj.AsNumber == nil { + obj.SetAsNumber(0) + } + if obj.obj.Custom == nil { + obj.SetCustom("0000") + } + +} diff --git a/gosnappi/bgp_attributes_four_byte_as_path_segment.go b/gosnappi/bgp_attributes_four_byte_as_path_segment.go new file mode 100644 index 00000000..36e5c6f3 --- /dev/null +++ b/gosnappi/bgp_attributes_four_byte_as_path_segment.go @@ -0,0 +1,361 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesFourByteAsPathSegment ***** +type bgpAttributesFourByteAsPathSegment struct { + validation + obj *otg.BgpAttributesFourByteAsPathSegment + marshaller marshalBgpAttributesFourByteAsPathSegment + unMarshaller unMarshalBgpAttributesFourByteAsPathSegment +} + +func NewBgpAttributesFourByteAsPathSegment() BgpAttributesFourByteAsPathSegment { + obj := bgpAttributesFourByteAsPathSegment{obj: &otg.BgpAttributesFourByteAsPathSegment{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesFourByteAsPathSegment) msg() *otg.BgpAttributesFourByteAsPathSegment { + return obj.obj +} + +func (obj *bgpAttributesFourByteAsPathSegment) setMsg(msg *otg.BgpAttributesFourByteAsPathSegment) BgpAttributesFourByteAsPathSegment { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesFourByteAsPathSegment struct { + obj *bgpAttributesFourByteAsPathSegment +} + +type marshalBgpAttributesFourByteAsPathSegment interface { + // ToProto marshals BgpAttributesFourByteAsPathSegment to protobuf object *otg.BgpAttributesFourByteAsPathSegment + ToProto() (*otg.BgpAttributesFourByteAsPathSegment, error) + // ToPbText marshals BgpAttributesFourByteAsPathSegment to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesFourByteAsPathSegment to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesFourByteAsPathSegment to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesFourByteAsPathSegment struct { + obj *bgpAttributesFourByteAsPathSegment +} + +type unMarshalBgpAttributesFourByteAsPathSegment interface { + // FromProto unmarshals BgpAttributesFourByteAsPathSegment from protobuf object *otg.BgpAttributesFourByteAsPathSegment + FromProto(msg *otg.BgpAttributesFourByteAsPathSegment) (BgpAttributesFourByteAsPathSegment, error) + // FromPbText unmarshals BgpAttributesFourByteAsPathSegment from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesFourByteAsPathSegment from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesFourByteAsPathSegment from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesFourByteAsPathSegment) Marshal() marshalBgpAttributesFourByteAsPathSegment { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesFourByteAsPathSegment{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesFourByteAsPathSegment) Unmarshal() unMarshalBgpAttributesFourByteAsPathSegment { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesFourByteAsPathSegment{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesFourByteAsPathSegment) ToProto() (*otg.BgpAttributesFourByteAsPathSegment, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesFourByteAsPathSegment) FromProto(msg *otg.BgpAttributesFourByteAsPathSegment) (BgpAttributesFourByteAsPathSegment, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesFourByteAsPathSegment) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesFourByteAsPathSegment) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesFourByteAsPathSegment) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesFourByteAsPathSegment) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesFourByteAsPathSegment) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesFourByteAsPathSegment) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesFourByteAsPathSegment) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesFourByteAsPathSegment) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesFourByteAsPathSegment) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesFourByteAsPathSegment) Clone() (BgpAttributesFourByteAsPathSegment, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesFourByteAsPathSegment() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesFourByteAsPathSegment is configuration for a single BGP AS path segment containing 4 byte AS numbers. +type BgpAttributesFourByteAsPathSegment interface { + Validation + // msg marshals BgpAttributesFourByteAsPathSegment to protobuf object *otg.BgpAttributesFourByteAsPathSegment + // and doesn't set defaults + msg() *otg.BgpAttributesFourByteAsPathSegment + // setMsg unmarshals BgpAttributesFourByteAsPathSegment from protobuf object *otg.BgpAttributesFourByteAsPathSegment + // and doesn't set defaults + setMsg(*otg.BgpAttributesFourByteAsPathSegment) BgpAttributesFourByteAsPathSegment + // provides marshal interface + Marshal() marshalBgpAttributesFourByteAsPathSegment + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesFourByteAsPathSegment + // validate validates BgpAttributesFourByteAsPathSegment + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesFourByteAsPathSegment, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns BgpAttributesFourByteAsPathSegmentTypeEnum, set in BgpAttributesFourByteAsPathSegment + Type() BgpAttributesFourByteAsPathSegmentTypeEnum + // SetType assigns BgpAttributesFourByteAsPathSegmentTypeEnum provided by user to BgpAttributesFourByteAsPathSegment + SetType(value BgpAttributesFourByteAsPathSegmentTypeEnum) BgpAttributesFourByteAsPathSegment + // HasType checks if Type has been set in BgpAttributesFourByteAsPathSegment + HasType() bool + // AsNumbers returns []uint32, set in BgpAttributesFourByteAsPathSegment. + AsNumbers() []uint32 + // SetAsNumbers assigns []uint32 provided by user to BgpAttributesFourByteAsPathSegment + SetAsNumbers(value []uint32) BgpAttributesFourByteAsPathSegment +} + +type BgpAttributesFourByteAsPathSegmentTypeEnum string + +// Enum of Type on BgpAttributesFourByteAsPathSegment +var BgpAttributesFourByteAsPathSegmentType = struct { + AS_SEQ BgpAttributesFourByteAsPathSegmentTypeEnum + AS_SET BgpAttributesFourByteAsPathSegmentTypeEnum + AS_CONFED_SEQ BgpAttributesFourByteAsPathSegmentTypeEnum + AS_CONFED_SET BgpAttributesFourByteAsPathSegmentTypeEnum +}{ + AS_SEQ: BgpAttributesFourByteAsPathSegmentTypeEnum("as_seq"), + AS_SET: BgpAttributesFourByteAsPathSegmentTypeEnum("as_set"), + AS_CONFED_SEQ: BgpAttributesFourByteAsPathSegmentTypeEnum("as_confed_seq"), + AS_CONFED_SET: BgpAttributesFourByteAsPathSegmentTypeEnum("as_confed_set"), +} + +func (obj *bgpAttributesFourByteAsPathSegment) Type() BgpAttributesFourByteAsPathSegmentTypeEnum { + return BgpAttributesFourByteAsPathSegmentTypeEnum(obj.obj.Type.Enum().String()) +} + +// AS sequence is the most common type of AS_PATH, it contains the list +// of ASNs starting with the most recent ASN being added read from left +// to right. +// The other three AS_PATH types are used for Confederations +// - AS_SET is the type of AS_PATH attribute that summarizes routes using +// using the aggregate-address command, allowing AS_PATHs to be summarized +// in the update as well. +// - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most +// recent ASN to be added reading left to right +// - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent +// in BGP Updates. +// Type returns a string +func (obj *bgpAttributesFourByteAsPathSegment) HasType() bool { + return obj.obj.Type != nil +} + +func (obj *bgpAttributesFourByteAsPathSegment) SetType(value BgpAttributesFourByteAsPathSegmentTypeEnum) BgpAttributesFourByteAsPathSegment { + intValue, ok := otg.BgpAttributesFourByteAsPathSegment_Type_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAttributesFourByteAsPathSegmentTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpAttributesFourByteAsPathSegment_Type_Enum(intValue) + obj.obj.Type = &enumValue + + return obj +} + +// The 4 byte AS numbers in this AS path segment. +// AsNumbers returns a []uint32 +func (obj *bgpAttributesFourByteAsPathSegment) AsNumbers() []uint32 { + if obj.obj.AsNumbers == nil { + obj.obj.AsNumbers = make([]uint32, 0) + } + return obj.obj.AsNumbers +} + +// The 4 byte AS numbers in this AS path segment. +// SetAsNumbers sets the []uint32 value in the BgpAttributesFourByteAsPathSegment object +func (obj *bgpAttributesFourByteAsPathSegment) SetAsNumbers(value []uint32) BgpAttributesFourByteAsPathSegment { + + if obj.obj.AsNumbers == nil { + obj.obj.AsNumbers = make([]uint32, 0) + } + obj.obj.AsNumbers = value + + return obj +} + +func (obj *bgpAttributesFourByteAsPathSegment) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpAttributesFourByteAsPathSegment) setDefault() { + if obj.obj.Type == nil { + obj.SetType(BgpAttributesFourByteAsPathSegmentType.AS_SEQ) + + } + +} diff --git a/gosnappi/bgp_attributes_local_preference.go b/gosnappi/bgp_attributes_local_preference.go new file mode 100644 index 00000000..a88f465c --- /dev/null +++ b/gosnappi/bgp_attributes_local_preference.go @@ -0,0 +1,312 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesLocalPreference ***** +type bgpAttributesLocalPreference struct { + validation + obj *otg.BgpAttributesLocalPreference + marshaller marshalBgpAttributesLocalPreference + unMarshaller unMarshalBgpAttributesLocalPreference +} + +func NewBgpAttributesLocalPreference() BgpAttributesLocalPreference { + obj := bgpAttributesLocalPreference{obj: &otg.BgpAttributesLocalPreference{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesLocalPreference) msg() *otg.BgpAttributesLocalPreference { + return obj.obj +} + +func (obj *bgpAttributesLocalPreference) setMsg(msg *otg.BgpAttributesLocalPreference) BgpAttributesLocalPreference { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesLocalPreference struct { + obj *bgpAttributesLocalPreference +} + +type marshalBgpAttributesLocalPreference interface { + // ToProto marshals BgpAttributesLocalPreference to protobuf object *otg.BgpAttributesLocalPreference + ToProto() (*otg.BgpAttributesLocalPreference, error) + // ToPbText marshals BgpAttributesLocalPreference to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesLocalPreference to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesLocalPreference to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesLocalPreference struct { + obj *bgpAttributesLocalPreference +} + +type unMarshalBgpAttributesLocalPreference interface { + // FromProto unmarshals BgpAttributesLocalPreference from protobuf object *otg.BgpAttributesLocalPreference + FromProto(msg *otg.BgpAttributesLocalPreference) (BgpAttributesLocalPreference, error) + // FromPbText unmarshals BgpAttributesLocalPreference from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesLocalPreference from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesLocalPreference from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesLocalPreference) Marshal() marshalBgpAttributesLocalPreference { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesLocalPreference{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesLocalPreference) Unmarshal() unMarshalBgpAttributesLocalPreference { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesLocalPreference{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesLocalPreference) ToProto() (*otg.BgpAttributesLocalPreference, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesLocalPreference) FromProto(msg *otg.BgpAttributesLocalPreference) (BgpAttributesLocalPreference, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesLocalPreference) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesLocalPreference) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesLocalPreference) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesLocalPreference) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesLocalPreference) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesLocalPreference) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesLocalPreference) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesLocalPreference) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesLocalPreference) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesLocalPreference) Clone() (BgpAttributesLocalPreference, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesLocalPreference() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesLocalPreference is optional LOCAL_PREFERENCE attribute sent to the peer to indicate the degree of preference +// for externally learned routes.This should be included only for internal peers.It is +// used for the selection of the path for the traffic leaving the AS.The route with the +// highest local preference value is preferred. +type BgpAttributesLocalPreference interface { + Validation + // msg marshals BgpAttributesLocalPreference to protobuf object *otg.BgpAttributesLocalPreference + // and doesn't set defaults + msg() *otg.BgpAttributesLocalPreference + // setMsg unmarshals BgpAttributesLocalPreference from protobuf object *otg.BgpAttributesLocalPreference + // and doesn't set defaults + setMsg(*otg.BgpAttributesLocalPreference) BgpAttributesLocalPreference + // provides marshal interface + Marshal() marshalBgpAttributesLocalPreference + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesLocalPreference + // validate validates BgpAttributesLocalPreference + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesLocalPreference, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Value returns uint32, set in BgpAttributesLocalPreference. + Value() uint32 + // SetValue assigns uint32 provided by user to BgpAttributesLocalPreference + SetValue(value uint32) BgpAttributesLocalPreference + // HasValue checks if Value has been set in BgpAttributesLocalPreference + HasValue() bool +} + +// Value to be set in the LOCAL_PREFERENCE attribute The multi exit discriminator (MED) value used for route selection sent to the peer. +// Value returns a uint32 +func (obj *bgpAttributesLocalPreference) Value() uint32 { + + return *obj.obj.Value + +} + +// Value to be set in the LOCAL_PREFERENCE attribute The multi exit discriminator (MED) value used for route selection sent to the peer. +// Value returns a uint32 +func (obj *bgpAttributesLocalPreference) HasValue() bool { + return obj.obj.Value != nil +} + +// Value to be set in the LOCAL_PREFERENCE attribute The multi exit discriminator (MED) value used for route selection sent to the peer. +// SetValue sets the uint32 value in the BgpAttributesLocalPreference object +func (obj *bgpAttributesLocalPreference) SetValue(value uint32) BgpAttributesLocalPreference { + + obj.obj.Value = &value + return obj +} + +func (obj *bgpAttributesLocalPreference) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpAttributesLocalPreference) setDefault() { + if obj.obj.Value == nil { + obj.SetValue(100) + } + +} diff --git a/gosnappi/bgp_attributes_mp_reach_nlri.go b/gosnappi/bgp_attributes_mp_reach_nlri.go new file mode 100644 index 00000000..61c82272 --- /dev/null +++ b/gosnappi/bgp_attributes_mp_reach_nlri.go @@ -0,0 +1,727 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesMpReachNlri ***** +type bgpAttributesMpReachNlri struct { + validation + obj *otg.BgpAttributesMpReachNlri + marshaller marshalBgpAttributesMpReachNlri + unMarshaller unMarshalBgpAttributesMpReachNlri + nextHopHolder BgpAttributesNextHop + ipv4UnicastHolder BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter + ipv6UnicastHolder BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter + ipv4SrpolicyHolder BgpIpv4SrPolicyNLRIPrefix + ipv6SrpolicyHolder BgpIpv6SrPolicyNLRIPrefix +} + +func NewBgpAttributesMpReachNlri() BgpAttributesMpReachNlri { + obj := bgpAttributesMpReachNlri{obj: &otg.BgpAttributesMpReachNlri{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesMpReachNlri) msg() *otg.BgpAttributesMpReachNlri { + return obj.obj +} + +func (obj *bgpAttributesMpReachNlri) setMsg(msg *otg.BgpAttributesMpReachNlri) BgpAttributesMpReachNlri { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesMpReachNlri struct { + obj *bgpAttributesMpReachNlri +} + +type marshalBgpAttributesMpReachNlri interface { + // ToProto marshals BgpAttributesMpReachNlri to protobuf object *otg.BgpAttributesMpReachNlri + ToProto() (*otg.BgpAttributesMpReachNlri, error) + // ToPbText marshals BgpAttributesMpReachNlri to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesMpReachNlri to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesMpReachNlri to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesMpReachNlri struct { + obj *bgpAttributesMpReachNlri +} + +type unMarshalBgpAttributesMpReachNlri interface { + // FromProto unmarshals BgpAttributesMpReachNlri from protobuf object *otg.BgpAttributesMpReachNlri + FromProto(msg *otg.BgpAttributesMpReachNlri) (BgpAttributesMpReachNlri, error) + // FromPbText unmarshals BgpAttributesMpReachNlri from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesMpReachNlri from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesMpReachNlri from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesMpReachNlri) Marshal() marshalBgpAttributesMpReachNlri { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesMpReachNlri{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesMpReachNlri) Unmarshal() unMarshalBgpAttributesMpReachNlri { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesMpReachNlri{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesMpReachNlri) ToProto() (*otg.BgpAttributesMpReachNlri, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesMpReachNlri) FromProto(msg *otg.BgpAttributesMpReachNlri) (BgpAttributesMpReachNlri, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesMpReachNlri) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesMpReachNlri) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesMpReachNlri) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesMpReachNlri) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesMpReachNlri) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesMpReachNlri) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesMpReachNlri) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesMpReachNlri) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesMpReachNlri) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesMpReachNlri) Clone() (BgpAttributesMpReachNlri, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesMpReachNlri() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesMpReachNlri) setNil() { + obj.nextHopHolder = nil + obj.ipv4UnicastHolder = nil + obj.ipv6UnicastHolder = nil + obj.ipv4SrpolicyHolder = nil + obj.ipv6SrpolicyHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesMpReachNlri is the MP_REACH attribute is an optional attribute which can be included in the attributes of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3. +// The following AFI / SAFI combinations are supported: +// - IPv4 Unicast with AFI as 1 and SAFI as 1 +// - IPv6 Unicast with AFI as 2 and SAFI as 1 +// - Segment Routing Policy for IPv4 Unicast with AFI as 1 and SAFI as 73 ( draft-ietf-idr-sr-policy-safi-02 Section 2.1 ) +// - Segment Routing Policy for IPv6 Unicast with AFI as 2 and SAFI as 73 +type BgpAttributesMpReachNlri interface { + Validation + // msg marshals BgpAttributesMpReachNlri to protobuf object *otg.BgpAttributesMpReachNlri + // and doesn't set defaults + msg() *otg.BgpAttributesMpReachNlri + // setMsg unmarshals BgpAttributesMpReachNlri from protobuf object *otg.BgpAttributesMpReachNlri + // and doesn't set defaults + setMsg(*otg.BgpAttributesMpReachNlri) BgpAttributesMpReachNlri + // provides marshal interface + Marshal() marshalBgpAttributesMpReachNlri + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesMpReachNlri + // validate validates BgpAttributesMpReachNlri + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesMpReachNlri, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // NextHop returns BgpAttributesNextHop, set in BgpAttributesMpReachNlri. + // BgpAttributesNextHop is next hop to be sent inside MP_REACH NLRI or as the NEXT_HOP attribute if advertised as traditional NLRI. + NextHop() BgpAttributesNextHop + // SetNextHop assigns BgpAttributesNextHop provided by user to BgpAttributesMpReachNlri. + // BgpAttributesNextHop is next hop to be sent inside MP_REACH NLRI or as the NEXT_HOP attribute if advertised as traditional NLRI. + SetNextHop(value BgpAttributesNextHop) BgpAttributesMpReachNlri + // HasNextHop checks if NextHop has been set in BgpAttributesMpReachNlri + HasNextHop() bool + // Choice returns BgpAttributesMpReachNlriChoiceEnum, set in BgpAttributesMpReachNlri + Choice() BgpAttributesMpReachNlriChoiceEnum + // setChoice assigns BgpAttributesMpReachNlriChoiceEnum provided by user to BgpAttributesMpReachNlri + setChoice(value BgpAttributesMpReachNlriChoiceEnum) BgpAttributesMpReachNlri + // Ipv4Unicast returns BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIterIter, set in BgpAttributesMpReachNlri + Ipv4Unicast() BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter + // Ipv6Unicast returns BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIterIter, set in BgpAttributesMpReachNlri + Ipv6Unicast() BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter + // Ipv4Srpolicy returns BgpIpv4SrPolicyNLRIPrefix, set in BgpAttributesMpReachNlri. + // BgpIpv4SrPolicyNLRIPrefix is iPv4 Segment Routing Policy NLRI Prefix. + Ipv4Srpolicy() BgpIpv4SrPolicyNLRIPrefix + // SetIpv4Srpolicy assigns BgpIpv4SrPolicyNLRIPrefix provided by user to BgpAttributesMpReachNlri. + // BgpIpv4SrPolicyNLRIPrefix is iPv4 Segment Routing Policy NLRI Prefix. + SetIpv4Srpolicy(value BgpIpv4SrPolicyNLRIPrefix) BgpAttributesMpReachNlri + // HasIpv4Srpolicy checks if Ipv4Srpolicy has been set in BgpAttributesMpReachNlri + HasIpv4Srpolicy() bool + // Ipv6Srpolicy returns BgpIpv6SrPolicyNLRIPrefix, set in BgpAttributesMpReachNlri. + // BgpIpv6SrPolicyNLRIPrefix is one IPv6 Segment Routing Policy NLRI Prefix. + Ipv6Srpolicy() BgpIpv6SrPolicyNLRIPrefix + // SetIpv6Srpolicy assigns BgpIpv6SrPolicyNLRIPrefix provided by user to BgpAttributesMpReachNlri. + // BgpIpv6SrPolicyNLRIPrefix is one IPv6 Segment Routing Policy NLRI Prefix. + SetIpv6Srpolicy(value BgpIpv6SrPolicyNLRIPrefix) BgpAttributesMpReachNlri + // HasIpv6Srpolicy checks if Ipv6Srpolicy has been set in BgpAttributesMpReachNlri + HasIpv6Srpolicy() bool + setNil() +} + +// description is TBD +// NextHop returns a BgpAttributesNextHop +func (obj *bgpAttributesMpReachNlri) NextHop() BgpAttributesNextHop { + if obj.obj.NextHop == nil { + obj.obj.NextHop = NewBgpAttributesNextHop().msg() + } + if obj.nextHopHolder == nil { + obj.nextHopHolder = &bgpAttributesNextHop{obj: obj.obj.NextHop} + } + return obj.nextHopHolder +} + +// description is TBD +// NextHop returns a BgpAttributesNextHop +func (obj *bgpAttributesMpReachNlri) HasNextHop() bool { + return obj.obj.NextHop != nil +} + +// description is TBD +// SetNextHop sets the BgpAttributesNextHop value in the BgpAttributesMpReachNlri object +func (obj *bgpAttributesMpReachNlri) SetNextHop(value BgpAttributesNextHop) BgpAttributesMpReachNlri { + + obj.nextHopHolder = nil + obj.obj.NextHop = value.msg() + + return obj +} + +type BgpAttributesMpReachNlriChoiceEnum string + +// Enum of Choice on BgpAttributesMpReachNlri +var BgpAttributesMpReachNlriChoice = struct { + IPV4_UNICAST BgpAttributesMpReachNlriChoiceEnum + IPV6_UNICAST BgpAttributesMpReachNlriChoiceEnum + IPV4_SRPOLICY BgpAttributesMpReachNlriChoiceEnum + IPV6_SRPOLICY BgpAttributesMpReachNlriChoiceEnum +}{ + IPV4_UNICAST: BgpAttributesMpReachNlriChoiceEnum("ipv4_unicast"), + IPV6_UNICAST: BgpAttributesMpReachNlriChoiceEnum("ipv6_unicast"), + IPV4_SRPOLICY: BgpAttributesMpReachNlriChoiceEnum("ipv4_srpolicy"), + IPV6_SRPOLICY: BgpAttributesMpReachNlriChoiceEnum("ipv6_srpolicy"), +} + +func (obj *bgpAttributesMpReachNlri) Choice() BgpAttributesMpReachNlriChoiceEnum { + return BgpAttributesMpReachNlriChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *bgpAttributesMpReachNlri) setChoice(value BgpAttributesMpReachNlriChoiceEnum) BgpAttributesMpReachNlri { + intValue, ok := otg.BgpAttributesMpReachNlri_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAttributesMpReachNlriChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpAttributesMpReachNlri_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ipv6Srpolicy = nil + obj.ipv6SrpolicyHolder = nil + obj.obj.Ipv4Srpolicy = nil + obj.ipv4SrpolicyHolder = nil + obj.obj.Ipv6Unicast = nil + obj.ipv6UnicastHolder = nil + obj.obj.Ipv4Unicast = nil + obj.ipv4UnicastHolder = nil + + if value == BgpAttributesMpReachNlriChoice.IPV4_UNICAST { + obj.obj.Ipv4Unicast = []*otg.BgpOneIpv4NLRIPrefix{} + } + + if value == BgpAttributesMpReachNlriChoice.IPV6_UNICAST { + obj.obj.Ipv6Unicast = []*otg.BgpOneIpv6NLRIPrefix{} + } + + if value == BgpAttributesMpReachNlriChoice.IPV4_SRPOLICY { + obj.obj.Ipv4Srpolicy = NewBgpIpv4SrPolicyNLRIPrefix().msg() + } + + if value == BgpAttributesMpReachNlriChoice.IPV6_SRPOLICY { + obj.obj.Ipv6Srpolicy = NewBgpIpv6SrPolicyNLRIPrefix().msg() + } + + return obj +} + +// List of IPv4 prefixes being sent in the IPv4 Unicast MPREACH_NLRI . +// Ipv4Unicast returns a []BgpOneIpv4NLRIPrefix +func (obj *bgpAttributesMpReachNlri) Ipv4Unicast() BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter { + if len(obj.obj.Ipv4Unicast) == 0 { + obj.setChoice(BgpAttributesMpReachNlriChoice.IPV4_UNICAST) + } + if obj.ipv4UnicastHolder == nil { + obj.ipv4UnicastHolder = newBgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter(&obj.obj.Ipv4Unicast).setMsg(obj) + } + return obj.ipv4UnicastHolder +} + +type bgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter struct { + obj *bgpAttributesMpReachNlri + bgpOneIpv4NLRIPrefixSlice []BgpOneIpv4NLRIPrefix + fieldPtr *[]*otg.BgpOneIpv4NLRIPrefix +} + +func newBgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter(ptr *[]*otg.BgpOneIpv4NLRIPrefix) BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter { + return &bgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter{fieldPtr: ptr} +} + +type BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter interface { + setMsg(*bgpAttributesMpReachNlri) BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter + Items() []BgpOneIpv4NLRIPrefix + Add() BgpOneIpv4NLRIPrefix + Append(items ...BgpOneIpv4NLRIPrefix) BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter + Set(index int, newObj BgpOneIpv4NLRIPrefix) BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter + Clear() BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter + clearHolderSlice() BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter + appendHolderSlice(item BgpOneIpv4NLRIPrefix) BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter +} + +func (obj *bgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter) setMsg(msg *bgpAttributesMpReachNlri) BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpOneIpv4NLRIPrefix{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter) Items() []BgpOneIpv4NLRIPrefix { + return obj.bgpOneIpv4NLRIPrefixSlice +} + +func (obj *bgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter) Add() BgpOneIpv4NLRIPrefix { + newObj := &otg.BgpOneIpv4NLRIPrefix{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpOneIpv4NLRIPrefix{obj: newObj} + newLibObj.setDefault() + obj.bgpOneIpv4NLRIPrefixSlice = append(obj.bgpOneIpv4NLRIPrefixSlice, newLibObj) + return newLibObj +} + +func (obj *bgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter) Append(items ...BgpOneIpv4NLRIPrefix) BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpOneIpv4NLRIPrefixSlice = append(obj.bgpOneIpv4NLRIPrefixSlice, item) + } + return obj +} + +func (obj *bgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter) Set(index int, newObj BgpOneIpv4NLRIPrefix) BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpOneIpv4NLRIPrefixSlice[index] = newObj + return obj +} +func (obj *bgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter) Clear() BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpOneIpv4NLRIPrefix{} + obj.bgpOneIpv4NLRIPrefixSlice = []BgpOneIpv4NLRIPrefix{} + } + return obj +} +func (obj *bgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter) clearHolderSlice() BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter { + if len(obj.bgpOneIpv4NLRIPrefixSlice) > 0 { + obj.bgpOneIpv4NLRIPrefixSlice = []BgpOneIpv4NLRIPrefix{} + } + return obj +} +func (obj *bgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter) appendHolderSlice(item BgpOneIpv4NLRIPrefix) BgpAttributesMpReachNlriBgpOneIpv4NLRIPrefixIter { + obj.bgpOneIpv4NLRIPrefixSlice = append(obj.bgpOneIpv4NLRIPrefixSlice, item) + return obj +} + +// List of IPv6 prefixes being sent in the IPv6 Unicast MPREACH_NLRI . +// Ipv6Unicast returns a []BgpOneIpv6NLRIPrefix +func (obj *bgpAttributesMpReachNlri) Ipv6Unicast() BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter { + if len(obj.obj.Ipv6Unicast) == 0 { + obj.setChoice(BgpAttributesMpReachNlriChoice.IPV6_UNICAST) + } + if obj.ipv6UnicastHolder == nil { + obj.ipv6UnicastHolder = newBgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter(&obj.obj.Ipv6Unicast).setMsg(obj) + } + return obj.ipv6UnicastHolder +} + +type bgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter struct { + obj *bgpAttributesMpReachNlri + bgpOneIpv6NLRIPrefixSlice []BgpOneIpv6NLRIPrefix + fieldPtr *[]*otg.BgpOneIpv6NLRIPrefix +} + +func newBgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter(ptr *[]*otg.BgpOneIpv6NLRIPrefix) BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter { + return &bgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter{fieldPtr: ptr} +} + +type BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter interface { + setMsg(*bgpAttributesMpReachNlri) BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter + Items() []BgpOneIpv6NLRIPrefix + Add() BgpOneIpv6NLRIPrefix + Append(items ...BgpOneIpv6NLRIPrefix) BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter + Set(index int, newObj BgpOneIpv6NLRIPrefix) BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter + Clear() BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter + clearHolderSlice() BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter + appendHolderSlice(item BgpOneIpv6NLRIPrefix) BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter +} + +func (obj *bgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter) setMsg(msg *bgpAttributesMpReachNlri) BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpOneIpv6NLRIPrefix{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter) Items() []BgpOneIpv6NLRIPrefix { + return obj.bgpOneIpv6NLRIPrefixSlice +} + +func (obj *bgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter) Add() BgpOneIpv6NLRIPrefix { + newObj := &otg.BgpOneIpv6NLRIPrefix{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpOneIpv6NLRIPrefix{obj: newObj} + newLibObj.setDefault() + obj.bgpOneIpv6NLRIPrefixSlice = append(obj.bgpOneIpv6NLRIPrefixSlice, newLibObj) + return newLibObj +} + +func (obj *bgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter) Append(items ...BgpOneIpv6NLRIPrefix) BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpOneIpv6NLRIPrefixSlice = append(obj.bgpOneIpv6NLRIPrefixSlice, item) + } + return obj +} + +func (obj *bgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter) Set(index int, newObj BgpOneIpv6NLRIPrefix) BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpOneIpv6NLRIPrefixSlice[index] = newObj + return obj +} +func (obj *bgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter) Clear() BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpOneIpv6NLRIPrefix{} + obj.bgpOneIpv6NLRIPrefixSlice = []BgpOneIpv6NLRIPrefix{} + } + return obj +} +func (obj *bgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter) clearHolderSlice() BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter { + if len(obj.bgpOneIpv6NLRIPrefixSlice) > 0 { + obj.bgpOneIpv6NLRIPrefixSlice = []BgpOneIpv6NLRIPrefix{} + } + return obj +} +func (obj *bgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter) appendHolderSlice(item BgpOneIpv6NLRIPrefix) BgpAttributesMpReachNlriBgpOneIpv6NLRIPrefixIter { + obj.bgpOneIpv6NLRIPrefixSlice = append(obj.bgpOneIpv6NLRIPrefixSlice, item) + return obj +} + +// IPv4 endpoint with Segment Routing Policy being sent in the IPv4 MPREACH_NLRI . +// Ipv4Srpolicy returns a BgpIpv4SrPolicyNLRIPrefix +func (obj *bgpAttributesMpReachNlri) Ipv4Srpolicy() BgpIpv4SrPolicyNLRIPrefix { + if obj.obj.Ipv4Srpolicy == nil { + obj.setChoice(BgpAttributesMpReachNlriChoice.IPV4_SRPOLICY) + } + if obj.ipv4SrpolicyHolder == nil { + obj.ipv4SrpolicyHolder = &bgpIpv4SrPolicyNLRIPrefix{obj: obj.obj.Ipv4Srpolicy} + } + return obj.ipv4SrpolicyHolder +} + +// IPv4 endpoint with Segment Routing Policy being sent in the IPv4 MPREACH_NLRI . +// Ipv4Srpolicy returns a BgpIpv4SrPolicyNLRIPrefix +func (obj *bgpAttributesMpReachNlri) HasIpv4Srpolicy() bool { + return obj.obj.Ipv4Srpolicy != nil +} + +// IPv4 endpoint with Segment Routing Policy being sent in the IPv4 MPREACH_NLRI . +// SetIpv4Srpolicy sets the BgpIpv4SrPolicyNLRIPrefix value in the BgpAttributesMpReachNlri object +func (obj *bgpAttributesMpReachNlri) SetIpv4Srpolicy(value BgpIpv4SrPolicyNLRIPrefix) BgpAttributesMpReachNlri { + obj.setChoice(BgpAttributesMpReachNlriChoice.IPV4_SRPOLICY) + obj.ipv4SrpolicyHolder = nil + obj.obj.Ipv4Srpolicy = value.msg() + + return obj +} + +// IPv6 endpoint with Segment Routing Policy being sent in the IPv6 MPREACH_NLRI . +// Ipv6Srpolicy returns a BgpIpv6SrPolicyNLRIPrefix +func (obj *bgpAttributesMpReachNlri) Ipv6Srpolicy() BgpIpv6SrPolicyNLRIPrefix { + if obj.obj.Ipv6Srpolicy == nil { + obj.setChoice(BgpAttributesMpReachNlriChoice.IPV6_SRPOLICY) + } + if obj.ipv6SrpolicyHolder == nil { + obj.ipv6SrpolicyHolder = &bgpIpv6SrPolicyNLRIPrefix{obj: obj.obj.Ipv6Srpolicy} + } + return obj.ipv6SrpolicyHolder +} + +// IPv6 endpoint with Segment Routing Policy being sent in the IPv6 MPREACH_NLRI . +// Ipv6Srpolicy returns a BgpIpv6SrPolicyNLRIPrefix +func (obj *bgpAttributesMpReachNlri) HasIpv6Srpolicy() bool { + return obj.obj.Ipv6Srpolicy != nil +} + +// IPv6 endpoint with Segment Routing Policy being sent in the IPv6 MPREACH_NLRI . +// SetIpv6Srpolicy sets the BgpIpv6SrPolicyNLRIPrefix value in the BgpAttributesMpReachNlri object +func (obj *bgpAttributesMpReachNlri) SetIpv6Srpolicy(value BgpIpv6SrPolicyNLRIPrefix) BgpAttributesMpReachNlri { + obj.setChoice(BgpAttributesMpReachNlriChoice.IPV6_SRPOLICY) + obj.ipv6SrpolicyHolder = nil + obj.obj.Ipv6Srpolicy = value.msg() + + return obj +} + +func (obj *bgpAttributesMpReachNlri) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.NextHop != nil { + + obj.NextHop().validateObj(vObj, set_default) + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface BgpAttributesMpReachNlri") + } + + if len(obj.obj.Ipv4Unicast) != 0 { + + if set_default { + obj.Ipv4Unicast().clearHolderSlice() + for _, item := range obj.obj.Ipv4Unicast { + obj.Ipv4Unicast().appendHolderSlice(&bgpOneIpv4NLRIPrefix{obj: item}) + } + } + for _, item := range obj.Ipv4Unicast().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ipv6Unicast) != 0 { + + if set_default { + obj.Ipv6Unicast().clearHolderSlice() + for _, item := range obj.obj.Ipv6Unicast { + obj.Ipv6Unicast().appendHolderSlice(&bgpOneIpv6NLRIPrefix{obj: item}) + } + } + for _, item := range obj.Ipv6Unicast().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Ipv4Srpolicy != nil { + + obj.Ipv4Srpolicy().validateObj(vObj, set_default) + } + + if obj.obj.Ipv6Srpolicy != nil { + + obj.Ipv6Srpolicy().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesMpReachNlri) setDefault() { + var choices_set int = 0 + var choice BgpAttributesMpReachNlriChoiceEnum + + if len(obj.obj.Ipv4Unicast) > 0 { + choices_set += 1 + choice = BgpAttributesMpReachNlriChoice.IPV4_UNICAST + } + + if len(obj.obj.Ipv6Unicast) > 0 { + choices_set += 1 + choice = BgpAttributesMpReachNlriChoice.IPV6_UNICAST + } + + if obj.obj.Ipv4Srpolicy != nil { + choices_set += 1 + choice = BgpAttributesMpReachNlriChoice.IPV4_SRPOLICY + } + + if obj.obj.Ipv6Srpolicy != nil { + choices_set += 1 + choice = BgpAttributesMpReachNlriChoice.IPV6_SRPOLICY + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpAttributesMpReachNlri") + } + } else { + intVal := otg.BgpAttributesMpReachNlri_Choice_Enum_value[string(choice)] + enumValue := otg.BgpAttributesMpReachNlri_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_attributes_mp_unreach_nlri.go b/gosnappi/bgp_attributes_mp_unreach_nlri.go new file mode 100644 index 00000000..f3f209d4 --- /dev/null +++ b/gosnappi/bgp_attributes_mp_unreach_nlri.go @@ -0,0 +1,687 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesMpUnreachNlri ***** +type bgpAttributesMpUnreachNlri struct { + validation + obj *otg.BgpAttributesMpUnreachNlri + marshaller marshalBgpAttributesMpUnreachNlri + unMarshaller unMarshalBgpAttributesMpUnreachNlri + ipv4UnicastHolder BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter + ipv6UnicastHolder BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter + ipv4SrpolicyHolder BgpIpv4SrPolicyNLRIPrefix + ipv6SrpolicyHolder BgpIpv6SrPolicyNLRIPrefix +} + +func NewBgpAttributesMpUnreachNlri() BgpAttributesMpUnreachNlri { + obj := bgpAttributesMpUnreachNlri{obj: &otg.BgpAttributesMpUnreachNlri{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesMpUnreachNlri) msg() *otg.BgpAttributesMpUnreachNlri { + return obj.obj +} + +func (obj *bgpAttributesMpUnreachNlri) setMsg(msg *otg.BgpAttributesMpUnreachNlri) BgpAttributesMpUnreachNlri { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesMpUnreachNlri struct { + obj *bgpAttributesMpUnreachNlri +} + +type marshalBgpAttributesMpUnreachNlri interface { + // ToProto marshals BgpAttributesMpUnreachNlri to protobuf object *otg.BgpAttributesMpUnreachNlri + ToProto() (*otg.BgpAttributesMpUnreachNlri, error) + // ToPbText marshals BgpAttributesMpUnreachNlri to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesMpUnreachNlri to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesMpUnreachNlri to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesMpUnreachNlri struct { + obj *bgpAttributesMpUnreachNlri +} + +type unMarshalBgpAttributesMpUnreachNlri interface { + // FromProto unmarshals BgpAttributesMpUnreachNlri from protobuf object *otg.BgpAttributesMpUnreachNlri + FromProto(msg *otg.BgpAttributesMpUnreachNlri) (BgpAttributesMpUnreachNlri, error) + // FromPbText unmarshals BgpAttributesMpUnreachNlri from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesMpUnreachNlri from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesMpUnreachNlri from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesMpUnreachNlri) Marshal() marshalBgpAttributesMpUnreachNlri { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesMpUnreachNlri{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesMpUnreachNlri) Unmarshal() unMarshalBgpAttributesMpUnreachNlri { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesMpUnreachNlri{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesMpUnreachNlri) ToProto() (*otg.BgpAttributesMpUnreachNlri, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesMpUnreachNlri) FromProto(msg *otg.BgpAttributesMpUnreachNlri) (BgpAttributesMpUnreachNlri, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesMpUnreachNlri) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesMpUnreachNlri) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesMpUnreachNlri) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesMpUnreachNlri) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesMpUnreachNlri) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesMpUnreachNlri) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesMpUnreachNlri) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesMpUnreachNlri) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesMpUnreachNlri) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesMpUnreachNlri) Clone() (BgpAttributesMpUnreachNlri, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesMpUnreachNlri() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesMpUnreachNlri) setNil() { + obj.ipv4UnicastHolder = nil + obj.ipv6UnicastHolder = nil + obj.ipv4SrpolicyHolder = nil + obj.ipv6SrpolicyHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesMpUnreachNlri is the MP_UNREACH attribute is an optional attribute which can be included in the attributes of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3. +// The following AFI / SAFI combinations are supported: +// - IPv4 Unicast with AFI as 1 and SAFI as 1 +// - IPv6 Unicast with AFI as 2 and SAFI as 1 +// - Segment Routing Policy for IPv4 Unicast with AFI as 1 and SAFI as 73 (draft-ietf-idr-sr-policy-safi-02 Section 2.1) +// - Segment Routing Policy for IPv6 Unicast with AFI as 2 and SAFI as 73 +type BgpAttributesMpUnreachNlri interface { + Validation + // msg marshals BgpAttributesMpUnreachNlri to protobuf object *otg.BgpAttributesMpUnreachNlri + // and doesn't set defaults + msg() *otg.BgpAttributesMpUnreachNlri + // setMsg unmarshals BgpAttributesMpUnreachNlri from protobuf object *otg.BgpAttributesMpUnreachNlri + // and doesn't set defaults + setMsg(*otg.BgpAttributesMpUnreachNlri) BgpAttributesMpUnreachNlri + // provides marshal interface + Marshal() marshalBgpAttributesMpUnreachNlri + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesMpUnreachNlri + // validate validates BgpAttributesMpUnreachNlri + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesMpUnreachNlri, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpAttributesMpUnreachNlriChoiceEnum, set in BgpAttributesMpUnreachNlri + Choice() BgpAttributesMpUnreachNlriChoiceEnum + // setChoice assigns BgpAttributesMpUnreachNlriChoiceEnum provided by user to BgpAttributesMpUnreachNlri + setChoice(value BgpAttributesMpUnreachNlriChoiceEnum) BgpAttributesMpUnreachNlri + // HasChoice checks if Choice has been set in BgpAttributesMpUnreachNlri + HasChoice() bool + // Ipv4Unicast returns BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIterIter, set in BgpAttributesMpUnreachNlri + Ipv4Unicast() BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter + // Ipv6Unicast returns BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIterIter, set in BgpAttributesMpUnreachNlri + Ipv6Unicast() BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter + // Ipv4Srpolicy returns BgpIpv4SrPolicyNLRIPrefix, set in BgpAttributesMpUnreachNlri. + // BgpIpv4SrPolicyNLRIPrefix is iPv4 Segment Routing Policy NLRI Prefix. + Ipv4Srpolicy() BgpIpv4SrPolicyNLRIPrefix + // SetIpv4Srpolicy assigns BgpIpv4SrPolicyNLRIPrefix provided by user to BgpAttributesMpUnreachNlri. + // BgpIpv4SrPolicyNLRIPrefix is iPv4 Segment Routing Policy NLRI Prefix. + SetIpv4Srpolicy(value BgpIpv4SrPolicyNLRIPrefix) BgpAttributesMpUnreachNlri + // HasIpv4Srpolicy checks if Ipv4Srpolicy has been set in BgpAttributesMpUnreachNlri + HasIpv4Srpolicy() bool + // Ipv6Srpolicy returns BgpIpv6SrPolicyNLRIPrefix, set in BgpAttributesMpUnreachNlri. + // BgpIpv6SrPolicyNLRIPrefix is one IPv6 Segment Routing Policy NLRI Prefix. + Ipv6Srpolicy() BgpIpv6SrPolicyNLRIPrefix + // SetIpv6Srpolicy assigns BgpIpv6SrPolicyNLRIPrefix provided by user to BgpAttributesMpUnreachNlri. + // BgpIpv6SrPolicyNLRIPrefix is one IPv6 Segment Routing Policy NLRI Prefix. + SetIpv6Srpolicy(value BgpIpv6SrPolicyNLRIPrefix) BgpAttributesMpUnreachNlri + // HasIpv6Srpolicy checks if Ipv6Srpolicy has been set in BgpAttributesMpUnreachNlri + HasIpv6Srpolicy() bool + setNil() +} + +type BgpAttributesMpUnreachNlriChoiceEnum string + +// Enum of Choice on BgpAttributesMpUnreachNlri +var BgpAttributesMpUnreachNlriChoice = struct { + IPV4_UNICAST BgpAttributesMpUnreachNlriChoiceEnum + IPV6_UNICAST BgpAttributesMpUnreachNlriChoiceEnum + IPV4_SRPOLICY BgpAttributesMpUnreachNlriChoiceEnum + IPV6_SRPOLICY BgpAttributesMpUnreachNlriChoiceEnum +}{ + IPV4_UNICAST: BgpAttributesMpUnreachNlriChoiceEnum("ipv4_unicast"), + IPV6_UNICAST: BgpAttributesMpUnreachNlriChoiceEnum("ipv6_unicast"), + IPV4_SRPOLICY: BgpAttributesMpUnreachNlriChoiceEnum("ipv4_srpolicy"), + IPV6_SRPOLICY: BgpAttributesMpUnreachNlriChoiceEnum("ipv6_srpolicy"), +} + +func (obj *bgpAttributesMpUnreachNlri) Choice() BgpAttributesMpUnreachNlriChoiceEnum { + return BgpAttributesMpUnreachNlriChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The AFI and SAFI to be sent in the MPUNREACH_NLRI in the Update. +// Choice returns a string +func (obj *bgpAttributesMpUnreachNlri) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpAttributesMpUnreachNlri) setChoice(value BgpAttributesMpUnreachNlriChoiceEnum) BgpAttributesMpUnreachNlri { + intValue, ok := otg.BgpAttributesMpUnreachNlri_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAttributesMpUnreachNlriChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpAttributesMpUnreachNlri_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ipv6Srpolicy = nil + obj.ipv6SrpolicyHolder = nil + obj.obj.Ipv4Srpolicy = nil + obj.ipv4SrpolicyHolder = nil + obj.obj.Ipv6Unicast = nil + obj.ipv6UnicastHolder = nil + obj.obj.Ipv4Unicast = nil + obj.ipv4UnicastHolder = nil + + if value == BgpAttributesMpUnreachNlriChoice.IPV4_UNICAST { + obj.obj.Ipv4Unicast = []*otg.BgpOneIpv4NLRIPrefix{} + } + + if value == BgpAttributesMpUnreachNlriChoice.IPV6_UNICAST { + obj.obj.Ipv6Unicast = []*otg.BgpOneIpv6NLRIPrefix{} + } + + if value == BgpAttributesMpUnreachNlriChoice.IPV4_SRPOLICY { + obj.obj.Ipv4Srpolicy = NewBgpIpv4SrPolicyNLRIPrefix().msg() + } + + if value == BgpAttributesMpUnreachNlriChoice.IPV6_SRPOLICY { + obj.obj.Ipv6Srpolicy = NewBgpIpv6SrPolicyNLRIPrefix().msg() + } + + return obj +} + +// List of IPv4 prefixes being sent in the IPv4 Unicast MPUNREACH_NLRI . +// Ipv4Unicast returns a []BgpOneIpv4NLRIPrefix +func (obj *bgpAttributesMpUnreachNlri) Ipv4Unicast() BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter { + if len(obj.obj.Ipv4Unicast) == 0 { + obj.setChoice(BgpAttributesMpUnreachNlriChoice.IPV4_UNICAST) + } + if obj.ipv4UnicastHolder == nil { + obj.ipv4UnicastHolder = newBgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter(&obj.obj.Ipv4Unicast).setMsg(obj) + } + return obj.ipv4UnicastHolder +} + +type bgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter struct { + obj *bgpAttributesMpUnreachNlri + bgpOneIpv4NLRIPrefixSlice []BgpOneIpv4NLRIPrefix + fieldPtr *[]*otg.BgpOneIpv4NLRIPrefix +} + +func newBgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter(ptr *[]*otg.BgpOneIpv4NLRIPrefix) BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter { + return &bgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter{fieldPtr: ptr} +} + +type BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter interface { + setMsg(*bgpAttributesMpUnreachNlri) BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter + Items() []BgpOneIpv4NLRIPrefix + Add() BgpOneIpv4NLRIPrefix + Append(items ...BgpOneIpv4NLRIPrefix) BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter + Set(index int, newObj BgpOneIpv4NLRIPrefix) BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter + Clear() BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter + clearHolderSlice() BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter + appendHolderSlice(item BgpOneIpv4NLRIPrefix) BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter +} + +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter) setMsg(msg *bgpAttributesMpUnreachNlri) BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpOneIpv4NLRIPrefix{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter) Items() []BgpOneIpv4NLRIPrefix { + return obj.bgpOneIpv4NLRIPrefixSlice +} + +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter) Add() BgpOneIpv4NLRIPrefix { + newObj := &otg.BgpOneIpv4NLRIPrefix{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpOneIpv4NLRIPrefix{obj: newObj} + newLibObj.setDefault() + obj.bgpOneIpv4NLRIPrefixSlice = append(obj.bgpOneIpv4NLRIPrefixSlice, newLibObj) + return newLibObj +} + +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter) Append(items ...BgpOneIpv4NLRIPrefix) BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpOneIpv4NLRIPrefixSlice = append(obj.bgpOneIpv4NLRIPrefixSlice, item) + } + return obj +} + +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter) Set(index int, newObj BgpOneIpv4NLRIPrefix) BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpOneIpv4NLRIPrefixSlice[index] = newObj + return obj +} +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter) Clear() BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpOneIpv4NLRIPrefix{} + obj.bgpOneIpv4NLRIPrefixSlice = []BgpOneIpv4NLRIPrefix{} + } + return obj +} +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter) clearHolderSlice() BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter { + if len(obj.bgpOneIpv4NLRIPrefixSlice) > 0 { + obj.bgpOneIpv4NLRIPrefixSlice = []BgpOneIpv4NLRIPrefix{} + } + return obj +} +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter) appendHolderSlice(item BgpOneIpv4NLRIPrefix) BgpAttributesMpUnreachNlriBgpOneIpv4NLRIPrefixIter { + obj.bgpOneIpv4NLRIPrefixSlice = append(obj.bgpOneIpv4NLRIPrefixSlice, item) + return obj +} + +// List of IPv6 prefixes being sent in the IPv6 Unicast MPUNREACH_NLRI . +// Ipv6Unicast returns a []BgpOneIpv6NLRIPrefix +func (obj *bgpAttributesMpUnreachNlri) Ipv6Unicast() BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter { + if len(obj.obj.Ipv6Unicast) == 0 { + obj.setChoice(BgpAttributesMpUnreachNlriChoice.IPV6_UNICAST) + } + if obj.ipv6UnicastHolder == nil { + obj.ipv6UnicastHolder = newBgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter(&obj.obj.Ipv6Unicast).setMsg(obj) + } + return obj.ipv6UnicastHolder +} + +type bgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter struct { + obj *bgpAttributesMpUnreachNlri + bgpOneIpv6NLRIPrefixSlice []BgpOneIpv6NLRIPrefix + fieldPtr *[]*otg.BgpOneIpv6NLRIPrefix +} + +func newBgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter(ptr *[]*otg.BgpOneIpv6NLRIPrefix) BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter { + return &bgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter{fieldPtr: ptr} +} + +type BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter interface { + setMsg(*bgpAttributesMpUnreachNlri) BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter + Items() []BgpOneIpv6NLRIPrefix + Add() BgpOneIpv6NLRIPrefix + Append(items ...BgpOneIpv6NLRIPrefix) BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter + Set(index int, newObj BgpOneIpv6NLRIPrefix) BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter + Clear() BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter + clearHolderSlice() BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter + appendHolderSlice(item BgpOneIpv6NLRIPrefix) BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter +} + +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter) setMsg(msg *bgpAttributesMpUnreachNlri) BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpOneIpv6NLRIPrefix{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter) Items() []BgpOneIpv6NLRIPrefix { + return obj.bgpOneIpv6NLRIPrefixSlice +} + +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter) Add() BgpOneIpv6NLRIPrefix { + newObj := &otg.BgpOneIpv6NLRIPrefix{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpOneIpv6NLRIPrefix{obj: newObj} + newLibObj.setDefault() + obj.bgpOneIpv6NLRIPrefixSlice = append(obj.bgpOneIpv6NLRIPrefixSlice, newLibObj) + return newLibObj +} + +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter) Append(items ...BgpOneIpv6NLRIPrefix) BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpOneIpv6NLRIPrefixSlice = append(obj.bgpOneIpv6NLRIPrefixSlice, item) + } + return obj +} + +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter) Set(index int, newObj BgpOneIpv6NLRIPrefix) BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpOneIpv6NLRIPrefixSlice[index] = newObj + return obj +} +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter) Clear() BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpOneIpv6NLRIPrefix{} + obj.bgpOneIpv6NLRIPrefixSlice = []BgpOneIpv6NLRIPrefix{} + } + return obj +} +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter) clearHolderSlice() BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter { + if len(obj.bgpOneIpv6NLRIPrefixSlice) > 0 { + obj.bgpOneIpv6NLRIPrefixSlice = []BgpOneIpv6NLRIPrefix{} + } + return obj +} +func (obj *bgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter) appendHolderSlice(item BgpOneIpv6NLRIPrefix) BgpAttributesMpUnreachNlriBgpOneIpv6NLRIPrefixIter { + obj.bgpOneIpv6NLRIPrefixSlice = append(obj.bgpOneIpv6NLRIPrefixSlice, item) + return obj +} + +// IPv4 endpoint with Segment Routing Policy being sent in the IPv4 MPUNREACH_NLRI . +// Ipv4Srpolicy returns a BgpIpv4SrPolicyNLRIPrefix +func (obj *bgpAttributesMpUnreachNlri) Ipv4Srpolicy() BgpIpv4SrPolicyNLRIPrefix { + if obj.obj.Ipv4Srpolicy == nil { + obj.setChoice(BgpAttributesMpUnreachNlriChoice.IPV4_SRPOLICY) + } + if obj.ipv4SrpolicyHolder == nil { + obj.ipv4SrpolicyHolder = &bgpIpv4SrPolicyNLRIPrefix{obj: obj.obj.Ipv4Srpolicy} + } + return obj.ipv4SrpolicyHolder +} + +// IPv4 endpoint with Segment Routing Policy being sent in the IPv4 MPUNREACH_NLRI . +// Ipv4Srpolicy returns a BgpIpv4SrPolicyNLRIPrefix +func (obj *bgpAttributesMpUnreachNlri) HasIpv4Srpolicy() bool { + return obj.obj.Ipv4Srpolicy != nil +} + +// IPv4 endpoint with Segment Routing Policy being sent in the IPv4 MPUNREACH_NLRI . +// SetIpv4Srpolicy sets the BgpIpv4SrPolicyNLRIPrefix value in the BgpAttributesMpUnreachNlri object +func (obj *bgpAttributesMpUnreachNlri) SetIpv4Srpolicy(value BgpIpv4SrPolicyNLRIPrefix) BgpAttributesMpUnreachNlri { + obj.setChoice(BgpAttributesMpUnreachNlriChoice.IPV4_SRPOLICY) + obj.ipv4SrpolicyHolder = nil + obj.obj.Ipv4Srpolicy = value.msg() + + return obj +} + +// IPv6 endpoint with Segment Routing Policy being sent in the IPv4 MPUNREACH_NLRI . +// Ipv6Srpolicy returns a BgpIpv6SrPolicyNLRIPrefix +func (obj *bgpAttributesMpUnreachNlri) Ipv6Srpolicy() BgpIpv6SrPolicyNLRIPrefix { + if obj.obj.Ipv6Srpolicy == nil { + obj.setChoice(BgpAttributesMpUnreachNlriChoice.IPV6_SRPOLICY) + } + if obj.ipv6SrpolicyHolder == nil { + obj.ipv6SrpolicyHolder = &bgpIpv6SrPolicyNLRIPrefix{obj: obj.obj.Ipv6Srpolicy} + } + return obj.ipv6SrpolicyHolder +} + +// IPv6 endpoint with Segment Routing Policy being sent in the IPv4 MPUNREACH_NLRI . +// Ipv6Srpolicy returns a BgpIpv6SrPolicyNLRIPrefix +func (obj *bgpAttributesMpUnreachNlri) HasIpv6Srpolicy() bool { + return obj.obj.Ipv6Srpolicy != nil +} + +// IPv6 endpoint with Segment Routing Policy being sent in the IPv4 MPUNREACH_NLRI . +// SetIpv6Srpolicy sets the BgpIpv6SrPolicyNLRIPrefix value in the BgpAttributesMpUnreachNlri object +func (obj *bgpAttributesMpUnreachNlri) SetIpv6Srpolicy(value BgpIpv6SrPolicyNLRIPrefix) BgpAttributesMpUnreachNlri { + obj.setChoice(BgpAttributesMpUnreachNlriChoice.IPV6_SRPOLICY) + obj.ipv6SrpolicyHolder = nil + obj.obj.Ipv6Srpolicy = value.msg() + + return obj +} + +func (obj *bgpAttributesMpUnreachNlri) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Ipv4Unicast) != 0 { + + if set_default { + obj.Ipv4Unicast().clearHolderSlice() + for _, item := range obj.obj.Ipv4Unicast { + obj.Ipv4Unicast().appendHolderSlice(&bgpOneIpv4NLRIPrefix{obj: item}) + } + } + for _, item := range obj.Ipv4Unicast().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ipv6Unicast) != 0 { + + if set_default { + obj.Ipv6Unicast().clearHolderSlice() + for _, item := range obj.obj.Ipv6Unicast { + obj.Ipv6Unicast().appendHolderSlice(&bgpOneIpv6NLRIPrefix{obj: item}) + } + } + for _, item := range obj.Ipv6Unicast().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Ipv4Srpolicy != nil { + + obj.Ipv4Srpolicy().validateObj(vObj, set_default) + } + + if obj.obj.Ipv6Srpolicy != nil { + + obj.Ipv6Srpolicy().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesMpUnreachNlri) setDefault() { + var choices_set int = 0 + var choice BgpAttributesMpUnreachNlriChoiceEnum + + if len(obj.obj.Ipv4Unicast) > 0 { + choices_set += 1 + choice = BgpAttributesMpUnreachNlriChoice.IPV4_UNICAST + } + + if len(obj.obj.Ipv6Unicast) > 0 { + choices_set += 1 + choice = BgpAttributesMpUnreachNlriChoice.IPV6_UNICAST + } + + if obj.obj.Ipv4Srpolicy != nil { + choices_set += 1 + choice = BgpAttributesMpUnreachNlriChoice.IPV4_SRPOLICY + } + + if obj.obj.Ipv6Srpolicy != nil { + choices_set += 1 + choice = BgpAttributesMpUnreachNlriChoice.IPV6_SRPOLICY + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpAttributesMpUnreachNlri") + } + } else { + intVal := otg.BgpAttributesMpUnreachNlri_Choice_Enum_value[string(choice)] + enumValue := otg.BgpAttributesMpUnreachNlri_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_attributes_multi_exit_discriminator.go b/gosnappi/bgp_attributes_multi_exit_discriminator.go new file mode 100644 index 00000000..1ae656e7 --- /dev/null +++ b/gosnappi/bgp_attributes_multi_exit_discriminator.go @@ -0,0 +1,309 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesMultiExitDiscriminator ***** +type bgpAttributesMultiExitDiscriminator struct { + validation + obj *otg.BgpAttributesMultiExitDiscriminator + marshaller marshalBgpAttributesMultiExitDiscriminator + unMarshaller unMarshalBgpAttributesMultiExitDiscriminator +} + +func NewBgpAttributesMultiExitDiscriminator() BgpAttributesMultiExitDiscriminator { + obj := bgpAttributesMultiExitDiscriminator{obj: &otg.BgpAttributesMultiExitDiscriminator{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesMultiExitDiscriminator) msg() *otg.BgpAttributesMultiExitDiscriminator { + return obj.obj +} + +func (obj *bgpAttributesMultiExitDiscriminator) setMsg(msg *otg.BgpAttributesMultiExitDiscriminator) BgpAttributesMultiExitDiscriminator { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesMultiExitDiscriminator struct { + obj *bgpAttributesMultiExitDiscriminator +} + +type marshalBgpAttributesMultiExitDiscriminator interface { + // ToProto marshals BgpAttributesMultiExitDiscriminator to protobuf object *otg.BgpAttributesMultiExitDiscriminator + ToProto() (*otg.BgpAttributesMultiExitDiscriminator, error) + // ToPbText marshals BgpAttributesMultiExitDiscriminator to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesMultiExitDiscriminator to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesMultiExitDiscriminator to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesMultiExitDiscriminator struct { + obj *bgpAttributesMultiExitDiscriminator +} + +type unMarshalBgpAttributesMultiExitDiscriminator interface { + // FromProto unmarshals BgpAttributesMultiExitDiscriminator from protobuf object *otg.BgpAttributesMultiExitDiscriminator + FromProto(msg *otg.BgpAttributesMultiExitDiscriminator) (BgpAttributesMultiExitDiscriminator, error) + // FromPbText unmarshals BgpAttributesMultiExitDiscriminator from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesMultiExitDiscriminator from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesMultiExitDiscriminator from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesMultiExitDiscriminator) Marshal() marshalBgpAttributesMultiExitDiscriminator { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesMultiExitDiscriminator{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesMultiExitDiscriminator) Unmarshal() unMarshalBgpAttributesMultiExitDiscriminator { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesMultiExitDiscriminator{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesMultiExitDiscriminator) ToProto() (*otg.BgpAttributesMultiExitDiscriminator, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesMultiExitDiscriminator) FromProto(msg *otg.BgpAttributesMultiExitDiscriminator) (BgpAttributesMultiExitDiscriminator, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesMultiExitDiscriminator) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesMultiExitDiscriminator) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesMultiExitDiscriminator) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesMultiExitDiscriminator) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesMultiExitDiscriminator) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesMultiExitDiscriminator) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesMultiExitDiscriminator) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesMultiExitDiscriminator) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesMultiExitDiscriminator) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesMultiExitDiscriminator) Clone() (BgpAttributesMultiExitDiscriminator, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesMultiExitDiscriminator() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesMultiExitDiscriminator is optional MULTI_EXIT_DISCRIMINATOR attribute sent to the peer to help in the route selection process. +type BgpAttributesMultiExitDiscriminator interface { + Validation + // msg marshals BgpAttributesMultiExitDiscriminator to protobuf object *otg.BgpAttributesMultiExitDiscriminator + // and doesn't set defaults + msg() *otg.BgpAttributesMultiExitDiscriminator + // setMsg unmarshals BgpAttributesMultiExitDiscriminator from protobuf object *otg.BgpAttributesMultiExitDiscriminator + // and doesn't set defaults + setMsg(*otg.BgpAttributesMultiExitDiscriminator) BgpAttributesMultiExitDiscriminator + // provides marshal interface + Marshal() marshalBgpAttributesMultiExitDiscriminator + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesMultiExitDiscriminator + // validate validates BgpAttributesMultiExitDiscriminator + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesMultiExitDiscriminator, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Value returns uint32, set in BgpAttributesMultiExitDiscriminator. + Value() uint32 + // SetValue assigns uint32 provided by user to BgpAttributesMultiExitDiscriminator + SetValue(value uint32) BgpAttributesMultiExitDiscriminator + // HasValue checks if Value has been set in BgpAttributesMultiExitDiscriminator + HasValue() bool +} + +// The multi exit discriminator (MED) value used for route selection sent to the peer. +// Value returns a uint32 +func (obj *bgpAttributesMultiExitDiscriminator) Value() uint32 { + + return *obj.obj.Value + +} + +// The multi exit discriminator (MED) value used for route selection sent to the peer. +// Value returns a uint32 +func (obj *bgpAttributesMultiExitDiscriminator) HasValue() bool { + return obj.obj.Value != nil +} + +// The multi exit discriminator (MED) value used for route selection sent to the peer. +// SetValue sets the uint32 value in the BgpAttributesMultiExitDiscriminator object +func (obj *bgpAttributesMultiExitDiscriminator) SetValue(value uint32) BgpAttributesMultiExitDiscriminator { + + obj.obj.Value = &value + return obj +} + +func (obj *bgpAttributesMultiExitDiscriminator) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpAttributesMultiExitDiscriminator) setDefault() { + if obj.obj.Value == nil { + obj.SetValue(0) + } + +} diff --git a/gosnappi/bgp_attributes_next_hop.go b/gosnappi/bgp_attributes_next_hop.go new file mode 100644 index 00000000..480ca861 --- /dev/null +++ b/gosnappi/bgp_attributes_next_hop.go @@ -0,0 +1,504 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesNextHop ***** +type bgpAttributesNextHop struct { + validation + obj *otg.BgpAttributesNextHop + marshaller marshalBgpAttributesNextHop + unMarshaller unMarshalBgpAttributesNextHop + ipv6TwoAddressesHolder BgpAttributesNextHopIpv6TwoAddresses +} + +func NewBgpAttributesNextHop() BgpAttributesNextHop { + obj := bgpAttributesNextHop{obj: &otg.BgpAttributesNextHop{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesNextHop) msg() *otg.BgpAttributesNextHop { + return obj.obj +} + +func (obj *bgpAttributesNextHop) setMsg(msg *otg.BgpAttributesNextHop) BgpAttributesNextHop { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesNextHop struct { + obj *bgpAttributesNextHop +} + +type marshalBgpAttributesNextHop interface { + // ToProto marshals BgpAttributesNextHop to protobuf object *otg.BgpAttributesNextHop + ToProto() (*otg.BgpAttributesNextHop, error) + // ToPbText marshals BgpAttributesNextHop to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesNextHop to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesNextHop to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesNextHop struct { + obj *bgpAttributesNextHop +} + +type unMarshalBgpAttributesNextHop interface { + // FromProto unmarshals BgpAttributesNextHop from protobuf object *otg.BgpAttributesNextHop + FromProto(msg *otg.BgpAttributesNextHop) (BgpAttributesNextHop, error) + // FromPbText unmarshals BgpAttributesNextHop from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesNextHop from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesNextHop from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesNextHop) Marshal() marshalBgpAttributesNextHop { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesNextHop{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesNextHop) Unmarshal() unMarshalBgpAttributesNextHop { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesNextHop{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesNextHop) ToProto() (*otg.BgpAttributesNextHop, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesNextHop) FromProto(msg *otg.BgpAttributesNextHop) (BgpAttributesNextHop, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesNextHop) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesNextHop) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesNextHop) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesNextHop) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesNextHop) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesNextHop) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesNextHop) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesNextHop) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesNextHop) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesNextHop) Clone() (BgpAttributesNextHop, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesNextHop() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesNextHop) setNil() { + obj.ipv6TwoAddressesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesNextHop is next hop to be sent inside MP_REACH NLRI or as the NEXT_HOP attribute if advertised as traditional NLRI. +type BgpAttributesNextHop interface { + Validation + // msg marshals BgpAttributesNextHop to protobuf object *otg.BgpAttributesNextHop + // and doesn't set defaults + msg() *otg.BgpAttributesNextHop + // setMsg unmarshals BgpAttributesNextHop from protobuf object *otg.BgpAttributesNextHop + // and doesn't set defaults + setMsg(*otg.BgpAttributesNextHop) BgpAttributesNextHop + // provides marshal interface + Marshal() marshalBgpAttributesNextHop + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesNextHop + // validate validates BgpAttributesNextHop + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesNextHop, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpAttributesNextHopChoiceEnum, set in BgpAttributesNextHop + Choice() BgpAttributesNextHopChoiceEnum + // setChoice assigns BgpAttributesNextHopChoiceEnum provided by user to BgpAttributesNextHop + setChoice(value BgpAttributesNextHopChoiceEnum) BgpAttributesNextHop + // Ipv4 returns string, set in BgpAttributesNextHop. + Ipv4() string + // SetIpv4 assigns string provided by user to BgpAttributesNextHop + SetIpv4(value string) BgpAttributesNextHop + // HasIpv4 checks if Ipv4 has been set in BgpAttributesNextHop + HasIpv4() bool + // Ipv6 returns string, set in BgpAttributesNextHop. + Ipv6() string + // SetIpv6 assigns string provided by user to BgpAttributesNextHop + SetIpv6(value string) BgpAttributesNextHop + // HasIpv6 checks if Ipv6 has been set in BgpAttributesNextHop + HasIpv6() bool + // Ipv6TwoAddresses returns BgpAttributesNextHopIpv6TwoAddresses, set in BgpAttributesNextHop. + // BgpAttributesNextHopIpv6TwoAddresses is there is a specific scenario in which it is possible to receive a Global and Link Local address in the Next Hop + // field in a MP_REACH attribute or in the NEXT_HOP attribute(RFC2545: Section 3). + Ipv6TwoAddresses() BgpAttributesNextHopIpv6TwoAddresses + // SetIpv6TwoAddresses assigns BgpAttributesNextHopIpv6TwoAddresses provided by user to BgpAttributesNextHop. + // BgpAttributesNextHopIpv6TwoAddresses is there is a specific scenario in which it is possible to receive a Global and Link Local address in the Next Hop + // field in a MP_REACH attribute or in the NEXT_HOP attribute(RFC2545: Section 3). + SetIpv6TwoAddresses(value BgpAttributesNextHopIpv6TwoAddresses) BgpAttributesNextHop + // HasIpv6TwoAddresses checks if Ipv6TwoAddresses has been set in BgpAttributesNextHop + HasIpv6TwoAddresses() bool + setNil() +} + +type BgpAttributesNextHopChoiceEnum string + +// Enum of Choice on BgpAttributesNextHop +var BgpAttributesNextHopChoice = struct { + IPV4 BgpAttributesNextHopChoiceEnum + IPV6 BgpAttributesNextHopChoiceEnum + IPV6_TWO_ADDRESSES BgpAttributesNextHopChoiceEnum +}{ + IPV4: BgpAttributesNextHopChoiceEnum("ipv4"), + IPV6: BgpAttributesNextHopChoiceEnum("ipv6"), + IPV6_TWO_ADDRESSES: BgpAttributesNextHopChoiceEnum("ipv6_two_addresses"), +} + +func (obj *bgpAttributesNextHop) Choice() BgpAttributesNextHopChoiceEnum { + return BgpAttributesNextHopChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *bgpAttributesNextHop) setChoice(value BgpAttributesNextHopChoiceEnum) BgpAttributesNextHop { + intValue, ok := otg.BgpAttributesNextHop_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAttributesNextHopChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpAttributesNextHop_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ipv6TwoAddresses = nil + obj.ipv6TwoAddressesHolder = nil + obj.obj.Ipv6 = nil + obj.obj.Ipv4 = nil + + if value == BgpAttributesNextHopChoice.IPV4 { + defaultValue := "0.0.0.0" + obj.obj.Ipv4 = &defaultValue + } + + if value == BgpAttributesNextHopChoice.IPV6 { + defaultValue := "0::0" + obj.obj.Ipv6 = &defaultValue + } + + if value == BgpAttributesNextHopChoice.IPV6_TWO_ADDRESSES { + obj.obj.Ipv6TwoAddresses = NewBgpAttributesNextHopIpv6TwoAddresses().msg() + } + + return obj +} + +// The 4 byte IPv4 address of the next-hop from which the route was received. +// Ipv4 returns a string +func (obj *bgpAttributesNextHop) Ipv4() string { + + if obj.obj.Ipv4 == nil { + obj.setChoice(BgpAttributesNextHopChoice.IPV4) + } + + return *obj.obj.Ipv4 + +} + +// The 4 byte IPv4 address of the next-hop from which the route was received. +// Ipv4 returns a string +func (obj *bgpAttributesNextHop) HasIpv4() bool { + return obj.obj.Ipv4 != nil +} + +// The 4 byte IPv4 address of the next-hop from which the route was received. +// SetIpv4 sets the string value in the BgpAttributesNextHop object +func (obj *bgpAttributesNextHop) SetIpv4(value string) BgpAttributesNextHop { + obj.setChoice(BgpAttributesNextHopChoice.IPV4) + obj.obj.Ipv4 = &value + return obj +} + +// The 16 byte IPv6 address of the next-hop from which the route was received. +// Ipv6 returns a string +func (obj *bgpAttributesNextHop) Ipv6() string { + + if obj.obj.Ipv6 == nil { + obj.setChoice(BgpAttributesNextHopChoice.IPV6) + } + + return *obj.obj.Ipv6 + +} + +// The 16 byte IPv6 address of the next-hop from which the route was received. +// Ipv6 returns a string +func (obj *bgpAttributesNextHop) HasIpv6() bool { + return obj.obj.Ipv6 != nil +} + +// The 16 byte IPv6 address of the next-hop from which the route was received. +// SetIpv6 sets the string value in the BgpAttributesNextHop object +func (obj *bgpAttributesNextHop) SetIpv6(value string) BgpAttributesNextHop { + obj.setChoice(BgpAttributesNextHopChoice.IPV6) + obj.obj.Ipv6 = &value + return obj +} + +// description is TBD +// Ipv6TwoAddresses returns a BgpAttributesNextHopIpv6TwoAddresses +func (obj *bgpAttributesNextHop) Ipv6TwoAddresses() BgpAttributesNextHopIpv6TwoAddresses { + if obj.obj.Ipv6TwoAddresses == nil { + obj.setChoice(BgpAttributesNextHopChoice.IPV6_TWO_ADDRESSES) + } + if obj.ipv6TwoAddressesHolder == nil { + obj.ipv6TwoAddressesHolder = &bgpAttributesNextHopIpv6TwoAddresses{obj: obj.obj.Ipv6TwoAddresses} + } + return obj.ipv6TwoAddressesHolder +} + +// description is TBD +// Ipv6TwoAddresses returns a BgpAttributesNextHopIpv6TwoAddresses +func (obj *bgpAttributesNextHop) HasIpv6TwoAddresses() bool { + return obj.obj.Ipv6TwoAddresses != nil +} + +// description is TBD +// SetIpv6TwoAddresses sets the BgpAttributesNextHopIpv6TwoAddresses value in the BgpAttributesNextHop object +func (obj *bgpAttributesNextHop) SetIpv6TwoAddresses(value BgpAttributesNextHopIpv6TwoAddresses) BgpAttributesNextHop { + obj.setChoice(BgpAttributesNextHopChoice.IPV6_TWO_ADDRESSES) + obj.ipv6TwoAddressesHolder = nil + obj.obj.Ipv6TwoAddresses = value.msg() + + return obj +} + +func (obj *bgpAttributesNextHop) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface BgpAttributesNextHop") + } + + if obj.obj.Ipv4 != nil { + + err := obj.validateIpv4(obj.Ipv4()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesNextHop.Ipv4")) + } + + } + + if obj.obj.Ipv6 != nil { + + err := obj.validateIpv6(obj.Ipv6()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesNextHop.Ipv6")) + } + + } + + if obj.obj.Ipv6TwoAddresses != nil { + + obj.Ipv6TwoAddresses().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesNextHop) setDefault() { + var choices_set int = 0 + var choice BgpAttributesNextHopChoiceEnum + + if obj.obj.Ipv4 != nil { + choices_set += 1 + choice = BgpAttributesNextHopChoice.IPV4 + } + + if obj.obj.Ipv6 != nil { + choices_set += 1 + choice = BgpAttributesNextHopChoice.IPV6 + } + + if obj.obj.Ipv6TwoAddresses != nil { + choices_set += 1 + choice = BgpAttributesNextHopChoice.IPV6_TWO_ADDRESSES + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpAttributesNextHop") + } + } else { + intVal := otg.BgpAttributesNextHop_Choice_Enum_value[string(choice)] + enumValue := otg.BgpAttributesNextHop_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + + if obj.obj.Ipv4 == nil && choice == BgpAttributesNextHopChoice.IPV4 { + obj.SetIpv4("0.0.0.0") + } + if obj.obj.Ipv6 == nil && choice == BgpAttributesNextHopChoice.IPV6 { + obj.SetIpv6("0::0") + } + +} diff --git a/gosnappi/bgp_attributes_next_hop_ipv6_two_addresses.go b/gosnappi/bgp_attributes_next_hop_ipv6_two_addresses.go new file mode 100644 index 00000000..f63bcc86 --- /dev/null +++ b/gosnappi/bgp_attributes_next_hop_ipv6_two_addresses.go @@ -0,0 +1,359 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesNextHopIpv6TwoAddresses ***** +type bgpAttributesNextHopIpv6TwoAddresses struct { + validation + obj *otg.BgpAttributesNextHopIpv6TwoAddresses + marshaller marshalBgpAttributesNextHopIpv6TwoAddresses + unMarshaller unMarshalBgpAttributesNextHopIpv6TwoAddresses +} + +func NewBgpAttributesNextHopIpv6TwoAddresses() BgpAttributesNextHopIpv6TwoAddresses { + obj := bgpAttributesNextHopIpv6TwoAddresses{obj: &otg.BgpAttributesNextHopIpv6TwoAddresses{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesNextHopIpv6TwoAddresses) msg() *otg.BgpAttributesNextHopIpv6TwoAddresses { + return obj.obj +} + +func (obj *bgpAttributesNextHopIpv6TwoAddresses) setMsg(msg *otg.BgpAttributesNextHopIpv6TwoAddresses) BgpAttributesNextHopIpv6TwoAddresses { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesNextHopIpv6TwoAddresses struct { + obj *bgpAttributesNextHopIpv6TwoAddresses +} + +type marshalBgpAttributesNextHopIpv6TwoAddresses interface { + // ToProto marshals BgpAttributesNextHopIpv6TwoAddresses to protobuf object *otg.BgpAttributesNextHopIpv6TwoAddresses + ToProto() (*otg.BgpAttributesNextHopIpv6TwoAddresses, error) + // ToPbText marshals BgpAttributesNextHopIpv6TwoAddresses to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesNextHopIpv6TwoAddresses to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesNextHopIpv6TwoAddresses to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesNextHopIpv6TwoAddresses struct { + obj *bgpAttributesNextHopIpv6TwoAddresses +} + +type unMarshalBgpAttributesNextHopIpv6TwoAddresses interface { + // FromProto unmarshals BgpAttributesNextHopIpv6TwoAddresses from protobuf object *otg.BgpAttributesNextHopIpv6TwoAddresses + FromProto(msg *otg.BgpAttributesNextHopIpv6TwoAddresses) (BgpAttributesNextHopIpv6TwoAddresses, error) + // FromPbText unmarshals BgpAttributesNextHopIpv6TwoAddresses from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesNextHopIpv6TwoAddresses from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesNextHopIpv6TwoAddresses from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesNextHopIpv6TwoAddresses) Marshal() marshalBgpAttributesNextHopIpv6TwoAddresses { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesNextHopIpv6TwoAddresses{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesNextHopIpv6TwoAddresses) Unmarshal() unMarshalBgpAttributesNextHopIpv6TwoAddresses { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesNextHopIpv6TwoAddresses{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesNextHopIpv6TwoAddresses) ToProto() (*otg.BgpAttributesNextHopIpv6TwoAddresses, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesNextHopIpv6TwoAddresses) FromProto(msg *otg.BgpAttributesNextHopIpv6TwoAddresses) (BgpAttributesNextHopIpv6TwoAddresses, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesNextHopIpv6TwoAddresses) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesNextHopIpv6TwoAddresses) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesNextHopIpv6TwoAddresses) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesNextHopIpv6TwoAddresses) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesNextHopIpv6TwoAddresses) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesNextHopIpv6TwoAddresses) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesNextHopIpv6TwoAddresses) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesNextHopIpv6TwoAddresses) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesNextHopIpv6TwoAddresses) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesNextHopIpv6TwoAddresses) Clone() (BgpAttributesNextHopIpv6TwoAddresses, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesNextHopIpv6TwoAddresses() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesNextHopIpv6TwoAddresses is there is a specific scenario in which it is possible to receive a Global and Link Local address in the Next Hop +// field in a MP_REACH attribute or in the NEXT_HOP attribute(RFC2545: Section 3). +type BgpAttributesNextHopIpv6TwoAddresses interface { + Validation + // msg marshals BgpAttributesNextHopIpv6TwoAddresses to protobuf object *otg.BgpAttributesNextHopIpv6TwoAddresses + // and doesn't set defaults + msg() *otg.BgpAttributesNextHopIpv6TwoAddresses + // setMsg unmarshals BgpAttributesNextHopIpv6TwoAddresses from protobuf object *otg.BgpAttributesNextHopIpv6TwoAddresses + // and doesn't set defaults + setMsg(*otg.BgpAttributesNextHopIpv6TwoAddresses) BgpAttributesNextHopIpv6TwoAddresses + // provides marshal interface + Marshal() marshalBgpAttributesNextHopIpv6TwoAddresses + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesNextHopIpv6TwoAddresses + // validate validates BgpAttributesNextHopIpv6TwoAddresses + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesNextHopIpv6TwoAddresses, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // First returns string, set in BgpAttributesNextHopIpv6TwoAddresses. + First() string + // SetFirst assigns string provided by user to BgpAttributesNextHopIpv6TwoAddresses + SetFirst(value string) BgpAttributesNextHopIpv6TwoAddresses + // HasFirst checks if First has been set in BgpAttributesNextHopIpv6TwoAddresses + HasFirst() bool + // Second returns string, set in BgpAttributesNextHopIpv6TwoAddresses. + Second() string + // SetSecond assigns string provided by user to BgpAttributesNextHopIpv6TwoAddresses + SetSecond(value string) BgpAttributesNextHopIpv6TwoAddresses + // HasSecond checks if Second has been set in BgpAttributesNextHopIpv6TwoAddresses + HasSecond() bool +} + +// The first IPv6 next hop in the 32 byte IPv6 Next Hop. +// First returns a string +func (obj *bgpAttributesNextHopIpv6TwoAddresses) First() string { + + return *obj.obj.First + +} + +// The first IPv6 next hop in the 32 byte IPv6 Next Hop. +// First returns a string +func (obj *bgpAttributesNextHopIpv6TwoAddresses) HasFirst() bool { + return obj.obj.First != nil +} + +// The first IPv6 next hop in the 32 byte IPv6 Next Hop. +// SetFirst sets the string value in the BgpAttributesNextHopIpv6TwoAddresses object +func (obj *bgpAttributesNextHopIpv6TwoAddresses) SetFirst(value string) BgpAttributesNextHopIpv6TwoAddresses { + + obj.obj.First = &value + return obj +} + +// The second IPv6 next hop in the 32 byte IPv6 Next Hop. +// Second returns a string +func (obj *bgpAttributesNextHopIpv6TwoAddresses) Second() string { + + return *obj.obj.Second + +} + +// The second IPv6 next hop in the 32 byte IPv6 Next Hop. +// Second returns a string +func (obj *bgpAttributesNextHopIpv6TwoAddresses) HasSecond() bool { + return obj.obj.Second != nil +} + +// The second IPv6 next hop in the 32 byte IPv6 Next Hop. +// SetSecond sets the string value in the BgpAttributesNextHopIpv6TwoAddresses object +func (obj *bgpAttributesNextHopIpv6TwoAddresses) SetSecond(value string) BgpAttributesNextHopIpv6TwoAddresses { + + obj.obj.Second = &value + return obj +} + +func (obj *bgpAttributesNextHopIpv6TwoAddresses) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.First != nil { + + err := obj.validateIpv6(obj.First()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesNextHopIpv6TwoAddresses.First")) + } + + } + + if obj.obj.Second != nil { + + err := obj.validateIpv6(obj.Second()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesNextHopIpv6TwoAddresses.Second")) + } + + } + +} + +func (obj *bgpAttributesNextHopIpv6TwoAddresses) setDefault() { + if obj.obj.First == nil { + obj.SetFirst("0::0") + } + if obj.obj.Second == nil { + obj.SetSecond("0::0") + } + +} diff --git a/gosnappi/bgp_attributes_originator_id.go b/gosnappi/bgp_attributes_originator_id.go new file mode 100644 index 00000000..3032b093 --- /dev/null +++ b/gosnappi/bgp_attributes_originator_id.go @@ -0,0 +1,318 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesOriginatorId ***** +type bgpAttributesOriginatorId struct { + validation + obj *otg.BgpAttributesOriginatorId + marshaller marshalBgpAttributesOriginatorId + unMarshaller unMarshalBgpAttributesOriginatorId +} + +func NewBgpAttributesOriginatorId() BgpAttributesOriginatorId { + obj := bgpAttributesOriginatorId{obj: &otg.BgpAttributesOriginatorId{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesOriginatorId) msg() *otg.BgpAttributesOriginatorId { + return obj.obj +} + +func (obj *bgpAttributesOriginatorId) setMsg(msg *otg.BgpAttributesOriginatorId) BgpAttributesOriginatorId { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesOriginatorId struct { + obj *bgpAttributesOriginatorId +} + +type marshalBgpAttributesOriginatorId interface { + // ToProto marshals BgpAttributesOriginatorId to protobuf object *otg.BgpAttributesOriginatorId + ToProto() (*otg.BgpAttributesOriginatorId, error) + // ToPbText marshals BgpAttributesOriginatorId to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesOriginatorId to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesOriginatorId to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesOriginatorId struct { + obj *bgpAttributesOriginatorId +} + +type unMarshalBgpAttributesOriginatorId interface { + // FromProto unmarshals BgpAttributesOriginatorId from protobuf object *otg.BgpAttributesOriginatorId + FromProto(msg *otg.BgpAttributesOriginatorId) (BgpAttributesOriginatorId, error) + // FromPbText unmarshals BgpAttributesOriginatorId from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesOriginatorId from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesOriginatorId from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesOriginatorId) Marshal() marshalBgpAttributesOriginatorId { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesOriginatorId{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesOriginatorId) Unmarshal() unMarshalBgpAttributesOriginatorId { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesOriginatorId{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesOriginatorId) ToProto() (*otg.BgpAttributesOriginatorId, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesOriginatorId) FromProto(msg *otg.BgpAttributesOriginatorId) (BgpAttributesOriginatorId, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesOriginatorId) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesOriginatorId) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesOriginatorId) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesOriginatorId) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesOriginatorId) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesOriginatorId) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesOriginatorId) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesOriginatorId) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesOriginatorId) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesOriginatorId) Clone() (BgpAttributesOriginatorId, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesOriginatorId() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesOriginatorId is optional ORIGINATOR_ID attribute (type code 9) carries the Router Id of the route's originator in the local AS. +type BgpAttributesOriginatorId interface { + Validation + // msg marshals BgpAttributesOriginatorId to protobuf object *otg.BgpAttributesOriginatorId + // and doesn't set defaults + msg() *otg.BgpAttributesOriginatorId + // setMsg unmarshals BgpAttributesOriginatorId from protobuf object *otg.BgpAttributesOriginatorId + // and doesn't set defaults + setMsg(*otg.BgpAttributesOriginatorId) BgpAttributesOriginatorId + // provides marshal interface + Marshal() marshalBgpAttributesOriginatorId + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesOriginatorId + // validate validates BgpAttributesOriginatorId + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesOriginatorId, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Value returns string, set in BgpAttributesOriginatorId. + Value() string + // SetValue assigns string provided by user to BgpAttributesOriginatorId + SetValue(value string) BgpAttributesOriginatorId + // HasValue checks if Value has been set in BgpAttributesOriginatorId + HasValue() bool +} + +// The value of the originator's Router Id. +// Value returns a string +func (obj *bgpAttributesOriginatorId) Value() string { + + return *obj.obj.Value + +} + +// The value of the originator's Router Id. +// Value returns a string +func (obj *bgpAttributesOriginatorId) HasValue() bool { + return obj.obj.Value != nil +} + +// The value of the originator's Router Id. +// SetValue sets the string value in the BgpAttributesOriginatorId object +func (obj *bgpAttributesOriginatorId) SetValue(value string) BgpAttributesOriginatorId { + + obj.obj.Value = &value + return obj +} + +func (obj *bgpAttributesOriginatorId) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv4(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesOriginatorId.Value")) + } + + } + +} + +func (obj *bgpAttributesOriginatorId) setDefault() { + if obj.obj.Value == nil { + obj.SetValue("0.0.0.0") + } + +} diff --git a/gosnappi/bgp_attributes_other_attribute.go b/gosnappi/bgp_attributes_other_attribute.go new file mode 100644 index 00000000..37cf5364 --- /dev/null +++ b/gosnappi/bgp_attributes_other_attribute.go @@ -0,0 +1,462 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesOtherAttribute ***** +type bgpAttributesOtherAttribute struct { + validation + obj *otg.BgpAttributesOtherAttribute + marshaller marshalBgpAttributesOtherAttribute + unMarshaller unMarshalBgpAttributesOtherAttribute +} + +func NewBgpAttributesOtherAttribute() BgpAttributesOtherAttribute { + obj := bgpAttributesOtherAttribute{obj: &otg.BgpAttributesOtherAttribute{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesOtherAttribute) msg() *otg.BgpAttributesOtherAttribute { + return obj.obj +} + +func (obj *bgpAttributesOtherAttribute) setMsg(msg *otg.BgpAttributesOtherAttribute) BgpAttributesOtherAttribute { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesOtherAttribute struct { + obj *bgpAttributesOtherAttribute +} + +type marshalBgpAttributesOtherAttribute interface { + // ToProto marshals BgpAttributesOtherAttribute to protobuf object *otg.BgpAttributesOtherAttribute + ToProto() (*otg.BgpAttributesOtherAttribute, error) + // ToPbText marshals BgpAttributesOtherAttribute to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesOtherAttribute to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesOtherAttribute to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesOtherAttribute struct { + obj *bgpAttributesOtherAttribute +} + +type unMarshalBgpAttributesOtherAttribute interface { + // FromProto unmarshals BgpAttributesOtherAttribute from protobuf object *otg.BgpAttributesOtherAttribute + FromProto(msg *otg.BgpAttributesOtherAttribute) (BgpAttributesOtherAttribute, error) + // FromPbText unmarshals BgpAttributesOtherAttribute from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesOtherAttribute from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesOtherAttribute from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesOtherAttribute) Marshal() marshalBgpAttributesOtherAttribute { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesOtherAttribute{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesOtherAttribute) Unmarshal() unMarshalBgpAttributesOtherAttribute { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesOtherAttribute{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesOtherAttribute) ToProto() (*otg.BgpAttributesOtherAttribute, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesOtherAttribute) FromProto(msg *otg.BgpAttributesOtherAttribute) (BgpAttributesOtherAttribute, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesOtherAttribute) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesOtherAttribute) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesOtherAttribute) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesOtherAttribute) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesOtherAttribute) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesOtherAttribute) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesOtherAttribute) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesOtherAttribute) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesOtherAttribute) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesOtherAttribute) Clone() (BgpAttributesOtherAttribute, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesOtherAttribute() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesOtherAttribute is one unknown attribute stored as hex bytes. +type BgpAttributesOtherAttribute interface { + Validation + // msg marshals BgpAttributesOtherAttribute to protobuf object *otg.BgpAttributesOtherAttribute + // and doesn't set defaults + msg() *otg.BgpAttributesOtherAttribute + // setMsg unmarshals BgpAttributesOtherAttribute from protobuf object *otg.BgpAttributesOtherAttribute + // and doesn't set defaults + setMsg(*otg.BgpAttributesOtherAttribute) BgpAttributesOtherAttribute + // provides marshal interface + Marshal() marshalBgpAttributesOtherAttribute + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesOtherAttribute + // validate validates BgpAttributesOtherAttribute + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesOtherAttribute, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // FlagOptional returns bool, set in BgpAttributesOtherAttribute. + FlagOptional() bool + // SetFlagOptional assigns bool provided by user to BgpAttributesOtherAttribute + SetFlagOptional(value bool) BgpAttributesOtherAttribute + // HasFlagOptional checks if FlagOptional has been set in BgpAttributesOtherAttribute + HasFlagOptional() bool + // FlagTransitive returns bool, set in BgpAttributesOtherAttribute. + FlagTransitive() bool + // SetFlagTransitive assigns bool provided by user to BgpAttributesOtherAttribute + SetFlagTransitive(value bool) BgpAttributesOtherAttribute + // HasFlagTransitive checks if FlagTransitive has been set in BgpAttributesOtherAttribute + HasFlagTransitive() bool + // FlagPartial returns bool, set in BgpAttributesOtherAttribute. + FlagPartial() bool + // SetFlagPartial assigns bool provided by user to BgpAttributesOtherAttribute + SetFlagPartial(value bool) BgpAttributesOtherAttribute + // HasFlagPartial checks if FlagPartial has been set in BgpAttributesOtherAttribute + HasFlagPartial() bool + // FlagExtendedLength returns bool, set in BgpAttributesOtherAttribute. + FlagExtendedLength() bool + // SetFlagExtendedLength assigns bool provided by user to BgpAttributesOtherAttribute + SetFlagExtendedLength(value bool) BgpAttributesOtherAttribute + // HasFlagExtendedLength checks if FlagExtendedLength has been set in BgpAttributesOtherAttribute + HasFlagExtendedLength() bool + // Type returns uint32, set in BgpAttributesOtherAttribute. + Type() uint32 + // SetType assigns uint32 provided by user to BgpAttributesOtherAttribute + SetType(value uint32) BgpAttributesOtherAttribute + // RawValue returns string, set in BgpAttributesOtherAttribute. + RawValue() string + // SetRawValue assigns string provided by user to BgpAttributesOtherAttribute + SetRawValue(value string) BgpAttributesOtherAttribute +} + +// Optional flag in the BGP attribute. +// FlagOptional returns a bool +func (obj *bgpAttributesOtherAttribute) FlagOptional() bool { + + return *obj.obj.FlagOptional + +} + +// Optional flag in the BGP attribute. +// FlagOptional returns a bool +func (obj *bgpAttributesOtherAttribute) HasFlagOptional() bool { + return obj.obj.FlagOptional != nil +} + +// Optional flag in the BGP attribute. +// SetFlagOptional sets the bool value in the BgpAttributesOtherAttribute object +func (obj *bgpAttributesOtherAttribute) SetFlagOptional(value bool) BgpAttributesOtherAttribute { + + obj.obj.FlagOptional = &value + return obj +} + +// Transitive flag in the BGP attribute. +// FlagTransitive returns a bool +func (obj *bgpAttributesOtherAttribute) FlagTransitive() bool { + + return *obj.obj.FlagTransitive + +} + +// Transitive flag in the BGP attribute. +// FlagTransitive returns a bool +func (obj *bgpAttributesOtherAttribute) HasFlagTransitive() bool { + return obj.obj.FlagTransitive != nil +} + +// Transitive flag in the BGP attribute. +// SetFlagTransitive sets the bool value in the BgpAttributesOtherAttribute object +func (obj *bgpAttributesOtherAttribute) SetFlagTransitive(value bool) BgpAttributesOtherAttribute { + + obj.obj.FlagTransitive = &value + return obj +} + +// Partial flag in the BGP attribute. +// FlagPartial returns a bool +func (obj *bgpAttributesOtherAttribute) FlagPartial() bool { + + return *obj.obj.FlagPartial + +} + +// Partial flag in the BGP attribute. +// FlagPartial returns a bool +func (obj *bgpAttributesOtherAttribute) HasFlagPartial() bool { + return obj.obj.FlagPartial != nil +} + +// Partial flag in the BGP attribute. +// SetFlagPartial sets the bool value in the BgpAttributesOtherAttribute object +func (obj *bgpAttributesOtherAttribute) SetFlagPartial(value bool) BgpAttributesOtherAttribute { + + obj.obj.FlagPartial = &value + return obj +} + +// Extended length flag in the BGP attribute. +// FlagExtendedLength returns a bool +func (obj *bgpAttributesOtherAttribute) FlagExtendedLength() bool { + + return *obj.obj.FlagExtendedLength + +} + +// Extended length flag in the BGP attribute. +// FlagExtendedLength returns a bool +func (obj *bgpAttributesOtherAttribute) HasFlagExtendedLength() bool { + return obj.obj.FlagExtendedLength != nil +} + +// Extended length flag in the BGP attribute. +// SetFlagExtendedLength sets the bool value in the BgpAttributesOtherAttribute object +func (obj *bgpAttributesOtherAttribute) SetFlagExtendedLength(value bool) BgpAttributesOtherAttribute { + + obj.obj.FlagExtendedLength = &value + return obj +} + +// The value of the Type field in the attribute. +// Type returns a uint32 +func (obj *bgpAttributesOtherAttribute) Type() uint32 { + + return *obj.obj.Type + +} + +// The value of the Type field in the attribute. +// SetType sets the uint32 value in the BgpAttributesOtherAttribute object +func (obj *bgpAttributesOtherAttribute) SetType(value uint32) BgpAttributesOtherAttribute { + + obj.obj.Type = &value + return obj +} + +// Contents of the value field ( the contents after the initial two bytes containing the Flags and Type field ) of the attribute in hex bytes. +// It includes the contents of length of the extended length field if included. +// RawValue returns a string +func (obj *bgpAttributesOtherAttribute) RawValue() string { + + return *obj.obj.RawValue + +} + +// Contents of the value field ( the contents after the initial two bytes containing the Flags and Type field ) of the attribute in hex bytes. +// It includes the contents of length of the extended length field if included. +// SetRawValue sets the string value in the BgpAttributesOtherAttribute object +func (obj *bgpAttributesOtherAttribute) SetRawValue(value string) BgpAttributesOtherAttribute { + + obj.obj.RawValue = &value + return obj +} + +func (obj *bgpAttributesOtherAttribute) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Type is required + if obj.obj.Type == nil { + vObj.validationErrors = append(vObj.validationErrors, "Type is required field on interface BgpAttributesOtherAttribute") + } + + // RawValue is required + if obj.obj.RawValue == nil { + vObj.validationErrors = append(vObj.validationErrors, "RawValue is required field on interface BgpAttributesOtherAttribute") + } + if obj.obj.RawValue != nil { + + err := obj.validateHex(obj.RawValue()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesOtherAttribute.RawValue")) + } + + } + +} + +func (obj *bgpAttributesOtherAttribute) setDefault() { + if obj.obj.FlagOptional == nil { + obj.SetFlagOptional(false) + } + if obj.obj.FlagTransitive == nil { + obj.SetFlagTransitive(false) + } + if obj.obj.FlagPartial == nil { + obj.SetFlagPartial(false) + } + if obj.obj.FlagExtendedLength == nil { + obj.SetFlagExtendedLength(false) + } + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy.go b/gosnappi/bgp_attributes_segment_routing_policy.go new file mode 100644 index 00000000..fcad1d37 --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy.go @@ -0,0 +1,786 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicy ***** +type bgpAttributesSegmentRoutingPolicy struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicy + marshaller marshalBgpAttributesSegmentRoutingPolicy + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicy + bindingSegmentIdentifierHolder BgpAttributesBsid + srv6BindingSegmentIdentifierHolder BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter + preferenceHolder BgpAttributesSrPolicyPreference + priorityHolder BgpAttributesSrPolicyPriority + policyNameHolder BgpAttributesSrPolicyPolicyName + policyCandidateNameHolder BgpAttributesSrPolicyPolicyCandidateName + explicitNullLabelPolicyHolder BgpAttributesSrPolicyExplicitNullPolicy + segmentListHolder BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter +} + +func NewBgpAttributesSegmentRoutingPolicy() BgpAttributesSegmentRoutingPolicy { + obj := bgpAttributesSegmentRoutingPolicy{obj: &otg.BgpAttributesSegmentRoutingPolicy{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicy) msg() *otg.BgpAttributesSegmentRoutingPolicy { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicy) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicy) BgpAttributesSegmentRoutingPolicy { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicy struct { + obj *bgpAttributesSegmentRoutingPolicy +} + +type marshalBgpAttributesSegmentRoutingPolicy interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicy to protobuf object *otg.BgpAttributesSegmentRoutingPolicy + ToProto() (*otg.BgpAttributesSegmentRoutingPolicy, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicy to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicy to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicy to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicy struct { + obj *bgpAttributesSegmentRoutingPolicy +} + +type unMarshalBgpAttributesSegmentRoutingPolicy interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicy from protobuf object *otg.BgpAttributesSegmentRoutingPolicy + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicy) (BgpAttributesSegmentRoutingPolicy, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicy from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicy from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicy from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicy) Marshal() marshalBgpAttributesSegmentRoutingPolicy { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicy{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicy) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicy { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicy{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicy) ToProto() (*otg.BgpAttributesSegmentRoutingPolicy, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicy) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicy) (BgpAttributesSegmentRoutingPolicy, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicy) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicy) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicy) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicy) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicy) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicy) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicy) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicy) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicy) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicy) Clone() (BgpAttributesSegmentRoutingPolicy, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicy() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSegmentRoutingPolicy) setNil() { + obj.bindingSegmentIdentifierHolder = nil + obj.srv6BindingSegmentIdentifierHolder = nil + obj.preferenceHolder = nil + obj.priorityHolder = nil + obj.policyNameHolder = nil + obj.policyCandidateNameHolder = nil + obj.explicitNullLabelPolicyHolder = nil + obj.segmentListHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSegmentRoutingPolicy is optional Segment Routing Policy information as defined in draft-ietf-idr-sr-policy-safi-02. +// This information is carried in TUNNEL_ENCAPSULATION attribute with type set to SR Policy (15). +type BgpAttributesSegmentRoutingPolicy interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicy to protobuf object *otg.BgpAttributesSegmentRoutingPolicy + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicy + // setMsg unmarshals BgpAttributesSegmentRoutingPolicy from protobuf object *otg.BgpAttributesSegmentRoutingPolicy + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicy) BgpAttributesSegmentRoutingPolicy + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicy + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicy + // validate validates BgpAttributesSegmentRoutingPolicy + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicy, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // BindingSegmentIdentifier returns BgpAttributesBsid, set in BgpAttributesSegmentRoutingPolicy. + // BgpAttributesBsid is the Binding Segment Identifier is an optional sub-tlv of type 13 that can be sent with a SR Policy + // Tunnel Encapsulation attribute. + // When the active candidate path has a specified Binding Segment Identifier, the SR Policy uses that + // BSID if this value (label in MPLS, IPv6 address in SRv6) is available. + // - The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section 2.4.2 . + // - It is recommended that if SRv6 Binding SID is desired to be signalled, the SRv6 Binding SID sub-TLV that enables + // the specification of the SRv6 Endpoint Behavior should be used. + BindingSegmentIdentifier() BgpAttributesBsid + // SetBindingSegmentIdentifier assigns BgpAttributesBsid provided by user to BgpAttributesSegmentRoutingPolicy. + // BgpAttributesBsid is the Binding Segment Identifier is an optional sub-tlv of type 13 that can be sent with a SR Policy + // Tunnel Encapsulation attribute. + // When the active candidate path has a specified Binding Segment Identifier, the SR Policy uses that + // BSID if this value (label in MPLS, IPv6 address in SRv6) is available. + // - The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section 2.4.2 . + // - It is recommended that if SRv6 Binding SID is desired to be signalled, the SRv6 Binding SID sub-TLV that enables + // the specification of the SRv6 Endpoint Behavior should be used. + SetBindingSegmentIdentifier(value BgpAttributesBsid) BgpAttributesSegmentRoutingPolicy + // HasBindingSegmentIdentifier checks if BindingSegmentIdentifier has been set in BgpAttributesSegmentRoutingPolicy + HasBindingSegmentIdentifier() bool + // Srv6BindingSegmentIdentifier returns BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIterIter, set in BgpAttributesSegmentRoutingPolicy + Srv6BindingSegmentIdentifier() BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter + // Preference returns BgpAttributesSrPolicyPreference, set in BgpAttributesSegmentRoutingPolicy. + // BgpAttributesSrPolicyPreference is optional Preference sub-tlv (Type 12) is used to select the best candidate path for an SR Policy. + // It is defined in Section 2.4.1 of draft-ietf-idr-sr-policy-safi-02 . + Preference() BgpAttributesSrPolicyPreference + // SetPreference assigns BgpAttributesSrPolicyPreference provided by user to BgpAttributesSegmentRoutingPolicy. + // BgpAttributesSrPolicyPreference is optional Preference sub-tlv (Type 12) is used to select the best candidate path for an SR Policy. + // It is defined in Section 2.4.1 of draft-ietf-idr-sr-policy-safi-02 . + SetPreference(value BgpAttributesSrPolicyPreference) BgpAttributesSegmentRoutingPolicy + // HasPreference checks if Preference has been set in BgpAttributesSegmentRoutingPolicy + HasPreference() bool + // Priority returns BgpAttributesSrPolicyPriority, set in BgpAttributesSegmentRoutingPolicy. + // BgpAttributesSrPolicyPriority is optional Priority sub-tlv (Type 15) used to select the order in which policies should be re-computed. + // - It is defined in Section 2.4.6 of draft-ietf-idr-sr-policy-safi-02 . + Priority() BgpAttributesSrPolicyPriority + // SetPriority assigns BgpAttributesSrPolicyPriority provided by user to BgpAttributesSegmentRoutingPolicy. + // BgpAttributesSrPolicyPriority is optional Priority sub-tlv (Type 15) used to select the order in which policies should be re-computed. + // - It is defined in Section 2.4.6 of draft-ietf-idr-sr-policy-safi-02 . + SetPriority(value BgpAttributesSrPolicyPriority) BgpAttributesSegmentRoutingPolicy + // HasPriority checks if Priority has been set in BgpAttributesSegmentRoutingPolicy + HasPriority() bool + // PolicyName returns BgpAttributesSrPolicyPolicyName, set in BgpAttributesSegmentRoutingPolicy. + // BgpAttributesSrPolicyPolicyName is optional Policy Name sub-tlv (Type 130) which carries the symbolic name for the SR Policy for which the + // candidate path is being advertised for debugging. + // - It is defined in Section 2.4.8 of draft-ietf-idr-sr-policy-safi-02 . + PolicyName() BgpAttributesSrPolicyPolicyName + // SetPolicyName assigns BgpAttributesSrPolicyPolicyName provided by user to BgpAttributesSegmentRoutingPolicy. + // BgpAttributesSrPolicyPolicyName is optional Policy Name sub-tlv (Type 130) which carries the symbolic name for the SR Policy for which the + // candidate path is being advertised for debugging. + // - It is defined in Section 2.4.8 of draft-ietf-idr-sr-policy-safi-02 . + SetPolicyName(value BgpAttributesSrPolicyPolicyName) BgpAttributesSegmentRoutingPolicy + // HasPolicyName checks if PolicyName has been set in BgpAttributesSegmentRoutingPolicy + HasPolicyName() bool + // PolicyCandidateName returns BgpAttributesSrPolicyPolicyCandidateName, set in BgpAttributesSegmentRoutingPolicy. + // BgpAttributesSrPolicyPolicyCandidateName is optional Policy Candidate Path Name sub-tlv (Type 129) which carries the symbolic name for the SR Policy candidate path + // for debugging. + // - It is defined in Section 2.4.7 of draft-ietf-idr-sr-policy-safi-02 . + PolicyCandidateName() BgpAttributesSrPolicyPolicyCandidateName + // SetPolicyCandidateName assigns BgpAttributesSrPolicyPolicyCandidateName provided by user to BgpAttributesSegmentRoutingPolicy. + // BgpAttributesSrPolicyPolicyCandidateName is optional Policy Candidate Path Name sub-tlv (Type 129) which carries the symbolic name for the SR Policy candidate path + // for debugging. + // - It is defined in Section 2.4.7 of draft-ietf-idr-sr-policy-safi-02 . + SetPolicyCandidateName(value BgpAttributesSrPolicyPolicyCandidateName) BgpAttributesSegmentRoutingPolicy + // HasPolicyCandidateName checks if PolicyCandidateName has been set in BgpAttributesSegmentRoutingPolicy + HasPolicyCandidateName() bool + // ExplicitNullLabelPolicy returns BgpAttributesSrPolicyExplicitNullPolicy, set in BgpAttributesSegmentRoutingPolicy. + // BgpAttributesSrPolicyExplicitNullPolicy is this is an optional sub-tlv (Type 14) which indicates whether an Explicit NULL Label must be pushed on an unlabeled IP + // packet before other labels for IPv4 or IPv6 flows. + // - It is defined in Section 2.4.5 of draft-ietf-idr-sr-policy-safi-02. + ExplicitNullLabelPolicy() BgpAttributesSrPolicyExplicitNullPolicy + // SetExplicitNullLabelPolicy assigns BgpAttributesSrPolicyExplicitNullPolicy provided by user to BgpAttributesSegmentRoutingPolicy. + // BgpAttributesSrPolicyExplicitNullPolicy is this is an optional sub-tlv (Type 14) which indicates whether an Explicit NULL Label must be pushed on an unlabeled IP + // packet before other labels for IPv4 or IPv6 flows. + // - It is defined in Section 2.4.5 of draft-ietf-idr-sr-policy-safi-02. + SetExplicitNullLabelPolicy(value BgpAttributesSrPolicyExplicitNullPolicy) BgpAttributesSegmentRoutingPolicy + // HasExplicitNullLabelPolicy checks if ExplicitNullLabelPolicy has been set in BgpAttributesSegmentRoutingPolicy + HasExplicitNullLabelPolicy() bool + // SegmentList returns BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIterIter, set in BgpAttributesSegmentRoutingPolicy + SegmentList() BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter + setNil() +} + +// description is TBD +// BindingSegmentIdentifier returns a BgpAttributesBsid +func (obj *bgpAttributesSegmentRoutingPolicy) BindingSegmentIdentifier() BgpAttributesBsid { + if obj.obj.BindingSegmentIdentifier == nil { + obj.obj.BindingSegmentIdentifier = NewBgpAttributesBsid().msg() + } + if obj.bindingSegmentIdentifierHolder == nil { + obj.bindingSegmentIdentifierHolder = &bgpAttributesBsid{obj: obj.obj.BindingSegmentIdentifier} + } + return obj.bindingSegmentIdentifierHolder +} + +// description is TBD +// BindingSegmentIdentifier returns a BgpAttributesBsid +func (obj *bgpAttributesSegmentRoutingPolicy) HasBindingSegmentIdentifier() bool { + return obj.obj.BindingSegmentIdentifier != nil +} + +// description is TBD +// SetBindingSegmentIdentifier sets the BgpAttributesBsid value in the BgpAttributesSegmentRoutingPolicy object +func (obj *bgpAttributesSegmentRoutingPolicy) SetBindingSegmentIdentifier(value BgpAttributesBsid) BgpAttributesSegmentRoutingPolicy { + + obj.bindingSegmentIdentifierHolder = nil + obj.obj.BindingSegmentIdentifier = value.msg() + + return obj +} + +// The SRv6 Binding SID sub-TLV is an optional sub-TLV of type 20 that is used to signal the SRv6 Binding SID +// related information of an SR Policy candidate path. +// - More than one SRv6 Binding SID sub-TLVs MAY be signaled in the same SR Policy encoding to indicate one +// or more SRv6 SIDs, each with potentially different SRv6 Endpoint Behaviors to be instantiated. +// - The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section 2.4.3 . +// Srv6BindingSegmentIdentifier returns a []BgpAttributesSrv6Bsid +func (obj *bgpAttributesSegmentRoutingPolicy) Srv6BindingSegmentIdentifier() BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter { + if len(obj.obj.Srv6BindingSegmentIdentifier) == 0 { + obj.obj.Srv6BindingSegmentIdentifier = []*otg.BgpAttributesSrv6Bsid{} + } + if obj.srv6BindingSegmentIdentifierHolder == nil { + obj.srv6BindingSegmentIdentifierHolder = newBgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter(&obj.obj.Srv6BindingSegmentIdentifier).setMsg(obj) + } + return obj.srv6BindingSegmentIdentifierHolder +} + +type bgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter struct { + obj *bgpAttributesSegmentRoutingPolicy + bgpAttributesSrv6BsidSlice []BgpAttributesSrv6Bsid + fieldPtr *[]*otg.BgpAttributesSrv6Bsid +} + +func newBgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter(ptr *[]*otg.BgpAttributesSrv6Bsid) BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter { + return &bgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter{fieldPtr: ptr} +} + +type BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter interface { + setMsg(*bgpAttributesSegmentRoutingPolicy) BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter + Items() []BgpAttributesSrv6Bsid + Add() BgpAttributesSrv6Bsid + Append(items ...BgpAttributesSrv6Bsid) BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter + Set(index int, newObj BgpAttributesSrv6Bsid) BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter + Clear() BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter + clearHolderSlice() BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter + appendHolderSlice(item BgpAttributesSrv6Bsid) BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter +} + +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter) setMsg(msg *bgpAttributesSegmentRoutingPolicy) BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpAttributesSrv6Bsid{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter) Items() []BgpAttributesSrv6Bsid { + return obj.bgpAttributesSrv6BsidSlice +} + +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter) Add() BgpAttributesSrv6Bsid { + newObj := &otg.BgpAttributesSrv6Bsid{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpAttributesSrv6Bsid{obj: newObj} + newLibObj.setDefault() + obj.bgpAttributesSrv6BsidSlice = append(obj.bgpAttributesSrv6BsidSlice, newLibObj) + return newLibObj +} + +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter) Append(items ...BgpAttributesSrv6Bsid) BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpAttributesSrv6BsidSlice = append(obj.bgpAttributesSrv6BsidSlice, item) + } + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter) Set(index int, newObj BgpAttributesSrv6Bsid) BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpAttributesSrv6BsidSlice[index] = newObj + return obj +} +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter) Clear() BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpAttributesSrv6Bsid{} + obj.bgpAttributesSrv6BsidSlice = []BgpAttributesSrv6Bsid{} + } + return obj +} +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter) clearHolderSlice() BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter { + if len(obj.bgpAttributesSrv6BsidSlice) > 0 { + obj.bgpAttributesSrv6BsidSlice = []BgpAttributesSrv6Bsid{} + } + return obj +} +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter) appendHolderSlice(item BgpAttributesSrv6Bsid) BgpAttributesSegmentRoutingPolicyBgpAttributesSrv6BsidIter { + obj.bgpAttributesSrv6BsidSlice = append(obj.bgpAttributesSrv6BsidSlice, item) + return obj +} + +// description is TBD +// Preference returns a BgpAttributesSrPolicyPreference +func (obj *bgpAttributesSegmentRoutingPolicy) Preference() BgpAttributesSrPolicyPreference { + if obj.obj.Preference == nil { + obj.obj.Preference = NewBgpAttributesSrPolicyPreference().msg() + } + if obj.preferenceHolder == nil { + obj.preferenceHolder = &bgpAttributesSrPolicyPreference{obj: obj.obj.Preference} + } + return obj.preferenceHolder +} + +// description is TBD +// Preference returns a BgpAttributesSrPolicyPreference +func (obj *bgpAttributesSegmentRoutingPolicy) HasPreference() bool { + return obj.obj.Preference != nil +} + +// description is TBD +// SetPreference sets the BgpAttributesSrPolicyPreference value in the BgpAttributesSegmentRoutingPolicy object +func (obj *bgpAttributesSegmentRoutingPolicy) SetPreference(value BgpAttributesSrPolicyPreference) BgpAttributesSegmentRoutingPolicy { + + obj.preferenceHolder = nil + obj.obj.Preference = value.msg() + + return obj +} + +// description is TBD +// Priority returns a BgpAttributesSrPolicyPriority +func (obj *bgpAttributesSegmentRoutingPolicy) Priority() BgpAttributesSrPolicyPriority { + if obj.obj.Priority == nil { + obj.obj.Priority = NewBgpAttributesSrPolicyPriority().msg() + } + if obj.priorityHolder == nil { + obj.priorityHolder = &bgpAttributesSrPolicyPriority{obj: obj.obj.Priority} + } + return obj.priorityHolder +} + +// description is TBD +// Priority returns a BgpAttributesSrPolicyPriority +func (obj *bgpAttributesSegmentRoutingPolicy) HasPriority() bool { + return obj.obj.Priority != nil +} + +// description is TBD +// SetPriority sets the BgpAttributesSrPolicyPriority value in the BgpAttributesSegmentRoutingPolicy object +func (obj *bgpAttributesSegmentRoutingPolicy) SetPriority(value BgpAttributesSrPolicyPriority) BgpAttributesSegmentRoutingPolicy { + + obj.priorityHolder = nil + obj.obj.Priority = value.msg() + + return obj +} + +// description is TBD +// PolicyName returns a BgpAttributesSrPolicyPolicyName +func (obj *bgpAttributesSegmentRoutingPolicy) PolicyName() BgpAttributesSrPolicyPolicyName { + if obj.obj.PolicyName == nil { + obj.obj.PolicyName = NewBgpAttributesSrPolicyPolicyName().msg() + } + if obj.policyNameHolder == nil { + obj.policyNameHolder = &bgpAttributesSrPolicyPolicyName{obj: obj.obj.PolicyName} + } + return obj.policyNameHolder +} + +// description is TBD +// PolicyName returns a BgpAttributesSrPolicyPolicyName +func (obj *bgpAttributesSegmentRoutingPolicy) HasPolicyName() bool { + return obj.obj.PolicyName != nil +} + +// description is TBD +// SetPolicyName sets the BgpAttributesSrPolicyPolicyName value in the BgpAttributesSegmentRoutingPolicy object +func (obj *bgpAttributesSegmentRoutingPolicy) SetPolicyName(value BgpAttributesSrPolicyPolicyName) BgpAttributesSegmentRoutingPolicy { + + obj.policyNameHolder = nil + obj.obj.PolicyName = value.msg() + + return obj +} + +// description is TBD +// PolicyCandidateName returns a BgpAttributesSrPolicyPolicyCandidateName +func (obj *bgpAttributesSegmentRoutingPolicy) PolicyCandidateName() BgpAttributesSrPolicyPolicyCandidateName { + if obj.obj.PolicyCandidateName == nil { + obj.obj.PolicyCandidateName = NewBgpAttributesSrPolicyPolicyCandidateName().msg() + } + if obj.policyCandidateNameHolder == nil { + obj.policyCandidateNameHolder = &bgpAttributesSrPolicyPolicyCandidateName{obj: obj.obj.PolicyCandidateName} + } + return obj.policyCandidateNameHolder +} + +// description is TBD +// PolicyCandidateName returns a BgpAttributesSrPolicyPolicyCandidateName +func (obj *bgpAttributesSegmentRoutingPolicy) HasPolicyCandidateName() bool { + return obj.obj.PolicyCandidateName != nil +} + +// description is TBD +// SetPolicyCandidateName sets the BgpAttributesSrPolicyPolicyCandidateName value in the BgpAttributesSegmentRoutingPolicy object +func (obj *bgpAttributesSegmentRoutingPolicy) SetPolicyCandidateName(value BgpAttributesSrPolicyPolicyCandidateName) BgpAttributesSegmentRoutingPolicy { + + obj.policyCandidateNameHolder = nil + obj.obj.PolicyCandidateName = value.msg() + + return obj +} + +// description is TBD +// ExplicitNullLabelPolicy returns a BgpAttributesSrPolicyExplicitNullPolicy +func (obj *bgpAttributesSegmentRoutingPolicy) ExplicitNullLabelPolicy() BgpAttributesSrPolicyExplicitNullPolicy { + if obj.obj.ExplicitNullLabelPolicy == nil { + obj.obj.ExplicitNullLabelPolicy = NewBgpAttributesSrPolicyExplicitNullPolicy().msg() + } + if obj.explicitNullLabelPolicyHolder == nil { + obj.explicitNullLabelPolicyHolder = &bgpAttributesSrPolicyExplicitNullPolicy{obj: obj.obj.ExplicitNullLabelPolicy} + } + return obj.explicitNullLabelPolicyHolder +} + +// description is TBD +// ExplicitNullLabelPolicy returns a BgpAttributesSrPolicyExplicitNullPolicy +func (obj *bgpAttributesSegmentRoutingPolicy) HasExplicitNullLabelPolicy() bool { + return obj.obj.ExplicitNullLabelPolicy != nil +} + +// description is TBD +// SetExplicitNullLabelPolicy sets the BgpAttributesSrPolicyExplicitNullPolicy value in the BgpAttributesSegmentRoutingPolicy object +func (obj *bgpAttributesSegmentRoutingPolicy) SetExplicitNullLabelPolicy(value BgpAttributesSrPolicyExplicitNullPolicy) BgpAttributesSegmentRoutingPolicy { + + obj.explicitNullLabelPolicyHolder = nil + obj.obj.ExplicitNullLabelPolicy = value.msg() + + return obj +} + +// description is TBD +// SegmentList returns a []BgpAttributesSrPolicySegmentList +func (obj *bgpAttributesSegmentRoutingPolicy) SegmentList() BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter { + if len(obj.obj.SegmentList) == 0 { + obj.obj.SegmentList = []*otg.BgpAttributesSrPolicySegmentList{} + } + if obj.segmentListHolder == nil { + obj.segmentListHolder = newBgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter(&obj.obj.SegmentList).setMsg(obj) + } + return obj.segmentListHolder +} + +type bgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter struct { + obj *bgpAttributesSegmentRoutingPolicy + bgpAttributesSrPolicySegmentListSlice []BgpAttributesSrPolicySegmentList + fieldPtr *[]*otg.BgpAttributesSrPolicySegmentList +} + +func newBgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter(ptr *[]*otg.BgpAttributesSrPolicySegmentList) BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter { + return &bgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter{fieldPtr: ptr} +} + +type BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter interface { + setMsg(*bgpAttributesSegmentRoutingPolicy) BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter + Items() []BgpAttributesSrPolicySegmentList + Add() BgpAttributesSrPolicySegmentList + Append(items ...BgpAttributesSrPolicySegmentList) BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter + Set(index int, newObj BgpAttributesSrPolicySegmentList) BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter + Clear() BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter + clearHolderSlice() BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter + appendHolderSlice(item BgpAttributesSrPolicySegmentList) BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter +} + +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter) setMsg(msg *bgpAttributesSegmentRoutingPolicy) BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpAttributesSrPolicySegmentList{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter) Items() []BgpAttributesSrPolicySegmentList { + return obj.bgpAttributesSrPolicySegmentListSlice +} + +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter) Add() BgpAttributesSrPolicySegmentList { + newObj := &otg.BgpAttributesSrPolicySegmentList{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpAttributesSrPolicySegmentList{obj: newObj} + newLibObj.setDefault() + obj.bgpAttributesSrPolicySegmentListSlice = append(obj.bgpAttributesSrPolicySegmentListSlice, newLibObj) + return newLibObj +} + +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter) Append(items ...BgpAttributesSrPolicySegmentList) BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpAttributesSrPolicySegmentListSlice = append(obj.bgpAttributesSrPolicySegmentListSlice, item) + } + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter) Set(index int, newObj BgpAttributesSrPolicySegmentList) BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpAttributesSrPolicySegmentListSlice[index] = newObj + return obj +} +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter) Clear() BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpAttributesSrPolicySegmentList{} + obj.bgpAttributesSrPolicySegmentListSlice = []BgpAttributesSrPolicySegmentList{} + } + return obj +} +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter) clearHolderSlice() BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter { + if len(obj.bgpAttributesSrPolicySegmentListSlice) > 0 { + obj.bgpAttributesSrPolicySegmentListSlice = []BgpAttributesSrPolicySegmentList{} + } + return obj +} +func (obj *bgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter) appendHolderSlice(item BgpAttributesSrPolicySegmentList) BgpAttributesSegmentRoutingPolicyBgpAttributesSrPolicySegmentListIter { + obj.bgpAttributesSrPolicySegmentListSlice = append(obj.bgpAttributesSrPolicySegmentListSlice, item) + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicy) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.BindingSegmentIdentifier != nil { + + obj.BindingSegmentIdentifier().validateObj(vObj, set_default) + } + + if len(obj.obj.Srv6BindingSegmentIdentifier) != 0 { + + if set_default { + obj.Srv6BindingSegmentIdentifier().clearHolderSlice() + for _, item := range obj.obj.Srv6BindingSegmentIdentifier { + obj.Srv6BindingSegmentIdentifier().appendHolderSlice(&bgpAttributesSrv6Bsid{obj: item}) + } + } + for _, item := range obj.Srv6BindingSegmentIdentifier().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Preference != nil { + + obj.Preference().validateObj(vObj, set_default) + } + + if obj.obj.Priority != nil { + + obj.Priority().validateObj(vObj, set_default) + } + + if obj.obj.PolicyName != nil { + + obj.PolicyName().validateObj(vObj, set_default) + } + + if obj.obj.PolicyCandidateName != nil { + + obj.PolicyCandidateName().validateObj(vObj, set_default) + } + + if obj.obj.ExplicitNullLabelPolicy != nil { + + obj.ExplicitNullLabelPolicy().validateObj(vObj, set_default) + } + + if len(obj.obj.SegmentList) != 0 { + + if set_default { + obj.SegmentList().clearHolderSlice() + for _, item := range obj.obj.SegmentList { + obj.SegmentList().appendHolderSlice(&bgpAttributesSrPolicySegmentList{obj: item}) + } + } + for _, item := range obj.SegmentList().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicy) setDefault() { + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_s_rv6_sid_endpoint_behavior_and_structure.go b/gosnappi/bgp_attributes_segment_routing_policy_s_rv6_sid_endpoint_behavior_and_structure.go new file mode 100644 index 00000000..54241fd5 --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_s_rv6_sid_endpoint_behavior_and_structure.go @@ -0,0 +1,494 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure ***** +type bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + marshaller marshalBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +} + +func NewBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure() BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + obj := bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure{obj: &otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) msg() *otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure struct { + obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +} + +type marshalBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure to protobuf object *otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + ToProto() (*otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure struct { + obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +} + +type unMarshalBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure from protobuf object *otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) (BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) Marshal() marshalBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) ToProto() (*otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) (BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) Clone() (BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure is configuration for optional SRv6 Endpoint Behavior and SID Structure. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. - This is specified in draft-ietf-idr-sr-policy-safi-02 Section 2.4.4.2.4 +type BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure to protobuf object *otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // setMsg unmarshals BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure from protobuf object *otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // validate validates BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EndpointBehaviour returns string, set in BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure. + EndpointBehaviour() string + // SetEndpointBehaviour assigns string provided by user to BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + SetEndpointBehaviour(value string) BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // HasEndpointBehaviour checks if EndpointBehaviour has been set in BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + HasEndpointBehaviour() bool + // LbLength returns uint32, set in BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure. + LbLength() uint32 + // SetLbLength assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + SetLbLength(value uint32) BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // HasLbLength checks if LbLength has been set in BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + HasLbLength() bool + // LnLength returns uint32, set in BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure. + LnLength() uint32 + // SetLnLength assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + SetLnLength(value uint32) BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // HasLnLength checks if LnLength has been set in BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + HasLnLength() bool + // FuncLength returns uint32, set in BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure. + FuncLength() uint32 + // SetFuncLength assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + SetFuncLength(value uint32) BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // HasFuncLength checks if FuncLength has been set in BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + HasFuncLength() bool + // ArgLength returns uint32, set in BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure. + ArgLength() uint32 + // SetArgLength assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + SetArgLength(value uint32) BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // HasArgLength checks if ArgLength has been set in BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + HasArgLength() bool +} + +// This is a 2-octet field that is used to specify the SRv6 Endpoint Behavior code point for the SRv6 SID as defined +// in section 9.2 of [RFC8986]. When set with the value 0xFFFF (i.e., Opaque), the choice of SRv6 Endpoint Behavior is +// left to the headend. Well known 16-bit values for this field are available at +// https://www.iana.org/assignments/segment-routing/segment-routing.xhtml . +// EndpointBehaviour returns a string +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) EndpointBehaviour() string { + + return *obj.obj.EndpointBehaviour + +} + +// This is a 2-octet field that is used to specify the SRv6 Endpoint Behavior code point for the SRv6 SID as defined +// in section 9.2 of [RFC8986]. When set with the value 0xFFFF (i.e., Opaque), the choice of SRv6 Endpoint Behavior is +// left to the headend. Well known 16-bit values for this field are available at +// https://www.iana.org/assignments/segment-routing/segment-routing.xhtml . +// EndpointBehaviour returns a string +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) HasEndpointBehaviour() bool { + return obj.obj.EndpointBehaviour != nil +} + +// This is a 2-octet field that is used to specify the SRv6 Endpoint Behavior code point for the SRv6 SID as defined +// in section 9.2 of [RFC8986]. When set with the value 0xFFFF (i.e., Opaque), the choice of SRv6 Endpoint Behavior is +// left to the headend. Well known 16-bit values for this field are available at +// https://www.iana.org/assignments/segment-routing/segment-routing.xhtml . +// SetEndpointBehaviour sets the string value in the BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure object +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) SetEndpointBehaviour(value string) BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + + obj.obj.EndpointBehaviour = &value + return obj +} + +// SRv6 SID Locator Block length in bits. +// LbLength returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) LbLength() uint32 { + + return *obj.obj.LbLength + +} + +// SRv6 SID Locator Block length in bits. +// LbLength returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) HasLbLength() bool { + return obj.obj.LbLength != nil +} + +// SRv6 SID Locator Block length in bits. +// SetLbLength sets the uint32 value in the BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure object +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) SetLbLength(value uint32) BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + + obj.obj.LbLength = &value + return obj +} + +// SRv6 SID Locator Node length in bits. +// LnLength returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) LnLength() uint32 { + + return *obj.obj.LnLength + +} + +// SRv6 SID Locator Node length in bits. +// LnLength returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) HasLnLength() bool { + return obj.obj.LnLength != nil +} + +// SRv6 SID Locator Node length in bits. +// SetLnLength sets the uint32 value in the BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure object +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) SetLnLength(value uint32) BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + + obj.obj.LnLength = &value + return obj +} + +// SRv6 SID Function length in bits. +// FuncLength returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) FuncLength() uint32 { + + return *obj.obj.FuncLength + +} + +// SRv6 SID Function length in bits. +// FuncLength returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) HasFuncLength() bool { + return obj.obj.FuncLength != nil +} + +// SRv6 SID Function length in bits. +// SetFuncLength sets the uint32 value in the BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure object +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) SetFuncLength(value uint32) BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + + obj.obj.FuncLength = &value + return obj +} + +// SRv6 SID Arguments length in bits. +// ArgLength returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) ArgLength() uint32 { + + return *obj.obj.ArgLength + +} + +// SRv6 SID Arguments length in bits. +// ArgLength returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) HasArgLength() bool { + return obj.obj.ArgLength != nil +} + +// SRv6 SID Arguments length in bits. +// SetArgLength sets the uint32 value in the BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure object +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) SetArgLength(value uint32) BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + + obj.obj.ArgLength = &value + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.EndpointBehaviour != nil { + + if len(*obj.obj.EndpointBehaviour) > 4 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "None <= length of BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure.EndpointBehaviour <= 4 but Got %d", + len(*obj.obj.EndpointBehaviour))) + } + + } + + if obj.obj.LbLength != nil { + + if *obj.obj.LbLength > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure.LbLength <= 128 but Got %d", *obj.obj.LbLength)) + } + + } + + if obj.obj.LnLength != nil { + + if *obj.obj.LnLength > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure.LnLength <= 128 but Got %d", *obj.obj.LnLength)) + } + + } + + if obj.obj.FuncLength != nil { + + if *obj.obj.FuncLength > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure.FuncLength <= 128 but Got %d", *obj.obj.FuncLength)) + } + + } + + if obj.obj.ArgLength != nil { + + if *obj.obj.ArgLength > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure.ArgLength <= 128 but Got %d", *obj.obj.ArgLength)) + } + + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) setDefault() { + if obj.obj.EndpointBehaviour == nil { + obj.SetEndpointBehaviour("ffff") + } + if obj.obj.LbLength == nil { + obj.SetLbLength(0) + } + if obj.obj.LnLength == nil { + obj.SetLnLength(0) + } + if obj.obj.FuncLength == nil { + obj.SetFuncLength(0) + } + if obj.obj.ArgLength == nil { + obj.SetArgLength(0) + } + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_segment_list_segment.go b/gosnappi/bgp_attributes_segment_routing_policy_segment_list_segment.go new file mode 100644 index 00000000..d05892b9 --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_segment_list_segment.go @@ -0,0 +1,972 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicySegmentListSegment ***** +type bgpAttributesSegmentRoutingPolicySegmentListSegment struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicySegmentListSegment + marshaller marshalBgpAttributesSegmentRoutingPolicySegmentListSegment + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicySegmentListSegment + typeAHolder BgpAttributesSegmentRoutingPolicyTypeA + typeBHolder BgpAttributesSegmentRoutingPolicyTypeB + typeCHolder BgpAttributesSegmentRoutingPolicyTypeC + typeDHolder BgpAttributesSegmentRoutingPolicyTypeD + typeEHolder BgpAttributesSegmentRoutingPolicyTypeE + typeFHolder BgpAttributesSegmentRoutingPolicyTypeF + typeGHolder BgpAttributesSegmentRoutingPolicyTypeG + typeHHolder BgpAttributesSegmentRoutingPolicyTypeH + typeIHolder BgpAttributesSegmentRoutingPolicyTypeI + typeJHolder BgpAttributesSegmentRoutingPolicyTypeJ + typeKHolder BgpAttributesSegmentRoutingPolicyTypeK +} + +func NewBgpAttributesSegmentRoutingPolicySegmentListSegment() BgpAttributesSegmentRoutingPolicySegmentListSegment { + obj := bgpAttributesSegmentRoutingPolicySegmentListSegment{obj: &otg.BgpAttributesSegmentRoutingPolicySegmentListSegment{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) msg() *otg.BgpAttributesSegmentRoutingPolicySegmentListSegment { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicySegmentListSegment) BgpAttributesSegmentRoutingPolicySegmentListSegment { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicySegmentListSegment struct { + obj *bgpAttributesSegmentRoutingPolicySegmentListSegment +} + +type marshalBgpAttributesSegmentRoutingPolicySegmentListSegment interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicySegmentListSegment to protobuf object *otg.BgpAttributesSegmentRoutingPolicySegmentListSegment + ToProto() (*otg.BgpAttributesSegmentRoutingPolicySegmentListSegment, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicySegmentListSegment to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicySegmentListSegment to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicySegmentListSegment to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicySegmentListSegment struct { + obj *bgpAttributesSegmentRoutingPolicySegmentListSegment +} + +type unMarshalBgpAttributesSegmentRoutingPolicySegmentListSegment interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicySegmentListSegment from protobuf object *otg.BgpAttributesSegmentRoutingPolicySegmentListSegment + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicySegmentListSegment) (BgpAttributesSegmentRoutingPolicySegmentListSegment, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicySegmentListSegment from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicySegmentListSegment from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicySegmentListSegment from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) Marshal() marshalBgpAttributesSegmentRoutingPolicySegmentListSegment { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicySegmentListSegment{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicySegmentListSegment { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicySegmentListSegment{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicySegmentListSegment) ToProto() (*otg.BgpAttributesSegmentRoutingPolicySegmentListSegment, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicySegmentListSegment) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicySegmentListSegment) (BgpAttributesSegmentRoutingPolicySegmentListSegment, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicySegmentListSegment) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicySegmentListSegment) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicySegmentListSegment) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicySegmentListSegment) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicySegmentListSegment) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicySegmentListSegment) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) Clone() (BgpAttributesSegmentRoutingPolicySegmentListSegment, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicySegmentListSegment() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) setNil() { + obj.typeAHolder = nil + obj.typeBHolder = nil + obj.typeCHolder = nil + obj.typeDHolder = nil + obj.typeEHolder = nil + obj.typeFHolder = nil + obj.typeGHolder = nil + obj.typeHHolder = nil + obj.typeIHolder = nil + obj.typeJHolder = nil + obj.typeKHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSegmentRoutingPolicySegmentListSegment is a Segment sub-TLV describes a single segment in a segment list i.e., a single +// element of the explicit path. The Segment sub-TLVs are optional. +// Segment Types A and B are defined as described in 2.4.4.2. +// Segment Types C upto K are defined as described in in draft-ietf-idr-bgp-sr-segtypes-ext-03 . +type BgpAttributesSegmentRoutingPolicySegmentListSegment interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicySegmentListSegment to protobuf object *otg.BgpAttributesSegmentRoutingPolicySegmentListSegment + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicySegmentListSegment + // setMsg unmarshals BgpAttributesSegmentRoutingPolicySegmentListSegment from protobuf object *otg.BgpAttributesSegmentRoutingPolicySegmentListSegment + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicySegmentListSegment) BgpAttributesSegmentRoutingPolicySegmentListSegment + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicySegmentListSegment + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicySegmentListSegment + // validate validates BgpAttributesSegmentRoutingPolicySegmentListSegment + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicySegmentListSegment, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum, set in BgpAttributesSegmentRoutingPolicySegmentListSegment + Choice() BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum + // setChoice assigns BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum provided by user to BgpAttributesSegmentRoutingPolicySegmentListSegment + setChoice(value BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum) BgpAttributesSegmentRoutingPolicySegmentListSegment + // TypeA returns BgpAttributesSegmentRoutingPolicyTypeA, set in BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeA is type A: SID only, in the form of MPLS Label. + // It is encoded as a Segment of Type 1 in the SEGMENT_LIST sub-tlv. + TypeA() BgpAttributesSegmentRoutingPolicyTypeA + // SetTypeA assigns BgpAttributesSegmentRoutingPolicyTypeA provided by user to BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeA is type A: SID only, in the form of MPLS Label. + // It is encoded as a Segment of Type 1 in the SEGMENT_LIST sub-tlv. + SetTypeA(value BgpAttributesSegmentRoutingPolicyTypeA) BgpAttributesSegmentRoutingPolicySegmentListSegment + // HasTypeA checks if TypeA has been set in BgpAttributesSegmentRoutingPolicySegmentListSegment + HasTypeA() bool + // TypeB returns BgpAttributesSegmentRoutingPolicyTypeB, set in BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeB is type B: SID only, in the form of IPv6 address. + // It is encoded as a Segment of Type 13 in the SEGMENT_LIST sub-tlv. + TypeB() BgpAttributesSegmentRoutingPolicyTypeB + // SetTypeB assigns BgpAttributesSegmentRoutingPolicyTypeB provided by user to BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeB is type B: SID only, in the form of IPv6 address. + // It is encoded as a Segment of Type 13 in the SEGMENT_LIST sub-tlv. + SetTypeB(value BgpAttributesSegmentRoutingPolicyTypeB) BgpAttributesSegmentRoutingPolicySegmentListSegment + // HasTypeB checks if TypeB has been set in BgpAttributesSegmentRoutingPolicySegmentListSegment + HasTypeB() bool + // TypeC returns BgpAttributesSegmentRoutingPolicyTypeC, set in BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeC is type C: IPv4 Node Address with optional SID. + // It is encoded as a Segment of Type 3 in the SEGMENT_LIST sub-tlv. + TypeC() BgpAttributesSegmentRoutingPolicyTypeC + // SetTypeC assigns BgpAttributesSegmentRoutingPolicyTypeC provided by user to BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeC is type C: IPv4 Node Address with optional SID. + // It is encoded as a Segment of Type 3 in the SEGMENT_LIST sub-tlv. + SetTypeC(value BgpAttributesSegmentRoutingPolicyTypeC) BgpAttributesSegmentRoutingPolicySegmentListSegment + // HasTypeC checks if TypeC has been set in BgpAttributesSegmentRoutingPolicySegmentListSegment + HasTypeC() bool + // TypeD returns BgpAttributesSegmentRoutingPolicyTypeD, set in BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeD is type D: IPv6 Node Address with optional SID for SR MPLS. + // It is encoded as a Segment of Type 4 in the SEGMENT_LIST sub-tlv. + TypeD() BgpAttributesSegmentRoutingPolicyTypeD + // SetTypeD assigns BgpAttributesSegmentRoutingPolicyTypeD provided by user to BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeD is type D: IPv6 Node Address with optional SID for SR MPLS. + // It is encoded as a Segment of Type 4 in the SEGMENT_LIST sub-tlv. + SetTypeD(value BgpAttributesSegmentRoutingPolicyTypeD) BgpAttributesSegmentRoutingPolicySegmentListSegment + // HasTypeD checks if TypeD has been set in BgpAttributesSegmentRoutingPolicySegmentListSegment + HasTypeD() bool + // TypeE returns BgpAttributesSegmentRoutingPolicyTypeE, set in BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeE is type E: IPv4 Address and Local Interface ID with optional SID + // It is encoded as a Segment of Type 5 in the SEGMENT_LIST sub-tlv. + TypeE() BgpAttributesSegmentRoutingPolicyTypeE + // SetTypeE assigns BgpAttributesSegmentRoutingPolicyTypeE provided by user to BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeE is type E: IPv4 Address and Local Interface ID with optional SID + // It is encoded as a Segment of Type 5 in the SEGMENT_LIST sub-tlv. + SetTypeE(value BgpAttributesSegmentRoutingPolicyTypeE) BgpAttributesSegmentRoutingPolicySegmentListSegment + // HasTypeE checks if TypeE has been set in BgpAttributesSegmentRoutingPolicySegmentListSegment + HasTypeE() bool + // TypeF returns BgpAttributesSegmentRoutingPolicyTypeF, set in BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeF is type F: IPv4 Local and Remote addresses with optional SR-MPLS SID. + // It is encoded as a Segment of Type 6 in the SEGMENT_LIST sub-tlv. + TypeF() BgpAttributesSegmentRoutingPolicyTypeF + // SetTypeF assigns BgpAttributesSegmentRoutingPolicyTypeF provided by user to BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeF is type F: IPv4 Local and Remote addresses with optional SR-MPLS SID. + // It is encoded as a Segment of Type 6 in the SEGMENT_LIST sub-tlv. + SetTypeF(value BgpAttributesSegmentRoutingPolicyTypeF) BgpAttributesSegmentRoutingPolicySegmentListSegment + // HasTypeF checks if TypeF has been set in BgpAttributesSegmentRoutingPolicySegmentListSegment + HasTypeF() bool + // TypeG returns BgpAttributesSegmentRoutingPolicyTypeG, set in BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeG is type G: IPv6 Address, Interface ID for local and remote pair with optional SID for SR MPLS. + // It is encoded as a Segment of Type 7 in the SEGMENT_LIST sub-tlv. + TypeG() BgpAttributesSegmentRoutingPolicyTypeG + // SetTypeG assigns BgpAttributesSegmentRoutingPolicyTypeG provided by user to BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeG is type G: IPv6 Address, Interface ID for local and remote pair with optional SID for SR MPLS. + // It is encoded as a Segment of Type 7 in the SEGMENT_LIST sub-tlv. + SetTypeG(value BgpAttributesSegmentRoutingPolicyTypeG) BgpAttributesSegmentRoutingPolicySegmentListSegment + // HasTypeG checks if TypeG has been set in BgpAttributesSegmentRoutingPolicySegmentListSegment + HasTypeG() bool + // TypeH returns BgpAttributesSegmentRoutingPolicyTypeH, set in BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeH is type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. + // It is encoded as a Segment of Type 8 in the SEGMENT_LIST sub-tlv. + TypeH() BgpAttributesSegmentRoutingPolicyTypeH + // SetTypeH assigns BgpAttributesSegmentRoutingPolicyTypeH provided by user to BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeH is type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. + // It is encoded as a Segment of Type 8 in the SEGMENT_LIST sub-tlv. + SetTypeH(value BgpAttributesSegmentRoutingPolicyTypeH) BgpAttributesSegmentRoutingPolicySegmentListSegment + // HasTypeH checks if TypeH has been set in BgpAttributesSegmentRoutingPolicySegmentListSegment + HasTypeH() bool + // TypeI returns BgpAttributesSegmentRoutingPolicyTypeI, set in BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeI is type I: IPv6 Node Address with optional SR Algorithm and optional SRv6 SID. + // It is encoded as a Segment of Type 14 in the SEGMENT_LIST sub-tlv. + TypeI() BgpAttributesSegmentRoutingPolicyTypeI + // SetTypeI assigns BgpAttributesSegmentRoutingPolicyTypeI provided by user to BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeI is type I: IPv6 Node Address with optional SR Algorithm and optional SRv6 SID. + // It is encoded as a Segment of Type 14 in the SEGMENT_LIST sub-tlv. + SetTypeI(value BgpAttributesSegmentRoutingPolicyTypeI) BgpAttributesSegmentRoutingPolicySegmentListSegment + // HasTypeI checks if TypeI has been set in BgpAttributesSegmentRoutingPolicySegmentListSegment + HasTypeI() bool + // TypeJ returns BgpAttributesSegmentRoutingPolicyTypeJ, set in BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeJ is type J: IPv6 Address, Interface ID for local and remote pair for SRv6 with optional SID. + // It is encoded as a Segment of Type 15 in the SEGMENT_LIST sub-tlv. + TypeJ() BgpAttributesSegmentRoutingPolicyTypeJ + // SetTypeJ assigns BgpAttributesSegmentRoutingPolicyTypeJ provided by user to BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeJ is type J: IPv6 Address, Interface ID for local and remote pair for SRv6 with optional SID. + // It is encoded as a Segment of Type 15 in the SEGMENT_LIST sub-tlv. + SetTypeJ(value BgpAttributesSegmentRoutingPolicyTypeJ) BgpAttributesSegmentRoutingPolicySegmentListSegment + // HasTypeJ checks if TypeJ has been set in BgpAttributesSegmentRoutingPolicySegmentListSegment + HasTypeJ() bool + // TypeK returns BgpAttributesSegmentRoutingPolicyTypeK, set in BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeK is type K: IPv6 Local and Remote addresses for SRv6 with optional SID. + // It is encoded as a Segment of Type 16 in the SEGMENT_LIST sub-tlv. + TypeK() BgpAttributesSegmentRoutingPolicyTypeK + // SetTypeK assigns BgpAttributesSegmentRoutingPolicyTypeK provided by user to BgpAttributesSegmentRoutingPolicySegmentListSegment. + // BgpAttributesSegmentRoutingPolicyTypeK is type K: IPv6 Local and Remote addresses for SRv6 with optional SID. + // It is encoded as a Segment of Type 16 in the SEGMENT_LIST sub-tlv. + SetTypeK(value BgpAttributesSegmentRoutingPolicyTypeK) BgpAttributesSegmentRoutingPolicySegmentListSegment + // HasTypeK checks if TypeK has been set in BgpAttributesSegmentRoutingPolicySegmentListSegment + HasTypeK() bool + setNil() +} + +type BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum string + +// Enum of Choice on BgpAttributesSegmentRoutingPolicySegmentListSegment +var BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice = struct { + TYPE_A BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum + TYPE_B BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum + TYPE_C BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum + TYPE_D BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum + TYPE_E BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum + TYPE_F BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum + TYPE_G BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum + TYPE_H BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum + TYPE_I BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum + TYPE_J BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum + TYPE_K BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum +}{ + TYPE_A: BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum("type_a"), + TYPE_B: BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum("type_b"), + TYPE_C: BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum("type_c"), + TYPE_D: BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum("type_d"), + TYPE_E: BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum("type_e"), + TYPE_F: BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum("type_f"), + TYPE_G: BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum("type_g"), + TYPE_H: BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum("type_h"), + TYPE_I: BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum("type_i"), + TYPE_J: BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum("type_j"), + TYPE_K: BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum("type_k"), +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) Choice() BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum { + return BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) setChoice(value BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum) BgpAttributesSegmentRoutingPolicySegmentListSegment { + intValue, ok := otg.BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.TypeK = nil + obj.typeKHolder = nil + obj.obj.TypeJ = nil + obj.typeJHolder = nil + obj.obj.TypeI = nil + obj.typeIHolder = nil + obj.obj.TypeH = nil + obj.typeHHolder = nil + obj.obj.TypeG = nil + obj.typeGHolder = nil + obj.obj.TypeF = nil + obj.typeFHolder = nil + obj.obj.TypeE = nil + obj.typeEHolder = nil + obj.obj.TypeD = nil + obj.typeDHolder = nil + obj.obj.TypeC = nil + obj.typeCHolder = nil + obj.obj.TypeB = nil + obj.typeBHolder = nil + obj.obj.TypeA = nil + obj.typeAHolder = nil + + if value == BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_A { + obj.obj.TypeA = NewBgpAttributesSegmentRoutingPolicyTypeA().msg() + } + + if value == BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_B { + obj.obj.TypeB = NewBgpAttributesSegmentRoutingPolicyTypeB().msg() + } + + if value == BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_C { + obj.obj.TypeC = NewBgpAttributesSegmentRoutingPolicyTypeC().msg() + } + + if value == BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_D { + obj.obj.TypeD = NewBgpAttributesSegmentRoutingPolicyTypeD().msg() + } + + if value == BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_E { + obj.obj.TypeE = NewBgpAttributesSegmentRoutingPolicyTypeE().msg() + } + + if value == BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_F { + obj.obj.TypeF = NewBgpAttributesSegmentRoutingPolicyTypeF().msg() + } + + if value == BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_G { + obj.obj.TypeG = NewBgpAttributesSegmentRoutingPolicyTypeG().msg() + } + + if value == BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_H { + obj.obj.TypeH = NewBgpAttributesSegmentRoutingPolicyTypeH().msg() + } + + if value == BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_I { + obj.obj.TypeI = NewBgpAttributesSegmentRoutingPolicyTypeI().msg() + } + + if value == BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_J { + obj.obj.TypeJ = NewBgpAttributesSegmentRoutingPolicyTypeJ().msg() + } + + if value == BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_K { + obj.obj.TypeK = NewBgpAttributesSegmentRoutingPolicyTypeK().msg() + } + + return obj +} + +// description is TBD +// TypeA returns a BgpAttributesSegmentRoutingPolicyTypeA +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) TypeA() BgpAttributesSegmentRoutingPolicyTypeA { + if obj.obj.TypeA == nil { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_A) + } + if obj.typeAHolder == nil { + obj.typeAHolder = &bgpAttributesSegmentRoutingPolicyTypeA{obj: obj.obj.TypeA} + } + return obj.typeAHolder +} + +// description is TBD +// TypeA returns a BgpAttributesSegmentRoutingPolicyTypeA +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) HasTypeA() bool { + return obj.obj.TypeA != nil +} + +// description is TBD +// SetTypeA sets the BgpAttributesSegmentRoutingPolicyTypeA value in the BgpAttributesSegmentRoutingPolicySegmentListSegment object +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) SetTypeA(value BgpAttributesSegmentRoutingPolicyTypeA) BgpAttributesSegmentRoutingPolicySegmentListSegment { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_A) + obj.typeAHolder = nil + obj.obj.TypeA = value.msg() + + return obj +} + +// description is TBD +// TypeB returns a BgpAttributesSegmentRoutingPolicyTypeB +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) TypeB() BgpAttributesSegmentRoutingPolicyTypeB { + if obj.obj.TypeB == nil { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_B) + } + if obj.typeBHolder == nil { + obj.typeBHolder = &bgpAttributesSegmentRoutingPolicyTypeB{obj: obj.obj.TypeB} + } + return obj.typeBHolder +} + +// description is TBD +// TypeB returns a BgpAttributesSegmentRoutingPolicyTypeB +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) HasTypeB() bool { + return obj.obj.TypeB != nil +} + +// description is TBD +// SetTypeB sets the BgpAttributesSegmentRoutingPolicyTypeB value in the BgpAttributesSegmentRoutingPolicySegmentListSegment object +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) SetTypeB(value BgpAttributesSegmentRoutingPolicyTypeB) BgpAttributesSegmentRoutingPolicySegmentListSegment { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_B) + obj.typeBHolder = nil + obj.obj.TypeB = value.msg() + + return obj +} + +// description is TBD +// TypeC returns a BgpAttributesSegmentRoutingPolicyTypeC +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) TypeC() BgpAttributesSegmentRoutingPolicyTypeC { + if obj.obj.TypeC == nil { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_C) + } + if obj.typeCHolder == nil { + obj.typeCHolder = &bgpAttributesSegmentRoutingPolicyTypeC{obj: obj.obj.TypeC} + } + return obj.typeCHolder +} + +// description is TBD +// TypeC returns a BgpAttributesSegmentRoutingPolicyTypeC +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) HasTypeC() bool { + return obj.obj.TypeC != nil +} + +// description is TBD +// SetTypeC sets the BgpAttributesSegmentRoutingPolicyTypeC value in the BgpAttributesSegmentRoutingPolicySegmentListSegment object +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) SetTypeC(value BgpAttributesSegmentRoutingPolicyTypeC) BgpAttributesSegmentRoutingPolicySegmentListSegment { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_C) + obj.typeCHolder = nil + obj.obj.TypeC = value.msg() + + return obj +} + +// description is TBD +// TypeD returns a BgpAttributesSegmentRoutingPolicyTypeD +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) TypeD() BgpAttributesSegmentRoutingPolicyTypeD { + if obj.obj.TypeD == nil { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_D) + } + if obj.typeDHolder == nil { + obj.typeDHolder = &bgpAttributesSegmentRoutingPolicyTypeD{obj: obj.obj.TypeD} + } + return obj.typeDHolder +} + +// description is TBD +// TypeD returns a BgpAttributesSegmentRoutingPolicyTypeD +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) HasTypeD() bool { + return obj.obj.TypeD != nil +} + +// description is TBD +// SetTypeD sets the BgpAttributesSegmentRoutingPolicyTypeD value in the BgpAttributesSegmentRoutingPolicySegmentListSegment object +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) SetTypeD(value BgpAttributesSegmentRoutingPolicyTypeD) BgpAttributesSegmentRoutingPolicySegmentListSegment { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_D) + obj.typeDHolder = nil + obj.obj.TypeD = value.msg() + + return obj +} + +// description is TBD +// TypeE returns a BgpAttributesSegmentRoutingPolicyTypeE +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) TypeE() BgpAttributesSegmentRoutingPolicyTypeE { + if obj.obj.TypeE == nil { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_E) + } + if obj.typeEHolder == nil { + obj.typeEHolder = &bgpAttributesSegmentRoutingPolicyTypeE{obj: obj.obj.TypeE} + } + return obj.typeEHolder +} + +// description is TBD +// TypeE returns a BgpAttributesSegmentRoutingPolicyTypeE +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) HasTypeE() bool { + return obj.obj.TypeE != nil +} + +// description is TBD +// SetTypeE sets the BgpAttributesSegmentRoutingPolicyTypeE value in the BgpAttributesSegmentRoutingPolicySegmentListSegment object +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) SetTypeE(value BgpAttributesSegmentRoutingPolicyTypeE) BgpAttributesSegmentRoutingPolicySegmentListSegment { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_E) + obj.typeEHolder = nil + obj.obj.TypeE = value.msg() + + return obj +} + +// description is TBD +// TypeF returns a BgpAttributesSegmentRoutingPolicyTypeF +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) TypeF() BgpAttributesSegmentRoutingPolicyTypeF { + if obj.obj.TypeF == nil { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_F) + } + if obj.typeFHolder == nil { + obj.typeFHolder = &bgpAttributesSegmentRoutingPolicyTypeF{obj: obj.obj.TypeF} + } + return obj.typeFHolder +} + +// description is TBD +// TypeF returns a BgpAttributesSegmentRoutingPolicyTypeF +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) HasTypeF() bool { + return obj.obj.TypeF != nil +} + +// description is TBD +// SetTypeF sets the BgpAttributesSegmentRoutingPolicyTypeF value in the BgpAttributesSegmentRoutingPolicySegmentListSegment object +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) SetTypeF(value BgpAttributesSegmentRoutingPolicyTypeF) BgpAttributesSegmentRoutingPolicySegmentListSegment { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_F) + obj.typeFHolder = nil + obj.obj.TypeF = value.msg() + + return obj +} + +// description is TBD +// TypeG returns a BgpAttributesSegmentRoutingPolicyTypeG +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) TypeG() BgpAttributesSegmentRoutingPolicyTypeG { + if obj.obj.TypeG == nil { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_G) + } + if obj.typeGHolder == nil { + obj.typeGHolder = &bgpAttributesSegmentRoutingPolicyTypeG{obj: obj.obj.TypeG} + } + return obj.typeGHolder +} + +// description is TBD +// TypeG returns a BgpAttributesSegmentRoutingPolicyTypeG +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) HasTypeG() bool { + return obj.obj.TypeG != nil +} + +// description is TBD +// SetTypeG sets the BgpAttributesSegmentRoutingPolicyTypeG value in the BgpAttributesSegmentRoutingPolicySegmentListSegment object +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) SetTypeG(value BgpAttributesSegmentRoutingPolicyTypeG) BgpAttributesSegmentRoutingPolicySegmentListSegment { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_G) + obj.typeGHolder = nil + obj.obj.TypeG = value.msg() + + return obj +} + +// description is TBD +// TypeH returns a BgpAttributesSegmentRoutingPolicyTypeH +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) TypeH() BgpAttributesSegmentRoutingPolicyTypeH { + if obj.obj.TypeH == nil { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_H) + } + if obj.typeHHolder == nil { + obj.typeHHolder = &bgpAttributesSegmentRoutingPolicyTypeH{obj: obj.obj.TypeH} + } + return obj.typeHHolder +} + +// description is TBD +// TypeH returns a BgpAttributesSegmentRoutingPolicyTypeH +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) HasTypeH() bool { + return obj.obj.TypeH != nil +} + +// description is TBD +// SetTypeH sets the BgpAttributesSegmentRoutingPolicyTypeH value in the BgpAttributesSegmentRoutingPolicySegmentListSegment object +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) SetTypeH(value BgpAttributesSegmentRoutingPolicyTypeH) BgpAttributesSegmentRoutingPolicySegmentListSegment { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_H) + obj.typeHHolder = nil + obj.obj.TypeH = value.msg() + + return obj +} + +// description is TBD +// TypeI returns a BgpAttributesSegmentRoutingPolicyTypeI +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) TypeI() BgpAttributesSegmentRoutingPolicyTypeI { + if obj.obj.TypeI == nil { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_I) + } + if obj.typeIHolder == nil { + obj.typeIHolder = &bgpAttributesSegmentRoutingPolicyTypeI{obj: obj.obj.TypeI} + } + return obj.typeIHolder +} + +// description is TBD +// TypeI returns a BgpAttributesSegmentRoutingPolicyTypeI +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) HasTypeI() bool { + return obj.obj.TypeI != nil +} + +// description is TBD +// SetTypeI sets the BgpAttributesSegmentRoutingPolicyTypeI value in the BgpAttributesSegmentRoutingPolicySegmentListSegment object +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) SetTypeI(value BgpAttributesSegmentRoutingPolicyTypeI) BgpAttributesSegmentRoutingPolicySegmentListSegment { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_I) + obj.typeIHolder = nil + obj.obj.TypeI = value.msg() + + return obj +} + +// description is TBD +// TypeJ returns a BgpAttributesSegmentRoutingPolicyTypeJ +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) TypeJ() BgpAttributesSegmentRoutingPolicyTypeJ { + if obj.obj.TypeJ == nil { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_J) + } + if obj.typeJHolder == nil { + obj.typeJHolder = &bgpAttributesSegmentRoutingPolicyTypeJ{obj: obj.obj.TypeJ} + } + return obj.typeJHolder +} + +// description is TBD +// TypeJ returns a BgpAttributesSegmentRoutingPolicyTypeJ +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) HasTypeJ() bool { + return obj.obj.TypeJ != nil +} + +// description is TBD +// SetTypeJ sets the BgpAttributesSegmentRoutingPolicyTypeJ value in the BgpAttributesSegmentRoutingPolicySegmentListSegment object +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) SetTypeJ(value BgpAttributesSegmentRoutingPolicyTypeJ) BgpAttributesSegmentRoutingPolicySegmentListSegment { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_J) + obj.typeJHolder = nil + obj.obj.TypeJ = value.msg() + + return obj +} + +// description is TBD +// TypeK returns a BgpAttributesSegmentRoutingPolicyTypeK +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) TypeK() BgpAttributesSegmentRoutingPolicyTypeK { + if obj.obj.TypeK == nil { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_K) + } + if obj.typeKHolder == nil { + obj.typeKHolder = &bgpAttributesSegmentRoutingPolicyTypeK{obj: obj.obj.TypeK} + } + return obj.typeKHolder +} + +// description is TBD +// TypeK returns a BgpAttributesSegmentRoutingPolicyTypeK +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) HasTypeK() bool { + return obj.obj.TypeK != nil +} + +// description is TBD +// SetTypeK sets the BgpAttributesSegmentRoutingPolicyTypeK value in the BgpAttributesSegmentRoutingPolicySegmentListSegment object +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) SetTypeK(value BgpAttributesSegmentRoutingPolicyTypeK) BgpAttributesSegmentRoutingPolicySegmentListSegment { + obj.setChoice(BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_K) + obj.typeKHolder = nil + obj.obj.TypeK = value.msg() + + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface BgpAttributesSegmentRoutingPolicySegmentListSegment") + } + + if obj.obj.TypeA != nil { + + obj.TypeA().validateObj(vObj, set_default) + } + + if obj.obj.TypeB != nil { + + obj.TypeB().validateObj(vObj, set_default) + } + + if obj.obj.TypeC != nil { + + obj.TypeC().validateObj(vObj, set_default) + } + + if obj.obj.TypeD != nil { + + obj.TypeD().validateObj(vObj, set_default) + } + + if obj.obj.TypeE != nil { + + obj.TypeE().validateObj(vObj, set_default) + } + + if obj.obj.TypeF != nil { + + obj.TypeF().validateObj(vObj, set_default) + } + + if obj.obj.TypeG != nil { + + obj.TypeG().validateObj(vObj, set_default) + } + + if obj.obj.TypeH != nil { + + obj.TypeH().validateObj(vObj, set_default) + } + + if obj.obj.TypeI != nil { + + obj.TypeI().validateObj(vObj, set_default) + } + + if obj.obj.TypeJ != nil { + + obj.TypeJ().validateObj(vObj, set_default) + } + + if obj.obj.TypeK != nil { + + obj.TypeK().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListSegment) setDefault() { + var choices_set int = 0 + var choice BgpAttributesSegmentRoutingPolicySegmentListSegmentChoiceEnum + + if obj.obj.TypeA != nil { + choices_set += 1 + choice = BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_A + } + + if obj.obj.TypeB != nil { + choices_set += 1 + choice = BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_B + } + + if obj.obj.TypeC != nil { + choices_set += 1 + choice = BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_C + } + + if obj.obj.TypeD != nil { + choices_set += 1 + choice = BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_D + } + + if obj.obj.TypeE != nil { + choices_set += 1 + choice = BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_E + } + + if obj.obj.TypeF != nil { + choices_set += 1 + choice = BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_F + } + + if obj.obj.TypeG != nil { + choices_set += 1 + choice = BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_G + } + + if obj.obj.TypeH != nil { + choices_set += 1 + choice = BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_H + } + + if obj.obj.TypeI != nil { + choices_set += 1 + choice = BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_I + } + + if obj.obj.TypeJ != nil { + choices_set += 1 + choice = BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_J + } + + if obj.obj.TypeK != nil { + choices_set += 1 + choice = BgpAttributesSegmentRoutingPolicySegmentListSegmentChoice.TYPE_K + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpAttributesSegmentRoutingPolicySegmentListSegment") + } + } else { + intVal := otg.BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum_value[string(choice)] + enumValue := otg.BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_segment_list_weight.go b/gosnappi/bgp_attributes_segment_routing_policy_segment_list_weight.go new file mode 100644 index 00000000..e691ad33 --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_segment_list_weight.go @@ -0,0 +1,309 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicySegmentListWeight ***** +type bgpAttributesSegmentRoutingPolicySegmentListWeight struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicySegmentListWeight + marshaller marshalBgpAttributesSegmentRoutingPolicySegmentListWeight + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicySegmentListWeight +} + +func NewBgpAttributesSegmentRoutingPolicySegmentListWeight() BgpAttributesSegmentRoutingPolicySegmentListWeight { + obj := bgpAttributesSegmentRoutingPolicySegmentListWeight{obj: &otg.BgpAttributesSegmentRoutingPolicySegmentListWeight{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListWeight) msg() *otg.BgpAttributesSegmentRoutingPolicySegmentListWeight { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListWeight) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicySegmentListWeight) BgpAttributesSegmentRoutingPolicySegmentListWeight { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicySegmentListWeight struct { + obj *bgpAttributesSegmentRoutingPolicySegmentListWeight +} + +type marshalBgpAttributesSegmentRoutingPolicySegmentListWeight interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicySegmentListWeight to protobuf object *otg.BgpAttributesSegmentRoutingPolicySegmentListWeight + ToProto() (*otg.BgpAttributesSegmentRoutingPolicySegmentListWeight, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicySegmentListWeight to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicySegmentListWeight to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicySegmentListWeight to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicySegmentListWeight struct { + obj *bgpAttributesSegmentRoutingPolicySegmentListWeight +} + +type unMarshalBgpAttributesSegmentRoutingPolicySegmentListWeight interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicySegmentListWeight from protobuf object *otg.BgpAttributesSegmentRoutingPolicySegmentListWeight + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicySegmentListWeight) (BgpAttributesSegmentRoutingPolicySegmentListWeight, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicySegmentListWeight from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicySegmentListWeight from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicySegmentListWeight from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListWeight) Marshal() marshalBgpAttributesSegmentRoutingPolicySegmentListWeight { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicySegmentListWeight{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListWeight) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicySegmentListWeight { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicySegmentListWeight{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicySegmentListWeight) ToProto() (*otg.BgpAttributesSegmentRoutingPolicySegmentListWeight, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicySegmentListWeight) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicySegmentListWeight) (BgpAttributesSegmentRoutingPolicySegmentListWeight, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicySegmentListWeight) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicySegmentListWeight) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicySegmentListWeight) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicySegmentListWeight) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicySegmentListWeight) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicySegmentListWeight) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListWeight) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListWeight) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListWeight) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListWeight) Clone() (BgpAttributesSegmentRoutingPolicySegmentListWeight, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicySegmentListWeight() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesSegmentRoutingPolicySegmentListWeight is the optional Weight sub-TLV (Type 9) specifies the weight associated with a given segment list. The weight is used for weighted multipath. +type BgpAttributesSegmentRoutingPolicySegmentListWeight interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicySegmentListWeight to protobuf object *otg.BgpAttributesSegmentRoutingPolicySegmentListWeight + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicySegmentListWeight + // setMsg unmarshals BgpAttributesSegmentRoutingPolicySegmentListWeight from protobuf object *otg.BgpAttributesSegmentRoutingPolicySegmentListWeight + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicySegmentListWeight) BgpAttributesSegmentRoutingPolicySegmentListWeight + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicySegmentListWeight + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicySegmentListWeight + // validate validates BgpAttributesSegmentRoutingPolicySegmentListWeight + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicySegmentListWeight, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Value returns uint32, set in BgpAttributesSegmentRoutingPolicySegmentListWeight. + Value() uint32 + // SetValue assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicySegmentListWeight + SetValue(value uint32) BgpAttributesSegmentRoutingPolicySegmentListWeight + // HasValue checks if Value has been set in BgpAttributesSegmentRoutingPolicySegmentListWeight + HasValue() bool +} + +// Value of the weight. +// Value returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicySegmentListWeight) Value() uint32 { + + return *obj.obj.Value + +} + +// Value of the weight. +// Value returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicySegmentListWeight) HasValue() bool { + return obj.obj.Value != nil +} + +// Value of the weight. +// SetValue sets the uint32 value in the BgpAttributesSegmentRoutingPolicySegmentListWeight object +func (obj *bgpAttributesSegmentRoutingPolicySegmentListWeight) SetValue(value uint32) BgpAttributesSegmentRoutingPolicySegmentListWeight { + + obj.obj.Value = &value + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListWeight) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicySegmentListWeight) setDefault() { + if obj.obj.Value == nil { + obj.SetValue(0) + } + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_type_a.go b/gosnappi/bgp_attributes_segment_routing_policy_type_a.go new file mode 100644 index 00000000..aa11df66 --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_type_a.go @@ -0,0 +1,384 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicyTypeA ***** +type bgpAttributesSegmentRoutingPolicyTypeA struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicyTypeA + marshaller marshalBgpAttributesSegmentRoutingPolicyTypeA + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicyTypeA + flagsHolder BgpAttributesSegmentRoutingPolicyTypeFlags + mplsSidHolder BgpAttributesSidMpls +} + +func NewBgpAttributesSegmentRoutingPolicyTypeA() BgpAttributesSegmentRoutingPolicyTypeA { + obj := bgpAttributesSegmentRoutingPolicyTypeA{obj: &otg.BgpAttributesSegmentRoutingPolicyTypeA{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) msg() *otg.BgpAttributesSegmentRoutingPolicyTypeA { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicyTypeA) BgpAttributesSegmentRoutingPolicyTypeA { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicyTypeA struct { + obj *bgpAttributesSegmentRoutingPolicyTypeA +} + +type marshalBgpAttributesSegmentRoutingPolicyTypeA interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicyTypeA to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeA + ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeA, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicyTypeA to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicyTypeA to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicyTypeA to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicyTypeA struct { + obj *bgpAttributesSegmentRoutingPolicyTypeA +} + +type unMarshalBgpAttributesSegmentRoutingPolicyTypeA interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicyTypeA from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeA + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeA) (BgpAttributesSegmentRoutingPolicyTypeA, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicyTypeA from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicyTypeA from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicyTypeA from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeA { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicyTypeA{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeA { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicyTypeA{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeA) ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeA, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeA) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeA) (BgpAttributesSegmentRoutingPolicyTypeA, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeA) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeA) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeA) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeA) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeA) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeA) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) Clone() (BgpAttributesSegmentRoutingPolicyTypeA, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicyTypeA() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) setNil() { + obj.flagsHolder = nil + obj.mplsSidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSegmentRoutingPolicyTypeA is type A: SID only, in the form of MPLS Label. +// It is encoded as a Segment of Type 1 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeA interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicyTypeA to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeA + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicyTypeA + // setMsg unmarshals BgpAttributesSegmentRoutingPolicyTypeA from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeA + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicyTypeA) BgpAttributesSegmentRoutingPolicyTypeA + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeA + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeA + // validate validates BgpAttributesSegmentRoutingPolicyTypeA + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicyTypeA, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns BgpAttributesSegmentRoutingPolicyTypeFlags, set in BgpAttributesSegmentRoutingPolicyTypeA. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + Flags() BgpAttributesSegmentRoutingPolicyTypeFlags + // SetFlags assigns BgpAttributesSegmentRoutingPolicyTypeFlags provided by user to BgpAttributesSegmentRoutingPolicyTypeA. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeA + // HasFlags checks if Flags has been set in BgpAttributesSegmentRoutingPolicyTypeA + HasFlags() bool + // MplsSid returns BgpAttributesSidMpls, set in BgpAttributesSegmentRoutingPolicyTypeA. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + MplsSid() BgpAttributesSidMpls + // SetMplsSid assigns BgpAttributesSidMpls provided by user to BgpAttributesSegmentRoutingPolicyTypeA. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + SetMplsSid(value BgpAttributesSidMpls) BgpAttributesSegmentRoutingPolicyTypeA + // HasMplsSid checks if MplsSid has been set in BgpAttributesSegmentRoutingPolicyTypeA + HasMplsSid() bool + setNil() +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) Flags() BgpAttributesSegmentRoutingPolicyTypeFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewBgpAttributesSegmentRoutingPolicyTypeFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &bgpAttributesSegmentRoutingPolicyTypeFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) HasFlags() bool { + return obj.obj.Flags != nil +} + +// description is TBD +// SetFlags sets the BgpAttributesSegmentRoutingPolicyTypeFlags value in the BgpAttributesSegmentRoutingPolicyTypeA object +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeA { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// description is TBD +// MplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) MplsSid() BgpAttributesSidMpls { + if obj.obj.MplsSid == nil { + obj.obj.MplsSid = NewBgpAttributesSidMpls().msg() + } + if obj.mplsSidHolder == nil { + obj.mplsSidHolder = &bgpAttributesSidMpls{obj: obj.obj.MplsSid} + } + return obj.mplsSidHolder +} + +// description is TBD +// MplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) HasMplsSid() bool { + return obj.obj.MplsSid != nil +} + +// description is TBD +// SetMplsSid sets the BgpAttributesSidMpls value in the BgpAttributesSegmentRoutingPolicyTypeA object +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) SetMplsSid(value BgpAttributesSidMpls) BgpAttributesSegmentRoutingPolicyTypeA { + + obj.mplsSidHolder = nil + obj.obj.MplsSid = value.msg() + + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.MplsSid != nil { + + obj.MplsSid().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeA) setDefault() { + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_type_b.go b/gosnappi/bgp_attributes_segment_routing_policy_type_b.go new file mode 100644 index 00000000..c8bb3aec --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_type_b.go @@ -0,0 +1,422 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicyTypeB ***** +type bgpAttributesSegmentRoutingPolicyTypeB struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicyTypeB + marshaller marshalBgpAttributesSegmentRoutingPolicyTypeB + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicyTypeB + flagsHolder BgpAttributesSegmentRoutingPolicyTypeFlags + srv6EndpointBehaviorHolder BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +} + +func NewBgpAttributesSegmentRoutingPolicyTypeB() BgpAttributesSegmentRoutingPolicyTypeB { + obj := bgpAttributesSegmentRoutingPolicyTypeB{obj: &otg.BgpAttributesSegmentRoutingPolicyTypeB{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) msg() *otg.BgpAttributesSegmentRoutingPolicyTypeB { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicyTypeB) BgpAttributesSegmentRoutingPolicyTypeB { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicyTypeB struct { + obj *bgpAttributesSegmentRoutingPolicyTypeB +} + +type marshalBgpAttributesSegmentRoutingPolicyTypeB interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicyTypeB to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeB + ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeB, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicyTypeB to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicyTypeB to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicyTypeB to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicyTypeB struct { + obj *bgpAttributesSegmentRoutingPolicyTypeB +} + +type unMarshalBgpAttributesSegmentRoutingPolicyTypeB interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicyTypeB from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeB + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeB) (BgpAttributesSegmentRoutingPolicyTypeB, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicyTypeB from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicyTypeB from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicyTypeB from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeB { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicyTypeB{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeB { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicyTypeB{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeB) ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeB, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeB) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeB) (BgpAttributesSegmentRoutingPolicyTypeB, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeB) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeB) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeB) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeB) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeB) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeB) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) Clone() (BgpAttributesSegmentRoutingPolicyTypeB, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicyTypeB() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) setNil() { + obj.flagsHolder = nil + obj.srv6EndpointBehaviorHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSegmentRoutingPolicyTypeB is type B: SID only, in the form of IPv6 address. +// It is encoded as a Segment of Type 13 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeB interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicyTypeB to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeB + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicyTypeB + // setMsg unmarshals BgpAttributesSegmentRoutingPolicyTypeB from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeB + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicyTypeB) BgpAttributesSegmentRoutingPolicyTypeB + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeB + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeB + // validate validates BgpAttributesSegmentRoutingPolicyTypeB + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicyTypeB, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns BgpAttributesSegmentRoutingPolicyTypeFlags, set in BgpAttributesSegmentRoutingPolicyTypeB. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + Flags() BgpAttributesSegmentRoutingPolicyTypeFlags + // SetFlags assigns BgpAttributesSegmentRoutingPolicyTypeFlags provided by user to BgpAttributesSegmentRoutingPolicyTypeB. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeB + // HasFlags checks if Flags has been set in BgpAttributesSegmentRoutingPolicyTypeB + HasFlags() bool + // Srv6Sid returns string, set in BgpAttributesSegmentRoutingPolicyTypeB. + Srv6Sid() string + // SetSrv6Sid assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeB + SetSrv6Sid(value string) BgpAttributesSegmentRoutingPolicyTypeB + // HasSrv6Sid checks if Srv6Sid has been set in BgpAttributesSegmentRoutingPolicyTypeB + HasSrv6Sid() bool + // Srv6EndpointBehavior returns BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure, set in BgpAttributesSegmentRoutingPolicyTypeB. + // BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure is configuration for optional SRv6 Endpoint Behavior and SID Structure. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. - This is specified in draft-ietf-idr-sr-policy-safi-02 Section 2.4.4.2.4 + Srv6EndpointBehavior() BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // SetSrv6EndpointBehavior assigns BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure provided by user to BgpAttributesSegmentRoutingPolicyTypeB. + // BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure is configuration for optional SRv6 Endpoint Behavior and SID Structure. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. - This is specified in draft-ietf-idr-sr-policy-safi-02 Section 2.4.4.2.4 + SetSrv6EndpointBehavior(value BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) BgpAttributesSegmentRoutingPolicyTypeB + // HasSrv6EndpointBehavior checks if Srv6EndpointBehavior has been set in BgpAttributesSegmentRoutingPolicyTypeB + HasSrv6EndpointBehavior() bool + setNil() +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) Flags() BgpAttributesSegmentRoutingPolicyTypeFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewBgpAttributesSegmentRoutingPolicyTypeFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &bgpAttributesSegmentRoutingPolicyTypeFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) HasFlags() bool { + return obj.obj.Flags != nil +} + +// description is TBD +// SetFlags sets the BgpAttributesSegmentRoutingPolicyTypeFlags value in the BgpAttributesSegmentRoutingPolicyTypeB object +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeB { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// SRv6 SID. +// Srv6Sid returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) Srv6Sid() string { + + return *obj.obj.Srv6Sid + +} + +// SRv6 SID. +// Srv6Sid returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) HasSrv6Sid() bool { + return obj.obj.Srv6Sid != nil +} + +// SRv6 SID. +// SetSrv6Sid sets the string value in the BgpAttributesSegmentRoutingPolicyTypeB object +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) SetSrv6Sid(value string) BgpAttributesSegmentRoutingPolicyTypeB { + + obj.obj.Srv6Sid = &value + return obj +} + +// description is TBD +// Srv6EndpointBehavior returns a BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) Srv6EndpointBehavior() BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + if obj.obj.Srv6EndpointBehavior == nil { + obj.obj.Srv6EndpointBehavior = NewBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure().msg() + } + if obj.srv6EndpointBehaviorHolder == nil { + obj.srv6EndpointBehaviorHolder = &bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure{obj: obj.obj.Srv6EndpointBehavior} + } + return obj.srv6EndpointBehaviorHolder +} + +// description is TBD +// Srv6EndpointBehavior returns a BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) HasSrv6EndpointBehavior() bool { + return obj.obj.Srv6EndpointBehavior != nil +} + +// description is TBD +// SetSrv6EndpointBehavior sets the BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure value in the BgpAttributesSegmentRoutingPolicyTypeB object +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) SetSrv6EndpointBehavior(value BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) BgpAttributesSegmentRoutingPolicyTypeB { + + obj.srv6EndpointBehaviorHolder = nil + obj.obj.Srv6EndpointBehavior = value.msg() + + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.Srv6Sid != nil { + + err := obj.validateIpv6(obj.Srv6Sid()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeB.Srv6Sid")) + } + + } + + if obj.obj.Srv6EndpointBehavior != nil { + + obj.Srv6EndpointBehavior().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeB) setDefault() { + if obj.obj.Srv6Sid == nil { + obj.SetSrv6Sid("0::0") + } + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_type_c.go b/gosnappi/bgp_attributes_segment_routing_policy_type_c.go new file mode 100644 index 00000000..9c14d983 --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_type_c.go @@ -0,0 +1,465 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicyTypeC ***** +type bgpAttributesSegmentRoutingPolicyTypeC struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicyTypeC + marshaller marshalBgpAttributesSegmentRoutingPolicyTypeC + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicyTypeC + flagsHolder BgpAttributesSegmentRoutingPolicyTypeFlags + srMplsSidHolder BgpAttributesSidMpls +} + +func NewBgpAttributesSegmentRoutingPolicyTypeC() BgpAttributesSegmentRoutingPolicyTypeC { + obj := bgpAttributesSegmentRoutingPolicyTypeC{obj: &otg.BgpAttributesSegmentRoutingPolicyTypeC{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) msg() *otg.BgpAttributesSegmentRoutingPolicyTypeC { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicyTypeC) BgpAttributesSegmentRoutingPolicyTypeC { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicyTypeC struct { + obj *bgpAttributesSegmentRoutingPolicyTypeC +} + +type marshalBgpAttributesSegmentRoutingPolicyTypeC interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicyTypeC to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeC + ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeC, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicyTypeC to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicyTypeC to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicyTypeC to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicyTypeC struct { + obj *bgpAttributesSegmentRoutingPolicyTypeC +} + +type unMarshalBgpAttributesSegmentRoutingPolicyTypeC interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicyTypeC from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeC + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeC) (BgpAttributesSegmentRoutingPolicyTypeC, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicyTypeC from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicyTypeC from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicyTypeC from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeC { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicyTypeC{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeC { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicyTypeC{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeC) ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeC, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeC) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeC) (BgpAttributesSegmentRoutingPolicyTypeC, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeC) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeC) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeC) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeC) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeC) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeC) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) Clone() (BgpAttributesSegmentRoutingPolicyTypeC, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicyTypeC() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) setNil() { + obj.flagsHolder = nil + obj.srMplsSidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSegmentRoutingPolicyTypeC is type C: IPv4 Node Address with optional SID. +// It is encoded as a Segment of Type 3 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeC interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicyTypeC to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeC + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicyTypeC + // setMsg unmarshals BgpAttributesSegmentRoutingPolicyTypeC from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeC + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicyTypeC) BgpAttributesSegmentRoutingPolicyTypeC + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeC + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeC + // validate validates BgpAttributesSegmentRoutingPolicyTypeC + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicyTypeC, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns BgpAttributesSegmentRoutingPolicyTypeFlags, set in BgpAttributesSegmentRoutingPolicyTypeC. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + Flags() BgpAttributesSegmentRoutingPolicyTypeFlags + // SetFlags assigns BgpAttributesSegmentRoutingPolicyTypeFlags provided by user to BgpAttributesSegmentRoutingPolicyTypeC. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeC + // HasFlags checks if Flags has been set in BgpAttributesSegmentRoutingPolicyTypeC + HasFlags() bool + // SrAlgorithm returns uint32, set in BgpAttributesSegmentRoutingPolicyTypeC. + SrAlgorithm() uint32 + // SetSrAlgorithm assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicyTypeC + SetSrAlgorithm(value uint32) BgpAttributesSegmentRoutingPolicyTypeC + // HasSrAlgorithm checks if SrAlgorithm has been set in BgpAttributesSegmentRoutingPolicyTypeC + HasSrAlgorithm() bool + // Ipv4NodeAddress returns string, set in BgpAttributesSegmentRoutingPolicyTypeC. + Ipv4NodeAddress() string + // SetIpv4NodeAddress assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeC + SetIpv4NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeC + // HasIpv4NodeAddress checks if Ipv4NodeAddress has been set in BgpAttributesSegmentRoutingPolicyTypeC + HasIpv4NodeAddress() bool + // SrMplsSid returns BgpAttributesSidMpls, set in BgpAttributesSegmentRoutingPolicyTypeC. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + SrMplsSid() BgpAttributesSidMpls + // SetSrMplsSid assigns BgpAttributesSidMpls provided by user to BgpAttributesSegmentRoutingPolicyTypeC. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + SetSrMplsSid(value BgpAttributesSidMpls) BgpAttributesSegmentRoutingPolicyTypeC + // HasSrMplsSid checks if SrMplsSid has been set in BgpAttributesSegmentRoutingPolicyTypeC + HasSrMplsSid() bool + setNil() +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) Flags() BgpAttributesSegmentRoutingPolicyTypeFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewBgpAttributesSegmentRoutingPolicyTypeFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &bgpAttributesSegmentRoutingPolicyTypeFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) HasFlags() bool { + return obj.obj.Flags != nil +} + +// description is TBD +// SetFlags sets the BgpAttributesSegmentRoutingPolicyTypeFlags value in the BgpAttributesSegmentRoutingPolicyTypeC object +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeC { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SrAlgorithm returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) SrAlgorithm() uint32 { + + return *obj.obj.SrAlgorithm + +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SrAlgorithm returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) HasSrAlgorithm() bool { + return obj.obj.SrAlgorithm != nil +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SetSrAlgorithm sets the uint32 value in the BgpAttributesSegmentRoutingPolicyTypeC object +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) SetSrAlgorithm(value uint32) BgpAttributesSegmentRoutingPolicyTypeC { + + obj.obj.SrAlgorithm = &value + return obj +} + +// IPv4 address representing a node. +// Ipv4NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) Ipv4NodeAddress() string { + + return *obj.obj.Ipv4NodeAddress + +} + +// IPv4 address representing a node. +// Ipv4NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) HasIpv4NodeAddress() bool { + return obj.obj.Ipv4NodeAddress != nil +} + +// IPv4 address representing a node. +// SetIpv4NodeAddress sets the string value in the BgpAttributesSegmentRoutingPolicyTypeC object +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) SetIpv4NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeC { + + obj.obj.Ipv4NodeAddress = &value + return obj +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) SrMplsSid() BgpAttributesSidMpls { + if obj.obj.SrMplsSid == nil { + obj.obj.SrMplsSid = NewBgpAttributesSidMpls().msg() + } + if obj.srMplsSidHolder == nil { + obj.srMplsSidHolder = &bgpAttributesSidMpls{obj: obj.obj.SrMplsSid} + } + return obj.srMplsSidHolder +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) HasSrMplsSid() bool { + return obj.obj.SrMplsSid != nil +} + +// Optional SR-MPLS SID. +// SetSrMplsSid sets the BgpAttributesSidMpls value in the BgpAttributesSegmentRoutingPolicyTypeC object +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) SetSrMplsSid(value BgpAttributesSidMpls) BgpAttributesSegmentRoutingPolicyTypeC { + + obj.srMplsSidHolder = nil + obj.obj.SrMplsSid = value.msg() + + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.SrAlgorithm != nil { + + if *obj.obj.SrAlgorithm > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesSegmentRoutingPolicyTypeC.SrAlgorithm <= 255 but Got %d", *obj.obj.SrAlgorithm)) + } + + } + + if obj.obj.Ipv4NodeAddress != nil { + + err := obj.validateIpv4(obj.Ipv4NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeC.Ipv4NodeAddress")) + } + + } + + if obj.obj.SrMplsSid != nil { + + obj.SrMplsSid().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeC) setDefault() { + if obj.obj.SrAlgorithm == nil { + obj.SetSrAlgorithm(0) + } + if obj.obj.Ipv4NodeAddress == nil { + obj.SetIpv4NodeAddress("0.0.0.0") + } + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_type_d.go b/gosnappi/bgp_attributes_segment_routing_policy_type_d.go new file mode 100644 index 00000000..4adb6ed4 --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_type_d.go @@ -0,0 +1,465 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicyTypeD ***** +type bgpAttributesSegmentRoutingPolicyTypeD struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicyTypeD + marshaller marshalBgpAttributesSegmentRoutingPolicyTypeD + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicyTypeD + flagsHolder BgpAttributesSegmentRoutingPolicyTypeFlags + srMplsSidHolder BgpAttributesSidMpls +} + +func NewBgpAttributesSegmentRoutingPolicyTypeD() BgpAttributesSegmentRoutingPolicyTypeD { + obj := bgpAttributesSegmentRoutingPolicyTypeD{obj: &otg.BgpAttributesSegmentRoutingPolicyTypeD{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) msg() *otg.BgpAttributesSegmentRoutingPolicyTypeD { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicyTypeD) BgpAttributesSegmentRoutingPolicyTypeD { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicyTypeD struct { + obj *bgpAttributesSegmentRoutingPolicyTypeD +} + +type marshalBgpAttributesSegmentRoutingPolicyTypeD interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicyTypeD to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeD + ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeD, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicyTypeD to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicyTypeD to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicyTypeD to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicyTypeD struct { + obj *bgpAttributesSegmentRoutingPolicyTypeD +} + +type unMarshalBgpAttributesSegmentRoutingPolicyTypeD interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicyTypeD from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeD + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeD) (BgpAttributesSegmentRoutingPolicyTypeD, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicyTypeD from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicyTypeD from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicyTypeD from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeD { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicyTypeD{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeD { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicyTypeD{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeD) ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeD, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeD) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeD) (BgpAttributesSegmentRoutingPolicyTypeD, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeD) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeD) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeD) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeD) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeD) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeD) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) Clone() (BgpAttributesSegmentRoutingPolicyTypeD, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicyTypeD() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) setNil() { + obj.flagsHolder = nil + obj.srMplsSidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSegmentRoutingPolicyTypeD is type D: IPv6 Node Address with optional SID for SR MPLS. +// It is encoded as a Segment of Type 4 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeD interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicyTypeD to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeD + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicyTypeD + // setMsg unmarshals BgpAttributesSegmentRoutingPolicyTypeD from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeD + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicyTypeD) BgpAttributesSegmentRoutingPolicyTypeD + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeD + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeD + // validate validates BgpAttributesSegmentRoutingPolicyTypeD + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicyTypeD, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns BgpAttributesSegmentRoutingPolicyTypeFlags, set in BgpAttributesSegmentRoutingPolicyTypeD. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + Flags() BgpAttributesSegmentRoutingPolicyTypeFlags + // SetFlags assigns BgpAttributesSegmentRoutingPolicyTypeFlags provided by user to BgpAttributesSegmentRoutingPolicyTypeD. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeD + // HasFlags checks if Flags has been set in BgpAttributesSegmentRoutingPolicyTypeD + HasFlags() bool + // SrAlgorithm returns uint32, set in BgpAttributesSegmentRoutingPolicyTypeD. + SrAlgorithm() uint32 + // SetSrAlgorithm assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicyTypeD + SetSrAlgorithm(value uint32) BgpAttributesSegmentRoutingPolicyTypeD + // HasSrAlgorithm checks if SrAlgorithm has been set in BgpAttributesSegmentRoutingPolicyTypeD + HasSrAlgorithm() bool + // Ipv6NodeAddress returns string, set in BgpAttributesSegmentRoutingPolicyTypeD. + Ipv6NodeAddress() string + // SetIpv6NodeAddress assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeD + SetIpv6NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeD + // HasIpv6NodeAddress checks if Ipv6NodeAddress has been set in BgpAttributesSegmentRoutingPolicyTypeD + HasIpv6NodeAddress() bool + // SrMplsSid returns BgpAttributesSidMpls, set in BgpAttributesSegmentRoutingPolicyTypeD. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + SrMplsSid() BgpAttributesSidMpls + // SetSrMplsSid assigns BgpAttributesSidMpls provided by user to BgpAttributesSegmentRoutingPolicyTypeD. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + SetSrMplsSid(value BgpAttributesSidMpls) BgpAttributesSegmentRoutingPolicyTypeD + // HasSrMplsSid checks if SrMplsSid has been set in BgpAttributesSegmentRoutingPolicyTypeD + HasSrMplsSid() bool + setNil() +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) Flags() BgpAttributesSegmentRoutingPolicyTypeFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewBgpAttributesSegmentRoutingPolicyTypeFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &bgpAttributesSegmentRoutingPolicyTypeFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) HasFlags() bool { + return obj.obj.Flags != nil +} + +// description is TBD +// SetFlags sets the BgpAttributesSegmentRoutingPolicyTypeFlags value in the BgpAttributesSegmentRoutingPolicyTypeD object +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeD { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SrAlgorithm returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) SrAlgorithm() uint32 { + + return *obj.obj.SrAlgorithm + +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SrAlgorithm returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) HasSrAlgorithm() bool { + return obj.obj.SrAlgorithm != nil +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SetSrAlgorithm sets the uint32 value in the BgpAttributesSegmentRoutingPolicyTypeD object +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) SetSrAlgorithm(value uint32) BgpAttributesSegmentRoutingPolicyTypeD { + + obj.obj.SrAlgorithm = &value + return obj +} + +// IPv6 address representing a node. +// Ipv6NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) Ipv6NodeAddress() string { + + return *obj.obj.Ipv6NodeAddress + +} + +// IPv6 address representing a node. +// Ipv6NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) HasIpv6NodeAddress() bool { + return obj.obj.Ipv6NodeAddress != nil +} + +// IPv6 address representing a node. +// SetIpv6NodeAddress sets the string value in the BgpAttributesSegmentRoutingPolicyTypeD object +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) SetIpv6NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeD { + + obj.obj.Ipv6NodeAddress = &value + return obj +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) SrMplsSid() BgpAttributesSidMpls { + if obj.obj.SrMplsSid == nil { + obj.obj.SrMplsSid = NewBgpAttributesSidMpls().msg() + } + if obj.srMplsSidHolder == nil { + obj.srMplsSidHolder = &bgpAttributesSidMpls{obj: obj.obj.SrMplsSid} + } + return obj.srMplsSidHolder +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) HasSrMplsSid() bool { + return obj.obj.SrMplsSid != nil +} + +// Optional SR-MPLS SID. +// SetSrMplsSid sets the BgpAttributesSidMpls value in the BgpAttributesSegmentRoutingPolicyTypeD object +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) SetSrMplsSid(value BgpAttributesSidMpls) BgpAttributesSegmentRoutingPolicyTypeD { + + obj.srMplsSidHolder = nil + obj.obj.SrMplsSid = value.msg() + + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.SrAlgorithm != nil { + + if *obj.obj.SrAlgorithm > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesSegmentRoutingPolicyTypeD.SrAlgorithm <= 255 but Got %d", *obj.obj.SrAlgorithm)) + } + + } + + if obj.obj.Ipv6NodeAddress != nil { + + err := obj.validateIpv6(obj.Ipv6NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeD.Ipv6NodeAddress")) + } + + } + + if obj.obj.SrMplsSid != nil { + + obj.SrMplsSid().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeD) setDefault() { + if obj.obj.SrAlgorithm == nil { + obj.SetSrAlgorithm(0) + } + if obj.obj.Ipv6NodeAddress == nil { + obj.SetIpv6NodeAddress("0::0") + } + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_type_e.go b/gosnappi/bgp_attributes_segment_routing_policy_type_e.go new file mode 100644 index 00000000..a4c39155 --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_type_e.go @@ -0,0 +1,455 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicyTypeE ***** +type bgpAttributesSegmentRoutingPolicyTypeE struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicyTypeE + marshaller marshalBgpAttributesSegmentRoutingPolicyTypeE + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicyTypeE + flagsHolder BgpAttributesSegmentRoutingPolicyTypeFlags + srMplsSidHolder BgpAttributesSidMpls +} + +func NewBgpAttributesSegmentRoutingPolicyTypeE() BgpAttributesSegmentRoutingPolicyTypeE { + obj := bgpAttributesSegmentRoutingPolicyTypeE{obj: &otg.BgpAttributesSegmentRoutingPolicyTypeE{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) msg() *otg.BgpAttributesSegmentRoutingPolicyTypeE { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicyTypeE) BgpAttributesSegmentRoutingPolicyTypeE { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicyTypeE struct { + obj *bgpAttributesSegmentRoutingPolicyTypeE +} + +type marshalBgpAttributesSegmentRoutingPolicyTypeE interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicyTypeE to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeE + ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeE, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicyTypeE to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicyTypeE to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicyTypeE to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicyTypeE struct { + obj *bgpAttributesSegmentRoutingPolicyTypeE +} + +type unMarshalBgpAttributesSegmentRoutingPolicyTypeE interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicyTypeE from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeE + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeE) (BgpAttributesSegmentRoutingPolicyTypeE, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicyTypeE from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicyTypeE from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicyTypeE from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeE { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicyTypeE{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeE { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicyTypeE{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeE) ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeE, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeE) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeE) (BgpAttributesSegmentRoutingPolicyTypeE, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeE) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeE) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeE) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeE) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeE) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeE) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) Clone() (BgpAttributesSegmentRoutingPolicyTypeE, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicyTypeE() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) setNil() { + obj.flagsHolder = nil + obj.srMplsSidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSegmentRoutingPolicyTypeE is type E: IPv4 Address and Local Interface ID with optional SID +// It is encoded as a Segment of Type 5 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeE interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicyTypeE to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeE + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicyTypeE + // setMsg unmarshals BgpAttributesSegmentRoutingPolicyTypeE from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeE + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicyTypeE) BgpAttributesSegmentRoutingPolicyTypeE + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeE + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeE + // validate validates BgpAttributesSegmentRoutingPolicyTypeE + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicyTypeE, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns BgpAttributesSegmentRoutingPolicyTypeFlags, set in BgpAttributesSegmentRoutingPolicyTypeE. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + Flags() BgpAttributesSegmentRoutingPolicyTypeFlags + // SetFlags assigns BgpAttributesSegmentRoutingPolicyTypeFlags provided by user to BgpAttributesSegmentRoutingPolicyTypeE. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeE + // HasFlags checks if Flags has been set in BgpAttributesSegmentRoutingPolicyTypeE + HasFlags() bool + // LocalInterfaceId returns uint32, set in BgpAttributesSegmentRoutingPolicyTypeE. + LocalInterfaceId() uint32 + // SetLocalInterfaceId assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicyTypeE + SetLocalInterfaceId(value uint32) BgpAttributesSegmentRoutingPolicyTypeE + // HasLocalInterfaceId checks if LocalInterfaceId has been set in BgpAttributesSegmentRoutingPolicyTypeE + HasLocalInterfaceId() bool + // Ipv4NodeAddress returns string, set in BgpAttributesSegmentRoutingPolicyTypeE. + Ipv4NodeAddress() string + // SetIpv4NodeAddress assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeE + SetIpv4NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeE + // HasIpv4NodeAddress checks if Ipv4NodeAddress has been set in BgpAttributesSegmentRoutingPolicyTypeE + HasIpv4NodeAddress() bool + // SrMplsSid returns BgpAttributesSidMpls, set in BgpAttributesSegmentRoutingPolicyTypeE. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + SrMplsSid() BgpAttributesSidMpls + // SetSrMplsSid assigns BgpAttributesSidMpls provided by user to BgpAttributesSegmentRoutingPolicyTypeE. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + SetSrMplsSid(value BgpAttributesSidMpls) BgpAttributesSegmentRoutingPolicyTypeE + // HasSrMplsSid checks if SrMplsSid has been set in BgpAttributesSegmentRoutingPolicyTypeE + HasSrMplsSid() bool + setNil() +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) Flags() BgpAttributesSegmentRoutingPolicyTypeFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewBgpAttributesSegmentRoutingPolicyTypeFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &bgpAttributesSegmentRoutingPolicyTypeFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) HasFlags() bool { + return obj.obj.Flags != nil +} + +// description is TBD +// SetFlags sets the BgpAttributesSegmentRoutingPolicyTypeFlags value in the BgpAttributesSegmentRoutingPolicyTypeE object +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeE { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// The Interface Index as defined in [RFC8664]. +// LocalInterfaceId returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) LocalInterfaceId() uint32 { + + return *obj.obj.LocalInterfaceId + +} + +// The Interface Index as defined in [RFC8664]. +// LocalInterfaceId returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) HasLocalInterfaceId() bool { + return obj.obj.LocalInterfaceId != nil +} + +// The Interface Index as defined in [RFC8664]. +// SetLocalInterfaceId sets the uint32 value in the BgpAttributesSegmentRoutingPolicyTypeE object +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) SetLocalInterfaceId(value uint32) BgpAttributesSegmentRoutingPolicyTypeE { + + obj.obj.LocalInterfaceId = &value + return obj +} + +// IPv4 address representing a node. +// Ipv4NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) Ipv4NodeAddress() string { + + return *obj.obj.Ipv4NodeAddress + +} + +// IPv4 address representing a node. +// Ipv4NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) HasIpv4NodeAddress() bool { + return obj.obj.Ipv4NodeAddress != nil +} + +// IPv4 address representing a node. +// SetIpv4NodeAddress sets the string value in the BgpAttributesSegmentRoutingPolicyTypeE object +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) SetIpv4NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeE { + + obj.obj.Ipv4NodeAddress = &value + return obj +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) SrMplsSid() BgpAttributesSidMpls { + if obj.obj.SrMplsSid == nil { + obj.obj.SrMplsSid = NewBgpAttributesSidMpls().msg() + } + if obj.srMplsSidHolder == nil { + obj.srMplsSidHolder = &bgpAttributesSidMpls{obj: obj.obj.SrMplsSid} + } + return obj.srMplsSidHolder +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) HasSrMplsSid() bool { + return obj.obj.SrMplsSid != nil +} + +// Optional SR-MPLS SID. +// SetSrMplsSid sets the BgpAttributesSidMpls value in the BgpAttributesSegmentRoutingPolicyTypeE object +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) SetSrMplsSid(value BgpAttributesSidMpls) BgpAttributesSegmentRoutingPolicyTypeE { + + obj.srMplsSidHolder = nil + obj.obj.SrMplsSid = value.msg() + + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.Ipv4NodeAddress != nil { + + err := obj.validateIpv4(obj.Ipv4NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeE.Ipv4NodeAddress")) + } + + } + + if obj.obj.SrMplsSid != nil { + + obj.SrMplsSid().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeE) setDefault() { + if obj.obj.LocalInterfaceId == nil { + obj.SetLocalInterfaceId(0) + } + if obj.obj.Ipv4NodeAddress == nil { + obj.SetIpv4NodeAddress("0.0.0.0") + } + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_type_f.go b/gosnappi/bgp_attributes_segment_routing_policy_type_f.go new file mode 100644 index 00000000..54bc2f02 --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_type_f.go @@ -0,0 +1,464 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicyTypeF ***** +type bgpAttributesSegmentRoutingPolicyTypeF struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicyTypeF + marshaller marshalBgpAttributesSegmentRoutingPolicyTypeF + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicyTypeF + flagsHolder BgpAttributesSegmentRoutingPolicyTypeFlags + srMplsSidHolder BgpAttributesSidMpls +} + +func NewBgpAttributesSegmentRoutingPolicyTypeF() BgpAttributesSegmentRoutingPolicyTypeF { + obj := bgpAttributesSegmentRoutingPolicyTypeF{obj: &otg.BgpAttributesSegmentRoutingPolicyTypeF{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) msg() *otg.BgpAttributesSegmentRoutingPolicyTypeF { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicyTypeF) BgpAttributesSegmentRoutingPolicyTypeF { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicyTypeF struct { + obj *bgpAttributesSegmentRoutingPolicyTypeF +} + +type marshalBgpAttributesSegmentRoutingPolicyTypeF interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicyTypeF to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeF + ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeF, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicyTypeF to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicyTypeF to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicyTypeF to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicyTypeF struct { + obj *bgpAttributesSegmentRoutingPolicyTypeF +} + +type unMarshalBgpAttributesSegmentRoutingPolicyTypeF interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicyTypeF from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeF + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeF) (BgpAttributesSegmentRoutingPolicyTypeF, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicyTypeF from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicyTypeF from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicyTypeF from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeF { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicyTypeF{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeF { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicyTypeF{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeF) ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeF, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeF) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeF) (BgpAttributesSegmentRoutingPolicyTypeF, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeF) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeF) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeF) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeF) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeF) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeF) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) Clone() (BgpAttributesSegmentRoutingPolicyTypeF, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicyTypeF() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) setNil() { + obj.flagsHolder = nil + obj.srMplsSidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSegmentRoutingPolicyTypeF is type F: IPv4 Local and Remote addresses with optional SR-MPLS SID. +// It is encoded as a Segment of Type 6 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeF interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicyTypeF to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeF + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicyTypeF + // setMsg unmarshals BgpAttributesSegmentRoutingPolicyTypeF from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeF + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicyTypeF) BgpAttributesSegmentRoutingPolicyTypeF + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeF + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeF + // validate validates BgpAttributesSegmentRoutingPolicyTypeF + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicyTypeF, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns BgpAttributesSegmentRoutingPolicyTypeFlags, set in BgpAttributesSegmentRoutingPolicyTypeF. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + Flags() BgpAttributesSegmentRoutingPolicyTypeFlags + // SetFlags assigns BgpAttributesSegmentRoutingPolicyTypeFlags provided by user to BgpAttributesSegmentRoutingPolicyTypeF. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeF + // HasFlags checks if Flags has been set in BgpAttributesSegmentRoutingPolicyTypeF + HasFlags() bool + // LocalIpv4Address returns string, set in BgpAttributesSegmentRoutingPolicyTypeF. + LocalIpv4Address() string + // SetLocalIpv4Address assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeF + SetLocalIpv4Address(value string) BgpAttributesSegmentRoutingPolicyTypeF + // HasLocalIpv4Address checks if LocalIpv4Address has been set in BgpAttributesSegmentRoutingPolicyTypeF + HasLocalIpv4Address() bool + // RemoteIpv4Address returns string, set in BgpAttributesSegmentRoutingPolicyTypeF. + RemoteIpv4Address() string + // SetRemoteIpv4Address assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeF + SetRemoteIpv4Address(value string) BgpAttributesSegmentRoutingPolicyTypeF + // HasRemoteIpv4Address checks if RemoteIpv4Address has been set in BgpAttributesSegmentRoutingPolicyTypeF + HasRemoteIpv4Address() bool + // SrMplsSid returns BgpAttributesSidMpls, set in BgpAttributesSegmentRoutingPolicyTypeF. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + SrMplsSid() BgpAttributesSidMpls + // SetSrMplsSid assigns BgpAttributesSidMpls provided by user to BgpAttributesSegmentRoutingPolicyTypeF. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + SetSrMplsSid(value BgpAttributesSidMpls) BgpAttributesSegmentRoutingPolicyTypeF + // HasSrMplsSid checks if SrMplsSid has been set in BgpAttributesSegmentRoutingPolicyTypeF + HasSrMplsSid() bool + setNil() +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) Flags() BgpAttributesSegmentRoutingPolicyTypeFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewBgpAttributesSegmentRoutingPolicyTypeFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &bgpAttributesSegmentRoutingPolicyTypeFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) HasFlags() bool { + return obj.obj.Flags != nil +} + +// description is TBD +// SetFlags sets the BgpAttributesSegmentRoutingPolicyTypeFlags value in the BgpAttributesSegmentRoutingPolicyTypeF object +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeF { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// Local IPv4 Address. +// LocalIpv4Address returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) LocalIpv4Address() string { + + return *obj.obj.LocalIpv4Address + +} + +// Local IPv4 Address. +// LocalIpv4Address returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) HasLocalIpv4Address() bool { + return obj.obj.LocalIpv4Address != nil +} + +// Local IPv4 Address. +// SetLocalIpv4Address sets the string value in the BgpAttributesSegmentRoutingPolicyTypeF object +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) SetLocalIpv4Address(value string) BgpAttributesSegmentRoutingPolicyTypeF { + + obj.obj.LocalIpv4Address = &value + return obj +} + +// Remote IPv4 Address. +// RemoteIpv4Address returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) RemoteIpv4Address() string { + + return *obj.obj.RemoteIpv4Address + +} + +// Remote IPv4 Address. +// RemoteIpv4Address returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) HasRemoteIpv4Address() bool { + return obj.obj.RemoteIpv4Address != nil +} + +// Remote IPv4 Address. +// SetRemoteIpv4Address sets the string value in the BgpAttributesSegmentRoutingPolicyTypeF object +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) SetRemoteIpv4Address(value string) BgpAttributesSegmentRoutingPolicyTypeF { + + obj.obj.RemoteIpv4Address = &value + return obj +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) SrMplsSid() BgpAttributesSidMpls { + if obj.obj.SrMplsSid == nil { + obj.obj.SrMplsSid = NewBgpAttributesSidMpls().msg() + } + if obj.srMplsSidHolder == nil { + obj.srMplsSidHolder = &bgpAttributesSidMpls{obj: obj.obj.SrMplsSid} + } + return obj.srMplsSidHolder +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) HasSrMplsSid() bool { + return obj.obj.SrMplsSid != nil +} + +// Optional SR-MPLS SID. +// SetSrMplsSid sets the BgpAttributesSidMpls value in the BgpAttributesSegmentRoutingPolicyTypeF object +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) SetSrMplsSid(value BgpAttributesSidMpls) BgpAttributesSegmentRoutingPolicyTypeF { + + obj.srMplsSidHolder = nil + obj.obj.SrMplsSid = value.msg() + + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.LocalIpv4Address != nil { + + err := obj.validateIpv4(obj.LocalIpv4Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeF.LocalIpv4Address")) + } + + } + + if obj.obj.RemoteIpv4Address != nil { + + err := obj.validateIpv4(obj.RemoteIpv4Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeF.RemoteIpv4Address")) + } + + } + + if obj.obj.SrMplsSid != nil { + + obj.SrMplsSid().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeF) setDefault() { + if obj.obj.LocalIpv4Address == nil { + obj.SetLocalIpv4Address("0.0.0.0") + } + if obj.obj.RemoteIpv4Address == nil { + obj.SetRemoteIpv4Address("0.0.0.0") + } + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_type_flags.go b/gosnappi/bgp_attributes_segment_routing_policy_type_flags.go new file mode 100644 index 00000000..af43cd1e --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_type_flags.go @@ -0,0 +1,410 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicyTypeFlags ***** +type bgpAttributesSegmentRoutingPolicyTypeFlags struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicyTypeFlags + marshaller marshalBgpAttributesSegmentRoutingPolicyTypeFlags + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicyTypeFlags +} + +func NewBgpAttributesSegmentRoutingPolicyTypeFlags() BgpAttributesSegmentRoutingPolicyTypeFlags { + obj := bgpAttributesSegmentRoutingPolicyTypeFlags{obj: &otg.BgpAttributesSegmentRoutingPolicyTypeFlags{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) msg() *otg.BgpAttributesSegmentRoutingPolicyTypeFlags { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeFlags { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicyTypeFlags struct { + obj *bgpAttributesSegmentRoutingPolicyTypeFlags +} + +type marshalBgpAttributesSegmentRoutingPolicyTypeFlags interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicyTypeFlags to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeFlags + ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeFlags, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicyTypeFlags to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicyTypeFlags to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicyTypeFlags to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicyTypeFlags struct { + obj *bgpAttributesSegmentRoutingPolicyTypeFlags +} + +type unMarshalBgpAttributesSegmentRoutingPolicyTypeFlags interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicyTypeFlags from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeFlags + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeFlags) (BgpAttributesSegmentRoutingPolicyTypeFlags, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicyTypeFlags from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicyTypeFlags from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicyTypeFlags from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeFlags { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicyTypeFlags{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeFlags { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicyTypeFlags{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeFlags) ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeFlags, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeFlags) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeFlags) (BgpAttributesSegmentRoutingPolicyTypeFlags, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeFlags) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeFlags) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeFlags) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeFlags) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeFlags) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeFlags) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) Clone() (BgpAttributesSegmentRoutingPolicyTypeFlags, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicyTypeFlags() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. +// - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 +// - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . +// - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . +// - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). +// This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. +type BgpAttributesSegmentRoutingPolicyTypeFlags interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicyTypeFlags to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeFlags + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicyTypeFlags + // setMsg unmarshals BgpAttributesSegmentRoutingPolicyTypeFlags from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeFlags + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeFlags + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeFlags + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeFlags + // validate validates BgpAttributesSegmentRoutingPolicyTypeFlags + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicyTypeFlags, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // VFlag returns bool, set in BgpAttributesSegmentRoutingPolicyTypeFlags. + VFlag() bool + // SetVFlag assigns bool provided by user to BgpAttributesSegmentRoutingPolicyTypeFlags + SetVFlag(value bool) BgpAttributesSegmentRoutingPolicyTypeFlags + // HasVFlag checks if VFlag has been set in BgpAttributesSegmentRoutingPolicyTypeFlags + HasVFlag() bool + // AFlag returns bool, set in BgpAttributesSegmentRoutingPolicyTypeFlags. + AFlag() bool + // SetAFlag assigns bool provided by user to BgpAttributesSegmentRoutingPolicyTypeFlags + SetAFlag(value bool) BgpAttributesSegmentRoutingPolicyTypeFlags + // HasAFlag checks if AFlag has been set in BgpAttributesSegmentRoutingPolicyTypeFlags + HasAFlag() bool + // SFlag returns bool, set in BgpAttributesSegmentRoutingPolicyTypeFlags. + SFlag() bool + // SetSFlag assigns bool provided by user to BgpAttributesSegmentRoutingPolicyTypeFlags + SetSFlag(value bool) BgpAttributesSegmentRoutingPolicyTypeFlags + // HasSFlag checks if SFlag has been set in BgpAttributesSegmentRoutingPolicyTypeFlags + HasSFlag() bool + // BFlag returns bool, set in BgpAttributesSegmentRoutingPolicyTypeFlags. + BFlag() bool + // SetBFlag assigns bool provided by user to BgpAttributesSegmentRoutingPolicyTypeFlags + SetBFlag(value bool) BgpAttributesSegmentRoutingPolicyTypeFlags + // HasBFlag checks if BFlag has been set in BgpAttributesSegmentRoutingPolicyTypeFlags + HasBFlag() bool +} + +// Indicates verification of segment data in is enabled. +// VFlag returns a bool +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) VFlag() bool { + + return *obj.obj.VFlag + +} + +// Indicates verification of segment data in is enabled. +// VFlag returns a bool +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) HasVFlag() bool { + return obj.obj.VFlag != nil +} + +// Indicates verification of segment data in is enabled. +// SetVFlag sets the bool value in the BgpAttributesSegmentRoutingPolicyTypeFlags object +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) SetVFlag(value bool) BgpAttributesSegmentRoutingPolicyTypeFlags { + + obj.obj.VFlag = &value + return obj +} + +// Indicates presence of SR Algorithm field applicable to Segment Types 3, 4, and 9. +// AFlag returns a bool +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) AFlag() bool { + + return *obj.obj.AFlag + +} + +// Indicates presence of SR Algorithm field applicable to Segment Types 3, 4, and 9. +// AFlag returns a bool +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) HasAFlag() bool { + return obj.obj.AFlag != nil +} + +// Indicates presence of SR Algorithm field applicable to Segment Types 3, 4, and 9. +// SetAFlag sets the bool value in the BgpAttributesSegmentRoutingPolicyTypeFlags object +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) SetAFlag(value bool) BgpAttributesSegmentRoutingPolicyTypeFlags { + + obj.obj.AFlag = &value + return obj +} + +// This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. +// SFlag returns a bool +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) SFlag() bool { + + return *obj.obj.SFlag + +} + +// This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. +// SFlag returns a bool +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) HasSFlag() bool { + return obj.obj.SFlag != nil +} + +// This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. +// SetSFlag sets the bool value in the BgpAttributesSegmentRoutingPolicyTypeFlags object +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) SetSFlag(value bool) BgpAttributesSegmentRoutingPolicyTypeFlags { + + obj.obj.SFlag = &value + return obj +} + +// Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding specified in Section 2.4.4.2.4 +// of draft-ietf-idr-sr-policy-safi-02. +// BFlag returns a bool +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) BFlag() bool { + + return *obj.obj.BFlag + +} + +// Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding specified in Section 2.4.4.2.4 +// of draft-ietf-idr-sr-policy-safi-02. +// BFlag returns a bool +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) HasBFlag() bool { + return obj.obj.BFlag != nil +} + +// Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding specified in Section 2.4.4.2.4 +// of draft-ietf-idr-sr-policy-safi-02. +// SetBFlag sets the bool value in the BgpAttributesSegmentRoutingPolicyTypeFlags object +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) SetBFlag(value bool) BgpAttributesSegmentRoutingPolicyTypeFlags { + + obj.obj.BFlag = &value + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeFlags) setDefault() { + if obj.obj.VFlag == nil { + obj.SetVFlag(false) + } + if obj.obj.AFlag == nil { + obj.SetAFlag(false) + } + if obj.obj.SFlag == nil { + obj.SetSFlag(false) + } + if obj.obj.BFlag == nil { + obj.SetBFlag(false) + } + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_type_g.go b/gosnappi/bgp_attributes_segment_routing_policy_type_g.go new file mode 100644 index 00000000..0b135d85 --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_type_g.go @@ -0,0 +1,526 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicyTypeG ***** +type bgpAttributesSegmentRoutingPolicyTypeG struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicyTypeG + marshaller marshalBgpAttributesSegmentRoutingPolicyTypeG + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicyTypeG + flagsHolder BgpAttributesSegmentRoutingPolicyTypeFlags + srMplsSidHolder BgpAttributesSidMpls +} + +func NewBgpAttributesSegmentRoutingPolicyTypeG() BgpAttributesSegmentRoutingPolicyTypeG { + obj := bgpAttributesSegmentRoutingPolicyTypeG{obj: &otg.BgpAttributesSegmentRoutingPolicyTypeG{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) msg() *otg.BgpAttributesSegmentRoutingPolicyTypeG { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicyTypeG) BgpAttributesSegmentRoutingPolicyTypeG { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicyTypeG struct { + obj *bgpAttributesSegmentRoutingPolicyTypeG +} + +type marshalBgpAttributesSegmentRoutingPolicyTypeG interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicyTypeG to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeG + ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeG, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicyTypeG to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicyTypeG to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicyTypeG to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicyTypeG struct { + obj *bgpAttributesSegmentRoutingPolicyTypeG +} + +type unMarshalBgpAttributesSegmentRoutingPolicyTypeG interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicyTypeG from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeG + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeG) (BgpAttributesSegmentRoutingPolicyTypeG, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicyTypeG from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicyTypeG from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicyTypeG from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeG { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicyTypeG{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeG { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicyTypeG{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeG) ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeG, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeG) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeG) (BgpAttributesSegmentRoutingPolicyTypeG, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeG) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeG) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeG) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeG) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeG) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeG) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) Clone() (BgpAttributesSegmentRoutingPolicyTypeG, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicyTypeG() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) setNil() { + obj.flagsHolder = nil + obj.srMplsSidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSegmentRoutingPolicyTypeG is type G: IPv6 Address, Interface ID for local and remote pair with optional SID for SR MPLS. +// It is encoded as a Segment of Type 7 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeG interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicyTypeG to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeG + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicyTypeG + // setMsg unmarshals BgpAttributesSegmentRoutingPolicyTypeG from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeG + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicyTypeG) BgpAttributesSegmentRoutingPolicyTypeG + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeG + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeG + // validate validates BgpAttributesSegmentRoutingPolicyTypeG + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicyTypeG, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns BgpAttributesSegmentRoutingPolicyTypeFlags, set in BgpAttributesSegmentRoutingPolicyTypeG. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + Flags() BgpAttributesSegmentRoutingPolicyTypeFlags + // SetFlags assigns BgpAttributesSegmentRoutingPolicyTypeFlags provided by user to BgpAttributesSegmentRoutingPolicyTypeG. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeG + // HasFlags checks if Flags has been set in BgpAttributesSegmentRoutingPolicyTypeG + HasFlags() bool + // LocalInterfaceId returns uint32, set in BgpAttributesSegmentRoutingPolicyTypeG. + LocalInterfaceId() uint32 + // SetLocalInterfaceId assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicyTypeG + SetLocalInterfaceId(value uint32) BgpAttributesSegmentRoutingPolicyTypeG + // HasLocalInterfaceId checks if LocalInterfaceId has been set in BgpAttributesSegmentRoutingPolicyTypeG + HasLocalInterfaceId() bool + // LocalIpv6NodeAddress returns string, set in BgpAttributesSegmentRoutingPolicyTypeG. + LocalIpv6NodeAddress() string + // SetLocalIpv6NodeAddress assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeG + SetLocalIpv6NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeG + // HasLocalIpv6NodeAddress checks if LocalIpv6NodeAddress has been set in BgpAttributesSegmentRoutingPolicyTypeG + HasLocalIpv6NodeAddress() bool + // RemoteInterfaceId returns uint32, set in BgpAttributesSegmentRoutingPolicyTypeG. + RemoteInterfaceId() uint32 + // SetRemoteInterfaceId assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicyTypeG + SetRemoteInterfaceId(value uint32) BgpAttributesSegmentRoutingPolicyTypeG + // HasRemoteInterfaceId checks if RemoteInterfaceId has been set in BgpAttributesSegmentRoutingPolicyTypeG + HasRemoteInterfaceId() bool + // RemoteIpv6NodeAddress returns string, set in BgpAttributesSegmentRoutingPolicyTypeG. + RemoteIpv6NodeAddress() string + // SetRemoteIpv6NodeAddress assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeG + SetRemoteIpv6NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeG + // HasRemoteIpv6NodeAddress checks if RemoteIpv6NodeAddress has been set in BgpAttributesSegmentRoutingPolicyTypeG + HasRemoteIpv6NodeAddress() bool + // SrMplsSid returns BgpAttributesSidMpls, set in BgpAttributesSegmentRoutingPolicyTypeG. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + SrMplsSid() BgpAttributesSidMpls + // SetSrMplsSid assigns BgpAttributesSidMpls provided by user to BgpAttributesSegmentRoutingPolicyTypeG. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + SetSrMplsSid(value BgpAttributesSidMpls) BgpAttributesSegmentRoutingPolicyTypeG + // HasSrMplsSid checks if SrMplsSid has been set in BgpAttributesSegmentRoutingPolicyTypeG + HasSrMplsSid() bool + setNil() +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) Flags() BgpAttributesSegmentRoutingPolicyTypeFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewBgpAttributesSegmentRoutingPolicyTypeFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &bgpAttributesSegmentRoutingPolicyTypeFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) HasFlags() bool { + return obj.obj.Flags != nil +} + +// description is TBD +// SetFlags sets the BgpAttributesSegmentRoutingPolicyTypeFlags value in the BgpAttributesSegmentRoutingPolicyTypeG object +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeG { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// The local Interface Index as defined in [RFC8664]. +// LocalInterfaceId returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) LocalInterfaceId() uint32 { + + return *obj.obj.LocalInterfaceId + +} + +// The local Interface Index as defined in [RFC8664]. +// LocalInterfaceId returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) HasLocalInterfaceId() bool { + return obj.obj.LocalInterfaceId != nil +} + +// The local Interface Index as defined in [RFC8664]. +// SetLocalInterfaceId sets the uint32 value in the BgpAttributesSegmentRoutingPolicyTypeG object +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) SetLocalInterfaceId(value uint32) BgpAttributesSegmentRoutingPolicyTypeG { + + obj.obj.LocalInterfaceId = &value + return obj +} + +// The IPv6 address representing the local node. +// LocalIpv6NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) LocalIpv6NodeAddress() string { + + return *obj.obj.LocalIpv6NodeAddress + +} + +// The IPv6 address representing the local node. +// LocalIpv6NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) HasLocalIpv6NodeAddress() bool { + return obj.obj.LocalIpv6NodeAddress != nil +} + +// The IPv6 address representing the local node. +// SetLocalIpv6NodeAddress sets the string value in the BgpAttributesSegmentRoutingPolicyTypeG object +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) SetLocalIpv6NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeG { + + obj.obj.LocalIpv6NodeAddress = &value + return obj +} + +// The remote Interface Index as defined in [RFC8664]. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. +// RemoteInterfaceId returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) RemoteInterfaceId() uint32 { + + return *obj.obj.RemoteInterfaceId + +} + +// The remote Interface Index as defined in [RFC8664]. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. +// RemoteInterfaceId returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) HasRemoteInterfaceId() bool { + return obj.obj.RemoteInterfaceId != nil +} + +// The remote Interface Index as defined in [RFC8664]. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. +// SetRemoteInterfaceId sets the uint32 value in the BgpAttributesSegmentRoutingPolicyTypeG object +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) SetRemoteInterfaceId(value uint32) BgpAttributesSegmentRoutingPolicyTypeG { + + obj.obj.RemoteInterfaceId = &value + return obj +} + +// IPv6 address representing the remote node. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. +// RemoteIpv6NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) RemoteIpv6NodeAddress() string { + + return *obj.obj.RemoteIpv6NodeAddress + +} + +// IPv6 address representing the remote node. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. +// RemoteIpv6NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) HasRemoteIpv6NodeAddress() bool { + return obj.obj.RemoteIpv6NodeAddress != nil +} + +// IPv6 address representing the remote node. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. +// SetRemoteIpv6NodeAddress sets the string value in the BgpAttributesSegmentRoutingPolicyTypeG object +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) SetRemoteIpv6NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeG { + + obj.obj.RemoteIpv6NodeAddress = &value + return obj +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) SrMplsSid() BgpAttributesSidMpls { + if obj.obj.SrMplsSid == nil { + obj.obj.SrMplsSid = NewBgpAttributesSidMpls().msg() + } + if obj.srMplsSidHolder == nil { + obj.srMplsSidHolder = &bgpAttributesSidMpls{obj: obj.obj.SrMplsSid} + } + return obj.srMplsSidHolder +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) HasSrMplsSid() bool { + return obj.obj.SrMplsSid != nil +} + +// Optional SR-MPLS SID. +// SetSrMplsSid sets the BgpAttributesSidMpls value in the BgpAttributesSegmentRoutingPolicyTypeG object +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) SetSrMplsSid(value BgpAttributesSidMpls) BgpAttributesSegmentRoutingPolicyTypeG { + + obj.srMplsSidHolder = nil + obj.obj.SrMplsSid = value.msg() + + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.LocalIpv6NodeAddress != nil { + + err := obj.validateIpv6(obj.LocalIpv6NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeG.LocalIpv6NodeAddress")) + } + + } + + if obj.obj.RemoteIpv6NodeAddress != nil { + + err := obj.validateIpv6(obj.RemoteIpv6NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeG.RemoteIpv6NodeAddress")) + } + + } + + if obj.obj.SrMplsSid != nil { + + obj.SrMplsSid().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeG) setDefault() { + if obj.obj.LocalInterfaceId == nil { + obj.SetLocalInterfaceId(0) + } + if obj.obj.LocalIpv6NodeAddress == nil { + obj.SetLocalIpv6NodeAddress("0::0") + } + if obj.obj.RemoteInterfaceId == nil { + obj.SetRemoteInterfaceId(0) + } + if obj.obj.RemoteIpv6NodeAddress == nil { + obj.SetRemoteIpv6NodeAddress("0::0") + } + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_type_h.go b/gosnappi/bgp_attributes_segment_routing_policy_type_h.go new file mode 100644 index 00000000..a7ac1de4 --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_type_h.go @@ -0,0 +1,464 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicyTypeH ***** +type bgpAttributesSegmentRoutingPolicyTypeH struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicyTypeH + marshaller marshalBgpAttributesSegmentRoutingPolicyTypeH + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicyTypeH + flagsHolder BgpAttributesSegmentRoutingPolicyTypeFlags + srMplsSidHolder BgpAttributesSidMpls +} + +func NewBgpAttributesSegmentRoutingPolicyTypeH() BgpAttributesSegmentRoutingPolicyTypeH { + obj := bgpAttributesSegmentRoutingPolicyTypeH{obj: &otg.BgpAttributesSegmentRoutingPolicyTypeH{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) msg() *otg.BgpAttributesSegmentRoutingPolicyTypeH { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicyTypeH) BgpAttributesSegmentRoutingPolicyTypeH { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicyTypeH struct { + obj *bgpAttributesSegmentRoutingPolicyTypeH +} + +type marshalBgpAttributesSegmentRoutingPolicyTypeH interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicyTypeH to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeH + ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeH, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicyTypeH to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicyTypeH to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicyTypeH to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicyTypeH struct { + obj *bgpAttributesSegmentRoutingPolicyTypeH +} + +type unMarshalBgpAttributesSegmentRoutingPolicyTypeH interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicyTypeH from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeH + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeH) (BgpAttributesSegmentRoutingPolicyTypeH, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicyTypeH from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicyTypeH from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicyTypeH from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeH { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicyTypeH{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeH { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicyTypeH{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeH) ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeH, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeH) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeH) (BgpAttributesSegmentRoutingPolicyTypeH, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeH) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeH) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeH) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeH) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeH) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeH) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) Clone() (BgpAttributesSegmentRoutingPolicyTypeH, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicyTypeH() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) setNil() { + obj.flagsHolder = nil + obj.srMplsSidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSegmentRoutingPolicyTypeH is type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. +// It is encoded as a Segment of Type 8 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeH interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicyTypeH to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeH + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicyTypeH + // setMsg unmarshals BgpAttributesSegmentRoutingPolicyTypeH from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeH + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicyTypeH) BgpAttributesSegmentRoutingPolicyTypeH + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeH + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeH + // validate validates BgpAttributesSegmentRoutingPolicyTypeH + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicyTypeH, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns BgpAttributesSegmentRoutingPolicyTypeFlags, set in BgpAttributesSegmentRoutingPolicyTypeH. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + Flags() BgpAttributesSegmentRoutingPolicyTypeFlags + // SetFlags assigns BgpAttributesSegmentRoutingPolicyTypeFlags provided by user to BgpAttributesSegmentRoutingPolicyTypeH. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeH + // HasFlags checks if Flags has been set in BgpAttributesSegmentRoutingPolicyTypeH + HasFlags() bool + // LocalIpv6Address returns string, set in BgpAttributesSegmentRoutingPolicyTypeH. + LocalIpv6Address() string + // SetLocalIpv6Address assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeH + SetLocalIpv6Address(value string) BgpAttributesSegmentRoutingPolicyTypeH + // HasLocalIpv6Address checks if LocalIpv6Address has been set in BgpAttributesSegmentRoutingPolicyTypeH + HasLocalIpv6Address() bool + // RemoteIpv6Address returns string, set in BgpAttributesSegmentRoutingPolicyTypeH. + RemoteIpv6Address() string + // SetRemoteIpv6Address assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeH + SetRemoteIpv6Address(value string) BgpAttributesSegmentRoutingPolicyTypeH + // HasRemoteIpv6Address checks if RemoteIpv6Address has been set in BgpAttributesSegmentRoutingPolicyTypeH + HasRemoteIpv6Address() bool + // SrMplsSid returns BgpAttributesSidMpls, set in BgpAttributesSegmentRoutingPolicyTypeH. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + SrMplsSid() BgpAttributesSidMpls + // SetSrMplsSid assigns BgpAttributesSidMpls provided by user to BgpAttributesSegmentRoutingPolicyTypeH. + // BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence + // or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. + SetSrMplsSid(value BgpAttributesSidMpls) BgpAttributesSegmentRoutingPolicyTypeH + // HasSrMplsSid checks if SrMplsSid has been set in BgpAttributesSegmentRoutingPolicyTypeH + HasSrMplsSid() bool + setNil() +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) Flags() BgpAttributesSegmentRoutingPolicyTypeFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewBgpAttributesSegmentRoutingPolicyTypeFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &bgpAttributesSegmentRoutingPolicyTypeFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) HasFlags() bool { + return obj.obj.Flags != nil +} + +// description is TBD +// SetFlags sets the BgpAttributesSegmentRoutingPolicyTypeFlags value in the BgpAttributesSegmentRoutingPolicyTypeH object +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeH { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// Local IPv6 Address. +// LocalIpv6Address returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) LocalIpv6Address() string { + + return *obj.obj.LocalIpv6Address + +} + +// Local IPv6 Address. +// LocalIpv6Address returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) HasLocalIpv6Address() bool { + return obj.obj.LocalIpv6Address != nil +} + +// Local IPv6 Address. +// SetLocalIpv6Address sets the string value in the BgpAttributesSegmentRoutingPolicyTypeH object +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) SetLocalIpv6Address(value string) BgpAttributesSegmentRoutingPolicyTypeH { + + obj.obj.LocalIpv6Address = &value + return obj +} + +// Remote IPv6 Address. +// RemoteIpv6Address returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) RemoteIpv6Address() string { + + return *obj.obj.RemoteIpv6Address + +} + +// Remote IPv6 Address. +// RemoteIpv6Address returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) HasRemoteIpv6Address() bool { + return obj.obj.RemoteIpv6Address != nil +} + +// Remote IPv6 Address. +// SetRemoteIpv6Address sets the string value in the BgpAttributesSegmentRoutingPolicyTypeH object +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) SetRemoteIpv6Address(value string) BgpAttributesSegmentRoutingPolicyTypeH { + + obj.obj.RemoteIpv6Address = &value + return obj +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) SrMplsSid() BgpAttributesSidMpls { + if obj.obj.SrMplsSid == nil { + obj.obj.SrMplsSid = NewBgpAttributesSidMpls().msg() + } + if obj.srMplsSidHolder == nil { + obj.srMplsSidHolder = &bgpAttributesSidMpls{obj: obj.obj.SrMplsSid} + } + return obj.srMplsSidHolder +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpAttributesSidMpls +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) HasSrMplsSid() bool { + return obj.obj.SrMplsSid != nil +} + +// Optional SR-MPLS SID. +// SetSrMplsSid sets the BgpAttributesSidMpls value in the BgpAttributesSegmentRoutingPolicyTypeH object +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) SetSrMplsSid(value BgpAttributesSidMpls) BgpAttributesSegmentRoutingPolicyTypeH { + + obj.srMplsSidHolder = nil + obj.obj.SrMplsSid = value.msg() + + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.LocalIpv6Address != nil { + + err := obj.validateIpv6(obj.LocalIpv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeH.LocalIpv6Address")) + } + + } + + if obj.obj.RemoteIpv6Address != nil { + + err := obj.validateIpv6(obj.RemoteIpv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeH.RemoteIpv6Address")) + } + + } + + if obj.obj.SrMplsSid != nil { + + obj.SrMplsSid().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeH) setDefault() { + if obj.obj.LocalIpv6Address == nil { + obj.SetLocalIpv6Address("0::0") + } + if obj.obj.RemoteIpv6Address == nil { + obj.SetRemoteIpv6Address("0::0") + } + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_type_i.go b/gosnappi/bgp_attributes_segment_routing_policy_type_i.go new file mode 100644 index 00000000..f13cc9eb --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_type_i.go @@ -0,0 +1,506 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicyTypeI ***** +type bgpAttributesSegmentRoutingPolicyTypeI struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicyTypeI + marshaller marshalBgpAttributesSegmentRoutingPolicyTypeI + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicyTypeI + flagsHolder BgpAttributesSegmentRoutingPolicyTypeFlags + srv6SidHolder BgpAttributesSidSrv6 + srv6EndpointBehaviorHolder BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +} + +func NewBgpAttributesSegmentRoutingPolicyTypeI() BgpAttributesSegmentRoutingPolicyTypeI { + obj := bgpAttributesSegmentRoutingPolicyTypeI{obj: &otg.BgpAttributesSegmentRoutingPolicyTypeI{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) msg() *otg.BgpAttributesSegmentRoutingPolicyTypeI { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicyTypeI) BgpAttributesSegmentRoutingPolicyTypeI { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicyTypeI struct { + obj *bgpAttributesSegmentRoutingPolicyTypeI +} + +type marshalBgpAttributesSegmentRoutingPolicyTypeI interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicyTypeI to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeI + ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeI, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicyTypeI to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicyTypeI to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicyTypeI to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicyTypeI struct { + obj *bgpAttributesSegmentRoutingPolicyTypeI +} + +type unMarshalBgpAttributesSegmentRoutingPolicyTypeI interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicyTypeI from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeI + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeI) (BgpAttributesSegmentRoutingPolicyTypeI, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicyTypeI from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicyTypeI from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicyTypeI from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeI { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicyTypeI{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeI { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicyTypeI{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeI) ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeI, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeI) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeI) (BgpAttributesSegmentRoutingPolicyTypeI, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeI) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeI) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeI) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeI) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeI) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeI) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) Clone() (BgpAttributesSegmentRoutingPolicyTypeI, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicyTypeI() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) setNil() { + obj.flagsHolder = nil + obj.srv6SidHolder = nil + obj.srv6EndpointBehaviorHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSegmentRoutingPolicyTypeI is type I: IPv6 Node Address with optional SR Algorithm and optional SRv6 SID. +// It is encoded as a Segment of Type 14 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeI interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicyTypeI to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeI + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicyTypeI + // setMsg unmarshals BgpAttributesSegmentRoutingPolicyTypeI from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeI + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicyTypeI) BgpAttributesSegmentRoutingPolicyTypeI + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeI + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeI + // validate validates BgpAttributesSegmentRoutingPolicyTypeI + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicyTypeI, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns BgpAttributesSegmentRoutingPolicyTypeFlags, set in BgpAttributesSegmentRoutingPolicyTypeI. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + Flags() BgpAttributesSegmentRoutingPolicyTypeFlags + // SetFlags assigns BgpAttributesSegmentRoutingPolicyTypeFlags provided by user to BgpAttributesSegmentRoutingPolicyTypeI. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeI + // HasFlags checks if Flags has been set in BgpAttributesSegmentRoutingPolicyTypeI + HasFlags() bool + // SrAlgorithm returns uint32, set in BgpAttributesSegmentRoutingPolicyTypeI. + SrAlgorithm() uint32 + // SetSrAlgorithm assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicyTypeI + SetSrAlgorithm(value uint32) BgpAttributesSegmentRoutingPolicyTypeI + // HasSrAlgorithm checks if SrAlgorithm has been set in BgpAttributesSegmentRoutingPolicyTypeI + HasSrAlgorithm() bool + // Ipv6NodeAddress returns string, set in BgpAttributesSegmentRoutingPolicyTypeI. + Ipv6NodeAddress() string + // SetIpv6NodeAddress assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeI + SetIpv6NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeI + // HasIpv6NodeAddress checks if Ipv6NodeAddress has been set in BgpAttributesSegmentRoutingPolicyTypeI + HasIpv6NodeAddress() bool + // Srv6Sid returns BgpAttributesSidSrv6, set in BgpAttributesSegmentRoutingPolicyTypeI. + // BgpAttributesSidSrv6 is an IPv6 address denoting a SRv6 SID. + Srv6Sid() BgpAttributesSidSrv6 + // SetSrv6Sid assigns BgpAttributesSidSrv6 provided by user to BgpAttributesSegmentRoutingPolicyTypeI. + // BgpAttributesSidSrv6 is an IPv6 address denoting a SRv6 SID. + SetSrv6Sid(value BgpAttributesSidSrv6) BgpAttributesSegmentRoutingPolicyTypeI + // HasSrv6Sid checks if Srv6Sid has been set in BgpAttributesSegmentRoutingPolicyTypeI + HasSrv6Sid() bool + // Srv6EndpointBehavior returns BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure, set in BgpAttributesSegmentRoutingPolicyTypeI. + // BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure is configuration for optional SRv6 Endpoint Behavior and SID Structure. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. - This is specified in draft-ietf-idr-sr-policy-safi-02 Section 2.4.4.2.4 + Srv6EndpointBehavior() BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // SetSrv6EndpointBehavior assigns BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure provided by user to BgpAttributesSegmentRoutingPolicyTypeI. + // BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure is configuration for optional SRv6 Endpoint Behavior and SID Structure. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. - This is specified in draft-ietf-idr-sr-policy-safi-02 Section 2.4.4.2.4 + SetSrv6EndpointBehavior(value BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) BgpAttributesSegmentRoutingPolicyTypeI + // HasSrv6EndpointBehavior checks if Srv6EndpointBehavior has been set in BgpAttributesSegmentRoutingPolicyTypeI + HasSrv6EndpointBehavior() bool + setNil() +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) Flags() BgpAttributesSegmentRoutingPolicyTypeFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewBgpAttributesSegmentRoutingPolicyTypeFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &bgpAttributesSegmentRoutingPolicyTypeFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) HasFlags() bool { + return obj.obj.Flags != nil +} + +// description is TBD +// SetFlags sets the BgpAttributesSegmentRoutingPolicyTypeFlags value in the BgpAttributesSegmentRoutingPolicyTypeI object +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeI { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SrAlgorithm returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) SrAlgorithm() uint32 { + + return *obj.obj.SrAlgorithm + +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SrAlgorithm returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) HasSrAlgorithm() bool { + return obj.obj.SrAlgorithm != nil +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SetSrAlgorithm sets the uint32 value in the BgpAttributesSegmentRoutingPolicyTypeI object +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) SetSrAlgorithm(value uint32) BgpAttributesSegmentRoutingPolicyTypeI { + + obj.obj.SrAlgorithm = &value + return obj +} + +// IPv6 address representing a node. +// Ipv6NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) Ipv6NodeAddress() string { + + return *obj.obj.Ipv6NodeAddress + +} + +// IPv6 address representing a node. +// Ipv6NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) HasIpv6NodeAddress() bool { + return obj.obj.Ipv6NodeAddress != nil +} + +// IPv6 address representing a node. +// SetIpv6NodeAddress sets the string value in the BgpAttributesSegmentRoutingPolicyTypeI object +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) SetIpv6NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeI { + + obj.obj.Ipv6NodeAddress = &value + return obj +} + +// description is TBD +// Srv6Sid returns a BgpAttributesSidSrv6 +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) Srv6Sid() BgpAttributesSidSrv6 { + if obj.obj.Srv6Sid == nil { + obj.obj.Srv6Sid = NewBgpAttributesSidSrv6().msg() + } + if obj.srv6SidHolder == nil { + obj.srv6SidHolder = &bgpAttributesSidSrv6{obj: obj.obj.Srv6Sid} + } + return obj.srv6SidHolder +} + +// description is TBD +// Srv6Sid returns a BgpAttributesSidSrv6 +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) HasSrv6Sid() bool { + return obj.obj.Srv6Sid != nil +} + +// description is TBD +// SetSrv6Sid sets the BgpAttributesSidSrv6 value in the BgpAttributesSegmentRoutingPolicyTypeI object +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) SetSrv6Sid(value BgpAttributesSidSrv6) BgpAttributesSegmentRoutingPolicyTypeI { + + obj.srv6SidHolder = nil + obj.obj.Srv6Sid = value.msg() + + return obj +} + +// description is TBD +// Srv6EndpointBehavior returns a BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) Srv6EndpointBehavior() BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + if obj.obj.Srv6EndpointBehavior == nil { + obj.obj.Srv6EndpointBehavior = NewBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure().msg() + } + if obj.srv6EndpointBehaviorHolder == nil { + obj.srv6EndpointBehaviorHolder = &bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure{obj: obj.obj.Srv6EndpointBehavior} + } + return obj.srv6EndpointBehaviorHolder +} + +// description is TBD +// Srv6EndpointBehavior returns a BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) HasSrv6EndpointBehavior() bool { + return obj.obj.Srv6EndpointBehavior != nil +} + +// description is TBD +// SetSrv6EndpointBehavior sets the BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure value in the BgpAttributesSegmentRoutingPolicyTypeI object +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) SetSrv6EndpointBehavior(value BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) BgpAttributesSegmentRoutingPolicyTypeI { + + obj.srv6EndpointBehaviorHolder = nil + obj.obj.Srv6EndpointBehavior = value.msg() + + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.SrAlgorithm != nil { + + if *obj.obj.SrAlgorithm > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesSegmentRoutingPolicyTypeI.SrAlgorithm <= 255 but Got %d", *obj.obj.SrAlgorithm)) + } + + } + + if obj.obj.Ipv6NodeAddress != nil { + + err := obj.validateIpv6(obj.Ipv6NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeI.Ipv6NodeAddress")) + } + + } + + if obj.obj.Srv6Sid != nil { + + obj.Srv6Sid().validateObj(vObj, set_default) + } + + if obj.obj.Srv6EndpointBehavior != nil { + + obj.Srv6EndpointBehavior().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeI) setDefault() { + if obj.obj.SrAlgorithm == nil { + obj.SetSrAlgorithm(0) + } + if obj.obj.Ipv6NodeAddress == nil { + obj.SetIpv6NodeAddress("0::0") + } + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_type_j.go b/gosnappi/bgp_attributes_segment_routing_policy_type_j.go new file mode 100644 index 00000000..f2721b11 --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_type_j.go @@ -0,0 +1,608 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicyTypeJ ***** +type bgpAttributesSegmentRoutingPolicyTypeJ struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicyTypeJ + marshaller marshalBgpAttributesSegmentRoutingPolicyTypeJ + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicyTypeJ + flagsHolder BgpAttributesSegmentRoutingPolicyTypeFlags + srv6SidHolder BgpAttributesSidSrv6 + srv6EndpointBehaviorHolder BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +} + +func NewBgpAttributesSegmentRoutingPolicyTypeJ() BgpAttributesSegmentRoutingPolicyTypeJ { + obj := bgpAttributesSegmentRoutingPolicyTypeJ{obj: &otg.BgpAttributesSegmentRoutingPolicyTypeJ{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) msg() *otg.BgpAttributesSegmentRoutingPolicyTypeJ { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicyTypeJ) BgpAttributesSegmentRoutingPolicyTypeJ { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicyTypeJ struct { + obj *bgpAttributesSegmentRoutingPolicyTypeJ +} + +type marshalBgpAttributesSegmentRoutingPolicyTypeJ interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicyTypeJ to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeJ + ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeJ, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicyTypeJ to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicyTypeJ to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicyTypeJ to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicyTypeJ struct { + obj *bgpAttributesSegmentRoutingPolicyTypeJ +} + +type unMarshalBgpAttributesSegmentRoutingPolicyTypeJ interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicyTypeJ from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeJ + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeJ) (BgpAttributesSegmentRoutingPolicyTypeJ, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicyTypeJ from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicyTypeJ from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicyTypeJ from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeJ { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicyTypeJ{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeJ { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicyTypeJ{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeJ) ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeJ, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeJ) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeJ) (BgpAttributesSegmentRoutingPolicyTypeJ, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeJ) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeJ) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeJ) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeJ) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeJ) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeJ) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) Clone() (BgpAttributesSegmentRoutingPolicyTypeJ, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicyTypeJ() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) setNil() { + obj.flagsHolder = nil + obj.srv6SidHolder = nil + obj.srv6EndpointBehaviorHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSegmentRoutingPolicyTypeJ is type J: IPv6 Address, Interface ID for local and remote pair for SRv6 with optional SID. +// It is encoded as a Segment of Type 15 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeJ interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicyTypeJ to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeJ + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicyTypeJ + // setMsg unmarshals BgpAttributesSegmentRoutingPolicyTypeJ from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeJ + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicyTypeJ) BgpAttributesSegmentRoutingPolicyTypeJ + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeJ + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeJ + // validate validates BgpAttributesSegmentRoutingPolicyTypeJ + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicyTypeJ, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns BgpAttributesSegmentRoutingPolicyTypeFlags, set in BgpAttributesSegmentRoutingPolicyTypeJ. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + Flags() BgpAttributesSegmentRoutingPolicyTypeFlags + // SetFlags assigns BgpAttributesSegmentRoutingPolicyTypeFlags provided by user to BgpAttributesSegmentRoutingPolicyTypeJ. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeJ + // HasFlags checks if Flags has been set in BgpAttributesSegmentRoutingPolicyTypeJ + HasFlags() bool + // SrAlgorithm returns uint32, set in BgpAttributesSegmentRoutingPolicyTypeJ. + SrAlgorithm() uint32 + // SetSrAlgorithm assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicyTypeJ + SetSrAlgorithm(value uint32) BgpAttributesSegmentRoutingPolicyTypeJ + // HasSrAlgorithm checks if SrAlgorithm has been set in BgpAttributesSegmentRoutingPolicyTypeJ + HasSrAlgorithm() bool + // LocalInterfaceId returns uint32, set in BgpAttributesSegmentRoutingPolicyTypeJ. + LocalInterfaceId() uint32 + // SetLocalInterfaceId assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicyTypeJ + SetLocalInterfaceId(value uint32) BgpAttributesSegmentRoutingPolicyTypeJ + // HasLocalInterfaceId checks if LocalInterfaceId has been set in BgpAttributesSegmentRoutingPolicyTypeJ + HasLocalInterfaceId() bool + // LocalIpv6NodeAddress returns string, set in BgpAttributesSegmentRoutingPolicyTypeJ. + LocalIpv6NodeAddress() string + // SetLocalIpv6NodeAddress assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeJ + SetLocalIpv6NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeJ + // HasLocalIpv6NodeAddress checks if LocalIpv6NodeAddress has been set in BgpAttributesSegmentRoutingPolicyTypeJ + HasLocalIpv6NodeAddress() bool + // RemoteInterfaceId returns uint32, set in BgpAttributesSegmentRoutingPolicyTypeJ. + RemoteInterfaceId() uint32 + // SetRemoteInterfaceId assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicyTypeJ + SetRemoteInterfaceId(value uint32) BgpAttributesSegmentRoutingPolicyTypeJ + // HasRemoteInterfaceId checks if RemoteInterfaceId has been set in BgpAttributesSegmentRoutingPolicyTypeJ + HasRemoteInterfaceId() bool + // RemoteIpv6NodeAddress returns string, set in BgpAttributesSegmentRoutingPolicyTypeJ. + RemoteIpv6NodeAddress() string + // SetRemoteIpv6NodeAddress assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeJ + SetRemoteIpv6NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeJ + // HasRemoteIpv6NodeAddress checks if RemoteIpv6NodeAddress has been set in BgpAttributesSegmentRoutingPolicyTypeJ + HasRemoteIpv6NodeAddress() bool + // Srv6Sid returns BgpAttributesSidSrv6, set in BgpAttributesSegmentRoutingPolicyTypeJ. + // BgpAttributesSidSrv6 is an IPv6 address denoting a SRv6 SID. + Srv6Sid() BgpAttributesSidSrv6 + // SetSrv6Sid assigns BgpAttributesSidSrv6 provided by user to BgpAttributesSegmentRoutingPolicyTypeJ. + // BgpAttributesSidSrv6 is an IPv6 address denoting a SRv6 SID. + SetSrv6Sid(value BgpAttributesSidSrv6) BgpAttributesSegmentRoutingPolicyTypeJ + // HasSrv6Sid checks if Srv6Sid has been set in BgpAttributesSegmentRoutingPolicyTypeJ + HasSrv6Sid() bool + // Srv6EndpointBehavior returns BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure, set in BgpAttributesSegmentRoutingPolicyTypeJ. + // BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure is configuration for optional SRv6 Endpoint Behavior and SID Structure. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. - This is specified in draft-ietf-idr-sr-policy-safi-02 Section 2.4.4.2.4 + Srv6EndpointBehavior() BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // SetSrv6EndpointBehavior assigns BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure provided by user to BgpAttributesSegmentRoutingPolicyTypeJ. + // BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure is configuration for optional SRv6 Endpoint Behavior and SID Structure. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. - This is specified in draft-ietf-idr-sr-policy-safi-02 Section 2.4.4.2.4 + SetSrv6EndpointBehavior(value BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) BgpAttributesSegmentRoutingPolicyTypeJ + // HasSrv6EndpointBehavior checks if Srv6EndpointBehavior has been set in BgpAttributesSegmentRoutingPolicyTypeJ + HasSrv6EndpointBehavior() bool + setNil() +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) Flags() BgpAttributesSegmentRoutingPolicyTypeFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewBgpAttributesSegmentRoutingPolicyTypeFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &bgpAttributesSegmentRoutingPolicyTypeFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) HasFlags() bool { + return obj.obj.Flags != nil +} + +// description is TBD +// SetFlags sets the BgpAttributesSegmentRoutingPolicyTypeFlags value in the BgpAttributesSegmentRoutingPolicyTypeJ object +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeJ { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SrAlgorithm returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) SrAlgorithm() uint32 { + + return *obj.obj.SrAlgorithm + +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SrAlgorithm returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) HasSrAlgorithm() bool { + return obj.obj.SrAlgorithm != nil +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SetSrAlgorithm sets the uint32 value in the BgpAttributesSegmentRoutingPolicyTypeJ object +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) SetSrAlgorithm(value uint32) BgpAttributesSegmentRoutingPolicyTypeJ { + + obj.obj.SrAlgorithm = &value + return obj +} + +// The local Interface Index as defined in [RFC8664]. +// LocalInterfaceId returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) LocalInterfaceId() uint32 { + + return *obj.obj.LocalInterfaceId + +} + +// The local Interface Index as defined in [RFC8664]. +// LocalInterfaceId returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) HasLocalInterfaceId() bool { + return obj.obj.LocalInterfaceId != nil +} + +// The local Interface Index as defined in [RFC8664]. +// SetLocalInterfaceId sets the uint32 value in the BgpAttributesSegmentRoutingPolicyTypeJ object +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) SetLocalInterfaceId(value uint32) BgpAttributesSegmentRoutingPolicyTypeJ { + + obj.obj.LocalInterfaceId = &value + return obj +} + +// The IPv6 address representing the local node. +// LocalIpv6NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) LocalIpv6NodeAddress() string { + + return *obj.obj.LocalIpv6NodeAddress + +} + +// The IPv6 address representing the local node. +// LocalIpv6NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) HasLocalIpv6NodeAddress() bool { + return obj.obj.LocalIpv6NodeAddress != nil +} + +// The IPv6 address representing the local node. +// SetLocalIpv6NodeAddress sets the string value in the BgpAttributesSegmentRoutingPolicyTypeJ object +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) SetLocalIpv6NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeJ { + + obj.obj.LocalIpv6NodeAddress = &value + return obj +} + +// The remote Interface Index as defined in [RFC8664]. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. +// RemoteInterfaceId returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) RemoteInterfaceId() uint32 { + + return *obj.obj.RemoteInterfaceId + +} + +// The remote Interface Index as defined in [RFC8664]. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. +// RemoteInterfaceId returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) HasRemoteInterfaceId() bool { + return obj.obj.RemoteInterfaceId != nil +} + +// The remote Interface Index as defined in [RFC8664]. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. +// SetRemoteInterfaceId sets the uint32 value in the BgpAttributesSegmentRoutingPolicyTypeJ object +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) SetRemoteInterfaceId(value uint32) BgpAttributesSegmentRoutingPolicyTypeJ { + + obj.obj.RemoteInterfaceId = &value + return obj +} + +// IPv6 address representing the remote node. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. +// RemoteIpv6NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) RemoteIpv6NodeAddress() string { + + return *obj.obj.RemoteIpv6NodeAddress + +} + +// IPv6 address representing the remote node. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. +// RemoteIpv6NodeAddress returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) HasRemoteIpv6NodeAddress() bool { + return obj.obj.RemoteIpv6NodeAddress != nil +} + +// IPv6 address representing the remote node. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. +// SetRemoteIpv6NodeAddress sets the string value in the BgpAttributesSegmentRoutingPolicyTypeJ object +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) SetRemoteIpv6NodeAddress(value string) BgpAttributesSegmentRoutingPolicyTypeJ { + + obj.obj.RemoteIpv6NodeAddress = &value + return obj +} + +// description is TBD +// Srv6Sid returns a BgpAttributesSidSrv6 +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) Srv6Sid() BgpAttributesSidSrv6 { + if obj.obj.Srv6Sid == nil { + obj.obj.Srv6Sid = NewBgpAttributesSidSrv6().msg() + } + if obj.srv6SidHolder == nil { + obj.srv6SidHolder = &bgpAttributesSidSrv6{obj: obj.obj.Srv6Sid} + } + return obj.srv6SidHolder +} + +// description is TBD +// Srv6Sid returns a BgpAttributesSidSrv6 +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) HasSrv6Sid() bool { + return obj.obj.Srv6Sid != nil +} + +// description is TBD +// SetSrv6Sid sets the BgpAttributesSidSrv6 value in the BgpAttributesSegmentRoutingPolicyTypeJ object +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) SetSrv6Sid(value BgpAttributesSidSrv6) BgpAttributesSegmentRoutingPolicyTypeJ { + + obj.srv6SidHolder = nil + obj.obj.Srv6Sid = value.msg() + + return obj +} + +// description is TBD +// Srv6EndpointBehavior returns a BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) Srv6EndpointBehavior() BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + if obj.obj.Srv6EndpointBehavior == nil { + obj.obj.Srv6EndpointBehavior = NewBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure().msg() + } + if obj.srv6EndpointBehaviorHolder == nil { + obj.srv6EndpointBehaviorHolder = &bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure{obj: obj.obj.Srv6EndpointBehavior} + } + return obj.srv6EndpointBehaviorHolder +} + +// description is TBD +// Srv6EndpointBehavior returns a BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) HasSrv6EndpointBehavior() bool { + return obj.obj.Srv6EndpointBehavior != nil +} + +// description is TBD +// SetSrv6EndpointBehavior sets the BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure value in the BgpAttributesSegmentRoutingPolicyTypeJ object +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) SetSrv6EndpointBehavior(value BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) BgpAttributesSegmentRoutingPolicyTypeJ { + + obj.srv6EndpointBehaviorHolder = nil + obj.obj.Srv6EndpointBehavior = value.msg() + + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.SrAlgorithm != nil { + + if *obj.obj.SrAlgorithm > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesSegmentRoutingPolicyTypeJ.SrAlgorithm <= 255 but Got %d", *obj.obj.SrAlgorithm)) + } + + } + + if obj.obj.LocalIpv6NodeAddress != nil { + + err := obj.validateIpv6(obj.LocalIpv6NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeJ.LocalIpv6NodeAddress")) + } + + } + + if obj.obj.RemoteIpv6NodeAddress != nil { + + err := obj.validateIpv6(obj.RemoteIpv6NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeJ.RemoteIpv6NodeAddress")) + } + + } + + if obj.obj.Srv6Sid != nil { + + obj.Srv6Sid().validateObj(vObj, set_default) + } + + if obj.obj.Srv6EndpointBehavior != nil { + + obj.Srv6EndpointBehavior().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeJ) setDefault() { + if obj.obj.SrAlgorithm == nil { + obj.SetSrAlgorithm(0) + } + if obj.obj.LocalInterfaceId == nil { + obj.SetLocalInterfaceId(0) + } + if obj.obj.LocalIpv6NodeAddress == nil { + obj.SetLocalIpv6NodeAddress("0::0") + } + if obj.obj.RemoteInterfaceId == nil { + obj.SetRemoteInterfaceId(0) + } + if obj.obj.RemoteIpv6NodeAddress == nil { + obj.SetRemoteIpv6NodeAddress("0::0") + } + +} diff --git a/gosnappi/bgp_attributes_segment_routing_policy_type_k.go b/gosnappi/bgp_attributes_segment_routing_policy_type_k.go new file mode 100644 index 00000000..ced3dc62 --- /dev/null +++ b/gosnappi/bgp_attributes_segment_routing_policy_type_k.go @@ -0,0 +1,546 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSegmentRoutingPolicyTypeK ***** +type bgpAttributesSegmentRoutingPolicyTypeK struct { + validation + obj *otg.BgpAttributesSegmentRoutingPolicyTypeK + marshaller marshalBgpAttributesSegmentRoutingPolicyTypeK + unMarshaller unMarshalBgpAttributesSegmentRoutingPolicyTypeK + flagsHolder BgpAttributesSegmentRoutingPolicyTypeFlags + srv6SidHolder BgpAttributesSidSrv6 + srv6EndpointBehaviorHolder BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +} + +func NewBgpAttributesSegmentRoutingPolicyTypeK() BgpAttributesSegmentRoutingPolicyTypeK { + obj := bgpAttributesSegmentRoutingPolicyTypeK{obj: &otg.BgpAttributesSegmentRoutingPolicyTypeK{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) msg() *otg.BgpAttributesSegmentRoutingPolicyTypeK { + return obj.obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) setMsg(msg *otg.BgpAttributesSegmentRoutingPolicyTypeK) BgpAttributesSegmentRoutingPolicyTypeK { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSegmentRoutingPolicyTypeK struct { + obj *bgpAttributesSegmentRoutingPolicyTypeK +} + +type marshalBgpAttributesSegmentRoutingPolicyTypeK interface { + // ToProto marshals BgpAttributesSegmentRoutingPolicyTypeK to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeK + ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeK, error) + // ToPbText marshals BgpAttributesSegmentRoutingPolicyTypeK to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSegmentRoutingPolicyTypeK to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSegmentRoutingPolicyTypeK to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSegmentRoutingPolicyTypeK struct { + obj *bgpAttributesSegmentRoutingPolicyTypeK +} + +type unMarshalBgpAttributesSegmentRoutingPolicyTypeK interface { + // FromProto unmarshals BgpAttributesSegmentRoutingPolicyTypeK from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeK + FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeK) (BgpAttributesSegmentRoutingPolicyTypeK, error) + // FromPbText unmarshals BgpAttributesSegmentRoutingPolicyTypeK from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSegmentRoutingPolicyTypeK from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSegmentRoutingPolicyTypeK from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeK { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSegmentRoutingPolicyTypeK{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeK { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSegmentRoutingPolicyTypeK{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeK) ToProto() (*otg.BgpAttributesSegmentRoutingPolicyTypeK, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeK) FromProto(msg *otg.BgpAttributesSegmentRoutingPolicyTypeK) (BgpAttributesSegmentRoutingPolicyTypeK, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeK) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeK) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeK) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeK) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSegmentRoutingPolicyTypeK) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSegmentRoutingPolicyTypeK) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) Clone() (BgpAttributesSegmentRoutingPolicyTypeK, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSegmentRoutingPolicyTypeK() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) setNil() { + obj.flagsHolder = nil + obj.srv6SidHolder = nil + obj.srv6EndpointBehaviorHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSegmentRoutingPolicyTypeK is type K: IPv6 Local and Remote addresses for SRv6 with optional SID. +// It is encoded as a Segment of Type 16 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeK interface { + Validation + // msg marshals BgpAttributesSegmentRoutingPolicyTypeK to protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeK + // and doesn't set defaults + msg() *otg.BgpAttributesSegmentRoutingPolicyTypeK + // setMsg unmarshals BgpAttributesSegmentRoutingPolicyTypeK from protobuf object *otg.BgpAttributesSegmentRoutingPolicyTypeK + // and doesn't set defaults + setMsg(*otg.BgpAttributesSegmentRoutingPolicyTypeK) BgpAttributesSegmentRoutingPolicyTypeK + // provides marshal interface + Marshal() marshalBgpAttributesSegmentRoutingPolicyTypeK + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSegmentRoutingPolicyTypeK + // validate validates BgpAttributesSegmentRoutingPolicyTypeK + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSegmentRoutingPolicyTypeK, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns BgpAttributesSegmentRoutingPolicyTypeFlags, set in BgpAttributesSegmentRoutingPolicyTypeK. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + Flags() BgpAttributesSegmentRoutingPolicyTypeFlags + // SetFlags assigns BgpAttributesSegmentRoutingPolicyTypeFlags provided by user to BgpAttributesSegmentRoutingPolicyTypeK. + // BgpAttributesSegmentRoutingPolicyTypeFlags is flags for each Segment in SEGMENT_LIST sub-tlv. + // - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + // - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + // - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + // - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + // This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. + SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeK + // HasFlags checks if Flags has been set in BgpAttributesSegmentRoutingPolicyTypeK + HasFlags() bool + // SrAlgorithm returns uint32, set in BgpAttributesSegmentRoutingPolicyTypeK. + SrAlgorithm() uint32 + // SetSrAlgorithm assigns uint32 provided by user to BgpAttributesSegmentRoutingPolicyTypeK + SetSrAlgorithm(value uint32) BgpAttributesSegmentRoutingPolicyTypeK + // HasSrAlgorithm checks if SrAlgorithm has been set in BgpAttributesSegmentRoutingPolicyTypeK + HasSrAlgorithm() bool + // LocalIpv6Address returns string, set in BgpAttributesSegmentRoutingPolicyTypeK. + LocalIpv6Address() string + // SetLocalIpv6Address assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeK + SetLocalIpv6Address(value string) BgpAttributesSegmentRoutingPolicyTypeK + // HasLocalIpv6Address checks if LocalIpv6Address has been set in BgpAttributesSegmentRoutingPolicyTypeK + HasLocalIpv6Address() bool + // RemoteIpv6Address returns string, set in BgpAttributesSegmentRoutingPolicyTypeK. + RemoteIpv6Address() string + // SetRemoteIpv6Address assigns string provided by user to BgpAttributesSegmentRoutingPolicyTypeK + SetRemoteIpv6Address(value string) BgpAttributesSegmentRoutingPolicyTypeK + // HasRemoteIpv6Address checks if RemoteIpv6Address has been set in BgpAttributesSegmentRoutingPolicyTypeK + HasRemoteIpv6Address() bool + // Srv6Sid returns BgpAttributesSidSrv6, set in BgpAttributesSegmentRoutingPolicyTypeK. + // BgpAttributesSidSrv6 is an IPv6 address denoting a SRv6 SID. + Srv6Sid() BgpAttributesSidSrv6 + // SetSrv6Sid assigns BgpAttributesSidSrv6 provided by user to BgpAttributesSegmentRoutingPolicyTypeK. + // BgpAttributesSidSrv6 is an IPv6 address denoting a SRv6 SID. + SetSrv6Sid(value BgpAttributesSidSrv6) BgpAttributesSegmentRoutingPolicyTypeK + // HasSrv6Sid checks if Srv6Sid has been set in BgpAttributesSegmentRoutingPolicyTypeK + HasSrv6Sid() bool + // Srv6EndpointBehavior returns BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure, set in BgpAttributesSegmentRoutingPolicyTypeK. + // BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure is configuration for optional SRv6 Endpoint Behavior and SID Structure. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. - This is specified in draft-ietf-idr-sr-policy-safi-02 Section 2.4.4.2.4 + Srv6EndpointBehavior() BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // SetSrv6EndpointBehavior assigns BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure provided by user to BgpAttributesSegmentRoutingPolicyTypeK. + // BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure is configuration for optional SRv6 Endpoint Behavior and SID Structure. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. - This is specified in draft-ietf-idr-sr-policy-safi-02 Section 2.4.4.2.4 + SetSrv6EndpointBehavior(value BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) BgpAttributesSegmentRoutingPolicyTypeK + // HasSrv6EndpointBehavior checks if Srv6EndpointBehavior has been set in BgpAttributesSegmentRoutingPolicyTypeK + HasSrv6EndpointBehavior() bool + setNil() +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) Flags() BgpAttributesSegmentRoutingPolicyTypeFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewBgpAttributesSegmentRoutingPolicyTypeFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &bgpAttributesSegmentRoutingPolicyTypeFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// description is TBD +// Flags returns a BgpAttributesSegmentRoutingPolicyTypeFlags +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) HasFlags() bool { + return obj.obj.Flags != nil +} + +// description is TBD +// SetFlags sets the BgpAttributesSegmentRoutingPolicyTypeFlags value in the BgpAttributesSegmentRoutingPolicyTypeK object +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) SetFlags(value BgpAttributesSegmentRoutingPolicyTypeFlags) BgpAttributesSegmentRoutingPolicyTypeK { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SrAlgorithm returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) SrAlgorithm() uint32 { + + return *obj.obj.SrAlgorithm + +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SrAlgorithm returns a uint32 +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) HasSrAlgorithm() bool { + return obj.obj.SrAlgorithm != nil +} + +// SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. +// SetSrAlgorithm sets the uint32 value in the BgpAttributesSegmentRoutingPolicyTypeK object +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) SetSrAlgorithm(value uint32) BgpAttributesSegmentRoutingPolicyTypeK { + + obj.obj.SrAlgorithm = &value + return obj +} + +// Local IPv6 Address. +// LocalIpv6Address returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) LocalIpv6Address() string { + + return *obj.obj.LocalIpv6Address + +} + +// Local IPv6 Address. +// LocalIpv6Address returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) HasLocalIpv6Address() bool { + return obj.obj.LocalIpv6Address != nil +} + +// Local IPv6 Address. +// SetLocalIpv6Address sets the string value in the BgpAttributesSegmentRoutingPolicyTypeK object +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) SetLocalIpv6Address(value string) BgpAttributesSegmentRoutingPolicyTypeK { + + obj.obj.LocalIpv6Address = &value + return obj +} + +// Remote IPv6 Address. +// RemoteIpv6Address returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) RemoteIpv6Address() string { + + return *obj.obj.RemoteIpv6Address + +} + +// Remote IPv6 Address. +// RemoteIpv6Address returns a string +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) HasRemoteIpv6Address() bool { + return obj.obj.RemoteIpv6Address != nil +} + +// Remote IPv6 Address. +// SetRemoteIpv6Address sets the string value in the BgpAttributesSegmentRoutingPolicyTypeK object +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) SetRemoteIpv6Address(value string) BgpAttributesSegmentRoutingPolicyTypeK { + + obj.obj.RemoteIpv6Address = &value + return obj +} + +// description is TBD +// Srv6Sid returns a BgpAttributesSidSrv6 +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) Srv6Sid() BgpAttributesSidSrv6 { + if obj.obj.Srv6Sid == nil { + obj.obj.Srv6Sid = NewBgpAttributesSidSrv6().msg() + } + if obj.srv6SidHolder == nil { + obj.srv6SidHolder = &bgpAttributesSidSrv6{obj: obj.obj.Srv6Sid} + } + return obj.srv6SidHolder +} + +// description is TBD +// Srv6Sid returns a BgpAttributesSidSrv6 +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) HasSrv6Sid() bool { + return obj.obj.Srv6Sid != nil +} + +// description is TBD +// SetSrv6Sid sets the BgpAttributesSidSrv6 value in the BgpAttributesSegmentRoutingPolicyTypeK object +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) SetSrv6Sid(value BgpAttributesSidSrv6) BgpAttributesSegmentRoutingPolicyTypeK { + + obj.srv6SidHolder = nil + obj.obj.Srv6Sid = value.msg() + + return obj +} + +// description is TBD +// Srv6EndpointBehavior returns a BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) Srv6EndpointBehavior() BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + if obj.obj.Srv6EndpointBehavior == nil { + obj.obj.Srv6EndpointBehavior = NewBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure().msg() + } + if obj.srv6EndpointBehaviorHolder == nil { + obj.srv6EndpointBehaviorHolder = &bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure{obj: obj.obj.Srv6EndpointBehavior} + } + return obj.srv6EndpointBehaviorHolder +} + +// description is TBD +// Srv6EndpointBehavior returns a BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) HasSrv6EndpointBehavior() bool { + return obj.obj.Srv6EndpointBehavior != nil +} + +// description is TBD +// SetSrv6EndpointBehavior sets the BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure value in the BgpAttributesSegmentRoutingPolicyTypeK object +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) SetSrv6EndpointBehavior(value BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) BgpAttributesSegmentRoutingPolicyTypeK { + + obj.srv6EndpointBehaviorHolder = nil + obj.obj.Srv6EndpointBehavior = value.msg() + + return obj +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.SrAlgorithm != nil { + + if *obj.obj.SrAlgorithm > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesSegmentRoutingPolicyTypeK.SrAlgorithm <= 255 but Got %d", *obj.obj.SrAlgorithm)) + } + + } + + if obj.obj.LocalIpv6Address != nil { + + err := obj.validateIpv6(obj.LocalIpv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeK.LocalIpv6Address")) + } + + } + + if obj.obj.RemoteIpv6Address != nil { + + err := obj.validateIpv6(obj.RemoteIpv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSegmentRoutingPolicyTypeK.RemoteIpv6Address")) + } + + } + + if obj.obj.Srv6Sid != nil { + + obj.Srv6Sid().validateObj(vObj, set_default) + } + + if obj.obj.Srv6EndpointBehavior != nil { + + obj.Srv6EndpointBehavior().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesSegmentRoutingPolicyTypeK) setDefault() { + if obj.obj.SrAlgorithm == nil { + obj.SetSrAlgorithm(0) + } + if obj.obj.LocalIpv6Address == nil { + obj.SetLocalIpv6Address("0::0") + } + if obj.obj.RemoteIpv6Address == nil { + obj.SetRemoteIpv6Address("0::0") + } + +} diff --git a/gosnappi/bgp_attributes_sid_mpls.go b/gosnappi/bgp_attributes_sid_mpls.go new file mode 100644 index 00000000..4d4b9d95 --- /dev/null +++ b/gosnappi/bgp_attributes_sid_mpls.go @@ -0,0 +1,433 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSidMpls ***** +type bgpAttributesSidMpls struct { + validation + obj *otg.BgpAttributesSidMpls + marshaller marshalBgpAttributesSidMpls + unMarshaller unMarshalBgpAttributesSidMpls +} + +func NewBgpAttributesSidMpls() BgpAttributesSidMpls { + obj := bgpAttributesSidMpls{obj: &otg.BgpAttributesSidMpls{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSidMpls) msg() *otg.BgpAttributesSidMpls { + return obj.obj +} + +func (obj *bgpAttributesSidMpls) setMsg(msg *otg.BgpAttributesSidMpls) BgpAttributesSidMpls { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSidMpls struct { + obj *bgpAttributesSidMpls +} + +type marshalBgpAttributesSidMpls interface { + // ToProto marshals BgpAttributesSidMpls to protobuf object *otg.BgpAttributesSidMpls + ToProto() (*otg.BgpAttributesSidMpls, error) + // ToPbText marshals BgpAttributesSidMpls to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSidMpls to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSidMpls to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSidMpls struct { + obj *bgpAttributesSidMpls +} + +type unMarshalBgpAttributesSidMpls interface { + // FromProto unmarshals BgpAttributesSidMpls from protobuf object *otg.BgpAttributesSidMpls + FromProto(msg *otg.BgpAttributesSidMpls) (BgpAttributesSidMpls, error) + // FromPbText unmarshals BgpAttributesSidMpls from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSidMpls from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSidMpls from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSidMpls) Marshal() marshalBgpAttributesSidMpls { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSidMpls{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSidMpls) Unmarshal() unMarshalBgpAttributesSidMpls { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSidMpls{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSidMpls) ToProto() (*otg.BgpAttributesSidMpls, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSidMpls) FromProto(msg *otg.BgpAttributesSidMpls) (BgpAttributesSidMpls, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSidMpls) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSidMpls) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSidMpls) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSidMpls) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSidMpls) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSidMpls) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSidMpls) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSidMpls) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSidMpls) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSidMpls) Clone() (BgpAttributesSidMpls, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSidMpls() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesSidMpls is this carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, 1 bit indicating presence +// or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. +type BgpAttributesSidMpls interface { + Validation + // msg marshals BgpAttributesSidMpls to protobuf object *otg.BgpAttributesSidMpls + // and doesn't set defaults + msg() *otg.BgpAttributesSidMpls + // setMsg unmarshals BgpAttributesSidMpls from protobuf object *otg.BgpAttributesSidMpls + // and doesn't set defaults + setMsg(*otg.BgpAttributesSidMpls) BgpAttributesSidMpls + // provides marshal interface + Marshal() marshalBgpAttributesSidMpls + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSidMpls + // validate validates BgpAttributesSidMpls + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSidMpls, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Label returns uint32, set in BgpAttributesSidMpls. + Label() uint32 + // SetLabel assigns uint32 provided by user to BgpAttributesSidMpls + SetLabel(value uint32) BgpAttributesSidMpls + // HasLabel checks if Label has been set in BgpAttributesSidMpls + HasLabel() bool + // TrafficClass returns uint32, set in BgpAttributesSidMpls. + TrafficClass() uint32 + // SetTrafficClass assigns uint32 provided by user to BgpAttributesSidMpls + SetTrafficClass(value uint32) BgpAttributesSidMpls + // HasTrafficClass checks if TrafficClass has been set in BgpAttributesSidMpls + HasTrafficClass() bool + // FlagBos returns bool, set in BgpAttributesSidMpls. + FlagBos() bool + // SetFlagBos assigns bool provided by user to BgpAttributesSidMpls + SetFlagBos(value bool) BgpAttributesSidMpls + // HasFlagBos checks if FlagBos has been set in BgpAttributesSidMpls + HasFlagBos() bool + // Ttl returns uint32, set in BgpAttributesSidMpls. + Ttl() uint32 + // SetTtl assigns uint32 provided by user to BgpAttributesSidMpls + SetTtl(value uint32) BgpAttributesSidMpls + // HasTtl checks if Ttl has been set in BgpAttributesSidMpls + HasTtl() bool +} + +// 20 bit MPLS Label value. +// Label returns a uint32 +func (obj *bgpAttributesSidMpls) Label() uint32 { + + return *obj.obj.Label + +} + +// 20 bit MPLS Label value. +// Label returns a uint32 +func (obj *bgpAttributesSidMpls) HasLabel() bool { + return obj.obj.Label != nil +} + +// 20 bit MPLS Label value. +// SetLabel sets the uint32 value in the BgpAttributesSidMpls object +func (obj *bgpAttributesSidMpls) SetLabel(value uint32) BgpAttributesSidMpls { + + obj.obj.Label = &value + return obj +} + +// 3 bits of Traffic Class. +// TrafficClass returns a uint32 +func (obj *bgpAttributesSidMpls) TrafficClass() uint32 { + + return *obj.obj.TrafficClass + +} + +// 3 bits of Traffic Class. +// TrafficClass returns a uint32 +func (obj *bgpAttributesSidMpls) HasTrafficClass() bool { + return obj.obj.TrafficClass != nil +} + +// 3 bits of Traffic Class. +// SetTrafficClass sets the uint32 value in the BgpAttributesSidMpls object +func (obj *bgpAttributesSidMpls) SetTrafficClass(value uint32) BgpAttributesSidMpls { + + obj.obj.TrafficClass = &value + return obj +} + +// Bottom of Stack +// FlagBos returns a bool +func (obj *bgpAttributesSidMpls) FlagBos() bool { + + return *obj.obj.FlagBos + +} + +// Bottom of Stack +// FlagBos returns a bool +func (obj *bgpAttributesSidMpls) HasFlagBos() bool { + return obj.obj.FlagBos != nil +} + +// Bottom of Stack +// SetFlagBos sets the bool value in the BgpAttributesSidMpls object +func (obj *bgpAttributesSidMpls) SetFlagBos(value bool) BgpAttributesSidMpls { + + obj.obj.FlagBos = &value + return obj +} + +// 8 bits Time to Live +// Ttl returns a uint32 +func (obj *bgpAttributesSidMpls) Ttl() uint32 { + + return *obj.obj.Ttl + +} + +// 8 bits Time to Live +// Ttl returns a uint32 +func (obj *bgpAttributesSidMpls) HasTtl() bool { + return obj.obj.Ttl != nil +} + +// 8 bits Time to Live +// SetTtl sets the uint32 value in the BgpAttributesSidMpls object +func (obj *bgpAttributesSidMpls) SetTtl(value uint32) BgpAttributesSidMpls { + + obj.obj.Ttl = &value + return obj +} + +func (obj *bgpAttributesSidMpls) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Label != nil { + + if *obj.obj.Label > 1048576 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesSidMpls.Label <= 1048576 but Got %d", *obj.obj.Label)) + } + + } + + if obj.obj.TrafficClass != nil { + + if *obj.obj.TrafficClass > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesSidMpls.TrafficClass <= 7 but Got %d", *obj.obj.TrafficClass)) + } + + } + + if obj.obj.Ttl != nil { + + if *obj.obj.Ttl > 63 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesSidMpls.Ttl <= 63 but Got %d", *obj.obj.Ttl)) + } + + } + +} + +func (obj *bgpAttributesSidMpls) setDefault() { + if obj.obj.Label == nil { + obj.SetLabel(16) + } + if obj.obj.TrafficClass == nil { + obj.SetTrafficClass(0) + } + if obj.obj.FlagBos == nil { + obj.SetFlagBos(true) + } + if obj.obj.Ttl == nil { + obj.SetTtl(63) + } + +} diff --git a/gosnappi/bgp_attributes_sid_srv6.go b/gosnappi/bgp_attributes_sid_srv6.go new file mode 100644 index 00000000..7541cb4f --- /dev/null +++ b/gosnappi/bgp_attributes_sid_srv6.go @@ -0,0 +1,318 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSidSrv6 ***** +type bgpAttributesSidSrv6 struct { + validation + obj *otg.BgpAttributesSidSrv6 + marshaller marshalBgpAttributesSidSrv6 + unMarshaller unMarshalBgpAttributesSidSrv6 +} + +func NewBgpAttributesSidSrv6() BgpAttributesSidSrv6 { + obj := bgpAttributesSidSrv6{obj: &otg.BgpAttributesSidSrv6{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSidSrv6) msg() *otg.BgpAttributesSidSrv6 { + return obj.obj +} + +func (obj *bgpAttributesSidSrv6) setMsg(msg *otg.BgpAttributesSidSrv6) BgpAttributesSidSrv6 { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSidSrv6 struct { + obj *bgpAttributesSidSrv6 +} + +type marshalBgpAttributesSidSrv6 interface { + // ToProto marshals BgpAttributesSidSrv6 to protobuf object *otg.BgpAttributesSidSrv6 + ToProto() (*otg.BgpAttributesSidSrv6, error) + // ToPbText marshals BgpAttributesSidSrv6 to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSidSrv6 to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSidSrv6 to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSidSrv6 struct { + obj *bgpAttributesSidSrv6 +} + +type unMarshalBgpAttributesSidSrv6 interface { + // FromProto unmarshals BgpAttributesSidSrv6 from protobuf object *otg.BgpAttributesSidSrv6 + FromProto(msg *otg.BgpAttributesSidSrv6) (BgpAttributesSidSrv6, error) + // FromPbText unmarshals BgpAttributesSidSrv6 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSidSrv6 from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSidSrv6 from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSidSrv6) Marshal() marshalBgpAttributesSidSrv6 { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSidSrv6{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSidSrv6) Unmarshal() unMarshalBgpAttributesSidSrv6 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSidSrv6{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSidSrv6) ToProto() (*otg.BgpAttributesSidSrv6, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSidSrv6) FromProto(msg *otg.BgpAttributesSidSrv6) (BgpAttributesSidSrv6, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSidSrv6) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSidSrv6) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSidSrv6) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSidSrv6) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSidSrv6) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSidSrv6) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSidSrv6) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSidSrv6) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSidSrv6) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSidSrv6) Clone() (BgpAttributesSidSrv6, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSidSrv6() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesSidSrv6 is an IPv6 address denoting a SRv6 SID. +type BgpAttributesSidSrv6 interface { + Validation + // msg marshals BgpAttributesSidSrv6 to protobuf object *otg.BgpAttributesSidSrv6 + // and doesn't set defaults + msg() *otg.BgpAttributesSidSrv6 + // setMsg unmarshals BgpAttributesSidSrv6 from protobuf object *otg.BgpAttributesSidSrv6 + // and doesn't set defaults + setMsg(*otg.BgpAttributesSidSrv6) BgpAttributesSidSrv6 + // provides marshal interface + Marshal() marshalBgpAttributesSidSrv6 + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSidSrv6 + // validate validates BgpAttributesSidSrv6 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSidSrv6, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ip returns string, set in BgpAttributesSidSrv6. + Ip() string + // SetIp assigns string provided by user to BgpAttributesSidSrv6 + SetIp(value string) BgpAttributesSidSrv6 + // HasIp checks if Ip has been set in BgpAttributesSidSrv6 + HasIp() bool +} + +// description is TBD +// Ip returns a string +func (obj *bgpAttributesSidSrv6) Ip() string { + + return *obj.obj.Ip + +} + +// description is TBD +// Ip returns a string +func (obj *bgpAttributesSidSrv6) HasIp() bool { + return obj.obj.Ip != nil +} + +// description is TBD +// SetIp sets the string value in the BgpAttributesSidSrv6 object +func (obj *bgpAttributesSidSrv6) SetIp(value string) BgpAttributesSidSrv6 { + + obj.obj.Ip = &value + return obj +} + +func (obj *bgpAttributesSidSrv6) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ip != nil { + + err := obj.validateIpv6(obj.Ip()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSidSrv6.Ip")) + } + + } + +} + +func (obj *bgpAttributesSidSrv6) setDefault() { + if obj.obj.Ip == nil { + obj.SetIp("0::0") + } + +} diff --git a/gosnappi/bgp_attributes_sr_policy_explicit_null_policy.go b/gosnappi/bgp_attributes_sr_policy_explicit_null_policy.go new file mode 100644 index 00000000..35709455 --- /dev/null +++ b/gosnappi/bgp_attributes_sr_policy_explicit_null_policy.go @@ -0,0 +1,380 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSrPolicyExplicitNullPolicy ***** +type bgpAttributesSrPolicyExplicitNullPolicy struct { + validation + obj *otg.BgpAttributesSrPolicyExplicitNullPolicy + marshaller marshalBgpAttributesSrPolicyExplicitNullPolicy + unMarshaller unMarshalBgpAttributesSrPolicyExplicitNullPolicy +} + +func NewBgpAttributesSrPolicyExplicitNullPolicy() BgpAttributesSrPolicyExplicitNullPolicy { + obj := bgpAttributesSrPolicyExplicitNullPolicy{obj: &otg.BgpAttributesSrPolicyExplicitNullPolicy{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) msg() *otg.BgpAttributesSrPolicyExplicitNullPolicy { + return obj.obj +} + +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) setMsg(msg *otg.BgpAttributesSrPolicyExplicitNullPolicy) BgpAttributesSrPolicyExplicitNullPolicy { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSrPolicyExplicitNullPolicy struct { + obj *bgpAttributesSrPolicyExplicitNullPolicy +} + +type marshalBgpAttributesSrPolicyExplicitNullPolicy interface { + // ToProto marshals BgpAttributesSrPolicyExplicitNullPolicy to protobuf object *otg.BgpAttributesSrPolicyExplicitNullPolicy + ToProto() (*otg.BgpAttributesSrPolicyExplicitNullPolicy, error) + // ToPbText marshals BgpAttributesSrPolicyExplicitNullPolicy to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSrPolicyExplicitNullPolicy to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSrPolicyExplicitNullPolicy to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSrPolicyExplicitNullPolicy struct { + obj *bgpAttributesSrPolicyExplicitNullPolicy +} + +type unMarshalBgpAttributesSrPolicyExplicitNullPolicy interface { + // FromProto unmarshals BgpAttributesSrPolicyExplicitNullPolicy from protobuf object *otg.BgpAttributesSrPolicyExplicitNullPolicy + FromProto(msg *otg.BgpAttributesSrPolicyExplicitNullPolicy) (BgpAttributesSrPolicyExplicitNullPolicy, error) + // FromPbText unmarshals BgpAttributesSrPolicyExplicitNullPolicy from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSrPolicyExplicitNullPolicy from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSrPolicyExplicitNullPolicy from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) Marshal() marshalBgpAttributesSrPolicyExplicitNullPolicy { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSrPolicyExplicitNullPolicy{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) Unmarshal() unMarshalBgpAttributesSrPolicyExplicitNullPolicy { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSrPolicyExplicitNullPolicy{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSrPolicyExplicitNullPolicy) ToProto() (*otg.BgpAttributesSrPolicyExplicitNullPolicy, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSrPolicyExplicitNullPolicy) FromProto(msg *otg.BgpAttributesSrPolicyExplicitNullPolicy) (BgpAttributesSrPolicyExplicitNullPolicy, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSrPolicyExplicitNullPolicy) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSrPolicyExplicitNullPolicy) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSrPolicyExplicitNullPolicy) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSrPolicyExplicitNullPolicy) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSrPolicyExplicitNullPolicy) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSrPolicyExplicitNullPolicy) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) Clone() (BgpAttributesSrPolicyExplicitNullPolicy, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSrPolicyExplicitNullPolicy() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesSrPolicyExplicitNullPolicy is this is an optional sub-tlv (Type 14) which indicates whether an Explicit NULL Label must be pushed on an unlabeled IP +// packet before other labels for IPv4 or IPv6 flows. +// - It is defined in Section 2.4.5 of draft-ietf-idr-sr-policy-safi-02. +type BgpAttributesSrPolicyExplicitNullPolicy interface { + Validation + // msg marshals BgpAttributesSrPolicyExplicitNullPolicy to protobuf object *otg.BgpAttributesSrPolicyExplicitNullPolicy + // and doesn't set defaults + msg() *otg.BgpAttributesSrPolicyExplicitNullPolicy + // setMsg unmarshals BgpAttributesSrPolicyExplicitNullPolicy from protobuf object *otg.BgpAttributesSrPolicyExplicitNullPolicy + // and doesn't set defaults + setMsg(*otg.BgpAttributesSrPolicyExplicitNullPolicy) BgpAttributesSrPolicyExplicitNullPolicy + // provides marshal interface + Marshal() marshalBgpAttributesSrPolicyExplicitNullPolicy + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSrPolicyExplicitNullPolicy + // validate validates BgpAttributesSrPolicyExplicitNullPolicy + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSrPolicyExplicitNullPolicy, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum, set in BgpAttributesSrPolicyExplicitNullPolicy + Choice() BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum + // setChoice assigns BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum provided by user to BgpAttributesSrPolicyExplicitNullPolicy + setChoice(value BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum) BgpAttributesSrPolicyExplicitNullPolicy + // HasChoice checks if Choice has been set in BgpAttributesSrPolicyExplicitNullPolicy + HasChoice() bool + // getter for PushIpv4 to set choice. + PushIpv4() + // getter for PushIpv6 to set choice. + PushIpv6() + // getter for Unknown to set choice. + Unknown() + // getter for PushIpv4AndIpv6 to set choice. + PushIpv4AndIpv6() + // getter for DonotPush to set choice. + DonotPush() +} + +type BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum string + +// Enum of Choice on BgpAttributesSrPolicyExplicitNullPolicy +var BgpAttributesSrPolicyExplicitNullPolicyChoice = struct { + UNKNOWN BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum + PUSH_IPV4 BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum + PUSH_IPV6 BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum + PUSH_IPV4_AND_IPV6 BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum + DONOT_PUSH BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum +}{ + UNKNOWN: BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum("unknown"), + PUSH_IPV4: BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum("push_ipv4"), + PUSH_IPV6: BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum("push_ipv6"), + PUSH_IPV4_AND_IPV6: BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum("push_ipv4_and_ipv6"), + DONOT_PUSH: BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum("donot_push"), +} + +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) Choice() BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum { + return BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for PushIpv4 to set choice +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) PushIpv4() { + obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.PUSH_IPV4) +} + +// getter for PushIpv6 to set choice +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) PushIpv6() { + obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.PUSH_IPV6) +} + +// getter for Unknown to set choice +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) Unknown() { + obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.UNKNOWN) +} + +// getter for PushIpv4AndIpv6 to set choice +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) PushIpv4AndIpv6() { + obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.PUSH_IPV4_AND_IPV6) +} + +// getter for DonotPush to set choice +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) DonotPush() { + obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.DONOT_PUSH) +} + +// The Explicit NULL Label policy. +// Choice returns a string +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) setChoice(value BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum) BgpAttributesSrPolicyExplicitNullPolicy { + intValue, ok := otg.BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + + return obj +} + +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpAttributesSrPolicyExplicitNullPolicy) setDefault() { + var choices_set int = 0 + var choice BgpAttributesSrPolicyExplicitNullPolicyChoiceEnum + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(BgpAttributesSrPolicyExplicitNullPolicyChoice.PUSH_IPV4_AND_IPV6) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpAttributesSrPolicyExplicitNullPolicy") + } + } else { + intVal := otg.BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum_value[string(choice)] + enumValue := otg.BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_attributes_sr_policy_policy_candidate_name.go b/gosnappi/bgp_attributes_sr_policy_policy_candidate_name.go new file mode 100644 index 00000000..baa7d940 --- /dev/null +++ b/gosnappi/bgp_attributes_sr_policy_policy_candidate_name.go @@ -0,0 +1,318 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSrPolicyPolicyCandidateName ***** +type bgpAttributesSrPolicyPolicyCandidateName struct { + validation + obj *otg.BgpAttributesSrPolicyPolicyCandidateName + marshaller marshalBgpAttributesSrPolicyPolicyCandidateName + unMarshaller unMarshalBgpAttributesSrPolicyPolicyCandidateName +} + +func NewBgpAttributesSrPolicyPolicyCandidateName() BgpAttributesSrPolicyPolicyCandidateName { + obj := bgpAttributesSrPolicyPolicyCandidateName{obj: &otg.BgpAttributesSrPolicyPolicyCandidateName{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSrPolicyPolicyCandidateName) msg() *otg.BgpAttributesSrPolicyPolicyCandidateName { + return obj.obj +} + +func (obj *bgpAttributesSrPolicyPolicyCandidateName) setMsg(msg *otg.BgpAttributesSrPolicyPolicyCandidateName) BgpAttributesSrPolicyPolicyCandidateName { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSrPolicyPolicyCandidateName struct { + obj *bgpAttributesSrPolicyPolicyCandidateName +} + +type marshalBgpAttributesSrPolicyPolicyCandidateName interface { + // ToProto marshals BgpAttributesSrPolicyPolicyCandidateName to protobuf object *otg.BgpAttributesSrPolicyPolicyCandidateName + ToProto() (*otg.BgpAttributesSrPolicyPolicyCandidateName, error) + // ToPbText marshals BgpAttributesSrPolicyPolicyCandidateName to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSrPolicyPolicyCandidateName to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSrPolicyPolicyCandidateName to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSrPolicyPolicyCandidateName struct { + obj *bgpAttributesSrPolicyPolicyCandidateName +} + +type unMarshalBgpAttributesSrPolicyPolicyCandidateName interface { + // FromProto unmarshals BgpAttributesSrPolicyPolicyCandidateName from protobuf object *otg.BgpAttributesSrPolicyPolicyCandidateName + FromProto(msg *otg.BgpAttributesSrPolicyPolicyCandidateName) (BgpAttributesSrPolicyPolicyCandidateName, error) + // FromPbText unmarshals BgpAttributesSrPolicyPolicyCandidateName from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSrPolicyPolicyCandidateName from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSrPolicyPolicyCandidateName from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSrPolicyPolicyCandidateName) Marshal() marshalBgpAttributesSrPolicyPolicyCandidateName { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSrPolicyPolicyCandidateName{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSrPolicyPolicyCandidateName) Unmarshal() unMarshalBgpAttributesSrPolicyPolicyCandidateName { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSrPolicyPolicyCandidateName{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSrPolicyPolicyCandidateName) ToProto() (*otg.BgpAttributesSrPolicyPolicyCandidateName, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPolicyCandidateName) FromProto(msg *otg.BgpAttributesSrPolicyPolicyCandidateName) (BgpAttributesSrPolicyPolicyCandidateName, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSrPolicyPolicyCandidateName) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPolicyCandidateName) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSrPolicyPolicyCandidateName) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPolicyCandidateName) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSrPolicyPolicyCandidateName) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPolicyCandidateName) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSrPolicyPolicyCandidateName) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSrPolicyPolicyCandidateName) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSrPolicyPolicyCandidateName) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSrPolicyPolicyCandidateName) Clone() (BgpAttributesSrPolicyPolicyCandidateName, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSrPolicyPolicyCandidateName() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesSrPolicyPolicyCandidateName is optional Policy Candidate Path Name sub-tlv (Type 129) which carries the symbolic name for the SR Policy candidate path +// for debugging. +// - It is defined in Section 2.4.7 of draft-ietf-idr-sr-policy-safi-02 . +type BgpAttributesSrPolicyPolicyCandidateName interface { + Validation + // msg marshals BgpAttributesSrPolicyPolicyCandidateName to protobuf object *otg.BgpAttributesSrPolicyPolicyCandidateName + // and doesn't set defaults + msg() *otg.BgpAttributesSrPolicyPolicyCandidateName + // setMsg unmarshals BgpAttributesSrPolicyPolicyCandidateName from protobuf object *otg.BgpAttributesSrPolicyPolicyCandidateName + // and doesn't set defaults + setMsg(*otg.BgpAttributesSrPolicyPolicyCandidateName) BgpAttributesSrPolicyPolicyCandidateName + // provides marshal interface + Marshal() marshalBgpAttributesSrPolicyPolicyCandidateName + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSrPolicyPolicyCandidateName + // validate validates BgpAttributesSrPolicyPolicyCandidateName + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSrPolicyPolicyCandidateName, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Value returns string, set in BgpAttributesSrPolicyPolicyCandidateName. + Value() string + // SetValue assigns string provided by user to BgpAttributesSrPolicyPolicyCandidateName + SetValue(value string) BgpAttributesSrPolicyPolicyCandidateName +} + +// Value of the symbolic Policy Candidate Path Name carried in the Policy Candidate Path Name sub-tlv. +// It is recommended that the size of the name is limited to 255 bytes. +// Value returns a string +func (obj *bgpAttributesSrPolicyPolicyCandidateName) Value() string { + + return *obj.obj.Value + +} + +// Value of the symbolic Policy Candidate Path Name carried in the Policy Candidate Path Name sub-tlv. +// It is recommended that the size of the name is limited to 255 bytes. +// SetValue sets the string value in the BgpAttributesSrPolicyPolicyCandidateName object +func (obj *bgpAttributesSrPolicyPolicyCandidateName) SetValue(value string) BgpAttributesSrPolicyPolicyCandidateName { + + obj.obj.Value = &value + return obj +} + +func (obj *bgpAttributesSrPolicyPolicyCandidateName) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Value is required + if obj.obj.Value == nil { + vObj.validationErrors = append(vObj.validationErrors, "Value is required field on interface BgpAttributesSrPolicyPolicyCandidateName") + } + if obj.obj.Value != nil { + + if len(*obj.obj.Value) > 500 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "None <= length of BgpAttributesSrPolicyPolicyCandidateName.Value <= 500 but Got %d", + len(*obj.obj.Value))) + } + + } + +} + +func (obj *bgpAttributesSrPolicyPolicyCandidateName) setDefault() { + +} diff --git a/gosnappi/bgp_attributes_sr_policy_policy_name.go b/gosnappi/bgp_attributes_sr_policy_policy_name.go new file mode 100644 index 00000000..63a0a3e2 --- /dev/null +++ b/gosnappi/bgp_attributes_sr_policy_policy_name.go @@ -0,0 +1,318 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSrPolicyPolicyName ***** +type bgpAttributesSrPolicyPolicyName struct { + validation + obj *otg.BgpAttributesSrPolicyPolicyName + marshaller marshalBgpAttributesSrPolicyPolicyName + unMarshaller unMarshalBgpAttributesSrPolicyPolicyName +} + +func NewBgpAttributesSrPolicyPolicyName() BgpAttributesSrPolicyPolicyName { + obj := bgpAttributesSrPolicyPolicyName{obj: &otg.BgpAttributesSrPolicyPolicyName{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSrPolicyPolicyName) msg() *otg.BgpAttributesSrPolicyPolicyName { + return obj.obj +} + +func (obj *bgpAttributesSrPolicyPolicyName) setMsg(msg *otg.BgpAttributesSrPolicyPolicyName) BgpAttributesSrPolicyPolicyName { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSrPolicyPolicyName struct { + obj *bgpAttributesSrPolicyPolicyName +} + +type marshalBgpAttributesSrPolicyPolicyName interface { + // ToProto marshals BgpAttributesSrPolicyPolicyName to protobuf object *otg.BgpAttributesSrPolicyPolicyName + ToProto() (*otg.BgpAttributesSrPolicyPolicyName, error) + // ToPbText marshals BgpAttributesSrPolicyPolicyName to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSrPolicyPolicyName to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSrPolicyPolicyName to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSrPolicyPolicyName struct { + obj *bgpAttributesSrPolicyPolicyName +} + +type unMarshalBgpAttributesSrPolicyPolicyName interface { + // FromProto unmarshals BgpAttributesSrPolicyPolicyName from protobuf object *otg.BgpAttributesSrPolicyPolicyName + FromProto(msg *otg.BgpAttributesSrPolicyPolicyName) (BgpAttributesSrPolicyPolicyName, error) + // FromPbText unmarshals BgpAttributesSrPolicyPolicyName from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSrPolicyPolicyName from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSrPolicyPolicyName from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSrPolicyPolicyName) Marshal() marshalBgpAttributesSrPolicyPolicyName { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSrPolicyPolicyName{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSrPolicyPolicyName) Unmarshal() unMarshalBgpAttributesSrPolicyPolicyName { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSrPolicyPolicyName{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSrPolicyPolicyName) ToProto() (*otg.BgpAttributesSrPolicyPolicyName, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPolicyName) FromProto(msg *otg.BgpAttributesSrPolicyPolicyName) (BgpAttributesSrPolicyPolicyName, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSrPolicyPolicyName) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPolicyName) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSrPolicyPolicyName) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPolicyName) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSrPolicyPolicyName) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPolicyName) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSrPolicyPolicyName) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSrPolicyPolicyName) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSrPolicyPolicyName) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSrPolicyPolicyName) Clone() (BgpAttributesSrPolicyPolicyName, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSrPolicyPolicyName() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesSrPolicyPolicyName is optional Policy Name sub-tlv (Type 130) which carries the symbolic name for the SR Policy for which the +// candidate path is being advertised for debugging. +// - It is defined in Section 2.4.8 of draft-ietf-idr-sr-policy-safi-02 . +type BgpAttributesSrPolicyPolicyName interface { + Validation + // msg marshals BgpAttributesSrPolicyPolicyName to protobuf object *otg.BgpAttributesSrPolicyPolicyName + // and doesn't set defaults + msg() *otg.BgpAttributesSrPolicyPolicyName + // setMsg unmarshals BgpAttributesSrPolicyPolicyName from protobuf object *otg.BgpAttributesSrPolicyPolicyName + // and doesn't set defaults + setMsg(*otg.BgpAttributesSrPolicyPolicyName) BgpAttributesSrPolicyPolicyName + // provides marshal interface + Marshal() marshalBgpAttributesSrPolicyPolicyName + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSrPolicyPolicyName + // validate validates BgpAttributesSrPolicyPolicyName + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSrPolicyPolicyName, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Value returns string, set in BgpAttributesSrPolicyPolicyName. + Value() string + // SetValue assigns string provided by user to BgpAttributesSrPolicyPolicyName + SetValue(value string) BgpAttributesSrPolicyPolicyName +} + +// Value of the symbolic policy name carried in the Policy Name sub-tlv. +// It is recommended that the size of the name is limited to 255 bytes. +// Value returns a string +func (obj *bgpAttributesSrPolicyPolicyName) Value() string { + + return *obj.obj.Value + +} + +// Value of the symbolic policy name carried in the Policy Name sub-tlv. +// It is recommended that the size of the name is limited to 255 bytes. +// SetValue sets the string value in the BgpAttributesSrPolicyPolicyName object +func (obj *bgpAttributesSrPolicyPolicyName) SetValue(value string) BgpAttributesSrPolicyPolicyName { + + obj.obj.Value = &value + return obj +} + +func (obj *bgpAttributesSrPolicyPolicyName) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Value is required + if obj.obj.Value == nil { + vObj.validationErrors = append(vObj.validationErrors, "Value is required field on interface BgpAttributesSrPolicyPolicyName") + } + if obj.obj.Value != nil { + + if len(*obj.obj.Value) > 500 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "None <= length of BgpAttributesSrPolicyPolicyName.Value <= 500 but Got %d", + len(*obj.obj.Value))) + } + + } + +} + +func (obj *bgpAttributesSrPolicyPolicyName) setDefault() { + +} diff --git a/gosnappi/bgp_attributes_sr_policy_preference.go b/gosnappi/bgp_attributes_sr_policy_preference.go new file mode 100644 index 00000000..92b6e8fe --- /dev/null +++ b/gosnappi/bgp_attributes_sr_policy_preference.go @@ -0,0 +1,311 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSrPolicyPreference ***** +type bgpAttributesSrPolicyPreference struct { + validation + obj *otg.BgpAttributesSrPolicyPreference + marshaller marshalBgpAttributesSrPolicyPreference + unMarshaller unMarshalBgpAttributesSrPolicyPreference +} + +func NewBgpAttributesSrPolicyPreference() BgpAttributesSrPolicyPreference { + obj := bgpAttributesSrPolicyPreference{obj: &otg.BgpAttributesSrPolicyPreference{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSrPolicyPreference) msg() *otg.BgpAttributesSrPolicyPreference { + return obj.obj +} + +func (obj *bgpAttributesSrPolicyPreference) setMsg(msg *otg.BgpAttributesSrPolicyPreference) BgpAttributesSrPolicyPreference { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSrPolicyPreference struct { + obj *bgpAttributesSrPolicyPreference +} + +type marshalBgpAttributesSrPolicyPreference interface { + // ToProto marshals BgpAttributesSrPolicyPreference to protobuf object *otg.BgpAttributesSrPolicyPreference + ToProto() (*otg.BgpAttributesSrPolicyPreference, error) + // ToPbText marshals BgpAttributesSrPolicyPreference to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSrPolicyPreference to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSrPolicyPreference to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSrPolicyPreference struct { + obj *bgpAttributesSrPolicyPreference +} + +type unMarshalBgpAttributesSrPolicyPreference interface { + // FromProto unmarshals BgpAttributesSrPolicyPreference from protobuf object *otg.BgpAttributesSrPolicyPreference + FromProto(msg *otg.BgpAttributesSrPolicyPreference) (BgpAttributesSrPolicyPreference, error) + // FromPbText unmarshals BgpAttributesSrPolicyPreference from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSrPolicyPreference from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSrPolicyPreference from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSrPolicyPreference) Marshal() marshalBgpAttributesSrPolicyPreference { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSrPolicyPreference{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSrPolicyPreference) Unmarshal() unMarshalBgpAttributesSrPolicyPreference { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSrPolicyPreference{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSrPolicyPreference) ToProto() (*otg.BgpAttributesSrPolicyPreference, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPreference) FromProto(msg *otg.BgpAttributesSrPolicyPreference) (BgpAttributesSrPolicyPreference, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSrPolicyPreference) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPreference) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSrPolicyPreference) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPreference) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSrPolicyPreference) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPreference) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSrPolicyPreference) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSrPolicyPreference) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSrPolicyPreference) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSrPolicyPreference) Clone() (BgpAttributesSrPolicyPreference, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSrPolicyPreference() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesSrPolicyPreference is optional Preference sub-tlv (Type 12) is used to select the best candidate path for an SR Policy. +// It is defined in Section 2.4.1 of draft-ietf-idr-sr-policy-safi-02 . + +type BgpAttributesSrPolicyPreference interface { + Validation + // msg marshals BgpAttributesSrPolicyPreference to protobuf object *otg.BgpAttributesSrPolicyPreference + // and doesn't set defaults + msg() *otg.BgpAttributesSrPolicyPreference + // setMsg unmarshals BgpAttributesSrPolicyPreference from protobuf object *otg.BgpAttributesSrPolicyPreference + // and doesn't set defaults + setMsg(*otg.BgpAttributesSrPolicyPreference) BgpAttributesSrPolicyPreference + // provides marshal interface + Marshal() marshalBgpAttributesSrPolicyPreference + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSrPolicyPreference + // validate validates BgpAttributesSrPolicyPreference + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSrPolicyPreference, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Value returns uint32, set in BgpAttributesSrPolicyPreference. + Value() uint32 + // SetValue assigns uint32 provided by user to BgpAttributesSrPolicyPreference + SetValue(value uint32) BgpAttributesSrPolicyPreference + // HasValue checks if Value has been set in BgpAttributesSrPolicyPreference + HasValue() bool +} + +// Value to be carried in the Preference sub-tlv. +// Value returns a uint32 +func (obj *bgpAttributesSrPolicyPreference) Value() uint32 { + + return *obj.obj.Value + +} + +// Value to be carried in the Preference sub-tlv. +// Value returns a uint32 +func (obj *bgpAttributesSrPolicyPreference) HasValue() bool { + return obj.obj.Value != nil +} + +// Value to be carried in the Preference sub-tlv. +// SetValue sets the uint32 value in the BgpAttributesSrPolicyPreference object +func (obj *bgpAttributesSrPolicyPreference) SetValue(value uint32) BgpAttributesSrPolicyPreference { + + obj.obj.Value = &value + return obj +} + +func (obj *bgpAttributesSrPolicyPreference) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpAttributesSrPolicyPreference) setDefault() { + if obj.obj.Value == nil { + obj.SetValue(0) + } + +} diff --git a/gosnappi/bgp_attributes_sr_policy_priority.go b/gosnappi/bgp_attributes_sr_policy_priority.go new file mode 100644 index 00000000..6678fd8d --- /dev/null +++ b/gosnappi/bgp_attributes_sr_policy_priority.go @@ -0,0 +1,320 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSrPolicyPriority ***** +type bgpAttributesSrPolicyPriority struct { + validation + obj *otg.BgpAttributesSrPolicyPriority + marshaller marshalBgpAttributesSrPolicyPriority + unMarshaller unMarshalBgpAttributesSrPolicyPriority +} + +func NewBgpAttributesSrPolicyPriority() BgpAttributesSrPolicyPriority { + obj := bgpAttributesSrPolicyPriority{obj: &otg.BgpAttributesSrPolicyPriority{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSrPolicyPriority) msg() *otg.BgpAttributesSrPolicyPriority { + return obj.obj +} + +func (obj *bgpAttributesSrPolicyPriority) setMsg(msg *otg.BgpAttributesSrPolicyPriority) BgpAttributesSrPolicyPriority { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSrPolicyPriority struct { + obj *bgpAttributesSrPolicyPriority +} + +type marshalBgpAttributesSrPolicyPriority interface { + // ToProto marshals BgpAttributesSrPolicyPriority to protobuf object *otg.BgpAttributesSrPolicyPriority + ToProto() (*otg.BgpAttributesSrPolicyPriority, error) + // ToPbText marshals BgpAttributesSrPolicyPriority to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSrPolicyPriority to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSrPolicyPriority to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSrPolicyPriority struct { + obj *bgpAttributesSrPolicyPriority +} + +type unMarshalBgpAttributesSrPolicyPriority interface { + // FromProto unmarshals BgpAttributesSrPolicyPriority from protobuf object *otg.BgpAttributesSrPolicyPriority + FromProto(msg *otg.BgpAttributesSrPolicyPriority) (BgpAttributesSrPolicyPriority, error) + // FromPbText unmarshals BgpAttributesSrPolicyPriority from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSrPolicyPriority from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSrPolicyPriority from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSrPolicyPriority) Marshal() marshalBgpAttributesSrPolicyPriority { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSrPolicyPriority{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSrPolicyPriority) Unmarshal() unMarshalBgpAttributesSrPolicyPriority { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSrPolicyPriority{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSrPolicyPriority) ToProto() (*otg.BgpAttributesSrPolicyPriority, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPriority) FromProto(msg *otg.BgpAttributesSrPolicyPriority) (BgpAttributesSrPolicyPriority, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSrPolicyPriority) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPriority) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSrPolicyPriority) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPriority) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSrPolicyPriority) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSrPolicyPriority) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSrPolicyPriority) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSrPolicyPriority) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSrPolicyPriority) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSrPolicyPriority) Clone() (BgpAttributesSrPolicyPriority, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSrPolicyPriority() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesSrPolicyPriority is optional Priority sub-tlv (Type 15) used to select the order in which policies should be re-computed. +// - It is defined in Section 2.4.6 of draft-ietf-idr-sr-policy-safi-02 . +type BgpAttributesSrPolicyPriority interface { + Validation + // msg marshals BgpAttributesSrPolicyPriority to protobuf object *otg.BgpAttributesSrPolicyPriority + // and doesn't set defaults + msg() *otg.BgpAttributesSrPolicyPriority + // setMsg unmarshals BgpAttributesSrPolicyPriority from protobuf object *otg.BgpAttributesSrPolicyPriority + // and doesn't set defaults + setMsg(*otg.BgpAttributesSrPolicyPriority) BgpAttributesSrPolicyPriority + // provides marshal interface + Marshal() marshalBgpAttributesSrPolicyPriority + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSrPolicyPriority + // validate validates BgpAttributesSrPolicyPriority + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSrPolicyPriority, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Value returns uint32, set in BgpAttributesSrPolicyPriority. + Value() uint32 + // SetValue assigns uint32 provided by user to BgpAttributesSrPolicyPriority + SetValue(value uint32) BgpAttributesSrPolicyPriority + // HasValue checks if Value has been set in BgpAttributesSrPolicyPriority + HasValue() bool +} + +// Value to be carried in the Priority sub-tlv. +// Value returns a uint32 +func (obj *bgpAttributesSrPolicyPriority) Value() uint32 { + + return *obj.obj.Value + +} + +// Value to be carried in the Priority sub-tlv. +// Value returns a uint32 +func (obj *bgpAttributesSrPolicyPriority) HasValue() bool { + return obj.obj.Value != nil +} + +// Value to be carried in the Priority sub-tlv. +// SetValue sets the uint32 value in the BgpAttributesSrPolicyPriority object +func (obj *bgpAttributesSrPolicyPriority) SetValue(value uint32) BgpAttributesSrPolicyPriority { + + obj.obj.Value = &value + return obj +} + +func (obj *bgpAttributesSrPolicyPriority) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpAttributesSrPolicyPriority.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + +} + +func (obj *bgpAttributesSrPolicyPriority) setDefault() { + if obj.obj.Value == nil { + obj.SetValue(0) + } + +} diff --git a/gosnappi/bgp_attributes_sr_policy_segment_list.go b/gosnappi/bgp_attributes_sr_policy_segment_list.go new file mode 100644 index 00000000..65fddced --- /dev/null +++ b/gosnappi/bgp_attributes_sr_policy_segment_list.go @@ -0,0 +1,437 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSrPolicySegmentList ***** +type bgpAttributesSrPolicySegmentList struct { + validation + obj *otg.BgpAttributesSrPolicySegmentList + marshaller marshalBgpAttributesSrPolicySegmentList + unMarshaller unMarshalBgpAttributesSrPolicySegmentList + weightHolder BgpAttributesSegmentRoutingPolicySegmentListWeight + segmentsHolder BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter +} + +func NewBgpAttributesSrPolicySegmentList() BgpAttributesSrPolicySegmentList { + obj := bgpAttributesSrPolicySegmentList{obj: &otg.BgpAttributesSrPolicySegmentList{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSrPolicySegmentList) msg() *otg.BgpAttributesSrPolicySegmentList { + return obj.obj +} + +func (obj *bgpAttributesSrPolicySegmentList) setMsg(msg *otg.BgpAttributesSrPolicySegmentList) BgpAttributesSrPolicySegmentList { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSrPolicySegmentList struct { + obj *bgpAttributesSrPolicySegmentList +} + +type marshalBgpAttributesSrPolicySegmentList interface { + // ToProto marshals BgpAttributesSrPolicySegmentList to protobuf object *otg.BgpAttributesSrPolicySegmentList + ToProto() (*otg.BgpAttributesSrPolicySegmentList, error) + // ToPbText marshals BgpAttributesSrPolicySegmentList to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSrPolicySegmentList to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSrPolicySegmentList to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSrPolicySegmentList struct { + obj *bgpAttributesSrPolicySegmentList +} + +type unMarshalBgpAttributesSrPolicySegmentList interface { + // FromProto unmarshals BgpAttributesSrPolicySegmentList from protobuf object *otg.BgpAttributesSrPolicySegmentList + FromProto(msg *otg.BgpAttributesSrPolicySegmentList) (BgpAttributesSrPolicySegmentList, error) + // FromPbText unmarshals BgpAttributesSrPolicySegmentList from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSrPolicySegmentList from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSrPolicySegmentList from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSrPolicySegmentList) Marshal() marshalBgpAttributesSrPolicySegmentList { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSrPolicySegmentList{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSrPolicySegmentList) Unmarshal() unMarshalBgpAttributesSrPolicySegmentList { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSrPolicySegmentList{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSrPolicySegmentList) ToProto() (*otg.BgpAttributesSrPolicySegmentList, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSrPolicySegmentList) FromProto(msg *otg.BgpAttributesSrPolicySegmentList) (BgpAttributesSrPolicySegmentList, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSrPolicySegmentList) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSrPolicySegmentList) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSrPolicySegmentList) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSrPolicySegmentList) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSrPolicySegmentList) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSrPolicySegmentList) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSrPolicySegmentList) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSrPolicySegmentList) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSrPolicySegmentList) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSrPolicySegmentList) Clone() (BgpAttributesSrPolicySegmentList, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSrPolicySegmentList() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSrPolicySegmentList) setNil() { + obj.weightHolder = nil + obj.segmentsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSrPolicySegmentList is one optional SEGMENT_LIST sub-tlv encoded with type of 128. +// One sub-tlv (Type 128) encodes a single explicit path towards the endpoint as described in +// section 5.1 of [RFC9256]. +// The Segment List sub-TLV includes the elements of the paths (i.e., segments) as well +// as an optional Weight sub-TLV. +type BgpAttributesSrPolicySegmentList interface { + Validation + // msg marshals BgpAttributesSrPolicySegmentList to protobuf object *otg.BgpAttributesSrPolicySegmentList + // and doesn't set defaults + msg() *otg.BgpAttributesSrPolicySegmentList + // setMsg unmarshals BgpAttributesSrPolicySegmentList from protobuf object *otg.BgpAttributesSrPolicySegmentList + // and doesn't set defaults + setMsg(*otg.BgpAttributesSrPolicySegmentList) BgpAttributesSrPolicySegmentList + // provides marshal interface + Marshal() marshalBgpAttributesSrPolicySegmentList + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSrPolicySegmentList + // validate validates BgpAttributesSrPolicySegmentList + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSrPolicySegmentList, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Weight returns BgpAttributesSegmentRoutingPolicySegmentListWeight, set in BgpAttributesSrPolicySegmentList. + // BgpAttributesSegmentRoutingPolicySegmentListWeight is the optional Weight sub-TLV (Type 9) specifies the weight associated with a given segment list. The weight is used for weighted multipath. + Weight() BgpAttributesSegmentRoutingPolicySegmentListWeight + // SetWeight assigns BgpAttributesSegmentRoutingPolicySegmentListWeight provided by user to BgpAttributesSrPolicySegmentList. + // BgpAttributesSegmentRoutingPolicySegmentListWeight is the optional Weight sub-TLV (Type 9) specifies the weight associated with a given segment list. The weight is used for weighted multipath. + SetWeight(value BgpAttributesSegmentRoutingPolicySegmentListWeight) BgpAttributesSrPolicySegmentList + // HasWeight checks if Weight has been set in BgpAttributesSrPolicySegmentList + HasWeight() bool + // Segments returns BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIterIter, set in BgpAttributesSrPolicySegmentList + Segments() BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter + setNil() +} + +// description is TBD +// Weight returns a BgpAttributesSegmentRoutingPolicySegmentListWeight +func (obj *bgpAttributesSrPolicySegmentList) Weight() BgpAttributesSegmentRoutingPolicySegmentListWeight { + if obj.obj.Weight == nil { + obj.obj.Weight = NewBgpAttributesSegmentRoutingPolicySegmentListWeight().msg() + } + if obj.weightHolder == nil { + obj.weightHolder = &bgpAttributesSegmentRoutingPolicySegmentListWeight{obj: obj.obj.Weight} + } + return obj.weightHolder +} + +// description is TBD +// Weight returns a BgpAttributesSegmentRoutingPolicySegmentListWeight +func (obj *bgpAttributesSrPolicySegmentList) HasWeight() bool { + return obj.obj.Weight != nil +} + +// description is TBD +// SetWeight sets the BgpAttributesSegmentRoutingPolicySegmentListWeight value in the BgpAttributesSrPolicySegmentList object +func (obj *bgpAttributesSrPolicySegmentList) SetWeight(value BgpAttributesSegmentRoutingPolicySegmentListWeight) BgpAttributesSrPolicySegmentList { + + obj.weightHolder = nil + obj.obj.Weight = value.msg() + + return obj +} + +// description is TBD +// Segments returns a []BgpAttributesSegmentRoutingPolicySegmentListSegment +func (obj *bgpAttributesSrPolicySegmentList) Segments() BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter { + if len(obj.obj.Segments) == 0 { + obj.obj.Segments = []*otg.BgpAttributesSegmentRoutingPolicySegmentListSegment{} + } + if obj.segmentsHolder == nil { + obj.segmentsHolder = newBgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter(&obj.obj.Segments).setMsg(obj) + } + return obj.segmentsHolder +} + +type bgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter struct { + obj *bgpAttributesSrPolicySegmentList + bgpAttributesSegmentRoutingPolicySegmentListSegmentSlice []BgpAttributesSegmentRoutingPolicySegmentListSegment + fieldPtr *[]*otg.BgpAttributesSegmentRoutingPolicySegmentListSegment +} + +func newBgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter(ptr *[]*otg.BgpAttributesSegmentRoutingPolicySegmentListSegment) BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter { + return &bgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter{fieldPtr: ptr} +} + +type BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter interface { + setMsg(*bgpAttributesSrPolicySegmentList) BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter + Items() []BgpAttributesSegmentRoutingPolicySegmentListSegment + Add() BgpAttributesSegmentRoutingPolicySegmentListSegment + Append(items ...BgpAttributesSegmentRoutingPolicySegmentListSegment) BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter + Set(index int, newObj BgpAttributesSegmentRoutingPolicySegmentListSegment) BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter + Clear() BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter + clearHolderSlice() BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter + appendHolderSlice(item BgpAttributesSegmentRoutingPolicySegmentListSegment) BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter +} + +func (obj *bgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter) setMsg(msg *bgpAttributesSrPolicySegmentList) BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpAttributesSegmentRoutingPolicySegmentListSegment{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter) Items() []BgpAttributesSegmentRoutingPolicySegmentListSegment { + return obj.bgpAttributesSegmentRoutingPolicySegmentListSegmentSlice +} + +func (obj *bgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter) Add() BgpAttributesSegmentRoutingPolicySegmentListSegment { + newObj := &otg.BgpAttributesSegmentRoutingPolicySegmentListSegment{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpAttributesSegmentRoutingPolicySegmentListSegment{obj: newObj} + newLibObj.setDefault() + obj.bgpAttributesSegmentRoutingPolicySegmentListSegmentSlice = append(obj.bgpAttributesSegmentRoutingPolicySegmentListSegmentSlice, newLibObj) + return newLibObj +} + +func (obj *bgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter) Append(items ...BgpAttributesSegmentRoutingPolicySegmentListSegment) BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpAttributesSegmentRoutingPolicySegmentListSegmentSlice = append(obj.bgpAttributesSegmentRoutingPolicySegmentListSegmentSlice, item) + } + return obj +} + +func (obj *bgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter) Set(index int, newObj BgpAttributesSegmentRoutingPolicySegmentListSegment) BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpAttributesSegmentRoutingPolicySegmentListSegmentSlice[index] = newObj + return obj +} +func (obj *bgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter) Clear() BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpAttributesSegmentRoutingPolicySegmentListSegment{} + obj.bgpAttributesSegmentRoutingPolicySegmentListSegmentSlice = []BgpAttributesSegmentRoutingPolicySegmentListSegment{} + } + return obj +} +func (obj *bgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter) clearHolderSlice() BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter { + if len(obj.bgpAttributesSegmentRoutingPolicySegmentListSegmentSlice) > 0 { + obj.bgpAttributesSegmentRoutingPolicySegmentListSegmentSlice = []BgpAttributesSegmentRoutingPolicySegmentListSegment{} + } + return obj +} +func (obj *bgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter) appendHolderSlice(item BgpAttributesSegmentRoutingPolicySegmentListSegment) BgpAttributesSrPolicySegmentListBgpAttributesSegmentRoutingPolicySegmentListSegmentIter { + obj.bgpAttributesSegmentRoutingPolicySegmentListSegmentSlice = append(obj.bgpAttributesSegmentRoutingPolicySegmentListSegmentSlice, item) + return obj +} + +func (obj *bgpAttributesSrPolicySegmentList) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Weight != nil { + + obj.Weight().validateObj(vObj, set_default) + } + + if len(obj.obj.Segments) != 0 { + + if set_default { + obj.Segments().clearHolderSlice() + for _, item := range obj.obj.Segments { + obj.Segments().appendHolderSlice(&bgpAttributesSegmentRoutingPolicySegmentListSegment{obj: item}) + } + } + for _, item := range obj.Segments().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpAttributesSrPolicySegmentList) setDefault() { + +} diff --git a/gosnappi/bgp_attributes_srv6_bsid.go b/gosnappi/bgp_attributes_srv6_bsid.go new file mode 100644 index 00000000..36b6c74d --- /dev/null +++ b/gosnappi/bgp_attributes_srv6_bsid.go @@ -0,0 +1,474 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesSrv6Bsid ***** +type bgpAttributesSrv6Bsid struct { + validation + obj *otg.BgpAttributesSrv6Bsid + marshaller marshalBgpAttributesSrv6Bsid + unMarshaller unMarshalBgpAttributesSrv6Bsid + srv6EndpointBehaviorHolder BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +} + +func NewBgpAttributesSrv6Bsid() BgpAttributesSrv6Bsid { + obj := bgpAttributesSrv6Bsid{obj: &otg.BgpAttributesSrv6Bsid{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesSrv6Bsid) msg() *otg.BgpAttributesSrv6Bsid { + return obj.obj +} + +func (obj *bgpAttributesSrv6Bsid) setMsg(msg *otg.BgpAttributesSrv6Bsid) BgpAttributesSrv6Bsid { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesSrv6Bsid struct { + obj *bgpAttributesSrv6Bsid +} + +type marshalBgpAttributesSrv6Bsid interface { + // ToProto marshals BgpAttributesSrv6Bsid to protobuf object *otg.BgpAttributesSrv6Bsid + ToProto() (*otg.BgpAttributesSrv6Bsid, error) + // ToPbText marshals BgpAttributesSrv6Bsid to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesSrv6Bsid to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesSrv6Bsid to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesSrv6Bsid struct { + obj *bgpAttributesSrv6Bsid +} + +type unMarshalBgpAttributesSrv6Bsid interface { + // FromProto unmarshals BgpAttributesSrv6Bsid from protobuf object *otg.BgpAttributesSrv6Bsid + FromProto(msg *otg.BgpAttributesSrv6Bsid) (BgpAttributesSrv6Bsid, error) + // FromPbText unmarshals BgpAttributesSrv6Bsid from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesSrv6Bsid from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesSrv6Bsid from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesSrv6Bsid) Marshal() marshalBgpAttributesSrv6Bsid { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesSrv6Bsid{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesSrv6Bsid) Unmarshal() unMarshalBgpAttributesSrv6Bsid { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesSrv6Bsid{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesSrv6Bsid) ToProto() (*otg.BgpAttributesSrv6Bsid, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesSrv6Bsid) FromProto(msg *otg.BgpAttributesSrv6Bsid) (BgpAttributesSrv6Bsid, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesSrv6Bsid) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesSrv6Bsid) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesSrv6Bsid) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSrv6Bsid) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesSrv6Bsid) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesSrv6Bsid) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesSrv6Bsid) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesSrv6Bsid) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesSrv6Bsid) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesSrv6Bsid) Clone() (BgpAttributesSrv6Bsid, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesSrv6Bsid() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesSrv6Bsid) setNil() { + obj.srv6EndpointBehaviorHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesSrv6Bsid is the SRv6 Binding SID sub-TLV is an optional sub-TLV of type 20 that is used to signal the SRv6 Binding SID +// related information of an SR Policy candidate path. +// - More than one SRv6 Binding SID sub-TLVs MAY be signaled in the same SR Policy encoding to indicate one or +// more SRv6 SIDs, each with potentially different SRv6 Endpoint Behaviors to be instantiated. +// - The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section 2.4.3 . +type BgpAttributesSrv6Bsid interface { + Validation + // msg marshals BgpAttributesSrv6Bsid to protobuf object *otg.BgpAttributesSrv6Bsid + // and doesn't set defaults + msg() *otg.BgpAttributesSrv6Bsid + // setMsg unmarshals BgpAttributesSrv6Bsid from protobuf object *otg.BgpAttributesSrv6Bsid + // and doesn't set defaults + setMsg(*otg.BgpAttributesSrv6Bsid) BgpAttributesSrv6Bsid + // provides marshal interface + Marshal() marshalBgpAttributesSrv6Bsid + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesSrv6Bsid + // validate validates BgpAttributesSrv6Bsid + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesSrv6Bsid, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // FlagSpecifiedBsidOnly returns bool, set in BgpAttributesSrv6Bsid. + FlagSpecifiedBsidOnly() bool + // SetFlagSpecifiedBsidOnly assigns bool provided by user to BgpAttributesSrv6Bsid + SetFlagSpecifiedBsidOnly(value bool) BgpAttributesSrv6Bsid + // HasFlagSpecifiedBsidOnly checks if FlagSpecifiedBsidOnly has been set in BgpAttributesSrv6Bsid + HasFlagSpecifiedBsidOnly() bool + // FlagDropUponInvalid returns bool, set in BgpAttributesSrv6Bsid. + FlagDropUponInvalid() bool + // SetFlagDropUponInvalid assigns bool provided by user to BgpAttributesSrv6Bsid + SetFlagDropUponInvalid(value bool) BgpAttributesSrv6Bsid + // HasFlagDropUponInvalid checks if FlagDropUponInvalid has been set in BgpAttributesSrv6Bsid + HasFlagDropUponInvalid() bool + // FlagSrv6EndpointBehavior returns bool, set in BgpAttributesSrv6Bsid. + FlagSrv6EndpointBehavior() bool + // SetFlagSrv6EndpointBehavior assigns bool provided by user to BgpAttributesSrv6Bsid + SetFlagSrv6EndpointBehavior(value bool) BgpAttributesSrv6Bsid + // HasFlagSrv6EndpointBehavior checks if FlagSrv6EndpointBehavior has been set in BgpAttributesSrv6Bsid + HasFlagSrv6EndpointBehavior() bool + // Ipv6Addr returns string, set in BgpAttributesSrv6Bsid. + Ipv6Addr() string + // SetIpv6Addr assigns string provided by user to BgpAttributesSrv6Bsid + SetIpv6Addr(value string) BgpAttributesSrv6Bsid + // HasIpv6Addr checks if Ipv6Addr has been set in BgpAttributesSrv6Bsid + HasIpv6Addr() bool + // Srv6EndpointBehavior returns BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure, set in BgpAttributesSrv6Bsid. + // BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure is configuration for optional SRv6 Endpoint Behavior and SID Structure. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. - This is specified in draft-ietf-idr-sr-policy-safi-02 Section 2.4.4.2.4 + Srv6EndpointBehavior() BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + // SetSrv6EndpointBehavior assigns BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure provided by user to BgpAttributesSrv6Bsid. + // BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure is configuration for optional SRv6 Endpoint Behavior and SID Structure. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. - This is specified in draft-ietf-idr-sr-policy-safi-02 Section 2.4.4.2.4 + SetSrv6EndpointBehavior(value BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) BgpAttributesSrv6Bsid + // HasSrv6EndpointBehavior checks if Srv6EndpointBehavior has been set in BgpAttributesSrv6Bsid + HasSrv6EndpointBehavior() bool + setNil() +} + +// S-Flag: This flag encodes the "Specified-BSID-only" behavior. It's usage is +// described in section 6.2.3 in [RFC9256]. +// FlagSpecifiedBsidOnly returns a bool +func (obj *bgpAttributesSrv6Bsid) FlagSpecifiedBsidOnly() bool { + + return *obj.obj.FlagSpecifiedBsidOnly + +} + +// S-Flag: This flag encodes the "Specified-BSID-only" behavior. It's usage is +// described in section 6.2.3 in [RFC9256]. +// FlagSpecifiedBsidOnly returns a bool +func (obj *bgpAttributesSrv6Bsid) HasFlagSpecifiedBsidOnly() bool { + return obj.obj.FlagSpecifiedBsidOnly != nil +} + +// S-Flag: This flag encodes the "Specified-BSID-only" behavior. It's usage is +// described in section 6.2.3 in [RFC9256]. +// SetFlagSpecifiedBsidOnly sets the bool value in the BgpAttributesSrv6Bsid object +func (obj *bgpAttributesSrv6Bsid) SetFlagSpecifiedBsidOnly(value bool) BgpAttributesSrv6Bsid { + + obj.obj.FlagSpecifiedBsidOnly = &value + return obj +} + +// I-Flag: This flag encodes the "Drop Upon Invalid" behavior. +// It's usage is described in section 8.2 in [RFC9256]. +// FlagDropUponInvalid returns a bool +func (obj *bgpAttributesSrv6Bsid) FlagDropUponInvalid() bool { + + return *obj.obj.FlagDropUponInvalid + +} + +// I-Flag: This flag encodes the "Drop Upon Invalid" behavior. +// It's usage is described in section 8.2 in [RFC9256]. +// FlagDropUponInvalid returns a bool +func (obj *bgpAttributesSrv6Bsid) HasFlagDropUponInvalid() bool { + return obj.obj.FlagDropUponInvalid != nil +} + +// I-Flag: This flag encodes the "Drop Upon Invalid" behavior. +// It's usage is described in section 8.2 in [RFC9256]. +// SetFlagDropUponInvalid sets the bool value in the BgpAttributesSrv6Bsid object +func (obj *bgpAttributesSrv6Bsid) SetFlagDropUponInvalid(value bool) BgpAttributesSrv6Bsid { + + obj.obj.FlagDropUponInvalid = &value + return obj +} + +// B-Flag: This flag, when set, indicates the presence of the SRv6 Endpoint Behavior +// and SID Structure encoding specified in Section 2.4.4.2.4 of draft-ietf-idr-sr-policy-safi-02. +// FlagSrv6EndpointBehavior returns a bool +func (obj *bgpAttributesSrv6Bsid) FlagSrv6EndpointBehavior() bool { + + return *obj.obj.FlagSrv6EndpointBehavior + +} + +// B-Flag: This flag, when set, indicates the presence of the SRv6 Endpoint Behavior +// and SID Structure encoding specified in Section 2.4.4.2.4 of draft-ietf-idr-sr-policy-safi-02. +// FlagSrv6EndpointBehavior returns a bool +func (obj *bgpAttributesSrv6Bsid) HasFlagSrv6EndpointBehavior() bool { + return obj.obj.FlagSrv6EndpointBehavior != nil +} + +// B-Flag: This flag, when set, indicates the presence of the SRv6 Endpoint Behavior +// and SID Structure encoding specified in Section 2.4.4.2.4 of draft-ietf-idr-sr-policy-safi-02. +// SetFlagSrv6EndpointBehavior sets the bool value in the BgpAttributesSrv6Bsid object +func (obj *bgpAttributesSrv6Bsid) SetFlagSrv6EndpointBehavior(value bool) BgpAttributesSrv6Bsid { + + obj.obj.FlagSrv6EndpointBehavior = &value + return obj +} + +// IPv6 address denoting the SRv6 SID. +// Ipv6Addr returns a string +func (obj *bgpAttributesSrv6Bsid) Ipv6Addr() string { + + return *obj.obj.Ipv6Addr + +} + +// IPv6 address denoting the SRv6 SID. +// Ipv6Addr returns a string +func (obj *bgpAttributesSrv6Bsid) HasIpv6Addr() bool { + return obj.obj.Ipv6Addr != nil +} + +// IPv6 address denoting the SRv6 SID. +// SetIpv6Addr sets the string value in the BgpAttributesSrv6Bsid object +func (obj *bgpAttributesSrv6Bsid) SetIpv6Addr(value string) BgpAttributesSrv6Bsid { + + obj.obj.Ipv6Addr = &value + return obj +} + +// description is TBD +// Srv6EndpointBehavior returns a BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +func (obj *bgpAttributesSrv6Bsid) Srv6EndpointBehavior() BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { + if obj.obj.Srv6EndpointBehavior == nil { + obj.obj.Srv6EndpointBehavior = NewBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure().msg() + } + if obj.srv6EndpointBehaviorHolder == nil { + obj.srv6EndpointBehaviorHolder = &bgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure{obj: obj.obj.Srv6EndpointBehavior} + } + return obj.srv6EndpointBehaviorHolder +} + +// description is TBD +// Srv6EndpointBehavior returns a BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +func (obj *bgpAttributesSrv6Bsid) HasSrv6EndpointBehavior() bool { + return obj.obj.Srv6EndpointBehavior != nil +} + +// description is TBD +// SetSrv6EndpointBehavior sets the BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure value in the BgpAttributesSrv6Bsid object +func (obj *bgpAttributesSrv6Bsid) SetSrv6EndpointBehavior(value BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) BgpAttributesSrv6Bsid { + + obj.srv6EndpointBehaviorHolder = nil + obj.obj.Srv6EndpointBehavior = value.msg() + + return obj +} + +func (obj *bgpAttributesSrv6Bsid) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv6Addr != nil { + + err := obj.validateIpv6(obj.Ipv6Addr()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpAttributesSrv6Bsid.Ipv6Addr")) + } + + } + + if obj.obj.Srv6EndpointBehavior != nil { + + obj.Srv6EndpointBehavior().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesSrv6Bsid) setDefault() { + if obj.obj.FlagSpecifiedBsidOnly == nil { + obj.SetFlagSpecifiedBsidOnly(false) + } + if obj.obj.FlagDropUponInvalid == nil { + obj.SetFlagDropUponInvalid(false) + } + if obj.obj.FlagSrv6EndpointBehavior == nil { + obj.SetFlagSrv6EndpointBehavior(false) + } + if obj.obj.Ipv6Addr == nil { + obj.SetIpv6Addr("0::0") + } + +} diff --git a/gosnappi/bgp_attributes_tunnel_encapsulation.go b/gosnappi/bgp_attributes_tunnel_encapsulation.go new file mode 100644 index 00000000..9d27732f --- /dev/null +++ b/gosnappi/bgp_attributes_tunnel_encapsulation.go @@ -0,0 +1,399 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesTunnelEncapsulation ***** +type bgpAttributesTunnelEncapsulation struct { + validation + obj *otg.BgpAttributesTunnelEncapsulation + marshaller marshalBgpAttributesTunnelEncapsulation + unMarshaller unMarshalBgpAttributesTunnelEncapsulation + srPolicyHolder BgpAttributesSegmentRoutingPolicy +} + +func NewBgpAttributesTunnelEncapsulation() BgpAttributesTunnelEncapsulation { + obj := bgpAttributesTunnelEncapsulation{obj: &otg.BgpAttributesTunnelEncapsulation{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesTunnelEncapsulation) msg() *otg.BgpAttributesTunnelEncapsulation { + return obj.obj +} + +func (obj *bgpAttributesTunnelEncapsulation) setMsg(msg *otg.BgpAttributesTunnelEncapsulation) BgpAttributesTunnelEncapsulation { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesTunnelEncapsulation struct { + obj *bgpAttributesTunnelEncapsulation +} + +type marshalBgpAttributesTunnelEncapsulation interface { + // ToProto marshals BgpAttributesTunnelEncapsulation to protobuf object *otg.BgpAttributesTunnelEncapsulation + ToProto() (*otg.BgpAttributesTunnelEncapsulation, error) + // ToPbText marshals BgpAttributesTunnelEncapsulation to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesTunnelEncapsulation to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesTunnelEncapsulation to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesTunnelEncapsulation struct { + obj *bgpAttributesTunnelEncapsulation +} + +type unMarshalBgpAttributesTunnelEncapsulation interface { + // FromProto unmarshals BgpAttributesTunnelEncapsulation from protobuf object *otg.BgpAttributesTunnelEncapsulation + FromProto(msg *otg.BgpAttributesTunnelEncapsulation) (BgpAttributesTunnelEncapsulation, error) + // FromPbText unmarshals BgpAttributesTunnelEncapsulation from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesTunnelEncapsulation from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesTunnelEncapsulation from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesTunnelEncapsulation) Marshal() marshalBgpAttributesTunnelEncapsulation { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesTunnelEncapsulation{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesTunnelEncapsulation) Unmarshal() unMarshalBgpAttributesTunnelEncapsulation { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesTunnelEncapsulation{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesTunnelEncapsulation) ToProto() (*otg.BgpAttributesTunnelEncapsulation, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesTunnelEncapsulation) FromProto(msg *otg.BgpAttributesTunnelEncapsulation) (BgpAttributesTunnelEncapsulation, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesTunnelEncapsulation) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesTunnelEncapsulation) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesTunnelEncapsulation) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesTunnelEncapsulation) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesTunnelEncapsulation) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesTunnelEncapsulation) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesTunnelEncapsulation) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesTunnelEncapsulation) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesTunnelEncapsulation) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesTunnelEncapsulation) Clone() (BgpAttributesTunnelEncapsulation, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesTunnelEncapsulation() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpAttributesTunnelEncapsulation) setNil() { + obj.srPolicyHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpAttributesTunnelEncapsulation is the TUNNEL_ENCAPSULATION attribute is used by a BGP speaker to inform other BGP speakers how to encapsulate packets that need to be sent to it. +// It is defined in RFC9012 and is assigned a Type code of 23. +type BgpAttributesTunnelEncapsulation interface { + Validation + // msg marshals BgpAttributesTunnelEncapsulation to protobuf object *otg.BgpAttributesTunnelEncapsulation + // and doesn't set defaults + msg() *otg.BgpAttributesTunnelEncapsulation + // setMsg unmarshals BgpAttributesTunnelEncapsulation from protobuf object *otg.BgpAttributesTunnelEncapsulation + // and doesn't set defaults + setMsg(*otg.BgpAttributesTunnelEncapsulation) BgpAttributesTunnelEncapsulation + // provides marshal interface + Marshal() marshalBgpAttributesTunnelEncapsulation + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesTunnelEncapsulation + // validate validates BgpAttributesTunnelEncapsulation + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesTunnelEncapsulation, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpAttributesTunnelEncapsulationChoiceEnum, set in BgpAttributesTunnelEncapsulation + Choice() BgpAttributesTunnelEncapsulationChoiceEnum + // setChoice assigns BgpAttributesTunnelEncapsulationChoiceEnum provided by user to BgpAttributesTunnelEncapsulation + setChoice(value BgpAttributesTunnelEncapsulationChoiceEnum) BgpAttributesTunnelEncapsulation + // HasChoice checks if Choice has been set in BgpAttributesTunnelEncapsulation + HasChoice() bool + // SrPolicy returns BgpAttributesSegmentRoutingPolicy, set in BgpAttributesTunnelEncapsulation. + // BgpAttributesSegmentRoutingPolicy is optional Segment Routing Policy information as defined in draft-ietf-idr-sr-policy-safi-02. + // This information is carried in TUNNEL_ENCAPSULATION attribute with type set to SR Policy (15). + SrPolicy() BgpAttributesSegmentRoutingPolicy + // SetSrPolicy assigns BgpAttributesSegmentRoutingPolicy provided by user to BgpAttributesTunnelEncapsulation. + // BgpAttributesSegmentRoutingPolicy is optional Segment Routing Policy information as defined in draft-ietf-idr-sr-policy-safi-02. + // This information is carried in TUNNEL_ENCAPSULATION attribute with type set to SR Policy (15). + SetSrPolicy(value BgpAttributesSegmentRoutingPolicy) BgpAttributesTunnelEncapsulation + // HasSrPolicy checks if SrPolicy has been set in BgpAttributesTunnelEncapsulation + HasSrPolicy() bool + setNil() +} + +type BgpAttributesTunnelEncapsulationChoiceEnum string + +// Enum of Choice on BgpAttributesTunnelEncapsulation +var BgpAttributesTunnelEncapsulationChoice = struct { + SR_POLICY BgpAttributesTunnelEncapsulationChoiceEnum +}{ + SR_POLICY: BgpAttributesTunnelEncapsulationChoiceEnum("sr_policy"), +} + +func (obj *bgpAttributesTunnelEncapsulation) Choice() BgpAttributesTunnelEncapsulationChoiceEnum { + return BgpAttributesTunnelEncapsulationChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// Identifies a type of tunnel. The field contains values from the IANA registry "BGP Tunnel Encapsulation Attribute Tunnel Types". +// Choice returns a string +func (obj *bgpAttributesTunnelEncapsulation) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpAttributesTunnelEncapsulation) setChoice(value BgpAttributesTunnelEncapsulationChoiceEnum) BgpAttributesTunnelEncapsulation { + intValue, ok := otg.BgpAttributesTunnelEncapsulation_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAttributesTunnelEncapsulationChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpAttributesTunnelEncapsulation_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.SrPolicy = nil + obj.srPolicyHolder = nil + + if value == BgpAttributesTunnelEncapsulationChoice.SR_POLICY { + obj.obj.SrPolicy = NewBgpAttributesSegmentRoutingPolicy().msg() + } + + return obj +} + +// description is TBD +// SrPolicy returns a BgpAttributesSegmentRoutingPolicy +func (obj *bgpAttributesTunnelEncapsulation) SrPolicy() BgpAttributesSegmentRoutingPolicy { + if obj.obj.SrPolicy == nil { + obj.setChoice(BgpAttributesTunnelEncapsulationChoice.SR_POLICY) + } + if obj.srPolicyHolder == nil { + obj.srPolicyHolder = &bgpAttributesSegmentRoutingPolicy{obj: obj.obj.SrPolicy} + } + return obj.srPolicyHolder +} + +// description is TBD +// SrPolicy returns a BgpAttributesSegmentRoutingPolicy +func (obj *bgpAttributesTunnelEncapsulation) HasSrPolicy() bool { + return obj.obj.SrPolicy != nil +} + +// description is TBD +// SetSrPolicy sets the BgpAttributesSegmentRoutingPolicy value in the BgpAttributesTunnelEncapsulation object +func (obj *bgpAttributesTunnelEncapsulation) SetSrPolicy(value BgpAttributesSegmentRoutingPolicy) BgpAttributesTunnelEncapsulation { + obj.setChoice(BgpAttributesTunnelEncapsulationChoice.SR_POLICY) + obj.srPolicyHolder = nil + obj.obj.SrPolicy = value.msg() + + return obj +} + +func (obj *bgpAttributesTunnelEncapsulation) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.SrPolicy != nil { + + obj.SrPolicy().validateObj(vObj, set_default) + } + +} + +func (obj *bgpAttributesTunnelEncapsulation) setDefault() { + var choices_set int = 0 + var choice BgpAttributesTunnelEncapsulationChoiceEnum + + if obj.obj.SrPolicy != nil { + choices_set += 1 + choice = BgpAttributesTunnelEncapsulationChoice.SR_POLICY + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(BgpAttributesTunnelEncapsulationChoice.SR_POLICY) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpAttributesTunnelEncapsulation") + } + } else { + intVal := otg.BgpAttributesTunnelEncapsulation_Choice_Enum_value[string(choice)] + enumValue := otg.BgpAttributesTunnelEncapsulation_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_attributes_two_byte_as_path_segment.go b/gosnappi/bgp_attributes_two_byte_as_path_segment.go new file mode 100644 index 00000000..524b9f33 --- /dev/null +++ b/gosnappi/bgp_attributes_two_byte_as_path_segment.go @@ -0,0 +1,374 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpAttributesTwoByteAsPathSegment ***** +type bgpAttributesTwoByteAsPathSegment struct { + validation + obj *otg.BgpAttributesTwoByteAsPathSegment + marshaller marshalBgpAttributesTwoByteAsPathSegment + unMarshaller unMarshalBgpAttributesTwoByteAsPathSegment +} + +func NewBgpAttributesTwoByteAsPathSegment() BgpAttributesTwoByteAsPathSegment { + obj := bgpAttributesTwoByteAsPathSegment{obj: &otg.BgpAttributesTwoByteAsPathSegment{}} + obj.setDefault() + return &obj +} + +func (obj *bgpAttributesTwoByteAsPathSegment) msg() *otg.BgpAttributesTwoByteAsPathSegment { + return obj.obj +} + +func (obj *bgpAttributesTwoByteAsPathSegment) setMsg(msg *otg.BgpAttributesTwoByteAsPathSegment) BgpAttributesTwoByteAsPathSegment { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpAttributesTwoByteAsPathSegment struct { + obj *bgpAttributesTwoByteAsPathSegment +} + +type marshalBgpAttributesTwoByteAsPathSegment interface { + // ToProto marshals BgpAttributesTwoByteAsPathSegment to protobuf object *otg.BgpAttributesTwoByteAsPathSegment + ToProto() (*otg.BgpAttributesTwoByteAsPathSegment, error) + // ToPbText marshals BgpAttributesTwoByteAsPathSegment to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpAttributesTwoByteAsPathSegment to YAML text + ToYaml() (string, error) + // ToJson marshals BgpAttributesTwoByteAsPathSegment to JSON text + ToJson() (string, error) +} + +type unMarshalbgpAttributesTwoByteAsPathSegment struct { + obj *bgpAttributesTwoByteAsPathSegment +} + +type unMarshalBgpAttributesTwoByteAsPathSegment interface { + // FromProto unmarshals BgpAttributesTwoByteAsPathSegment from protobuf object *otg.BgpAttributesTwoByteAsPathSegment + FromProto(msg *otg.BgpAttributesTwoByteAsPathSegment) (BgpAttributesTwoByteAsPathSegment, error) + // FromPbText unmarshals BgpAttributesTwoByteAsPathSegment from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpAttributesTwoByteAsPathSegment from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpAttributesTwoByteAsPathSegment from JSON text + FromJson(value string) error +} + +func (obj *bgpAttributesTwoByteAsPathSegment) Marshal() marshalBgpAttributesTwoByteAsPathSegment { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpAttributesTwoByteAsPathSegment{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpAttributesTwoByteAsPathSegment) Unmarshal() unMarshalBgpAttributesTwoByteAsPathSegment { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpAttributesTwoByteAsPathSegment{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpAttributesTwoByteAsPathSegment) ToProto() (*otg.BgpAttributesTwoByteAsPathSegment, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpAttributesTwoByteAsPathSegment) FromProto(msg *otg.BgpAttributesTwoByteAsPathSegment) (BgpAttributesTwoByteAsPathSegment, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpAttributesTwoByteAsPathSegment) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpAttributesTwoByteAsPathSegment) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpAttributesTwoByteAsPathSegment) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesTwoByteAsPathSegment) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpAttributesTwoByteAsPathSegment) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpAttributesTwoByteAsPathSegment) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpAttributesTwoByteAsPathSegment) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpAttributesTwoByteAsPathSegment) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpAttributesTwoByteAsPathSegment) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpAttributesTwoByteAsPathSegment) Clone() (BgpAttributesTwoByteAsPathSegment, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpAttributesTwoByteAsPathSegment() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpAttributesTwoByteAsPathSegment is configuration for a single BGP AS path segment containing 2 byte AS numbers. +type BgpAttributesTwoByteAsPathSegment interface { + Validation + // msg marshals BgpAttributesTwoByteAsPathSegment to protobuf object *otg.BgpAttributesTwoByteAsPathSegment + // and doesn't set defaults + msg() *otg.BgpAttributesTwoByteAsPathSegment + // setMsg unmarshals BgpAttributesTwoByteAsPathSegment from protobuf object *otg.BgpAttributesTwoByteAsPathSegment + // and doesn't set defaults + setMsg(*otg.BgpAttributesTwoByteAsPathSegment) BgpAttributesTwoByteAsPathSegment + // provides marshal interface + Marshal() marshalBgpAttributesTwoByteAsPathSegment + // provides unmarshal interface + Unmarshal() unMarshalBgpAttributesTwoByteAsPathSegment + // validate validates BgpAttributesTwoByteAsPathSegment + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpAttributesTwoByteAsPathSegment, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns BgpAttributesTwoByteAsPathSegmentTypeEnum, set in BgpAttributesTwoByteAsPathSegment + Type() BgpAttributesTwoByteAsPathSegmentTypeEnum + // SetType assigns BgpAttributesTwoByteAsPathSegmentTypeEnum provided by user to BgpAttributesTwoByteAsPathSegment + SetType(value BgpAttributesTwoByteAsPathSegmentTypeEnum) BgpAttributesTwoByteAsPathSegment + // HasType checks if Type has been set in BgpAttributesTwoByteAsPathSegment + HasType() bool + // AsNumbers returns []uint32, set in BgpAttributesTwoByteAsPathSegment. + AsNumbers() []uint32 + // SetAsNumbers assigns []uint32 provided by user to BgpAttributesTwoByteAsPathSegment + SetAsNumbers(value []uint32) BgpAttributesTwoByteAsPathSegment +} + +type BgpAttributesTwoByteAsPathSegmentTypeEnum string + +// Enum of Type on BgpAttributesTwoByteAsPathSegment +var BgpAttributesTwoByteAsPathSegmentType = struct { + AS_SEQ BgpAttributesTwoByteAsPathSegmentTypeEnum + AS_SET BgpAttributesTwoByteAsPathSegmentTypeEnum + AS_CONFED_SEQ BgpAttributesTwoByteAsPathSegmentTypeEnum + AS_CONFED_SET BgpAttributesTwoByteAsPathSegmentTypeEnum +}{ + AS_SEQ: BgpAttributesTwoByteAsPathSegmentTypeEnum("as_seq"), + AS_SET: BgpAttributesTwoByteAsPathSegmentTypeEnum("as_set"), + AS_CONFED_SEQ: BgpAttributesTwoByteAsPathSegmentTypeEnum("as_confed_seq"), + AS_CONFED_SET: BgpAttributesTwoByteAsPathSegmentTypeEnum("as_confed_set"), +} + +func (obj *bgpAttributesTwoByteAsPathSegment) Type() BgpAttributesTwoByteAsPathSegmentTypeEnum { + return BgpAttributesTwoByteAsPathSegmentTypeEnum(obj.obj.Type.Enum().String()) +} + +// AS sequence is the most common type of AS_PATH, it contains the list +// of ASNs starting with the most recent ASN being added read from left +// to right. +// The other three AS_PATH types are used for Confederations +// - AS_SET is the type of AS_PATH attribute that summarizes routes using +// using the aggregate-address command, allowing AS_PATHs to be summarized +// in the update as well. +// - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most +// recent ASN to be added reading left to right +// - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent +// in BGP Updates. +// Type returns a string +func (obj *bgpAttributesTwoByteAsPathSegment) HasType() bool { + return obj.obj.Type != nil +} + +func (obj *bgpAttributesTwoByteAsPathSegment) SetType(value BgpAttributesTwoByteAsPathSegmentTypeEnum) BgpAttributesTwoByteAsPathSegment { + intValue, ok := otg.BgpAttributesTwoByteAsPathSegment_Type_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpAttributesTwoByteAsPathSegmentTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpAttributesTwoByteAsPathSegment_Type_Enum(intValue) + obj.obj.Type = &enumValue + + return obj +} + +// The 2 byte AS numbers in this AS path segment. +// AsNumbers returns a []uint32 +func (obj *bgpAttributesTwoByteAsPathSegment) AsNumbers() []uint32 { + if obj.obj.AsNumbers == nil { + obj.obj.AsNumbers = make([]uint32, 0) + } + return obj.obj.AsNumbers +} + +// The 2 byte AS numbers in this AS path segment. +// SetAsNumbers sets the []uint32 value in the BgpAttributesTwoByteAsPathSegment object +func (obj *bgpAttributesTwoByteAsPathSegment) SetAsNumbers(value []uint32) BgpAttributesTwoByteAsPathSegment { + + if obj.obj.AsNumbers == nil { + obj.obj.AsNumbers = make([]uint32, 0) + } + obj.obj.AsNumbers = value + + return obj +} + +func (obj *bgpAttributesTwoByteAsPathSegment) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.AsNumbers != nil { + + for _, item := range obj.obj.AsNumbers { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= BgpAttributesTwoByteAsPathSegment.AsNumbers <= 65535 but Got %d", item)) + } + + } + + } + +} + +func (obj *bgpAttributesTwoByteAsPathSegment) setDefault() { + if obj.obj.Type == nil { + obj.SetType(BgpAttributesTwoByteAsPathSegmentType.AS_SEQ) + + } + +} diff --git a/gosnappi/bgp_c_mac_ip_range.go b/gosnappi/bgp_c_mac_ip_range.go new file mode 100644 index 00000000..b2cc2c04 --- /dev/null +++ b/gosnappi/bgp_c_mac_ip_range.go @@ -0,0 +1,851 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpCMacIpRange ***** +type bgpCMacIpRange struct { + validation + obj *otg.BgpCMacIpRange + marshaller marshalBgpCMacIpRange + unMarshaller unMarshalBgpCMacIpRange + macAddressesHolder MACRouteAddress + ipv4AddressesHolder V4RouteAddress + ipv6AddressesHolder V6RouteAddress + advancedHolder BgpRouteAdvanced + communitiesHolder BgpCMacIpRangeBgpCommunityIter + extCommunitiesHolder BgpCMacIpRangeBgpExtCommunityIter + asPathHolder BgpAsPath +} + +func NewBgpCMacIpRange() BgpCMacIpRange { + obj := bgpCMacIpRange{obj: &otg.BgpCMacIpRange{}} + obj.setDefault() + return &obj +} + +func (obj *bgpCMacIpRange) msg() *otg.BgpCMacIpRange { + return obj.obj +} + +func (obj *bgpCMacIpRange) setMsg(msg *otg.BgpCMacIpRange) BgpCMacIpRange { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpCMacIpRange struct { + obj *bgpCMacIpRange +} + +type marshalBgpCMacIpRange interface { + // ToProto marshals BgpCMacIpRange to protobuf object *otg.BgpCMacIpRange + ToProto() (*otg.BgpCMacIpRange, error) + // ToPbText marshals BgpCMacIpRange to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpCMacIpRange to YAML text + ToYaml() (string, error) + // ToJson marshals BgpCMacIpRange to JSON text + ToJson() (string, error) +} + +type unMarshalbgpCMacIpRange struct { + obj *bgpCMacIpRange +} + +type unMarshalBgpCMacIpRange interface { + // FromProto unmarshals BgpCMacIpRange from protobuf object *otg.BgpCMacIpRange + FromProto(msg *otg.BgpCMacIpRange) (BgpCMacIpRange, error) + // FromPbText unmarshals BgpCMacIpRange from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpCMacIpRange from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpCMacIpRange from JSON text + FromJson(value string) error +} + +func (obj *bgpCMacIpRange) Marshal() marshalBgpCMacIpRange { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpCMacIpRange{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpCMacIpRange) Unmarshal() unMarshalBgpCMacIpRange { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpCMacIpRange{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpCMacIpRange) ToProto() (*otg.BgpCMacIpRange, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpCMacIpRange) FromProto(msg *otg.BgpCMacIpRange) (BgpCMacIpRange, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpCMacIpRange) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpCMacIpRange) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpCMacIpRange) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpCMacIpRange) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpCMacIpRange) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpCMacIpRange) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpCMacIpRange) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpCMacIpRange) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpCMacIpRange) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpCMacIpRange) Clone() (BgpCMacIpRange, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpCMacIpRange() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpCMacIpRange) setNil() { + obj.macAddressesHolder = nil + obj.ipv4AddressesHolder = nil + obj.ipv6AddressesHolder = nil + obj.advancedHolder = nil + obj.communitiesHolder = nil + obj.extCommunitiesHolder = nil + obj.asPathHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpCMacIpRange is configuration for MAC/IP Ranges per Broadcast Domain. +// +// Advertises following route - +// +// Type 2 - MAC/IP Advertisement Route. +type BgpCMacIpRange interface { + Validation + // msg marshals BgpCMacIpRange to protobuf object *otg.BgpCMacIpRange + // and doesn't set defaults + msg() *otg.BgpCMacIpRange + // setMsg unmarshals BgpCMacIpRange from protobuf object *otg.BgpCMacIpRange + // and doesn't set defaults + setMsg(*otg.BgpCMacIpRange) BgpCMacIpRange + // provides marshal interface + Marshal() marshalBgpCMacIpRange + // provides unmarshal interface + Unmarshal() unMarshalBgpCMacIpRange + // validate validates BgpCMacIpRange + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpCMacIpRange, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // MacAddresses returns MACRouteAddress, set in BgpCMacIpRange. + // MACRouteAddress is a container for MAC route addresses. + MacAddresses() MACRouteAddress + // SetMacAddresses assigns MACRouteAddress provided by user to BgpCMacIpRange. + // MACRouteAddress is a container for MAC route addresses. + SetMacAddresses(value MACRouteAddress) BgpCMacIpRange + // HasMacAddresses checks if MacAddresses has been set in BgpCMacIpRange + HasMacAddresses() bool + // L2Vni returns uint32, set in BgpCMacIpRange. + L2Vni() uint32 + // SetL2Vni assigns uint32 provided by user to BgpCMacIpRange + SetL2Vni(value uint32) BgpCMacIpRange + // HasL2Vni checks if L2Vni has been set in BgpCMacIpRange + HasL2Vni() bool + // Ipv4Addresses returns V4RouteAddress, set in BgpCMacIpRange. + // V4RouteAddress is a container for IPv4 route addresses. + Ipv4Addresses() V4RouteAddress + // SetIpv4Addresses assigns V4RouteAddress provided by user to BgpCMacIpRange. + // V4RouteAddress is a container for IPv4 route addresses. + SetIpv4Addresses(value V4RouteAddress) BgpCMacIpRange + // HasIpv4Addresses checks if Ipv4Addresses has been set in BgpCMacIpRange + HasIpv4Addresses() bool + // Ipv6Addresses returns V6RouteAddress, set in BgpCMacIpRange. + // V6RouteAddress is a container for IPv6 route addresses. + Ipv6Addresses() V6RouteAddress + // SetIpv6Addresses assigns V6RouteAddress provided by user to BgpCMacIpRange. + // V6RouteAddress is a container for IPv6 route addresses. + SetIpv6Addresses(value V6RouteAddress) BgpCMacIpRange + // HasIpv6Addresses checks if Ipv6Addresses has been set in BgpCMacIpRange + HasIpv6Addresses() bool + // L3Vni returns uint32, set in BgpCMacIpRange. + L3Vni() uint32 + // SetL3Vni assigns uint32 provided by user to BgpCMacIpRange + SetL3Vni(value uint32) BgpCMacIpRange + // HasL3Vni checks if L3Vni has been set in BgpCMacIpRange + HasL3Vni() bool + // IncludeDefaultGateway returns bool, set in BgpCMacIpRange. + IncludeDefaultGateway() bool + // SetIncludeDefaultGateway assigns bool provided by user to BgpCMacIpRange + SetIncludeDefaultGateway(value bool) BgpCMacIpRange + // HasIncludeDefaultGateway checks if IncludeDefaultGateway has been set in BgpCMacIpRange + HasIncludeDefaultGateway() bool + // Advanced returns BgpRouteAdvanced, set in BgpCMacIpRange. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + Advanced() BgpRouteAdvanced + // SetAdvanced assigns BgpRouteAdvanced provided by user to BgpCMacIpRange. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + SetAdvanced(value BgpRouteAdvanced) BgpCMacIpRange + // HasAdvanced checks if Advanced has been set in BgpCMacIpRange + HasAdvanced() bool + // Communities returns BgpCMacIpRangeBgpCommunityIterIter, set in BgpCMacIpRange + Communities() BgpCMacIpRangeBgpCommunityIter + // ExtCommunities returns BgpCMacIpRangeBgpExtCommunityIterIter, set in BgpCMacIpRange + ExtCommunities() BgpCMacIpRangeBgpExtCommunityIter + // AsPath returns BgpAsPath, set in BgpCMacIpRange. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + AsPath() BgpAsPath + // SetAsPath assigns BgpAsPath provided by user to BgpCMacIpRange. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + SetAsPath(value BgpAsPath) BgpCMacIpRange + // HasAsPath checks if AsPath has been set in BgpCMacIpRange + HasAsPath() bool + // Name returns string, set in BgpCMacIpRange. + Name() string + // SetName assigns string provided by user to BgpCMacIpRange + SetName(value string) BgpCMacIpRange + setNil() +} + +// Host MAC address range per Broadcast Domain. +// MacAddresses returns a MACRouteAddress +func (obj *bgpCMacIpRange) MacAddresses() MACRouteAddress { + if obj.obj.MacAddresses == nil { + obj.obj.MacAddresses = NewMACRouteAddress().msg() + } + if obj.macAddressesHolder == nil { + obj.macAddressesHolder = &mACRouteAddress{obj: obj.obj.MacAddresses} + } + return obj.macAddressesHolder +} + +// Host MAC address range per Broadcast Domain. +// MacAddresses returns a MACRouteAddress +func (obj *bgpCMacIpRange) HasMacAddresses() bool { + return obj.obj.MacAddresses != nil +} + +// Host MAC address range per Broadcast Domain. +// SetMacAddresses sets the MACRouteAddress value in the BgpCMacIpRange object +func (obj *bgpCMacIpRange) SetMacAddresses(value MACRouteAddress) BgpCMacIpRange { + + obj.macAddressesHolder = nil + obj.obj.MacAddresses = value.msg() + + return obj +} + +// Layer 2 Virtual Network Identifier (L2VNI) to be advertised with MAC/IP Advertisement Route (Type 2) +// L2Vni returns a uint32 +func (obj *bgpCMacIpRange) L2Vni() uint32 { + + return *obj.obj.L2Vni + +} + +// Layer 2 Virtual Network Identifier (L2VNI) to be advertised with MAC/IP Advertisement Route (Type 2) +// L2Vni returns a uint32 +func (obj *bgpCMacIpRange) HasL2Vni() bool { + return obj.obj.L2Vni != nil +} + +// Layer 2 Virtual Network Identifier (L2VNI) to be advertised with MAC/IP Advertisement Route (Type 2) +// SetL2Vni sets the uint32 value in the BgpCMacIpRange object +func (obj *bgpCMacIpRange) SetL2Vni(value uint32) BgpCMacIpRange { + + obj.obj.L2Vni = &value + return obj +} + +// Host IPv4 address range per Broadcast Domain. +// Ipv4Addresses returns a V4RouteAddress +func (obj *bgpCMacIpRange) Ipv4Addresses() V4RouteAddress { + if obj.obj.Ipv4Addresses == nil { + obj.obj.Ipv4Addresses = NewV4RouteAddress().msg() + } + if obj.ipv4AddressesHolder == nil { + obj.ipv4AddressesHolder = &v4RouteAddress{obj: obj.obj.Ipv4Addresses} + } + return obj.ipv4AddressesHolder +} + +// Host IPv4 address range per Broadcast Domain. +// Ipv4Addresses returns a V4RouteAddress +func (obj *bgpCMacIpRange) HasIpv4Addresses() bool { + return obj.obj.Ipv4Addresses != nil +} + +// Host IPv4 address range per Broadcast Domain. +// SetIpv4Addresses sets the V4RouteAddress value in the BgpCMacIpRange object +func (obj *bgpCMacIpRange) SetIpv4Addresses(value V4RouteAddress) BgpCMacIpRange { + + obj.ipv4AddressesHolder = nil + obj.obj.Ipv4Addresses = value.msg() + + return obj +} + +// Host IPv6 address range per Broadcast Domain. +// Ipv6Addresses returns a V6RouteAddress +func (obj *bgpCMacIpRange) Ipv6Addresses() V6RouteAddress { + if obj.obj.Ipv6Addresses == nil { + obj.obj.Ipv6Addresses = NewV6RouteAddress().msg() + } + if obj.ipv6AddressesHolder == nil { + obj.ipv6AddressesHolder = &v6RouteAddress{obj: obj.obj.Ipv6Addresses} + } + return obj.ipv6AddressesHolder +} + +// Host IPv6 address range per Broadcast Domain. +// Ipv6Addresses returns a V6RouteAddress +func (obj *bgpCMacIpRange) HasIpv6Addresses() bool { + return obj.obj.Ipv6Addresses != nil +} + +// Host IPv6 address range per Broadcast Domain. +// SetIpv6Addresses sets the V6RouteAddress value in the BgpCMacIpRange object +func (obj *bgpCMacIpRange) SetIpv6Addresses(value V6RouteAddress) BgpCMacIpRange { + + obj.ipv6AddressesHolder = nil + obj.obj.Ipv6Addresses = value.msg() + + return obj +} + +// Layer 3 Virtual Network Identifier (L3VNI) to be advertised with MAC/IP Advertisement Route (Type 2). +// L3Vni returns a uint32 +func (obj *bgpCMacIpRange) L3Vni() uint32 { + + return *obj.obj.L3Vni + +} + +// Layer 3 Virtual Network Identifier (L3VNI) to be advertised with MAC/IP Advertisement Route (Type 2). +// L3Vni returns a uint32 +func (obj *bgpCMacIpRange) HasL3Vni() bool { + return obj.obj.L3Vni != nil +} + +// Layer 3 Virtual Network Identifier (L3VNI) to be advertised with MAC/IP Advertisement Route (Type 2). +// SetL3Vni sets the uint32 value in the BgpCMacIpRange object +func (obj *bgpCMacIpRange) SetL3Vni(value uint32) BgpCMacIpRange { + + obj.obj.L3Vni = &value + return obj +} + +// Include default Gateway Extended Community in MAC/IP Advertisement Route (Type 2). +// IncludeDefaultGateway returns a bool +func (obj *bgpCMacIpRange) IncludeDefaultGateway() bool { + + return *obj.obj.IncludeDefaultGateway + +} + +// Include default Gateway Extended Community in MAC/IP Advertisement Route (Type 2). +// IncludeDefaultGateway returns a bool +func (obj *bgpCMacIpRange) HasIncludeDefaultGateway() bool { + return obj.obj.IncludeDefaultGateway != nil +} + +// Include default Gateway Extended Community in MAC/IP Advertisement Route (Type 2). +// SetIncludeDefaultGateway sets the bool value in the BgpCMacIpRange object +func (obj *bgpCMacIpRange) SetIncludeDefaultGateway(value bool) BgpCMacIpRange { + + obj.obj.IncludeDefaultGateway = &value + return obj +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpCMacIpRange) Advanced() BgpRouteAdvanced { + if obj.obj.Advanced == nil { + obj.obj.Advanced = NewBgpRouteAdvanced().msg() + } + if obj.advancedHolder == nil { + obj.advancedHolder = &bgpRouteAdvanced{obj: obj.obj.Advanced} + } + return obj.advancedHolder +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpCMacIpRange) HasAdvanced() bool { + return obj.obj.Advanced != nil +} + +// description is TBD +// SetAdvanced sets the BgpRouteAdvanced value in the BgpCMacIpRange object +func (obj *bgpCMacIpRange) SetAdvanced(value BgpRouteAdvanced) BgpCMacIpRange { + + obj.advancedHolder = nil + obj.obj.Advanced = value.msg() + + return obj +} + +// Optional community settings. +// Communities returns a []BgpCommunity +func (obj *bgpCMacIpRange) Communities() BgpCMacIpRangeBgpCommunityIter { + if len(obj.obj.Communities) == 0 { + obj.obj.Communities = []*otg.BgpCommunity{} + } + if obj.communitiesHolder == nil { + obj.communitiesHolder = newBgpCMacIpRangeBgpCommunityIter(&obj.obj.Communities).setMsg(obj) + } + return obj.communitiesHolder +} + +type bgpCMacIpRangeBgpCommunityIter struct { + obj *bgpCMacIpRange + bgpCommunitySlice []BgpCommunity + fieldPtr *[]*otg.BgpCommunity +} + +func newBgpCMacIpRangeBgpCommunityIter(ptr *[]*otg.BgpCommunity) BgpCMacIpRangeBgpCommunityIter { + return &bgpCMacIpRangeBgpCommunityIter{fieldPtr: ptr} +} + +type BgpCMacIpRangeBgpCommunityIter interface { + setMsg(*bgpCMacIpRange) BgpCMacIpRangeBgpCommunityIter + Items() []BgpCommunity + Add() BgpCommunity + Append(items ...BgpCommunity) BgpCMacIpRangeBgpCommunityIter + Set(index int, newObj BgpCommunity) BgpCMacIpRangeBgpCommunityIter + Clear() BgpCMacIpRangeBgpCommunityIter + clearHolderSlice() BgpCMacIpRangeBgpCommunityIter + appendHolderSlice(item BgpCommunity) BgpCMacIpRangeBgpCommunityIter +} + +func (obj *bgpCMacIpRangeBgpCommunityIter) setMsg(msg *bgpCMacIpRange) BgpCMacIpRangeBgpCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpCMacIpRangeBgpCommunityIter) Items() []BgpCommunity { + return obj.bgpCommunitySlice +} + +func (obj *bgpCMacIpRangeBgpCommunityIter) Add() BgpCommunity { + newObj := &otg.BgpCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpCMacIpRangeBgpCommunityIter) Append(items ...BgpCommunity) BgpCMacIpRangeBgpCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + } + return obj +} + +func (obj *bgpCMacIpRangeBgpCommunityIter) Set(index int, newObj BgpCommunity) BgpCMacIpRangeBgpCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpCommunitySlice[index] = newObj + return obj +} +func (obj *bgpCMacIpRangeBgpCommunityIter) Clear() BgpCMacIpRangeBgpCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpCommunity{} + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpCMacIpRangeBgpCommunityIter) clearHolderSlice() BgpCMacIpRangeBgpCommunityIter { + if len(obj.bgpCommunitySlice) > 0 { + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpCMacIpRangeBgpCommunityIter) appendHolderSlice(item BgpCommunity) BgpCMacIpRangeBgpCommunityIter { + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + return obj +} + +// Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. +// ExtCommunities returns a []BgpExtCommunity +func (obj *bgpCMacIpRange) ExtCommunities() BgpCMacIpRangeBgpExtCommunityIter { + if len(obj.obj.ExtCommunities) == 0 { + obj.obj.ExtCommunities = []*otg.BgpExtCommunity{} + } + if obj.extCommunitiesHolder == nil { + obj.extCommunitiesHolder = newBgpCMacIpRangeBgpExtCommunityIter(&obj.obj.ExtCommunities).setMsg(obj) + } + return obj.extCommunitiesHolder +} + +type bgpCMacIpRangeBgpExtCommunityIter struct { + obj *bgpCMacIpRange + bgpExtCommunitySlice []BgpExtCommunity + fieldPtr *[]*otg.BgpExtCommunity +} + +func newBgpCMacIpRangeBgpExtCommunityIter(ptr *[]*otg.BgpExtCommunity) BgpCMacIpRangeBgpExtCommunityIter { + return &bgpCMacIpRangeBgpExtCommunityIter{fieldPtr: ptr} +} + +type BgpCMacIpRangeBgpExtCommunityIter interface { + setMsg(*bgpCMacIpRange) BgpCMacIpRangeBgpExtCommunityIter + Items() []BgpExtCommunity + Add() BgpExtCommunity + Append(items ...BgpExtCommunity) BgpCMacIpRangeBgpExtCommunityIter + Set(index int, newObj BgpExtCommunity) BgpCMacIpRangeBgpExtCommunityIter + Clear() BgpCMacIpRangeBgpExtCommunityIter + clearHolderSlice() BgpCMacIpRangeBgpExtCommunityIter + appendHolderSlice(item BgpExtCommunity) BgpCMacIpRangeBgpExtCommunityIter +} + +func (obj *bgpCMacIpRangeBgpExtCommunityIter) setMsg(msg *bgpCMacIpRange) BgpCMacIpRangeBgpExtCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpExtCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpCMacIpRangeBgpExtCommunityIter) Items() []BgpExtCommunity { + return obj.bgpExtCommunitySlice +} + +func (obj *bgpCMacIpRangeBgpExtCommunityIter) Add() BgpExtCommunity { + newObj := &otg.BgpExtCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpExtCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpCMacIpRangeBgpExtCommunityIter) Append(items ...BgpExtCommunity) BgpCMacIpRangeBgpExtCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + } + return obj +} + +func (obj *bgpCMacIpRangeBgpExtCommunityIter) Set(index int, newObj BgpExtCommunity) BgpCMacIpRangeBgpExtCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpExtCommunitySlice[index] = newObj + return obj +} +func (obj *bgpCMacIpRangeBgpExtCommunityIter) Clear() BgpCMacIpRangeBgpExtCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpExtCommunity{} + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpCMacIpRangeBgpExtCommunityIter) clearHolderSlice() BgpCMacIpRangeBgpExtCommunityIter { + if len(obj.bgpExtCommunitySlice) > 0 { + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpCMacIpRangeBgpExtCommunityIter) appendHolderSlice(item BgpExtCommunity) BgpCMacIpRangeBgpExtCommunityIter { + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + return obj +} + +// Optional AS PATH settings. +// AsPath returns a BgpAsPath +func (obj *bgpCMacIpRange) AsPath() BgpAsPath { + if obj.obj.AsPath == nil { + obj.obj.AsPath = NewBgpAsPath().msg() + } + if obj.asPathHolder == nil { + obj.asPathHolder = &bgpAsPath{obj: obj.obj.AsPath} + } + return obj.asPathHolder +} + +// Optional AS PATH settings. +// AsPath returns a BgpAsPath +func (obj *bgpCMacIpRange) HasAsPath() bool { + return obj.obj.AsPath != nil +} + +// Optional AS PATH settings. +// SetAsPath sets the BgpAsPath value in the BgpCMacIpRange object +func (obj *bgpCMacIpRange) SetAsPath(value BgpAsPath) BgpCMacIpRange { + + obj.asPathHolder = nil + obj.obj.AsPath = value.msg() + + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *bgpCMacIpRange) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the BgpCMacIpRange object +func (obj *bgpCMacIpRange) SetName(value string) BgpCMacIpRange { + + obj.obj.Name = &value + return obj +} + +func (obj *bgpCMacIpRange) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.MacAddresses != nil { + + obj.MacAddresses().validateObj(vObj, set_default) + } + + if obj.obj.L2Vni != nil { + + if *obj.obj.L2Vni > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpCMacIpRange.L2Vni <= 16777215 but Got %d", *obj.obj.L2Vni)) + } + + } + + if obj.obj.Ipv4Addresses != nil { + + obj.Ipv4Addresses().validateObj(vObj, set_default) + } + + if obj.obj.Ipv6Addresses != nil { + + obj.Ipv6Addresses().validateObj(vObj, set_default) + } + + if obj.obj.L3Vni != nil { + + if *obj.obj.L3Vni > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpCMacIpRange.L3Vni <= 16777215 but Got %d", *obj.obj.L3Vni)) + } + + } + + if obj.obj.Advanced != nil { + + obj.Advanced().validateObj(vObj, set_default) + } + + if len(obj.obj.Communities) != 0 { + + if set_default { + obj.Communities().clearHolderSlice() + for _, item := range obj.obj.Communities { + obj.Communities().appendHolderSlice(&bgpCommunity{obj: item}) + } + } + for _, item := range obj.Communities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.ExtCommunities) != 0 { + + if set_default { + obj.ExtCommunities().clearHolderSlice() + for _, item := range obj.obj.ExtCommunities { + obj.ExtCommunities().appendHolderSlice(&bgpExtCommunity{obj: item}) + } + } + for _, item := range obj.ExtCommunities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.AsPath != nil { + + obj.AsPath().validateObj(vObj, set_default) + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface BgpCMacIpRange") + } +} + +func (obj *bgpCMacIpRange) setDefault() { + if obj.obj.L2Vni == nil { + obj.SetL2Vni(0) + } + if obj.obj.L3Vni == nil { + obj.SetL3Vni(0) + } + if obj.obj.IncludeDefaultGateway == nil { + obj.SetIncludeDefaultGateway(false) + } + +} diff --git a/gosnappi/bgp_capability.go b/gosnappi/bgp_capability.go new file mode 100644 index 00000000..f8b1e4dd --- /dev/null +++ b/gosnappi/bgp_capability.go @@ -0,0 +1,1065 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpCapability ***** +type bgpCapability struct { + validation + obj *otg.BgpCapability + marshaller marshalBgpCapability + unMarshaller unMarshalBgpCapability +} + +func NewBgpCapability() BgpCapability { + obj := bgpCapability{obj: &otg.BgpCapability{}} + obj.setDefault() + return &obj +} + +func (obj *bgpCapability) msg() *otg.BgpCapability { + return obj.obj +} + +func (obj *bgpCapability) setMsg(msg *otg.BgpCapability) BgpCapability { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpCapability struct { + obj *bgpCapability +} + +type marshalBgpCapability interface { + // ToProto marshals BgpCapability to protobuf object *otg.BgpCapability + ToProto() (*otg.BgpCapability, error) + // ToPbText marshals BgpCapability to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpCapability to YAML text + ToYaml() (string, error) + // ToJson marshals BgpCapability to JSON text + ToJson() (string, error) +} + +type unMarshalbgpCapability struct { + obj *bgpCapability +} + +type unMarshalBgpCapability interface { + // FromProto unmarshals BgpCapability from protobuf object *otg.BgpCapability + FromProto(msg *otg.BgpCapability) (BgpCapability, error) + // FromPbText unmarshals BgpCapability from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpCapability from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpCapability from JSON text + FromJson(value string) error +} + +func (obj *bgpCapability) Marshal() marshalBgpCapability { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpCapability{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpCapability) Unmarshal() unMarshalBgpCapability { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpCapability{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpCapability) ToProto() (*otg.BgpCapability, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpCapability) FromProto(msg *otg.BgpCapability) (BgpCapability, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpCapability) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpCapability) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpCapability) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpCapability) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpCapability) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpCapability) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpCapability) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpCapability) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpCapability) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpCapability) Clone() (BgpCapability, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpCapability() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpCapability is configuration for BGP capability settings. +type BgpCapability interface { + Validation + // msg marshals BgpCapability to protobuf object *otg.BgpCapability + // and doesn't set defaults + msg() *otg.BgpCapability + // setMsg unmarshals BgpCapability from protobuf object *otg.BgpCapability + // and doesn't set defaults + setMsg(*otg.BgpCapability) BgpCapability + // provides marshal interface + Marshal() marshalBgpCapability + // provides unmarshal interface + Unmarshal() unMarshalBgpCapability + // validate validates BgpCapability + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpCapability, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv4Unicast returns bool, set in BgpCapability. + Ipv4Unicast() bool + // SetIpv4Unicast assigns bool provided by user to BgpCapability + SetIpv4Unicast(value bool) BgpCapability + // HasIpv4Unicast checks if Ipv4Unicast has been set in BgpCapability + HasIpv4Unicast() bool + // Ipv4Multicast returns bool, set in BgpCapability. + Ipv4Multicast() bool + // SetIpv4Multicast assigns bool provided by user to BgpCapability + SetIpv4Multicast(value bool) BgpCapability + // HasIpv4Multicast checks if Ipv4Multicast has been set in BgpCapability + HasIpv4Multicast() bool + // Ipv6Unicast returns bool, set in BgpCapability. + Ipv6Unicast() bool + // SetIpv6Unicast assigns bool provided by user to BgpCapability + SetIpv6Unicast(value bool) BgpCapability + // HasIpv6Unicast checks if Ipv6Unicast has been set in BgpCapability + HasIpv6Unicast() bool + // Ipv6Multicast returns bool, set in BgpCapability. + Ipv6Multicast() bool + // SetIpv6Multicast assigns bool provided by user to BgpCapability + SetIpv6Multicast(value bool) BgpCapability + // HasIpv6Multicast checks if Ipv6Multicast has been set in BgpCapability + HasIpv6Multicast() bool + // Vpls returns bool, set in BgpCapability. + Vpls() bool + // SetVpls assigns bool provided by user to BgpCapability + SetVpls(value bool) BgpCapability + // HasVpls checks if Vpls has been set in BgpCapability + HasVpls() bool + // RouteRefresh returns bool, set in BgpCapability. + RouteRefresh() bool + // SetRouteRefresh assigns bool provided by user to BgpCapability + SetRouteRefresh(value bool) BgpCapability + // HasRouteRefresh checks if RouteRefresh has been set in BgpCapability + HasRouteRefresh() bool + // RouteConstraint returns bool, set in BgpCapability. + RouteConstraint() bool + // SetRouteConstraint assigns bool provided by user to BgpCapability + SetRouteConstraint(value bool) BgpCapability + // HasRouteConstraint checks if RouteConstraint has been set in BgpCapability + HasRouteConstraint() bool + // LinkStateNonVpn returns bool, set in BgpCapability. + LinkStateNonVpn() bool + // SetLinkStateNonVpn assigns bool provided by user to BgpCapability + SetLinkStateNonVpn(value bool) BgpCapability + // HasLinkStateNonVpn checks if LinkStateNonVpn has been set in BgpCapability + HasLinkStateNonVpn() bool + // LinkStateVpn returns bool, set in BgpCapability. + LinkStateVpn() bool + // SetLinkStateVpn assigns bool provided by user to BgpCapability + SetLinkStateVpn(value bool) BgpCapability + // HasLinkStateVpn checks if LinkStateVpn has been set in BgpCapability + HasLinkStateVpn() bool + // Evpn returns bool, set in BgpCapability. + Evpn() bool + // SetEvpn assigns bool provided by user to BgpCapability + SetEvpn(value bool) BgpCapability + // HasEvpn checks if Evpn has been set in BgpCapability + HasEvpn() bool + // ExtendedNextHopEncoding returns bool, set in BgpCapability. + ExtendedNextHopEncoding() bool + // SetExtendedNextHopEncoding assigns bool provided by user to BgpCapability + SetExtendedNextHopEncoding(value bool) BgpCapability + // HasExtendedNextHopEncoding checks if ExtendedNextHopEncoding has been set in BgpCapability + HasExtendedNextHopEncoding() bool + // Ipv4MulticastVpn returns bool, set in BgpCapability. + Ipv4MulticastVpn() bool + // SetIpv4MulticastVpn assigns bool provided by user to BgpCapability + SetIpv4MulticastVpn(value bool) BgpCapability + // HasIpv4MulticastVpn checks if Ipv4MulticastVpn has been set in BgpCapability + HasIpv4MulticastVpn() bool + // Ipv4MplsVpn returns bool, set in BgpCapability. + Ipv4MplsVpn() bool + // SetIpv4MplsVpn assigns bool provided by user to BgpCapability + SetIpv4MplsVpn(value bool) BgpCapability + // HasIpv4MplsVpn checks if Ipv4MplsVpn has been set in BgpCapability + HasIpv4MplsVpn() bool + // Ipv4Mdt returns bool, set in BgpCapability. + Ipv4Mdt() bool + // SetIpv4Mdt assigns bool provided by user to BgpCapability + SetIpv4Mdt(value bool) BgpCapability + // HasIpv4Mdt checks if Ipv4Mdt has been set in BgpCapability + HasIpv4Mdt() bool + // Ipv4MulticastMplsVpn returns bool, set in BgpCapability. + Ipv4MulticastMplsVpn() bool + // SetIpv4MulticastMplsVpn assigns bool provided by user to BgpCapability + SetIpv4MulticastMplsVpn(value bool) BgpCapability + // HasIpv4MulticastMplsVpn checks if Ipv4MulticastMplsVpn has been set in BgpCapability + HasIpv4MulticastMplsVpn() bool + // Ipv4UnicastFlowSpec returns bool, set in BgpCapability. + Ipv4UnicastFlowSpec() bool + // SetIpv4UnicastFlowSpec assigns bool provided by user to BgpCapability + SetIpv4UnicastFlowSpec(value bool) BgpCapability + // HasIpv4UnicastFlowSpec checks if Ipv4UnicastFlowSpec has been set in BgpCapability + HasIpv4UnicastFlowSpec() bool + // Ipv4SrTePolicy returns bool, set in BgpCapability. + Ipv4SrTePolicy() bool + // SetIpv4SrTePolicy assigns bool provided by user to BgpCapability + SetIpv4SrTePolicy(value bool) BgpCapability + // HasIpv4SrTePolicy checks if Ipv4SrTePolicy has been set in BgpCapability + HasIpv4SrTePolicy() bool + // Ipv4UnicastAddPath returns bool, set in BgpCapability. + Ipv4UnicastAddPath() bool + // SetIpv4UnicastAddPath assigns bool provided by user to BgpCapability + SetIpv4UnicastAddPath(value bool) BgpCapability + // HasIpv4UnicastAddPath checks if Ipv4UnicastAddPath has been set in BgpCapability + HasIpv4UnicastAddPath() bool + // Ipv6MulticastVpn returns bool, set in BgpCapability. + Ipv6MulticastVpn() bool + // SetIpv6MulticastVpn assigns bool provided by user to BgpCapability + SetIpv6MulticastVpn(value bool) BgpCapability + // HasIpv6MulticastVpn checks if Ipv6MulticastVpn has been set in BgpCapability + HasIpv6MulticastVpn() bool + // Ipv6MplsVpn returns bool, set in BgpCapability. + Ipv6MplsVpn() bool + // SetIpv6MplsVpn assigns bool provided by user to BgpCapability + SetIpv6MplsVpn(value bool) BgpCapability + // HasIpv6MplsVpn checks if Ipv6MplsVpn has been set in BgpCapability + HasIpv6MplsVpn() bool + // Ipv6Mdt returns bool, set in BgpCapability. + Ipv6Mdt() bool + // SetIpv6Mdt assigns bool provided by user to BgpCapability + SetIpv6Mdt(value bool) BgpCapability + // HasIpv6Mdt checks if Ipv6Mdt has been set in BgpCapability + HasIpv6Mdt() bool + // Ipv6MulticastMplsVpn returns bool, set in BgpCapability. + Ipv6MulticastMplsVpn() bool + // SetIpv6MulticastMplsVpn assigns bool provided by user to BgpCapability + SetIpv6MulticastMplsVpn(value bool) BgpCapability + // HasIpv6MulticastMplsVpn checks if Ipv6MulticastMplsVpn has been set in BgpCapability + HasIpv6MulticastMplsVpn() bool + // Ipv6UnicastFlowSpec returns bool, set in BgpCapability. + Ipv6UnicastFlowSpec() bool + // SetIpv6UnicastFlowSpec assigns bool provided by user to BgpCapability + SetIpv6UnicastFlowSpec(value bool) BgpCapability + // HasIpv6UnicastFlowSpec checks if Ipv6UnicastFlowSpec has been set in BgpCapability + HasIpv6UnicastFlowSpec() bool + // Ipv6SrTePolicy returns bool, set in BgpCapability. + Ipv6SrTePolicy() bool + // SetIpv6SrTePolicy assigns bool provided by user to BgpCapability + SetIpv6SrTePolicy(value bool) BgpCapability + // HasIpv6SrTePolicy checks if Ipv6SrTePolicy has been set in BgpCapability + HasIpv6SrTePolicy() bool + // Ipv6UnicastAddPath returns bool, set in BgpCapability. + Ipv6UnicastAddPath() bool + // SetIpv6UnicastAddPath assigns bool provided by user to BgpCapability + SetIpv6UnicastAddPath(value bool) BgpCapability + // HasIpv6UnicastAddPath checks if Ipv6UnicastAddPath has been set in BgpCapability + HasIpv6UnicastAddPath() bool +} + +// Support for the IPv4 Unicast address family. +// Ipv4Unicast returns a bool +func (obj *bgpCapability) Ipv4Unicast() bool { + + return *obj.obj.Ipv4Unicast + +} + +// Support for the IPv4 Unicast address family. +// Ipv4Unicast returns a bool +func (obj *bgpCapability) HasIpv4Unicast() bool { + return obj.obj.Ipv4Unicast != nil +} + +// Support for the IPv4 Unicast address family. +// SetIpv4Unicast sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv4Unicast(value bool) BgpCapability { + + obj.obj.Ipv4Unicast = &value + return obj +} + +// Support for the IPv4 Multicast address family. +// Ipv4Multicast returns a bool +func (obj *bgpCapability) Ipv4Multicast() bool { + + return *obj.obj.Ipv4Multicast + +} + +// Support for the IPv4 Multicast address family. +// Ipv4Multicast returns a bool +func (obj *bgpCapability) HasIpv4Multicast() bool { + return obj.obj.Ipv4Multicast != nil +} + +// Support for the IPv4 Multicast address family. +// SetIpv4Multicast sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv4Multicast(value bool) BgpCapability { + + obj.obj.Ipv4Multicast = &value + return obj +} + +// Support for the IPv4 Unicast address family. +// Ipv6Unicast returns a bool +func (obj *bgpCapability) Ipv6Unicast() bool { + + return *obj.obj.Ipv6Unicast + +} + +// Support for the IPv4 Unicast address family. +// Ipv6Unicast returns a bool +func (obj *bgpCapability) HasIpv6Unicast() bool { + return obj.obj.Ipv6Unicast != nil +} + +// Support for the IPv4 Unicast address family. +// SetIpv6Unicast sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv6Unicast(value bool) BgpCapability { + + obj.obj.Ipv6Unicast = &value + return obj +} + +// Support for the IPv6 Multicast address family. +// Ipv6Multicast returns a bool +func (obj *bgpCapability) Ipv6Multicast() bool { + + return *obj.obj.Ipv6Multicast + +} + +// Support for the IPv6 Multicast address family. +// Ipv6Multicast returns a bool +func (obj *bgpCapability) HasIpv6Multicast() bool { + return obj.obj.Ipv6Multicast != nil +} + +// Support for the IPv6 Multicast address family. +// SetIpv6Multicast sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv6Multicast(value bool) BgpCapability { + + obj.obj.Ipv6Multicast = &value + return obj +} + +// Support for VPLS as below. +// RFC4761 - Virtual Private LAN Service (VPLS) using BGP for Auto-Discovery +// and Signaling. +// RFC6624 - Layer 2 Virtual Private Networks using BGP for Auto-Discovery +// and Signaling. +// Vpls returns a bool +func (obj *bgpCapability) Vpls() bool { + + return *obj.obj.Vpls + +} + +// Support for VPLS as below. +// RFC4761 - Virtual Private LAN Service (VPLS) using BGP for Auto-Discovery +// and Signaling. +// RFC6624 - Layer 2 Virtual Private Networks using BGP for Auto-Discovery +// and Signaling. +// Vpls returns a bool +func (obj *bgpCapability) HasVpls() bool { + return obj.obj.Vpls != nil +} + +// Support for VPLS as below. +// RFC4761 - Virtual Private LAN Service (VPLS) using BGP for Auto-Discovery +// and Signaling. +// RFC6624 - Layer 2 Virtual Private Networks using BGP for Auto-Discovery +// and Signaling. +// SetVpls sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetVpls(value bool) BgpCapability { + + obj.obj.Vpls = &value + return obj +} + +// Support for the route refresh capabilities. Route Refresh allows the dynamic exchange of route refresh requests and routing information between BGP peers and the subsequent re-advertisement of the outbound or inbound routing table. +// RouteRefresh returns a bool +func (obj *bgpCapability) RouteRefresh() bool { + + return *obj.obj.RouteRefresh + +} + +// Support for the route refresh capabilities. Route Refresh allows the dynamic exchange of route refresh requests and routing information between BGP peers and the subsequent re-advertisement of the outbound or inbound routing table. +// RouteRefresh returns a bool +func (obj *bgpCapability) HasRouteRefresh() bool { + return obj.obj.RouteRefresh != nil +} + +// Support for the route refresh capabilities. Route Refresh allows the dynamic exchange of route refresh requests and routing information between BGP peers and the subsequent re-advertisement of the outbound or inbound routing table. +// SetRouteRefresh sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetRouteRefresh(value bool) BgpCapability { + + obj.obj.RouteRefresh = &value + return obj +} + +// Supports for the route constraint capabilities. Route Constraint allows the advertisement of Route Target Membership information. The BGP peers exchange Route Target Reachability Information, which is used to build a route distribution graph. This limits the propagation of VPN Network Layer Reachability Information (NLRI) between different autonomous systems or distinct clusters of the same autonomous system. This is supported for Layer 3 Virtual Private Network scenario. +// RouteConstraint returns a bool +func (obj *bgpCapability) RouteConstraint() bool { + + return *obj.obj.RouteConstraint + +} + +// Supports for the route constraint capabilities. Route Constraint allows the advertisement of Route Target Membership information. The BGP peers exchange Route Target Reachability Information, which is used to build a route distribution graph. This limits the propagation of VPN Network Layer Reachability Information (NLRI) between different autonomous systems or distinct clusters of the same autonomous system. This is supported for Layer 3 Virtual Private Network scenario. +// RouteConstraint returns a bool +func (obj *bgpCapability) HasRouteConstraint() bool { + return obj.obj.RouteConstraint != nil +} + +// Supports for the route constraint capabilities. Route Constraint allows the advertisement of Route Target Membership information. The BGP peers exchange Route Target Reachability Information, which is used to build a route distribution graph. This limits the propagation of VPN Network Layer Reachability Information (NLRI) between different autonomous systems or distinct clusters of the same autonomous system. This is supported for Layer 3 Virtual Private Network scenario. +// SetRouteConstraint sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetRouteConstraint(value bool) BgpCapability { + + obj.obj.RouteConstraint = &value + return obj +} + +// Support for BGP Link State for ISIS and OSPF. +// LinkStateNonVpn returns a bool +func (obj *bgpCapability) LinkStateNonVpn() bool { + + return *obj.obj.LinkStateNonVpn + +} + +// Support for BGP Link State for ISIS and OSPF. +// LinkStateNonVpn returns a bool +func (obj *bgpCapability) HasLinkStateNonVpn() bool { + return obj.obj.LinkStateNonVpn != nil +} + +// Support for BGP Link State for ISIS and OSPF. +// SetLinkStateNonVpn sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetLinkStateNonVpn(value bool) BgpCapability { + + obj.obj.LinkStateNonVpn = &value + return obj +} + +// Capability advertisement of BGP Link State for VPNs. +// LinkStateVpn returns a bool +func (obj *bgpCapability) LinkStateVpn() bool { + + return *obj.obj.LinkStateVpn + +} + +// Capability advertisement of BGP Link State for VPNs. +// LinkStateVpn returns a bool +func (obj *bgpCapability) HasLinkStateVpn() bool { + return obj.obj.LinkStateVpn != nil +} + +// Capability advertisement of BGP Link State for VPNs. +// SetLinkStateVpn sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetLinkStateVpn(value bool) BgpCapability { + + obj.obj.LinkStateVpn = &value + return obj +} + +// Support for the EVPN address family. +// Evpn returns a bool +func (obj *bgpCapability) Evpn() bool { + + return *obj.obj.Evpn + +} + +// Support for the EVPN address family. +// Evpn returns a bool +func (obj *bgpCapability) HasEvpn() bool { + return obj.obj.Evpn != nil +} + +// Support for the EVPN address family. +// SetEvpn sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetEvpn(value bool) BgpCapability { + + obj.obj.Evpn = &value + return obj +} + +// Support for extended Next Hop Encoding for Nexthop field in IPv4 routes advertisement. This allows IPv4 routes being advertised by IPv6 peers to include an IPv6 Nexthop. +// ExtendedNextHopEncoding returns a bool +func (obj *bgpCapability) ExtendedNextHopEncoding() bool { + + return *obj.obj.ExtendedNextHopEncoding + +} + +// Support for extended Next Hop Encoding for Nexthop field in IPv4 routes advertisement. This allows IPv4 routes being advertised by IPv6 peers to include an IPv6 Nexthop. +// ExtendedNextHopEncoding returns a bool +func (obj *bgpCapability) HasExtendedNextHopEncoding() bool { + return obj.obj.ExtendedNextHopEncoding != nil +} + +// Support for extended Next Hop Encoding for Nexthop field in IPv4 routes advertisement. This allows IPv4 routes being advertised by IPv6 peers to include an IPv6 Nexthop. +// SetExtendedNextHopEncoding sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetExtendedNextHopEncoding(value bool) BgpCapability { + + obj.obj.ExtendedNextHopEncoding = &value + return obj +} + +// Support for the IPv4 Multicast VPN address family. +// Ipv4MulticastVpn returns a bool +func (obj *bgpCapability) Ipv4MulticastVpn() bool { + + return *obj.obj.Ipv4MulticastVpn + +} + +// Support for the IPv4 Multicast VPN address family. +// Ipv4MulticastVpn returns a bool +func (obj *bgpCapability) HasIpv4MulticastVpn() bool { + return obj.obj.Ipv4MulticastVpn != nil +} + +// Support for the IPv4 Multicast VPN address family. +// SetIpv4MulticastVpn sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv4MulticastVpn(value bool) BgpCapability { + + obj.obj.Ipv4MulticastVpn = &value + return obj +} + +// Support for the IPv4 MPLS L3VPN address family. +// Ipv4MplsVpn returns a bool +func (obj *bgpCapability) Ipv4MplsVpn() bool { + + return *obj.obj.Ipv4MplsVpn + +} + +// Support for the IPv4 MPLS L3VPN address family. +// Ipv4MplsVpn returns a bool +func (obj *bgpCapability) HasIpv4MplsVpn() bool { + return obj.obj.Ipv4MplsVpn != nil +} + +// Support for the IPv4 MPLS L3VPN address family. +// SetIpv4MplsVpn sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv4MplsVpn(value bool) BgpCapability { + + obj.obj.Ipv4MplsVpn = &value + return obj +} + +// Supports for IPv4 MDT address family messages. +// Ipv4Mdt returns a bool +func (obj *bgpCapability) Ipv4Mdt() bool { + + return *obj.obj.Ipv4Mdt + +} + +// Supports for IPv4 MDT address family messages. +// Ipv4Mdt returns a bool +func (obj *bgpCapability) HasIpv4Mdt() bool { + return obj.obj.Ipv4Mdt != nil +} + +// Supports for IPv4 MDT address family messages. +// SetIpv4Mdt sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv4Mdt(value bool) BgpCapability { + + obj.obj.Ipv4Mdt = &value + return obj +} + +// Support for the IPv4 Multicast VPN address family. +// Ipv4MulticastMplsVpn returns a bool +func (obj *bgpCapability) Ipv4MulticastMplsVpn() bool { + + return *obj.obj.Ipv4MulticastMplsVpn + +} + +// Support for the IPv4 Multicast VPN address family. +// Ipv4MulticastMplsVpn returns a bool +func (obj *bgpCapability) HasIpv4MulticastMplsVpn() bool { + return obj.obj.Ipv4MulticastMplsVpn != nil +} + +// Support for the IPv4 Multicast VPN address family. +// SetIpv4MulticastMplsVpn sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv4MulticastMplsVpn(value bool) BgpCapability { + + obj.obj.Ipv4MulticastMplsVpn = &value + return obj +} + +// Support for propagation of IPv4 unicast flow specification rules. +// Ipv4UnicastFlowSpec returns a bool +func (obj *bgpCapability) Ipv4UnicastFlowSpec() bool { + + return *obj.obj.Ipv4UnicastFlowSpec + +} + +// Support for propagation of IPv4 unicast flow specification rules. +// Ipv4UnicastFlowSpec returns a bool +func (obj *bgpCapability) HasIpv4UnicastFlowSpec() bool { + return obj.obj.Ipv4UnicastFlowSpec != nil +} + +// Support for propagation of IPv4 unicast flow specification rules. +// SetIpv4UnicastFlowSpec sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv4UnicastFlowSpec(value bool) BgpCapability { + + obj.obj.Ipv4UnicastFlowSpec = &value + return obj +} + +// Support for IPv4 SRTE policy. +// Ipv4SrTePolicy returns a bool +func (obj *bgpCapability) Ipv4SrTePolicy() bool { + + return *obj.obj.Ipv4SrTePolicy + +} + +// Support for IPv4 SRTE policy. +// Ipv4SrTePolicy returns a bool +func (obj *bgpCapability) HasIpv4SrTePolicy() bool { + return obj.obj.Ipv4SrTePolicy != nil +} + +// Support for IPv4 SRTE policy. +// SetIpv4SrTePolicy sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv4SrTePolicy(value bool) BgpCapability { + + obj.obj.Ipv4SrTePolicy = &value + return obj +} + +// Support for IPv4 Unicast Add Path Capability. +// Ipv4UnicastAddPath returns a bool +func (obj *bgpCapability) Ipv4UnicastAddPath() bool { + + return *obj.obj.Ipv4UnicastAddPath + +} + +// Support for IPv4 Unicast Add Path Capability. +// Ipv4UnicastAddPath returns a bool +func (obj *bgpCapability) HasIpv4UnicastAddPath() bool { + return obj.obj.Ipv4UnicastAddPath != nil +} + +// Support for IPv4 Unicast Add Path Capability. +// SetIpv4UnicastAddPath sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv4UnicastAddPath(value bool) BgpCapability { + + obj.obj.Ipv4UnicastAddPath = &value + return obj +} + +// Support for the IPv6 Multicast VPN address family. +// Ipv6MulticastVpn returns a bool +func (obj *bgpCapability) Ipv6MulticastVpn() bool { + + return *obj.obj.Ipv6MulticastVpn + +} + +// Support for the IPv6 Multicast VPN address family. +// Ipv6MulticastVpn returns a bool +func (obj *bgpCapability) HasIpv6MulticastVpn() bool { + return obj.obj.Ipv6MulticastVpn != nil +} + +// Support for the IPv6 Multicast VPN address family. +// SetIpv6MulticastVpn sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv6MulticastVpn(value bool) BgpCapability { + + obj.obj.Ipv6MulticastVpn = &value + return obj +} + +// Support for the IPv6 MPLS L3VPN address family. +// Ipv6MplsVpn returns a bool +func (obj *bgpCapability) Ipv6MplsVpn() bool { + + return *obj.obj.Ipv6MplsVpn + +} + +// Support for the IPv6 MPLS L3VPN address family. +// Ipv6MplsVpn returns a bool +func (obj *bgpCapability) HasIpv6MplsVpn() bool { + return obj.obj.Ipv6MplsVpn != nil +} + +// Support for the IPv6 MPLS L3VPN address family. +// SetIpv6MplsVpn sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv6MplsVpn(value bool) BgpCapability { + + obj.obj.Ipv6MplsVpn = &value + return obj +} + +// Support for IPv6 MDT address family messages. +// Ipv6Mdt returns a bool +func (obj *bgpCapability) Ipv6Mdt() bool { + + return *obj.obj.Ipv6Mdt + +} + +// Support for IPv6 MDT address family messages. +// Ipv6Mdt returns a bool +func (obj *bgpCapability) HasIpv6Mdt() bool { + return obj.obj.Ipv6Mdt != nil +} + +// Support for IPv6 MDT address family messages. +// SetIpv6Mdt sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv6Mdt(value bool) BgpCapability { + + obj.obj.Ipv6Mdt = &value + return obj +} + +// Support for the IPv6 Multicast VPN address family. +// Ipv6MulticastMplsVpn returns a bool +func (obj *bgpCapability) Ipv6MulticastMplsVpn() bool { + + return *obj.obj.Ipv6MulticastMplsVpn + +} + +// Support for the IPv6 Multicast VPN address family. +// Ipv6MulticastMplsVpn returns a bool +func (obj *bgpCapability) HasIpv6MulticastMplsVpn() bool { + return obj.obj.Ipv6MulticastMplsVpn != nil +} + +// Support for the IPv6 Multicast VPN address family. +// SetIpv6MulticastMplsVpn sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv6MulticastMplsVpn(value bool) BgpCapability { + + obj.obj.Ipv6MulticastMplsVpn = &value + return obj +} + +// Support for propagation of IPv6 unicast flow specification rules. +// Ipv6UnicastFlowSpec returns a bool +func (obj *bgpCapability) Ipv6UnicastFlowSpec() bool { + + return *obj.obj.Ipv6UnicastFlowSpec + +} + +// Support for propagation of IPv6 unicast flow specification rules. +// Ipv6UnicastFlowSpec returns a bool +func (obj *bgpCapability) HasIpv6UnicastFlowSpec() bool { + return obj.obj.Ipv6UnicastFlowSpec != nil +} + +// Support for propagation of IPv6 unicast flow specification rules. +// SetIpv6UnicastFlowSpec sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv6UnicastFlowSpec(value bool) BgpCapability { + + obj.obj.Ipv6UnicastFlowSpec = &value + return obj +} + +// Support for IPv6 SRTE policy. +// Ipv6SrTePolicy returns a bool +func (obj *bgpCapability) Ipv6SrTePolicy() bool { + + return *obj.obj.Ipv6SrTePolicy + +} + +// Support for IPv6 SRTE policy. +// Ipv6SrTePolicy returns a bool +func (obj *bgpCapability) HasIpv6SrTePolicy() bool { + return obj.obj.Ipv6SrTePolicy != nil +} + +// Support for IPv6 SRTE policy. +// SetIpv6SrTePolicy sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv6SrTePolicy(value bool) BgpCapability { + + obj.obj.Ipv6SrTePolicy = &value + return obj +} + +// Support for IPv6 Unicast Add Path Capability. +// Ipv6UnicastAddPath returns a bool +func (obj *bgpCapability) Ipv6UnicastAddPath() bool { + + return *obj.obj.Ipv6UnicastAddPath + +} + +// Support for IPv6 Unicast Add Path Capability. +// Ipv6UnicastAddPath returns a bool +func (obj *bgpCapability) HasIpv6UnicastAddPath() bool { + return obj.obj.Ipv6UnicastAddPath != nil +} + +// Support for IPv6 Unicast Add Path Capability. +// SetIpv6UnicastAddPath sets the bool value in the BgpCapability object +func (obj *bgpCapability) SetIpv6UnicastAddPath(value bool) BgpCapability { + + obj.obj.Ipv6UnicastAddPath = &value + return obj +} + +func (obj *bgpCapability) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpCapability) setDefault() { + if obj.obj.Ipv4Unicast == nil { + obj.SetIpv4Unicast(true) + } + if obj.obj.Ipv4Multicast == nil { + obj.SetIpv4Multicast(false) + } + if obj.obj.Ipv6Unicast == nil { + obj.SetIpv6Unicast(true) + } + if obj.obj.Ipv6Multicast == nil { + obj.SetIpv6Multicast(false) + } + if obj.obj.Vpls == nil { + obj.SetVpls(false) + } + if obj.obj.RouteRefresh == nil { + obj.SetRouteRefresh(true) + } + if obj.obj.RouteConstraint == nil { + obj.SetRouteConstraint(false) + } + if obj.obj.LinkStateNonVpn == nil { + obj.SetLinkStateNonVpn(false) + } + if obj.obj.LinkStateVpn == nil { + obj.SetLinkStateVpn(false) + } + if obj.obj.Evpn == nil { + obj.SetEvpn(false) + } + if obj.obj.ExtendedNextHopEncoding == nil { + obj.SetExtendedNextHopEncoding(false) + } + if obj.obj.Ipv4MulticastVpn == nil { + obj.SetIpv4MulticastVpn(false) + } + if obj.obj.Ipv4MplsVpn == nil { + obj.SetIpv4MplsVpn(false) + } + if obj.obj.Ipv4Mdt == nil { + obj.SetIpv4Mdt(false) + } + if obj.obj.Ipv4MulticastMplsVpn == nil { + obj.SetIpv4MulticastMplsVpn(false) + } + if obj.obj.Ipv4UnicastFlowSpec == nil { + obj.SetIpv4UnicastFlowSpec(false) + } + if obj.obj.Ipv4SrTePolicy == nil { + obj.SetIpv4SrTePolicy(false) + } + if obj.obj.Ipv4UnicastAddPath == nil { + obj.SetIpv4UnicastAddPath(false) + } + if obj.obj.Ipv6MulticastVpn == nil { + obj.SetIpv6MulticastVpn(false) + } + if obj.obj.Ipv6MplsVpn == nil { + obj.SetIpv6MplsVpn(false) + } + if obj.obj.Ipv6Mdt == nil { + obj.SetIpv6Mdt(false) + } + if obj.obj.Ipv6MulticastMplsVpn == nil { + obj.SetIpv6MulticastMplsVpn(false) + } + if obj.obj.Ipv6UnicastFlowSpec == nil { + obj.SetIpv6UnicastFlowSpec(false) + } + if obj.obj.Ipv6SrTePolicy == nil { + obj.SetIpv6SrTePolicy(false) + } + if obj.obj.Ipv6UnicastAddPath == nil { + obj.SetIpv6UnicastAddPath(false) + } + +} diff --git a/gosnappi/bgp_community.go b/gosnappi/bgp_community.go new file mode 100644 index 00000000..b85c0a6f --- /dev/null +++ b/gosnappi/bgp_community.go @@ -0,0 +1,408 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpCommunity ***** +type bgpCommunity struct { + validation + obj *otg.BgpCommunity + marshaller marshalBgpCommunity + unMarshaller unMarshalBgpCommunity +} + +func NewBgpCommunity() BgpCommunity { + obj := bgpCommunity{obj: &otg.BgpCommunity{}} + obj.setDefault() + return &obj +} + +func (obj *bgpCommunity) msg() *otg.BgpCommunity { + return obj.obj +} + +func (obj *bgpCommunity) setMsg(msg *otg.BgpCommunity) BgpCommunity { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpCommunity struct { + obj *bgpCommunity +} + +type marshalBgpCommunity interface { + // ToProto marshals BgpCommunity to protobuf object *otg.BgpCommunity + ToProto() (*otg.BgpCommunity, error) + // ToPbText marshals BgpCommunity to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpCommunity to YAML text + ToYaml() (string, error) + // ToJson marshals BgpCommunity to JSON text + ToJson() (string, error) +} + +type unMarshalbgpCommunity struct { + obj *bgpCommunity +} + +type unMarshalBgpCommunity interface { + // FromProto unmarshals BgpCommunity from protobuf object *otg.BgpCommunity + FromProto(msg *otg.BgpCommunity) (BgpCommunity, error) + // FromPbText unmarshals BgpCommunity from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpCommunity from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpCommunity from JSON text + FromJson(value string) error +} + +func (obj *bgpCommunity) Marshal() marshalBgpCommunity { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpCommunity{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpCommunity) Unmarshal() unMarshalBgpCommunity { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpCommunity{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpCommunity) ToProto() (*otg.BgpCommunity, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpCommunity) FromProto(msg *otg.BgpCommunity) (BgpCommunity, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpCommunity) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpCommunity) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpCommunity) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpCommunity) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpCommunity) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpCommunity) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpCommunity) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpCommunity) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpCommunity) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpCommunity) Clone() (BgpCommunity, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpCommunity() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpCommunity is bGP communities provide additional capability for tagging routes and for modifying BGP routing policy on upstream and downstream routers. BGP community is a 32-bit number which is broken into 16-bit AS number and a 16-bit custom value. +type BgpCommunity interface { + Validation + // msg marshals BgpCommunity to protobuf object *otg.BgpCommunity + // and doesn't set defaults + msg() *otg.BgpCommunity + // setMsg unmarshals BgpCommunity from protobuf object *otg.BgpCommunity + // and doesn't set defaults + setMsg(*otg.BgpCommunity) BgpCommunity + // provides marshal interface + Marshal() marshalBgpCommunity + // provides unmarshal interface + Unmarshal() unMarshalBgpCommunity + // validate validates BgpCommunity + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpCommunity, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns BgpCommunityTypeEnum, set in BgpCommunity + Type() BgpCommunityTypeEnum + // SetType assigns BgpCommunityTypeEnum provided by user to BgpCommunity + SetType(value BgpCommunityTypeEnum) BgpCommunity + // HasType checks if Type has been set in BgpCommunity + HasType() bool + // AsNumber returns uint32, set in BgpCommunity. + AsNumber() uint32 + // SetAsNumber assigns uint32 provided by user to BgpCommunity + SetAsNumber(value uint32) BgpCommunity + // HasAsNumber checks if AsNumber has been set in BgpCommunity + HasAsNumber() bool + // AsCustom returns uint32, set in BgpCommunity. + AsCustom() uint32 + // SetAsCustom assigns uint32 provided by user to BgpCommunity + SetAsCustom(value uint32) BgpCommunity + // HasAsCustom checks if AsCustom has been set in BgpCommunity + HasAsCustom() bool +} + +type BgpCommunityTypeEnum string + +// Enum of Type on BgpCommunity +var BgpCommunityType = struct { + MANUAL_AS_NUMBER BgpCommunityTypeEnum + NO_EXPORT BgpCommunityTypeEnum + NO_ADVERTISED BgpCommunityTypeEnum + NO_EXPORT_SUBCONFED BgpCommunityTypeEnum + LLGR_STALE BgpCommunityTypeEnum + NO_LLGR BgpCommunityTypeEnum +}{ + MANUAL_AS_NUMBER: BgpCommunityTypeEnum("manual_as_number"), + NO_EXPORT: BgpCommunityTypeEnum("no_export"), + NO_ADVERTISED: BgpCommunityTypeEnum("no_advertised"), + NO_EXPORT_SUBCONFED: BgpCommunityTypeEnum("no_export_subconfed"), + LLGR_STALE: BgpCommunityTypeEnum("llgr_stale"), + NO_LLGR: BgpCommunityTypeEnum("no_llgr"), +} + +func (obj *bgpCommunity) Type() BgpCommunityTypeEnum { + return BgpCommunityTypeEnum(obj.obj.Type.Enum().String()) +} + +// The type of community AS number. +// Type returns a string +func (obj *bgpCommunity) HasType() bool { + return obj.obj.Type != nil +} + +func (obj *bgpCommunity) SetType(value BgpCommunityTypeEnum) BgpCommunity { + intValue, ok := otg.BgpCommunity_Type_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpCommunityTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpCommunity_Type_Enum(intValue) + obj.obj.Type = &enumValue + + return obj +} + +// First two octets of 32 bit community AS number. +// AsNumber returns a uint32 +func (obj *bgpCommunity) AsNumber() uint32 { + + return *obj.obj.AsNumber + +} + +// First two octets of 32 bit community AS number. +// AsNumber returns a uint32 +func (obj *bgpCommunity) HasAsNumber() bool { + return obj.obj.AsNumber != nil +} + +// First two octets of 32 bit community AS number. +// SetAsNumber sets the uint32 value in the BgpCommunity object +func (obj *bgpCommunity) SetAsNumber(value uint32) BgpCommunity { + + obj.obj.AsNumber = &value + return obj +} + +// Last two octets of the community value. +// AsCustom returns a uint32 +func (obj *bgpCommunity) AsCustom() uint32 { + + return *obj.obj.AsCustom + +} + +// Last two octets of the community value. +// AsCustom returns a uint32 +func (obj *bgpCommunity) HasAsCustom() bool { + return obj.obj.AsCustom != nil +} + +// Last two octets of the community value. +// SetAsCustom sets the uint32 value in the BgpCommunity object +func (obj *bgpCommunity) SetAsCustom(value uint32) BgpCommunity { + + obj.obj.AsCustom = &value + return obj +} + +func (obj *bgpCommunity) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.AsNumber != nil { + + if *obj.obj.AsNumber > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpCommunity.AsNumber <= 65535 but Got %d", *obj.obj.AsNumber)) + } + + } + + if obj.obj.AsCustom != nil { + + if *obj.obj.AsCustom > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpCommunity.AsCustom <= 65535 but Got %d", *obj.obj.AsCustom)) + } + + } + +} + +func (obj *bgpCommunity) setDefault() { + if obj.obj.AsNumber == nil { + obj.SetAsNumber(0) + } + if obj.obj.AsCustom == nil { + obj.SetAsCustom(0) + } + +} diff --git a/gosnappi/bgp_ethernet_segment_df_election.go b/gosnappi/bgp_ethernet_segment_df_election.go new file mode 100644 index 00000000..1cc1541f --- /dev/null +++ b/gosnappi/bgp_ethernet_segment_df_election.go @@ -0,0 +1,319 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpEthernetSegmentDfElection ***** +type bgpEthernetSegmentDfElection struct { + validation + obj *otg.BgpEthernetSegmentDfElection + marshaller marshalBgpEthernetSegmentDfElection + unMarshaller unMarshalBgpEthernetSegmentDfElection +} + +func NewBgpEthernetSegmentDfElection() BgpEthernetSegmentDfElection { + obj := bgpEthernetSegmentDfElection{obj: &otg.BgpEthernetSegmentDfElection{}} + obj.setDefault() + return &obj +} + +func (obj *bgpEthernetSegmentDfElection) msg() *otg.BgpEthernetSegmentDfElection { + return obj.obj +} + +func (obj *bgpEthernetSegmentDfElection) setMsg(msg *otg.BgpEthernetSegmentDfElection) BgpEthernetSegmentDfElection { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpEthernetSegmentDfElection struct { + obj *bgpEthernetSegmentDfElection +} + +type marshalBgpEthernetSegmentDfElection interface { + // ToProto marshals BgpEthernetSegmentDfElection to protobuf object *otg.BgpEthernetSegmentDfElection + ToProto() (*otg.BgpEthernetSegmentDfElection, error) + // ToPbText marshals BgpEthernetSegmentDfElection to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpEthernetSegmentDfElection to YAML text + ToYaml() (string, error) + // ToJson marshals BgpEthernetSegmentDfElection to JSON text + ToJson() (string, error) +} + +type unMarshalbgpEthernetSegmentDfElection struct { + obj *bgpEthernetSegmentDfElection +} + +type unMarshalBgpEthernetSegmentDfElection interface { + // FromProto unmarshals BgpEthernetSegmentDfElection from protobuf object *otg.BgpEthernetSegmentDfElection + FromProto(msg *otg.BgpEthernetSegmentDfElection) (BgpEthernetSegmentDfElection, error) + // FromPbText unmarshals BgpEthernetSegmentDfElection from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpEthernetSegmentDfElection from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpEthernetSegmentDfElection from JSON text + FromJson(value string) error +} + +func (obj *bgpEthernetSegmentDfElection) Marshal() marshalBgpEthernetSegmentDfElection { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpEthernetSegmentDfElection{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpEthernetSegmentDfElection) Unmarshal() unMarshalBgpEthernetSegmentDfElection { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpEthernetSegmentDfElection{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpEthernetSegmentDfElection) ToProto() (*otg.BgpEthernetSegmentDfElection, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpEthernetSegmentDfElection) FromProto(msg *otg.BgpEthernetSegmentDfElection) (BgpEthernetSegmentDfElection, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpEthernetSegmentDfElection) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpEthernetSegmentDfElection) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpEthernetSegmentDfElection) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpEthernetSegmentDfElection) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpEthernetSegmentDfElection) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpEthernetSegmentDfElection) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpEthernetSegmentDfElection) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpEthernetSegmentDfElection) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpEthernetSegmentDfElection) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpEthernetSegmentDfElection) Clone() (BgpEthernetSegmentDfElection, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpEthernetSegmentDfElection() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpEthernetSegmentDfElection is configuration for Designated Forwarder (DF) election among the Provider Edge (PE) routers on the same Ethernet Segment. +type BgpEthernetSegmentDfElection interface { + Validation + // msg marshals BgpEthernetSegmentDfElection to protobuf object *otg.BgpEthernetSegmentDfElection + // and doesn't set defaults + msg() *otg.BgpEthernetSegmentDfElection + // setMsg unmarshals BgpEthernetSegmentDfElection from protobuf object *otg.BgpEthernetSegmentDfElection + // and doesn't set defaults + setMsg(*otg.BgpEthernetSegmentDfElection) BgpEthernetSegmentDfElection + // provides marshal interface + Marshal() marshalBgpEthernetSegmentDfElection + // provides unmarshal interface + Unmarshal() unMarshalBgpEthernetSegmentDfElection + // validate validates BgpEthernetSegmentDfElection + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpEthernetSegmentDfElection, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ElectionTimer returns uint32, set in BgpEthernetSegmentDfElection. + ElectionTimer() uint32 + // SetElectionTimer assigns uint32 provided by user to BgpEthernetSegmentDfElection + SetElectionTimer(value uint32) BgpEthernetSegmentDfElection + // HasElectionTimer checks if ElectionTimer has been set in BgpEthernetSegmentDfElection + HasElectionTimer() bool +} + +// The DF election timer in seconds. +// ElectionTimer returns a uint32 +func (obj *bgpEthernetSegmentDfElection) ElectionTimer() uint32 { + + return *obj.obj.ElectionTimer + +} + +// The DF election timer in seconds. +// ElectionTimer returns a uint32 +func (obj *bgpEthernetSegmentDfElection) HasElectionTimer() bool { + return obj.obj.ElectionTimer != nil +} + +// The DF election timer in seconds. +// SetElectionTimer sets the uint32 value in the BgpEthernetSegmentDfElection object +func (obj *bgpEthernetSegmentDfElection) SetElectionTimer(value uint32) BgpEthernetSegmentDfElection { + + obj.obj.ElectionTimer = &value + return obj +} + +func (obj *bgpEthernetSegmentDfElection) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.ElectionTimer != nil { + + if *obj.obj.ElectionTimer > 300 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpEthernetSegmentDfElection.ElectionTimer <= 300 but Got %d", *obj.obj.ElectionTimer)) + } + + } + +} + +func (obj *bgpEthernetSegmentDfElection) setDefault() { + if obj.obj.ElectionTimer == nil { + obj.SetElectionTimer(3) + } + +} diff --git a/gosnappi/bgp_ext_community.go b/gosnappi/bgp_ext_community.go new file mode 100644 index 00000000..c0d29c6a --- /dev/null +++ b/gosnappi/bgp_ext_community.go @@ -0,0 +1,423 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtCommunity ***** +type bgpExtCommunity struct { + validation + obj *otg.BgpExtCommunity + marshaller marshalBgpExtCommunity + unMarshaller unMarshalBgpExtCommunity +} + +func NewBgpExtCommunity() BgpExtCommunity { + obj := bgpExtCommunity{obj: &otg.BgpExtCommunity{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtCommunity) msg() *otg.BgpExtCommunity { + return obj.obj +} + +func (obj *bgpExtCommunity) setMsg(msg *otg.BgpExtCommunity) BgpExtCommunity { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtCommunity struct { + obj *bgpExtCommunity +} + +type marshalBgpExtCommunity interface { + // ToProto marshals BgpExtCommunity to protobuf object *otg.BgpExtCommunity + ToProto() (*otg.BgpExtCommunity, error) + // ToPbText marshals BgpExtCommunity to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtCommunity to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtCommunity to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtCommunity struct { + obj *bgpExtCommunity +} + +type unMarshalBgpExtCommunity interface { + // FromProto unmarshals BgpExtCommunity from protobuf object *otg.BgpExtCommunity + FromProto(msg *otg.BgpExtCommunity) (BgpExtCommunity, error) + // FromPbText unmarshals BgpExtCommunity from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtCommunity from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtCommunity from JSON text + FromJson(value string) error +} + +func (obj *bgpExtCommunity) Marshal() marshalBgpExtCommunity { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtCommunity{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtCommunity) Unmarshal() unMarshalBgpExtCommunity { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtCommunity{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtCommunity) ToProto() (*otg.BgpExtCommunity, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtCommunity) FromProto(msg *otg.BgpExtCommunity) (BgpExtCommunity, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtCommunity) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtCommunity) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtCommunity) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtCommunity) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtCommunity) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtCommunity) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtCommunity) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtCommunity) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtCommunity) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtCommunity) Clone() (BgpExtCommunity, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtCommunity() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpExtCommunity is the Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. +type BgpExtCommunity interface { + Validation + // msg marshals BgpExtCommunity to protobuf object *otg.BgpExtCommunity + // and doesn't set defaults + msg() *otg.BgpExtCommunity + // setMsg unmarshals BgpExtCommunity from protobuf object *otg.BgpExtCommunity + // and doesn't set defaults + setMsg(*otg.BgpExtCommunity) BgpExtCommunity + // provides marshal interface + Marshal() marshalBgpExtCommunity + // provides unmarshal interface + Unmarshal() unMarshalBgpExtCommunity + // validate validates BgpExtCommunity + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtCommunity, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns BgpExtCommunityTypeEnum, set in BgpExtCommunity + Type() BgpExtCommunityTypeEnum + // SetType assigns BgpExtCommunityTypeEnum provided by user to BgpExtCommunity + SetType(value BgpExtCommunityTypeEnum) BgpExtCommunity + // HasType checks if Type has been set in BgpExtCommunity + HasType() bool + // Subtype returns BgpExtCommunitySubtypeEnum, set in BgpExtCommunity + Subtype() BgpExtCommunitySubtypeEnum + // SetSubtype assigns BgpExtCommunitySubtypeEnum provided by user to BgpExtCommunity + SetSubtype(value BgpExtCommunitySubtypeEnum) BgpExtCommunity + // HasSubtype checks if Subtype has been set in BgpExtCommunity + HasSubtype() bool + // Value returns string, set in BgpExtCommunity. + Value() string + // SetValue assigns string provided by user to BgpExtCommunity + SetValue(value string) BgpExtCommunity + // HasValue checks if Value has been set in BgpExtCommunity + HasValue() bool +} + +type BgpExtCommunityTypeEnum string + +// Enum of Type on BgpExtCommunity +var BgpExtCommunityType = struct { + ADMINISTRATOR_AS_2OCTET BgpExtCommunityTypeEnum + ADMINISTRATOR_IPV4_ADDRESS BgpExtCommunityTypeEnum + ADMINISTRATOR_AS_4OCTET BgpExtCommunityTypeEnum + OPAQUE BgpExtCommunityTypeEnum + EVPN BgpExtCommunityTypeEnum + ADMINISTRATOR_AS_2OCTET_LINK_BANDWIDTH BgpExtCommunityTypeEnum +}{ + ADMINISTRATOR_AS_2OCTET: BgpExtCommunityTypeEnum("administrator_as_2octet"), + ADMINISTRATOR_IPV4_ADDRESS: BgpExtCommunityTypeEnum("administrator_ipv4_address"), + ADMINISTRATOR_AS_4OCTET: BgpExtCommunityTypeEnum("administrator_as_4octet"), + OPAQUE: BgpExtCommunityTypeEnum("opaque"), + EVPN: BgpExtCommunityTypeEnum("evpn"), + ADMINISTRATOR_AS_2OCTET_LINK_BANDWIDTH: BgpExtCommunityTypeEnum("administrator_as_2octet_link_bandwidth"), +} + +func (obj *bgpExtCommunity) Type() BgpExtCommunityTypeEnum { + return BgpExtCommunityTypeEnum(obj.obj.Type.Enum().String()) +} + +// Extended Community Type field of 1 Byte. +// - administrator_as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). +// - administrator_ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). +// - administrator_as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). +// - opaque: Opaque Extended Community (RFC 7432). +// - evpn: EVPN Extended Community (RFC 7153). +// - administrator_as_2octet_link_bandwidth : Link Bandwidth Extended Community (RFC 7153). +// Type returns a string +func (obj *bgpExtCommunity) HasType() bool { + return obj.obj.Type != nil +} + +func (obj *bgpExtCommunity) SetType(value BgpExtCommunityTypeEnum) BgpExtCommunity { + intValue, ok := otg.BgpExtCommunity_Type_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpExtCommunityTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpExtCommunity_Type_Enum(intValue) + obj.obj.Type = &enumValue + + return obj +} + +type BgpExtCommunitySubtypeEnum string + +// Enum of Subtype on BgpExtCommunity +var BgpExtCommunitySubtype = struct { + ROUTE_TARGET BgpExtCommunitySubtypeEnum + ORIGIN BgpExtCommunitySubtypeEnum + EXTENDED_BANDWIDTH BgpExtCommunitySubtypeEnum + COLOR BgpExtCommunitySubtypeEnum + ENCAPSULATION BgpExtCommunitySubtypeEnum + MAC_ADDRESS BgpExtCommunitySubtypeEnum +}{ + ROUTE_TARGET: BgpExtCommunitySubtypeEnum("route_target"), + ORIGIN: BgpExtCommunitySubtypeEnum("origin"), + EXTENDED_BANDWIDTH: BgpExtCommunitySubtypeEnum("extended_bandwidth"), + COLOR: BgpExtCommunitySubtypeEnum("color"), + ENCAPSULATION: BgpExtCommunitySubtypeEnum("encapsulation"), + MAC_ADDRESS: BgpExtCommunitySubtypeEnum("mac_address"), +} + +func (obj *bgpExtCommunity) Subtype() BgpExtCommunitySubtypeEnum { + return BgpExtCommunitySubtypeEnum(obj.obj.Subtype.Enum().String()) +} + +// Extended Community Sub Type field of 1 Byte. +// - route_target: Route Target. +// - origin: Origin. +// - extended_bandwidth: Specifies the link bandwidth. +// - color: Specifies the color value. +// - encapsulation: Specifies the Encapsulation Extended Community. +// - mac_address: Specifies the Extended community MAC address. +// Subtype returns a string +func (obj *bgpExtCommunity) HasSubtype() bool { + return obj.obj.Subtype != nil +} + +func (obj *bgpExtCommunity) SetSubtype(value BgpExtCommunitySubtypeEnum) BgpExtCommunity { + intValue, ok := otg.BgpExtCommunity_Subtype_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpExtCommunitySubtypeEnum", string(value))) + return obj + } + enumValue := otg.BgpExtCommunity_Subtype_Enum(intValue) + obj.obj.Subtype = &enumValue + + return obj +} + +// Extended Community value of 6 Bytes. Example - for the Opaque type and Color subtype value can be '0000000000c8' for the color value 200. +// Value returns a string +func (obj *bgpExtCommunity) Value() string { + + return *obj.obj.Value + +} + +// Extended Community value of 6 Bytes. Example - for the Opaque type and Color subtype value can be '0000000000c8' for the color value 200. +// Value returns a string +func (obj *bgpExtCommunity) HasValue() bool { + return obj.obj.Value != nil +} + +// Extended Community value of 6 Bytes. Example - for the Opaque type and Color subtype value can be '0000000000c8' for the color value 200. +// SetValue sets the string value in the BgpExtCommunity object +func (obj *bgpExtCommunity) SetValue(value string) BgpExtCommunity { + + obj.obj.Value = &value + return obj +} + +func (obj *bgpExtCommunity) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateHex(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpExtCommunity.Value")) + } + + } + +} + +func (obj *bgpExtCommunity) setDefault() { + +} diff --git a/gosnappi/bgp_extended_community.go b/gosnappi/bgp_extended_community.go new file mode 100644 index 00000000..d4b522cb --- /dev/null +++ b/gosnappi/bgp_extended_community.go @@ -0,0 +1,732 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunity ***** +type bgpExtendedCommunity struct { + validation + obj *otg.BgpExtendedCommunity + marshaller marshalBgpExtendedCommunity + unMarshaller unMarshalBgpExtendedCommunity + transitive_2OctetAsTypeHolder BgpExtendedCommunityTransitive2OctetAsType + transitiveIpv4AddressTypeHolder BgpExtendedCommunityTransitiveIpv4AddressType + transitive_4OctetAsTypeHolder BgpExtendedCommunityTransitive4OctetAsType + transitiveOpaqueTypeHolder BgpExtendedCommunityTransitiveOpaqueType + transitiveEvpnTypeHolder BgpExtendedCommunityTransitiveEvpnType + nonTransitive_2OctetAsTypeHolder BgpExtendedCommunityNonTransitive2OctetAsType + customHolder BgpExtendedCommunityCustomType +} + +func NewBgpExtendedCommunity() BgpExtendedCommunity { + obj := bgpExtendedCommunity{obj: &otg.BgpExtendedCommunity{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunity) msg() *otg.BgpExtendedCommunity { + return obj.obj +} + +func (obj *bgpExtendedCommunity) setMsg(msg *otg.BgpExtendedCommunity) BgpExtendedCommunity { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunity struct { + obj *bgpExtendedCommunity +} + +type marshalBgpExtendedCommunity interface { + // ToProto marshals BgpExtendedCommunity to protobuf object *otg.BgpExtendedCommunity + ToProto() (*otg.BgpExtendedCommunity, error) + // ToPbText marshals BgpExtendedCommunity to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunity to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunity to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunity struct { + obj *bgpExtendedCommunity +} + +type unMarshalBgpExtendedCommunity interface { + // FromProto unmarshals BgpExtendedCommunity from protobuf object *otg.BgpExtendedCommunity + FromProto(msg *otg.BgpExtendedCommunity) (BgpExtendedCommunity, error) + // FromPbText unmarshals BgpExtendedCommunity from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunity from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunity from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunity) Marshal() marshalBgpExtendedCommunity { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunity{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunity) Unmarshal() unMarshalBgpExtendedCommunity { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunity{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunity) ToProto() (*otg.BgpExtendedCommunity, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunity) FromProto(msg *otg.BgpExtendedCommunity) (BgpExtendedCommunity, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunity) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunity) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunity) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunity) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunity) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunity) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunity) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunity) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunity) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunity) Clone() (BgpExtendedCommunity, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunity() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpExtendedCommunity) setNil() { + obj.transitive_2OctetAsTypeHolder = nil + obj.transitiveIpv4AddressTypeHolder = nil + obj.transitive_4OctetAsTypeHolder = nil + obj.transitiveOpaqueTypeHolder = nil + obj.transitiveEvpnTypeHolder = nil + obj.nonTransitive_2OctetAsTypeHolder = nil + obj.customHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpExtendedCommunity is the Extended Communities Attribute is a optional BGP attribute,defined in RFC4360 with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value.It is divided into two main parts. The first 2 Bytes of the community encode a type and optonal sub-type field. The last 6 bytes (or 7 bytes for types without a sub-type) carry a unique set of data in a format defined by the type and optional sub-type field. Extended communities provide a larger range for grouping or categorizing communities. +type BgpExtendedCommunity interface { + Validation + // msg marshals BgpExtendedCommunity to protobuf object *otg.BgpExtendedCommunity + // and doesn't set defaults + msg() *otg.BgpExtendedCommunity + // setMsg unmarshals BgpExtendedCommunity from protobuf object *otg.BgpExtendedCommunity + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunity) BgpExtendedCommunity + // provides marshal interface + Marshal() marshalBgpExtendedCommunity + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunity + // validate validates BgpExtendedCommunity + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunity, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpExtendedCommunityChoiceEnum, set in BgpExtendedCommunity + Choice() BgpExtendedCommunityChoiceEnum + // setChoice assigns BgpExtendedCommunityChoiceEnum provided by user to BgpExtendedCommunity + setChoice(value BgpExtendedCommunityChoiceEnum) BgpExtendedCommunity + // HasChoice checks if Choice has been set in BgpExtendedCommunity + HasChoice() bool + // Transitive2OctetAsType returns BgpExtendedCommunityTransitive2OctetAsType, set in BgpExtendedCommunity. + // BgpExtendedCommunityTransitive2OctetAsType is the Transitive Two-Octet AS-Specific Extended Community is sent as type 0x00 . + Transitive2OctetAsType() BgpExtendedCommunityTransitive2OctetAsType + // SetTransitive2OctetAsType assigns BgpExtendedCommunityTransitive2OctetAsType provided by user to BgpExtendedCommunity. + // BgpExtendedCommunityTransitive2OctetAsType is the Transitive Two-Octet AS-Specific Extended Community is sent as type 0x00 . + SetTransitive2OctetAsType(value BgpExtendedCommunityTransitive2OctetAsType) BgpExtendedCommunity + // HasTransitive2OctetAsType checks if Transitive2OctetAsType has been set in BgpExtendedCommunity + HasTransitive2OctetAsType() bool + // TransitiveIpv4AddressType returns BgpExtendedCommunityTransitiveIpv4AddressType, set in BgpExtendedCommunity. + // BgpExtendedCommunityTransitiveIpv4AddressType is the Transitive IPv4 Address Specific Extended Community is sent as type 0x01. + TransitiveIpv4AddressType() BgpExtendedCommunityTransitiveIpv4AddressType + // SetTransitiveIpv4AddressType assigns BgpExtendedCommunityTransitiveIpv4AddressType provided by user to BgpExtendedCommunity. + // BgpExtendedCommunityTransitiveIpv4AddressType is the Transitive IPv4 Address Specific Extended Community is sent as type 0x01. + SetTransitiveIpv4AddressType(value BgpExtendedCommunityTransitiveIpv4AddressType) BgpExtendedCommunity + // HasTransitiveIpv4AddressType checks if TransitiveIpv4AddressType has been set in BgpExtendedCommunity + HasTransitiveIpv4AddressType() bool + // Transitive4OctetAsType returns BgpExtendedCommunityTransitive4OctetAsType, set in BgpExtendedCommunity. + // BgpExtendedCommunityTransitive4OctetAsType is the Transitive Four-Octet AS-Specific Extended Community is sent as type 0x02. It is defined in RFC 5668. + Transitive4OctetAsType() BgpExtendedCommunityTransitive4OctetAsType + // SetTransitive4OctetAsType assigns BgpExtendedCommunityTransitive4OctetAsType provided by user to BgpExtendedCommunity. + // BgpExtendedCommunityTransitive4OctetAsType is the Transitive Four-Octet AS-Specific Extended Community is sent as type 0x02. It is defined in RFC 5668. + SetTransitive4OctetAsType(value BgpExtendedCommunityTransitive4OctetAsType) BgpExtendedCommunity + // HasTransitive4OctetAsType checks if Transitive4OctetAsType has been set in BgpExtendedCommunity + HasTransitive4OctetAsType() bool + // TransitiveOpaqueType returns BgpExtendedCommunityTransitiveOpaqueType, set in BgpExtendedCommunity. + // BgpExtendedCommunityTransitiveOpaqueType is the Transitive Opaque Extended Community is sent as type 0x03. + TransitiveOpaqueType() BgpExtendedCommunityTransitiveOpaqueType + // SetTransitiveOpaqueType assigns BgpExtendedCommunityTransitiveOpaqueType provided by user to BgpExtendedCommunity. + // BgpExtendedCommunityTransitiveOpaqueType is the Transitive Opaque Extended Community is sent as type 0x03. + SetTransitiveOpaqueType(value BgpExtendedCommunityTransitiveOpaqueType) BgpExtendedCommunity + // HasTransitiveOpaqueType checks if TransitiveOpaqueType has been set in BgpExtendedCommunity + HasTransitiveOpaqueType() bool + // TransitiveEvpnType returns BgpExtendedCommunityTransitiveEvpnType, set in BgpExtendedCommunity. + // BgpExtendedCommunityTransitiveEvpnType is the Transitive EVPN Extended Community is sent as type 0x06 . + TransitiveEvpnType() BgpExtendedCommunityTransitiveEvpnType + // SetTransitiveEvpnType assigns BgpExtendedCommunityTransitiveEvpnType provided by user to BgpExtendedCommunity. + // BgpExtendedCommunityTransitiveEvpnType is the Transitive EVPN Extended Community is sent as type 0x06 . + SetTransitiveEvpnType(value BgpExtendedCommunityTransitiveEvpnType) BgpExtendedCommunity + // HasTransitiveEvpnType checks if TransitiveEvpnType has been set in BgpExtendedCommunity + HasTransitiveEvpnType() bool + // NonTransitive2OctetAsType returns BgpExtendedCommunityNonTransitive2OctetAsType, set in BgpExtendedCommunity. + // BgpExtendedCommunityNonTransitive2OctetAsType is the Non-Transitive Two-Octet AS-Specific Extended Community is sent as type 0x40. + NonTransitive2OctetAsType() BgpExtendedCommunityNonTransitive2OctetAsType + // SetNonTransitive2OctetAsType assigns BgpExtendedCommunityNonTransitive2OctetAsType provided by user to BgpExtendedCommunity. + // BgpExtendedCommunityNonTransitive2OctetAsType is the Non-Transitive Two-Octet AS-Specific Extended Community is sent as type 0x40. + SetNonTransitive2OctetAsType(value BgpExtendedCommunityNonTransitive2OctetAsType) BgpExtendedCommunity + // HasNonTransitive2OctetAsType checks if NonTransitive2OctetAsType has been set in BgpExtendedCommunity + HasNonTransitive2OctetAsType() bool + // Custom returns BgpExtendedCommunityCustomType, set in BgpExtendedCommunity. + // BgpExtendedCommunityCustomType is add a custom Extended Community with a combination of types , sub-types and values not explicitly specified above or not defined yet. + Custom() BgpExtendedCommunityCustomType + // SetCustom assigns BgpExtendedCommunityCustomType provided by user to BgpExtendedCommunity. + // BgpExtendedCommunityCustomType is add a custom Extended Community with a combination of types , sub-types and values not explicitly specified above or not defined yet. + SetCustom(value BgpExtendedCommunityCustomType) BgpExtendedCommunity + // HasCustom checks if Custom has been set in BgpExtendedCommunity + HasCustom() bool + setNil() +} + +type BgpExtendedCommunityChoiceEnum string + +// Enum of Choice on BgpExtendedCommunity +var BgpExtendedCommunityChoice = struct { + TRANSITIVE_2OCTET_AS_TYPE BgpExtendedCommunityChoiceEnum + TRANSITIVE_IPV4_ADDRESS_TYPE BgpExtendedCommunityChoiceEnum + TRANSITIVE_4OCTET_AS_TYPE BgpExtendedCommunityChoiceEnum + TRANSITIVE_OPAQUE_TYPE BgpExtendedCommunityChoiceEnum + TRANSITIVE_EVPN_TYPE BgpExtendedCommunityChoiceEnum + NON_TRANSITIVE_2OCTET_AS_TYPE BgpExtendedCommunityChoiceEnum + CUSTOM BgpExtendedCommunityChoiceEnum +}{ + TRANSITIVE_2OCTET_AS_TYPE: BgpExtendedCommunityChoiceEnum("transitive_2octet_as_type"), + TRANSITIVE_IPV4_ADDRESS_TYPE: BgpExtendedCommunityChoiceEnum("transitive_ipv4_address_type"), + TRANSITIVE_4OCTET_AS_TYPE: BgpExtendedCommunityChoiceEnum("transitive_4octet_as_type"), + TRANSITIVE_OPAQUE_TYPE: BgpExtendedCommunityChoiceEnum("transitive_opaque_type"), + TRANSITIVE_EVPN_TYPE: BgpExtendedCommunityChoiceEnum("transitive_evpn_type"), + NON_TRANSITIVE_2OCTET_AS_TYPE: BgpExtendedCommunityChoiceEnum("non_transitive_2octet_as_type"), + CUSTOM: BgpExtendedCommunityChoiceEnum("custom"), +} + +func (obj *bgpExtendedCommunity) Choice() BgpExtendedCommunityChoiceEnum { + return BgpExtendedCommunityChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *bgpExtendedCommunity) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpExtendedCommunity) setChoice(value BgpExtendedCommunityChoiceEnum) BgpExtendedCommunity { + intValue, ok := otg.BgpExtendedCommunity_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpExtendedCommunityChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpExtendedCommunity_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.customHolder = nil + obj.obj.NonTransitive_2OctetAsType = nil + obj.nonTransitive_2OctetAsTypeHolder = nil + obj.obj.TransitiveEvpnType = nil + obj.transitiveEvpnTypeHolder = nil + obj.obj.TransitiveOpaqueType = nil + obj.transitiveOpaqueTypeHolder = nil + obj.obj.Transitive_4OctetAsType = nil + obj.transitive_4OctetAsTypeHolder = nil + obj.obj.TransitiveIpv4AddressType = nil + obj.transitiveIpv4AddressTypeHolder = nil + obj.obj.Transitive_2OctetAsType = nil + obj.transitive_2OctetAsTypeHolder = nil + + if value == BgpExtendedCommunityChoice.TRANSITIVE_2OCTET_AS_TYPE { + obj.obj.Transitive_2OctetAsType = NewBgpExtendedCommunityTransitive2OctetAsType().msg() + } + + if value == BgpExtendedCommunityChoice.TRANSITIVE_IPV4_ADDRESS_TYPE { + obj.obj.TransitiveIpv4AddressType = NewBgpExtendedCommunityTransitiveIpv4AddressType().msg() + } + + if value == BgpExtendedCommunityChoice.TRANSITIVE_4OCTET_AS_TYPE { + obj.obj.Transitive_4OctetAsType = NewBgpExtendedCommunityTransitive4OctetAsType().msg() + } + + if value == BgpExtendedCommunityChoice.TRANSITIVE_OPAQUE_TYPE { + obj.obj.TransitiveOpaqueType = NewBgpExtendedCommunityTransitiveOpaqueType().msg() + } + + if value == BgpExtendedCommunityChoice.TRANSITIVE_EVPN_TYPE { + obj.obj.TransitiveEvpnType = NewBgpExtendedCommunityTransitiveEvpnType().msg() + } + + if value == BgpExtendedCommunityChoice.NON_TRANSITIVE_2OCTET_AS_TYPE { + obj.obj.NonTransitive_2OctetAsType = NewBgpExtendedCommunityNonTransitive2OctetAsType().msg() + } + + if value == BgpExtendedCommunityChoice.CUSTOM { + obj.obj.Custom = NewBgpExtendedCommunityCustomType().msg() + } + + return obj +} + +// description is TBD +// Transitive2OctetAsType returns a BgpExtendedCommunityTransitive2OctetAsType +func (obj *bgpExtendedCommunity) Transitive2OctetAsType() BgpExtendedCommunityTransitive2OctetAsType { + if obj.obj.Transitive_2OctetAsType == nil { + obj.setChoice(BgpExtendedCommunityChoice.TRANSITIVE_2OCTET_AS_TYPE) + } + if obj.transitive_2OctetAsTypeHolder == nil { + obj.transitive_2OctetAsTypeHolder = &bgpExtendedCommunityTransitive2OctetAsType{obj: obj.obj.Transitive_2OctetAsType} + } + return obj.transitive_2OctetAsTypeHolder +} + +// description is TBD +// Transitive2OctetAsType returns a BgpExtendedCommunityTransitive2OctetAsType +func (obj *bgpExtendedCommunity) HasTransitive2OctetAsType() bool { + return obj.obj.Transitive_2OctetAsType != nil +} + +// description is TBD +// SetTransitive2OctetAsType sets the BgpExtendedCommunityTransitive2OctetAsType value in the BgpExtendedCommunity object +func (obj *bgpExtendedCommunity) SetTransitive2OctetAsType(value BgpExtendedCommunityTransitive2OctetAsType) BgpExtendedCommunity { + obj.setChoice(BgpExtendedCommunityChoice.TRANSITIVE_2OCTET_AS_TYPE) + obj.transitive_2OctetAsTypeHolder = nil + obj.obj.Transitive_2OctetAsType = value.msg() + + return obj +} + +// description is TBD +// TransitiveIpv4AddressType returns a BgpExtendedCommunityTransitiveIpv4AddressType +func (obj *bgpExtendedCommunity) TransitiveIpv4AddressType() BgpExtendedCommunityTransitiveIpv4AddressType { + if obj.obj.TransitiveIpv4AddressType == nil { + obj.setChoice(BgpExtendedCommunityChoice.TRANSITIVE_IPV4_ADDRESS_TYPE) + } + if obj.transitiveIpv4AddressTypeHolder == nil { + obj.transitiveIpv4AddressTypeHolder = &bgpExtendedCommunityTransitiveIpv4AddressType{obj: obj.obj.TransitiveIpv4AddressType} + } + return obj.transitiveIpv4AddressTypeHolder +} + +// description is TBD +// TransitiveIpv4AddressType returns a BgpExtendedCommunityTransitiveIpv4AddressType +func (obj *bgpExtendedCommunity) HasTransitiveIpv4AddressType() bool { + return obj.obj.TransitiveIpv4AddressType != nil +} + +// description is TBD +// SetTransitiveIpv4AddressType sets the BgpExtendedCommunityTransitiveIpv4AddressType value in the BgpExtendedCommunity object +func (obj *bgpExtendedCommunity) SetTransitiveIpv4AddressType(value BgpExtendedCommunityTransitiveIpv4AddressType) BgpExtendedCommunity { + obj.setChoice(BgpExtendedCommunityChoice.TRANSITIVE_IPV4_ADDRESS_TYPE) + obj.transitiveIpv4AddressTypeHolder = nil + obj.obj.TransitiveIpv4AddressType = value.msg() + + return obj +} + +// description is TBD +// Transitive4OctetAsType returns a BgpExtendedCommunityTransitive4OctetAsType +func (obj *bgpExtendedCommunity) Transitive4OctetAsType() BgpExtendedCommunityTransitive4OctetAsType { + if obj.obj.Transitive_4OctetAsType == nil { + obj.setChoice(BgpExtendedCommunityChoice.TRANSITIVE_4OCTET_AS_TYPE) + } + if obj.transitive_4OctetAsTypeHolder == nil { + obj.transitive_4OctetAsTypeHolder = &bgpExtendedCommunityTransitive4OctetAsType{obj: obj.obj.Transitive_4OctetAsType} + } + return obj.transitive_4OctetAsTypeHolder +} + +// description is TBD +// Transitive4OctetAsType returns a BgpExtendedCommunityTransitive4OctetAsType +func (obj *bgpExtendedCommunity) HasTransitive4OctetAsType() bool { + return obj.obj.Transitive_4OctetAsType != nil +} + +// description is TBD +// SetTransitive4OctetAsType sets the BgpExtendedCommunityTransitive4OctetAsType value in the BgpExtendedCommunity object +func (obj *bgpExtendedCommunity) SetTransitive4OctetAsType(value BgpExtendedCommunityTransitive4OctetAsType) BgpExtendedCommunity { + obj.setChoice(BgpExtendedCommunityChoice.TRANSITIVE_4OCTET_AS_TYPE) + obj.transitive_4OctetAsTypeHolder = nil + obj.obj.Transitive_4OctetAsType = value.msg() + + return obj +} + +// description is TBD +// TransitiveOpaqueType returns a BgpExtendedCommunityTransitiveOpaqueType +func (obj *bgpExtendedCommunity) TransitiveOpaqueType() BgpExtendedCommunityTransitiveOpaqueType { + if obj.obj.TransitiveOpaqueType == nil { + obj.setChoice(BgpExtendedCommunityChoice.TRANSITIVE_OPAQUE_TYPE) + } + if obj.transitiveOpaqueTypeHolder == nil { + obj.transitiveOpaqueTypeHolder = &bgpExtendedCommunityTransitiveOpaqueType{obj: obj.obj.TransitiveOpaqueType} + } + return obj.transitiveOpaqueTypeHolder +} + +// description is TBD +// TransitiveOpaqueType returns a BgpExtendedCommunityTransitiveOpaqueType +func (obj *bgpExtendedCommunity) HasTransitiveOpaqueType() bool { + return obj.obj.TransitiveOpaqueType != nil +} + +// description is TBD +// SetTransitiveOpaqueType sets the BgpExtendedCommunityTransitiveOpaqueType value in the BgpExtendedCommunity object +func (obj *bgpExtendedCommunity) SetTransitiveOpaqueType(value BgpExtendedCommunityTransitiveOpaqueType) BgpExtendedCommunity { + obj.setChoice(BgpExtendedCommunityChoice.TRANSITIVE_OPAQUE_TYPE) + obj.transitiveOpaqueTypeHolder = nil + obj.obj.TransitiveOpaqueType = value.msg() + + return obj +} + +// description is TBD +// TransitiveEvpnType returns a BgpExtendedCommunityTransitiveEvpnType +func (obj *bgpExtendedCommunity) TransitiveEvpnType() BgpExtendedCommunityTransitiveEvpnType { + if obj.obj.TransitiveEvpnType == nil { + obj.setChoice(BgpExtendedCommunityChoice.TRANSITIVE_EVPN_TYPE) + } + if obj.transitiveEvpnTypeHolder == nil { + obj.transitiveEvpnTypeHolder = &bgpExtendedCommunityTransitiveEvpnType{obj: obj.obj.TransitiveEvpnType} + } + return obj.transitiveEvpnTypeHolder +} + +// description is TBD +// TransitiveEvpnType returns a BgpExtendedCommunityTransitiveEvpnType +func (obj *bgpExtendedCommunity) HasTransitiveEvpnType() bool { + return obj.obj.TransitiveEvpnType != nil +} + +// description is TBD +// SetTransitiveEvpnType sets the BgpExtendedCommunityTransitiveEvpnType value in the BgpExtendedCommunity object +func (obj *bgpExtendedCommunity) SetTransitiveEvpnType(value BgpExtendedCommunityTransitiveEvpnType) BgpExtendedCommunity { + obj.setChoice(BgpExtendedCommunityChoice.TRANSITIVE_EVPN_TYPE) + obj.transitiveEvpnTypeHolder = nil + obj.obj.TransitiveEvpnType = value.msg() + + return obj +} + +// description is TBD +// NonTransitive2OctetAsType returns a BgpExtendedCommunityNonTransitive2OctetAsType +func (obj *bgpExtendedCommunity) NonTransitive2OctetAsType() BgpExtendedCommunityNonTransitive2OctetAsType { + if obj.obj.NonTransitive_2OctetAsType == nil { + obj.setChoice(BgpExtendedCommunityChoice.NON_TRANSITIVE_2OCTET_AS_TYPE) + } + if obj.nonTransitive_2OctetAsTypeHolder == nil { + obj.nonTransitive_2OctetAsTypeHolder = &bgpExtendedCommunityNonTransitive2OctetAsType{obj: obj.obj.NonTransitive_2OctetAsType} + } + return obj.nonTransitive_2OctetAsTypeHolder +} + +// description is TBD +// NonTransitive2OctetAsType returns a BgpExtendedCommunityNonTransitive2OctetAsType +func (obj *bgpExtendedCommunity) HasNonTransitive2OctetAsType() bool { + return obj.obj.NonTransitive_2OctetAsType != nil +} + +// description is TBD +// SetNonTransitive2OctetAsType sets the BgpExtendedCommunityNonTransitive2OctetAsType value in the BgpExtendedCommunity object +func (obj *bgpExtendedCommunity) SetNonTransitive2OctetAsType(value BgpExtendedCommunityNonTransitive2OctetAsType) BgpExtendedCommunity { + obj.setChoice(BgpExtendedCommunityChoice.NON_TRANSITIVE_2OCTET_AS_TYPE) + obj.nonTransitive_2OctetAsTypeHolder = nil + obj.obj.NonTransitive_2OctetAsType = value.msg() + + return obj +} + +// description is TBD +// Custom returns a BgpExtendedCommunityCustomType +func (obj *bgpExtendedCommunity) Custom() BgpExtendedCommunityCustomType { + if obj.obj.Custom == nil { + obj.setChoice(BgpExtendedCommunityChoice.CUSTOM) + } + if obj.customHolder == nil { + obj.customHolder = &bgpExtendedCommunityCustomType{obj: obj.obj.Custom} + } + return obj.customHolder +} + +// description is TBD +// Custom returns a BgpExtendedCommunityCustomType +func (obj *bgpExtendedCommunity) HasCustom() bool { + return obj.obj.Custom != nil +} + +// description is TBD +// SetCustom sets the BgpExtendedCommunityCustomType value in the BgpExtendedCommunity object +func (obj *bgpExtendedCommunity) SetCustom(value BgpExtendedCommunityCustomType) BgpExtendedCommunity { + obj.setChoice(BgpExtendedCommunityChoice.CUSTOM) + obj.customHolder = nil + obj.obj.Custom = value.msg() + + return obj +} + +func (obj *bgpExtendedCommunity) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Transitive_2OctetAsType != nil { + + obj.Transitive2OctetAsType().validateObj(vObj, set_default) + } + + if obj.obj.TransitiveIpv4AddressType != nil { + + obj.TransitiveIpv4AddressType().validateObj(vObj, set_default) + } + + if obj.obj.Transitive_4OctetAsType != nil { + + obj.Transitive4OctetAsType().validateObj(vObj, set_default) + } + + if obj.obj.TransitiveOpaqueType != nil { + + obj.TransitiveOpaqueType().validateObj(vObj, set_default) + } + + if obj.obj.TransitiveEvpnType != nil { + + obj.TransitiveEvpnType().validateObj(vObj, set_default) + } + + if obj.obj.NonTransitive_2OctetAsType != nil { + + obj.NonTransitive2OctetAsType().validateObj(vObj, set_default) + } + + if obj.obj.Custom != nil { + + obj.Custom().validateObj(vObj, set_default) + } + +} + +func (obj *bgpExtendedCommunity) setDefault() { + var choices_set int = 0 + var choice BgpExtendedCommunityChoiceEnum + + if obj.obj.TransitiveIpv4AddressType != nil { + choices_set += 1 + choice = BgpExtendedCommunityChoice.TRANSITIVE_IPV4_ADDRESS_TYPE + } + + if obj.obj.TransitiveOpaqueType != nil { + choices_set += 1 + choice = BgpExtendedCommunityChoice.TRANSITIVE_OPAQUE_TYPE + } + + if obj.obj.TransitiveEvpnType != nil { + choices_set += 1 + choice = BgpExtendedCommunityChoice.TRANSITIVE_EVPN_TYPE + } + + if obj.obj.Custom != nil { + choices_set += 1 + choice = BgpExtendedCommunityChoice.CUSTOM + } + + if obj.obj.Transitive_2OctetAsType != nil { + choices_set += 1 + choice = BgpExtendedCommunityChoice.TRANSITIVE_2OCTET_AS_TYPE + } + + if obj.obj.Transitive_4OctetAsType != nil { + choices_set += 1 + choice = BgpExtendedCommunityChoice.TRANSITIVE_4OCTET_AS_TYPE + } + + if obj.obj.NonTransitive_2OctetAsType != nil { + choices_set += 1 + choice = BgpExtendedCommunityChoice.NON_TRANSITIVE_2OCTET_AS_TYPE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(BgpExtendedCommunityChoice.TRANSITIVE_2OCTET_AS_TYPE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpExtendedCommunity") + } + } else { + intVal := otg.BgpExtendedCommunity_Choice_Enum_value[string(choice)] + enumValue := otg.BgpExtendedCommunity_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_extended_community_custom_type.go b/gosnappi/bgp_extended_community_custom_type.go new file mode 100644 index 00000000..066b9b2a --- /dev/null +++ b/gosnappi/bgp_extended_community_custom_type.go @@ -0,0 +1,407 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityCustomType ***** +type bgpExtendedCommunityCustomType struct { + validation + obj *otg.BgpExtendedCommunityCustomType + marshaller marshalBgpExtendedCommunityCustomType + unMarshaller unMarshalBgpExtendedCommunityCustomType +} + +func NewBgpExtendedCommunityCustomType() BgpExtendedCommunityCustomType { + obj := bgpExtendedCommunityCustomType{obj: &otg.BgpExtendedCommunityCustomType{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityCustomType) msg() *otg.BgpExtendedCommunityCustomType { + return obj.obj +} + +func (obj *bgpExtendedCommunityCustomType) setMsg(msg *otg.BgpExtendedCommunityCustomType) BgpExtendedCommunityCustomType { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityCustomType struct { + obj *bgpExtendedCommunityCustomType +} + +type marshalBgpExtendedCommunityCustomType interface { + // ToProto marshals BgpExtendedCommunityCustomType to protobuf object *otg.BgpExtendedCommunityCustomType + ToProto() (*otg.BgpExtendedCommunityCustomType, error) + // ToPbText marshals BgpExtendedCommunityCustomType to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityCustomType to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityCustomType to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityCustomType struct { + obj *bgpExtendedCommunityCustomType +} + +type unMarshalBgpExtendedCommunityCustomType interface { + // FromProto unmarshals BgpExtendedCommunityCustomType from protobuf object *otg.BgpExtendedCommunityCustomType + FromProto(msg *otg.BgpExtendedCommunityCustomType) (BgpExtendedCommunityCustomType, error) + // FromPbText unmarshals BgpExtendedCommunityCustomType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityCustomType from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityCustomType from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityCustomType) Marshal() marshalBgpExtendedCommunityCustomType { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityCustomType{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityCustomType) Unmarshal() unMarshalBgpExtendedCommunityCustomType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityCustomType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityCustomType) ToProto() (*otg.BgpExtendedCommunityCustomType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityCustomType) FromProto(msg *otg.BgpExtendedCommunityCustomType) (BgpExtendedCommunityCustomType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityCustomType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityCustomType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityCustomType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityCustomType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityCustomType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityCustomType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityCustomType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityCustomType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityCustomType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityCustomType) Clone() (BgpExtendedCommunityCustomType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityCustomType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpExtendedCommunityCustomType is add a custom Extended Community with a combination of types , sub-types and values not explicitly specified above or not defined yet. +type BgpExtendedCommunityCustomType interface { + Validation + // msg marshals BgpExtendedCommunityCustomType to protobuf object *otg.BgpExtendedCommunityCustomType + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityCustomType + // setMsg unmarshals BgpExtendedCommunityCustomType from protobuf object *otg.BgpExtendedCommunityCustomType + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityCustomType) BgpExtendedCommunityCustomType + // provides marshal interface + Marshal() marshalBgpExtendedCommunityCustomType + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityCustomType + // validate validates BgpExtendedCommunityCustomType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityCustomType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // CommunityType returns string, set in BgpExtendedCommunityCustomType. + CommunityType() string + // SetCommunityType assigns string provided by user to BgpExtendedCommunityCustomType + SetCommunityType(value string) BgpExtendedCommunityCustomType + // HasCommunityType checks if CommunityType has been set in BgpExtendedCommunityCustomType + HasCommunityType() bool + // CommunitySubtype returns string, set in BgpExtendedCommunityCustomType. + CommunitySubtype() string + // SetCommunitySubtype assigns string provided by user to BgpExtendedCommunityCustomType + SetCommunitySubtype(value string) BgpExtendedCommunityCustomType + // HasCommunitySubtype checks if CommunitySubtype has been set in BgpExtendedCommunityCustomType + HasCommunitySubtype() bool + // Value returns string, set in BgpExtendedCommunityCustomType. + Value() string + // SetValue assigns string provided by user to BgpExtendedCommunityCustomType + SetValue(value string) BgpExtendedCommunityCustomType + // HasValue checks if Value has been set in BgpExtendedCommunityCustomType + HasValue() bool +} + +// The type to be set in the Extended Community attribute. Accepts hexadecimal input upto ff . +// CommunityType returns a string +func (obj *bgpExtendedCommunityCustomType) CommunityType() string { + + return *obj.obj.CommunityType + +} + +// The type to be set in the Extended Community attribute. Accepts hexadecimal input upto ff . +// CommunityType returns a string +func (obj *bgpExtendedCommunityCustomType) HasCommunityType() bool { + return obj.obj.CommunityType != nil +} + +// The type to be set in the Extended Community attribute. Accepts hexadecimal input upto ff . +// SetCommunityType sets the string value in the BgpExtendedCommunityCustomType object +func (obj *bgpExtendedCommunityCustomType) SetCommunityType(value string) BgpExtendedCommunityCustomType { + + obj.obj.CommunityType = &value + return obj +} + +// The sub-type to be set in the Extended Community attribute. For certain types with no sub-type this byte can also be used as part of an extended value field. Accepts hexadecimal input upto ff. +// CommunitySubtype returns a string +func (obj *bgpExtendedCommunityCustomType) CommunitySubtype() string { + + return *obj.obj.CommunitySubtype + +} + +// The sub-type to be set in the Extended Community attribute. For certain types with no sub-type this byte can also be used as part of an extended value field. Accepts hexadecimal input upto ff. +// CommunitySubtype returns a string +func (obj *bgpExtendedCommunityCustomType) HasCommunitySubtype() bool { + return obj.obj.CommunitySubtype != nil +} + +// The sub-type to be set in the Extended Community attribute. For certain types with no sub-type this byte can also be used as part of an extended value field. Accepts hexadecimal input upto ff. +// SetCommunitySubtype sets the string value in the BgpExtendedCommunityCustomType object +func (obj *bgpExtendedCommunityCustomType) SetCommunitySubtype(value string) BgpExtendedCommunityCustomType { + + obj.obj.CommunitySubtype = &value + return obj +} + +// 6 byte hex value to be carried in the last 6 bytes of the Extended Community. Accepts hexadecimal input upto ffffffffffff. +// Value returns a string +func (obj *bgpExtendedCommunityCustomType) Value() string { + + return *obj.obj.Value + +} + +// 6 byte hex value to be carried in the last 6 bytes of the Extended Community. Accepts hexadecimal input upto ffffffffffff. +// Value returns a string +func (obj *bgpExtendedCommunityCustomType) HasValue() bool { + return obj.obj.Value != nil +} + +// 6 byte hex value to be carried in the last 6 bytes of the Extended Community. Accepts hexadecimal input upto ffffffffffff. +// SetValue sets the string value in the BgpExtendedCommunityCustomType object +func (obj *bgpExtendedCommunityCustomType) SetValue(value string) BgpExtendedCommunityCustomType { + + obj.obj.Value = &value + return obj +} + +func (obj *bgpExtendedCommunityCustomType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.CommunityType != nil { + + if len(*obj.obj.CommunityType) > 2 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "None <= length of BgpExtendedCommunityCustomType.CommunityType <= 2 but Got %d", + len(*obj.obj.CommunityType))) + } + + } + + if obj.obj.CommunitySubtype != nil { + + if len(*obj.obj.CommunitySubtype) > 2 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "None <= length of BgpExtendedCommunityCustomType.CommunitySubtype <= 2 but Got %d", + len(*obj.obj.CommunitySubtype))) + } + + } + + if obj.obj.Value != nil { + + if len(*obj.obj.Value) > 12 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "None <= length of BgpExtendedCommunityCustomType.Value <= 12 but Got %d", + len(*obj.obj.Value))) + } + + } + +} + +func (obj *bgpExtendedCommunityCustomType) setDefault() { + if obj.obj.CommunityType == nil { + obj.SetCommunityType("00") + } + if obj.obj.CommunitySubtype == nil { + obj.SetCommunitySubtype("00") + } + if obj.obj.Value == nil { + obj.SetValue("000000000000") + } + +} diff --git a/gosnappi/bgp_extended_community_non_transitive2_octet_as_type.go b/gosnappi/bgp_extended_community_non_transitive2_octet_as_type.go new file mode 100644 index 00000000..60ca714b --- /dev/null +++ b/gosnappi/bgp_extended_community_non_transitive2_octet_as_type.go @@ -0,0 +1,396 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityNonTransitive2OctetAsType ***** +type bgpExtendedCommunityNonTransitive2OctetAsType struct { + validation + obj *otg.BgpExtendedCommunityNonTransitive2OctetAsType + marshaller marshalBgpExtendedCommunityNonTransitive2OctetAsType + unMarshaller unMarshalBgpExtendedCommunityNonTransitive2OctetAsType + linkBandwidthSubtypeHolder BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth +} + +func NewBgpExtendedCommunityNonTransitive2OctetAsType() BgpExtendedCommunityNonTransitive2OctetAsType { + obj := bgpExtendedCommunityNonTransitive2OctetAsType{obj: &otg.BgpExtendedCommunityNonTransitive2OctetAsType{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) msg() *otg.BgpExtendedCommunityNonTransitive2OctetAsType { + return obj.obj +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) setMsg(msg *otg.BgpExtendedCommunityNonTransitive2OctetAsType) BgpExtendedCommunityNonTransitive2OctetAsType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityNonTransitive2OctetAsType struct { + obj *bgpExtendedCommunityNonTransitive2OctetAsType +} + +type marshalBgpExtendedCommunityNonTransitive2OctetAsType interface { + // ToProto marshals BgpExtendedCommunityNonTransitive2OctetAsType to protobuf object *otg.BgpExtendedCommunityNonTransitive2OctetAsType + ToProto() (*otg.BgpExtendedCommunityNonTransitive2OctetAsType, error) + // ToPbText marshals BgpExtendedCommunityNonTransitive2OctetAsType to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityNonTransitive2OctetAsType to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityNonTransitive2OctetAsType to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityNonTransitive2OctetAsType struct { + obj *bgpExtendedCommunityNonTransitive2OctetAsType +} + +type unMarshalBgpExtendedCommunityNonTransitive2OctetAsType interface { + // FromProto unmarshals BgpExtendedCommunityNonTransitive2OctetAsType from protobuf object *otg.BgpExtendedCommunityNonTransitive2OctetAsType + FromProto(msg *otg.BgpExtendedCommunityNonTransitive2OctetAsType) (BgpExtendedCommunityNonTransitive2OctetAsType, error) + // FromPbText unmarshals BgpExtendedCommunityNonTransitive2OctetAsType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityNonTransitive2OctetAsType from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityNonTransitive2OctetAsType from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) Marshal() marshalBgpExtendedCommunityNonTransitive2OctetAsType { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityNonTransitive2OctetAsType{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) Unmarshal() unMarshalBgpExtendedCommunityNonTransitive2OctetAsType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityNonTransitive2OctetAsType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityNonTransitive2OctetAsType) ToProto() (*otg.BgpExtendedCommunityNonTransitive2OctetAsType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityNonTransitive2OctetAsType) FromProto(msg *otg.BgpExtendedCommunityNonTransitive2OctetAsType) (BgpExtendedCommunityNonTransitive2OctetAsType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityNonTransitive2OctetAsType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityNonTransitive2OctetAsType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityNonTransitive2OctetAsType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityNonTransitive2OctetAsType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityNonTransitive2OctetAsType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityNonTransitive2OctetAsType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) Clone() (BgpExtendedCommunityNonTransitive2OctetAsType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityNonTransitive2OctetAsType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) setNil() { + obj.linkBandwidthSubtypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpExtendedCommunityNonTransitive2OctetAsType is the Non-Transitive Two-Octet AS-Specific Extended Community is sent as type 0x40. +type BgpExtendedCommunityNonTransitive2OctetAsType interface { + Validation + // msg marshals BgpExtendedCommunityNonTransitive2OctetAsType to protobuf object *otg.BgpExtendedCommunityNonTransitive2OctetAsType + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityNonTransitive2OctetAsType + // setMsg unmarshals BgpExtendedCommunityNonTransitive2OctetAsType from protobuf object *otg.BgpExtendedCommunityNonTransitive2OctetAsType + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityNonTransitive2OctetAsType) BgpExtendedCommunityNonTransitive2OctetAsType + // provides marshal interface + Marshal() marshalBgpExtendedCommunityNonTransitive2OctetAsType + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityNonTransitive2OctetAsType + // validate validates BgpExtendedCommunityNonTransitive2OctetAsType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityNonTransitive2OctetAsType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum, set in BgpExtendedCommunityNonTransitive2OctetAsType + Choice() BgpExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum + // setChoice assigns BgpExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum provided by user to BgpExtendedCommunityNonTransitive2OctetAsType + setChoice(value BgpExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum) BgpExtendedCommunityNonTransitive2OctetAsType + // HasChoice checks if Choice has been set in BgpExtendedCommunityNonTransitive2OctetAsType + HasChoice() bool + // LinkBandwidthSubtype returns BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth, set in BgpExtendedCommunityNonTransitive2OctetAsType. + // BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth is the Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. It is sent with sub-type as 0x04. + LinkBandwidthSubtype() BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // SetLinkBandwidthSubtype assigns BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth provided by user to BgpExtendedCommunityNonTransitive2OctetAsType. + // BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth is the Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. It is sent with sub-type as 0x04. + SetLinkBandwidthSubtype(value BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) BgpExtendedCommunityNonTransitive2OctetAsType + // HasLinkBandwidthSubtype checks if LinkBandwidthSubtype has been set in BgpExtendedCommunityNonTransitive2OctetAsType + HasLinkBandwidthSubtype() bool + setNil() +} + +type BgpExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum string + +// Enum of Choice on BgpExtendedCommunityNonTransitive2OctetAsType +var BgpExtendedCommunityNonTransitive2OctetAsTypeChoice = struct { + LINK_BANDWIDTH_SUBTYPE BgpExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum +}{ + LINK_BANDWIDTH_SUBTYPE: BgpExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum("link_bandwidth_subtype"), +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) Choice() BgpExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum { + return BgpExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) setChoice(value BgpExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum) BgpExtendedCommunityNonTransitive2OctetAsType { + intValue, ok := otg.BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.LinkBandwidthSubtype = nil + obj.linkBandwidthSubtypeHolder = nil + + if value == BgpExtendedCommunityNonTransitive2OctetAsTypeChoice.LINK_BANDWIDTH_SUBTYPE { + obj.obj.LinkBandwidthSubtype = NewBgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth().msg() + } + + return obj +} + +// description is TBD +// LinkBandwidthSubtype returns a BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) LinkBandwidthSubtype() BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + if obj.obj.LinkBandwidthSubtype == nil { + obj.setChoice(BgpExtendedCommunityNonTransitive2OctetAsTypeChoice.LINK_BANDWIDTH_SUBTYPE) + } + if obj.linkBandwidthSubtypeHolder == nil { + obj.linkBandwidthSubtypeHolder = &bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth{obj: obj.obj.LinkBandwidthSubtype} + } + return obj.linkBandwidthSubtypeHolder +} + +// description is TBD +// LinkBandwidthSubtype returns a BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) HasLinkBandwidthSubtype() bool { + return obj.obj.LinkBandwidthSubtype != nil +} + +// description is TBD +// SetLinkBandwidthSubtype sets the BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth value in the BgpExtendedCommunityNonTransitive2OctetAsType object +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) SetLinkBandwidthSubtype(value BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) BgpExtendedCommunityNonTransitive2OctetAsType { + obj.setChoice(BgpExtendedCommunityNonTransitive2OctetAsTypeChoice.LINK_BANDWIDTH_SUBTYPE) + obj.linkBandwidthSubtypeHolder = nil + obj.obj.LinkBandwidthSubtype = value.msg() + + return obj +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.LinkBandwidthSubtype != nil { + + obj.LinkBandwidthSubtype().validateObj(vObj, set_default) + } + +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsType) setDefault() { + var choices_set int = 0 + var choice BgpExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum + + if obj.obj.LinkBandwidthSubtype != nil { + choices_set += 1 + choice = BgpExtendedCommunityNonTransitive2OctetAsTypeChoice.LINK_BANDWIDTH_SUBTYPE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(BgpExtendedCommunityNonTransitive2OctetAsTypeChoice.LINK_BANDWIDTH_SUBTYPE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpExtendedCommunityNonTransitive2OctetAsType") + } + } else { + intVal := otg.BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum_value[string(choice)] + enumValue := otg.BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_extended_community_non_transitive2_octet_as_type_link_bandwidth.go b/gosnappi/bgp_extended_community_non_transitive2_octet_as_type_link_bandwidth.go new file mode 100644 index 00000000..1f7c9085 --- /dev/null +++ b/gosnappi/bgp_extended_community_non_transitive2_octet_as_type_link_bandwidth.go @@ -0,0 +1,350 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth ***** +type bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth struct { + validation + obj *otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + marshaller marshalBgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + unMarshaller unMarshalBgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth +} + +func NewBgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth() BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + obj := bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth{obj: &otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) msg() *otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + return obj.obj +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) setMsg(msg *otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth struct { + obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth +} + +type marshalBgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth interface { + // ToProto marshals BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth to protobuf object *otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + ToProto() (*otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth, error) + // ToPbText marshals BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth struct { + obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth +} + +type unMarshalBgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth interface { + // FromProto unmarshals BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth from protobuf object *otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + FromProto(msg *otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) (BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth, error) + // FromPbText unmarshals BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Marshal() marshalBgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Unmarshal() unMarshalBgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ToProto() (*otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) FromProto(msg *otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) (BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Clone() (BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth is the Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. It is sent with sub-type as 0x04. +type BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth interface { + Validation + // msg marshals BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth to protobuf object *otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // setMsg unmarshals BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth from protobuf object *otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // provides marshal interface + Marshal() marshalBgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // validate validates BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Global2ByteAs returns uint32, set in BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth. + Global2ByteAs() uint32 + // SetGlobal2ByteAs assigns uint32 provided by user to BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + SetGlobal2ByteAs(value uint32) BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // HasGlobal2ByteAs checks if Global2ByteAs has been set in BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + HasGlobal2ByteAs() bool + // Bandwidth returns float32, set in BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth. + Bandwidth() float32 + // SetBandwidth assigns float32 provided by user to BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + SetBandwidth(value float32) BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // HasBandwidth checks if Bandwidth has been set in BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + HasBandwidth() bool +} + +// The value of the Global Administrator subfield should represent the Autonomous System of the router that attaches the Link Bandwidth Community. If four octet AS numbering scheme is used, AS_TRANS (23456) should be used. +// Global2ByteAs returns a uint32 +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Global2ByteAs() uint32 { + + return *obj.obj.Global_2ByteAs + +} + +// The value of the Global Administrator subfield should represent the Autonomous System of the router that attaches the Link Bandwidth Community. If four octet AS numbering scheme is used, AS_TRANS (23456) should be used. +// Global2ByteAs returns a uint32 +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) HasGlobal2ByteAs() bool { + return obj.obj.Global_2ByteAs != nil +} + +// The value of the Global Administrator subfield should represent the Autonomous System of the router that attaches the Link Bandwidth Community. If four octet AS numbering scheme is used, AS_TRANS (23456) should be used. +// SetGlobal2ByteAs sets the uint32 value in the BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth object +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) SetGlobal2ByteAs(value uint32) BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + + obj.obj.Global_2ByteAs = &value + return obj +} + +// Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and 1 Mbps is 1000 Kbps per second ) +// Bandwidth returns a float32 +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Bandwidth() float32 { + + return *obj.obj.Bandwidth + +} + +// Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and 1 Mbps is 1000 Kbps per second ) +// Bandwidth returns a float32 +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) HasBandwidth() bool { + return obj.obj.Bandwidth != nil +} + +// Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and 1 Mbps is 1000 Kbps per second ) +// SetBandwidth sets the float32 value in the BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth object +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) SetBandwidth(value float32) BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + + obj.obj.Bandwidth = &value + return obj +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Global_2ByteAs != nil { + + if *obj.obj.Global_2ByteAs > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth.Global_2ByteAs <= 65535 but Got %d", *obj.obj.Global_2ByteAs)) + } + + } + +} + +func (obj *bgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) setDefault() { + if obj.obj.Global_2ByteAs == nil { + obj.SetGlobal2ByteAs(100) + } + if obj.obj.Bandwidth == nil { + obj.SetBandwidth(0) + } + +} diff --git a/gosnappi/bgp_extended_community_transitive2_octet_as_type.go b/gosnappi/bgp_extended_community_transitive2_octet_as_type.go new file mode 100644 index 00000000..f8b40d1d --- /dev/null +++ b/gosnappi/bgp_extended_community_transitive2_octet_as_type.go @@ -0,0 +1,452 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityTransitive2OctetAsType ***** +type bgpExtendedCommunityTransitive2OctetAsType struct { + validation + obj *otg.BgpExtendedCommunityTransitive2OctetAsType + marshaller marshalBgpExtendedCommunityTransitive2OctetAsType + unMarshaller unMarshalBgpExtendedCommunityTransitive2OctetAsType + routeTargetSubtypeHolder BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + routeOriginSubtypeHolder BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin +} + +func NewBgpExtendedCommunityTransitive2OctetAsType() BgpExtendedCommunityTransitive2OctetAsType { + obj := bgpExtendedCommunityTransitive2OctetAsType{obj: &otg.BgpExtendedCommunityTransitive2OctetAsType{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsType) msg() *otg.BgpExtendedCommunityTransitive2OctetAsType { + return obj.obj +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsType) setMsg(msg *otg.BgpExtendedCommunityTransitive2OctetAsType) BgpExtendedCommunityTransitive2OctetAsType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityTransitive2OctetAsType struct { + obj *bgpExtendedCommunityTransitive2OctetAsType +} + +type marshalBgpExtendedCommunityTransitive2OctetAsType interface { + // ToProto marshals BgpExtendedCommunityTransitive2OctetAsType to protobuf object *otg.BgpExtendedCommunityTransitive2OctetAsType + ToProto() (*otg.BgpExtendedCommunityTransitive2OctetAsType, error) + // ToPbText marshals BgpExtendedCommunityTransitive2OctetAsType to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityTransitive2OctetAsType to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityTransitive2OctetAsType to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityTransitive2OctetAsType struct { + obj *bgpExtendedCommunityTransitive2OctetAsType +} + +type unMarshalBgpExtendedCommunityTransitive2OctetAsType interface { + // FromProto unmarshals BgpExtendedCommunityTransitive2OctetAsType from protobuf object *otg.BgpExtendedCommunityTransitive2OctetAsType + FromProto(msg *otg.BgpExtendedCommunityTransitive2OctetAsType) (BgpExtendedCommunityTransitive2OctetAsType, error) + // FromPbText unmarshals BgpExtendedCommunityTransitive2OctetAsType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityTransitive2OctetAsType from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityTransitive2OctetAsType from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsType) Marshal() marshalBgpExtendedCommunityTransitive2OctetAsType { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityTransitive2OctetAsType{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsType) Unmarshal() unMarshalBgpExtendedCommunityTransitive2OctetAsType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityTransitive2OctetAsType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityTransitive2OctetAsType) ToProto() (*otg.BgpExtendedCommunityTransitive2OctetAsType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive2OctetAsType) FromProto(msg *otg.BgpExtendedCommunityTransitive2OctetAsType) (BgpExtendedCommunityTransitive2OctetAsType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityTransitive2OctetAsType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive2OctetAsType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityTransitive2OctetAsType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive2OctetAsType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityTransitive2OctetAsType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive2OctetAsType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsType) Clone() (BgpExtendedCommunityTransitive2OctetAsType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityTransitive2OctetAsType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsType) setNil() { + obj.routeTargetSubtypeHolder = nil + obj.routeOriginSubtypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpExtendedCommunityTransitive2OctetAsType is the Transitive Two-Octet AS-Specific Extended Community is sent as type 0x00 . +type BgpExtendedCommunityTransitive2OctetAsType interface { + Validation + // msg marshals BgpExtendedCommunityTransitive2OctetAsType to protobuf object *otg.BgpExtendedCommunityTransitive2OctetAsType + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityTransitive2OctetAsType + // setMsg unmarshals BgpExtendedCommunityTransitive2OctetAsType from protobuf object *otg.BgpExtendedCommunityTransitive2OctetAsType + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityTransitive2OctetAsType) BgpExtendedCommunityTransitive2OctetAsType + // provides marshal interface + Marshal() marshalBgpExtendedCommunityTransitive2OctetAsType + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityTransitive2OctetAsType + // validate validates BgpExtendedCommunityTransitive2OctetAsType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityTransitive2OctetAsType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpExtendedCommunityTransitive2OctetAsTypeChoiceEnum, set in BgpExtendedCommunityTransitive2OctetAsType + Choice() BgpExtendedCommunityTransitive2OctetAsTypeChoiceEnum + // setChoice assigns BgpExtendedCommunityTransitive2OctetAsTypeChoiceEnum provided by user to BgpExtendedCommunityTransitive2OctetAsType + setChoice(value BgpExtendedCommunityTransitive2OctetAsTypeChoiceEnum) BgpExtendedCommunityTransitive2OctetAsType + // HasChoice checks if Choice has been set in BgpExtendedCommunityTransitive2OctetAsType + HasChoice() bool + // RouteTargetSubtype returns BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget, set in BgpExtendedCommunityTransitive2OctetAsType. + // BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02. + RouteTargetSubtype() BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + // SetRouteTargetSubtype assigns BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget provided by user to BgpExtendedCommunityTransitive2OctetAsType. + // BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02. + SetRouteTargetSubtype(value BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) BgpExtendedCommunityTransitive2OctetAsType + // HasRouteTargetSubtype checks if RouteTargetSubtype has been set in BgpExtendedCommunityTransitive2OctetAsType + HasRouteTargetSubtype() bool + // RouteOriginSubtype returns BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin, set in BgpExtendedCommunityTransitive2OctetAsType. + // BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03 . + RouteOriginSubtype() BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // SetRouteOriginSubtype assigns BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin provided by user to BgpExtendedCommunityTransitive2OctetAsType. + // BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03 . + SetRouteOriginSubtype(value BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) BgpExtendedCommunityTransitive2OctetAsType + // HasRouteOriginSubtype checks if RouteOriginSubtype has been set in BgpExtendedCommunityTransitive2OctetAsType + HasRouteOriginSubtype() bool + setNil() +} + +type BgpExtendedCommunityTransitive2OctetAsTypeChoiceEnum string + +// Enum of Choice on BgpExtendedCommunityTransitive2OctetAsType +var BgpExtendedCommunityTransitive2OctetAsTypeChoice = struct { + ROUTE_TARGET_SUBTYPE BgpExtendedCommunityTransitive2OctetAsTypeChoiceEnum + ROUTE_ORIGIN_SUBTYPE BgpExtendedCommunityTransitive2OctetAsTypeChoiceEnum +}{ + ROUTE_TARGET_SUBTYPE: BgpExtendedCommunityTransitive2OctetAsTypeChoiceEnum("route_target_subtype"), + ROUTE_ORIGIN_SUBTYPE: BgpExtendedCommunityTransitive2OctetAsTypeChoiceEnum("route_origin_subtype"), +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsType) Choice() BgpExtendedCommunityTransitive2OctetAsTypeChoiceEnum { + return BgpExtendedCommunityTransitive2OctetAsTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *bgpExtendedCommunityTransitive2OctetAsType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsType) setChoice(value BgpExtendedCommunityTransitive2OctetAsTypeChoiceEnum) BgpExtendedCommunityTransitive2OctetAsType { + intValue, ok := otg.BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpExtendedCommunityTransitive2OctetAsTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.RouteOriginSubtype = nil + obj.routeOriginSubtypeHolder = nil + obj.obj.RouteTargetSubtype = nil + obj.routeTargetSubtypeHolder = nil + + if value == BgpExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE { + obj.obj.RouteTargetSubtype = NewBgpExtendedCommunityTransitive2OctetAsTypeRouteTarget().msg() + } + + if value == BgpExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE { + obj.obj.RouteOriginSubtype = NewBgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin().msg() + } + + return obj +} + +// description is TBD +// RouteTargetSubtype returns a BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget +func (obj *bgpExtendedCommunityTransitive2OctetAsType) RouteTargetSubtype() BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget { + if obj.obj.RouteTargetSubtype == nil { + obj.setChoice(BgpExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE) + } + if obj.routeTargetSubtypeHolder == nil { + obj.routeTargetSubtypeHolder = &bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget{obj: obj.obj.RouteTargetSubtype} + } + return obj.routeTargetSubtypeHolder +} + +// description is TBD +// RouteTargetSubtype returns a BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget +func (obj *bgpExtendedCommunityTransitive2OctetAsType) HasRouteTargetSubtype() bool { + return obj.obj.RouteTargetSubtype != nil +} + +// description is TBD +// SetRouteTargetSubtype sets the BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget value in the BgpExtendedCommunityTransitive2OctetAsType object +func (obj *bgpExtendedCommunityTransitive2OctetAsType) SetRouteTargetSubtype(value BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) BgpExtendedCommunityTransitive2OctetAsType { + obj.setChoice(BgpExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE) + obj.routeTargetSubtypeHolder = nil + obj.obj.RouteTargetSubtype = value.msg() + + return obj +} + +// description is TBD +// RouteOriginSubtype returns a BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin +func (obj *bgpExtendedCommunityTransitive2OctetAsType) RouteOriginSubtype() BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + if obj.obj.RouteOriginSubtype == nil { + obj.setChoice(BgpExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE) + } + if obj.routeOriginSubtypeHolder == nil { + obj.routeOriginSubtypeHolder = &bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin{obj: obj.obj.RouteOriginSubtype} + } + return obj.routeOriginSubtypeHolder +} + +// description is TBD +// RouteOriginSubtype returns a BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin +func (obj *bgpExtendedCommunityTransitive2OctetAsType) HasRouteOriginSubtype() bool { + return obj.obj.RouteOriginSubtype != nil +} + +// description is TBD +// SetRouteOriginSubtype sets the BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin value in the BgpExtendedCommunityTransitive2OctetAsType object +func (obj *bgpExtendedCommunityTransitive2OctetAsType) SetRouteOriginSubtype(value BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) BgpExtendedCommunityTransitive2OctetAsType { + obj.setChoice(BgpExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE) + obj.routeOriginSubtypeHolder = nil + obj.obj.RouteOriginSubtype = value.msg() + + return obj +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RouteTargetSubtype != nil { + + obj.RouteTargetSubtype().validateObj(vObj, set_default) + } + + if obj.obj.RouteOriginSubtype != nil { + + obj.RouteOriginSubtype().validateObj(vObj, set_default) + } + +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsType) setDefault() { + var choices_set int = 0 + var choice BgpExtendedCommunityTransitive2OctetAsTypeChoiceEnum + + if obj.obj.RouteTargetSubtype != nil { + choices_set += 1 + choice = BgpExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE + } + + if obj.obj.RouteOriginSubtype != nil { + choices_set += 1 + choice = BgpExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(BgpExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpExtendedCommunityTransitive2OctetAsType") + } + } else { + intVal := otg.BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum_value[string(choice)] + enumValue := otg.BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_extended_community_transitive2_octet_as_type_route_origin.go b/gosnappi/bgp_extended_community_transitive2_octet_as_type_route_origin.go new file mode 100644 index 00000000..50714b68 --- /dev/null +++ b/gosnappi/bgp_extended_community_transitive2_octet_as_type_route_origin.go @@ -0,0 +1,350 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin ***** +type bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin struct { + validation + obj *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + marshaller marshalBgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + unMarshaller unMarshalBgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin +} + +func NewBgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin() BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + obj := bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin{obj: &otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) msg() *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + return obj.obj +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) setMsg(msg *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin struct { + obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin +} + +type marshalBgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin interface { + // ToProto marshals BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin to protobuf object *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + ToProto() (*otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin, error) + // ToPbText marshals BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin struct { + obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin +} + +type unMarshalBgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin interface { + // FromProto unmarshals BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin from protobuf object *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + FromProto(msg *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) (BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin, error) + // FromPbText unmarshals BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Marshal() marshalBgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Unmarshal() unMarshalBgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ToProto() (*otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) FromProto(msg *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) (BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Clone() (BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03 . +type BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin interface { + Validation + // msg marshals BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin to protobuf object *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // setMsg unmarshals BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin from protobuf object *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // provides marshal interface + Marshal() marshalBgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // validate validates BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Global2ByteAs returns uint32, set in BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin. + Global2ByteAs() uint32 + // SetGlobal2ByteAs assigns uint32 provided by user to BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + SetGlobal2ByteAs(value uint32) BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // HasGlobal2ByteAs checks if Global2ByteAs has been set in BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + HasGlobal2ByteAs() bool + // Local4ByteAdmin returns uint32, set in BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin. + Local4ByteAdmin() uint32 + // SetLocal4ByteAdmin assigns uint32 provided by user to BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + SetLocal4ByteAdmin(value uint32) BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // HasLocal4ByteAdmin checks if Local4ByteAdmin has been set in BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + HasLocal4ByteAdmin() bool +} + +// The two octet IANA assigned AS value assigned to the Autonomous System. +// Global2ByteAs returns a uint32 +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Global2ByteAs() uint32 { + + return *obj.obj.Global_2ByteAs + +} + +// The two octet IANA assigned AS value assigned to the Autonomous System. +// Global2ByteAs returns a uint32 +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) HasGlobal2ByteAs() bool { + return obj.obj.Global_2ByteAs != nil +} + +// The two octet IANA assigned AS value assigned to the Autonomous System. +// SetGlobal2ByteAs sets the uint32 value in the BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin object +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) SetGlobal2ByteAs(value uint32) BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + + obj.obj.Global_2ByteAs = &value + return obj +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local4ByteAdmin returns a uint32 +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Local4ByteAdmin() uint32 { + + return *obj.obj.Local_4ByteAdmin + +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local4ByteAdmin returns a uint32 +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) HasLocal4ByteAdmin() bool { + return obj.obj.Local_4ByteAdmin != nil +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// SetLocal4ByteAdmin sets the uint32 value in the BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin object +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) SetLocal4ByteAdmin(value uint32) BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + + obj.obj.Local_4ByteAdmin = &value + return obj +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Global_2ByteAs != nil { + + if *obj.obj.Global_2ByteAs > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin.Global_2ByteAs <= 65535 but Got %d", *obj.obj.Global_2ByteAs)) + } + + } + +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) setDefault() { + if obj.obj.Global_2ByteAs == nil { + obj.SetGlobal2ByteAs(100) + } + if obj.obj.Local_4ByteAdmin == nil { + obj.SetLocal4ByteAdmin(1) + } + +} diff --git a/gosnappi/bgp_extended_community_transitive2_octet_as_type_route_target.go b/gosnappi/bgp_extended_community_transitive2_octet_as_type_route_target.go new file mode 100644 index 00000000..ef6226ce --- /dev/null +++ b/gosnappi/bgp_extended_community_transitive2_octet_as_type_route_target.go @@ -0,0 +1,350 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget ***** +type bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget struct { + validation + obj *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + marshaller marshalBgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + unMarshaller unMarshalBgpExtendedCommunityTransitive2OctetAsTypeRouteTarget +} + +func NewBgpExtendedCommunityTransitive2OctetAsTypeRouteTarget() BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget { + obj := bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget{obj: &otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) msg() *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget { + return obj.obj +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) setMsg(msg *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityTransitive2OctetAsTypeRouteTarget struct { + obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget +} + +type marshalBgpExtendedCommunityTransitive2OctetAsTypeRouteTarget interface { + // ToProto marshals BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget to protobuf object *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + ToProto() (*otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget, error) + // ToPbText marshals BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityTransitive2OctetAsTypeRouteTarget struct { + obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget +} + +type unMarshalBgpExtendedCommunityTransitive2OctetAsTypeRouteTarget interface { + // FromProto unmarshals BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget from protobuf object *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + FromProto(msg *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) (BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget, error) + // FromPbText unmarshals BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) Marshal() marshalBgpExtendedCommunityTransitive2OctetAsTypeRouteTarget { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityTransitive2OctetAsTypeRouteTarget{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) Unmarshal() unMarshalBgpExtendedCommunityTransitive2OctetAsTypeRouteTarget { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityTransitive2OctetAsTypeRouteTarget{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) ToProto() (*otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) FromProto(msg *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) (BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) Clone() (BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityTransitive2OctetAsTypeRouteTarget() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02. +type BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget interface { + Validation + // msg marshals BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget to protobuf object *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + // setMsg unmarshals BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget from protobuf object *otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + // provides marshal interface + Marshal() marshalBgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + // validate validates BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Global2ByteAs returns uint32, set in BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget. + Global2ByteAs() uint32 + // SetGlobal2ByteAs assigns uint32 provided by user to BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + SetGlobal2ByteAs(value uint32) BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + // HasGlobal2ByteAs checks if Global2ByteAs has been set in BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + HasGlobal2ByteAs() bool + // Local4ByteAdmin returns uint32, set in BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget. + Local4ByteAdmin() uint32 + // SetLocal4ByteAdmin assigns uint32 provided by user to BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + SetLocal4ByteAdmin(value uint32) BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + // HasLocal4ByteAdmin checks if Local4ByteAdmin has been set in BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + HasLocal4ByteAdmin() bool +} + +// The two octet IANA assigned AS value assigned to the Autonomous System. +// Global2ByteAs returns a uint32 +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) Global2ByteAs() uint32 { + + return *obj.obj.Global_2ByteAs + +} + +// The two octet IANA assigned AS value assigned to the Autonomous System. +// Global2ByteAs returns a uint32 +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) HasGlobal2ByteAs() bool { + return obj.obj.Global_2ByteAs != nil +} + +// The two octet IANA assigned AS value assigned to the Autonomous System. +// SetGlobal2ByteAs sets the uint32 value in the BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget object +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) SetGlobal2ByteAs(value uint32) BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget { + + obj.obj.Global_2ByteAs = &value + return obj +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local4ByteAdmin returns a uint32 +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) Local4ByteAdmin() uint32 { + + return *obj.obj.Local_4ByteAdmin + +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local4ByteAdmin returns a uint32 +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) HasLocal4ByteAdmin() bool { + return obj.obj.Local_4ByteAdmin != nil +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// SetLocal4ByteAdmin sets the uint32 value in the BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget object +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) SetLocal4ByteAdmin(value uint32) BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget { + + obj.obj.Local_4ByteAdmin = &value + return obj +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Global_2ByteAs != nil { + + if *obj.obj.Global_2ByteAs > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget.Global_2ByteAs <= 65535 but Got %d", *obj.obj.Global_2ByteAs)) + } + + } + +} + +func (obj *bgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) setDefault() { + if obj.obj.Global_2ByteAs == nil { + obj.SetGlobal2ByteAs(100) + } + if obj.obj.Local_4ByteAdmin == nil { + obj.SetLocal4ByteAdmin(1) + } + +} diff --git a/gosnappi/bgp_extended_community_transitive4_octet_as_type.go b/gosnappi/bgp_extended_community_transitive4_octet_as_type.go new file mode 100644 index 00000000..2a5ef10c --- /dev/null +++ b/gosnappi/bgp_extended_community_transitive4_octet_as_type.go @@ -0,0 +1,452 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityTransitive4OctetAsType ***** +type bgpExtendedCommunityTransitive4OctetAsType struct { + validation + obj *otg.BgpExtendedCommunityTransitive4OctetAsType + marshaller marshalBgpExtendedCommunityTransitive4OctetAsType + unMarshaller unMarshalBgpExtendedCommunityTransitive4OctetAsType + routeTargetSubtypeHolder BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + routeOriginSubtypeHolder BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin +} + +func NewBgpExtendedCommunityTransitive4OctetAsType() BgpExtendedCommunityTransitive4OctetAsType { + obj := bgpExtendedCommunityTransitive4OctetAsType{obj: &otg.BgpExtendedCommunityTransitive4OctetAsType{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsType) msg() *otg.BgpExtendedCommunityTransitive4OctetAsType { + return obj.obj +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsType) setMsg(msg *otg.BgpExtendedCommunityTransitive4OctetAsType) BgpExtendedCommunityTransitive4OctetAsType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityTransitive4OctetAsType struct { + obj *bgpExtendedCommunityTransitive4OctetAsType +} + +type marshalBgpExtendedCommunityTransitive4OctetAsType interface { + // ToProto marshals BgpExtendedCommunityTransitive4OctetAsType to protobuf object *otg.BgpExtendedCommunityTransitive4OctetAsType + ToProto() (*otg.BgpExtendedCommunityTransitive4OctetAsType, error) + // ToPbText marshals BgpExtendedCommunityTransitive4OctetAsType to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityTransitive4OctetAsType to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityTransitive4OctetAsType to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityTransitive4OctetAsType struct { + obj *bgpExtendedCommunityTransitive4OctetAsType +} + +type unMarshalBgpExtendedCommunityTransitive4OctetAsType interface { + // FromProto unmarshals BgpExtendedCommunityTransitive4OctetAsType from protobuf object *otg.BgpExtendedCommunityTransitive4OctetAsType + FromProto(msg *otg.BgpExtendedCommunityTransitive4OctetAsType) (BgpExtendedCommunityTransitive4OctetAsType, error) + // FromPbText unmarshals BgpExtendedCommunityTransitive4OctetAsType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityTransitive4OctetAsType from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityTransitive4OctetAsType from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsType) Marshal() marshalBgpExtendedCommunityTransitive4OctetAsType { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityTransitive4OctetAsType{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsType) Unmarshal() unMarshalBgpExtendedCommunityTransitive4OctetAsType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityTransitive4OctetAsType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityTransitive4OctetAsType) ToProto() (*otg.BgpExtendedCommunityTransitive4OctetAsType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive4OctetAsType) FromProto(msg *otg.BgpExtendedCommunityTransitive4OctetAsType) (BgpExtendedCommunityTransitive4OctetAsType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityTransitive4OctetAsType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive4OctetAsType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityTransitive4OctetAsType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive4OctetAsType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityTransitive4OctetAsType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive4OctetAsType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsType) Clone() (BgpExtendedCommunityTransitive4OctetAsType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityTransitive4OctetAsType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsType) setNil() { + obj.routeTargetSubtypeHolder = nil + obj.routeOriginSubtypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpExtendedCommunityTransitive4OctetAsType is the Transitive Four-Octet AS-Specific Extended Community is sent as type 0x02. It is defined in RFC 5668. +type BgpExtendedCommunityTransitive4OctetAsType interface { + Validation + // msg marshals BgpExtendedCommunityTransitive4OctetAsType to protobuf object *otg.BgpExtendedCommunityTransitive4OctetAsType + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityTransitive4OctetAsType + // setMsg unmarshals BgpExtendedCommunityTransitive4OctetAsType from protobuf object *otg.BgpExtendedCommunityTransitive4OctetAsType + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityTransitive4OctetAsType) BgpExtendedCommunityTransitive4OctetAsType + // provides marshal interface + Marshal() marshalBgpExtendedCommunityTransitive4OctetAsType + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityTransitive4OctetAsType + // validate validates BgpExtendedCommunityTransitive4OctetAsType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityTransitive4OctetAsType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpExtendedCommunityTransitive4OctetAsTypeChoiceEnum, set in BgpExtendedCommunityTransitive4OctetAsType + Choice() BgpExtendedCommunityTransitive4OctetAsTypeChoiceEnum + // setChoice assigns BgpExtendedCommunityTransitive4OctetAsTypeChoiceEnum provided by user to BgpExtendedCommunityTransitive4OctetAsType + setChoice(value BgpExtendedCommunityTransitive4OctetAsTypeChoiceEnum) BgpExtendedCommunityTransitive4OctetAsType + // HasChoice checks if Choice has been set in BgpExtendedCommunityTransitive4OctetAsType + HasChoice() bool + // RouteTargetSubtype returns BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget, set in BgpExtendedCommunityTransitive4OctetAsType. + // BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02 + RouteTargetSubtype() BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + // SetRouteTargetSubtype assigns BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget provided by user to BgpExtendedCommunityTransitive4OctetAsType. + // BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02 + SetRouteTargetSubtype(value BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) BgpExtendedCommunityTransitive4OctetAsType + // HasRouteTargetSubtype checks if RouteTargetSubtype has been set in BgpExtendedCommunityTransitive4OctetAsType + HasRouteTargetSubtype() bool + // RouteOriginSubtype returns BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin, set in BgpExtendedCommunityTransitive4OctetAsType. + // BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03. + RouteOriginSubtype() BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // SetRouteOriginSubtype assigns BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin provided by user to BgpExtendedCommunityTransitive4OctetAsType. + // BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03. + SetRouteOriginSubtype(value BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) BgpExtendedCommunityTransitive4OctetAsType + // HasRouteOriginSubtype checks if RouteOriginSubtype has been set in BgpExtendedCommunityTransitive4OctetAsType + HasRouteOriginSubtype() bool + setNil() +} + +type BgpExtendedCommunityTransitive4OctetAsTypeChoiceEnum string + +// Enum of Choice on BgpExtendedCommunityTransitive4OctetAsType +var BgpExtendedCommunityTransitive4OctetAsTypeChoice = struct { + ROUTE_TARGET_SUBTYPE BgpExtendedCommunityTransitive4OctetAsTypeChoiceEnum + ROUTE_ORIGIN_SUBTYPE BgpExtendedCommunityTransitive4OctetAsTypeChoiceEnum +}{ + ROUTE_TARGET_SUBTYPE: BgpExtendedCommunityTransitive4OctetAsTypeChoiceEnum("route_target_subtype"), + ROUTE_ORIGIN_SUBTYPE: BgpExtendedCommunityTransitive4OctetAsTypeChoiceEnum("route_origin_subtype"), +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsType) Choice() BgpExtendedCommunityTransitive4OctetAsTypeChoiceEnum { + return BgpExtendedCommunityTransitive4OctetAsTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *bgpExtendedCommunityTransitive4OctetAsType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsType) setChoice(value BgpExtendedCommunityTransitive4OctetAsTypeChoiceEnum) BgpExtendedCommunityTransitive4OctetAsType { + intValue, ok := otg.BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpExtendedCommunityTransitive4OctetAsTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.RouteOriginSubtype = nil + obj.routeOriginSubtypeHolder = nil + obj.obj.RouteTargetSubtype = nil + obj.routeTargetSubtypeHolder = nil + + if value == BgpExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE { + obj.obj.RouteTargetSubtype = NewBgpExtendedCommunityTransitive4OctetAsTypeRouteTarget().msg() + } + + if value == BgpExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE { + obj.obj.RouteOriginSubtype = NewBgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin().msg() + } + + return obj +} + +// description is TBD +// RouteTargetSubtype returns a BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget +func (obj *bgpExtendedCommunityTransitive4OctetAsType) RouteTargetSubtype() BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget { + if obj.obj.RouteTargetSubtype == nil { + obj.setChoice(BgpExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE) + } + if obj.routeTargetSubtypeHolder == nil { + obj.routeTargetSubtypeHolder = &bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget{obj: obj.obj.RouteTargetSubtype} + } + return obj.routeTargetSubtypeHolder +} + +// description is TBD +// RouteTargetSubtype returns a BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget +func (obj *bgpExtendedCommunityTransitive4OctetAsType) HasRouteTargetSubtype() bool { + return obj.obj.RouteTargetSubtype != nil +} + +// description is TBD +// SetRouteTargetSubtype sets the BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget value in the BgpExtendedCommunityTransitive4OctetAsType object +func (obj *bgpExtendedCommunityTransitive4OctetAsType) SetRouteTargetSubtype(value BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) BgpExtendedCommunityTransitive4OctetAsType { + obj.setChoice(BgpExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE) + obj.routeTargetSubtypeHolder = nil + obj.obj.RouteTargetSubtype = value.msg() + + return obj +} + +// description is TBD +// RouteOriginSubtype returns a BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin +func (obj *bgpExtendedCommunityTransitive4OctetAsType) RouteOriginSubtype() BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + if obj.obj.RouteOriginSubtype == nil { + obj.setChoice(BgpExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE) + } + if obj.routeOriginSubtypeHolder == nil { + obj.routeOriginSubtypeHolder = &bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin{obj: obj.obj.RouteOriginSubtype} + } + return obj.routeOriginSubtypeHolder +} + +// description is TBD +// RouteOriginSubtype returns a BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin +func (obj *bgpExtendedCommunityTransitive4OctetAsType) HasRouteOriginSubtype() bool { + return obj.obj.RouteOriginSubtype != nil +} + +// description is TBD +// SetRouteOriginSubtype sets the BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin value in the BgpExtendedCommunityTransitive4OctetAsType object +func (obj *bgpExtendedCommunityTransitive4OctetAsType) SetRouteOriginSubtype(value BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) BgpExtendedCommunityTransitive4OctetAsType { + obj.setChoice(BgpExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE) + obj.routeOriginSubtypeHolder = nil + obj.obj.RouteOriginSubtype = value.msg() + + return obj +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RouteTargetSubtype != nil { + + obj.RouteTargetSubtype().validateObj(vObj, set_default) + } + + if obj.obj.RouteOriginSubtype != nil { + + obj.RouteOriginSubtype().validateObj(vObj, set_default) + } + +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsType) setDefault() { + var choices_set int = 0 + var choice BgpExtendedCommunityTransitive4OctetAsTypeChoiceEnum + + if obj.obj.RouteTargetSubtype != nil { + choices_set += 1 + choice = BgpExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE + } + + if obj.obj.RouteOriginSubtype != nil { + choices_set += 1 + choice = BgpExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(BgpExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpExtendedCommunityTransitive4OctetAsType") + } + } else { + intVal := otg.BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum_value[string(choice)] + enumValue := otg.BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_extended_community_transitive4_octet_as_type_route_origin.go b/gosnappi/bgp_extended_community_transitive4_octet_as_type_route_origin.go new file mode 100644 index 00000000..94ba5f15 --- /dev/null +++ b/gosnappi/bgp_extended_community_transitive4_octet_as_type_route_origin.go @@ -0,0 +1,350 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin ***** +type bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin struct { + validation + obj *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + marshaller marshalBgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + unMarshaller unMarshalBgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin +} + +func NewBgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin() BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + obj := bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin{obj: &otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) msg() *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + return obj.obj +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) setMsg(msg *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin struct { + obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin +} + +type marshalBgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin interface { + // ToProto marshals BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin to protobuf object *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + ToProto() (*otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin, error) + // ToPbText marshals BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin struct { + obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin +} + +type unMarshalBgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin interface { + // FromProto unmarshals BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin from protobuf object *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + FromProto(msg *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) (BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin, error) + // FromPbText unmarshals BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Marshal() marshalBgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Unmarshal() unMarshalBgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ToProto() (*otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) FromProto(msg *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) (BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Clone() (BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03. +type BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin interface { + Validation + // msg marshals BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin to protobuf object *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // setMsg unmarshals BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin from protobuf object *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // provides marshal interface + Marshal() marshalBgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // validate validates BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Global4ByteAs returns uint32, set in BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin. + Global4ByteAs() uint32 + // SetGlobal4ByteAs assigns uint32 provided by user to BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + SetGlobal4ByteAs(value uint32) BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // HasGlobal4ByteAs checks if Global4ByteAs has been set in BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + HasGlobal4ByteAs() bool + // Local2ByteAdmin returns uint32, set in BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin. + Local2ByteAdmin() uint32 + // SetLocal2ByteAdmin assigns uint32 provided by user to BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + SetLocal2ByteAdmin(value uint32) BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // HasLocal2ByteAdmin checks if Local2ByteAdmin has been set in BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + HasLocal2ByteAdmin() bool +} + +// The four octet IANA assigned AS value assigned to the Autonomous System. +// Global4ByteAs returns a uint32 +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Global4ByteAs() uint32 { + + return *obj.obj.Global_4ByteAs + +} + +// The four octet IANA assigned AS value assigned to the Autonomous System. +// Global4ByteAs returns a uint32 +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) HasGlobal4ByteAs() bool { + return obj.obj.Global_4ByteAs != nil +} + +// The four octet IANA assigned AS value assigned to the Autonomous System. +// SetGlobal4ByteAs sets the uint32 value in the BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin object +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) SetGlobal4ByteAs(value uint32) BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + + obj.obj.Global_4ByteAs = &value + return obj +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Local2ByteAdmin() uint32 { + + return *obj.obj.Local_2ByteAdmin + +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) HasLocal2ByteAdmin() bool { + return obj.obj.Local_2ByteAdmin != nil +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// SetLocal2ByteAdmin sets the uint32 value in the BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin object +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) SetLocal2ByteAdmin(value uint32) BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + + obj.obj.Local_2ByteAdmin = &value + return obj +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Local_2ByteAdmin != nil { + + if *obj.obj.Local_2ByteAdmin > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin.Local_2ByteAdmin <= 65535 but Got %d", *obj.obj.Local_2ByteAdmin)) + } + + } + +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) setDefault() { + if obj.obj.Global_4ByteAs == nil { + obj.SetGlobal4ByteAs(100) + } + if obj.obj.Local_2ByteAdmin == nil { + obj.SetLocal2ByteAdmin(1) + } + +} diff --git a/gosnappi/bgp_extended_community_transitive4_octet_as_type_route_target.go b/gosnappi/bgp_extended_community_transitive4_octet_as_type_route_target.go new file mode 100644 index 00000000..5cc846d3 --- /dev/null +++ b/gosnappi/bgp_extended_community_transitive4_octet_as_type_route_target.go @@ -0,0 +1,350 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget ***** +type bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget struct { + validation + obj *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + marshaller marshalBgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + unMarshaller unMarshalBgpExtendedCommunityTransitive4OctetAsTypeRouteTarget +} + +func NewBgpExtendedCommunityTransitive4OctetAsTypeRouteTarget() BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget { + obj := bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget{obj: &otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) msg() *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget { + return obj.obj +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) setMsg(msg *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityTransitive4OctetAsTypeRouteTarget struct { + obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget +} + +type marshalBgpExtendedCommunityTransitive4OctetAsTypeRouteTarget interface { + // ToProto marshals BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget to protobuf object *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + ToProto() (*otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget, error) + // ToPbText marshals BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityTransitive4OctetAsTypeRouteTarget struct { + obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget +} + +type unMarshalBgpExtendedCommunityTransitive4OctetAsTypeRouteTarget interface { + // FromProto unmarshals BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget from protobuf object *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + FromProto(msg *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) (BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget, error) + // FromPbText unmarshals BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) Marshal() marshalBgpExtendedCommunityTransitive4OctetAsTypeRouteTarget { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityTransitive4OctetAsTypeRouteTarget{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) Unmarshal() unMarshalBgpExtendedCommunityTransitive4OctetAsTypeRouteTarget { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityTransitive4OctetAsTypeRouteTarget{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) ToProto() (*otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) FromProto(msg *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) (BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) Clone() (BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityTransitive4OctetAsTypeRouteTarget() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02 +type BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget interface { + Validation + // msg marshals BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget to protobuf object *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + // setMsg unmarshals BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget from protobuf object *otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + // provides marshal interface + Marshal() marshalBgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + // validate validates BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Global4ByteAs returns uint32, set in BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget. + Global4ByteAs() uint32 + // SetGlobal4ByteAs assigns uint32 provided by user to BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + SetGlobal4ByteAs(value uint32) BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + // HasGlobal4ByteAs checks if Global4ByteAs has been set in BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + HasGlobal4ByteAs() bool + // Local2ByteAdmin returns uint32, set in BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget. + Local2ByteAdmin() uint32 + // SetLocal2ByteAdmin assigns uint32 provided by user to BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + SetLocal2ByteAdmin(value uint32) BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + // HasLocal2ByteAdmin checks if Local2ByteAdmin has been set in BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + HasLocal2ByteAdmin() bool +} + +// The four octet IANA assigned AS value assigned to the Autonomous System. +// Global4ByteAs returns a uint32 +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) Global4ByteAs() uint32 { + + return *obj.obj.Global_4ByteAs + +} + +// The four octet IANA assigned AS value assigned to the Autonomous System. +// Global4ByteAs returns a uint32 +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) HasGlobal4ByteAs() bool { + return obj.obj.Global_4ByteAs != nil +} + +// The four octet IANA assigned AS value assigned to the Autonomous System. +// SetGlobal4ByteAs sets the uint32 value in the BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget object +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) SetGlobal4ByteAs(value uint32) BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget { + + obj.obj.Global_4ByteAs = &value + return obj +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) Local2ByteAdmin() uint32 { + + return *obj.obj.Local_2ByteAdmin + +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) HasLocal2ByteAdmin() bool { + return obj.obj.Local_2ByteAdmin != nil +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// SetLocal2ByteAdmin sets the uint32 value in the BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget object +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) SetLocal2ByteAdmin(value uint32) BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget { + + obj.obj.Local_2ByteAdmin = &value + return obj +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Local_2ByteAdmin != nil { + + if *obj.obj.Local_2ByteAdmin > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget.Local_2ByteAdmin <= 65535 but Got %d", *obj.obj.Local_2ByteAdmin)) + } + + } + +} + +func (obj *bgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) setDefault() { + if obj.obj.Global_4ByteAs == nil { + obj.SetGlobal4ByteAs(100) + } + if obj.obj.Local_2ByteAdmin == nil { + obj.SetLocal2ByteAdmin(1) + } + +} diff --git a/gosnappi/bgp_extended_community_transitive_evpn_type.go b/gosnappi/bgp_extended_community_transitive_evpn_type.go new file mode 100644 index 00000000..532d0571 --- /dev/null +++ b/gosnappi/bgp_extended_community_transitive_evpn_type.go @@ -0,0 +1,396 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityTransitiveEvpnType ***** +type bgpExtendedCommunityTransitiveEvpnType struct { + validation + obj *otg.BgpExtendedCommunityTransitiveEvpnType + marshaller marshalBgpExtendedCommunityTransitiveEvpnType + unMarshaller unMarshalBgpExtendedCommunityTransitiveEvpnType + routerMacSubtypeHolder BgpExtendedCommunityTransitiveEvpnTypeRouterMac +} + +func NewBgpExtendedCommunityTransitiveEvpnType() BgpExtendedCommunityTransitiveEvpnType { + obj := bgpExtendedCommunityTransitiveEvpnType{obj: &otg.BgpExtendedCommunityTransitiveEvpnType{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityTransitiveEvpnType) msg() *otg.BgpExtendedCommunityTransitiveEvpnType { + return obj.obj +} + +func (obj *bgpExtendedCommunityTransitiveEvpnType) setMsg(msg *otg.BgpExtendedCommunityTransitiveEvpnType) BgpExtendedCommunityTransitiveEvpnType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityTransitiveEvpnType struct { + obj *bgpExtendedCommunityTransitiveEvpnType +} + +type marshalBgpExtendedCommunityTransitiveEvpnType interface { + // ToProto marshals BgpExtendedCommunityTransitiveEvpnType to protobuf object *otg.BgpExtendedCommunityTransitiveEvpnType + ToProto() (*otg.BgpExtendedCommunityTransitiveEvpnType, error) + // ToPbText marshals BgpExtendedCommunityTransitiveEvpnType to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityTransitiveEvpnType to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityTransitiveEvpnType to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityTransitiveEvpnType struct { + obj *bgpExtendedCommunityTransitiveEvpnType +} + +type unMarshalBgpExtendedCommunityTransitiveEvpnType interface { + // FromProto unmarshals BgpExtendedCommunityTransitiveEvpnType from protobuf object *otg.BgpExtendedCommunityTransitiveEvpnType + FromProto(msg *otg.BgpExtendedCommunityTransitiveEvpnType) (BgpExtendedCommunityTransitiveEvpnType, error) + // FromPbText unmarshals BgpExtendedCommunityTransitiveEvpnType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityTransitiveEvpnType from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityTransitiveEvpnType from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityTransitiveEvpnType) Marshal() marshalBgpExtendedCommunityTransitiveEvpnType { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityTransitiveEvpnType{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityTransitiveEvpnType) Unmarshal() unMarshalBgpExtendedCommunityTransitiveEvpnType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityTransitiveEvpnType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityTransitiveEvpnType) ToProto() (*otg.BgpExtendedCommunityTransitiveEvpnType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveEvpnType) FromProto(msg *otg.BgpExtendedCommunityTransitiveEvpnType) (BgpExtendedCommunityTransitiveEvpnType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityTransitiveEvpnType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveEvpnType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityTransitiveEvpnType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveEvpnType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityTransitiveEvpnType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveEvpnType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityTransitiveEvpnType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveEvpnType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveEvpnType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityTransitiveEvpnType) Clone() (BgpExtendedCommunityTransitiveEvpnType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityTransitiveEvpnType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpExtendedCommunityTransitiveEvpnType) setNil() { + obj.routerMacSubtypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpExtendedCommunityTransitiveEvpnType is the Transitive EVPN Extended Community is sent as type 0x06 . +type BgpExtendedCommunityTransitiveEvpnType interface { + Validation + // msg marshals BgpExtendedCommunityTransitiveEvpnType to protobuf object *otg.BgpExtendedCommunityTransitiveEvpnType + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityTransitiveEvpnType + // setMsg unmarshals BgpExtendedCommunityTransitiveEvpnType from protobuf object *otg.BgpExtendedCommunityTransitiveEvpnType + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityTransitiveEvpnType) BgpExtendedCommunityTransitiveEvpnType + // provides marshal interface + Marshal() marshalBgpExtendedCommunityTransitiveEvpnType + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityTransitiveEvpnType + // validate validates BgpExtendedCommunityTransitiveEvpnType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityTransitiveEvpnType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpExtendedCommunityTransitiveEvpnTypeChoiceEnum, set in BgpExtendedCommunityTransitiveEvpnType + Choice() BgpExtendedCommunityTransitiveEvpnTypeChoiceEnum + // setChoice assigns BgpExtendedCommunityTransitiveEvpnTypeChoiceEnum provided by user to BgpExtendedCommunityTransitiveEvpnType + setChoice(value BgpExtendedCommunityTransitiveEvpnTypeChoiceEnum) BgpExtendedCommunityTransitiveEvpnType + // HasChoice checks if Choice has been set in BgpExtendedCommunityTransitiveEvpnType + HasChoice() bool + // RouterMacSubtype returns BgpExtendedCommunityTransitiveEvpnTypeRouterMac, set in BgpExtendedCommunityTransitiveEvpnType. + // BgpExtendedCommunityTransitiveEvpnTypeRouterMac is the Router MAC EVPN Community is defined in RFC9135 and normally sent only for EVPN Type-2 Routes . It is sent with sub-type 0x03. + RouterMacSubtype() BgpExtendedCommunityTransitiveEvpnTypeRouterMac + // SetRouterMacSubtype assigns BgpExtendedCommunityTransitiveEvpnTypeRouterMac provided by user to BgpExtendedCommunityTransitiveEvpnType. + // BgpExtendedCommunityTransitiveEvpnTypeRouterMac is the Router MAC EVPN Community is defined in RFC9135 and normally sent only for EVPN Type-2 Routes . It is sent with sub-type 0x03. + SetRouterMacSubtype(value BgpExtendedCommunityTransitiveEvpnTypeRouterMac) BgpExtendedCommunityTransitiveEvpnType + // HasRouterMacSubtype checks if RouterMacSubtype has been set in BgpExtendedCommunityTransitiveEvpnType + HasRouterMacSubtype() bool + setNil() +} + +type BgpExtendedCommunityTransitiveEvpnTypeChoiceEnum string + +// Enum of Choice on BgpExtendedCommunityTransitiveEvpnType +var BgpExtendedCommunityTransitiveEvpnTypeChoice = struct { + ROUTER_MAC_SUBTYPE BgpExtendedCommunityTransitiveEvpnTypeChoiceEnum +}{ + ROUTER_MAC_SUBTYPE: BgpExtendedCommunityTransitiveEvpnTypeChoiceEnum("router_mac_subtype"), +} + +func (obj *bgpExtendedCommunityTransitiveEvpnType) Choice() BgpExtendedCommunityTransitiveEvpnTypeChoiceEnum { + return BgpExtendedCommunityTransitiveEvpnTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *bgpExtendedCommunityTransitiveEvpnType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpExtendedCommunityTransitiveEvpnType) setChoice(value BgpExtendedCommunityTransitiveEvpnTypeChoiceEnum) BgpExtendedCommunityTransitiveEvpnType { + intValue, ok := otg.BgpExtendedCommunityTransitiveEvpnType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpExtendedCommunityTransitiveEvpnTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpExtendedCommunityTransitiveEvpnType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.RouterMacSubtype = nil + obj.routerMacSubtypeHolder = nil + + if value == BgpExtendedCommunityTransitiveEvpnTypeChoice.ROUTER_MAC_SUBTYPE { + obj.obj.RouterMacSubtype = NewBgpExtendedCommunityTransitiveEvpnTypeRouterMac().msg() + } + + return obj +} + +// description is TBD +// RouterMacSubtype returns a BgpExtendedCommunityTransitiveEvpnTypeRouterMac +func (obj *bgpExtendedCommunityTransitiveEvpnType) RouterMacSubtype() BgpExtendedCommunityTransitiveEvpnTypeRouterMac { + if obj.obj.RouterMacSubtype == nil { + obj.setChoice(BgpExtendedCommunityTransitiveEvpnTypeChoice.ROUTER_MAC_SUBTYPE) + } + if obj.routerMacSubtypeHolder == nil { + obj.routerMacSubtypeHolder = &bgpExtendedCommunityTransitiveEvpnTypeRouterMac{obj: obj.obj.RouterMacSubtype} + } + return obj.routerMacSubtypeHolder +} + +// description is TBD +// RouterMacSubtype returns a BgpExtendedCommunityTransitiveEvpnTypeRouterMac +func (obj *bgpExtendedCommunityTransitiveEvpnType) HasRouterMacSubtype() bool { + return obj.obj.RouterMacSubtype != nil +} + +// description is TBD +// SetRouterMacSubtype sets the BgpExtendedCommunityTransitiveEvpnTypeRouterMac value in the BgpExtendedCommunityTransitiveEvpnType object +func (obj *bgpExtendedCommunityTransitiveEvpnType) SetRouterMacSubtype(value BgpExtendedCommunityTransitiveEvpnTypeRouterMac) BgpExtendedCommunityTransitiveEvpnType { + obj.setChoice(BgpExtendedCommunityTransitiveEvpnTypeChoice.ROUTER_MAC_SUBTYPE) + obj.routerMacSubtypeHolder = nil + obj.obj.RouterMacSubtype = value.msg() + + return obj +} + +func (obj *bgpExtendedCommunityTransitiveEvpnType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RouterMacSubtype != nil { + + obj.RouterMacSubtype().validateObj(vObj, set_default) + } + +} + +func (obj *bgpExtendedCommunityTransitiveEvpnType) setDefault() { + var choices_set int = 0 + var choice BgpExtendedCommunityTransitiveEvpnTypeChoiceEnum + + if obj.obj.RouterMacSubtype != nil { + choices_set += 1 + choice = BgpExtendedCommunityTransitiveEvpnTypeChoice.ROUTER_MAC_SUBTYPE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(BgpExtendedCommunityTransitiveEvpnTypeChoice.ROUTER_MAC_SUBTYPE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpExtendedCommunityTransitiveEvpnType") + } + } else { + intVal := otg.BgpExtendedCommunityTransitiveEvpnType_Choice_Enum_value[string(choice)] + enumValue := otg.BgpExtendedCommunityTransitiveEvpnType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_extended_community_transitive_evpn_type_router_mac.go b/gosnappi/bgp_extended_community_transitive_evpn_type_router_mac.go new file mode 100644 index 00000000..6dfdd757 --- /dev/null +++ b/gosnappi/bgp_extended_community_transitive_evpn_type_router_mac.go @@ -0,0 +1,318 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityTransitiveEvpnTypeRouterMac ***** +type bgpExtendedCommunityTransitiveEvpnTypeRouterMac struct { + validation + obj *otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac + marshaller marshalBgpExtendedCommunityTransitiveEvpnTypeRouterMac + unMarshaller unMarshalBgpExtendedCommunityTransitiveEvpnTypeRouterMac +} + +func NewBgpExtendedCommunityTransitiveEvpnTypeRouterMac() BgpExtendedCommunityTransitiveEvpnTypeRouterMac { + obj := bgpExtendedCommunityTransitiveEvpnTypeRouterMac{obj: &otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac) msg() *otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac { + return obj.obj +} + +func (obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac) setMsg(msg *otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac) BgpExtendedCommunityTransitiveEvpnTypeRouterMac { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityTransitiveEvpnTypeRouterMac struct { + obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac +} + +type marshalBgpExtendedCommunityTransitiveEvpnTypeRouterMac interface { + // ToProto marshals BgpExtendedCommunityTransitiveEvpnTypeRouterMac to protobuf object *otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac + ToProto() (*otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac, error) + // ToPbText marshals BgpExtendedCommunityTransitiveEvpnTypeRouterMac to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityTransitiveEvpnTypeRouterMac to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityTransitiveEvpnTypeRouterMac to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityTransitiveEvpnTypeRouterMac struct { + obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac +} + +type unMarshalBgpExtendedCommunityTransitiveEvpnTypeRouterMac interface { + // FromProto unmarshals BgpExtendedCommunityTransitiveEvpnTypeRouterMac from protobuf object *otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac + FromProto(msg *otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac) (BgpExtendedCommunityTransitiveEvpnTypeRouterMac, error) + // FromPbText unmarshals BgpExtendedCommunityTransitiveEvpnTypeRouterMac from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityTransitiveEvpnTypeRouterMac from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityTransitiveEvpnTypeRouterMac from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac) Marshal() marshalBgpExtendedCommunityTransitiveEvpnTypeRouterMac { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityTransitiveEvpnTypeRouterMac{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac) Unmarshal() unMarshalBgpExtendedCommunityTransitiveEvpnTypeRouterMac { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityTransitiveEvpnTypeRouterMac{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityTransitiveEvpnTypeRouterMac) ToProto() (*otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveEvpnTypeRouterMac) FromProto(msg *otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac) (BgpExtendedCommunityTransitiveEvpnTypeRouterMac, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityTransitiveEvpnTypeRouterMac) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveEvpnTypeRouterMac) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityTransitiveEvpnTypeRouterMac) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveEvpnTypeRouterMac) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityTransitiveEvpnTypeRouterMac) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveEvpnTypeRouterMac) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac) Clone() (BgpExtendedCommunityTransitiveEvpnTypeRouterMac, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityTransitiveEvpnTypeRouterMac() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpExtendedCommunityTransitiveEvpnTypeRouterMac is the Router MAC EVPN Community is defined in RFC9135 and normally sent only for EVPN Type-2 Routes . It is sent with sub-type 0x03. +type BgpExtendedCommunityTransitiveEvpnTypeRouterMac interface { + Validation + // msg marshals BgpExtendedCommunityTransitiveEvpnTypeRouterMac to protobuf object *otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac + // setMsg unmarshals BgpExtendedCommunityTransitiveEvpnTypeRouterMac from protobuf object *otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac) BgpExtendedCommunityTransitiveEvpnTypeRouterMac + // provides marshal interface + Marshal() marshalBgpExtendedCommunityTransitiveEvpnTypeRouterMac + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityTransitiveEvpnTypeRouterMac + // validate validates BgpExtendedCommunityTransitiveEvpnTypeRouterMac + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityTransitiveEvpnTypeRouterMac, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RouterMac returns string, set in BgpExtendedCommunityTransitiveEvpnTypeRouterMac. + RouterMac() string + // SetRouterMac assigns string provided by user to BgpExtendedCommunityTransitiveEvpnTypeRouterMac + SetRouterMac(value string) BgpExtendedCommunityTransitiveEvpnTypeRouterMac + // HasRouterMac checks if RouterMac has been set in BgpExtendedCommunityTransitiveEvpnTypeRouterMac + HasRouterMac() bool +} + +// MAC Address of the PE Router. +// RouterMac returns a string +func (obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac) RouterMac() string { + + return *obj.obj.RouterMac + +} + +// MAC Address of the PE Router. +// RouterMac returns a string +func (obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac) HasRouterMac() bool { + return obj.obj.RouterMac != nil +} + +// MAC Address of the PE Router. +// SetRouterMac sets the string value in the BgpExtendedCommunityTransitiveEvpnTypeRouterMac object +func (obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac) SetRouterMac(value string) BgpExtendedCommunityTransitiveEvpnTypeRouterMac { + + obj.obj.RouterMac = &value + return obj +} + +func (obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RouterMac != nil { + + err := obj.validateMac(obj.RouterMac()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpExtendedCommunityTransitiveEvpnTypeRouterMac.RouterMac")) + } + + } + +} + +func (obj *bgpExtendedCommunityTransitiveEvpnTypeRouterMac) setDefault() { + if obj.obj.RouterMac == nil { + obj.SetRouterMac("0:0:0:0:0:0") + } + +} diff --git a/gosnappi/bgp_extended_community_transitive_ipv4_address_type.go b/gosnappi/bgp_extended_community_transitive_ipv4_address_type.go new file mode 100644 index 00000000..b76fd6d1 --- /dev/null +++ b/gosnappi/bgp_extended_community_transitive_ipv4_address_type.go @@ -0,0 +1,452 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityTransitiveIpv4AddressType ***** +type bgpExtendedCommunityTransitiveIpv4AddressType struct { + validation + obj *otg.BgpExtendedCommunityTransitiveIpv4AddressType + marshaller marshalBgpExtendedCommunityTransitiveIpv4AddressType + unMarshaller unMarshalBgpExtendedCommunityTransitiveIpv4AddressType + routeTargetSubtypeHolder BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + routeOriginSubtypeHolder BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin +} + +func NewBgpExtendedCommunityTransitiveIpv4AddressType() BgpExtendedCommunityTransitiveIpv4AddressType { + obj := bgpExtendedCommunityTransitiveIpv4AddressType{obj: &otg.BgpExtendedCommunityTransitiveIpv4AddressType{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) msg() *otg.BgpExtendedCommunityTransitiveIpv4AddressType { + return obj.obj +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) setMsg(msg *otg.BgpExtendedCommunityTransitiveIpv4AddressType) BgpExtendedCommunityTransitiveIpv4AddressType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityTransitiveIpv4AddressType struct { + obj *bgpExtendedCommunityTransitiveIpv4AddressType +} + +type marshalBgpExtendedCommunityTransitiveIpv4AddressType interface { + // ToProto marshals BgpExtendedCommunityTransitiveIpv4AddressType to protobuf object *otg.BgpExtendedCommunityTransitiveIpv4AddressType + ToProto() (*otg.BgpExtendedCommunityTransitiveIpv4AddressType, error) + // ToPbText marshals BgpExtendedCommunityTransitiveIpv4AddressType to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityTransitiveIpv4AddressType to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityTransitiveIpv4AddressType to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityTransitiveIpv4AddressType struct { + obj *bgpExtendedCommunityTransitiveIpv4AddressType +} + +type unMarshalBgpExtendedCommunityTransitiveIpv4AddressType interface { + // FromProto unmarshals BgpExtendedCommunityTransitiveIpv4AddressType from protobuf object *otg.BgpExtendedCommunityTransitiveIpv4AddressType + FromProto(msg *otg.BgpExtendedCommunityTransitiveIpv4AddressType) (BgpExtendedCommunityTransitiveIpv4AddressType, error) + // FromPbText unmarshals BgpExtendedCommunityTransitiveIpv4AddressType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityTransitiveIpv4AddressType from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityTransitiveIpv4AddressType from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) Marshal() marshalBgpExtendedCommunityTransitiveIpv4AddressType { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityTransitiveIpv4AddressType{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) Unmarshal() unMarshalBgpExtendedCommunityTransitiveIpv4AddressType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityTransitiveIpv4AddressType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityTransitiveIpv4AddressType) ToProto() (*otg.BgpExtendedCommunityTransitiveIpv4AddressType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveIpv4AddressType) FromProto(msg *otg.BgpExtendedCommunityTransitiveIpv4AddressType) (BgpExtendedCommunityTransitiveIpv4AddressType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityTransitiveIpv4AddressType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveIpv4AddressType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityTransitiveIpv4AddressType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveIpv4AddressType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityTransitiveIpv4AddressType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveIpv4AddressType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) Clone() (BgpExtendedCommunityTransitiveIpv4AddressType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityTransitiveIpv4AddressType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) setNil() { + obj.routeTargetSubtypeHolder = nil + obj.routeOriginSubtypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpExtendedCommunityTransitiveIpv4AddressType is the Transitive IPv4 Address Specific Extended Community is sent as type 0x01. +type BgpExtendedCommunityTransitiveIpv4AddressType interface { + Validation + // msg marshals BgpExtendedCommunityTransitiveIpv4AddressType to protobuf object *otg.BgpExtendedCommunityTransitiveIpv4AddressType + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityTransitiveIpv4AddressType + // setMsg unmarshals BgpExtendedCommunityTransitiveIpv4AddressType from protobuf object *otg.BgpExtendedCommunityTransitiveIpv4AddressType + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityTransitiveIpv4AddressType) BgpExtendedCommunityTransitiveIpv4AddressType + // provides marshal interface + Marshal() marshalBgpExtendedCommunityTransitiveIpv4AddressType + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityTransitiveIpv4AddressType + // validate validates BgpExtendedCommunityTransitiveIpv4AddressType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityTransitiveIpv4AddressType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum, set in BgpExtendedCommunityTransitiveIpv4AddressType + Choice() BgpExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum + // setChoice assigns BgpExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum provided by user to BgpExtendedCommunityTransitiveIpv4AddressType + setChoice(value BgpExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum) BgpExtendedCommunityTransitiveIpv4AddressType + // HasChoice checks if Choice has been set in BgpExtendedCommunityTransitiveIpv4AddressType + HasChoice() bool + // RouteTargetSubtype returns BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget, set in BgpExtendedCommunityTransitiveIpv4AddressType. + // BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02. + RouteTargetSubtype() BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // SetRouteTargetSubtype assigns BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget provided by user to BgpExtendedCommunityTransitiveIpv4AddressType. + // BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02. + SetRouteTargetSubtype(value BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) BgpExtendedCommunityTransitiveIpv4AddressType + // HasRouteTargetSubtype checks if RouteTargetSubtype has been set in BgpExtendedCommunityTransitiveIpv4AddressType + HasRouteTargetSubtype() bool + // RouteOriginSubtype returns BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin, set in BgpExtendedCommunityTransitiveIpv4AddressType. + // BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP It is sent with sub-type as 0x03. + RouteOriginSubtype() BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // SetRouteOriginSubtype assigns BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin provided by user to BgpExtendedCommunityTransitiveIpv4AddressType. + // BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP It is sent with sub-type as 0x03. + SetRouteOriginSubtype(value BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) BgpExtendedCommunityTransitiveIpv4AddressType + // HasRouteOriginSubtype checks if RouteOriginSubtype has been set in BgpExtendedCommunityTransitiveIpv4AddressType + HasRouteOriginSubtype() bool + setNil() +} + +type BgpExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum string + +// Enum of Choice on BgpExtendedCommunityTransitiveIpv4AddressType +var BgpExtendedCommunityTransitiveIpv4AddressTypeChoice = struct { + ROUTE_TARGET_SUBTYPE BgpExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum + ROUTE_ORIGIN_SUBTYPE BgpExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum +}{ + ROUTE_TARGET_SUBTYPE: BgpExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum("route_target_subtype"), + ROUTE_ORIGIN_SUBTYPE: BgpExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum("route_origin_subtype"), +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) Choice() BgpExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum { + return BgpExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) setChoice(value BgpExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum) BgpExtendedCommunityTransitiveIpv4AddressType { + intValue, ok := otg.BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.RouteOriginSubtype = nil + obj.routeOriginSubtypeHolder = nil + obj.obj.RouteTargetSubtype = nil + obj.routeTargetSubtypeHolder = nil + + if value == BgpExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_TARGET_SUBTYPE { + obj.obj.RouteTargetSubtype = NewBgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget().msg() + } + + if value == BgpExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_ORIGIN_SUBTYPE { + obj.obj.RouteOriginSubtype = NewBgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin().msg() + } + + return obj +} + +// description is TBD +// RouteTargetSubtype returns a BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) RouteTargetSubtype() BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + if obj.obj.RouteTargetSubtype == nil { + obj.setChoice(BgpExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_TARGET_SUBTYPE) + } + if obj.routeTargetSubtypeHolder == nil { + obj.routeTargetSubtypeHolder = &bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget{obj: obj.obj.RouteTargetSubtype} + } + return obj.routeTargetSubtypeHolder +} + +// description is TBD +// RouteTargetSubtype returns a BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) HasRouteTargetSubtype() bool { + return obj.obj.RouteTargetSubtype != nil +} + +// description is TBD +// SetRouteTargetSubtype sets the BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget value in the BgpExtendedCommunityTransitiveIpv4AddressType object +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) SetRouteTargetSubtype(value BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) BgpExtendedCommunityTransitiveIpv4AddressType { + obj.setChoice(BgpExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_TARGET_SUBTYPE) + obj.routeTargetSubtypeHolder = nil + obj.obj.RouteTargetSubtype = value.msg() + + return obj +} + +// description is TBD +// RouteOriginSubtype returns a BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) RouteOriginSubtype() BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + if obj.obj.RouteOriginSubtype == nil { + obj.setChoice(BgpExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_ORIGIN_SUBTYPE) + } + if obj.routeOriginSubtypeHolder == nil { + obj.routeOriginSubtypeHolder = &bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin{obj: obj.obj.RouteOriginSubtype} + } + return obj.routeOriginSubtypeHolder +} + +// description is TBD +// RouteOriginSubtype returns a BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) HasRouteOriginSubtype() bool { + return obj.obj.RouteOriginSubtype != nil +} + +// description is TBD +// SetRouteOriginSubtype sets the BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin value in the BgpExtendedCommunityTransitiveIpv4AddressType object +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) SetRouteOriginSubtype(value BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) BgpExtendedCommunityTransitiveIpv4AddressType { + obj.setChoice(BgpExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_ORIGIN_SUBTYPE) + obj.routeOriginSubtypeHolder = nil + obj.obj.RouteOriginSubtype = value.msg() + + return obj +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RouteTargetSubtype != nil { + + obj.RouteTargetSubtype().validateObj(vObj, set_default) + } + + if obj.obj.RouteOriginSubtype != nil { + + obj.RouteOriginSubtype().validateObj(vObj, set_default) + } + +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressType) setDefault() { + var choices_set int = 0 + var choice BgpExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum + + if obj.obj.RouteTargetSubtype != nil { + choices_set += 1 + choice = BgpExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_TARGET_SUBTYPE + } + + if obj.obj.RouteOriginSubtype != nil { + choices_set += 1 + choice = BgpExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_ORIGIN_SUBTYPE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(BgpExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_TARGET_SUBTYPE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpExtendedCommunityTransitiveIpv4AddressType") + } + } else { + intVal := otg.BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum_value[string(choice)] + enumValue := otg.BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_extended_community_transitive_ipv4_address_type_route_origin.go b/gosnappi/bgp_extended_community_transitive_ipv4_address_type_route_origin.go new file mode 100644 index 00000000..16276f3d --- /dev/null +++ b/gosnappi/bgp_extended_community_transitive_ipv4_address_type_route_origin.go @@ -0,0 +1,359 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin ***** +type bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin struct { + validation + obj *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + marshaller marshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + unMarshaller unMarshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin +} + +func NewBgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin() BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + obj := bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin{obj: &otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) msg() *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + return obj.obj +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) setMsg(msg *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin struct { + obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin +} + +type marshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin interface { + // ToProto marshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin to protobuf object *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + ToProto() (*otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin, error) + // ToPbText marshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin struct { + obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin +} + +type unMarshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin interface { + // FromProto unmarshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin from protobuf object *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + FromProto(msg *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) (BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin, error) + // FromPbText unmarshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Marshal() marshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Unmarshal() unMarshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ToProto() (*otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) FromProto(msg *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) (BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Clone() (BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP It is sent with sub-type as 0x03. +type BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin interface { + Validation + // msg marshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin to protobuf object *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // setMsg unmarshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin from protobuf object *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // provides marshal interface + Marshal() marshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // validate validates BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // GlobalIpv4Admin returns string, set in BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin. + GlobalIpv4Admin() string + // SetGlobalIpv4Admin assigns string provided by user to BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + SetGlobalIpv4Admin(value string) BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // HasGlobalIpv4Admin checks if GlobalIpv4Admin has been set in BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + HasGlobalIpv4Admin() bool + // Local2ByteAdmin returns uint32, set in BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin. + Local2ByteAdmin() uint32 + // SetLocal2ByteAdmin assigns uint32 provided by user to BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + SetLocal2ByteAdmin(value uint32) BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // HasLocal2ByteAdmin checks if Local2ByteAdmin has been set in BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + HasLocal2ByteAdmin() bool +} + +// An IPv4 unicast address assigned by one of the Internet registries. +// GlobalIpv4Admin returns a string +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) GlobalIpv4Admin() string { + + return *obj.obj.GlobalIpv4Admin + +} + +// An IPv4 unicast address assigned by one of the Internet registries. +// GlobalIpv4Admin returns a string +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) HasGlobalIpv4Admin() bool { + return obj.obj.GlobalIpv4Admin != nil +} + +// An IPv4 unicast address assigned by one of the Internet registries. +// SetGlobalIpv4Admin sets the string value in the BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin object +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) SetGlobalIpv4Admin(value string) BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + + obj.obj.GlobalIpv4Admin = &value + return obj +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Local2ByteAdmin() uint32 { + + return *obj.obj.Local_2ByteAdmin + +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) HasLocal2ByteAdmin() bool { + return obj.obj.Local_2ByteAdmin != nil +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// SetLocal2ByteAdmin sets the uint32 value in the BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin object +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) SetLocal2ByteAdmin(value uint32) BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + + obj.obj.Local_2ByteAdmin = &value + return obj +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.GlobalIpv4Admin != nil { + + err := obj.validateIpv4(obj.GlobalIpv4Admin()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin.GlobalIpv4Admin")) + } + + } + + if obj.obj.Local_2ByteAdmin != nil { + + if *obj.obj.Local_2ByteAdmin > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin.Local_2ByteAdmin <= 65535 but Got %d", *obj.obj.Local_2ByteAdmin)) + } + + } + +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) setDefault() { + if obj.obj.GlobalIpv4Admin == nil { + obj.SetGlobalIpv4Admin("0.0.0.0") + } + if obj.obj.Local_2ByteAdmin == nil { + obj.SetLocal2ByteAdmin(1) + } + +} diff --git a/gosnappi/bgp_extended_community_transitive_ipv4_address_type_route_target.go b/gosnappi/bgp_extended_community_transitive_ipv4_address_type_route_target.go new file mode 100644 index 00000000..46ca3b1c --- /dev/null +++ b/gosnappi/bgp_extended_community_transitive_ipv4_address_type_route_target.go @@ -0,0 +1,359 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget ***** +type bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget struct { + validation + obj *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + marshaller marshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + unMarshaller unMarshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget +} + +func NewBgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget() BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + obj := bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget{obj: &otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) msg() *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + return obj.obj +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) setMsg(msg *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget struct { + obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget +} + +type marshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget interface { + // ToProto marshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget to protobuf object *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + ToProto() (*otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget, error) + // ToPbText marshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget struct { + obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget +} + +type unMarshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget interface { + // FromProto unmarshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget from protobuf object *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + FromProto(msg *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) (BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget, error) + // FromPbText unmarshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Marshal() marshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Unmarshal() unMarshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ToProto() (*otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) FromProto(msg *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) (BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Clone() (BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02. +type BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget interface { + Validation + // msg marshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget to protobuf object *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // setMsg unmarshals BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget from protobuf object *otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // provides marshal interface + Marshal() marshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // validate validates BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // GlobalIpv4Admin returns string, set in BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget. + GlobalIpv4Admin() string + // SetGlobalIpv4Admin assigns string provided by user to BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + SetGlobalIpv4Admin(value string) BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // HasGlobalIpv4Admin checks if GlobalIpv4Admin has been set in BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + HasGlobalIpv4Admin() bool + // Local2ByteAdmin returns uint32, set in BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget. + Local2ByteAdmin() uint32 + // SetLocal2ByteAdmin assigns uint32 provided by user to BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + SetLocal2ByteAdmin(value uint32) BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // HasLocal2ByteAdmin checks if Local2ByteAdmin has been set in BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + HasLocal2ByteAdmin() bool +} + +// An IPv4 unicast address assigned by one of the Internet registries. +// GlobalIpv4Admin returns a string +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) GlobalIpv4Admin() string { + + return *obj.obj.GlobalIpv4Admin + +} + +// An IPv4 unicast address assigned by one of the Internet registries. +// GlobalIpv4Admin returns a string +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) HasGlobalIpv4Admin() bool { + return obj.obj.GlobalIpv4Admin != nil +} + +// An IPv4 unicast address assigned by one of the Internet registries. +// SetGlobalIpv4Admin sets the string value in the BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget object +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) SetGlobalIpv4Admin(value string) BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + + obj.obj.GlobalIpv4Admin = &value + return obj +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Local2ByteAdmin() uint32 { + + return *obj.obj.Local_2ByteAdmin + +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) HasLocal2ByteAdmin() bool { + return obj.obj.Local_2ByteAdmin != nil +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// SetLocal2ByteAdmin sets the uint32 value in the BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget object +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) SetLocal2ByteAdmin(value uint32) BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + + obj.obj.Local_2ByteAdmin = &value + return obj +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.GlobalIpv4Admin != nil { + + err := obj.validateIpv4(obj.GlobalIpv4Admin()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget.GlobalIpv4Admin")) + } + + } + + if obj.obj.Local_2ByteAdmin != nil { + + if *obj.obj.Local_2ByteAdmin > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget.Local_2ByteAdmin <= 65535 but Got %d", *obj.obj.Local_2ByteAdmin)) + } + + } + +} + +func (obj *bgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) setDefault() { + if obj.obj.GlobalIpv4Admin == nil { + obj.SetGlobalIpv4Admin("0.0.0.0") + } + if obj.obj.Local_2ByteAdmin == nil { + obj.SetLocal2ByteAdmin(1) + } + +} diff --git a/gosnappi/bgp_extended_community_transitive_opaque_type.go b/gosnappi/bgp_extended_community_transitive_opaque_type.go new file mode 100644 index 00000000..ff619570 --- /dev/null +++ b/gosnappi/bgp_extended_community_transitive_opaque_type.go @@ -0,0 +1,452 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityTransitiveOpaqueType ***** +type bgpExtendedCommunityTransitiveOpaqueType struct { + validation + obj *otg.BgpExtendedCommunityTransitiveOpaqueType + marshaller marshalBgpExtendedCommunityTransitiveOpaqueType + unMarshaller unMarshalBgpExtendedCommunityTransitiveOpaqueType + colorSubtypeHolder BgpExtendedCommunityTransitiveOpaqueTypeColor + encapsulationSubtypeHolder BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation +} + +func NewBgpExtendedCommunityTransitiveOpaqueType() BgpExtendedCommunityTransitiveOpaqueType { + obj := bgpExtendedCommunityTransitiveOpaqueType{obj: &otg.BgpExtendedCommunityTransitiveOpaqueType{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueType) msg() *otg.BgpExtendedCommunityTransitiveOpaqueType { + return obj.obj +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueType) setMsg(msg *otg.BgpExtendedCommunityTransitiveOpaqueType) BgpExtendedCommunityTransitiveOpaqueType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityTransitiveOpaqueType struct { + obj *bgpExtendedCommunityTransitiveOpaqueType +} + +type marshalBgpExtendedCommunityTransitiveOpaqueType interface { + // ToProto marshals BgpExtendedCommunityTransitiveOpaqueType to protobuf object *otg.BgpExtendedCommunityTransitiveOpaqueType + ToProto() (*otg.BgpExtendedCommunityTransitiveOpaqueType, error) + // ToPbText marshals BgpExtendedCommunityTransitiveOpaqueType to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityTransitiveOpaqueType to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityTransitiveOpaqueType to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityTransitiveOpaqueType struct { + obj *bgpExtendedCommunityTransitiveOpaqueType +} + +type unMarshalBgpExtendedCommunityTransitiveOpaqueType interface { + // FromProto unmarshals BgpExtendedCommunityTransitiveOpaqueType from protobuf object *otg.BgpExtendedCommunityTransitiveOpaqueType + FromProto(msg *otg.BgpExtendedCommunityTransitiveOpaqueType) (BgpExtendedCommunityTransitiveOpaqueType, error) + // FromPbText unmarshals BgpExtendedCommunityTransitiveOpaqueType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityTransitiveOpaqueType from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityTransitiveOpaqueType from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueType) Marshal() marshalBgpExtendedCommunityTransitiveOpaqueType { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityTransitiveOpaqueType{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueType) Unmarshal() unMarshalBgpExtendedCommunityTransitiveOpaqueType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityTransitiveOpaqueType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityTransitiveOpaqueType) ToProto() (*otg.BgpExtendedCommunityTransitiveOpaqueType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveOpaqueType) FromProto(msg *otg.BgpExtendedCommunityTransitiveOpaqueType) (BgpExtendedCommunityTransitiveOpaqueType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityTransitiveOpaqueType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveOpaqueType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityTransitiveOpaqueType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveOpaqueType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityTransitiveOpaqueType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveOpaqueType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueType) Clone() (BgpExtendedCommunityTransitiveOpaqueType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityTransitiveOpaqueType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueType) setNil() { + obj.colorSubtypeHolder = nil + obj.encapsulationSubtypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpExtendedCommunityTransitiveOpaqueType is the Transitive Opaque Extended Community is sent as type 0x03. +type BgpExtendedCommunityTransitiveOpaqueType interface { + Validation + // msg marshals BgpExtendedCommunityTransitiveOpaqueType to protobuf object *otg.BgpExtendedCommunityTransitiveOpaqueType + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityTransitiveOpaqueType + // setMsg unmarshals BgpExtendedCommunityTransitiveOpaqueType from protobuf object *otg.BgpExtendedCommunityTransitiveOpaqueType + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityTransitiveOpaqueType) BgpExtendedCommunityTransitiveOpaqueType + // provides marshal interface + Marshal() marshalBgpExtendedCommunityTransitiveOpaqueType + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityTransitiveOpaqueType + // validate validates BgpExtendedCommunityTransitiveOpaqueType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityTransitiveOpaqueType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpExtendedCommunityTransitiveOpaqueTypeChoiceEnum, set in BgpExtendedCommunityTransitiveOpaqueType + Choice() BgpExtendedCommunityTransitiveOpaqueTypeChoiceEnum + // setChoice assigns BgpExtendedCommunityTransitiveOpaqueTypeChoiceEnum provided by user to BgpExtendedCommunityTransitiveOpaqueType + setChoice(value BgpExtendedCommunityTransitiveOpaqueTypeChoiceEnum) BgpExtendedCommunityTransitiveOpaqueType + // HasChoice checks if Choice has been set in BgpExtendedCommunityTransitiveOpaqueType + HasChoice() bool + // ColorSubtype returns BgpExtendedCommunityTransitiveOpaqueTypeColor, set in BgpExtendedCommunityTransitiveOpaqueType. + // BgpExtendedCommunityTransitiveOpaqueTypeColor is the Color Community contains locally administrator defined 'color' value which is used in conjunction with Encapsulation attribute to decide whether a data packet can be transmitted on a certain tunnel or not. It is defined in RFC9012 and sent with sub-type as 0x0b. + ColorSubtype() BgpExtendedCommunityTransitiveOpaqueTypeColor + // SetColorSubtype assigns BgpExtendedCommunityTransitiveOpaqueTypeColor provided by user to BgpExtendedCommunityTransitiveOpaqueType. + // BgpExtendedCommunityTransitiveOpaqueTypeColor is the Color Community contains locally administrator defined 'color' value which is used in conjunction with Encapsulation attribute to decide whether a data packet can be transmitted on a certain tunnel or not. It is defined in RFC9012 and sent with sub-type as 0x0b. + SetColorSubtype(value BgpExtendedCommunityTransitiveOpaqueTypeColor) BgpExtendedCommunityTransitiveOpaqueType + // HasColorSubtype checks if ColorSubtype has been set in BgpExtendedCommunityTransitiveOpaqueType + HasColorSubtype() bool + // EncapsulationSubtype returns BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation, set in BgpExtendedCommunityTransitiveOpaqueType. + // BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation is this identifies the type of tunneling technology being signalled. It is defined in RFC9012 and sent with sub-type as 0x0c. + EncapsulationSubtype() BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + // SetEncapsulationSubtype assigns BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation provided by user to BgpExtendedCommunityTransitiveOpaqueType. + // BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation is this identifies the type of tunneling technology being signalled. It is defined in RFC9012 and sent with sub-type as 0x0c. + SetEncapsulationSubtype(value BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) BgpExtendedCommunityTransitiveOpaqueType + // HasEncapsulationSubtype checks if EncapsulationSubtype has been set in BgpExtendedCommunityTransitiveOpaqueType + HasEncapsulationSubtype() bool + setNil() +} + +type BgpExtendedCommunityTransitiveOpaqueTypeChoiceEnum string + +// Enum of Choice on BgpExtendedCommunityTransitiveOpaqueType +var BgpExtendedCommunityTransitiveOpaqueTypeChoice = struct { + COLOR_SUBTYPE BgpExtendedCommunityTransitiveOpaqueTypeChoiceEnum + ENCAPSULATION_SUBTYPE BgpExtendedCommunityTransitiveOpaqueTypeChoiceEnum +}{ + COLOR_SUBTYPE: BgpExtendedCommunityTransitiveOpaqueTypeChoiceEnum("color_subtype"), + ENCAPSULATION_SUBTYPE: BgpExtendedCommunityTransitiveOpaqueTypeChoiceEnum("encapsulation_subtype"), +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueType) Choice() BgpExtendedCommunityTransitiveOpaqueTypeChoiceEnum { + return BgpExtendedCommunityTransitiveOpaqueTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *bgpExtendedCommunityTransitiveOpaqueType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueType) setChoice(value BgpExtendedCommunityTransitiveOpaqueTypeChoiceEnum) BgpExtendedCommunityTransitiveOpaqueType { + intValue, ok := otg.BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpExtendedCommunityTransitiveOpaqueTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.EncapsulationSubtype = nil + obj.encapsulationSubtypeHolder = nil + obj.obj.ColorSubtype = nil + obj.colorSubtypeHolder = nil + + if value == BgpExtendedCommunityTransitiveOpaqueTypeChoice.COLOR_SUBTYPE { + obj.obj.ColorSubtype = NewBgpExtendedCommunityTransitiveOpaqueTypeColor().msg() + } + + if value == BgpExtendedCommunityTransitiveOpaqueTypeChoice.ENCAPSULATION_SUBTYPE { + obj.obj.EncapsulationSubtype = NewBgpExtendedCommunityTransitiveOpaqueTypeEncapsulation().msg() + } + + return obj +} + +// description is TBD +// ColorSubtype returns a BgpExtendedCommunityTransitiveOpaqueTypeColor +func (obj *bgpExtendedCommunityTransitiveOpaqueType) ColorSubtype() BgpExtendedCommunityTransitiveOpaqueTypeColor { + if obj.obj.ColorSubtype == nil { + obj.setChoice(BgpExtendedCommunityTransitiveOpaqueTypeChoice.COLOR_SUBTYPE) + } + if obj.colorSubtypeHolder == nil { + obj.colorSubtypeHolder = &bgpExtendedCommunityTransitiveOpaqueTypeColor{obj: obj.obj.ColorSubtype} + } + return obj.colorSubtypeHolder +} + +// description is TBD +// ColorSubtype returns a BgpExtendedCommunityTransitiveOpaqueTypeColor +func (obj *bgpExtendedCommunityTransitiveOpaqueType) HasColorSubtype() bool { + return obj.obj.ColorSubtype != nil +} + +// description is TBD +// SetColorSubtype sets the BgpExtendedCommunityTransitiveOpaqueTypeColor value in the BgpExtendedCommunityTransitiveOpaqueType object +func (obj *bgpExtendedCommunityTransitiveOpaqueType) SetColorSubtype(value BgpExtendedCommunityTransitiveOpaqueTypeColor) BgpExtendedCommunityTransitiveOpaqueType { + obj.setChoice(BgpExtendedCommunityTransitiveOpaqueTypeChoice.COLOR_SUBTYPE) + obj.colorSubtypeHolder = nil + obj.obj.ColorSubtype = value.msg() + + return obj +} + +// description is TBD +// EncapsulationSubtype returns a BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation +func (obj *bgpExtendedCommunityTransitiveOpaqueType) EncapsulationSubtype() BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation { + if obj.obj.EncapsulationSubtype == nil { + obj.setChoice(BgpExtendedCommunityTransitiveOpaqueTypeChoice.ENCAPSULATION_SUBTYPE) + } + if obj.encapsulationSubtypeHolder == nil { + obj.encapsulationSubtypeHolder = &bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation{obj: obj.obj.EncapsulationSubtype} + } + return obj.encapsulationSubtypeHolder +} + +// description is TBD +// EncapsulationSubtype returns a BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation +func (obj *bgpExtendedCommunityTransitiveOpaqueType) HasEncapsulationSubtype() bool { + return obj.obj.EncapsulationSubtype != nil +} + +// description is TBD +// SetEncapsulationSubtype sets the BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation value in the BgpExtendedCommunityTransitiveOpaqueType object +func (obj *bgpExtendedCommunityTransitiveOpaqueType) SetEncapsulationSubtype(value BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) BgpExtendedCommunityTransitiveOpaqueType { + obj.setChoice(BgpExtendedCommunityTransitiveOpaqueTypeChoice.ENCAPSULATION_SUBTYPE) + obj.encapsulationSubtypeHolder = nil + obj.obj.EncapsulationSubtype = value.msg() + + return obj +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.ColorSubtype != nil { + + obj.ColorSubtype().validateObj(vObj, set_default) + } + + if obj.obj.EncapsulationSubtype != nil { + + obj.EncapsulationSubtype().validateObj(vObj, set_default) + } + +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueType) setDefault() { + var choices_set int = 0 + var choice BgpExtendedCommunityTransitiveOpaqueTypeChoiceEnum + + if obj.obj.ColorSubtype != nil { + choices_set += 1 + choice = BgpExtendedCommunityTransitiveOpaqueTypeChoice.COLOR_SUBTYPE + } + + if obj.obj.EncapsulationSubtype != nil { + choices_set += 1 + choice = BgpExtendedCommunityTransitiveOpaqueTypeChoice.ENCAPSULATION_SUBTYPE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(BgpExtendedCommunityTransitiveOpaqueTypeChoice.COLOR_SUBTYPE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpExtendedCommunityTransitiveOpaqueType") + } + } else { + intVal := otg.BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum_value[string(choice)] + enumValue := otg.BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_extended_community_transitive_opaque_type_color.go b/gosnappi/bgp_extended_community_transitive_opaque_type_color.go new file mode 100644 index 00000000..4cba0bed --- /dev/null +++ b/gosnappi/bgp_extended_community_transitive_opaque_type_color.go @@ -0,0 +1,350 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityTransitiveOpaqueTypeColor ***** +type bgpExtendedCommunityTransitiveOpaqueTypeColor struct { + validation + obj *otg.BgpExtendedCommunityTransitiveOpaqueTypeColor + marshaller marshalBgpExtendedCommunityTransitiveOpaqueTypeColor + unMarshaller unMarshalBgpExtendedCommunityTransitiveOpaqueTypeColor +} + +func NewBgpExtendedCommunityTransitiveOpaqueTypeColor() BgpExtendedCommunityTransitiveOpaqueTypeColor { + obj := bgpExtendedCommunityTransitiveOpaqueTypeColor{obj: &otg.BgpExtendedCommunityTransitiveOpaqueTypeColor{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) msg() *otg.BgpExtendedCommunityTransitiveOpaqueTypeColor { + return obj.obj +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) setMsg(msg *otg.BgpExtendedCommunityTransitiveOpaqueTypeColor) BgpExtendedCommunityTransitiveOpaqueTypeColor { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityTransitiveOpaqueTypeColor struct { + obj *bgpExtendedCommunityTransitiveOpaqueTypeColor +} + +type marshalBgpExtendedCommunityTransitiveOpaqueTypeColor interface { + // ToProto marshals BgpExtendedCommunityTransitiveOpaqueTypeColor to protobuf object *otg.BgpExtendedCommunityTransitiveOpaqueTypeColor + ToProto() (*otg.BgpExtendedCommunityTransitiveOpaqueTypeColor, error) + // ToPbText marshals BgpExtendedCommunityTransitiveOpaqueTypeColor to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityTransitiveOpaqueTypeColor to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityTransitiveOpaqueTypeColor to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityTransitiveOpaqueTypeColor struct { + obj *bgpExtendedCommunityTransitiveOpaqueTypeColor +} + +type unMarshalBgpExtendedCommunityTransitiveOpaqueTypeColor interface { + // FromProto unmarshals BgpExtendedCommunityTransitiveOpaqueTypeColor from protobuf object *otg.BgpExtendedCommunityTransitiveOpaqueTypeColor + FromProto(msg *otg.BgpExtendedCommunityTransitiveOpaqueTypeColor) (BgpExtendedCommunityTransitiveOpaqueTypeColor, error) + // FromPbText unmarshals BgpExtendedCommunityTransitiveOpaqueTypeColor from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityTransitiveOpaqueTypeColor from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityTransitiveOpaqueTypeColor from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) Marshal() marshalBgpExtendedCommunityTransitiveOpaqueTypeColor { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityTransitiveOpaqueTypeColor{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) Unmarshal() unMarshalBgpExtendedCommunityTransitiveOpaqueTypeColor { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityTransitiveOpaqueTypeColor{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityTransitiveOpaqueTypeColor) ToProto() (*otg.BgpExtendedCommunityTransitiveOpaqueTypeColor, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveOpaqueTypeColor) FromProto(msg *otg.BgpExtendedCommunityTransitiveOpaqueTypeColor) (BgpExtendedCommunityTransitiveOpaqueTypeColor, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityTransitiveOpaqueTypeColor) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveOpaqueTypeColor) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityTransitiveOpaqueTypeColor) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveOpaqueTypeColor) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityTransitiveOpaqueTypeColor) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveOpaqueTypeColor) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) Clone() (BgpExtendedCommunityTransitiveOpaqueTypeColor, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityTransitiveOpaqueTypeColor() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpExtendedCommunityTransitiveOpaqueTypeColor is the Color Community contains locally administrator defined 'color' value which is used in conjunction with Encapsulation attribute to decide whether a data packet can be transmitted on a certain tunnel or not. It is defined in RFC9012 and sent with sub-type as 0x0b. +type BgpExtendedCommunityTransitiveOpaqueTypeColor interface { + Validation + // msg marshals BgpExtendedCommunityTransitiveOpaqueTypeColor to protobuf object *otg.BgpExtendedCommunityTransitiveOpaqueTypeColor + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityTransitiveOpaqueTypeColor + // setMsg unmarshals BgpExtendedCommunityTransitiveOpaqueTypeColor from protobuf object *otg.BgpExtendedCommunityTransitiveOpaqueTypeColor + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityTransitiveOpaqueTypeColor) BgpExtendedCommunityTransitiveOpaqueTypeColor + // provides marshal interface + Marshal() marshalBgpExtendedCommunityTransitiveOpaqueTypeColor + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityTransitiveOpaqueTypeColor + // validate validates BgpExtendedCommunityTransitiveOpaqueTypeColor + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityTransitiveOpaqueTypeColor, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns uint32, set in BgpExtendedCommunityTransitiveOpaqueTypeColor. + Flags() uint32 + // SetFlags assigns uint32 provided by user to BgpExtendedCommunityTransitiveOpaqueTypeColor + SetFlags(value uint32) BgpExtendedCommunityTransitiveOpaqueTypeColor + // HasFlags checks if Flags has been set in BgpExtendedCommunityTransitiveOpaqueTypeColor + HasFlags() bool + // Color returns uint32, set in BgpExtendedCommunityTransitiveOpaqueTypeColor. + Color() uint32 + // SetColor assigns uint32 provided by user to BgpExtendedCommunityTransitiveOpaqueTypeColor + SetColor(value uint32) BgpExtendedCommunityTransitiveOpaqueTypeColor + // HasColor checks if Color has been set in BgpExtendedCommunityTransitiveOpaqueTypeColor + HasColor() bool +} + +// Two octet flag values. +// Flags returns a uint32 +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) Flags() uint32 { + + return *obj.obj.Flags + +} + +// Two octet flag values. +// Flags returns a uint32 +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) HasFlags() bool { + return obj.obj.Flags != nil +} + +// Two octet flag values. +// SetFlags sets the uint32 value in the BgpExtendedCommunityTransitiveOpaqueTypeColor object +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) SetFlags(value uint32) BgpExtendedCommunityTransitiveOpaqueTypeColor { + + obj.obj.Flags = &value + return obj +} + +// The color value is user defined and configured locally and used to determine whether a data packet can be transmitted on a certain tunnel or not in conjunction with the Encapsulation attribute. It is defined in RFC9012. +// Color returns a uint32 +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) Color() uint32 { + + return *obj.obj.Color + +} + +// The color value is user defined and configured locally and used to determine whether a data packet can be transmitted on a certain tunnel or not in conjunction with the Encapsulation attribute. It is defined in RFC9012. +// Color returns a uint32 +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) HasColor() bool { + return obj.obj.Color != nil +} + +// The color value is user defined and configured locally and used to determine whether a data packet can be transmitted on a certain tunnel or not in conjunction with the Encapsulation attribute. It is defined in RFC9012. +// SetColor sets the uint32 value in the BgpExtendedCommunityTransitiveOpaqueTypeColor object +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) SetColor(value uint32) BgpExtendedCommunityTransitiveOpaqueTypeColor { + + obj.obj.Color = &value + return obj +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + if *obj.obj.Flags > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpExtendedCommunityTransitiveOpaqueTypeColor.Flags <= 65535 but Got %d", *obj.obj.Flags)) + } + + } + +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeColor) setDefault() { + if obj.obj.Flags == nil { + obj.SetFlags(0) + } + if obj.obj.Color == nil { + obj.SetColor(0) + } + +} diff --git a/gosnappi/bgp_extended_community_transitive_opaque_type_encapsulation.go b/gosnappi/bgp_extended_community_transitive_opaque_type_encapsulation.go new file mode 100644 index 00000000..469b2e55 --- /dev/null +++ b/gosnappi/bgp_extended_community_transitive_opaque_type_encapsulation.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation ***** +type bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation struct { + validation + obj *otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + marshaller marshalBgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + unMarshaller unMarshalBgpExtendedCommunityTransitiveOpaqueTypeEncapsulation +} + +func NewBgpExtendedCommunityTransitiveOpaqueTypeEncapsulation() BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation { + obj := bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation{obj: &otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation{}} + obj.setDefault() + return &obj +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) msg() *otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation { + return obj.obj +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) setMsg(msg *otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpExtendedCommunityTransitiveOpaqueTypeEncapsulation struct { + obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation +} + +type marshalBgpExtendedCommunityTransitiveOpaqueTypeEncapsulation interface { + // ToProto marshals BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation to protobuf object *otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + ToProto() (*otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation, error) + // ToPbText marshals BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation to YAML text + ToYaml() (string, error) + // ToJson marshals BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation to JSON text + ToJson() (string, error) +} + +type unMarshalbgpExtendedCommunityTransitiveOpaqueTypeEncapsulation struct { + obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation +} + +type unMarshalBgpExtendedCommunityTransitiveOpaqueTypeEncapsulation interface { + // FromProto unmarshals BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation from protobuf object *otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + FromProto(msg *otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) (BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation, error) + // FromPbText unmarshals BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation from JSON text + FromJson(value string) error +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) Marshal() marshalBgpExtendedCommunityTransitiveOpaqueTypeEncapsulation { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpExtendedCommunityTransitiveOpaqueTypeEncapsulation{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) Unmarshal() unMarshalBgpExtendedCommunityTransitiveOpaqueTypeEncapsulation { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpExtendedCommunityTransitiveOpaqueTypeEncapsulation{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) ToProto() (*otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) FromProto(msg *otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) (BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) Clone() (BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpExtendedCommunityTransitiveOpaqueTypeEncapsulation() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation is this identifies the type of tunneling technology being signalled. It is defined in RFC9012 and sent with sub-type as 0x0c. +type BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation interface { + Validation + // msg marshals BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation to protobuf object *otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + // and doesn't set defaults + msg() *otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + // setMsg unmarshals BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation from protobuf object *otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + // and doesn't set defaults + setMsg(*otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + // provides marshal interface + Marshal() marshalBgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + // provides unmarshal interface + Unmarshal() unMarshalBgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + // validate validates BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Reserved returns uint32, set in BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation. + Reserved() uint32 + // SetReserved assigns uint32 provided by user to BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + SetReserved(value uint32) BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + // HasReserved checks if Reserved has been set in BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + HasReserved() bool + // TunnelType returns uint32, set in BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation. + TunnelType() uint32 + // SetTunnelType assigns uint32 provided by user to BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + SetTunnelType(value uint32) BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + // HasTunnelType checks if TunnelType has been set in BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + HasTunnelType() bool +} + +// Four bytes of reserved values. Normally set to 0 on transmit and ignored on receive. +// Reserved returns a uint32 +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) Reserved() uint32 { + + return *obj.obj.Reserved + +} + +// Four bytes of reserved values. Normally set to 0 on transmit and ignored on receive. +// Reserved returns a uint32 +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) HasReserved() bool { + return obj.obj.Reserved != nil +} + +// Four bytes of reserved values. Normally set to 0 on transmit and ignored on receive. +// SetReserved sets the uint32 value in the BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation object +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) SetReserved(value uint32) BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation { + + obj.obj.Reserved = &value + return obj +} + +// Identifies the type of tunneling technology being signalled. Initially defined in RFC5512 and extended in RFC9012. Some of the important tunnel types include 1 L2TPv3 over IP [RFC9012], +// 2 GRE [RFC9012] +// 7 IP in IP [RFC9012] +// 8 VXLAN Encapsulation [RFC8365] +// 9 NVGRE Encapsulation [RFC8365] +// 10 MPLS Encapsulation [RFC8365] +// 15 SR TE Policy Type [draft-ietf-idr-segment-routing-te-policy] +// 19 Geneve Encapsulation [RFC8926] +// TunnelType returns a uint32 +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) TunnelType() uint32 { + + return *obj.obj.TunnelType + +} + +// Identifies the type of tunneling technology being signalled. Initially defined in RFC5512 and extended in RFC9012. Some of the important tunnel types include 1 L2TPv3 over IP [RFC9012], +// 2 GRE [RFC9012] +// 7 IP in IP [RFC9012] +// 8 VXLAN Encapsulation [RFC8365] +// 9 NVGRE Encapsulation [RFC8365] +// 10 MPLS Encapsulation [RFC8365] +// 15 SR TE Policy Type [draft-ietf-idr-segment-routing-te-policy] +// 19 Geneve Encapsulation [RFC8926] +// TunnelType returns a uint32 +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) HasTunnelType() bool { + return obj.obj.TunnelType != nil +} + +// Identifies the type of tunneling technology being signalled. Initially defined in RFC5512 and extended in RFC9012. Some of the important tunnel types include 1 L2TPv3 over IP [RFC9012], +// 2 GRE [RFC9012] +// 7 IP in IP [RFC9012] +// 8 VXLAN Encapsulation [RFC8365] +// 9 NVGRE Encapsulation [RFC8365] +// 10 MPLS Encapsulation [RFC8365] +// 15 SR TE Policy Type [draft-ietf-idr-segment-routing-te-policy] +// 19 Geneve Encapsulation [RFC8926] +// SetTunnelType sets the uint32 value in the BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation object +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) SetTunnelType(value uint32) BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation { + + obj.obj.TunnelType = &value + return obj +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.TunnelType != nil { + + if *obj.obj.TunnelType > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation.TunnelType <= 65535 but Got %d", *obj.obj.TunnelType)) + } + + } + +} + +func (obj *bgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) setDefault() { + if obj.obj.Reserved == nil { + obj.SetReserved(0) + } + if obj.obj.TunnelType == nil { + obj.SetTunnelType(1) + } + +} diff --git a/gosnappi/bgp_graceful_restart.go b/gosnappi/bgp_graceful_restart.go new file mode 100644 index 00000000..10eb6377 --- /dev/null +++ b/gosnappi/bgp_graceful_restart.go @@ -0,0 +1,474 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpGracefulRestart ***** +type bgpGracefulRestart struct { + validation + obj *otg.BgpGracefulRestart + marshaller marshalBgpGracefulRestart + unMarshaller unMarshalBgpGracefulRestart +} + +func NewBgpGracefulRestart() BgpGracefulRestart { + obj := bgpGracefulRestart{obj: &otg.BgpGracefulRestart{}} + obj.setDefault() + return &obj +} + +func (obj *bgpGracefulRestart) msg() *otg.BgpGracefulRestart { + return obj.obj +} + +func (obj *bgpGracefulRestart) setMsg(msg *otg.BgpGracefulRestart) BgpGracefulRestart { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpGracefulRestart struct { + obj *bgpGracefulRestart +} + +type marshalBgpGracefulRestart interface { + // ToProto marshals BgpGracefulRestart to protobuf object *otg.BgpGracefulRestart + ToProto() (*otg.BgpGracefulRestart, error) + // ToPbText marshals BgpGracefulRestart to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpGracefulRestart to YAML text + ToYaml() (string, error) + // ToJson marshals BgpGracefulRestart to JSON text + ToJson() (string, error) +} + +type unMarshalbgpGracefulRestart struct { + obj *bgpGracefulRestart +} + +type unMarshalBgpGracefulRestart interface { + // FromProto unmarshals BgpGracefulRestart from protobuf object *otg.BgpGracefulRestart + FromProto(msg *otg.BgpGracefulRestart) (BgpGracefulRestart, error) + // FromPbText unmarshals BgpGracefulRestart from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpGracefulRestart from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpGracefulRestart from JSON text + FromJson(value string) error +} + +func (obj *bgpGracefulRestart) Marshal() marshalBgpGracefulRestart { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpGracefulRestart{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpGracefulRestart) Unmarshal() unMarshalBgpGracefulRestart { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpGracefulRestart{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpGracefulRestart) ToProto() (*otg.BgpGracefulRestart, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpGracefulRestart) FromProto(msg *otg.BgpGracefulRestart) (BgpGracefulRestart, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpGracefulRestart) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpGracefulRestart) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpGracefulRestart) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpGracefulRestart) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpGracefulRestart) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpGracefulRestart) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpGracefulRestart) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpGracefulRestart) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpGracefulRestart) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpGracefulRestart) Clone() (BgpGracefulRestart, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpGracefulRestart() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpGracefulRestart is the Graceful Restart Capability (RFC 4724) is a BGP capability that can be used by a BGP speaker to indicate its ability to preserve its forwarding state during BGP restart. The Graceful Restart (GR) capability is advertised in OPEN messages sent between BGP peers. After a BGP session has been established, and the initial routing update has been completed, an End-of-RIB (Routing Information Base) marker is sent in an UPDATE message to convey information about routing convergence. +type BgpGracefulRestart interface { + Validation + // msg marshals BgpGracefulRestart to protobuf object *otg.BgpGracefulRestart + // and doesn't set defaults + msg() *otg.BgpGracefulRestart + // setMsg unmarshals BgpGracefulRestart from protobuf object *otg.BgpGracefulRestart + // and doesn't set defaults + setMsg(*otg.BgpGracefulRestart) BgpGracefulRestart + // provides marshal interface + Marshal() marshalBgpGracefulRestart + // provides unmarshal interface + Unmarshal() unMarshalBgpGracefulRestart + // validate validates BgpGracefulRestart + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpGracefulRestart, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EnableGr returns bool, set in BgpGracefulRestart. + EnableGr() bool + // SetEnableGr assigns bool provided by user to BgpGracefulRestart + SetEnableGr(value bool) BgpGracefulRestart + // HasEnableGr checks if EnableGr has been set in BgpGracefulRestart + HasEnableGr() bool + // RestartTime returns uint32, set in BgpGracefulRestart. + RestartTime() uint32 + // SetRestartTime assigns uint32 provided by user to BgpGracefulRestart + SetRestartTime(value uint32) BgpGracefulRestart + // HasRestartTime checks if RestartTime has been set in BgpGracefulRestart + HasRestartTime() bool + // EnableLlgr returns bool, set in BgpGracefulRestart. + EnableLlgr() bool + // SetEnableLlgr assigns bool provided by user to BgpGracefulRestart + SetEnableLlgr(value bool) BgpGracefulRestart + // HasEnableLlgr checks if EnableLlgr has been set in BgpGracefulRestart + HasEnableLlgr() bool + // StaleTime returns uint32, set in BgpGracefulRestart. + StaleTime() uint32 + // SetStaleTime assigns uint32 provided by user to BgpGracefulRestart + SetStaleTime(value uint32) BgpGracefulRestart + // HasStaleTime checks if StaleTime has been set in BgpGracefulRestart + HasStaleTime() bool + // EnableNotification returns bool, set in BgpGracefulRestart. + EnableNotification() bool + // SetEnableNotification assigns bool provided by user to BgpGracefulRestart + SetEnableNotification(value bool) BgpGracefulRestart + // HasEnableNotification checks if EnableNotification has been set in BgpGracefulRestart + HasEnableNotification() bool +} + +// If enabled, Graceful Restart capability is advertised in BGP OPEN messages. +// EnableGr returns a bool +func (obj *bgpGracefulRestart) EnableGr() bool { + + return *obj.obj.EnableGr + +} + +// If enabled, Graceful Restart capability is advertised in BGP OPEN messages. +// EnableGr returns a bool +func (obj *bgpGracefulRestart) HasEnableGr() bool { + return obj.obj.EnableGr != nil +} + +// If enabled, Graceful Restart capability is advertised in BGP OPEN messages. +// SetEnableGr sets the bool value in the BgpGracefulRestart object +func (obj *bgpGracefulRestart) SetEnableGr(value bool) BgpGracefulRestart { + + obj.obj.EnableGr = &value + return obj +} + +// This is the estimated duration (in seconds) it will take for the BGP session to be re-established after a restart. This can be used to speed up routing convergence by its peer in case the BGP speaker does not come back after a restart. +// RestartTime returns a uint32 +func (obj *bgpGracefulRestart) RestartTime() uint32 { + + return *obj.obj.RestartTime + +} + +// This is the estimated duration (in seconds) it will take for the BGP session to be re-established after a restart. This can be used to speed up routing convergence by its peer in case the BGP speaker does not come back after a restart. +// RestartTime returns a uint32 +func (obj *bgpGracefulRestart) HasRestartTime() bool { + return obj.obj.RestartTime != nil +} + +// This is the estimated duration (in seconds) it will take for the BGP session to be re-established after a restart. This can be used to speed up routing convergence by its peer in case the BGP speaker does not come back after a restart. +// SetRestartTime sets the uint32 value in the BgpGracefulRestart object +func (obj *bgpGracefulRestart) SetRestartTime(value uint32) BgpGracefulRestart { + + obj.obj.RestartTime = &value + return obj +} + +// If enabled, the "Long-lived Graceful Restart Capability", or "LLGR Capability" +// will be advertised. +// This capability MUST be advertised in conjunction with the Graceful Restart +// capability. +// EnableLlgr returns a bool +func (obj *bgpGracefulRestart) EnableLlgr() bool { + + return *obj.obj.EnableLlgr + +} + +// If enabled, the "Long-lived Graceful Restart Capability", or "LLGR Capability" +// will be advertised. +// This capability MUST be advertised in conjunction with the Graceful Restart +// capability. +// EnableLlgr returns a bool +func (obj *bgpGracefulRestart) HasEnableLlgr() bool { + return obj.obj.EnableLlgr != nil +} + +// If enabled, the "Long-lived Graceful Restart Capability", or "LLGR Capability" +// will be advertised. +// This capability MUST be advertised in conjunction with the Graceful Restart +// capability. +// SetEnableLlgr sets the bool value in the BgpGracefulRestart object +func (obj *bgpGracefulRestart) SetEnableLlgr(value bool) BgpGracefulRestart { + + obj.obj.EnableLlgr = &value + return obj +} + +// Duration (in seconds) specifying how long stale information (for the AFI/SAFI) +// may be retained. This is a three byte field and is applicable +// only if 'enable_llgr' is set to 'true'. +// StaleTime returns a uint32 +func (obj *bgpGracefulRestart) StaleTime() uint32 { + + return *obj.obj.StaleTime + +} + +// Duration (in seconds) specifying how long stale information (for the AFI/SAFI) +// may be retained. This is a three byte field and is applicable +// only if 'enable_llgr' is set to 'true'. +// StaleTime returns a uint32 +func (obj *bgpGracefulRestart) HasStaleTime() bool { + return obj.obj.StaleTime != nil +} + +// Duration (in seconds) specifying how long stale information (for the AFI/SAFI) +// may be retained. This is a three byte field and is applicable +// only if 'enable_llgr' is set to 'true'. +// SetStaleTime sets the uint32 value in the BgpGracefulRestart object +func (obj *bgpGracefulRestart) SetStaleTime(value uint32) BgpGracefulRestart { + + obj.obj.StaleTime = &value + return obj +} + +// If enabled, the N flag will be set in the Graceful Restart capability in the Open message. +// If both peers in a BGP connection has this enabled, Graceful Restart procedures are performed +// even if the peer goes down due to sending of a Notification Message as per RFC8538. +// EnableNotification returns a bool +func (obj *bgpGracefulRestart) EnableNotification() bool { + + return *obj.obj.EnableNotification + +} + +// If enabled, the N flag will be set in the Graceful Restart capability in the Open message. +// If both peers in a BGP connection has this enabled, Graceful Restart procedures are performed +// even if the peer goes down due to sending of a Notification Message as per RFC8538. +// EnableNotification returns a bool +func (obj *bgpGracefulRestart) HasEnableNotification() bool { + return obj.obj.EnableNotification != nil +} + +// If enabled, the N flag will be set in the Graceful Restart capability in the Open message. +// If both peers in a BGP connection has this enabled, Graceful Restart procedures are performed +// even if the peer goes down due to sending of a Notification Message as per RFC8538. +// SetEnableNotification sets the bool value in the BgpGracefulRestart object +func (obj *bgpGracefulRestart) SetEnableNotification(value bool) BgpGracefulRestart { + + obj.obj.EnableNotification = &value + return obj +} + +func (obj *bgpGracefulRestart) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RestartTime != nil { + + if *obj.obj.RestartTime > 4096 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpGracefulRestart.RestartTime <= 4096 but Got %d", *obj.obj.RestartTime)) + } + + } + + if obj.obj.StaleTime != nil { + + if *obj.obj.StaleTime > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpGracefulRestart.StaleTime <= 16777215 but Got %d", *obj.obj.StaleTime)) + } + + } + +} + +func (obj *bgpGracefulRestart) setDefault() { + if obj.obj.EnableGr == nil { + obj.SetEnableGr(false) + } + if obj.obj.RestartTime == nil { + obj.SetRestartTime(45) + } + if obj.obj.EnableLlgr == nil { + obj.SetEnableLlgr(false) + } + if obj.obj.StaleTime == nil { + obj.SetStaleTime(10) + } + if obj.obj.EnableNotification == nil { + obj.SetEnableNotification(true) + } + +} diff --git a/gosnappi/bgp_ipv4_sr_policy_nlri_prefix.go b/gosnappi/bgp_ipv4_sr_policy_nlri_prefix.go new file mode 100644 index 00000000..134dd57a --- /dev/null +++ b/gosnappi/bgp_ipv4_sr_policy_nlri_prefix.go @@ -0,0 +1,380 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpIpv4SrPolicyNLRIPrefix ***** +type bgpIpv4SrPolicyNLRIPrefix struct { + validation + obj *otg.BgpIpv4SrPolicyNLRIPrefix + marshaller marshalBgpIpv4SrPolicyNLRIPrefix + unMarshaller unMarshalBgpIpv4SrPolicyNLRIPrefix +} + +func NewBgpIpv4SrPolicyNLRIPrefix() BgpIpv4SrPolicyNLRIPrefix { + obj := bgpIpv4SrPolicyNLRIPrefix{obj: &otg.BgpIpv4SrPolicyNLRIPrefix{}} + obj.setDefault() + return &obj +} + +func (obj *bgpIpv4SrPolicyNLRIPrefix) msg() *otg.BgpIpv4SrPolicyNLRIPrefix { + return obj.obj +} + +func (obj *bgpIpv4SrPolicyNLRIPrefix) setMsg(msg *otg.BgpIpv4SrPolicyNLRIPrefix) BgpIpv4SrPolicyNLRIPrefix { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpIpv4SrPolicyNLRIPrefix struct { + obj *bgpIpv4SrPolicyNLRIPrefix +} + +type marshalBgpIpv4SrPolicyNLRIPrefix interface { + // ToProto marshals BgpIpv4SrPolicyNLRIPrefix to protobuf object *otg.BgpIpv4SrPolicyNLRIPrefix + ToProto() (*otg.BgpIpv4SrPolicyNLRIPrefix, error) + // ToPbText marshals BgpIpv4SrPolicyNLRIPrefix to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpIpv4SrPolicyNLRIPrefix to YAML text + ToYaml() (string, error) + // ToJson marshals BgpIpv4SrPolicyNLRIPrefix to JSON text + ToJson() (string, error) +} + +type unMarshalbgpIpv4SrPolicyNLRIPrefix struct { + obj *bgpIpv4SrPolicyNLRIPrefix +} + +type unMarshalBgpIpv4SrPolicyNLRIPrefix interface { + // FromProto unmarshals BgpIpv4SrPolicyNLRIPrefix from protobuf object *otg.BgpIpv4SrPolicyNLRIPrefix + FromProto(msg *otg.BgpIpv4SrPolicyNLRIPrefix) (BgpIpv4SrPolicyNLRIPrefix, error) + // FromPbText unmarshals BgpIpv4SrPolicyNLRIPrefix from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpIpv4SrPolicyNLRIPrefix from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpIpv4SrPolicyNLRIPrefix from JSON text + FromJson(value string) error +} + +func (obj *bgpIpv4SrPolicyNLRIPrefix) Marshal() marshalBgpIpv4SrPolicyNLRIPrefix { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpIpv4SrPolicyNLRIPrefix{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpIpv4SrPolicyNLRIPrefix) Unmarshal() unMarshalBgpIpv4SrPolicyNLRIPrefix { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpIpv4SrPolicyNLRIPrefix{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpIpv4SrPolicyNLRIPrefix) ToProto() (*otg.BgpIpv4SrPolicyNLRIPrefix, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpIpv4SrPolicyNLRIPrefix) FromProto(msg *otg.BgpIpv4SrPolicyNLRIPrefix) (BgpIpv4SrPolicyNLRIPrefix, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpIpv4SrPolicyNLRIPrefix) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpIpv4SrPolicyNLRIPrefix) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpIpv4SrPolicyNLRIPrefix) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpIpv4SrPolicyNLRIPrefix) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpIpv4SrPolicyNLRIPrefix) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpIpv4SrPolicyNLRIPrefix) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpIpv4SrPolicyNLRIPrefix) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpIpv4SrPolicyNLRIPrefix) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpIpv4SrPolicyNLRIPrefix) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpIpv4SrPolicyNLRIPrefix) Clone() (BgpIpv4SrPolicyNLRIPrefix, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpIpv4SrPolicyNLRIPrefix() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpIpv4SrPolicyNLRIPrefix is iPv4 Segment Routing Policy NLRI Prefix. +type BgpIpv4SrPolicyNLRIPrefix interface { + Validation + // msg marshals BgpIpv4SrPolicyNLRIPrefix to protobuf object *otg.BgpIpv4SrPolicyNLRIPrefix + // and doesn't set defaults + msg() *otg.BgpIpv4SrPolicyNLRIPrefix + // setMsg unmarshals BgpIpv4SrPolicyNLRIPrefix from protobuf object *otg.BgpIpv4SrPolicyNLRIPrefix + // and doesn't set defaults + setMsg(*otg.BgpIpv4SrPolicyNLRIPrefix) BgpIpv4SrPolicyNLRIPrefix + // provides marshal interface + Marshal() marshalBgpIpv4SrPolicyNLRIPrefix + // provides unmarshal interface + Unmarshal() unMarshalBgpIpv4SrPolicyNLRIPrefix + // validate validates BgpIpv4SrPolicyNLRIPrefix + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpIpv4SrPolicyNLRIPrefix, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Distinguisher returns uint32, set in BgpIpv4SrPolicyNLRIPrefix. + Distinguisher() uint32 + // SetDistinguisher assigns uint32 provided by user to BgpIpv4SrPolicyNLRIPrefix + SetDistinguisher(value uint32) BgpIpv4SrPolicyNLRIPrefix + // HasDistinguisher checks if Distinguisher has been set in BgpIpv4SrPolicyNLRIPrefix + HasDistinguisher() bool + // Color returns uint32, set in BgpIpv4SrPolicyNLRIPrefix. + Color() uint32 + // SetColor assigns uint32 provided by user to BgpIpv4SrPolicyNLRIPrefix + SetColor(value uint32) BgpIpv4SrPolicyNLRIPrefix + // HasColor checks if Color has been set in BgpIpv4SrPolicyNLRIPrefix + HasColor() bool + // Endpoint returns string, set in BgpIpv4SrPolicyNLRIPrefix. + Endpoint() string + // SetEndpoint assigns string provided by user to BgpIpv4SrPolicyNLRIPrefix + SetEndpoint(value string) BgpIpv4SrPolicyNLRIPrefix + // HasEndpoint checks if Endpoint has been set in BgpIpv4SrPolicyNLRIPrefix + HasEndpoint() bool +} + +// The 4-octet value uniquely identifying the policy in the context of tuple. The distinguisher has no semantic value and is solely used by the SR Policy originator to make unique (from an NLRI perspective) both for multiple candidate paths of the same SR Policy as well as candidate paths of different SR Policies (i.e. with different segment lists) with the same Color and Endpoint but meant for different headends. +// Distinguisher returns a uint32 +func (obj *bgpIpv4SrPolicyNLRIPrefix) Distinguisher() uint32 { + + return *obj.obj.Distinguisher + +} + +// The 4-octet value uniquely identifying the policy in the context of tuple. The distinguisher has no semantic value and is solely used by the SR Policy originator to make unique (from an NLRI perspective) both for multiple candidate paths of the same SR Policy as well as candidate paths of different SR Policies (i.e. with different segment lists) with the same Color and Endpoint but meant for different headends. +// Distinguisher returns a uint32 +func (obj *bgpIpv4SrPolicyNLRIPrefix) HasDistinguisher() bool { + return obj.obj.Distinguisher != nil +} + +// The 4-octet value uniquely identifying the policy in the context of tuple. The distinguisher has no semantic value and is solely used by the SR Policy originator to make unique (from an NLRI perspective) both for multiple candidate paths of the same SR Policy as well as candidate paths of different SR Policies (i.e. with different segment lists) with the same Color and Endpoint but meant for different headends. +// SetDistinguisher sets the uint32 value in the BgpIpv4SrPolicyNLRIPrefix object +func (obj *bgpIpv4SrPolicyNLRIPrefix) SetDistinguisher(value uint32) BgpIpv4SrPolicyNLRIPrefix { + + obj.obj.Distinguisher = &value + return obj +} + +// 4-octet value identifying (with the endpoint) the policy. The color is used to match the color of the destination prefixes to steer traffic into the SR Policy as specified in section 8 of RFC9256. +// Color returns a uint32 +func (obj *bgpIpv4SrPolicyNLRIPrefix) Color() uint32 { + + return *obj.obj.Color + +} + +// 4-octet value identifying (with the endpoint) the policy. The color is used to match the color of the destination prefixes to steer traffic into the SR Policy as specified in section 8 of RFC9256. +// Color returns a uint32 +func (obj *bgpIpv4SrPolicyNLRIPrefix) HasColor() bool { + return obj.obj.Color != nil +} + +// 4-octet value identifying (with the endpoint) the policy. The color is used to match the color of the destination prefixes to steer traffic into the SR Policy as specified in section 8 of RFC9256. +// SetColor sets the uint32 value in the BgpIpv4SrPolicyNLRIPrefix object +func (obj *bgpIpv4SrPolicyNLRIPrefix) SetColor(value uint32) BgpIpv4SrPolicyNLRIPrefix { + + obj.obj.Color = &value + return obj +} + +// Identifies the endpoint of a policy. The Endpoint is an IPv4 address and can be either a unicast or an unspecified address (0.0.0.0) as specified in section 2.1 of RFC9256. +// Endpoint returns a string +func (obj *bgpIpv4SrPolicyNLRIPrefix) Endpoint() string { + + return *obj.obj.Endpoint + +} + +// Identifies the endpoint of a policy. The Endpoint is an IPv4 address and can be either a unicast or an unspecified address (0.0.0.0) as specified in section 2.1 of RFC9256. +// Endpoint returns a string +func (obj *bgpIpv4SrPolicyNLRIPrefix) HasEndpoint() bool { + return obj.obj.Endpoint != nil +} + +// Identifies the endpoint of a policy. The Endpoint is an IPv4 address and can be either a unicast or an unspecified address (0.0.0.0) as specified in section 2.1 of RFC9256. +// SetEndpoint sets the string value in the BgpIpv4SrPolicyNLRIPrefix object +func (obj *bgpIpv4SrPolicyNLRIPrefix) SetEndpoint(value string) BgpIpv4SrPolicyNLRIPrefix { + + obj.obj.Endpoint = &value + return obj +} + +func (obj *bgpIpv4SrPolicyNLRIPrefix) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Endpoint != nil { + + err := obj.validateIpv4(obj.Endpoint()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpIpv4SrPolicyNLRIPrefix.Endpoint")) + } + + } + +} + +func (obj *bgpIpv4SrPolicyNLRIPrefix) setDefault() { + if obj.obj.Distinguisher == nil { + obj.SetDistinguisher(1) + } + if obj.obj.Color == nil { + obj.SetColor(1) + } + if obj.obj.Endpoint == nil { + obj.SetEndpoint("0.0.0.0") + } + +} diff --git a/gosnappi/bgp_ipv6_sr_policy_nlri_prefix.go b/gosnappi/bgp_ipv6_sr_policy_nlri_prefix.go new file mode 100644 index 00000000..4e59c41c --- /dev/null +++ b/gosnappi/bgp_ipv6_sr_policy_nlri_prefix.go @@ -0,0 +1,380 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpIpv6SrPolicyNLRIPrefix ***** +type bgpIpv6SrPolicyNLRIPrefix struct { + validation + obj *otg.BgpIpv6SrPolicyNLRIPrefix + marshaller marshalBgpIpv6SrPolicyNLRIPrefix + unMarshaller unMarshalBgpIpv6SrPolicyNLRIPrefix +} + +func NewBgpIpv6SrPolicyNLRIPrefix() BgpIpv6SrPolicyNLRIPrefix { + obj := bgpIpv6SrPolicyNLRIPrefix{obj: &otg.BgpIpv6SrPolicyNLRIPrefix{}} + obj.setDefault() + return &obj +} + +func (obj *bgpIpv6SrPolicyNLRIPrefix) msg() *otg.BgpIpv6SrPolicyNLRIPrefix { + return obj.obj +} + +func (obj *bgpIpv6SrPolicyNLRIPrefix) setMsg(msg *otg.BgpIpv6SrPolicyNLRIPrefix) BgpIpv6SrPolicyNLRIPrefix { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpIpv6SrPolicyNLRIPrefix struct { + obj *bgpIpv6SrPolicyNLRIPrefix +} + +type marshalBgpIpv6SrPolicyNLRIPrefix interface { + // ToProto marshals BgpIpv6SrPolicyNLRIPrefix to protobuf object *otg.BgpIpv6SrPolicyNLRIPrefix + ToProto() (*otg.BgpIpv6SrPolicyNLRIPrefix, error) + // ToPbText marshals BgpIpv6SrPolicyNLRIPrefix to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpIpv6SrPolicyNLRIPrefix to YAML text + ToYaml() (string, error) + // ToJson marshals BgpIpv6SrPolicyNLRIPrefix to JSON text + ToJson() (string, error) +} + +type unMarshalbgpIpv6SrPolicyNLRIPrefix struct { + obj *bgpIpv6SrPolicyNLRIPrefix +} + +type unMarshalBgpIpv6SrPolicyNLRIPrefix interface { + // FromProto unmarshals BgpIpv6SrPolicyNLRIPrefix from protobuf object *otg.BgpIpv6SrPolicyNLRIPrefix + FromProto(msg *otg.BgpIpv6SrPolicyNLRIPrefix) (BgpIpv6SrPolicyNLRIPrefix, error) + // FromPbText unmarshals BgpIpv6SrPolicyNLRIPrefix from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpIpv6SrPolicyNLRIPrefix from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpIpv6SrPolicyNLRIPrefix from JSON text + FromJson(value string) error +} + +func (obj *bgpIpv6SrPolicyNLRIPrefix) Marshal() marshalBgpIpv6SrPolicyNLRIPrefix { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpIpv6SrPolicyNLRIPrefix{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpIpv6SrPolicyNLRIPrefix) Unmarshal() unMarshalBgpIpv6SrPolicyNLRIPrefix { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpIpv6SrPolicyNLRIPrefix{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpIpv6SrPolicyNLRIPrefix) ToProto() (*otg.BgpIpv6SrPolicyNLRIPrefix, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpIpv6SrPolicyNLRIPrefix) FromProto(msg *otg.BgpIpv6SrPolicyNLRIPrefix) (BgpIpv6SrPolicyNLRIPrefix, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpIpv6SrPolicyNLRIPrefix) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpIpv6SrPolicyNLRIPrefix) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpIpv6SrPolicyNLRIPrefix) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpIpv6SrPolicyNLRIPrefix) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpIpv6SrPolicyNLRIPrefix) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpIpv6SrPolicyNLRIPrefix) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpIpv6SrPolicyNLRIPrefix) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpIpv6SrPolicyNLRIPrefix) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpIpv6SrPolicyNLRIPrefix) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpIpv6SrPolicyNLRIPrefix) Clone() (BgpIpv6SrPolicyNLRIPrefix, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpIpv6SrPolicyNLRIPrefix() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpIpv6SrPolicyNLRIPrefix is one IPv6 Segment Routing Policy NLRI Prefix. +type BgpIpv6SrPolicyNLRIPrefix interface { + Validation + // msg marshals BgpIpv6SrPolicyNLRIPrefix to protobuf object *otg.BgpIpv6SrPolicyNLRIPrefix + // and doesn't set defaults + msg() *otg.BgpIpv6SrPolicyNLRIPrefix + // setMsg unmarshals BgpIpv6SrPolicyNLRIPrefix from protobuf object *otg.BgpIpv6SrPolicyNLRIPrefix + // and doesn't set defaults + setMsg(*otg.BgpIpv6SrPolicyNLRIPrefix) BgpIpv6SrPolicyNLRIPrefix + // provides marshal interface + Marshal() marshalBgpIpv6SrPolicyNLRIPrefix + // provides unmarshal interface + Unmarshal() unMarshalBgpIpv6SrPolicyNLRIPrefix + // validate validates BgpIpv6SrPolicyNLRIPrefix + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpIpv6SrPolicyNLRIPrefix, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Distinguisher returns uint32, set in BgpIpv6SrPolicyNLRIPrefix. + Distinguisher() uint32 + // SetDistinguisher assigns uint32 provided by user to BgpIpv6SrPolicyNLRIPrefix + SetDistinguisher(value uint32) BgpIpv6SrPolicyNLRIPrefix + // HasDistinguisher checks if Distinguisher has been set in BgpIpv6SrPolicyNLRIPrefix + HasDistinguisher() bool + // Color returns uint32, set in BgpIpv6SrPolicyNLRIPrefix. + Color() uint32 + // SetColor assigns uint32 provided by user to BgpIpv6SrPolicyNLRIPrefix + SetColor(value uint32) BgpIpv6SrPolicyNLRIPrefix + // HasColor checks if Color has been set in BgpIpv6SrPolicyNLRIPrefix + HasColor() bool + // Endpoint returns string, set in BgpIpv6SrPolicyNLRIPrefix. + Endpoint() string + // SetEndpoint assigns string provided by user to BgpIpv6SrPolicyNLRIPrefix + SetEndpoint(value string) BgpIpv6SrPolicyNLRIPrefix + // HasEndpoint checks if Endpoint has been set in BgpIpv6SrPolicyNLRIPrefix + HasEndpoint() bool +} + +// The 4-octet value uniquely identifying the policy in the context of tuple. The distinguisher has no semantic value and is solely used by the SR Policy originator to make unique (from an NLRI perspective) both for multiple candidate paths of the same SR Policy as well as candidate paths of different SR Policies (i.e. with different segment lists) with the same Color and Endpoint but meant for different headends. +// Distinguisher returns a uint32 +func (obj *bgpIpv6SrPolicyNLRIPrefix) Distinguisher() uint32 { + + return *obj.obj.Distinguisher + +} + +// The 4-octet value uniquely identifying the policy in the context of tuple. The distinguisher has no semantic value and is solely used by the SR Policy originator to make unique (from an NLRI perspective) both for multiple candidate paths of the same SR Policy as well as candidate paths of different SR Policies (i.e. with different segment lists) with the same Color and Endpoint but meant for different headends. +// Distinguisher returns a uint32 +func (obj *bgpIpv6SrPolicyNLRIPrefix) HasDistinguisher() bool { + return obj.obj.Distinguisher != nil +} + +// The 4-octet value uniquely identifying the policy in the context of tuple. The distinguisher has no semantic value and is solely used by the SR Policy originator to make unique (from an NLRI perspective) both for multiple candidate paths of the same SR Policy as well as candidate paths of different SR Policies (i.e. with different segment lists) with the same Color and Endpoint but meant for different headends. +// SetDistinguisher sets the uint32 value in the BgpIpv6SrPolicyNLRIPrefix object +func (obj *bgpIpv6SrPolicyNLRIPrefix) SetDistinguisher(value uint32) BgpIpv6SrPolicyNLRIPrefix { + + obj.obj.Distinguisher = &value + return obj +} + +// 4-octet value identifying (with the endpoint) the policy. The color is used to match the color of the destination prefixes to steer traffic into the SR Policy as specified in section 8 of RFC9256. +// Color returns a uint32 +func (obj *bgpIpv6SrPolicyNLRIPrefix) Color() uint32 { + + return *obj.obj.Color + +} + +// 4-octet value identifying (with the endpoint) the policy. The color is used to match the color of the destination prefixes to steer traffic into the SR Policy as specified in section 8 of RFC9256. +// Color returns a uint32 +func (obj *bgpIpv6SrPolicyNLRIPrefix) HasColor() bool { + return obj.obj.Color != nil +} + +// 4-octet value identifying (with the endpoint) the policy. The color is used to match the color of the destination prefixes to steer traffic into the SR Policy as specified in section 8 of RFC9256. +// SetColor sets the uint32 value in the BgpIpv6SrPolicyNLRIPrefix object +func (obj *bgpIpv6SrPolicyNLRIPrefix) SetColor(value uint32) BgpIpv6SrPolicyNLRIPrefix { + + obj.obj.Color = &value + return obj +} + +// Identifies the endpoint of a policy. The Endpoint may represent a single node or a set of nodes (e.g., an anycast address). The Endpoint is an IPv6 address and can be either a unicast or an unspecified address (0::0) as specified in section 2.1 of RFC9256. +// Endpoint returns a string +func (obj *bgpIpv6SrPolicyNLRIPrefix) Endpoint() string { + + return *obj.obj.Endpoint + +} + +// Identifies the endpoint of a policy. The Endpoint may represent a single node or a set of nodes (e.g., an anycast address). The Endpoint is an IPv6 address and can be either a unicast or an unspecified address (0::0) as specified in section 2.1 of RFC9256. +// Endpoint returns a string +func (obj *bgpIpv6SrPolicyNLRIPrefix) HasEndpoint() bool { + return obj.obj.Endpoint != nil +} + +// Identifies the endpoint of a policy. The Endpoint may represent a single node or a set of nodes (e.g., an anycast address). The Endpoint is an IPv6 address and can be either a unicast or an unspecified address (0::0) as specified in section 2.1 of RFC9256. +// SetEndpoint sets the string value in the BgpIpv6SrPolicyNLRIPrefix object +func (obj *bgpIpv6SrPolicyNLRIPrefix) SetEndpoint(value string) BgpIpv6SrPolicyNLRIPrefix { + + obj.obj.Endpoint = &value + return obj +} + +func (obj *bgpIpv6SrPolicyNLRIPrefix) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Endpoint != nil { + + err := obj.validateIpv6(obj.Endpoint()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpIpv6SrPolicyNLRIPrefix.Endpoint")) + } + + } + +} + +func (obj *bgpIpv6SrPolicyNLRIPrefix) setDefault() { + if obj.obj.Distinguisher == nil { + obj.SetDistinguisher(1) + } + if obj.obj.Color == nil { + obj.SetColor(1) + } + if obj.obj.Endpoint == nil { + obj.SetEndpoint("0::0") + } + +} diff --git a/gosnappi/bgp_learned_information_filter.go b/gosnappi/bgp_learned_information_filter.go new file mode 100644 index 00000000..c487e2dd --- /dev/null +++ b/gosnappi/bgp_learned_information_filter.go @@ -0,0 +1,340 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpLearnedInformationFilter ***** +type bgpLearnedInformationFilter struct { + validation + obj *otg.BgpLearnedInformationFilter + marshaller marshalBgpLearnedInformationFilter + unMarshaller unMarshalBgpLearnedInformationFilter +} + +func NewBgpLearnedInformationFilter() BgpLearnedInformationFilter { + obj := bgpLearnedInformationFilter{obj: &otg.BgpLearnedInformationFilter{}} + obj.setDefault() + return &obj +} + +func (obj *bgpLearnedInformationFilter) msg() *otg.BgpLearnedInformationFilter { + return obj.obj +} + +func (obj *bgpLearnedInformationFilter) setMsg(msg *otg.BgpLearnedInformationFilter) BgpLearnedInformationFilter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpLearnedInformationFilter struct { + obj *bgpLearnedInformationFilter +} + +type marshalBgpLearnedInformationFilter interface { + // ToProto marshals BgpLearnedInformationFilter to protobuf object *otg.BgpLearnedInformationFilter + ToProto() (*otg.BgpLearnedInformationFilter, error) + // ToPbText marshals BgpLearnedInformationFilter to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpLearnedInformationFilter to YAML text + ToYaml() (string, error) + // ToJson marshals BgpLearnedInformationFilter to JSON text + ToJson() (string, error) +} + +type unMarshalbgpLearnedInformationFilter struct { + obj *bgpLearnedInformationFilter +} + +type unMarshalBgpLearnedInformationFilter interface { + // FromProto unmarshals BgpLearnedInformationFilter from protobuf object *otg.BgpLearnedInformationFilter + FromProto(msg *otg.BgpLearnedInformationFilter) (BgpLearnedInformationFilter, error) + // FromPbText unmarshals BgpLearnedInformationFilter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpLearnedInformationFilter from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpLearnedInformationFilter from JSON text + FromJson(value string) error +} + +func (obj *bgpLearnedInformationFilter) Marshal() marshalBgpLearnedInformationFilter { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpLearnedInformationFilter{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpLearnedInformationFilter) Unmarshal() unMarshalBgpLearnedInformationFilter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpLearnedInformationFilter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpLearnedInformationFilter) ToProto() (*otg.BgpLearnedInformationFilter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpLearnedInformationFilter) FromProto(msg *otg.BgpLearnedInformationFilter) (BgpLearnedInformationFilter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpLearnedInformationFilter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpLearnedInformationFilter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpLearnedInformationFilter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpLearnedInformationFilter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpLearnedInformationFilter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpLearnedInformationFilter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpLearnedInformationFilter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpLearnedInformationFilter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpLearnedInformationFilter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpLearnedInformationFilter) Clone() (BgpLearnedInformationFilter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpLearnedInformationFilter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpLearnedInformationFilter is configuration for controlling storage of BGP learned information recieved from the peer. +type BgpLearnedInformationFilter interface { + Validation + // msg marshals BgpLearnedInformationFilter to protobuf object *otg.BgpLearnedInformationFilter + // and doesn't set defaults + msg() *otg.BgpLearnedInformationFilter + // setMsg unmarshals BgpLearnedInformationFilter from protobuf object *otg.BgpLearnedInformationFilter + // and doesn't set defaults + setMsg(*otg.BgpLearnedInformationFilter) BgpLearnedInformationFilter + // provides marshal interface + Marshal() marshalBgpLearnedInformationFilter + // provides unmarshal interface + Unmarshal() unMarshalBgpLearnedInformationFilter + // validate validates BgpLearnedInformationFilter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpLearnedInformationFilter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // UnicastIpv4Prefix returns bool, set in BgpLearnedInformationFilter. + UnicastIpv4Prefix() bool + // SetUnicastIpv4Prefix assigns bool provided by user to BgpLearnedInformationFilter + SetUnicastIpv4Prefix(value bool) BgpLearnedInformationFilter + // HasUnicastIpv4Prefix checks if UnicastIpv4Prefix has been set in BgpLearnedInformationFilter + HasUnicastIpv4Prefix() bool + // UnicastIpv6Prefix returns bool, set in BgpLearnedInformationFilter. + UnicastIpv6Prefix() bool + // SetUnicastIpv6Prefix assigns bool provided by user to BgpLearnedInformationFilter + SetUnicastIpv6Prefix(value bool) BgpLearnedInformationFilter + // HasUnicastIpv6Prefix checks if UnicastIpv6Prefix has been set in BgpLearnedInformationFilter + HasUnicastIpv6Prefix() bool +} + +// If enabled, will store the information related to Unicast IPv4 Prefixes recieved from the peer. +// UnicastIpv4Prefix returns a bool +func (obj *bgpLearnedInformationFilter) UnicastIpv4Prefix() bool { + + return *obj.obj.UnicastIpv4Prefix + +} + +// If enabled, will store the information related to Unicast IPv4 Prefixes recieved from the peer. +// UnicastIpv4Prefix returns a bool +func (obj *bgpLearnedInformationFilter) HasUnicastIpv4Prefix() bool { + return obj.obj.UnicastIpv4Prefix != nil +} + +// If enabled, will store the information related to Unicast IPv4 Prefixes recieved from the peer. +// SetUnicastIpv4Prefix sets the bool value in the BgpLearnedInformationFilter object +func (obj *bgpLearnedInformationFilter) SetUnicastIpv4Prefix(value bool) BgpLearnedInformationFilter { + + obj.obj.UnicastIpv4Prefix = &value + return obj +} + +// If enabled, will store the information related to Unicast IPv6 Prefixes recieved from the peer. +// UnicastIpv6Prefix returns a bool +func (obj *bgpLearnedInformationFilter) UnicastIpv6Prefix() bool { + + return *obj.obj.UnicastIpv6Prefix + +} + +// If enabled, will store the information related to Unicast IPv6 Prefixes recieved from the peer. +// UnicastIpv6Prefix returns a bool +func (obj *bgpLearnedInformationFilter) HasUnicastIpv6Prefix() bool { + return obj.obj.UnicastIpv6Prefix != nil +} + +// If enabled, will store the information related to Unicast IPv6 Prefixes recieved from the peer. +// SetUnicastIpv6Prefix sets the bool value in the BgpLearnedInformationFilter object +func (obj *bgpLearnedInformationFilter) SetUnicastIpv6Prefix(value bool) BgpLearnedInformationFilter { + + obj.obj.UnicastIpv6Prefix = &value + return obj +} + +func (obj *bgpLearnedInformationFilter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpLearnedInformationFilter) setDefault() { + if obj.obj.UnicastIpv4Prefix == nil { + obj.SetUnicastIpv4Prefix(false) + } + if obj.obj.UnicastIpv6Prefix == nil { + obj.SetUnicastIpv6Prefix(false) + } + +} diff --git a/gosnappi/bgp_nlri_prefix_path_id.go b/gosnappi/bgp_nlri_prefix_path_id.go new file mode 100644 index 00000000..4e11cf71 --- /dev/null +++ b/gosnappi/bgp_nlri_prefix_path_id.go @@ -0,0 +1,309 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpNLRIPrefixPathId ***** +type bgpNLRIPrefixPathId struct { + validation + obj *otg.BgpNLRIPrefixPathId + marshaller marshalBgpNLRIPrefixPathId + unMarshaller unMarshalBgpNLRIPrefixPathId +} + +func NewBgpNLRIPrefixPathId() BgpNLRIPrefixPathId { + obj := bgpNLRIPrefixPathId{obj: &otg.BgpNLRIPrefixPathId{}} + obj.setDefault() + return &obj +} + +func (obj *bgpNLRIPrefixPathId) msg() *otg.BgpNLRIPrefixPathId { + return obj.obj +} + +func (obj *bgpNLRIPrefixPathId) setMsg(msg *otg.BgpNLRIPrefixPathId) BgpNLRIPrefixPathId { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpNLRIPrefixPathId struct { + obj *bgpNLRIPrefixPathId +} + +type marshalBgpNLRIPrefixPathId interface { + // ToProto marshals BgpNLRIPrefixPathId to protobuf object *otg.BgpNLRIPrefixPathId + ToProto() (*otg.BgpNLRIPrefixPathId, error) + // ToPbText marshals BgpNLRIPrefixPathId to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpNLRIPrefixPathId to YAML text + ToYaml() (string, error) + // ToJson marshals BgpNLRIPrefixPathId to JSON text + ToJson() (string, error) +} + +type unMarshalbgpNLRIPrefixPathId struct { + obj *bgpNLRIPrefixPathId +} + +type unMarshalBgpNLRIPrefixPathId interface { + // FromProto unmarshals BgpNLRIPrefixPathId from protobuf object *otg.BgpNLRIPrefixPathId + FromProto(msg *otg.BgpNLRIPrefixPathId) (BgpNLRIPrefixPathId, error) + // FromPbText unmarshals BgpNLRIPrefixPathId from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpNLRIPrefixPathId from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpNLRIPrefixPathId from JSON text + FromJson(value string) error +} + +func (obj *bgpNLRIPrefixPathId) Marshal() marshalBgpNLRIPrefixPathId { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpNLRIPrefixPathId{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpNLRIPrefixPathId) Unmarshal() unMarshalBgpNLRIPrefixPathId { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpNLRIPrefixPathId{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpNLRIPrefixPathId) ToProto() (*otg.BgpNLRIPrefixPathId, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpNLRIPrefixPathId) FromProto(msg *otg.BgpNLRIPrefixPathId) (BgpNLRIPrefixPathId, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpNLRIPrefixPathId) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpNLRIPrefixPathId) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpNLRIPrefixPathId) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpNLRIPrefixPathId) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpNLRIPrefixPathId) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpNLRIPrefixPathId) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpNLRIPrefixPathId) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpNLRIPrefixPathId) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpNLRIPrefixPathId) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpNLRIPrefixPathId) Clone() (BgpNLRIPrefixPathId, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpNLRIPrefixPathId() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpNLRIPrefixPathId is optional field in the NLRI carrying Path Id of the prefix. +type BgpNLRIPrefixPathId interface { + Validation + // msg marshals BgpNLRIPrefixPathId to protobuf object *otg.BgpNLRIPrefixPathId + // and doesn't set defaults + msg() *otg.BgpNLRIPrefixPathId + // setMsg unmarshals BgpNLRIPrefixPathId from protobuf object *otg.BgpNLRIPrefixPathId + // and doesn't set defaults + setMsg(*otg.BgpNLRIPrefixPathId) BgpNLRIPrefixPathId + // provides marshal interface + Marshal() marshalBgpNLRIPrefixPathId + // provides unmarshal interface + Unmarshal() unMarshalBgpNLRIPrefixPathId + // validate validates BgpNLRIPrefixPathId + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpNLRIPrefixPathId, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Value returns uint32, set in BgpNLRIPrefixPathId. + Value() uint32 + // SetValue assigns uint32 provided by user to BgpNLRIPrefixPathId + SetValue(value uint32) BgpNLRIPrefixPathId + // HasValue checks if Value has been set in BgpNLRIPrefixPathId + HasValue() bool +} + +// The value of the optional Path ID of the prefix. +// Value returns a uint32 +func (obj *bgpNLRIPrefixPathId) Value() uint32 { + + return *obj.obj.Value + +} + +// The value of the optional Path ID of the prefix. +// Value returns a uint32 +func (obj *bgpNLRIPrefixPathId) HasValue() bool { + return obj.obj.Value != nil +} + +// The value of the optional Path ID of the prefix. +// SetValue sets the uint32 value in the BgpNLRIPrefixPathId object +func (obj *bgpNLRIPrefixPathId) SetValue(value uint32) BgpNLRIPrefixPathId { + + obj.obj.Value = &value + return obj +} + +func (obj *bgpNLRIPrefixPathId) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpNLRIPrefixPathId) setDefault() { + if obj.obj.Value == nil { + obj.SetValue(1) + } + +} diff --git a/gosnappi/bgp_one_ipv4_nlri_prefix.go b/gosnappi/bgp_one_ipv4_nlri_prefix.go new file mode 100644 index 00000000..2331ac30 --- /dev/null +++ b/gosnappi/bgp_one_ipv4_nlri_prefix.go @@ -0,0 +1,409 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpOneIpv4NLRIPrefix ***** +type bgpOneIpv4NLRIPrefix struct { + validation + obj *otg.BgpOneIpv4NLRIPrefix + marshaller marshalBgpOneIpv4NLRIPrefix + unMarshaller unMarshalBgpOneIpv4NLRIPrefix + pathIdHolder BgpNLRIPrefixPathId +} + +func NewBgpOneIpv4NLRIPrefix() BgpOneIpv4NLRIPrefix { + obj := bgpOneIpv4NLRIPrefix{obj: &otg.BgpOneIpv4NLRIPrefix{}} + obj.setDefault() + return &obj +} + +func (obj *bgpOneIpv4NLRIPrefix) msg() *otg.BgpOneIpv4NLRIPrefix { + return obj.obj +} + +func (obj *bgpOneIpv4NLRIPrefix) setMsg(msg *otg.BgpOneIpv4NLRIPrefix) BgpOneIpv4NLRIPrefix { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpOneIpv4NLRIPrefix struct { + obj *bgpOneIpv4NLRIPrefix +} + +type marshalBgpOneIpv4NLRIPrefix interface { + // ToProto marshals BgpOneIpv4NLRIPrefix to protobuf object *otg.BgpOneIpv4NLRIPrefix + ToProto() (*otg.BgpOneIpv4NLRIPrefix, error) + // ToPbText marshals BgpOneIpv4NLRIPrefix to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpOneIpv4NLRIPrefix to YAML text + ToYaml() (string, error) + // ToJson marshals BgpOneIpv4NLRIPrefix to JSON text + ToJson() (string, error) +} + +type unMarshalbgpOneIpv4NLRIPrefix struct { + obj *bgpOneIpv4NLRIPrefix +} + +type unMarshalBgpOneIpv4NLRIPrefix interface { + // FromProto unmarshals BgpOneIpv4NLRIPrefix from protobuf object *otg.BgpOneIpv4NLRIPrefix + FromProto(msg *otg.BgpOneIpv4NLRIPrefix) (BgpOneIpv4NLRIPrefix, error) + // FromPbText unmarshals BgpOneIpv4NLRIPrefix from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpOneIpv4NLRIPrefix from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpOneIpv4NLRIPrefix from JSON text + FromJson(value string) error +} + +func (obj *bgpOneIpv4NLRIPrefix) Marshal() marshalBgpOneIpv4NLRIPrefix { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpOneIpv4NLRIPrefix{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpOneIpv4NLRIPrefix) Unmarshal() unMarshalBgpOneIpv4NLRIPrefix { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpOneIpv4NLRIPrefix{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpOneIpv4NLRIPrefix) ToProto() (*otg.BgpOneIpv4NLRIPrefix, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpOneIpv4NLRIPrefix) FromProto(msg *otg.BgpOneIpv4NLRIPrefix) (BgpOneIpv4NLRIPrefix, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpOneIpv4NLRIPrefix) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpOneIpv4NLRIPrefix) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpOneIpv4NLRIPrefix) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpOneIpv4NLRIPrefix) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpOneIpv4NLRIPrefix) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpOneIpv4NLRIPrefix) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpOneIpv4NLRIPrefix) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpOneIpv4NLRIPrefix) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpOneIpv4NLRIPrefix) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpOneIpv4NLRIPrefix) Clone() (BgpOneIpv4NLRIPrefix, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpOneIpv4NLRIPrefix() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpOneIpv4NLRIPrefix) setNil() { + obj.pathIdHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpOneIpv4NLRIPrefix is one IPv4 NLRI Prefix. +type BgpOneIpv4NLRIPrefix interface { + Validation + // msg marshals BgpOneIpv4NLRIPrefix to protobuf object *otg.BgpOneIpv4NLRIPrefix + // and doesn't set defaults + msg() *otg.BgpOneIpv4NLRIPrefix + // setMsg unmarshals BgpOneIpv4NLRIPrefix from protobuf object *otg.BgpOneIpv4NLRIPrefix + // and doesn't set defaults + setMsg(*otg.BgpOneIpv4NLRIPrefix) BgpOneIpv4NLRIPrefix + // provides marshal interface + Marshal() marshalBgpOneIpv4NLRIPrefix + // provides unmarshal interface + Unmarshal() unMarshalBgpOneIpv4NLRIPrefix + // validate validates BgpOneIpv4NLRIPrefix + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpOneIpv4NLRIPrefix, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Address returns string, set in BgpOneIpv4NLRIPrefix. + Address() string + // SetAddress assigns string provided by user to BgpOneIpv4NLRIPrefix + SetAddress(value string) BgpOneIpv4NLRIPrefix + // HasAddress checks if Address has been set in BgpOneIpv4NLRIPrefix + HasAddress() bool + // Prefix returns uint32, set in BgpOneIpv4NLRIPrefix. + Prefix() uint32 + // SetPrefix assigns uint32 provided by user to BgpOneIpv4NLRIPrefix + SetPrefix(value uint32) BgpOneIpv4NLRIPrefix + // HasPrefix checks if Prefix has been set in BgpOneIpv4NLRIPrefix + HasPrefix() bool + // PathId returns BgpNLRIPrefixPathId, set in BgpOneIpv4NLRIPrefix. + // BgpNLRIPrefixPathId is optional field in the NLRI carrying Path Id of the prefix. + PathId() BgpNLRIPrefixPathId + // SetPathId assigns BgpNLRIPrefixPathId provided by user to BgpOneIpv4NLRIPrefix. + // BgpNLRIPrefixPathId is optional field in the NLRI carrying Path Id of the prefix. + SetPathId(value BgpNLRIPrefixPathId) BgpOneIpv4NLRIPrefix + // HasPathId checks if PathId has been set in BgpOneIpv4NLRIPrefix + HasPathId() bool + setNil() +} + +// The IPv4 address of the network. +// Address returns a string +func (obj *bgpOneIpv4NLRIPrefix) Address() string { + + return *obj.obj.Address + +} + +// The IPv4 address of the network. +// Address returns a string +func (obj *bgpOneIpv4NLRIPrefix) HasAddress() bool { + return obj.obj.Address != nil +} + +// The IPv4 address of the network. +// SetAddress sets the string value in the BgpOneIpv4NLRIPrefix object +func (obj *bgpOneIpv4NLRIPrefix) SetAddress(value string) BgpOneIpv4NLRIPrefix { + + obj.obj.Address = &value + return obj +} + +// The IPv4 network prefix length to be applied to the address. +// Prefix returns a uint32 +func (obj *bgpOneIpv4NLRIPrefix) Prefix() uint32 { + + return *obj.obj.Prefix + +} + +// The IPv4 network prefix length to be applied to the address. +// Prefix returns a uint32 +func (obj *bgpOneIpv4NLRIPrefix) HasPrefix() bool { + return obj.obj.Prefix != nil +} + +// The IPv4 network prefix length to be applied to the address. +// SetPrefix sets the uint32 value in the BgpOneIpv4NLRIPrefix object +func (obj *bgpOneIpv4NLRIPrefix) SetPrefix(value uint32) BgpOneIpv4NLRIPrefix { + + obj.obj.Prefix = &value + return obj +} + +// description is TBD +// PathId returns a BgpNLRIPrefixPathId +func (obj *bgpOneIpv4NLRIPrefix) PathId() BgpNLRIPrefixPathId { + if obj.obj.PathId == nil { + obj.obj.PathId = NewBgpNLRIPrefixPathId().msg() + } + if obj.pathIdHolder == nil { + obj.pathIdHolder = &bgpNLRIPrefixPathId{obj: obj.obj.PathId} + } + return obj.pathIdHolder +} + +// description is TBD +// PathId returns a BgpNLRIPrefixPathId +func (obj *bgpOneIpv4NLRIPrefix) HasPathId() bool { + return obj.obj.PathId != nil +} + +// description is TBD +// SetPathId sets the BgpNLRIPrefixPathId value in the BgpOneIpv4NLRIPrefix object +func (obj *bgpOneIpv4NLRIPrefix) SetPathId(value BgpNLRIPrefixPathId) BgpOneIpv4NLRIPrefix { + + obj.pathIdHolder = nil + obj.obj.PathId = value.msg() + + return obj +} + +func (obj *bgpOneIpv4NLRIPrefix) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Address != nil { + + err := obj.validateIpv4(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpOneIpv4NLRIPrefix.Address")) + } + + } + + if obj.obj.Prefix != nil { + + if *obj.obj.Prefix > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpOneIpv4NLRIPrefix.Prefix <= 32 but Got %d", *obj.obj.Prefix)) + } + + } + + if obj.obj.PathId != nil { + + obj.PathId().validateObj(vObj, set_default) + } + +} + +func (obj *bgpOneIpv4NLRIPrefix) setDefault() { + if obj.obj.Address == nil { + obj.SetAddress("0.0.0.0") + } + if obj.obj.Prefix == nil { + obj.SetPrefix(24) + } + +} diff --git a/gosnappi/bgp_one_ipv6_nlri_prefix.go b/gosnappi/bgp_one_ipv6_nlri_prefix.go new file mode 100644 index 00000000..fb848344 --- /dev/null +++ b/gosnappi/bgp_one_ipv6_nlri_prefix.go @@ -0,0 +1,409 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpOneIpv6NLRIPrefix ***** +type bgpOneIpv6NLRIPrefix struct { + validation + obj *otg.BgpOneIpv6NLRIPrefix + marshaller marshalBgpOneIpv6NLRIPrefix + unMarshaller unMarshalBgpOneIpv6NLRIPrefix + pathIdHolder BgpNLRIPrefixPathId +} + +func NewBgpOneIpv6NLRIPrefix() BgpOneIpv6NLRIPrefix { + obj := bgpOneIpv6NLRIPrefix{obj: &otg.BgpOneIpv6NLRIPrefix{}} + obj.setDefault() + return &obj +} + +func (obj *bgpOneIpv6NLRIPrefix) msg() *otg.BgpOneIpv6NLRIPrefix { + return obj.obj +} + +func (obj *bgpOneIpv6NLRIPrefix) setMsg(msg *otg.BgpOneIpv6NLRIPrefix) BgpOneIpv6NLRIPrefix { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpOneIpv6NLRIPrefix struct { + obj *bgpOneIpv6NLRIPrefix +} + +type marshalBgpOneIpv6NLRIPrefix interface { + // ToProto marshals BgpOneIpv6NLRIPrefix to protobuf object *otg.BgpOneIpv6NLRIPrefix + ToProto() (*otg.BgpOneIpv6NLRIPrefix, error) + // ToPbText marshals BgpOneIpv6NLRIPrefix to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpOneIpv6NLRIPrefix to YAML text + ToYaml() (string, error) + // ToJson marshals BgpOneIpv6NLRIPrefix to JSON text + ToJson() (string, error) +} + +type unMarshalbgpOneIpv6NLRIPrefix struct { + obj *bgpOneIpv6NLRIPrefix +} + +type unMarshalBgpOneIpv6NLRIPrefix interface { + // FromProto unmarshals BgpOneIpv6NLRIPrefix from protobuf object *otg.BgpOneIpv6NLRIPrefix + FromProto(msg *otg.BgpOneIpv6NLRIPrefix) (BgpOneIpv6NLRIPrefix, error) + // FromPbText unmarshals BgpOneIpv6NLRIPrefix from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpOneIpv6NLRIPrefix from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpOneIpv6NLRIPrefix from JSON text + FromJson(value string) error +} + +func (obj *bgpOneIpv6NLRIPrefix) Marshal() marshalBgpOneIpv6NLRIPrefix { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpOneIpv6NLRIPrefix{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpOneIpv6NLRIPrefix) Unmarshal() unMarshalBgpOneIpv6NLRIPrefix { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpOneIpv6NLRIPrefix{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpOneIpv6NLRIPrefix) ToProto() (*otg.BgpOneIpv6NLRIPrefix, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpOneIpv6NLRIPrefix) FromProto(msg *otg.BgpOneIpv6NLRIPrefix) (BgpOneIpv6NLRIPrefix, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpOneIpv6NLRIPrefix) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpOneIpv6NLRIPrefix) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpOneIpv6NLRIPrefix) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpOneIpv6NLRIPrefix) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpOneIpv6NLRIPrefix) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpOneIpv6NLRIPrefix) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpOneIpv6NLRIPrefix) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpOneIpv6NLRIPrefix) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpOneIpv6NLRIPrefix) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpOneIpv6NLRIPrefix) Clone() (BgpOneIpv6NLRIPrefix, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpOneIpv6NLRIPrefix() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpOneIpv6NLRIPrefix) setNil() { + obj.pathIdHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpOneIpv6NLRIPrefix is one IPv6 NLRI Prefix. +type BgpOneIpv6NLRIPrefix interface { + Validation + // msg marshals BgpOneIpv6NLRIPrefix to protobuf object *otg.BgpOneIpv6NLRIPrefix + // and doesn't set defaults + msg() *otg.BgpOneIpv6NLRIPrefix + // setMsg unmarshals BgpOneIpv6NLRIPrefix from protobuf object *otg.BgpOneIpv6NLRIPrefix + // and doesn't set defaults + setMsg(*otg.BgpOneIpv6NLRIPrefix) BgpOneIpv6NLRIPrefix + // provides marshal interface + Marshal() marshalBgpOneIpv6NLRIPrefix + // provides unmarshal interface + Unmarshal() unMarshalBgpOneIpv6NLRIPrefix + // validate validates BgpOneIpv6NLRIPrefix + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpOneIpv6NLRIPrefix, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Address returns string, set in BgpOneIpv6NLRIPrefix. + Address() string + // SetAddress assigns string provided by user to BgpOneIpv6NLRIPrefix + SetAddress(value string) BgpOneIpv6NLRIPrefix + // HasAddress checks if Address has been set in BgpOneIpv6NLRIPrefix + HasAddress() bool + // Prefix returns uint32, set in BgpOneIpv6NLRIPrefix. + Prefix() uint32 + // SetPrefix assigns uint32 provided by user to BgpOneIpv6NLRIPrefix + SetPrefix(value uint32) BgpOneIpv6NLRIPrefix + // HasPrefix checks if Prefix has been set in BgpOneIpv6NLRIPrefix + HasPrefix() bool + // PathId returns BgpNLRIPrefixPathId, set in BgpOneIpv6NLRIPrefix. + // BgpNLRIPrefixPathId is optional field in the NLRI carrying Path Id of the prefix. + PathId() BgpNLRIPrefixPathId + // SetPathId assigns BgpNLRIPrefixPathId provided by user to BgpOneIpv6NLRIPrefix. + // BgpNLRIPrefixPathId is optional field in the NLRI carrying Path Id of the prefix. + SetPathId(value BgpNLRIPrefixPathId) BgpOneIpv6NLRIPrefix + // HasPathId checks if PathId has been set in BgpOneIpv6NLRIPrefix + HasPathId() bool + setNil() +} + +// The IPv6 address of the network. +// Address returns a string +func (obj *bgpOneIpv6NLRIPrefix) Address() string { + + return *obj.obj.Address + +} + +// The IPv6 address of the network. +// Address returns a string +func (obj *bgpOneIpv6NLRIPrefix) HasAddress() bool { + return obj.obj.Address != nil +} + +// The IPv6 address of the network. +// SetAddress sets the string value in the BgpOneIpv6NLRIPrefix object +func (obj *bgpOneIpv6NLRIPrefix) SetAddress(value string) BgpOneIpv6NLRIPrefix { + + obj.obj.Address = &value + return obj +} + +// The IPv6 network prefix length to be applied to the address. +// Prefix returns a uint32 +func (obj *bgpOneIpv6NLRIPrefix) Prefix() uint32 { + + return *obj.obj.Prefix + +} + +// The IPv6 network prefix length to be applied to the address. +// Prefix returns a uint32 +func (obj *bgpOneIpv6NLRIPrefix) HasPrefix() bool { + return obj.obj.Prefix != nil +} + +// The IPv6 network prefix length to be applied to the address. +// SetPrefix sets the uint32 value in the BgpOneIpv6NLRIPrefix object +func (obj *bgpOneIpv6NLRIPrefix) SetPrefix(value uint32) BgpOneIpv6NLRIPrefix { + + obj.obj.Prefix = &value + return obj +} + +// description is TBD +// PathId returns a BgpNLRIPrefixPathId +func (obj *bgpOneIpv6NLRIPrefix) PathId() BgpNLRIPrefixPathId { + if obj.obj.PathId == nil { + obj.obj.PathId = NewBgpNLRIPrefixPathId().msg() + } + if obj.pathIdHolder == nil { + obj.pathIdHolder = &bgpNLRIPrefixPathId{obj: obj.obj.PathId} + } + return obj.pathIdHolder +} + +// description is TBD +// PathId returns a BgpNLRIPrefixPathId +func (obj *bgpOneIpv6NLRIPrefix) HasPathId() bool { + return obj.obj.PathId != nil +} + +// description is TBD +// SetPathId sets the BgpNLRIPrefixPathId value in the BgpOneIpv6NLRIPrefix object +func (obj *bgpOneIpv6NLRIPrefix) SetPathId(value BgpNLRIPrefixPathId) BgpOneIpv6NLRIPrefix { + + obj.pathIdHolder = nil + obj.obj.PathId = value.msg() + + return obj +} + +func (obj *bgpOneIpv6NLRIPrefix) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Address != nil { + + err := obj.validateIpv6(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpOneIpv6NLRIPrefix.Address")) + } + + } + + if obj.obj.Prefix != nil { + + if *obj.obj.Prefix > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpOneIpv6NLRIPrefix.Prefix <= 128 but Got %d", *obj.obj.Prefix)) + } + + } + + if obj.obj.PathId != nil { + + obj.PathId().validateObj(vObj, set_default) + } + +} + +func (obj *bgpOneIpv6NLRIPrefix) setDefault() { + if obj.obj.Address == nil { + obj.SetAddress("0::0") + } + if obj.obj.Prefix == nil { + obj.SetPrefix(64) + } + +} diff --git a/gosnappi/bgp_one_structured_update_replay.go b/gosnappi/bgp_one_structured_update_replay.go new file mode 100644 index 00000000..07a8fb01 --- /dev/null +++ b/gosnappi/bgp_one_structured_update_replay.go @@ -0,0 +1,494 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpOneStructuredUpdateReplay ***** +type bgpOneStructuredUpdateReplay struct { + validation + obj *otg.BgpOneStructuredUpdateReplay + marshaller marshalBgpOneStructuredUpdateReplay + unMarshaller unMarshalBgpOneStructuredUpdateReplay + pathAttributesHolder BgpAttributes + traditionalUnreachNlrisHolder BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter + traditionalReachNlrisHolder BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter +} + +func NewBgpOneStructuredUpdateReplay() BgpOneStructuredUpdateReplay { + obj := bgpOneStructuredUpdateReplay{obj: &otg.BgpOneStructuredUpdateReplay{}} + obj.setDefault() + return &obj +} + +func (obj *bgpOneStructuredUpdateReplay) msg() *otg.BgpOneStructuredUpdateReplay { + return obj.obj +} + +func (obj *bgpOneStructuredUpdateReplay) setMsg(msg *otg.BgpOneStructuredUpdateReplay) BgpOneStructuredUpdateReplay { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpOneStructuredUpdateReplay struct { + obj *bgpOneStructuredUpdateReplay +} + +type marshalBgpOneStructuredUpdateReplay interface { + // ToProto marshals BgpOneStructuredUpdateReplay to protobuf object *otg.BgpOneStructuredUpdateReplay + ToProto() (*otg.BgpOneStructuredUpdateReplay, error) + // ToPbText marshals BgpOneStructuredUpdateReplay to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpOneStructuredUpdateReplay to YAML text + ToYaml() (string, error) + // ToJson marshals BgpOneStructuredUpdateReplay to JSON text + ToJson() (string, error) +} + +type unMarshalbgpOneStructuredUpdateReplay struct { + obj *bgpOneStructuredUpdateReplay +} + +type unMarshalBgpOneStructuredUpdateReplay interface { + // FromProto unmarshals BgpOneStructuredUpdateReplay from protobuf object *otg.BgpOneStructuredUpdateReplay + FromProto(msg *otg.BgpOneStructuredUpdateReplay) (BgpOneStructuredUpdateReplay, error) + // FromPbText unmarshals BgpOneStructuredUpdateReplay from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpOneStructuredUpdateReplay from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpOneStructuredUpdateReplay from JSON text + FromJson(value string) error +} + +func (obj *bgpOneStructuredUpdateReplay) Marshal() marshalBgpOneStructuredUpdateReplay { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpOneStructuredUpdateReplay{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpOneStructuredUpdateReplay) Unmarshal() unMarshalBgpOneStructuredUpdateReplay { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpOneStructuredUpdateReplay{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpOneStructuredUpdateReplay) ToProto() (*otg.BgpOneStructuredUpdateReplay, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpOneStructuredUpdateReplay) FromProto(msg *otg.BgpOneStructuredUpdateReplay) (BgpOneStructuredUpdateReplay, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpOneStructuredUpdateReplay) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpOneStructuredUpdateReplay) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpOneStructuredUpdateReplay) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpOneStructuredUpdateReplay) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpOneStructuredUpdateReplay) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpOneStructuredUpdateReplay) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpOneStructuredUpdateReplay) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpOneStructuredUpdateReplay) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpOneStructuredUpdateReplay) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpOneStructuredUpdateReplay) Clone() (BgpOneStructuredUpdateReplay, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpOneStructuredUpdateReplay() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpOneStructuredUpdateReplay) setNil() { + obj.pathAttributesHolder = nil + obj.traditionalUnreachNlrisHolder = nil + obj.traditionalReachNlrisHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpOneStructuredUpdateReplay is one structured BGP Update. +type BgpOneStructuredUpdateReplay interface { + Validation + // msg marshals BgpOneStructuredUpdateReplay to protobuf object *otg.BgpOneStructuredUpdateReplay + // and doesn't set defaults + msg() *otg.BgpOneStructuredUpdateReplay + // setMsg unmarshals BgpOneStructuredUpdateReplay from protobuf object *otg.BgpOneStructuredUpdateReplay + // and doesn't set defaults + setMsg(*otg.BgpOneStructuredUpdateReplay) BgpOneStructuredUpdateReplay + // provides marshal interface + Marshal() marshalBgpOneStructuredUpdateReplay + // provides unmarshal interface + Unmarshal() unMarshalBgpOneStructuredUpdateReplay + // validate validates BgpOneStructuredUpdateReplay + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpOneStructuredUpdateReplay, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // TimeGap returns uint32, set in BgpOneStructuredUpdateReplay. + TimeGap() uint32 + // SetTimeGap assigns uint32 provided by user to BgpOneStructuredUpdateReplay + SetTimeGap(value uint32) BgpOneStructuredUpdateReplay + // HasTimeGap checks if TimeGap has been set in BgpOneStructuredUpdateReplay + HasTimeGap() bool + // PathAttributes returns BgpAttributes, set in BgpOneStructuredUpdateReplay. + // BgpAttributes is attributes carried in the Update packet alongwith the reach/unreach prefixes. + PathAttributes() BgpAttributes + // SetPathAttributes assigns BgpAttributes provided by user to BgpOneStructuredUpdateReplay. + // BgpAttributes is attributes carried in the Update packet alongwith the reach/unreach prefixes. + SetPathAttributes(value BgpAttributes) BgpOneStructuredUpdateReplay + // HasPathAttributes checks if PathAttributes has been set in BgpOneStructuredUpdateReplay + HasPathAttributes() bool + // TraditionalUnreachNlris returns BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIterIter, set in BgpOneStructuredUpdateReplay + TraditionalUnreachNlris() BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter + // TraditionalReachNlris returns BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIterIter, set in BgpOneStructuredUpdateReplay + TraditionalReachNlris() BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter + setNil() +} + +// Minimum time interval in milliseconds from previous Update from the sequence of BGP Updates to be replayed. +// TimeGap returns a uint32 +func (obj *bgpOneStructuredUpdateReplay) TimeGap() uint32 { + + return *obj.obj.TimeGap + +} + +// Minimum time interval in milliseconds from previous Update from the sequence of BGP Updates to be replayed. +// TimeGap returns a uint32 +func (obj *bgpOneStructuredUpdateReplay) HasTimeGap() bool { + return obj.obj.TimeGap != nil +} + +// Minimum time interval in milliseconds from previous Update from the sequence of BGP Updates to be replayed. +// SetTimeGap sets the uint32 value in the BgpOneStructuredUpdateReplay object +func (obj *bgpOneStructuredUpdateReplay) SetTimeGap(value uint32) BgpOneStructuredUpdateReplay { + + obj.obj.TimeGap = &value + return obj +} + +// Attributes carried in the Update packet alongwith the reach/unreach prefixes. +// PathAttributes returns a BgpAttributes +func (obj *bgpOneStructuredUpdateReplay) PathAttributes() BgpAttributes { + if obj.obj.PathAttributes == nil { + obj.obj.PathAttributes = NewBgpAttributes().msg() + } + if obj.pathAttributesHolder == nil { + obj.pathAttributesHolder = &bgpAttributes{obj: obj.obj.PathAttributes} + } + return obj.pathAttributesHolder +} + +// Attributes carried in the Update packet alongwith the reach/unreach prefixes. +// PathAttributes returns a BgpAttributes +func (obj *bgpOneStructuredUpdateReplay) HasPathAttributes() bool { + return obj.obj.PathAttributes != nil +} + +// Attributes carried in the Update packet alongwith the reach/unreach prefixes. +// SetPathAttributes sets the BgpAttributes value in the BgpOneStructuredUpdateReplay object +func (obj *bgpOneStructuredUpdateReplay) SetPathAttributes(value BgpAttributes) BgpOneStructuredUpdateReplay { + + obj.pathAttributesHolder = nil + obj.obj.PathAttributes = value.msg() + + return obj +} + +// The IPv4 prefixes to be included in the traditional UNREACH_NLRI. +// TraditionalUnreachNlris returns a []BgpOneTraditionalNlriPrefix +func (obj *bgpOneStructuredUpdateReplay) TraditionalUnreachNlris() BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter { + if len(obj.obj.TraditionalUnreachNlris) == 0 { + obj.obj.TraditionalUnreachNlris = []*otg.BgpOneTraditionalNlriPrefix{} + } + if obj.traditionalUnreachNlrisHolder == nil { + obj.traditionalUnreachNlrisHolder = newBgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter(&obj.obj.TraditionalUnreachNlris).setMsg(obj) + } + return obj.traditionalUnreachNlrisHolder +} + +type bgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter struct { + obj *bgpOneStructuredUpdateReplay + bgpOneTraditionalNlriPrefixSlice []BgpOneTraditionalNlriPrefix + fieldPtr *[]*otg.BgpOneTraditionalNlriPrefix +} + +func newBgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter(ptr *[]*otg.BgpOneTraditionalNlriPrefix) BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter { + return &bgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter{fieldPtr: ptr} +} + +type BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter interface { + setMsg(*bgpOneStructuredUpdateReplay) BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter + Items() []BgpOneTraditionalNlriPrefix + Add() BgpOneTraditionalNlriPrefix + Append(items ...BgpOneTraditionalNlriPrefix) BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter + Set(index int, newObj BgpOneTraditionalNlriPrefix) BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter + Clear() BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter + clearHolderSlice() BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter + appendHolderSlice(item BgpOneTraditionalNlriPrefix) BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter +} + +func (obj *bgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter) setMsg(msg *bgpOneStructuredUpdateReplay) BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpOneTraditionalNlriPrefix{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter) Items() []BgpOneTraditionalNlriPrefix { + return obj.bgpOneTraditionalNlriPrefixSlice +} + +func (obj *bgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter) Add() BgpOneTraditionalNlriPrefix { + newObj := &otg.BgpOneTraditionalNlriPrefix{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpOneTraditionalNlriPrefix{obj: newObj} + newLibObj.setDefault() + obj.bgpOneTraditionalNlriPrefixSlice = append(obj.bgpOneTraditionalNlriPrefixSlice, newLibObj) + return newLibObj +} + +func (obj *bgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter) Append(items ...BgpOneTraditionalNlriPrefix) BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpOneTraditionalNlriPrefixSlice = append(obj.bgpOneTraditionalNlriPrefixSlice, item) + } + return obj +} + +func (obj *bgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter) Set(index int, newObj BgpOneTraditionalNlriPrefix) BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpOneTraditionalNlriPrefixSlice[index] = newObj + return obj +} +func (obj *bgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter) Clear() BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpOneTraditionalNlriPrefix{} + obj.bgpOneTraditionalNlriPrefixSlice = []BgpOneTraditionalNlriPrefix{} + } + return obj +} +func (obj *bgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter) clearHolderSlice() BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter { + if len(obj.bgpOneTraditionalNlriPrefixSlice) > 0 { + obj.bgpOneTraditionalNlriPrefixSlice = []BgpOneTraditionalNlriPrefix{} + } + return obj +} +func (obj *bgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter) appendHolderSlice(item BgpOneTraditionalNlriPrefix) BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter { + obj.bgpOneTraditionalNlriPrefixSlice = append(obj.bgpOneTraditionalNlriPrefixSlice, item) + return obj +} + +// The IPv4 prefixes to be included in the traditional REACH_NLRI. +// TraditionalReachNlris returns a []BgpOneTraditionalNlriPrefix +func (obj *bgpOneStructuredUpdateReplay) TraditionalReachNlris() BgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter { + if len(obj.obj.TraditionalReachNlris) == 0 { + obj.obj.TraditionalReachNlris = []*otg.BgpOneTraditionalNlriPrefix{} + } + if obj.traditionalReachNlrisHolder == nil { + obj.traditionalReachNlrisHolder = newBgpOneStructuredUpdateReplayBgpOneTraditionalNlriPrefixIter(&obj.obj.TraditionalReachNlris).setMsg(obj) + } + return obj.traditionalReachNlrisHolder +} + +func (obj *bgpOneStructuredUpdateReplay) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.PathAttributes != nil { + + obj.PathAttributes().validateObj(vObj, set_default) + } + + if len(obj.obj.TraditionalUnreachNlris) != 0 { + + if set_default { + obj.TraditionalUnreachNlris().clearHolderSlice() + for _, item := range obj.obj.TraditionalUnreachNlris { + obj.TraditionalUnreachNlris().appendHolderSlice(&bgpOneTraditionalNlriPrefix{obj: item}) + } + } + for _, item := range obj.TraditionalUnreachNlris().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.TraditionalReachNlris) != 0 { + + if set_default { + obj.TraditionalReachNlris().clearHolderSlice() + for _, item := range obj.obj.TraditionalReachNlris { + obj.TraditionalReachNlris().appendHolderSlice(&bgpOneTraditionalNlriPrefix{obj: item}) + } + } + for _, item := range obj.TraditionalReachNlris().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpOneStructuredUpdateReplay) setDefault() { + if obj.obj.TimeGap == nil { + obj.SetTimeGap(0) + } + +} diff --git a/gosnappi/bgp_one_traditional_nlri_prefix.go b/gosnappi/bgp_one_traditional_nlri_prefix.go new file mode 100644 index 00000000..cb3760df --- /dev/null +++ b/gosnappi/bgp_one_traditional_nlri_prefix.go @@ -0,0 +1,410 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpOneTraditionalNlriPrefix ***** +type bgpOneTraditionalNlriPrefix struct { + validation + obj *otg.BgpOneTraditionalNlriPrefix + marshaller marshalBgpOneTraditionalNlriPrefix + unMarshaller unMarshalBgpOneTraditionalNlriPrefix + pathIdHolder BgpNLRIPrefixPathId +} + +func NewBgpOneTraditionalNlriPrefix() BgpOneTraditionalNlriPrefix { + obj := bgpOneTraditionalNlriPrefix{obj: &otg.BgpOneTraditionalNlriPrefix{}} + obj.setDefault() + return &obj +} + +func (obj *bgpOneTraditionalNlriPrefix) msg() *otg.BgpOneTraditionalNlriPrefix { + return obj.obj +} + +func (obj *bgpOneTraditionalNlriPrefix) setMsg(msg *otg.BgpOneTraditionalNlriPrefix) BgpOneTraditionalNlriPrefix { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpOneTraditionalNlriPrefix struct { + obj *bgpOneTraditionalNlriPrefix +} + +type marshalBgpOneTraditionalNlriPrefix interface { + // ToProto marshals BgpOneTraditionalNlriPrefix to protobuf object *otg.BgpOneTraditionalNlriPrefix + ToProto() (*otg.BgpOneTraditionalNlriPrefix, error) + // ToPbText marshals BgpOneTraditionalNlriPrefix to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpOneTraditionalNlriPrefix to YAML text + ToYaml() (string, error) + // ToJson marshals BgpOneTraditionalNlriPrefix to JSON text + ToJson() (string, error) +} + +type unMarshalbgpOneTraditionalNlriPrefix struct { + obj *bgpOneTraditionalNlriPrefix +} + +type unMarshalBgpOneTraditionalNlriPrefix interface { + // FromProto unmarshals BgpOneTraditionalNlriPrefix from protobuf object *otg.BgpOneTraditionalNlriPrefix + FromProto(msg *otg.BgpOneTraditionalNlriPrefix) (BgpOneTraditionalNlriPrefix, error) + // FromPbText unmarshals BgpOneTraditionalNlriPrefix from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpOneTraditionalNlriPrefix from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpOneTraditionalNlriPrefix from JSON text + FromJson(value string) error +} + +func (obj *bgpOneTraditionalNlriPrefix) Marshal() marshalBgpOneTraditionalNlriPrefix { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpOneTraditionalNlriPrefix{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpOneTraditionalNlriPrefix) Unmarshal() unMarshalBgpOneTraditionalNlriPrefix { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpOneTraditionalNlriPrefix{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpOneTraditionalNlriPrefix) ToProto() (*otg.BgpOneTraditionalNlriPrefix, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpOneTraditionalNlriPrefix) FromProto(msg *otg.BgpOneTraditionalNlriPrefix) (BgpOneTraditionalNlriPrefix, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpOneTraditionalNlriPrefix) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpOneTraditionalNlriPrefix) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpOneTraditionalNlriPrefix) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpOneTraditionalNlriPrefix) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpOneTraditionalNlriPrefix) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpOneTraditionalNlriPrefix) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpOneTraditionalNlriPrefix) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpOneTraditionalNlriPrefix) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpOneTraditionalNlriPrefix) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpOneTraditionalNlriPrefix) Clone() (BgpOneTraditionalNlriPrefix, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpOneTraditionalNlriPrefix() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpOneTraditionalNlriPrefix) setNil() { + obj.pathIdHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpOneTraditionalNlriPrefix is tRADITIONAL_NLRI is an optional part of the the BGP Update which can carry only IPv4 prefix information as defined in https://www.rfc-editor.org/rfc/rfc4271.html#section-4.3 +// and extended by https://datatracker.ietf.org/doc/html/rfc7911#section-3 to carry additional Path Id information per prefix. +type BgpOneTraditionalNlriPrefix interface { + Validation + // msg marshals BgpOneTraditionalNlriPrefix to protobuf object *otg.BgpOneTraditionalNlriPrefix + // and doesn't set defaults + msg() *otg.BgpOneTraditionalNlriPrefix + // setMsg unmarshals BgpOneTraditionalNlriPrefix from protobuf object *otg.BgpOneTraditionalNlriPrefix + // and doesn't set defaults + setMsg(*otg.BgpOneTraditionalNlriPrefix) BgpOneTraditionalNlriPrefix + // provides marshal interface + Marshal() marshalBgpOneTraditionalNlriPrefix + // provides unmarshal interface + Unmarshal() unMarshalBgpOneTraditionalNlriPrefix + // validate validates BgpOneTraditionalNlriPrefix + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpOneTraditionalNlriPrefix, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Address returns string, set in BgpOneTraditionalNlriPrefix. + Address() string + // SetAddress assigns string provided by user to BgpOneTraditionalNlriPrefix + SetAddress(value string) BgpOneTraditionalNlriPrefix + // HasAddress checks if Address has been set in BgpOneTraditionalNlriPrefix + HasAddress() bool + // Prefix returns uint32, set in BgpOneTraditionalNlriPrefix. + Prefix() uint32 + // SetPrefix assigns uint32 provided by user to BgpOneTraditionalNlriPrefix + SetPrefix(value uint32) BgpOneTraditionalNlriPrefix + // HasPrefix checks if Prefix has been set in BgpOneTraditionalNlriPrefix + HasPrefix() bool + // PathId returns BgpNLRIPrefixPathId, set in BgpOneTraditionalNlriPrefix. + // BgpNLRIPrefixPathId is optional field in the NLRI carrying Path Id of the prefix. + PathId() BgpNLRIPrefixPathId + // SetPathId assigns BgpNLRIPrefixPathId provided by user to BgpOneTraditionalNlriPrefix. + // BgpNLRIPrefixPathId is optional field in the NLRI carrying Path Id of the prefix. + SetPathId(value BgpNLRIPrefixPathId) BgpOneTraditionalNlriPrefix + // HasPathId checks if PathId has been set in BgpOneTraditionalNlriPrefix + HasPathId() bool + setNil() +} + +// The IPv4 address of the network. +// Address returns a string +func (obj *bgpOneTraditionalNlriPrefix) Address() string { + + return *obj.obj.Address + +} + +// The IPv4 address of the network. +// Address returns a string +func (obj *bgpOneTraditionalNlriPrefix) HasAddress() bool { + return obj.obj.Address != nil +} + +// The IPv4 address of the network. +// SetAddress sets the string value in the BgpOneTraditionalNlriPrefix object +func (obj *bgpOneTraditionalNlriPrefix) SetAddress(value string) BgpOneTraditionalNlriPrefix { + + obj.obj.Address = &value + return obj +} + +// The IPv4 network prefix length to be applied to the address. +// Prefix returns a uint32 +func (obj *bgpOneTraditionalNlriPrefix) Prefix() uint32 { + + return *obj.obj.Prefix + +} + +// The IPv4 network prefix length to be applied to the address. +// Prefix returns a uint32 +func (obj *bgpOneTraditionalNlriPrefix) HasPrefix() bool { + return obj.obj.Prefix != nil +} + +// The IPv4 network prefix length to be applied to the address. +// SetPrefix sets the uint32 value in the BgpOneTraditionalNlriPrefix object +func (obj *bgpOneTraditionalNlriPrefix) SetPrefix(value uint32) BgpOneTraditionalNlriPrefix { + + obj.obj.Prefix = &value + return obj +} + +// description is TBD +// PathId returns a BgpNLRIPrefixPathId +func (obj *bgpOneTraditionalNlriPrefix) PathId() BgpNLRIPrefixPathId { + if obj.obj.PathId == nil { + obj.obj.PathId = NewBgpNLRIPrefixPathId().msg() + } + if obj.pathIdHolder == nil { + obj.pathIdHolder = &bgpNLRIPrefixPathId{obj: obj.obj.PathId} + } + return obj.pathIdHolder +} + +// description is TBD +// PathId returns a BgpNLRIPrefixPathId +func (obj *bgpOneTraditionalNlriPrefix) HasPathId() bool { + return obj.obj.PathId != nil +} + +// description is TBD +// SetPathId sets the BgpNLRIPrefixPathId value in the BgpOneTraditionalNlriPrefix object +func (obj *bgpOneTraditionalNlriPrefix) SetPathId(value BgpNLRIPrefixPathId) BgpOneTraditionalNlriPrefix { + + obj.pathIdHolder = nil + obj.obj.PathId = value.msg() + + return obj +} + +func (obj *bgpOneTraditionalNlriPrefix) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Address != nil { + + err := obj.validateIpv4(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpOneTraditionalNlriPrefix.Address")) + } + + } + + if obj.obj.Prefix != nil { + + if *obj.obj.Prefix > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpOneTraditionalNlriPrefix.Prefix <= 32 but Got %d", *obj.obj.Prefix)) + } + + } + + if obj.obj.PathId != nil { + + obj.PathId().validateObj(vObj, set_default) + } + +} + +func (obj *bgpOneTraditionalNlriPrefix) setDefault() { + if obj.obj.Address == nil { + obj.SetAddress("0.0.0.0") + } + if obj.obj.Prefix == nil { + obj.SetPrefix(24) + } + +} diff --git a/gosnappi/bgp_one_update_replay.go b/gosnappi/bgp_one_update_replay.go new file mode 100644 index 00000000..0998a268 --- /dev/null +++ b/gosnappi/bgp_one_update_replay.go @@ -0,0 +1,345 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpOneUpdateReplay ***** +type bgpOneUpdateReplay struct { + validation + obj *otg.BgpOneUpdateReplay + marshaller marshalBgpOneUpdateReplay + unMarshaller unMarshalBgpOneUpdateReplay +} + +func NewBgpOneUpdateReplay() BgpOneUpdateReplay { + obj := bgpOneUpdateReplay{obj: &otg.BgpOneUpdateReplay{}} + obj.setDefault() + return &obj +} + +func (obj *bgpOneUpdateReplay) msg() *otg.BgpOneUpdateReplay { + return obj.obj +} + +func (obj *bgpOneUpdateReplay) setMsg(msg *otg.BgpOneUpdateReplay) BgpOneUpdateReplay { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpOneUpdateReplay struct { + obj *bgpOneUpdateReplay +} + +type marshalBgpOneUpdateReplay interface { + // ToProto marshals BgpOneUpdateReplay to protobuf object *otg.BgpOneUpdateReplay + ToProto() (*otg.BgpOneUpdateReplay, error) + // ToPbText marshals BgpOneUpdateReplay to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpOneUpdateReplay to YAML text + ToYaml() (string, error) + // ToJson marshals BgpOneUpdateReplay to JSON text + ToJson() (string, error) +} + +type unMarshalbgpOneUpdateReplay struct { + obj *bgpOneUpdateReplay +} + +type unMarshalBgpOneUpdateReplay interface { + // FromProto unmarshals BgpOneUpdateReplay from protobuf object *otg.BgpOneUpdateReplay + FromProto(msg *otg.BgpOneUpdateReplay) (BgpOneUpdateReplay, error) + // FromPbText unmarshals BgpOneUpdateReplay from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpOneUpdateReplay from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpOneUpdateReplay from JSON text + FromJson(value string) error +} + +func (obj *bgpOneUpdateReplay) Marshal() marshalBgpOneUpdateReplay { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpOneUpdateReplay{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpOneUpdateReplay) Unmarshal() unMarshalBgpOneUpdateReplay { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpOneUpdateReplay{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpOneUpdateReplay) ToProto() (*otg.BgpOneUpdateReplay, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpOneUpdateReplay) FromProto(msg *otg.BgpOneUpdateReplay) (BgpOneUpdateReplay, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpOneUpdateReplay) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpOneUpdateReplay) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpOneUpdateReplay) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpOneUpdateReplay) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpOneUpdateReplay) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpOneUpdateReplay) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpOneUpdateReplay) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpOneUpdateReplay) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpOneUpdateReplay) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpOneUpdateReplay) Clone() (BgpOneUpdateReplay, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpOneUpdateReplay() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpOneUpdateReplay is specification of one BGP Update to be sent to the BGP peer. +type BgpOneUpdateReplay interface { + Validation + // msg marshals BgpOneUpdateReplay to protobuf object *otg.BgpOneUpdateReplay + // and doesn't set defaults + msg() *otg.BgpOneUpdateReplay + // setMsg unmarshals BgpOneUpdateReplay from protobuf object *otg.BgpOneUpdateReplay + // and doesn't set defaults + setMsg(*otg.BgpOneUpdateReplay) BgpOneUpdateReplay + // provides marshal interface + Marshal() marshalBgpOneUpdateReplay + // provides unmarshal interface + Unmarshal() unMarshalBgpOneUpdateReplay + // validate validates BgpOneUpdateReplay + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpOneUpdateReplay, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // TimeGap returns uint32, set in BgpOneUpdateReplay. + TimeGap() uint32 + // SetTimeGap assigns uint32 provided by user to BgpOneUpdateReplay + SetTimeGap(value uint32) BgpOneUpdateReplay + // HasTimeGap checks if TimeGap has been set in BgpOneUpdateReplay + HasTimeGap() bool + // UpdateBytes returns string, set in BgpOneUpdateReplay. + UpdateBytes() string + // SetUpdateBytes assigns string provided by user to BgpOneUpdateReplay + SetUpdateBytes(value string) BgpOneUpdateReplay +} + +// Minimum time interval in milliseconds from previous Update from the sequence of BGP Updates to be replayed. +// TimeGap returns a uint32 +func (obj *bgpOneUpdateReplay) TimeGap() uint32 { + + return *obj.obj.TimeGap + +} + +// Minimum time interval in milliseconds from previous Update from the sequence of BGP Updates to be replayed. +// TimeGap returns a uint32 +func (obj *bgpOneUpdateReplay) HasTimeGap() bool { + return obj.obj.TimeGap != nil +} + +// Minimum time interval in milliseconds from previous Update from the sequence of BGP Updates to be replayed. +// SetTimeGap sets the uint32 value in the BgpOneUpdateReplay object +func (obj *bgpOneUpdateReplay) SetTimeGap(value uint32) BgpOneUpdateReplay { + + obj.obj.TimeGap = &value + return obj +} + +// Bytes specified in hex format to be sent to peer after the BGP Update Header. The Update Header will always have the initial 16 bytes containing Marker bytes, 2 bytes containing the Length and 1 byte containing the Type.The string MUST contain sequence of valid hex bytes. The bytes specified in hex format should be appended to the Update message to be sent to the peer after the fixed 19 bytes described above. This byte stream can be of any length from 1 to 4077 bytes.The value 4077 is derived from the maximum length allowed for a BGP message in RFC4271 which is 4096 minus mandatory 19 bytes described above. In the imported byte stream, one byte is represented as string of 2 characters, for example 2 character string (0x)AB represents value of a single byte. So the maximum length of this attribute is 8154 (4077 * 2 hex characters per byte). +// UpdateBytes returns a string +func (obj *bgpOneUpdateReplay) UpdateBytes() string { + + return *obj.obj.UpdateBytes + +} + +// Bytes specified in hex format to be sent to peer after the BGP Update Header. The Update Header will always have the initial 16 bytes containing Marker bytes, 2 bytes containing the Length and 1 byte containing the Type.The string MUST contain sequence of valid hex bytes. The bytes specified in hex format should be appended to the Update message to be sent to the peer after the fixed 19 bytes described above. This byte stream can be of any length from 1 to 4077 bytes.The value 4077 is derived from the maximum length allowed for a BGP message in RFC4271 which is 4096 minus mandatory 19 bytes described above. In the imported byte stream, one byte is represented as string of 2 characters, for example 2 character string (0x)AB represents value of a single byte. So the maximum length of this attribute is 8154 (4077 * 2 hex characters per byte). +// SetUpdateBytes sets the string value in the BgpOneUpdateReplay object +func (obj *bgpOneUpdateReplay) SetUpdateBytes(value string) BgpOneUpdateReplay { + + obj.obj.UpdateBytes = &value + return obj +} + +func (obj *bgpOneUpdateReplay) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // UpdateBytes is required + if obj.obj.UpdateBytes == nil { + vObj.validationErrors = append(vObj.validationErrors, "UpdateBytes is required field on interface BgpOneUpdateReplay") + } + if obj.obj.UpdateBytes != nil { + + if len(*obj.obj.UpdateBytes) < 1 || len(*obj.obj.UpdateBytes) > 8154 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "1 <= length of BgpOneUpdateReplay.UpdateBytes <= 8154 but Got %d", + len(*obj.obj.UpdateBytes))) + } + + } + +} + +func (obj *bgpOneUpdateReplay) setDefault() { + if obj.obj.TimeGap == nil { + obj.SetTimeGap(0) + } + +} diff --git a/gosnappi/bgp_prefix_ipv4_unicast_filter.go b/gosnappi/bgp_prefix_ipv4_unicast_filter.go new file mode 100644 index 00000000..54e035f0 --- /dev/null +++ b/gosnappi/bgp_prefix_ipv4_unicast_filter.go @@ -0,0 +1,420 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpPrefixIpv4UnicastFilter ***** +type bgpPrefixIpv4UnicastFilter struct { + validation + obj *otg.BgpPrefixIpv4UnicastFilter + marshaller marshalBgpPrefixIpv4UnicastFilter + unMarshaller unMarshalBgpPrefixIpv4UnicastFilter +} + +func NewBgpPrefixIpv4UnicastFilter() BgpPrefixIpv4UnicastFilter { + obj := bgpPrefixIpv4UnicastFilter{obj: &otg.BgpPrefixIpv4UnicastFilter{}} + obj.setDefault() + return &obj +} + +func (obj *bgpPrefixIpv4UnicastFilter) msg() *otg.BgpPrefixIpv4UnicastFilter { + return obj.obj +} + +func (obj *bgpPrefixIpv4UnicastFilter) setMsg(msg *otg.BgpPrefixIpv4UnicastFilter) BgpPrefixIpv4UnicastFilter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpPrefixIpv4UnicastFilter struct { + obj *bgpPrefixIpv4UnicastFilter +} + +type marshalBgpPrefixIpv4UnicastFilter interface { + // ToProto marshals BgpPrefixIpv4UnicastFilter to protobuf object *otg.BgpPrefixIpv4UnicastFilter + ToProto() (*otg.BgpPrefixIpv4UnicastFilter, error) + // ToPbText marshals BgpPrefixIpv4UnicastFilter to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpPrefixIpv4UnicastFilter to YAML text + ToYaml() (string, error) + // ToJson marshals BgpPrefixIpv4UnicastFilter to JSON text + ToJson() (string, error) +} + +type unMarshalbgpPrefixIpv4UnicastFilter struct { + obj *bgpPrefixIpv4UnicastFilter +} + +type unMarshalBgpPrefixIpv4UnicastFilter interface { + // FromProto unmarshals BgpPrefixIpv4UnicastFilter from protobuf object *otg.BgpPrefixIpv4UnicastFilter + FromProto(msg *otg.BgpPrefixIpv4UnicastFilter) (BgpPrefixIpv4UnicastFilter, error) + // FromPbText unmarshals BgpPrefixIpv4UnicastFilter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpPrefixIpv4UnicastFilter from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpPrefixIpv4UnicastFilter from JSON text + FromJson(value string) error +} + +func (obj *bgpPrefixIpv4UnicastFilter) Marshal() marshalBgpPrefixIpv4UnicastFilter { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpPrefixIpv4UnicastFilter{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpPrefixIpv4UnicastFilter) Unmarshal() unMarshalBgpPrefixIpv4UnicastFilter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpPrefixIpv4UnicastFilter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpPrefixIpv4UnicastFilter) ToProto() (*otg.BgpPrefixIpv4UnicastFilter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpPrefixIpv4UnicastFilter) FromProto(msg *otg.BgpPrefixIpv4UnicastFilter) (BgpPrefixIpv4UnicastFilter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpPrefixIpv4UnicastFilter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpPrefixIpv4UnicastFilter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpPrefixIpv4UnicastFilter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpPrefixIpv4UnicastFilter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpPrefixIpv4UnicastFilter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpPrefixIpv4UnicastFilter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpPrefixIpv4UnicastFilter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpPrefixIpv4UnicastFilter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpPrefixIpv4UnicastFilter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpPrefixIpv4UnicastFilter) Clone() (BgpPrefixIpv4UnicastFilter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpPrefixIpv4UnicastFilter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpPrefixIpv4UnicastFilter is description is TBD +type BgpPrefixIpv4UnicastFilter interface { + Validation + // msg marshals BgpPrefixIpv4UnicastFilter to protobuf object *otg.BgpPrefixIpv4UnicastFilter + // and doesn't set defaults + msg() *otg.BgpPrefixIpv4UnicastFilter + // setMsg unmarshals BgpPrefixIpv4UnicastFilter from protobuf object *otg.BgpPrefixIpv4UnicastFilter + // and doesn't set defaults + setMsg(*otg.BgpPrefixIpv4UnicastFilter) BgpPrefixIpv4UnicastFilter + // provides marshal interface + Marshal() marshalBgpPrefixIpv4UnicastFilter + // provides unmarshal interface + Unmarshal() unMarshalBgpPrefixIpv4UnicastFilter + // validate validates BgpPrefixIpv4UnicastFilter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpPrefixIpv4UnicastFilter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Addresses returns []string, set in BgpPrefixIpv4UnicastFilter. + Addresses() []string + // SetAddresses assigns []string provided by user to BgpPrefixIpv4UnicastFilter + SetAddresses(value []string) BgpPrefixIpv4UnicastFilter + // PrefixLength returns uint32, set in BgpPrefixIpv4UnicastFilter. + PrefixLength() uint32 + // SetPrefixLength assigns uint32 provided by user to BgpPrefixIpv4UnicastFilter + SetPrefixLength(value uint32) BgpPrefixIpv4UnicastFilter + // HasPrefixLength checks if PrefixLength has been set in BgpPrefixIpv4UnicastFilter + HasPrefixLength() bool + // Origin returns BgpPrefixIpv4UnicastFilterOriginEnum, set in BgpPrefixIpv4UnicastFilter + Origin() BgpPrefixIpv4UnicastFilterOriginEnum + // SetOrigin assigns BgpPrefixIpv4UnicastFilterOriginEnum provided by user to BgpPrefixIpv4UnicastFilter + SetOrigin(value BgpPrefixIpv4UnicastFilterOriginEnum) BgpPrefixIpv4UnicastFilter + // HasOrigin checks if Origin has been set in BgpPrefixIpv4UnicastFilter + HasOrigin() bool + // PathId returns uint32, set in BgpPrefixIpv4UnicastFilter. + PathId() uint32 + // SetPathId assigns uint32 provided by user to BgpPrefixIpv4UnicastFilter + SetPathId(value uint32) BgpPrefixIpv4UnicastFilter + // HasPathId checks if PathId has been set in BgpPrefixIpv4UnicastFilter + HasPathId() bool +} + +// The addresses to match. If the addresses property is missing or empty then all addresses will match. +// Addresses returns a []string +func (obj *bgpPrefixIpv4UnicastFilter) Addresses() []string { + if obj.obj.Addresses == nil { + obj.obj.Addresses = make([]string, 0) + } + return obj.obj.Addresses +} + +// The addresses to match. If the addresses property is missing or empty then all addresses will match. +// SetAddresses sets the []string value in the BgpPrefixIpv4UnicastFilter object +func (obj *bgpPrefixIpv4UnicastFilter) SetAddresses(value []string) BgpPrefixIpv4UnicastFilter { + + if obj.obj.Addresses == nil { + obj.obj.Addresses = make([]string, 0) + } + obj.obj.Addresses = value + + return obj +} + +// The prefix length to match. If the prefix length is missing then all prefix lengths will match. +// PrefixLength returns a uint32 +func (obj *bgpPrefixIpv4UnicastFilter) PrefixLength() uint32 { + + return *obj.obj.PrefixLength + +} + +// The prefix length to match. If the prefix length is missing then all prefix lengths will match. +// PrefixLength returns a uint32 +func (obj *bgpPrefixIpv4UnicastFilter) HasPrefixLength() bool { + return obj.obj.PrefixLength != nil +} + +// The prefix length to match. If the prefix length is missing then all prefix lengths will match. +// SetPrefixLength sets the uint32 value in the BgpPrefixIpv4UnicastFilter object +func (obj *bgpPrefixIpv4UnicastFilter) SetPrefixLength(value uint32) BgpPrefixIpv4UnicastFilter { + + obj.obj.PrefixLength = &value + return obj +} + +type BgpPrefixIpv4UnicastFilterOriginEnum string + +// Enum of Origin on BgpPrefixIpv4UnicastFilter +var BgpPrefixIpv4UnicastFilterOrigin = struct { + IGP BgpPrefixIpv4UnicastFilterOriginEnum + EGP BgpPrefixIpv4UnicastFilterOriginEnum + INCOMPLETE BgpPrefixIpv4UnicastFilterOriginEnum +}{ + IGP: BgpPrefixIpv4UnicastFilterOriginEnum("igp"), + EGP: BgpPrefixIpv4UnicastFilterOriginEnum("egp"), + INCOMPLETE: BgpPrefixIpv4UnicastFilterOriginEnum("incomplete"), +} + +func (obj *bgpPrefixIpv4UnicastFilter) Origin() BgpPrefixIpv4UnicastFilterOriginEnum { + return BgpPrefixIpv4UnicastFilterOriginEnum(obj.obj.Origin.Enum().String()) +} + +// The origin to match. If the origin is missing then all origins will match. +// Origin returns a string +func (obj *bgpPrefixIpv4UnicastFilter) HasOrigin() bool { + return obj.obj.Origin != nil +} + +func (obj *bgpPrefixIpv4UnicastFilter) SetOrigin(value BgpPrefixIpv4UnicastFilterOriginEnum) BgpPrefixIpv4UnicastFilter { + intValue, ok := otg.BgpPrefixIpv4UnicastFilter_Origin_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpPrefixIpv4UnicastFilterOriginEnum", string(value))) + return obj + } + enumValue := otg.BgpPrefixIpv4UnicastFilter_Origin_Enum(intValue) + obj.obj.Origin = &enumValue + + return obj +} + +// The path id to match. If the path id is missing then all path ids will match. +// PathId returns a uint32 +func (obj *bgpPrefixIpv4UnicastFilter) PathId() uint32 { + + return *obj.obj.PathId + +} + +// The path id to match. If the path id is missing then all path ids will match. +// PathId returns a uint32 +func (obj *bgpPrefixIpv4UnicastFilter) HasPathId() bool { + return obj.obj.PathId != nil +} + +// The path id to match. If the path id is missing then all path ids will match. +// SetPathId sets the uint32 value in the BgpPrefixIpv4UnicastFilter object +func (obj *bgpPrefixIpv4UnicastFilter) SetPathId(value uint32) BgpPrefixIpv4UnicastFilter { + + obj.obj.PathId = &value + return obj +} + +func (obj *bgpPrefixIpv4UnicastFilter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Addresses != nil { + + err := obj.validateIpv4Slice(obj.Addresses()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpPrefixIpv4UnicastFilter.Addresses")) + } + + } + + if obj.obj.PrefixLength != nil { + + if *obj.obj.PrefixLength > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpPrefixIpv4UnicastFilter.PrefixLength <= 128 but Got %d", *obj.obj.PrefixLength)) + } + + } + +} + +func (obj *bgpPrefixIpv4UnicastFilter) setDefault() { + +} diff --git a/gosnappi/bgp_prefix_ipv4_unicast_state.go b/gosnappi/bgp_prefix_ipv4_unicast_state.go new file mode 100644 index 00000000..5fb8fe97 --- /dev/null +++ b/gosnappi/bgp_prefix_ipv4_unicast_state.go @@ -0,0 +1,804 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpPrefixIpv4UnicastState ***** +type bgpPrefixIpv4UnicastState struct { + validation + obj *otg.BgpPrefixIpv4UnicastState + marshaller marshalBgpPrefixIpv4UnicastState + unMarshaller unMarshalBgpPrefixIpv4UnicastState + communitiesHolder BgpPrefixIpv4UnicastStateResultBgpCommunityIter + extendedCommunitiesHolder BgpPrefixIpv4UnicastStateResultExtendedCommunityIter + asPathHolder ResultBgpAsPath +} + +func NewBgpPrefixIpv4UnicastState() BgpPrefixIpv4UnicastState { + obj := bgpPrefixIpv4UnicastState{obj: &otg.BgpPrefixIpv4UnicastState{}} + obj.setDefault() + return &obj +} + +func (obj *bgpPrefixIpv4UnicastState) msg() *otg.BgpPrefixIpv4UnicastState { + return obj.obj +} + +func (obj *bgpPrefixIpv4UnicastState) setMsg(msg *otg.BgpPrefixIpv4UnicastState) BgpPrefixIpv4UnicastState { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpPrefixIpv4UnicastState struct { + obj *bgpPrefixIpv4UnicastState +} + +type marshalBgpPrefixIpv4UnicastState interface { + // ToProto marshals BgpPrefixIpv4UnicastState to protobuf object *otg.BgpPrefixIpv4UnicastState + ToProto() (*otg.BgpPrefixIpv4UnicastState, error) + // ToPbText marshals BgpPrefixIpv4UnicastState to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpPrefixIpv4UnicastState to YAML text + ToYaml() (string, error) + // ToJson marshals BgpPrefixIpv4UnicastState to JSON text + ToJson() (string, error) +} + +type unMarshalbgpPrefixIpv4UnicastState struct { + obj *bgpPrefixIpv4UnicastState +} + +type unMarshalBgpPrefixIpv4UnicastState interface { + // FromProto unmarshals BgpPrefixIpv4UnicastState from protobuf object *otg.BgpPrefixIpv4UnicastState + FromProto(msg *otg.BgpPrefixIpv4UnicastState) (BgpPrefixIpv4UnicastState, error) + // FromPbText unmarshals BgpPrefixIpv4UnicastState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpPrefixIpv4UnicastState from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpPrefixIpv4UnicastState from JSON text + FromJson(value string) error +} + +func (obj *bgpPrefixIpv4UnicastState) Marshal() marshalBgpPrefixIpv4UnicastState { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpPrefixIpv4UnicastState{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpPrefixIpv4UnicastState) Unmarshal() unMarshalBgpPrefixIpv4UnicastState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpPrefixIpv4UnicastState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpPrefixIpv4UnicastState) ToProto() (*otg.BgpPrefixIpv4UnicastState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpPrefixIpv4UnicastState) FromProto(msg *otg.BgpPrefixIpv4UnicastState) (BgpPrefixIpv4UnicastState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpPrefixIpv4UnicastState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpPrefixIpv4UnicastState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpPrefixIpv4UnicastState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpPrefixIpv4UnicastState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpPrefixIpv4UnicastState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpPrefixIpv4UnicastState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpPrefixIpv4UnicastState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpPrefixIpv4UnicastState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpPrefixIpv4UnicastState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpPrefixIpv4UnicastState) Clone() (BgpPrefixIpv4UnicastState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpPrefixIpv4UnicastState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpPrefixIpv4UnicastState) setNil() { + obj.communitiesHolder = nil + obj.extendedCommunitiesHolder = nil + obj.asPathHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpPrefixIpv4UnicastState is iPv4 unicast prefix. +type BgpPrefixIpv4UnicastState interface { + Validation + // msg marshals BgpPrefixIpv4UnicastState to protobuf object *otg.BgpPrefixIpv4UnicastState + // and doesn't set defaults + msg() *otg.BgpPrefixIpv4UnicastState + // setMsg unmarshals BgpPrefixIpv4UnicastState from protobuf object *otg.BgpPrefixIpv4UnicastState + // and doesn't set defaults + setMsg(*otg.BgpPrefixIpv4UnicastState) BgpPrefixIpv4UnicastState + // provides marshal interface + Marshal() marshalBgpPrefixIpv4UnicastState + // provides unmarshal interface + Unmarshal() unMarshalBgpPrefixIpv4UnicastState + // validate validates BgpPrefixIpv4UnicastState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpPrefixIpv4UnicastState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv4Address returns string, set in BgpPrefixIpv4UnicastState. + Ipv4Address() string + // SetIpv4Address assigns string provided by user to BgpPrefixIpv4UnicastState + SetIpv4Address(value string) BgpPrefixIpv4UnicastState + // HasIpv4Address checks if Ipv4Address has been set in BgpPrefixIpv4UnicastState + HasIpv4Address() bool + // PrefixLength returns uint32, set in BgpPrefixIpv4UnicastState. + PrefixLength() uint32 + // SetPrefixLength assigns uint32 provided by user to BgpPrefixIpv4UnicastState + SetPrefixLength(value uint32) BgpPrefixIpv4UnicastState + // HasPrefixLength checks if PrefixLength has been set in BgpPrefixIpv4UnicastState + HasPrefixLength() bool + // Origin returns BgpPrefixIpv4UnicastStateOriginEnum, set in BgpPrefixIpv4UnicastState + Origin() BgpPrefixIpv4UnicastStateOriginEnum + // SetOrigin assigns BgpPrefixIpv4UnicastStateOriginEnum provided by user to BgpPrefixIpv4UnicastState + SetOrigin(value BgpPrefixIpv4UnicastStateOriginEnum) BgpPrefixIpv4UnicastState + // HasOrigin checks if Origin has been set in BgpPrefixIpv4UnicastState + HasOrigin() bool + // PathId returns uint32, set in BgpPrefixIpv4UnicastState. + PathId() uint32 + // SetPathId assigns uint32 provided by user to BgpPrefixIpv4UnicastState + SetPathId(value uint32) BgpPrefixIpv4UnicastState + // HasPathId checks if PathId has been set in BgpPrefixIpv4UnicastState + HasPathId() bool + // Ipv4NextHop returns string, set in BgpPrefixIpv4UnicastState. + Ipv4NextHop() string + // SetIpv4NextHop assigns string provided by user to BgpPrefixIpv4UnicastState + SetIpv4NextHop(value string) BgpPrefixIpv4UnicastState + // HasIpv4NextHop checks if Ipv4NextHop has been set in BgpPrefixIpv4UnicastState + HasIpv4NextHop() bool + // Ipv6NextHop returns string, set in BgpPrefixIpv4UnicastState. + Ipv6NextHop() string + // SetIpv6NextHop assigns string provided by user to BgpPrefixIpv4UnicastState + SetIpv6NextHop(value string) BgpPrefixIpv4UnicastState + // HasIpv6NextHop checks if Ipv6NextHop has been set in BgpPrefixIpv4UnicastState + HasIpv6NextHop() bool + // Communities returns BgpPrefixIpv4UnicastStateResultBgpCommunityIterIter, set in BgpPrefixIpv4UnicastState + Communities() BgpPrefixIpv4UnicastStateResultBgpCommunityIter + // ExtendedCommunities returns BgpPrefixIpv4UnicastStateResultExtendedCommunityIterIter, set in BgpPrefixIpv4UnicastState + ExtendedCommunities() BgpPrefixIpv4UnicastStateResultExtendedCommunityIter + // AsPath returns ResultBgpAsPath, set in BgpPrefixIpv4UnicastState. + // ResultBgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. + AsPath() ResultBgpAsPath + // SetAsPath assigns ResultBgpAsPath provided by user to BgpPrefixIpv4UnicastState. + // ResultBgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. + SetAsPath(value ResultBgpAsPath) BgpPrefixIpv4UnicastState + // HasAsPath checks if AsPath has been set in BgpPrefixIpv4UnicastState + HasAsPath() bool + // LocalPreference returns uint32, set in BgpPrefixIpv4UnicastState. + LocalPreference() uint32 + // SetLocalPreference assigns uint32 provided by user to BgpPrefixIpv4UnicastState + SetLocalPreference(value uint32) BgpPrefixIpv4UnicastState + // HasLocalPreference checks if LocalPreference has been set in BgpPrefixIpv4UnicastState + HasLocalPreference() bool + // MultiExitDiscriminator returns uint32, set in BgpPrefixIpv4UnicastState. + MultiExitDiscriminator() uint32 + // SetMultiExitDiscriminator assigns uint32 provided by user to BgpPrefixIpv4UnicastState + SetMultiExitDiscriminator(value uint32) BgpPrefixIpv4UnicastState + // HasMultiExitDiscriminator checks if MultiExitDiscriminator has been set in BgpPrefixIpv4UnicastState + HasMultiExitDiscriminator() bool + setNil() +} + +// An IPv4 unicast address +// Ipv4Address returns a string +func (obj *bgpPrefixIpv4UnicastState) Ipv4Address() string { + + return *obj.obj.Ipv4Address + +} + +// An IPv4 unicast address +// Ipv4Address returns a string +func (obj *bgpPrefixIpv4UnicastState) HasIpv4Address() bool { + return obj.obj.Ipv4Address != nil +} + +// An IPv4 unicast address +// SetIpv4Address sets the string value in the BgpPrefixIpv4UnicastState object +func (obj *bgpPrefixIpv4UnicastState) SetIpv4Address(value string) BgpPrefixIpv4UnicastState { + + obj.obj.Ipv4Address = &value + return obj +} + +// The length of the prefix. +// PrefixLength returns a uint32 +func (obj *bgpPrefixIpv4UnicastState) PrefixLength() uint32 { + + return *obj.obj.PrefixLength + +} + +// The length of the prefix. +// PrefixLength returns a uint32 +func (obj *bgpPrefixIpv4UnicastState) HasPrefixLength() bool { + return obj.obj.PrefixLength != nil +} + +// The length of the prefix. +// SetPrefixLength sets the uint32 value in the BgpPrefixIpv4UnicastState object +func (obj *bgpPrefixIpv4UnicastState) SetPrefixLength(value uint32) BgpPrefixIpv4UnicastState { + + obj.obj.PrefixLength = &value + return obj +} + +type BgpPrefixIpv4UnicastStateOriginEnum string + +// Enum of Origin on BgpPrefixIpv4UnicastState +var BgpPrefixIpv4UnicastStateOrigin = struct { + IGP BgpPrefixIpv4UnicastStateOriginEnum + EGP BgpPrefixIpv4UnicastStateOriginEnum + INCOMPLETE BgpPrefixIpv4UnicastStateOriginEnum +}{ + IGP: BgpPrefixIpv4UnicastStateOriginEnum("igp"), + EGP: BgpPrefixIpv4UnicastStateOriginEnum("egp"), + INCOMPLETE: BgpPrefixIpv4UnicastStateOriginEnum("incomplete"), +} + +func (obj *bgpPrefixIpv4UnicastState) Origin() BgpPrefixIpv4UnicastStateOriginEnum { + return BgpPrefixIpv4UnicastStateOriginEnum(obj.obj.Origin.Enum().String()) +} + +// The origin of the prefix. +// Origin returns a string +func (obj *bgpPrefixIpv4UnicastState) HasOrigin() bool { + return obj.obj.Origin != nil +} + +func (obj *bgpPrefixIpv4UnicastState) SetOrigin(value BgpPrefixIpv4UnicastStateOriginEnum) BgpPrefixIpv4UnicastState { + intValue, ok := otg.BgpPrefixIpv4UnicastState_Origin_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpPrefixIpv4UnicastStateOriginEnum", string(value))) + return obj + } + enumValue := otg.BgpPrefixIpv4UnicastState_Origin_Enum(intValue) + obj.obj.Origin = &enumValue + + return obj +} + +// The path id. +// PathId returns a uint32 +func (obj *bgpPrefixIpv4UnicastState) PathId() uint32 { + + return *obj.obj.PathId + +} + +// The path id. +// PathId returns a uint32 +func (obj *bgpPrefixIpv4UnicastState) HasPathId() bool { + return obj.obj.PathId != nil +} + +// The path id. +// SetPathId sets the uint32 value in the BgpPrefixIpv4UnicastState object +func (obj *bgpPrefixIpv4UnicastState) SetPathId(value uint32) BgpPrefixIpv4UnicastState { + + obj.obj.PathId = &value + return obj +} + +// The IPv4 address of the egress interface. +// Ipv4NextHop returns a string +func (obj *bgpPrefixIpv4UnicastState) Ipv4NextHop() string { + + return *obj.obj.Ipv4NextHop + +} + +// The IPv4 address of the egress interface. +// Ipv4NextHop returns a string +func (obj *bgpPrefixIpv4UnicastState) HasIpv4NextHop() bool { + return obj.obj.Ipv4NextHop != nil +} + +// The IPv4 address of the egress interface. +// SetIpv4NextHop sets the string value in the BgpPrefixIpv4UnicastState object +func (obj *bgpPrefixIpv4UnicastState) SetIpv4NextHop(value string) BgpPrefixIpv4UnicastState { + + obj.obj.Ipv4NextHop = &value + return obj +} + +// The IPv6 address of the egress interface. +// Ipv6NextHop returns a string +func (obj *bgpPrefixIpv4UnicastState) Ipv6NextHop() string { + + return *obj.obj.Ipv6NextHop + +} + +// The IPv6 address of the egress interface. +// Ipv6NextHop returns a string +func (obj *bgpPrefixIpv4UnicastState) HasIpv6NextHop() bool { + return obj.obj.Ipv6NextHop != nil +} + +// The IPv6 address of the egress interface. +// SetIpv6NextHop sets the string value in the BgpPrefixIpv4UnicastState object +func (obj *bgpPrefixIpv4UnicastState) SetIpv6NextHop(value string) BgpPrefixIpv4UnicastState { + + obj.obj.Ipv6NextHop = &value + return obj +} + +// Optional community attributes. +// Communities returns a []ResultBgpCommunity +func (obj *bgpPrefixIpv4UnicastState) Communities() BgpPrefixIpv4UnicastStateResultBgpCommunityIter { + if len(obj.obj.Communities) == 0 { + obj.obj.Communities = []*otg.ResultBgpCommunity{} + } + if obj.communitiesHolder == nil { + obj.communitiesHolder = newBgpPrefixIpv4UnicastStateResultBgpCommunityIter(&obj.obj.Communities).setMsg(obj) + } + return obj.communitiesHolder +} + +type bgpPrefixIpv4UnicastStateResultBgpCommunityIter struct { + obj *bgpPrefixIpv4UnicastState + resultBgpCommunitySlice []ResultBgpCommunity + fieldPtr *[]*otg.ResultBgpCommunity +} + +func newBgpPrefixIpv4UnicastStateResultBgpCommunityIter(ptr *[]*otg.ResultBgpCommunity) BgpPrefixIpv4UnicastStateResultBgpCommunityIter { + return &bgpPrefixIpv4UnicastStateResultBgpCommunityIter{fieldPtr: ptr} +} + +type BgpPrefixIpv4UnicastStateResultBgpCommunityIter interface { + setMsg(*bgpPrefixIpv4UnicastState) BgpPrefixIpv4UnicastStateResultBgpCommunityIter + Items() []ResultBgpCommunity + Add() ResultBgpCommunity + Append(items ...ResultBgpCommunity) BgpPrefixIpv4UnicastStateResultBgpCommunityIter + Set(index int, newObj ResultBgpCommunity) BgpPrefixIpv4UnicastStateResultBgpCommunityIter + Clear() BgpPrefixIpv4UnicastStateResultBgpCommunityIter + clearHolderSlice() BgpPrefixIpv4UnicastStateResultBgpCommunityIter + appendHolderSlice(item ResultBgpCommunity) BgpPrefixIpv4UnicastStateResultBgpCommunityIter +} + +func (obj *bgpPrefixIpv4UnicastStateResultBgpCommunityIter) setMsg(msg *bgpPrefixIpv4UnicastState) BgpPrefixIpv4UnicastStateResultBgpCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&resultBgpCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpPrefixIpv4UnicastStateResultBgpCommunityIter) Items() []ResultBgpCommunity { + return obj.resultBgpCommunitySlice +} + +func (obj *bgpPrefixIpv4UnicastStateResultBgpCommunityIter) Add() ResultBgpCommunity { + newObj := &otg.ResultBgpCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &resultBgpCommunity{obj: newObj} + newLibObj.setDefault() + obj.resultBgpCommunitySlice = append(obj.resultBgpCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpPrefixIpv4UnicastStateResultBgpCommunityIter) Append(items ...ResultBgpCommunity) BgpPrefixIpv4UnicastStateResultBgpCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.resultBgpCommunitySlice = append(obj.resultBgpCommunitySlice, item) + } + return obj +} + +func (obj *bgpPrefixIpv4UnicastStateResultBgpCommunityIter) Set(index int, newObj ResultBgpCommunity) BgpPrefixIpv4UnicastStateResultBgpCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.resultBgpCommunitySlice[index] = newObj + return obj +} +func (obj *bgpPrefixIpv4UnicastStateResultBgpCommunityIter) Clear() BgpPrefixIpv4UnicastStateResultBgpCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.ResultBgpCommunity{} + obj.resultBgpCommunitySlice = []ResultBgpCommunity{} + } + return obj +} +func (obj *bgpPrefixIpv4UnicastStateResultBgpCommunityIter) clearHolderSlice() BgpPrefixIpv4UnicastStateResultBgpCommunityIter { + if len(obj.resultBgpCommunitySlice) > 0 { + obj.resultBgpCommunitySlice = []ResultBgpCommunity{} + } + return obj +} +func (obj *bgpPrefixIpv4UnicastStateResultBgpCommunityIter) appendHolderSlice(item ResultBgpCommunity) BgpPrefixIpv4UnicastStateResultBgpCommunityIter { + obj.resultBgpCommunitySlice = append(obj.resultBgpCommunitySlice, item) + return obj +} + +// Optional received Extended Community attributes. Each received Extended Community attribute is available for retrieval in two forms. Support of the 'raw' format in which all 8 bytes (16 hex characters) is always present and available for use. In addition, if supported by the implementation, the Extended Community attribute may also be retrieved in the 'structured' format which is an optional field. +// ExtendedCommunities returns a []ResultExtendedCommunity +func (obj *bgpPrefixIpv4UnicastState) ExtendedCommunities() BgpPrefixIpv4UnicastStateResultExtendedCommunityIter { + if len(obj.obj.ExtendedCommunities) == 0 { + obj.obj.ExtendedCommunities = []*otg.ResultExtendedCommunity{} + } + if obj.extendedCommunitiesHolder == nil { + obj.extendedCommunitiesHolder = newBgpPrefixIpv4UnicastStateResultExtendedCommunityIter(&obj.obj.ExtendedCommunities).setMsg(obj) + } + return obj.extendedCommunitiesHolder +} + +type bgpPrefixIpv4UnicastStateResultExtendedCommunityIter struct { + obj *bgpPrefixIpv4UnicastState + resultExtendedCommunitySlice []ResultExtendedCommunity + fieldPtr *[]*otg.ResultExtendedCommunity +} + +func newBgpPrefixIpv4UnicastStateResultExtendedCommunityIter(ptr *[]*otg.ResultExtendedCommunity) BgpPrefixIpv4UnicastStateResultExtendedCommunityIter { + return &bgpPrefixIpv4UnicastStateResultExtendedCommunityIter{fieldPtr: ptr} +} + +type BgpPrefixIpv4UnicastStateResultExtendedCommunityIter interface { + setMsg(*bgpPrefixIpv4UnicastState) BgpPrefixIpv4UnicastStateResultExtendedCommunityIter + Items() []ResultExtendedCommunity + Add() ResultExtendedCommunity + Append(items ...ResultExtendedCommunity) BgpPrefixIpv4UnicastStateResultExtendedCommunityIter + Set(index int, newObj ResultExtendedCommunity) BgpPrefixIpv4UnicastStateResultExtendedCommunityIter + Clear() BgpPrefixIpv4UnicastStateResultExtendedCommunityIter + clearHolderSlice() BgpPrefixIpv4UnicastStateResultExtendedCommunityIter + appendHolderSlice(item ResultExtendedCommunity) BgpPrefixIpv4UnicastStateResultExtendedCommunityIter +} + +func (obj *bgpPrefixIpv4UnicastStateResultExtendedCommunityIter) setMsg(msg *bgpPrefixIpv4UnicastState) BgpPrefixIpv4UnicastStateResultExtendedCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&resultExtendedCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpPrefixIpv4UnicastStateResultExtendedCommunityIter) Items() []ResultExtendedCommunity { + return obj.resultExtendedCommunitySlice +} + +func (obj *bgpPrefixIpv4UnicastStateResultExtendedCommunityIter) Add() ResultExtendedCommunity { + newObj := &otg.ResultExtendedCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &resultExtendedCommunity{obj: newObj} + newLibObj.setDefault() + obj.resultExtendedCommunitySlice = append(obj.resultExtendedCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpPrefixIpv4UnicastStateResultExtendedCommunityIter) Append(items ...ResultExtendedCommunity) BgpPrefixIpv4UnicastStateResultExtendedCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.resultExtendedCommunitySlice = append(obj.resultExtendedCommunitySlice, item) + } + return obj +} + +func (obj *bgpPrefixIpv4UnicastStateResultExtendedCommunityIter) Set(index int, newObj ResultExtendedCommunity) BgpPrefixIpv4UnicastStateResultExtendedCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.resultExtendedCommunitySlice[index] = newObj + return obj +} +func (obj *bgpPrefixIpv4UnicastStateResultExtendedCommunityIter) Clear() BgpPrefixIpv4UnicastStateResultExtendedCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.ResultExtendedCommunity{} + obj.resultExtendedCommunitySlice = []ResultExtendedCommunity{} + } + return obj +} +func (obj *bgpPrefixIpv4UnicastStateResultExtendedCommunityIter) clearHolderSlice() BgpPrefixIpv4UnicastStateResultExtendedCommunityIter { + if len(obj.resultExtendedCommunitySlice) > 0 { + obj.resultExtendedCommunitySlice = []ResultExtendedCommunity{} + } + return obj +} +func (obj *bgpPrefixIpv4UnicastStateResultExtendedCommunityIter) appendHolderSlice(item ResultExtendedCommunity) BgpPrefixIpv4UnicastStateResultExtendedCommunityIter { + obj.resultExtendedCommunitySlice = append(obj.resultExtendedCommunitySlice, item) + return obj +} + +// description is TBD +// AsPath returns a ResultBgpAsPath +func (obj *bgpPrefixIpv4UnicastState) AsPath() ResultBgpAsPath { + if obj.obj.AsPath == nil { + obj.obj.AsPath = NewResultBgpAsPath().msg() + } + if obj.asPathHolder == nil { + obj.asPathHolder = &resultBgpAsPath{obj: obj.obj.AsPath} + } + return obj.asPathHolder +} + +// description is TBD +// AsPath returns a ResultBgpAsPath +func (obj *bgpPrefixIpv4UnicastState) HasAsPath() bool { + return obj.obj.AsPath != nil +} + +// description is TBD +// SetAsPath sets the ResultBgpAsPath value in the BgpPrefixIpv4UnicastState object +func (obj *bgpPrefixIpv4UnicastState) SetAsPath(value ResultBgpAsPath) BgpPrefixIpv4UnicastState { + + obj.asPathHolder = nil + obj.obj.AsPath = value.msg() + + return obj +} + +// The local preference is a well-known attribute and the value is used for route selection. The route with the highest local preference value is preferred. +// LocalPreference returns a uint32 +func (obj *bgpPrefixIpv4UnicastState) LocalPreference() uint32 { + + return *obj.obj.LocalPreference + +} + +// The local preference is a well-known attribute and the value is used for route selection. The route with the highest local preference value is preferred. +// LocalPreference returns a uint32 +func (obj *bgpPrefixIpv4UnicastState) HasLocalPreference() bool { + return obj.obj.LocalPreference != nil +} + +// The local preference is a well-known attribute and the value is used for route selection. The route with the highest local preference value is preferred. +// SetLocalPreference sets the uint32 value in the BgpPrefixIpv4UnicastState object +func (obj *bgpPrefixIpv4UnicastState) SetLocalPreference(value uint32) BgpPrefixIpv4UnicastState { + + obj.obj.LocalPreference = &value + return obj +} + +// The multi exit discriminator (MED) is an optional non-transitive attribute and the value is used for route selection. The route with the lowest MED value is preferred. +// MultiExitDiscriminator returns a uint32 +func (obj *bgpPrefixIpv4UnicastState) MultiExitDiscriminator() uint32 { + + return *obj.obj.MultiExitDiscriminator + +} + +// The multi exit discriminator (MED) is an optional non-transitive attribute and the value is used for route selection. The route with the lowest MED value is preferred. +// MultiExitDiscriminator returns a uint32 +func (obj *bgpPrefixIpv4UnicastState) HasMultiExitDiscriminator() bool { + return obj.obj.MultiExitDiscriminator != nil +} + +// The multi exit discriminator (MED) is an optional non-transitive attribute and the value is used for route selection. The route with the lowest MED value is preferred. +// SetMultiExitDiscriminator sets the uint32 value in the BgpPrefixIpv4UnicastState object +func (obj *bgpPrefixIpv4UnicastState) SetMultiExitDiscriminator(value uint32) BgpPrefixIpv4UnicastState { + + obj.obj.MultiExitDiscriminator = &value + return obj +} + +func (obj *bgpPrefixIpv4UnicastState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.PrefixLength != nil { + + if *obj.obj.PrefixLength > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpPrefixIpv4UnicastState.PrefixLength <= 128 but Got %d", *obj.obj.PrefixLength)) + } + + } + + if obj.obj.Ipv4NextHop != nil { + + err := obj.validateIpv4(obj.Ipv4NextHop()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpPrefixIpv4UnicastState.Ipv4NextHop")) + } + + } + + if obj.obj.Ipv6NextHop != nil { + + err := obj.validateIpv6(obj.Ipv6NextHop()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpPrefixIpv4UnicastState.Ipv6NextHop")) + } + + } + + if len(obj.obj.Communities) != 0 { + + if set_default { + obj.Communities().clearHolderSlice() + for _, item := range obj.obj.Communities { + obj.Communities().appendHolderSlice(&resultBgpCommunity{obj: item}) + } + } + for _, item := range obj.Communities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.ExtendedCommunities) != 0 { + + if set_default { + obj.ExtendedCommunities().clearHolderSlice() + for _, item := range obj.obj.ExtendedCommunities { + obj.ExtendedCommunities().appendHolderSlice(&resultExtendedCommunity{obj: item}) + } + } + for _, item := range obj.ExtendedCommunities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.AsPath != nil { + + obj.AsPath().validateObj(vObj, set_default) + } + +} + +func (obj *bgpPrefixIpv4UnicastState) setDefault() { + +} diff --git a/gosnappi/bgp_prefix_ipv6_unicast_filter.go b/gosnappi/bgp_prefix_ipv6_unicast_filter.go new file mode 100644 index 00000000..29fc227e --- /dev/null +++ b/gosnappi/bgp_prefix_ipv6_unicast_filter.go @@ -0,0 +1,420 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpPrefixIpv6UnicastFilter ***** +type bgpPrefixIpv6UnicastFilter struct { + validation + obj *otg.BgpPrefixIpv6UnicastFilter + marshaller marshalBgpPrefixIpv6UnicastFilter + unMarshaller unMarshalBgpPrefixIpv6UnicastFilter +} + +func NewBgpPrefixIpv6UnicastFilter() BgpPrefixIpv6UnicastFilter { + obj := bgpPrefixIpv6UnicastFilter{obj: &otg.BgpPrefixIpv6UnicastFilter{}} + obj.setDefault() + return &obj +} + +func (obj *bgpPrefixIpv6UnicastFilter) msg() *otg.BgpPrefixIpv6UnicastFilter { + return obj.obj +} + +func (obj *bgpPrefixIpv6UnicastFilter) setMsg(msg *otg.BgpPrefixIpv6UnicastFilter) BgpPrefixIpv6UnicastFilter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpPrefixIpv6UnicastFilter struct { + obj *bgpPrefixIpv6UnicastFilter +} + +type marshalBgpPrefixIpv6UnicastFilter interface { + // ToProto marshals BgpPrefixIpv6UnicastFilter to protobuf object *otg.BgpPrefixIpv6UnicastFilter + ToProto() (*otg.BgpPrefixIpv6UnicastFilter, error) + // ToPbText marshals BgpPrefixIpv6UnicastFilter to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpPrefixIpv6UnicastFilter to YAML text + ToYaml() (string, error) + // ToJson marshals BgpPrefixIpv6UnicastFilter to JSON text + ToJson() (string, error) +} + +type unMarshalbgpPrefixIpv6UnicastFilter struct { + obj *bgpPrefixIpv6UnicastFilter +} + +type unMarshalBgpPrefixIpv6UnicastFilter interface { + // FromProto unmarshals BgpPrefixIpv6UnicastFilter from protobuf object *otg.BgpPrefixIpv6UnicastFilter + FromProto(msg *otg.BgpPrefixIpv6UnicastFilter) (BgpPrefixIpv6UnicastFilter, error) + // FromPbText unmarshals BgpPrefixIpv6UnicastFilter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpPrefixIpv6UnicastFilter from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpPrefixIpv6UnicastFilter from JSON text + FromJson(value string) error +} + +func (obj *bgpPrefixIpv6UnicastFilter) Marshal() marshalBgpPrefixIpv6UnicastFilter { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpPrefixIpv6UnicastFilter{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpPrefixIpv6UnicastFilter) Unmarshal() unMarshalBgpPrefixIpv6UnicastFilter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpPrefixIpv6UnicastFilter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpPrefixIpv6UnicastFilter) ToProto() (*otg.BgpPrefixIpv6UnicastFilter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpPrefixIpv6UnicastFilter) FromProto(msg *otg.BgpPrefixIpv6UnicastFilter) (BgpPrefixIpv6UnicastFilter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpPrefixIpv6UnicastFilter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpPrefixIpv6UnicastFilter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpPrefixIpv6UnicastFilter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpPrefixIpv6UnicastFilter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpPrefixIpv6UnicastFilter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpPrefixIpv6UnicastFilter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpPrefixIpv6UnicastFilter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpPrefixIpv6UnicastFilter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpPrefixIpv6UnicastFilter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpPrefixIpv6UnicastFilter) Clone() (BgpPrefixIpv6UnicastFilter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpPrefixIpv6UnicastFilter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpPrefixIpv6UnicastFilter is description is TBD +type BgpPrefixIpv6UnicastFilter interface { + Validation + // msg marshals BgpPrefixIpv6UnicastFilter to protobuf object *otg.BgpPrefixIpv6UnicastFilter + // and doesn't set defaults + msg() *otg.BgpPrefixIpv6UnicastFilter + // setMsg unmarshals BgpPrefixIpv6UnicastFilter from protobuf object *otg.BgpPrefixIpv6UnicastFilter + // and doesn't set defaults + setMsg(*otg.BgpPrefixIpv6UnicastFilter) BgpPrefixIpv6UnicastFilter + // provides marshal interface + Marshal() marshalBgpPrefixIpv6UnicastFilter + // provides unmarshal interface + Unmarshal() unMarshalBgpPrefixIpv6UnicastFilter + // validate validates BgpPrefixIpv6UnicastFilter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpPrefixIpv6UnicastFilter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Addresses returns []string, set in BgpPrefixIpv6UnicastFilter. + Addresses() []string + // SetAddresses assigns []string provided by user to BgpPrefixIpv6UnicastFilter + SetAddresses(value []string) BgpPrefixIpv6UnicastFilter + // PrefixLength returns uint32, set in BgpPrefixIpv6UnicastFilter. + PrefixLength() uint32 + // SetPrefixLength assigns uint32 provided by user to BgpPrefixIpv6UnicastFilter + SetPrefixLength(value uint32) BgpPrefixIpv6UnicastFilter + // HasPrefixLength checks if PrefixLength has been set in BgpPrefixIpv6UnicastFilter + HasPrefixLength() bool + // Origin returns BgpPrefixIpv6UnicastFilterOriginEnum, set in BgpPrefixIpv6UnicastFilter + Origin() BgpPrefixIpv6UnicastFilterOriginEnum + // SetOrigin assigns BgpPrefixIpv6UnicastFilterOriginEnum provided by user to BgpPrefixIpv6UnicastFilter + SetOrigin(value BgpPrefixIpv6UnicastFilterOriginEnum) BgpPrefixIpv6UnicastFilter + // HasOrigin checks if Origin has been set in BgpPrefixIpv6UnicastFilter + HasOrigin() bool + // PathId returns uint32, set in BgpPrefixIpv6UnicastFilter. + PathId() uint32 + // SetPathId assigns uint32 provided by user to BgpPrefixIpv6UnicastFilter + SetPathId(value uint32) BgpPrefixIpv6UnicastFilter + // HasPathId checks if PathId has been set in BgpPrefixIpv6UnicastFilter + HasPathId() bool +} + +// The addresses to match. If the addresses property is missing or empty then all addresses will match. +// Addresses returns a []string +func (obj *bgpPrefixIpv6UnicastFilter) Addresses() []string { + if obj.obj.Addresses == nil { + obj.obj.Addresses = make([]string, 0) + } + return obj.obj.Addresses +} + +// The addresses to match. If the addresses property is missing or empty then all addresses will match. +// SetAddresses sets the []string value in the BgpPrefixIpv6UnicastFilter object +func (obj *bgpPrefixIpv6UnicastFilter) SetAddresses(value []string) BgpPrefixIpv6UnicastFilter { + + if obj.obj.Addresses == nil { + obj.obj.Addresses = make([]string, 0) + } + obj.obj.Addresses = value + + return obj +} + +// The prefix length to match. If the prefix length is missing then all prefix lengths will match. +// PrefixLength returns a uint32 +func (obj *bgpPrefixIpv6UnicastFilter) PrefixLength() uint32 { + + return *obj.obj.PrefixLength + +} + +// The prefix length to match. If the prefix length is missing then all prefix lengths will match. +// PrefixLength returns a uint32 +func (obj *bgpPrefixIpv6UnicastFilter) HasPrefixLength() bool { + return obj.obj.PrefixLength != nil +} + +// The prefix length to match. If the prefix length is missing then all prefix lengths will match. +// SetPrefixLength sets the uint32 value in the BgpPrefixIpv6UnicastFilter object +func (obj *bgpPrefixIpv6UnicastFilter) SetPrefixLength(value uint32) BgpPrefixIpv6UnicastFilter { + + obj.obj.PrefixLength = &value + return obj +} + +type BgpPrefixIpv6UnicastFilterOriginEnum string + +// Enum of Origin on BgpPrefixIpv6UnicastFilter +var BgpPrefixIpv6UnicastFilterOrigin = struct { + IGP BgpPrefixIpv6UnicastFilterOriginEnum + EGP BgpPrefixIpv6UnicastFilterOriginEnum + INCOMPLETE BgpPrefixIpv6UnicastFilterOriginEnum +}{ + IGP: BgpPrefixIpv6UnicastFilterOriginEnum("igp"), + EGP: BgpPrefixIpv6UnicastFilterOriginEnum("egp"), + INCOMPLETE: BgpPrefixIpv6UnicastFilterOriginEnum("incomplete"), +} + +func (obj *bgpPrefixIpv6UnicastFilter) Origin() BgpPrefixIpv6UnicastFilterOriginEnum { + return BgpPrefixIpv6UnicastFilterOriginEnum(obj.obj.Origin.Enum().String()) +} + +// The origin to match. If the origin is missing then all origins will match. +// Origin returns a string +func (obj *bgpPrefixIpv6UnicastFilter) HasOrigin() bool { + return obj.obj.Origin != nil +} + +func (obj *bgpPrefixIpv6UnicastFilter) SetOrigin(value BgpPrefixIpv6UnicastFilterOriginEnum) BgpPrefixIpv6UnicastFilter { + intValue, ok := otg.BgpPrefixIpv6UnicastFilter_Origin_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpPrefixIpv6UnicastFilterOriginEnum", string(value))) + return obj + } + enumValue := otg.BgpPrefixIpv6UnicastFilter_Origin_Enum(intValue) + obj.obj.Origin = &enumValue + + return obj +} + +// The path id to match. If the path id is missing then all path ids will match. +// PathId returns a uint32 +func (obj *bgpPrefixIpv6UnicastFilter) PathId() uint32 { + + return *obj.obj.PathId + +} + +// The path id to match. If the path id is missing then all path ids will match. +// PathId returns a uint32 +func (obj *bgpPrefixIpv6UnicastFilter) HasPathId() bool { + return obj.obj.PathId != nil +} + +// The path id to match. If the path id is missing then all path ids will match. +// SetPathId sets the uint32 value in the BgpPrefixIpv6UnicastFilter object +func (obj *bgpPrefixIpv6UnicastFilter) SetPathId(value uint32) BgpPrefixIpv6UnicastFilter { + + obj.obj.PathId = &value + return obj +} + +func (obj *bgpPrefixIpv6UnicastFilter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Addresses != nil { + + err := obj.validateIpv6Slice(obj.Addresses()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpPrefixIpv6UnicastFilter.Addresses")) + } + + } + + if obj.obj.PrefixLength != nil { + + if *obj.obj.PrefixLength > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpPrefixIpv6UnicastFilter.PrefixLength <= 128 but Got %d", *obj.obj.PrefixLength)) + } + + } + +} + +func (obj *bgpPrefixIpv6UnicastFilter) setDefault() { + +} diff --git a/gosnappi/bgp_prefix_ipv6_unicast_state.go b/gosnappi/bgp_prefix_ipv6_unicast_state.go new file mode 100644 index 00000000..d8163ea7 --- /dev/null +++ b/gosnappi/bgp_prefix_ipv6_unicast_state.go @@ -0,0 +1,804 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpPrefixIpv6UnicastState ***** +type bgpPrefixIpv6UnicastState struct { + validation + obj *otg.BgpPrefixIpv6UnicastState + marshaller marshalBgpPrefixIpv6UnicastState + unMarshaller unMarshalBgpPrefixIpv6UnicastState + communitiesHolder BgpPrefixIpv6UnicastStateResultBgpCommunityIter + extendedCommunitiesHolder BgpPrefixIpv6UnicastStateResultExtendedCommunityIter + asPathHolder ResultBgpAsPath +} + +func NewBgpPrefixIpv6UnicastState() BgpPrefixIpv6UnicastState { + obj := bgpPrefixIpv6UnicastState{obj: &otg.BgpPrefixIpv6UnicastState{}} + obj.setDefault() + return &obj +} + +func (obj *bgpPrefixIpv6UnicastState) msg() *otg.BgpPrefixIpv6UnicastState { + return obj.obj +} + +func (obj *bgpPrefixIpv6UnicastState) setMsg(msg *otg.BgpPrefixIpv6UnicastState) BgpPrefixIpv6UnicastState { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpPrefixIpv6UnicastState struct { + obj *bgpPrefixIpv6UnicastState +} + +type marshalBgpPrefixIpv6UnicastState interface { + // ToProto marshals BgpPrefixIpv6UnicastState to protobuf object *otg.BgpPrefixIpv6UnicastState + ToProto() (*otg.BgpPrefixIpv6UnicastState, error) + // ToPbText marshals BgpPrefixIpv6UnicastState to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpPrefixIpv6UnicastState to YAML text + ToYaml() (string, error) + // ToJson marshals BgpPrefixIpv6UnicastState to JSON text + ToJson() (string, error) +} + +type unMarshalbgpPrefixIpv6UnicastState struct { + obj *bgpPrefixIpv6UnicastState +} + +type unMarshalBgpPrefixIpv6UnicastState interface { + // FromProto unmarshals BgpPrefixIpv6UnicastState from protobuf object *otg.BgpPrefixIpv6UnicastState + FromProto(msg *otg.BgpPrefixIpv6UnicastState) (BgpPrefixIpv6UnicastState, error) + // FromPbText unmarshals BgpPrefixIpv6UnicastState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpPrefixIpv6UnicastState from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpPrefixIpv6UnicastState from JSON text + FromJson(value string) error +} + +func (obj *bgpPrefixIpv6UnicastState) Marshal() marshalBgpPrefixIpv6UnicastState { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpPrefixIpv6UnicastState{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpPrefixIpv6UnicastState) Unmarshal() unMarshalBgpPrefixIpv6UnicastState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpPrefixIpv6UnicastState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpPrefixIpv6UnicastState) ToProto() (*otg.BgpPrefixIpv6UnicastState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpPrefixIpv6UnicastState) FromProto(msg *otg.BgpPrefixIpv6UnicastState) (BgpPrefixIpv6UnicastState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpPrefixIpv6UnicastState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpPrefixIpv6UnicastState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpPrefixIpv6UnicastState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpPrefixIpv6UnicastState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpPrefixIpv6UnicastState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpPrefixIpv6UnicastState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpPrefixIpv6UnicastState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpPrefixIpv6UnicastState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpPrefixIpv6UnicastState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpPrefixIpv6UnicastState) Clone() (BgpPrefixIpv6UnicastState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpPrefixIpv6UnicastState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpPrefixIpv6UnicastState) setNil() { + obj.communitiesHolder = nil + obj.extendedCommunitiesHolder = nil + obj.asPathHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpPrefixIpv6UnicastState is iPv6 unicast prefix. +type BgpPrefixIpv6UnicastState interface { + Validation + // msg marshals BgpPrefixIpv6UnicastState to protobuf object *otg.BgpPrefixIpv6UnicastState + // and doesn't set defaults + msg() *otg.BgpPrefixIpv6UnicastState + // setMsg unmarshals BgpPrefixIpv6UnicastState from protobuf object *otg.BgpPrefixIpv6UnicastState + // and doesn't set defaults + setMsg(*otg.BgpPrefixIpv6UnicastState) BgpPrefixIpv6UnicastState + // provides marshal interface + Marshal() marshalBgpPrefixIpv6UnicastState + // provides unmarshal interface + Unmarshal() unMarshalBgpPrefixIpv6UnicastState + // validate validates BgpPrefixIpv6UnicastState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpPrefixIpv6UnicastState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv6Address returns string, set in BgpPrefixIpv6UnicastState. + Ipv6Address() string + // SetIpv6Address assigns string provided by user to BgpPrefixIpv6UnicastState + SetIpv6Address(value string) BgpPrefixIpv6UnicastState + // HasIpv6Address checks if Ipv6Address has been set in BgpPrefixIpv6UnicastState + HasIpv6Address() bool + // PrefixLength returns uint32, set in BgpPrefixIpv6UnicastState. + PrefixLength() uint32 + // SetPrefixLength assigns uint32 provided by user to BgpPrefixIpv6UnicastState + SetPrefixLength(value uint32) BgpPrefixIpv6UnicastState + // HasPrefixLength checks if PrefixLength has been set in BgpPrefixIpv6UnicastState + HasPrefixLength() bool + // Origin returns BgpPrefixIpv6UnicastStateOriginEnum, set in BgpPrefixIpv6UnicastState + Origin() BgpPrefixIpv6UnicastStateOriginEnum + // SetOrigin assigns BgpPrefixIpv6UnicastStateOriginEnum provided by user to BgpPrefixIpv6UnicastState + SetOrigin(value BgpPrefixIpv6UnicastStateOriginEnum) BgpPrefixIpv6UnicastState + // HasOrigin checks if Origin has been set in BgpPrefixIpv6UnicastState + HasOrigin() bool + // PathId returns uint32, set in BgpPrefixIpv6UnicastState. + PathId() uint32 + // SetPathId assigns uint32 provided by user to BgpPrefixIpv6UnicastState + SetPathId(value uint32) BgpPrefixIpv6UnicastState + // HasPathId checks if PathId has been set in BgpPrefixIpv6UnicastState + HasPathId() bool + // Ipv4NextHop returns string, set in BgpPrefixIpv6UnicastState. + Ipv4NextHop() string + // SetIpv4NextHop assigns string provided by user to BgpPrefixIpv6UnicastState + SetIpv4NextHop(value string) BgpPrefixIpv6UnicastState + // HasIpv4NextHop checks if Ipv4NextHop has been set in BgpPrefixIpv6UnicastState + HasIpv4NextHop() bool + // Ipv6NextHop returns string, set in BgpPrefixIpv6UnicastState. + Ipv6NextHop() string + // SetIpv6NextHop assigns string provided by user to BgpPrefixIpv6UnicastState + SetIpv6NextHop(value string) BgpPrefixIpv6UnicastState + // HasIpv6NextHop checks if Ipv6NextHop has been set in BgpPrefixIpv6UnicastState + HasIpv6NextHop() bool + // Communities returns BgpPrefixIpv6UnicastStateResultBgpCommunityIterIter, set in BgpPrefixIpv6UnicastState + Communities() BgpPrefixIpv6UnicastStateResultBgpCommunityIter + // ExtendedCommunities returns BgpPrefixIpv6UnicastStateResultExtendedCommunityIterIter, set in BgpPrefixIpv6UnicastState + ExtendedCommunities() BgpPrefixIpv6UnicastStateResultExtendedCommunityIter + // AsPath returns ResultBgpAsPath, set in BgpPrefixIpv6UnicastState. + // ResultBgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. + AsPath() ResultBgpAsPath + // SetAsPath assigns ResultBgpAsPath provided by user to BgpPrefixIpv6UnicastState. + // ResultBgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. + SetAsPath(value ResultBgpAsPath) BgpPrefixIpv6UnicastState + // HasAsPath checks if AsPath has been set in BgpPrefixIpv6UnicastState + HasAsPath() bool + // LocalPreference returns uint32, set in BgpPrefixIpv6UnicastState. + LocalPreference() uint32 + // SetLocalPreference assigns uint32 provided by user to BgpPrefixIpv6UnicastState + SetLocalPreference(value uint32) BgpPrefixIpv6UnicastState + // HasLocalPreference checks if LocalPreference has been set in BgpPrefixIpv6UnicastState + HasLocalPreference() bool + // MultiExitDiscriminator returns uint32, set in BgpPrefixIpv6UnicastState. + MultiExitDiscriminator() uint32 + // SetMultiExitDiscriminator assigns uint32 provided by user to BgpPrefixIpv6UnicastState + SetMultiExitDiscriminator(value uint32) BgpPrefixIpv6UnicastState + // HasMultiExitDiscriminator checks if MultiExitDiscriminator has been set in BgpPrefixIpv6UnicastState + HasMultiExitDiscriminator() bool + setNil() +} + +// An IPv6 unicast address +// Ipv6Address returns a string +func (obj *bgpPrefixIpv6UnicastState) Ipv6Address() string { + + return *obj.obj.Ipv6Address + +} + +// An IPv6 unicast address +// Ipv6Address returns a string +func (obj *bgpPrefixIpv6UnicastState) HasIpv6Address() bool { + return obj.obj.Ipv6Address != nil +} + +// An IPv6 unicast address +// SetIpv6Address sets the string value in the BgpPrefixIpv6UnicastState object +func (obj *bgpPrefixIpv6UnicastState) SetIpv6Address(value string) BgpPrefixIpv6UnicastState { + + obj.obj.Ipv6Address = &value + return obj +} + +// The length of the prefix. +// PrefixLength returns a uint32 +func (obj *bgpPrefixIpv6UnicastState) PrefixLength() uint32 { + + return *obj.obj.PrefixLength + +} + +// The length of the prefix. +// PrefixLength returns a uint32 +func (obj *bgpPrefixIpv6UnicastState) HasPrefixLength() bool { + return obj.obj.PrefixLength != nil +} + +// The length of the prefix. +// SetPrefixLength sets the uint32 value in the BgpPrefixIpv6UnicastState object +func (obj *bgpPrefixIpv6UnicastState) SetPrefixLength(value uint32) BgpPrefixIpv6UnicastState { + + obj.obj.PrefixLength = &value + return obj +} + +type BgpPrefixIpv6UnicastStateOriginEnum string + +// Enum of Origin on BgpPrefixIpv6UnicastState +var BgpPrefixIpv6UnicastStateOrigin = struct { + IGP BgpPrefixIpv6UnicastStateOriginEnum + EGP BgpPrefixIpv6UnicastStateOriginEnum + INCOMPLETE BgpPrefixIpv6UnicastStateOriginEnum +}{ + IGP: BgpPrefixIpv6UnicastStateOriginEnum("igp"), + EGP: BgpPrefixIpv6UnicastStateOriginEnum("egp"), + INCOMPLETE: BgpPrefixIpv6UnicastStateOriginEnum("incomplete"), +} + +func (obj *bgpPrefixIpv6UnicastState) Origin() BgpPrefixIpv6UnicastStateOriginEnum { + return BgpPrefixIpv6UnicastStateOriginEnum(obj.obj.Origin.Enum().String()) +} + +// The origin of the prefix. +// Origin returns a string +func (obj *bgpPrefixIpv6UnicastState) HasOrigin() bool { + return obj.obj.Origin != nil +} + +func (obj *bgpPrefixIpv6UnicastState) SetOrigin(value BgpPrefixIpv6UnicastStateOriginEnum) BgpPrefixIpv6UnicastState { + intValue, ok := otg.BgpPrefixIpv6UnicastState_Origin_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpPrefixIpv6UnicastStateOriginEnum", string(value))) + return obj + } + enumValue := otg.BgpPrefixIpv6UnicastState_Origin_Enum(intValue) + obj.obj.Origin = &enumValue + + return obj +} + +// The path id. +// PathId returns a uint32 +func (obj *bgpPrefixIpv6UnicastState) PathId() uint32 { + + return *obj.obj.PathId + +} + +// The path id. +// PathId returns a uint32 +func (obj *bgpPrefixIpv6UnicastState) HasPathId() bool { + return obj.obj.PathId != nil +} + +// The path id. +// SetPathId sets the uint32 value in the BgpPrefixIpv6UnicastState object +func (obj *bgpPrefixIpv6UnicastState) SetPathId(value uint32) BgpPrefixIpv6UnicastState { + + obj.obj.PathId = &value + return obj +} + +// The IPv4 address of the egress interface. +// Ipv4NextHop returns a string +func (obj *bgpPrefixIpv6UnicastState) Ipv4NextHop() string { + + return *obj.obj.Ipv4NextHop + +} + +// The IPv4 address of the egress interface. +// Ipv4NextHop returns a string +func (obj *bgpPrefixIpv6UnicastState) HasIpv4NextHop() bool { + return obj.obj.Ipv4NextHop != nil +} + +// The IPv4 address of the egress interface. +// SetIpv4NextHop sets the string value in the BgpPrefixIpv6UnicastState object +func (obj *bgpPrefixIpv6UnicastState) SetIpv4NextHop(value string) BgpPrefixIpv6UnicastState { + + obj.obj.Ipv4NextHop = &value + return obj +} + +// The IPv6 address of the egress interface. +// Ipv6NextHop returns a string +func (obj *bgpPrefixIpv6UnicastState) Ipv6NextHop() string { + + return *obj.obj.Ipv6NextHop + +} + +// The IPv6 address of the egress interface. +// Ipv6NextHop returns a string +func (obj *bgpPrefixIpv6UnicastState) HasIpv6NextHop() bool { + return obj.obj.Ipv6NextHop != nil +} + +// The IPv6 address of the egress interface. +// SetIpv6NextHop sets the string value in the BgpPrefixIpv6UnicastState object +func (obj *bgpPrefixIpv6UnicastState) SetIpv6NextHop(value string) BgpPrefixIpv6UnicastState { + + obj.obj.Ipv6NextHop = &value + return obj +} + +// Optional community attributes. +// Communities returns a []ResultBgpCommunity +func (obj *bgpPrefixIpv6UnicastState) Communities() BgpPrefixIpv6UnicastStateResultBgpCommunityIter { + if len(obj.obj.Communities) == 0 { + obj.obj.Communities = []*otg.ResultBgpCommunity{} + } + if obj.communitiesHolder == nil { + obj.communitiesHolder = newBgpPrefixIpv6UnicastStateResultBgpCommunityIter(&obj.obj.Communities).setMsg(obj) + } + return obj.communitiesHolder +} + +type bgpPrefixIpv6UnicastStateResultBgpCommunityIter struct { + obj *bgpPrefixIpv6UnicastState + resultBgpCommunitySlice []ResultBgpCommunity + fieldPtr *[]*otg.ResultBgpCommunity +} + +func newBgpPrefixIpv6UnicastStateResultBgpCommunityIter(ptr *[]*otg.ResultBgpCommunity) BgpPrefixIpv6UnicastStateResultBgpCommunityIter { + return &bgpPrefixIpv6UnicastStateResultBgpCommunityIter{fieldPtr: ptr} +} + +type BgpPrefixIpv6UnicastStateResultBgpCommunityIter interface { + setMsg(*bgpPrefixIpv6UnicastState) BgpPrefixIpv6UnicastStateResultBgpCommunityIter + Items() []ResultBgpCommunity + Add() ResultBgpCommunity + Append(items ...ResultBgpCommunity) BgpPrefixIpv6UnicastStateResultBgpCommunityIter + Set(index int, newObj ResultBgpCommunity) BgpPrefixIpv6UnicastStateResultBgpCommunityIter + Clear() BgpPrefixIpv6UnicastStateResultBgpCommunityIter + clearHolderSlice() BgpPrefixIpv6UnicastStateResultBgpCommunityIter + appendHolderSlice(item ResultBgpCommunity) BgpPrefixIpv6UnicastStateResultBgpCommunityIter +} + +func (obj *bgpPrefixIpv6UnicastStateResultBgpCommunityIter) setMsg(msg *bgpPrefixIpv6UnicastState) BgpPrefixIpv6UnicastStateResultBgpCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&resultBgpCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpPrefixIpv6UnicastStateResultBgpCommunityIter) Items() []ResultBgpCommunity { + return obj.resultBgpCommunitySlice +} + +func (obj *bgpPrefixIpv6UnicastStateResultBgpCommunityIter) Add() ResultBgpCommunity { + newObj := &otg.ResultBgpCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &resultBgpCommunity{obj: newObj} + newLibObj.setDefault() + obj.resultBgpCommunitySlice = append(obj.resultBgpCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpPrefixIpv6UnicastStateResultBgpCommunityIter) Append(items ...ResultBgpCommunity) BgpPrefixIpv6UnicastStateResultBgpCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.resultBgpCommunitySlice = append(obj.resultBgpCommunitySlice, item) + } + return obj +} + +func (obj *bgpPrefixIpv6UnicastStateResultBgpCommunityIter) Set(index int, newObj ResultBgpCommunity) BgpPrefixIpv6UnicastStateResultBgpCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.resultBgpCommunitySlice[index] = newObj + return obj +} +func (obj *bgpPrefixIpv6UnicastStateResultBgpCommunityIter) Clear() BgpPrefixIpv6UnicastStateResultBgpCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.ResultBgpCommunity{} + obj.resultBgpCommunitySlice = []ResultBgpCommunity{} + } + return obj +} +func (obj *bgpPrefixIpv6UnicastStateResultBgpCommunityIter) clearHolderSlice() BgpPrefixIpv6UnicastStateResultBgpCommunityIter { + if len(obj.resultBgpCommunitySlice) > 0 { + obj.resultBgpCommunitySlice = []ResultBgpCommunity{} + } + return obj +} +func (obj *bgpPrefixIpv6UnicastStateResultBgpCommunityIter) appendHolderSlice(item ResultBgpCommunity) BgpPrefixIpv6UnicastStateResultBgpCommunityIter { + obj.resultBgpCommunitySlice = append(obj.resultBgpCommunitySlice, item) + return obj +} + +// Optional received Extended Community attributes. Each received Extended Community attribute is available for retrieval in two forms. Support of the 'raw' format in which all 8 bytes (16 hex characters) is always present and available for use. In addition, if supported by the implementation, the Extended Community attribute may also be retrieved in the 'structured' format which is an optional field. +// ExtendedCommunities returns a []ResultExtendedCommunity +func (obj *bgpPrefixIpv6UnicastState) ExtendedCommunities() BgpPrefixIpv6UnicastStateResultExtendedCommunityIter { + if len(obj.obj.ExtendedCommunities) == 0 { + obj.obj.ExtendedCommunities = []*otg.ResultExtendedCommunity{} + } + if obj.extendedCommunitiesHolder == nil { + obj.extendedCommunitiesHolder = newBgpPrefixIpv6UnicastStateResultExtendedCommunityIter(&obj.obj.ExtendedCommunities).setMsg(obj) + } + return obj.extendedCommunitiesHolder +} + +type bgpPrefixIpv6UnicastStateResultExtendedCommunityIter struct { + obj *bgpPrefixIpv6UnicastState + resultExtendedCommunitySlice []ResultExtendedCommunity + fieldPtr *[]*otg.ResultExtendedCommunity +} + +func newBgpPrefixIpv6UnicastStateResultExtendedCommunityIter(ptr *[]*otg.ResultExtendedCommunity) BgpPrefixIpv6UnicastStateResultExtendedCommunityIter { + return &bgpPrefixIpv6UnicastStateResultExtendedCommunityIter{fieldPtr: ptr} +} + +type BgpPrefixIpv6UnicastStateResultExtendedCommunityIter interface { + setMsg(*bgpPrefixIpv6UnicastState) BgpPrefixIpv6UnicastStateResultExtendedCommunityIter + Items() []ResultExtendedCommunity + Add() ResultExtendedCommunity + Append(items ...ResultExtendedCommunity) BgpPrefixIpv6UnicastStateResultExtendedCommunityIter + Set(index int, newObj ResultExtendedCommunity) BgpPrefixIpv6UnicastStateResultExtendedCommunityIter + Clear() BgpPrefixIpv6UnicastStateResultExtendedCommunityIter + clearHolderSlice() BgpPrefixIpv6UnicastStateResultExtendedCommunityIter + appendHolderSlice(item ResultExtendedCommunity) BgpPrefixIpv6UnicastStateResultExtendedCommunityIter +} + +func (obj *bgpPrefixIpv6UnicastStateResultExtendedCommunityIter) setMsg(msg *bgpPrefixIpv6UnicastState) BgpPrefixIpv6UnicastStateResultExtendedCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&resultExtendedCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpPrefixIpv6UnicastStateResultExtendedCommunityIter) Items() []ResultExtendedCommunity { + return obj.resultExtendedCommunitySlice +} + +func (obj *bgpPrefixIpv6UnicastStateResultExtendedCommunityIter) Add() ResultExtendedCommunity { + newObj := &otg.ResultExtendedCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &resultExtendedCommunity{obj: newObj} + newLibObj.setDefault() + obj.resultExtendedCommunitySlice = append(obj.resultExtendedCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpPrefixIpv6UnicastStateResultExtendedCommunityIter) Append(items ...ResultExtendedCommunity) BgpPrefixIpv6UnicastStateResultExtendedCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.resultExtendedCommunitySlice = append(obj.resultExtendedCommunitySlice, item) + } + return obj +} + +func (obj *bgpPrefixIpv6UnicastStateResultExtendedCommunityIter) Set(index int, newObj ResultExtendedCommunity) BgpPrefixIpv6UnicastStateResultExtendedCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.resultExtendedCommunitySlice[index] = newObj + return obj +} +func (obj *bgpPrefixIpv6UnicastStateResultExtendedCommunityIter) Clear() BgpPrefixIpv6UnicastStateResultExtendedCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.ResultExtendedCommunity{} + obj.resultExtendedCommunitySlice = []ResultExtendedCommunity{} + } + return obj +} +func (obj *bgpPrefixIpv6UnicastStateResultExtendedCommunityIter) clearHolderSlice() BgpPrefixIpv6UnicastStateResultExtendedCommunityIter { + if len(obj.resultExtendedCommunitySlice) > 0 { + obj.resultExtendedCommunitySlice = []ResultExtendedCommunity{} + } + return obj +} +func (obj *bgpPrefixIpv6UnicastStateResultExtendedCommunityIter) appendHolderSlice(item ResultExtendedCommunity) BgpPrefixIpv6UnicastStateResultExtendedCommunityIter { + obj.resultExtendedCommunitySlice = append(obj.resultExtendedCommunitySlice, item) + return obj +} + +// description is TBD +// AsPath returns a ResultBgpAsPath +func (obj *bgpPrefixIpv6UnicastState) AsPath() ResultBgpAsPath { + if obj.obj.AsPath == nil { + obj.obj.AsPath = NewResultBgpAsPath().msg() + } + if obj.asPathHolder == nil { + obj.asPathHolder = &resultBgpAsPath{obj: obj.obj.AsPath} + } + return obj.asPathHolder +} + +// description is TBD +// AsPath returns a ResultBgpAsPath +func (obj *bgpPrefixIpv6UnicastState) HasAsPath() bool { + return obj.obj.AsPath != nil +} + +// description is TBD +// SetAsPath sets the ResultBgpAsPath value in the BgpPrefixIpv6UnicastState object +func (obj *bgpPrefixIpv6UnicastState) SetAsPath(value ResultBgpAsPath) BgpPrefixIpv6UnicastState { + + obj.asPathHolder = nil + obj.obj.AsPath = value.msg() + + return obj +} + +// The local preference is a well-known attribute and the value is used for route selection. The route with the highest local preference value is preferred. +// LocalPreference returns a uint32 +func (obj *bgpPrefixIpv6UnicastState) LocalPreference() uint32 { + + return *obj.obj.LocalPreference + +} + +// The local preference is a well-known attribute and the value is used for route selection. The route with the highest local preference value is preferred. +// LocalPreference returns a uint32 +func (obj *bgpPrefixIpv6UnicastState) HasLocalPreference() bool { + return obj.obj.LocalPreference != nil +} + +// The local preference is a well-known attribute and the value is used for route selection. The route with the highest local preference value is preferred. +// SetLocalPreference sets the uint32 value in the BgpPrefixIpv6UnicastState object +func (obj *bgpPrefixIpv6UnicastState) SetLocalPreference(value uint32) BgpPrefixIpv6UnicastState { + + obj.obj.LocalPreference = &value + return obj +} + +// The multi exit discriminator (MED) is an optional non-transitive attribute and the value is used for route selection. The route with the lowest MED value is preferred. +// MultiExitDiscriminator returns a uint32 +func (obj *bgpPrefixIpv6UnicastState) MultiExitDiscriminator() uint32 { + + return *obj.obj.MultiExitDiscriminator + +} + +// The multi exit discriminator (MED) is an optional non-transitive attribute and the value is used for route selection. The route with the lowest MED value is preferred. +// MultiExitDiscriminator returns a uint32 +func (obj *bgpPrefixIpv6UnicastState) HasMultiExitDiscriminator() bool { + return obj.obj.MultiExitDiscriminator != nil +} + +// The multi exit discriminator (MED) is an optional non-transitive attribute and the value is used for route selection. The route with the lowest MED value is preferred. +// SetMultiExitDiscriminator sets the uint32 value in the BgpPrefixIpv6UnicastState object +func (obj *bgpPrefixIpv6UnicastState) SetMultiExitDiscriminator(value uint32) BgpPrefixIpv6UnicastState { + + obj.obj.MultiExitDiscriminator = &value + return obj +} + +func (obj *bgpPrefixIpv6UnicastState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.PrefixLength != nil { + + if *obj.obj.PrefixLength > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpPrefixIpv6UnicastState.PrefixLength <= 128 but Got %d", *obj.obj.PrefixLength)) + } + + } + + if obj.obj.Ipv4NextHop != nil { + + err := obj.validateIpv4(obj.Ipv4NextHop()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpPrefixIpv6UnicastState.Ipv4NextHop")) + } + + } + + if obj.obj.Ipv6NextHop != nil { + + err := obj.validateIpv6(obj.Ipv6NextHop()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpPrefixIpv6UnicastState.Ipv6NextHop")) + } + + } + + if len(obj.obj.Communities) != 0 { + + if set_default { + obj.Communities().clearHolderSlice() + for _, item := range obj.obj.Communities { + obj.Communities().appendHolderSlice(&resultBgpCommunity{obj: item}) + } + } + for _, item := range obj.Communities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.ExtendedCommunities) != 0 { + + if set_default { + obj.ExtendedCommunities().clearHolderSlice() + for _, item := range obj.obj.ExtendedCommunities { + obj.ExtendedCommunities().appendHolderSlice(&resultExtendedCommunity{obj: item}) + } + } + for _, item := range obj.ExtendedCommunities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.AsPath != nil { + + obj.AsPath().validateObj(vObj, set_default) + } + +} + +func (obj *bgpPrefixIpv6UnicastState) setDefault() { + +} diff --git a/gosnappi/bgp_prefix_state_request.go b/gosnappi/bgp_prefix_state_request.go new file mode 100644 index 00000000..b18357ca --- /dev/null +++ b/gosnappi/bgp_prefix_state_request.go @@ -0,0 +1,574 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpPrefixStateRequest ***** +type bgpPrefixStateRequest struct { + validation + obj *otg.BgpPrefixStateRequest + marshaller marshalBgpPrefixStateRequest + unMarshaller unMarshalBgpPrefixStateRequest + ipv4UnicastFiltersHolder BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter + ipv6UnicastFiltersHolder BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter +} + +func NewBgpPrefixStateRequest() BgpPrefixStateRequest { + obj := bgpPrefixStateRequest{obj: &otg.BgpPrefixStateRequest{}} + obj.setDefault() + return &obj +} + +func (obj *bgpPrefixStateRequest) msg() *otg.BgpPrefixStateRequest { + return obj.obj +} + +func (obj *bgpPrefixStateRequest) setMsg(msg *otg.BgpPrefixStateRequest) BgpPrefixStateRequest { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpPrefixStateRequest struct { + obj *bgpPrefixStateRequest +} + +type marshalBgpPrefixStateRequest interface { + // ToProto marshals BgpPrefixStateRequest to protobuf object *otg.BgpPrefixStateRequest + ToProto() (*otg.BgpPrefixStateRequest, error) + // ToPbText marshals BgpPrefixStateRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpPrefixStateRequest to YAML text + ToYaml() (string, error) + // ToJson marshals BgpPrefixStateRequest to JSON text + ToJson() (string, error) +} + +type unMarshalbgpPrefixStateRequest struct { + obj *bgpPrefixStateRequest +} + +type unMarshalBgpPrefixStateRequest interface { + // FromProto unmarshals BgpPrefixStateRequest from protobuf object *otg.BgpPrefixStateRequest + FromProto(msg *otg.BgpPrefixStateRequest) (BgpPrefixStateRequest, error) + // FromPbText unmarshals BgpPrefixStateRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpPrefixStateRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpPrefixStateRequest from JSON text + FromJson(value string) error +} + +func (obj *bgpPrefixStateRequest) Marshal() marshalBgpPrefixStateRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpPrefixStateRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpPrefixStateRequest) Unmarshal() unMarshalBgpPrefixStateRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpPrefixStateRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpPrefixStateRequest) ToProto() (*otg.BgpPrefixStateRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpPrefixStateRequest) FromProto(msg *otg.BgpPrefixStateRequest) (BgpPrefixStateRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpPrefixStateRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpPrefixStateRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpPrefixStateRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpPrefixStateRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpPrefixStateRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpPrefixStateRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpPrefixStateRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpPrefixStateRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpPrefixStateRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpPrefixStateRequest) Clone() (BgpPrefixStateRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpPrefixStateRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpPrefixStateRequest) setNil() { + obj.ipv4UnicastFiltersHolder = nil + obj.ipv6UnicastFiltersHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpPrefixStateRequest is the request to retrieve BGP peer prefix information. +type BgpPrefixStateRequest interface { + Validation + // msg marshals BgpPrefixStateRequest to protobuf object *otg.BgpPrefixStateRequest + // and doesn't set defaults + msg() *otg.BgpPrefixStateRequest + // setMsg unmarshals BgpPrefixStateRequest from protobuf object *otg.BgpPrefixStateRequest + // and doesn't set defaults + setMsg(*otg.BgpPrefixStateRequest) BgpPrefixStateRequest + // provides marshal interface + Marshal() marshalBgpPrefixStateRequest + // provides unmarshal interface + Unmarshal() unMarshalBgpPrefixStateRequest + // validate validates BgpPrefixStateRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpPrefixStateRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // BgpPeerNames returns []string, set in BgpPrefixStateRequest. + BgpPeerNames() []string + // SetBgpPeerNames assigns []string provided by user to BgpPrefixStateRequest + SetBgpPeerNames(value []string) BgpPrefixStateRequest + // PrefixFilters returns []BgpPrefixStateRequestPrefixFiltersEnum, set in BgpPrefixStateRequest + PrefixFilters() []BgpPrefixStateRequestPrefixFiltersEnum + // SetPrefixFilters assigns []BgpPrefixStateRequestPrefixFiltersEnum provided by user to BgpPrefixStateRequest + SetPrefixFilters(value []BgpPrefixStateRequestPrefixFiltersEnum) BgpPrefixStateRequest + // Ipv4UnicastFilters returns BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIterIter, set in BgpPrefixStateRequest + Ipv4UnicastFilters() BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter + // Ipv6UnicastFilters returns BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIterIter, set in BgpPrefixStateRequest + Ipv6UnicastFilters() BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter + setNil() +} + +// The names of BGP peers for which prefix information will be retrieved. If no names are specified then the results will contain prefix information for all configured BGP peers. +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// BgpPeerNames returns a []string +func (obj *bgpPrefixStateRequest) BgpPeerNames() []string { + if obj.obj.BgpPeerNames == nil { + obj.obj.BgpPeerNames = make([]string, 0) + } + return obj.obj.BgpPeerNames +} + +// The names of BGP peers for which prefix information will be retrieved. If no names are specified then the results will contain prefix information for all configured BGP peers. +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// SetBgpPeerNames sets the []string value in the BgpPrefixStateRequest object +func (obj *bgpPrefixStateRequest) SetBgpPeerNames(value []string) BgpPrefixStateRequest { + + if obj.obj.BgpPeerNames == nil { + obj.obj.BgpPeerNames = make([]string, 0) + } + obj.obj.BgpPeerNames = value + + return obj +} + +type BgpPrefixStateRequestPrefixFiltersEnum string + +// Enum of PrefixFilters on BgpPrefixStateRequest +var BgpPrefixStateRequestPrefixFilters = struct { + IPV4_UNICAST BgpPrefixStateRequestPrefixFiltersEnum + IPV6_UNICAST BgpPrefixStateRequestPrefixFiltersEnum +}{ + IPV4_UNICAST: BgpPrefixStateRequestPrefixFiltersEnum("ipv4_unicast"), + IPV6_UNICAST: BgpPrefixStateRequestPrefixFiltersEnum("ipv6_unicast"), +} + +func (obj *bgpPrefixStateRequest) PrefixFilters() []BgpPrefixStateRequestPrefixFiltersEnum { + items := []BgpPrefixStateRequestPrefixFiltersEnum{} + for _, item := range obj.obj.PrefixFilters { + items = append(items, BgpPrefixStateRequestPrefixFiltersEnum(item.String())) + } + return items +} + +// Specify which prefixes to return. If the list is empty or missing then all prefixes will be returned. +// SetPrefixFilters sets the []string value in the BgpPrefixStateRequest object +func (obj *bgpPrefixStateRequest) SetPrefixFilters(value []BgpPrefixStateRequestPrefixFiltersEnum) BgpPrefixStateRequest { + + items := []otg.BgpPrefixStateRequest_PrefixFilters_Enum{} + for _, item := range value { + intValue := otg.BgpPrefixStateRequest_PrefixFilters_Enum_value[string(item)] + items = append(items, otg.BgpPrefixStateRequest_PrefixFilters_Enum(intValue)) + } + obj.obj.PrefixFilters = items + return obj +} + +// The IPv4 unicast results can be filtered by specifying additional prefix search criteria. If the ipv4_unicast_filters property is missing or empty then all IPv4 prefixes will be returned. +// Ipv4UnicastFilters returns a []BgpPrefixIpv4UnicastFilter +func (obj *bgpPrefixStateRequest) Ipv4UnicastFilters() BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter { + if len(obj.obj.Ipv4UnicastFilters) == 0 { + obj.obj.Ipv4UnicastFilters = []*otg.BgpPrefixIpv4UnicastFilter{} + } + if obj.ipv4UnicastFiltersHolder == nil { + obj.ipv4UnicastFiltersHolder = newBgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter(&obj.obj.Ipv4UnicastFilters).setMsg(obj) + } + return obj.ipv4UnicastFiltersHolder +} + +type bgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter struct { + obj *bgpPrefixStateRequest + bgpPrefixIpv4UnicastFilterSlice []BgpPrefixIpv4UnicastFilter + fieldPtr *[]*otg.BgpPrefixIpv4UnicastFilter +} + +func newBgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter(ptr *[]*otg.BgpPrefixIpv4UnicastFilter) BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter { + return &bgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter{fieldPtr: ptr} +} + +type BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter interface { + setMsg(*bgpPrefixStateRequest) BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter + Items() []BgpPrefixIpv4UnicastFilter + Add() BgpPrefixIpv4UnicastFilter + Append(items ...BgpPrefixIpv4UnicastFilter) BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter + Set(index int, newObj BgpPrefixIpv4UnicastFilter) BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter + Clear() BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter + clearHolderSlice() BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter + appendHolderSlice(item BgpPrefixIpv4UnicastFilter) BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter +} + +func (obj *bgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter) setMsg(msg *bgpPrefixStateRequest) BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpPrefixIpv4UnicastFilter{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter) Items() []BgpPrefixIpv4UnicastFilter { + return obj.bgpPrefixIpv4UnicastFilterSlice +} + +func (obj *bgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter) Add() BgpPrefixIpv4UnicastFilter { + newObj := &otg.BgpPrefixIpv4UnicastFilter{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpPrefixIpv4UnicastFilter{obj: newObj} + newLibObj.setDefault() + obj.bgpPrefixIpv4UnicastFilterSlice = append(obj.bgpPrefixIpv4UnicastFilterSlice, newLibObj) + return newLibObj +} + +func (obj *bgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter) Append(items ...BgpPrefixIpv4UnicastFilter) BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpPrefixIpv4UnicastFilterSlice = append(obj.bgpPrefixIpv4UnicastFilterSlice, item) + } + return obj +} + +func (obj *bgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter) Set(index int, newObj BgpPrefixIpv4UnicastFilter) BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpPrefixIpv4UnicastFilterSlice[index] = newObj + return obj +} +func (obj *bgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter) Clear() BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpPrefixIpv4UnicastFilter{} + obj.bgpPrefixIpv4UnicastFilterSlice = []BgpPrefixIpv4UnicastFilter{} + } + return obj +} +func (obj *bgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter) clearHolderSlice() BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter { + if len(obj.bgpPrefixIpv4UnicastFilterSlice) > 0 { + obj.bgpPrefixIpv4UnicastFilterSlice = []BgpPrefixIpv4UnicastFilter{} + } + return obj +} +func (obj *bgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter) appendHolderSlice(item BgpPrefixIpv4UnicastFilter) BgpPrefixStateRequestBgpPrefixIpv4UnicastFilterIter { + obj.bgpPrefixIpv4UnicastFilterSlice = append(obj.bgpPrefixIpv4UnicastFilterSlice, item) + return obj +} + +// The IPv6 unicast results can be filtered by specifying additional prefix search criteria. If the ipv6_unicast_filters property is missing or empty then all IPv6 prefixes will be returned. +// Ipv6UnicastFilters returns a []BgpPrefixIpv6UnicastFilter +func (obj *bgpPrefixStateRequest) Ipv6UnicastFilters() BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter { + if len(obj.obj.Ipv6UnicastFilters) == 0 { + obj.obj.Ipv6UnicastFilters = []*otg.BgpPrefixIpv6UnicastFilter{} + } + if obj.ipv6UnicastFiltersHolder == nil { + obj.ipv6UnicastFiltersHolder = newBgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter(&obj.obj.Ipv6UnicastFilters).setMsg(obj) + } + return obj.ipv6UnicastFiltersHolder +} + +type bgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter struct { + obj *bgpPrefixStateRequest + bgpPrefixIpv6UnicastFilterSlice []BgpPrefixIpv6UnicastFilter + fieldPtr *[]*otg.BgpPrefixIpv6UnicastFilter +} + +func newBgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter(ptr *[]*otg.BgpPrefixIpv6UnicastFilter) BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter { + return &bgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter{fieldPtr: ptr} +} + +type BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter interface { + setMsg(*bgpPrefixStateRequest) BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter + Items() []BgpPrefixIpv6UnicastFilter + Add() BgpPrefixIpv6UnicastFilter + Append(items ...BgpPrefixIpv6UnicastFilter) BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter + Set(index int, newObj BgpPrefixIpv6UnicastFilter) BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter + Clear() BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter + clearHolderSlice() BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter + appendHolderSlice(item BgpPrefixIpv6UnicastFilter) BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter +} + +func (obj *bgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter) setMsg(msg *bgpPrefixStateRequest) BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpPrefixIpv6UnicastFilter{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter) Items() []BgpPrefixIpv6UnicastFilter { + return obj.bgpPrefixIpv6UnicastFilterSlice +} + +func (obj *bgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter) Add() BgpPrefixIpv6UnicastFilter { + newObj := &otg.BgpPrefixIpv6UnicastFilter{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpPrefixIpv6UnicastFilter{obj: newObj} + newLibObj.setDefault() + obj.bgpPrefixIpv6UnicastFilterSlice = append(obj.bgpPrefixIpv6UnicastFilterSlice, newLibObj) + return newLibObj +} + +func (obj *bgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter) Append(items ...BgpPrefixIpv6UnicastFilter) BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpPrefixIpv6UnicastFilterSlice = append(obj.bgpPrefixIpv6UnicastFilterSlice, item) + } + return obj +} + +func (obj *bgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter) Set(index int, newObj BgpPrefixIpv6UnicastFilter) BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpPrefixIpv6UnicastFilterSlice[index] = newObj + return obj +} +func (obj *bgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter) Clear() BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpPrefixIpv6UnicastFilter{} + obj.bgpPrefixIpv6UnicastFilterSlice = []BgpPrefixIpv6UnicastFilter{} + } + return obj +} +func (obj *bgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter) clearHolderSlice() BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter { + if len(obj.bgpPrefixIpv6UnicastFilterSlice) > 0 { + obj.bgpPrefixIpv6UnicastFilterSlice = []BgpPrefixIpv6UnicastFilter{} + } + return obj +} +func (obj *bgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter) appendHolderSlice(item BgpPrefixIpv6UnicastFilter) BgpPrefixStateRequestBgpPrefixIpv6UnicastFilterIter { + obj.bgpPrefixIpv6UnicastFilterSlice = append(obj.bgpPrefixIpv6UnicastFilterSlice, item) + return obj +} + +func (obj *bgpPrefixStateRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Ipv4UnicastFilters) != 0 { + + if set_default { + obj.Ipv4UnicastFilters().clearHolderSlice() + for _, item := range obj.obj.Ipv4UnicastFilters { + obj.Ipv4UnicastFilters().appendHolderSlice(&bgpPrefixIpv4UnicastFilter{obj: item}) + } + } + for _, item := range obj.Ipv4UnicastFilters().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ipv6UnicastFilters) != 0 { + + if set_default { + obj.Ipv6UnicastFilters().clearHolderSlice() + for _, item := range obj.obj.Ipv6UnicastFilters { + obj.Ipv6UnicastFilters().appendHolderSlice(&bgpPrefixIpv6UnicastFilter{obj: item}) + } + } + for _, item := range obj.Ipv6UnicastFilters().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpPrefixStateRequest) setDefault() { + +} diff --git a/gosnappi/bgp_prefixes_state.go b/gosnappi/bgp_prefixes_state.go new file mode 100644 index 00000000..f1258d70 --- /dev/null +++ b/gosnappi/bgp_prefixes_state.go @@ -0,0 +1,523 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpPrefixesState ***** +type bgpPrefixesState struct { + validation + obj *otg.BgpPrefixesState + marshaller marshalBgpPrefixesState + unMarshaller unMarshalBgpPrefixesState + ipv4UnicastPrefixesHolder BgpPrefixesStateBgpPrefixIpv4UnicastStateIter + ipv6UnicastPrefixesHolder BgpPrefixesStateBgpPrefixIpv6UnicastStateIter +} + +func NewBgpPrefixesState() BgpPrefixesState { + obj := bgpPrefixesState{obj: &otg.BgpPrefixesState{}} + obj.setDefault() + return &obj +} + +func (obj *bgpPrefixesState) msg() *otg.BgpPrefixesState { + return obj.obj +} + +func (obj *bgpPrefixesState) setMsg(msg *otg.BgpPrefixesState) BgpPrefixesState { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpPrefixesState struct { + obj *bgpPrefixesState +} + +type marshalBgpPrefixesState interface { + // ToProto marshals BgpPrefixesState to protobuf object *otg.BgpPrefixesState + ToProto() (*otg.BgpPrefixesState, error) + // ToPbText marshals BgpPrefixesState to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpPrefixesState to YAML text + ToYaml() (string, error) + // ToJson marshals BgpPrefixesState to JSON text + ToJson() (string, error) +} + +type unMarshalbgpPrefixesState struct { + obj *bgpPrefixesState +} + +type unMarshalBgpPrefixesState interface { + // FromProto unmarshals BgpPrefixesState from protobuf object *otg.BgpPrefixesState + FromProto(msg *otg.BgpPrefixesState) (BgpPrefixesState, error) + // FromPbText unmarshals BgpPrefixesState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpPrefixesState from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpPrefixesState from JSON text + FromJson(value string) error +} + +func (obj *bgpPrefixesState) Marshal() marshalBgpPrefixesState { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpPrefixesState{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpPrefixesState) Unmarshal() unMarshalBgpPrefixesState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpPrefixesState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpPrefixesState) ToProto() (*otg.BgpPrefixesState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpPrefixesState) FromProto(msg *otg.BgpPrefixesState) (BgpPrefixesState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpPrefixesState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpPrefixesState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpPrefixesState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpPrefixesState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpPrefixesState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpPrefixesState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpPrefixesState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpPrefixesState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpPrefixesState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpPrefixesState) Clone() (BgpPrefixesState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpPrefixesState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpPrefixesState) setNil() { + obj.ipv4UnicastPrefixesHolder = nil + obj.ipv6UnicastPrefixesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpPrefixesState is bGP peer prefixes. +type BgpPrefixesState interface { + Validation + // msg marshals BgpPrefixesState to protobuf object *otg.BgpPrefixesState + // and doesn't set defaults + msg() *otg.BgpPrefixesState + // setMsg unmarshals BgpPrefixesState from protobuf object *otg.BgpPrefixesState + // and doesn't set defaults + setMsg(*otg.BgpPrefixesState) BgpPrefixesState + // provides marshal interface + Marshal() marshalBgpPrefixesState + // provides unmarshal interface + Unmarshal() unMarshalBgpPrefixesState + // validate validates BgpPrefixesState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpPrefixesState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // BgpPeerName returns string, set in BgpPrefixesState. + BgpPeerName() string + // SetBgpPeerName assigns string provided by user to BgpPrefixesState + SetBgpPeerName(value string) BgpPrefixesState + // HasBgpPeerName checks if BgpPeerName has been set in BgpPrefixesState + HasBgpPeerName() bool + // Ipv4UnicastPrefixes returns BgpPrefixesStateBgpPrefixIpv4UnicastStateIterIter, set in BgpPrefixesState + Ipv4UnicastPrefixes() BgpPrefixesStateBgpPrefixIpv4UnicastStateIter + // Ipv6UnicastPrefixes returns BgpPrefixesStateBgpPrefixIpv6UnicastStateIterIter, set in BgpPrefixesState + Ipv6UnicastPrefixes() BgpPrefixesStateBgpPrefixIpv6UnicastStateIter + setNil() +} + +// The name of a BGP peer. +// BgpPeerName returns a string +func (obj *bgpPrefixesState) BgpPeerName() string { + + return *obj.obj.BgpPeerName + +} + +// The name of a BGP peer. +// BgpPeerName returns a string +func (obj *bgpPrefixesState) HasBgpPeerName() bool { + return obj.obj.BgpPeerName != nil +} + +// The name of a BGP peer. +// SetBgpPeerName sets the string value in the BgpPrefixesState object +func (obj *bgpPrefixesState) SetBgpPeerName(value string) BgpPrefixesState { + + obj.obj.BgpPeerName = &value + return obj +} + +// description is TBD +// Ipv4UnicastPrefixes returns a []BgpPrefixIpv4UnicastState +func (obj *bgpPrefixesState) Ipv4UnicastPrefixes() BgpPrefixesStateBgpPrefixIpv4UnicastStateIter { + if len(obj.obj.Ipv4UnicastPrefixes) == 0 { + obj.obj.Ipv4UnicastPrefixes = []*otg.BgpPrefixIpv4UnicastState{} + } + if obj.ipv4UnicastPrefixesHolder == nil { + obj.ipv4UnicastPrefixesHolder = newBgpPrefixesStateBgpPrefixIpv4UnicastStateIter(&obj.obj.Ipv4UnicastPrefixes).setMsg(obj) + } + return obj.ipv4UnicastPrefixesHolder +} + +type bgpPrefixesStateBgpPrefixIpv4UnicastStateIter struct { + obj *bgpPrefixesState + bgpPrefixIpv4UnicastStateSlice []BgpPrefixIpv4UnicastState + fieldPtr *[]*otg.BgpPrefixIpv4UnicastState +} + +func newBgpPrefixesStateBgpPrefixIpv4UnicastStateIter(ptr *[]*otg.BgpPrefixIpv4UnicastState) BgpPrefixesStateBgpPrefixIpv4UnicastStateIter { + return &bgpPrefixesStateBgpPrefixIpv4UnicastStateIter{fieldPtr: ptr} +} + +type BgpPrefixesStateBgpPrefixIpv4UnicastStateIter interface { + setMsg(*bgpPrefixesState) BgpPrefixesStateBgpPrefixIpv4UnicastStateIter + Items() []BgpPrefixIpv4UnicastState + Add() BgpPrefixIpv4UnicastState + Append(items ...BgpPrefixIpv4UnicastState) BgpPrefixesStateBgpPrefixIpv4UnicastStateIter + Set(index int, newObj BgpPrefixIpv4UnicastState) BgpPrefixesStateBgpPrefixIpv4UnicastStateIter + Clear() BgpPrefixesStateBgpPrefixIpv4UnicastStateIter + clearHolderSlice() BgpPrefixesStateBgpPrefixIpv4UnicastStateIter + appendHolderSlice(item BgpPrefixIpv4UnicastState) BgpPrefixesStateBgpPrefixIpv4UnicastStateIter +} + +func (obj *bgpPrefixesStateBgpPrefixIpv4UnicastStateIter) setMsg(msg *bgpPrefixesState) BgpPrefixesStateBgpPrefixIpv4UnicastStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpPrefixIpv4UnicastState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpPrefixesStateBgpPrefixIpv4UnicastStateIter) Items() []BgpPrefixIpv4UnicastState { + return obj.bgpPrefixIpv4UnicastStateSlice +} + +func (obj *bgpPrefixesStateBgpPrefixIpv4UnicastStateIter) Add() BgpPrefixIpv4UnicastState { + newObj := &otg.BgpPrefixIpv4UnicastState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpPrefixIpv4UnicastState{obj: newObj} + newLibObj.setDefault() + obj.bgpPrefixIpv4UnicastStateSlice = append(obj.bgpPrefixIpv4UnicastStateSlice, newLibObj) + return newLibObj +} + +func (obj *bgpPrefixesStateBgpPrefixIpv4UnicastStateIter) Append(items ...BgpPrefixIpv4UnicastState) BgpPrefixesStateBgpPrefixIpv4UnicastStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpPrefixIpv4UnicastStateSlice = append(obj.bgpPrefixIpv4UnicastStateSlice, item) + } + return obj +} + +func (obj *bgpPrefixesStateBgpPrefixIpv4UnicastStateIter) Set(index int, newObj BgpPrefixIpv4UnicastState) BgpPrefixesStateBgpPrefixIpv4UnicastStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpPrefixIpv4UnicastStateSlice[index] = newObj + return obj +} +func (obj *bgpPrefixesStateBgpPrefixIpv4UnicastStateIter) Clear() BgpPrefixesStateBgpPrefixIpv4UnicastStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpPrefixIpv4UnicastState{} + obj.bgpPrefixIpv4UnicastStateSlice = []BgpPrefixIpv4UnicastState{} + } + return obj +} +func (obj *bgpPrefixesStateBgpPrefixIpv4UnicastStateIter) clearHolderSlice() BgpPrefixesStateBgpPrefixIpv4UnicastStateIter { + if len(obj.bgpPrefixIpv4UnicastStateSlice) > 0 { + obj.bgpPrefixIpv4UnicastStateSlice = []BgpPrefixIpv4UnicastState{} + } + return obj +} +func (obj *bgpPrefixesStateBgpPrefixIpv4UnicastStateIter) appendHolderSlice(item BgpPrefixIpv4UnicastState) BgpPrefixesStateBgpPrefixIpv4UnicastStateIter { + obj.bgpPrefixIpv4UnicastStateSlice = append(obj.bgpPrefixIpv4UnicastStateSlice, item) + return obj +} + +// description is TBD +// Ipv6UnicastPrefixes returns a []BgpPrefixIpv6UnicastState +func (obj *bgpPrefixesState) Ipv6UnicastPrefixes() BgpPrefixesStateBgpPrefixIpv6UnicastStateIter { + if len(obj.obj.Ipv6UnicastPrefixes) == 0 { + obj.obj.Ipv6UnicastPrefixes = []*otg.BgpPrefixIpv6UnicastState{} + } + if obj.ipv6UnicastPrefixesHolder == nil { + obj.ipv6UnicastPrefixesHolder = newBgpPrefixesStateBgpPrefixIpv6UnicastStateIter(&obj.obj.Ipv6UnicastPrefixes).setMsg(obj) + } + return obj.ipv6UnicastPrefixesHolder +} + +type bgpPrefixesStateBgpPrefixIpv6UnicastStateIter struct { + obj *bgpPrefixesState + bgpPrefixIpv6UnicastStateSlice []BgpPrefixIpv6UnicastState + fieldPtr *[]*otg.BgpPrefixIpv6UnicastState +} + +func newBgpPrefixesStateBgpPrefixIpv6UnicastStateIter(ptr *[]*otg.BgpPrefixIpv6UnicastState) BgpPrefixesStateBgpPrefixIpv6UnicastStateIter { + return &bgpPrefixesStateBgpPrefixIpv6UnicastStateIter{fieldPtr: ptr} +} + +type BgpPrefixesStateBgpPrefixIpv6UnicastStateIter interface { + setMsg(*bgpPrefixesState) BgpPrefixesStateBgpPrefixIpv6UnicastStateIter + Items() []BgpPrefixIpv6UnicastState + Add() BgpPrefixIpv6UnicastState + Append(items ...BgpPrefixIpv6UnicastState) BgpPrefixesStateBgpPrefixIpv6UnicastStateIter + Set(index int, newObj BgpPrefixIpv6UnicastState) BgpPrefixesStateBgpPrefixIpv6UnicastStateIter + Clear() BgpPrefixesStateBgpPrefixIpv6UnicastStateIter + clearHolderSlice() BgpPrefixesStateBgpPrefixIpv6UnicastStateIter + appendHolderSlice(item BgpPrefixIpv6UnicastState) BgpPrefixesStateBgpPrefixIpv6UnicastStateIter +} + +func (obj *bgpPrefixesStateBgpPrefixIpv6UnicastStateIter) setMsg(msg *bgpPrefixesState) BgpPrefixesStateBgpPrefixIpv6UnicastStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpPrefixIpv6UnicastState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpPrefixesStateBgpPrefixIpv6UnicastStateIter) Items() []BgpPrefixIpv6UnicastState { + return obj.bgpPrefixIpv6UnicastStateSlice +} + +func (obj *bgpPrefixesStateBgpPrefixIpv6UnicastStateIter) Add() BgpPrefixIpv6UnicastState { + newObj := &otg.BgpPrefixIpv6UnicastState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpPrefixIpv6UnicastState{obj: newObj} + newLibObj.setDefault() + obj.bgpPrefixIpv6UnicastStateSlice = append(obj.bgpPrefixIpv6UnicastStateSlice, newLibObj) + return newLibObj +} + +func (obj *bgpPrefixesStateBgpPrefixIpv6UnicastStateIter) Append(items ...BgpPrefixIpv6UnicastState) BgpPrefixesStateBgpPrefixIpv6UnicastStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpPrefixIpv6UnicastStateSlice = append(obj.bgpPrefixIpv6UnicastStateSlice, item) + } + return obj +} + +func (obj *bgpPrefixesStateBgpPrefixIpv6UnicastStateIter) Set(index int, newObj BgpPrefixIpv6UnicastState) BgpPrefixesStateBgpPrefixIpv6UnicastStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpPrefixIpv6UnicastStateSlice[index] = newObj + return obj +} +func (obj *bgpPrefixesStateBgpPrefixIpv6UnicastStateIter) Clear() BgpPrefixesStateBgpPrefixIpv6UnicastStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpPrefixIpv6UnicastState{} + obj.bgpPrefixIpv6UnicastStateSlice = []BgpPrefixIpv6UnicastState{} + } + return obj +} +func (obj *bgpPrefixesStateBgpPrefixIpv6UnicastStateIter) clearHolderSlice() BgpPrefixesStateBgpPrefixIpv6UnicastStateIter { + if len(obj.bgpPrefixIpv6UnicastStateSlice) > 0 { + obj.bgpPrefixIpv6UnicastStateSlice = []BgpPrefixIpv6UnicastState{} + } + return obj +} +func (obj *bgpPrefixesStateBgpPrefixIpv6UnicastStateIter) appendHolderSlice(item BgpPrefixIpv6UnicastState) BgpPrefixesStateBgpPrefixIpv6UnicastStateIter { + obj.bgpPrefixIpv6UnicastStateSlice = append(obj.bgpPrefixIpv6UnicastStateSlice, item) + return obj +} + +func (obj *bgpPrefixesState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Ipv4UnicastPrefixes) != 0 { + + if set_default { + obj.Ipv4UnicastPrefixes().clearHolderSlice() + for _, item := range obj.obj.Ipv4UnicastPrefixes { + obj.Ipv4UnicastPrefixes().appendHolderSlice(&bgpPrefixIpv4UnicastState{obj: item}) + } + } + for _, item := range obj.Ipv4UnicastPrefixes().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ipv6UnicastPrefixes) != 0 { + + if set_default { + obj.Ipv6UnicastPrefixes().clearHolderSlice() + for _, item := range obj.obj.Ipv6UnicastPrefixes { + obj.Ipv6UnicastPrefixes().appendHolderSlice(&bgpPrefixIpv6UnicastState{obj: item}) + } + } + for _, item := range obj.Ipv6UnicastPrefixes().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpPrefixesState) setDefault() { + +} diff --git a/gosnappi/bgp_raw_bytes.go b/gosnappi/bgp_raw_bytes.go new file mode 100644 index 00000000..29be2fdb --- /dev/null +++ b/gosnappi/bgp_raw_bytes.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpRawBytes ***** +type bgpRawBytes struct { + validation + obj *otg.BgpRawBytes + marshaller marshalBgpRawBytes + unMarshaller unMarshalBgpRawBytes + updatesHolder BgpRawBytesBgpOneUpdateReplayIter +} + +func NewBgpRawBytes() BgpRawBytes { + obj := bgpRawBytes{obj: &otg.BgpRawBytes{}} + obj.setDefault() + return &obj +} + +func (obj *bgpRawBytes) msg() *otg.BgpRawBytes { + return obj.obj +} + +func (obj *bgpRawBytes) setMsg(msg *otg.BgpRawBytes) BgpRawBytes { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpRawBytes struct { + obj *bgpRawBytes +} + +type marshalBgpRawBytes interface { + // ToProto marshals BgpRawBytes to protobuf object *otg.BgpRawBytes + ToProto() (*otg.BgpRawBytes, error) + // ToPbText marshals BgpRawBytes to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpRawBytes to YAML text + ToYaml() (string, error) + // ToJson marshals BgpRawBytes to JSON text + ToJson() (string, error) +} + +type unMarshalbgpRawBytes struct { + obj *bgpRawBytes +} + +type unMarshalBgpRawBytes interface { + // FromProto unmarshals BgpRawBytes from protobuf object *otg.BgpRawBytes + FromProto(msg *otg.BgpRawBytes) (BgpRawBytes, error) + // FromPbText unmarshals BgpRawBytes from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpRawBytes from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpRawBytes from JSON text + FromJson(value string) error +} + +func (obj *bgpRawBytes) Marshal() marshalBgpRawBytes { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpRawBytes{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpRawBytes) Unmarshal() unMarshalBgpRawBytes { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpRawBytes{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpRawBytes) ToProto() (*otg.BgpRawBytes, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpRawBytes) FromProto(msg *otg.BgpRawBytes) (BgpRawBytes, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpRawBytes) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpRawBytes) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpRawBytes) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpRawBytes) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpRawBytes) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpRawBytes) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpRawBytes) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpRawBytes) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpRawBytes) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpRawBytes) Clone() (BgpRawBytes, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpRawBytes() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpRawBytes) setNil() { + obj.updatesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpRawBytes is ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. +type BgpRawBytes interface { + Validation + // msg marshals BgpRawBytes to protobuf object *otg.BgpRawBytes + // and doesn't set defaults + msg() *otg.BgpRawBytes + // setMsg unmarshals BgpRawBytes from protobuf object *otg.BgpRawBytes + // and doesn't set defaults + setMsg(*otg.BgpRawBytes) BgpRawBytes + // provides marshal interface + Marshal() marshalBgpRawBytes + // provides unmarshal interface + Unmarshal() unMarshalBgpRawBytes + // validate validates BgpRawBytes + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpRawBytes, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Updates returns BgpRawBytesBgpOneUpdateReplayIterIter, set in BgpRawBytes + Updates() BgpRawBytesBgpOneUpdateReplayIter + setNil() +} + +// Array of ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. +// Updates returns a []BgpOneUpdateReplay +func (obj *bgpRawBytes) Updates() BgpRawBytesBgpOneUpdateReplayIter { + if len(obj.obj.Updates) == 0 { + obj.obj.Updates = []*otg.BgpOneUpdateReplay{} + } + if obj.updatesHolder == nil { + obj.updatesHolder = newBgpRawBytesBgpOneUpdateReplayIter(&obj.obj.Updates).setMsg(obj) + } + return obj.updatesHolder +} + +type bgpRawBytesBgpOneUpdateReplayIter struct { + obj *bgpRawBytes + bgpOneUpdateReplaySlice []BgpOneUpdateReplay + fieldPtr *[]*otg.BgpOneUpdateReplay +} + +func newBgpRawBytesBgpOneUpdateReplayIter(ptr *[]*otg.BgpOneUpdateReplay) BgpRawBytesBgpOneUpdateReplayIter { + return &bgpRawBytesBgpOneUpdateReplayIter{fieldPtr: ptr} +} + +type BgpRawBytesBgpOneUpdateReplayIter interface { + setMsg(*bgpRawBytes) BgpRawBytesBgpOneUpdateReplayIter + Items() []BgpOneUpdateReplay + Add() BgpOneUpdateReplay + Append(items ...BgpOneUpdateReplay) BgpRawBytesBgpOneUpdateReplayIter + Set(index int, newObj BgpOneUpdateReplay) BgpRawBytesBgpOneUpdateReplayIter + Clear() BgpRawBytesBgpOneUpdateReplayIter + clearHolderSlice() BgpRawBytesBgpOneUpdateReplayIter + appendHolderSlice(item BgpOneUpdateReplay) BgpRawBytesBgpOneUpdateReplayIter +} + +func (obj *bgpRawBytesBgpOneUpdateReplayIter) setMsg(msg *bgpRawBytes) BgpRawBytesBgpOneUpdateReplayIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpOneUpdateReplay{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpRawBytesBgpOneUpdateReplayIter) Items() []BgpOneUpdateReplay { + return obj.bgpOneUpdateReplaySlice +} + +func (obj *bgpRawBytesBgpOneUpdateReplayIter) Add() BgpOneUpdateReplay { + newObj := &otg.BgpOneUpdateReplay{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpOneUpdateReplay{obj: newObj} + newLibObj.setDefault() + obj.bgpOneUpdateReplaySlice = append(obj.bgpOneUpdateReplaySlice, newLibObj) + return newLibObj +} + +func (obj *bgpRawBytesBgpOneUpdateReplayIter) Append(items ...BgpOneUpdateReplay) BgpRawBytesBgpOneUpdateReplayIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpOneUpdateReplaySlice = append(obj.bgpOneUpdateReplaySlice, item) + } + return obj +} + +func (obj *bgpRawBytesBgpOneUpdateReplayIter) Set(index int, newObj BgpOneUpdateReplay) BgpRawBytesBgpOneUpdateReplayIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpOneUpdateReplaySlice[index] = newObj + return obj +} +func (obj *bgpRawBytesBgpOneUpdateReplayIter) Clear() BgpRawBytesBgpOneUpdateReplayIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpOneUpdateReplay{} + obj.bgpOneUpdateReplaySlice = []BgpOneUpdateReplay{} + } + return obj +} +func (obj *bgpRawBytesBgpOneUpdateReplayIter) clearHolderSlice() BgpRawBytesBgpOneUpdateReplayIter { + if len(obj.bgpOneUpdateReplaySlice) > 0 { + obj.bgpOneUpdateReplaySlice = []BgpOneUpdateReplay{} + } + return obj +} +func (obj *bgpRawBytesBgpOneUpdateReplayIter) appendHolderSlice(item BgpOneUpdateReplay) BgpRawBytesBgpOneUpdateReplayIter { + obj.bgpOneUpdateReplaySlice = append(obj.bgpOneUpdateReplaySlice, item) + return obj +} + +func (obj *bgpRawBytes) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Updates) != 0 { + + if set_default { + obj.Updates().clearHolderSlice() + for _, item := range obj.obj.Updates { + obj.Updates().appendHolderSlice(&bgpOneUpdateReplay{obj: item}) + } + } + for _, item := range obj.Updates().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpRawBytes) setDefault() { + +} diff --git a/gosnappi/bgp_route_advanced.go b/gosnappi/bgp_route_advanced.go new file mode 100644 index 00000000..74c6e4cb --- /dev/null +++ b/gosnappi/bgp_route_advanced.go @@ -0,0 +1,476 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpRouteAdvanced ***** +type bgpRouteAdvanced struct { + validation + obj *otg.BgpRouteAdvanced + marshaller marshalBgpRouteAdvanced + unMarshaller unMarshalBgpRouteAdvanced +} + +func NewBgpRouteAdvanced() BgpRouteAdvanced { + obj := bgpRouteAdvanced{obj: &otg.BgpRouteAdvanced{}} + obj.setDefault() + return &obj +} + +func (obj *bgpRouteAdvanced) msg() *otg.BgpRouteAdvanced { + return obj.obj +} + +func (obj *bgpRouteAdvanced) setMsg(msg *otg.BgpRouteAdvanced) BgpRouteAdvanced { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpRouteAdvanced struct { + obj *bgpRouteAdvanced +} + +type marshalBgpRouteAdvanced interface { + // ToProto marshals BgpRouteAdvanced to protobuf object *otg.BgpRouteAdvanced + ToProto() (*otg.BgpRouteAdvanced, error) + // ToPbText marshals BgpRouteAdvanced to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpRouteAdvanced to YAML text + ToYaml() (string, error) + // ToJson marshals BgpRouteAdvanced to JSON text + ToJson() (string, error) +} + +type unMarshalbgpRouteAdvanced struct { + obj *bgpRouteAdvanced +} + +type unMarshalBgpRouteAdvanced interface { + // FromProto unmarshals BgpRouteAdvanced from protobuf object *otg.BgpRouteAdvanced + FromProto(msg *otg.BgpRouteAdvanced) (BgpRouteAdvanced, error) + // FromPbText unmarshals BgpRouteAdvanced from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpRouteAdvanced from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpRouteAdvanced from JSON text + FromJson(value string) error +} + +func (obj *bgpRouteAdvanced) Marshal() marshalBgpRouteAdvanced { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpRouteAdvanced{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpRouteAdvanced) Unmarshal() unMarshalBgpRouteAdvanced { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpRouteAdvanced{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpRouteAdvanced) ToProto() (*otg.BgpRouteAdvanced, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpRouteAdvanced) FromProto(msg *otg.BgpRouteAdvanced) (BgpRouteAdvanced, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpRouteAdvanced) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpRouteAdvanced) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpRouteAdvanced) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpRouteAdvanced) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpRouteAdvanced) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpRouteAdvanced) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpRouteAdvanced) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpRouteAdvanced) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpRouteAdvanced) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpRouteAdvanced) Clone() (BgpRouteAdvanced, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpRouteAdvanced() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpRouteAdvanced is configuration for advanced BGP route range settings. +type BgpRouteAdvanced interface { + Validation + // msg marshals BgpRouteAdvanced to protobuf object *otg.BgpRouteAdvanced + // and doesn't set defaults + msg() *otg.BgpRouteAdvanced + // setMsg unmarshals BgpRouteAdvanced from protobuf object *otg.BgpRouteAdvanced + // and doesn't set defaults + setMsg(*otg.BgpRouteAdvanced) BgpRouteAdvanced + // provides marshal interface + Marshal() marshalBgpRouteAdvanced + // provides unmarshal interface + Unmarshal() unMarshalBgpRouteAdvanced + // validate validates BgpRouteAdvanced + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpRouteAdvanced, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // IncludeMultiExitDiscriminator returns bool, set in BgpRouteAdvanced. + IncludeMultiExitDiscriminator() bool + // SetIncludeMultiExitDiscriminator assigns bool provided by user to BgpRouteAdvanced + SetIncludeMultiExitDiscriminator(value bool) BgpRouteAdvanced + // HasIncludeMultiExitDiscriminator checks if IncludeMultiExitDiscriminator has been set in BgpRouteAdvanced + HasIncludeMultiExitDiscriminator() bool + // MultiExitDiscriminator returns uint32, set in BgpRouteAdvanced. + MultiExitDiscriminator() uint32 + // SetMultiExitDiscriminator assigns uint32 provided by user to BgpRouteAdvanced + SetMultiExitDiscriminator(value uint32) BgpRouteAdvanced + // HasMultiExitDiscriminator checks if MultiExitDiscriminator has been set in BgpRouteAdvanced + HasMultiExitDiscriminator() bool + // IncludeOrigin returns bool, set in BgpRouteAdvanced. + IncludeOrigin() bool + // SetIncludeOrigin assigns bool provided by user to BgpRouteAdvanced + SetIncludeOrigin(value bool) BgpRouteAdvanced + // HasIncludeOrigin checks if IncludeOrigin has been set in BgpRouteAdvanced + HasIncludeOrigin() bool + // Origin returns BgpRouteAdvancedOriginEnum, set in BgpRouteAdvanced + Origin() BgpRouteAdvancedOriginEnum + // SetOrigin assigns BgpRouteAdvancedOriginEnum provided by user to BgpRouteAdvanced + SetOrigin(value BgpRouteAdvancedOriginEnum) BgpRouteAdvanced + // HasOrigin checks if Origin has been set in BgpRouteAdvanced + HasOrigin() bool + // IncludeLocalPreference returns bool, set in BgpRouteAdvanced. + IncludeLocalPreference() bool + // SetIncludeLocalPreference assigns bool provided by user to BgpRouteAdvanced + SetIncludeLocalPreference(value bool) BgpRouteAdvanced + // HasIncludeLocalPreference checks if IncludeLocalPreference has been set in BgpRouteAdvanced + HasIncludeLocalPreference() bool + // LocalPreference returns uint32, set in BgpRouteAdvanced. + LocalPreference() uint32 + // SetLocalPreference assigns uint32 provided by user to BgpRouteAdvanced + SetLocalPreference(value uint32) BgpRouteAdvanced + // HasLocalPreference checks if LocalPreference has been set in BgpRouteAdvanced + HasLocalPreference() bool +} + +// BGP Multi Exit Discriminator attribute sent to the peer to help in the route selection process. If set to true, the Multi Exit Discriminator attribute will be included in the route advertisement. +// IncludeMultiExitDiscriminator returns a bool +func (obj *bgpRouteAdvanced) IncludeMultiExitDiscriminator() bool { + + return *obj.obj.IncludeMultiExitDiscriminator + +} + +// BGP Multi Exit Discriminator attribute sent to the peer to help in the route selection process. If set to true, the Multi Exit Discriminator attribute will be included in the route advertisement. +// IncludeMultiExitDiscriminator returns a bool +func (obj *bgpRouteAdvanced) HasIncludeMultiExitDiscriminator() bool { + return obj.obj.IncludeMultiExitDiscriminator != nil +} + +// BGP Multi Exit Discriminator attribute sent to the peer to help in the route selection process. If set to true, the Multi Exit Discriminator attribute will be included in the route advertisement. +// SetIncludeMultiExitDiscriminator sets the bool value in the BgpRouteAdvanced object +func (obj *bgpRouteAdvanced) SetIncludeMultiExitDiscriminator(value bool) BgpRouteAdvanced { + + obj.obj.IncludeMultiExitDiscriminator = &value + return obj +} + +// The multi exit discriminator (MED) value used for route selection sent to the peer. +// MultiExitDiscriminator returns a uint32 +func (obj *bgpRouteAdvanced) MultiExitDiscriminator() uint32 { + + return *obj.obj.MultiExitDiscriminator + +} + +// The multi exit discriminator (MED) value used for route selection sent to the peer. +// MultiExitDiscriminator returns a uint32 +func (obj *bgpRouteAdvanced) HasMultiExitDiscriminator() bool { + return obj.obj.MultiExitDiscriminator != nil +} + +// The multi exit discriminator (MED) value used for route selection sent to the peer. +// SetMultiExitDiscriminator sets the uint32 value in the BgpRouteAdvanced object +func (obj *bgpRouteAdvanced) SetMultiExitDiscriminator(value uint32) BgpRouteAdvanced { + + obj.obj.MultiExitDiscriminator = &value + return obj +} + +// If set to true, the Origin attribute will be included in the route advertisement. +// IncludeOrigin returns a bool +func (obj *bgpRouteAdvanced) IncludeOrigin() bool { + + return *obj.obj.IncludeOrigin + +} + +// If set to true, the Origin attribute will be included in the route advertisement. +// IncludeOrigin returns a bool +func (obj *bgpRouteAdvanced) HasIncludeOrigin() bool { + return obj.obj.IncludeOrigin != nil +} + +// If set to true, the Origin attribute will be included in the route advertisement. +// SetIncludeOrigin sets the bool value in the BgpRouteAdvanced object +func (obj *bgpRouteAdvanced) SetIncludeOrigin(value bool) BgpRouteAdvanced { + + obj.obj.IncludeOrigin = &value + return obj +} + +type BgpRouteAdvancedOriginEnum string + +// Enum of Origin on BgpRouteAdvanced +var BgpRouteAdvancedOrigin = struct { + IGP BgpRouteAdvancedOriginEnum + EGP BgpRouteAdvancedOriginEnum + INCOMPLETE BgpRouteAdvancedOriginEnum +}{ + IGP: BgpRouteAdvancedOriginEnum("igp"), + EGP: BgpRouteAdvancedOriginEnum("egp"), + INCOMPLETE: BgpRouteAdvancedOriginEnum("incomplete"), +} + +func (obj *bgpRouteAdvanced) Origin() BgpRouteAdvancedOriginEnum { + return BgpRouteAdvancedOriginEnum(obj.obj.Origin.Enum().String()) +} + +// The origin attribute of a prefix can take three values: the prefix originates from an interior routing protocol 'igp', it originates from 'egp' or the origin is 'incomplete', if the prefix is learned through other means. +// Origin returns a string +func (obj *bgpRouteAdvanced) HasOrigin() bool { + return obj.obj.Origin != nil +} + +func (obj *bgpRouteAdvanced) SetOrigin(value BgpRouteAdvancedOriginEnum) BgpRouteAdvanced { + intValue, ok := otg.BgpRouteAdvanced_Origin_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpRouteAdvancedOriginEnum", string(value))) + return obj + } + enumValue := otg.BgpRouteAdvanced_Origin_Enum(intValue) + obj.obj.Origin = &enumValue + + return obj +} + +// BGP Local Preference attribute sent to the peer to indicate the degree of preference for externally learned routes. If set to true, the Local Preference attribute will be included in the route advertisement. This should be included only for internal peers. +// IncludeLocalPreference returns a bool +func (obj *bgpRouteAdvanced) IncludeLocalPreference() bool { + + return *obj.obj.IncludeLocalPreference + +} + +// BGP Local Preference attribute sent to the peer to indicate the degree of preference for externally learned routes. If set to true, the Local Preference attribute will be included in the route advertisement. This should be included only for internal peers. +// IncludeLocalPreference returns a bool +func (obj *bgpRouteAdvanced) HasIncludeLocalPreference() bool { + return obj.obj.IncludeLocalPreference != nil +} + +// BGP Local Preference attribute sent to the peer to indicate the degree of preference for externally learned routes. If set to true, the Local Preference attribute will be included in the route advertisement. This should be included only for internal peers. +// SetIncludeLocalPreference sets the bool value in the BgpRouteAdvanced object +func (obj *bgpRouteAdvanced) SetIncludeLocalPreference(value bool) BgpRouteAdvanced { + + obj.obj.IncludeLocalPreference = &value + return obj +} + +// Value to be set in Local Preference attribute if include_local_preference is set to true. It is used for the selection of the path for the traffic leaving the AS. The route with the highest local preference value is preferred. +// LocalPreference returns a uint32 +func (obj *bgpRouteAdvanced) LocalPreference() uint32 { + + return *obj.obj.LocalPreference + +} + +// Value to be set in Local Preference attribute if include_local_preference is set to true. It is used for the selection of the path for the traffic leaving the AS. The route with the highest local preference value is preferred. +// LocalPreference returns a uint32 +func (obj *bgpRouteAdvanced) HasLocalPreference() bool { + return obj.obj.LocalPreference != nil +} + +// Value to be set in Local Preference attribute if include_local_preference is set to true. It is used for the selection of the path for the traffic leaving the AS. The route with the highest local preference value is preferred. +// SetLocalPreference sets the uint32 value in the BgpRouteAdvanced object +func (obj *bgpRouteAdvanced) SetLocalPreference(value uint32) BgpRouteAdvanced { + + obj.obj.LocalPreference = &value + return obj +} + +func (obj *bgpRouteAdvanced) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpRouteAdvanced) setDefault() { + if obj.obj.IncludeMultiExitDiscriminator == nil { + obj.SetIncludeMultiExitDiscriminator(true) + } + if obj.obj.IncludeOrigin == nil { + obj.SetIncludeOrigin(true) + } + if obj.obj.Origin == nil { + obj.SetOrigin(BgpRouteAdvancedOrigin.IGP) + + } + if obj.obj.IncludeLocalPreference == nil { + obj.SetIncludeLocalPreference(true) + } + if obj.obj.LocalPreference == nil { + obj.SetLocalPreference(100) + } + +} diff --git a/gosnappi/bgp_route_distinguisher.go b/gosnappi/bgp_route_distinguisher.go new file mode 100644 index 00000000..da39c483 --- /dev/null +++ b/gosnappi/bgp_route_distinguisher.go @@ -0,0 +1,386 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpRouteDistinguisher ***** +type bgpRouteDistinguisher struct { + validation + obj *otg.BgpRouteDistinguisher + marshaller marshalBgpRouteDistinguisher + unMarshaller unMarshalBgpRouteDistinguisher +} + +func NewBgpRouteDistinguisher() BgpRouteDistinguisher { + obj := bgpRouteDistinguisher{obj: &otg.BgpRouteDistinguisher{}} + obj.setDefault() + return &obj +} + +func (obj *bgpRouteDistinguisher) msg() *otg.BgpRouteDistinguisher { + return obj.obj +} + +func (obj *bgpRouteDistinguisher) setMsg(msg *otg.BgpRouteDistinguisher) BgpRouteDistinguisher { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpRouteDistinguisher struct { + obj *bgpRouteDistinguisher +} + +type marshalBgpRouteDistinguisher interface { + // ToProto marshals BgpRouteDistinguisher to protobuf object *otg.BgpRouteDistinguisher + ToProto() (*otg.BgpRouteDistinguisher, error) + // ToPbText marshals BgpRouteDistinguisher to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpRouteDistinguisher to YAML text + ToYaml() (string, error) + // ToJson marshals BgpRouteDistinguisher to JSON text + ToJson() (string, error) +} + +type unMarshalbgpRouteDistinguisher struct { + obj *bgpRouteDistinguisher +} + +type unMarshalBgpRouteDistinguisher interface { + // FromProto unmarshals BgpRouteDistinguisher from protobuf object *otg.BgpRouteDistinguisher + FromProto(msg *otg.BgpRouteDistinguisher) (BgpRouteDistinguisher, error) + // FromPbText unmarshals BgpRouteDistinguisher from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpRouteDistinguisher from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpRouteDistinguisher from JSON text + FromJson(value string) error +} + +func (obj *bgpRouteDistinguisher) Marshal() marshalBgpRouteDistinguisher { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpRouteDistinguisher{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpRouteDistinguisher) Unmarshal() unMarshalBgpRouteDistinguisher { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpRouteDistinguisher{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpRouteDistinguisher) ToProto() (*otg.BgpRouteDistinguisher, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpRouteDistinguisher) FromProto(msg *otg.BgpRouteDistinguisher) (BgpRouteDistinguisher, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpRouteDistinguisher) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpRouteDistinguisher) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpRouteDistinguisher) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpRouteDistinguisher) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpRouteDistinguisher) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpRouteDistinguisher) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpRouteDistinguisher) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpRouteDistinguisher) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpRouteDistinguisher) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpRouteDistinguisher) Clone() (BgpRouteDistinguisher, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpRouteDistinguisher() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpRouteDistinguisher is bGP Route Distinguisher. +type BgpRouteDistinguisher interface { + Validation + // msg marshals BgpRouteDistinguisher to protobuf object *otg.BgpRouteDistinguisher + // and doesn't set defaults + msg() *otg.BgpRouteDistinguisher + // setMsg unmarshals BgpRouteDistinguisher from protobuf object *otg.BgpRouteDistinguisher + // and doesn't set defaults + setMsg(*otg.BgpRouteDistinguisher) BgpRouteDistinguisher + // provides marshal interface + Marshal() marshalBgpRouteDistinguisher + // provides unmarshal interface + Unmarshal() unMarshalBgpRouteDistinguisher + // validate validates BgpRouteDistinguisher + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpRouteDistinguisher, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RdType returns BgpRouteDistinguisherRdTypeEnum, set in BgpRouteDistinguisher + RdType() BgpRouteDistinguisherRdTypeEnum + // SetRdType assigns BgpRouteDistinguisherRdTypeEnum provided by user to BgpRouteDistinguisher + SetRdType(value BgpRouteDistinguisherRdTypeEnum) BgpRouteDistinguisher + // HasRdType checks if RdType has been set in BgpRouteDistinguisher + HasRdType() bool + // AutoConfigRdIpAddr returns bool, set in BgpRouteDistinguisher. + AutoConfigRdIpAddr() bool + // SetAutoConfigRdIpAddr assigns bool provided by user to BgpRouteDistinguisher + SetAutoConfigRdIpAddr(value bool) BgpRouteDistinguisher + // HasAutoConfigRdIpAddr checks if AutoConfigRdIpAddr has been set in BgpRouteDistinguisher + HasAutoConfigRdIpAddr() bool + // RdValue returns string, set in BgpRouteDistinguisher. + RdValue() string + // SetRdValue assigns string provided by user to BgpRouteDistinguisher + SetRdValue(value string) BgpRouteDistinguisher + // HasRdValue checks if RdValue has been set in BgpRouteDistinguisher + HasRdValue() bool +} + +type BgpRouteDistinguisherRdTypeEnum string + +// Enum of RdType on BgpRouteDistinguisher +var BgpRouteDistinguisherRdType = struct { + AS_2OCTET BgpRouteDistinguisherRdTypeEnum + IPV4_ADDRESS BgpRouteDistinguisherRdTypeEnum + AS_4OCTET BgpRouteDistinguisherRdTypeEnum +}{ + AS_2OCTET: BgpRouteDistinguisherRdTypeEnum("as_2octet"), + IPV4_ADDRESS: BgpRouteDistinguisherRdTypeEnum("ipv4_address"), + AS_4OCTET: BgpRouteDistinguisherRdTypeEnum("as_4octet"), +} + +func (obj *bgpRouteDistinguisher) RdType() BgpRouteDistinguisherRdTypeEnum { + return BgpRouteDistinguisherRdTypeEnum(obj.obj.RdType.Enum().String()) +} + +// Route Distinguisher Type field of 2 Byte. +// - as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). +// - ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). +// - as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). +// RdType returns a string +func (obj *bgpRouteDistinguisher) HasRdType() bool { + return obj.obj.RdType != nil +} + +func (obj *bgpRouteDistinguisher) SetRdType(value BgpRouteDistinguisherRdTypeEnum) BgpRouteDistinguisher { + intValue, ok := otg.BgpRouteDistinguisher_RdType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpRouteDistinguisherRdTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpRouteDistinguisher_RdType_Enum(intValue) + obj.obj.RdType = &enumValue + + return obj +} + +// Allow to automatically configure RD IP address from local ip. +// AutoConfigRdIpAddr returns a bool +func (obj *bgpRouteDistinguisher) AutoConfigRdIpAddr() bool { + + return *obj.obj.AutoConfigRdIpAddr + +} + +// Allow to automatically configure RD IP address from local ip. +// AutoConfigRdIpAddr returns a bool +func (obj *bgpRouteDistinguisher) HasAutoConfigRdIpAddr() bool { + return obj.obj.AutoConfigRdIpAddr != nil +} + +// Allow to automatically configure RD IP address from local ip. +// SetAutoConfigRdIpAddr sets the bool value in the BgpRouteDistinguisher object +func (obj *bgpRouteDistinguisher) SetAutoConfigRdIpAddr(value bool) BgpRouteDistinguisher { + + obj.obj.AutoConfigRdIpAddr = &value + return obj +} + +// Colon separated Extended Community value of 6 Bytes - "AS number: Value". Example - for the as_2octet or as_4octet "60005:100", for ipv4_address "1.1.1.1:100" +// RdValue returns a string +func (obj *bgpRouteDistinguisher) RdValue() string { + + return *obj.obj.RdValue + +} + +// Colon separated Extended Community value of 6 Bytes - "AS number: Value". Example - for the as_2octet or as_4octet "60005:100", for ipv4_address "1.1.1.1:100" +// RdValue returns a string +func (obj *bgpRouteDistinguisher) HasRdValue() bool { + return obj.obj.RdValue != nil +} + +// Colon separated Extended Community value of 6 Bytes - "AS number: Value". Example - for the as_2octet or as_4octet "60005:100", for ipv4_address "1.1.1.1:100" +// SetRdValue sets the string value in the BgpRouteDistinguisher object +func (obj *bgpRouteDistinguisher) SetRdValue(value string) BgpRouteDistinguisher { + + obj.obj.RdValue = &value + return obj +} + +func (obj *bgpRouteDistinguisher) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpRouteDistinguisher) setDefault() { + if obj.obj.RdType == nil { + obj.SetRdType(BgpRouteDistinguisherRdType.AS_2OCTET) + + } + if obj.obj.AutoConfigRdIpAddr == nil { + obj.SetAutoConfigRdIpAddr(false) + } + +} diff --git a/gosnappi/bgp_route_target.go b/gosnappi/bgp_route_target.go new file mode 100644 index 00000000..6f9b576a --- /dev/null +++ b/gosnappi/bgp_route_target.go @@ -0,0 +1,351 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpRouteTarget ***** +type bgpRouteTarget struct { + validation + obj *otg.BgpRouteTarget + marshaller marshalBgpRouteTarget + unMarshaller unMarshalBgpRouteTarget +} + +func NewBgpRouteTarget() BgpRouteTarget { + obj := bgpRouteTarget{obj: &otg.BgpRouteTarget{}} + obj.setDefault() + return &obj +} + +func (obj *bgpRouteTarget) msg() *otg.BgpRouteTarget { + return obj.obj +} + +func (obj *bgpRouteTarget) setMsg(msg *otg.BgpRouteTarget) BgpRouteTarget { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpRouteTarget struct { + obj *bgpRouteTarget +} + +type marshalBgpRouteTarget interface { + // ToProto marshals BgpRouteTarget to protobuf object *otg.BgpRouteTarget + ToProto() (*otg.BgpRouteTarget, error) + // ToPbText marshals BgpRouteTarget to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpRouteTarget to YAML text + ToYaml() (string, error) + // ToJson marshals BgpRouteTarget to JSON text + ToJson() (string, error) +} + +type unMarshalbgpRouteTarget struct { + obj *bgpRouteTarget +} + +type unMarshalBgpRouteTarget interface { + // FromProto unmarshals BgpRouteTarget from protobuf object *otg.BgpRouteTarget + FromProto(msg *otg.BgpRouteTarget) (BgpRouteTarget, error) + // FromPbText unmarshals BgpRouteTarget from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpRouteTarget from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpRouteTarget from JSON text + FromJson(value string) error +} + +func (obj *bgpRouteTarget) Marshal() marshalBgpRouteTarget { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpRouteTarget{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpRouteTarget) Unmarshal() unMarshalBgpRouteTarget { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpRouteTarget{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpRouteTarget) ToProto() (*otg.BgpRouteTarget, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpRouteTarget) FromProto(msg *otg.BgpRouteTarget) (BgpRouteTarget, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpRouteTarget) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpRouteTarget) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpRouteTarget) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpRouteTarget) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpRouteTarget) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpRouteTarget) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpRouteTarget) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpRouteTarget) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpRouteTarget) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpRouteTarget) Clone() (BgpRouteTarget, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpRouteTarget() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpRouteTarget is bGP Route Target. +type BgpRouteTarget interface { + Validation + // msg marshals BgpRouteTarget to protobuf object *otg.BgpRouteTarget + // and doesn't set defaults + msg() *otg.BgpRouteTarget + // setMsg unmarshals BgpRouteTarget from protobuf object *otg.BgpRouteTarget + // and doesn't set defaults + setMsg(*otg.BgpRouteTarget) BgpRouteTarget + // provides marshal interface + Marshal() marshalBgpRouteTarget + // provides unmarshal interface + Unmarshal() unMarshalBgpRouteTarget + // validate validates BgpRouteTarget + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpRouteTarget, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RtType returns BgpRouteTargetRtTypeEnum, set in BgpRouteTarget + RtType() BgpRouteTargetRtTypeEnum + // SetRtType assigns BgpRouteTargetRtTypeEnum provided by user to BgpRouteTarget + SetRtType(value BgpRouteTargetRtTypeEnum) BgpRouteTarget + // HasRtType checks if RtType has been set in BgpRouteTarget + HasRtType() bool + // RtValue returns string, set in BgpRouteTarget. + RtValue() string + // SetRtValue assigns string provided by user to BgpRouteTarget + SetRtValue(value string) BgpRouteTarget + // HasRtValue checks if RtValue has been set in BgpRouteTarget + HasRtValue() bool +} + +type BgpRouteTargetRtTypeEnum string + +// Enum of RtType on BgpRouteTarget +var BgpRouteTargetRtType = struct { + AS_2OCTET BgpRouteTargetRtTypeEnum + IPV4_ADDRESS BgpRouteTargetRtTypeEnum + AS_4OCTET BgpRouteTargetRtTypeEnum +}{ + AS_2OCTET: BgpRouteTargetRtTypeEnum("as_2octet"), + IPV4_ADDRESS: BgpRouteTargetRtTypeEnum("ipv4_address"), + AS_4OCTET: BgpRouteTargetRtTypeEnum("as_4octet"), +} + +func (obj *bgpRouteTarget) RtType() BgpRouteTargetRtTypeEnum { + return BgpRouteTargetRtTypeEnum(obj.obj.RtType.Enum().String()) +} + +// Extended Community Type field of 2 Byte. +// - as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). +// - ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). +// - as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). +// RtType returns a string +func (obj *bgpRouteTarget) HasRtType() bool { + return obj.obj.RtType != nil +} + +func (obj *bgpRouteTarget) SetRtType(value BgpRouteTargetRtTypeEnum) BgpRouteTarget { + intValue, ok := otg.BgpRouteTarget_RtType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpRouteTargetRtTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpRouteTarget_RtType_Enum(intValue) + obj.obj.RtType = &enumValue + + return obj +} + +// Colon separated Extended Community value of 6 Bytes - AS number: Assigned Number. Example - for the as_2octet or as_4octet "60005:100", for ipv4_address "1.1.1.1:100" +// RtValue returns a string +func (obj *bgpRouteTarget) RtValue() string { + + return *obj.obj.RtValue + +} + +// Colon separated Extended Community value of 6 Bytes - AS number: Assigned Number. Example - for the as_2octet or as_4octet "60005:100", for ipv4_address "1.1.1.1:100" +// RtValue returns a string +func (obj *bgpRouteTarget) HasRtValue() bool { + return obj.obj.RtValue != nil +} + +// Colon separated Extended Community value of 6 Bytes - AS number: Assigned Number. Example - for the as_2octet or as_4octet "60005:100", for ipv4_address "1.1.1.1:100" +// SetRtValue sets the string value in the BgpRouteTarget object +func (obj *bgpRouteTarget) SetRtValue(value string) BgpRouteTarget { + + obj.obj.RtValue = &value + return obj +} + +func (obj *bgpRouteTarget) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpRouteTarget) setDefault() { + +} diff --git a/gosnappi/bgp_srte_binding_sub_tlv.go b/gosnappi/bgp_srte_binding_sub_tlv.go new file mode 100644 index 00000000..b72f0e26 --- /dev/null +++ b/gosnappi/bgp_srte_binding_sub_tlv.go @@ -0,0 +1,451 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteBindingSubTlv ***** +type bgpSrteBindingSubTlv struct { + validation + obj *otg.BgpSrteBindingSubTlv + marshaller marshalBgpSrteBindingSubTlv + unMarshaller unMarshalBgpSrteBindingSubTlv +} + +func NewBgpSrteBindingSubTlv() BgpSrteBindingSubTlv { + obj := bgpSrteBindingSubTlv{obj: &otg.BgpSrteBindingSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteBindingSubTlv) msg() *otg.BgpSrteBindingSubTlv { + return obj.obj +} + +func (obj *bgpSrteBindingSubTlv) setMsg(msg *otg.BgpSrteBindingSubTlv) BgpSrteBindingSubTlv { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteBindingSubTlv struct { + obj *bgpSrteBindingSubTlv +} + +type marshalBgpSrteBindingSubTlv interface { + // ToProto marshals BgpSrteBindingSubTlv to protobuf object *otg.BgpSrteBindingSubTlv + ToProto() (*otg.BgpSrteBindingSubTlv, error) + // ToPbText marshals BgpSrteBindingSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteBindingSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteBindingSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteBindingSubTlv struct { + obj *bgpSrteBindingSubTlv +} + +type unMarshalBgpSrteBindingSubTlv interface { + // FromProto unmarshals BgpSrteBindingSubTlv from protobuf object *otg.BgpSrteBindingSubTlv + FromProto(msg *otg.BgpSrteBindingSubTlv) (BgpSrteBindingSubTlv, error) + // FromPbText unmarshals BgpSrteBindingSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteBindingSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteBindingSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteBindingSubTlv) Marshal() marshalBgpSrteBindingSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteBindingSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteBindingSubTlv) Unmarshal() unMarshalBgpSrteBindingSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteBindingSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteBindingSubTlv) ToProto() (*otg.BgpSrteBindingSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteBindingSubTlv) FromProto(msg *otg.BgpSrteBindingSubTlv) (BgpSrteBindingSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteBindingSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteBindingSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteBindingSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteBindingSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteBindingSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteBindingSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteBindingSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteBindingSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteBindingSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteBindingSubTlv) Clone() (BgpSrteBindingSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteBindingSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpSrteBindingSubTlv is configuration for the binding SID sub-TLV. This is used to signal the binding SID related information of the SR Policy candidate path. +type BgpSrteBindingSubTlv interface { + Validation + // msg marshals BgpSrteBindingSubTlv to protobuf object *otg.BgpSrteBindingSubTlv + // and doesn't set defaults + msg() *otg.BgpSrteBindingSubTlv + // setMsg unmarshals BgpSrteBindingSubTlv from protobuf object *otg.BgpSrteBindingSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteBindingSubTlv) BgpSrteBindingSubTlv + // provides marshal interface + Marshal() marshalBgpSrteBindingSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteBindingSubTlv + // validate validates BgpSrteBindingSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteBindingSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // BindingSidType returns BgpSrteBindingSubTlvBindingSidTypeEnum, set in BgpSrteBindingSubTlv + BindingSidType() BgpSrteBindingSubTlvBindingSidTypeEnum + // SetBindingSidType assigns BgpSrteBindingSubTlvBindingSidTypeEnum provided by user to BgpSrteBindingSubTlv + SetBindingSidType(value BgpSrteBindingSubTlvBindingSidTypeEnum) BgpSrteBindingSubTlv + // HasBindingSidType checks if BindingSidType has been set in BgpSrteBindingSubTlv + HasBindingSidType() bool + // FourOctetSid returns uint32, set in BgpSrteBindingSubTlv. + FourOctetSid() uint32 + // SetFourOctetSid assigns uint32 provided by user to BgpSrteBindingSubTlv + SetFourOctetSid(value uint32) BgpSrteBindingSubTlv + // HasFourOctetSid checks if FourOctetSid has been set in BgpSrteBindingSubTlv + HasFourOctetSid() bool + // Ipv6Sid returns string, set in BgpSrteBindingSubTlv. + Ipv6Sid() string + // SetIpv6Sid assigns string provided by user to BgpSrteBindingSubTlv + SetIpv6Sid(value string) BgpSrteBindingSubTlv + // HasIpv6Sid checks if Ipv6Sid has been set in BgpSrteBindingSubTlv + HasIpv6Sid() bool + // SFlag returns bool, set in BgpSrteBindingSubTlv. + SFlag() bool + // SetSFlag assigns bool provided by user to BgpSrteBindingSubTlv + SetSFlag(value bool) BgpSrteBindingSubTlv + // HasSFlag checks if SFlag has been set in BgpSrteBindingSubTlv + HasSFlag() bool + // IFlag returns bool, set in BgpSrteBindingSubTlv. + IFlag() bool + // SetIFlag assigns bool provided by user to BgpSrteBindingSubTlv + SetIFlag(value bool) BgpSrteBindingSubTlv + // HasIFlag checks if IFlag has been set in BgpSrteBindingSubTlv + HasIFlag() bool +} + +type BgpSrteBindingSubTlvBindingSidTypeEnum string + +// Enum of BindingSidType on BgpSrteBindingSubTlv +var BgpSrteBindingSubTlvBindingSidType = struct { + NO_BINDING BgpSrteBindingSubTlvBindingSidTypeEnum + FOUR_OCTET_SID BgpSrteBindingSubTlvBindingSidTypeEnum + IPV6_SID BgpSrteBindingSubTlvBindingSidTypeEnum +}{ + NO_BINDING: BgpSrteBindingSubTlvBindingSidTypeEnum("no_binding"), + FOUR_OCTET_SID: BgpSrteBindingSubTlvBindingSidTypeEnum("four_octet_sid"), + IPV6_SID: BgpSrteBindingSubTlvBindingSidTypeEnum("ipv6_sid"), +} + +func (obj *bgpSrteBindingSubTlv) BindingSidType() BgpSrteBindingSubTlvBindingSidTypeEnum { + return BgpSrteBindingSubTlvBindingSidTypeEnum(obj.obj.BindingSidType.Enum().String()) +} + +// Type of the binding SID. Supported types are "No Binding SID" or "Four Octets Sid" or "IPv6 SID". +// BindingSidType returns a string +func (obj *bgpSrteBindingSubTlv) HasBindingSidType() bool { + return obj.obj.BindingSidType != nil +} + +func (obj *bgpSrteBindingSubTlv) SetBindingSidType(value BgpSrteBindingSubTlvBindingSidTypeEnum) BgpSrteBindingSubTlv { + intValue, ok := otg.BgpSrteBindingSubTlv_BindingSidType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpSrteBindingSubTlvBindingSidTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpSrteBindingSubTlv_BindingSidType_Enum(intValue) + obj.obj.BindingSidType = &enumValue + + return obj +} + +// Binding SID is encoded in 4 octets. +// FourOctetSid returns a uint32 +func (obj *bgpSrteBindingSubTlv) FourOctetSid() uint32 { + + return *obj.obj.FourOctetSid + +} + +// Binding SID is encoded in 4 octets. +// FourOctetSid returns a uint32 +func (obj *bgpSrteBindingSubTlv) HasFourOctetSid() bool { + return obj.obj.FourOctetSid != nil +} + +// Binding SID is encoded in 4 octets. +// SetFourOctetSid sets the uint32 value in the BgpSrteBindingSubTlv object +func (obj *bgpSrteBindingSubTlv) SetFourOctetSid(value uint32) BgpSrteBindingSubTlv { + + obj.obj.FourOctetSid = &value + return obj +} + +// IPv6 SID value. +// Ipv6Sid returns a string +func (obj *bgpSrteBindingSubTlv) Ipv6Sid() string { + + return *obj.obj.Ipv6Sid + +} + +// IPv6 SID value. +// Ipv6Sid returns a string +func (obj *bgpSrteBindingSubTlv) HasIpv6Sid() bool { + return obj.obj.Ipv6Sid != nil +} + +// IPv6 SID value. +// SetIpv6Sid sets the string value in the BgpSrteBindingSubTlv object +func (obj *bgpSrteBindingSubTlv) SetIpv6Sid(value string) BgpSrteBindingSubTlv { + + obj.obj.Ipv6Sid = &value + return obj +} + +// S-Flag encodes the "Specified-BSID-only" behavior. +// SFlag returns a bool +func (obj *bgpSrteBindingSubTlv) SFlag() bool { + + return *obj.obj.SFlag + +} + +// S-Flag encodes the "Specified-BSID-only" behavior. +// SFlag returns a bool +func (obj *bgpSrteBindingSubTlv) HasSFlag() bool { + return obj.obj.SFlag != nil +} + +// S-Flag encodes the "Specified-BSID-only" behavior. +// SetSFlag sets the bool value in the BgpSrteBindingSubTlv object +func (obj *bgpSrteBindingSubTlv) SetSFlag(value bool) BgpSrteBindingSubTlv { + + obj.obj.SFlag = &value + return obj +} + +// I-Flag encodes the "Drop Upon Invalid" behavior. +// IFlag returns a bool +func (obj *bgpSrteBindingSubTlv) IFlag() bool { + + return *obj.obj.IFlag + +} + +// I-Flag encodes the "Drop Upon Invalid" behavior. +// IFlag returns a bool +func (obj *bgpSrteBindingSubTlv) HasIFlag() bool { + return obj.obj.IFlag != nil +} + +// I-Flag encodes the "Drop Upon Invalid" behavior. +// SetIFlag sets the bool value in the BgpSrteBindingSubTlv object +func (obj *bgpSrteBindingSubTlv) SetIFlag(value bool) BgpSrteBindingSubTlv { + + obj.obj.IFlag = &value + return obj +} + +func (obj *bgpSrteBindingSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv6Sid != nil { + + err := obj.validateIpv6(obj.Ipv6Sid()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteBindingSubTlv.Ipv6Sid")) + } + + } + +} + +func (obj *bgpSrteBindingSubTlv) setDefault() { + if obj.obj.BindingSidType == nil { + obj.SetBindingSidType(BgpSrteBindingSubTlvBindingSidType.NO_BINDING) + + } + if obj.obj.SFlag == nil { + obj.SetSFlag(false) + } + if obj.obj.IFlag == nil { + obj.SetIFlag(false) + } + +} diff --git a/gosnappi/bgp_srte_color_sub_tlv.go b/gosnappi/bgp_srte_color_sub_tlv.go new file mode 100644 index 00000000..da3d2e40 --- /dev/null +++ b/gosnappi/bgp_srte_color_sub_tlv.go @@ -0,0 +1,315 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteColorSubTlv ***** +type bgpSrteColorSubTlv struct { + validation + obj *otg.BgpSrteColorSubTlv + marshaller marshalBgpSrteColorSubTlv + unMarshaller unMarshalBgpSrteColorSubTlv +} + +func NewBgpSrteColorSubTlv() BgpSrteColorSubTlv { + obj := bgpSrteColorSubTlv{obj: &otg.BgpSrteColorSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteColorSubTlv) msg() *otg.BgpSrteColorSubTlv { + return obj.obj +} + +func (obj *bgpSrteColorSubTlv) setMsg(msg *otg.BgpSrteColorSubTlv) BgpSrteColorSubTlv { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteColorSubTlv struct { + obj *bgpSrteColorSubTlv +} + +type marshalBgpSrteColorSubTlv interface { + // ToProto marshals BgpSrteColorSubTlv to protobuf object *otg.BgpSrteColorSubTlv + ToProto() (*otg.BgpSrteColorSubTlv, error) + // ToPbText marshals BgpSrteColorSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteColorSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteColorSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteColorSubTlv struct { + obj *bgpSrteColorSubTlv +} + +type unMarshalBgpSrteColorSubTlv interface { + // FromProto unmarshals BgpSrteColorSubTlv from protobuf object *otg.BgpSrteColorSubTlv + FromProto(msg *otg.BgpSrteColorSubTlv) (BgpSrteColorSubTlv, error) + // FromPbText unmarshals BgpSrteColorSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteColorSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteColorSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteColorSubTlv) Marshal() marshalBgpSrteColorSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteColorSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteColorSubTlv) Unmarshal() unMarshalBgpSrteColorSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteColorSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteColorSubTlv) ToProto() (*otg.BgpSrteColorSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteColorSubTlv) FromProto(msg *otg.BgpSrteColorSubTlv) (BgpSrteColorSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteColorSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteColorSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteColorSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteColorSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteColorSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteColorSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteColorSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteColorSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteColorSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteColorSubTlv) Clone() (BgpSrteColorSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteColorSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpSrteColorSubTlv is configuration for the Policy Color attribute sub-TLV. The Color sub-TLV MAY be used as a way to "color" the corresponding Tunnel TLV. The Value field of the sub-TLV is eight octets long and consists of a Color Extended Community. First two octets of its Value field are 0x030b as type and subtype of extended community. Remaining six octets are are exposed to configure. +type BgpSrteColorSubTlv interface { + Validation + // msg marshals BgpSrteColorSubTlv to protobuf object *otg.BgpSrteColorSubTlv + // and doesn't set defaults + msg() *otg.BgpSrteColorSubTlv + // setMsg unmarshals BgpSrteColorSubTlv from protobuf object *otg.BgpSrteColorSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteColorSubTlv) BgpSrteColorSubTlv + // provides marshal interface + Marshal() marshalBgpSrteColorSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteColorSubTlv + // validate validates BgpSrteColorSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteColorSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Color returns string, set in BgpSrteColorSubTlv. + Color() string + // SetColor assigns string provided by user to BgpSrteColorSubTlv + SetColor(value string) BgpSrteColorSubTlv + // HasColor checks if Color has been set in BgpSrteColorSubTlv + HasColor() bool +} + +// Six octet values. Example: 000000000064 for color value 100. +// Color returns a string +func (obj *bgpSrteColorSubTlv) Color() string { + + return *obj.obj.Color + +} + +// Six octet values. Example: 000000000064 for color value 100. +// Color returns a string +func (obj *bgpSrteColorSubTlv) HasColor() bool { + return obj.obj.Color != nil +} + +// Six octet values. Example: 000000000064 for color value 100. +// SetColor sets the string value in the BgpSrteColorSubTlv object +func (obj *bgpSrteColorSubTlv) SetColor(value string) BgpSrteColorSubTlv { + + obj.obj.Color = &value + return obj +} + +func (obj *bgpSrteColorSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Color != nil { + + err := obj.validateHex(obj.Color()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteColorSubTlv.Color")) + } + + } + +} + +func (obj *bgpSrteColorSubTlv) setDefault() { + +} diff --git a/gosnappi/bgp_srte_explicit_null_label_policy_sub_tlv.go b/gosnappi/bgp_srte_explicit_null_label_policy_sub_tlv.go new file mode 100644 index 00000000..8beaef76 --- /dev/null +++ b/gosnappi/bgp_srte_explicit_null_label_policy_sub_tlv.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteExplicitNullLabelPolicySubTlv ***** +type bgpSrteExplicitNullLabelPolicySubTlv struct { + validation + obj *otg.BgpSrteExplicitNullLabelPolicySubTlv + marshaller marshalBgpSrteExplicitNullLabelPolicySubTlv + unMarshaller unMarshalBgpSrteExplicitNullLabelPolicySubTlv +} + +func NewBgpSrteExplicitNullLabelPolicySubTlv() BgpSrteExplicitNullLabelPolicySubTlv { + obj := bgpSrteExplicitNullLabelPolicySubTlv{obj: &otg.BgpSrteExplicitNullLabelPolicySubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteExplicitNullLabelPolicySubTlv) msg() *otg.BgpSrteExplicitNullLabelPolicySubTlv { + return obj.obj +} + +func (obj *bgpSrteExplicitNullLabelPolicySubTlv) setMsg(msg *otg.BgpSrteExplicitNullLabelPolicySubTlv) BgpSrteExplicitNullLabelPolicySubTlv { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteExplicitNullLabelPolicySubTlv struct { + obj *bgpSrteExplicitNullLabelPolicySubTlv +} + +type marshalBgpSrteExplicitNullLabelPolicySubTlv interface { + // ToProto marshals BgpSrteExplicitNullLabelPolicySubTlv to protobuf object *otg.BgpSrteExplicitNullLabelPolicySubTlv + ToProto() (*otg.BgpSrteExplicitNullLabelPolicySubTlv, error) + // ToPbText marshals BgpSrteExplicitNullLabelPolicySubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteExplicitNullLabelPolicySubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteExplicitNullLabelPolicySubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteExplicitNullLabelPolicySubTlv struct { + obj *bgpSrteExplicitNullLabelPolicySubTlv +} + +type unMarshalBgpSrteExplicitNullLabelPolicySubTlv interface { + // FromProto unmarshals BgpSrteExplicitNullLabelPolicySubTlv from protobuf object *otg.BgpSrteExplicitNullLabelPolicySubTlv + FromProto(msg *otg.BgpSrteExplicitNullLabelPolicySubTlv) (BgpSrteExplicitNullLabelPolicySubTlv, error) + // FromPbText unmarshals BgpSrteExplicitNullLabelPolicySubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteExplicitNullLabelPolicySubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteExplicitNullLabelPolicySubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteExplicitNullLabelPolicySubTlv) Marshal() marshalBgpSrteExplicitNullLabelPolicySubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteExplicitNullLabelPolicySubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteExplicitNullLabelPolicySubTlv) Unmarshal() unMarshalBgpSrteExplicitNullLabelPolicySubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteExplicitNullLabelPolicySubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteExplicitNullLabelPolicySubTlv) ToProto() (*otg.BgpSrteExplicitNullLabelPolicySubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteExplicitNullLabelPolicySubTlv) FromProto(msg *otg.BgpSrteExplicitNullLabelPolicySubTlv) (BgpSrteExplicitNullLabelPolicySubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteExplicitNullLabelPolicySubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteExplicitNullLabelPolicySubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteExplicitNullLabelPolicySubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteExplicitNullLabelPolicySubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteExplicitNullLabelPolicySubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteExplicitNullLabelPolicySubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteExplicitNullLabelPolicySubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteExplicitNullLabelPolicySubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteExplicitNullLabelPolicySubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteExplicitNullLabelPolicySubTlv) Clone() (BgpSrteExplicitNullLabelPolicySubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteExplicitNullLabelPolicySubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpSrteExplicitNullLabelPolicySubTlv is configuration for BGP explicit null label policy sub TLV settings. +type BgpSrteExplicitNullLabelPolicySubTlv interface { + Validation + // msg marshals BgpSrteExplicitNullLabelPolicySubTlv to protobuf object *otg.BgpSrteExplicitNullLabelPolicySubTlv + // and doesn't set defaults + msg() *otg.BgpSrteExplicitNullLabelPolicySubTlv + // setMsg unmarshals BgpSrteExplicitNullLabelPolicySubTlv from protobuf object *otg.BgpSrteExplicitNullLabelPolicySubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteExplicitNullLabelPolicySubTlv) BgpSrteExplicitNullLabelPolicySubTlv + // provides marshal interface + Marshal() marshalBgpSrteExplicitNullLabelPolicySubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteExplicitNullLabelPolicySubTlv + // validate validates BgpSrteExplicitNullLabelPolicySubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteExplicitNullLabelPolicySubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ExplicitNullLabelPolicy returns BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum, set in BgpSrteExplicitNullLabelPolicySubTlv + ExplicitNullLabelPolicy() BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum + // SetExplicitNullLabelPolicy assigns BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum provided by user to BgpSrteExplicitNullLabelPolicySubTlv + SetExplicitNullLabelPolicy(value BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum) BgpSrteExplicitNullLabelPolicySubTlv + // HasExplicitNullLabelPolicy checks if ExplicitNullLabelPolicy has been set in BgpSrteExplicitNullLabelPolicySubTlv + HasExplicitNullLabelPolicy() bool +} + +type BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum string + +// Enum of ExplicitNullLabelPolicy on BgpSrteExplicitNullLabelPolicySubTlv +var BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicy = struct { + RESERVED_ENLP BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum + PUSH_IPV4_ENLP BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum + PUSH_IPV6_ENLP BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum + PUSH_IPV4_IPV6_ENLP BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum + DO_NOT_PUSH_ENLP BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum +}{ + RESERVED_ENLP: BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum("reserved_enlp"), + PUSH_IPV4_ENLP: BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum("push_ipv4_enlp"), + PUSH_IPV6_ENLP: BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum("push_ipv6_enlp"), + PUSH_IPV4_IPV6_ENLP: BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum("push_ipv4_ipv6_enlp"), + DO_NOT_PUSH_ENLP: BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum("do_not_push_enlp"), +} + +func (obj *bgpSrteExplicitNullLabelPolicySubTlv) ExplicitNullLabelPolicy() BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum { + return BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum(obj.obj.ExplicitNullLabelPolicy.Enum().String()) +} + +// The value of the explicit null label policy +// ExplicitNullLabelPolicy returns a string +func (obj *bgpSrteExplicitNullLabelPolicySubTlv) HasExplicitNullLabelPolicy() bool { + return obj.obj.ExplicitNullLabelPolicy != nil +} + +func (obj *bgpSrteExplicitNullLabelPolicySubTlv) SetExplicitNullLabelPolicy(value BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum) BgpSrteExplicitNullLabelPolicySubTlv { + intValue, ok := otg.BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicyEnum", string(value))) + return obj + } + enumValue := otg.BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum(intValue) + obj.obj.ExplicitNullLabelPolicy = &enumValue + + return obj +} + +func (obj *bgpSrteExplicitNullLabelPolicySubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpSrteExplicitNullLabelPolicySubTlv) setDefault() { + if obj.obj.ExplicitNullLabelPolicy == nil { + obj.SetExplicitNullLabelPolicy(BgpSrteExplicitNullLabelPolicySubTlvExplicitNullLabelPolicy.DO_NOT_PUSH_ENLP) + + } + +} diff --git a/gosnappi/bgp_srte_policy_name_sub_tlv.go b/gosnappi/bgp_srte_policy_name_sub_tlv.go new file mode 100644 index 00000000..2646b90c --- /dev/null +++ b/gosnappi/bgp_srte_policy_name_sub_tlv.go @@ -0,0 +1,318 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrtePolicyNameSubTlv ***** +type bgpSrtePolicyNameSubTlv struct { + validation + obj *otg.BgpSrtePolicyNameSubTlv + marshaller marshalBgpSrtePolicyNameSubTlv + unMarshaller unMarshalBgpSrtePolicyNameSubTlv +} + +func NewBgpSrtePolicyNameSubTlv() BgpSrtePolicyNameSubTlv { + obj := bgpSrtePolicyNameSubTlv{obj: &otg.BgpSrtePolicyNameSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrtePolicyNameSubTlv) msg() *otg.BgpSrtePolicyNameSubTlv { + return obj.obj +} + +func (obj *bgpSrtePolicyNameSubTlv) setMsg(msg *otg.BgpSrtePolicyNameSubTlv) BgpSrtePolicyNameSubTlv { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrtePolicyNameSubTlv struct { + obj *bgpSrtePolicyNameSubTlv +} + +type marshalBgpSrtePolicyNameSubTlv interface { + // ToProto marshals BgpSrtePolicyNameSubTlv to protobuf object *otg.BgpSrtePolicyNameSubTlv + ToProto() (*otg.BgpSrtePolicyNameSubTlv, error) + // ToPbText marshals BgpSrtePolicyNameSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrtePolicyNameSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrtePolicyNameSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrtePolicyNameSubTlv struct { + obj *bgpSrtePolicyNameSubTlv +} + +type unMarshalBgpSrtePolicyNameSubTlv interface { + // FromProto unmarshals BgpSrtePolicyNameSubTlv from protobuf object *otg.BgpSrtePolicyNameSubTlv + FromProto(msg *otg.BgpSrtePolicyNameSubTlv) (BgpSrtePolicyNameSubTlv, error) + // FromPbText unmarshals BgpSrtePolicyNameSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrtePolicyNameSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrtePolicyNameSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrtePolicyNameSubTlv) Marshal() marshalBgpSrtePolicyNameSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrtePolicyNameSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrtePolicyNameSubTlv) Unmarshal() unMarshalBgpSrtePolicyNameSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrtePolicyNameSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrtePolicyNameSubTlv) ToProto() (*otg.BgpSrtePolicyNameSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrtePolicyNameSubTlv) FromProto(msg *otg.BgpSrtePolicyNameSubTlv) (BgpSrtePolicyNameSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrtePolicyNameSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrtePolicyNameSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrtePolicyNameSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrtePolicyNameSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrtePolicyNameSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrtePolicyNameSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrtePolicyNameSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrtePolicyNameSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrtePolicyNameSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrtePolicyNameSubTlv) Clone() (BgpSrtePolicyNameSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrtePolicyNameSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpSrtePolicyNameSubTlv is configuration for the Policy Name sub-TLV. The Policy Name sub-TLV is used to attach a symbolic name to the SR Policy candidate path. +type BgpSrtePolicyNameSubTlv interface { + Validation + // msg marshals BgpSrtePolicyNameSubTlv to protobuf object *otg.BgpSrtePolicyNameSubTlv + // and doesn't set defaults + msg() *otg.BgpSrtePolicyNameSubTlv + // setMsg unmarshals BgpSrtePolicyNameSubTlv from protobuf object *otg.BgpSrtePolicyNameSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrtePolicyNameSubTlv) BgpSrtePolicyNameSubTlv + // provides marshal interface + Marshal() marshalBgpSrtePolicyNameSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrtePolicyNameSubTlv + // validate validates BgpSrtePolicyNameSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrtePolicyNameSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PolicyName returns string, set in BgpSrtePolicyNameSubTlv. + PolicyName() string + // SetPolicyName assigns string provided by user to BgpSrtePolicyNameSubTlv + SetPolicyName(value string) BgpSrtePolicyNameSubTlv + // HasPolicyName checks if PolicyName has been set in BgpSrtePolicyNameSubTlv + HasPolicyName() bool +} + +// Symbolic name for the policy that should be a string of printable ASCII characters, without a NULL terminator. +// PolicyName returns a string +func (obj *bgpSrtePolicyNameSubTlv) PolicyName() string { + + return *obj.obj.PolicyName + +} + +// Symbolic name for the policy that should be a string of printable ASCII characters, without a NULL terminator. +// PolicyName returns a string +func (obj *bgpSrtePolicyNameSubTlv) HasPolicyName() bool { + return obj.obj.PolicyName != nil +} + +// Symbolic name for the policy that should be a string of printable ASCII characters, without a NULL terminator. +// SetPolicyName sets the string value in the BgpSrtePolicyNameSubTlv object +func (obj *bgpSrtePolicyNameSubTlv) SetPolicyName(value string) BgpSrtePolicyNameSubTlv { + + obj.obj.PolicyName = &value + return obj +} + +func (obj *bgpSrtePolicyNameSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.PolicyName != nil { + + if len(*obj.obj.PolicyName) < 1 || len(*obj.obj.PolicyName) > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "1 <= length of BgpSrtePolicyNameSubTlv.PolicyName <= 32 but Got %d", + len(*obj.obj.PolicyName))) + } + + } + +} + +func (obj *bgpSrtePolicyNameSubTlv) setDefault() { + +} diff --git a/gosnappi/bgp_srte_policy_priority_sub_tlv.go b/gosnappi/bgp_srte_policy_priority_sub_tlv.go new file mode 100644 index 00000000..c6b34c7d --- /dev/null +++ b/gosnappi/bgp_srte_policy_priority_sub_tlv.go @@ -0,0 +1,316 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrtePolicyPrioritySubTlv ***** +type bgpSrtePolicyPrioritySubTlv struct { + validation + obj *otg.BgpSrtePolicyPrioritySubTlv + marshaller marshalBgpSrtePolicyPrioritySubTlv + unMarshaller unMarshalBgpSrtePolicyPrioritySubTlv +} + +func NewBgpSrtePolicyPrioritySubTlv() BgpSrtePolicyPrioritySubTlv { + obj := bgpSrtePolicyPrioritySubTlv{obj: &otg.BgpSrtePolicyPrioritySubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrtePolicyPrioritySubTlv) msg() *otg.BgpSrtePolicyPrioritySubTlv { + return obj.obj +} + +func (obj *bgpSrtePolicyPrioritySubTlv) setMsg(msg *otg.BgpSrtePolicyPrioritySubTlv) BgpSrtePolicyPrioritySubTlv { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrtePolicyPrioritySubTlv struct { + obj *bgpSrtePolicyPrioritySubTlv +} + +type marshalBgpSrtePolicyPrioritySubTlv interface { + // ToProto marshals BgpSrtePolicyPrioritySubTlv to protobuf object *otg.BgpSrtePolicyPrioritySubTlv + ToProto() (*otg.BgpSrtePolicyPrioritySubTlv, error) + // ToPbText marshals BgpSrtePolicyPrioritySubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrtePolicyPrioritySubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrtePolicyPrioritySubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrtePolicyPrioritySubTlv struct { + obj *bgpSrtePolicyPrioritySubTlv +} + +type unMarshalBgpSrtePolicyPrioritySubTlv interface { + // FromProto unmarshals BgpSrtePolicyPrioritySubTlv from protobuf object *otg.BgpSrtePolicyPrioritySubTlv + FromProto(msg *otg.BgpSrtePolicyPrioritySubTlv) (BgpSrtePolicyPrioritySubTlv, error) + // FromPbText unmarshals BgpSrtePolicyPrioritySubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrtePolicyPrioritySubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrtePolicyPrioritySubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrtePolicyPrioritySubTlv) Marshal() marshalBgpSrtePolicyPrioritySubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrtePolicyPrioritySubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrtePolicyPrioritySubTlv) Unmarshal() unMarshalBgpSrtePolicyPrioritySubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrtePolicyPrioritySubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrtePolicyPrioritySubTlv) ToProto() (*otg.BgpSrtePolicyPrioritySubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrtePolicyPrioritySubTlv) FromProto(msg *otg.BgpSrtePolicyPrioritySubTlv) (BgpSrtePolicyPrioritySubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrtePolicyPrioritySubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrtePolicyPrioritySubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrtePolicyPrioritySubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrtePolicyPrioritySubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrtePolicyPrioritySubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrtePolicyPrioritySubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrtePolicyPrioritySubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrtePolicyPrioritySubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrtePolicyPrioritySubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrtePolicyPrioritySubTlv) Clone() (BgpSrtePolicyPrioritySubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrtePolicyPrioritySubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpSrtePolicyPrioritySubTlv is configuration for the Policy Priority sub-TLV. The Policy Priority to indicate the order in which the SR policies are re-computed upon topological change. +type BgpSrtePolicyPrioritySubTlv interface { + Validation + // msg marshals BgpSrtePolicyPrioritySubTlv to protobuf object *otg.BgpSrtePolicyPrioritySubTlv + // and doesn't set defaults + msg() *otg.BgpSrtePolicyPrioritySubTlv + // setMsg unmarshals BgpSrtePolicyPrioritySubTlv from protobuf object *otg.BgpSrtePolicyPrioritySubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrtePolicyPrioritySubTlv) BgpSrtePolicyPrioritySubTlv + // provides marshal interface + Marshal() marshalBgpSrtePolicyPrioritySubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrtePolicyPrioritySubTlv + // validate validates BgpSrtePolicyPrioritySubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrtePolicyPrioritySubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PolicyPriority returns uint32, set in BgpSrtePolicyPrioritySubTlv. + PolicyPriority() uint32 + // SetPolicyPriority assigns uint32 provided by user to BgpSrtePolicyPrioritySubTlv + SetPolicyPriority(value uint32) BgpSrtePolicyPrioritySubTlv + // HasPolicyPriority checks if PolicyPriority has been set in BgpSrtePolicyPrioritySubTlv + HasPolicyPriority() bool +} + +// One-octet Priority value. +// PolicyPriority returns a uint32 +func (obj *bgpSrtePolicyPrioritySubTlv) PolicyPriority() uint32 { + + return *obj.obj.PolicyPriority + +} + +// One-octet Priority value. +// PolicyPriority returns a uint32 +func (obj *bgpSrtePolicyPrioritySubTlv) HasPolicyPriority() bool { + return obj.obj.PolicyPriority != nil +} + +// One-octet Priority value. +// SetPolicyPriority sets the uint32 value in the BgpSrtePolicyPrioritySubTlv object +func (obj *bgpSrtePolicyPrioritySubTlv) SetPolicyPriority(value uint32) BgpSrtePolicyPrioritySubTlv { + + obj.obj.PolicyPriority = &value + return obj +} + +func (obj *bgpSrtePolicyPrioritySubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.PolicyPriority != nil { + + if *obj.obj.PolicyPriority > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpSrtePolicyPrioritySubTlv.PolicyPriority <= 255 but Got %d", *obj.obj.PolicyPriority)) + } + + } + +} + +func (obj *bgpSrtePolicyPrioritySubTlv) setDefault() { + +} diff --git a/gosnappi/bgp_srte_preference_sub_tlv.go b/gosnappi/bgp_srte_preference_sub_tlv.go new file mode 100644 index 00000000..aca3410a --- /dev/null +++ b/gosnappi/bgp_srte_preference_sub_tlv.go @@ -0,0 +1,309 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrtePreferenceSubTlv ***** +type bgpSrtePreferenceSubTlv struct { + validation + obj *otg.BgpSrtePreferenceSubTlv + marshaller marshalBgpSrtePreferenceSubTlv + unMarshaller unMarshalBgpSrtePreferenceSubTlv +} + +func NewBgpSrtePreferenceSubTlv() BgpSrtePreferenceSubTlv { + obj := bgpSrtePreferenceSubTlv{obj: &otg.BgpSrtePreferenceSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrtePreferenceSubTlv) msg() *otg.BgpSrtePreferenceSubTlv { + return obj.obj +} + +func (obj *bgpSrtePreferenceSubTlv) setMsg(msg *otg.BgpSrtePreferenceSubTlv) BgpSrtePreferenceSubTlv { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrtePreferenceSubTlv struct { + obj *bgpSrtePreferenceSubTlv +} + +type marshalBgpSrtePreferenceSubTlv interface { + // ToProto marshals BgpSrtePreferenceSubTlv to protobuf object *otg.BgpSrtePreferenceSubTlv + ToProto() (*otg.BgpSrtePreferenceSubTlv, error) + // ToPbText marshals BgpSrtePreferenceSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrtePreferenceSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrtePreferenceSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrtePreferenceSubTlv struct { + obj *bgpSrtePreferenceSubTlv +} + +type unMarshalBgpSrtePreferenceSubTlv interface { + // FromProto unmarshals BgpSrtePreferenceSubTlv from protobuf object *otg.BgpSrtePreferenceSubTlv + FromProto(msg *otg.BgpSrtePreferenceSubTlv) (BgpSrtePreferenceSubTlv, error) + // FromPbText unmarshals BgpSrtePreferenceSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrtePreferenceSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrtePreferenceSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrtePreferenceSubTlv) Marshal() marshalBgpSrtePreferenceSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrtePreferenceSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrtePreferenceSubTlv) Unmarshal() unMarshalBgpSrtePreferenceSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrtePreferenceSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrtePreferenceSubTlv) ToProto() (*otg.BgpSrtePreferenceSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrtePreferenceSubTlv) FromProto(msg *otg.BgpSrtePreferenceSubTlv) (BgpSrtePreferenceSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrtePreferenceSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrtePreferenceSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrtePreferenceSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrtePreferenceSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrtePreferenceSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrtePreferenceSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrtePreferenceSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrtePreferenceSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrtePreferenceSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrtePreferenceSubTlv) Clone() (BgpSrtePreferenceSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrtePreferenceSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpSrtePreferenceSubTlv is configuration for BGP preference sub TLV of the SR Policy candidate path. +type BgpSrtePreferenceSubTlv interface { + Validation + // msg marshals BgpSrtePreferenceSubTlv to protobuf object *otg.BgpSrtePreferenceSubTlv + // and doesn't set defaults + msg() *otg.BgpSrtePreferenceSubTlv + // setMsg unmarshals BgpSrtePreferenceSubTlv from protobuf object *otg.BgpSrtePreferenceSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrtePreferenceSubTlv) BgpSrtePreferenceSubTlv + // provides marshal interface + Marshal() marshalBgpSrtePreferenceSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrtePreferenceSubTlv + // validate validates BgpSrtePreferenceSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrtePreferenceSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Preference returns uint32, set in BgpSrtePreferenceSubTlv. + Preference() uint32 + // SetPreference assigns uint32 provided by user to BgpSrtePreferenceSubTlv + SetPreference(value uint32) BgpSrtePreferenceSubTlv + // HasPreference checks if Preference has been set in BgpSrtePreferenceSubTlv + HasPreference() bool +} + +// The preference value of the SR Policy candidate path. +// Preference returns a uint32 +func (obj *bgpSrtePreferenceSubTlv) Preference() uint32 { + + return *obj.obj.Preference + +} + +// The preference value of the SR Policy candidate path. +// Preference returns a uint32 +func (obj *bgpSrtePreferenceSubTlv) HasPreference() bool { + return obj.obj.Preference != nil +} + +// The preference value of the SR Policy candidate path. +// SetPreference sets the uint32 value in the BgpSrtePreferenceSubTlv object +func (obj *bgpSrtePreferenceSubTlv) SetPreference(value uint32) BgpSrtePreferenceSubTlv { + + obj.obj.Preference = &value + return obj +} + +func (obj *bgpSrtePreferenceSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpSrtePreferenceSubTlv) setDefault() { + if obj.obj.Preference == nil { + obj.SetPreference(0) + } + +} diff --git a/gosnappi/bgp_srte_remote_endpoint_sub_tlv.go b/gosnappi/bgp_srte_remote_endpoint_sub_tlv.go new file mode 100644 index 00000000..779f5255 --- /dev/null +++ b/gosnappi/bgp_srte_remote_endpoint_sub_tlv.go @@ -0,0 +1,433 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteRemoteEndpointSubTlv ***** +type bgpSrteRemoteEndpointSubTlv struct { + validation + obj *otg.BgpSrteRemoteEndpointSubTlv + marshaller marshalBgpSrteRemoteEndpointSubTlv + unMarshaller unMarshalBgpSrteRemoteEndpointSubTlv +} + +func NewBgpSrteRemoteEndpointSubTlv() BgpSrteRemoteEndpointSubTlv { + obj := bgpSrteRemoteEndpointSubTlv{obj: &otg.BgpSrteRemoteEndpointSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteRemoteEndpointSubTlv) msg() *otg.BgpSrteRemoteEndpointSubTlv { + return obj.obj +} + +func (obj *bgpSrteRemoteEndpointSubTlv) setMsg(msg *otg.BgpSrteRemoteEndpointSubTlv) BgpSrteRemoteEndpointSubTlv { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteRemoteEndpointSubTlv struct { + obj *bgpSrteRemoteEndpointSubTlv +} + +type marshalBgpSrteRemoteEndpointSubTlv interface { + // ToProto marshals BgpSrteRemoteEndpointSubTlv to protobuf object *otg.BgpSrteRemoteEndpointSubTlv + ToProto() (*otg.BgpSrteRemoteEndpointSubTlv, error) + // ToPbText marshals BgpSrteRemoteEndpointSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteRemoteEndpointSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteRemoteEndpointSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteRemoteEndpointSubTlv struct { + obj *bgpSrteRemoteEndpointSubTlv +} + +type unMarshalBgpSrteRemoteEndpointSubTlv interface { + // FromProto unmarshals BgpSrteRemoteEndpointSubTlv from protobuf object *otg.BgpSrteRemoteEndpointSubTlv + FromProto(msg *otg.BgpSrteRemoteEndpointSubTlv) (BgpSrteRemoteEndpointSubTlv, error) + // FromPbText unmarshals BgpSrteRemoteEndpointSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteRemoteEndpointSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteRemoteEndpointSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteRemoteEndpointSubTlv) Marshal() marshalBgpSrteRemoteEndpointSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteRemoteEndpointSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteRemoteEndpointSubTlv) Unmarshal() unMarshalBgpSrteRemoteEndpointSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteRemoteEndpointSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteRemoteEndpointSubTlv) ToProto() (*otg.BgpSrteRemoteEndpointSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteRemoteEndpointSubTlv) FromProto(msg *otg.BgpSrteRemoteEndpointSubTlv) (BgpSrteRemoteEndpointSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteRemoteEndpointSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteRemoteEndpointSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteRemoteEndpointSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteRemoteEndpointSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteRemoteEndpointSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteRemoteEndpointSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteRemoteEndpointSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteRemoteEndpointSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteRemoteEndpointSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteRemoteEndpointSubTlv) Clone() (BgpSrteRemoteEndpointSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteRemoteEndpointSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpSrteRemoteEndpointSubTlv is configuration for the BGP remote endpoint sub TLV. +type BgpSrteRemoteEndpointSubTlv interface { + Validation + // msg marshals BgpSrteRemoteEndpointSubTlv to protobuf object *otg.BgpSrteRemoteEndpointSubTlv + // and doesn't set defaults + msg() *otg.BgpSrteRemoteEndpointSubTlv + // setMsg unmarshals BgpSrteRemoteEndpointSubTlv from protobuf object *otg.BgpSrteRemoteEndpointSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteRemoteEndpointSubTlv) BgpSrteRemoteEndpointSubTlv + // provides marshal interface + Marshal() marshalBgpSrteRemoteEndpointSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteRemoteEndpointSubTlv + // validate validates BgpSrteRemoteEndpointSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteRemoteEndpointSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // AsNumber returns uint32, set in BgpSrteRemoteEndpointSubTlv. + AsNumber() uint32 + // SetAsNumber assigns uint32 provided by user to BgpSrteRemoteEndpointSubTlv + SetAsNumber(value uint32) BgpSrteRemoteEndpointSubTlv + // HasAsNumber checks if AsNumber has been set in BgpSrteRemoteEndpointSubTlv + HasAsNumber() bool + // AddressFamily returns BgpSrteRemoteEndpointSubTlvAddressFamilyEnum, set in BgpSrteRemoteEndpointSubTlv + AddressFamily() BgpSrteRemoteEndpointSubTlvAddressFamilyEnum + // SetAddressFamily assigns BgpSrteRemoteEndpointSubTlvAddressFamilyEnum provided by user to BgpSrteRemoteEndpointSubTlv + SetAddressFamily(value BgpSrteRemoteEndpointSubTlvAddressFamilyEnum) BgpSrteRemoteEndpointSubTlv + // HasAddressFamily checks if AddressFamily has been set in BgpSrteRemoteEndpointSubTlv + HasAddressFamily() bool + // Ipv4Address returns string, set in BgpSrteRemoteEndpointSubTlv. + Ipv4Address() string + // SetIpv4Address assigns string provided by user to BgpSrteRemoteEndpointSubTlv + SetIpv4Address(value string) BgpSrteRemoteEndpointSubTlv + // HasIpv4Address checks if Ipv4Address has been set in BgpSrteRemoteEndpointSubTlv + HasIpv4Address() bool + // Ipv6Address returns string, set in BgpSrteRemoteEndpointSubTlv. + Ipv6Address() string + // SetIpv6Address assigns string provided by user to BgpSrteRemoteEndpointSubTlv + SetIpv6Address(value string) BgpSrteRemoteEndpointSubTlv + // HasIpv6Address checks if Ipv6Address has been set in BgpSrteRemoteEndpointSubTlv + HasIpv6Address() bool +} + +// Autonomous system (AS) number +// AsNumber returns a uint32 +func (obj *bgpSrteRemoteEndpointSubTlv) AsNumber() uint32 { + + return *obj.obj.AsNumber + +} + +// Autonomous system (AS) number +// AsNumber returns a uint32 +func (obj *bgpSrteRemoteEndpointSubTlv) HasAsNumber() bool { + return obj.obj.AsNumber != nil +} + +// Autonomous system (AS) number +// SetAsNumber sets the uint32 value in the BgpSrteRemoteEndpointSubTlv object +func (obj *bgpSrteRemoteEndpointSubTlv) SetAsNumber(value uint32) BgpSrteRemoteEndpointSubTlv { + + obj.obj.AsNumber = &value + return obj +} + +type BgpSrteRemoteEndpointSubTlvAddressFamilyEnum string + +// Enum of AddressFamily on BgpSrteRemoteEndpointSubTlv +var BgpSrteRemoteEndpointSubTlvAddressFamily = struct { + IPV4 BgpSrteRemoteEndpointSubTlvAddressFamilyEnum + IPV6 BgpSrteRemoteEndpointSubTlvAddressFamilyEnum +}{ + IPV4: BgpSrteRemoteEndpointSubTlvAddressFamilyEnum("ipv4"), + IPV6: BgpSrteRemoteEndpointSubTlvAddressFamilyEnum("ipv6"), +} + +func (obj *bgpSrteRemoteEndpointSubTlv) AddressFamily() BgpSrteRemoteEndpointSubTlvAddressFamilyEnum { + return BgpSrteRemoteEndpointSubTlvAddressFamilyEnum(obj.obj.AddressFamily.Enum().String()) +} + +// Determines the address type +// AddressFamily returns a string +func (obj *bgpSrteRemoteEndpointSubTlv) HasAddressFamily() bool { + return obj.obj.AddressFamily != nil +} + +func (obj *bgpSrteRemoteEndpointSubTlv) SetAddressFamily(value BgpSrteRemoteEndpointSubTlvAddressFamilyEnum) BgpSrteRemoteEndpointSubTlv { + intValue, ok := otg.BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpSrteRemoteEndpointSubTlvAddressFamilyEnum", string(value))) + return obj + } + enumValue := otg.BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum(intValue) + obj.obj.AddressFamily = &enumValue + + return obj +} + +// The IPv4 address of the Remote Endpoint. +// Ipv4Address returns a string +func (obj *bgpSrteRemoteEndpointSubTlv) Ipv4Address() string { + + return *obj.obj.Ipv4Address + +} + +// The IPv4 address of the Remote Endpoint. +// Ipv4Address returns a string +func (obj *bgpSrteRemoteEndpointSubTlv) HasIpv4Address() bool { + return obj.obj.Ipv4Address != nil +} + +// The IPv4 address of the Remote Endpoint. +// SetIpv4Address sets the string value in the BgpSrteRemoteEndpointSubTlv object +func (obj *bgpSrteRemoteEndpointSubTlv) SetIpv4Address(value string) BgpSrteRemoteEndpointSubTlv { + + obj.obj.Ipv4Address = &value + return obj +} + +// The IPv6 address of the Remote Endpoint. +// Ipv6Address returns a string +func (obj *bgpSrteRemoteEndpointSubTlv) Ipv6Address() string { + + return *obj.obj.Ipv6Address + +} + +// The IPv6 address of the Remote Endpoint. +// Ipv6Address returns a string +func (obj *bgpSrteRemoteEndpointSubTlv) HasIpv6Address() bool { + return obj.obj.Ipv6Address != nil +} + +// The IPv6 address of the Remote Endpoint. +// SetIpv6Address sets the string value in the BgpSrteRemoteEndpointSubTlv object +func (obj *bgpSrteRemoteEndpointSubTlv) SetIpv6Address(value string) BgpSrteRemoteEndpointSubTlv { + + obj.obj.Ipv6Address = &value + return obj +} + +func (obj *bgpSrteRemoteEndpointSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv4Address != nil { + + err := obj.validateIpv4(obj.Ipv4Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteRemoteEndpointSubTlv.Ipv4Address")) + } + + } + + if obj.obj.Ipv6Address != nil { + + err := obj.validateIpv6(obj.Ipv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteRemoteEndpointSubTlv.Ipv6Address")) + } + + } + +} + +func (obj *bgpSrteRemoteEndpointSubTlv) setDefault() { + if obj.obj.AsNumber == nil { + obj.SetAsNumber(0) + } + if obj.obj.AddressFamily == nil { + obj.SetAddressFamily(BgpSrteRemoteEndpointSubTlvAddressFamily.IPV4) + + } + if obj.obj.Ipv4Address == nil { + obj.SetIpv4Address("0.0.0.0") + } + if obj.obj.Ipv6Address == nil { + obj.SetIpv6Address("::0") + } + +} diff --git a/gosnappi/bgp_srte_s_rv6_sid_endpoint_behavior_and_structure.go b/gosnappi/bgp_srte_s_rv6_sid_endpoint_behavior_and_structure.go new file mode 100644 index 00000000..ca40bf27 --- /dev/null +++ b/gosnappi/bgp_srte_s_rv6_sid_endpoint_behavior_and_structure.go @@ -0,0 +1,442 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSRv6SIDEndpointBehaviorAndStructure ***** +type bgpSrteSRv6SIDEndpointBehaviorAndStructure struct { + validation + obj *otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure + marshaller marshalBgpSrteSRv6SIDEndpointBehaviorAndStructure + unMarshaller unMarshalBgpSrteSRv6SIDEndpointBehaviorAndStructure +} + +func NewBgpSrteSRv6SIDEndpointBehaviorAndStructure() BgpSrteSRv6SIDEndpointBehaviorAndStructure { + obj := bgpSrteSRv6SIDEndpointBehaviorAndStructure{obj: &otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) msg() *otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure { + return obj.obj +} + +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) setMsg(msg *otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure) BgpSrteSRv6SIDEndpointBehaviorAndStructure { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSRv6SIDEndpointBehaviorAndStructure struct { + obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure +} + +type marshalBgpSrteSRv6SIDEndpointBehaviorAndStructure interface { + // ToProto marshals BgpSrteSRv6SIDEndpointBehaviorAndStructure to protobuf object *otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure + ToProto() (*otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure, error) + // ToPbText marshals BgpSrteSRv6SIDEndpointBehaviorAndStructure to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSRv6SIDEndpointBehaviorAndStructure to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSRv6SIDEndpointBehaviorAndStructure to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSRv6SIDEndpointBehaviorAndStructure struct { + obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure +} + +type unMarshalBgpSrteSRv6SIDEndpointBehaviorAndStructure interface { + // FromProto unmarshals BgpSrteSRv6SIDEndpointBehaviorAndStructure from protobuf object *otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure + FromProto(msg *otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure) (BgpSrteSRv6SIDEndpointBehaviorAndStructure, error) + // FromPbText unmarshals BgpSrteSRv6SIDEndpointBehaviorAndStructure from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSRv6SIDEndpointBehaviorAndStructure from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSRv6SIDEndpointBehaviorAndStructure from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) Marshal() marshalBgpSrteSRv6SIDEndpointBehaviorAndStructure { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSRv6SIDEndpointBehaviorAndStructure{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) Unmarshal() unMarshalBgpSrteSRv6SIDEndpointBehaviorAndStructure { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSRv6SIDEndpointBehaviorAndStructure{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSRv6SIDEndpointBehaviorAndStructure) ToProto() (*otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSRv6SIDEndpointBehaviorAndStructure) FromProto(msg *otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure) (BgpSrteSRv6SIDEndpointBehaviorAndStructure, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSRv6SIDEndpointBehaviorAndStructure) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSRv6SIDEndpointBehaviorAndStructure) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSRv6SIDEndpointBehaviorAndStructure) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSRv6SIDEndpointBehaviorAndStructure) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSRv6SIDEndpointBehaviorAndStructure) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSRv6SIDEndpointBehaviorAndStructure) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) Clone() (BgpSrteSRv6SIDEndpointBehaviorAndStructure, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSRv6SIDEndpointBehaviorAndStructure() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpSrteSRv6SIDEndpointBehaviorAndStructure is configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. +type BgpSrteSRv6SIDEndpointBehaviorAndStructure interface { + Validation + // msg marshals BgpSrteSRv6SIDEndpointBehaviorAndStructure to protobuf object *otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure + // and doesn't set defaults + msg() *otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure + // setMsg unmarshals BgpSrteSRv6SIDEndpointBehaviorAndStructure from protobuf object *otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure + // and doesn't set defaults + setMsg(*otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure) BgpSrteSRv6SIDEndpointBehaviorAndStructure + // provides marshal interface + Marshal() marshalBgpSrteSRv6SIDEndpointBehaviorAndStructure + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSRv6SIDEndpointBehaviorAndStructure + // validate validates BgpSrteSRv6SIDEndpointBehaviorAndStructure + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSRv6SIDEndpointBehaviorAndStructure, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LbLength returns uint32, set in BgpSrteSRv6SIDEndpointBehaviorAndStructure. + LbLength() uint32 + // SetLbLength assigns uint32 provided by user to BgpSrteSRv6SIDEndpointBehaviorAndStructure + SetLbLength(value uint32) BgpSrteSRv6SIDEndpointBehaviorAndStructure + // HasLbLength checks if LbLength has been set in BgpSrteSRv6SIDEndpointBehaviorAndStructure + HasLbLength() bool + // LnLength returns uint32, set in BgpSrteSRv6SIDEndpointBehaviorAndStructure. + LnLength() uint32 + // SetLnLength assigns uint32 provided by user to BgpSrteSRv6SIDEndpointBehaviorAndStructure + SetLnLength(value uint32) BgpSrteSRv6SIDEndpointBehaviorAndStructure + // HasLnLength checks if LnLength has been set in BgpSrteSRv6SIDEndpointBehaviorAndStructure + HasLnLength() bool + // FuncLength returns uint32, set in BgpSrteSRv6SIDEndpointBehaviorAndStructure. + FuncLength() uint32 + // SetFuncLength assigns uint32 provided by user to BgpSrteSRv6SIDEndpointBehaviorAndStructure + SetFuncLength(value uint32) BgpSrteSRv6SIDEndpointBehaviorAndStructure + // HasFuncLength checks if FuncLength has been set in BgpSrteSRv6SIDEndpointBehaviorAndStructure + HasFuncLength() bool + // ArgLength returns uint32, set in BgpSrteSRv6SIDEndpointBehaviorAndStructure. + ArgLength() uint32 + // SetArgLength assigns uint32 provided by user to BgpSrteSRv6SIDEndpointBehaviorAndStructure + SetArgLength(value uint32) BgpSrteSRv6SIDEndpointBehaviorAndStructure + // HasArgLength checks if ArgLength has been set in BgpSrteSRv6SIDEndpointBehaviorAndStructure + HasArgLength() bool +} + +// SRv6 SID Locator Block length in bits. +// LbLength returns a uint32 +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) LbLength() uint32 { + + return *obj.obj.LbLength + +} + +// SRv6 SID Locator Block length in bits. +// LbLength returns a uint32 +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) HasLbLength() bool { + return obj.obj.LbLength != nil +} + +// SRv6 SID Locator Block length in bits. +// SetLbLength sets the uint32 value in the BgpSrteSRv6SIDEndpointBehaviorAndStructure object +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) SetLbLength(value uint32) BgpSrteSRv6SIDEndpointBehaviorAndStructure { + + obj.obj.LbLength = &value + return obj +} + +// SRv6 SID Locator Node length in bits. +// LnLength returns a uint32 +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) LnLength() uint32 { + + return *obj.obj.LnLength + +} + +// SRv6 SID Locator Node length in bits. +// LnLength returns a uint32 +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) HasLnLength() bool { + return obj.obj.LnLength != nil +} + +// SRv6 SID Locator Node length in bits. +// SetLnLength sets the uint32 value in the BgpSrteSRv6SIDEndpointBehaviorAndStructure object +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) SetLnLength(value uint32) BgpSrteSRv6SIDEndpointBehaviorAndStructure { + + obj.obj.LnLength = &value + return obj +} + +// SRv6 SID Function length in bits. +// FuncLength returns a uint32 +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) FuncLength() uint32 { + + return *obj.obj.FuncLength + +} + +// SRv6 SID Function length in bits. +// FuncLength returns a uint32 +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) HasFuncLength() bool { + return obj.obj.FuncLength != nil +} + +// SRv6 SID Function length in bits. +// SetFuncLength sets the uint32 value in the BgpSrteSRv6SIDEndpointBehaviorAndStructure object +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) SetFuncLength(value uint32) BgpSrteSRv6SIDEndpointBehaviorAndStructure { + + obj.obj.FuncLength = &value + return obj +} + +// SRv6 SID Arguments length in bits. +// ArgLength returns a uint32 +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) ArgLength() uint32 { + + return *obj.obj.ArgLength + +} + +// SRv6 SID Arguments length in bits. +// ArgLength returns a uint32 +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) HasArgLength() bool { + return obj.obj.ArgLength != nil +} + +// SRv6 SID Arguments length in bits. +// SetArgLength sets the uint32 value in the BgpSrteSRv6SIDEndpointBehaviorAndStructure object +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) SetArgLength(value uint32) BgpSrteSRv6SIDEndpointBehaviorAndStructure { + + obj.obj.ArgLength = &value + return obj +} + +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.LbLength != nil { + + if *obj.obj.LbLength > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpSrteSRv6SIDEndpointBehaviorAndStructure.LbLength <= 128 but Got %d", *obj.obj.LbLength)) + } + + } + + if obj.obj.LnLength != nil { + + if *obj.obj.LnLength > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpSrteSRv6SIDEndpointBehaviorAndStructure.LnLength <= 128 but Got %d", *obj.obj.LnLength)) + } + + } + + if obj.obj.FuncLength != nil { + + if *obj.obj.FuncLength > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpSrteSRv6SIDEndpointBehaviorAndStructure.FuncLength <= 128 but Got %d", *obj.obj.FuncLength)) + } + + } + + if obj.obj.ArgLength != nil { + + if *obj.obj.ArgLength > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpSrteSRv6SIDEndpointBehaviorAndStructure.ArgLength <= 128 but Got %d", *obj.obj.ArgLength)) + } + + } + +} + +func (obj *bgpSrteSRv6SIDEndpointBehaviorAndStructure) setDefault() { + if obj.obj.LbLength == nil { + obj.SetLbLength(0) + } + if obj.obj.LnLength == nil { + obj.SetLnLength(0) + } + if obj.obj.FuncLength == nil { + obj.SetFuncLength(0) + } + if obj.obj.ArgLength == nil { + obj.SetArgLength(0) + } + +} diff --git a/gosnappi/bgp_srte_segment.go b/gosnappi/bgp_srte_segment.go new file mode 100644 index 00000000..5fdd0f07 --- /dev/null +++ b/gosnappi/bgp_srte_segment.go @@ -0,0 +1,868 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSegment ***** +type bgpSrteSegment struct { + validation + obj *otg.BgpSrteSegment + marshaller marshalBgpSrteSegment + unMarshaller unMarshalBgpSrteSegment + typeAHolder BgpSrteSegmentATypeSubTlv + typeBHolder BgpSrteSegmentBTypeSubTlv + typeCHolder BgpSrteSegmentCTypeSubTlv + typeDHolder BgpSrteSegmentDTypeSubTlv + typeEHolder BgpSrteSegmentETypeSubTlv + typeFHolder BgpSrteSegmentFTypeSubTlv + typeGHolder BgpSrteSegmentGTypeSubTlv + typeHHolder BgpSrteSegmentHTypeSubTlv + typeIHolder BgpSrteSegmentITypeSubTlv + typeJHolder BgpSrteSegmentJTypeSubTlv + typeKHolder BgpSrteSegmentKTypeSubTlv +} + +func NewBgpSrteSegment() BgpSrteSegment { + obj := bgpSrteSegment{obj: &otg.BgpSrteSegment{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSegment) msg() *otg.BgpSrteSegment { + return obj.obj +} + +func (obj *bgpSrteSegment) setMsg(msg *otg.BgpSrteSegment) BgpSrteSegment { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSegment struct { + obj *bgpSrteSegment +} + +type marshalBgpSrteSegment interface { + // ToProto marshals BgpSrteSegment to protobuf object *otg.BgpSrteSegment + ToProto() (*otg.BgpSrteSegment, error) + // ToPbText marshals BgpSrteSegment to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSegment to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSegment to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSegment struct { + obj *bgpSrteSegment +} + +type unMarshalBgpSrteSegment interface { + // FromProto unmarshals BgpSrteSegment from protobuf object *otg.BgpSrteSegment + FromProto(msg *otg.BgpSrteSegment) (BgpSrteSegment, error) + // FromPbText unmarshals BgpSrteSegment from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSegment from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSegment from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSegment) Marshal() marshalBgpSrteSegment { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSegment{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSegment) Unmarshal() unMarshalBgpSrteSegment { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSegment{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSegment) ToProto() (*otg.BgpSrteSegment, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSegment) FromProto(msg *otg.BgpSrteSegment) (BgpSrteSegment, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSegment) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSegment) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSegment) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegment) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSegment) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegment) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSegment) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSegment) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSegment) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSegment) Clone() (BgpSrteSegment, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSegment() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteSegment) setNil() { + obj.typeAHolder = nil + obj.typeBHolder = nil + obj.typeCHolder = nil + obj.typeDHolder = nil + obj.typeEHolder = nil + obj.typeFHolder = nil + obj.typeGHolder = nil + obj.typeHHolder = nil + obj.typeIHolder = nil + obj.typeJHolder = nil + obj.typeKHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteSegment is a Segment sub-TLV describes a single segment in a segment list i.e., a single element of the explicit path. The Segment sub-TLVs are optional. +type BgpSrteSegment interface { + Validation + // msg marshals BgpSrteSegment to protobuf object *otg.BgpSrteSegment + // and doesn't set defaults + msg() *otg.BgpSrteSegment + // setMsg unmarshals BgpSrteSegment from protobuf object *otg.BgpSrteSegment + // and doesn't set defaults + setMsg(*otg.BgpSrteSegment) BgpSrteSegment + // provides marshal interface + Marshal() marshalBgpSrteSegment + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSegment + // validate validates BgpSrteSegment + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSegment, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // SegmentType returns BgpSrteSegmentSegmentTypeEnum, set in BgpSrteSegment + SegmentType() BgpSrteSegmentSegmentTypeEnum + // SetSegmentType assigns BgpSrteSegmentSegmentTypeEnum provided by user to BgpSrteSegment + SetSegmentType(value BgpSrteSegmentSegmentTypeEnum) BgpSrteSegment + // TypeA returns BgpSrteSegmentATypeSubTlv, set in BgpSrteSegment. + // BgpSrteSegmentATypeSubTlv is type A: SID only, in the form of MPLS Label. + TypeA() BgpSrteSegmentATypeSubTlv + // SetTypeA assigns BgpSrteSegmentATypeSubTlv provided by user to BgpSrteSegment. + // BgpSrteSegmentATypeSubTlv is type A: SID only, in the form of MPLS Label. + SetTypeA(value BgpSrteSegmentATypeSubTlv) BgpSrteSegment + // HasTypeA checks if TypeA has been set in BgpSrteSegment + HasTypeA() bool + // TypeB returns BgpSrteSegmentBTypeSubTlv, set in BgpSrteSegment. + // BgpSrteSegmentBTypeSubTlv is type B: SID only, in the form of IPv6 address. + TypeB() BgpSrteSegmentBTypeSubTlv + // SetTypeB assigns BgpSrteSegmentBTypeSubTlv provided by user to BgpSrteSegment. + // BgpSrteSegmentBTypeSubTlv is type B: SID only, in the form of IPv6 address. + SetTypeB(value BgpSrteSegmentBTypeSubTlv) BgpSrteSegment + // HasTypeB checks if TypeB has been set in BgpSrteSegment + HasTypeB() bool + // TypeC returns BgpSrteSegmentCTypeSubTlv, set in BgpSrteSegment. + // BgpSrteSegmentCTypeSubTlv is type C: IPv4 Node Address with optional SID. + TypeC() BgpSrteSegmentCTypeSubTlv + // SetTypeC assigns BgpSrteSegmentCTypeSubTlv provided by user to BgpSrteSegment. + // BgpSrteSegmentCTypeSubTlv is type C: IPv4 Node Address with optional SID. + SetTypeC(value BgpSrteSegmentCTypeSubTlv) BgpSrteSegment + // HasTypeC checks if TypeC has been set in BgpSrteSegment + HasTypeC() bool + // TypeD returns BgpSrteSegmentDTypeSubTlv, set in BgpSrteSegment. + // BgpSrteSegmentDTypeSubTlv is type D: IPv6 Node Address with optional SID for SR MPLS. + TypeD() BgpSrteSegmentDTypeSubTlv + // SetTypeD assigns BgpSrteSegmentDTypeSubTlv provided by user to BgpSrteSegment. + // BgpSrteSegmentDTypeSubTlv is type D: IPv6 Node Address with optional SID for SR MPLS. + SetTypeD(value BgpSrteSegmentDTypeSubTlv) BgpSrteSegment + // HasTypeD checks if TypeD has been set in BgpSrteSegment + HasTypeD() bool + // TypeE returns BgpSrteSegmentETypeSubTlv, set in BgpSrteSegment. + // BgpSrteSegmentETypeSubTlv is type E: IPv4 Address and Local Interface ID with optional SID + TypeE() BgpSrteSegmentETypeSubTlv + // SetTypeE assigns BgpSrteSegmentETypeSubTlv provided by user to BgpSrteSegment. + // BgpSrteSegmentETypeSubTlv is type E: IPv4 Address and Local Interface ID with optional SID + SetTypeE(value BgpSrteSegmentETypeSubTlv) BgpSrteSegment + // HasTypeE checks if TypeE has been set in BgpSrteSegment + HasTypeE() bool + // TypeF returns BgpSrteSegmentFTypeSubTlv, set in BgpSrteSegment. + // BgpSrteSegmentFTypeSubTlv is type F: IPv4 Local and Remote addresses with optional SID. + TypeF() BgpSrteSegmentFTypeSubTlv + // SetTypeF assigns BgpSrteSegmentFTypeSubTlv provided by user to BgpSrteSegment. + // BgpSrteSegmentFTypeSubTlv is type F: IPv4 Local and Remote addresses with optional SID. + SetTypeF(value BgpSrteSegmentFTypeSubTlv) BgpSrteSegment + // HasTypeF checks if TypeF has been set in BgpSrteSegment + HasTypeF() bool + // TypeG returns BgpSrteSegmentGTypeSubTlv, set in BgpSrteSegment. + // BgpSrteSegmentGTypeSubTlv is type G: IPv6 Address, Interface ID for local and remote pair with optional SID for SR MPLS. + TypeG() BgpSrteSegmentGTypeSubTlv + // SetTypeG assigns BgpSrteSegmentGTypeSubTlv provided by user to BgpSrteSegment. + // BgpSrteSegmentGTypeSubTlv is type G: IPv6 Address, Interface ID for local and remote pair with optional SID for SR MPLS. + SetTypeG(value BgpSrteSegmentGTypeSubTlv) BgpSrteSegment + // HasTypeG checks if TypeG has been set in BgpSrteSegment + HasTypeG() bool + // TypeH returns BgpSrteSegmentHTypeSubTlv, set in BgpSrteSegment. + // BgpSrteSegmentHTypeSubTlv is type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. + TypeH() BgpSrteSegmentHTypeSubTlv + // SetTypeH assigns BgpSrteSegmentHTypeSubTlv provided by user to BgpSrteSegment. + // BgpSrteSegmentHTypeSubTlv is type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. + SetTypeH(value BgpSrteSegmentHTypeSubTlv) BgpSrteSegment + // HasTypeH checks if TypeH has been set in BgpSrteSegment + HasTypeH() bool + // TypeI returns BgpSrteSegmentITypeSubTlv, set in BgpSrteSegment. + // BgpSrteSegmentITypeSubTlv is type I: IPv6 Node Address with optional SRv6 SID. + TypeI() BgpSrteSegmentITypeSubTlv + // SetTypeI assigns BgpSrteSegmentITypeSubTlv provided by user to BgpSrteSegment. + // BgpSrteSegmentITypeSubTlv is type I: IPv6 Node Address with optional SRv6 SID. + SetTypeI(value BgpSrteSegmentITypeSubTlv) BgpSrteSegment + // HasTypeI checks if TypeI has been set in BgpSrteSegment + HasTypeI() bool + // TypeJ returns BgpSrteSegmentJTypeSubTlv, set in BgpSrteSegment. + // BgpSrteSegmentJTypeSubTlv is type J: IPv6 Address, Interface ID for local and remote pair for SRv6 with optional SID. + TypeJ() BgpSrteSegmentJTypeSubTlv + // SetTypeJ assigns BgpSrteSegmentJTypeSubTlv provided by user to BgpSrteSegment. + // BgpSrteSegmentJTypeSubTlv is type J: IPv6 Address, Interface ID for local and remote pair for SRv6 with optional SID. + SetTypeJ(value BgpSrteSegmentJTypeSubTlv) BgpSrteSegment + // HasTypeJ checks if TypeJ has been set in BgpSrteSegment + HasTypeJ() bool + // TypeK returns BgpSrteSegmentKTypeSubTlv, set in BgpSrteSegment. + // BgpSrteSegmentKTypeSubTlv is type K: IPv6 Local and Remote addresses for SRv6 with optional SID. + TypeK() BgpSrteSegmentKTypeSubTlv + // SetTypeK assigns BgpSrteSegmentKTypeSubTlv provided by user to BgpSrteSegment. + // BgpSrteSegmentKTypeSubTlv is type K: IPv6 Local and Remote addresses for SRv6 with optional SID. + SetTypeK(value BgpSrteSegmentKTypeSubTlv) BgpSrteSegment + // HasTypeK checks if TypeK has been set in BgpSrteSegment + HasTypeK() bool + // Name returns string, set in BgpSrteSegment. + Name() string + // SetName assigns string provided by user to BgpSrteSegment + SetName(value string) BgpSrteSegment + // Active returns bool, set in BgpSrteSegment. + Active() bool + // SetActive assigns bool provided by user to BgpSrteSegment + SetActive(value bool) BgpSrteSegment + // HasActive checks if Active has been set in BgpSrteSegment + HasActive() bool + setNil() +} + +type BgpSrteSegmentSegmentTypeEnum string + +// Enum of SegmentType on BgpSrteSegment +var BgpSrteSegmentSegmentType = struct { + TYPE_A BgpSrteSegmentSegmentTypeEnum + TYPE_B BgpSrteSegmentSegmentTypeEnum + TYPE_C BgpSrteSegmentSegmentTypeEnum + TYPE_D BgpSrteSegmentSegmentTypeEnum + TYPE_E BgpSrteSegmentSegmentTypeEnum + TYPE_F BgpSrteSegmentSegmentTypeEnum + TYPE_G BgpSrteSegmentSegmentTypeEnum + TYPE_H BgpSrteSegmentSegmentTypeEnum + TYPE_I BgpSrteSegmentSegmentTypeEnum + TYPE_J BgpSrteSegmentSegmentTypeEnum + TYPE_K BgpSrteSegmentSegmentTypeEnum +}{ + TYPE_A: BgpSrteSegmentSegmentTypeEnum("type_a"), + TYPE_B: BgpSrteSegmentSegmentTypeEnum("type_b"), + TYPE_C: BgpSrteSegmentSegmentTypeEnum("type_c"), + TYPE_D: BgpSrteSegmentSegmentTypeEnum("type_d"), + TYPE_E: BgpSrteSegmentSegmentTypeEnum("type_e"), + TYPE_F: BgpSrteSegmentSegmentTypeEnum("type_f"), + TYPE_G: BgpSrteSegmentSegmentTypeEnum("type_g"), + TYPE_H: BgpSrteSegmentSegmentTypeEnum("type_h"), + TYPE_I: BgpSrteSegmentSegmentTypeEnum("type_i"), + TYPE_J: BgpSrteSegmentSegmentTypeEnum("type_j"), + TYPE_K: BgpSrteSegmentSegmentTypeEnum("type_k"), +} + +func (obj *bgpSrteSegment) SegmentType() BgpSrteSegmentSegmentTypeEnum { + return BgpSrteSegmentSegmentTypeEnum(obj.obj.SegmentType.Enum().String()) +} + +func (obj *bgpSrteSegment) SetSegmentType(value BgpSrteSegmentSegmentTypeEnum) BgpSrteSegment { + intValue, ok := otg.BgpSrteSegment_SegmentType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpSrteSegmentSegmentTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpSrteSegment_SegmentType_Enum(intValue) + obj.obj.SegmentType = &enumValue + + return obj +} + +// description is TBD +// TypeA returns a BgpSrteSegmentATypeSubTlv +func (obj *bgpSrteSegment) TypeA() BgpSrteSegmentATypeSubTlv { + if obj.obj.TypeA == nil { + obj.obj.TypeA = NewBgpSrteSegmentATypeSubTlv().msg() + } + if obj.typeAHolder == nil { + obj.typeAHolder = &bgpSrteSegmentATypeSubTlv{obj: obj.obj.TypeA} + } + return obj.typeAHolder +} + +// description is TBD +// TypeA returns a BgpSrteSegmentATypeSubTlv +func (obj *bgpSrteSegment) HasTypeA() bool { + return obj.obj.TypeA != nil +} + +// description is TBD +// SetTypeA sets the BgpSrteSegmentATypeSubTlv value in the BgpSrteSegment object +func (obj *bgpSrteSegment) SetTypeA(value BgpSrteSegmentATypeSubTlv) BgpSrteSegment { + + obj.typeAHolder = nil + obj.obj.TypeA = value.msg() + + return obj +} + +// description is TBD +// TypeB returns a BgpSrteSegmentBTypeSubTlv +func (obj *bgpSrteSegment) TypeB() BgpSrteSegmentBTypeSubTlv { + if obj.obj.TypeB == nil { + obj.obj.TypeB = NewBgpSrteSegmentBTypeSubTlv().msg() + } + if obj.typeBHolder == nil { + obj.typeBHolder = &bgpSrteSegmentBTypeSubTlv{obj: obj.obj.TypeB} + } + return obj.typeBHolder +} + +// description is TBD +// TypeB returns a BgpSrteSegmentBTypeSubTlv +func (obj *bgpSrteSegment) HasTypeB() bool { + return obj.obj.TypeB != nil +} + +// description is TBD +// SetTypeB sets the BgpSrteSegmentBTypeSubTlv value in the BgpSrteSegment object +func (obj *bgpSrteSegment) SetTypeB(value BgpSrteSegmentBTypeSubTlv) BgpSrteSegment { + + obj.typeBHolder = nil + obj.obj.TypeB = value.msg() + + return obj +} + +// description is TBD +// TypeC returns a BgpSrteSegmentCTypeSubTlv +func (obj *bgpSrteSegment) TypeC() BgpSrteSegmentCTypeSubTlv { + if obj.obj.TypeC == nil { + obj.obj.TypeC = NewBgpSrteSegmentCTypeSubTlv().msg() + } + if obj.typeCHolder == nil { + obj.typeCHolder = &bgpSrteSegmentCTypeSubTlv{obj: obj.obj.TypeC} + } + return obj.typeCHolder +} + +// description is TBD +// TypeC returns a BgpSrteSegmentCTypeSubTlv +func (obj *bgpSrteSegment) HasTypeC() bool { + return obj.obj.TypeC != nil +} + +// description is TBD +// SetTypeC sets the BgpSrteSegmentCTypeSubTlv value in the BgpSrteSegment object +func (obj *bgpSrteSegment) SetTypeC(value BgpSrteSegmentCTypeSubTlv) BgpSrteSegment { + + obj.typeCHolder = nil + obj.obj.TypeC = value.msg() + + return obj +} + +// description is TBD +// TypeD returns a BgpSrteSegmentDTypeSubTlv +func (obj *bgpSrteSegment) TypeD() BgpSrteSegmentDTypeSubTlv { + if obj.obj.TypeD == nil { + obj.obj.TypeD = NewBgpSrteSegmentDTypeSubTlv().msg() + } + if obj.typeDHolder == nil { + obj.typeDHolder = &bgpSrteSegmentDTypeSubTlv{obj: obj.obj.TypeD} + } + return obj.typeDHolder +} + +// description is TBD +// TypeD returns a BgpSrteSegmentDTypeSubTlv +func (obj *bgpSrteSegment) HasTypeD() bool { + return obj.obj.TypeD != nil +} + +// description is TBD +// SetTypeD sets the BgpSrteSegmentDTypeSubTlv value in the BgpSrteSegment object +func (obj *bgpSrteSegment) SetTypeD(value BgpSrteSegmentDTypeSubTlv) BgpSrteSegment { + + obj.typeDHolder = nil + obj.obj.TypeD = value.msg() + + return obj +} + +// description is TBD +// TypeE returns a BgpSrteSegmentETypeSubTlv +func (obj *bgpSrteSegment) TypeE() BgpSrteSegmentETypeSubTlv { + if obj.obj.TypeE == nil { + obj.obj.TypeE = NewBgpSrteSegmentETypeSubTlv().msg() + } + if obj.typeEHolder == nil { + obj.typeEHolder = &bgpSrteSegmentETypeSubTlv{obj: obj.obj.TypeE} + } + return obj.typeEHolder +} + +// description is TBD +// TypeE returns a BgpSrteSegmentETypeSubTlv +func (obj *bgpSrteSegment) HasTypeE() bool { + return obj.obj.TypeE != nil +} + +// description is TBD +// SetTypeE sets the BgpSrteSegmentETypeSubTlv value in the BgpSrteSegment object +func (obj *bgpSrteSegment) SetTypeE(value BgpSrteSegmentETypeSubTlv) BgpSrteSegment { + + obj.typeEHolder = nil + obj.obj.TypeE = value.msg() + + return obj +} + +// description is TBD +// TypeF returns a BgpSrteSegmentFTypeSubTlv +func (obj *bgpSrteSegment) TypeF() BgpSrteSegmentFTypeSubTlv { + if obj.obj.TypeF == nil { + obj.obj.TypeF = NewBgpSrteSegmentFTypeSubTlv().msg() + } + if obj.typeFHolder == nil { + obj.typeFHolder = &bgpSrteSegmentFTypeSubTlv{obj: obj.obj.TypeF} + } + return obj.typeFHolder +} + +// description is TBD +// TypeF returns a BgpSrteSegmentFTypeSubTlv +func (obj *bgpSrteSegment) HasTypeF() bool { + return obj.obj.TypeF != nil +} + +// description is TBD +// SetTypeF sets the BgpSrteSegmentFTypeSubTlv value in the BgpSrteSegment object +func (obj *bgpSrteSegment) SetTypeF(value BgpSrteSegmentFTypeSubTlv) BgpSrteSegment { + + obj.typeFHolder = nil + obj.obj.TypeF = value.msg() + + return obj +} + +// description is TBD +// TypeG returns a BgpSrteSegmentGTypeSubTlv +func (obj *bgpSrteSegment) TypeG() BgpSrteSegmentGTypeSubTlv { + if obj.obj.TypeG == nil { + obj.obj.TypeG = NewBgpSrteSegmentGTypeSubTlv().msg() + } + if obj.typeGHolder == nil { + obj.typeGHolder = &bgpSrteSegmentGTypeSubTlv{obj: obj.obj.TypeG} + } + return obj.typeGHolder +} + +// description is TBD +// TypeG returns a BgpSrteSegmentGTypeSubTlv +func (obj *bgpSrteSegment) HasTypeG() bool { + return obj.obj.TypeG != nil +} + +// description is TBD +// SetTypeG sets the BgpSrteSegmentGTypeSubTlv value in the BgpSrteSegment object +func (obj *bgpSrteSegment) SetTypeG(value BgpSrteSegmentGTypeSubTlv) BgpSrteSegment { + + obj.typeGHolder = nil + obj.obj.TypeG = value.msg() + + return obj +} + +// description is TBD +// TypeH returns a BgpSrteSegmentHTypeSubTlv +func (obj *bgpSrteSegment) TypeH() BgpSrteSegmentHTypeSubTlv { + if obj.obj.TypeH == nil { + obj.obj.TypeH = NewBgpSrteSegmentHTypeSubTlv().msg() + } + if obj.typeHHolder == nil { + obj.typeHHolder = &bgpSrteSegmentHTypeSubTlv{obj: obj.obj.TypeH} + } + return obj.typeHHolder +} + +// description is TBD +// TypeH returns a BgpSrteSegmentHTypeSubTlv +func (obj *bgpSrteSegment) HasTypeH() bool { + return obj.obj.TypeH != nil +} + +// description is TBD +// SetTypeH sets the BgpSrteSegmentHTypeSubTlv value in the BgpSrteSegment object +func (obj *bgpSrteSegment) SetTypeH(value BgpSrteSegmentHTypeSubTlv) BgpSrteSegment { + + obj.typeHHolder = nil + obj.obj.TypeH = value.msg() + + return obj +} + +// description is TBD +// TypeI returns a BgpSrteSegmentITypeSubTlv +func (obj *bgpSrteSegment) TypeI() BgpSrteSegmentITypeSubTlv { + if obj.obj.TypeI == nil { + obj.obj.TypeI = NewBgpSrteSegmentITypeSubTlv().msg() + } + if obj.typeIHolder == nil { + obj.typeIHolder = &bgpSrteSegmentITypeSubTlv{obj: obj.obj.TypeI} + } + return obj.typeIHolder +} + +// description is TBD +// TypeI returns a BgpSrteSegmentITypeSubTlv +func (obj *bgpSrteSegment) HasTypeI() bool { + return obj.obj.TypeI != nil +} + +// description is TBD +// SetTypeI sets the BgpSrteSegmentITypeSubTlv value in the BgpSrteSegment object +func (obj *bgpSrteSegment) SetTypeI(value BgpSrteSegmentITypeSubTlv) BgpSrteSegment { + + obj.typeIHolder = nil + obj.obj.TypeI = value.msg() + + return obj +} + +// description is TBD +// TypeJ returns a BgpSrteSegmentJTypeSubTlv +func (obj *bgpSrteSegment) TypeJ() BgpSrteSegmentJTypeSubTlv { + if obj.obj.TypeJ == nil { + obj.obj.TypeJ = NewBgpSrteSegmentJTypeSubTlv().msg() + } + if obj.typeJHolder == nil { + obj.typeJHolder = &bgpSrteSegmentJTypeSubTlv{obj: obj.obj.TypeJ} + } + return obj.typeJHolder +} + +// description is TBD +// TypeJ returns a BgpSrteSegmentJTypeSubTlv +func (obj *bgpSrteSegment) HasTypeJ() bool { + return obj.obj.TypeJ != nil +} + +// description is TBD +// SetTypeJ sets the BgpSrteSegmentJTypeSubTlv value in the BgpSrteSegment object +func (obj *bgpSrteSegment) SetTypeJ(value BgpSrteSegmentJTypeSubTlv) BgpSrteSegment { + + obj.typeJHolder = nil + obj.obj.TypeJ = value.msg() + + return obj +} + +// description is TBD +// TypeK returns a BgpSrteSegmentKTypeSubTlv +func (obj *bgpSrteSegment) TypeK() BgpSrteSegmentKTypeSubTlv { + if obj.obj.TypeK == nil { + obj.obj.TypeK = NewBgpSrteSegmentKTypeSubTlv().msg() + } + if obj.typeKHolder == nil { + obj.typeKHolder = &bgpSrteSegmentKTypeSubTlv{obj: obj.obj.TypeK} + } + return obj.typeKHolder +} + +// description is TBD +// TypeK returns a BgpSrteSegmentKTypeSubTlv +func (obj *bgpSrteSegment) HasTypeK() bool { + return obj.obj.TypeK != nil +} + +// description is TBD +// SetTypeK sets the BgpSrteSegmentKTypeSubTlv value in the BgpSrteSegment object +func (obj *bgpSrteSegment) SetTypeK(value BgpSrteSegmentKTypeSubTlv) BgpSrteSegment { + + obj.typeKHolder = nil + obj.obj.TypeK = value.msg() + + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *bgpSrteSegment) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the BgpSrteSegment object +func (obj *bgpSrteSegment) SetName(value string) BgpSrteSegment { + + obj.obj.Name = &value + return obj +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// Active returns a bool +func (obj *bgpSrteSegment) Active() bool { + + return *obj.obj.Active + +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// Active returns a bool +func (obj *bgpSrteSegment) HasActive() bool { + return obj.obj.Active != nil +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// SetActive sets the bool value in the BgpSrteSegment object +func (obj *bgpSrteSegment) SetActive(value bool) BgpSrteSegment { + + obj.obj.Active = &value + return obj +} + +func (obj *bgpSrteSegment) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // SegmentType is required + if obj.obj.SegmentType == nil { + vObj.validationErrors = append(vObj.validationErrors, "SegmentType is required field on interface BgpSrteSegment") + } + + if obj.obj.TypeA != nil { + + obj.TypeA().validateObj(vObj, set_default) + } + + if obj.obj.TypeB != nil { + + obj.TypeB().validateObj(vObj, set_default) + } + + if obj.obj.TypeC != nil { + + obj.TypeC().validateObj(vObj, set_default) + } + + if obj.obj.TypeD != nil { + + obj.TypeD().validateObj(vObj, set_default) + } + + if obj.obj.TypeE != nil { + + obj.TypeE().validateObj(vObj, set_default) + } + + if obj.obj.TypeF != nil { + + obj.TypeF().validateObj(vObj, set_default) + } + + if obj.obj.TypeG != nil { + + obj.TypeG().validateObj(vObj, set_default) + } + + if obj.obj.TypeH != nil { + + obj.TypeH().validateObj(vObj, set_default) + } + + if obj.obj.TypeI != nil { + + obj.TypeI().validateObj(vObj, set_default) + } + + if obj.obj.TypeJ != nil { + + obj.TypeJ().validateObj(vObj, set_default) + } + + if obj.obj.TypeK != nil { + + obj.TypeK().validateObj(vObj, set_default) + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface BgpSrteSegment") + } +} + +func (obj *bgpSrteSegment) setDefault() { + if obj.obj.Active == nil { + obj.SetActive(true) + } + +} diff --git a/gosnappi/bgp_srte_segment_a_type_sub_tlv.go b/gosnappi/bgp_srte_segment_a_type_sub_tlv.go new file mode 100644 index 00000000..490e8608 --- /dev/null +++ b/gosnappi/bgp_srte_segment_a_type_sub_tlv.go @@ -0,0 +1,457 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSegmentATypeSubTlv ***** +type bgpSrteSegmentATypeSubTlv struct { + validation + obj *otg.BgpSrteSegmentATypeSubTlv + marshaller marshalBgpSrteSegmentATypeSubTlv + unMarshaller unMarshalBgpSrteSegmentATypeSubTlv +} + +func NewBgpSrteSegmentATypeSubTlv() BgpSrteSegmentATypeSubTlv { + obj := bgpSrteSegmentATypeSubTlv{obj: &otg.BgpSrteSegmentATypeSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSegmentATypeSubTlv) msg() *otg.BgpSrteSegmentATypeSubTlv { + return obj.obj +} + +func (obj *bgpSrteSegmentATypeSubTlv) setMsg(msg *otg.BgpSrteSegmentATypeSubTlv) BgpSrteSegmentATypeSubTlv { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSegmentATypeSubTlv struct { + obj *bgpSrteSegmentATypeSubTlv +} + +type marshalBgpSrteSegmentATypeSubTlv interface { + // ToProto marshals BgpSrteSegmentATypeSubTlv to protobuf object *otg.BgpSrteSegmentATypeSubTlv + ToProto() (*otg.BgpSrteSegmentATypeSubTlv, error) + // ToPbText marshals BgpSrteSegmentATypeSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSegmentATypeSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSegmentATypeSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSegmentATypeSubTlv struct { + obj *bgpSrteSegmentATypeSubTlv +} + +type unMarshalBgpSrteSegmentATypeSubTlv interface { + // FromProto unmarshals BgpSrteSegmentATypeSubTlv from protobuf object *otg.BgpSrteSegmentATypeSubTlv + FromProto(msg *otg.BgpSrteSegmentATypeSubTlv) (BgpSrteSegmentATypeSubTlv, error) + // FromPbText unmarshals BgpSrteSegmentATypeSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSegmentATypeSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSegmentATypeSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSegmentATypeSubTlv) Marshal() marshalBgpSrteSegmentATypeSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSegmentATypeSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSegmentATypeSubTlv) Unmarshal() unMarshalBgpSrteSegmentATypeSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSegmentATypeSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSegmentATypeSubTlv) ToProto() (*otg.BgpSrteSegmentATypeSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSegmentATypeSubTlv) FromProto(msg *otg.BgpSrteSegmentATypeSubTlv) (BgpSrteSegmentATypeSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSegmentATypeSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSegmentATypeSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSegmentATypeSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentATypeSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSegmentATypeSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentATypeSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSegmentATypeSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentATypeSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentATypeSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSegmentATypeSubTlv) Clone() (BgpSrteSegmentATypeSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSegmentATypeSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpSrteSegmentATypeSubTlv is type A: SID only, in the form of MPLS Label. +type BgpSrteSegmentATypeSubTlv interface { + Validation + // msg marshals BgpSrteSegmentATypeSubTlv to protobuf object *otg.BgpSrteSegmentATypeSubTlv + // and doesn't set defaults + msg() *otg.BgpSrteSegmentATypeSubTlv + // setMsg unmarshals BgpSrteSegmentATypeSubTlv from protobuf object *otg.BgpSrteSegmentATypeSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteSegmentATypeSubTlv) BgpSrteSegmentATypeSubTlv + // provides marshal interface + Marshal() marshalBgpSrteSegmentATypeSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSegmentATypeSubTlv + // validate validates BgpSrteSegmentATypeSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSegmentATypeSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns string, set in BgpSrteSegmentATypeSubTlv. + Flags() string + // SetFlags assigns string provided by user to BgpSrteSegmentATypeSubTlv + SetFlags(value string) BgpSrteSegmentATypeSubTlv + // HasFlags checks if Flags has been set in BgpSrteSegmentATypeSubTlv + HasFlags() bool + // Label returns uint32, set in BgpSrteSegmentATypeSubTlv. + Label() uint32 + // SetLabel assigns uint32 provided by user to BgpSrteSegmentATypeSubTlv + SetLabel(value uint32) BgpSrteSegmentATypeSubTlv + // HasLabel checks if Label has been set in BgpSrteSegmentATypeSubTlv + HasLabel() bool + // Tc returns uint32, set in BgpSrteSegmentATypeSubTlv. + Tc() uint32 + // SetTc assigns uint32 provided by user to BgpSrteSegmentATypeSubTlv + SetTc(value uint32) BgpSrteSegmentATypeSubTlv + // HasTc checks if Tc has been set in BgpSrteSegmentATypeSubTlv + HasTc() bool + // SBit returns bool, set in BgpSrteSegmentATypeSubTlv. + SBit() bool + // SetSBit assigns bool provided by user to BgpSrteSegmentATypeSubTlv + SetSBit(value bool) BgpSrteSegmentATypeSubTlv + // HasSBit checks if SBit has been set in BgpSrteSegmentATypeSubTlv + HasSBit() bool + // Ttl returns uint32, set in BgpSrteSegmentATypeSubTlv. + Ttl() uint32 + // SetTtl assigns uint32 provided by user to BgpSrteSegmentATypeSubTlv + SetTtl(value uint32) BgpSrteSegmentATypeSubTlv + // HasTtl checks if Ttl has been set in BgpSrteSegmentATypeSubTlv + HasTtl() bool +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentATypeSubTlv) Flags() string { + + return *obj.obj.Flags + +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentATypeSubTlv) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// SetFlags sets the string value in the BgpSrteSegmentATypeSubTlv object +func (obj *bgpSrteSegmentATypeSubTlv) SetFlags(value string) BgpSrteSegmentATypeSubTlv { + + obj.obj.Flags = &value + return obj +} + +// Label value in [0, 2^20 -1]. +// Label returns a uint32 +func (obj *bgpSrteSegmentATypeSubTlv) Label() uint32 { + + return *obj.obj.Label + +} + +// Label value in [0, 2^20 -1]. +// Label returns a uint32 +func (obj *bgpSrteSegmentATypeSubTlv) HasLabel() bool { + return obj.obj.Label != nil +} + +// Label value in [0, 2^20 -1]. +// SetLabel sets the uint32 value in the BgpSrteSegmentATypeSubTlv object +func (obj *bgpSrteSegmentATypeSubTlv) SetLabel(value uint32) BgpSrteSegmentATypeSubTlv { + + obj.obj.Label = &value + return obj +} + +// Traffic class in bits. +// Tc returns a uint32 +func (obj *bgpSrteSegmentATypeSubTlv) Tc() uint32 { + + return *obj.obj.Tc + +} + +// Traffic class in bits. +// Tc returns a uint32 +func (obj *bgpSrteSegmentATypeSubTlv) HasTc() bool { + return obj.obj.Tc != nil +} + +// Traffic class in bits. +// SetTc sets the uint32 value in the BgpSrteSegmentATypeSubTlv object +func (obj *bgpSrteSegmentATypeSubTlv) SetTc(value uint32) BgpSrteSegmentATypeSubTlv { + + obj.obj.Tc = &value + return obj +} + +// Bottom-of-Stack bit. +// SBit returns a bool +func (obj *bgpSrteSegmentATypeSubTlv) SBit() bool { + + return *obj.obj.SBit + +} + +// Bottom-of-Stack bit. +// SBit returns a bool +func (obj *bgpSrteSegmentATypeSubTlv) HasSBit() bool { + return obj.obj.SBit != nil +} + +// Bottom-of-Stack bit. +// SetSBit sets the bool value in the BgpSrteSegmentATypeSubTlv object +func (obj *bgpSrteSegmentATypeSubTlv) SetSBit(value bool) BgpSrteSegmentATypeSubTlv { + + obj.obj.SBit = &value + return obj +} + +// Time To Live. +// Ttl returns a uint32 +func (obj *bgpSrteSegmentATypeSubTlv) Ttl() uint32 { + + return *obj.obj.Ttl + +} + +// Time To Live. +// Ttl returns a uint32 +func (obj *bgpSrteSegmentATypeSubTlv) HasTtl() bool { + return obj.obj.Ttl != nil +} + +// Time To Live. +// SetTtl sets the uint32 value in the BgpSrteSegmentATypeSubTlv object +func (obj *bgpSrteSegmentATypeSubTlv) SetTtl(value uint32) BgpSrteSegmentATypeSubTlv { + + obj.obj.Ttl = &value + return obj +} + +func (obj *bgpSrteSegmentATypeSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + err := obj.validateHex(obj.Flags()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentATypeSubTlv.Flags")) + } + + } + + if obj.obj.Label != nil { + + if *obj.obj.Label > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpSrteSegmentATypeSubTlv.Label <= 1048575 but Got %d", *obj.obj.Label)) + } + + } + + if obj.obj.Tc != nil { + + if *obj.obj.Tc > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpSrteSegmentATypeSubTlv.Tc <= 7 but Got %d", *obj.obj.Tc)) + } + + } + + if obj.obj.Ttl != nil { + + if *obj.obj.Ttl > 225 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpSrteSegmentATypeSubTlv.Ttl <= 225 but Got %d", *obj.obj.Ttl)) + } + + } + +} + +func (obj *bgpSrteSegmentATypeSubTlv) setDefault() { + +} diff --git a/gosnappi/bgp_srte_segment_b_type_sub_tlv.go b/gosnappi/bgp_srte_segment_b_type_sub_tlv.go new file mode 100644 index 00000000..1593be5f --- /dev/null +++ b/gosnappi/bgp_srte_segment_b_type_sub_tlv.go @@ -0,0 +1,398 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSegmentBTypeSubTlv ***** +type bgpSrteSegmentBTypeSubTlv struct { + validation + obj *otg.BgpSrteSegmentBTypeSubTlv + marshaller marshalBgpSrteSegmentBTypeSubTlv + unMarshaller unMarshalBgpSrteSegmentBTypeSubTlv + srv6SidEndpointBehaviorHolder BgpSrteSRv6SIDEndpointBehaviorAndStructure +} + +func NewBgpSrteSegmentBTypeSubTlv() BgpSrteSegmentBTypeSubTlv { + obj := bgpSrteSegmentBTypeSubTlv{obj: &otg.BgpSrteSegmentBTypeSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSegmentBTypeSubTlv) msg() *otg.BgpSrteSegmentBTypeSubTlv { + return obj.obj +} + +func (obj *bgpSrteSegmentBTypeSubTlv) setMsg(msg *otg.BgpSrteSegmentBTypeSubTlv) BgpSrteSegmentBTypeSubTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSegmentBTypeSubTlv struct { + obj *bgpSrteSegmentBTypeSubTlv +} + +type marshalBgpSrteSegmentBTypeSubTlv interface { + // ToProto marshals BgpSrteSegmentBTypeSubTlv to protobuf object *otg.BgpSrteSegmentBTypeSubTlv + ToProto() (*otg.BgpSrteSegmentBTypeSubTlv, error) + // ToPbText marshals BgpSrteSegmentBTypeSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSegmentBTypeSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSegmentBTypeSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSegmentBTypeSubTlv struct { + obj *bgpSrteSegmentBTypeSubTlv +} + +type unMarshalBgpSrteSegmentBTypeSubTlv interface { + // FromProto unmarshals BgpSrteSegmentBTypeSubTlv from protobuf object *otg.BgpSrteSegmentBTypeSubTlv + FromProto(msg *otg.BgpSrteSegmentBTypeSubTlv) (BgpSrteSegmentBTypeSubTlv, error) + // FromPbText unmarshals BgpSrteSegmentBTypeSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSegmentBTypeSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSegmentBTypeSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSegmentBTypeSubTlv) Marshal() marshalBgpSrteSegmentBTypeSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSegmentBTypeSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSegmentBTypeSubTlv) Unmarshal() unMarshalBgpSrteSegmentBTypeSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSegmentBTypeSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSegmentBTypeSubTlv) ToProto() (*otg.BgpSrteSegmentBTypeSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSegmentBTypeSubTlv) FromProto(msg *otg.BgpSrteSegmentBTypeSubTlv) (BgpSrteSegmentBTypeSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSegmentBTypeSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSegmentBTypeSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSegmentBTypeSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentBTypeSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSegmentBTypeSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentBTypeSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSegmentBTypeSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentBTypeSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentBTypeSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSegmentBTypeSubTlv) Clone() (BgpSrteSegmentBTypeSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSegmentBTypeSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteSegmentBTypeSubTlv) setNil() { + obj.srv6SidEndpointBehaviorHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteSegmentBTypeSubTlv is type B: SID only, in the form of IPv6 address. +type BgpSrteSegmentBTypeSubTlv interface { + Validation + // msg marshals BgpSrteSegmentBTypeSubTlv to protobuf object *otg.BgpSrteSegmentBTypeSubTlv + // and doesn't set defaults + msg() *otg.BgpSrteSegmentBTypeSubTlv + // setMsg unmarshals BgpSrteSegmentBTypeSubTlv from protobuf object *otg.BgpSrteSegmentBTypeSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteSegmentBTypeSubTlv) BgpSrteSegmentBTypeSubTlv + // provides marshal interface + Marshal() marshalBgpSrteSegmentBTypeSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSegmentBTypeSubTlv + // validate validates BgpSrteSegmentBTypeSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSegmentBTypeSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns string, set in BgpSrteSegmentBTypeSubTlv. + Flags() string + // SetFlags assigns string provided by user to BgpSrteSegmentBTypeSubTlv + SetFlags(value string) BgpSrteSegmentBTypeSubTlv + // HasFlags checks if Flags has been set in BgpSrteSegmentBTypeSubTlv + HasFlags() bool + // Srv6Sid returns string, set in BgpSrteSegmentBTypeSubTlv. + Srv6Sid() string + // SetSrv6Sid assigns string provided by user to BgpSrteSegmentBTypeSubTlv + SetSrv6Sid(value string) BgpSrteSegmentBTypeSubTlv + // Srv6SidEndpointBehavior returns BgpSrteSRv6SIDEndpointBehaviorAndStructure, set in BgpSrteSegmentBTypeSubTlv. + // BgpSrteSRv6SIDEndpointBehaviorAndStructure is configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. + Srv6SidEndpointBehavior() BgpSrteSRv6SIDEndpointBehaviorAndStructure + // SetSrv6SidEndpointBehavior assigns BgpSrteSRv6SIDEndpointBehaviorAndStructure provided by user to BgpSrteSegmentBTypeSubTlv. + // BgpSrteSRv6SIDEndpointBehaviorAndStructure is configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. + SetSrv6SidEndpointBehavior(value BgpSrteSRv6SIDEndpointBehaviorAndStructure) BgpSrteSegmentBTypeSubTlv + // HasSrv6SidEndpointBehavior checks if Srv6SidEndpointBehavior has been set in BgpSrteSegmentBTypeSubTlv + HasSrv6SidEndpointBehavior() bool + setNil() +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentBTypeSubTlv) Flags() string { + + return *obj.obj.Flags + +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentBTypeSubTlv) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// SetFlags sets the string value in the BgpSrteSegmentBTypeSubTlv object +func (obj *bgpSrteSegmentBTypeSubTlv) SetFlags(value string) BgpSrteSegmentBTypeSubTlv { + + obj.obj.Flags = &value + return obj +} + +// SRv6 SID. +// Srv6Sid returns a string +func (obj *bgpSrteSegmentBTypeSubTlv) Srv6Sid() string { + + return *obj.obj.Srv6Sid + +} + +// SRv6 SID. +// SetSrv6Sid sets the string value in the BgpSrteSegmentBTypeSubTlv object +func (obj *bgpSrteSegmentBTypeSubTlv) SetSrv6Sid(value string) BgpSrteSegmentBTypeSubTlv { + + obj.obj.Srv6Sid = &value + return obj +} + +// Optional SRv6 Endpoint Behavior and SID Structure. +// Srv6SidEndpointBehavior returns a BgpSrteSRv6SIDEndpointBehaviorAndStructure +func (obj *bgpSrteSegmentBTypeSubTlv) Srv6SidEndpointBehavior() BgpSrteSRv6SIDEndpointBehaviorAndStructure { + if obj.obj.Srv6SidEndpointBehavior == nil { + obj.obj.Srv6SidEndpointBehavior = NewBgpSrteSRv6SIDEndpointBehaviorAndStructure().msg() + } + if obj.srv6SidEndpointBehaviorHolder == nil { + obj.srv6SidEndpointBehaviorHolder = &bgpSrteSRv6SIDEndpointBehaviorAndStructure{obj: obj.obj.Srv6SidEndpointBehavior} + } + return obj.srv6SidEndpointBehaviorHolder +} + +// Optional SRv6 Endpoint Behavior and SID Structure. +// Srv6SidEndpointBehavior returns a BgpSrteSRv6SIDEndpointBehaviorAndStructure +func (obj *bgpSrteSegmentBTypeSubTlv) HasSrv6SidEndpointBehavior() bool { + return obj.obj.Srv6SidEndpointBehavior != nil +} + +// Optional SRv6 Endpoint Behavior and SID Structure. +// SetSrv6SidEndpointBehavior sets the BgpSrteSRv6SIDEndpointBehaviorAndStructure value in the BgpSrteSegmentBTypeSubTlv object +func (obj *bgpSrteSegmentBTypeSubTlv) SetSrv6SidEndpointBehavior(value BgpSrteSRv6SIDEndpointBehaviorAndStructure) BgpSrteSegmentBTypeSubTlv { + + obj.srv6SidEndpointBehaviorHolder = nil + obj.obj.Srv6SidEndpointBehavior = value.msg() + + return obj +} + +func (obj *bgpSrteSegmentBTypeSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + err := obj.validateHex(obj.Flags()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentBTypeSubTlv.Flags")) + } + + } + + // Srv6Sid is required + if obj.obj.Srv6Sid == nil { + vObj.validationErrors = append(vObj.validationErrors, "Srv6Sid is required field on interface BgpSrteSegmentBTypeSubTlv") + } + if obj.obj.Srv6Sid != nil { + + err := obj.validateIpv6(obj.Srv6Sid()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentBTypeSubTlv.Srv6Sid")) + } + + } + + if obj.obj.Srv6SidEndpointBehavior != nil { + + obj.Srv6SidEndpointBehavior().validateObj(vObj, set_default) + } + +} + +func (obj *bgpSrteSegmentBTypeSubTlv) setDefault() { + +} diff --git a/gosnappi/bgp_srte_segment_c_type_sub_tlv.go b/gosnappi/bgp_srte_segment_c_type_sub_tlv.go new file mode 100644 index 00000000..c835f178 --- /dev/null +++ b/gosnappi/bgp_srte_segment_c_type_sub_tlv.go @@ -0,0 +1,439 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSegmentCTypeSubTlv ***** +type bgpSrteSegmentCTypeSubTlv struct { + validation + obj *otg.BgpSrteSegmentCTypeSubTlv + marshaller marshalBgpSrteSegmentCTypeSubTlv + unMarshaller unMarshalBgpSrteSegmentCTypeSubTlv + srMplsSidHolder BgpSrteSrMplsSid +} + +func NewBgpSrteSegmentCTypeSubTlv() BgpSrteSegmentCTypeSubTlv { + obj := bgpSrteSegmentCTypeSubTlv{obj: &otg.BgpSrteSegmentCTypeSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSegmentCTypeSubTlv) msg() *otg.BgpSrteSegmentCTypeSubTlv { + return obj.obj +} + +func (obj *bgpSrteSegmentCTypeSubTlv) setMsg(msg *otg.BgpSrteSegmentCTypeSubTlv) BgpSrteSegmentCTypeSubTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSegmentCTypeSubTlv struct { + obj *bgpSrteSegmentCTypeSubTlv +} + +type marshalBgpSrteSegmentCTypeSubTlv interface { + // ToProto marshals BgpSrteSegmentCTypeSubTlv to protobuf object *otg.BgpSrteSegmentCTypeSubTlv + ToProto() (*otg.BgpSrteSegmentCTypeSubTlv, error) + // ToPbText marshals BgpSrteSegmentCTypeSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSegmentCTypeSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSegmentCTypeSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSegmentCTypeSubTlv struct { + obj *bgpSrteSegmentCTypeSubTlv +} + +type unMarshalBgpSrteSegmentCTypeSubTlv interface { + // FromProto unmarshals BgpSrteSegmentCTypeSubTlv from protobuf object *otg.BgpSrteSegmentCTypeSubTlv + FromProto(msg *otg.BgpSrteSegmentCTypeSubTlv) (BgpSrteSegmentCTypeSubTlv, error) + // FromPbText unmarshals BgpSrteSegmentCTypeSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSegmentCTypeSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSegmentCTypeSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSegmentCTypeSubTlv) Marshal() marshalBgpSrteSegmentCTypeSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSegmentCTypeSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSegmentCTypeSubTlv) Unmarshal() unMarshalBgpSrteSegmentCTypeSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSegmentCTypeSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSegmentCTypeSubTlv) ToProto() (*otg.BgpSrteSegmentCTypeSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSegmentCTypeSubTlv) FromProto(msg *otg.BgpSrteSegmentCTypeSubTlv) (BgpSrteSegmentCTypeSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSegmentCTypeSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSegmentCTypeSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSegmentCTypeSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentCTypeSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSegmentCTypeSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentCTypeSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSegmentCTypeSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentCTypeSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentCTypeSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSegmentCTypeSubTlv) Clone() (BgpSrteSegmentCTypeSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSegmentCTypeSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteSegmentCTypeSubTlv) setNil() { + obj.srMplsSidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteSegmentCTypeSubTlv is type C: IPv4 Node Address with optional SID. +type BgpSrteSegmentCTypeSubTlv interface { + Validation + // msg marshals BgpSrteSegmentCTypeSubTlv to protobuf object *otg.BgpSrteSegmentCTypeSubTlv + // and doesn't set defaults + msg() *otg.BgpSrteSegmentCTypeSubTlv + // setMsg unmarshals BgpSrteSegmentCTypeSubTlv from protobuf object *otg.BgpSrteSegmentCTypeSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteSegmentCTypeSubTlv) BgpSrteSegmentCTypeSubTlv + // provides marshal interface + Marshal() marshalBgpSrteSegmentCTypeSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSegmentCTypeSubTlv + // validate validates BgpSrteSegmentCTypeSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSegmentCTypeSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns string, set in BgpSrteSegmentCTypeSubTlv. + Flags() string + // SetFlags assigns string provided by user to BgpSrteSegmentCTypeSubTlv + SetFlags(value string) BgpSrteSegmentCTypeSubTlv + // HasFlags checks if Flags has been set in BgpSrteSegmentCTypeSubTlv + HasFlags() bool + // SrAlgorithm returns uint32, set in BgpSrteSegmentCTypeSubTlv. + SrAlgorithm() uint32 + // SetSrAlgorithm assigns uint32 provided by user to BgpSrteSegmentCTypeSubTlv + SetSrAlgorithm(value uint32) BgpSrteSegmentCTypeSubTlv + // HasSrAlgorithm checks if SrAlgorithm has been set in BgpSrteSegmentCTypeSubTlv + HasSrAlgorithm() bool + // Ipv4NodeAddress returns string, set in BgpSrteSegmentCTypeSubTlv. + Ipv4NodeAddress() string + // SetIpv4NodeAddress assigns string provided by user to BgpSrteSegmentCTypeSubTlv + SetIpv4NodeAddress(value string) BgpSrteSegmentCTypeSubTlv + // SrMplsSid returns BgpSrteSrMplsSid, set in BgpSrteSegmentCTypeSubTlv. + // BgpSrteSrMplsSid is configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. + SrMplsSid() BgpSrteSrMplsSid + // SetSrMplsSid assigns BgpSrteSrMplsSid provided by user to BgpSrteSegmentCTypeSubTlv. + // BgpSrteSrMplsSid is configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. + SetSrMplsSid(value BgpSrteSrMplsSid) BgpSrteSegmentCTypeSubTlv + // HasSrMplsSid checks if SrMplsSid has been set in BgpSrteSegmentCTypeSubTlv + HasSrMplsSid() bool + setNil() +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentCTypeSubTlv) Flags() string { + + return *obj.obj.Flags + +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentCTypeSubTlv) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// SetFlags sets the string value in the BgpSrteSegmentCTypeSubTlv object +func (obj *bgpSrteSegmentCTypeSubTlv) SetFlags(value string) BgpSrteSegmentCTypeSubTlv { + + obj.obj.Flags = &value + return obj +} + +// SR Algorithm identifier when A-Flag in on. +// SrAlgorithm returns a uint32 +func (obj *bgpSrteSegmentCTypeSubTlv) SrAlgorithm() uint32 { + + return *obj.obj.SrAlgorithm + +} + +// SR Algorithm identifier when A-Flag in on. +// SrAlgorithm returns a uint32 +func (obj *bgpSrteSegmentCTypeSubTlv) HasSrAlgorithm() bool { + return obj.obj.SrAlgorithm != nil +} + +// SR Algorithm identifier when A-Flag in on. +// SetSrAlgorithm sets the uint32 value in the BgpSrteSegmentCTypeSubTlv object +func (obj *bgpSrteSegmentCTypeSubTlv) SetSrAlgorithm(value uint32) BgpSrteSegmentCTypeSubTlv { + + obj.obj.SrAlgorithm = &value + return obj +} + +// IPv4 address representing a node. +// Ipv4NodeAddress returns a string +func (obj *bgpSrteSegmentCTypeSubTlv) Ipv4NodeAddress() string { + + return *obj.obj.Ipv4NodeAddress + +} + +// IPv4 address representing a node. +// SetIpv4NodeAddress sets the string value in the BgpSrteSegmentCTypeSubTlv object +func (obj *bgpSrteSegmentCTypeSubTlv) SetIpv4NodeAddress(value string) BgpSrteSegmentCTypeSubTlv { + + obj.obj.Ipv4NodeAddress = &value + return obj +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpSrteSrMplsSid +func (obj *bgpSrteSegmentCTypeSubTlv) SrMplsSid() BgpSrteSrMplsSid { + if obj.obj.SrMplsSid == nil { + obj.obj.SrMplsSid = NewBgpSrteSrMplsSid().msg() + } + if obj.srMplsSidHolder == nil { + obj.srMplsSidHolder = &bgpSrteSrMplsSid{obj: obj.obj.SrMplsSid} + } + return obj.srMplsSidHolder +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpSrteSrMplsSid +func (obj *bgpSrteSegmentCTypeSubTlv) HasSrMplsSid() bool { + return obj.obj.SrMplsSid != nil +} + +// Optional SR-MPLS SID. +// SetSrMplsSid sets the BgpSrteSrMplsSid value in the BgpSrteSegmentCTypeSubTlv object +func (obj *bgpSrteSegmentCTypeSubTlv) SetSrMplsSid(value BgpSrteSrMplsSid) BgpSrteSegmentCTypeSubTlv { + + obj.srMplsSidHolder = nil + obj.obj.SrMplsSid = value.msg() + + return obj +} + +func (obj *bgpSrteSegmentCTypeSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + err := obj.validateHex(obj.Flags()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentCTypeSubTlv.Flags")) + } + + } + + if obj.obj.SrAlgorithm != nil { + + if *obj.obj.SrAlgorithm > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpSrteSegmentCTypeSubTlv.SrAlgorithm <= 255 but Got %d", *obj.obj.SrAlgorithm)) + } + + } + + // Ipv4NodeAddress is required + if obj.obj.Ipv4NodeAddress == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv4NodeAddress is required field on interface BgpSrteSegmentCTypeSubTlv") + } + if obj.obj.Ipv4NodeAddress != nil { + + err := obj.validateIpv4(obj.Ipv4NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentCTypeSubTlv.Ipv4NodeAddress")) + } + + } + + if obj.obj.SrMplsSid != nil { + + obj.SrMplsSid().validateObj(vObj, set_default) + } + +} + +func (obj *bgpSrteSegmentCTypeSubTlv) setDefault() { + if obj.obj.SrAlgorithm == nil { + obj.SetSrAlgorithm(0) + } + +} diff --git a/gosnappi/bgp_srte_segment_d_type_sub_tlv.go b/gosnappi/bgp_srte_segment_d_type_sub_tlv.go new file mode 100644 index 00000000..1ba2a1dc --- /dev/null +++ b/gosnappi/bgp_srte_segment_d_type_sub_tlv.go @@ -0,0 +1,439 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSegmentDTypeSubTlv ***** +type bgpSrteSegmentDTypeSubTlv struct { + validation + obj *otg.BgpSrteSegmentDTypeSubTlv + marshaller marshalBgpSrteSegmentDTypeSubTlv + unMarshaller unMarshalBgpSrteSegmentDTypeSubTlv + srMplsSidHolder BgpSrteSrMplsSid +} + +func NewBgpSrteSegmentDTypeSubTlv() BgpSrteSegmentDTypeSubTlv { + obj := bgpSrteSegmentDTypeSubTlv{obj: &otg.BgpSrteSegmentDTypeSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSegmentDTypeSubTlv) msg() *otg.BgpSrteSegmentDTypeSubTlv { + return obj.obj +} + +func (obj *bgpSrteSegmentDTypeSubTlv) setMsg(msg *otg.BgpSrteSegmentDTypeSubTlv) BgpSrteSegmentDTypeSubTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSegmentDTypeSubTlv struct { + obj *bgpSrteSegmentDTypeSubTlv +} + +type marshalBgpSrteSegmentDTypeSubTlv interface { + // ToProto marshals BgpSrteSegmentDTypeSubTlv to protobuf object *otg.BgpSrteSegmentDTypeSubTlv + ToProto() (*otg.BgpSrteSegmentDTypeSubTlv, error) + // ToPbText marshals BgpSrteSegmentDTypeSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSegmentDTypeSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSegmentDTypeSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSegmentDTypeSubTlv struct { + obj *bgpSrteSegmentDTypeSubTlv +} + +type unMarshalBgpSrteSegmentDTypeSubTlv interface { + // FromProto unmarshals BgpSrteSegmentDTypeSubTlv from protobuf object *otg.BgpSrteSegmentDTypeSubTlv + FromProto(msg *otg.BgpSrteSegmentDTypeSubTlv) (BgpSrteSegmentDTypeSubTlv, error) + // FromPbText unmarshals BgpSrteSegmentDTypeSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSegmentDTypeSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSegmentDTypeSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSegmentDTypeSubTlv) Marshal() marshalBgpSrteSegmentDTypeSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSegmentDTypeSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSegmentDTypeSubTlv) Unmarshal() unMarshalBgpSrteSegmentDTypeSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSegmentDTypeSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSegmentDTypeSubTlv) ToProto() (*otg.BgpSrteSegmentDTypeSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSegmentDTypeSubTlv) FromProto(msg *otg.BgpSrteSegmentDTypeSubTlv) (BgpSrteSegmentDTypeSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSegmentDTypeSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSegmentDTypeSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSegmentDTypeSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentDTypeSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSegmentDTypeSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentDTypeSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSegmentDTypeSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentDTypeSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentDTypeSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSegmentDTypeSubTlv) Clone() (BgpSrteSegmentDTypeSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSegmentDTypeSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteSegmentDTypeSubTlv) setNil() { + obj.srMplsSidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteSegmentDTypeSubTlv is type D: IPv6 Node Address with optional SID for SR MPLS. +type BgpSrteSegmentDTypeSubTlv interface { + Validation + // msg marshals BgpSrteSegmentDTypeSubTlv to protobuf object *otg.BgpSrteSegmentDTypeSubTlv + // and doesn't set defaults + msg() *otg.BgpSrteSegmentDTypeSubTlv + // setMsg unmarshals BgpSrteSegmentDTypeSubTlv from protobuf object *otg.BgpSrteSegmentDTypeSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteSegmentDTypeSubTlv) BgpSrteSegmentDTypeSubTlv + // provides marshal interface + Marshal() marshalBgpSrteSegmentDTypeSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSegmentDTypeSubTlv + // validate validates BgpSrteSegmentDTypeSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSegmentDTypeSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns string, set in BgpSrteSegmentDTypeSubTlv. + Flags() string + // SetFlags assigns string provided by user to BgpSrteSegmentDTypeSubTlv + SetFlags(value string) BgpSrteSegmentDTypeSubTlv + // HasFlags checks if Flags has been set in BgpSrteSegmentDTypeSubTlv + HasFlags() bool + // SrAlgorithm returns uint32, set in BgpSrteSegmentDTypeSubTlv. + SrAlgorithm() uint32 + // SetSrAlgorithm assigns uint32 provided by user to BgpSrteSegmentDTypeSubTlv + SetSrAlgorithm(value uint32) BgpSrteSegmentDTypeSubTlv + // HasSrAlgorithm checks if SrAlgorithm has been set in BgpSrteSegmentDTypeSubTlv + HasSrAlgorithm() bool + // Ipv6NodeAddress returns string, set in BgpSrteSegmentDTypeSubTlv. + Ipv6NodeAddress() string + // SetIpv6NodeAddress assigns string provided by user to BgpSrteSegmentDTypeSubTlv + SetIpv6NodeAddress(value string) BgpSrteSegmentDTypeSubTlv + // SrMplsSid returns BgpSrteSrMplsSid, set in BgpSrteSegmentDTypeSubTlv. + // BgpSrteSrMplsSid is configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. + SrMplsSid() BgpSrteSrMplsSid + // SetSrMplsSid assigns BgpSrteSrMplsSid provided by user to BgpSrteSegmentDTypeSubTlv. + // BgpSrteSrMplsSid is configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. + SetSrMplsSid(value BgpSrteSrMplsSid) BgpSrteSegmentDTypeSubTlv + // HasSrMplsSid checks if SrMplsSid has been set in BgpSrteSegmentDTypeSubTlv + HasSrMplsSid() bool + setNil() +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentDTypeSubTlv) Flags() string { + + return *obj.obj.Flags + +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentDTypeSubTlv) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// SetFlags sets the string value in the BgpSrteSegmentDTypeSubTlv object +func (obj *bgpSrteSegmentDTypeSubTlv) SetFlags(value string) BgpSrteSegmentDTypeSubTlv { + + obj.obj.Flags = &value + return obj +} + +// specifying SR Algorithm when when A-Flag as defined in above flags. +// SrAlgorithm returns a uint32 +func (obj *bgpSrteSegmentDTypeSubTlv) SrAlgorithm() uint32 { + + return *obj.obj.SrAlgorithm + +} + +// specifying SR Algorithm when when A-Flag as defined in above flags. +// SrAlgorithm returns a uint32 +func (obj *bgpSrteSegmentDTypeSubTlv) HasSrAlgorithm() bool { + return obj.obj.SrAlgorithm != nil +} + +// specifying SR Algorithm when when A-Flag as defined in above flags. +// SetSrAlgorithm sets the uint32 value in the BgpSrteSegmentDTypeSubTlv object +func (obj *bgpSrteSegmentDTypeSubTlv) SetSrAlgorithm(value uint32) BgpSrteSegmentDTypeSubTlv { + + obj.obj.SrAlgorithm = &value + return obj +} + +// IPv6 address representing a node. +// Ipv6NodeAddress returns a string +func (obj *bgpSrteSegmentDTypeSubTlv) Ipv6NodeAddress() string { + + return *obj.obj.Ipv6NodeAddress + +} + +// IPv6 address representing a node. +// SetIpv6NodeAddress sets the string value in the BgpSrteSegmentDTypeSubTlv object +func (obj *bgpSrteSegmentDTypeSubTlv) SetIpv6NodeAddress(value string) BgpSrteSegmentDTypeSubTlv { + + obj.obj.Ipv6NodeAddress = &value + return obj +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpSrteSrMplsSid +func (obj *bgpSrteSegmentDTypeSubTlv) SrMplsSid() BgpSrteSrMplsSid { + if obj.obj.SrMplsSid == nil { + obj.obj.SrMplsSid = NewBgpSrteSrMplsSid().msg() + } + if obj.srMplsSidHolder == nil { + obj.srMplsSidHolder = &bgpSrteSrMplsSid{obj: obj.obj.SrMplsSid} + } + return obj.srMplsSidHolder +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpSrteSrMplsSid +func (obj *bgpSrteSegmentDTypeSubTlv) HasSrMplsSid() bool { + return obj.obj.SrMplsSid != nil +} + +// Optional SR-MPLS SID. +// SetSrMplsSid sets the BgpSrteSrMplsSid value in the BgpSrteSegmentDTypeSubTlv object +func (obj *bgpSrteSegmentDTypeSubTlv) SetSrMplsSid(value BgpSrteSrMplsSid) BgpSrteSegmentDTypeSubTlv { + + obj.srMplsSidHolder = nil + obj.obj.SrMplsSid = value.msg() + + return obj +} + +func (obj *bgpSrteSegmentDTypeSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + err := obj.validateHex(obj.Flags()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentDTypeSubTlv.Flags")) + } + + } + + if obj.obj.SrAlgorithm != nil { + + if *obj.obj.SrAlgorithm > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpSrteSegmentDTypeSubTlv.SrAlgorithm <= 255 but Got %d", *obj.obj.SrAlgorithm)) + } + + } + + // Ipv6NodeAddress is required + if obj.obj.Ipv6NodeAddress == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv6NodeAddress is required field on interface BgpSrteSegmentDTypeSubTlv") + } + if obj.obj.Ipv6NodeAddress != nil { + + err := obj.validateIpv6(obj.Ipv6NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentDTypeSubTlv.Ipv6NodeAddress")) + } + + } + + if obj.obj.SrMplsSid != nil { + + obj.SrMplsSid().validateObj(vObj, set_default) + } + +} + +func (obj *bgpSrteSegmentDTypeSubTlv) setDefault() { + if obj.obj.SrAlgorithm == nil { + obj.SetSrAlgorithm(0) + } + +} diff --git a/gosnappi/bgp_srte_segment_e_type_sub_tlv.go b/gosnappi/bgp_srte_segment_e_type_sub_tlv.go new file mode 100644 index 00000000..1df8cd54 --- /dev/null +++ b/gosnappi/bgp_srte_segment_e_type_sub_tlv.go @@ -0,0 +1,429 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSegmentETypeSubTlv ***** +type bgpSrteSegmentETypeSubTlv struct { + validation + obj *otg.BgpSrteSegmentETypeSubTlv + marshaller marshalBgpSrteSegmentETypeSubTlv + unMarshaller unMarshalBgpSrteSegmentETypeSubTlv + srMplsSidHolder BgpSrteSrMplsSid +} + +func NewBgpSrteSegmentETypeSubTlv() BgpSrteSegmentETypeSubTlv { + obj := bgpSrteSegmentETypeSubTlv{obj: &otg.BgpSrteSegmentETypeSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSegmentETypeSubTlv) msg() *otg.BgpSrteSegmentETypeSubTlv { + return obj.obj +} + +func (obj *bgpSrteSegmentETypeSubTlv) setMsg(msg *otg.BgpSrteSegmentETypeSubTlv) BgpSrteSegmentETypeSubTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSegmentETypeSubTlv struct { + obj *bgpSrteSegmentETypeSubTlv +} + +type marshalBgpSrteSegmentETypeSubTlv interface { + // ToProto marshals BgpSrteSegmentETypeSubTlv to protobuf object *otg.BgpSrteSegmentETypeSubTlv + ToProto() (*otg.BgpSrteSegmentETypeSubTlv, error) + // ToPbText marshals BgpSrteSegmentETypeSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSegmentETypeSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSegmentETypeSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSegmentETypeSubTlv struct { + obj *bgpSrteSegmentETypeSubTlv +} + +type unMarshalBgpSrteSegmentETypeSubTlv interface { + // FromProto unmarshals BgpSrteSegmentETypeSubTlv from protobuf object *otg.BgpSrteSegmentETypeSubTlv + FromProto(msg *otg.BgpSrteSegmentETypeSubTlv) (BgpSrteSegmentETypeSubTlv, error) + // FromPbText unmarshals BgpSrteSegmentETypeSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSegmentETypeSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSegmentETypeSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSegmentETypeSubTlv) Marshal() marshalBgpSrteSegmentETypeSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSegmentETypeSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSegmentETypeSubTlv) Unmarshal() unMarshalBgpSrteSegmentETypeSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSegmentETypeSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSegmentETypeSubTlv) ToProto() (*otg.BgpSrteSegmentETypeSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSegmentETypeSubTlv) FromProto(msg *otg.BgpSrteSegmentETypeSubTlv) (BgpSrteSegmentETypeSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSegmentETypeSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSegmentETypeSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSegmentETypeSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentETypeSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSegmentETypeSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentETypeSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSegmentETypeSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentETypeSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentETypeSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSegmentETypeSubTlv) Clone() (BgpSrteSegmentETypeSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSegmentETypeSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteSegmentETypeSubTlv) setNil() { + obj.srMplsSidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteSegmentETypeSubTlv is type E: IPv4 Address and Local Interface ID with optional SID +type BgpSrteSegmentETypeSubTlv interface { + Validation + // msg marshals BgpSrteSegmentETypeSubTlv to protobuf object *otg.BgpSrteSegmentETypeSubTlv + // and doesn't set defaults + msg() *otg.BgpSrteSegmentETypeSubTlv + // setMsg unmarshals BgpSrteSegmentETypeSubTlv from protobuf object *otg.BgpSrteSegmentETypeSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteSegmentETypeSubTlv) BgpSrteSegmentETypeSubTlv + // provides marshal interface + Marshal() marshalBgpSrteSegmentETypeSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSegmentETypeSubTlv + // validate validates BgpSrteSegmentETypeSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSegmentETypeSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns string, set in BgpSrteSegmentETypeSubTlv. + Flags() string + // SetFlags assigns string provided by user to BgpSrteSegmentETypeSubTlv + SetFlags(value string) BgpSrteSegmentETypeSubTlv + // HasFlags checks if Flags has been set in BgpSrteSegmentETypeSubTlv + HasFlags() bool + // LocalInterfaceId returns uint32, set in BgpSrteSegmentETypeSubTlv. + LocalInterfaceId() uint32 + // SetLocalInterfaceId assigns uint32 provided by user to BgpSrteSegmentETypeSubTlv + SetLocalInterfaceId(value uint32) BgpSrteSegmentETypeSubTlv + // HasLocalInterfaceId checks if LocalInterfaceId has been set in BgpSrteSegmentETypeSubTlv + HasLocalInterfaceId() bool + // Ipv4NodeAddress returns string, set in BgpSrteSegmentETypeSubTlv. + Ipv4NodeAddress() string + // SetIpv4NodeAddress assigns string provided by user to BgpSrteSegmentETypeSubTlv + SetIpv4NodeAddress(value string) BgpSrteSegmentETypeSubTlv + // SrMplsSid returns BgpSrteSrMplsSid, set in BgpSrteSegmentETypeSubTlv. + // BgpSrteSrMplsSid is configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. + SrMplsSid() BgpSrteSrMplsSid + // SetSrMplsSid assigns BgpSrteSrMplsSid provided by user to BgpSrteSegmentETypeSubTlv. + // BgpSrteSrMplsSid is configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. + SetSrMplsSid(value BgpSrteSrMplsSid) BgpSrteSegmentETypeSubTlv + // HasSrMplsSid checks if SrMplsSid has been set in BgpSrteSegmentETypeSubTlv + HasSrMplsSid() bool + setNil() +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentETypeSubTlv) Flags() string { + + return *obj.obj.Flags + +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentETypeSubTlv) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// SetFlags sets the string value in the BgpSrteSegmentETypeSubTlv object +func (obj *bgpSrteSegmentETypeSubTlv) SetFlags(value string) BgpSrteSegmentETypeSubTlv { + + obj.obj.Flags = &value + return obj +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// LocalInterfaceId returns a uint32 +func (obj *bgpSrteSegmentETypeSubTlv) LocalInterfaceId() uint32 { + + return *obj.obj.LocalInterfaceId + +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// LocalInterfaceId returns a uint32 +func (obj *bgpSrteSegmentETypeSubTlv) HasLocalInterfaceId() bool { + return obj.obj.LocalInterfaceId != nil +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// SetLocalInterfaceId sets the uint32 value in the BgpSrteSegmentETypeSubTlv object +func (obj *bgpSrteSegmentETypeSubTlv) SetLocalInterfaceId(value uint32) BgpSrteSegmentETypeSubTlv { + + obj.obj.LocalInterfaceId = &value + return obj +} + +// IPv4 address representing a node. +// Ipv4NodeAddress returns a string +func (obj *bgpSrteSegmentETypeSubTlv) Ipv4NodeAddress() string { + + return *obj.obj.Ipv4NodeAddress + +} + +// IPv4 address representing a node. +// SetIpv4NodeAddress sets the string value in the BgpSrteSegmentETypeSubTlv object +func (obj *bgpSrteSegmentETypeSubTlv) SetIpv4NodeAddress(value string) BgpSrteSegmentETypeSubTlv { + + obj.obj.Ipv4NodeAddress = &value + return obj +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpSrteSrMplsSid +func (obj *bgpSrteSegmentETypeSubTlv) SrMplsSid() BgpSrteSrMplsSid { + if obj.obj.SrMplsSid == nil { + obj.obj.SrMplsSid = NewBgpSrteSrMplsSid().msg() + } + if obj.srMplsSidHolder == nil { + obj.srMplsSidHolder = &bgpSrteSrMplsSid{obj: obj.obj.SrMplsSid} + } + return obj.srMplsSidHolder +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpSrteSrMplsSid +func (obj *bgpSrteSegmentETypeSubTlv) HasSrMplsSid() bool { + return obj.obj.SrMplsSid != nil +} + +// Optional SR-MPLS SID. +// SetSrMplsSid sets the BgpSrteSrMplsSid value in the BgpSrteSegmentETypeSubTlv object +func (obj *bgpSrteSegmentETypeSubTlv) SetSrMplsSid(value BgpSrteSrMplsSid) BgpSrteSegmentETypeSubTlv { + + obj.srMplsSidHolder = nil + obj.obj.SrMplsSid = value.msg() + + return obj +} + +func (obj *bgpSrteSegmentETypeSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + err := obj.validateHex(obj.Flags()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentETypeSubTlv.Flags")) + } + + } + + // Ipv4NodeAddress is required + if obj.obj.Ipv4NodeAddress == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv4NodeAddress is required field on interface BgpSrteSegmentETypeSubTlv") + } + if obj.obj.Ipv4NodeAddress != nil { + + err := obj.validateIpv4(obj.Ipv4NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentETypeSubTlv.Ipv4NodeAddress")) + } + + } + + if obj.obj.SrMplsSid != nil { + + obj.SrMplsSid().validateObj(vObj, set_default) + } + +} + +func (obj *bgpSrteSegmentETypeSubTlv) setDefault() { + if obj.obj.LocalInterfaceId == nil { + obj.SetLocalInterfaceId(0) + } + +} diff --git a/gosnappi/bgp_srte_segment_f_type_sub_tlv.go b/gosnappi/bgp_srte_segment_f_type_sub_tlv.go new file mode 100644 index 00000000..1fd83030 --- /dev/null +++ b/gosnappi/bgp_srte_segment_f_type_sub_tlv.go @@ -0,0 +1,431 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSegmentFTypeSubTlv ***** +type bgpSrteSegmentFTypeSubTlv struct { + validation + obj *otg.BgpSrteSegmentFTypeSubTlv + marshaller marshalBgpSrteSegmentFTypeSubTlv + unMarshaller unMarshalBgpSrteSegmentFTypeSubTlv + srMplsSidHolder BgpSrteSrMplsSid +} + +func NewBgpSrteSegmentFTypeSubTlv() BgpSrteSegmentFTypeSubTlv { + obj := bgpSrteSegmentFTypeSubTlv{obj: &otg.BgpSrteSegmentFTypeSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSegmentFTypeSubTlv) msg() *otg.BgpSrteSegmentFTypeSubTlv { + return obj.obj +} + +func (obj *bgpSrteSegmentFTypeSubTlv) setMsg(msg *otg.BgpSrteSegmentFTypeSubTlv) BgpSrteSegmentFTypeSubTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSegmentFTypeSubTlv struct { + obj *bgpSrteSegmentFTypeSubTlv +} + +type marshalBgpSrteSegmentFTypeSubTlv interface { + // ToProto marshals BgpSrteSegmentFTypeSubTlv to protobuf object *otg.BgpSrteSegmentFTypeSubTlv + ToProto() (*otg.BgpSrteSegmentFTypeSubTlv, error) + // ToPbText marshals BgpSrteSegmentFTypeSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSegmentFTypeSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSegmentFTypeSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSegmentFTypeSubTlv struct { + obj *bgpSrteSegmentFTypeSubTlv +} + +type unMarshalBgpSrteSegmentFTypeSubTlv interface { + // FromProto unmarshals BgpSrteSegmentFTypeSubTlv from protobuf object *otg.BgpSrteSegmentFTypeSubTlv + FromProto(msg *otg.BgpSrteSegmentFTypeSubTlv) (BgpSrteSegmentFTypeSubTlv, error) + // FromPbText unmarshals BgpSrteSegmentFTypeSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSegmentFTypeSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSegmentFTypeSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSegmentFTypeSubTlv) Marshal() marshalBgpSrteSegmentFTypeSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSegmentFTypeSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSegmentFTypeSubTlv) Unmarshal() unMarshalBgpSrteSegmentFTypeSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSegmentFTypeSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSegmentFTypeSubTlv) ToProto() (*otg.BgpSrteSegmentFTypeSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSegmentFTypeSubTlv) FromProto(msg *otg.BgpSrteSegmentFTypeSubTlv) (BgpSrteSegmentFTypeSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSegmentFTypeSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSegmentFTypeSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSegmentFTypeSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentFTypeSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSegmentFTypeSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentFTypeSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSegmentFTypeSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentFTypeSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentFTypeSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSegmentFTypeSubTlv) Clone() (BgpSrteSegmentFTypeSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSegmentFTypeSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteSegmentFTypeSubTlv) setNil() { + obj.srMplsSidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteSegmentFTypeSubTlv is type F: IPv4 Local and Remote addresses with optional SID. +type BgpSrteSegmentFTypeSubTlv interface { + Validation + // msg marshals BgpSrteSegmentFTypeSubTlv to protobuf object *otg.BgpSrteSegmentFTypeSubTlv + // and doesn't set defaults + msg() *otg.BgpSrteSegmentFTypeSubTlv + // setMsg unmarshals BgpSrteSegmentFTypeSubTlv from protobuf object *otg.BgpSrteSegmentFTypeSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteSegmentFTypeSubTlv) BgpSrteSegmentFTypeSubTlv + // provides marshal interface + Marshal() marshalBgpSrteSegmentFTypeSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSegmentFTypeSubTlv + // validate validates BgpSrteSegmentFTypeSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSegmentFTypeSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns string, set in BgpSrteSegmentFTypeSubTlv. + Flags() string + // SetFlags assigns string provided by user to BgpSrteSegmentFTypeSubTlv + SetFlags(value string) BgpSrteSegmentFTypeSubTlv + // HasFlags checks if Flags has been set in BgpSrteSegmentFTypeSubTlv + HasFlags() bool + // LocalIpv4Address returns string, set in BgpSrteSegmentFTypeSubTlv. + LocalIpv4Address() string + // SetLocalIpv4Address assigns string provided by user to BgpSrteSegmentFTypeSubTlv + SetLocalIpv4Address(value string) BgpSrteSegmentFTypeSubTlv + // RemoteIpv4Address returns string, set in BgpSrteSegmentFTypeSubTlv. + RemoteIpv4Address() string + // SetRemoteIpv4Address assigns string provided by user to BgpSrteSegmentFTypeSubTlv + SetRemoteIpv4Address(value string) BgpSrteSegmentFTypeSubTlv + // SrMplsSid returns BgpSrteSrMplsSid, set in BgpSrteSegmentFTypeSubTlv. + // BgpSrteSrMplsSid is configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. + SrMplsSid() BgpSrteSrMplsSid + // SetSrMplsSid assigns BgpSrteSrMplsSid provided by user to BgpSrteSegmentFTypeSubTlv. + // BgpSrteSrMplsSid is configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. + SetSrMplsSid(value BgpSrteSrMplsSid) BgpSrteSegmentFTypeSubTlv + // HasSrMplsSid checks if SrMplsSid has been set in BgpSrteSegmentFTypeSubTlv + HasSrMplsSid() bool + setNil() +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentFTypeSubTlv) Flags() string { + + return *obj.obj.Flags + +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentFTypeSubTlv) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// SetFlags sets the string value in the BgpSrteSegmentFTypeSubTlv object +func (obj *bgpSrteSegmentFTypeSubTlv) SetFlags(value string) BgpSrteSegmentFTypeSubTlv { + + obj.obj.Flags = &value + return obj +} + +// Local IPv4 Address. +// LocalIpv4Address returns a string +func (obj *bgpSrteSegmentFTypeSubTlv) LocalIpv4Address() string { + + return *obj.obj.LocalIpv4Address + +} + +// Local IPv4 Address. +// SetLocalIpv4Address sets the string value in the BgpSrteSegmentFTypeSubTlv object +func (obj *bgpSrteSegmentFTypeSubTlv) SetLocalIpv4Address(value string) BgpSrteSegmentFTypeSubTlv { + + obj.obj.LocalIpv4Address = &value + return obj +} + +// Remote IPv4 Address. +// RemoteIpv4Address returns a string +func (obj *bgpSrteSegmentFTypeSubTlv) RemoteIpv4Address() string { + + return *obj.obj.RemoteIpv4Address + +} + +// Remote IPv4 Address. +// SetRemoteIpv4Address sets the string value in the BgpSrteSegmentFTypeSubTlv object +func (obj *bgpSrteSegmentFTypeSubTlv) SetRemoteIpv4Address(value string) BgpSrteSegmentFTypeSubTlv { + + obj.obj.RemoteIpv4Address = &value + return obj +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpSrteSrMplsSid +func (obj *bgpSrteSegmentFTypeSubTlv) SrMplsSid() BgpSrteSrMplsSid { + if obj.obj.SrMplsSid == nil { + obj.obj.SrMplsSid = NewBgpSrteSrMplsSid().msg() + } + if obj.srMplsSidHolder == nil { + obj.srMplsSidHolder = &bgpSrteSrMplsSid{obj: obj.obj.SrMplsSid} + } + return obj.srMplsSidHolder +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpSrteSrMplsSid +func (obj *bgpSrteSegmentFTypeSubTlv) HasSrMplsSid() bool { + return obj.obj.SrMplsSid != nil +} + +// Optional SR-MPLS SID. +// SetSrMplsSid sets the BgpSrteSrMplsSid value in the BgpSrteSegmentFTypeSubTlv object +func (obj *bgpSrteSegmentFTypeSubTlv) SetSrMplsSid(value BgpSrteSrMplsSid) BgpSrteSegmentFTypeSubTlv { + + obj.srMplsSidHolder = nil + obj.obj.SrMplsSid = value.msg() + + return obj +} + +func (obj *bgpSrteSegmentFTypeSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + err := obj.validateHex(obj.Flags()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentFTypeSubTlv.Flags")) + } + + } + + // LocalIpv4Address is required + if obj.obj.LocalIpv4Address == nil { + vObj.validationErrors = append(vObj.validationErrors, "LocalIpv4Address is required field on interface BgpSrteSegmentFTypeSubTlv") + } + if obj.obj.LocalIpv4Address != nil { + + err := obj.validateIpv4(obj.LocalIpv4Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentFTypeSubTlv.LocalIpv4Address")) + } + + } + + // RemoteIpv4Address is required + if obj.obj.RemoteIpv4Address == nil { + vObj.validationErrors = append(vObj.validationErrors, "RemoteIpv4Address is required field on interface BgpSrteSegmentFTypeSubTlv") + } + if obj.obj.RemoteIpv4Address != nil { + + err := obj.validateIpv4(obj.RemoteIpv4Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentFTypeSubTlv.RemoteIpv4Address")) + } + + } + + if obj.obj.SrMplsSid != nil { + + obj.SrMplsSid().validateObj(vObj, set_default) + } + +} + +func (obj *bgpSrteSegmentFTypeSubTlv) setDefault() { + +} diff --git a/gosnappi/bgp_srte_segment_g_type_sub_tlv.go b/gosnappi/bgp_srte_segment_g_type_sub_tlv.go new file mode 100644 index 00000000..d7f6d3c5 --- /dev/null +++ b/gosnappi/bgp_srte_segment_g_type_sub_tlv.go @@ -0,0 +1,493 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSegmentGTypeSubTlv ***** +type bgpSrteSegmentGTypeSubTlv struct { + validation + obj *otg.BgpSrteSegmentGTypeSubTlv + marshaller marshalBgpSrteSegmentGTypeSubTlv + unMarshaller unMarshalBgpSrteSegmentGTypeSubTlv + srMplsSidHolder BgpSrteSrMplsSid +} + +func NewBgpSrteSegmentGTypeSubTlv() BgpSrteSegmentGTypeSubTlv { + obj := bgpSrteSegmentGTypeSubTlv{obj: &otg.BgpSrteSegmentGTypeSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSegmentGTypeSubTlv) msg() *otg.BgpSrteSegmentGTypeSubTlv { + return obj.obj +} + +func (obj *bgpSrteSegmentGTypeSubTlv) setMsg(msg *otg.BgpSrteSegmentGTypeSubTlv) BgpSrteSegmentGTypeSubTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSegmentGTypeSubTlv struct { + obj *bgpSrteSegmentGTypeSubTlv +} + +type marshalBgpSrteSegmentGTypeSubTlv interface { + // ToProto marshals BgpSrteSegmentGTypeSubTlv to protobuf object *otg.BgpSrteSegmentGTypeSubTlv + ToProto() (*otg.BgpSrteSegmentGTypeSubTlv, error) + // ToPbText marshals BgpSrteSegmentGTypeSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSegmentGTypeSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSegmentGTypeSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSegmentGTypeSubTlv struct { + obj *bgpSrteSegmentGTypeSubTlv +} + +type unMarshalBgpSrteSegmentGTypeSubTlv interface { + // FromProto unmarshals BgpSrteSegmentGTypeSubTlv from protobuf object *otg.BgpSrteSegmentGTypeSubTlv + FromProto(msg *otg.BgpSrteSegmentGTypeSubTlv) (BgpSrteSegmentGTypeSubTlv, error) + // FromPbText unmarshals BgpSrteSegmentGTypeSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSegmentGTypeSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSegmentGTypeSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSegmentGTypeSubTlv) Marshal() marshalBgpSrteSegmentGTypeSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSegmentGTypeSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSegmentGTypeSubTlv) Unmarshal() unMarshalBgpSrteSegmentGTypeSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSegmentGTypeSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSegmentGTypeSubTlv) ToProto() (*otg.BgpSrteSegmentGTypeSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSegmentGTypeSubTlv) FromProto(msg *otg.BgpSrteSegmentGTypeSubTlv) (BgpSrteSegmentGTypeSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSegmentGTypeSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSegmentGTypeSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSegmentGTypeSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentGTypeSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSegmentGTypeSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentGTypeSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSegmentGTypeSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentGTypeSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentGTypeSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSegmentGTypeSubTlv) Clone() (BgpSrteSegmentGTypeSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSegmentGTypeSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteSegmentGTypeSubTlv) setNil() { + obj.srMplsSidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteSegmentGTypeSubTlv is type G: IPv6 Address, Interface ID for local and remote pair with optional SID for SR MPLS. +type BgpSrteSegmentGTypeSubTlv interface { + Validation + // msg marshals BgpSrteSegmentGTypeSubTlv to protobuf object *otg.BgpSrteSegmentGTypeSubTlv + // and doesn't set defaults + msg() *otg.BgpSrteSegmentGTypeSubTlv + // setMsg unmarshals BgpSrteSegmentGTypeSubTlv from protobuf object *otg.BgpSrteSegmentGTypeSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteSegmentGTypeSubTlv) BgpSrteSegmentGTypeSubTlv + // provides marshal interface + Marshal() marshalBgpSrteSegmentGTypeSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSegmentGTypeSubTlv + // validate validates BgpSrteSegmentGTypeSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSegmentGTypeSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns string, set in BgpSrteSegmentGTypeSubTlv. + Flags() string + // SetFlags assigns string provided by user to BgpSrteSegmentGTypeSubTlv + SetFlags(value string) BgpSrteSegmentGTypeSubTlv + // HasFlags checks if Flags has been set in BgpSrteSegmentGTypeSubTlv + HasFlags() bool + // LocalInterfaceId returns uint32, set in BgpSrteSegmentGTypeSubTlv. + LocalInterfaceId() uint32 + // SetLocalInterfaceId assigns uint32 provided by user to BgpSrteSegmentGTypeSubTlv + SetLocalInterfaceId(value uint32) BgpSrteSegmentGTypeSubTlv + // HasLocalInterfaceId checks if LocalInterfaceId has been set in BgpSrteSegmentGTypeSubTlv + HasLocalInterfaceId() bool + // LocalIpv6NodeAddress returns string, set in BgpSrteSegmentGTypeSubTlv. + LocalIpv6NodeAddress() string + // SetLocalIpv6NodeAddress assigns string provided by user to BgpSrteSegmentGTypeSubTlv + SetLocalIpv6NodeAddress(value string) BgpSrteSegmentGTypeSubTlv + // RemoteInterfaceId returns uint32, set in BgpSrteSegmentGTypeSubTlv. + RemoteInterfaceId() uint32 + // SetRemoteInterfaceId assigns uint32 provided by user to BgpSrteSegmentGTypeSubTlv + SetRemoteInterfaceId(value uint32) BgpSrteSegmentGTypeSubTlv + // HasRemoteInterfaceId checks if RemoteInterfaceId has been set in BgpSrteSegmentGTypeSubTlv + HasRemoteInterfaceId() bool + // RemoteIpv6NodeAddress returns string, set in BgpSrteSegmentGTypeSubTlv. + RemoteIpv6NodeAddress() string + // SetRemoteIpv6NodeAddress assigns string provided by user to BgpSrteSegmentGTypeSubTlv + SetRemoteIpv6NodeAddress(value string) BgpSrteSegmentGTypeSubTlv + // SrMplsSid returns BgpSrteSrMplsSid, set in BgpSrteSegmentGTypeSubTlv. + // BgpSrteSrMplsSid is configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. + SrMplsSid() BgpSrteSrMplsSid + // SetSrMplsSid assigns BgpSrteSrMplsSid provided by user to BgpSrteSegmentGTypeSubTlv. + // BgpSrteSrMplsSid is configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. + SetSrMplsSid(value BgpSrteSrMplsSid) BgpSrteSegmentGTypeSubTlv + // HasSrMplsSid checks if SrMplsSid has been set in BgpSrteSegmentGTypeSubTlv + HasSrMplsSid() bool + setNil() +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentGTypeSubTlv) Flags() string { + + return *obj.obj.Flags + +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentGTypeSubTlv) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// SetFlags sets the string value in the BgpSrteSegmentGTypeSubTlv object +func (obj *bgpSrteSegmentGTypeSubTlv) SetFlags(value string) BgpSrteSegmentGTypeSubTlv { + + obj.obj.Flags = &value + return obj +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// LocalInterfaceId returns a uint32 +func (obj *bgpSrteSegmentGTypeSubTlv) LocalInterfaceId() uint32 { + + return *obj.obj.LocalInterfaceId + +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// LocalInterfaceId returns a uint32 +func (obj *bgpSrteSegmentGTypeSubTlv) HasLocalInterfaceId() bool { + return obj.obj.LocalInterfaceId != nil +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// SetLocalInterfaceId sets the uint32 value in the BgpSrteSegmentGTypeSubTlv object +func (obj *bgpSrteSegmentGTypeSubTlv) SetLocalInterfaceId(value uint32) BgpSrteSegmentGTypeSubTlv { + + obj.obj.LocalInterfaceId = &value + return obj +} + +// IPv6 address representing a node. +// LocalIpv6NodeAddress returns a string +func (obj *bgpSrteSegmentGTypeSubTlv) LocalIpv6NodeAddress() string { + + return *obj.obj.LocalIpv6NodeAddress + +} + +// IPv6 address representing a node. +// SetLocalIpv6NodeAddress sets the string value in the BgpSrteSegmentGTypeSubTlv object +func (obj *bgpSrteSegmentGTypeSubTlv) SetLocalIpv6NodeAddress(value string) BgpSrteSegmentGTypeSubTlv { + + obj.obj.LocalIpv6NodeAddress = &value + return obj +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// RemoteInterfaceId returns a uint32 +func (obj *bgpSrteSegmentGTypeSubTlv) RemoteInterfaceId() uint32 { + + return *obj.obj.RemoteInterfaceId + +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// RemoteInterfaceId returns a uint32 +func (obj *bgpSrteSegmentGTypeSubTlv) HasRemoteInterfaceId() bool { + return obj.obj.RemoteInterfaceId != nil +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// SetRemoteInterfaceId sets the uint32 value in the BgpSrteSegmentGTypeSubTlv object +func (obj *bgpSrteSegmentGTypeSubTlv) SetRemoteInterfaceId(value uint32) BgpSrteSegmentGTypeSubTlv { + + obj.obj.RemoteInterfaceId = &value + return obj +} + +// IPv6 address representing a node. +// RemoteIpv6NodeAddress returns a string +func (obj *bgpSrteSegmentGTypeSubTlv) RemoteIpv6NodeAddress() string { + + return *obj.obj.RemoteIpv6NodeAddress + +} + +// IPv6 address representing a node. +// SetRemoteIpv6NodeAddress sets the string value in the BgpSrteSegmentGTypeSubTlv object +func (obj *bgpSrteSegmentGTypeSubTlv) SetRemoteIpv6NodeAddress(value string) BgpSrteSegmentGTypeSubTlv { + + obj.obj.RemoteIpv6NodeAddress = &value + return obj +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpSrteSrMplsSid +func (obj *bgpSrteSegmentGTypeSubTlv) SrMplsSid() BgpSrteSrMplsSid { + if obj.obj.SrMplsSid == nil { + obj.obj.SrMplsSid = NewBgpSrteSrMplsSid().msg() + } + if obj.srMplsSidHolder == nil { + obj.srMplsSidHolder = &bgpSrteSrMplsSid{obj: obj.obj.SrMplsSid} + } + return obj.srMplsSidHolder +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpSrteSrMplsSid +func (obj *bgpSrteSegmentGTypeSubTlv) HasSrMplsSid() bool { + return obj.obj.SrMplsSid != nil +} + +// Optional SR-MPLS SID. +// SetSrMplsSid sets the BgpSrteSrMplsSid value in the BgpSrteSegmentGTypeSubTlv object +func (obj *bgpSrteSegmentGTypeSubTlv) SetSrMplsSid(value BgpSrteSrMplsSid) BgpSrteSegmentGTypeSubTlv { + + obj.srMplsSidHolder = nil + obj.obj.SrMplsSid = value.msg() + + return obj +} + +func (obj *bgpSrteSegmentGTypeSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + err := obj.validateHex(obj.Flags()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentGTypeSubTlv.Flags")) + } + + } + + // LocalIpv6NodeAddress is required + if obj.obj.LocalIpv6NodeAddress == nil { + vObj.validationErrors = append(vObj.validationErrors, "LocalIpv6NodeAddress is required field on interface BgpSrteSegmentGTypeSubTlv") + } + if obj.obj.LocalIpv6NodeAddress != nil { + + err := obj.validateIpv6(obj.LocalIpv6NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentGTypeSubTlv.LocalIpv6NodeAddress")) + } + + } + + // RemoteIpv6NodeAddress is required + if obj.obj.RemoteIpv6NodeAddress == nil { + vObj.validationErrors = append(vObj.validationErrors, "RemoteIpv6NodeAddress is required field on interface BgpSrteSegmentGTypeSubTlv") + } + if obj.obj.RemoteIpv6NodeAddress != nil { + + err := obj.validateIpv6(obj.RemoteIpv6NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentGTypeSubTlv.RemoteIpv6NodeAddress")) + } + + } + + if obj.obj.SrMplsSid != nil { + + obj.SrMplsSid().validateObj(vObj, set_default) + } + +} + +func (obj *bgpSrteSegmentGTypeSubTlv) setDefault() { + if obj.obj.LocalInterfaceId == nil { + obj.SetLocalInterfaceId(0) + } + if obj.obj.RemoteInterfaceId == nil { + obj.SetRemoteInterfaceId(0) + } + +} diff --git a/gosnappi/bgp_srte_segment_h_type_sub_tlv.go b/gosnappi/bgp_srte_segment_h_type_sub_tlv.go new file mode 100644 index 00000000..1e5b6c1a --- /dev/null +++ b/gosnappi/bgp_srte_segment_h_type_sub_tlv.go @@ -0,0 +1,431 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSegmentHTypeSubTlv ***** +type bgpSrteSegmentHTypeSubTlv struct { + validation + obj *otg.BgpSrteSegmentHTypeSubTlv + marshaller marshalBgpSrteSegmentHTypeSubTlv + unMarshaller unMarshalBgpSrteSegmentHTypeSubTlv + srMplsSidHolder BgpSrteSrMplsSid +} + +func NewBgpSrteSegmentHTypeSubTlv() BgpSrteSegmentHTypeSubTlv { + obj := bgpSrteSegmentHTypeSubTlv{obj: &otg.BgpSrteSegmentHTypeSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSegmentHTypeSubTlv) msg() *otg.BgpSrteSegmentHTypeSubTlv { + return obj.obj +} + +func (obj *bgpSrteSegmentHTypeSubTlv) setMsg(msg *otg.BgpSrteSegmentHTypeSubTlv) BgpSrteSegmentHTypeSubTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSegmentHTypeSubTlv struct { + obj *bgpSrteSegmentHTypeSubTlv +} + +type marshalBgpSrteSegmentHTypeSubTlv interface { + // ToProto marshals BgpSrteSegmentHTypeSubTlv to protobuf object *otg.BgpSrteSegmentHTypeSubTlv + ToProto() (*otg.BgpSrteSegmentHTypeSubTlv, error) + // ToPbText marshals BgpSrteSegmentHTypeSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSegmentHTypeSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSegmentHTypeSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSegmentHTypeSubTlv struct { + obj *bgpSrteSegmentHTypeSubTlv +} + +type unMarshalBgpSrteSegmentHTypeSubTlv interface { + // FromProto unmarshals BgpSrteSegmentHTypeSubTlv from protobuf object *otg.BgpSrteSegmentHTypeSubTlv + FromProto(msg *otg.BgpSrteSegmentHTypeSubTlv) (BgpSrteSegmentHTypeSubTlv, error) + // FromPbText unmarshals BgpSrteSegmentHTypeSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSegmentHTypeSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSegmentHTypeSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSegmentHTypeSubTlv) Marshal() marshalBgpSrteSegmentHTypeSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSegmentHTypeSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSegmentHTypeSubTlv) Unmarshal() unMarshalBgpSrteSegmentHTypeSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSegmentHTypeSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSegmentHTypeSubTlv) ToProto() (*otg.BgpSrteSegmentHTypeSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSegmentHTypeSubTlv) FromProto(msg *otg.BgpSrteSegmentHTypeSubTlv) (BgpSrteSegmentHTypeSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSegmentHTypeSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSegmentHTypeSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSegmentHTypeSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentHTypeSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSegmentHTypeSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentHTypeSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSegmentHTypeSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentHTypeSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentHTypeSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSegmentHTypeSubTlv) Clone() (BgpSrteSegmentHTypeSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSegmentHTypeSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteSegmentHTypeSubTlv) setNil() { + obj.srMplsSidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteSegmentHTypeSubTlv is type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. +type BgpSrteSegmentHTypeSubTlv interface { + Validation + // msg marshals BgpSrteSegmentHTypeSubTlv to protobuf object *otg.BgpSrteSegmentHTypeSubTlv + // and doesn't set defaults + msg() *otg.BgpSrteSegmentHTypeSubTlv + // setMsg unmarshals BgpSrteSegmentHTypeSubTlv from protobuf object *otg.BgpSrteSegmentHTypeSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteSegmentHTypeSubTlv) BgpSrteSegmentHTypeSubTlv + // provides marshal interface + Marshal() marshalBgpSrteSegmentHTypeSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSegmentHTypeSubTlv + // validate validates BgpSrteSegmentHTypeSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSegmentHTypeSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns string, set in BgpSrteSegmentHTypeSubTlv. + Flags() string + // SetFlags assigns string provided by user to BgpSrteSegmentHTypeSubTlv + SetFlags(value string) BgpSrteSegmentHTypeSubTlv + // HasFlags checks if Flags has been set in BgpSrteSegmentHTypeSubTlv + HasFlags() bool + // LocalIpv6Address returns string, set in BgpSrteSegmentHTypeSubTlv. + LocalIpv6Address() string + // SetLocalIpv6Address assigns string provided by user to BgpSrteSegmentHTypeSubTlv + SetLocalIpv6Address(value string) BgpSrteSegmentHTypeSubTlv + // RemoteIpv6Address returns string, set in BgpSrteSegmentHTypeSubTlv. + RemoteIpv6Address() string + // SetRemoteIpv6Address assigns string provided by user to BgpSrteSegmentHTypeSubTlv + SetRemoteIpv6Address(value string) BgpSrteSegmentHTypeSubTlv + // SrMplsSid returns BgpSrteSrMplsSid, set in BgpSrteSegmentHTypeSubTlv. + // BgpSrteSrMplsSid is configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. + SrMplsSid() BgpSrteSrMplsSid + // SetSrMplsSid assigns BgpSrteSrMplsSid provided by user to BgpSrteSegmentHTypeSubTlv. + // BgpSrteSrMplsSid is configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. + SetSrMplsSid(value BgpSrteSrMplsSid) BgpSrteSegmentHTypeSubTlv + // HasSrMplsSid checks if SrMplsSid has been set in BgpSrteSegmentHTypeSubTlv + HasSrMplsSid() bool + setNil() +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentHTypeSubTlv) Flags() string { + + return *obj.obj.Flags + +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentHTypeSubTlv) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// SetFlags sets the string value in the BgpSrteSegmentHTypeSubTlv object +func (obj *bgpSrteSegmentHTypeSubTlv) SetFlags(value string) BgpSrteSegmentHTypeSubTlv { + + obj.obj.Flags = &value + return obj +} + +// Local IPv6 Address. +// LocalIpv6Address returns a string +func (obj *bgpSrteSegmentHTypeSubTlv) LocalIpv6Address() string { + + return *obj.obj.LocalIpv6Address + +} + +// Local IPv6 Address. +// SetLocalIpv6Address sets the string value in the BgpSrteSegmentHTypeSubTlv object +func (obj *bgpSrteSegmentHTypeSubTlv) SetLocalIpv6Address(value string) BgpSrteSegmentHTypeSubTlv { + + obj.obj.LocalIpv6Address = &value + return obj +} + +// Remote IPv6 Address. +// RemoteIpv6Address returns a string +func (obj *bgpSrteSegmentHTypeSubTlv) RemoteIpv6Address() string { + + return *obj.obj.RemoteIpv6Address + +} + +// Remote IPv6 Address. +// SetRemoteIpv6Address sets the string value in the BgpSrteSegmentHTypeSubTlv object +func (obj *bgpSrteSegmentHTypeSubTlv) SetRemoteIpv6Address(value string) BgpSrteSegmentHTypeSubTlv { + + obj.obj.RemoteIpv6Address = &value + return obj +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpSrteSrMplsSid +func (obj *bgpSrteSegmentHTypeSubTlv) SrMplsSid() BgpSrteSrMplsSid { + if obj.obj.SrMplsSid == nil { + obj.obj.SrMplsSid = NewBgpSrteSrMplsSid().msg() + } + if obj.srMplsSidHolder == nil { + obj.srMplsSidHolder = &bgpSrteSrMplsSid{obj: obj.obj.SrMplsSid} + } + return obj.srMplsSidHolder +} + +// Optional SR-MPLS SID. +// SrMplsSid returns a BgpSrteSrMplsSid +func (obj *bgpSrteSegmentHTypeSubTlv) HasSrMplsSid() bool { + return obj.obj.SrMplsSid != nil +} + +// Optional SR-MPLS SID. +// SetSrMplsSid sets the BgpSrteSrMplsSid value in the BgpSrteSegmentHTypeSubTlv object +func (obj *bgpSrteSegmentHTypeSubTlv) SetSrMplsSid(value BgpSrteSrMplsSid) BgpSrteSegmentHTypeSubTlv { + + obj.srMplsSidHolder = nil + obj.obj.SrMplsSid = value.msg() + + return obj +} + +func (obj *bgpSrteSegmentHTypeSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + err := obj.validateHex(obj.Flags()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentHTypeSubTlv.Flags")) + } + + } + + // LocalIpv6Address is required + if obj.obj.LocalIpv6Address == nil { + vObj.validationErrors = append(vObj.validationErrors, "LocalIpv6Address is required field on interface BgpSrteSegmentHTypeSubTlv") + } + if obj.obj.LocalIpv6Address != nil { + + err := obj.validateIpv6(obj.LocalIpv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentHTypeSubTlv.LocalIpv6Address")) + } + + } + + // RemoteIpv6Address is required + if obj.obj.RemoteIpv6Address == nil { + vObj.validationErrors = append(vObj.validationErrors, "RemoteIpv6Address is required field on interface BgpSrteSegmentHTypeSubTlv") + } + if obj.obj.RemoteIpv6Address != nil { + + err := obj.validateIpv6(obj.RemoteIpv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentHTypeSubTlv.RemoteIpv6Address")) + } + + } + + if obj.obj.SrMplsSid != nil { + + obj.SrMplsSid().validateObj(vObj, set_default) + } + +} + +func (obj *bgpSrteSegmentHTypeSubTlv) setDefault() { + +} diff --git a/gosnappi/bgp_srte_segment_i_type_sub_tlv.go b/gosnappi/bgp_srte_segment_i_type_sub_tlv.go new file mode 100644 index 00000000..31458235 --- /dev/null +++ b/gosnappi/bgp_srte_segment_i_type_sub_tlv.go @@ -0,0 +1,435 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSegmentITypeSubTlv ***** +type bgpSrteSegmentITypeSubTlv struct { + validation + obj *otg.BgpSrteSegmentITypeSubTlv + marshaller marshalBgpSrteSegmentITypeSubTlv + unMarshaller unMarshalBgpSrteSegmentITypeSubTlv + srv6SidEndpointBehaviorHolder BgpSrteSRv6SIDEndpointBehaviorAndStructure +} + +func NewBgpSrteSegmentITypeSubTlv() BgpSrteSegmentITypeSubTlv { + obj := bgpSrteSegmentITypeSubTlv{obj: &otg.BgpSrteSegmentITypeSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSegmentITypeSubTlv) msg() *otg.BgpSrteSegmentITypeSubTlv { + return obj.obj +} + +func (obj *bgpSrteSegmentITypeSubTlv) setMsg(msg *otg.BgpSrteSegmentITypeSubTlv) BgpSrteSegmentITypeSubTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSegmentITypeSubTlv struct { + obj *bgpSrteSegmentITypeSubTlv +} + +type marshalBgpSrteSegmentITypeSubTlv interface { + // ToProto marshals BgpSrteSegmentITypeSubTlv to protobuf object *otg.BgpSrteSegmentITypeSubTlv + ToProto() (*otg.BgpSrteSegmentITypeSubTlv, error) + // ToPbText marshals BgpSrteSegmentITypeSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSegmentITypeSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSegmentITypeSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSegmentITypeSubTlv struct { + obj *bgpSrteSegmentITypeSubTlv +} + +type unMarshalBgpSrteSegmentITypeSubTlv interface { + // FromProto unmarshals BgpSrteSegmentITypeSubTlv from protobuf object *otg.BgpSrteSegmentITypeSubTlv + FromProto(msg *otg.BgpSrteSegmentITypeSubTlv) (BgpSrteSegmentITypeSubTlv, error) + // FromPbText unmarshals BgpSrteSegmentITypeSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSegmentITypeSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSegmentITypeSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSegmentITypeSubTlv) Marshal() marshalBgpSrteSegmentITypeSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSegmentITypeSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSegmentITypeSubTlv) Unmarshal() unMarshalBgpSrteSegmentITypeSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSegmentITypeSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSegmentITypeSubTlv) ToProto() (*otg.BgpSrteSegmentITypeSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSegmentITypeSubTlv) FromProto(msg *otg.BgpSrteSegmentITypeSubTlv) (BgpSrteSegmentITypeSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSegmentITypeSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSegmentITypeSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSegmentITypeSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentITypeSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSegmentITypeSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentITypeSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSegmentITypeSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentITypeSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentITypeSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSegmentITypeSubTlv) Clone() (BgpSrteSegmentITypeSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSegmentITypeSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteSegmentITypeSubTlv) setNil() { + obj.srv6SidEndpointBehaviorHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteSegmentITypeSubTlv is type I: IPv6 Node Address with optional SRv6 SID. +type BgpSrteSegmentITypeSubTlv interface { + Validation + // msg marshals BgpSrteSegmentITypeSubTlv to protobuf object *otg.BgpSrteSegmentITypeSubTlv + // and doesn't set defaults + msg() *otg.BgpSrteSegmentITypeSubTlv + // setMsg unmarshals BgpSrteSegmentITypeSubTlv from protobuf object *otg.BgpSrteSegmentITypeSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteSegmentITypeSubTlv) BgpSrteSegmentITypeSubTlv + // provides marshal interface + Marshal() marshalBgpSrteSegmentITypeSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSegmentITypeSubTlv + // validate validates BgpSrteSegmentITypeSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSegmentITypeSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns string, set in BgpSrteSegmentITypeSubTlv. + Flags() string + // SetFlags assigns string provided by user to BgpSrteSegmentITypeSubTlv + SetFlags(value string) BgpSrteSegmentITypeSubTlv + // HasFlags checks if Flags has been set in BgpSrteSegmentITypeSubTlv + HasFlags() bool + // Ipv6NodeAddress returns string, set in BgpSrteSegmentITypeSubTlv. + Ipv6NodeAddress() string + // SetIpv6NodeAddress assigns string provided by user to BgpSrteSegmentITypeSubTlv + SetIpv6NodeAddress(value string) BgpSrteSegmentITypeSubTlv + // Srv6Sid returns string, set in BgpSrteSegmentITypeSubTlv. + Srv6Sid() string + // SetSrv6Sid assigns string provided by user to BgpSrteSegmentITypeSubTlv + SetSrv6Sid(value string) BgpSrteSegmentITypeSubTlv + // HasSrv6Sid checks if Srv6Sid has been set in BgpSrteSegmentITypeSubTlv + HasSrv6Sid() bool + // Srv6SidEndpointBehavior returns BgpSrteSRv6SIDEndpointBehaviorAndStructure, set in BgpSrteSegmentITypeSubTlv. + // BgpSrteSRv6SIDEndpointBehaviorAndStructure is configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. + Srv6SidEndpointBehavior() BgpSrteSRv6SIDEndpointBehaviorAndStructure + // SetSrv6SidEndpointBehavior assigns BgpSrteSRv6SIDEndpointBehaviorAndStructure provided by user to BgpSrteSegmentITypeSubTlv. + // BgpSrteSRv6SIDEndpointBehaviorAndStructure is configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. + SetSrv6SidEndpointBehavior(value BgpSrteSRv6SIDEndpointBehaviorAndStructure) BgpSrteSegmentITypeSubTlv + // HasSrv6SidEndpointBehavior checks if Srv6SidEndpointBehavior has been set in BgpSrteSegmentITypeSubTlv + HasSrv6SidEndpointBehavior() bool + setNil() +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentITypeSubTlv) Flags() string { + + return *obj.obj.Flags + +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentITypeSubTlv) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// SetFlags sets the string value in the BgpSrteSegmentITypeSubTlv object +func (obj *bgpSrteSegmentITypeSubTlv) SetFlags(value string) BgpSrteSegmentITypeSubTlv { + + obj.obj.Flags = &value + return obj +} + +// IPv6 address representing a node. +// Ipv6NodeAddress returns a string +func (obj *bgpSrteSegmentITypeSubTlv) Ipv6NodeAddress() string { + + return *obj.obj.Ipv6NodeAddress + +} + +// IPv6 address representing a node. +// SetIpv6NodeAddress sets the string value in the BgpSrteSegmentITypeSubTlv object +func (obj *bgpSrteSegmentITypeSubTlv) SetIpv6NodeAddress(value string) BgpSrteSegmentITypeSubTlv { + + obj.obj.Ipv6NodeAddress = &value + return obj +} + +// Optional SRv6 SID. +// Srv6Sid returns a string +func (obj *bgpSrteSegmentITypeSubTlv) Srv6Sid() string { + + return *obj.obj.Srv6Sid + +} + +// Optional SRv6 SID. +// Srv6Sid returns a string +func (obj *bgpSrteSegmentITypeSubTlv) HasSrv6Sid() bool { + return obj.obj.Srv6Sid != nil +} + +// Optional SRv6 SID. +// SetSrv6Sid sets the string value in the BgpSrteSegmentITypeSubTlv object +func (obj *bgpSrteSegmentITypeSubTlv) SetSrv6Sid(value string) BgpSrteSegmentITypeSubTlv { + + obj.obj.Srv6Sid = &value + return obj +} + +// Optional SRv6 Endpoint Behavior and SID Structure. +// Srv6SidEndpointBehavior returns a BgpSrteSRv6SIDEndpointBehaviorAndStructure +func (obj *bgpSrteSegmentITypeSubTlv) Srv6SidEndpointBehavior() BgpSrteSRv6SIDEndpointBehaviorAndStructure { + if obj.obj.Srv6SidEndpointBehavior == nil { + obj.obj.Srv6SidEndpointBehavior = NewBgpSrteSRv6SIDEndpointBehaviorAndStructure().msg() + } + if obj.srv6SidEndpointBehaviorHolder == nil { + obj.srv6SidEndpointBehaviorHolder = &bgpSrteSRv6SIDEndpointBehaviorAndStructure{obj: obj.obj.Srv6SidEndpointBehavior} + } + return obj.srv6SidEndpointBehaviorHolder +} + +// Optional SRv6 Endpoint Behavior and SID Structure. +// Srv6SidEndpointBehavior returns a BgpSrteSRv6SIDEndpointBehaviorAndStructure +func (obj *bgpSrteSegmentITypeSubTlv) HasSrv6SidEndpointBehavior() bool { + return obj.obj.Srv6SidEndpointBehavior != nil +} + +// Optional SRv6 Endpoint Behavior and SID Structure. +// SetSrv6SidEndpointBehavior sets the BgpSrteSRv6SIDEndpointBehaviorAndStructure value in the BgpSrteSegmentITypeSubTlv object +func (obj *bgpSrteSegmentITypeSubTlv) SetSrv6SidEndpointBehavior(value BgpSrteSRv6SIDEndpointBehaviorAndStructure) BgpSrteSegmentITypeSubTlv { + + obj.srv6SidEndpointBehaviorHolder = nil + obj.obj.Srv6SidEndpointBehavior = value.msg() + + return obj +} + +func (obj *bgpSrteSegmentITypeSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + err := obj.validateHex(obj.Flags()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentITypeSubTlv.Flags")) + } + + } + + // Ipv6NodeAddress is required + if obj.obj.Ipv6NodeAddress == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv6NodeAddress is required field on interface BgpSrteSegmentITypeSubTlv") + } + if obj.obj.Ipv6NodeAddress != nil { + + err := obj.validateIpv6(obj.Ipv6NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentITypeSubTlv.Ipv6NodeAddress")) + } + + } + + if obj.obj.Srv6Sid != nil { + + err := obj.validateIpv6(obj.Srv6Sid()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentITypeSubTlv.Srv6Sid")) + } + + } + + if obj.obj.Srv6SidEndpointBehavior != nil { + + obj.Srv6SidEndpointBehavior().validateObj(vObj, set_default) + } + +} + +func (obj *bgpSrteSegmentITypeSubTlv) setDefault() { + +} diff --git a/gosnappi/bgp_srte_segment_j_type_sub_tlv.go b/gosnappi/bgp_srte_segment_j_type_sub_tlv.go new file mode 100644 index 00000000..9b35966b --- /dev/null +++ b/gosnappi/bgp_srte_segment_j_type_sub_tlv.go @@ -0,0 +1,561 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSegmentJTypeSubTlv ***** +type bgpSrteSegmentJTypeSubTlv struct { + validation + obj *otg.BgpSrteSegmentJTypeSubTlv + marshaller marshalBgpSrteSegmentJTypeSubTlv + unMarshaller unMarshalBgpSrteSegmentJTypeSubTlv + srv6SidEndpointBehaviorHolder BgpSrteSRv6SIDEndpointBehaviorAndStructure +} + +func NewBgpSrteSegmentJTypeSubTlv() BgpSrteSegmentJTypeSubTlv { + obj := bgpSrteSegmentJTypeSubTlv{obj: &otg.BgpSrteSegmentJTypeSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSegmentJTypeSubTlv) msg() *otg.BgpSrteSegmentJTypeSubTlv { + return obj.obj +} + +func (obj *bgpSrteSegmentJTypeSubTlv) setMsg(msg *otg.BgpSrteSegmentJTypeSubTlv) BgpSrteSegmentJTypeSubTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSegmentJTypeSubTlv struct { + obj *bgpSrteSegmentJTypeSubTlv +} + +type marshalBgpSrteSegmentJTypeSubTlv interface { + // ToProto marshals BgpSrteSegmentJTypeSubTlv to protobuf object *otg.BgpSrteSegmentJTypeSubTlv + ToProto() (*otg.BgpSrteSegmentJTypeSubTlv, error) + // ToPbText marshals BgpSrteSegmentJTypeSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSegmentJTypeSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSegmentJTypeSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSegmentJTypeSubTlv struct { + obj *bgpSrteSegmentJTypeSubTlv +} + +type unMarshalBgpSrteSegmentJTypeSubTlv interface { + // FromProto unmarshals BgpSrteSegmentJTypeSubTlv from protobuf object *otg.BgpSrteSegmentJTypeSubTlv + FromProto(msg *otg.BgpSrteSegmentJTypeSubTlv) (BgpSrteSegmentJTypeSubTlv, error) + // FromPbText unmarshals BgpSrteSegmentJTypeSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSegmentJTypeSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSegmentJTypeSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSegmentJTypeSubTlv) Marshal() marshalBgpSrteSegmentJTypeSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSegmentJTypeSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSegmentJTypeSubTlv) Unmarshal() unMarshalBgpSrteSegmentJTypeSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSegmentJTypeSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSegmentJTypeSubTlv) ToProto() (*otg.BgpSrteSegmentJTypeSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSegmentJTypeSubTlv) FromProto(msg *otg.BgpSrteSegmentJTypeSubTlv) (BgpSrteSegmentJTypeSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSegmentJTypeSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSegmentJTypeSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSegmentJTypeSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentJTypeSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSegmentJTypeSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentJTypeSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSegmentJTypeSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentJTypeSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentJTypeSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSegmentJTypeSubTlv) Clone() (BgpSrteSegmentJTypeSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSegmentJTypeSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteSegmentJTypeSubTlv) setNil() { + obj.srv6SidEndpointBehaviorHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteSegmentJTypeSubTlv is type J: IPv6 Address, Interface ID for local and remote pair for SRv6 with optional SID. +type BgpSrteSegmentJTypeSubTlv interface { + Validation + // msg marshals BgpSrteSegmentJTypeSubTlv to protobuf object *otg.BgpSrteSegmentJTypeSubTlv + // and doesn't set defaults + msg() *otg.BgpSrteSegmentJTypeSubTlv + // setMsg unmarshals BgpSrteSegmentJTypeSubTlv from protobuf object *otg.BgpSrteSegmentJTypeSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteSegmentJTypeSubTlv) BgpSrteSegmentJTypeSubTlv + // provides marshal interface + Marshal() marshalBgpSrteSegmentJTypeSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSegmentJTypeSubTlv + // validate validates BgpSrteSegmentJTypeSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSegmentJTypeSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns string, set in BgpSrteSegmentJTypeSubTlv. + Flags() string + // SetFlags assigns string provided by user to BgpSrteSegmentJTypeSubTlv + SetFlags(value string) BgpSrteSegmentJTypeSubTlv + // HasFlags checks if Flags has been set in BgpSrteSegmentJTypeSubTlv + HasFlags() bool + // SrAlgorithm returns uint32, set in BgpSrteSegmentJTypeSubTlv. + SrAlgorithm() uint32 + // SetSrAlgorithm assigns uint32 provided by user to BgpSrteSegmentJTypeSubTlv + SetSrAlgorithm(value uint32) BgpSrteSegmentJTypeSubTlv + // HasSrAlgorithm checks if SrAlgorithm has been set in BgpSrteSegmentJTypeSubTlv + HasSrAlgorithm() bool + // LocalInterfaceId returns uint32, set in BgpSrteSegmentJTypeSubTlv. + LocalInterfaceId() uint32 + // SetLocalInterfaceId assigns uint32 provided by user to BgpSrteSegmentJTypeSubTlv + SetLocalInterfaceId(value uint32) BgpSrteSegmentJTypeSubTlv + // HasLocalInterfaceId checks if LocalInterfaceId has been set in BgpSrteSegmentJTypeSubTlv + HasLocalInterfaceId() bool + // LocalIpv6NodeAddress returns string, set in BgpSrteSegmentJTypeSubTlv. + LocalIpv6NodeAddress() string + // SetLocalIpv6NodeAddress assigns string provided by user to BgpSrteSegmentJTypeSubTlv + SetLocalIpv6NodeAddress(value string) BgpSrteSegmentJTypeSubTlv + // RemoteInterfaceId returns uint32, set in BgpSrteSegmentJTypeSubTlv. + RemoteInterfaceId() uint32 + // SetRemoteInterfaceId assigns uint32 provided by user to BgpSrteSegmentJTypeSubTlv + SetRemoteInterfaceId(value uint32) BgpSrteSegmentJTypeSubTlv + // HasRemoteInterfaceId checks if RemoteInterfaceId has been set in BgpSrteSegmentJTypeSubTlv + HasRemoteInterfaceId() bool + // RemoteIpv6NodeAddress returns string, set in BgpSrteSegmentJTypeSubTlv. + RemoteIpv6NodeAddress() string + // SetRemoteIpv6NodeAddress assigns string provided by user to BgpSrteSegmentJTypeSubTlv + SetRemoteIpv6NodeAddress(value string) BgpSrteSegmentJTypeSubTlv + // Srv6Sid returns string, set in BgpSrteSegmentJTypeSubTlv. + Srv6Sid() string + // SetSrv6Sid assigns string provided by user to BgpSrteSegmentJTypeSubTlv + SetSrv6Sid(value string) BgpSrteSegmentJTypeSubTlv + // HasSrv6Sid checks if Srv6Sid has been set in BgpSrteSegmentJTypeSubTlv + HasSrv6Sid() bool + // Srv6SidEndpointBehavior returns BgpSrteSRv6SIDEndpointBehaviorAndStructure, set in BgpSrteSegmentJTypeSubTlv. + // BgpSrteSRv6SIDEndpointBehaviorAndStructure is configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. + Srv6SidEndpointBehavior() BgpSrteSRv6SIDEndpointBehaviorAndStructure + // SetSrv6SidEndpointBehavior assigns BgpSrteSRv6SIDEndpointBehaviorAndStructure provided by user to BgpSrteSegmentJTypeSubTlv. + // BgpSrteSRv6SIDEndpointBehaviorAndStructure is configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. + SetSrv6SidEndpointBehavior(value BgpSrteSRv6SIDEndpointBehaviorAndStructure) BgpSrteSegmentJTypeSubTlv + // HasSrv6SidEndpointBehavior checks if Srv6SidEndpointBehavior has been set in BgpSrteSegmentJTypeSubTlv + HasSrv6SidEndpointBehavior() bool + setNil() +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentJTypeSubTlv) Flags() string { + + return *obj.obj.Flags + +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentJTypeSubTlv) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// SetFlags sets the string value in the BgpSrteSegmentJTypeSubTlv object +func (obj *bgpSrteSegmentJTypeSubTlv) SetFlags(value string) BgpSrteSegmentJTypeSubTlv { + + obj.obj.Flags = &value + return obj +} + +// SR Algorithm identifier when A-Flag in on. +// SrAlgorithm returns a uint32 +func (obj *bgpSrteSegmentJTypeSubTlv) SrAlgorithm() uint32 { + + return *obj.obj.SrAlgorithm + +} + +// SR Algorithm identifier when A-Flag in on. +// SrAlgorithm returns a uint32 +func (obj *bgpSrteSegmentJTypeSubTlv) HasSrAlgorithm() bool { + return obj.obj.SrAlgorithm != nil +} + +// SR Algorithm identifier when A-Flag in on. +// SetSrAlgorithm sets the uint32 value in the BgpSrteSegmentJTypeSubTlv object +func (obj *bgpSrteSegmentJTypeSubTlv) SetSrAlgorithm(value uint32) BgpSrteSegmentJTypeSubTlv { + + obj.obj.SrAlgorithm = &value + return obj +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// LocalInterfaceId returns a uint32 +func (obj *bgpSrteSegmentJTypeSubTlv) LocalInterfaceId() uint32 { + + return *obj.obj.LocalInterfaceId + +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// LocalInterfaceId returns a uint32 +func (obj *bgpSrteSegmentJTypeSubTlv) HasLocalInterfaceId() bool { + return obj.obj.LocalInterfaceId != nil +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// SetLocalInterfaceId sets the uint32 value in the BgpSrteSegmentJTypeSubTlv object +func (obj *bgpSrteSegmentJTypeSubTlv) SetLocalInterfaceId(value uint32) BgpSrteSegmentJTypeSubTlv { + + obj.obj.LocalInterfaceId = &value + return obj +} + +// IPv6 address representing a node. +// LocalIpv6NodeAddress returns a string +func (obj *bgpSrteSegmentJTypeSubTlv) LocalIpv6NodeAddress() string { + + return *obj.obj.LocalIpv6NodeAddress + +} + +// IPv6 address representing a node. +// SetLocalIpv6NodeAddress sets the string value in the BgpSrteSegmentJTypeSubTlv object +func (obj *bgpSrteSegmentJTypeSubTlv) SetLocalIpv6NodeAddress(value string) BgpSrteSegmentJTypeSubTlv { + + obj.obj.LocalIpv6NodeAddress = &value + return obj +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// RemoteInterfaceId returns a uint32 +func (obj *bgpSrteSegmentJTypeSubTlv) RemoteInterfaceId() uint32 { + + return *obj.obj.RemoteInterfaceId + +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// RemoteInterfaceId returns a uint32 +func (obj *bgpSrteSegmentJTypeSubTlv) HasRemoteInterfaceId() bool { + return obj.obj.RemoteInterfaceId != nil +} + +// Local Interface ID: The Interface Index as defined in [RFC8664]. +// SetRemoteInterfaceId sets the uint32 value in the BgpSrteSegmentJTypeSubTlv object +func (obj *bgpSrteSegmentJTypeSubTlv) SetRemoteInterfaceId(value uint32) BgpSrteSegmentJTypeSubTlv { + + obj.obj.RemoteInterfaceId = &value + return obj +} + +// IPv6 address representing a node. +// RemoteIpv6NodeAddress returns a string +func (obj *bgpSrteSegmentJTypeSubTlv) RemoteIpv6NodeAddress() string { + + return *obj.obj.RemoteIpv6NodeAddress + +} + +// IPv6 address representing a node. +// SetRemoteIpv6NodeAddress sets the string value in the BgpSrteSegmentJTypeSubTlv object +func (obj *bgpSrteSegmentJTypeSubTlv) SetRemoteIpv6NodeAddress(value string) BgpSrteSegmentJTypeSubTlv { + + obj.obj.RemoteIpv6NodeAddress = &value + return obj +} + +// Optional SRv6 SID. +// Srv6Sid returns a string +func (obj *bgpSrteSegmentJTypeSubTlv) Srv6Sid() string { + + return *obj.obj.Srv6Sid + +} + +// Optional SRv6 SID. +// Srv6Sid returns a string +func (obj *bgpSrteSegmentJTypeSubTlv) HasSrv6Sid() bool { + return obj.obj.Srv6Sid != nil +} + +// Optional SRv6 SID. +// SetSrv6Sid sets the string value in the BgpSrteSegmentJTypeSubTlv object +func (obj *bgpSrteSegmentJTypeSubTlv) SetSrv6Sid(value string) BgpSrteSegmentJTypeSubTlv { + + obj.obj.Srv6Sid = &value + return obj +} + +// Optional SRv6 Endpoint Behavior and SID Structure. +// Srv6SidEndpointBehavior returns a BgpSrteSRv6SIDEndpointBehaviorAndStructure +func (obj *bgpSrteSegmentJTypeSubTlv) Srv6SidEndpointBehavior() BgpSrteSRv6SIDEndpointBehaviorAndStructure { + if obj.obj.Srv6SidEndpointBehavior == nil { + obj.obj.Srv6SidEndpointBehavior = NewBgpSrteSRv6SIDEndpointBehaviorAndStructure().msg() + } + if obj.srv6SidEndpointBehaviorHolder == nil { + obj.srv6SidEndpointBehaviorHolder = &bgpSrteSRv6SIDEndpointBehaviorAndStructure{obj: obj.obj.Srv6SidEndpointBehavior} + } + return obj.srv6SidEndpointBehaviorHolder +} + +// Optional SRv6 Endpoint Behavior and SID Structure. +// Srv6SidEndpointBehavior returns a BgpSrteSRv6SIDEndpointBehaviorAndStructure +func (obj *bgpSrteSegmentJTypeSubTlv) HasSrv6SidEndpointBehavior() bool { + return obj.obj.Srv6SidEndpointBehavior != nil +} + +// Optional SRv6 Endpoint Behavior and SID Structure. +// SetSrv6SidEndpointBehavior sets the BgpSrteSRv6SIDEndpointBehaviorAndStructure value in the BgpSrteSegmentJTypeSubTlv object +func (obj *bgpSrteSegmentJTypeSubTlv) SetSrv6SidEndpointBehavior(value BgpSrteSRv6SIDEndpointBehaviorAndStructure) BgpSrteSegmentJTypeSubTlv { + + obj.srv6SidEndpointBehaviorHolder = nil + obj.obj.Srv6SidEndpointBehavior = value.msg() + + return obj +} + +func (obj *bgpSrteSegmentJTypeSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + err := obj.validateHex(obj.Flags()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentJTypeSubTlv.Flags")) + } + + } + + // LocalIpv6NodeAddress is required + if obj.obj.LocalIpv6NodeAddress == nil { + vObj.validationErrors = append(vObj.validationErrors, "LocalIpv6NodeAddress is required field on interface BgpSrteSegmentJTypeSubTlv") + } + if obj.obj.LocalIpv6NodeAddress != nil { + + err := obj.validateIpv6(obj.LocalIpv6NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentJTypeSubTlv.LocalIpv6NodeAddress")) + } + + } + + // RemoteIpv6NodeAddress is required + if obj.obj.RemoteIpv6NodeAddress == nil { + vObj.validationErrors = append(vObj.validationErrors, "RemoteIpv6NodeAddress is required field on interface BgpSrteSegmentJTypeSubTlv") + } + if obj.obj.RemoteIpv6NodeAddress != nil { + + err := obj.validateIpv6(obj.RemoteIpv6NodeAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentJTypeSubTlv.RemoteIpv6NodeAddress")) + } + + } + + if obj.obj.Srv6Sid != nil { + + err := obj.validateIpv6(obj.Srv6Sid()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentJTypeSubTlv.Srv6Sid")) + } + + } + + if obj.obj.Srv6SidEndpointBehavior != nil { + + obj.Srv6SidEndpointBehavior().validateObj(vObj, set_default) + } + +} + +func (obj *bgpSrteSegmentJTypeSubTlv) setDefault() { + if obj.obj.SrAlgorithm == nil { + obj.SetSrAlgorithm(0) + } + if obj.obj.LocalInterfaceId == nil { + obj.SetLocalInterfaceId(0) + } + if obj.obj.RemoteInterfaceId == nil { + obj.SetRemoteInterfaceId(0) + } + +} diff --git a/gosnappi/bgp_srte_segment_k_type_sub_tlv.go b/gosnappi/bgp_srte_segment_k_type_sub_tlv.go new file mode 100644 index 00000000..b59fb0b9 --- /dev/null +++ b/gosnappi/bgp_srte_segment_k_type_sub_tlv.go @@ -0,0 +1,499 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSegmentKTypeSubTlv ***** +type bgpSrteSegmentKTypeSubTlv struct { + validation + obj *otg.BgpSrteSegmentKTypeSubTlv + marshaller marshalBgpSrteSegmentKTypeSubTlv + unMarshaller unMarshalBgpSrteSegmentKTypeSubTlv + srv6SidEndpointBehaviorHolder BgpSrteSRv6SIDEndpointBehaviorAndStructure +} + +func NewBgpSrteSegmentKTypeSubTlv() BgpSrteSegmentKTypeSubTlv { + obj := bgpSrteSegmentKTypeSubTlv{obj: &otg.BgpSrteSegmentKTypeSubTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSegmentKTypeSubTlv) msg() *otg.BgpSrteSegmentKTypeSubTlv { + return obj.obj +} + +func (obj *bgpSrteSegmentKTypeSubTlv) setMsg(msg *otg.BgpSrteSegmentKTypeSubTlv) BgpSrteSegmentKTypeSubTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSegmentKTypeSubTlv struct { + obj *bgpSrteSegmentKTypeSubTlv +} + +type marshalBgpSrteSegmentKTypeSubTlv interface { + // ToProto marshals BgpSrteSegmentKTypeSubTlv to protobuf object *otg.BgpSrteSegmentKTypeSubTlv + ToProto() (*otg.BgpSrteSegmentKTypeSubTlv, error) + // ToPbText marshals BgpSrteSegmentKTypeSubTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSegmentKTypeSubTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSegmentKTypeSubTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSegmentKTypeSubTlv struct { + obj *bgpSrteSegmentKTypeSubTlv +} + +type unMarshalBgpSrteSegmentKTypeSubTlv interface { + // FromProto unmarshals BgpSrteSegmentKTypeSubTlv from protobuf object *otg.BgpSrteSegmentKTypeSubTlv + FromProto(msg *otg.BgpSrteSegmentKTypeSubTlv) (BgpSrteSegmentKTypeSubTlv, error) + // FromPbText unmarshals BgpSrteSegmentKTypeSubTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSegmentKTypeSubTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSegmentKTypeSubTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSegmentKTypeSubTlv) Marshal() marshalBgpSrteSegmentKTypeSubTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSegmentKTypeSubTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSegmentKTypeSubTlv) Unmarshal() unMarshalBgpSrteSegmentKTypeSubTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSegmentKTypeSubTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSegmentKTypeSubTlv) ToProto() (*otg.BgpSrteSegmentKTypeSubTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSegmentKTypeSubTlv) FromProto(msg *otg.BgpSrteSegmentKTypeSubTlv) (BgpSrteSegmentKTypeSubTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSegmentKTypeSubTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSegmentKTypeSubTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSegmentKTypeSubTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentKTypeSubTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSegmentKTypeSubTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentKTypeSubTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSegmentKTypeSubTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentKTypeSubTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentKTypeSubTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSegmentKTypeSubTlv) Clone() (BgpSrteSegmentKTypeSubTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSegmentKTypeSubTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteSegmentKTypeSubTlv) setNil() { + obj.srv6SidEndpointBehaviorHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteSegmentKTypeSubTlv is type K: IPv6 Local and Remote addresses for SRv6 with optional SID. +type BgpSrteSegmentKTypeSubTlv interface { + Validation + // msg marshals BgpSrteSegmentKTypeSubTlv to protobuf object *otg.BgpSrteSegmentKTypeSubTlv + // and doesn't set defaults + msg() *otg.BgpSrteSegmentKTypeSubTlv + // setMsg unmarshals BgpSrteSegmentKTypeSubTlv from protobuf object *otg.BgpSrteSegmentKTypeSubTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteSegmentKTypeSubTlv) BgpSrteSegmentKTypeSubTlv + // provides marshal interface + Marshal() marshalBgpSrteSegmentKTypeSubTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSegmentKTypeSubTlv + // validate validates BgpSrteSegmentKTypeSubTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSegmentKTypeSubTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns string, set in BgpSrteSegmentKTypeSubTlv. + Flags() string + // SetFlags assigns string provided by user to BgpSrteSegmentKTypeSubTlv + SetFlags(value string) BgpSrteSegmentKTypeSubTlv + // HasFlags checks if Flags has been set in BgpSrteSegmentKTypeSubTlv + HasFlags() bool + // SrAlgorithm returns uint32, set in BgpSrteSegmentKTypeSubTlv. + SrAlgorithm() uint32 + // SetSrAlgorithm assigns uint32 provided by user to BgpSrteSegmentKTypeSubTlv + SetSrAlgorithm(value uint32) BgpSrteSegmentKTypeSubTlv + // HasSrAlgorithm checks if SrAlgorithm has been set in BgpSrteSegmentKTypeSubTlv + HasSrAlgorithm() bool + // LocalIpv6Address returns string, set in BgpSrteSegmentKTypeSubTlv. + LocalIpv6Address() string + // SetLocalIpv6Address assigns string provided by user to BgpSrteSegmentKTypeSubTlv + SetLocalIpv6Address(value string) BgpSrteSegmentKTypeSubTlv + // RemoteIpv6Address returns string, set in BgpSrteSegmentKTypeSubTlv. + RemoteIpv6Address() string + // SetRemoteIpv6Address assigns string provided by user to BgpSrteSegmentKTypeSubTlv + SetRemoteIpv6Address(value string) BgpSrteSegmentKTypeSubTlv + // Srv6Sid returns string, set in BgpSrteSegmentKTypeSubTlv. + Srv6Sid() string + // SetSrv6Sid assigns string provided by user to BgpSrteSegmentKTypeSubTlv + SetSrv6Sid(value string) BgpSrteSegmentKTypeSubTlv + // HasSrv6Sid checks if Srv6Sid has been set in BgpSrteSegmentKTypeSubTlv + HasSrv6Sid() bool + // Srv6SidEndpointBehavior returns BgpSrteSRv6SIDEndpointBehaviorAndStructure, set in BgpSrteSegmentKTypeSubTlv. + // BgpSrteSRv6SIDEndpointBehaviorAndStructure is configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. + Srv6SidEndpointBehavior() BgpSrteSRv6SIDEndpointBehaviorAndStructure + // SetSrv6SidEndpointBehavior assigns BgpSrteSRv6SIDEndpointBehaviorAndStructure provided by user to BgpSrteSegmentKTypeSubTlv. + // BgpSrteSRv6SIDEndpointBehaviorAndStructure is configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. + SetSrv6SidEndpointBehavior(value BgpSrteSRv6SIDEndpointBehaviorAndStructure) BgpSrteSegmentKTypeSubTlv + // HasSrv6SidEndpointBehavior checks if Srv6SidEndpointBehavior has been set in BgpSrteSegmentKTypeSubTlv + HasSrv6SidEndpointBehavior() bool + setNil() +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentKTypeSubTlv) Flags() string { + + return *obj.obj.Flags + +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// Flags returns a string +func (obj *bgpSrteSegmentKTypeSubTlv) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 +// SetFlags sets the string value in the BgpSrteSegmentKTypeSubTlv object +func (obj *bgpSrteSegmentKTypeSubTlv) SetFlags(value string) BgpSrteSegmentKTypeSubTlv { + + obj.obj.Flags = &value + return obj +} + +// SR Algorithm identifier when A-Flag in on. +// SrAlgorithm returns a uint32 +func (obj *bgpSrteSegmentKTypeSubTlv) SrAlgorithm() uint32 { + + return *obj.obj.SrAlgorithm + +} + +// SR Algorithm identifier when A-Flag in on. +// SrAlgorithm returns a uint32 +func (obj *bgpSrteSegmentKTypeSubTlv) HasSrAlgorithm() bool { + return obj.obj.SrAlgorithm != nil +} + +// SR Algorithm identifier when A-Flag in on. +// SetSrAlgorithm sets the uint32 value in the BgpSrteSegmentKTypeSubTlv object +func (obj *bgpSrteSegmentKTypeSubTlv) SetSrAlgorithm(value uint32) BgpSrteSegmentKTypeSubTlv { + + obj.obj.SrAlgorithm = &value + return obj +} + +// IPv6 address representing a node. +// LocalIpv6Address returns a string +func (obj *bgpSrteSegmentKTypeSubTlv) LocalIpv6Address() string { + + return *obj.obj.LocalIpv6Address + +} + +// IPv6 address representing a node. +// SetLocalIpv6Address sets the string value in the BgpSrteSegmentKTypeSubTlv object +func (obj *bgpSrteSegmentKTypeSubTlv) SetLocalIpv6Address(value string) BgpSrteSegmentKTypeSubTlv { + + obj.obj.LocalIpv6Address = &value + return obj +} + +// IPv6 address representing a node. +// RemoteIpv6Address returns a string +func (obj *bgpSrteSegmentKTypeSubTlv) RemoteIpv6Address() string { + + return *obj.obj.RemoteIpv6Address + +} + +// IPv6 address representing a node. +// SetRemoteIpv6Address sets the string value in the BgpSrteSegmentKTypeSubTlv object +func (obj *bgpSrteSegmentKTypeSubTlv) SetRemoteIpv6Address(value string) BgpSrteSegmentKTypeSubTlv { + + obj.obj.RemoteIpv6Address = &value + return obj +} + +// Optional SRv6 SID. +// Srv6Sid returns a string +func (obj *bgpSrteSegmentKTypeSubTlv) Srv6Sid() string { + + return *obj.obj.Srv6Sid + +} + +// Optional SRv6 SID. +// Srv6Sid returns a string +func (obj *bgpSrteSegmentKTypeSubTlv) HasSrv6Sid() bool { + return obj.obj.Srv6Sid != nil +} + +// Optional SRv6 SID. +// SetSrv6Sid sets the string value in the BgpSrteSegmentKTypeSubTlv object +func (obj *bgpSrteSegmentKTypeSubTlv) SetSrv6Sid(value string) BgpSrteSegmentKTypeSubTlv { + + obj.obj.Srv6Sid = &value + return obj +} + +// Optional SRv6 Endpoint Behavior and SID Structure. +// Srv6SidEndpointBehavior returns a BgpSrteSRv6SIDEndpointBehaviorAndStructure +func (obj *bgpSrteSegmentKTypeSubTlv) Srv6SidEndpointBehavior() BgpSrteSRv6SIDEndpointBehaviorAndStructure { + if obj.obj.Srv6SidEndpointBehavior == nil { + obj.obj.Srv6SidEndpointBehavior = NewBgpSrteSRv6SIDEndpointBehaviorAndStructure().msg() + } + if obj.srv6SidEndpointBehaviorHolder == nil { + obj.srv6SidEndpointBehaviorHolder = &bgpSrteSRv6SIDEndpointBehaviorAndStructure{obj: obj.obj.Srv6SidEndpointBehavior} + } + return obj.srv6SidEndpointBehaviorHolder +} + +// Optional SRv6 Endpoint Behavior and SID Structure. +// Srv6SidEndpointBehavior returns a BgpSrteSRv6SIDEndpointBehaviorAndStructure +func (obj *bgpSrteSegmentKTypeSubTlv) HasSrv6SidEndpointBehavior() bool { + return obj.obj.Srv6SidEndpointBehavior != nil +} + +// Optional SRv6 Endpoint Behavior and SID Structure. +// SetSrv6SidEndpointBehavior sets the BgpSrteSRv6SIDEndpointBehaviorAndStructure value in the BgpSrteSegmentKTypeSubTlv object +func (obj *bgpSrteSegmentKTypeSubTlv) SetSrv6SidEndpointBehavior(value BgpSrteSRv6SIDEndpointBehaviorAndStructure) BgpSrteSegmentKTypeSubTlv { + + obj.srv6SidEndpointBehaviorHolder = nil + obj.obj.Srv6SidEndpointBehavior = value.msg() + + return obj +} + +func (obj *bgpSrteSegmentKTypeSubTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + err := obj.validateHex(obj.Flags()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentKTypeSubTlv.Flags")) + } + + } + + // LocalIpv6Address is required + if obj.obj.LocalIpv6Address == nil { + vObj.validationErrors = append(vObj.validationErrors, "LocalIpv6Address is required field on interface BgpSrteSegmentKTypeSubTlv") + } + if obj.obj.LocalIpv6Address != nil { + + err := obj.validateIpv6(obj.LocalIpv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentKTypeSubTlv.LocalIpv6Address")) + } + + } + + // RemoteIpv6Address is required + if obj.obj.RemoteIpv6Address == nil { + vObj.validationErrors = append(vObj.validationErrors, "RemoteIpv6Address is required field on interface BgpSrteSegmentKTypeSubTlv") + } + if obj.obj.RemoteIpv6Address != nil { + + err := obj.validateIpv6(obj.RemoteIpv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentKTypeSubTlv.RemoteIpv6Address")) + } + + } + + if obj.obj.Srv6Sid != nil { + + err := obj.validateIpv6(obj.Srv6Sid()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteSegmentKTypeSubTlv.Srv6Sid")) + } + + } + + if obj.obj.Srv6SidEndpointBehavior != nil { + + obj.Srv6SidEndpointBehavior().validateObj(vObj, set_default) + } + +} + +func (obj *bgpSrteSegmentKTypeSubTlv) setDefault() { + if obj.obj.SrAlgorithm == nil { + obj.SetSrAlgorithm(0) + } + +} diff --git a/gosnappi/bgp_srte_segment_list.go b/gosnappi/bgp_srte_segment_list.go new file mode 100644 index 00000000..8c259711 --- /dev/null +++ b/gosnappi/bgp_srte_segment_list.go @@ -0,0 +1,476 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSegmentList ***** +type bgpSrteSegmentList struct { + validation + obj *otg.BgpSrteSegmentList + marshaller marshalBgpSrteSegmentList + unMarshaller unMarshalBgpSrteSegmentList + segmentsHolder BgpSrteSegmentListBgpSrteSegmentIter +} + +func NewBgpSrteSegmentList() BgpSrteSegmentList { + obj := bgpSrteSegmentList{obj: &otg.BgpSrteSegmentList{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSegmentList) msg() *otg.BgpSrteSegmentList { + return obj.obj +} + +func (obj *bgpSrteSegmentList) setMsg(msg *otg.BgpSrteSegmentList) BgpSrteSegmentList { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSegmentList struct { + obj *bgpSrteSegmentList +} + +type marshalBgpSrteSegmentList interface { + // ToProto marshals BgpSrteSegmentList to protobuf object *otg.BgpSrteSegmentList + ToProto() (*otg.BgpSrteSegmentList, error) + // ToPbText marshals BgpSrteSegmentList to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSegmentList to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSegmentList to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSegmentList struct { + obj *bgpSrteSegmentList +} + +type unMarshalBgpSrteSegmentList interface { + // FromProto unmarshals BgpSrteSegmentList from protobuf object *otg.BgpSrteSegmentList + FromProto(msg *otg.BgpSrteSegmentList) (BgpSrteSegmentList, error) + // FromPbText unmarshals BgpSrteSegmentList from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSegmentList from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSegmentList from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSegmentList) Marshal() marshalBgpSrteSegmentList { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSegmentList{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSegmentList) Unmarshal() unMarshalBgpSrteSegmentList { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSegmentList{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSegmentList) ToProto() (*otg.BgpSrteSegmentList, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSegmentList) FromProto(msg *otg.BgpSrteSegmentList) (BgpSrteSegmentList, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSegmentList) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSegmentList) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSegmentList) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentList) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSegmentList) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSegmentList) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSegmentList) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentList) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSegmentList) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSegmentList) Clone() (BgpSrteSegmentList, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSegmentList() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteSegmentList) setNil() { + obj.segmentsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteSegmentList is optional configuration for BGP SR TE Policy segment list. The Segment List sub-TLV encodes a single explicit path towards the Endpoint. +type BgpSrteSegmentList interface { + Validation + // msg marshals BgpSrteSegmentList to protobuf object *otg.BgpSrteSegmentList + // and doesn't set defaults + msg() *otg.BgpSrteSegmentList + // setMsg unmarshals BgpSrteSegmentList from protobuf object *otg.BgpSrteSegmentList + // and doesn't set defaults + setMsg(*otg.BgpSrteSegmentList) BgpSrteSegmentList + // provides marshal interface + Marshal() marshalBgpSrteSegmentList + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSegmentList + // validate validates BgpSrteSegmentList + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSegmentList, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Weight returns uint32, set in BgpSrteSegmentList. + Weight() uint32 + // SetWeight assigns uint32 provided by user to BgpSrteSegmentList + SetWeight(value uint32) BgpSrteSegmentList + // HasWeight checks if Weight has been set in BgpSrteSegmentList + HasWeight() bool + // Segments returns BgpSrteSegmentListBgpSrteSegmentIterIter, set in BgpSrteSegmentList + Segments() BgpSrteSegmentListBgpSrteSegmentIter + // Name returns string, set in BgpSrteSegmentList. + Name() string + // SetName assigns string provided by user to BgpSrteSegmentList + SetName(value string) BgpSrteSegmentList + // Active returns bool, set in BgpSrteSegmentList. + Active() bool + // SetActive assigns bool provided by user to BgpSrteSegmentList + SetActive(value bool) BgpSrteSegmentList + // HasActive checks if Active has been set in BgpSrteSegmentList + HasActive() bool + setNil() +} + +// The Weight associated with a given path and the sub-TLV is optional. +// Weight returns a uint32 +func (obj *bgpSrteSegmentList) Weight() uint32 { + + return *obj.obj.Weight + +} + +// The Weight associated with a given path and the sub-TLV is optional. +// Weight returns a uint32 +func (obj *bgpSrteSegmentList) HasWeight() bool { + return obj.obj.Weight != nil +} + +// The Weight associated with a given path and the sub-TLV is optional. +// SetWeight sets the uint32 value in the BgpSrteSegmentList object +func (obj *bgpSrteSegmentList) SetWeight(value uint32) BgpSrteSegmentList { + + obj.obj.Weight = &value + return obj +} + +// description is TBD +// Segments returns a []BgpSrteSegment +func (obj *bgpSrteSegmentList) Segments() BgpSrteSegmentListBgpSrteSegmentIter { + if len(obj.obj.Segments) == 0 { + obj.obj.Segments = []*otg.BgpSrteSegment{} + } + if obj.segmentsHolder == nil { + obj.segmentsHolder = newBgpSrteSegmentListBgpSrteSegmentIter(&obj.obj.Segments).setMsg(obj) + } + return obj.segmentsHolder +} + +type bgpSrteSegmentListBgpSrteSegmentIter struct { + obj *bgpSrteSegmentList + bgpSrteSegmentSlice []BgpSrteSegment + fieldPtr *[]*otg.BgpSrteSegment +} + +func newBgpSrteSegmentListBgpSrteSegmentIter(ptr *[]*otg.BgpSrteSegment) BgpSrteSegmentListBgpSrteSegmentIter { + return &bgpSrteSegmentListBgpSrteSegmentIter{fieldPtr: ptr} +} + +type BgpSrteSegmentListBgpSrteSegmentIter interface { + setMsg(*bgpSrteSegmentList) BgpSrteSegmentListBgpSrteSegmentIter + Items() []BgpSrteSegment + Add() BgpSrteSegment + Append(items ...BgpSrteSegment) BgpSrteSegmentListBgpSrteSegmentIter + Set(index int, newObj BgpSrteSegment) BgpSrteSegmentListBgpSrteSegmentIter + Clear() BgpSrteSegmentListBgpSrteSegmentIter + clearHolderSlice() BgpSrteSegmentListBgpSrteSegmentIter + appendHolderSlice(item BgpSrteSegment) BgpSrteSegmentListBgpSrteSegmentIter +} + +func (obj *bgpSrteSegmentListBgpSrteSegmentIter) setMsg(msg *bgpSrteSegmentList) BgpSrteSegmentListBgpSrteSegmentIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpSrteSegment{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpSrteSegmentListBgpSrteSegmentIter) Items() []BgpSrteSegment { + return obj.bgpSrteSegmentSlice +} + +func (obj *bgpSrteSegmentListBgpSrteSegmentIter) Add() BgpSrteSegment { + newObj := &otg.BgpSrteSegment{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpSrteSegment{obj: newObj} + newLibObj.setDefault() + obj.bgpSrteSegmentSlice = append(obj.bgpSrteSegmentSlice, newLibObj) + return newLibObj +} + +func (obj *bgpSrteSegmentListBgpSrteSegmentIter) Append(items ...BgpSrteSegment) BgpSrteSegmentListBgpSrteSegmentIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpSrteSegmentSlice = append(obj.bgpSrteSegmentSlice, item) + } + return obj +} + +func (obj *bgpSrteSegmentListBgpSrteSegmentIter) Set(index int, newObj BgpSrteSegment) BgpSrteSegmentListBgpSrteSegmentIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpSrteSegmentSlice[index] = newObj + return obj +} +func (obj *bgpSrteSegmentListBgpSrteSegmentIter) Clear() BgpSrteSegmentListBgpSrteSegmentIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpSrteSegment{} + obj.bgpSrteSegmentSlice = []BgpSrteSegment{} + } + return obj +} +func (obj *bgpSrteSegmentListBgpSrteSegmentIter) clearHolderSlice() BgpSrteSegmentListBgpSrteSegmentIter { + if len(obj.bgpSrteSegmentSlice) > 0 { + obj.bgpSrteSegmentSlice = []BgpSrteSegment{} + } + return obj +} +func (obj *bgpSrteSegmentListBgpSrteSegmentIter) appendHolderSlice(item BgpSrteSegment) BgpSrteSegmentListBgpSrteSegmentIter { + obj.bgpSrteSegmentSlice = append(obj.bgpSrteSegmentSlice, item) + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *bgpSrteSegmentList) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the BgpSrteSegmentList object +func (obj *bgpSrteSegmentList) SetName(value string) BgpSrteSegmentList { + + obj.obj.Name = &value + return obj +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// Active returns a bool +func (obj *bgpSrteSegmentList) Active() bool { + + return *obj.obj.Active + +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// Active returns a bool +func (obj *bgpSrteSegmentList) HasActive() bool { + return obj.obj.Active != nil +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// SetActive sets the bool value in the BgpSrteSegmentList object +func (obj *bgpSrteSegmentList) SetActive(value bool) BgpSrteSegmentList { + + obj.obj.Active = &value + return obj +} + +func (obj *bgpSrteSegmentList) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Segments) != 0 { + + if set_default { + obj.Segments().clearHolderSlice() + for _, item := range obj.obj.Segments { + obj.Segments().appendHolderSlice(&bgpSrteSegment{obj: item}) + } + } + for _, item := range obj.Segments().Items() { + item.validateObj(vObj, set_default) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface BgpSrteSegmentList") + } +} + +func (obj *bgpSrteSegmentList) setDefault() { + if obj.obj.Weight == nil { + obj.SetWeight(0) + } + if obj.obj.Active == nil { + obj.SetActive(true) + } + +} diff --git a/gosnappi/bgp_srte_sr_mpls_sid.go b/gosnappi/bgp_srte_sr_mpls_sid.go new file mode 100644 index 00000000..5f73bd2e --- /dev/null +++ b/gosnappi/bgp_srte_sr_mpls_sid.go @@ -0,0 +1,420 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteSrMplsSid ***** +type bgpSrteSrMplsSid struct { + validation + obj *otg.BgpSrteSrMplsSid + marshaller marshalBgpSrteSrMplsSid + unMarshaller unMarshalBgpSrteSrMplsSid +} + +func NewBgpSrteSrMplsSid() BgpSrteSrMplsSid { + obj := bgpSrteSrMplsSid{obj: &otg.BgpSrteSrMplsSid{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteSrMplsSid) msg() *otg.BgpSrteSrMplsSid { + return obj.obj +} + +func (obj *bgpSrteSrMplsSid) setMsg(msg *otg.BgpSrteSrMplsSid) BgpSrteSrMplsSid { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteSrMplsSid struct { + obj *bgpSrteSrMplsSid +} + +type marshalBgpSrteSrMplsSid interface { + // ToProto marshals BgpSrteSrMplsSid to protobuf object *otg.BgpSrteSrMplsSid + ToProto() (*otg.BgpSrteSrMplsSid, error) + // ToPbText marshals BgpSrteSrMplsSid to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteSrMplsSid to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteSrMplsSid to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteSrMplsSid struct { + obj *bgpSrteSrMplsSid +} + +type unMarshalBgpSrteSrMplsSid interface { + // FromProto unmarshals BgpSrteSrMplsSid from protobuf object *otg.BgpSrteSrMplsSid + FromProto(msg *otg.BgpSrteSrMplsSid) (BgpSrteSrMplsSid, error) + // FromPbText unmarshals BgpSrteSrMplsSid from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteSrMplsSid from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteSrMplsSid from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteSrMplsSid) Marshal() marshalBgpSrteSrMplsSid { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteSrMplsSid{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteSrMplsSid) Unmarshal() unMarshalBgpSrteSrMplsSid { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteSrMplsSid{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteSrMplsSid) ToProto() (*otg.BgpSrteSrMplsSid, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteSrMplsSid) FromProto(msg *otg.BgpSrteSrMplsSid) (BgpSrteSrMplsSid, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteSrMplsSid) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteSrMplsSid) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteSrMplsSid) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSrMplsSid) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteSrMplsSid) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteSrMplsSid) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteSrMplsSid) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteSrMplsSid) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteSrMplsSid) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteSrMplsSid) Clone() (BgpSrteSrMplsSid, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteSrMplsSid() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpSrteSrMplsSid is configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. +type BgpSrteSrMplsSid interface { + Validation + // msg marshals BgpSrteSrMplsSid to protobuf object *otg.BgpSrteSrMplsSid + // and doesn't set defaults + msg() *otg.BgpSrteSrMplsSid + // setMsg unmarshals BgpSrteSrMplsSid from protobuf object *otg.BgpSrteSrMplsSid + // and doesn't set defaults + setMsg(*otg.BgpSrteSrMplsSid) BgpSrteSrMplsSid + // provides marshal interface + Marshal() marshalBgpSrteSrMplsSid + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteSrMplsSid + // validate validates BgpSrteSrMplsSid + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteSrMplsSid, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Label returns uint32, set in BgpSrteSrMplsSid. + Label() uint32 + // SetLabel assigns uint32 provided by user to BgpSrteSrMplsSid + SetLabel(value uint32) BgpSrteSrMplsSid + // HasLabel checks if Label has been set in BgpSrteSrMplsSid + HasLabel() bool + // Tc returns uint32, set in BgpSrteSrMplsSid. + Tc() uint32 + // SetTc assigns uint32 provided by user to BgpSrteSrMplsSid + SetTc(value uint32) BgpSrteSrMplsSid + // HasTc checks if Tc has been set in BgpSrteSrMplsSid + HasTc() bool + // SBit returns bool, set in BgpSrteSrMplsSid. + SBit() bool + // SetSBit assigns bool provided by user to BgpSrteSrMplsSid + SetSBit(value bool) BgpSrteSrMplsSid + // HasSBit checks if SBit has been set in BgpSrteSrMplsSid + HasSBit() bool + // Ttl returns uint32, set in BgpSrteSrMplsSid. + Ttl() uint32 + // SetTtl assigns uint32 provided by user to BgpSrteSrMplsSid + SetTtl(value uint32) BgpSrteSrMplsSid + // HasTtl checks if Ttl has been set in BgpSrteSrMplsSid + HasTtl() bool +} + +// Label value in [0, 2^20 -1]. +// Label returns a uint32 +func (obj *bgpSrteSrMplsSid) Label() uint32 { + + return *obj.obj.Label + +} + +// Label value in [0, 2^20 -1]. +// Label returns a uint32 +func (obj *bgpSrteSrMplsSid) HasLabel() bool { + return obj.obj.Label != nil +} + +// Label value in [0, 2^20 -1]. +// SetLabel sets the uint32 value in the BgpSrteSrMplsSid object +func (obj *bgpSrteSrMplsSid) SetLabel(value uint32) BgpSrteSrMplsSid { + + obj.obj.Label = &value + return obj +} + +// Traffic class in bits. +// Tc returns a uint32 +func (obj *bgpSrteSrMplsSid) Tc() uint32 { + + return *obj.obj.Tc + +} + +// Traffic class in bits. +// Tc returns a uint32 +func (obj *bgpSrteSrMplsSid) HasTc() bool { + return obj.obj.Tc != nil +} + +// Traffic class in bits. +// SetTc sets the uint32 value in the BgpSrteSrMplsSid object +func (obj *bgpSrteSrMplsSid) SetTc(value uint32) BgpSrteSrMplsSid { + + obj.obj.Tc = &value + return obj +} + +// Bottom-of-Stack bit. +// SBit returns a bool +func (obj *bgpSrteSrMplsSid) SBit() bool { + + return *obj.obj.SBit + +} + +// Bottom-of-Stack bit. +// SBit returns a bool +func (obj *bgpSrteSrMplsSid) HasSBit() bool { + return obj.obj.SBit != nil +} + +// Bottom-of-Stack bit. +// SetSBit sets the bool value in the BgpSrteSrMplsSid object +func (obj *bgpSrteSrMplsSid) SetSBit(value bool) BgpSrteSrMplsSid { + + obj.obj.SBit = &value + return obj +} + +// Time To Live. +// Ttl returns a uint32 +func (obj *bgpSrteSrMplsSid) Ttl() uint32 { + + return *obj.obj.Ttl + +} + +// Time To Live. +// Ttl returns a uint32 +func (obj *bgpSrteSrMplsSid) HasTtl() bool { + return obj.obj.Ttl != nil +} + +// Time To Live. +// SetTtl sets the uint32 value in the BgpSrteSrMplsSid object +func (obj *bgpSrteSrMplsSid) SetTtl(value uint32) BgpSrteSrMplsSid { + + obj.obj.Ttl = &value + return obj +} + +func (obj *bgpSrteSrMplsSid) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Label != nil { + + if *obj.obj.Label > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpSrteSrMplsSid.Label <= 1048575 but Got %d", *obj.obj.Label)) + } + + } + + if obj.obj.Tc != nil { + + if *obj.obj.Tc > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpSrteSrMplsSid.Tc <= 7 but Got %d", *obj.obj.Tc)) + } + + } + + if obj.obj.Ttl != nil { + + if *obj.obj.Ttl > 225 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpSrteSrMplsSid.Ttl <= 225 but Got %d", *obj.obj.Ttl)) + } + + } + +} + +func (obj *bgpSrteSrMplsSid) setDefault() { + +} diff --git a/gosnappi/bgp_srte_v4_policy.go b/gosnappi/bgp_srte_v4_policy.go new file mode 100644 index 00000000..5189e9ff --- /dev/null +++ b/gosnappi/bgp_srte_v4_policy.go @@ -0,0 +1,1043 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteV4Policy ***** +type bgpSrteV4Policy struct { + validation + obj *otg.BgpSrteV4Policy + marshaller marshalBgpSrteV4Policy + unMarshaller unMarshalBgpSrteV4Policy + advancedHolder BgpRouteAdvanced + addPathHolder BgpAddPath + asPathHolder BgpAsPath + communitiesHolder BgpSrteV4PolicyBgpCommunityIter + extCommunitiesHolder BgpSrteV4PolicyBgpExtCommunityIter + tunnelTlvsHolder BgpSrteV4PolicyBgpSrteV4TunnelTlvIter +} + +func NewBgpSrteV4Policy() BgpSrteV4Policy { + obj := bgpSrteV4Policy{obj: &otg.BgpSrteV4Policy{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteV4Policy) msg() *otg.BgpSrteV4Policy { + return obj.obj +} + +func (obj *bgpSrteV4Policy) setMsg(msg *otg.BgpSrteV4Policy) BgpSrteV4Policy { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteV4Policy struct { + obj *bgpSrteV4Policy +} + +type marshalBgpSrteV4Policy interface { + // ToProto marshals BgpSrteV4Policy to protobuf object *otg.BgpSrteV4Policy + ToProto() (*otg.BgpSrteV4Policy, error) + // ToPbText marshals BgpSrteV4Policy to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteV4Policy to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteV4Policy to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteV4Policy struct { + obj *bgpSrteV4Policy +} + +type unMarshalBgpSrteV4Policy interface { + // FromProto unmarshals BgpSrteV4Policy from protobuf object *otg.BgpSrteV4Policy + FromProto(msg *otg.BgpSrteV4Policy) (BgpSrteV4Policy, error) + // FromPbText unmarshals BgpSrteV4Policy from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteV4Policy from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteV4Policy from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteV4Policy) Marshal() marshalBgpSrteV4Policy { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteV4Policy{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteV4Policy) Unmarshal() unMarshalBgpSrteV4Policy { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteV4Policy{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteV4Policy) ToProto() (*otg.BgpSrteV4Policy, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteV4Policy) FromProto(msg *otg.BgpSrteV4Policy) (BgpSrteV4Policy, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteV4Policy) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteV4Policy) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteV4Policy) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteV4Policy) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteV4Policy) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteV4Policy) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteV4Policy) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteV4Policy) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteV4Policy) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteV4Policy) Clone() (BgpSrteV4Policy, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteV4Policy() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteV4Policy) setNil() { + obj.advancedHolder = nil + obj.addPathHolder = nil + obj.asPathHolder = nil + obj.communitiesHolder = nil + obj.extCommunitiesHolder = nil + obj.tunnelTlvsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteV4Policy is configuration for BGP Segment Routing Traffic Engineering(SRTE) +// policy. + +type BgpSrteV4Policy interface { + Validation + // msg marshals BgpSrteV4Policy to protobuf object *otg.BgpSrteV4Policy + // and doesn't set defaults + msg() *otg.BgpSrteV4Policy + // setMsg unmarshals BgpSrteV4Policy from protobuf object *otg.BgpSrteV4Policy + // and doesn't set defaults + setMsg(*otg.BgpSrteV4Policy) BgpSrteV4Policy + // provides marshal interface + Marshal() marshalBgpSrteV4Policy + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteV4Policy + // validate validates BgpSrteV4Policy + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteV4Policy, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Distinguisher returns uint32, set in BgpSrteV4Policy. + Distinguisher() uint32 + // SetDistinguisher assigns uint32 provided by user to BgpSrteV4Policy + SetDistinguisher(value uint32) BgpSrteV4Policy + // HasDistinguisher checks if Distinguisher has been set in BgpSrteV4Policy + HasDistinguisher() bool + // Color returns uint32, set in BgpSrteV4Policy. + Color() uint32 + // SetColor assigns uint32 provided by user to BgpSrteV4Policy + SetColor(value uint32) BgpSrteV4Policy + // HasColor checks if Color has been set in BgpSrteV4Policy + HasColor() bool + // Ipv4Endpoint returns string, set in BgpSrteV4Policy. + Ipv4Endpoint() string + // SetIpv4Endpoint assigns string provided by user to BgpSrteV4Policy + SetIpv4Endpoint(value string) BgpSrteV4Policy + // NextHopMode returns BgpSrteV4PolicyNextHopModeEnum, set in BgpSrteV4Policy + NextHopMode() BgpSrteV4PolicyNextHopModeEnum + // SetNextHopMode assigns BgpSrteV4PolicyNextHopModeEnum provided by user to BgpSrteV4Policy + SetNextHopMode(value BgpSrteV4PolicyNextHopModeEnum) BgpSrteV4Policy + // HasNextHopMode checks if NextHopMode has been set in BgpSrteV4Policy + HasNextHopMode() bool + // NextHopAddressType returns BgpSrteV4PolicyNextHopAddressTypeEnum, set in BgpSrteV4Policy + NextHopAddressType() BgpSrteV4PolicyNextHopAddressTypeEnum + // SetNextHopAddressType assigns BgpSrteV4PolicyNextHopAddressTypeEnum provided by user to BgpSrteV4Policy + SetNextHopAddressType(value BgpSrteV4PolicyNextHopAddressTypeEnum) BgpSrteV4Policy + // HasNextHopAddressType checks if NextHopAddressType has been set in BgpSrteV4Policy + HasNextHopAddressType() bool + // NextHopIpv4Address returns string, set in BgpSrteV4Policy. + NextHopIpv4Address() string + // SetNextHopIpv4Address assigns string provided by user to BgpSrteV4Policy + SetNextHopIpv4Address(value string) BgpSrteV4Policy + // HasNextHopIpv4Address checks if NextHopIpv4Address has been set in BgpSrteV4Policy + HasNextHopIpv4Address() bool + // NextHopIpv6Address returns string, set in BgpSrteV4Policy. + NextHopIpv6Address() string + // SetNextHopIpv6Address assigns string provided by user to BgpSrteV4Policy + SetNextHopIpv6Address(value string) BgpSrteV4Policy + // HasNextHopIpv6Address checks if NextHopIpv6Address has been set in BgpSrteV4Policy + HasNextHopIpv6Address() bool + // Advanced returns BgpRouteAdvanced, set in BgpSrteV4Policy. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + Advanced() BgpRouteAdvanced + // SetAdvanced assigns BgpRouteAdvanced provided by user to BgpSrteV4Policy. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + SetAdvanced(value BgpRouteAdvanced) BgpSrteV4Policy + // HasAdvanced checks if Advanced has been set in BgpSrteV4Policy + HasAdvanced() bool + // AddPath returns BgpAddPath, set in BgpSrteV4Policy. + // BgpAddPath is the BGP Additional Paths feature is a BGP extension that allows the advertisement of multiple paths for the same prefix without the new paths implicitly replacing any previous paths. + AddPath() BgpAddPath + // SetAddPath assigns BgpAddPath provided by user to BgpSrteV4Policy. + // BgpAddPath is the BGP Additional Paths feature is a BGP extension that allows the advertisement of multiple paths for the same prefix without the new paths implicitly replacing any previous paths. + SetAddPath(value BgpAddPath) BgpSrteV4Policy + // HasAddPath checks if AddPath has been set in BgpSrteV4Policy + HasAddPath() bool + // AsPath returns BgpAsPath, set in BgpSrteV4Policy. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + AsPath() BgpAsPath + // SetAsPath assigns BgpAsPath provided by user to BgpSrteV4Policy. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + SetAsPath(value BgpAsPath) BgpSrteV4Policy + // HasAsPath checks if AsPath has been set in BgpSrteV4Policy + HasAsPath() bool + // Communities returns BgpSrteV4PolicyBgpCommunityIterIter, set in BgpSrteV4Policy + Communities() BgpSrteV4PolicyBgpCommunityIter + // ExtCommunities returns BgpSrteV4PolicyBgpExtCommunityIterIter, set in BgpSrteV4Policy + ExtCommunities() BgpSrteV4PolicyBgpExtCommunityIter + // TunnelTlvs returns BgpSrteV4PolicyBgpSrteV4TunnelTlvIterIter, set in BgpSrteV4Policy + TunnelTlvs() BgpSrteV4PolicyBgpSrteV4TunnelTlvIter + // Name returns string, set in BgpSrteV4Policy. + Name() string + // SetName assigns string provided by user to BgpSrteV4Policy + SetName(value string) BgpSrteV4Policy + // Active returns bool, set in BgpSrteV4Policy. + Active() bool + // SetActive assigns bool provided by user to BgpSrteV4Policy + SetActive(value bool) BgpSrteV4Policy + // HasActive checks if Active has been set in BgpSrteV4Policy + HasActive() bool + setNil() +} + +// 4-octet value uniquely identifying the policy in the context of (color, endpoint) tuple. It is used by the SR Policy originator to make unique (from an NLRI perspective) both for multiple candidate paths of the same SR Policy as well as candidate paths of different SR Policies (i.e. with different segment list) with the same Color and Endpoint but meant for different head-ends. +// Distinguisher returns a uint32 +func (obj *bgpSrteV4Policy) Distinguisher() uint32 { + + return *obj.obj.Distinguisher + +} + +// 4-octet value uniquely identifying the policy in the context of (color, endpoint) tuple. It is used by the SR Policy originator to make unique (from an NLRI perspective) both for multiple candidate paths of the same SR Policy as well as candidate paths of different SR Policies (i.e. with different segment list) with the same Color and Endpoint but meant for different head-ends. +// Distinguisher returns a uint32 +func (obj *bgpSrteV4Policy) HasDistinguisher() bool { + return obj.obj.Distinguisher != nil +} + +// 4-octet value uniquely identifying the policy in the context of (color, endpoint) tuple. It is used by the SR Policy originator to make unique (from an NLRI perspective) both for multiple candidate paths of the same SR Policy as well as candidate paths of different SR Policies (i.e. with different segment list) with the same Color and Endpoint but meant for different head-ends. +// SetDistinguisher sets the uint32 value in the BgpSrteV4Policy object +func (obj *bgpSrteV4Policy) SetDistinguisher(value uint32) BgpSrteV4Policy { + + obj.obj.Distinguisher = &value + return obj +} + +// Policy color is used to match the color of the destination prefixes to steer traffic into the SR Policy. +// Color returns a uint32 +func (obj *bgpSrteV4Policy) Color() uint32 { + + return *obj.obj.Color + +} + +// Policy color is used to match the color of the destination prefixes to steer traffic into the SR Policy. +// Color returns a uint32 +func (obj *bgpSrteV4Policy) HasColor() bool { + return obj.obj.Color != nil +} + +// Policy color is used to match the color of the destination prefixes to steer traffic into the SR Policy. +// SetColor sets the uint32 value in the BgpSrteV4Policy object +func (obj *bgpSrteV4Policy) SetColor(value uint32) BgpSrteV4Policy { + + obj.obj.Color = &value + return obj +} + +// Specifies a single node or a set of nodes (e.g. an anycast address). It is selected on the basis of the SR Policy type (AFI). +// Ipv4Endpoint returns a string +func (obj *bgpSrteV4Policy) Ipv4Endpoint() string { + + return *obj.obj.Ipv4Endpoint + +} + +// Specifies a single node or a set of nodes (e.g. an anycast address). It is selected on the basis of the SR Policy type (AFI). +// SetIpv4Endpoint sets the string value in the BgpSrteV4Policy object +func (obj *bgpSrteV4Policy) SetIpv4Endpoint(value string) BgpSrteV4Policy { + + obj.obj.Ipv4Endpoint = &value + return obj +} + +type BgpSrteV4PolicyNextHopModeEnum string + +// Enum of NextHopMode on BgpSrteV4Policy +var BgpSrteV4PolicyNextHopMode = struct { + LOCAL_IP BgpSrteV4PolicyNextHopModeEnum + MANUAL BgpSrteV4PolicyNextHopModeEnum +}{ + LOCAL_IP: BgpSrteV4PolicyNextHopModeEnum("local_ip"), + MANUAL: BgpSrteV4PolicyNextHopModeEnum("manual"), +} + +func (obj *bgpSrteV4Policy) NextHopMode() BgpSrteV4PolicyNextHopModeEnum { + return BgpSrteV4PolicyNextHopModeEnum(obj.obj.NextHopMode.Enum().String()) +} + +// Mode for choosing the NextHop in MP REACH NLRI. Available modes are : Local IP: Automatically fills the Nexthop with the Local IP of the BGP peer. For IPv6 BGP peer the Nexthop Encoding capability should be enabled. Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. +// NextHopMode returns a string +func (obj *bgpSrteV4Policy) HasNextHopMode() bool { + return obj.obj.NextHopMode != nil +} + +func (obj *bgpSrteV4Policy) SetNextHopMode(value BgpSrteV4PolicyNextHopModeEnum) BgpSrteV4Policy { + intValue, ok := otg.BgpSrteV4Policy_NextHopMode_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpSrteV4PolicyNextHopModeEnum", string(value))) + return obj + } + enumValue := otg.BgpSrteV4Policy_NextHopMode_Enum(intValue) + obj.obj.NextHopMode = &enumValue + + return obj +} + +type BgpSrteV4PolicyNextHopAddressTypeEnum string + +// Enum of NextHopAddressType on BgpSrteV4Policy +var BgpSrteV4PolicyNextHopAddressType = struct { + IPV4 BgpSrteV4PolicyNextHopAddressTypeEnum + IPV6 BgpSrteV4PolicyNextHopAddressTypeEnum +}{ + IPV4: BgpSrteV4PolicyNextHopAddressTypeEnum("ipv4"), + IPV6: BgpSrteV4PolicyNextHopAddressTypeEnum("ipv6"), +} + +func (obj *bgpSrteV4Policy) NextHopAddressType() BgpSrteV4PolicyNextHopAddressTypeEnum { + return BgpSrteV4PolicyNextHopAddressTypeEnum(obj.obj.NextHopAddressType.Enum().String()) +} + +// Type of next hop IP address to be used when 'next_hop_mode' is set to 'manual'. +// NextHopAddressType returns a string +func (obj *bgpSrteV4Policy) HasNextHopAddressType() bool { + return obj.obj.NextHopAddressType != nil +} + +func (obj *bgpSrteV4Policy) SetNextHopAddressType(value BgpSrteV4PolicyNextHopAddressTypeEnum) BgpSrteV4Policy { + intValue, ok := otg.BgpSrteV4Policy_NextHopAddressType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpSrteV4PolicyNextHopAddressTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpSrteV4Policy_NextHopAddressType_Enum(intValue) + obj.obj.NextHopAddressType = &enumValue + + return obj +} + +// The IPv4 address of the next hop if the Nexthop type 'next_hop_mode' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability extended_next_hop_encoding should be enabled. +// NextHopIpv4Address returns a string +func (obj *bgpSrteV4Policy) NextHopIpv4Address() string { + + return *obj.obj.NextHopIpv4Address + +} + +// The IPv4 address of the next hop if the Nexthop type 'next_hop_mode' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability extended_next_hop_encoding should be enabled. +// NextHopIpv4Address returns a string +func (obj *bgpSrteV4Policy) HasNextHopIpv4Address() bool { + return obj.obj.NextHopIpv4Address != nil +} + +// The IPv4 address of the next hop if the Nexthop type 'next_hop_mode' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability extended_next_hop_encoding should be enabled. +// SetNextHopIpv4Address sets the string value in the BgpSrteV4Policy object +func (obj *bgpSrteV4Policy) SetNextHopIpv4Address(value string) BgpSrteV4Policy { + + obj.obj.NextHopIpv4Address = &value + return obj +} + +// The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv6. +// NextHopIpv6Address returns a string +func (obj *bgpSrteV4Policy) NextHopIpv6Address() string { + + return *obj.obj.NextHopIpv6Address + +} + +// The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv6. +// NextHopIpv6Address returns a string +func (obj *bgpSrteV4Policy) HasNextHopIpv6Address() bool { + return obj.obj.NextHopIpv6Address != nil +} + +// The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv6. +// SetNextHopIpv6Address sets the string value in the BgpSrteV4Policy object +func (obj *bgpSrteV4Policy) SetNextHopIpv6Address(value string) BgpSrteV4Policy { + + obj.obj.NextHopIpv6Address = &value + return obj +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpSrteV4Policy) Advanced() BgpRouteAdvanced { + if obj.obj.Advanced == nil { + obj.obj.Advanced = NewBgpRouteAdvanced().msg() + } + if obj.advancedHolder == nil { + obj.advancedHolder = &bgpRouteAdvanced{obj: obj.obj.Advanced} + } + return obj.advancedHolder +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpSrteV4Policy) HasAdvanced() bool { + return obj.obj.Advanced != nil +} + +// description is TBD +// SetAdvanced sets the BgpRouteAdvanced value in the BgpSrteV4Policy object +func (obj *bgpSrteV4Policy) SetAdvanced(value BgpRouteAdvanced) BgpSrteV4Policy { + + obj.advancedHolder = nil + obj.obj.Advanced = value.msg() + + return obj +} + +// description is TBD +// AddPath returns a BgpAddPath +func (obj *bgpSrteV4Policy) AddPath() BgpAddPath { + if obj.obj.AddPath == nil { + obj.obj.AddPath = NewBgpAddPath().msg() + } + if obj.addPathHolder == nil { + obj.addPathHolder = &bgpAddPath{obj: obj.obj.AddPath} + } + return obj.addPathHolder +} + +// description is TBD +// AddPath returns a BgpAddPath +func (obj *bgpSrteV4Policy) HasAddPath() bool { + return obj.obj.AddPath != nil +} + +// description is TBD +// SetAddPath sets the BgpAddPath value in the BgpSrteV4Policy object +func (obj *bgpSrteV4Policy) SetAddPath(value BgpAddPath) BgpSrteV4Policy { + + obj.addPathHolder = nil + obj.obj.AddPath = value.msg() + + return obj +} + +// description is TBD +// AsPath returns a BgpAsPath +func (obj *bgpSrteV4Policy) AsPath() BgpAsPath { + if obj.obj.AsPath == nil { + obj.obj.AsPath = NewBgpAsPath().msg() + } + if obj.asPathHolder == nil { + obj.asPathHolder = &bgpAsPath{obj: obj.obj.AsPath} + } + return obj.asPathHolder +} + +// description is TBD +// AsPath returns a BgpAsPath +func (obj *bgpSrteV4Policy) HasAsPath() bool { + return obj.obj.AsPath != nil +} + +// description is TBD +// SetAsPath sets the BgpAsPath value in the BgpSrteV4Policy object +func (obj *bgpSrteV4Policy) SetAsPath(value BgpAsPath) BgpSrteV4Policy { + + obj.asPathHolder = nil + obj.obj.AsPath = value.msg() + + return obj +} + +// Optional Community settings. +// Communities returns a []BgpCommunity +func (obj *bgpSrteV4Policy) Communities() BgpSrteV4PolicyBgpCommunityIter { + if len(obj.obj.Communities) == 0 { + obj.obj.Communities = []*otg.BgpCommunity{} + } + if obj.communitiesHolder == nil { + obj.communitiesHolder = newBgpSrteV4PolicyBgpCommunityIter(&obj.obj.Communities).setMsg(obj) + } + return obj.communitiesHolder +} + +type bgpSrteV4PolicyBgpCommunityIter struct { + obj *bgpSrteV4Policy + bgpCommunitySlice []BgpCommunity + fieldPtr *[]*otg.BgpCommunity +} + +func newBgpSrteV4PolicyBgpCommunityIter(ptr *[]*otg.BgpCommunity) BgpSrteV4PolicyBgpCommunityIter { + return &bgpSrteV4PolicyBgpCommunityIter{fieldPtr: ptr} +} + +type BgpSrteV4PolicyBgpCommunityIter interface { + setMsg(*bgpSrteV4Policy) BgpSrteV4PolicyBgpCommunityIter + Items() []BgpCommunity + Add() BgpCommunity + Append(items ...BgpCommunity) BgpSrteV4PolicyBgpCommunityIter + Set(index int, newObj BgpCommunity) BgpSrteV4PolicyBgpCommunityIter + Clear() BgpSrteV4PolicyBgpCommunityIter + clearHolderSlice() BgpSrteV4PolicyBgpCommunityIter + appendHolderSlice(item BgpCommunity) BgpSrteV4PolicyBgpCommunityIter +} + +func (obj *bgpSrteV4PolicyBgpCommunityIter) setMsg(msg *bgpSrteV4Policy) BgpSrteV4PolicyBgpCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpSrteV4PolicyBgpCommunityIter) Items() []BgpCommunity { + return obj.bgpCommunitySlice +} + +func (obj *bgpSrteV4PolicyBgpCommunityIter) Add() BgpCommunity { + newObj := &otg.BgpCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpSrteV4PolicyBgpCommunityIter) Append(items ...BgpCommunity) BgpSrteV4PolicyBgpCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + } + return obj +} + +func (obj *bgpSrteV4PolicyBgpCommunityIter) Set(index int, newObj BgpCommunity) BgpSrteV4PolicyBgpCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpCommunitySlice[index] = newObj + return obj +} +func (obj *bgpSrteV4PolicyBgpCommunityIter) Clear() BgpSrteV4PolicyBgpCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpCommunity{} + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpSrteV4PolicyBgpCommunityIter) clearHolderSlice() BgpSrteV4PolicyBgpCommunityIter { + if len(obj.bgpCommunitySlice) > 0 { + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpSrteV4PolicyBgpCommunityIter) appendHolderSlice(item BgpCommunity) BgpSrteV4PolicyBgpCommunityIter { + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + return obj +} + +// Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. +// ExtCommunities returns a []BgpExtCommunity +func (obj *bgpSrteV4Policy) ExtCommunities() BgpSrteV4PolicyBgpExtCommunityIter { + if len(obj.obj.ExtCommunities) == 0 { + obj.obj.ExtCommunities = []*otg.BgpExtCommunity{} + } + if obj.extCommunitiesHolder == nil { + obj.extCommunitiesHolder = newBgpSrteV4PolicyBgpExtCommunityIter(&obj.obj.ExtCommunities).setMsg(obj) + } + return obj.extCommunitiesHolder +} + +type bgpSrteV4PolicyBgpExtCommunityIter struct { + obj *bgpSrteV4Policy + bgpExtCommunitySlice []BgpExtCommunity + fieldPtr *[]*otg.BgpExtCommunity +} + +func newBgpSrteV4PolicyBgpExtCommunityIter(ptr *[]*otg.BgpExtCommunity) BgpSrteV4PolicyBgpExtCommunityIter { + return &bgpSrteV4PolicyBgpExtCommunityIter{fieldPtr: ptr} +} + +type BgpSrteV4PolicyBgpExtCommunityIter interface { + setMsg(*bgpSrteV4Policy) BgpSrteV4PolicyBgpExtCommunityIter + Items() []BgpExtCommunity + Add() BgpExtCommunity + Append(items ...BgpExtCommunity) BgpSrteV4PolicyBgpExtCommunityIter + Set(index int, newObj BgpExtCommunity) BgpSrteV4PolicyBgpExtCommunityIter + Clear() BgpSrteV4PolicyBgpExtCommunityIter + clearHolderSlice() BgpSrteV4PolicyBgpExtCommunityIter + appendHolderSlice(item BgpExtCommunity) BgpSrteV4PolicyBgpExtCommunityIter +} + +func (obj *bgpSrteV4PolicyBgpExtCommunityIter) setMsg(msg *bgpSrteV4Policy) BgpSrteV4PolicyBgpExtCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpExtCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpSrteV4PolicyBgpExtCommunityIter) Items() []BgpExtCommunity { + return obj.bgpExtCommunitySlice +} + +func (obj *bgpSrteV4PolicyBgpExtCommunityIter) Add() BgpExtCommunity { + newObj := &otg.BgpExtCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpExtCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpSrteV4PolicyBgpExtCommunityIter) Append(items ...BgpExtCommunity) BgpSrteV4PolicyBgpExtCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + } + return obj +} + +func (obj *bgpSrteV4PolicyBgpExtCommunityIter) Set(index int, newObj BgpExtCommunity) BgpSrteV4PolicyBgpExtCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpExtCommunitySlice[index] = newObj + return obj +} +func (obj *bgpSrteV4PolicyBgpExtCommunityIter) Clear() BgpSrteV4PolicyBgpExtCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpExtCommunity{} + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpSrteV4PolicyBgpExtCommunityIter) clearHolderSlice() BgpSrteV4PolicyBgpExtCommunityIter { + if len(obj.bgpExtCommunitySlice) > 0 { + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpSrteV4PolicyBgpExtCommunityIter) appendHolderSlice(item BgpExtCommunity) BgpSrteV4PolicyBgpExtCommunityIter { + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + return obj +} + +// List Tunnel Encapsulation Attributes. +// TunnelTlvs returns a []BgpSrteV4TunnelTlv +func (obj *bgpSrteV4Policy) TunnelTlvs() BgpSrteV4PolicyBgpSrteV4TunnelTlvIter { + if len(obj.obj.TunnelTlvs) == 0 { + obj.obj.TunnelTlvs = []*otg.BgpSrteV4TunnelTlv{} + } + if obj.tunnelTlvsHolder == nil { + obj.tunnelTlvsHolder = newBgpSrteV4PolicyBgpSrteV4TunnelTlvIter(&obj.obj.TunnelTlvs).setMsg(obj) + } + return obj.tunnelTlvsHolder +} + +type bgpSrteV4PolicyBgpSrteV4TunnelTlvIter struct { + obj *bgpSrteV4Policy + bgpSrteV4TunnelTlvSlice []BgpSrteV4TunnelTlv + fieldPtr *[]*otg.BgpSrteV4TunnelTlv +} + +func newBgpSrteV4PolicyBgpSrteV4TunnelTlvIter(ptr *[]*otg.BgpSrteV4TunnelTlv) BgpSrteV4PolicyBgpSrteV4TunnelTlvIter { + return &bgpSrteV4PolicyBgpSrteV4TunnelTlvIter{fieldPtr: ptr} +} + +type BgpSrteV4PolicyBgpSrteV4TunnelTlvIter interface { + setMsg(*bgpSrteV4Policy) BgpSrteV4PolicyBgpSrteV4TunnelTlvIter + Items() []BgpSrteV4TunnelTlv + Add() BgpSrteV4TunnelTlv + Append(items ...BgpSrteV4TunnelTlv) BgpSrteV4PolicyBgpSrteV4TunnelTlvIter + Set(index int, newObj BgpSrteV4TunnelTlv) BgpSrteV4PolicyBgpSrteV4TunnelTlvIter + Clear() BgpSrteV4PolicyBgpSrteV4TunnelTlvIter + clearHolderSlice() BgpSrteV4PolicyBgpSrteV4TunnelTlvIter + appendHolderSlice(item BgpSrteV4TunnelTlv) BgpSrteV4PolicyBgpSrteV4TunnelTlvIter +} + +func (obj *bgpSrteV4PolicyBgpSrteV4TunnelTlvIter) setMsg(msg *bgpSrteV4Policy) BgpSrteV4PolicyBgpSrteV4TunnelTlvIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpSrteV4TunnelTlv{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpSrteV4PolicyBgpSrteV4TunnelTlvIter) Items() []BgpSrteV4TunnelTlv { + return obj.bgpSrteV4TunnelTlvSlice +} + +func (obj *bgpSrteV4PolicyBgpSrteV4TunnelTlvIter) Add() BgpSrteV4TunnelTlv { + newObj := &otg.BgpSrteV4TunnelTlv{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpSrteV4TunnelTlv{obj: newObj} + newLibObj.setDefault() + obj.bgpSrteV4TunnelTlvSlice = append(obj.bgpSrteV4TunnelTlvSlice, newLibObj) + return newLibObj +} + +func (obj *bgpSrteV4PolicyBgpSrteV4TunnelTlvIter) Append(items ...BgpSrteV4TunnelTlv) BgpSrteV4PolicyBgpSrteV4TunnelTlvIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpSrteV4TunnelTlvSlice = append(obj.bgpSrteV4TunnelTlvSlice, item) + } + return obj +} + +func (obj *bgpSrteV4PolicyBgpSrteV4TunnelTlvIter) Set(index int, newObj BgpSrteV4TunnelTlv) BgpSrteV4PolicyBgpSrteV4TunnelTlvIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpSrteV4TunnelTlvSlice[index] = newObj + return obj +} +func (obj *bgpSrteV4PolicyBgpSrteV4TunnelTlvIter) Clear() BgpSrteV4PolicyBgpSrteV4TunnelTlvIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpSrteV4TunnelTlv{} + obj.bgpSrteV4TunnelTlvSlice = []BgpSrteV4TunnelTlv{} + } + return obj +} +func (obj *bgpSrteV4PolicyBgpSrteV4TunnelTlvIter) clearHolderSlice() BgpSrteV4PolicyBgpSrteV4TunnelTlvIter { + if len(obj.bgpSrteV4TunnelTlvSlice) > 0 { + obj.bgpSrteV4TunnelTlvSlice = []BgpSrteV4TunnelTlv{} + } + return obj +} +func (obj *bgpSrteV4PolicyBgpSrteV4TunnelTlvIter) appendHolderSlice(item BgpSrteV4TunnelTlv) BgpSrteV4PolicyBgpSrteV4TunnelTlvIter { + obj.bgpSrteV4TunnelTlvSlice = append(obj.bgpSrteV4TunnelTlvSlice, item) + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *bgpSrteV4Policy) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the BgpSrteV4Policy object +func (obj *bgpSrteV4Policy) SetName(value string) BgpSrteV4Policy { + + obj.obj.Name = &value + return obj +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// Active returns a bool +func (obj *bgpSrteV4Policy) Active() bool { + + return *obj.obj.Active + +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// Active returns a bool +func (obj *bgpSrteV4Policy) HasActive() bool { + return obj.obj.Active != nil +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// SetActive sets the bool value in the BgpSrteV4Policy object +func (obj *bgpSrteV4Policy) SetActive(value bool) BgpSrteV4Policy { + + obj.obj.Active = &value + return obj +} + +func (obj *bgpSrteV4Policy) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Ipv4Endpoint is required + if obj.obj.Ipv4Endpoint == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv4Endpoint is required field on interface BgpSrteV4Policy") + } + if obj.obj.Ipv4Endpoint != nil { + + err := obj.validateIpv4(obj.Ipv4Endpoint()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteV4Policy.Ipv4Endpoint")) + } + + } + + if obj.obj.NextHopIpv4Address != nil { + + err := obj.validateIpv4(obj.NextHopIpv4Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteV4Policy.NextHopIpv4Address")) + } + + } + + if obj.obj.NextHopIpv6Address != nil { + + err := obj.validateIpv6(obj.NextHopIpv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteV4Policy.NextHopIpv6Address")) + } + + } + + if obj.obj.Advanced != nil { + + obj.Advanced().validateObj(vObj, set_default) + } + + if obj.obj.AddPath != nil { + + obj.AddPath().validateObj(vObj, set_default) + } + + if obj.obj.AsPath != nil { + + obj.AsPath().validateObj(vObj, set_default) + } + + if len(obj.obj.Communities) != 0 { + + if set_default { + obj.Communities().clearHolderSlice() + for _, item := range obj.obj.Communities { + obj.Communities().appendHolderSlice(&bgpCommunity{obj: item}) + } + } + for _, item := range obj.Communities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.ExtCommunities) != 0 { + + if set_default { + obj.ExtCommunities().clearHolderSlice() + for _, item := range obj.obj.ExtCommunities { + obj.ExtCommunities().appendHolderSlice(&bgpExtCommunity{obj: item}) + } + } + for _, item := range obj.ExtCommunities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.TunnelTlvs) != 0 { + + if set_default { + obj.TunnelTlvs().clearHolderSlice() + for _, item := range obj.obj.TunnelTlvs { + obj.TunnelTlvs().appendHolderSlice(&bgpSrteV4TunnelTlv{obj: item}) + } + } + for _, item := range obj.TunnelTlvs().Items() { + item.validateObj(vObj, set_default) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface BgpSrteV4Policy") + } +} + +func (obj *bgpSrteV4Policy) setDefault() { + if obj.obj.Distinguisher == nil { + obj.SetDistinguisher(1) + } + if obj.obj.Color == nil { + obj.SetColor(100) + } + if obj.obj.NextHopMode == nil { + obj.SetNextHopMode(BgpSrteV4PolicyNextHopMode.LOCAL_IP) + + } + if obj.obj.NextHopAddressType == nil { + obj.SetNextHopAddressType(BgpSrteV4PolicyNextHopAddressType.IPV4) + + } + if obj.obj.Active == nil { + obj.SetActive(true) + } + +} diff --git a/gosnappi/bgp_srte_v4_tunnel_tlv.go b/gosnappi/bgp_srte_v4_tunnel_tlv.go new file mode 100644 index 00000000..09071848 --- /dev/null +++ b/gosnappi/bgp_srte_v4_tunnel_tlv.go @@ -0,0 +1,746 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteV4TunnelTlv ***** +type bgpSrteV4TunnelTlv struct { + validation + obj *otg.BgpSrteV4TunnelTlv + marshaller marshalBgpSrteV4TunnelTlv + unMarshaller unMarshalBgpSrteV4TunnelTlv + remoteEndpointSubTlvHolder BgpSrteRemoteEndpointSubTlv + colorSubTlvHolder BgpSrteColorSubTlv + bindingSubTlvHolder BgpSrteBindingSubTlv + preferenceSubTlvHolder BgpSrtePreferenceSubTlv + policyPrioritySubTlvHolder BgpSrtePolicyPrioritySubTlv + policyNameSubTlvHolder BgpSrtePolicyNameSubTlv + explicitNullLabelPolicySubTlvHolder BgpSrteExplicitNullLabelPolicySubTlv + segmentListsHolder BgpSrteV4TunnelTlvBgpSrteSegmentListIter +} + +func NewBgpSrteV4TunnelTlv() BgpSrteV4TunnelTlv { + obj := bgpSrteV4TunnelTlv{obj: &otg.BgpSrteV4TunnelTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteV4TunnelTlv) msg() *otg.BgpSrteV4TunnelTlv { + return obj.obj +} + +func (obj *bgpSrteV4TunnelTlv) setMsg(msg *otg.BgpSrteV4TunnelTlv) BgpSrteV4TunnelTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteV4TunnelTlv struct { + obj *bgpSrteV4TunnelTlv +} + +type marshalBgpSrteV4TunnelTlv interface { + // ToProto marshals BgpSrteV4TunnelTlv to protobuf object *otg.BgpSrteV4TunnelTlv + ToProto() (*otg.BgpSrteV4TunnelTlv, error) + // ToPbText marshals BgpSrteV4TunnelTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteV4TunnelTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteV4TunnelTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteV4TunnelTlv struct { + obj *bgpSrteV4TunnelTlv +} + +type unMarshalBgpSrteV4TunnelTlv interface { + // FromProto unmarshals BgpSrteV4TunnelTlv from protobuf object *otg.BgpSrteV4TunnelTlv + FromProto(msg *otg.BgpSrteV4TunnelTlv) (BgpSrteV4TunnelTlv, error) + // FromPbText unmarshals BgpSrteV4TunnelTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteV4TunnelTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteV4TunnelTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteV4TunnelTlv) Marshal() marshalBgpSrteV4TunnelTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteV4TunnelTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteV4TunnelTlv) Unmarshal() unMarshalBgpSrteV4TunnelTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteV4TunnelTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteV4TunnelTlv) ToProto() (*otg.BgpSrteV4TunnelTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteV4TunnelTlv) FromProto(msg *otg.BgpSrteV4TunnelTlv) (BgpSrteV4TunnelTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteV4TunnelTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteV4TunnelTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteV4TunnelTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteV4TunnelTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteV4TunnelTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteV4TunnelTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteV4TunnelTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteV4TunnelTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteV4TunnelTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteV4TunnelTlv) Clone() (BgpSrteV4TunnelTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteV4TunnelTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteV4TunnelTlv) setNil() { + obj.remoteEndpointSubTlvHolder = nil + obj.colorSubTlvHolder = nil + obj.bindingSubTlvHolder = nil + obj.preferenceSubTlvHolder = nil + obj.policyPrioritySubTlvHolder = nil + obj.policyNameSubTlvHolder = nil + obj.explicitNullLabelPolicySubTlvHolder = nil + obj.segmentListsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteV4TunnelTlv is configuration for BGP SRTE Tunnel TLV. +type BgpSrteV4TunnelTlv interface { + Validation + // msg marshals BgpSrteV4TunnelTlv to protobuf object *otg.BgpSrteV4TunnelTlv + // and doesn't set defaults + msg() *otg.BgpSrteV4TunnelTlv + // setMsg unmarshals BgpSrteV4TunnelTlv from protobuf object *otg.BgpSrteV4TunnelTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteV4TunnelTlv) BgpSrteV4TunnelTlv + // provides marshal interface + Marshal() marshalBgpSrteV4TunnelTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteV4TunnelTlv + // validate validates BgpSrteV4TunnelTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteV4TunnelTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RemoteEndpointSubTlv returns BgpSrteRemoteEndpointSubTlv, set in BgpSrteV4TunnelTlv. + // BgpSrteRemoteEndpointSubTlv is configuration for the BGP remote endpoint sub TLV. + RemoteEndpointSubTlv() BgpSrteRemoteEndpointSubTlv + // SetRemoteEndpointSubTlv assigns BgpSrteRemoteEndpointSubTlv provided by user to BgpSrteV4TunnelTlv. + // BgpSrteRemoteEndpointSubTlv is configuration for the BGP remote endpoint sub TLV. + SetRemoteEndpointSubTlv(value BgpSrteRemoteEndpointSubTlv) BgpSrteV4TunnelTlv + // HasRemoteEndpointSubTlv checks if RemoteEndpointSubTlv has been set in BgpSrteV4TunnelTlv + HasRemoteEndpointSubTlv() bool + // ColorSubTlv returns BgpSrteColorSubTlv, set in BgpSrteV4TunnelTlv. + // BgpSrteColorSubTlv is configuration for the Policy Color attribute sub-TLV. The Color sub-TLV MAY be used as a way to "color" the corresponding Tunnel TLV. The Value field of the sub-TLV is eight octets long and consists of a Color Extended Community. First two octets of its Value field are 0x030b as type and subtype of extended community. Remaining six octets are are exposed to configure. + ColorSubTlv() BgpSrteColorSubTlv + // SetColorSubTlv assigns BgpSrteColorSubTlv provided by user to BgpSrteV4TunnelTlv. + // BgpSrteColorSubTlv is configuration for the Policy Color attribute sub-TLV. The Color sub-TLV MAY be used as a way to "color" the corresponding Tunnel TLV. The Value field of the sub-TLV is eight octets long and consists of a Color Extended Community. First two octets of its Value field are 0x030b as type and subtype of extended community. Remaining six octets are are exposed to configure. + SetColorSubTlv(value BgpSrteColorSubTlv) BgpSrteV4TunnelTlv + // HasColorSubTlv checks if ColorSubTlv has been set in BgpSrteV4TunnelTlv + HasColorSubTlv() bool + // BindingSubTlv returns BgpSrteBindingSubTlv, set in BgpSrteV4TunnelTlv. + // BgpSrteBindingSubTlv is configuration for the binding SID sub-TLV. This is used to signal the binding SID related information of the SR Policy candidate path. + BindingSubTlv() BgpSrteBindingSubTlv + // SetBindingSubTlv assigns BgpSrteBindingSubTlv provided by user to BgpSrteV4TunnelTlv. + // BgpSrteBindingSubTlv is configuration for the binding SID sub-TLV. This is used to signal the binding SID related information of the SR Policy candidate path. + SetBindingSubTlv(value BgpSrteBindingSubTlv) BgpSrteV4TunnelTlv + // HasBindingSubTlv checks if BindingSubTlv has been set in BgpSrteV4TunnelTlv + HasBindingSubTlv() bool + // PreferenceSubTlv returns BgpSrtePreferenceSubTlv, set in BgpSrteV4TunnelTlv. + // BgpSrtePreferenceSubTlv is configuration for BGP preference sub TLV of the SR Policy candidate path. + PreferenceSubTlv() BgpSrtePreferenceSubTlv + // SetPreferenceSubTlv assigns BgpSrtePreferenceSubTlv provided by user to BgpSrteV4TunnelTlv. + // BgpSrtePreferenceSubTlv is configuration for BGP preference sub TLV of the SR Policy candidate path. + SetPreferenceSubTlv(value BgpSrtePreferenceSubTlv) BgpSrteV4TunnelTlv + // HasPreferenceSubTlv checks if PreferenceSubTlv has been set in BgpSrteV4TunnelTlv + HasPreferenceSubTlv() bool + // PolicyPrioritySubTlv returns BgpSrtePolicyPrioritySubTlv, set in BgpSrteV4TunnelTlv. + // BgpSrtePolicyPrioritySubTlv is configuration for the Policy Priority sub-TLV. The Policy Priority to indicate the order in which the SR policies are re-computed upon topological change. + PolicyPrioritySubTlv() BgpSrtePolicyPrioritySubTlv + // SetPolicyPrioritySubTlv assigns BgpSrtePolicyPrioritySubTlv provided by user to BgpSrteV4TunnelTlv. + // BgpSrtePolicyPrioritySubTlv is configuration for the Policy Priority sub-TLV. The Policy Priority to indicate the order in which the SR policies are re-computed upon topological change. + SetPolicyPrioritySubTlv(value BgpSrtePolicyPrioritySubTlv) BgpSrteV4TunnelTlv + // HasPolicyPrioritySubTlv checks if PolicyPrioritySubTlv has been set in BgpSrteV4TunnelTlv + HasPolicyPrioritySubTlv() bool + // PolicyNameSubTlv returns BgpSrtePolicyNameSubTlv, set in BgpSrteV4TunnelTlv. + // BgpSrtePolicyNameSubTlv is configuration for the Policy Name sub-TLV. The Policy Name sub-TLV is used to attach a symbolic name to the SR Policy candidate path. + PolicyNameSubTlv() BgpSrtePolicyNameSubTlv + // SetPolicyNameSubTlv assigns BgpSrtePolicyNameSubTlv provided by user to BgpSrteV4TunnelTlv. + // BgpSrtePolicyNameSubTlv is configuration for the Policy Name sub-TLV. The Policy Name sub-TLV is used to attach a symbolic name to the SR Policy candidate path. + SetPolicyNameSubTlv(value BgpSrtePolicyNameSubTlv) BgpSrteV4TunnelTlv + // HasPolicyNameSubTlv checks if PolicyNameSubTlv has been set in BgpSrteV4TunnelTlv + HasPolicyNameSubTlv() bool + // ExplicitNullLabelPolicySubTlv returns BgpSrteExplicitNullLabelPolicySubTlv, set in BgpSrteV4TunnelTlv. + // BgpSrteExplicitNullLabelPolicySubTlv is configuration for BGP explicit null label policy sub TLV settings. + ExplicitNullLabelPolicySubTlv() BgpSrteExplicitNullLabelPolicySubTlv + // SetExplicitNullLabelPolicySubTlv assigns BgpSrteExplicitNullLabelPolicySubTlv provided by user to BgpSrteV4TunnelTlv. + // BgpSrteExplicitNullLabelPolicySubTlv is configuration for BGP explicit null label policy sub TLV settings. + SetExplicitNullLabelPolicySubTlv(value BgpSrteExplicitNullLabelPolicySubTlv) BgpSrteV4TunnelTlv + // HasExplicitNullLabelPolicySubTlv checks if ExplicitNullLabelPolicySubTlv has been set in BgpSrteV4TunnelTlv + HasExplicitNullLabelPolicySubTlv() bool + // SegmentLists returns BgpSrteV4TunnelTlvBgpSrteSegmentListIterIter, set in BgpSrteV4TunnelTlv + SegmentLists() BgpSrteV4TunnelTlvBgpSrteSegmentListIter + // Name returns string, set in BgpSrteV4TunnelTlv. + Name() string + // SetName assigns string provided by user to BgpSrteV4TunnelTlv + SetName(value string) BgpSrteV4TunnelTlv + // Active returns bool, set in BgpSrteV4TunnelTlv. + Active() bool + // SetActive assigns bool provided by user to BgpSrteV4TunnelTlv + SetActive(value bool) BgpSrteV4TunnelTlv + // HasActive checks if Active has been set in BgpSrteV4TunnelTlv + HasActive() bool + setNil() +} + +// description is TBD +// RemoteEndpointSubTlv returns a BgpSrteRemoteEndpointSubTlv +func (obj *bgpSrteV4TunnelTlv) RemoteEndpointSubTlv() BgpSrteRemoteEndpointSubTlv { + if obj.obj.RemoteEndpointSubTlv == nil { + obj.obj.RemoteEndpointSubTlv = NewBgpSrteRemoteEndpointSubTlv().msg() + } + if obj.remoteEndpointSubTlvHolder == nil { + obj.remoteEndpointSubTlvHolder = &bgpSrteRemoteEndpointSubTlv{obj: obj.obj.RemoteEndpointSubTlv} + } + return obj.remoteEndpointSubTlvHolder +} + +// description is TBD +// RemoteEndpointSubTlv returns a BgpSrteRemoteEndpointSubTlv +func (obj *bgpSrteV4TunnelTlv) HasRemoteEndpointSubTlv() bool { + return obj.obj.RemoteEndpointSubTlv != nil +} + +// description is TBD +// SetRemoteEndpointSubTlv sets the BgpSrteRemoteEndpointSubTlv value in the BgpSrteV4TunnelTlv object +func (obj *bgpSrteV4TunnelTlv) SetRemoteEndpointSubTlv(value BgpSrteRemoteEndpointSubTlv) BgpSrteV4TunnelTlv { + + obj.remoteEndpointSubTlvHolder = nil + obj.obj.RemoteEndpointSubTlv = value.msg() + + return obj +} + +// description is TBD +// ColorSubTlv returns a BgpSrteColorSubTlv +func (obj *bgpSrteV4TunnelTlv) ColorSubTlv() BgpSrteColorSubTlv { + if obj.obj.ColorSubTlv == nil { + obj.obj.ColorSubTlv = NewBgpSrteColorSubTlv().msg() + } + if obj.colorSubTlvHolder == nil { + obj.colorSubTlvHolder = &bgpSrteColorSubTlv{obj: obj.obj.ColorSubTlv} + } + return obj.colorSubTlvHolder +} + +// description is TBD +// ColorSubTlv returns a BgpSrteColorSubTlv +func (obj *bgpSrteV4TunnelTlv) HasColorSubTlv() bool { + return obj.obj.ColorSubTlv != nil +} + +// description is TBD +// SetColorSubTlv sets the BgpSrteColorSubTlv value in the BgpSrteV4TunnelTlv object +func (obj *bgpSrteV4TunnelTlv) SetColorSubTlv(value BgpSrteColorSubTlv) BgpSrteV4TunnelTlv { + + obj.colorSubTlvHolder = nil + obj.obj.ColorSubTlv = value.msg() + + return obj +} + +// description is TBD +// BindingSubTlv returns a BgpSrteBindingSubTlv +func (obj *bgpSrteV4TunnelTlv) BindingSubTlv() BgpSrteBindingSubTlv { + if obj.obj.BindingSubTlv == nil { + obj.obj.BindingSubTlv = NewBgpSrteBindingSubTlv().msg() + } + if obj.bindingSubTlvHolder == nil { + obj.bindingSubTlvHolder = &bgpSrteBindingSubTlv{obj: obj.obj.BindingSubTlv} + } + return obj.bindingSubTlvHolder +} + +// description is TBD +// BindingSubTlv returns a BgpSrteBindingSubTlv +func (obj *bgpSrteV4TunnelTlv) HasBindingSubTlv() bool { + return obj.obj.BindingSubTlv != nil +} + +// description is TBD +// SetBindingSubTlv sets the BgpSrteBindingSubTlv value in the BgpSrteV4TunnelTlv object +func (obj *bgpSrteV4TunnelTlv) SetBindingSubTlv(value BgpSrteBindingSubTlv) BgpSrteV4TunnelTlv { + + obj.bindingSubTlvHolder = nil + obj.obj.BindingSubTlv = value.msg() + + return obj +} + +// description is TBD +// PreferenceSubTlv returns a BgpSrtePreferenceSubTlv +func (obj *bgpSrteV4TunnelTlv) PreferenceSubTlv() BgpSrtePreferenceSubTlv { + if obj.obj.PreferenceSubTlv == nil { + obj.obj.PreferenceSubTlv = NewBgpSrtePreferenceSubTlv().msg() + } + if obj.preferenceSubTlvHolder == nil { + obj.preferenceSubTlvHolder = &bgpSrtePreferenceSubTlv{obj: obj.obj.PreferenceSubTlv} + } + return obj.preferenceSubTlvHolder +} + +// description is TBD +// PreferenceSubTlv returns a BgpSrtePreferenceSubTlv +func (obj *bgpSrteV4TunnelTlv) HasPreferenceSubTlv() bool { + return obj.obj.PreferenceSubTlv != nil +} + +// description is TBD +// SetPreferenceSubTlv sets the BgpSrtePreferenceSubTlv value in the BgpSrteV4TunnelTlv object +func (obj *bgpSrteV4TunnelTlv) SetPreferenceSubTlv(value BgpSrtePreferenceSubTlv) BgpSrteV4TunnelTlv { + + obj.preferenceSubTlvHolder = nil + obj.obj.PreferenceSubTlv = value.msg() + + return obj +} + +// description is TBD +// PolicyPrioritySubTlv returns a BgpSrtePolicyPrioritySubTlv +func (obj *bgpSrteV4TunnelTlv) PolicyPrioritySubTlv() BgpSrtePolicyPrioritySubTlv { + if obj.obj.PolicyPrioritySubTlv == nil { + obj.obj.PolicyPrioritySubTlv = NewBgpSrtePolicyPrioritySubTlv().msg() + } + if obj.policyPrioritySubTlvHolder == nil { + obj.policyPrioritySubTlvHolder = &bgpSrtePolicyPrioritySubTlv{obj: obj.obj.PolicyPrioritySubTlv} + } + return obj.policyPrioritySubTlvHolder +} + +// description is TBD +// PolicyPrioritySubTlv returns a BgpSrtePolicyPrioritySubTlv +func (obj *bgpSrteV4TunnelTlv) HasPolicyPrioritySubTlv() bool { + return obj.obj.PolicyPrioritySubTlv != nil +} + +// description is TBD +// SetPolicyPrioritySubTlv sets the BgpSrtePolicyPrioritySubTlv value in the BgpSrteV4TunnelTlv object +func (obj *bgpSrteV4TunnelTlv) SetPolicyPrioritySubTlv(value BgpSrtePolicyPrioritySubTlv) BgpSrteV4TunnelTlv { + + obj.policyPrioritySubTlvHolder = nil + obj.obj.PolicyPrioritySubTlv = value.msg() + + return obj +} + +// description is TBD +// PolicyNameSubTlv returns a BgpSrtePolicyNameSubTlv +func (obj *bgpSrteV4TunnelTlv) PolicyNameSubTlv() BgpSrtePolicyNameSubTlv { + if obj.obj.PolicyNameSubTlv == nil { + obj.obj.PolicyNameSubTlv = NewBgpSrtePolicyNameSubTlv().msg() + } + if obj.policyNameSubTlvHolder == nil { + obj.policyNameSubTlvHolder = &bgpSrtePolicyNameSubTlv{obj: obj.obj.PolicyNameSubTlv} + } + return obj.policyNameSubTlvHolder +} + +// description is TBD +// PolicyNameSubTlv returns a BgpSrtePolicyNameSubTlv +func (obj *bgpSrteV4TunnelTlv) HasPolicyNameSubTlv() bool { + return obj.obj.PolicyNameSubTlv != nil +} + +// description is TBD +// SetPolicyNameSubTlv sets the BgpSrtePolicyNameSubTlv value in the BgpSrteV4TunnelTlv object +func (obj *bgpSrteV4TunnelTlv) SetPolicyNameSubTlv(value BgpSrtePolicyNameSubTlv) BgpSrteV4TunnelTlv { + + obj.policyNameSubTlvHolder = nil + obj.obj.PolicyNameSubTlv = value.msg() + + return obj +} + +// description is TBD +// ExplicitNullLabelPolicySubTlv returns a BgpSrteExplicitNullLabelPolicySubTlv +func (obj *bgpSrteV4TunnelTlv) ExplicitNullLabelPolicySubTlv() BgpSrteExplicitNullLabelPolicySubTlv { + if obj.obj.ExplicitNullLabelPolicySubTlv == nil { + obj.obj.ExplicitNullLabelPolicySubTlv = NewBgpSrteExplicitNullLabelPolicySubTlv().msg() + } + if obj.explicitNullLabelPolicySubTlvHolder == nil { + obj.explicitNullLabelPolicySubTlvHolder = &bgpSrteExplicitNullLabelPolicySubTlv{obj: obj.obj.ExplicitNullLabelPolicySubTlv} + } + return obj.explicitNullLabelPolicySubTlvHolder +} + +// description is TBD +// ExplicitNullLabelPolicySubTlv returns a BgpSrteExplicitNullLabelPolicySubTlv +func (obj *bgpSrteV4TunnelTlv) HasExplicitNullLabelPolicySubTlv() bool { + return obj.obj.ExplicitNullLabelPolicySubTlv != nil +} + +// description is TBD +// SetExplicitNullLabelPolicySubTlv sets the BgpSrteExplicitNullLabelPolicySubTlv value in the BgpSrteV4TunnelTlv object +func (obj *bgpSrteV4TunnelTlv) SetExplicitNullLabelPolicySubTlv(value BgpSrteExplicitNullLabelPolicySubTlv) BgpSrteV4TunnelTlv { + + obj.explicitNullLabelPolicySubTlvHolder = nil + obj.obj.ExplicitNullLabelPolicySubTlv = value.msg() + + return obj +} + +// description is TBD +// SegmentLists returns a []BgpSrteSegmentList +func (obj *bgpSrteV4TunnelTlv) SegmentLists() BgpSrteV4TunnelTlvBgpSrteSegmentListIter { + if len(obj.obj.SegmentLists) == 0 { + obj.obj.SegmentLists = []*otg.BgpSrteSegmentList{} + } + if obj.segmentListsHolder == nil { + obj.segmentListsHolder = newBgpSrteV4TunnelTlvBgpSrteSegmentListIter(&obj.obj.SegmentLists).setMsg(obj) + } + return obj.segmentListsHolder +} + +type bgpSrteV4TunnelTlvBgpSrteSegmentListIter struct { + obj *bgpSrteV4TunnelTlv + bgpSrteSegmentListSlice []BgpSrteSegmentList + fieldPtr *[]*otg.BgpSrteSegmentList +} + +func newBgpSrteV4TunnelTlvBgpSrteSegmentListIter(ptr *[]*otg.BgpSrteSegmentList) BgpSrteV4TunnelTlvBgpSrteSegmentListIter { + return &bgpSrteV4TunnelTlvBgpSrteSegmentListIter{fieldPtr: ptr} +} + +type BgpSrteV4TunnelTlvBgpSrteSegmentListIter interface { + setMsg(*bgpSrteV4TunnelTlv) BgpSrteV4TunnelTlvBgpSrteSegmentListIter + Items() []BgpSrteSegmentList + Add() BgpSrteSegmentList + Append(items ...BgpSrteSegmentList) BgpSrteV4TunnelTlvBgpSrteSegmentListIter + Set(index int, newObj BgpSrteSegmentList) BgpSrteV4TunnelTlvBgpSrteSegmentListIter + Clear() BgpSrteV4TunnelTlvBgpSrteSegmentListIter + clearHolderSlice() BgpSrteV4TunnelTlvBgpSrteSegmentListIter + appendHolderSlice(item BgpSrteSegmentList) BgpSrteV4TunnelTlvBgpSrteSegmentListIter +} + +func (obj *bgpSrteV4TunnelTlvBgpSrteSegmentListIter) setMsg(msg *bgpSrteV4TunnelTlv) BgpSrteV4TunnelTlvBgpSrteSegmentListIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpSrteSegmentList{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpSrteV4TunnelTlvBgpSrteSegmentListIter) Items() []BgpSrteSegmentList { + return obj.bgpSrteSegmentListSlice +} + +func (obj *bgpSrteV4TunnelTlvBgpSrteSegmentListIter) Add() BgpSrteSegmentList { + newObj := &otg.BgpSrteSegmentList{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpSrteSegmentList{obj: newObj} + newLibObj.setDefault() + obj.bgpSrteSegmentListSlice = append(obj.bgpSrteSegmentListSlice, newLibObj) + return newLibObj +} + +func (obj *bgpSrteV4TunnelTlvBgpSrteSegmentListIter) Append(items ...BgpSrteSegmentList) BgpSrteV4TunnelTlvBgpSrteSegmentListIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpSrteSegmentListSlice = append(obj.bgpSrteSegmentListSlice, item) + } + return obj +} + +func (obj *bgpSrteV4TunnelTlvBgpSrteSegmentListIter) Set(index int, newObj BgpSrteSegmentList) BgpSrteV4TunnelTlvBgpSrteSegmentListIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpSrteSegmentListSlice[index] = newObj + return obj +} +func (obj *bgpSrteV4TunnelTlvBgpSrteSegmentListIter) Clear() BgpSrteV4TunnelTlvBgpSrteSegmentListIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpSrteSegmentList{} + obj.bgpSrteSegmentListSlice = []BgpSrteSegmentList{} + } + return obj +} +func (obj *bgpSrteV4TunnelTlvBgpSrteSegmentListIter) clearHolderSlice() BgpSrteV4TunnelTlvBgpSrteSegmentListIter { + if len(obj.bgpSrteSegmentListSlice) > 0 { + obj.bgpSrteSegmentListSlice = []BgpSrteSegmentList{} + } + return obj +} +func (obj *bgpSrteV4TunnelTlvBgpSrteSegmentListIter) appendHolderSlice(item BgpSrteSegmentList) BgpSrteV4TunnelTlvBgpSrteSegmentListIter { + obj.bgpSrteSegmentListSlice = append(obj.bgpSrteSegmentListSlice, item) + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *bgpSrteV4TunnelTlv) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the BgpSrteV4TunnelTlv object +func (obj *bgpSrteV4TunnelTlv) SetName(value string) BgpSrteV4TunnelTlv { + + obj.obj.Name = &value + return obj +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// Active returns a bool +func (obj *bgpSrteV4TunnelTlv) Active() bool { + + return *obj.obj.Active + +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// Active returns a bool +func (obj *bgpSrteV4TunnelTlv) HasActive() bool { + return obj.obj.Active != nil +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// SetActive sets the bool value in the BgpSrteV4TunnelTlv object +func (obj *bgpSrteV4TunnelTlv) SetActive(value bool) BgpSrteV4TunnelTlv { + + obj.obj.Active = &value + return obj +} + +func (obj *bgpSrteV4TunnelTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RemoteEndpointSubTlv != nil { + + obj.RemoteEndpointSubTlv().validateObj(vObj, set_default) + } + + if obj.obj.ColorSubTlv != nil { + + obj.ColorSubTlv().validateObj(vObj, set_default) + } + + if obj.obj.BindingSubTlv != nil { + + obj.BindingSubTlv().validateObj(vObj, set_default) + } + + if obj.obj.PreferenceSubTlv != nil { + + obj.PreferenceSubTlv().validateObj(vObj, set_default) + } + + if obj.obj.PolicyPrioritySubTlv != nil { + + obj.PolicyPrioritySubTlv().validateObj(vObj, set_default) + } + + if obj.obj.PolicyNameSubTlv != nil { + + obj.PolicyNameSubTlv().validateObj(vObj, set_default) + } + + if obj.obj.ExplicitNullLabelPolicySubTlv != nil { + + obj.ExplicitNullLabelPolicySubTlv().validateObj(vObj, set_default) + } + + if len(obj.obj.SegmentLists) != 0 { + + if set_default { + obj.SegmentLists().clearHolderSlice() + for _, item := range obj.obj.SegmentLists { + obj.SegmentLists().appendHolderSlice(&bgpSrteSegmentList{obj: item}) + } + } + for _, item := range obj.SegmentLists().Items() { + item.validateObj(vObj, set_default) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface BgpSrteV4TunnelTlv") + } +} + +func (obj *bgpSrteV4TunnelTlv) setDefault() { + if obj.obj.Active == nil { + obj.SetActive(true) + } + +} diff --git a/gosnappi/bgp_srte_v6_policy.go b/gosnappi/bgp_srte_v6_policy.go new file mode 100644 index 00000000..f5dd6311 --- /dev/null +++ b/gosnappi/bgp_srte_v6_policy.go @@ -0,0 +1,1048 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteV6Policy ***** +type bgpSrteV6Policy struct { + validation + obj *otg.BgpSrteV6Policy + marshaller marshalBgpSrteV6Policy + unMarshaller unMarshalBgpSrteV6Policy + advancedHolder BgpRouteAdvanced + addPathHolder BgpAddPath + asPathHolder BgpAsPath + communitiesHolder BgpSrteV6PolicyBgpCommunityIter + extcommunitiesHolder BgpSrteV6PolicyBgpExtCommunityIter + tunnelTlvsHolder BgpSrteV6PolicyBgpSrteV6TunnelTlvIter +} + +func NewBgpSrteV6Policy() BgpSrteV6Policy { + obj := bgpSrteV6Policy{obj: &otg.BgpSrteV6Policy{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteV6Policy) msg() *otg.BgpSrteV6Policy { + return obj.obj +} + +func (obj *bgpSrteV6Policy) setMsg(msg *otg.BgpSrteV6Policy) BgpSrteV6Policy { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteV6Policy struct { + obj *bgpSrteV6Policy +} + +type marshalBgpSrteV6Policy interface { + // ToProto marshals BgpSrteV6Policy to protobuf object *otg.BgpSrteV6Policy + ToProto() (*otg.BgpSrteV6Policy, error) + // ToPbText marshals BgpSrteV6Policy to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteV6Policy to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteV6Policy to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteV6Policy struct { + obj *bgpSrteV6Policy +} + +type unMarshalBgpSrteV6Policy interface { + // FromProto unmarshals BgpSrteV6Policy from protobuf object *otg.BgpSrteV6Policy + FromProto(msg *otg.BgpSrteV6Policy) (BgpSrteV6Policy, error) + // FromPbText unmarshals BgpSrteV6Policy from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteV6Policy from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteV6Policy from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteV6Policy) Marshal() marshalBgpSrteV6Policy { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteV6Policy{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteV6Policy) Unmarshal() unMarshalBgpSrteV6Policy { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteV6Policy{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteV6Policy) ToProto() (*otg.BgpSrteV6Policy, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteV6Policy) FromProto(msg *otg.BgpSrteV6Policy) (BgpSrteV6Policy, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteV6Policy) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteV6Policy) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteV6Policy) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteV6Policy) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteV6Policy) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteV6Policy) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteV6Policy) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteV6Policy) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteV6Policy) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteV6Policy) Clone() (BgpSrteV6Policy, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteV6Policy() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteV6Policy) setNil() { + obj.advancedHolder = nil + obj.addPathHolder = nil + obj.asPathHolder = nil + obj.communitiesHolder = nil + obj.extcommunitiesHolder = nil + obj.tunnelTlvsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteV6Policy is configuration for BGP Segment Routing Traffic Engineering policy. + +type BgpSrteV6Policy interface { + Validation + // msg marshals BgpSrteV6Policy to protobuf object *otg.BgpSrteV6Policy + // and doesn't set defaults + msg() *otg.BgpSrteV6Policy + // setMsg unmarshals BgpSrteV6Policy from protobuf object *otg.BgpSrteV6Policy + // and doesn't set defaults + setMsg(*otg.BgpSrteV6Policy) BgpSrteV6Policy + // provides marshal interface + Marshal() marshalBgpSrteV6Policy + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteV6Policy + // validate validates BgpSrteV6Policy + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteV6Policy, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Distinguisher returns uint32, set in BgpSrteV6Policy. + Distinguisher() uint32 + // SetDistinguisher assigns uint32 provided by user to BgpSrteV6Policy + SetDistinguisher(value uint32) BgpSrteV6Policy + // HasDistinguisher checks if Distinguisher has been set in BgpSrteV6Policy + HasDistinguisher() bool + // Color returns uint32, set in BgpSrteV6Policy. + Color() uint32 + // SetColor assigns uint32 provided by user to BgpSrteV6Policy + SetColor(value uint32) BgpSrteV6Policy + // HasColor checks if Color has been set in BgpSrteV6Policy + HasColor() bool + // Ipv6Endpoint returns string, set in BgpSrteV6Policy. + Ipv6Endpoint() string + // SetIpv6Endpoint assigns string provided by user to BgpSrteV6Policy + SetIpv6Endpoint(value string) BgpSrteV6Policy + // NextHopMode returns BgpSrteV6PolicyNextHopModeEnum, set in BgpSrteV6Policy + NextHopMode() BgpSrteV6PolicyNextHopModeEnum + // SetNextHopMode assigns BgpSrteV6PolicyNextHopModeEnum provided by user to BgpSrteV6Policy + SetNextHopMode(value BgpSrteV6PolicyNextHopModeEnum) BgpSrteV6Policy + // HasNextHopMode checks if NextHopMode has been set in BgpSrteV6Policy + HasNextHopMode() bool + // NextHopAddressType returns BgpSrteV6PolicyNextHopAddressTypeEnum, set in BgpSrteV6Policy + NextHopAddressType() BgpSrteV6PolicyNextHopAddressTypeEnum + // SetNextHopAddressType assigns BgpSrteV6PolicyNextHopAddressTypeEnum provided by user to BgpSrteV6Policy + SetNextHopAddressType(value BgpSrteV6PolicyNextHopAddressTypeEnum) BgpSrteV6Policy + // HasNextHopAddressType checks if NextHopAddressType has been set in BgpSrteV6Policy + HasNextHopAddressType() bool + // NextHopIpv4Address returns string, set in BgpSrteV6Policy. + NextHopIpv4Address() string + // SetNextHopIpv4Address assigns string provided by user to BgpSrteV6Policy + SetNextHopIpv4Address(value string) BgpSrteV6Policy + // HasNextHopIpv4Address checks if NextHopIpv4Address has been set in BgpSrteV6Policy + HasNextHopIpv4Address() bool + // NextHopIpv6Address returns string, set in BgpSrteV6Policy. + NextHopIpv6Address() string + // SetNextHopIpv6Address assigns string provided by user to BgpSrteV6Policy + SetNextHopIpv6Address(value string) BgpSrteV6Policy + // HasNextHopIpv6Address checks if NextHopIpv6Address has been set in BgpSrteV6Policy + HasNextHopIpv6Address() bool + // Advanced returns BgpRouteAdvanced, set in BgpSrteV6Policy. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + Advanced() BgpRouteAdvanced + // SetAdvanced assigns BgpRouteAdvanced provided by user to BgpSrteV6Policy. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + SetAdvanced(value BgpRouteAdvanced) BgpSrteV6Policy + // HasAdvanced checks if Advanced has been set in BgpSrteV6Policy + HasAdvanced() bool + // AddPath returns BgpAddPath, set in BgpSrteV6Policy. + // BgpAddPath is the BGP Additional Paths feature is a BGP extension that allows the advertisement of multiple paths for the same prefix without the new paths implicitly replacing any previous paths. + AddPath() BgpAddPath + // SetAddPath assigns BgpAddPath provided by user to BgpSrteV6Policy. + // BgpAddPath is the BGP Additional Paths feature is a BGP extension that allows the advertisement of multiple paths for the same prefix without the new paths implicitly replacing any previous paths. + SetAddPath(value BgpAddPath) BgpSrteV6Policy + // HasAddPath checks if AddPath has been set in BgpSrteV6Policy + HasAddPath() bool + // AsPath returns BgpAsPath, set in BgpSrteV6Policy. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + AsPath() BgpAsPath + // SetAsPath assigns BgpAsPath provided by user to BgpSrteV6Policy. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + SetAsPath(value BgpAsPath) BgpSrteV6Policy + // HasAsPath checks if AsPath has been set in BgpSrteV6Policy + HasAsPath() bool + // Communities returns BgpSrteV6PolicyBgpCommunityIterIter, set in BgpSrteV6Policy + Communities() BgpSrteV6PolicyBgpCommunityIter + // Extcommunities returns BgpSrteV6PolicyBgpExtCommunityIterIter, set in BgpSrteV6Policy + Extcommunities() BgpSrteV6PolicyBgpExtCommunityIter + // TunnelTlvs returns BgpSrteV6PolicyBgpSrteV6TunnelTlvIterIter, set in BgpSrteV6Policy + TunnelTlvs() BgpSrteV6PolicyBgpSrteV6TunnelTlvIter + // Name returns string, set in BgpSrteV6Policy. + Name() string + // SetName assigns string provided by user to BgpSrteV6Policy + SetName(value string) BgpSrteV6Policy + // Active returns bool, set in BgpSrteV6Policy. + Active() bool + // SetActive assigns bool provided by user to BgpSrteV6Policy + SetActive(value bool) BgpSrteV6Policy + // HasActive checks if Active has been set in BgpSrteV6Policy + HasActive() bool + setNil() +} + +// Identifies the policy in the context of (color and endpoint) tuple. It is used by the SR Policy originator to make unique multiple occurrences of the same SR Policy. +// Distinguisher returns a uint32 +func (obj *bgpSrteV6Policy) Distinguisher() uint32 { + + return *obj.obj.Distinguisher + +} + +// Identifies the policy in the context of (color and endpoint) tuple. It is used by the SR Policy originator to make unique multiple occurrences of the same SR Policy. +// Distinguisher returns a uint32 +func (obj *bgpSrteV6Policy) HasDistinguisher() bool { + return obj.obj.Distinguisher != nil +} + +// Identifies the policy in the context of (color and endpoint) tuple. It is used by the SR Policy originator to make unique multiple occurrences of the same SR Policy. +// SetDistinguisher sets the uint32 value in the BgpSrteV6Policy object +func (obj *bgpSrteV6Policy) SetDistinguisher(value uint32) BgpSrteV6Policy { + + obj.obj.Distinguisher = &value + return obj +} + +// Identifies the policy. It is used to match the color of the destination prefixes to steer traffic into the SR Policy. +// Color returns a uint32 +func (obj *bgpSrteV6Policy) Color() uint32 { + + return *obj.obj.Color + +} + +// Identifies the policy. It is used to match the color of the destination prefixes to steer traffic into the SR Policy. +// Color returns a uint32 +func (obj *bgpSrteV6Policy) HasColor() bool { + return obj.obj.Color != nil +} + +// Identifies the policy. It is used to match the color of the destination prefixes to steer traffic into the SR Policy. +// SetColor sets the uint32 value in the BgpSrteV6Policy object +func (obj *bgpSrteV6Policy) SetColor(value uint32) BgpSrteV6Policy { + + obj.obj.Color = &value + return obj +} + +// Specifies a single node or a set of nodes (e.g., an anycast address). It is selected on the basis of the SR Policy type (AFI). +// Ipv6Endpoint returns a string +func (obj *bgpSrteV6Policy) Ipv6Endpoint() string { + + return *obj.obj.Ipv6Endpoint + +} + +// Specifies a single node or a set of nodes (e.g., an anycast address). It is selected on the basis of the SR Policy type (AFI). +// SetIpv6Endpoint sets the string value in the BgpSrteV6Policy object +func (obj *bgpSrteV6Policy) SetIpv6Endpoint(value string) BgpSrteV6Policy { + + obj.obj.Ipv6Endpoint = &value + return obj +} + +type BgpSrteV6PolicyNextHopModeEnum string + +// Enum of NextHopMode on BgpSrteV6Policy +var BgpSrteV6PolicyNextHopMode = struct { + LOCAL_IP BgpSrteV6PolicyNextHopModeEnum + MANUAL BgpSrteV6PolicyNextHopModeEnum +}{ + LOCAL_IP: BgpSrteV6PolicyNextHopModeEnum("local_ip"), + MANUAL: BgpSrteV6PolicyNextHopModeEnum("manual"), +} + +func (obj *bgpSrteV6Policy) NextHopMode() BgpSrteV6PolicyNextHopModeEnum { + return BgpSrteV6PolicyNextHopModeEnum(obj.obj.NextHopMode.Enum().String()) +} + +// Mode for choosing the NextHop in MP REACH NLRI. Available modes are : Local IP: Automatically fills the Nexthop with the Local IP of the BGP peer. For IPv6 BGP peer the Nexthop Encoding capability should be enabled. Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. +// NextHopMode returns a string +func (obj *bgpSrteV6Policy) HasNextHopMode() bool { + return obj.obj.NextHopMode != nil +} + +func (obj *bgpSrteV6Policy) SetNextHopMode(value BgpSrteV6PolicyNextHopModeEnum) BgpSrteV6Policy { + intValue, ok := otg.BgpSrteV6Policy_NextHopMode_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpSrteV6PolicyNextHopModeEnum", string(value))) + return obj + } + enumValue := otg.BgpSrteV6Policy_NextHopMode_Enum(intValue) + obj.obj.NextHopMode = &enumValue + + return obj +} + +type BgpSrteV6PolicyNextHopAddressTypeEnum string + +// Enum of NextHopAddressType on BgpSrteV6Policy +var BgpSrteV6PolicyNextHopAddressType = struct { + IPV4 BgpSrteV6PolicyNextHopAddressTypeEnum + IPV6 BgpSrteV6PolicyNextHopAddressTypeEnum +}{ + IPV4: BgpSrteV6PolicyNextHopAddressTypeEnum("ipv4"), + IPV6: BgpSrteV6PolicyNextHopAddressTypeEnum("ipv6"), +} + +func (obj *bgpSrteV6Policy) NextHopAddressType() BgpSrteV6PolicyNextHopAddressTypeEnum { + return BgpSrteV6PolicyNextHopAddressTypeEnum(obj.obj.NextHopAddressType.Enum().String()) +} + +// Type of next hop IP address to be used when 'next_hop_mode' is set to 'manual'. +// NextHopAddressType returns a string +func (obj *bgpSrteV6Policy) HasNextHopAddressType() bool { + return obj.obj.NextHopAddressType != nil +} + +func (obj *bgpSrteV6Policy) SetNextHopAddressType(value BgpSrteV6PolicyNextHopAddressTypeEnum) BgpSrteV6Policy { + intValue, ok := otg.BgpSrteV6Policy_NextHopAddressType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpSrteV6PolicyNextHopAddressTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpSrteV6Policy_NextHopAddressType_Enum(intValue) + obj.obj.NextHopAddressType = &enumValue + + return obj +} + +// The IPv4 address of the Nexthop if the 'next_hop_mode' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability extended_next_hop_encoding should be enabled. +// NextHopIpv4Address returns a string +func (obj *bgpSrteV6Policy) NextHopIpv4Address() string { + + return *obj.obj.NextHopIpv4Address + +} + +// The IPv4 address of the Nexthop if the 'next_hop_mode' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability extended_next_hop_encoding should be enabled. +// NextHopIpv4Address returns a string +func (obj *bgpSrteV6Policy) HasNextHopIpv4Address() bool { + return obj.obj.NextHopIpv4Address != nil +} + +// The IPv4 address of the Nexthop if the 'next_hop_mode' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability extended_next_hop_encoding should be enabled. +// SetNextHopIpv4Address sets the string value in the BgpSrteV6Policy object +func (obj *bgpSrteV6Policy) SetNextHopIpv4Address(value string) BgpSrteV6Policy { + + obj.obj.NextHopIpv4Address = &value + return obj +} + +// The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv6. +// NextHopIpv6Address returns a string +func (obj *bgpSrteV6Policy) NextHopIpv6Address() string { + + return *obj.obj.NextHopIpv6Address + +} + +// The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv6. +// NextHopIpv6Address returns a string +func (obj *bgpSrteV6Policy) HasNextHopIpv6Address() bool { + return obj.obj.NextHopIpv6Address != nil +} + +// The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv6. +// SetNextHopIpv6Address sets the string value in the BgpSrteV6Policy object +func (obj *bgpSrteV6Policy) SetNextHopIpv6Address(value string) BgpSrteV6Policy { + + obj.obj.NextHopIpv6Address = &value + return obj +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpSrteV6Policy) Advanced() BgpRouteAdvanced { + if obj.obj.Advanced == nil { + obj.obj.Advanced = NewBgpRouteAdvanced().msg() + } + if obj.advancedHolder == nil { + obj.advancedHolder = &bgpRouteAdvanced{obj: obj.obj.Advanced} + } + return obj.advancedHolder +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpSrteV6Policy) HasAdvanced() bool { + return obj.obj.Advanced != nil +} + +// description is TBD +// SetAdvanced sets the BgpRouteAdvanced value in the BgpSrteV6Policy object +func (obj *bgpSrteV6Policy) SetAdvanced(value BgpRouteAdvanced) BgpSrteV6Policy { + + obj.advancedHolder = nil + obj.obj.Advanced = value.msg() + + return obj +} + +// description is TBD +// AddPath returns a BgpAddPath +func (obj *bgpSrteV6Policy) AddPath() BgpAddPath { + if obj.obj.AddPath == nil { + obj.obj.AddPath = NewBgpAddPath().msg() + } + if obj.addPathHolder == nil { + obj.addPathHolder = &bgpAddPath{obj: obj.obj.AddPath} + } + return obj.addPathHolder +} + +// description is TBD +// AddPath returns a BgpAddPath +func (obj *bgpSrteV6Policy) HasAddPath() bool { + return obj.obj.AddPath != nil +} + +// description is TBD +// SetAddPath sets the BgpAddPath value in the BgpSrteV6Policy object +func (obj *bgpSrteV6Policy) SetAddPath(value BgpAddPath) BgpSrteV6Policy { + + obj.addPathHolder = nil + obj.obj.AddPath = value.msg() + + return obj +} + +// description is TBD +// AsPath returns a BgpAsPath +func (obj *bgpSrteV6Policy) AsPath() BgpAsPath { + if obj.obj.AsPath == nil { + obj.obj.AsPath = NewBgpAsPath().msg() + } + if obj.asPathHolder == nil { + obj.asPathHolder = &bgpAsPath{obj: obj.obj.AsPath} + } + return obj.asPathHolder +} + +// description is TBD +// AsPath returns a BgpAsPath +func (obj *bgpSrteV6Policy) HasAsPath() bool { + return obj.obj.AsPath != nil +} + +// description is TBD +// SetAsPath sets the BgpAsPath value in the BgpSrteV6Policy object +func (obj *bgpSrteV6Policy) SetAsPath(value BgpAsPath) BgpSrteV6Policy { + + obj.asPathHolder = nil + obj.obj.AsPath = value.msg() + + return obj +} + +// Optional community settings. +// Communities returns a []BgpCommunity +func (obj *bgpSrteV6Policy) Communities() BgpSrteV6PolicyBgpCommunityIter { + if len(obj.obj.Communities) == 0 { + obj.obj.Communities = []*otg.BgpCommunity{} + } + if obj.communitiesHolder == nil { + obj.communitiesHolder = newBgpSrteV6PolicyBgpCommunityIter(&obj.obj.Communities).setMsg(obj) + } + return obj.communitiesHolder +} + +type bgpSrteV6PolicyBgpCommunityIter struct { + obj *bgpSrteV6Policy + bgpCommunitySlice []BgpCommunity + fieldPtr *[]*otg.BgpCommunity +} + +func newBgpSrteV6PolicyBgpCommunityIter(ptr *[]*otg.BgpCommunity) BgpSrteV6PolicyBgpCommunityIter { + return &bgpSrteV6PolicyBgpCommunityIter{fieldPtr: ptr} +} + +type BgpSrteV6PolicyBgpCommunityIter interface { + setMsg(*bgpSrteV6Policy) BgpSrteV6PolicyBgpCommunityIter + Items() []BgpCommunity + Add() BgpCommunity + Append(items ...BgpCommunity) BgpSrteV6PolicyBgpCommunityIter + Set(index int, newObj BgpCommunity) BgpSrteV6PolicyBgpCommunityIter + Clear() BgpSrteV6PolicyBgpCommunityIter + clearHolderSlice() BgpSrteV6PolicyBgpCommunityIter + appendHolderSlice(item BgpCommunity) BgpSrteV6PolicyBgpCommunityIter +} + +func (obj *bgpSrteV6PolicyBgpCommunityIter) setMsg(msg *bgpSrteV6Policy) BgpSrteV6PolicyBgpCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpSrteV6PolicyBgpCommunityIter) Items() []BgpCommunity { + return obj.bgpCommunitySlice +} + +func (obj *bgpSrteV6PolicyBgpCommunityIter) Add() BgpCommunity { + newObj := &otg.BgpCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpSrteV6PolicyBgpCommunityIter) Append(items ...BgpCommunity) BgpSrteV6PolicyBgpCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + } + return obj +} + +func (obj *bgpSrteV6PolicyBgpCommunityIter) Set(index int, newObj BgpCommunity) BgpSrteV6PolicyBgpCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpCommunitySlice[index] = newObj + return obj +} +func (obj *bgpSrteV6PolicyBgpCommunityIter) Clear() BgpSrteV6PolicyBgpCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpCommunity{} + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpSrteV6PolicyBgpCommunityIter) clearHolderSlice() BgpSrteV6PolicyBgpCommunityIter { + if len(obj.bgpCommunitySlice) > 0 { + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpSrteV6PolicyBgpCommunityIter) appendHolderSlice(item BgpCommunity) BgpSrteV6PolicyBgpCommunityIter { + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + return obj +} + +// Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. +// Extcommunities returns a []BgpExtCommunity +func (obj *bgpSrteV6Policy) Extcommunities() BgpSrteV6PolicyBgpExtCommunityIter { + if len(obj.obj.Extcommunities) == 0 { + obj.obj.Extcommunities = []*otg.BgpExtCommunity{} + } + if obj.extcommunitiesHolder == nil { + obj.extcommunitiesHolder = newBgpSrteV6PolicyBgpExtCommunityIter(&obj.obj.Extcommunities).setMsg(obj) + } + return obj.extcommunitiesHolder +} + +type bgpSrteV6PolicyBgpExtCommunityIter struct { + obj *bgpSrteV6Policy + bgpExtCommunitySlice []BgpExtCommunity + fieldPtr *[]*otg.BgpExtCommunity +} + +func newBgpSrteV6PolicyBgpExtCommunityIter(ptr *[]*otg.BgpExtCommunity) BgpSrteV6PolicyBgpExtCommunityIter { + return &bgpSrteV6PolicyBgpExtCommunityIter{fieldPtr: ptr} +} + +type BgpSrteV6PolicyBgpExtCommunityIter interface { + setMsg(*bgpSrteV6Policy) BgpSrteV6PolicyBgpExtCommunityIter + Items() []BgpExtCommunity + Add() BgpExtCommunity + Append(items ...BgpExtCommunity) BgpSrteV6PolicyBgpExtCommunityIter + Set(index int, newObj BgpExtCommunity) BgpSrteV6PolicyBgpExtCommunityIter + Clear() BgpSrteV6PolicyBgpExtCommunityIter + clearHolderSlice() BgpSrteV6PolicyBgpExtCommunityIter + appendHolderSlice(item BgpExtCommunity) BgpSrteV6PolicyBgpExtCommunityIter +} + +func (obj *bgpSrteV6PolicyBgpExtCommunityIter) setMsg(msg *bgpSrteV6Policy) BgpSrteV6PolicyBgpExtCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpExtCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpSrteV6PolicyBgpExtCommunityIter) Items() []BgpExtCommunity { + return obj.bgpExtCommunitySlice +} + +func (obj *bgpSrteV6PolicyBgpExtCommunityIter) Add() BgpExtCommunity { + newObj := &otg.BgpExtCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpExtCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpSrteV6PolicyBgpExtCommunityIter) Append(items ...BgpExtCommunity) BgpSrteV6PolicyBgpExtCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + } + return obj +} + +func (obj *bgpSrteV6PolicyBgpExtCommunityIter) Set(index int, newObj BgpExtCommunity) BgpSrteV6PolicyBgpExtCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpExtCommunitySlice[index] = newObj + return obj +} +func (obj *bgpSrteV6PolicyBgpExtCommunityIter) Clear() BgpSrteV6PolicyBgpExtCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpExtCommunity{} + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpSrteV6PolicyBgpExtCommunityIter) clearHolderSlice() BgpSrteV6PolicyBgpExtCommunityIter { + if len(obj.bgpExtCommunitySlice) > 0 { + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpSrteV6PolicyBgpExtCommunityIter) appendHolderSlice(item BgpExtCommunity) BgpSrteV6PolicyBgpExtCommunityIter { + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + return obj +} + +// List of optional tunnel TLV settings. +// TunnelTlvs returns a []BgpSrteV6TunnelTlv +func (obj *bgpSrteV6Policy) TunnelTlvs() BgpSrteV6PolicyBgpSrteV6TunnelTlvIter { + if len(obj.obj.TunnelTlvs) == 0 { + obj.obj.TunnelTlvs = []*otg.BgpSrteV6TunnelTlv{} + } + if obj.tunnelTlvsHolder == nil { + obj.tunnelTlvsHolder = newBgpSrteV6PolicyBgpSrteV6TunnelTlvIter(&obj.obj.TunnelTlvs).setMsg(obj) + } + return obj.tunnelTlvsHolder +} + +type bgpSrteV6PolicyBgpSrteV6TunnelTlvIter struct { + obj *bgpSrteV6Policy + bgpSrteV6TunnelTlvSlice []BgpSrteV6TunnelTlv + fieldPtr *[]*otg.BgpSrteV6TunnelTlv +} + +func newBgpSrteV6PolicyBgpSrteV6TunnelTlvIter(ptr *[]*otg.BgpSrteV6TunnelTlv) BgpSrteV6PolicyBgpSrteV6TunnelTlvIter { + return &bgpSrteV6PolicyBgpSrteV6TunnelTlvIter{fieldPtr: ptr} +} + +type BgpSrteV6PolicyBgpSrteV6TunnelTlvIter interface { + setMsg(*bgpSrteV6Policy) BgpSrteV6PolicyBgpSrteV6TunnelTlvIter + Items() []BgpSrteV6TunnelTlv + Add() BgpSrteV6TunnelTlv + Append(items ...BgpSrteV6TunnelTlv) BgpSrteV6PolicyBgpSrteV6TunnelTlvIter + Set(index int, newObj BgpSrteV6TunnelTlv) BgpSrteV6PolicyBgpSrteV6TunnelTlvIter + Clear() BgpSrteV6PolicyBgpSrteV6TunnelTlvIter + clearHolderSlice() BgpSrteV6PolicyBgpSrteV6TunnelTlvIter + appendHolderSlice(item BgpSrteV6TunnelTlv) BgpSrteV6PolicyBgpSrteV6TunnelTlvIter +} + +func (obj *bgpSrteV6PolicyBgpSrteV6TunnelTlvIter) setMsg(msg *bgpSrteV6Policy) BgpSrteV6PolicyBgpSrteV6TunnelTlvIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpSrteV6TunnelTlv{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpSrteV6PolicyBgpSrteV6TunnelTlvIter) Items() []BgpSrteV6TunnelTlv { + return obj.bgpSrteV6TunnelTlvSlice +} + +func (obj *bgpSrteV6PolicyBgpSrteV6TunnelTlvIter) Add() BgpSrteV6TunnelTlv { + newObj := &otg.BgpSrteV6TunnelTlv{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpSrteV6TunnelTlv{obj: newObj} + newLibObj.setDefault() + obj.bgpSrteV6TunnelTlvSlice = append(obj.bgpSrteV6TunnelTlvSlice, newLibObj) + return newLibObj +} + +func (obj *bgpSrteV6PolicyBgpSrteV6TunnelTlvIter) Append(items ...BgpSrteV6TunnelTlv) BgpSrteV6PolicyBgpSrteV6TunnelTlvIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpSrteV6TunnelTlvSlice = append(obj.bgpSrteV6TunnelTlvSlice, item) + } + return obj +} + +func (obj *bgpSrteV6PolicyBgpSrteV6TunnelTlvIter) Set(index int, newObj BgpSrteV6TunnelTlv) BgpSrteV6PolicyBgpSrteV6TunnelTlvIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpSrteV6TunnelTlvSlice[index] = newObj + return obj +} +func (obj *bgpSrteV6PolicyBgpSrteV6TunnelTlvIter) Clear() BgpSrteV6PolicyBgpSrteV6TunnelTlvIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpSrteV6TunnelTlv{} + obj.bgpSrteV6TunnelTlvSlice = []BgpSrteV6TunnelTlv{} + } + return obj +} +func (obj *bgpSrteV6PolicyBgpSrteV6TunnelTlvIter) clearHolderSlice() BgpSrteV6PolicyBgpSrteV6TunnelTlvIter { + if len(obj.bgpSrteV6TunnelTlvSlice) > 0 { + obj.bgpSrteV6TunnelTlvSlice = []BgpSrteV6TunnelTlv{} + } + return obj +} +func (obj *bgpSrteV6PolicyBgpSrteV6TunnelTlvIter) appendHolderSlice(item BgpSrteV6TunnelTlv) BgpSrteV6PolicyBgpSrteV6TunnelTlvIter { + obj.bgpSrteV6TunnelTlvSlice = append(obj.bgpSrteV6TunnelTlvSlice, item) + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *bgpSrteV6Policy) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the BgpSrteV6Policy object +func (obj *bgpSrteV6Policy) SetName(value string) BgpSrteV6Policy { + + obj.obj.Name = &value + return obj +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// Active returns a bool +func (obj *bgpSrteV6Policy) Active() bool { + + return *obj.obj.Active + +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// Active returns a bool +func (obj *bgpSrteV6Policy) HasActive() bool { + return obj.obj.Active != nil +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// SetActive sets the bool value in the BgpSrteV6Policy object +func (obj *bgpSrteV6Policy) SetActive(value bool) BgpSrteV6Policy { + + obj.obj.Active = &value + return obj +} + +func (obj *bgpSrteV6Policy) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Ipv6Endpoint is required + if obj.obj.Ipv6Endpoint == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv6Endpoint is required field on interface BgpSrteV6Policy") + } + if obj.obj.Ipv6Endpoint != nil { + + err := obj.validateIpv6(obj.Ipv6Endpoint()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteV6Policy.Ipv6Endpoint")) + } + + } + + if obj.obj.NextHopIpv4Address != nil { + + err := obj.validateIpv4(obj.NextHopIpv4Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteV6Policy.NextHopIpv4Address")) + } + + } + + if obj.obj.NextHopIpv6Address != nil { + + err := obj.validateIpv6(obj.NextHopIpv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpSrteV6Policy.NextHopIpv6Address")) + } + + } + + if obj.obj.Advanced != nil { + + obj.Advanced().validateObj(vObj, set_default) + } + + if obj.obj.AddPath != nil { + + obj.AddPath().validateObj(vObj, set_default) + } + + if obj.obj.AsPath != nil { + + obj.AsPath().validateObj(vObj, set_default) + } + + if len(obj.obj.Communities) != 0 { + + if set_default { + obj.Communities().clearHolderSlice() + for _, item := range obj.obj.Communities { + obj.Communities().appendHolderSlice(&bgpCommunity{obj: item}) + } + } + for _, item := range obj.Communities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Extcommunities) != 0 { + + if set_default { + obj.Extcommunities().clearHolderSlice() + for _, item := range obj.obj.Extcommunities { + obj.Extcommunities().appendHolderSlice(&bgpExtCommunity{obj: item}) + } + } + for _, item := range obj.Extcommunities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.TunnelTlvs) != 0 { + + if set_default { + obj.TunnelTlvs().clearHolderSlice() + for _, item := range obj.obj.TunnelTlvs { + obj.TunnelTlvs().appendHolderSlice(&bgpSrteV6TunnelTlv{obj: item}) + } + } + for _, item := range obj.TunnelTlvs().Items() { + item.validateObj(vObj, set_default) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface BgpSrteV6Policy") + } +} + +func (obj *bgpSrteV6Policy) setDefault() { + if obj.obj.Distinguisher == nil { + obj.SetDistinguisher(1) + } + if obj.obj.Color == nil { + obj.SetColor(100) + } + if obj.obj.NextHopMode == nil { + obj.SetNextHopMode(BgpSrteV6PolicyNextHopMode.LOCAL_IP) + + } + if obj.obj.NextHopAddressType == nil { + obj.SetNextHopAddressType(BgpSrteV6PolicyNextHopAddressType.IPV6) + + } + if obj.obj.NextHopIpv4Address == nil { + obj.SetNextHopIpv4Address("0.0.0.0") + } + if obj.obj.NextHopIpv6Address == nil { + obj.SetNextHopIpv6Address("::0") + } + if obj.obj.Active == nil { + obj.SetActive(true) + } + +} diff --git a/gosnappi/bgp_srte_v6_tunnel_tlv.go b/gosnappi/bgp_srte_v6_tunnel_tlv.go new file mode 100644 index 00000000..11a7ed8c --- /dev/null +++ b/gosnappi/bgp_srte_v6_tunnel_tlv.go @@ -0,0 +1,746 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpSrteV6TunnelTlv ***** +type bgpSrteV6TunnelTlv struct { + validation + obj *otg.BgpSrteV6TunnelTlv + marshaller marshalBgpSrteV6TunnelTlv + unMarshaller unMarshalBgpSrteV6TunnelTlv + remoteEndpointSubTlvHolder BgpSrteRemoteEndpointSubTlv + colorSubTlvHolder BgpSrteColorSubTlv + bindingSubTlvHolder BgpSrteBindingSubTlv + preferenceSubTlvHolder BgpSrtePreferenceSubTlv + policyPrioritySubTlvHolder BgpSrtePolicyPrioritySubTlv + policyNameSubTlvHolder BgpSrtePolicyNameSubTlv + explicitNullLabelPolicySubTlvHolder BgpSrteExplicitNullLabelPolicySubTlv + segmentListsHolder BgpSrteV6TunnelTlvBgpSrteSegmentListIter +} + +func NewBgpSrteV6TunnelTlv() BgpSrteV6TunnelTlv { + obj := bgpSrteV6TunnelTlv{obj: &otg.BgpSrteV6TunnelTlv{}} + obj.setDefault() + return &obj +} + +func (obj *bgpSrteV6TunnelTlv) msg() *otg.BgpSrteV6TunnelTlv { + return obj.obj +} + +func (obj *bgpSrteV6TunnelTlv) setMsg(msg *otg.BgpSrteV6TunnelTlv) BgpSrteV6TunnelTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpSrteV6TunnelTlv struct { + obj *bgpSrteV6TunnelTlv +} + +type marshalBgpSrteV6TunnelTlv interface { + // ToProto marshals BgpSrteV6TunnelTlv to protobuf object *otg.BgpSrteV6TunnelTlv + ToProto() (*otg.BgpSrteV6TunnelTlv, error) + // ToPbText marshals BgpSrteV6TunnelTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpSrteV6TunnelTlv to YAML text + ToYaml() (string, error) + // ToJson marshals BgpSrteV6TunnelTlv to JSON text + ToJson() (string, error) +} + +type unMarshalbgpSrteV6TunnelTlv struct { + obj *bgpSrteV6TunnelTlv +} + +type unMarshalBgpSrteV6TunnelTlv interface { + // FromProto unmarshals BgpSrteV6TunnelTlv from protobuf object *otg.BgpSrteV6TunnelTlv + FromProto(msg *otg.BgpSrteV6TunnelTlv) (BgpSrteV6TunnelTlv, error) + // FromPbText unmarshals BgpSrteV6TunnelTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpSrteV6TunnelTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpSrteV6TunnelTlv from JSON text + FromJson(value string) error +} + +func (obj *bgpSrteV6TunnelTlv) Marshal() marshalBgpSrteV6TunnelTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpSrteV6TunnelTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpSrteV6TunnelTlv) Unmarshal() unMarshalBgpSrteV6TunnelTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpSrteV6TunnelTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpSrteV6TunnelTlv) ToProto() (*otg.BgpSrteV6TunnelTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpSrteV6TunnelTlv) FromProto(msg *otg.BgpSrteV6TunnelTlv) (BgpSrteV6TunnelTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpSrteV6TunnelTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpSrteV6TunnelTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpSrteV6TunnelTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteV6TunnelTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpSrteV6TunnelTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpSrteV6TunnelTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpSrteV6TunnelTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpSrteV6TunnelTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpSrteV6TunnelTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpSrteV6TunnelTlv) Clone() (BgpSrteV6TunnelTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpSrteV6TunnelTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpSrteV6TunnelTlv) setNil() { + obj.remoteEndpointSubTlvHolder = nil + obj.colorSubTlvHolder = nil + obj.bindingSubTlvHolder = nil + obj.preferenceSubTlvHolder = nil + obj.policyPrioritySubTlvHolder = nil + obj.policyNameSubTlvHolder = nil + obj.explicitNullLabelPolicySubTlvHolder = nil + obj.segmentListsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpSrteV6TunnelTlv is configuration for BGP SRTE Tunnel TLV. +type BgpSrteV6TunnelTlv interface { + Validation + // msg marshals BgpSrteV6TunnelTlv to protobuf object *otg.BgpSrteV6TunnelTlv + // and doesn't set defaults + msg() *otg.BgpSrteV6TunnelTlv + // setMsg unmarshals BgpSrteV6TunnelTlv from protobuf object *otg.BgpSrteV6TunnelTlv + // and doesn't set defaults + setMsg(*otg.BgpSrteV6TunnelTlv) BgpSrteV6TunnelTlv + // provides marshal interface + Marshal() marshalBgpSrteV6TunnelTlv + // provides unmarshal interface + Unmarshal() unMarshalBgpSrteV6TunnelTlv + // validate validates BgpSrteV6TunnelTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpSrteV6TunnelTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RemoteEndpointSubTlv returns BgpSrteRemoteEndpointSubTlv, set in BgpSrteV6TunnelTlv. + // BgpSrteRemoteEndpointSubTlv is configuration for the BGP remote endpoint sub TLV. + RemoteEndpointSubTlv() BgpSrteRemoteEndpointSubTlv + // SetRemoteEndpointSubTlv assigns BgpSrteRemoteEndpointSubTlv provided by user to BgpSrteV6TunnelTlv. + // BgpSrteRemoteEndpointSubTlv is configuration for the BGP remote endpoint sub TLV. + SetRemoteEndpointSubTlv(value BgpSrteRemoteEndpointSubTlv) BgpSrteV6TunnelTlv + // HasRemoteEndpointSubTlv checks if RemoteEndpointSubTlv has been set in BgpSrteV6TunnelTlv + HasRemoteEndpointSubTlv() bool + // ColorSubTlv returns BgpSrteColorSubTlv, set in BgpSrteV6TunnelTlv. + // BgpSrteColorSubTlv is configuration for the Policy Color attribute sub-TLV. The Color sub-TLV MAY be used as a way to "color" the corresponding Tunnel TLV. The Value field of the sub-TLV is eight octets long and consists of a Color Extended Community. First two octets of its Value field are 0x030b as type and subtype of extended community. Remaining six octets are are exposed to configure. + ColorSubTlv() BgpSrteColorSubTlv + // SetColorSubTlv assigns BgpSrteColorSubTlv provided by user to BgpSrteV6TunnelTlv. + // BgpSrteColorSubTlv is configuration for the Policy Color attribute sub-TLV. The Color sub-TLV MAY be used as a way to "color" the corresponding Tunnel TLV. The Value field of the sub-TLV is eight octets long and consists of a Color Extended Community. First two octets of its Value field are 0x030b as type and subtype of extended community. Remaining six octets are are exposed to configure. + SetColorSubTlv(value BgpSrteColorSubTlv) BgpSrteV6TunnelTlv + // HasColorSubTlv checks if ColorSubTlv has been set in BgpSrteV6TunnelTlv + HasColorSubTlv() bool + // BindingSubTlv returns BgpSrteBindingSubTlv, set in BgpSrteV6TunnelTlv. + // BgpSrteBindingSubTlv is configuration for the binding SID sub-TLV. This is used to signal the binding SID related information of the SR Policy candidate path. + BindingSubTlv() BgpSrteBindingSubTlv + // SetBindingSubTlv assigns BgpSrteBindingSubTlv provided by user to BgpSrteV6TunnelTlv. + // BgpSrteBindingSubTlv is configuration for the binding SID sub-TLV. This is used to signal the binding SID related information of the SR Policy candidate path. + SetBindingSubTlv(value BgpSrteBindingSubTlv) BgpSrteV6TunnelTlv + // HasBindingSubTlv checks if BindingSubTlv has been set in BgpSrteV6TunnelTlv + HasBindingSubTlv() bool + // PreferenceSubTlv returns BgpSrtePreferenceSubTlv, set in BgpSrteV6TunnelTlv. + // BgpSrtePreferenceSubTlv is configuration for BGP preference sub TLV of the SR Policy candidate path. + PreferenceSubTlv() BgpSrtePreferenceSubTlv + // SetPreferenceSubTlv assigns BgpSrtePreferenceSubTlv provided by user to BgpSrteV6TunnelTlv. + // BgpSrtePreferenceSubTlv is configuration for BGP preference sub TLV of the SR Policy candidate path. + SetPreferenceSubTlv(value BgpSrtePreferenceSubTlv) BgpSrteV6TunnelTlv + // HasPreferenceSubTlv checks if PreferenceSubTlv has been set in BgpSrteV6TunnelTlv + HasPreferenceSubTlv() bool + // PolicyPrioritySubTlv returns BgpSrtePolicyPrioritySubTlv, set in BgpSrteV6TunnelTlv. + // BgpSrtePolicyPrioritySubTlv is configuration for the Policy Priority sub-TLV. The Policy Priority to indicate the order in which the SR policies are re-computed upon topological change. + PolicyPrioritySubTlv() BgpSrtePolicyPrioritySubTlv + // SetPolicyPrioritySubTlv assigns BgpSrtePolicyPrioritySubTlv provided by user to BgpSrteV6TunnelTlv. + // BgpSrtePolicyPrioritySubTlv is configuration for the Policy Priority sub-TLV. The Policy Priority to indicate the order in which the SR policies are re-computed upon topological change. + SetPolicyPrioritySubTlv(value BgpSrtePolicyPrioritySubTlv) BgpSrteV6TunnelTlv + // HasPolicyPrioritySubTlv checks if PolicyPrioritySubTlv has been set in BgpSrteV6TunnelTlv + HasPolicyPrioritySubTlv() bool + // PolicyNameSubTlv returns BgpSrtePolicyNameSubTlv, set in BgpSrteV6TunnelTlv. + // BgpSrtePolicyNameSubTlv is configuration for the Policy Name sub-TLV. The Policy Name sub-TLV is used to attach a symbolic name to the SR Policy candidate path. + PolicyNameSubTlv() BgpSrtePolicyNameSubTlv + // SetPolicyNameSubTlv assigns BgpSrtePolicyNameSubTlv provided by user to BgpSrteV6TunnelTlv. + // BgpSrtePolicyNameSubTlv is configuration for the Policy Name sub-TLV. The Policy Name sub-TLV is used to attach a symbolic name to the SR Policy candidate path. + SetPolicyNameSubTlv(value BgpSrtePolicyNameSubTlv) BgpSrteV6TunnelTlv + // HasPolicyNameSubTlv checks if PolicyNameSubTlv has been set in BgpSrteV6TunnelTlv + HasPolicyNameSubTlv() bool + // ExplicitNullLabelPolicySubTlv returns BgpSrteExplicitNullLabelPolicySubTlv, set in BgpSrteV6TunnelTlv. + // BgpSrteExplicitNullLabelPolicySubTlv is configuration for BGP explicit null label policy sub TLV settings. + ExplicitNullLabelPolicySubTlv() BgpSrteExplicitNullLabelPolicySubTlv + // SetExplicitNullLabelPolicySubTlv assigns BgpSrteExplicitNullLabelPolicySubTlv provided by user to BgpSrteV6TunnelTlv. + // BgpSrteExplicitNullLabelPolicySubTlv is configuration for BGP explicit null label policy sub TLV settings. + SetExplicitNullLabelPolicySubTlv(value BgpSrteExplicitNullLabelPolicySubTlv) BgpSrteV6TunnelTlv + // HasExplicitNullLabelPolicySubTlv checks if ExplicitNullLabelPolicySubTlv has been set in BgpSrteV6TunnelTlv + HasExplicitNullLabelPolicySubTlv() bool + // SegmentLists returns BgpSrteV6TunnelTlvBgpSrteSegmentListIterIter, set in BgpSrteV6TunnelTlv + SegmentLists() BgpSrteV6TunnelTlvBgpSrteSegmentListIter + // Name returns string, set in BgpSrteV6TunnelTlv. + Name() string + // SetName assigns string provided by user to BgpSrteV6TunnelTlv + SetName(value string) BgpSrteV6TunnelTlv + // Active returns bool, set in BgpSrteV6TunnelTlv. + Active() bool + // SetActive assigns bool provided by user to BgpSrteV6TunnelTlv + SetActive(value bool) BgpSrteV6TunnelTlv + // HasActive checks if Active has been set in BgpSrteV6TunnelTlv + HasActive() bool + setNil() +} + +// description is TBD +// RemoteEndpointSubTlv returns a BgpSrteRemoteEndpointSubTlv +func (obj *bgpSrteV6TunnelTlv) RemoteEndpointSubTlv() BgpSrteRemoteEndpointSubTlv { + if obj.obj.RemoteEndpointSubTlv == nil { + obj.obj.RemoteEndpointSubTlv = NewBgpSrteRemoteEndpointSubTlv().msg() + } + if obj.remoteEndpointSubTlvHolder == nil { + obj.remoteEndpointSubTlvHolder = &bgpSrteRemoteEndpointSubTlv{obj: obj.obj.RemoteEndpointSubTlv} + } + return obj.remoteEndpointSubTlvHolder +} + +// description is TBD +// RemoteEndpointSubTlv returns a BgpSrteRemoteEndpointSubTlv +func (obj *bgpSrteV6TunnelTlv) HasRemoteEndpointSubTlv() bool { + return obj.obj.RemoteEndpointSubTlv != nil +} + +// description is TBD +// SetRemoteEndpointSubTlv sets the BgpSrteRemoteEndpointSubTlv value in the BgpSrteV6TunnelTlv object +func (obj *bgpSrteV6TunnelTlv) SetRemoteEndpointSubTlv(value BgpSrteRemoteEndpointSubTlv) BgpSrteV6TunnelTlv { + + obj.remoteEndpointSubTlvHolder = nil + obj.obj.RemoteEndpointSubTlv = value.msg() + + return obj +} + +// description is TBD +// ColorSubTlv returns a BgpSrteColorSubTlv +func (obj *bgpSrteV6TunnelTlv) ColorSubTlv() BgpSrteColorSubTlv { + if obj.obj.ColorSubTlv == nil { + obj.obj.ColorSubTlv = NewBgpSrteColorSubTlv().msg() + } + if obj.colorSubTlvHolder == nil { + obj.colorSubTlvHolder = &bgpSrteColorSubTlv{obj: obj.obj.ColorSubTlv} + } + return obj.colorSubTlvHolder +} + +// description is TBD +// ColorSubTlv returns a BgpSrteColorSubTlv +func (obj *bgpSrteV6TunnelTlv) HasColorSubTlv() bool { + return obj.obj.ColorSubTlv != nil +} + +// description is TBD +// SetColorSubTlv sets the BgpSrteColorSubTlv value in the BgpSrteV6TunnelTlv object +func (obj *bgpSrteV6TunnelTlv) SetColorSubTlv(value BgpSrteColorSubTlv) BgpSrteV6TunnelTlv { + + obj.colorSubTlvHolder = nil + obj.obj.ColorSubTlv = value.msg() + + return obj +} + +// description is TBD +// BindingSubTlv returns a BgpSrteBindingSubTlv +func (obj *bgpSrteV6TunnelTlv) BindingSubTlv() BgpSrteBindingSubTlv { + if obj.obj.BindingSubTlv == nil { + obj.obj.BindingSubTlv = NewBgpSrteBindingSubTlv().msg() + } + if obj.bindingSubTlvHolder == nil { + obj.bindingSubTlvHolder = &bgpSrteBindingSubTlv{obj: obj.obj.BindingSubTlv} + } + return obj.bindingSubTlvHolder +} + +// description is TBD +// BindingSubTlv returns a BgpSrteBindingSubTlv +func (obj *bgpSrteV6TunnelTlv) HasBindingSubTlv() bool { + return obj.obj.BindingSubTlv != nil +} + +// description is TBD +// SetBindingSubTlv sets the BgpSrteBindingSubTlv value in the BgpSrteV6TunnelTlv object +func (obj *bgpSrteV6TunnelTlv) SetBindingSubTlv(value BgpSrteBindingSubTlv) BgpSrteV6TunnelTlv { + + obj.bindingSubTlvHolder = nil + obj.obj.BindingSubTlv = value.msg() + + return obj +} + +// description is TBD +// PreferenceSubTlv returns a BgpSrtePreferenceSubTlv +func (obj *bgpSrteV6TunnelTlv) PreferenceSubTlv() BgpSrtePreferenceSubTlv { + if obj.obj.PreferenceSubTlv == nil { + obj.obj.PreferenceSubTlv = NewBgpSrtePreferenceSubTlv().msg() + } + if obj.preferenceSubTlvHolder == nil { + obj.preferenceSubTlvHolder = &bgpSrtePreferenceSubTlv{obj: obj.obj.PreferenceSubTlv} + } + return obj.preferenceSubTlvHolder +} + +// description is TBD +// PreferenceSubTlv returns a BgpSrtePreferenceSubTlv +func (obj *bgpSrteV6TunnelTlv) HasPreferenceSubTlv() bool { + return obj.obj.PreferenceSubTlv != nil +} + +// description is TBD +// SetPreferenceSubTlv sets the BgpSrtePreferenceSubTlv value in the BgpSrteV6TunnelTlv object +func (obj *bgpSrteV6TunnelTlv) SetPreferenceSubTlv(value BgpSrtePreferenceSubTlv) BgpSrteV6TunnelTlv { + + obj.preferenceSubTlvHolder = nil + obj.obj.PreferenceSubTlv = value.msg() + + return obj +} + +// description is TBD +// PolicyPrioritySubTlv returns a BgpSrtePolicyPrioritySubTlv +func (obj *bgpSrteV6TunnelTlv) PolicyPrioritySubTlv() BgpSrtePolicyPrioritySubTlv { + if obj.obj.PolicyPrioritySubTlv == nil { + obj.obj.PolicyPrioritySubTlv = NewBgpSrtePolicyPrioritySubTlv().msg() + } + if obj.policyPrioritySubTlvHolder == nil { + obj.policyPrioritySubTlvHolder = &bgpSrtePolicyPrioritySubTlv{obj: obj.obj.PolicyPrioritySubTlv} + } + return obj.policyPrioritySubTlvHolder +} + +// description is TBD +// PolicyPrioritySubTlv returns a BgpSrtePolicyPrioritySubTlv +func (obj *bgpSrteV6TunnelTlv) HasPolicyPrioritySubTlv() bool { + return obj.obj.PolicyPrioritySubTlv != nil +} + +// description is TBD +// SetPolicyPrioritySubTlv sets the BgpSrtePolicyPrioritySubTlv value in the BgpSrteV6TunnelTlv object +func (obj *bgpSrteV6TunnelTlv) SetPolicyPrioritySubTlv(value BgpSrtePolicyPrioritySubTlv) BgpSrteV6TunnelTlv { + + obj.policyPrioritySubTlvHolder = nil + obj.obj.PolicyPrioritySubTlv = value.msg() + + return obj +} + +// description is TBD +// PolicyNameSubTlv returns a BgpSrtePolicyNameSubTlv +func (obj *bgpSrteV6TunnelTlv) PolicyNameSubTlv() BgpSrtePolicyNameSubTlv { + if obj.obj.PolicyNameSubTlv == nil { + obj.obj.PolicyNameSubTlv = NewBgpSrtePolicyNameSubTlv().msg() + } + if obj.policyNameSubTlvHolder == nil { + obj.policyNameSubTlvHolder = &bgpSrtePolicyNameSubTlv{obj: obj.obj.PolicyNameSubTlv} + } + return obj.policyNameSubTlvHolder +} + +// description is TBD +// PolicyNameSubTlv returns a BgpSrtePolicyNameSubTlv +func (obj *bgpSrteV6TunnelTlv) HasPolicyNameSubTlv() bool { + return obj.obj.PolicyNameSubTlv != nil +} + +// description is TBD +// SetPolicyNameSubTlv sets the BgpSrtePolicyNameSubTlv value in the BgpSrteV6TunnelTlv object +func (obj *bgpSrteV6TunnelTlv) SetPolicyNameSubTlv(value BgpSrtePolicyNameSubTlv) BgpSrteV6TunnelTlv { + + obj.policyNameSubTlvHolder = nil + obj.obj.PolicyNameSubTlv = value.msg() + + return obj +} + +// description is TBD +// ExplicitNullLabelPolicySubTlv returns a BgpSrteExplicitNullLabelPolicySubTlv +func (obj *bgpSrteV6TunnelTlv) ExplicitNullLabelPolicySubTlv() BgpSrteExplicitNullLabelPolicySubTlv { + if obj.obj.ExplicitNullLabelPolicySubTlv == nil { + obj.obj.ExplicitNullLabelPolicySubTlv = NewBgpSrteExplicitNullLabelPolicySubTlv().msg() + } + if obj.explicitNullLabelPolicySubTlvHolder == nil { + obj.explicitNullLabelPolicySubTlvHolder = &bgpSrteExplicitNullLabelPolicySubTlv{obj: obj.obj.ExplicitNullLabelPolicySubTlv} + } + return obj.explicitNullLabelPolicySubTlvHolder +} + +// description is TBD +// ExplicitNullLabelPolicySubTlv returns a BgpSrteExplicitNullLabelPolicySubTlv +func (obj *bgpSrteV6TunnelTlv) HasExplicitNullLabelPolicySubTlv() bool { + return obj.obj.ExplicitNullLabelPolicySubTlv != nil +} + +// description is TBD +// SetExplicitNullLabelPolicySubTlv sets the BgpSrteExplicitNullLabelPolicySubTlv value in the BgpSrteV6TunnelTlv object +func (obj *bgpSrteV6TunnelTlv) SetExplicitNullLabelPolicySubTlv(value BgpSrteExplicitNullLabelPolicySubTlv) BgpSrteV6TunnelTlv { + + obj.explicitNullLabelPolicySubTlvHolder = nil + obj.obj.ExplicitNullLabelPolicySubTlv = value.msg() + + return obj +} + +// description is TBD +// SegmentLists returns a []BgpSrteSegmentList +func (obj *bgpSrteV6TunnelTlv) SegmentLists() BgpSrteV6TunnelTlvBgpSrteSegmentListIter { + if len(obj.obj.SegmentLists) == 0 { + obj.obj.SegmentLists = []*otg.BgpSrteSegmentList{} + } + if obj.segmentListsHolder == nil { + obj.segmentListsHolder = newBgpSrteV6TunnelTlvBgpSrteSegmentListIter(&obj.obj.SegmentLists).setMsg(obj) + } + return obj.segmentListsHolder +} + +type bgpSrteV6TunnelTlvBgpSrteSegmentListIter struct { + obj *bgpSrteV6TunnelTlv + bgpSrteSegmentListSlice []BgpSrteSegmentList + fieldPtr *[]*otg.BgpSrteSegmentList +} + +func newBgpSrteV6TunnelTlvBgpSrteSegmentListIter(ptr *[]*otg.BgpSrteSegmentList) BgpSrteV6TunnelTlvBgpSrteSegmentListIter { + return &bgpSrteV6TunnelTlvBgpSrteSegmentListIter{fieldPtr: ptr} +} + +type BgpSrteV6TunnelTlvBgpSrteSegmentListIter interface { + setMsg(*bgpSrteV6TunnelTlv) BgpSrteV6TunnelTlvBgpSrteSegmentListIter + Items() []BgpSrteSegmentList + Add() BgpSrteSegmentList + Append(items ...BgpSrteSegmentList) BgpSrteV6TunnelTlvBgpSrteSegmentListIter + Set(index int, newObj BgpSrteSegmentList) BgpSrteV6TunnelTlvBgpSrteSegmentListIter + Clear() BgpSrteV6TunnelTlvBgpSrteSegmentListIter + clearHolderSlice() BgpSrteV6TunnelTlvBgpSrteSegmentListIter + appendHolderSlice(item BgpSrteSegmentList) BgpSrteV6TunnelTlvBgpSrteSegmentListIter +} + +func (obj *bgpSrteV6TunnelTlvBgpSrteSegmentListIter) setMsg(msg *bgpSrteV6TunnelTlv) BgpSrteV6TunnelTlvBgpSrteSegmentListIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpSrteSegmentList{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpSrteV6TunnelTlvBgpSrteSegmentListIter) Items() []BgpSrteSegmentList { + return obj.bgpSrteSegmentListSlice +} + +func (obj *bgpSrteV6TunnelTlvBgpSrteSegmentListIter) Add() BgpSrteSegmentList { + newObj := &otg.BgpSrteSegmentList{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpSrteSegmentList{obj: newObj} + newLibObj.setDefault() + obj.bgpSrteSegmentListSlice = append(obj.bgpSrteSegmentListSlice, newLibObj) + return newLibObj +} + +func (obj *bgpSrteV6TunnelTlvBgpSrteSegmentListIter) Append(items ...BgpSrteSegmentList) BgpSrteV6TunnelTlvBgpSrteSegmentListIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpSrteSegmentListSlice = append(obj.bgpSrteSegmentListSlice, item) + } + return obj +} + +func (obj *bgpSrteV6TunnelTlvBgpSrteSegmentListIter) Set(index int, newObj BgpSrteSegmentList) BgpSrteV6TunnelTlvBgpSrteSegmentListIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpSrteSegmentListSlice[index] = newObj + return obj +} +func (obj *bgpSrteV6TunnelTlvBgpSrteSegmentListIter) Clear() BgpSrteV6TunnelTlvBgpSrteSegmentListIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpSrteSegmentList{} + obj.bgpSrteSegmentListSlice = []BgpSrteSegmentList{} + } + return obj +} +func (obj *bgpSrteV6TunnelTlvBgpSrteSegmentListIter) clearHolderSlice() BgpSrteV6TunnelTlvBgpSrteSegmentListIter { + if len(obj.bgpSrteSegmentListSlice) > 0 { + obj.bgpSrteSegmentListSlice = []BgpSrteSegmentList{} + } + return obj +} +func (obj *bgpSrteV6TunnelTlvBgpSrteSegmentListIter) appendHolderSlice(item BgpSrteSegmentList) BgpSrteV6TunnelTlvBgpSrteSegmentListIter { + obj.bgpSrteSegmentListSlice = append(obj.bgpSrteSegmentListSlice, item) + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *bgpSrteV6TunnelTlv) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the BgpSrteV6TunnelTlv object +func (obj *bgpSrteV6TunnelTlv) SetName(value string) BgpSrteV6TunnelTlv { + + obj.obj.Name = &value + return obj +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// Active returns a bool +func (obj *bgpSrteV6TunnelTlv) Active() bool { + + return *obj.obj.Active + +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// Active returns a bool +func (obj *bgpSrteV6TunnelTlv) HasActive() bool { + return obj.obj.Active != nil +} + +// If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. +// SetActive sets the bool value in the BgpSrteV6TunnelTlv object +func (obj *bgpSrteV6TunnelTlv) SetActive(value bool) BgpSrteV6TunnelTlv { + + obj.obj.Active = &value + return obj +} + +func (obj *bgpSrteV6TunnelTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RemoteEndpointSubTlv != nil { + + obj.RemoteEndpointSubTlv().validateObj(vObj, set_default) + } + + if obj.obj.ColorSubTlv != nil { + + obj.ColorSubTlv().validateObj(vObj, set_default) + } + + if obj.obj.BindingSubTlv != nil { + + obj.BindingSubTlv().validateObj(vObj, set_default) + } + + if obj.obj.PreferenceSubTlv != nil { + + obj.PreferenceSubTlv().validateObj(vObj, set_default) + } + + if obj.obj.PolicyPrioritySubTlv != nil { + + obj.PolicyPrioritySubTlv().validateObj(vObj, set_default) + } + + if obj.obj.PolicyNameSubTlv != nil { + + obj.PolicyNameSubTlv().validateObj(vObj, set_default) + } + + if obj.obj.ExplicitNullLabelPolicySubTlv != nil { + + obj.ExplicitNullLabelPolicySubTlv().validateObj(vObj, set_default) + } + + if len(obj.obj.SegmentLists) != 0 { + + if set_default { + obj.SegmentLists().clearHolderSlice() + for _, item := range obj.obj.SegmentLists { + obj.SegmentLists().appendHolderSlice(&bgpSrteSegmentList{obj: item}) + } + } + for _, item := range obj.SegmentLists().Items() { + item.validateObj(vObj, set_default) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface BgpSrteV6TunnelTlv") + } +} + +func (obj *bgpSrteV6TunnelTlv) setDefault() { + if obj.obj.Active == nil { + obj.SetActive(true) + } + +} diff --git a/gosnappi/bgp_structured_pdus.go b/gosnappi/bgp_structured_pdus.go new file mode 100644 index 00000000..85996700 --- /dev/null +++ b/gosnappi/bgp_structured_pdus.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpStructuredPdus ***** +type bgpStructuredPdus struct { + validation + obj *otg.BgpStructuredPdus + marshaller marshalBgpStructuredPdus + unMarshaller unMarshalBgpStructuredPdus + updatesHolder BgpStructuredPdusBgpOneStructuredUpdateReplayIter +} + +func NewBgpStructuredPdus() BgpStructuredPdus { + obj := bgpStructuredPdus{obj: &otg.BgpStructuredPdus{}} + obj.setDefault() + return &obj +} + +func (obj *bgpStructuredPdus) msg() *otg.BgpStructuredPdus { + return obj.obj +} + +func (obj *bgpStructuredPdus) setMsg(msg *otg.BgpStructuredPdus) BgpStructuredPdus { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpStructuredPdus struct { + obj *bgpStructuredPdus +} + +type marshalBgpStructuredPdus interface { + // ToProto marshals BgpStructuredPdus to protobuf object *otg.BgpStructuredPdus + ToProto() (*otg.BgpStructuredPdus, error) + // ToPbText marshals BgpStructuredPdus to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpStructuredPdus to YAML text + ToYaml() (string, error) + // ToJson marshals BgpStructuredPdus to JSON text + ToJson() (string, error) +} + +type unMarshalbgpStructuredPdus struct { + obj *bgpStructuredPdus +} + +type unMarshalBgpStructuredPdus interface { + // FromProto unmarshals BgpStructuredPdus from protobuf object *otg.BgpStructuredPdus + FromProto(msg *otg.BgpStructuredPdus) (BgpStructuredPdus, error) + // FromPbText unmarshals BgpStructuredPdus from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpStructuredPdus from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpStructuredPdus from JSON text + FromJson(value string) error +} + +func (obj *bgpStructuredPdus) Marshal() marshalBgpStructuredPdus { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpStructuredPdus{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpStructuredPdus) Unmarshal() unMarshalBgpStructuredPdus { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpStructuredPdus{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpStructuredPdus) ToProto() (*otg.BgpStructuredPdus, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpStructuredPdus) FromProto(msg *otg.BgpStructuredPdus) (BgpStructuredPdus, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpStructuredPdus) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpStructuredPdus) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpStructuredPdus) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpStructuredPdus) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpStructuredPdus) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpStructuredPdus) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpStructuredPdus) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpStructuredPdus) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpStructuredPdus) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpStructuredPdus) Clone() (BgpStructuredPdus, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpStructuredPdus() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpStructuredPdus) setNil() { + obj.updatesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpStructuredPdus is ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. +type BgpStructuredPdus interface { + Validation + // msg marshals BgpStructuredPdus to protobuf object *otg.BgpStructuredPdus + // and doesn't set defaults + msg() *otg.BgpStructuredPdus + // setMsg unmarshals BgpStructuredPdus from protobuf object *otg.BgpStructuredPdus + // and doesn't set defaults + setMsg(*otg.BgpStructuredPdus) BgpStructuredPdus + // provides marshal interface + Marshal() marshalBgpStructuredPdus + // provides unmarshal interface + Unmarshal() unMarshalBgpStructuredPdus + // validate validates BgpStructuredPdus + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpStructuredPdus, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Updates returns BgpStructuredPdusBgpOneStructuredUpdateReplayIterIter, set in BgpStructuredPdus + Updates() BgpStructuredPdusBgpOneStructuredUpdateReplayIter + setNil() +} + +// Array of ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. +// Updates returns a []BgpOneStructuredUpdateReplay +func (obj *bgpStructuredPdus) Updates() BgpStructuredPdusBgpOneStructuredUpdateReplayIter { + if len(obj.obj.Updates) == 0 { + obj.obj.Updates = []*otg.BgpOneStructuredUpdateReplay{} + } + if obj.updatesHolder == nil { + obj.updatesHolder = newBgpStructuredPdusBgpOneStructuredUpdateReplayIter(&obj.obj.Updates).setMsg(obj) + } + return obj.updatesHolder +} + +type bgpStructuredPdusBgpOneStructuredUpdateReplayIter struct { + obj *bgpStructuredPdus + bgpOneStructuredUpdateReplaySlice []BgpOneStructuredUpdateReplay + fieldPtr *[]*otg.BgpOneStructuredUpdateReplay +} + +func newBgpStructuredPdusBgpOneStructuredUpdateReplayIter(ptr *[]*otg.BgpOneStructuredUpdateReplay) BgpStructuredPdusBgpOneStructuredUpdateReplayIter { + return &bgpStructuredPdusBgpOneStructuredUpdateReplayIter{fieldPtr: ptr} +} + +type BgpStructuredPdusBgpOneStructuredUpdateReplayIter interface { + setMsg(*bgpStructuredPdus) BgpStructuredPdusBgpOneStructuredUpdateReplayIter + Items() []BgpOneStructuredUpdateReplay + Add() BgpOneStructuredUpdateReplay + Append(items ...BgpOneStructuredUpdateReplay) BgpStructuredPdusBgpOneStructuredUpdateReplayIter + Set(index int, newObj BgpOneStructuredUpdateReplay) BgpStructuredPdusBgpOneStructuredUpdateReplayIter + Clear() BgpStructuredPdusBgpOneStructuredUpdateReplayIter + clearHolderSlice() BgpStructuredPdusBgpOneStructuredUpdateReplayIter + appendHolderSlice(item BgpOneStructuredUpdateReplay) BgpStructuredPdusBgpOneStructuredUpdateReplayIter +} + +func (obj *bgpStructuredPdusBgpOneStructuredUpdateReplayIter) setMsg(msg *bgpStructuredPdus) BgpStructuredPdusBgpOneStructuredUpdateReplayIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpOneStructuredUpdateReplay{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpStructuredPdusBgpOneStructuredUpdateReplayIter) Items() []BgpOneStructuredUpdateReplay { + return obj.bgpOneStructuredUpdateReplaySlice +} + +func (obj *bgpStructuredPdusBgpOneStructuredUpdateReplayIter) Add() BgpOneStructuredUpdateReplay { + newObj := &otg.BgpOneStructuredUpdateReplay{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpOneStructuredUpdateReplay{obj: newObj} + newLibObj.setDefault() + obj.bgpOneStructuredUpdateReplaySlice = append(obj.bgpOneStructuredUpdateReplaySlice, newLibObj) + return newLibObj +} + +func (obj *bgpStructuredPdusBgpOneStructuredUpdateReplayIter) Append(items ...BgpOneStructuredUpdateReplay) BgpStructuredPdusBgpOneStructuredUpdateReplayIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpOneStructuredUpdateReplaySlice = append(obj.bgpOneStructuredUpdateReplaySlice, item) + } + return obj +} + +func (obj *bgpStructuredPdusBgpOneStructuredUpdateReplayIter) Set(index int, newObj BgpOneStructuredUpdateReplay) BgpStructuredPdusBgpOneStructuredUpdateReplayIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpOneStructuredUpdateReplaySlice[index] = newObj + return obj +} +func (obj *bgpStructuredPdusBgpOneStructuredUpdateReplayIter) Clear() BgpStructuredPdusBgpOneStructuredUpdateReplayIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpOneStructuredUpdateReplay{} + obj.bgpOneStructuredUpdateReplaySlice = []BgpOneStructuredUpdateReplay{} + } + return obj +} +func (obj *bgpStructuredPdusBgpOneStructuredUpdateReplayIter) clearHolderSlice() BgpStructuredPdusBgpOneStructuredUpdateReplayIter { + if len(obj.bgpOneStructuredUpdateReplaySlice) > 0 { + obj.bgpOneStructuredUpdateReplaySlice = []BgpOneStructuredUpdateReplay{} + } + return obj +} +func (obj *bgpStructuredPdusBgpOneStructuredUpdateReplayIter) appendHolderSlice(item BgpOneStructuredUpdateReplay) BgpStructuredPdusBgpOneStructuredUpdateReplayIter { + obj.bgpOneStructuredUpdateReplaySlice = append(obj.bgpOneStructuredUpdateReplaySlice, item) + return obj +} + +func (obj *bgpStructuredPdus) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Updates) != 0 { + + if set_default { + obj.Updates().clearHolderSlice() + for _, item := range obj.obj.Updates { + obj.Updates().appendHolderSlice(&bgpOneStructuredUpdateReplay{obj: item}) + } + } + for _, item := range obj.Updates().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpStructuredPdus) setDefault() { + +} diff --git a/gosnappi/bgp_update_replay.go b/gosnappi/bgp_update_replay.go new file mode 100644 index 00000000..38c930ca --- /dev/null +++ b/gosnappi/bgp_update_replay.go @@ -0,0 +1,452 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpUpdateReplay ***** +type bgpUpdateReplay struct { + validation + obj *otg.BgpUpdateReplay + marshaller marshalBgpUpdateReplay + unMarshaller unMarshalBgpUpdateReplay + structuredPdusHolder BgpStructuredPdus + rawBytesHolder BgpRawBytes +} + +func NewBgpUpdateReplay() BgpUpdateReplay { + obj := bgpUpdateReplay{obj: &otg.BgpUpdateReplay{}} + obj.setDefault() + return &obj +} + +func (obj *bgpUpdateReplay) msg() *otg.BgpUpdateReplay { + return obj.obj +} + +func (obj *bgpUpdateReplay) setMsg(msg *otg.BgpUpdateReplay) BgpUpdateReplay { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpUpdateReplay struct { + obj *bgpUpdateReplay +} + +type marshalBgpUpdateReplay interface { + // ToProto marshals BgpUpdateReplay to protobuf object *otg.BgpUpdateReplay + ToProto() (*otg.BgpUpdateReplay, error) + // ToPbText marshals BgpUpdateReplay to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpUpdateReplay to YAML text + ToYaml() (string, error) + // ToJson marshals BgpUpdateReplay to JSON text + ToJson() (string, error) +} + +type unMarshalbgpUpdateReplay struct { + obj *bgpUpdateReplay +} + +type unMarshalBgpUpdateReplay interface { + // FromProto unmarshals BgpUpdateReplay from protobuf object *otg.BgpUpdateReplay + FromProto(msg *otg.BgpUpdateReplay) (BgpUpdateReplay, error) + // FromPbText unmarshals BgpUpdateReplay from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpUpdateReplay from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpUpdateReplay from JSON text + FromJson(value string) error +} + +func (obj *bgpUpdateReplay) Marshal() marshalBgpUpdateReplay { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpUpdateReplay{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpUpdateReplay) Unmarshal() unMarshalBgpUpdateReplay { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpUpdateReplay{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpUpdateReplay) ToProto() (*otg.BgpUpdateReplay, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpUpdateReplay) FromProto(msg *otg.BgpUpdateReplay) (BgpUpdateReplay, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpUpdateReplay) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpUpdateReplay) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpUpdateReplay) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpUpdateReplay) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpUpdateReplay) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpUpdateReplay) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpUpdateReplay) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpUpdateReplay) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpUpdateReplay) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpUpdateReplay) Clone() (BgpUpdateReplay, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpUpdateReplay() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpUpdateReplay) setNil() { + obj.structuredPdusHolder = nil + obj.rawBytesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpUpdateReplay is ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. +type BgpUpdateReplay interface { + Validation + // msg marshals BgpUpdateReplay to protobuf object *otg.BgpUpdateReplay + // and doesn't set defaults + msg() *otg.BgpUpdateReplay + // setMsg unmarshals BgpUpdateReplay from protobuf object *otg.BgpUpdateReplay + // and doesn't set defaults + setMsg(*otg.BgpUpdateReplay) BgpUpdateReplay + // provides marshal interface + Marshal() marshalBgpUpdateReplay + // provides unmarshal interface + Unmarshal() unMarshalBgpUpdateReplay + // validate validates BgpUpdateReplay + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpUpdateReplay, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpUpdateReplayChoiceEnum, set in BgpUpdateReplay + Choice() BgpUpdateReplayChoiceEnum + // setChoice assigns BgpUpdateReplayChoiceEnum provided by user to BgpUpdateReplay + setChoice(value BgpUpdateReplayChoiceEnum) BgpUpdateReplay + // HasChoice checks if Choice has been set in BgpUpdateReplay + HasChoice() bool + // StructuredPdus returns BgpStructuredPdus, set in BgpUpdateReplay. + // BgpStructuredPdus is ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. + StructuredPdus() BgpStructuredPdus + // SetStructuredPdus assigns BgpStructuredPdus provided by user to BgpUpdateReplay. + // BgpStructuredPdus is ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. + SetStructuredPdus(value BgpStructuredPdus) BgpUpdateReplay + // HasStructuredPdus checks if StructuredPdus has been set in BgpUpdateReplay + HasStructuredPdus() bool + // RawBytes returns BgpRawBytes, set in BgpUpdateReplay. + // BgpRawBytes is ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. + RawBytes() BgpRawBytes + // SetRawBytes assigns BgpRawBytes provided by user to BgpUpdateReplay. + // BgpRawBytes is ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. + SetRawBytes(value BgpRawBytes) BgpUpdateReplay + // HasRawBytes checks if RawBytes has been set in BgpUpdateReplay + HasRawBytes() bool + setNil() +} + +type BgpUpdateReplayChoiceEnum string + +// Enum of Choice on BgpUpdateReplay +var BgpUpdateReplayChoice = struct { + STRUCTURED_PDUS BgpUpdateReplayChoiceEnum + RAW_BYTES BgpUpdateReplayChoiceEnum +}{ + STRUCTURED_PDUS: BgpUpdateReplayChoiceEnum("structured_pdus"), + RAW_BYTES: BgpUpdateReplayChoiceEnum("raw_bytes"), +} + +func (obj *bgpUpdateReplay) Choice() BgpUpdateReplayChoiceEnum { + return BgpUpdateReplayChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *bgpUpdateReplay) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpUpdateReplay) setChoice(value BgpUpdateReplayChoiceEnum) BgpUpdateReplay { + intValue, ok := otg.BgpUpdateReplay_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpUpdateReplayChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpUpdateReplay_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.RawBytes = nil + obj.rawBytesHolder = nil + obj.obj.StructuredPdus = nil + obj.structuredPdusHolder = nil + + if value == BgpUpdateReplayChoice.STRUCTURED_PDUS { + obj.obj.StructuredPdus = NewBgpStructuredPdus().msg() + } + + if value == BgpUpdateReplayChoice.RAW_BYTES { + obj.obj.RawBytes = NewBgpRawBytes().msg() + } + + return obj +} + +// description is TBD +// StructuredPdus returns a BgpStructuredPdus +func (obj *bgpUpdateReplay) StructuredPdus() BgpStructuredPdus { + if obj.obj.StructuredPdus == nil { + obj.setChoice(BgpUpdateReplayChoice.STRUCTURED_PDUS) + } + if obj.structuredPdusHolder == nil { + obj.structuredPdusHolder = &bgpStructuredPdus{obj: obj.obj.StructuredPdus} + } + return obj.structuredPdusHolder +} + +// description is TBD +// StructuredPdus returns a BgpStructuredPdus +func (obj *bgpUpdateReplay) HasStructuredPdus() bool { + return obj.obj.StructuredPdus != nil +} + +// description is TBD +// SetStructuredPdus sets the BgpStructuredPdus value in the BgpUpdateReplay object +func (obj *bgpUpdateReplay) SetStructuredPdus(value BgpStructuredPdus) BgpUpdateReplay { + obj.setChoice(BgpUpdateReplayChoice.STRUCTURED_PDUS) + obj.structuredPdusHolder = nil + obj.obj.StructuredPdus = value.msg() + + return obj +} + +// description is TBD +// RawBytes returns a BgpRawBytes +func (obj *bgpUpdateReplay) RawBytes() BgpRawBytes { + if obj.obj.RawBytes == nil { + obj.setChoice(BgpUpdateReplayChoice.RAW_BYTES) + } + if obj.rawBytesHolder == nil { + obj.rawBytesHolder = &bgpRawBytes{obj: obj.obj.RawBytes} + } + return obj.rawBytesHolder +} + +// description is TBD +// RawBytes returns a BgpRawBytes +func (obj *bgpUpdateReplay) HasRawBytes() bool { + return obj.obj.RawBytes != nil +} + +// description is TBD +// SetRawBytes sets the BgpRawBytes value in the BgpUpdateReplay object +func (obj *bgpUpdateReplay) SetRawBytes(value BgpRawBytes) BgpUpdateReplay { + obj.setChoice(BgpUpdateReplayChoice.RAW_BYTES) + obj.rawBytesHolder = nil + obj.obj.RawBytes = value.msg() + + return obj +} + +func (obj *bgpUpdateReplay) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.StructuredPdus != nil { + + obj.StructuredPdus().validateObj(vObj, set_default) + } + + if obj.obj.RawBytes != nil { + + obj.RawBytes().validateObj(vObj, set_default) + } + +} + +func (obj *bgpUpdateReplay) setDefault() { + var choices_set int = 0 + var choice BgpUpdateReplayChoiceEnum + + if obj.obj.StructuredPdus != nil { + choices_set += 1 + choice = BgpUpdateReplayChoice.STRUCTURED_PDUS + } + + if obj.obj.RawBytes != nil { + choices_set += 1 + choice = BgpUpdateReplayChoice.RAW_BYTES + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(BgpUpdateReplayChoice.STRUCTURED_PDUS) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpUpdateReplay") + } + } else { + intVal := otg.BgpUpdateReplay_Choice_Enum_value[string(choice)] + enumValue := otg.BgpUpdateReplay_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_v4_ethernet_segment.go b/gosnappi/bgp_v4_ethernet_segment.go new file mode 100644 index 00000000..87bed70b --- /dev/null +++ b/gosnappi/bgp_v4_ethernet_segment.go @@ -0,0 +1,856 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV4EthernetSegment ***** +type bgpV4EthernetSegment struct { + validation + obj *otg.BgpV4EthernetSegment + marshaller marshalBgpV4EthernetSegment + unMarshaller unMarshalBgpV4EthernetSegment + dfElectionHolder BgpEthernetSegmentDfElection + evisHolder BgpV4EthernetSegmentBgpV4EvpnEvisIter + advancedHolder BgpRouteAdvanced + communitiesHolder BgpV4EthernetSegmentBgpCommunityIter + extCommunitiesHolder BgpV4EthernetSegmentBgpExtCommunityIter + asPathHolder BgpAsPath +} + +func NewBgpV4EthernetSegment() BgpV4EthernetSegment { + obj := bgpV4EthernetSegment{obj: &otg.BgpV4EthernetSegment{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV4EthernetSegment) msg() *otg.BgpV4EthernetSegment { + return obj.obj +} + +func (obj *bgpV4EthernetSegment) setMsg(msg *otg.BgpV4EthernetSegment) BgpV4EthernetSegment { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV4EthernetSegment struct { + obj *bgpV4EthernetSegment +} + +type marshalBgpV4EthernetSegment interface { + // ToProto marshals BgpV4EthernetSegment to protobuf object *otg.BgpV4EthernetSegment + ToProto() (*otg.BgpV4EthernetSegment, error) + // ToPbText marshals BgpV4EthernetSegment to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV4EthernetSegment to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV4EthernetSegment to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV4EthernetSegment struct { + obj *bgpV4EthernetSegment +} + +type unMarshalBgpV4EthernetSegment interface { + // FromProto unmarshals BgpV4EthernetSegment from protobuf object *otg.BgpV4EthernetSegment + FromProto(msg *otg.BgpV4EthernetSegment) (BgpV4EthernetSegment, error) + // FromPbText unmarshals BgpV4EthernetSegment from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV4EthernetSegment from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV4EthernetSegment from JSON text + FromJson(value string) error +} + +func (obj *bgpV4EthernetSegment) Marshal() marshalBgpV4EthernetSegment { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV4EthernetSegment{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV4EthernetSegment) Unmarshal() unMarshalBgpV4EthernetSegment { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV4EthernetSegment{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV4EthernetSegment) ToProto() (*otg.BgpV4EthernetSegment, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV4EthernetSegment) FromProto(msg *otg.BgpV4EthernetSegment) (BgpV4EthernetSegment, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV4EthernetSegment) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV4EthernetSegment) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV4EthernetSegment) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV4EthernetSegment) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV4EthernetSegment) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV4EthernetSegment) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV4EthernetSegment) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV4EthernetSegment) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV4EthernetSegment) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV4EthernetSegment) Clone() (BgpV4EthernetSegment, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV4EthernetSegment() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpV4EthernetSegment) setNil() { + obj.dfElectionHolder = nil + obj.evisHolder = nil + obj.advancedHolder = nil + obj.communitiesHolder = nil + obj.extCommunitiesHolder = nil + obj.asPathHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpV4EthernetSegment is configuration for BGP Ethernet Segment ranges. Advertises following routes - +// +// Type 4 - Ethernet Segment Route +type BgpV4EthernetSegment interface { + Validation + // msg marshals BgpV4EthernetSegment to protobuf object *otg.BgpV4EthernetSegment + // and doesn't set defaults + msg() *otg.BgpV4EthernetSegment + // setMsg unmarshals BgpV4EthernetSegment from protobuf object *otg.BgpV4EthernetSegment + // and doesn't set defaults + setMsg(*otg.BgpV4EthernetSegment) BgpV4EthernetSegment + // provides marshal interface + Marshal() marshalBgpV4EthernetSegment + // provides unmarshal interface + Unmarshal() unMarshalBgpV4EthernetSegment + // validate validates BgpV4EthernetSegment + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV4EthernetSegment, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // DfElection returns BgpEthernetSegmentDfElection, set in BgpV4EthernetSegment. + // BgpEthernetSegmentDfElection is configuration for Designated Forwarder (DF) election among the Provider Edge (PE) routers on the same Ethernet Segment. + DfElection() BgpEthernetSegmentDfElection + // SetDfElection assigns BgpEthernetSegmentDfElection provided by user to BgpV4EthernetSegment. + // BgpEthernetSegmentDfElection is configuration for Designated Forwarder (DF) election among the Provider Edge (PE) routers on the same Ethernet Segment. + SetDfElection(value BgpEthernetSegmentDfElection) BgpV4EthernetSegment + // HasDfElection checks if DfElection has been set in BgpV4EthernetSegment + HasDfElection() bool + // Evis returns BgpV4EthernetSegmentBgpV4EvpnEvisIterIter, set in BgpV4EthernetSegment + Evis() BgpV4EthernetSegmentBgpV4EvpnEvisIter + // Esi returns string, set in BgpV4EthernetSegment. + Esi() string + // SetEsi assigns string provided by user to BgpV4EthernetSegment + SetEsi(value string) BgpV4EthernetSegment + // HasEsi checks if Esi has been set in BgpV4EthernetSegment + HasEsi() bool + // ActiveMode returns BgpV4EthernetSegmentActiveModeEnum, set in BgpV4EthernetSegment + ActiveMode() BgpV4EthernetSegmentActiveModeEnum + // SetActiveMode assigns BgpV4EthernetSegmentActiveModeEnum provided by user to BgpV4EthernetSegment + SetActiveMode(value BgpV4EthernetSegmentActiveModeEnum) BgpV4EthernetSegment + // HasActiveMode checks if ActiveMode has been set in BgpV4EthernetSegment + HasActiveMode() bool + // EsiLabel returns uint32, set in BgpV4EthernetSegment. + EsiLabel() uint32 + // SetEsiLabel assigns uint32 provided by user to BgpV4EthernetSegment + SetEsiLabel(value uint32) BgpV4EthernetSegment + // HasEsiLabel checks if EsiLabel has been set in BgpV4EthernetSegment + HasEsiLabel() bool + // Advanced returns BgpRouteAdvanced, set in BgpV4EthernetSegment. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + Advanced() BgpRouteAdvanced + // SetAdvanced assigns BgpRouteAdvanced provided by user to BgpV4EthernetSegment. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + SetAdvanced(value BgpRouteAdvanced) BgpV4EthernetSegment + // HasAdvanced checks if Advanced has been set in BgpV4EthernetSegment + HasAdvanced() bool + // Communities returns BgpV4EthernetSegmentBgpCommunityIterIter, set in BgpV4EthernetSegment + Communities() BgpV4EthernetSegmentBgpCommunityIter + // ExtCommunities returns BgpV4EthernetSegmentBgpExtCommunityIterIter, set in BgpV4EthernetSegment + ExtCommunities() BgpV4EthernetSegmentBgpExtCommunityIter + // AsPath returns BgpAsPath, set in BgpV4EthernetSegment. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + AsPath() BgpAsPath + // SetAsPath assigns BgpAsPath provided by user to BgpV4EthernetSegment. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + SetAsPath(value BgpAsPath) BgpV4EthernetSegment + // HasAsPath checks if AsPath has been set in BgpV4EthernetSegment + HasAsPath() bool + setNil() +} + +// Designated Forwarder (DF) election configuration. +// DfElection returns a BgpEthernetSegmentDfElection +func (obj *bgpV4EthernetSegment) DfElection() BgpEthernetSegmentDfElection { + if obj.obj.DfElection == nil { + obj.obj.DfElection = NewBgpEthernetSegmentDfElection().msg() + } + if obj.dfElectionHolder == nil { + obj.dfElectionHolder = &bgpEthernetSegmentDfElection{obj: obj.obj.DfElection} + } + return obj.dfElectionHolder +} + +// Designated Forwarder (DF) election configuration. +// DfElection returns a BgpEthernetSegmentDfElection +func (obj *bgpV4EthernetSegment) HasDfElection() bool { + return obj.obj.DfElection != nil +} + +// Designated Forwarder (DF) election configuration. +// SetDfElection sets the BgpEthernetSegmentDfElection value in the BgpV4EthernetSegment object +func (obj *bgpV4EthernetSegment) SetDfElection(value BgpEthernetSegmentDfElection) BgpV4EthernetSegment { + + obj.dfElectionHolder = nil + obj.obj.DfElection = value.msg() + + return obj +} + +// This contains the list of EVIs. +// Evis returns a []BgpV4EvpnEvis +func (obj *bgpV4EthernetSegment) Evis() BgpV4EthernetSegmentBgpV4EvpnEvisIter { + if len(obj.obj.Evis) == 0 { + obj.obj.Evis = []*otg.BgpV4EvpnEvis{} + } + if obj.evisHolder == nil { + obj.evisHolder = newBgpV4EthernetSegmentBgpV4EvpnEvisIter(&obj.obj.Evis).setMsg(obj) + } + return obj.evisHolder +} + +type bgpV4EthernetSegmentBgpV4EvpnEvisIter struct { + obj *bgpV4EthernetSegment + bgpV4EvpnEvisSlice []BgpV4EvpnEvis + fieldPtr *[]*otg.BgpV4EvpnEvis +} + +func newBgpV4EthernetSegmentBgpV4EvpnEvisIter(ptr *[]*otg.BgpV4EvpnEvis) BgpV4EthernetSegmentBgpV4EvpnEvisIter { + return &bgpV4EthernetSegmentBgpV4EvpnEvisIter{fieldPtr: ptr} +} + +type BgpV4EthernetSegmentBgpV4EvpnEvisIter interface { + setMsg(*bgpV4EthernetSegment) BgpV4EthernetSegmentBgpV4EvpnEvisIter + Items() []BgpV4EvpnEvis + Add() BgpV4EvpnEvis + Append(items ...BgpV4EvpnEvis) BgpV4EthernetSegmentBgpV4EvpnEvisIter + Set(index int, newObj BgpV4EvpnEvis) BgpV4EthernetSegmentBgpV4EvpnEvisIter + Clear() BgpV4EthernetSegmentBgpV4EvpnEvisIter + clearHolderSlice() BgpV4EthernetSegmentBgpV4EvpnEvisIter + appendHolderSlice(item BgpV4EvpnEvis) BgpV4EthernetSegmentBgpV4EvpnEvisIter +} + +func (obj *bgpV4EthernetSegmentBgpV4EvpnEvisIter) setMsg(msg *bgpV4EthernetSegment) BgpV4EthernetSegmentBgpV4EvpnEvisIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpV4EvpnEvis{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4EthernetSegmentBgpV4EvpnEvisIter) Items() []BgpV4EvpnEvis { + return obj.bgpV4EvpnEvisSlice +} + +func (obj *bgpV4EthernetSegmentBgpV4EvpnEvisIter) Add() BgpV4EvpnEvis { + newObj := &otg.BgpV4EvpnEvis{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpV4EvpnEvis{obj: newObj} + newLibObj.setDefault() + obj.bgpV4EvpnEvisSlice = append(obj.bgpV4EvpnEvisSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4EthernetSegmentBgpV4EvpnEvisIter) Append(items ...BgpV4EvpnEvis) BgpV4EthernetSegmentBgpV4EvpnEvisIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpV4EvpnEvisSlice = append(obj.bgpV4EvpnEvisSlice, item) + } + return obj +} + +func (obj *bgpV4EthernetSegmentBgpV4EvpnEvisIter) Set(index int, newObj BgpV4EvpnEvis) BgpV4EthernetSegmentBgpV4EvpnEvisIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpV4EvpnEvisSlice[index] = newObj + return obj +} +func (obj *bgpV4EthernetSegmentBgpV4EvpnEvisIter) Clear() BgpV4EthernetSegmentBgpV4EvpnEvisIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpV4EvpnEvis{} + obj.bgpV4EvpnEvisSlice = []BgpV4EvpnEvis{} + } + return obj +} +func (obj *bgpV4EthernetSegmentBgpV4EvpnEvisIter) clearHolderSlice() BgpV4EthernetSegmentBgpV4EvpnEvisIter { + if len(obj.bgpV4EvpnEvisSlice) > 0 { + obj.bgpV4EvpnEvisSlice = []BgpV4EvpnEvis{} + } + return obj +} +func (obj *bgpV4EthernetSegmentBgpV4EvpnEvisIter) appendHolderSlice(item BgpV4EvpnEvis) BgpV4EthernetSegmentBgpV4EvpnEvisIter { + obj.bgpV4EvpnEvisSlice = append(obj.bgpV4EvpnEvisSlice, item) + return obj +} + +// 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero ESI is '10000000000000000000' . +// Esi returns a string +func (obj *bgpV4EthernetSegment) Esi() string { + + return *obj.obj.Esi + +} + +// 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero ESI is '10000000000000000000' . +// Esi returns a string +func (obj *bgpV4EthernetSegment) HasEsi() bool { + return obj.obj.Esi != nil +} + +// 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero ESI is '10000000000000000000' . +// SetEsi sets the string value in the BgpV4EthernetSegment object +func (obj *bgpV4EthernetSegment) SetEsi(value string) BgpV4EthernetSegment { + + obj.obj.Esi = &value + return obj +} + +type BgpV4EthernetSegmentActiveModeEnum string + +// Enum of ActiveMode on BgpV4EthernetSegment +var BgpV4EthernetSegmentActiveMode = struct { + SINGLE_ACTIVE BgpV4EthernetSegmentActiveModeEnum + ALL_ACTIVE BgpV4EthernetSegmentActiveModeEnum +}{ + SINGLE_ACTIVE: BgpV4EthernetSegmentActiveModeEnum("single_active"), + ALL_ACTIVE: BgpV4EthernetSegmentActiveModeEnum("all_active"), +} + +func (obj *bgpV4EthernetSegment) ActiveMode() BgpV4EthernetSegmentActiveModeEnum { + return BgpV4EthernetSegmentActiveModeEnum(obj.obj.ActiveMode.Enum().String()) +} + +// Single Active or All Active mode Redundancy mode selection for Multi-home. +// ActiveMode returns a string +func (obj *bgpV4EthernetSegment) HasActiveMode() bool { + return obj.obj.ActiveMode != nil +} + +func (obj *bgpV4EthernetSegment) SetActiveMode(value BgpV4EthernetSegmentActiveModeEnum) BgpV4EthernetSegment { + intValue, ok := otg.BgpV4EthernetSegment_ActiveMode_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpV4EthernetSegmentActiveModeEnum", string(value))) + return obj + } + enumValue := otg.BgpV4EthernetSegment_ActiveMode_Enum(intValue) + obj.obj.ActiveMode = &enumValue + + return obj +} + +// The label value to be advertised as ESI Label in ESI Label Extended Community. This is included in Ethernet Auto-discovery per ES Routes advertised by a router. +// EsiLabel returns a uint32 +func (obj *bgpV4EthernetSegment) EsiLabel() uint32 { + + return *obj.obj.EsiLabel + +} + +// The label value to be advertised as ESI Label in ESI Label Extended Community. This is included in Ethernet Auto-discovery per ES Routes advertised by a router. +// EsiLabel returns a uint32 +func (obj *bgpV4EthernetSegment) HasEsiLabel() bool { + return obj.obj.EsiLabel != nil +} + +// The label value to be advertised as ESI Label in ESI Label Extended Community. This is included in Ethernet Auto-discovery per ES Routes advertised by a router. +// SetEsiLabel sets the uint32 value in the BgpV4EthernetSegment object +func (obj *bgpV4EthernetSegment) SetEsiLabel(value uint32) BgpV4EthernetSegment { + + obj.obj.EsiLabel = &value + return obj +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpV4EthernetSegment) Advanced() BgpRouteAdvanced { + if obj.obj.Advanced == nil { + obj.obj.Advanced = NewBgpRouteAdvanced().msg() + } + if obj.advancedHolder == nil { + obj.advancedHolder = &bgpRouteAdvanced{obj: obj.obj.Advanced} + } + return obj.advancedHolder +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpV4EthernetSegment) HasAdvanced() bool { + return obj.obj.Advanced != nil +} + +// description is TBD +// SetAdvanced sets the BgpRouteAdvanced value in the BgpV4EthernetSegment object +func (obj *bgpV4EthernetSegment) SetAdvanced(value BgpRouteAdvanced) BgpV4EthernetSegment { + + obj.advancedHolder = nil + obj.obj.Advanced = value.msg() + + return obj +} + +// Optional community settings. +// Communities returns a []BgpCommunity +func (obj *bgpV4EthernetSegment) Communities() BgpV4EthernetSegmentBgpCommunityIter { + if len(obj.obj.Communities) == 0 { + obj.obj.Communities = []*otg.BgpCommunity{} + } + if obj.communitiesHolder == nil { + obj.communitiesHolder = newBgpV4EthernetSegmentBgpCommunityIter(&obj.obj.Communities).setMsg(obj) + } + return obj.communitiesHolder +} + +type bgpV4EthernetSegmentBgpCommunityIter struct { + obj *bgpV4EthernetSegment + bgpCommunitySlice []BgpCommunity + fieldPtr *[]*otg.BgpCommunity +} + +func newBgpV4EthernetSegmentBgpCommunityIter(ptr *[]*otg.BgpCommunity) BgpV4EthernetSegmentBgpCommunityIter { + return &bgpV4EthernetSegmentBgpCommunityIter{fieldPtr: ptr} +} + +type BgpV4EthernetSegmentBgpCommunityIter interface { + setMsg(*bgpV4EthernetSegment) BgpV4EthernetSegmentBgpCommunityIter + Items() []BgpCommunity + Add() BgpCommunity + Append(items ...BgpCommunity) BgpV4EthernetSegmentBgpCommunityIter + Set(index int, newObj BgpCommunity) BgpV4EthernetSegmentBgpCommunityIter + Clear() BgpV4EthernetSegmentBgpCommunityIter + clearHolderSlice() BgpV4EthernetSegmentBgpCommunityIter + appendHolderSlice(item BgpCommunity) BgpV4EthernetSegmentBgpCommunityIter +} + +func (obj *bgpV4EthernetSegmentBgpCommunityIter) setMsg(msg *bgpV4EthernetSegment) BgpV4EthernetSegmentBgpCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4EthernetSegmentBgpCommunityIter) Items() []BgpCommunity { + return obj.bgpCommunitySlice +} + +func (obj *bgpV4EthernetSegmentBgpCommunityIter) Add() BgpCommunity { + newObj := &otg.BgpCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4EthernetSegmentBgpCommunityIter) Append(items ...BgpCommunity) BgpV4EthernetSegmentBgpCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + } + return obj +} + +func (obj *bgpV4EthernetSegmentBgpCommunityIter) Set(index int, newObj BgpCommunity) BgpV4EthernetSegmentBgpCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpCommunitySlice[index] = newObj + return obj +} +func (obj *bgpV4EthernetSegmentBgpCommunityIter) Clear() BgpV4EthernetSegmentBgpCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpCommunity{} + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpV4EthernetSegmentBgpCommunityIter) clearHolderSlice() BgpV4EthernetSegmentBgpCommunityIter { + if len(obj.bgpCommunitySlice) > 0 { + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpV4EthernetSegmentBgpCommunityIter) appendHolderSlice(item BgpCommunity) BgpV4EthernetSegmentBgpCommunityIter { + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + return obj +} + +// Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. +// ExtCommunities returns a []BgpExtCommunity +func (obj *bgpV4EthernetSegment) ExtCommunities() BgpV4EthernetSegmentBgpExtCommunityIter { + if len(obj.obj.ExtCommunities) == 0 { + obj.obj.ExtCommunities = []*otg.BgpExtCommunity{} + } + if obj.extCommunitiesHolder == nil { + obj.extCommunitiesHolder = newBgpV4EthernetSegmentBgpExtCommunityIter(&obj.obj.ExtCommunities).setMsg(obj) + } + return obj.extCommunitiesHolder +} + +type bgpV4EthernetSegmentBgpExtCommunityIter struct { + obj *bgpV4EthernetSegment + bgpExtCommunitySlice []BgpExtCommunity + fieldPtr *[]*otg.BgpExtCommunity +} + +func newBgpV4EthernetSegmentBgpExtCommunityIter(ptr *[]*otg.BgpExtCommunity) BgpV4EthernetSegmentBgpExtCommunityIter { + return &bgpV4EthernetSegmentBgpExtCommunityIter{fieldPtr: ptr} +} + +type BgpV4EthernetSegmentBgpExtCommunityIter interface { + setMsg(*bgpV4EthernetSegment) BgpV4EthernetSegmentBgpExtCommunityIter + Items() []BgpExtCommunity + Add() BgpExtCommunity + Append(items ...BgpExtCommunity) BgpV4EthernetSegmentBgpExtCommunityIter + Set(index int, newObj BgpExtCommunity) BgpV4EthernetSegmentBgpExtCommunityIter + Clear() BgpV4EthernetSegmentBgpExtCommunityIter + clearHolderSlice() BgpV4EthernetSegmentBgpExtCommunityIter + appendHolderSlice(item BgpExtCommunity) BgpV4EthernetSegmentBgpExtCommunityIter +} + +func (obj *bgpV4EthernetSegmentBgpExtCommunityIter) setMsg(msg *bgpV4EthernetSegment) BgpV4EthernetSegmentBgpExtCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpExtCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4EthernetSegmentBgpExtCommunityIter) Items() []BgpExtCommunity { + return obj.bgpExtCommunitySlice +} + +func (obj *bgpV4EthernetSegmentBgpExtCommunityIter) Add() BgpExtCommunity { + newObj := &otg.BgpExtCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpExtCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4EthernetSegmentBgpExtCommunityIter) Append(items ...BgpExtCommunity) BgpV4EthernetSegmentBgpExtCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + } + return obj +} + +func (obj *bgpV4EthernetSegmentBgpExtCommunityIter) Set(index int, newObj BgpExtCommunity) BgpV4EthernetSegmentBgpExtCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpExtCommunitySlice[index] = newObj + return obj +} +func (obj *bgpV4EthernetSegmentBgpExtCommunityIter) Clear() BgpV4EthernetSegmentBgpExtCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpExtCommunity{} + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpV4EthernetSegmentBgpExtCommunityIter) clearHolderSlice() BgpV4EthernetSegmentBgpExtCommunityIter { + if len(obj.bgpExtCommunitySlice) > 0 { + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpV4EthernetSegmentBgpExtCommunityIter) appendHolderSlice(item BgpExtCommunity) BgpV4EthernetSegmentBgpExtCommunityIter { + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + return obj +} + +// Optional AS PATH settings. +// AsPath returns a BgpAsPath +func (obj *bgpV4EthernetSegment) AsPath() BgpAsPath { + if obj.obj.AsPath == nil { + obj.obj.AsPath = NewBgpAsPath().msg() + } + if obj.asPathHolder == nil { + obj.asPathHolder = &bgpAsPath{obj: obj.obj.AsPath} + } + return obj.asPathHolder +} + +// Optional AS PATH settings. +// AsPath returns a BgpAsPath +func (obj *bgpV4EthernetSegment) HasAsPath() bool { + return obj.obj.AsPath != nil +} + +// Optional AS PATH settings. +// SetAsPath sets the BgpAsPath value in the BgpV4EthernetSegment object +func (obj *bgpV4EthernetSegment) SetAsPath(value BgpAsPath) BgpV4EthernetSegment { + + obj.asPathHolder = nil + obj.obj.AsPath = value.msg() + + return obj +} + +func (obj *bgpV4EthernetSegment) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.DfElection != nil { + + obj.DfElection().validateObj(vObj, set_default) + } + + if len(obj.obj.Evis) != 0 { + + if set_default { + obj.Evis().clearHolderSlice() + for _, item := range obj.obj.Evis { + obj.Evis().appendHolderSlice(&bgpV4EvpnEvis{obj: item}) + } + } + for _, item := range obj.Evis().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Esi != nil { + + err := obj.validateHex(obj.Esi()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpV4EthernetSegment.Esi")) + } + + } + + if obj.obj.EsiLabel != nil { + + if *obj.obj.EsiLabel > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpV4EthernetSegment.EsiLabel <= 16777215 but Got %d", *obj.obj.EsiLabel)) + } + + } + + if obj.obj.Advanced != nil { + + obj.Advanced().validateObj(vObj, set_default) + } + + if len(obj.obj.Communities) != 0 { + + if set_default { + obj.Communities().clearHolderSlice() + for _, item := range obj.obj.Communities { + obj.Communities().appendHolderSlice(&bgpCommunity{obj: item}) + } + } + for _, item := range obj.Communities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.ExtCommunities) != 0 { + + if set_default { + obj.ExtCommunities().clearHolderSlice() + for _, item := range obj.obj.ExtCommunities { + obj.ExtCommunities().appendHolderSlice(&bgpExtCommunity{obj: item}) + } + } + for _, item := range obj.ExtCommunities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.AsPath != nil { + + obj.AsPath().validateObj(vObj, set_default) + } + +} + +func (obj *bgpV4EthernetSegment) setDefault() { + if obj.obj.Esi == nil { + obj.SetEsi("00000000000000000000") + } + if obj.obj.ActiveMode == nil { + obj.SetActiveMode(BgpV4EthernetSegmentActiveMode.ALL_ACTIVE) + + } + if obj.obj.EsiLabel == nil { + obj.SetEsiLabel(0) + } + +} diff --git a/gosnappi/bgp_v4_evi_vxlan.go b/gosnappi/bgp_v4_evi_vxlan.go new file mode 100644 index 00000000..26a00dca --- /dev/null +++ b/gosnappi/bgp_v4_evi_vxlan.go @@ -0,0 +1,1054 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV4EviVxlan ***** +type bgpV4EviVxlan struct { + validation + obj *otg.BgpV4EviVxlan + marshaller marshalBgpV4EviVxlan + unMarshaller unMarshalBgpV4EviVxlan + broadcastDomainsHolder BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter + routeDistinguisherHolder BgpRouteDistinguisher + routeTargetExportHolder BgpV4EviVxlanBgpRouteTargetIter + routeTargetImportHolder BgpV4EviVxlanBgpRouteTargetIter + l3RouteTargetExportHolder BgpV4EviVxlanBgpRouteTargetIter + l3RouteTargetImportHolder BgpV4EviVxlanBgpRouteTargetIter + advancedHolder BgpRouteAdvanced + communitiesHolder BgpV4EviVxlanBgpCommunityIter + extCommunitiesHolder BgpV4EviVxlanBgpExtCommunityIter + asPathHolder BgpAsPath +} + +func NewBgpV4EviVxlan() BgpV4EviVxlan { + obj := bgpV4EviVxlan{obj: &otg.BgpV4EviVxlan{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV4EviVxlan) msg() *otg.BgpV4EviVxlan { + return obj.obj +} + +func (obj *bgpV4EviVxlan) setMsg(msg *otg.BgpV4EviVxlan) BgpV4EviVxlan { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV4EviVxlan struct { + obj *bgpV4EviVxlan +} + +type marshalBgpV4EviVxlan interface { + // ToProto marshals BgpV4EviVxlan to protobuf object *otg.BgpV4EviVxlan + ToProto() (*otg.BgpV4EviVxlan, error) + // ToPbText marshals BgpV4EviVxlan to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV4EviVxlan to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV4EviVxlan to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV4EviVxlan struct { + obj *bgpV4EviVxlan +} + +type unMarshalBgpV4EviVxlan interface { + // FromProto unmarshals BgpV4EviVxlan from protobuf object *otg.BgpV4EviVxlan + FromProto(msg *otg.BgpV4EviVxlan) (BgpV4EviVxlan, error) + // FromPbText unmarshals BgpV4EviVxlan from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV4EviVxlan from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV4EviVxlan from JSON text + FromJson(value string) error +} + +func (obj *bgpV4EviVxlan) Marshal() marshalBgpV4EviVxlan { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV4EviVxlan{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV4EviVxlan) Unmarshal() unMarshalBgpV4EviVxlan { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV4EviVxlan{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV4EviVxlan) ToProto() (*otg.BgpV4EviVxlan, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV4EviVxlan) FromProto(msg *otg.BgpV4EviVxlan) (BgpV4EviVxlan, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV4EviVxlan) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV4EviVxlan) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV4EviVxlan) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV4EviVxlan) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV4EviVxlan) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV4EviVxlan) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV4EviVxlan) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV4EviVxlan) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV4EviVxlan) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV4EviVxlan) Clone() (BgpV4EviVxlan, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV4EviVxlan() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpV4EviVxlan) setNil() { + obj.broadcastDomainsHolder = nil + obj.routeDistinguisherHolder = nil + obj.routeTargetExportHolder = nil + obj.routeTargetImportHolder = nil + obj.l3RouteTargetExportHolder = nil + obj.l3RouteTargetImportHolder = nil + obj.advancedHolder = nil + obj.communitiesHolder = nil + obj.extCommunitiesHolder = nil + obj.asPathHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpV4EviVxlan is configuration for BGP EVPN EVI. Advertises following routes - +// +// # Type 3 - Inclusive Multicast Ethernet Tag Route +// +// Type 1 - Ethernet Auto-discovery Route (Per EVI) +// +// Type 1 - Ethernet Auto-discovery Route (Per ES) +type BgpV4EviVxlan interface { + Validation + // msg marshals BgpV4EviVxlan to protobuf object *otg.BgpV4EviVxlan + // and doesn't set defaults + msg() *otg.BgpV4EviVxlan + // setMsg unmarshals BgpV4EviVxlan from protobuf object *otg.BgpV4EviVxlan + // and doesn't set defaults + setMsg(*otg.BgpV4EviVxlan) BgpV4EviVxlan + // provides marshal interface + Marshal() marshalBgpV4EviVxlan + // provides unmarshal interface + Unmarshal() unMarshalBgpV4EviVxlan + // validate validates BgpV4EviVxlan + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV4EviVxlan, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // BroadcastDomains returns BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIterIter, set in BgpV4EviVxlan + BroadcastDomains() BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter + // ReplicationType returns BgpV4EviVxlanReplicationTypeEnum, set in BgpV4EviVxlan + ReplicationType() BgpV4EviVxlanReplicationTypeEnum + // SetReplicationType assigns BgpV4EviVxlanReplicationTypeEnum provided by user to BgpV4EviVxlan + SetReplicationType(value BgpV4EviVxlanReplicationTypeEnum) BgpV4EviVxlan + // HasReplicationType checks if ReplicationType has been set in BgpV4EviVxlan + HasReplicationType() bool + // PmsiLabel returns uint32, set in BgpV4EviVxlan. + PmsiLabel() uint32 + // SetPmsiLabel assigns uint32 provided by user to BgpV4EviVxlan + SetPmsiLabel(value uint32) BgpV4EviVxlan + // HasPmsiLabel checks if PmsiLabel has been set in BgpV4EviVxlan + HasPmsiLabel() bool + // AdLabel returns uint32, set in BgpV4EviVxlan. + AdLabel() uint32 + // SetAdLabel assigns uint32 provided by user to BgpV4EviVxlan + SetAdLabel(value uint32) BgpV4EviVxlan + // HasAdLabel checks if AdLabel has been set in BgpV4EviVxlan + HasAdLabel() bool + // RouteDistinguisher returns BgpRouteDistinguisher, set in BgpV4EviVxlan. + // BgpRouteDistinguisher is bGP Route Distinguisher. + RouteDistinguisher() BgpRouteDistinguisher + // SetRouteDistinguisher assigns BgpRouteDistinguisher provided by user to BgpV4EviVxlan. + // BgpRouteDistinguisher is bGP Route Distinguisher. + SetRouteDistinguisher(value BgpRouteDistinguisher) BgpV4EviVxlan + // HasRouteDistinguisher checks if RouteDistinguisher has been set in BgpV4EviVxlan + HasRouteDistinguisher() bool + // RouteTargetExport returns BgpV4EviVxlanBgpRouteTargetIterIter, set in BgpV4EviVxlan + RouteTargetExport() BgpV4EviVxlanBgpRouteTargetIter + // RouteTargetImport returns BgpV4EviVxlanBgpRouteTargetIterIter, set in BgpV4EviVxlan + RouteTargetImport() BgpV4EviVxlanBgpRouteTargetIter + // L3RouteTargetExport returns BgpV4EviVxlanBgpRouteTargetIterIter, set in BgpV4EviVxlan + L3RouteTargetExport() BgpV4EviVxlanBgpRouteTargetIter + // L3RouteTargetImport returns BgpV4EviVxlanBgpRouteTargetIterIter, set in BgpV4EviVxlan + L3RouteTargetImport() BgpV4EviVxlanBgpRouteTargetIter + // Advanced returns BgpRouteAdvanced, set in BgpV4EviVxlan. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + Advanced() BgpRouteAdvanced + // SetAdvanced assigns BgpRouteAdvanced provided by user to BgpV4EviVxlan. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + SetAdvanced(value BgpRouteAdvanced) BgpV4EviVxlan + // HasAdvanced checks if Advanced has been set in BgpV4EviVxlan + HasAdvanced() bool + // Communities returns BgpV4EviVxlanBgpCommunityIterIter, set in BgpV4EviVxlan + Communities() BgpV4EviVxlanBgpCommunityIter + // ExtCommunities returns BgpV4EviVxlanBgpExtCommunityIterIter, set in BgpV4EviVxlan + ExtCommunities() BgpV4EviVxlanBgpExtCommunityIter + // AsPath returns BgpAsPath, set in BgpV4EviVxlan. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + AsPath() BgpAsPath + // SetAsPath assigns BgpAsPath provided by user to BgpV4EviVxlan. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + SetAsPath(value BgpAsPath) BgpV4EviVxlan + // HasAsPath checks if AsPath has been set in BgpV4EviVxlan + HasAsPath() bool + setNil() +} + +// This contains the list of Broadcast Domains to be configured per EVI. +// BroadcastDomains returns a []BgpV4EviVxlanBroadcastDomain +func (obj *bgpV4EviVxlan) BroadcastDomains() BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter { + if len(obj.obj.BroadcastDomains) == 0 { + obj.obj.BroadcastDomains = []*otg.BgpV4EviVxlanBroadcastDomain{} + } + if obj.broadcastDomainsHolder == nil { + obj.broadcastDomainsHolder = newBgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter(&obj.obj.BroadcastDomains).setMsg(obj) + } + return obj.broadcastDomainsHolder +} + +type bgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter struct { + obj *bgpV4EviVxlan + bgpV4EviVxlanBroadcastDomainSlice []BgpV4EviVxlanBroadcastDomain + fieldPtr *[]*otg.BgpV4EviVxlanBroadcastDomain +} + +func newBgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter(ptr *[]*otg.BgpV4EviVxlanBroadcastDomain) BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter { + return &bgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter{fieldPtr: ptr} +} + +type BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter interface { + setMsg(*bgpV4EviVxlan) BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter + Items() []BgpV4EviVxlanBroadcastDomain + Add() BgpV4EviVxlanBroadcastDomain + Append(items ...BgpV4EviVxlanBroadcastDomain) BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter + Set(index int, newObj BgpV4EviVxlanBroadcastDomain) BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter + Clear() BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter + clearHolderSlice() BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter + appendHolderSlice(item BgpV4EviVxlanBroadcastDomain) BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter +} + +func (obj *bgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter) setMsg(msg *bgpV4EviVxlan) BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpV4EviVxlanBroadcastDomain{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter) Items() []BgpV4EviVxlanBroadcastDomain { + return obj.bgpV4EviVxlanBroadcastDomainSlice +} + +func (obj *bgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter) Add() BgpV4EviVxlanBroadcastDomain { + newObj := &otg.BgpV4EviVxlanBroadcastDomain{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpV4EviVxlanBroadcastDomain{obj: newObj} + newLibObj.setDefault() + obj.bgpV4EviVxlanBroadcastDomainSlice = append(obj.bgpV4EviVxlanBroadcastDomainSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter) Append(items ...BgpV4EviVxlanBroadcastDomain) BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpV4EviVxlanBroadcastDomainSlice = append(obj.bgpV4EviVxlanBroadcastDomainSlice, item) + } + return obj +} + +func (obj *bgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter) Set(index int, newObj BgpV4EviVxlanBroadcastDomain) BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpV4EviVxlanBroadcastDomainSlice[index] = newObj + return obj +} +func (obj *bgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter) Clear() BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpV4EviVxlanBroadcastDomain{} + obj.bgpV4EviVxlanBroadcastDomainSlice = []BgpV4EviVxlanBroadcastDomain{} + } + return obj +} +func (obj *bgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter) clearHolderSlice() BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter { + if len(obj.bgpV4EviVxlanBroadcastDomainSlice) > 0 { + obj.bgpV4EviVxlanBroadcastDomainSlice = []BgpV4EviVxlanBroadcastDomain{} + } + return obj +} +func (obj *bgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter) appendHolderSlice(item BgpV4EviVxlanBroadcastDomain) BgpV4EviVxlanBgpV4EviVxlanBroadcastDomainIter { + obj.bgpV4EviVxlanBroadcastDomainSlice = append(obj.bgpV4EviVxlanBroadcastDomainSlice, item) + return obj +} + +type BgpV4EviVxlanReplicationTypeEnum string + +// Enum of ReplicationType on BgpV4EviVxlan +var BgpV4EviVxlanReplicationType = struct { + INGRESS_REPLICATION BgpV4EviVxlanReplicationTypeEnum +}{ + INGRESS_REPLICATION: BgpV4EviVxlanReplicationTypeEnum("ingress_replication"), +} + +func (obj *bgpV4EviVxlan) ReplicationType() BgpV4EviVxlanReplicationTypeEnum { + return BgpV4EviVxlanReplicationTypeEnum(obj.obj.ReplicationType.Enum().String()) +} + +// This model only supports Ingress Replication +// ReplicationType returns a string +func (obj *bgpV4EviVxlan) HasReplicationType() bool { + return obj.obj.ReplicationType != nil +} + +func (obj *bgpV4EviVxlan) SetReplicationType(value BgpV4EviVxlanReplicationTypeEnum) BgpV4EviVxlan { + intValue, ok := otg.BgpV4EviVxlan_ReplicationType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpV4EviVxlanReplicationTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpV4EviVxlan_ReplicationType_Enum(intValue) + obj.obj.ReplicationType = &enumValue + + return obj +} + +// Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. +// PmsiLabel returns a uint32 +func (obj *bgpV4EviVxlan) PmsiLabel() uint32 { + + return *obj.obj.PmsiLabel + +} + +// Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. +// PmsiLabel returns a uint32 +func (obj *bgpV4EviVxlan) HasPmsiLabel() bool { + return obj.obj.PmsiLabel != nil +} + +// Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. +// SetPmsiLabel sets the uint32 value in the BgpV4EviVxlan object +func (obj *bgpV4EviVxlan) SetPmsiLabel(value uint32) BgpV4EviVxlan { + + obj.obj.PmsiLabel = &value + return obj +} + +// The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet Auto-discovery Route per +// AdLabel returns a uint32 +func (obj *bgpV4EviVxlan) AdLabel() uint32 { + + return *obj.obj.AdLabel + +} + +// The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet Auto-discovery Route per +// AdLabel returns a uint32 +func (obj *bgpV4EviVxlan) HasAdLabel() bool { + return obj.obj.AdLabel != nil +} + +// The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet Auto-discovery Route per +// SetAdLabel sets the uint32 value in the BgpV4EviVxlan object +func (obj *bgpV4EviVxlan) SetAdLabel(value uint32) BgpV4EviVxlan { + + obj.obj.AdLabel = &value + return obj +} + +// Colon separated Extended Community value of 6 Bytes - "AS number: Value" identifying an EVI. Example - for the as_2octet "60005:100". +// RouteDistinguisher returns a BgpRouteDistinguisher +func (obj *bgpV4EviVxlan) RouteDistinguisher() BgpRouteDistinguisher { + if obj.obj.RouteDistinguisher == nil { + obj.obj.RouteDistinguisher = NewBgpRouteDistinguisher().msg() + } + if obj.routeDistinguisherHolder == nil { + obj.routeDistinguisherHolder = &bgpRouteDistinguisher{obj: obj.obj.RouteDistinguisher} + } + return obj.routeDistinguisherHolder +} + +// Colon separated Extended Community value of 6 Bytes - "AS number: Value" identifying an EVI. Example - for the as_2octet "60005:100". +// RouteDistinguisher returns a BgpRouteDistinguisher +func (obj *bgpV4EviVxlan) HasRouteDistinguisher() bool { + return obj.obj.RouteDistinguisher != nil +} + +// Colon separated Extended Community value of 6 Bytes - "AS number: Value" identifying an EVI. Example - for the as_2octet "60005:100". +// SetRouteDistinguisher sets the BgpRouteDistinguisher value in the BgpV4EviVxlan object +func (obj *bgpV4EviVxlan) SetRouteDistinguisher(value BgpRouteDistinguisher) BgpV4EviVxlan { + + obj.routeDistinguisherHolder = nil + obj.obj.RouteDistinguisher = value.msg() + + return obj +} + +// List of Layer 2 Virtual Network Identifier (L2VNI) export targets associated with this EVI. +// RouteTargetExport returns a []BgpRouteTarget +func (obj *bgpV4EviVxlan) RouteTargetExport() BgpV4EviVxlanBgpRouteTargetIter { + if len(obj.obj.RouteTargetExport) == 0 { + obj.obj.RouteTargetExport = []*otg.BgpRouteTarget{} + } + if obj.routeTargetExportHolder == nil { + obj.routeTargetExportHolder = newBgpV4EviVxlanBgpRouteTargetIter(&obj.obj.RouteTargetExport).setMsg(obj) + } + return obj.routeTargetExportHolder +} + +type bgpV4EviVxlanBgpRouteTargetIter struct { + obj *bgpV4EviVxlan + bgpRouteTargetSlice []BgpRouteTarget + fieldPtr *[]*otg.BgpRouteTarget +} + +func newBgpV4EviVxlanBgpRouteTargetIter(ptr *[]*otg.BgpRouteTarget) BgpV4EviVxlanBgpRouteTargetIter { + return &bgpV4EviVxlanBgpRouteTargetIter{fieldPtr: ptr} +} + +type BgpV4EviVxlanBgpRouteTargetIter interface { + setMsg(*bgpV4EviVxlan) BgpV4EviVxlanBgpRouteTargetIter + Items() []BgpRouteTarget + Add() BgpRouteTarget + Append(items ...BgpRouteTarget) BgpV4EviVxlanBgpRouteTargetIter + Set(index int, newObj BgpRouteTarget) BgpV4EviVxlanBgpRouteTargetIter + Clear() BgpV4EviVxlanBgpRouteTargetIter + clearHolderSlice() BgpV4EviVxlanBgpRouteTargetIter + appendHolderSlice(item BgpRouteTarget) BgpV4EviVxlanBgpRouteTargetIter +} + +func (obj *bgpV4EviVxlanBgpRouteTargetIter) setMsg(msg *bgpV4EviVxlan) BgpV4EviVxlanBgpRouteTargetIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpRouteTarget{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4EviVxlanBgpRouteTargetIter) Items() []BgpRouteTarget { + return obj.bgpRouteTargetSlice +} + +func (obj *bgpV4EviVxlanBgpRouteTargetIter) Add() BgpRouteTarget { + newObj := &otg.BgpRouteTarget{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpRouteTarget{obj: newObj} + newLibObj.setDefault() + obj.bgpRouteTargetSlice = append(obj.bgpRouteTargetSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4EviVxlanBgpRouteTargetIter) Append(items ...BgpRouteTarget) BgpV4EviVxlanBgpRouteTargetIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpRouteTargetSlice = append(obj.bgpRouteTargetSlice, item) + } + return obj +} + +func (obj *bgpV4EviVxlanBgpRouteTargetIter) Set(index int, newObj BgpRouteTarget) BgpV4EviVxlanBgpRouteTargetIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpRouteTargetSlice[index] = newObj + return obj +} +func (obj *bgpV4EviVxlanBgpRouteTargetIter) Clear() BgpV4EviVxlanBgpRouteTargetIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpRouteTarget{} + obj.bgpRouteTargetSlice = []BgpRouteTarget{} + } + return obj +} +func (obj *bgpV4EviVxlanBgpRouteTargetIter) clearHolderSlice() BgpV4EviVxlanBgpRouteTargetIter { + if len(obj.bgpRouteTargetSlice) > 0 { + obj.bgpRouteTargetSlice = []BgpRouteTarget{} + } + return obj +} +func (obj *bgpV4EviVxlanBgpRouteTargetIter) appendHolderSlice(item BgpRouteTarget) BgpV4EviVxlanBgpRouteTargetIter { + obj.bgpRouteTargetSlice = append(obj.bgpRouteTargetSlice, item) + return obj +} + +// List of L2VNI import targets associated with this EVI. +// RouteTargetImport returns a []BgpRouteTarget +func (obj *bgpV4EviVxlan) RouteTargetImport() BgpV4EviVxlanBgpRouteTargetIter { + if len(obj.obj.RouteTargetImport) == 0 { + obj.obj.RouteTargetImport = []*otg.BgpRouteTarget{} + } + if obj.routeTargetImportHolder == nil { + obj.routeTargetImportHolder = newBgpV4EviVxlanBgpRouteTargetIter(&obj.obj.RouteTargetImport).setMsg(obj) + } + return obj.routeTargetImportHolder +} + +// List of Layer 3 Virtual Network Identifier (L3VNI) Export Route Targets. +// L3RouteTargetExport returns a []BgpRouteTarget +func (obj *bgpV4EviVxlan) L3RouteTargetExport() BgpV4EviVxlanBgpRouteTargetIter { + if len(obj.obj.L3RouteTargetExport) == 0 { + obj.obj.L3RouteTargetExport = []*otg.BgpRouteTarget{} + } + if obj.l3RouteTargetExportHolder == nil { + obj.l3RouteTargetExportHolder = newBgpV4EviVxlanBgpRouteTargetIter(&obj.obj.L3RouteTargetExport).setMsg(obj) + } + return obj.l3RouteTargetExportHolder +} + +// List of L3VNI Import Route Targets. +// L3RouteTargetImport returns a []BgpRouteTarget +func (obj *bgpV4EviVxlan) L3RouteTargetImport() BgpV4EviVxlanBgpRouteTargetIter { + if len(obj.obj.L3RouteTargetImport) == 0 { + obj.obj.L3RouteTargetImport = []*otg.BgpRouteTarget{} + } + if obj.l3RouteTargetImportHolder == nil { + obj.l3RouteTargetImportHolder = newBgpV4EviVxlanBgpRouteTargetIter(&obj.obj.L3RouteTargetImport).setMsg(obj) + } + return obj.l3RouteTargetImportHolder +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpV4EviVxlan) Advanced() BgpRouteAdvanced { + if obj.obj.Advanced == nil { + obj.obj.Advanced = NewBgpRouteAdvanced().msg() + } + if obj.advancedHolder == nil { + obj.advancedHolder = &bgpRouteAdvanced{obj: obj.obj.Advanced} + } + return obj.advancedHolder +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpV4EviVxlan) HasAdvanced() bool { + return obj.obj.Advanced != nil +} + +// description is TBD +// SetAdvanced sets the BgpRouteAdvanced value in the BgpV4EviVxlan object +func (obj *bgpV4EviVxlan) SetAdvanced(value BgpRouteAdvanced) BgpV4EviVxlan { + + obj.advancedHolder = nil + obj.obj.Advanced = value.msg() + + return obj +} + +// Optional community settings. +// Communities returns a []BgpCommunity +func (obj *bgpV4EviVxlan) Communities() BgpV4EviVxlanBgpCommunityIter { + if len(obj.obj.Communities) == 0 { + obj.obj.Communities = []*otg.BgpCommunity{} + } + if obj.communitiesHolder == nil { + obj.communitiesHolder = newBgpV4EviVxlanBgpCommunityIter(&obj.obj.Communities).setMsg(obj) + } + return obj.communitiesHolder +} + +type bgpV4EviVxlanBgpCommunityIter struct { + obj *bgpV4EviVxlan + bgpCommunitySlice []BgpCommunity + fieldPtr *[]*otg.BgpCommunity +} + +func newBgpV4EviVxlanBgpCommunityIter(ptr *[]*otg.BgpCommunity) BgpV4EviVxlanBgpCommunityIter { + return &bgpV4EviVxlanBgpCommunityIter{fieldPtr: ptr} +} + +type BgpV4EviVxlanBgpCommunityIter interface { + setMsg(*bgpV4EviVxlan) BgpV4EviVxlanBgpCommunityIter + Items() []BgpCommunity + Add() BgpCommunity + Append(items ...BgpCommunity) BgpV4EviVxlanBgpCommunityIter + Set(index int, newObj BgpCommunity) BgpV4EviVxlanBgpCommunityIter + Clear() BgpV4EviVxlanBgpCommunityIter + clearHolderSlice() BgpV4EviVxlanBgpCommunityIter + appendHolderSlice(item BgpCommunity) BgpV4EviVxlanBgpCommunityIter +} + +func (obj *bgpV4EviVxlanBgpCommunityIter) setMsg(msg *bgpV4EviVxlan) BgpV4EviVxlanBgpCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4EviVxlanBgpCommunityIter) Items() []BgpCommunity { + return obj.bgpCommunitySlice +} + +func (obj *bgpV4EviVxlanBgpCommunityIter) Add() BgpCommunity { + newObj := &otg.BgpCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4EviVxlanBgpCommunityIter) Append(items ...BgpCommunity) BgpV4EviVxlanBgpCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + } + return obj +} + +func (obj *bgpV4EviVxlanBgpCommunityIter) Set(index int, newObj BgpCommunity) BgpV4EviVxlanBgpCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpCommunitySlice[index] = newObj + return obj +} +func (obj *bgpV4EviVxlanBgpCommunityIter) Clear() BgpV4EviVxlanBgpCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpCommunity{} + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpV4EviVxlanBgpCommunityIter) clearHolderSlice() BgpV4EviVxlanBgpCommunityIter { + if len(obj.bgpCommunitySlice) > 0 { + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpV4EviVxlanBgpCommunityIter) appendHolderSlice(item BgpCommunity) BgpV4EviVxlanBgpCommunityIter { + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + return obj +} + +// Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. +// ExtCommunities returns a []BgpExtCommunity +func (obj *bgpV4EviVxlan) ExtCommunities() BgpV4EviVxlanBgpExtCommunityIter { + if len(obj.obj.ExtCommunities) == 0 { + obj.obj.ExtCommunities = []*otg.BgpExtCommunity{} + } + if obj.extCommunitiesHolder == nil { + obj.extCommunitiesHolder = newBgpV4EviVxlanBgpExtCommunityIter(&obj.obj.ExtCommunities).setMsg(obj) + } + return obj.extCommunitiesHolder +} + +type bgpV4EviVxlanBgpExtCommunityIter struct { + obj *bgpV4EviVxlan + bgpExtCommunitySlice []BgpExtCommunity + fieldPtr *[]*otg.BgpExtCommunity +} + +func newBgpV4EviVxlanBgpExtCommunityIter(ptr *[]*otg.BgpExtCommunity) BgpV4EviVxlanBgpExtCommunityIter { + return &bgpV4EviVxlanBgpExtCommunityIter{fieldPtr: ptr} +} + +type BgpV4EviVxlanBgpExtCommunityIter interface { + setMsg(*bgpV4EviVxlan) BgpV4EviVxlanBgpExtCommunityIter + Items() []BgpExtCommunity + Add() BgpExtCommunity + Append(items ...BgpExtCommunity) BgpV4EviVxlanBgpExtCommunityIter + Set(index int, newObj BgpExtCommunity) BgpV4EviVxlanBgpExtCommunityIter + Clear() BgpV4EviVxlanBgpExtCommunityIter + clearHolderSlice() BgpV4EviVxlanBgpExtCommunityIter + appendHolderSlice(item BgpExtCommunity) BgpV4EviVxlanBgpExtCommunityIter +} + +func (obj *bgpV4EviVxlanBgpExtCommunityIter) setMsg(msg *bgpV4EviVxlan) BgpV4EviVxlanBgpExtCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpExtCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4EviVxlanBgpExtCommunityIter) Items() []BgpExtCommunity { + return obj.bgpExtCommunitySlice +} + +func (obj *bgpV4EviVxlanBgpExtCommunityIter) Add() BgpExtCommunity { + newObj := &otg.BgpExtCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpExtCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4EviVxlanBgpExtCommunityIter) Append(items ...BgpExtCommunity) BgpV4EviVxlanBgpExtCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + } + return obj +} + +func (obj *bgpV4EviVxlanBgpExtCommunityIter) Set(index int, newObj BgpExtCommunity) BgpV4EviVxlanBgpExtCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpExtCommunitySlice[index] = newObj + return obj +} +func (obj *bgpV4EviVxlanBgpExtCommunityIter) Clear() BgpV4EviVxlanBgpExtCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpExtCommunity{} + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpV4EviVxlanBgpExtCommunityIter) clearHolderSlice() BgpV4EviVxlanBgpExtCommunityIter { + if len(obj.bgpExtCommunitySlice) > 0 { + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpV4EviVxlanBgpExtCommunityIter) appendHolderSlice(item BgpExtCommunity) BgpV4EviVxlanBgpExtCommunityIter { + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + return obj +} + +// Optional AS PATH settings. +// AsPath returns a BgpAsPath +func (obj *bgpV4EviVxlan) AsPath() BgpAsPath { + if obj.obj.AsPath == nil { + obj.obj.AsPath = NewBgpAsPath().msg() + } + if obj.asPathHolder == nil { + obj.asPathHolder = &bgpAsPath{obj: obj.obj.AsPath} + } + return obj.asPathHolder +} + +// Optional AS PATH settings. +// AsPath returns a BgpAsPath +func (obj *bgpV4EviVxlan) HasAsPath() bool { + return obj.obj.AsPath != nil +} + +// Optional AS PATH settings. +// SetAsPath sets the BgpAsPath value in the BgpV4EviVxlan object +func (obj *bgpV4EviVxlan) SetAsPath(value BgpAsPath) BgpV4EviVxlan { + + obj.asPathHolder = nil + obj.obj.AsPath = value.msg() + + return obj +} + +func (obj *bgpV4EviVxlan) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.BroadcastDomains) != 0 { + + if set_default { + obj.BroadcastDomains().clearHolderSlice() + for _, item := range obj.obj.BroadcastDomains { + obj.BroadcastDomains().appendHolderSlice(&bgpV4EviVxlanBroadcastDomain{obj: item}) + } + } + for _, item := range obj.BroadcastDomains().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.PmsiLabel != nil { + + if *obj.obj.PmsiLabel > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpV4EviVxlan.PmsiLabel <= 16777215 but Got %d", *obj.obj.PmsiLabel)) + } + + } + + if obj.obj.AdLabel != nil { + + if *obj.obj.AdLabel > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpV4EviVxlan.AdLabel <= 16777215 but Got %d", *obj.obj.AdLabel)) + } + + } + + if obj.obj.RouteDistinguisher != nil { + + obj.RouteDistinguisher().validateObj(vObj, set_default) + } + + if len(obj.obj.RouteTargetExport) != 0 { + + if set_default { + obj.RouteTargetExport().clearHolderSlice() + for _, item := range obj.obj.RouteTargetExport { + obj.RouteTargetExport().appendHolderSlice(&bgpRouteTarget{obj: item}) + } + } + for _, item := range obj.RouteTargetExport().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.RouteTargetImport) != 0 { + + if set_default { + obj.RouteTargetImport().clearHolderSlice() + for _, item := range obj.obj.RouteTargetImport { + obj.RouteTargetImport().appendHolderSlice(&bgpRouteTarget{obj: item}) + } + } + for _, item := range obj.RouteTargetImport().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.L3RouteTargetExport) != 0 { + + if set_default { + obj.L3RouteTargetExport().clearHolderSlice() + for _, item := range obj.obj.L3RouteTargetExport { + obj.L3RouteTargetExport().appendHolderSlice(&bgpRouteTarget{obj: item}) + } + } + for _, item := range obj.L3RouteTargetExport().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.L3RouteTargetImport) != 0 { + + if set_default { + obj.L3RouteTargetImport().clearHolderSlice() + for _, item := range obj.obj.L3RouteTargetImport { + obj.L3RouteTargetImport().appendHolderSlice(&bgpRouteTarget{obj: item}) + } + } + for _, item := range obj.L3RouteTargetImport().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Advanced != nil { + + obj.Advanced().validateObj(vObj, set_default) + } + + if len(obj.obj.Communities) != 0 { + + if set_default { + obj.Communities().clearHolderSlice() + for _, item := range obj.obj.Communities { + obj.Communities().appendHolderSlice(&bgpCommunity{obj: item}) + } + } + for _, item := range obj.Communities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.ExtCommunities) != 0 { + + if set_default { + obj.ExtCommunities().clearHolderSlice() + for _, item := range obj.obj.ExtCommunities { + obj.ExtCommunities().appendHolderSlice(&bgpExtCommunity{obj: item}) + } + } + for _, item := range obj.ExtCommunities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.AsPath != nil { + + obj.AsPath().validateObj(vObj, set_default) + } + +} + +func (obj *bgpV4EviVxlan) setDefault() { + if obj.obj.ReplicationType == nil { + obj.SetReplicationType(BgpV4EviVxlanReplicationType.INGRESS_REPLICATION) + + } + if obj.obj.PmsiLabel == nil { + obj.SetPmsiLabel(16) + } + if obj.obj.AdLabel == nil { + obj.SetAdLabel(0) + } + +} diff --git a/gosnappi/bgp_v4_evi_vxlan_broadcast_domain.go b/gosnappi/bgp_v4_evi_vxlan_broadcast_domain.go new file mode 100644 index 00000000..5fa2fb30 --- /dev/null +++ b/gosnappi/bgp_v4_evi_vxlan_broadcast_domain.go @@ -0,0 +1,455 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV4EviVxlanBroadcastDomain ***** +type bgpV4EviVxlanBroadcastDomain struct { + validation + obj *otg.BgpV4EviVxlanBroadcastDomain + marshaller marshalBgpV4EviVxlanBroadcastDomain + unMarshaller unMarshalBgpV4EviVxlanBroadcastDomain + cmacIpRangeHolder BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter +} + +func NewBgpV4EviVxlanBroadcastDomain() BgpV4EviVxlanBroadcastDomain { + obj := bgpV4EviVxlanBroadcastDomain{obj: &otg.BgpV4EviVxlanBroadcastDomain{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV4EviVxlanBroadcastDomain) msg() *otg.BgpV4EviVxlanBroadcastDomain { + return obj.obj +} + +func (obj *bgpV4EviVxlanBroadcastDomain) setMsg(msg *otg.BgpV4EviVxlanBroadcastDomain) BgpV4EviVxlanBroadcastDomain { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV4EviVxlanBroadcastDomain struct { + obj *bgpV4EviVxlanBroadcastDomain +} + +type marshalBgpV4EviVxlanBroadcastDomain interface { + // ToProto marshals BgpV4EviVxlanBroadcastDomain to protobuf object *otg.BgpV4EviVxlanBroadcastDomain + ToProto() (*otg.BgpV4EviVxlanBroadcastDomain, error) + // ToPbText marshals BgpV4EviVxlanBroadcastDomain to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV4EviVxlanBroadcastDomain to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV4EviVxlanBroadcastDomain to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV4EviVxlanBroadcastDomain struct { + obj *bgpV4EviVxlanBroadcastDomain +} + +type unMarshalBgpV4EviVxlanBroadcastDomain interface { + // FromProto unmarshals BgpV4EviVxlanBroadcastDomain from protobuf object *otg.BgpV4EviVxlanBroadcastDomain + FromProto(msg *otg.BgpV4EviVxlanBroadcastDomain) (BgpV4EviVxlanBroadcastDomain, error) + // FromPbText unmarshals BgpV4EviVxlanBroadcastDomain from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV4EviVxlanBroadcastDomain from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV4EviVxlanBroadcastDomain from JSON text + FromJson(value string) error +} + +func (obj *bgpV4EviVxlanBroadcastDomain) Marshal() marshalBgpV4EviVxlanBroadcastDomain { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV4EviVxlanBroadcastDomain{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV4EviVxlanBroadcastDomain) Unmarshal() unMarshalBgpV4EviVxlanBroadcastDomain { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV4EviVxlanBroadcastDomain{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV4EviVxlanBroadcastDomain) ToProto() (*otg.BgpV4EviVxlanBroadcastDomain, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV4EviVxlanBroadcastDomain) FromProto(msg *otg.BgpV4EviVxlanBroadcastDomain) (BgpV4EviVxlanBroadcastDomain, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV4EviVxlanBroadcastDomain) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV4EviVxlanBroadcastDomain) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV4EviVxlanBroadcastDomain) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV4EviVxlanBroadcastDomain) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV4EviVxlanBroadcastDomain) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV4EviVxlanBroadcastDomain) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV4EviVxlanBroadcastDomain) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV4EviVxlanBroadcastDomain) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV4EviVxlanBroadcastDomain) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV4EviVxlanBroadcastDomain) Clone() (BgpV4EviVxlanBroadcastDomain, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV4EviVxlanBroadcastDomain() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpV4EviVxlanBroadcastDomain) setNil() { + obj.cmacIpRangeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpV4EviVxlanBroadcastDomain is configuration for Broadcast Domains per EVI. +type BgpV4EviVxlanBroadcastDomain interface { + Validation + // msg marshals BgpV4EviVxlanBroadcastDomain to protobuf object *otg.BgpV4EviVxlanBroadcastDomain + // and doesn't set defaults + msg() *otg.BgpV4EviVxlanBroadcastDomain + // setMsg unmarshals BgpV4EviVxlanBroadcastDomain from protobuf object *otg.BgpV4EviVxlanBroadcastDomain + // and doesn't set defaults + setMsg(*otg.BgpV4EviVxlanBroadcastDomain) BgpV4EviVxlanBroadcastDomain + // provides marshal interface + Marshal() marshalBgpV4EviVxlanBroadcastDomain + // provides unmarshal interface + Unmarshal() unMarshalBgpV4EviVxlanBroadcastDomain + // validate validates BgpV4EviVxlanBroadcastDomain + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV4EviVxlanBroadcastDomain, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // CmacIpRange returns BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIterIter, set in BgpV4EviVxlanBroadcastDomain + CmacIpRange() BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter + // EthernetTagId returns uint32, set in BgpV4EviVxlanBroadcastDomain. + EthernetTagId() uint32 + // SetEthernetTagId assigns uint32 provided by user to BgpV4EviVxlanBroadcastDomain + SetEthernetTagId(value uint32) BgpV4EviVxlanBroadcastDomain + // HasEthernetTagId checks if EthernetTagId has been set in BgpV4EviVxlanBroadcastDomain + HasEthernetTagId() bool + // VlanAwareService returns bool, set in BgpV4EviVxlanBroadcastDomain. + VlanAwareService() bool + // SetVlanAwareService assigns bool provided by user to BgpV4EviVxlanBroadcastDomain + SetVlanAwareService(value bool) BgpV4EviVxlanBroadcastDomain + // HasVlanAwareService checks if VlanAwareService has been set in BgpV4EviVxlanBroadcastDomain + HasVlanAwareService() bool + setNil() +} + +// This contains the list of Customer MAC/IP Ranges to be configured per Broadcast Domain. +// +// Advertises following route - +// Type 2 - MAC/IP Advertisement Route. +// CmacIpRange returns a []BgpCMacIpRange +func (obj *bgpV4EviVxlanBroadcastDomain) CmacIpRange() BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter { + if len(obj.obj.CmacIpRange) == 0 { + obj.obj.CmacIpRange = []*otg.BgpCMacIpRange{} + } + if obj.cmacIpRangeHolder == nil { + obj.cmacIpRangeHolder = newBgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter(&obj.obj.CmacIpRange).setMsg(obj) + } + return obj.cmacIpRangeHolder +} + +type bgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter struct { + obj *bgpV4EviVxlanBroadcastDomain + bgpCMacIpRangeSlice []BgpCMacIpRange + fieldPtr *[]*otg.BgpCMacIpRange +} + +func newBgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter(ptr *[]*otg.BgpCMacIpRange) BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter { + return &bgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter{fieldPtr: ptr} +} + +type BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter interface { + setMsg(*bgpV4EviVxlanBroadcastDomain) BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter + Items() []BgpCMacIpRange + Add() BgpCMacIpRange + Append(items ...BgpCMacIpRange) BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter + Set(index int, newObj BgpCMacIpRange) BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter + Clear() BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter + clearHolderSlice() BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter + appendHolderSlice(item BgpCMacIpRange) BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter +} + +func (obj *bgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter) setMsg(msg *bgpV4EviVxlanBroadcastDomain) BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpCMacIpRange{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter) Items() []BgpCMacIpRange { + return obj.bgpCMacIpRangeSlice +} + +func (obj *bgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter) Add() BgpCMacIpRange { + newObj := &otg.BgpCMacIpRange{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpCMacIpRange{obj: newObj} + newLibObj.setDefault() + obj.bgpCMacIpRangeSlice = append(obj.bgpCMacIpRangeSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter) Append(items ...BgpCMacIpRange) BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpCMacIpRangeSlice = append(obj.bgpCMacIpRangeSlice, item) + } + return obj +} + +func (obj *bgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter) Set(index int, newObj BgpCMacIpRange) BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpCMacIpRangeSlice[index] = newObj + return obj +} +func (obj *bgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter) Clear() BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpCMacIpRange{} + obj.bgpCMacIpRangeSlice = []BgpCMacIpRange{} + } + return obj +} +func (obj *bgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter) clearHolderSlice() BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter { + if len(obj.bgpCMacIpRangeSlice) > 0 { + obj.bgpCMacIpRangeSlice = []BgpCMacIpRange{} + } + return obj +} +func (obj *bgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter) appendHolderSlice(item BgpCMacIpRange) BgpV4EviVxlanBroadcastDomainBgpCMacIpRangeIter { + obj.bgpCMacIpRangeSlice = append(obj.bgpCMacIpRangeSlice, item) + return obj +} + +// The Ethernet Tag ID of the Broadcast Domain. +// EthernetTagId returns a uint32 +func (obj *bgpV4EviVxlanBroadcastDomain) EthernetTagId() uint32 { + + return *obj.obj.EthernetTagId + +} + +// The Ethernet Tag ID of the Broadcast Domain. +// EthernetTagId returns a uint32 +func (obj *bgpV4EviVxlanBroadcastDomain) HasEthernetTagId() bool { + return obj.obj.EthernetTagId != nil +} + +// The Ethernet Tag ID of the Broadcast Domain. +// SetEthernetTagId sets the uint32 value in the BgpV4EviVxlanBroadcastDomain object +func (obj *bgpV4EviVxlanBroadcastDomain) SetEthernetTagId(value uint32) BgpV4EviVxlanBroadcastDomain { + + obj.obj.EthernetTagId = &value + return obj +} + +// VLAN-Aware service to be enabled or disabled. +// VlanAwareService returns a bool +func (obj *bgpV4EviVxlanBroadcastDomain) VlanAwareService() bool { + + return *obj.obj.VlanAwareService + +} + +// VLAN-Aware service to be enabled or disabled. +// VlanAwareService returns a bool +func (obj *bgpV4EviVxlanBroadcastDomain) HasVlanAwareService() bool { + return obj.obj.VlanAwareService != nil +} + +// VLAN-Aware service to be enabled or disabled. +// SetVlanAwareService sets the bool value in the BgpV4EviVxlanBroadcastDomain object +func (obj *bgpV4EviVxlanBroadcastDomain) SetVlanAwareService(value bool) BgpV4EviVxlanBroadcastDomain { + + obj.obj.VlanAwareService = &value + return obj +} + +func (obj *bgpV4EviVxlanBroadcastDomain) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.CmacIpRange) != 0 { + + if set_default { + obj.CmacIpRange().clearHolderSlice() + for _, item := range obj.obj.CmacIpRange { + obj.CmacIpRange().appendHolderSlice(&bgpCMacIpRange{obj: item}) + } + } + for _, item := range obj.CmacIpRange().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpV4EviVxlanBroadcastDomain) setDefault() { + if obj.obj.EthernetTagId == nil { + obj.SetEthernetTagId(0) + } + if obj.obj.VlanAwareService == nil { + obj.SetVlanAwareService(false) + } + +} diff --git a/gosnappi/bgp_v4_evpn_evis.go b/gosnappi/bgp_v4_evpn_evis.go new file mode 100644 index 00000000..ec970af7 --- /dev/null +++ b/gosnappi/bgp_v4_evpn_evis.go @@ -0,0 +1,410 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV4EvpnEvis ***** +type bgpV4EvpnEvis struct { + validation + obj *otg.BgpV4EvpnEvis + marshaller marshalBgpV4EvpnEvis + unMarshaller unMarshalBgpV4EvpnEvis + eviVxlanHolder BgpV4EviVxlan +} + +func NewBgpV4EvpnEvis() BgpV4EvpnEvis { + obj := bgpV4EvpnEvis{obj: &otg.BgpV4EvpnEvis{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV4EvpnEvis) msg() *otg.BgpV4EvpnEvis { + return obj.obj +} + +func (obj *bgpV4EvpnEvis) setMsg(msg *otg.BgpV4EvpnEvis) BgpV4EvpnEvis { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV4EvpnEvis struct { + obj *bgpV4EvpnEvis +} + +type marshalBgpV4EvpnEvis interface { + // ToProto marshals BgpV4EvpnEvis to protobuf object *otg.BgpV4EvpnEvis + ToProto() (*otg.BgpV4EvpnEvis, error) + // ToPbText marshals BgpV4EvpnEvis to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV4EvpnEvis to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV4EvpnEvis to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV4EvpnEvis struct { + obj *bgpV4EvpnEvis +} + +type unMarshalBgpV4EvpnEvis interface { + // FromProto unmarshals BgpV4EvpnEvis from protobuf object *otg.BgpV4EvpnEvis + FromProto(msg *otg.BgpV4EvpnEvis) (BgpV4EvpnEvis, error) + // FromPbText unmarshals BgpV4EvpnEvis from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV4EvpnEvis from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV4EvpnEvis from JSON text + FromJson(value string) error +} + +func (obj *bgpV4EvpnEvis) Marshal() marshalBgpV4EvpnEvis { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV4EvpnEvis{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV4EvpnEvis) Unmarshal() unMarshalBgpV4EvpnEvis { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV4EvpnEvis{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV4EvpnEvis) ToProto() (*otg.BgpV4EvpnEvis, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV4EvpnEvis) FromProto(msg *otg.BgpV4EvpnEvis) (BgpV4EvpnEvis, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV4EvpnEvis) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV4EvpnEvis) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV4EvpnEvis) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV4EvpnEvis) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV4EvpnEvis) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV4EvpnEvis) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV4EvpnEvis) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV4EvpnEvis) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV4EvpnEvis) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV4EvpnEvis) Clone() (BgpV4EvpnEvis, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV4EvpnEvis() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpV4EvpnEvis) setNil() { + obj.eviVxlanHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpV4EvpnEvis is this contains a list of different flavors of EVPN. +// For example EVPN over VXLAN or EVPN over MPLS etc to be configured per Ethernet segment. +// Need to instantiate correct type of EVPN instance as per requirement. +type BgpV4EvpnEvis interface { + Validation + // msg marshals BgpV4EvpnEvis to protobuf object *otg.BgpV4EvpnEvis + // and doesn't set defaults + msg() *otg.BgpV4EvpnEvis + // setMsg unmarshals BgpV4EvpnEvis from protobuf object *otg.BgpV4EvpnEvis + // and doesn't set defaults + setMsg(*otg.BgpV4EvpnEvis) BgpV4EvpnEvis + // provides marshal interface + Marshal() marshalBgpV4EvpnEvis + // provides unmarshal interface + Unmarshal() unMarshalBgpV4EvpnEvis + // validate validates BgpV4EvpnEvis + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV4EvpnEvis, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpV4EvpnEvisChoiceEnum, set in BgpV4EvpnEvis + Choice() BgpV4EvpnEvisChoiceEnum + // setChoice assigns BgpV4EvpnEvisChoiceEnum provided by user to BgpV4EvpnEvis + setChoice(value BgpV4EvpnEvisChoiceEnum) BgpV4EvpnEvis + // HasChoice checks if Choice has been set in BgpV4EvpnEvis + HasChoice() bool + // EviVxlan returns BgpV4EviVxlan, set in BgpV4EvpnEvis. + // BgpV4EviVxlan is configuration for BGP EVPN EVI. Advertises following routes - + // + // # Type 3 - Inclusive Multicast Ethernet Tag Route + // + // Type 1 - Ethernet Auto-discovery Route (Per EVI) + // + // Type 1 - Ethernet Auto-discovery Route (Per ES) + EviVxlan() BgpV4EviVxlan + // SetEviVxlan assigns BgpV4EviVxlan provided by user to BgpV4EvpnEvis. + // BgpV4EviVxlan is configuration for BGP EVPN EVI. Advertises following routes - + // + // # Type 3 - Inclusive Multicast Ethernet Tag Route + // + // Type 1 - Ethernet Auto-discovery Route (Per EVI) + // + // Type 1 - Ethernet Auto-discovery Route (Per ES) + SetEviVxlan(value BgpV4EviVxlan) BgpV4EvpnEvis + // HasEviVxlan checks if EviVxlan has been set in BgpV4EvpnEvis + HasEviVxlan() bool + setNil() +} + +type BgpV4EvpnEvisChoiceEnum string + +// Enum of Choice on BgpV4EvpnEvis +var BgpV4EvpnEvisChoice = struct { + EVI_VXLAN BgpV4EvpnEvisChoiceEnum +}{ + EVI_VXLAN: BgpV4EvpnEvisChoiceEnum("evi_vxlan"), +} + +func (obj *bgpV4EvpnEvis) Choice() BgpV4EvpnEvisChoiceEnum { + return BgpV4EvpnEvisChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *bgpV4EvpnEvis) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpV4EvpnEvis) setChoice(value BgpV4EvpnEvisChoiceEnum) BgpV4EvpnEvis { + intValue, ok := otg.BgpV4EvpnEvis_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpV4EvpnEvisChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpV4EvpnEvis_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.EviVxlan = nil + obj.eviVxlanHolder = nil + + if value == BgpV4EvpnEvisChoice.EVI_VXLAN { + obj.obj.EviVxlan = NewBgpV4EviVxlan().msg() + } + + return obj +} + +// EVPN VXLAN instance to be configured per Ethernet Segment. +// EviVxlan returns a BgpV4EviVxlan +func (obj *bgpV4EvpnEvis) EviVxlan() BgpV4EviVxlan { + if obj.obj.EviVxlan == nil { + obj.setChoice(BgpV4EvpnEvisChoice.EVI_VXLAN) + } + if obj.eviVxlanHolder == nil { + obj.eviVxlanHolder = &bgpV4EviVxlan{obj: obj.obj.EviVxlan} + } + return obj.eviVxlanHolder +} + +// EVPN VXLAN instance to be configured per Ethernet Segment. +// EviVxlan returns a BgpV4EviVxlan +func (obj *bgpV4EvpnEvis) HasEviVxlan() bool { + return obj.obj.EviVxlan != nil +} + +// EVPN VXLAN instance to be configured per Ethernet Segment. +// SetEviVxlan sets the BgpV4EviVxlan value in the BgpV4EvpnEvis object +func (obj *bgpV4EvpnEvis) SetEviVxlan(value BgpV4EviVxlan) BgpV4EvpnEvis { + obj.setChoice(BgpV4EvpnEvisChoice.EVI_VXLAN) + obj.eviVxlanHolder = nil + obj.obj.EviVxlan = value.msg() + + return obj +} + +func (obj *bgpV4EvpnEvis) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.EviVxlan != nil { + + obj.EviVxlan().validateObj(vObj, set_default) + } + +} + +func (obj *bgpV4EvpnEvis) setDefault() { + var choices_set int = 0 + var choice BgpV4EvpnEvisChoiceEnum + + if obj.obj.EviVxlan != nil { + choices_set += 1 + choice = BgpV4EvpnEvisChoice.EVI_VXLAN + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(BgpV4EvpnEvisChoice.EVI_VXLAN) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpV4EvpnEvis") + } + } else { + intVal := otg.BgpV4EvpnEvis_Choice_Enum_value[string(choice)] + enumValue := otg.BgpV4EvpnEvis_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_v4_interface.go b/gosnappi/bgp_v4_interface.go new file mode 100644 index 00000000..592a61bb --- /dev/null +++ b/gosnappi/bgp_v4_interface.go @@ -0,0 +1,437 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV4Interface ***** +type bgpV4Interface struct { + validation + obj *otg.BgpV4Interface + marshaller marshalBgpV4Interface + unMarshaller unMarshalBgpV4Interface + peersHolder BgpV4InterfaceBgpV4PeerIter +} + +func NewBgpV4Interface() BgpV4Interface { + obj := bgpV4Interface{obj: &otg.BgpV4Interface{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV4Interface) msg() *otg.BgpV4Interface { + return obj.obj +} + +func (obj *bgpV4Interface) setMsg(msg *otg.BgpV4Interface) BgpV4Interface { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV4Interface struct { + obj *bgpV4Interface +} + +type marshalBgpV4Interface interface { + // ToProto marshals BgpV4Interface to protobuf object *otg.BgpV4Interface + ToProto() (*otg.BgpV4Interface, error) + // ToPbText marshals BgpV4Interface to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV4Interface to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV4Interface to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV4Interface struct { + obj *bgpV4Interface +} + +type unMarshalBgpV4Interface interface { + // FromProto unmarshals BgpV4Interface from protobuf object *otg.BgpV4Interface + FromProto(msg *otg.BgpV4Interface) (BgpV4Interface, error) + // FromPbText unmarshals BgpV4Interface from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV4Interface from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV4Interface from JSON text + FromJson(value string) error +} + +func (obj *bgpV4Interface) Marshal() marshalBgpV4Interface { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV4Interface{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV4Interface) Unmarshal() unMarshalBgpV4Interface { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV4Interface{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV4Interface) ToProto() (*otg.BgpV4Interface, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV4Interface) FromProto(msg *otg.BgpV4Interface) (BgpV4Interface, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV4Interface) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV4Interface) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV4Interface) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV4Interface) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV4Interface) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV4Interface) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV4Interface) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV4Interface) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV4Interface) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV4Interface) Clone() (BgpV4Interface, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV4Interface() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpV4Interface) setNil() { + obj.peersHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpV4Interface is configuration for emulated BGPv4 peers and routes on a single IPv4 interface. +type BgpV4Interface interface { + Validation + // msg marshals BgpV4Interface to protobuf object *otg.BgpV4Interface + // and doesn't set defaults + msg() *otg.BgpV4Interface + // setMsg unmarshals BgpV4Interface from protobuf object *otg.BgpV4Interface + // and doesn't set defaults + setMsg(*otg.BgpV4Interface) BgpV4Interface + // provides marshal interface + Marshal() marshalBgpV4Interface + // provides unmarshal interface + Unmarshal() unMarshalBgpV4Interface + // validate validates BgpV4Interface + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV4Interface, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv4Name returns string, set in BgpV4Interface. + Ipv4Name() string + // SetIpv4Name assigns string provided by user to BgpV4Interface + SetIpv4Name(value string) BgpV4Interface + // Peers returns BgpV4InterfaceBgpV4PeerIterIter, set in BgpV4Interface + Peers() BgpV4InterfaceBgpV4PeerIter + setNil() +} + +// The unique name of the IPv4, Loopback IPv4 interface or DHCPv4 client used as the source IP for this list of BGP peers. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv4Loopback/properties/name +// - /components/schemas/Device.Dhcpv4client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv4Loopback/properties/name +// - /components/schemas/Device.Dhcpv4client/properties/name +// +// Ipv4Name returns a string +func (obj *bgpV4Interface) Ipv4Name() string { + + return *obj.obj.Ipv4Name + +} + +// The unique name of the IPv4, Loopback IPv4 interface or DHCPv4 client used as the source IP for this list of BGP peers. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv4Loopback/properties/name +// - /components/schemas/Device.Dhcpv4client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv4Loopback/properties/name +// - /components/schemas/Device.Dhcpv4client/properties/name +// +// SetIpv4Name sets the string value in the BgpV4Interface object +func (obj *bgpV4Interface) SetIpv4Name(value string) BgpV4Interface { + + obj.obj.Ipv4Name = &value + return obj +} + +// This contains the list of BGPv4 peers configured on this interface. +// Peers returns a []BgpV4Peer +func (obj *bgpV4Interface) Peers() BgpV4InterfaceBgpV4PeerIter { + if len(obj.obj.Peers) == 0 { + obj.obj.Peers = []*otg.BgpV4Peer{} + } + if obj.peersHolder == nil { + obj.peersHolder = newBgpV4InterfaceBgpV4PeerIter(&obj.obj.Peers).setMsg(obj) + } + return obj.peersHolder +} + +type bgpV4InterfaceBgpV4PeerIter struct { + obj *bgpV4Interface + bgpV4PeerSlice []BgpV4Peer + fieldPtr *[]*otg.BgpV4Peer +} + +func newBgpV4InterfaceBgpV4PeerIter(ptr *[]*otg.BgpV4Peer) BgpV4InterfaceBgpV4PeerIter { + return &bgpV4InterfaceBgpV4PeerIter{fieldPtr: ptr} +} + +type BgpV4InterfaceBgpV4PeerIter interface { + setMsg(*bgpV4Interface) BgpV4InterfaceBgpV4PeerIter + Items() []BgpV4Peer + Add() BgpV4Peer + Append(items ...BgpV4Peer) BgpV4InterfaceBgpV4PeerIter + Set(index int, newObj BgpV4Peer) BgpV4InterfaceBgpV4PeerIter + Clear() BgpV4InterfaceBgpV4PeerIter + clearHolderSlice() BgpV4InterfaceBgpV4PeerIter + appendHolderSlice(item BgpV4Peer) BgpV4InterfaceBgpV4PeerIter +} + +func (obj *bgpV4InterfaceBgpV4PeerIter) setMsg(msg *bgpV4Interface) BgpV4InterfaceBgpV4PeerIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpV4Peer{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4InterfaceBgpV4PeerIter) Items() []BgpV4Peer { + return obj.bgpV4PeerSlice +} + +func (obj *bgpV4InterfaceBgpV4PeerIter) Add() BgpV4Peer { + newObj := &otg.BgpV4Peer{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpV4Peer{obj: newObj} + newLibObj.setDefault() + obj.bgpV4PeerSlice = append(obj.bgpV4PeerSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4InterfaceBgpV4PeerIter) Append(items ...BgpV4Peer) BgpV4InterfaceBgpV4PeerIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpV4PeerSlice = append(obj.bgpV4PeerSlice, item) + } + return obj +} + +func (obj *bgpV4InterfaceBgpV4PeerIter) Set(index int, newObj BgpV4Peer) BgpV4InterfaceBgpV4PeerIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpV4PeerSlice[index] = newObj + return obj +} +func (obj *bgpV4InterfaceBgpV4PeerIter) Clear() BgpV4InterfaceBgpV4PeerIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpV4Peer{} + obj.bgpV4PeerSlice = []BgpV4Peer{} + } + return obj +} +func (obj *bgpV4InterfaceBgpV4PeerIter) clearHolderSlice() BgpV4InterfaceBgpV4PeerIter { + if len(obj.bgpV4PeerSlice) > 0 { + obj.bgpV4PeerSlice = []BgpV4Peer{} + } + return obj +} +func (obj *bgpV4InterfaceBgpV4PeerIter) appendHolderSlice(item BgpV4Peer) BgpV4InterfaceBgpV4PeerIter { + obj.bgpV4PeerSlice = append(obj.bgpV4PeerSlice, item) + return obj +} + +func (obj *bgpV4Interface) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Ipv4Name is required + if obj.obj.Ipv4Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv4Name is required field on interface BgpV4Interface") + } + + if len(obj.obj.Peers) != 0 { + + if set_default { + obj.Peers().clearHolderSlice() + for _, item := range obj.obj.Peers { + obj.Peers().appendHolderSlice(&bgpV4Peer{obj: item}) + } + } + for _, item := range obj.Peers().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpV4Interface) setDefault() { + +} diff --git a/gosnappi/bgp_v4_peer.go b/gosnappi/bgp_v4_peer.go new file mode 100644 index 00000000..ba8c3835 --- /dev/null +++ b/gosnappi/bgp_v4_peer.go @@ -0,0 +1,1205 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV4Peer ***** +type bgpV4Peer struct { + validation + obj *otg.BgpV4Peer + marshaller marshalBgpV4Peer + unMarshaller unMarshalBgpV4Peer + evpnEthernetSegmentsHolder BgpV4PeerBgpV4EthernetSegmentIter + advancedHolder BgpAdvanced + capabilityHolder BgpCapability + learnedInformationFilterHolder BgpLearnedInformationFilter + v4RoutesHolder BgpV4PeerBgpV4RouteRangeIter + v6RoutesHolder BgpV4PeerBgpV6RouteRangeIter + v4SrtePoliciesHolder BgpV4PeerBgpSrteV4PolicyIter + v6SrtePoliciesHolder BgpV4PeerBgpSrteV6PolicyIter + gracefulRestartHolder BgpGracefulRestart + replayUpdatesHolder BgpUpdateReplay +} + +func NewBgpV4Peer() BgpV4Peer { + obj := bgpV4Peer{obj: &otg.BgpV4Peer{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV4Peer) msg() *otg.BgpV4Peer { + return obj.obj +} + +func (obj *bgpV4Peer) setMsg(msg *otg.BgpV4Peer) BgpV4Peer { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV4Peer struct { + obj *bgpV4Peer +} + +type marshalBgpV4Peer interface { + // ToProto marshals BgpV4Peer to protobuf object *otg.BgpV4Peer + ToProto() (*otg.BgpV4Peer, error) + // ToPbText marshals BgpV4Peer to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV4Peer to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV4Peer to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV4Peer struct { + obj *bgpV4Peer +} + +type unMarshalBgpV4Peer interface { + // FromProto unmarshals BgpV4Peer from protobuf object *otg.BgpV4Peer + FromProto(msg *otg.BgpV4Peer) (BgpV4Peer, error) + // FromPbText unmarshals BgpV4Peer from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV4Peer from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV4Peer from JSON text + FromJson(value string) error +} + +func (obj *bgpV4Peer) Marshal() marshalBgpV4Peer { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV4Peer{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV4Peer) Unmarshal() unMarshalBgpV4Peer { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV4Peer{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV4Peer) ToProto() (*otg.BgpV4Peer, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV4Peer) FromProto(msg *otg.BgpV4Peer) (BgpV4Peer, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV4Peer) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV4Peer) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV4Peer) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV4Peer) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV4Peer) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV4Peer) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV4Peer) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV4Peer) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV4Peer) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV4Peer) Clone() (BgpV4Peer, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV4Peer() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpV4Peer) setNil() { + obj.evpnEthernetSegmentsHolder = nil + obj.advancedHolder = nil + obj.capabilityHolder = nil + obj.learnedInformationFilterHolder = nil + obj.v4RoutesHolder = nil + obj.v6RoutesHolder = nil + obj.v4SrtePoliciesHolder = nil + obj.v6SrtePoliciesHolder = nil + obj.gracefulRestartHolder = nil + obj.replayUpdatesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpV4Peer is configuration for emulated BGPv4 peers and routes. +type BgpV4Peer interface { + Validation + // msg marshals BgpV4Peer to protobuf object *otg.BgpV4Peer + // and doesn't set defaults + msg() *otg.BgpV4Peer + // setMsg unmarshals BgpV4Peer from protobuf object *otg.BgpV4Peer + // and doesn't set defaults + setMsg(*otg.BgpV4Peer) BgpV4Peer + // provides marshal interface + Marshal() marshalBgpV4Peer + // provides unmarshal interface + Unmarshal() unMarshalBgpV4Peer + // validate validates BgpV4Peer + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV4Peer, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PeerAddress returns string, set in BgpV4Peer. + PeerAddress() string + // SetPeerAddress assigns string provided by user to BgpV4Peer + SetPeerAddress(value string) BgpV4Peer + // EvpnEthernetSegments returns BgpV4PeerBgpV4EthernetSegmentIterIter, set in BgpV4Peer + EvpnEthernetSegments() BgpV4PeerBgpV4EthernetSegmentIter + // AsType returns BgpV4PeerAsTypeEnum, set in BgpV4Peer + AsType() BgpV4PeerAsTypeEnum + // SetAsType assigns BgpV4PeerAsTypeEnum provided by user to BgpV4Peer + SetAsType(value BgpV4PeerAsTypeEnum) BgpV4Peer + // AsNumber returns uint32, set in BgpV4Peer. + AsNumber() uint32 + // SetAsNumber assigns uint32 provided by user to BgpV4Peer + SetAsNumber(value uint32) BgpV4Peer + // AsNumberWidth returns BgpV4PeerAsNumberWidthEnum, set in BgpV4Peer + AsNumberWidth() BgpV4PeerAsNumberWidthEnum + // SetAsNumberWidth assigns BgpV4PeerAsNumberWidthEnum provided by user to BgpV4Peer + SetAsNumberWidth(value BgpV4PeerAsNumberWidthEnum) BgpV4Peer + // HasAsNumberWidth checks if AsNumberWidth has been set in BgpV4Peer + HasAsNumberWidth() bool + // Advanced returns BgpAdvanced, set in BgpV4Peer. + // BgpAdvanced is configuration for BGP advanced settings. + Advanced() BgpAdvanced + // SetAdvanced assigns BgpAdvanced provided by user to BgpV4Peer. + // BgpAdvanced is configuration for BGP advanced settings. + SetAdvanced(value BgpAdvanced) BgpV4Peer + // HasAdvanced checks if Advanced has been set in BgpV4Peer + HasAdvanced() bool + // Capability returns BgpCapability, set in BgpV4Peer. + // BgpCapability is configuration for BGP capability settings. + Capability() BgpCapability + // SetCapability assigns BgpCapability provided by user to BgpV4Peer. + // BgpCapability is configuration for BGP capability settings. + SetCapability(value BgpCapability) BgpV4Peer + // HasCapability checks if Capability has been set in BgpV4Peer + HasCapability() bool + // LearnedInformationFilter returns BgpLearnedInformationFilter, set in BgpV4Peer. + // BgpLearnedInformationFilter is configuration for controlling storage of BGP learned information recieved from the peer. + LearnedInformationFilter() BgpLearnedInformationFilter + // SetLearnedInformationFilter assigns BgpLearnedInformationFilter provided by user to BgpV4Peer. + // BgpLearnedInformationFilter is configuration for controlling storage of BGP learned information recieved from the peer. + SetLearnedInformationFilter(value BgpLearnedInformationFilter) BgpV4Peer + // HasLearnedInformationFilter checks if LearnedInformationFilter has been set in BgpV4Peer + HasLearnedInformationFilter() bool + // V4Routes returns BgpV4PeerBgpV4RouteRangeIterIter, set in BgpV4Peer + V4Routes() BgpV4PeerBgpV4RouteRangeIter + // V6Routes returns BgpV4PeerBgpV6RouteRangeIterIter, set in BgpV4Peer + V6Routes() BgpV4PeerBgpV6RouteRangeIter + // V4SrtePolicies returns BgpV4PeerBgpSrteV4PolicyIterIter, set in BgpV4Peer + V4SrtePolicies() BgpV4PeerBgpSrteV4PolicyIter + // V6SrtePolicies returns BgpV4PeerBgpSrteV6PolicyIterIter, set in BgpV4Peer + V6SrtePolicies() BgpV4PeerBgpSrteV6PolicyIter + // Name returns string, set in BgpV4Peer. + Name() string + // SetName assigns string provided by user to BgpV4Peer + SetName(value string) BgpV4Peer + // GracefulRestart returns BgpGracefulRestart, set in BgpV4Peer. + // BgpGracefulRestart is the Graceful Restart Capability (RFC 4724) is a BGP capability that can be used by a BGP speaker to indicate its ability to preserve its forwarding state during BGP restart. The Graceful Restart (GR) capability is advertised in OPEN messages sent between BGP peers. After a BGP session has been established, and the initial routing update has been completed, an End-of-RIB (Routing Information Base) marker is sent in an UPDATE message to convey information about routing convergence. + GracefulRestart() BgpGracefulRestart + // SetGracefulRestart assigns BgpGracefulRestart provided by user to BgpV4Peer. + // BgpGracefulRestart is the Graceful Restart Capability (RFC 4724) is a BGP capability that can be used by a BGP speaker to indicate its ability to preserve its forwarding state during BGP restart. The Graceful Restart (GR) capability is advertised in OPEN messages sent between BGP peers. After a BGP session has been established, and the initial routing update has been completed, an End-of-RIB (Routing Information Base) marker is sent in an UPDATE message to convey information about routing convergence. + SetGracefulRestart(value BgpGracefulRestart) BgpV4Peer + // HasGracefulRestart checks if GracefulRestart has been set in BgpV4Peer + HasGracefulRestart() bool + // ReplayUpdates returns BgpUpdateReplay, set in BgpV4Peer. + // BgpUpdateReplay is ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. + ReplayUpdates() BgpUpdateReplay + // SetReplayUpdates assigns BgpUpdateReplay provided by user to BgpV4Peer. + // BgpUpdateReplay is ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. + SetReplayUpdates(value BgpUpdateReplay) BgpV4Peer + // HasReplayUpdates checks if ReplayUpdates has been set in BgpV4Peer + HasReplayUpdates() bool + setNil() +} + +// IPv4 address of the BGP peer for the session. +// PeerAddress returns a string +func (obj *bgpV4Peer) PeerAddress() string { + + return *obj.obj.PeerAddress + +} + +// IPv4 address of the BGP peer for the session. +// SetPeerAddress sets the string value in the BgpV4Peer object +func (obj *bgpV4Peer) SetPeerAddress(value string) BgpV4Peer { + + obj.obj.PeerAddress = &value + return obj +} + +// This contains the list of Ethernet Virtual Private Network (EVPN) Ethernet Segments (ES) Per BGP Peer for IPv4 Address Family Identifier (AFI). +// +// Each Ethernet Segment contains a list of EVPN Instances (EVIs) . +// Each EVI contains a list of Broadcast Domains. +// Each Broadcast Domain contains a list of MAC/IP Ranges. +// +// is responsible for advertising Ethernet Auto-discovery Route Per EVI (Type 1). +// +// is responsible for advertising Ethernet Auto-discovery Route Per Ethernet Segment (Type 1). +// +// is responsible for advertising MAC/IP Advertisement Route (Type 2). +// +// is responsible for advertising Inclusive Multicast Ethernet Tag Route (Type 3). +// +// Ethernet Segment is responsible for advertising Ethernet Segment Route (Type 4). +// EvpnEthernetSegments returns a []BgpV4EthernetSegment +func (obj *bgpV4Peer) EvpnEthernetSegments() BgpV4PeerBgpV4EthernetSegmentIter { + if len(obj.obj.EvpnEthernetSegments) == 0 { + obj.obj.EvpnEthernetSegments = []*otg.BgpV4EthernetSegment{} + } + if obj.evpnEthernetSegmentsHolder == nil { + obj.evpnEthernetSegmentsHolder = newBgpV4PeerBgpV4EthernetSegmentIter(&obj.obj.EvpnEthernetSegments).setMsg(obj) + } + return obj.evpnEthernetSegmentsHolder +} + +type bgpV4PeerBgpV4EthernetSegmentIter struct { + obj *bgpV4Peer + bgpV4EthernetSegmentSlice []BgpV4EthernetSegment + fieldPtr *[]*otg.BgpV4EthernetSegment +} + +func newBgpV4PeerBgpV4EthernetSegmentIter(ptr *[]*otg.BgpV4EthernetSegment) BgpV4PeerBgpV4EthernetSegmentIter { + return &bgpV4PeerBgpV4EthernetSegmentIter{fieldPtr: ptr} +} + +type BgpV4PeerBgpV4EthernetSegmentIter interface { + setMsg(*bgpV4Peer) BgpV4PeerBgpV4EthernetSegmentIter + Items() []BgpV4EthernetSegment + Add() BgpV4EthernetSegment + Append(items ...BgpV4EthernetSegment) BgpV4PeerBgpV4EthernetSegmentIter + Set(index int, newObj BgpV4EthernetSegment) BgpV4PeerBgpV4EthernetSegmentIter + Clear() BgpV4PeerBgpV4EthernetSegmentIter + clearHolderSlice() BgpV4PeerBgpV4EthernetSegmentIter + appendHolderSlice(item BgpV4EthernetSegment) BgpV4PeerBgpV4EthernetSegmentIter +} + +func (obj *bgpV4PeerBgpV4EthernetSegmentIter) setMsg(msg *bgpV4Peer) BgpV4PeerBgpV4EthernetSegmentIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpV4EthernetSegment{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4PeerBgpV4EthernetSegmentIter) Items() []BgpV4EthernetSegment { + return obj.bgpV4EthernetSegmentSlice +} + +func (obj *bgpV4PeerBgpV4EthernetSegmentIter) Add() BgpV4EthernetSegment { + newObj := &otg.BgpV4EthernetSegment{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpV4EthernetSegment{obj: newObj} + newLibObj.setDefault() + obj.bgpV4EthernetSegmentSlice = append(obj.bgpV4EthernetSegmentSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4PeerBgpV4EthernetSegmentIter) Append(items ...BgpV4EthernetSegment) BgpV4PeerBgpV4EthernetSegmentIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpV4EthernetSegmentSlice = append(obj.bgpV4EthernetSegmentSlice, item) + } + return obj +} + +func (obj *bgpV4PeerBgpV4EthernetSegmentIter) Set(index int, newObj BgpV4EthernetSegment) BgpV4PeerBgpV4EthernetSegmentIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpV4EthernetSegmentSlice[index] = newObj + return obj +} +func (obj *bgpV4PeerBgpV4EthernetSegmentIter) Clear() BgpV4PeerBgpV4EthernetSegmentIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpV4EthernetSegment{} + obj.bgpV4EthernetSegmentSlice = []BgpV4EthernetSegment{} + } + return obj +} +func (obj *bgpV4PeerBgpV4EthernetSegmentIter) clearHolderSlice() BgpV4PeerBgpV4EthernetSegmentIter { + if len(obj.bgpV4EthernetSegmentSlice) > 0 { + obj.bgpV4EthernetSegmentSlice = []BgpV4EthernetSegment{} + } + return obj +} +func (obj *bgpV4PeerBgpV4EthernetSegmentIter) appendHolderSlice(item BgpV4EthernetSegment) BgpV4PeerBgpV4EthernetSegmentIter { + obj.bgpV4EthernetSegmentSlice = append(obj.bgpV4EthernetSegmentSlice, item) + return obj +} + +type BgpV4PeerAsTypeEnum string + +// Enum of AsType on BgpV4Peer +var BgpV4PeerAsType = struct { + IBGP BgpV4PeerAsTypeEnum + EBGP BgpV4PeerAsTypeEnum +}{ + IBGP: BgpV4PeerAsTypeEnum("ibgp"), + EBGP: BgpV4PeerAsTypeEnum("ebgp"), +} + +func (obj *bgpV4Peer) AsType() BgpV4PeerAsTypeEnum { + return BgpV4PeerAsTypeEnum(obj.obj.AsType.Enum().String()) +} + +func (obj *bgpV4Peer) SetAsType(value BgpV4PeerAsTypeEnum) BgpV4Peer { + intValue, ok := otg.BgpV4Peer_AsType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpV4PeerAsTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpV4Peer_AsType_Enum(intValue) + obj.obj.AsType = &enumValue + + return obj +} + +// Autonomous System Number (AS number or ASN) +// AsNumber returns a uint32 +func (obj *bgpV4Peer) AsNumber() uint32 { + + return *obj.obj.AsNumber + +} + +// Autonomous System Number (AS number or ASN) +// SetAsNumber sets the uint32 value in the BgpV4Peer object +func (obj *bgpV4Peer) SetAsNumber(value uint32) BgpV4Peer { + + obj.obj.AsNumber = &value + return obj +} + +type BgpV4PeerAsNumberWidthEnum string + +// Enum of AsNumberWidth on BgpV4Peer +var BgpV4PeerAsNumberWidth = struct { + TWO BgpV4PeerAsNumberWidthEnum + FOUR BgpV4PeerAsNumberWidthEnum +}{ + TWO: BgpV4PeerAsNumberWidthEnum("two"), + FOUR: BgpV4PeerAsNumberWidthEnum("four"), +} + +func (obj *bgpV4Peer) AsNumberWidth() BgpV4PeerAsNumberWidthEnum { + return BgpV4PeerAsNumberWidthEnum(obj.obj.AsNumberWidth.Enum().String()) +} + +// The width in bytes of the as_number values. Any as_number values that exceeds the width MUST result in an error. +// AsNumberWidth returns a string +func (obj *bgpV4Peer) HasAsNumberWidth() bool { + return obj.obj.AsNumberWidth != nil +} + +func (obj *bgpV4Peer) SetAsNumberWidth(value BgpV4PeerAsNumberWidthEnum) BgpV4Peer { + intValue, ok := otg.BgpV4Peer_AsNumberWidth_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpV4PeerAsNumberWidthEnum", string(value))) + return obj + } + enumValue := otg.BgpV4Peer_AsNumberWidth_Enum(intValue) + obj.obj.AsNumberWidth = &enumValue + + return obj +} + +// description is TBD +// Advanced returns a BgpAdvanced +func (obj *bgpV4Peer) Advanced() BgpAdvanced { + if obj.obj.Advanced == nil { + obj.obj.Advanced = NewBgpAdvanced().msg() + } + if obj.advancedHolder == nil { + obj.advancedHolder = &bgpAdvanced{obj: obj.obj.Advanced} + } + return obj.advancedHolder +} + +// description is TBD +// Advanced returns a BgpAdvanced +func (obj *bgpV4Peer) HasAdvanced() bool { + return obj.obj.Advanced != nil +} + +// description is TBD +// SetAdvanced sets the BgpAdvanced value in the BgpV4Peer object +func (obj *bgpV4Peer) SetAdvanced(value BgpAdvanced) BgpV4Peer { + + obj.advancedHolder = nil + obj.obj.Advanced = value.msg() + + return obj +} + +// description is TBD +// Capability returns a BgpCapability +func (obj *bgpV4Peer) Capability() BgpCapability { + if obj.obj.Capability == nil { + obj.obj.Capability = NewBgpCapability().msg() + } + if obj.capabilityHolder == nil { + obj.capabilityHolder = &bgpCapability{obj: obj.obj.Capability} + } + return obj.capabilityHolder +} + +// description is TBD +// Capability returns a BgpCapability +func (obj *bgpV4Peer) HasCapability() bool { + return obj.obj.Capability != nil +} + +// description is TBD +// SetCapability sets the BgpCapability value in the BgpV4Peer object +func (obj *bgpV4Peer) SetCapability(value BgpCapability) BgpV4Peer { + + obj.capabilityHolder = nil + obj.obj.Capability = value.msg() + + return obj +} + +// description is TBD +// LearnedInformationFilter returns a BgpLearnedInformationFilter +func (obj *bgpV4Peer) LearnedInformationFilter() BgpLearnedInformationFilter { + if obj.obj.LearnedInformationFilter == nil { + obj.obj.LearnedInformationFilter = NewBgpLearnedInformationFilter().msg() + } + if obj.learnedInformationFilterHolder == nil { + obj.learnedInformationFilterHolder = &bgpLearnedInformationFilter{obj: obj.obj.LearnedInformationFilter} + } + return obj.learnedInformationFilterHolder +} + +// description is TBD +// LearnedInformationFilter returns a BgpLearnedInformationFilter +func (obj *bgpV4Peer) HasLearnedInformationFilter() bool { + return obj.obj.LearnedInformationFilter != nil +} + +// description is TBD +// SetLearnedInformationFilter sets the BgpLearnedInformationFilter value in the BgpV4Peer object +func (obj *bgpV4Peer) SetLearnedInformationFilter(value BgpLearnedInformationFilter) BgpV4Peer { + + obj.learnedInformationFilterHolder = nil + obj.obj.LearnedInformationFilter = value.msg() + + return obj +} + +// Emulated BGPv4 route ranges. +// V4Routes returns a []BgpV4RouteRange +func (obj *bgpV4Peer) V4Routes() BgpV4PeerBgpV4RouteRangeIter { + if len(obj.obj.V4Routes) == 0 { + obj.obj.V4Routes = []*otg.BgpV4RouteRange{} + } + if obj.v4RoutesHolder == nil { + obj.v4RoutesHolder = newBgpV4PeerBgpV4RouteRangeIter(&obj.obj.V4Routes).setMsg(obj) + } + return obj.v4RoutesHolder +} + +type bgpV4PeerBgpV4RouteRangeIter struct { + obj *bgpV4Peer + bgpV4RouteRangeSlice []BgpV4RouteRange + fieldPtr *[]*otg.BgpV4RouteRange +} + +func newBgpV4PeerBgpV4RouteRangeIter(ptr *[]*otg.BgpV4RouteRange) BgpV4PeerBgpV4RouteRangeIter { + return &bgpV4PeerBgpV4RouteRangeIter{fieldPtr: ptr} +} + +type BgpV4PeerBgpV4RouteRangeIter interface { + setMsg(*bgpV4Peer) BgpV4PeerBgpV4RouteRangeIter + Items() []BgpV4RouteRange + Add() BgpV4RouteRange + Append(items ...BgpV4RouteRange) BgpV4PeerBgpV4RouteRangeIter + Set(index int, newObj BgpV4RouteRange) BgpV4PeerBgpV4RouteRangeIter + Clear() BgpV4PeerBgpV4RouteRangeIter + clearHolderSlice() BgpV4PeerBgpV4RouteRangeIter + appendHolderSlice(item BgpV4RouteRange) BgpV4PeerBgpV4RouteRangeIter +} + +func (obj *bgpV4PeerBgpV4RouteRangeIter) setMsg(msg *bgpV4Peer) BgpV4PeerBgpV4RouteRangeIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpV4RouteRange{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4PeerBgpV4RouteRangeIter) Items() []BgpV4RouteRange { + return obj.bgpV4RouteRangeSlice +} + +func (obj *bgpV4PeerBgpV4RouteRangeIter) Add() BgpV4RouteRange { + newObj := &otg.BgpV4RouteRange{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpV4RouteRange{obj: newObj} + newLibObj.setDefault() + obj.bgpV4RouteRangeSlice = append(obj.bgpV4RouteRangeSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4PeerBgpV4RouteRangeIter) Append(items ...BgpV4RouteRange) BgpV4PeerBgpV4RouteRangeIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpV4RouteRangeSlice = append(obj.bgpV4RouteRangeSlice, item) + } + return obj +} + +func (obj *bgpV4PeerBgpV4RouteRangeIter) Set(index int, newObj BgpV4RouteRange) BgpV4PeerBgpV4RouteRangeIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpV4RouteRangeSlice[index] = newObj + return obj +} +func (obj *bgpV4PeerBgpV4RouteRangeIter) Clear() BgpV4PeerBgpV4RouteRangeIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpV4RouteRange{} + obj.bgpV4RouteRangeSlice = []BgpV4RouteRange{} + } + return obj +} +func (obj *bgpV4PeerBgpV4RouteRangeIter) clearHolderSlice() BgpV4PeerBgpV4RouteRangeIter { + if len(obj.bgpV4RouteRangeSlice) > 0 { + obj.bgpV4RouteRangeSlice = []BgpV4RouteRange{} + } + return obj +} +func (obj *bgpV4PeerBgpV4RouteRangeIter) appendHolderSlice(item BgpV4RouteRange) BgpV4PeerBgpV4RouteRangeIter { + obj.bgpV4RouteRangeSlice = append(obj.bgpV4RouteRangeSlice, item) + return obj +} + +// Emulated BGPv6 route ranges. +// V6Routes returns a []BgpV6RouteRange +func (obj *bgpV4Peer) V6Routes() BgpV4PeerBgpV6RouteRangeIter { + if len(obj.obj.V6Routes) == 0 { + obj.obj.V6Routes = []*otg.BgpV6RouteRange{} + } + if obj.v6RoutesHolder == nil { + obj.v6RoutesHolder = newBgpV4PeerBgpV6RouteRangeIter(&obj.obj.V6Routes).setMsg(obj) + } + return obj.v6RoutesHolder +} + +type bgpV4PeerBgpV6RouteRangeIter struct { + obj *bgpV4Peer + bgpV6RouteRangeSlice []BgpV6RouteRange + fieldPtr *[]*otg.BgpV6RouteRange +} + +func newBgpV4PeerBgpV6RouteRangeIter(ptr *[]*otg.BgpV6RouteRange) BgpV4PeerBgpV6RouteRangeIter { + return &bgpV4PeerBgpV6RouteRangeIter{fieldPtr: ptr} +} + +type BgpV4PeerBgpV6RouteRangeIter interface { + setMsg(*bgpV4Peer) BgpV4PeerBgpV6RouteRangeIter + Items() []BgpV6RouteRange + Add() BgpV6RouteRange + Append(items ...BgpV6RouteRange) BgpV4PeerBgpV6RouteRangeIter + Set(index int, newObj BgpV6RouteRange) BgpV4PeerBgpV6RouteRangeIter + Clear() BgpV4PeerBgpV6RouteRangeIter + clearHolderSlice() BgpV4PeerBgpV6RouteRangeIter + appendHolderSlice(item BgpV6RouteRange) BgpV4PeerBgpV6RouteRangeIter +} + +func (obj *bgpV4PeerBgpV6RouteRangeIter) setMsg(msg *bgpV4Peer) BgpV4PeerBgpV6RouteRangeIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpV6RouteRange{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4PeerBgpV6RouteRangeIter) Items() []BgpV6RouteRange { + return obj.bgpV6RouteRangeSlice +} + +func (obj *bgpV4PeerBgpV6RouteRangeIter) Add() BgpV6RouteRange { + newObj := &otg.BgpV6RouteRange{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpV6RouteRange{obj: newObj} + newLibObj.setDefault() + obj.bgpV6RouteRangeSlice = append(obj.bgpV6RouteRangeSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4PeerBgpV6RouteRangeIter) Append(items ...BgpV6RouteRange) BgpV4PeerBgpV6RouteRangeIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpV6RouteRangeSlice = append(obj.bgpV6RouteRangeSlice, item) + } + return obj +} + +func (obj *bgpV4PeerBgpV6RouteRangeIter) Set(index int, newObj BgpV6RouteRange) BgpV4PeerBgpV6RouteRangeIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpV6RouteRangeSlice[index] = newObj + return obj +} +func (obj *bgpV4PeerBgpV6RouteRangeIter) Clear() BgpV4PeerBgpV6RouteRangeIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpV6RouteRange{} + obj.bgpV6RouteRangeSlice = []BgpV6RouteRange{} + } + return obj +} +func (obj *bgpV4PeerBgpV6RouteRangeIter) clearHolderSlice() BgpV4PeerBgpV6RouteRangeIter { + if len(obj.bgpV6RouteRangeSlice) > 0 { + obj.bgpV6RouteRangeSlice = []BgpV6RouteRange{} + } + return obj +} +func (obj *bgpV4PeerBgpV6RouteRangeIter) appendHolderSlice(item BgpV6RouteRange) BgpV4PeerBgpV6RouteRangeIter { + obj.bgpV6RouteRangeSlice = append(obj.bgpV6RouteRangeSlice, item) + return obj +} + +// Segment Routing Traffic Engineering (SR TE) Policies for IPv4 Address Family Identifier (AFI). +// V4SrtePolicies returns a []BgpSrteV4Policy +func (obj *bgpV4Peer) V4SrtePolicies() BgpV4PeerBgpSrteV4PolicyIter { + if len(obj.obj.V4SrtePolicies) == 0 { + obj.obj.V4SrtePolicies = []*otg.BgpSrteV4Policy{} + } + if obj.v4SrtePoliciesHolder == nil { + obj.v4SrtePoliciesHolder = newBgpV4PeerBgpSrteV4PolicyIter(&obj.obj.V4SrtePolicies).setMsg(obj) + } + return obj.v4SrtePoliciesHolder +} + +type bgpV4PeerBgpSrteV4PolicyIter struct { + obj *bgpV4Peer + bgpSrteV4PolicySlice []BgpSrteV4Policy + fieldPtr *[]*otg.BgpSrteV4Policy +} + +func newBgpV4PeerBgpSrteV4PolicyIter(ptr *[]*otg.BgpSrteV4Policy) BgpV4PeerBgpSrteV4PolicyIter { + return &bgpV4PeerBgpSrteV4PolicyIter{fieldPtr: ptr} +} + +type BgpV4PeerBgpSrteV4PolicyIter interface { + setMsg(*bgpV4Peer) BgpV4PeerBgpSrteV4PolicyIter + Items() []BgpSrteV4Policy + Add() BgpSrteV4Policy + Append(items ...BgpSrteV4Policy) BgpV4PeerBgpSrteV4PolicyIter + Set(index int, newObj BgpSrteV4Policy) BgpV4PeerBgpSrteV4PolicyIter + Clear() BgpV4PeerBgpSrteV4PolicyIter + clearHolderSlice() BgpV4PeerBgpSrteV4PolicyIter + appendHolderSlice(item BgpSrteV4Policy) BgpV4PeerBgpSrteV4PolicyIter +} + +func (obj *bgpV4PeerBgpSrteV4PolicyIter) setMsg(msg *bgpV4Peer) BgpV4PeerBgpSrteV4PolicyIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpSrteV4Policy{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4PeerBgpSrteV4PolicyIter) Items() []BgpSrteV4Policy { + return obj.bgpSrteV4PolicySlice +} + +func (obj *bgpV4PeerBgpSrteV4PolicyIter) Add() BgpSrteV4Policy { + newObj := &otg.BgpSrteV4Policy{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpSrteV4Policy{obj: newObj} + newLibObj.setDefault() + obj.bgpSrteV4PolicySlice = append(obj.bgpSrteV4PolicySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4PeerBgpSrteV4PolicyIter) Append(items ...BgpSrteV4Policy) BgpV4PeerBgpSrteV4PolicyIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpSrteV4PolicySlice = append(obj.bgpSrteV4PolicySlice, item) + } + return obj +} + +func (obj *bgpV4PeerBgpSrteV4PolicyIter) Set(index int, newObj BgpSrteV4Policy) BgpV4PeerBgpSrteV4PolicyIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpSrteV4PolicySlice[index] = newObj + return obj +} +func (obj *bgpV4PeerBgpSrteV4PolicyIter) Clear() BgpV4PeerBgpSrteV4PolicyIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpSrteV4Policy{} + obj.bgpSrteV4PolicySlice = []BgpSrteV4Policy{} + } + return obj +} +func (obj *bgpV4PeerBgpSrteV4PolicyIter) clearHolderSlice() BgpV4PeerBgpSrteV4PolicyIter { + if len(obj.bgpSrteV4PolicySlice) > 0 { + obj.bgpSrteV4PolicySlice = []BgpSrteV4Policy{} + } + return obj +} +func (obj *bgpV4PeerBgpSrteV4PolicyIter) appendHolderSlice(item BgpSrteV4Policy) BgpV4PeerBgpSrteV4PolicyIter { + obj.bgpSrteV4PolicySlice = append(obj.bgpSrteV4PolicySlice, item) + return obj +} + +// Segment Routing Traffic Engineering (SR TE) Policies for IPv6 Address Family Identifier (AFI). +// V6SrtePolicies returns a []BgpSrteV6Policy +func (obj *bgpV4Peer) V6SrtePolicies() BgpV4PeerBgpSrteV6PolicyIter { + if len(obj.obj.V6SrtePolicies) == 0 { + obj.obj.V6SrtePolicies = []*otg.BgpSrteV6Policy{} + } + if obj.v6SrtePoliciesHolder == nil { + obj.v6SrtePoliciesHolder = newBgpV4PeerBgpSrteV6PolicyIter(&obj.obj.V6SrtePolicies).setMsg(obj) + } + return obj.v6SrtePoliciesHolder +} + +type bgpV4PeerBgpSrteV6PolicyIter struct { + obj *bgpV4Peer + bgpSrteV6PolicySlice []BgpSrteV6Policy + fieldPtr *[]*otg.BgpSrteV6Policy +} + +func newBgpV4PeerBgpSrteV6PolicyIter(ptr *[]*otg.BgpSrteV6Policy) BgpV4PeerBgpSrteV6PolicyIter { + return &bgpV4PeerBgpSrteV6PolicyIter{fieldPtr: ptr} +} + +type BgpV4PeerBgpSrteV6PolicyIter interface { + setMsg(*bgpV4Peer) BgpV4PeerBgpSrteV6PolicyIter + Items() []BgpSrteV6Policy + Add() BgpSrteV6Policy + Append(items ...BgpSrteV6Policy) BgpV4PeerBgpSrteV6PolicyIter + Set(index int, newObj BgpSrteV6Policy) BgpV4PeerBgpSrteV6PolicyIter + Clear() BgpV4PeerBgpSrteV6PolicyIter + clearHolderSlice() BgpV4PeerBgpSrteV6PolicyIter + appendHolderSlice(item BgpSrteV6Policy) BgpV4PeerBgpSrteV6PolicyIter +} + +func (obj *bgpV4PeerBgpSrteV6PolicyIter) setMsg(msg *bgpV4Peer) BgpV4PeerBgpSrteV6PolicyIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpSrteV6Policy{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4PeerBgpSrteV6PolicyIter) Items() []BgpSrteV6Policy { + return obj.bgpSrteV6PolicySlice +} + +func (obj *bgpV4PeerBgpSrteV6PolicyIter) Add() BgpSrteV6Policy { + newObj := &otg.BgpSrteV6Policy{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpSrteV6Policy{obj: newObj} + newLibObj.setDefault() + obj.bgpSrteV6PolicySlice = append(obj.bgpSrteV6PolicySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4PeerBgpSrteV6PolicyIter) Append(items ...BgpSrteV6Policy) BgpV4PeerBgpSrteV6PolicyIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpSrteV6PolicySlice = append(obj.bgpSrteV6PolicySlice, item) + } + return obj +} + +func (obj *bgpV4PeerBgpSrteV6PolicyIter) Set(index int, newObj BgpSrteV6Policy) BgpV4PeerBgpSrteV6PolicyIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpSrteV6PolicySlice[index] = newObj + return obj +} +func (obj *bgpV4PeerBgpSrteV6PolicyIter) Clear() BgpV4PeerBgpSrteV6PolicyIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpSrteV6Policy{} + obj.bgpSrteV6PolicySlice = []BgpSrteV6Policy{} + } + return obj +} +func (obj *bgpV4PeerBgpSrteV6PolicyIter) clearHolderSlice() BgpV4PeerBgpSrteV6PolicyIter { + if len(obj.bgpSrteV6PolicySlice) > 0 { + obj.bgpSrteV6PolicySlice = []BgpSrteV6Policy{} + } + return obj +} +func (obj *bgpV4PeerBgpSrteV6PolicyIter) appendHolderSlice(item BgpSrteV6Policy) BgpV4PeerBgpSrteV6PolicyIter { + obj.bgpSrteV6PolicySlice = append(obj.bgpSrteV6PolicySlice, item) + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *bgpV4Peer) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the BgpV4Peer object +func (obj *bgpV4Peer) SetName(value string) BgpV4Peer { + + obj.obj.Name = &value + return obj +} + +// description is TBD +// GracefulRestart returns a BgpGracefulRestart +func (obj *bgpV4Peer) GracefulRestart() BgpGracefulRestart { + if obj.obj.GracefulRestart == nil { + obj.obj.GracefulRestart = NewBgpGracefulRestart().msg() + } + if obj.gracefulRestartHolder == nil { + obj.gracefulRestartHolder = &bgpGracefulRestart{obj: obj.obj.GracefulRestart} + } + return obj.gracefulRestartHolder +} + +// description is TBD +// GracefulRestart returns a BgpGracefulRestart +func (obj *bgpV4Peer) HasGracefulRestart() bool { + return obj.obj.GracefulRestart != nil +} + +// description is TBD +// SetGracefulRestart sets the BgpGracefulRestart value in the BgpV4Peer object +func (obj *bgpV4Peer) SetGracefulRestart(value BgpGracefulRestart) BgpV4Peer { + + obj.gracefulRestartHolder = nil + obj.obj.GracefulRestart = value.msg() + + return obj +} + +// BGP Updates to be sent to the peer as specified after the session is established. +// ReplayUpdates returns a BgpUpdateReplay +func (obj *bgpV4Peer) ReplayUpdates() BgpUpdateReplay { + if obj.obj.ReplayUpdates == nil { + obj.obj.ReplayUpdates = NewBgpUpdateReplay().msg() + } + if obj.replayUpdatesHolder == nil { + obj.replayUpdatesHolder = &bgpUpdateReplay{obj: obj.obj.ReplayUpdates} + } + return obj.replayUpdatesHolder +} + +// BGP Updates to be sent to the peer as specified after the session is established. +// ReplayUpdates returns a BgpUpdateReplay +func (obj *bgpV4Peer) HasReplayUpdates() bool { + return obj.obj.ReplayUpdates != nil +} + +// BGP Updates to be sent to the peer as specified after the session is established. +// SetReplayUpdates sets the BgpUpdateReplay value in the BgpV4Peer object +func (obj *bgpV4Peer) SetReplayUpdates(value BgpUpdateReplay) BgpV4Peer { + + obj.replayUpdatesHolder = nil + obj.obj.ReplayUpdates = value.msg() + + return obj +} + +func (obj *bgpV4Peer) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // PeerAddress is required + if obj.obj.PeerAddress == nil { + vObj.validationErrors = append(vObj.validationErrors, "PeerAddress is required field on interface BgpV4Peer") + } + if obj.obj.PeerAddress != nil { + + err := obj.validateIpv4(obj.PeerAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpV4Peer.PeerAddress")) + } + + } + + if len(obj.obj.EvpnEthernetSegments) != 0 { + + if set_default { + obj.EvpnEthernetSegments().clearHolderSlice() + for _, item := range obj.obj.EvpnEthernetSegments { + obj.EvpnEthernetSegments().appendHolderSlice(&bgpV4EthernetSegment{obj: item}) + } + } + for _, item := range obj.EvpnEthernetSegments().Items() { + item.validateObj(vObj, set_default) + } + + } + + // AsType is required + if obj.obj.AsType == nil { + vObj.validationErrors = append(vObj.validationErrors, "AsType is required field on interface BgpV4Peer") + } + + // AsNumber is required + if obj.obj.AsNumber == nil { + vObj.validationErrors = append(vObj.validationErrors, "AsNumber is required field on interface BgpV4Peer") + } + + if obj.obj.Advanced != nil { + + obj.Advanced().validateObj(vObj, set_default) + } + + if obj.obj.Capability != nil { + + obj.Capability().validateObj(vObj, set_default) + } + + if obj.obj.LearnedInformationFilter != nil { + + obj.LearnedInformationFilter().validateObj(vObj, set_default) + } + + if len(obj.obj.V4Routes) != 0 { + + if set_default { + obj.V4Routes().clearHolderSlice() + for _, item := range obj.obj.V4Routes { + obj.V4Routes().appendHolderSlice(&bgpV4RouteRange{obj: item}) + } + } + for _, item := range obj.V4Routes().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.V6Routes) != 0 { + + if set_default { + obj.V6Routes().clearHolderSlice() + for _, item := range obj.obj.V6Routes { + obj.V6Routes().appendHolderSlice(&bgpV6RouteRange{obj: item}) + } + } + for _, item := range obj.V6Routes().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.V4SrtePolicies) != 0 { + + if set_default { + obj.V4SrtePolicies().clearHolderSlice() + for _, item := range obj.obj.V4SrtePolicies { + obj.V4SrtePolicies().appendHolderSlice(&bgpSrteV4Policy{obj: item}) + } + } + for _, item := range obj.V4SrtePolicies().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.V6SrtePolicies) != 0 { + + if set_default { + obj.V6SrtePolicies().clearHolderSlice() + for _, item := range obj.obj.V6SrtePolicies { + obj.V6SrtePolicies().appendHolderSlice(&bgpSrteV6Policy{obj: item}) + } + } + for _, item := range obj.V6SrtePolicies().Items() { + item.validateObj(vObj, set_default) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface BgpV4Peer") + } + + if obj.obj.GracefulRestart != nil { + + obj.GracefulRestart().validateObj(vObj, set_default) + } + + if obj.obj.ReplayUpdates != nil { + + obj.ReplayUpdates().validateObj(vObj, set_default) + } + +} + +func (obj *bgpV4Peer) setDefault() { + if obj.obj.AsNumberWidth == nil { + obj.SetAsNumberWidth(BgpV4PeerAsNumberWidth.FOUR) + + } + +} diff --git a/gosnappi/bgp_v4_route_range.go b/gosnappi/bgp_v4_route_range.go new file mode 100644 index 00000000..d536784c --- /dev/null +++ b/gosnappi/bgp_v4_route_range.go @@ -0,0 +1,1036 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV4RouteRange ***** +type bgpV4RouteRange struct { + validation + obj *otg.BgpV4RouteRange + marshaller marshalBgpV4RouteRange + unMarshaller unMarshalBgpV4RouteRange + addressesHolder BgpV4RouteRangeV4RouteAddressIter + advancedHolder BgpRouteAdvanced + communitiesHolder BgpV4RouteRangeBgpCommunityIter + asPathHolder BgpAsPath + addPathHolder BgpAddPath + extCommunitiesHolder BgpV4RouteRangeBgpExtCommunityIter + extendedCommunitiesHolder BgpV4RouteRangeBgpExtendedCommunityIter +} + +func NewBgpV4RouteRange() BgpV4RouteRange { + obj := bgpV4RouteRange{obj: &otg.BgpV4RouteRange{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV4RouteRange) msg() *otg.BgpV4RouteRange { + return obj.obj +} + +func (obj *bgpV4RouteRange) setMsg(msg *otg.BgpV4RouteRange) BgpV4RouteRange { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV4RouteRange struct { + obj *bgpV4RouteRange +} + +type marshalBgpV4RouteRange interface { + // ToProto marshals BgpV4RouteRange to protobuf object *otg.BgpV4RouteRange + ToProto() (*otg.BgpV4RouteRange, error) + // ToPbText marshals BgpV4RouteRange to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV4RouteRange to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV4RouteRange to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV4RouteRange struct { + obj *bgpV4RouteRange +} + +type unMarshalBgpV4RouteRange interface { + // FromProto unmarshals BgpV4RouteRange from protobuf object *otg.BgpV4RouteRange + FromProto(msg *otg.BgpV4RouteRange) (BgpV4RouteRange, error) + // FromPbText unmarshals BgpV4RouteRange from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV4RouteRange from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV4RouteRange from JSON text + FromJson(value string) error +} + +func (obj *bgpV4RouteRange) Marshal() marshalBgpV4RouteRange { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV4RouteRange{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV4RouteRange) Unmarshal() unMarshalBgpV4RouteRange { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV4RouteRange{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV4RouteRange) ToProto() (*otg.BgpV4RouteRange, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV4RouteRange) FromProto(msg *otg.BgpV4RouteRange) (BgpV4RouteRange, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV4RouteRange) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV4RouteRange) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV4RouteRange) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV4RouteRange) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV4RouteRange) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV4RouteRange) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV4RouteRange) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV4RouteRange) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV4RouteRange) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV4RouteRange) Clone() (BgpV4RouteRange, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV4RouteRange() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpV4RouteRange) setNil() { + obj.addressesHolder = nil + obj.advancedHolder = nil + obj.communitiesHolder = nil + obj.asPathHolder = nil + obj.addPathHolder = nil + obj.extCommunitiesHolder = nil + obj.extendedCommunitiesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpV4RouteRange is emulated BGPv4 route range. +type BgpV4RouteRange interface { + Validation + // msg marshals BgpV4RouteRange to protobuf object *otg.BgpV4RouteRange + // and doesn't set defaults + msg() *otg.BgpV4RouteRange + // setMsg unmarshals BgpV4RouteRange from protobuf object *otg.BgpV4RouteRange + // and doesn't set defaults + setMsg(*otg.BgpV4RouteRange) BgpV4RouteRange + // provides marshal interface + Marshal() marshalBgpV4RouteRange + // provides unmarshal interface + Unmarshal() unMarshalBgpV4RouteRange + // validate validates BgpV4RouteRange + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV4RouteRange, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Addresses returns BgpV4RouteRangeV4RouteAddressIterIter, set in BgpV4RouteRange + Addresses() BgpV4RouteRangeV4RouteAddressIter + // NextHopMode returns BgpV4RouteRangeNextHopModeEnum, set in BgpV4RouteRange + NextHopMode() BgpV4RouteRangeNextHopModeEnum + // SetNextHopMode assigns BgpV4RouteRangeNextHopModeEnum provided by user to BgpV4RouteRange + SetNextHopMode(value BgpV4RouteRangeNextHopModeEnum) BgpV4RouteRange + // HasNextHopMode checks if NextHopMode has been set in BgpV4RouteRange + HasNextHopMode() bool + // NextHopAddressType returns BgpV4RouteRangeNextHopAddressTypeEnum, set in BgpV4RouteRange + NextHopAddressType() BgpV4RouteRangeNextHopAddressTypeEnum + // SetNextHopAddressType assigns BgpV4RouteRangeNextHopAddressTypeEnum provided by user to BgpV4RouteRange + SetNextHopAddressType(value BgpV4RouteRangeNextHopAddressTypeEnum) BgpV4RouteRange + // HasNextHopAddressType checks if NextHopAddressType has been set in BgpV4RouteRange + HasNextHopAddressType() bool + // NextHopIpv4Address returns string, set in BgpV4RouteRange. + NextHopIpv4Address() string + // SetNextHopIpv4Address assigns string provided by user to BgpV4RouteRange + SetNextHopIpv4Address(value string) BgpV4RouteRange + // HasNextHopIpv4Address checks if NextHopIpv4Address has been set in BgpV4RouteRange + HasNextHopIpv4Address() bool + // NextHopIpv6Address returns string, set in BgpV4RouteRange. + NextHopIpv6Address() string + // SetNextHopIpv6Address assigns string provided by user to BgpV4RouteRange + SetNextHopIpv6Address(value string) BgpV4RouteRange + // HasNextHopIpv6Address checks if NextHopIpv6Address has been set in BgpV4RouteRange + HasNextHopIpv6Address() bool + // Advanced returns BgpRouteAdvanced, set in BgpV4RouteRange. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + Advanced() BgpRouteAdvanced + // SetAdvanced assigns BgpRouteAdvanced provided by user to BgpV4RouteRange. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + SetAdvanced(value BgpRouteAdvanced) BgpV4RouteRange + // HasAdvanced checks if Advanced has been set in BgpV4RouteRange + HasAdvanced() bool + // Communities returns BgpV4RouteRangeBgpCommunityIterIter, set in BgpV4RouteRange + Communities() BgpV4RouteRangeBgpCommunityIter + // AsPath returns BgpAsPath, set in BgpV4RouteRange. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + AsPath() BgpAsPath + // SetAsPath assigns BgpAsPath provided by user to BgpV4RouteRange. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + SetAsPath(value BgpAsPath) BgpV4RouteRange + // HasAsPath checks if AsPath has been set in BgpV4RouteRange + HasAsPath() bool + // AddPath returns BgpAddPath, set in BgpV4RouteRange. + // BgpAddPath is the BGP Additional Paths feature is a BGP extension that allows the advertisement of multiple paths for the same prefix without the new paths implicitly replacing any previous paths. + AddPath() BgpAddPath + // SetAddPath assigns BgpAddPath provided by user to BgpV4RouteRange. + // BgpAddPath is the BGP Additional Paths feature is a BGP extension that allows the advertisement of multiple paths for the same prefix without the new paths implicitly replacing any previous paths. + SetAddPath(value BgpAddPath) BgpV4RouteRange + // HasAddPath checks if AddPath has been set in BgpV4RouteRange + HasAddPath() bool + // Name returns string, set in BgpV4RouteRange. + Name() string + // SetName assigns string provided by user to BgpV4RouteRange + SetName(value string) BgpV4RouteRange + // ExtCommunities returns BgpV4RouteRangeBgpExtCommunityIterIter, set in BgpV4RouteRange + ExtCommunities() BgpV4RouteRangeBgpExtCommunityIter + // ExtendedCommunities returns BgpV4RouteRangeBgpExtendedCommunityIterIter, set in BgpV4RouteRange + ExtendedCommunities() BgpV4RouteRangeBgpExtendedCommunityIter + setNil() +} + +// A list of group of IPv4 route addresses. +// Addresses returns a []V4RouteAddress +func (obj *bgpV4RouteRange) Addresses() BgpV4RouteRangeV4RouteAddressIter { + if len(obj.obj.Addresses) == 0 { + obj.obj.Addresses = []*otg.V4RouteAddress{} + } + if obj.addressesHolder == nil { + obj.addressesHolder = newBgpV4RouteRangeV4RouteAddressIter(&obj.obj.Addresses).setMsg(obj) + } + return obj.addressesHolder +} + +type bgpV4RouteRangeV4RouteAddressIter struct { + obj *bgpV4RouteRange + v4RouteAddressSlice []V4RouteAddress + fieldPtr *[]*otg.V4RouteAddress +} + +func newBgpV4RouteRangeV4RouteAddressIter(ptr *[]*otg.V4RouteAddress) BgpV4RouteRangeV4RouteAddressIter { + return &bgpV4RouteRangeV4RouteAddressIter{fieldPtr: ptr} +} + +type BgpV4RouteRangeV4RouteAddressIter interface { + setMsg(*bgpV4RouteRange) BgpV4RouteRangeV4RouteAddressIter + Items() []V4RouteAddress + Add() V4RouteAddress + Append(items ...V4RouteAddress) BgpV4RouteRangeV4RouteAddressIter + Set(index int, newObj V4RouteAddress) BgpV4RouteRangeV4RouteAddressIter + Clear() BgpV4RouteRangeV4RouteAddressIter + clearHolderSlice() BgpV4RouteRangeV4RouteAddressIter + appendHolderSlice(item V4RouteAddress) BgpV4RouteRangeV4RouteAddressIter +} + +func (obj *bgpV4RouteRangeV4RouteAddressIter) setMsg(msg *bgpV4RouteRange) BgpV4RouteRangeV4RouteAddressIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&v4RouteAddress{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4RouteRangeV4RouteAddressIter) Items() []V4RouteAddress { + return obj.v4RouteAddressSlice +} + +func (obj *bgpV4RouteRangeV4RouteAddressIter) Add() V4RouteAddress { + newObj := &otg.V4RouteAddress{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &v4RouteAddress{obj: newObj} + newLibObj.setDefault() + obj.v4RouteAddressSlice = append(obj.v4RouteAddressSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4RouteRangeV4RouteAddressIter) Append(items ...V4RouteAddress) BgpV4RouteRangeV4RouteAddressIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.v4RouteAddressSlice = append(obj.v4RouteAddressSlice, item) + } + return obj +} + +func (obj *bgpV4RouteRangeV4RouteAddressIter) Set(index int, newObj V4RouteAddress) BgpV4RouteRangeV4RouteAddressIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.v4RouteAddressSlice[index] = newObj + return obj +} +func (obj *bgpV4RouteRangeV4RouteAddressIter) Clear() BgpV4RouteRangeV4RouteAddressIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.V4RouteAddress{} + obj.v4RouteAddressSlice = []V4RouteAddress{} + } + return obj +} +func (obj *bgpV4RouteRangeV4RouteAddressIter) clearHolderSlice() BgpV4RouteRangeV4RouteAddressIter { + if len(obj.v4RouteAddressSlice) > 0 { + obj.v4RouteAddressSlice = []V4RouteAddress{} + } + return obj +} +func (obj *bgpV4RouteRangeV4RouteAddressIter) appendHolderSlice(item V4RouteAddress) BgpV4RouteRangeV4RouteAddressIter { + obj.v4RouteAddressSlice = append(obj.v4RouteAddressSlice, item) + return obj +} + +type BgpV4RouteRangeNextHopModeEnum string + +// Enum of NextHopMode on BgpV4RouteRange +var BgpV4RouteRangeNextHopMode = struct { + LOCAL_IP BgpV4RouteRangeNextHopModeEnum + MANUAL BgpV4RouteRangeNextHopModeEnum +}{ + LOCAL_IP: BgpV4RouteRangeNextHopModeEnum("local_ip"), + MANUAL: BgpV4RouteRangeNextHopModeEnum("manual"), +} + +func (obj *bgpV4RouteRange) NextHopMode() BgpV4RouteRangeNextHopModeEnum { + return BgpV4RouteRangeNextHopModeEnum(obj.obj.NextHopMode.Enum().String()) +} + +// Specify the NextHop in MP REACH NLRI. The mode for setting the IP address of the NextHop in the MP REACH NLRI can be one of the following: +// Local IP: Automatically fills the Nexthop with the Local IP of the BGP +// peer. +// If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. +// Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. +// NextHopMode returns a string +func (obj *bgpV4RouteRange) HasNextHopMode() bool { + return obj.obj.NextHopMode != nil +} + +func (obj *bgpV4RouteRange) SetNextHopMode(value BgpV4RouteRangeNextHopModeEnum) BgpV4RouteRange { + intValue, ok := otg.BgpV4RouteRange_NextHopMode_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpV4RouteRangeNextHopModeEnum", string(value))) + return obj + } + enumValue := otg.BgpV4RouteRange_NextHopMode_Enum(intValue) + obj.obj.NextHopMode = &enumValue + + return obj +} + +type BgpV4RouteRangeNextHopAddressTypeEnum string + +// Enum of NextHopAddressType on BgpV4RouteRange +var BgpV4RouteRangeNextHopAddressType = struct { + IPV4 BgpV4RouteRangeNextHopAddressTypeEnum + IPV6 BgpV4RouteRangeNextHopAddressTypeEnum +}{ + IPV4: BgpV4RouteRangeNextHopAddressTypeEnum("ipv4"), + IPV6: BgpV4RouteRangeNextHopAddressTypeEnum("ipv6"), +} + +func (obj *bgpV4RouteRange) NextHopAddressType() BgpV4RouteRangeNextHopAddressTypeEnum { + return BgpV4RouteRangeNextHopAddressTypeEnum(obj.obj.NextHopAddressType.Enum().String()) +} + +// If the Nexthop Mode is Manual, it sets the type of the NextHop IP address. +// NextHopAddressType returns a string +func (obj *bgpV4RouteRange) HasNextHopAddressType() bool { + return obj.obj.NextHopAddressType != nil +} + +func (obj *bgpV4RouteRange) SetNextHopAddressType(value BgpV4RouteRangeNextHopAddressTypeEnum) BgpV4RouteRange { + intValue, ok := otg.BgpV4RouteRange_NextHopAddressType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpV4RouteRangeNextHopAddressTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpV4RouteRange_NextHopAddressType_Enum(intValue) + obj.obj.NextHopAddressType = &enumValue + + return obj +} + +// The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. +// NextHopIpv4Address returns a string +func (obj *bgpV4RouteRange) NextHopIpv4Address() string { + + return *obj.obj.NextHopIpv4Address + +} + +// The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. +// NextHopIpv4Address returns a string +func (obj *bgpV4RouteRange) HasNextHopIpv4Address() bool { + return obj.obj.NextHopIpv4Address != nil +} + +// The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. +// SetNextHopIpv4Address sets the string value in the BgpV4RouteRange object +func (obj *bgpV4RouteRange) SetNextHopIpv4Address(value string) BgpV4RouteRange { + + obj.obj.NextHopIpv4Address = &value + return obj +} + +// The IPv6 address of the next hop if the Nexthop Mode is manual and the Nexthop type is IPv6. +// NextHopIpv6Address returns a string +func (obj *bgpV4RouteRange) NextHopIpv6Address() string { + + return *obj.obj.NextHopIpv6Address + +} + +// The IPv6 address of the next hop if the Nexthop Mode is manual and the Nexthop type is IPv6. +// NextHopIpv6Address returns a string +func (obj *bgpV4RouteRange) HasNextHopIpv6Address() bool { + return obj.obj.NextHopIpv6Address != nil +} + +// The IPv6 address of the next hop if the Nexthop Mode is manual and the Nexthop type is IPv6. +// SetNextHopIpv6Address sets the string value in the BgpV4RouteRange object +func (obj *bgpV4RouteRange) SetNextHopIpv6Address(value string) BgpV4RouteRange { + + obj.obj.NextHopIpv6Address = &value + return obj +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpV4RouteRange) Advanced() BgpRouteAdvanced { + if obj.obj.Advanced == nil { + obj.obj.Advanced = NewBgpRouteAdvanced().msg() + } + if obj.advancedHolder == nil { + obj.advancedHolder = &bgpRouteAdvanced{obj: obj.obj.Advanced} + } + return obj.advancedHolder +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpV4RouteRange) HasAdvanced() bool { + return obj.obj.Advanced != nil +} + +// description is TBD +// SetAdvanced sets the BgpRouteAdvanced value in the BgpV4RouteRange object +func (obj *bgpV4RouteRange) SetAdvanced(value BgpRouteAdvanced) BgpV4RouteRange { + + obj.advancedHolder = nil + obj.obj.Advanced = value.msg() + + return obj +} + +// Optional community settings. +// Communities returns a []BgpCommunity +func (obj *bgpV4RouteRange) Communities() BgpV4RouteRangeBgpCommunityIter { + if len(obj.obj.Communities) == 0 { + obj.obj.Communities = []*otg.BgpCommunity{} + } + if obj.communitiesHolder == nil { + obj.communitiesHolder = newBgpV4RouteRangeBgpCommunityIter(&obj.obj.Communities).setMsg(obj) + } + return obj.communitiesHolder +} + +type bgpV4RouteRangeBgpCommunityIter struct { + obj *bgpV4RouteRange + bgpCommunitySlice []BgpCommunity + fieldPtr *[]*otg.BgpCommunity +} + +func newBgpV4RouteRangeBgpCommunityIter(ptr *[]*otg.BgpCommunity) BgpV4RouteRangeBgpCommunityIter { + return &bgpV4RouteRangeBgpCommunityIter{fieldPtr: ptr} +} + +type BgpV4RouteRangeBgpCommunityIter interface { + setMsg(*bgpV4RouteRange) BgpV4RouteRangeBgpCommunityIter + Items() []BgpCommunity + Add() BgpCommunity + Append(items ...BgpCommunity) BgpV4RouteRangeBgpCommunityIter + Set(index int, newObj BgpCommunity) BgpV4RouteRangeBgpCommunityIter + Clear() BgpV4RouteRangeBgpCommunityIter + clearHolderSlice() BgpV4RouteRangeBgpCommunityIter + appendHolderSlice(item BgpCommunity) BgpV4RouteRangeBgpCommunityIter +} + +func (obj *bgpV4RouteRangeBgpCommunityIter) setMsg(msg *bgpV4RouteRange) BgpV4RouteRangeBgpCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4RouteRangeBgpCommunityIter) Items() []BgpCommunity { + return obj.bgpCommunitySlice +} + +func (obj *bgpV4RouteRangeBgpCommunityIter) Add() BgpCommunity { + newObj := &otg.BgpCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4RouteRangeBgpCommunityIter) Append(items ...BgpCommunity) BgpV4RouteRangeBgpCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + } + return obj +} + +func (obj *bgpV4RouteRangeBgpCommunityIter) Set(index int, newObj BgpCommunity) BgpV4RouteRangeBgpCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpCommunitySlice[index] = newObj + return obj +} +func (obj *bgpV4RouteRangeBgpCommunityIter) Clear() BgpV4RouteRangeBgpCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpCommunity{} + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpV4RouteRangeBgpCommunityIter) clearHolderSlice() BgpV4RouteRangeBgpCommunityIter { + if len(obj.bgpCommunitySlice) > 0 { + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpV4RouteRangeBgpCommunityIter) appendHolderSlice(item BgpCommunity) BgpV4RouteRangeBgpCommunityIter { + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + return obj +} + +// description is TBD +// AsPath returns a BgpAsPath +func (obj *bgpV4RouteRange) AsPath() BgpAsPath { + if obj.obj.AsPath == nil { + obj.obj.AsPath = NewBgpAsPath().msg() + } + if obj.asPathHolder == nil { + obj.asPathHolder = &bgpAsPath{obj: obj.obj.AsPath} + } + return obj.asPathHolder +} + +// description is TBD +// AsPath returns a BgpAsPath +func (obj *bgpV4RouteRange) HasAsPath() bool { + return obj.obj.AsPath != nil +} + +// description is TBD +// SetAsPath sets the BgpAsPath value in the BgpV4RouteRange object +func (obj *bgpV4RouteRange) SetAsPath(value BgpAsPath) BgpV4RouteRange { + + obj.asPathHolder = nil + obj.obj.AsPath = value.msg() + + return obj +} + +// description is TBD +// AddPath returns a BgpAddPath +func (obj *bgpV4RouteRange) AddPath() BgpAddPath { + if obj.obj.AddPath == nil { + obj.obj.AddPath = NewBgpAddPath().msg() + } + if obj.addPathHolder == nil { + obj.addPathHolder = &bgpAddPath{obj: obj.obj.AddPath} + } + return obj.addPathHolder +} + +// description is TBD +// AddPath returns a BgpAddPath +func (obj *bgpV4RouteRange) HasAddPath() bool { + return obj.obj.AddPath != nil +} + +// description is TBD +// SetAddPath sets the BgpAddPath value in the BgpV4RouteRange object +func (obj *bgpV4RouteRange) SetAddPath(value BgpAddPath) BgpV4RouteRange { + + obj.addPathHolder = nil + obj.obj.AddPath = value.msg() + + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *bgpV4RouteRange) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the BgpV4RouteRange object +func (obj *bgpV4RouteRange) SetName(value string) BgpV4RouteRange { + + obj.obj.Name = &value + return obj +} + +// Deprecated: This property is deprecated in favor of property extended_communities +// +// Deprecated: This property is deprecated in favor of property extended_communities +// +// Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. Note evpn type is defined mainly for use with evpn route updates and not for IPv4 and IPv6 route updates. +// ExtCommunities returns a []BgpExtCommunity +func (obj *bgpV4RouteRange) ExtCommunities() BgpV4RouteRangeBgpExtCommunityIter { + if len(obj.obj.ExtCommunities) == 0 { + obj.obj.ExtCommunities = []*otg.BgpExtCommunity{} + } + if obj.extCommunitiesHolder == nil { + obj.extCommunitiesHolder = newBgpV4RouteRangeBgpExtCommunityIter(&obj.obj.ExtCommunities).setMsg(obj) + } + return obj.extCommunitiesHolder +} + +type bgpV4RouteRangeBgpExtCommunityIter struct { + obj *bgpV4RouteRange + bgpExtCommunitySlice []BgpExtCommunity + fieldPtr *[]*otg.BgpExtCommunity +} + +func newBgpV4RouteRangeBgpExtCommunityIter(ptr *[]*otg.BgpExtCommunity) BgpV4RouteRangeBgpExtCommunityIter { + return &bgpV4RouteRangeBgpExtCommunityIter{fieldPtr: ptr} +} + +type BgpV4RouteRangeBgpExtCommunityIter interface { + setMsg(*bgpV4RouteRange) BgpV4RouteRangeBgpExtCommunityIter + Items() []BgpExtCommunity + Add() BgpExtCommunity + Append(items ...BgpExtCommunity) BgpV4RouteRangeBgpExtCommunityIter + Set(index int, newObj BgpExtCommunity) BgpV4RouteRangeBgpExtCommunityIter + Clear() BgpV4RouteRangeBgpExtCommunityIter + clearHolderSlice() BgpV4RouteRangeBgpExtCommunityIter + appendHolderSlice(item BgpExtCommunity) BgpV4RouteRangeBgpExtCommunityIter +} + +func (obj *bgpV4RouteRangeBgpExtCommunityIter) setMsg(msg *bgpV4RouteRange) BgpV4RouteRangeBgpExtCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpExtCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4RouteRangeBgpExtCommunityIter) Items() []BgpExtCommunity { + return obj.bgpExtCommunitySlice +} + +func (obj *bgpV4RouteRangeBgpExtCommunityIter) Add() BgpExtCommunity { + newObj := &otg.BgpExtCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpExtCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4RouteRangeBgpExtCommunityIter) Append(items ...BgpExtCommunity) BgpV4RouteRangeBgpExtCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + } + return obj +} + +func (obj *bgpV4RouteRangeBgpExtCommunityIter) Set(index int, newObj BgpExtCommunity) BgpV4RouteRangeBgpExtCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpExtCommunitySlice[index] = newObj + return obj +} +func (obj *bgpV4RouteRangeBgpExtCommunityIter) Clear() BgpV4RouteRangeBgpExtCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpExtCommunity{} + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpV4RouteRangeBgpExtCommunityIter) clearHolderSlice() BgpV4RouteRangeBgpExtCommunityIter { + if len(obj.bgpExtCommunitySlice) > 0 { + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpV4RouteRangeBgpExtCommunityIter) appendHolderSlice(item BgpExtCommunity) BgpV4RouteRangeBgpExtCommunityIter { + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + return obj +} + +// Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an eight byte value. It is divided into two main parts. The first two bytes of the community encode a type and sub-type fields and the last six bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. +// ExtendedCommunities returns a []BgpExtendedCommunity +func (obj *bgpV4RouteRange) ExtendedCommunities() BgpV4RouteRangeBgpExtendedCommunityIter { + if len(obj.obj.ExtendedCommunities) == 0 { + obj.obj.ExtendedCommunities = []*otg.BgpExtendedCommunity{} + } + if obj.extendedCommunitiesHolder == nil { + obj.extendedCommunitiesHolder = newBgpV4RouteRangeBgpExtendedCommunityIter(&obj.obj.ExtendedCommunities).setMsg(obj) + } + return obj.extendedCommunitiesHolder +} + +type bgpV4RouteRangeBgpExtendedCommunityIter struct { + obj *bgpV4RouteRange + bgpExtendedCommunitySlice []BgpExtendedCommunity + fieldPtr *[]*otg.BgpExtendedCommunity +} + +func newBgpV4RouteRangeBgpExtendedCommunityIter(ptr *[]*otg.BgpExtendedCommunity) BgpV4RouteRangeBgpExtendedCommunityIter { + return &bgpV4RouteRangeBgpExtendedCommunityIter{fieldPtr: ptr} +} + +type BgpV4RouteRangeBgpExtendedCommunityIter interface { + setMsg(*bgpV4RouteRange) BgpV4RouteRangeBgpExtendedCommunityIter + Items() []BgpExtendedCommunity + Add() BgpExtendedCommunity + Append(items ...BgpExtendedCommunity) BgpV4RouteRangeBgpExtendedCommunityIter + Set(index int, newObj BgpExtendedCommunity) BgpV4RouteRangeBgpExtendedCommunityIter + Clear() BgpV4RouteRangeBgpExtendedCommunityIter + clearHolderSlice() BgpV4RouteRangeBgpExtendedCommunityIter + appendHolderSlice(item BgpExtendedCommunity) BgpV4RouteRangeBgpExtendedCommunityIter +} + +func (obj *bgpV4RouteRangeBgpExtendedCommunityIter) setMsg(msg *bgpV4RouteRange) BgpV4RouteRangeBgpExtendedCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpExtendedCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV4RouteRangeBgpExtendedCommunityIter) Items() []BgpExtendedCommunity { + return obj.bgpExtendedCommunitySlice +} + +func (obj *bgpV4RouteRangeBgpExtendedCommunityIter) Add() BgpExtendedCommunity { + newObj := &otg.BgpExtendedCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpExtendedCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpExtendedCommunitySlice = append(obj.bgpExtendedCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV4RouteRangeBgpExtendedCommunityIter) Append(items ...BgpExtendedCommunity) BgpV4RouteRangeBgpExtendedCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpExtendedCommunitySlice = append(obj.bgpExtendedCommunitySlice, item) + } + return obj +} + +func (obj *bgpV4RouteRangeBgpExtendedCommunityIter) Set(index int, newObj BgpExtendedCommunity) BgpV4RouteRangeBgpExtendedCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpExtendedCommunitySlice[index] = newObj + return obj +} +func (obj *bgpV4RouteRangeBgpExtendedCommunityIter) Clear() BgpV4RouteRangeBgpExtendedCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpExtendedCommunity{} + obj.bgpExtendedCommunitySlice = []BgpExtendedCommunity{} + } + return obj +} +func (obj *bgpV4RouteRangeBgpExtendedCommunityIter) clearHolderSlice() BgpV4RouteRangeBgpExtendedCommunityIter { + if len(obj.bgpExtendedCommunitySlice) > 0 { + obj.bgpExtendedCommunitySlice = []BgpExtendedCommunity{} + } + return obj +} +func (obj *bgpV4RouteRangeBgpExtendedCommunityIter) appendHolderSlice(item BgpExtendedCommunity) BgpV4RouteRangeBgpExtendedCommunityIter { + obj.bgpExtendedCommunitySlice = append(obj.bgpExtendedCommunitySlice, item) + return obj +} + +func (obj *bgpV4RouteRange) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Addresses) != 0 { + + if set_default { + obj.Addresses().clearHolderSlice() + for _, item := range obj.obj.Addresses { + obj.Addresses().appendHolderSlice(&v4RouteAddress{obj: item}) + } + } + for _, item := range obj.Addresses().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.NextHopIpv4Address != nil { + + err := obj.validateIpv4(obj.NextHopIpv4Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpV4RouteRange.NextHopIpv4Address")) + } + + } + + if obj.obj.NextHopIpv6Address != nil { + + err := obj.validateIpv6(obj.NextHopIpv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpV4RouteRange.NextHopIpv6Address")) + } + + } + + if obj.obj.Advanced != nil { + + obj.Advanced().validateObj(vObj, set_default) + } + + if len(obj.obj.Communities) != 0 { + + if set_default { + obj.Communities().clearHolderSlice() + for _, item := range obj.obj.Communities { + obj.Communities().appendHolderSlice(&bgpCommunity{obj: item}) + } + } + for _, item := range obj.Communities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.AsPath != nil { + + obj.AsPath().validateObj(vObj, set_default) + } + + if obj.obj.AddPath != nil { + + obj.AddPath().validateObj(vObj, set_default) + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface BgpV4RouteRange") + } + + if len(obj.obj.ExtCommunities) != 0 { + obj.addWarnings("ExtCommunities property in schema BgpV4RouteRange is deprecated, This property is deprecated in favor of property extended_communities") + + if set_default { + obj.ExtCommunities().clearHolderSlice() + for _, item := range obj.obj.ExtCommunities { + obj.ExtCommunities().appendHolderSlice(&bgpExtCommunity{obj: item}) + } + } + for _, item := range obj.ExtCommunities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.ExtendedCommunities) != 0 { + + if set_default { + obj.ExtendedCommunities().clearHolderSlice() + for _, item := range obj.obj.ExtendedCommunities { + obj.ExtendedCommunities().appendHolderSlice(&bgpExtendedCommunity{obj: item}) + } + } + for _, item := range obj.ExtendedCommunities().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpV4RouteRange) setDefault() { + if obj.obj.NextHopMode == nil { + obj.SetNextHopMode(BgpV4RouteRangeNextHopMode.LOCAL_IP) + + } + if obj.obj.NextHopAddressType == nil { + obj.SetNextHopAddressType(BgpV4RouteRangeNextHopAddressType.IPV4) + + } + if obj.obj.NextHopIpv4Address == nil { + obj.SetNextHopIpv4Address("0.0.0.0") + } + if obj.obj.NextHopIpv6Address == nil { + obj.SetNextHopIpv6Address("::0") + } + +} diff --git a/gosnappi/bgp_v6_ethernet_segment.go b/gosnappi/bgp_v6_ethernet_segment.go new file mode 100644 index 00000000..ad6f3942 --- /dev/null +++ b/gosnappi/bgp_v6_ethernet_segment.go @@ -0,0 +1,856 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV6EthernetSegment ***** +type bgpV6EthernetSegment struct { + validation + obj *otg.BgpV6EthernetSegment + marshaller marshalBgpV6EthernetSegment + unMarshaller unMarshalBgpV6EthernetSegment + dfElectionHolder BgpEthernetSegmentDfElection + evisHolder BgpV6EthernetSegmentBgpV6EvpnEvisIter + advancedHolder BgpRouteAdvanced + communitiesHolder BgpV6EthernetSegmentBgpCommunityIter + extCommunitiesHolder BgpV6EthernetSegmentBgpExtCommunityIter + asPathHolder BgpAsPath +} + +func NewBgpV6EthernetSegment() BgpV6EthernetSegment { + obj := bgpV6EthernetSegment{obj: &otg.BgpV6EthernetSegment{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV6EthernetSegment) msg() *otg.BgpV6EthernetSegment { + return obj.obj +} + +func (obj *bgpV6EthernetSegment) setMsg(msg *otg.BgpV6EthernetSegment) BgpV6EthernetSegment { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV6EthernetSegment struct { + obj *bgpV6EthernetSegment +} + +type marshalBgpV6EthernetSegment interface { + // ToProto marshals BgpV6EthernetSegment to protobuf object *otg.BgpV6EthernetSegment + ToProto() (*otg.BgpV6EthernetSegment, error) + // ToPbText marshals BgpV6EthernetSegment to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV6EthernetSegment to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV6EthernetSegment to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV6EthernetSegment struct { + obj *bgpV6EthernetSegment +} + +type unMarshalBgpV6EthernetSegment interface { + // FromProto unmarshals BgpV6EthernetSegment from protobuf object *otg.BgpV6EthernetSegment + FromProto(msg *otg.BgpV6EthernetSegment) (BgpV6EthernetSegment, error) + // FromPbText unmarshals BgpV6EthernetSegment from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV6EthernetSegment from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV6EthernetSegment from JSON text + FromJson(value string) error +} + +func (obj *bgpV6EthernetSegment) Marshal() marshalBgpV6EthernetSegment { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV6EthernetSegment{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV6EthernetSegment) Unmarshal() unMarshalBgpV6EthernetSegment { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV6EthernetSegment{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV6EthernetSegment) ToProto() (*otg.BgpV6EthernetSegment, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV6EthernetSegment) FromProto(msg *otg.BgpV6EthernetSegment) (BgpV6EthernetSegment, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV6EthernetSegment) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV6EthernetSegment) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV6EthernetSegment) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6EthernetSegment) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV6EthernetSegment) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6EthernetSegment) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV6EthernetSegment) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV6EthernetSegment) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV6EthernetSegment) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV6EthernetSegment) Clone() (BgpV6EthernetSegment, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV6EthernetSegment() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpV6EthernetSegment) setNil() { + obj.dfElectionHolder = nil + obj.evisHolder = nil + obj.advancedHolder = nil + obj.communitiesHolder = nil + obj.extCommunitiesHolder = nil + obj.asPathHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpV6EthernetSegment is configuration for BGP Ethernet Segment ranges. Advertises following routes - +// +// Type 4 - Ethernet Segment Route +type BgpV6EthernetSegment interface { + Validation + // msg marshals BgpV6EthernetSegment to protobuf object *otg.BgpV6EthernetSegment + // and doesn't set defaults + msg() *otg.BgpV6EthernetSegment + // setMsg unmarshals BgpV6EthernetSegment from protobuf object *otg.BgpV6EthernetSegment + // and doesn't set defaults + setMsg(*otg.BgpV6EthernetSegment) BgpV6EthernetSegment + // provides marshal interface + Marshal() marshalBgpV6EthernetSegment + // provides unmarshal interface + Unmarshal() unMarshalBgpV6EthernetSegment + // validate validates BgpV6EthernetSegment + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV6EthernetSegment, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // DfElection returns BgpEthernetSegmentDfElection, set in BgpV6EthernetSegment. + // BgpEthernetSegmentDfElection is configuration for Designated Forwarder (DF) election among the Provider Edge (PE) routers on the same Ethernet Segment. + DfElection() BgpEthernetSegmentDfElection + // SetDfElection assigns BgpEthernetSegmentDfElection provided by user to BgpV6EthernetSegment. + // BgpEthernetSegmentDfElection is configuration for Designated Forwarder (DF) election among the Provider Edge (PE) routers on the same Ethernet Segment. + SetDfElection(value BgpEthernetSegmentDfElection) BgpV6EthernetSegment + // HasDfElection checks if DfElection has been set in BgpV6EthernetSegment + HasDfElection() bool + // Evis returns BgpV6EthernetSegmentBgpV6EvpnEvisIterIter, set in BgpV6EthernetSegment + Evis() BgpV6EthernetSegmentBgpV6EvpnEvisIter + // Esi returns string, set in BgpV6EthernetSegment. + Esi() string + // SetEsi assigns string provided by user to BgpV6EthernetSegment + SetEsi(value string) BgpV6EthernetSegment + // HasEsi checks if Esi has been set in BgpV6EthernetSegment + HasEsi() bool + // ActiveMode returns BgpV6EthernetSegmentActiveModeEnum, set in BgpV6EthernetSegment + ActiveMode() BgpV6EthernetSegmentActiveModeEnum + // SetActiveMode assigns BgpV6EthernetSegmentActiveModeEnum provided by user to BgpV6EthernetSegment + SetActiveMode(value BgpV6EthernetSegmentActiveModeEnum) BgpV6EthernetSegment + // HasActiveMode checks if ActiveMode has been set in BgpV6EthernetSegment + HasActiveMode() bool + // EsiLabel returns uint32, set in BgpV6EthernetSegment. + EsiLabel() uint32 + // SetEsiLabel assigns uint32 provided by user to BgpV6EthernetSegment + SetEsiLabel(value uint32) BgpV6EthernetSegment + // HasEsiLabel checks if EsiLabel has been set in BgpV6EthernetSegment + HasEsiLabel() bool + // Advanced returns BgpRouteAdvanced, set in BgpV6EthernetSegment. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + Advanced() BgpRouteAdvanced + // SetAdvanced assigns BgpRouteAdvanced provided by user to BgpV6EthernetSegment. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + SetAdvanced(value BgpRouteAdvanced) BgpV6EthernetSegment + // HasAdvanced checks if Advanced has been set in BgpV6EthernetSegment + HasAdvanced() bool + // Communities returns BgpV6EthernetSegmentBgpCommunityIterIter, set in BgpV6EthernetSegment + Communities() BgpV6EthernetSegmentBgpCommunityIter + // ExtCommunities returns BgpV6EthernetSegmentBgpExtCommunityIterIter, set in BgpV6EthernetSegment + ExtCommunities() BgpV6EthernetSegmentBgpExtCommunityIter + // AsPath returns BgpAsPath, set in BgpV6EthernetSegment. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + AsPath() BgpAsPath + // SetAsPath assigns BgpAsPath provided by user to BgpV6EthernetSegment. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + SetAsPath(value BgpAsPath) BgpV6EthernetSegment + // HasAsPath checks if AsPath has been set in BgpV6EthernetSegment + HasAsPath() bool + setNil() +} + +// Designated Forwarder (DF) election configuration. +// DfElection returns a BgpEthernetSegmentDfElection +func (obj *bgpV6EthernetSegment) DfElection() BgpEthernetSegmentDfElection { + if obj.obj.DfElection == nil { + obj.obj.DfElection = NewBgpEthernetSegmentDfElection().msg() + } + if obj.dfElectionHolder == nil { + obj.dfElectionHolder = &bgpEthernetSegmentDfElection{obj: obj.obj.DfElection} + } + return obj.dfElectionHolder +} + +// Designated Forwarder (DF) election configuration. +// DfElection returns a BgpEthernetSegmentDfElection +func (obj *bgpV6EthernetSegment) HasDfElection() bool { + return obj.obj.DfElection != nil +} + +// Designated Forwarder (DF) election configuration. +// SetDfElection sets the BgpEthernetSegmentDfElection value in the BgpV6EthernetSegment object +func (obj *bgpV6EthernetSegment) SetDfElection(value BgpEthernetSegmentDfElection) BgpV6EthernetSegment { + + obj.dfElectionHolder = nil + obj.obj.DfElection = value.msg() + + return obj +} + +// This contains the list of EVIs. +// Evis returns a []BgpV6EvpnEvis +func (obj *bgpV6EthernetSegment) Evis() BgpV6EthernetSegmentBgpV6EvpnEvisIter { + if len(obj.obj.Evis) == 0 { + obj.obj.Evis = []*otg.BgpV6EvpnEvis{} + } + if obj.evisHolder == nil { + obj.evisHolder = newBgpV6EthernetSegmentBgpV6EvpnEvisIter(&obj.obj.Evis).setMsg(obj) + } + return obj.evisHolder +} + +type bgpV6EthernetSegmentBgpV6EvpnEvisIter struct { + obj *bgpV6EthernetSegment + bgpV6EvpnEvisSlice []BgpV6EvpnEvis + fieldPtr *[]*otg.BgpV6EvpnEvis +} + +func newBgpV6EthernetSegmentBgpV6EvpnEvisIter(ptr *[]*otg.BgpV6EvpnEvis) BgpV6EthernetSegmentBgpV6EvpnEvisIter { + return &bgpV6EthernetSegmentBgpV6EvpnEvisIter{fieldPtr: ptr} +} + +type BgpV6EthernetSegmentBgpV6EvpnEvisIter interface { + setMsg(*bgpV6EthernetSegment) BgpV6EthernetSegmentBgpV6EvpnEvisIter + Items() []BgpV6EvpnEvis + Add() BgpV6EvpnEvis + Append(items ...BgpV6EvpnEvis) BgpV6EthernetSegmentBgpV6EvpnEvisIter + Set(index int, newObj BgpV6EvpnEvis) BgpV6EthernetSegmentBgpV6EvpnEvisIter + Clear() BgpV6EthernetSegmentBgpV6EvpnEvisIter + clearHolderSlice() BgpV6EthernetSegmentBgpV6EvpnEvisIter + appendHolderSlice(item BgpV6EvpnEvis) BgpV6EthernetSegmentBgpV6EvpnEvisIter +} + +func (obj *bgpV6EthernetSegmentBgpV6EvpnEvisIter) setMsg(msg *bgpV6EthernetSegment) BgpV6EthernetSegmentBgpV6EvpnEvisIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpV6EvpnEvis{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6EthernetSegmentBgpV6EvpnEvisIter) Items() []BgpV6EvpnEvis { + return obj.bgpV6EvpnEvisSlice +} + +func (obj *bgpV6EthernetSegmentBgpV6EvpnEvisIter) Add() BgpV6EvpnEvis { + newObj := &otg.BgpV6EvpnEvis{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpV6EvpnEvis{obj: newObj} + newLibObj.setDefault() + obj.bgpV6EvpnEvisSlice = append(obj.bgpV6EvpnEvisSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6EthernetSegmentBgpV6EvpnEvisIter) Append(items ...BgpV6EvpnEvis) BgpV6EthernetSegmentBgpV6EvpnEvisIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpV6EvpnEvisSlice = append(obj.bgpV6EvpnEvisSlice, item) + } + return obj +} + +func (obj *bgpV6EthernetSegmentBgpV6EvpnEvisIter) Set(index int, newObj BgpV6EvpnEvis) BgpV6EthernetSegmentBgpV6EvpnEvisIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpV6EvpnEvisSlice[index] = newObj + return obj +} +func (obj *bgpV6EthernetSegmentBgpV6EvpnEvisIter) Clear() BgpV6EthernetSegmentBgpV6EvpnEvisIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpV6EvpnEvis{} + obj.bgpV6EvpnEvisSlice = []BgpV6EvpnEvis{} + } + return obj +} +func (obj *bgpV6EthernetSegmentBgpV6EvpnEvisIter) clearHolderSlice() BgpV6EthernetSegmentBgpV6EvpnEvisIter { + if len(obj.bgpV6EvpnEvisSlice) > 0 { + obj.bgpV6EvpnEvisSlice = []BgpV6EvpnEvis{} + } + return obj +} +func (obj *bgpV6EthernetSegmentBgpV6EvpnEvisIter) appendHolderSlice(item BgpV6EvpnEvis) BgpV6EthernetSegmentBgpV6EvpnEvisIter { + obj.bgpV6EvpnEvisSlice = append(obj.bgpV6EvpnEvisSlice, item) + return obj +} + +// 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero ESI is '10000000000000000000' . +// Esi returns a string +func (obj *bgpV6EthernetSegment) Esi() string { + + return *obj.obj.Esi + +} + +// 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero ESI is '10000000000000000000' . +// Esi returns a string +func (obj *bgpV6EthernetSegment) HasEsi() bool { + return obj.obj.Esi != nil +} + +// 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero ESI is '10000000000000000000' . +// SetEsi sets the string value in the BgpV6EthernetSegment object +func (obj *bgpV6EthernetSegment) SetEsi(value string) BgpV6EthernetSegment { + + obj.obj.Esi = &value + return obj +} + +type BgpV6EthernetSegmentActiveModeEnum string + +// Enum of ActiveMode on BgpV6EthernetSegment +var BgpV6EthernetSegmentActiveMode = struct { + SINGLE_ACTIVE BgpV6EthernetSegmentActiveModeEnum + ALL_ACTIVE BgpV6EthernetSegmentActiveModeEnum +}{ + SINGLE_ACTIVE: BgpV6EthernetSegmentActiveModeEnum("single_active"), + ALL_ACTIVE: BgpV6EthernetSegmentActiveModeEnum("all_active"), +} + +func (obj *bgpV6EthernetSegment) ActiveMode() BgpV6EthernetSegmentActiveModeEnum { + return BgpV6EthernetSegmentActiveModeEnum(obj.obj.ActiveMode.Enum().String()) +} + +// Single Active or All Active mode Redundancy mode selection for Multi-home. +// ActiveMode returns a string +func (obj *bgpV6EthernetSegment) HasActiveMode() bool { + return obj.obj.ActiveMode != nil +} + +func (obj *bgpV6EthernetSegment) SetActiveMode(value BgpV6EthernetSegmentActiveModeEnum) BgpV6EthernetSegment { + intValue, ok := otg.BgpV6EthernetSegment_ActiveMode_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpV6EthernetSegmentActiveModeEnum", string(value))) + return obj + } + enumValue := otg.BgpV6EthernetSegment_ActiveMode_Enum(intValue) + obj.obj.ActiveMode = &enumValue + + return obj +} + +// The label value to be advertised as ESI Label in ESI Label Extended Community. This is included in Ethernet Auto-discovery per ES Routes advertised by a router. +// EsiLabel returns a uint32 +func (obj *bgpV6EthernetSegment) EsiLabel() uint32 { + + return *obj.obj.EsiLabel + +} + +// The label value to be advertised as ESI Label in ESI Label Extended Community. This is included in Ethernet Auto-discovery per ES Routes advertised by a router. +// EsiLabel returns a uint32 +func (obj *bgpV6EthernetSegment) HasEsiLabel() bool { + return obj.obj.EsiLabel != nil +} + +// The label value to be advertised as ESI Label in ESI Label Extended Community. This is included in Ethernet Auto-discovery per ES Routes advertised by a router. +// SetEsiLabel sets the uint32 value in the BgpV6EthernetSegment object +func (obj *bgpV6EthernetSegment) SetEsiLabel(value uint32) BgpV6EthernetSegment { + + obj.obj.EsiLabel = &value + return obj +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpV6EthernetSegment) Advanced() BgpRouteAdvanced { + if obj.obj.Advanced == nil { + obj.obj.Advanced = NewBgpRouteAdvanced().msg() + } + if obj.advancedHolder == nil { + obj.advancedHolder = &bgpRouteAdvanced{obj: obj.obj.Advanced} + } + return obj.advancedHolder +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpV6EthernetSegment) HasAdvanced() bool { + return obj.obj.Advanced != nil +} + +// description is TBD +// SetAdvanced sets the BgpRouteAdvanced value in the BgpV6EthernetSegment object +func (obj *bgpV6EthernetSegment) SetAdvanced(value BgpRouteAdvanced) BgpV6EthernetSegment { + + obj.advancedHolder = nil + obj.obj.Advanced = value.msg() + + return obj +} + +// Optional community settings. +// Communities returns a []BgpCommunity +func (obj *bgpV6EthernetSegment) Communities() BgpV6EthernetSegmentBgpCommunityIter { + if len(obj.obj.Communities) == 0 { + obj.obj.Communities = []*otg.BgpCommunity{} + } + if obj.communitiesHolder == nil { + obj.communitiesHolder = newBgpV6EthernetSegmentBgpCommunityIter(&obj.obj.Communities).setMsg(obj) + } + return obj.communitiesHolder +} + +type bgpV6EthernetSegmentBgpCommunityIter struct { + obj *bgpV6EthernetSegment + bgpCommunitySlice []BgpCommunity + fieldPtr *[]*otg.BgpCommunity +} + +func newBgpV6EthernetSegmentBgpCommunityIter(ptr *[]*otg.BgpCommunity) BgpV6EthernetSegmentBgpCommunityIter { + return &bgpV6EthernetSegmentBgpCommunityIter{fieldPtr: ptr} +} + +type BgpV6EthernetSegmentBgpCommunityIter interface { + setMsg(*bgpV6EthernetSegment) BgpV6EthernetSegmentBgpCommunityIter + Items() []BgpCommunity + Add() BgpCommunity + Append(items ...BgpCommunity) BgpV6EthernetSegmentBgpCommunityIter + Set(index int, newObj BgpCommunity) BgpV6EthernetSegmentBgpCommunityIter + Clear() BgpV6EthernetSegmentBgpCommunityIter + clearHolderSlice() BgpV6EthernetSegmentBgpCommunityIter + appendHolderSlice(item BgpCommunity) BgpV6EthernetSegmentBgpCommunityIter +} + +func (obj *bgpV6EthernetSegmentBgpCommunityIter) setMsg(msg *bgpV6EthernetSegment) BgpV6EthernetSegmentBgpCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6EthernetSegmentBgpCommunityIter) Items() []BgpCommunity { + return obj.bgpCommunitySlice +} + +func (obj *bgpV6EthernetSegmentBgpCommunityIter) Add() BgpCommunity { + newObj := &otg.BgpCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6EthernetSegmentBgpCommunityIter) Append(items ...BgpCommunity) BgpV6EthernetSegmentBgpCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + } + return obj +} + +func (obj *bgpV6EthernetSegmentBgpCommunityIter) Set(index int, newObj BgpCommunity) BgpV6EthernetSegmentBgpCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpCommunitySlice[index] = newObj + return obj +} +func (obj *bgpV6EthernetSegmentBgpCommunityIter) Clear() BgpV6EthernetSegmentBgpCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpCommunity{} + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpV6EthernetSegmentBgpCommunityIter) clearHolderSlice() BgpV6EthernetSegmentBgpCommunityIter { + if len(obj.bgpCommunitySlice) > 0 { + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpV6EthernetSegmentBgpCommunityIter) appendHolderSlice(item BgpCommunity) BgpV6EthernetSegmentBgpCommunityIter { + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + return obj +} + +// Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. +// ExtCommunities returns a []BgpExtCommunity +func (obj *bgpV6EthernetSegment) ExtCommunities() BgpV6EthernetSegmentBgpExtCommunityIter { + if len(obj.obj.ExtCommunities) == 0 { + obj.obj.ExtCommunities = []*otg.BgpExtCommunity{} + } + if obj.extCommunitiesHolder == nil { + obj.extCommunitiesHolder = newBgpV6EthernetSegmentBgpExtCommunityIter(&obj.obj.ExtCommunities).setMsg(obj) + } + return obj.extCommunitiesHolder +} + +type bgpV6EthernetSegmentBgpExtCommunityIter struct { + obj *bgpV6EthernetSegment + bgpExtCommunitySlice []BgpExtCommunity + fieldPtr *[]*otg.BgpExtCommunity +} + +func newBgpV6EthernetSegmentBgpExtCommunityIter(ptr *[]*otg.BgpExtCommunity) BgpV6EthernetSegmentBgpExtCommunityIter { + return &bgpV6EthernetSegmentBgpExtCommunityIter{fieldPtr: ptr} +} + +type BgpV6EthernetSegmentBgpExtCommunityIter interface { + setMsg(*bgpV6EthernetSegment) BgpV6EthernetSegmentBgpExtCommunityIter + Items() []BgpExtCommunity + Add() BgpExtCommunity + Append(items ...BgpExtCommunity) BgpV6EthernetSegmentBgpExtCommunityIter + Set(index int, newObj BgpExtCommunity) BgpV6EthernetSegmentBgpExtCommunityIter + Clear() BgpV6EthernetSegmentBgpExtCommunityIter + clearHolderSlice() BgpV6EthernetSegmentBgpExtCommunityIter + appendHolderSlice(item BgpExtCommunity) BgpV6EthernetSegmentBgpExtCommunityIter +} + +func (obj *bgpV6EthernetSegmentBgpExtCommunityIter) setMsg(msg *bgpV6EthernetSegment) BgpV6EthernetSegmentBgpExtCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpExtCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6EthernetSegmentBgpExtCommunityIter) Items() []BgpExtCommunity { + return obj.bgpExtCommunitySlice +} + +func (obj *bgpV6EthernetSegmentBgpExtCommunityIter) Add() BgpExtCommunity { + newObj := &otg.BgpExtCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpExtCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6EthernetSegmentBgpExtCommunityIter) Append(items ...BgpExtCommunity) BgpV6EthernetSegmentBgpExtCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + } + return obj +} + +func (obj *bgpV6EthernetSegmentBgpExtCommunityIter) Set(index int, newObj BgpExtCommunity) BgpV6EthernetSegmentBgpExtCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpExtCommunitySlice[index] = newObj + return obj +} +func (obj *bgpV6EthernetSegmentBgpExtCommunityIter) Clear() BgpV6EthernetSegmentBgpExtCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpExtCommunity{} + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpV6EthernetSegmentBgpExtCommunityIter) clearHolderSlice() BgpV6EthernetSegmentBgpExtCommunityIter { + if len(obj.bgpExtCommunitySlice) > 0 { + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpV6EthernetSegmentBgpExtCommunityIter) appendHolderSlice(item BgpExtCommunity) BgpV6EthernetSegmentBgpExtCommunityIter { + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + return obj +} + +// Optional AS PATH settings. +// AsPath returns a BgpAsPath +func (obj *bgpV6EthernetSegment) AsPath() BgpAsPath { + if obj.obj.AsPath == nil { + obj.obj.AsPath = NewBgpAsPath().msg() + } + if obj.asPathHolder == nil { + obj.asPathHolder = &bgpAsPath{obj: obj.obj.AsPath} + } + return obj.asPathHolder +} + +// Optional AS PATH settings. +// AsPath returns a BgpAsPath +func (obj *bgpV6EthernetSegment) HasAsPath() bool { + return obj.obj.AsPath != nil +} + +// Optional AS PATH settings. +// SetAsPath sets the BgpAsPath value in the BgpV6EthernetSegment object +func (obj *bgpV6EthernetSegment) SetAsPath(value BgpAsPath) BgpV6EthernetSegment { + + obj.asPathHolder = nil + obj.obj.AsPath = value.msg() + + return obj +} + +func (obj *bgpV6EthernetSegment) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.DfElection != nil { + + obj.DfElection().validateObj(vObj, set_default) + } + + if len(obj.obj.Evis) != 0 { + + if set_default { + obj.Evis().clearHolderSlice() + for _, item := range obj.obj.Evis { + obj.Evis().appendHolderSlice(&bgpV6EvpnEvis{obj: item}) + } + } + for _, item := range obj.Evis().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Esi != nil { + + err := obj.validateHex(obj.Esi()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpV6EthernetSegment.Esi")) + } + + } + + if obj.obj.EsiLabel != nil { + + if *obj.obj.EsiLabel > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpV6EthernetSegment.EsiLabel <= 16777215 but Got %d", *obj.obj.EsiLabel)) + } + + } + + if obj.obj.Advanced != nil { + + obj.Advanced().validateObj(vObj, set_default) + } + + if len(obj.obj.Communities) != 0 { + + if set_default { + obj.Communities().clearHolderSlice() + for _, item := range obj.obj.Communities { + obj.Communities().appendHolderSlice(&bgpCommunity{obj: item}) + } + } + for _, item := range obj.Communities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.ExtCommunities) != 0 { + + if set_default { + obj.ExtCommunities().clearHolderSlice() + for _, item := range obj.obj.ExtCommunities { + obj.ExtCommunities().appendHolderSlice(&bgpExtCommunity{obj: item}) + } + } + for _, item := range obj.ExtCommunities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.AsPath != nil { + + obj.AsPath().validateObj(vObj, set_default) + } + +} + +func (obj *bgpV6EthernetSegment) setDefault() { + if obj.obj.Esi == nil { + obj.SetEsi("00000000000000000000") + } + if obj.obj.ActiveMode == nil { + obj.SetActiveMode(BgpV6EthernetSegmentActiveMode.ALL_ACTIVE) + + } + if obj.obj.EsiLabel == nil { + obj.SetEsiLabel(0) + } + +} diff --git a/gosnappi/bgp_v6_evi_vxlan.go b/gosnappi/bgp_v6_evi_vxlan.go new file mode 100644 index 00000000..ab89b601 --- /dev/null +++ b/gosnappi/bgp_v6_evi_vxlan.go @@ -0,0 +1,1054 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV6EviVxlan ***** +type bgpV6EviVxlan struct { + validation + obj *otg.BgpV6EviVxlan + marshaller marshalBgpV6EviVxlan + unMarshaller unMarshalBgpV6EviVxlan + broadcastDomainsHolder BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter + routeDistinguisherHolder BgpRouteDistinguisher + routeTargetExportHolder BgpV6EviVxlanBgpRouteTargetIter + routeTargetImportHolder BgpV6EviVxlanBgpRouteTargetIter + l3RouteTargetExportHolder BgpV6EviVxlanBgpRouteTargetIter + l3RouteTargetImportHolder BgpV6EviVxlanBgpRouteTargetIter + advancedHolder BgpRouteAdvanced + communitiesHolder BgpV6EviVxlanBgpCommunityIter + extCommunitiesHolder BgpV6EviVxlanBgpExtCommunityIter + asPathHolder BgpAsPath +} + +func NewBgpV6EviVxlan() BgpV6EviVxlan { + obj := bgpV6EviVxlan{obj: &otg.BgpV6EviVxlan{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV6EviVxlan) msg() *otg.BgpV6EviVxlan { + return obj.obj +} + +func (obj *bgpV6EviVxlan) setMsg(msg *otg.BgpV6EviVxlan) BgpV6EviVxlan { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV6EviVxlan struct { + obj *bgpV6EviVxlan +} + +type marshalBgpV6EviVxlan interface { + // ToProto marshals BgpV6EviVxlan to protobuf object *otg.BgpV6EviVxlan + ToProto() (*otg.BgpV6EviVxlan, error) + // ToPbText marshals BgpV6EviVxlan to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV6EviVxlan to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV6EviVxlan to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV6EviVxlan struct { + obj *bgpV6EviVxlan +} + +type unMarshalBgpV6EviVxlan interface { + // FromProto unmarshals BgpV6EviVxlan from protobuf object *otg.BgpV6EviVxlan + FromProto(msg *otg.BgpV6EviVxlan) (BgpV6EviVxlan, error) + // FromPbText unmarshals BgpV6EviVxlan from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV6EviVxlan from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV6EviVxlan from JSON text + FromJson(value string) error +} + +func (obj *bgpV6EviVxlan) Marshal() marshalBgpV6EviVxlan { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV6EviVxlan{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV6EviVxlan) Unmarshal() unMarshalBgpV6EviVxlan { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV6EviVxlan{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV6EviVxlan) ToProto() (*otg.BgpV6EviVxlan, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV6EviVxlan) FromProto(msg *otg.BgpV6EviVxlan) (BgpV6EviVxlan, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV6EviVxlan) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV6EviVxlan) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV6EviVxlan) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6EviVxlan) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV6EviVxlan) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6EviVxlan) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV6EviVxlan) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV6EviVxlan) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV6EviVxlan) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV6EviVxlan) Clone() (BgpV6EviVxlan, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV6EviVxlan() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpV6EviVxlan) setNil() { + obj.broadcastDomainsHolder = nil + obj.routeDistinguisherHolder = nil + obj.routeTargetExportHolder = nil + obj.routeTargetImportHolder = nil + obj.l3RouteTargetExportHolder = nil + obj.l3RouteTargetImportHolder = nil + obj.advancedHolder = nil + obj.communitiesHolder = nil + obj.extCommunitiesHolder = nil + obj.asPathHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpV6EviVxlan is configuration for BGP EVPN EVI. Advertises following routes - +// +// # Type 3 - Inclusive Multicast Ethernet Tag Route +// +// Type 1 - Ethernet Auto-discovery Route (Per EVI) +// +// Type 1 - Ethernet Auto-discovery Route (Per ES) +type BgpV6EviVxlan interface { + Validation + // msg marshals BgpV6EviVxlan to protobuf object *otg.BgpV6EviVxlan + // and doesn't set defaults + msg() *otg.BgpV6EviVxlan + // setMsg unmarshals BgpV6EviVxlan from protobuf object *otg.BgpV6EviVxlan + // and doesn't set defaults + setMsg(*otg.BgpV6EviVxlan) BgpV6EviVxlan + // provides marshal interface + Marshal() marshalBgpV6EviVxlan + // provides unmarshal interface + Unmarshal() unMarshalBgpV6EviVxlan + // validate validates BgpV6EviVxlan + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV6EviVxlan, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // BroadcastDomains returns BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIterIter, set in BgpV6EviVxlan + BroadcastDomains() BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter + // ReplicationType returns BgpV6EviVxlanReplicationTypeEnum, set in BgpV6EviVxlan + ReplicationType() BgpV6EviVxlanReplicationTypeEnum + // SetReplicationType assigns BgpV6EviVxlanReplicationTypeEnum provided by user to BgpV6EviVxlan + SetReplicationType(value BgpV6EviVxlanReplicationTypeEnum) BgpV6EviVxlan + // HasReplicationType checks if ReplicationType has been set in BgpV6EviVxlan + HasReplicationType() bool + // PmsiLabel returns uint32, set in BgpV6EviVxlan. + PmsiLabel() uint32 + // SetPmsiLabel assigns uint32 provided by user to BgpV6EviVxlan + SetPmsiLabel(value uint32) BgpV6EviVxlan + // HasPmsiLabel checks if PmsiLabel has been set in BgpV6EviVxlan + HasPmsiLabel() bool + // AdLabel returns uint32, set in BgpV6EviVxlan. + AdLabel() uint32 + // SetAdLabel assigns uint32 provided by user to BgpV6EviVxlan + SetAdLabel(value uint32) BgpV6EviVxlan + // HasAdLabel checks if AdLabel has been set in BgpV6EviVxlan + HasAdLabel() bool + // RouteDistinguisher returns BgpRouteDistinguisher, set in BgpV6EviVxlan. + // BgpRouteDistinguisher is bGP Route Distinguisher. + RouteDistinguisher() BgpRouteDistinguisher + // SetRouteDistinguisher assigns BgpRouteDistinguisher provided by user to BgpV6EviVxlan. + // BgpRouteDistinguisher is bGP Route Distinguisher. + SetRouteDistinguisher(value BgpRouteDistinguisher) BgpV6EviVxlan + // HasRouteDistinguisher checks if RouteDistinguisher has been set in BgpV6EviVxlan + HasRouteDistinguisher() bool + // RouteTargetExport returns BgpV6EviVxlanBgpRouteTargetIterIter, set in BgpV6EviVxlan + RouteTargetExport() BgpV6EviVxlanBgpRouteTargetIter + // RouteTargetImport returns BgpV6EviVxlanBgpRouteTargetIterIter, set in BgpV6EviVxlan + RouteTargetImport() BgpV6EviVxlanBgpRouteTargetIter + // L3RouteTargetExport returns BgpV6EviVxlanBgpRouteTargetIterIter, set in BgpV6EviVxlan + L3RouteTargetExport() BgpV6EviVxlanBgpRouteTargetIter + // L3RouteTargetImport returns BgpV6EviVxlanBgpRouteTargetIterIter, set in BgpV6EviVxlan + L3RouteTargetImport() BgpV6EviVxlanBgpRouteTargetIter + // Advanced returns BgpRouteAdvanced, set in BgpV6EviVxlan. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + Advanced() BgpRouteAdvanced + // SetAdvanced assigns BgpRouteAdvanced provided by user to BgpV6EviVxlan. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + SetAdvanced(value BgpRouteAdvanced) BgpV6EviVxlan + // HasAdvanced checks if Advanced has been set in BgpV6EviVxlan + HasAdvanced() bool + // Communities returns BgpV6EviVxlanBgpCommunityIterIter, set in BgpV6EviVxlan + Communities() BgpV6EviVxlanBgpCommunityIter + // ExtCommunities returns BgpV6EviVxlanBgpExtCommunityIterIter, set in BgpV6EviVxlan + ExtCommunities() BgpV6EviVxlanBgpExtCommunityIter + // AsPath returns BgpAsPath, set in BgpV6EviVxlan. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + AsPath() BgpAsPath + // SetAsPath assigns BgpAsPath provided by user to BgpV6EviVxlan. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + SetAsPath(value BgpAsPath) BgpV6EviVxlan + // HasAsPath checks if AsPath has been set in BgpV6EviVxlan + HasAsPath() bool + setNil() +} + +// This contains the list of Broadcast Domains to be configured per EVI. +// BroadcastDomains returns a []BgpV6EviVxlanBroadcastDomain +func (obj *bgpV6EviVxlan) BroadcastDomains() BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter { + if len(obj.obj.BroadcastDomains) == 0 { + obj.obj.BroadcastDomains = []*otg.BgpV6EviVxlanBroadcastDomain{} + } + if obj.broadcastDomainsHolder == nil { + obj.broadcastDomainsHolder = newBgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter(&obj.obj.BroadcastDomains).setMsg(obj) + } + return obj.broadcastDomainsHolder +} + +type bgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter struct { + obj *bgpV6EviVxlan + bgpV6EviVxlanBroadcastDomainSlice []BgpV6EviVxlanBroadcastDomain + fieldPtr *[]*otg.BgpV6EviVxlanBroadcastDomain +} + +func newBgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter(ptr *[]*otg.BgpV6EviVxlanBroadcastDomain) BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter { + return &bgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter{fieldPtr: ptr} +} + +type BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter interface { + setMsg(*bgpV6EviVxlan) BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter + Items() []BgpV6EviVxlanBroadcastDomain + Add() BgpV6EviVxlanBroadcastDomain + Append(items ...BgpV6EviVxlanBroadcastDomain) BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter + Set(index int, newObj BgpV6EviVxlanBroadcastDomain) BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter + Clear() BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter + clearHolderSlice() BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter + appendHolderSlice(item BgpV6EviVxlanBroadcastDomain) BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter +} + +func (obj *bgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter) setMsg(msg *bgpV6EviVxlan) BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpV6EviVxlanBroadcastDomain{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter) Items() []BgpV6EviVxlanBroadcastDomain { + return obj.bgpV6EviVxlanBroadcastDomainSlice +} + +func (obj *bgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter) Add() BgpV6EviVxlanBroadcastDomain { + newObj := &otg.BgpV6EviVxlanBroadcastDomain{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpV6EviVxlanBroadcastDomain{obj: newObj} + newLibObj.setDefault() + obj.bgpV6EviVxlanBroadcastDomainSlice = append(obj.bgpV6EviVxlanBroadcastDomainSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter) Append(items ...BgpV6EviVxlanBroadcastDomain) BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpV6EviVxlanBroadcastDomainSlice = append(obj.bgpV6EviVxlanBroadcastDomainSlice, item) + } + return obj +} + +func (obj *bgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter) Set(index int, newObj BgpV6EviVxlanBroadcastDomain) BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpV6EviVxlanBroadcastDomainSlice[index] = newObj + return obj +} +func (obj *bgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter) Clear() BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpV6EviVxlanBroadcastDomain{} + obj.bgpV6EviVxlanBroadcastDomainSlice = []BgpV6EviVxlanBroadcastDomain{} + } + return obj +} +func (obj *bgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter) clearHolderSlice() BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter { + if len(obj.bgpV6EviVxlanBroadcastDomainSlice) > 0 { + obj.bgpV6EviVxlanBroadcastDomainSlice = []BgpV6EviVxlanBroadcastDomain{} + } + return obj +} +func (obj *bgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter) appendHolderSlice(item BgpV6EviVxlanBroadcastDomain) BgpV6EviVxlanBgpV6EviVxlanBroadcastDomainIter { + obj.bgpV6EviVxlanBroadcastDomainSlice = append(obj.bgpV6EviVxlanBroadcastDomainSlice, item) + return obj +} + +type BgpV6EviVxlanReplicationTypeEnum string + +// Enum of ReplicationType on BgpV6EviVxlan +var BgpV6EviVxlanReplicationType = struct { + INGRESS_REPLICATION BgpV6EviVxlanReplicationTypeEnum +}{ + INGRESS_REPLICATION: BgpV6EviVxlanReplicationTypeEnum("ingress_replication"), +} + +func (obj *bgpV6EviVxlan) ReplicationType() BgpV6EviVxlanReplicationTypeEnum { + return BgpV6EviVxlanReplicationTypeEnum(obj.obj.ReplicationType.Enum().String()) +} + +// This model only supports Ingress Replication +// ReplicationType returns a string +func (obj *bgpV6EviVxlan) HasReplicationType() bool { + return obj.obj.ReplicationType != nil +} + +func (obj *bgpV6EviVxlan) SetReplicationType(value BgpV6EviVxlanReplicationTypeEnum) BgpV6EviVxlan { + intValue, ok := otg.BgpV6EviVxlan_ReplicationType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpV6EviVxlanReplicationTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpV6EviVxlan_ReplicationType_Enum(intValue) + obj.obj.ReplicationType = &enumValue + + return obj +} + +// Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. +// PmsiLabel returns a uint32 +func (obj *bgpV6EviVxlan) PmsiLabel() uint32 { + + return *obj.obj.PmsiLabel + +} + +// Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. +// PmsiLabel returns a uint32 +func (obj *bgpV6EviVxlan) HasPmsiLabel() bool { + return obj.obj.PmsiLabel != nil +} + +// Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. +// SetPmsiLabel sets the uint32 value in the BgpV6EviVxlan object +func (obj *bgpV6EviVxlan) SetPmsiLabel(value uint32) BgpV6EviVxlan { + + obj.obj.PmsiLabel = &value + return obj +} + +// The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet Auto-discovery Route per +// AdLabel returns a uint32 +func (obj *bgpV6EviVxlan) AdLabel() uint32 { + + return *obj.obj.AdLabel + +} + +// The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet Auto-discovery Route per +// AdLabel returns a uint32 +func (obj *bgpV6EviVxlan) HasAdLabel() bool { + return obj.obj.AdLabel != nil +} + +// The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet Auto-discovery Route per +// SetAdLabel sets the uint32 value in the BgpV6EviVxlan object +func (obj *bgpV6EviVxlan) SetAdLabel(value uint32) BgpV6EviVxlan { + + obj.obj.AdLabel = &value + return obj +} + +// Colon separated Extended Community value of 6 Bytes - "AS number: Value" identifying an EVI. Example - for the as_2octet "60005:100". +// RouteDistinguisher returns a BgpRouteDistinguisher +func (obj *bgpV6EviVxlan) RouteDistinguisher() BgpRouteDistinguisher { + if obj.obj.RouteDistinguisher == nil { + obj.obj.RouteDistinguisher = NewBgpRouteDistinguisher().msg() + } + if obj.routeDistinguisherHolder == nil { + obj.routeDistinguisherHolder = &bgpRouteDistinguisher{obj: obj.obj.RouteDistinguisher} + } + return obj.routeDistinguisherHolder +} + +// Colon separated Extended Community value of 6 Bytes - "AS number: Value" identifying an EVI. Example - for the as_2octet "60005:100". +// RouteDistinguisher returns a BgpRouteDistinguisher +func (obj *bgpV6EviVxlan) HasRouteDistinguisher() bool { + return obj.obj.RouteDistinguisher != nil +} + +// Colon separated Extended Community value of 6 Bytes - "AS number: Value" identifying an EVI. Example - for the as_2octet "60005:100". +// SetRouteDistinguisher sets the BgpRouteDistinguisher value in the BgpV6EviVxlan object +func (obj *bgpV6EviVxlan) SetRouteDistinguisher(value BgpRouteDistinguisher) BgpV6EviVxlan { + + obj.routeDistinguisherHolder = nil + obj.obj.RouteDistinguisher = value.msg() + + return obj +} + +// List of Layer 2 Virtual Network Identifier (L2VNI) export targets associated with this EVI. +// RouteTargetExport returns a []BgpRouteTarget +func (obj *bgpV6EviVxlan) RouteTargetExport() BgpV6EviVxlanBgpRouteTargetIter { + if len(obj.obj.RouteTargetExport) == 0 { + obj.obj.RouteTargetExport = []*otg.BgpRouteTarget{} + } + if obj.routeTargetExportHolder == nil { + obj.routeTargetExportHolder = newBgpV6EviVxlanBgpRouteTargetIter(&obj.obj.RouteTargetExport).setMsg(obj) + } + return obj.routeTargetExportHolder +} + +type bgpV6EviVxlanBgpRouteTargetIter struct { + obj *bgpV6EviVxlan + bgpRouteTargetSlice []BgpRouteTarget + fieldPtr *[]*otg.BgpRouteTarget +} + +func newBgpV6EviVxlanBgpRouteTargetIter(ptr *[]*otg.BgpRouteTarget) BgpV6EviVxlanBgpRouteTargetIter { + return &bgpV6EviVxlanBgpRouteTargetIter{fieldPtr: ptr} +} + +type BgpV6EviVxlanBgpRouteTargetIter interface { + setMsg(*bgpV6EviVxlan) BgpV6EviVxlanBgpRouteTargetIter + Items() []BgpRouteTarget + Add() BgpRouteTarget + Append(items ...BgpRouteTarget) BgpV6EviVxlanBgpRouteTargetIter + Set(index int, newObj BgpRouteTarget) BgpV6EviVxlanBgpRouteTargetIter + Clear() BgpV6EviVxlanBgpRouteTargetIter + clearHolderSlice() BgpV6EviVxlanBgpRouteTargetIter + appendHolderSlice(item BgpRouteTarget) BgpV6EviVxlanBgpRouteTargetIter +} + +func (obj *bgpV6EviVxlanBgpRouteTargetIter) setMsg(msg *bgpV6EviVxlan) BgpV6EviVxlanBgpRouteTargetIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpRouteTarget{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6EviVxlanBgpRouteTargetIter) Items() []BgpRouteTarget { + return obj.bgpRouteTargetSlice +} + +func (obj *bgpV6EviVxlanBgpRouteTargetIter) Add() BgpRouteTarget { + newObj := &otg.BgpRouteTarget{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpRouteTarget{obj: newObj} + newLibObj.setDefault() + obj.bgpRouteTargetSlice = append(obj.bgpRouteTargetSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6EviVxlanBgpRouteTargetIter) Append(items ...BgpRouteTarget) BgpV6EviVxlanBgpRouteTargetIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpRouteTargetSlice = append(obj.bgpRouteTargetSlice, item) + } + return obj +} + +func (obj *bgpV6EviVxlanBgpRouteTargetIter) Set(index int, newObj BgpRouteTarget) BgpV6EviVxlanBgpRouteTargetIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpRouteTargetSlice[index] = newObj + return obj +} +func (obj *bgpV6EviVxlanBgpRouteTargetIter) Clear() BgpV6EviVxlanBgpRouteTargetIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpRouteTarget{} + obj.bgpRouteTargetSlice = []BgpRouteTarget{} + } + return obj +} +func (obj *bgpV6EviVxlanBgpRouteTargetIter) clearHolderSlice() BgpV6EviVxlanBgpRouteTargetIter { + if len(obj.bgpRouteTargetSlice) > 0 { + obj.bgpRouteTargetSlice = []BgpRouteTarget{} + } + return obj +} +func (obj *bgpV6EviVxlanBgpRouteTargetIter) appendHolderSlice(item BgpRouteTarget) BgpV6EviVxlanBgpRouteTargetIter { + obj.bgpRouteTargetSlice = append(obj.bgpRouteTargetSlice, item) + return obj +} + +// List of L2VNI import targets associated with this EVI. +// RouteTargetImport returns a []BgpRouteTarget +func (obj *bgpV6EviVxlan) RouteTargetImport() BgpV6EviVxlanBgpRouteTargetIter { + if len(obj.obj.RouteTargetImport) == 0 { + obj.obj.RouteTargetImport = []*otg.BgpRouteTarget{} + } + if obj.routeTargetImportHolder == nil { + obj.routeTargetImportHolder = newBgpV6EviVxlanBgpRouteTargetIter(&obj.obj.RouteTargetImport).setMsg(obj) + } + return obj.routeTargetImportHolder +} + +// List of Layer 3 Virtual Network Identifier (L3VNI) Export Route Targets. +// L3RouteTargetExport returns a []BgpRouteTarget +func (obj *bgpV6EviVxlan) L3RouteTargetExport() BgpV6EviVxlanBgpRouteTargetIter { + if len(obj.obj.L3RouteTargetExport) == 0 { + obj.obj.L3RouteTargetExport = []*otg.BgpRouteTarget{} + } + if obj.l3RouteTargetExportHolder == nil { + obj.l3RouteTargetExportHolder = newBgpV6EviVxlanBgpRouteTargetIter(&obj.obj.L3RouteTargetExport).setMsg(obj) + } + return obj.l3RouteTargetExportHolder +} + +// List of L3VNI Import Route Targets. +// L3RouteTargetImport returns a []BgpRouteTarget +func (obj *bgpV6EviVxlan) L3RouteTargetImport() BgpV6EviVxlanBgpRouteTargetIter { + if len(obj.obj.L3RouteTargetImport) == 0 { + obj.obj.L3RouteTargetImport = []*otg.BgpRouteTarget{} + } + if obj.l3RouteTargetImportHolder == nil { + obj.l3RouteTargetImportHolder = newBgpV6EviVxlanBgpRouteTargetIter(&obj.obj.L3RouteTargetImport).setMsg(obj) + } + return obj.l3RouteTargetImportHolder +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpV6EviVxlan) Advanced() BgpRouteAdvanced { + if obj.obj.Advanced == nil { + obj.obj.Advanced = NewBgpRouteAdvanced().msg() + } + if obj.advancedHolder == nil { + obj.advancedHolder = &bgpRouteAdvanced{obj: obj.obj.Advanced} + } + return obj.advancedHolder +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpV6EviVxlan) HasAdvanced() bool { + return obj.obj.Advanced != nil +} + +// description is TBD +// SetAdvanced sets the BgpRouteAdvanced value in the BgpV6EviVxlan object +func (obj *bgpV6EviVxlan) SetAdvanced(value BgpRouteAdvanced) BgpV6EviVxlan { + + obj.advancedHolder = nil + obj.obj.Advanced = value.msg() + + return obj +} + +// Optional community settings. +// Communities returns a []BgpCommunity +func (obj *bgpV6EviVxlan) Communities() BgpV6EviVxlanBgpCommunityIter { + if len(obj.obj.Communities) == 0 { + obj.obj.Communities = []*otg.BgpCommunity{} + } + if obj.communitiesHolder == nil { + obj.communitiesHolder = newBgpV6EviVxlanBgpCommunityIter(&obj.obj.Communities).setMsg(obj) + } + return obj.communitiesHolder +} + +type bgpV6EviVxlanBgpCommunityIter struct { + obj *bgpV6EviVxlan + bgpCommunitySlice []BgpCommunity + fieldPtr *[]*otg.BgpCommunity +} + +func newBgpV6EviVxlanBgpCommunityIter(ptr *[]*otg.BgpCommunity) BgpV6EviVxlanBgpCommunityIter { + return &bgpV6EviVxlanBgpCommunityIter{fieldPtr: ptr} +} + +type BgpV6EviVxlanBgpCommunityIter interface { + setMsg(*bgpV6EviVxlan) BgpV6EviVxlanBgpCommunityIter + Items() []BgpCommunity + Add() BgpCommunity + Append(items ...BgpCommunity) BgpV6EviVxlanBgpCommunityIter + Set(index int, newObj BgpCommunity) BgpV6EviVxlanBgpCommunityIter + Clear() BgpV6EviVxlanBgpCommunityIter + clearHolderSlice() BgpV6EviVxlanBgpCommunityIter + appendHolderSlice(item BgpCommunity) BgpV6EviVxlanBgpCommunityIter +} + +func (obj *bgpV6EviVxlanBgpCommunityIter) setMsg(msg *bgpV6EviVxlan) BgpV6EviVxlanBgpCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6EviVxlanBgpCommunityIter) Items() []BgpCommunity { + return obj.bgpCommunitySlice +} + +func (obj *bgpV6EviVxlanBgpCommunityIter) Add() BgpCommunity { + newObj := &otg.BgpCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6EviVxlanBgpCommunityIter) Append(items ...BgpCommunity) BgpV6EviVxlanBgpCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + } + return obj +} + +func (obj *bgpV6EviVxlanBgpCommunityIter) Set(index int, newObj BgpCommunity) BgpV6EviVxlanBgpCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpCommunitySlice[index] = newObj + return obj +} +func (obj *bgpV6EviVxlanBgpCommunityIter) Clear() BgpV6EviVxlanBgpCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpCommunity{} + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpV6EviVxlanBgpCommunityIter) clearHolderSlice() BgpV6EviVxlanBgpCommunityIter { + if len(obj.bgpCommunitySlice) > 0 { + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpV6EviVxlanBgpCommunityIter) appendHolderSlice(item BgpCommunity) BgpV6EviVxlanBgpCommunityIter { + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + return obj +} + +// Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. +// ExtCommunities returns a []BgpExtCommunity +func (obj *bgpV6EviVxlan) ExtCommunities() BgpV6EviVxlanBgpExtCommunityIter { + if len(obj.obj.ExtCommunities) == 0 { + obj.obj.ExtCommunities = []*otg.BgpExtCommunity{} + } + if obj.extCommunitiesHolder == nil { + obj.extCommunitiesHolder = newBgpV6EviVxlanBgpExtCommunityIter(&obj.obj.ExtCommunities).setMsg(obj) + } + return obj.extCommunitiesHolder +} + +type bgpV6EviVxlanBgpExtCommunityIter struct { + obj *bgpV6EviVxlan + bgpExtCommunitySlice []BgpExtCommunity + fieldPtr *[]*otg.BgpExtCommunity +} + +func newBgpV6EviVxlanBgpExtCommunityIter(ptr *[]*otg.BgpExtCommunity) BgpV6EviVxlanBgpExtCommunityIter { + return &bgpV6EviVxlanBgpExtCommunityIter{fieldPtr: ptr} +} + +type BgpV6EviVxlanBgpExtCommunityIter interface { + setMsg(*bgpV6EviVxlan) BgpV6EviVxlanBgpExtCommunityIter + Items() []BgpExtCommunity + Add() BgpExtCommunity + Append(items ...BgpExtCommunity) BgpV6EviVxlanBgpExtCommunityIter + Set(index int, newObj BgpExtCommunity) BgpV6EviVxlanBgpExtCommunityIter + Clear() BgpV6EviVxlanBgpExtCommunityIter + clearHolderSlice() BgpV6EviVxlanBgpExtCommunityIter + appendHolderSlice(item BgpExtCommunity) BgpV6EviVxlanBgpExtCommunityIter +} + +func (obj *bgpV6EviVxlanBgpExtCommunityIter) setMsg(msg *bgpV6EviVxlan) BgpV6EviVxlanBgpExtCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpExtCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6EviVxlanBgpExtCommunityIter) Items() []BgpExtCommunity { + return obj.bgpExtCommunitySlice +} + +func (obj *bgpV6EviVxlanBgpExtCommunityIter) Add() BgpExtCommunity { + newObj := &otg.BgpExtCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpExtCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6EviVxlanBgpExtCommunityIter) Append(items ...BgpExtCommunity) BgpV6EviVxlanBgpExtCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + } + return obj +} + +func (obj *bgpV6EviVxlanBgpExtCommunityIter) Set(index int, newObj BgpExtCommunity) BgpV6EviVxlanBgpExtCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpExtCommunitySlice[index] = newObj + return obj +} +func (obj *bgpV6EviVxlanBgpExtCommunityIter) Clear() BgpV6EviVxlanBgpExtCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpExtCommunity{} + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpV6EviVxlanBgpExtCommunityIter) clearHolderSlice() BgpV6EviVxlanBgpExtCommunityIter { + if len(obj.bgpExtCommunitySlice) > 0 { + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpV6EviVxlanBgpExtCommunityIter) appendHolderSlice(item BgpExtCommunity) BgpV6EviVxlanBgpExtCommunityIter { + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + return obj +} + +// Optional AS PATH settings. +// AsPath returns a BgpAsPath +func (obj *bgpV6EviVxlan) AsPath() BgpAsPath { + if obj.obj.AsPath == nil { + obj.obj.AsPath = NewBgpAsPath().msg() + } + if obj.asPathHolder == nil { + obj.asPathHolder = &bgpAsPath{obj: obj.obj.AsPath} + } + return obj.asPathHolder +} + +// Optional AS PATH settings. +// AsPath returns a BgpAsPath +func (obj *bgpV6EviVxlan) HasAsPath() bool { + return obj.obj.AsPath != nil +} + +// Optional AS PATH settings. +// SetAsPath sets the BgpAsPath value in the BgpV6EviVxlan object +func (obj *bgpV6EviVxlan) SetAsPath(value BgpAsPath) BgpV6EviVxlan { + + obj.asPathHolder = nil + obj.obj.AsPath = value.msg() + + return obj +} + +func (obj *bgpV6EviVxlan) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.BroadcastDomains) != 0 { + + if set_default { + obj.BroadcastDomains().clearHolderSlice() + for _, item := range obj.obj.BroadcastDomains { + obj.BroadcastDomains().appendHolderSlice(&bgpV6EviVxlanBroadcastDomain{obj: item}) + } + } + for _, item := range obj.BroadcastDomains().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.PmsiLabel != nil { + + if *obj.obj.PmsiLabel > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpV6EviVxlan.PmsiLabel <= 16777215 but Got %d", *obj.obj.PmsiLabel)) + } + + } + + if obj.obj.AdLabel != nil { + + if *obj.obj.AdLabel > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpV6EviVxlan.AdLabel <= 16777215 but Got %d", *obj.obj.AdLabel)) + } + + } + + if obj.obj.RouteDistinguisher != nil { + + obj.RouteDistinguisher().validateObj(vObj, set_default) + } + + if len(obj.obj.RouteTargetExport) != 0 { + + if set_default { + obj.RouteTargetExport().clearHolderSlice() + for _, item := range obj.obj.RouteTargetExport { + obj.RouteTargetExport().appendHolderSlice(&bgpRouteTarget{obj: item}) + } + } + for _, item := range obj.RouteTargetExport().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.RouteTargetImport) != 0 { + + if set_default { + obj.RouteTargetImport().clearHolderSlice() + for _, item := range obj.obj.RouteTargetImport { + obj.RouteTargetImport().appendHolderSlice(&bgpRouteTarget{obj: item}) + } + } + for _, item := range obj.RouteTargetImport().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.L3RouteTargetExport) != 0 { + + if set_default { + obj.L3RouteTargetExport().clearHolderSlice() + for _, item := range obj.obj.L3RouteTargetExport { + obj.L3RouteTargetExport().appendHolderSlice(&bgpRouteTarget{obj: item}) + } + } + for _, item := range obj.L3RouteTargetExport().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.L3RouteTargetImport) != 0 { + + if set_default { + obj.L3RouteTargetImport().clearHolderSlice() + for _, item := range obj.obj.L3RouteTargetImport { + obj.L3RouteTargetImport().appendHolderSlice(&bgpRouteTarget{obj: item}) + } + } + for _, item := range obj.L3RouteTargetImport().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Advanced != nil { + + obj.Advanced().validateObj(vObj, set_default) + } + + if len(obj.obj.Communities) != 0 { + + if set_default { + obj.Communities().clearHolderSlice() + for _, item := range obj.obj.Communities { + obj.Communities().appendHolderSlice(&bgpCommunity{obj: item}) + } + } + for _, item := range obj.Communities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.ExtCommunities) != 0 { + + if set_default { + obj.ExtCommunities().clearHolderSlice() + for _, item := range obj.obj.ExtCommunities { + obj.ExtCommunities().appendHolderSlice(&bgpExtCommunity{obj: item}) + } + } + for _, item := range obj.ExtCommunities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.AsPath != nil { + + obj.AsPath().validateObj(vObj, set_default) + } + +} + +func (obj *bgpV6EviVxlan) setDefault() { + if obj.obj.ReplicationType == nil { + obj.SetReplicationType(BgpV6EviVxlanReplicationType.INGRESS_REPLICATION) + + } + if obj.obj.PmsiLabel == nil { + obj.SetPmsiLabel(16) + } + if obj.obj.AdLabel == nil { + obj.SetAdLabel(0) + } + +} diff --git a/gosnappi/bgp_v6_evi_vxlan_broadcast_domain.go b/gosnappi/bgp_v6_evi_vxlan_broadcast_domain.go new file mode 100644 index 00000000..e6155356 --- /dev/null +++ b/gosnappi/bgp_v6_evi_vxlan_broadcast_domain.go @@ -0,0 +1,455 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV6EviVxlanBroadcastDomain ***** +type bgpV6EviVxlanBroadcastDomain struct { + validation + obj *otg.BgpV6EviVxlanBroadcastDomain + marshaller marshalBgpV6EviVxlanBroadcastDomain + unMarshaller unMarshalBgpV6EviVxlanBroadcastDomain + cmacIpRangeHolder BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter +} + +func NewBgpV6EviVxlanBroadcastDomain() BgpV6EviVxlanBroadcastDomain { + obj := bgpV6EviVxlanBroadcastDomain{obj: &otg.BgpV6EviVxlanBroadcastDomain{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV6EviVxlanBroadcastDomain) msg() *otg.BgpV6EviVxlanBroadcastDomain { + return obj.obj +} + +func (obj *bgpV6EviVxlanBroadcastDomain) setMsg(msg *otg.BgpV6EviVxlanBroadcastDomain) BgpV6EviVxlanBroadcastDomain { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV6EviVxlanBroadcastDomain struct { + obj *bgpV6EviVxlanBroadcastDomain +} + +type marshalBgpV6EviVxlanBroadcastDomain interface { + // ToProto marshals BgpV6EviVxlanBroadcastDomain to protobuf object *otg.BgpV6EviVxlanBroadcastDomain + ToProto() (*otg.BgpV6EviVxlanBroadcastDomain, error) + // ToPbText marshals BgpV6EviVxlanBroadcastDomain to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV6EviVxlanBroadcastDomain to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV6EviVxlanBroadcastDomain to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV6EviVxlanBroadcastDomain struct { + obj *bgpV6EviVxlanBroadcastDomain +} + +type unMarshalBgpV6EviVxlanBroadcastDomain interface { + // FromProto unmarshals BgpV6EviVxlanBroadcastDomain from protobuf object *otg.BgpV6EviVxlanBroadcastDomain + FromProto(msg *otg.BgpV6EviVxlanBroadcastDomain) (BgpV6EviVxlanBroadcastDomain, error) + // FromPbText unmarshals BgpV6EviVxlanBroadcastDomain from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV6EviVxlanBroadcastDomain from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV6EviVxlanBroadcastDomain from JSON text + FromJson(value string) error +} + +func (obj *bgpV6EviVxlanBroadcastDomain) Marshal() marshalBgpV6EviVxlanBroadcastDomain { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV6EviVxlanBroadcastDomain{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV6EviVxlanBroadcastDomain) Unmarshal() unMarshalBgpV6EviVxlanBroadcastDomain { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV6EviVxlanBroadcastDomain{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV6EviVxlanBroadcastDomain) ToProto() (*otg.BgpV6EviVxlanBroadcastDomain, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV6EviVxlanBroadcastDomain) FromProto(msg *otg.BgpV6EviVxlanBroadcastDomain) (BgpV6EviVxlanBroadcastDomain, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV6EviVxlanBroadcastDomain) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV6EviVxlanBroadcastDomain) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV6EviVxlanBroadcastDomain) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6EviVxlanBroadcastDomain) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV6EviVxlanBroadcastDomain) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6EviVxlanBroadcastDomain) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV6EviVxlanBroadcastDomain) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV6EviVxlanBroadcastDomain) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV6EviVxlanBroadcastDomain) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV6EviVxlanBroadcastDomain) Clone() (BgpV6EviVxlanBroadcastDomain, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV6EviVxlanBroadcastDomain() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpV6EviVxlanBroadcastDomain) setNil() { + obj.cmacIpRangeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpV6EviVxlanBroadcastDomain is configuration for Broadcast Domains per EVI. +type BgpV6EviVxlanBroadcastDomain interface { + Validation + // msg marshals BgpV6EviVxlanBroadcastDomain to protobuf object *otg.BgpV6EviVxlanBroadcastDomain + // and doesn't set defaults + msg() *otg.BgpV6EviVxlanBroadcastDomain + // setMsg unmarshals BgpV6EviVxlanBroadcastDomain from protobuf object *otg.BgpV6EviVxlanBroadcastDomain + // and doesn't set defaults + setMsg(*otg.BgpV6EviVxlanBroadcastDomain) BgpV6EviVxlanBroadcastDomain + // provides marshal interface + Marshal() marshalBgpV6EviVxlanBroadcastDomain + // provides unmarshal interface + Unmarshal() unMarshalBgpV6EviVxlanBroadcastDomain + // validate validates BgpV6EviVxlanBroadcastDomain + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV6EviVxlanBroadcastDomain, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // CmacIpRange returns BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIterIter, set in BgpV6EviVxlanBroadcastDomain + CmacIpRange() BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter + // EthernetTagId returns uint32, set in BgpV6EviVxlanBroadcastDomain. + EthernetTagId() uint32 + // SetEthernetTagId assigns uint32 provided by user to BgpV6EviVxlanBroadcastDomain + SetEthernetTagId(value uint32) BgpV6EviVxlanBroadcastDomain + // HasEthernetTagId checks if EthernetTagId has been set in BgpV6EviVxlanBroadcastDomain + HasEthernetTagId() bool + // VlanAwareService returns bool, set in BgpV6EviVxlanBroadcastDomain. + VlanAwareService() bool + // SetVlanAwareService assigns bool provided by user to BgpV6EviVxlanBroadcastDomain + SetVlanAwareService(value bool) BgpV6EviVxlanBroadcastDomain + // HasVlanAwareService checks if VlanAwareService has been set in BgpV6EviVxlanBroadcastDomain + HasVlanAwareService() bool + setNil() +} + +// This contains the list of Customer MAC/IP Ranges to be configured per Broadcast Domain. +// +// Advertises following route - +// Type 2 - MAC/IP Advertisement Route. +// CmacIpRange returns a []BgpCMacIpRange +func (obj *bgpV6EviVxlanBroadcastDomain) CmacIpRange() BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter { + if len(obj.obj.CmacIpRange) == 0 { + obj.obj.CmacIpRange = []*otg.BgpCMacIpRange{} + } + if obj.cmacIpRangeHolder == nil { + obj.cmacIpRangeHolder = newBgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter(&obj.obj.CmacIpRange).setMsg(obj) + } + return obj.cmacIpRangeHolder +} + +type bgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter struct { + obj *bgpV6EviVxlanBroadcastDomain + bgpCMacIpRangeSlice []BgpCMacIpRange + fieldPtr *[]*otg.BgpCMacIpRange +} + +func newBgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter(ptr *[]*otg.BgpCMacIpRange) BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter { + return &bgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter{fieldPtr: ptr} +} + +type BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter interface { + setMsg(*bgpV6EviVxlanBroadcastDomain) BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter + Items() []BgpCMacIpRange + Add() BgpCMacIpRange + Append(items ...BgpCMacIpRange) BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter + Set(index int, newObj BgpCMacIpRange) BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter + Clear() BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter + clearHolderSlice() BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter + appendHolderSlice(item BgpCMacIpRange) BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter +} + +func (obj *bgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter) setMsg(msg *bgpV6EviVxlanBroadcastDomain) BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpCMacIpRange{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter) Items() []BgpCMacIpRange { + return obj.bgpCMacIpRangeSlice +} + +func (obj *bgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter) Add() BgpCMacIpRange { + newObj := &otg.BgpCMacIpRange{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpCMacIpRange{obj: newObj} + newLibObj.setDefault() + obj.bgpCMacIpRangeSlice = append(obj.bgpCMacIpRangeSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter) Append(items ...BgpCMacIpRange) BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpCMacIpRangeSlice = append(obj.bgpCMacIpRangeSlice, item) + } + return obj +} + +func (obj *bgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter) Set(index int, newObj BgpCMacIpRange) BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpCMacIpRangeSlice[index] = newObj + return obj +} +func (obj *bgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter) Clear() BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpCMacIpRange{} + obj.bgpCMacIpRangeSlice = []BgpCMacIpRange{} + } + return obj +} +func (obj *bgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter) clearHolderSlice() BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter { + if len(obj.bgpCMacIpRangeSlice) > 0 { + obj.bgpCMacIpRangeSlice = []BgpCMacIpRange{} + } + return obj +} +func (obj *bgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter) appendHolderSlice(item BgpCMacIpRange) BgpV6EviVxlanBroadcastDomainBgpCMacIpRangeIter { + obj.bgpCMacIpRangeSlice = append(obj.bgpCMacIpRangeSlice, item) + return obj +} + +// The Ethernet Tag ID of the Broadcast Domain. +// EthernetTagId returns a uint32 +func (obj *bgpV6EviVxlanBroadcastDomain) EthernetTagId() uint32 { + + return *obj.obj.EthernetTagId + +} + +// The Ethernet Tag ID of the Broadcast Domain. +// EthernetTagId returns a uint32 +func (obj *bgpV6EviVxlanBroadcastDomain) HasEthernetTagId() bool { + return obj.obj.EthernetTagId != nil +} + +// The Ethernet Tag ID of the Broadcast Domain. +// SetEthernetTagId sets the uint32 value in the BgpV6EviVxlanBroadcastDomain object +func (obj *bgpV6EviVxlanBroadcastDomain) SetEthernetTagId(value uint32) BgpV6EviVxlanBroadcastDomain { + + obj.obj.EthernetTagId = &value + return obj +} + +// VLAN-Aware service to be enabled or disabled. +// VlanAwareService returns a bool +func (obj *bgpV6EviVxlanBroadcastDomain) VlanAwareService() bool { + + return *obj.obj.VlanAwareService + +} + +// VLAN-Aware service to be enabled or disabled. +// VlanAwareService returns a bool +func (obj *bgpV6EviVxlanBroadcastDomain) HasVlanAwareService() bool { + return obj.obj.VlanAwareService != nil +} + +// VLAN-Aware service to be enabled or disabled. +// SetVlanAwareService sets the bool value in the BgpV6EviVxlanBroadcastDomain object +func (obj *bgpV6EviVxlanBroadcastDomain) SetVlanAwareService(value bool) BgpV6EviVxlanBroadcastDomain { + + obj.obj.VlanAwareService = &value + return obj +} + +func (obj *bgpV6EviVxlanBroadcastDomain) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.CmacIpRange) != 0 { + + if set_default { + obj.CmacIpRange().clearHolderSlice() + for _, item := range obj.obj.CmacIpRange { + obj.CmacIpRange().appendHolderSlice(&bgpCMacIpRange{obj: item}) + } + } + for _, item := range obj.CmacIpRange().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpV6EviVxlanBroadcastDomain) setDefault() { + if obj.obj.EthernetTagId == nil { + obj.SetEthernetTagId(0) + } + if obj.obj.VlanAwareService == nil { + obj.SetVlanAwareService(false) + } + +} diff --git a/gosnappi/bgp_v6_evpn_evis.go b/gosnappi/bgp_v6_evpn_evis.go new file mode 100644 index 00000000..08d50cfd --- /dev/null +++ b/gosnappi/bgp_v6_evpn_evis.go @@ -0,0 +1,410 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV6EvpnEvis ***** +type bgpV6EvpnEvis struct { + validation + obj *otg.BgpV6EvpnEvis + marshaller marshalBgpV6EvpnEvis + unMarshaller unMarshalBgpV6EvpnEvis + eviVxlanHolder BgpV6EviVxlan +} + +func NewBgpV6EvpnEvis() BgpV6EvpnEvis { + obj := bgpV6EvpnEvis{obj: &otg.BgpV6EvpnEvis{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV6EvpnEvis) msg() *otg.BgpV6EvpnEvis { + return obj.obj +} + +func (obj *bgpV6EvpnEvis) setMsg(msg *otg.BgpV6EvpnEvis) BgpV6EvpnEvis { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV6EvpnEvis struct { + obj *bgpV6EvpnEvis +} + +type marshalBgpV6EvpnEvis interface { + // ToProto marshals BgpV6EvpnEvis to protobuf object *otg.BgpV6EvpnEvis + ToProto() (*otg.BgpV6EvpnEvis, error) + // ToPbText marshals BgpV6EvpnEvis to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV6EvpnEvis to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV6EvpnEvis to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV6EvpnEvis struct { + obj *bgpV6EvpnEvis +} + +type unMarshalBgpV6EvpnEvis interface { + // FromProto unmarshals BgpV6EvpnEvis from protobuf object *otg.BgpV6EvpnEvis + FromProto(msg *otg.BgpV6EvpnEvis) (BgpV6EvpnEvis, error) + // FromPbText unmarshals BgpV6EvpnEvis from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV6EvpnEvis from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV6EvpnEvis from JSON text + FromJson(value string) error +} + +func (obj *bgpV6EvpnEvis) Marshal() marshalBgpV6EvpnEvis { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV6EvpnEvis{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV6EvpnEvis) Unmarshal() unMarshalBgpV6EvpnEvis { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV6EvpnEvis{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV6EvpnEvis) ToProto() (*otg.BgpV6EvpnEvis, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV6EvpnEvis) FromProto(msg *otg.BgpV6EvpnEvis) (BgpV6EvpnEvis, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV6EvpnEvis) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV6EvpnEvis) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV6EvpnEvis) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6EvpnEvis) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV6EvpnEvis) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6EvpnEvis) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV6EvpnEvis) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV6EvpnEvis) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV6EvpnEvis) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV6EvpnEvis) Clone() (BgpV6EvpnEvis, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV6EvpnEvis() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpV6EvpnEvis) setNil() { + obj.eviVxlanHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpV6EvpnEvis is this contains a list of different flavors of EVPN. +// For example EVPN over VXLAN or EVPN over MPLS etc to be configured per Ethernet segment. +// Need to instantiate correct type of EVPN instance as per requirement. +type BgpV6EvpnEvis interface { + Validation + // msg marshals BgpV6EvpnEvis to protobuf object *otg.BgpV6EvpnEvis + // and doesn't set defaults + msg() *otg.BgpV6EvpnEvis + // setMsg unmarshals BgpV6EvpnEvis from protobuf object *otg.BgpV6EvpnEvis + // and doesn't set defaults + setMsg(*otg.BgpV6EvpnEvis) BgpV6EvpnEvis + // provides marshal interface + Marshal() marshalBgpV6EvpnEvis + // provides unmarshal interface + Unmarshal() unMarshalBgpV6EvpnEvis + // validate validates BgpV6EvpnEvis + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV6EvpnEvis, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns BgpV6EvpnEvisChoiceEnum, set in BgpV6EvpnEvis + Choice() BgpV6EvpnEvisChoiceEnum + // setChoice assigns BgpV6EvpnEvisChoiceEnum provided by user to BgpV6EvpnEvis + setChoice(value BgpV6EvpnEvisChoiceEnum) BgpV6EvpnEvis + // HasChoice checks if Choice has been set in BgpV6EvpnEvis + HasChoice() bool + // EviVxlan returns BgpV6EviVxlan, set in BgpV6EvpnEvis. + // BgpV6EviVxlan is configuration for BGP EVPN EVI. Advertises following routes - + // + // # Type 3 - Inclusive Multicast Ethernet Tag Route + // + // Type 1 - Ethernet Auto-discovery Route (Per EVI) + // + // Type 1 - Ethernet Auto-discovery Route (Per ES) + EviVxlan() BgpV6EviVxlan + // SetEviVxlan assigns BgpV6EviVxlan provided by user to BgpV6EvpnEvis. + // BgpV6EviVxlan is configuration for BGP EVPN EVI. Advertises following routes - + // + // # Type 3 - Inclusive Multicast Ethernet Tag Route + // + // Type 1 - Ethernet Auto-discovery Route (Per EVI) + // + // Type 1 - Ethernet Auto-discovery Route (Per ES) + SetEviVxlan(value BgpV6EviVxlan) BgpV6EvpnEvis + // HasEviVxlan checks if EviVxlan has been set in BgpV6EvpnEvis + HasEviVxlan() bool + setNil() +} + +type BgpV6EvpnEvisChoiceEnum string + +// Enum of Choice on BgpV6EvpnEvis +var BgpV6EvpnEvisChoice = struct { + EVI_VXLAN BgpV6EvpnEvisChoiceEnum +}{ + EVI_VXLAN: BgpV6EvpnEvisChoiceEnum("evi_vxlan"), +} + +func (obj *bgpV6EvpnEvis) Choice() BgpV6EvpnEvisChoiceEnum { + return BgpV6EvpnEvisChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *bgpV6EvpnEvis) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *bgpV6EvpnEvis) setChoice(value BgpV6EvpnEvisChoiceEnum) BgpV6EvpnEvis { + intValue, ok := otg.BgpV6EvpnEvis_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpV6EvpnEvisChoiceEnum", string(value))) + return obj + } + enumValue := otg.BgpV6EvpnEvis_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.EviVxlan = nil + obj.eviVxlanHolder = nil + + if value == BgpV6EvpnEvisChoice.EVI_VXLAN { + obj.obj.EviVxlan = NewBgpV6EviVxlan().msg() + } + + return obj +} + +// EVPN VXLAN instance to be configured per Ethernet Segment. +// EviVxlan returns a BgpV6EviVxlan +func (obj *bgpV6EvpnEvis) EviVxlan() BgpV6EviVxlan { + if obj.obj.EviVxlan == nil { + obj.setChoice(BgpV6EvpnEvisChoice.EVI_VXLAN) + } + if obj.eviVxlanHolder == nil { + obj.eviVxlanHolder = &bgpV6EviVxlan{obj: obj.obj.EviVxlan} + } + return obj.eviVxlanHolder +} + +// EVPN VXLAN instance to be configured per Ethernet Segment. +// EviVxlan returns a BgpV6EviVxlan +func (obj *bgpV6EvpnEvis) HasEviVxlan() bool { + return obj.obj.EviVxlan != nil +} + +// EVPN VXLAN instance to be configured per Ethernet Segment. +// SetEviVxlan sets the BgpV6EviVxlan value in the BgpV6EvpnEvis object +func (obj *bgpV6EvpnEvis) SetEviVxlan(value BgpV6EviVxlan) BgpV6EvpnEvis { + obj.setChoice(BgpV6EvpnEvisChoice.EVI_VXLAN) + obj.eviVxlanHolder = nil + obj.obj.EviVxlan = value.msg() + + return obj +} + +func (obj *bgpV6EvpnEvis) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.EviVxlan != nil { + + obj.EviVxlan().validateObj(vObj, set_default) + } + +} + +func (obj *bgpV6EvpnEvis) setDefault() { + var choices_set int = 0 + var choice BgpV6EvpnEvisChoiceEnum + + if obj.obj.EviVxlan != nil { + choices_set += 1 + choice = BgpV6EvpnEvisChoice.EVI_VXLAN + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(BgpV6EvpnEvisChoice.EVI_VXLAN) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in BgpV6EvpnEvis") + } + } else { + intVal := otg.BgpV6EvpnEvis_Choice_Enum_value[string(choice)] + enumValue := otg.BgpV6EvpnEvis_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/bgp_v6_interface.go b/gosnappi/bgp_v6_interface.go new file mode 100644 index 00000000..18861e6d --- /dev/null +++ b/gosnappi/bgp_v6_interface.go @@ -0,0 +1,437 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV6Interface ***** +type bgpV6Interface struct { + validation + obj *otg.BgpV6Interface + marshaller marshalBgpV6Interface + unMarshaller unMarshalBgpV6Interface + peersHolder BgpV6InterfaceBgpV6PeerIter +} + +func NewBgpV6Interface() BgpV6Interface { + obj := bgpV6Interface{obj: &otg.BgpV6Interface{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV6Interface) msg() *otg.BgpV6Interface { + return obj.obj +} + +func (obj *bgpV6Interface) setMsg(msg *otg.BgpV6Interface) BgpV6Interface { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV6Interface struct { + obj *bgpV6Interface +} + +type marshalBgpV6Interface interface { + // ToProto marshals BgpV6Interface to protobuf object *otg.BgpV6Interface + ToProto() (*otg.BgpV6Interface, error) + // ToPbText marshals BgpV6Interface to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV6Interface to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV6Interface to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV6Interface struct { + obj *bgpV6Interface +} + +type unMarshalBgpV6Interface interface { + // FromProto unmarshals BgpV6Interface from protobuf object *otg.BgpV6Interface + FromProto(msg *otg.BgpV6Interface) (BgpV6Interface, error) + // FromPbText unmarshals BgpV6Interface from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV6Interface from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV6Interface from JSON text + FromJson(value string) error +} + +func (obj *bgpV6Interface) Marshal() marshalBgpV6Interface { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV6Interface{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV6Interface) Unmarshal() unMarshalBgpV6Interface { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV6Interface{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV6Interface) ToProto() (*otg.BgpV6Interface, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV6Interface) FromProto(msg *otg.BgpV6Interface) (BgpV6Interface, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV6Interface) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV6Interface) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV6Interface) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6Interface) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV6Interface) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6Interface) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV6Interface) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV6Interface) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV6Interface) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV6Interface) Clone() (BgpV6Interface, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV6Interface() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpV6Interface) setNil() { + obj.peersHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpV6Interface is configuration for emulated BGPv6 peers and routes on a single IPv6 interface. +type BgpV6Interface interface { + Validation + // msg marshals BgpV6Interface to protobuf object *otg.BgpV6Interface + // and doesn't set defaults + msg() *otg.BgpV6Interface + // setMsg unmarshals BgpV6Interface from protobuf object *otg.BgpV6Interface + // and doesn't set defaults + setMsg(*otg.BgpV6Interface) BgpV6Interface + // provides marshal interface + Marshal() marshalBgpV6Interface + // provides unmarshal interface + Unmarshal() unMarshalBgpV6Interface + // validate validates BgpV6Interface + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV6Interface, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv6Name returns string, set in BgpV6Interface. + Ipv6Name() string + // SetIpv6Name assigns string provided by user to BgpV6Interface + SetIpv6Name(value string) BgpV6Interface + // Peers returns BgpV6InterfaceBgpV6PeerIterIter, set in BgpV6Interface + Peers() BgpV6InterfaceBgpV6PeerIter + setNil() +} + +// The unique name of IPv6 Loopback IPv6 interface or DHCPv4 client used as the source IP for this list of BGP peers. +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Device.Ipv6Loopback/properties/name +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Device.Ipv6Loopback/properties/name +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// Ipv6Name returns a string +func (obj *bgpV6Interface) Ipv6Name() string { + + return *obj.obj.Ipv6Name + +} + +// The unique name of IPv6 Loopback IPv6 interface or DHCPv4 client used as the source IP for this list of BGP peers. +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Device.Ipv6Loopback/properties/name +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Device.Ipv6Loopback/properties/name +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// SetIpv6Name sets the string value in the BgpV6Interface object +func (obj *bgpV6Interface) SetIpv6Name(value string) BgpV6Interface { + + obj.obj.Ipv6Name = &value + return obj +} + +// This contains the list of BGPv6 peers configured on this interface. +// Peers returns a []BgpV6Peer +func (obj *bgpV6Interface) Peers() BgpV6InterfaceBgpV6PeerIter { + if len(obj.obj.Peers) == 0 { + obj.obj.Peers = []*otg.BgpV6Peer{} + } + if obj.peersHolder == nil { + obj.peersHolder = newBgpV6InterfaceBgpV6PeerIter(&obj.obj.Peers).setMsg(obj) + } + return obj.peersHolder +} + +type bgpV6InterfaceBgpV6PeerIter struct { + obj *bgpV6Interface + bgpV6PeerSlice []BgpV6Peer + fieldPtr *[]*otg.BgpV6Peer +} + +func newBgpV6InterfaceBgpV6PeerIter(ptr *[]*otg.BgpV6Peer) BgpV6InterfaceBgpV6PeerIter { + return &bgpV6InterfaceBgpV6PeerIter{fieldPtr: ptr} +} + +type BgpV6InterfaceBgpV6PeerIter interface { + setMsg(*bgpV6Interface) BgpV6InterfaceBgpV6PeerIter + Items() []BgpV6Peer + Add() BgpV6Peer + Append(items ...BgpV6Peer) BgpV6InterfaceBgpV6PeerIter + Set(index int, newObj BgpV6Peer) BgpV6InterfaceBgpV6PeerIter + Clear() BgpV6InterfaceBgpV6PeerIter + clearHolderSlice() BgpV6InterfaceBgpV6PeerIter + appendHolderSlice(item BgpV6Peer) BgpV6InterfaceBgpV6PeerIter +} + +func (obj *bgpV6InterfaceBgpV6PeerIter) setMsg(msg *bgpV6Interface) BgpV6InterfaceBgpV6PeerIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpV6Peer{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6InterfaceBgpV6PeerIter) Items() []BgpV6Peer { + return obj.bgpV6PeerSlice +} + +func (obj *bgpV6InterfaceBgpV6PeerIter) Add() BgpV6Peer { + newObj := &otg.BgpV6Peer{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpV6Peer{obj: newObj} + newLibObj.setDefault() + obj.bgpV6PeerSlice = append(obj.bgpV6PeerSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6InterfaceBgpV6PeerIter) Append(items ...BgpV6Peer) BgpV6InterfaceBgpV6PeerIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpV6PeerSlice = append(obj.bgpV6PeerSlice, item) + } + return obj +} + +func (obj *bgpV6InterfaceBgpV6PeerIter) Set(index int, newObj BgpV6Peer) BgpV6InterfaceBgpV6PeerIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpV6PeerSlice[index] = newObj + return obj +} +func (obj *bgpV6InterfaceBgpV6PeerIter) Clear() BgpV6InterfaceBgpV6PeerIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpV6Peer{} + obj.bgpV6PeerSlice = []BgpV6Peer{} + } + return obj +} +func (obj *bgpV6InterfaceBgpV6PeerIter) clearHolderSlice() BgpV6InterfaceBgpV6PeerIter { + if len(obj.bgpV6PeerSlice) > 0 { + obj.bgpV6PeerSlice = []BgpV6Peer{} + } + return obj +} +func (obj *bgpV6InterfaceBgpV6PeerIter) appendHolderSlice(item BgpV6Peer) BgpV6InterfaceBgpV6PeerIter { + obj.bgpV6PeerSlice = append(obj.bgpV6PeerSlice, item) + return obj +} + +func (obj *bgpV6Interface) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Ipv6Name is required + if obj.obj.Ipv6Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv6Name is required field on interface BgpV6Interface") + } + + if len(obj.obj.Peers) != 0 { + + if set_default { + obj.Peers().clearHolderSlice() + for _, item := range obj.obj.Peers { + obj.Peers().appendHolderSlice(&bgpV6Peer{obj: item}) + } + } + for _, item := range obj.Peers().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpV6Interface) setDefault() { + +} diff --git a/gosnappi/bgp_v6_peer.go b/gosnappi/bgp_v6_peer.go new file mode 100644 index 00000000..40bad667 --- /dev/null +++ b/gosnappi/bgp_v6_peer.go @@ -0,0 +1,1248 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV6Peer ***** +type bgpV6Peer struct { + validation + obj *otg.BgpV6Peer + marshaller marshalBgpV6Peer + unMarshaller unMarshalBgpV6Peer + segmentRoutingHolder BgpV6SegmentRouting + evpnEthernetSegmentsHolder BgpV6PeerBgpV6EthernetSegmentIter + advancedHolder BgpAdvanced + capabilityHolder BgpCapability + learnedInformationFilterHolder BgpLearnedInformationFilter + v4RoutesHolder BgpV6PeerBgpV4RouteRangeIter + v6RoutesHolder BgpV6PeerBgpV6RouteRangeIter + v4SrtePoliciesHolder BgpV6PeerBgpSrteV4PolicyIter + v6SrtePoliciesHolder BgpV6PeerBgpSrteV6PolicyIter + gracefulRestartHolder BgpGracefulRestart + replayUpdatesHolder BgpUpdateReplay +} + +func NewBgpV6Peer() BgpV6Peer { + obj := bgpV6Peer{obj: &otg.BgpV6Peer{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV6Peer) msg() *otg.BgpV6Peer { + return obj.obj +} + +func (obj *bgpV6Peer) setMsg(msg *otg.BgpV6Peer) BgpV6Peer { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV6Peer struct { + obj *bgpV6Peer +} + +type marshalBgpV6Peer interface { + // ToProto marshals BgpV6Peer to protobuf object *otg.BgpV6Peer + ToProto() (*otg.BgpV6Peer, error) + // ToPbText marshals BgpV6Peer to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV6Peer to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV6Peer to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV6Peer struct { + obj *bgpV6Peer +} + +type unMarshalBgpV6Peer interface { + // FromProto unmarshals BgpV6Peer from protobuf object *otg.BgpV6Peer + FromProto(msg *otg.BgpV6Peer) (BgpV6Peer, error) + // FromPbText unmarshals BgpV6Peer from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV6Peer from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV6Peer from JSON text + FromJson(value string) error +} + +func (obj *bgpV6Peer) Marshal() marshalBgpV6Peer { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV6Peer{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV6Peer) Unmarshal() unMarshalBgpV6Peer { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV6Peer{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV6Peer) ToProto() (*otg.BgpV6Peer, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV6Peer) FromProto(msg *otg.BgpV6Peer) (BgpV6Peer, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV6Peer) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV6Peer) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV6Peer) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6Peer) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV6Peer) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6Peer) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV6Peer) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV6Peer) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV6Peer) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV6Peer) Clone() (BgpV6Peer, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV6Peer() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpV6Peer) setNil() { + obj.segmentRoutingHolder = nil + obj.evpnEthernetSegmentsHolder = nil + obj.advancedHolder = nil + obj.capabilityHolder = nil + obj.learnedInformationFilterHolder = nil + obj.v4RoutesHolder = nil + obj.v6RoutesHolder = nil + obj.v4SrtePoliciesHolder = nil + obj.v6SrtePoliciesHolder = nil + obj.gracefulRestartHolder = nil + obj.replayUpdatesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpV6Peer is configuration for BGPv6 peer settings and routes. +type BgpV6Peer interface { + Validation + // msg marshals BgpV6Peer to protobuf object *otg.BgpV6Peer + // and doesn't set defaults + msg() *otg.BgpV6Peer + // setMsg unmarshals BgpV6Peer from protobuf object *otg.BgpV6Peer + // and doesn't set defaults + setMsg(*otg.BgpV6Peer) BgpV6Peer + // provides marshal interface + Marshal() marshalBgpV6Peer + // provides unmarshal interface + Unmarshal() unMarshalBgpV6Peer + // validate validates BgpV6Peer + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV6Peer, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PeerAddress returns string, set in BgpV6Peer. + PeerAddress() string + // SetPeerAddress assigns string provided by user to BgpV6Peer + SetPeerAddress(value string) BgpV6Peer + // SegmentRouting returns BgpV6SegmentRouting, set in BgpV6Peer. + // BgpV6SegmentRouting is configuration for BGPv6 segment routing settings. + SegmentRouting() BgpV6SegmentRouting + // SetSegmentRouting assigns BgpV6SegmentRouting provided by user to BgpV6Peer. + // BgpV6SegmentRouting is configuration for BGPv6 segment routing settings. + SetSegmentRouting(value BgpV6SegmentRouting) BgpV6Peer + // HasSegmentRouting checks if SegmentRouting has been set in BgpV6Peer + HasSegmentRouting() bool + // EvpnEthernetSegments returns BgpV6PeerBgpV6EthernetSegmentIterIter, set in BgpV6Peer + EvpnEthernetSegments() BgpV6PeerBgpV6EthernetSegmentIter + // AsType returns BgpV6PeerAsTypeEnum, set in BgpV6Peer + AsType() BgpV6PeerAsTypeEnum + // SetAsType assigns BgpV6PeerAsTypeEnum provided by user to BgpV6Peer + SetAsType(value BgpV6PeerAsTypeEnum) BgpV6Peer + // AsNumber returns uint32, set in BgpV6Peer. + AsNumber() uint32 + // SetAsNumber assigns uint32 provided by user to BgpV6Peer + SetAsNumber(value uint32) BgpV6Peer + // AsNumberWidth returns BgpV6PeerAsNumberWidthEnum, set in BgpV6Peer + AsNumberWidth() BgpV6PeerAsNumberWidthEnum + // SetAsNumberWidth assigns BgpV6PeerAsNumberWidthEnum provided by user to BgpV6Peer + SetAsNumberWidth(value BgpV6PeerAsNumberWidthEnum) BgpV6Peer + // HasAsNumberWidth checks if AsNumberWidth has been set in BgpV6Peer + HasAsNumberWidth() bool + // Advanced returns BgpAdvanced, set in BgpV6Peer. + // BgpAdvanced is configuration for BGP advanced settings. + Advanced() BgpAdvanced + // SetAdvanced assigns BgpAdvanced provided by user to BgpV6Peer. + // BgpAdvanced is configuration for BGP advanced settings. + SetAdvanced(value BgpAdvanced) BgpV6Peer + // HasAdvanced checks if Advanced has been set in BgpV6Peer + HasAdvanced() bool + // Capability returns BgpCapability, set in BgpV6Peer. + // BgpCapability is configuration for BGP capability settings. + Capability() BgpCapability + // SetCapability assigns BgpCapability provided by user to BgpV6Peer. + // BgpCapability is configuration for BGP capability settings. + SetCapability(value BgpCapability) BgpV6Peer + // HasCapability checks if Capability has been set in BgpV6Peer + HasCapability() bool + // LearnedInformationFilter returns BgpLearnedInformationFilter, set in BgpV6Peer. + // BgpLearnedInformationFilter is configuration for controlling storage of BGP learned information recieved from the peer. + LearnedInformationFilter() BgpLearnedInformationFilter + // SetLearnedInformationFilter assigns BgpLearnedInformationFilter provided by user to BgpV6Peer. + // BgpLearnedInformationFilter is configuration for controlling storage of BGP learned information recieved from the peer. + SetLearnedInformationFilter(value BgpLearnedInformationFilter) BgpV6Peer + // HasLearnedInformationFilter checks if LearnedInformationFilter has been set in BgpV6Peer + HasLearnedInformationFilter() bool + // V4Routes returns BgpV6PeerBgpV4RouteRangeIterIter, set in BgpV6Peer + V4Routes() BgpV6PeerBgpV4RouteRangeIter + // V6Routes returns BgpV6PeerBgpV6RouteRangeIterIter, set in BgpV6Peer + V6Routes() BgpV6PeerBgpV6RouteRangeIter + // V4SrtePolicies returns BgpV6PeerBgpSrteV4PolicyIterIter, set in BgpV6Peer + V4SrtePolicies() BgpV6PeerBgpSrteV4PolicyIter + // V6SrtePolicies returns BgpV6PeerBgpSrteV6PolicyIterIter, set in BgpV6Peer + V6SrtePolicies() BgpV6PeerBgpSrteV6PolicyIter + // Name returns string, set in BgpV6Peer. + Name() string + // SetName assigns string provided by user to BgpV6Peer + SetName(value string) BgpV6Peer + // GracefulRestart returns BgpGracefulRestart, set in BgpV6Peer. + // BgpGracefulRestart is the Graceful Restart Capability (RFC 4724) is a BGP capability that can be used by a BGP speaker to indicate its ability to preserve its forwarding state during BGP restart. The Graceful Restart (GR) capability is advertised in OPEN messages sent between BGP peers. After a BGP session has been established, and the initial routing update has been completed, an End-of-RIB (Routing Information Base) marker is sent in an UPDATE message to convey information about routing convergence. + GracefulRestart() BgpGracefulRestart + // SetGracefulRestart assigns BgpGracefulRestart provided by user to BgpV6Peer. + // BgpGracefulRestart is the Graceful Restart Capability (RFC 4724) is a BGP capability that can be used by a BGP speaker to indicate its ability to preserve its forwarding state during BGP restart. The Graceful Restart (GR) capability is advertised in OPEN messages sent between BGP peers. After a BGP session has been established, and the initial routing update has been completed, an End-of-RIB (Routing Information Base) marker is sent in an UPDATE message to convey information about routing convergence. + SetGracefulRestart(value BgpGracefulRestart) BgpV6Peer + // HasGracefulRestart checks if GracefulRestart has been set in BgpV6Peer + HasGracefulRestart() bool + // ReplayUpdates returns BgpUpdateReplay, set in BgpV6Peer. + // BgpUpdateReplay is ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. + ReplayUpdates() BgpUpdateReplay + // SetReplayUpdates assigns BgpUpdateReplay provided by user to BgpV6Peer. + // BgpUpdateReplay is ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. + SetReplayUpdates(value BgpUpdateReplay) BgpV6Peer + // HasReplayUpdates checks if ReplayUpdates has been set in BgpV6Peer + HasReplayUpdates() bool + setNil() +} + +// IPv6 address of the BGP peer for the session +// PeerAddress returns a string +func (obj *bgpV6Peer) PeerAddress() string { + + return *obj.obj.PeerAddress + +} + +// IPv6 address of the BGP peer for the session +// SetPeerAddress sets the string value in the BgpV6Peer object +func (obj *bgpV6Peer) SetPeerAddress(value string) BgpV6Peer { + + obj.obj.PeerAddress = &value + return obj +} + +// description is TBD +// SegmentRouting returns a BgpV6SegmentRouting +func (obj *bgpV6Peer) SegmentRouting() BgpV6SegmentRouting { + if obj.obj.SegmentRouting == nil { + obj.obj.SegmentRouting = NewBgpV6SegmentRouting().msg() + } + if obj.segmentRoutingHolder == nil { + obj.segmentRoutingHolder = &bgpV6SegmentRouting{obj: obj.obj.SegmentRouting} + } + return obj.segmentRoutingHolder +} + +// description is TBD +// SegmentRouting returns a BgpV6SegmentRouting +func (obj *bgpV6Peer) HasSegmentRouting() bool { + return obj.obj.SegmentRouting != nil +} + +// description is TBD +// SetSegmentRouting sets the BgpV6SegmentRouting value in the BgpV6Peer object +func (obj *bgpV6Peer) SetSegmentRouting(value BgpV6SegmentRouting) BgpV6Peer { + + obj.segmentRoutingHolder = nil + obj.obj.SegmentRouting = value.msg() + + return obj +} + +// This contains the list of Ethernet Virtual Private Network (EVPN) Ethernet Segments (ES) Per BGP Peer for IPv6 Address Family Identifier (AFI). +// +// Each Ethernet Segment contains a list of EVPN Instances (EVIs) . +// Each EVI contains a list of Broadcast Domains. +// Each Broadcast Domain contains a list of MAC/IP Ranges. +// +// is responsible for advertising Ethernet Auto-discovery Route Per EVI (Type 1). +// +// is responsible for advertising Ethernet Auto-discovery Route Per Ethernet Segment (Type 1). +// +// is responsible for advertising MAC/IP Advertisement Route (Type 2). +// +// is responsible for advertising Inclusive Multicast Ethernet Tag Route (Type 3). +// +// Ethernet Segment is responsible for advertising Ethernet Segment Route (Type 4). +// EvpnEthernetSegments returns a []BgpV6EthernetSegment +func (obj *bgpV6Peer) EvpnEthernetSegments() BgpV6PeerBgpV6EthernetSegmentIter { + if len(obj.obj.EvpnEthernetSegments) == 0 { + obj.obj.EvpnEthernetSegments = []*otg.BgpV6EthernetSegment{} + } + if obj.evpnEthernetSegmentsHolder == nil { + obj.evpnEthernetSegmentsHolder = newBgpV6PeerBgpV6EthernetSegmentIter(&obj.obj.EvpnEthernetSegments).setMsg(obj) + } + return obj.evpnEthernetSegmentsHolder +} + +type bgpV6PeerBgpV6EthernetSegmentIter struct { + obj *bgpV6Peer + bgpV6EthernetSegmentSlice []BgpV6EthernetSegment + fieldPtr *[]*otg.BgpV6EthernetSegment +} + +func newBgpV6PeerBgpV6EthernetSegmentIter(ptr *[]*otg.BgpV6EthernetSegment) BgpV6PeerBgpV6EthernetSegmentIter { + return &bgpV6PeerBgpV6EthernetSegmentIter{fieldPtr: ptr} +} + +type BgpV6PeerBgpV6EthernetSegmentIter interface { + setMsg(*bgpV6Peer) BgpV6PeerBgpV6EthernetSegmentIter + Items() []BgpV6EthernetSegment + Add() BgpV6EthernetSegment + Append(items ...BgpV6EthernetSegment) BgpV6PeerBgpV6EthernetSegmentIter + Set(index int, newObj BgpV6EthernetSegment) BgpV6PeerBgpV6EthernetSegmentIter + Clear() BgpV6PeerBgpV6EthernetSegmentIter + clearHolderSlice() BgpV6PeerBgpV6EthernetSegmentIter + appendHolderSlice(item BgpV6EthernetSegment) BgpV6PeerBgpV6EthernetSegmentIter +} + +func (obj *bgpV6PeerBgpV6EthernetSegmentIter) setMsg(msg *bgpV6Peer) BgpV6PeerBgpV6EthernetSegmentIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpV6EthernetSegment{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6PeerBgpV6EthernetSegmentIter) Items() []BgpV6EthernetSegment { + return obj.bgpV6EthernetSegmentSlice +} + +func (obj *bgpV6PeerBgpV6EthernetSegmentIter) Add() BgpV6EthernetSegment { + newObj := &otg.BgpV6EthernetSegment{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpV6EthernetSegment{obj: newObj} + newLibObj.setDefault() + obj.bgpV6EthernetSegmentSlice = append(obj.bgpV6EthernetSegmentSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6PeerBgpV6EthernetSegmentIter) Append(items ...BgpV6EthernetSegment) BgpV6PeerBgpV6EthernetSegmentIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpV6EthernetSegmentSlice = append(obj.bgpV6EthernetSegmentSlice, item) + } + return obj +} + +func (obj *bgpV6PeerBgpV6EthernetSegmentIter) Set(index int, newObj BgpV6EthernetSegment) BgpV6PeerBgpV6EthernetSegmentIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpV6EthernetSegmentSlice[index] = newObj + return obj +} +func (obj *bgpV6PeerBgpV6EthernetSegmentIter) Clear() BgpV6PeerBgpV6EthernetSegmentIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpV6EthernetSegment{} + obj.bgpV6EthernetSegmentSlice = []BgpV6EthernetSegment{} + } + return obj +} +func (obj *bgpV6PeerBgpV6EthernetSegmentIter) clearHolderSlice() BgpV6PeerBgpV6EthernetSegmentIter { + if len(obj.bgpV6EthernetSegmentSlice) > 0 { + obj.bgpV6EthernetSegmentSlice = []BgpV6EthernetSegment{} + } + return obj +} +func (obj *bgpV6PeerBgpV6EthernetSegmentIter) appendHolderSlice(item BgpV6EthernetSegment) BgpV6PeerBgpV6EthernetSegmentIter { + obj.bgpV6EthernetSegmentSlice = append(obj.bgpV6EthernetSegmentSlice, item) + return obj +} + +type BgpV6PeerAsTypeEnum string + +// Enum of AsType on BgpV6Peer +var BgpV6PeerAsType = struct { + IBGP BgpV6PeerAsTypeEnum + EBGP BgpV6PeerAsTypeEnum +}{ + IBGP: BgpV6PeerAsTypeEnum("ibgp"), + EBGP: BgpV6PeerAsTypeEnum("ebgp"), +} + +func (obj *bgpV6Peer) AsType() BgpV6PeerAsTypeEnum { + return BgpV6PeerAsTypeEnum(obj.obj.AsType.Enum().String()) +} + +func (obj *bgpV6Peer) SetAsType(value BgpV6PeerAsTypeEnum) BgpV6Peer { + intValue, ok := otg.BgpV6Peer_AsType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpV6PeerAsTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpV6Peer_AsType_Enum(intValue) + obj.obj.AsType = &enumValue + + return obj +} + +// Autonomous System Number (AS number or ASN) +// AsNumber returns a uint32 +func (obj *bgpV6Peer) AsNumber() uint32 { + + return *obj.obj.AsNumber + +} + +// Autonomous System Number (AS number or ASN) +// SetAsNumber sets the uint32 value in the BgpV6Peer object +func (obj *bgpV6Peer) SetAsNumber(value uint32) BgpV6Peer { + + obj.obj.AsNumber = &value + return obj +} + +type BgpV6PeerAsNumberWidthEnum string + +// Enum of AsNumberWidth on BgpV6Peer +var BgpV6PeerAsNumberWidth = struct { + TWO BgpV6PeerAsNumberWidthEnum + FOUR BgpV6PeerAsNumberWidthEnum +}{ + TWO: BgpV6PeerAsNumberWidthEnum("two"), + FOUR: BgpV6PeerAsNumberWidthEnum("four"), +} + +func (obj *bgpV6Peer) AsNumberWidth() BgpV6PeerAsNumberWidthEnum { + return BgpV6PeerAsNumberWidthEnum(obj.obj.AsNumberWidth.Enum().String()) +} + +// The width in bytes of the as_number values. Any as_number values that exceeds the width MUST result in an error. +// AsNumberWidth returns a string +func (obj *bgpV6Peer) HasAsNumberWidth() bool { + return obj.obj.AsNumberWidth != nil +} + +func (obj *bgpV6Peer) SetAsNumberWidth(value BgpV6PeerAsNumberWidthEnum) BgpV6Peer { + intValue, ok := otg.BgpV6Peer_AsNumberWidth_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpV6PeerAsNumberWidthEnum", string(value))) + return obj + } + enumValue := otg.BgpV6Peer_AsNumberWidth_Enum(intValue) + obj.obj.AsNumberWidth = &enumValue + + return obj +} + +// description is TBD +// Advanced returns a BgpAdvanced +func (obj *bgpV6Peer) Advanced() BgpAdvanced { + if obj.obj.Advanced == nil { + obj.obj.Advanced = NewBgpAdvanced().msg() + } + if obj.advancedHolder == nil { + obj.advancedHolder = &bgpAdvanced{obj: obj.obj.Advanced} + } + return obj.advancedHolder +} + +// description is TBD +// Advanced returns a BgpAdvanced +func (obj *bgpV6Peer) HasAdvanced() bool { + return obj.obj.Advanced != nil +} + +// description is TBD +// SetAdvanced sets the BgpAdvanced value in the BgpV6Peer object +func (obj *bgpV6Peer) SetAdvanced(value BgpAdvanced) BgpV6Peer { + + obj.advancedHolder = nil + obj.obj.Advanced = value.msg() + + return obj +} + +// description is TBD +// Capability returns a BgpCapability +func (obj *bgpV6Peer) Capability() BgpCapability { + if obj.obj.Capability == nil { + obj.obj.Capability = NewBgpCapability().msg() + } + if obj.capabilityHolder == nil { + obj.capabilityHolder = &bgpCapability{obj: obj.obj.Capability} + } + return obj.capabilityHolder +} + +// description is TBD +// Capability returns a BgpCapability +func (obj *bgpV6Peer) HasCapability() bool { + return obj.obj.Capability != nil +} + +// description is TBD +// SetCapability sets the BgpCapability value in the BgpV6Peer object +func (obj *bgpV6Peer) SetCapability(value BgpCapability) BgpV6Peer { + + obj.capabilityHolder = nil + obj.obj.Capability = value.msg() + + return obj +} + +// description is TBD +// LearnedInformationFilter returns a BgpLearnedInformationFilter +func (obj *bgpV6Peer) LearnedInformationFilter() BgpLearnedInformationFilter { + if obj.obj.LearnedInformationFilter == nil { + obj.obj.LearnedInformationFilter = NewBgpLearnedInformationFilter().msg() + } + if obj.learnedInformationFilterHolder == nil { + obj.learnedInformationFilterHolder = &bgpLearnedInformationFilter{obj: obj.obj.LearnedInformationFilter} + } + return obj.learnedInformationFilterHolder +} + +// description is TBD +// LearnedInformationFilter returns a BgpLearnedInformationFilter +func (obj *bgpV6Peer) HasLearnedInformationFilter() bool { + return obj.obj.LearnedInformationFilter != nil +} + +// description is TBD +// SetLearnedInformationFilter sets the BgpLearnedInformationFilter value in the BgpV6Peer object +func (obj *bgpV6Peer) SetLearnedInformationFilter(value BgpLearnedInformationFilter) BgpV6Peer { + + obj.learnedInformationFilterHolder = nil + obj.obj.LearnedInformationFilter = value.msg() + + return obj +} + +// Emulated BGPv4 route ranges. +// V4Routes returns a []BgpV4RouteRange +func (obj *bgpV6Peer) V4Routes() BgpV6PeerBgpV4RouteRangeIter { + if len(obj.obj.V4Routes) == 0 { + obj.obj.V4Routes = []*otg.BgpV4RouteRange{} + } + if obj.v4RoutesHolder == nil { + obj.v4RoutesHolder = newBgpV6PeerBgpV4RouteRangeIter(&obj.obj.V4Routes).setMsg(obj) + } + return obj.v4RoutesHolder +} + +type bgpV6PeerBgpV4RouteRangeIter struct { + obj *bgpV6Peer + bgpV4RouteRangeSlice []BgpV4RouteRange + fieldPtr *[]*otg.BgpV4RouteRange +} + +func newBgpV6PeerBgpV4RouteRangeIter(ptr *[]*otg.BgpV4RouteRange) BgpV6PeerBgpV4RouteRangeIter { + return &bgpV6PeerBgpV4RouteRangeIter{fieldPtr: ptr} +} + +type BgpV6PeerBgpV4RouteRangeIter interface { + setMsg(*bgpV6Peer) BgpV6PeerBgpV4RouteRangeIter + Items() []BgpV4RouteRange + Add() BgpV4RouteRange + Append(items ...BgpV4RouteRange) BgpV6PeerBgpV4RouteRangeIter + Set(index int, newObj BgpV4RouteRange) BgpV6PeerBgpV4RouteRangeIter + Clear() BgpV6PeerBgpV4RouteRangeIter + clearHolderSlice() BgpV6PeerBgpV4RouteRangeIter + appendHolderSlice(item BgpV4RouteRange) BgpV6PeerBgpV4RouteRangeIter +} + +func (obj *bgpV6PeerBgpV4RouteRangeIter) setMsg(msg *bgpV6Peer) BgpV6PeerBgpV4RouteRangeIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpV4RouteRange{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6PeerBgpV4RouteRangeIter) Items() []BgpV4RouteRange { + return obj.bgpV4RouteRangeSlice +} + +func (obj *bgpV6PeerBgpV4RouteRangeIter) Add() BgpV4RouteRange { + newObj := &otg.BgpV4RouteRange{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpV4RouteRange{obj: newObj} + newLibObj.setDefault() + obj.bgpV4RouteRangeSlice = append(obj.bgpV4RouteRangeSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6PeerBgpV4RouteRangeIter) Append(items ...BgpV4RouteRange) BgpV6PeerBgpV4RouteRangeIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpV4RouteRangeSlice = append(obj.bgpV4RouteRangeSlice, item) + } + return obj +} + +func (obj *bgpV6PeerBgpV4RouteRangeIter) Set(index int, newObj BgpV4RouteRange) BgpV6PeerBgpV4RouteRangeIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpV4RouteRangeSlice[index] = newObj + return obj +} +func (obj *bgpV6PeerBgpV4RouteRangeIter) Clear() BgpV6PeerBgpV4RouteRangeIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpV4RouteRange{} + obj.bgpV4RouteRangeSlice = []BgpV4RouteRange{} + } + return obj +} +func (obj *bgpV6PeerBgpV4RouteRangeIter) clearHolderSlice() BgpV6PeerBgpV4RouteRangeIter { + if len(obj.bgpV4RouteRangeSlice) > 0 { + obj.bgpV4RouteRangeSlice = []BgpV4RouteRange{} + } + return obj +} +func (obj *bgpV6PeerBgpV4RouteRangeIter) appendHolderSlice(item BgpV4RouteRange) BgpV6PeerBgpV4RouteRangeIter { + obj.bgpV4RouteRangeSlice = append(obj.bgpV4RouteRangeSlice, item) + return obj +} + +// Emulated BGPv6 route ranges. +// V6Routes returns a []BgpV6RouteRange +func (obj *bgpV6Peer) V6Routes() BgpV6PeerBgpV6RouteRangeIter { + if len(obj.obj.V6Routes) == 0 { + obj.obj.V6Routes = []*otg.BgpV6RouteRange{} + } + if obj.v6RoutesHolder == nil { + obj.v6RoutesHolder = newBgpV6PeerBgpV6RouteRangeIter(&obj.obj.V6Routes).setMsg(obj) + } + return obj.v6RoutesHolder +} + +type bgpV6PeerBgpV6RouteRangeIter struct { + obj *bgpV6Peer + bgpV6RouteRangeSlice []BgpV6RouteRange + fieldPtr *[]*otg.BgpV6RouteRange +} + +func newBgpV6PeerBgpV6RouteRangeIter(ptr *[]*otg.BgpV6RouteRange) BgpV6PeerBgpV6RouteRangeIter { + return &bgpV6PeerBgpV6RouteRangeIter{fieldPtr: ptr} +} + +type BgpV6PeerBgpV6RouteRangeIter interface { + setMsg(*bgpV6Peer) BgpV6PeerBgpV6RouteRangeIter + Items() []BgpV6RouteRange + Add() BgpV6RouteRange + Append(items ...BgpV6RouteRange) BgpV6PeerBgpV6RouteRangeIter + Set(index int, newObj BgpV6RouteRange) BgpV6PeerBgpV6RouteRangeIter + Clear() BgpV6PeerBgpV6RouteRangeIter + clearHolderSlice() BgpV6PeerBgpV6RouteRangeIter + appendHolderSlice(item BgpV6RouteRange) BgpV6PeerBgpV6RouteRangeIter +} + +func (obj *bgpV6PeerBgpV6RouteRangeIter) setMsg(msg *bgpV6Peer) BgpV6PeerBgpV6RouteRangeIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpV6RouteRange{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6PeerBgpV6RouteRangeIter) Items() []BgpV6RouteRange { + return obj.bgpV6RouteRangeSlice +} + +func (obj *bgpV6PeerBgpV6RouteRangeIter) Add() BgpV6RouteRange { + newObj := &otg.BgpV6RouteRange{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpV6RouteRange{obj: newObj} + newLibObj.setDefault() + obj.bgpV6RouteRangeSlice = append(obj.bgpV6RouteRangeSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6PeerBgpV6RouteRangeIter) Append(items ...BgpV6RouteRange) BgpV6PeerBgpV6RouteRangeIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpV6RouteRangeSlice = append(obj.bgpV6RouteRangeSlice, item) + } + return obj +} + +func (obj *bgpV6PeerBgpV6RouteRangeIter) Set(index int, newObj BgpV6RouteRange) BgpV6PeerBgpV6RouteRangeIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpV6RouteRangeSlice[index] = newObj + return obj +} +func (obj *bgpV6PeerBgpV6RouteRangeIter) Clear() BgpV6PeerBgpV6RouteRangeIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpV6RouteRange{} + obj.bgpV6RouteRangeSlice = []BgpV6RouteRange{} + } + return obj +} +func (obj *bgpV6PeerBgpV6RouteRangeIter) clearHolderSlice() BgpV6PeerBgpV6RouteRangeIter { + if len(obj.bgpV6RouteRangeSlice) > 0 { + obj.bgpV6RouteRangeSlice = []BgpV6RouteRange{} + } + return obj +} +func (obj *bgpV6PeerBgpV6RouteRangeIter) appendHolderSlice(item BgpV6RouteRange) BgpV6PeerBgpV6RouteRangeIter { + obj.bgpV6RouteRangeSlice = append(obj.bgpV6RouteRangeSlice, item) + return obj +} + +// Segment Routing Traffic Engineering (SR TE) Policies for IPv4 Address Family Identifier (AFI). +// V4SrtePolicies returns a []BgpSrteV4Policy +func (obj *bgpV6Peer) V4SrtePolicies() BgpV6PeerBgpSrteV4PolicyIter { + if len(obj.obj.V4SrtePolicies) == 0 { + obj.obj.V4SrtePolicies = []*otg.BgpSrteV4Policy{} + } + if obj.v4SrtePoliciesHolder == nil { + obj.v4SrtePoliciesHolder = newBgpV6PeerBgpSrteV4PolicyIter(&obj.obj.V4SrtePolicies).setMsg(obj) + } + return obj.v4SrtePoliciesHolder +} + +type bgpV6PeerBgpSrteV4PolicyIter struct { + obj *bgpV6Peer + bgpSrteV4PolicySlice []BgpSrteV4Policy + fieldPtr *[]*otg.BgpSrteV4Policy +} + +func newBgpV6PeerBgpSrteV4PolicyIter(ptr *[]*otg.BgpSrteV4Policy) BgpV6PeerBgpSrteV4PolicyIter { + return &bgpV6PeerBgpSrteV4PolicyIter{fieldPtr: ptr} +} + +type BgpV6PeerBgpSrteV4PolicyIter interface { + setMsg(*bgpV6Peer) BgpV6PeerBgpSrteV4PolicyIter + Items() []BgpSrteV4Policy + Add() BgpSrteV4Policy + Append(items ...BgpSrteV4Policy) BgpV6PeerBgpSrteV4PolicyIter + Set(index int, newObj BgpSrteV4Policy) BgpV6PeerBgpSrteV4PolicyIter + Clear() BgpV6PeerBgpSrteV4PolicyIter + clearHolderSlice() BgpV6PeerBgpSrteV4PolicyIter + appendHolderSlice(item BgpSrteV4Policy) BgpV6PeerBgpSrteV4PolicyIter +} + +func (obj *bgpV6PeerBgpSrteV4PolicyIter) setMsg(msg *bgpV6Peer) BgpV6PeerBgpSrteV4PolicyIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpSrteV4Policy{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6PeerBgpSrteV4PolicyIter) Items() []BgpSrteV4Policy { + return obj.bgpSrteV4PolicySlice +} + +func (obj *bgpV6PeerBgpSrteV4PolicyIter) Add() BgpSrteV4Policy { + newObj := &otg.BgpSrteV4Policy{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpSrteV4Policy{obj: newObj} + newLibObj.setDefault() + obj.bgpSrteV4PolicySlice = append(obj.bgpSrteV4PolicySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6PeerBgpSrteV4PolicyIter) Append(items ...BgpSrteV4Policy) BgpV6PeerBgpSrteV4PolicyIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpSrteV4PolicySlice = append(obj.bgpSrteV4PolicySlice, item) + } + return obj +} + +func (obj *bgpV6PeerBgpSrteV4PolicyIter) Set(index int, newObj BgpSrteV4Policy) BgpV6PeerBgpSrteV4PolicyIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpSrteV4PolicySlice[index] = newObj + return obj +} +func (obj *bgpV6PeerBgpSrteV4PolicyIter) Clear() BgpV6PeerBgpSrteV4PolicyIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpSrteV4Policy{} + obj.bgpSrteV4PolicySlice = []BgpSrteV4Policy{} + } + return obj +} +func (obj *bgpV6PeerBgpSrteV4PolicyIter) clearHolderSlice() BgpV6PeerBgpSrteV4PolicyIter { + if len(obj.bgpSrteV4PolicySlice) > 0 { + obj.bgpSrteV4PolicySlice = []BgpSrteV4Policy{} + } + return obj +} +func (obj *bgpV6PeerBgpSrteV4PolicyIter) appendHolderSlice(item BgpSrteV4Policy) BgpV6PeerBgpSrteV4PolicyIter { + obj.bgpSrteV4PolicySlice = append(obj.bgpSrteV4PolicySlice, item) + return obj +} + +// Segment Routing Traffic Engineering (SR TE) Policies for IPv6 Address Family Identifier (AFI). +// V6SrtePolicies returns a []BgpSrteV6Policy +func (obj *bgpV6Peer) V6SrtePolicies() BgpV6PeerBgpSrteV6PolicyIter { + if len(obj.obj.V6SrtePolicies) == 0 { + obj.obj.V6SrtePolicies = []*otg.BgpSrteV6Policy{} + } + if obj.v6SrtePoliciesHolder == nil { + obj.v6SrtePoliciesHolder = newBgpV6PeerBgpSrteV6PolicyIter(&obj.obj.V6SrtePolicies).setMsg(obj) + } + return obj.v6SrtePoliciesHolder +} + +type bgpV6PeerBgpSrteV6PolicyIter struct { + obj *bgpV6Peer + bgpSrteV6PolicySlice []BgpSrteV6Policy + fieldPtr *[]*otg.BgpSrteV6Policy +} + +func newBgpV6PeerBgpSrteV6PolicyIter(ptr *[]*otg.BgpSrteV6Policy) BgpV6PeerBgpSrteV6PolicyIter { + return &bgpV6PeerBgpSrteV6PolicyIter{fieldPtr: ptr} +} + +type BgpV6PeerBgpSrteV6PolicyIter interface { + setMsg(*bgpV6Peer) BgpV6PeerBgpSrteV6PolicyIter + Items() []BgpSrteV6Policy + Add() BgpSrteV6Policy + Append(items ...BgpSrteV6Policy) BgpV6PeerBgpSrteV6PolicyIter + Set(index int, newObj BgpSrteV6Policy) BgpV6PeerBgpSrteV6PolicyIter + Clear() BgpV6PeerBgpSrteV6PolicyIter + clearHolderSlice() BgpV6PeerBgpSrteV6PolicyIter + appendHolderSlice(item BgpSrteV6Policy) BgpV6PeerBgpSrteV6PolicyIter +} + +func (obj *bgpV6PeerBgpSrteV6PolicyIter) setMsg(msg *bgpV6Peer) BgpV6PeerBgpSrteV6PolicyIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpSrteV6Policy{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6PeerBgpSrteV6PolicyIter) Items() []BgpSrteV6Policy { + return obj.bgpSrteV6PolicySlice +} + +func (obj *bgpV6PeerBgpSrteV6PolicyIter) Add() BgpSrteV6Policy { + newObj := &otg.BgpSrteV6Policy{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpSrteV6Policy{obj: newObj} + newLibObj.setDefault() + obj.bgpSrteV6PolicySlice = append(obj.bgpSrteV6PolicySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6PeerBgpSrteV6PolicyIter) Append(items ...BgpSrteV6Policy) BgpV6PeerBgpSrteV6PolicyIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpSrteV6PolicySlice = append(obj.bgpSrteV6PolicySlice, item) + } + return obj +} + +func (obj *bgpV6PeerBgpSrteV6PolicyIter) Set(index int, newObj BgpSrteV6Policy) BgpV6PeerBgpSrteV6PolicyIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpSrteV6PolicySlice[index] = newObj + return obj +} +func (obj *bgpV6PeerBgpSrteV6PolicyIter) Clear() BgpV6PeerBgpSrteV6PolicyIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpSrteV6Policy{} + obj.bgpSrteV6PolicySlice = []BgpSrteV6Policy{} + } + return obj +} +func (obj *bgpV6PeerBgpSrteV6PolicyIter) clearHolderSlice() BgpV6PeerBgpSrteV6PolicyIter { + if len(obj.bgpSrteV6PolicySlice) > 0 { + obj.bgpSrteV6PolicySlice = []BgpSrteV6Policy{} + } + return obj +} +func (obj *bgpV6PeerBgpSrteV6PolicyIter) appendHolderSlice(item BgpSrteV6Policy) BgpV6PeerBgpSrteV6PolicyIter { + obj.bgpSrteV6PolicySlice = append(obj.bgpSrteV6PolicySlice, item) + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *bgpV6Peer) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the BgpV6Peer object +func (obj *bgpV6Peer) SetName(value string) BgpV6Peer { + + obj.obj.Name = &value + return obj +} + +// description is TBD +// GracefulRestart returns a BgpGracefulRestart +func (obj *bgpV6Peer) GracefulRestart() BgpGracefulRestart { + if obj.obj.GracefulRestart == nil { + obj.obj.GracefulRestart = NewBgpGracefulRestart().msg() + } + if obj.gracefulRestartHolder == nil { + obj.gracefulRestartHolder = &bgpGracefulRestart{obj: obj.obj.GracefulRestart} + } + return obj.gracefulRestartHolder +} + +// description is TBD +// GracefulRestart returns a BgpGracefulRestart +func (obj *bgpV6Peer) HasGracefulRestart() bool { + return obj.obj.GracefulRestart != nil +} + +// description is TBD +// SetGracefulRestart sets the BgpGracefulRestart value in the BgpV6Peer object +func (obj *bgpV6Peer) SetGracefulRestart(value BgpGracefulRestart) BgpV6Peer { + + obj.gracefulRestartHolder = nil + obj.obj.GracefulRestart = value.msg() + + return obj +} + +// BGP Updates to be sent to the peer as specified after the session is established. +// ReplayUpdates returns a BgpUpdateReplay +func (obj *bgpV6Peer) ReplayUpdates() BgpUpdateReplay { + if obj.obj.ReplayUpdates == nil { + obj.obj.ReplayUpdates = NewBgpUpdateReplay().msg() + } + if obj.replayUpdatesHolder == nil { + obj.replayUpdatesHolder = &bgpUpdateReplay{obj: obj.obj.ReplayUpdates} + } + return obj.replayUpdatesHolder +} + +// BGP Updates to be sent to the peer as specified after the session is established. +// ReplayUpdates returns a BgpUpdateReplay +func (obj *bgpV6Peer) HasReplayUpdates() bool { + return obj.obj.ReplayUpdates != nil +} + +// BGP Updates to be sent to the peer as specified after the session is established. +// SetReplayUpdates sets the BgpUpdateReplay value in the BgpV6Peer object +func (obj *bgpV6Peer) SetReplayUpdates(value BgpUpdateReplay) BgpV6Peer { + + obj.replayUpdatesHolder = nil + obj.obj.ReplayUpdates = value.msg() + + return obj +} + +func (obj *bgpV6Peer) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // PeerAddress is required + if obj.obj.PeerAddress == nil { + vObj.validationErrors = append(vObj.validationErrors, "PeerAddress is required field on interface BgpV6Peer") + } + if obj.obj.PeerAddress != nil { + + err := obj.validateIpv6(obj.PeerAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpV6Peer.PeerAddress")) + } + + } + + if obj.obj.SegmentRouting != nil { + + obj.SegmentRouting().validateObj(vObj, set_default) + } + + if len(obj.obj.EvpnEthernetSegments) != 0 { + + if set_default { + obj.EvpnEthernetSegments().clearHolderSlice() + for _, item := range obj.obj.EvpnEthernetSegments { + obj.EvpnEthernetSegments().appendHolderSlice(&bgpV6EthernetSegment{obj: item}) + } + } + for _, item := range obj.EvpnEthernetSegments().Items() { + item.validateObj(vObj, set_default) + } + + } + + // AsType is required + if obj.obj.AsType == nil { + vObj.validationErrors = append(vObj.validationErrors, "AsType is required field on interface BgpV6Peer") + } + + // AsNumber is required + if obj.obj.AsNumber == nil { + vObj.validationErrors = append(vObj.validationErrors, "AsNumber is required field on interface BgpV6Peer") + } + + if obj.obj.Advanced != nil { + + obj.Advanced().validateObj(vObj, set_default) + } + + if obj.obj.Capability != nil { + + obj.Capability().validateObj(vObj, set_default) + } + + if obj.obj.LearnedInformationFilter != nil { + + obj.LearnedInformationFilter().validateObj(vObj, set_default) + } + + if len(obj.obj.V4Routes) != 0 { + + if set_default { + obj.V4Routes().clearHolderSlice() + for _, item := range obj.obj.V4Routes { + obj.V4Routes().appendHolderSlice(&bgpV4RouteRange{obj: item}) + } + } + for _, item := range obj.V4Routes().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.V6Routes) != 0 { + + if set_default { + obj.V6Routes().clearHolderSlice() + for _, item := range obj.obj.V6Routes { + obj.V6Routes().appendHolderSlice(&bgpV6RouteRange{obj: item}) + } + } + for _, item := range obj.V6Routes().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.V4SrtePolicies) != 0 { + + if set_default { + obj.V4SrtePolicies().clearHolderSlice() + for _, item := range obj.obj.V4SrtePolicies { + obj.V4SrtePolicies().appendHolderSlice(&bgpSrteV4Policy{obj: item}) + } + } + for _, item := range obj.V4SrtePolicies().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.V6SrtePolicies) != 0 { + + if set_default { + obj.V6SrtePolicies().clearHolderSlice() + for _, item := range obj.obj.V6SrtePolicies { + obj.V6SrtePolicies().appendHolderSlice(&bgpSrteV6Policy{obj: item}) + } + } + for _, item := range obj.V6SrtePolicies().Items() { + item.validateObj(vObj, set_default) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface BgpV6Peer") + } + + if obj.obj.GracefulRestart != nil { + + obj.GracefulRestart().validateObj(vObj, set_default) + } + + if obj.obj.ReplayUpdates != nil { + + obj.ReplayUpdates().validateObj(vObj, set_default) + } + +} + +func (obj *bgpV6Peer) setDefault() { + if obj.obj.AsNumberWidth == nil { + obj.SetAsNumberWidth(BgpV6PeerAsNumberWidth.FOUR) + + } + +} diff --git a/gosnappi/bgp_v6_route_range.go b/gosnappi/bgp_v6_route_range.go new file mode 100644 index 00000000..a8c0cd9c --- /dev/null +++ b/gosnappi/bgp_v6_route_range.go @@ -0,0 +1,1036 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV6RouteRange ***** +type bgpV6RouteRange struct { + validation + obj *otg.BgpV6RouteRange + marshaller marshalBgpV6RouteRange + unMarshaller unMarshalBgpV6RouteRange + addressesHolder BgpV6RouteRangeV6RouteAddressIter + advancedHolder BgpRouteAdvanced + communitiesHolder BgpV6RouteRangeBgpCommunityIter + asPathHolder BgpAsPath + addPathHolder BgpAddPath + extCommunitiesHolder BgpV6RouteRangeBgpExtCommunityIter + extendedCommunitiesHolder BgpV6RouteRangeBgpExtendedCommunityIter +} + +func NewBgpV6RouteRange() BgpV6RouteRange { + obj := bgpV6RouteRange{obj: &otg.BgpV6RouteRange{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV6RouteRange) msg() *otg.BgpV6RouteRange { + return obj.obj +} + +func (obj *bgpV6RouteRange) setMsg(msg *otg.BgpV6RouteRange) BgpV6RouteRange { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV6RouteRange struct { + obj *bgpV6RouteRange +} + +type marshalBgpV6RouteRange interface { + // ToProto marshals BgpV6RouteRange to protobuf object *otg.BgpV6RouteRange + ToProto() (*otg.BgpV6RouteRange, error) + // ToPbText marshals BgpV6RouteRange to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV6RouteRange to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV6RouteRange to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV6RouteRange struct { + obj *bgpV6RouteRange +} + +type unMarshalBgpV6RouteRange interface { + // FromProto unmarshals BgpV6RouteRange from protobuf object *otg.BgpV6RouteRange + FromProto(msg *otg.BgpV6RouteRange) (BgpV6RouteRange, error) + // FromPbText unmarshals BgpV6RouteRange from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV6RouteRange from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV6RouteRange from JSON text + FromJson(value string) error +} + +func (obj *bgpV6RouteRange) Marshal() marshalBgpV6RouteRange { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV6RouteRange{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV6RouteRange) Unmarshal() unMarshalBgpV6RouteRange { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV6RouteRange{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV6RouteRange) ToProto() (*otg.BgpV6RouteRange, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV6RouteRange) FromProto(msg *otg.BgpV6RouteRange) (BgpV6RouteRange, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV6RouteRange) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV6RouteRange) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV6RouteRange) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6RouteRange) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV6RouteRange) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6RouteRange) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV6RouteRange) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV6RouteRange) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV6RouteRange) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV6RouteRange) Clone() (BgpV6RouteRange, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV6RouteRange() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *bgpV6RouteRange) setNil() { + obj.addressesHolder = nil + obj.advancedHolder = nil + obj.communitiesHolder = nil + obj.asPathHolder = nil + obj.addPathHolder = nil + obj.extCommunitiesHolder = nil + obj.extendedCommunitiesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// BgpV6RouteRange is emulated BGPv6 route range. +type BgpV6RouteRange interface { + Validation + // msg marshals BgpV6RouteRange to protobuf object *otg.BgpV6RouteRange + // and doesn't set defaults + msg() *otg.BgpV6RouteRange + // setMsg unmarshals BgpV6RouteRange from protobuf object *otg.BgpV6RouteRange + // and doesn't set defaults + setMsg(*otg.BgpV6RouteRange) BgpV6RouteRange + // provides marshal interface + Marshal() marshalBgpV6RouteRange + // provides unmarshal interface + Unmarshal() unMarshalBgpV6RouteRange + // validate validates BgpV6RouteRange + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV6RouteRange, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Addresses returns BgpV6RouteRangeV6RouteAddressIterIter, set in BgpV6RouteRange + Addresses() BgpV6RouteRangeV6RouteAddressIter + // NextHopMode returns BgpV6RouteRangeNextHopModeEnum, set in BgpV6RouteRange + NextHopMode() BgpV6RouteRangeNextHopModeEnum + // SetNextHopMode assigns BgpV6RouteRangeNextHopModeEnum provided by user to BgpV6RouteRange + SetNextHopMode(value BgpV6RouteRangeNextHopModeEnum) BgpV6RouteRange + // HasNextHopMode checks if NextHopMode has been set in BgpV6RouteRange + HasNextHopMode() bool + // NextHopAddressType returns BgpV6RouteRangeNextHopAddressTypeEnum, set in BgpV6RouteRange + NextHopAddressType() BgpV6RouteRangeNextHopAddressTypeEnum + // SetNextHopAddressType assigns BgpV6RouteRangeNextHopAddressTypeEnum provided by user to BgpV6RouteRange + SetNextHopAddressType(value BgpV6RouteRangeNextHopAddressTypeEnum) BgpV6RouteRange + // HasNextHopAddressType checks if NextHopAddressType has been set in BgpV6RouteRange + HasNextHopAddressType() bool + // NextHopIpv4Address returns string, set in BgpV6RouteRange. + NextHopIpv4Address() string + // SetNextHopIpv4Address assigns string provided by user to BgpV6RouteRange + SetNextHopIpv4Address(value string) BgpV6RouteRange + // HasNextHopIpv4Address checks if NextHopIpv4Address has been set in BgpV6RouteRange + HasNextHopIpv4Address() bool + // NextHopIpv6Address returns string, set in BgpV6RouteRange. + NextHopIpv6Address() string + // SetNextHopIpv6Address assigns string provided by user to BgpV6RouteRange + SetNextHopIpv6Address(value string) BgpV6RouteRange + // HasNextHopIpv6Address checks if NextHopIpv6Address has been set in BgpV6RouteRange + HasNextHopIpv6Address() bool + // Advanced returns BgpRouteAdvanced, set in BgpV6RouteRange. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + Advanced() BgpRouteAdvanced + // SetAdvanced assigns BgpRouteAdvanced provided by user to BgpV6RouteRange. + // BgpRouteAdvanced is configuration for advanced BGP route range settings. + SetAdvanced(value BgpRouteAdvanced) BgpV6RouteRange + // HasAdvanced checks if Advanced has been set in BgpV6RouteRange + HasAdvanced() bool + // Communities returns BgpV6RouteRangeBgpCommunityIterIter, set in BgpV6RouteRange + Communities() BgpV6RouteRangeBgpCommunityIter + // AsPath returns BgpAsPath, set in BgpV6RouteRange. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + AsPath() BgpAsPath + // SetAsPath assigns BgpAsPath provided by user to BgpV6RouteRange. + // BgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + SetAsPath(value BgpAsPath) BgpV6RouteRange + // HasAsPath checks if AsPath has been set in BgpV6RouteRange + HasAsPath() bool + // AddPath returns BgpAddPath, set in BgpV6RouteRange. + // BgpAddPath is the BGP Additional Paths feature is a BGP extension that allows the advertisement of multiple paths for the same prefix without the new paths implicitly replacing any previous paths. + AddPath() BgpAddPath + // SetAddPath assigns BgpAddPath provided by user to BgpV6RouteRange. + // BgpAddPath is the BGP Additional Paths feature is a BGP extension that allows the advertisement of multiple paths for the same prefix without the new paths implicitly replacing any previous paths. + SetAddPath(value BgpAddPath) BgpV6RouteRange + // HasAddPath checks if AddPath has been set in BgpV6RouteRange + HasAddPath() bool + // Name returns string, set in BgpV6RouteRange. + Name() string + // SetName assigns string provided by user to BgpV6RouteRange + SetName(value string) BgpV6RouteRange + // ExtCommunities returns BgpV6RouteRangeBgpExtCommunityIterIter, set in BgpV6RouteRange + ExtCommunities() BgpV6RouteRangeBgpExtCommunityIter + // ExtendedCommunities returns BgpV6RouteRangeBgpExtendedCommunityIterIter, set in BgpV6RouteRange + ExtendedCommunities() BgpV6RouteRangeBgpExtendedCommunityIter + setNil() +} + +// A list of group of IPv6 route addresses. +// Addresses returns a []V6RouteAddress +func (obj *bgpV6RouteRange) Addresses() BgpV6RouteRangeV6RouteAddressIter { + if len(obj.obj.Addresses) == 0 { + obj.obj.Addresses = []*otg.V6RouteAddress{} + } + if obj.addressesHolder == nil { + obj.addressesHolder = newBgpV6RouteRangeV6RouteAddressIter(&obj.obj.Addresses).setMsg(obj) + } + return obj.addressesHolder +} + +type bgpV6RouteRangeV6RouteAddressIter struct { + obj *bgpV6RouteRange + v6RouteAddressSlice []V6RouteAddress + fieldPtr *[]*otg.V6RouteAddress +} + +func newBgpV6RouteRangeV6RouteAddressIter(ptr *[]*otg.V6RouteAddress) BgpV6RouteRangeV6RouteAddressIter { + return &bgpV6RouteRangeV6RouteAddressIter{fieldPtr: ptr} +} + +type BgpV6RouteRangeV6RouteAddressIter interface { + setMsg(*bgpV6RouteRange) BgpV6RouteRangeV6RouteAddressIter + Items() []V6RouteAddress + Add() V6RouteAddress + Append(items ...V6RouteAddress) BgpV6RouteRangeV6RouteAddressIter + Set(index int, newObj V6RouteAddress) BgpV6RouteRangeV6RouteAddressIter + Clear() BgpV6RouteRangeV6RouteAddressIter + clearHolderSlice() BgpV6RouteRangeV6RouteAddressIter + appendHolderSlice(item V6RouteAddress) BgpV6RouteRangeV6RouteAddressIter +} + +func (obj *bgpV6RouteRangeV6RouteAddressIter) setMsg(msg *bgpV6RouteRange) BgpV6RouteRangeV6RouteAddressIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&v6RouteAddress{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6RouteRangeV6RouteAddressIter) Items() []V6RouteAddress { + return obj.v6RouteAddressSlice +} + +func (obj *bgpV6RouteRangeV6RouteAddressIter) Add() V6RouteAddress { + newObj := &otg.V6RouteAddress{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &v6RouteAddress{obj: newObj} + newLibObj.setDefault() + obj.v6RouteAddressSlice = append(obj.v6RouteAddressSlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6RouteRangeV6RouteAddressIter) Append(items ...V6RouteAddress) BgpV6RouteRangeV6RouteAddressIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.v6RouteAddressSlice = append(obj.v6RouteAddressSlice, item) + } + return obj +} + +func (obj *bgpV6RouteRangeV6RouteAddressIter) Set(index int, newObj V6RouteAddress) BgpV6RouteRangeV6RouteAddressIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.v6RouteAddressSlice[index] = newObj + return obj +} +func (obj *bgpV6RouteRangeV6RouteAddressIter) Clear() BgpV6RouteRangeV6RouteAddressIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.V6RouteAddress{} + obj.v6RouteAddressSlice = []V6RouteAddress{} + } + return obj +} +func (obj *bgpV6RouteRangeV6RouteAddressIter) clearHolderSlice() BgpV6RouteRangeV6RouteAddressIter { + if len(obj.v6RouteAddressSlice) > 0 { + obj.v6RouteAddressSlice = []V6RouteAddress{} + } + return obj +} +func (obj *bgpV6RouteRangeV6RouteAddressIter) appendHolderSlice(item V6RouteAddress) BgpV6RouteRangeV6RouteAddressIter { + obj.v6RouteAddressSlice = append(obj.v6RouteAddressSlice, item) + return obj +} + +type BgpV6RouteRangeNextHopModeEnum string + +// Enum of NextHopMode on BgpV6RouteRange +var BgpV6RouteRangeNextHopMode = struct { + LOCAL_IP BgpV6RouteRangeNextHopModeEnum + MANUAL BgpV6RouteRangeNextHopModeEnum +}{ + LOCAL_IP: BgpV6RouteRangeNextHopModeEnum("local_ip"), + MANUAL: BgpV6RouteRangeNextHopModeEnum("manual"), +} + +func (obj *bgpV6RouteRange) NextHopMode() BgpV6RouteRangeNextHopModeEnum { + return BgpV6RouteRangeNextHopModeEnum(obj.obj.NextHopMode.Enum().String()) +} + +// Specify the NextHop in MP REACH NLRI. The mode for setting the IP address of the NextHop in the MP REACH NLRI can be one of the following: +// Local IP: Automatically fills the Nexthop with the Local IP of the BGP +// peer. +// If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. +// Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. +// NextHopMode returns a string +func (obj *bgpV6RouteRange) HasNextHopMode() bool { + return obj.obj.NextHopMode != nil +} + +func (obj *bgpV6RouteRange) SetNextHopMode(value BgpV6RouteRangeNextHopModeEnum) BgpV6RouteRange { + intValue, ok := otg.BgpV6RouteRange_NextHopMode_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpV6RouteRangeNextHopModeEnum", string(value))) + return obj + } + enumValue := otg.BgpV6RouteRange_NextHopMode_Enum(intValue) + obj.obj.NextHopMode = &enumValue + + return obj +} + +type BgpV6RouteRangeNextHopAddressTypeEnum string + +// Enum of NextHopAddressType on BgpV6RouteRange +var BgpV6RouteRangeNextHopAddressType = struct { + IPV4 BgpV6RouteRangeNextHopAddressTypeEnum + IPV6 BgpV6RouteRangeNextHopAddressTypeEnum +}{ + IPV4: BgpV6RouteRangeNextHopAddressTypeEnum("ipv4"), + IPV6: BgpV6RouteRangeNextHopAddressTypeEnum("ipv6"), +} + +func (obj *bgpV6RouteRange) NextHopAddressType() BgpV6RouteRangeNextHopAddressTypeEnum { + return BgpV6RouteRangeNextHopAddressTypeEnum(obj.obj.NextHopAddressType.Enum().String()) +} + +// If the Nexthop Mode is Manual, it sets the type of the NextHop IP address. +// NextHopAddressType returns a string +func (obj *bgpV6RouteRange) HasNextHopAddressType() bool { + return obj.obj.NextHopAddressType != nil +} + +func (obj *bgpV6RouteRange) SetNextHopAddressType(value BgpV6RouteRangeNextHopAddressTypeEnum) BgpV6RouteRange { + intValue, ok := otg.BgpV6RouteRange_NextHopAddressType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on BgpV6RouteRangeNextHopAddressTypeEnum", string(value))) + return obj + } + enumValue := otg.BgpV6RouteRange_NextHopAddressType_Enum(intValue) + obj.obj.NextHopAddressType = &enumValue + + return obj +} + +// The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. +// NextHopIpv4Address returns a string +func (obj *bgpV6RouteRange) NextHopIpv4Address() string { + + return *obj.obj.NextHopIpv4Address + +} + +// The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. +// NextHopIpv4Address returns a string +func (obj *bgpV6RouteRange) HasNextHopIpv4Address() bool { + return obj.obj.NextHopIpv4Address != nil +} + +// The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. +// SetNextHopIpv4Address sets the string value in the BgpV6RouteRange object +func (obj *bgpV6RouteRange) SetNextHopIpv4Address(value string) BgpV6RouteRange { + + obj.obj.NextHopIpv4Address = &value + return obj +} + +// The IPv6 address of the next hop if the Nexthop Mode is manual and the Nexthop type is IPv6. +// NextHopIpv6Address returns a string +func (obj *bgpV6RouteRange) NextHopIpv6Address() string { + + return *obj.obj.NextHopIpv6Address + +} + +// The IPv6 address of the next hop if the Nexthop Mode is manual and the Nexthop type is IPv6. +// NextHopIpv6Address returns a string +func (obj *bgpV6RouteRange) HasNextHopIpv6Address() bool { + return obj.obj.NextHopIpv6Address != nil +} + +// The IPv6 address of the next hop if the Nexthop Mode is manual and the Nexthop type is IPv6. +// SetNextHopIpv6Address sets the string value in the BgpV6RouteRange object +func (obj *bgpV6RouteRange) SetNextHopIpv6Address(value string) BgpV6RouteRange { + + obj.obj.NextHopIpv6Address = &value + return obj +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpV6RouteRange) Advanced() BgpRouteAdvanced { + if obj.obj.Advanced == nil { + obj.obj.Advanced = NewBgpRouteAdvanced().msg() + } + if obj.advancedHolder == nil { + obj.advancedHolder = &bgpRouteAdvanced{obj: obj.obj.Advanced} + } + return obj.advancedHolder +} + +// description is TBD +// Advanced returns a BgpRouteAdvanced +func (obj *bgpV6RouteRange) HasAdvanced() bool { + return obj.obj.Advanced != nil +} + +// description is TBD +// SetAdvanced sets the BgpRouteAdvanced value in the BgpV6RouteRange object +func (obj *bgpV6RouteRange) SetAdvanced(value BgpRouteAdvanced) BgpV6RouteRange { + + obj.advancedHolder = nil + obj.obj.Advanced = value.msg() + + return obj +} + +// Optional community settings. +// Communities returns a []BgpCommunity +func (obj *bgpV6RouteRange) Communities() BgpV6RouteRangeBgpCommunityIter { + if len(obj.obj.Communities) == 0 { + obj.obj.Communities = []*otg.BgpCommunity{} + } + if obj.communitiesHolder == nil { + obj.communitiesHolder = newBgpV6RouteRangeBgpCommunityIter(&obj.obj.Communities).setMsg(obj) + } + return obj.communitiesHolder +} + +type bgpV6RouteRangeBgpCommunityIter struct { + obj *bgpV6RouteRange + bgpCommunitySlice []BgpCommunity + fieldPtr *[]*otg.BgpCommunity +} + +func newBgpV6RouteRangeBgpCommunityIter(ptr *[]*otg.BgpCommunity) BgpV6RouteRangeBgpCommunityIter { + return &bgpV6RouteRangeBgpCommunityIter{fieldPtr: ptr} +} + +type BgpV6RouteRangeBgpCommunityIter interface { + setMsg(*bgpV6RouteRange) BgpV6RouteRangeBgpCommunityIter + Items() []BgpCommunity + Add() BgpCommunity + Append(items ...BgpCommunity) BgpV6RouteRangeBgpCommunityIter + Set(index int, newObj BgpCommunity) BgpV6RouteRangeBgpCommunityIter + Clear() BgpV6RouteRangeBgpCommunityIter + clearHolderSlice() BgpV6RouteRangeBgpCommunityIter + appendHolderSlice(item BgpCommunity) BgpV6RouteRangeBgpCommunityIter +} + +func (obj *bgpV6RouteRangeBgpCommunityIter) setMsg(msg *bgpV6RouteRange) BgpV6RouteRangeBgpCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6RouteRangeBgpCommunityIter) Items() []BgpCommunity { + return obj.bgpCommunitySlice +} + +func (obj *bgpV6RouteRangeBgpCommunityIter) Add() BgpCommunity { + newObj := &otg.BgpCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6RouteRangeBgpCommunityIter) Append(items ...BgpCommunity) BgpV6RouteRangeBgpCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + } + return obj +} + +func (obj *bgpV6RouteRangeBgpCommunityIter) Set(index int, newObj BgpCommunity) BgpV6RouteRangeBgpCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpCommunitySlice[index] = newObj + return obj +} +func (obj *bgpV6RouteRangeBgpCommunityIter) Clear() BgpV6RouteRangeBgpCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpCommunity{} + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpV6RouteRangeBgpCommunityIter) clearHolderSlice() BgpV6RouteRangeBgpCommunityIter { + if len(obj.bgpCommunitySlice) > 0 { + obj.bgpCommunitySlice = []BgpCommunity{} + } + return obj +} +func (obj *bgpV6RouteRangeBgpCommunityIter) appendHolderSlice(item BgpCommunity) BgpV6RouteRangeBgpCommunityIter { + obj.bgpCommunitySlice = append(obj.bgpCommunitySlice, item) + return obj +} + +// description is TBD +// AsPath returns a BgpAsPath +func (obj *bgpV6RouteRange) AsPath() BgpAsPath { + if obj.obj.AsPath == nil { + obj.obj.AsPath = NewBgpAsPath().msg() + } + if obj.asPathHolder == nil { + obj.asPathHolder = &bgpAsPath{obj: obj.obj.AsPath} + } + return obj.asPathHolder +} + +// description is TBD +// AsPath returns a BgpAsPath +func (obj *bgpV6RouteRange) HasAsPath() bool { + return obj.obj.AsPath != nil +} + +// description is TBD +// SetAsPath sets the BgpAsPath value in the BgpV6RouteRange object +func (obj *bgpV6RouteRange) SetAsPath(value BgpAsPath) BgpV6RouteRange { + + obj.asPathHolder = nil + obj.obj.AsPath = value.msg() + + return obj +} + +// description is TBD +// AddPath returns a BgpAddPath +func (obj *bgpV6RouteRange) AddPath() BgpAddPath { + if obj.obj.AddPath == nil { + obj.obj.AddPath = NewBgpAddPath().msg() + } + if obj.addPathHolder == nil { + obj.addPathHolder = &bgpAddPath{obj: obj.obj.AddPath} + } + return obj.addPathHolder +} + +// description is TBD +// AddPath returns a BgpAddPath +func (obj *bgpV6RouteRange) HasAddPath() bool { + return obj.obj.AddPath != nil +} + +// description is TBD +// SetAddPath sets the BgpAddPath value in the BgpV6RouteRange object +func (obj *bgpV6RouteRange) SetAddPath(value BgpAddPath) BgpV6RouteRange { + + obj.addPathHolder = nil + obj.obj.AddPath = value.msg() + + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *bgpV6RouteRange) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the BgpV6RouteRange object +func (obj *bgpV6RouteRange) SetName(value string) BgpV6RouteRange { + + obj.obj.Name = &value + return obj +} + +// Deprecated: This property is deprecated in favor of property extended_communities +// +// Deprecated: This property is deprecated in favor of property extended_communities +// +// Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. Note evpn type is defined mainly for use with evpn route updates and not for IPv4 and IPv6 route updates. +// ExtCommunities returns a []BgpExtCommunity +func (obj *bgpV6RouteRange) ExtCommunities() BgpV6RouteRangeBgpExtCommunityIter { + if len(obj.obj.ExtCommunities) == 0 { + obj.obj.ExtCommunities = []*otg.BgpExtCommunity{} + } + if obj.extCommunitiesHolder == nil { + obj.extCommunitiesHolder = newBgpV6RouteRangeBgpExtCommunityIter(&obj.obj.ExtCommunities).setMsg(obj) + } + return obj.extCommunitiesHolder +} + +type bgpV6RouteRangeBgpExtCommunityIter struct { + obj *bgpV6RouteRange + bgpExtCommunitySlice []BgpExtCommunity + fieldPtr *[]*otg.BgpExtCommunity +} + +func newBgpV6RouteRangeBgpExtCommunityIter(ptr *[]*otg.BgpExtCommunity) BgpV6RouteRangeBgpExtCommunityIter { + return &bgpV6RouteRangeBgpExtCommunityIter{fieldPtr: ptr} +} + +type BgpV6RouteRangeBgpExtCommunityIter interface { + setMsg(*bgpV6RouteRange) BgpV6RouteRangeBgpExtCommunityIter + Items() []BgpExtCommunity + Add() BgpExtCommunity + Append(items ...BgpExtCommunity) BgpV6RouteRangeBgpExtCommunityIter + Set(index int, newObj BgpExtCommunity) BgpV6RouteRangeBgpExtCommunityIter + Clear() BgpV6RouteRangeBgpExtCommunityIter + clearHolderSlice() BgpV6RouteRangeBgpExtCommunityIter + appendHolderSlice(item BgpExtCommunity) BgpV6RouteRangeBgpExtCommunityIter +} + +func (obj *bgpV6RouteRangeBgpExtCommunityIter) setMsg(msg *bgpV6RouteRange) BgpV6RouteRangeBgpExtCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpExtCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6RouteRangeBgpExtCommunityIter) Items() []BgpExtCommunity { + return obj.bgpExtCommunitySlice +} + +func (obj *bgpV6RouteRangeBgpExtCommunityIter) Add() BgpExtCommunity { + newObj := &otg.BgpExtCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpExtCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6RouteRangeBgpExtCommunityIter) Append(items ...BgpExtCommunity) BgpV6RouteRangeBgpExtCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + } + return obj +} + +func (obj *bgpV6RouteRangeBgpExtCommunityIter) Set(index int, newObj BgpExtCommunity) BgpV6RouteRangeBgpExtCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpExtCommunitySlice[index] = newObj + return obj +} +func (obj *bgpV6RouteRangeBgpExtCommunityIter) Clear() BgpV6RouteRangeBgpExtCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpExtCommunity{} + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpV6RouteRangeBgpExtCommunityIter) clearHolderSlice() BgpV6RouteRangeBgpExtCommunityIter { + if len(obj.bgpExtCommunitySlice) > 0 { + obj.bgpExtCommunitySlice = []BgpExtCommunity{} + } + return obj +} +func (obj *bgpV6RouteRangeBgpExtCommunityIter) appendHolderSlice(item BgpExtCommunity) BgpV6RouteRangeBgpExtCommunityIter { + obj.bgpExtCommunitySlice = append(obj.bgpExtCommunitySlice, item) + return obj +} + +// Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an eight byte value. It is divided into two main parts. The first two bytes of the community encode a type and sub-type fields and the last six bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. +// ExtendedCommunities returns a []BgpExtendedCommunity +func (obj *bgpV6RouteRange) ExtendedCommunities() BgpV6RouteRangeBgpExtendedCommunityIter { + if len(obj.obj.ExtendedCommunities) == 0 { + obj.obj.ExtendedCommunities = []*otg.BgpExtendedCommunity{} + } + if obj.extendedCommunitiesHolder == nil { + obj.extendedCommunitiesHolder = newBgpV6RouteRangeBgpExtendedCommunityIter(&obj.obj.ExtendedCommunities).setMsg(obj) + } + return obj.extendedCommunitiesHolder +} + +type bgpV6RouteRangeBgpExtendedCommunityIter struct { + obj *bgpV6RouteRange + bgpExtendedCommunitySlice []BgpExtendedCommunity + fieldPtr *[]*otg.BgpExtendedCommunity +} + +func newBgpV6RouteRangeBgpExtendedCommunityIter(ptr *[]*otg.BgpExtendedCommunity) BgpV6RouteRangeBgpExtendedCommunityIter { + return &bgpV6RouteRangeBgpExtendedCommunityIter{fieldPtr: ptr} +} + +type BgpV6RouteRangeBgpExtendedCommunityIter interface { + setMsg(*bgpV6RouteRange) BgpV6RouteRangeBgpExtendedCommunityIter + Items() []BgpExtendedCommunity + Add() BgpExtendedCommunity + Append(items ...BgpExtendedCommunity) BgpV6RouteRangeBgpExtendedCommunityIter + Set(index int, newObj BgpExtendedCommunity) BgpV6RouteRangeBgpExtendedCommunityIter + Clear() BgpV6RouteRangeBgpExtendedCommunityIter + clearHolderSlice() BgpV6RouteRangeBgpExtendedCommunityIter + appendHolderSlice(item BgpExtendedCommunity) BgpV6RouteRangeBgpExtendedCommunityIter +} + +func (obj *bgpV6RouteRangeBgpExtendedCommunityIter) setMsg(msg *bgpV6RouteRange) BgpV6RouteRangeBgpExtendedCommunityIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpExtendedCommunity{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *bgpV6RouteRangeBgpExtendedCommunityIter) Items() []BgpExtendedCommunity { + return obj.bgpExtendedCommunitySlice +} + +func (obj *bgpV6RouteRangeBgpExtendedCommunityIter) Add() BgpExtendedCommunity { + newObj := &otg.BgpExtendedCommunity{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpExtendedCommunity{obj: newObj} + newLibObj.setDefault() + obj.bgpExtendedCommunitySlice = append(obj.bgpExtendedCommunitySlice, newLibObj) + return newLibObj +} + +func (obj *bgpV6RouteRangeBgpExtendedCommunityIter) Append(items ...BgpExtendedCommunity) BgpV6RouteRangeBgpExtendedCommunityIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpExtendedCommunitySlice = append(obj.bgpExtendedCommunitySlice, item) + } + return obj +} + +func (obj *bgpV6RouteRangeBgpExtendedCommunityIter) Set(index int, newObj BgpExtendedCommunity) BgpV6RouteRangeBgpExtendedCommunityIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpExtendedCommunitySlice[index] = newObj + return obj +} +func (obj *bgpV6RouteRangeBgpExtendedCommunityIter) Clear() BgpV6RouteRangeBgpExtendedCommunityIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpExtendedCommunity{} + obj.bgpExtendedCommunitySlice = []BgpExtendedCommunity{} + } + return obj +} +func (obj *bgpV6RouteRangeBgpExtendedCommunityIter) clearHolderSlice() BgpV6RouteRangeBgpExtendedCommunityIter { + if len(obj.bgpExtendedCommunitySlice) > 0 { + obj.bgpExtendedCommunitySlice = []BgpExtendedCommunity{} + } + return obj +} +func (obj *bgpV6RouteRangeBgpExtendedCommunityIter) appendHolderSlice(item BgpExtendedCommunity) BgpV6RouteRangeBgpExtendedCommunityIter { + obj.bgpExtendedCommunitySlice = append(obj.bgpExtendedCommunitySlice, item) + return obj +} + +func (obj *bgpV6RouteRange) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Addresses) != 0 { + + if set_default { + obj.Addresses().clearHolderSlice() + for _, item := range obj.obj.Addresses { + obj.Addresses().appendHolderSlice(&v6RouteAddress{obj: item}) + } + } + for _, item := range obj.Addresses().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.NextHopIpv4Address != nil { + + err := obj.validateIpv4(obj.NextHopIpv4Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpV6RouteRange.NextHopIpv4Address")) + } + + } + + if obj.obj.NextHopIpv6Address != nil { + + err := obj.validateIpv6(obj.NextHopIpv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on BgpV6RouteRange.NextHopIpv6Address")) + } + + } + + if obj.obj.Advanced != nil { + + obj.Advanced().validateObj(vObj, set_default) + } + + if len(obj.obj.Communities) != 0 { + + if set_default { + obj.Communities().clearHolderSlice() + for _, item := range obj.obj.Communities { + obj.Communities().appendHolderSlice(&bgpCommunity{obj: item}) + } + } + for _, item := range obj.Communities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.AsPath != nil { + + obj.AsPath().validateObj(vObj, set_default) + } + + if obj.obj.AddPath != nil { + + obj.AddPath().validateObj(vObj, set_default) + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface BgpV6RouteRange") + } + + if len(obj.obj.ExtCommunities) != 0 { + obj.addWarnings("ExtCommunities property in schema BgpV6RouteRange is deprecated, This property is deprecated in favor of property extended_communities") + + if set_default { + obj.ExtCommunities().clearHolderSlice() + for _, item := range obj.obj.ExtCommunities { + obj.ExtCommunities().appendHolderSlice(&bgpExtCommunity{obj: item}) + } + } + for _, item := range obj.ExtCommunities().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.ExtendedCommunities) != 0 { + + if set_default { + obj.ExtendedCommunities().clearHolderSlice() + for _, item := range obj.obj.ExtendedCommunities { + obj.ExtendedCommunities().appendHolderSlice(&bgpExtendedCommunity{obj: item}) + } + } + for _, item := range obj.ExtendedCommunities().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *bgpV6RouteRange) setDefault() { + if obj.obj.NextHopMode == nil { + obj.SetNextHopMode(BgpV6RouteRangeNextHopMode.LOCAL_IP) + + } + if obj.obj.NextHopAddressType == nil { + obj.SetNextHopAddressType(BgpV6RouteRangeNextHopAddressType.IPV6) + + } + if obj.obj.NextHopIpv4Address == nil { + obj.SetNextHopIpv4Address("0.0.0.0") + } + if obj.obj.NextHopIpv6Address == nil { + obj.SetNextHopIpv6Address("::0") + } + +} diff --git a/gosnappi/bgp_v6_segment_routing.go b/gosnappi/bgp_v6_segment_routing.go new file mode 100644 index 00000000..3a6e32c9 --- /dev/null +++ b/gosnappi/bgp_v6_segment_routing.go @@ -0,0 +1,536 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** BgpV6SegmentRouting ***** +type bgpV6SegmentRouting struct { + validation + obj *otg.BgpV6SegmentRouting + marshaller marshalBgpV6SegmentRouting + unMarshaller unMarshalBgpV6SegmentRouting +} + +func NewBgpV6SegmentRouting() BgpV6SegmentRouting { + obj := bgpV6SegmentRouting{obj: &otg.BgpV6SegmentRouting{}} + obj.setDefault() + return &obj +} + +func (obj *bgpV6SegmentRouting) msg() *otg.BgpV6SegmentRouting { + return obj.obj +} + +func (obj *bgpV6SegmentRouting) setMsg(msg *otg.BgpV6SegmentRouting) BgpV6SegmentRouting { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpV6SegmentRouting struct { + obj *bgpV6SegmentRouting +} + +type marshalBgpV6SegmentRouting interface { + // ToProto marshals BgpV6SegmentRouting to protobuf object *otg.BgpV6SegmentRouting + ToProto() (*otg.BgpV6SegmentRouting, error) + // ToPbText marshals BgpV6SegmentRouting to protobuf text + ToPbText() (string, error) + // ToYaml marshals BgpV6SegmentRouting to YAML text + ToYaml() (string, error) + // ToJson marshals BgpV6SegmentRouting to JSON text + ToJson() (string, error) +} + +type unMarshalbgpV6SegmentRouting struct { + obj *bgpV6SegmentRouting +} + +type unMarshalBgpV6SegmentRouting interface { + // FromProto unmarshals BgpV6SegmentRouting from protobuf object *otg.BgpV6SegmentRouting + FromProto(msg *otg.BgpV6SegmentRouting) (BgpV6SegmentRouting, error) + // FromPbText unmarshals BgpV6SegmentRouting from protobuf text + FromPbText(value string) error + // FromYaml unmarshals BgpV6SegmentRouting from YAML text + FromYaml(value string) error + // FromJson unmarshals BgpV6SegmentRouting from JSON text + FromJson(value string) error +} + +func (obj *bgpV6SegmentRouting) Marshal() marshalBgpV6SegmentRouting { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpV6SegmentRouting{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpV6SegmentRouting) Unmarshal() unMarshalBgpV6SegmentRouting { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpV6SegmentRouting{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpV6SegmentRouting) ToProto() (*otg.BgpV6SegmentRouting, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpV6SegmentRouting) FromProto(msg *otg.BgpV6SegmentRouting) (BgpV6SegmentRouting, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpV6SegmentRouting) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpV6SegmentRouting) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpV6SegmentRouting) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6SegmentRouting) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpV6SegmentRouting) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpV6SegmentRouting) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpV6SegmentRouting) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpV6SegmentRouting) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpV6SegmentRouting) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpV6SegmentRouting) Clone() (BgpV6SegmentRouting, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpV6SegmentRouting() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// BgpV6SegmentRouting is configuration for BGPv6 segment routing settings. +type BgpV6SegmentRouting interface { + Validation + // msg marshals BgpV6SegmentRouting to protobuf object *otg.BgpV6SegmentRouting + // and doesn't set defaults + msg() *otg.BgpV6SegmentRouting + // setMsg unmarshals BgpV6SegmentRouting from protobuf object *otg.BgpV6SegmentRouting + // and doesn't set defaults + setMsg(*otg.BgpV6SegmentRouting) BgpV6SegmentRouting + // provides marshal interface + Marshal() marshalBgpV6SegmentRouting + // provides unmarshal interface + Unmarshal() unMarshalBgpV6SegmentRouting + // validate validates BgpV6SegmentRouting + validate() error + // A stringer function + String() string + // Clones the object + Clone() (BgpV6SegmentRouting, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // IngressSupportsVpn returns bool, set in BgpV6SegmentRouting. + IngressSupportsVpn() bool + // SetIngressSupportsVpn assigns bool provided by user to BgpV6SegmentRouting + SetIngressSupportsVpn(value bool) BgpV6SegmentRouting + // HasIngressSupportsVpn checks if IngressSupportsVpn has been set in BgpV6SegmentRouting + HasIngressSupportsVpn() bool + // ReducedEncapsulation returns bool, set in BgpV6SegmentRouting. + ReducedEncapsulation() bool + // SetReducedEncapsulation assigns bool provided by user to BgpV6SegmentRouting + SetReducedEncapsulation(value bool) BgpV6SegmentRouting + // HasReducedEncapsulation checks if ReducedEncapsulation has been set in BgpV6SegmentRouting + HasReducedEncapsulation() bool + // CopyTimeToLive returns bool, set in BgpV6SegmentRouting. + CopyTimeToLive() bool + // SetCopyTimeToLive assigns bool provided by user to BgpV6SegmentRouting + SetCopyTimeToLive(value bool) BgpV6SegmentRouting + // HasCopyTimeToLive checks if CopyTimeToLive has been set in BgpV6SegmentRouting + HasCopyTimeToLive() bool + // TimeToLive returns uint32, set in BgpV6SegmentRouting. + TimeToLive() uint32 + // SetTimeToLive assigns uint32 provided by user to BgpV6SegmentRouting + SetTimeToLive(value uint32) BgpV6SegmentRouting + // HasTimeToLive checks if TimeToLive has been set in BgpV6SegmentRouting + HasTimeToLive() bool + // MaxSidsPerSrh returns uint32, set in BgpV6SegmentRouting. + MaxSidsPerSrh() uint32 + // SetMaxSidsPerSrh assigns uint32 provided by user to BgpV6SegmentRouting + SetMaxSidsPerSrh(value uint32) BgpV6SegmentRouting + // HasMaxSidsPerSrh checks if MaxSidsPerSrh has been set in BgpV6SegmentRouting + HasMaxSidsPerSrh() bool + // AutoGenerateSegmentLeftValue returns bool, set in BgpV6SegmentRouting. + AutoGenerateSegmentLeftValue() bool + // SetAutoGenerateSegmentLeftValue assigns bool provided by user to BgpV6SegmentRouting + SetAutoGenerateSegmentLeftValue(value bool) BgpV6SegmentRouting + // HasAutoGenerateSegmentLeftValue checks if AutoGenerateSegmentLeftValue has been set in BgpV6SegmentRouting + HasAutoGenerateSegmentLeftValue() bool + // SegmentLeftValue returns uint32, set in BgpV6SegmentRouting. + SegmentLeftValue() uint32 + // SetSegmentLeftValue assigns uint32 provided by user to BgpV6SegmentRouting + SetSegmentLeftValue(value uint32) BgpV6SegmentRouting + // HasSegmentLeftValue checks if SegmentLeftValue has been set in BgpV6SegmentRouting + HasSegmentLeftValue() bool + // AdvertiseSrTePolicy returns bool, set in BgpV6SegmentRouting. + AdvertiseSrTePolicy() bool + // SetAdvertiseSrTePolicy assigns bool provided by user to BgpV6SegmentRouting + SetAdvertiseSrTePolicy(value bool) BgpV6SegmentRouting + // HasAdvertiseSrTePolicy checks if AdvertiseSrTePolicy has been set in BgpV6SegmentRouting + HasAdvertiseSrTePolicy() bool +} + +// TBD +// IngressSupportsVpn returns a bool +func (obj *bgpV6SegmentRouting) IngressSupportsVpn() bool { + + return *obj.obj.IngressSupportsVpn + +} + +// TBD +// IngressSupportsVpn returns a bool +func (obj *bgpV6SegmentRouting) HasIngressSupportsVpn() bool { + return obj.obj.IngressSupportsVpn != nil +} + +// TBD +// SetIngressSupportsVpn sets the bool value in the BgpV6SegmentRouting object +func (obj *bgpV6SegmentRouting) SetIngressSupportsVpn(value bool) BgpV6SegmentRouting { + + obj.obj.IngressSupportsVpn = &value + return obj +} + +// TBD +// ReducedEncapsulation returns a bool +func (obj *bgpV6SegmentRouting) ReducedEncapsulation() bool { + + return *obj.obj.ReducedEncapsulation + +} + +// TBD +// ReducedEncapsulation returns a bool +func (obj *bgpV6SegmentRouting) HasReducedEncapsulation() bool { + return obj.obj.ReducedEncapsulation != nil +} + +// TBD +// SetReducedEncapsulation sets the bool value in the BgpV6SegmentRouting object +func (obj *bgpV6SegmentRouting) SetReducedEncapsulation(value bool) BgpV6SegmentRouting { + + obj.obj.ReducedEncapsulation = &value + return obj +} + +// TBD +// CopyTimeToLive returns a bool +func (obj *bgpV6SegmentRouting) CopyTimeToLive() bool { + + return *obj.obj.CopyTimeToLive + +} + +// TBD +// CopyTimeToLive returns a bool +func (obj *bgpV6SegmentRouting) HasCopyTimeToLive() bool { + return obj.obj.CopyTimeToLive != nil +} + +// TBD +// SetCopyTimeToLive sets the bool value in the BgpV6SegmentRouting object +func (obj *bgpV6SegmentRouting) SetCopyTimeToLive(value bool) BgpV6SegmentRouting { + + obj.obj.CopyTimeToLive = &value + return obj +} + +// TBD +// TimeToLive returns a uint32 +func (obj *bgpV6SegmentRouting) TimeToLive() uint32 { + + return *obj.obj.TimeToLive + +} + +// TBD +// TimeToLive returns a uint32 +func (obj *bgpV6SegmentRouting) HasTimeToLive() bool { + return obj.obj.TimeToLive != nil +} + +// TBD +// SetTimeToLive sets the uint32 value in the BgpV6SegmentRouting object +func (obj *bgpV6SegmentRouting) SetTimeToLive(value uint32) BgpV6SegmentRouting { + + obj.obj.TimeToLive = &value + return obj +} + +// TBD +// MaxSidsPerSrh returns a uint32 +func (obj *bgpV6SegmentRouting) MaxSidsPerSrh() uint32 { + + return *obj.obj.MaxSidsPerSrh + +} + +// TBD +// MaxSidsPerSrh returns a uint32 +func (obj *bgpV6SegmentRouting) HasMaxSidsPerSrh() bool { + return obj.obj.MaxSidsPerSrh != nil +} + +// TBD +// SetMaxSidsPerSrh sets the uint32 value in the BgpV6SegmentRouting object +func (obj *bgpV6SegmentRouting) SetMaxSidsPerSrh(value uint32) BgpV6SegmentRouting { + + obj.obj.MaxSidsPerSrh = &value + return obj +} + +// TBD +// AutoGenerateSegmentLeftValue returns a bool +func (obj *bgpV6SegmentRouting) AutoGenerateSegmentLeftValue() bool { + + return *obj.obj.AutoGenerateSegmentLeftValue + +} + +// TBD +// AutoGenerateSegmentLeftValue returns a bool +func (obj *bgpV6SegmentRouting) HasAutoGenerateSegmentLeftValue() bool { + return obj.obj.AutoGenerateSegmentLeftValue != nil +} + +// TBD +// SetAutoGenerateSegmentLeftValue sets the bool value in the BgpV6SegmentRouting object +func (obj *bgpV6SegmentRouting) SetAutoGenerateSegmentLeftValue(value bool) BgpV6SegmentRouting { + + obj.obj.AutoGenerateSegmentLeftValue = &value + return obj +} + +// TBD +// SegmentLeftValue returns a uint32 +func (obj *bgpV6SegmentRouting) SegmentLeftValue() uint32 { + + return *obj.obj.SegmentLeftValue + +} + +// TBD +// SegmentLeftValue returns a uint32 +func (obj *bgpV6SegmentRouting) HasSegmentLeftValue() bool { + return obj.obj.SegmentLeftValue != nil +} + +// TBD +// SetSegmentLeftValue sets the uint32 value in the BgpV6SegmentRouting object +func (obj *bgpV6SegmentRouting) SetSegmentLeftValue(value uint32) BgpV6SegmentRouting { + + obj.obj.SegmentLeftValue = &value + return obj +} + +// TBD +// AdvertiseSrTePolicy returns a bool +func (obj *bgpV6SegmentRouting) AdvertiseSrTePolicy() bool { + + return *obj.obj.AdvertiseSrTePolicy + +} + +// TBD +// AdvertiseSrTePolicy returns a bool +func (obj *bgpV6SegmentRouting) HasAdvertiseSrTePolicy() bool { + return obj.obj.AdvertiseSrTePolicy != nil +} + +// TBD +// SetAdvertiseSrTePolicy sets the bool value in the BgpV6SegmentRouting object +func (obj *bgpV6SegmentRouting) SetAdvertiseSrTePolicy(value bool) BgpV6SegmentRouting { + + obj.obj.AdvertiseSrTePolicy = &value + return obj +} + +func (obj *bgpV6SegmentRouting) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.MaxSidsPerSrh != nil { + + if *obj.obj.MaxSidsPerSrh > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= BgpV6SegmentRouting.MaxSidsPerSrh <= 255 but Got %d", *obj.obj.MaxSidsPerSrh)) + } + + } + +} + +func (obj *bgpV6SegmentRouting) setDefault() { + if obj.obj.IngressSupportsVpn == nil { + obj.SetIngressSupportsVpn(false) + } + if obj.obj.ReducedEncapsulation == nil { + obj.SetReducedEncapsulation(false) + } + if obj.obj.CopyTimeToLive == nil { + obj.SetCopyTimeToLive(false) + } + if obj.obj.TimeToLive == nil { + obj.SetTimeToLive(0) + } + if obj.obj.MaxSidsPerSrh == nil { + obj.SetMaxSidsPerSrh(0) + } + if obj.obj.AutoGenerateSegmentLeftValue == nil { + obj.SetAutoGenerateSegmentLeftValue(false) + } + if obj.obj.SegmentLeftValue == nil { + obj.SetSegmentLeftValue(0) + } + if obj.obj.AdvertiseSrTePolicy == nil { + obj.SetAdvertiseSrTePolicy(false) + } + +} diff --git a/gosnappi/bgpv4_metric.go b/gosnappi/bgpv4_metric.go new file mode 100644 index 00000000..5ec4cf70 --- /dev/null +++ b/gosnappi/bgpv4_metric.go @@ -0,0 +1,786 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Bgpv4Metric ***** +type bgpv4Metric struct { + validation + obj *otg.Bgpv4Metric + marshaller marshalBgpv4Metric + unMarshaller unMarshalBgpv4Metric +} + +func NewBgpv4Metric() Bgpv4Metric { + obj := bgpv4Metric{obj: &otg.Bgpv4Metric{}} + obj.setDefault() + return &obj +} + +func (obj *bgpv4Metric) msg() *otg.Bgpv4Metric { + return obj.obj +} + +func (obj *bgpv4Metric) setMsg(msg *otg.Bgpv4Metric) Bgpv4Metric { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpv4Metric struct { + obj *bgpv4Metric +} + +type marshalBgpv4Metric interface { + // ToProto marshals Bgpv4Metric to protobuf object *otg.Bgpv4Metric + ToProto() (*otg.Bgpv4Metric, error) + // ToPbText marshals Bgpv4Metric to protobuf text + ToPbText() (string, error) + // ToYaml marshals Bgpv4Metric to YAML text + ToYaml() (string, error) + // ToJson marshals Bgpv4Metric to JSON text + ToJson() (string, error) +} + +type unMarshalbgpv4Metric struct { + obj *bgpv4Metric +} + +type unMarshalBgpv4Metric interface { + // FromProto unmarshals Bgpv4Metric from protobuf object *otg.Bgpv4Metric + FromProto(msg *otg.Bgpv4Metric) (Bgpv4Metric, error) + // FromPbText unmarshals Bgpv4Metric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Bgpv4Metric from YAML text + FromYaml(value string) error + // FromJson unmarshals Bgpv4Metric from JSON text + FromJson(value string) error +} + +func (obj *bgpv4Metric) Marshal() marshalBgpv4Metric { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpv4Metric{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpv4Metric) Unmarshal() unMarshalBgpv4Metric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpv4Metric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpv4Metric) ToProto() (*otg.Bgpv4Metric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpv4Metric) FromProto(msg *otg.Bgpv4Metric) (Bgpv4Metric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpv4Metric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpv4Metric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpv4Metric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpv4Metric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpv4Metric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpv4Metric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpv4Metric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpv4Metric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpv4Metric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpv4Metric) Clone() (Bgpv4Metric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpv4Metric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Bgpv4Metric is bGPv4 per peer statistics information. +type Bgpv4Metric interface { + Validation + // msg marshals Bgpv4Metric to protobuf object *otg.Bgpv4Metric + // and doesn't set defaults + msg() *otg.Bgpv4Metric + // setMsg unmarshals Bgpv4Metric from protobuf object *otg.Bgpv4Metric + // and doesn't set defaults + setMsg(*otg.Bgpv4Metric) Bgpv4Metric + // provides marshal interface + Marshal() marshalBgpv4Metric + // provides unmarshal interface + Unmarshal() unMarshalBgpv4Metric + // validate validates Bgpv4Metric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Bgpv4Metric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in Bgpv4Metric. + Name() string + // SetName assigns string provided by user to Bgpv4Metric + SetName(value string) Bgpv4Metric + // HasName checks if Name has been set in Bgpv4Metric + HasName() bool + // SessionState returns Bgpv4MetricSessionStateEnum, set in Bgpv4Metric + SessionState() Bgpv4MetricSessionStateEnum + // SetSessionState assigns Bgpv4MetricSessionStateEnum provided by user to Bgpv4Metric + SetSessionState(value Bgpv4MetricSessionStateEnum) Bgpv4Metric + // HasSessionState checks if SessionState has been set in Bgpv4Metric + HasSessionState() bool + // SessionFlapCount returns uint64, set in Bgpv4Metric. + SessionFlapCount() uint64 + // SetSessionFlapCount assigns uint64 provided by user to Bgpv4Metric + SetSessionFlapCount(value uint64) Bgpv4Metric + // HasSessionFlapCount checks if SessionFlapCount has been set in Bgpv4Metric + HasSessionFlapCount() bool + // RoutesAdvertised returns uint64, set in Bgpv4Metric. + RoutesAdvertised() uint64 + // SetRoutesAdvertised assigns uint64 provided by user to Bgpv4Metric + SetRoutesAdvertised(value uint64) Bgpv4Metric + // HasRoutesAdvertised checks if RoutesAdvertised has been set in Bgpv4Metric + HasRoutesAdvertised() bool + // RoutesReceived returns uint64, set in Bgpv4Metric. + RoutesReceived() uint64 + // SetRoutesReceived assigns uint64 provided by user to Bgpv4Metric + SetRoutesReceived(value uint64) Bgpv4Metric + // HasRoutesReceived checks if RoutesReceived has been set in Bgpv4Metric + HasRoutesReceived() bool + // RouteWithdrawsSent returns uint64, set in Bgpv4Metric. + RouteWithdrawsSent() uint64 + // SetRouteWithdrawsSent assigns uint64 provided by user to Bgpv4Metric + SetRouteWithdrawsSent(value uint64) Bgpv4Metric + // HasRouteWithdrawsSent checks if RouteWithdrawsSent has been set in Bgpv4Metric + HasRouteWithdrawsSent() bool + // RouteWithdrawsReceived returns uint64, set in Bgpv4Metric. + RouteWithdrawsReceived() uint64 + // SetRouteWithdrawsReceived assigns uint64 provided by user to Bgpv4Metric + SetRouteWithdrawsReceived(value uint64) Bgpv4Metric + // HasRouteWithdrawsReceived checks if RouteWithdrawsReceived has been set in Bgpv4Metric + HasRouteWithdrawsReceived() bool + // UpdatesSent returns uint64, set in Bgpv4Metric. + UpdatesSent() uint64 + // SetUpdatesSent assigns uint64 provided by user to Bgpv4Metric + SetUpdatesSent(value uint64) Bgpv4Metric + // HasUpdatesSent checks if UpdatesSent has been set in Bgpv4Metric + HasUpdatesSent() bool + // UpdatesReceived returns uint64, set in Bgpv4Metric. + UpdatesReceived() uint64 + // SetUpdatesReceived assigns uint64 provided by user to Bgpv4Metric + SetUpdatesReceived(value uint64) Bgpv4Metric + // HasUpdatesReceived checks if UpdatesReceived has been set in Bgpv4Metric + HasUpdatesReceived() bool + // OpensSent returns uint64, set in Bgpv4Metric. + OpensSent() uint64 + // SetOpensSent assigns uint64 provided by user to Bgpv4Metric + SetOpensSent(value uint64) Bgpv4Metric + // HasOpensSent checks if OpensSent has been set in Bgpv4Metric + HasOpensSent() bool + // OpensReceived returns uint64, set in Bgpv4Metric. + OpensReceived() uint64 + // SetOpensReceived assigns uint64 provided by user to Bgpv4Metric + SetOpensReceived(value uint64) Bgpv4Metric + // HasOpensReceived checks if OpensReceived has been set in Bgpv4Metric + HasOpensReceived() bool + // KeepalivesSent returns uint64, set in Bgpv4Metric. + KeepalivesSent() uint64 + // SetKeepalivesSent assigns uint64 provided by user to Bgpv4Metric + SetKeepalivesSent(value uint64) Bgpv4Metric + // HasKeepalivesSent checks if KeepalivesSent has been set in Bgpv4Metric + HasKeepalivesSent() bool + // KeepalivesReceived returns uint64, set in Bgpv4Metric. + KeepalivesReceived() uint64 + // SetKeepalivesReceived assigns uint64 provided by user to Bgpv4Metric + SetKeepalivesReceived(value uint64) Bgpv4Metric + // HasKeepalivesReceived checks if KeepalivesReceived has been set in Bgpv4Metric + HasKeepalivesReceived() bool + // NotificationsSent returns uint64, set in Bgpv4Metric. + NotificationsSent() uint64 + // SetNotificationsSent assigns uint64 provided by user to Bgpv4Metric + SetNotificationsSent(value uint64) Bgpv4Metric + // HasNotificationsSent checks if NotificationsSent has been set in Bgpv4Metric + HasNotificationsSent() bool + // NotificationsReceived returns uint64, set in Bgpv4Metric. + NotificationsReceived() uint64 + // SetNotificationsReceived assigns uint64 provided by user to Bgpv4Metric + SetNotificationsReceived(value uint64) Bgpv4Metric + // HasNotificationsReceived checks if NotificationsReceived has been set in Bgpv4Metric + HasNotificationsReceived() bool + // FsmState returns Bgpv4MetricFsmStateEnum, set in Bgpv4Metric + FsmState() Bgpv4MetricFsmStateEnum + // SetFsmState assigns Bgpv4MetricFsmStateEnum provided by user to Bgpv4Metric + SetFsmState(value Bgpv4MetricFsmStateEnum) Bgpv4Metric + // HasFsmState checks if FsmState has been set in Bgpv4Metric + HasFsmState() bool + // EndOfRibReceived returns uint64, set in Bgpv4Metric. + EndOfRibReceived() uint64 + // SetEndOfRibReceived assigns uint64 provided by user to Bgpv4Metric + SetEndOfRibReceived(value uint64) Bgpv4Metric + // HasEndOfRibReceived checks if EndOfRibReceived has been set in Bgpv4Metric + HasEndOfRibReceived() bool +} + +// The name of a configured BGPv4 peer. +// Name returns a string +func (obj *bgpv4Metric) Name() string { + + return *obj.obj.Name + +} + +// The name of a configured BGPv4 peer. +// Name returns a string +func (obj *bgpv4Metric) HasName() bool { + return obj.obj.Name != nil +} + +// The name of a configured BGPv4 peer. +// SetName sets the string value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetName(value string) Bgpv4Metric { + + obj.obj.Name = &value + return obj +} + +type Bgpv4MetricSessionStateEnum string + +// Enum of SessionState on Bgpv4Metric +var Bgpv4MetricSessionState = struct { + UP Bgpv4MetricSessionStateEnum + DOWN Bgpv4MetricSessionStateEnum +}{ + UP: Bgpv4MetricSessionStateEnum("up"), + DOWN: Bgpv4MetricSessionStateEnum("down"), +} + +func (obj *bgpv4Metric) SessionState() Bgpv4MetricSessionStateEnum { + return Bgpv4MetricSessionStateEnum(obj.obj.SessionState.Enum().String()) +} + +// Session state as up or down. Up refers to an Established state and Down refers to any other state. +// SessionState returns a string +func (obj *bgpv4Metric) HasSessionState() bool { + return obj.obj.SessionState != nil +} + +func (obj *bgpv4Metric) SetSessionState(value Bgpv4MetricSessionStateEnum) Bgpv4Metric { + intValue, ok := otg.Bgpv4Metric_SessionState_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Bgpv4MetricSessionStateEnum", string(value))) + return obj + } + enumValue := otg.Bgpv4Metric_SessionState_Enum(intValue) + obj.obj.SessionState = &enumValue + + return obj +} + +// Number of times the session went from Up to Down state. +// SessionFlapCount returns a uint64 +func (obj *bgpv4Metric) SessionFlapCount() uint64 { + + return *obj.obj.SessionFlapCount + +} + +// Number of times the session went from Up to Down state. +// SessionFlapCount returns a uint64 +func (obj *bgpv4Metric) HasSessionFlapCount() bool { + return obj.obj.SessionFlapCount != nil +} + +// Number of times the session went from Up to Down state. +// SetSessionFlapCount sets the uint64 value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetSessionFlapCount(value uint64) Bgpv4Metric { + + obj.obj.SessionFlapCount = &value + return obj +} + +// Number of routes advertised. +// RoutesAdvertised returns a uint64 +func (obj *bgpv4Metric) RoutesAdvertised() uint64 { + + return *obj.obj.RoutesAdvertised + +} + +// Number of routes advertised. +// RoutesAdvertised returns a uint64 +func (obj *bgpv4Metric) HasRoutesAdvertised() bool { + return obj.obj.RoutesAdvertised != nil +} + +// Number of routes advertised. +// SetRoutesAdvertised sets the uint64 value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetRoutesAdvertised(value uint64) Bgpv4Metric { + + obj.obj.RoutesAdvertised = &value + return obj +} + +// Number of routes received. +// RoutesReceived returns a uint64 +func (obj *bgpv4Metric) RoutesReceived() uint64 { + + return *obj.obj.RoutesReceived + +} + +// Number of routes received. +// RoutesReceived returns a uint64 +func (obj *bgpv4Metric) HasRoutesReceived() bool { + return obj.obj.RoutesReceived != nil +} + +// Number of routes received. +// SetRoutesReceived sets the uint64 value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetRoutesReceived(value uint64) Bgpv4Metric { + + obj.obj.RoutesReceived = &value + return obj +} + +// Number of route withdraws sent. +// RouteWithdrawsSent returns a uint64 +func (obj *bgpv4Metric) RouteWithdrawsSent() uint64 { + + return *obj.obj.RouteWithdrawsSent + +} + +// Number of route withdraws sent. +// RouteWithdrawsSent returns a uint64 +func (obj *bgpv4Metric) HasRouteWithdrawsSent() bool { + return obj.obj.RouteWithdrawsSent != nil +} + +// Number of route withdraws sent. +// SetRouteWithdrawsSent sets the uint64 value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetRouteWithdrawsSent(value uint64) Bgpv4Metric { + + obj.obj.RouteWithdrawsSent = &value + return obj +} + +// Number of route withdraws received. +// RouteWithdrawsReceived returns a uint64 +func (obj *bgpv4Metric) RouteWithdrawsReceived() uint64 { + + return *obj.obj.RouteWithdrawsReceived + +} + +// Number of route withdraws received. +// RouteWithdrawsReceived returns a uint64 +func (obj *bgpv4Metric) HasRouteWithdrawsReceived() bool { + return obj.obj.RouteWithdrawsReceived != nil +} + +// Number of route withdraws received. +// SetRouteWithdrawsReceived sets the uint64 value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetRouteWithdrawsReceived(value uint64) Bgpv4Metric { + + obj.obj.RouteWithdrawsReceived = &value + return obj +} + +// Number of Update messages sent. +// UpdatesSent returns a uint64 +func (obj *bgpv4Metric) UpdatesSent() uint64 { + + return *obj.obj.UpdatesSent + +} + +// Number of Update messages sent. +// UpdatesSent returns a uint64 +func (obj *bgpv4Metric) HasUpdatesSent() bool { + return obj.obj.UpdatesSent != nil +} + +// Number of Update messages sent. +// SetUpdatesSent sets the uint64 value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetUpdatesSent(value uint64) Bgpv4Metric { + + obj.obj.UpdatesSent = &value + return obj +} + +// Number of Update messages received. +// UpdatesReceived returns a uint64 +func (obj *bgpv4Metric) UpdatesReceived() uint64 { + + return *obj.obj.UpdatesReceived + +} + +// Number of Update messages received. +// UpdatesReceived returns a uint64 +func (obj *bgpv4Metric) HasUpdatesReceived() bool { + return obj.obj.UpdatesReceived != nil +} + +// Number of Update messages received. +// SetUpdatesReceived sets the uint64 value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetUpdatesReceived(value uint64) Bgpv4Metric { + + obj.obj.UpdatesReceived = &value + return obj +} + +// Number of Open messages sent. +// OpensSent returns a uint64 +func (obj *bgpv4Metric) OpensSent() uint64 { + + return *obj.obj.OpensSent + +} + +// Number of Open messages sent. +// OpensSent returns a uint64 +func (obj *bgpv4Metric) HasOpensSent() bool { + return obj.obj.OpensSent != nil +} + +// Number of Open messages sent. +// SetOpensSent sets the uint64 value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetOpensSent(value uint64) Bgpv4Metric { + + obj.obj.OpensSent = &value + return obj +} + +// Number of Open messages received. +// OpensReceived returns a uint64 +func (obj *bgpv4Metric) OpensReceived() uint64 { + + return *obj.obj.OpensReceived + +} + +// Number of Open messages received. +// OpensReceived returns a uint64 +func (obj *bgpv4Metric) HasOpensReceived() bool { + return obj.obj.OpensReceived != nil +} + +// Number of Open messages received. +// SetOpensReceived sets the uint64 value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetOpensReceived(value uint64) Bgpv4Metric { + + obj.obj.OpensReceived = &value + return obj +} + +// Number of Keepalive messages sent. +// KeepalivesSent returns a uint64 +func (obj *bgpv4Metric) KeepalivesSent() uint64 { + + return *obj.obj.KeepalivesSent + +} + +// Number of Keepalive messages sent. +// KeepalivesSent returns a uint64 +func (obj *bgpv4Metric) HasKeepalivesSent() bool { + return obj.obj.KeepalivesSent != nil +} + +// Number of Keepalive messages sent. +// SetKeepalivesSent sets the uint64 value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetKeepalivesSent(value uint64) Bgpv4Metric { + + obj.obj.KeepalivesSent = &value + return obj +} + +// Number of Keepalive messages received. +// KeepalivesReceived returns a uint64 +func (obj *bgpv4Metric) KeepalivesReceived() uint64 { + + return *obj.obj.KeepalivesReceived + +} + +// Number of Keepalive messages received. +// KeepalivesReceived returns a uint64 +func (obj *bgpv4Metric) HasKeepalivesReceived() bool { + return obj.obj.KeepalivesReceived != nil +} + +// Number of Keepalive messages received. +// SetKeepalivesReceived sets the uint64 value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetKeepalivesReceived(value uint64) Bgpv4Metric { + + obj.obj.KeepalivesReceived = &value + return obj +} + +// Number of Notification messages sent. +// NotificationsSent returns a uint64 +func (obj *bgpv4Metric) NotificationsSent() uint64 { + + return *obj.obj.NotificationsSent + +} + +// Number of Notification messages sent. +// NotificationsSent returns a uint64 +func (obj *bgpv4Metric) HasNotificationsSent() bool { + return obj.obj.NotificationsSent != nil +} + +// Number of Notification messages sent. +// SetNotificationsSent sets the uint64 value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetNotificationsSent(value uint64) Bgpv4Metric { + + obj.obj.NotificationsSent = &value + return obj +} + +// Number of Notification messages received. +// NotificationsReceived returns a uint64 +func (obj *bgpv4Metric) NotificationsReceived() uint64 { + + return *obj.obj.NotificationsReceived + +} + +// Number of Notification messages received. +// NotificationsReceived returns a uint64 +func (obj *bgpv4Metric) HasNotificationsReceived() bool { + return obj.obj.NotificationsReceived != nil +} + +// Number of Notification messages received. +// SetNotificationsReceived sets the uint64 value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetNotificationsReceived(value uint64) Bgpv4Metric { + + obj.obj.NotificationsReceived = &value + return obj +} + +type Bgpv4MetricFsmStateEnum string + +// Enum of FsmState on Bgpv4Metric +var Bgpv4MetricFsmState = struct { + IDLE Bgpv4MetricFsmStateEnum + CONNECT Bgpv4MetricFsmStateEnum + ACTIVE Bgpv4MetricFsmStateEnum + OPENSENT Bgpv4MetricFsmStateEnum + OPENCONFIRM Bgpv4MetricFsmStateEnum + ESTABLISHED Bgpv4MetricFsmStateEnum +}{ + IDLE: Bgpv4MetricFsmStateEnum("idle"), + CONNECT: Bgpv4MetricFsmStateEnum("connect"), + ACTIVE: Bgpv4MetricFsmStateEnum("active"), + OPENSENT: Bgpv4MetricFsmStateEnum("opensent"), + OPENCONFIRM: Bgpv4MetricFsmStateEnum("openconfirm"), + ESTABLISHED: Bgpv4MetricFsmStateEnum("established"), +} + +func (obj *bgpv4Metric) FsmState() Bgpv4MetricFsmStateEnum { + return Bgpv4MetricFsmStateEnum(obj.obj.FsmState.Enum().String()) +} + +// BGP peer FSM (Finite State Machine) state as Idle, Connect, Active, OpenSent, OpenConfirm and Established. In all the states except Established the BGP session is down. Idle refers to the Idle state of the FSM. Connect refers to the state where the session is waiting for the underlying transport session to be established. Active refers to the state where the session is awaiting for a connection from the remote peer. OpenSent refers to the state where the session is in the process of being established. The local system has sent an OPEN message. OpenConfirm refers to the state where the session is in the process of being established. The local system has sent and received an OPEN message and is awaiting a NOTIFICATION or KEEPALIVE message from remote peer. Established refers to the state where the BGP session with the peer is established. +// FsmState returns a string +func (obj *bgpv4Metric) HasFsmState() bool { + return obj.obj.FsmState != nil +} + +func (obj *bgpv4Metric) SetFsmState(value Bgpv4MetricFsmStateEnum) Bgpv4Metric { + intValue, ok := otg.Bgpv4Metric_FsmState_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Bgpv4MetricFsmStateEnum", string(value))) + return obj + } + enumValue := otg.Bgpv4Metric_FsmState_Enum(intValue) + obj.obj.FsmState = &enumValue + + return obj +} + +// Number of End-of-RIB markers received indicating the completion of the initial routing update for a particular address family after the session is established. For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with the minimum length. For any other address family, it is an UPDATE message that contains only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . +// EndOfRibReceived returns a uint64 +func (obj *bgpv4Metric) EndOfRibReceived() uint64 { + + return *obj.obj.EndOfRibReceived + +} + +// Number of End-of-RIB markers received indicating the completion of the initial routing update for a particular address family after the session is established. For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with the minimum length. For any other address family, it is an UPDATE message that contains only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . +// EndOfRibReceived returns a uint64 +func (obj *bgpv4Metric) HasEndOfRibReceived() bool { + return obj.obj.EndOfRibReceived != nil +} + +// Number of End-of-RIB markers received indicating the completion of the initial routing update for a particular address family after the session is established. For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with the minimum length. For any other address family, it is an UPDATE message that contains only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . +// SetEndOfRibReceived sets the uint64 value in the Bgpv4Metric object +func (obj *bgpv4Metric) SetEndOfRibReceived(value uint64) Bgpv4Metric { + + obj.obj.EndOfRibReceived = &value + return obj +} + +func (obj *bgpv4Metric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpv4Metric) setDefault() { + +} diff --git a/gosnappi/bgpv4_metrics_request.go b/gosnappi/bgpv4_metrics_request.go new file mode 100644 index 00000000..6908a10b --- /dev/null +++ b/gosnappi/bgpv4_metrics_request.go @@ -0,0 +1,381 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Bgpv4MetricsRequest ***** +type bgpv4MetricsRequest struct { + validation + obj *otg.Bgpv4MetricsRequest + marshaller marshalBgpv4MetricsRequest + unMarshaller unMarshalBgpv4MetricsRequest +} + +func NewBgpv4MetricsRequest() Bgpv4MetricsRequest { + obj := bgpv4MetricsRequest{obj: &otg.Bgpv4MetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *bgpv4MetricsRequest) msg() *otg.Bgpv4MetricsRequest { + return obj.obj +} + +func (obj *bgpv4MetricsRequest) setMsg(msg *otg.Bgpv4MetricsRequest) Bgpv4MetricsRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpv4MetricsRequest struct { + obj *bgpv4MetricsRequest +} + +type marshalBgpv4MetricsRequest interface { + // ToProto marshals Bgpv4MetricsRequest to protobuf object *otg.Bgpv4MetricsRequest + ToProto() (*otg.Bgpv4MetricsRequest, error) + // ToPbText marshals Bgpv4MetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Bgpv4MetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Bgpv4MetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshalbgpv4MetricsRequest struct { + obj *bgpv4MetricsRequest +} + +type unMarshalBgpv4MetricsRequest interface { + // FromProto unmarshals Bgpv4MetricsRequest from protobuf object *otg.Bgpv4MetricsRequest + FromProto(msg *otg.Bgpv4MetricsRequest) (Bgpv4MetricsRequest, error) + // FromPbText unmarshals Bgpv4MetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Bgpv4MetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Bgpv4MetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *bgpv4MetricsRequest) Marshal() marshalBgpv4MetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpv4MetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpv4MetricsRequest) Unmarshal() unMarshalBgpv4MetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpv4MetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpv4MetricsRequest) ToProto() (*otg.Bgpv4MetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpv4MetricsRequest) FromProto(msg *otg.Bgpv4MetricsRequest) (Bgpv4MetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpv4MetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpv4MetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpv4MetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpv4MetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpv4MetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpv4MetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpv4MetricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpv4MetricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpv4MetricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpv4MetricsRequest) Clone() (Bgpv4MetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpv4MetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Bgpv4MetricsRequest is the request to retrieve BGPv4 per peer metrics/statistics. +type Bgpv4MetricsRequest interface { + Validation + // msg marshals Bgpv4MetricsRequest to protobuf object *otg.Bgpv4MetricsRequest + // and doesn't set defaults + msg() *otg.Bgpv4MetricsRequest + // setMsg unmarshals Bgpv4MetricsRequest from protobuf object *otg.Bgpv4MetricsRequest + // and doesn't set defaults + setMsg(*otg.Bgpv4MetricsRequest) Bgpv4MetricsRequest + // provides marshal interface + Marshal() marshalBgpv4MetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalBgpv4MetricsRequest + // validate validates Bgpv4MetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Bgpv4MetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PeerNames returns []string, set in Bgpv4MetricsRequest. + PeerNames() []string + // SetPeerNames assigns []string provided by user to Bgpv4MetricsRequest + SetPeerNames(value []string) Bgpv4MetricsRequest + // ColumnNames returns []Bgpv4MetricsRequestColumnNamesEnum, set in Bgpv4MetricsRequest + ColumnNames() []Bgpv4MetricsRequestColumnNamesEnum + // SetColumnNames assigns []Bgpv4MetricsRequestColumnNamesEnum provided by user to Bgpv4MetricsRequest + SetColumnNames(value []Bgpv4MetricsRequestColumnNamesEnum) Bgpv4MetricsRequest +} + +// The names of BGPv4 peers to return results for. An empty list will return results for all BGPv4 peers. +// +// x-constraint: +// - /components/schemas/Bgp.V4peer/properties/name +// +// x-constraint: +// - /components/schemas/Bgp.V4peer/properties/name +// +// PeerNames returns a []string +func (obj *bgpv4MetricsRequest) PeerNames() []string { + if obj.obj.PeerNames == nil { + obj.obj.PeerNames = make([]string, 0) + } + return obj.obj.PeerNames +} + +// The names of BGPv4 peers to return results for. An empty list will return results for all BGPv4 peers. +// +// x-constraint: +// - /components/schemas/Bgp.V4peer/properties/name +// +// x-constraint: +// - /components/schemas/Bgp.V4peer/properties/name +// +// SetPeerNames sets the []string value in the Bgpv4MetricsRequest object +func (obj *bgpv4MetricsRequest) SetPeerNames(value []string) Bgpv4MetricsRequest { + + if obj.obj.PeerNames == nil { + obj.obj.PeerNames = make([]string, 0) + } + obj.obj.PeerNames = value + + return obj +} + +type Bgpv4MetricsRequestColumnNamesEnum string + +// Enum of ColumnNames on Bgpv4MetricsRequest +var Bgpv4MetricsRequestColumnNames = struct { + SESSION_STATE Bgpv4MetricsRequestColumnNamesEnum + SESSION_FLAP_COUNT Bgpv4MetricsRequestColumnNamesEnum + ROUTES_ADVERTISED Bgpv4MetricsRequestColumnNamesEnum + ROUTES_RECEIVED Bgpv4MetricsRequestColumnNamesEnum + ROUTE_WITHDRAWS_SENT Bgpv4MetricsRequestColumnNamesEnum + ROUTE_WITHDRAWS_RECEIVED Bgpv4MetricsRequestColumnNamesEnum + UPDATES_SENT Bgpv4MetricsRequestColumnNamesEnum + UPDATES_RECEIVED Bgpv4MetricsRequestColumnNamesEnum + OPENS_SENT Bgpv4MetricsRequestColumnNamesEnum + OPENS_RECEIVED Bgpv4MetricsRequestColumnNamesEnum + KEEPALIVES_SENT Bgpv4MetricsRequestColumnNamesEnum + KEEPALIVES_RECEIVED Bgpv4MetricsRequestColumnNamesEnum + NOTIFICATIONS_SENT Bgpv4MetricsRequestColumnNamesEnum + NOTIFICATIONS_RECEIVED Bgpv4MetricsRequestColumnNamesEnum + FSM_STATE Bgpv4MetricsRequestColumnNamesEnum + END_OF_RIB_RECEIVED Bgpv4MetricsRequestColumnNamesEnum +}{ + SESSION_STATE: Bgpv4MetricsRequestColumnNamesEnum("session_state"), + SESSION_FLAP_COUNT: Bgpv4MetricsRequestColumnNamesEnum("session_flap_count"), + ROUTES_ADVERTISED: Bgpv4MetricsRequestColumnNamesEnum("routes_advertised"), + ROUTES_RECEIVED: Bgpv4MetricsRequestColumnNamesEnum("routes_received"), + ROUTE_WITHDRAWS_SENT: Bgpv4MetricsRequestColumnNamesEnum("route_withdraws_sent"), + ROUTE_WITHDRAWS_RECEIVED: Bgpv4MetricsRequestColumnNamesEnum("route_withdraws_received"), + UPDATES_SENT: Bgpv4MetricsRequestColumnNamesEnum("updates_sent"), + UPDATES_RECEIVED: Bgpv4MetricsRequestColumnNamesEnum("updates_received"), + OPENS_SENT: Bgpv4MetricsRequestColumnNamesEnum("opens_sent"), + OPENS_RECEIVED: Bgpv4MetricsRequestColumnNamesEnum("opens_received"), + KEEPALIVES_SENT: Bgpv4MetricsRequestColumnNamesEnum("keepalives_sent"), + KEEPALIVES_RECEIVED: Bgpv4MetricsRequestColumnNamesEnum("keepalives_received"), + NOTIFICATIONS_SENT: Bgpv4MetricsRequestColumnNamesEnum("notifications_sent"), + NOTIFICATIONS_RECEIVED: Bgpv4MetricsRequestColumnNamesEnum("notifications_received"), + FSM_STATE: Bgpv4MetricsRequestColumnNamesEnum("fsm_state"), + END_OF_RIB_RECEIVED: Bgpv4MetricsRequestColumnNamesEnum("end_of_rib_received"), +} + +func (obj *bgpv4MetricsRequest) ColumnNames() []Bgpv4MetricsRequestColumnNamesEnum { + items := []Bgpv4MetricsRequestColumnNamesEnum{} + for _, item := range obj.obj.ColumnNames { + items = append(items, Bgpv4MetricsRequestColumnNamesEnum(item.String())) + } + return items +} + +// The list of column names that the returned result set will contain. If the list is empty then all columns will be returned except for any result_groups. The name of the BGPv4 peer cannot be excluded. +// SetColumnNames sets the []string value in the Bgpv4MetricsRequest object +func (obj *bgpv4MetricsRequest) SetColumnNames(value []Bgpv4MetricsRequestColumnNamesEnum) Bgpv4MetricsRequest { + + items := []otg.Bgpv4MetricsRequest_ColumnNames_Enum{} + for _, item := range value { + intValue := otg.Bgpv4MetricsRequest_ColumnNames_Enum_value[string(item)] + items = append(items, otg.Bgpv4MetricsRequest_ColumnNames_Enum(intValue)) + } + obj.obj.ColumnNames = items + return obj +} + +func (obj *bgpv4MetricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpv4MetricsRequest) setDefault() { + +} diff --git a/gosnappi/bgpv6_metric.go b/gosnappi/bgpv6_metric.go new file mode 100644 index 00000000..f9d84d17 --- /dev/null +++ b/gosnappi/bgpv6_metric.go @@ -0,0 +1,786 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Bgpv6Metric ***** +type bgpv6Metric struct { + validation + obj *otg.Bgpv6Metric + marshaller marshalBgpv6Metric + unMarshaller unMarshalBgpv6Metric +} + +func NewBgpv6Metric() Bgpv6Metric { + obj := bgpv6Metric{obj: &otg.Bgpv6Metric{}} + obj.setDefault() + return &obj +} + +func (obj *bgpv6Metric) msg() *otg.Bgpv6Metric { + return obj.obj +} + +func (obj *bgpv6Metric) setMsg(msg *otg.Bgpv6Metric) Bgpv6Metric { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpv6Metric struct { + obj *bgpv6Metric +} + +type marshalBgpv6Metric interface { + // ToProto marshals Bgpv6Metric to protobuf object *otg.Bgpv6Metric + ToProto() (*otg.Bgpv6Metric, error) + // ToPbText marshals Bgpv6Metric to protobuf text + ToPbText() (string, error) + // ToYaml marshals Bgpv6Metric to YAML text + ToYaml() (string, error) + // ToJson marshals Bgpv6Metric to JSON text + ToJson() (string, error) +} + +type unMarshalbgpv6Metric struct { + obj *bgpv6Metric +} + +type unMarshalBgpv6Metric interface { + // FromProto unmarshals Bgpv6Metric from protobuf object *otg.Bgpv6Metric + FromProto(msg *otg.Bgpv6Metric) (Bgpv6Metric, error) + // FromPbText unmarshals Bgpv6Metric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Bgpv6Metric from YAML text + FromYaml(value string) error + // FromJson unmarshals Bgpv6Metric from JSON text + FromJson(value string) error +} + +func (obj *bgpv6Metric) Marshal() marshalBgpv6Metric { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpv6Metric{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpv6Metric) Unmarshal() unMarshalBgpv6Metric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpv6Metric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpv6Metric) ToProto() (*otg.Bgpv6Metric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpv6Metric) FromProto(msg *otg.Bgpv6Metric) (Bgpv6Metric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpv6Metric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpv6Metric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpv6Metric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpv6Metric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpv6Metric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpv6Metric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpv6Metric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpv6Metric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpv6Metric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpv6Metric) Clone() (Bgpv6Metric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpv6Metric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Bgpv6Metric is bGPv6 per peer statistics information. +type Bgpv6Metric interface { + Validation + // msg marshals Bgpv6Metric to protobuf object *otg.Bgpv6Metric + // and doesn't set defaults + msg() *otg.Bgpv6Metric + // setMsg unmarshals Bgpv6Metric from protobuf object *otg.Bgpv6Metric + // and doesn't set defaults + setMsg(*otg.Bgpv6Metric) Bgpv6Metric + // provides marshal interface + Marshal() marshalBgpv6Metric + // provides unmarshal interface + Unmarshal() unMarshalBgpv6Metric + // validate validates Bgpv6Metric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Bgpv6Metric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in Bgpv6Metric. + Name() string + // SetName assigns string provided by user to Bgpv6Metric + SetName(value string) Bgpv6Metric + // HasName checks if Name has been set in Bgpv6Metric + HasName() bool + // SessionState returns Bgpv6MetricSessionStateEnum, set in Bgpv6Metric + SessionState() Bgpv6MetricSessionStateEnum + // SetSessionState assigns Bgpv6MetricSessionStateEnum provided by user to Bgpv6Metric + SetSessionState(value Bgpv6MetricSessionStateEnum) Bgpv6Metric + // HasSessionState checks if SessionState has been set in Bgpv6Metric + HasSessionState() bool + // SessionFlapCount returns uint64, set in Bgpv6Metric. + SessionFlapCount() uint64 + // SetSessionFlapCount assigns uint64 provided by user to Bgpv6Metric + SetSessionFlapCount(value uint64) Bgpv6Metric + // HasSessionFlapCount checks if SessionFlapCount has been set in Bgpv6Metric + HasSessionFlapCount() bool + // RoutesAdvertised returns uint64, set in Bgpv6Metric. + RoutesAdvertised() uint64 + // SetRoutesAdvertised assigns uint64 provided by user to Bgpv6Metric + SetRoutesAdvertised(value uint64) Bgpv6Metric + // HasRoutesAdvertised checks if RoutesAdvertised has been set in Bgpv6Metric + HasRoutesAdvertised() bool + // RoutesReceived returns uint64, set in Bgpv6Metric. + RoutesReceived() uint64 + // SetRoutesReceived assigns uint64 provided by user to Bgpv6Metric + SetRoutesReceived(value uint64) Bgpv6Metric + // HasRoutesReceived checks if RoutesReceived has been set in Bgpv6Metric + HasRoutesReceived() bool + // RouteWithdrawsSent returns uint64, set in Bgpv6Metric. + RouteWithdrawsSent() uint64 + // SetRouteWithdrawsSent assigns uint64 provided by user to Bgpv6Metric + SetRouteWithdrawsSent(value uint64) Bgpv6Metric + // HasRouteWithdrawsSent checks if RouteWithdrawsSent has been set in Bgpv6Metric + HasRouteWithdrawsSent() bool + // RouteWithdrawsReceived returns uint64, set in Bgpv6Metric. + RouteWithdrawsReceived() uint64 + // SetRouteWithdrawsReceived assigns uint64 provided by user to Bgpv6Metric + SetRouteWithdrawsReceived(value uint64) Bgpv6Metric + // HasRouteWithdrawsReceived checks if RouteWithdrawsReceived has been set in Bgpv6Metric + HasRouteWithdrawsReceived() bool + // UpdatesSent returns uint64, set in Bgpv6Metric. + UpdatesSent() uint64 + // SetUpdatesSent assigns uint64 provided by user to Bgpv6Metric + SetUpdatesSent(value uint64) Bgpv6Metric + // HasUpdatesSent checks if UpdatesSent has been set in Bgpv6Metric + HasUpdatesSent() bool + // UpdatesReceived returns uint64, set in Bgpv6Metric. + UpdatesReceived() uint64 + // SetUpdatesReceived assigns uint64 provided by user to Bgpv6Metric + SetUpdatesReceived(value uint64) Bgpv6Metric + // HasUpdatesReceived checks if UpdatesReceived has been set in Bgpv6Metric + HasUpdatesReceived() bool + // OpensSent returns uint64, set in Bgpv6Metric. + OpensSent() uint64 + // SetOpensSent assigns uint64 provided by user to Bgpv6Metric + SetOpensSent(value uint64) Bgpv6Metric + // HasOpensSent checks if OpensSent has been set in Bgpv6Metric + HasOpensSent() bool + // OpensReceived returns uint64, set in Bgpv6Metric. + OpensReceived() uint64 + // SetOpensReceived assigns uint64 provided by user to Bgpv6Metric + SetOpensReceived(value uint64) Bgpv6Metric + // HasOpensReceived checks if OpensReceived has been set in Bgpv6Metric + HasOpensReceived() bool + // KeepalivesSent returns uint64, set in Bgpv6Metric. + KeepalivesSent() uint64 + // SetKeepalivesSent assigns uint64 provided by user to Bgpv6Metric + SetKeepalivesSent(value uint64) Bgpv6Metric + // HasKeepalivesSent checks if KeepalivesSent has been set in Bgpv6Metric + HasKeepalivesSent() bool + // KeepalivesReceived returns uint64, set in Bgpv6Metric. + KeepalivesReceived() uint64 + // SetKeepalivesReceived assigns uint64 provided by user to Bgpv6Metric + SetKeepalivesReceived(value uint64) Bgpv6Metric + // HasKeepalivesReceived checks if KeepalivesReceived has been set in Bgpv6Metric + HasKeepalivesReceived() bool + // NotificationsSent returns uint64, set in Bgpv6Metric. + NotificationsSent() uint64 + // SetNotificationsSent assigns uint64 provided by user to Bgpv6Metric + SetNotificationsSent(value uint64) Bgpv6Metric + // HasNotificationsSent checks if NotificationsSent has been set in Bgpv6Metric + HasNotificationsSent() bool + // NotificationsReceived returns uint64, set in Bgpv6Metric. + NotificationsReceived() uint64 + // SetNotificationsReceived assigns uint64 provided by user to Bgpv6Metric + SetNotificationsReceived(value uint64) Bgpv6Metric + // HasNotificationsReceived checks if NotificationsReceived has been set in Bgpv6Metric + HasNotificationsReceived() bool + // FsmState returns Bgpv6MetricFsmStateEnum, set in Bgpv6Metric + FsmState() Bgpv6MetricFsmStateEnum + // SetFsmState assigns Bgpv6MetricFsmStateEnum provided by user to Bgpv6Metric + SetFsmState(value Bgpv6MetricFsmStateEnum) Bgpv6Metric + // HasFsmState checks if FsmState has been set in Bgpv6Metric + HasFsmState() bool + // EndOfRibReceived returns uint64, set in Bgpv6Metric. + EndOfRibReceived() uint64 + // SetEndOfRibReceived assigns uint64 provided by user to Bgpv6Metric + SetEndOfRibReceived(value uint64) Bgpv6Metric + // HasEndOfRibReceived checks if EndOfRibReceived has been set in Bgpv6Metric + HasEndOfRibReceived() bool +} + +// The name of a configured BGPv6 peer. +// Name returns a string +func (obj *bgpv6Metric) Name() string { + + return *obj.obj.Name + +} + +// The name of a configured BGPv6 peer. +// Name returns a string +func (obj *bgpv6Metric) HasName() bool { + return obj.obj.Name != nil +} + +// The name of a configured BGPv6 peer. +// SetName sets the string value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetName(value string) Bgpv6Metric { + + obj.obj.Name = &value + return obj +} + +type Bgpv6MetricSessionStateEnum string + +// Enum of SessionState on Bgpv6Metric +var Bgpv6MetricSessionState = struct { + UP Bgpv6MetricSessionStateEnum + DOWN Bgpv6MetricSessionStateEnum +}{ + UP: Bgpv6MetricSessionStateEnum("up"), + DOWN: Bgpv6MetricSessionStateEnum("down"), +} + +func (obj *bgpv6Metric) SessionState() Bgpv6MetricSessionStateEnum { + return Bgpv6MetricSessionStateEnum(obj.obj.SessionState.Enum().String()) +} + +// Session state as up or down. Up refers to an Established state and Down refers to any other state. +// SessionState returns a string +func (obj *bgpv6Metric) HasSessionState() bool { + return obj.obj.SessionState != nil +} + +func (obj *bgpv6Metric) SetSessionState(value Bgpv6MetricSessionStateEnum) Bgpv6Metric { + intValue, ok := otg.Bgpv6Metric_SessionState_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Bgpv6MetricSessionStateEnum", string(value))) + return obj + } + enumValue := otg.Bgpv6Metric_SessionState_Enum(intValue) + obj.obj.SessionState = &enumValue + + return obj +} + +// Number of times the session went from Up to Down state. +// SessionFlapCount returns a uint64 +func (obj *bgpv6Metric) SessionFlapCount() uint64 { + + return *obj.obj.SessionFlapCount + +} + +// Number of times the session went from Up to Down state. +// SessionFlapCount returns a uint64 +func (obj *bgpv6Metric) HasSessionFlapCount() bool { + return obj.obj.SessionFlapCount != nil +} + +// Number of times the session went from Up to Down state. +// SetSessionFlapCount sets the uint64 value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetSessionFlapCount(value uint64) Bgpv6Metric { + + obj.obj.SessionFlapCount = &value + return obj +} + +// Number of routes advertised. +// RoutesAdvertised returns a uint64 +func (obj *bgpv6Metric) RoutesAdvertised() uint64 { + + return *obj.obj.RoutesAdvertised + +} + +// Number of routes advertised. +// RoutesAdvertised returns a uint64 +func (obj *bgpv6Metric) HasRoutesAdvertised() bool { + return obj.obj.RoutesAdvertised != nil +} + +// Number of routes advertised. +// SetRoutesAdvertised sets the uint64 value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetRoutesAdvertised(value uint64) Bgpv6Metric { + + obj.obj.RoutesAdvertised = &value + return obj +} + +// Number of routes received. +// RoutesReceived returns a uint64 +func (obj *bgpv6Metric) RoutesReceived() uint64 { + + return *obj.obj.RoutesReceived + +} + +// Number of routes received. +// RoutesReceived returns a uint64 +func (obj *bgpv6Metric) HasRoutesReceived() bool { + return obj.obj.RoutesReceived != nil +} + +// Number of routes received. +// SetRoutesReceived sets the uint64 value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetRoutesReceived(value uint64) Bgpv6Metric { + + obj.obj.RoutesReceived = &value + return obj +} + +// Number of route withdraws sent. +// RouteWithdrawsSent returns a uint64 +func (obj *bgpv6Metric) RouteWithdrawsSent() uint64 { + + return *obj.obj.RouteWithdrawsSent + +} + +// Number of route withdraws sent. +// RouteWithdrawsSent returns a uint64 +func (obj *bgpv6Metric) HasRouteWithdrawsSent() bool { + return obj.obj.RouteWithdrawsSent != nil +} + +// Number of route withdraws sent. +// SetRouteWithdrawsSent sets the uint64 value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetRouteWithdrawsSent(value uint64) Bgpv6Metric { + + obj.obj.RouteWithdrawsSent = &value + return obj +} + +// Number of route withdraws received. +// RouteWithdrawsReceived returns a uint64 +func (obj *bgpv6Metric) RouteWithdrawsReceived() uint64 { + + return *obj.obj.RouteWithdrawsReceived + +} + +// Number of route withdraws received. +// RouteWithdrawsReceived returns a uint64 +func (obj *bgpv6Metric) HasRouteWithdrawsReceived() bool { + return obj.obj.RouteWithdrawsReceived != nil +} + +// Number of route withdraws received. +// SetRouteWithdrawsReceived sets the uint64 value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetRouteWithdrawsReceived(value uint64) Bgpv6Metric { + + obj.obj.RouteWithdrawsReceived = &value + return obj +} + +// Number of Update messages sent. +// UpdatesSent returns a uint64 +func (obj *bgpv6Metric) UpdatesSent() uint64 { + + return *obj.obj.UpdatesSent + +} + +// Number of Update messages sent. +// UpdatesSent returns a uint64 +func (obj *bgpv6Metric) HasUpdatesSent() bool { + return obj.obj.UpdatesSent != nil +} + +// Number of Update messages sent. +// SetUpdatesSent sets the uint64 value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetUpdatesSent(value uint64) Bgpv6Metric { + + obj.obj.UpdatesSent = &value + return obj +} + +// Number of Update messages received. +// UpdatesReceived returns a uint64 +func (obj *bgpv6Metric) UpdatesReceived() uint64 { + + return *obj.obj.UpdatesReceived + +} + +// Number of Update messages received. +// UpdatesReceived returns a uint64 +func (obj *bgpv6Metric) HasUpdatesReceived() bool { + return obj.obj.UpdatesReceived != nil +} + +// Number of Update messages received. +// SetUpdatesReceived sets the uint64 value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetUpdatesReceived(value uint64) Bgpv6Metric { + + obj.obj.UpdatesReceived = &value + return obj +} + +// Number of Open messages sent. +// OpensSent returns a uint64 +func (obj *bgpv6Metric) OpensSent() uint64 { + + return *obj.obj.OpensSent + +} + +// Number of Open messages sent. +// OpensSent returns a uint64 +func (obj *bgpv6Metric) HasOpensSent() bool { + return obj.obj.OpensSent != nil +} + +// Number of Open messages sent. +// SetOpensSent sets the uint64 value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetOpensSent(value uint64) Bgpv6Metric { + + obj.obj.OpensSent = &value + return obj +} + +// Number of Open messages received. +// OpensReceived returns a uint64 +func (obj *bgpv6Metric) OpensReceived() uint64 { + + return *obj.obj.OpensReceived + +} + +// Number of Open messages received. +// OpensReceived returns a uint64 +func (obj *bgpv6Metric) HasOpensReceived() bool { + return obj.obj.OpensReceived != nil +} + +// Number of Open messages received. +// SetOpensReceived sets the uint64 value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetOpensReceived(value uint64) Bgpv6Metric { + + obj.obj.OpensReceived = &value + return obj +} + +// Number of Keepalive messages sent. +// KeepalivesSent returns a uint64 +func (obj *bgpv6Metric) KeepalivesSent() uint64 { + + return *obj.obj.KeepalivesSent + +} + +// Number of Keepalive messages sent. +// KeepalivesSent returns a uint64 +func (obj *bgpv6Metric) HasKeepalivesSent() bool { + return obj.obj.KeepalivesSent != nil +} + +// Number of Keepalive messages sent. +// SetKeepalivesSent sets the uint64 value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetKeepalivesSent(value uint64) Bgpv6Metric { + + obj.obj.KeepalivesSent = &value + return obj +} + +// Number of Keepalive messages received. +// KeepalivesReceived returns a uint64 +func (obj *bgpv6Metric) KeepalivesReceived() uint64 { + + return *obj.obj.KeepalivesReceived + +} + +// Number of Keepalive messages received. +// KeepalivesReceived returns a uint64 +func (obj *bgpv6Metric) HasKeepalivesReceived() bool { + return obj.obj.KeepalivesReceived != nil +} + +// Number of Keepalive messages received. +// SetKeepalivesReceived sets the uint64 value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetKeepalivesReceived(value uint64) Bgpv6Metric { + + obj.obj.KeepalivesReceived = &value + return obj +} + +// Number of Notification messages sent. +// NotificationsSent returns a uint64 +func (obj *bgpv6Metric) NotificationsSent() uint64 { + + return *obj.obj.NotificationsSent + +} + +// Number of Notification messages sent. +// NotificationsSent returns a uint64 +func (obj *bgpv6Metric) HasNotificationsSent() bool { + return obj.obj.NotificationsSent != nil +} + +// Number of Notification messages sent. +// SetNotificationsSent sets the uint64 value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetNotificationsSent(value uint64) Bgpv6Metric { + + obj.obj.NotificationsSent = &value + return obj +} + +// Number of Notification messages received. +// NotificationsReceived returns a uint64 +func (obj *bgpv6Metric) NotificationsReceived() uint64 { + + return *obj.obj.NotificationsReceived + +} + +// Number of Notification messages received. +// NotificationsReceived returns a uint64 +func (obj *bgpv6Metric) HasNotificationsReceived() bool { + return obj.obj.NotificationsReceived != nil +} + +// Number of Notification messages received. +// SetNotificationsReceived sets the uint64 value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetNotificationsReceived(value uint64) Bgpv6Metric { + + obj.obj.NotificationsReceived = &value + return obj +} + +type Bgpv6MetricFsmStateEnum string + +// Enum of FsmState on Bgpv6Metric +var Bgpv6MetricFsmState = struct { + IDLE Bgpv6MetricFsmStateEnum + CONNECT Bgpv6MetricFsmStateEnum + ACTIVE Bgpv6MetricFsmStateEnum + OPENSENT Bgpv6MetricFsmStateEnum + OPENCONFIRM Bgpv6MetricFsmStateEnum + ESTABLISHED Bgpv6MetricFsmStateEnum +}{ + IDLE: Bgpv6MetricFsmStateEnum("idle"), + CONNECT: Bgpv6MetricFsmStateEnum("connect"), + ACTIVE: Bgpv6MetricFsmStateEnum("active"), + OPENSENT: Bgpv6MetricFsmStateEnum("opensent"), + OPENCONFIRM: Bgpv6MetricFsmStateEnum("openconfirm"), + ESTABLISHED: Bgpv6MetricFsmStateEnum("established"), +} + +func (obj *bgpv6Metric) FsmState() Bgpv6MetricFsmStateEnum { + return Bgpv6MetricFsmStateEnum(obj.obj.FsmState.Enum().String()) +} + +// BGP peer FSM (Finite State Machine) state as Idle, Connect, Active, OpenSent, OpenConfirm and Established. In all the states except Established the BGP session is down. Idle refers to the Idle state of the FSM. Connect refers to the state where the session is waiting for the underlying transport session to be established. Active refers to the state where the session is awaiting for a connection from the remote peer. OpenSent refers to the state where the session is in the process of being established. The local system has sent an OPEN message. OpenConfirm refers to the state where the session is in the process of being established. The local system has sent and received an OPEN message and is awaiting a NOTIFICATION or KEEPALIVE message from remote peer. Established refers to the state where the BGP session with the peer is established. +// FsmState returns a string +func (obj *bgpv6Metric) HasFsmState() bool { + return obj.obj.FsmState != nil +} + +func (obj *bgpv6Metric) SetFsmState(value Bgpv6MetricFsmStateEnum) Bgpv6Metric { + intValue, ok := otg.Bgpv6Metric_FsmState_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Bgpv6MetricFsmStateEnum", string(value))) + return obj + } + enumValue := otg.Bgpv6Metric_FsmState_Enum(intValue) + obj.obj.FsmState = &enumValue + + return obj +} + +// Number of End-of-RIB markers received indicating the completion of the initial routing update for a particular address family after the session is established. For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with the minimum length. For any other address family, it is an UPDATE message that contains only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . +// EndOfRibReceived returns a uint64 +func (obj *bgpv6Metric) EndOfRibReceived() uint64 { + + return *obj.obj.EndOfRibReceived + +} + +// Number of End-of-RIB markers received indicating the completion of the initial routing update for a particular address family after the session is established. For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with the minimum length. For any other address family, it is an UPDATE message that contains only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . +// EndOfRibReceived returns a uint64 +func (obj *bgpv6Metric) HasEndOfRibReceived() bool { + return obj.obj.EndOfRibReceived != nil +} + +// Number of End-of-RIB markers received indicating the completion of the initial routing update for a particular address family after the session is established. For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with the minimum length. For any other address family, it is an UPDATE message that contains only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . +// SetEndOfRibReceived sets the uint64 value in the Bgpv6Metric object +func (obj *bgpv6Metric) SetEndOfRibReceived(value uint64) Bgpv6Metric { + + obj.obj.EndOfRibReceived = &value + return obj +} + +func (obj *bgpv6Metric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpv6Metric) setDefault() { + +} diff --git a/gosnappi/bgpv6_metrics_request.go b/gosnappi/bgpv6_metrics_request.go new file mode 100644 index 00000000..7d8f89e2 --- /dev/null +++ b/gosnappi/bgpv6_metrics_request.go @@ -0,0 +1,381 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Bgpv6MetricsRequest ***** +type bgpv6MetricsRequest struct { + validation + obj *otg.Bgpv6MetricsRequest + marshaller marshalBgpv6MetricsRequest + unMarshaller unMarshalBgpv6MetricsRequest +} + +func NewBgpv6MetricsRequest() Bgpv6MetricsRequest { + obj := bgpv6MetricsRequest{obj: &otg.Bgpv6MetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *bgpv6MetricsRequest) msg() *otg.Bgpv6MetricsRequest { + return obj.obj +} + +func (obj *bgpv6MetricsRequest) setMsg(msg *otg.Bgpv6MetricsRequest) Bgpv6MetricsRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalbgpv6MetricsRequest struct { + obj *bgpv6MetricsRequest +} + +type marshalBgpv6MetricsRequest interface { + // ToProto marshals Bgpv6MetricsRequest to protobuf object *otg.Bgpv6MetricsRequest + ToProto() (*otg.Bgpv6MetricsRequest, error) + // ToPbText marshals Bgpv6MetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Bgpv6MetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Bgpv6MetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshalbgpv6MetricsRequest struct { + obj *bgpv6MetricsRequest +} + +type unMarshalBgpv6MetricsRequest interface { + // FromProto unmarshals Bgpv6MetricsRequest from protobuf object *otg.Bgpv6MetricsRequest + FromProto(msg *otg.Bgpv6MetricsRequest) (Bgpv6MetricsRequest, error) + // FromPbText unmarshals Bgpv6MetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Bgpv6MetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Bgpv6MetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *bgpv6MetricsRequest) Marshal() marshalBgpv6MetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalbgpv6MetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *bgpv6MetricsRequest) Unmarshal() unMarshalBgpv6MetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalbgpv6MetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalbgpv6MetricsRequest) ToProto() (*otg.Bgpv6MetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalbgpv6MetricsRequest) FromProto(msg *otg.Bgpv6MetricsRequest) (Bgpv6MetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalbgpv6MetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalbgpv6MetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalbgpv6MetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpv6MetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalbgpv6MetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalbgpv6MetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *bgpv6MetricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *bgpv6MetricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *bgpv6MetricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *bgpv6MetricsRequest) Clone() (Bgpv6MetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewBgpv6MetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Bgpv6MetricsRequest is the request to retrieve BGPv6 per peer metrics/statistics. +type Bgpv6MetricsRequest interface { + Validation + // msg marshals Bgpv6MetricsRequest to protobuf object *otg.Bgpv6MetricsRequest + // and doesn't set defaults + msg() *otg.Bgpv6MetricsRequest + // setMsg unmarshals Bgpv6MetricsRequest from protobuf object *otg.Bgpv6MetricsRequest + // and doesn't set defaults + setMsg(*otg.Bgpv6MetricsRequest) Bgpv6MetricsRequest + // provides marshal interface + Marshal() marshalBgpv6MetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalBgpv6MetricsRequest + // validate validates Bgpv6MetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Bgpv6MetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PeerNames returns []string, set in Bgpv6MetricsRequest. + PeerNames() []string + // SetPeerNames assigns []string provided by user to Bgpv6MetricsRequest + SetPeerNames(value []string) Bgpv6MetricsRequest + // ColumnNames returns []Bgpv6MetricsRequestColumnNamesEnum, set in Bgpv6MetricsRequest + ColumnNames() []Bgpv6MetricsRequestColumnNamesEnum + // SetColumnNames assigns []Bgpv6MetricsRequestColumnNamesEnum provided by user to Bgpv6MetricsRequest + SetColumnNames(value []Bgpv6MetricsRequestColumnNamesEnum) Bgpv6MetricsRequest +} + +// The names of BGPv6 peers to return results for. An empty list will return results for all BGPv6 peers. +// +// x-constraint: +// - /components/schemas/Bgp.V6peer/properties/name +// +// x-constraint: +// - /components/schemas/Bgp.V6peer/properties/name +// +// PeerNames returns a []string +func (obj *bgpv6MetricsRequest) PeerNames() []string { + if obj.obj.PeerNames == nil { + obj.obj.PeerNames = make([]string, 0) + } + return obj.obj.PeerNames +} + +// The names of BGPv6 peers to return results for. An empty list will return results for all BGPv6 peers. +// +// x-constraint: +// - /components/schemas/Bgp.V6peer/properties/name +// +// x-constraint: +// - /components/schemas/Bgp.V6peer/properties/name +// +// SetPeerNames sets the []string value in the Bgpv6MetricsRequest object +func (obj *bgpv6MetricsRequest) SetPeerNames(value []string) Bgpv6MetricsRequest { + + if obj.obj.PeerNames == nil { + obj.obj.PeerNames = make([]string, 0) + } + obj.obj.PeerNames = value + + return obj +} + +type Bgpv6MetricsRequestColumnNamesEnum string + +// Enum of ColumnNames on Bgpv6MetricsRequest +var Bgpv6MetricsRequestColumnNames = struct { + SESSION_STATE Bgpv6MetricsRequestColumnNamesEnum + SESSION_FLAP_COUNT Bgpv6MetricsRequestColumnNamesEnum + ROUTES_ADVERTISED Bgpv6MetricsRequestColumnNamesEnum + ROUTES_RECEIVED Bgpv6MetricsRequestColumnNamesEnum + ROUTE_WITHDRAWS_SENT Bgpv6MetricsRequestColumnNamesEnum + ROUTE_WITHDRAWS_RECEIVED Bgpv6MetricsRequestColumnNamesEnum + UPDATES_SENT Bgpv6MetricsRequestColumnNamesEnum + UPDATES_RECEIVED Bgpv6MetricsRequestColumnNamesEnum + OPENS_SENT Bgpv6MetricsRequestColumnNamesEnum + OPENS_RECEIVED Bgpv6MetricsRequestColumnNamesEnum + KEEPALIVES_SENT Bgpv6MetricsRequestColumnNamesEnum + KEEPALIVES_RECEIVED Bgpv6MetricsRequestColumnNamesEnum + NOTIFICATIONS_SENT Bgpv6MetricsRequestColumnNamesEnum + NOTIFICATIONS_RECEIVED Bgpv6MetricsRequestColumnNamesEnum + FSM_STATE Bgpv6MetricsRequestColumnNamesEnum + END_OF_RIB_RECEIVED Bgpv6MetricsRequestColumnNamesEnum +}{ + SESSION_STATE: Bgpv6MetricsRequestColumnNamesEnum("session_state"), + SESSION_FLAP_COUNT: Bgpv6MetricsRequestColumnNamesEnum("session_flap_count"), + ROUTES_ADVERTISED: Bgpv6MetricsRequestColumnNamesEnum("routes_advertised"), + ROUTES_RECEIVED: Bgpv6MetricsRequestColumnNamesEnum("routes_received"), + ROUTE_WITHDRAWS_SENT: Bgpv6MetricsRequestColumnNamesEnum("route_withdraws_sent"), + ROUTE_WITHDRAWS_RECEIVED: Bgpv6MetricsRequestColumnNamesEnum("route_withdraws_received"), + UPDATES_SENT: Bgpv6MetricsRequestColumnNamesEnum("updates_sent"), + UPDATES_RECEIVED: Bgpv6MetricsRequestColumnNamesEnum("updates_received"), + OPENS_SENT: Bgpv6MetricsRequestColumnNamesEnum("opens_sent"), + OPENS_RECEIVED: Bgpv6MetricsRequestColumnNamesEnum("opens_received"), + KEEPALIVES_SENT: Bgpv6MetricsRequestColumnNamesEnum("keepalives_sent"), + KEEPALIVES_RECEIVED: Bgpv6MetricsRequestColumnNamesEnum("keepalives_received"), + NOTIFICATIONS_SENT: Bgpv6MetricsRequestColumnNamesEnum("notifications_sent"), + NOTIFICATIONS_RECEIVED: Bgpv6MetricsRequestColumnNamesEnum("notifications_received"), + FSM_STATE: Bgpv6MetricsRequestColumnNamesEnum("fsm_state"), + END_OF_RIB_RECEIVED: Bgpv6MetricsRequestColumnNamesEnum("end_of_rib_received"), +} + +func (obj *bgpv6MetricsRequest) ColumnNames() []Bgpv6MetricsRequestColumnNamesEnum { + items := []Bgpv6MetricsRequestColumnNamesEnum{} + for _, item := range obj.obj.ColumnNames { + items = append(items, Bgpv6MetricsRequestColumnNamesEnum(item.String())) + } + return items +} + +// The list of column names that the returned result set will contain. If the list is empty then all columns will be returned except for any result_groups. The name of the BGPv6 peer cannot be excluded. +// SetColumnNames sets the []string value in the Bgpv6MetricsRequest object +func (obj *bgpv6MetricsRequest) SetColumnNames(value []Bgpv6MetricsRequestColumnNamesEnum) Bgpv6MetricsRequest { + + items := []otg.Bgpv6MetricsRequest_ColumnNames_Enum{} + for _, item := range value { + intValue := otg.Bgpv6MetricsRequest_ColumnNames_Enum_value[string(item)] + items = append(items, otg.Bgpv6MetricsRequest_ColumnNames_Enum(intValue)) + } + obj.obj.ColumnNames = items + return obj +} + +func (obj *bgpv6MetricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *bgpv6MetricsRequest) setDefault() { + +} diff --git a/gosnappi/capture.go b/gosnappi/capture.go new file mode 100644 index 00000000..b3254ee4 --- /dev/null +++ b/gosnappi/capture.go @@ -0,0 +1,573 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Capture ***** +type capture struct { + validation + obj *otg.Capture + marshaller marshalCapture + unMarshaller unMarshalCapture + filtersHolder CaptureCaptureFilterIter +} + +func NewCapture() Capture { + obj := capture{obj: &otg.Capture{}} + obj.setDefault() + return &obj +} + +func (obj *capture) msg() *otg.Capture { + return obj.obj +} + +func (obj *capture) setMsg(msg *otg.Capture) Capture { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalcapture struct { + obj *capture +} + +type marshalCapture interface { + // ToProto marshals Capture to protobuf object *otg.Capture + ToProto() (*otg.Capture, error) + // ToPbText marshals Capture to protobuf text + ToPbText() (string, error) + // ToYaml marshals Capture to YAML text + ToYaml() (string, error) + // ToJson marshals Capture to JSON text + ToJson() (string, error) +} + +type unMarshalcapture struct { + obj *capture +} + +type unMarshalCapture interface { + // FromProto unmarshals Capture from protobuf object *otg.Capture + FromProto(msg *otg.Capture) (Capture, error) + // FromPbText unmarshals Capture from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Capture from YAML text + FromYaml(value string) error + // FromJson unmarshals Capture from JSON text + FromJson(value string) error +} + +func (obj *capture) Marshal() marshalCapture { + if obj.marshaller == nil { + obj.marshaller = &marshalcapture{obj: obj} + } + return obj.marshaller +} + +func (obj *capture) Unmarshal() unMarshalCapture { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalcapture{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalcapture) ToProto() (*otg.Capture, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalcapture) FromProto(msg *otg.Capture) (Capture, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalcapture) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalcapture) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalcapture) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcapture) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalcapture) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcapture) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *capture) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *capture) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *capture) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *capture) Clone() (Capture, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewCapture() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *capture) setNil() { + obj.filtersHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Capture is under Review: There may be changes in filter configuration +// +// Under Review: There may be changes in filter configuration +// +// Configuration for capture settings. +type Capture interface { + Validation + // msg marshals Capture to protobuf object *otg.Capture + // and doesn't set defaults + msg() *otg.Capture + // setMsg unmarshals Capture from protobuf object *otg.Capture + // and doesn't set defaults + setMsg(*otg.Capture) Capture + // provides marshal interface + Marshal() marshalCapture + // provides unmarshal interface + Unmarshal() unMarshalCapture + // validate validates Capture + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Capture, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PortNames returns []string, set in Capture. + PortNames() []string + // SetPortNames assigns []string provided by user to Capture + SetPortNames(value []string) Capture + // Filters returns CaptureCaptureFilterIterIter, set in Capture + Filters() CaptureCaptureFilterIter + // Overwrite returns bool, set in Capture. + Overwrite() bool + // SetOverwrite assigns bool provided by user to Capture + SetOverwrite(value bool) Capture + // HasOverwrite checks if Overwrite has been set in Capture + HasOverwrite() bool + // PacketSize returns uint32, set in Capture. + PacketSize() uint32 + // SetPacketSize assigns uint32 provided by user to Capture + SetPacketSize(value uint32) Capture + // HasPacketSize checks if PacketSize has been set in Capture + HasPacketSize() bool + // Format returns CaptureFormatEnum, set in Capture + Format() CaptureFormatEnum + // SetFormat assigns CaptureFormatEnum provided by user to Capture + SetFormat(value CaptureFormatEnum) Capture + // HasFormat checks if Format has been set in Capture + HasFormat() bool + // Name returns string, set in Capture. + Name() string + // SetName assigns string provided by user to Capture + SetName(value string) Capture + setNil() +} + +// The unique names of ports that the capture settings will apply to. Port_names cannot be duplicated between capture objects. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// PortNames returns a []string +func (obj *capture) PortNames() []string { + if obj.obj.PortNames == nil { + obj.obj.PortNames = make([]string, 0) + } + return obj.obj.PortNames +} + +// The unique names of ports that the capture settings will apply to. Port_names cannot be duplicated between capture objects. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// SetPortNames sets the []string value in the Capture object +func (obj *capture) SetPortNames(value []string) Capture { + + if obj.obj.PortNames == nil { + obj.obj.PortNames = make([]string, 0) + } + obj.obj.PortNames = value + + return obj +} + +// A list of filters to apply to the capturing ports. If no filters are specified then all packets will be captured. A capture can have multiple filters. The number of filters supported is determined by the implementation which can be retrieved using the capabilities API. +// When multiple filters are specified the capture implementation must && (and) all the filters. +// Filters returns a []CaptureFilter +func (obj *capture) Filters() CaptureCaptureFilterIter { + if len(obj.obj.Filters) == 0 { + obj.obj.Filters = []*otg.CaptureFilter{} + } + if obj.filtersHolder == nil { + obj.filtersHolder = newCaptureCaptureFilterIter(&obj.obj.Filters).setMsg(obj) + } + return obj.filtersHolder +} + +type captureCaptureFilterIter struct { + obj *capture + captureFilterSlice []CaptureFilter + fieldPtr *[]*otg.CaptureFilter +} + +func newCaptureCaptureFilterIter(ptr *[]*otg.CaptureFilter) CaptureCaptureFilterIter { + return &captureCaptureFilterIter{fieldPtr: ptr} +} + +type CaptureCaptureFilterIter interface { + setMsg(*capture) CaptureCaptureFilterIter + Items() []CaptureFilter + Add() CaptureFilter + Append(items ...CaptureFilter) CaptureCaptureFilterIter + Set(index int, newObj CaptureFilter) CaptureCaptureFilterIter + Clear() CaptureCaptureFilterIter + clearHolderSlice() CaptureCaptureFilterIter + appendHolderSlice(item CaptureFilter) CaptureCaptureFilterIter +} + +func (obj *captureCaptureFilterIter) setMsg(msg *capture) CaptureCaptureFilterIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&captureFilter{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *captureCaptureFilterIter) Items() []CaptureFilter { + return obj.captureFilterSlice +} + +func (obj *captureCaptureFilterIter) Add() CaptureFilter { + newObj := &otg.CaptureFilter{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &captureFilter{obj: newObj} + newLibObj.setDefault() + obj.captureFilterSlice = append(obj.captureFilterSlice, newLibObj) + return newLibObj +} + +func (obj *captureCaptureFilterIter) Append(items ...CaptureFilter) CaptureCaptureFilterIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.captureFilterSlice = append(obj.captureFilterSlice, item) + } + return obj +} + +func (obj *captureCaptureFilterIter) Set(index int, newObj CaptureFilter) CaptureCaptureFilterIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.captureFilterSlice[index] = newObj + return obj +} +func (obj *captureCaptureFilterIter) Clear() CaptureCaptureFilterIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.CaptureFilter{} + obj.captureFilterSlice = []CaptureFilter{} + } + return obj +} +func (obj *captureCaptureFilterIter) clearHolderSlice() CaptureCaptureFilterIter { + if len(obj.captureFilterSlice) > 0 { + obj.captureFilterSlice = []CaptureFilter{} + } + return obj +} +func (obj *captureCaptureFilterIter) appendHolderSlice(item CaptureFilter) CaptureCaptureFilterIter { + obj.captureFilterSlice = append(obj.captureFilterSlice, item) + return obj +} + +// Overwrite the capture buffer. +// Overwrite returns a bool +func (obj *capture) Overwrite() bool { + + return *obj.obj.Overwrite + +} + +// Overwrite the capture buffer. +// Overwrite returns a bool +func (obj *capture) HasOverwrite() bool { + return obj.obj.Overwrite != nil +} + +// Overwrite the capture buffer. +// SetOverwrite sets the bool value in the Capture object +func (obj *capture) SetOverwrite(value bool) Capture { + + obj.obj.Overwrite = &value + return obj +} + +// The maximum size of each captured packet. If no value is specified or it is null then the entire packet will be captured. +// PacketSize returns a uint32 +func (obj *capture) PacketSize() uint32 { + + return *obj.obj.PacketSize + +} + +// The maximum size of each captured packet. If no value is specified or it is null then the entire packet will be captured. +// PacketSize returns a uint32 +func (obj *capture) HasPacketSize() bool { + return obj.obj.PacketSize != nil +} + +// The maximum size of each captured packet. If no value is specified or it is null then the entire packet will be captured. +// SetPacketSize sets the uint32 value in the Capture object +func (obj *capture) SetPacketSize(value uint32) Capture { + + obj.obj.PacketSize = &value + return obj +} + +type CaptureFormatEnum string + +// Enum of Format on Capture +var CaptureFormat = struct { + PCAP CaptureFormatEnum + PCAPNG CaptureFormatEnum +}{ + PCAP: CaptureFormatEnum("pcap"), + PCAPNG: CaptureFormatEnum("pcapng"), +} + +func (obj *capture) Format() CaptureFormatEnum { + return CaptureFormatEnum(obj.obj.Format.Enum().String()) +} + +// The format of the capture file. +// Format returns a string +func (obj *capture) HasFormat() bool { + return obj.obj.Format != nil +} + +func (obj *capture) SetFormat(value CaptureFormatEnum) Capture { + intValue, ok := otg.Capture_Format_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on CaptureFormatEnum", string(value))) + return obj + } + enumValue := otg.Capture_Format_Enum(intValue) + obj.obj.Format = &enumValue + + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *capture) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the Capture object +func (obj *capture) SetName(value string) Capture { + + obj.obj.Name = &value + return obj +} + +func (obj *capture) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + obj.addWarnings("Capture is under review, There may be changes in filter configuration") + + if len(obj.obj.Filters) != 0 { + + if set_default { + obj.Filters().clearHolderSlice() + for _, item := range obj.obj.Filters { + obj.Filters().appendHolderSlice(&captureFilter{obj: item}) + } + } + for _, item := range obj.Filters().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.PacketSize != nil { + + if *obj.obj.PacketSize > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Capture.PacketSize <= 65535 but Got %d", *obj.obj.PacketSize)) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface Capture") + } +} + +func (obj *capture) setDefault() { + if obj.obj.Overwrite == nil { + obj.SetOverwrite(true) + } + if obj.obj.Format == nil { + obj.SetFormat(CaptureFormat.PCAP) + + } + +} diff --git a/gosnappi/capture_custom.go b/gosnappi/capture_custom.go new file mode 100644 index 00000000..c9929f65 --- /dev/null +++ b/gosnappi/capture_custom.go @@ -0,0 +1,448 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** CaptureCustom ***** +type captureCustom struct { + validation + obj *otg.CaptureCustom + marshaller marshalCaptureCustom + unMarshaller unMarshalCaptureCustom +} + +func NewCaptureCustom() CaptureCustom { + obj := captureCustom{obj: &otg.CaptureCustom{}} + obj.setDefault() + return &obj +} + +func (obj *captureCustom) msg() *otg.CaptureCustom { + return obj.obj +} + +func (obj *captureCustom) setMsg(msg *otg.CaptureCustom) CaptureCustom { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalcaptureCustom struct { + obj *captureCustom +} + +type marshalCaptureCustom interface { + // ToProto marshals CaptureCustom to protobuf object *otg.CaptureCustom + ToProto() (*otg.CaptureCustom, error) + // ToPbText marshals CaptureCustom to protobuf text + ToPbText() (string, error) + // ToYaml marshals CaptureCustom to YAML text + ToYaml() (string, error) + // ToJson marshals CaptureCustom to JSON text + ToJson() (string, error) +} + +type unMarshalcaptureCustom struct { + obj *captureCustom +} + +type unMarshalCaptureCustom interface { + // FromProto unmarshals CaptureCustom from protobuf object *otg.CaptureCustom + FromProto(msg *otg.CaptureCustom) (CaptureCustom, error) + // FromPbText unmarshals CaptureCustom from protobuf text + FromPbText(value string) error + // FromYaml unmarshals CaptureCustom from YAML text + FromYaml(value string) error + // FromJson unmarshals CaptureCustom from JSON text + FromJson(value string) error +} + +func (obj *captureCustom) Marshal() marshalCaptureCustom { + if obj.marshaller == nil { + obj.marshaller = &marshalcaptureCustom{obj: obj} + } + return obj.marshaller +} + +func (obj *captureCustom) Unmarshal() unMarshalCaptureCustom { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalcaptureCustom{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalcaptureCustom) ToProto() (*otg.CaptureCustom, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalcaptureCustom) FromProto(msg *otg.CaptureCustom) (CaptureCustom, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalcaptureCustom) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalcaptureCustom) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalcaptureCustom) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureCustom) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalcaptureCustom) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureCustom) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *captureCustom) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *captureCustom) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *captureCustom) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *captureCustom) Clone() (CaptureCustom, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewCaptureCustom() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// CaptureCustom is description is TBD +type CaptureCustom interface { + Validation + // msg marshals CaptureCustom to protobuf object *otg.CaptureCustom + // and doesn't set defaults + msg() *otg.CaptureCustom + // setMsg unmarshals CaptureCustom from protobuf object *otg.CaptureCustom + // and doesn't set defaults + setMsg(*otg.CaptureCustom) CaptureCustom + // provides marshal interface + Marshal() marshalCaptureCustom + // provides unmarshal interface + Unmarshal() unMarshalCaptureCustom + // validate validates CaptureCustom + validate() error + // A stringer function + String() string + // Clones the object + Clone() (CaptureCustom, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Offset returns uint32, set in CaptureCustom. + Offset() uint32 + // SetOffset assigns uint32 provided by user to CaptureCustom + SetOffset(value uint32) CaptureCustom + // HasOffset checks if Offset has been set in CaptureCustom + HasOffset() bool + // BitLength returns uint32, set in CaptureCustom. + BitLength() uint32 + // SetBitLength assigns uint32 provided by user to CaptureCustom + SetBitLength(value uint32) CaptureCustom + // HasBitLength checks if BitLength has been set in CaptureCustom + HasBitLength() bool + // Value returns string, set in CaptureCustom. + Value() string + // SetValue assigns string provided by user to CaptureCustom + SetValue(value string) CaptureCustom + // HasValue checks if Value has been set in CaptureCustom + HasValue() bool + // Mask returns string, set in CaptureCustom. + Mask() string + // SetMask assigns string provided by user to CaptureCustom + SetMask(value string) CaptureCustom + // HasMask checks if Mask has been set in CaptureCustom + HasMask() bool + // Negate returns bool, set in CaptureCustom. + Negate() bool + // SetNegate assigns bool provided by user to CaptureCustom + SetNegate(value bool) CaptureCustom + // HasNegate checks if Negate has been set in CaptureCustom + HasNegate() bool +} + +// The bit offset of field to filter on +// Offset returns a uint32 +func (obj *captureCustom) Offset() uint32 { + + return *obj.obj.Offset + +} + +// The bit offset of field to filter on +// Offset returns a uint32 +func (obj *captureCustom) HasOffset() bool { + return obj.obj.Offset != nil +} + +// The bit offset of field to filter on +// SetOffset sets the uint32 value in the CaptureCustom object +func (obj *captureCustom) SetOffset(value uint32) CaptureCustom { + + obj.obj.Offset = &value + return obj +} + +// The bit length of field to filter on +// BitLength returns a uint32 +func (obj *captureCustom) BitLength() uint32 { + + return *obj.obj.BitLength + +} + +// The bit length of field to filter on +// BitLength returns a uint32 +func (obj *captureCustom) HasBitLength() bool { + return obj.obj.BitLength != nil +} + +// The bit length of field to filter on +// SetBitLength sets the uint32 value in the CaptureCustom object +func (obj *captureCustom) SetBitLength(value uint32) CaptureCustom { + + obj.obj.BitLength = &value + return obj +} + +// description is TBD +// Value returns a string +func (obj *captureCustom) Value() string { + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *captureCustom) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the CaptureCustom object +func (obj *captureCustom) SetValue(value string) CaptureCustom { + + obj.obj.Value = &value + return obj +} + +// description is TBD +// Mask returns a string +func (obj *captureCustom) Mask() string { + + return *obj.obj.Mask + +} + +// description is TBD +// Mask returns a string +func (obj *captureCustom) HasMask() bool { + return obj.obj.Mask != nil +} + +// description is TBD +// SetMask sets the string value in the CaptureCustom object +func (obj *captureCustom) SetMask(value string) CaptureCustom { + + obj.obj.Mask = &value + return obj +} + +// description is TBD +// Negate returns a bool +func (obj *captureCustom) Negate() bool { + + return *obj.obj.Negate + +} + +// description is TBD +// Negate returns a bool +func (obj *captureCustom) HasNegate() bool { + return obj.obj.Negate != nil +} + +// description is TBD +// SetNegate sets the bool value in the CaptureCustom object +func (obj *captureCustom) SetNegate(value bool) CaptureCustom { + + obj.obj.Negate = &value + return obj +} + +func (obj *captureCustom) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateHex(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on CaptureCustom.Value")) + } + + } + + if obj.obj.Mask != nil { + + err := obj.validateHex(obj.Mask()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on CaptureCustom.Mask")) + } + + } + +} + +func (obj *captureCustom) setDefault() { + if obj.obj.BitLength == nil { + obj.SetBitLength(8) + } + if obj.obj.Value == nil { + obj.SetValue("00") + } + if obj.obj.Mask == nil { + obj.SetMask("00") + } + if obj.obj.Negate == nil { + obj.SetNegate(false) + } + +} diff --git a/gosnappi/capture_ethernet.go b/gosnappi/capture_ethernet.go new file mode 100644 index 00000000..811737d2 --- /dev/null +++ b/gosnappi/capture_ethernet.go @@ -0,0 +1,457 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** CaptureEthernet ***** +type captureEthernet struct { + validation + obj *otg.CaptureEthernet + marshaller marshalCaptureEthernet + unMarshaller unMarshalCaptureEthernet + srcHolder CaptureField + dstHolder CaptureField + etherTypeHolder CaptureField + pfcQueueHolder CaptureField +} + +func NewCaptureEthernet() CaptureEthernet { + obj := captureEthernet{obj: &otg.CaptureEthernet{}} + obj.setDefault() + return &obj +} + +func (obj *captureEthernet) msg() *otg.CaptureEthernet { + return obj.obj +} + +func (obj *captureEthernet) setMsg(msg *otg.CaptureEthernet) CaptureEthernet { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalcaptureEthernet struct { + obj *captureEthernet +} + +type marshalCaptureEthernet interface { + // ToProto marshals CaptureEthernet to protobuf object *otg.CaptureEthernet + ToProto() (*otg.CaptureEthernet, error) + // ToPbText marshals CaptureEthernet to protobuf text + ToPbText() (string, error) + // ToYaml marshals CaptureEthernet to YAML text + ToYaml() (string, error) + // ToJson marshals CaptureEthernet to JSON text + ToJson() (string, error) +} + +type unMarshalcaptureEthernet struct { + obj *captureEthernet +} + +type unMarshalCaptureEthernet interface { + // FromProto unmarshals CaptureEthernet from protobuf object *otg.CaptureEthernet + FromProto(msg *otg.CaptureEthernet) (CaptureEthernet, error) + // FromPbText unmarshals CaptureEthernet from protobuf text + FromPbText(value string) error + // FromYaml unmarshals CaptureEthernet from YAML text + FromYaml(value string) error + // FromJson unmarshals CaptureEthernet from JSON text + FromJson(value string) error +} + +func (obj *captureEthernet) Marshal() marshalCaptureEthernet { + if obj.marshaller == nil { + obj.marshaller = &marshalcaptureEthernet{obj: obj} + } + return obj.marshaller +} + +func (obj *captureEthernet) Unmarshal() unMarshalCaptureEthernet { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalcaptureEthernet{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalcaptureEthernet) ToProto() (*otg.CaptureEthernet, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalcaptureEthernet) FromProto(msg *otg.CaptureEthernet) (CaptureEthernet, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalcaptureEthernet) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalcaptureEthernet) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalcaptureEthernet) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureEthernet) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalcaptureEthernet) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureEthernet) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *captureEthernet) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *captureEthernet) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *captureEthernet) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *captureEthernet) Clone() (CaptureEthernet, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewCaptureEthernet() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *captureEthernet) setNil() { + obj.srcHolder = nil + obj.dstHolder = nil + obj.etherTypeHolder = nil + obj.pfcQueueHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// CaptureEthernet is description is TBD +type CaptureEthernet interface { + Validation + // msg marshals CaptureEthernet to protobuf object *otg.CaptureEthernet + // and doesn't set defaults + msg() *otg.CaptureEthernet + // setMsg unmarshals CaptureEthernet from protobuf object *otg.CaptureEthernet + // and doesn't set defaults + setMsg(*otg.CaptureEthernet) CaptureEthernet + // provides marshal interface + Marshal() marshalCaptureEthernet + // provides unmarshal interface + Unmarshal() unMarshalCaptureEthernet + // validate validates CaptureEthernet + validate() error + // A stringer function + String() string + // Clones the object + Clone() (CaptureEthernet, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Src returns CaptureField, set in CaptureEthernet. + // CaptureField is description is TBD + Src() CaptureField + // SetSrc assigns CaptureField provided by user to CaptureEthernet. + // CaptureField is description is TBD + SetSrc(value CaptureField) CaptureEthernet + // HasSrc checks if Src has been set in CaptureEthernet + HasSrc() bool + // Dst returns CaptureField, set in CaptureEthernet. + // CaptureField is description is TBD + Dst() CaptureField + // SetDst assigns CaptureField provided by user to CaptureEthernet. + // CaptureField is description is TBD + SetDst(value CaptureField) CaptureEthernet + // HasDst checks if Dst has been set in CaptureEthernet + HasDst() bool + // EtherType returns CaptureField, set in CaptureEthernet. + // CaptureField is description is TBD + EtherType() CaptureField + // SetEtherType assigns CaptureField provided by user to CaptureEthernet. + // CaptureField is description is TBD + SetEtherType(value CaptureField) CaptureEthernet + // HasEtherType checks if EtherType has been set in CaptureEthernet + HasEtherType() bool + // PfcQueue returns CaptureField, set in CaptureEthernet. + // CaptureField is description is TBD + PfcQueue() CaptureField + // SetPfcQueue assigns CaptureField provided by user to CaptureEthernet. + // CaptureField is description is TBD + SetPfcQueue(value CaptureField) CaptureEthernet + // HasPfcQueue checks if PfcQueue has been set in CaptureEthernet + HasPfcQueue() bool + setNil() +} + +// description is TBD +// Src returns a CaptureField +func (obj *captureEthernet) Src() CaptureField { + if obj.obj.Src == nil { + obj.obj.Src = NewCaptureField().msg() + } + if obj.srcHolder == nil { + obj.srcHolder = &captureField{obj: obj.obj.Src} + } + return obj.srcHolder +} + +// description is TBD +// Src returns a CaptureField +func (obj *captureEthernet) HasSrc() bool { + return obj.obj.Src != nil +} + +// description is TBD +// SetSrc sets the CaptureField value in the CaptureEthernet object +func (obj *captureEthernet) SetSrc(value CaptureField) CaptureEthernet { + + obj.srcHolder = nil + obj.obj.Src = value.msg() + + return obj +} + +// description is TBD +// Dst returns a CaptureField +func (obj *captureEthernet) Dst() CaptureField { + if obj.obj.Dst == nil { + obj.obj.Dst = NewCaptureField().msg() + } + if obj.dstHolder == nil { + obj.dstHolder = &captureField{obj: obj.obj.Dst} + } + return obj.dstHolder +} + +// description is TBD +// Dst returns a CaptureField +func (obj *captureEthernet) HasDst() bool { + return obj.obj.Dst != nil +} + +// description is TBD +// SetDst sets the CaptureField value in the CaptureEthernet object +func (obj *captureEthernet) SetDst(value CaptureField) CaptureEthernet { + + obj.dstHolder = nil + obj.obj.Dst = value.msg() + + return obj +} + +// description is TBD +// EtherType returns a CaptureField +func (obj *captureEthernet) EtherType() CaptureField { + if obj.obj.EtherType == nil { + obj.obj.EtherType = NewCaptureField().msg() + } + if obj.etherTypeHolder == nil { + obj.etherTypeHolder = &captureField{obj: obj.obj.EtherType} + } + return obj.etherTypeHolder +} + +// description is TBD +// EtherType returns a CaptureField +func (obj *captureEthernet) HasEtherType() bool { + return obj.obj.EtherType != nil +} + +// description is TBD +// SetEtherType sets the CaptureField value in the CaptureEthernet object +func (obj *captureEthernet) SetEtherType(value CaptureField) CaptureEthernet { + + obj.etherTypeHolder = nil + obj.obj.EtherType = value.msg() + + return obj +} + +// description is TBD +// PfcQueue returns a CaptureField +func (obj *captureEthernet) PfcQueue() CaptureField { + if obj.obj.PfcQueue == nil { + obj.obj.PfcQueue = NewCaptureField().msg() + } + if obj.pfcQueueHolder == nil { + obj.pfcQueueHolder = &captureField{obj: obj.obj.PfcQueue} + } + return obj.pfcQueueHolder +} + +// description is TBD +// PfcQueue returns a CaptureField +func (obj *captureEthernet) HasPfcQueue() bool { + return obj.obj.PfcQueue != nil +} + +// description is TBD +// SetPfcQueue sets the CaptureField value in the CaptureEthernet object +func (obj *captureEthernet) SetPfcQueue(value CaptureField) CaptureEthernet { + + obj.pfcQueueHolder = nil + obj.obj.PfcQueue = value.msg() + + return obj +} + +func (obj *captureEthernet) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Src != nil { + + obj.Src().validateObj(vObj, set_default) + } + + if obj.obj.Dst != nil { + + obj.Dst().validateObj(vObj, set_default) + } + + if obj.obj.EtherType != nil { + + obj.EtherType().validateObj(vObj, set_default) + } + + if obj.obj.PfcQueue != nil { + + obj.PfcQueue().validateObj(vObj, set_default) + } + +} + +func (obj *captureEthernet) setDefault() { + +} diff --git a/gosnappi/capture_field.go b/gosnappi/capture_field.go new file mode 100644 index 00000000..ee21cc84 --- /dev/null +++ b/gosnappi/capture_field.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** CaptureField ***** +type captureField struct { + validation + obj *otg.CaptureField + marshaller marshalCaptureField + unMarshaller unMarshalCaptureField +} + +func NewCaptureField() CaptureField { + obj := captureField{obj: &otg.CaptureField{}} + obj.setDefault() + return &obj +} + +func (obj *captureField) msg() *otg.CaptureField { + return obj.obj +} + +func (obj *captureField) setMsg(msg *otg.CaptureField) CaptureField { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalcaptureField struct { + obj *captureField +} + +type marshalCaptureField interface { + // ToProto marshals CaptureField to protobuf object *otg.CaptureField + ToProto() (*otg.CaptureField, error) + // ToPbText marshals CaptureField to protobuf text + ToPbText() (string, error) + // ToYaml marshals CaptureField to YAML text + ToYaml() (string, error) + // ToJson marshals CaptureField to JSON text + ToJson() (string, error) +} + +type unMarshalcaptureField struct { + obj *captureField +} + +type unMarshalCaptureField interface { + // FromProto unmarshals CaptureField from protobuf object *otg.CaptureField + FromProto(msg *otg.CaptureField) (CaptureField, error) + // FromPbText unmarshals CaptureField from protobuf text + FromPbText(value string) error + // FromYaml unmarshals CaptureField from YAML text + FromYaml(value string) error + // FromJson unmarshals CaptureField from JSON text + FromJson(value string) error +} + +func (obj *captureField) Marshal() marshalCaptureField { + if obj.marshaller == nil { + obj.marshaller = &marshalcaptureField{obj: obj} + } + return obj.marshaller +} + +func (obj *captureField) Unmarshal() unMarshalCaptureField { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalcaptureField{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalcaptureField) ToProto() (*otg.CaptureField, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalcaptureField) FromProto(msg *otg.CaptureField) (CaptureField, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalcaptureField) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalcaptureField) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalcaptureField) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureField) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalcaptureField) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureField) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *captureField) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *captureField) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *captureField) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *captureField) Clone() (CaptureField, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewCaptureField() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// CaptureField is description is TBD +type CaptureField interface { + Validation + // msg marshals CaptureField to protobuf object *otg.CaptureField + // and doesn't set defaults + msg() *otg.CaptureField + // setMsg unmarshals CaptureField from protobuf object *otg.CaptureField + // and doesn't set defaults + setMsg(*otg.CaptureField) CaptureField + // provides marshal interface + Marshal() marshalCaptureField + // provides unmarshal interface + Unmarshal() unMarshalCaptureField + // validate validates CaptureField + validate() error + // A stringer function + String() string + // Clones the object + Clone() (CaptureField, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Value returns string, set in CaptureField. + Value() string + // SetValue assigns string provided by user to CaptureField + SetValue(value string) CaptureField + // HasValue checks if Value has been set in CaptureField + HasValue() bool + // Mask returns string, set in CaptureField. + Mask() string + // SetMask assigns string provided by user to CaptureField + SetMask(value string) CaptureField + // HasMask checks if Mask has been set in CaptureField + HasMask() bool + // Negate returns bool, set in CaptureField. + Negate() bool + // SetNegate assigns bool provided by user to CaptureField + SetNegate(value bool) CaptureField + // HasNegate checks if Negate has been set in CaptureField + HasNegate() bool +} + +// description is TBD +// Value returns a string +func (obj *captureField) Value() string { + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *captureField) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the CaptureField object +func (obj *captureField) SetValue(value string) CaptureField { + + obj.obj.Value = &value + return obj +} + +// description is TBD +// Mask returns a string +func (obj *captureField) Mask() string { + + return *obj.obj.Mask + +} + +// description is TBD +// Mask returns a string +func (obj *captureField) HasMask() bool { + return obj.obj.Mask != nil +} + +// description is TBD +// SetMask sets the string value in the CaptureField object +func (obj *captureField) SetMask(value string) CaptureField { + + obj.obj.Mask = &value + return obj +} + +// description is TBD +// Negate returns a bool +func (obj *captureField) Negate() bool { + + return *obj.obj.Negate + +} + +// description is TBD +// Negate returns a bool +func (obj *captureField) HasNegate() bool { + return obj.obj.Negate != nil +} + +// description is TBD +// SetNegate sets the bool value in the CaptureField object +func (obj *captureField) SetNegate(value bool) CaptureField { + + obj.obj.Negate = &value + return obj +} + +func (obj *captureField) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateHex(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on CaptureField.Value")) + } + + } + + if obj.obj.Mask != nil { + + err := obj.validateHex(obj.Mask()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on CaptureField.Mask")) + } + + } + +} + +func (obj *captureField) setDefault() { + if obj.obj.Value == nil { + obj.SetValue("00") + } + if obj.obj.Mask == nil { + obj.SetMask("00") + } + if obj.obj.Negate == nil { + obj.SetNegate(false) + } + +} diff --git a/gosnappi/capture_filter.go b/gosnappi/capture_filter.go new file mode 100644 index 00000000..15884477 --- /dev/null +++ b/gosnappi/capture_filter.go @@ -0,0 +1,620 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** CaptureFilter ***** +type captureFilter struct { + validation + obj *otg.CaptureFilter + marshaller marshalCaptureFilter + unMarshaller unMarshalCaptureFilter + customHolder CaptureCustom + ethernetHolder CaptureEthernet + vlanHolder CaptureVlan + ipv4Holder CaptureIpv4 + ipv6Holder CaptureIpv6 +} + +func NewCaptureFilter() CaptureFilter { + obj := captureFilter{obj: &otg.CaptureFilter{}} + obj.setDefault() + return &obj +} + +func (obj *captureFilter) msg() *otg.CaptureFilter { + return obj.obj +} + +func (obj *captureFilter) setMsg(msg *otg.CaptureFilter) CaptureFilter { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalcaptureFilter struct { + obj *captureFilter +} + +type marshalCaptureFilter interface { + // ToProto marshals CaptureFilter to protobuf object *otg.CaptureFilter + ToProto() (*otg.CaptureFilter, error) + // ToPbText marshals CaptureFilter to protobuf text + ToPbText() (string, error) + // ToYaml marshals CaptureFilter to YAML text + ToYaml() (string, error) + // ToJson marshals CaptureFilter to JSON text + ToJson() (string, error) +} + +type unMarshalcaptureFilter struct { + obj *captureFilter +} + +type unMarshalCaptureFilter interface { + // FromProto unmarshals CaptureFilter from protobuf object *otg.CaptureFilter + FromProto(msg *otg.CaptureFilter) (CaptureFilter, error) + // FromPbText unmarshals CaptureFilter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals CaptureFilter from YAML text + FromYaml(value string) error + // FromJson unmarshals CaptureFilter from JSON text + FromJson(value string) error +} + +func (obj *captureFilter) Marshal() marshalCaptureFilter { + if obj.marshaller == nil { + obj.marshaller = &marshalcaptureFilter{obj: obj} + } + return obj.marshaller +} + +func (obj *captureFilter) Unmarshal() unMarshalCaptureFilter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalcaptureFilter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalcaptureFilter) ToProto() (*otg.CaptureFilter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalcaptureFilter) FromProto(msg *otg.CaptureFilter) (CaptureFilter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalcaptureFilter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalcaptureFilter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalcaptureFilter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureFilter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalcaptureFilter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureFilter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *captureFilter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *captureFilter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *captureFilter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *captureFilter) Clone() (CaptureFilter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewCaptureFilter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *captureFilter) setNil() { + obj.customHolder = nil + obj.ethernetHolder = nil + obj.vlanHolder = nil + obj.ipv4Holder = nil + obj.ipv6Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// CaptureFilter is configuration for capture filters +type CaptureFilter interface { + Validation + // msg marshals CaptureFilter to protobuf object *otg.CaptureFilter + // and doesn't set defaults + msg() *otg.CaptureFilter + // setMsg unmarshals CaptureFilter from protobuf object *otg.CaptureFilter + // and doesn't set defaults + setMsg(*otg.CaptureFilter) CaptureFilter + // provides marshal interface + Marshal() marshalCaptureFilter + // provides unmarshal interface + Unmarshal() unMarshalCaptureFilter + // validate validates CaptureFilter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (CaptureFilter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns CaptureFilterChoiceEnum, set in CaptureFilter + Choice() CaptureFilterChoiceEnum + // setChoice assigns CaptureFilterChoiceEnum provided by user to CaptureFilter + setChoice(value CaptureFilterChoiceEnum) CaptureFilter + // HasChoice checks if Choice has been set in CaptureFilter + HasChoice() bool + // Custom returns CaptureCustom, set in CaptureFilter. + // CaptureCustom is description is TBD + Custom() CaptureCustom + // SetCustom assigns CaptureCustom provided by user to CaptureFilter. + // CaptureCustom is description is TBD + SetCustom(value CaptureCustom) CaptureFilter + // HasCustom checks if Custom has been set in CaptureFilter + HasCustom() bool + // Ethernet returns CaptureEthernet, set in CaptureFilter. + // CaptureEthernet is description is TBD + Ethernet() CaptureEthernet + // SetEthernet assigns CaptureEthernet provided by user to CaptureFilter. + // CaptureEthernet is description is TBD + SetEthernet(value CaptureEthernet) CaptureFilter + // HasEthernet checks if Ethernet has been set in CaptureFilter + HasEthernet() bool + // Vlan returns CaptureVlan, set in CaptureFilter. + // CaptureVlan is description is TBD + Vlan() CaptureVlan + // SetVlan assigns CaptureVlan provided by user to CaptureFilter. + // CaptureVlan is description is TBD + SetVlan(value CaptureVlan) CaptureFilter + // HasVlan checks if Vlan has been set in CaptureFilter + HasVlan() bool + // Ipv4 returns CaptureIpv4, set in CaptureFilter. + // CaptureIpv4 is description is TBD + Ipv4() CaptureIpv4 + // SetIpv4 assigns CaptureIpv4 provided by user to CaptureFilter. + // CaptureIpv4 is description is TBD + SetIpv4(value CaptureIpv4) CaptureFilter + // HasIpv4 checks if Ipv4 has been set in CaptureFilter + HasIpv4() bool + // Ipv6 returns CaptureIpv6, set in CaptureFilter. + // CaptureIpv6 is description is TBD + Ipv6() CaptureIpv6 + // SetIpv6 assigns CaptureIpv6 provided by user to CaptureFilter. + // CaptureIpv6 is description is TBD + SetIpv6(value CaptureIpv6) CaptureFilter + // HasIpv6 checks if Ipv6 has been set in CaptureFilter + HasIpv6() bool + setNil() +} + +type CaptureFilterChoiceEnum string + +// Enum of Choice on CaptureFilter +var CaptureFilterChoice = struct { + CUSTOM CaptureFilterChoiceEnum + ETHERNET CaptureFilterChoiceEnum + VLAN CaptureFilterChoiceEnum + IPV4 CaptureFilterChoiceEnum + IPV6 CaptureFilterChoiceEnum +}{ + CUSTOM: CaptureFilterChoiceEnum("custom"), + ETHERNET: CaptureFilterChoiceEnum("ethernet"), + VLAN: CaptureFilterChoiceEnum("vlan"), + IPV4: CaptureFilterChoiceEnum("ipv4"), + IPV6: CaptureFilterChoiceEnum("ipv6"), +} + +func (obj *captureFilter) Choice() CaptureFilterChoiceEnum { + return CaptureFilterChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The type of capture filter. +// Choice returns a string +func (obj *captureFilter) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *captureFilter) setChoice(value CaptureFilterChoiceEnum) CaptureFilter { + intValue, ok := otg.CaptureFilter_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on CaptureFilterChoiceEnum", string(value))) + return obj + } + enumValue := otg.CaptureFilter_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ipv6 = nil + obj.ipv6Holder = nil + obj.obj.Ipv4 = nil + obj.ipv4Holder = nil + obj.obj.Vlan = nil + obj.vlanHolder = nil + obj.obj.Ethernet = nil + obj.ethernetHolder = nil + obj.obj.Custom = nil + obj.customHolder = nil + + if value == CaptureFilterChoice.CUSTOM { + obj.obj.Custom = NewCaptureCustom().msg() + } + + if value == CaptureFilterChoice.ETHERNET { + obj.obj.Ethernet = NewCaptureEthernet().msg() + } + + if value == CaptureFilterChoice.VLAN { + obj.obj.Vlan = NewCaptureVlan().msg() + } + + if value == CaptureFilterChoice.IPV4 { + obj.obj.Ipv4 = NewCaptureIpv4().msg() + } + + if value == CaptureFilterChoice.IPV6 { + obj.obj.Ipv6 = NewCaptureIpv6().msg() + } + + return obj +} + +// Offset from last filter in the list. If no filters are present it is offset from position 0. Multiple custom filters can be present, the length of each custom filter is the length of the value being filtered. +// Custom returns a CaptureCustom +func (obj *captureFilter) Custom() CaptureCustom { + if obj.obj.Custom == nil { + obj.setChoice(CaptureFilterChoice.CUSTOM) + } + if obj.customHolder == nil { + obj.customHolder = &captureCustom{obj: obj.obj.Custom} + } + return obj.customHolder +} + +// Offset from last filter in the list. If no filters are present it is offset from position 0. Multiple custom filters can be present, the length of each custom filter is the length of the value being filtered. +// Custom returns a CaptureCustom +func (obj *captureFilter) HasCustom() bool { + return obj.obj.Custom != nil +} + +// Offset from last filter in the list. If no filters are present it is offset from position 0. Multiple custom filters can be present, the length of each custom filter is the length of the value being filtered. +// SetCustom sets the CaptureCustom value in the CaptureFilter object +func (obj *captureFilter) SetCustom(value CaptureCustom) CaptureFilter { + obj.setChoice(CaptureFilterChoice.CUSTOM) + obj.customHolder = nil + obj.obj.Custom = value.msg() + + return obj +} + +// description is TBD +// Ethernet returns a CaptureEthernet +func (obj *captureFilter) Ethernet() CaptureEthernet { + if obj.obj.Ethernet == nil { + obj.setChoice(CaptureFilterChoice.ETHERNET) + } + if obj.ethernetHolder == nil { + obj.ethernetHolder = &captureEthernet{obj: obj.obj.Ethernet} + } + return obj.ethernetHolder +} + +// description is TBD +// Ethernet returns a CaptureEthernet +func (obj *captureFilter) HasEthernet() bool { + return obj.obj.Ethernet != nil +} + +// description is TBD +// SetEthernet sets the CaptureEthernet value in the CaptureFilter object +func (obj *captureFilter) SetEthernet(value CaptureEthernet) CaptureFilter { + obj.setChoice(CaptureFilterChoice.ETHERNET) + obj.ethernetHolder = nil + obj.obj.Ethernet = value.msg() + + return obj +} + +// description is TBD +// Vlan returns a CaptureVlan +func (obj *captureFilter) Vlan() CaptureVlan { + if obj.obj.Vlan == nil { + obj.setChoice(CaptureFilterChoice.VLAN) + } + if obj.vlanHolder == nil { + obj.vlanHolder = &captureVlan{obj: obj.obj.Vlan} + } + return obj.vlanHolder +} + +// description is TBD +// Vlan returns a CaptureVlan +func (obj *captureFilter) HasVlan() bool { + return obj.obj.Vlan != nil +} + +// description is TBD +// SetVlan sets the CaptureVlan value in the CaptureFilter object +func (obj *captureFilter) SetVlan(value CaptureVlan) CaptureFilter { + obj.setChoice(CaptureFilterChoice.VLAN) + obj.vlanHolder = nil + obj.obj.Vlan = value.msg() + + return obj +} + +// description is TBD +// Ipv4 returns a CaptureIpv4 +func (obj *captureFilter) Ipv4() CaptureIpv4 { + if obj.obj.Ipv4 == nil { + obj.setChoice(CaptureFilterChoice.IPV4) + } + if obj.ipv4Holder == nil { + obj.ipv4Holder = &captureIpv4{obj: obj.obj.Ipv4} + } + return obj.ipv4Holder +} + +// description is TBD +// Ipv4 returns a CaptureIpv4 +func (obj *captureFilter) HasIpv4() bool { + return obj.obj.Ipv4 != nil +} + +// description is TBD +// SetIpv4 sets the CaptureIpv4 value in the CaptureFilter object +func (obj *captureFilter) SetIpv4(value CaptureIpv4) CaptureFilter { + obj.setChoice(CaptureFilterChoice.IPV4) + obj.ipv4Holder = nil + obj.obj.Ipv4 = value.msg() + + return obj +} + +// description is TBD +// Ipv6 returns a CaptureIpv6 +func (obj *captureFilter) Ipv6() CaptureIpv6 { + if obj.obj.Ipv6 == nil { + obj.setChoice(CaptureFilterChoice.IPV6) + } + if obj.ipv6Holder == nil { + obj.ipv6Holder = &captureIpv6{obj: obj.obj.Ipv6} + } + return obj.ipv6Holder +} + +// description is TBD +// Ipv6 returns a CaptureIpv6 +func (obj *captureFilter) HasIpv6() bool { + return obj.obj.Ipv6 != nil +} + +// description is TBD +// SetIpv6 sets the CaptureIpv6 value in the CaptureFilter object +func (obj *captureFilter) SetIpv6(value CaptureIpv6) CaptureFilter { + obj.setChoice(CaptureFilterChoice.IPV6) + obj.ipv6Holder = nil + obj.obj.Ipv6 = value.msg() + + return obj +} + +func (obj *captureFilter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Custom != nil { + + obj.Custom().validateObj(vObj, set_default) + } + + if obj.obj.Ethernet != nil { + + obj.Ethernet().validateObj(vObj, set_default) + } + + if obj.obj.Vlan != nil { + + obj.Vlan().validateObj(vObj, set_default) + } + + if obj.obj.Ipv4 != nil { + + obj.Ipv4().validateObj(vObj, set_default) + } + + if obj.obj.Ipv6 != nil { + + obj.Ipv6().validateObj(vObj, set_default) + } + +} + +func (obj *captureFilter) setDefault() { + var choices_set int = 0 + var choice CaptureFilterChoiceEnum + + if obj.obj.Custom != nil { + choices_set += 1 + choice = CaptureFilterChoice.CUSTOM + } + + if obj.obj.Ethernet != nil { + choices_set += 1 + choice = CaptureFilterChoice.ETHERNET + } + + if obj.obj.Vlan != nil { + choices_set += 1 + choice = CaptureFilterChoice.VLAN + } + + if obj.obj.Ipv4 != nil { + choices_set += 1 + choice = CaptureFilterChoice.IPV4 + } + + if obj.obj.Ipv6 != nil { + choices_set += 1 + choice = CaptureFilterChoice.IPV6 + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(CaptureFilterChoice.CUSTOM) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in CaptureFilter") + } + } else { + intVal := otg.CaptureFilter_Choice_Enum_value[string(choice)] + enumValue := otg.CaptureFilter_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/capture_ipv4.go b/gosnappi/capture_ipv4.go new file mode 100644 index 00000000..ddb14d31 --- /dev/null +++ b/gosnappi/capture_ipv4.go @@ -0,0 +1,887 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** CaptureIpv4 ***** +type captureIpv4 struct { + validation + obj *otg.CaptureIpv4 + marshaller marshalCaptureIpv4 + unMarshaller unMarshalCaptureIpv4 + versionHolder CaptureField + headerLengthHolder CaptureField + priorityHolder CaptureField + totalLengthHolder CaptureField + identificationHolder CaptureField + reservedHolder CaptureField + dontFragmentHolder CaptureField + moreFragmentsHolder CaptureField + fragmentOffsetHolder CaptureField + timeToLiveHolder CaptureField + protocolHolder CaptureField + headerChecksumHolder CaptureField + srcHolder CaptureField + dstHolder CaptureField +} + +func NewCaptureIpv4() CaptureIpv4 { + obj := captureIpv4{obj: &otg.CaptureIpv4{}} + obj.setDefault() + return &obj +} + +func (obj *captureIpv4) msg() *otg.CaptureIpv4 { + return obj.obj +} + +func (obj *captureIpv4) setMsg(msg *otg.CaptureIpv4) CaptureIpv4 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalcaptureIpv4 struct { + obj *captureIpv4 +} + +type marshalCaptureIpv4 interface { + // ToProto marshals CaptureIpv4 to protobuf object *otg.CaptureIpv4 + ToProto() (*otg.CaptureIpv4, error) + // ToPbText marshals CaptureIpv4 to protobuf text + ToPbText() (string, error) + // ToYaml marshals CaptureIpv4 to YAML text + ToYaml() (string, error) + // ToJson marshals CaptureIpv4 to JSON text + ToJson() (string, error) +} + +type unMarshalcaptureIpv4 struct { + obj *captureIpv4 +} + +type unMarshalCaptureIpv4 interface { + // FromProto unmarshals CaptureIpv4 from protobuf object *otg.CaptureIpv4 + FromProto(msg *otg.CaptureIpv4) (CaptureIpv4, error) + // FromPbText unmarshals CaptureIpv4 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals CaptureIpv4 from YAML text + FromYaml(value string) error + // FromJson unmarshals CaptureIpv4 from JSON text + FromJson(value string) error +} + +func (obj *captureIpv4) Marshal() marshalCaptureIpv4 { + if obj.marshaller == nil { + obj.marshaller = &marshalcaptureIpv4{obj: obj} + } + return obj.marshaller +} + +func (obj *captureIpv4) Unmarshal() unMarshalCaptureIpv4 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalcaptureIpv4{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalcaptureIpv4) ToProto() (*otg.CaptureIpv4, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalcaptureIpv4) FromProto(msg *otg.CaptureIpv4) (CaptureIpv4, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalcaptureIpv4) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalcaptureIpv4) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalcaptureIpv4) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureIpv4) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalcaptureIpv4) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureIpv4) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *captureIpv4) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *captureIpv4) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *captureIpv4) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *captureIpv4) Clone() (CaptureIpv4, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewCaptureIpv4() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *captureIpv4) setNil() { + obj.versionHolder = nil + obj.headerLengthHolder = nil + obj.priorityHolder = nil + obj.totalLengthHolder = nil + obj.identificationHolder = nil + obj.reservedHolder = nil + obj.dontFragmentHolder = nil + obj.moreFragmentsHolder = nil + obj.fragmentOffsetHolder = nil + obj.timeToLiveHolder = nil + obj.protocolHolder = nil + obj.headerChecksumHolder = nil + obj.srcHolder = nil + obj.dstHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// CaptureIpv4 is description is TBD +type CaptureIpv4 interface { + Validation + // msg marshals CaptureIpv4 to protobuf object *otg.CaptureIpv4 + // and doesn't set defaults + msg() *otg.CaptureIpv4 + // setMsg unmarshals CaptureIpv4 from protobuf object *otg.CaptureIpv4 + // and doesn't set defaults + setMsg(*otg.CaptureIpv4) CaptureIpv4 + // provides marshal interface + Marshal() marshalCaptureIpv4 + // provides unmarshal interface + Unmarshal() unMarshalCaptureIpv4 + // validate validates CaptureIpv4 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (CaptureIpv4, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Version returns CaptureField, set in CaptureIpv4. + // CaptureField is description is TBD + Version() CaptureField + // SetVersion assigns CaptureField provided by user to CaptureIpv4. + // CaptureField is description is TBD + SetVersion(value CaptureField) CaptureIpv4 + // HasVersion checks if Version has been set in CaptureIpv4 + HasVersion() bool + // HeaderLength returns CaptureField, set in CaptureIpv4. + // CaptureField is description is TBD + HeaderLength() CaptureField + // SetHeaderLength assigns CaptureField provided by user to CaptureIpv4. + // CaptureField is description is TBD + SetHeaderLength(value CaptureField) CaptureIpv4 + // HasHeaderLength checks if HeaderLength has been set in CaptureIpv4 + HasHeaderLength() bool + // Priority returns CaptureField, set in CaptureIpv4. + // CaptureField is description is TBD + Priority() CaptureField + // SetPriority assigns CaptureField provided by user to CaptureIpv4. + // CaptureField is description is TBD + SetPriority(value CaptureField) CaptureIpv4 + // HasPriority checks if Priority has been set in CaptureIpv4 + HasPriority() bool + // TotalLength returns CaptureField, set in CaptureIpv4. + // CaptureField is description is TBD + TotalLength() CaptureField + // SetTotalLength assigns CaptureField provided by user to CaptureIpv4. + // CaptureField is description is TBD + SetTotalLength(value CaptureField) CaptureIpv4 + // HasTotalLength checks if TotalLength has been set in CaptureIpv4 + HasTotalLength() bool + // Identification returns CaptureField, set in CaptureIpv4. + // CaptureField is description is TBD + Identification() CaptureField + // SetIdentification assigns CaptureField provided by user to CaptureIpv4. + // CaptureField is description is TBD + SetIdentification(value CaptureField) CaptureIpv4 + // HasIdentification checks if Identification has been set in CaptureIpv4 + HasIdentification() bool + // Reserved returns CaptureField, set in CaptureIpv4. + // CaptureField is description is TBD + Reserved() CaptureField + // SetReserved assigns CaptureField provided by user to CaptureIpv4. + // CaptureField is description is TBD + SetReserved(value CaptureField) CaptureIpv4 + // HasReserved checks if Reserved has been set in CaptureIpv4 + HasReserved() bool + // DontFragment returns CaptureField, set in CaptureIpv4. + // CaptureField is description is TBD + DontFragment() CaptureField + // SetDontFragment assigns CaptureField provided by user to CaptureIpv4. + // CaptureField is description is TBD + SetDontFragment(value CaptureField) CaptureIpv4 + // HasDontFragment checks if DontFragment has been set in CaptureIpv4 + HasDontFragment() bool + // MoreFragments returns CaptureField, set in CaptureIpv4. + // CaptureField is description is TBD + MoreFragments() CaptureField + // SetMoreFragments assigns CaptureField provided by user to CaptureIpv4. + // CaptureField is description is TBD + SetMoreFragments(value CaptureField) CaptureIpv4 + // HasMoreFragments checks if MoreFragments has been set in CaptureIpv4 + HasMoreFragments() bool + // FragmentOffset returns CaptureField, set in CaptureIpv4. + // CaptureField is description is TBD + FragmentOffset() CaptureField + // SetFragmentOffset assigns CaptureField provided by user to CaptureIpv4. + // CaptureField is description is TBD + SetFragmentOffset(value CaptureField) CaptureIpv4 + // HasFragmentOffset checks if FragmentOffset has been set in CaptureIpv4 + HasFragmentOffset() bool + // TimeToLive returns CaptureField, set in CaptureIpv4. + // CaptureField is description is TBD + TimeToLive() CaptureField + // SetTimeToLive assigns CaptureField provided by user to CaptureIpv4. + // CaptureField is description is TBD + SetTimeToLive(value CaptureField) CaptureIpv4 + // HasTimeToLive checks if TimeToLive has been set in CaptureIpv4 + HasTimeToLive() bool + // Protocol returns CaptureField, set in CaptureIpv4. + // CaptureField is description is TBD + Protocol() CaptureField + // SetProtocol assigns CaptureField provided by user to CaptureIpv4. + // CaptureField is description is TBD + SetProtocol(value CaptureField) CaptureIpv4 + // HasProtocol checks if Protocol has been set in CaptureIpv4 + HasProtocol() bool + // HeaderChecksum returns CaptureField, set in CaptureIpv4. + // CaptureField is description is TBD + HeaderChecksum() CaptureField + // SetHeaderChecksum assigns CaptureField provided by user to CaptureIpv4. + // CaptureField is description is TBD + SetHeaderChecksum(value CaptureField) CaptureIpv4 + // HasHeaderChecksum checks if HeaderChecksum has been set in CaptureIpv4 + HasHeaderChecksum() bool + // Src returns CaptureField, set in CaptureIpv4. + // CaptureField is description is TBD + Src() CaptureField + // SetSrc assigns CaptureField provided by user to CaptureIpv4. + // CaptureField is description is TBD + SetSrc(value CaptureField) CaptureIpv4 + // HasSrc checks if Src has been set in CaptureIpv4 + HasSrc() bool + // Dst returns CaptureField, set in CaptureIpv4. + // CaptureField is description is TBD + Dst() CaptureField + // SetDst assigns CaptureField provided by user to CaptureIpv4. + // CaptureField is description is TBD + SetDst(value CaptureField) CaptureIpv4 + // HasDst checks if Dst has been set in CaptureIpv4 + HasDst() bool + setNil() +} + +// description is TBD +// Version returns a CaptureField +func (obj *captureIpv4) Version() CaptureField { + if obj.obj.Version == nil { + obj.obj.Version = NewCaptureField().msg() + } + if obj.versionHolder == nil { + obj.versionHolder = &captureField{obj: obj.obj.Version} + } + return obj.versionHolder +} + +// description is TBD +// Version returns a CaptureField +func (obj *captureIpv4) HasVersion() bool { + return obj.obj.Version != nil +} + +// description is TBD +// SetVersion sets the CaptureField value in the CaptureIpv4 object +func (obj *captureIpv4) SetVersion(value CaptureField) CaptureIpv4 { + + obj.versionHolder = nil + obj.obj.Version = value.msg() + + return obj +} + +// description is TBD +// HeaderLength returns a CaptureField +func (obj *captureIpv4) HeaderLength() CaptureField { + if obj.obj.HeaderLength == nil { + obj.obj.HeaderLength = NewCaptureField().msg() + } + if obj.headerLengthHolder == nil { + obj.headerLengthHolder = &captureField{obj: obj.obj.HeaderLength} + } + return obj.headerLengthHolder +} + +// description is TBD +// HeaderLength returns a CaptureField +func (obj *captureIpv4) HasHeaderLength() bool { + return obj.obj.HeaderLength != nil +} + +// description is TBD +// SetHeaderLength sets the CaptureField value in the CaptureIpv4 object +func (obj *captureIpv4) SetHeaderLength(value CaptureField) CaptureIpv4 { + + obj.headerLengthHolder = nil + obj.obj.HeaderLength = value.msg() + + return obj +} + +// description is TBD +// Priority returns a CaptureField +func (obj *captureIpv4) Priority() CaptureField { + if obj.obj.Priority == nil { + obj.obj.Priority = NewCaptureField().msg() + } + if obj.priorityHolder == nil { + obj.priorityHolder = &captureField{obj: obj.obj.Priority} + } + return obj.priorityHolder +} + +// description is TBD +// Priority returns a CaptureField +func (obj *captureIpv4) HasPriority() bool { + return obj.obj.Priority != nil +} + +// description is TBD +// SetPriority sets the CaptureField value in the CaptureIpv4 object +func (obj *captureIpv4) SetPriority(value CaptureField) CaptureIpv4 { + + obj.priorityHolder = nil + obj.obj.Priority = value.msg() + + return obj +} + +// description is TBD +// TotalLength returns a CaptureField +func (obj *captureIpv4) TotalLength() CaptureField { + if obj.obj.TotalLength == nil { + obj.obj.TotalLength = NewCaptureField().msg() + } + if obj.totalLengthHolder == nil { + obj.totalLengthHolder = &captureField{obj: obj.obj.TotalLength} + } + return obj.totalLengthHolder +} + +// description is TBD +// TotalLength returns a CaptureField +func (obj *captureIpv4) HasTotalLength() bool { + return obj.obj.TotalLength != nil +} + +// description is TBD +// SetTotalLength sets the CaptureField value in the CaptureIpv4 object +func (obj *captureIpv4) SetTotalLength(value CaptureField) CaptureIpv4 { + + obj.totalLengthHolder = nil + obj.obj.TotalLength = value.msg() + + return obj +} + +// description is TBD +// Identification returns a CaptureField +func (obj *captureIpv4) Identification() CaptureField { + if obj.obj.Identification == nil { + obj.obj.Identification = NewCaptureField().msg() + } + if obj.identificationHolder == nil { + obj.identificationHolder = &captureField{obj: obj.obj.Identification} + } + return obj.identificationHolder +} + +// description is TBD +// Identification returns a CaptureField +func (obj *captureIpv4) HasIdentification() bool { + return obj.obj.Identification != nil +} + +// description is TBD +// SetIdentification sets the CaptureField value in the CaptureIpv4 object +func (obj *captureIpv4) SetIdentification(value CaptureField) CaptureIpv4 { + + obj.identificationHolder = nil + obj.obj.Identification = value.msg() + + return obj +} + +// description is TBD +// Reserved returns a CaptureField +func (obj *captureIpv4) Reserved() CaptureField { + if obj.obj.Reserved == nil { + obj.obj.Reserved = NewCaptureField().msg() + } + if obj.reservedHolder == nil { + obj.reservedHolder = &captureField{obj: obj.obj.Reserved} + } + return obj.reservedHolder +} + +// description is TBD +// Reserved returns a CaptureField +func (obj *captureIpv4) HasReserved() bool { + return obj.obj.Reserved != nil +} + +// description is TBD +// SetReserved sets the CaptureField value in the CaptureIpv4 object +func (obj *captureIpv4) SetReserved(value CaptureField) CaptureIpv4 { + + obj.reservedHolder = nil + obj.obj.Reserved = value.msg() + + return obj +} + +// description is TBD +// DontFragment returns a CaptureField +func (obj *captureIpv4) DontFragment() CaptureField { + if obj.obj.DontFragment == nil { + obj.obj.DontFragment = NewCaptureField().msg() + } + if obj.dontFragmentHolder == nil { + obj.dontFragmentHolder = &captureField{obj: obj.obj.DontFragment} + } + return obj.dontFragmentHolder +} + +// description is TBD +// DontFragment returns a CaptureField +func (obj *captureIpv4) HasDontFragment() bool { + return obj.obj.DontFragment != nil +} + +// description is TBD +// SetDontFragment sets the CaptureField value in the CaptureIpv4 object +func (obj *captureIpv4) SetDontFragment(value CaptureField) CaptureIpv4 { + + obj.dontFragmentHolder = nil + obj.obj.DontFragment = value.msg() + + return obj +} + +// description is TBD +// MoreFragments returns a CaptureField +func (obj *captureIpv4) MoreFragments() CaptureField { + if obj.obj.MoreFragments == nil { + obj.obj.MoreFragments = NewCaptureField().msg() + } + if obj.moreFragmentsHolder == nil { + obj.moreFragmentsHolder = &captureField{obj: obj.obj.MoreFragments} + } + return obj.moreFragmentsHolder +} + +// description is TBD +// MoreFragments returns a CaptureField +func (obj *captureIpv4) HasMoreFragments() bool { + return obj.obj.MoreFragments != nil +} + +// description is TBD +// SetMoreFragments sets the CaptureField value in the CaptureIpv4 object +func (obj *captureIpv4) SetMoreFragments(value CaptureField) CaptureIpv4 { + + obj.moreFragmentsHolder = nil + obj.obj.MoreFragments = value.msg() + + return obj +} + +// description is TBD +// FragmentOffset returns a CaptureField +func (obj *captureIpv4) FragmentOffset() CaptureField { + if obj.obj.FragmentOffset == nil { + obj.obj.FragmentOffset = NewCaptureField().msg() + } + if obj.fragmentOffsetHolder == nil { + obj.fragmentOffsetHolder = &captureField{obj: obj.obj.FragmentOffset} + } + return obj.fragmentOffsetHolder +} + +// description is TBD +// FragmentOffset returns a CaptureField +func (obj *captureIpv4) HasFragmentOffset() bool { + return obj.obj.FragmentOffset != nil +} + +// description is TBD +// SetFragmentOffset sets the CaptureField value in the CaptureIpv4 object +func (obj *captureIpv4) SetFragmentOffset(value CaptureField) CaptureIpv4 { + + obj.fragmentOffsetHolder = nil + obj.obj.FragmentOffset = value.msg() + + return obj +} + +// description is TBD +// TimeToLive returns a CaptureField +func (obj *captureIpv4) TimeToLive() CaptureField { + if obj.obj.TimeToLive == nil { + obj.obj.TimeToLive = NewCaptureField().msg() + } + if obj.timeToLiveHolder == nil { + obj.timeToLiveHolder = &captureField{obj: obj.obj.TimeToLive} + } + return obj.timeToLiveHolder +} + +// description is TBD +// TimeToLive returns a CaptureField +func (obj *captureIpv4) HasTimeToLive() bool { + return obj.obj.TimeToLive != nil +} + +// description is TBD +// SetTimeToLive sets the CaptureField value in the CaptureIpv4 object +func (obj *captureIpv4) SetTimeToLive(value CaptureField) CaptureIpv4 { + + obj.timeToLiveHolder = nil + obj.obj.TimeToLive = value.msg() + + return obj +} + +// description is TBD +// Protocol returns a CaptureField +func (obj *captureIpv4) Protocol() CaptureField { + if obj.obj.Protocol == nil { + obj.obj.Protocol = NewCaptureField().msg() + } + if obj.protocolHolder == nil { + obj.protocolHolder = &captureField{obj: obj.obj.Protocol} + } + return obj.protocolHolder +} + +// description is TBD +// Protocol returns a CaptureField +func (obj *captureIpv4) HasProtocol() bool { + return obj.obj.Protocol != nil +} + +// description is TBD +// SetProtocol sets the CaptureField value in the CaptureIpv4 object +func (obj *captureIpv4) SetProtocol(value CaptureField) CaptureIpv4 { + + obj.protocolHolder = nil + obj.obj.Protocol = value.msg() + + return obj +} + +// description is TBD +// HeaderChecksum returns a CaptureField +func (obj *captureIpv4) HeaderChecksum() CaptureField { + if obj.obj.HeaderChecksum == nil { + obj.obj.HeaderChecksum = NewCaptureField().msg() + } + if obj.headerChecksumHolder == nil { + obj.headerChecksumHolder = &captureField{obj: obj.obj.HeaderChecksum} + } + return obj.headerChecksumHolder +} + +// description is TBD +// HeaderChecksum returns a CaptureField +func (obj *captureIpv4) HasHeaderChecksum() bool { + return obj.obj.HeaderChecksum != nil +} + +// description is TBD +// SetHeaderChecksum sets the CaptureField value in the CaptureIpv4 object +func (obj *captureIpv4) SetHeaderChecksum(value CaptureField) CaptureIpv4 { + + obj.headerChecksumHolder = nil + obj.obj.HeaderChecksum = value.msg() + + return obj +} + +// description is TBD +// Src returns a CaptureField +func (obj *captureIpv4) Src() CaptureField { + if obj.obj.Src == nil { + obj.obj.Src = NewCaptureField().msg() + } + if obj.srcHolder == nil { + obj.srcHolder = &captureField{obj: obj.obj.Src} + } + return obj.srcHolder +} + +// description is TBD +// Src returns a CaptureField +func (obj *captureIpv4) HasSrc() bool { + return obj.obj.Src != nil +} + +// description is TBD +// SetSrc sets the CaptureField value in the CaptureIpv4 object +func (obj *captureIpv4) SetSrc(value CaptureField) CaptureIpv4 { + + obj.srcHolder = nil + obj.obj.Src = value.msg() + + return obj +} + +// description is TBD +// Dst returns a CaptureField +func (obj *captureIpv4) Dst() CaptureField { + if obj.obj.Dst == nil { + obj.obj.Dst = NewCaptureField().msg() + } + if obj.dstHolder == nil { + obj.dstHolder = &captureField{obj: obj.obj.Dst} + } + return obj.dstHolder +} + +// description is TBD +// Dst returns a CaptureField +func (obj *captureIpv4) HasDst() bool { + return obj.obj.Dst != nil +} + +// description is TBD +// SetDst sets the CaptureField value in the CaptureIpv4 object +func (obj *captureIpv4) SetDst(value CaptureField) CaptureIpv4 { + + obj.dstHolder = nil + obj.obj.Dst = value.msg() + + return obj +} + +func (obj *captureIpv4) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Version != nil { + + obj.Version().validateObj(vObj, set_default) + } + + if obj.obj.HeaderLength != nil { + + obj.HeaderLength().validateObj(vObj, set_default) + } + + if obj.obj.Priority != nil { + + obj.Priority().validateObj(vObj, set_default) + } + + if obj.obj.TotalLength != nil { + + obj.TotalLength().validateObj(vObj, set_default) + } + + if obj.obj.Identification != nil { + + obj.Identification().validateObj(vObj, set_default) + } + + if obj.obj.Reserved != nil { + + obj.Reserved().validateObj(vObj, set_default) + } + + if obj.obj.DontFragment != nil { + + obj.DontFragment().validateObj(vObj, set_default) + } + + if obj.obj.MoreFragments != nil { + + obj.MoreFragments().validateObj(vObj, set_default) + } + + if obj.obj.FragmentOffset != nil { + + obj.FragmentOffset().validateObj(vObj, set_default) + } + + if obj.obj.TimeToLive != nil { + + obj.TimeToLive().validateObj(vObj, set_default) + } + + if obj.obj.Protocol != nil { + + obj.Protocol().validateObj(vObj, set_default) + } + + if obj.obj.HeaderChecksum != nil { + + obj.HeaderChecksum().validateObj(vObj, set_default) + } + + if obj.obj.Src != nil { + + obj.Src().validateObj(vObj, set_default) + } + + if obj.obj.Dst != nil { + + obj.Dst().validateObj(vObj, set_default) + } + +} + +func (obj *captureIpv4) setDefault() { + +} diff --git a/gosnappi/capture_ipv6.go b/gosnappi/capture_ipv6.go new file mode 100644 index 00000000..b2ebd59c --- /dev/null +++ b/gosnappi/capture_ipv6.go @@ -0,0 +1,629 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** CaptureIpv6 ***** +type captureIpv6 struct { + validation + obj *otg.CaptureIpv6 + marshaller marshalCaptureIpv6 + unMarshaller unMarshalCaptureIpv6 + versionHolder CaptureField + trafficClassHolder CaptureField + flowLabelHolder CaptureField + payloadLengthHolder CaptureField + nextHeaderHolder CaptureField + hopLimitHolder CaptureField + srcHolder CaptureField + dstHolder CaptureField +} + +func NewCaptureIpv6() CaptureIpv6 { + obj := captureIpv6{obj: &otg.CaptureIpv6{}} + obj.setDefault() + return &obj +} + +func (obj *captureIpv6) msg() *otg.CaptureIpv6 { + return obj.obj +} + +func (obj *captureIpv6) setMsg(msg *otg.CaptureIpv6) CaptureIpv6 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalcaptureIpv6 struct { + obj *captureIpv6 +} + +type marshalCaptureIpv6 interface { + // ToProto marshals CaptureIpv6 to protobuf object *otg.CaptureIpv6 + ToProto() (*otg.CaptureIpv6, error) + // ToPbText marshals CaptureIpv6 to protobuf text + ToPbText() (string, error) + // ToYaml marshals CaptureIpv6 to YAML text + ToYaml() (string, error) + // ToJson marshals CaptureIpv6 to JSON text + ToJson() (string, error) +} + +type unMarshalcaptureIpv6 struct { + obj *captureIpv6 +} + +type unMarshalCaptureIpv6 interface { + // FromProto unmarshals CaptureIpv6 from protobuf object *otg.CaptureIpv6 + FromProto(msg *otg.CaptureIpv6) (CaptureIpv6, error) + // FromPbText unmarshals CaptureIpv6 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals CaptureIpv6 from YAML text + FromYaml(value string) error + // FromJson unmarshals CaptureIpv6 from JSON text + FromJson(value string) error +} + +func (obj *captureIpv6) Marshal() marshalCaptureIpv6 { + if obj.marshaller == nil { + obj.marshaller = &marshalcaptureIpv6{obj: obj} + } + return obj.marshaller +} + +func (obj *captureIpv6) Unmarshal() unMarshalCaptureIpv6 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalcaptureIpv6{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalcaptureIpv6) ToProto() (*otg.CaptureIpv6, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalcaptureIpv6) FromProto(msg *otg.CaptureIpv6) (CaptureIpv6, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalcaptureIpv6) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalcaptureIpv6) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalcaptureIpv6) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureIpv6) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalcaptureIpv6) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureIpv6) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *captureIpv6) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *captureIpv6) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *captureIpv6) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *captureIpv6) Clone() (CaptureIpv6, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewCaptureIpv6() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *captureIpv6) setNil() { + obj.versionHolder = nil + obj.trafficClassHolder = nil + obj.flowLabelHolder = nil + obj.payloadLengthHolder = nil + obj.nextHeaderHolder = nil + obj.hopLimitHolder = nil + obj.srcHolder = nil + obj.dstHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// CaptureIpv6 is description is TBD +type CaptureIpv6 interface { + Validation + // msg marshals CaptureIpv6 to protobuf object *otg.CaptureIpv6 + // and doesn't set defaults + msg() *otg.CaptureIpv6 + // setMsg unmarshals CaptureIpv6 from protobuf object *otg.CaptureIpv6 + // and doesn't set defaults + setMsg(*otg.CaptureIpv6) CaptureIpv6 + // provides marshal interface + Marshal() marshalCaptureIpv6 + // provides unmarshal interface + Unmarshal() unMarshalCaptureIpv6 + // validate validates CaptureIpv6 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (CaptureIpv6, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Version returns CaptureField, set in CaptureIpv6. + // CaptureField is description is TBD + Version() CaptureField + // SetVersion assigns CaptureField provided by user to CaptureIpv6. + // CaptureField is description is TBD + SetVersion(value CaptureField) CaptureIpv6 + // HasVersion checks if Version has been set in CaptureIpv6 + HasVersion() bool + // TrafficClass returns CaptureField, set in CaptureIpv6. + // CaptureField is description is TBD + TrafficClass() CaptureField + // SetTrafficClass assigns CaptureField provided by user to CaptureIpv6. + // CaptureField is description is TBD + SetTrafficClass(value CaptureField) CaptureIpv6 + // HasTrafficClass checks if TrafficClass has been set in CaptureIpv6 + HasTrafficClass() bool + // FlowLabel returns CaptureField, set in CaptureIpv6. + // CaptureField is description is TBD + FlowLabel() CaptureField + // SetFlowLabel assigns CaptureField provided by user to CaptureIpv6. + // CaptureField is description is TBD + SetFlowLabel(value CaptureField) CaptureIpv6 + // HasFlowLabel checks if FlowLabel has been set in CaptureIpv6 + HasFlowLabel() bool + // PayloadLength returns CaptureField, set in CaptureIpv6. + // CaptureField is description is TBD + PayloadLength() CaptureField + // SetPayloadLength assigns CaptureField provided by user to CaptureIpv6. + // CaptureField is description is TBD + SetPayloadLength(value CaptureField) CaptureIpv6 + // HasPayloadLength checks if PayloadLength has been set in CaptureIpv6 + HasPayloadLength() bool + // NextHeader returns CaptureField, set in CaptureIpv6. + // CaptureField is description is TBD + NextHeader() CaptureField + // SetNextHeader assigns CaptureField provided by user to CaptureIpv6. + // CaptureField is description is TBD + SetNextHeader(value CaptureField) CaptureIpv6 + // HasNextHeader checks if NextHeader has been set in CaptureIpv6 + HasNextHeader() bool + // HopLimit returns CaptureField, set in CaptureIpv6. + // CaptureField is description is TBD + HopLimit() CaptureField + // SetHopLimit assigns CaptureField provided by user to CaptureIpv6. + // CaptureField is description is TBD + SetHopLimit(value CaptureField) CaptureIpv6 + // HasHopLimit checks if HopLimit has been set in CaptureIpv6 + HasHopLimit() bool + // Src returns CaptureField, set in CaptureIpv6. + // CaptureField is description is TBD + Src() CaptureField + // SetSrc assigns CaptureField provided by user to CaptureIpv6. + // CaptureField is description is TBD + SetSrc(value CaptureField) CaptureIpv6 + // HasSrc checks if Src has been set in CaptureIpv6 + HasSrc() bool + // Dst returns CaptureField, set in CaptureIpv6. + // CaptureField is description is TBD + Dst() CaptureField + // SetDst assigns CaptureField provided by user to CaptureIpv6. + // CaptureField is description is TBD + SetDst(value CaptureField) CaptureIpv6 + // HasDst checks if Dst has been set in CaptureIpv6 + HasDst() bool + setNil() +} + +// description is TBD +// Version returns a CaptureField +func (obj *captureIpv6) Version() CaptureField { + if obj.obj.Version == nil { + obj.obj.Version = NewCaptureField().msg() + } + if obj.versionHolder == nil { + obj.versionHolder = &captureField{obj: obj.obj.Version} + } + return obj.versionHolder +} + +// description is TBD +// Version returns a CaptureField +func (obj *captureIpv6) HasVersion() bool { + return obj.obj.Version != nil +} + +// description is TBD +// SetVersion sets the CaptureField value in the CaptureIpv6 object +func (obj *captureIpv6) SetVersion(value CaptureField) CaptureIpv6 { + + obj.versionHolder = nil + obj.obj.Version = value.msg() + + return obj +} + +// description is TBD +// TrafficClass returns a CaptureField +func (obj *captureIpv6) TrafficClass() CaptureField { + if obj.obj.TrafficClass == nil { + obj.obj.TrafficClass = NewCaptureField().msg() + } + if obj.trafficClassHolder == nil { + obj.trafficClassHolder = &captureField{obj: obj.obj.TrafficClass} + } + return obj.trafficClassHolder +} + +// description is TBD +// TrafficClass returns a CaptureField +func (obj *captureIpv6) HasTrafficClass() bool { + return obj.obj.TrafficClass != nil +} + +// description is TBD +// SetTrafficClass sets the CaptureField value in the CaptureIpv6 object +func (obj *captureIpv6) SetTrafficClass(value CaptureField) CaptureIpv6 { + + obj.trafficClassHolder = nil + obj.obj.TrafficClass = value.msg() + + return obj +} + +// description is TBD +// FlowLabel returns a CaptureField +func (obj *captureIpv6) FlowLabel() CaptureField { + if obj.obj.FlowLabel == nil { + obj.obj.FlowLabel = NewCaptureField().msg() + } + if obj.flowLabelHolder == nil { + obj.flowLabelHolder = &captureField{obj: obj.obj.FlowLabel} + } + return obj.flowLabelHolder +} + +// description is TBD +// FlowLabel returns a CaptureField +func (obj *captureIpv6) HasFlowLabel() bool { + return obj.obj.FlowLabel != nil +} + +// description is TBD +// SetFlowLabel sets the CaptureField value in the CaptureIpv6 object +func (obj *captureIpv6) SetFlowLabel(value CaptureField) CaptureIpv6 { + + obj.flowLabelHolder = nil + obj.obj.FlowLabel = value.msg() + + return obj +} + +// description is TBD +// PayloadLength returns a CaptureField +func (obj *captureIpv6) PayloadLength() CaptureField { + if obj.obj.PayloadLength == nil { + obj.obj.PayloadLength = NewCaptureField().msg() + } + if obj.payloadLengthHolder == nil { + obj.payloadLengthHolder = &captureField{obj: obj.obj.PayloadLength} + } + return obj.payloadLengthHolder +} + +// description is TBD +// PayloadLength returns a CaptureField +func (obj *captureIpv6) HasPayloadLength() bool { + return obj.obj.PayloadLength != nil +} + +// description is TBD +// SetPayloadLength sets the CaptureField value in the CaptureIpv6 object +func (obj *captureIpv6) SetPayloadLength(value CaptureField) CaptureIpv6 { + + obj.payloadLengthHolder = nil + obj.obj.PayloadLength = value.msg() + + return obj +} + +// description is TBD +// NextHeader returns a CaptureField +func (obj *captureIpv6) NextHeader() CaptureField { + if obj.obj.NextHeader == nil { + obj.obj.NextHeader = NewCaptureField().msg() + } + if obj.nextHeaderHolder == nil { + obj.nextHeaderHolder = &captureField{obj: obj.obj.NextHeader} + } + return obj.nextHeaderHolder +} + +// description is TBD +// NextHeader returns a CaptureField +func (obj *captureIpv6) HasNextHeader() bool { + return obj.obj.NextHeader != nil +} + +// description is TBD +// SetNextHeader sets the CaptureField value in the CaptureIpv6 object +func (obj *captureIpv6) SetNextHeader(value CaptureField) CaptureIpv6 { + + obj.nextHeaderHolder = nil + obj.obj.NextHeader = value.msg() + + return obj +} + +// description is TBD +// HopLimit returns a CaptureField +func (obj *captureIpv6) HopLimit() CaptureField { + if obj.obj.HopLimit == nil { + obj.obj.HopLimit = NewCaptureField().msg() + } + if obj.hopLimitHolder == nil { + obj.hopLimitHolder = &captureField{obj: obj.obj.HopLimit} + } + return obj.hopLimitHolder +} + +// description is TBD +// HopLimit returns a CaptureField +func (obj *captureIpv6) HasHopLimit() bool { + return obj.obj.HopLimit != nil +} + +// description is TBD +// SetHopLimit sets the CaptureField value in the CaptureIpv6 object +func (obj *captureIpv6) SetHopLimit(value CaptureField) CaptureIpv6 { + + obj.hopLimitHolder = nil + obj.obj.HopLimit = value.msg() + + return obj +} + +// description is TBD +// Src returns a CaptureField +func (obj *captureIpv6) Src() CaptureField { + if obj.obj.Src == nil { + obj.obj.Src = NewCaptureField().msg() + } + if obj.srcHolder == nil { + obj.srcHolder = &captureField{obj: obj.obj.Src} + } + return obj.srcHolder +} + +// description is TBD +// Src returns a CaptureField +func (obj *captureIpv6) HasSrc() bool { + return obj.obj.Src != nil +} + +// description is TBD +// SetSrc sets the CaptureField value in the CaptureIpv6 object +func (obj *captureIpv6) SetSrc(value CaptureField) CaptureIpv6 { + + obj.srcHolder = nil + obj.obj.Src = value.msg() + + return obj +} + +// description is TBD +// Dst returns a CaptureField +func (obj *captureIpv6) Dst() CaptureField { + if obj.obj.Dst == nil { + obj.obj.Dst = NewCaptureField().msg() + } + if obj.dstHolder == nil { + obj.dstHolder = &captureField{obj: obj.obj.Dst} + } + return obj.dstHolder +} + +// description is TBD +// Dst returns a CaptureField +func (obj *captureIpv6) HasDst() bool { + return obj.obj.Dst != nil +} + +// description is TBD +// SetDst sets the CaptureField value in the CaptureIpv6 object +func (obj *captureIpv6) SetDst(value CaptureField) CaptureIpv6 { + + obj.dstHolder = nil + obj.obj.Dst = value.msg() + + return obj +} + +func (obj *captureIpv6) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Version != nil { + + obj.Version().validateObj(vObj, set_default) + } + + if obj.obj.TrafficClass != nil { + + obj.TrafficClass().validateObj(vObj, set_default) + } + + if obj.obj.FlowLabel != nil { + + obj.FlowLabel().validateObj(vObj, set_default) + } + + if obj.obj.PayloadLength != nil { + + obj.PayloadLength().validateObj(vObj, set_default) + } + + if obj.obj.NextHeader != nil { + + obj.NextHeader().validateObj(vObj, set_default) + } + + if obj.obj.HopLimit != nil { + + obj.HopLimit().validateObj(vObj, set_default) + } + + if obj.obj.Src != nil { + + obj.Src().validateObj(vObj, set_default) + } + + if obj.obj.Dst != nil { + + obj.Dst().validateObj(vObj, set_default) + } + +} + +func (obj *captureIpv6) setDefault() { + +} diff --git a/gosnappi/capture_request.go b/gosnappi/capture_request.go new file mode 100644 index 00000000..5cb38475 --- /dev/null +++ b/gosnappi/capture_request.go @@ -0,0 +1,316 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** CaptureRequest ***** +type captureRequest struct { + validation + obj *otg.CaptureRequest + marshaller marshalCaptureRequest + unMarshaller unMarshalCaptureRequest +} + +func NewCaptureRequest() CaptureRequest { + obj := captureRequest{obj: &otg.CaptureRequest{}} + obj.setDefault() + return &obj +} + +func (obj *captureRequest) msg() *otg.CaptureRequest { + return obj.obj +} + +func (obj *captureRequest) setMsg(msg *otg.CaptureRequest) CaptureRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalcaptureRequest struct { + obj *captureRequest +} + +type marshalCaptureRequest interface { + // ToProto marshals CaptureRequest to protobuf object *otg.CaptureRequest + ToProto() (*otg.CaptureRequest, error) + // ToPbText marshals CaptureRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals CaptureRequest to YAML text + ToYaml() (string, error) + // ToJson marshals CaptureRequest to JSON text + ToJson() (string, error) +} + +type unMarshalcaptureRequest struct { + obj *captureRequest +} + +type unMarshalCaptureRequest interface { + // FromProto unmarshals CaptureRequest from protobuf object *otg.CaptureRequest + FromProto(msg *otg.CaptureRequest) (CaptureRequest, error) + // FromPbText unmarshals CaptureRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals CaptureRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals CaptureRequest from JSON text + FromJson(value string) error +} + +func (obj *captureRequest) Marshal() marshalCaptureRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalcaptureRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *captureRequest) Unmarshal() unMarshalCaptureRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalcaptureRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalcaptureRequest) ToProto() (*otg.CaptureRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalcaptureRequest) FromProto(msg *otg.CaptureRequest) (CaptureRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalcaptureRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalcaptureRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalcaptureRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalcaptureRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *captureRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *captureRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *captureRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *captureRequest) Clone() (CaptureRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewCaptureRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// CaptureRequest is the capture result request to the traffic generator. Stops the port capture on the port_name and returns the capture. +type CaptureRequest interface { + Validation + // msg marshals CaptureRequest to protobuf object *otg.CaptureRequest + // and doesn't set defaults + msg() *otg.CaptureRequest + // setMsg unmarshals CaptureRequest from protobuf object *otg.CaptureRequest + // and doesn't set defaults + setMsg(*otg.CaptureRequest) CaptureRequest + // provides marshal interface + Marshal() marshalCaptureRequest + // provides unmarshal interface + Unmarshal() unMarshalCaptureRequest + // validate validates CaptureRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (CaptureRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PortName returns string, set in CaptureRequest. + PortName() string + // SetPortName assigns string provided by user to CaptureRequest + SetPortName(value string) CaptureRequest +} + +// The name of a port a capture is started on. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// PortName returns a string +func (obj *captureRequest) PortName() string { + + return *obj.obj.PortName + +} + +// The name of a port a capture is started on. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// SetPortName sets the string value in the CaptureRequest object +func (obj *captureRequest) SetPortName(value string) CaptureRequest { + + obj.obj.PortName = &value + return obj +} + +func (obj *captureRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // PortName is required + if obj.obj.PortName == nil { + vObj.validationErrors = append(vObj.validationErrors, "PortName is required field on interface CaptureRequest") + } +} + +func (obj *captureRequest) setDefault() { + +} diff --git a/gosnappi/capture_vlan.go b/gosnappi/capture_vlan.go new file mode 100644 index 00000000..43976d9b --- /dev/null +++ b/gosnappi/capture_vlan.go @@ -0,0 +1,457 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** CaptureVlan ***** +type captureVlan struct { + validation + obj *otg.CaptureVlan + marshaller marshalCaptureVlan + unMarshaller unMarshalCaptureVlan + priorityHolder CaptureField + cfiHolder CaptureField + idHolder CaptureField + protocolHolder CaptureField +} + +func NewCaptureVlan() CaptureVlan { + obj := captureVlan{obj: &otg.CaptureVlan{}} + obj.setDefault() + return &obj +} + +func (obj *captureVlan) msg() *otg.CaptureVlan { + return obj.obj +} + +func (obj *captureVlan) setMsg(msg *otg.CaptureVlan) CaptureVlan { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalcaptureVlan struct { + obj *captureVlan +} + +type marshalCaptureVlan interface { + // ToProto marshals CaptureVlan to protobuf object *otg.CaptureVlan + ToProto() (*otg.CaptureVlan, error) + // ToPbText marshals CaptureVlan to protobuf text + ToPbText() (string, error) + // ToYaml marshals CaptureVlan to YAML text + ToYaml() (string, error) + // ToJson marshals CaptureVlan to JSON text + ToJson() (string, error) +} + +type unMarshalcaptureVlan struct { + obj *captureVlan +} + +type unMarshalCaptureVlan interface { + // FromProto unmarshals CaptureVlan from protobuf object *otg.CaptureVlan + FromProto(msg *otg.CaptureVlan) (CaptureVlan, error) + // FromPbText unmarshals CaptureVlan from protobuf text + FromPbText(value string) error + // FromYaml unmarshals CaptureVlan from YAML text + FromYaml(value string) error + // FromJson unmarshals CaptureVlan from JSON text + FromJson(value string) error +} + +func (obj *captureVlan) Marshal() marshalCaptureVlan { + if obj.marshaller == nil { + obj.marshaller = &marshalcaptureVlan{obj: obj} + } + return obj.marshaller +} + +func (obj *captureVlan) Unmarshal() unMarshalCaptureVlan { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalcaptureVlan{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalcaptureVlan) ToProto() (*otg.CaptureVlan, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalcaptureVlan) FromProto(msg *otg.CaptureVlan) (CaptureVlan, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalcaptureVlan) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalcaptureVlan) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalcaptureVlan) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureVlan) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalcaptureVlan) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcaptureVlan) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *captureVlan) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *captureVlan) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *captureVlan) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *captureVlan) Clone() (CaptureVlan, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewCaptureVlan() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *captureVlan) setNil() { + obj.priorityHolder = nil + obj.cfiHolder = nil + obj.idHolder = nil + obj.protocolHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// CaptureVlan is description is TBD +type CaptureVlan interface { + Validation + // msg marshals CaptureVlan to protobuf object *otg.CaptureVlan + // and doesn't set defaults + msg() *otg.CaptureVlan + // setMsg unmarshals CaptureVlan from protobuf object *otg.CaptureVlan + // and doesn't set defaults + setMsg(*otg.CaptureVlan) CaptureVlan + // provides marshal interface + Marshal() marshalCaptureVlan + // provides unmarshal interface + Unmarshal() unMarshalCaptureVlan + // validate validates CaptureVlan + validate() error + // A stringer function + String() string + // Clones the object + Clone() (CaptureVlan, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Priority returns CaptureField, set in CaptureVlan. + // CaptureField is description is TBD + Priority() CaptureField + // SetPriority assigns CaptureField provided by user to CaptureVlan. + // CaptureField is description is TBD + SetPriority(value CaptureField) CaptureVlan + // HasPriority checks if Priority has been set in CaptureVlan + HasPriority() bool + // Cfi returns CaptureField, set in CaptureVlan. + // CaptureField is description is TBD + Cfi() CaptureField + // SetCfi assigns CaptureField provided by user to CaptureVlan. + // CaptureField is description is TBD + SetCfi(value CaptureField) CaptureVlan + // HasCfi checks if Cfi has been set in CaptureVlan + HasCfi() bool + // Id returns CaptureField, set in CaptureVlan. + // CaptureField is description is TBD + Id() CaptureField + // SetId assigns CaptureField provided by user to CaptureVlan. + // CaptureField is description is TBD + SetId(value CaptureField) CaptureVlan + // HasId checks if Id has been set in CaptureVlan + HasId() bool + // Protocol returns CaptureField, set in CaptureVlan. + // CaptureField is description is TBD + Protocol() CaptureField + // SetProtocol assigns CaptureField provided by user to CaptureVlan. + // CaptureField is description is TBD + SetProtocol(value CaptureField) CaptureVlan + // HasProtocol checks if Protocol has been set in CaptureVlan + HasProtocol() bool + setNil() +} + +// description is TBD +// Priority returns a CaptureField +func (obj *captureVlan) Priority() CaptureField { + if obj.obj.Priority == nil { + obj.obj.Priority = NewCaptureField().msg() + } + if obj.priorityHolder == nil { + obj.priorityHolder = &captureField{obj: obj.obj.Priority} + } + return obj.priorityHolder +} + +// description is TBD +// Priority returns a CaptureField +func (obj *captureVlan) HasPriority() bool { + return obj.obj.Priority != nil +} + +// description is TBD +// SetPriority sets the CaptureField value in the CaptureVlan object +func (obj *captureVlan) SetPriority(value CaptureField) CaptureVlan { + + obj.priorityHolder = nil + obj.obj.Priority = value.msg() + + return obj +} + +// description is TBD +// Cfi returns a CaptureField +func (obj *captureVlan) Cfi() CaptureField { + if obj.obj.Cfi == nil { + obj.obj.Cfi = NewCaptureField().msg() + } + if obj.cfiHolder == nil { + obj.cfiHolder = &captureField{obj: obj.obj.Cfi} + } + return obj.cfiHolder +} + +// description is TBD +// Cfi returns a CaptureField +func (obj *captureVlan) HasCfi() bool { + return obj.obj.Cfi != nil +} + +// description is TBD +// SetCfi sets the CaptureField value in the CaptureVlan object +func (obj *captureVlan) SetCfi(value CaptureField) CaptureVlan { + + obj.cfiHolder = nil + obj.obj.Cfi = value.msg() + + return obj +} + +// description is TBD +// Id returns a CaptureField +func (obj *captureVlan) Id() CaptureField { + if obj.obj.Id == nil { + obj.obj.Id = NewCaptureField().msg() + } + if obj.idHolder == nil { + obj.idHolder = &captureField{obj: obj.obj.Id} + } + return obj.idHolder +} + +// description is TBD +// Id returns a CaptureField +func (obj *captureVlan) HasId() bool { + return obj.obj.Id != nil +} + +// description is TBD +// SetId sets the CaptureField value in the CaptureVlan object +func (obj *captureVlan) SetId(value CaptureField) CaptureVlan { + + obj.idHolder = nil + obj.obj.Id = value.msg() + + return obj +} + +// description is TBD +// Protocol returns a CaptureField +func (obj *captureVlan) Protocol() CaptureField { + if obj.obj.Protocol == nil { + obj.obj.Protocol = NewCaptureField().msg() + } + if obj.protocolHolder == nil { + obj.protocolHolder = &captureField{obj: obj.obj.Protocol} + } + return obj.protocolHolder +} + +// description is TBD +// Protocol returns a CaptureField +func (obj *captureVlan) HasProtocol() bool { + return obj.obj.Protocol != nil +} + +// description is TBD +// SetProtocol sets the CaptureField value in the CaptureVlan object +func (obj *captureVlan) SetProtocol(value CaptureField) CaptureVlan { + + obj.protocolHolder = nil + obj.obj.Protocol = value.msg() + + return obj +} + +func (obj *captureVlan) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Priority != nil { + + obj.Priority().validateObj(vObj, set_default) + } + + if obj.obj.Cfi != nil { + + obj.Cfi().validateObj(vObj, set_default) + } + + if obj.obj.Id != nil { + + obj.Id().validateObj(vObj, set_default) + } + + if obj.obj.Protocol != nil { + + obj.Protocol().validateObj(vObj, set_default) + } + +} + +func (obj *captureVlan) setDefault() { + +} diff --git a/gosnappi/config.go b/gosnappi/config.go new file mode 100644 index 00000000..0a2d4a96 --- /dev/null +++ b/gosnappi/config.go @@ -0,0 +1,1110 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Config ***** +type config struct { + validation + obj *otg.Config + marshaller marshalConfig + unMarshaller unMarshalConfig + portsHolder ConfigPortIter + lagsHolder ConfigLagIter + layer1Holder ConfigLayer1Iter + capturesHolder ConfigCaptureIter + devicesHolder ConfigDeviceIter + flowsHolder ConfigFlowIter + eventsHolder Event + optionsHolder ConfigOptions + lldpHolder ConfigLldpIter +} + +func NewConfig() Config { + obj := config{obj: &otg.Config{}} + obj.setDefault() + return &obj +} + +func (obj *config) msg() *otg.Config { + return obj.obj +} + +func (obj *config) setMsg(msg *otg.Config) Config { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalconfig struct { + obj *config +} + +type marshalConfig interface { + // ToProto marshals Config to protobuf object *otg.Config + ToProto() (*otg.Config, error) + // ToPbText marshals Config to protobuf text + ToPbText() (string, error) + // ToYaml marshals Config to YAML text + ToYaml() (string, error) + // ToJson marshals Config to JSON text + ToJson() (string, error) +} + +type unMarshalconfig struct { + obj *config +} + +type unMarshalConfig interface { + // FromProto unmarshals Config from protobuf object *otg.Config + FromProto(msg *otg.Config) (Config, error) + // FromPbText unmarshals Config from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Config from YAML text + FromYaml(value string) error + // FromJson unmarshals Config from JSON text + FromJson(value string) error +} + +func (obj *config) Marshal() marshalConfig { + if obj.marshaller == nil { + obj.marshaller = &marshalconfig{obj: obj} + } + return obj.marshaller +} + +func (obj *config) Unmarshal() unMarshalConfig { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalconfig{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalconfig) ToProto() (*otg.Config, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalconfig) FromProto(msg *otg.Config) (Config, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalconfig) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalconfig) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalconfig) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalconfig) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalconfig) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalconfig) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *config) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *config) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *config) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *config) Clone() (Config, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewConfig() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *config) setNil() { + obj.portsHolder = nil + obj.lagsHolder = nil + obj.layer1Holder = nil + obj.capturesHolder = nil + obj.devicesHolder = nil + obj.flowsHolder = nil + obj.eventsHolder = nil + obj.optionsHolder = nil + obj.lldpHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Config is a container for all models that are part of the configuration. +type Config interface { + Validation + // msg marshals Config to protobuf object *otg.Config + // and doesn't set defaults + msg() *otg.Config + // setMsg unmarshals Config from protobuf object *otg.Config + // and doesn't set defaults + setMsg(*otg.Config) Config + // provides marshal interface + Marshal() marshalConfig + // provides unmarshal interface + Unmarshal() unMarshalConfig + // validate validates Config + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Config, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ports returns ConfigPortIterIter, set in Config + Ports() ConfigPortIter + // Lags returns ConfigLagIterIter, set in Config + Lags() ConfigLagIter + // Layer1 returns ConfigLayer1IterIter, set in Config + Layer1() ConfigLayer1Iter + // Captures returns ConfigCaptureIterIter, set in Config + Captures() ConfigCaptureIter + // Devices returns ConfigDeviceIterIter, set in Config + Devices() ConfigDeviceIter + // Flows returns ConfigFlowIterIter, set in Config + Flows() ConfigFlowIter + // Events returns Event, set in Config. + // Event is the optional container for event configuration. + Events() Event + // SetEvents assigns Event provided by user to Config. + // Event is the optional container for event configuration. + SetEvents(value Event) Config + // HasEvents checks if Events has been set in Config + HasEvents() bool + // Options returns ConfigOptions, set in Config. + // ConfigOptions is global configuration options. + Options() ConfigOptions + // SetOptions assigns ConfigOptions provided by user to Config. + // ConfigOptions is global configuration options. + SetOptions(value ConfigOptions) Config + // HasOptions checks if Options has been set in Config + HasOptions() bool + // Lldp returns ConfigLldpIterIter, set in Config + Lldp() ConfigLldpIter + setNil() +} + +// The ports that will be configured on the traffic generator. +// Ports returns a []Port +func (obj *config) Ports() ConfigPortIter { + if len(obj.obj.Ports) == 0 { + obj.obj.Ports = []*otg.Port{} + } + if obj.portsHolder == nil { + obj.portsHolder = newConfigPortIter(&obj.obj.Ports).setMsg(obj) + } + return obj.portsHolder +} + +type configPortIter struct { + obj *config + portSlice []Port + fieldPtr *[]*otg.Port +} + +func newConfigPortIter(ptr *[]*otg.Port) ConfigPortIter { + return &configPortIter{fieldPtr: ptr} +} + +type ConfigPortIter interface { + setMsg(*config) ConfigPortIter + Items() []Port + Add() Port + Append(items ...Port) ConfigPortIter + Set(index int, newObj Port) ConfigPortIter + Clear() ConfigPortIter + clearHolderSlice() ConfigPortIter + appendHolderSlice(item Port) ConfigPortIter +} + +func (obj *configPortIter) setMsg(msg *config) ConfigPortIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&port{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *configPortIter) Items() []Port { + return obj.portSlice +} + +func (obj *configPortIter) Add() Port { + newObj := &otg.Port{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &port{obj: newObj} + newLibObj.setDefault() + obj.portSlice = append(obj.portSlice, newLibObj) + return newLibObj +} + +func (obj *configPortIter) Append(items ...Port) ConfigPortIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.portSlice = append(obj.portSlice, item) + } + return obj +} + +func (obj *configPortIter) Set(index int, newObj Port) ConfigPortIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.portSlice[index] = newObj + return obj +} +func (obj *configPortIter) Clear() ConfigPortIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Port{} + obj.portSlice = []Port{} + } + return obj +} +func (obj *configPortIter) clearHolderSlice() ConfigPortIter { + if len(obj.portSlice) > 0 { + obj.portSlice = []Port{} + } + return obj +} +func (obj *configPortIter) appendHolderSlice(item Port) ConfigPortIter { + obj.portSlice = append(obj.portSlice, item) + return obj +} + +// The LAGs that will be configured on the traffic generator. +// Lags returns a []Lag +func (obj *config) Lags() ConfigLagIter { + if len(obj.obj.Lags) == 0 { + obj.obj.Lags = []*otg.Lag{} + } + if obj.lagsHolder == nil { + obj.lagsHolder = newConfigLagIter(&obj.obj.Lags).setMsg(obj) + } + return obj.lagsHolder +} + +type configLagIter struct { + obj *config + lagSlice []Lag + fieldPtr *[]*otg.Lag +} + +func newConfigLagIter(ptr *[]*otg.Lag) ConfigLagIter { + return &configLagIter{fieldPtr: ptr} +} + +type ConfigLagIter interface { + setMsg(*config) ConfigLagIter + Items() []Lag + Add() Lag + Append(items ...Lag) ConfigLagIter + Set(index int, newObj Lag) ConfigLagIter + Clear() ConfigLagIter + clearHolderSlice() ConfigLagIter + appendHolderSlice(item Lag) ConfigLagIter +} + +func (obj *configLagIter) setMsg(msg *config) ConfigLagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&lag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *configLagIter) Items() []Lag { + return obj.lagSlice +} + +func (obj *configLagIter) Add() Lag { + newObj := &otg.Lag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &lag{obj: newObj} + newLibObj.setDefault() + obj.lagSlice = append(obj.lagSlice, newLibObj) + return newLibObj +} + +func (obj *configLagIter) Append(items ...Lag) ConfigLagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.lagSlice = append(obj.lagSlice, item) + } + return obj +} + +func (obj *configLagIter) Set(index int, newObj Lag) ConfigLagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.lagSlice[index] = newObj + return obj +} +func (obj *configLagIter) Clear() ConfigLagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Lag{} + obj.lagSlice = []Lag{} + } + return obj +} +func (obj *configLagIter) clearHolderSlice() ConfigLagIter { + if len(obj.lagSlice) > 0 { + obj.lagSlice = []Lag{} + } + return obj +} +func (obj *configLagIter) appendHolderSlice(item Lag) ConfigLagIter { + obj.lagSlice = append(obj.lagSlice, item) + return obj +} + +// The layer1 settings that will be configured on the traffic generator. +// Since layer1 settings usually vary across variety of test ports, these +// most likely won't be portable. +// Layer1 returns a []Layer1 +func (obj *config) Layer1() ConfigLayer1Iter { + if len(obj.obj.Layer1) == 0 { + obj.obj.Layer1 = []*otg.Layer1{} + } + if obj.layer1Holder == nil { + obj.layer1Holder = newConfigLayer1Iter(&obj.obj.Layer1).setMsg(obj) + } + return obj.layer1Holder +} + +type configLayer1Iter struct { + obj *config + layer1Slice []Layer1 + fieldPtr *[]*otg.Layer1 +} + +func newConfigLayer1Iter(ptr *[]*otg.Layer1) ConfigLayer1Iter { + return &configLayer1Iter{fieldPtr: ptr} +} + +type ConfigLayer1Iter interface { + setMsg(*config) ConfigLayer1Iter + Items() []Layer1 + Add() Layer1 + Append(items ...Layer1) ConfigLayer1Iter + Set(index int, newObj Layer1) ConfigLayer1Iter + Clear() ConfigLayer1Iter + clearHolderSlice() ConfigLayer1Iter + appendHolderSlice(item Layer1) ConfigLayer1Iter +} + +func (obj *configLayer1Iter) setMsg(msg *config) ConfigLayer1Iter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&layer1{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *configLayer1Iter) Items() []Layer1 { + return obj.layer1Slice +} + +func (obj *configLayer1Iter) Add() Layer1 { + newObj := &otg.Layer1{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &layer1{obj: newObj} + newLibObj.setDefault() + obj.layer1Slice = append(obj.layer1Slice, newLibObj) + return newLibObj +} + +func (obj *configLayer1Iter) Append(items ...Layer1) ConfigLayer1Iter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.layer1Slice = append(obj.layer1Slice, item) + } + return obj +} + +func (obj *configLayer1Iter) Set(index int, newObj Layer1) ConfigLayer1Iter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.layer1Slice[index] = newObj + return obj +} +func (obj *configLayer1Iter) Clear() ConfigLayer1Iter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Layer1{} + obj.layer1Slice = []Layer1{} + } + return obj +} +func (obj *configLayer1Iter) clearHolderSlice() ConfigLayer1Iter { + if len(obj.layer1Slice) > 0 { + obj.layer1Slice = []Layer1{} + } + return obj +} +func (obj *configLayer1Iter) appendHolderSlice(item Layer1) ConfigLayer1Iter { + obj.layer1Slice = append(obj.layer1Slice, item) + return obj +} + +// The capture settings that will be configured on the traffic generator. +// Captures returns a []Capture +func (obj *config) Captures() ConfigCaptureIter { + if len(obj.obj.Captures) == 0 { + obj.obj.Captures = []*otg.Capture{} + } + if obj.capturesHolder == nil { + obj.capturesHolder = newConfigCaptureIter(&obj.obj.Captures).setMsg(obj) + } + return obj.capturesHolder +} + +type configCaptureIter struct { + obj *config + captureSlice []Capture + fieldPtr *[]*otg.Capture +} + +func newConfigCaptureIter(ptr *[]*otg.Capture) ConfigCaptureIter { + return &configCaptureIter{fieldPtr: ptr} +} + +type ConfigCaptureIter interface { + setMsg(*config) ConfigCaptureIter + Items() []Capture + Add() Capture + Append(items ...Capture) ConfigCaptureIter + Set(index int, newObj Capture) ConfigCaptureIter + Clear() ConfigCaptureIter + clearHolderSlice() ConfigCaptureIter + appendHolderSlice(item Capture) ConfigCaptureIter +} + +func (obj *configCaptureIter) setMsg(msg *config) ConfigCaptureIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&capture{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *configCaptureIter) Items() []Capture { + return obj.captureSlice +} + +func (obj *configCaptureIter) Add() Capture { + newObj := &otg.Capture{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &capture{obj: newObj} + newLibObj.setDefault() + obj.captureSlice = append(obj.captureSlice, newLibObj) + return newLibObj +} + +func (obj *configCaptureIter) Append(items ...Capture) ConfigCaptureIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.captureSlice = append(obj.captureSlice, item) + } + return obj +} + +func (obj *configCaptureIter) Set(index int, newObj Capture) ConfigCaptureIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.captureSlice[index] = newObj + return obj +} +func (obj *configCaptureIter) Clear() ConfigCaptureIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Capture{} + obj.captureSlice = []Capture{} + } + return obj +} +func (obj *configCaptureIter) clearHolderSlice() ConfigCaptureIter { + if len(obj.captureSlice) > 0 { + obj.captureSlice = []Capture{} + } + return obj +} +func (obj *configCaptureIter) appendHolderSlice(item Capture) ConfigCaptureIter { + obj.captureSlice = append(obj.captureSlice, item) + return obj +} + +// The emulated devices that will be configured on the traffic generator. +// Each device contains configurations for network interfaces and +// protocols running on top of those interfaces. +// Devices returns a []Device +func (obj *config) Devices() ConfigDeviceIter { + if len(obj.obj.Devices) == 0 { + obj.obj.Devices = []*otg.Device{} + } + if obj.devicesHolder == nil { + obj.devicesHolder = newConfigDeviceIter(&obj.obj.Devices).setMsg(obj) + } + return obj.devicesHolder +} + +type configDeviceIter struct { + obj *config + deviceSlice []Device + fieldPtr *[]*otg.Device +} + +func newConfigDeviceIter(ptr *[]*otg.Device) ConfigDeviceIter { + return &configDeviceIter{fieldPtr: ptr} +} + +type ConfigDeviceIter interface { + setMsg(*config) ConfigDeviceIter + Items() []Device + Add() Device + Append(items ...Device) ConfigDeviceIter + Set(index int, newObj Device) ConfigDeviceIter + Clear() ConfigDeviceIter + clearHolderSlice() ConfigDeviceIter + appendHolderSlice(item Device) ConfigDeviceIter +} + +func (obj *configDeviceIter) setMsg(msg *config) ConfigDeviceIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&device{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *configDeviceIter) Items() []Device { + return obj.deviceSlice +} + +func (obj *configDeviceIter) Add() Device { + newObj := &otg.Device{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &device{obj: newObj} + newLibObj.setDefault() + obj.deviceSlice = append(obj.deviceSlice, newLibObj) + return newLibObj +} + +func (obj *configDeviceIter) Append(items ...Device) ConfigDeviceIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.deviceSlice = append(obj.deviceSlice, item) + } + return obj +} + +func (obj *configDeviceIter) Set(index int, newObj Device) ConfigDeviceIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.deviceSlice[index] = newObj + return obj +} +func (obj *configDeviceIter) Clear() ConfigDeviceIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Device{} + obj.deviceSlice = []Device{} + } + return obj +} +func (obj *configDeviceIter) clearHolderSlice() ConfigDeviceIter { + if len(obj.deviceSlice) > 0 { + obj.deviceSlice = []Device{} + } + return obj +} +func (obj *configDeviceIter) appendHolderSlice(item Device) ConfigDeviceIter { + obj.deviceSlice = append(obj.deviceSlice, item) + return obj +} + +// The flows that will be configured on the traffic generator. +// Flows returns a []Flow +func (obj *config) Flows() ConfigFlowIter { + if len(obj.obj.Flows) == 0 { + obj.obj.Flows = []*otg.Flow{} + } + if obj.flowsHolder == nil { + obj.flowsHolder = newConfigFlowIter(&obj.obj.Flows).setMsg(obj) + } + return obj.flowsHolder +} + +type configFlowIter struct { + obj *config + flowSlice []Flow + fieldPtr *[]*otg.Flow +} + +func newConfigFlowIter(ptr *[]*otg.Flow) ConfigFlowIter { + return &configFlowIter{fieldPtr: ptr} +} + +type ConfigFlowIter interface { + setMsg(*config) ConfigFlowIter + Items() []Flow + Add() Flow + Append(items ...Flow) ConfigFlowIter + Set(index int, newObj Flow) ConfigFlowIter + Clear() ConfigFlowIter + clearHolderSlice() ConfigFlowIter + appendHolderSlice(item Flow) ConfigFlowIter +} + +func (obj *configFlowIter) setMsg(msg *config) ConfigFlowIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flow{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *configFlowIter) Items() []Flow { + return obj.flowSlice +} + +func (obj *configFlowIter) Add() Flow { + newObj := &otg.Flow{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flow{obj: newObj} + newLibObj.setDefault() + obj.flowSlice = append(obj.flowSlice, newLibObj) + return newLibObj +} + +func (obj *configFlowIter) Append(items ...Flow) ConfigFlowIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowSlice = append(obj.flowSlice, item) + } + return obj +} + +func (obj *configFlowIter) Set(index int, newObj Flow) ConfigFlowIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowSlice[index] = newObj + return obj +} +func (obj *configFlowIter) Clear() ConfigFlowIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Flow{} + obj.flowSlice = []Flow{} + } + return obj +} +func (obj *configFlowIter) clearHolderSlice() ConfigFlowIter { + if len(obj.flowSlice) > 0 { + obj.flowSlice = []Flow{} + } + return obj +} +func (obj *configFlowIter) appendHolderSlice(item Flow) ConfigFlowIter { + obj.flowSlice = append(obj.flowSlice, item) + return obj +} + +// description is TBD +// Events returns a Event +func (obj *config) Events() Event { + if obj.obj.Events == nil { + obj.obj.Events = NewEvent().msg() + } + if obj.eventsHolder == nil { + obj.eventsHolder = &event{obj: obj.obj.Events} + } + return obj.eventsHolder +} + +// description is TBD +// Events returns a Event +func (obj *config) HasEvents() bool { + return obj.obj.Events != nil +} + +// description is TBD +// SetEvents sets the Event value in the Config object +func (obj *config) SetEvents(value Event) Config { + + obj.eventsHolder = nil + obj.obj.Events = value.msg() + + return obj +} + +// description is TBD +// Options returns a ConfigOptions +func (obj *config) Options() ConfigOptions { + if obj.obj.Options == nil { + obj.obj.Options = NewConfigOptions().msg() + } + if obj.optionsHolder == nil { + obj.optionsHolder = &configOptions{obj: obj.obj.Options} + } + return obj.optionsHolder +} + +// description is TBD +// Options returns a ConfigOptions +func (obj *config) HasOptions() bool { + return obj.obj.Options != nil +} + +// description is TBD +// SetOptions sets the ConfigOptions value in the Config object +func (obj *config) SetOptions(value ConfigOptions) Config { + + obj.optionsHolder = nil + obj.obj.Options = value.msg() + + return obj +} + +// LLDP protocol that will be configured on traffic generator. +// Lldp returns a []Lldp +func (obj *config) Lldp() ConfigLldpIter { + if len(obj.obj.Lldp) == 0 { + obj.obj.Lldp = []*otg.Lldp{} + } + if obj.lldpHolder == nil { + obj.lldpHolder = newConfigLldpIter(&obj.obj.Lldp).setMsg(obj) + } + return obj.lldpHolder +} + +type configLldpIter struct { + obj *config + lldpSlice []Lldp + fieldPtr *[]*otg.Lldp +} + +func newConfigLldpIter(ptr *[]*otg.Lldp) ConfigLldpIter { + return &configLldpIter{fieldPtr: ptr} +} + +type ConfigLldpIter interface { + setMsg(*config) ConfigLldpIter + Items() []Lldp + Add() Lldp + Append(items ...Lldp) ConfigLldpIter + Set(index int, newObj Lldp) ConfigLldpIter + Clear() ConfigLldpIter + clearHolderSlice() ConfigLldpIter + appendHolderSlice(item Lldp) ConfigLldpIter +} + +func (obj *configLldpIter) setMsg(msg *config) ConfigLldpIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&lldp{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *configLldpIter) Items() []Lldp { + return obj.lldpSlice +} + +func (obj *configLldpIter) Add() Lldp { + newObj := &otg.Lldp{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &lldp{obj: newObj} + newLibObj.setDefault() + obj.lldpSlice = append(obj.lldpSlice, newLibObj) + return newLibObj +} + +func (obj *configLldpIter) Append(items ...Lldp) ConfigLldpIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.lldpSlice = append(obj.lldpSlice, item) + } + return obj +} + +func (obj *configLldpIter) Set(index int, newObj Lldp) ConfigLldpIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.lldpSlice[index] = newObj + return obj +} +func (obj *configLldpIter) Clear() ConfigLldpIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Lldp{} + obj.lldpSlice = []Lldp{} + } + return obj +} +func (obj *configLldpIter) clearHolderSlice() ConfigLldpIter { + if len(obj.lldpSlice) > 0 { + obj.lldpSlice = []Lldp{} + } + return obj +} +func (obj *configLldpIter) appendHolderSlice(item Lldp) ConfigLldpIter { + obj.lldpSlice = append(obj.lldpSlice, item) + return obj +} + +func (obj *config) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Ports) != 0 { + + if set_default { + obj.Ports().clearHolderSlice() + for _, item := range obj.obj.Ports { + obj.Ports().appendHolderSlice(&port{obj: item}) + } + } + for _, item := range obj.Ports().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Lags) != 0 { + + if set_default { + obj.Lags().clearHolderSlice() + for _, item := range obj.obj.Lags { + obj.Lags().appendHolderSlice(&lag{obj: item}) + } + } + for _, item := range obj.Lags().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Layer1) != 0 { + + if set_default { + obj.Layer1().clearHolderSlice() + for _, item := range obj.obj.Layer1 { + obj.Layer1().appendHolderSlice(&layer1{obj: item}) + } + } + for _, item := range obj.Layer1().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Captures) != 0 { + + if set_default { + obj.Captures().clearHolderSlice() + for _, item := range obj.obj.Captures { + obj.Captures().appendHolderSlice(&capture{obj: item}) + } + } + for _, item := range obj.Captures().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Devices) != 0 { + + if set_default { + obj.Devices().clearHolderSlice() + for _, item := range obj.obj.Devices { + obj.Devices().appendHolderSlice(&device{obj: item}) + } + } + for _, item := range obj.Devices().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Flows) != 0 { + + if set_default { + obj.Flows().clearHolderSlice() + for _, item := range obj.obj.Flows { + obj.Flows().appendHolderSlice(&flow{obj: item}) + } + } + for _, item := range obj.Flows().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Events != nil { + + obj.Events().validateObj(vObj, set_default) + } + + if obj.obj.Options != nil { + + obj.Options().validateObj(vObj, set_default) + } + + if len(obj.obj.Lldp) != 0 { + + if set_default { + obj.Lldp().clearHolderSlice() + for _, item := range obj.obj.Lldp { + obj.Lldp().appendHolderSlice(&lldp{obj: item}) + } + } + for _, item := range obj.Lldp().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *config) setDefault() { + +} diff --git a/gosnappi/config_options.go b/gosnappi/config_options.go new file mode 100644 index 00000000..39d31718 --- /dev/null +++ b/gosnappi/config_options.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ConfigOptions ***** +type configOptions struct { + validation + obj *otg.ConfigOptions + marshaller marshalConfigOptions + unMarshaller unMarshalConfigOptions + portOptionsHolder PortOptions + protocolOptionsHolder ProtocolOptions +} + +func NewConfigOptions() ConfigOptions { + obj := configOptions{obj: &otg.ConfigOptions{}} + obj.setDefault() + return &obj +} + +func (obj *configOptions) msg() *otg.ConfigOptions { + return obj.obj +} + +func (obj *configOptions) setMsg(msg *otg.ConfigOptions) ConfigOptions { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalconfigOptions struct { + obj *configOptions +} + +type marshalConfigOptions interface { + // ToProto marshals ConfigOptions to protobuf object *otg.ConfigOptions + ToProto() (*otg.ConfigOptions, error) + // ToPbText marshals ConfigOptions to protobuf text + ToPbText() (string, error) + // ToYaml marshals ConfigOptions to YAML text + ToYaml() (string, error) + // ToJson marshals ConfigOptions to JSON text + ToJson() (string, error) +} + +type unMarshalconfigOptions struct { + obj *configOptions +} + +type unMarshalConfigOptions interface { + // FromProto unmarshals ConfigOptions from protobuf object *otg.ConfigOptions + FromProto(msg *otg.ConfigOptions) (ConfigOptions, error) + // FromPbText unmarshals ConfigOptions from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ConfigOptions from YAML text + FromYaml(value string) error + // FromJson unmarshals ConfigOptions from JSON text + FromJson(value string) error +} + +func (obj *configOptions) Marshal() marshalConfigOptions { + if obj.marshaller == nil { + obj.marshaller = &marshalconfigOptions{obj: obj} + } + return obj.marshaller +} + +func (obj *configOptions) Unmarshal() unMarshalConfigOptions { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalconfigOptions{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalconfigOptions) ToProto() (*otg.ConfigOptions, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalconfigOptions) FromProto(msg *otg.ConfigOptions) (ConfigOptions, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalconfigOptions) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalconfigOptions) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalconfigOptions) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalconfigOptions) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalconfigOptions) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalconfigOptions) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *configOptions) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *configOptions) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *configOptions) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *configOptions) Clone() (ConfigOptions, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewConfigOptions() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *configOptions) setNil() { + obj.portOptionsHolder = nil + obj.protocolOptionsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ConfigOptions is global configuration options. +type ConfigOptions interface { + Validation + // msg marshals ConfigOptions to protobuf object *otg.ConfigOptions + // and doesn't set defaults + msg() *otg.ConfigOptions + // setMsg unmarshals ConfigOptions from protobuf object *otg.ConfigOptions + // and doesn't set defaults + setMsg(*otg.ConfigOptions) ConfigOptions + // provides marshal interface + Marshal() marshalConfigOptions + // provides unmarshal interface + Unmarshal() unMarshalConfigOptions + // validate validates ConfigOptions + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ConfigOptions, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PortOptions returns PortOptions, set in ConfigOptions. + // PortOptions is common port options that apply to all configured Port objects. + PortOptions() PortOptions + // SetPortOptions assigns PortOptions provided by user to ConfigOptions. + // PortOptions is common port options that apply to all configured Port objects. + SetPortOptions(value PortOptions) ConfigOptions + // HasPortOptions checks if PortOptions has been set in ConfigOptions + HasPortOptions() bool + // ProtocolOptions returns ProtocolOptions, set in ConfigOptions. + // ProtocolOptions is common options that apply to all configured protocols and interfaces. + ProtocolOptions() ProtocolOptions + // SetProtocolOptions assigns ProtocolOptions provided by user to ConfigOptions. + // ProtocolOptions is common options that apply to all configured protocols and interfaces. + SetProtocolOptions(value ProtocolOptions) ConfigOptions + // HasProtocolOptions checks if ProtocolOptions has been set in ConfigOptions + HasProtocolOptions() bool + setNil() +} + +// description is TBD +// PortOptions returns a PortOptions +func (obj *configOptions) PortOptions() PortOptions { + if obj.obj.PortOptions == nil { + obj.obj.PortOptions = NewPortOptions().msg() + } + if obj.portOptionsHolder == nil { + obj.portOptionsHolder = &portOptions{obj: obj.obj.PortOptions} + } + return obj.portOptionsHolder +} + +// description is TBD +// PortOptions returns a PortOptions +func (obj *configOptions) HasPortOptions() bool { + return obj.obj.PortOptions != nil +} + +// description is TBD +// SetPortOptions sets the PortOptions value in the ConfigOptions object +func (obj *configOptions) SetPortOptions(value PortOptions) ConfigOptions { + + obj.portOptionsHolder = nil + obj.obj.PortOptions = value.msg() + + return obj +} + +// description is TBD +// ProtocolOptions returns a ProtocolOptions +func (obj *configOptions) ProtocolOptions() ProtocolOptions { + if obj.obj.ProtocolOptions == nil { + obj.obj.ProtocolOptions = NewProtocolOptions().msg() + } + if obj.protocolOptionsHolder == nil { + obj.protocolOptionsHolder = &protocolOptions{obj: obj.obj.ProtocolOptions} + } + return obj.protocolOptionsHolder +} + +// description is TBD +// ProtocolOptions returns a ProtocolOptions +func (obj *configOptions) HasProtocolOptions() bool { + return obj.obj.ProtocolOptions != nil +} + +// description is TBD +// SetProtocolOptions sets the ProtocolOptions value in the ConfigOptions object +func (obj *configOptions) SetProtocolOptions(value ProtocolOptions) ConfigOptions { + + obj.protocolOptionsHolder = nil + obj.obj.ProtocolOptions = value.msg() + + return obj +} + +func (obj *configOptions) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.PortOptions != nil { + + obj.PortOptions().validateObj(vObj, set_default) + } + + if obj.obj.ProtocolOptions != nil { + + obj.ProtocolOptions().validateObj(vObj, set_default) + } + +} + +func (obj *configOptions) setDefault() { + +} diff --git a/gosnappi/config_update.go b/gosnappi/config_update.go new file mode 100644 index 00000000..a37709b5 --- /dev/null +++ b/gosnappi/config_update.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ConfigUpdate ***** +type configUpdate struct { + validation + obj *otg.ConfigUpdate + marshaller marshalConfigUpdate + unMarshaller unMarshalConfigUpdate + flowsHolder FlowsUpdate +} + +func NewConfigUpdate() ConfigUpdate { + obj := configUpdate{obj: &otg.ConfigUpdate{}} + obj.setDefault() + return &obj +} + +func (obj *configUpdate) msg() *otg.ConfigUpdate { + return obj.obj +} + +func (obj *configUpdate) setMsg(msg *otg.ConfigUpdate) ConfigUpdate { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalconfigUpdate struct { + obj *configUpdate +} + +type marshalConfigUpdate interface { + // ToProto marshals ConfigUpdate to protobuf object *otg.ConfigUpdate + ToProto() (*otg.ConfigUpdate, error) + // ToPbText marshals ConfigUpdate to protobuf text + ToPbText() (string, error) + // ToYaml marshals ConfigUpdate to YAML text + ToYaml() (string, error) + // ToJson marshals ConfigUpdate to JSON text + ToJson() (string, error) +} + +type unMarshalconfigUpdate struct { + obj *configUpdate +} + +type unMarshalConfigUpdate interface { + // FromProto unmarshals ConfigUpdate from protobuf object *otg.ConfigUpdate + FromProto(msg *otg.ConfigUpdate) (ConfigUpdate, error) + // FromPbText unmarshals ConfigUpdate from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ConfigUpdate from YAML text + FromYaml(value string) error + // FromJson unmarshals ConfigUpdate from JSON text + FromJson(value string) error +} + +func (obj *configUpdate) Marshal() marshalConfigUpdate { + if obj.marshaller == nil { + obj.marshaller = &marshalconfigUpdate{obj: obj} + } + return obj.marshaller +} + +func (obj *configUpdate) Unmarshal() unMarshalConfigUpdate { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalconfigUpdate{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalconfigUpdate) ToProto() (*otg.ConfigUpdate, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalconfigUpdate) FromProto(msg *otg.ConfigUpdate) (ConfigUpdate, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalconfigUpdate) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalconfigUpdate) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalconfigUpdate) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalconfigUpdate) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalconfigUpdate) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalconfigUpdate) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *configUpdate) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *configUpdate) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *configUpdate) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *configUpdate) Clone() (ConfigUpdate, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewConfigUpdate() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *configUpdate) setNil() { + obj.flowsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ConfigUpdate is request for updating specific attributes of resources in traffic generator +type ConfigUpdate interface { + Validation + // msg marshals ConfigUpdate to protobuf object *otg.ConfigUpdate + // and doesn't set defaults + msg() *otg.ConfigUpdate + // setMsg unmarshals ConfigUpdate from protobuf object *otg.ConfigUpdate + // and doesn't set defaults + setMsg(*otg.ConfigUpdate) ConfigUpdate + // provides marshal interface + Marshal() marshalConfigUpdate + // provides unmarshal interface + Unmarshal() unMarshalConfigUpdate + // validate validates ConfigUpdate + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ConfigUpdate, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ConfigUpdateChoiceEnum, set in ConfigUpdate + Choice() ConfigUpdateChoiceEnum + // setChoice assigns ConfigUpdateChoiceEnum provided by user to ConfigUpdate + setChoice(value ConfigUpdateChoiceEnum) ConfigUpdate + // HasChoice checks if Choice has been set in ConfigUpdate + HasChoice() bool + // Flows returns FlowsUpdate, set in ConfigUpdate. + // FlowsUpdate is a container of flows with associated properties to be updated without affecting the flows current transmit state. + Flows() FlowsUpdate + // SetFlows assigns FlowsUpdate provided by user to ConfigUpdate. + // FlowsUpdate is a container of flows with associated properties to be updated without affecting the flows current transmit state. + SetFlows(value FlowsUpdate) ConfigUpdate + // HasFlows checks if Flows has been set in ConfigUpdate + HasFlows() bool + setNil() +} + +type ConfigUpdateChoiceEnum string + +// Enum of Choice on ConfigUpdate +var ConfigUpdateChoice = struct { + FLOWS ConfigUpdateChoiceEnum +}{ + FLOWS: ConfigUpdateChoiceEnum("flows"), +} + +func (obj *configUpdate) Choice() ConfigUpdateChoiceEnum { + return ConfigUpdateChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *configUpdate) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *configUpdate) setChoice(value ConfigUpdateChoiceEnum) ConfigUpdate { + intValue, ok := otg.ConfigUpdate_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ConfigUpdateChoiceEnum", string(value))) + return obj + } + enumValue := otg.ConfigUpdate_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Flows = nil + obj.flowsHolder = nil + + if value == ConfigUpdateChoice.FLOWS { + obj.obj.Flows = NewFlowsUpdate().msg() + } + + return obj +} + +// description is TBD +// Flows returns a FlowsUpdate +func (obj *configUpdate) Flows() FlowsUpdate { + if obj.obj.Flows == nil { + obj.setChoice(ConfigUpdateChoice.FLOWS) + } + if obj.flowsHolder == nil { + obj.flowsHolder = &flowsUpdate{obj: obj.obj.Flows} + } + return obj.flowsHolder +} + +// description is TBD +// Flows returns a FlowsUpdate +func (obj *configUpdate) HasFlows() bool { + return obj.obj.Flows != nil +} + +// description is TBD +// SetFlows sets the FlowsUpdate value in the ConfigUpdate object +func (obj *configUpdate) SetFlows(value FlowsUpdate) ConfigUpdate { + obj.setChoice(ConfigUpdateChoice.FLOWS) + obj.flowsHolder = nil + obj.obj.Flows = value.msg() + + return obj +} + +func (obj *configUpdate) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flows != nil { + + obj.Flows().validateObj(vObj, set_default) + } + +} + +func (obj *configUpdate) setDefault() { + var choices_set int = 0 + var choice ConfigUpdateChoiceEnum + + if obj.obj.Flows != nil { + choices_set += 1 + choice = ConfigUpdateChoice.FLOWS + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ConfigUpdate") + } + } else { + intVal := otg.ConfigUpdate_Choice_Enum_value[string(choice)] + enumValue := otg.ConfigUpdate_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/control_action.go b/gosnappi/control_action.go new file mode 100644 index 00000000..31700e43 --- /dev/null +++ b/gosnappi/control_action.go @@ -0,0 +1,387 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ControlAction ***** +type controlAction struct { + validation + obj *otg.ControlAction + marshaller marshalControlAction + unMarshaller unMarshalControlAction + protocolHolder ActionProtocol +} + +func NewControlAction() ControlAction { + obj := controlAction{obj: &otg.ControlAction{}} + obj.setDefault() + return &obj +} + +func (obj *controlAction) msg() *otg.ControlAction { + return obj.obj +} + +func (obj *controlAction) setMsg(msg *otg.ControlAction) ControlAction { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalcontrolAction struct { + obj *controlAction +} + +type marshalControlAction interface { + // ToProto marshals ControlAction to protobuf object *otg.ControlAction + ToProto() (*otg.ControlAction, error) + // ToPbText marshals ControlAction to protobuf text + ToPbText() (string, error) + // ToYaml marshals ControlAction to YAML text + ToYaml() (string, error) + // ToJson marshals ControlAction to JSON text + ToJson() (string, error) +} + +type unMarshalcontrolAction struct { + obj *controlAction +} + +type unMarshalControlAction interface { + // FromProto unmarshals ControlAction from protobuf object *otg.ControlAction + FromProto(msg *otg.ControlAction) (ControlAction, error) + // FromPbText unmarshals ControlAction from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ControlAction from YAML text + FromYaml(value string) error + // FromJson unmarshals ControlAction from JSON text + FromJson(value string) error +} + +func (obj *controlAction) Marshal() marshalControlAction { + if obj.marshaller == nil { + obj.marshaller = &marshalcontrolAction{obj: obj} + } + return obj.marshaller +} + +func (obj *controlAction) Unmarshal() unMarshalControlAction { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalcontrolAction{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalcontrolAction) ToProto() (*otg.ControlAction, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalcontrolAction) FromProto(msg *otg.ControlAction) (ControlAction, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalcontrolAction) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalcontrolAction) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalcontrolAction) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcontrolAction) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalcontrolAction) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcontrolAction) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *controlAction) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *controlAction) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *controlAction) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *controlAction) Clone() (ControlAction, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewControlAction() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *controlAction) setNil() { + obj.protocolHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ControlAction is request for triggering action against configured resources. +type ControlAction interface { + Validation + // msg marshals ControlAction to protobuf object *otg.ControlAction + // and doesn't set defaults + msg() *otg.ControlAction + // setMsg unmarshals ControlAction from protobuf object *otg.ControlAction + // and doesn't set defaults + setMsg(*otg.ControlAction) ControlAction + // provides marshal interface + Marshal() marshalControlAction + // provides unmarshal interface + Unmarshal() unMarshalControlAction + // validate validates ControlAction + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ControlAction, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ControlActionChoiceEnum, set in ControlAction + Choice() ControlActionChoiceEnum + // setChoice assigns ControlActionChoiceEnum provided by user to ControlAction + setChoice(value ControlActionChoiceEnum) ControlAction + // Protocol returns ActionProtocol, set in ControlAction. + // ActionProtocol is actions associated with protocols on configured resources. + Protocol() ActionProtocol + // SetProtocol assigns ActionProtocol provided by user to ControlAction. + // ActionProtocol is actions associated with protocols on configured resources. + SetProtocol(value ActionProtocol) ControlAction + // HasProtocol checks if Protocol has been set in ControlAction + HasProtocol() bool + setNil() +} + +type ControlActionChoiceEnum string + +// Enum of Choice on ControlAction +var ControlActionChoice = struct { + PROTOCOL ControlActionChoiceEnum +}{ + PROTOCOL: ControlActionChoiceEnum("protocol"), +} + +func (obj *controlAction) Choice() ControlActionChoiceEnum { + return ControlActionChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *controlAction) setChoice(value ControlActionChoiceEnum) ControlAction { + intValue, ok := otg.ControlAction_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ControlActionChoiceEnum", string(value))) + return obj + } + enumValue := otg.ControlAction_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Protocol = nil + obj.protocolHolder = nil + + if value == ControlActionChoice.PROTOCOL { + obj.obj.Protocol = NewActionProtocol().msg() + } + + return obj +} + +// description is TBD +// Protocol returns a ActionProtocol +func (obj *controlAction) Protocol() ActionProtocol { + if obj.obj.Protocol == nil { + obj.setChoice(ControlActionChoice.PROTOCOL) + } + if obj.protocolHolder == nil { + obj.protocolHolder = &actionProtocol{obj: obj.obj.Protocol} + } + return obj.protocolHolder +} + +// description is TBD +// Protocol returns a ActionProtocol +func (obj *controlAction) HasProtocol() bool { + return obj.obj.Protocol != nil +} + +// description is TBD +// SetProtocol sets the ActionProtocol value in the ControlAction object +func (obj *controlAction) SetProtocol(value ActionProtocol) ControlAction { + obj.setChoice(ControlActionChoice.PROTOCOL) + obj.protocolHolder = nil + obj.obj.Protocol = value.msg() + + return obj +} + +func (obj *controlAction) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface ControlAction") + } + + if obj.obj.Protocol != nil { + + obj.Protocol().validateObj(vObj, set_default) + } + +} + +func (obj *controlAction) setDefault() { + var choices_set int = 0 + var choice ControlActionChoiceEnum + + if obj.obj.Protocol != nil { + choices_set += 1 + choice = ControlActionChoice.PROTOCOL + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ControlAction") + } + } else { + intVal := otg.ControlAction_Choice_Enum_value[string(choice)] + enumValue := otg.ControlAction_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/control_action_response.go b/gosnappi/control_action_response.go new file mode 100644 index 00000000..1a8630b0 --- /dev/null +++ b/gosnappi/control_action_response.go @@ -0,0 +1,353 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ControlActionResponse ***** +type controlActionResponse struct { + validation + obj *otg.ControlActionResponse + marshaller marshalControlActionResponse + unMarshaller unMarshalControlActionResponse + responseHolder ActionResponse +} + +func NewControlActionResponse() ControlActionResponse { + obj := controlActionResponse{obj: &otg.ControlActionResponse{}} + obj.setDefault() + return &obj +} + +func (obj *controlActionResponse) msg() *otg.ControlActionResponse { + return obj.obj +} + +func (obj *controlActionResponse) setMsg(msg *otg.ControlActionResponse) ControlActionResponse { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalcontrolActionResponse struct { + obj *controlActionResponse +} + +type marshalControlActionResponse interface { + // ToProto marshals ControlActionResponse to protobuf object *otg.ControlActionResponse + ToProto() (*otg.ControlActionResponse, error) + // ToPbText marshals ControlActionResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals ControlActionResponse to YAML text + ToYaml() (string, error) + // ToJson marshals ControlActionResponse to JSON text + ToJson() (string, error) +} + +type unMarshalcontrolActionResponse struct { + obj *controlActionResponse +} + +type unMarshalControlActionResponse interface { + // FromProto unmarshals ControlActionResponse from protobuf object *otg.ControlActionResponse + FromProto(msg *otg.ControlActionResponse) (ControlActionResponse, error) + // FromPbText unmarshals ControlActionResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ControlActionResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals ControlActionResponse from JSON text + FromJson(value string) error +} + +func (obj *controlActionResponse) Marshal() marshalControlActionResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalcontrolActionResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *controlActionResponse) Unmarshal() unMarshalControlActionResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalcontrolActionResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalcontrolActionResponse) ToProto() (*otg.ControlActionResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalcontrolActionResponse) FromProto(msg *otg.ControlActionResponse) (ControlActionResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalcontrolActionResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalcontrolActionResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalcontrolActionResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcontrolActionResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalcontrolActionResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcontrolActionResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *controlActionResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *controlActionResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *controlActionResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *controlActionResponse) Clone() (ControlActionResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewControlActionResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *controlActionResponse) setNil() { + obj.responseHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ControlActionResponse is response for action triggered against configured resources along with warnings. +type ControlActionResponse interface { + Validation + // msg marshals ControlActionResponse to protobuf object *otg.ControlActionResponse + // and doesn't set defaults + msg() *otg.ControlActionResponse + // setMsg unmarshals ControlActionResponse from protobuf object *otg.ControlActionResponse + // and doesn't set defaults + setMsg(*otg.ControlActionResponse) ControlActionResponse + // provides marshal interface + Marshal() marshalControlActionResponse + // provides unmarshal interface + Unmarshal() unMarshalControlActionResponse + // validate validates ControlActionResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ControlActionResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Warnings returns []string, set in ControlActionResponse. + Warnings() []string + // SetWarnings assigns []string provided by user to ControlActionResponse + SetWarnings(value []string) ControlActionResponse + // Response returns ActionResponse, set in ControlActionResponse. + // ActionResponse is response for action triggered against configured resources. + Response() ActionResponse + // SetResponse assigns ActionResponse provided by user to ControlActionResponse. + // ActionResponse is response for action triggered against configured resources. + SetResponse(value ActionResponse) ControlActionResponse + // HasResponse checks if Response has been set in ControlActionResponse + HasResponse() bool + setNil() +} + +// List of warnings generated while triggering specified action +// Warnings returns a []string +func (obj *controlActionResponse) Warnings() []string { + if obj.obj.Warnings == nil { + obj.obj.Warnings = make([]string, 0) + } + return obj.obj.Warnings +} + +// List of warnings generated while triggering specified action +// SetWarnings sets the []string value in the ControlActionResponse object +func (obj *controlActionResponse) SetWarnings(value []string) ControlActionResponse { + + if obj.obj.Warnings == nil { + obj.obj.Warnings = make([]string, 0) + } + obj.obj.Warnings = value + + return obj +} + +// description is TBD +// Response returns a ActionResponse +func (obj *controlActionResponse) Response() ActionResponse { + if obj.obj.Response == nil { + obj.obj.Response = NewActionResponse().msg() + } + if obj.responseHolder == nil { + obj.responseHolder = &actionResponse{obj: obj.obj.Response} + } + return obj.responseHolder +} + +// description is TBD +// Response returns a ActionResponse +func (obj *controlActionResponse) HasResponse() bool { + return obj.obj.Response != nil +} + +// description is TBD +// SetResponse sets the ActionResponse value in the ControlActionResponse object +func (obj *controlActionResponse) SetResponse(value ActionResponse) ControlActionResponse { + + obj.responseHolder = nil + obj.obj.Response = value.msg() + + return obj +} + +func (obj *controlActionResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Response != nil { + + obj.Response().validateObj(vObj, set_default) + } + +} + +func (obj *controlActionResponse) setDefault() { + +} diff --git a/gosnappi/control_state.go b/gosnappi/control_state.go new file mode 100644 index 00000000..f308eae2 --- /dev/null +++ b/gosnappi/control_state.go @@ -0,0 +1,499 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ControlState ***** +type controlState struct { + validation + obj *otg.ControlState + marshaller marshalControlState + unMarshaller unMarshalControlState + portHolder StatePort + protocolHolder StateProtocol + trafficHolder StateTraffic +} + +func NewControlState() ControlState { + obj := controlState{obj: &otg.ControlState{}} + obj.setDefault() + return &obj +} + +func (obj *controlState) msg() *otg.ControlState { + return obj.obj +} + +func (obj *controlState) setMsg(msg *otg.ControlState) ControlState { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalcontrolState struct { + obj *controlState +} + +type marshalControlState interface { + // ToProto marshals ControlState to protobuf object *otg.ControlState + ToProto() (*otg.ControlState, error) + // ToPbText marshals ControlState to protobuf text + ToPbText() (string, error) + // ToYaml marshals ControlState to YAML text + ToYaml() (string, error) + // ToJson marshals ControlState to JSON text + ToJson() (string, error) +} + +type unMarshalcontrolState struct { + obj *controlState +} + +type unMarshalControlState interface { + // FromProto unmarshals ControlState from protobuf object *otg.ControlState + FromProto(msg *otg.ControlState) (ControlState, error) + // FromPbText unmarshals ControlState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ControlState from YAML text + FromYaml(value string) error + // FromJson unmarshals ControlState from JSON text + FromJson(value string) error +} + +func (obj *controlState) Marshal() marshalControlState { + if obj.marshaller == nil { + obj.marshaller = &marshalcontrolState{obj: obj} + } + return obj.marshaller +} + +func (obj *controlState) Unmarshal() unMarshalControlState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalcontrolState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalcontrolState) ToProto() (*otg.ControlState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalcontrolState) FromProto(msg *otg.ControlState) (ControlState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalcontrolState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalcontrolState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalcontrolState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcontrolState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalcontrolState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalcontrolState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *controlState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *controlState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *controlState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *controlState) Clone() (ControlState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewControlState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *controlState) setNil() { + obj.portHolder = nil + obj.protocolHolder = nil + obj.trafficHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ControlState is request for setting operational state of configured resources. +type ControlState interface { + Validation + // msg marshals ControlState to protobuf object *otg.ControlState + // and doesn't set defaults + msg() *otg.ControlState + // setMsg unmarshals ControlState from protobuf object *otg.ControlState + // and doesn't set defaults + setMsg(*otg.ControlState) ControlState + // provides marshal interface + Marshal() marshalControlState + // provides unmarshal interface + Unmarshal() unMarshalControlState + // validate validates ControlState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ControlState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ControlStateChoiceEnum, set in ControlState + Choice() ControlStateChoiceEnum + // setChoice assigns ControlStateChoiceEnum provided by user to ControlState + setChoice(value ControlStateChoiceEnum) ControlState + // Port returns StatePort, set in ControlState. + // StatePort is states associated with configured ports. + Port() StatePort + // SetPort assigns StatePort provided by user to ControlState. + // StatePort is states associated with configured ports. + SetPort(value StatePort) ControlState + // HasPort checks if Port has been set in ControlState + HasPort() bool + // Protocol returns StateProtocol, set in ControlState. + // StateProtocol is states associated with protocols on configured resources. + Protocol() StateProtocol + // SetProtocol assigns StateProtocol provided by user to ControlState. + // StateProtocol is states associated with protocols on configured resources. + SetProtocol(value StateProtocol) ControlState + // HasProtocol checks if Protocol has been set in ControlState + HasProtocol() bool + // Traffic returns StateTraffic, set in ControlState. + // StateTraffic is states associated with configured flows + Traffic() StateTraffic + // SetTraffic assigns StateTraffic provided by user to ControlState. + // StateTraffic is states associated with configured flows + SetTraffic(value StateTraffic) ControlState + // HasTraffic checks if Traffic has been set in ControlState + HasTraffic() bool + setNil() +} + +type ControlStateChoiceEnum string + +// Enum of Choice on ControlState +var ControlStateChoice = struct { + PORT ControlStateChoiceEnum + PROTOCOL ControlStateChoiceEnum + TRAFFIC ControlStateChoiceEnum +}{ + PORT: ControlStateChoiceEnum("port"), + PROTOCOL: ControlStateChoiceEnum("protocol"), + TRAFFIC: ControlStateChoiceEnum("traffic"), +} + +func (obj *controlState) Choice() ControlStateChoiceEnum { + return ControlStateChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *controlState) setChoice(value ControlStateChoiceEnum) ControlState { + intValue, ok := otg.ControlState_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ControlStateChoiceEnum", string(value))) + return obj + } + enumValue := otg.ControlState_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Traffic = nil + obj.trafficHolder = nil + obj.obj.Protocol = nil + obj.protocolHolder = nil + obj.obj.Port = nil + obj.portHolder = nil + + if value == ControlStateChoice.PORT { + obj.obj.Port = NewStatePort().msg() + } + + if value == ControlStateChoice.PROTOCOL { + obj.obj.Protocol = NewStateProtocol().msg() + } + + if value == ControlStateChoice.TRAFFIC { + obj.obj.Traffic = NewStateTraffic().msg() + } + + return obj +} + +// description is TBD +// Port returns a StatePort +func (obj *controlState) Port() StatePort { + if obj.obj.Port == nil { + obj.setChoice(ControlStateChoice.PORT) + } + if obj.portHolder == nil { + obj.portHolder = &statePort{obj: obj.obj.Port} + } + return obj.portHolder +} + +// description is TBD +// Port returns a StatePort +func (obj *controlState) HasPort() bool { + return obj.obj.Port != nil +} + +// description is TBD +// SetPort sets the StatePort value in the ControlState object +func (obj *controlState) SetPort(value StatePort) ControlState { + obj.setChoice(ControlStateChoice.PORT) + obj.portHolder = nil + obj.obj.Port = value.msg() + + return obj +} + +// description is TBD +// Protocol returns a StateProtocol +func (obj *controlState) Protocol() StateProtocol { + if obj.obj.Protocol == nil { + obj.setChoice(ControlStateChoice.PROTOCOL) + } + if obj.protocolHolder == nil { + obj.protocolHolder = &stateProtocol{obj: obj.obj.Protocol} + } + return obj.protocolHolder +} + +// description is TBD +// Protocol returns a StateProtocol +func (obj *controlState) HasProtocol() bool { + return obj.obj.Protocol != nil +} + +// description is TBD +// SetProtocol sets the StateProtocol value in the ControlState object +func (obj *controlState) SetProtocol(value StateProtocol) ControlState { + obj.setChoice(ControlStateChoice.PROTOCOL) + obj.protocolHolder = nil + obj.obj.Protocol = value.msg() + + return obj +} + +// description is TBD +// Traffic returns a StateTraffic +func (obj *controlState) Traffic() StateTraffic { + if obj.obj.Traffic == nil { + obj.setChoice(ControlStateChoice.TRAFFIC) + } + if obj.trafficHolder == nil { + obj.trafficHolder = &stateTraffic{obj: obj.obj.Traffic} + } + return obj.trafficHolder +} + +// description is TBD +// Traffic returns a StateTraffic +func (obj *controlState) HasTraffic() bool { + return obj.obj.Traffic != nil +} + +// description is TBD +// SetTraffic sets the StateTraffic value in the ControlState object +func (obj *controlState) SetTraffic(value StateTraffic) ControlState { + obj.setChoice(ControlStateChoice.TRAFFIC) + obj.trafficHolder = nil + obj.obj.Traffic = value.msg() + + return obj +} + +func (obj *controlState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface ControlState") + } + + if obj.obj.Port != nil { + + obj.Port().validateObj(vObj, set_default) + } + + if obj.obj.Protocol != nil { + + obj.Protocol().validateObj(vObj, set_default) + } + + if obj.obj.Traffic != nil { + + obj.Traffic().validateObj(vObj, set_default) + } + +} + +func (obj *controlState) setDefault() { + var choices_set int = 0 + var choice ControlStateChoiceEnum + + if obj.obj.Port != nil { + choices_set += 1 + choice = ControlStateChoice.PORT + } + + if obj.obj.Protocol != nil { + choices_set += 1 + choice = ControlStateChoice.PROTOCOL + } + + if obj.obj.Traffic != nil { + choices_set += 1 + choice = ControlStateChoice.TRAFFIC + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ControlState") + } + } else { + intVal := otg.ControlState_Choice_Enum_value[string(choice)] + enumValue := otg.ControlState_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/device.go b/gosnappi/device.go new file mode 100644 index 00000000..022363ea --- /dev/null +++ b/gosnappi/device.go @@ -0,0 +1,891 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Device ***** +type device struct { + validation + obj *otg.Device + marshaller marshalDevice + unMarshaller unMarshalDevice + ethernetsHolder DeviceDeviceEthernetIter + ipv4LoopbacksHolder DeviceDeviceIpv4LoopbackIter + ipv6LoopbacksHolder DeviceDeviceIpv6LoopbackIter + isisHolder DeviceIsisRouter + bgpHolder DeviceBgpRouter + vxlanHolder DeviceVxlan + rsvpHolder DeviceRsvp + dhcpServerHolder DeviceDhcpServer + ospfv2Holder DeviceOspfv2Router +} + +func NewDevice() Device { + obj := device{obj: &otg.Device{}} + obj.setDefault() + return &obj +} + +func (obj *device) msg() *otg.Device { + return obj.obj +} + +func (obj *device) setMsg(msg *otg.Device) Device { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldevice struct { + obj *device +} + +type marshalDevice interface { + // ToProto marshals Device to protobuf object *otg.Device + ToProto() (*otg.Device, error) + // ToPbText marshals Device to protobuf text + ToPbText() (string, error) + // ToYaml marshals Device to YAML text + ToYaml() (string, error) + // ToJson marshals Device to JSON text + ToJson() (string, error) +} + +type unMarshaldevice struct { + obj *device +} + +type unMarshalDevice interface { + // FromProto unmarshals Device from protobuf object *otg.Device + FromProto(msg *otg.Device) (Device, error) + // FromPbText unmarshals Device from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Device from YAML text + FromYaml(value string) error + // FromJson unmarshals Device from JSON text + FromJson(value string) error +} + +func (obj *device) Marshal() marshalDevice { + if obj.marshaller == nil { + obj.marshaller = &marshaldevice{obj: obj} + } + return obj.marshaller +} + +func (obj *device) Unmarshal() unMarshalDevice { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldevice{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldevice) ToProto() (*otg.Device, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldevice) FromProto(msg *otg.Device) (Device, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldevice) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldevice) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldevice) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldevice) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldevice) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldevice) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *device) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *device) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *device) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *device) Clone() (Device, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDevice() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *device) setNil() { + obj.ethernetsHolder = nil + obj.ipv4LoopbacksHolder = nil + obj.ipv6LoopbacksHolder = nil + obj.isisHolder = nil + obj.bgpHolder = nil + obj.vxlanHolder = nil + obj.rsvpHolder = nil + obj.dhcpServerHolder = nil + obj.ospfv2Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Device is a container for emulated or simulated interfaces, loopback interfaces and protocol configurations. +type Device interface { + Validation + // msg marshals Device to protobuf object *otg.Device + // and doesn't set defaults + msg() *otg.Device + // setMsg unmarshals Device from protobuf object *otg.Device + // and doesn't set defaults + setMsg(*otg.Device) Device + // provides marshal interface + Marshal() marshalDevice + // provides unmarshal interface + Unmarshal() unMarshalDevice + // validate validates Device + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Device, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ethernets returns DeviceDeviceEthernetIterIter, set in Device + Ethernets() DeviceDeviceEthernetIter + // Ipv4Loopbacks returns DeviceDeviceIpv4LoopbackIterIter, set in Device + Ipv4Loopbacks() DeviceDeviceIpv4LoopbackIter + // Ipv6Loopbacks returns DeviceDeviceIpv6LoopbackIterIter, set in Device + Ipv6Loopbacks() DeviceDeviceIpv6LoopbackIter + // Isis returns DeviceIsisRouter, set in Device. + // DeviceIsisRouter is a container of properties for an ISIS router and its interfaces. + Isis() DeviceIsisRouter + // SetIsis assigns DeviceIsisRouter provided by user to Device. + // DeviceIsisRouter is a container of properties for an ISIS router and its interfaces. + SetIsis(value DeviceIsisRouter) Device + // HasIsis checks if Isis has been set in Device + HasIsis() bool + // Bgp returns DeviceBgpRouter, set in Device. + // DeviceBgpRouter is configuration for one or more IPv4 or IPv6 BGP peers. + Bgp() DeviceBgpRouter + // SetBgp assigns DeviceBgpRouter provided by user to Device. + // DeviceBgpRouter is configuration for one or more IPv4 or IPv6 BGP peers. + SetBgp(value DeviceBgpRouter) Device + // HasBgp checks if Bgp has been set in Device + HasBgp() bool + // Vxlan returns DeviceVxlan, set in Device. + // DeviceVxlan is description is TBD + Vxlan() DeviceVxlan + // SetVxlan assigns DeviceVxlan provided by user to Device. + // DeviceVxlan is description is TBD + SetVxlan(value DeviceVxlan) Device + // HasVxlan checks if Vxlan has been set in Device + HasVxlan() bool + // Name returns string, set in Device. + Name() string + // SetName assigns string provided by user to Device + SetName(value string) Device + // Rsvp returns DeviceRsvp, set in Device. + // DeviceRsvp is configuration for one or more RSVP interfaces, ingress and egress LSPs. In this model, currently IPv4 RSVP and point-to-point LSPs are supported as per RFC3209 and related specifications. + Rsvp() DeviceRsvp + // SetRsvp assigns DeviceRsvp provided by user to Device. + // DeviceRsvp is configuration for one or more RSVP interfaces, ingress and egress LSPs. In this model, currently IPv4 RSVP and point-to-point LSPs are supported as per RFC3209 and related specifications. + SetRsvp(value DeviceRsvp) Device + // HasRsvp checks if Rsvp has been set in Device + HasRsvp() bool + // DhcpServer returns DeviceDhcpServer, set in Device. + // DeviceDhcpServer is configuration for one or more IPv4 or IPv6 DHCP servers. + DhcpServer() DeviceDhcpServer + // SetDhcpServer assigns DeviceDhcpServer provided by user to Device. + // DeviceDhcpServer is configuration for one or more IPv4 or IPv6 DHCP servers. + SetDhcpServer(value DeviceDhcpServer) Device + // HasDhcpServer checks if DhcpServer has been set in Device + HasDhcpServer() bool + // Ospfv2 returns DeviceOspfv2Router, set in Device. + // DeviceOspfv2Router is under Review: OSPFv2 is currently under review for pending exploration on use cases. + // + // Under Review: OSPFv2 is currently under review for pending exploration on use cases. + // + // A container of properties for an OSPFv2 router and its interfaces & Route Ranges. + Ospfv2() DeviceOspfv2Router + // SetOspfv2 assigns DeviceOspfv2Router provided by user to Device. + // DeviceOspfv2Router is under Review: OSPFv2 is currently under review for pending exploration on use cases. + // + // Under Review: OSPFv2 is currently under review for pending exploration on use cases. + // + // A container of properties for an OSPFv2 router and its interfaces & Route Ranges. + SetOspfv2(value DeviceOspfv2Router) Device + // HasOspfv2 checks if Ospfv2 has been set in Device + HasOspfv2() bool + setNil() +} + +// Ethernet configuration for one or more emulated or simulated network interfaces. +// Ethernets returns a []DeviceEthernet +func (obj *device) Ethernets() DeviceDeviceEthernetIter { + if len(obj.obj.Ethernets) == 0 { + obj.obj.Ethernets = []*otg.DeviceEthernet{} + } + if obj.ethernetsHolder == nil { + obj.ethernetsHolder = newDeviceDeviceEthernetIter(&obj.obj.Ethernets).setMsg(obj) + } + return obj.ethernetsHolder +} + +type deviceDeviceEthernetIter struct { + obj *device + deviceEthernetSlice []DeviceEthernet + fieldPtr *[]*otg.DeviceEthernet +} + +func newDeviceDeviceEthernetIter(ptr *[]*otg.DeviceEthernet) DeviceDeviceEthernetIter { + return &deviceDeviceEthernetIter{fieldPtr: ptr} +} + +type DeviceDeviceEthernetIter interface { + setMsg(*device) DeviceDeviceEthernetIter + Items() []DeviceEthernet + Add() DeviceEthernet + Append(items ...DeviceEthernet) DeviceDeviceEthernetIter + Set(index int, newObj DeviceEthernet) DeviceDeviceEthernetIter + Clear() DeviceDeviceEthernetIter + clearHolderSlice() DeviceDeviceEthernetIter + appendHolderSlice(item DeviceEthernet) DeviceDeviceEthernetIter +} + +func (obj *deviceDeviceEthernetIter) setMsg(msg *device) DeviceDeviceEthernetIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&deviceEthernet{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceDeviceEthernetIter) Items() []DeviceEthernet { + return obj.deviceEthernetSlice +} + +func (obj *deviceDeviceEthernetIter) Add() DeviceEthernet { + newObj := &otg.DeviceEthernet{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &deviceEthernet{obj: newObj} + newLibObj.setDefault() + obj.deviceEthernetSlice = append(obj.deviceEthernetSlice, newLibObj) + return newLibObj +} + +func (obj *deviceDeviceEthernetIter) Append(items ...DeviceEthernet) DeviceDeviceEthernetIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.deviceEthernetSlice = append(obj.deviceEthernetSlice, item) + } + return obj +} + +func (obj *deviceDeviceEthernetIter) Set(index int, newObj DeviceEthernet) DeviceDeviceEthernetIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.deviceEthernetSlice[index] = newObj + return obj +} +func (obj *deviceDeviceEthernetIter) Clear() DeviceDeviceEthernetIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.DeviceEthernet{} + obj.deviceEthernetSlice = []DeviceEthernet{} + } + return obj +} +func (obj *deviceDeviceEthernetIter) clearHolderSlice() DeviceDeviceEthernetIter { + if len(obj.deviceEthernetSlice) > 0 { + obj.deviceEthernetSlice = []DeviceEthernet{} + } + return obj +} +func (obj *deviceDeviceEthernetIter) appendHolderSlice(item DeviceEthernet) DeviceDeviceEthernetIter { + obj.deviceEthernetSlice = append(obj.deviceEthernetSlice, item) + return obj +} + +// IPv4 Loopback interface that can be attached to an Ethernet in the same device or to an Ethernet in another device. +// Ipv4Loopbacks returns a []DeviceIpv4Loopback +func (obj *device) Ipv4Loopbacks() DeviceDeviceIpv4LoopbackIter { + if len(obj.obj.Ipv4Loopbacks) == 0 { + obj.obj.Ipv4Loopbacks = []*otg.DeviceIpv4Loopback{} + } + if obj.ipv4LoopbacksHolder == nil { + obj.ipv4LoopbacksHolder = newDeviceDeviceIpv4LoopbackIter(&obj.obj.Ipv4Loopbacks).setMsg(obj) + } + return obj.ipv4LoopbacksHolder +} + +type deviceDeviceIpv4LoopbackIter struct { + obj *device + deviceIpv4LoopbackSlice []DeviceIpv4Loopback + fieldPtr *[]*otg.DeviceIpv4Loopback +} + +func newDeviceDeviceIpv4LoopbackIter(ptr *[]*otg.DeviceIpv4Loopback) DeviceDeviceIpv4LoopbackIter { + return &deviceDeviceIpv4LoopbackIter{fieldPtr: ptr} +} + +type DeviceDeviceIpv4LoopbackIter interface { + setMsg(*device) DeviceDeviceIpv4LoopbackIter + Items() []DeviceIpv4Loopback + Add() DeviceIpv4Loopback + Append(items ...DeviceIpv4Loopback) DeviceDeviceIpv4LoopbackIter + Set(index int, newObj DeviceIpv4Loopback) DeviceDeviceIpv4LoopbackIter + Clear() DeviceDeviceIpv4LoopbackIter + clearHolderSlice() DeviceDeviceIpv4LoopbackIter + appendHolderSlice(item DeviceIpv4Loopback) DeviceDeviceIpv4LoopbackIter +} + +func (obj *deviceDeviceIpv4LoopbackIter) setMsg(msg *device) DeviceDeviceIpv4LoopbackIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&deviceIpv4Loopback{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceDeviceIpv4LoopbackIter) Items() []DeviceIpv4Loopback { + return obj.deviceIpv4LoopbackSlice +} + +func (obj *deviceDeviceIpv4LoopbackIter) Add() DeviceIpv4Loopback { + newObj := &otg.DeviceIpv4Loopback{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &deviceIpv4Loopback{obj: newObj} + newLibObj.setDefault() + obj.deviceIpv4LoopbackSlice = append(obj.deviceIpv4LoopbackSlice, newLibObj) + return newLibObj +} + +func (obj *deviceDeviceIpv4LoopbackIter) Append(items ...DeviceIpv4Loopback) DeviceDeviceIpv4LoopbackIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.deviceIpv4LoopbackSlice = append(obj.deviceIpv4LoopbackSlice, item) + } + return obj +} + +func (obj *deviceDeviceIpv4LoopbackIter) Set(index int, newObj DeviceIpv4Loopback) DeviceDeviceIpv4LoopbackIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.deviceIpv4LoopbackSlice[index] = newObj + return obj +} +func (obj *deviceDeviceIpv4LoopbackIter) Clear() DeviceDeviceIpv4LoopbackIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.DeviceIpv4Loopback{} + obj.deviceIpv4LoopbackSlice = []DeviceIpv4Loopback{} + } + return obj +} +func (obj *deviceDeviceIpv4LoopbackIter) clearHolderSlice() DeviceDeviceIpv4LoopbackIter { + if len(obj.deviceIpv4LoopbackSlice) > 0 { + obj.deviceIpv4LoopbackSlice = []DeviceIpv4Loopback{} + } + return obj +} +func (obj *deviceDeviceIpv4LoopbackIter) appendHolderSlice(item DeviceIpv4Loopback) DeviceDeviceIpv4LoopbackIter { + obj.deviceIpv4LoopbackSlice = append(obj.deviceIpv4LoopbackSlice, item) + return obj +} + +// IPv6 Loopback interface that can be attached to an Ethernet in the same device or to an Ethernet in another device. +// Ipv6Loopbacks returns a []DeviceIpv6Loopback +func (obj *device) Ipv6Loopbacks() DeviceDeviceIpv6LoopbackIter { + if len(obj.obj.Ipv6Loopbacks) == 0 { + obj.obj.Ipv6Loopbacks = []*otg.DeviceIpv6Loopback{} + } + if obj.ipv6LoopbacksHolder == nil { + obj.ipv6LoopbacksHolder = newDeviceDeviceIpv6LoopbackIter(&obj.obj.Ipv6Loopbacks).setMsg(obj) + } + return obj.ipv6LoopbacksHolder +} + +type deviceDeviceIpv6LoopbackIter struct { + obj *device + deviceIpv6LoopbackSlice []DeviceIpv6Loopback + fieldPtr *[]*otg.DeviceIpv6Loopback +} + +func newDeviceDeviceIpv6LoopbackIter(ptr *[]*otg.DeviceIpv6Loopback) DeviceDeviceIpv6LoopbackIter { + return &deviceDeviceIpv6LoopbackIter{fieldPtr: ptr} +} + +type DeviceDeviceIpv6LoopbackIter interface { + setMsg(*device) DeviceDeviceIpv6LoopbackIter + Items() []DeviceIpv6Loopback + Add() DeviceIpv6Loopback + Append(items ...DeviceIpv6Loopback) DeviceDeviceIpv6LoopbackIter + Set(index int, newObj DeviceIpv6Loopback) DeviceDeviceIpv6LoopbackIter + Clear() DeviceDeviceIpv6LoopbackIter + clearHolderSlice() DeviceDeviceIpv6LoopbackIter + appendHolderSlice(item DeviceIpv6Loopback) DeviceDeviceIpv6LoopbackIter +} + +func (obj *deviceDeviceIpv6LoopbackIter) setMsg(msg *device) DeviceDeviceIpv6LoopbackIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&deviceIpv6Loopback{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceDeviceIpv6LoopbackIter) Items() []DeviceIpv6Loopback { + return obj.deviceIpv6LoopbackSlice +} + +func (obj *deviceDeviceIpv6LoopbackIter) Add() DeviceIpv6Loopback { + newObj := &otg.DeviceIpv6Loopback{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &deviceIpv6Loopback{obj: newObj} + newLibObj.setDefault() + obj.deviceIpv6LoopbackSlice = append(obj.deviceIpv6LoopbackSlice, newLibObj) + return newLibObj +} + +func (obj *deviceDeviceIpv6LoopbackIter) Append(items ...DeviceIpv6Loopback) DeviceDeviceIpv6LoopbackIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.deviceIpv6LoopbackSlice = append(obj.deviceIpv6LoopbackSlice, item) + } + return obj +} + +func (obj *deviceDeviceIpv6LoopbackIter) Set(index int, newObj DeviceIpv6Loopback) DeviceDeviceIpv6LoopbackIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.deviceIpv6LoopbackSlice[index] = newObj + return obj +} +func (obj *deviceDeviceIpv6LoopbackIter) Clear() DeviceDeviceIpv6LoopbackIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.DeviceIpv6Loopback{} + obj.deviceIpv6LoopbackSlice = []DeviceIpv6Loopback{} + } + return obj +} +func (obj *deviceDeviceIpv6LoopbackIter) clearHolderSlice() DeviceDeviceIpv6LoopbackIter { + if len(obj.deviceIpv6LoopbackSlice) > 0 { + obj.deviceIpv6LoopbackSlice = []DeviceIpv6Loopback{} + } + return obj +} +func (obj *deviceDeviceIpv6LoopbackIter) appendHolderSlice(item DeviceIpv6Loopback) DeviceDeviceIpv6LoopbackIter { + obj.deviceIpv6LoopbackSlice = append(obj.deviceIpv6LoopbackSlice, item) + return obj +} + +// The properties of an IS-IS router and its children, such as IS-IS interfaces and route ranges. +// Isis returns a DeviceIsisRouter +func (obj *device) Isis() DeviceIsisRouter { + if obj.obj.Isis == nil { + obj.obj.Isis = NewDeviceIsisRouter().msg() + } + if obj.isisHolder == nil { + obj.isisHolder = &deviceIsisRouter{obj: obj.obj.Isis} + } + return obj.isisHolder +} + +// The properties of an IS-IS router and its children, such as IS-IS interfaces and route ranges. +// Isis returns a DeviceIsisRouter +func (obj *device) HasIsis() bool { + return obj.obj.Isis != nil +} + +// The properties of an IS-IS router and its children, such as IS-IS interfaces and route ranges. +// SetIsis sets the DeviceIsisRouter value in the Device object +func (obj *device) SetIsis(value DeviceIsisRouter) Device { + + obj.isisHolder = nil + obj.obj.Isis = value.msg() + + return obj +} + +// The properties of BGP router and its children, such as BGPv4, BGPv6 peers and their route ranges. +// Bgp returns a DeviceBgpRouter +func (obj *device) Bgp() DeviceBgpRouter { + if obj.obj.Bgp == nil { + obj.obj.Bgp = NewDeviceBgpRouter().msg() + } + if obj.bgpHolder == nil { + obj.bgpHolder = &deviceBgpRouter{obj: obj.obj.Bgp} + } + return obj.bgpHolder +} + +// The properties of BGP router and its children, such as BGPv4, BGPv6 peers and their route ranges. +// Bgp returns a DeviceBgpRouter +func (obj *device) HasBgp() bool { + return obj.obj.Bgp != nil +} + +// The properties of BGP router and its children, such as BGPv4, BGPv6 peers and their route ranges. +// SetBgp sets the DeviceBgpRouter value in the Device object +func (obj *device) SetBgp(value DeviceBgpRouter) Device { + + obj.bgpHolder = nil + obj.obj.Bgp = value.msg() + + return obj +} + +// Configuration of VXLAN tunnel interfaces RFC Ref: https://datatracker.ietf.org/doc/html/rfc7348 +// Vxlan returns a DeviceVxlan +func (obj *device) Vxlan() DeviceVxlan { + if obj.obj.Vxlan == nil { + obj.obj.Vxlan = NewDeviceVxlan().msg() + } + if obj.vxlanHolder == nil { + obj.vxlanHolder = &deviceVxlan{obj: obj.obj.Vxlan} + } + return obj.vxlanHolder +} + +// Configuration of VXLAN tunnel interfaces RFC Ref: https://datatracker.ietf.org/doc/html/rfc7348 +// Vxlan returns a DeviceVxlan +func (obj *device) HasVxlan() bool { + return obj.obj.Vxlan != nil +} + +// Configuration of VXLAN tunnel interfaces RFC Ref: https://datatracker.ietf.org/doc/html/rfc7348 +// SetVxlan sets the DeviceVxlan value in the Device object +func (obj *device) SetVxlan(value DeviceVxlan) Device { + + obj.vxlanHolder = nil + obj.obj.Vxlan = value.msg() + + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *device) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the Device object +func (obj *device) SetName(value string) Device { + + obj.obj.Name = &value + return obj +} + +// The properties of an RSVP router and its children. +// Rsvp returns a DeviceRsvp +func (obj *device) Rsvp() DeviceRsvp { + if obj.obj.Rsvp == nil { + obj.obj.Rsvp = NewDeviceRsvp().msg() + } + if obj.rsvpHolder == nil { + obj.rsvpHolder = &deviceRsvp{obj: obj.obj.Rsvp} + } + return obj.rsvpHolder +} + +// The properties of an RSVP router and its children. +// Rsvp returns a DeviceRsvp +func (obj *device) HasRsvp() bool { + return obj.obj.Rsvp != nil +} + +// The properties of an RSVP router and its children. +// SetRsvp sets the DeviceRsvp value in the Device object +func (obj *device) SetRsvp(value DeviceRsvp) Device { + + obj.rsvpHolder = nil + obj.obj.Rsvp = value.msg() + + return obj +} + +// The properties of DHCP Server and its children, such as DHCPv4, DHCPv6 servers. +// DhcpServer returns a DeviceDhcpServer +func (obj *device) DhcpServer() DeviceDhcpServer { + if obj.obj.DhcpServer == nil { + obj.obj.DhcpServer = NewDeviceDhcpServer().msg() + } + if obj.dhcpServerHolder == nil { + obj.dhcpServerHolder = &deviceDhcpServer{obj: obj.obj.DhcpServer} + } + return obj.dhcpServerHolder +} + +// The properties of DHCP Server and its children, such as DHCPv4, DHCPv6 servers. +// DhcpServer returns a DeviceDhcpServer +func (obj *device) HasDhcpServer() bool { + return obj.obj.DhcpServer != nil +} + +// The properties of DHCP Server and its children, such as DHCPv4, DHCPv6 servers. +// SetDhcpServer sets the DeviceDhcpServer value in the Device object +func (obj *device) SetDhcpServer(value DeviceDhcpServer) Device { + + obj.dhcpServerHolder = nil + obj.obj.DhcpServer = value.msg() + + return obj +} + +// Configuration for OSPFv2 router. +// Ospfv2 returns a DeviceOspfv2Router +func (obj *device) Ospfv2() DeviceOspfv2Router { + if obj.obj.Ospfv2 == nil { + obj.obj.Ospfv2 = NewDeviceOspfv2Router().msg() + } + if obj.ospfv2Holder == nil { + obj.ospfv2Holder = &deviceOspfv2Router{obj: obj.obj.Ospfv2} + } + return obj.ospfv2Holder +} + +// Configuration for OSPFv2 router. +// Ospfv2 returns a DeviceOspfv2Router +func (obj *device) HasOspfv2() bool { + return obj.obj.Ospfv2 != nil +} + +// Configuration for OSPFv2 router. +// SetOspfv2 sets the DeviceOspfv2Router value in the Device object +func (obj *device) SetOspfv2(value DeviceOspfv2Router) Device { + + obj.ospfv2Holder = nil + obj.obj.Ospfv2 = value.msg() + + return obj +} + +func (obj *device) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Ethernets) != 0 { + + if set_default { + obj.Ethernets().clearHolderSlice() + for _, item := range obj.obj.Ethernets { + obj.Ethernets().appendHolderSlice(&deviceEthernet{obj: item}) + } + } + for _, item := range obj.Ethernets().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ipv4Loopbacks) != 0 { + + if set_default { + obj.Ipv4Loopbacks().clearHolderSlice() + for _, item := range obj.obj.Ipv4Loopbacks { + obj.Ipv4Loopbacks().appendHolderSlice(&deviceIpv4Loopback{obj: item}) + } + } + for _, item := range obj.Ipv4Loopbacks().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ipv6Loopbacks) != 0 { + + if set_default { + obj.Ipv6Loopbacks().clearHolderSlice() + for _, item := range obj.obj.Ipv6Loopbacks { + obj.Ipv6Loopbacks().appendHolderSlice(&deviceIpv6Loopback{obj: item}) + } + } + for _, item := range obj.Ipv6Loopbacks().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Isis != nil { + + obj.Isis().validateObj(vObj, set_default) + } + + if obj.obj.Bgp != nil { + + obj.Bgp().validateObj(vObj, set_default) + } + + if obj.obj.Vxlan != nil { + + obj.Vxlan().validateObj(vObj, set_default) + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface Device") + } + + if obj.obj.Rsvp != nil { + + obj.Rsvp().validateObj(vObj, set_default) + } + + if obj.obj.DhcpServer != nil { + + obj.DhcpServer().validateObj(vObj, set_default) + } + + if obj.obj.Ospfv2 != nil { + + obj.Ospfv2().validateObj(vObj, set_default) + } + +} + +func (obj *device) setDefault() { + +} diff --git a/gosnappi/device_bgp_cease_error.go b/gosnappi/device_bgp_cease_error.go new file mode 100644 index 00000000..b3bb2711 --- /dev/null +++ b/gosnappi/device_bgp_cease_error.go @@ -0,0 +1,338 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceBgpCeaseError ***** +type deviceBgpCeaseError struct { + validation + obj *otg.DeviceBgpCeaseError + marshaller marshalDeviceBgpCeaseError + unMarshaller unMarshalDeviceBgpCeaseError +} + +func NewDeviceBgpCeaseError() DeviceBgpCeaseError { + obj := deviceBgpCeaseError{obj: &otg.DeviceBgpCeaseError{}} + obj.setDefault() + return &obj +} + +func (obj *deviceBgpCeaseError) msg() *otg.DeviceBgpCeaseError { + return obj.obj +} + +func (obj *deviceBgpCeaseError) setMsg(msg *otg.DeviceBgpCeaseError) DeviceBgpCeaseError { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceBgpCeaseError struct { + obj *deviceBgpCeaseError +} + +type marshalDeviceBgpCeaseError interface { + // ToProto marshals DeviceBgpCeaseError to protobuf object *otg.DeviceBgpCeaseError + ToProto() (*otg.DeviceBgpCeaseError, error) + // ToPbText marshals DeviceBgpCeaseError to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceBgpCeaseError to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceBgpCeaseError to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceBgpCeaseError struct { + obj *deviceBgpCeaseError +} + +type unMarshalDeviceBgpCeaseError interface { + // FromProto unmarshals DeviceBgpCeaseError from protobuf object *otg.DeviceBgpCeaseError + FromProto(msg *otg.DeviceBgpCeaseError) (DeviceBgpCeaseError, error) + // FromPbText unmarshals DeviceBgpCeaseError from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceBgpCeaseError from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceBgpCeaseError from JSON text + FromJson(value string) error +} + +func (obj *deviceBgpCeaseError) Marshal() marshalDeviceBgpCeaseError { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceBgpCeaseError{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceBgpCeaseError) Unmarshal() unMarshalDeviceBgpCeaseError { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceBgpCeaseError{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceBgpCeaseError) ToProto() (*otg.DeviceBgpCeaseError, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceBgpCeaseError) FromProto(msg *otg.DeviceBgpCeaseError) (DeviceBgpCeaseError, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceBgpCeaseError) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceBgpCeaseError) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceBgpCeaseError) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpCeaseError) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceBgpCeaseError) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpCeaseError) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceBgpCeaseError) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceBgpCeaseError) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceBgpCeaseError) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceBgpCeaseError) Clone() (DeviceBgpCeaseError, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceBgpCeaseError() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceBgpCeaseError is in the absence of any fatal errors, a BGP peer can close its BGP connection by sending the NOTIFICATION message with the Error Code Cease. The 'hard_reset_code6_subcode9' subcode for Cease Notification can be used to signal a hard reset that will indicate that Graceful Restart cannot be performed, even when Notification extensions to Graceful Restart procedure is supported. +type DeviceBgpCeaseError interface { + Validation + // msg marshals DeviceBgpCeaseError to protobuf object *otg.DeviceBgpCeaseError + // and doesn't set defaults + msg() *otg.DeviceBgpCeaseError + // setMsg unmarshals DeviceBgpCeaseError from protobuf object *otg.DeviceBgpCeaseError + // and doesn't set defaults + setMsg(*otg.DeviceBgpCeaseError) DeviceBgpCeaseError + // provides marshal interface + Marshal() marshalDeviceBgpCeaseError + // provides unmarshal interface + Unmarshal() unMarshalDeviceBgpCeaseError + // validate validates DeviceBgpCeaseError + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceBgpCeaseError, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Subcode returns DeviceBgpCeaseErrorSubcodeEnum, set in DeviceBgpCeaseError + Subcode() DeviceBgpCeaseErrorSubcodeEnum + // SetSubcode assigns DeviceBgpCeaseErrorSubcodeEnum provided by user to DeviceBgpCeaseError + SetSubcode(value DeviceBgpCeaseErrorSubcodeEnum) DeviceBgpCeaseError + // HasSubcode checks if Subcode has been set in DeviceBgpCeaseError + HasSubcode() bool +} + +type DeviceBgpCeaseErrorSubcodeEnum string + +// Enum of Subcode on DeviceBgpCeaseError +var DeviceBgpCeaseErrorSubcode = struct { + MAX_NUMBER_PREFIX_REACHED_CODE6_SUBCODE1 DeviceBgpCeaseErrorSubcodeEnum + ADMIN_SHUTDOWN_CODE6_SUBCODE2 DeviceBgpCeaseErrorSubcodeEnum + PEER_DELETED_CODE6_SUBCODE3 DeviceBgpCeaseErrorSubcodeEnum + ADMIN_RESET_CODE6_SUBCODE4 DeviceBgpCeaseErrorSubcodeEnum + CONNECTION_REJECT_CODE6_SUBCODE5 DeviceBgpCeaseErrorSubcodeEnum + OTHER_CONFIG_CHANGES_CODE6_SUBCODE6 DeviceBgpCeaseErrorSubcodeEnum + CONNECTION_COLLISION_RESOLUTION_CODE6_SUBCODE7 DeviceBgpCeaseErrorSubcodeEnum + OUT_OF_RESOURCES_CODE6_SUBCODE8 DeviceBgpCeaseErrorSubcodeEnum + BFD_SESSION_DOWN_CODE6_SUBCODE10 DeviceBgpCeaseErrorSubcodeEnum + HARD_RESET_CODE6_SUBCODE9 DeviceBgpCeaseErrorSubcodeEnum +}{ + MAX_NUMBER_PREFIX_REACHED_CODE6_SUBCODE1: DeviceBgpCeaseErrorSubcodeEnum("max_number_prefix_reached_code6_subcode1"), + ADMIN_SHUTDOWN_CODE6_SUBCODE2: DeviceBgpCeaseErrorSubcodeEnum("admin_shutdown_code6_subcode2"), + PEER_DELETED_CODE6_SUBCODE3: DeviceBgpCeaseErrorSubcodeEnum("peer_deleted_code6_subcode3"), + ADMIN_RESET_CODE6_SUBCODE4: DeviceBgpCeaseErrorSubcodeEnum("admin_reset_code6_subcode4"), + CONNECTION_REJECT_CODE6_SUBCODE5: DeviceBgpCeaseErrorSubcodeEnum("connection_reject_code6_subcode5"), + OTHER_CONFIG_CHANGES_CODE6_SUBCODE6: DeviceBgpCeaseErrorSubcodeEnum("other_config_changes_code6_subcode6"), + CONNECTION_COLLISION_RESOLUTION_CODE6_SUBCODE7: DeviceBgpCeaseErrorSubcodeEnum("connection_collision_resolution_code6_subcode7"), + OUT_OF_RESOURCES_CODE6_SUBCODE8: DeviceBgpCeaseErrorSubcodeEnum("out_of_resources_code6_subcode8"), + BFD_SESSION_DOWN_CODE6_SUBCODE10: DeviceBgpCeaseErrorSubcodeEnum("bfd_session_down_code6_subcode10"), + HARD_RESET_CODE6_SUBCODE9: DeviceBgpCeaseErrorSubcodeEnum("hard_reset_code6_subcode9"), +} + +func (obj *deviceBgpCeaseError) Subcode() DeviceBgpCeaseErrorSubcodeEnum { + return DeviceBgpCeaseErrorSubcodeEnum(obj.obj.Subcode.Enum().String()) +} + +// The Error Subcode to be sent to the peer in the Cease NOTIFICATION. +// Subcode returns a string +func (obj *deviceBgpCeaseError) HasSubcode() bool { + return obj.obj.Subcode != nil +} + +func (obj *deviceBgpCeaseError) SetSubcode(value DeviceBgpCeaseErrorSubcodeEnum) DeviceBgpCeaseError { + intValue, ok := otg.DeviceBgpCeaseError_Subcode_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on DeviceBgpCeaseErrorSubcodeEnum", string(value))) + return obj + } + enumValue := otg.DeviceBgpCeaseError_Subcode_Enum(intValue) + obj.obj.Subcode = &enumValue + + return obj +} + +func (obj *deviceBgpCeaseError) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *deviceBgpCeaseError) setDefault() { + if obj.obj.Subcode == nil { + obj.SetSubcode(DeviceBgpCeaseErrorSubcode.ADMIN_SHUTDOWN_CODE6_SUBCODE2) + + } + +} diff --git a/gosnappi/device_bgp_custom_error.go b/gosnappi/device_bgp_custom_error.go new file mode 100644 index 00000000..a7051e57 --- /dev/null +++ b/gosnappi/device_bgp_custom_error.go @@ -0,0 +1,334 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceBgpCustomError ***** +type deviceBgpCustomError struct { + validation + obj *otg.DeviceBgpCustomError + marshaller marshalDeviceBgpCustomError + unMarshaller unMarshalDeviceBgpCustomError +} + +func NewDeviceBgpCustomError() DeviceBgpCustomError { + obj := deviceBgpCustomError{obj: &otg.DeviceBgpCustomError{}} + obj.setDefault() + return &obj +} + +func (obj *deviceBgpCustomError) msg() *otg.DeviceBgpCustomError { + return obj.obj +} + +func (obj *deviceBgpCustomError) setMsg(msg *otg.DeviceBgpCustomError) DeviceBgpCustomError { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceBgpCustomError struct { + obj *deviceBgpCustomError +} + +type marshalDeviceBgpCustomError interface { + // ToProto marshals DeviceBgpCustomError to protobuf object *otg.DeviceBgpCustomError + ToProto() (*otg.DeviceBgpCustomError, error) + // ToPbText marshals DeviceBgpCustomError to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceBgpCustomError to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceBgpCustomError to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceBgpCustomError struct { + obj *deviceBgpCustomError +} + +type unMarshalDeviceBgpCustomError interface { + // FromProto unmarshals DeviceBgpCustomError from protobuf object *otg.DeviceBgpCustomError + FromProto(msg *otg.DeviceBgpCustomError) (DeviceBgpCustomError, error) + // FromPbText unmarshals DeviceBgpCustomError from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceBgpCustomError from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceBgpCustomError from JSON text + FromJson(value string) error +} + +func (obj *deviceBgpCustomError) Marshal() marshalDeviceBgpCustomError { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceBgpCustomError{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceBgpCustomError) Unmarshal() unMarshalDeviceBgpCustomError { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceBgpCustomError{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceBgpCustomError) ToProto() (*otg.DeviceBgpCustomError, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceBgpCustomError) FromProto(msg *otg.DeviceBgpCustomError) (DeviceBgpCustomError, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceBgpCustomError) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceBgpCustomError) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceBgpCustomError) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpCustomError) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceBgpCustomError) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpCustomError) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceBgpCustomError) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceBgpCustomError) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceBgpCustomError) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceBgpCustomError) Clone() (DeviceBgpCustomError, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceBgpCustomError() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceBgpCustomError is a BGP peer can send NOTIFICATION message with user defined Error Code and Error Subcode. +type DeviceBgpCustomError interface { + Validation + // msg marshals DeviceBgpCustomError to protobuf object *otg.DeviceBgpCustomError + // and doesn't set defaults + msg() *otg.DeviceBgpCustomError + // setMsg unmarshals DeviceBgpCustomError from protobuf object *otg.DeviceBgpCustomError + // and doesn't set defaults + setMsg(*otg.DeviceBgpCustomError) DeviceBgpCustomError + // provides marshal interface + Marshal() marshalDeviceBgpCustomError + // provides unmarshal interface + Unmarshal() unMarshalDeviceBgpCustomError + // validate validates DeviceBgpCustomError + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceBgpCustomError, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Code returns uint32, set in DeviceBgpCustomError. + Code() uint32 + // SetCode assigns uint32 provided by user to DeviceBgpCustomError + SetCode(value uint32) DeviceBgpCustomError + // HasCode checks if Code has been set in DeviceBgpCustomError + HasCode() bool + // Subcode returns uint32, set in DeviceBgpCustomError. + Subcode() uint32 + // SetSubcode assigns uint32 provided by user to DeviceBgpCustomError + SetSubcode(value uint32) DeviceBgpCustomError + // HasSubcode checks if Subcode has been set in DeviceBgpCustomError + HasSubcode() bool +} + +// The Error code to be sent in the NOTIFICATION message to peer. +// Code returns a uint32 +func (obj *deviceBgpCustomError) Code() uint32 { + + return *obj.obj.Code + +} + +// The Error code to be sent in the NOTIFICATION message to peer. +// Code returns a uint32 +func (obj *deviceBgpCustomError) HasCode() bool { + return obj.obj.Code != nil +} + +// The Error code to be sent in the NOTIFICATION message to peer. +// SetCode sets the uint32 value in the DeviceBgpCustomError object +func (obj *deviceBgpCustomError) SetCode(value uint32) DeviceBgpCustomError { + + obj.obj.Code = &value + return obj +} + +// The Error Subcode to be sent in the NOTIFICATION message to peer. +// Subcode returns a uint32 +func (obj *deviceBgpCustomError) Subcode() uint32 { + + return *obj.obj.Subcode + +} + +// The Error Subcode to be sent in the NOTIFICATION message to peer. +// Subcode returns a uint32 +func (obj *deviceBgpCustomError) HasSubcode() bool { + return obj.obj.Subcode != nil +} + +// The Error Subcode to be sent in the NOTIFICATION message to peer. +// SetSubcode sets the uint32 value in the DeviceBgpCustomError object +func (obj *deviceBgpCustomError) SetSubcode(value uint32) DeviceBgpCustomError { + + obj.obj.Subcode = &value + return obj +} + +func (obj *deviceBgpCustomError) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *deviceBgpCustomError) setDefault() { + +} diff --git a/gosnappi/device_bgp_finite_state_machine_error.go b/gosnappi/device_bgp_finite_state_machine_error.go new file mode 100644 index 00000000..a099c955 --- /dev/null +++ b/gosnappi/device_bgp_finite_state_machine_error.go @@ -0,0 +1,278 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceBgpFiniteStateMachineError ***** +type deviceBgpFiniteStateMachineError struct { + validation + obj *otg.DeviceBgpFiniteStateMachineError + marshaller marshalDeviceBgpFiniteStateMachineError + unMarshaller unMarshalDeviceBgpFiniteStateMachineError +} + +func NewDeviceBgpFiniteStateMachineError() DeviceBgpFiniteStateMachineError { + obj := deviceBgpFiniteStateMachineError{obj: &otg.DeviceBgpFiniteStateMachineError{}} + obj.setDefault() + return &obj +} + +func (obj *deviceBgpFiniteStateMachineError) msg() *otg.DeviceBgpFiniteStateMachineError { + return obj.obj +} + +func (obj *deviceBgpFiniteStateMachineError) setMsg(msg *otg.DeviceBgpFiniteStateMachineError) DeviceBgpFiniteStateMachineError { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceBgpFiniteStateMachineError struct { + obj *deviceBgpFiniteStateMachineError +} + +type marshalDeviceBgpFiniteStateMachineError interface { + // ToProto marshals DeviceBgpFiniteStateMachineError to protobuf object *otg.DeviceBgpFiniteStateMachineError + ToProto() (*otg.DeviceBgpFiniteStateMachineError, error) + // ToPbText marshals DeviceBgpFiniteStateMachineError to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceBgpFiniteStateMachineError to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceBgpFiniteStateMachineError to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceBgpFiniteStateMachineError struct { + obj *deviceBgpFiniteStateMachineError +} + +type unMarshalDeviceBgpFiniteStateMachineError interface { + // FromProto unmarshals DeviceBgpFiniteStateMachineError from protobuf object *otg.DeviceBgpFiniteStateMachineError + FromProto(msg *otg.DeviceBgpFiniteStateMachineError) (DeviceBgpFiniteStateMachineError, error) + // FromPbText unmarshals DeviceBgpFiniteStateMachineError from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceBgpFiniteStateMachineError from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceBgpFiniteStateMachineError from JSON text + FromJson(value string) error +} + +func (obj *deviceBgpFiniteStateMachineError) Marshal() marshalDeviceBgpFiniteStateMachineError { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceBgpFiniteStateMachineError{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceBgpFiniteStateMachineError) Unmarshal() unMarshalDeviceBgpFiniteStateMachineError { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceBgpFiniteStateMachineError{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceBgpFiniteStateMachineError) ToProto() (*otg.DeviceBgpFiniteStateMachineError, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceBgpFiniteStateMachineError) FromProto(msg *otg.DeviceBgpFiniteStateMachineError) (DeviceBgpFiniteStateMachineError, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceBgpFiniteStateMachineError) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceBgpFiniteStateMachineError) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceBgpFiniteStateMachineError) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpFiniteStateMachineError) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceBgpFiniteStateMachineError) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpFiniteStateMachineError) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceBgpFiniteStateMachineError) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceBgpFiniteStateMachineError) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceBgpFiniteStateMachineError) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceBgpFiniteStateMachineError) Clone() (DeviceBgpFiniteStateMachineError, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceBgpFiniteStateMachineError() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceBgpFiniteStateMachineError is any error detected by the BGP Finite State Machine (e.g., receipt of an unexpected event) is indicated by sending the NOTIFICATION message with the Error Code-Finite State Machine Error(Error Code 5). The Sub Code used is 0. If a user wants to use non zero Sub Code then CustomError can be used. +type DeviceBgpFiniteStateMachineError interface { + Validation + // msg marshals DeviceBgpFiniteStateMachineError to protobuf object *otg.DeviceBgpFiniteStateMachineError + // and doesn't set defaults + msg() *otg.DeviceBgpFiniteStateMachineError + // setMsg unmarshals DeviceBgpFiniteStateMachineError from protobuf object *otg.DeviceBgpFiniteStateMachineError + // and doesn't set defaults + setMsg(*otg.DeviceBgpFiniteStateMachineError) DeviceBgpFiniteStateMachineError + // provides marshal interface + Marshal() marshalDeviceBgpFiniteStateMachineError + // provides unmarshal interface + Unmarshal() unMarshalDeviceBgpFiniteStateMachineError + // validate validates DeviceBgpFiniteStateMachineError + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceBgpFiniteStateMachineError, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() +} + +func (obj *deviceBgpFiniteStateMachineError) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *deviceBgpFiniteStateMachineError) setDefault() { + +} diff --git a/gosnappi/device_bgp_hold_timer_expired.go b/gosnappi/device_bgp_hold_timer_expired.go new file mode 100644 index 00000000..9517e2b2 --- /dev/null +++ b/gosnappi/device_bgp_hold_timer_expired.go @@ -0,0 +1,278 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceBgpHoldTimerExpired ***** +type deviceBgpHoldTimerExpired struct { + validation + obj *otg.DeviceBgpHoldTimerExpired + marshaller marshalDeviceBgpHoldTimerExpired + unMarshaller unMarshalDeviceBgpHoldTimerExpired +} + +func NewDeviceBgpHoldTimerExpired() DeviceBgpHoldTimerExpired { + obj := deviceBgpHoldTimerExpired{obj: &otg.DeviceBgpHoldTimerExpired{}} + obj.setDefault() + return &obj +} + +func (obj *deviceBgpHoldTimerExpired) msg() *otg.DeviceBgpHoldTimerExpired { + return obj.obj +} + +func (obj *deviceBgpHoldTimerExpired) setMsg(msg *otg.DeviceBgpHoldTimerExpired) DeviceBgpHoldTimerExpired { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceBgpHoldTimerExpired struct { + obj *deviceBgpHoldTimerExpired +} + +type marshalDeviceBgpHoldTimerExpired interface { + // ToProto marshals DeviceBgpHoldTimerExpired to protobuf object *otg.DeviceBgpHoldTimerExpired + ToProto() (*otg.DeviceBgpHoldTimerExpired, error) + // ToPbText marshals DeviceBgpHoldTimerExpired to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceBgpHoldTimerExpired to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceBgpHoldTimerExpired to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceBgpHoldTimerExpired struct { + obj *deviceBgpHoldTimerExpired +} + +type unMarshalDeviceBgpHoldTimerExpired interface { + // FromProto unmarshals DeviceBgpHoldTimerExpired from protobuf object *otg.DeviceBgpHoldTimerExpired + FromProto(msg *otg.DeviceBgpHoldTimerExpired) (DeviceBgpHoldTimerExpired, error) + // FromPbText unmarshals DeviceBgpHoldTimerExpired from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceBgpHoldTimerExpired from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceBgpHoldTimerExpired from JSON text + FromJson(value string) error +} + +func (obj *deviceBgpHoldTimerExpired) Marshal() marshalDeviceBgpHoldTimerExpired { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceBgpHoldTimerExpired{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceBgpHoldTimerExpired) Unmarshal() unMarshalDeviceBgpHoldTimerExpired { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceBgpHoldTimerExpired{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceBgpHoldTimerExpired) ToProto() (*otg.DeviceBgpHoldTimerExpired, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceBgpHoldTimerExpired) FromProto(msg *otg.DeviceBgpHoldTimerExpired) (DeviceBgpHoldTimerExpired, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceBgpHoldTimerExpired) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceBgpHoldTimerExpired) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceBgpHoldTimerExpired) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpHoldTimerExpired) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceBgpHoldTimerExpired) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpHoldTimerExpired) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceBgpHoldTimerExpired) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceBgpHoldTimerExpired) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceBgpHoldTimerExpired) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceBgpHoldTimerExpired) Clone() (DeviceBgpHoldTimerExpired, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceBgpHoldTimerExpired() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceBgpHoldTimerExpired is if a system does not receive successive KEEPALIVE, UPDATE, and/or NOTIFICATION messages within the period specified in the Hold Time field of the OPEN message, then the NOTIFICATION message with the Hold Timer Expired Error Code(Error Code 4) is sent and the BGP connection is closed. The Sub Code used is 0. If a user wants to use non zero Sub Code then CustomError can be used. +type DeviceBgpHoldTimerExpired interface { + Validation + // msg marshals DeviceBgpHoldTimerExpired to protobuf object *otg.DeviceBgpHoldTimerExpired + // and doesn't set defaults + msg() *otg.DeviceBgpHoldTimerExpired + // setMsg unmarshals DeviceBgpHoldTimerExpired from protobuf object *otg.DeviceBgpHoldTimerExpired + // and doesn't set defaults + setMsg(*otg.DeviceBgpHoldTimerExpired) DeviceBgpHoldTimerExpired + // provides marshal interface + Marshal() marshalDeviceBgpHoldTimerExpired + // provides unmarshal interface + Unmarshal() unMarshalDeviceBgpHoldTimerExpired + // validate validates DeviceBgpHoldTimerExpired + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceBgpHoldTimerExpired, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() +} + +func (obj *deviceBgpHoldTimerExpired) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *deviceBgpHoldTimerExpired) setDefault() { + +} diff --git a/gosnappi/device_bgp_message_header_error.go b/gosnappi/device_bgp_message_header_error.go new file mode 100644 index 00000000..f9fd9b6f --- /dev/null +++ b/gosnappi/device_bgp_message_header_error.go @@ -0,0 +1,324 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceBgpMessageHeaderError ***** +type deviceBgpMessageHeaderError struct { + validation + obj *otg.DeviceBgpMessageHeaderError + marshaller marshalDeviceBgpMessageHeaderError + unMarshaller unMarshalDeviceBgpMessageHeaderError +} + +func NewDeviceBgpMessageHeaderError() DeviceBgpMessageHeaderError { + obj := deviceBgpMessageHeaderError{obj: &otg.DeviceBgpMessageHeaderError{}} + obj.setDefault() + return &obj +} + +func (obj *deviceBgpMessageHeaderError) msg() *otg.DeviceBgpMessageHeaderError { + return obj.obj +} + +func (obj *deviceBgpMessageHeaderError) setMsg(msg *otg.DeviceBgpMessageHeaderError) DeviceBgpMessageHeaderError { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceBgpMessageHeaderError struct { + obj *deviceBgpMessageHeaderError +} + +type marshalDeviceBgpMessageHeaderError interface { + // ToProto marshals DeviceBgpMessageHeaderError to protobuf object *otg.DeviceBgpMessageHeaderError + ToProto() (*otg.DeviceBgpMessageHeaderError, error) + // ToPbText marshals DeviceBgpMessageHeaderError to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceBgpMessageHeaderError to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceBgpMessageHeaderError to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceBgpMessageHeaderError struct { + obj *deviceBgpMessageHeaderError +} + +type unMarshalDeviceBgpMessageHeaderError interface { + // FromProto unmarshals DeviceBgpMessageHeaderError from protobuf object *otg.DeviceBgpMessageHeaderError + FromProto(msg *otg.DeviceBgpMessageHeaderError) (DeviceBgpMessageHeaderError, error) + // FromPbText unmarshals DeviceBgpMessageHeaderError from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceBgpMessageHeaderError from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceBgpMessageHeaderError from JSON text + FromJson(value string) error +} + +func (obj *deviceBgpMessageHeaderError) Marshal() marshalDeviceBgpMessageHeaderError { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceBgpMessageHeaderError{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceBgpMessageHeaderError) Unmarshal() unMarshalDeviceBgpMessageHeaderError { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceBgpMessageHeaderError{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceBgpMessageHeaderError) ToProto() (*otg.DeviceBgpMessageHeaderError, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceBgpMessageHeaderError) FromProto(msg *otg.DeviceBgpMessageHeaderError) (DeviceBgpMessageHeaderError, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceBgpMessageHeaderError) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceBgpMessageHeaderError) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceBgpMessageHeaderError) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpMessageHeaderError) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceBgpMessageHeaderError) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpMessageHeaderError) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceBgpMessageHeaderError) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceBgpMessageHeaderError) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceBgpMessageHeaderError) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceBgpMessageHeaderError) Clone() (DeviceBgpMessageHeaderError, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceBgpMessageHeaderError() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceBgpMessageHeaderError is all errors detected while processing the Message Header are indicated by sending the NOTIFICATION message with the Error Code-Message Header Error. The Error Subcode elaborates on the specific nature of the error. +type DeviceBgpMessageHeaderError interface { + Validation + // msg marshals DeviceBgpMessageHeaderError to protobuf object *otg.DeviceBgpMessageHeaderError + // and doesn't set defaults + msg() *otg.DeviceBgpMessageHeaderError + // setMsg unmarshals DeviceBgpMessageHeaderError from protobuf object *otg.DeviceBgpMessageHeaderError + // and doesn't set defaults + setMsg(*otg.DeviceBgpMessageHeaderError) DeviceBgpMessageHeaderError + // provides marshal interface + Marshal() marshalDeviceBgpMessageHeaderError + // provides unmarshal interface + Unmarshal() unMarshalDeviceBgpMessageHeaderError + // validate validates DeviceBgpMessageHeaderError + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceBgpMessageHeaderError, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Subcode returns DeviceBgpMessageHeaderErrorSubcodeEnum, set in DeviceBgpMessageHeaderError + Subcode() DeviceBgpMessageHeaderErrorSubcodeEnum + // SetSubcode assigns DeviceBgpMessageHeaderErrorSubcodeEnum provided by user to DeviceBgpMessageHeaderError + SetSubcode(value DeviceBgpMessageHeaderErrorSubcodeEnum) DeviceBgpMessageHeaderError + // HasSubcode checks if Subcode has been set in DeviceBgpMessageHeaderError + HasSubcode() bool +} + +type DeviceBgpMessageHeaderErrorSubcodeEnum string + +// Enum of Subcode on DeviceBgpMessageHeaderError +var DeviceBgpMessageHeaderErrorSubcode = struct { + CONNECTION_NOT_SYNCHRONIZED_CODE1_SUBCODE1 DeviceBgpMessageHeaderErrorSubcodeEnum + BAD_MESSAGE_LENGTH_CODE1_SUBCODE2 DeviceBgpMessageHeaderErrorSubcodeEnum + BAD_MESSAGE_TYPE_CODE1_SUBCODE3 DeviceBgpMessageHeaderErrorSubcodeEnum +}{ + CONNECTION_NOT_SYNCHRONIZED_CODE1_SUBCODE1: DeviceBgpMessageHeaderErrorSubcodeEnum("connection_not_synchronized_code1_subcode1"), + BAD_MESSAGE_LENGTH_CODE1_SUBCODE2: DeviceBgpMessageHeaderErrorSubcodeEnum("bad_message_length_code1_subcode2"), + BAD_MESSAGE_TYPE_CODE1_SUBCODE3: DeviceBgpMessageHeaderErrorSubcodeEnum("bad_message_type_code1_subcode3"), +} + +func (obj *deviceBgpMessageHeaderError) Subcode() DeviceBgpMessageHeaderErrorSubcodeEnum { + return DeviceBgpMessageHeaderErrorSubcodeEnum(obj.obj.Subcode.Enum().String()) +} + +// The Error Subcode indicates the specific type of error encountered during Message Header processing. +// Subcode returns a string +func (obj *deviceBgpMessageHeaderError) HasSubcode() bool { + return obj.obj.Subcode != nil +} + +func (obj *deviceBgpMessageHeaderError) SetSubcode(value DeviceBgpMessageHeaderErrorSubcodeEnum) DeviceBgpMessageHeaderError { + intValue, ok := otg.DeviceBgpMessageHeaderError_Subcode_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on DeviceBgpMessageHeaderErrorSubcodeEnum", string(value))) + return obj + } + enumValue := otg.DeviceBgpMessageHeaderError_Subcode_Enum(intValue) + obj.obj.Subcode = &enumValue + + return obj +} + +func (obj *deviceBgpMessageHeaderError) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *deviceBgpMessageHeaderError) setDefault() { + if obj.obj.Subcode == nil { + obj.SetSubcode(DeviceBgpMessageHeaderErrorSubcode.CONNECTION_NOT_SYNCHRONIZED_CODE1_SUBCODE1) + + } + +} diff --git a/gosnappi/device_bgp_open_message_error.go b/gosnappi/device_bgp_open_message_error.go new file mode 100644 index 00000000..b4cb9c9a --- /dev/null +++ b/gosnappi/device_bgp_open_message_error.go @@ -0,0 +1,332 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceBgpOpenMessageError ***** +type deviceBgpOpenMessageError struct { + validation + obj *otg.DeviceBgpOpenMessageError + marshaller marshalDeviceBgpOpenMessageError + unMarshaller unMarshalDeviceBgpOpenMessageError +} + +func NewDeviceBgpOpenMessageError() DeviceBgpOpenMessageError { + obj := deviceBgpOpenMessageError{obj: &otg.DeviceBgpOpenMessageError{}} + obj.setDefault() + return &obj +} + +func (obj *deviceBgpOpenMessageError) msg() *otg.DeviceBgpOpenMessageError { + return obj.obj +} + +func (obj *deviceBgpOpenMessageError) setMsg(msg *otg.DeviceBgpOpenMessageError) DeviceBgpOpenMessageError { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceBgpOpenMessageError struct { + obj *deviceBgpOpenMessageError +} + +type marshalDeviceBgpOpenMessageError interface { + // ToProto marshals DeviceBgpOpenMessageError to protobuf object *otg.DeviceBgpOpenMessageError + ToProto() (*otg.DeviceBgpOpenMessageError, error) + // ToPbText marshals DeviceBgpOpenMessageError to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceBgpOpenMessageError to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceBgpOpenMessageError to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceBgpOpenMessageError struct { + obj *deviceBgpOpenMessageError +} + +type unMarshalDeviceBgpOpenMessageError interface { + // FromProto unmarshals DeviceBgpOpenMessageError from protobuf object *otg.DeviceBgpOpenMessageError + FromProto(msg *otg.DeviceBgpOpenMessageError) (DeviceBgpOpenMessageError, error) + // FromPbText unmarshals DeviceBgpOpenMessageError from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceBgpOpenMessageError from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceBgpOpenMessageError from JSON text + FromJson(value string) error +} + +func (obj *deviceBgpOpenMessageError) Marshal() marshalDeviceBgpOpenMessageError { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceBgpOpenMessageError{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceBgpOpenMessageError) Unmarshal() unMarshalDeviceBgpOpenMessageError { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceBgpOpenMessageError{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceBgpOpenMessageError) ToProto() (*otg.DeviceBgpOpenMessageError, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceBgpOpenMessageError) FromProto(msg *otg.DeviceBgpOpenMessageError) (DeviceBgpOpenMessageError, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceBgpOpenMessageError) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceBgpOpenMessageError) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceBgpOpenMessageError) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpOpenMessageError) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceBgpOpenMessageError) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpOpenMessageError) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceBgpOpenMessageError) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceBgpOpenMessageError) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceBgpOpenMessageError) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceBgpOpenMessageError) Clone() (DeviceBgpOpenMessageError, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceBgpOpenMessageError() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceBgpOpenMessageError is all errors detected while processing the OPEN message are indicated by sending the NOTIFICATION message with the Error Code-Open Message Error. The Error Subcode elaborates on the specific nature of the error. +type DeviceBgpOpenMessageError interface { + Validation + // msg marshals DeviceBgpOpenMessageError to protobuf object *otg.DeviceBgpOpenMessageError + // and doesn't set defaults + msg() *otg.DeviceBgpOpenMessageError + // setMsg unmarshals DeviceBgpOpenMessageError from protobuf object *otg.DeviceBgpOpenMessageError + // and doesn't set defaults + setMsg(*otg.DeviceBgpOpenMessageError) DeviceBgpOpenMessageError + // provides marshal interface + Marshal() marshalDeviceBgpOpenMessageError + // provides unmarshal interface + Unmarshal() unMarshalDeviceBgpOpenMessageError + // validate validates DeviceBgpOpenMessageError + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceBgpOpenMessageError, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Subcode returns DeviceBgpOpenMessageErrorSubcodeEnum, set in DeviceBgpOpenMessageError + Subcode() DeviceBgpOpenMessageErrorSubcodeEnum + // SetSubcode assigns DeviceBgpOpenMessageErrorSubcodeEnum provided by user to DeviceBgpOpenMessageError + SetSubcode(value DeviceBgpOpenMessageErrorSubcodeEnum) DeviceBgpOpenMessageError + // HasSubcode checks if Subcode has been set in DeviceBgpOpenMessageError + HasSubcode() bool +} + +type DeviceBgpOpenMessageErrorSubcodeEnum string + +// Enum of Subcode on DeviceBgpOpenMessageError +var DeviceBgpOpenMessageErrorSubcode = struct { + UNSUPPORTED_VERSION_NUMBER_CODE2_SUBCODE1 DeviceBgpOpenMessageErrorSubcodeEnum + ERROR_PEER_AS_CODE2_SUBCODE2 DeviceBgpOpenMessageErrorSubcodeEnum + ERROR_BGP_ID_CODE2_SUBCODE3 DeviceBgpOpenMessageErrorSubcodeEnum + UNSUPPORTED_OPTIONAL_PARAMETER_CODE2_SUBCODE4 DeviceBgpOpenMessageErrorSubcodeEnum + AUTH_FAILED_CODE2_SUBCODE5 DeviceBgpOpenMessageErrorSubcodeEnum + UNSUPPORTED_HOLD_TIME_CODE2_SUBCODE6 DeviceBgpOpenMessageErrorSubcodeEnum + UNSUPPORTED_CAPABILITY_CODE2_SUBCODE7 DeviceBgpOpenMessageErrorSubcodeEnum +}{ + UNSUPPORTED_VERSION_NUMBER_CODE2_SUBCODE1: DeviceBgpOpenMessageErrorSubcodeEnum("unsupported_version_number_code2_subcode1"), + ERROR_PEER_AS_CODE2_SUBCODE2: DeviceBgpOpenMessageErrorSubcodeEnum("error_peer_as_code2_subcode2"), + ERROR_BGP_ID_CODE2_SUBCODE3: DeviceBgpOpenMessageErrorSubcodeEnum("error_bgp_id_code2_subcode3"), + UNSUPPORTED_OPTIONAL_PARAMETER_CODE2_SUBCODE4: DeviceBgpOpenMessageErrorSubcodeEnum("unsupported_optional_parameter_code2_subcode4"), + AUTH_FAILED_CODE2_SUBCODE5: DeviceBgpOpenMessageErrorSubcodeEnum("auth_failed_code2_subcode5"), + UNSUPPORTED_HOLD_TIME_CODE2_SUBCODE6: DeviceBgpOpenMessageErrorSubcodeEnum("unsupported_hold_time_code2_subcode6"), + UNSUPPORTED_CAPABILITY_CODE2_SUBCODE7: DeviceBgpOpenMessageErrorSubcodeEnum("unsupported_capability_code2_subcode7"), +} + +func (obj *deviceBgpOpenMessageError) Subcode() DeviceBgpOpenMessageErrorSubcodeEnum { + return DeviceBgpOpenMessageErrorSubcodeEnum(obj.obj.Subcode.Enum().String()) +} + +// The Error Subcode indicates the specific type of error encountered during OPEN message processing. +// Subcode returns a string +func (obj *deviceBgpOpenMessageError) HasSubcode() bool { + return obj.obj.Subcode != nil +} + +func (obj *deviceBgpOpenMessageError) SetSubcode(value DeviceBgpOpenMessageErrorSubcodeEnum) DeviceBgpOpenMessageError { + intValue, ok := otg.DeviceBgpOpenMessageError_Subcode_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on DeviceBgpOpenMessageErrorSubcodeEnum", string(value))) + return obj + } + enumValue := otg.DeviceBgpOpenMessageError_Subcode_Enum(intValue) + obj.obj.Subcode = &enumValue + + return obj +} + +func (obj *deviceBgpOpenMessageError) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *deviceBgpOpenMessageError) setDefault() { + if obj.obj.Subcode == nil { + obj.SetSubcode(DeviceBgpOpenMessageErrorSubcode.UNSUPPORTED_VERSION_NUMBER_CODE2_SUBCODE1) + + } + +} diff --git a/gosnappi/device_bgp_router.go b/gosnappi/device_bgp_router.go new file mode 100644 index 00000000..0b574eab --- /dev/null +++ b/gosnappi/device_bgp_router.go @@ -0,0 +1,528 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceBgpRouter ***** +type deviceBgpRouter struct { + validation + obj *otg.DeviceBgpRouter + marshaller marshalDeviceBgpRouter + unMarshaller unMarshalDeviceBgpRouter + ipv4InterfacesHolder DeviceBgpRouterBgpV4InterfaceIter + ipv6InterfacesHolder DeviceBgpRouterBgpV6InterfaceIter +} + +func NewDeviceBgpRouter() DeviceBgpRouter { + obj := deviceBgpRouter{obj: &otg.DeviceBgpRouter{}} + obj.setDefault() + return &obj +} + +func (obj *deviceBgpRouter) msg() *otg.DeviceBgpRouter { + return obj.obj +} + +func (obj *deviceBgpRouter) setMsg(msg *otg.DeviceBgpRouter) DeviceBgpRouter { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceBgpRouter struct { + obj *deviceBgpRouter +} + +type marshalDeviceBgpRouter interface { + // ToProto marshals DeviceBgpRouter to protobuf object *otg.DeviceBgpRouter + ToProto() (*otg.DeviceBgpRouter, error) + // ToPbText marshals DeviceBgpRouter to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceBgpRouter to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceBgpRouter to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceBgpRouter struct { + obj *deviceBgpRouter +} + +type unMarshalDeviceBgpRouter interface { + // FromProto unmarshals DeviceBgpRouter from protobuf object *otg.DeviceBgpRouter + FromProto(msg *otg.DeviceBgpRouter) (DeviceBgpRouter, error) + // FromPbText unmarshals DeviceBgpRouter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceBgpRouter from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceBgpRouter from JSON text + FromJson(value string) error +} + +func (obj *deviceBgpRouter) Marshal() marshalDeviceBgpRouter { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceBgpRouter{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceBgpRouter) Unmarshal() unMarshalDeviceBgpRouter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceBgpRouter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceBgpRouter) ToProto() (*otg.DeviceBgpRouter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceBgpRouter) FromProto(msg *otg.DeviceBgpRouter) (DeviceBgpRouter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceBgpRouter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceBgpRouter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceBgpRouter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpRouter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceBgpRouter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpRouter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceBgpRouter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceBgpRouter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceBgpRouter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceBgpRouter) Clone() (DeviceBgpRouter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceBgpRouter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceBgpRouter) setNil() { + obj.ipv4InterfacesHolder = nil + obj.ipv6InterfacesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceBgpRouter is configuration for one or more IPv4 or IPv6 BGP peers. +type DeviceBgpRouter interface { + Validation + // msg marshals DeviceBgpRouter to protobuf object *otg.DeviceBgpRouter + // and doesn't set defaults + msg() *otg.DeviceBgpRouter + // setMsg unmarshals DeviceBgpRouter from protobuf object *otg.DeviceBgpRouter + // and doesn't set defaults + setMsg(*otg.DeviceBgpRouter) DeviceBgpRouter + // provides marshal interface + Marshal() marshalDeviceBgpRouter + // provides unmarshal interface + Unmarshal() unMarshalDeviceBgpRouter + // validate validates DeviceBgpRouter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceBgpRouter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RouterId returns string, set in DeviceBgpRouter. + RouterId() string + // SetRouterId assigns string provided by user to DeviceBgpRouter + SetRouterId(value string) DeviceBgpRouter + // Ipv4Interfaces returns DeviceBgpRouterBgpV4InterfaceIterIter, set in DeviceBgpRouter + Ipv4Interfaces() DeviceBgpRouterBgpV4InterfaceIter + // Ipv6Interfaces returns DeviceBgpRouterBgpV6InterfaceIterIter, set in DeviceBgpRouter + Ipv6Interfaces() DeviceBgpRouterBgpV6InterfaceIter + setNil() +} + +// The BGP router ID is a unique identifier used by BGP. It is a 32-bit value that is often represented by an IPv4 address. +// RouterId returns a string +func (obj *deviceBgpRouter) RouterId() string { + + return *obj.obj.RouterId + +} + +// The BGP router ID is a unique identifier used by BGP. It is a 32-bit value that is often represented by an IPv4 address. +// SetRouterId sets the string value in the DeviceBgpRouter object +func (obj *deviceBgpRouter) SetRouterId(value string) DeviceBgpRouter { + + obj.obj.RouterId = &value + return obj +} + +// This contains an array of references to IPv4 interfaces, each of which will have list of peers to different destinations. +// Ipv4Interfaces returns a []BgpV4Interface +func (obj *deviceBgpRouter) Ipv4Interfaces() DeviceBgpRouterBgpV4InterfaceIter { + if len(obj.obj.Ipv4Interfaces) == 0 { + obj.obj.Ipv4Interfaces = []*otg.BgpV4Interface{} + } + if obj.ipv4InterfacesHolder == nil { + obj.ipv4InterfacesHolder = newDeviceBgpRouterBgpV4InterfaceIter(&obj.obj.Ipv4Interfaces).setMsg(obj) + } + return obj.ipv4InterfacesHolder +} + +type deviceBgpRouterBgpV4InterfaceIter struct { + obj *deviceBgpRouter + bgpV4InterfaceSlice []BgpV4Interface + fieldPtr *[]*otg.BgpV4Interface +} + +func newDeviceBgpRouterBgpV4InterfaceIter(ptr *[]*otg.BgpV4Interface) DeviceBgpRouterBgpV4InterfaceIter { + return &deviceBgpRouterBgpV4InterfaceIter{fieldPtr: ptr} +} + +type DeviceBgpRouterBgpV4InterfaceIter interface { + setMsg(*deviceBgpRouter) DeviceBgpRouterBgpV4InterfaceIter + Items() []BgpV4Interface + Add() BgpV4Interface + Append(items ...BgpV4Interface) DeviceBgpRouterBgpV4InterfaceIter + Set(index int, newObj BgpV4Interface) DeviceBgpRouterBgpV4InterfaceIter + Clear() DeviceBgpRouterBgpV4InterfaceIter + clearHolderSlice() DeviceBgpRouterBgpV4InterfaceIter + appendHolderSlice(item BgpV4Interface) DeviceBgpRouterBgpV4InterfaceIter +} + +func (obj *deviceBgpRouterBgpV4InterfaceIter) setMsg(msg *deviceBgpRouter) DeviceBgpRouterBgpV4InterfaceIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpV4Interface{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceBgpRouterBgpV4InterfaceIter) Items() []BgpV4Interface { + return obj.bgpV4InterfaceSlice +} + +func (obj *deviceBgpRouterBgpV4InterfaceIter) Add() BgpV4Interface { + newObj := &otg.BgpV4Interface{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpV4Interface{obj: newObj} + newLibObj.setDefault() + obj.bgpV4InterfaceSlice = append(obj.bgpV4InterfaceSlice, newLibObj) + return newLibObj +} + +func (obj *deviceBgpRouterBgpV4InterfaceIter) Append(items ...BgpV4Interface) DeviceBgpRouterBgpV4InterfaceIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpV4InterfaceSlice = append(obj.bgpV4InterfaceSlice, item) + } + return obj +} + +func (obj *deviceBgpRouterBgpV4InterfaceIter) Set(index int, newObj BgpV4Interface) DeviceBgpRouterBgpV4InterfaceIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpV4InterfaceSlice[index] = newObj + return obj +} +func (obj *deviceBgpRouterBgpV4InterfaceIter) Clear() DeviceBgpRouterBgpV4InterfaceIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpV4Interface{} + obj.bgpV4InterfaceSlice = []BgpV4Interface{} + } + return obj +} +func (obj *deviceBgpRouterBgpV4InterfaceIter) clearHolderSlice() DeviceBgpRouterBgpV4InterfaceIter { + if len(obj.bgpV4InterfaceSlice) > 0 { + obj.bgpV4InterfaceSlice = []BgpV4Interface{} + } + return obj +} +func (obj *deviceBgpRouterBgpV4InterfaceIter) appendHolderSlice(item BgpV4Interface) DeviceBgpRouterBgpV4InterfaceIter { + obj.bgpV4InterfaceSlice = append(obj.bgpV4InterfaceSlice, item) + return obj +} + +// This contains an array of references to IPv6 interfaces, each of which will have list of peers to different destinations. +// Ipv6Interfaces returns a []BgpV6Interface +func (obj *deviceBgpRouter) Ipv6Interfaces() DeviceBgpRouterBgpV6InterfaceIter { + if len(obj.obj.Ipv6Interfaces) == 0 { + obj.obj.Ipv6Interfaces = []*otg.BgpV6Interface{} + } + if obj.ipv6InterfacesHolder == nil { + obj.ipv6InterfacesHolder = newDeviceBgpRouterBgpV6InterfaceIter(&obj.obj.Ipv6Interfaces).setMsg(obj) + } + return obj.ipv6InterfacesHolder +} + +type deviceBgpRouterBgpV6InterfaceIter struct { + obj *deviceBgpRouter + bgpV6InterfaceSlice []BgpV6Interface + fieldPtr *[]*otg.BgpV6Interface +} + +func newDeviceBgpRouterBgpV6InterfaceIter(ptr *[]*otg.BgpV6Interface) DeviceBgpRouterBgpV6InterfaceIter { + return &deviceBgpRouterBgpV6InterfaceIter{fieldPtr: ptr} +} + +type DeviceBgpRouterBgpV6InterfaceIter interface { + setMsg(*deviceBgpRouter) DeviceBgpRouterBgpV6InterfaceIter + Items() []BgpV6Interface + Add() BgpV6Interface + Append(items ...BgpV6Interface) DeviceBgpRouterBgpV6InterfaceIter + Set(index int, newObj BgpV6Interface) DeviceBgpRouterBgpV6InterfaceIter + Clear() DeviceBgpRouterBgpV6InterfaceIter + clearHolderSlice() DeviceBgpRouterBgpV6InterfaceIter + appendHolderSlice(item BgpV6Interface) DeviceBgpRouterBgpV6InterfaceIter +} + +func (obj *deviceBgpRouterBgpV6InterfaceIter) setMsg(msg *deviceBgpRouter) DeviceBgpRouterBgpV6InterfaceIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpV6Interface{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceBgpRouterBgpV6InterfaceIter) Items() []BgpV6Interface { + return obj.bgpV6InterfaceSlice +} + +func (obj *deviceBgpRouterBgpV6InterfaceIter) Add() BgpV6Interface { + newObj := &otg.BgpV6Interface{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpV6Interface{obj: newObj} + newLibObj.setDefault() + obj.bgpV6InterfaceSlice = append(obj.bgpV6InterfaceSlice, newLibObj) + return newLibObj +} + +func (obj *deviceBgpRouterBgpV6InterfaceIter) Append(items ...BgpV6Interface) DeviceBgpRouterBgpV6InterfaceIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpV6InterfaceSlice = append(obj.bgpV6InterfaceSlice, item) + } + return obj +} + +func (obj *deviceBgpRouterBgpV6InterfaceIter) Set(index int, newObj BgpV6Interface) DeviceBgpRouterBgpV6InterfaceIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpV6InterfaceSlice[index] = newObj + return obj +} +func (obj *deviceBgpRouterBgpV6InterfaceIter) Clear() DeviceBgpRouterBgpV6InterfaceIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpV6Interface{} + obj.bgpV6InterfaceSlice = []BgpV6Interface{} + } + return obj +} +func (obj *deviceBgpRouterBgpV6InterfaceIter) clearHolderSlice() DeviceBgpRouterBgpV6InterfaceIter { + if len(obj.bgpV6InterfaceSlice) > 0 { + obj.bgpV6InterfaceSlice = []BgpV6Interface{} + } + return obj +} +func (obj *deviceBgpRouterBgpV6InterfaceIter) appendHolderSlice(item BgpV6Interface) DeviceBgpRouterBgpV6InterfaceIter { + obj.bgpV6InterfaceSlice = append(obj.bgpV6InterfaceSlice, item) + return obj +} + +func (obj *deviceBgpRouter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // RouterId is required + if obj.obj.RouterId == nil { + vObj.validationErrors = append(vObj.validationErrors, "RouterId is required field on interface DeviceBgpRouter") + } + if obj.obj.RouterId != nil { + + err := obj.validateIpv4(obj.RouterId()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceBgpRouter.RouterId")) + } + + } + + if len(obj.obj.Ipv4Interfaces) != 0 { + + if set_default { + obj.Ipv4Interfaces().clearHolderSlice() + for _, item := range obj.obj.Ipv4Interfaces { + obj.Ipv4Interfaces().appendHolderSlice(&bgpV4Interface{obj: item}) + } + } + for _, item := range obj.Ipv4Interfaces().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ipv6Interfaces) != 0 { + + if set_default { + obj.Ipv6Interfaces().clearHolderSlice() + for _, item := range obj.obj.Ipv6Interfaces { + obj.Ipv6Interfaces().appendHolderSlice(&bgpV6Interface{obj: item}) + } + } + for _, item := range obj.Ipv6Interfaces().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *deviceBgpRouter) setDefault() { + +} diff --git a/gosnappi/device_bgp_update_message_error.go b/gosnappi/device_bgp_update_message_error.go new file mode 100644 index 00000000..8181df51 --- /dev/null +++ b/gosnappi/device_bgp_update_message_error.go @@ -0,0 +1,340 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceBgpUpdateMessageError ***** +type deviceBgpUpdateMessageError struct { + validation + obj *otg.DeviceBgpUpdateMessageError + marshaller marshalDeviceBgpUpdateMessageError + unMarshaller unMarshalDeviceBgpUpdateMessageError +} + +func NewDeviceBgpUpdateMessageError() DeviceBgpUpdateMessageError { + obj := deviceBgpUpdateMessageError{obj: &otg.DeviceBgpUpdateMessageError{}} + obj.setDefault() + return &obj +} + +func (obj *deviceBgpUpdateMessageError) msg() *otg.DeviceBgpUpdateMessageError { + return obj.obj +} + +func (obj *deviceBgpUpdateMessageError) setMsg(msg *otg.DeviceBgpUpdateMessageError) DeviceBgpUpdateMessageError { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceBgpUpdateMessageError struct { + obj *deviceBgpUpdateMessageError +} + +type marshalDeviceBgpUpdateMessageError interface { + // ToProto marshals DeviceBgpUpdateMessageError to protobuf object *otg.DeviceBgpUpdateMessageError + ToProto() (*otg.DeviceBgpUpdateMessageError, error) + // ToPbText marshals DeviceBgpUpdateMessageError to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceBgpUpdateMessageError to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceBgpUpdateMessageError to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceBgpUpdateMessageError struct { + obj *deviceBgpUpdateMessageError +} + +type unMarshalDeviceBgpUpdateMessageError interface { + // FromProto unmarshals DeviceBgpUpdateMessageError from protobuf object *otg.DeviceBgpUpdateMessageError + FromProto(msg *otg.DeviceBgpUpdateMessageError) (DeviceBgpUpdateMessageError, error) + // FromPbText unmarshals DeviceBgpUpdateMessageError from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceBgpUpdateMessageError from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceBgpUpdateMessageError from JSON text + FromJson(value string) error +} + +func (obj *deviceBgpUpdateMessageError) Marshal() marshalDeviceBgpUpdateMessageError { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceBgpUpdateMessageError{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceBgpUpdateMessageError) Unmarshal() unMarshalDeviceBgpUpdateMessageError { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceBgpUpdateMessageError{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceBgpUpdateMessageError) ToProto() (*otg.DeviceBgpUpdateMessageError, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceBgpUpdateMessageError) FromProto(msg *otg.DeviceBgpUpdateMessageError) (DeviceBgpUpdateMessageError, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceBgpUpdateMessageError) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceBgpUpdateMessageError) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceBgpUpdateMessageError) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpUpdateMessageError) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceBgpUpdateMessageError) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceBgpUpdateMessageError) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceBgpUpdateMessageError) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceBgpUpdateMessageError) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceBgpUpdateMessageError) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceBgpUpdateMessageError) Clone() (DeviceBgpUpdateMessageError, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceBgpUpdateMessageError() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceBgpUpdateMessageError is all errors detected while processing the UPDATE message are indicated by sending the NOTIFICATION message with the Error Code-Update Message Error. The Error Subcode elaborates on the specific nature of the error. +type DeviceBgpUpdateMessageError interface { + Validation + // msg marshals DeviceBgpUpdateMessageError to protobuf object *otg.DeviceBgpUpdateMessageError + // and doesn't set defaults + msg() *otg.DeviceBgpUpdateMessageError + // setMsg unmarshals DeviceBgpUpdateMessageError from protobuf object *otg.DeviceBgpUpdateMessageError + // and doesn't set defaults + setMsg(*otg.DeviceBgpUpdateMessageError) DeviceBgpUpdateMessageError + // provides marshal interface + Marshal() marshalDeviceBgpUpdateMessageError + // provides unmarshal interface + Unmarshal() unMarshalDeviceBgpUpdateMessageError + // validate validates DeviceBgpUpdateMessageError + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceBgpUpdateMessageError, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Subcode returns DeviceBgpUpdateMessageErrorSubcodeEnum, set in DeviceBgpUpdateMessageError + Subcode() DeviceBgpUpdateMessageErrorSubcodeEnum + // SetSubcode assigns DeviceBgpUpdateMessageErrorSubcodeEnum provided by user to DeviceBgpUpdateMessageError + SetSubcode(value DeviceBgpUpdateMessageErrorSubcodeEnum) DeviceBgpUpdateMessageError + // HasSubcode checks if Subcode has been set in DeviceBgpUpdateMessageError + HasSubcode() bool +} + +type DeviceBgpUpdateMessageErrorSubcodeEnum string + +// Enum of Subcode on DeviceBgpUpdateMessageError +var DeviceBgpUpdateMessageErrorSubcode = struct { + MALFORMED_ATTRIB_LIST_CODE3_SUBCODE1 DeviceBgpUpdateMessageErrorSubcodeEnum + UNRECOGNIZED_WELLKNOWN_ATTRIB_CODE3_SUBCODE2 DeviceBgpUpdateMessageErrorSubcodeEnum + WELLKNOWN_ATTRIB_MISSING_CODE3_SUBCODE3 DeviceBgpUpdateMessageErrorSubcodeEnum + ATTRIB_FLAGS_ERROR_CODE3_SUBCODE4 DeviceBgpUpdateMessageErrorSubcodeEnum + ATTRIB_LENGTH_ERROR_CODE3_SUBCODE5 DeviceBgpUpdateMessageErrorSubcodeEnum + INVALID_ORIGIN_ATTRIB_CODE3_SUBCODE6 DeviceBgpUpdateMessageErrorSubcodeEnum + AS_ROUTING_LOOP_CODE3_SUBCODE7 DeviceBgpUpdateMessageErrorSubcodeEnum + INVALID_NHOP_ATTRIB_CODE3_SUBCODE8 DeviceBgpUpdateMessageErrorSubcodeEnum + ERROR_OPTIONAL_ATTRIB_CODE3_SUBCODE9 DeviceBgpUpdateMessageErrorSubcodeEnum + INVALID_NETWORK_FIELD_CODE3_SUBCODE10 DeviceBgpUpdateMessageErrorSubcodeEnum + ABNORMAL_ASPATH_CODE3_SUBCODE11 DeviceBgpUpdateMessageErrorSubcodeEnum +}{ + MALFORMED_ATTRIB_LIST_CODE3_SUBCODE1: DeviceBgpUpdateMessageErrorSubcodeEnum("malformed_attrib_list_code3_subcode1"), + UNRECOGNIZED_WELLKNOWN_ATTRIB_CODE3_SUBCODE2: DeviceBgpUpdateMessageErrorSubcodeEnum("unrecognized_wellknown_attrib_code3_subcode2"), + WELLKNOWN_ATTRIB_MISSING_CODE3_SUBCODE3: DeviceBgpUpdateMessageErrorSubcodeEnum("wellknown_attrib_missing_code3_subcode3"), + ATTRIB_FLAGS_ERROR_CODE3_SUBCODE4: DeviceBgpUpdateMessageErrorSubcodeEnum("attrib_flags_error_code3_subcode4"), + ATTRIB_LENGTH_ERROR_CODE3_SUBCODE5: DeviceBgpUpdateMessageErrorSubcodeEnum("attrib_length_error_code3_subcode5"), + INVALID_ORIGIN_ATTRIB_CODE3_SUBCODE6: DeviceBgpUpdateMessageErrorSubcodeEnum("invalid_origin_attrib_code3_subcode6"), + AS_ROUTING_LOOP_CODE3_SUBCODE7: DeviceBgpUpdateMessageErrorSubcodeEnum("as_routing_loop_code3_subcode7"), + INVALID_NHOP_ATTRIB_CODE3_SUBCODE8: DeviceBgpUpdateMessageErrorSubcodeEnum("invalid_nhop_attrib_code3_subcode8"), + ERROR_OPTIONAL_ATTRIB_CODE3_SUBCODE9: DeviceBgpUpdateMessageErrorSubcodeEnum("error_optional_attrib_code3_subcode9"), + INVALID_NETWORK_FIELD_CODE3_SUBCODE10: DeviceBgpUpdateMessageErrorSubcodeEnum("invalid_network_field_code3_subcode10"), + ABNORMAL_ASPATH_CODE3_SUBCODE11: DeviceBgpUpdateMessageErrorSubcodeEnum("abnormal_aspath_code3_subcode11"), +} + +func (obj *deviceBgpUpdateMessageError) Subcode() DeviceBgpUpdateMessageErrorSubcodeEnum { + return DeviceBgpUpdateMessageErrorSubcodeEnum(obj.obj.Subcode.Enum().String()) +} + +// The Error Subcode, the specific type of error encountered during UPDATE processing. +// Subcode returns a string +func (obj *deviceBgpUpdateMessageError) HasSubcode() bool { + return obj.obj.Subcode != nil +} + +func (obj *deviceBgpUpdateMessageError) SetSubcode(value DeviceBgpUpdateMessageErrorSubcodeEnum) DeviceBgpUpdateMessageError { + intValue, ok := otg.DeviceBgpUpdateMessageError_Subcode_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on DeviceBgpUpdateMessageErrorSubcodeEnum", string(value))) + return obj + } + enumValue := otg.DeviceBgpUpdateMessageError_Subcode_Enum(intValue) + obj.obj.Subcode = &enumValue + + return obj +} + +func (obj *deviceBgpUpdateMessageError) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *deviceBgpUpdateMessageError) setDefault() { + if obj.obj.Subcode == nil { + obj.SetSubcode(DeviceBgpUpdateMessageErrorSubcode.MALFORMED_ATTRIB_LIST_CODE3_SUBCODE1) + + } + +} diff --git a/gosnappi/device_dhcp_server.go b/gosnappi/device_dhcp_server.go new file mode 100644 index 00000000..6870e48a --- /dev/null +++ b/gosnappi/device_dhcp_server.go @@ -0,0 +1,495 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceDhcpServer ***** +type deviceDhcpServer struct { + validation + obj *otg.DeviceDhcpServer + marshaller marshalDeviceDhcpServer + unMarshaller unMarshalDeviceDhcpServer + ipv4InterfacesHolder DeviceDhcpServerDhcpServerV4Iter + ipv6InterfacesHolder DeviceDhcpServerDhcpServerV6Iter +} + +func NewDeviceDhcpServer() DeviceDhcpServer { + obj := deviceDhcpServer{obj: &otg.DeviceDhcpServer{}} + obj.setDefault() + return &obj +} + +func (obj *deviceDhcpServer) msg() *otg.DeviceDhcpServer { + return obj.obj +} + +func (obj *deviceDhcpServer) setMsg(msg *otg.DeviceDhcpServer) DeviceDhcpServer { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceDhcpServer struct { + obj *deviceDhcpServer +} + +type marshalDeviceDhcpServer interface { + // ToProto marshals DeviceDhcpServer to protobuf object *otg.DeviceDhcpServer + ToProto() (*otg.DeviceDhcpServer, error) + // ToPbText marshals DeviceDhcpServer to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceDhcpServer to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceDhcpServer to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceDhcpServer struct { + obj *deviceDhcpServer +} + +type unMarshalDeviceDhcpServer interface { + // FromProto unmarshals DeviceDhcpServer from protobuf object *otg.DeviceDhcpServer + FromProto(msg *otg.DeviceDhcpServer) (DeviceDhcpServer, error) + // FromPbText unmarshals DeviceDhcpServer from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceDhcpServer from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceDhcpServer from JSON text + FromJson(value string) error +} + +func (obj *deviceDhcpServer) Marshal() marshalDeviceDhcpServer { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceDhcpServer{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceDhcpServer) Unmarshal() unMarshalDeviceDhcpServer { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceDhcpServer{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceDhcpServer) ToProto() (*otg.DeviceDhcpServer, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceDhcpServer) FromProto(msg *otg.DeviceDhcpServer) (DeviceDhcpServer, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceDhcpServer) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceDhcpServer) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceDhcpServer) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpServer) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceDhcpServer) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpServer) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceDhcpServer) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceDhcpServer) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceDhcpServer) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceDhcpServer) Clone() (DeviceDhcpServer, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceDhcpServer() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceDhcpServer) setNil() { + obj.ipv4InterfacesHolder = nil + obj.ipv6InterfacesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceDhcpServer is configuration for one or more IPv4 or IPv6 DHCP servers. +type DeviceDhcpServer interface { + Validation + // msg marshals DeviceDhcpServer to protobuf object *otg.DeviceDhcpServer + // and doesn't set defaults + msg() *otg.DeviceDhcpServer + // setMsg unmarshals DeviceDhcpServer from protobuf object *otg.DeviceDhcpServer + // and doesn't set defaults + setMsg(*otg.DeviceDhcpServer) DeviceDhcpServer + // provides marshal interface + Marshal() marshalDeviceDhcpServer + // provides unmarshal interface + Unmarshal() unMarshalDeviceDhcpServer + // validate validates DeviceDhcpServer + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceDhcpServer, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv4Interfaces returns DeviceDhcpServerDhcpServerV4IterIter, set in DeviceDhcpServer + Ipv4Interfaces() DeviceDhcpServerDhcpServerV4Iter + // Ipv6Interfaces returns DeviceDhcpServerDhcpServerV6IterIter, set in DeviceDhcpServer + Ipv6Interfaces() DeviceDhcpServerDhcpServerV6Iter + setNil() +} + +// This contains an array of references to IPv4 interfaces, each of which will contain one DHCPv4 server. +// Ipv4Interfaces returns a []DhcpServerV4 +func (obj *deviceDhcpServer) Ipv4Interfaces() DeviceDhcpServerDhcpServerV4Iter { + if len(obj.obj.Ipv4Interfaces) == 0 { + obj.obj.Ipv4Interfaces = []*otg.DhcpServerV4{} + } + if obj.ipv4InterfacesHolder == nil { + obj.ipv4InterfacesHolder = newDeviceDhcpServerDhcpServerV4Iter(&obj.obj.Ipv4Interfaces).setMsg(obj) + } + return obj.ipv4InterfacesHolder +} + +type deviceDhcpServerDhcpServerV4Iter struct { + obj *deviceDhcpServer + dhcpServerV4Slice []DhcpServerV4 + fieldPtr *[]*otg.DhcpServerV4 +} + +func newDeviceDhcpServerDhcpServerV4Iter(ptr *[]*otg.DhcpServerV4) DeviceDhcpServerDhcpServerV4Iter { + return &deviceDhcpServerDhcpServerV4Iter{fieldPtr: ptr} +} + +type DeviceDhcpServerDhcpServerV4Iter interface { + setMsg(*deviceDhcpServer) DeviceDhcpServerDhcpServerV4Iter + Items() []DhcpServerV4 + Add() DhcpServerV4 + Append(items ...DhcpServerV4) DeviceDhcpServerDhcpServerV4Iter + Set(index int, newObj DhcpServerV4) DeviceDhcpServerDhcpServerV4Iter + Clear() DeviceDhcpServerDhcpServerV4Iter + clearHolderSlice() DeviceDhcpServerDhcpServerV4Iter + appendHolderSlice(item DhcpServerV4) DeviceDhcpServerDhcpServerV4Iter +} + +func (obj *deviceDhcpServerDhcpServerV4Iter) setMsg(msg *deviceDhcpServer) DeviceDhcpServerDhcpServerV4Iter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpServerV4{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceDhcpServerDhcpServerV4Iter) Items() []DhcpServerV4 { + return obj.dhcpServerV4Slice +} + +func (obj *deviceDhcpServerDhcpServerV4Iter) Add() DhcpServerV4 { + newObj := &otg.DhcpServerV4{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpServerV4{obj: newObj} + newLibObj.setDefault() + obj.dhcpServerV4Slice = append(obj.dhcpServerV4Slice, newLibObj) + return newLibObj +} + +func (obj *deviceDhcpServerDhcpServerV4Iter) Append(items ...DhcpServerV4) DeviceDhcpServerDhcpServerV4Iter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpServerV4Slice = append(obj.dhcpServerV4Slice, item) + } + return obj +} + +func (obj *deviceDhcpServerDhcpServerV4Iter) Set(index int, newObj DhcpServerV4) DeviceDhcpServerDhcpServerV4Iter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpServerV4Slice[index] = newObj + return obj +} +func (obj *deviceDhcpServerDhcpServerV4Iter) Clear() DeviceDhcpServerDhcpServerV4Iter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.DhcpServerV4{} + obj.dhcpServerV4Slice = []DhcpServerV4{} + } + return obj +} +func (obj *deviceDhcpServerDhcpServerV4Iter) clearHolderSlice() DeviceDhcpServerDhcpServerV4Iter { + if len(obj.dhcpServerV4Slice) > 0 { + obj.dhcpServerV4Slice = []DhcpServerV4{} + } + return obj +} +func (obj *deviceDhcpServerDhcpServerV4Iter) appendHolderSlice(item DhcpServerV4) DeviceDhcpServerDhcpServerV4Iter { + obj.dhcpServerV4Slice = append(obj.dhcpServerV4Slice, item) + return obj +} + +// This contains an array of references to IPv6 interfaces, each of which will contain one DHCPv6 server. +// Ipv6Interfaces returns a []DhcpServerV6 +func (obj *deviceDhcpServer) Ipv6Interfaces() DeviceDhcpServerDhcpServerV6Iter { + if len(obj.obj.Ipv6Interfaces) == 0 { + obj.obj.Ipv6Interfaces = []*otg.DhcpServerV6{} + } + if obj.ipv6InterfacesHolder == nil { + obj.ipv6InterfacesHolder = newDeviceDhcpServerDhcpServerV6Iter(&obj.obj.Ipv6Interfaces).setMsg(obj) + } + return obj.ipv6InterfacesHolder +} + +type deviceDhcpServerDhcpServerV6Iter struct { + obj *deviceDhcpServer + dhcpServerV6Slice []DhcpServerV6 + fieldPtr *[]*otg.DhcpServerV6 +} + +func newDeviceDhcpServerDhcpServerV6Iter(ptr *[]*otg.DhcpServerV6) DeviceDhcpServerDhcpServerV6Iter { + return &deviceDhcpServerDhcpServerV6Iter{fieldPtr: ptr} +} + +type DeviceDhcpServerDhcpServerV6Iter interface { + setMsg(*deviceDhcpServer) DeviceDhcpServerDhcpServerV6Iter + Items() []DhcpServerV6 + Add() DhcpServerV6 + Append(items ...DhcpServerV6) DeviceDhcpServerDhcpServerV6Iter + Set(index int, newObj DhcpServerV6) DeviceDhcpServerDhcpServerV6Iter + Clear() DeviceDhcpServerDhcpServerV6Iter + clearHolderSlice() DeviceDhcpServerDhcpServerV6Iter + appendHolderSlice(item DhcpServerV6) DeviceDhcpServerDhcpServerV6Iter +} + +func (obj *deviceDhcpServerDhcpServerV6Iter) setMsg(msg *deviceDhcpServer) DeviceDhcpServerDhcpServerV6Iter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpServerV6{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceDhcpServerDhcpServerV6Iter) Items() []DhcpServerV6 { + return obj.dhcpServerV6Slice +} + +func (obj *deviceDhcpServerDhcpServerV6Iter) Add() DhcpServerV6 { + newObj := &otg.DhcpServerV6{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpServerV6{obj: newObj} + newLibObj.setDefault() + obj.dhcpServerV6Slice = append(obj.dhcpServerV6Slice, newLibObj) + return newLibObj +} + +func (obj *deviceDhcpServerDhcpServerV6Iter) Append(items ...DhcpServerV6) DeviceDhcpServerDhcpServerV6Iter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpServerV6Slice = append(obj.dhcpServerV6Slice, item) + } + return obj +} + +func (obj *deviceDhcpServerDhcpServerV6Iter) Set(index int, newObj DhcpServerV6) DeviceDhcpServerDhcpServerV6Iter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpServerV6Slice[index] = newObj + return obj +} +func (obj *deviceDhcpServerDhcpServerV6Iter) Clear() DeviceDhcpServerDhcpServerV6Iter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.DhcpServerV6{} + obj.dhcpServerV6Slice = []DhcpServerV6{} + } + return obj +} +func (obj *deviceDhcpServerDhcpServerV6Iter) clearHolderSlice() DeviceDhcpServerDhcpServerV6Iter { + if len(obj.dhcpServerV6Slice) > 0 { + obj.dhcpServerV6Slice = []DhcpServerV6{} + } + return obj +} +func (obj *deviceDhcpServerDhcpServerV6Iter) appendHolderSlice(item DhcpServerV6) DeviceDhcpServerDhcpServerV6Iter { + obj.dhcpServerV6Slice = append(obj.dhcpServerV6Slice, item) + return obj +} + +func (obj *deviceDhcpServer) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Ipv4Interfaces) != 0 { + + if set_default { + obj.Ipv4Interfaces().clearHolderSlice() + for _, item := range obj.obj.Ipv4Interfaces { + obj.Ipv4Interfaces().appendHolderSlice(&dhcpServerV4{obj: item}) + } + } + for _, item := range obj.Ipv4Interfaces().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ipv6Interfaces) != 0 { + + if set_default { + obj.Ipv6Interfaces().clearHolderSlice() + for _, item := range obj.obj.Ipv6Interfaces { + obj.Ipv6Interfaces().appendHolderSlice(&dhcpServerV6{obj: item}) + } + } + for _, item := range obj.Ipv6Interfaces().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *deviceDhcpServer) setDefault() { + +} diff --git a/gosnappi/device_dhcpv4_client.go b/gosnappi/device_dhcpv4_client.go new file mode 100644 index 00000000..abbd0e75 --- /dev/null +++ b/gosnappi/device_dhcpv4_client.go @@ -0,0 +1,501 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceDhcpv4Client ***** +type deviceDhcpv4Client struct { + validation + obj *otg.DeviceDhcpv4Client + marshaller marshalDeviceDhcpv4Client + unMarshaller unMarshalDeviceDhcpv4Client + parametersRequestListHolder Dhcpv4ClientParams +} + +func NewDeviceDhcpv4Client() DeviceDhcpv4Client { + obj := deviceDhcpv4Client{obj: &otg.DeviceDhcpv4Client{}} + obj.setDefault() + return &obj +} + +func (obj *deviceDhcpv4Client) msg() *otg.DeviceDhcpv4Client { + return obj.obj +} + +func (obj *deviceDhcpv4Client) setMsg(msg *otg.DeviceDhcpv4Client) DeviceDhcpv4Client { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceDhcpv4Client struct { + obj *deviceDhcpv4Client +} + +type marshalDeviceDhcpv4Client interface { + // ToProto marshals DeviceDhcpv4Client to protobuf object *otg.DeviceDhcpv4Client + ToProto() (*otg.DeviceDhcpv4Client, error) + // ToPbText marshals DeviceDhcpv4Client to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceDhcpv4Client to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceDhcpv4Client to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceDhcpv4Client struct { + obj *deviceDhcpv4Client +} + +type unMarshalDeviceDhcpv4Client interface { + // FromProto unmarshals DeviceDhcpv4Client from protobuf object *otg.DeviceDhcpv4Client + FromProto(msg *otg.DeviceDhcpv4Client) (DeviceDhcpv4Client, error) + // FromPbText unmarshals DeviceDhcpv4Client from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceDhcpv4Client from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceDhcpv4Client from JSON text + FromJson(value string) error +} + +func (obj *deviceDhcpv4Client) Marshal() marshalDeviceDhcpv4Client { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceDhcpv4Client{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceDhcpv4Client) Unmarshal() unMarshalDeviceDhcpv4Client { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceDhcpv4Client{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceDhcpv4Client) ToProto() (*otg.DeviceDhcpv4Client, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceDhcpv4Client) FromProto(msg *otg.DeviceDhcpv4Client) (DeviceDhcpv4Client, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceDhcpv4Client) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceDhcpv4Client) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceDhcpv4Client) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv4Client) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceDhcpv4Client) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv4Client) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceDhcpv4Client) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceDhcpv4Client) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceDhcpv4Client) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceDhcpv4Client) Clone() (DeviceDhcpv4Client, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceDhcpv4Client() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceDhcpv4Client) setNil() { + obj.parametersRequestListHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceDhcpv4Client is configuration for emulated DHCPv4 Client on a single Interface. https://www.rfc-editor.org/rfc/rfc2131.html +type DeviceDhcpv4Client interface { + Validation + // msg marshals DeviceDhcpv4Client to protobuf object *otg.DeviceDhcpv4Client + // and doesn't set defaults + msg() *otg.DeviceDhcpv4Client + // setMsg unmarshals DeviceDhcpv4Client from protobuf object *otg.DeviceDhcpv4Client + // and doesn't set defaults + setMsg(*otg.DeviceDhcpv4Client) DeviceDhcpv4Client + // provides marshal interface + Marshal() marshalDeviceDhcpv4Client + // provides unmarshal interface + Unmarshal() unMarshalDeviceDhcpv4Client + // validate validates DeviceDhcpv4Client + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceDhcpv4Client, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in DeviceDhcpv4Client. + Name() string + // SetName assigns string provided by user to DeviceDhcpv4Client + SetName(value string) DeviceDhcpv4Client + // Choice returns DeviceDhcpv4ClientChoiceEnum, set in DeviceDhcpv4Client + Choice() DeviceDhcpv4ClientChoiceEnum + // setChoice assigns DeviceDhcpv4ClientChoiceEnum provided by user to DeviceDhcpv4Client + setChoice(value DeviceDhcpv4ClientChoiceEnum) DeviceDhcpv4Client + // HasChoice checks if Choice has been set in DeviceDhcpv4Client + HasChoice() bool + // getter for FirstServer to set choice. + FirstServer() + // ServerAddress returns string, set in DeviceDhcpv4Client. + ServerAddress() string + // SetServerAddress assigns string provided by user to DeviceDhcpv4Client + SetServerAddress(value string) DeviceDhcpv4Client + // HasServerAddress checks if ServerAddress has been set in DeviceDhcpv4Client + HasServerAddress() bool + // Broadcast returns bool, set in DeviceDhcpv4Client. + Broadcast() bool + // SetBroadcast assigns bool provided by user to DeviceDhcpv4Client + SetBroadcast(value bool) DeviceDhcpv4Client + // HasBroadcast checks if Broadcast has been set in DeviceDhcpv4Client + HasBroadcast() bool + // ParametersRequestList returns Dhcpv4ClientParams, set in DeviceDhcpv4Client. + // Dhcpv4ClientParams is configuration Parameter request list by emulated DHCPv4 Client. + ParametersRequestList() Dhcpv4ClientParams + // SetParametersRequestList assigns Dhcpv4ClientParams provided by user to DeviceDhcpv4Client. + // Dhcpv4ClientParams is configuration Parameter request list by emulated DHCPv4 Client. + SetParametersRequestList(value Dhcpv4ClientParams) DeviceDhcpv4Client + // HasParametersRequestList checks if ParametersRequestList has been set in DeviceDhcpv4Client + HasParametersRequestList() bool + setNil() +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *deviceDhcpv4Client) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DeviceDhcpv4Client object +func (obj *deviceDhcpv4Client) SetName(value string) DeviceDhcpv4Client { + + obj.obj.Name = &value + return obj +} + +type DeviceDhcpv4ClientChoiceEnum string + +// Enum of Choice on DeviceDhcpv4Client +var DeviceDhcpv4ClientChoice = struct { + FIRST_SERVER DeviceDhcpv4ClientChoiceEnum + SERVER_ADDRESS DeviceDhcpv4ClientChoiceEnum +}{ + FIRST_SERVER: DeviceDhcpv4ClientChoiceEnum("first_server"), + SERVER_ADDRESS: DeviceDhcpv4ClientChoiceEnum("server_address"), +} + +func (obj *deviceDhcpv4Client) Choice() DeviceDhcpv4ClientChoiceEnum { + return DeviceDhcpv4ClientChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for FirstServer to set choice +func (obj *deviceDhcpv4Client) FirstServer() { + obj.setChoice(DeviceDhcpv4ClientChoice.FIRST_SERVER) +} + +// The client receives one or more DHCPOFFER messages from one or more servers and client may choose to wait for multiple responses. +// The client chooses one server from which to request configuration +// parameters, based on the configuration parameters offered in the DHCPOFFER messages. +// - first_server: if selected, the subnet accepts the IP addresses offered by the first server to respond with an offer of IP addresses. +// - server_address: The address of the DHCP server from which the subnet will accept IP addresses. +// Choice returns a string +func (obj *deviceDhcpv4Client) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *deviceDhcpv4Client) setChoice(value DeviceDhcpv4ClientChoiceEnum) DeviceDhcpv4Client { + intValue, ok := otg.DeviceDhcpv4Client_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on DeviceDhcpv4ClientChoiceEnum", string(value))) + return obj + } + enumValue := otg.DeviceDhcpv4Client_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.ServerAddress = nil + return obj +} + +// The address of the DHCP server. +// ServerAddress returns a string +func (obj *deviceDhcpv4Client) ServerAddress() string { + + if obj.obj.ServerAddress == nil { + obj.setChoice(DeviceDhcpv4ClientChoice.SERVER_ADDRESS) + } + + return *obj.obj.ServerAddress + +} + +// The address of the DHCP server. +// ServerAddress returns a string +func (obj *deviceDhcpv4Client) HasServerAddress() bool { + return obj.obj.ServerAddress != nil +} + +// The address of the DHCP server. +// SetServerAddress sets the string value in the DeviceDhcpv4Client object +func (obj *deviceDhcpv4Client) SetServerAddress(value string) DeviceDhcpv4Client { + obj.setChoice(DeviceDhcpv4ClientChoice.SERVER_ADDRESS) + obj.obj.ServerAddress = &value + return obj +} + +// If the broadcast bit is set, then the server and relay agent broadcast DHCPOFFER and DHCPACK messages. +// Broadcast returns a bool +func (obj *deviceDhcpv4Client) Broadcast() bool { + + return *obj.obj.Broadcast + +} + +// If the broadcast bit is set, then the server and relay agent broadcast DHCPOFFER and DHCPACK messages. +// Broadcast returns a bool +func (obj *deviceDhcpv4Client) HasBroadcast() bool { + return obj.obj.Broadcast != nil +} + +// If the broadcast bit is set, then the server and relay agent broadcast DHCPOFFER and DHCPACK messages. +// SetBroadcast sets the bool value in the DeviceDhcpv4Client object +func (obj *deviceDhcpv4Client) SetBroadcast(value bool) DeviceDhcpv4Client { + + obj.obj.Broadcast = &value + return obj +} + +// Optional parameters field request list of DHCPv4 Client. +// ParametersRequestList returns a Dhcpv4ClientParams +func (obj *deviceDhcpv4Client) ParametersRequestList() Dhcpv4ClientParams { + if obj.obj.ParametersRequestList == nil { + obj.obj.ParametersRequestList = NewDhcpv4ClientParams().msg() + } + if obj.parametersRequestListHolder == nil { + obj.parametersRequestListHolder = &dhcpv4ClientParams{obj: obj.obj.ParametersRequestList} + } + return obj.parametersRequestListHolder +} + +// Optional parameters field request list of DHCPv4 Client. +// ParametersRequestList returns a Dhcpv4ClientParams +func (obj *deviceDhcpv4Client) HasParametersRequestList() bool { + return obj.obj.ParametersRequestList != nil +} + +// Optional parameters field request list of DHCPv4 Client. +// SetParametersRequestList sets the Dhcpv4ClientParams value in the DeviceDhcpv4Client object +func (obj *deviceDhcpv4Client) SetParametersRequestList(value Dhcpv4ClientParams) DeviceDhcpv4Client { + + obj.parametersRequestListHolder = nil + obj.obj.ParametersRequestList = value.msg() + + return obj +} + +func (obj *deviceDhcpv4Client) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface DeviceDhcpv4Client") + } + + if obj.obj.ServerAddress != nil { + + err := obj.validateIpv4(obj.ServerAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceDhcpv4Client.ServerAddress")) + } + + } + + if obj.obj.ParametersRequestList != nil { + + obj.ParametersRequestList().validateObj(vObj, set_default) + } + +} + +func (obj *deviceDhcpv4Client) setDefault() { + var choices_set int = 0 + var choice DeviceDhcpv4ClientChoiceEnum + + if obj.obj.ServerAddress != nil { + choices_set += 1 + choice = DeviceDhcpv4ClientChoice.SERVER_ADDRESS + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(DeviceDhcpv4ClientChoice.FIRST_SERVER) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in DeviceDhcpv4Client") + } + } else { + intVal := otg.DeviceDhcpv4Client_Choice_Enum_value[string(choice)] + enumValue := otg.DeviceDhcpv4Client_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + + if obj.obj.Broadcast == nil { + obj.SetBroadcast(false) + } + +} diff --git a/gosnappi/device_dhcpv6_client.go b/gosnappi/device_dhcpv6_client.go new file mode 100644 index 00000000..31f1ab43 --- /dev/null +++ b/gosnappi/device_dhcpv6_client.go @@ -0,0 +1,512 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceDhcpv6Client ***** +type deviceDhcpv6Client struct { + validation + obj *otg.DeviceDhcpv6Client + marshaller marshalDeviceDhcpv6Client + unMarshaller unMarshalDeviceDhcpv6Client + iaTypeHolder DeviceDhcpv6ClientIaType + duidTypeHolder DeviceDhcpv6ClientDuidType + optionsRequestHolder DeviceDhcpv6ClientOptionsRequest + optionsHolder DeviceDhcpv6ClientOptions +} + +func NewDeviceDhcpv6Client() DeviceDhcpv6Client { + obj := deviceDhcpv6Client{obj: &otg.DeviceDhcpv6Client{}} + obj.setDefault() + return &obj +} + +func (obj *deviceDhcpv6Client) msg() *otg.DeviceDhcpv6Client { + return obj.obj +} + +func (obj *deviceDhcpv6Client) setMsg(msg *otg.DeviceDhcpv6Client) DeviceDhcpv6Client { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceDhcpv6Client struct { + obj *deviceDhcpv6Client +} + +type marshalDeviceDhcpv6Client interface { + // ToProto marshals DeviceDhcpv6Client to protobuf object *otg.DeviceDhcpv6Client + ToProto() (*otg.DeviceDhcpv6Client, error) + // ToPbText marshals DeviceDhcpv6Client to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceDhcpv6Client to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceDhcpv6Client to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceDhcpv6Client struct { + obj *deviceDhcpv6Client +} + +type unMarshalDeviceDhcpv6Client interface { + // FromProto unmarshals DeviceDhcpv6Client from protobuf object *otg.DeviceDhcpv6Client + FromProto(msg *otg.DeviceDhcpv6Client) (DeviceDhcpv6Client, error) + // FromPbText unmarshals DeviceDhcpv6Client from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceDhcpv6Client from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceDhcpv6Client from JSON text + FromJson(value string) error +} + +func (obj *deviceDhcpv6Client) Marshal() marshalDeviceDhcpv6Client { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceDhcpv6Client{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceDhcpv6Client) Unmarshal() unMarshalDeviceDhcpv6Client { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceDhcpv6Client{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceDhcpv6Client) ToProto() (*otg.DeviceDhcpv6Client, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceDhcpv6Client) FromProto(msg *otg.DeviceDhcpv6Client) (DeviceDhcpv6Client, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceDhcpv6Client) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceDhcpv6Client) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceDhcpv6Client) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6Client) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceDhcpv6Client) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6Client) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceDhcpv6Client) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceDhcpv6Client) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceDhcpv6Client) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceDhcpv6Client) Clone() (DeviceDhcpv6Client, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceDhcpv6Client() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceDhcpv6Client) setNil() { + obj.iaTypeHolder = nil + obj.duidTypeHolder = nil + obj.optionsRequestHolder = nil + obj.optionsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceDhcpv6Client is configuration for emulated DHCPv6 Client on a single Interface. If the DHCPv6 Client receives one or more DHCPv6 ADVERTISE messages from one or more servers then the client chooses one server from which to request configuration parameters, based on the configuration parameters offered by the server in the DHCPv6 ADVERTISE messages. If all configuration parameters match then the first server will be chosen. https://www.rfc-editor.org/rfc/rfc8415.html +type DeviceDhcpv6Client interface { + Validation + // msg marshals DeviceDhcpv6Client to protobuf object *otg.DeviceDhcpv6Client + // and doesn't set defaults + msg() *otg.DeviceDhcpv6Client + // setMsg unmarshals DeviceDhcpv6Client from protobuf object *otg.DeviceDhcpv6Client + // and doesn't set defaults + setMsg(*otg.DeviceDhcpv6Client) DeviceDhcpv6Client + // provides marshal interface + Marshal() marshalDeviceDhcpv6Client + // provides unmarshal interface + Unmarshal() unMarshalDeviceDhcpv6Client + // validate validates DeviceDhcpv6Client + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceDhcpv6Client, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in DeviceDhcpv6Client. + Name() string + // SetName assigns string provided by user to DeviceDhcpv6Client + SetName(value string) DeviceDhcpv6Client + // RapidCommit returns bool, set in DeviceDhcpv6Client. + RapidCommit() bool + // SetRapidCommit assigns bool provided by user to DeviceDhcpv6Client + SetRapidCommit(value bool) DeviceDhcpv6Client + // HasRapidCommit checks if RapidCommit has been set in DeviceDhcpv6Client + HasRapidCommit() bool + // IaType returns DeviceDhcpv6ClientIaType, set in DeviceDhcpv6Client. + IaType() DeviceDhcpv6ClientIaType + // SetIaType assigns DeviceDhcpv6ClientIaType provided by user to DeviceDhcpv6Client. + SetIaType(value DeviceDhcpv6ClientIaType) DeviceDhcpv6Client + // HasIaType checks if IaType has been set in DeviceDhcpv6Client + HasIaType() bool + // DuidType returns DeviceDhcpv6ClientDuidType, set in DeviceDhcpv6Client. + DuidType() DeviceDhcpv6ClientDuidType + // SetDuidType assigns DeviceDhcpv6ClientDuidType provided by user to DeviceDhcpv6Client. + SetDuidType(value DeviceDhcpv6ClientDuidType) DeviceDhcpv6Client + // HasDuidType checks if DuidType has been set in DeviceDhcpv6Client + HasDuidType() bool + // OptionsRequest returns DeviceDhcpv6ClientOptionsRequest, set in DeviceDhcpv6Client. + // DeviceDhcpv6ClientOptionsRequest is dHCP client options, these configured options are sent in Dhcp client messages. + OptionsRequest() DeviceDhcpv6ClientOptionsRequest + // SetOptionsRequest assigns DeviceDhcpv6ClientOptionsRequest provided by user to DeviceDhcpv6Client. + // DeviceDhcpv6ClientOptionsRequest is dHCP client options, these configured options are sent in Dhcp client messages. + SetOptionsRequest(value DeviceDhcpv6ClientOptionsRequest) DeviceDhcpv6Client + // HasOptionsRequest checks if OptionsRequest has been set in DeviceDhcpv6Client + HasOptionsRequest() bool + // Options returns DeviceDhcpv6ClientOptions, set in DeviceDhcpv6Client. + // DeviceDhcpv6ClientOptions is dHCP client options, these configured options are sent in Dhcp client messages. + Options() DeviceDhcpv6ClientOptions + // SetOptions assigns DeviceDhcpv6ClientOptions provided by user to DeviceDhcpv6Client. + // DeviceDhcpv6ClientOptions is dHCP client options, these configured options are sent in Dhcp client messages. + SetOptions(value DeviceDhcpv6ClientOptions) DeviceDhcpv6Client + // HasOptions checks if Options has been set in DeviceDhcpv6Client + HasOptions() bool + setNil() +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *deviceDhcpv6Client) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DeviceDhcpv6Client object +func (obj *deviceDhcpv6Client) SetName(value string) DeviceDhcpv6Client { + + obj.obj.Name = &value + return obj +} + +// If Rapid Commit is set, client initiates Rapid Commit two-message exchange by including Rapid Commit option in Solicit message. +// RapidCommit returns a bool +func (obj *deviceDhcpv6Client) RapidCommit() bool { + + return *obj.obj.RapidCommit + +} + +// If Rapid Commit is set, client initiates Rapid Commit two-message exchange by including Rapid Commit option in Solicit message. +// RapidCommit returns a bool +func (obj *deviceDhcpv6Client) HasRapidCommit() bool { + return obj.obj.RapidCommit != nil +} + +// If Rapid Commit is set, client initiates Rapid Commit two-message exchange by including Rapid Commit option in Solicit message. +// SetRapidCommit sets the bool value in the DeviceDhcpv6Client object +func (obj *deviceDhcpv6Client) SetRapidCommit(value bool) DeviceDhcpv6Client { + + obj.obj.RapidCommit = &value + return obj +} + +// Each IA has an associated IAID. Differnet IA options represent different types of IPv6 addresses and parameters +// accepted by DHCPv6 clients each used in different context by an IPv6 node. +// IaType returns a DeviceDhcpv6ClientIaType +func (obj *deviceDhcpv6Client) IaType() DeviceDhcpv6ClientIaType { + if obj.obj.IaType == nil { + obj.obj.IaType = NewDeviceDhcpv6ClientIaType().msg() + } + if obj.iaTypeHolder == nil { + obj.iaTypeHolder = &deviceDhcpv6ClientIaType{obj: obj.obj.IaType} + } + return obj.iaTypeHolder +} + +// Each IA has an associated IAID. Differnet IA options represent different types of IPv6 addresses and parameters +// accepted by DHCPv6 clients each used in different context by an IPv6 node. +// IaType returns a DeviceDhcpv6ClientIaType +func (obj *deviceDhcpv6Client) HasIaType() bool { + return obj.obj.IaType != nil +} + +// Each IA has an associated IAID. Differnet IA options represent different types of IPv6 addresses and parameters +// accepted by DHCPv6 clients each used in different context by an IPv6 node. +// SetIaType sets the DeviceDhcpv6ClientIaType value in the DeviceDhcpv6Client object +func (obj *deviceDhcpv6Client) SetIaType(value DeviceDhcpv6ClientIaType) DeviceDhcpv6Client { + + obj.iaTypeHolder = nil + obj.obj.IaType = value.msg() + + return obj +} + +// Each DHCP client and server has a DUID. DHCP clients and servers use DUIDs to identify each other. +// DuidType returns a DeviceDhcpv6ClientDuidType +func (obj *deviceDhcpv6Client) DuidType() DeviceDhcpv6ClientDuidType { + if obj.obj.DuidType == nil { + obj.obj.DuidType = NewDeviceDhcpv6ClientDuidType().msg() + } + if obj.duidTypeHolder == nil { + obj.duidTypeHolder = &deviceDhcpv6ClientDuidType{obj: obj.obj.DuidType} + } + return obj.duidTypeHolder +} + +// Each DHCP client and server has a DUID. DHCP clients and servers use DUIDs to identify each other. +// DuidType returns a DeviceDhcpv6ClientDuidType +func (obj *deviceDhcpv6Client) HasDuidType() bool { + return obj.obj.DuidType != nil +} + +// Each DHCP client and server has a DUID. DHCP clients and servers use DUIDs to identify each other. +// SetDuidType sets the DeviceDhcpv6ClientDuidType value in the DeviceDhcpv6Client object +func (obj *deviceDhcpv6Client) SetDuidType(value DeviceDhcpv6ClientDuidType) DeviceDhcpv6Client { + + obj.duidTypeHolder = nil + obj.obj.DuidType = value.msg() + + return obj +} + +// The options requested by a client from a server in the options request option. +// OptionsRequest returns a DeviceDhcpv6ClientOptionsRequest +func (obj *deviceDhcpv6Client) OptionsRequest() DeviceDhcpv6ClientOptionsRequest { + if obj.obj.OptionsRequest == nil { + obj.obj.OptionsRequest = NewDeviceDhcpv6ClientOptionsRequest().msg() + } + if obj.optionsRequestHolder == nil { + obj.optionsRequestHolder = &deviceDhcpv6ClientOptionsRequest{obj: obj.obj.OptionsRequest} + } + return obj.optionsRequestHolder +} + +// The options requested by a client from a server in the options request option. +// OptionsRequest returns a DeviceDhcpv6ClientOptionsRequest +func (obj *deviceDhcpv6Client) HasOptionsRequest() bool { + return obj.obj.OptionsRequest != nil +} + +// The options requested by a client from a server in the options request option. +// SetOptionsRequest sets the DeviceDhcpv6ClientOptionsRequest value in the DeviceDhcpv6Client object +func (obj *deviceDhcpv6Client) SetOptionsRequest(value DeviceDhcpv6ClientOptionsRequest) DeviceDhcpv6Client { + + obj.optionsRequestHolder = nil + obj.obj.OptionsRequest = value.msg() + + return obj +} + +// Optional DHCPv4 Client options that are sent in Dhcp client messages. +// Options returns a DeviceDhcpv6ClientOptions +func (obj *deviceDhcpv6Client) Options() DeviceDhcpv6ClientOptions { + if obj.obj.Options == nil { + obj.obj.Options = NewDeviceDhcpv6ClientOptions().msg() + } + if obj.optionsHolder == nil { + obj.optionsHolder = &deviceDhcpv6ClientOptions{obj: obj.obj.Options} + } + return obj.optionsHolder +} + +// Optional DHCPv4 Client options that are sent in Dhcp client messages. +// Options returns a DeviceDhcpv6ClientOptions +func (obj *deviceDhcpv6Client) HasOptions() bool { + return obj.obj.Options != nil +} + +// Optional DHCPv4 Client options that are sent in Dhcp client messages. +// SetOptions sets the DeviceDhcpv6ClientOptions value in the DeviceDhcpv6Client object +func (obj *deviceDhcpv6Client) SetOptions(value DeviceDhcpv6ClientOptions) DeviceDhcpv6Client { + + obj.optionsHolder = nil + obj.obj.Options = value.msg() + + return obj +} + +func (obj *deviceDhcpv6Client) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface DeviceDhcpv6Client") + } + + if obj.obj.IaType != nil { + + obj.IaType().validateObj(vObj, set_default) + } + + if obj.obj.DuidType != nil { + + obj.DuidType().validateObj(vObj, set_default) + } + + if obj.obj.OptionsRequest != nil { + + obj.OptionsRequest().validateObj(vObj, set_default) + } + + if obj.obj.Options != nil { + + obj.Options().validateObj(vObj, set_default) + } + +} + +func (obj *deviceDhcpv6Client) setDefault() { + if obj.obj.RapidCommit == nil { + obj.SetRapidCommit(false) + } + +} diff --git a/gosnappi/device_dhcpv6_client_duid_type.go b/gosnappi/device_dhcpv6_client_duid_type.go new file mode 100644 index 00000000..d98774a1 --- /dev/null +++ b/gosnappi/device_dhcpv6_client_duid_type.go @@ -0,0 +1,502 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceDhcpv6ClientDuidType ***** +type deviceDhcpv6ClientDuidType struct { + validation + obj *otg.DeviceDhcpv6ClientDuidType + marshaller marshalDeviceDhcpv6ClientDuidType + unMarshaller unMarshalDeviceDhcpv6ClientDuidType + lltHolder DeviceDhcpv6ClientNoDuid + enHolder DeviceDhcpv6ClientDuidValue + llHolder DeviceDhcpv6ClientNoDuid +} + +func NewDeviceDhcpv6ClientDuidType() DeviceDhcpv6ClientDuidType { + obj := deviceDhcpv6ClientDuidType{obj: &otg.DeviceDhcpv6ClientDuidType{}} + obj.setDefault() + return &obj +} + +func (obj *deviceDhcpv6ClientDuidType) msg() *otg.DeviceDhcpv6ClientDuidType { + return obj.obj +} + +func (obj *deviceDhcpv6ClientDuidType) setMsg(msg *otg.DeviceDhcpv6ClientDuidType) DeviceDhcpv6ClientDuidType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceDhcpv6ClientDuidType struct { + obj *deviceDhcpv6ClientDuidType +} + +type marshalDeviceDhcpv6ClientDuidType interface { + // ToProto marshals DeviceDhcpv6ClientDuidType to protobuf object *otg.DeviceDhcpv6ClientDuidType + ToProto() (*otg.DeviceDhcpv6ClientDuidType, error) + // ToPbText marshals DeviceDhcpv6ClientDuidType to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceDhcpv6ClientDuidType to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceDhcpv6ClientDuidType to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceDhcpv6ClientDuidType struct { + obj *deviceDhcpv6ClientDuidType +} + +type unMarshalDeviceDhcpv6ClientDuidType interface { + // FromProto unmarshals DeviceDhcpv6ClientDuidType from protobuf object *otg.DeviceDhcpv6ClientDuidType + FromProto(msg *otg.DeviceDhcpv6ClientDuidType) (DeviceDhcpv6ClientDuidType, error) + // FromPbText unmarshals DeviceDhcpv6ClientDuidType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceDhcpv6ClientDuidType from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceDhcpv6ClientDuidType from JSON text + FromJson(value string) error +} + +func (obj *deviceDhcpv6ClientDuidType) Marshal() marshalDeviceDhcpv6ClientDuidType { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceDhcpv6ClientDuidType{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceDhcpv6ClientDuidType) Unmarshal() unMarshalDeviceDhcpv6ClientDuidType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceDhcpv6ClientDuidType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceDhcpv6ClientDuidType) ToProto() (*otg.DeviceDhcpv6ClientDuidType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceDhcpv6ClientDuidType) FromProto(msg *otg.DeviceDhcpv6ClientDuidType) (DeviceDhcpv6ClientDuidType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceDhcpv6ClientDuidType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceDhcpv6ClientDuidType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceDhcpv6ClientDuidType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6ClientDuidType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceDhcpv6ClientDuidType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6ClientDuidType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceDhcpv6ClientDuidType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceDhcpv6ClientDuidType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceDhcpv6ClientDuidType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceDhcpv6ClientDuidType) Clone() (DeviceDhcpv6ClientDuidType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceDhcpv6ClientDuidType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceDhcpv6ClientDuidType) setNil() { + obj.lltHolder = nil + obj.enHolder = nil + obj.llHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceDhcpv6ClientDuidType is description is TBD +type DeviceDhcpv6ClientDuidType interface { + Validation + // msg marshals DeviceDhcpv6ClientDuidType to protobuf object *otg.DeviceDhcpv6ClientDuidType + // and doesn't set defaults + msg() *otg.DeviceDhcpv6ClientDuidType + // setMsg unmarshals DeviceDhcpv6ClientDuidType from protobuf object *otg.DeviceDhcpv6ClientDuidType + // and doesn't set defaults + setMsg(*otg.DeviceDhcpv6ClientDuidType) DeviceDhcpv6ClientDuidType + // provides marshal interface + Marshal() marshalDeviceDhcpv6ClientDuidType + // provides unmarshal interface + Unmarshal() unMarshalDeviceDhcpv6ClientDuidType + // validate validates DeviceDhcpv6ClientDuidType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceDhcpv6ClientDuidType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns DeviceDhcpv6ClientDuidTypeChoiceEnum, set in DeviceDhcpv6ClientDuidType + Choice() DeviceDhcpv6ClientDuidTypeChoiceEnum + // setChoice assigns DeviceDhcpv6ClientDuidTypeChoiceEnum provided by user to DeviceDhcpv6ClientDuidType + setChoice(value DeviceDhcpv6ClientDuidTypeChoiceEnum) DeviceDhcpv6ClientDuidType + // HasChoice checks if Choice has been set in DeviceDhcpv6ClientDuidType + HasChoice() bool + // Llt returns DeviceDhcpv6ClientNoDuid, set in DeviceDhcpv6ClientDuidType. + Llt() DeviceDhcpv6ClientNoDuid + // SetLlt assigns DeviceDhcpv6ClientNoDuid provided by user to DeviceDhcpv6ClientDuidType. + SetLlt(value DeviceDhcpv6ClientNoDuid) DeviceDhcpv6ClientDuidType + // HasLlt checks if Llt has been set in DeviceDhcpv6ClientDuidType + HasLlt() bool + // En returns DeviceDhcpv6ClientDuidValue, set in DeviceDhcpv6ClientDuidType. + En() DeviceDhcpv6ClientDuidValue + // SetEn assigns DeviceDhcpv6ClientDuidValue provided by user to DeviceDhcpv6ClientDuidType. + SetEn(value DeviceDhcpv6ClientDuidValue) DeviceDhcpv6ClientDuidType + // HasEn checks if En has been set in DeviceDhcpv6ClientDuidType + HasEn() bool + // Ll returns DeviceDhcpv6ClientNoDuid, set in DeviceDhcpv6ClientDuidType. + Ll() DeviceDhcpv6ClientNoDuid + // SetLl assigns DeviceDhcpv6ClientNoDuid provided by user to DeviceDhcpv6ClientDuidType. + SetLl(value DeviceDhcpv6ClientNoDuid) DeviceDhcpv6ClientDuidType + // HasLl checks if Ll has been set in DeviceDhcpv6ClientDuidType + HasLl() bool + setNil() +} + +type DeviceDhcpv6ClientDuidTypeChoiceEnum string + +// Enum of Choice on DeviceDhcpv6ClientDuidType +var DeviceDhcpv6ClientDuidTypeChoice = struct { + LLT DeviceDhcpv6ClientDuidTypeChoiceEnum + EN DeviceDhcpv6ClientDuidTypeChoiceEnum + LL DeviceDhcpv6ClientDuidTypeChoiceEnum +}{ + LLT: DeviceDhcpv6ClientDuidTypeChoiceEnum("llt"), + EN: DeviceDhcpv6ClientDuidTypeChoiceEnum("en"), + LL: DeviceDhcpv6ClientDuidTypeChoiceEnum("ll"), +} + +func (obj *deviceDhcpv6ClientDuidType) Choice() DeviceDhcpv6ClientDuidTypeChoiceEnum { + return DeviceDhcpv6ClientDuidTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// Each DHCP client and server has a DUID. DHCP clients use DUIDs to identify a server in messages where a server needs to be identified. +// Choice returns a string +func (obj *deviceDhcpv6ClientDuidType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *deviceDhcpv6ClientDuidType) setChoice(value DeviceDhcpv6ClientDuidTypeChoiceEnum) DeviceDhcpv6ClientDuidType { + intValue, ok := otg.DeviceDhcpv6ClientDuidType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on DeviceDhcpv6ClientDuidTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.DeviceDhcpv6ClientDuidType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ll = nil + obj.llHolder = nil + obj.obj.En = nil + obj.enHolder = nil + obj.obj.Llt = nil + obj.lltHolder = nil + + if value == DeviceDhcpv6ClientDuidTypeChoice.LLT { + obj.obj.Llt = NewDeviceDhcpv6ClientNoDuid().msg() + } + + if value == DeviceDhcpv6ClientDuidTypeChoice.EN { + obj.obj.En = NewDeviceDhcpv6ClientDuidValue().msg() + } + + if value == DeviceDhcpv6ClientDuidTypeChoice.LL { + obj.obj.Ll = NewDeviceDhcpv6ClientNoDuid().msg() + } + + return obj +} + +// description is TBD +// Llt returns a DeviceDhcpv6ClientNoDuid +func (obj *deviceDhcpv6ClientDuidType) Llt() DeviceDhcpv6ClientNoDuid { + if obj.obj.Llt == nil { + obj.setChoice(DeviceDhcpv6ClientDuidTypeChoice.LLT) + } + if obj.lltHolder == nil { + obj.lltHolder = &deviceDhcpv6ClientNoDuid{obj: obj.obj.Llt} + } + return obj.lltHolder +} + +// description is TBD +// Llt returns a DeviceDhcpv6ClientNoDuid +func (obj *deviceDhcpv6ClientDuidType) HasLlt() bool { + return obj.obj.Llt != nil +} + +// description is TBD +// SetLlt sets the DeviceDhcpv6ClientNoDuid value in the DeviceDhcpv6ClientDuidType object +func (obj *deviceDhcpv6ClientDuidType) SetLlt(value DeviceDhcpv6ClientNoDuid) DeviceDhcpv6ClientDuidType { + obj.setChoice(DeviceDhcpv6ClientDuidTypeChoice.LLT) + obj.lltHolder = nil + obj.obj.Llt = value.msg() + + return obj +} + +// description is TBD +// En returns a DeviceDhcpv6ClientDuidValue +func (obj *deviceDhcpv6ClientDuidType) En() DeviceDhcpv6ClientDuidValue { + if obj.obj.En == nil { + obj.setChoice(DeviceDhcpv6ClientDuidTypeChoice.EN) + } + if obj.enHolder == nil { + obj.enHolder = &deviceDhcpv6ClientDuidValue{obj: obj.obj.En} + } + return obj.enHolder +} + +// description is TBD +// En returns a DeviceDhcpv6ClientDuidValue +func (obj *deviceDhcpv6ClientDuidType) HasEn() bool { + return obj.obj.En != nil +} + +// description is TBD +// SetEn sets the DeviceDhcpv6ClientDuidValue value in the DeviceDhcpv6ClientDuidType object +func (obj *deviceDhcpv6ClientDuidType) SetEn(value DeviceDhcpv6ClientDuidValue) DeviceDhcpv6ClientDuidType { + obj.setChoice(DeviceDhcpv6ClientDuidTypeChoice.EN) + obj.enHolder = nil + obj.obj.En = value.msg() + + return obj +} + +// description is TBD +// Ll returns a DeviceDhcpv6ClientNoDuid +func (obj *deviceDhcpv6ClientDuidType) Ll() DeviceDhcpv6ClientNoDuid { + if obj.obj.Ll == nil { + obj.setChoice(DeviceDhcpv6ClientDuidTypeChoice.LL) + } + if obj.llHolder == nil { + obj.llHolder = &deviceDhcpv6ClientNoDuid{obj: obj.obj.Ll} + } + return obj.llHolder +} + +// description is TBD +// Ll returns a DeviceDhcpv6ClientNoDuid +func (obj *deviceDhcpv6ClientDuidType) HasLl() bool { + return obj.obj.Ll != nil +} + +// description is TBD +// SetLl sets the DeviceDhcpv6ClientNoDuid value in the DeviceDhcpv6ClientDuidType object +func (obj *deviceDhcpv6ClientDuidType) SetLl(value DeviceDhcpv6ClientNoDuid) DeviceDhcpv6ClientDuidType { + obj.setChoice(DeviceDhcpv6ClientDuidTypeChoice.LL) + obj.llHolder = nil + obj.obj.Ll = value.msg() + + return obj +} + +func (obj *deviceDhcpv6ClientDuidType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Llt != nil { + + obj.Llt().validateObj(vObj, set_default) + } + + if obj.obj.En != nil { + + obj.En().validateObj(vObj, set_default) + } + + if obj.obj.Ll != nil { + + obj.Ll().validateObj(vObj, set_default) + } + +} + +func (obj *deviceDhcpv6ClientDuidType) setDefault() { + var choices_set int = 0 + var choice DeviceDhcpv6ClientDuidTypeChoiceEnum + + if obj.obj.Llt != nil { + choices_set += 1 + choice = DeviceDhcpv6ClientDuidTypeChoice.LLT + } + + if obj.obj.En != nil { + choices_set += 1 + choice = DeviceDhcpv6ClientDuidTypeChoice.EN + } + + if obj.obj.Ll != nil { + choices_set += 1 + choice = DeviceDhcpv6ClientDuidTypeChoice.LL + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(DeviceDhcpv6ClientDuidTypeChoice.LLT) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in DeviceDhcpv6ClientDuidType") + } + } else { + intVal := otg.DeviceDhcpv6ClientDuidType_Choice_Enum_value[string(choice)] + enumValue := otg.DeviceDhcpv6ClientDuidType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/device_dhcpv6_client_duid_value.go b/gosnappi/device_dhcpv6_client_duid_value.go new file mode 100644 index 00000000..9ba2fb7b --- /dev/null +++ b/gosnappi/device_dhcpv6_client_duid_value.go @@ -0,0 +1,360 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceDhcpv6ClientDuidValue ***** +type deviceDhcpv6ClientDuidValue struct { + validation + obj *otg.DeviceDhcpv6ClientDuidValue + marshaller marshalDeviceDhcpv6ClientDuidValue + unMarshaller unMarshalDeviceDhcpv6ClientDuidValue +} + +func NewDeviceDhcpv6ClientDuidValue() DeviceDhcpv6ClientDuidValue { + obj := deviceDhcpv6ClientDuidValue{obj: &otg.DeviceDhcpv6ClientDuidValue{}} + obj.setDefault() + return &obj +} + +func (obj *deviceDhcpv6ClientDuidValue) msg() *otg.DeviceDhcpv6ClientDuidValue { + return obj.obj +} + +func (obj *deviceDhcpv6ClientDuidValue) setMsg(msg *otg.DeviceDhcpv6ClientDuidValue) DeviceDhcpv6ClientDuidValue { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceDhcpv6ClientDuidValue struct { + obj *deviceDhcpv6ClientDuidValue +} + +type marshalDeviceDhcpv6ClientDuidValue interface { + // ToProto marshals DeviceDhcpv6ClientDuidValue to protobuf object *otg.DeviceDhcpv6ClientDuidValue + ToProto() (*otg.DeviceDhcpv6ClientDuidValue, error) + // ToPbText marshals DeviceDhcpv6ClientDuidValue to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceDhcpv6ClientDuidValue to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceDhcpv6ClientDuidValue to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceDhcpv6ClientDuidValue struct { + obj *deviceDhcpv6ClientDuidValue +} + +type unMarshalDeviceDhcpv6ClientDuidValue interface { + // FromProto unmarshals DeviceDhcpv6ClientDuidValue from protobuf object *otg.DeviceDhcpv6ClientDuidValue + FromProto(msg *otg.DeviceDhcpv6ClientDuidValue) (DeviceDhcpv6ClientDuidValue, error) + // FromPbText unmarshals DeviceDhcpv6ClientDuidValue from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceDhcpv6ClientDuidValue from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceDhcpv6ClientDuidValue from JSON text + FromJson(value string) error +} + +func (obj *deviceDhcpv6ClientDuidValue) Marshal() marshalDeviceDhcpv6ClientDuidValue { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceDhcpv6ClientDuidValue{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceDhcpv6ClientDuidValue) Unmarshal() unMarshalDeviceDhcpv6ClientDuidValue { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceDhcpv6ClientDuidValue{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceDhcpv6ClientDuidValue) ToProto() (*otg.DeviceDhcpv6ClientDuidValue, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceDhcpv6ClientDuidValue) FromProto(msg *otg.DeviceDhcpv6ClientDuidValue) (DeviceDhcpv6ClientDuidValue, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceDhcpv6ClientDuidValue) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceDhcpv6ClientDuidValue) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceDhcpv6ClientDuidValue) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6ClientDuidValue) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceDhcpv6ClientDuidValue) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6ClientDuidValue) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceDhcpv6ClientDuidValue) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceDhcpv6ClientDuidValue) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceDhcpv6ClientDuidValue) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceDhcpv6ClientDuidValue) Clone() (DeviceDhcpv6ClientDuidValue, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceDhcpv6ClientDuidValue() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceDhcpv6ClientDuidValue is the container for the DUID-EN. This consists of the 4-octet vendor's registered Private Enterprise Number as maintained by IANA [IANA-PEN] followed by a unique identifier assigned by the vendor. +type DeviceDhcpv6ClientDuidValue interface { + Validation + // msg marshals DeviceDhcpv6ClientDuidValue to protobuf object *otg.DeviceDhcpv6ClientDuidValue + // and doesn't set defaults + msg() *otg.DeviceDhcpv6ClientDuidValue + // setMsg unmarshals DeviceDhcpv6ClientDuidValue from protobuf object *otg.DeviceDhcpv6ClientDuidValue + // and doesn't set defaults + setMsg(*otg.DeviceDhcpv6ClientDuidValue) DeviceDhcpv6ClientDuidValue + // provides marshal interface + Marshal() marshalDeviceDhcpv6ClientDuidValue + // provides unmarshal interface + Unmarshal() unMarshalDeviceDhcpv6ClientDuidValue + // validate validates DeviceDhcpv6ClientDuidValue + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceDhcpv6ClientDuidValue, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EnterpriseId returns uint32, set in DeviceDhcpv6ClientDuidValue. + EnterpriseId() uint32 + // SetEnterpriseId assigns uint32 provided by user to DeviceDhcpv6ClientDuidValue + SetEnterpriseId(value uint32) DeviceDhcpv6ClientDuidValue + // HasEnterpriseId checks if EnterpriseId has been set in DeviceDhcpv6ClientDuidValue + HasEnterpriseId() bool + // VendorId returns uint32, set in DeviceDhcpv6ClientDuidValue. + VendorId() uint32 + // SetVendorId assigns uint32 provided by user to DeviceDhcpv6ClientDuidValue + SetVendorId(value uint32) DeviceDhcpv6ClientDuidValue + // HasVendorId checks if VendorId has been set in DeviceDhcpv6ClientDuidValue + HasVendorId() bool +} + +// 4-octet vendor's registered Private Enterprise Number as maintained by IANA [IANA-PEN]. +// EnterpriseId returns a uint32 +func (obj *deviceDhcpv6ClientDuidValue) EnterpriseId() uint32 { + + return *obj.obj.EnterpriseId + +} + +// 4-octet vendor's registered Private Enterprise Number as maintained by IANA [IANA-PEN]. +// EnterpriseId returns a uint32 +func (obj *deviceDhcpv6ClientDuidValue) HasEnterpriseId() bool { + return obj.obj.EnterpriseId != nil +} + +// 4-octet vendor's registered Private Enterprise Number as maintained by IANA [IANA-PEN]. +// SetEnterpriseId sets the uint32 value in the DeviceDhcpv6ClientDuidValue object +func (obj *deviceDhcpv6ClientDuidValue) SetEnterpriseId(value uint32) DeviceDhcpv6ClientDuidValue { + + obj.obj.EnterpriseId = &value + return obj +} + +// Unique identifier assigned by the vendor. +// VendorId returns a uint32 +func (obj *deviceDhcpv6ClientDuidValue) VendorId() uint32 { + + return *obj.obj.VendorId + +} + +// Unique identifier assigned by the vendor. +// VendorId returns a uint32 +func (obj *deviceDhcpv6ClientDuidValue) HasVendorId() bool { + return obj.obj.VendorId != nil +} + +// Unique identifier assigned by the vendor. +// SetVendorId sets the uint32 value in the DeviceDhcpv6ClientDuidValue object +func (obj *deviceDhcpv6ClientDuidValue) SetVendorId(value uint32) DeviceDhcpv6ClientDuidValue { + + obj.obj.VendorId = &value + return obj +} + +func (obj *deviceDhcpv6ClientDuidValue) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.EnterpriseId != nil { + + if *obj.obj.EnterpriseId < 1 || *obj.obj.EnterpriseId > 2147483647 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= DeviceDhcpv6ClientDuidValue.EnterpriseId <= 2147483647 but Got %d", *obj.obj.EnterpriseId)) + } + + } + + if obj.obj.VendorId != nil { + + if *obj.obj.VendorId < 1 || *obj.obj.VendorId > 2147483647 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= DeviceDhcpv6ClientDuidValue.VendorId <= 2147483647 but Got %d", *obj.obj.VendorId)) + } + + } + +} + +func (obj *deviceDhcpv6ClientDuidValue) setDefault() { + if obj.obj.EnterpriseId == nil { + obj.SetEnterpriseId(10) + } + if obj.obj.VendorId == nil { + obj.SetVendorId(10) + } + +} diff --git a/gosnappi/device_dhcpv6_client_ia_time_value.go b/gosnappi/device_dhcpv6_client_ia_time_value.go new file mode 100644 index 00000000..1737efda --- /dev/null +++ b/gosnappi/device_dhcpv6_client_ia_time_value.go @@ -0,0 +1,360 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceDhcpv6ClientIaTimeValue ***** +type deviceDhcpv6ClientIaTimeValue struct { + validation + obj *otg.DeviceDhcpv6ClientIaTimeValue + marshaller marshalDeviceDhcpv6ClientIaTimeValue + unMarshaller unMarshalDeviceDhcpv6ClientIaTimeValue +} + +func NewDeviceDhcpv6ClientIaTimeValue() DeviceDhcpv6ClientIaTimeValue { + obj := deviceDhcpv6ClientIaTimeValue{obj: &otg.DeviceDhcpv6ClientIaTimeValue{}} + obj.setDefault() + return &obj +} + +func (obj *deviceDhcpv6ClientIaTimeValue) msg() *otg.DeviceDhcpv6ClientIaTimeValue { + return obj.obj +} + +func (obj *deviceDhcpv6ClientIaTimeValue) setMsg(msg *otg.DeviceDhcpv6ClientIaTimeValue) DeviceDhcpv6ClientIaTimeValue { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceDhcpv6ClientIaTimeValue struct { + obj *deviceDhcpv6ClientIaTimeValue +} + +type marshalDeviceDhcpv6ClientIaTimeValue interface { + // ToProto marshals DeviceDhcpv6ClientIaTimeValue to protobuf object *otg.DeviceDhcpv6ClientIaTimeValue + ToProto() (*otg.DeviceDhcpv6ClientIaTimeValue, error) + // ToPbText marshals DeviceDhcpv6ClientIaTimeValue to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceDhcpv6ClientIaTimeValue to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceDhcpv6ClientIaTimeValue to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceDhcpv6ClientIaTimeValue struct { + obj *deviceDhcpv6ClientIaTimeValue +} + +type unMarshalDeviceDhcpv6ClientIaTimeValue interface { + // FromProto unmarshals DeviceDhcpv6ClientIaTimeValue from protobuf object *otg.DeviceDhcpv6ClientIaTimeValue + FromProto(msg *otg.DeviceDhcpv6ClientIaTimeValue) (DeviceDhcpv6ClientIaTimeValue, error) + // FromPbText unmarshals DeviceDhcpv6ClientIaTimeValue from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceDhcpv6ClientIaTimeValue from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceDhcpv6ClientIaTimeValue from JSON text + FromJson(value string) error +} + +func (obj *deviceDhcpv6ClientIaTimeValue) Marshal() marshalDeviceDhcpv6ClientIaTimeValue { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceDhcpv6ClientIaTimeValue{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceDhcpv6ClientIaTimeValue) Unmarshal() unMarshalDeviceDhcpv6ClientIaTimeValue { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceDhcpv6ClientIaTimeValue{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceDhcpv6ClientIaTimeValue) ToProto() (*otg.DeviceDhcpv6ClientIaTimeValue, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceDhcpv6ClientIaTimeValue) FromProto(msg *otg.DeviceDhcpv6ClientIaTimeValue) (DeviceDhcpv6ClientIaTimeValue, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceDhcpv6ClientIaTimeValue) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceDhcpv6ClientIaTimeValue) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceDhcpv6ClientIaTimeValue) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6ClientIaTimeValue) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceDhcpv6ClientIaTimeValue) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6ClientIaTimeValue) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceDhcpv6ClientIaTimeValue) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceDhcpv6ClientIaTimeValue) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceDhcpv6ClientIaTimeValue) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceDhcpv6ClientIaTimeValue) Clone() (DeviceDhcpv6ClientIaTimeValue, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceDhcpv6ClientIaTimeValue() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceDhcpv6ClientIaTimeValue is the container for the suggested times at which the client contacts the server or any available server. +type DeviceDhcpv6ClientIaTimeValue interface { + Validation + // msg marshals DeviceDhcpv6ClientIaTimeValue to protobuf object *otg.DeviceDhcpv6ClientIaTimeValue + // and doesn't set defaults + msg() *otg.DeviceDhcpv6ClientIaTimeValue + // setMsg unmarshals DeviceDhcpv6ClientIaTimeValue from protobuf object *otg.DeviceDhcpv6ClientIaTimeValue + // and doesn't set defaults + setMsg(*otg.DeviceDhcpv6ClientIaTimeValue) DeviceDhcpv6ClientIaTimeValue + // provides marshal interface + Marshal() marshalDeviceDhcpv6ClientIaTimeValue + // provides unmarshal interface + Unmarshal() unMarshalDeviceDhcpv6ClientIaTimeValue + // validate validates DeviceDhcpv6ClientIaTimeValue + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceDhcpv6ClientIaTimeValue, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // T1 returns uint32, set in DeviceDhcpv6ClientIaTimeValue. + T1() uint32 + // SetT1 assigns uint32 provided by user to DeviceDhcpv6ClientIaTimeValue + SetT1(value uint32) DeviceDhcpv6ClientIaTimeValue + // HasT1 checks if T1 has been set in DeviceDhcpv6ClientIaTimeValue + HasT1() bool + // T2 returns uint32, set in DeviceDhcpv6ClientIaTimeValue. + T2() uint32 + // SetT2 assigns uint32 provided by user to DeviceDhcpv6ClientIaTimeValue + SetT2(value uint32) DeviceDhcpv6ClientIaTimeValue + // HasT2 checks if T2 has been set in DeviceDhcpv6ClientIaTimeValue + HasT2() bool +} + +// The suggested time at which the client contacts the server from which the addresses were obtained to extend the lifetimes of the addresses assigned. T1 is a time duration relative to the current time expressed in units of seconds. If set to 0 server will ignore it. If the maximum value is specified it means infinite time. +// T1 returns a uint32 +func (obj *deviceDhcpv6ClientIaTimeValue) T1() uint32 { + + return *obj.obj.T1 + +} + +// The suggested time at which the client contacts the server from which the addresses were obtained to extend the lifetimes of the addresses assigned. T1 is a time duration relative to the current time expressed in units of seconds. If set to 0 server will ignore it. If the maximum value is specified it means infinite time. +// T1 returns a uint32 +func (obj *deviceDhcpv6ClientIaTimeValue) HasT1() bool { + return obj.obj.T1 != nil +} + +// The suggested time at which the client contacts the server from which the addresses were obtained to extend the lifetimes of the addresses assigned. T1 is a time duration relative to the current time expressed in units of seconds. If set to 0 server will ignore it. If the maximum value is specified it means infinite time. +// SetT1 sets the uint32 value in the DeviceDhcpv6ClientIaTimeValue object +func (obj *deviceDhcpv6ClientIaTimeValue) SetT1(value uint32) DeviceDhcpv6ClientIaTimeValue { + + obj.obj.T1 = &value + return obj +} + +// The suggested time at which the client contacts any available server to extend the lifetimes of the addresses assigned. T2 is a time duration relative to the current time expressed in units of seconds. If set to 0 server will ignore it. If the maximum value is specified it means infinite time +// T2 returns a uint32 +func (obj *deviceDhcpv6ClientIaTimeValue) T2() uint32 { + + return *obj.obj.T2 + +} + +// The suggested time at which the client contacts any available server to extend the lifetimes of the addresses assigned. T2 is a time duration relative to the current time expressed in units of seconds. If set to 0 server will ignore it. If the maximum value is specified it means infinite time +// T2 returns a uint32 +func (obj *deviceDhcpv6ClientIaTimeValue) HasT2() bool { + return obj.obj.T2 != nil +} + +// The suggested time at which the client contacts any available server to extend the lifetimes of the addresses assigned. T2 is a time duration relative to the current time expressed in units of seconds. If set to 0 server will ignore it. If the maximum value is specified it means infinite time +// SetT2 sets the uint32 value in the DeviceDhcpv6ClientIaTimeValue object +func (obj *deviceDhcpv6ClientIaTimeValue) SetT2(value uint32) DeviceDhcpv6ClientIaTimeValue { + + obj.obj.T2 = &value + return obj +} + +func (obj *deviceDhcpv6ClientIaTimeValue) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.T1 != nil { + + if *obj.obj.T1 > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= DeviceDhcpv6ClientIaTimeValue.T1 <= 4294967295 but Got %d", *obj.obj.T1)) + } + + } + + if obj.obj.T2 != nil { + + if *obj.obj.T2 > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= DeviceDhcpv6ClientIaTimeValue.T2 <= 4294967295 but Got %d", *obj.obj.T2)) + } + + } + +} + +func (obj *deviceDhcpv6ClientIaTimeValue) setDefault() { + if obj.obj.T1 == nil { + obj.SetT1(302400) + } + if obj.obj.T2 == nil { + obj.SetT2(483840) + } + +} diff --git a/gosnappi/device_dhcpv6_client_ia_type.go b/gosnappi/device_dhcpv6_client_ia_type.go new file mode 100644 index 00000000..5ce00724 --- /dev/null +++ b/gosnappi/device_dhcpv6_client_ia_type.go @@ -0,0 +1,511 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceDhcpv6ClientIaType ***** +type deviceDhcpv6ClientIaType struct { + validation + obj *otg.DeviceDhcpv6ClientIaType + marshaller marshalDeviceDhcpv6ClientIaType + unMarshaller unMarshalDeviceDhcpv6ClientIaType + ianaHolder DeviceDhcpv6ClientIaTimeValue + iapdHolder DeviceDhcpv6ClientIaTimeValue + ianapdHolder DeviceDhcpv6ClientIaTimeValue +} + +func NewDeviceDhcpv6ClientIaType() DeviceDhcpv6ClientIaType { + obj := deviceDhcpv6ClientIaType{obj: &otg.DeviceDhcpv6ClientIaType{}} + obj.setDefault() + return &obj +} + +func (obj *deviceDhcpv6ClientIaType) msg() *otg.DeviceDhcpv6ClientIaType { + return obj.obj +} + +func (obj *deviceDhcpv6ClientIaType) setMsg(msg *otg.DeviceDhcpv6ClientIaType) DeviceDhcpv6ClientIaType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceDhcpv6ClientIaType struct { + obj *deviceDhcpv6ClientIaType +} + +type marshalDeviceDhcpv6ClientIaType interface { + // ToProto marshals DeviceDhcpv6ClientIaType to protobuf object *otg.DeviceDhcpv6ClientIaType + ToProto() (*otg.DeviceDhcpv6ClientIaType, error) + // ToPbText marshals DeviceDhcpv6ClientIaType to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceDhcpv6ClientIaType to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceDhcpv6ClientIaType to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceDhcpv6ClientIaType struct { + obj *deviceDhcpv6ClientIaType +} + +type unMarshalDeviceDhcpv6ClientIaType interface { + // FromProto unmarshals DeviceDhcpv6ClientIaType from protobuf object *otg.DeviceDhcpv6ClientIaType + FromProto(msg *otg.DeviceDhcpv6ClientIaType) (DeviceDhcpv6ClientIaType, error) + // FromPbText unmarshals DeviceDhcpv6ClientIaType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceDhcpv6ClientIaType from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceDhcpv6ClientIaType from JSON text + FromJson(value string) error +} + +func (obj *deviceDhcpv6ClientIaType) Marshal() marshalDeviceDhcpv6ClientIaType { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceDhcpv6ClientIaType{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceDhcpv6ClientIaType) Unmarshal() unMarshalDeviceDhcpv6ClientIaType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceDhcpv6ClientIaType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceDhcpv6ClientIaType) ToProto() (*otg.DeviceDhcpv6ClientIaType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceDhcpv6ClientIaType) FromProto(msg *otg.DeviceDhcpv6ClientIaType) (DeviceDhcpv6ClientIaType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceDhcpv6ClientIaType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceDhcpv6ClientIaType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceDhcpv6ClientIaType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6ClientIaType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceDhcpv6ClientIaType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6ClientIaType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceDhcpv6ClientIaType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceDhcpv6ClientIaType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceDhcpv6ClientIaType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceDhcpv6ClientIaType) Clone() (DeviceDhcpv6ClientIaType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceDhcpv6ClientIaType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceDhcpv6ClientIaType) setNil() { + obj.ianaHolder = nil + obj.iapdHolder = nil + obj.ianapdHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceDhcpv6ClientIaType is description is TBD +type DeviceDhcpv6ClientIaType interface { + Validation + // msg marshals DeviceDhcpv6ClientIaType to protobuf object *otg.DeviceDhcpv6ClientIaType + // and doesn't set defaults + msg() *otg.DeviceDhcpv6ClientIaType + // setMsg unmarshals DeviceDhcpv6ClientIaType from protobuf object *otg.DeviceDhcpv6ClientIaType + // and doesn't set defaults + setMsg(*otg.DeviceDhcpv6ClientIaType) DeviceDhcpv6ClientIaType + // provides marshal interface + Marshal() marshalDeviceDhcpv6ClientIaType + // provides unmarshal interface + Unmarshal() unMarshalDeviceDhcpv6ClientIaType + // validate validates DeviceDhcpv6ClientIaType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceDhcpv6ClientIaType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns DeviceDhcpv6ClientIaTypeChoiceEnum, set in DeviceDhcpv6ClientIaType + Choice() DeviceDhcpv6ClientIaTypeChoiceEnum + // setChoice assigns DeviceDhcpv6ClientIaTypeChoiceEnum provided by user to DeviceDhcpv6ClientIaType + setChoice(value DeviceDhcpv6ClientIaTypeChoiceEnum) DeviceDhcpv6ClientIaType + // HasChoice checks if Choice has been set in DeviceDhcpv6ClientIaType + HasChoice() bool + // getter for Iata to set choice. + Iata() + // Iana returns DeviceDhcpv6ClientIaTimeValue, set in DeviceDhcpv6ClientIaType. + Iana() DeviceDhcpv6ClientIaTimeValue + // SetIana assigns DeviceDhcpv6ClientIaTimeValue provided by user to DeviceDhcpv6ClientIaType. + SetIana(value DeviceDhcpv6ClientIaTimeValue) DeviceDhcpv6ClientIaType + // HasIana checks if Iana has been set in DeviceDhcpv6ClientIaType + HasIana() bool + // Iapd returns DeviceDhcpv6ClientIaTimeValue, set in DeviceDhcpv6ClientIaType. + Iapd() DeviceDhcpv6ClientIaTimeValue + // SetIapd assigns DeviceDhcpv6ClientIaTimeValue provided by user to DeviceDhcpv6ClientIaType. + SetIapd(value DeviceDhcpv6ClientIaTimeValue) DeviceDhcpv6ClientIaType + // HasIapd checks if Iapd has been set in DeviceDhcpv6ClientIaType + HasIapd() bool + // Ianapd returns DeviceDhcpv6ClientIaTimeValue, set in DeviceDhcpv6ClientIaType. + Ianapd() DeviceDhcpv6ClientIaTimeValue + // SetIanapd assigns DeviceDhcpv6ClientIaTimeValue provided by user to DeviceDhcpv6ClientIaType. + SetIanapd(value DeviceDhcpv6ClientIaTimeValue) DeviceDhcpv6ClientIaType + // HasIanapd checks if Ianapd has been set in DeviceDhcpv6ClientIaType + HasIanapd() bool + setNil() +} + +type DeviceDhcpv6ClientIaTypeChoiceEnum string + +// Enum of Choice on DeviceDhcpv6ClientIaType +var DeviceDhcpv6ClientIaTypeChoice = struct { + IANA DeviceDhcpv6ClientIaTypeChoiceEnum + IATA DeviceDhcpv6ClientIaTypeChoiceEnum + IAPD DeviceDhcpv6ClientIaTypeChoiceEnum + IANAPD DeviceDhcpv6ClientIaTypeChoiceEnum +}{ + IANA: DeviceDhcpv6ClientIaTypeChoiceEnum("iana"), + IATA: DeviceDhcpv6ClientIaTypeChoiceEnum("iata"), + IAPD: DeviceDhcpv6ClientIaTypeChoiceEnum("iapd"), + IANAPD: DeviceDhcpv6ClientIaTypeChoiceEnum("ianapd"), +} + +func (obj *deviceDhcpv6ClientIaType) Choice() DeviceDhcpv6ClientIaTypeChoiceEnum { + return DeviceDhcpv6ClientIaTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for Iata to set choice +func (obj *deviceDhcpv6ClientIaType) Iata() { + obj.setChoice(DeviceDhcpv6ClientIaTypeChoice.IATA) +} + +// Identity Association: Each IA has an associated IAID. IA_NA and IA_TA options represent different types of IPv6 addresses and parameters accepted by DHCPv6 clients each used in different context by an IPv6 node. IA_NA is the Identity Association for Non-temporary Addresses option. IA_TA is the Identity Association for Temporary Addresses option. IA_PD and IA_NAPD options represent one or more IPv6 prefix and parameters. IA_PD is the Identity Association for Prefix Delegation and IA_NAPD s the Identity Association for Temporary Prefix Delegation. +// Choice returns a string +func (obj *deviceDhcpv6ClientIaType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *deviceDhcpv6ClientIaType) setChoice(value DeviceDhcpv6ClientIaTypeChoiceEnum) DeviceDhcpv6ClientIaType { + intValue, ok := otg.DeviceDhcpv6ClientIaType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on DeviceDhcpv6ClientIaTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.DeviceDhcpv6ClientIaType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ianapd = nil + obj.ianapdHolder = nil + obj.obj.Iapd = nil + obj.iapdHolder = nil + obj.obj.Iana = nil + obj.ianaHolder = nil + + if value == DeviceDhcpv6ClientIaTypeChoice.IANA { + obj.obj.Iana = NewDeviceDhcpv6ClientIaTimeValue().msg() + } + + if value == DeviceDhcpv6ClientIaTypeChoice.IAPD { + obj.obj.Iapd = NewDeviceDhcpv6ClientIaTimeValue().msg() + } + + if value == DeviceDhcpv6ClientIaTypeChoice.IANAPD { + obj.obj.Ianapd = NewDeviceDhcpv6ClientIaTimeValue().msg() + } + + return obj +} + +// description is TBD +// Iana returns a DeviceDhcpv6ClientIaTimeValue +func (obj *deviceDhcpv6ClientIaType) Iana() DeviceDhcpv6ClientIaTimeValue { + if obj.obj.Iana == nil { + obj.setChoice(DeviceDhcpv6ClientIaTypeChoice.IANA) + } + if obj.ianaHolder == nil { + obj.ianaHolder = &deviceDhcpv6ClientIaTimeValue{obj: obj.obj.Iana} + } + return obj.ianaHolder +} + +// description is TBD +// Iana returns a DeviceDhcpv6ClientIaTimeValue +func (obj *deviceDhcpv6ClientIaType) HasIana() bool { + return obj.obj.Iana != nil +} + +// description is TBD +// SetIana sets the DeviceDhcpv6ClientIaTimeValue value in the DeviceDhcpv6ClientIaType object +func (obj *deviceDhcpv6ClientIaType) SetIana(value DeviceDhcpv6ClientIaTimeValue) DeviceDhcpv6ClientIaType { + obj.setChoice(DeviceDhcpv6ClientIaTypeChoice.IANA) + obj.ianaHolder = nil + obj.obj.Iana = value.msg() + + return obj +} + +// description is TBD +// Iapd returns a DeviceDhcpv6ClientIaTimeValue +func (obj *deviceDhcpv6ClientIaType) Iapd() DeviceDhcpv6ClientIaTimeValue { + if obj.obj.Iapd == nil { + obj.setChoice(DeviceDhcpv6ClientIaTypeChoice.IAPD) + } + if obj.iapdHolder == nil { + obj.iapdHolder = &deviceDhcpv6ClientIaTimeValue{obj: obj.obj.Iapd} + } + return obj.iapdHolder +} + +// description is TBD +// Iapd returns a DeviceDhcpv6ClientIaTimeValue +func (obj *deviceDhcpv6ClientIaType) HasIapd() bool { + return obj.obj.Iapd != nil +} + +// description is TBD +// SetIapd sets the DeviceDhcpv6ClientIaTimeValue value in the DeviceDhcpv6ClientIaType object +func (obj *deviceDhcpv6ClientIaType) SetIapd(value DeviceDhcpv6ClientIaTimeValue) DeviceDhcpv6ClientIaType { + obj.setChoice(DeviceDhcpv6ClientIaTypeChoice.IAPD) + obj.iapdHolder = nil + obj.obj.Iapd = value.msg() + + return obj +} + +// description is TBD +// Ianapd returns a DeviceDhcpv6ClientIaTimeValue +func (obj *deviceDhcpv6ClientIaType) Ianapd() DeviceDhcpv6ClientIaTimeValue { + if obj.obj.Ianapd == nil { + obj.setChoice(DeviceDhcpv6ClientIaTypeChoice.IANAPD) + } + if obj.ianapdHolder == nil { + obj.ianapdHolder = &deviceDhcpv6ClientIaTimeValue{obj: obj.obj.Ianapd} + } + return obj.ianapdHolder +} + +// description is TBD +// Ianapd returns a DeviceDhcpv6ClientIaTimeValue +func (obj *deviceDhcpv6ClientIaType) HasIanapd() bool { + return obj.obj.Ianapd != nil +} + +// description is TBD +// SetIanapd sets the DeviceDhcpv6ClientIaTimeValue value in the DeviceDhcpv6ClientIaType object +func (obj *deviceDhcpv6ClientIaType) SetIanapd(value DeviceDhcpv6ClientIaTimeValue) DeviceDhcpv6ClientIaType { + obj.setChoice(DeviceDhcpv6ClientIaTypeChoice.IANAPD) + obj.ianapdHolder = nil + obj.obj.Ianapd = value.msg() + + return obj +} + +func (obj *deviceDhcpv6ClientIaType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Iana != nil { + + obj.Iana().validateObj(vObj, set_default) + } + + if obj.obj.Iapd != nil { + + obj.Iapd().validateObj(vObj, set_default) + } + + if obj.obj.Ianapd != nil { + + obj.Ianapd().validateObj(vObj, set_default) + } + +} + +func (obj *deviceDhcpv6ClientIaType) setDefault() { + var choices_set int = 0 + var choice DeviceDhcpv6ClientIaTypeChoiceEnum + + if obj.obj.Iana != nil { + choices_set += 1 + choice = DeviceDhcpv6ClientIaTypeChoice.IANA + } + + if obj.obj.Iapd != nil { + choices_set += 1 + choice = DeviceDhcpv6ClientIaTypeChoice.IAPD + } + + if obj.obj.Ianapd != nil { + choices_set += 1 + choice = DeviceDhcpv6ClientIaTypeChoice.IANAPD + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(DeviceDhcpv6ClientIaTypeChoice.IANA) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in DeviceDhcpv6ClientIaType") + } + } else { + intVal := otg.DeviceDhcpv6ClientIaType_Choice_Enum_value[string(choice)] + enumValue := otg.DeviceDhcpv6ClientIaType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/device_dhcpv6_client_no_duid.go b/gosnappi/device_dhcpv6_client_no_duid.go new file mode 100644 index 00000000..39bbbb67 --- /dev/null +++ b/gosnappi/device_dhcpv6_client_no_duid.go @@ -0,0 +1,278 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceDhcpv6ClientNoDuid ***** +type deviceDhcpv6ClientNoDuid struct { + validation + obj *otg.DeviceDhcpv6ClientNoDuid + marshaller marshalDeviceDhcpv6ClientNoDuid + unMarshaller unMarshalDeviceDhcpv6ClientNoDuid +} + +func NewDeviceDhcpv6ClientNoDuid() DeviceDhcpv6ClientNoDuid { + obj := deviceDhcpv6ClientNoDuid{obj: &otg.DeviceDhcpv6ClientNoDuid{}} + obj.setDefault() + return &obj +} + +func (obj *deviceDhcpv6ClientNoDuid) msg() *otg.DeviceDhcpv6ClientNoDuid { + return obj.obj +} + +func (obj *deviceDhcpv6ClientNoDuid) setMsg(msg *otg.DeviceDhcpv6ClientNoDuid) DeviceDhcpv6ClientNoDuid { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceDhcpv6ClientNoDuid struct { + obj *deviceDhcpv6ClientNoDuid +} + +type marshalDeviceDhcpv6ClientNoDuid interface { + // ToProto marshals DeviceDhcpv6ClientNoDuid to protobuf object *otg.DeviceDhcpv6ClientNoDuid + ToProto() (*otg.DeviceDhcpv6ClientNoDuid, error) + // ToPbText marshals DeviceDhcpv6ClientNoDuid to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceDhcpv6ClientNoDuid to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceDhcpv6ClientNoDuid to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceDhcpv6ClientNoDuid struct { + obj *deviceDhcpv6ClientNoDuid +} + +type unMarshalDeviceDhcpv6ClientNoDuid interface { + // FromProto unmarshals DeviceDhcpv6ClientNoDuid from protobuf object *otg.DeviceDhcpv6ClientNoDuid + FromProto(msg *otg.DeviceDhcpv6ClientNoDuid) (DeviceDhcpv6ClientNoDuid, error) + // FromPbText unmarshals DeviceDhcpv6ClientNoDuid from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceDhcpv6ClientNoDuid from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceDhcpv6ClientNoDuid from JSON text + FromJson(value string) error +} + +func (obj *deviceDhcpv6ClientNoDuid) Marshal() marshalDeviceDhcpv6ClientNoDuid { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceDhcpv6ClientNoDuid{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceDhcpv6ClientNoDuid) Unmarshal() unMarshalDeviceDhcpv6ClientNoDuid { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceDhcpv6ClientNoDuid{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceDhcpv6ClientNoDuid) ToProto() (*otg.DeviceDhcpv6ClientNoDuid, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceDhcpv6ClientNoDuid) FromProto(msg *otg.DeviceDhcpv6ClientNoDuid) (DeviceDhcpv6ClientNoDuid, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceDhcpv6ClientNoDuid) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceDhcpv6ClientNoDuid) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceDhcpv6ClientNoDuid) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6ClientNoDuid) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceDhcpv6ClientNoDuid) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6ClientNoDuid) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceDhcpv6ClientNoDuid) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceDhcpv6ClientNoDuid) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceDhcpv6ClientNoDuid) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceDhcpv6ClientNoDuid) Clone() (DeviceDhcpv6ClientNoDuid, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceDhcpv6ClientNoDuid() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceDhcpv6ClientNoDuid is the container for DUID-LL and DUID-LLT. +type DeviceDhcpv6ClientNoDuid interface { + Validation + // msg marshals DeviceDhcpv6ClientNoDuid to protobuf object *otg.DeviceDhcpv6ClientNoDuid + // and doesn't set defaults + msg() *otg.DeviceDhcpv6ClientNoDuid + // setMsg unmarshals DeviceDhcpv6ClientNoDuid from protobuf object *otg.DeviceDhcpv6ClientNoDuid + // and doesn't set defaults + setMsg(*otg.DeviceDhcpv6ClientNoDuid) DeviceDhcpv6ClientNoDuid + // provides marshal interface + Marshal() marshalDeviceDhcpv6ClientNoDuid + // provides unmarshal interface + Unmarshal() unMarshalDeviceDhcpv6ClientNoDuid + // validate validates DeviceDhcpv6ClientNoDuid + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceDhcpv6ClientNoDuid, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() +} + +func (obj *deviceDhcpv6ClientNoDuid) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *deviceDhcpv6ClientNoDuid) setDefault() { + +} diff --git a/gosnappi/device_dhcpv6_client_options.go b/gosnappi/device_dhcpv6_client_options.go new file mode 100644 index 00000000..afd5f86e --- /dev/null +++ b/gosnappi/device_dhcpv6_client_options.go @@ -0,0 +1,475 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceDhcpv6ClientOptions ***** +type deviceDhcpv6ClientOptions struct { + validation + obj *otg.DeviceDhcpv6ClientOptions + marshaller marshalDeviceDhcpv6ClientOptions + unMarshaller unMarshalDeviceDhcpv6ClientOptions + serverIdentifierHolder Dhcpv6ClientOptionsServerIdentifier + vendorClassHolder Dhcpv6ClientOptionsVendorClass + vendorInfoHolder Dhcpv6ClientOptionsVendorInfo + fqdnHolder Dhcpv6ClientOptionsFqdn +} + +func NewDeviceDhcpv6ClientOptions() DeviceDhcpv6ClientOptions { + obj := deviceDhcpv6ClientOptions{obj: &otg.DeviceDhcpv6ClientOptions{}} + obj.setDefault() + return &obj +} + +func (obj *deviceDhcpv6ClientOptions) msg() *otg.DeviceDhcpv6ClientOptions { + return obj.obj +} + +func (obj *deviceDhcpv6ClientOptions) setMsg(msg *otg.DeviceDhcpv6ClientOptions) DeviceDhcpv6ClientOptions { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceDhcpv6ClientOptions struct { + obj *deviceDhcpv6ClientOptions +} + +type marshalDeviceDhcpv6ClientOptions interface { + // ToProto marshals DeviceDhcpv6ClientOptions to protobuf object *otg.DeviceDhcpv6ClientOptions + ToProto() (*otg.DeviceDhcpv6ClientOptions, error) + // ToPbText marshals DeviceDhcpv6ClientOptions to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceDhcpv6ClientOptions to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceDhcpv6ClientOptions to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceDhcpv6ClientOptions struct { + obj *deviceDhcpv6ClientOptions +} + +type unMarshalDeviceDhcpv6ClientOptions interface { + // FromProto unmarshals DeviceDhcpv6ClientOptions from protobuf object *otg.DeviceDhcpv6ClientOptions + FromProto(msg *otg.DeviceDhcpv6ClientOptions) (DeviceDhcpv6ClientOptions, error) + // FromPbText unmarshals DeviceDhcpv6ClientOptions from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceDhcpv6ClientOptions from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceDhcpv6ClientOptions from JSON text + FromJson(value string) error +} + +func (obj *deviceDhcpv6ClientOptions) Marshal() marshalDeviceDhcpv6ClientOptions { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceDhcpv6ClientOptions{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceDhcpv6ClientOptions) Unmarshal() unMarshalDeviceDhcpv6ClientOptions { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceDhcpv6ClientOptions{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceDhcpv6ClientOptions) ToProto() (*otg.DeviceDhcpv6ClientOptions, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceDhcpv6ClientOptions) FromProto(msg *otg.DeviceDhcpv6ClientOptions) (DeviceDhcpv6ClientOptions, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceDhcpv6ClientOptions) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceDhcpv6ClientOptions) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceDhcpv6ClientOptions) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6ClientOptions) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceDhcpv6ClientOptions) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6ClientOptions) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceDhcpv6ClientOptions) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceDhcpv6ClientOptions) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceDhcpv6ClientOptions) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceDhcpv6ClientOptions) Clone() (DeviceDhcpv6ClientOptions, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceDhcpv6ClientOptions() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceDhcpv6ClientOptions) setNil() { + obj.serverIdentifierHolder = nil + obj.vendorClassHolder = nil + obj.vendorInfoHolder = nil + obj.fqdnHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceDhcpv6ClientOptions is dHCP client options, these configured options are sent in Dhcp client messages. +type DeviceDhcpv6ClientOptions interface { + Validation + // msg marshals DeviceDhcpv6ClientOptions to protobuf object *otg.DeviceDhcpv6ClientOptions + // and doesn't set defaults + msg() *otg.DeviceDhcpv6ClientOptions + // setMsg unmarshals DeviceDhcpv6ClientOptions from protobuf object *otg.DeviceDhcpv6ClientOptions + // and doesn't set defaults + setMsg(*otg.DeviceDhcpv6ClientOptions) DeviceDhcpv6ClientOptions + // provides marshal interface + Marshal() marshalDeviceDhcpv6ClientOptions + // provides unmarshal interface + Unmarshal() unMarshalDeviceDhcpv6ClientOptions + // validate validates DeviceDhcpv6ClientOptions + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceDhcpv6ClientOptions, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ServerIdentifier returns Dhcpv6ClientOptionsServerIdentifier, set in DeviceDhcpv6ClientOptions. + // Dhcpv6ClientOptionsServerIdentifier is description is TBD + ServerIdentifier() Dhcpv6ClientOptionsServerIdentifier + // SetServerIdentifier assigns Dhcpv6ClientOptionsServerIdentifier provided by user to DeviceDhcpv6ClientOptions. + // Dhcpv6ClientOptionsServerIdentifier is description is TBD + SetServerIdentifier(value Dhcpv6ClientOptionsServerIdentifier) DeviceDhcpv6ClientOptions + // HasServerIdentifier checks if ServerIdentifier has been set in DeviceDhcpv6ClientOptions + HasServerIdentifier() bool + // VendorClass returns Dhcpv6ClientOptionsVendorClass, set in DeviceDhcpv6ClientOptions. + // Dhcpv6ClientOptionsVendorClass is this option is used by a client to identify the vendor that manufactured the hardware on which the client is running. The option code is 16. + VendorClass() Dhcpv6ClientOptionsVendorClass + // SetVendorClass assigns Dhcpv6ClientOptionsVendorClass provided by user to DeviceDhcpv6ClientOptions. + // Dhcpv6ClientOptionsVendorClass is this option is used by a client to identify the vendor that manufactured the hardware on which the client is running. The option code is 16. + SetVendorClass(value Dhcpv6ClientOptionsVendorClass) DeviceDhcpv6ClientOptions + // HasVendorClass checks if VendorClass has been set in DeviceDhcpv6ClientOptions + HasVendorClass() bool + // VendorInfo returns Dhcpv6ClientOptionsVendorInfo, set in DeviceDhcpv6ClientOptions. + // Dhcpv6ClientOptionsVendorInfo is this option is used by clients to exchange vendor-specific information. The option code is 17. + VendorInfo() Dhcpv6ClientOptionsVendorInfo + // SetVendorInfo assigns Dhcpv6ClientOptionsVendorInfo provided by user to DeviceDhcpv6ClientOptions. + // Dhcpv6ClientOptionsVendorInfo is this option is used by clients to exchange vendor-specific information. The option code is 17. + SetVendorInfo(value Dhcpv6ClientOptionsVendorInfo) DeviceDhcpv6ClientOptions + // HasVendorInfo checks if VendorInfo has been set in DeviceDhcpv6ClientOptions + HasVendorInfo() bool + // Fqdn returns Dhcpv6ClientOptionsFqdn, set in DeviceDhcpv6ClientOptions. + // Dhcpv6ClientOptionsFqdn is dHCPv6 server needs to know the FQDN of the client for the addresses for the client's IA_NA bindings in order to update the IPv6-address-to-FQDN mapping. This option allows the client to convey its FQDN to the server. The Client FQDN option also contains Flags that DHCPv6 clients and servers use to negotiate who does which updates. The option code is 39. + Fqdn() Dhcpv6ClientOptionsFqdn + // SetFqdn assigns Dhcpv6ClientOptionsFqdn provided by user to DeviceDhcpv6ClientOptions. + // Dhcpv6ClientOptionsFqdn is dHCPv6 server needs to know the FQDN of the client for the addresses for the client's IA_NA bindings in order to update the IPv6-address-to-FQDN mapping. This option allows the client to convey its FQDN to the server. The Client FQDN option also contains Flags that DHCPv6 clients and servers use to negotiate who does which updates. The option code is 39. + SetFqdn(value Dhcpv6ClientOptionsFqdn) DeviceDhcpv6ClientOptions + // HasFqdn checks if Fqdn has been set in DeviceDhcpv6ClientOptions + HasFqdn() bool + setNil() +} + +// A client uses multicast to reach all servers or an individual server. An individual server is indicated by +// specifying that server's DUID in a Server Identifier option in the client's message (all servers will receive +// this message but only the indicated server will respond). All servers are indicated by not supplying this option. +// ServerIdentifier returns a Dhcpv6ClientOptionsServerIdentifier +func (obj *deviceDhcpv6ClientOptions) ServerIdentifier() Dhcpv6ClientOptionsServerIdentifier { + if obj.obj.ServerIdentifier == nil { + obj.obj.ServerIdentifier = NewDhcpv6ClientOptionsServerIdentifier().msg() + } + if obj.serverIdentifierHolder == nil { + obj.serverIdentifierHolder = &dhcpv6ClientOptionsServerIdentifier{obj: obj.obj.ServerIdentifier} + } + return obj.serverIdentifierHolder +} + +// A client uses multicast to reach all servers or an individual server. An individual server is indicated by +// specifying that server's DUID in a Server Identifier option in the client's message (all servers will receive +// this message but only the indicated server will respond). All servers are indicated by not supplying this option. +// ServerIdentifier returns a Dhcpv6ClientOptionsServerIdentifier +func (obj *deviceDhcpv6ClientOptions) HasServerIdentifier() bool { + return obj.obj.ServerIdentifier != nil +} + +// A client uses multicast to reach all servers or an individual server. An individual server is indicated by +// specifying that server's DUID in a Server Identifier option in the client's message (all servers will receive +// this message but only the indicated server will respond). All servers are indicated by not supplying this option. +// SetServerIdentifier sets the Dhcpv6ClientOptionsServerIdentifier value in the DeviceDhcpv6ClientOptions object +func (obj *deviceDhcpv6ClientOptions) SetServerIdentifier(value Dhcpv6ClientOptionsServerIdentifier) DeviceDhcpv6ClientOptions { + + obj.serverIdentifierHolder = nil + obj.obj.ServerIdentifier = value.msg() + + return obj +} + +// The vendor class option is used by a client to identify the vendor that manufactured the hardware on which +// the client is running. The information contained in the data area of this option is contained in one or more +// opaque fields that identify details of the hardware configuration. +// VendorClass returns a Dhcpv6ClientOptionsVendorClass +func (obj *deviceDhcpv6ClientOptions) VendorClass() Dhcpv6ClientOptionsVendorClass { + if obj.obj.VendorClass == nil { + obj.obj.VendorClass = NewDhcpv6ClientOptionsVendorClass().msg() + } + if obj.vendorClassHolder == nil { + obj.vendorClassHolder = &dhcpv6ClientOptionsVendorClass{obj: obj.obj.VendorClass} + } + return obj.vendorClassHolder +} + +// The vendor class option is used by a client to identify the vendor that manufactured the hardware on which +// the client is running. The information contained in the data area of this option is contained in one or more +// opaque fields that identify details of the hardware configuration. +// VendorClass returns a Dhcpv6ClientOptionsVendorClass +func (obj *deviceDhcpv6ClientOptions) HasVendorClass() bool { + return obj.obj.VendorClass != nil +} + +// The vendor class option is used by a client to identify the vendor that manufactured the hardware on which +// the client is running. The information contained in the data area of this option is contained in one or more +// opaque fields that identify details of the hardware configuration. +// SetVendorClass sets the Dhcpv6ClientOptionsVendorClass value in the DeviceDhcpv6ClientOptions object +func (obj *deviceDhcpv6ClientOptions) SetVendorClass(value Dhcpv6ClientOptionsVendorClass) DeviceDhcpv6ClientOptions { + + obj.vendorClassHolder = nil + obj.obj.VendorClass = value.msg() + + return obj +} + +// This option is used by clients to exchange vendor-specific information with servers. +// VendorInfo returns a Dhcpv6ClientOptionsVendorInfo +func (obj *deviceDhcpv6ClientOptions) VendorInfo() Dhcpv6ClientOptionsVendorInfo { + if obj.obj.VendorInfo == nil { + obj.obj.VendorInfo = NewDhcpv6ClientOptionsVendorInfo().msg() + } + if obj.vendorInfoHolder == nil { + obj.vendorInfoHolder = &dhcpv6ClientOptionsVendorInfo{obj: obj.obj.VendorInfo} + } + return obj.vendorInfoHolder +} + +// This option is used by clients to exchange vendor-specific information with servers. +// VendorInfo returns a Dhcpv6ClientOptionsVendorInfo +func (obj *deviceDhcpv6ClientOptions) HasVendorInfo() bool { + return obj.obj.VendorInfo != nil +} + +// This option is used by clients to exchange vendor-specific information with servers. +// SetVendorInfo sets the Dhcpv6ClientOptionsVendorInfo value in the DeviceDhcpv6ClientOptions object +func (obj *deviceDhcpv6ClientOptions) SetVendorInfo(value Dhcpv6ClientOptionsVendorInfo) DeviceDhcpv6ClientOptions { + + obj.vendorInfoHolder = nil + obj.obj.VendorInfo = value.msg() + + return obj +} + +// DHCPv6 server needs to know the FQDN of the client for the addresses for the client's IA_NA bindings in order to +// update the IPv6-address-to-FQDN mapping. This option allows the client to convey its FQDN to the server. The Client +// FQDN option also contains Flags that DHCPv6 clients and servers use to negotiate who does which update. +// Fqdn returns a Dhcpv6ClientOptionsFqdn +func (obj *deviceDhcpv6ClientOptions) Fqdn() Dhcpv6ClientOptionsFqdn { + if obj.obj.Fqdn == nil { + obj.obj.Fqdn = NewDhcpv6ClientOptionsFqdn().msg() + } + if obj.fqdnHolder == nil { + obj.fqdnHolder = &dhcpv6ClientOptionsFqdn{obj: obj.obj.Fqdn} + } + return obj.fqdnHolder +} + +// DHCPv6 server needs to know the FQDN of the client for the addresses for the client's IA_NA bindings in order to +// update the IPv6-address-to-FQDN mapping. This option allows the client to convey its FQDN to the server. The Client +// FQDN option also contains Flags that DHCPv6 clients and servers use to negotiate who does which update. +// Fqdn returns a Dhcpv6ClientOptionsFqdn +func (obj *deviceDhcpv6ClientOptions) HasFqdn() bool { + return obj.obj.Fqdn != nil +} + +// DHCPv6 server needs to know the FQDN of the client for the addresses for the client's IA_NA bindings in order to +// update the IPv6-address-to-FQDN mapping. This option allows the client to convey its FQDN to the server. The Client +// FQDN option also contains Flags that DHCPv6 clients and servers use to negotiate who does which update. +// SetFqdn sets the Dhcpv6ClientOptionsFqdn value in the DeviceDhcpv6ClientOptions object +func (obj *deviceDhcpv6ClientOptions) SetFqdn(value Dhcpv6ClientOptionsFqdn) DeviceDhcpv6ClientOptions { + + obj.fqdnHolder = nil + obj.obj.Fqdn = value.msg() + + return obj +} + +func (obj *deviceDhcpv6ClientOptions) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.ServerIdentifier != nil { + + obj.ServerIdentifier().validateObj(vObj, set_default) + } + + if obj.obj.VendorClass != nil { + + obj.VendorClass().validateObj(vObj, set_default) + } + + if obj.obj.VendorInfo != nil { + + obj.VendorInfo().validateObj(vObj, set_default) + } + + if obj.obj.Fqdn != nil { + + obj.Fqdn().validateObj(vObj, set_default) + } + +} + +func (obj *deviceDhcpv6ClientOptions) setDefault() { + +} diff --git a/gosnappi/device_dhcpv6_client_options_request.go b/gosnappi/device_dhcpv6_client_options_request.go new file mode 100644 index 00000000..33792366 --- /dev/null +++ b/gosnappi/device_dhcpv6_client_options_request.go @@ -0,0 +1,430 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceDhcpv6ClientOptionsRequest ***** +type deviceDhcpv6ClientOptionsRequest struct { + validation + obj *otg.DeviceDhcpv6ClientOptionsRequest + marshaller marshalDeviceDhcpv6ClientOptionsRequest + unMarshaller unMarshalDeviceDhcpv6ClientOptionsRequest + requestHolder DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter + associatedDhcpMessagesHolder Dhcpv6ClientOptionsIncludedMessages +} + +func NewDeviceDhcpv6ClientOptionsRequest() DeviceDhcpv6ClientOptionsRequest { + obj := deviceDhcpv6ClientOptionsRequest{obj: &otg.DeviceDhcpv6ClientOptionsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *deviceDhcpv6ClientOptionsRequest) msg() *otg.DeviceDhcpv6ClientOptionsRequest { + return obj.obj +} + +func (obj *deviceDhcpv6ClientOptionsRequest) setMsg(msg *otg.DeviceDhcpv6ClientOptionsRequest) DeviceDhcpv6ClientOptionsRequest { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceDhcpv6ClientOptionsRequest struct { + obj *deviceDhcpv6ClientOptionsRequest +} + +type marshalDeviceDhcpv6ClientOptionsRequest interface { + // ToProto marshals DeviceDhcpv6ClientOptionsRequest to protobuf object *otg.DeviceDhcpv6ClientOptionsRequest + ToProto() (*otg.DeviceDhcpv6ClientOptionsRequest, error) + // ToPbText marshals DeviceDhcpv6ClientOptionsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceDhcpv6ClientOptionsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceDhcpv6ClientOptionsRequest to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceDhcpv6ClientOptionsRequest struct { + obj *deviceDhcpv6ClientOptionsRequest +} + +type unMarshalDeviceDhcpv6ClientOptionsRequest interface { + // FromProto unmarshals DeviceDhcpv6ClientOptionsRequest from protobuf object *otg.DeviceDhcpv6ClientOptionsRequest + FromProto(msg *otg.DeviceDhcpv6ClientOptionsRequest) (DeviceDhcpv6ClientOptionsRequest, error) + // FromPbText unmarshals DeviceDhcpv6ClientOptionsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceDhcpv6ClientOptionsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceDhcpv6ClientOptionsRequest from JSON text + FromJson(value string) error +} + +func (obj *deviceDhcpv6ClientOptionsRequest) Marshal() marshalDeviceDhcpv6ClientOptionsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceDhcpv6ClientOptionsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceDhcpv6ClientOptionsRequest) Unmarshal() unMarshalDeviceDhcpv6ClientOptionsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceDhcpv6ClientOptionsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceDhcpv6ClientOptionsRequest) ToProto() (*otg.DeviceDhcpv6ClientOptionsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceDhcpv6ClientOptionsRequest) FromProto(msg *otg.DeviceDhcpv6ClientOptionsRequest) (DeviceDhcpv6ClientOptionsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceDhcpv6ClientOptionsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceDhcpv6ClientOptionsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceDhcpv6ClientOptionsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6ClientOptionsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceDhcpv6ClientOptionsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceDhcpv6ClientOptionsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceDhcpv6ClientOptionsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceDhcpv6ClientOptionsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceDhcpv6ClientOptionsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceDhcpv6ClientOptionsRequest) Clone() (DeviceDhcpv6ClientOptionsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceDhcpv6ClientOptionsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceDhcpv6ClientOptionsRequest) setNil() { + obj.requestHolder = nil + obj.associatedDhcpMessagesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceDhcpv6ClientOptionsRequest is dHCP client options, these configured options are sent in Dhcp client messages. +type DeviceDhcpv6ClientOptionsRequest interface { + Validation + // msg marshals DeviceDhcpv6ClientOptionsRequest to protobuf object *otg.DeviceDhcpv6ClientOptionsRequest + // and doesn't set defaults + msg() *otg.DeviceDhcpv6ClientOptionsRequest + // setMsg unmarshals DeviceDhcpv6ClientOptionsRequest from protobuf object *otg.DeviceDhcpv6ClientOptionsRequest + // and doesn't set defaults + setMsg(*otg.DeviceDhcpv6ClientOptionsRequest) DeviceDhcpv6ClientOptionsRequest + // provides marshal interface + Marshal() marshalDeviceDhcpv6ClientOptionsRequest + // provides unmarshal interface + Unmarshal() unMarshalDeviceDhcpv6ClientOptionsRequest + // validate validates DeviceDhcpv6ClientOptionsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceDhcpv6ClientOptionsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Request returns DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIterIter, set in DeviceDhcpv6ClientOptionsRequest + Request() DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter + // AssociatedDhcpMessages returns Dhcpv6ClientOptionsIncludedMessages, set in DeviceDhcpv6ClientOptionsRequest. + // Dhcpv6ClientOptionsIncludedMessages is the dhcpv6 client messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 client messages, else based on the selection in particular Dhcpv6 client messages the option will be included. + AssociatedDhcpMessages() Dhcpv6ClientOptionsIncludedMessages + // SetAssociatedDhcpMessages assigns Dhcpv6ClientOptionsIncludedMessages provided by user to DeviceDhcpv6ClientOptionsRequest. + // Dhcpv6ClientOptionsIncludedMessages is the dhcpv6 client messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 client messages, else based on the selection in particular Dhcpv6 client messages the option will be included. + SetAssociatedDhcpMessages(value Dhcpv6ClientOptionsIncludedMessages) DeviceDhcpv6ClientOptionsRequest + setNil() +} + +// List of options requested by a client from a server. +// Request returns a []Dhcpv6ClientOptionsOptionsRequest +func (obj *deviceDhcpv6ClientOptionsRequest) Request() DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter { + if len(obj.obj.Request) == 0 { + obj.obj.Request = []*otg.Dhcpv6ClientOptionsOptionsRequest{} + } + if obj.requestHolder == nil { + obj.requestHolder = newDeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter(&obj.obj.Request).setMsg(obj) + } + return obj.requestHolder +} + +type deviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter struct { + obj *deviceDhcpv6ClientOptionsRequest + dhcpv6ClientOptionsOptionsRequestSlice []Dhcpv6ClientOptionsOptionsRequest + fieldPtr *[]*otg.Dhcpv6ClientOptionsOptionsRequest +} + +func newDeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter(ptr *[]*otg.Dhcpv6ClientOptionsOptionsRequest) DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter { + return &deviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter{fieldPtr: ptr} +} + +type DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter interface { + setMsg(*deviceDhcpv6ClientOptionsRequest) DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter + Items() []Dhcpv6ClientOptionsOptionsRequest + Add() Dhcpv6ClientOptionsOptionsRequest + Append(items ...Dhcpv6ClientOptionsOptionsRequest) DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter + Set(index int, newObj Dhcpv6ClientOptionsOptionsRequest) DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter + Clear() DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter + clearHolderSlice() DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter + appendHolderSlice(item Dhcpv6ClientOptionsOptionsRequest) DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter +} + +func (obj *deviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter) setMsg(msg *deviceDhcpv6ClientOptionsRequest) DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv6ClientOptionsOptionsRequest{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter) Items() []Dhcpv6ClientOptionsOptionsRequest { + return obj.dhcpv6ClientOptionsOptionsRequestSlice +} + +func (obj *deviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter) Add() Dhcpv6ClientOptionsOptionsRequest { + newObj := &otg.Dhcpv6ClientOptionsOptionsRequest{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv6ClientOptionsOptionsRequest{obj: newObj} + newLibObj.setDefault() + obj.dhcpv6ClientOptionsOptionsRequestSlice = append(obj.dhcpv6ClientOptionsOptionsRequestSlice, newLibObj) + return newLibObj +} + +func (obj *deviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter) Append(items ...Dhcpv6ClientOptionsOptionsRequest) DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv6ClientOptionsOptionsRequestSlice = append(obj.dhcpv6ClientOptionsOptionsRequestSlice, item) + } + return obj +} + +func (obj *deviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter) Set(index int, newObj Dhcpv6ClientOptionsOptionsRequest) DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv6ClientOptionsOptionsRequestSlice[index] = newObj + return obj +} +func (obj *deviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter) Clear() DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv6ClientOptionsOptionsRequest{} + obj.dhcpv6ClientOptionsOptionsRequestSlice = []Dhcpv6ClientOptionsOptionsRequest{} + } + return obj +} +func (obj *deviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter) clearHolderSlice() DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter { + if len(obj.dhcpv6ClientOptionsOptionsRequestSlice) > 0 { + obj.dhcpv6ClientOptionsOptionsRequestSlice = []Dhcpv6ClientOptionsOptionsRequest{} + } + return obj +} +func (obj *deviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter) appendHolderSlice(item Dhcpv6ClientOptionsOptionsRequest) DeviceDhcpv6ClientOptionsRequestDhcpv6ClientOptionsOptionsRequestIter { + obj.dhcpv6ClientOptionsOptionsRequestSlice = append(obj.dhcpv6ClientOptionsOptionsRequestSlice, item) + return obj +} + +// The list of dhcpv6 client messages where this option is included. +// AssociatedDhcpMessages returns a Dhcpv6ClientOptionsIncludedMessages +func (obj *deviceDhcpv6ClientOptionsRequest) AssociatedDhcpMessages() Dhcpv6ClientOptionsIncludedMessages { + if obj.obj.AssociatedDhcpMessages == nil { + obj.obj.AssociatedDhcpMessages = NewDhcpv6ClientOptionsIncludedMessages().msg() + } + if obj.associatedDhcpMessagesHolder == nil { + obj.associatedDhcpMessagesHolder = &dhcpv6ClientOptionsIncludedMessages{obj: obj.obj.AssociatedDhcpMessages} + } + return obj.associatedDhcpMessagesHolder +} + +// The list of dhcpv6 client messages where this option is included. +// SetAssociatedDhcpMessages sets the Dhcpv6ClientOptionsIncludedMessages value in the DeviceDhcpv6ClientOptionsRequest object +func (obj *deviceDhcpv6ClientOptionsRequest) SetAssociatedDhcpMessages(value Dhcpv6ClientOptionsIncludedMessages) DeviceDhcpv6ClientOptionsRequest { + + obj.associatedDhcpMessagesHolder = nil + obj.obj.AssociatedDhcpMessages = value.msg() + + return obj +} + +func (obj *deviceDhcpv6ClientOptionsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Request) != 0 { + + if set_default { + obj.Request().clearHolderSlice() + for _, item := range obj.obj.Request { + obj.Request().appendHolderSlice(&dhcpv6ClientOptionsOptionsRequest{obj: item}) + } + } + for _, item := range obj.Request().Items() { + item.validateObj(vObj, set_default) + } + + } + + // AssociatedDhcpMessages is required + if obj.obj.AssociatedDhcpMessages == nil { + vObj.validationErrors = append(vObj.validationErrors, "AssociatedDhcpMessages is required field on interface DeviceDhcpv6ClientOptionsRequest") + } + + if obj.obj.AssociatedDhcpMessages != nil { + + obj.AssociatedDhcpMessages().validateObj(vObj, set_default) + } + +} + +func (obj *deviceDhcpv6ClientOptionsRequest) setDefault() { + +} diff --git a/gosnappi/device_ethernet.go b/gosnappi/device_ethernet.go new file mode 100644 index 00000000..e85fa177 --- /dev/null +++ b/gosnappi/device_ethernet.go @@ -0,0 +1,957 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceEthernet ***** +type deviceEthernet struct { + validation + obj *otg.DeviceEthernet + marshaller marshalDeviceEthernet + unMarshaller unMarshalDeviceEthernet + connectionHolder EthernetConnection + ipv4AddressesHolder DeviceEthernetDeviceIpv4Iter + ipv6AddressesHolder DeviceEthernetDeviceIpv6Iter + vlansHolder DeviceEthernetDeviceVlanIter + dhcpv4InterfacesHolder DeviceEthernetDeviceDhcpv4ClientIter + dhcpv6InterfacesHolder DeviceEthernetDeviceDhcpv6ClientIter +} + +func NewDeviceEthernet() DeviceEthernet { + obj := deviceEthernet{obj: &otg.DeviceEthernet{}} + obj.setDefault() + return &obj +} + +func (obj *deviceEthernet) msg() *otg.DeviceEthernet { + return obj.obj +} + +func (obj *deviceEthernet) setMsg(msg *otg.DeviceEthernet) DeviceEthernet { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceEthernet struct { + obj *deviceEthernet +} + +type marshalDeviceEthernet interface { + // ToProto marshals DeviceEthernet to protobuf object *otg.DeviceEthernet + ToProto() (*otg.DeviceEthernet, error) + // ToPbText marshals DeviceEthernet to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceEthernet to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceEthernet to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceEthernet struct { + obj *deviceEthernet +} + +type unMarshalDeviceEthernet interface { + // FromProto unmarshals DeviceEthernet from protobuf object *otg.DeviceEthernet + FromProto(msg *otg.DeviceEthernet) (DeviceEthernet, error) + // FromPbText unmarshals DeviceEthernet from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceEthernet from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceEthernet from JSON text + FromJson(value string) error +} + +func (obj *deviceEthernet) Marshal() marshalDeviceEthernet { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceEthernet{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceEthernet) Unmarshal() unMarshalDeviceEthernet { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceEthernet{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceEthernet) ToProto() (*otg.DeviceEthernet, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceEthernet) FromProto(msg *otg.DeviceEthernet) (DeviceEthernet, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceEthernet) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceEthernet) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceEthernet) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceEthernet) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceEthernet) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceEthernet) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceEthernet) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceEthernet) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceEthernet) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceEthernet) Clone() (DeviceEthernet, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceEthernet() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceEthernet) setNil() { + obj.connectionHolder = nil + obj.ipv4AddressesHolder = nil + obj.ipv6AddressesHolder = nil + obj.vlansHolder = nil + obj.dhcpv4InterfacesHolder = nil + obj.dhcpv6InterfacesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceEthernet is an Ethernet interface with IPv4 and IPv6 addresses. The implementation should ensure that the 'mac' field is explicitly configured by the user for all types of interfaces as denoted by 'connection' attribute except 'simulated_link' where MAC is not mandatory. +type DeviceEthernet interface { + Validation + // msg marshals DeviceEthernet to protobuf object *otg.DeviceEthernet + // and doesn't set defaults + msg() *otg.DeviceEthernet + // setMsg unmarshals DeviceEthernet from protobuf object *otg.DeviceEthernet + // and doesn't set defaults + setMsg(*otg.DeviceEthernet) DeviceEthernet + // provides marshal interface + Marshal() marshalDeviceEthernet + // provides unmarshal interface + Unmarshal() unMarshalDeviceEthernet + // validate validates DeviceEthernet + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceEthernet, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Connection returns EthernetConnection, set in DeviceEthernet. + // EthernetConnection is ethernet interface connection to a port, LAG, VXLAN tunnel or a Simulated Internal Link used to create simulated topologies behind an emulated router. + Connection() EthernetConnection + // SetConnection assigns EthernetConnection provided by user to DeviceEthernet. + // EthernetConnection is ethernet interface connection to a port, LAG, VXLAN tunnel or a Simulated Internal Link used to create simulated topologies behind an emulated router. + SetConnection(value EthernetConnection) DeviceEthernet + // HasConnection checks if Connection has been set in DeviceEthernet + HasConnection() bool + // Ipv4Addresses returns DeviceEthernetDeviceIpv4IterIter, set in DeviceEthernet + Ipv4Addresses() DeviceEthernetDeviceIpv4Iter + // Ipv6Addresses returns DeviceEthernetDeviceIpv6IterIter, set in DeviceEthernet + Ipv6Addresses() DeviceEthernetDeviceIpv6Iter + // Mac returns string, set in DeviceEthernet. + Mac() string + // SetMac assigns string provided by user to DeviceEthernet + SetMac(value string) DeviceEthernet + // HasMac checks if Mac has been set in DeviceEthernet + HasMac() bool + // Mtu returns uint32, set in DeviceEthernet. + Mtu() uint32 + // SetMtu assigns uint32 provided by user to DeviceEthernet + SetMtu(value uint32) DeviceEthernet + // HasMtu checks if Mtu has been set in DeviceEthernet + HasMtu() bool + // Vlans returns DeviceEthernetDeviceVlanIterIter, set in DeviceEthernet + Vlans() DeviceEthernetDeviceVlanIter + // Name returns string, set in DeviceEthernet. + Name() string + // SetName assigns string provided by user to DeviceEthernet + SetName(value string) DeviceEthernet + // Dhcpv4Interfaces returns DeviceEthernetDeviceDhcpv4ClientIterIter, set in DeviceEthernet + Dhcpv4Interfaces() DeviceEthernetDeviceDhcpv4ClientIter + // Dhcpv6Interfaces returns DeviceEthernetDeviceDhcpv6ClientIterIter, set in DeviceEthernet + Dhcpv6Interfaces() DeviceEthernetDeviceDhcpv6ClientIter + setNil() +} + +// Device connection to physical, LAG or another device. +// Connection returns a EthernetConnection +func (obj *deviceEthernet) Connection() EthernetConnection { + if obj.obj.Connection == nil { + obj.obj.Connection = NewEthernetConnection().msg() + } + if obj.connectionHolder == nil { + obj.connectionHolder = ðernetConnection{obj: obj.obj.Connection} + } + return obj.connectionHolder +} + +// Device connection to physical, LAG or another device. +// Connection returns a EthernetConnection +func (obj *deviceEthernet) HasConnection() bool { + return obj.obj.Connection != nil +} + +// Device connection to physical, LAG or another device. +// SetConnection sets the EthernetConnection value in the DeviceEthernet object +func (obj *deviceEthernet) SetConnection(value EthernetConnection) DeviceEthernet { + + obj.connectionHolder = nil + obj.obj.Connection = value.msg() + + return obj +} + +// List of IPv4 addresses and their gateways. +// Ipv4Addresses returns a []DeviceIpv4 +func (obj *deviceEthernet) Ipv4Addresses() DeviceEthernetDeviceIpv4Iter { + if len(obj.obj.Ipv4Addresses) == 0 { + obj.obj.Ipv4Addresses = []*otg.DeviceIpv4{} + } + if obj.ipv4AddressesHolder == nil { + obj.ipv4AddressesHolder = newDeviceEthernetDeviceIpv4Iter(&obj.obj.Ipv4Addresses).setMsg(obj) + } + return obj.ipv4AddressesHolder +} + +type deviceEthernetDeviceIpv4Iter struct { + obj *deviceEthernet + deviceIpv4Slice []DeviceIpv4 + fieldPtr *[]*otg.DeviceIpv4 +} + +func newDeviceEthernetDeviceIpv4Iter(ptr *[]*otg.DeviceIpv4) DeviceEthernetDeviceIpv4Iter { + return &deviceEthernetDeviceIpv4Iter{fieldPtr: ptr} +} + +type DeviceEthernetDeviceIpv4Iter interface { + setMsg(*deviceEthernet) DeviceEthernetDeviceIpv4Iter + Items() []DeviceIpv4 + Add() DeviceIpv4 + Append(items ...DeviceIpv4) DeviceEthernetDeviceIpv4Iter + Set(index int, newObj DeviceIpv4) DeviceEthernetDeviceIpv4Iter + Clear() DeviceEthernetDeviceIpv4Iter + clearHolderSlice() DeviceEthernetDeviceIpv4Iter + appendHolderSlice(item DeviceIpv4) DeviceEthernetDeviceIpv4Iter +} + +func (obj *deviceEthernetDeviceIpv4Iter) setMsg(msg *deviceEthernet) DeviceEthernetDeviceIpv4Iter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&deviceIpv4{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceEthernetDeviceIpv4Iter) Items() []DeviceIpv4 { + return obj.deviceIpv4Slice +} + +func (obj *deviceEthernetDeviceIpv4Iter) Add() DeviceIpv4 { + newObj := &otg.DeviceIpv4{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &deviceIpv4{obj: newObj} + newLibObj.setDefault() + obj.deviceIpv4Slice = append(obj.deviceIpv4Slice, newLibObj) + return newLibObj +} + +func (obj *deviceEthernetDeviceIpv4Iter) Append(items ...DeviceIpv4) DeviceEthernetDeviceIpv4Iter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.deviceIpv4Slice = append(obj.deviceIpv4Slice, item) + } + return obj +} + +func (obj *deviceEthernetDeviceIpv4Iter) Set(index int, newObj DeviceIpv4) DeviceEthernetDeviceIpv4Iter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.deviceIpv4Slice[index] = newObj + return obj +} +func (obj *deviceEthernetDeviceIpv4Iter) Clear() DeviceEthernetDeviceIpv4Iter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.DeviceIpv4{} + obj.deviceIpv4Slice = []DeviceIpv4{} + } + return obj +} +func (obj *deviceEthernetDeviceIpv4Iter) clearHolderSlice() DeviceEthernetDeviceIpv4Iter { + if len(obj.deviceIpv4Slice) > 0 { + obj.deviceIpv4Slice = []DeviceIpv4{} + } + return obj +} +func (obj *deviceEthernetDeviceIpv4Iter) appendHolderSlice(item DeviceIpv4) DeviceEthernetDeviceIpv4Iter { + obj.deviceIpv4Slice = append(obj.deviceIpv4Slice, item) + return obj +} + +// List of global IPv6 addresses and their gateways. +// The Link Local IPv6 address will be automatically generated. +// Ipv6Addresses returns a []DeviceIpv6 +func (obj *deviceEthernet) Ipv6Addresses() DeviceEthernetDeviceIpv6Iter { + if len(obj.obj.Ipv6Addresses) == 0 { + obj.obj.Ipv6Addresses = []*otg.DeviceIpv6{} + } + if obj.ipv6AddressesHolder == nil { + obj.ipv6AddressesHolder = newDeviceEthernetDeviceIpv6Iter(&obj.obj.Ipv6Addresses).setMsg(obj) + } + return obj.ipv6AddressesHolder +} + +type deviceEthernetDeviceIpv6Iter struct { + obj *deviceEthernet + deviceIpv6Slice []DeviceIpv6 + fieldPtr *[]*otg.DeviceIpv6 +} + +func newDeviceEthernetDeviceIpv6Iter(ptr *[]*otg.DeviceIpv6) DeviceEthernetDeviceIpv6Iter { + return &deviceEthernetDeviceIpv6Iter{fieldPtr: ptr} +} + +type DeviceEthernetDeviceIpv6Iter interface { + setMsg(*deviceEthernet) DeviceEthernetDeviceIpv6Iter + Items() []DeviceIpv6 + Add() DeviceIpv6 + Append(items ...DeviceIpv6) DeviceEthernetDeviceIpv6Iter + Set(index int, newObj DeviceIpv6) DeviceEthernetDeviceIpv6Iter + Clear() DeviceEthernetDeviceIpv6Iter + clearHolderSlice() DeviceEthernetDeviceIpv6Iter + appendHolderSlice(item DeviceIpv6) DeviceEthernetDeviceIpv6Iter +} + +func (obj *deviceEthernetDeviceIpv6Iter) setMsg(msg *deviceEthernet) DeviceEthernetDeviceIpv6Iter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&deviceIpv6{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceEthernetDeviceIpv6Iter) Items() []DeviceIpv6 { + return obj.deviceIpv6Slice +} + +func (obj *deviceEthernetDeviceIpv6Iter) Add() DeviceIpv6 { + newObj := &otg.DeviceIpv6{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &deviceIpv6{obj: newObj} + newLibObj.setDefault() + obj.deviceIpv6Slice = append(obj.deviceIpv6Slice, newLibObj) + return newLibObj +} + +func (obj *deviceEthernetDeviceIpv6Iter) Append(items ...DeviceIpv6) DeviceEthernetDeviceIpv6Iter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.deviceIpv6Slice = append(obj.deviceIpv6Slice, item) + } + return obj +} + +func (obj *deviceEthernetDeviceIpv6Iter) Set(index int, newObj DeviceIpv6) DeviceEthernetDeviceIpv6Iter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.deviceIpv6Slice[index] = newObj + return obj +} +func (obj *deviceEthernetDeviceIpv6Iter) Clear() DeviceEthernetDeviceIpv6Iter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.DeviceIpv6{} + obj.deviceIpv6Slice = []DeviceIpv6{} + } + return obj +} +func (obj *deviceEthernetDeviceIpv6Iter) clearHolderSlice() DeviceEthernetDeviceIpv6Iter { + if len(obj.deviceIpv6Slice) > 0 { + obj.deviceIpv6Slice = []DeviceIpv6{} + } + return obj +} +func (obj *deviceEthernetDeviceIpv6Iter) appendHolderSlice(item DeviceIpv6) DeviceEthernetDeviceIpv6Iter { + obj.deviceIpv6Slice = append(obj.deviceIpv6Slice, item) + return obj +} + +// Media Access Control address.The implementation should ensure that the 'mac' field is explicitly configured by the user for all types of interfaces as denoted by 'connection' attribute except 'simulated_link' where 'mac' is not mandatory. +// Mac returns a string +func (obj *deviceEthernet) Mac() string { + + return *obj.obj.Mac + +} + +// Media Access Control address.The implementation should ensure that the 'mac' field is explicitly configured by the user for all types of interfaces as denoted by 'connection' attribute except 'simulated_link' where 'mac' is not mandatory. +// Mac returns a string +func (obj *deviceEthernet) HasMac() bool { + return obj.obj.Mac != nil +} + +// Media Access Control address.The implementation should ensure that the 'mac' field is explicitly configured by the user for all types of interfaces as denoted by 'connection' attribute except 'simulated_link' where 'mac' is not mandatory. +// SetMac sets the string value in the DeviceEthernet object +func (obj *deviceEthernet) SetMac(value string) DeviceEthernet { + + obj.obj.Mac = &value + return obj +} + +// Maximum Transmission Unit. +// Mtu returns a uint32 +func (obj *deviceEthernet) Mtu() uint32 { + + return *obj.obj.Mtu + +} + +// Maximum Transmission Unit. +// Mtu returns a uint32 +func (obj *deviceEthernet) HasMtu() bool { + return obj.obj.Mtu != nil +} + +// Maximum Transmission Unit. +// SetMtu sets the uint32 value in the DeviceEthernet object +func (obj *deviceEthernet) SetMtu(value uint32) DeviceEthernet { + + obj.obj.Mtu = &value + return obj +} + +// List of VLANs +// Vlans returns a []DeviceVlan +func (obj *deviceEthernet) Vlans() DeviceEthernetDeviceVlanIter { + if len(obj.obj.Vlans) == 0 { + obj.obj.Vlans = []*otg.DeviceVlan{} + } + if obj.vlansHolder == nil { + obj.vlansHolder = newDeviceEthernetDeviceVlanIter(&obj.obj.Vlans).setMsg(obj) + } + return obj.vlansHolder +} + +type deviceEthernetDeviceVlanIter struct { + obj *deviceEthernet + deviceVlanSlice []DeviceVlan + fieldPtr *[]*otg.DeviceVlan +} + +func newDeviceEthernetDeviceVlanIter(ptr *[]*otg.DeviceVlan) DeviceEthernetDeviceVlanIter { + return &deviceEthernetDeviceVlanIter{fieldPtr: ptr} +} + +type DeviceEthernetDeviceVlanIter interface { + setMsg(*deviceEthernet) DeviceEthernetDeviceVlanIter + Items() []DeviceVlan + Add() DeviceVlan + Append(items ...DeviceVlan) DeviceEthernetDeviceVlanIter + Set(index int, newObj DeviceVlan) DeviceEthernetDeviceVlanIter + Clear() DeviceEthernetDeviceVlanIter + clearHolderSlice() DeviceEthernetDeviceVlanIter + appendHolderSlice(item DeviceVlan) DeviceEthernetDeviceVlanIter +} + +func (obj *deviceEthernetDeviceVlanIter) setMsg(msg *deviceEthernet) DeviceEthernetDeviceVlanIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&deviceVlan{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceEthernetDeviceVlanIter) Items() []DeviceVlan { + return obj.deviceVlanSlice +} + +func (obj *deviceEthernetDeviceVlanIter) Add() DeviceVlan { + newObj := &otg.DeviceVlan{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &deviceVlan{obj: newObj} + newLibObj.setDefault() + obj.deviceVlanSlice = append(obj.deviceVlanSlice, newLibObj) + return newLibObj +} + +func (obj *deviceEthernetDeviceVlanIter) Append(items ...DeviceVlan) DeviceEthernetDeviceVlanIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.deviceVlanSlice = append(obj.deviceVlanSlice, item) + } + return obj +} + +func (obj *deviceEthernetDeviceVlanIter) Set(index int, newObj DeviceVlan) DeviceEthernetDeviceVlanIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.deviceVlanSlice[index] = newObj + return obj +} +func (obj *deviceEthernetDeviceVlanIter) Clear() DeviceEthernetDeviceVlanIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.DeviceVlan{} + obj.deviceVlanSlice = []DeviceVlan{} + } + return obj +} +func (obj *deviceEthernetDeviceVlanIter) clearHolderSlice() DeviceEthernetDeviceVlanIter { + if len(obj.deviceVlanSlice) > 0 { + obj.deviceVlanSlice = []DeviceVlan{} + } + return obj +} +func (obj *deviceEthernetDeviceVlanIter) appendHolderSlice(item DeviceVlan) DeviceEthernetDeviceVlanIter { + obj.deviceVlanSlice = append(obj.deviceVlanSlice, item) + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *deviceEthernet) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DeviceEthernet object +func (obj *deviceEthernet) SetName(value string) DeviceEthernet { + + obj.obj.Name = &value + return obj +} + +// List of DHCPv4 Clients Configuration. +// Dhcpv4Interfaces returns a []DeviceDhcpv4Client +func (obj *deviceEthernet) Dhcpv4Interfaces() DeviceEthernetDeviceDhcpv4ClientIter { + if len(obj.obj.Dhcpv4Interfaces) == 0 { + obj.obj.Dhcpv4Interfaces = []*otg.DeviceDhcpv4Client{} + } + if obj.dhcpv4InterfacesHolder == nil { + obj.dhcpv4InterfacesHolder = newDeviceEthernetDeviceDhcpv4ClientIter(&obj.obj.Dhcpv4Interfaces).setMsg(obj) + } + return obj.dhcpv4InterfacesHolder +} + +type deviceEthernetDeviceDhcpv4ClientIter struct { + obj *deviceEthernet + deviceDhcpv4ClientSlice []DeviceDhcpv4Client + fieldPtr *[]*otg.DeviceDhcpv4Client +} + +func newDeviceEthernetDeviceDhcpv4ClientIter(ptr *[]*otg.DeviceDhcpv4Client) DeviceEthernetDeviceDhcpv4ClientIter { + return &deviceEthernetDeviceDhcpv4ClientIter{fieldPtr: ptr} +} + +type DeviceEthernetDeviceDhcpv4ClientIter interface { + setMsg(*deviceEthernet) DeviceEthernetDeviceDhcpv4ClientIter + Items() []DeviceDhcpv4Client + Add() DeviceDhcpv4Client + Append(items ...DeviceDhcpv4Client) DeviceEthernetDeviceDhcpv4ClientIter + Set(index int, newObj DeviceDhcpv4Client) DeviceEthernetDeviceDhcpv4ClientIter + Clear() DeviceEthernetDeviceDhcpv4ClientIter + clearHolderSlice() DeviceEthernetDeviceDhcpv4ClientIter + appendHolderSlice(item DeviceDhcpv4Client) DeviceEthernetDeviceDhcpv4ClientIter +} + +func (obj *deviceEthernetDeviceDhcpv4ClientIter) setMsg(msg *deviceEthernet) DeviceEthernetDeviceDhcpv4ClientIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&deviceDhcpv4Client{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceEthernetDeviceDhcpv4ClientIter) Items() []DeviceDhcpv4Client { + return obj.deviceDhcpv4ClientSlice +} + +func (obj *deviceEthernetDeviceDhcpv4ClientIter) Add() DeviceDhcpv4Client { + newObj := &otg.DeviceDhcpv4Client{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &deviceDhcpv4Client{obj: newObj} + newLibObj.setDefault() + obj.deviceDhcpv4ClientSlice = append(obj.deviceDhcpv4ClientSlice, newLibObj) + return newLibObj +} + +func (obj *deviceEthernetDeviceDhcpv4ClientIter) Append(items ...DeviceDhcpv4Client) DeviceEthernetDeviceDhcpv4ClientIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.deviceDhcpv4ClientSlice = append(obj.deviceDhcpv4ClientSlice, item) + } + return obj +} + +func (obj *deviceEthernetDeviceDhcpv4ClientIter) Set(index int, newObj DeviceDhcpv4Client) DeviceEthernetDeviceDhcpv4ClientIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.deviceDhcpv4ClientSlice[index] = newObj + return obj +} +func (obj *deviceEthernetDeviceDhcpv4ClientIter) Clear() DeviceEthernetDeviceDhcpv4ClientIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.DeviceDhcpv4Client{} + obj.deviceDhcpv4ClientSlice = []DeviceDhcpv4Client{} + } + return obj +} +func (obj *deviceEthernetDeviceDhcpv4ClientIter) clearHolderSlice() DeviceEthernetDeviceDhcpv4ClientIter { + if len(obj.deviceDhcpv4ClientSlice) > 0 { + obj.deviceDhcpv4ClientSlice = []DeviceDhcpv4Client{} + } + return obj +} +func (obj *deviceEthernetDeviceDhcpv4ClientIter) appendHolderSlice(item DeviceDhcpv4Client) DeviceEthernetDeviceDhcpv4ClientIter { + obj.deviceDhcpv4ClientSlice = append(obj.deviceDhcpv4ClientSlice, item) + return obj +} + +// List of DHCPv6 Clients Configuration. +// Dhcpv6Interfaces returns a []DeviceDhcpv6Client +func (obj *deviceEthernet) Dhcpv6Interfaces() DeviceEthernetDeviceDhcpv6ClientIter { + if len(obj.obj.Dhcpv6Interfaces) == 0 { + obj.obj.Dhcpv6Interfaces = []*otg.DeviceDhcpv6Client{} + } + if obj.dhcpv6InterfacesHolder == nil { + obj.dhcpv6InterfacesHolder = newDeviceEthernetDeviceDhcpv6ClientIter(&obj.obj.Dhcpv6Interfaces).setMsg(obj) + } + return obj.dhcpv6InterfacesHolder +} + +type deviceEthernetDeviceDhcpv6ClientIter struct { + obj *deviceEthernet + deviceDhcpv6ClientSlice []DeviceDhcpv6Client + fieldPtr *[]*otg.DeviceDhcpv6Client +} + +func newDeviceEthernetDeviceDhcpv6ClientIter(ptr *[]*otg.DeviceDhcpv6Client) DeviceEthernetDeviceDhcpv6ClientIter { + return &deviceEthernetDeviceDhcpv6ClientIter{fieldPtr: ptr} +} + +type DeviceEthernetDeviceDhcpv6ClientIter interface { + setMsg(*deviceEthernet) DeviceEthernetDeviceDhcpv6ClientIter + Items() []DeviceDhcpv6Client + Add() DeviceDhcpv6Client + Append(items ...DeviceDhcpv6Client) DeviceEthernetDeviceDhcpv6ClientIter + Set(index int, newObj DeviceDhcpv6Client) DeviceEthernetDeviceDhcpv6ClientIter + Clear() DeviceEthernetDeviceDhcpv6ClientIter + clearHolderSlice() DeviceEthernetDeviceDhcpv6ClientIter + appendHolderSlice(item DeviceDhcpv6Client) DeviceEthernetDeviceDhcpv6ClientIter +} + +func (obj *deviceEthernetDeviceDhcpv6ClientIter) setMsg(msg *deviceEthernet) DeviceEthernetDeviceDhcpv6ClientIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&deviceDhcpv6Client{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceEthernetDeviceDhcpv6ClientIter) Items() []DeviceDhcpv6Client { + return obj.deviceDhcpv6ClientSlice +} + +func (obj *deviceEthernetDeviceDhcpv6ClientIter) Add() DeviceDhcpv6Client { + newObj := &otg.DeviceDhcpv6Client{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &deviceDhcpv6Client{obj: newObj} + newLibObj.setDefault() + obj.deviceDhcpv6ClientSlice = append(obj.deviceDhcpv6ClientSlice, newLibObj) + return newLibObj +} + +func (obj *deviceEthernetDeviceDhcpv6ClientIter) Append(items ...DeviceDhcpv6Client) DeviceEthernetDeviceDhcpv6ClientIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.deviceDhcpv6ClientSlice = append(obj.deviceDhcpv6ClientSlice, item) + } + return obj +} + +func (obj *deviceEthernetDeviceDhcpv6ClientIter) Set(index int, newObj DeviceDhcpv6Client) DeviceEthernetDeviceDhcpv6ClientIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.deviceDhcpv6ClientSlice[index] = newObj + return obj +} +func (obj *deviceEthernetDeviceDhcpv6ClientIter) Clear() DeviceEthernetDeviceDhcpv6ClientIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.DeviceDhcpv6Client{} + obj.deviceDhcpv6ClientSlice = []DeviceDhcpv6Client{} + } + return obj +} +func (obj *deviceEthernetDeviceDhcpv6ClientIter) clearHolderSlice() DeviceEthernetDeviceDhcpv6ClientIter { + if len(obj.deviceDhcpv6ClientSlice) > 0 { + obj.deviceDhcpv6ClientSlice = []DeviceDhcpv6Client{} + } + return obj +} +func (obj *deviceEthernetDeviceDhcpv6ClientIter) appendHolderSlice(item DeviceDhcpv6Client) DeviceEthernetDeviceDhcpv6ClientIter { + obj.deviceDhcpv6ClientSlice = append(obj.deviceDhcpv6ClientSlice, item) + return obj +} + +func (obj *deviceEthernet) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Connection != nil { + + obj.Connection().validateObj(vObj, set_default) + } + + if len(obj.obj.Ipv4Addresses) != 0 { + + if set_default { + obj.Ipv4Addresses().clearHolderSlice() + for _, item := range obj.obj.Ipv4Addresses { + obj.Ipv4Addresses().appendHolderSlice(&deviceIpv4{obj: item}) + } + } + for _, item := range obj.Ipv4Addresses().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ipv6Addresses) != 0 { + + if set_default { + obj.Ipv6Addresses().clearHolderSlice() + for _, item := range obj.obj.Ipv6Addresses { + obj.Ipv6Addresses().appendHolderSlice(&deviceIpv6{obj: item}) + } + } + for _, item := range obj.Ipv6Addresses().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Mac != nil { + + err := obj.validateMac(obj.Mac()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceEthernet.Mac")) + } + + } + + if obj.obj.Mtu != nil { + + if *obj.obj.Mtu > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= DeviceEthernet.Mtu <= 65535 but Got %d", *obj.obj.Mtu)) + } + + } + + if len(obj.obj.Vlans) != 0 { + + if set_default { + obj.Vlans().clearHolderSlice() + for _, item := range obj.obj.Vlans { + obj.Vlans().appendHolderSlice(&deviceVlan{obj: item}) + } + } + for _, item := range obj.Vlans().Items() { + item.validateObj(vObj, set_default) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface DeviceEthernet") + } + + if len(obj.obj.Dhcpv4Interfaces) != 0 { + + if set_default { + obj.Dhcpv4Interfaces().clearHolderSlice() + for _, item := range obj.obj.Dhcpv4Interfaces { + obj.Dhcpv4Interfaces().appendHolderSlice(&deviceDhcpv4Client{obj: item}) + } + } + for _, item := range obj.Dhcpv4Interfaces().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Dhcpv6Interfaces) != 0 { + + if set_default { + obj.Dhcpv6Interfaces().clearHolderSlice() + for _, item := range obj.obj.Dhcpv6Interfaces { + obj.Dhcpv6Interfaces().appendHolderSlice(&deviceDhcpv6Client{obj: item}) + } + } + for _, item := range obj.Dhcpv6Interfaces().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *deviceEthernet) setDefault() { + if obj.obj.Mtu == nil { + obj.SetMtu(1500) + } + +} diff --git a/gosnappi/device_ethernet_base.go b/gosnappi/device_ethernet_base.go new file mode 100644 index 00000000..b1c255af --- /dev/null +++ b/gosnappi/device_ethernet_base.go @@ -0,0 +1,492 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceEthernetBase ***** +type deviceEthernetBase struct { + validation + obj *otg.DeviceEthernetBase + marshaller marshalDeviceEthernetBase + unMarshaller unMarshalDeviceEthernetBase + vlansHolder DeviceEthernetBaseDeviceVlanIter +} + +func NewDeviceEthernetBase() DeviceEthernetBase { + obj := deviceEthernetBase{obj: &otg.DeviceEthernetBase{}} + obj.setDefault() + return &obj +} + +func (obj *deviceEthernetBase) msg() *otg.DeviceEthernetBase { + return obj.obj +} + +func (obj *deviceEthernetBase) setMsg(msg *otg.DeviceEthernetBase) DeviceEthernetBase { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceEthernetBase struct { + obj *deviceEthernetBase +} + +type marshalDeviceEthernetBase interface { + // ToProto marshals DeviceEthernetBase to protobuf object *otg.DeviceEthernetBase + ToProto() (*otg.DeviceEthernetBase, error) + // ToPbText marshals DeviceEthernetBase to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceEthernetBase to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceEthernetBase to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceEthernetBase struct { + obj *deviceEthernetBase +} + +type unMarshalDeviceEthernetBase interface { + // FromProto unmarshals DeviceEthernetBase from protobuf object *otg.DeviceEthernetBase + FromProto(msg *otg.DeviceEthernetBase) (DeviceEthernetBase, error) + // FromPbText unmarshals DeviceEthernetBase from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceEthernetBase from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceEthernetBase from JSON text + FromJson(value string) error +} + +func (obj *deviceEthernetBase) Marshal() marshalDeviceEthernetBase { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceEthernetBase{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceEthernetBase) Unmarshal() unMarshalDeviceEthernetBase { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceEthernetBase{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceEthernetBase) ToProto() (*otg.DeviceEthernetBase, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceEthernetBase) FromProto(msg *otg.DeviceEthernetBase) (DeviceEthernetBase, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceEthernetBase) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceEthernetBase) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceEthernetBase) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceEthernetBase) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceEthernetBase) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceEthernetBase) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceEthernetBase) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceEthernetBase) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceEthernetBase) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceEthernetBase) Clone() (DeviceEthernetBase, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceEthernetBase() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceEthernetBase) setNil() { + obj.vlansHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceEthernetBase is base Ethernet interface. +type DeviceEthernetBase interface { + Validation + // msg marshals DeviceEthernetBase to protobuf object *otg.DeviceEthernetBase + // and doesn't set defaults + msg() *otg.DeviceEthernetBase + // setMsg unmarshals DeviceEthernetBase from protobuf object *otg.DeviceEthernetBase + // and doesn't set defaults + setMsg(*otg.DeviceEthernetBase) DeviceEthernetBase + // provides marshal interface + Marshal() marshalDeviceEthernetBase + // provides unmarshal interface + Unmarshal() unMarshalDeviceEthernetBase + // validate validates DeviceEthernetBase + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceEthernetBase, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Mac returns string, set in DeviceEthernetBase. + Mac() string + // SetMac assigns string provided by user to DeviceEthernetBase + SetMac(value string) DeviceEthernetBase + // HasMac checks if Mac has been set in DeviceEthernetBase + HasMac() bool + // Mtu returns uint32, set in DeviceEthernetBase. + Mtu() uint32 + // SetMtu assigns uint32 provided by user to DeviceEthernetBase + SetMtu(value uint32) DeviceEthernetBase + // HasMtu checks if Mtu has been set in DeviceEthernetBase + HasMtu() bool + // Vlans returns DeviceEthernetBaseDeviceVlanIterIter, set in DeviceEthernetBase + Vlans() DeviceEthernetBaseDeviceVlanIter + // Name returns string, set in DeviceEthernetBase. + Name() string + // SetName assigns string provided by user to DeviceEthernetBase + SetName(value string) DeviceEthernetBase + setNil() +} + +// Media Access Control address.The implementation should ensure that the 'mac' field is explicitly configured by the user for all types of interfaces as denoted by 'connection' attribute except 'simulated_link' where 'mac' is not mandatory. +// Mac returns a string +func (obj *deviceEthernetBase) Mac() string { + + return *obj.obj.Mac + +} + +// Media Access Control address.The implementation should ensure that the 'mac' field is explicitly configured by the user for all types of interfaces as denoted by 'connection' attribute except 'simulated_link' where 'mac' is not mandatory. +// Mac returns a string +func (obj *deviceEthernetBase) HasMac() bool { + return obj.obj.Mac != nil +} + +// Media Access Control address.The implementation should ensure that the 'mac' field is explicitly configured by the user for all types of interfaces as denoted by 'connection' attribute except 'simulated_link' where 'mac' is not mandatory. +// SetMac sets the string value in the DeviceEthernetBase object +func (obj *deviceEthernetBase) SetMac(value string) DeviceEthernetBase { + + obj.obj.Mac = &value + return obj +} + +// Maximum Transmission Unit. +// Mtu returns a uint32 +func (obj *deviceEthernetBase) Mtu() uint32 { + + return *obj.obj.Mtu + +} + +// Maximum Transmission Unit. +// Mtu returns a uint32 +func (obj *deviceEthernetBase) HasMtu() bool { + return obj.obj.Mtu != nil +} + +// Maximum Transmission Unit. +// SetMtu sets the uint32 value in the DeviceEthernetBase object +func (obj *deviceEthernetBase) SetMtu(value uint32) DeviceEthernetBase { + + obj.obj.Mtu = &value + return obj +} + +// List of VLANs +// Vlans returns a []DeviceVlan +func (obj *deviceEthernetBase) Vlans() DeviceEthernetBaseDeviceVlanIter { + if len(obj.obj.Vlans) == 0 { + obj.obj.Vlans = []*otg.DeviceVlan{} + } + if obj.vlansHolder == nil { + obj.vlansHolder = newDeviceEthernetBaseDeviceVlanIter(&obj.obj.Vlans).setMsg(obj) + } + return obj.vlansHolder +} + +type deviceEthernetBaseDeviceVlanIter struct { + obj *deviceEthernetBase + deviceVlanSlice []DeviceVlan + fieldPtr *[]*otg.DeviceVlan +} + +func newDeviceEthernetBaseDeviceVlanIter(ptr *[]*otg.DeviceVlan) DeviceEthernetBaseDeviceVlanIter { + return &deviceEthernetBaseDeviceVlanIter{fieldPtr: ptr} +} + +type DeviceEthernetBaseDeviceVlanIter interface { + setMsg(*deviceEthernetBase) DeviceEthernetBaseDeviceVlanIter + Items() []DeviceVlan + Add() DeviceVlan + Append(items ...DeviceVlan) DeviceEthernetBaseDeviceVlanIter + Set(index int, newObj DeviceVlan) DeviceEthernetBaseDeviceVlanIter + Clear() DeviceEthernetBaseDeviceVlanIter + clearHolderSlice() DeviceEthernetBaseDeviceVlanIter + appendHolderSlice(item DeviceVlan) DeviceEthernetBaseDeviceVlanIter +} + +func (obj *deviceEthernetBaseDeviceVlanIter) setMsg(msg *deviceEthernetBase) DeviceEthernetBaseDeviceVlanIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&deviceVlan{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceEthernetBaseDeviceVlanIter) Items() []DeviceVlan { + return obj.deviceVlanSlice +} + +func (obj *deviceEthernetBaseDeviceVlanIter) Add() DeviceVlan { + newObj := &otg.DeviceVlan{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &deviceVlan{obj: newObj} + newLibObj.setDefault() + obj.deviceVlanSlice = append(obj.deviceVlanSlice, newLibObj) + return newLibObj +} + +func (obj *deviceEthernetBaseDeviceVlanIter) Append(items ...DeviceVlan) DeviceEthernetBaseDeviceVlanIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.deviceVlanSlice = append(obj.deviceVlanSlice, item) + } + return obj +} + +func (obj *deviceEthernetBaseDeviceVlanIter) Set(index int, newObj DeviceVlan) DeviceEthernetBaseDeviceVlanIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.deviceVlanSlice[index] = newObj + return obj +} +func (obj *deviceEthernetBaseDeviceVlanIter) Clear() DeviceEthernetBaseDeviceVlanIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.DeviceVlan{} + obj.deviceVlanSlice = []DeviceVlan{} + } + return obj +} +func (obj *deviceEthernetBaseDeviceVlanIter) clearHolderSlice() DeviceEthernetBaseDeviceVlanIter { + if len(obj.deviceVlanSlice) > 0 { + obj.deviceVlanSlice = []DeviceVlan{} + } + return obj +} +func (obj *deviceEthernetBaseDeviceVlanIter) appendHolderSlice(item DeviceVlan) DeviceEthernetBaseDeviceVlanIter { + obj.deviceVlanSlice = append(obj.deviceVlanSlice, item) + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *deviceEthernetBase) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DeviceEthernetBase object +func (obj *deviceEthernetBase) SetName(value string) DeviceEthernetBase { + + obj.obj.Name = &value + return obj +} + +func (obj *deviceEthernetBase) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Mac != nil { + + err := obj.validateMac(obj.Mac()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceEthernetBase.Mac")) + } + + } + + if obj.obj.Mtu != nil { + + if *obj.obj.Mtu > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= DeviceEthernetBase.Mtu <= 65535 but Got %d", *obj.obj.Mtu)) + } + + } + + if len(obj.obj.Vlans) != 0 { + + if set_default { + obj.Vlans().clearHolderSlice() + for _, item := range obj.obj.Vlans { + obj.Vlans().appendHolderSlice(&deviceVlan{obj: item}) + } + } + for _, item := range obj.Vlans().Items() { + item.validateObj(vObj, set_default) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface DeviceEthernetBase") + } +} + +func (obj *deviceEthernetBase) setDefault() { + if obj.obj.Mtu == nil { + obj.SetMtu(1500) + } + +} diff --git a/gosnappi/device_ipv4.go b/gosnappi/device_ipv4.go new file mode 100644 index 00000000..8759c3c5 --- /dev/null +++ b/gosnappi/device_ipv4.go @@ -0,0 +1,463 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceIpv4 ***** +type deviceIpv4 struct { + validation + obj *otg.DeviceIpv4 + marshaller marshalDeviceIpv4 + unMarshaller unMarshalDeviceIpv4 + gatewayMacHolder DeviceIpv4GatewayMAC +} + +func NewDeviceIpv4() DeviceIpv4 { + obj := deviceIpv4{obj: &otg.DeviceIpv4{}} + obj.setDefault() + return &obj +} + +func (obj *deviceIpv4) msg() *otg.DeviceIpv4 { + return obj.obj +} + +func (obj *deviceIpv4) setMsg(msg *otg.DeviceIpv4) DeviceIpv4 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceIpv4 struct { + obj *deviceIpv4 +} + +type marshalDeviceIpv4 interface { + // ToProto marshals DeviceIpv4 to protobuf object *otg.DeviceIpv4 + ToProto() (*otg.DeviceIpv4, error) + // ToPbText marshals DeviceIpv4 to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceIpv4 to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceIpv4 to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceIpv4 struct { + obj *deviceIpv4 +} + +type unMarshalDeviceIpv4 interface { + // FromProto unmarshals DeviceIpv4 from protobuf object *otg.DeviceIpv4 + FromProto(msg *otg.DeviceIpv4) (DeviceIpv4, error) + // FromPbText unmarshals DeviceIpv4 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceIpv4 from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceIpv4 from JSON text + FromJson(value string) error +} + +func (obj *deviceIpv4) Marshal() marshalDeviceIpv4 { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceIpv4{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceIpv4) Unmarshal() unMarshalDeviceIpv4 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceIpv4{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceIpv4) ToProto() (*otg.DeviceIpv4, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceIpv4) FromProto(msg *otg.DeviceIpv4) (DeviceIpv4, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceIpv4) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceIpv4) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceIpv4) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIpv4) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceIpv4) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIpv4) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceIpv4) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceIpv4) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceIpv4) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceIpv4) Clone() (DeviceIpv4, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceIpv4() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceIpv4) setNil() { + obj.gatewayMacHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceIpv4 is an IPv4 interface with gateway +type DeviceIpv4 interface { + Validation + // msg marshals DeviceIpv4 to protobuf object *otg.DeviceIpv4 + // and doesn't set defaults + msg() *otg.DeviceIpv4 + // setMsg unmarshals DeviceIpv4 from protobuf object *otg.DeviceIpv4 + // and doesn't set defaults + setMsg(*otg.DeviceIpv4) DeviceIpv4 + // provides marshal interface + Marshal() marshalDeviceIpv4 + // provides unmarshal interface + Unmarshal() unMarshalDeviceIpv4 + // validate validates DeviceIpv4 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceIpv4, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Gateway returns string, set in DeviceIpv4. + Gateway() string + // SetGateway assigns string provided by user to DeviceIpv4 + SetGateway(value string) DeviceIpv4 + // GatewayMac returns DeviceIpv4GatewayMAC, set in DeviceIpv4. + // DeviceIpv4GatewayMAC is by default auto(resolved gateway mac) is set. Setting a value would mean that ARP will not be used for learning MAC of connected device. The user-configured MAC address will be used for auto-filling the destination + // MAC address in the control and data packets sent from this IPv4 endpoint + // whenever applicable. + GatewayMac() DeviceIpv4GatewayMAC + // SetGatewayMac assigns DeviceIpv4GatewayMAC provided by user to DeviceIpv4. + // DeviceIpv4GatewayMAC is by default auto(resolved gateway mac) is set. Setting a value would mean that ARP will not be used for learning MAC of connected device. The user-configured MAC address will be used for auto-filling the destination + // MAC address in the control and data packets sent from this IPv4 endpoint + // whenever applicable. + SetGatewayMac(value DeviceIpv4GatewayMAC) DeviceIpv4 + // HasGatewayMac checks if GatewayMac has been set in DeviceIpv4 + HasGatewayMac() bool + // Address returns string, set in DeviceIpv4. + Address() string + // SetAddress assigns string provided by user to DeviceIpv4 + SetAddress(value string) DeviceIpv4 + // Prefix returns uint32, set in DeviceIpv4. + Prefix() uint32 + // SetPrefix assigns uint32 provided by user to DeviceIpv4 + SetPrefix(value uint32) DeviceIpv4 + // HasPrefix checks if Prefix has been set in DeviceIpv4 + HasPrefix() bool + // Name returns string, set in DeviceIpv4. + Name() string + // SetName assigns string provided by user to DeviceIpv4 + SetName(value string) DeviceIpv4 + setNil() +} + +// The IPv4 address of the gateway +// Gateway returns a string +func (obj *deviceIpv4) Gateway() string { + + return *obj.obj.Gateway + +} + +// The IPv4 address of the gateway +// SetGateway sets the string value in the DeviceIpv4 object +func (obj *deviceIpv4) SetGateway(value string) DeviceIpv4 { + + obj.obj.Gateway = &value + return obj +} + +// description is TBD +// GatewayMac returns a DeviceIpv4GatewayMAC +func (obj *deviceIpv4) GatewayMac() DeviceIpv4GatewayMAC { + if obj.obj.GatewayMac == nil { + obj.obj.GatewayMac = NewDeviceIpv4GatewayMAC().msg() + } + if obj.gatewayMacHolder == nil { + obj.gatewayMacHolder = &deviceIpv4GatewayMAC{obj: obj.obj.GatewayMac} + } + return obj.gatewayMacHolder +} + +// description is TBD +// GatewayMac returns a DeviceIpv4GatewayMAC +func (obj *deviceIpv4) HasGatewayMac() bool { + return obj.obj.GatewayMac != nil +} + +// description is TBD +// SetGatewayMac sets the DeviceIpv4GatewayMAC value in the DeviceIpv4 object +func (obj *deviceIpv4) SetGatewayMac(value DeviceIpv4GatewayMAC) DeviceIpv4 { + + obj.gatewayMacHolder = nil + obj.obj.GatewayMac = value.msg() + + return obj +} + +// The IPv4 address +// Address returns a string +func (obj *deviceIpv4) Address() string { + + return *obj.obj.Address + +} + +// The IPv4 address +// SetAddress sets the string value in the DeviceIpv4 object +func (obj *deviceIpv4) SetAddress(value string) DeviceIpv4 { + + obj.obj.Address = &value + return obj +} + +// The prefix of the IPv4 address. +// Prefix returns a uint32 +func (obj *deviceIpv4) Prefix() uint32 { + + return *obj.obj.Prefix + +} + +// The prefix of the IPv4 address. +// Prefix returns a uint32 +func (obj *deviceIpv4) HasPrefix() bool { + return obj.obj.Prefix != nil +} + +// The prefix of the IPv4 address. +// SetPrefix sets the uint32 value in the DeviceIpv4 object +func (obj *deviceIpv4) SetPrefix(value uint32) DeviceIpv4 { + + obj.obj.Prefix = &value + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *deviceIpv4) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DeviceIpv4 object +func (obj *deviceIpv4) SetName(value string) DeviceIpv4 { + + obj.obj.Name = &value + return obj +} + +func (obj *deviceIpv4) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Gateway is required + if obj.obj.Gateway == nil { + vObj.validationErrors = append(vObj.validationErrors, "Gateway is required field on interface DeviceIpv4") + } + if obj.obj.Gateway != nil { + + err := obj.validateIpv4(obj.Gateway()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceIpv4.Gateway")) + } + + } + + if obj.obj.GatewayMac != nil { + + obj.GatewayMac().validateObj(vObj, set_default) + } + + // Address is required + if obj.obj.Address == nil { + vObj.validationErrors = append(vObj.validationErrors, "Address is required field on interface DeviceIpv4") + } + if obj.obj.Address != nil { + + err := obj.validateIpv4(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceIpv4.Address")) + } + + } + + if obj.obj.Prefix != nil { + + if *obj.obj.Prefix < 1 || *obj.obj.Prefix > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= DeviceIpv4.Prefix <= 32 but Got %d", *obj.obj.Prefix)) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface DeviceIpv4") + } +} + +func (obj *deviceIpv4) setDefault() { + if obj.obj.Prefix == nil { + obj.SetPrefix(24) + } + +} diff --git a/gosnappi/device_ipv4_gateway_mac.go b/gosnappi/device_ipv4_gateway_mac.go new file mode 100644 index 00000000..92772688 --- /dev/null +++ b/gosnappi/device_ipv4_gateway_mac.go @@ -0,0 +1,433 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceIpv4GatewayMAC ***** +type deviceIpv4GatewayMAC struct { + validation + obj *otg.DeviceIpv4GatewayMAC + marshaller marshalDeviceIpv4GatewayMAC + unMarshaller unMarshalDeviceIpv4GatewayMAC +} + +func NewDeviceIpv4GatewayMAC() DeviceIpv4GatewayMAC { + obj := deviceIpv4GatewayMAC{obj: &otg.DeviceIpv4GatewayMAC{}} + obj.setDefault() + return &obj +} + +func (obj *deviceIpv4GatewayMAC) msg() *otg.DeviceIpv4GatewayMAC { + return obj.obj +} + +func (obj *deviceIpv4GatewayMAC) setMsg(msg *otg.DeviceIpv4GatewayMAC) DeviceIpv4GatewayMAC { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceIpv4GatewayMAC struct { + obj *deviceIpv4GatewayMAC +} + +type marshalDeviceIpv4GatewayMAC interface { + // ToProto marshals DeviceIpv4GatewayMAC to protobuf object *otg.DeviceIpv4GatewayMAC + ToProto() (*otg.DeviceIpv4GatewayMAC, error) + // ToPbText marshals DeviceIpv4GatewayMAC to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceIpv4GatewayMAC to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceIpv4GatewayMAC to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceIpv4GatewayMAC struct { + obj *deviceIpv4GatewayMAC +} + +type unMarshalDeviceIpv4GatewayMAC interface { + // FromProto unmarshals DeviceIpv4GatewayMAC from protobuf object *otg.DeviceIpv4GatewayMAC + FromProto(msg *otg.DeviceIpv4GatewayMAC) (DeviceIpv4GatewayMAC, error) + // FromPbText unmarshals DeviceIpv4GatewayMAC from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceIpv4GatewayMAC from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceIpv4GatewayMAC from JSON text + FromJson(value string) error +} + +func (obj *deviceIpv4GatewayMAC) Marshal() marshalDeviceIpv4GatewayMAC { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceIpv4GatewayMAC{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceIpv4GatewayMAC) Unmarshal() unMarshalDeviceIpv4GatewayMAC { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceIpv4GatewayMAC{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceIpv4GatewayMAC) ToProto() (*otg.DeviceIpv4GatewayMAC, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceIpv4GatewayMAC) FromProto(msg *otg.DeviceIpv4GatewayMAC) (DeviceIpv4GatewayMAC, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceIpv4GatewayMAC) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceIpv4GatewayMAC) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceIpv4GatewayMAC) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIpv4GatewayMAC) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceIpv4GatewayMAC) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIpv4GatewayMAC) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceIpv4GatewayMAC) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceIpv4GatewayMAC) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceIpv4GatewayMAC) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceIpv4GatewayMAC) Clone() (DeviceIpv4GatewayMAC, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceIpv4GatewayMAC() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceIpv4GatewayMAC is by default auto(resolved gateway mac) is set. Setting a value would mean that ARP will not be used for learning MAC of connected device. The user-configured MAC address will be used for auto-filling the destination +// MAC address in the control and data packets sent from this IPv4 endpoint +// whenever applicable. +type DeviceIpv4GatewayMAC interface { + Validation + // msg marshals DeviceIpv4GatewayMAC to protobuf object *otg.DeviceIpv4GatewayMAC + // and doesn't set defaults + msg() *otg.DeviceIpv4GatewayMAC + // setMsg unmarshals DeviceIpv4GatewayMAC from protobuf object *otg.DeviceIpv4GatewayMAC + // and doesn't set defaults + setMsg(*otg.DeviceIpv4GatewayMAC) DeviceIpv4GatewayMAC + // provides marshal interface + Marshal() marshalDeviceIpv4GatewayMAC + // provides unmarshal interface + Unmarshal() unMarshalDeviceIpv4GatewayMAC + // validate validates DeviceIpv4GatewayMAC + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceIpv4GatewayMAC, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns DeviceIpv4GatewayMACChoiceEnum, set in DeviceIpv4GatewayMAC + Choice() DeviceIpv4GatewayMACChoiceEnum + // setChoice assigns DeviceIpv4GatewayMACChoiceEnum provided by user to DeviceIpv4GatewayMAC + setChoice(value DeviceIpv4GatewayMACChoiceEnum) DeviceIpv4GatewayMAC + // HasChoice checks if Choice has been set in DeviceIpv4GatewayMAC + HasChoice() bool + // Auto returns string, set in DeviceIpv4GatewayMAC. + Auto() string + // HasAuto checks if Auto has been set in DeviceIpv4GatewayMAC + HasAuto() bool + // Value returns string, set in DeviceIpv4GatewayMAC. + Value() string + // SetValue assigns string provided by user to DeviceIpv4GatewayMAC + SetValue(value string) DeviceIpv4GatewayMAC + // HasValue checks if Value has been set in DeviceIpv4GatewayMAC + HasValue() bool +} + +type DeviceIpv4GatewayMACChoiceEnum string + +// Enum of Choice on DeviceIpv4GatewayMAC +var DeviceIpv4GatewayMACChoice = struct { + AUTO DeviceIpv4GatewayMACChoiceEnum + VALUE DeviceIpv4GatewayMACChoiceEnum +}{ + AUTO: DeviceIpv4GatewayMACChoiceEnum("auto"), + VALUE: DeviceIpv4GatewayMACChoiceEnum("value"), +} + +func (obj *deviceIpv4GatewayMAC) Choice() DeviceIpv4GatewayMACChoiceEnum { + return DeviceIpv4GatewayMACChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// auto or configured value. +// Choice returns a string +func (obj *deviceIpv4GatewayMAC) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *deviceIpv4GatewayMAC) setChoice(value DeviceIpv4GatewayMACChoiceEnum) DeviceIpv4GatewayMAC { + intValue, ok := otg.DeviceIpv4GatewayMAC_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on DeviceIpv4GatewayMACChoiceEnum", string(value))) + return obj + } + enumValue := otg.DeviceIpv4GatewayMAC_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Value = nil + obj.obj.Auto = nil + + if value == DeviceIpv4GatewayMACChoice.AUTO { + defaultValue := "00:00:00:00:00:00" + obj.obj.Auto = &defaultValue + } + + if value == DeviceIpv4GatewayMACChoice.VALUE { + defaultValue := "00:00:00:00:00:00" + obj.obj.Value = &defaultValue + } + + return obj +} + +// The OTG implementation can provide a system generated value for this property. If the OTG is unable to generate a value the default value must be used. +// Auto returns a string +func (obj *deviceIpv4GatewayMAC) Auto() string { + + if obj.obj.Auto == nil { + obj.setChoice(DeviceIpv4GatewayMACChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated value for this property. If the OTG is unable to generate a value the default value must be used. +// Auto returns a string +func (obj *deviceIpv4GatewayMAC) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Value returns a string +func (obj *deviceIpv4GatewayMAC) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(DeviceIpv4GatewayMACChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *deviceIpv4GatewayMAC) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the DeviceIpv4GatewayMAC object +func (obj *deviceIpv4GatewayMAC) SetValue(value string) DeviceIpv4GatewayMAC { + obj.setChoice(DeviceIpv4GatewayMACChoice.VALUE) + obj.obj.Value = &value + return obj +} + +func (obj *deviceIpv4GatewayMAC) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Auto != nil { + + err := obj.validateMac(obj.Auto()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceIpv4GatewayMAC.Auto")) + } + + } + + if obj.obj.Value != nil { + + err := obj.validateMac(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceIpv4GatewayMAC.Value")) + } + + } + +} + +func (obj *deviceIpv4GatewayMAC) setDefault() { + var choices_set int = 0 + var choice DeviceIpv4GatewayMACChoiceEnum + + if obj.obj.Auto != nil { + choices_set += 1 + choice = DeviceIpv4GatewayMACChoice.AUTO + } + + if obj.obj.Value != nil { + choices_set += 1 + choice = DeviceIpv4GatewayMACChoice.VALUE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(DeviceIpv4GatewayMACChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in DeviceIpv4GatewayMAC") + } + } else { + intVal := otg.DeviceIpv4GatewayMAC_Choice_Enum_value[string(choice)] + enumValue := otg.DeviceIpv4GatewayMAC_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/device_ipv4_loopback.go b/gosnappi/device_ipv4_loopback.go new file mode 100644 index 00000000..aab2659a --- /dev/null +++ b/gosnappi/device_ipv4_loopback.go @@ -0,0 +1,381 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceIpv4Loopback ***** +type deviceIpv4Loopback struct { + validation + obj *otg.DeviceIpv4Loopback + marshaller marshalDeviceIpv4Loopback + unMarshaller unMarshalDeviceIpv4Loopback +} + +func NewDeviceIpv4Loopback() DeviceIpv4Loopback { + obj := deviceIpv4Loopback{obj: &otg.DeviceIpv4Loopback{}} + obj.setDefault() + return &obj +} + +func (obj *deviceIpv4Loopback) msg() *otg.DeviceIpv4Loopback { + return obj.obj +} + +func (obj *deviceIpv4Loopback) setMsg(msg *otg.DeviceIpv4Loopback) DeviceIpv4Loopback { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceIpv4Loopback struct { + obj *deviceIpv4Loopback +} + +type marshalDeviceIpv4Loopback interface { + // ToProto marshals DeviceIpv4Loopback to protobuf object *otg.DeviceIpv4Loopback + ToProto() (*otg.DeviceIpv4Loopback, error) + // ToPbText marshals DeviceIpv4Loopback to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceIpv4Loopback to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceIpv4Loopback to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceIpv4Loopback struct { + obj *deviceIpv4Loopback +} + +type unMarshalDeviceIpv4Loopback interface { + // FromProto unmarshals DeviceIpv4Loopback from protobuf object *otg.DeviceIpv4Loopback + FromProto(msg *otg.DeviceIpv4Loopback) (DeviceIpv4Loopback, error) + // FromPbText unmarshals DeviceIpv4Loopback from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceIpv4Loopback from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceIpv4Loopback from JSON text + FromJson(value string) error +} + +func (obj *deviceIpv4Loopback) Marshal() marshalDeviceIpv4Loopback { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceIpv4Loopback{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceIpv4Loopback) Unmarshal() unMarshalDeviceIpv4Loopback { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceIpv4Loopback{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceIpv4Loopback) ToProto() (*otg.DeviceIpv4Loopback, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceIpv4Loopback) FromProto(msg *otg.DeviceIpv4Loopback) (DeviceIpv4Loopback, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceIpv4Loopback) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceIpv4Loopback) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceIpv4Loopback) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIpv4Loopback) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceIpv4Loopback) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIpv4Loopback) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceIpv4Loopback) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceIpv4Loopback) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceIpv4Loopback) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceIpv4Loopback) Clone() (DeviceIpv4Loopback, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceIpv4Loopback() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceIpv4Loopback is an IPv4 Loopback interface. +type DeviceIpv4Loopback interface { + Validation + // msg marshals DeviceIpv4Loopback to protobuf object *otg.DeviceIpv4Loopback + // and doesn't set defaults + msg() *otg.DeviceIpv4Loopback + // setMsg unmarshals DeviceIpv4Loopback from protobuf object *otg.DeviceIpv4Loopback + // and doesn't set defaults + setMsg(*otg.DeviceIpv4Loopback) DeviceIpv4Loopback + // provides marshal interface + Marshal() marshalDeviceIpv4Loopback + // provides unmarshal interface + Unmarshal() unMarshalDeviceIpv4Loopback + // validate validates DeviceIpv4Loopback + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceIpv4Loopback, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EthName returns string, set in DeviceIpv4Loopback. + EthName() string + // SetEthName assigns string provided by user to DeviceIpv4Loopback + SetEthName(value string) DeviceIpv4Loopback + // Address returns string, set in DeviceIpv4Loopback. + Address() string + // SetAddress assigns string provided by user to DeviceIpv4Loopback + SetAddress(value string) DeviceIpv4Loopback + // HasAddress checks if Address has been set in DeviceIpv4Loopback + HasAddress() bool + // Name returns string, set in DeviceIpv4Loopback. + Name() string + // SetName assigns string provided by user to DeviceIpv4Loopback + SetName(value string) DeviceIpv4Loopback +} + +// The unique name of the Ethernet interface behind which this Loopback interface will be created. +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// EthName returns a string +func (obj *deviceIpv4Loopback) EthName() string { + + return *obj.obj.EthName + +} + +// The unique name of the Ethernet interface behind which this Loopback interface will be created. +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// SetEthName sets the string value in the DeviceIpv4Loopback object +func (obj *deviceIpv4Loopback) SetEthName(value string) DeviceIpv4Loopback { + + obj.obj.EthName = &value + return obj +} + +// The IPv4 Loopback address with prefix length of 32. +// Address returns a string +func (obj *deviceIpv4Loopback) Address() string { + + return *obj.obj.Address + +} + +// The IPv4 Loopback address with prefix length of 32. +// Address returns a string +func (obj *deviceIpv4Loopback) HasAddress() bool { + return obj.obj.Address != nil +} + +// The IPv4 Loopback address with prefix length of 32. +// SetAddress sets the string value in the DeviceIpv4Loopback object +func (obj *deviceIpv4Loopback) SetAddress(value string) DeviceIpv4Loopback { + + obj.obj.Address = &value + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *deviceIpv4Loopback) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DeviceIpv4Loopback object +func (obj *deviceIpv4Loopback) SetName(value string) DeviceIpv4Loopback { + + obj.obj.Name = &value + return obj +} + +func (obj *deviceIpv4Loopback) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // EthName is required + if obj.obj.EthName == nil { + vObj.validationErrors = append(vObj.validationErrors, "EthName is required field on interface DeviceIpv4Loopback") + } + + if obj.obj.Address != nil { + + err := obj.validateIpv4(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceIpv4Loopback.Address")) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface DeviceIpv4Loopback") + } +} + +func (obj *deviceIpv4Loopback) setDefault() { + if obj.obj.Address == nil { + obj.SetAddress("0.0.0.0") + } + +} diff --git a/gosnappi/device_ipv6.go b/gosnappi/device_ipv6.go new file mode 100644 index 00000000..4e326d76 --- /dev/null +++ b/gosnappi/device_ipv6.go @@ -0,0 +1,463 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceIpv6 ***** +type deviceIpv6 struct { + validation + obj *otg.DeviceIpv6 + marshaller marshalDeviceIpv6 + unMarshaller unMarshalDeviceIpv6 + gatewayMacHolder DeviceIpv6GatewayMAC +} + +func NewDeviceIpv6() DeviceIpv6 { + obj := deviceIpv6{obj: &otg.DeviceIpv6{}} + obj.setDefault() + return &obj +} + +func (obj *deviceIpv6) msg() *otg.DeviceIpv6 { + return obj.obj +} + +func (obj *deviceIpv6) setMsg(msg *otg.DeviceIpv6) DeviceIpv6 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceIpv6 struct { + obj *deviceIpv6 +} + +type marshalDeviceIpv6 interface { + // ToProto marshals DeviceIpv6 to protobuf object *otg.DeviceIpv6 + ToProto() (*otg.DeviceIpv6, error) + // ToPbText marshals DeviceIpv6 to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceIpv6 to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceIpv6 to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceIpv6 struct { + obj *deviceIpv6 +} + +type unMarshalDeviceIpv6 interface { + // FromProto unmarshals DeviceIpv6 from protobuf object *otg.DeviceIpv6 + FromProto(msg *otg.DeviceIpv6) (DeviceIpv6, error) + // FromPbText unmarshals DeviceIpv6 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceIpv6 from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceIpv6 from JSON text + FromJson(value string) error +} + +func (obj *deviceIpv6) Marshal() marshalDeviceIpv6 { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceIpv6{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceIpv6) Unmarshal() unMarshalDeviceIpv6 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceIpv6{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceIpv6) ToProto() (*otg.DeviceIpv6, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceIpv6) FromProto(msg *otg.DeviceIpv6) (DeviceIpv6, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceIpv6) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceIpv6) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceIpv6) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIpv6) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceIpv6) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIpv6) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceIpv6) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceIpv6) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceIpv6) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceIpv6) Clone() (DeviceIpv6, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceIpv6() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceIpv6) setNil() { + obj.gatewayMacHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceIpv6 is an IPv6 interface with gateway. +type DeviceIpv6 interface { + Validation + // msg marshals DeviceIpv6 to protobuf object *otg.DeviceIpv6 + // and doesn't set defaults + msg() *otg.DeviceIpv6 + // setMsg unmarshals DeviceIpv6 from protobuf object *otg.DeviceIpv6 + // and doesn't set defaults + setMsg(*otg.DeviceIpv6) DeviceIpv6 + // provides marshal interface + Marshal() marshalDeviceIpv6 + // provides unmarshal interface + Unmarshal() unMarshalDeviceIpv6 + // validate validates DeviceIpv6 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceIpv6, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Gateway returns string, set in DeviceIpv6. + Gateway() string + // SetGateway assigns string provided by user to DeviceIpv6 + SetGateway(value string) DeviceIpv6 + // GatewayMac returns DeviceIpv6GatewayMAC, set in DeviceIpv6. + // DeviceIpv6GatewayMAC is by default auto(resolved gateway mac) is set. Setting a value would mean that ND will not be used for learning MAC of connected device. The user-configured MAC address will be used for auto-filling the destination + // MAC address in the control and data packets sent from this IPv6 endpoint + // whenever applicable. + GatewayMac() DeviceIpv6GatewayMAC + // SetGatewayMac assigns DeviceIpv6GatewayMAC provided by user to DeviceIpv6. + // DeviceIpv6GatewayMAC is by default auto(resolved gateway mac) is set. Setting a value would mean that ND will not be used for learning MAC of connected device. The user-configured MAC address will be used for auto-filling the destination + // MAC address in the control and data packets sent from this IPv6 endpoint + // whenever applicable. + SetGatewayMac(value DeviceIpv6GatewayMAC) DeviceIpv6 + // HasGatewayMac checks if GatewayMac has been set in DeviceIpv6 + HasGatewayMac() bool + // Address returns string, set in DeviceIpv6. + Address() string + // SetAddress assigns string provided by user to DeviceIpv6 + SetAddress(value string) DeviceIpv6 + // Prefix returns uint32, set in DeviceIpv6. + Prefix() uint32 + // SetPrefix assigns uint32 provided by user to DeviceIpv6 + SetPrefix(value uint32) DeviceIpv6 + // HasPrefix checks if Prefix has been set in DeviceIpv6 + HasPrefix() bool + // Name returns string, set in DeviceIpv6. + Name() string + // SetName assigns string provided by user to DeviceIpv6 + SetName(value string) DeviceIpv6 + setNil() +} + +// The IPv6 gateway address. +// Gateway returns a string +func (obj *deviceIpv6) Gateway() string { + + return *obj.obj.Gateway + +} + +// The IPv6 gateway address. +// SetGateway sets the string value in the DeviceIpv6 object +func (obj *deviceIpv6) SetGateway(value string) DeviceIpv6 { + + obj.obj.Gateway = &value + return obj +} + +// description is TBD +// GatewayMac returns a DeviceIpv6GatewayMAC +func (obj *deviceIpv6) GatewayMac() DeviceIpv6GatewayMAC { + if obj.obj.GatewayMac == nil { + obj.obj.GatewayMac = NewDeviceIpv6GatewayMAC().msg() + } + if obj.gatewayMacHolder == nil { + obj.gatewayMacHolder = &deviceIpv6GatewayMAC{obj: obj.obj.GatewayMac} + } + return obj.gatewayMacHolder +} + +// description is TBD +// GatewayMac returns a DeviceIpv6GatewayMAC +func (obj *deviceIpv6) HasGatewayMac() bool { + return obj.obj.GatewayMac != nil +} + +// description is TBD +// SetGatewayMac sets the DeviceIpv6GatewayMAC value in the DeviceIpv6 object +func (obj *deviceIpv6) SetGatewayMac(value DeviceIpv6GatewayMAC) DeviceIpv6 { + + obj.gatewayMacHolder = nil + obj.obj.GatewayMac = value.msg() + + return obj +} + +// The IPv6 address. +// Address returns a string +func (obj *deviceIpv6) Address() string { + + return *obj.obj.Address + +} + +// The IPv6 address. +// SetAddress sets the string value in the DeviceIpv6 object +func (obj *deviceIpv6) SetAddress(value string) DeviceIpv6 { + + obj.obj.Address = &value + return obj +} + +// The network prefix. +// Prefix returns a uint32 +func (obj *deviceIpv6) Prefix() uint32 { + + return *obj.obj.Prefix + +} + +// The network prefix. +// Prefix returns a uint32 +func (obj *deviceIpv6) HasPrefix() bool { + return obj.obj.Prefix != nil +} + +// The network prefix. +// SetPrefix sets the uint32 value in the DeviceIpv6 object +func (obj *deviceIpv6) SetPrefix(value uint32) DeviceIpv6 { + + obj.obj.Prefix = &value + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *deviceIpv6) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DeviceIpv6 object +func (obj *deviceIpv6) SetName(value string) DeviceIpv6 { + + obj.obj.Name = &value + return obj +} + +func (obj *deviceIpv6) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Gateway is required + if obj.obj.Gateway == nil { + vObj.validationErrors = append(vObj.validationErrors, "Gateway is required field on interface DeviceIpv6") + } + if obj.obj.Gateway != nil { + + err := obj.validateIpv6(obj.Gateway()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceIpv6.Gateway")) + } + + } + + if obj.obj.GatewayMac != nil { + + obj.GatewayMac().validateObj(vObj, set_default) + } + + // Address is required + if obj.obj.Address == nil { + vObj.validationErrors = append(vObj.validationErrors, "Address is required field on interface DeviceIpv6") + } + if obj.obj.Address != nil { + + err := obj.validateIpv6(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceIpv6.Address")) + } + + } + + if obj.obj.Prefix != nil { + + if *obj.obj.Prefix < 1 || *obj.obj.Prefix > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= DeviceIpv6.Prefix <= 128 but Got %d", *obj.obj.Prefix)) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface DeviceIpv6") + } +} + +func (obj *deviceIpv6) setDefault() { + if obj.obj.Prefix == nil { + obj.SetPrefix(64) + } + +} diff --git a/gosnappi/device_ipv6_gateway_mac.go b/gosnappi/device_ipv6_gateway_mac.go new file mode 100644 index 00000000..9c66579a --- /dev/null +++ b/gosnappi/device_ipv6_gateway_mac.go @@ -0,0 +1,433 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceIpv6GatewayMAC ***** +type deviceIpv6GatewayMAC struct { + validation + obj *otg.DeviceIpv6GatewayMAC + marshaller marshalDeviceIpv6GatewayMAC + unMarshaller unMarshalDeviceIpv6GatewayMAC +} + +func NewDeviceIpv6GatewayMAC() DeviceIpv6GatewayMAC { + obj := deviceIpv6GatewayMAC{obj: &otg.DeviceIpv6GatewayMAC{}} + obj.setDefault() + return &obj +} + +func (obj *deviceIpv6GatewayMAC) msg() *otg.DeviceIpv6GatewayMAC { + return obj.obj +} + +func (obj *deviceIpv6GatewayMAC) setMsg(msg *otg.DeviceIpv6GatewayMAC) DeviceIpv6GatewayMAC { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceIpv6GatewayMAC struct { + obj *deviceIpv6GatewayMAC +} + +type marshalDeviceIpv6GatewayMAC interface { + // ToProto marshals DeviceIpv6GatewayMAC to protobuf object *otg.DeviceIpv6GatewayMAC + ToProto() (*otg.DeviceIpv6GatewayMAC, error) + // ToPbText marshals DeviceIpv6GatewayMAC to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceIpv6GatewayMAC to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceIpv6GatewayMAC to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceIpv6GatewayMAC struct { + obj *deviceIpv6GatewayMAC +} + +type unMarshalDeviceIpv6GatewayMAC interface { + // FromProto unmarshals DeviceIpv6GatewayMAC from protobuf object *otg.DeviceIpv6GatewayMAC + FromProto(msg *otg.DeviceIpv6GatewayMAC) (DeviceIpv6GatewayMAC, error) + // FromPbText unmarshals DeviceIpv6GatewayMAC from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceIpv6GatewayMAC from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceIpv6GatewayMAC from JSON text + FromJson(value string) error +} + +func (obj *deviceIpv6GatewayMAC) Marshal() marshalDeviceIpv6GatewayMAC { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceIpv6GatewayMAC{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceIpv6GatewayMAC) Unmarshal() unMarshalDeviceIpv6GatewayMAC { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceIpv6GatewayMAC{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceIpv6GatewayMAC) ToProto() (*otg.DeviceIpv6GatewayMAC, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceIpv6GatewayMAC) FromProto(msg *otg.DeviceIpv6GatewayMAC) (DeviceIpv6GatewayMAC, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceIpv6GatewayMAC) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceIpv6GatewayMAC) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceIpv6GatewayMAC) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIpv6GatewayMAC) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceIpv6GatewayMAC) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIpv6GatewayMAC) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceIpv6GatewayMAC) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceIpv6GatewayMAC) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceIpv6GatewayMAC) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceIpv6GatewayMAC) Clone() (DeviceIpv6GatewayMAC, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceIpv6GatewayMAC() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceIpv6GatewayMAC is by default auto(resolved gateway mac) is set. Setting a value would mean that ND will not be used for learning MAC of connected device. The user-configured MAC address will be used for auto-filling the destination +// MAC address in the control and data packets sent from this IPv6 endpoint +// whenever applicable. +type DeviceIpv6GatewayMAC interface { + Validation + // msg marshals DeviceIpv6GatewayMAC to protobuf object *otg.DeviceIpv6GatewayMAC + // and doesn't set defaults + msg() *otg.DeviceIpv6GatewayMAC + // setMsg unmarshals DeviceIpv6GatewayMAC from protobuf object *otg.DeviceIpv6GatewayMAC + // and doesn't set defaults + setMsg(*otg.DeviceIpv6GatewayMAC) DeviceIpv6GatewayMAC + // provides marshal interface + Marshal() marshalDeviceIpv6GatewayMAC + // provides unmarshal interface + Unmarshal() unMarshalDeviceIpv6GatewayMAC + // validate validates DeviceIpv6GatewayMAC + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceIpv6GatewayMAC, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns DeviceIpv6GatewayMACChoiceEnum, set in DeviceIpv6GatewayMAC + Choice() DeviceIpv6GatewayMACChoiceEnum + // setChoice assigns DeviceIpv6GatewayMACChoiceEnum provided by user to DeviceIpv6GatewayMAC + setChoice(value DeviceIpv6GatewayMACChoiceEnum) DeviceIpv6GatewayMAC + // HasChoice checks if Choice has been set in DeviceIpv6GatewayMAC + HasChoice() bool + // Auto returns string, set in DeviceIpv6GatewayMAC. + Auto() string + // HasAuto checks if Auto has been set in DeviceIpv6GatewayMAC + HasAuto() bool + // Value returns string, set in DeviceIpv6GatewayMAC. + Value() string + // SetValue assigns string provided by user to DeviceIpv6GatewayMAC + SetValue(value string) DeviceIpv6GatewayMAC + // HasValue checks if Value has been set in DeviceIpv6GatewayMAC + HasValue() bool +} + +type DeviceIpv6GatewayMACChoiceEnum string + +// Enum of Choice on DeviceIpv6GatewayMAC +var DeviceIpv6GatewayMACChoice = struct { + AUTO DeviceIpv6GatewayMACChoiceEnum + VALUE DeviceIpv6GatewayMACChoiceEnum +}{ + AUTO: DeviceIpv6GatewayMACChoiceEnum("auto"), + VALUE: DeviceIpv6GatewayMACChoiceEnum("value"), +} + +func (obj *deviceIpv6GatewayMAC) Choice() DeviceIpv6GatewayMACChoiceEnum { + return DeviceIpv6GatewayMACChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// auto or configured value. +// Choice returns a string +func (obj *deviceIpv6GatewayMAC) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *deviceIpv6GatewayMAC) setChoice(value DeviceIpv6GatewayMACChoiceEnum) DeviceIpv6GatewayMAC { + intValue, ok := otg.DeviceIpv6GatewayMAC_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on DeviceIpv6GatewayMACChoiceEnum", string(value))) + return obj + } + enumValue := otg.DeviceIpv6GatewayMAC_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Value = nil + obj.obj.Auto = nil + + if value == DeviceIpv6GatewayMACChoice.AUTO { + defaultValue := "00:00:00:00:00:00" + obj.obj.Auto = &defaultValue + } + + if value == DeviceIpv6GatewayMACChoice.VALUE { + defaultValue := "00:00:00:00:00:00" + obj.obj.Value = &defaultValue + } + + return obj +} + +// The OTG implementation can provide a system generated value for this property. If the OTG is unable to generate a value the default value must be used. +// Auto returns a string +func (obj *deviceIpv6GatewayMAC) Auto() string { + + if obj.obj.Auto == nil { + obj.setChoice(DeviceIpv6GatewayMACChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated value for this property. If the OTG is unable to generate a value the default value must be used. +// Auto returns a string +func (obj *deviceIpv6GatewayMAC) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Value returns a string +func (obj *deviceIpv6GatewayMAC) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(DeviceIpv6GatewayMACChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *deviceIpv6GatewayMAC) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the DeviceIpv6GatewayMAC object +func (obj *deviceIpv6GatewayMAC) SetValue(value string) DeviceIpv6GatewayMAC { + obj.setChoice(DeviceIpv6GatewayMACChoice.VALUE) + obj.obj.Value = &value + return obj +} + +func (obj *deviceIpv6GatewayMAC) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Auto != nil { + + err := obj.validateMac(obj.Auto()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceIpv6GatewayMAC.Auto")) + } + + } + + if obj.obj.Value != nil { + + err := obj.validateMac(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceIpv6GatewayMAC.Value")) + } + + } + +} + +func (obj *deviceIpv6GatewayMAC) setDefault() { + var choices_set int = 0 + var choice DeviceIpv6GatewayMACChoiceEnum + + if obj.obj.Auto != nil { + choices_set += 1 + choice = DeviceIpv6GatewayMACChoice.AUTO + } + + if obj.obj.Value != nil { + choices_set += 1 + choice = DeviceIpv6GatewayMACChoice.VALUE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(DeviceIpv6GatewayMACChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in DeviceIpv6GatewayMAC") + } + } else { + intVal := otg.DeviceIpv6GatewayMAC_Choice_Enum_value[string(choice)] + enumValue := otg.DeviceIpv6GatewayMAC_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/device_ipv6_loopback.go b/gosnappi/device_ipv6_loopback.go new file mode 100644 index 00000000..4dba4917 --- /dev/null +++ b/gosnappi/device_ipv6_loopback.go @@ -0,0 +1,383 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceIpv6Loopback ***** +type deviceIpv6Loopback struct { + validation + obj *otg.DeviceIpv6Loopback + marshaller marshalDeviceIpv6Loopback + unMarshaller unMarshalDeviceIpv6Loopback +} + +func NewDeviceIpv6Loopback() DeviceIpv6Loopback { + obj := deviceIpv6Loopback{obj: &otg.DeviceIpv6Loopback{}} + obj.setDefault() + return &obj +} + +func (obj *deviceIpv6Loopback) msg() *otg.DeviceIpv6Loopback { + return obj.obj +} + +func (obj *deviceIpv6Loopback) setMsg(msg *otg.DeviceIpv6Loopback) DeviceIpv6Loopback { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceIpv6Loopback struct { + obj *deviceIpv6Loopback +} + +type marshalDeviceIpv6Loopback interface { + // ToProto marshals DeviceIpv6Loopback to protobuf object *otg.DeviceIpv6Loopback + ToProto() (*otg.DeviceIpv6Loopback, error) + // ToPbText marshals DeviceIpv6Loopback to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceIpv6Loopback to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceIpv6Loopback to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceIpv6Loopback struct { + obj *deviceIpv6Loopback +} + +type unMarshalDeviceIpv6Loopback interface { + // FromProto unmarshals DeviceIpv6Loopback from protobuf object *otg.DeviceIpv6Loopback + FromProto(msg *otg.DeviceIpv6Loopback) (DeviceIpv6Loopback, error) + // FromPbText unmarshals DeviceIpv6Loopback from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceIpv6Loopback from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceIpv6Loopback from JSON text + FromJson(value string) error +} + +func (obj *deviceIpv6Loopback) Marshal() marshalDeviceIpv6Loopback { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceIpv6Loopback{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceIpv6Loopback) Unmarshal() unMarshalDeviceIpv6Loopback { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceIpv6Loopback{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceIpv6Loopback) ToProto() (*otg.DeviceIpv6Loopback, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceIpv6Loopback) FromProto(msg *otg.DeviceIpv6Loopback) (DeviceIpv6Loopback, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceIpv6Loopback) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceIpv6Loopback) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceIpv6Loopback) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIpv6Loopback) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceIpv6Loopback) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIpv6Loopback) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceIpv6Loopback) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceIpv6Loopback) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceIpv6Loopback) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceIpv6Loopback) Clone() (DeviceIpv6Loopback, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceIpv6Loopback() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceIpv6Loopback is an IPv6 Loopback interface +type DeviceIpv6Loopback interface { + Validation + // msg marshals DeviceIpv6Loopback to protobuf object *otg.DeviceIpv6Loopback + // and doesn't set defaults + msg() *otg.DeviceIpv6Loopback + // setMsg unmarshals DeviceIpv6Loopback from protobuf object *otg.DeviceIpv6Loopback + // and doesn't set defaults + setMsg(*otg.DeviceIpv6Loopback) DeviceIpv6Loopback + // provides marshal interface + Marshal() marshalDeviceIpv6Loopback + // provides unmarshal interface + Unmarshal() unMarshalDeviceIpv6Loopback + // validate validates DeviceIpv6Loopback + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceIpv6Loopback, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EthName returns string, set in DeviceIpv6Loopback. + EthName() string + // SetEthName assigns string provided by user to DeviceIpv6Loopback + SetEthName(value string) DeviceIpv6Loopback + // Address returns string, set in DeviceIpv6Loopback. + Address() string + // SetAddress assigns string provided by user to DeviceIpv6Loopback + SetAddress(value string) DeviceIpv6Loopback + // HasAddress checks if Address has been set in DeviceIpv6Loopback + HasAddress() bool + // Name returns string, set in DeviceIpv6Loopback. + Name() string + // SetName assigns string provided by user to DeviceIpv6Loopback + SetName(value string) DeviceIpv6Loopback +} + +// The unique name of the Ethernet interface behind which this Loopback +// interface will be created. +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// EthName returns a string +func (obj *deviceIpv6Loopback) EthName() string { + + return *obj.obj.EthName + +} + +// The unique name of the Ethernet interface behind which this Loopback +// interface will be created. +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// SetEthName sets the string value in the DeviceIpv6Loopback object +func (obj *deviceIpv6Loopback) SetEthName(value string) DeviceIpv6Loopback { + + obj.obj.EthName = &value + return obj +} + +// The IPv6 Loopback address with prefix length of 128. +// Address returns a string +func (obj *deviceIpv6Loopback) Address() string { + + return *obj.obj.Address + +} + +// The IPv6 Loopback address with prefix length of 128. +// Address returns a string +func (obj *deviceIpv6Loopback) HasAddress() bool { + return obj.obj.Address != nil +} + +// The IPv6 Loopback address with prefix length of 128. +// SetAddress sets the string value in the DeviceIpv6Loopback object +func (obj *deviceIpv6Loopback) SetAddress(value string) DeviceIpv6Loopback { + + obj.obj.Address = &value + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *deviceIpv6Loopback) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DeviceIpv6Loopback object +func (obj *deviceIpv6Loopback) SetName(value string) DeviceIpv6Loopback { + + obj.obj.Name = &value + return obj +} + +func (obj *deviceIpv6Loopback) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // EthName is required + if obj.obj.EthName == nil { + vObj.validationErrors = append(vObj.validationErrors, "EthName is required field on interface DeviceIpv6Loopback") + } + + if obj.obj.Address != nil { + + err := obj.validateIpv6(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceIpv6Loopback.Address")) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface DeviceIpv6Loopback") + } +} + +func (obj *deviceIpv6Loopback) setDefault() { + if obj.obj.Address == nil { + obj.SetAddress("::0") + } + +} diff --git a/gosnappi/device_isis_multi_instance.go b/gosnappi/device_isis_multi_instance.go new file mode 100644 index 00000000..d19eeaf6 --- /dev/null +++ b/gosnappi/device_isis_multi_instance.go @@ -0,0 +1,357 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceIsisMultiInstance ***** +type deviceIsisMultiInstance struct { + validation + obj *otg.DeviceIsisMultiInstance + marshaller marshalDeviceIsisMultiInstance + unMarshaller unMarshalDeviceIsisMultiInstance +} + +func NewDeviceIsisMultiInstance() DeviceIsisMultiInstance { + obj := deviceIsisMultiInstance{obj: &otg.DeviceIsisMultiInstance{}} + obj.setDefault() + return &obj +} + +func (obj *deviceIsisMultiInstance) msg() *otg.DeviceIsisMultiInstance { + return obj.obj +} + +func (obj *deviceIsisMultiInstance) setMsg(msg *otg.DeviceIsisMultiInstance) DeviceIsisMultiInstance { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceIsisMultiInstance struct { + obj *deviceIsisMultiInstance +} + +type marshalDeviceIsisMultiInstance interface { + // ToProto marshals DeviceIsisMultiInstance to protobuf object *otg.DeviceIsisMultiInstance + ToProto() (*otg.DeviceIsisMultiInstance, error) + // ToPbText marshals DeviceIsisMultiInstance to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceIsisMultiInstance to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceIsisMultiInstance to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceIsisMultiInstance struct { + obj *deviceIsisMultiInstance +} + +type unMarshalDeviceIsisMultiInstance interface { + // FromProto unmarshals DeviceIsisMultiInstance from protobuf object *otg.DeviceIsisMultiInstance + FromProto(msg *otg.DeviceIsisMultiInstance) (DeviceIsisMultiInstance, error) + // FromPbText unmarshals DeviceIsisMultiInstance from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceIsisMultiInstance from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceIsisMultiInstance from JSON text + FromJson(value string) error +} + +func (obj *deviceIsisMultiInstance) Marshal() marshalDeviceIsisMultiInstance { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceIsisMultiInstance{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceIsisMultiInstance) Unmarshal() unMarshalDeviceIsisMultiInstance { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceIsisMultiInstance{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceIsisMultiInstance) ToProto() (*otg.DeviceIsisMultiInstance, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceIsisMultiInstance) FromProto(msg *otg.DeviceIsisMultiInstance) (DeviceIsisMultiInstance, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceIsisMultiInstance) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceIsisMultiInstance) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceIsisMultiInstance) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIsisMultiInstance) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceIsisMultiInstance) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIsisMultiInstance) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceIsisMultiInstance) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceIsisMultiInstance) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceIsisMultiInstance) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceIsisMultiInstance) Clone() (DeviceIsisMultiInstance, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceIsisMultiInstance() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceIsisMultiInstance is this container properties of an Multi-Instance-capable router (MI-RTR). +type DeviceIsisMultiInstance interface { + Validation + // msg marshals DeviceIsisMultiInstance to protobuf object *otg.DeviceIsisMultiInstance + // and doesn't set defaults + msg() *otg.DeviceIsisMultiInstance + // setMsg unmarshals DeviceIsisMultiInstance from protobuf object *otg.DeviceIsisMultiInstance + // and doesn't set defaults + setMsg(*otg.DeviceIsisMultiInstance) DeviceIsisMultiInstance + // provides marshal interface + Marshal() marshalDeviceIsisMultiInstance + // provides unmarshal interface + Unmarshal() unMarshalDeviceIsisMultiInstance + // validate validates DeviceIsisMultiInstance + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceIsisMultiInstance, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Iid returns uint32, set in DeviceIsisMultiInstance. + Iid() uint32 + // SetIid assigns uint32 provided by user to DeviceIsisMultiInstance + SetIid(value uint32) DeviceIsisMultiInstance + // HasIid checks if Iid has been set in DeviceIsisMultiInstance + HasIid() bool + // Itids returns []uint32, set in DeviceIsisMultiInstance. + Itids() []uint32 + // SetItids assigns []uint32 provided by user to DeviceIsisMultiInstance + SetItids(value []uint32) DeviceIsisMultiInstance +} + +// Instance Identifier (IID) TLV will associate a PDU with an ISIS instance by using a unique 16-bit number and including one or more Instance-Specific Topology Identifiers (ITIDs). +// Iid returns a uint32 +func (obj *deviceIsisMultiInstance) Iid() uint32 { + + return *obj.obj.Iid + +} + +// Instance Identifier (IID) TLV will associate a PDU with an ISIS instance by using a unique 16-bit number and including one or more Instance-Specific Topology Identifiers (ITIDs). +// Iid returns a uint32 +func (obj *deviceIsisMultiInstance) HasIid() bool { + return obj.obj.Iid != nil +} + +// Instance Identifier (IID) TLV will associate a PDU with an ISIS instance by using a unique 16-bit number and including one or more Instance-Specific Topology Identifiers (ITIDs). +// SetIid sets the uint32 value in the DeviceIsisMultiInstance object +func (obj *deviceIsisMultiInstance) SetIid(value uint32) DeviceIsisMultiInstance { + + obj.obj.Iid = &value + return obj +} + +// This contains one or more ITIDs that will be advertised in IID TLV. +// Itids returns a []uint32 +func (obj *deviceIsisMultiInstance) Itids() []uint32 { + if obj.obj.Itids == nil { + obj.obj.Itids = make([]uint32, 0) + } + return obj.obj.Itids +} + +// This contains one or more ITIDs that will be advertised in IID TLV. +// SetItids sets the []uint32 value in the DeviceIsisMultiInstance object +func (obj *deviceIsisMultiInstance) SetItids(value []uint32) DeviceIsisMultiInstance { + + if obj.obj.Itids == nil { + obj.obj.Itids = make([]uint32, 0) + } + obj.obj.Itids = value + + return obj +} + +func (obj *deviceIsisMultiInstance) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Iid != nil { + + if *obj.obj.Iid > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= DeviceIsisMultiInstance.Iid <= 65535 but Got %d", *obj.obj.Iid)) + } + + } + + if obj.obj.Itids != nil { + + for _, item := range obj.obj.Itids { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= DeviceIsisMultiInstance.Itids <= 65535 but Got %d", item)) + } + + } + + } + +} + +func (obj *deviceIsisMultiInstance) setDefault() { + if obj.obj.Iid == nil { + obj.SetIid(1) + } + +} diff --git a/gosnappi/device_isis_router.go b/gosnappi/device_isis_router.go new file mode 100644 index 00000000..31d3232a --- /dev/null +++ b/gosnappi/device_isis_router.go @@ -0,0 +1,829 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceIsisRouter ***** +type deviceIsisRouter struct { + validation + obj *otg.DeviceIsisRouter + marshaller marshalDeviceIsisRouter + unMarshaller unMarshalDeviceIsisRouter + instanceHolder DeviceIsisMultiInstance + interfacesHolder DeviceIsisRouterIsisInterfaceIter + basicHolder IsisBasic + advancedHolder IsisAdvanced + routerAuthHolder IsisAuthentication + v4RoutesHolder DeviceIsisRouterIsisV4RouteRangeIter + v6RoutesHolder DeviceIsisRouterIsisV6RouteRangeIter +} + +func NewDeviceIsisRouter() DeviceIsisRouter { + obj := deviceIsisRouter{obj: &otg.DeviceIsisRouter{}} + obj.setDefault() + return &obj +} + +func (obj *deviceIsisRouter) msg() *otg.DeviceIsisRouter { + return obj.obj +} + +func (obj *deviceIsisRouter) setMsg(msg *otg.DeviceIsisRouter) DeviceIsisRouter { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceIsisRouter struct { + obj *deviceIsisRouter +} + +type marshalDeviceIsisRouter interface { + // ToProto marshals DeviceIsisRouter to protobuf object *otg.DeviceIsisRouter + ToProto() (*otg.DeviceIsisRouter, error) + // ToPbText marshals DeviceIsisRouter to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceIsisRouter to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceIsisRouter to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceIsisRouter struct { + obj *deviceIsisRouter +} + +type unMarshalDeviceIsisRouter interface { + // FromProto unmarshals DeviceIsisRouter from protobuf object *otg.DeviceIsisRouter + FromProto(msg *otg.DeviceIsisRouter) (DeviceIsisRouter, error) + // FromPbText unmarshals DeviceIsisRouter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceIsisRouter from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceIsisRouter from JSON text + FromJson(value string) error +} + +func (obj *deviceIsisRouter) Marshal() marshalDeviceIsisRouter { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceIsisRouter{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceIsisRouter) Unmarshal() unMarshalDeviceIsisRouter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceIsisRouter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceIsisRouter) ToProto() (*otg.DeviceIsisRouter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceIsisRouter) FromProto(msg *otg.DeviceIsisRouter) (DeviceIsisRouter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceIsisRouter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceIsisRouter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceIsisRouter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIsisRouter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceIsisRouter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceIsisRouter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceIsisRouter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceIsisRouter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceIsisRouter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceIsisRouter) Clone() (DeviceIsisRouter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceIsisRouter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceIsisRouter) setNil() { + obj.instanceHolder = nil + obj.interfacesHolder = nil + obj.basicHolder = nil + obj.advancedHolder = nil + obj.routerAuthHolder = nil + obj.v4RoutesHolder = nil + obj.v6RoutesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceIsisRouter is a container of properties for an ISIS router and its interfaces. +type DeviceIsisRouter interface { + Validation + // msg marshals DeviceIsisRouter to protobuf object *otg.DeviceIsisRouter + // and doesn't set defaults + msg() *otg.DeviceIsisRouter + // setMsg unmarshals DeviceIsisRouter from protobuf object *otg.DeviceIsisRouter + // and doesn't set defaults + setMsg(*otg.DeviceIsisRouter) DeviceIsisRouter + // provides marshal interface + Marshal() marshalDeviceIsisRouter + // provides unmarshal interface + Unmarshal() unMarshalDeviceIsisRouter + // validate validates DeviceIsisRouter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceIsisRouter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Instance returns DeviceIsisMultiInstance, set in DeviceIsisRouter. + // DeviceIsisMultiInstance is this container properties of an Multi-Instance-capable router (MI-RTR). + Instance() DeviceIsisMultiInstance + // SetInstance assigns DeviceIsisMultiInstance provided by user to DeviceIsisRouter. + // DeviceIsisMultiInstance is this container properties of an Multi-Instance-capable router (MI-RTR). + SetInstance(value DeviceIsisMultiInstance) DeviceIsisRouter + // HasInstance checks if Instance has been set in DeviceIsisRouter + HasInstance() bool + // SystemId returns string, set in DeviceIsisRouter. + SystemId() string + // SetSystemId assigns string provided by user to DeviceIsisRouter + SetSystemId(value string) DeviceIsisRouter + // Interfaces returns DeviceIsisRouterIsisInterfaceIterIter, set in DeviceIsisRouter + Interfaces() DeviceIsisRouterIsisInterfaceIter + // Basic returns IsisBasic, set in DeviceIsisRouter. + // IsisBasic is this contains ISIS router basic properties. + Basic() IsisBasic + // SetBasic assigns IsisBasic provided by user to DeviceIsisRouter. + // IsisBasic is this contains ISIS router basic properties. + SetBasic(value IsisBasic) DeviceIsisRouter + // HasBasic checks if Basic has been set in DeviceIsisRouter + HasBasic() bool + // Advanced returns IsisAdvanced, set in DeviceIsisRouter. + // IsisAdvanced is contains ISIS router advanced properties. + Advanced() IsisAdvanced + // SetAdvanced assigns IsisAdvanced provided by user to DeviceIsisRouter. + // IsisAdvanced is contains ISIS router advanced properties. + SetAdvanced(value IsisAdvanced) DeviceIsisRouter + // HasAdvanced checks if Advanced has been set in DeviceIsisRouter + HasAdvanced() bool + // RouterAuth returns IsisAuthentication, set in DeviceIsisRouter. + // IsisAuthentication is this contains ISIS Area/Domain authentication properties. + RouterAuth() IsisAuthentication + // SetRouterAuth assigns IsisAuthentication provided by user to DeviceIsisRouter. + // IsisAuthentication is this contains ISIS Area/Domain authentication properties. + SetRouterAuth(value IsisAuthentication) DeviceIsisRouter + // HasRouterAuth checks if RouterAuth has been set in DeviceIsisRouter + HasRouterAuth() bool + // V4Routes returns DeviceIsisRouterIsisV4RouteRangeIterIter, set in DeviceIsisRouter + V4Routes() DeviceIsisRouterIsisV4RouteRangeIter + // V6Routes returns DeviceIsisRouterIsisV6RouteRangeIterIter, set in DeviceIsisRouter + V6Routes() DeviceIsisRouterIsisV6RouteRangeIter + // Name returns string, set in DeviceIsisRouter. + Name() string + // SetName assigns string provided by user to DeviceIsisRouter + SetName(value string) DeviceIsisRouter + setNil() +} + +// This contains the properties of a Multi-Instance-capable routers or MI-RTR. Each router can emulate one ISIS instance at a time. +// Instance returns a DeviceIsisMultiInstance +func (obj *deviceIsisRouter) Instance() DeviceIsisMultiInstance { + if obj.obj.Instance == nil { + obj.obj.Instance = NewDeviceIsisMultiInstance().msg() + } + if obj.instanceHolder == nil { + obj.instanceHolder = &deviceIsisMultiInstance{obj: obj.obj.Instance} + } + return obj.instanceHolder +} + +// This contains the properties of a Multi-Instance-capable routers or MI-RTR. Each router can emulate one ISIS instance at a time. +// Instance returns a DeviceIsisMultiInstance +func (obj *deviceIsisRouter) HasInstance() bool { + return obj.obj.Instance != nil +} + +// This contains the properties of a Multi-Instance-capable routers or MI-RTR. Each router can emulate one ISIS instance at a time. +// SetInstance sets the DeviceIsisMultiInstance value in the DeviceIsisRouter object +func (obj *deviceIsisRouter) SetInstance(value DeviceIsisMultiInstance) DeviceIsisRouter { + + obj.instanceHolder = nil + obj.obj.Instance = value.msg() + + return obj +} + +// The System ID for this emulated ISIS router, e.g. "640100010000". +// SystemId returns a string +func (obj *deviceIsisRouter) SystemId() string { + + return *obj.obj.SystemId + +} + +// The System ID for this emulated ISIS router, e.g. "640100010000". +// SetSystemId sets the string value in the DeviceIsisRouter object +func (obj *deviceIsisRouter) SetSystemId(value string) DeviceIsisRouter { + + obj.obj.SystemId = &value + return obj +} + +// List of ISIS interfaces for this router. +// Interfaces returns a []IsisInterface +func (obj *deviceIsisRouter) Interfaces() DeviceIsisRouterIsisInterfaceIter { + if len(obj.obj.Interfaces) == 0 { + obj.obj.Interfaces = []*otg.IsisInterface{} + } + if obj.interfacesHolder == nil { + obj.interfacesHolder = newDeviceIsisRouterIsisInterfaceIter(&obj.obj.Interfaces).setMsg(obj) + } + return obj.interfacesHolder +} + +type deviceIsisRouterIsisInterfaceIter struct { + obj *deviceIsisRouter + isisInterfaceSlice []IsisInterface + fieldPtr *[]*otg.IsisInterface +} + +func newDeviceIsisRouterIsisInterfaceIter(ptr *[]*otg.IsisInterface) DeviceIsisRouterIsisInterfaceIter { + return &deviceIsisRouterIsisInterfaceIter{fieldPtr: ptr} +} + +type DeviceIsisRouterIsisInterfaceIter interface { + setMsg(*deviceIsisRouter) DeviceIsisRouterIsisInterfaceIter + Items() []IsisInterface + Add() IsisInterface + Append(items ...IsisInterface) DeviceIsisRouterIsisInterfaceIter + Set(index int, newObj IsisInterface) DeviceIsisRouterIsisInterfaceIter + Clear() DeviceIsisRouterIsisInterfaceIter + clearHolderSlice() DeviceIsisRouterIsisInterfaceIter + appendHolderSlice(item IsisInterface) DeviceIsisRouterIsisInterfaceIter +} + +func (obj *deviceIsisRouterIsisInterfaceIter) setMsg(msg *deviceIsisRouter) DeviceIsisRouterIsisInterfaceIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisInterface{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceIsisRouterIsisInterfaceIter) Items() []IsisInterface { + return obj.isisInterfaceSlice +} + +func (obj *deviceIsisRouterIsisInterfaceIter) Add() IsisInterface { + newObj := &otg.IsisInterface{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisInterface{obj: newObj} + newLibObj.setDefault() + obj.isisInterfaceSlice = append(obj.isisInterfaceSlice, newLibObj) + return newLibObj +} + +func (obj *deviceIsisRouterIsisInterfaceIter) Append(items ...IsisInterface) DeviceIsisRouterIsisInterfaceIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisInterfaceSlice = append(obj.isisInterfaceSlice, item) + } + return obj +} + +func (obj *deviceIsisRouterIsisInterfaceIter) Set(index int, newObj IsisInterface) DeviceIsisRouterIsisInterfaceIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisInterfaceSlice[index] = newObj + return obj +} +func (obj *deviceIsisRouterIsisInterfaceIter) Clear() DeviceIsisRouterIsisInterfaceIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisInterface{} + obj.isisInterfaceSlice = []IsisInterface{} + } + return obj +} +func (obj *deviceIsisRouterIsisInterfaceIter) clearHolderSlice() DeviceIsisRouterIsisInterfaceIter { + if len(obj.isisInterfaceSlice) > 0 { + obj.isisInterfaceSlice = []IsisInterface{} + } + return obj +} +func (obj *deviceIsisRouterIsisInterfaceIter) appendHolderSlice(item IsisInterface) DeviceIsisRouterIsisInterfaceIter { + obj.isisInterfaceSlice = append(obj.isisInterfaceSlice, item) + return obj +} + +// Contains basic properties of an ISIS Router. +// Basic returns a IsisBasic +func (obj *deviceIsisRouter) Basic() IsisBasic { + if obj.obj.Basic == nil { + obj.obj.Basic = NewIsisBasic().msg() + } + if obj.basicHolder == nil { + obj.basicHolder = &isisBasic{obj: obj.obj.Basic} + } + return obj.basicHolder +} + +// Contains basic properties of an ISIS Router. +// Basic returns a IsisBasic +func (obj *deviceIsisRouter) HasBasic() bool { + return obj.obj.Basic != nil +} + +// Contains basic properties of an ISIS Router. +// SetBasic sets the IsisBasic value in the DeviceIsisRouter object +func (obj *deviceIsisRouter) SetBasic(value IsisBasic) DeviceIsisRouter { + + obj.basicHolder = nil + obj.obj.Basic = value.msg() + + return obj +} + +// Contains advance properties of an ISIS Router.. +// Advanced returns a IsisAdvanced +func (obj *deviceIsisRouter) Advanced() IsisAdvanced { + if obj.obj.Advanced == nil { + obj.obj.Advanced = NewIsisAdvanced().msg() + } + if obj.advancedHolder == nil { + obj.advancedHolder = &isisAdvanced{obj: obj.obj.Advanced} + } + return obj.advancedHolder +} + +// Contains advance properties of an ISIS Router.. +// Advanced returns a IsisAdvanced +func (obj *deviceIsisRouter) HasAdvanced() bool { + return obj.obj.Advanced != nil +} + +// Contains advance properties of an ISIS Router.. +// SetAdvanced sets the IsisAdvanced value in the DeviceIsisRouter object +func (obj *deviceIsisRouter) SetAdvanced(value IsisAdvanced) DeviceIsisRouter { + + obj.advancedHolder = nil + obj.obj.Advanced = value.msg() + + return obj +} + +// ISIS Router authentication properties. +// RouterAuth returns a IsisAuthentication +func (obj *deviceIsisRouter) RouterAuth() IsisAuthentication { + if obj.obj.RouterAuth == nil { + obj.obj.RouterAuth = NewIsisAuthentication().msg() + } + if obj.routerAuthHolder == nil { + obj.routerAuthHolder = &isisAuthentication{obj: obj.obj.RouterAuth} + } + return obj.routerAuthHolder +} + +// ISIS Router authentication properties. +// RouterAuth returns a IsisAuthentication +func (obj *deviceIsisRouter) HasRouterAuth() bool { + return obj.obj.RouterAuth != nil +} + +// ISIS Router authentication properties. +// SetRouterAuth sets the IsisAuthentication value in the DeviceIsisRouter object +func (obj *deviceIsisRouter) SetRouterAuth(value IsisAuthentication) DeviceIsisRouter { + + obj.routerAuthHolder = nil + obj.obj.RouterAuth = value.msg() + + return obj +} + +// Emulated ISIS IPv4 routes. +// V4Routes returns a []IsisV4RouteRange +func (obj *deviceIsisRouter) V4Routes() DeviceIsisRouterIsisV4RouteRangeIter { + if len(obj.obj.V4Routes) == 0 { + obj.obj.V4Routes = []*otg.IsisV4RouteRange{} + } + if obj.v4RoutesHolder == nil { + obj.v4RoutesHolder = newDeviceIsisRouterIsisV4RouteRangeIter(&obj.obj.V4Routes).setMsg(obj) + } + return obj.v4RoutesHolder +} + +type deviceIsisRouterIsisV4RouteRangeIter struct { + obj *deviceIsisRouter + isisV4RouteRangeSlice []IsisV4RouteRange + fieldPtr *[]*otg.IsisV4RouteRange +} + +func newDeviceIsisRouterIsisV4RouteRangeIter(ptr *[]*otg.IsisV4RouteRange) DeviceIsisRouterIsisV4RouteRangeIter { + return &deviceIsisRouterIsisV4RouteRangeIter{fieldPtr: ptr} +} + +type DeviceIsisRouterIsisV4RouteRangeIter interface { + setMsg(*deviceIsisRouter) DeviceIsisRouterIsisV4RouteRangeIter + Items() []IsisV4RouteRange + Add() IsisV4RouteRange + Append(items ...IsisV4RouteRange) DeviceIsisRouterIsisV4RouteRangeIter + Set(index int, newObj IsisV4RouteRange) DeviceIsisRouterIsisV4RouteRangeIter + Clear() DeviceIsisRouterIsisV4RouteRangeIter + clearHolderSlice() DeviceIsisRouterIsisV4RouteRangeIter + appendHolderSlice(item IsisV4RouteRange) DeviceIsisRouterIsisV4RouteRangeIter +} + +func (obj *deviceIsisRouterIsisV4RouteRangeIter) setMsg(msg *deviceIsisRouter) DeviceIsisRouterIsisV4RouteRangeIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisV4RouteRange{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceIsisRouterIsisV4RouteRangeIter) Items() []IsisV4RouteRange { + return obj.isisV4RouteRangeSlice +} + +func (obj *deviceIsisRouterIsisV4RouteRangeIter) Add() IsisV4RouteRange { + newObj := &otg.IsisV4RouteRange{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisV4RouteRange{obj: newObj} + newLibObj.setDefault() + obj.isisV4RouteRangeSlice = append(obj.isisV4RouteRangeSlice, newLibObj) + return newLibObj +} + +func (obj *deviceIsisRouterIsisV4RouteRangeIter) Append(items ...IsisV4RouteRange) DeviceIsisRouterIsisV4RouteRangeIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisV4RouteRangeSlice = append(obj.isisV4RouteRangeSlice, item) + } + return obj +} + +func (obj *deviceIsisRouterIsisV4RouteRangeIter) Set(index int, newObj IsisV4RouteRange) DeviceIsisRouterIsisV4RouteRangeIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisV4RouteRangeSlice[index] = newObj + return obj +} +func (obj *deviceIsisRouterIsisV4RouteRangeIter) Clear() DeviceIsisRouterIsisV4RouteRangeIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisV4RouteRange{} + obj.isisV4RouteRangeSlice = []IsisV4RouteRange{} + } + return obj +} +func (obj *deviceIsisRouterIsisV4RouteRangeIter) clearHolderSlice() DeviceIsisRouterIsisV4RouteRangeIter { + if len(obj.isisV4RouteRangeSlice) > 0 { + obj.isisV4RouteRangeSlice = []IsisV4RouteRange{} + } + return obj +} +func (obj *deviceIsisRouterIsisV4RouteRangeIter) appendHolderSlice(item IsisV4RouteRange) DeviceIsisRouterIsisV4RouteRangeIter { + obj.isisV4RouteRangeSlice = append(obj.isisV4RouteRangeSlice, item) + return obj +} + +// Emulated ISIS IPv6 routes. +// V6Routes returns a []IsisV6RouteRange +func (obj *deviceIsisRouter) V6Routes() DeviceIsisRouterIsisV6RouteRangeIter { + if len(obj.obj.V6Routes) == 0 { + obj.obj.V6Routes = []*otg.IsisV6RouteRange{} + } + if obj.v6RoutesHolder == nil { + obj.v6RoutesHolder = newDeviceIsisRouterIsisV6RouteRangeIter(&obj.obj.V6Routes).setMsg(obj) + } + return obj.v6RoutesHolder +} + +type deviceIsisRouterIsisV6RouteRangeIter struct { + obj *deviceIsisRouter + isisV6RouteRangeSlice []IsisV6RouteRange + fieldPtr *[]*otg.IsisV6RouteRange +} + +func newDeviceIsisRouterIsisV6RouteRangeIter(ptr *[]*otg.IsisV6RouteRange) DeviceIsisRouterIsisV6RouteRangeIter { + return &deviceIsisRouterIsisV6RouteRangeIter{fieldPtr: ptr} +} + +type DeviceIsisRouterIsisV6RouteRangeIter interface { + setMsg(*deviceIsisRouter) DeviceIsisRouterIsisV6RouteRangeIter + Items() []IsisV6RouteRange + Add() IsisV6RouteRange + Append(items ...IsisV6RouteRange) DeviceIsisRouterIsisV6RouteRangeIter + Set(index int, newObj IsisV6RouteRange) DeviceIsisRouterIsisV6RouteRangeIter + Clear() DeviceIsisRouterIsisV6RouteRangeIter + clearHolderSlice() DeviceIsisRouterIsisV6RouteRangeIter + appendHolderSlice(item IsisV6RouteRange) DeviceIsisRouterIsisV6RouteRangeIter +} + +func (obj *deviceIsisRouterIsisV6RouteRangeIter) setMsg(msg *deviceIsisRouter) DeviceIsisRouterIsisV6RouteRangeIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisV6RouteRange{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceIsisRouterIsisV6RouteRangeIter) Items() []IsisV6RouteRange { + return obj.isisV6RouteRangeSlice +} + +func (obj *deviceIsisRouterIsisV6RouteRangeIter) Add() IsisV6RouteRange { + newObj := &otg.IsisV6RouteRange{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisV6RouteRange{obj: newObj} + newLibObj.setDefault() + obj.isisV6RouteRangeSlice = append(obj.isisV6RouteRangeSlice, newLibObj) + return newLibObj +} + +func (obj *deviceIsisRouterIsisV6RouteRangeIter) Append(items ...IsisV6RouteRange) DeviceIsisRouterIsisV6RouteRangeIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisV6RouteRangeSlice = append(obj.isisV6RouteRangeSlice, item) + } + return obj +} + +func (obj *deviceIsisRouterIsisV6RouteRangeIter) Set(index int, newObj IsisV6RouteRange) DeviceIsisRouterIsisV6RouteRangeIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisV6RouteRangeSlice[index] = newObj + return obj +} +func (obj *deviceIsisRouterIsisV6RouteRangeIter) Clear() DeviceIsisRouterIsisV6RouteRangeIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisV6RouteRange{} + obj.isisV6RouteRangeSlice = []IsisV6RouteRange{} + } + return obj +} +func (obj *deviceIsisRouterIsisV6RouteRangeIter) clearHolderSlice() DeviceIsisRouterIsisV6RouteRangeIter { + if len(obj.isisV6RouteRangeSlice) > 0 { + obj.isisV6RouteRangeSlice = []IsisV6RouteRange{} + } + return obj +} +func (obj *deviceIsisRouterIsisV6RouteRangeIter) appendHolderSlice(item IsisV6RouteRange) DeviceIsisRouterIsisV6RouteRangeIter { + obj.isisV6RouteRangeSlice = append(obj.isisV6RouteRangeSlice, item) + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *deviceIsisRouter) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DeviceIsisRouter object +func (obj *deviceIsisRouter) SetName(value string) DeviceIsisRouter { + + obj.obj.Name = &value + return obj +} + +func (obj *deviceIsisRouter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Instance != nil { + + obj.Instance().validateObj(vObj, set_default) + } + + // SystemId is required + if obj.obj.SystemId == nil { + vObj.validationErrors = append(vObj.validationErrors, "SystemId is required field on interface DeviceIsisRouter") + } + if obj.obj.SystemId != nil { + + err := obj.validateHex(obj.SystemId()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DeviceIsisRouter.SystemId")) + } + + } + + if len(obj.obj.Interfaces) != 0 { + + if set_default { + obj.Interfaces().clearHolderSlice() + for _, item := range obj.obj.Interfaces { + obj.Interfaces().appendHolderSlice(&isisInterface{obj: item}) + } + } + for _, item := range obj.Interfaces().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Basic != nil { + + obj.Basic().validateObj(vObj, set_default) + } + + if obj.obj.Advanced != nil { + + obj.Advanced().validateObj(vObj, set_default) + } + + if obj.obj.RouterAuth != nil { + + obj.RouterAuth().validateObj(vObj, set_default) + } + + if len(obj.obj.V4Routes) != 0 { + + if set_default { + obj.V4Routes().clearHolderSlice() + for _, item := range obj.obj.V4Routes { + obj.V4Routes().appendHolderSlice(&isisV4RouteRange{obj: item}) + } + } + for _, item := range obj.V4Routes().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.V6Routes) != 0 { + + if set_default { + obj.V6Routes().clearHolderSlice() + for _, item := range obj.obj.V6Routes { + obj.V6Routes().appendHolderSlice(&isisV6RouteRange{obj: item}) + } + } + for _, item := range obj.V6Routes().Items() { + item.validateObj(vObj, set_default) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface DeviceIsisRouter") + } +} + +func (obj *deviceIsisRouter) setDefault() { + +} diff --git a/gosnappi/device_ospfv2_router.go b/gosnappi/device_ospfv2_router.go new file mode 100644 index 00000000..457c51d1 --- /dev/null +++ b/gosnappi/device_ospfv2_router.go @@ -0,0 +1,852 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceOspfv2Router ***** +type deviceOspfv2Router struct { + validation + obj *otg.DeviceOspfv2Router + marshaller marshalDeviceOspfv2Router + unMarshaller unMarshalDeviceOspfv2Router + routerIdHolder Ospfv2RouterId + gracefulRestartHolder Ospfv2GracefulRestart + capabilitiesHolder Ospfv2Options + interfacesHolder DeviceOspfv2RouterOspfv2InterfaceIter + v4RoutesHolder DeviceOspfv2RouterOspfv2V4RouteRangeIter +} + +func NewDeviceOspfv2Router() DeviceOspfv2Router { + obj := deviceOspfv2Router{obj: &otg.DeviceOspfv2Router{}} + obj.setDefault() + return &obj +} + +func (obj *deviceOspfv2Router) msg() *otg.DeviceOspfv2Router { + return obj.obj +} + +func (obj *deviceOspfv2Router) setMsg(msg *otg.DeviceOspfv2Router) DeviceOspfv2Router { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceOspfv2Router struct { + obj *deviceOspfv2Router +} + +type marshalDeviceOspfv2Router interface { + // ToProto marshals DeviceOspfv2Router to protobuf object *otg.DeviceOspfv2Router + ToProto() (*otg.DeviceOspfv2Router, error) + // ToPbText marshals DeviceOspfv2Router to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceOspfv2Router to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceOspfv2Router to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceOspfv2Router struct { + obj *deviceOspfv2Router +} + +type unMarshalDeviceOspfv2Router interface { + // FromProto unmarshals DeviceOspfv2Router from protobuf object *otg.DeviceOspfv2Router + FromProto(msg *otg.DeviceOspfv2Router) (DeviceOspfv2Router, error) + // FromPbText unmarshals DeviceOspfv2Router from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceOspfv2Router from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceOspfv2Router from JSON text + FromJson(value string) error +} + +func (obj *deviceOspfv2Router) Marshal() marshalDeviceOspfv2Router { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceOspfv2Router{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceOspfv2Router) Unmarshal() unMarshalDeviceOspfv2Router { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceOspfv2Router{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceOspfv2Router) ToProto() (*otg.DeviceOspfv2Router, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceOspfv2Router) FromProto(msg *otg.DeviceOspfv2Router) (DeviceOspfv2Router, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceOspfv2Router) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceOspfv2Router) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceOspfv2Router) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceOspfv2Router) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceOspfv2Router) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceOspfv2Router) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceOspfv2Router) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceOspfv2Router) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceOspfv2Router) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceOspfv2Router) Clone() (DeviceOspfv2Router, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceOspfv2Router() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceOspfv2Router) setNil() { + obj.routerIdHolder = nil + obj.gracefulRestartHolder = nil + obj.capabilitiesHolder = nil + obj.interfacesHolder = nil + obj.v4RoutesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceOspfv2Router is under Review: OSPFv2 is currently under review for pending exploration on use cases. +// +// Under Review: OSPFv2 is currently under review for pending exploration on use cases. +// +// A container of properties for an OSPFv2 router and its interfaces & Route Ranges. +type DeviceOspfv2Router interface { + Validation + // msg marshals DeviceOspfv2Router to protobuf object *otg.DeviceOspfv2Router + // and doesn't set defaults + msg() *otg.DeviceOspfv2Router + // setMsg unmarshals DeviceOspfv2Router from protobuf object *otg.DeviceOspfv2Router + // and doesn't set defaults + setMsg(*otg.DeviceOspfv2Router) DeviceOspfv2Router + // provides marshal interface + Marshal() marshalDeviceOspfv2Router + // provides unmarshal interface + Unmarshal() unMarshalDeviceOspfv2Router + // validate validates DeviceOspfv2Router + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceOspfv2Router, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in DeviceOspfv2Router. + Name() string + // SetName assigns string provided by user to DeviceOspfv2Router + SetName(value string) DeviceOspfv2Router + // RouterId returns Ospfv2RouterId, set in DeviceOspfv2Router. + // Ospfv2RouterId is container for OSPFv2 Router ID configuration. + RouterId() Ospfv2RouterId + // SetRouterId assigns Ospfv2RouterId provided by user to DeviceOspfv2Router. + // Ospfv2RouterId is container for OSPFv2 Router ID configuration. + SetRouterId(value Ospfv2RouterId) DeviceOspfv2Router + // HasRouterId checks if RouterId has been set in DeviceOspfv2Router + HasRouterId() bool + // LsaRetransmitTime returns uint32, set in DeviceOspfv2Router. + LsaRetransmitTime() uint32 + // SetLsaRetransmitTime assigns uint32 provided by user to DeviceOspfv2Router + SetLsaRetransmitTime(value uint32) DeviceOspfv2Router + // HasLsaRetransmitTime checks if LsaRetransmitTime has been set in DeviceOspfv2Router + HasLsaRetransmitTime() bool + // LsaRefreshTime returns uint32, set in DeviceOspfv2Router. + LsaRefreshTime() uint32 + // SetLsaRefreshTime assigns uint32 provided by user to DeviceOspfv2Router + SetLsaRefreshTime(value uint32) DeviceOspfv2Router + // HasLsaRefreshTime checks if LsaRefreshTime has been set in DeviceOspfv2Router + HasLsaRefreshTime() bool + // InterBurstLsuInterval returns uint32, set in DeviceOspfv2Router. + InterBurstLsuInterval() uint32 + // SetInterBurstLsuInterval assigns uint32 provided by user to DeviceOspfv2Router + SetInterBurstLsuInterval(value uint32) DeviceOspfv2Router + // HasInterBurstLsuInterval checks if InterBurstLsuInterval has been set in DeviceOspfv2Router + HasInterBurstLsuInterval() bool + // MaxFloodLsuPerBurst returns uint32, set in DeviceOspfv2Router. + MaxFloodLsuPerBurst() uint32 + // SetMaxFloodLsuPerBurst assigns uint32 provided by user to DeviceOspfv2Router + SetMaxFloodLsuPerBurst(value uint32) DeviceOspfv2Router + // HasMaxFloodLsuPerBurst checks if MaxFloodLsuPerBurst has been set in DeviceOspfv2Router + HasMaxFloodLsuPerBurst() bool + // GracefulRestart returns Ospfv2GracefulRestart, set in DeviceOspfv2Router. + // Ospfv2GracefulRestart is container of properties of OSPFv2 Graceful Retstart. + GracefulRestart() Ospfv2GracefulRestart + // SetGracefulRestart assigns Ospfv2GracefulRestart provided by user to DeviceOspfv2Router. + // Ospfv2GracefulRestart is container of properties of OSPFv2 Graceful Retstart. + SetGracefulRestart(value Ospfv2GracefulRestart) DeviceOspfv2Router + // HasGracefulRestart checks if GracefulRestart has been set in DeviceOspfv2Router + HasGracefulRestart() bool + // StoreLsa returns bool, set in DeviceOspfv2Router. + StoreLsa() bool + // SetStoreLsa assigns bool provided by user to DeviceOspfv2Router + SetStoreLsa(value bool) DeviceOspfv2Router + // HasStoreLsa checks if StoreLsa has been set in DeviceOspfv2Router + HasStoreLsa() bool + // Capabilities returns Ospfv2Options, set in DeviceOspfv2Router. + // Ospfv2Options is the OSPFv2 Options field is present Database Description packets and all LSAs. + // This enables OSPF routers to support (or not support) optional capabilities, + // and to communicate their capability level to other OSPF routers. + // When capabilities are exchanged in Database Description packets a + // router can choose not to forward certain LSAs to a neighbor because + // of its reduced functionality. + // Reference: A.2 The Options field: https://www.rfc-editor.org/rfc/rfc2328#page-46. + Capabilities() Ospfv2Options + // SetCapabilities assigns Ospfv2Options provided by user to DeviceOspfv2Router. + // Ospfv2Options is the OSPFv2 Options field is present Database Description packets and all LSAs. + // This enables OSPF routers to support (or not support) optional capabilities, + // and to communicate their capability level to other OSPF routers. + // When capabilities are exchanged in Database Description packets a + // router can choose not to forward certain LSAs to a neighbor because + // of its reduced functionality. + // Reference: A.2 The Options field: https://www.rfc-editor.org/rfc/rfc2328#page-46. + SetCapabilities(value Ospfv2Options) DeviceOspfv2Router + // HasCapabilities checks if Capabilities has been set in DeviceOspfv2Router + HasCapabilities() bool + // Interfaces returns DeviceOspfv2RouterOspfv2InterfaceIterIter, set in DeviceOspfv2Router + Interfaces() DeviceOspfv2RouterOspfv2InterfaceIter + // V4Routes returns DeviceOspfv2RouterOspfv2V4RouteRangeIterIter, set in DeviceOspfv2Router + V4Routes() DeviceOspfv2RouterOspfv2V4RouteRangeIter + setNil() +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *deviceOspfv2Router) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DeviceOspfv2Router object +func (obj *deviceOspfv2Router) SetName(value string) DeviceOspfv2Router { + + obj.obj.Name = &value + return obj +} + +// OSPFv2 Router Id. +// RouterId returns a Ospfv2RouterId +func (obj *deviceOspfv2Router) RouterId() Ospfv2RouterId { + if obj.obj.RouterId == nil { + obj.obj.RouterId = NewOspfv2RouterId().msg() + } + if obj.routerIdHolder == nil { + obj.routerIdHolder = &ospfv2RouterId{obj: obj.obj.RouterId} + } + return obj.routerIdHolder +} + +// OSPFv2 Router Id. +// RouterId returns a Ospfv2RouterId +func (obj *deviceOspfv2Router) HasRouterId() bool { + return obj.obj.RouterId != nil +} + +// OSPFv2 Router Id. +// SetRouterId sets the Ospfv2RouterId value in the DeviceOspfv2Router object +func (obj *deviceOspfv2Router) SetRouterId(value Ospfv2RouterId) DeviceOspfv2Router { + + obj.routerIdHolder = nil + obj.obj.RouterId = value.msg() + + return obj +} + +// The time in seconds for LSA retransmission. +// LsaRetransmitTime returns a uint32 +func (obj *deviceOspfv2Router) LsaRetransmitTime() uint32 { + + return *obj.obj.LsaRetransmitTime + +} + +// The time in seconds for LSA retransmission. +// LsaRetransmitTime returns a uint32 +func (obj *deviceOspfv2Router) HasLsaRetransmitTime() bool { + return obj.obj.LsaRetransmitTime != nil +} + +// The time in seconds for LSA retransmission. +// SetLsaRetransmitTime sets the uint32 value in the DeviceOspfv2Router object +func (obj *deviceOspfv2Router) SetLsaRetransmitTime(value uint32) DeviceOspfv2Router { + + obj.obj.LsaRetransmitTime = &value + return obj +} + +// The time in seconds required for LSA refresh. +// LsaRefreshTime returns a uint32 +func (obj *deviceOspfv2Router) LsaRefreshTime() uint32 { + + return *obj.obj.LsaRefreshTime + +} + +// The time in seconds required for LSA refresh. +// LsaRefreshTime returns a uint32 +func (obj *deviceOspfv2Router) HasLsaRefreshTime() bool { + return obj.obj.LsaRefreshTime != nil +} + +// The time in seconds required for LSA refresh. +// SetLsaRefreshTime sets the uint32 value in the DeviceOspfv2Router object +func (obj *deviceOspfv2Router) SetLsaRefreshTime(value uint32) DeviceOspfv2Router { + + obj.obj.LsaRefreshTime = &value + return obj +} + +// The gap in miliseconds between each Flood Link State Update Burst +// InterBurstLsuInterval returns a uint32 +func (obj *deviceOspfv2Router) InterBurstLsuInterval() uint32 { + + return *obj.obj.InterBurstLsuInterval + +} + +// The gap in miliseconds between each Flood Link State Update Burst +// InterBurstLsuInterval returns a uint32 +func (obj *deviceOspfv2Router) HasInterBurstLsuInterval() bool { + return obj.obj.InterBurstLsuInterval != nil +} + +// The gap in miliseconds between each Flood Link State Update Burst +// SetInterBurstLsuInterval sets the uint32 value in the DeviceOspfv2Router object +func (obj *deviceOspfv2Router) SetInterBurstLsuInterval(value uint32) DeviceOspfv2Router { + + obj.obj.InterBurstLsuInterval = &value + return obj +} + +// The maximum number of Flood LSUpdates for each burst +// MaxFloodLsuPerBurst returns a uint32 +func (obj *deviceOspfv2Router) MaxFloodLsuPerBurst() uint32 { + + return *obj.obj.MaxFloodLsuPerBurst + +} + +// The maximum number of Flood LSUpdates for each burst +// MaxFloodLsuPerBurst returns a uint32 +func (obj *deviceOspfv2Router) HasMaxFloodLsuPerBurst() bool { + return obj.obj.MaxFloodLsuPerBurst != nil +} + +// The maximum number of Flood LSUpdates for each burst +// SetMaxFloodLsuPerBurst sets the uint32 value in the DeviceOspfv2Router object +func (obj *deviceOspfv2Router) SetMaxFloodLsuPerBurst(value uint32) DeviceOspfv2Router { + + obj.obj.MaxFloodLsuPerBurst = &value + return obj +} + +// description is TBD +// GracefulRestart returns a Ospfv2GracefulRestart +func (obj *deviceOspfv2Router) GracefulRestart() Ospfv2GracefulRestart { + if obj.obj.GracefulRestart == nil { + obj.obj.GracefulRestart = NewOspfv2GracefulRestart().msg() + } + if obj.gracefulRestartHolder == nil { + obj.gracefulRestartHolder = &ospfv2GracefulRestart{obj: obj.obj.GracefulRestart} + } + return obj.gracefulRestartHolder +} + +// description is TBD +// GracefulRestart returns a Ospfv2GracefulRestart +func (obj *deviceOspfv2Router) HasGracefulRestart() bool { + return obj.obj.GracefulRestart != nil +} + +// description is TBD +// SetGracefulRestart sets the Ospfv2GracefulRestart value in the DeviceOspfv2Router object +func (obj *deviceOspfv2Router) SetGracefulRestart(value Ospfv2GracefulRestart) DeviceOspfv2Router { + + obj.gracefulRestartHolder = nil + obj.obj.GracefulRestart = value.msg() + + return obj +} + +// Configuration for controlling storage of OSPFv2 learned LSAs received from the neighbors. +// StoreLsa returns a bool +func (obj *deviceOspfv2Router) StoreLsa() bool { + + return *obj.obj.StoreLsa + +} + +// Configuration for controlling storage of OSPFv2 learned LSAs received from the neighbors. +// StoreLsa returns a bool +func (obj *deviceOspfv2Router) HasStoreLsa() bool { + return obj.obj.StoreLsa != nil +} + +// Configuration for controlling storage of OSPFv2 learned LSAs received from the neighbors. +// SetStoreLsa sets the bool value in the DeviceOspfv2Router object +func (obj *deviceOspfv2Router) SetStoreLsa(value bool) DeviceOspfv2Router { + + obj.obj.StoreLsa = &value + return obj +} + +// A router indicates the optional capabilities that it supports in its OSPF Hello packets, Database Description packets and in its LSAs. +// Capabilities returns a Ospfv2Options +func (obj *deviceOspfv2Router) Capabilities() Ospfv2Options { + if obj.obj.Capabilities == nil { + obj.obj.Capabilities = NewOspfv2Options().msg() + } + if obj.capabilitiesHolder == nil { + obj.capabilitiesHolder = &ospfv2Options{obj: obj.obj.Capabilities} + } + return obj.capabilitiesHolder +} + +// A router indicates the optional capabilities that it supports in its OSPF Hello packets, Database Description packets and in its LSAs. +// Capabilities returns a Ospfv2Options +func (obj *deviceOspfv2Router) HasCapabilities() bool { + return obj.obj.Capabilities != nil +} + +// A router indicates the optional capabilities that it supports in its OSPF Hello packets, Database Description packets and in its LSAs. +// SetCapabilities sets the Ospfv2Options value in the DeviceOspfv2Router object +func (obj *deviceOspfv2Router) SetCapabilities(value Ospfv2Options) DeviceOspfv2Router { + + obj.capabilitiesHolder = nil + obj.obj.Capabilities = value.msg() + + return obj +} + +// List of OSPFv2 interfaces for this router. +// Interfaces returns a []Ospfv2Interface +func (obj *deviceOspfv2Router) Interfaces() DeviceOspfv2RouterOspfv2InterfaceIter { + if len(obj.obj.Interfaces) == 0 { + obj.obj.Interfaces = []*otg.Ospfv2Interface{} + } + if obj.interfacesHolder == nil { + obj.interfacesHolder = newDeviceOspfv2RouterOspfv2InterfaceIter(&obj.obj.Interfaces).setMsg(obj) + } + return obj.interfacesHolder +} + +type deviceOspfv2RouterOspfv2InterfaceIter struct { + obj *deviceOspfv2Router + ospfv2InterfaceSlice []Ospfv2Interface + fieldPtr *[]*otg.Ospfv2Interface +} + +func newDeviceOspfv2RouterOspfv2InterfaceIter(ptr *[]*otg.Ospfv2Interface) DeviceOspfv2RouterOspfv2InterfaceIter { + return &deviceOspfv2RouterOspfv2InterfaceIter{fieldPtr: ptr} +} + +type DeviceOspfv2RouterOspfv2InterfaceIter interface { + setMsg(*deviceOspfv2Router) DeviceOspfv2RouterOspfv2InterfaceIter + Items() []Ospfv2Interface + Add() Ospfv2Interface + Append(items ...Ospfv2Interface) DeviceOspfv2RouterOspfv2InterfaceIter + Set(index int, newObj Ospfv2Interface) DeviceOspfv2RouterOspfv2InterfaceIter + Clear() DeviceOspfv2RouterOspfv2InterfaceIter + clearHolderSlice() DeviceOspfv2RouterOspfv2InterfaceIter + appendHolderSlice(item Ospfv2Interface) DeviceOspfv2RouterOspfv2InterfaceIter +} + +func (obj *deviceOspfv2RouterOspfv2InterfaceIter) setMsg(msg *deviceOspfv2Router) DeviceOspfv2RouterOspfv2InterfaceIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&ospfv2Interface{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceOspfv2RouterOspfv2InterfaceIter) Items() []Ospfv2Interface { + return obj.ospfv2InterfaceSlice +} + +func (obj *deviceOspfv2RouterOspfv2InterfaceIter) Add() Ospfv2Interface { + newObj := &otg.Ospfv2Interface{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &ospfv2Interface{obj: newObj} + newLibObj.setDefault() + obj.ospfv2InterfaceSlice = append(obj.ospfv2InterfaceSlice, newLibObj) + return newLibObj +} + +func (obj *deviceOspfv2RouterOspfv2InterfaceIter) Append(items ...Ospfv2Interface) DeviceOspfv2RouterOspfv2InterfaceIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.ospfv2InterfaceSlice = append(obj.ospfv2InterfaceSlice, item) + } + return obj +} + +func (obj *deviceOspfv2RouterOspfv2InterfaceIter) Set(index int, newObj Ospfv2Interface) DeviceOspfv2RouterOspfv2InterfaceIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.ospfv2InterfaceSlice[index] = newObj + return obj +} +func (obj *deviceOspfv2RouterOspfv2InterfaceIter) Clear() DeviceOspfv2RouterOspfv2InterfaceIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Ospfv2Interface{} + obj.ospfv2InterfaceSlice = []Ospfv2Interface{} + } + return obj +} +func (obj *deviceOspfv2RouterOspfv2InterfaceIter) clearHolderSlice() DeviceOspfv2RouterOspfv2InterfaceIter { + if len(obj.ospfv2InterfaceSlice) > 0 { + obj.ospfv2InterfaceSlice = []Ospfv2Interface{} + } + return obj +} +func (obj *deviceOspfv2RouterOspfv2InterfaceIter) appendHolderSlice(item Ospfv2Interface) DeviceOspfv2RouterOspfv2InterfaceIter { + obj.ospfv2InterfaceSlice = append(obj.ospfv2InterfaceSlice, item) + return obj +} + +// Emulated OSPFv4 IPv4 routes. +// V4Routes returns a []Ospfv2V4RouteRange +func (obj *deviceOspfv2Router) V4Routes() DeviceOspfv2RouterOspfv2V4RouteRangeIter { + if len(obj.obj.V4Routes) == 0 { + obj.obj.V4Routes = []*otg.Ospfv2V4RouteRange{} + } + if obj.v4RoutesHolder == nil { + obj.v4RoutesHolder = newDeviceOspfv2RouterOspfv2V4RouteRangeIter(&obj.obj.V4Routes).setMsg(obj) + } + return obj.v4RoutesHolder +} + +type deviceOspfv2RouterOspfv2V4RouteRangeIter struct { + obj *deviceOspfv2Router + ospfv2V4RouteRangeSlice []Ospfv2V4RouteRange + fieldPtr *[]*otg.Ospfv2V4RouteRange +} + +func newDeviceOspfv2RouterOspfv2V4RouteRangeIter(ptr *[]*otg.Ospfv2V4RouteRange) DeviceOspfv2RouterOspfv2V4RouteRangeIter { + return &deviceOspfv2RouterOspfv2V4RouteRangeIter{fieldPtr: ptr} +} + +type DeviceOspfv2RouterOspfv2V4RouteRangeIter interface { + setMsg(*deviceOspfv2Router) DeviceOspfv2RouterOspfv2V4RouteRangeIter + Items() []Ospfv2V4RouteRange + Add() Ospfv2V4RouteRange + Append(items ...Ospfv2V4RouteRange) DeviceOspfv2RouterOspfv2V4RouteRangeIter + Set(index int, newObj Ospfv2V4RouteRange) DeviceOspfv2RouterOspfv2V4RouteRangeIter + Clear() DeviceOspfv2RouterOspfv2V4RouteRangeIter + clearHolderSlice() DeviceOspfv2RouterOspfv2V4RouteRangeIter + appendHolderSlice(item Ospfv2V4RouteRange) DeviceOspfv2RouterOspfv2V4RouteRangeIter +} + +func (obj *deviceOspfv2RouterOspfv2V4RouteRangeIter) setMsg(msg *deviceOspfv2Router) DeviceOspfv2RouterOspfv2V4RouteRangeIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&ospfv2V4RouteRange{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceOspfv2RouterOspfv2V4RouteRangeIter) Items() []Ospfv2V4RouteRange { + return obj.ospfv2V4RouteRangeSlice +} + +func (obj *deviceOspfv2RouterOspfv2V4RouteRangeIter) Add() Ospfv2V4RouteRange { + newObj := &otg.Ospfv2V4RouteRange{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &ospfv2V4RouteRange{obj: newObj} + newLibObj.setDefault() + obj.ospfv2V4RouteRangeSlice = append(obj.ospfv2V4RouteRangeSlice, newLibObj) + return newLibObj +} + +func (obj *deviceOspfv2RouterOspfv2V4RouteRangeIter) Append(items ...Ospfv2V4RouteRange) DeviceOspfv2RouterOspfv2V4RouteRangeIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.ospfv2V4RouteRangeSlice = append(obj.ospfv2V4RouteRangeSlice, item) + } + return obj +} + +func (obj *deviceOspfv2RouterOspfv2V4RouteRangeIter) Set(index int, newObj Ospfv2V4RouteRange) DeviceOspfv2RouterOspfv2V4RouteRangeIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.ospfv2V4RouteRangeSlice[index] = newObj + return obj +} +func (obj *deviceOspfv2RouterOspfv2V4RouteRangeIter) Clear() DeviceOspfv2RouterOspfv2V4RouteRangeIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Ospfv2V4RouteRange{} + obj.ospfv2V4RouteRangeSlice = []Ospfv2V4RouteRange{} + } + return obj +} +func (obj *deviceOspfv2RouterOspfv2V4RouteRangeIter) clearHolderSlice() DeviceOspfv2RouterOspfv2V4RouteRangeIter { + if len(obj.ospfv2V4RouteRangeSlice) > 0 { + obj.ospfv2V4RouteRangeSlice = []Ospfv2V4RouteRange{} + } + return obj +} +func (obj *deviceOspfv2RouterOspfv2V4RouteRangeIter) appendHolderSlice(item Ospfv2V4RouteRange) DeviceOspfv2RouterOspfv2V4RouteRangeIter { + obj.ospfv2V4RouteRangeSlice = append(obj.ospfv2V4RouteRangeSlice, item) + return obj +} + +func (obj *deviceOspfv2Router) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + obj.addWarnings("DeviceOspfv2Router is under review, OSPFv2 is currently under review for pending exploration on use cases.") + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface DeviceOspfv2Router") + } + + if obj.obj.RouterId != nil { + + obj.RouterId().validateObj(vObj, set_default) + } + + if obj.obj.LsaRetransmitTime != nil { + + if *obj.obj.LsaRetransmitTime < 1 || *obj.obj.LsaRetransmitTime > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= DeviceOspfv2Router.LsaRetransmitTime <= 4294967295 but Got %d", *obj.obj.LsaRetransmitTime)) + } + + } + + if obj.obj.LsaRefreshTime != nil { + + if *obj.obj.LsaRefreshTime < 5 || *obj.obj.LsaRefreshTime > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("5 <= DeviceOspfv2Router.LsaRefreshTime <= 4294967295 but Got %d", *obj.obj.LsaRefreshTime)) + } + + } + + if obj.obj.MaxFloodLsuPerBurst != nil { + + if *obj.obj.MaxFloodLsuPerBurst < 1 || *obj.obj.MaxFloodLsuPerBurst > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= DeviceOspfv2Router.MaxFloodLsuPerBurst <= 4294967295 but Got %d", *obj.obj.MaxFloodLsuPerBurst)) + } + + } + + if obj.obj.GracefulRestart != nil { + + obj.GracefulRestart().validateObj(vObj, set_default) + } + + if obj.obj.Capabilities != nil { + + obj.Capabilities().validateObj(vObj, set_default) + } + + if len(obj.obj.Interfaces) != 0 { + + if set_default { + obj.Interfaces().clearHolderSlice() + for _, item := range obj.obj.Interfaces { + obj.Interfaces().appendHolderSlice(&ospfv2Interface{obj: item}) + } + } + for _, item := range obj.Interfaces().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.V4Routes) != 0 { + + if set_default { + obj.V4Routes().clearHolderSlice() + for _, item := range obj.obj.V4Routes { + obj.V4Routes().appendHolderSlice(&ospfv2V4RouteRange{obj: item}) + } + } + for _, item := range obj.V4Routes().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *deviceOspfv2Router) setDefault() { + if obj.obj.LsaRetransmitTime == nil { + obj.SetLsaRetransmitTime(5) + } + if obj.obj.LsaRefreshTime == nil { + obj.SetLsaRefreshTime(1800) + } + if obj.obj.InterBurstLsuInterval == nil { + obj.SetInterBurstLsuInterval(33) + } + if obj.obj.MaxFloodLsuPerBurst == nil { + obj.SetMaxFloodLsuPerBurst(1) + } + if obj.obj.StoreLsa == nil { + obj.SetStoreLsa(false) + } + +} diff --git a/gosnappi/device_rsvp.go b/gosnappi/device_rsvp.go new file mode 100644 index 00000000..873316a8 --- /dev/null +++ b/gosnappi/device_rsvp.go @@ -0,0 +1,523 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceRsvp ***** +type deviceRsvp struct { + validation + obj *otg.DeviceRsvp + marshaller marshalDeviceRsvp + unMarshaller unMarshalDeviceRsvp + ipv4InterfacesHolder DeviceRsvpRsvpIpv4InterfaceIter + lspIpv4InterfacesHolder DeviceRsvpRsvpLspIpv4InterfaceIter +} + +func NewDeviceRsvp() DeviceRsvp { + obj := deviceRsvp{obj: &otg.DeviceRsvp{}} + obj.setDefault() + return &obj +} + +func (obj *deviceRsvp) msg() *otg.DeviceRsvp { + return obj.obj +} + +func (obj *deviceRsvp) setMsg(msg *otg.DeviceRsvp) DeviceRsvp { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceRsvp struct { + obj *deviceRsvp +} + +type marshalDeviceRsvp interface { + // ToProto marshals DeviceRsvp to protobuf object *otg.DeviceRsvp + ToProto() (*otg.DeviceRsvp, error) + // ToPbText marshals DeviceRsvp to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceRsvp to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceRsvp to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceRsvp struct { + obj *deviceRsvp +} + +type unMarshalDeviceRsvp interface { + // FromProto unmarshals DeviceRsvp from protobuf object *otg.DeviceRsvp + FromProto(msg *otg.DeviceRsvp) (DeviceRsvp, error) + // FromPbText unmarshals DeviceRsvp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceRsvp from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceRsvp from JSON text + FromJson(value string) error +} + +func (obj *deviceRsvp) Marshal() marshalDeviceRsvp { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceRsvp{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceRsvp) Unmarshal() unMarshalDeviceRsvp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceRsvp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceRsvp) ToProto() (*otg.DeviceRsvp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceRsvp) FromProto(msg *otg.DeviceRsvp) (DeviceRsvp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceRsvp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceRsvp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceRsvp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceRsvp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceRsvp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceRsvp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceRsvp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceRsvp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceRsvp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceRsvp) Clone() (DeviceRsvp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceRsvp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceRsvp) setNil() { + obj.ipv4InterfacesHolder = nil + obj.lspIpv4InterfacesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceRsvp is configuration for one or more RSVP interfaces, ingress and egress LSPs. In this model, currently IPv4 RSVP and point-to-point LSPs are supported as per RFC3209 and related specifications. +type DeviceRsvp interface { + Validation + // msg marshals DeviceRsvp to protobuf object *otg.DeviceRsvp + // and doesn't set defaults + msg() *otg.DeviceRsvp + // setMsg unmarshals DeviceRsvp from protobuf object *otg.DeviceRsvp + // and doesn't set defaults + setMsg(*otg.DeviceRsvp) DeviceRsvp + // provides marshal interface + Marshal() marshalDeviceRsvp + // provides unmarshal interface + Unmarshal() unMarshalDeviceRsvp + // validate validates DeviceRsvp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceRsvp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv4Interfaces returns DeviceRsvpRsvpIpv4InterfaceIterIter, set in DeviceRsvp + Ipv4Interfaces() DeviceRsvpRsvpIpv4InterfaceIter + // LspIpv4Interfaces returns DeviceRsvpRsvpLspIpv4InterfaceIterIter, set in DeviceRsvp + LspIpv4Interfaces() DeviceRsvpRsvpLspIpv4InterfaceIter + // Name returns string, set in DeviceRsvp. + Name() string + // SetName assigns string provided by user to DeviceRsvp + SetName(value string) DeviceRsvp + // HasName checks if Name has been set in DeviceRsvp + HasName() bool + setNil() +} + +// List of IPv4 RSVP connected interfaces. At least one interface should be present for device connected to the DUT. For unconnected devices, this array must be empty. +// Ipv4Interfaces returns a []RsvpIpv4Interface +func (obj *deviceRsvp) Ipv4Interfaces() DeviceRsvpRsvpIpv4InterfaceIter { + if len(obj.obj.Ipv4Interfaces) == 0 { + obj.obj.Ipv4Interfaces = []*otg.RsvpIpv4Interface{} + } + if obj.ipv4InterfacesHolder == nil { + obj.ipv4InterfacesHolder = newDeviceRsvpRsvpIpv4InterfaceIter(&obj.obj.Ipv4Interfaces).setMsg(obj) + } + return obj.ipv4InterfacesHolder +} + +type deviceRsvpRsvpIpv4InterfaceIter struct { + obj *deviceRsvp + rsvpIpv4InterfaceSlice []RsvpIpv4Interface + fieldPtr *[]*otg.RsvpIpv4Interface +} + +func newDeviceRsvpRsvpIpv4InterfaceIter(ptr *[]*otg.RsvpIpv4Interface) DeviceRsvpRsvpIpv4InterfaceIter { + return &deviceRsvpRsvpIpv4InterfaceIter{fieldPtr: ptr} +} + +type DeviceRsvpRsvpIpv4InterfaceIter interface { + setMsg(*deviceRsvp) DeviceRsvpRsvpIpv4InterfaceIter + Items() []RsvpIpv4Interface + Add() RsvpIpv4Interface + Append(items ...RsvpIpv4Interface) DeviceRsvpRsvpIpv4InterfaceIter + Set(index int, newObj RsvpIpv4Interface) DeviceRsvpRsvpIpv4InterfaceIter + Clear() DeviceRsvpRsvpIpv4InterfaceIter + clearHolderSlice() DeviceRsvpRsvpIpv4InterfaceIter + appendHolderSlice(item RsvpIpv4Interface) DeviceRsvpRsvpIpv4InterfaceIter +} + +func (obj *deviceRsvpRsvpIpv4InterfaceIter) setMsg(msg *deviceRsvp) DeviceRsvpRsvpIpv4InterfaceIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&rsvpIpv4Interface{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceRsvpRsvpIpv4InterfaceIter) Items() []RsvpIpv4Interface { + return obj.rsvpIpv4InterfaceSlice +} + +func (obj *deviceRsvpRsvpIpv4InterfaceIter) Add() RsvpIpv4Interface { + newObj := &otg.RsvpIpv4Interface{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &rsvpIpv4Interface{obj: newObj} + newLibObj.setDefault() + obj.rsvpIpv4InterfaceSlice = append(obj.rsvpIpv4InterfaceSlice, newLibObj) + return newLibObj +} + +func (obj *deviceRsvpRsvpIpv4InterfaceIter) Append(items ...RsvpIpv4Interface) DeviceRsvpRsvpIpv4InterfaceIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.rsvpIpv4InterfaceSlice = append(obj.rsvpIpv4InterfaceSlice, item) + } + return obj +} + +func (obj *deviceRsvpRsvpIpv4InterfaceIter) Set(index int, newObj RsvpIpv4Interface) DeviceRsvpRsvpIpv4InterfaceIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.rsvpIpv4InterfaceSlice[index] = newObj + return obj +} +func (obj *deviceRsvpRsvpIpv4InterfaceIter) Clear() DeviceRsvpRsvpIpv4InterfaceIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.RsvpIpv4Interface{} + obj.rsvpIpv4InterfaceSlice = []RsvpIpv4Interface{} + } + return obj +} +func (obj *deviceRsvpRsvpIpv4InterfaceIter) clearHolderSlice() DeviceRsvpRsvpIpv4InterfaceIter { + if len(obj.rsvpIpv4InterfaceSlice) > 0 { + obj.rsvpIpv4InterfaceSlice = []RsvpIpv4Interface{} + } + return obj +} +func (obj *deviceRsvpRsvpIpv4InterfaceIter) appendHolderSlice(item RsvpIpv4Interface) DeviceRsvpRsvpIpv4InterfaceIter { + obj.rsvpIpv4InterfaceSlice = append(obj.rsvpIpv4InterfaceSlice, item) + return obj +} + +// List of IPv4 Loopback or IPv4 connected interfaces acting as RSVP ingress and egress endpoints. +// LspIpv4Interfaces returns a []RsvpLspIpv4Interface +func (obj *deviceRsvp) LspIpv4Interfaces() DeviceRsvpRsvpLspIpv4InterfaceIter { + if len(obj.obj.LspIpv4Interfaces) == 0 { + obj.obj.LspIpv4Interfaces = []*otg.RsvpLspIpv4Interface{} + } + if obj.lspIpv4InterfacesHolder == nil { + obj.lspIpv4InterfacesHolder = newDeviceRsvpRsvpLspIpv4InterfaceIter(&obj.obj.LspIpv4Interfaces).setMsg(obj) + } + return obj.lspIpv4InterfacesHolder +} + +type deviceRsvpRsvpLspIpv4InterfaceIter struct { + obj *deviceRsvp + rsvpLspIpv4InterfaceSlice []RsvpLspIpv4Interface + fieldPtr *[]*otg.RsvpLspIpv4Interface +} + +func newDeviceRsvpRsvpLspIpv4InterfaceIter(ptr *[]*otg.RsvpLspIpv4Interface) DeviceRsvpRsvpLspIpv4InterfaceIter { + return &deviceRsvpRsvpLspIpv4InterfaceIter{fieldPtr: ptr} +} + +type DeviceRsvpRsvpLspIpv4InterfaceIter interface { + setMsg(*deviceRsvp) DeviceRsvpRsvpLspIpv4InterfaceIter + Items() []RsvpLspIpv4Interface + Add() RsvpLspIpv4Interface + Append(items ...RsvpLspIpv4Interface) DeviceRsvpRsvpLspIpv4InterfaceIter + Set(index int, newObj RsvpLspIpv4Interface) DeviceRsvpRsvpLspIpv4InterfaceIter + Clear() DeviceRsvpRsvpLspIpv4InterfaceIter + clearHolderSlice() DeviceRsvpRsvpLspIpv4InterfaceIter + appendHolderSlice(item RsvpLspIpv4Interface) DeviceRsvpRsvpLspIpv4InterfaceIter +} + +func (obj *deviceRsvpRsvpLspIpv4InterfaceIter) setMsg(msg *deviceRsvp) DeviceRsvpRsvpLspIpv4InterfaceIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&rsvpLspIpv4Interface{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceRsvpRsvpLspIpv4InterfaceIter) Items() []RsvpLspIpv4Interface { + return obj.rsvpLspIpv4InterfaceSlice +} + +func (obj *deviceRsvpRsvpLspIpv4InterfaceIter) Add() RsvpLspIpv4Interface { + newObj := &otg.RsvpLspIpv4Interface{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &rsvpLspIpv4Interface{obj: newObj} + newLibObj.setDefault() + obj.rsvpLspIpv4InterfaceSlice = append(obj.rsvpLspIpv4InterfaceSlice, newLibObj) + return newLibObj +} + +func (obj *deviceRsvpRsvpLspIpv4InterfaceIter) Append(items ...RsvpLspIpv4Interface) DeviceRsvpRsvpLspIpv4InterfaceIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.rsvpLspIpv4InterfaceSlice = append(obj.rsvpLspIpv4InterfaceSlice, item) + } + return obj +} + +func (obj *deviceRsvpRsvpLspIpv4InterfaceIter) Set(index int, newObj RsvpLspIpv4Interface) DeviceRsvpRsvpLspIpv4InterfaceIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.rsvpLspIpv4InterfaceSlice[index] = newObj + return obj +} +func (obj *deviceRsvpRsvpLspIpv4InterfaceIter) Clear() DeviceRsvpRsvpLspIpv4InterfaceIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.RsvpLspIpv4Interface{} + obj.rsvpLspIpv4InterfaceSlice = []RsvpLspIpv4Interface{} + } + return obj +} +func (obj *deviceRsvpRsvpLspIpv4InterfaceIter) clearHolderSlice() DeviceRsvpRsvpLspIpv4InterfaceIter { + if len(obj.rsvpLspIpv4InterfaceSlice) > 0 { + obj.rsvpLspIpv4InterfaceSlice = []RsvpLspIpv4Interface{} + } + return obj +} +func (obj *deviceRsvpRsvpLspIpv4InterfaceIter) appendHolderSlice(item RsvpLspIpv4Interface) DeviceRsvpRsvpLspIpv4InterfaceIter { + obj.rsvpLspIpv4InterfaceSlice = append(obj.rsvpLspIpv4InterfaceSlice, item) + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *deviceRsvp) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *deviceRsvp) HasName() bool { + return obj.obj.Name != nil +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DeviceRsvp object +func (obj *deviceRsvp) SetName(value string) DeviceRsvp { + + obj.obj.Name = &value + return obj +} + +func (obj *deviceRsvp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Ipv4Interfaces) != 0 { + + if set_default { + obj.Ipv4Interfaces().clearHolderSlice() + for _, item := range obj.obj.Ipv4Interfaces { + obj.Ipv4Interfaces().appendHolderSlice(&rsvpIpv4Interface{obj: item}) + } + } + for _, item := range obj.Ipv4Interfaces().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.LspIpv4Interfaces) != 0 { + + if set_default { + obj.LspIpv4Interfaces().clearHolderSlice() + for _, item := range obj.obj.LspIpv4Interfaces { + obj.LspIpv4Interfaces().appendHolderSlice(&rsvpLspIpv4Interface{obj: item}) + } + } + for _, item := range obj.LspIpv4Interfaces().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *deviceRsvp) setDefault() { + +} diff --git a/gosnappi/device_vlan.go b/gosnappi/device_vlan.go new file mode 100644 index 00000000..d40a4704 --- /dev/null +++ b/gosnappi/device_vlan.go @@ -0,0 +1,434 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceVlan ***** +type deviceVlan struct { + validation + obj *otg.DeviceVlan + marshaller marshalDeviceVlan + unMarshaller unMarshalDeviceVlan +} + +func NewDeviceVlan() DeviceVlan { + obj := deviceVlan{obj: &otg.DeviceVlan{}} + obj.setDefault() + return &obj +} + +func (obj *deviceVlan) msg() *otg.DeviceVlan { + return obj.obj +} + +func (obj *deviceVlan) setMsg(msg *otg.DeviceVlan) DeviceVlan { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceVlan struct { + obj *deviceVlan +} + +type marshalDeviceVlan interface { + // ToProto marshals DeviceVlan to protobuf object *otg.DeviceVlan + ToProto() (*otg.DeviceVlan, error) + // ToPbText marshals DeviceVlan to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceVlan to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceVlan to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceVlan struct { + obj *deviceVlan +} + +type unMarshalDeviceVlan interface { + // FromProto unmarshals DeviceVlan from protobuf object *otg.DeviceVlan + FromProto(msg *otg.DeviceVlan) (DeviceVlan, error) + // FromPbText unmarshals DeviceVlan from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceVlan from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceVlan from JSON text + FromJson(value string) error +} + +func (obj *deviceVlan) Marshal() marshalDeviceVlan { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceVlan{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceVlan) Unmarshal() unMarshalDeviceVlan { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceVlan{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceVlan) ToProto() (*otg.DeviceVlan, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceVlan) FromProto(msg *otg.DeviceVlan) (DeviceVlan, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceVlan) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceVlan) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceVlan) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceVlan) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceVlan) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceVlan) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceVlan) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceVlan) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceVlan) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceVlan) Clone() (DeviceVlan, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceVlan() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DeviceVlan is emulated VLAN protocol. +type DeviceVlan interface { + Validation + // msg marshals DeviceVlan to protobuf object *otg.DeviceVlan + // and doesn't set defaults + msg() *otg.DeviceVlan + // setMsg unmarshals DeviceVlan from protobuf object *otg.DeviceVlan + // and doesn't set defaults + setMsg(*otg.DeviceVlan) DeviceVlan + // provides marshal interface + Marshal() marshalDeviceVlan + // provides unmarshal interface + Unmarshal() unMarshalDeviceVlan + // validate validates DeviceVlan + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceVlan, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Tpid returns DeviceVlanTpidEnum, set in DeviceVlan + Tpid() DeviceVlanTpidEnum + // SetTpid assigns DeviceVlanTpidEnum provided by user to DeviceVlan + SetTpid(value DeviceVlanTpidEnum) DeviceVlan + // HasTpid checks if Tpid has been set in DeviceVlan + HasTpid() bool + // Priority returns uint32, set in DeviceVlan. + Priority() uint32 + // SetPriority assigns uint32 provided by user to DeviceVlan + SetPriority(value uint32) DeviceVlan + // HasPriority checks if Priority has been set in DeviceVlan + HasPriority() bool + // Id returns uint32, set in DeviceVlan. + Id() uint32 + // SetId assigns uint32 provided by user to DeviceVlan + SetId(value uint32) DeviceVlan + // HasId checks if Id has been set in DeviceVlan + HasId() bool + // Name returns string, set in DeviceVlan. + Name() string + // SetName assigns string provided by user to DeviceVlan + SetName(value string) DeviceVlan +} + +type DeviceVlanTpidEnum string + +// Enum of Tpid on DeviceVlan +var DeviceVlanTpid = struct { + X8100 DeviceVlanTpidEnum + X88A8 DeviceVlanTpidEnum + X9100 DeviceVlanTpidEnum + X9200 DeviceVlanTpidEnum + X9300 DeviceVlanTpidEnum +}{ + X8100: DeviceVlanTpidEnum("x8100"), + X88A8: DeviceVlanTpidEnum("x88A8"), + X9100: DeviceVlanTpidEnum("x9100"), + X9200: DeviceVlanTpidEnum("x9200"), + X9300: DeviceVlanTpidEnum("x9300"), +} + +func (obj *deviceVlan) Tpid() DeviceVlanTpidEnum { + return DeviceVlanTpidEnum(obj.obj.Tpid.Enum().String()) +} + +// Tag protocol identifier +// Tpid returns a string +func (obj *deviceVlan) HasTpid() bool { + return obj.obj.Tpid != nil +} + +func (obj *deviceVlan) SetTpid(value DeviceVlanTpidEnum) DeviceVlan { + intValue, ok := otg.DeviceVlan_Tpid_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on DeviceVlanTpidEnum", string(value))) + return obj + } + enumValue := otg.DeviceVlan_Tpid_Enum(intValue) + obj.obj.Tpid = &enumValue + + return obj +} + +// Priority code point +// Priority returns a uint32 +func (obj *deviceVlan) Priority() uint32 { + + return *obj.obj.Priority + +} + +// Priority code point +// Priority returns a uint32 +func (obj *deviceVlan) HasPriority() bool { + return obj.obj.Priority != nil +} + +// Priority code point +// SetPriority sets the uint32 value in the DeviceVlan object +func (obj *deviceVlan) SetPriority(value uint32) DeviceVlan { + + obj.obj.Priority = &value + return obj +} + +// VLAN identifier +// Id returns a uint32 +func (obj *deviceVlan) Id() uint32 { + + return *obj.obj.Id + +} + +// VLAN identifier +// Id returns a uint32 +func (obj *deviceVlan) HasId() bool { + return obj.obj.Id != nil +} + +// VLAN identifier +// SetId sets the uint32 value in the DeviceVlan object +func (obj *deviceVlan) SetId(value uint32) DeviceVlan { + + obj.obj.Id = &value + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *deviceVlan) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DeviceVlan object +func (obj *deviceVlan) SetName(value string) DeviceVlan { + + obj.obj.Name = &value + return obj +} + +func (obj *deviceVlan) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Priority != nil { + + if *obj.obj.Priority > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= DeviceVlan.Priority <= 3 but Got %d", *obj.obj.Priority)) + } + + } + + if obj.obj.Id != nil { + + if *obj.obj.Id > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= DeviceVlan.Id <= 4095 but Got %d", *obj.obj.Id)) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface DeviceVlan") + } +} + +func (obj *deviceVlan) setDefault() { + if obj.obj.Tpid == nil { + obj.SetTpid(DeviceVlanTpid.X8100) + + } + if obj.obj.Priority == nil { + obj.SetPriority(0) + } + if obj.obj.Id == nil { + obj.SetId(1) + } + +} diff --git a/gosnappi/device_vxlan.go b/gosnappi/device_vxlan.go new file mode 100644 index 00000000..c9986241 --- /dev/null +++ b/gosnappi/device_vxlan.go @@ -0,0 +1,495 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DeviceVxlan ***** +type deviceVxlan struct { + validation + obj *otg.DeviceVxlan + marshaller marshalDeviceVxlan + unMarshaller unMarshalDeviceVxlan + v4TunnelsHolder DeviceVxlanVxlanV4TunnelIter + v6TunnelsHolder DeviceVxlanVxlanV6TunnelIter +} + +func NewDeviceVxlan() DeviceVxlan { + obj := deviceVxlan{obj: &otg.DeviceVxlan{}} + obj.setDefault() + return &obj +} + +func (obj *deviceVxlan) msg() *otg.DeviceVxlan { + return obj.obj +} + +func (obj *deviceVxlan) setMsg(msg *otg.DeviceVxlan) DeviceVxlan { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldeviceVxlan struct { + obj *deviceVxlan +} + +type marshalDeviceVxlan interface { + // ToProto marshals DeviceVxlan to protobuf object *otg.DeviceVxlan + ToProto() (*otg.DeviceVxlan, error) + // ToPbText marshals DeviceVxlan to protobuf text + ToPbText() (string, error) + // ToYaml marshals DeviceVxlan to YAML text + ToYaml() (string, error) + // ToJson marshals DeviceVxlan to JSON text + ToJson() (string, error) +} + +type unMarshaldeviceVxlan struct { + obj *deviceVxlan +} + +type unMarshalDeviceVxlan interface { + // FromProto unmarshals DeviceVxlan from protobuf object *otg.DeviceVxlan + FromProto(msg *otg.DeviceVxlan) (DeviceVxlan, error) + // FromPbText unmarshals DeviceVxlan from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DeviceVxlan from YAML text + FromYaml(value string) error + // FromJson unmarshals DeviceVxlan from JSON text + FromJson(value string) error +} + +func (obj *deviceVxlan) Marshal() marshalDeviceVxlan { + if obj.marshaller == nil { + obj.marshaller = &marshaldeviceVxlan{obj: obj} + } + return obj.marshaller +} + +func (obj *deviceVxlan) Unmarshal() unMarshalDeviceVxlan { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldeviceVxlan{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldeviceVxlan) ToProto() (*otg.DeviceVxlan, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldeviceVxlan) FromProto(msg *otg.DeviceVxlan) (DeviceVxlan, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldeviceVxlan) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldeviceVxlan) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldeviceVxlan) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceVxlan) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldeviceVxlan) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldeviceVxlan) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *deviceVxlan) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *deviceVxlan) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *deviceVxlan) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *deviceVxlan) Clone() (DeviceVxlan, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDeviceVxlan() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *deviceVxlan) setNil() { + obj.v4TunnelsHolder = nil + obj.v6TunnelsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DeviceVxlan is description is TBD +type DeviceVxlan interface { + Validation + // msg marshals DeviceVxlan to protobuf object *otg.DeviceVxlan + // and doesn't set defaults + msg() *otg.DeviceVxlan + // setMsg unmarshals DeviceVxlan from protobuf object *otg.DeviceVxlan + // and doesn't set defaults + setMsg(*otg.DeviceVxlan) DeviceVxlan + // provides marshal interface + Marshal() marshalDeviceVxlan + // provides unmarshal interface + Unmarshal() unMarshalDeviceVxlan + // validate validates DeviceVxlan + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DeviceVxlan, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // V4Tunnels returns DeviceVxlanVxlanV4TunnelIterIter, set in DeviceVxlan + V4Tunnels() DeviceVxlanVxlanV4TunnelIter + // V6Tunnels returns DeviceVxlanVxlanV6TunnelIterIter, set in DeviceVxlan + V6Tunnels() DeviceVxlanVxlanV6TunnelIter + setNil() +} + +// IPv4 VXLAN Tunnels +// V4Tunnels returns a []VxlanV4Tunnel +func (obj *deviceVxlan) V4Tunnels() DeviceVxlanVxlanV4TunnelIter { + if len(obj.obj.V4Tunnels) == 0 { + obj.obj.V4Tunnels = []*otg.VxlanV4Tunnel{} + } + if obj.v4TunnelsHolder == nil { + obj.v4TunnelsHolder = newDeviceVxlanVxlanV4TunnelIter(&obj.obj.V4Tunnels).setMsg(obj) + } + return obj.v4TunnelsHolder +} + +type deviceVxlanVxlanV4TunnelIter struct { + obj *deviceVxlan + vxlanV4TunnelSlice []VxlanV4Tunnel + fieldPtr *[]*otg.VxlanV4Tunnel +} + +func newDeviceVxlanVxlanV4TunnelIter(ptr *[]*otg.VxlanV4Tunnel) DeviceVxlanVxlanV4TunnelIter { + return &deviceVxlanVxlanV4TunnelIter{fieldPtr: ptr} +} + +type DeviceVxlanVxlanV4TunnelIter interface { + setMsg(*deviceVxlan) DeviceVxlanVxlanV4TunnelIter + Items() []VxlanV4Tunnel + Add() VxlanV4Tunnel + Append(items ...VxlanV4Tunnel) DeviceVxlanVxlanV4TunnelIter + Set(index int, newObj VxlanV4Tunnel) DeviceVxlanVxlanV4TunnelIter + Clear() DeviceVxlanVxlanV4TunnelIter + clearHolderSlice() DeviceVxlanVxlanV4TunnelIter + appendHolderSlice(item VxlanV4Tunnel) DeviceVxlanVxlanV4TunnelIter +} + +func (obj *deviceVxlanVxlanV4TunnelIter) setMsg(msg *deviceVxlan) DeviceVxlanVxlanV4TunnelIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&vxlanV4Tunnel{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceVxlanVxlanV4TunnelIter) Items() []VxlanV4Tunnel { + return obj.vxlanV4TunnelSlice +} + +func (obj *deviceVxlanVxlanV4TunnelIter) Add() VxlanV4Tunnel { + newObj := &otg.VxlanV4Tunnel{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &vxlanV4Tunnel{obj: newObj} + newLibObj.setDefault() + obj.vxlanV4TunnelSlice = append(obj.vxlanV4TunnelSlice, newLibObj) + return newLibObj +} + +func (obj *deviceVxlanVxlanV4TunnelIter) Append(items ...VxlanV4Tunnel) DeviceVxlanVxlanV4TunnelIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.vxlanV4TunnelSlice = append(obj.vxlanV4TunnelSlice, item) + } + return obj +} + +func (obj *deviceVxlanVxlanV4TunnelIter) Set(index int, newObj VxlanV4Tunnel) DeviceVxlanVxlanV4TunnelIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.vxlanV4TunnelSlice[index] = newObj + return obj +} +func (obj *deviceVxlanVxlanV4TunnelIter) Clear() DeviceVxlanVxlanV4TunnelIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.VxlanV4Tunnel{} + obj.vxlanV4TunnelSlice = []VxlanV4Tunnel{} + } + return obj +} +func (obj *deviceVxlanVxlanV4TunnelIter) clearHolderSlice() DeviceVxlanVxlanV4TunnelIter { + if len(obj.vxlanV4TunnelSlice) > 0 { + obj.vxlanV4TunnelSlice = []VxlanV4Tunnel{} + } + return obj +} +func (obj *deviceVxlanVxlanV4TunnelIter) appendHolderSlice(item VxlanV4Tunnel) DeviceVxlanVxlanV4TunnelIter { + obj.vxlanV4TunnelSlice = append(obj.vxlanV4TunnelSlice, item) + return obj +} + +// IPv6 VXLAN Tunnels +// V6Tunnels returns a []VxlanV6Tunnel +func (obj *deviceVxlan) V6Tunnels() DeviceVxlanVxlanV6TunnelIter { + if len(obj.obj.V6Tunnels) == 0 { + obj.obj.V6Tunnels = []*otg.VxlanV6Tunnel{} + } + if obj.v6TunnelsHolder == nil { + obj.v6TunnelsHolder = newDeviceVxlanVxlanV6TunnelIter(&obj.obj.V6Tunnels).setMsg(obj) + } + return obj.v6TunnelsHolder +} + +type deviceVxlanVxlanV6TunnelIter struct { + obj *deviceVxlan + vxlanV6TunnelSlice []VxlanV6Tunnel + fieldPtr *[]*otg.VxlanV6Tunnel +} + +func newDeviceVxlanVxlanV6TunnelIter(ptr *[]*otg.VxlanV6Tunnel) DeviceVxlanVxlanV6TunnelIter { + return &deviceVxlanVxlanV6TunnelIter{fieldPtr: ptr} +} + +type DeviceVxlanVxlanV6TunnelIter interface { + setMsg(*deviceVxlan) DeviceVxlanVxlanV6TunnelIter + Items() []VxlanV6Tunnel + Add() VxlanV6Tunnel + Append(items ...VxlanV6Tunnel) DeviceVxlanVxlanV6TunnelIter + Set(index int, newObj VxlanV6Tunnel) DeviceVxlanVxlanV6TunnelIter + Clear() DeviceVxlanVxlanV6TunnelIter + clearHolderSlice() DeviceVxlanVxlanV6TunnelIter + appendHolderSlice(item VxlanV6Tunnel) DeviceVxlanVxlanV6TunnelIter +} + +func (obj *deviceVxlanVxlanV6TunnelIter) setMsg(msg *deviceVxlan) DeviceVxlanVxlanV6TunnelIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&vxlanV6Tunnel{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *deviceVxlanVxlanV6TunnelIter) Items() []VxlanV6Tunnel { + return obj.vxlanV6TunnelSlice +} + +func (obj *deviceVxlanVxlanV6TunnelIter) Add() VxlanV6Tunnel { + newObj := &otg.VxlanV6Tunnel{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &vxlanV6Tunnel{obj: newObj} + newLibObj.setDefault() + obj.vxlanV6TunnelSlice = append(obj.vxlanV6TunnelSlice, newLibObj) + return newLibObj +} + +func (obj *deviceVxlanVxlanV6TunnelIter) Append(items ...VxlanV6Tunnel) DeviceVxlanVxlanV6TunnelIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.vxlanV6TunnelSlice = append(obj.vxlanV6TunnelSlice, item) + } + return obj +} + +func (obj *deviceVxlanVxlanV6TunnelIter) Set(index int, newObj VxlanV6Tunnel) DeviceVxlanVxlanV6TunnelIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.vxlanV6TunnelSlice[index] = newObj + return obj +} +func (obj *deviceVxlanVxlanV6TunnelIter) Clear() DeviceVxlanVxlanV6TunnelIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.VxlanV6Tunnel{} + obj.vxlanV6TunnelSlice = []VxlanV6Tunnel{} + } + return obj +} +func (obj *deviceVxlanVxlanV6TunnelIter) clearHolderSlice() DeviceVxlanVxlanV6TunnelIter { + if len(obj.vxlanV6TunnelSlice) > 0 { + obj.vxlanV6TunnelSlice = []VxlanV6Tunnel{} + } + return obj +} +func (obj *deviceVxlanVxlanV6TunnelIter) appendHolderSlice(item VxlanV6Tunnel) DeviceVxlanVxlanV6TunnelIter { + obj.vxlanV6TunnelSlice = append(obj.vxlanV6TunnelSlice, item) + return obj +} + +func (obj *deviceVxlan) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.V4Tunnels) != 0 { + + if set_default { + obj.V4Tunnels().clearHolderSlice() + for _, item := range obj.obj.V4Tunnels { + obj.V4Tunnels().appendHolderSlice(&vxlanV4Tunnel{obj: item}) + } + } + for _, item := range obj.V4Tunnels().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.V6Tunnels) != 0 { + + if set_default { + obj.V6Tunnels().clearHolderSlice() + for _, item := range obj.obj.V6Tunnels { + obj.V6Tunnels().appendHolderSlice(&vxlanV6Tunnel{obj: item}) + } + } + for _, item := range obj.V6Tunnels().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *deviceVxlan) setDefault() { + +} diff --git a/gosnappi/dhcp_server_v4.go b/gosnappi/dhcp_server_v4.go new file mode 100644 index 00000000..999d73c9 --- /dev/null +++ b/gosnappi/dhcp_server_v4.go @@ -0,0 +1,454 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DhcpServerV4 ***** +type dhcpServerV4 struct { + validation + obj *otg.DhcpServerV4 + marshaller marshalDhcpServerV4 + unMarshaller unMarshalDhcpServerV4 + addressPoolsHolder DhcpServerV4DhcpServerV4PoolIter +} + +func NewDhcpServerV4() DhcpServerV4 { + obj := dhcpServerV4{obj: &otg.DhcpServerV4{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpServerV4) msg() *otg.DhcpServerV4 { + return obj.obj +} + +func (obj *dhcpServerV4) setMsg(msg *otg.DhcpServerV4) DhcpServerV4 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpServerV4 struct { + obj *dhcpServerV4 +} + +type marshalDhcpServerV4 interface { + // ToProto marshals DhcpServerV4 to protobuf object *otg.DhcpServerV4 + ToProto() (*otg.DhcpServerV4, error) + // ToPbText marshals DhcpServerV4 to protobuf text + ToPbText() (string, error) + // ToYaml marshals DhcpServerV4 to YAML text + ToYaml() (string, error) + // ToJson marshals DhcpServerV4 to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpServerV4 struct { + obj *dhcpServerV4 +} + +type unMarshalDhcpServerV4 interface { + // FromProto unmarshals DhcpServerV4 from protobuf object *otg.DhcpServerV4 + FromProto(msg *otg.DhcpServerV4) (DhcpServerV4, error) + // FromPbText unmarshals DhcpServerV4 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DhcpServerV4 from YAML text + FromYaml(value string) error + // FromJson unmarshals DhcpServerV4 from JSON text + FromJson(value string) error +} + +func (obj *dhcpServerV4) Marshal() marshalDhcpServerV4 { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpServerV4{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpServerV4) Unmarshal() unMarshalDhcpServerV4 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpServerV4{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpServerV4) ToProto() (*otg.DhcpServerV4, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpServerV4) FromProto(msg *otg.DhcpServerV4) (DhcpServerV4, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpServerV4) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpServerV4) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpServerV4) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpServerV4) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpServerV4) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpServerV4) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpServerV4) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpServerV4) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpServerV4) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpServerV4) Clone() (DhcpServerV4, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpServerV4() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpServerV4) setNil() { + obj.addressPoolsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DhcpServerV4 is configuration for emulated DHCPv4 Server. +type DhcpServerV4 interface { + Validation + // msg marshals DhcpServerV4 to protobuf object *otg.DhcpServerV4 + // and doesn't set defaults + msg() *otg.DhcpServerV4 + // setMsg unmarshals DhcpServerV4 from protobuf object *otg.DhcpServerV4 + // and doesn't set defaults + setMsg(*otg.DhcpServerV4) DhcpServerV4 + // provides marshal interface + Marshal() marshalDhcpServerV4 + // provides unmarshal interface + Unmarshal() unMarshalDhcpServerV4 + // validate validates DhcpServerV4 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DhcpServerV4, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in DhcpServerV4. + Name() string + // SetName assigns string provided by user to DhcpServerV4 + SetName(value string) DhcpServerV4 + // Ipv4Name returns string, set in DhcpServerV4. + Ipv4Name() string + // SetIpv4Name assigns string provided by user to DhcpServerV4 + SetIpv4Name(value string) DhcpServerV4 + // AddressPools returns DhcpServerV4DhcpServerV4PoolIterIter, set in DhcpServerV4 + AddressPools() DhcpServerV4DhcpServerV4PoolIter + setNil() +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *dhcpServerV4) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DhcpServerV4 object +func (obj *dhcpServerV4) SetName(value string) DhcpServerV4 { + + obj.obj.Name = &value + return obj +} + +// The unique name of the IPv4 on which DHCPv4 server will run. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// Ipv4Name returns a string +func (obj *dhcpServerV4) Ipv4Name() string { + + return *obj.obj.Ipv4Name + +} + +// The unique name of the IPv4 on which DHCPv4 server will run. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// SetIpv4Name sets the string value in the DhcpServerV4 object +func (obj *dhcpServerV4) SetIpv4Name(value string) DhcpServerV4 { + + obj.obj.Ipv4Name = &value + return obj +} + +// List of DHCPv4 Server Lease parameters +// AddressPools returns a []DhcpServerV4Pool +func (obj *dhcpServerV4) AddressPools() DhcpServerV4DhcpServerV4PoolIter { + if len(obj.obj.AddressPools) == 0 { + obj.obj.AddressPools = []*otg.DhcpServerV4Pool{} + } + if obj.addressPoolsHolder == nil { + obj.addressPoolsHolder = newDhcpServerV4DhcpServerV4PoolIter(&obj.obj.AddressPools).setMsg(obj) + } + return obj.addressPoolsHolder +} + +type dhcpServerV4DhcpServerV4PoolIter struct { + obj *dhcpServerV4 + dhcpServerV4PoolSlice []DhcpServerV4Pool + fieldPtr *[]*otg.DhcpServerV4Pool +} + +func newDhcpServerV4DhcpServerV4PoolIter(ptr *[]*otg.DhcpServerV4Pool) DhcpServerV4DhcpServerV4PoolIter { + return &dhcpServerV4DhcpServerV4PoolIter{fieldPtr: ptr} +} + +type DhcpServerV4DhcpServerV4PoolIter interface { + setMsg(*dhcpServerV4) DhcpServerV4DhcpServerV4PoolIter + Items() []DhcpServerV4Pool + Add() DhcpServerV4Pool + Append(items ...DhcpServerV4Pool) DhcpServerV4DhcpServerV4PoolIter + Set(index int, newObj DhcpServerV4Pool) DhcpServerV4DhcpServerV4PoolIter + Clear() DhcpServerV4DhcpServerV4PoolIter + clearHolderSlice() DhcpServerV4DhcpServerV4PoolIter + appendHolderSlice(item DhcpServerV4Pool) DhcpServerV4DhcpServerV4PoolIter +} + +func (obj *dhcpServerV4DhcpServerV4PoolIter) setMsg(msg *dhcpServerV4) DhcpServerV4DhcpServerV4PoolIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpServerV4Pool{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *dhcpServerV4DhcpServerV4PoolIter) Items() []DhcpServerV4Pool { + return obj.dhcpServerV4PoolSlice +} + +func (obj *dhcpServerV4DhcpServerV4PoolIter) Add() DhcpServerV4Pool { + newObj := &otg.DhcpServerV4Pool{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpServerV4Pool{obj: newObj} + newLibObj.setDefault() + obj.dhcpServerV4PoolSlice = append(obj.dhcpServerV4PoolSlice, newLibObj) + return newLibObj +} + +func (obj *dhcpServerV4DhcpServerV4PoolIter) Append(items ...DhcpServerV4Pool) DhcpServerV4DhcpServerV4PoolIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpServerV4PoolSlice = append(obj.dhcpServerV4PoolSlice, item) + } + return obj +} + +func (obj *dhcpServerV4DhcpServerV4PoolIter) Set(index int, newObj DhcpServerV4Pool) DhcpServerV4DhcpServerV4PoolIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpServerV4PoolSlice[index] = newObj + return obj +} +func (obj *dhcpServerV4DhcpServerV4PoolIter) Clear() DhcpServerV4DhcpServerV4PoolIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.DhcpServerV4Pool{} + obj.dhcpServerV4PoolSlice = []DhcpServerV4Pool{} + } + return obj +} +func (obj *dhcpServerV4DhcpServerV4PoolIter) clearHolderSlice() DhcpServerV4DhcpServerV4PoolIter { + if len(obj.dhcpServerV4PoolSlice) > 0 { + obj.dhcpServerV4PoolSlice = []DhcpServerV4Pool{} + } + return obj +} +func (obj *dhcpServerV4DhcpServerV4PoolIter) appendHolderSlice(item DhcpServerV4Pool) DhcpServerV4DhcpServerV4PoolIter { + obj.dhcpServerV4PoolSlice = append(obj.dhcpServerV4PoolSlice, item) + return obj +} + +func (obj *dhcpServerV4) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface DhcpServerV4") + } + + // Ipv4Name is required + if obj.obj.Ipv4Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv4Name is required field on interface DhcpServerV4") + } + + if len(obj.obj.AddressPools) != 0 { + + if set_default { + obj.AddressPools().clearHolderSlice() + for _, item := range obj.obj.AddressPools { + obj.AddressPools().appendHolderSlice(&dhcpServerV4Pool{obj: item}) + } + } + for _, item := range obj.AddressPools().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *dhcpServerV4) setDefault() { + +} diff --git a/gosnappi/dhcp_server_v4_pool.go b/gosnappi/dhcp_server_v4_pool.go new file mode 100644 index 00000000..86182f02 --- /dev/null +++ b/gosnappi/dhcp_server_v4_pool.go @@ -0,0 +1,553 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DhcpServerV4Pool ***** +type dhcpServerV4Pool struct { + validation + obj *otg.DhcpServerV4Pool + marshaller marshalDhcpServerV4Pool + unMarshaller unMarshalDhcpServerV4Pool + optionsHolder DhcpServerV4PoolOption +} + +func NewDhcpServerV4Pool() DhcpServerV4Pool { + obj := dhcpServerV4Pool{obj: &otg.DhcpServerV4Pool{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpServerV4Pool) msg() *otg.DhcpServerV4Pool { + return obj.obj +} + +func (obj *dhcpServerV4Pool) setMsg(msg *otg.DhcpServerV4Pool) DhcpServerV4Pool { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpServerV4Pool struct { + obj *dhcpServerV4Pool +} + +type marshalDhcpServerV4Pool interface { + // ToProto marshals DhcpServerV4Pool to protobuf object *otg.DhcpServerV4Pool + ToProto() (*otg.DhcpServerV4Pool, error) + // ToPbText marshals DhcpServerV4Pool to protobuf text + ToPbText() (string, error) + // ToYaml marshals DhcpServerV4Pool to YAML text + ToYaml() (string, error) + // ToJson marshals DhcpServerV4Pool to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpServerV4Pool struct { + obj *dhcpServerV4Pool +} + +type unMarshalDhcpServerV4Pool interface { + // FromProto unmarshals DhcpServerV4Pool from protobuf object *otg.DhcpServerV4Pool + FromProto(msg *otg.DhcpServerV4Pool) (DhcpServerV4Pool, error) + // FromPbText unmarshals DhcpServerV4Pool from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DhcpServerV4Pool from YAML text + FromYaml(value string) error + // FromJson unmarshals DhcpServerV4Pool from JSON text + FromJson(value string) error +} + +func (obj *dhcpServerV4Pool) Marshal() marshalDhcpServerV4Pool { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpServerV4Pool{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpServerV4Pool) Unmarshal() unMarshalDhcpServerV4Pool { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpServerV4Pool{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpServerV4Pool) ToProto() (*otg.DhcpServerV4Pool, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpServerV4Pool) FromProto(msg *otg.DhcpServerV4Pool) (DhcpServerV4Pool, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpServerV4Pool) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpServerV4Pool) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpServerV4Pool) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpServerV4Pool) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpServerV4Pool) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpServerV4Pool) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpServerV4Pool) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpServerV4Pool) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpServerV4Pool) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpServerV4Pool) Clone() (DhcpServerV4Pool, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpServerV4Pool() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpServerV4Pool) setNil() { + obj.optionsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DhcpServerV4Pool is configuration for DHCPv4 address pool for a lease. +type DhcpServerV4Pool interface { + Validation + // msg marshals DhcpServerV4Pool to protobuf object *otg.DhcpServerV4Pool + // and doesn't set defaults + msg() *otg.DhcpServerV4Pool + // setMsg unmarshals DhcpServerV4Pool from protobuf object *otg.DhcpServerV4Pool + // and doesn't set defaults + setMsg(*otg.DhcpServerV4Pool) DhcpServerV4Pool + // provides marshal interface + Marshal() marshalDhcpServerV4Pool + // provides unmarshal interface + Unmarshal() unMarshalDhcpServerV4Pool + // validate validates DhcpServerV4Pool + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DhcpServerV4Pool, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in DhcpServerV4Pool. + Name() string + // SetName assigns string provided by user to DhcpServerV4Pool + SetName(value string) DhcpServerV4Pool + // HasName checks if Name has been set in DhcpServerV4Pool + HasName() bool + // LeaseTime returns uint32, set in DhcpServerV4Pool. + LeaseTime() uint32 + // SetLeaseTime assigns uint32 provided by user to DhcpServerV4Pool + SetLeaseTime(value uint32) DhcpServerV4Pool + // HasLeaseTime checks if LeaseTime has been set in DhcpServerV4Pool + HasLeaseTime() bool + // StartAddress returns string, set in DhcpServerV4Pool. + StartAddress() string + // SetStartAddress assigns string provided by user to DhcpServerV4Pool + SetStartAddress(value string) DhcpServerV4Pool + // PrefixLength returns uint32, set in DhcpServerV4Pool. + PrefixLength() uint32 + // SetPrefixLength assigns uint32 provided by user to DhcpServerV4Pool + SetPrefixLength(value uint32) DhcpServerV4Pool + // HasPrefixLength checks if PrefixLength has been set in DhcpServerV4Pool + HasPrefixLength() bool + // Count returns uint32, set in DhcpServerV4Pool. + Count() uint32 + // SetCount assigns uint32 provided by user to DhcpServerV4Pool + SetCount(value uint32) DhcpServerV4Pool + // HasCount checks if Count has been set in DhcpServerV4Pool + HasCount() bool + // Step returns uint32, set in DhcpServerV4Pool. + Step() uint32 + // SetStep assigns uint32 provided by user to DhcpServerV4Pool + SetStep(value uint32) DhcpServerV4Pool + // HasStep checks if Step has been set in DhcpServerV4Pool + HasStep() bool + // Options returns DhcpServerV4PoolOption, set in DhcpServerV4Pool. + // DhcpServerV4PoolOption is optional configuration for DHCPv4 address pool for the lease. + Options() DhcpServerV4PoolOption + // SetOptions assigns DhcpServerV4PoolOption provided by user to DhcpServerV4Pool. + // DhcpServerV4PoolOption is optional configuration for DHCPv4 address pool for the lease. + SetOptions(value DhcpServerV4PoolOption) DhcpServerV4Pool + // HasOptions checks if Options has been set in DhcpServerV4Pool + HasOptions() bool + setNil() +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *dhcpServerV4Pool) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *dhcpServerV4Pool) HasName() bool { + return obj.obj.Name != nil +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DhcpServerV4Pool object +func (obj *dhcpServerV4Pool) SetName(value string) DhcpServerV4Pool { + + obj.obj.Name = &value + return obj +} + +// The duration of time in seconds that is assigned to a lease. +// LeaseTime returns a uint32 +func (obj *dhcpServerV4Pool) LeaseTime() uint32 { + + return *obj.obj.LeaseTime + +} + +// The duration of time in seconds that is assigned to a lease. +// LeaseTime returns a uint32 +func (obj *dhcpServerV4Pool) HasLeaseTime() bool { + return obj.obj.LeaseTime != nil +} + +// The duration of time in seconds that is assigned to a lease. +// SetLeaseTime sets the uint32 value in the DhcpServerV4Pool object +func (obj *dhcpServerV4Pool) SetLeaseTime(value uint32) DhcpServerV4Pool { + + obj.obj.LeaseTime = &value + return obj +} + +// The IPv4 address of the first lease pool. +// StartAddress returns a string +func (obj *dhcpServerV4Pool) StartAddress() string { + + return *obj.obj.StartAddress + +} + +// The IPv4 address of the first lease pool. +// SetStartAddress sets the string value in the DhcpServerV4Pool object +func (obj *dhcpServerV4Pool) SetStartAddress(value string) DhcpServerV4Pool { + + obj.obj.StartAddress = &value + return obj +} + +// The IPv4 network prefix length to be applied to the address. +// PrefixLength returns a uint32 +func (obj *dhcpServerV4Pool) PrefixLength() uint32 { + + return *obj.obj.PrefixLength + +} + +// The IPv4 network prefix length to be applied to the address. +// PrefixLength returns a uint32 +func (obj *dhcpServerV4Pool) HasPrefixLength() bool { + return obj.obj.PrefixLength != nil +} + +// The IPv4 network prefix length to be applied to the address. +// SetPrefixLength sets the uint32 value in the DhcpServerV4Pool object +func (obj *dhcpServerV4Pool) SetPrefixLength(value uint32) DhcpServerV4Pool { + + obj.obj.PrefixLength = &value + return obj +} + +// The total number of addresses in the pool. +// Count returns a uint32 +func (obj *dhcpServerV4Pool) Count() uint32 { + + return *obj.obj.Count + +} + +// The total number of addresses in the pool. +// Count returns a uint32 +func (obj *dhcpServerV4Pool) HasCount() bool { + return obj.obj.Count != nil +} + +// The total number of addresses in the pool. +// SetCount sets the uint32 value in the DhcpServerV4Pool object +func (obj *dhcpServerV4Pool) SetCount(value uint32) DhcpServerV4Pool { + + obj.obj.Count = &value + return obj +} + +// The increment value for the lease address within the lease pool. The value is incremented according to the prefix_length and step. +// Step returns a uint32 +func (obj *dhcpServerV4Pool) Step() uint32 { + + return *obj.obj.Step + +} + +// The increment value for the lease address within the lease pool. The value is incremented according to the prefix_length and step. +// Step returns a uint32 +func (obj *dhcpServerV4Pool) HasStep() bool { + return obj.obj.Step != nil +} + +// The increment value for the lease address within the lease pool. The value is incremented according to the prefix_length and step. +// SetStep sets the uint32 value in the DhcpServerV4Pool object +func (obj *dhcpServerV4Pool) SetStep(value uint32) DhcpServerV4Pool { + + obj.obj.Step = &value + return obj +} + +// Optional configuration for DHCPv4 address pool for the lease. +// Options returns a DhcpServerV4PoolOption +func (obj *dhcpServerV4Pool) Options() DhcpServerV4PoolOption { + if obj.obj.Options == nil { + obj.obj.Options = NewDhcpServerV4PoolOption().msg() + } + if obj.optionsHolder == nil { + obj.optionsHolder = &dhcpServerV4PoolOption{obj: obj.obj.Options} + } + return obj.optionsHolder +} + +// Optional configuration for DHCPv4 address pool for the lease. +// Options returns a DhcpServerV4PoolOption +func (obj *dhcpServerV4Pool) HasOptions() bool { + return obj.obj.Options != nil +} + +// Optional configuration for DHCPv4 address pool for the lease. +// SetOptions sets the DhcpServerV4PoolOption value in the DhcpServerV4Pool object +func (obj *dhcpServerV4Pool) SetOptions(value DhcpServerV4PoolOption) DhcpServerV4Pool { + + obj.optionsHolder = nil + obj.obj.Options = value.msg() + + return obj +} + +func (obj *dhcpServerV4Pool) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.LeaseTime != nil { + + if *obj.obj.LeaseTime < 10 || *obj.obj.LeaseTime > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("10 <= DhcpServerV4Pool.LeaseTime <= 4294967295 but Got %d", *obj.obj.LeaseTime)) + } + + } + + // StartAddress is required + if obj.obj.StartAddress == nil { + vObj.validationErrors = append(vObj.validationErrors, "StartAddress is required field on interface DhcpServerV4Pool") + } + if obj.obj.StartAddress != nil { + + err := obj.validateIpv4(obj.StartAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DhcpServerV4Pool.StartAddress")) + } + + } + + if obj.obj.PrefixLength != nil { + + if *obj.obj.PrefixLength > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= DhcpServerV4Pool.PrefixLength <= 32 but Got %d", *obj.obj.PrefixLength)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count < 1 || *obj.obj.Count > 1000000 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= DhcpServerV4Pool.Count <= 1000000 but Got %d", *obj.obj.Count)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step < 1 || *obj.obj.Step > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= DhcpServerV4Pool.Step <= 4294967295 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Options != nil { + + obj.Options().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpServerV4Pool) setDefault() { + if obj.obj.LeaseTime == nil { + obj.SetLeaseTime(86400) + } + if obj.obj.PrefixLength == nil { + obj.SetPrefixLength(24) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + +} diff --git a/gosnappi/dhcp_server_v4_pool_option.go b/gosnappi/dhcp_server_v4_pool_option.go new file mode 100644 index 00000000..a0508438 --- /dev/null +++ b/gosnappi/dhcp_server_v4_pool_option.go @@ -0,0 +1,429 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DhcpServerV4PoolOption ***** +type dhcpServerV4PoolOption struct { + validation + obj *otg.DhcpServerV4PoolOption + marshaller marshalDhcpServerV4PoolOption + unMarshaller unMarshalDhcpServerV4PoolOption +} + +func NewDhcpServerV4PoolOption() DhcpServerV4PoolOption { + obj := dhcpServerV4PoolOption{obj: &otg.DhcpServerV4PoolOption{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpServerV4PoolOption) msg() *otg.DhcpServerV4PoolOption { + return obj.obj +} + +func (obj *dhcpServerV4PoolOption) setMsg(msg *otg.DhcpServerV4PoolOption) DhcpServerV4PoolOption { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpServerV4PoolOption struct { + obj *dhcpServerV4PoolOption +} + +type marshalDhcpServerV4PoolOption interface { + // ToProto marshals DhcpServerV4PoolOption to protobuf object *otg.DhcpServerV4PoolOption + ToProto() (*otg.DhcpServerV4PoolOption, error) + // ToPbText marshals DhcpServerV4PoolOption to protobuf text + ToPbText() (string, error) + // ToYaml marshals DhcpServerV4PoolOption to YAML text + ToYaml() (string, error) + // ToJson marshals DhcpServerV4PoolOption to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpServerV4PoolOption struct { + obj *dhcpServerV4PoolOption +} + +type unMarshalDhcpServerV4PoolOption interface { + // FromProto unmarshals DhcpServerV4PoolOption from protobuf object *otg.DhcpServerV4PoolOption + FromProto(msg *otg.DhcpServerV4PoolOption) (DhcpServerV4PoolOption, error) + // FromPbText unmarshals DhcpServerV4PoolOption from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DhcpServerV4PoolOption from YAML text + FromYaml(value string) error + // FromJson unmarshals DhcpServerV4PoolOption from JSON text + FromJson(value string) error +} + +func (obj *dhcpServerV4PoolOption) Marshal() marshalDhcpServerV4PoolOption { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpServerV4PoolOption{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpServerV4PoolOption) Unmarshal() unMarshalDhcpServerV4PoolOption { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpServerV4PoolOption{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpServerV4PoolOption) ToProto() (*otg.DhcpServerV4PoolOption, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpServerV4PoolOption) FromProto(msg *otg.DhcpServerV4PoolOption) (DhcpServerV4PoolOption, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpServerV4PoolOption) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpServerV4PoolOption) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpServerV4PoolOption) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpServerV4PoolOption) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpServerV4PoolOption) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpServerV4PoolOption) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpServerV4PoolOption) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpServerV4PoolOption) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpServerV4PoolOption) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpServerV4PoolOption) Clone() (DhcpServerV4PoolOption, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpServerV4PoolOption() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DhcpServerV4PoolOption is optional configuration for DHCPv4 address pool for the lease. +type DhcpServerV4PoolOption interface { + Validation + // msg marshals DhcpServerV4PoolOption to protobuf object *otg.DhcpServerV4PoolOption + // and doesn't set defaults + msg() *otg.DhcpServerV4PoolOption + // setMsg unmarshals DhcpServerV4PoolOption from protobuf object *otg.DhcpServerV4PoolOption + // and doesn't set defaults + setMsg(*otg.DhcpServerV4PoolOption) DhcpServerV4PoolOption + // provides marshal interface + Marshal() marshalDhcpServerV4PoolOption + // provides unmarshal interface + Unmarshal() unMarshalDhcpServerV4PoolOption + // validate validates DhcpServerV4PoolOption + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DhcpServerV4PoolOption, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RouterAddress returns string, set in DhcpServerV4PoolOption. + RouterAddress() string + // SetRouterAddress assigns string provided by user to DhcpServerV4PoolOption + SetRouterAddress(value string) DhcpServerV4PoolOption + // HasRouterAddress checks if RouterAddress has been set in DhcpServerV4PoolOption + HasRouterAddress() bool + // PrimaryDnsServer returns string, set in DhcpServerV4PoolOption. + PrimaryDnsServer() string + // SetPrimaryDnsServer assigns string provided by user to DhcpServerV4PoolOption + SetPrimaryDnsServer(value string) DhcpServerV4PoolOption + // HasPrimaryDnsServer checks if PrimaryDnsServer has been set in DhcpServerV4PoolOption + HasPrimaryDnsServer() bool + // SecondaryDnsServer returns string, set in DhcpServerV4PoolOption. + SecondaryDnsServer() string + // SetSecondaryDnsServer assigns string provided by user to DhcpServerV4PoolOption + SetSecondaryDnsServer(value string) DhcpServerV4PoolOption + // HasSecondaryDnsServer checks if SecondaryDnsServer has been set in DhcpServerV4PoolOption + HasSecondaryDnsServer() bool + // EchoRelayWithTlv82 returns bool, set in DhcpServerV4PoolOption. + EchoRelayWithTlv82() bool + // SetEchoRelayWithTlv82 assigns bool provided by user to DhcpServerV4PoolOption + SetEchoRelayWithTlv82(value bool) DhcpServerV4PoolOption + // HasEchoRelayWithTlv82 checks if EchoRelayWithTlv82 has been set in DhcpServerV4PoolOption + HasEchoRelayWithTlv82() bool +} + +// The Router address advertised by the DHCPv4 server in Offer and Ack messages. +// RouterAddress returns a string +func (obj *dhcpServerV4PoolOption) RouterAddress() string { + + return *obj.obj.RouterAddress + +} + +// The Router address advertised by the DHCPv4 server in Offer and Ack messages. +// RouterAddress returns a string +func (obj *dhcpServerV4PoolOption) HasRouterAddress() bool { + return obj.obj.RouterAddress != nil +} + +// The Router address advertised by the DHCPv4 server in Offer and Ack messages. +// SetRouterAddress sets the string value in the DhcpServerV4PoolOption object +func (obj *dhcpServerV4PoolOption) SetRouterAddress(value string) DhcpServerV4PoolOption { + + obj.obj.RouterAddress = &value + return obj +} + +// The primary DNS server address that is offered to DHCP clients that request this information through a TLV option. +// PrimaryDnsServer returns a string +func (obj *dhcpServerV4PoolOption) PrimaryDnsServer() string { + + return *obj.obj.PrimaryDnsServer + +} + +// The primary DNS server address that is offered to DHCP clients that request this information through a TLV option. +// PrimaryDnsServer returns a string +func (obj *dhcpServerV4PoolOption) HasPrimaryDnsServer() bool { + return obj.obj.PrimaryDnsServer != nil +} + +// The primary DNS server address that is offered to DHCP clients that request this information through a TLV option. +// SetPrimaryDnsServer sets the string value in the DhcpServerV4PoolOption object +func (obj *dhcpServerV4PoolOption) SetPrimaryDnsServer(value string) DhcpServerV4PoolOption { + + obj.obj.PrimaryDnsServer = &value + return obj +} + +// The primary DNS server address that is offered to DHCP clients that request this information through a TLV option. +// SecondaryDnsServer returns a string +func (obj *dhcpServerV4PoolOption) SecondaryDnsServer() string { + + return *obj.obj.SecondaryDnsServer + +} + +// The primary DNS server address that is offered to DHCP clients that request this information through a TLV option. +// SecondaryDnsServer returns a string +func (obj *dhcpServerV4PoolOption) HasSecondaryDnsServer() bool { + return obj.obj.SecondaryDnsServer != nil +} + +// The primary DNS server address that is offered to DHCP clients that request this information through a TLV option. +// SetSecondaryDnsServer sets the string value in the DhcpServerV4PoolOption object +func (obj *dhcpServerV4PoolOption) SetSecondaryDnsServer(value string) DhcpServerV4PoolOption { + + obj.obj.SecondaryDnsServer = &value + return obj +} + +// If selected, the DHCP server includes in its replies the TLV information for the DHCPv4 Relay Agent Option 82 and the corresponding sub-TLVs that it receives from a DHCP relay agent, otherwise it replies without including this TLV. +// EchoRelayWithTlv82 returns a bool +func (obj *dhcpServerV4PoolOption) EchoRelayWithTlv82() bool { + + return *obj.obj.EchoRelayWithTlv_82 + +} + +// If selected, the DHCP server includes in its replies the TLV information for the DHCPv4 Relay Agent Option 82 and the corresponding sub-TLVs that it receives from a DHCP relay agent, otherwise it replies without including this TLV. +// EchoRelayWithTlv82 returns a bool +func (obj *dhcpServerV4PoolOption) HasEchoRelayWithTlv82() bool { + return obj.obj.EchoRelayWithTlv_82 != nil +} + +// If selected, the DHCP server includes in its replies the TLV information for the DHCPv4 Relay Agent Option 82 and the corresponding sub-TLVs that it receives from a DHCP relay agent, otherwise it replies without including this TLV. +// SetEchoRelayWithTlv82 sets the bool value in the DhcpServerV4PoolOption object +func (obj *dhcpServerV4PoolOption) SetEchoRelayWithTlv82(value bool) DhcpServerV4PoolOption { + + obj.obj.EchoRelayWithTlv_82 = &value + return obj +} + +func (obj *dhcpServerV4PoolOption) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RouterAddress != nil { + + err := obj.validateIpv4(obj.RouterAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DhcpServerV4PoolOption.RouterAddress")) + } + + } + + if obj.obj.PrimaryDnsServer != nil { + + err := obj.validateIpv4(obj.PrimaryDnsServer()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DhcpServerV4PoolOption.PrimaryDnsServer")) + } + + } + + if obj.obj.SecondaryDnsServer != nil { + + err := obj.validateIpv4(obj.SecondaryDnsServer()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DhcpServerV4PoolOption.SecondaryDnsServer")) + } + + } + +} + +func (obj *dhcpServerV4PoolOption) setDefault() { + if obj.obj.RouterAddress == nil { + obj.SetRouterAddress("0.0.0.0") + } + if obj.obj.PrimaryDnsServer == nil { + obj.SetPrimaryDnsServer("0.0.0.0") + } + if obj.obj.SecondaryDnsServer == nil { + obj.SetSecondaryDnsServer("0.0.0.0") + } + if obj.obj.EchoRelayWithTlv_82 == nil { + obj.SetEchoRelayWithTlv82(true) + } + +} diff --git a/gosnappi/dhcp_server_v6.go b/gosnappi/dhcp_server_v6.go new file mode 100644 index 00000000..57002c90 --- /dev/null +++ b/gosnappi/dhcp_server_v6.go @@ -0,0 +1,559 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DhcpServerV6 ***** +type dhcpServerV6 struct { + validation + obj *otg.DhcpServerV6 + marshaller marshalDhcpServerV6 + unMarshaller unMarshalDhcpServerV6 + leasesHolder DhcpServerV6DhcpV6ServerLeaseIter + optionsHolder Dhcpv6ServerOptions +} + +func NewDhcpServerV6() DhcpServerV6 { + obj := dhcpServerV6{obj: &otg.DhcpServerV6{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpServerV6) msg() *otg.DhcpServerV6 { + return obj.obj +} + +func (obj *dhcpServerV6) setMsg(msg *otg.DhcpServerV6) DhcpServerV6 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpServerV6 struct { + obj *dhcpServerV6 +} + +type marshalDhcpServerV6 interface { + // ToProto marshals DhcpServerV6 to protobuf object *otg.DhcpServerV6 + ToProto() (*otg.DhcpServerV6, error) + // ToPbText marshals DhcpServerV6 to protobuf text + ToPbText() (string, error) + // ToYaml marshals DhcpServerV6 to YAML text + ToYaml() (string, error) + // ToJson marshals DhcpServerV6 to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpServerV6 struct { + obj *dhcpServerV6 +} + +type unMarshalDhcpServerV6 interface { + // FromProto unmarshals DhcpServerV6 from protobuf object *otg.DhcpServerV6 + FromProto(msg *otg.DhcpServerV6) (DhcpServerV6, error) + // FromPbText unmarshals DhcpServerV6 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DhcpServerV6 from YAML text + FromYaml(value string) error + // FromJson unmarshals DhcpServerV6 from JSON text + FromJson(value string) error +} + +func (obj *dhcpServerV6) Marshal() marshalDhcpServerV6 { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpServerV6{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpServerV6) Unmarshal() unMarshalDhcpServerV6 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpServerV6{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpServerV6) ToProto() (*otg.DhcpServerV6, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpServerV6) FromProto(msg *otg.DhcpServerV6) (DhcpServerV6, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpServerV6) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpServerV6) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpServerV6) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpServerV6) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpServerV6) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpServerV6) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpServerV6) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpServerV6) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpServerV6) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpServerV6) Clone() (DhcpServerV6, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpServerV6() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpServerV6) setNil() { + obj.leasesHolder = nil + obj.optionsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DhcpServerV6 is configuration for emulated DHCPv6 Server. +type DhcpServerV6 interface { + Validation + // msg marshals DhcpServerV6 to protobuf object *otg.DhcpServerV6 + // and doesn't set defaults + msg() *otg.DhcpServerV6 + // setMsg unmarshals DhcpServerV6 from protobuf object *otg.DhcpServerV6 + // and doesn't set defaults + setMsg(*otg.DhcpServerV6) DhcpServerV6 + // provides marshal interface + Marshal() marshalDhcpServerV6 + // provides unmarshal interface + Unmarshal() unMarshalDhcpServerV6 + // validate validates DhcpServerV6 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DhcpServerV6, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in DhcpServerV6. + Name() string + // SetName assigns string provided by user to DhcpServerV6 + SetName(value string) DhcpServerV6 + // Ipv6Name returns string, set in DhcpServerV6. + Ipv6Name() string + // SetIpv6Name assigns string provided by user to DhcpServerV6 + SetIpv6Name(value string) DhcpServerV6 + // RapidCommit returns bool, set in DhcpServerV6. + RapidCommit() bool + // SetRapidCommit assigns bool provided by user to DhcpServerV6 + SetRapidCommit(value bool) DhcpServerV6 + // HasRapidCommit checks if RapidCommit has been set in DhcpServerV6 + HasRapidCommit() bool + // ReconfigureViaRelayAgent returns bool, set in DhcpServerV6. + ReconfigureViaRelayAgent() bool + // SetReconfigureViaRelayAgent assigns bool provided by user to DhcpServerV6 + SetReconfigureViaRelayAgent(value bool) DhcpServerV6 + // HasReconfigureViaRelayAgent checks if ReconfigureViaRelayAgent has been set in DhcpServerV6 + HasReconfigureViaRelayAgent() bool + // Leases returns DhcpServerV6DhcpV6ServerLeaseIterIter, set in DhcpServerV6 + Leases() DhcpServerV6DhcpV6ServerLeaseIter + // Options returns Dhcpv6ServerOptions, set in DhcpServerV6. + // Dhcpv6ServerOptions is dHCP server options, these configured options are sent in Dhcp server messages. + Options() Dhcpv6ServerOptions + // SetOptions assigns Dhcpv6ServerOptions provided by user to DhcpServerV6. + // Dhcpv6ServerOptions is dHCP server options, these configured options are sent in Dhcp server messages. + SetOptions(value Dhcpv6ServerOptions) DhcpServerV6 + // HasOptions checks if Options has been set in DhcpServerV6 + HasOptions() bool + setNil() +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *dhcpServerV6) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the DhcpServerV6 object +func (obj *dhcpServerV6) SetName(value string) DhcpServerV6 { + + obj.obj.Name = &value + return obj +} + +// The unique name of the IPv6 on which DHCPv6 server will run. +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// +// Ipv6Name returns a string +func (obj *dhcpServerV6) Ipv6Name() string { + + return *obj.obj.Ipv6Name + +} + +// The unique name of the IPv6 on which DHCPv6 server will run. +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// +// SetIpv6Name sets the string value in the DhcpServerV6 object +func (obj *dhcpServerV6) SetIpv6Name(value string) DhcpServerV6 { + + obj.obj.Ipv6Name = &value + return obj +} + +// If Rapid Commit is set, server responds to client initiated Rapid Commit two-message exchanges. +// RapidCommit returns a bool +func (obj *dhcpServerV6) RapidCommit() bool { + + return *obj.obj.RapidCommit + +} + +// If Rapid Commit is set, server responds to client initiated Rapid Commit two-message exchanges. +// RapidCommit returns a bool +func (obj *dhcpServerV6) HasRapidCommit() bool { + return obj.obj.RapidCommit != nil +} + +// If Rapid Commit is set, server responds to client initiated Rapid Commit two-message exchanges. +// SetRapidCommit sets the bool value in the DhcpServerV6 object +func (obj *dhcpServerV6) SetRapidCommit(value bool) DhcpServerV6 { + + obj.obj.RapidCommit = &value + return obj +} + +// If the server does not have an address to which it can send the Reconfigure message directly to the client, the server uses a Relay-reply message to send the Reconfigure message to a relay agent that will relay the message to the client. +// ReconfigureViaRelayAgent returns a bool +func (obj *dhcpServerV6) ReconfigureViaRelayAgent() bool { + + return *obj.obj.ReconfigureViaRelayAgent + +} + +// If the server does not have an address to which it can send the Reconfigure message directly to the client, the server uses a Relay-reply message to send the Reconfigure message to a relay agent that will relay the message to the client. +// ReconfigureViaRelayAgent returns a bool +func (obj *dhcpServerV6) HasReconfigureViaRelayAgent() bool { + return obj.obj.ReconfigureViaRelayAgent != nil +} + +// If the server does not have an address to which it can send the Reconfigure message directly to the client, the server uses a Relay-reply message to send the Reconfigure message to a relay agent that will relay the message to the client. +// SetReconfigureViaRelayAgent sets the bool value in the DhcpServerV6 object +func (obj *dhcpServerV6) SetReconfigureViaRelayAgent(value bool) DhcpServerV6 { + + obj.obj.ReconfigureViaRelayAgent = &value + return obj +} + +// Array of DHCP pools configured on a server. +// Leases returns a []DhcpV6ServerLease +func (obj *dhcpServerV6) Leases() DhcpServerV6DhcpV6ServerLeaseIter { + if len(obj.obj.Leases) == 0 { + obj.obj.Leases = []*otg.DhcpV6ServerLease{} + } + if obj.leasesHolder == nil { + obj.leasesHolder = newDhcpServerV6DhcpV6ServerLeaseIter(&obj.obj.Leases).setMsg(obj) + } + return obj.leasesHolder +} + +type dhcpServerV6DhcpV6ServerLeaseIter struct { + obj *dhcpServerV6 + dhcpV6ServerLeaseSlice []DhcpV6ServerLease + fieldPtr *[]*otg.DhcpV6ServerLease +} + +func newDhcpServerV6DhcpV6ServerLeaseIter(ptr *[]*otg.DhcpV6ServerLease) DhcpServerV6DhcpV6ServerLeaseIter { + return &dhcpServerV6DhcpV6ServerLeaseIter{fieldPtr: ptr} +} + +type DhcpServerV6DhcpV6ServerLeaseIter interface { + setMsg(*dhcpServerV6) DhcpServerV6DhcpV6ServerLeaseIter + Items() []DhcpV6ServerLease + Add() DhcpV6ServerLease + Append(items ...DhcpV6ServerLease) DhcpServerV6DhcpV6ServerLeaseIter + Set(index int, newObj DhcpV6ServerLease) DhcpServerV6DhcpV6ServerLeaseIter + Clear() DhcpServerV6DhcpV6ServerLeaseIter + clearHolderSlice() DhcpServerV6DhcpV6ServerLeaseIter + appendHolderSlice(item DhcpV6ServerLease) DhcpServerV6DhcpV6ServerLeaseIter +} + +func (obj *dhcpServerV6DhcpV6ServerLeaseIter) setMsg(msg *dhcpServerV6) DhcpServerV6DhcpV6ServerLeaseIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpV6ServerLease{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *dhcpServerV6DhcpV6ServerLeaseIter) Items() []DhcpV6ServerLease { + return obj.dhcpV6ServerLeaseSlice +} + +func (obj *dhcpServerV6DhcpV6ServerLeaseIter) Add() DhcpV6ServerLease { + newObj := &otg.DhcpV6ServerLease{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpV6ServerLease{obj: newObj} + newLibObj.setDefault() + obj.dhcpV6ServerLeaseSlice = append(obj.dhcpV6ServerLeaseSlice, newLibObj) + return newLibObj +} + +func (obj *dhcpServerV6DhcpV6ServerLeaseIter) Append(items ...DhcpV6ServerLease) DhcpServerV6DhcpV6ServerLeaseIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpV6ServerLeaseSlice = append(obj.dhcpV6ServerLeaseSlice, item) + } + return obj +} + +func (obj *dhcpServerV6DhcpV6ServerLeaseIter) Set(index int, newObj DhcpV6ServerLease) DhcpServerV6DhcpV6ServerLeaseIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpV6ServerLeaseSlice[index] = newObj + return obj +} +func (obj *dhcpServerV6DhcpV6ServerLeaseIter) Clear() DhcpServerV6DhcpV6ServerLeaseIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.DhcpV6ServerLease{} + obj.dhcpV6ServerLeaseSlice = []DhcpV6ServerLease{} + } + return obj +} +func (obj *dhcpServerV6DhcpV6ServerLeaseIter) clearHolderSlice() DhcpServerV6DhcpV6ServerLeaseIter { + if len(obj.dhcpV6ServerLeaseSlice) > 0 { + obj.dhcpV6ServerLeaseSlice = []DhcpV6ServerLease{} + } + return obj +} +func (obj *dhcpServerV6DhcpV6ServerLeaseIter) appendHolderSlice(item DhcpV6ServerLease) DhcpServerV6DhcpV6ServerLeaseIter { + obj.dhcpV6ServerLeaseSlice = append(obj.dhcpV6ServerLeaseSlice, item) + return obj +} + +// Optional DHCPv4 Server options that are sent in Dhcp server messages. +// Options returns a Dhcpv6ServerOptions +func (obj *dhcpServerV6) Options() Dhcpv6ServerOptions { + if obj.obj.Options == nil { + obj.obj.Options = NewDhcpv6ServerOptions().msg() + } + if obj.optionsHolder == nil { + obj.optionsHolder = &dhcpv6ServerOptions{obj: obj.obj.Options} + } + return obj.optionsHolder +} + +// Optional DHCPv4 Server options that are sent in Dhcp server messages. +// Options returns a Dhcpv6ServerOptions +func (obj *dhcpServerV6) HasOptions() bool { + return obj.obj.Options != nil +} + +// Optional DHCPv4 Server options that are sent in Dhcp server messages. +// SetOptions sets the Dhcpv6ServerOptions value in the DhcpServerV6 object +func (obj *dhcpServerV6) SetOptions(value Dhcpv6ServerOptions) DhcpServerV6 { + + obj.optionsHolder = nil + obj.obj.Options = value.msg() + + return obj +} + +func (obj *dhcpServerV6) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface DhcpServerV6") + } + + // Ipv6Name is required + if obj.obj.Ipv6Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv6Name is required field on interface DhcpServerV6") + } + + if len(obj.obj.Leases) != 0 { + + if set_default { + obj.Leases().clearHolderSlice() + for _, item := range obj.obj.Leases { + obj.Leases().appendHolderSlice(&dhcpV6ServerLease{obj: item}) + } + } + for _, item := range obj.Leases().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Options != nil { + + obj.Options().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpServerV6) setDefault() { + if obj.obj.RapidCommit == nil { + obj.SetRapidCommit(false) + } + if obj.obj.ReconfigureViaRelayAgent == nil { + obj.SetReconfigureViaRelayAgent(false) + } + +} diff --git a/gosnappi/dhcp_v6_server_dns.go b/gosnappi/dhcp_v6_server_dns.go new file mode 100644 index 00000000..f825b78e --- /dev/null +++ b/gosnappi/dhcp_v6_server_dns.go @@ -0,0 +1,424 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DhcpV6ServerDns ***** +type dhcpV6ServerDns struct { + validation + obj *otg.DhcpV6ServerDns + marshaller marshalDhcpV6ServerDns + unMarshaller unMarshalDhcpV6ServerDns + secondaryDnsHolder DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter +} + +func NewDhcpV6ServerDns() DhcpV6ServerDns { + obj := dhcpV6ServerDns{obj: &otg.DhcpV6ServerDns{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpV6ServerDns) msg() *otg.DhcpV6ServerDns { + return obj.obj +} + +func (obj *dhcpV6ServerDns) setMsg(msg *otg.DhcpV6ServerDns) DhcpV6ServerDns { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpV6ServerDns struct { + obj *dhcpV6ServerDns +} + +type marshalDhcpV6ServerDns interface { + // ToProto marshals DhcpV6ServerDns to protobuf object *otg.DhcpV6ServerDns + ToProto() (*otg.DhcpV6ServerDns, error) + // ToPbText marshals DhcpV6ServerDns to protobuf text + ToPbText() (string, error) + // ToYaml marshals DhcpV6ServerDns to YAML text + ToYaml() (string, error) + // ToJson marshals DhcpV6ServerDns to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpV6ServerDns struct { + obj *dhcpV6ServerDns +} + +type unMarshalDhcpV6ServerDns interface { + // FromProto unmarshals DhcpV6ServerDns from protobuf object *otg.DhcpV6ServerDns + FromProto(msg *otg.DhcpV6ServerDns) (DhcpV6ServerDns, error) + // FromPbText unmarshals DhcpV6ServerDns from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DhcpV6ServerDns from YAML text + FromYaml(value string) error + // FromJson unmarshals DhcpV6ServerDns from JSON text + FromJson(value string) error +} + +func (obj *dhcpV6ServerDns) Marshal() marshalDhcpV6ServerDns { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpV6ServerDns{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpV6ServerDns) Unmarshal() unMarshalDhcpV6ServerDns { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpV6ServerDns{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpV6ServerDns) ToProto() (*otg.DhcpV6ServerDns, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpV6ServerDns) FromProto(msg *otg.DhcpV6ServerDns) (DhcpV6ServerDns, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpV6ServerDns) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpV6ServerDns) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpV6ServerDns) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpV6ServerDns) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpV6ServerDns) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpV6ServerDns) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpV6ServerDns) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpV6ServerDns) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpV6ServerDns) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpV6ServerDns) Clone() (DhcpV6ServerDns, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpV6ServerDns() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpV6ServerDns) setNil() { + obj.secondaryDnsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DhcpV6ServerDns is optional Dns configuration for DHCPv6 server. +type DhcpV6ServerDns interface { + Validation + // msg marshals DhcpV6ServerDns to protobuf object *otg.DhcpV6ServerDns + // and doesn't set defaults + msg() *otg.DhcpV6ServerDns + // setMsg unmarshals DhcpV6ServerDns from protobuf object *otg.DhcpV6ServerDns + // and doesn't set defaults + setMsg(*otg.DhcpV6ServerDns) DhcpV6ServerDns + // provides marshal interface + Marshal() marshalDhcpV6ServerDns + // provides unmarshal interface + Unmarshal() unMarshalDhcpV6ServerDns + // validate validates DhcpV6ServerDns + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DhcpV6ServerDns, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Primary returns string, set in DhcpV6ServerDns. + Primary() string + // SetPrimary assigns string provided by user to DhcpV6ServerDns + SetPrimary(value string) DhcpV6ServerDns + // SecondaryDns returns DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIterIter, set in DhcpV6ServerDns + SecondaryDns() DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter + setNil() +} + +// The primary DNS server address that is offered to DHCP clients that request this information through a TLV option. +// Primary returns a string +func (obj *dhcpV6ServerDns) Primary() string { + + return *obj.obj.Primary + +} + +// The primary DNS server address that is offered to DHCP clients that request this information through a TLV option. +// SetPrimary sets the string value in the DhcpV6ServerDns object +func (obj *dhcpV6ServerDns) SetPrimary(value string) DhcpV6ServerDns { + + obj.obj.Primary = &value + return obj +} + +// DHCP server secondary dns configuration options. If included secondary DNS server address will be offered to +// DHCP clients that request this information through a TLV option. +// SecondaryDns returns a []DhcpV6ServerSecondaryDns +func (obj *dhcpV6ServerDns) SecondaryDns() DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter { + if len(obj.obj.SecondaryDns) == 0 { + obj.obj.SecondaryDns = []*otg.DhcpV6ServerSecondaryDns{} + } + if obj.secondaryDnsHolder == nil { + obj.secondaryDnsHolder = newDhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter(&obj.obj.SecondaryDns).setMsg(obj) + } + return obj.secondaryDnsHolder +} + +type dhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter struct { + obj *dhcpV6ServerDns + dhcpV6ServerSecondaryDnsSlice []DhcpV6ServerSecondaryDns + fieldPtr *[]*otg.DhcpV6ServerSecondaryDns +} + +func newDhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter(ptr *[]*otg.DhcpV6ServerSecondaryDns) DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter { + return &dhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter{fieldPtr: ptr} +} + +type DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter interface { + setMsg(*dhcpV6ServerDns) DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter + Items() []DhcpV6ServerSecondaryDns + Add() DhcpV6ServerSecondaryDns + Append(items ...DhcpV6ServerSecondaryDns) DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter + Set(index int, newObj DhcpV6ServerSecondaryDns) DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter + Clear() DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter + clearHolderSlice() DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter + appendHolderSlice(item DhcpV6ServerSecondaryDns) DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter +} + +func (obj *dhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter) setMsg(msg *dhcpV6ServerDns) DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpV6ServerSecondaryDns{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *dhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter) Items() []DhcpV6ServerSecondaryDns { + return obj.dhcpV6ServerSecondaryDnsSlice +} + +func (obj *dhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter) Add() DhcpV6ServerSecondaryDns { + newObj := &otg.DhcpV6ServerSecondaryDns{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpV6ServerSecondaryDns{obj: newObj} + newLibObj.setDefault() + obj.dhcpV6ServerSecondaryDnsSlice = append(obj.dhcpV6ServerSecondaryDnsSlice, newLibObj) + return newLibObj +} + +func (obj *dhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter) Append(items ...DhcpV6ServerSecondaryDns) DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpV6ServerSecondaryDnsSlice = append(obj.dhcpV6ServerSecondaryDnsSlice, item) + } + return obj +} + +func (obj *dhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter) Set(index int, newObj DhcpV6ServerSecondaryDns) DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpV6ServerSecondaryDnsSlice[index] = newObj + return obj +} +func (obj *dhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter) Clear() DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.DhcpV6ServerSecondaryDns{} + obj.dhcpV6ServerSecondaryDnsSlice = []DhcpV6ServerSecondaryDns{} + } + return obj +} +func (obj *dhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter) clearHolderSlice() DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter { + if len(obj.dhcpV6ServerSecondaryDnsSlice) > 0 { + obj.dhcpV6ServerSecondaryDnsSlice = []DhcpV6ServerSecondaryDns{} + } + return obj +} +func (obj *dhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter) appendHolderSlice(item DhcpV6ServerSecondaryDns) DhcpV6ServerDnsDhcpV6ServerSecondaryDnsIter { + obj.dhcpV6ServerSecondaryDnsSlice = append(obj.dhcpV6ServerSecondaryDnsSlice, item) + return obj +} + +func (obj *dhcpV6ServerDns) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Primary is required + if obj.obj.Primary == nil { + vObj.validationErrors = append(vObj.validationErrors, "Primary is required field on interface DhcpV6ServerDns") + } + if obj.obj.Primary != nil { + + err := obj.validateIpv6(obj.Primary()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DhcpV6ServerDns.Primary")) + } + + } + + if len(obj.obj.SecondaryDns) != 0 { + + if set_default { + obj.SecondaryDns().clearHolderSlice() + for _, item := range obj.obj.SecondaryDns { + obj.SecondaryDns().appendHolderSlice(&dhcpV6ServerSecondaryDns{obj: item}) + } + } + for _, item := range obj.SecondaryDns().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *dhcpV6ServerDns) setDefault() { + +} diff --git a/gosnappi/dhcp_v6_server_lease.go b/gosnappi/dhcp_v6_server_lease.go new file mode 100644 index 00000000..518b61e8 --- /dev/null +++ b/gosnappi/dhcp_v6_server_lease.go @@ -0,0 +1,366 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DhcpV6ServerLease ***** +type dhcpV6ServerLease struct { + validation + obj *otg.DhcpV6ServerLease + marshaller marshalDhcpV6ServerLease + unMarshaller unMarshalDhcpV6ServerLease + iaTypeHolder Dhcpv6ServerIaType +} + +func NewDhcpV6ServerLease() DhcpV6ServerLease { + obj := dhcpV6ServerLease{obj: &otg.DhcpV6ServerLease{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpV6ServerLease) msg() *otg.DhcpV6ServerLease { + return obj.obj +} + +func (obj *dhcpV6ServerLease) setMsg(msg *otg.DhcpV6ServerLease) DhcpV6ServerLease { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpV6ServerLease struct { + obj *dhcpV6ServerLease +} + +type marshalDhcpV6ServerLease interface { + // ToProto marshals DhcpV6ServerLease to protobuf object *otg.DhcpV6ServerLease + ToProto() (*otg.DhcpV6ServerLease, error) + // ToPbText marshals DhcpV6ServerLease to protobuf text + ToPbText() (string, error) + // ToYaml marshals DhcpV6ServerLease to YAML text + ToYaml() (string, error) + // ToJson marshals DhcpV6ServerLease to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpV6ServerLease struct { + obj *dhcpV6ServerLease +} + +type unMarshalDhcpV6ServerLease interface { + // FromProto unmarshals DhcpV6ServerLease from protobuf object *otg.DhcpV6ServerLease + FromProto(msg *otg.DhcpV6ServerLease) (DhcpV6ServerLease, error) + // FromPbText unmarshals DhcpV6ServerLease from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DhcpV6ServerLease from YAML text + FromYaml(value string) error + // FromJson unmarshals DhcpV6ServerLease from JSON text + FromJson(value string) error +} + +func (obj *dhcpV6ServerLease) Marshal() marshalDhcpV6ServerLease { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpV6ServerLease{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpV6ServerLease) Unmarshal() unMarshalDhcpV6ServerLease { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpV6ServerLease{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpV6ServerLease) ToProto() (*otg.DhcpV6ServerLease, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpV6ServerLease) FromProto(msg *otg.DhcpV6ServerLease) (DhcpV6ServerLease, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpV6ServerLease) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpV6ServerLease) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpV6ServerLease) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpV6ServerLease) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpV6ServerLease) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpV6ServerLease) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpV6ServerLease) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpV6ServerLease) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpV6ServerLease) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpV6ServerLease) Clone() (DhcpV6ServerLease, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpV6ServerLease() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpV6ServerLease) setNil() { + obj.iaTypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// DhcpV6ServerLease is one DHCP pool configuration on a server. +type DhcpV6ServerLease interface { + Validation + // msg marshals DhcpV6ServerLease to protobuf object *otg.DhcpV6ServerLease + // and doesn't set defaults + msg() *otg.DhcpV6ServerLease + // setMsg unmarshals DhcpV6ServerLease from protobuf object *otg.DhcpV6ServerLease + // and doesn't set defaults + setMsg(*otg.DhcpV6ServerLease) DhcpV6ServerLease + // provides marshal interface + Marshal() marshalDhcpV6ServerLease + // provides unmarshal interface + Unmarshal() unMarshalDhcpV6ServerLease + // validate validates DhcpV6ServerLease + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DhcpV6ServerLease, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LeaseTime returns uint32, set in DhcpV6ServerLease. + LeaseTime() uint32 + // SetLeaseTime assigns uint32 provided by user to DhcpV6ServerLease + SetLeaseTime(value uint32) DhcpV6ServerLease + // HasLeaseTime checks if LeaseTime has been set in DhcpV6ServerLease + HasLeaseTime() bool + // IaType returns Dhcpv6ServerIaType, set in DhcpV6ServerLease. + // Dhcpv6ServerIaType is description is TBD + IaType() Dhcpv6ServerIaType + // SetIaType assigns Dhcpv6ServerIaType provided by user to DhcpV6ServerLease. + // Dhcpv6ServerIaType is description is TBD + SetIaType(value Dhcpv6ServerIaType) DhcpV6ServerLease + setNil() +} + +// The Life Time length in seconds that is assigned to a lease if the requesting DHCP client does not specify a specific expiration time. +// LeaseTime returns a uint32 +func (obj *dhcpV6ServerLease) LeaseTime() uint32 { + + return *obj.obj.LeaseTime + +} + +// The Life Time length in seconds that is assigned to a lease if the requesting DHCP client does not specify a specific expiration time. +// LeaseTime returns a uint32 +func (obj *dhcpV6ServerLease) HasLeaseTime() bool { + return obj.obj.LeaseTime != nil +} + +// The Life Time length in seconds that is assigned to a lease if the requesting DHCP client does not specify a specific expiration time. +// SetLeaseTime sets the uint32 value in the DhcpV6ServerLease object +func (obj *dhcpV6ServerLease) SetLeaseTime(value uint32) DhcpV6ServerLease { + + obj.obj.LeaseTime = &value + return obj +} + +// description is TBD +// IaType returns a Dhcpv6ServerIaType +func (obj *dhcpV6ServerLease) IaType() Dhcpv6ServerIaType { + if obj.obj.IaType == nil { + obj.obj.IaType = NewDhcpv6ServerIaType().msg() + } + if obj.iaTypeHolder == nil { + obj.iaTypeHolder = &dhcpv6ServerIaType{obj: obj.obj.IaType} + } + return obj.iaTypeHolder +} + +// description is TBD +// SetIaType sets the Dhcpv6ServerIaType value in the DhcpV6ServerLease object +func (obj *dhcpV6ServerLease) SetIaType(value Dhcpv6ServerIaType) DhcpV6ServerLease { + + obj.iaTypeHolder = nil + obj.obj.IaType = value.msg() + + return obj +} + +func (obj *dhcpV6ServerLease) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.LeaseTime != nil { + + if *obj.obj.LeaseTime < 300 || *obj.obj.LeaseTime > 30000000 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("300 <= DhcpV6ServerLease.LeaseTime <= 30000000 but Got %d", *obj.obj.LeaseTime)) + } + + } + + // IaType is required + if obj.obj.IaType == nil { + vObj.validationErrors = append(vObj.validationErrors, "IaType is required field on interface DhcpV6ServerLease") + } + + if obj.obj.IaType != nil { + + obj.IaType().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpV6ServerLease) setDefault() { + if obj.obj.LeaseTime == nil { + obj.SetLeaseTime(86400) + } + +} diff --git a/gosnappi/dhcp_v6_server_secondary_dns.go b/gosnappi/dhcp_v6_server_secondary_dns.go new file mode 100644 index 00000000..72bb7872 --- /dev/null +++ b/gosnappi/dhcp_v6_server_secondary_dns.go @@ -0,0 +1,315 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** DhcpV6ServerSecondaryDns ***** +type dhcpV6ServerSecondaryDns struct { + validation + obj *otg.DhcpV6ServerSecondaryDns + marshaller marshalDhcpV6ServerSecondaryDns + unMarshaller unMarshalDhcpV6ServerSecondaryDns +} + +func NewDhcpV6ServerSecondaryDns() DhcpV6ServerSecondaryDns { + obj := dhcpV6ServerSecondaryDns{obj: &otg.DhcpV6ServerSecondaryDns{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpV6ServerSecondaryDns) msg() *otg.DhcpV6ServerSecondaryDns { + return obj.obj +} + +func (obj *dhcpV6ServerSecondaryDns) setMsg(msg *otg.DhcpV6ServerSecondaryDns) DhcpV6ServerSecondaryDns { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpV6ServerSecondaryDns struct { + obj *dhcpV6ServerSecondaryDns +} + +type marshalDhcpV6ServerSecondaryDns interface { + // ToProto marshals DhcpV6ServerSecondaryDns to protobuf object *otg.DhcpV6ServerSecondaryDns + ToProto() (*otg.DhcpV6ServerSecondaryDns, error) + // ToPbText marshals DhcpV6ServerSecondaryDns to protobuf text + ToPbText() (string, error) + // ToYaml marshals DhcpV6ServerSecondaryDns to YAML text + ToYaml() (string, error) + // ToJson marshals DhcpV6ServerSecondaryDns to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpV6ServerSecondaryDns struct { + obj *dhcpV6ServerSecondaryDns +} + +type unMarshalDhcpV6ServerSecondaryDns interface { + // FromProto unmarshals DhcpV6ServerSecondaryDns from protobuf object *otg.DhcpV6ServerSecondaryDns + FromProto(msg *otg.DhcpV6ServerSecondaryDns) (DhcpV6ServerSecondaryDns, error) + // FromPbText unmarshals DhcpV6ServerSecondaryDns from protobuf text + FromPbText(value string) error + // FromYaml unmarshals DhcpV6ServerSecondaryDns from YAML text + FromYaml(value string) error + // FromJson unmarshals DhcpV6ServerSecondaryDns from JSON text + FromJson(value string) error +} + +func (obj *dhcpV6ServerSecondaryDns) Marshal() marshalDhcpV6ServerSecondaryDns { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpV6ServerSecondaryDns{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpV6ServerSecondaryDns) Unmarshal() unMarshalDhcpV6ServerSecondaryDns { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpV6ServerSecondaryDns{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpV6ServerSecondaryDns) ToProto() (*otg.DhcpV6ServerSecondaryDns, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpV6ServerSecondaryDns) FromProto(msg *otg.DhcpV6ServerSecondaryDns) (DhcpV6ServerSecondaryDns, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpV6ServerSecondaryDns) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpV6ServerSecondaryDns) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpV6ServerSecondaryDns) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpV6ServerSecondaryDns) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpV6ServerSecondaryDns) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpV6ServerSecondaryDns) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpV6ServerSecondaryDns) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpV6ServerSecondaryDns) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpV6ServerSecondaryDns) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpV6ServerSecondaryDns) Clone() (DhcpV6ServerSecondaryDns, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpV6ServerSecondaryDns() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// DhcpV6ServerSecondaryDns is advanced Dns configuration for DHCPv6 server. +type DhcpV6ServerSecondaryDns interface { + Validation + // msg marshals DhcpV6ServerSecondaryDns to protobuf object *otg.DhcpV6ServerSecondaryDns + // and doesn't set defaults + msg() *otg.DhcpV6ServerSecondaryDns + // setMsg unmarshals DhcpV6ServerSecondaryDns from protobuf object *otg.DhcpV6ServerSecondaryDns + // and doesn't set defaults + setMsg(*otg.DhcpV6ServerSecondaryDns) DhcpV6ServerSecondaryDns + // provides marshal interface + Marshal() marshalDhcpV6ServerSecondaryDns + // provides unmarshal interface + Unmarshal() unMarshalDhcpV6ServerSecondaryDns + // validate validates DhcpV6ServerSecondaryDns + validate() error + // A stringer function + String() string + // Clones the object + Clone() (DhcpV6ServerSecondaryDns, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ip returns string, set in DhcpV6ServerSecondaryDns. + Ip() string + // SetIp assigns string provided by user to DhcpV6ServerSecondaryDns + SetIp(value string) DhcpV6ServerSecondaryDns + // HasIp checks if Ip has been set in DhcpV6ServerSecondaryDns + HasIp() bool +} + +// The secondary DNS server address that is offered to DHCP clients that request this information through a TLV option. +// Ip returns a string +func (obj *dhcpV6ServerSecondaryDns) Ip() string { + + return *obj.obj.Ip + +} + +// The secondary DNS server address that is offered to DHCP clients that request this information through a TLV option. +// Ip returns a string +func (obj *dhcpV6ServerSecondaryDns) HasIp() bool { + return obj.obj.Ip != nil +} + +// The secondary DNS server address that is offered to DHCP clients that request this information through a TLV option. +// SetIp sets the string value in the DhcpV6ServerSecondaryDns object +func (obj *dhcpV6ServerSecondaryDns) SetIp(value string) DhcpV6ServerSecondaryDns { + + obj.obj.Ip = &value + return obj +} + +func (obj *dhcpV6ServerSecondaryDns) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ip != nil { + + err := obj.validateIpv6(obj.Ip()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on DhcpV6ServerSecondaryDns.Ip")) + } + + } + +} + +func (obj *dhcpV6ServerSecondaryDns) setDefault() { + +} diff --git a/gosnappi/dhcpv4_client_metric.go b/gosnappi/dhcpv4_client_metric.go new file mode 100644 index 00000000..365a3749 --- /dev/null +++ b/gosnappi/dhcpv4_client_metric.go @@ -0,0 +1,502 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv4ClientMetric ***** +type dhcpv4ClientMetric struct { + validation + obj *otg.Dhcpv4ClientMetric + marshaller marshalDhcpv4ClientMetric + unMarshaller unMarshalDhcpv4ClientMetric +} + +func NewDhcpv4ClientMetric() Dhcpv4ClientMetric { + obj := dhcpv4ClientMetric{obj: &otg.Dhcpv4ClientMetric{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv4ClientMetric) msg() *otg.Dhcpv4ClientMetric { + return obj.obj +} + +func (obj *dhcpv4ClientMetric) setMsg(msg *otg.Dhcpv4ClientMetric) Dhcpv4ClientMetric { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv4ClientMetric struct { + obj *dhcpv4ClientMetric +} + +type marshalDhcpv4ClientMetric interface { + // ToProto marshals Dhcpv4ClientMetric to protobuf object *otg.Dhcpv4ClientMetric + ToProto() (*otg.Dhcpv4ClientMetric, error) + // ToPbText marshals Dhcpv4ClientMetric to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv4ClientMetric to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv4ClientMetric to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv4ClientMetric struct { + obj *dhcpv4ClientMetric +} + +type unMarshalDhcpv4ClientMetric interface { + // FromProto unmarshals Dhcpv4ClientMetric from protobuf object *otg.Dhcpv4ClientMetric + FromProto(msg *otg.Dhcpv4ClientMetric) (Dhcpv4ClientMetric, error) + // FromPbText unmarshals Dhcpv4ClientMetric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv4ClientMetric from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv4ClientMetric from JSON text + FromJson(value string) error +} + +func (obj *dhcpv4ClientMetric) Marshal() marshalDhcpv4ClientMetric { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv4ClientMetric{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv4ClientMetric) Unmarshal() unMarshalDhcpv4ClientMetric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv4ClientMetric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv4ClientMetric) ToProto() (*otg.Dhcpv4ClientMetric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv4ClientMetric) FromProto(msg *otg.Dhcpv4ClientMetric) (Dhcpv4ClientMetric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv4ClientMetric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv4ClientMetric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv4ClientMetric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4ClientMetric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv4ClientMetric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4ClientMetric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv4ClientMetric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv4ClientMetric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv4ClientMetric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv4ClientMetric) Clone() (Dhcpv4ClientMetric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv4ClientMetric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv4ClientMetric is dHCPv4 per peer statistics information. +type Dhcpv4ClientMetric interface { + Validation + // msg marshals Dhcpv4ClientMetric to protobuf object *otg.Dhcpv4ClientMetric + // and doesn't set defaults + msg() *otg.Dhcpv4ClientMetric + // setMsg unmarshals Dhcpv4ClientMetric from protobuf object *otg.Dhcpv4ClientMetric + // and doesn't set defaults + setMsg(*otg.Dhcpv4ClientMetric) Dhcpv4ClientMetric + // provides marshal interface + Marshal() marshalDhcpv4ClientMetric + // provides unmarshal interface + Unmarshal() unMarshalDhcpv4ClientMetric + // validate validates Dhcpv4ClientMetric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv4ClientMetric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in Dhcpv4ClientMetric. + Name() string + // SetName assigns string provided by user to Dhcpv4ClientMetric + SetName(value string) Dhcpv4ClientMetric + // HasName checks if Name has been set in Dhcpv4ClientMetric + HasName() bool + // DiscoversSent returns uint64, set in Dhcpv4ClientMetric. + DiscoversSent() uint64 + // SetDiscoversSent assigns uint64 provided by user to Dhcpv4ClientMetric + SetDiscoversSent(value uint64) Dhcpv4ClientMetric + // HasDiscoversSent checks if DiscoversSent has been set in Dhcpv4ClientMetric + HasDiscoversSent() bool + // OffersReceived returns uint64, set in Dhcpv4ClientMetric. + OffersReceived() uint64 + // SetOffersReceived assigns uint64 provided by user to Dhcpv4ClientMetric + SetOffersReceived(value uint64) Dhcpv4ClientMetric + // HasOffersReceived checks if OffersReceived has been set in Dhcpv4ClientMetric + HasOffersReceived() bool + // RequestsSent returns uint64, set in Dhcpv4ClientMetric. + RequestsSent() uint64 + // SetRequestsSent assigns uint64 provided by user to Dhcpv4ClientMetric + SetRequestsSent(value uint64) Dhcpv4ClientMetric + // HasRequestsSent checks if RequestsSent has been set in Dhcpv4ClientMetric + HasRequestsSent() bool + // AcksReceived returns uint64, set in Dhcpv4ClientMetric. + AcksReceived() uint64 + // SetAcksReceived assigns uint64 provided by user to Dhcpv4ClientMetric + SetAcksReceived(value uint64) Dhcpv4ClientMetric + // HasAcksReceived checks if AcksReceived has been set in Dhcpv4ClientMetric + HasAcksReceived() bool + // NacksReceived returns uint64, set in Dhcpv4ClientMetric. + NacksReceived() uint64 + // SetNacksReceived assigns uint64 provided by user to Dhcpv4ClientMetric + SetNacksReceived(value uint64) Dhcpv4ClientMetric + // HasNacksReceived checks if NacksReceived has been set in Dhcpv4ClientMetric + HasNacksReceived() bool + // ReleasesSent returns uint64, set in Dhcpv4ClientMetric. + ReleasesSent() uint64 + // SetReleasesSent assigns uint64 provided by user to Dhcpv4ClientMetric + SetReleasesSent(value uint64) Dhcpv4ClientMetric + // HasReleasesSent checks if ReleasesSent has been set in Dhcpv4ClientMetric + HasReleasesSent() bool + // DeclinesSent returns uint64, set in Dhcpv4ClientMetric. + DeclinesSent() uint64 + // SetDeclinesSent assigns uint64 provided by user to Dhcpv4ClientMetric + SetDeclinesSent(value uint64) Dhcpv4ClientMetric + // HasDeclinesSent checks if DeclinesSent has been set in Dhcpv4ClientMetric + HasDeclinesSent() bool +} + +// The name of a configured DHCPv4 client. +// Name returns a string +func (obj *dhcpv4ClientMetric) Name() string { + + return *obj.obj.Name + +} + +// The name of a configured DHCPv4 client. +// Name returns a string +func (obj *dhcpv4ClientMetric) HasName() bool { + return obj.obj.Name != nil +} + +// The name of a configured DHCPv4 client. +// SetName sets the string value in the Dhcpv4ClientMetric object +func (obj *dhcpv4ClientMetric) SetName(value string) Dhcpv4ClientMetric { + + obj.obj.Name = &value + return obj +} + +// Number of DHCPDISCOVER messages sent. +// DiscoversSent returns a uint64 +func (obj *dhcpv4ClientMetric) DiscoversSent() uint64 { + + return *obj.obj.DiscoversSent + +} + +// Number of DHCPDISCOVER messages sent. +// DiscoversSent returns a uint64 +func (obj *dhcpv4ClientMetric) HasDiscoversSent() bool { + return obj.obj.DiscoversSent != nil +} + +// Number of DHCPDISCOVER messages sent. +// SetDiscoversSent sets the uint64 value in the Dhcpv4ClientMetric object +func (obj *dhcpv4ClientMetric) SetDiscoversSent(value uint64) Dhcpv4ClientMetric { + + obj.obj.DiscoversSent = &value + return obj +} + +// Number of DHCPOFFER messages received. +// OffersReceived returns a uint64 +func (obj *dhcpv4ClientMetric) OffersReceived() uint64 { + + return *obj.obj.OffersReceived + +} + +// Number of DHCPOFFER messages received. +// OffersReceived returns a uint64 +func (obj *dhcpv4ClientMetric) HasOffersReceived() bool { + return obj.obj.OffersReceived != nil +} + +// Number of DHCPOFFER messages received. +// SetOffersReceived sets the uint64 value in the Dhcpv4ClientMetric object +func (obj *dhcpv4ClientMetric) SetOffersReceived(value uint64) Dhcpv4ClientMetric { + + obj.obj.OffersReceived = &value + return obj +} + +// Number of DHCPREQUEST messages sent. +// RequestsSent returns a uint64 +func (obj *dhcpv4ClientMetric) RequestsSent() uint64 { + + return *obj.obj.RequestsSent + +} + +// Number of DHCPREQUEST messages sent. +// RequestsSent returns a uint64 +func (obj *dhcpv4ClientMetric) HasRequestsSent() bool { + return obj.obj.RequestsSent != nil +} + +// Number of DHCPREQUEST messages sent. +// SetRequestsSent sets the uint64 value in the Dhcpv4ClientMetric object +func (obj *dhcpv4ClientMetric) SetRequestsSent(value uint64) Dhcpv4ClientMetric { + + obj.obj.RequestsSent = &value + return obj +} + +// Number of lease DHCPACK messages received. +// AcksReceived returns a uint64 +func (obj *dhcpv4ClientMetric) AcksReceived() uint64 { + + return *obj.obj.AcksReceived + +} + +// Number of lease DHCPACK messages received. +// AcksReceived returns a uint64 +func (obj *dhcpv4ClientMetric) HasAcksReceived() bool { + return obj.obj.AcksReceived != nil +} + +// Number of lease DHCPACK messages received. +// SetAcksReceived sets the uint64 value in the Dhcpv4ClientMetric object +func (obj *dhcpv4ClientMetric) SetAcksReceived(value uint64) Dhcpv4ClientMetric { + + obj.obj.AcksReceived = &value + return obj +} + +// Number of negative lease DHCPNACK messages received. +// NacksReceived returns a uint64 +func (obj *dhcpv4ClientMetric) NacksReceived() uint64 { + + return *obj.obj.NacksReceived + +} + +// Number of negative lease DHCPNACK messages received. +// NacksReceived returns a uint64 +func (obj *dhcpv4ClientMetric) HasNacksReceived() bool { + return obj.obj.NacksReceived != nil +} + +// Number of negative lease DHCPNACK messages received. +// SetNacksReceived sets the uint64 value in the Dhcpv4ClientMetric object +func (obj *dhcpv4ClientMetric) SetNacksReceived(value uint64) Dhcpv4ClientMetric { + + obj.obj.NacksReceived = &value + return obj +} + +// Number of DHCPRELEASE messages sent. +// ReleasesSent returns a uint64 +func (obj *dhcpv4ClientMetric) ReleasesSent() uint64 { + + return *obj.obj.ReleasesSent + +} + +// Number of DHCPRELEASE messages sent. +// ReleasesSent returns a uint64 +func (obj *dhcpv4ClientMetric) HasReleasesSent() bool { + return obj.obj.ReleasesSent != nil +} + +// Number of DHCPRELEASE messages sent. +// SetReleasesSent sets the uint64 value in the Dhcpv4ClientMetric object +func (obj *dhcpv4ClientMetric) SetReleasesSent(value uint64) Dhcpv4ClientMetric { + + obj.obj.ReleasesSent = &value + return obj +} + +// Number of DHCPDECLINE messages sent. +// DeclinesSent returns a uint64 +func (obj *dhcpv4ClientMetric) DeclinesSent() uint64 { + + return *obj.obj.DeclinesSent + +} + +// Number of DHCPDECLINE messages sent. +// DeclinesSent returns a uint64 +func (obj *dhcpv4ClientMetric) HasDeclinesSent() bool { + return obj.obj.DeclinesSent != nil +} + +// Number of DHCPDECLINE messages sent. +// SetDeclinesSent sets the uint64 value in the Dhcpv4ClientMetric object +func (obj *dhcpv4ClientMetric) SetDeclinesSent(value uint64) Dhcpv4ClientMetric { + + obj.obj.DeclinesSent = &value + return obj +} + +func (obj *dhcpv4ClientMetric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv4ClientMetric) setDefault() { + +} diff --git a/gosnappi/dhcpv4_client_metrics_request.go b/gosnappi/dhcpv4_client_metrics_request.go new file mode 100644 index 00000000..59eddaa9 --- /dev/null +++ b/gosnappi/dhcpv4_client_metrics_request.go @@ -0,0 +1,363 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv4ClientMetricsRequest ***** +type dhcpv4ClientMetricsRequest struct { + validation + obj *otg.Dhcpv4ClientMetricsRequest + marshaller marshalDhcpv4ClientMetricsRequest + unMarshaller unMarshalDhcpv4ClientMetricsRequest +} + +func NewDhcpv4ClientMetricsRequest() Dhcpv4ClientMetricsRequest { + obj := dhcpv4ClientMetricsRequest{obj: &otg.Dhcpv4ClientMetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv4ClientMetricsRequest) msg() *otg.Dhcpv4ClientMetricsRequest { + return obj.obj +} + +func (obj *dhcpv4ClientMetricsRequest) setMsg(msg *otg.Dhcpv4ClientMetricsRequest) Dhcpv4ClientMetricsRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv4ClientMetricsRequest struct { + obj *dhcpv4ClientMetricsRequest +} + +type marshalDhcpv4ClientMetricsRequest interface { + // ToProto marshals Dhcpv4ClientMetricsRequest to protobuf object *otg.Dhcpv4ClientMetricsRequest + ToProto() (*otg.Dhcpv4ClientMetricsRequest, error) + // ToPbText marshals Dhcpv4ClientMetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv4ClientMetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv4ClientMetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv4ClientMetricsRequest struct { + obj *dhcpv4ClientMetricsRequest +} + +type unMarshalDhcpv4ClientMetricsRequest interface { + // FromProto unmarshals Dhcpv4ClientMetricsRequest from protobuf object *otg.Dhcpv4ClientMetricsRequest + FromProto(msg *otg.Dhcpv4ClientMetricsRequest) (Dhcpv4ClientMetricsRequest, error) + // FromPbText unmarshals Dhcpv4ClientMetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv4ClientMetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv4ClientMetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *dhcpv4ClientMetricsRequest) Marshal() marshalDhcpv4ClientMetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv4ClientMetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv4ClientMetricsRequest) Unmarshal() unMarshalDhcpv4ClientMetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv4ClientMetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv4ClientMetricsRequest) ToProto() (*otg.Dhcpv4ClientMetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv4ClientMetricsRequest) FromProto(msg *otg.Dhcpv4ClientMetricsRequest) (Dhcpv4ClientMetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv4ClientMetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv4ClientMetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv4ClientMetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4ClientMetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv4ClientMetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4ClientMetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv4ClientMetricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv4ClientMetricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv4ClientMetricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv4ClientMetricsRequest) Clone() (Dhcpv4ClientMetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv4ClientMetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv4ClientMetricsRequest is the request to retrieve DHCPv4 per client metrics/statistics. +type Dhcpv4ClientMetricsRequest interface { + Validation + // msg marshals Dhcpv4ClientMetricsRequest to protobuf object *otg.Dhcpv4ClientMetricsRequest + // and doesn't set defaults + msg() *otg.Dhcpv4ClientMetricsRequest + // setMsg unmarshals Dhcpv4ClientMetricsRequest from protobuf object *otg.Dhcpv4ClientMetricsRequest + // and doesn't set defaults + setMsg(*otg.Dhcpv4ClientMetricsRequest) Dhcpv4ClientMetricsRequest + // provides marshal interface + Marshal() marshalDhcpv4ClientMetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalDhcpv4ClientMetricsRequest + // validate validates Dhcpv4ClientMetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv4ClientMetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ClientNames returns []string, set in Dhcpv4ClientMetricsRequest. + ClientNames() []string + // SetClientNames assigns []string provided by user to Dhcpv4ClientMetricsRequest + SetClientNames(value []string) Dhcpv4ClientMetricsRequest + // ColumnNames returns []Dhcpv4ClientMetricsRequestColumnNamesEnum, set in Dhcpv4ClientMetricsRequest + ColumnNames() []Dhcpv4ClientMetricsRequestColumnNamesEnum + // SetColumnNames assigns []Dhcpv4ClientMetricsRequestColumnNamesEnum provided by user to Dhcpv4ClientMetricsRequest + SetColumnNames(value []Dhcpv4ClientMetricsRequestColumnNamesEnum) Dhcpv4ClientMetricsRequest +} + +// The names of DHCPv4 clients to return results for. An empty list will return results for all DHCPv4 client. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4client/properties/name +// +// ClientNames returns a []string +func (obj *dhcpv4ClientMetricsRequest) ClientNames() []string { + if obj.obj.ClientNames == nil { + obj.obj.ClientNames = make([]string, 0) + } + return obj.obj.ClientNames +} + +// The names of DHCPv4 clients to return results for. An empty list will return results for all DHCPv4 client. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4client/properties/name +// +// SetClientNames sets the []string value in the Dhcpv4ClientMetricsRequest object +func (obj *dhcpv4ClientMetricsRequest) SetClientNames(value []string) Dhcpv4ClientMetricsRequest { + + if obj.obj.ClientNames == nil { + obj.obj.ClientNames = make([]string, 0) + } + obj.obj.ClientNames = value + + return obj +} + +type Dhcpv4ClientMetricsRequestColumnNamesEnum string + +// Enum of ColumnNames on Dhcpv4ClientMetricsRequest +var Dhcpv4ClientMetricsRequestColumnNames = struct { + DISCOVERS_SENT Dhcpv4ClientMetricsRequestColumnNamesEnum + OFFERS_RECEIVED Dhcpv4ClientMetricsRequestColumnNamesEnum + REQUESTS_SENT Dhcpv4ClientMetricsRequestColumnNamesEnum + ACKS_RECEIVED Dhcpv4ClientMetricsRequestColumnNamesEnum + NACKS_RECEIVED Dhcpv4ClientMetricsRequestColumnNamesEnum + RELEASES_SENT Dhcpv4ClientMetricsRequestColumnNamesEnum + DECLINES_SENT Dhcpv4ClientMetricsRequestColumnNamesEnum +}{ + DISCOVERS_SENT: Dhcpv4ClientMetricsRequestColumnNamesEnum("discovers_sent"), + OFFERS_RECEIVED: Dhcpv4ClientMetricsRequestColumnNamesEnum("offers_received"), + REQUESTS_SENT: Dhcpv4ClientMetricsRequestColumnNamesEnum("requests_sent"), + ACKS_RECEIVED: Dhcpv4ClientMetricsRequestColumnNamesEnum("acks_received"), + NACKS_RECEIVED: Dhcpv4ClientMetricsRequestColumnNamesEnum("nacks_received"), + RELEASES_SENT: Dhcpv4ClientMetricsRequestColumnNamesEnum("releases_sent"), + DECLINES_SENT: Dhcpv4ClientMetricsRequestColumnNamesEnum("declines_sent"), +} + +func (obj *dhcpv4ClientMetricsRequest) ColumnNames() []Dhcpv4ClientMetricsRequestColumnNamesEnum { + items := []Dhcpv4ClientMetricsRequestColumnNamesEnum{} + for _, item := range obj.obj.ColumnNames { + items = append(items, Dhcpv4ClientMetricsRequestColumnNamesEnum(item.String())) + } + return items +} + +// The list of column names that the returned result set will contain. If the list is empty then all columns will be returned. The name of the DHCPv4 client cannot be excluded. +// SetColumnNames sets the []string value in the Dhcpv4ClientMetricsRequest object +func (obj *dhcpv4ClientMetricsRequest) SetColumnNames(value []Dhcpv4ClientMetricsRequestColumnNamesEnum) Dhcpv4ClientMetricsRequest { + + items := []otg.Dhcpv4ClientMetricsRequest_ColumnNames_Enum{} + for _, item := range value { + intValue := otg.Dhcpv4ClientMetricsRequest_ColumnNames_Enum_value[string(item)] + items = append(items, otg.Dhcpv4ClientMetricsRequest_ColumnNames_Enum(intValue)) + } + obj.obj.ColumnNames = items + return obj +} + +func (obj *dhcpv4ClientMetricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv4ClientMetricsRequest) setDefault() { + +} diff --git a/gosnappi/dhcpv4_client_params.go b/gosnappi/dhcpv4_client_params.go new file mode 100644 index 00000000..2b3d7804 --- /dev/null +++ b/gosnappi/dhcpv4_client_params.go @@ -0,0 +1,402 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv4ClientParams ***** +type dhcpv4ClientParams struct { + validation + obj *otg.Dhcpv4ClientParams + marshaller marshalDhcpv4ClientParams + unMarshaller unMarshalDhcpv4ClientParams +} + +func NewDhcpv4ClientParams() Dhcpv4ClientParams { + obj := dhcpv4ClientParams{obj: &otg.Dhcpv4ClientParams{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv4ClientParams) msg() *otg.Dhcpv4ClientParams { + return obj.obj +} + +func (obj *dhcpv4ClientParams) setMsg(msg *otg.Dhcpv4ClientParams) Dhcpv4ClientParams { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv4ClientParams struct { + obj *dhcpv4ClientParams +} + +type marshalDhcpv4ClientParams interface { + // ToProto marshals Dhcpv4ClientParams to protobuf object *otg.Dhcpv4ClientParams + ToProto() (*otg.Dhcpv4ClientParams, error) + // ToPbText marshals Dhcpv4ClientParams to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv4ClientParams to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv4ClientParams to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv4ClientParams struct { + obj *dhcpv4ClientParams +} + +type unMarshalDhcpv4ClientParams interface { + // FromProto unmarshals Dhcpv4ClientParams from protobuf object *otg.Dhcpv4ClientParams + FromProto(msg *otg.Dhcpv4ClientParams) (Dhcpv4ClientParams, error) + // FromPbText unmarshals Dhcpv4ClientParams from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv4ClientParams from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv4ClientParams from JSON text + FromJson(value string) error +} + +func (obj *dhcpv4ClientParams) Marshal() marshalDhcpv4ClientParams { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv4ClientParams{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv4ClientParams) Unmarshal() unMarshalDhcpv4ClientParams { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv4ClientParams{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv4ClientParams) ToProto() (*otg.Dhcpv4ClientParams, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv4ClientParams) FromProto(msg *otg.Dhcpv4ClientParams) (Dhcpv4ClientParams, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv4ClientParams) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv4ClientParams) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv4ClientParams) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4ClientParams) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv4ClientParams) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4ClientParams) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv4ClientParams) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv4ClientParams) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv4ClientParams) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv4ClientParams) Clone() (Dhcpv4ClientParams, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv4ClientParams() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv4ClientParams is configuration Parameter request list by emulated DHCPv4 Client. +type Dhcpv4ClientParams interface { + Validation + // msg marshals Dhcpv4ClientParams to protobuf object *otg.Dhcpv4ClientParams + // and doesn't set defaults + msg() *otg.Dhcpv4ClientParams + // setMsg unmarshals Dhcpv4ClientParams from protobuf object *otg.Dhcpv4ClientParams + // and doesn't set defaults + setMsg(*otg.Dhcpv4ClientParams) Dhcpv4ClientParams + // provides marshal interface + Marshal() marshalDhcpv4ClientParams + // provides unmarshal interface + Unmarshal() unMarshalDhcpv4ClientParams + // validate validates Dhcpv4ClientParams + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv4ClientParams, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // SubnetMask returns bool, set in Dhcpv4ClientParams. + SubnetMask() bool + // SetSubnetMask assigns bool provided by user to Dhcpv4ClientParams + SetSubnetMask(value bool) Dhcpv4ClientParams + // HasSubnetMask checks if SubnetMask has been set in Dhcpv4ClientParams + HasSubnetMask() bool + // Router returns bool, set in Dhcpv4ClientParams. + Router() bool + // SetRouter assigns bool provided by user to Dhcpv4ClientParams + SetRouter(value bool) Dhcpv4ClientParams + // HasRouter checks if Router has been set in Dhcpv4ClientParams + HasRouter() bool + // RenewalTimer returns bool, set in Dhcpv4ClientParams. + RenewalTimer() bool + // SetRenewalTimer assigns bool provided by user to Dhcpv4ClientParams + SetRenewalTimer(value bool) Dhcpv4ClientParams + // HasRenewalTimer checks if RenewalTimer has been set in Dhcpv4ClientParams + HasRenewalTimer() bool + // RebindingTimer returns bool, set in Dhcpv4ClientParams. + RebindingTimer() bool + // SetRebindingTimer assigns bool provided by user to Dhcpv4ClientParams + SetRebindingTimer(value bool) Dhcpv4ClientParams + // HasRebindingTimer checks if RebindingTimer has been set in Dhcpv4ClientParams + HasRebindingTimer() bool +} + +// Request for the subnet mask option specifies the client's subnet mask as per RFC950. +// SubnetMask returns a bool +func (obj *dhcpv4ClientParams) SubnetMask() bool { + + return *obj.obj.SubnetMask + +} + +// Request for the subnet mask option specifies the client's subnet mask as per RFC950. +// SubnetMask returns a bool +func (obj *dhcpv4ClientParams) HasSubnetMask() bool { + return obj.obj.SubnetMask != nil +} + +// Request for the subnet mask option specifies the client's subnet mask as per RFC950. +// SetSubnetMask sets the bool value in the Dhcpv4ClientParams object +func (obj *dhcpv4ClientParams) SetSubnetMask(value bool) Dhcpv4ClientParams { + + obj.obj.SubnetMask = &value + return obj +} + +// Request for the router option that specifies a list of IP addresses for routers on the client's subnet. +// Router returns a bool +func (obj *dhcpv4ClientParams) Router() bool { + + return *obj.obj.Router + +} + +// Request for the router option that specifies a list of IP addresses for routers on the client's subnet. +// Router returns a bool +func (obj *dhcpv4ClientParams) HasRouter() bool { + return obj.obj.Router != nil +} + +// Request for the router option that specifies a list of IP addresses for routers on the client's subnet. +// SetRouter sets the bool value in the Dhcpv4ClientParams object +func (obj *dhcpv4ClientParams) SetRouter(value bool) Dhcpv4ClientParams { + + obj.obj.Router = &value + return obj +} + +// Request for the renewal timer, T1. When the timer expires, the client transitions from the BOUND state to the RENEWING state. +// RenewalTimer returns a bool +func (obj *dhcpv4ClientParams) RenewalTimer() bool { + + return *obj.obj.RenewalTimer + +} + +// Request for the renewal timer, T1. When the timer expires, the client transitions from the BOUND state to the RENEWING state. +// RenewalTimer returns a bool +func (obj *dhcpv4ClientParams) HasRenewalTimer() bool { + return obj.obj.RenewalTimer != nil +} + +// Request for the renewal timer, T1. When the timer expires, the client transitions from the BOUND state to the RENEWING state. +// SetRenewalTimer sets the bool value in the Dhcpv4ClientParams object +func (obj *dhcpv4ClientParams) SetRenewalTimer(value bool) Dhcpv4ClientParams { + + obj.obj.RenewalTimer = &value + return obj +} + +// Request for the rebinding timer (T2). When expires, the client transitions to the REBINDING state. +// RebindingTimer returns a bool +func (obj *dhcpv4ClientParams) RebindingTimer() bool { + + return *obj.obj.RebindingTimer + +} + +// Request for the rebinding timer (T2). When expires, the client transitions to the REBINDING state. +// RebindingTimer returns a bool +func (obj *dhcpv4ClientParams) HasRebindingTimer() bool { + return obj.obj.RebindingTimer != nil +} + +// Request for the rebinding timer (T2). When expires, the client transitions to the REBINDING state. +// SetRebindingTimer sets the bool value in the Dhcpv4ClientParams object +func (obj *dhcpv4ClientParams) SetRebindingTimer(value bool) Dhcpv4ClientParams { + + obj.obj.RebindingTimer = &value + return obj +} + +func (obj *dhcpv4ClientParams) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv4ClientParams) setDefault() { + if obj.obj.SubnetMask == nil { + obj.SetSubnetMask(true) + } + if obj.obj.Router == nil { + obj.SetRouter(true) + } + if obj.obj.RenewalTimer == nil { + obj.SetRenewalTimer(false) + } + if obj.obj.RebindingTimer == nil { + obj.SetRebindingTimer(false) + } + +} diff --git a/gosnappi/dhcpv4_interface_state.go b/gosnappi/dhcpv4_interface_state.go new file mode 100644 index 00000000..e9f9171e --- /dev/null +++ b/gosnappi/dhcpv4_interface_state.go @@ -0,0 +1,484 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv4InterfaceState ***** +type dhcpv4InterfaceState struct { + validation + obj *otg.Dhcpv4InterfaceState + marshaller marshalDhcpv4InterfaceState + unMarshaller unMarshalDhcpv4InterfaceState +} + +func NewDhcpv4InterfaceState() Dhcpv4InterfaceState { + obj := dhcpv4InterfaceState{obj: &otg.Dhcpv4InterfaceState{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv4InterfaceState) msg() *otg.Dhcpv4InterfaceState { + return obj.obj +} + +func (obj *dhcpv4InterfaceState) setMsg(msg *otg.Dhcpv4InterfaceState) Dhcpv4InterfaceState { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv4InterfaceState struct { + obj *dhcpv4InterfaceState +} + +type marshalDhcpv4InterfaceState interface { + // ToProto marshals Dhcpv4InterfaceState to protobuf object *otg.Dhcpv4InterfaceState + ToProto() (*otg.Dhcpv4InterfaceState, error) + // ToPbText marshals Dhcpv4InterfaceState to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv4InterfaceState to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv4InterfaceState to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv4InterfaceState struct { + obj *dhcpv4InterfaceState +} + +type unMarshalDhcpv4InterfaceState interface { + // FromProto unmarshals Dhcpv4InterfaceState from protobuf object *otg.Dhcpv4InterfaceState + FromProto(msg *otg.Dhcpv4InterfaceState) (Dhcpv4InterfaceState, error) + // FromPbText unmarshals Dhcpv4InterfaceState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv4InterfaceState from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv4InterfaceState from JSON text + FromJson(value string) error +} + +func (obj *dhcpv4InterfaceState) Marshal() marshalDhcpv4InterfaceState { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv4InterfaceState{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv4InterfaceState) Unmarshal() unMarshalDhcpv4InterfaceState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv4InterfaceState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv4InterfaceState) ToProto() (*otg.Dhcpv4InterfaceState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv4InterfaceState) FromProto(msg *otg.Dhcpv4InterfaceState) (Dhcpv4InterfaceState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv4InterfaceState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv4InterfaceState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv4InterfaceState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4InterfaceState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv4InterfaceState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4InterfaceState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv4InterfaceState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv4InterfaceState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv4InterfaceState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv4InterfaceState) Clone() (Dhcpv4InterfaceState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv4InterfaceState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv4InterfaceState is the IPv4 address associated with this DHCP Client session. +type Dhcpv4InterfaceState interface { + Validation + // msg marshals Dhcpv4InterfaceState to protobuf object *otg.Dhcpv4InterfaceState + // and doesn't set defaults + msg() *otg.Dhcpv4InterfaceState + // setMsg unmarshals Dhcpv4InterfaceState from protobuf object *otg.Dhcpv4InterfaceState + // and doesn't set defaults + setMsg(*otg.Dhcpv4InterfaceState) Dhcpv4InterfaceState + // provides marshal interface + Marshal() marshalDhcpv4InterfaceState + // provides unmarshal interface + Unmarshal() unMarshalDhcpv4InterfaceState + // validate validates Dhcpv4InterfaceState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv4InterfaceState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // DhcpClientName returns string, set in Dhcpv4InterfaceState. + DhcpClientName() string + // SetDhcpClientName assigns string provided by user to Dhcpv4InterfaceState + SetDhcpClientName(value string) Dhcpv4InterfaceState + // HasDhcpClientName checks if DhcpClientName has been set in Dhcpv4InterfaceState + HasDhcpClientName() bool + // Ipv4Address returns string, set in Dhcpv4InterfaceState. + Ipv4Address() string + // SetIpv4Address assigns string provided by user to Dhcpv4InterfaceState + SetIpv4Address(value string) Dhcpv4InterfaceState + // HasIpv4Address checks if Ipv4Address has been set in Dhcpv4InterfaceState + HasIpv4Address() bool + // PrefixLength returns uint32, set in Dhcpv4InterfaceState. + PrefixLength() uint32 + // SetPrefixLength assigns uint32 provided by user to Dhcpv4InterfaceState + SetPrefixLength(value uint32) Dhcpv4InterfaceState + // HasPrefixLength checks if PrefixLength has been set in Dhcpv4InterfaceState + HasPrefixLength() bool + // GatewayAddress returns string, set in Dhcpv4InterfaceState. + GatewayAddress() string + // SetGatewayAddress assigns string provided by user to Dhcpv4InterfaceState + SetGatewayAddress(value string) Dhcpv4InterfaceState + // HasGatewayAddress checks if GatewayAddress has been set in Dhcpv4InterfaceState + HasGatewayAddress() bool + // LeaseTime returns uint32, set in Dhcpv4InterfaceState. + LeaseTime() uint32 + // SetLeaseTime assigns uint32 provided by user to Dhcpv4InterfaceState + SetLeaseTime(value uint32) Dhcpv4InterfaceState + // HasLeaseTime checks if LeaseTime has been set in Dhcpv4InterfaceState + HasLeaseTime() bool + // RenewTime returns uint32, set in Dhcpv4InterfaceState. + RenewTime() uint32 + // SetRenewTime assigns uint32 provided by user to Dhcpv4InterfaceState + SetRenewTime(value uint32) Dhcpv4InterfaceState + // HasRenewTime checks if RenewTime has been set in Dhcpv4InterfaceState + HasRenewTime() bool + // RebindTime returns uint32, set in Dhcpv4InterfaceState. + RebindTime() uint32 + // SetRebindTime assigns uint32 provided by user to Dhcpv4InterfaceState + SetRebindTime(value uint32) Dhcpv4InterfaceState + // HasRebindTime checks if RebindTime has been set in Dhcpv4InterfaceState + HasRebindTime() bool +} + +// The name of a DHCPv4 Client. +// DhcpClientName returns a string +func (obj *dhcpv4InterfaceState) DhcpClientName() string { + + return *obj.obj.DhcpClientName + +} + +// The name of a DHCPv4 Client. +// DhcpClientName returns a string +func (obj *dhcpv4InterfaceState) HasDhcpClientName() bool { + return obj.obj.DhcpClientName != nil +} + +// The name of a DHCPv4 Client. +// SetDhcpClientName sets the string value in the Dhcpv4InterfaceState object +func (obj *dhcpv4InterfaceState) SetDhcpClientName(value string) Dhcpv4InterfaceState { + + obj.obj.DhcpClientName = &value + return obj +} + +// The IPv4 address associated with this DHCP Client session. +// Ipv4Address returns a string +func (obj *dhcpv4InterfaceState) Ipv4Address() string { + + return *obj.obj.Ipv4Address + +} + +// The IPv4 address associated with this DHCP Client session. +// Ipv4Address returns a string +func (obj *dhcpv4InterfaceState) HasIpv4Address() bool { + return obj.obj.Ipv4Address != nil +} + +// The IPv4 address associated with this DHCP Client session. +// SetIpv4Address sets the string value in the Dhcpv4InterfaceState object +func (obj *dhcpv4InterfaceState) SetIpv4Address(value string) Dhcpv4InterfaceState { + + obj.obj.Ipv4Address = &value + return obj +} + +// The length of the prefix. +// PrefixLength returns a uint32 +func (obj *dhcpv4InterfaceState) PrefixLength() uint32 { + + return *obj.obj.PrefixLength + +} + +// The length of the prefix. +// PrefixLength returns a uint32 +func (obj *dhcpv4InterfaceState) HasPrefixLength() bool { + return obj.obj.PrefixLength != nil +} + +// The length of the prefix. +// SetPrefixLength sets the uint32 value in the Dhcpv4InterfaceState object +func (obj *dhcpv4InterfaceState) SetPrefixLength(value uint32) Dhcpv4InterfaceState { + + obj.obj.PrefixLength = &value + return obj +} + +// The Gateway Ipv4 address associated with this DHCP Client session. +// GatewayAddress returns a string +func (obj *dhcpv4InterfaceState) GatewayAddress() string { + + return *obj.obj.GatewayAddress + +} + +// The Gateway Ipv4 address associated with this DHCP Client session. +// GatewayAddress returns a string +func (obj *dhcpv4InterfaceState) HasGatewayAddress() bool { + return obj.obj.GatewayAddress != nil +} + +// The Gateway Ipv4 address associated with this DHCP Client session. +// SetGatewayAddress sets the string value in the Dhcpv4InterfaceState object +func (obj *dhcpv4InterfaceState) SetGatewayAddress(value string) Dhcpv4InterfaceState { + + obj.obj.GatewayAddress = &value + return obj +} + +// The duration of the IPv4 address lease, in seconds. +// LeaseTime returns a uint32 +func (obj *dhcpv4InterfaceState) LeaseTime() uint32 { + + return *obj.obj.LeaseTime + +} + +// The duration of the IPv4 address lease, in seconds. +// LeaseTime returns a uint32 +func (obj *dhcpv4InterfaceState) HasLeaseTime() bool { + return obj.obj.LeaseTime != nil +} + +// The duration of the IPv4 address lease, in seconds. +// SetLeaseTime sets the uint32 value in the Dhcpv4InterfaceState object +func (obj *dhcpv4InterfaceState) SetLeaseTime(value uint32) Dhcpv4InterfaceState { + + obj.obj.LeaseTime = &value + return obj +} + +// Time in seconds until the DHCPv4 client starts renewing the lease. +// RenewTime returns a uint32 +func (obj *dhcpv4InterfaceState) RenewTime() uint32 { + + return *obj.obj.RenewTime + +} + +// Time in seconds until the DHCPv4 client starts renewing the lease. +// RenewTime returns a uint32 +func (obj *dhcpv4InterfaceState) HasRenewTime() bool { + return obj.obj.RenewTime != nil +} + +// Time in seconds until the DHCPv4 client starts renewing the lease. +// SetRenewTime sets the uint32 value in the Dhcpv4InterfaceState object +func (obj *dhcpv4InterfaceState) SetRenewTime(value uint32) Dhcpv4InterfaceState { + + obj.obj.RenewTime = &value + return obj +} + +// Time in seconds until the DHCPv4 client starts rebinding. +// RebindTime returns a uint32 +func (obj *dhcpv4InterfaceState) RebindTime() uint32 { + + return *obj.obj.RebindTime + +} + +// Time in seconds until the DHCPv4 client starts rebinding. +// RebindTime returns a uint32 +func (obj *dhcpv4InterfaceState) HasRebindTime() bool { + return obj.obj.RebindTime != nil +} + +// Time in seconds until the DHCPv4 client starts rebinding. +// SetRebindTime sets the uint32 value in the Dhcpv4InterfaceState object +func (obj *dhcpv4InterfaceState) SetRebindTime(value uint32) Dhcpv4InterfaceState { + + obj.obj.RebindTime = &value + return obj +} + +func (obj *dhcpv4InterfaceState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.PrefixLength != nil { + + if *obj.obj.PrefixLength > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv4InterfaceState.PrefixLength <= 32 but Got %d", *obj.obj.PrefixLength)) + } + + } + +} + +func (obj *dhcpv4InterfaceState) setDefault() { + +} diff --git a/gosnappi/dhcpv4_interface_state_request.go b/gosnappi/dhcpv4_interface_state_request.go new file mode 100644 index 00000000..fdfb484f --- /dev/null +++ b/gosnappi/dhcpv4_interface_state_request.go @@ -0,0 +1,317 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv4InterfaceStateRequest ***** +type dhcpv4InterfaceStateRequest struct { + validation + obj *otg.Dhcpv4InterfaceStateRequest + marshaller marshalDhcpv4InterfaceStateRequest + unMarshaller unMarshalDhcpv4InterfaceStateRequest +} + +func NewDhcpv4InterfaceStateRequest() Dhcpv4InterfaceStateRequest { + obj := dhcpv4InterfaceStateRequest{obj: &otg.Dhcpv4InterfaceStateRequest{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv4InterfaceStateRequest) msg() *otg.Dhcpv4InterfaceStateRequest { + return obj.obj +} + +func (obj *dhcpv4InterfaceStateRequest) setMsg(msg *otg.Dhcpv4InterfaceStateRequest) Dhcpv4InterfaceStateRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv4InterfaceStateRequest struct { + obj *dhcpv4InterfaceStateRequest +} + +type marshalDhcpv4InterfaceStateRequest interface { + // ToProto marshals Dhcpv4InterfaceStateRequest to protobuf object *otg.Dhcpv4InterfaceStateRequest + ToProto() (*otg.Dhcpv4InterfaceStateRequest, error) + // ToPbText marshals Dhcpv4InterfaceStateRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv4InterfaceStateRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv4InterfaceStateRequest to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv4InterfaceStateRequest struct { + obj *dhcpv4InterfaceStateRequest +} + +type unMarshalDhcpv4InterfaceStateRequest interface { + // FromProto unmarshals Dhcpv4InterfaceStateRequest from protobuf object *otg.Dhcpv4InterfaceStateRequest + FromProto(msg *otg.Dhcpv4InterfaceStateRequest) (Dhcpv4InterfaceStateRequest, error) + // FromPbText unmarshals Dhcpv4InterfaceStateRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv4InterfaceStateRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv4InterfaceStateRequest from JSON text + FromJson(value string) error +} + +func (obj *dhcpv4InterfaceStateRequest) Marshal() marshalDhcpv4InterfaceStateRequest { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv4InterfaceStateRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv4InterfaceStateRequest) Unmarshal() unMarshalDhcpv4InterfaceStateRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv4InterfaceStateRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv4InterfaceStateRequest) ToProto() (*otg.Dhcpv4InterfaceStateRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv4InterfaceStateRequest) FromProto(msg *otg.Dhcpv4InterfaceStateRequest) (Dhcpv4InterfaceStateRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv4InterfaceStateRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv4InterfaceStateRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv4InterfaceStateRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4InterfaceStateRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv4InterfaceStateRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4InterfaceStateRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv4InterfaceStateRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv4InterfaceStateRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv4InterfaceStateRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv4InterfaceStateRequest) Clone() (Dhcpv4InterfaceStateRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv4InterfaceStateRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv4InterfaceStateRequest is the request for assigned IPv4 address information associated with DHCP Client sessions. +type Dhcpv4InterfaceStateRequest interface { + Validation + // msg marshals Dhcpv4InterfaceStateRequest to protobuf object *otg.Dhcpv4InterfaceStateRequest + // and doesn't set defaults + msg() *otg.Dhcpv4InterfaceStateRequest + // setMsg unmarshals Dhcpv4InterfaceStateRequest from protobuf object *otg.Dhcpv4InterfaceStateRequest + // and doesn't set defaults + setMsg(*otg.Dhcpv4InterfaceStateRequest) Dhcpv4InterfaceStateRequest + // provides marshal interface + Marshal() marshalDhcpv4InterfaceStateRequest + // provides unmarshal interface + Unmarshal() unMarshalDhcpv4InterfaceStateRequest + // validate validates Dhcpv4InterfaceStateRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv4InterfaceStateRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // DhcpClientNames returns []string, set in Dhcpv4InterfaceStateRequest. + DhcpClientNames() []string + // SetDhcpClientNames assigns []string provided by user to Dhcpv4InterfaceStateRequest + SetDhcpClientNames(value []string) Dhcpv4InterfaceStateRequest +} + +// The names of DHCPv4 client to return results for. An empty list will return results for all DHCPv4 Client address information. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4client/properties/name +// +// DhcpClientNames returns a []string +func (obj *dhcpv4InterfaceStateRequest) DhcpClientNames() []string { + if obj.obj.DhcpClientNames == nil { + obj.obj.DhcpClientNames = make([]string, 0) + } + return obj.obj.DhcpClientNames +} + +// The names of DHCPv4 client to return results for. An empty list will return results for all DHCPv4 Client address information. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4client/properties/name +// +// SetDhcpClientNames sets the []string value in the Dhcpv4InterfaceStateRequest object +func (obj *dhcpv4InterfaceStateRequest) SetDhcpClientNames(value []string) Dhcpv4InterfaceStateRequest { + + if obj.obj.DhcpClientNames == nil { + obj.obj.DhcpClientNames = make([]string, 0) + } + obj.obj.DhcpClientNames = value + + return obj +} + +func (obj *dhcpv4InterfaceStateRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv4InterfaceStateRequest) setDefault() { + +} diff --git a/gosnappi/dhcpv4_lease_state.go b/gosnappi/dhcpv4_lease_state.go new file mode 100644 index 00000000..ea18a22d --- /dev/null +++ b/gosnappi/dhcpv4_lease_state.go @@ -0,0 +1,502 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv4LeaseState ***** +type dhcpv4LeaseState struct { + validation + obj *otg.Dhcpv4LeaseState + marshaller marshalDhcpv4LeaseState + unMarshaller unMarshalDhcpv4LeaseState +} + +func NewDhcpv4LeaseState() Dhcpv4LeaseState { + obj := dhcpv4LeaseState{obj: &otg.Dhcpv4LeaseState{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv4LeaseState) msg() *otg.Dhcpv4LeaseState { + return obj.obj +} + +func (obj *dhcpv4LeaseState) setMsg(msg *otg.Dhcpv4LeaseState) Dhcpv4LeaseState { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv4LeaseState struct { + obj *dhcpv4LeaseState +} + +type marshalDhcpv4LeaseState interface { + // ToProto marshals Dhcpv4LeaseState to protobuf object *otg.Dhcpv4LeaseState + ToProto() (*otg.Dhcpv4LeaseState, error) + // ToPbText marshals Dhcpv4LeaseState to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv4LeaseState to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv4LeaseState to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv4LeaseState struct { + obj *dhcpv4LeaseState +} + +type unMarshalDhcpv4LeaseState interface { + // FromProto unmarshals Dhcpv4LeaseState from protobuf object *otg.Dhcpv4LeaseState + FromProto(msg *otg.Dhcpv4LeaseState) (Dhcpv4LeaseState, error) + // FromPbText unmarshals Dhcpv4LeaseState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv4LeaseState from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv4LeaseState from JSON text + FromJson(value string) error +} + +func (obj *dhcpv4LeaseState) Marshal() marshalDhcpv4LeaseState { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv4LeaseState{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv4LeaseState) Unmarshal() unMarshalDhcpv4LeaseState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv4LeaseState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv4LeaseState) ToProto() (*otg.Dhcpv4LeaseState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv4LeaseState) FromProto(msg *otg.Dhcpv4LeaseState) (Dhcpv4LeaseState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv4LeaseState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv4LeaseState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv4LeaseState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4LeaseState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv4LeaseState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4LeaseState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv4LeaseState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv4LeaseState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv4LeaseState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv4LeaseState) Clone() (Dhcpv4LeaseState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv4LeaseState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv4LeaseState is iPv4 address lease state. +type Dhcpv4LeaseState interface { + Validation + // msg marshals Dhcpv4LeaseState to protobuf object *otg.Dhcpv4LeaseState + // and doesn't set defaults + msg() *otg.Dhcpv4LeaseState + // setMsg unmarshals Dhcpv4LeaseState from protobuf object *otg.Dhcpv4LeaseState + // and doesn't set defaults + setMsg(*otg.Dhcpv4LeaseState) Dhcpv4LeaseState + // provides marshal interface + Marshal() marshalDhcpv4LeaseState + // provides unmarshal interface + Unmarshal() unMarshalDhcpv4LeaseState + // validate validates Dhcpv4LeaseState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv4LeaseState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Address returns string, set in Dhcpv4LeaseState. + Address() string + // SetAddress assigns string provided by user to Dhcpv4LeaseState + SetAddress(value string) Dhcpv4LeaseState + // HasAddress checks if Address has been set in Dhcpv4LeaseState + HasAddress() bool + // ValidTime returns uint32, set in Dhcpv4LeaseState. + ValidTime() uint32 + // SetValidTime assigns uint32 provided by user to Dhcpv4LeaseState + SetValidTime(value uint32) Dhcpv4LeaseState + // HasValidTime checks if ValidTime has been set in Dhcpv4LeaseState + HasValidTime() bool + // PreferredTime returns uint32, set in Dhcpv4LeaseState. + PreferredTime() uint32 + // SetPreferredTime assigns uint32 provided by user to Dhcpv4LeaseState + SetPreferredTime(value uint32) Dhcpv4LeaseState + // HasPreferredTime checks if PreferredTime has been set in Dhcpv4LeaseState + HasPreferredTime() bool + // RenewTime returns uint32, set in Dhcpv4LeaseState. + RenewTime() uint32 + // SetRenewTime assigns uint32 provided by user to Dhcpv4LeaseState + SetRenewTime(value uint32) Dhcpv4LeaseState + // HasRenewTime checks if RenewTime has been set in Dhcpv4LeaseState + HasRenewTime() bool + // RebindTime returns uint32, set in Dhcpv4LeaseState. + RebindTime() uint32 + // SetRebindTime assigns uint32 provided by user to Dhcpv4LeaseState + SetRebindTime(value uint32) Dhcpv4LeaseState + // HasRebindTime checks if RebindTime has been set in Dhcpv4LeaseState + HasRebindTime() bool + // ClientId returns string, set in Dhcpv4LeaseState. + ClientId() string + // SetClientId assigns string provided by user to Dhcpv4LeaseState + SetClientId(value string) Dhcpv4LeaseState + // HasClientId checks if ClientId has been set in Dhcpv4LeaseState + HasClientId() bool + // CircuitId returns string, set in Dhcpv4LeaseState. + CircuitId() string + // SetCircuitId assigns string provided by user to Dhcpv4LeaseState + SetCircuitId(value string) Dhcpv4LeaseState + // HasCircuitId checks if CircuitId has been set in Dhcpv4LeaseState + HasCircuitId() bool + // RemoteId returns string, set in Dhcpv4LeaseState. + RemoteId() string + // SetRemoteId assigns string provided by user to Dhcpv4LeaseState + SetRemoteId(value string) Dhcpv4LeaseState + // HasRemoteId checks if RemoteId has been set in Dhcpv4LeaseState + HasRemoteId() bool +} + +// The IPv4 address associated with this lease. +// Address returns a string +func (obj *dhcpv4LeaseState) Address() string { + + return *obj.obj.Address + +} + +// The IPv4 address associated with this lease. +// Address returns a string +func (obj *dhcpv4LeaseState) HasAddress() bool { + return obj.obj.Address != nil +} + +// The IPv4 address associated with this lease. +// SetAddress sets the string value in the Dhcpv4LeaseState object +func (obj *dhcpv4LeaseState) SetAddress(value string) Dhcpv4LeaseState { + + obj.obj.Address = &value + return obj +} + +// The time in seconds after which the IPv4 address lease will expire. +// ValidTime returns a uint32 +func (obj *dhcpv4LeaseState) ValidTime() uint32 { + + return *obj.obj.ValidTime + +} + +// The time in seconds after which the IPv4 address lease will expire. +// ValidTime returns a uint32 +func (obj *dhcpv4LeaseState) HasValidTime() bool { + return obj.obj.ValidTime != nil +} + +// The time in seconds after which the IPv4 address lease will expire. +// SetValidTime sets the uint32 value in the Dhcpv4LeaseState object +func (obj *dhcpv4LeaseState) SetValidTime(value uint32) Dhcpv4LeaseState { + + obj.obj.ValidTime = &value + return obj +} + +// The elapsed time in seconds since the address has been renewed. +// PreferredTime returns a uint32 +func (obj *dhcpv4LeaseState) PreferredTime() uint32 { + + return *obj.obj.PreferredTime + +} + +// The elapsed time in seconds since the address has been renewed. +// PreferredTime returns a uint32 +func (obj *dhcpv4LeaseState) HasPreferredTime() bool { + return obj.obj.PreferredTime != nil +} + +// The elapsed time in seconds since the address has been renewed. +// SetPreferredTime sets the uint32 value in the Dhcpv4LeaseState object +func (obj *dhcpv4LeaseState) SetPreferredTime(value uint32) Dhcpv4LeaseState { + + obj.obj.PreferredTime = &value + return obj +} + +// Time in seconds until the DHCPv4 client starts renewing the lease. +// RenewTime returns a uint32 +func (obj *dhcpv4LeaseState) RenewTime() uint32 { + + return *obj.obj.RenewTime + +} + +// Time in seconds until the DHCPv4 client starts renewing the lease. +// RenewTime returns a uint32 +func (obj *dhcpv4LeaseState) HasRenewTime() bool { + return obj.obj.RenewTime != nil +} + +// Time in seconds until the DHCPv4 client starts renewing the lease. +// SetRenewTime sets the uint32 value in the Dhcpv4LeaseState object +func (obj *dhcpv4LeaseState) SetRenewTime(value uint32) Dhcpv4LeaseState { + + obj.obj.RenewTime = &value + return obj +} + +// Time in seconds until the DHCPv4 client starts rebinding. +// RebindTime returns a uint32 +func (obj *dhcpv4LeaseState) RebindTime() uint32 { + + return *obj.obj.RebindTime + +} + +// Time in seconds until the DHCPv4 client starts rebinding. +// RebindTime returns a uint32 +func (obj *dhcpv4LeaseState) HasRebindTime() bool { + return obj.obj.RebindTime != nil +} + +// Time in seconds until the DHCPv4 client starts rebinding. +// SetRebindTime sets the uint32 value in the Dhcpv4LeaseState object +func (obj *dhcpv4LeaseState) SetRebindTime(value uint32) Dhcpv4LeaseState { + + obj.obj.RebindTime = &value + return obj +} + +// The ID of the DHCPv4 client holding this lease. +// ClientId returns a string +func (obj *dhcpv4LeaseState) ClientId() string { + + return *obj.obj.ClientId + +} + +// The ID of the DHCPv4 client holding this lease. +// ClientId returns a string +func (obj *dhcpv4LeaseState) HasClientId() bool { + return obj.obj.ClientId != nil +} + +// The ID of the DHCPv4 client holding this lease. +// SetClientId sets the string value in the Dhcpv4LeaseState object +func (obj *dhcpv4LeaseState) SetClientId(value string) Dhcpv4LeaseState { + + obj.obj.ClientId = &value + return obj +} + +// The Circuit ID option found in the last request message. +// CircuitId returns a string +func (obj *dhcpv4LeaseState) CircuitId() string { + + return *obj.obj.CircuitId + +} + +// The Circuit ID option found in the last request message. +// CircuitId returns a string +func (obj *dhcpv4LeaseState) HasCircuitId() bool { + return obj.obj.CircuitId != nil +} + +// The Circuit ID option found in the last request message. +// SetCircuitId sets the string value in the Dhcpv4LeaseState object +func (obj *dhcpv4LeaseState) SetCircuitId(value string) Dhcpv4LeaseState { + + obj.obj.CircuitId = &value + return obj +} + +// The Remote ID option found in the last request message. +// RemoteId returns a string +func (obj *dhcpv4LeaseState) RemoteId() string { + + return *obj.obj.RemoteId + +} + +// The Remote ID option found in the last request message. +// RemoteId returns a string +func (obj *dhcpv4LeaseState) HasRemoteId() bool { + return obj.obj.RemoteId != nil +} + +// The Remote ID option found in the last request message. +// SetRemoteId sets the string value in the Dhcpv4LeaseState object +func (obj *dhcpv4LeaseState) SetRemoteId(value string) Dhcpv4LeaseState { + + obj.obj.RemoteId = &value + return obj +} + +func (obj *dhcpv4LeaseState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv4LeaseState) setDefault() { + +} diff --git a/gosnappi/dhcpv4_lease_state_request.go b/gosnappi/dhcpv4_lease_state_request.go new file mode 100644 index 00000000..d447343d --- /dev/null +++ b/gosnappi/dhcpv4_lease_state_request.go @@ -0,0 +1,317 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv4LeaseStateRequest ***** +type dhcpv4LeaseStateRequest struct { + validation + obj *otg.Dhcpv4LeaseStateRequest + marshaller marshalDhcpv4LeaseStateRequest + unMarshaller unMarshalDhcpv4LeaseStateRequest +} + +func NewDhcpv4LeaseStateRequest() Dhcpv4LeaseStateRequest { + obj := dhcpv4LeaseStateRequest{obj: &otg.Dhcpv4LeaseStateRequest{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv4LeaseStateRequest) msg() *otg.Dhcpv4LeaseStateRequest { + return obj.obj +} + +func (obj *dhcpv4LeaseStateRequest) setMsg(msg *otg.Dhcpv4LeaseStateRequest) Dhcpv4LeaseStateRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv4LeaseStateRequest struct { + obj *dhcpv4LeaseStateRequest +} + +type marshalDhcpv4LeaseStateRequest interface { + // ToProto marshals Dhcpv4LeaseStateRequest to protobuf object *otg.Dhcpv4LeaseStateRequest + ToProto() (*otg.Dhcpv4LeaseStateRequest, error) + // ToPbText marshals Dhcpv4LeaseStateRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv4LeaseStateRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv4LeaseStateRequest to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv4LeaseStateRequest struct { + obj *dhcpv4LeaseStateRequest +} + +type unMarshalDhcpv4LeaseStateRequest interface { + // FromProto unmarshals Dhcpv4LeaseStateRequest from protobuf object *otg.Dhcpv4LeaseStateRequest + FromProto(msg *otg.Dhcpv4LeaseStateRequest) (Dhcpv4LeaseStateRequest, error) + // FromPbText unmarshals Dhcpv4LeaseStateRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv4LeaseStateRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv4LeaseStateRequest from JSON text + FromJson(value string) error +} + +func (obj *dhcpv4LeaseStateRequest) Marshal() marshalDhcpv4LeaseStateRequest { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv4LeaseStateRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv4LeaseStateRequest) Unmarshal() unMarshalDhcpv4LeaseStateRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv4LeaseStateRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv4LeaseStateRequest) ToProto() (*otg.Dhcpv4LeaseStateRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv4LeaseStateRequest) FromProto(msg *otg.Dhcpv4LeaseStateRequest) (Dhcpv4LeaseStateRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv4LeaseStateRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv4LeaseStateRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv4LeaseStateRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4LeaseStateRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv4LeaseStateRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4LeaseStateRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv4LeaseStateRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv4LeaseStateRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv4LeaseStateRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv4LeaseStateRequest) Clone() (Dhcpv4LeaseStateRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv4LeaseStateRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv4LeaseStateRequest is the request to retrieve DHCP Server host allocated status. +type Dhcpv4LeaseStateRequest interface { + Validation + // msg marshals Dhcpv4LeaseStateRequest to protobuf object *otg.Dhcpv4LeaseStateRequest + // and doesn't set defaults + msg() *otg.Dhcpv4LeaseStateRequest + // setMsg unmarshals Dhcpv4LeaseStateRequest from protobuf object *otg.Dhcpv4LeaseStateRequest + // and doesn't set defaults + setMsg(*otg.Dhcpv4LeaseStateRequest) Dhcpv4LeaseStateRequest + // provides marshal interface + Marshal() marshalDhcpv4LeaseStateRequest + // provides unmarshal interface + Unmarshal() unMarshalDhcpv4LeaseStateRequest + // validate validates Dhcpv4LeaseStateRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv4LeaseStateRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // DhcpServerNames returns []string, set in Dhcpv4LeaseStateRequest. + DhcpServerNames() []string + // SetDhcpServerNames assigns []string provided by user to Dhcpv4LeaseStateRequest + SetDhcpServerNames(value []string) Dhcpv4LeaseStateRequest +} + +// The names of DHCPv4 server to return results for. An empty list will return results for all DHCPv4 servers. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4server/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4server/properties/name +// +// DhcpServerNames returns a []string +func (obj *dhcpv4LeaseStateRequest) DhcpServerNames() []string { + if obj.obj.DhcpServerNames == nil { + obj.obj.DhcpServerNames = make([]string, 0) + } + return obj.obj.DhcpServerNames +} + +// The names of DHCPv4 server to return results for. An empty list will return results for all DHCPv4 servers. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4server/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4server/properties/name +// +// SetDhcpServerNames sets the []string value in the Dhcpv4LeaseStateRequest object +func (obj *dhcpv4LeaseStateRequest) SetDhcpServerNames(value []string) Dhcpv4LeaseStateRequest { + + if obj.obj.DhcpServerNames == nil { + obj.obj.DhcpServerNames = make([]string, 0) + } + obj.obj.DhcpServerNames = value + + return obj +} + +func (obj *dhcpv4LeaseStateRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv4LeaseStateRequest) setDefault() { + +} diff --git a/gosnappi/dhcpv4_leases_state.go b/gosnappi/dhcpv4_leases_state.go new file mode 100644 index 00000000..9691d4a4 --- /dev/null +++ b/gosnappi/dhcpv4_leases_state.go @@ -0,0 +1,418 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv4LeasesState ***** +type dhcpv4LeasesState struct { + validation + obj *otg.Dhcpv4LeasesState + marshaller marshalDhcpv4LeasesState + unMarshaller unMarshalDhcpv4LeasesState + leasesHolder Dhcpv4LeasesStateDhcpv4LeaseStateIter +} + +func NewDhcpv4LeasesState() Dhcpv4LeasesState { + obj := dhcpv4LeasesState{obj: &otg.Dhcpv4LeasesState{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv4LeasesState) msg() *otg.Dhcpv4LeasesState { + return obj.obj +} + +func (obj *dhcpv4LeasesState) setMsg(msg *otg.Dhcpv4LeasesState) Dhcpv4LeasesState { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv4LeasesState struct { + obj *dhcpv4LeasesState +} + +type marshalDhcpv4LeasesState interface { + // ToProto marshals Dhcpv4LeasesState to protobuf object *otg.Dhcpv4LeasesState + ToProto() (*otg.Dhcpv4LeasesState, error) + // ToPbText marshals Dhcpv4LeasesState to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv4LeasesState to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv4LeasesState to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv4LeasesState struct { + obj *dhcpv4LeasesState +} + +type unMarshalDhcpv4LeasesState interface { + // FromProto unmarshals Dhcpv4LeasesState from protobuf object *otg.Dhcpv4LeasesState + FromProto(msg *otg.Dhcpv4LeasesState) (Dhcpv4LeasesState, error) + // FromPbText unmarshals Dhcpv4LeasesState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv4LeasesState from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv4LeasesState from JSON text + FromJson(value string) error +} + +func (obj *dhcpv4LeasesState) Marshal() marshalDhcpv4LeasesState { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv4LeasesState{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv4LeasesState) Unmarshal() unMarshalDhcpv4LeasesState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv4LeasesState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv4LeasesState) ToProto() (*otg.Dhcpv4LeasesState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv4LeasesState) FromProto(msg *otg.Dhcpv4LeasesState) (Dhcpv4LeasesState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv4LeasesState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv4LeasesState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv4LeasesState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4LeasesState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv4LeasesState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4LeasesState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv4LeasesState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv4LeasesState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv4LeasesState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv4LeasesState) Clone() (Dhcpv4LeasesState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv4LeasesState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv4LeasesState) setNil() { + obj.leasesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv4LeasesState is lease information of DHCP Server. +type Dhcpv4LeasesState interface { + Validation + // msg marshals Dhcpv4LeasesState to protobuf object *otg.Dhcpv4LeasesState + // and doesn't set defaults + msg() *otg.Dhcpv4LeasesState + // setMsg unmarshals Dhcpv4LeasesState from protobuf object *otg.Dhcpv4LeasesState + // and doesn't set defaults + setMsg(*otg.Dhcpv4LeasesState) Dhcpv4LeasesState + // provides marshal interface + Marshal() marshalDhcpv4LeasesState + // provides unmarshal interface + Unmarshal() unMarshalDhcpv4LeasesState + // validate validates Dhcpv4LeasesState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv4LeasesState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // DhcpServerName returns string, set in Dhcpv4LeasesState. + DhcpServerName() string + // SetDhcpServerName assigns string provided by user to Dhcpv4LeasesState + SetDhcpServerName(value string) Dhcpv4LeasesState + // HasDhcpServerName checks if DhcpServerName has been set in Dhcpv4LeasesState + HasDhcpServerName() bool + // Leases returns Dhcpv4LeasesStateDhcpv4LeaseStateIterIter, set in Dhcpv4LeasesState + Leases() Dhcpv4LeasesStateDhcpv4LeaseStateIter + setNil() +} + +// The name of a DHCP Server. +// DhcpServerName returns a string +func (obj *dhcpv4LeasesState) DhcpServerName() string { + + return *obj.obj.DhcpServerName + +} + +// The name of a DHCP Server. +// DhcpServerName returns a string +func (obj *dhcpv4LeasesState) HasDhcpServerName() bool { + return obj.obj.DhcpServerName != nil +} + +// The name of a DHCP Server. +// SetDhcpServerName sets the string value in the Dhcpv4LeasesState object +func (obj *dhcpv4LeasesState) SetDhcpServerName(value string) Dhcpv4LeasesState { + + obj.obj.DhcpServerName = &value + return obj +} + +// description is TBD +// Leases returns a []Dhcpv4LeaseState +func (obj *dhcpv4LeasesState) Leases() Dhcpv4LeasesStateDhcpv4LeaseStateIter { + if len(obj.obj.Leases) == 0 { + obj.obj.Leases = []*otg.Dhcpv4LeaseState{} + } + if obj.leasesHolder == nil { + obj.leasesHolder = newDhcpv4LeasesStateDhcpv4LeaseStateIter(&obj.obj.Leases).setMsg(obj) + } + return obj.leasesHolder +} + +type dhcpv4LeasesStateDhcpv4LeaseStateIter struct { + obj *dhcpv4LeasesState + dhcpv4LeaseStateSlice []Dhcpv4LeaseState + fieldPtr *[]*otg.Dhcpv4LeaseState +} + +func newDhcpv4LeasesStateDhcpv4LeaseStateIter(ptr *[]*otg.Dhcpv4LeaseState) Dhcpv4LeasesStateDhcpv4LeaseStateIter { + return &dhcpv4LeasesStateDhcpv4LeaseStateIter{fieldPtr: ptr} +} + +type Dhcpv4LeasesStateDhcpv4LeaseStateIter interface { + setMsg(*dhcpv4LeasesState) Dhcpv4LeasesStateDhcpv4LeaseStateIter + Items() []Dhcpv4LeaseState + Add() Dhcpv4LeaseState + Append(items ...Dhcpv4LeaseState) Dhcpv4LeasesStateDhcpv4LeaseStateIter + Set(index int, newObj Dhcpv4LeaseState) Dhcpv4LeasesStateDhcpv4LeaseStateIter + Clear() Dhcpv4LeasesStateDhcpv4LeaseStateIter + clearHolderSlice() Dhcpv4LeasesStateDhcpv4LeaseStateIter + appendHolderSlice(item Dhcpv4LeaseState) Dhcpv4LeasesStateDhcpv4LeaseStateIter +} + +func (obj *dhcpv4LeasesStateDhcpv4LeaseStateIter) setMsg(msg *dhcpv4LeasesState) Dhcpv4LeasesStateDhcpv4LeaseStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv4LeaseState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *dhcpv4LeasesStateDhcpv4LeaseStateIter) Items() []Dhcpv4LeaseState { + return obj.dhcpv4LeaseStateSlice +} + +func (obj *dhcpv4LeasesStateDhcpv4LeaseStateIter) Add() Dhcpv4LeaseState { + newObj := &otg.Dhcpv4LeaseState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv4LeaseState{obj: newObj} + newLibObj.setDefault() + obj.dhcpv4LeaseStateSlice = append(obj.dhcpv4LeaseStateSlice, newLibObj) + return newLibObj +} + +func (obj *dhcpv4LeasesStateDhcpv4LeaseStateIter) Append(items ...Dhcpv4LeaseState) Dhcpv4LeasesStateDhcpv4LeaseStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv4LeaseStateSlice = append(obj.dhcpv4LeaseStateSlice, item) + } + return obj +} + +func (obj *dhcpv4LeasesStateDhcpv4LeaseStateIter) Set(index int, newObj Dhcpv4LeaseState) Dhcpv4LeasesStateDhcpv4LeaseStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv4LeaseStateSlice[index] = newObj + return obj +} +func (obj *dhcpv4LeasesStateDhcpv4LeaseStateIter) Clear() Dhcpv4LeasesStateDhcpv4LeaseStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv4LeaseState{} + obj.dhcpv4LeaseStateSlice = []Dhcpv4LeaseState{} + } + return obj +} +func (obj *dhcpv4LeasesStateDhcpv4LeaseStateIter) clearHolderSlice() Dhcpv4LeasesStateDhcpv4LeaseStateIter { + if len(obj.dhcpv4LeaseStateSlice) > 0 { + obj.dhcpv4LeaseStateSlice = []Dhcpv4LeaseState{} + } + return obj +} +func (obj *dhcpv4LeasesStateDhcpv4LeaseStateIter) appendHolderSlice(item Dhcpv4LeaseState) Dhcpv4LeasesStateDhcpv4LeaseStateIter { + obj.dhcpv4LeaseStateSlice = append(obj.dhcpv4LeaseStateSlice, item) + return obj +} + +func (obj *dhcpv4LeasesState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Leases) != 0 { + + if set_default { + obj.Leases().clearHolderSlice() + for _, item := range obj.obj.Leases { + obj.Leases().appendHolderSlice(&dhcpv4LeaseState{obj: item}) + } + } + for _, item := range obj.Leases().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *dhcpv4LeasesState) setDefault() { + +} diff --git a/gosnappi/dhcpv4_server_metric.go b/gosnappi/dhcpv4_server_metric.go new file mode 100644 index 00000000..60b7c127 --- /dev/null +++ b/gosnappi/dhcpv4_server_metric.go @@ -0,0 +1,502 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv4ServerMetric ***** +type dhcpv4ServerMetric struct { + validation + obj *otg.Dhcpv4ServerMetric + marshaller marshalDhcpv4ServerMetric + unMarshaller unMarshalDhcpv4ServerMetric +} + +func NewDhcpv4ServerMetric() Dhcpv4ServerMetric { + obj := dhcpv4ServerMetric{obj: &otg.Dhcpv4ServerMetric{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv4ServerMetric) msg() *otg.Dhcpv4ServerMetric { + return obj.obj +} + +func (obj *dhcpv4ServerMetric) setMsg(msg *otg.Dhcpv4ServerMetric) Dhcpv4ServerMetric { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv4ServerMetric struct { + obj *dhcpv4ServerMetric +} + +type marshalDhcpv4ServerMetric interface { + // ToProto marshals Dhcpv4ServerMetric to protobuf object *otg.Dhcpv4ServerMetric + ToProto() (*otg.Dhcpv4ServerMetric, error) + // ToPbText marshals Dhcpv4ServerMetric to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv4ServerMetric to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv4ServerMetric to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv4ServerMetric struct { + obj *dhcpv4ServerMetric +} + +type unMarshalDhcpv4ServerMetric interface { + // FromProto unmarshals Dhcpv4ServerMetric from protobuf object *otg.Dhcpv4ServerMetric + FromProto(msg *otg.Dhcpv4ServerMetric) (Dhcpv4ServerMetric, error) + // FromPbText unmarshals Dhcpv4ServerMetric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv4ServerMetric from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv4ServerMetric from JSON text + FromJson(value string) error +} + +func (obj *dhcpv4ServerMetric) Marshal() marshalDhcpv4ServerMetric { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv4ServerMetric{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv4ServerMetric) Unmarshal() unMarshalDhcpv4ServerMetric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv4ServerMetric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv4ServerMetric) ToProto() (*otg.Dhcpv4ServerMetric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv4ServerMetric) FromProto(msg *otg.Dhcpv4ServerMetric) (Dhcpv4ServerMetric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv4ServerMetric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv4ServerMetric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv4ServerMetric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4ServerMetric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv4ServerMetric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4ServerMetric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv4ServerMetric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv4ServerMetric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv4ServerMetric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv4ServerMetric) Clone() (Dhcpv4ServerMetric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv4ServerMetric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv4ServerMetric is dHCPv4 per peer statistics information. +type Dhcpv4ServerMetric interface { + Validation + // msg marshals Dhcpv4ServerMetric to protobuf object *otg.Dhcpv4ServerMetric + // and doesn't set defaults + msg() *otg.Dhcpv4ServerMetric + // setMsg unmarshals Dhcpv4ServerMetric from protobuf object *otg.Dhcpv4ServerMetric + // and doesn't set defaults + setMsg(*otg.Dhcpv4ServerMetric) Dhcpv4ServerMetric + // provides marshal interface + Marshal() marshalDhcpv4ServerMetric + // provides unmarshal interface + Unmarshal() unMarshalDhcpv4ServerMetric + // validate validates Dhcpv4ServerMetric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv4ServerMetric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in Dhcpv4ServerMetric. + Name() string + // SetName assigns string provided by user to Dhcpv4ServerMetric + SetName(value string) Dhcpv4ServerMetric + // HasName checks if Name has been set in Dhcpv4ServerMetric + HasName() bool + // DiscoversReceived returns uint64, set in Dhcpv4ServerMetric. + DiscoversReceived() uint64 + // SetDiscoversReceived assigns uint64 provided by user to Dhcpv4ServerMetric + SetDiscoversReceived(value uint64) Dhcpv4ServerMetric + // HasDiscoversReceived checks if DiscoversReceived has been set in Dhcpv4ServerMetric + HasDiscoversReceived() bool + // OffersSent returns uint64, set in Dhcpv4ServerMetric. + OffersSent() uint64 + // SetOffersSent assigns uint64 provided by user to Dhcpv4ServerMetric + SetOffersSent(value uint64) Dhcpv4ServerMetric + // HasOffersSent checks if OffersSent has been set in Dhcpv4ServerMetric + HasOffersSent() bool + // RequestsReceived returns uint64, set in Dhcpv4ServerMetric. + RequestsReceived() uint64 + // SetRequestsReceived assigns uint64 provided by user to Dhcpv4ServerMetric + SetRequestsReceived(value uint64) Dhcpv4ServerMetric + // HasRequestsReceived checks if RequestsReceived has been set in Dhcpv4ServerMetric + HasRequestsReceived() bool + // AcksSent returns uint64, set in Dhcpv4ServerMetric. + AcksSent() uint64 + // SetAcksSent assigns uint64 provided by user to Dhcpv4ServerMetric + SetAcksSent(value uint64) Dhcpv4ServerMetric + // HasAcksSent checks if AcksSent has been set in Dhcpv4ServerMetric + HasAcksSent() bool + // NacksSent returns uint64, set in Dhcpv4ServerMetric. + NacksSent() uint64 + // SetNacksSent assigns uint64 provided by user to Dhcpv4ServerMetric + SetNacksSent(value uint64) Dhcpv4ServerMetric + // HasNacksSent checks if NacksSent has been set in Dhcpv4ServerMetric + HasNacksSent() bool + // ReleasesReceived returns uint64, set in Dhcpv4ServerMetric. + ReleasesReceived() uint64 + // SetReleasesReceived assigns uint64 provided by user to Dhcpv4ServerMetric + SetReleasesReceived(value uint64) Dhcpv4ServerMetric + // HasReleasesReceived checks if ReleasesReceived has been set in Dhcpv4ServerMetric + HasReleasesReceived() bool + // DeclinesReceived returns uint64, set in Dhcpv4ServerMetric. + DeclinesReceived() uint64 + // SetDeclinesReceived assigns uint64 provided by user to Dhcpv4ServerMetric + SetDeclinesReceived(value uint64) Dhcpv4ServerMetric + // HasDeclinesReceived checks if DeclinesReceived has been set in Dhcpv4ServerMetric + HasDeclinesReceived() bool +} + +// The name of a configured DHCPv4 Server. +// Name returns a string +func (obj *dhcpv4ServerMetric) Name() string { + + return *obj.obj.Name + +} + +// The name of a configured DHCPv4 Server. +// Name returns a string +func (obj *dhcpv4ServerMetric) HasName() bool { + return obj.obj.Name != nil +} + +// The name of a configured DHCPv4 Server. +// SetName sets the string value in the Dhcpv4ServerMetric object +func (obj *dhcpv4ServerMetric) SetName(value string) Dhcpv4ServerMetric { + + obj.obj.Name = &value + return obj +} + +// Number of DHCPDISCOVER messages received. +// DiscoversReceived returns a uint64 +func (obj *dhcpv4ServerMetric) DiscoversReceived() uint64 { + + return *obj.obj.DiscoversReceived + +} + +// Number of DHCPDISCOVER messages received. +// DiscoversReceived returns a uint64 +func (obj *dhcpv4ServerMetric) HasDiscoversReceived() bool { + return obj.obj.DiscoversReceived != nil +} + +// Number of DHCPDISCOVER messages received. +// SetDiscoversReceived sets the uint64 value in the Dhcpv4ServerMetric object +func (obj *dhcpv4ServerMetric) SetDiscoversReceived(value uint64) Dhcpv4ServerMetric { + + obj.obj.DiscoversReceived = &value + return obj +} + +// Number of DHCPOFFER messages sent. +// OffersSent returns a uint64 +func (obj *dhcpv4ServerMetric) OffersSent() uint64 { + + return *obj.obj.OffersSent + +} + +// Number of DHCPOFFER messages sent. +// OffersSent returns a uint64 +func (obj *dhcpv4ServerMetric) HasOffersSent() bool { + return obj.obj.OffersSent != nil +} + +// Number of DHCPOFFER messages sent. +// SetOffersSent sets the uint64 value in the Dhcpv4ServerMetric object +func (obj *dhcpv4ServerMetric) SetOffersSent(value uint64) Dhcpv4ServerMetric { + + obj.obj.OffersSent = &value + return obj +} + +// Number of DHCPOFFER messages received. +// RequestsReceived returns a uint64 +func (obj *dhcpv4ServerMetric) RequestsReceived() uint64 { + + return *obj.obj.RequestsReceived + +} + +// Number of DHCPOFFER messages received. +// RequestsReceived returns a uint64 +func (obj *dhcpv4ServerMetric) HasRequestsReceived() bool { + return obj.obj.RequestsReceived != nil +} + +// Number of DHCPOFFER messages received. +// SetRequestsReceived sets the uint64 value in the Dhcpv4ServerMetric object +func (obj *dhcpv4ServerMetric) SetRequestsReceived(value uint64) Dhcpv4ServerMetric { + + obj.obj.RequestsReceived = &value + return obj +} + +// Number of lease DHCPACK messages sent. +// AcksSent returns a uint64 +func (obj *dhcpv4ServerMetric) AcksSent() uint64 { + + return *obj.obj.AcksSent + +} + +// Number of lease DHCPACK messages sent. +// AcksSent returns a uint64 +func (obj *dhcpv4ServerMetric) HasAcksSent() bool { + return obj.obj.AcksSent != nil +} + +// Number of lease DHCPACK messages sent. +// SetAcksSent sets the uint64 value in the Dhcpv4ServerMetric object +func (obj *dhcpv4ServerMetric) SetAcksSent(value uint64) Dhcpv4ServerMetric { + + obj.obj.AcksSent = &value + return obj +} + +// Number of negative lease DHCPNACK messages sent. +// NacksSent returns a uint64 +func (obj *dhcpv4ServerMetric) NacksSent() uint64 { + + return *obj.obj.NacksSent + +} + +// Number of negative lease DHCPNACK messages sent. +// NacksSent returns a uint64 +func (obj *dhcpv4ServerMetric) HasNacksSent() bool { + return obj.obj.NacksSent != nil +} + +// Number of negative lease DHCPNACK messages sent. +// SetNacksSent sets the uint64 value in the Dhcpv4ServerMetric object +func (obj *dhcpv4ServerMetric) SetNacksSent(value uint64) Dhcpv4ServerMetric { + + obj.obj.NacksSent = &value + return obj +} + +// Number of DHCPRELEASE messages received. +// ReleasesReceived returns a uint64 +func (obj *dhcpv4ServerMetric) ReleasesReceived() uint64 { + + return *obj.obj.ReleasesReceived + +} + +// Number of DHCPRELEASE messages received. +// ReleasesReceived returns a uint64 +func (obj *dhcpv4ServerMetric) HasReleasesReceived() bool { + return obj.obj.ReleasesReceived != nil +} + +// Number of DHCPRELEASE messages received. +// SetReleasesReceived sets the uint64 value in the Dhcpv4ServerMetric object +func (obj *dhcpv4ServerMetric) SetReleasesReceived(value uint64) Dhcpv4ServerMetric { + + obj.obj.ReleasesReceived = &value + return obj +} + +// Number of DHCPDECLINE messages received. +// DeclinesReceived returns a uint64 +func (obj *dhcpv4ServerMetric) DeclinesReceived() uint64 { + + return *obj.obj.DeclinesReceived + +} + +// Number of DHCPDECLINE messages received. +// DeclinesReceived returns a uint64 +func (obj *dhcpv4ServerMetric) HasDeclinesReceived() bool { + return obj.obj.DeclinesReceived != nil +} + +// Number of DHCPDECLINE messages received. +// SetDeclinesReceived sets the uint64 value in the Dhcpv4ServerMetric object +func (obj *dhcpv4ServerMetric) SetDeclinesReceived(value uint64) Dhcpv4ServerMetric { + + obj.obj.DeclinesReceived = &value + return obj +} + +func (obj *dhcpv4ServerMetric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv4ServerMetric) setDefault() { + +} diff --git a/gosnappi/dhcpv4_server_metrics_request.go b/gosnappi/dhcpv4_server_metrics_request.go new file mode 100644 index 00000000..0c704e76 --- /dev/null +++ b/gosnappi/dhcpv4_server_metrics_request.go @@ -0,0 +1,363 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv4ServerMetricsRequest ***** +type dhcpv4ServerMetricsRequest struct { + validation + obj *otg.Dhcpv4ServerMetricsRequest + marshaller marshalDhcpv4ServerMetricsRequest + unMarshaller unMarshalDhcpv4ServerMetricsRequest +} + +func NewDhcpv4ServerMetricsRequest() Dhcpv4ServerMetricsRequest { + obj := dhcpv4ServerMetricsRequest{obj: &otg.Dhcpv4ServerMetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv4ServerMetricsRequest) msg() *otg.Dhcpv4ServerMetricsRequest { + return obj.obj +} + +func (obj *dhcpv4ServerMetricsRequest) setMsg(msg *otg.Dhcpv4ServerMetricsRequest) Dhcpv4ServerMetricsRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv4ServerMetricsRequest struct { + obj *dhcpv4ServerMetricsRequest +} + +type marshalDhcpv4ServerMetricsRequest interface { + // ToProto marshals Dhcpv4ServerMetricsRequest to protobuf object *otg.Dhcpv4ServerMetricsRequest + ToProto() (*otg.Dhcpv4ServerMetricsRequest, error) + // ToPbText marshals Dhcpv4ServerMetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv4ServerMetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv4ServerMetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv4ServerMetricsRequest struct { + obj *dhcpv4ServerMetricsRequest +} + +type unMarshalDhcpv4ServerMetricsRequest interface { + // FromProto unmarshals Dhcpv4ServerMetricsRequest from protobuf object *otg.Dhcpv4ServerMetricsRequest + FromProto(msg *otg.Dhcpv4ServerMetricsRequest) (Dhcpv4ServerMetricsRequest, error) + // FromPbText unmarshals Dhcpv4ServerMetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv4ServerMetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv4ServerMetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *dhcpv4ServerMetricsRequest) Marshal() marshalDhcpv4ServerMetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv4ServerMetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv4ServerMetricsRequest) Unmarshal() unMarshalDhcpv4ServerMetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv4ServerMetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv4ServerMetricsRequest) ToProto() (*otg.Dhcpv4ServerMetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv4ServerMetricsRequest) FromProto(msg *otg.Dhcpv4ServerMetricsRequest) (Dhcpv4ServerMetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv4ServerMetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv4ServerMetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv4ServerMetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4ServerMetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv4ServerMetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv4ServerMetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv4ServerMetricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv4ServerMetricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv4ServerMetricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv4ServerMetricsRequest) Clone() (Dhcpv4ServerMetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv4ServerMetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv4ServerMetricsRequest is the request to retrieve DHCPv4 per Server metrics/statistics. +type Dhcpv4ServerMetricsRequest interface { + Validation + // msg marshals Dhcpv4ServerMetricsRequest to protobuf object *otg.Dhcpv4ServerMetricsRequest + // and doesn't set defaults + msg() *otg.Dhcpv4ServerMetricsRequest + // setMsg unmarshals Dhcpv4ServerMetricsRequest from protobuf object *otg.Dhcpv4ServerMetricsRequest + // and doesn't set defaults + setMsg(*otg.Dhcpv4ServerMetricsRequest) Dhcpv4ServerMetricsRequest + // provides marshal interface + Marshal() marshalDhcpv4ServerMetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalDhcpv4ServerMetricsRequest + // validate validates Dhcpv4ServerMetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv4ServerMetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ServerNames returns []string, set in Dhcpv4ServerMetricsRequest. + ServerNames() []string + // SetServerNames assigns []string provided by user to Dhcpv4ServerMetricsRequest + SetServerNames(value []string) Dhcpv4ServerMetricsRequest + // ColumnNames returns []Dhcpv4ServerMetricsRequestColumnNamesEnum, set in Dhcpv4ServerMetricsRequest + ColumnNames() []Dhcpv4ServerMetricsRequestColumnNamesEnum + // SetColumnNames assigns []Dhcpv4ServerMetricsRequestColumnNamesEnum provided by user to Dhcpv4ServerMetricsRequest + SetColumnNames(value []Dhcpv4ServerMetricsRequestColumnNamesEnum) Dhcpv4ServerMetricsRequest +} + +// The names of DHCPv4 Servers to return results for. An empty list will return results for all DHCPv4 Server. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4Server/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4Server/properties/name +// +// ServerNames returns a []string +func (obj *dhcpv4ServerMetricsRequest) ServerNames() []string { + if obj.obj.ServerNames == nil { + obj.obj.ServerNames = make([]string, 0) + } + return obj.obj.ServerNames +} + +// The names of DHCPv4 Servers to return results for. An empty list will return results for all DHCPv4 Server. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4Server/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv4Server/properties/name +// +// SetServerNames sets the []string value in the Dhcpv4ServerMetricsRequest object +func (obj *dhcpv4ServerMetricsRequest) SetServerNames(value []string) Dhcpv4ServerMetricsRequest { + + if obj.obj.ServerNames == nil { + obj.obj.ServerNames = make([]string, 0) + } + obj.obj.ServerNames = value + + return obj +} + +type Dhcpv4ServerMetricsRequestColumnNamesEnum string + +// Enum of ColumnNames on Dhcpv4ServerMetricsRequest +var Dhcpv4ServerMetricsRequestColumnNames = struct { + DISCOVERS_RECEIVED Dhcpv4ServerMetricsRequestColumnNamesEnum + OFFERS_SENT Dhcpv4ServerMetricsRequestColumnNamesEnum + REQUESTS_RECEIVED Dhcpv4ServerMetricsRequestColumnNamesEnum + ACKS_SENT Dhcpv4ServerMetricsRequestColumnNamesEnum + NACKS_SENT Dhcpv4ServerMetricsRequestColumnNamesEnum + RELEASES_RECEIVED Dhcpv4ServerMetricsRequestColumnNamesEnum + DECLINES_RECEIVED Dhcpv4ServerMetricsRequestColumnNamesEnum +}{ + DISCOVERS_RECEIVED: Dhcpv4ServerMetricsRequestColumnNamesEnum("discovers_received"), + OFFERS_SENT: Dhcpv4ServerMetricsRequestColumnNamesEnum("offers_sent"), + REQUESTS_RECEIVED: Dhcpv4ServerMetricsRequestColumnNamesEnum("requests_received"), + ACKS_SENT: Dhcpv4ServerMetricsRequestColumnNamesEnum("acks_sent"), + NACKS_SENT: Dhcpv4ServerMetricsRequestColumnNamesEnum("nacks_sent"), + RELEASES_RECEIVED: Dhcpv4ServerMetricsRequestColumnNamesEnum("releases_received"), + DECLINES_RECEIVED: Dhcpv4ServerMetricsRequestColumnNamesEnum("declines_received"), +} + +func (obj *dhcpv4ServerMetricsRequest) ColumnNames() []Dhcpv4ServerMetricsRequestColumnNamesEnum { + items := []Dhcpv4ServerMetricsRequestColumnNamesEnum{} + for _, item := range obj.obj.ColumnNames { + items = append(items, Dhcpv4ServerMetricsRequestColumnNamesEnum(item.String())) + } + return items +} + +// The list of column names that the returned result set will contain. If the list is empty then all columns will be returned. The name of the DHCPv4 server cannot be excluded. +// SetColumnNames sets the []string value in the Dhcpv4ServerMetricsRequest object +func (obj *dhcpv4ServerMetricsRequest) SetColumnNames(value []Dhcpv4ServerMetricsRequestColumnNamesEnum) Dhcpv4ServerMetricsRequest { + + items := []otg.Dhcpv4ServerMetricsRequest_ColumnNames_Enum{} + for _, item := range value { + intValue := otg.Dhcpv4ServerMetricsRequest_ColumnNames_Enum_value[string(item)] + items = append(items, otg.Dhcpv4ServerMetricsRequest_ColumnNames_Enum(intValue)) + } + obj.obj.ColumnNames = items + return obj +} + +func (obj *dhcpv4ServerMetricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv4ServerMetricsRequest) setDefault() { + +} diff --git a/gosnappi/dhcpv6_client_metric.go b/gosnappi/dhcpv6_client_metric.go new file mode 100644 index 00000000..bc6d2a8b --- /dev/null +++ b/gosnappi/dhcpv6_client_metric.go @@ -0,0 +1,670 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientMetric ***** +type dhcpv6ClientMetric struct { + validation + obj *otg.Dhcpv6ClientMetric + marshaller marshalDhcpv6ClientMetric + unMarshaller unMarshalDhcpv6ClientMetric +} + +func NewDhcpv6ClientMetric() Dhcpv6ClientMetric { + obj := dhcpv6ClientMetric{obj: &otg.Dhcpv6ClientMetric{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientMetric) msg() *otg.Dhcpv6ClientMetric { + return obj.obj +} + +func (obj *dhcpv6ClientMetric) setMsg(msg *otg.Dhcpv6ClientMetric) Dhcpv6ClientMetric { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientMetric struct { + obj *dhcpv6ClientMetric +} + +type marshalDhcpv6ClientMetric interface { + // ToProto marshals Dhcpv6ClientMetric to protobuf object *otg.Dhcpv6ClientMetric + ToProto() (*otg.Dhcpv6ClientMetric, error) + // ToPbText marshals Dhcpv6ClientMetric to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientMetric to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientMetric to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientMetric struct { + obj *dhcpv6ClientMetric +} + +type unMarshalDhcpv6ClientMetric interface { + // FromProto unmarshals Dhcpv6ClientMetric from protobuf object *otg.Dhcpv6ClientMetric + FromProto(msg *otg.Dhcpv6ClientMetric) (Dhcpv6ClientMetric, error) + // FromPbText unmarshals Dhcpv6ClientMetric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientMetric from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientMetric from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientMetric) Marshal() marshalDhcpv6ClientMetric { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientMetric{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientMetric) Unmarshal() unMarshalDhcpv6ClientMetric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientMetric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientMetric) ToProto() (*otg.Dhcpv6ClientMetric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientMetric) FromProto(msg *otg.Dhcpv6ClientMetric) (Dhcpv6ClientMetric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientMetric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientMetric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientMetric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientMetric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientMetric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientMetric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientMetric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientMetric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientMetric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientMetric) Clone() (Dhcpv6ClientMetric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientMetric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ClientMetric is dHCPv6 per peer statistics information. +type Dhcpv6ClientMetric interface { + Validation + // msg marshals Dhcpv6ClientMetric to protobuf object *otg.Dhcpv6ClientMetric + // and doesn't set defaults + msg() *otg.Dhcpv6ClientMetric + // setMsg unmarshals Dhcpv6ClientMetric from protobuf object *otg.Dhcpv6ClientMetric + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientMetric) Dhcpv6ClientMetric + // provides marshal interface + Marshal() marshalDhcpv6ClientMetric + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientMetric + // validate validates Dhcpv6ClientMetric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientMetric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in Dhcpv6ClientMetric. + Name() string + // SetName assigns string provided by user to Dhcpv6ClientMetric + SetName(value string) Dhcpv6ClientMetric + // HasName checks if Name has been set in Dhcpv6ClientMetric + HasName() bool + // SolicitsSent returns uint64, set in Dhcpv6ClientMetric. + SolicitsSent() uint64 + // SetSolicitsSent assigns uint64 provided by user to Dhcpv6ClientMetric + SetSolicitsSent(value uint64) Dhcpv6ClientMetric + // HasSolicitsSent checks if SolicitsSent has been set in Dhcpv6ClientMetric + HasSolicitsSent() bool + // AdvertisementsReceived returns uint64, set in Dhcpv6ClientMetric. + AdvertisementsReceived() uint64 + // SetAdvertisementsReceived assigns uint64 provided by user to Dhcpv6ClientMetric + SetAdvertisementsReceived(value uint64) Dhcpv6ClientMetric + // HasAdvertisementsReceived checks if AdvertisementsReceived has been set in Dhcpv6ClientMetric + HasAdvertisementsReceived() bool + // AdvertisementsIgnored returns uint64, set in Dhcpv6ClientMetric. + AdvertisementsIgnored() uint64 + // SetAdvertisementsIgnored assigns uint64 provided by user to Dhcpv6ClientMetric + SetAdvertisementsIgnored(value uint64) Dhcpv6ClientMetric + // HasAdvertisementsIgnored checks if AdvertisementsIgnored has been set in Dhcpv6ClientMetric + HasAdvertisementsIgnored() bool + // RequestsSent returns uint64, set in Dhcpv6ClientMetric. + RequestsSent() uint64 + // SetRequestsSent assigns uint64 provided by user to Dhcpv6ClientMetric + SetRequestsSent(value uint64) Dhcpv6ClientMetric + // HasRequestsSent checks if RequestsSent has been set in Dhcpv6ClientMetric + HasRequestsSent() bool + // NacksReceived returns uint64, set in Dhcpv6ClientMetric. + NacksReceived() uint64 + // SetNacksReceived assigns uint64 provided by user to Dhcpv6ClientMetric + SetNacksReceived(value uint64) Dhcpv6ClientMetric + // HasNacksReceived checks if NacksReceived has been set in Dhcpv6ClientMetric + HasNacksReceived() bool + // RepliesReceived returns uint64, set in Dhcpv6ClientMetric. + RepliesReceived() uint64 + // SetRepliesReceived assigns uint64 provided by user to Dhcpv6ClientMetric + SetRepliesReceived(value uint64) Dhcpv6ClientMetric + // HasRepliesReceived checks if RepliesReceived has been set in Dhcpv6ClientMetric + HasRepliesReceived() bool + // InformationRequestsSent returns uint64, set in Dhcpv6ClientMetric. + InformationRequestsSent() uint64 + // SetInformationRequestsSent assigns uint64 provided by user to Dhcpv6ClientMetric + SetInformationRequestsSent(value uint64) Dhcpv6ClientMetric + // HasInformationRequestsSent checks if InformationRequestsSent has been set in Dhcpv6ClientMetric + HasInformationRequestsSent() bool + // RenewsSent returns uint64, set in Dhcpv6ClientMetric. + RenewsSent() uint64 + // SetRenewsSent assigns uint64 provided by user to Dhcpv6ClientMetric + SetRenewsSent(value uint64) Dhcpv6ClientMetric + // HasRenewsSent checks if RenewsSent has been set in Dhcpv6ClientMetric + HasRenewsSent() bool + // RebindsSent returns uint64, set in Dhcpv6ClientMetric. + RebindsSent() uint64 + // SetRebindsSent assigns uint64 provided by user to Dhcpv6ClientMetric + SetRebindsSent(value uint64) Dhcpv6ClientMetric + // HasRebindsSent checks if RebindsSent has been set in Dhcpv6ClientMetric + HasRebindsSent() bool + // ReleasesSent returns uint64, set in Dhcpv6ClientMetric. + ReleasesSent() uint64 + // SetReleasesSent assigns uint64 provided by user to Dhcpv6ClientMetric + SetReleasesSent(value uint64) Dhcpv6ClientMetric + // HasReleasesSent checks if ReleasesSent has been set in Dhcpv6ClientMetric + HasReleasesSent() bool + // ReconfiguresReceived returns uint64, set in Dhcpv6ClientMetric. + ReconfiguresReceived() uint64 + // SetReconfiguresReceived assigns uint64 provided by user to Dhcpv6ClientMetric + SetReconfiguresReceived(value uint64) Dhcpv6ClientMetric + // HasReconfiguresReceived checks if ReconfiguresReceived has been set in Dhcpv6ClientMetric + HasReconfiguresReceived() bool + // RapidCommitSolicitsSent returns uint64, set in Dhcpv6ClientMetric. + RapidCommitSolicitsSent() uint64 + // SetRapidCommitSolicitsSent assigns uint64 provided by user to Dhcpv6ClientMetric + SetRapidCommitSolicitsSent(value uint64) Dhcpv6ClientMetric + // HasRapidCommitSolicitsSent checks if RapidCommitSolicitsSent has been set in Dhcpv6ClientMetric + HasRapidCommitSolicitsSent() bool + // RapidCommitRepliesReceived returns uint64, set in Dhcpv6ClientMetric. + RapidCommitRepliesReceived() uint64 + // SetRapidCommitRepliesReceived assigns uint64 provided by user to Dhcpv6ClientMetric + SetRapidCommitRepliesReceived(value uint64) Dhcpv6ClientMetric + // HasRapidCommitRepliesReceived checks if RapidCommitRepliesReceived has been set in Dhcpv6ClientMetric + HasRapidCommitRepliesReceived() bool +} + +// The name of a configured DHCPv6 client. +// Name returns a string +func (obj *dhcpv6ClientMetric) Name() string { + + return *obj.obj.Name + +} + +// The name of a configured DHCPv6 client. +// Name returns a string +func (obj *dhcpv6ClientMetric) HasName() bool { + return obj.obj.Name != nil +} + +// The name of a configured DHCPv6 client. +// SetName sets the string value in the Dhcpv6ClientMetric object +func (obj *dhcpv6ClientMetric) SetName(value string) Dhcpv6ClientMetric { + + obj.obj.Name = &value + return obj +} + +// Number of DHCPSOLICIT messages sent. +// SolicitsSent returns a uint64 +func (obj *dhcpv6ClientMetric) SolicitsSent() uint64 { + + return *obj.obj.SolicitsSent + +} + +// Number of DHCPSOLICIT messages sent. +// SolicitsSent returns a uint64 +func (obj *dhcpv6ClientMetric) HasSolicitsSent() bool { + return obj.obj.SolicitsSent != nil +} + +// Number of DHCPSOLICIT messages sent. +// SetSolicitsSent sets the uint64 value in the Dhcpv6ClientMetric object +func (obj *dhcpv6ClientMetric) SetSolicitsSent(value uint64) Dhcpv6ClientMetric { + + obj.obj.SolicitsSent = &value + return obj +} + +// Number of DHCPADVERTISE messages received. +// AdvertisementsReceived returns a uint64 +func (obj *dhcpv6ClientMetric) AdvertisementsReceived() uint64 { + + return *obj.obj.AdvertisementsReceived + +} + +// Number of DHCPADVERTISE messages received. +// AdvertisementsReceived returns a uint64 +func (obj *dhcpv6ClientMetric) HasAdvertisementsReceived() bool { + return obj.obj.AdvertisementsReceived != nil +} + +// Number of DHCPADVERTISE messages received. +// SetAdvertisementsReceived sets the uint64 value in the Dhcpv6ClientMetric object +func (obj *dhcpv6ClientMetric) SetAdvertisementsReceived(value uint64) Dhcpv6ClientMetric { + + obj.obj.AdvertisementsReceived = &value + return obj +} + +// Number of DHCPADVERTISE messages ignored. +// AdvertisementsIgnored returns a uint64 +func (obj *dhcpv6ClientMetric) AdvertisementsIgnored() uint64 { + + return *obj.obj.AdvertisementsIgnored + +} + +// Number of DHCPADVERTISE messages ignored. +// AdvertisementsIgnored returns a uint64 +func (obj *dhcpv6ClientMetric) HasAdvertisementsIgnored() bool { + return obj.obj.AdvertisementsIgnored != nil +} + +// Number of DHCPADVERTISE messages ignored. +// SetAdvertisementsIgnored sets the uint64 value in the Dhcpv6ClientMetric object +func (obj *dhcpv6ClientMetric) SetAdvertisementsIgnored(value uint64) Dhcpv6ClientMetric { + + obj.obj.AdvertisementsIgnored = &value + return obj +} + +// Number of DHCPREQUEST messages sent. +// RequestsSent returns a uint64 +func (obj *dhcpv6ClientMetric) RequestsSent() uint64 { + + return *obj.obj.RequestsSent + +} + +// Number of DHCPREQUEST messages sent. +// RequestsSent returns a uint64 +func (obj *dhcpv6ClientMetric) HasRequestsSent() bool { + return obj.obj.RequestsSent != nil +} + +// Number of DHCPREQUEST messages sent. +// SetRequestsSent sets the uint64 value in the Dhcpv6ClientMetric object +func (obj *dhcpv6ClientMetric) SetRequestsSent(value uint64) Dhcpv6ClientMetric { + + obj.obj.RequestsSent = &value + return obj +} + +// Number of negative lease DHCPNACK messages received. +// NacksReceived returns a uint64 +func (obj *dhcpv6ClientMetric) NacksReceived() uint64 { + + return *obj.obj.NacksReceived + +} + +// Number of negative lease DHCPNACK messages received. +// NacksReceived returns a uint64 +func (obj *dhcpv6ClientMetric) HasNacksReceived() bool { + return obj.obj.NacksReceived != nil +} + +// Number of negative lease DHCPNACK messages received. +// SetNacksReceived sets the uint64 value in the Dhcpv6ClientMetric object +func (obj *dhcpv6ClientMetric) SetNacksReceived(value uint64) Dhcpv6ClientMetric { + + obj.obj.NacksReceived = &value + return obj +} + +// Number of DHCPOFFER messages received. +// RepliesReceived returns a uint64 +func (obj *dhcpv6ClientMetric) RepliesReceived() uint64 { + + return *obj.obj.RepliesReceived + +} + +// Number of DHCPOFFER messages received. +// RepliesReceived returns a uint64 +func (obj *dhcpv6ClientMetric) HasRepliesReceived() bool { + return obj.obj.RepliesReceived != nil +} + +// Number of DHCPOFFER messages received. +// SetRepliesReceived sets the uint64 value in the Dhcpv6ClientMetric object +func (obj *dhcpv6ClientMetric) SetRepliesReceived(value uint64) Dhcpv6ClientMetric { + + obj.obj.RepliesReceived = &value + return obj +} + +// Number of DHCP Inform requests sent. +// InformationRequestsSent returns a uint64 +func (obj *dhcpv6ClientMetric) InformationRequestsSent() uint64 { + + return *obj.obj.InformationRequestsSent + +} + +// Number of DHCP Inform requests sent. +// InformationRequestsSent returns a uint64 +func (obj *dhcpv6ClientMetric) HasInformationRequestsSent() bool { + return obj.obj.InformationRequestsSent != nil +} + +// Number of DHCP Inform requests sent. +// SetInformationRequestsSent sets the uint64 value in the Dhcpv6ClientMetric object +func (obj *dhcpv6ClientMetric) SetInformationRequestsSent(value uint64) Dhcpv6ClientMetric { + + obj.obj.InformationRequestsSent = &value + return obj +} + +// Number of DHCP renew messages sent. +// RenewsSent returns a uint64 +func (obj *dhcpv6ClientMetric) RenewsSent() uint64 { + + return *obj.obj.RenewsSent + +} + +// Number of DHCP renew messages sent. +// RenewsSent returns a uint64 +func (obj *dhcpv6ClientMetric) HasRenewsSent() bool { + return obj.obj.RenewsSent != nil +} + +// Number of DHCP renew messages sent. +// SetRenewsSent sets the uint64 value in the Dhcpv6ClientMetric object +func (obj *dhcpv6ClientMetric) SetRenewsSent(value uint64) Dhcpv6ClientMetric { + + obj.obj.RenewsSent = &value + return obj +} + +// Number of DHCP rebind messages sent. +// RebindsSent returns a uint64 +func (obj *dhcpv6ClientMetric) RebindsSent() uint64 { + + return *obj.obj.RebindsSent + +} + +// Number of DHCP rebind messages sent. +// RebindsSent returns a uint64 +func (obj *dhcpv6ClientMetric) HasRebindsSent() bool { + return obj.obj.RebindsSent != nil +} + +// Number of DHCP rebind messages sent. +// SetRebindsSent sets the uint64 value in the Dhcpv6ClientMetric object +func (obj *dhcpv6ClientMetric) SetRebindsSent(value uint64) Dhcpv6ClientMetric { + + obj.obj.RebindsSent = &value + return obj +} + +// Number of DHCP Release messages sent. +// ReleasesSent returns a uint64 +func (obj *dhcpv6ClientMetric) ReleasesSent() uint64 { + + return *obj.obj.ReleasesSent + +} + +// Number of DHCP Release messages sent. +// ReleasesSent returns a uint64 +func (obj *dhcpv6ClientMetric) HasReleasesSent() bool { + return obj.obj.ReleasesSent != nil +} + +// Number of DHCP Release messages sent. +// SetReleasesSent sets the uint64 value in the Dhcpv6ClientMetric object +func (obj *dhcpv6ClientMetric) SetReleasesSent(value uint64) Dhcpv6ClientMetric { + + obj.obj.ReleasesSent = &value + return obj +} + +// Number of DHCP Reconfigure messages received. +// ReconfiguresReceived returns a uint64 +func (obj *dhcpv6ClientMetric) ReconfiguresReceived() uint64 { + + return *obj.obj.ReconfiguresReceived + +} + +// Number of DHCP Reconfigure messages received. +// ReconfiguresReceived returns a uint64 +func (obj *dhcpv6ClientMetric) HasReconfiguresReceived() bool { + return obj.obj.ReconfiguresReceived != nil +} + +// Number of DHCP Reconfigure messages received. +// SetReconfiguresReceived sets the uint64 value in the Dhcpv6ClientMetric object +func (obj *dhcpv6ClientMetric) SetReconfiguresReceived(value uint64) Dhcpv6ClientMetric { + + obj.obj.ReconfiguresReceived = &value + return obj +} + +// Number of rapid commit DHCPSOLICIT messages sent. +// RapidCommitSolicitsSent returns a uint64 +func (obj *dhcpv6ClientMetric) RapidCommitSolicitsSent() uint64 { + + return *obj.obj.RapidCommitSolicitsSent + +} + +// Number of rapid commit DHCPSOLICIT messages sent. +// RapidCommitSolicitsSent returns a uint64 +func (obj *dhcpv6ClientMetric) HasRapidCommitSolicitsSent() bool { + return obj.obj.RapidCommitSolicitsSent != nil +} + +// Number of rapid commit DHCPSOLICIT messages sent. +// SetRapidCommitSolicitsSent sets the uint64 value in the Dhcpv6ClientMetric object +func (obj *dhcpv6ClientMetric) SetRapidCommitSolicitsSent(value uint64) Dhcpv6ClientMetric { + + obj.obj.RapidCommitSolicitsSent = &value + return obj +} + +// Number of rapid commit DHCP Reply messages received. +// RapidCommitRepliesReceived returns a uint64 +func (obj *dhcpv6ClientMetric) RapidCommitRepliesReceived() uint64 { + + return *obj.obj.RapidCommitRepliesReceived + +} + +// Number of rapid commit DHCP Reply messages received. +// RapidCommitRepliesReceived returns a uint64 +func (obj *dhcpv6ClientMetric) HasRapidCommitRepliesReceived() bool { + return obj.obj.RapidCommitRepliesReceived != nil +} + +// Number of rapid commit DHCP Reply messages received. +// SetRapidCommitRepliesReceived sets the uint64 value in the Dhcpv6ClientMetric object +func (obj *dhcpv6ClientMetric) SetRapidCommitRepliesReceived(value uint64) Dhcpv6ClientMetric { + + obj.obj.RapidCommitRepliesReceived = &value + return obj +} + +func (obj *dhcpv6ClientMetric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv6ClientMetric) setDefault() { + +} diff --git a/gosnappi/dhcpv6_client_metrics_request.go b/gosnappi/dhcpv6_client_metrics_request.go new file mode 100644 index 00000000..18254cb1 --- /dev/null +++ b/gosnappi/dhcpv6_client_metrics_request.go @@ -0,0 +1,375 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientMetricsRequest ***** +type dhcpv6ClientMetricsRequest struct { + validation + obj *otg.Dhcpv6ClientMetricsRequest + marshaller marshalDhcpv6ClientMetricsRequest + unMarshaller unMarshalDhcpv6ClientMetricsRequest +} + +func NewDhcpv6ClientMetricsRequest() Dhcpv6ClientMetricsRequest { + obj := dhcpv6ClientMetricsRequest{obj: &otg.Dhcpv6ClientMetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientMetricsRequest) msg() *otg.Dhcpv6ClientMetricsRequest { + return obj.obj +} + +func (obj *dhcpv6ClientMetricsRequest) setMsg(msg *otg.Dhcpv6ClientMetricsRequest) Dhcpv6ClientMetricsRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientMetricsRequest struct { + obj *dhcpv6ClientMetricsRequest +} + +type marshalDhcpv6ClientMetricsRequest interface { + // ToProto marshals Dhcpv6ClientMetricsRequest to protobuf object *otg.Dhcpv6ClientMetricsRequest + ToProto() (*otg.Dhcpv6ClientMetricsRequest, error) + // ToPbText marshals Dhcpv6ClientMetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientMetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientMetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientMetricsRequest struct { + obj *dhcpv6ClientMetricsRequest +} + +type unMarshalDhcpv6ClientMetricsRequest interface { + // FromProto unmarshals Dhcpv6ClientMetricsRequest from protobuf object *otg.Dhcpv6ClientMetricsRequest + FromProto(msg *otg.Dhcpv6ClientMetricsRequest) (Dhcpv6ClientMetricsRequest, error) + // FromPbText unmarshals Dhcpv6ClientMetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientMetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientMetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientMetricsRequest) Marshal() marshalDhcpv6ClientMetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientMetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientMetricsRequest) Unmarshal() unMarshalDhcpv6ClientMetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientMetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientMetricsRequest) ToProto() (*otg.Dhcpv6ClientMetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientMetricsRequest) FromProto(msg *otg.Dhcpv6ClientMetricsRequest) (Dhcpv6ClientMetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientMetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientMetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientMetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientMetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientMetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientMetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientMetricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientMetricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientMetricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientMetricsRequest) Clone() (Dhcpv6ClientMetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientMetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ClientMetricsRequest is the request to retrieve DHCPv6 per client metrics/statistics. +type Dhcpv6ClientMetricsRequest interface { + Validation + // msg marshals Dhcpv6ClientMetricsRequest to protobuf object *otg.Dhcpv6ClientMetricsRequest + // and doesn't set defaults + msg() *otg.Dhcpv6ClientMetricsRequest + // setMsg unmarshals Dhcpv6ClientMetricsRequest from protobuf object *otg.Dhcpv6ClientMetricsRequest + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientMetricsRequest) Dhcpv6ClientMetricsRequest + // provides marshal interface + Marshal() marshalDhcpv6ClientMetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientMetricsRequest + // validate validates Dhcpv6ClientMetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientMetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ClientNames returns []string, set in Dhcpv6ClientMetricsRequest. + ClientNames() []string + // SetClientNames assigns []string provided by user to Dhcpv6ClientMetricsRequest + SetClientNames(value []string) Dhcpv6ClientMetricsRequest + // ColumnNames returns []Dhcpv6ClientMetricsRequestColumnNamesEnum, set in Dhcpv6ClientMetricsRequest + ColumnNames() []Dhcpv6ClientMetricsRequestColumnNamesEnum + // SetColumnNames assigns []Dhcpv6ClientMetricsRequestColumnNamesEnum provided by user to Dhcpv6ClientMetricsRequest + SetColumnNames(value []Dhcpv6ClientMetricsRequestColumnNamesEnum) Dhcpv6ClientMetricsRequest +} + +// The names of DHCPv6 clients to return results for. An empty list will return results for all DHCPv6 client. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// ClientNames returns a []string +func (obj *dhcpv6ClientMetricsRequest) ClientNames() []string { + if obj.obj.ClientNames == nil { + obj.obj.ClientNames = make([]string, 0) + } + return obj.obj.ClientNames +} + +// The names of DHCPv6 clients to return results for. An empty list will return results for all DHCPv6 client. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// SetClientNames sets the []string value in the Dhcpv6ClientMetricsRequest object +func (obj *dhcpv6ClientMetricsRequest) SetClientNames(value []string) Dhcpv6ClientMetricsRequest { + + if obj.obj.ClientNames == nil { + obj.obj.ClientNames = make([]string, 0) + } + obj.obj.ClientNames = value + + return obj +} + +type Dhcpv6ClientMetricsRequestColumnNamesEnum string + +// Enum of ColumnNames on Dhcpv6ClientMetricsRequest +var Dhcpv6ClientMetricsRequestColumnNames = struct { + SOLICITS_SENT Dhcpv6ClientMetricsRequestColumnNamesEnum + ADVERTISEMENTS_RECEIVED Dhcpv6ClientMetricsRequestColumnNamesEnum + ADVERTISEMENTS_IGNORED Dhcpv6ClientMetricsRequestColumnNamesEnum + REQUESTS_SENT Dhcpv6ClientMetricsRequestColumnNamesEnum + NACKS_RECEIVED Dhcpv6ClientMetricsRequestColumnNamesEnum + REPLIES_RECEIVED Dhcpv6ClientMetricsRequestColumnNamesEnum + INFORMATION_REQUESTS_SENT Dhcpv6ClientMetricsRequestColumnNamesEnum + RENEWS_SENT Dhcpv6ClientMetricsRequestColumnNamesEnum + REBINDS_SENT Dhcpv6ClientMetricsRequestColumnNamesEnum + RELEASES_SENT Dhcpv6ClientMetricsRequestColumnNamesEnum + RECONFIGURES_RECEIVED Dhcpv6ClientMetricsRequestColumnNamesEnum + RAPID_COMMIT_SOLICITS_SENT Dhcpv6ClientMetricsRequestColumnNamesEnum + RAPID_COMMIT_REPLIES_RECEIVED Dhcpv6ClientMetricsRequestColumnNamesEnum +}{ + SOLICITS_SENT: Dhcpv6ClientMetricsRequestColumnNamesEnum("solicits_sent"), + ADVERTISEMENTS_RECEIVED: Dhcpv6ClientMetricsRequestColumnNamesEnum("advertisements_received"), + ADVERTISEMENTS_IGNORED: Dhcpv6ClientMetricsRequestColumnNamesEnum("advertisements_ignored"), + REQUESTS_SENT: Dhcpv6ClientMetricsRequestColumnNamesEnum("requests_sent"), + NACKS_RECEIVED: Dhcpv6ClientMetricsRequestColumnNamesEnum("nacks_received"), + REPLIES_RECEIVED: Dhcpv6ClientMetricsRequestColumnNamesEnum("replies_received"), + INFORMATION_REQUESTS_SENT: Dhcpv6ClientMetricsRequestColumnNamesEnum("information_requests_sent"), + RENEWS_SENT: Dhcpv6ClientMetricsRequestColumnNamesEnum("renews_sent"), + REBINDS_SENT: Dhcpv6ClientMetricsRequestColumnNamesEnum("rebinds_sent"), + RELEASES_SENT: Dhcpv6ClientMetricsRequestColumnNamesEnum("releases_sent"), + RECONFIGURES_RECEIVED: Dhcpv6ClientMetricsRequestColumnNamesEnum("reconfigures_received"), + RAPID_COMMIT_SOLICITS_SENT: Dhcpv6ClientMetricsRequestColumnNamesEnum("rapid_commit_solicits_sent"), + RAPID_COMMIT_REPLIES_RECEIVED: Dhcpv6ClientMetricsRequestColumnNamesEnum("rapid_commit_replies_received"), +} + +func (obj *dhcpv6ClientMetricsRequest) ColumnNames() []Dhcpv6ClientMetricsRequestColumnNamesEnum { + items := []Dhcpv6ClientMetricsRequestColumnNamesEnum{} + for _, item := range obj.obj.ColumnNames { + items = append(items, Dhcpv6ClientMetricsRequestColumnNamesEnum(item.String())) + } + return items +} + +// The list of column names that the returned result set will contain. If the list is empty then all columns will be returned except for any result_groups. The name of the DHCPv6 client cannot be excluded. +// SetColumnNames sets the []string value in the Dhcpv6ClientMetricsRequest object +func (obj *dhcpv6ClientMetricsRequest) SetColumnNames(value []Dhcpv6ClientMetricsRequestColumnNamesEnum) Dhcpv6ClientMetricsRequest { + + items := []otg.Dhcpv6ClientMetricsRequest_ColumnNames_Enum{} + for _, item := range value { + intValue := otg.Dhcpv6ClientMetricsRequest_ColumnNames_Enum_value[string(item)] + items = append(items, otg.Dhcpv6ClientMetricsRequest_ColumnNames_Enum(intValue)) + } + obj.obj.ColumnNames = items + return obj +} + +func (obj *dhcpv6ClientMetricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv6ClientMetricsRequest) setDefault() { + +} diff --git a/gosnappi/dhcpv6_client_options_custom.go b/gosnappi/dhcpv6_client_options_custom.go new file mode 100644 index 00000000..f192b008 --- /dev/null +++ b/gosnappi/dhcpv6_client_options_custom.go @@ -0,0 +1,312 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsCustom ***** +type dhcpv6ClientOptionsCustom struct { + validation + obj *otg.Dhcpv6ClientOptionsCustom + marshaller marshalDhcpv6ClientOptionsCustom + unMarshaller unMarshalDhcpv6ClientOptionsCustom +} + +func NewDhcpv6ClientOptionsCustom() Dhcpv6ClientOptionsCustom { + obj := dhcpv6ClientOptionsCustom{obj: &otg.Dhcpv6ClientOptionsCustom{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsCustom) msg() *otg.Dhcpv6ClientOptionsCustom { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsCustom) setMsg(msg *otg.Dhcpv6ClientOptionsCustom) Dhcpv6ClientOptionsCustom { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsCustom struct { + obj *dhcpv6ClientOptionsCustom +} + +type marshalDhcpv6ClientOptionsCustom interface { + // ToProto marshals Dhcpv6ClientOptionsCustom to protobuf object *otg.Dhcpv6ClientOptionsCustom + ToProto() (*otg.Dhcpv6ClientOptionsCustom, error) + // ToPbText marshals Dhcpv6ClientOptionsCustom to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsCustom to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsCustom to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsCustom struct { + obj *dhcpv6ClientOptionsCustom +} + +type unMarshalDhcpv6ClientOptionsCustom interface { + // FromProto unmarshals Dhcpv6ClientOptionsCustom from protobuf object *otg.Dhcpv6ClientOptionsCustom + FromProto(msg *otg.Dhcpv6ClientOptionsCustom) (Dhcpv6ClientOptionsCustom, error) + // FromPbText unmarshals Dhcpv6ClientOptionsCustom from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsCustom from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsCustom from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsCustom) Marshal() marshalDhcpv6ClientOptionsCustom { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsCustom{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsCustom) Unmarshal() unMarshalDhcpv6ClientOptionsCustom { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsCustom{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsCustom) ToProto() (*otg.Dhcpv6ClientOptionsCustom, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsCustom) FromProto(msg *otg.Dhcpv6ClientOptionsCustom) (Dhcpv6ClientOptionsCustom, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsCustom) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsCustom) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsCustom) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsCustom) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsCustom) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsCustom) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsCustom) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsCustom) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsCustom) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsCustom) Clone() (Dhcpv6ClientOptionsCustom, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsCustom() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ClientOptionsCustom is the Custom option is used to provide a not so well known option in the message between a client and a server. +type Dhcpv6ClientOptionsCustom interface { + Validation + // msg marshals Dhcpv6ClientOptionsCustom to protobuf object *otg.Dhcpv6ClientOptionsCustom + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsCustom + // setMsg unmarshals Dhcpv6ClientOptionsCustom from protobuf object *otg.Dhcpv6ClientOptionsCustom + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsCustom) Dhcpv6ClientOptionsCustom + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsCustom + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsCustom + // validate validates Dhcpv6ClientOptionsCustom + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsCustom, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns uint32, set in Dhcpv6ClientOptionsCustom. + Type() uint32 + // SetType assigns uint32 provided by user to Dhcpv6ClientOptionsCustom + SetType(value uint32) Dhcpv6ClientOptionsCustom +} + +// The type of the Custom option TLV. +// Type returns a uint32 +func (obj *dhcpv6ClientOptionsCustom) Type() uint32 { + + return *obj.obj.Type + +} + +// The type of the Custom option TLV. +// SetType sets the uint32 value in the Dhcpv6ClientOptionsCustom object +func (obj *dhcpv6ClientOptionsCustom) SetType(value uint32) Dhcpv6ClientOptionsCustom { + + obj.obj.Type = &value + return obj +} + +func (obj *dhcpv6ClientOptionsCustom) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Type is required + if obj.obj.Type == nil { + vObj.validationErrors = append(vObj.validationErrors, "Type is required field on interface Dhcpv6ClientOptionsCustom") + } + if obj.obj.Type != nil { + + if *obj.obj.Type > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv6ClientOptionsCustom.Type <= 65535 but Got %d", *obj.obj.Type)) + } + + } + +} + +func (obj *dhcpv6ClientOptionsCustom) setDefault() { + +} diff --git a/gosnappi/dhcpv6_client_options_duid_en.go b/gosnappi/dhcpv6_client_options_duid_en.go new file mode 100644 index 00000000..e5520d1a --- /dev/null +++ b/gosnappi/dhcpv6_client_options_duid_en.go @@ -0,0 +1,348 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsDuidEn ***** +type dhcpv6ClientOptionsDuidEn struct { + validation + obj *otg.Dhcpv6ClientOptionsDuidEn + marshaller marshalDhcpv6ClientOptionsDuidEn + unMarshaller unMarshalDhcpv6ClientOptionsDuidEn +} + +func NewDhcpv6ClientOptionsDuidEn() Dhcpv6ClientOptionsDuidEn { + obj := dhcpv6ClientOptionsDuidEn{obj: &otg.Dhcpv6ClientOptionsDuidEn{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsDuidEn) msg() *otg.Dhcpv6ClientOptionsDuidEn { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsDuidEn) setMsg(msg *otg.Dhcpv6ClientOptionsDuidEn) Dhcpv6ClientOptionsDuidEn { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsDuidEn struct { + obj *dhcpv6ClientOptionsDuidEn +} + +type marshalDhcpv6ClientOptionsDuidEn interface { + // ToProto marshals Dhcpv6ClientOptionsDuidEn to protobuf object *otg.Dhcpv6ClientOptionsDuidEn + ToProto() (*otg.Dhcpv6ClientOptionsDuidEn, error) + // ToPbText marshals Dhcpv6ClientOptionsDuidEn to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsDuidEn to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsDuidEn to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsDuidEn struct { + obj *dhcpv6ClientOptionsDuidEn +} + +type unMarshalDhcpv6ClientOptionsDuidEn interface { + // FromProto unmarshals Dhcpv6ClientOptionsDuidEn from protobuf object *otg.Dhcpv6ClientOptionsDuidEn + FromProto(msg *otg.Dhcpv6ClientOptionsDuidEn) (Dhcpv6ClientOptionsDuidEn, error) + // FromPbText unmarshals Dhcpv6ClientOptionsDuidEn from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsDuidEn from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsDuidEn from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsDuidEn) Marshal() marshalDhcpv6ClientOptionsDuidEn { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsDuidEn{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsDuidEn) Unmarshal() unMarshalDhcpv6ClientOptionsDuidEn { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsDuidEn{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsDuidEn) ToProto() (*otg.Dhcpv6ClientOptionsDuidEn, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidEn) FromProto(msg *otg.Dhcpv6ClientOptionsDuidEn) (Dhcpv6ClientOptionsDuidEn, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsDuidEn) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidEn) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsDuidEn) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidEn) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsDuidEn) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidEn) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsDuidEn) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsDuidEn) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsDuidEn) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsDuidEn) Clone() (Dhcpv6ClientOptionsDuidEn, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsDuidEn() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ClientOptionsDuidEn is dUID assigned by vendor based on enterprise number. +type Dhcpv6ClientOptionsDuidEn interface { + Validation + // msg marshals Dhcpv6ClientOptionsDuidEn to protobuf object *otg.Dhcpv6ClientOptionsDuidEn + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsDuidEn + // setMsg unmarshals Dhcpv6ClientOptionsDuidEn from protobuf object *otg.Dhcpv6ClientOptionsDuidEn + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsDuidEn) Dhcpv6ClientOptionsDuidEn + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsDuidEn + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsDuidEn + // validate validates Dhcpv6ClientOptionsDuidEn + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsDuidEn, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EnterpriseNumber returns uint32, set in Dhcpv6ClientOptionsDuidEn. + EnterpriseNumber() uint32 + // SetEnterpriseNumber assigns uint32 provided by user to Dhcpv6ClientOptionsDuidEn + SetEnterpriseNumber(value uint32) Dhcpv6ClientOptionsDuidEn + // Identifier returns string, set in Dhcpv6ClientOptionsDuidEn. + Identifier() string + // SetIdentifier assigns string provided by user to Dhcpv6ClientOptionsDuidEn + SetIdentifier(value string) Dhcpv6ClientOptionsDuidEn +} + +// Vendor's registered private enterprise number as maintained by IANA. +// EnterpriseNumber returns a uint32 +func (obj *dhcpv6ClientOptionsDuidEn) EnterpriseNumber() uint32 { + + return *obj.obj.EnterpriseNumber + +} + +// Vendor's registered private enterprise number as maintained by IANA. +// SetEnterpriseNumber sets the uint32 value in the Dhcpv6ClientOptionsDuidEn object +func (obj *dhcpv6ClientOptionsDuidEn) SetEnterpriseNumber(value uint32) Dhcpv6ClientOptionsDuidEn { + + obj.obj.EnterpriseNumber = &value + return obj +} + +// The unique identifier assigned by the vendor. +// Identifier returns a string +func (obj *dhcpv6ClientOptionsDuidEn) Identifier() string { + + return *obj.obj.Identifier + +} + +// The unique identifier assigned by the vendor. +// SetIdentifier sets the string value in the Dhcpv6ClientOptionsDuidEn object +func (obj *dhcpv6ClientOptionsDuidEn) SetIdentifier(value string) Dhcpv6ClientOptionsDuidEn { + + obj.obj.Identifier = &value + return obj +} + +func (obj *dhcpv6ClientOptionsDuidEn) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // EnterpriseNumber is required + if obj.obj.EnterpriseNumber == nil { + vObj.validationErrors = append(vObj.validationErrors, "EnterpriseNumber is required field on interface Dhcpv6ClientOptionsDuidEn") + } + if obj.obj.EnterpriseNumber != nil { + + if *obj.obj.EnterpriseNumber > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv6ClientOptionsDuidEn.EnterpriseNumber <= 4294967295 but Got %d", *obj.obj.EnterpriseNumber)) + } + + } + + // Identifier is required + if obj.obj.Identifier == nil { + vObj.validationErrors = append(vObj.validationErrors, "Identifier is required field on interface Dhcpv6ClientOptionsDuidEn") + } + if obj.obj.Identifier != nil { + + if len(*obj.obj.Identifier) < 1 || len(*obj.obj.Identifier) > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "1 <= length of Dhcpv6ClientOptionsDuidEn.Identifier <= 8 but Got %d", + len(*obj.obj.Identifier))) + } + + } + +} + +func (obj *dhcpv6ClientOptionsDuidEn) setDefault() { + +} diff --git a/gosnappi/dhcpv6_client_options_duid_ll.go b/gosnappi/dhcpv6_client_options_duid_ll.go new file mode 100644 index 00000000..5c53d817 --- /dev/null +++ b/gosnappi/dhcpv6_client_options_duid_ll.go @@ -0,0 +1,325 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsDuidLl ***** +type dhcpv6ClientOptionsDuidLl struct { + validation + obj *otg.Dhcpv6ClientOptionsDuidLl + marshaller marshalDhcpv6ClientOptionsDuidLl + unMarshaller unMarshalDhcpv6ClientOptionsDuidLl + linkLayerAddressHolder Dhcpv6ClientOptionsLinkLayerAddress +} + +func NewDhcpv6ClientOptionsDuidLl() Dhcpv6ClientOptionsDuidLl { + obj := dhcpv6ClientOptionsDuidLl{obj: &otg.Dhcpv6ClientOptionsDuidLl{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsDuidLl) msg() *otg.Dhcpv6ClientOptionsDuidLl { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsDuidLl) setMsg(msg *otg.Dhcpv6ClientOptionsDuidLl) Dhcpv6ClientOptionsDuidLl { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsDuidLl struct { + obj *dhcpv6ClientOptionsDuidLl +} + +type marshalDhcpv6ClientOptionsDuidLl interface { + // ToProto marshals Dhcpv6ClientOptionsDuidLl to protobuf object *otg.Dhcpv6ClientOptionsDuidLl + ToProto() (*otg.Dhcpv6ClientOptionsDuidLl, error) + // ToPbText marshals Dhcpv6ClientOptionsDuidLl to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsDuidLl to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsDuidLl to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsDuidLl struct { + obj *dhcpv6ClientOptionsDuidLl +} + +type unMarshalDhcpv6ClientOptionsDuidLl interface { + // FromProto unmarshals Dhcpv6ClientOptionsDuidLl from protobuf object *otg.Dhcpv6ClientOptionsDuidLl + FromProto(msg *otg.Dhcpv6ClientOptionsDuidLl) (Dhcpv6ClientOptionsDuidLl, error) + // FromPbText unmarshals Dhcpv6ClientOptionsDuidLl from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsDuidLl from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsDuidLl from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsDuidLl) Marshal() marshalDhcpv6ClientOptionsDuidLl { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsDuidLl{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsDuidLl) Unmarshal() unMarshalDhcpv6ClientOptionsDuidLl { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsDuidLl{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsDuidLl) ToProto() (*otg.Dhcpv6ClientOptionsDuidLl, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidLl) FromProto(msg *otg.Dhcpv6ClientOptionsDuidLl) (Dhcpv6ClientOptionsDuidLl, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsDuidLl) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidLl) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsDuidLl) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidLl) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsDuidLl) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidLl) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsDuidLl) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsDuidLl) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsDuidLl) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsDuidLl) Clone() (Dhcpv6ClientOptionsDuidLl, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsDuidLl() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ClientOptionsDuidLl) setNil() { + obj.linkLayerAddressHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ClientOptionsDuidLl is dUID based on Link Layer address. Hardware Type will be auto assigned to ethernet type. +type Dhcpv6ClientOptionsDuidLl interface { + Validation + // msg marshals Dhcpv6ClientOptionsDuidLl to protobuf object *otg.Dhcpv6ClientOptionsDuidLl + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsDuidLl + // setMsg unmarshals Dhcpv6ClientOptionsDuidLl from protobuf object *otg.Dhcpv6ClientOptionsDuidLl + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsDuidLl) Dhcpv6ClientOptionsDuidLl + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsDuidLl + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsDuidLl + // validate validates Dhcpv6ClientOptionsDuidLl + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsDuidLl, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LinkLayerAddress returns Dhcpv6ClientOptionsLinkLayerAddress, set in Dhcpv6ClientOptionsDuidLl. + // Dhcpv6ClientOptionsLinkLayerAddress is the link-layer address configured in DUID llt or DUID ll. + LinkLayerAddress() Dhcpv6ClientOptionsLinkLayerAddress + // SetLinkLayerAddress assigns Dhcpv6ClientOptionsLinkLayerAddress provided by user to Dhcpv6ClientOptionsDuidLl. + // Dhcpv6ClientOptionsLinkLayerAddress is the link-layer address configured in DUID llt or DUID ll. + SetLinkLayerAddress(value Dhcpv6ClientOptionsLinkLayerAddress) Dhcpv6ClientOptionsDuidLl + setNil() +} + +// The link-layer address is stored in canonical form, as described in RFC 2464. +// LinkLayerAddress returns a Dhcpv6ClientOptionsLinkLayerAddress +func (obj *dhcpv6ClientOptionsDuidLl) LinkLayerAddress() Dhcpv6ClientOptionsLinkLayerAddress { + if obj.obj.LinkLayerAddress == nil { + obj.obj.LinkLayerAddress = NewDhcpv6ClientOptionsLinkLayerAddress().msg() + } + if obj.linkLayerAddressHolder == nil { + obj.linkLayerAddressHolder = &dhcpv6ClientOptionsLinkLayerAddress{obj: obj.obj.LinkLayerAddress} + } + return obj.linkLayerAddressHolder +} + +// The link-layer address is stored in canonical form, as described in RFC 2464. +// SetLinkLayerAddress sets the Dhcpv6ClientOptionsLinkLayerAddress value in the Dhcpv6ClientOptionsDuidLl object +func (obj *dhcpv6ClientOptionsDuidLl) SetLinkLayerAddress(value Dhcpv6ClientOptionsLinkLayerAddress) Dhcpv6ClientOptionsDuidLl { + + obj.linkLayerAddressHolder = nil + obj.obj.LinkLayerAddress = value.msg() + + return obj +} + +func (obj *dhcpv6ClientOptionsDuidLl) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // LinkLayerAddress is required + if obj.obj.LinkLayerAddress == nil { + vObj.validationErrors = append(vObj.validationErrors, "LinkLayerAddress is required field on interface Dhcpv6ClientOptionsDuidLl") + } + + if obj.obj.LinkLayerAddress != nil { + + obj.LinkLayerAddress().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpv6ClientOptionsDuidLl) setDefault() { + +} diff --git a/gosnappi/dhcpv6_client_options_duid_llt.go b/gosnappi/dhcpv6_client_options_duid_llt.go new file mode 100644 index 00000000..e6ee536f --- /dev/null +++ b/gosnappi/dhcpv6_client_options_duid_llt.go @@ -0,0 +1,352 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsDuidLlt ***** +type dhcpv6ClientOptionsDuidLlt struct { + validation + obj *otg.Dhcpv6ClientOptionsDuidLlt + marshaller marshalDhcpv6ClientOptionsDuidLlt + unMarshaller unMarshalDhcpv6ClientOptionsDuidLlt + linkLayerAddressHolder Dhcpv6ClientOptionsLinkLayerAddress +} + +func NewDhcpv6ClientOptionsDuidLlt() Dhcpv6ClientOptionsDuidLlt { + obj := dhcpv6ClientOptionsDuidLlt{obj: &otg.Dhcpv6ClientOptionsDuidLlt{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsDuidLlt) msg() *otg.Dhcpv6ClientOptionsDuidLlt { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsDuidLlt) setMsg(msg *otg.Dhcpv6ClientOptionsDuidLlt) Dhcpv6ClientOptionsDuidLlt { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsDuidLlt struct { + obj *dhcpv6ClientOptionsDuidLlt +} + +type marshalDhcpv6ClientOptionsDuidLlt interface { + // ToProto marshals Dhcpv6ClientOptionsDuidLlt to protobuf object *otg.Dhcpv6ClientOptionsDuidLlt + ToProto() (*otg.Dhcpv6ClientOptionsDuidLlt, error) + // ToPbText marshals Dhcpv6ClientOptionsDuidLlt to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsDuidLlt to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsDuidLlt to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsDuidLlt struct { + obj *dhcpv6ClientOptionsDuidLlt +} + +type unMarshalDhcpv6ClientOptionsDuidLlt interface { + // FromProto unmarshals Dhcpv6ClientOptionsDuidLlt from protobuf object *otg.Dhcpv6ClientOptionsDuidLlt + FromProto(msg *otg.Dhcpv6ClientOptionsDuidLlt) (Dhcpv6ClientOptionsDuidLlt, error) + // FromPbText unmarshals Dhcpv6ClientOptionsDuidLlt from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsDuidLlt from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsDuidLlt from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsDuidLlt) Marshal() marshalDhcpv6ClientOptionsDuidLlt { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsDuidLlt{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsDuidLlt) Unmarshal() unMarshalDhcpv6ClientOptionsDuidLlt { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsDuidLlt{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsDuidLlt) ToProto() (*otg.Dhcpv6ClientOptionsDuidLlt, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidLlt) FromProto(msg *otg.Dhcpv6ClientOptionsDuidLlt) (Dhcpv6ClientOptionsDuidLlt, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsDuidLlt) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidLlt) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsDuidLlt) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidLlt) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsDuidLlt) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidLlt) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsDuidLlt) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsDuidLlt) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsDuidLlt) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsDuidLlt) Clone() (Dhcpv6ClientOptionsDuidLlt, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsDuidLlt() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ClientOptionsDuidLlt) setNil() { + obj.linkLayerAddressHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ClientOptionsDuidLlt is dUID based on Link Layer address plus time. Hardware Type will be auto assigned to ethernet type. +type Dhcpv6ClientOptionsDuidLlt interface { + Validation + // msg marshals Dhcpv6ClientOptionsDuidLlt to protobuf object *otg.Dhcpv6ClientOptionsDuidLlt + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsDuidLlt + // setMsg unmarshals Dhcpv6ClientOptionsDuidLlt from protobuf object *otg.Dhcpv6ClientOptionsDuidLlt + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsDuidLlt) Dhcpv6ClientOptionsDuidLlt + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsDuidLlt + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsDuidLlt + // validate validates Dhcpv6ClientOptionsDuidLlt + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsDuidLlt, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Time returns uint32, set in Dhcpv6ClientOptionsDuidLlt. + Time() uint32 + // SetTime assigns uint32 provided by user to Dhcpv6ClientOptionsDuidLlt + SetTime(value uint32) Dhcpv6ClientOptionsDuidLlt + // LinkLayerAddress returns Dhcpv6ClientOptionsLinkLayerAddress, set in Dhcpv6ClientOptionsDuidLlt. + // Dhcpv6ClientOptionsLinkLayerAddress is the link-layer address configured in DUID llt or DUID ll. + LinkLayerAddress() Dhcpv6ClientOptionsLinkLayerAddress + // SetLinkLayerAddress assigns Dhcpv6ClientOptionsLinkLayerAddress provided by user to Dhcpv6ClientOptionsDuidLlt. + // Dhcpv6ClientOptionsLinkLayerAddress is the link-layer address configured in DUID llt or DUID ll. + SetLinkLayerAddress(value Dhcpv6ClientOptionsLinkLayerAddress) Dhcpv6ClientOptionsDuidLlt + setNil() +} + +// The time value is the time that the DUID is generated represented in seconds since midnight (UTC), January 1, +// 2000, modulo 2^32. The DUID generatation time will the current time when dhcpv6 client contacts the server. +// Time returns a uint32 +func (obj *dhcpv6ClientOptionsDuidLlt) Time() uint32 { + + return *obj.obj.Time + +} + +// The time value is the time that the DUID is generated represented in seconds since midnight (UTC), January 1, +// 2000, modulo 2^32. The DUID generatation time will the current time when dhcpv6 client contacts the server. +// SetTime sets the uint32 value in the Dhcpv6ClientOptionsDuidLlt object +func (obj *dhcpv6ClientOptionsDuidLlt) SetTime(value uint32) Dhcpv6ClientOptionsDuidLlt { + + obj.obj.Time = &value + return obj +} + +// The link-layer address is stored in canonical form, as described in RFC 2464. +// LinkLayerAddress returns a Dhcpv6ClientOptionsLinkLayerAddress +func (obj *dhcpv6ClientOptionsDuidLlt) LinkLayerAddress() Dhcpv6ClientOptionsLinkLayerAddress { + if obj.obj.LinkLayerAddress == nil { + obj.obj.LinkLayerAddress = NewDhcpv6ClientOptionsLinkLayerAddress().msg() + } + if obj.linkLayerAddressHolder == nil { + obj.linkLayerAddressHolder = &dhcpv6ClientOptionsLinkLayerAddress{obj: obj.obj.LinkLayerAddress} + } + return obj.linkLayerAddressHolder +} + +// The link-layer address is stored in canonical form, as described in RFC 2464. +// SetLinkLayerAddress sets the Dhcpv6ClientOptionsLinkLayerAddress value in the Dhcpv6ClientOptionsDuidLlt object +func (obj *dhcpv6ClientOptionsDuidLlt) SetLinkLayerAddress(value Dhcpv6ClientOptionsLinkLayerAddress) Dhcpv6ClientOptionsDuidLlt { + + obj.linkLayerAddressHolder = nil + obj.obj.LinkLayerAddress = value.msg() + + return obj +} + +func (obj *dhcpv6ClientOptionsDuidLlt) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Time is required + if obj.obj.Time == nil { + vObj.validationErrors = append(vObj.validationErrors, "Time is required field on interface Dhcpv6ClientOptionsDuidLlt") + } + + // LinkLayerAddress is required + if obj.obj.LinkLayerAddress == nil { + vObj.validationErrors = append(vObj.validationErrors, "LinkLayerAddress is required field on interface Dhcpv6ClientOptionsDuidLlt") + } + + if obj.obj.LinkLayerAddress != nil { + + obj.LinkLayerAddress().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpv6ClientOptionsDuidLlt) setDefault() { + +} diff --git a/gosnappi/dhcpv6_client_options_duid_uuid.go b/gosnappi/dhcpv6_client_options_duid_uuid.go new file mode 100644 index 00000000..581f6b38 --- /dev/null +++ b/gosnappi/dhcpv6_client_options_duid_uuid.go @@ -0,0 +1,606 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsDuidUuid ***** +type dhcpv6ClientOptionsDuidUuid struct { + validation + obj *otg.Dhcpv6ClientOptionsDuidUuid + marshaller marshalDhcpv6ClientOptionsDuidUuid + unMarshaller unMarshalDhcpv6ClientOptionsDuidUuid + versionHolder Dhcpv6ClientOptionsDuidUuidVersion + variantHolder Dhcpv6ClientOptionsDuidUuidVariant +} + +func NewDhcpv6ClientOptionsDuidUuid() Dhcpv6ClientOptionsDuidUuid { + obj := dhcpv6ClientOptionsDuidUuid{obj: &otg.Dhcpv6ClientOptionsDuidUuid{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsDuidUuid) msg() *otg.Dhcpv6ClientOptionsDuidUuid { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsDuidUuid) setMsg(msg *otg.Dhcpv6ClientOptionsDuidUuid) Dhcpv6ClientOptionsDuidUuid { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsDuidUuid struct { + obj *dhcpv6ClientOptionsDuidUuid +} + +type marshalDhcpv6ClientOptionsDuidUuid interface { + // ToProto marshals Dhcpv6ClientOptionsDuidUuid to protobuf object *otg.Dhcpv6ClientOptionsDuidUuid + ToProto() (*otg.Dhcpv6ClientOptionsDuidUuid, error) + // ToPbText marshals Dhcpv6ClientOptionsDuidUuid to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsDuidUuid to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsDuidUuid to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsDuidUuid struct { + obj *dhcpv6ClientOptionsDuidUuid +} + +type unMarshalDhcpv6ClientOptionsDuidUuid interface { + // FromProto unmarshals Dhcpv6ClientOptionsDuidUuid from protobuf object *otg.Dhcpv6ClientOptionsDuidUuid + FromProto(msg *otg.Dhcpv6ClientOptionsDuidUuid) (Dhcpv6ClientOptionsDuidUuid, error) + // FromPbText unmarshals Dhcpv6ClientOptionsDuidUuid from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsDuidUuid from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsDuidUuid from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsDuidUuid) Marshal() marshalDhcpv6ClientOptionsDuidUuid { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsDuidUuid{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsDuidUuid) Unmarshal() unMarshalDhcpv6ClientOptionsDuidUuid { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsDuidUuid{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsDuidUuid) ToProto() (*otg.Dhcpv6ClientOptionsDuidUuid, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidUuid) FromProto(msg *otg.Dhcpv6ClientOptionsDuidUuid) (Dhcpv6ClientOptionsDuidUuid, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsDuidUuid) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidUuid) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsDuidUuid) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidUuid) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsDuidUuid) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidUuid) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsDuidUuid) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsDuidUuid) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsDuidUuid) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsDuidUuid) Clone() (Dhcpv6ClientOptionsDuidUuid, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsDuidUuid() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ClientOptionsDuidUuid) setNil() { + obj.versionHolder = nil + obj.variantHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ClientOptionsDuidUuid is dUID embedded a Universally Unique IDentifier (UUID). A UUID is an identifier that is unique across both space and time, with respect to the space of all UUIDs. +type Dhcpv6ClientOptionsDuidUuid interface { + Validation + // msg marshals Dhcpv6ClientOptionsDuidUuid to protobuf object *otg.Dhcpv6ClientOptionsDuidUuid + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsDuidUuid + // setMsg unmarshals Dhcpv6ClientOptionsDuidUuid from protobuf object *otg.Dhcpv6ClientOptionsDuidUuid + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsDuidUuid) Dhcpv6ClientOptionsDuidUuid + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsDuidUuid + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsDuidUuid + // validate validates Dhcpv6ClientOptionsDuidUuid + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsDuidUuid, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Version returns Dhcpv6ClientOptionsDuidUuidVersion, set in Dhcpv6ClientOptionsDuidUuid. + // Dhcpv6ClientOptionsDuidUuidVersion is the version number is in the most significant 4 bits of the timestamp (bits 4 through 7 of the time_hi_and_version field). + Version() Dhcpv6ClientOptionsDuidUuidVersion + // SetVersion assigns Dhcpv6ClientOptionsDuidUuidVersion provided by user to Dhcpv6ClientOptionsDuidUuid. + // Dhcpv6ClientOptionsDuidUuidVersion is the version number is in the most significant 4 bits of the timestamp (bits 4 through 7 of the time_hi_and_version field). + SetVersion(value Dhcpv6ClientOptionsDuidUuidVersion) Dhcpv6ClientOptionsDuidUuid + // HasVersion checks if Version has been set in Dhcpv6ClientOptionsDuidUuid + HasVersion() bool + // Variant returns Dhcpv6ClientOptionsDuidUuidVariant, set in Dhcpv6ClientOptionsDuidUuid. + // Dhcpv6ClientOptionsDuidUuidVariant is the variant field determines the layout of the UUID. That is, the interpretation of all other bits in the UUID depends on the setting of the bits in the variant field). + Variant() Dhcpv6ClientOptionsDuidUuidVariant + // SetVariant assigns Dhcpv6ClientOptionsDuidUuidVariant provided by user to Dhcpv6ClientOptionsDuidUuid. + // Dhcpv6ClientOptionsDuidUuidVariant is the variant field determines the layout of the UUID. That is, the interpretation of all other bits in the UUID depends on the setting of the bits in the variant field). + SetVariant(value Dhcpv6ClientOptionsDuidUuidVariant) Dhcpv6ClientOptionsDuidUuid + // HasVariant checks if Variant has been set in Dhcpv6ClientOptionsDuidUuid + HasVariant() bool + // TimeLow returns uint32, set in Dhcpv6ClientOptionsDuidUuid. + TimeLow() uint32 + // SetTimeLow assigns uint32 provided by user to Dhcpv6ClientOptionsDuidUuid + SetTimeLow(value uint32) Dhcpv6ClientOptionsDuidUuid + // HasTimeLow checks if TimeLow has been set in Dhcpv6ClientOptionsDuidUuid + HasTimeLow() bool + // TimeMid returns uint32, set in Dhcpv6ClientOptionsDuidUuid. + TimeMid() uint32 + // SetTimeMid assigns uint32 provided by user to Dhcpv6ClientOptionsDuidUuid + SetTimeMid(value uint32) Dhcpv6ClientOptionsDuidUuid + // HasTimeMid checks if TimeMid has been set in Dhcpv6ClientOptionsDuidUuid + HasTimeMid() bool + // TimeHiAndVersion returns uint32, set in Dhcpv6ClientOptionsDuidUuid. + TimeHiAndVersion() uint32 + // SetTimeHiAndVersion assigns uint32 provided by user to Dhcpv6ClientOptionsDuidUuid + SetTimeHiAndVersion(value uint32) Dhcpv6ClientOptionsDuidUuid + // HasTimeHiAndVersion checks if TimeHiAndVersion has been set in Dhcpv6ClientOptionsDuidUuid + HasTimeHiAndVersion() bool + // ClockSeqHiAndReserved returns uint32, set in Dhcpv6ClientOptionsDuidUuid. + ClockSeqHiAndReserved() uint32 + // SetClockSeqHiAndReserved assigns uint32 provided by user to Dhcpv6ClientOptionsDuidUuid + SetClockSeqHiAndReserved(value uint32) Dhcpv6ClientOptionsDuidUuid + // HasClockSeqHiAndReserved checks if ClockSeqHiAndReserved has been set in Dhcpv6ClientOptionsDuidUuid + HasClockSeqHiAndReserved() bool + // ClockSeqLow returns uint32, set in Dhcpv6ClientOptionsDuidUuid. + ClockSeqLow() uint32 + // SetClockSeqLow assigns uint32 provided by user to Dhcpv6ClientOptionsDuidUuid + SetClockSeqLow(value uint32) Dhcpv6ClientOptionsDuidUuid + // HasClockSeqLow checks if ClockSeqLow has been set in Dhcpv6ClientOptionsDuidUuid + HasClockSeqLow() bool + // Node returns string, set in Dhcpv6ClientOptionsDuidUuid. + Node() string + // SetNode assigns string provided by user to Dhcpv6ClientOptionsDuidUuid + SetNode(value string) Dhcpv6ClientOptionsDuidUuid + // HasNode checks if Node has been set in Dhcpv6ClientOptionsDuidUuid + HasNode() bool + setNil() +} + +// The version number is in the most significant 4 bits of the timestamp (bits 4 through 7 of the time_hi_and_version field). +// Version returns a Dhcpv6ClientOptionsDuidUuidVersion +func (obj *dhcpv6ClientOptionsDuidUuid) Version() Dhcpv6ClientOptionsDuidUuidVersion { + if obj.obj.Version == nil { + obj.obj.Version = NewDhcpv6ClientOptionsDuidUuidVersion().msg() + } + if obj.versionHolder == nil { + obj.versionHolder = &dhcpv6ClientOptionsDuidUuidVersion{obj: obj.obj.Version} + } + return obj.versionHolder +} + +// The version number is in the most significant 4 bits of the timestamp (bits 4 through 7 of the time_hi_and_version field). +// Version returns a Dhcpv6ClientOptionsDuidUuidVersion +func (obj *dhcpv6ClientOptionsDuidUuid) HasVersion() bool { + return obj.obj.Version != nil +} + +// The version number is in the most significant 4 bits of the timestamp (bits 4 through 7 of the time_hi_and_version field). +// SetVersion sets the Dhcpv6ClientOptionsDuidUuidVersion value in the Dhcpv6ClientOptionsDuidUuid object +func (obj *dhcpv6ClientOptionsDuidUuid) SetVersion(value Dhcpv6ClientOptionsDuidUuidVersion) Dhcpv6ClientOptionsDuidUuid { + + obj.versionHolder = nil + obj.obj.Version = value.msg() + + return obj +} + +// The variant field determines the layout of the UUID. It is multiplexed with clock_seq_hi_and_reserved. +// Variant returns a Dhcpv6ClientOptionsDuidUuidVariant +func (obj *dhcpv6ClientOptionsDuidUuid) Variant() Dhcpv6ClientOptionsDuidUuidVariant { + if obj.obj.Variant == nil { + obj.obj.Variant = NewDhcpv6ClientOptionsDuidUuidVariant().msg() + } + if obj.variantHolder == nil { + obj.variantHolder = &dhcpv6ClientOptionsDuidUuidVariant{obj: obj.obj.Variant} + } + return obj.variantHolder +} + +// The variant field determines the layout of the UUID. It is multiplexed with clock_seq_hi_and_reserved. +// Variant returns a Dhcpv6ClientOptionsDuidUuidVariant +func (obj *dhcpv6ClientOptionsDuidUuid) HasVariant() bool { + return obj.obj.Variant != nil +} + +// The variant field determines the layout of the UUID. It is multiplexed with clock_seq_hi_and_reserved. +// SetVariant sets the Dhcpv6ClientOptionsDuidUuidVariant value in the Dhcpv6ClientOptionsDuidUuid object +func (obj *dhcpv6ClientOptionsDuidUuid) SetVariant(value Dhcpv6ClientOptionsDuidUuidVariant) Dhcpv6ClientOptionsDuidUuid { + + obj.variantHolder = nil + obj.obj.Variant = value.msg() + + return obj +} + +// The low field of the timestamp. +// TimeLow returns a uint32 +func (obj *dhcpv6ClientOptionsDuidUuid) TimeLow() uint32 { + + return *obj.obj.TimeLow + +} + +// The low field of the timestamp. +// TimeLow returns a uint32 +func (obj *dhcpv6ClientOptionsDuidUuid) HasTimeLow() bool { + return obj.obj.TimeLow != nil +} + +// The low field of the timestamp. +// SetTimeLow sets the uint32 value in the Dhcpv6ClientOptionsDuidUuid object +func (obj *dhcpv6ClientOptionsDuidUuid) SetTimeLow(value uint32) Dhcpv6ClientOptionsDuidUuid { + + obj.obj.TimeLow = &value + return obj +} + +// The middle field of the timestamp. +// TimeMid returns a uint32 +func (obj *dhcpv6ClientOptionsDuidUuid) TimeMid() uint32 { + + return *obj.obj.TimeMid + +} + +// The middle field of the timestamp. +// TimeMid returns a uint32 +func (obj *dhcpv6ClientOptionsDuidUuid) HasTimeMid() bool { + return obj.obj.TimeMid != nil +} + +// The middle field of the timestamp. +// SetTimeMid sets the uint32 value in the Dhcpv6ClientOptionsDuidUuid object +func (obj *dhcpv6ClientOptionsDuidUuid) SetTimeMid(value uint32) Dhcpv6ClientOptionsDuidUuid { + + obj.obj.TimeMid = &value + return obj +} + +// The high field of the timestamp multiplexed with the version number. +// TimeHiAndVersion returns a uint32 +func (obj *dhcpv6ClientOptionsDuidUuid) TimeHiAndVersion() uint32 { + + return *obj.obj.TimeHiAndVersion + +} + +// The high field of the timestamp multiplexed with the version number. +// TimeHiAndVersion returns a uint32 +func (obj *dhcpv6ClientOptionsDuidUuid) HasTimeHiAndVersion() bool { + return obj.obj.TimeHiAndVersion != nil +} + +// The high field of the timestamp multiplexed with the version number. +// SetTimeHiAndVersion sets the uint32 value in the Dhcpv6ClientOptionsDuidUuid object +func (obj *dhcpv6ClientOptionsDuidUuid) SetTimeHiAndVersion(value uint32) Dhcpv6ClientOptionsDuidUuid { + + obj.obj.TimeHiAndVersion = &value + return obj +} + +// The high field of the clock sequence multiplexed with the variant. +// ClockSeqHiAndReserved returns a uint32 +func (obj *dhcpv6ClientOptionsDuidUuid) ClockSeqHiAndReserved() uint32 { + + return *obj.obj.ClockSeqHiAndReserved + +} + +// The high field of the clock sequence multiplexed with the variant. +// ClockSeqHiAndReserved returns a uint32 +func (obj *dhcpv6ClientOptionsDuidUuid) HasClockSeqHiAndReserved() bool { + return obj.obj.ClockSeqHiAndReserved != nil +} + +// The high field of the clock sequence multiplexed with the variant. +// SetClockSeqHiAndReserved sets the uint32 value in the Dhcpv6ClientOptionsDuidUuid object +func (obj *dhcpv6ClientOptionsDuidUuid) SetClockSeqHiAndReserved(value uint32) Dhcpv6ClientOptionsDuidUuid { + + obj.obj.ClockSeqHiAndReserved = &value + return obj +} + +// The low field of the clock sequence. +// ClockSeqLow returns a uint32 +func (obj *dhcpv6ClientOptionsDuidUuid) ClockSeqLow() uint32 { + + return *obj.obj.ClockSeqLow + +} + +// The low field of the clock sequence. +// ClockSeqLow returns a uint32 +func (obj *dhcpv6ClientOptionsDuidUuid) HasClockSeqLow() bool { + return obj.obj.ClockSeqLow != nil +} + +// The low field of the clock sequence. +// SetClockSeqLow sets the uint32 value in the Dhcpv6ClientOptionsDuidUuid object +func (obj *dhcpv6ClientOptionsDuidUuid) SetClockSeqLow(value uint32) Dhcpv6ClientOptionsDuidUuid { + + obj.obj.ClockSeqLow = &value + return obj +} + +// The spatially unique node identifier. +// Node returns a string +func (obj *dhcpv6ClientOptionsDuidUuid) Node() string { + + return *obj.obj.Node + +} + +// The spatially unique node identifier. +// Node returns a string +func (obj *dhcpv6ClientOptionsDuidUuid) HasNode() bool { + return obj.obj.Node != nil +} + +// The spatially unique node identifier. +// SetNode sets the string value in the Dhcpv6ClientOptionsDuidUuid object +func (obj *dhcpv6ClientOptionsDuidUuid) SetNode(value string) Dhcpv6ClientOptionsDuidUuid { + + obj.obj.Node = &value + return obj +} + +func (obj *dhcpv6ClientOptionsDuidUuid) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Version != nil { + + obj.Version().validateObj(vObj, set_default) + } + + if obj.obj.Variant != nil { + + obj.Variant().validateObj(vObj, set_default) + } + + if obj.obj.TimeMid != nil { + + if *obj.obj.TimeMid > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv6ClientOptionsDuidUuid.TimeMid <= 65535 but Got %d", *obj.obj.TimeMid)) + } + + } + + if obj.obj.TimeHiAndVersion != nil { + + if *obj.obj.TimeHiAndVersion > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv6ClientOptionsDuidUuid.TimeHiAndVersion <= 4095 but Got %d", *obj.obj.TimeHiAndVersion)) + } + + } + + if obj.obj.ClockSeqHiAndReserved != nil { + + if *obj.obj.ClockSeqHiAndReserved > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv6ClientOptionsDuidUuid.ClockSeqHiAndReserved <= 31 but Got %d", *obj.obj.ClockSeqHiAndReserved)) + } + + } + + if obj.obj.ClockSeqLow != nil { + + if *obj.obj.ClockSeqLow > 127 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv6ClientOptionsDuidUuid.ClockSeqLow <= 127 but Got %d", *obj.obj.ClockSeqLow)) + } + + } + + if obj.obj.Node != nil { + + err := obj.validateMac(obj.Node()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Dhcpv6ClientOptionsDuidUuid.Node")) + } + + } + +} + +func (obj *dhcpv6ClientOptionsDuidUuid) setDefault() { + if obj.obj.TimeLow == nil { + obj.SetTimeLow(0) + } + if obj.obj.TimeMid == nil { + obj.SetTimeMid(0) + } + if obj.obj.TimeHiAndVersion == nil { + obj.SetTimeHiAndVersion(0) + } + if obj.obj.ClockSeqHiAndReserved == nil { + obj.SetClockSeqHiAndReserved(0) + } + if obj.obj.ClockSeqLow == nil { + obj.SetClockSeqLow(0) + } + if obj.obj.Node == nil { + obj.SetNode("00:00:00:00:00:00") + } + +} diff --git a/gosnappi/dhcpv6_client_options_duid_uuid_variant.go b/gosnappi/dhcpv6_client_options_duid_uuid_variant.go new file mode 100644 index 00000000..5e4ebb47 --- /dev/null +++ b/gosnappi/dhcpv6_client_options_duid_uuid_variant.go @@ -0,0 +1,369 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsDuidUuidVariant ***** +type dhcpv6ClientOptionsDuidUuidVariant struct { + validation + obj *otg.Dhcpv6ClientOptionsDuidUuidVariant + marshaller marshalDhcpv6ClientOptionsDuidUuidVariant + unMarshaller unMarshalDhcpv6ClientOptionsDuidUuidVariant +} + +func NewDhcpv6ClientOptionsDuidUuidVariant() Dhcpv6ClientOptionsDuidUuidVariant { + obj := dhcpv6ClientOptionsDuidUuidVariant{obj: &otg.Dhcpv6ClientOptionsDuidUuidVariant{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsDuidUuidVariant) msg() *otg.Dhcpv6ClientOptionsDuidUuidVariant { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsDuidUuidVariant) setMsg(msg *otg.Dhcpv6ClientOptionsDuidUuidVariant) Dhcpv6ClientOptionsDuidUuidVariant { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsDuidUuidVariant struct { + obj *dhcpv6ClientOptionsDuidUuidVariant +} + +type marshalDhcpv6ClientOptionsDuidUuidVariant interface { + // ToProto marshals Dhcpv6ClientOptionsDuidUuidVariant to protobuf object *otg.Dhcpv6ClientOptionsDuidUuidVariant + ToProto() (*otg.Dhcpv6ClientOptionsDuidUuidVariant, error) + // ToPbText marshals Dhcpv6ClientOptionsDuidUuidVariant to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsDuidUuidVariant to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsDuidUuidVariant to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsDuidUuidVariant struct { + obj *dhcpv6ClientOptionsDuidUuidVariant +} + +type unMarshalDhcpv6ClientOptionsDuidUuidVariant interface { + // FromProto unmarshals Dhcpv6ClientOptionsDuidUuidVariant from protobuf object *otg.Dhcpv6ClientOptionsDuidUuidVariant + FromProto(msg *otg.Dhcpv6ClientOptionsDuidUuidVariant) (Dhcpv6ClientOptionsDuidUuidVariant, error) + // FromPbText unmarshals Dhcpv6ClientOptionsDuidUuidVariant from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsDuidUuidVariant from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsDuidUuidVariant from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsDuidUuidVariant) Marshal() marshalDhcpv6ClientOptionsDuidUuidVariant { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsDuidUuidVariant{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsDuidUuidVariant) Unmarshal() unMarshalDhcpv6ClientOptionsDuidUuidVariant { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsDuidUuidVariant{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsDuidUuidVariant) ToProto() (*otg.Dhcpv6ClientOptionsDuidUuidVariant, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidUuidVariant) FromProto(msg *otg.Dhcpv6ClientOptionsDuidUuidVariant) (Dhcpv6ClientOptionsDuidUuidVariant, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsDuidUuidVariant) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidUuidVariant) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsDuidUuidVariant) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidUuidVariant) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsDuidUuidVariant) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidUuidVariant) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsDuidUuidVariant) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsDuidUuidVariant) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsDuidUuidVariant) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsDuidUuidVariant) Clone() (Dhcpv6ClientOptionsDuidUuidVariant, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsDuidUuidVariant() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ClientOptionsDuidUuidVariant is the variant field determines the layout of the UUID. That is, the interpretation of all other bits in the UUID depends on the setting of the bits in the variant field). +type Dhcpv6ClientOptionsDuidUuidVariant interface { + Validation + // msg marshals Dhcpv6ClientOptionsDuidUuidVariant to protobuf object *otg.Dhcpv6ClientOptionsDuidUuidVariant + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsDuidUuidVariant + // setMsg unmarshals Dhcpv6ClientOptionsDuidUuidVariant from protobuf object *otg.Dhcpv6ClientOptionsDuidUuidVariant + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsDuidUuidVariant) Dhcpv6ClientOptionsDuidUuidVariant + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsDuidUuidVariant + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsDuidUuidVariant + // validate validates Dhcpv6ClientOptionsDuidUuidVariant + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsDuidUuidVariant, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum, set in Dhcpv6ClientOptionsDuidUuidVariant + Choice() Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum + // setChoice assigns Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum provided by user to Dhcpv6ClientOptionsDuidUuidVariant + setChoice(value Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum) Dhcpv6ClientOptionsDuidUuidVariant + // HasChoice checks if Choice has been set in Dhcpv6ClientOptionsDuidUuidVariant + HasChoice() bool + // getter for Ncs to set choice. + Ncs() + // getter for Dce to set choice. + Dce() + // getter for Guid to set choice. + Guid() + // getter for VarReserved to set choice. + VarReserved() +} + +type Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum string + +// Enum of Choice on Dhcpv6ClientOptionsDuidUuidVariant +var Dhcpv6ClientOptionsDuidUuidVariantChoice = struct { + NCS Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum + DCE Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum + GUID Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum + VAR_RESERVED Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum +}{ + NCS: Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum("ncs"), + DCE: Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum("dce"), + GUID: Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum("guid"), + VAR_RESERVED: Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum("var_reserved"), +} + +func (obj *dhcpv6ClientOptionsDuidUuidVariant) Choice() Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum { + return Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for Ncs to set choice +func (obj *dhcpv6ClientOptionsDuidUuidVariant) Ncs() { + obj.setChoice(Dhcpv6ClientOptionsDuidUuidVariantChoice.NCS) +} + +// getter for Dce to set choice +func (obj *dhcpv6ClientOptionsDuidUuidVariant) Dce() { + obj.setChoice(Dhcpv6ClientOptionsDuidUuidVariantChoice.DCE) +} + +// getter for Guid to set choice +func (obj *dhcpv6ClientOptionsDuidUuidVariant) Guid() { + obj.setChoice(Dhcpv6ClientOptionsDuidUuidVariantChoice.GUID) +} + +// getter for VarReserved to set choice +func (obj *dhcpv6ClientOptionsDuidUuidVariant) VarReserved() { + obj.setChoice(Dhcpv6ClientOptionsDuidUuidVariantChoice.VAR_RESERVED) +} + +// The current variants are ncs, dce,microsoft guid and reserved. +// Choice returns a string +func (obj *dhcpv6ClientOptionsDuidUuidVariant) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *dhcpv6ClientOptionsDuidUuidVariant) setChoice(value Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum) Dhcpv6ClientOptionsDuidUuidVariant { + intValue, ok := otg.Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum", string(value))) + return obj + } + enumValue := otg.Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + + return obj +} + +func (obj *dhcpv6ClientOptionsDuidUuidVariant) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv6ClientOptionsDuidUuidVariant) setDefault() { + var choices_set int = 0 + var choice Dhcpv6ClientOptionsDuidUuidVariantChoiceEnum + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Dhcpv6ClientOptionsDuidUuidVariantChoice.NCS) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Dhcpv6ClientOptionsDuidUuidVariant") + } + } else { + intVal := otg.Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum_value[string(choice)] + enumValue := otg.Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/dhcpv6_client_options_duid_uuid_version.go b/gosnappi/dhcpv6_client_options_duid_uuid_version.go new file mode 100644 index 00000000..449404dd --- /dev/null +++ b/gosnappi/dhcpv6_client_options_duid_uuid_version.go @@ -0,0 +1,378 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsDuidUuidVersion ***** +type dhcpv6ClientOptionsDuidUuidVersion struct { + validation + obj *otg.Dhcpv6ClientOptionsDuidUuidVersion + marshaller marshalDhcpv6ClientOptionsDuidUuidVersion + unMarshaller unMarshalDhcpv6ClientOptionsDuidUuidVersion +} + +func NewDhcpv6ClientOptionsDuidUuidVersion() Dhcpv6ClientOptionsDuidUuidVersion { + obj := dhcpv6ClientOptionsDuidUuidVersion{obj: &otg.Dhcpv6ClientOptionsDuidUuidVersion{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsDuidUuidVersion) msg() *otg.Dhcpv6ClientOptionsDuidUuidVersion { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsDuidUuidVersion) setMsg(msg *otg.Dhcpv6ClientOptionsDuidUuidVersion) Dhcpv6ClientOptionsDuidUuidVersion { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsDuidUuidVersion struct { + obj *dhcpv6ClientOptionsDuidUuidVersion +} + +type marshalDhcpv6ClientOptionsDuidUuidVersion interface { + // ToProto marshals Dhcpv6ClientOptionsDuidUuidVersion to protobuf object *otg.Dhcpv6ClientOptionsDuidUuidVersion + ToProto() (*otg.Dhcpv6ClientOptionsDuidUuidVersion, error) + // ToPbText marshals Dhcpv6ClientOptionsDuidUuidVersion to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsDuidUuidVersion to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsDuidUuidVersion to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsDuidUuidVersion struct { + obj *dhcpv6ClientOptionsDuidUuidVersion +} + +type unMarshalDhcpv6ClientOptionsDuidUuidVersion interface { + // FromProto unmarshals Dhcpv6ClientOptionsDuidUuidVersion from protobuf object *otg.Dhcpv6ClientOptionsDuidUuidVersion + FromProto(msg *otg.Dhcpv6ClientOptionsDuidUuidVersion) (Dhcpv6ClientOptionsDuidUuidVersion, error) + // FromPbText unmarshals Dhcpv6ClientOptionsDuidUuidVersion from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsDuidUuidVersion from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsDuidUuidVersion from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsDuidUuidVersion) Marshal() marshalDhcpv6ClientOptionsDuidUuidVersion { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsDuidUuidVersion{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsDuidUuidVersion) Unmarshal() unMarshalDhcpv6ClientOptionsDuidUuidVersion { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsDuidUuidVersion{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsDuidUuidVersion) ToProto() (*otg.Dhcpv6ClientOptionsDuidUuidVersion, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidUuidVersion) FromProto(msg *otg.Dhcpv6ClientOptionsDuidUuidVersion) (Dhcpv6ClientOptionsDuidUuidVersion, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsDuidUuidVersion) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidUuidVersion) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsDuidUuidVersion) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidUuidVersion) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsDuidUuidVersion) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsDuidUuidVersion) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsDuidUuidVersion) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsDuidUuidVersion) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsDuidUuidVersion) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsDuidUuidVersion) Clone() (Dhcpv6ClientOptionsDuidUuidVersion, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsDuidUuidVersion() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ClientOptionsDuidUuidVersion is the version number is in the most significant 4 bits of the timestamp (bits 4 through 7 of the time_hi_and_version field). +type Dhcpv6ClientOptionsDuidUuidVersion interface { + Validation + // msg marshals Dhcpv6ClientOptionsDuidUuidVersion to protobuf object *otg.Dhcpv6ClientOptionsDuidUuidVersion + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsDuidUuidVersion + // setMsg unmarshals Dhcpv6ClientOptionsDuidUuidVersion from protobuf object *otg.Dhcpv6ClientOptionsDuidUuidVersion + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsDuidUuidVersion) Dhcpv6ClientOptionsDuidUuidVersion + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsDuidUuidVersion + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsDuidUuidVersion + // validate validates Dhcpv6ClientOptionsDuidUuidVersion + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsDuidUuidVersion, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum, set in Dhcpv6ClientOptionsDuidUuidVersion + Choice() Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum + // setChoice assigns Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum provided by user to Dhcpv6ClientOptionsDuidUuidVersion + setChoice(value Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum) Dhcpv6ClientOptionsDuidUuidVersion + // HasChoice checks if Choice has been set in Dhcpv6ClientOptionsDuidUuidVersion + HasChoice() bool + // getter for V_3 to set choice. + V_3() + // getter for V_4 to set choice. + V_4() + // getter for V_2 to set choice. + V_2() + // getter for V_5 to set choice. + V_5() + // getter for V_1 to set choice. + V_1() +} + +type Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum string + +// Enum of Choice on Dhcpv6ClientOptionsDuidUuidVersion +var Dhcpv6ClientOptionsDuidUuidVersionChoice = struct { + V_1 Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum + V_2 Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum + V_3 Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum + V_4 Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum + V_5 Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum +}{ + V_1: Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum("v_1"), + V_2: Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum("v_2"), + V_3: Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum("v_3"), + V_4: Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum("v_4"), + V_5: Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum("v_5"), +} + +func (obj *dhcpv6ClientOptionsDuidUuidVersion) Choice() Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum { + return Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for V_3 to set choice +func (obj *dhcpv6ClientOptionsDuidUuidVersion) V_3() { + obj.setChoice(Dhcpv6ClientOptionsDuidUuidVersionChoice.V_3) +} + +// getter for V_4 to set choice +func (obj *dhcpv6ClientOptionsDuidUuidVersion) V_4() { + obj.setChoice(Dhcpv6ClientOptionsDuidUuidVersionChoice.V_4) +} + +// getter for V_2 to set choice +func (obj *dhcpv6ClientOptionsDuidUuidVersion) V_2() { + obj.setChoice(Dhcpv6ClientOptionsDuidUuidVersionChoice.V_2) +} + +// getter for V_5 to set choice +func (obj *dhcpv6ClientOptionsDuidUuidVersion) V_5() { + obj.setChoice(Dhcpv6ClientOptionsDuidUuidVersionChoice.V_5) +} + +// getter for V_1 to set choice +func (obj *dhcpv6ClientOptionsDuidUuidVersion) V_1() { + obj.setChoice(Dhcpv6ClientOptionsDuidUuidVersionChoice.V_1) +} + +// The version values are from 1 to 5 in the most significant 4 bits of the timestamp (bits 4 through 7 of the time_hi_and_version field). +// Choice returns a string +func (obj *dhcpv6ClientOptionsDuidUuidVersion) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *dhcpv6ClientOptionsDuidUuidVersion) setChoice(value Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum) Dhcpv6ClientOptionsDuidUuidVersion { + intValue, ok := otg.Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum", string(value))) + return obj + } + enumValue := otg.Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + + return obj +} + +func (obj *dhcpv6ClientOptionsDuidUuidVersion) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv6ClientOptionsDuidUuidVersion) setDefault() { + var choices_set int = 0 + var choice Dhcpv6ClientOptionsDuidUuidVersionChoiceEnum + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Dhcpv6ClientOptionsDuidUuidVersionChoice.V_1) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Dhcpv6ClientOptionsDuidUuidVersion") + } + } else { + intVal := otg.Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum_value[string(choice)] + enumValue := otg.Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/dhcpv6_client_options_fqdn.go b/gosnappi/dhcpv6_client_options_fqdn.go new file mode 100644 index 00000000..c0e67396 --- /dev/null +++ b/gosnappi/dhcpv6_client_options_fqdn.go @@ -0,0 +1,446 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsFqdn ***** +type dhcpv6ClientOptionsFqdn struct { + validation + obj *otg.Dhcpv6ClientOptionsFqdn + marshaller marshalDhcpv6ClientOptionsFqdn + unMarshaller unMarshalDhcpv6ClientOptionsFqdn + associatedDhcpMessagesHolder Dhcpv6ClientOptionsIncludedMessages +} + +func NewDhcpv6ClientOptionsFqdn() Dhcpv6ClientOptionsFqdn { + obj := dhcpv6ClientOptionsFqdn{obj: &otg.Dhcpv6ClientOptionsFqdn{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsFqdn) msg() *otg.Dhcpv6ClientOptionsFqdn { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsFqdn) setMsg(msg *otg.Dhcpv6ClientOptionsFqdn) Dhcpv6ClientOptionsFqdn { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsFqdn struct { + obj *dhcpv6ClientOptionsFqdn +} + +type marshalDhcpv6ClientOptionsFqdn interface { + // ToProto marshals Dhcpv6ClientOptionsFqdn to protobuf object *otg.Dhcpv6ClientOptionsFqdn + ToProto() (*otg.Dhcpv6ClientOptionsFqdn, error) + // ToPbText marshals Dhcpv6ClientOptionsFqdn to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsFqdn to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsFqdn to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsFqdn struct { + obj *dhcpv6ClientOptionsFqdn +} + +type unMarshalDhcpv6ClientOptionsFqdn interface { + // FromProto unmarshals Dhcpv6ClientOptionsFqdn from protobuf object *otg.Dhcpv6ClientOptionsFqdn + FromProto(msg *otg.Dhcpv6ClientOptionsFqdn) (Dhcpv6ClientOptionsFqdn, error) + // FromPbText unmarshals Dhcpv6ClientOptionsFqdn from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsFqdn from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsFqdn from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsFqdn) Marshal() marshalDhcpv6ClientOptionsFqdn { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsFqdn{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsFqdn) Unmarshal() unMarshalDhcpv6ClientOptionsFqdn { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsFqdn{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsFqdn) ToProto() (*otg.Dhcpv6ClientOptionsFqdn, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsFqdn) FromProto(msg *otg.Dhcpv6ClientOptionsFqdn) (Dhcpv6ClientOptionsFqdn, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsFqdn) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsFqdn) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsFqdn) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsFqdn) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsFqdn) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsFqdn) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsFqdn) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsFqdn) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsFqdn) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsFqdn) Clone() (Dhcpv6ClientOptionsFqdn, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsFqdn() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ClientOptionsFqdn) setNil() { + obj.associatedDhcpMessagesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ClientOptionsFqdn is dHCPv6 server needs to know the FQDN of the client for the addresses for the client's IA_NA bindings in order to update the IPv6-address-to-FQDN mapping. This option allows the client to convey its FQDN to the server. The Client FQDN option also contains Flags that DHCPv6 clients and servers use to negotiate who does which updates. The option code is 39. +type Dhcpv6ClientOptionsFqdn interface { + Validation + // msg marshals Dhcpv6ClientOptionsFqdn to protobuf object *otg.Dhcpv6ClientOptionsFqdn + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsFqdn + // setMsg unmarshals Dhcpv6ClientOptionsFqdn from protobuf object *otg.Dhcpv6ClientOptionsFqdn + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsFqdn) Dhcpv6ClientOptionsFqdn + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsFqdn + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsFqdn + // validate validates Dhcpv6ClientOptionsFqdn + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsFqdn, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // FlagS returns bool, set in Dhcpv6ClientOptionsFqdn. + FlagS() bool + // SetFlagS assigns bool provided by user to Dhcpv6ClientOptionsFqdn + SetFlagS(value bool) Dhcpv6ClientOptionsFqdn + // HasFlagS checks if FlagS has been set in Dhcpv6ClientOptionsFqdn + HasFlagS() bool + // FlagO returns bool, set in Dhcpv6ClientOptionsFqdn. + FlagO() bool + // SetFlagO assigns bool provided by user to Dhcpv6ClientOptionsFqdn + SetFlagO(value bool) Dhcpv6ClientOptionsFqdn + // HasFlagO checks if FlagO has been set in Dhcpv6ClientOptionsFqdn + HasFlagO() bool + // FlagN returns bool, set in Dhcpv6ClientOptionsFqdn. + FlagN() bool + // SetFlagN assigns bool provided by user to Dhcpv6ClientOptionsFqdn + SetFlagN(value bool) Dhcpv6ClientOptionsFqdn + // HasFlagN checks if FlagN has been set in Dhcpv6ClientOptionsFqdn + HasFlagN() bool + // DomainName returns string, set in Dhcpv6ClientOptionsFqdn. + DomainName() string + // SetDomainName assigns string provided by user to Dhcpv6ClientOptionsFqdn + SetDomainName(value string) Dhcpv6ClientOptionsFqdn + // AssociatedDhcpMessages returns Dhcpv6ClientOptionsIncludedMessages, set in Dhcpv6ClientOptionsFqdn. + // Dhcpv6ClientOptionsIncludedMessages is the dhcpv6 client messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 client messages, else based on the selection in particular Dhcpv6 client messages the option will be included. + AssociatedDhcpMessages() Dhcpv6ClientOptionsIncludedMessages + // SetAssociatedDhcpMessages assigns Dhcpv6ClientOptionsIncludedMessages provided by user to Dhcpv6ClientOptionsFqdn. + // Dhcpv6ClientOptionsIncludedMessages is the dhcpv6 client messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 client messages, else based on the selection in particular Dhcpv6 client messages the option will be included. + SetAssociatedDhcpMessages(value Dhcpv6ClientOptionsIncludedMessages) Dhcpv6ClientOptionsFqdn + // HasAssociatedDhcpMessages checks if AssociatedDhcpMessages has been set in Dhcpv6ClientOptionsFqdn + HasAssociatedDhcpMessages() bool + setNil() +} + +// The "S" bit indicates whether the server should or should not perform the AAAA RR (FQDN-to-address) DNS updates. A client sets the bit to 0 to indicate that the server should not perform the updates and 1 to indicate that the server should perform the updates. The state of the bit in the reply from the server indicates the action to be taken by the server. If it is 1, the server has taken responsibility for AAAA RR updates for the FQDN. +// FlagS returns a bool +func (obj *dhcpv6ClientOptionsFqdn) FlagS() bool { + + return *obj.obj.FlagS + +} + +// The "S" bit indicates whether the server should or should not perform the AAAA RR (FQDN-to-address) DNS updates. A client sets the bit to 0 to indicate that the server should not perform the updates and 1 to indicate that the server should perform the updates. The state of the bit in the reply from the server indicates the action to be taken by the server. If it is 1, the server has taken responsibility for AAAA RR updates for the FQDN. +// FlagS returns a bool +func (obj *dhcpv6ClientOptionsFqdn) HasFlagS() bool { + return obj.obj.FlagS != nil +} + +// The "S" bit indicates whether the server should or should not perform the AAAA RR (FQDN-to-address) DNS updates. A client sets the bit to 0 to indicate that the server should not perform the updates and 1 to indicate that the server should perform the updates. The state of the bit in the reply from the server indicates the action to be taken by the server. If it is 1, the server has taken responsibility for AAAA RR updates for the FQDN. +// SetFlagS sets the bool value in the Dhcpv6ClientOptionsFqdn object +func (obj *dhcpv6ClientOptionsFqdn) SetFlagS(value bool) Dhcpv6ClientOptionsFqdn { + + obj.obj.FlagS = &value + return obj +} + +// The "O" bit indicates whether the server has overridden the client's preference for the "S" bit. A client must set this bit to 0. A server must set this bit to 1 if the "S" bit in its reply to the client does not match the "S" bit received from the client. +// FlagO returns a bool +func (obj *dhcpv6ClientOptionsFqdn) FlagO() bool { + + return *obj.obj.FlagO + +} + +// The "O" bit indicates whether the server has overridden the client's preference for the "S" bit. A client must set this bit to 0. A server must set this bit to 1 if the "S" bit in its reply to the client does not match the "S" bit received from the client. +// FlagO returns a bool +func (obj *dhcpv6ClientOptionsFqdn) HasFlagO() bool { + return obj.obj.FlagO != nil +} + +// The "O" bit indicates whether the server has overridden the client's preference for the "S" bit. A client must set this bit to 0. A server must set this bit to 1 if the "S" bit in its reply to the client does not match the "S" bit received from the client. +// SetFlagO sets the bool value in the Dhcpv6ClientOptionsFqdn object +func (obj *dhcpv6ClientOptionsFqdn) SetFlagO(value bool) Dhcpv6ClientOptionsFqdn { + + obj.obj.FlagO = &value + return obj +} + +// The "N" bit indicates whether the server should not perform any DNS updates. A client sets this bit to 0 to request that the server should perform updates (the PTR RR and possibly the AAAA RR based on the "S" bit) or to 1 to request that the server should not perform any DNS updates. A server sets the "N" bit to indicate whether the server shall (0) or shall not (1) perform DNS updates. If the "N" bit is 1, the "S" bit MUST be 0. +// FlagN returns a bool +func (obj *dhcpv6ClientOptionsFqdn) FlagN() bool { + + return *obj.obj.FlagN + +} + +// The "N" bit indicates whether the server should not perform any DNS updates. A client sets this bit to 0 to request that the server should perform updates (the PTR RR and possibly the AAAA RR based on the "S" bit) or to 1 to request that the server should not perform any DNS updates. A server sets the "N" bit to indicate whether the server shall (0) or shall not (1) perform DNS updates. If the "N" bit is 1, the "S" bit MUST be 0. +// FlagN returns a bool +func (obj *dhcpv6ClientOptionsFqdn) HasFlagN() bool { + return obj.obj.FlagN != nil +} + +// The "N" bit indicates whether the server should not perform any DNS updates. A client sets this bit to 0 to request that the server should perform updates (the PTR RR and possibly the AAAA RR based on the "S" bit) or to 1 to request that the server should not perform any DNS updates. A server sets the "N" bit to indicate whether the server shall (0) or shall not (1) perform DNS updates. If the "N" bit is 1, the "S" bit MUST be 0. +// SetFlagN sets the bool value in the Dhcpv6ClientOptionsFqdn object +func (obj *dhcpv6ClientOptionsFqdn) SetFlagN(value bool) Dhcpv6ClientOptionsFqdn { + + obj.obj.FlagN = &value + return obj +} + +// The Domain Name part of the option carries all or part of the FQDN of a DHCPv6 client. A client MAY also leave the Domain Name field empty if it desires the server to provide a name. A fully qualified domain name (FQDN) is the complete address of an internet host or computer. It provides its exact location within the domain name system (DNS) by specifying the hostname, domain name and top-level domain (TLD). An FQDN isn't the same as a URL but rather is a part of it that fully identifies the server to which the request is addressed. An FQDN doesn't carry the TCP/IP protocol information, such as Hypertext Transfer Protocol (HTTP) or Hypertext Transfer Protocol Secure (HTTPS), which is always used at the beginning of a URL. Therefore, adding the prefix http:// or https:// to the FQDN turns it into a full URL. One example can be microsoft.com. +// DomainName returns a string +func (obj *dhcpv6ClientOptionsFqdn) DomainName() string { + + return *obj.obj.DomainName + +} + +// The Domain Name part of the option carries all or part of the FQDN of a DHCPv6 client. A client MAY also leave the Domain Name field empty if it desires the server to provide a name. A fully qualified domain name (FQDN) is the complete address of an internet host or computer. It provides its exact location within the domain name system (DNS) by specifying the hostname, domain name and top-level domain (TLD). An FQDN isn't the same as a URL but rather is a part of it that fully identifies the server to which the request is addressed. An FQDN doesn't carry the TCP/IP protocol information, such as Hypertext Transfer Protocol (HTTP) or Hypertext Transfer Protocol Secure (HTTPS), which is always used at the beginning of a URL. Therefore, adding the prefix http:// or https:// to the FQDN turns it into a full URL. One example can be microsoft.com. +// SetDomainName sets the string value in the Dhcpv6ClientOptionsFqdn object +func (obj *dhcpv6ClientOptionsFqdn) SetDomainName(value string) Dhcpv6ClientOptionsFqdn { + + obj.obj.DomainName = &value + return obj +} + +// The list of dhcpv6 client messages where this option is included. +// AssociatedDhcpMessages returns a Dhcpv6ClientOptionsIncludedMessages +func (obj *dhcpv6ClientOptionsFqdn) AssociatedDhcpMessages() Dhcpv6ClientOptionsIncludedMessages { + if obj.obj.AssociatedDhcpMessages == nil { + obj.obj.AssociatedDhcpMessages = NewDhcpv6ClientOptionsIncludedMessages().msg() + } + if obj.associatedDhcpMessagesHolder == nil { + obj.associatedDhcpMessagesHolder = &dhcpv6ClientOptionsIncludedMessages{obj: obj.obj.AssociatedDhcpMessages} + } + return obj.associatedDhcpMessagesHolder +} + +// The list of dhcpv6 client messages where this option is included. +// AssociatedDhcpMessages returns a Dhcpv6ClientOptionsIncludedMessages +func (obj *dhcpv6ClientOptionsFqdn) HasAssociatedDhcpMessages() bool { + return obj.obj.AssociatedDhcpMessages != nil +} + +// The list of dhcpv6 client messages where this option is included. +// SetAssociatedDhcpMessages sets the Dhcpv6ClientOptionsIncludedMessages value in the Dhcpv6ClientOptionsFqdn object +func (obj *dhcpv6ClientOptionsFqdn) SetAssociatedDhcpMessages(value Dhcpv6ClientOptionsIncludedMessages) Dhcpv6ClientOptionsFqdn { + + obj.associatedDhcpMessagesHolder = nil + obj.obj.AssociatedDhcpMessages = value.msg() + + return obj +} + +func (obj *dhcpv6ClientOptionsFqdn) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // DomainName is required + if obj.obj.DomainName == nil { + vObj.validationErrors = append(vObj.validationErrors, "DomainName is required field on interface Dhcpv6ClientOptionsFqdn") + } + + if obj.obj.AssociatedDhcpMessages != nil { + + obj.AssociatedDhcpMessages().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpv6ClientOptionsFqdn) setDefault() { + if obj.obj.FlagS == nil { + obj.SetFlagS(true) + } + if obj.obj.FlagO == nil { + obj.SetFlagO(false) + } + if obj.obj.FlagN == nil { + obj.SetFlagN(false) + } + +} diff --git a/gosnappi/dhcpv6_client_options_included_messages.go b/gosnappi/dhcpv6_client_options_included_messages.go new file mode 100644 index 00000000..9c4f0dfd --- /dev/null +++ b/gosnappi/dhcpv6_client_options_included_messages.go @@ -0,0 +1,467 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsIncludedMessages ***** +type dhcpv6ClientOptionsIncludedMessages struct { + validation + obj *otg.Dhcpv6ClientOptionsIncludedMessages + marshaller marshalDhcpv6ClientOptionsIncludedMessages + unMarshaller unMarshalDhcpv6ClientOptionsIncludedMessages + msgTypesHolder Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter +} + +func NewDhcpv6ClientOptionsIncludedMessages() Dhcpv6ClientOptionsIncludedMessages { + obj := dhcpv6ClientOptionsIncludedMessages{obj: &otg.Dhcpv6ClientOptionsIncludedMessages{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsIncludedMessages) msg() *otg.Dhcpv6ClientOptionsIncludedMessages { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsIncludedMessages) setMsg(msg *otg.Dhcpv6ClientOptionsIncludedMessages) Dhcpv6ClientOptionsIncludedMessages { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsIncludedMessages struct { + obj *dhcpv6ClientOptionsIncludedMessages +} + +type marshalDhcpv6ClientOptionsIncludedMessages interface { + // ToProto marshals Dhcpv6ClientOptionsIncludedMessages to protobuf object *otg.Dhcpv6ClientOptionsIncludedMessages + ToProto() (*otg.Dhcpv6ClientOptionsIncludedMessages, error) + // ToPbText marshals Dhcpv6ClientOptionsIncludedMessages to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsIncludedMessages to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsIncludedMessages to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsIncludedMessages struct { + obj *dhcpv6ClientOptionsIncludedMessages +} + +type unMarshalDhcpv6ClientOptionsIncludedMessages interface { + // FromProto unmarshals Dhcpv6ClientOptionsIncludedMessages from protobuf object *otg.Dhcpv6ClientOptionsIncludedMessages + FromProto(msg *otg.Dhcpv6ClientOptionsIncludedMessages) (Dhcpv6ClientOptionsIncludedMessages, error) + // FromPbText unmarshals Dhcpv6ClientOptionsIncludedMessages from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsIncludedMessages from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsIncludedMessages from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsIncludedMessages) Marshal() marshalDhcpv6ClientOptionsIncludedMessages { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsIncludedMessages{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsIncludedMessages) Unmarshal() unMarshalDhcpv6ClientOptionsIncludedMessages { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsIncludedMessages{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsIncludedMessages) ToProto() (*otg.Dhcpv6ClientOptionsIncludedMessages, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsIncludedMessages) FromProto(msg *otg.Dhcpv6ClientOptionsIncludedMessages) (Dhcpv6ClientOptionsIncludedMessages, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsIncludedMessages) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsIncludedMessages) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsIncludedMessages) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsIncludedMessages) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsIncludedMessages) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsIncludedMessages) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsIncludedMessages) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsIncludedMessages) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsIncludedMessages) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsIncludedMessages) Clone() (Dhcpv6ClientOptionsIncludedMessages, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsIncludedMessages() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ClientOptionsIncludedMessages) setNil() { + obj.msgTypesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ClientOptionsIncludedMessages is the dhcpv6 client messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 client messages, else based on the selection in particular Dhcpv6 client messages the option will be included. +type Dhcpv6ClientOptionsIncludedMessages interface { + Validation + // msg marshals Dhcpv6ClientOptionsIncludedMessages to protobuf object *otg.Dhcpv6ClientOptionsIncludedMessages + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsIncludedMessages + // setMsg unmarshals Dhcpv6ClientOptionsIncludedMessages from protobuf object *otg.Dhcpv6ClientOptionsIncludedMessages + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsIncludedMessages) Dhcpv6ClientOptionsIncludedMessages + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsIncludedMessages + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsIncludedMessages + // validate validates Dhcpv6ClientOptionsIncludedMessages + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsIncludedMessages, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns Dhcpv6ClientOptionsIncludedMessagesChoiceEnum, set in Dhcpv6ClientOptionsIncludedMessages + Choice() Dhcpv6ClientOptionsIncludedMessagesChoiceEnum + // setChoice assigns Dhcpv6ClientOptionsIncludedMessagesChoiceEnum provided by user to Dhcpv6ClientOptionsIncludedMessages + setChoice(value Dhcpv6ClientOptionsIncludedMessagesChoiceEnum) Dhcpv6ClientOptionsIncludedMessages + // HasChoice checks if Choice has been set in Dhcpv6ClientOptionsIncludedMessages + HasChoice() bool + // getter for All to set choice. + All() + // MsgTypes returns Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIterIter, set in Dhcpv6ClientOptionsIncludedMessages + MsgTypes() Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter + setNil() +} + +type Dhcpv6ClientOptionsIncludedMessagesChoiceEnum string + +// Enum of Choice on Dhcpv6ClientOptionsIncludedMessages +var Dhcpv6ClientOptionsIncludedMessagesChoice = struct { + ALL Dhcpv6ClientOptionsIncludedMessagesChoiceEnum + MSG_TYPES Dhcpv6ClientOptionsIncludedMessagesChoiceEnum +}{ + ALL: Dhcpv6ClientOptionsIncludedMessagesChoiceEnum("all"), + MSG_TYPES: Dhcpv6ClientOptionsIncludedMessagesChoiceEnum("msg_types"), +} + +func (obj *dhcpv6ClientOptionsIncludedMessages) Choice() Dhcpv6ClientOptionsIncludedMessagesChoiceEnum { + return Dhcpv6ClientOptionsIncludedMessagesChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for All to set choice +func (obj *dhcpv6ClientOptionsIncludedMessages) All() { + obj.setChoice(Dhcpv6ClientOptionsIncludedMessagesChoice.ALL) +} + +// The client message name where the option is included, by default it is all. +// Choice returns a string +func (obj *dhcpv6ClientOptionsIncludedMessages) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *dhcpv6ClientOptionsIncludedMessages) setChoice(value Dhcpv6ClientOptionsIncludedMessagesChoiceEnum) Dhcpv6ClientOptionsIncludedMessages { + intValue, ok := otg.Dhcpv6ClientOptionsIncludedMessages_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Dhcpv6ClientOptionsIncludedMessagesChoiceEnum", string(value))) + return obj + } + enumValue := otg.Dhcpv6ClientOptionsIncludedMessages_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.MsgTypes = nil + obj.msgTypesHolder = nil + + if value == Dhcpv6ClientOptionsIncludedMessagesChoice.MSG_TYPES { + obj.obj.MsgTypes = []*otg.Dhcpv6ClientOptionsMessageType{} + } + + return obj +} + +// User must specify the Dhcpv6 message type. +// MsgTypes returns a []Dhcpv6ClientOptionsMessageType +func (obj *dhcpv6ClientOptionsIncludedMessages) MsgTypes() Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter { + if len(obj.obj.MsgTypes) == 0 { + obj.setChoice(Dhcpv6ClientOptionsIncludedMessagesChoice.MSG_TYPES) + } + if obj.msgTypesHolder == nil { + obj.msgTypesHolder = newDhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter(&obj.obj.MsgTypes).setMsg(obj) + } + return obj.msgTypesHolder +} + +type dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter struct { + obj *dhcpv6ClientOptionsIncludedMessages + dhcpv6ClientOptionsMessageTypeSlice []Dhcpv6ClientOptionsMessageType + fieldPtr *[]*otg.Dhcpv6ClientOptionsMessageType +} + +func newDhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter(ptr *[]*otg.Dhcpv6ClientOptionsMessageType) Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter { + return &dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter{fieldPtr: ptr} +} + +type Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter interface { + setMsg(*dhcpv6ClientOptionsIncludedMessages) Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter + Items() []Dhcpv6ClientOptionsMessageType + Add() Dhcpv6ClientOptionsMessageType + Append(items ...Dhcpv6ClientOptionsMessageType) Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter + Set(index int, newObj Dhcpv6ClientOptionsMessageType) Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter + Clear() Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter + clearHolderSlice() Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter + appendHolderSlice(item Dhcpv6ClientOptionsMessageType) Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter +} + +func (obj *dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter) setMsg(msg *dhcpv6ClientOptionsIncludedMessages) Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv6ClientOptionsMessageType{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter) Items() []Dhcpv6ClientOptionsMessageType { + return obj.dhcpv6ClientOptionsMessageTypeSlice +} + +func (obj *dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter) Add() Dhcpv6ClientOptionsMessageType { + newObj := &otg.Dhcpv6ClientOptionsMessageType{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv6ClientOptionsMessageType{obj: newObj} + newLibObj.setDefault() + obj.dhcpv6ClientOptionsMessageTypeSlice = append(obj.dhcpv6ClientOptionsMessageTypeSlice, newLibObj) + return newLibObj +} + +func (obj *dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter) Append(items ...Dhcpv6ClientOptionsMessageType) Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv6ClientOptionsMessageTypeSlice = append(obj.dhcpv6ClientOptionsMessageTypeSlice, item) + } + return obj +} + +func (obj *dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter) Set(index int, newObj Dhcpv6ClientOptionsMessageType) Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv6ClientOptionsMessageTypeSlice[index] = newObj + return obj +} +func (obj *dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter) Clear() Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv6ClientOptionsMessageType{} + obj.dhcpv6ClientOptionsMessageTypeSlice = []Dhcpv6ClientOptionsMessageType{} + } + return obj +} +func (obj *dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter) clearHolderSlice() Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter { + if len(obj.dhcpv6ClientOptionsMessageTypeSlice) > 0 { + obj.dhcpv6ClientOptionsMessageTypeSlice = []Dhcpv6ClientOptionsMessageType{} + } + return obj +} +func (obj *dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter) appendHolderSlice(item Dhcpv6ClientOptionsMessageType) Dhcpv6ClientOptionsIncludedMessagesDhcpv6ClientOptionsMessageTypeIter { + obj.dhcpv6ClientOptionsMessageTypeSlice = append(obj.dhcpv6ClientOptionsMessageTypeSlice, item) + return obj +} + +func (obj *dhcpv6ClientOptionsIncludedMessages) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.MsgTypes) != 0 { + + if set_default { + obj.MsgTypes().clearHolderSlice() + for _, item := range obj.obj.MsgTypes { + obj.MsgTypes().appendHolderSlice(&dhcpv6ClientOptionsMessageType{obj: item}) + } + } + for _, item := range obj.MsgTypes().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *dhcpv6ClientOptionsIncludedMessages) setDefault() { + var choices_set int = 0 + var choice Dhcpv6ClientOptionsIncludedMessagesChoiceEnum + + if len(obj.obj.MsgTypes) > 0 { + choices_set += 1 + choice = Dhcpv6ClientOptionsIncludedMessagesChoice.MSG_TYPES + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Dhcpv6ClientOptionsIncludedMessagesChoice.ALL) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Dhcpv6ClientOptionsIncludedMessages") + } + } else { + intVal := otg.Dhcpv6ClientOptionsIncludedMessages_Choice_Enum_value[string(choice)] + enumValue := otg.Dhcpv6ClientOptionsIncludedMessages_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/dhcpv6_client_options_link_layer_address.go b/gosnappi/dhcpv6_client_options_link_layer_address.go new file mode 100644 index 00000000..1091e93f --- /dev/null +++ b/gosnappi/dhcpv6_client_options_link_layer_address.go @@ -0,0 +1,311 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsLinkLayerAddress ***** +type dhcpv6ClientOptionsLinkLayerAddress struct { + validation + obj *otg.Dhcpv6ClientOptionsLinkLayerAddress + marshaller marshalDhcpv6ClientOptionsLinkLayerAddress + unMarshaller unMarshalDhcpv6ClientOptionsLinkLayerAddress +} + +func NewDhcpv6ClientOptionsLinkLayerAddress() Dhcpv6ClientOptionsLinkLayerAddress { + obj := dhcpv6ClientOptionsLinkLayerAddress{obj: &otg.Dhcpv6ClientOptionsLinkLayerAddress{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsLinkLayerAddress) msg() *otg.Dhcpv6ClientOptionsLinkLayerAddress { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsLinkLayerAddress) setMsg(msg *otg.Dhcpv6ClientOptionsLinkLayerAddress) Dhcpv6ClientOptionsLinkLayerAddress { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsLinkLayerAddress struct { + obj *dhcpv6ClientOptionsLinkLayerAddress +} + +type marshalDhcpv6ClientOptionsLinkLayerAddress interface { + // ToProto marshals Dhcpv6ClientOptionsLinkLayerAddress to protobuf object *otg.Dhcpv6ClientOptionsLinkLayerAddress + ToProto() (*otg.Dhcpv6ClientOptionsLinkLayerAddress, error) + // ToPbText marshals Dhcpv6ClientOptionsLinkLayerAddress to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsLinkLayerAddress to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsLinkLayerAddress to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsLinkLayerAddress struct { + obj *dhcpv6ClientOptionsLinkLayerAddress +} + +type unMarshalDhcpv6ClientOptionsLinkLayerAddress interface { + // FromProto unmarshals Dhcpv6ClientOptionsLinkLayerAddress from protobuf object *otg.Dhcpv6ClientOptionsLinkLayerAddress + FromProto(msg *otg.Dhcpv6ClientOptionsLinkLayerAddress) (Dhcpv6ClientOptionsLinkLayerAddress, error) + // FromPbText unmarshals Dhcpv6ClientOptionsLinkLayerAddress from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsLinkLayerAddress from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsLinkLayerAddress from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsLinkLayerAddress) Marshal() marshalDhcpv6ClientOptionsLinkLayerAddress { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsLinkLayerAddress{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsLinkLayerAddress) Unmarshal() unMarshalDhcpv6ClientOptionsLinkLayerAddress { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsLinkLayerAddress{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsLinkLayerAddress) ToProto() (*otg.Dhcpv6ClientOptionsLinkLayerAddress, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsLinkLayerAddress) FromProto(msg *otg.Dhcpv6ClientOptionsLinkLayerAddress) (Dhcpv6ClientOptionsLinkLayerAddress, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsLinkLayerAddress) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsLinkLayerAddress) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsLinkLayerAddress) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsLinkLayerAddress) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsLinkLayerAddress) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsLinkLayerAddress) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsLinkLayerAddress) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsLinkLayerAddress) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsLinkLayerAddress) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsLinkLayerAddress) Clone() (Dhcpv6ClientOptionsLinkLayerAddress, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsLinkLayerAddress() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ClientOptionsLinkLayerAddress is the link-layer address configured in DUID llt or DUID ll. +type Dhcpv6ClientOptionsLinkLayerAddress interface { + Validation + // msg marshals Dhcpv6ClientOptionsLinkLayerAddress to protobuf object *otg.Dhcpv6ClientOptionsLinkLayerAddress + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsLinkLayerAddress + // setMsg unmarshals Dhcpv6ClientOptionsLinkLayerAddress from protobuf object *otg.Dhcpv6ClientOptionsLinkLayerAddress + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsLinkLayerAddress) Dhcpv6ClientOptionsLinkLayerAddress + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsLinkLayerAddress + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsLinkLayerAddress + // validate validates Dhcpv6ClientOptionsLinkLayerAddress + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsLinkLayerAddress, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Value returns string, set in Dhcpv6ClientOptionsLinkLayerAddress. + Value() string + // SetValue assigns string provided by user to Dhcpv6ClientOptionsLinkLayerAddress + SetValue(value string) Dhcpv6ClientOptionsLinkLayerAddress +} + +// The MAC address that becomes part of DUID llt or DUID ll. +// Value returns a string +func (obj *dhcpv6ClientOptionsLinkLayerAddress) Value() string { + + return *obj.obj.Value + +} + +// The MAC address that becomes part of DUID llt or DUID ll. +// SetValue sets the string value in the Dhcpv6ClientOptionsLinkLayerAddress object +func (obj *dhcpv6ClientOptionsLinkLayerAddress) SetValue(value string) Dhcpv6ClientOptionsLinkLayerAddress { + + obj.obj.Value = &value + return obj +} + +func (obj *dhcpv6ClientOptionsLinkLayerAddress) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Value is required + if obj.obj.Value == nil { + vObj.validationErrors = append(vObj.validationErrors, "Value is required field on interface Dhcpv6ClientOptionsLinkLayerAddress") + } + if obj.obj.Value != nil { + + err := obj.validateMac(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Dhcpv6ClientOptionsLinkLayerAddress.Value")) + } + + } + +} + +func (obj *dhcpv6ClientOptionsLinkLayerAddress) setDefault() { + +} diff --git a/gosnappi/dhcpv6_client_options_message_type.go b/gosnappi/dhcpv6_client_options_message_type.go new file mode 100644 index 00000000..90e32a09 --- /dev/null +++ b/gosnappi/dhcpv6_client_options_message_type.go @@ -0,0 +1,387 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsMessageType ***** +type dhcpv6ClientOptionsMessageType struct { + validation + obj *otg.Dhcpv6ClientOptionsMessageType + marshaller marshalDhcpv6ClientOptionsMessageType + unMarshaller unMarshalDhcpv6ClientOptionsMessageType +} + +func NewDhcpv6ClientOptionsMessageType() Dhcpv6ClientOptionsMessageType { + obj := dhcpv6ClientOptionsMessageType{obj: &otg.Dhcpv6ClientOptionsMessageType{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsMessageType) msg() *otg.Dhcpv6ClientOptionsMessageType { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsMessageType) setMsg(msg *otg.Dhcpv6ClientOptionsMessageType) Dhcpv6ClientOptionsMessageType { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsMessageType struct { + obj *dhcpv6ClientOptionsMessageType +} + +type marshalDhcpv6ClientOptionsMessageType interface { + // ToProto marshals Dhcpv6ClientOptionsMessageType to protobuf object *otg.Dhcpv6ClientOptionsMessageType + ToProto() (*otg.Dhcpv6ClientOptionsMessageType, error) + // ToPbText marshals Dhcpv6ClientOptionsMessageType to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsMessageType to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsMessageType to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsMessageType struct { + obj *dhcpv6ClientOptionsMessageType +} + +type unMarshalDhcpv6ClientOptionsMessageType interface { + // FromProto unmarshals Dhcpv6ClientOptionsMessageType from protobuf object *otg.Dhcpv6ClientOptionsMessageType + FromProto(msg *otg.Dhcpv6ClientOptionsMessageType) (Dhcpv6ClientOptionsMessageType, error) + // FromPbText unmarshals Dhcpv6ClientOptionsMessageType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsMessageType from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsMessageType from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsMessageType) Marshal() marshalDhcpv6ClientOptionsMessageType { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsMessageType{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsMessageType) Unmarshal() unMarshalDhcpv6ClientOptionsMessageType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsMessageType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsMessageType) ToProto() (*otg.Dhcpv6ClientOptionsMessageType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsMessageType) FromProto(msg *otg.Dhcpv6ClientOptionsMessageType) (Dhcpv6ClientOptionsMessageType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsMessageType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsMessageType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsMessageType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsMessageType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsMessageType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsMessageType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsMessageType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsMessageType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsMessageType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsMessageType) Clone() (Dhcpv6ClientOptionsMessageType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsMessageType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ClientOptionsMessageType is the dhcpv6 client messages where the option will be included. +type Dhcpv6ClientOptionsMessageType interface { + Validation + // msg marshals Dhcpv6ClientOptionsMessageType to protobuf object *otg.Dhcpv6ClientOptionsMessageType + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsMessageType + // setMsg unmarshals Dhcpv6ClientOptionsMessageType from protobuf object *otg.Dhcpv6ClientOptionsMessageType + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsMessageType) Dhcpv6ClientOptionsMessageType + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsMessageType + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsMessageType + // validate validates Dhcpv6ClientOptionsMessageType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsMessageType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns Dhcpv6ClientOptionsMessageTypeChoiceEnum, set in Dhcpv6ClientOptionsMessageType + Choice() Dhcpv6ClientOptionsMessageTypeChoiceEnum + // setChoice assigns Dhcpv6ClientOptionsMessageTypeChoiceEnum provided by user to Dhcpv6ClientOptionsMessageType + setChoice(value Dhcpv6ClientOptionsMessageTypeChoiceEnum) Dhcpv6ClientOptionsMessageType + // HasChoice checks if Choice has been set in Dhcpv6ClientOptionsMessageType + HasChoice() bool + // getter for Request to set choice. + Request() + // getter for Release to set choice. + Release() + // getter for InformRequest to set choice. + InformRequest() + // getter for Solicit to set choice. + Solicit() + // getter for Renew to set choice. + Renew() + // getter for Rebind to set choice. + Rebind() +} + +type Dhcpv6ClientOptionsMessageTypeChoiceEnum string + +// Enum of Choice on Dhcpv6ClientOptionsMessageType +var Dhcpv6ClientOptionsMessageTypeChoice = struct { + SOLICIT Dhcpv6ClientOptionsMessageTypeChoiceEnum + REQUEST Dhcpv6ClientOptionsMessageTypeChoiceEnum + INFORM_REQUEST Dhcpv6ClientOptionsMessageTypeChoiceEnum + RELEASE Dhcpv6ClientOptionsMessageTypeChoiceEnum + RENEW Dhcpv6ClientOptionsMessageTypeChoiceEnum + REBIND Dhcpv6ClientOptionsMessageTypeChoiceEnum +}{ + SOLICIT: Dhcpv6ClientOptionsMessageTypeChoiceEnum("solicit"), + REQUEST: Dhcpv6ClientOptionsMessageTypeChoiceEnum("request"), + INFORM_REQUEST: Dhcpv6ClientOptionsMessageTypeChoiceEnum("inform_request"), + RELEASE: Dhcpv6ClientOptionsMessageTypeChoiceEnum("release"), + RENEW: Dhcpv6ClientOptionsMessageTypeChoiceEnum("renew"), + REBIND: Dhcpv6ClientOptionsMessageTypeChoiceEnum("rebind"), +} + +func (obj *dhcpv6ClientOptionsMessageType) Choice() Dhcpv6ClientOptionsMessageTypeChoiceEnum { + return Dhcpv6ClientOptionsMessageTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for Request to set choice +func (obj *dhcpv6ClientOptionsMessageType) Request() { + obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.REQUEST) +} + +// getter for Release to set choice +func (obj *dhcpv6ClientOptionsMessageType) Release() { + obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.RELEASE) +} + +// getter for InformRequest to set choice +func (obj *dhcpv6ClientOptionsMessageType) InformRequest() { + obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.INFORM_REQUEST) +} + +// getter for Solicit to set choice +func (obj *dhcpv6ClientOptionsMessageType) Solicit() { + obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.SOLICIT) +} + +// getter for Renew to set choice +func (obj *dhcpv6ClientOptionsMessageType) Renew() { + obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.RENEW) +} + +// getter for Rebind to set choice +func (obj *dhcpv6ClientOptionsMessageType) Rebind() { + obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.REBIND) +} + +// The client message name where the option is included, by default it is all. +// Choice returns a string +func (obj *dhcpv6ClientOptionsMessageType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *dhcpv6ClientOptionsMessageType) setChoice(value Dhcpv6ClientOptionsMessageTypeChoiceEnum) Dhcpv6ClientOptionsMessageType { + intValue, ok := otg.Dhcpv6ClientOptionsMessageType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Dhcpv6ClientOptionsMessageTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.Dhcpv6ClientOptionsMessageType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + + return obj +} + +func (obj *dhcpv6ClientOptionsMessageType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv6ClientOptionsMessageType) setDefault() { + var choices_set int = 0 + var choice Dhcpv6ClientOptionsMessageTypeChoiceEnum + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Dhcpv6ClientOptionsMessageTypeChoice.SOLICIT) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Dhcpv6ClientOptionsMessageType") + } + } else { + intVal := otg.Dhcpv6ClientOptionsMessageType_Choice_Enum_value[string(choice)] + enumValue := otg.Dhcpv6ClientOptionsMessageType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/dhcpv6_client_options_options_request.go b/gosnappi/dhcpv6_client_options_options_request.go new file mode 100644 index 00000000..e55fe369 --- /dev/null +++ b/gosnappi/dhcpv6_client_options_options_request.go @@ -0,0 +1,448 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsOptionsRequest ***** +type dhcpv6ClientOptionsOptionsRequest struct { + validation + obj *otg.Dhcpv6ClientOptionsOptionsRequest + marshaller marshalDhcpv6ClientOptionsOptionsRequest + unMarshaller unMarshalDhcpv6ClientOptionsOptionsRequest + customHolder Dhcpv6ClientOptionsCustom +} + +func NewDhcpv6ClientOptionsOptionsRequest() Dhcpv6ClientOptionsOptionsRequest { + obj := dhcpv6ClientOptionsOptionsRequest{obj: &otg.Dhcpv6ClientOptionsOptionsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsOptionsRequest) msg() *otg.Dhcpv6ClientOptionsOptionsRequest { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsOptionsRequest) setMsg(msg *otg.Dhcpv6ClientOptionsOptionsRequest) Dhcpv6ClientOptionsOptionsRequest { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsOptionsRequest struct { + obj *dhcpv6ClientOptionsOptionsRequest +} + +type marshalDhcpv6ClientOptionsOptionsRequest interface { + // ToProto marshals Dhcpv6ClientOptionsOptionsRequest to protobuf object *otg.Dhcpv6ClientOptionsOptionsRequest + ToProto() (*otg.Dhcpv6ClientOptionsOptionsRequest, error) + // ToPbText marshals Dhcpv6ClientOptionsOptionsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsOptionsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsOptionsRequest to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsOptionsRequest struct { + obj *dhcpv6ClientOptionsOptionsRequest +} + +type unMarshalDhcpv6ClientOptionsOptionsRequest interface { + // FromProto unmarshals Dhcpv6ClientOptionsOptionsRequest from protobuf object *otg.Dhcpv6ClientOptionsOptionsRequest + FromProto(msg *otg.Dhcpv6ClientOptionsOptionsRequest) (Dhcpv6ClientOptionsOptionsRequest, error) + // FromPbText unmarshals Dhcpv6ClientOptionsOptionsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsOptionsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsOptionsRequest from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsOptionsRequest) Marshal() marshalDhcpv6ClientOptionsOptionsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsOptionsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsOptionsRequest) Unmarshal() unMarshalDhcpv6ClientOptionsOptionsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsOptionsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsOptionsRequest) ToProto() (*otg.Dhcpv6ClientOptionsOptionsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsOptionsRequest) FromProto(msg *otg.Dhcpv6ClientOptionsOptionsRequest) (Dhcpv6ClientOptionsOptionsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsOptionsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsOptionsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsOptionsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsOptionsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsOptionsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsOptionsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsOptionsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsOptionsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsOptionsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsOptionsRequest) Clone() (Dhcpv6ClientOptionsOptionsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsOptionsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ClientOptionsOptionsRequest) setNil() { + obj.customHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ClientOptionsOptionsRequest is description is TBD +type Dhcpv6ClientOptionsOptionsRequest interface { + Validation + // msg marshals Dhcpv6ClientOptionsOptionsRequest to protobuf object *otg.Dhcpv6ClientOptionsOptionsRequest + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsOptionsRequest + // setMsg unmarshals Dhcpv6ClientOptionsOptionsRequest from protobuf object *otg.Dhcpv6ClientOptionsOptionsRequest + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsOptionsRequest) Dhcpv6ClientOptionsOptionsRequest + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsOptionsRequest + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsOptionsRequest + // validate validates Dhcpv6ClientOptionsOptionsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsOptionsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns Dhcpv6ClientOptionsOptionsRequestChoiceEnum, set in Dhcpv6ClientOptionsOptionsRequest + Choice() Dhcpv6ClientOptionsOptionsRequestChoiceEnum + // setChoice assigns Dhcpv6ClientOptionsOptionsRequestChoiceEnum provided by user to Dhcpv6ClientOptionsOptionsRequest + setChoice(value Dhcpv6ClientOptionsOptionsRequestChoiceEnum) Dhcpv6ClientOptionsOptionsRequest + // HasChoice checks if Choice has been set in Dhcpv6ClientOptionsOptionsRequest + HasChoice() bool + // getter for Sztp to set choice. + Sztp() + // getter for NameServers to set choice. + NameServers() + // getter for Fqdn to set choice. + Fqdn() + // getter for BootfileUrl to set choice. + BootfileUrl() + // getter for VendorInformation to set choice. + VendorInformation() + // Custom returns Dhcpv6ClientOptionsCustom, set in Dhcpv6ClientOptionsOptionsRequest. + // Dhcpv6ClientOptionsCustom is the Custom option is used to provide a not so well known option in the message between a client and a server. + Custom() Dhcpv6ClientOptionsCustom + // SetCustom assigns Dhcpv6ClientOptionsCustom provided by user to Dhcpv6ClientOptionsOptionsRequest. + // Dhcpv6ClientOptionsCustom is the Custom option is used to provide a not so well known option in the message between a client and a server. + SetCustom(value Dhcpv6ClientOptionsCustom) Dhcpv6ClientOptionsOptionsRequest + // HasCustom checks if Custom has been set in Dhcpv6ClientOptionsOptionsRequest + HasCustom() bool + setNil() +} + +type Dhcpv6ClientOptionsOptionsRequestChoiceEnum string + +// Enum of Choice on Dhcpv6ClientOptionsOptionsRequest +var Dhcpv6ClientOptionsOptionsRequestChoice = struct { + VENDOR_INFORMATION Dhcpv6ClientOptionsOptionsRequestChoiceEnum + NAME_SERVERS Dhcpv6ClientOptionsOptionsRequestChoiceEnum + FQDN Dhcpv6ClientOptionsOptionsRequestChoiceEnum + BOOTFILE_URL Dhcpv6ClientOptionsOptionsRequestChoiceEnum + SZTP Dhcpv6ClientOptionsOptionsRequestChoiceEnum + CUSTOM Dhcpv6ClientOptionsOptionsRequestChoiceEnum +}{ + VENDOR_INFORMATION: Dhcpv6ClientOptionsOptionsRequestChoiceEnum("vendor_information"), + NAME_SERVERS: Dhcpv6ClientOptionsOptionsRequestChoiceEnum("name_servers"), + FQDN: Dhcpv6ClientOptionsOptionsRequestChoiceEnum("fqdn"), + BOOTFILE_URL: Dhcpv6ClientOptionsOptionsRequestChoiceEnum("bootfile_url"), + SZTP: Dhcpv6ClientOptionsOptionsRequestChoiceEnum("sztp"), + CUSTOM: Dhcpv6ClientOptionsOptionsRequestChoiceEnum("custom"), +} + +func (obj *dhcpv6ClientOptionsOptionsRequest) Choice() Dhcpv6ClientOptionsOptionsRequestChoiceEnum { + return Dhcpv6ClientOptionsOptionsRequestChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for Sztp to set choice +func (obj *dhcpv6ClientOptionsOptionsRequest) Sztp() { + obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.SZTP) +} + +// getter for NameServers to set choice +func (obj *dhcpv6ClientOptionsOptionsRequest) NameServers() { + obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.NAME_SERVERS) +} + +// getter for Fqdn to set choice +func (obj *dhcpv6ClientOptionsOptionsRequest) Fqdn() { + obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.FQDN) +} + +// getter for BootfileUrl to set choice +func (obj *dhcpv6ClientOptionsOptionsRequest) BootfileUrl() { + obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.BOOTFILE_URL) +} + +// getter for VendorInformation to set choice +func (obj *dhcpv6ClientOptionsOptionsRequest) VendorInformation() { + obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.VENDOR_INFORMATION) +} + +// The Option Request option is used to identify a list of options in a message between a client and a server. The option code is 6. - Vendor_specific information option, requested by clients for vendor-specific informations from servers. - DNS Recursive Name Server Option, requested by clients to get the list ofIPv6 addresses of DNS recursive name +// servers to which DNS queries may be sent by the client resolver in order of preference. +// - Client FQDN option - indicates whether the client or the DHCP server should update DNS with the AAAA record +// corresponding to the assigned IPv6 address and the FQDN provided in this option. The DHCP server always updates +// the PTR record. +// - bootfile_url, if client is configured for network booting then the client must use this option to obtain the boot +// file url from the server. +// - sztp. Securely provision a networking device when it is booting in a factory-default state. +// Choice returns a string +func (obj *dhcpv6ClientOptionsOptionsRequest) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *dhcpv6ClientOptionsOptionsRequest) setChoice(value Dhcpv6ClientOptionsOptionsRequestChoiceEnum) Dhcpv6ClientOptionsOptionsRequest { + intValue, ok := otg.Dhcpv6ClientOptionsOptionsRequest_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Dhcpv6ClientOptionsOptionsRequestChoiceEnum", string(value))) + return obj + } + enumValue := otg.Dhcpv6ClientOptionsOptionsRequest_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.customHolder = nil + + if value == Dhcpv6ClientOptionsOptionsRequestChoice.CUSTOM { + obj.obj.Custom = NewDhcpv6ClientOptionsCustom().msg() + } + + return obj +} + +// description is TBD +// Custom returns a Dhcpv6ClientOptionsCustom +func (obj *dhcpv6ClientOptionsOptionsRequest) Custom() Dhcpv6ClientOptionsCustom { + if obj.obj.Custom == nil { + obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.CUSTOM) + } + if obj.customHolder == nil { + obj.customHolder = &dhcpv6ClientOptionsCustom{obj: obj.obj.Custom} + } + return obj.customHolder +} + +// description is TBD +// Custom returns a Dhcpv6ClientOptionsCustom +func (obj *dhcpv6ClientOptionsOptionsRequest) HasCustom() bool { + return obj.obj.Custom != nil +} + +// description is TBD +// SetCustom sets the Dhcpv6ClientOptionsCustom value in the Dhcpv6ClientOptionsOptionsRequest object +func (obj *dhcpv6ClientOptionsOptionsRequest) SetCustom(value Dhcpv6ClientOptionsCustom) Dhcpv6ClientOptionsOptionsRequest { + obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.CUSTOM) + obj.customHolder = nil + obj.obj.Custom = value.msg() + + return obj +} + +func (obj *dhcpv6ClientOptionsOptionsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Custom != nil { + + obj.Custom().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpv6ClientOptionsOptionsRequest) setDefault() { + var choices_set int = 0 + var choice Dhcpv6ClientOptionsOptionsRequestChoiceEnum + + if obj.obj.Custom != nil { + choices_set += 1 + choice = Dhcpv6ClientOptionsOptionsRequestChoice.CUSTOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Dhcpv6ClientOptionsOptionsRequestChoice.VENDOR_INFORMATION) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Dhcpv6ClientOptionsOptionsRequest") + } + } else { + intVal := otg.Dhcpv6ClientOptionsOptionsRequest_Choice_Enum_value[string(choice)] + enumValue := otg.Dhcpv6ClientOptionsOptionsRequest_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/dhcpv6_client_options_server_identifier.go b/gosnappi/dhcpv6_client_options_server_identifier.go new file mode 100644 index 00000000..c7ab14ac --- /dev/null +++ b/gosnappi/dhcpv6_client_options_server_identifier.go @@ -0,0 +1,564 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsServerIdentifier ***** +type dhcpv6ClientOptionsServerIdentifier struct { + validation + obj *otg.Dhcpv6ClientOptionsServerIdentifier + marshaller marshalDhcpv6ClientOptionsServerIdentifier + unMarshaller unMarshalDhcpv6ClientOptionsServerIdentifier + duidLltHolder Dhcpv6ClientOptionsDuidLlt + duidEnHolder Dhcpv6ClientOptionsDuidEn + duidLlHolder Dhcpv6ClientOptionsDuidLl + duidUuidHolder Dhcpv6ClientOptionsDuidUuid +} + +func NewDhcpv6ClientOptionsServerIdentifier() Dhcpv6ClientOptionsServerIdentifier { + obj := dhcpv6ClientOptionsServerIdentifier{obj: &otg.Dhcpv6ClientOptionsServerIdentifier{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsServerIdentifier) msg() *otg.Dhcpv6ClientOptionsServerIdentifier { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsServerIdentifier) setMsg(msg *otg.Dhcpv6ClientOptionsServerIdentifier) Dhcpv6ClientOptionsServerIdentifier { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsServerIdentifier struct { + obj *dhcpv6ClientOptionsServerIdentifier +} + +type marshalDhcpv6ClientOptionsServerIdentifier interface { + // ToProto marshals Dhcpv6ClientOptionsServerIdentifier to protobuf object *otg.Dhcpv6ClientOptionsServerIdentifier + ToProto() (*otg.Dhcpv6ClientOptionsServerIdentifier, error) + // ToPbText marshals Dhcpv6ClientOptionsServerIdentifier to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsServerIdentifier to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsServerIdentifier to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsServerIdentifier struct { + obj *dhcpv6ClientOptionsServerIdentifier +} + +type unMarshalDhcpv6ClientOptionsServerIdentifier interface { + // FromProto unmarshals Dhcpv6ClientOptionsServerIdentifier from protobuf object *otg.Dhcpv6ClientOptionsServerIdentifier + FromProto(msg *otg.Dhcpv6ClientOptionsServerIdentifier) (Dhcpv6ClientOptionsServerIdentifier, error) + // FromPbText unmarshals Dhcpv6ClientOptionsServerIdentifier from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsServerIdentifier from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsServerIdentifier from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsServerIdentifier) Marshal() marshalDhcpv6ClientOptionsServerIdentifier { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsServerIdentifier{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsServerIdentifier) Unmarshal() unMarshalDhcpv6ClientOptionsServerIdentifier { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsServerIdentifier{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsServerIdentifier) ToProto() (*otg.Dhcpv6ClientOptionsServerIdentifier, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsServerIdentifier) FromProto(msg *otg.Dhcpv6ClientOptionsServerIdentifier) (Dhcpv6ClientOptionsServerIdentifier, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsServerIdentifier) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsServerIdentifier) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsServerIdentifier) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsServerIdentifier) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsServerIdentifier) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsServerIdentifier) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsServerIdentifier) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsServerIdentifier) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsServerIdentifier) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsServerIdentifier) Clone() (Dhcpv6ClientOptionsServerIdentifier, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsServerIdentifier() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ClientOptionsServerIdentifier) setNil() { + obj.duidLltHolder = nil + obj.duidEnHolder = nil + obj.duidLlHolder = nil + obj.duidUuidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ClientOptionsServerIdentifier is description is TBD +type Dhcpv6ClientOptionsServerIdentifier interface { + Validation + // msg marshals Dhcpv6ClientOptionsServerIdentifier to protobuf object *otg.Dhcpv6ClientOptionsServerIdentifier + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsServerIdentifier + // setMsg unmarshals Dhcpv6ClientOptionsServerIdentifier from protobuf object *otg.Dhcpv6ClientOptionsServerIdentifier + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsServerIdentifier) Dhcpv6ClientOptionsServerIdentifier + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsServerIdentifier + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsServerIdentifier + // validate validates Dhcpv6ClientOptionsServerIdentifier + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsServerIdentifier, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns Dhcpv6ClientOptionsServerIdentifierChoiceEnum, set in Dhcpv6ClientOptionsServerIdentifier + Choice() Dhcpv6ClientOptionsServerIdentifierChoiceEnum + // setChoice assigns Dhcpv6ClientOptionsServerIdentifierChoiceEnum provided by user to Dhcpv6ClientOptionsServerIdentifier + setChoice(value Dhcpv6ClientOptionsServerIdentifierChoiceEnum) Dhcpv6ClientOptionsServerIdentifier + // HasChoice checks if Choice has been set in Dhcpv6ClientOptionsServerIdentifier + HasChoice() bool + // DuidLlt returns Dhcpv6ClientOptionsDuidLlt, set in Dhcpv6ClientOptionsServerIdentifier. + // Dhcpv6ClientOptionsDuidLlt is dUID based on Link Layer address plus time. Hardware Type will be auto assigned to ethernet type. + DuidLlt() Dhcpv6ClientOptionsDuidLlt + // SetDuidLlt assigns Dhcpv6ClientOptionsDuidLlt provided by user to Dhcpv6ClientOptionsServerIdentifier. + // Dhcpv6ClientOptionsDuidLlt is dUID based on Link Layer address plus time. Hardware Type will be auto assigned to ethernet type. + SetDuidLlt(value Dhcpv6ClientOptionsDuidLlt) Dhcpv6ClientOptionsServerIdentifier + // HasDuidLlt checks if DuidLlt has been set in Dhcpv6ClientOptionsServerIdentifier + HasDuidLlt() bool + // DuidEn returns Dhcpv6ClientOptionsDuidEn, set in Dhcpv6ClientOptionsServerIdentifier. + // Dhcpv6ClientOptionsDuidEn is dUID assigned by vendor based on enterprise number. + DuidEn() Dhcpv6ClientOptionsDuidEn + // SetDuidEn assigns Dhcpv6ClientOptionsDuidEn provided by user to Dhcpv6ClientOptionsServerIdentifier. + // Dhcpv6ClientOptionsDuidEn is dUID assigned by vendor based on enterprise number. + SetDuidEn(value Dhcpv6ClientOptionsDuidEn) Dhcpv6ClientOptionsServerIdentifier + // HasDuidEn checks if DuidEn has been set in Dhcpv6ClientOptionsServerIdentifier + HasDuidEn() bool + // DuidLl returns Dhcpv6ClientOptionsDuidLl, set in Dhcpv6ClientOptionsServerIdentifier. + // Dhcpv6ClientOptionsDuidLl is dUID based on Link Layer address. Hardware Type will be auto assigned to ethernet type. + DuidLl() Dhcpv6ClientOptionsDuidLl + // SetDuidLl assigns Dhcpv6ClientOptionsDuidLl provided by user to Dhcpv6ClientOptionsServerIdentifier. + // Dhcpv6ClientOptionsDuidLl is dUID based on Link Layer address. Hardware Type will be auto assigned to ethernet type. + SetDuidLl(value Dhcpv6ClientOptionsDuidLl) Dhcpv6ClientOptionsServerIdentifier + // HasDuidLl checks if DuidLl has been set in Dhcpv6ClientOptionsServerIdentifier + HasDuidLl() bool + // DuidUuid returns Dhcpv6ClientOptionsDuidUuid, set in Dhcpv6ClientOptionsServerIdentifier. + // Dhcpv6ClientOptionsDuidUuid is dUID embedded a Universally Unique IDentifier (UUID). A UUID is an identifier that is unique across both space and time, with respect to the space of all UUIDs. + DuidUuid() Dhcpv6ClientOptionsDuidUuid + // SetDuidUuid assigns Dhcpv6ClientOptionsDuidUuid provided by user to Dhcpv6ClientOptionsServerIdentifier. + // Dhcpv6ClientOptionsDuidUuid is dUID embedded a Universally Unique IDentifier (UUID). A UUID is an identifier that is unique across both space and time, with respect to the space of all UUIDs. + SetDuidUuid(value Dhcpv6ClientOptionsDuidUuid) Dhcpv6ClientOptionsServerIdentifier + // HasDuidUuid checks if DuidUuid has been set in Dhcpv6ClientOptionsServerIdentifier + HasDuidUuid() bool + setNil() +} + +type Dhcpv6ClientOptionsServerIdentifierChoiceEnum string + +// Enum of Choice on Dhcpv6ClientOptionsServerIdentifier +var Dhcpv6ClientOptionsServerIdentifierChoice = struct { + DUID_LLT Dhcpv6ClientOptionsServerIdentifierChoiceEnum + DUID_EN Dhcpv6ClientOptionsServerIdentifierChoiceEnum + DUID_LL Dhcpv6ClientOptionsServerIdentifierChoiceEnum + DUID_UUID Dhcpv6ClientOptionsServerIdentifierChoiceEnum +}{ + DUID_LLT: Dhcpv6ClientOptionsServerIdentifierChoiceEnum("duid_llt"), + DUID_EN: Dhcpv6ClientOptionsServerIdentifierChoiceEnum("duid_en"), + DUID_LL: Dhcpv6ClientOptionsServerIdentifierChoiceEnum("duid_ll"), + DUID_UUID: Dhcpv6ClientOptionsServerIdentifierChoiceEnum("duid_uuid"), +} + +func (obj *dhcpv6ClientOptionsServerIdentifier) Choice() Dhcpv6ClientOptionsServerIdentifierChoiceEnum { + return Dhcpv6ClientOptionsServerIdentifierChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The Identifier option is used to carry a DUID. The option code is 2. The server identifier identifies a server. This option is used when client wants to contact a particular server. +// Choice returns a string +func (obj *dhcpv6ClientOptionsServerIdentifier) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *dhcpv6ClientOptionsServerIdentifier) setChoice(value Dhcpv6ClientOptionsServerIdentifierChoiceEnum) Dhcpv6ClientOptionsServerIdentifier { + intValue, ok := otg.Dhcpv6ClientOptionsServerIdentifier_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Dhcpv6ClientOptionsServerIdentifierChoiceEnum", string(value))) + return obj + } + enumValue := otg.Dhcpv6ClientOptionsServerIdentifier_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.DuidUuid = nil + obj.duidUuidHolder = nil + obj.obj.DuidLl = nil + obj.duidLlHolder = nil + obj.obj.DuidEn = nil + obj.duidEnHolder = nil + obj.obj.DuidLlt = nil + obj.duidLltHolder = nil + + if value == Dhcpv6ClientOptionsServerIdentifierChoice.DUID_LLT { + obj.obj.DuidLlt = NewDhcpv6ClientOptionsDuidLlt().msg() + } + + if value == Dhcpv6ClientOptionsServerIdentifierChoice.DUID_EN { + obj.obj.DuidEn = NewDhcpv6ClientOptionsDuidEn().msg() + } + + if value == Dhcpv6ClientOptionsServerIdentifierChoice.DUID_LL { + obj.obj.DuidLl = NewDhcpv6ClientOptionsDuidLl().msg() + } + + if value == Dhcpv6ClientOptionsServerIdentifierChoice.DUID_UUID { + obj.obj.DuidUuid = NewDhcpv6ClientOptionsDuidUuid().msg() + } + + return obj +} + +// description is TBD +// DuidLlt returns a Dhcpv6ClientOptionsDuidLlt +func (obj *dhcpv6ClientOptionsServerIdentifier) DuidLlt() Dhcpv6ClientOptionsDuidLlt { + if obj.obj.DuidLlt == nil { + obj.setChoice(Dhcpv6ClientOptionsServerIdentifierChoice.DUID_LLT) + } + if obj.duidLltHolder == nil { + obj.duidLltHolder = &dhcpv6ClientOptionsDuidLlt{obj: obj.obj.DuidLlt} + } + return obj.duidLltHolder +} + +// description is TBD +// DuidLlt returns a Dhcpv6ClientOptionsDuidLlt +func (obj *dhcpv6ClientOptionsServerIdentifier) HasDuidLlt() bool { + return obj.obj.DuidLlt != nil +} + +// description is TBD +// SetDuidLlt sets the Dhcpv6ClientOptionsDuidLlt value in the Dhcpv6ClientOptionsServerIdentifier object +func (obj *dhcpv6ClientOptionsServerIdentifier) SetDuidLlt(value Dhcpv6ClientOptionsDuidLlt) Dhcpv6ClientOptionsServerIdentifier { + obj.setChoice(Dhcpv6ClientOptionsServerIdentifierChoice.DUID_LLT) + obj.duidLltHolder = nil + obj.obj.DuidLlt = value.msg() + + return obj +} + +// description is TBD +// DuidEn returns a Dhcpv6ClientOptionsDuidEn +func (obj *dhcpv6ClientOptionsServerIdentifier) DuidEn() Dhcpv6ClientOptionsDuidEn { + if obj.obj.DuidEn == nil { + obj.setChoice(Dhcpv6ClientOptionsServerIdentifierChoice.DUID_EN) + } + if obj.duidEnHolder == nil { + obj.duidEnHolder = &dhcpv6ClientOptionsDuidEn{obj: obj.obj.DuidEn} + } + return obj.duidEnHolder +} + +// description is TBD +// DuidEn returns a Dhcpv6ClientOptionsDuidEn +func (obj *dhcpv6ClientOptionsServerIdentifier) HasDuidEn() bool { + return obj.obj.DuidEn != nil +} + +// description is TBD +// SetDuidEn sets the Dhcpv6ClientOptionsDuidEn value in the Dhcpv6ClientOptionsServerIdentifier object +func (obj *dhcpv6ClientOptionsServerIdentifier) SetDuidEn(value Dhcpv6ClientOptionsDuidEn) Dhcpv6ClientOptionsServerIdentifier { + obj.setChoice(Dhcpv6ClientOptionsServerIdentifierChoice.DUID_EN) + obj.duidEnHolder = nil + obj.obj.DuidEn = value.msg() + + return obj +} + +// description is TBD +// DuidLl returns a Dhcpv6ClientOptionsDuidLl +func (obj *dhcpv6ClientOptionsServerIdentifier) DuidLl() Dhcpv6ClientOptionsDuidLl { + if obj.obj.DuidLl == nil { + obj.setChoice(Dhcpv6ClientOptionsServerIdentifierChoice.DUID_LL) + } + if obj.duidLlHolder == nil { + obj.duidLlHolder = &dhcpv6ClientOptionsDuidLl{obj: obj.obj.DuidLl} + } + return obj.duidLlHolder +} + +// description is TBD +// DuidLl returns a Dhcpv6ClientOptionsDuidLl +func (obj *dhcpv6ClientOptionsServerIdentifier) HasDuidLl() bool { + return obj.obj.DuidLl != nil +} + +// description is TBD +// SetDuidLl sets the Dhcpv6ClientOptionsDuidLl value in the Dhcpv6ClientOptionsServerIdentifier object +func (obj *dhcpv6ClientOptionsServerIdentifier) SetDuidLl(value Dhcpv6ClientOptionsDuidLl) Dhcpv6ClientOptionsServerIdentifier { + obj.setChoice(Dhcpv6ClientOptionsServerIdentifierChoice.DUID_LL) + obj.duidLlHolder = nil + obj.obj.DuidLl = value.msg() + + return obj +} + +// description is TBD +// DuidUuid returns a Dhcpv6ClientOptionsDuidUuid +func (obj *dhcpv6ClientOptionsServerIdentifier) DuidUuid() Dhcpv6ClientOptionsDuidUuid { + if obj.obj.DuidUuid == nil { + obj.setChoice(Dhcpv6ClientOptionsServerIdentifierChoice.DUID_UUID) + } + if obj.duidUuidHolder == nil { + obj.duidUuidHolder = &dhcpv6ClientOptionsDuidUuid{obj: obj.obj.DuidUuid} + } + return obj.duidUuidHolder +} + +// description is TBD +// DuidUuid returns a Dhcpv6ClientOptionsDuidUuid +func (obj *dhcpv6ClientOptionsServerIdentifier) HasDuidUuid() bool { + return obj.obj.DuidUuid != nil +} + +// description is TBD +// SetDuidUuid sets the Dhcpv6ClientOptionsDuidUuid value in the Dhcpv6ClientOptionsServerIdentifier object +func (obj *dhcpv6ClientOptionsServerIdentifier) SetDuidUuid(value Dhcpv6ClientOptionsDuidUuid) Dhcpv6ClientOptionsServerIdentifier { + obj.setChoice(Dhcpv6ClientOptionsServerIdentifierChoice.DUID_UUID) + obj.duidUuidHolder = nil + obj.obj.DuidUuid = value.msg() + + return obj +} + +func (obj *dhcpv6ClientOptionsServerIdentifier) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.DuidLlt != nil { + + obj.DuidLlt().validateObj(vObj, set_default) + } + + if obj.obj.DuidEn != nil { + + obj.DuidEn().validateObj(vObj, set_default) + } + + if obj.obj.DuidLl != nil { + + obj.DuidLl().validateObj(vObj, set_default) + } + + if obj.obj.DuidUuid != nil { + + obj.DuidUuid().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpv6ClientOptionsServerIdentifier) setDefault() { + var choices_set int = 0 + var choice Dhcpv6ClientOptionsServerIdentifierChoiceEnum + + if obj.obj.DuidLlt != nil { + choices_set += 1 + choice = Dhcpv6ClientOptionsServerIdentifierChoice.DUID_LLT + } + + if obj.obj.DuidEn != nil { + choices_set += 1 + choice = Dhcpv6ClientOptionsServerIdentifierChoice.DUID_EN + } + + if obj.obj.DuidLl != nil { + choices_set += 1 + choice = Dhcpv6ClientOptionsServerIdentifierChoice.DUID_LL + } + + if obj.obj.DuidUuid != nil { + choices_set += 1 + choice = Dhcpv6ClientOptionsServerIdentifierChoice.DUID_UUID + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Dhcpv6ClientOptionsServerIdentifierChoice.DUID_LL) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Dhcpv6ClientOptionsServerIdentifier") + } + } else { + intVal := otg.Dhcpv6ClientOptionsServerIdentifier_Choice_Enum_value[string(choice)] + enumValue := otg.Dhcpv6ClientOptionsServerIdentifier_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/dhcpv6_client_options_vendor_class.go b/gosnappi/dhcpv6_client_options_vendor_class.go new file mode 100644 index 00000000..e31da122 --- /dev/null +++ b/gosnappi/dhcpv6_client_options_vendor_class.go @@ -0,0 +1,384 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsVendorClass ***** +type dhcpv6ClientOptionsVendorClass struct { + validation + obj *otg.Dhcpv6ClientOptionsVendorClass + marshaller marshalDhcpv6ClientOptionsVendorClass + unMarshaller unMarshalDhcpv6ClientOptionsVendorClass + associatedDhcpMessagesHolder Dhcpv6ClientOptionsIncludedMessages +} + +func NewDhcpv6ClientOptionsVendorClass() Dhcpv6ClientOptionsVendorClass { + obj := dhcpv6ClientOptionsVendorClass{obj: &otg.Dhcpv6ClientOptionsVendorClass{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsVendorClass) msg() *otg.Dhcpv6ClientOptionsVendorClass { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsVendorClass) setMsg(msg *otg.Dhcpv6ClientOptionsVendorClass) Dhcpv6ClientOptionsVendorClass { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsVendorClass struct { + obj *dhcpv6ClientOptionsVendorClass +} + +type marshalDhcpv6ClientOptionsVendorClass interface { + // ToProto marshals Dhcpv6ClientOptionsVendorClass to protobuf object *otg.Dhcpv6ClientOptionsVendorClass + ToProto() (*otg.Dhcpv6ClientOptionsVendorClass, error) + // ToPbText marshals Dhcpv6ClientOptionsVendorClass to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsVendorClass to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsVendorClass to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsVendorClass struct { + obj *dhcpv6ClientOptionsVendorClass +} + +type unMarshalDhcpv6ClientOptionsVendorClass interface { + // FromProto unmarshals Dhcpv6ClientOptionsVendorClass from protobuf object *otg.Dhcpv6ClientOptionsVendorClass + FromProto(msg *otg.Dhcpv6ClientOptionsVendorClass) (Dhcpv6ClientOptionsVendorClass, error) + // FromPbText unmarshals Dhcpv6ClientOptionsVendorClass from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsVendorClass from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsVendorClass from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsVendorClass) Marshal() marshalDhcpv6ClientOptionsVendorClass { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsVendorClass{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsVendorClass) Unmarshal() unMarshalDhcpv6ClientOptionsVendorClass { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsVendorClass{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsVendorClass) ToProto() (*otg.Dhcpv6ClientOptionsVendorClass, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsVendorClass) FromProto(msg *otg.Dhcpv6ClientOptionsVendorClass) (Dhcpv6ClientOptionsVendorClass, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsVendorClass) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsVendorClass) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsVendorClass) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsVendorClass) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsVendorClass) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsVendorClass) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsVendorClass) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsVendorClass) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsVendorClass) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsVendorClass) Clone() (Dhcpv6ClientOptionsVendorClass, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsVendorClass() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ClientOptionsVendorClass) setNil() { + obj.associatedDhcpMessagesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ClientOptionsVendorClass is this option is used by a client to identify the vendor that manufactured the hardware on which the client is running. The option code is 16. +type Dhcpv6ClientOptionsVendorClass interface { + Validation + // msg marshals Dhcpv6ClientOptionsVendorClass to protobuf object *otg.Dhcpv6ClientOptionsVendorClass + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsVendorClass + // setMsg unmarshals Dhcpv6ClientOptionsVendorClass from protobuf object *otg.Dhcpv6ClientOptionsVendorClass + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsVendorClass) Dhcpv6ClientOptionsVendorClass + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsVendorClass + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsVendorClass + // validate validates Dhcpv6ClientOptionsVendorClass + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsVendorClass, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EnterpriseNumber returns uint32, set in Dhcpv6ClientOptionsVendorClass. + EnterpriseNumber() uint32 + // SetEnterpriseNumber assigns uint32 provided by user to Dhcpv6ClientOptionsVendorClass + SetEnterpriseNumber(value uint32) Dhcpv6ClientOptionsVendorClass + // ClassData returns []string, set in Dhcpv6ClientOptionsVendorClass. + ClassData() []string + // SetClassData assigns []string provided by user to Dhcpv6ClientOptionsVendorClass + SetClassData(value []string) Dhcpv6ClientOptionsVendorClass + // AssociatedDhcpMessages returns Dhcpv6ClientOptionsIncludedMessages, set in Dhcpv6ClientOptionsVendorClass. + // Dhcpv6ClientOptionsIncludedMessages is the dhcpv6 client messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 client messages, else based on the selection in particular Dhcpv6 client messages the option will be included. + AssociatedDhcpMessages() Dhcpv6ClientOptionsIncludedMessages + // SetAssociatedDhcpMessages assigns Dhcpv6ClientOptionsIncludedMessages provided by user to Dhcpv6ClientOptionsVendorClass. + // Dhcpv6ClientOptionsIncludedMessages is the dhcpv6 client messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 client messages, else based on the selection in particular Dhcpv6 client messages the option will be included. + SetAssociatedDhcpMessages(value Dhcpv6ClientOptionsIncludedMessages) Dhcpv6ClientOptionsVendorClass + setNil() +} + +// The vendor's registered Enterprise Number as registered with IANA. +// EnterpriseNumber returns a uint32 +func (obj *dhcpv6ClientOptionsVendorClass) EnterpriseNumber() uint32 { + + return *obj.obj.EnterpriseNumber + +} + +// The vendor's registered Enterprise Number as registered with IANA. +// SetEnterpriseNumber sets the uint32 value in the Dhcpv6ClientOptionsVendorClass object +func (obj *dhcpv6ClientOptionsVendorClass) SetEnterpriseNumber(value uint32) Dhcpv6ClientOptionsVendorClass { + + obj.obj.EnterpriseNumber = &value + return obj +} + +// The opaque data representing the hardware configuration of the host on which the client is running. Examples of class data instances might include the version of the operating system the client is running or the amount of memory installed on the client. +// ClassData returns a []string +func (obj *dhcpv6ClientOptionsVendorClass) ClassData() []string { + if obj.obj.ClassData == nil { + obj.obj.ClassData = make([]string, 0) + } + return obj.obj.ClassData +} + +// The opaque data representing the hardware configuration of the host on which the client is running. Examples of class data instances might include the version of the operating system the client is running or the amount of memory installed on the client. +// SetClassData sets the []string value in the Dhcpv6ClientOptionsVendorClass object +func (obj *dhcpv6ClientOptionsVendorClass) SetClassData(value []string) Dhcpv6ClientOptionsVendorClass { + + if obj.obj.ClassData == nil { + obj.obj.ClassData = make([]string, 0) + } + obj.obj.ClassData = value + + return obj +} + +// The dhcpv6 client messages where this option is included. +// AssociatedDhcpMessages returns a Dhcpv6ClientOptionsIncludedMessages +func (obj *dhcpv6ClientOptionsVendorClass) AssociatedDhcpMessages() Dhcpv6ClientOptionsIncludedMessages { + if obj.obj.AssociatedDhcpMessages == nil { + obj.obj.AssociatedDhcpMessages = NewDhcpv6ClientOptionsIncludedMessages().msg() + } + if obj.associatedDhcpMessagesHolder == nil { + obj.associatedDhcpMessagesHolder = &dhcpv6ClientOptionsIncludedMessages{obj: obj.obj.AssociatedDhcpMessages} + } + return obj.associatedDhcpMessagesHolder +} + +// The dhcpv6 client messages where this option is included. +// SetAssociatedDhcpMessages sets the Dhcpv6ClientOptionsIncludedMessages value in the Dhcpv6ClientOptionsVendorClass object +func (obj *dhcpv6ClientOptionsVendorClass) SetAssociatedDhcpMessages(value Dhcpv6ClientOptionsIncludedMessages) Dhcpv6ClientOptionsVendorClass { + + obj.associatedDhcpMessagesHolder = nil + obj.obj.AssociatedDhcpMessages = value.msg() + + return obj +} + +func (obj *dhcpv6ClientOptionsVendorClass) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // EnterpriseNumber is required + if obj.obj.EnterpriseNumber == nil { + vObj.validationErrors = append(vObj.validationErrors, "EnterpriseNumber is required field on interface Dhcpv6ClientOptionsVendorClass") + } + if obj.obj.EnterpriseNumber != nil { + + if *obj.obj.EnterpriseNumber > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv6ClientOptionsVendorClass.EnterpriseNumber <= 4294967295 but Got %d", *obj.obj.EnterpriseNumber)) + } + + } + + // AssociatedDhcpMessages is required + if obj.obj.AssociatedDhcpMessages == nil { + vObj.validationErrors = append(vObj.validationErrors, "AssociatedDhcpMessages is required field on interface Dhcpv6ClientOptionsVendorClass") + } + + if obj.obj.AssociatedDhcpMessages != nil { + + obj.AssociatedDhcpMessages().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpv6ClientOptionsVendorClass) setDefault() { + +} diff --git a/gosnappi/dhcpv6_client_options_vendor_info.go b/gosnappi/dhcpv6_client_options_vendor_info.go new file mode 100644 index 00000000..9fb0edf7 --- /dev/null +++ b/gosnappi/dhcpv6_client_options_vendor_info.go @@ -0,0 +1,464 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ClientOptionsVendorInfo ***** +type dhcpv6ClientOptionsVendorInfo struct { + validation + obj *otg.Dhcpv6ClientOptionsVendorInfo + marshaller marshalDhcpv6ClientOptionsVendorInfo + unMarshaller unMarshalDhcpv6ClientOptionsVendorInfo + optionDataHolder Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter + associatedDhcpMessagesHolder Dhcpv6ClientOptionsIncludedMessages +} + +func NewDhcpv6ClientOptionsVendorInfo() Dhcpv6ClientOptionsVendorInfo { + obj := dhcpv6ClientOptionsVendorInfo{obj: &otg.Dhcpv6ClientOptionsVendorInfo{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ClientOptionsVendorInfo) msg() *otg.Dhcpv6ClientOptionsVendorInfo { + return obj.obj +} + +func (obj *dhcpv6ClientOptionsVendorInfo) setMsg(msg *otg.Dhcpv6ClientOptionsVendorInfo) Dhcpv6ClientOptionsVendorInfo { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ClientOptionsVendorInfo struct { + obj *dhcpv6ClientOptionsVendorInfo +} + +type marshalDhcpv6ClientOptionsVendorInfo interface { + // ToProto marshals Dhcpv6ClientOptionsVendorInfo to protobuf object *otg.Dhcpv6ClientOptionsVendorInfo + ToProto() (*otg.Dhcpv6ClientOptionsVendorInfo, error) + // ToPbText marshals Dhcpv6ClientOptionsVendorInfo to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ClientOptionsVendorInfo to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ClientOptionsVendorInfo to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ClientOptionsVendorInfo struct { + obj *dhcpv6ClientOptionsVendorInfo +} + +type unMarshalDhcpv6ClientOptionsVendorInfo interface { + // FromProto unmarshals Dhcpv6ClientOptionsVendorInfo from protobuf object *otg.Dhcpv6ClientOptionsVendorInfo + FromProto(msg *otg.Dhcpv6ClientOptionsVendorInfo) (Dhcpv6ClientOptionsVendorInfo, error) + // FromPbText unmarshals Dhcpv6ClientOptionsVendorInfo from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ClientOptionsVendorInfo from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ClientOptionsVendorInfo from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ClientOptionsVendorInfo) Marshal() marshalDhcpv6ClientOptionsVendorInfo { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ClientOptionsVendorInfo{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ClientOptionsVendorInfo) Unmarshal() unMarshalDhcpv6ClientOptionsVendorInfo { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ClientOptionsVendorInfo{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ClientOptionsVendorInfo) ToProto() (*otg.Dhcpv6ClientOptionsVendorInfo, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ClientOptionsVendorInfo) FromProto(msg *otg.Dhcpv6ClientOptionsVendorInfo) (Dhcpv6ClientOptionsVendorInfo, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ClientOptionsVendorInfo) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ClientOptionsVendorInfo) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ClientOptionsVendorInfo) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsVendorInfo) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ClientOptionsVendorInfo) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ClientOptionsVendorInfo) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ClientOptionsVendorInfo) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsVendorInfo) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ClientOptionsVendorInfo) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ClientOptionsVendorInfo) Clone() (Dhcpv6ClientOptionsVendorInfo, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ClientOptionsVendorInfo() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ClientOptionsVendorInfo) setNil() { + obj.optionDataHolder = nil + obj.associatedDhcpMessagesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ClientOptionsVendorInfo is this option is used by clients to exchange vendor-specific information. The option code is 17. +type Dhcpv6ClientOptionsVendorInfo interface { + Validation + // msg marshals Dhcpv6ClientOptionsVendorInfo to protobuf object *otg.Dhcpv6ClientOptionsVendorInfo + // and doesn't set defaults + msg() *otg.Dhcpv6ClientOptionsVendorInfo + // setMsg unmarshals Dhcpv6ClientOptionsVendorInfo from protobuf object *otg.Dhcpv6ClientOptionsVendorInfo + // and doesn't set defaults + setMsg(*otg.Dhcpv6ClientOptionsVendorInfo) Dhcpv6ClientOptionsVendorInfo + // provides marshal interface + Marshal() marshalDhcpv6ClientOptionsVendorInfo + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ClientOptionsVendorInfo + // validate validates Dhcpv6ClientOptionsVendorInfo + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ClientOptionsVendorInfo, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EnterpriseNumber returns uint32, set in Dhcpv6ClientOptionsVendorInfo. + EnterpriseNumber() uint32 + // SetEnterpriseNumber assigns uint32 provided by user to Dhcpv6ClientOptionsVendorInfo + SetEnterpriseNumber(value uint32) Dhcpv6ClientOptionsVendorInfo + // OptionData returns Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIterIter, set in Dhcpv6ClientOptionsVendorInfo + OptionData() Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter + // AssociatedDhcpMessages returns Dhcpv6ClientOptionsIncludedMessages, set in Dhcpv6ClientOptionsVendorInfo. + // Dhcpv6ClientOptionsIncludedMessages is the dhcpv6 client messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 client messages, else based on the selection in particular Dhcpv6 client messages the option will be included. + AssociatedDhcpMessages() Dhcpv6ClientOptionsIncludedMessages + // SetAssociatedDhcpMessages assigns Dhcpv6ClientOptionsIncludedMessages provided by user to Dhcpv6ClientOptionsVendorInfo. + // Dhcpv6ClientOptionsIncludedMessages is the dhcpv6 client messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 client messages, else based on the selection in particular Dhcpv6 client messages the option will be included. + SetAssociatedDhcpMessages(value Dhcpv6ClientOptionsIncludedMessages) Dhcpv6ClientOptionsVendorInfo + setNil() +} + +// The vendor's registered Enterprise Number as registered with IANA. +// EnterpriseNumber returns a uint32 +func (obj *dhcpv6ClientOptionsVendorInfo) EnterpriseNumber() uint32 { + + return *obj.obj.EnterpriseNumber + +} + +// The vendor's registered Enterprise Number as registered with IANA. +// SetEnterpriseNumber sets the uint32 value in the Dhcpv6ClientOptionsVendorInfo object +func (obj *dhcpv6ClientOptionsVendorInfo) SetEnterpriseNumber(value uint32) Dhcpv6ClientOptionsVendorInfo { + + obj.obj.EnterpriseNumber = &value + return obj +} + +// An opaque object of octets,interpreted by vendor-specific code on the clients and servers. +// OptionData returns a []Dhcpv6OptionsVendorSpecificOptions +func (obj *dhcpv6ClientOptionsVendorInfo) OptionData() Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + if len(obj.obj.OptionData) == 0 { + obj.obj.OptionData = []*otg.Dhcpv6OptionsVendorSpecificOptions{} + } + if obj.optionDataHolder == nil { + obj.optionDataHolder = newDhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter(&obj.obj.OptionData).setMsg(obj) + } + return obj.optionDataHolder +} + +type dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter struct { + obj *dhcpv6ClientOptionsVendorInfo + dhcpv6OptionsVendorSpecificOptionsSlice []Dhcpv6OptionsVendorSpecificOptions + fieldPtr *[]*otg.Dhcpv6OptionsVendorSpecificOptions +} + +func newDhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter(ptr *[]*otg.Dhcpv6OptionsVendorSpecificOptions) Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + return &dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter{fieldPtr: ptr} +} + +type Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter interface { + setMsg(*dhcpv6ClientOptionsVendorInfo) Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter + Items() []Dhcpv6OptionsVendorSpecificOptions + Add() Dhcpv6OptionsVendorSpecificOptions + Append(items ...Dhcpv6OptionsVendorSpecificOptions) Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter + Set(index int, newObj Dhcpv6OptionsVendorSpecificOptions) Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter + Clear() Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter + clearHolderSlice() Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter + appendHolderSlice(item Dhcpv6OptionsVendorSpecificOptions) Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter +} + +func (obj *dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) setMsg(msg *dhcpv6ClientOptionsVendorInfo) Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv6OptionsVendorSpecificOptions{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) Items() []Dhcpv6OptionsVendorSpecificOptions { + return obj.dhcpv6OptionsVendorSpecificOptionsSlice +} + +func (obj *dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) Add() Dhcpv6OptionsVendorSpecificOptions { + newObj := &otg.Dhcpv6OptionsVendorSpecificOptions{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv6OptionsVendorSpecificOptions{obj: newObj} + newLibObj.setDefault() + obj.dhcpv6OptionsVendorSpecificOptionsSlice = append(obj.dhcpv6OptionsVendorSpecificOptionsSlice, newLibObj) + return newLibObj +} + +func (obj *dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) Append(items ...Dhcpv6OptionsVendorSpecificOptions) Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv6OptionsVendorSpecificOptionsSlice = append(obj.dhcpv6OptionsVendorSpecificOptionsSlice, item) + } + return obj +} + +func (obj *dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) Set(index int, newObj Dhcpv6OptionsVendorSpecificOptions) Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv6OptionsVendorSpecificOptionsSlice[index] = newObj + return obj +} +func (obj *dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) Clear() Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv6OptionsVendorSpecificOptions{} + obj.dhcpv6OptionsVendorSpecificOptionsSlice = []Dhcpv6OptionsVendorSpecificOptions{} + } + return obj +} +func (obj *dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) clearHolderSlice() Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + if len(obj.dhcpv6OptionsVendorSpecificOptionsSlice) > 0 { + obj.dhcpv6OptionsVendorSpecificOptionsSlice = []Dhcpv6OptionsVendorSpecificOptions{} + } + return obj +} +func (obj *dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) appendHolderSlice(item Dhcpv6OptionsVendorSpecificOptions) Dhcpv6ClientOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + obj.dhcpv6OptionsVendorSpecificOptionsSlice = append(obj.dhcpv6OptionsVendorSpecificOptionsSlice, item) + return obj +} + +// The list of dhcpv6 client messages where this option is included. +// AssociatedDhcpMessages returns a Dhcpv6ClientOptionsIncludedMessages +func (obj *dhcpv6ClientOptionsVendorInfo) AssociatedDhcpMessages() Dhcpv6ClientOptionsIncludedMessages { + if obj.obj.AssociatedDhcpMessages == nil { + obj.obj.AssociatedDhcpMessages = NewDhcpv6ClientOptionsIncludedMessages().msg() + } + if obj.associatedDhcpMessagesHolder == nil { + obj.associatedDhcpMessagesHolder = &dhcpv6ClientOptionsIncludedMessages{obj: obj.obj.AssociatedDhcpMessages} + } + return obj.associatedDhcpMessagesHolder +} + +// The list of dhcpv6 client messages where this option is included. +// SetAssociatedDhcpMessages sets the Dhcpv6ClientOptionsIncludedMessages value in the Dhcpv6ClientOptionsVendorInfo object +func (obj *dhcpv6ClientOptionsVendorInfo) SetAssociatedDhcpMessages(value Dhcpv6ClientOptionsIncludedMessages) Dhcpv6ClientOptionsVendorInfo { + + obj.associatedDhcpMessagesHolder = nil + obj.obj.AssociatedDhcpMessages = value.msg() + + return obj +} + +func (obj *dhcpv6ClientOptionsVendorInfo) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // EnterpriseNumber is required + if obj.obj.EnterpriseNumber == nil { + vObj.validationErrors = append(vObj.validationErrors, "EnterpriseNumber is required field on interface Dhcpv6ClientOptionsVendorInfo") + } + if obj.obj.EnterpriseNumber != nil { + + if *obj.obj.EnterpriseNumber > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv6ClientOptionsVendorInfo.EnterpriseNumber <= 4294967295 but Got %d", *obj.obj.EnterpriseNumber)) + } + + } + + if len(obj.obj.OptionData) != 0 { + + if set_default { + obj.OptionData().clearHolderSlice() + for _, item := range obj.obj.OptionData { + obj.OptionData().appendHolderSlice(&dhcpv6OptionsVendorSpecificOptions{obj: item}) + } + } + for _, item := range obj.OptionData().Items() { + item.validateObj(vObj, set_default) + } + + } + + // AssociatedDhcpMessages is required + if obj.obj.AssociatedDhcpMessages == nil { + vObj.validationErrors = append(vObj.validationErrors, "AssociatedDhcpMessages is required field on interface Dhcpv6ClientOptionsVendorInfo") + } + + if obj.obj.AssociatedDhcpMessages != nil { + + obj.AssociatedDhcpMessages().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpv6ClientOptionsVendorInfo) setDefault() { + +} diff --git a/gosnappi/dhcpv6_interface_ia.go b/gosnappi/dhcpv6_interface_ia.go new file mode 100644 index 00000000..1e58ddb6 --- /dev/null +++ b/gosnappi/dhcpv6_interface_ia.go @@ -0,0 +1,380 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6InterfaceIa ***** +type dhcpv6InterfaceIa struct { + validation + obj *otg.Dhcpv6InterfaceIa + marshaller marshalDhcpv6InterfaceIa + unMarshaller unMarshalDhcpv6InterfaceIa +} + +func NewDhcpv6InterfaceIa() Dhcpv6InterfaceIa { + obj := dhcpv6InterfaceIa{obj: &otg.Dhcpv6InterfaceIa{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6InterfaceIa) msg() *otg.Dhcpv6InterfaceIa { + return obj.obj +} + +func (obj *dhcpv6InterfaceIa) setMsg(msg *otg.Dhcpv6InterfaceIa) Dhcpv6InterfaceIa { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6InterfaceIa struct { + obj *dhcpv6InterfaceIa +} + +type marshalDhcpv6InterfaceIa interface { + // ToProto marshals Dhcpv6InterfaceIa to protobuf object *otg.Dhcpv6InterfaceIa + ToProto() (*otg.Dhcpv6InterfaceIa, error) + // ToPbText marshals Dhcpv6InterfaceIa to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6InterfaceIa to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6InterfaceIa to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6InterfaceIa struct { + obj *dhcpv6InterfaceIa +} + +type unMarshalDhcpv6InterfaceIa interface { + // FromProto unmarshals Dhcpv6InterfaceIa from protobuf object *otg.Dhcpv6InterfaceIa + FromProto(msg *otg.Dhcpv6InterfaceIa) (Dhcpv6InterfaceIa, error) + // FromPbText unmarshals Dhcpv6InterfaceIa from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6InterfaceIa from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6InterfaceIa from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6InterfaceIa) Marshal() marshalDhcpv6InterfaceIa { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6InterfaceIa{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6InterfaceIa) Unmarshal() unMarshalDhcpv6InterfaceIa { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6InterfaceIa{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6InterfaceIa) ToProto() (*otg.Dhcpv6InterfaceIa, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6InterfaceIa) FromProto(msg *otg.Dhcpv6InterfaceIa) (Dhcpv6InterfaceIa, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6InterfaceIa) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6InterfaceIa) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6InterfaceIa) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6InterfaceIa) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6InterfaceIa) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6InterfaceIa) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6InterfaceIa) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6InterfaceIa) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6InterfaceIa) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6InterfaceIa) Clone() (Dhcpv6InterfaceIa, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6InterfaceIa() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6InterfaceIa is the IPv6 IATA/IANA address and gateway associated with this DHCP Client session. +type Dhcpv6InterfaceIa interface { + Validation + // msg marshals Dhcpv6InterfaceIa to protobuf object *otg.Dhcpv6InterfaceIa + // and doesn't set defaults + msg() *otg.Dhcpv6InterfaceIa + // setMsg unmarshals Dhcpv6InterfaceIa from protobuf object *otg.Dhcpv6InterfaceIa + // and doesn't set defaults + setMsg(*otg.Dhcpv6InterfaceIa) Dhcpv6InterfaceIa + // provides marshal interface + Marshal() marshalDhcpv6InterfaceIa + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6InterfaceIa + // validate validates Dhcpv6InterfaceIa + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6InterfaceIa, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Address returns string, set in Dhcpv6InterfaceIa. + Address() string + // SetAddress assigns string provided by user to Dhcpv6InterfaceIa + SetAddress(value string) Dhcpv6InterfaceIa + // HasAddress checks if Address has been set in Dhcpv6InterfaceIa + HasAddress() bool + // Gateway returns string, set in Dhcpv6InterfaceIa. + Gateway() string + // SetGateway assigns string provided by user to Dhcpv6InterfaceIa + SetGateway(value string) Dhcpv6InterfaceIa + // HasGateway checks if Gateway has been set in Dhcpv6InterfaceIa + HasGateway() bool + // LeaseTime returns uint32, set in Dhcpv6InterfaceIa. + LeaseTime() uint32 + // SetLeaseTime assigns uint32 provided by user to Dhcpv6InterfaceIa + SetLeaseTime(value uint32) Dhcpv6InterfaceIa + // HasLeaseTime checks if LeaseTime has been set in Dhcpv6InterfaceIa + HasLeaseTime() bool +} + +// The address associated with this DHCPv6 Client session. +// Address returns a string +func (obj *dhcpv6InterfaceIa) Address() string { + + return *obj.obj.Address + +} + +// The address associated with this DHCPv6 Client session. +// Address returns a string +func (obj *dhcpv6InterfaceIa) HasAddress() bool { + return obj.obj.Address != nil +} + +// The address associated with this DHCPv6 Client session. +// SetAddress sets the string value in the Dhcpv6InterfaceIa object +func (obj *dhcpv6InterfaceIa) SetAddress(value string) Dhcpv6InterfaceIa { + + obj.obj.Address = &value + return obj +} + +// The Gateway address associated with this DHCPv6 Client session. +// Gateway returns a string +func (obj *dhcpv6InterfaceIa) Gateway() string { + + return *obj.obj.Gateway + +} + +// The Gateway address associated with this DHCPv6 Client session. +// Gateway returns a string +func (obj *dhcpv6InterfaceIa) HasGateway() bool { + return obj.obj.Gateway != nil +} + +// The Gateway address associated with this DHCPv6 Client session. +// SetGateway sets the string value in the Dhcpv6InterfaceIa object +func (obj *dhcpv6InterfaceIa) SetGateway(value string) Dhcpv6InterfaceIa { + + obj.obj.Gateway = &value + return obj +} + +// The duration of the IPv6 address lease, in seconds. +// LeaseTime returns a uint32 +func (obj *dhcpv6InterfaceIa) LeaseTime() uint32 { + + return *obj.obj.LeaseTime + +} + +// The duration of the IPv6 address lease, in seconds. +// LeaseTime returns a uint32 +func (obj *dhcpv6InterfaceIa) HasLeaseTime() bool { + return obj.obj.LeaseTime != nil +} + +// The duration of the IPv6 address lease, in seconds. +// SetLeaseTime sets the uint32 value in the Dhcpv6InterfaceIa object +func (obj *dhcpv6InterfaceIa) SetLeaseTime(value uint32) Dhcpv6InterfaceIa { + + obj.obj.LeaseTime = &value + return obj +} + +func (obj *dhcpv6InterfaceIa) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Address != nil { + + err := obj.validateIpv6(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Dhcpv6InterfaceIa.Address")) + } + + } + + if obj.obj.Gateway != nil { + + err := obj.validateIpv6(obj.Gateway()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Dhcpv6InterfaceIa.Gateway")) + } + + } + +} + +func (obj *dhcpv6InterfaceIa) setDefault() { + +} diff --git a/gosnappi/dhcpv6_interface_iapd.go b/gosnappi/dhcpv6_interface_iapd.go new file mode 100644 index 00000000..0f6db1a3 --- /dev/null +++ b/gosnappi/dhcpv6_interface_iapd.go @@ -0,0 +1,381 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6InterfaceIapd ***** +type dhcpv6InterfaceIapd struct { + validation + obj *otg.Dhcpv6InterfaceIapd + marshaller marshalDhcpv6InterfaceIapd + unMarshaller unMarshalDhcpv6InterfaceIapd +} + +func NewDhcpv6InterfaceIapd() Dhcpv6InterfaceIapd { + obj := dhcpv6InterfaceIapd{obj: &otg.Dhcpv6InterfaceIapd{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6InterfaceIapd) msg() *otg.Dhcpv6InterfaceIapd { + return obj.obj +} + +func (obj *dhcpv6InterfaceIapd) setMsg(msg *otg.Dhcpv6InterfaceIapd) Dhcpv6InterfaceIapd { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6InterfaceIapd struct { + obj *dhcpv6InterfaceIapd +} + +type marshalDhcpv6InterfaceIapd interface { + // ToProto marshals Dhcpv6InterfaceIapd to protobuf object *otg.Dhcpv6InterfaceIapd + ToProto() (*otg.Dhcpv6InterfaceIapd, error) + // ToPbText marshals Dhcpv6InterfaceIapd to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6InterfaceIapd to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6InterfaceIapd to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6InterfaceIapd struct { + obj *dhcpv6InterfaceIapd +} + +type unMarshalDhcpv6InterfaceIapd interface { + // FromProto unmarshals Dhcpv6InterfaceIapd from protobuf object *otg.Dhcpv6InterfaceIapd + FromProto(msg *otg.Dhcpv6InterfaceIapd) (Dhcpv6InterfaceIapd, error) + // FromPbText unmarshals Dhcpv6InterfaceIapd from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6InterfaceIapd from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6InterfaceIapd from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6InterfaceIapd) Marshal() marshalDhcpv6InterfaceIapd { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6InterfaceIapd{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6InterfaceIapd) Unmarshal() unMarshalDhcpv6InterfaceIapd { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6InterfaceIapd{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6InterfaceIapd) ToProto() (*otg.Dhcpv6InterfaceIapd, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6InterfaceIapd) FromProto(msg *otg.Dhcpv6InterfaceIapd) (Dhcpv6InterfaceIapd, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6InterfaceIapd) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6InterfaceIapd) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6InterfaceIapd) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6InterfaceIapd) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6InterfaceIapd) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6InterfaceIapd) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6InterfaceIapd) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6InterfaceIapd) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6InterfaceIapd) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6InterfaceIapd) Clone() (Dhcpv6InterfaceIapd, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6InterfaceIapd() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6InterfaceIapd is the IPv6 IAPD address and prefix length associated with this DHCP Client session. +type Dhcpv6InterfaceIapd interface { + Validation + // msg marshals Dhcpv6InterfaceIapd to protobuf object *otg.Dhcpv6InterfaceIapd + // and doesn't set defaults + msg() *otg.Dhcpv6InterfaceIapd + // setMsg unmarshals Dhcpv6InterfaceIapd from protobuf object *otg.Dhcpv6InterfaceIapd + // and doesn't set defaults + setMsg(*otg.Dhcpv6InterfaceIapd) Dhcpv6InterfaceIapd + // provides marshal interface + Marshal() marshalDhcpv6InterfaceIapd + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6InterfaceIapd + // validate validates Dhcpv6InterfaceIapd + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6InterfaceIapd, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Address returns string, set in Dhcpv6InterfaceIapd. + Address() string + // SetAddress assigns string provided by user to Dhcpv6InterfaceIapd + SetAddress(value string) Dhcpv6InterfaceIapd + // HasAddress checks if Address has been set in Dhcpv6InterfaceIapd + HasAddress() bool + // PrefixLength returns uint32, set in Dhcpv6InterfaceIapd. + PrefixLength() uint32 + // SetPrefixLength assigns uint32 provided by user to Dhcpv6InterfaceIapd + SetPrefixLength(value uint32) Dhcpv6InterfaceIapd + // HasPrefixLength checks if PrefixLength has been set in Dhcpv6InterfaceIapd + HasPrefixLength() bool + // LeaseTime returns uint32, set in Dhcpv6InterfaceIapd. + LeaseTime() uint32 + // SetLeaseTime assigns uint32 provided by user to Dhcpv6InterfaceIapd + SetLeaseTime(value uint32) Dhcpv6InterfaceIapd + // HasLeaseTime checks if LeaseTime has been set in Dhcpv6InterfaceIapd + HasLeaseTime() bool +} + +// The IAPD address associated with this DHCPv6 Client session. +// Address returns a string +func (obj *dhcpv6InterfaceIapd) Address() string { + + return *obj.obj.Address + +} + +// The IAPD address associated with this DHCPv6 Client session. +// Address returns a string +func (obj *dhcpv6InterfaceIapd) HasAddress() bool { + return obj.obj.Address != nil +} + +// The IAPD address associated with this DHCPv6 Client session. +// SetAddress sets the string value in the Dhcpv6InterfaceIapd object +func (obj *dhcpv6InterfaceIapd) SetAddress(value string) Dhcpv6InterfaceIapd { + + obj.obj.Address = &value + return obj +} + +// The prefix length of the IAPD address associated with this DHCPv6 Client session. +// PrefixLength returns a uint32 +func (obj *dhcpv6InterfaceIapd) PrefixLength() uint32 { + + return *obj.obj.PrefixLength + +} + +// The prefix length of the IAPD address associated with this DHCPv6 Client session. +// PrefixLength returns a uint32 +func (obj *dhcpv6InterfaceIapd) HasPrefixLength() bool { + return obj.obj.PrefixLength != nil +} + +// The prefix length of the IAPD address associated with this DHCPv6 Client session. +// SetPrefixLength sets the uint32 value in the Dhcpv6InterfaceIapd object +func (obj *dhcpv6InterfaceIapd) SetPrefixLength(value uint32) Dhcpv6InterfaceIapd { + + obj.obj.PrefixLength = &value + return obj +} + +// The duration of the IPv6 address lease, in seconds. +// LeaseTime returns a uint32 +func (obj *dhcpv6InterfaceIapd) LeaseTime() uint32 { + + return *obj.obj.LeaseTime + +} + +// The duration of the IPv6 address lease, in seconds. +// LeaseTime returns a uint32 +func (obj *dhcpv6InterfaceIapd) HasLeaseTime() bool { + return obj.obj.LeaseTime != nil +} + +// The duration of the IPv6 address lease, in seconds. +// SetLeaseTime sets the uint32 value in the Dhcpv6InterfaceIapd object +func (obj *dhcpv6InterfaceIapd) SetLeaseTime(value uint32) Dhcpv6InterfaceIapd { + + obj.obj.LeaseTime = &value + return obj +} + +func (obj *dhcpv6InterfaceIapd) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Address != nil { + + err := obj.validateIpv6(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Dhcpv6InterfaceIapd.Address")) + } + + } + + if obj.obj.PrefixLength != nil { + + if *obj.obj.PrefixLength > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv6InterfaceIapd.PrefixLength <= 128 but Got %d", *obj.obj.PrefixLength)) + } + + } + +} + +func (obj *dhcpv6InterfaceIapd) setDefault() { + +} diff --git a/gosnappi/dhcpv6_interface_state.go b/gosnappi/dhcpv6_interface_state.go new file mode 100644 index 00000000..21a70331 --- /dev/null +++ b/gosnappi/dhcpv6_interface_state.go @@ -0,0 +1,523 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6InterfaceState ***** +type dhcpv6InterfaceState struct { + validation + obj *otg.Dhcpv6InterfaceState + marshaller marshalDhcpv6InterfaceState + unMarshaller unMarshalDhcpv6InterfaceState + iapdAddressesHolder Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter + iaAddressesHolder Dhcpv6InterfaceStateDhcpv6InterfaceIaIter +} + +func NewDhcpv6InterfaceState() Dhcpv6InterfaceState { + obj := dhcpv6InterfaceState{obj: &otg.Dhcpv6InterfaceState{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6InterfaceState) msg() *otg.Dhcpv6InterfaceState { + return obj.obj +} + +func (obj *dhcpv6InterfaceState) setMsg(msg *otg.Dhcpv6InterfaceState) Dhcpv6InterfaceState { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6InterfaceState struct { + obj *dhcpv6InterfaceState +} + +type marshalDhcpv6InterfaceState interface { + // ToProto marshals Dhcpv6InterfaceState to protobuf object *otg.Dhcpv6InterfaceState + ToProto() (*otg.Dhcpv6InterfaceState, error) + // ToPbText marshals Dhcpv6InterfaceState to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6InterfaceState to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6InterfaceState to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6InterfaceState struct { + obj *dhcpv6InterfaceState +} + +type unMarshalDhcpv6InterfaceState interface { + // FromProto unmarshals Dhcpv6InterfaceState from protobuf object *otg.Dhcpv6InterfaceState + FromProto(msg *otg.Dhcpv6InterfaceState) (Dhcpv6InterfaceState, error) + // FromPbText unmarshals Dhcpv6InterfaceState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6InterfaceState from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6InterfaceState from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6InterfaceState) Marshal() marshalDhcpv6InterfaceState { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6InterfaceState{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6InterfaceState) Unmarshal() unMarshalDhcpv6InterfaceState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6InterfaceState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6InterfaceState) ToProto() (*otg.Dhcpv6InterfaceState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6InterfaceState) FromProto(msg *otg.Dhcpv6InterfaceState) (Dhcpv6InterfaceState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6InterfaceState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6InterfaceState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6InterfaceState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6InterfaceState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6InterfaceState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6InterfaceState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6InterfaceState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6InterfaceState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6InterfaceState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6InterfaceState) Clone() (Dhcpv6InterfaceState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6InterfaceState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6InterfaceState) setNil() { + obj.iapdAddressesHolder = nil + obj.iaAddressesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6InterfaceState is the IPv6 address associated with this DHCP Client session. +type Dhcpv6InterfaceState interface { + Validation + // msg marshals Dhcpv6InterfaceState to protobuf object *otg.Dhcpv6InterfaceState + // and doesn't set defaults + msg() *otg.Dhcpv6InterfaceState + // setMsg unmarshals Dhcpv6InterfaceState from protobuf object *otg.Dhcpv6InterfaceState + // and doesn't set defaults + setMsg(*otg.Dhcpv6InterfaceState) Dhcpv6InterfaceState + // provides marshal interface + Marshal() marshalDhcpv6InterfaceState + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6InterfaceState + // validate validates Dhcpv6InterfaceState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6InterfaceState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // DhcpClientName returns string, set in Dhcpv6InterfaceState. + DhcpClientName() string + // SetDhcpClientName assigns string provided by user to Dhcpv6InterfaceState + SetDhcpClientName(value string) Dhcpv6InterfaceState + // HasDhcpClientName checks if DhcpClientName has been set in Dhcpv6InterfaceState + HasDhcpClientName() bool + // IapdAddresses returns Dhcpv6InterfaceStateDhcpv6InterfaceIapdIterIter, set in Dhcpv6InterfaceState + IapdAddresses() Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter + // IaAddresses returns Dhcpv6InterfaceStateDhcpv6InterfaceIaIterIter, set in Dhcpv6InterfaceState + IaAddresses() Dhcpv6InterfaceStateDhcpv6InterfaceIaIter + setNil() +} + +// The name of a DHCPv6 Client. +// DhcpClientName returns a string +func (obj *dhcpv6InterfaceState) DhcpClientName() string { + + return *obj.obj.DhcpClientName + +} + +// The name of a DHCPv6 Client. +// DhcpClientName returns a string +func (obj *dhcpv6InterfaceState) HasDhcpClientName() bool { + return obj.obj.DhcpClientName != nil +} + +// The name of a DHCPv6 Client. +// SetDhcpClientName sets the string value in the Dhcpv6InterfaceState object +func (obj *dhcpv6InterfaceState) SetDhcpClientName(value string) Dhcpv6InterfaceState { + + obj.obj.DhcpClientName = &value + return obj +} + +// The IPv6 IAPD addresses and prefixes associated with this DHCP Client session. +// IapdAddresses returns a []Dhcpv6InterfaceIapd +func (obj *dhcpv6InterfaceState) IapdAddresses() Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter { + if len(obj.obj.IapdAddresses) == 0 { + obj.obj.IapdAddresses = []*otg.Dhcpv6InterfaceIapd{} + } + if obj.iapdAddressesHolder == nil { + obj.iapdAddressesHolder = newDhcpv6InterfaceStateDhcpv6InterfaceIapdIter(&obj.obj.IapdAddresses).setMsg(obj) + } + return obj.iapdAddressesHolder +} + +type dhcpv6InterfaceStateDhcpv6InterfaceIapdIter struct { + obj *dhcpv6InterfaceState + dhcpv6InterfaceIapdSlice []Dhcpv6InterfaceIapd + fieldPtr *[]*otg.Dhcpv6InterfaceIapd +} + +func newDhcpv6InterfaceStateDhcpv6InterfaceIapdIter(ptr *[]*otg.Dhcpv6InterfaceIapd) Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter { + return &dhcpv6InterfaceStateDhcpv6InterfaceIapdIter{fieldPtr: ptr} +} + +type Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter interface { + setMsg(*dhcpv6InterfaceState) Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter + Items() []Dhcpv6InterfaceIapd + Add() Dhcpv6InterfaceIapd + Append(items ...Dhcpv6InterfaceIapd) Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter + Set(index int, newObj Dhcpv6InterfaceIapd) Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter + Clear() Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter + clearHolderSlice() Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter + appendHolderSlice(item Dhcpv6InterfaceIapd) Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter +} + +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIapdIter) setMsg(msg *dhcpv6InterfaceState) Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv6InterfaceIapd{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIapdIter) Items() []Dhcpv6InterfaceIapd { + return obj.dhcpv6InterfaceIapdSlice +} + +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIapdIter) Add() Dhcpv6InterfaceIapd { + newObj := &otg.Dhcpv6InterfaceIapd{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv6InterfaceIapd{obj: newObj} + newLibObj.setDefault() + obj.dhcpv6InterfaceIapdSlice = append(obj.dhcpv6InterfaceIapdSlice, newLibObj) + return newLibObj +} + +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIapdIter) Append(items ...Dhcpv6InterfaceIapd) Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv6InterfaceIapdSlice = append(obj.dhcpv6InterfaceIapdSlice, item) + } + return obj +} + +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIapdIter) Set(index int, newObj Dhcpv6InterfaceIapd) Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv6InterfaceIapdSlice[index] = newObj + return obj +} +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIapdIter) Clear() Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv6InterfaceIapd{} + obj.dhcpv6InterfaceIapdSlice = []Dhcpv6InterfaceIapd{} + } + return obj +} +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIapdIter) clearHolderSlice() Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter { + if len(obj.dhcpv6InterfaceIapdSlice) > 0 { + obj.dhcpv6InterfaceIapdSlice = []Dhcpv6InterfaceIapd{} + } + return obj +} +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIapdIter) appendHolderSlice(item Dhcpv6InterfaceIapd) Dhcpv6InterfaceStateDhcpv6InterfaceIapdIter { + obj.dhcpv6InterfaceIapdSlice = append(obj.dhcpv6InterfaceIapdSlice, item) + return obj +} + +// The IPv6 IATA/IANA addresses and gateways associated with this DHCP Client session. +// IaAddresses returns a []Dhcpv6InterfaceIa +func (obj *dhcpv6InterfaceState) IaAddresses() Dhcpv6InterfaceStateDhcpv6InterfaceIaIter { + if len(obj.obj.IaAddresses) == 0 { + obj.obj.IaAddresses = []*otg.Dhcpv6InterfaceIa{} + } + if obj.iaAddressesHolder == nil { + obj.iaAddressesHolder = newDhcpv6InterfaceStateDhcpv6InterfaceIaIter(&obj.obj.IaAddresses).setMsg(obj) + } + return obj.iaAddressesHolder +} + +type dhcpv6InterfaceStateDhcpv6InterfaceIaIter struct { + obj *dhcpv6InterfaceState + dhcpv6InterfaceIaSlice []Dhcpv6InterfaceIa + fieldPtr *[]*otg.Dhcpv6InterfaceIa +} + +func newDhcpv6InterfaceStateDhcpv6InterfaceIaIter(ptr *[]*otg.Dhcpv6InterfaceIa) Dhcpv6InterfaceStateDhcpv6InterfaceIaIter { + return &dhcpv6InterfaceStateDhcpv6InterfaceIaIter{fieldPtr: ptr} +} + +type Dhcpv6InterfaceStateDhcpv6InterfaceIaIter interface { + setMsg(*dhcpv6InterfaceState) Dhcpv6InterfaceStateDhcpv6InterfaceIaIter + Items() []Dhcpv6InterfaceIa + Add() Dhcpv6InterfaceIa + Append(items ...Dhcpv6InterfaceIa) Dhcpv6InterfaceStateDhcpv6InterfaceIaIter + Set(index int, newObj Dhcpv6InterfaceIa) Dhcpv6InterfaceStateDhcpv6InterfaceIaIter + Clear() Dhcpv6InterfaceStateDhcpv6InterfaceIaIter + clearHolderSlice() Dhcpv6InterfaceStateDhcpv6InterfaceIaIter + appendHolderSlice(item Dhcpv6InterfaceIa) Dhcpv6InterfaceStateDhcpv6InterfaceIaIter +} + +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIaIter) setMsg(msg *dhcpv6InterfaceState) Dhcpv6InterfaceStateDhcpv6InterfaceIaIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv6InterfaceIa{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIaIter) Items() []Dhcpv6InterfaceIa { + return obj.dhcpv6InterfaceIaSlice +} + +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIaIter) Add() Dhcpv6InterfaceIa { + newObj := &otg.Dhcpv6InterfaceIa{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv6InterfaceIa{obj: newObj} + newLibObj.setDefault() + obj.dhcpv6InterfaceIaSlice = append(obj.dhcpv6InterfaceIaSlice, newLibObj) + return newLibObj +} + +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIaIter) Append(items ...Dhcpv6InterfaceIa) Dhcpv6InterfaceStateDhcpv6InterfaceIaIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv6InterfaceIaSlice = append(obj.dhcpv6InterfaceIaSlice, item) + } + return obj +} + +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIaIter) Set(index int, newObj Dhcpv6InterfaceIa) Dhcpv6InterfaceStateDhcpv6InterfaceIaIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv6InterfaceIaSlice[index] = newObj + return obj +} +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIaIter) Clear() Dhcpv6InterfaceStateDhcpv6InterfaceIaIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv6InterfaceIa{} + obj.dhcpv6InterfaceIaSlice = []Dhcpv6InterfaceIa{} + } + return obj +} +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIaIter) clearHolderSlice() Dhcpv6InterfaceStateDhcpv6InterfaceIaIter { + if len(obj.dhcpv6InterfaceIaSlice) > 0 { + obj.dhcpv6InterfaceIaSlice = []Dhcpv6InterfaceIa{} + } + return obj +} +func (obj *dhcpv6InterfaceStateDhcpv6InterfaceIaIter) appendHolderSlice(item Dhcpv6InterfaceIa) Dhcpv6InterfaceStateDhcpv6InterfaceIaIter { + obj.dhcpv6InterfaceIaSlice = append(obj.dhcpv6InterfaceIaSlice, item) + return obj +} + +func (obj *dhcpv6InterfaceState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.IapdAddresses) != 0 { + + if set_default { + obj.IapdAddresses().clearHolderSlice() + for _, item := range obj.obj.IapdAddresses { + obj.IapdAddresses().appendHolderSlice(&dhcpv6InterfaceIapd{obj: item}) + } + } + for _, item := range obj.IapdAddresses().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.IaAddresses) != 0 { + + if set_default { + obj.IaAddresses().clearHolderSlice() + for _, item := range obj.obj.IaAddresses { + obj.IaAddresses().appendHolderSlice(&dhcpv6InterfaceIa{obj: item}) + } + } + for _, item := range obj.IaAddresses().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *dhcpv6InterfaceState) setDefault() { + +} diff --git a/gosnappi/dhcpv6_interface_state_request.go b/gosnappi/dhcpv6_interface_state_request.go new file mode 100644 index 00000000..e6726e90 --- /dev/null +++ b/gosnappi/dhcpv6_interface_state_request.go @@ -0,0 +1,317 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6InterfaceStateRequest ***** +type dhcpv6InterfaceStateRequest struct { + validation + obj *otg.Dhcpv6InterfaceStateRequest + marshaller marshalDhcpv6InterfaceStateRequest + unMarshaller unMarshalDhcpv6InterfaceStateRequest +} + +func NewDhcpv6InterfaceStateRequest() Dhcpv6InterfaceStateRequest { + obj := dhcpv6InterfaceStateRequest{obj: &otg.Dhcpv6InterfaceStateRequest{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6InterfaceStateRequest) msg() *otg.Dhcpv6InterfaceStateRequest { + return obj.obj +} + +func (obj *dhcpv6InterfaceStateRequest) setMsg(msg *otg.Dhcpv6InterfaceStateRequest) Dhcpv6InterfaceStateRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6InterfaceStateRequest struct { + obj *dhcpv6InterfaceStateRequest +} + +type marshalDhcpv6InterfaceStateRequest interface { + // ToProto marshals Dhcpv6InterfaceStateRequest to protobuf object *otg.Dhcpv6InterfaceStateRequest + ToProto() (*otg.Dhcpv6InterfaceStateRequest, error) + // ToPbText marshals Dhcpv6InterfaceStateRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6InterfaceStateRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6InterfaceStateRequest to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6InterfaceStateRequest struct { + obj *dhcpv6InterfaceStateRequest +} + +type unMarshalDhcpv6InterfaceStateRequest interface { + // FromProto unmarshals Dhcpv6InterfaceStateRequest from protobuf object *otg.Dhcpv6InterfaceStateRequest + FromProto(msg *otg.Dhcpv6InterfaceStateRequest) (Dhcpv6InterfaceStateRequest, error) + // FromPbText unmarshals Dhcpv6InterfaceStateRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6InterfaceStateRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6InterfaceStateRequest from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6InterfaceStateRequest) Marshal() marshalDhcpv6InterfaceStateRequest { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6InterfaceStateRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6InterfaceStateRequest) Unmarshal() unMarshalDhcpv6InterfaceStateRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6InterfaceStateRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6InterfaceStateRequest) ToProto() (*otg.Dhcpv6InterfaceStateRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6InterfaceStateRequest) FromProto(msg *otg.Dhcpv6InterfaceStateRequest) (Dhcpv6InterfaceStateRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6InterfaceStateRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6InterfaceStateRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6InterfaceStateRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6InterfaceStateRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6InterfaceStateRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6InterfaceStateRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6InterfaceStateRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6InterfaceStateRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6InterfaceStateRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6InterfaceStateRequest) Clone() (Dhcpv6InterfaceStateRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6InterfaceStateRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6InterfaceStateRequest is the request for assigned IPv6 address information associated with DHCP Client sessions. +type Dhcpv6InterfaceStateRequest interface { + Validation + // msg marshals Dhcpv6InterfaceStateRequest to protobuf object *otg.Dhcpv6InterfaceStateRequest + // and doesn't set defaults + msg() *otg.Dhcpv6InterfaceStateRequest + // setMsg unmarshals Dhcpv6InterfaceStateRequest from protobuf object *otg.Dhcpv6InterfaceStateRequest + // and doesn't set defaults + setMsg(*otg.Dhcpv6InterfaceStateRequest) Dhcpv6InterfaceStateRequest + // provides marshal interface + Marshal() marshalDhcpv6InterfaceStateRequest + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6InterfaceStateRequest + // validate validates Dhcpv6InterfaceStateRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6InterfaceStateRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // DhcpClientNames returns []string, set in Dhcpv6InterfaceStateRequest. + DhcpClientNames() []string + // SetDhcpClientNames assigns []string provided by user to Dhcpv6InterfaceStateRequest + SetDhcpClientNames(value []string) Dhcpv6InterfaceStateRequest +} + +// The names of DHCPv6 client to return results for. An empty list will return results for all DHCPv6 Client address information. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// DhcpClientNames returns a []string +func (obj *dhcpv6InterfaceStateRequest) DhcpClientNames() []string { + if obj.obj.DhcpClientNames == nil { + obj.obj.DhcpClientNames = make([]string, 0) + } + return obj.obj.DhcpClientNames +} + +// The names of DHCPv6 client to return results for. An empty list will return results for all DHCPv6 Client address information. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// SetDhcpClientNames sets the []string value in the Dhcpv6InterfaceStateRequest object +func (obj *dhcpv6InterfaceStateRequest) SetDhcpClientNames(value []string) Dhcpv6InterfaceStateRequest { + + if obj.obj.DhcpClientNames == nil { + obj.obj.DhcpClientNames = make([]string, 0) + } + obj.obj.DhcpClientNames = value + + return obj +} + +func (obj *dhcpv6InterfaceStateRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv6InterfaceStateRequest) setDefault() { + +} diff --git a/gosnappi/dhcpv6_lease_state_request.go b/gosnappi/dhcpv6_lease_state_request.go new file mode 100644 index 00000000..f24f3caf --- /dev/null +++ b/gosnappi/dhcpv6_lease_state_request.go @@ -0,0 +1,317 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6LeaseStateRequest ***** +type dhcpv6LeaseStateRequest struct { + validation + obj *otg.Dhcpv6LeaseStateRequest + marshaller marshalDhcpv6LeaseStateRequest + unMarshaller unMarshalDhcpv6LeaseStateRequest +} + +func NewDhcpv6LeaseStateRequest() Dhcpv6LeaseStateRequest { + obj := dhcpv6LeaseStateRequest{obj: &otg.Dhcpv6LeaseStateRequest{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6LeaseStateRequest) msg() *otg.Dhcpv6LeaseStateRequest { + return obj.obj +} + +func (obj *dhcpv6LeaseStateRequest) setMsg(msg *otg.Dhcpv6LeaseStateRequest) Dhcpv6LeaseStateRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6LeaseStateRequest struct { + obj *dhcpv6LeaseStateRequest +} + +type marshalDhcpv6LeaseStateRequest interface { + // ToProto marshals Dhcpv6LeaseStateRequest to protobuf object *otg.Dhcpv6LeaseStateRequest + ToProto() (*otg.Dhcpv6LeaseStateRequest, error) + // ToPbText marshals Dhcpv6LeaseStateRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6LeaseStateRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6LeaseStateRequest to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6LeaseStateRequest struct { + obj *dhcpv6LeaseStateRequest +} + +type unMarshalDhcpv6LeaseStateRequest interface { + // FromProto unmarshals Dhcpv6LeaseStateRequest from protobuf object *otg.Dhcpv6LeaseStateRequest + FromProto(msg *otg.Dhcpv6LeaseStateRequest) (Dhcpv6LeaseStateRequest, error) + // FromPbText unmarshals Dhcpv6LeaseStateRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6LeaseStateRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6LeaseStateRequest from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6LeaseStateRequest) Marshal() marshalDhcpv6LeaseStateRequest { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6LeaseStateRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6LeaseStateRequest) Unmarshal() unMarshalDhcpv6LeaseStateRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6LeaseStateRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6LeaseStateRequest) ToProto() (*otg.Dhcpv6LeaseStateRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6LeaseStateRequest) FromProto(msg *otg.Dhcpv6LeaseStateRequest) (Dhcpv6LeaseStateRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6LeaseStateRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6LeaseStateRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6LeaseStateRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6LeaseStateRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6LeaseStateRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6LeaseStateRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6LeaseStateRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6LeaseStateRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6LeaseStateRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6LeaseStateRequest) Clone() (Dhcpv6LeaseStateRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6LeaseStateRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6LeaseStateRequest is the request to retrieve DHCP Server host allocated status. +type Dhcpv6LeaseStateRequest interface { + Validation + // msg marshals Dhcpv6LeaseStateRequest to protobuf object *otg.Dhcpv6LeaseStateRequest + // and doesn't set defaults + msg() *otg.Dhcpv6LeaseStateRequest + // setMsg unmarshals Dhcpv6LeaseStateRequest from protobuf object *otg.Dhcpv6LeaseStateRequest + // and doesn't set defaults + setMsg(*otg.Dhcpv6LeaseStateRequest) Dhcpv6LeaseStateRequest + // provides marshal interface + Marshal() marshalDhcpv6LeaseStateRequest + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6LeaseStateRequest + // validate validates Dhcpv6LeaseStateRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6LeaseStateRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // DhcpServerNames returns []string, set in Dhcpv6LeaseStateRequest. + DhcpServerNames() []string + // SetDhcpServerNames assigns []string provided by user to Dhcpv6LeaseStateRequest + SetDhcpServerNames(value []string) Dhcpv6LeaseStateRequest +} + +// The names of DHCPv6 server to return results for. An empty list will return results for all DHCPv6 servers. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6server/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6server/properties/name +// +// DhcpServerNames returns a []string +func (obj *dhcpv6LeaseStateRequest) DhcpServerNames() []string { + if obj.obj.DhcpServerNames == nil { + obj.obj.DhcpServerNames = make([]string, 0) + } + return obj.obj.DhcpServerNames +} + +// The names of DHCPv6 server to return results for. An empty list will return results for all DHCPv6 servers. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6server/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6server/properties/name +// +// SetDhcpServerNames sets the []string value in the Dhcpv6LeaseStateRequest object +func (obj *dhcpv6LeaseStateRequest) SetDhcpServerNames(value []string) Dhcpv6LeaseStateRequest { + + if obj.obj.DhcpServerNames == nil { + obj.obj.DhcpServerNames = make([]string, 0) + } + obj.obj.DhcpServerNames = value + + return obj +} + +func (obj *dhcpv6LeaseStateRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv6LeaseStateRequest) setDefault() { + +} diff --git a/gosnappi/dhcpv6_leases_state.go b/gosnappi/dhcpv6_leases_state.go new file mode 100644 index 00000000..b0b86cc1 --- /dev/null +++ b/gosnappi/dhcpv6_leases_state.go @@ -0,0 +1,418 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6LeasesState ***** +type dhcpv6LeasesState struct { + validation + obj *otg.Dhcpv6LeasesState + marshaller marshalDhcpv6LeasesState + unMarshaller unMarshalDhcpv6LeasesState + leasesHolder Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter +} + +func NewDhcpv6LeasesState() Dhcpv6LeasesState { + obj := dhcpv6LeasesState{obj: &otg.Dhcpv6LeasesState{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6LeasesState) msg() *otg.Dhcpv6LeasesState { + return obj.obj +} + +func (obj *dhcpv6LeasesState) setMsg(msg *otg.Dhcpv6LeasesState) Dhcpv6LeasesState { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6LeasesState struct { + obj *dhcpv6LeasesState +} + +type marshalDhcpv6LeasesState interface { + // ToProto marshals Dhcpv6LeasesState to protobuf object *otg.Dhcpv6LeasesState + ToProto() (*otg.Dhcpv6LeasesState, error) + // ToPbText marshals Dhcpv6LeasesState to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6LeasesState to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6LeasesState to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6LeasesState struct { + obj *dhcpv6LeasesState +} + +type unMarshalDhcpv6LeasesState interface { + // FromProto unmarshals Dhcpv6LeasesState from protobuf object *otg.Dhcpv6LeasesState + FromProto(msg *otg.Dhcpv6LeasesState) (Dhcpv6LeasesState, error) + // FromPbText unmarshals Dhcpv6LeasesState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6LeasesState from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6LeasesState from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6LeasesState) Marshal() marshalDhcpv6LeasesState { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6LeasesState{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6LeasesState) Unmarshal() unMarshalDhcpv6LeasesState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6LeasesState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6LeasesState) ToProto() (*otg.Dhcpv6LeasesState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6LeasesState) FromProto(msg *otg.Dhcpv6LeasesState) (Dhcpv6LeasesState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6LeasesState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6LeasesState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6LeasesState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6LeasesState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6LeasesState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6LeasesState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6LeasesState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6LeasesState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6LeasesState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6LeasesState) Clone() (Dhcpv6LeasesState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6LeasesState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6LeasesState) setNil() { + obj.leasesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6LeasesState is lease information of DHCP Server. +type Dhcpv6LeasesState interface { + Validation + // msg marshals Dhcpv6LeasesState to protobuf object *otg.Dhcpv6LeasesState + // and doesn't set defaults + msg() *otg.Dhcpv6LeasesState + // setMsg unmarshals Dhcpv6LeasesState from protobuf object *otg.Dhcpv6LeasesState + // and doesn't set defaults + setMsg(*otg.Dhcpv6LeasesState) Dhcpv6LeasesState + // provides marshal interface + Marshal() marshalDhcpv6LeasesState + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6LeasesState + // validate validates Dhcpv6LeasesState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6LeasesState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // DhcpServerName returns string, set in Dhcpv6LeasesState. + DhcpServerName() string + // SetDhcpServerName assigns string provided by user to Dhcpv6LeasesState + SetDhcpServerName(value string) Dhcpv6LeasesState + // HasDhcpServerName checks if DhcpServerName has been set in Dhcpv6LeasesState + HasDhcpServerName() bool + // Leases returns Dhcpv6LeasesStateDhcpv6ServerLeaseStateIterIter, set in Dhcpv6LeasesState + Leases() Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter + setNil() +} + +// The name of a DHCP Server. +// DhcpServerName returns a string +func (obj *dhcpv6LeasesState) DhcpServerName() string { + + return *obj.obj.DhcpServerName + +} + +// The name of a DHCP Server. +// DhcpServerName returns a string +func (obj *dhcpv6LeasesState) HasDhcpServerName() bool { + return obj.obj.DhcpServerName != nil +} + +// The name of a DHCP Server. +// SetDhcpServerName sets the string value in the Dhcpv6LeasesState object +func (obj *dhcpv6LeasesState) SetDhcpServerName(value string) Dhcpv6LeasesState { + + obj.obj.DhcpServerName = &value + return obj +} + +// description is TBD +// Leases returns a []Dhcpv6ServerLeaseState +func (obj *dhcpv6LeasesState) Leases() Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter { + if len(obj.obj.Leases) == 0 { + obj.obj.Leases = []*otg.Dhcpv6ServerLeaseState{} + } + if obj.leasesHolder == nil { + obj.leasesHolder = newDhcpv6LeasesStateDhcpv6ServerLeaseStateIter(&obj.obj.Leases).setMsg(obj) + } + return obj.leasesHolder +} + +type dhcpv6LeasesStateDhcpv6ServerLeaseStateIter struct { + obj *dhcpv6LeasesState + dhcpv6ServerLeaseStateSlice []Dhcpv6ServerLeaseState + fieldPtr *[]*otg.Dhcpv6ServerLeaseState +} + +func newDhcpv6LeasesStateDhcpv6ServerLeaseStateIter(ptr *[]*otg.Dhcpv6ServerLeaseState) Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter { + return &dhcpv6LeasesStateDhcpv6ServerLeaseStateIter{fieldPtr: ptr} +} + +type Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter interface { + setMsg(*dhcpv6LeasesState) Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter + Items() []Dhcpv6ServerLeaseState + Add() Dhcpv6ServerLeaseState + Append(items ...Dhcpv6ServerLeaseState) Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter + Set(index int, newObj Dhcpv6ServerLeaseState) Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter + Clear() Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter + clearHolderSlice() Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter + appendHolderSlice(item Dhcpv6ServerLeaseState) Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter +} + +func (obj *dhcpv6LeasesStateDhcpv6ServerLeaseStateIter) setMsg(msg *dhcpv6LeasesState) Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv6ServerLeaseState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *dhcpv6LeasesStateDhcpv6ServerLeaseStateIter) Items() []Dhcpv6ServerLeaseState { + return obj.dhcpv6ServerLeaseStateSlice +} + +func (obj *dhcpv6LeasesStateDhcpv6ServerLeaseStateIter) Add() Dhcpv6ServerLeaseState { + newObj := &otg.Dhcpv6ServerLeaseState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv6ServerLeaseState{obj: newObj} + newLibObj.setDefault() + obj.dhcpv6ServerLeaseStateSlice = append(obj.dhcpv6ServerLeaseStateSlice, newLibObj) + return newLibObj +} + +func (obj *dhcpv6LeasesStateDhcpv6ServerLeaseStateIter) Append(items ...Dhcpv6ServerLeaseState) Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv6ServerLeaseStateSlice = append(obj.dhcpv6ServerLeaseStateSlice, item) + } + return obj +} + +func (obj *dhcpv6LeasesStateDhcpv6ServerLeaseStateIter) Set(index int, newObj Dhcpv6ServerLeaseState) Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv6ServerLeaseStateSlice[index] = newObj + return obj +} +func (obj *dhcpv6LeasesStateDhcpv6ServerLeaseStateIter) Clear() Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv6ServerLeaseState{} + obj.dhcpv6ServerLeaseStateSlice = []Dhcpv6ServerLeaseState{} + } + return obj +} +func (obj *dhcpv6LeasesStateDhcpv6ServerLeaseStateIter) clearHolderSlice() Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter { + if len(obj.dhcpv6ServerLeaseStateSlice) > 0 { + obj.dhcpv6ServerLeaseStateSlice = []Dhcpv6ServerLeaseState{} + } + return obj +} +func (obj *dhcpv6LeasesStateDhcpv6ServerLeaseStateIter) appendHolderSlice(item Dhcpv6ServerLeaseState) Dhcpv6LeasesStateDhcpv6ServerLeaseStateIter { + obj.dhcpv6ServerLeaseStateSlice = append(obj.dhcpv6ServerLeaseStateSlice, item) + return obj +} + +func (obj *dhcpv6LeasesState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Leases) != 0 { + + if set_default { + obj.Leases().clearHolderSlice() + for _, item := range obj.obj.Leases { + obj.Leases().appendHolderSlice(&dhcpv6ServerLeaseState{obj: item}) + } + } + for _, item := range obj.Leases().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *dhcpv6LeasesState) setDefault() { + +} diff --git a/gosnappi/dhcpv6_options_vendor_specific_options.go b/gosnappi/dhcpv6_options_vendor_specific_options.go new file mode 100644 index 00000000..edb95d1e --- /dev/null +++ b/gosnappi/dhcpv6_options_vendor_specific_options.go @@ -0,0 +1,336 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6OptionsVendorSpecificOptions ***** +type dhcpv6OptionsVendorSpecificOptions struct { + validation + obj *otg.Dhcpv6OptionsVendorSpecificOptions + marshaller marshalDhcpv6OptionsVendorSpecificOptions + unMarshaller unMarshalDhcpv6OptionsVendorSpecificOptions +} + +func NewDhcpv6OptionsVendorSpecificOptions() Dhcpv6OptionsVendorSpecificOptions { + obj := dhcpv6OptionsVendorSpecificOptions{obj: &otg.Dhcpv6OptionsVendorSpecificOptions{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6OptionsVendorSpecificOptions) msg() *otg.Dhcpv6OptionsVendorSpecificOptions { + return obj.obj +} + +func (obj *dhcpv6OptionsVendorSpecificOptions) setMsg(msg *otg.Dhcpv6OptionsVendorSpecificOptions) Dhcpv6OptionsVendorSpecificOptions { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6OptionsVendorSpecificOptions struct { + obj *dhcpv6OptionsVendorSpecificOptions +} + +type marshalDhcpv6OptionsVendorSpecificOptions interface { + // ToProto marshals Dhcpv6OptionsVendorSpecificOptions to protobuf object *otg.Dhcpv6OptionsVendorSpecificOptions + ToProto() (*otg.Dhcpv6OptionsVendorSpecificOptions, error) + // ToPbText marshals Dhcpv6OptionsVendorSpecificOptions to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6OptionsVendorSpecificOptions to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6OptionsVendorSpecificOptions to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6OptionsVendorSpecificOptions struct { + obj *dhcpv6OptionsVendorSpecificOptions +} + +type unMarshalDhcpv6OptionsVendorSpecificOptions interface { + // FromProto unmarshals Dhcpv6OptionsVendorSpecificOptions from protobuf object *otg.Dhcpv6OptionsVendorSpecificOptions + FromProto(msg *otg.Dhcpv6OptionsVendorSpecificOptions) (Dhcpv6OptionsVendorSpecificOptions, error) + // FromPbText unmarshals Dhcpv6OptionsVendorSpecificOptions from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6OptionsVendorSpecificOptions from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6OptionsVendorSpecificOptions from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6OptionsVendorSpecificOptions) Marshal() marshalDhcpv6OptionsVendorSpecificOptions { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6OptionsVendorSpecificOptions{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6OptionsVendorSpecificOptions) Unmarshal() unMarshalDhcpv6OptionsVendorSpecificOptions { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6OptionsVendorSpecificOptions{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6OptionsVendorSpecificOptions) ToProto() (*otg.Dhcpv6OptionsVendorSpecificOptions, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6OptionsVendorSpecificOptions) FromProto(msg *otg.Dhcpv6OptionsVendorSpecificOptions) (Dhcpv6OptionsVendorSpecificOptions, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6OptionsVendorSpecificOptions) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6OptionsVendorSpecificOptions) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6OptionsVendorSpecificOptions) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6OptionsVendorSpecificOptions) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6OptionsVendorSpecificOptions) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6OptionsVendorSpecificOptions) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6OptionsVendorSpecificOptions) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6OptionsVendorSpecificOptions) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6OptionsVendorSpecificOptions) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6OptionsVendorSpecificOptions) Clone() (Dhcpv6OptionsVendorSpecificOptions, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6OptionsVendorSpecificOptions() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6OptionsVendorSpecificOptions is the encapsulated vendor-specific options field is encoded as a sequence of code/length/value fields of identical format to the DHCP options field. The option codes are defined by the vendor identified in the enterprise-number field and are not managed by IANA. +type Dhcpv6OptionsVendorSpecificOptions interface { + Validation + // msg marshals Dhcpv6OptionsVendorSpecificOptions to protobuf object *otg.Dhcpv6OptionsVendorSpecificOptions + // and doesn't set defaults + msg() *otg.Dhcpv6OptionsVendorSpecificOptions + // setMsg unmarshals Dhcpv6OptionsVendorSpecificOptions from protobuf object *otg.Dhcpv6OptionsVendorSpecificOptions + // and doesn't set defaults + setMsg(*otg.Dhcpv6OptionsVendorSpecificOptions) Dhcpv6OptionsVendorSpecificOptions + // provides marshal interface + Marshal() marshalDhcpv6OptionsVendorSpecificOptions + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6OptionsVendorSpecificOptions + // validate validates Dhcpv6OptionsVendorSpecificOptions + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6OptionsVendorSpecificOptions, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Code returns uint32, set in Dhcpv6OptionsVendorSpecificOptions. + Code() uint32 + // SetCode assigns uint32 provided by user to Dhcpv6OptionsVendorSpecificOptions + SetCode(value uint32) Dhcpv6OptionsVendorSpecificOptions + // Data returns string, set in Dhcpv6OptionsVendorSpecificOptions. + Data() string + // SetData assigns string provided by user to Dhcpv6OptionsVendorSpecificOptions + SetData(value string) Dhcpv6OptionsVendorSpecificOptions +} + +// The code for the encapsulated option. +// Code returns a uint32 +func (obj *dhcpv6OptionsVendorSpecificOptions) Code() uint32 { + + return *obj.obj.Code + +} + +// The code for the encapsulated option. +// SetCode sets the uint32 value in the Dhcpv6OptionsVendorSpecificOptions object +func (obj *dhcpv6OptionsVendorSpecificOptions) SetCode(value uint32) Dhcpv6OptionsVendorSpecificOptions { + + obj.obj.Code = &value + return obj +} + +// The data for the encapsulated option. +// Data returns a string +func (obj *dhcpv6OptionsVendorSpecificOptions) Data() string { + + return *obj.obj.Data + +} + +// The data for the encapsulated option. +// SetData sets the string value in the Dhcpv6OptionsVendorSpecificOptions object +func (obj *dhcpv6OptionsVendorSpecificOptions) SetData(value string) Dhcpv6OptionsVendorSpecificOptions { + + obj.obj.Data = &value + return obj +} + +func (obj *dhcpv6OptionsVendorSpecificOptions) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Code is required + if obj.obj.Code == nil { + vObj.validationErrors = append(vObj.validationErrors, "Code is required field on interface Dhcpv6OptionsVendorSpecificOptions") + } + if obj.obj.Code != nil { + + if *obj.obj.Code > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv6OptionsVendorSpecificOptions.Code <= 65535 but Got %d", *obj.obj.Code)) + } + + } + + // Data is required + if obj.obj.Data == nil { + vObj.validationErrors = append(vObj.validationErrors, "Data is required field on interface Dhcpv6OptionsVendorSpecificOptions") + } +} + +func (obj *dhcpv6OptionsVendorSpecificOptions) setDefault() { + +} diff --git a/gosnappi/dhcpv6_server_ia_type.go b/gosnappi/dhcpv6_server_ia_type.go new file mode 100644 index 00000000..f8611710 --- /dev/null +++ b/gosnappi/dhcpv6_server_ia_type.go @@ -0,0 +1,564 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ServerIaType ***** +type dhcpv6ServerIaType struct { + validation + obj *otg.Dhcpv6ServerIaType + marshaller marshalDhcpv6ServerIaType + unMarshaller unMarshalDhcpv6ServerIaType + ianaHolder Dhcpv6ServerPoolInfo + iataHolder Dhcpv6ServerPoolInfo + iapdHolder Dhcpv6ServerIapdPoolInfo + ianapdHolder Dhcpv6ServerIanapdPoolInfo +} + +func NewDhcpv6ServerIaType() Dhcpv6ServerIaType { + obj := dhcpv6ServerIaType{obj: &otg.Dhcpv6ServerIaType{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ServerIaType) msg() *otg.Dhcpv6ServerIaType { + return obj.obj +} + +func (obj *dhcpv6ServerIaType) setMsg(msg *otg.Dhcpv6ServerIaType) Dhcpv6ServerIaType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ServerIaType struct { + obj *dhcpv6ServerIaType +} + +type marshalDhcpv6ServerIaType interface { + // ToProto marshals Dhcpv6ServerIaType to protobuf object *otg.Dhcpv6ServerIaType + ToProto() (*otg.Dhcpv6ServerIaType, error) + // ToPbText marshals Dhcpv6ServerIaType to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ServerIaType to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ServerIaType to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ServerIaType struct { + obj *dhcpv6ServerIaType +} + +type unMarshalDhcpv6ServerIaType interface { + // FromProto unmarshals Dhcpv6ServerIaType from protobuf object *otg.Dhcpv6ServerIaType + FromProto(msg *otg.Dhcpv6ServerIaType) (Dhcpv6ServerIaType, error) + // FromPbText unmarshals Dhcpv6ServerIaType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ServerIaType from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ServerIaType from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ServerIaType) Marshal() marshalDhcpv6ServerIaType { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ServerIaType{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ServerIaType) Unmarshal() unMarshalDhcpv6ServerIaType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ServerIaType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ServerIaType) ToProto() (*otg.Dhcpv6ServerIaType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ServerIaType) FromProto(msg *otg.Dhcpv6ServerIaType) (Dhcpv6ServerIaType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ServerIaType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ServerIaType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ServerIaType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerIaType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ServerIaType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerIaType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ServerIaType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ServerIaType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ServerIaType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ServerIaType) Clone() (Dhcpv6ServerIaType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ServerIaType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ServerIaType) setNil() { + obj.ianaHolder = nil + obj.iataHolder = nil + obj.iapdHolder = nil + obj.ianapdHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ServerIaType is description is TBD +type Dhcpv6ServerIaType interface { + Validation + // msg marshals Dhcpv6ServerIaType to protobuf object *otg.Dhcpv6ServerIaType + // and doesn't set defaults + msg() *otg.Dhcpv6ServerIaType + // setMsg unmarshals Dhcpv6ServerIaType from protobuf object *otg.Dhcpv6ServerIaType + // and doesn't set defaults + setMsg(*otg.Dhcpv6ServerIaType) Dhcpv6ServerIaType + // provides marshal interface + Marshal() marshalDhcpv6ServerIaType + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ServerIaType + // validate validates Dhcpv6ServerIaType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ServerIaType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns Dhcpv6ServerIaTypeChoiceEnum, set in Dhcpv6ServerIaType + Choice() Dhcpv6ServerIaTypeChoiceEnum + // setChoice assigns Dhcpv6ServerIaTypeChoiceEnum provided by user to Dhcpv6ServerIaType + setChoice(value Dhcpv6ServerIaTypeChoiceEnum) Dhcpv6ServerIaType + // HasChoice checks if Choice has been set in Dhcpv6ServerIaType + HasChoice() bool + // Iana returns Dhcpv6ServerPoolInfo, set in Dhcpv6ServerIaType. + // Dhcpv6ServerPoolInfo is the container for pool configurations for IA types iana and iata. + Iana() Dhcpv6ServerPoolInfo + // SetIana assigns Dhcpv6ServerPoolInfo provided by user to Dhcpv6ServerIaType. + // Dhcpv6ServerPoolInfo is the container for pool configurations for IA types iana and iata. + SetIana(value Dhcpv6ServerPoolInfo) Dhcpv6ServerIaType + // HasIana checks if Iana has been set in Dhcpv6ServerIaType + HasIana() bool + // Iata returns Dhcpv6ServerPoolInfo, set in Dhcpv6ServerIaType. + // Dhcpv6ServerPoolInfo is the container for pool configurations for IA types iana and iata. + Iata() Dhcpv6ServerPoolInfo + // SetIata assigns Dhcpv6ServerPoolInfo provided by user to Dhcpv6ServerIaType. + // Dhcpv6ServerPoolInfo is the container for pool configurations for IA types iana and iata. + SetIata(value Dhcpv6ServerPoolInfo) Dhcpv6ServerIaType + // HasIata checks if Iata has been set in Dhcpv6ServerIaType + HasIata() bool + // Iapd returns Dhcpv6ServerIapdPoolInfo, set in Dhcpv6ServerIaType. + // Dhcpv6ServerIapdPoolInfo is the container for prefix pool configurations for IA type iapd. + Iapd() Dhcpv6ServerIapdPoolInfo + // SetIapd assigns Dhcpv6ServerIapdPoolInfo provided by user to Dhcpv6ServerIaType. + // Dhcpv6ServerIapdPoolInfo is the container for prefix pool configurations for IA type iapd. + SetIapd(value Dhcpv6ServerIapdPoolInfo) Dhcpv6ServerIaType + // HasIapd checks if Iapd has been set in Dhcpv6ServerIaType + HasIapd() bool + // Ianapd returns Dhcpv6ServerIanapdPoolInfo, set in Dhcpv6ServerIaType. + // Dhcpv6ServerIanapdPoolInfo is the container for pool configurations for IA type ianapd. + Ianapd() Dhcpv6ServerIanapdPoolInfo + // SetIanapd assigns Dhcpv6ServerIanapdPoolInfo provided by user to Dhcpv6ServerIaType. + // Dhcpv6ServerIanapdPoolInfo is the container for pool configurations for IA type ianapd. + SetIanapd(value Dhcpv6ServerIanapdPoolInfo) Dhcpv6ServerIaType + // HasIanapd checks if Ianapd has been set in Dhcpv6ServerIaType + HasIanapd() bool + setNil() +} + +type Dhcpv6ServerIaTypeChoiceEnum string + +// Enum of Choice on Dhcpv6ServerIaType +var Dhcpv6ServerIaTypeChoice = struct { + IANA Dhcpv6ServerIaTypeChoiceEnum + IATA Dhcpv6ServerIaTypeChoiceEnum + IAPD Dhcpv6ServerIaTypeChoiceEnum + IANAPD Dhcpv6ServerIaTypeChoiceEnum +}{ + IANA: Dhcpv6ServerIaTypeChoiceEnum("iana"), + IATA: Dhcpv6ServerIaTypeChoiceEnum("iata"), + IAPD: Dhcpv6ServerIaTypeChoiceEnum("iapd"), + IANAPD: Dhcpv6ServerIaTypeChoiceEnum("ianapd"), +} + +func (obj *dhcpv6ServerIaType) Choice() Dhcpv6ServerIaTypeChoiceEnum { + return Dhcpv6ServerIaTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// Identity Association: a collection of leases assigned to a client. Each IA has an associated IAID. Each IA holds one type of lease, like an identity association for temporary addresses (IA_TA) holds temporary addresses, and an identity association for prefix delegation (IA_PD). +// Choice returns a string +func (obj *dhcpv6ServerIaType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *dhcpv6ServerIaType) setChoice(value Dhcpv6ServerIaTypeChoiceEnum) Dhcpv6ServerIaType { + intValue, ok := otg.Dhcpv6ServerIaType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Dhcpv6ServerIaTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.Dhcpv6ServerIaType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ianapd = nil + obj.ianapdHolder = nil + obj.obj.Iapd = nil + obj.iapdHolder = nil + obj.obj.Iata = nil + obj.iataHolder = nil + obj.obj.Iana = nil + obj.ianaHolder = nil + + if value == Dhcpv6ServerIaTypeChoice.IANA { + obj.obj.Iana = NewDhcpv6ServerPoolInfo().msg() + } + + if value == Dhcpv6ServerIaTypeChoice.IATA { + obj.obj.Iata = NewDhcpv6ServerPoolInfo().msg() + } + + if value == Dhcpv6ServerIaTypeChoice.IAPD { + obj.obj.Iapd = NewDhcpv6ServerIapdPoolInfo().msg() + } + + if value == Dhcpv6ServerIaTypeChoice.IANAPD { + obj.obj.Ianapd = NewDhcpv6ServerIanapdPoolInfo().msg() + } + + return obj +} + +// description is TBD +// Iana returns a Dhcpv6ServerPoolInfo +func (obj *dhcpv6ServerIaType) Iana() Dhcpv6ServerPoolInfo { + if obj.obj.Iana == nil { + obj.setChoice(Dhcpv6ServerIaTypeChoice.IANA) + } + if obj.ianaHolder == nil { + obj.ianaHolder = &dhcpv6ServerPoolInfo{obj: obj.obj.Iana} + } + return obj.ianaHolder +} + +// description is TBD +// Iana returns a Dhcpv6ServerPoolInfo +func (obj *dhcpv6ServerIaType) HasIana() bool { + return obj.obj.Iana != nil +} + +// description is TBD +// SetIana sets the Dhcpv6ServerPoolInfo value in the Dhcpv6ServerIaType object +func (obj *dhcpv6ServerIaType) SetIana(value Dhcpv6ServerPoolInfo) Dhcpv6ServerIaType { + obj.setChoice(Dhcpv6ServerIaTypeChoice.IANA) + obj.ianaHolder = nil + obj.obj.Iana = value.msg() + + return obj +} + +// description is TBD +// Iata returns a Dhcpv6ServerPoolInfo +func (obj *dhcpv6ServerIaType) Iata() Dhcpv6ServerPoolInfo { + if obj.obj.Iata == nil { + obj.setChoice(Dhcpv6ServerIaTypeChoice.IATA) + } + if obj.iataHolder == nil { + obj.iataHolder = &dhcpv6ServerPoolInfo{obj: obj.obj.Iata} + } + return obj.iataHolder +} + +// description is TBD +// Iata returns a Dhcpv6ServerPoolInfo +func (obj *dhcpv6ServerIaType) HasIata() bool { + return obj.obj.Iata != nil +} + +// description is TBD +// SetIata sets the Dhcpv6ServerPoolInfo value in the Dhcpv6ServerIaType object +func (obj *dhcpv6ServerIaType) SetIata(value Dhcpv6ServerPoolInfo) Dhcpv6ServerIaType { + obj.setChoice(Dhcpv6ServerIaTypeChoice.IATA) + obj.iataHolder = nil + obj.obj.Iata = value.msg() + + return obj +} + +// description is TBD +// Iapd returns a Dhcpv6ServerIapdPoolInfo +func (obj *dhcpv6ServerIaType) Iapd() Dhcpv6ServerIapdPoolInfo { + if obj.obj.Iapd == nil { + obj.setChoice(Dhcpv6ServerIaTypeChoice.IAPD) + } + if obj.iapdHolder == nil { + obj.iapdHolder = &dhcpv6ServerIapdPoolInfo{obj: obj.obj.Iapd} + } + return obj.iapdHolder +} + +// description is TBD +// Iapd returns a Dhcpv6ServerIapdPoolInfo +func (obj *dhcpv6ServerIaType) HasIapd() bool { + return obj.obj.Iapd != nil +} + +// description is TBD +// SetIapd sets the Dhcpv6ServerIapdPoolInfo value in the Dhcpv6ServerIaType object +func (obj *dhcpv6ServerIaType) SetIapd(value Dhcpv6ServerIapdPoolInfo) Dhcpv6ServerIaType { + obj.setChoice(Dhcpv6ServerIaTypeChoice.IAPD) + obj.iapdHolder = nil + obj.obj.Iapd = value.msg() + + return obj +} + +// description is TBD +// Ianapd returns a Dhcpv6ServerIanapdPoolInfo +func (obj *dhcpv6ServerIaType) Ianapd() Dhcpv6ServerIanapdPoolInfo { + if obj.obj.Ianapd == nil { + obj.setChoice(Dhcpv6ServerIaTypeChoice.IANAPD) + } + if obj.ianapdHolder == nil { + obj.ianapdHolder = &dhcpv6ServerIanapdPoolInfo{obj: obj.obj.Ianapd} + } + return obj.ianapdHolder +} + +// description is TBD +// Ianapd returns a Dhcpv6ServerIanapdPoolInfo +func (obj *dhcpv6ServerIaType) HasIanapd() bool { + return obj.obj.Ianapd != nil +} + +// description is TBD +// SetIanapd sets the Dhcpv6ServerIanapdPoolInfo value in the Dhcpv6ServerIaType object +func (obj *dhcpv6ServerIaType) SetIanapd(value Dhcpv6ServerIanapdPoolInfo) Dhcpv6ServerIaType { + obj.setChoice(Dhcpv6ServerIaTypeChoice.IANAPD) + obj.ianapdHolder = nil + obj.obj.Ianapd = value.msg() + + return obj +} + +func (obj *dhcpv6ServerIaType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Iana != nil { + + obj.Iana().validateObj(vObj, set_default) + } + + if obj.obj.Iata != nil { + + obj.Iata().validateObj(vObj, set_default) + } + + if obj.obj.Iapd != nil { + + obj.Iapd().validateObj(vObj, set_default) + } + + if obj.obj.Ianapd != nil { + + obj.Ianapd().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpv6ServerIaType) setDefault() { + var choices_set int = 0 + var choice Dhcpv6ServerIaTypeChoiceEnum + + if obj.obj.Iana != nil { + choices_set += 1 + choice = Dhcpv6ServerIaTypeChoice.IANA + } + + if obj.obj.Iata != nil { + choices_set += 1 + choice = Dhcpv6ServerIaTypeChoice.IATA + } + + if obj.obj.Iapd != nil { + choices_set += 1 + choice = Dhcpv6ServerIaTypeChoice.IAPD + } + + if obj.obj.Ianapd != nil { + choices_set += 1 + choice = Dhcpv6ServerIaTypeChoice.IANAPD + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Dhcpv6ServerIaTypeChoice.IANA) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Dhcpv6ServerIaType") + } + } else { + intVal := otg.Dhcpv6ServerIaType_Choice_Enum_value[string(choice)] + enumValue := otg.Dhcpv6ServerIaType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/dhcpv6_server_ianapd_pool_info.go b/gosnappi/dhcpv6_server_ianapd_pool_info.go new file mode 100644 index 00000000..615b42c1 --- /dev/null +++ b/gosnappi/dhcpv6_server_ianapd_pool_info.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ServerIanapdPoolInfo ***** +type dhcpv6ServerIanapdPoolInfo struct { + validation + obj *otg.Dhcpv6ServerIanapdPoolInfo + marshaller marshalDhcpv6ServerIanapdPoolInfo + unMarshaller unMarshalDhcpv6ServerIanapdPoolInfo + ianaHolder Dhcpv6ServerPoolInfo + iapdHolder Dhcpv6ServerIapdPoolInfo +} + +func NewDhcpv6ServerIanapdPoolInfo() Dhcpv6ServerIanapdPoolInfo { + obj := dhcpv6ServerIanapdPoolInfo{obj: &otg.Dhcpv6ServerIanapdPoolInfo{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ServerIanapdPoolInfo) msg() *otg.Dhcpv6ServerIanapdPoolInfo { + return obj.obj +} + +func (obj *dhcpv6ServerIanapdPoolInfo) setMsg(msg *otg.Dhcpv6ServerIanapdPoolInfo) Dhcpv6ServerIanapdPoolInfo { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ServerIanapdPoolInfo struct { + obj *dhcpv6ServerIanapdPoolInfo +} + +type marshalDhcpv6ServerIanapdPoolInfo interface { + // ToProto marshals Dhcpv6ServerIanapdPoolInfo to protobuf object *otg.Dhcpv6ServerIanapdPoolInfo + ToProto() (*otg.Dhcpv6ServerIanapdPoolInfo, error) + // ToPbText marshals Dhcpv6ServerIanapdPoolInfo to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ServerIanapdPoolInfo to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ServerIanapdPoolInfo to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ServerIanapdPoolInfo struct { + obj *dhcpv6ServerIanapdPoolInfo +} + +type unMarshalDhcpv6ServerIanapdPoolInfo interface { + // FromProto unmarshals Dhcpv6ServerIanapdPoolInfo from protobuf object *otg.Dhcpv6ServerIanapdPoolInfo + FromProto(msg *otg.Dhcpv6ServerIanapdPoolInfo) (Dhcpv6ServerIanapdPoolInfo, error) + // FromPbText unmarshals Dhcpv6ServerIanapdPoolInfo from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ServerIanapdPoolInfo from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ServerIanapdPoolInfo from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ServerIanapdPoolInfo) Marshal() marshalDhcpv6ServerIanapdPoolInfo { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ServerIanapdPoolInfo{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ServerIanapdPoolInfo) Unmarshal() unMarshalDhcpv6ServerIanapdPoolInfo { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ServerIanapdPoolInfo{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ServerIanapdPoolInfo) ToProto() (*otg.Dhcpv6ServerIanapdPoolInfo, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ServerIanapdPoolInfo) FromProto(msg *otg.Dhcpv6ServerIanapdPoolInfo) (Dhcpv6ServerIanapdPoolInfo, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ServerIanapdPoolInfo) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ServerIanapdPoolInfo) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ServerIanapdPoolInfo) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerIanapdPoolInfo) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ServerIanapdPoolInfo) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerIanapdPoolInfo) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ServerIanapdPoolInfo) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ServerIanapdPoolInfo) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ServerIanapdPoolInfo) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ServerIanapdPoolInfo) Clone() (Dhcpv6ServerIanapdPoolInfo, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ServerIanapdPoolInfo() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ServerIanapdPoolInfo) setNil() { + obj.ianaHolder = nil + obj.iapdHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ServerIanapdPoolInfo is the container for pool configurations for IA type ianapd. +type Dhcpv6ServerIanapdPoolInfo interface { + Validation + // msg marshals Dhcpv6ServerIanapdPoolInfo to protobuf object *otg.Dhcpv6ServerIanapdPoolInfo + // and doesn't set defaults + msg() *otg.Dhcpv6ServerIanapdPoolInfo + // setMsg unmarshals Dhcpv6ServerIanapdPoolInfo from protobuf object *otg.Dhcpv6ServerIanapdPoolInfo + // and doesn't set defaults + setMsg(*otg.Dhcpv6ServerIanapdPoolInfo) Dhcpv6ServerIanapdPoolInfo + // provides marshal interface + Marshal() marshalDhcpv6ServerIanapdPoolInfo + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ServerIanapdPoolInfo + // validate validates Dhcpv6ServerIanapdPoolInfo + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ServerIanapdPoolInfo, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Iana returns Dhcpv6ServerPoolInfo, set in Dhcpv6ServerIanapdPoolInfo. + // Dhcpv6ServerPoolInfo is the container for pool configurations for IA types iana and iata. + Iana() Dhcpv6ServerPoolInfo + // SetIana assigns Dhcpv6ServerPoolInfo provided by user to Dhcpv6ServerIanapdPoolInfo. + // Dhcpv6ServerPoolInfo is the container for pool configurations for IA types iana and iata. + SetIana(value Dhcpv6ServerPoolInfo) Dhcpv6ServerIanapdPoolInfo + // HasIana checks if Iana has been set in Dhcpv6ServerIanapdPoolInfo + HasIana() bool + // Iapd returns Dhcpv6ServerIapdPoolInfo, set in Dhcpv6ServerIanapdPoolInfo. + // Dhcpv6ServerIapdPoolInfo is the container for prefix pool configurations for IA type iapd. + Iapd() Dhcpv6ServerIapdPoolInfo + // SetIapd assigns Dhcpv6ServerIapdPoolInfo provided by user to Dhcpv6ServerIanapdPoolInfo. + // Dhcpv6ServerIapdPoolInfo is the container for prefix pool configurations for IA type iapd. + SetIapd(value Dhcpv6ServerIapdPoolInfo) Dhcpv6ServerIanapdPoolInfo + // HasIapd checks if Iapd has been set in Dhcpv6ServerIanapdPoolInfo + HasIapd() bool + setNil() +} + +// The pool configurations for IA types iana in ianapd. +// Iana returns a Dhcpv6ServerPoolInfo +func (obj *dhcpv6ServerIanapdPoolInfo) Iana() Dhcpv6ServerPoolInfo { + if obj.obj.Iana == nil { + obj.obj.Iana = NewDhcpv6ServerPoolInfo().msg() + } + if obj.ianaHolder == nil { + obj.ianaHolder = &dhcpv6ServerPoolInfo{obj: obj.obj.Iana} + } + return obj.ianaHolder +} + +// The pool configurations for IA types iana in ianapd. +// Iana returns a Dhcpv6ServerPoolInfo +func (obj *dhcpv6ServerIanapdPoolInfo) HasIana() bool { + return obj.obj.Iana != nil +} + +// The pool configurations for IA types iana in ianapd. +// SetIana sets the Dhcpv6ServerPoolInfo value in the Dhcpv6ServerIanapdPoolInfo object +func (obj *dhcpv6ServerIanapdPoolInfo) SetIana(value Dhcpv6ServerPoolInfo) Dhcpv6ServerIanapdPoolInfo { + + obj.ianaHolder = nil + obj.obj.Iana = value.msg() + + return obj +} + +// The pool configurations for IA types iapd in ianapd. +// Iapd returns a Dhcpv6ServerIapdPoolInfo +func (obj *dhcpv6ServerIanapdPoolInfo) Iapd() Dhcpv6ServerIapdPoolInfo { + if obj.obj.Iapd == nil { + obj.obj.Iapd = NewDhcpv6ServerIapdPoolInfo().msg() + } + if obj.iapdHolder == nil { + obj.iapdHolder = &dhcpv6ServerIapdPoolInfo{obj: obj.obj.Iapd} + } + return obj.iapdHolder +} + +// The pool configurations for IA types iapd in ianapd. +// Iapd returns a Dhcpv6ServerIapdPoolInfo +func (obj *dhcpv6ServerIanapdPoolInfo) HasIapd() bool { + return obj.obj.Iapd != nil +} + +// The pool configurations for IA types iapd in ianapd. +// SetIapd sets the Dhcpv6ServerIapdPoolInfo value in the Dhcpv6ServerIanapdPoolInfo object +func (obj *dhcpv6ServerIanapdPoolInfo) SetIapd(value Dhcpv6ServerIapdPoolInfo) Dhcpv6ServerIanapdPoolInfo { + + obj.iapdHolder = nil + obj.obj.Iapd = value.msg() + + return obj +} + +func (obj *dhcpv6ServerIanapdPoolInfo) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Iana != nil { + + obj.Iana().validateObj(vObj, set_default) + } + + if obj.obj.Iapd != nil { + + obj.Iapd().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpv6ServerIanapdPoolInfo) setDefault() { + +} diff --git a/gosnappi/dhcpv6_server_iapd_pool_info.go b/gosnappi/dhcpv6_server_iapd_pool_info.go new file mode 100644 index 00000000..ffcd9ef6 --- /dev/null +++ b/gosnappi/dhcpv6_server_iapd_pool_info.go @@ -0,0 +1,479 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ServerIapdPoolInfo ***** +type dhcpv6ServerIapdPoolInfo struct { + validation + obj *otg.Dhcpv6ServerIapdPoolInfo + marshaller marshalDhcpv6ServerIapdPoolInfo + unMarshaller unMarshalDhcpv6ServerIapdPoolInfo +} + +func NewDhcpv6ServerIapdPoolInfo() Dhcpv6ServerIapdPoolInfo { + obj := dhcpv6ServerIapdPoolInfo{obj: &otg.Dhcpv6ServerIapdPoolInfo{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ServerIapdPoolInfo) msg() *otg.Dhcpv6ServerIapdPoolInfo { + return obj.obj +} + +func (obj *dhcpv6ServerIapdPoolInfo) setMsg(msg *otg.Dhcpv6ServerIapdPoolInfo) Dhcpv6ServerIapdPoolInfo { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ServerIapdPoolInfo struct { + obj *dhcpv6ServerIapdPoolInfo +} + +type marshalDhcpv6ServerIapdPoolInfo interface { + // ToProto marshals Dhcpv6ServerIapdPoolInfo to protobuf object *otg.Dhcpv6ServerIapdPoolInfo + ToProto() (*otg.Dhcpv6ServerIapdPoolInfo, error) + // ToPbText marshals Dhcpv6ServerIapdPoolInfo to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ServerIapdPoolInfo to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ServerIapdPoolInfo to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ServerIapdPoolInfo struct { + obj *dhcpv6ServerIapdPoolInfo +} + +type unMarshalDhcpv6ServerIapdPoolInfo interface { + // FromProto unmarshals Dhcpv6ServerIapdPoolInfo from protobuf object *otg.Dhcpv6ServerIapdPoolInfo + FromProto(msg *otg.Dhcpv6ServerIapdPoolInfo) (Dhcpv6ServerIapdPoolInfo, error) + // FromPbText unmarshals Dhcpv6ServerIapdPoolInfo from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ServerIapdPoolInfo from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ServerIapdPoolInfo from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ServerIapdPoolInfo) Marshal() marshalDhcpv6ServerIapdPoolInfo { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ServerIapdPoolInfo{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ServerIapdPoolInfo) Unmarshal() unMarshalDhcpv6ServerIapdPoolInfo { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ServerIapdPoolInfo{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ServerIapdPoolInfo) ToProto() (*otg.Dhcpv6ServerIapdPoolInfo, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ServerIapdPoolInfo) FromProto(msg *otg.Dhcpv6ServerIapdPoolInfo) (Dhcpv6ServerIapdPoolInfo, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ServerIapdPoolInfo) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ServerIapdPoolInfo) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ServerIapdPoolInfo) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerIapdPoolInfo) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ServerIapdPoolInfo) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerIapdPoolInfo) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ServerIapdPoolInfo) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ServerIapdPoolInfo) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ServerIapdPoolInfo) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ServerIapdPoolInfo) Clone() (Dhcpv6ServerIapdPoolInfo, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ServerIapdPoolInfo() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ServerIapdPoolInfo is the container for prefix pool configurations for IA type iapd. +type Dhcpv6ServerIapdPoolInfo interface { + Validation + // msg marshals Dhcpv6ServerIapdPoolInfo to protobuf object *otg.Dhcpv6ServerIapdPoolInfo + // and doesn't set defaults + msg() *otg.Dhcpv6ServerIapdPoolInfo + // setMsg unmarshals Dhcpv6ServerIapdPoolInfo from protobuf object *otg.Dhcpv6ServerIapdPoolInfo + // and doesn't set defaults + setMsg(*otg.Dhcpv6ServerIapdPoolInfo) Dhcpv6ServerIapdPoolInfo + // provides marshal interface + Marshal() marshalDhcpv6ServerIapdPoolInfo + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ServerIapdPoolInfo + // validate validates Dhcpv6ServerIapdPoolInfo + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ServerIapdPoolInfo, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // StartPrefixAddress returns string, set in Dhcpv6ServerIapdPoolInfo. + StartPrefixAddress() string + // SetStartPrefixAddress assigns string provided by user to Dhcpv6ServerIapdPoolInfo + SetStartPrefixAddress(value string) Dhcpv6ServerIapdPoolInfo + // HasStartPrefixAddress checks if StartPrefixAddress has been set in Dhcpv6ServerIapdPoolInfo + HasStartPrefixAddress() bool + // ConfiguredPrefixLen returns uint32, set in Dhcpv6ServerIapdPoolInfo. + ConfiguredPrefixLen() uint32 + // SetConfiguredPrefixLen assigns uint32 provided by user to Dhcpv6ServerIapdPoolInfo + SetConfiguredPrefixLen(value uint32) Dhcpv6ServerIapdPoolInfo + // HasConfiguredPrefixLen checks if ConfiguredPrefixLen has been set in Dhcpv6ServerIapdPoolInfo + HasConfiguredPrefixLen() bool + // PrefixSize returns uint32, set in Dhcpv6ServerIapdPoolInfo. + PrefixSize() uint32 + // SetPrefixSize assigns uint32 provided by user to Dhcpv6ServerIapdPoolInfo + SetPrefixSize(value uint32) Dhcpv6ServerIapdPoolInfo + // HasPrefixSize checks if PrefixSize has been set in Dhcpv6ServerIapdPoolInfo + HasPrefixSize() bool + // PrefixStep returns uint32, set in Dhcpv6ServerIapdPoolInfo. + PrefixStep() uint32 + // SetPrefixStep assigns uint32 provided by user to Dhcpv6ServerIapdPoolInfo + SetPrefixStep(value uint32) Dhcpv6ServerIapdPoolInfo + // HasPrefixStep checks if PrefixStep has been set in Dhcpv6ServerIapdPoolInfo + HasPrefixStep() bool + // AdvertisedPrefixLen returns uint32, set in Dhcpv6ServerIapdPoolInfo. + AdvertisedPrefixLen() uint32 + // SetAdvertisedPrefixLen assigns uint32 provided by user to Dhcpv6ServerIapdPoolInfo + SetAdvertisedPrefixLen(value uint32) Dhcpv6ServerIapdPoolInfo + // HasAdvertisedPrefixLen checks if AdvertisedPrefixLen has been set in Dhcpv6ServerIapdPoolInfo + HasAdvertisedPrefixLen() bool +} + +// The first IP address of the prefix pool. +// StartPrefixAddress returns a string +func (obj *dhcpv6ServerIapdPoolInfo) StartPrefixAddress() string { + + return *obj.obj.StartPrefixAddress + +} + +// The first IP address of the prefix pool. +// StartPrefixAddress returns a string +func (obj *dhcpv6ServerIapdPoolInfo) HasStartPrefixAddress() bool { + return obj.obj.StartPrefixAddress != nil +} + +// The first IP address of the prefix pool. +// SetStartPrefixAddress sets the string value in the Dhcpv6ServerIapdPoolInfo object +func (obj *dhcpv6ServerIapdPoolInfo) SetStartPrefixAddress(value string) Dhcpv6ServerIapdPoolInfo { + + obj.obj.StartPrefixAddress = &value + return obj +} + +// The IPv6 network prefix length is used for incrementing the lease address within the lease pool where multiple addresses are configured by using the size field. The address is incremented using the configured Prefix Length and Step. +// ConfiguredPrefixLen returns a uint32 +func (obj *dhcpv6ServerIapdPoolInfo) ConfiguredPrefixLen() uint32 { + + return *obj.obj.ConfiguredPrefixLen + +} + +// The IPv6 network prefix length is used for incrementing the lease address within the lease pool where multiple addresses are configured by using the size field. The address is incremented using the configured Prefix Length and Step. +// ConfiguredPrefixLen returns a uint32 +func (obj *dhcpv6ServerIapdPoolInfo) HasConfiguredPrefixLen() bool { + return obj.obj.ConfiguredPrefixLen != nil +} + +// The IPv6 network prefix length is used for incrementing the lease address within the lease pool where multiple addresses are configured by using the size field. The address is incremented using the configured Prefix Length and Step. +// SetConfiguredPrefixLen sets the uint32 value in the Dhcpv6ServerIapdPoolInfo object +func (obj *dhcpv6ServerIapdPoolInfo) SetConfiguredPrefixLen(value uint32) Dhcpv6ServerIapdPoolInfo { + + obj.obj.ConfiguredPrefixLen = &value + return obj +} + +// The total number of addresses in the pool. +// PrefixSize returns a uint32 +func (obj *dhcpv6ServerIapdPoolInfo) PrefixSize() uint32 { + + return *obj.obj.PrefixSize + +} + +// The total number of addresses in the pool. +// PrefixSize returns a uint32 +func (obj *dhcpv6ServerIapdPoolInfo) HasPrefixSize() bool { + return obj.obj.PrefixSize != nil +} + +// The total number of addresses in the pool. +// SetPrefixSize sets the uint32 value in the Dhcpv6ServerIapdPoolInfo object +func (obj *dhcpv6ServerIapdPoolInfo) SetPrefixSize(value uint32) Dhcpv6ServerIapdPoolInfo { + + obj.obj.PrefixSize = &value + return obj +} + +// The increment value for the lease address within the lease pool where multiple addresses are present. The value is incremented according to the Prefix Length and Step. +// PrefixStep returns a uint32 +func (obj *dhcpv6ServerIapdPoolInfo) PrefixStep() uint32 { + + return *obj.obj.PrefixStep + +} + +// The increment value for the lease address within the lease pool where multiple addresses are present. The value is incremented according to the Prefix Length and Step. +// PrefixStep returns a uint32 +func (obj *dhcpv6ServerIapdPoolInfo) HasPrefixStep() bool { + return obj.obj.PrefixStep != nil +} + +// The increment value for the lease address within the lease pool where multiple addresses are present. The value is incremented according to the Prefix Length and Step. +// SetPrefixStep sets the uint32 value in the Dhcpv6ServerIapdPoolInfo object +func (obj *dhcpv6ServerIapdPoolInfo) SetPrefixStep(value uint32) Dhcpv6ServerIapdPoolInfo { + + obj.obj.PrefixStep = &value + return obj +} + +// The prefix length of the IPv6 prefix that the Dhcpv6 server offers to the Dhcpv6 client. +// AdvertisedPrefixLen returns a uint32 +func (obj *dhcpv6ServerIapdPoolInfo) AdvertisedPrefixLen() uint32 { + + return *obj.obj.AdvertisedPrefixLen + +} + +// The prefix length of the IPv6 prefix that the Dhcpv6 server offers to the Dhcpv6 client. +// AdvertisedPrefixLen returns a uint32 +func (obj *dhcpv6ServerIapdPoolInfo) HasAdvertisedPrefixLen() bool { + return obj.obj.AdvertisedPrefixLen != nil +} + +// The prefix length of the IPv6 prefix that the Dhcpv6 server offers to the Dhcpv6 client. +// SetAdvertisedPrefixLen sets the uint32 value in the Dhcpv6ServerIapdPoolInfo object +func (obj *dhcpv6ServerIapdPoolInfo) SetAdvertisedPrefixLen(value uint32) Dhcpv6ServerIapdPoolInfo { + + obj.obj.AdvertisedPrefixLen = &value + return obj +} + +func (obj *dhcpv6ServerIapdPoolInfo) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.StartPrefixAddress != nil { + + err := obj.validateIpv6(obj.StartPrefixAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Dhcpv6ServerIapdPoolInfo.StartPrefixAddress")) + } + + } + + if obj.obj.ConfiguredPrefixLen != nil { + + if *obj.obj.ConfiguredPrefixLen > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv6ServerIapdPoolInfo.ConfiguredPrefixLen <= 128 but Got %d", *obj.obj.ConfiguredPrefixLen)) + } + + } + + if obj.obj.PrefixSize != nil { + + if *obj.obj.PrefixSize < 1 || *obj.obj.PrefixSize > 1000000 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= Dhcpv6ServerIapdPoolInfo.PrefixSize <= 1000000 but Got %d", *obj.obj.PrefixSize)) + } + + } + + if obj.obj.PrefixStep != nil { + + if *obj.obj.PrefixStep < 1 || *obj.obj.PrefixStep > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= Dhcpv6ServerIapdPoolInfo.PrefixStep <= 4294967295 but Got %d", *obj.obj.PrefixStep)) + } + + } + + if obj.obj.AdvertisedPrefixLen != nil { + + if *obj.obj.AdvertisedPrefixLen > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv6ServerIapdPoolInfo.AdvertisedPrefixLen <= 128 but Got %d", *obj.obj.AdvertisedPrefixLen)) + } + + } + +} + +func (obj *dhcpv6ServerIapdPoolInfo) setDefault() { + if obj.obj.ConfiguredPrefixLen == nil { + obj.SetConfiguredPrefixLen(64) + } + if obj.obj.PrefixSize == nil { + obj.SetPrefixSize(10) + } + if obj.obj.PrefixStep == nil { + obj.SetPrefixStep(1) + } + if obj.obj.AdvertisedPrefixLen == nil { + obj.SetAdvertisedPrefixLen(64) + } + +} diff --git a/gosnappi/dhcpv6_server_lease_state.go b/gosnappi/dhcpv6_server_lease_state.go new file mode 100644 index 00000000..3b9ee570 --- /dev/null +++ b/gosnappi/dhcpv6_server_lease_state.go @@ -0,0 +1,502 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ServerLeaseState ***** +type dhcpv6ServerLeaseState struct { + validation + obj *otg.Dhcpv6ServerLeaseState + marshaller marshalDhcpv6ServerLeaseState + unMarshaller unMarshalDhcpv6ServerLeaseState +} + +func NewDhcpv6ServerLeaseState() Dhcpv6ServerLeaseState { + obj := dhcpv6ServerLeaseState{obj: &otg.Dhcpv6ServerLeaseState{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ServerLeaseState) msg() *otg.Dhcpv6ServerLeaseState { + return obj.obj +} + +func (obj *dhcpv6ServerLeaseState) setMsg(msg *otg.Dhcpv6ServerLeaseState) Dhcpv6ServerLeaseState { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ServerLeaseState struct { + obj *dhcpv6ServerLeaseState +} + +type marshalDhcpv6ServerLeaseState interface { + // ToProto marshals Dhcpv6ServerLeaseState to protobuf object *otg.Dhcpv6ServerLeaseState + ToProto() (*otg.Dhcpv6ServerLeaseState, error) + // ToPbText marshals Dhcpv6ServerLeaseState to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ServerLeaseState to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ServerLeaseState to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ServerLeaseState struct { + obj *dhcpv6ServerLeaseState +} + +type unMarshalDhcpv6ServerLeaseState interface { + // FromProto unmarshals Dhcpv6ServerLeaseState from protobuf object *otg.Dhcpv6ServerLeaseState + FromProto(msg *otg.Dhcpv6ServerLeaseState) (Dhcpv6ServerLeaseState, error) + // FromPbText unmarshals Dhcpv6ServerLeaseState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ServerLeaseState from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ServerLeaseState from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ServerLeaseState) Marshal() marshalDhcpv6ServerLeaseState { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ServerLeaseState{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ServerLeaseState) Unmarshal() unMarshalDhcpv6ServerLeaseState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ServerLeaseState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ServerLeaseState) ToProto() (*otg.Dhcpv6ServerLeaseState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ServerLeaseState) FromProto(msg *otg.Dhcpv6ServerLeaseState) (Dhcpv6ServerLeaseState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ServerLeaseState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ServerLeaseState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ServerLeaseState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerLeaseState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ServerLeaseState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerLeaseState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ServerLeaseState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ServerLeaseState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ServerLeaseState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ServerLeaseState) Clone() (Dhcpv6ServerLeaseState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ServerLeaseState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ServerLeaseState is iPv6 unicast prefix. +type Dhcpv6ServerLeaseState interface { + Validation + // msg marshals Dhcpv6ServerLeaseState to protobuf object *otg.Dhcpv6ServerLeaseState + // and doesn't set defaults + msg() *otg.Dhcpv6ServerLeaseState + // setMsg unmarshals Dhcpv6ServerLeaseState from protobuf object *otg.Dhcpv6ServerLeaseState + // and doesn't set defaults + setMsg(*otg.Dhcpv6ServerLeaseState) Dhcpv6ServerLeaseState + // provides marshal interface + Marshal() marshalDhcpv6ServerLeaseState + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ServerLeaseState + // validate validates Dhcpv6ServerLeaseState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ServerLeaseState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Address returns string, set in Dhcpv6ServerLeaseState. + Address() string + // SetAddress assigns string provided by user to Dhcpv6ServerLeaseState + SetAddress(value string) Dhcpv6ServerLeaseState + // HasAddress checks if Address has been set in Dhcpv6ServerLeaseState + HasAddress() bool + // ValidTime returns uint32, set in Dhcpv6ServerLeaseState. + ValidTime() uint32 + // SetValidTime assigns uint32 provided by user to Dhcpv6ServerLeaseState + SetValidTime(value uint32) Dhcpv6ServerLeaseState + // HasValidTime checks if ValidTime has been set in Dhcpv6ServerLeaseState + HasValidTime() bool + // PreferredTime returns uint32, set in Dhcpv6ServerLeaseState. + PreferredTime() uint32 + // SetPreferredTime assigns uint32 provided by user to Dhcpv6ServerLeaseState + SetPreferredTime(value uint32) Dhcpv6ServerLeaseState + // HasPreferredTime checks if PreferredTime has been set in Dhcpv6ServerLeaseState + HasPreferredTime() bool + // RenewTime returns uint32, set in Dhcpv6ServerLeaseState. + RenewTime() uint32 + // SetRenewTime assigns uint32 provided by user to Dhcpv6ServerLeaseState + SetRenewTime(value uint32) Dhcpv6ServerLeaseState + // HasRenewTime checks if RenewTime has been set in Dhcpv6ServerLeaseState + HasRenewTime() bool + // RebindTime returns uint32, set in Dhcpv6ServerLeaseState. + RebindTime() uint32 + // SetRebindTime assigns uint32 provided by user to Dhcpv6ServerLeaseState + SetRebindTime(value uint32) Dhcpv6ServerLeaseState + // HasRebindTime checks if RebindTime has been set in Dhcpv6ServerLeaseState + HasRebindTime() bool + // ClientId returns string, set in Dhcpv6ServerLeaseState. + ClientId() string + // SetClientId assigns string provided by user to Dhcpv6ServerLeaseState + SetClientId(value string) Dhcpv6ServerLeaseState + // HasClientId checks if ClientId has been set in Dhcpv6ServerLeaseState + HasClientId() bool + // RemoteId returns string, set in Dhcpv6ServerLeaseState. + RemoteId() string + // SetRemoteId assigns string provided by user to Dhcpv6ServerLeaseState + SetRemoteId(value string) Dhcpv6ServerLeaseState + // HasRemoteId checks if RemoteId has been set in Dhcpv6ServerLeaseState + HasRemoteId() bool + // InterfaceId returns string, set in Dhcpv6ServerLeaseState. + InterfaceId() string + // SetInterfaceId assigns string provided by user to Dhcpv6ServerLeaseState + SetInterfaceId(value string) Dhcpv6ServerLeaseState + // HasInterfaceId checks if InterfaceId has been set in Dhcpv6ServerLeaseState + HasInterfaceId() bool +} + +// The IPv6 address associated with this lease. +// Address returns a string +func (obj *dhcpv6ServerLeaseState) Address() string { + + return *obj.obj.Address + +} + +// The IPv6 address associated with this lease. +// Address returns a string +func (obj *dhcpv6ServerLeaseState) HasAddress() bool { + return obj.obj.Address != nil +} + +// The IPv6 address associated with this lease. +// SetAddress sets the string value in the Dhcpv6ServerLeaseState object +func (obj *dhcpv6ServerLeaseState) SetAddress(value string) Dhcpv6ServerLeaseState { + + obj.obj.Address = &value + return obj +} + +// The time in seconds, IP address lease will expire. +// ValidTime returns a uint32 +func (obj *dhcpv6ServerLeaseState) ValidTime() uint32 { + + return *obj.obj.ValidTime + +} + +// The time in seconds, IP address lease will expire. +// ValidTime returns a uint32 +func (obj *dhcpv6ServerLeaseState) HasValidTime() bool { + return obj.obj.ValidTime != nil +} + +// The time in seconds, IP address lease will expire. +// SetValidTime sets the uint32 value in the Dhcpv6ServerLeaseState object +func (obj *dhcpv6ServerLeaseState) SetValidTime(value uint32) Dhcpv6ServerLeaseState { + + obj.obj.ValidTime = &value + return obj +} + +// The time in seconds, elapsed time since address has been renewed. +// PreferredTime returns a uint32 +func (obj *dhcpv6ServerLeaseState) PreferredTime() uint32 { + + return *obj.obj.PreferredTime + +} + +// The time in seconds, elapsed time since address has been renewed. +// PreferredTime returns a uint32 +func (obj *dhcpv6ServerLeaseState) HasPreferredTime() bool { + return obj.obj.PreferredTime != nil +} + +// The time in seconds, elapsed time since address has been renewed. +// SetPreferredTime sets the uint32 value in the Dhcpv6ServerLeaseState object +func (obj *dhcpv6ServerLeaseState) SetPreferredTime(value uint32) Dhcpv6ServerLeaseState { + + obj.obj.PreferredTime = &value + return obj +} + +// Time in seconds until the DHCPv6 client starts renewing the lease. +// RenewTime returns a uint32 +func (obj *dhcpv6ServerLeaseState) RenewTime() uint32 { + + return *obj.obj.RenewTime + +} + +// Time in seconds until the DHCPv6 client starts renewing the lease. +// RenewTime returns a uint32 +func (obj *dhcpv6ServerLeaseState) HasRenewTime() bool { + return obj.obj.RenewTime != nil +} + +// Time in seconds until the DHCPv6 client starts renewing the lease. +// SetRenewTime sets the uint32 value in the Dhcpv6ServerLeaseState object +func (obj *dhcpv6ServerLeaseState) SetRenewTime(value uint32) Dhcpv6ServerLeaseState { + + obj.obj.RenewTime = &value + return obj +} + +// Time in seconds until the DHCPv6 client starts rebinding. +// RebindTime returns a uint32 +func (obj *dhcpv6ServerLeaseState) RebindTime() uint32 { + + return *obj.obj.RebindTime + +} + +// Time in seconds until the DHCPv6 client starts rebinding. +// RebindTime returns a uint32 +func (obj *dhcpv6ServerLeaseState) HasRebindTime() bool { + return obj.obj.RebindTime != nil +} + +// Time in seconds until the DHCPv6 client starts rebinding. +// SetRebindTime sets the uint32 value in the Dhcpv6ServerLeaseState object +func (obj *dhcpv6ServerLeaseState) SetRebindTime(value uint32) Dhcpv6ServerLeaseState { + + obj.obj.RebindTime = &value + return obj +} + +// The ID of the DHCPv6 client holding this lease. +// ClientId returns a string +func (obj *dhcpv6ServerLeaseState) ClientId() string { + + return *obj.obj.ClientId + +} + +// The ID of the DHCPv6 client holding this lease. +// ClientId returns a string +func (obj *dhcpv6ServerLeaseState) HasClientId() bool { + return obj.obj.ClientId != nil +} + +// The ID of the DHCPv6 client holding this lease. +// SetClientId sets the string value in the Dhcpv6ServerLeaseState object +func (obj *dhcpv6ServerLeaseState) SetClientId(value string) Dhcpv6ServerLeaseState { + + obj.obj.ClientId = &value + return obj +} + +// The Remote ID option found in the last request message. +// RemoteId returns a string +func (obj *dhcpv6ServerLeaseState) RemoteId() string { + + return *obj.obj.RemoteId + +} + +// The Remote ID option found in the last request message. +// RemoteId returns a string +func (obj *dhcpv6ServerLeaseState) HasRemoteId() bool { + return obj.obj.RemoteId != nil +} + +// The Remote ID option found in the last request message. +// SetRemoteId sets the string value in the Dhcpv6ServerLeaseState object +func (obj *dhcpv6ServerLeaseState) SetRemoteId(value string) Dhcpv6ServerLeaseState { + + obj.obj.RemoteId = &value + return obj +} + +// The Interface ID option found in the last request message. +// InterfaceId returns a string +func (obj *dhcpv6ServerLeaseState) InterfaceId() string { + + return *obj.obj.InterfaceId + +} + +// The Interface ID option found in the last request message. +// InterfaceId returns a string +func (obj *dhcpv6ServerLeaseState) HasInterfaceId() bool { + return obj.obj.InterfaceId != nil +} + +// The Interface ID option found in the last request message. +// SetInterfaceId sets the string value in the Dhcpv6ServerLeaseState object +func (obj *dhcpv6ServerLeaseState) SetInterfaceId(value string) Dhcpv6ServerLeaseState { + + obj.obj.InterfaceId = &value + return obj +} + +func (obj *dhcpv6ServerLeaseState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv6ServerLeaseState) setDefault() { + +} diff --git a/gosnappi/dhcpv6_server_metric.go b/gosnappi/dhcpv6_server_metric.go new file mode 100644 index 00000000..f91418ea --- /dev/null +++ b/gosnappi/dhcpv6_server_metric.go @@ -0,0 +1,726 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ServerMetric ***** +type dhcpv6ServerMetric struct { + validation + obj *otg.Dhcpv6ServerMetric + marshaller marshalDhcpv6ServerMetric + unMarshaller unMarshalDhcpv6ServerMetric +} + +func NewDhcpv6ServerMetric() Dhcpv6ServerMetric { + obj := dhcpv6ServerMetric{obj: &otg.Dhcpv6ServerMetric{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ServerMetric) msg() *otg.Dhcpv6ServerMetric { + return obj.obj +} + +func (obj *dhcpv6ServerMetric) setMsg(msg *otg.Dhcpv6ServerMetric) Dhcpv6ServerMetric { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ServerMetric struct { + obj *dhcpv6ServerMetric +} + +type marshalDhcpv6ServerMetric interface { + // ToProto marshals Dhcpv6ServerMetric to protobuf object *otg.Dhcpv6ServerMetric + ToProto() (*otg.Dhcpv6ServerMetric, error) + // ToPbText marshals Dhcpv6ServerMetric to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ServerMetric to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ServerMetric to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ServerMetric struct { + obj *dhcpv6ServerMetric +} + +type unMarshalDhcpv6ServerMetric interface { + // FromProto unmarshals Dhcpv6ServerMetric from protobuf object *otg.Dhcpv6ServerMetric + FromProto(msg *otg.Dhcpv6ServerMetric) (Dhcpv6ServerMetric, error) + // FromPbText unmarshals Dhcpv6ServerMetric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ServerMetric from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ServerMetric from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ServerMetric) Marshal() marshalDhcpv6ServerMetric { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ServerMetric{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ServerMetric) Unmarshal() unMarshalDhcpv6ServerMetric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ServerMetric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ServerMetric) ToProto() (*otg.Dhcpv6ServerMetric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ServerMetric) FromProto(msg *otg.Dhcpv6ServerMetric) (Dhcpv6ServerMetric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ServerMetric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ServerMetric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ServerMetric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerMetric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ServerMetric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerMetric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ServerMetric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ServerMetric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ServerMetric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ServerMetric) Clone() (Dhcpv6ServerMetric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ServerMetric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ServerMetric is dHCPv6 per server statistics information. +type Dhcpv6ServerMetric interface { + Validation + // msg marshals Dhcpv6ServerMetric to protobuf object *otg.Dhcpv6ServerMetric + // and doesn't set defaults + msg() *otg.Dhcpv6ServerMetric + // setMsg unmarshals Dhcpv6ServerMetric from protobuf object *otg.Dhcpv6ServerMetric + // and doesn't set defaults + setMsg(*otg.Dhcpv6ServerMetric) Dhcpv6ServerMetric + // provides marshal interface + Marshal() marshalDhcpv6ServerMetric + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ServerMetric + // validate validates Dhcpv6ServerMetric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ServerMetric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in Dhcpv6ServerMetric. + Name() string + // SetName assigns string provided by user to Dhcpv6ServerMetric + SetName(value string) Dhcpv6ServerMetric + // HasName checks if Name has been set in Dhcpv6ServerMetric + HasName() bool + // SolicitsReceived returns uint64, set in Dhcpv6ServerMetric. + SolicitsReceived() uint64 + // SetSolicitsReceived assigns uint64 provided by user to Dhcpv6ServerMetric + SetSolicitsReceived(value uint64) Dhcpv6ServerMetric + // HasSolicitsReceived checks if SolicitsReceived has been set in Dhcpv6ServerMetric + HasSolicitsReceived() bool + // SolicitsIgnored returns uint64, set in Dhcpv6ServerMetric. + SolicitsIgnored() uint64 + // SetSolicitsIgnored assigns uint64 provided by user to Dhcpv6ServerMetric + SetSolicitsIgnored(value uint64) Dhcpv6ServerMetric + // HasSolicitsIgnored checks if SolicitsIgnored has been set in Dhcpv6ServerMetric + HasSolicitsIgnored() bool + // AdvertisementsSent returns uint64, set in Dhcpv6ServerMetric. + AdvertisementsSent() uint64 + // SetAdvertisementsSent assigns uint64 provided by user to Dhcpv6ServerMetric + SetAdvertisementsSent(value uint64) Dhcpv6ServerMetric + // HasAdvertisementsSent checks if AdvertisementsSent has been set in Dhcpv6ServerMetric + HasAdvertisementsSent() bool + // RequestsReceived returns uint64, set in Dhcpv6ServerMetric. + RequestsReceived() uint64 + // SetRequestsReceived assigns uint64 provided by user to Dhcpv6ServerMetric + SetRequestsReceived(value uint64) Dhcpv6ServerMetric + // HasRequestsReceived checks if RequestsReceived has been set in Dhcpv6ServerMetric + HasRequestsReceived() bool + // NacksSent returns uint64, set in Dhcpv6ServerMetric. + NacksSent() uint64 + // SetNacksSent assigns uint64 provided by user to Dhcpv6ServerMetric + SetNacksSent(value uint64) Dhcpv6ServerMetric + // HasNacksSent checks if NacksSent has been set in Dhcpv6ServerMetric + HasNacksSent() bool + // ConfirmsReceived returns uint64, set in Dhcpv6ServerMetric. + ConfirmsReceived() uint64 + // SetConfirmsReceived assigns uint64 provided by user to Dhcpv6ServerMetric + SetConfirmsReceived(value uint64) Dhcpv6ServerMetric + // HasConfirmsReceived checks if ConfirmsReceived has been set in Dhcpv6ServerMetric + HasConfirmsReceived() bool + // RenewalsReceived returns uint64, set in Dhcpv6ServerMetric. + RenewalsReceived() uint64 + // SetRenewalsReceived assigns uint64 provided by user to Dhcpv6ServerMetric + SetRenewalsReceived(value uint64) Dhcpv6ServerMetric + // HasRenewalsReceived checks if RenewalsReceived has been set in Dhcpv6ServerMetric + HasRenewalsReceived() bool + // RebindsReceived returns uint64, set in Dhcpv6ServerMetric. + RebindsReceived() uint64 + // SetRebindsReceived assigns uint64 provided by user to Dhcpv6ServerMetric + SetRebindsReceived(value uint64) Dhcpv6ServerMetric + // HasRebindsReceived checks if RebindsReceived has been set in Dhcpv6ServerMetric + HasRebindsReceived() bool + // RepliesSent returns uint64, set in Dhcpv6ServerMetric. + RepliesSent() uint64 + // SetRepliesSent assigns uint64 provided by user to Dhcpv6ServerMetric + SetRepliesSent(value uint64) Dhcpv6ServerMetric + // HasRepliesSent checks if RepliesSent has been set in Dhcpv6ServerMetric + HasRepliesSent() bool + // ReleasesReceived returns uint64, set in Dhcpv6ServerMetric. + ReleasesReceived() uint64 + // SetReleasesReceived assigns uint64 provided by user to Dhcpv6ServerMetric + SetReleasesReceived(value uint64) Dhcpv6ServerMetric + // HasReleasesReceived checks if ReleasesReceived has been set in Dhcpv6ServerMetric + HasReleasesReceived() bool + // DeclinesReceived returns uint64, set in Dhcpv6ServerMetric. + DeclinesReceived() uint64 + // SetDeclinesReceived assigns uint64 provided by user to Dhcpv6ServerMetric + SetDeclinesReceived(value uint64) Dhcpv6ServerMetric + // HasDeclinesReceived checks if DeclinesReceived has been set in Dhcpv6ServerMetric + HasDeclinesReceived() bool + // InformationRequestsReceived returns uint64, set in Dhcpv6ServerMetric. + InformationRequestsReceived() uint64 + // SetInformationRequestsReceived assigns uint64 provided by user to Dhcpv6ServerMetric + SetInformationRequestsReceived(value uint64) Dhcpv6ServerMetric + // HasInformationRequestsReceived checks if InformationRequestsReceived has been set in Dhcpv6ServerMetric + HasInformationRequestsReceived() bool + // RelayForwardsReceived returns uint64, set in Dhcpv6ServerMetric. + RelayForwardsReceived() uint64 + // SetRelayForwardsReceived assigns uint64 provided by user to Dhcpv6ServerMetric + SetRelayForwardsReceived(value uint64) Dhcpv6ServerMetric + // HasRelayForwardsReceived checks if RelayForwardsReceived has been set in Dhcpv6ServerMetric + HasRelayForwardsReceived() bool + // RelayRepliesSent returns uint64, set in Dhcpv6ServerMetric. + RelayRepliesSent() uint64 + // SetRelayRepliesSent assigns uint64 provided by user to Dhcpv6ServerMetric + SetRelayRepliesSent(value uint64) Dhcpv6ServerMetric + // HasRelayRepliesSent checks if RelayRepliesSent has been set in Dhcpv6ServerMetric + HasRelayRepliesSent() bool + // ReconfiguresSent returns uint64, set in Dhcpv6ServerMetric. + ReconfiguresSent() uint64 + // SetReconfiguresSent assigns uint64 provided by user to Dhcpv6ServerMetric + SetReconfiguresSent(value uint64) Dhcpv6ServerMetric + // HasReconfiguresSent checks if ReconfiguresSent has been set in Dhcpv6ServerMetric + HasReconfiguresSent() bool +} + +// The name of a configured DHCPv6 Server. +// Name returns a string +func (obj *dhcpv6ServerMetric) Name() string { + + return *obj.obj.Name + +} + +// The name of a configured DHCPv6 Server. +// Name returns a string +func (obj *dhcpv6ServerMetric) HasName() bool { + return obj.obj.Name != nil +} + +// The name of a configured DHCPv6 Server. +// SetName sets the string value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetName(value string) Dhcpv6ServerMetric { + + obj.obj.Name = &value + return obj +} + +// Number of DHCPSOLICIT messages received. +// SolicitsReceived returns a uint64 +func (obj *dhcpv6ServerMetric) SolicitsReceived() uint64 { + + return *obj.obj.SolicitsReceived + +} + +// Number of DHCPSOLICIT messages received. +// SolicitsReceived returns a uint64 +func (obj *dhcpv6ServerMetric) HasSolicitsReceived() bool { + return obj.obj.SolicitsReceived != nil +} + +// Number of DHCPSOLICIT messages received. +// SetSolicitsReceived sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetSolicitsReceived(value uint64) Dhcpv6ServerMetric { + + obj.obj.SolicitsReceived = &value + return obj +} + +// Number of DHCPSOLICIT messages ignored. +// SolicitsIgnored returns a uint64 +func (obj *dhcpv6ServerMetric) SolicitsIgnored() uint64 { + + return *obj.obj.SolicitsIgnored + +} + +// Number of DHCPSOLICIT messages ignored. +// SolicitsIgnored returns a uint64 +func (obj *dhcpv6ServerMetric) HasSolicitsIgnored() bool { + return obj.obj.SolicitsIgnored != nil +} + +// Number of DHCPSOLICIT messages ignored. +// SetSolicitsIgnored sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetSolicitsIgnored(value uint64) Dhcpv6ServerMetric { + + obj.obj.SolicitsIgnored = &value + return obj +} + +// Number of DHCP Advertise messages sent. +// AdvertisementsSent returns a uint64 +func (obj *dhcpv6ServerMetric) AdvertisementsSent() uint64 { + + return *obj.obj.AdvertisementsSent + +} + +// Number of DHCP Advertise messages sent. +// AdvertisementsSent returns a uint64 +func (obj *dhcpv6ServerMetric) HasAdvertisementsSent() bool { + return obj.obj.AdvertisementsSent != nil +} + +// Number of DHCP Advertise messages sent. +// SetAdvertisementsSent sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetAdvertisementsSent(value uint64) Dhcpv6ServerMetric { + + obj.obj.AdvertisementsSent = &value + return obj +} + +// Number of DHCPREQUEST messages received. +// RequestsReceived returns a uint64 +func (obj *dhcpv6ServerMetric) RequestsReceived() uint64 { + + return *obj.obj.RequestsReceived + +} + +// Number of DHCPREQUEST messages received. +// RequestsReceived returns a uint64 +func (obj *dhcpv6ServerMetric) HasRequestsReceived() bool { + return obj.obj.RequestsReceived != nil +} + +// Number of DHCPREQUEST messages received. +// SetRequestsReceived sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetRequestsReceived(value uint64) Dhcpv6ServerMetric { + + obj.obj.RequestsReceived = &value + return obj +} + +// Number of naks sent for DHCPREQUEST messages. +// NacksSent returns a uint64 +func (obj *dhcpv6ServerMetric) NacksSent() uint64 { + + return *obj.obj.NacksSent + +} + +// Number of naks sent for DHCPREQUEST messages. +// NacksSent returns a uint64 +func (obj *dhcpv6ServerMetric) HasNacksSent() bool { + return obj.obj.NacksSent != nil +} + +// Number of naks sent for DHCPREQUEST messages. +// SetNacksSent sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetNacksSent(value uint64) Dhcpv6ServerMetric { + + obj.obj.NacksSent = &value + return obj +} + +// Number of DHCP Confirm messages received. +// ConfirmsReceived returns a uint64 +func (obj *dhcpv6ServerMetric) ConfirmsReceived() uint64 { + + return *obj.obj.ConfirmsReceived + +} + +// Number of DHCP Confirm messages received. +// ConfirmsReceived returns a uint64 +func (obj *dhcpv6ServerMetric) HasConfirmsReceived() bool { + return obj.obj.ConfirmsReceived != nil +} + +// Number of DHCP Confirm messages received. +// SetConfirmsReceived sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetConfirmsReceived(value uint64) Dhcpv6ServerMetric { + + obj.obj.ConfirmsReceived = &value + return obj +} + +// Number of DHCP Renewal messages received. +// RenewalsReceived returns a uint64 +func (obj *dhcpv6ServerMetric) RenewalsReceived() uint64 { + + return *obj.obj.RenewalsReceived + +} + +// Number of DHCP Renewal messages received. +// RenewalsReceived returns a uint64 +func (obj *dhcpv6ServerMetric) HasRenewalsReceived() bool { + return obj.obj.RenewalsReceived != nil +} + +// Number of DHCP Renewal messages received. +// SetRenewalsReceived sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetRenewalsReceived(value uint64) Dhcpv6ServerMetric { + + obj.obj.RenewalsReceived = &value + return obj +} + +// Number of DHCP Rebind messages received. +// RebindsReceived returns a uint64 +func (obj *dhcpv6ServerMetric) RebindsReceived() uint64 { + + return *obj.obj.RebindsReceived + +} + +// Number of DHCP Rebind messages received. +// RebindsReceived returns a uint64 +func (obj *dhcpv6ServerMetric) HasRebindsReceived() bool { + return obj.obj.RebindsReceived != nil +} + +// Number of DHCP Rebind messages received. +// SetRebindsReceived sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetRebindsReceived(value uint64) Dhcpv6ServerMetric { + + obj.obj.RebindsReceived = &value + return obj +} + +// Number of DHCP Reply messages sent. +// RepliesSent returns a uint64 +func (obj *dhcpv6ServerMetric) RepliesSent() uint64 { + + return *obj.obj.RepliesSent + +} + +// Number of DHCP Reply messages sent. +// RepliesSent returns a uint64 +func (obj *dhcpv6ServerMetric) HasRepliesSent() bool { + return obj.obj.RepliesSent != nil +} + +// Number of DHCP Reply messages sent. +// SetRepliesSent sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetRepliesSent(value uint64) Dhcpv6ServerMetric { + + obj.obj.RepliesSent = &value + return obj +} + +// Number of DHCP Release messages received. +// ReleasesReceived returns a uint64 +func (obj *dhcpv6ServerMetric) ReleasesReceived() uint64 { + + return *obj.obj.ReleasesReceived + +} + +// Number of DHCP Release messages received. +// ReleasesReceived returns a uint64 +func (obj *dhcpv6ServerMetric) HasReleasesReceived() bool { + return obj.obj.ReleasesReceived != nil +} + +// Number of DHCP Release messages received. +// SetReleasesReceived sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetReleasesReceived(value uint64) Dhcpv6ServerMetric { + + obj.obj.ReleasesReceived = &value + return obj +} + +// Number of DHCP Decline messages received. +// DeclinesReceived returns a uint64 +func (obj *dhcpv6ServerMetric) DeclinesReceived() uint64 { + + return *obj.obj.DeclinesReceived + +} + +// Number of DHCP Decline messages received. +// DeclinesReceived returns a uint64 +func (obj *dhcpv6ServerMetric) HasDeclinesReceived() bool { + return obj.obj.DeclinesReceived != nil +} + +// Number of DHCP Decline messages received. +// SetDeclinesReceived sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetDeclinesReceived(value uint64) Dhcpv6ServerMetric { + + obj.obj.DeclinesReceived = &value + return obj +} + +// Number of DHCP Information Request messages received. +// InformationRequestsReceived returns a uint64 +func (obj *dhcpv6ServerMetric) InformationRequestsReceived() uint64 { + + return *obj.obj.InformationRequestsReceived + +} + +// Number of DHCP Information Request messages received. +// InformationRequestsReceived returns a uint64 +func (obj *dhcpv6ServerMetric) HasInformationRequestsReceived() bool { + return obj.obj.InformationRequestsReceived != nil +} + +// Number of DHCP Information Request messages received. +// SetInformationRequestsReceived sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetInformationRequestsReceived(value uint64) Dhcpv6ServerMetric { + + obj.obj.InformationRequestsReceived = &value + return obj +} + +// Number of DHCP Relay agent forward messages received. +// RelayForwardsReceived returns a uint64 +func (obj *dhcpv6ServerMetric) RelayForwardsReceived() uint64 { + + return *obj.obj.RelayForwardsReceived + +} + +// Number of DHCP Relay agent forward messages received. +// RelayForwardsReceived returns a uint64 +func (obj *dhcpv6ServerMetric) HasRelayForwardsReceived() bool { + return obj.obj.RelayForwardsReceived != nil +} + +// Number of DHCP Relay agent forward messages received. +// SetRelayForwardsReceived sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetRelayForwardsReceived(value uint64) Dhcpv6ServerMetric { + + obj.obj.RelayForwardsReceived = &value + return obj +} + +// Number of DHCP reply messages sent to Relay agent. +// RelayRepliesSent returns a uint64 +func (obj *dhcpv6ServerMetric) RelayRepliesSent() uint64 { + + return *obj.obj.RelayRepliesSent + +} + +// Number of DHCP reply messages sent to Relay agent. +// RelayRepliesSent returns a uint64 +func (obj *dhcpv6ServerMetric) HasRelayRepliesSent() bool { + return obj.obj.RelayRepliesSent != nil +} + +// Number of DHCP reply messages sent to Relay agent. +// SetRelayRepliesSent sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetRelayRepliesSent(value uint64) Dhcpv6ServerMetric { + + obj.obj.RelayRepliesSent = &value + return obj +} + +// Number of DHCP Reconfigure messages sent. +// ReconfiguresSent returns a uint64 +func (obj *dhcpv6ServerMetric) ReconfiguresSent() uint64 { + + return *obj.obj.ReconfiguresSent + +} + +// Number of DHCP Reconfigure messages sent. +// ReconfiguresSent returns a uint64 +func (obj *dhcpv6ServerMetric) HasReconfiguresSent() bool { + return obj.obj.ReconfiguresSent != nil +} + +// Number of DHCP Reconfigure messages sent. +// SetReconfiguresSent sets the uint64 value in the Dhcpv6ServerMetric object +func (obj *dhcpv6ServerMetric) SetReconfiguresSent(value uint64) Dhcpv6ServerMetric { + + obj.obj.ReconfiguresSent = &value + return obj +} + +func (obj *dhcpv6ServerMetric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv6ServerMetric) setDefault() { + +} diff --git a/gosnappi/dhcpv6_server_metrics_request.go b/gosnappi/dhcpv6_server_metrics_request.go new file mode 100644 index 00000000..8b99c314 --- /dev/null +++ b/gosnappi/dhcpv6_server_metrics_request.go @@ -0,0 +1,379 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ServerMetricsRequest ***** +type dhcpv6ServerMetricsRequest struct { + validation + obj *otg.Dhcpv6ServerMetricsRequest + marshaller marshalDhcpv6ServerMetricsRequest + unMarshaller unMarshalDhcpv6ServerMetricsRequest +} + +func NewDhcpv6ServerMetricsRequest() Dhcpv6ServerMetricsRequest { + obj := dhcpv6ServerMetricsRequest{obj: &otg.Dhcpv6ServerMetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ServerMetricsRequest) msg() *otg.Dhcpv6ServerMetricsRequest { + return obj.obj +} + +func (obj *dhcpv6ServerMetricsRequest) setMsg(msg *otg.Dhcpv6ServerMetricsRequest) Dhcpv6ServerMetricsRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ServerMetricsRequest struct { + obj *dhcpv6ServerMetricsRequest +} + +type marshalDhcpv6ServerMetricsRequest interface { + // ToProto marshals Dhcpv6ServerMetricsRequest to protobuf object *otg.Dhcpv6ServerMetricsRequest + ToProto() (*otg.Dhcpv6ServerMetricsRequest, error) + // ToPbText marshals Dhcpv6ServerMetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ServerMetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ServerMetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ServerMetricsRequest struct { + obj *dhcpv6ServerMetricsRequest +} + +type unMarshalDhcpv6ServerMetricsRequest interface { + // FromProto unmarshals Dhcpv6ServerMetricsRequest from protobuf object *otg.Dhcpv6ServerMetricsRequest + FromProto(msg *otg.Dhcpv6ServerMetricsRequest) (Dhcpv6ServerMetricsRequest, error) + // FromPbText unmarshals Dhcpv6ServerMetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ServerMetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ServerMetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ServerMetricsRequest) Marshal() marshalDhcpv6ServerMetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ServerMetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ServerMetricsRequest) Unmarshal() unMarshalDhcpv6ServerMetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ServerMetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ServerMetricsRequest) ToProto() (*otg.Dhcpv6ServerMetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ServerMetricsRequest) FromProto(msg *otg.Dhcpv6ServerMetricsRequest) (Dhcpv6ServerMetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ServerMetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ServerMetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ServerMetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerMetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ServerMetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerMetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ServerMetricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ServerMetricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ServerMetricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ServerMetricsRequest) Clone() (Dhcpv6ServerMetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ServerMetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ServerMetricsRequest is the request to retrieve DHCPv6 per Server metrics/statistics. +type Dhcpv6ServerMetricsRequest interface { + Validation + // msg marshals Dhcpv6ServerMetricsRequest to protobuf object *otg.Dhcpv6ServerMetricsRequest + // and doesn't set defaults + msg() *otg.Dhcpv6ServerMetricsRequest + // setMsg unmarshals Dhcpv6ServerMetricsRequest from protobuf object *otg.Dhcpv6ServerMetricsRequest + // and doesn't set defaults + setMsg(*otg.Dhcpv6ServerMetricsRequest) Dhcpv6ServerMetricsRequest + // provides marshal interface + Marshal() marshalDhcpv6ServerMetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ServerMetricsRequest + // validate validates Dhcpv6ServerMetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ServerMetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ServerNames returns []string, set in Dhcpv6ServerMetricsRequest. + ServerNames() []string + // SetServerNames assigns []string provided by user to Dhcpv6ServerMetricsRequest + SetServerNames(value []string) Dhcpv6ServerMetricsRequest + // ColumnNames returns []Dhcpv6ServerMetricsRequestColumnNamesEnum, set in Dhcpv6ServerMetricsRequest + ColumnNames() []Dhcpv6ServerMetricsRequestColumnNamesEnum + // SetColumnNames assigns []Dhcpv6ServerMetricsRequestColumnNamesEnum provided by user to Dhcpv6ServerMetricsRequest + SetColumnNames(value []Dhcpv6ServerMetricsRequestColumnNamesEnum) Dhcpv6ServerMetricsRequest +} + +// The names of DHCPv6 Servers to return results for. An empty list will return results for all DHCPv6 Server. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6Server/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6Server/properties/name +// +// ServerNames returns a []string +func (obj *dhcpv6ServerMetricsRequest) ServerNames() []string { + if obj.obj.ServerNames == nil { + obj.obj.ServerNames = make([]string, 0) + } + return obj.obj.ServerNames +} + +// The names of DHCPv6 Servers to return results for. An empty list will return results for all DHCPv6 Server. +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6Server/properties/name +// +// x-constraint: +// - /components/schemas/Device.Dhcpv6Server/properties/name +// +// SetServerNames sets the []string value in the Dhcpv6ServerMetricsRequest object +func (obj *dhcpv6ServerMetricsRequest) SetServerNames(value []string) Dhcpv6ServerMetricsRequest { + + if obj.obj.ServerNames == nil { + obj.obj.ServerNames = make([]string, 0) + } + obj.obj.ServerNames = value + + return obj +} + +type Dhcpv6ServerMetricsRequestColumnNamesEnum string + +// Enum of ColumnNames on Dhcpv6ServerMetricsRequest +var Dhcpv6ServerMetricsRequestColumnNames = struct { + SOLICITS_RECEIVED Dhcpv6ServerMetricsRequestColumnNamesEnum + SOLICITS_IGNORED Dhcpv6ServerMetricsRequestColumnNamesEnum + ADVERTISEMENTS_SENT Dhcpv6ServerMetricsRequestColumnNamesEnum + REQUESTS_RECEIVED Dhcpv6ServerMetricsRequestColumnNamesEnum + NACKS_SENT Dhcpv6ServerMetricsRequestColumnNamesEnum + CONFIRMS_RECEIVED Dhcpv6ServerMetricsRequestColumnNamesEnum + RENEWALS_RECEIVED Dhcpv6ServerMetricsRequestColumnNamesEnum + REBINDS_RECEIVED Dhcpv6ServerMetricsRequestColumnNamesEnum + REPLIES_SENT Dhcpv6ServerMetricsRequestColumnNamesEnum + RELEASES_RECEIVED Dhcpv6ServerMetricsRequestColumnNamesEnum + DECLINES_RECEIVED Dhcpv6ServerMetricsRequestColumnNamesEnum + INFORMATION_REQUESTS_RECEIVED Dhcpv6ServerMetricsRequestColumnNamesEnum + RELAY_FORWARDS_RECEIVED Dhcpv6ServerMetricsRequestColumnNamesEnum + RELAY_REPLIES_SENT Dhcpv6ServerMetricsRequestColumnNamesEnum + RECONFIGURES_SENT Dhcpv6ServerMetricsRequestColumnNamesEnum +}{ + SOLICITS_RECEIVED: Dhcpv6ServerMetricsRequestColumnNamesEnum("solicits_received"), + SOLICITS_IGNORED: Dhcpv6ServerMetricsRequestColumnNamesEnum("solicits_ignored"), + ADVERTISEMENTS_SENT: Dhcpv6ServerMetricsRequestColumnNamesEnum("advertisements_sent"), + REQUESTS_RECEIVED: Dhcpv6ServerMetricsRequestColumnNamesEnum("requests_received"), + NACKS_SENT: Dhcpv6ServerMetricsRequestColumnNamesEnum("nacks_sent"), + CONFIRMS_RECEIVED: Dhcpv6ServerMetricsRequestColumnNamesEnum("confirms_received"), + RENEWALS_RECEIVED: Dhcpv6ServerMetricsRequestColumnNamesEnum("renewals_received"), + REBINDS_RECEIVED: Dhcpv6ServerMetricsRequestColumnNamesEnum("rebinds_received"), + REPLIES_SENT: Dhcpv6ServerMetricsRequestColumnNamesEnum("replies_sent"), + RELEASES_RECEIVED: Dhcpv6ServerMetricsRequestColumnNamesEnum("releases_received"), + DECLINES_RECEIVED: Dhcpv6ServerMetricsRequestColumnNamesEnum("declines_received"), + INFORMATION_REQUESTS_RECEIVED: Dhcpv6ServerMetricsRequestColumnNamesEnum("information_requests_received"), + RELAY_FORWARDS_RECEIVED: Dhcpv6ServerMetricsRequestColumnNamesEnum("relay_forwards_received"), + RELAY_REPLIES_SENT: Dhcpv6ServerMetricsRequestColumnNamesEnum("relay_replies_sent"), + RECONFIGURES_SENT: Dhcpv6ServerMetricsRequestColumnNamesEnum("reconfigures_sent"), +} + +func (obj *dhcpv6ServerMetricsRequest) ColumnNames() []Dhcpv6ServerMetricsRequestColumnNamesEnum { + items := []Dhcpv6ServerMetricsRequestColumnNamesEnum{} + for _, item := range obj.obj.ColumnNames { + items = append(items, Dhcpv6ServerMetricsRequestColumnNamesEnum(item.String())) + } + return items +} + +// The list of column names that the returned result set will contain. If the list is empty then all columns will be returned except for any result_groups. The name of the DHCPv6 server cannot be excluded. +// SetColumnNames sets the []string value in the Dhcpv6ServerMetricsRequest object +func (obj *dhcpv6ServerMetricsRequest) SetColumnNames(value []Dhcpv6ServerMetricsRequestColumnNamesEnum) Dhcpv6ServerMetricsRequest { + + items := []otg.Dhcpv6ServerMetricsRequest_ColumnNames_Enum{} + for _, item := range value { + intValue := otg.Dhcpv6ServerMetricsRequest_ColumnNames_Enum_value[string(item)] + items = append(items, otg.Dhcpv6ServerMetricsRequest_ColumnNames_Enum(intValue)) + } + obj.obj.ColumnNames = items + return obj +} + +func (obj *dhcpv6ServerMetricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv6ServerMetricsRequest) setDefault() { + +} diff --git a/gosnappi/dhcpv6_server_options.go b/gosnappi/dhcpv6_server_options.go new file mode 100644 index 00000000..41617864 --- /dev/null +++ b/gosnappi/dhcpv6_server_options.go @@ -0,0 +1,417 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ServerOptions ***** +type dhcpv6ServerOptions struct { + validation + obj *otg.Dhcpv6ServerOptions + marshaller marshalDhcpv6ServerOptions + unMarshaller unMarshalDhcpv6ServerOptions + dnsHolder DhcpV6ServerDns + vendorInfoHolder Dhcpv6ServerOptionsVendorInfo + bootfileUrlHolder Dhcpv6ServerOptionsBootfileUrl +} + +func NewDhcpv6ServerOptions() Dhcpv6ServerOptions { + obj := dhcpv6ServerOptions{obj: &otg.Dhcpv6ServerOptions{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ServerOptions) msg() *otg.Dhcpv6ServerOptions { + return obj.obj +} + +func (obj *dhcpv6ServerOptions) setMsg(msg *otg.Dhcpv6ServerOptions) Dhcpv6ServerOptions { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ServerOptions struct { + obj *dhcpv6ServerOptions +} + +type marshalDhcpv6ServerOptions interface { + // ToProto marshals Dhcpv6ServerOptions to protobuf object *otg.Dhcpv6ServerOptions + ToProto() (*otg.Dhcpv6ServerOptions, error) + // ToPbText marshals Dhcpv6ServerOptions to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ServerOptions to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ServerOptions to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ServerOptions struct { + obj *dhcpv6ServerOptions +} + +type unMarshalDhcpv6ServerOptions interface { + // FromProto unmarshals Dhcpv6ServerOptions from protobuf object *otg.Dhcpv6ServerOptions + FromProto(msg *otg.Dhcpv6ServerOptions) (Dhcpv6ServerOptions, error) + // FromPbText unmarshals Dhcpv6ServerOptions from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ServerOptions from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ServerOptions from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ServerOptions) Marshal() marshalDhcpv6ServerOptions { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ServerOptions{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ServerOptions) Unmarshal() unMarshalDhcpv6ServerOptions { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ServerOptions{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ServerOptions) ToProto() (*otg.Dhcpv6ServerOptions, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ServerOptions) FromProto(msg *otg.Dhcpv6ServerOptions) (Dhcpv6ServerOptions, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ServerOptions) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ServerOptions) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ServerOptions) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerOptions) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ServerOptions) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerOptions) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ServerOptions) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ServerOptions) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ServerOptions) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ServerOptions) Clone() (Dhcpv6ServerOptions, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ServerOptions() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ServerOptions) setNil() { + obj.dnsHolder = nil + obj.vendorInfoHolder = nil + obj.bootfileUrlHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ServerOptions is dHCP server options, these configured options are sent in Dhcp server messages. +type Dhcpv6ServerOptions interface { + Validation + // msg marshals Dhcpv6ServerOptions to protobuf object *otg.Dhcpv6ServerOptions + // and doesn't set defaults + msg() *otg.Dhcpv6ServerOptions + // setMsg unmarshals Dhcpv6ServerOptions from protobuf object *otg.Dhcpv6ServerOptions + // and doesn't set defaults + setMsg(*otg.Dhcpv6ServerOptions) Dhcpv6ServerOptions + // provides marshal interface + Marshal() marshalDhcpv6ServerOptions + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ServerOptions + // validate validates Dhcpv6ServerOptions + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ServerOptions, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Dns returns DhcpV6ServerDns, set in Dhcpv6ServerOptions. + // DhcpV6ServerDns is optional Dns configuration for DHCPv6 server. + Dns() DhcpV6ServerDns + // SetDns assigns DhcpV6ServerDns provided by user to Dhcpv6ServerOptions. + // DhcpV6ServerDns is optional Dns configuration for DHCPv6 server. + SetDns(value DhcpV6ServerDns) Dhcpv6ServerOptions + // HasDns checks if Dns has been set in Dhcpv6ServerOptions + HasDns() bool + // VendorInfo returns Dhcpv6ServerOptionsVendorInfo, set in Dhcpv6ServerOptions. + // Dhcpv6ServerOptionsVendorInfo is this option is used by servers to exchange vendor-specific information. The option code is 17. + VendorInfo() Dhcpv6ServerOptionsVendorInfo + // SetVendorInfo assigns Dhcpv6ServerOptionsVendorInfo provided by user to Dhcpv6ServerOptions. + // Dhcpv6ServerOptionsVendorInfo is this option is used by servers to exchange vendor-specific information. The option code is 17. + SetVendorInfo(value Dhcpv6ServerOptionsVendorInfo) Dhcpv6ServerOptions + // HasVendorInfo checks if VendorInfo has been set in Dhcpv6ServerOptions + HasVendorInfo() bool + // BootfileUrl returns Dhcpv6ServerOptionsBootfileUrl, set in Dhcpv6ServerOptions. + // Dhcpv6ServerOptionsBootfileUrl is the server sends this option to inform the client about a URL to a boot file. This information is required for booting over the network includes the details about the server on which the boot files can be found, the protocol to be used for the download (for example,HTTP or TFTP, and the path and name of the boot file on the server. The option code is 59. The URL will contain the network communication protocol, a subdomain, a domain name, and its extension. If the host in the URL is expressed using an IPv6 address rather than a domain name, the address in the URL then must be enclosed in "[" and "]" characters, conforming to [RFC3986]. Eg of a boot file url can be "tftp://[xxxx:xxxx:xxxx:xxxx::xxxx]/mboot.efi". + BootfileUrl() Dhcpv6ServerOptionsBootfileUrl + // SetBootfileUrl assigns Dhcpv6ServerOptionsBootfileUrl provided by user to Dhcpv6ServerOptions. + // Dhcpv6ServerOptionsBootfileUrl is the server sends this option to inform the client about a URL to a boot file. This information is required for booting over the network includes the details about the server on which the boot files can be found, the protocol to be used for the download (for example,HTTP or TFTP, and the path and name of the boot file on the server. The option code is 59. The URL will contain the network communication protocol, a subdomain, a domain name, and its extension. If the host in the URL is expressed using an IPv6 address rather than a domain name, the address in the URL then must be enclosed in "[" and "]" characters, conforming to [RFC3986]. Eg of a boot file url can be "tftp://[xxxx:xxxx:xxxx:xxxx::xxxx]/mboot.efi". + SetBootfileUrl(value Dhcpv6ServerOptionsBootfileUrl) Dhcpv6ServerOptions + // HasBootfileUrl checks if BootfileUrl has been set in Dhcpv6ServerOptions + HasBootfileUrl() bool + setNil() +} + +// Additional DHCP server primary dns and other configuration options. +// Dns returns a DhcpV6ServerDns +func (obj *dhcpv6ServerOptions) Dns() DhcpV6ServerDns { + if obj.obj.Dns == nil { + obj.obj.Dns = NewDhcpV6ServerDns().msg() + } + if obj.dnsHolder == nil { + obj.dnsHolder = &dhcpV6ServerDns{obj: obj.obj.Dns} + } + return obj.dnsHolder +} + +// Additional DHCP server primary dns and other configuration options. +// Dns returns a DhcpV6ServerDns +func (obj *dhcpv6ServerOptions) HasDns() bool { + return obj.obj.Dns != nil +} + +// Additional DHCP server primary dns and other configuration options. +// SetDns sets the DhcpV6ServerDns value in the Dhcpv6ServerOptions object +func (obj *dhcpv6ServerOptions) SetDns(value DhcpV6ServerDns) Dhcpv6ServerOptions { + + obj.dnsHolder = nil + obj.obj.Dns = value.msg() + + return obj +} + +// This option is used by servers to exchange vendor-specific information with clients. +// VendorInfo returns a Dhcpv6ServerOptionsVendorInfo +func (obj *dhcpv6ServerOptions) VendorInfo() Dhcpv6ServerOptionsVendorInfo { + if obj.obj.VendorInfo == nil { + obj.obj.VendorInfo = NewDhcpv6ServerOptionsVendorInfo().msg() + } + if obj.vendorInfoHolder == nil { + obj.vendorInfoHolder = &dhcpv6ServerOptionsVendorInfo{obj: obj.obj.VendorInfo} + } + return obj.vendorInfoHolder +} + +// This option is used by servers to exchange vendor-specific information with clients. +// VendorInfo returns a Dhcpv6ServerOptionsVendorInfo +func (obj *dhcpv6ServerOptions) HasVendorInfo() bool { + return obj.obj.VendorInfo != nil +} + +// This option is used by servers to exchange vendor-specific information with clients. +// SetVendorInfo sets the Dhcpv6ServerOptionsVendorInfo value in the Dhcpv6ServerOptions object +func (obj *dhcpv6ServerOptions) SetVendorInfo(value Dhcpv6ServerOptionsVendorInfo) Dhcpv6ServerOptions { + + obj.vendorInfoHolder = nil + obj.obj.VendorInfo = value.msg() + + return obj +} + +// The server sends this option to inform the client about a URL to a boot file which client will use for +// network boots. +// BootfileUrl returns a Dhcpv6ServerOptionsBootfileUrl +func (obj *dhcpv6ServerOptions) BootfileUrl() Dhcpv6ServerOptionsBootfileUrl { + if obj.obj.BootfileUrl == nil { + obj.obj.BootfileUrl = NewDhcpv6ServerOptionsBootfileUrl().msg() + } + if obj.bootfileUrlHolder == nil { + obj.bootfileUrlHolder = &dhcpv6ServerOptionsBootfileUrl{obj: obj.obj.BootfileUrl} + } + return obj.bootfileUrlHolder +} + +// The server sends this option to inform the client about a URL to a boot file which client will use for +// network boots. +// BootfileUrl returns a Dhcpv6ServerOptionsBootfileUrl +func (obj *dhcpv6ServerOptions) HasBootfileUrl() bool { + return obj.obj.BootfileUrl != nil +} + +// The server sends this option to inform the client about a URL to a boot file which client will use for +// network boots. +// SetBootfileUrl sets the Dhcpv6ServerOptionsBootfileUrl value in the Dhcpv6ServerOptions object +func (obj *dhcpv6ServerOptions) SetBootfileUrl(value Dhcpv6ServerOptionsBootfileUrl) Dhcpv6ServerOptions { + + obj.bootfileUrlHolder = nil + obj.obj.BootfileUrl = value.msg() + + return obj +} + +func (obj *dhcpv6ServerOptions) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Dns != nil { + + obj.Dns().validateObj(vObj, set_default) + } + + if obj.obj.VendorInfo != nil { + + obj.VendorInfo().validateObj(vObj, set_default) + } + + if obj.obj.BootfileUrl != nil { + + obj.BootfileUrl().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpv6ServerOptions) setDefault() { + +} diff --git a/gosnappi/dhcpv6_server_options_boot_file_params.go b/gosnappi/dhcpv6_server_options_boot_file_params.go new file mode 100644 index 00000000..836fc8b6 --- /dev/null +++ b/gosnappi/dhcpv6_server_options_boot_file_params.go @@ -0,0 +1,302 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ServerOptionsBootFileParams ***** +type dhcpv6ServerOptionsBootFileParams struct { + validation + obj *otg.Dhcpv6ServerOptionsBootFileParams + marshaller marshalDhcpv6ServerOptionsBootFileParams + unMarshaller unMarshalDhcpv6ServerOptionsBootFileParams +} + +func NewDhcpv6ServerOptionsBootFileParams() Dhcpv6ServerOptionsBootFileParams { + obj := dhcpv6ServerOptionsBootFileParams{obj: &otg.Dhcpv6ServerOptionsBootFileParams{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ServerOptionsBootFileParams) msg() *otg.Dhcpv6ServerOptionsBootFileParams { + return obj.obj +} + +func (obj *dhcpv6ServerOptionsBootFileParams) setMsg(msg *otg.Dhcpv6ServerOptionsBootFileParams) Dhcpv6ServerOptionsBootFileParams { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ServerOptionsBootFileParams struct { + obj *dhcpv6ServerOptionsBootFileParams +} + +type marshalDhcpv6ServerOptionsBootFileParams interface { + // ToProto marshals Dhcpv6ServerOptionsBootFileParams to protobuf object *otg.Dhcpv6ServerOptionsBootFileParams + ToProto() (*otg.Dhcpv6ServerOptionsBootFileParams, error) + // ToPbText marshals Dhcpv6ServerOptionsBootFileParams to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ServerOptionsBootFileParams to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ServerOptionsBootFileParams to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ServerOptionsBootFileParams struct { + obj *dhcpv6ServerOptionsBootFileParams +} + +type unMarshalDhcpv6ServerOptionsBootFileParams interface { + // FromProto unmarshals Dhcpv6ServerOptionsBootFileParams from protobuf object *otg.Dhcpv6ServerOptionsBootFileParams + FromProto(msg *otg.Dhcpv6ServerOptionsBootFileParams) (Dhcpv6ServerOptionsBootFileParams, error) + // FromPbText unmarshals Dhcpv6ServerOptionsBootFileParams from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ServerOptionsBootFileParams from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ServerOptionsBootFileParams from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ServerOptionsBootFileParams) Marshal() marshalDhcpv6ServerOptionsBootFileParams { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ServerOptionsBootFileParams{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ServerOptionsBootFileParams) Unmarshal() unMarshalDhcpv6ServerOptionsBootFileParams { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ServerOptionsBootFileParams{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ServerOptionsBootFileParams) ToProto() (*otg.Dhcpv6ServerOptionsBootFileParams, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ServerOptionsBootFileParams) FromProto(msg *otg.Dhcpv6ServerOptionsBootFileParams) (Dhcpv6ServerOptionsBootFileParams, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ServerOptionsBootFileParams) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ServerOptionsBootFileParams) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ServerOptionsBootFileParams) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerOptionsBootFileParams) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ServerOptionsBootFileParams) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerOptionsBootFileParams) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ServerOptionsBootFileParams) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ServerOptionsBootFileParams) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ServerOptionsBootFileParams) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ServerOptionsBootFileParams) Clone() (Dhcpv6ServerOptionsBootFileParams, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ServerOptionsBootFileParams() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ServerOptionsBootFileParams is the option code is 60. They are used to specify parameters for the boot file (similar to the command line arguments in most modern operating systems). For example, these parameters could be used to specify the root file system of the OS kernel, or the location from which a second-stage boot-loader program can download its configuration file. +type Dhcpv6ServerOptionsBootFileParams interface { + Validation + // msg marshals Dhcpv6ServerOptionsBootFileParams to protobuf object *otg.Dhcpv6ServerOptionsBootFileParams + // and doesn't set defaults + msg() *otg.Dhcpv6ServerOptionsBootFileParams + // setMsg unmarshals Dhcpv6ServerOptionsBootFileParams from protobuf object *otg.Dhcpv6ServerOptionsBootFileParams + // and doesn't set defaults + setMsg(*otg.Dhcpv6ServerOptionsBootFileParams) Dhcpv6ServerOptionsBootFileParams + // provides marshal interface + Marshal() marshalDhcpv6ServerOptionsBootFileParams + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ServerOptionsBootFileParams + // validate validates Dhcpv6ServerOptionsBootFileParams + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ServerOptionsBootFileParams, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Parameter returns string, set in Dhcpv6ServerOptionsBootFileParams. + Parameter() string + // SetParameter assigns string provided by user to Dhcpv6ServerOptionsBootFileParams + SetParameter(value string) Dhcpv6ServerOptionsBootFileParams +} + +// UTF-8 strings are parameters needed for booting, e.g., kernel parameters. +// Parameter returns a string +func (obj *dhcpv6ServerOptionsBootFileParams) Parameter() string { + + return *obj.obj.Parameter + +} + +// UTF-8 strings are parameters needed for booting, e.g., kernel parameters. +// SetParameter sets the string value in the Dhcpv6ServerOptionsBootFileParams object +func (obj *dhcpv6ServerOptionsBootFileParams) SetParameter(value string) Dhcpv6ServerOptionsBootFileParams { + + obj.obj.Parameter = &value + return obj +} + +func (obj *dhcpv6ServerOptionsBootFileParams) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Parameter is required + if obj.obj.Parameter == nil { + vObj.validationErrors = append(vObj.validationErrors, "Parameter is required field on interface Dhcpv6ServerOptionsBootFileParams") + } +} + +func (obj *dhcpv6ServerOptionsBootFileParams) setDefault() { + +} diff --git a/gosnappi/dhcpv6_server_options_bootfile_url.go b/gosnappi/dhcpv6_server_options_bootfile_url.go new file mode 100644 index 00000000..e8c42a1e --- /dev/null +++ b/gosnappi/dhcpv6_server_options_bootfile_url.go @@ -0,0 +1,458 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ServerOptionsBootfileUrl ***** +type dhcpv6ServerOptionsBootfileUrl struct { + validation + obj *otg.Dhcpv6ServerOptionsBootfileUrl + marshaller marshalDhcpv6ServerOptionsBootfileUrl + unMarshaller unMarshalDhcpv6ServerOptionsBootfileUrl + bootfileParamsHolder Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter + associatedDhcpMessagesHolder Dhcpv6ServerOptionsIncludedMessages +} + +func NewDhcpv6ServerOptionsBootfileUrl() Dhcpv6ServerOptionsBootfileUrl { + obj := dhcpv6ServerOptionsBootfileUrl{obj: &otg.Dhcpv6ServerOptionsBootfileUrl{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ServerOptionsBootfileUrl) msg() *otg.Dhcpv6ServerOptionsBootfileUrl { + return obj.obj +} + +func (obj *dhcpv6ServerOptionsBootfileUrl) setMsg(msg *otg.Dhcpv6ServerOptionsBootfileUrl) Dhcpv6ServerOptionsBootfileUrl { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ServerOptionsBootfileUrl struct { + obj *dhcpv6ServerOptionsBootfileUrl +} + +type marshalDhcpv6ServerOptionsBootfileUrl interface { + // ToProto marshals Dhcpv6ServerOptionsBootfileUrl to protobuf object *otg.Dhcpv6ServerOptionsBootfileUrl + ToProto() (*otg.Dhcpv6ServerOptionsBootfileUrl, error) + // ToPbText marshals Dhcpv6ServerOptionsBootfileUrl to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ServerOptionsBootfileUrl to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ServerOptionsBootfileUrl to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ServerOptionsBootfileUrl struct { + obj *dhcpv6ServerOptionsBootfileUrl +} + +type unMarshalDhcpv6ServerOptionsBootfileUrl interface { + // FromProto unmarshals Dhcpv6ServerOptionsBootfileUrl from protobuf object *otg.Dhcpv6ServerOptionsBootfileUrl + FromProto(msg *otg.Dhcpv6ServerOptionsBootfileUrl) (Dhcpv6ServerOptionsBootfileUrl, error) + // FromPbText unmarshals Dhcpv6ServerOptionsBootfileUrl from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ServerOptionsBootfileUrl from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ServerOptionsBootfileUrl from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ServerOptionsBootfileUrl) Marshal() marshalDhcpv6ServerOptionsBootfileUrl { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ServerOptionsBootfileUrl{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ServerOptionsBootfileUrl) Unmarshal() unMarshalDhcpv6ServerOptionsBootfileUrl { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ServerOptionsBootfileUrl{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ServerOptionsBootfileUrl) ToProto() (*otg.Dhcpv6ServerOptionsBootfileUrl, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ServerOptionsBootfileUrl) FromProto(msg *otg.Dhcpv6ServerOptionsBootfileUrl) (Dhcpv6ServerOptionsBootfileUrl, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ServerOptionsBootfileUrl) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ServerOptionsBootfileUrl) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ServerOptionsBootfileUrl) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerOptionsBootfileUrl) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ServerOptionsBootfileUrl) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerOptionsBootfileUrl) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ServerOptionsBootfileUrl) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ServerOptionsBootfileUrl) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ServerOptionsBootfileUrl) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ServerOptionsBootfileUrl) Clone() (Dhcpv6ServerOptionsBootfileUrl, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ServerOptionsBootfileUrl() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ServerOptionsBootfileUrl) setNil() { + obj.bootfileParamsHolder = nil + obj.associatedDhcpMessagesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ServerOptionsBootfileUrl is the server sends this option to inform the client about a URL to a boot file. This information is required for booting over the network includes the details about the server on which the boot files can be found, the protocol to be used for the download (for example,HTTP or TFTP, and the path and name of the boot file on the server. The option code is 59. The URL will contain the network communication protocol, a subdomain, a domain name, and its extension. If the host in the URL is expressed using an IPv6 address rather than a domain name, the address in the URL then must be enclosed in "[" and "]" characters, conforming to [RFC3986]. Eg of a boot file url can be "tftp://[xxxx:xxxx:xxxx:xxxx::xxxx]/mboot.efi". +type Dhcpv6ServerOptionsBootfileUrl interface { + Validation + // msg marshals Dhcpv6ServerOptionsBootfileUrl to protobuf object *otg.Dhcpv6ServerOptionsBootfileUrl + // and doesn't set defaults + msg() *otg.Dhcpv6ServerOptionsBootfileUrl + // setMsg unmarshals Dhcpv6ServerOptionsBootfileUrl from protobuf object *otg.Dhcpv6ServerOptionsBootfileUrl + // and doesn't set defaults + setMsg(*otg.Dhcpv6ServerOptionsBootfileUrl) Dhcpv6ServerOptionsBootfileUrl + // provides marshal interface + Marshal() marshalDhcpv6ServerOptionsBootfileUrl + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ServerOptionsBootfileUrl + // validate validates Dhcpv6ServerOptionsBootfileUrl + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ServerOptionsBootfileUrl, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Url returns string, set in Dhcpv6ServerOptionsBootfileUrl. + Url() string + // SetUrl assigns string provided by user to Dhcpv6ServerOptionsBootfileUrl + SetUrl(value string) Dhcpv6ServerOptionsBootfileUrl + // BootfileParams returns Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIterIter, set in Dhcpv6ServerOptionsBootfileUrl + BootfileParams() Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter + // AssociatedDhcpMessages returns Dhcpv6ServerOptionsIncludedMessages, set in Dhcpv6ServerOptionsBootfileUrl. + // Dhcpv6ServerOptionsIncludedMessages is the dhcpv6 server messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 server messages, else based on the selection in particular Dhcpv6 server messages the option will be included. + AssociatedDhcpMessages() Dhcpv6ServerOptionsIncludedMessages + // SetAssociatedDhcpMessages assigns Dhcpv6ServerOptionsIncludedMessages provided by user to Dhcpv6ServerOptionsBootfileUrl. + // Dhcpv6ServerOptionsIncludedMessages is the dhcpv6 server messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 server messages, else based on the selection in particular Dhcpv6 server messages the option will be included. + SetAssociatedDhcpMessages(value Dhcpv6ServerOptionsIncludedMessages) Dhcpv6ServerOptionsBootfileUrl + // HasAssociatedDhcpMessages checks if AssociatedDhcpMessages has been set in Dhcpv6ServerOptionsBootfileUrl + HasAssociatedDhcpMessages() bool + setNil() +} + +// The URL for the boot file. It must comply with STD 66 format. +// Url returns a string +func (obj *dhcpv6ServerOptionsBootfileUrl) Url() string { + + return *obj.obj.Url + +} + +// The URL for the boot file. It must comply with STD 66 format. +// SetUrl sets the string value in the Dhcpv6ServerOptionsBootfileUrl object +func (obj *dhcpv6ServerOptionsBootfileUrl) SetUrl(value string) Dhcpv6ServerOptionsBootfileUrl { + + obj.obj.Url = &value + return obj +} + +// They are used to specify parameters for the boot file (similar to the command line arguments in most modern operating systems). For example, these parameters could be used to specify the root file system of the OS kernel, or the location from which a second-stage boot-loader program can download its configuration file. +// BootfileParams returns a []Dhcpv6ServerOptionsBootFileParams +func (obj *dhcpv6ServerOptionsBootfileUrl) BootfileParams() Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter { + if len(obj.obj.BootfileParams) == 0 { + obj.obj.BootfileParams = []*otg.Dhcpv6ServerOptionsBootFileParams{} + } + if obj.bootfileParamsHolder == nil { + obj.bootfileParamsHolder = newDhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter(&obj.obj.BootfileParams).setMsg(obj) + } + return obj.bootfileParamsHolder +} + +type dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter struct { + obj *dhcpv6ServerOptionsBootfileUrl + dhcpv6ServerOptionsBootFileParamsSlice []Dhcpv6ServerOptionsBootFileParams + fieldPtr *[]*otg.Dhcpv6ServerOptionsBootFileParams +} + +func newDhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter(ptr *[]*otg.Dhcpv6ServerOptionsBootFileParams) Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter { + return &dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter{fieldPtr: ptr} +} + +type Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter interface { + setMsg(*dhcpv6ServerOptionsBootfileUrl) Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter + Items() []Dhcpv6ServerOptionsBootFileParams + Add() Dhcpv6ServerOptionsBootFileParams + Append(items ...Dhcpv6ServerOptionsBootFileParams) Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter + Set(index int, newObj Dhcpv6ServerOptionsBootFileParams) Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter + Clear() Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter + clearHolderSlice() Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter + appendHolderSlice(item Dhcpv6ServerOptionsBootFileParams) Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter +} + +func (obj *dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter) setMsg(msg *dhcpv6ServerOptionsBootfileUrl) Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv6ServerOptionsBootFileParams{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter) Items() []Dhcpv6ServerOptionsBootFileParams { + return obj.dhcpv6ServerOptionsBootFileParamsSlice +} + +func (obj *dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter) Add() Dhcpv6ServerOptionsBootFileParams { + newObj := &otg.Dhcpv6ServerOptionsBootFileParams{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv6ServerOptionsBootFileParams{obj: newObj} + newLibObj.setDefault() + obj.dhcpv6ServerOptionsBootFileParamsSlice = append(obj.dhcpv6ServerOptionsBootFileParamsSlice, newLibObj) + return newLibObj +} + +func (obj *dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter) Append(items ...Dhcpv6ServerOptionsBootFileParams) Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv6ServerOptionsBootFileParamsSlice = append(obj.dhcpv6ServerOptionsBootFileParamsSlice, item) + } + return obj +} + +func (obj *dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter) Set(index int, newObj Dhcpv6ServerOptionsBootFileParams) Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv6ServerOptionsBootFileParamsSlice[index] = newObj + return obj +} +func (obj *dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter) Clear() Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv6ServerOptionsBootFileParams{} + obj.dhcpv6ServerOptionsBootFileParamsSlice = []Dhcpv6ServerOptionsBootFileParams{} + } + return obj +} +func (obj *dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter) clearHolderSlice() Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter { + if len(obj.dhcpv6ServerOptionsBootFileParamsSlice) > 0 { + obj.dhcpv6ServerOptionsBootFileParamsSlice = []Dhcpv6ServerOptionsBootFileParams{} + } + return obj +} +func (obj *dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter) appendHolderSlice(item Dhcpv6ServerOptionsBootFileParams) Dhcpv6ServerOptionsBootfileUrlDhcpv6ServerOptionsBootFileParamsIter { + obj.dhcpv6ServerOptionsBootFileParamsSlice = append(obj.dhcpv6ServerOptionsBootFileParamsSlice, item) + return obj +} + +// The list of dhcpv6 client messages where this option is included. +// AssociatedDhcpMessages returns a Dhcpv6ServerOptionsIncludedMessages +func (obj *dhcpv6ServerOptionsBootfileUrl) AssociatedDhcpMessages() Dhcpv6ServerOptionsIncludedMessages { + if obj.obj.AssociatedDhcpMessages == nil { + obj.obj.AssociatedDhcpMessages = NewDhcpv6ServerOptionsIncludedMessages().msg() + } + if obj.associatedDhcpMessagesHolder == nil { + obj.associatedDhcpMessagesHolder = &dhcpv6ServerOptionsIncludedMessages{obj: obj.obj.AssociatedDhcpMessages} + } + return obj.associatedDhcpMessagesHolder +} + +// The list of dhcpv6 client messages where this option is included. +// AssociatedDhcpMessages returns a Dhcpv6ServerOptionsIncludedMessages +func (obj *dhcpv6ServerOptionsBootfileUrl) HasAssociatedDhcpMessages() bool { + return obj.obj.AssociatedDhcpMessages != nil +} + +// The list of dhcpv6 client messages where this option is included. +// SetAssociatedDhcpMessages sets the Dhcpv6ServerOptionsIncludedMessages value in the Dhcpv6ServerOptionsBootfileUrl object +func (obj *dhcpv6ServerOptionsBootfileUrl) SetAssociatedDhcpMessages(value Dhcpv6ServerOptionsIncludedMessages) Dhcpv6ServerOptionsBootfileUrl { + + obj.associatedDhcpMessagesHolder = nil + obj.obj.AssociatedDhcpMessages = value.msg() + + return obj +} + +func (obj *dhcpv6ServerOptionsBootfileUrl) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Url is required + if obj.obj.Url == nil { + vObj.validationErrors = append(vObj.validationErrors, "Url is required field on interface Dhcpv6ServerOptionsBootfileUrl") + } + + if len(obj.obj.BootfileParams) != 0 { + + if set_default { + obj.BootfileParams().clearHolderSlice() + for _, item := range obj.obj.BootfileParams { + obj.BootfileParams().appendHolderSlice(&dhcpv6ServerOptionsBootFileParams{obj: item}) + } + } + for _, item := range obj.BootfileParams().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.AssociatedDhcpMessages != nil { + + obj.AssociatedDhcpMessages().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpv6ServerOptionsBootfileUrl) setDefault() { + +} diff --git a/gosnappi/dhcpv6_server_options_included_messages.go b/gosnappi/dhcpv6_server_options_included_messages.go new file mode 100644 index 00000000..c2d23a24 --- /dev/null +++ b/gosnappi/dhcpv6_server_options_included_messages.go @@ -0,0 +1,467 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ServerOptionsIncludedMessages ***** +type dhcpv6ServerOptionsIncludedMessages struct { + validation + obj *otg.Dhcpv6ServerOptionsIncludedMessages + marshaller marshalDhcpv6ServerOptionsIncludedMessages + unMarshaller unMarshalDhcpv6ServerOptionsIncludedMessages + msgTypesHolder Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter +} + +func NewDhcpv6ServerOptionsIncludedMessages() Dhcpv6ServerOptionsIncludedMessages { + obj := dhcpv6ServerOptionsIncludedMessages{obj: &otg.Dhcpv6ServerOptionsIncludedMessages{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ServerOptionsIncludedMessages) msg() *otg.Dhcpv6ServerOptionsIncludedMessages { + return obj.obj +} + +func (obj *dhcpv6ServerOptionsIncludedMessages) setMsg(msg *otg.Dhcpv6ServerOptionsIncludedMessages) Dhcpv6ServerOptionsIncludedMessages { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ServerOptionsIncludedMessages struct { + obj *dhcpv6ServerOptionsIncludedMessages +} + +type marshalDhcpv6ServerOptionsIncludedMessages interface { + // ToProto marshals Dhcpv6ServerOptionsIncludedMessages to protobuf object *otg.Dhcpv6ServerOptionsIncludedMessages + ToProto() (*otg.Dhcpv6ServerOptionsIncludedMessages, error) + // ToPbText marshals Dhcpv6ServerOptionsIncludedMessages to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ServerOptionsIncludedMessages to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ServerOptionsIncludedMessages to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ServerOptionsIncludedMessages struct { + obj *dhcpv6ServerOptionsIncludedMessages +} + +type unMarshalDhcpv6ServerOptionsIncludedMessages interface { + // FromProto unmarshals Dhcpv6ServerOptionsIncludedMessages from protobuf object *otg.Dhcpv6ServerOptionsIncludedMessages + FromProto(msg *otg.Dhcpv6ServerOptionsIncludedMessages) (Dhcpv6ServerOptionsIncludedMessages, error) + // FromPbText unmarshals Dhcpv6ServerOptionsIncludedMessages from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ServerOptionsIncludedMessages from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ServerOptionsIncludedMessages from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ServerOptionsIncludedMessages) Marshal() marshalDhcpv6ServerOptionsIncludedMessages { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ServerOptionsIncludedMessages{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ServerOptionsIncludedMessages) Unmarshal() unMarshalDhcpv6ServerOptionsIncludedMessages { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ServerOptionsIncludedMessages{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ServerOptionsIncludedMessages) ToProto() (*otg.Dhcpv6ServerOptionsIncludedMessages, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ServerOptionsIncludedMessages) FromProto(msg *otg.Dhcpv6ServerOptionsIncludedMessages) (Dhcpv6ServerOptionsIncludedMessages, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ServerOptionsIncludedMessages) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ServerOptionsIncludedMessages) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ServerOptionsIncludedMessages) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerOptionsIncludedMessages) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ServerOptionsIncludedMessages) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerOptionsIncludedMessages) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ServerOptionsIncludedMessages) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ServerOptionsIncludedMessages) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ServerOptionsIncludedMessages) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ServerOptionsIncludedMessages) Clone() (Dhcpv6ServerOptionsIncludedMessages, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ServerOptionsIncludedMessages() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ServerOptionsIncludedMessages) setNil() { + obj.msgTypesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ServerOptionsIncludedMessages is the dhcpv6 server messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 server messages, else based on the selection in particular Dhcpv6 server messages the option will be included. +type Dhcpv6ServerOptionsIncludedMessages interface { + Validation + // msg marshals Dhcpv6ServerOptionsIncludedMessages to protobuf object *otg.Dhcpv6ServerOptionsIncludedMessages + // and doesn't set defaults + msg() *otg.Dhcpv6ServerOptionsIncludedMessages + // setMsg unmarshals Dhcpv6ServerOptionsIncludedMessages from protobuf object *otg.Dhcpv6ServerOptionsIncludedMessages + // and doesn't set defaults + setMsg(*otg.Dhcpv6ServerOptionsIncludedMessages) Dhcpv6ServerOptionsIncludedMessages + // provides marshal interface + Marshal() marshalDhcpv6ServerOptionsIncludedMessages + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ServerOptionsIncludedMessages + // validate validates Dhcpv6ServerOptionsIncludedMessages + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ServerOptionsIncludedMessages, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns Dhcpv6ServerOptionsIncludedMessagesChoiceEnum, set in Dhcpv6ServerOptionsIncludedMessages + Choice() Dhcpv6ServerOptionsIncludedMessagesChoiceEnum + // setChoice assigns Dhcpv6ServerOptionsIncludedMessagesChoiceEnum provided by user to Dhcpv6ServerOptionsIncludedMessages + setChoice(value Dhcpv6ServerOptionsIncludedMessagesChoiceEnum) Dhcpv6ServerOptionsIncludedMessages + // HasChoice checks if Choice has been set in Dhcpv6ServerOptionsIncludedMessages + HasChoice() bool + // getter for All to set choice. + All() + // MsgTypes returns Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIterIter, set in Dhcpv6ServerOptionsIncludedMessages + MsgTypes() Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter + setNil() +} + +type Dhcpv6ServerOptionsIncludedMessagesChoiceEnum string + +// Enum of Choice on Dhcpv6ServerOptionsIncludedMessages +var Dhcpv6ServerOptionsIncludedMessagesChoice = struct { + ALL Dhcpv6ServerOptionsIncludedMessagesChoiceEnum + MSG_TYPES Dhcpv6ServerOptionsIncludedMessagesChoiceEnum +}{ + ALL: Dhcpv6ServerOptionsIncludedMessagesChoiceEnum("all"), + MSG_TYPES: Dhcpv6ServerOptionsIncludedMessagesChoiceEnum("msg_types"), +} + +func (obj *dhcpv6ServerOptionsIncludedMessages) Choice() Dhcpv6ServerOptionsIncludedMessagesChoiceEnum { + return Dhcpv6ServerOptionsIncludedMessagesChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for All to set choice +func (obj *dhcpv6ServerOptionsIncludedMessages) All() { + obj.setChoice(Dhcpv6ServerOptionsIncludedMessagesChoice.ALL) +} + +// The server message name where the option is included, by default it is all. +// Choice returns a string +func (obj *dhcpv6ServerOptionsIncludedMessages) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *dhcpv6ServerOptionsIncludedMessages) setChoice(value Dhcpv6ServerOptionsIncludedMessagesChoiceEnum) Dhcpv6ServerOptionsIncludedMessages { + intValue, ok := otg.Dhcpv6ServerOptionsIncludedMessages_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Dhcpv6ServerOptionsIncludedMessagesChoiceEnum", string(value))) + return obj + } + enumValue := otg.Dhcpv6ServerOptionsIncludedMessages_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.MsgTypes = nil + obj.msgTypesHolder = nil + + if value == Dhcpv6ServerOptionsIncludedMessagesChoice.MSG_TYPES { + obj.obj.MsgTypes = []*otg.Dhcpv6ServerOptionsMessageType{} + } + + return obj +} + +// User must specify the Dhcpv6 message type. +// MsgTypes returns a []Dhcpv6ServerOptionsMessageType +func (obj *dhcpv6ServerOptionsIncludedMessages) MsgTypes() Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter { + if len(obj.obj.MsgTypes) == 0 { + obj.setChoice(Dhcpv6ServerOptionsIncludedMessagesChoice.MSG_TYPES) + } + if obj.msgTypesHolder == nil { + obj.msgTypesHolder = newDhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter(&obj.obj.MsgTypes).setMsg(obj) + } + return obj.msgTypesHolder +} + +type dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter struct { + obj *dhcpv6ServerOptionsIncludedMessages + dhcpv6ServerOptionsMessageTypeSlice []Dhcpv6ServerOptionsMessageType + fieldPtr *[]*otg.Dhcpv6ServerOptionsMessageType +} + +func newDhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter(ptr *[]*otg.Dhcpv6ServerOptionsMessageType) Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter { + return &dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter{fieldPtr: ptr} +} + +type Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter interface { + setMsg(*dhcpv6ServerOptionsIncludedMessages) Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter + Items() []Dhcpv6ServerOptionsMessageType + Add() Dhcpv6ServerOptionsMessageType + Append(items ...Dhcpv6ServerOptionsMessageType) Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter + Set(index int, newObj Dhcpv6ServerOptionsMessageType) Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter + Clear() Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter + clearHolderSlice() Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter + appendHolderSlice(item Dhcpv6ServerOptionsMessageType) Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter +} + +func (obj *dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter) setMsg(msg *dhcpv6ServerOptionsIncludedMessages) Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv6ServerOptionsMessageType{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter) Items() []Dhcpv6ServerOptionsMessageType { + return obj.dhcpv6ServerOptionsMessageTypeSlice +} + +func (obj *dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter) Add() Dhcpv6ServerOptionsMessageType { + newObj := &otg.Dhcpv6ServerOptionsMessageType{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv6ServerOptionsMessageType{obj: newObj} + newLibObj.setDefault() + obj.dhcpv6ServerOptionsMessageTypeSlice = append(obj.dhcpv6ServerOptionsMessageTypeSlice, newLibObj) + return newLibObj +} + +func (obj *dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter) Append(items ...Dhcpv6ServerOptionsMessageType) Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv6ServerOptionsMessageTypeSlice = append(obj.dhcpv6ServerOptionsMessageTypeSlice, item) + } + return obj +} + +func (obj *dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter) Set(index int, newObj Dhcpv6ServerOptionsMessageType) Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv6ServerOptionsMessageTypeSlice[index] = newObj + return obj +} +func (obj *dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter) Clear() Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv6ServerOptionsMessageType{} + obj.dhcpv6ServerOptionsMessageTypeSlice = []Dhcpv6ServerOptionsMessageType{} + } + return obj +} +func (obj *dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter) clearHolderSlice() Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter { + if len(obj.dhcpv6ServerOptionsMessageTypeSlice) > 0 { + obj.dhcpv6ServerOptionsMessageTypeSlice = []Dhcpv6ServerOptionsMessageType{} + } + return obj +} +func (obj *dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter) appendHolderSlice(item Dhcpv6ServerOptionsMessageType) Dhcpv6ServerOptionsIncludedMessagesDhcpv6ServerOptionsMessageTypeIter { + obj.dhcpv6ServerOptionsMessageTypeSlice = append(obj.dhcpv6ServerOptionsMessageTypeSlice, item) + return obj +} + +func (obj *dhcpv6ServerOptionsIncludedMessages) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.MsgTypes) != 0 { + + if set_default { + obj.MsgTypes().clearHolderSlice() + for _, item := range obj.obj.MsgTypes { + obj.MsgTypes().appendHolderSlice(&dhcpv6ServerOptionsMessageType{obj: item}) + } + } + for _, item := range obj.MsgTypes().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *dhcpv6ServerOptionsIncludedMessages) setDefault() { + var choices_set int = 0 + var choice Dhcpv6ServerOptionsIncludedMessagesChoiceEnum + + if len(obj.obj.MsgTypes) > 0 { + choices_set += 1 + choice = Dhcpv6ServerOptionsIncludedMessagesChoice.MSG_TYPES + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Dhcpv6ServerOptionsIncludedMessagesChoice.ALL) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Dhcpv6ServerOptionsIncludedMessages") + } + } else { + intVal := otg.Dhcpv6ServerOptionsIncludedMessages_Choice_Enum_value[string(choice)] + enumValue := otg.Dhcpv6ServerOptionsIncludedMessages_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/dhcpv6_server_options_message_type.go b/gosnappi/dhcpv6_server_options_message_type.go new file mode 100644 index 00000000..404e5df0 --- /dev/null +++ b/gosnappi/dhcpv6_server_options_message_type.go @@ -0,0 +1,360 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ServerOptionsMessageType ***** +type dhcpv6ServerOptionsMessageType struct { + validation + obj *otg.Dhcpv6ServerOptionsMessageType + marshaller marshalDhcpv6ServerOptionsMessageType + unMarshaller unMarshalDhcpv6ServerOptionsMessageType +} + +func NewDhcpv6ServerOptionsMessageType() Dhcpv6ServerOptionsMessageType { + obj := dhcpv6ServerOptionsMessageType{obj: &otg.Dhcpv6ServerOptionsMessageType{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ServerOptionsMessageType) msg() *otg.Dhcpv6ServerOptionsMessageType { + return obj.obj +} + +func (obj *dhcpv6ServerOptionsMessageType) setMsg(msg *otg.Dhcpv6ServerOptionsMessageType) Dhcpv6ServerOptionsMessageType { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ServerOptionsMessageType struct { + obj *dhcpv6ServerOptionsMessageType +} + +type marshalDhcpv6ServerOptionsMessageType interface { + // ToProto marshals Dhcpv6ServerOptionsMessageType to protobuf object *otg.Dhcpv6ServerOptionsMessageType + ToProto() (*otg.Dhcpv6ServerOptionsMessageType, error) + // ToPbText marshals Dhcpv6ServerOptionsMessageType to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ServerOptionsMessageType to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ServerOptionsMessageType to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ServerOptionsMessageType struct { + obj *dhcpv6ServerOptionsMessageType +} + +type unMarshalDhcpv6ServerOptionsMessageType interface { + // FromProto unmarshals Dhcpv6ServerOptionsMessageType from protobuf object *otg.Dhcpv6ServerOptionsMessageType + FromProto(msg *otg.Dhcpv6ServerOptionsMessageType) (Dhcpv6ServerOptionsMessageType, error) + // FromPbText unmarshals Dhcpv6ServerOptionsMessageType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ServerOptionsMessageType from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ServerOptionsMessageType from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ServerOptionsMessageType) Marshal() marshalDhcpv6ServerOptionsMessageType { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ServerOptionsMessageType{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ServerOptionsMessageType) Unmarshal() unMarshalDhcpv6ServerOptionsMessageType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ServerOptionsMessageType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ServerOptionsMessageType) ToProto() (*otg.Dhcpv6ServerOptionsMessageType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ServerOptionsMessageType) FromProto(msg *otg.Dhcpv6ServerOptionsMessageType) (Dhcpv6ServerOptionsMessageType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ServerOptionsMessageType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ServerOptionsMessageType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ServerOptionsMessageType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerOptionsMessageType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ServerOptionsMessageType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerOptionsMessageType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ServerOptionsMessageType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ServerOptionsMessageType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ServerOptionsMessageType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ServerOptionsMessageType) Clone() (Dhcpv6ServerOptionsMessageType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ServerOptionsMessageType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ServerOptionsMessageType is the dhcpv6 server messages where the option will be included. +type Dhcpv6ServerOptionsMessageType interface { + Validation + // msg marshals Dhcpv6ServerOptionsMessageType to protobuf object *otg.Dhcpv6ServerOptionsMessageType + // and doesn't set defaults + msg() *otg.Dhcpv6ServerOptionsMessageType + // setMsg unmarshals Dhcpv6ServerOptionsMessageType from protobuf object *otg.Dhcpv6ServerOptionsMessageType + // and doesn't set defaults + setMsg(*otg.Dhcpv6ServerOptionsMessageType) Dhcpv6ServerOptionsMessageType + // provides marshal interface + Marshal() marshalDhcpv6ServerOptionsMessageType + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ServerOptionsMessageType + // validate validates Dhcpv6ServerOptionsMessageType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ServerOptionsMessageType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns Dhcpv6ServerOptionsMessageTypeChoiceEnum, set in Dhcpv6ServerOptionsMessageType + Choice() Dhcpv6ServerOptionsMessageTypeChoiceEnum + // setChoice assigns Dhcpv6ServerOptionsMessageTypeChoiceEnum provided by user to Dhcpv6ServerOptionsMessageType + setChoice(value Dhcpv6ServerOptionsMessageTypeChoiceEnum) Dhcpv6ServerOptionsMessageType + // HasChoice checks if Choice has been set in Dhcpv6ServerOptionsMessageType + HasChoice() bool + // getter for Reply to set choice. + Reply() + // getter for ReConfigure to set choice. + ReConfigure() + // getter for Advertise to set choice. + Advertise() +} + +type Dhcpv6ServerOptionsMessageTypeChoiceEnum string + +// Enum of Choice on Dhcpv6ServerOptionsMessageType +var Dhcpv6ServerOptionsMessageTypeChoice = struct { + ADVERTISE Dhcpv6ServerOptionsMessageTypeChoiceEnum + REPLY Dhcpv6ServerOptionsMessageTypeChoiceEnum + RE_CONFIGURE Dhcpv6ServerOptionsMessageTypeChoiceEnum +}{ + ADVERTISE: Dhcpv6ServerOptionsMessageTypeChoiceEnum("advertise"), + REPLY: Dhcpv6ServerOptionsMessageTypeChoiceEnum("reply"), + RE_CONFIGURE: Dhcpv6ServerOptionsMessageTypeChoiceEnum("re_configure"), +} + +func (obj *dhcpv6ServerOptionsMessageType) Choice() Dhcpv6ServerOptionsMessageTypeChoiceEnum { + return Dhcpv6ServerOptionsMessageTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for Reply to set choice +func (obj *dhcpv6ServerOptionsMessageType) Reply() { + obj.setChoice(Dhcpv6ServerOptionsMessageTypeChoice.REPLY) +} + +// getter for ReConfigure to set choice +func (obj *dhcpv6ServerOptionsMessageType) ReConfigure() { + obj.setChoice(Dhcpv6ServerOptionsMessageTypeChoice.RE_CONFIGURE) +} + +// getter for Advertise to set choice +func (obj *dhcpv6ServerOptionsMessageType) Advertise() { + obj.setChoice(Dhcpv6ServerOptionsMessageTypeChoice.ADVERTISE) +} + +// The server message name where the option is included, by default it is all. +// Choice returns a string +func (obj *dhcpv6ServerOptionsMessageType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *dhcpv6ServerOptionsMessageType) setChoice(value Dhcpv6ServerOptionsMessageTypeChoiceEnum) Dhcpv6ServerOptionsMessageType { + intValue, ok := otg.Dhcpv6ServerOptionsMessageType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Dhcpv6ServerOptionsMessageTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.Dhcpv6ServerOptionsMessageType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + + return obj +} + +func (obj *dhcpv6ServerOptionsMessageType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *dhcpv6ServerOptionsMessageType) setDefault() { + var choices_set int = 0 + var choice Dhcpv6ServerOptionsMessageTypeChoiceEnum + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Dhcpv6ServerOptionsMessageTypeChoice.ADVERTISE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Dhcpv6ServerOptionsMessageType") + } + } else { + intVal := otg.Dhcpv6ServerOptionsMessageType_Choice_Enum_value[string(choice)] + enumValue := otg.Dhcpv6ServerOptionsMessageType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/dhcpv6_server_options_vendor_info.go b/gosnappi/dhcpv6_server_options_vendor_info.go new file mode 100644 index 00000000..e3463a2d --- /dev/null +++ b/gosnappi/dhcpv6_server_options_vendor_info.go @@ -0,0 +1,464 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ServerOptionsVendorInfo ***** +type dhcpv6ServerOptionsVendorInfo struct { + validation + obj *otg.Dhcpv6ServerOptionsVendorInfo + marshaller marshalDhcpv6ServerOptionsVendorInfo + unMarshaller unMarshalDhcpv6ServerOptionsVendorInfo + optionDataHolder Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter + associatedDhcpMessagesHolder Dhcpv6ServerOptionsIncludedMessages +} + +func NewDhcpv6ServerOptionsVendorInfo() Dhcpv6ServerOptionsVendorInfo { + obj := dhcpv6ServerOptionsVendorInfo{obj: &otg.Dhcpv6ServerOptionsVendorInfo{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ServerOptionsVendorInfo) msg() *otg.Dhcpv6ServerOptionsVendorInfo { + return obj.obj +} + +func (obj *dhcpv6ServerOptionsVendorInfo) setMsg(msg *otg.Dhcpv6ServerOptionsVendorInfo) Dhcpv6ServerOptionsVendorInfo { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ServerOptionsVendorInfo struct { + obj *dhcpv6ServerOptionsVendorInfo +} + +type marshalDhcpv6ServerOptionsVendorInfo interface { + // ToProto marshals Dhcpv6ServerOptionsVendorInfo to protobuf object *otg.Dhcpv6ServerOptionsVendorInfo + ToProto() (*otg.Dhcpv6ServerOptionsVendorInfo, error) + // ToPbText marshals Dhcpv6ServerOptionsVendorInfo to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ServerOptionsVendorInfo to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ServerOptionsVendorInfo to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ServerOptionsVendorInfo struct { + obj *dhcpv6ServerOptionsVendorInfo +} + +type unMarshalDhcpv6ServerOptionsVendorInfo interface { + // FromProto unmarshals Dhcpv6ServerOptionsVendorInfo from protobuf object *otg.Dhcpv6ServerOptionsVendorInfo + FromProto(msg *otg.Dhcpv6ServerOptionsVendorInfo) (Dhcpv6ServerOptionsVendorInfo, error) + // FromPbText unmarshals Dhcpv6ServerOptionsVendorInfo from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ServerOptionsVendorInfo from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ServerOptionsVendorInfo from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ServerOptionsVendorInfo) Marshal() marshalDhcpv6ServerOptionsVendorInfo { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ServerOptionsVendorInfo{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ServerOptionsVendorInfo) Unmarshal() unMarshalDhcpv6ServerOptionsVendorInfo { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ServerOptionsVendorInfo{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ServerOptionsVendorInfo) ToProto() (*otg.Dhcpv6ServerOptionsVendorInfo, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ServerOptionsVendorInfo) FromProto(msg *otg.Dhcpv6ServerOptionsVendorInfo) (Dhcpv6ServerOptionsVendorInfo, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ServerOptionsVendorInfo) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ServerOptionsVendorInfo) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ServerOptionsVendorInfo) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerOptionsVendorInfo) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ServerOptionsVendorInfo) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerOptionsVendorInfo) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ServerOptionsVendorInfo) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ServerOptionsVendorInfo) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ServerOptionsVendorInfo) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ServerOptionsVendorInfo) Clone() (Dhcpv6ServerOptionsVendorInfo, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ServerOptionsVendorInfo() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *dhcpv6ServerOptionsVendorInfo) setNil() { + obj.optionDataHolder = nil + obj.associatedDhcpMessagesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Dhcpv6ServerOptionsVendorInfo is this option is used by servers to exchange vendor-specific information. The option code is 17. +type Dhcpv6ServerOptionsVendorInfo interface { + Validation + // msg marshals Dhcpv6ServerOptionsVendorInfo to protobuf object *otg.Dhcpv6ServerOptionsVendorInfo + // and doesn't set defaults + msg() *otg.Dhcpv6ServerOptionsVendorInfo + // setMsg unmarshals Dhcpv6ServerOptionsVendorInfo from protobuf object *otg.Dhcpv6ServerOptionsVendorInfo + // and doesn't set defaults + setMsg(*otg.Dhcpv6ServerOptionsVendorInfo) Dhcpv6ServerOptionsVendorInfo + // provides marshal interface + Marshal() marshalDhcpv6ServerOptionsVendorInfo + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ServerOptionsVendorInfo + // validate validates Dhcpv6ServerOptionsVendorInfo + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ServerOptionsVendorInfo, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EnterpriseNumber returns uint32, set in Dhcpv6ServerOptionsVendorInfo. + EnterpriseNumber() uint32 + // SetEnterpriseNumber assigns uint32 provided by user to Dhcpv6ServerOptionsVendorInfo + SetEnterpriseNumber(value uint32) Dhcpv6ServerOptionsVendorInfo + // OptionData returns Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIterIter, set in Dhcpv6ServerOptionsVendorInfo + OptionData() Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter + // AssociatedDhcpMessages returns Dhcpv6ServerOptionsIncludedMessages, set in Dhcpv6ServerOptionsVendorInfo. + // Dhcpv6ServerOptionsIncludedMessages is the dhcpv6 server messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 server messages, else based on the selection in particular Dhcpv6 server messages the option will be included. + AssociatedDhcpMessages() Dhcpv6ServerOptionsIncludedMessages + // SetAssociatedDhcpMessages assigns Dhcpv6ServerOptionsIncludedMessages provided by user to Dhcpv6ServerOptionsVendorInfo. + // Dhcpv6ServerOptionsIncludedMessages is the dhcpv6 server messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 server messages, else based on the selection in particular Dhcpv6 server messages the option will be included. + SetAssociatedDhcpMessages(value Dhcpv6ServerOptionsIncludedMessages) Dhcpv6ServerOptionsVendorInfo + setNil() +} + +// The vendor's registered Enterprise Number as registered with IANA. +// EnterpriseNumber returns a uint32 +func (obj *dhcpv6ServerOptionsVendorInfo) EnterpriseNumber() uint32 { + + return *obj.obj.EnterpriseNumber + +} + +// The vendor's registered Enterprise Number as registered with IANA. +// SetEnterpriseNumber sets the uint32 value in the Dhcpv6ServerOptionsVendorInfo object +func (obj *dhcpv6ServerOptionsVendorInfo) SetEnterpriseNumber(value uint32) Dhcpv6ServerOptionsVendorInfo { + + obj.obj.EnterpriseNumber = &value + return obj +} + +// An opaque object of octets,interpreted by vendor-specific code on the clients and servers. +// OptionData returns a []Dhcpv6OptionsVendorSpecificOptions +func (obj *dhcpv6ServerOptionsVendorInfo) OptionData() Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + if len(obj.obj.OptionData) == 0 { + obj.obj.OptionData = []*otg.Dhcpv6OptionsVendorSpecificOptions{} + } + if obj.optionDataHolder == nil { + obj.optionDataHolder = newDhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter(&obj.obj.OptionData).setMsg(obj) + } + return obj.optionDataHolder +} + +type dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter struct { + obj *dhcpv6ServerOptionsVendorInfo + dhcpv6OptionsVendorSpecificOptionsSlice []Dhcpv6OptionsVendorSpecificOptions + fieldPtr *[]*otg.Dhcpv6OptionsVendorSpecificOptions +} + +func newDhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter(ptr *[]*otg.Dhcpv6OptionsVendorSpecificOptions) Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + return &dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter{fieldPtr: ptr} +} + +type Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter interface { + setMsg(*dhcpv6ServerOptionsVendorInfo) Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter + Items() []Dhcpv6OptionsVendorSpecificOptions + Add() Dhcpv6OptionsVendorSpecificOptions + Append(items ...Dhcpv6OptionsVendorSpecificOptions) Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter + Set(index int, newObj Dhcpv6OptionsVendorSpecificOptions) Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter + Clear() Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter + clearHolderSlice() Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter + appendHolderSlice(item Dhcpv6OptionsVendorSpecificOptions) Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter +} + +func (obj *dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) setMsg(msg *dhcpv6ServerOptionsVendorInfo) Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv6OptionsVendorSpecificOptions{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) Items() []Dhcpv6OptionsVendorSpecificOptions { + return obj.dhcpv6OptionsVendorSpecificOptionsSlice +} + +func (obj *dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) Add() Dhcpv6OptionsVendorSpecificOptions { + newObj := &otg.Dhcpv6OptionsVendorSpecificOptions{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv6OptionsVendorSpecificOptions{obj: newObj} + newLibObj.setDefault() + obj.dhcpv6OptionsVendorSpecificOptionsSlice = append(obj.dhcpv6OptionsVendorSpecificOptionsSlice, newLibObj) + return newLibObj +} + +func (obj *dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) Append(items ...Dhcpv6OptionsVendorSpecificOptions) Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv6OptionsVendorSpecificOptionsSlice = append(obj.dhcpv6OptionsVendorSpecificOptionsSlice, item) + } + return obj +} + +func (obj *dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) Set(index int, newObj Dhcpv6OptionsVendorSpecificOptions) Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv6OptionsVendorSpecificOptionsSlice[index] = newObj + return obj +} +func (obj *dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) Clear() Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv6OptionsVendorSpecificOptions{} + obj.dhcpv6OptionsVendorSpecificOptionsSlice = []Dhcpv6OptionsVendorSpecificOptions{} + } + return obj +} +func (obj *dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) clearHolderSlice() Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + if len(obj.dhcpv6OptionsVendorSpecificOptionsSlice) > 0 { + obj.dhcpv6OptionsVendorSpecificOptionsSlice = []Dhcpv6OptionsVendorSpecificOptions{} + } + return obj +} +func (obj *dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter) appendHolderSlice(item Dhcpv6OptionsVendorSpecificOptions) Dhcpv6ServerOptionsVendorInfoDhcpv6OptionsVendorSpecificOptionsIter { + obj.dhcpv6OptionsVendorSpecificOptionsSlice = append(obj.dhcpv6OptionsVendorSpecificOptionsSlice, item) + return obj +} + +// The list of dhcpv6 client messages where this option is included. +// AssociatedDhcpMessages returns a Dhcpv6ServerOptionsIncludedMessages +func (obj *dhcpv6ServerOptionsVendorInfo) AssociatedDhcpMessages() Dhcpv6ServerOptionsIncludedMessages { + if obj.obj.AssociatedDhcpMessages == nil { + obj.obj.AssociatedDhcpMessages = NewDhcpv6ServerOptionsIncludedMessages().msg() + } + if obj.associatedDhcpMessagesHolder == nil { + obj.associatedDhcpMessagesHolder = &dhcpv6ServerOptionsIncludedMessages{obj: obj.obj.AssociatedDhcpMessages} + } + return obj.associatedDhcpMessagesHolder +} + +// The list of dhcpv6 client messages where this option is included. +// SetAssociatedDhcpMessages sets the Dhcpv6ServerOptionsIncludedMessages value in the Dhcpv6ServerOptionsVendorInfo object +func (obj *dhcpv6ServerOptionsVendorInfo) SetAssociatedDhcpMessages(value Dhcpv6ServerOptionsIncludedMessages) Dhcpv6ServerOptionsVendorInfo { + + obj.associatedDhcpMessagesHolder = nil + obj.obj.AssociatedDhcpMessages = value.msg() + + return obj +} + +func (obj *dhcpv6ServerOptionsVendorInfo) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // EnterpriseNumber is required + if obj.obj.EnterpriseNumber == nil { + vObj.validationErrors = append(vObj.validationErrors, "EnterpriseNumber is required field on interface Dhcpv6ServerOptionsVendorInfo") + } + if obj.obj.EnterpriseNumber != nil { + + if *obj.obj.EnterpriseNumber > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv6ServerOptionsVendorInfo.EnterpriseNumber <= 4294967295 but Got %d", *obj.obj.EnterpriseNumber)) + } + + } + + if len(obj.obj.OptionData) != 0 { + + if set_default { + obj.OptionData().clearHolderSlice() + for _, item := range obj.obj.OptionData { + obj.OptionData().appendHolderSlice(&dhcpv6OptionsVendorSpecificOptions{obj: item}) + } + } + for _, item := range obj.OptionData().Items() { + item.validateObj(vObj, set_default) + } + + } + + // AssociatedDhcpMessages is required + if obj.obj.AssociatedDhcpMessages == nil { + vObj.validationErrors = append(vObj.validationErrors, "AssociatedDhcpMessages is required field on interface Dhcpv6ServerOptionsVendorInfo") + } + + if obj.obj.AssociatedDhcpMessages != nil { + + obj.AssociatedDhcpMessages().validateObj(vObj, set_default) + } + +} + +func (obj *dhcpv6ServerOptionsVendorInfo) setDefault() { + +} diff --git a/gosnappi/dhcpv6_server_pool_info.go b/gosnappi/dhcpv6_server_pool_info.go new file mode 100644 index 00000000..14909281 --- /dev/null +++ b/gosnappi/dhcpv6_server_pool_info.go @@ -0,0 +1,438 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Dhcpv6ServerPoolInfo ***** +type dhcpv6ServerPoolInfo struct { + validation + obj *otg.Dhcpv6ServerPoolInfo + marshaller marshalDhcpv6ServerPoolInfo + unMarshaller unMarshalDhcpv6ServerPoolInfo +} + +func NewDhcpv6ServerPoolInfo() Dhcpv6ServerPoolInfo { + obj := dhcpv6ServerPoolInfo{obj: &otg.Dhcpv6ServerPoolInfo{}} + obj.setDefault() + return &obj +} + +func (obj *dhcpv6ServerPoolInfo) msg() *otg.Dhcpv6ServerPoolInfo { + return obj.obj +} + +func (obj *dhcpv6ServerPoolInfo) setMsg(msg *otg.Dhcpv6ServerPoolInfo) Dhcpv6ServerPoolInfo { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaldhcpv6ServerPoolInfo struct { + obj *dhcpv6ServerPoolInfo +} + +type marshalDhcpv6ServerPoolInfo interface { + // ToProto marshals Dhcpv6ServerPoolInfo to protobuf object *otg.Dhcpv6ServerPoolInfo + ToProto() (*otg.Dhcpv6ServerPoolInfo, error) + // ToPbText marshals Dhcpv6ServerPoolInfo to protobuf text + ToPbText() (string, error) + // ToYaml marshals Dhcpv6ServerPoolInfo to YAML text + ToYaml() (string, error) + // ToJson marshals Dhcpv6ServerPoolInfo to JSON text + ToJson() (string, error) +} + +type unMarshaldhcpv6ServerPoolInfo struct { + obj *dhcpv6ServerPoolInfo +} + +type unMarshalDhcpv6ServerPoolInfo interface { + // FromProto unmarshals Dhcpv6ServerPoolInfo from protobuf object *otg.Dhcpv6ServerPoolInfo + FromProto(msg *otg.Dhcpv6ServerPoolInfo) (Dhcpv6ServerPoolInfo, error) + // FromPbText unmarshals Dhcpv6ServerPoolInfo from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Dhcpv6ServerPoolInfo from YAML text + FromYaml(value string) error + // FromJson unmarshals Dhcpv6ServerPoolInfo from JSON text + FromJson(value string) error +} + +func (obj *dhcpv6ServerPoolInfo) Marshal() marshalDhcpv6ServerPoolInfo { + if obj.marshaller == nil { + obj.marshaller = &marshaldhcpv6ServerPoolInfo{obj: obj} + } + return obj.marshaller +} + +func (obj *dhcpv6ServerPoolInfo) Unmarshal() unMarshalDhcpv6ServerPoolInfo { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaldhcpv6ServerPoolInfo{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaldhcpv6ServerPoolInfo) ToProto() (*otg.Dhcpv6ServerPoolInfo, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaldhcpv6ServerPoolInfo) FromProto(msg *otg.Dhcpv6ServerPoolInfo) (Dhcpv6ServerPoolInfo, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaldhcpv6ServerPoolInfo) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaldhcpv6ServerPoolInfo) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaldhcpv6ServerPoolInfo) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerPoolInfo) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaldhcpv6ServerPoolInfo) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaldhcpv6ServerPoolInfo) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *dhcpv6ServerPoolInfo) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *dhcpv6ServerPoolInfo) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *dhcpv6ServerPoolInfo) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *dhcpv6ServerPoolInfo) Clone() (Dhcpv6ServerPoolInfo, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewDhcpv6ServerPoolInfo() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Dhcpv6ServerPoolInfo is the container for pool configurations for IA types iana and iata. +type Dhcpv6ServerPoolInfo interface { + Validation + // msg marshals Dhcpv6ServerPoolInfo to protobuf object *otg.Dhcpv6ServerPoolInfo + // and doesn't set defaults + msg() *otg.Dhcpv6ServerPoolInfo + // setMsg unmarshals Dhcpv6ServerPoolInfo from protobuf object *otg.Dhcpv6ServerPoolInfo + // and doesn't set defaults + setMsg(*otg.Dhcpv6ServerPoolInfo) Dhcpv6ServerPoolInfo + // provides marshal interface + Marshal() marshalDhcpv6ServerPoolInfo + // provides unmarshal interface + Unmarshal() unMarshalDhcpv6ServerPoolInfo + // validate validates Dhcpv6ServerPoolInfo + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Dhcpv6ServerPoolInfo, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // StartAddress returns string, set in Dhcpv6ServerPoolInfo. + StartAddress() string + // SetStartAddress assigns string provided by user to Dhcpv6ServerPoolInfo + SetStartAddress(value string) Dhcpv6ServerPoolInfo + // HasStartAddress checks if StartAddress has been set in Dhcpv6ServerPoolInfo + HasStartAddress() bool + // PrefixLen returns uint32, set in Dhcpv6ServerPoolInfo. + PrefixLen() uint32 + // SetPrefixLen assigns uint32 provided by user to Dhcpv6ServerPoolInfo + SetPrefixLen(value uint32) Dhcpv6ServerPoolInfo + // HasPrefixLen checks if PrefixLen has been set in Dhcpv6ServerPoolInfo + HasPrefixLen() bool + // Size returns uint32, set in Dhcpv6ServerPoolInfo. + Size() uint32 + // SetSize assigns uint32 provided by user to Dhcpv6ServerPoolInfo + SetSize(value uint32) Dhcpv6ServerPoolInfo + // HasSize checks if Size has been set in Dhcpv6ServerPoolInfo + HasSize() bool + // Step returns uint32, set in Dhcpv6ServerPoolInfo. + Step() uint32 + // SetStep assigns uint32 provided by user to Dhcpv6ServerPoolInfo + SetStep(value uint32) Dhcpv6ServerPoolInfo + // HasStep checks if Step has been set in Dhcpv6ServerPoolInfo + HasStep() bool +} + +// The first IP address of the lease pool. +// StartAddress returns a string +func (obj *dhcpv6ServerPoolInfo) StartAddress() string { + + return *obj.obj.StartAddress + +} + +// The first IP address of the lease pool. +// StartAddress returns a string +func (obj *dhcpv6ServerPoolInfo) HasStartAddress() bool { + return obj.obj.StartAddress != nil +} + +// The first IP address of the lease pool. +// SetStartAddress sets the string value in the Dhcpv6ServerPoolInfo object +func (obj *dhcpv6ServerPoolInfo) SetStartAddress(value string) Dhcpv6ServerPoolInfo { + + obj.obj.StartAddress = &value + return obj +} + +// The IPv6 network prefix length is used for incrementing the lease address within the lease pool where multiple addresses are configured by using the size field. The address is incremented using the configured Prefix Length and Step. +// PrefixLen returns a uint32 +func (obj *dhcpv6ServerPoolInfo) PrefixLen() uint32 { + + return *obj.obj.PrefixLen + +} + +// The IPv6 network prefix length is used for incrementing the lease address within the lease pool where multiple addresses are configured by using the size field. The address is incremented using the configured Prefix Length and Step. +// PrefixLen returns a uint32 +func (obj *dhcpv6ServerPoolInfo) HasPrefixLen() bool { + return obj.obj.PrefixLen != nil +} + +// The IPv6 network prefix length is used for incrementing the lease address within the lease pool where multiple addresses are configured by using the size field. The address is incremented using the configured Prefix Length and Step. +// SetPrefixLen sets the uint32 value in the Dhcpv6ServerPoolInfo object +func (obj *dhcpv6ServerPoolInfo) SetPrefixLen(value uint32) Dhcpv6ServerPoolInfo { + + obj.obj.PrefixLen = &value + return obj +} + +// The total number of addresses in the pool. +// Size returns a uint32 +func (obj *dhcpv6ServerPoolInfo) Size() uint32 { + + return *obj.obj.Size + +} + +// The total number of addresses in the pool. +// Size returns a uint32 +func (obj *dhcpv6ServerPoolInfo) HasSize() bool { + return obj.obj.Size != nil +} + +// The total number of addresses in the pool. +// SetSize sets the uint32 value in the Dhcpv6ServerPoolInfo object +func (obj *dhcpv6ServerPoolInfo) SetSize(value uint32) Dhcpv6ServerPoolInfo { + + obj.obj.Size = &value + return obj +} + +// The increment value for the lease address within the lease pool where multiple addresses are present. The value is incremented according to the configured Prefix Length and Step. +// Step returns a uint32 +func (obj *dhcpv6ServerPoolInfo) Step() uint32 { + + return *obj.obj.Step + +} + +// The increment value for the lease address within the lease pool where multiple addresses are present. The value is incremented according to the configured Prefix Length and Step. +// Step returns a uint32 +func (obj *dhcpv6ServerPoolInfo) HasStep() bool { + return obj.obj.Step != nil +} + +// The increment value for the lease address within the lease pool where multiple addresses are present. The value is incremented according to the configured Prefix Length and Step. +// SetStep sets the uint32 value in the Dhcpv6ServerPoolInfo object +func (obj *dhcpv6ServerPoolInfo) SetStep(value uint32) Dhcpv6ServerPoolInfo { + + obj.obj.Step = &value + return obj +} + +func (obj *dhcpv6ServerPoolInfo) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.StartAddress != nil { + + err := obj.validateIpv6(obj.StartAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Dhcpv6ServerPoolInfo.StartAddress")) + } + + } + + if obj.obj.PrefixLen != nil { + + if *obj.obj.PrefixLen > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Dhcpv6ServerPoolInfo.PrefixLen <= 128 but Got %d", *obj.obj.PrefixLen)) + } + + } + + if obj.obj.Size != nil { + + if *obj.obj.Size < 1 || *obj.obj.Size > 1000000 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= Dhcpv6ServerPoolInfo.Size <= 1000000 but Got %d", *obj.obj.Size)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step < 1 || *obj.obj.Step > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= Dhcpv6ServerPoolInfo.Step <= 4294967295 but Got %d", *obj.obj.Step)) + } + + } + +} + +func (obj *dhcpv6ServerPoolInfo) setDefault() { + if obj.obj.PrefixLen == nil { + obj.SetPrefixLen(64) + } + if obj.obj.Size == nil { + obj.SetSize(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + +} diff --git a/gosnappi/error.go b/gosnappi/error.go new file mode 100644 index 00000000..24315d18 --- /dev/null +++ b/gosnappi/error.go @@ -0,0 +1,386 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Error ***** +type _error struct { + validation + obj *otg.Error + marshaller marshalError + unMarshaller unMarshalError +} + +func NewError() Error { + obj := _error{obj: &otg.Error{}} + obj.setDefault() + return &obj +} + +func (obj *_error) msg() *otg.Error { + return obj.obj +} + +func (obj *_error) setMsg(msg *otg.Error) Error { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshal_error struct { + obj *_error +} + +type marshalError interface { + // ToProto marshals Error to protobuf object *otg.Error + ToProto() (*otg.Error, error) + // ToPbText marshals Error to protobuf text + ToPbText() (string, error) + // ToYaml marshals Error to YAML text + ToYaml() (string, error) + // ToJson marshals Error to JSON text + ToJson() (string, error) +} + +type unMarshal_error struct { + obj *_error +} + +type unMarshalError interface { + // FromProto unmarshals Error from protobuf object *otg.Error + FromProto(msg *otg.Error) (Error, error) + // FromPbText unmarshals Error from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Error from YAML text + FromYaml(value string) error + // FromJson unmarshals Error from JSON text + FromJson(value string) error +} + +func (obj *_error) Marshal() marshalError { + if obj.marshaller == nil { + obj.marshaller = &marshal_error{obj: obj} + } + return obj.marshaller +} + +func (obj *_error) Unmarshal() unMarshalError { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshal_error{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshal_error) ToProto() (*otg.Error, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshal_error) FromProto(msg *otg.Error) (Error, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshal_error) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshal_error) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshal_error) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshal_error) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshal_error) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshal_error) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *_error) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *_error) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *_error) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *_error) Clone() (Error, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewError() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Error is error response generated while serving API request. +type Error interface { + Validation + // msg marshals Error to protobuf object *otg.Error + // and doesn't set defaults + msg() *otg.Error + // setMsg unmarshals Error from protobuf object *otg.Error + // and doesn't set defaults + setMsg(*otg.Error) Error + // provides marshal interface + Marshal() marshalError + // provides unmarshal interface + Unmarshal() unMarshalError + // validate validates Error + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Error, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Code returns int32, set in Error. + Code() int32 + // SetCode assigns int32 provided by user to Error + SetCode(value int32) Error + // Kind returns ErrorKindEnum, set in Error + Kind() ErrorKindEnum + // SetKind assigns ErrorKindEnum provided by user to Error + SetKind(value ErrorKindEnum) Error + // HasKind checks if Kind has been set in Error + HasKind() bool + // Errors returns []string, set in Error. + Errors() []string + // SetErrors assigns []string provided by user to Error + SetErrors(value []string) Error + // implement Error function for implementingnative Error Interface. + Error() string +} + +func (obj *_error) Error() string { + json, err := obj.Marshal().ToJson() + if err != nil { + return fmt.Sprintf("could not convert Error to JSON: %v", err) + } + return json +} + +// Numeric status code based on the underlying transport being used. +// The API server MUST set this code explicitly based on following references: +// - HTTP 4xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.5 +// - HTTP 5xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.6 +// - gRPC errors: https://grpc.github.io/grpc/core/md_doc_statuscodes.html +// Code returns a int32 +func (obj *_error) Code() int32 { + + return *obj.obj.Code + +} + +// Numeric status code based on the underlying transport being used. +// The API server MUST set this code explicitly based on following references: +// - HTTP 4xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.5 +// - HTTP 5xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.6 +// - gRPC errors: https://grpc.github.io/grpc/core/md_doc_statuscodes.html +// SetCode sets the int32 value in the Error object +func (obj *_error) SetCode(value int32) Error { + + obj.obj.Code = &value + return obj +} + +type ErrorKindEnum string + +// Enum of Kind on Error +var ErrorKind = struct { + VALIDATION ErrorKindEnum + INTERNAL ErrorKindEnum +}{ + VALIDATION: ErrorKindEnum("validation"), + INTERNAL: ErrorKindEnum("internal"), +} + +func (obj *_error) Kind() ErrorKindEnum { + return ErrorKindEnum(obj.obj.Kind.Enum().String()) +} + +// Classification of error originating from within API server that may not be mapped to the value in `code`. +// Absence of this field may indicate that the error did not originate from within API server. +// Kind returns a string +func (obj *_error) HasKind() bool { + return obj.obj.Kind != nil +} + +func (obj *_error) SetKind(value ErrorKindEnum) Error { + intValue, ok := otg.Error_Kind_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ErrorKindEnum", string(value))) + return obj + } + enumValue := otg.Error_Kind_Enum(intValue) + obj.obj.Kind = &enumValue + + return obj +} + +// List of error messages generated while executing the request. +// Errors returns a []string +func (obj *_error) Errors() []string { + if obj.obj.Errors == nil { + obj.obj.Errors = make([]string, 0) + } + return obj.obj.Errors +} + +// List of error messages generated while executing the request. +// SetErrors sets the []string value in the Error object +func (obj *_error) SetErrors(value []string) Error { + + if obj.obj.Errors == nil { + obj.obj.Errors = make([]string, 0) + } + obj.obj.Errors = value + + return obj +} + +func (obj *_error) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Code is required + if obj.obj.Code == nil { + vObj.validationErrors = append(vObj.validationErrors, "Code is required field on interface Error") + } +} + +func (obj *_error) setDefault() { + +} diff --git a/gosnappi/ethernet_connection.go b/gosnappi/ethernet_connection.go new file mode 100644 index 00000000..7dadef63 --- /dev/null +++ b/gosnappi/ethernet_connection.go @@ -0,0 +1,579 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** EthernetConnection ***** +type ethernetConnection struct { + validation + obj *otg.EthernetConnection + marshaller marshalEthernetConnection + unMarshaller unMarshalEthernetConnection + simulatedLinkHolder EthernetSimulatedLink +} + +func NewEthernetConnection() EthernetConnection { + obj := ethernetConnection{obj: &otg.EthernetConnection{}} + obj.setDefault() + return &obj +} + +func (obj *ethernetConnection) msg() *otg.EthernetConnection { + return obj.obj +} + +func (obj *ethernetConnection) setMsg(msg *otg.EthernetConnection) EthernetConnection { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalethernetConnection struct { + obj *ethernetConnection +} + +type marshalEthernetConnection interface { + // ToProto marshals EthernetConnection to protobuf object *otg.EthernetConnection + ToProto() (*otg.EthernetConnection, error) + // ToPbText marshals EthernetConnection to protobuf text + ToPbText() (string, error) + // ToYaml marshals EthernetConnection to YAML text + ToYaml() (string, error) + // ToJson marshals EthernetConnection to JSON text + ToJson() (string, error) +} + +type unMarshalethernetConnection struct { + obj *ethernetConnection +} + +type unMarshalEthernetConnection interface { + // FromProto unmarshals EthernetConnection from protobuf object *otg.EthernetConnection + FromProto(msg *otg.EthernetConnection) (EthernetConnection, error) + // FromPbText unmarshals EthernetConnection from protobuf text + FromPbText(value string) error + // FromYaml unmarshals EthernetConnection from YAML text + FromYaml(value string) error + // FromJson unmarshals EthernetConnection from JSON text + FromJson(value string) error +} + +func (obj *ethernetConnection) Marshal() marshalEthernetConnection { + if obj.marshaller == nil { + obj.marshaller = &marshalethernetConnection{obj: obj} + } + return obj.marshaller +} + +func (obj *ethernetConnection) Unmarshal() unMarshalEthernetConnection { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalethernetConnection{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalethernetConnection) ToProto() (*otg.EthernetConnection, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalethernetConnection) FromProto(msg *otg.EthernetConnection) (EthernetConnection, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalethernetConnection) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalethernetConnection) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalethernetConnection) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalethernetConnection) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalethernetConnection) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalethernetConnection) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ethernetConnection) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ethernetConnection) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ethernetConnection) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ethernetConnection) Clone() (EthernetConnection, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewEthernetConnection() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ethernetConnection) setNil() { + obj.simulatedLinkHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// EthernetConnection is ethernet interface connection to a port, LAG, VXLAN tunnel or a Simulated Internal Link used to create simulated topologies behind an emulated router. +type EthernetConnection interface { + Validation + // msg marshals EthernetConnection to protobuf object *otg.EthernetConnection + // and doesn't set defaults + msg() *otg.EthernetConnection + // setMsg unmarshals EthernetConnection from protobuf object *otg.EthernetConnection + // and doesn't set defaults + setMsg(*otg.EthernetConnection) EthernetConnection + // provides marshal interface + Marshal() marshalEthernetConnection + // provides unmarshal interface + Unmarshal() unMarshalEthernetConnection + // validate validates EthernetConnection + validate() error + // A stringer function + String() string + // Clones the object + Clone() (EthernetConnection, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns EthernetConnectionChoiceEnum, set in EthernetConnection + Choice() EthernetConnectionChoiceEnum + // setChoice assigns EthernetConnectionChoiceEnum provided by user to EthernetConnection + setChoice(value EthernetConnectionChoiceEnum) EthernetConnection + // HasChoice checks if Choice has been set in EthernetConnection + HasChoice() bool + // PortName returns string, set in EthernetConnection. + PortName() string + // SetPortName assigns string provided by user to EthernetConnection + SetPortName(value string) EthernetConnection + // HasPortName checks if PortName has been set in EthernetConnection + HasPortName() bool + // LagName returns string, set in EthernetConnection. + LagName() string + // SetLagName assigns string provided by user to EthernetConnection + SetLagName(value string) EthernetConnection + // HasLagName checks if LagName has been set in EthernetConnection + HasLagName() bool + // VxlanName returns string, set in EthernetConnection. + VxlanName() string + // SetVxlanName assigns string provided by user to EthernetConnection + SetVxlanName(value string) EthernetConnection + // HasVxlanName checks if VxlanName has been set in EthernetConnection + HasVxlanName() bool + // SimulatedLink returns EthernetSimulatedLink, set in EthernetConnection. + // EthernetSimulatedLink is details of the internal link which can be used to create simulated device topologies behind an emulated router. MAC, VLAN and MTU information for the internal links are not used for purposes of emulating Simulated Topologies ( e.g. by ISIS Emulated Router behind which this is configured ) + SimulatedLink() EthernetSimulatedLink + // SetSimulatedLink assigns EthernetSimulatedLink provided by user to EthernetConnection. + // EthernetSimulatedLink is details of the internal link which can be used to create simulated device topologies behind an emulated router. MAC, VLAN and MTU information for the internal links are not used for purposes of emulating Simulated Topologies ( e.g. by ISIS Emulated Router behind which this is configured ) + SetSimulatedLink(value EthernetSimulatedLink) EthernetConnection + // HasSimulatedLink checks if SimulatedLink has been set in EthernetConnection + HasSimulatedLink() bool + setNil() +} + +type EthernetConnectionChoiceEnum string + +// Enum of Choice on EthernetConnection +var EthernetConnectionChoice = struct { + PORT_NAME EthernetConnectionChoiceEnum + LAG_NAME EthernetConnectionChoiceEnum + VXLAN_NAME EthernetConnectionChoiceEnum + SIMULATED_LINK EthernetConnectionChoiceEnum +}{ + PORT_NAME: EthernetConnectionChoiceEnum("port_name"), + LAG_NAME: EthernetConnectionChoiceEnum("lag_name"), + VXLAN_NAME: EthernetConnectionChoiceEnum("vxlan_name"), + SIMULATED_LINK: EthernetConnectionChoiceEnum("simulated_link"), +} + +func (obj *ethernetConnection) Choice() EthernetConnectionChoiceEnum { + return EthernetConnectionChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// port_name, lag_name, vxlan_name or simulated_link +// Choice returns a string +func (obj *ethernetConnection) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *ethernetConnection) setChoice(value EthernetConnectionChoiceEnum) EthernetConnection { + intValue, ok := otg.EthernetConnection_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on EthernetConnectionChoiceEnum", string(value))) + return obj + } + enumValue := otg.EthernetConnection_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.SimulatedLink = nil + obj.simulatedLinkHolder = nil + obj.obj.VxlanName = nil + obj.obj.LagName = nil + obj.obj.PortName = nil + + if value == EthernetConnectionChoice.SIMULATED_LINK { + obj.obj.SimulatedLink = NewEthernetSimulatedLink().msg() + } + + return obj +} + +// Name of the port that the Ethernet interface is configured on. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// PortName returns a string +func (obj *ethernetConnection) PortName() string { + + if obj.obj.PortName == nil { + obj.setChoice(EthernetConnectionChoice.PORT_NAME) + } + + return *obj.obj.PortName + +} + +// Name of the port that the Ethernet interface is configured on. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// PortName returns a string +func (obj *ethernetConnection) HasPortName() bool { + return obj.obj.PortName != nil +} + +// Name of the port that the Ethernet interface is configured on. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// SetPortName sets the string value in the EthernetConnection object +func (obj *ethernetConnection) SetPortName(value string) EthernetConnection { + obj.setChoice(EthernetConnectionChoice.PORT_NAME) + obj.obj.PortName = &value + return obj +} + +// Name of the LAG that the Ethernet interface is configured on. +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// LagName returns a string +func (obj *ethernetConnection) LagName() string { + + if obj.obj.LagName == nil { + obj.setChoice(EthernetConnectionChoice.LAG_NAME) + } + + return *obj.obj.LagName + +} + +// Name of the LAG that the Ethernet interface is configured on. +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// LagName returns a string +func (obj *ethernetConnection) HasLagName() bool { + return obj.obj.LagName != nil +} + +// Name of the LAG that the Ethernet interface is configured on. +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// SetLagName sets the string value in the EthernetConnection object +func (obj *ethernetConnection) SetLagName(value string) EthernetConnection { + obj.setChoice(EthernetConnectionChoice.LAG_NAME) + obj.obj.LagName = &value + return obj +} + +// Name of the VXLAN instance (or VXLAN tunnel) that this Ethernet interface is connected to. +// +// x-constraint: +// - #/components/schemas/Vxlan.V4Tunnel/properties/name +// - #/components/schemas/Vxlan.V6Tunnel/properties/name +// +// x-constraint: +// - #/components/schemas/Vxlan.V4Tunnel/properties/name +// - #/components/schemas/Vxlan.V6Tunnel/properties/name +// +// VxlanName returns a string +func (obj *ethernetConnection) VxlanName() string { + + if obj.obj.VxlanName == nil { + obj.setChoice(EthernetConnectionChoice.VXLAN_NAME) + } + + return *obj.obj.VxlanName + +} + +// Name of the VXLAN instance (or VXLAN tunnel) that this Ethernet interface is connected to. +// +// x-constraint: +// - #/components/schemas/Vxlan.V4Tunnel/properties/name +// - #/components/schemas/Vxlan.V6Tunnel/properties/name +// +// x-constraint: +// - #/components/schemas/Vxlan.V4Tunnel/properties/name +// - #/components/schemas/Vxlan.V6Tunnel/properties/name +// +// VxlanName returns a string +func (obj *ethernetConnection) HasVxlanName() bool { + return obj.obj.VxlanName != nil +} + +// Name of the VXLAN instance (or VXLAN tunnel) that this Ethernet interface is connected to. +// +// x-constraint: +// - #/components/schemas/Vxlan.V4Tunnel/properties/name +// - #/components/schemas/Vxlan.V6Tunnel/properties/name +// +// x-constraint: +// - #/components/schemas/Vxlan.V4Tunnel/properties/name +// - #/components/schemas/Vxlan.V6Tunnel/properties/name +// +// SetVxlanName sets the string value in the EthernetConnection object +func (obj *ethernetConnection) SetVxlanName(value string) EthernetConnection { + obj.setChoice(EthernetConnectionChoice.VXLAN_NAME) + obj.obj.VxlanName = &value + return obj +} + +// description is TBD +// SimulatedLink returns a EthernetSimulatedLink +func (obj *ethernetConnection) SimulatedLink() EthernetSimulatedLink { + if obj.obj.SimulatedLink == nil { + obj.setChoice(EthernetConnectionChoice.SIMULATED_LINK) + } + if obj.simulatedLinkHolder == nil { + obj.simulatedLinkHolder = ðernetSimulatedLink{obj: obj.obj.SimulatedLink} + } + return obj.simulatedLinkHolder +} + +// description is TBD +// SimulatedLink returns a EthernetSimulatedLink +func (obj *ethernetConnection) HasSimulatedLink() bool { + return obj.obj.SimulatedLink != nil +} + +// description is TBD +// SetSimulatedLink sets the EthernetSimulatedLink value in the EthernetConnection object +func (obj *ethernetConnection) SetSimulatedLink(value EthernetSimulatedLink) EthernetConnection { + obj.setChoice(EthernetConnectionChoice.SIMULATED_LINK) + obj.simulatedLinkHolder = nil + obj.obj.SimulatedLink = value.msg() + + return obj +} + +func (obj *ethernetConnection) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.SimulatedLink != nil { + + obj.SimulatedLink().validateObj(vObj, set_default) + } + +} + +func (obj *ethernetConnection) setDefault() { + var choices_set int = 0 + var choice EthernetConnectionChoiceEnum + + if obj.obj.PortName != nil { + choices_set += 1 + choice = EthernetConnectionChoice.PORT_NAME + } + + if obj.obj.LagName != nil { + choices_set += 1 + choice = EthernetConnectionChoice.LAG_NAME + } + + if obj.obj.VxlanName != nil { + choices_set += 1 + choice = EthernetConnectionChoice.VXLAN_NAME + } + + if obj.obj.SimulatedLink != nil { + choices_set += 1 + choice = EthernetConnectionChoice.SIMULATED_LINK + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in EthernetConnection") + } + } else { + intVal := otg.EthernetConnection_Choice_Enum_value[string(choice)] + enumValue := otg.EthernetConnection_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/ethernet_simulated_link.go b/gosnappi/ethernet_simulated_link.go new file mode 100644 index 00000000..0cfddd83 --- /dev/null +++ b/gosnappi/ethernet_simulated_link.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** EthernetSimulatedLink ***** +type ethernetSimulatedLink struct { + validation + obj *otg.EthernetSimulatedLink + marshaller marshalEthernetSimulatedLink + unMarshaller unMarshalEthernetSimulatedLink +} + +func NewEthernetSimulatedLink() EthernetSimulatedLink { + obj := ethernetSimulatedLink{obj: &otg.EthernetSimulatedLink{}} + obj.setDefault() + return &obj +} + +func (obj *ethernetSimulatedLink) msg() *otg.EthernetSimulatedLink { + return obj.obj +} + +func (obj *ethernetSimulatedLink) setMsg(msg *otg.EthernetSimulatedLink) EthernetSimulatedLink { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalethernetSimulatedLink struct { + obj *ethernetSimulatedLink +} + +type marshalEthernetSimulatedLink interface { + // ToProto marshals EthernetSimulatedLink to protobuf object *otg.EthernetSimulatedLink + ToProto() (*otg.EthernetSimulatedLink, error) + // ToPbText marshals EthernetSimulatedLink to protobuf text + ToPbText() (string, error) + // ToYaml marshals EthernetSimulatedLink to YAML text + ToYaml() (string, error) + // ToJson marshals EthernetSimulatedLink to JSON text + ToJson() (string, error) +} + +type unMarshalethernetSimulatedLink struct { + obj *ethernetSimulatedLink +} + +type unMarshalEthernetSimulatedLink interface { + // FromProto unmarshals EthernetSimulatedLink from protobuf object *otg.EthernetSimulatedLink + FromProto(msg *otg.EthernetSimulatedLink) (EthernetSimulatedLink, error) + // FromPbText unmarshals EthernetSimulatedLink from protobuf text + FromPbText(value string) error + // FromYaml unmarshals EthernetSimulatedLink from YAML text + FromYaml(value string) error + // FromJson unmarshals EthernetSimulatedLink from JSON text + FromJson(value string) error +} + +func (obj *ethernetSimulatedLink) Marshal() marshalEthernetSimulatedLink { + if obj.marshaller == nil { + obj.marshaller = &marshalethernetSimulatedLink{obj: obj} + } + return obj.marshaller +} + +func (obj *ethernetSimulatedLink) Unmarshal() unMarshalEthernetSimulatedLink { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalethernetSimulatedLink{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalethernetSimulatedLink) ToProto() (*otg.EthernetSimulatedLink, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalethernetSimulatedLink) FromProto(msg *otg.EthernetSimulatedLink) (EthernetSimulatedLink, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalethernetSimulatedLink) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalethernetSimulatedLink) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalethernetSimulatedLink) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalethernetSimulatedLink) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalethernetSimulatedLink) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalethernetSimulatedLink) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ethernetSimulatedLink) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ethernetSimulatedLink) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ethernetSimulatedLink) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ethernetSimulatedLink) Clone() (EthernetSimulatedLink, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewEthernetSimulatedLink() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// EthernetSimulatedLink is details of the internal link which can be used to create simulated device topologies behind an emulated router. MAC, VLAN and MTU information for the internal links are not used for purposes of emulating Simulated Topologies ( e.g. by ISIS Emulated Router behind which this is configured ) +type EthernetSimulatedLink interface { + Validation + // msg marshals EthernetSimulatedLink to protobuf object *otg.EthernetSimulatedLink + // and doesn't set defaults + msg() *otg.EthernetSimulatedLink + // setMsg unmarshals EthernetSimulatedLink from protobuf object *otg.EthernetSimulatedLink + // and doesn't set defaults + setMsg(*otg.EthernetSimulatedLink) EthernetSimulatedLink + // provides marshal interface + Marshal() marshalEthernetSimulatedLink + // provides unmarshal interface + Unmarshal() unMarshalEthernetSimulatedLink + // validate validates EthernetSimulatedLink + validate() error + // A stringer function + String() string + // Clones the object + Clone() (EthernetSimulatedLink, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RemoteSimulatedLink returns string, set in EthernetSimulatedLink. + RemoteSimulatedLink() string + // SetRemoteSimulatedLink assigns string provided by user to EthernetSimulatedLink + SetRemoteSimulatedLink(value string) EthernetSimulatedLink + // HasRemoteSimulatedLink checks if RemoteSimulatedLink has been set in EthernetSimulatedLink + HasRemoteSimulatedLink() bool + // LinkType returns EthernetSimulatedLinkLinkTypeEnum, set in EthernetSimulatedLink + LinkType() EthernetSimulatedLinkLinkTypeEnum + // SetLinkType assigns EthernetSimulatedLinkLinkTypeEnum provided by user to EthernetSimulatedLink + SetLinkType(value EthernetSimulatedLinkLinkTypeEnum) EthernetSimulatedLink + // HasLinkType checks if LinkType has been set in EthernetSimulatedLink + HasLinkType() bool +} + +// Name of the remote end of the simulated interface which also must be a simulated_link on a device which might be acting either as an unconnected device in a simulated topology +// ( all ethernet links of type simulated_link ) or an emulated device connected to the Device Under Test (has at atleast one ethernet interface with connection to the port or +// lag connected to the DUT) +// +// x-constraint: +// - #/components/schemas/Device.Ethernet/properties/name +// +// x-constraint: +// - #/components/schemas/Device.Ethernet/properties/name +// +// RemoteSimulatedLink returns a string +func (obj *ethernetSimulatedLink) RemoteSimulatedLink() string { + + return *obj.obj.RemoteSimulatedLink + +} + +// Name of the remote end of the simulated interface which also must be a simulated_link on a device which might be acting either as an unconnected device in a simulated topology +// ( all ethernet links of type simulated_link ) or an emulated device connected to the Device Under Test (has at atleast one ethernet interface with connection to the port or +// lag connected to the DUT) +// +// x-constraint: +// - #/components/schemas/Device.Ethernet/properties/name +// +// x-constraint: +// - #/components/schemas/Device.Ethernet/properties/name +// +// RemoteSimulatedLink returns a string +func (obj *ethernetSimulatedLink) HasRemoteSimulatedLink() bool { + return obj.obj.RemoteSimulatedLink != nil +} + +// Name of the remote end of the simulated interface which also must be a simulated_link on a device which might be acting either as an unconnected device in a simulated topology +// ( all ethernet links of type simulated_link ) or an emulated device connected to the Device Under Test (has at atleast one ethernet interface with connection to the port or +// lag connected to the DUT) +// +// x-constraint: +// - #/components/schemas/Device.Ethernet/properties/name +// +// x-constraint: +// - #/components/schemas/Device.Ethernet/properties/name +// +// SetRemoteSimulatedLink sets the string value in the EthernetSimulatedLink object +func (obj *ethernetSimulatedLink) SetRemoteSimulatedLink(value string) EthernetSimulatedLink { + + obj.obj.RemoteSimulatedLink = &value + return obj +} + +type EthernetSimulatedLinkLinkTypeEnum string + +// Enum of LinkType on EthernetSimulatedLink +var EthernetSimulatedLinkLinkType = struct { + PRIMARY EthernetSimulatedLinkLinkTypeEnum + SECONDARY EthernetSimulatedLinkLinkTypeEnum +}{ + PRIMARY: EthernetSimulatedLinkLinkTypeEnum("primary"), + SECONDARY: EthernetSimulatedLinkLinkTypeEnum("secondary"), +} + +func (obj *ethernetSimulatedLink) LinkType() EthernetSimulatedLinkLinkTypeEnum { + return EthernetSimulatedLinkLinkTypeEnum(obj.obj.LinkType.Enum().String()) +} + +// By default, simulated links are treated as Primary links , which means that the intention is for connected device to advertise this and full topology of devices connected to it. +// e.g. when advertised as ISIS Simulated Topology. +// +// All simulated links inside one topology subset would normally can point to only other unconnected devices in the same topology or to the 'root' emulated device. +// If a link is designated as secondary , only that link information will be advertised by the IGP e.g. ISIS , and not the entire topology behind it. +// The optional secondary option allows emulation of external link scenarios where a simulated device (e.g. part of a ISIS simulated topology ) is advertised as reachable part of the topology +// by the emulated router behind which this is configured , as well as the other end of the secondary link which could be +// - 1) either a simulated device behind a different emulated router. +// - 2) or an emulated router on same or different port. +// This allows emulation of scenarios where one device/router is emulated to be reachable from different Emulated Routers connected to the Device Under Test. (e.g. for FRR scenarios) +// +// If an implementation does not support multiple primary links from same simulated topology i.e. full topology advertised via multiple emulated routers, it should return an error +// during set_config operation with such a topology. +// LinkType returns a string +func (obj *ethernetSimulatedLink) HasLinkType() bool { + return obj.obj.LinkType != nil +} + +func (obj *ethernetSimulatedLink) SetLinkType(value EthernetSimulatedLinkLinkTypeEnum) EthernetSimulatedLink { + intValue, ok := otg.EthernetSimulatedLink_LinkType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on EthernetSimulatedLinkLinkTypeEnum", string(value))) + return obj + } + enumValue := otg.EthernetSimulatedLink_LinkType_Enum(intValue) + obj.obj.LinkType = &enumValue + + return obj +} + +func (obj *ethernetSimulatedLink) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *ethernetSimulatedLink) setDefault() { + if obj.obj.LinkType == nil { + obj.SetLinkType(EthernetSimulatedLinkLinkType.PRIMARY) + + } + +} diff --git a/gosnappi/event.go b/gosnappi/event.go new file mode 100644 index 00000000..73b8aad8 --- /dev/null +++ b/gosnappi/event.go @@ -0,0 +1,451 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Event ***** +type event struct { + validation + obj *otg.Event + marshaller marshalEvent + unMarshaller unMarshalEvent + linkHolder EventLink + rxRateThresholdHolder EventRxRateThreshold + routeAdvertiseWithdrawHolder EventRouteAdvertiseWithdraw +} + +func NewEvent() Event { + obj := event{obj: &otg.Event{}} + obj.setDefault() + return &obj +} + +func (obj *event) msg() *otg.Event { + return obj.obj +} + +func (obj *event) setMsg(msg *otg.Event) Event { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalevent struct { + obj *event +} + +type marshalEvent interface { + // ToProto marshals Event to protobuf object *otg.Event + ToProto() (*otg.Event, error) + // ToPbText marshals Event to protobuf text + ToPbText() (string, error) + // ToYaml marshals Event to YAML text + ToYaml() (string, error) + // ToJson marshals Event to JSON text + ToJson() (string, error) +} + +type unMarshalevent struct { + obj *event +} + +type unMarshalEvent interface { + // FromProto unmarshals Event from protobuf object *otg.Event + FromProto(msg *otg.Event) (Event, error) + // FromPbText unmarshals Event from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Event from YAML text + FromYaml(value string) error + // FromJson unmarshals Event from JSON text + FromJson(value string) error +} + +func (obj *event) Marshal() marshalEvent { + if obj.marshaller == nil { + obj.marshaller = &marshalevent{obj: obj} + } + return obj.marshaller +} + +func (obj *event) Unmarshal() unMarshalEvent { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalevent{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalevent) ToProto() (*otg.Event, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalevent) FromProto(msg *otg.Event) (Event, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalevent) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalevent) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalevent) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalevent) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalevent) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalevent) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *event) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *event) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *event) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *event) Clone() (Event, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewEvent() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *event) setNil() { + obj.linkHolder = nil + obj.rxRateThresholdHolder = nil + obj.routeAdvertiseWithdrawHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Event is the optional container for event configuration. +type Event interface { + Validation + // msg marshals Event to protobuf object *otg.Event + // and doesn't set defaults + msg() *otg.Event + // setMsg unmarshals Event from protobuf object *otg.Event + // and doesn't set defaults + setMsg(*otg.Event) Event + // provides marshal interface + Marshal() marshalEvent + // provides unmarshal interface + Unmarshal() unMarshalEvent + // validate validates Event + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Event, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Enable returns bool, set in Event. + Enable() bool + // SetEnable assigns bool provided by user to Event + SetEnable(value bool) Event + // HasEnable checks if Enable has been set in Event + HasEnable() bool + // Link returns EventLink, set in Event. + // EventLink is the optional container for link up/down event configuration. + Link() EventLink + // SetLink assigns EventLink provided by user to Event. + // EventLink is the optional container for link up/down event configuration. + SetLink(value EventLink) Event + // HasLink checks if Link has been set in Event + HasLink() bool + // RxRateThreshold returns EventRxRateThreshold, set in Event. + // EventRxRateThreshold is the optional container for rx rate threshold event configuration. + RxRateThreshold() EventRxRateThreshold + // SetRxRateThreshold assigns EventRxRateThreshold provided by user to Event. + // EventRxRateThreshold is the optional container for rx rate threshold event configuration. + SetRxRateThreshold(value EventRxRateThreshold) Event + // HasRxRateThreshold checks if RxRateThreshold has been set in Event + HasRxRateThreshold() bool + // RouteAdvertiseWithdraw returns EventRouteAdvertiseWithdraw, set in Event. + // EventRouteAdvertiseWithdraw is the optional container for route advertise/withdraw event configuration. + RouteAdvertiseWithdraw() EventRouteAdvertiseWithdraw + // SetRouteAdvertiseWithdraw assigns EventRouteAdvertiseWithdraw provided by user to Event. + // EventRouteAdvertiseWithdraw is the optional container for route advertise/withdraw event configuration. + SetRouteAdvertiseWithdraw(value EventRouteAdvertiseWithdraw) Event + // HasRouteAdvertiseWithdraw checks if RouteAdvertiseWithdraw has been set in Event + HasRouteAdvertiseWithdraw() bool + setNil() +} + +// True to enable all events. +// Enabling this option may affect the resultant packet payload due to +// additional instrumentation data. +// Enable returns a bool +func (obj *event) Enable() bool { + + return *obj.obj.Enable + +} + +// True to enable all events. +// Enabling this option may affect the resultant packet payload due to +// additional instrumentation data. +// Enable returns a bool +func (obj *event) HasEnable() bool { + return obj.obj.Enable != nil +} + +// True to enable all events. +// Enabling this option may affect the resultant packet payload due to +// additional instrumentation data. +// SetEnable sets the bool value in the Event object +func (obj *event) SetEnable(value bool) Event { + + obj.obj.Enable = &value + return obj +} + +// description is TBD +// Link returns a EventLink +func (obj *event) Link() EventLink { + if obj.obj.Link == nil { + obj.obj.Link = NewEventLink().msg() + } + if obj.linkHolder == nil { + obj.linkHolder = &eventLink{obj: obj.obj.Link} + } + return obj.linkHolder +} + +// description is TBD +// Link returns a EventLink +func (obj *event) HasLink() bool { + return obj.obj.Link != nil +} + +// description is TBD +// SetLink sets the EventLink value in the Event object +func (obj *event) SetLink(value EventLink) Event { + + obj.linkHolder = nil + obj.obj.Link = value.msg() + + return obj +} + +// description is TBD +// RxRateThreshold returns a EventRxRateThreshold +func (obj *event) RxRateThreshold() EventRxRateThreshold { + if obj.obj.RxRateThreshold == nil { + obj.obj.RxRateThreshold = NewEventRxRateThreshold().msg() + } + if obj.rxRateThresholdHolder == nil { + obj.rxRateThresholdHolder = &eventRxRateThreshold{obj: obj.obj.RxRateThreshold} + } + return obj.rxRateThresholdHolder +} + +// description is TBD +// RxRateThreshold returns a EventRxRateThreshold +func (obj *event) HasRxRateThreshold() bool { + return obj.obj.RxRateThreshold != nil +} + +// description is TBD +// SetRxRateThreshold sets the EventRxRateThreshold value in the Event object +func (obj *event) SetRxRateThreshold(value EventRxRateThreshold) Event { + + obj.rxRateThresholdHolder = nil + obj.obj.RxRateThreshold = value.msg() + + return obj +} + +// description is TBD +// RouteAdvertiseWithdraw returns a EventRouteAdvertiseWithdraw +func (obj *event) RouteAdvertiseWithdraw() EventRouteAdvertiseWithdraw { + if obj.obj.RouteAdvertiseWithdraw == nil { + obj.obj.RouteAdvertiseWithdraw = NewEventRouteAdvertiseWithdraw().msg() + } + if obj.routeAdvertiseWithdrawHolder == nil { + obj.routeAdvertiseWithdrawHolder = &eventRouteAdvertiseWithdraw{obj: obj.obj.RouteAdvertiseWithdraw} + } + return obj.routeAdvertiseWithdrawHolder +} + +// description is TBD +// RouteAdvertiseWithdraw returns a EventRouteAdvertiseWithdraw +func (obj *event) HasRouteAdvertiseWithdraw() bool { + return obj.obj.RouteAdvertiseWithdraw != nil +} + +// description is TBD +// SetRouteAdvertiseWithdraw sets the EventRouteAdvertiseWithdraw value in the Event object +func (obj *event) SetRouteAdvertiseWithdraw(value EventRouteAdvertiseWithdraw) Event { + + obj.routeAdvertiseWithdrawHolder = nil + obj.obj.RouteAdvertiseWithdraw = value.msg() + + return obj +} + +func (obj *event) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Link != nil { + + obj.Link().validateObj(vObj, set_default) + } + + if obj.obj.RxRateThreshold != nil { + + obj.RxRateThreshold().validateObj(vObj, set_default) + } + + if obj.obj.RouteAdvertiseWithdraw != nil { + + obj.RouteAdvertiseWithdraw().validateObj(vObj, set_default) + } + +} + +func (obj *event) setDefault() { + if obj.obj.Enable == nil { + obj.SetEnable(false) + } + +} diff --git a/gosnappi/event_link.go b/gosnappi/event_link.go new file mode 100644 index 00000000..70b1afc3 --- /dev/null +++ b/gosnappi/event_link.go @@ -0,0 +1,309 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** EventLink ***** +type eventLink struct { + validation + obj *otg.EventLink + marshaller marshalEventLink + unMarshaller unMarshalEventLink +} + +func NewEventLink() EventLink { + obj := eventLink{obj: &otg.EventLink{}} + obj.setDefault() + return &obj +} + +func (obj *eventLink) msg() *otg.EventLink { + return obj.obj +} + +func (obj *eventLink) setMsg(msg *otg.EventLink) EventLink { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaleventLink struct { + obj *eventLink +} + +type marshalEventLink interface { + // ToProto marshals EventLink to protobuf object *otg.EventLink + ToProto() (*otg.EventLink, error) + // ToPbText marshals EventLink to protobuf text + ToPbText() (string, error) + // ToYaml marshals EventLink to YAML text + ToYaml() (string, error) + // ToJson marshals EventLink to JSON text + ToJson() (string, error) +} + +type unMarshaleventLink struct { + obj *eventLink +} + +type unMarshalEventLink interface { + // FromProto unmarshals EventLink from protobuf object *otg.EventLink + FromProto(msg *otg.EventLink) (EventLink, error) + // FromPbText unmarshals EventLink from protobuf text + FromPbText(value string) error + // FromYaml unmarshals EventLink from YAML text + FromYaml(value string) error + // FromJson unmarshals EventLink from JSON text + FromJson(value string) error +} + +func (obj *eventLink) Marshal() marshalEventLink { + if obj.marshaller == nil { + obj.marshaller = &marshaleventLink{obj: obj} + } + return obj.marshaller +} + +func (obj *eventLink) Unmarshal() unMarshalEventLink { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaleventLink{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaleventLink) ToProto() (*otg.EventLink, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaleventLink) FromProto(msg *otg.EventLink) (EventLink, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaleventLink) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaleventLink) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaleventLink) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaleventLink) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaleventLink) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaleventLink) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *eventLink) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *eventLink) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *eventLink) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *eventLink) Clone() (EventLink, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewEventLink() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// EventLink is the optional container for link up/down event configuration. +type EventLink interface { + Validation + // msg marshals EventLink to protobuf object *otg.EventLink + // and doesn't set defaults + msg() *otg.EventLink + // setMsg unmarshals EventLink from protobuf object *otg.EventLink + // and doesn't set defaults + setMsg(*otg.EventLink) EventLink + // provides marshal interface + Marshal() marshalEventLink + // provides unmarshal interface + Unmarshal() unMarshalEventLink + // validate validates EventLink + validate() error + // A stringer function + String() string + // Clones the object + Clone() (EventLink, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Enable returns bool, set in EventLink. + Enable() bool + // SetEnable assigns bool provided by user to EventLink + SetEnable(value bool) EventLink + // HasEnable checks if Enable has been set in EventLink + HasEnable() bool +} + +// True to enable notifications when a link up/down event occurs. +// Enable returns a bool +func (obj *eventLink) Enable() bool { + + return *obj.obj.Enable + +} + +// True to enable notifications when a link up/down event occurs. +// Enable returns a bool +func (obj *eventLink) HasEnable() bool { + return obj.obj.Enable != nil +} + +// True to enable notifications when a link up/down event occurs. +// SetEnable sets the bool value in the EventLink object +func (obj *eventLink) SetEnable(value bool) EventLink { + + obj.obj.Enable = &value + return obj +} + +func (obj *eventLink) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *eventLink) setDefault() { + if obj.obj.Enable == nil { + obj.SetEnable(false) + } + +} diff --git a/gosnappi/event_route_advertise_withdraw.go b/gosnappi/event_route_advertise_withdraw.go new file mode 100644 index 00000000..f67ff9a0 --- /dev/null +++ b/gosnappi/event_route_advertise_withdraw.go @@ -0,0 +1,312 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** EventRouteAdvertiseWithdraw ***** +type eventRouteAdvertiseWithdraw struct { + validation + obj *otg.EventRouteAdvertiseWithdraw + marshaller marshalEventRouteAdvertiseWithdraw + unMarshaller unMarshalEventRouteAdvertiseWithdraw +} + +func NewEventRouteAdvertiseWithdraw() EventRouteAdvertiseWithdraw { + obj := eventRouteAdvertiseWithdraw{obj: &otg.EventRouteAdvertiseWithdraw{}} + obj.setDefault() + return &obj +} + +func (obj *eventRouteAdvertiseWithdraw) msg() *otg.EventRouteAdvertiseWithdraw { + return obj.obj +} + +func (obj *eventRouteAdvertiseWithdraw) setMsg(msg *otg.EventRouteAdvertiseWithdraw) EventRouteAdvertiseWithdraw { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaleventRouteAdvertiseWithdraw struct { + obj *eventRouteAdvertiseWithdraw +} + +type marshalEventRouteAdvertiseWithdraw interface { + // ToProto marshals EventRouteAdvertiseWithdraw to protobuf object *otg.EventRouteAdvertiseWithdraw + ToProto() (*otg.EventRouteAdvertiseWithdraw, error) + // ToPbText marshals EventRouteAdvertiseWithdraw to protobuf text + ToPbText() (string, error) + // ToYaml marshals EventRouteAdvertiseWithdraw to YAML text + ToYaml() (string, error) + // ToJson marshals EventRouteAdvertiseWithdraw to JSON text + ToJson() (string, error) +} + +type unMarshaleventRouteAdvertiseWithdraw struct { + obj *eventRouteAdvertiseWithdraw +} + +type unMarshalEventRouteAdvertiseWithdraw interface { + // FromProto unmarshals EventRouteAdvertiseWithdraw from protobuf object *otg.EventRouteAdvertiseWithdraw + FromProto(msg *otg.EventRouteAdvertiseWithdraw) (EventRouteAdvertiseWithdraw, error) + // FromPbText unmarshals EventRouteAdvertiseWithdraw from protobuf text + FromPbText(value string) error + // FromYaml unmarshals EventRouteAdvertiseWithdraw from YAML text + FromYaml(value string) error + // FromJson unmarshals EventRouteAdvertiseWithdraw from JSON text + FromJson(value string) error +} + +func (obj *eventRouteAdvertiseWithdraw) Marshal() marshalEventRouteAdvertiseWithdraw { + if obj.marshaller == nil { + obj.marshaller = &marshaleventRouteAdvertiseWithdraw{obj: obj} + } + return obj.marshaller +} + +func (obj *eventRouteAdvertiseWithdraw) Unmarshal() unMarshalEventRouteAdvertiseWithdraw { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaleventRouteAdvertiseWithdraw{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaleventRouteAdvertiseWithdraw) ToProto() (*otg.EventRouteAdvertiseWithdraw, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaleventRouteAdvertiseWithdraw) FromProto(msg *otg.EventRouteAdvertiseWithdraw) (EventRouteAdvertiseWithdraw, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaleventRouteAdvertiseWithdraw) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaleventRouteAdvertiseWithdraw) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaleventRouteAdvertiseWithdraw) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaleventRouteAdvertiseWithdraw) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaleventRouteAdvertiseWithdraw) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaleventRouteAdvertiseWithdraw) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *eventRouteAdvertiseWithdraw) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *eventRouteAdvertiseWithdraw) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *eventRouteAdvertiseWithdraw) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *eventRouteAdvertiseWithdraw) Clone() (EventRouteAdvertiseWithdraw, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewEventRouteAdvertiseWithdraw() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// EventRouteAdvertiseWithdraw is the optional container for route advertise/withdraw event configuration. +type EventRouteAdvertiseWithdraw interface { + Validation + // msg marshals EventRouteAdvertiseWithdraw to protobuf object *otg.EventRouteAdvertiseWithdraw + // and doesn't set defaults + msg() *otg.EventRouteAdvertiseWithdraw + // setMsg unmarshals EventRouteAdvertiseWithdraw from protobuf object *otg.EventRouteAdvertiseWithdraw + // and doesn't set defaults + setMsg(*otg.EventRouteAdvertiseWithdraw) EventRouteAdvertiseWithdraw + // provides marshal interface + Marshal() marshalEventRouteAdvertiseWithdraw + // provides unmarshal interface + Unmarshal() unMarshalEventRouteAdvertiseWithdraw + // validate validates EventRouteAdvertiseWithdraw + validate() error + // A stringer function + String() string + // Clones the object + Clone() (EventRouteAdvertiseWithdraw, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Enable returns bool, set in EventRouteAdvertiseWithdraw. + Enable() bool + // SetEnable assigns bool provided by user to EventRouteAdvertiseWithdraw + SetEnable(value bool) EventRouteAdvertiseWithdraw + // HasEnable checks if Enable has been set in EventRouteAdvertiseWithdraw + HasEnable() bool +} + +// True to enable notifications when a route advertise/withdraw +// event occurs. +// Enable returns a bool +func (obj *eventRouteAdvertiseWithdraw) Enable() bool { + + return *obj.obj.Enable + +} + +// True to enable notifications when a route advertise/withdraw +// event occurs. +// Enable returns a bool +func (obj *eventRouteAdvertiseWithdraw) HasEnable() bool { + return obj.obj.Enable != nil +} + +// True to enable notifications when a route advertise/withdraw +// event occurs. +// SetEnable sets the bool value in the EventRouteAdvertiseWithdraw object +func (obj *eventRouteAdvertiseWithdraw) SetEnable(value bool) EventRouteAdvertiseWithdraw { + + obj.obj.Enable = &value + return obj +} + +func (obj *eventRouteAdvertiseWithdraw) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *eventRouteAdvertiseWithdraw) setDefault() { + if obj.obj.Enable == nil { + obj.SetEnable(false) + } + +} diff --git a/gosnappi/event_rx_rate_threshold.go b/gosnappi/event_rx_rate_threshold.go new file mode 100644 index 00000000..066adcb2 --- /dev/null +++ b/gosnappi/event_rx_rate_threshold.go @@ -0,0 +1,359 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** EventRxRateThreshold ***** +type eventRxRateThreshold struct { + validation + obj *otg.EventRxRateThreshold + marshaller marshalEventRxRateThreshold + unMarshaller unMarshalEventRxRateThreshold +} + +func NewEventRxRateThreshold() EventRxRateThreshold { + obj := eventRxRateThreshold{obj: &otg.EventRxRateThreshold{}} + obj.setDefault() + return &obj +} + +func (obj *eventRxRateThreshold) msg() *otg.EventRxRateThreshold { + return obj.obj +} + +func (obj *eventRxRateThreshold) setMsg(msg *otg.EventRxRateThreshold) EventRxRateThreshold { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshaleventRxRateThreshold struct { + obj *eventRxRateThreshold +} + +type marshalEventRxRateThreshold interface { + // ToProto marshals EventRxRateThreshold to protobuf object *otg.EventRxRateThreshold + ToProto() (*otg.EventRxRateThreshold, error) + // ToPbText marshals EventRxRateThreshold to protobuf text + ToPbText() (string, error) + // ToYaml marshals EventRxRateThreshold to YAML text + ToYaml() (string, error) + // ToJson marshals EventRxRateThreshold to JSON text + ToJson() (string, error) +} + +type unMarshaleventRxRateThreshold struct { + obj *eventRxRateThreshold +} + +type unMarshalEventRxRateThreshold interface { + // FromProto unmarshals EventRxRateThreshold from protobuf object *otg.EventRxRateThreshold + FromProto(msg *otg.EventRxRateThreshold) (EventRxRateThreshold, error) + // FromPbText unmarshals EventRxRateThreshold from protobuf text + FromPbText(value string) error + // FromYaml unmarshals EventRxRateThreshold from YAML text + FromYaml(value string) error + // FromJson unmarshals EventRxRateThreshold from JSON text + FromJson(value string) error +} + +func (obj *eventRxRateThreshold) Marshal() marshalEventRxRateThreshold { + if obj.marshaller == nil { + obj.marshaller = &marshaleventRxRateThreshold{obj: obj} + } + return obj.marshaller +} + +func (obj *eventRxRateThreshold) Unmarshal() unMarshalEventRxRateThreshold { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshaleventRxRateThreshold{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshaleventRxRateThreshold) ToProto() (*otg.EventRxRateThreshold, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshaleventRxRateThreshold) FromProto(msg *otg.EventRxRateThreshold) (EventRxRateThreshold, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshaleventRxRateThreshold) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshaleventRxRateThreshold) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshaleventRxRateThreshold) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaleventRxRateThreshold) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshaleventRxRateThreshold) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshaleventRxRateThreshold) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *eventRxRateThreshold) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *eventRxRateThreshold) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *eventRxRateThreshold) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *eventRxRateThreshold) Clone() (EventRxRateThreshold, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewEventRxRateThreshold() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// EventRxRateThreshold is the optional container for rx rate threshold event configuration. +type EventRxRateThreshold interface { + Validation + // msg marshals EventRxRateThreshold to protobuf object *otg.EventRxRateThreshold + // and doesn't set defaults + msg() *otg.EventRxRateThreshold + // setMsg unmarshals EventRxRateThreshold from protobuf object *otg.EventRxRateThreshold + // and doesn't set defaults + setMsg(*otg.EventRxRateThreshold) EventRxRateThreshold + // provides marshal interface + Marshal() marshalEventRxRateThreshold + // provides unmarshal interface + Unmarshal() unMarshalEventRxRateThreshold + // validate validates EventRxRateThreshold + validate() error + // A stringer function + String() string + // Clones the object + Clone() (EventRxRateThreshold, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Enable returns bool, set in EventRxRateThreshold. + Enable() bool + // SetEnable assigns bool provided by user to EventRxRateThreshold + SetEnable(value bool) EventRxRateThreshold + // HasEnable checks if Enable has been set in EventRxRateThreshold + HasEnable() bool + // Threshold returns float32, set in EventRxRateThreshold. + Threshold() float32 + // SetThreshold assigns float32 provided by user to EventRxRateThreshold + SetThreshold(value float32) EventRxRateThreshold + // HasThreshold checks if Threshold has been set in EventRxRateThreshold + HasThreshold() bool +} + +// True to enable the rx_rate_threshold event. +// Enabling this option may affect the resultant packet payload due to +// additional instrumentation data. +// Enable returns a bool +func (obj *eventRxRateThreshold) Enable() bool { + + return *obj.obj.Enable + +} + +// True to enable the rx_rate_threshold event. +// Enabling this option may affect the resultant packet payload due to +// additional instrumentation data. +// Enable returns a bool +func (obj *eventRxRateThreshold) HasEnable() bool { + return obj.obj.Enable != nil +} + +// True to enable the rx_rate_threshold event. +// Enabling this option may affect the resultant packet payload due to +// additional instrumentation data. +// SetEnable sets the bool value in the EventRxRateThreshold object +func (obj *eventRxRateThreshold) SetEnable(value bool) EventRxRateThreshold { + + obj.obj.Enable = &value + return obj +} + +// True to enable notifications when the rx rate of a flow passes above +// or below the threshold value. +// Threshold returns a float32 +func (obj *eventRxRateThreshold) Threshold() float32 { + + return *obj.obj.Threshold + +} + +// True to enable notifications when the rx rate of a flow passes above +// or below the threshold value. +// Threshold returns a float32 +func (obj *eventRxRateThreshold) HasThreshold() bool { + return obj.obj.Threshold != nil +} + +// True to enable notifications when the rx rate of a flow passes above +// or below the threshold value. +// SetThreshold sets the float32 value in the EventRxRateThreshold object +func (obj *eventRxRateThreshold) SetThreshold(value float32) EventRxRateThreshold { + + obj.obj.Threshold = &value + return obj +} + +func (obj *eventRxRateThreshold) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Threshold != nil { + + if *obj.obj.Threshold < 0 || *obj.obj.Threshold > 100 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= EventRxRateThreshold.Threshold <= 100 but Got %f", *obj.obj.Threshold)) + } + + } + +} + +func (obj *eventRxRateThreshold) setDefault() { + if obj.obj.Enable == nil { + obj.SetEnable(false) + } + if obj.obj.Threshold == nil { + obj.SetThreshold(95) + } + +} diff --git a/gosnappi/flow.go b/gosnappi/flow.go new file mode 100644 index 00000000..6934c481 --- /dev/null +++ b/gosnappi/flow.go @@ -0,0 +1,679 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Flow ***** +type flow struct { + validation + obj *otg.Flow + marshaller marshalFlow + unMarshaller unMarshalFlow + txRxHolder FlowTxRx + packetHolder FlowFlowHeaderIter + egressPacketHolder FlowFlowHeaderIter + sizeHolder FlowSize + rateHolder FlowRate + durationHolder FlowDuration + metricsHolder FlowMetrics +} + +func NewFlow() Flow { + obj := flow{obj: &otg.Flow{}} + obj.setDefault() + return &obj +} + +func (obj *flow) msg() *otg.Flow { + return obj.obj +} + +func (obj *flow) setMsg(msg *otg.Flow) Flow { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflow struct { + obj *flow +} + +type marshalFlow interface { + // ToProto marshals Flow to protobuf object *otg.Flow + ToProto() (*otg.Flow, error) + // ToPbText marshals Flow to protobuf text + ToPbText() (string, error) + // ToYaml marshals Flow to YAML text + ToYaml() (string, error) + // ToJson marshals Flow to JSON text + ToJson() (string, error) +} + +type unMarshalflow struct { + obj *flow +} + +type unMarshalFlow interface { + // FromProto unmarshals Flow from protobuf object *otg.Flow + FromProto(msg *otg.Flow) (Flow, error) + // FromPbText unmarshals Flow from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Flow from YAML text + FromYaml(value string) error + // FromJson unmarshals Flow from JSON text + FromJson(value string) error +} + +func (obj *flow) Marshal() marshalFlow { + if obj.marshaller == nil { + obj.marshaller = &marshalflow{obj: obj} + } + return obj.marshaller +} + +func (obj *flow) Unmarshal() unMarshalFlow { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflow{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflow) ToProto() (*otg.Flow, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflow) FromProto(msg *otg.Flow) (Flow, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflow) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflow) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflow) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflow) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflow) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflow) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flow) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flow) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flow) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flow) Clone() (Flow, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlow() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flow) setNil() { + obj.txRxHolder = nil + obj.packetHolder = nil + obj.egressPacketHolder = nil + obj.sizeHolder = nil + obj.rateHolder = nil + obj.durationHolder = nil + obj.metricsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Flow is a high level data plane traffic flow. +type Flow interface { + Validation + // msg marshals Flow to protobuf object *otg.Flow + // and doesn't set defaults + msg() *otg.Flow + // setMsg unmarshals Flow from protobuf object *otg.Flow + // and doesn't set defaults + setMsg(*otg.Flow) Flow + // provides marshal interface + Marshal() marshalFlow + // provides unmarshal interface + Unmarshal() unMarshalFlow + // validate validates Flow + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Flow, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // TxRx returns FlowTxRx, set in Flow. + // FlowTxRx is a container for different types of transmit and receive + // endpoint containers. + TxRx() FlowTxRx + // SetTxRx assigns FlowTxRx provided by user to Flow. + // FlowTxRx is a container for different types of transmit and receive + // endpoint containers. + SetTxRx(value FlowTxRx) Flow + // Packet returns FlowFlowHeaderIterIter, set in Flow + Packet() FlowFlowHeaderIter + // EgressPacket returns FlowFlowHeaderIterIter, set in Flow + EgressPacket() FlowFlowHeaderIter + // Size returns FlowSize, set in Flow. + // FlowSize is the frame size which overrides the total length of the packet + Size() FlowSize + // SetSize assigns FlowSize provided by user to Flow. + // FlowSize is the frame size which overrides the total length of the packet + SetSize(value FlowSize) Flow + // HasSize checks if Size has been set in Flow + HasSize() bool + // Rate returns FlowRate, set in Flow. + // FlowRate is the rate of packet transmission + Rate() FlowRate + // SetRate assigns FlowRate provided by user to Flow. + // FlowRate is the rate of packet transmission + SetRate(value FlowRate) Flow + // HasRate checks if Rate has been set in Flow + HasRate() bool + // Duration returns FlowDuration, set in Flow. + // FlowDuration is a container for different transmit durations. + Duration() FlowDuration + // SetDuration assigns FlowDuration provided by user to Flow. + // FlowDuration is a container for different transmit durations. + SetDuration(value FlowDuration) Flow + // HasDuration checks if Duration has been set in Flow + HasDuration() bool + // Metrics returns FlowMetrics, set in Flow. + // FlowMetrics is the optional container for configuring flow metrics. + Metrics() FlowMetrics + // SetMetrics assigns FlowMetrics provided by user to Flow. + // FlowMetrics is the optional container for configuring flow metrics. + SetMetrics(value FlowMetrics) Flow + // HasMetrics checks if Metrics has been set in Flow + HasMetrics() bool + // Name returns string, set in Flow. + Name() string + // SetName assigns string provided by user to Flow + SetName(value string) Flow + setNil() +} + +// The transmit and receive endpoints. +// TxRx returns a FlowTxRx +func (obj *flow) TxRx() FlowTxRx { + if obj.obj.TxRx == nil { + obj.obj.TxRx = NewFlowTxRx().msg() + } + if obj.txRxHolder == nil { + obj.txRxHolder = &flowTxRx{obj: obj.obj.TxRx} + } + return obj.txRxHolder +} + +// The transmit and receive endpoints. +// SetTxRx sets the FlowTxRx value in the Flow object +func (obj *flow) SetTxRx(value FlowTxRx) Flow { + + obj.txRxHolder = nil + obj.obj.TxRx = value.msg() + + return obj +} + +// The list of protocol headers defining the shape of all +// intended packets in corresponding flow as it is transmitted +// by traffic-generator port. +// +// The order of protocol headers assigned to the list is the +// order they will appear on the wire. +// +// In the case of an empty list the keyword/value of minItems: 1 +// indicates that an implementation MUST provide at least one +// Flow.Header object. +// +// The default value for the Flow.Header choice property is ethernet +// which will result in an implementation by default providing at least +// one ethernet packet header. +// Packet returns a []FlowHeader +func (obj *flow) Packet() FlowFlowHeaderIter { + if len(obj.obj.Packet) == 0 { + obj.obj.Packet = []*otg.FlowHeader{} + } + if obj.packetHolder == nil { + obj.packetHolder = newFlowFlowHeaderIter(&obj.obj.Packet).setMsg(obj) + } + return obj.packetHolder +} + +type flowFlowHeaderIter struct { + obj *flow + flowHeaderSlice []FlowHeader + fieldPtr *[]*otg.FlowHeader +} + +func newFlowFlowHeaderIter(ptr *[]*otg.FlowHeader) FlowFlowHeaderIter { + return &flowFlowHeaderIter{fieldPtr: ptr} +} + +type FlowFlowHeaderIter interface { + setMsg(*flow) FlowFlowHeaderIter + Items() []FlowHeader + Add() FlowHeader + Append(items ...FlowHeader) FlowFlowHeaderIter + Set(index int, newObj FlowHeader) FlowFlowHeaderIter + Clear() FlowFlowHeaderIter + clearHolderSlice() FlowFlowHeaderIter + appendHolderSlice(item FlowHeader) FlowFlowHeaderIter +} + +func (obj *flowFlowHeaderIter) setMsg(msg *flow) FlowFlowHeaderIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flowHeader{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *flowFlowHeaderIter) Items() []FlowHeader { + return obj.flowHeaderSlice +} + +func (obj *flowFlowHeaderIter) Add() FlowHeader { + newObj := &otg.FlowHeader{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flowHeader{obj: newObj} + newLibObj.setDefault() + obj.flowHeaderSlice = append(obj.flowHeaderSlice, newLibObj) + return newLibObj +} + +func (obj *flowFlowHeaderIter) Append(items ...FlowHeader) FlowFlowHeaderIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowHeaderSlice = append(obj.flowHeaderSlice, item) + } + return obj +} + +func (obj *flowFlowHeaderIter) Set(index int, newObj FlowHeader) FlowFlowHeaderIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowHeaderSlice[index] = newObj + return obj +} +func (obj *flowFlowHeaderIter) Clear() FlowFlowHeaderIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.FlowHeader{} + obj.flowHeaderSlice = []FlowHeader{} + } + return obj +} +func (obj *flowFlowHeaderIter) clearHolderSlice() FlowFlowHeaderIter { + if len(obj.flowHeaderSlice) > 0 { + obj.flowHeaderSlice = []FlowHeader{} + } + return obj +} +func (obj *flowFlowHeaderIter) appendHolderSlice(item FlowHeader) FlowFlowHeaderIter { + obj.flowHeaderSlice = append(obj.flowHeaderSlice, item) + return obj +} + +// Under Review: The packet header schema for egress tracking currently exposes unwanted fields. The query structure for tagged metrics inside flows metrics requires documenting expected response format. +// +// Under Review: The packet header schema for egress tracking currently exposes unwanted fields. The query structure for tagged metrics inside flows metrics requires documenting expected response format. +// +// The list of protocol headers defining the shape of all +// intended packets in corresponding flow as it is received +// by traffic-generator port. +// +// For all protocol headers, only the `metric_tags` property is configurable. +// EgressPacket returns a []FlowHeader +func (obj *flow) EgressPacket() FlowFlowHeaderIter { + if len(obj.obj.EgressPacket) == 0 { + obj.obj.EgressPacket = []*otg.FlowHeader{} + } + if obj.egressPacketHolder == nil { + obj.egressPacketHolder = newFlowFlowHeaderIter(&obj.obj.EgressPacket).setMsg(obj) + } + return obj.egressPacketHolder +} + +// The size of the packets. +// Size returns a FlowSize +func (obj *flow) Size() FlowSize { + if obj.obj.Size == nil { + obj.obj.Size = NewFlowSize().msg() + } + if obj.sizeHolder == nil { + obj.sizeHolder = &flowSize{obj: obj.obj.Size} + } + return obj.sizeHolder +} + +// The size of the packets. +// Size returns a FlowSize +func (obj *flow) HasSize() bool { + return obj.obj.Size != nil +} + +// The size of the packets. +// SetSize sets the FlowSize value in the Flow object +func (obj *flow) SetSize(value FlowSize) Flow { + + obj.sizeHolder = nil + obj.obj.Size = value.msg() + + return obj +} + +// The transmit rate of the packets. +// Rate returns a FlowRate +func (obj *flow) Rate() FlowRate { + if obj.obj.Rate == nil { + obj.obj.Rate = NewFlowRate().msg() + } + if obj.rateHolder == nil { + obj.rateHolder = &flowRate{obj: obj.obj.Rate} + } + return obj.rateHolder +} + +// The transmit rate of the packets. +// Rate returns a FlowRate +func (obj *flow) HasRate() bool { + return obj.obj.Rate != nil +} + +// The transmit rate of the packets. +// SetRate sets the FlowRate value in the Flow object +func (obj *flow) SetRate(value FlowRate) Flow { + + obj.rateHolder = nil + obj.obj.Rate = value.msg() + + return obj +} + +// The transmit duration of the packets. +// Duration returns a FlowDuration +func (obj *flow) Duration() FlowDuration { + if obj.obj.Duration == nil { + obj.obj.Duration = NewFlowDuration().msg() + } + if obj.durationHolder == nil { + obj.durationHolder = &flowDuration{obj: obj.obj.Duration} + } + return obj.durationHolder +} + +// The transmit duration of the packets. +// Duration returns a FlowDuration +func (obj *flow) HasDuration() bool { + return obj.obj.Duration != nil +} + +// The transmit duration of the packets. +// SetDuration sets the FlowDuration value in the Flow object +func (obj *flow) SetDuration(value FlowDuration) Flow { + + obj.durationHolder = nil + obj.obj.Duration = value.msg() + + return obj +} + +// Flow metrics. +// Metrics returns a FlowMetrics +func (obj *flow) Metrics() FlowMetrics { + if obj.obj.Metrics == nil { + obj.obj.Metrics = NewFlowMetrics().msg() + } + if obj.metricsHolder == nil { + obj.metricsHolder = &flowMetrics{obj: obj.obj.Metrics} + } + return obj.metricsHolder +} + +// Flow metrics. +// Metrics returns a FlowMetrics +func (obj *flow) HasMetrics() bool { + return obj.obj.Metrics != nil +} + +// Flow metrics. +// SetMetrics sets the FlowMetrics value in the Flow object +func (obj *flow) SetMetrics(value FlowMetrics) Flow { + + obj.metricsHolder = nil + obj.obj.Metrics = value.msg() + + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *flow) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the Flow object +func (obj *flow) SetName(value string) Flow { + + obj.obj.Name = &value + return obj +} + +func (obj *flow) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // TxRx is required + if obj.obj.TxRx == nil { + vObj.validationErrors = append(vObj.validationErrors, "TxRx is required field on interface Flow") + } + + if obj.obj.TxRx != nil { + + obj.TxRx().validateObj(vObj, set_default) + } + + if len(obj.obj.Packet) != 0 { + + if set_default { + obj.Packet().clearHolderSlice() + for _, item := range obj.obj.Packet { + obj.Packet().appendHolderSlice(&flowHeader{obj: item}) + } + } + for _, item := range obj.Packet().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.EgressPacket) != 0 { + + if set_default { + obj.EgressPacket().clearHolderSlice() + for _, item := range obj.obj.EgressPacket { + obj.EgressPacket().appendHolderSlice(&flowHeader{obj: item}) + } + } + for _, item := range obj.EgressPacket().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Size != nil { + + obj.Size().validateObj(vObj, set_default) + } + + if obj.obj.Rate != nil { + + obj.Rate().validateObj(vObj, set_default) + } + + if obj.obj.Duration != nil { + + obj.Duration().validateObj(vObj, set_default) + } + + if obj.obj.Metrics != nil { + + obj.Metrics().validateObj(vObj, set_default) + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface Flow") + } +} + +func (obj *flow) setDefault() { + +} diff --git a/gosnappi/flow_arp.go b/gosnappi/flow_arp.go new file mode 100644 index 00000000..ab67599a --- /dev/null +++ b/gosnappi/flow_arp.go @@ -0,0 +1,672 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowArp ***** +type flowArp struct { + validation + obj *otg.FlowArp + marshaller marshalFlowArp + unMarshaller unMarshalFlowArp + hardwareTypeHolder PatternFlowArpHardwareType + protocolTypeHolder PatternFlowArpProtocolType + hardwareLengthHolder PatternFlowArpHardwareLength + protocolLengthHolder PatternFlowArpProtocolLength + operationHolder PatternFlowArpOperation + senderHardwareAddrHolder PatternFlowArpSenderHardwareAddr + senderProtocolAddrHolder PatternFlowArpSenderProtocolAddr + targetHardwareAddrHolder PatternFlowArpTargetHardwareAddr + targetProtocolAddrHolder PatternFlowArpTargetProtocolAddr +} + +func NewFlowArp() FlowArp { + obj := flowArp{obj: &otg.FlowArp{}} + obj.setDefault() + return &obj +} + +func (obj *flowArp) msg() *otg.FlowArp { + return obj.obj +} + +func (obj *flowArp) setMsg(msg *otg.FlowArp) FlowArp { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowArp struct { + obj *flowArp +} + +type marshalFlowArp interface { + // ToProto marshals FlowArp to protobuf object *otg.FlowArp + ToProto() (*otg.FlowArp, error) + // ToPbText marshals FlowArp to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowArp to YAML text + ToYaml() (string, error) + // ToJson marshals FlowArp to JSON text + ToJson() (string, error) +} + +type unMarshalflowArp struct { + obj *flowArp +} + +type unMarshalFlowArp interface { + // FromProto unmarshals FlowArp from protobuf object *otg.FlowArp + FromProto(msg *otg.FlowArp) (FlowArp, error) + // FromPbText unmarshals FlowArp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowArp from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowArp from JSON text + FromJson(value string) error +} + +func (obj *flowArp) Marshal() marshalFlowArp { + if obj.marshaller == nil { + obj.marshaller = &marshalflowArp{obj: obj} + } + return obj.marshaller +} + +func (obj *flowArp) Unmarshal() unMarshalFlowArp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowArp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowArp) ToProto() (*otg.FlowArp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowArp) FromProto(msg *otg.FlowArp) (FlowArp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowArp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowArp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowArp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowArp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowArp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowArp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowArp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowArp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowArp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowArp) Clone() (FlowArp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowArp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowArp) setNil() { + obj.hardwareTypeHolder = nil + obj.protocolTypeHolder = nil + obj.hardwareLengthHolder = nil + obj.protocolLengthHolder = nil + obj.operationHolder = nil + obj.senderHardwareAddrHolder = nil + obj.senderProtocolAddrHolder = nil + obj.targetHardwareAddrHolder = nil + obj.targetProtocolAddrHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowArp is aRP packet header +type FlowArp interface { + Validation + // msg marshals FlowArp to protobuf object *otg.FlowArp + // and doesn't set defaults + msg() *otg.FlowArp + // setMsg unmarshals FlowArp from protobuf object *otg.FlowArp + // and doesn't set defaults + setMsg(*otg.FlowArp) FlowArp + // provides marshal interface + Marshal() marshalFlowArp + // provides unmarshal interface + Unmarshal() unMarshalFlowArp + // validate validates FlowArp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowArp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // HardwareType returns PatternFlowArpHardwareType, set in FlowArp. + // PatternFlowArpHardwareType is network link protocol type + HardwareType() PatternFlowArpHardwareType + // SetHardwareType assigns PatternFlowArpHardwareType provided by user to FlowArp. + // PatternFlowArpHardwareType is network link protocol type + SetHardwareType(value PatternFlowArpHardwareType) FlowArp + // HasHardwareType checks if HardwareType has been set in FlowArp + HasHardwareType() bool + // ProtocolType returns PatternFlowArpProtocolType, set in FlowArp. + // PatternFlowArpProtocolType is the internetwork protocol for which the ARP request is intended + ProtocolType() PatternFlowArpProtocolType + // SetProtocolType assigns PatternFlowArpProtocolType provided by user to FlowArp. + // PatternFlowArpProtocolType is the internetwork protocol for which the ARP request is intended + SetProtocolType(value PatternFlowArpProtocolType) FlowArp + // HasProtocolType checks if ProtocolType has been set in FlowArp + HasProtocolType() bool + // HardwareLength returns PatternFlowArpHardwareLength, set in FlowArp. + // PatternFlowArpHardwareLength is length (in octets) of a hardware address + HardwareLength() PatternFlowArpHardwareLength + // SetHardwareLength assigns PatternFlowArpHardwareLength provided by user to FlowArp. + // PatternFlowArpHardwareLength is length (in octets) of a hardware address + SetHardwareLength(value PatternFlowArpHardwareLength) FlowArp + // HasHardwareLength checks if HardwareLength has been set in FlowArp + HasHardwareLength() bool + // ProtocolLength returns PatternFlowArpProtocolLength, set in FlowArp. + // PatternFlowArpProtocolLength is length (in octets) of internetwork addresses + ProtocolLength() PatternFlowArpProtocolLength + // SetProtocolLength assigns PatternFlowArpProtocolLength provided by user to FlowArp. + // PatternFlowArpProtocolLength is length (in octets) of internetwork addresses + SetProtocolLength(value PatternFlowArpProtocolLength) FlowArp + // HasProtocolLength checks if ProtocolLength has been set in FlowArp + HasProtocolLength() bool + // Operation returns PatternFlowArpOperation, set in FlowArp. + // PatternFlowArpOperation is the operation that the sender is performing + Operation() PatternFlowArpOperation + // SetOperation assigns PatternFlowArpOperation provided by user to FlowArp. + // PatternFlowArpOperation is the operation that the sender is performing + SetOperation(value PatternFlowArpOperation) FlowArp + // HasOperation checks if Operation has been set in FlowArp + HasOperation() bool + // SenderHardwareAddr returns PatternFlowArpSenderHardwareAddr, set in FlowArp. + // PatternFlowArpSenderHardwareAddr is media address of the sender + SenderHardwareAddr() PatternFlowArpSenderHardwareAddr + // SetSenderHardwareAddr assigns PatternFlowArpSenderHardwareAddr provided by user to FlowArp. + // PatternFlowArpSenderHardwareAddr is media address of the sender + SetSenderHardwareAddr(value PatternFlowArpSenderHardwareAddr) FlowArp + // HasSenderHardwareAddr checks if SenderHardwareAddr has been set in FlowArp + HasSenderHardwareAddr() bool + // SenderProtocolAddr returns PatternFlowArpSenderProtocolAddr, set in FlowArp. + // PatternFlowArpSenderProtocolAddr is internetwork address of the sender + SenderProtocolAddr() PatternFlowArpSenderProtocolAddr + // SetSenderProtocolAddr assigns PatternFlowArpSenderProtocolAddr provided by user to FlowArp. + // PatternFlowArpSenderProtocolAddr is internetwork address of the sender + SetSenderProtocolAddr(value PatternFlowArpSenderProtocolAddr) FlowArp + // HasSenderProtocolAddr checks if SenderProtocolAddr has been set in FlowArp + HasSenderProtocolAddr() bool + // TargetHardwareAddr returns PatternFlowArpTargetHardwareAddr, set in FlowArp. + // PatternFlowArpTargetHardwareAddr is media address of the target + TargetHardwareAddr() PatternFlowArpTargetHardwareAddr + // SetTargetHardwareAddr assigns PatternFlowArpTargetHardwareAddr provided by user to FlowArp. + // PatternFlowArpTargetHardwareAddr is media address of the target + SetTargetHardwareAddr(value PatternFlowArpTargetHardwareAddr) FlowArp + // HasTargetHardwareAddr checks if TargetHardwareAddr has been set in FlowArp + HasTargetHardwareAddr() bool + // TargetProtocolAddr returns PatternFlowArpTargetProtocolAddr, set in FlowArp. + // PatternFlowArpTargetProtocolAddr is internetwork address of the target + TargetProtocolAddr() PatternFlowArpTargetProtocolAddr + // SetTargetProtocolAddr assigns PatternFlowArpTargetProtocolAddr provided by user to FlowArp. + // PatternFlowArpTargetProtocolAddr is internetwork address of the target + SetTargetProtocolAddr(value PatternFlowArpTargetProtocolAddr) FlowArp + // HasTargetProtocolAddr checks if TargetProtocolAddr has been set in FlowArp + HasTargetProtocolAddr() bool + setNil() +} + +// description is TBD +// HardwareType returns a PatternFlowArpHardwareType +func (obj *flowArp) HardwareType() PatternFlowArpHardwareType { + if obj.obj.HardwareType == nil { + obj.obj.HardwareType = NewPatternFlowArpHardwareType().msg() + } + if obj.hardwareTypeHolder == nil { + obj.hardwareTypeHolder = &patternFlowArpHardwareType{obj: obj.obj.HardwareType} + } + return obj.hardwareTypeHolder +} + +// description is TBD +// HardwareType returns a PatternFlowArpHardwareType +func (obj *flowArp) HasHardwareType() bool { + return obj.obj.HardwareType != nil +} + +// description is TBD +// SetHardwareType sets the PatternFlowArpHardwareType value in the FlowArp object +func (obj *flowArp) SetHardwareType(value PatternFlowArpHardwareType) FlowArp { + + obj.hardwareTypeHolder = nil + obj.obj.HardwareType = value.msg() + + return obj +} + +// description is TBD +// ProtocolType returns a PatternFlowArpProtocolType +func (obj *flowArp) ProtocolType() PatternFlowArpProtocolType { + if obj.obj.ProtocolType == nil { + obj.obj.ProtocolType = NewPatternFlowArpProtocolType().msg() + } + if obj.protocolTypeHolder == nil { + obj.protocolTypeHolder = &patternFlowArpProtocolType{obj: obj.obj.ProtocolType} + } + return obj.protocolTypeHolder +} + +// description is TBD +// ProtocolType returns a PatternFlowArpProtocolType +func (obj *flowArp) HasProtocolType() bool { + return obj.obj.ProtocolType != nil +} + +// description is TBD +// SetProtocolType sets the PatternFlowArpProtocolType value in the FlowArp object +func (obj *flowArp) SetProtocolType(value PatternFlowArpProtocolType) FlowArp { + + obj.protocolTypeHolder = nil + obj.obj.ProtocolType = value.msg() + + return obj +} + +// description is TBD +// HardwareLength returns a PatternFlowArpHardwareLength +func (obj *flowArp) HardwareLength() PatternFlowArpHardwareLength { + if obj.obj.HardwareLength == nil { + obj.obj.HardwareLength = NewPatternFlowArpHardwareLength().msg() + } + if obj.hardwareLengthHolder == nil { + obj.hardwareLengthHolder = &patternFlowArpHardwareLength{obj: obj.obj.HardwareLength} + } + return obj.hardwareLengthHolder +} + +// description is TBD +// HardwareLength returns a PatternFlowArpHardwareLength +func (obj *flowArp) HasHardwareLength() bool { + return obj.obj.HardwareLength != nil +} + +// description is TBD +// SetHardwareLength sets the PatternFlowArpHardwareLength value in the FlowArp object +func (obj *flowArp) SetHardwareLength(value PatternFlowArpHardwareLength) FlowArp { + + obj.hardwareLengthHolder = nil + obj.obj.HardwareLength = value.msg() + + return obj +} + +// description is TBD +// ProtocolLength returns a PatternFlowArpProtocolLength +func (obj *flowArp) ProtocolLength() PatternFlowArpProtocolLength { + if obj.obj.ProtocolLength == nil { + obj.obj.ProtocolLength = NewPatternFlowArpProtocolLength().msg() + } + if obj.protocolLengthHolder == nil { + obj.protocolLengthHolder = &patternFlowArpProtocolLength{obj: obj.obj.ProtocolLength} + } + return obj.protocolLengthHolder +} + +// description is TBD +// ProtocolLength returns a PatternFlowArpProtocolLength +func (obj *flowArp) HasProtocolLength() bool { + return obj.obj.ProtocolLength != nil +} + +// description is TBD +// SetProtocolLength sets the PatternFlowArpProtocolLength value in the FlowArp object +func (obj *flowArp) SetProtocolLength(value PatternFlowArpProtocolLength) FlowArp { + + obj.protocolLengthHolder = nil + obj.obj.ProtocolLength = value.msg() + + return obj +} + +// description is TBD +// Operation returns a PatternFlowArpOperation +func (obj *flowArp) Operation() PatternFlowArpOperation { + if obj.obj.Operation == nil { + obj.obj.Operation = NewPatternFlowArpOperation().msg() + } + if obj.operationHolder == nil { + obj.operationHolder = &patternFlowArpOperation{obj: obj.obj.Operation} + } + return obj.operationHolder +} + +// description is TBD +// Operation returns a PatternFlowArpOperation +func (obj *flowArp) HasOperation() bool { + return obj.obj.Operation != nil +} + +// description is TBD +// SetOperation sets the PatternFlowArpOperation value in the FlowArp object +func (obj *flowArp) SetOperation(value PatternFlowArpOperation) FlowArp { + + obj.operationHolder = nil + obj.obj.Operation = value.msg() + + return obj +} + +// description is TBD +// SenderHardwareAddr returns a PatternFlowArpSenderHardwareAddr +func (obj *flowArp) SenderHardwareAddr() PatternFlowArpSenderHardwareAddr { + if obj.obj.SenderHardwareAddr == nil { + obj.obj.SenderHardwareAddr = NewPatternFlowArpSenderHardwareAddr().msg() + } + if obj.senderHardwareAddrHolder == nil { + obj.senderHardwareAddrHolder = &patternFlowArpSenderHardwareAddr{obj: obj.obj.SenderHardwareAddr} + } + return obj.senderHardwareAddrHolder +} + +// description is TBD +// SenderHardwareAddr returns a PatternFlowArpSenderHardwareAddr +func (obj *flowArp) HasSenderHardwareAddr() bool { + return obj.obj.SenderHardwareAddr != nil +} + +// description is TBD +// SetSenderHardwareAddr sets the PatternFlowArpSenderHardwareAddr value in the FlowArp object +func (obj *flowArp) SetSenderHardwareAddr(value PatternFlowArpSenderHardwareAddr) FlowArp { + + obj.senderHardwareAddrHolder = nil + obj.obj.SenderHardwareAddr = value.msg() + + return obj +} + +// description is TBD +// SenderProtocolAddr returns a PatternFlowArpSenderProtocolAddr +func (obj *flowArp) SenderProtocolAddr() PatternFlowArpSenderProtocolAddr { + if obj.obj.SenderProtocolAddr == nil { + obj.obj.SenderProtocolAddr = NewPatternFlowArpSenderProtocolAddr().msg() + } + if obj.senderProtocolAddrHolder == nil { + obj.senderProtocolAddrHolder = &patternFlowArpSenderProtocolAddr{obj: obj.obj.SenderProtocolAddr} + } + return obj.senderProtocolAddrHolder +} + +// description is TBD +// SenderProtocolAddr returns a PatternFlowArpSenderProtocolAddr +func (obj *flowArp) HasSenderProtocolAddr() bool { + return obj.obj.SenderProtocolAddr != nil +} + +// description is TBD +// SetSenderProtocolAddr sets the PatternFlowArpSenderProtocolAddr value in the FlowArp object +func (obj *flowArp) SetSenderProtocolAddr(value PatternFlowArpSenderProtocolAddr) FlowArp { + + obj.senderProtocolAddrHolder = nil + obj.obj.SenderProtocolAddr = value.msg() + + return obj +} + +// description is TBD +// TargetHardwareAddr returns a PatternFlowArpTargetHardwareAddr +func (obj *flowArp) TargetHardwareAddr() PatternFlowArpTargetHardwareAddr { + if obj.obj.TargetHardwareAddr == nil { + obj.obj.TargetHardwareAddr = NewPatternFlowArpTargetHardwareAddr().msg() + } + if obj.targetHardwareAddrHolder == nil { + obj.targetHardwareAddrHolder = &patternFlowArpTargetHardwareAddr{obj: obj.obj.TargetHardwareAddr} + } + return obj.targetHardwareAddrHolder +} + +// description is TBD +// TargetHardwareAddr returns a PatternFlowArpTargetHardwareAddr +func (obj *flowArp) HasTargetHardwareAddr() bool { + return obj.obj.TargetHardwareAddr != nil +} + +// description is TBD +// SetTargetHardwareAddr sets the PatternFlowArpTargetHardwareAddr value in the FlowArp object +func (obj *flowArp) SetTargetHardwareAddr(value PatternFlowArpTargetHardwareAddr) FlowArp { + + obj.targetHardwareAddrHolder = nil + obj.obj.TargetHardwareAddr = value.msg() + + return obj +} + +// description is TBD +// TargetProtocolAddr returns a PatternFlowArpTargetProtocolAddr +func (obj *flowArp) TargetProtocolAddr() PatternFlowArpTargetProtocolAddr { + if obj.obj.TargetProtocolAddr == nil { + obj.obj.TargetProtocolAddr = NewPatternFlowArpTargetProtocolAddr().msg() + } + if obj.targetProtocolAddrHolder == nil { + obj.targetProtocolAddrHolder = &patternFlowArpTargetProtocolAddr{obj: obj.obj.TargetProtocolAddr} + } + return obj.targetProtocolAddrHolder +} + +// description is TBD +// TargetProtocolAddr returns a PatternFlowArpTargetProtocolAddr +func (obj *flowArp) HasTargetProtocolAddr() bool { + return obj.obj.TargetProtocolAddr != nil +} + +// description is TBD +// SetTargetProtocolAddr sets the PatternFlowArpTargetProtocolAddr value in the FlowArp object +func (obj *flowArp) SetTargetProtocolAddr(value PatternFlowArpTargetProtocolAddr) FlowArp { + + obj.targetProtocolAddrHolder = nil + obj.obj.TargetProtocolAddr = value.msg() + + return obj +} + +func (obj *flowArp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.HardwareType != nil { + + obj.HardwareType().validateObj(vObj, set_default) + } + + if obj.obj.ProtocolType != nil { + + obj.ProtocolType().validateObj(vObj, set_default) + } + + if obj.obj.HardwareLength != nil { + + obj.HardwareLength().validateObj(vObj, set_default) + } + + if obj.obj.ProtocolLength != nil { + + obj.ProtocolLength().validateObj(vObj, set_default) + } + + if obj.obj.Operation != nil { + + obj.Operation().validateObj(vObj, set_default) + } + + if obj.obj.SenderHardwareAddr != nil { + + obj.SenderHardwareAddr().validateObj(vObj, set_default) + } + + if obj.obj.SenderProtocolAddr != nil { + + obj.SenderProtocolAddr().validateObj(vObj, set_default) + } + + if obj.obj.TargetHardwareAddr != nil { + + obj.TargetHardwareAddr().validateObj(vObj, set_default) + } + + if obj.obj.TargetProtocolAddr != nil { + + obj.TargetProtocolAddr().validateObj(vObj, set_default) + } + +} + +func (obj *flowArp) setDefault() { + +} diff --git a/gosnappi/flow_burst.go b/gosnappi/flow_burst.go new file mode 100644 index 00000000..05f5099b --- /dev/null +++ b/gosnappi/flow_burst.go @@ -0,0 +1,436 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowBurst ***** +type flowBurst struct { + validation + obj *otg.FlowBurst + marshaller marshalFlowBurst + unMarshaller unMarshalFlowBurst + interBurstGapHolder FlowDurationInterBurstGap +} + +func NewFlowBurst() FlowBurst { + obj := flowBurst{obj: &otg.FlowBurst{}} + obj.setDefault() + return &obj +} + +func (obj *flowBurst) msg() *otg.FlowBurst { + return obj.obj +} + +func (obj *flowBurst) setMsg(msg *otg.FlowBurst) FlowBurst { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowBurst struct { + obj *flowBurst +} + +type marshalFlowBurst interface { + // ToProto marshals FlowBurst to protobuf object *otg.FlowBurst + ToProto() (*otg.FlowBurst, error) + // ToPbText marshals FlowBurst to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowBurst to YAML text + ToYaml() (string, error) + // ToJson marshals FlowBurst to JSON text + ToJson() (string, error) +} + +type unMarshalflowBurst struct { + obj *flowBurst +} + +type unMarshalFlowBurst interface { + // FromProto unmarshals FlowBurst from protobuf object *otg.FlowBurst + FromProto(msg *otg.FlowBurst) (FlowBurst, error) + // FromPbText unmarshals FlowBurst from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowBurst from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowBurst from JSON text + FromJson(value string) error +} + +func (obj *flowBurst) Marshal() marshalFlowBurst { + if obj.marshaller == nil { + obj.marshaller = &marshalflowBurst{obj: obj} + } + return obj.marshaller +} + +func (obj *flowBurst) Unmarshal() unMarshalFlowBurst { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowBurst{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowBurst) ToProto() (*otg.FlowBurst, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowBurst) FromProto(msg *otg.FlowBurst) (FlowBurst, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowBurst) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowBurst) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowBurst) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowBurst) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowBurst) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowBurst) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowBurst) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowBurst) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowBurst) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowBurst) Clone() (FlowBurst, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowBurst() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowBurst) setNil() { + obj.interBurstGapHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowBurst is transmits continuous or fixed burst of packets. +// For continuous burst of packets, it will not automatically stop. +// For fixed burst of packets, it will stop after transmitting fixed number of bursts. +type FlowBurst interface { + Validation + // msg marshals FlowBurst to protobuf object *otg.FlowBurst + // and doesn't set defaults + msg() *otg.FlowBurst + // setMsg unmarshals FlowBurst from protobuf object *otg.FlowBurst + // and doesn't set defaults + setMsg(*otg.FlowBurst) FlowBurst + // provides marshal interface + Marshal() marshalFlowBurst + // provides unmarshal interface + Unmarshal() unMarshalFlowBurst + // validate validates FlowBurst + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowBurst, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Bursts returns uint32, set in FlowBurst. + Bursts() uint32 + // SetBursts assigns uint32 provided by user to FlowBurst + SetBursts(value uint32) FlowBurst + // HasBursts checks if Bursts has been set in FlowBurst + HasBursts() bool + // Packets returns uint32, set in FlowBurst. + Packets() uint32 + // SetPackets assigns uint32 provided by user to FlowBurst + SetPackets(value uint32) FlowBurst + // HasPackets checks if Packets has been set in FlowBurst + HasPackets() bool + // Gap returns uint32, set in FlowBurst. + Gap() uint32 + // SetGap assigns uint32 provided by user to FlowBurst + SetGap(value uint32) FlowBurst + // HasGap checks if Gap has been set in FlowBurst + HasGap() bool + // InterBurstGap returns FlowDurationInterBurstGap, set in FlowBurst. + // FlowDurationInterBurstGap is the optional container for specifying a gap between bursts. + InterBurstGap() FlowDurationInterBurstGap + // SetInterBurstGap assigns FlowDurationInterBurstGap provided by user to FlowBurst. + // FlowDurationInterBurstGap is the optional container for specifying a gap between bursts. + SetInterBurstGap(value FlowDurationInterBurstGap) FlowBurst + // HasInterBurstGap checks if InterBurstGap has been set in FlowBurst + HasInterBurstGap() bool + setNil() +} + +// The number of packet bursts transmitted per flow. +// A value of 0 implies continuous burst of packets. +// Bursts returns a uint32 +func (obj *flowBurst) Bursts() uint32 { + + return *obj.obj.Bursts + +} + +// The number of packet bursts transmitted per flow. +// A value of 0 implies continuous burst of packets. +// Bursts returns a uint32 +func (obj *flowBurst) HasBursts() bool { + return obj.obj.Bursts != nil +} + +// The number of packet bursts transmitted per flow. +// A value of 0 implies continuous burst of packets. +// SetBursts sets the uint32 value in the FlowBurst object +func (obj *flowBurst) SetBursts(value uint32) FlowBurst { + + obj.obj.Bursts = &value + return obj +} + +// The number of packets transmitted per burst. +// Packets returns a uint32 +func (obj *flowBurst) Packets() uint32 { + + return *obj.obj.Packets + +} + +// The number of packets transmitted per burst. +// Packets returns a uint32 +func (obj *flowBurst) HasPackets() bool { + return obj.obj.Packets != nil +} + +// The number of packets transmitted per burst. +// SetPackets sets the uint32 value in the FlowBurst object +func (obj *flowBurst) SetPackets(value uint32) FlowBurst { + + obj.obj.Packets = &value + return obj +} + +// The minimum gap between packets expressed as bytes. +// Gap returns a uint32 +func (obj *flowBurst) Gap() uint32 { + + return *obj.obj.Gap + +} + +// The minimum gap between packets expressed as bytes. +// Gap returns a uint32 +func (obj *flowBurst) HasGap() bool { + return obj.obj.Gap != nil +} + +// The minimum gap between packets expressed as bytes. +// SetGap sets the uint32 value in the FlowBurst object +func (obj *flowBurst) SetGap(value uint32) FlowBurst { + + obj.obj.Gap = &value + return obj +} + +// description is TBD +// InterBurstGap returns a FlowDurationInterBurstGap +func (obj *flowBurst) InterBurstGap() FlowDurationInterBurstGap { + if obj.obj.InterBurstGap == nil { + obj.obj.InterBurstGap = NewFlowDurationInterBurstGap().msg() + } + if obj.interBurstGapHolder == nil { + obj.interBurstGapHolder = &flowDurationInterBurstGap{obj: obj.obj.InterBurstGap} + } + return obj.interBurstGapHolder +} + +// description is TBD +// InterBurstGap returns a FlowDurationInterBurstGap +func (obj *flowBurst) HasInterBurstGap() bool { + return obj.obj.InterBurstGap != nil +} + +// description is TBD +// SetInterBurstGap sets the FlowDurationInterBurstGap value in the FlowBurst object +func (obj *flowBurst) SetInterBurstGap(value FlowDurationInterBurstGap) FlowBurst { + + obj.interBurstGapHolder = nil + obj.obj.InterBurstGap = value.msg() + + return obj +} + +func (obj *flowBurst) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Packets != nil { + + if *obj.obj.Packets < 1 || *obj.obj.Packets > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= FlowBurst.Packets <= 4294967295 but Got %d", *obj.obj.Packets)) + } + + } + + if obj.obj.InterBurstGap != nil { + + obj.InterBurstGap().validateObj(vObj, set_default) + } + +} + +func (obj *flowBurst) setDefault() { + if obj.obj.Bursts == nil { + obj.SetBursts(0) + } + if obj.obj.Packets == nil { + obj.SetPackets(1) + } + if obj.obj.Gap == nil { + obj.SetGap(12) + } + +} diff --git a/gosnappi/flow_continuous.go b/gosnappi/flow_continuous.go new file mode 100644 index 00000000..3fcfb8d4 --- /dev/null +++ b/gosnappi/flow_continuous.go @@ -0,0 +1,361 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowContinuous ***** +type flowContinuous struct { + validation + obj *otg.FlowContinuous + marshaller marshalFlowContinuous + unMarshaller unMarshalFlowContinuous + delayHolder FlowDelay +} + +func NewFlowContinuous() FlowContinuous { + obj := flowContinuous{obj: &otg.FlowContinuous{}} + obj.setDefault() + return &obj +} + +func (obj *flowContinuous) msg() *otg.FlowContinuous { + return obj.obj +} + +func (obj *flowContinuous) setMsg(msg *otg.FlowContinuous) FlowContinuous { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowContinuous struct { + obj *flowContinuous +} + +type marshalFlowContinuous interface { + // ToProto marshals FlowContinuous to protobuf object *otg.FlowContinuous + ToProto() (*otg.FlowContinuous, error) + // ToPbText marshals FlowContinuous to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowContinuous to YAML text + ToYaml() (string, error) + // ToJson marshals FlowContinuous to JSON text + ToJson() (string, error) +} + +type unMarshalflowContinuous struct { + obj *flowContinuous +} + +type unMarshalFlowContinuous interface { + // FromProto unmarshals FlowContinuous from protobuf object *otg.FlowContinuous + FromProto(msg *otg.FlowContinuous) (FlowContinuous, error) + // FromPbText unmarshals FlowContinuous from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowContinuous from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowContinuous from JSON text + FromJson(value string) error +} + +func (obj *flowContinuous) Marshal() marshalFlowContinuous { + if obj.marshaller == nil { + obj.marshaller = &marshalflowContinuous{obj: obj} + } + return obj.marshaller +} + +func (obj *flowContinuous) Unmarshal() unMarshalFlowContinuous { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowContinuous{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowContinuous) ToProto() (*otg.FlowContinuous, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowContinuous) FromProto(msg *otg.FlowContinuous) (FlowContinuous, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowContinuous) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowContinuous) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowContinuous) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowContinuous) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowContinuous) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowContinuous) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowContinuous) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowContinuous) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowContinuous) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowContinuous) Clone() (FlowContinuous, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowContinuous() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowContinuous) setNil() { + obj.delayHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowContinuous is transmit will be continuous and will not stop automatically. +type FlowContinuous interface { + Validation + // msg marshals FlowContinuous to protobuf object *otg.FlowContinuous + // and doesn't set defaults + msg() *otg.FlowContinuous + // setMsg unmarshals FlowContinuous from protobuf object *otg.FlowContinuous + // and doesn't set defaults + setMsg(*otg.FlowContinuous) FlowContinuous + // provides marshal interface + Marshal() marshalFlowContinuous + // provides unmarshal interface + Unmarshal() unMarshalFlowContinuous + // validate validates FlowContinuous + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowContinuous, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Gap returns uint32, set in FlowContinuous. + Gap() uint32 + // SetGap assigns uint32 provided by user to FlowContinuous + SetGap(value uint32) FlowContinuous + // HasGap checks if Gap has been set in FlowContinuous + HasGap() bool + // Delay returns FlowDelay, set in FlowContinuous. + // FlowDelay is the optional container to specify the delay before starting + // transmission of packets. + Delay() FlowDelay + // SetDelay assigns FlowDelay provided by user to FlowContinuous. + // FlowDelay is the optional container to specify the delay before starting + // transmission of packets. + SetDelay(value FlowDelay) FlowContinuous + // HasDelay checks if Delay has been set in FlowContinuous + HasDelay() bool + setNil() +} + +// The minimum gap between packets expressed as bytes. +// Gap returns a uint32 +func (obj *flowContinuous) Gap() uint32 { + + return *obj.obj.Gap + +} + +// The minimum gap between packets expressed as bytes. +// Gap returns a uint32 +func (obj *flowContinuous) HasGap() bool { + return obj.obj.Gap != nil +} + +// The minimum gap between packets expressed as bytes. +// SetGap sets the uint32 value in the FlowContinuous object +func (obj *flowContinuous) SetGap(value uint32) FlowContinuous { + + obj.obj.Gap = &value + return obj +} + +// description is TBD +// Delay returns a FlowDelay +func (obj *flowContinuous) Delay() FlowDelay { + if obj.obj.Delay == nil { + obj.obj.Delay = NewFlowDelay().msg() + } + if obj.delayHolder == nil { + obj.delayHolder = &flowDelay{obj: obj.obj.Delay} + } + return obj.delayHolder +} + +// description is TBD +// Delay returns a FlowDelay +func (obj *flowContinuous) HasDelay() bool { + return obj.obj.Delay != nil +} + +// description is TBD +// SetDelay sets the FlowDelay value in the FlowContinuous object +func (obj *flowContinuous) SetDelay(value FlowDelay) FlowContinuous { + + obj.delayHolder = nil + obj.obj.Delay = value.msg() + + return obj +} + +func (obj *flowContinuous) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Delay != nil { + + obj.Delay().validateObj(vObj, set_default) + } + +} + +func (obj *flowContinuous) setDefault() { + if obj.obj.Gap == nil { + obj.SetGap(12) + } + +} diff --git a/gosnappi/flow_custom.go b/gosnappi/flow_custom.go new file mode 100644 index 00000000..bb7ab594 --- /dev/null +++ b/gosnappi/flow_custom.go @@ -0,0 +1,417 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowCustom ***** +type flowCustom struct { + validation + obj *otg.FlowCustom + marshaller marshalFlowCustom + unMarshaller unMarshalFlowCustom + metricTagsHolder FlowCustomFlowCustomMetricTagIter +} + +func NewFlowCustom() FlowCustom { + obj := flowCustom{obj: &otg.FlowCustom{}} + obj.setDefault() + return &obj +} + +func (obj *flowCustom) msg() *otg.FlowCustom { + return obj.obj +} + +func (obj *flowCustom) setMsg(msg *otg.FlowCustom) FlowCustom { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowCustom struct { + obj *flowCustom +} + +type marshalFlowCustom interface { + // ToProto marshals FlowCustom to protobuf object *otg.FlowCustom + ToProto() (*otg.FlowCustom, error) + // ToPbText marshals FlowCustom to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowCustom to YAML text + ToYaml() (string, error) + // ToJson marshals FlowCustom to JSON text + ToJson() (string, error) +} + +type unMarshalflowCustom struct { + obj *flowCustom +} + +type unMarshalFlowCustom interface { + // FromProto unmarshals FlowCustom from protobuf object *otg.FlowCustom + FromProto(msg *otg.FlowCustom) (FlowCustom, error) + // FromPbText unmarshals FlowCustom from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowCustom from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowCustom from JSON text + FromJson(value string) error +} + +func (obj *flowCustom) Marshal() marshalFlowCustom { + if obj.marshaller == nil { + obj.marshaller = &marshalflowCustom{obj: obj} + } + return obj.marshaller +} + +func (obj *flowCustom) Unmarshal() unMarshalFlowCustom { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowCustom{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowCustom) ToProto() (*otg.FlowCustom, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowCustom) FromProto(msg *otg.FlowCustom) (FlowCustom, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowCustom) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowCustom) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowCustom) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowCustom) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowCustom) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowCustom) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowCustom) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowCustom) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowCustom) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowCustom) Clone() (FlowCustom, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowCustom() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowCustom) setNil() { + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowCustom is custom packet header +type FlowCustom interface { + Validation + // msg marshals FlowCustom to protobuf object *otg.FlowCustom + // and doesn't set defaults + msg() *otg.FlowCustom + // setMsg unmarshals FlowCustom from protobuf object *otg.FlowCustom + // and doesn't set defaults + setMsg(*otg.FlowCustom) FlowCustom + // provides marshal interface + Marshal() marshalFlowCustom + // provides unmarshal interface + Unmarshal() unMarshalFlowCustom + // validate validates FlowCustom + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowCustom, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Bytes returns string, set in FlowCustom. + Bytes() string + // SetBytes assigns string provided by user to FlowCustom + SetBytes(value string) FlowCustom + // MetricTags returns FlowCustomFlowCustomMetricTagIterIter, set in FlowCustom + MetricTags() FlowCustomFlowCustomMetricTagIter + setNil() +} + +// A custom packet header defined as a string of hex bytes. The string MUST contain sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be discarded. This packet header can be used in multiple places in the packet. +// Bytes returns a string +func (obj *flowCustom) Bytes() string { + + return *obj.obj.Bytes + +} + +// A custom packet header defined as a string of hex bytes. The string MUST contain sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be discarded. This packet header can be used in multiple places in the packet. +// SetBytes sets the string value in the FlowCustom object +func (obj *flowCustom) SetBytes(value string) FlowCustom { + + obj.obj.Bytes = &value + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits +// in a corresponding header field for metrics per each applicable value. +// These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []FlowCustomMetricTag +func (obj *flowCustom) MetricTags() FlowCustomFlowCustomMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.FlowCustomMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newFlowCustomFlowCustomMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type flowCustomFlowCustomMetricTagIter struct { + obj *flowCustom + flowCustomMetricTagSlice []FlowCustomMetricTag + fieldPtr *[]*otg.FlowCustomMetricTag +} + +func newFlowCustomFlowCustomMetricTagIter(ptr *[]*otg.FlowCustomMetricTag) FlowCustomFlowCustomMetricTagIter { + return &flowCustomFlowCustomMetricTagIter{fieldPtr: ptr} +} + +type FlowCustomFlowCustomMetricTagIter interface { + setMsg(*flowCustom) FlowCustomFlowCustomMetricTagIter + Items() []FlowCustomMetricTag + Add() FlowCustomMetricTag + Append(items ...FlowCustomMetricTag) FlowCustomFlowCustomMetricTagIter + Set(index int, newObj FlowCustomMetricTag) FlowCustomFlowCustomMetricTagIter + Clear() FlowCustomFlowCustomMetricTagIter + clearHolderSlice() FlowCustomFlowCustomMetricTagIter + appendHolderSlice(item FlowCustomMetricTag) FlowCustomFlowCustomMetricTagIter +} + +func (obj *flowCustomFlowCustomMetricTagIter) setMsg(msg *flowCustom) FlowCustomFlowCustomMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flowCustomMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *flowCustomFlowCustomMetricTagIter) Items() []FlowCustomMetricTag { + return obj.flowCustomMetricTagSlice +} + +func (obj *flowCustomFlowCustomMetricTagIter) Add() FlowCustomMetricTag { + newObj := &otg.FlowCustomMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flowCustomMetricTag{obj: newObj} + newLibObj.setDefault() + obj.flowCustomMetricTagSlice = append(obj.flowCustomMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *flowCustomFlowCustomMetricTagIter) Append(items ...FlowCustomMetricTag) FlowCustomFlowCustomMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowCustomMetricTagSlice = append(obj.flowCustomMetricTagSlice, item) + } + return obj +} + +func (obj *flowCustomFlowCustomMetricTagIter) Set(index int, newObj FlowCustomMetricTag) FlowCustomFlowCustomMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowCustomMetricTagSlice[index] = newObj + return obj +} +func (obj *flowCustomFlowCustomMetricTagIter) Clear() FlowCustomFlowCustomMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.FlowCustomMetricTag{} + obj.flowCustomMetricTagSlice = []FlowCustomMetricTag{} + } + return obj +} +func (obj *flowCustomFlowCustomMetricTagIter) clearHolderSlice() FlowCustomFlowCustomMetricTagIter { + if len(obj.flowCustomMetricTagSlice) > 0 { + obj.flowCustomMetricTagSlice = []FlowCustomMetricTag{} + } + return obj +} +func (obj *flowCustomFlowCustomMetricTagIter) appendHolderSlice(item FlowCustomMetricTag) FlowCustomFlowCustomMetricTagIter { + obj.flowCustomMetricTagSlice = append(obj.flowCustomMetricTagSlice, item) + return obj +} + +func (obj *flowCustom) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Bytes is required + if obj.obj.Bytes == nil { + vObj.validationErrors = append(vObj.validationErrors, "Bytes is required field on interface FlowCustom") + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&flowCustomMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *flowCustom) setDefault() { + +} diff --git a/gosnappi/flow_custom_metric_tag.go b/gosnappi/flow_custom_metric_tag.go new file mode 100644 index 00000000..ab9e3700 --- /dev/null +++ b/gosnappi/flow_custom_metric_tag.go @@ -0,0 +1,382 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowCustomMetricTag ***** +type flowCustomMetricTag struct { + validation + obj *otg.FlowCustomMetricTag + marshaller marshalFlowCustomMetricTag + unMarshaller unMarshalFlowCustomMetricTag +} + +func NewFlowCustomMetricTag() FlowCustomMetricTag { + obj := flowCustomMetricTag{obj: &otg.FlowCustomMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *flowCustomMetricTag) msg() *otg.FlowCustomMetricTag { + return obj.obj +} + +func (obj *flowCustomMetricTag) setMsg(msg *otg.FlowCustomMetricTag) FlowCustomMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowCustomMetricTag struct { + obj *flowCustomMetricTag +} + +type marshalFlowCustomMetricTag interface { + // ToProto marshals FlowCustomMetricTag to protobuf object *otg.FlowCustomMetricTag + ToProto() (*otg.FlowCustomMetricTag, error) + // ToPbText marshals FlowCustomMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowCustomMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals FlowCustomMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalflowCustomMetricTag struct { + obj *flowCustomMetricTag +} + +type unMarshalFlowCustomMetricTag interface { + // FromProto unmarshals FlowCustomMetricTag from protobuf object *otg.FlowCustomMetricTag + FromProto(msg *otg.FlowCustomMetricTag) (FlowCustomMetricTag, error) + // FromPbText unmarshals FlowCustomMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowCustomMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowCustomMetricTag from JSON text + FromJson(value string) error +} + +func (obj *flowCustomMetricTag) Marshal() marshalFlowCustomMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalflowCustomMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *flowCustomMetricTag) Unmarshal() unMarshalFlowCustomMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowCustomMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowCustomMetricTag) ToProto() (*otg.FlowCustomMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowCustomMetricTag) FromProto(msg *otg.FlowCustomMetricTag) (FlowCustomMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowCustomMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowCustomMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowCustomMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowCustomMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowCustomMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowCustomMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowCustomMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowCustomMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowCustomMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowCustomMetricTag) Clone() (FlowCustomMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowCustomMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowCustomMetricTag is metric Tag can be used to enable tracking portion of or all bits +// in a corresponding header field for metrics per each applicable value. +// These would appear as tagged metrics in corresponding flow metrics. +type FlowCustomMetricTag interface { + Validation + // msg marshals FlowCustomMetricTag to protobuf object *otg.FlowCustomMetricTag + // and doesn't set defaults + msg() *otg.FlowCustomMetricTag + // setMsg unmarshals FlowCustomMetricTag from protobuf object *otg.FlowCustomMetricTag + // and doesn't set defaults + setMsg(*otg.FlowCustomMetricTag) FlowCustomMetricTag + // provides marshal interface + Marshal() marshalFlowCustomMetricTag + // provides unmarshal interface + Unmarshal() unMarshalFlowCustomMetricTag + // validate validates FlowCustomMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowCustomMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in FlowCustomMetricTag. + Name() string + // SetName assigns string provided by user to FlowCustomMetricTag + SetName(value string) FlowCustomMetricTag + // Offset returns uint32, set in FlowCustomMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to FlowCustomMetricTag + SetOffset(value uint32) FlowCustomMetricTag + // HasOffset checks if Offset has been set in FlowCustomMetricTag + HasOffset() bool + // Length returns uint32, set in FlowCustomMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to FlowCustomMetricTag + SetLength(value uint32) FlowCustomMetricTag + // HasLength checks if Length has been set in FlowCustomMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable +// for configured offset and length inside corresponding header field +// Name returns a string +func (obj *flowCustomMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable +// for configured offset and length inside corresponding header field +// SetName sets the string value in the FlowCustomMetricTag object +func (obj *flowCustomMetricTag) SetName(value string) FlowCustomMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *flowCustomMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *flowCustomMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the FlowCustomMetricTag object +func (obj *flowCustomMetricTag) SetOffset(value uint32) FlowCustomMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset +// of corresponding header field +// Length returns a uint32 +func (obj *flowCustomMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset +// of corresponding header field +// Length returns a uint32 +func (obj *flowCustomMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset +// of corresponding header field +// SetLength sets the uint32 value in the FlowCustomMetricTag object +func (obj *flowCustomMetricTag) SetLength(value uint32) FlowCustomMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *flowCustomMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface FlowCustomMetricTag") + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= FlowCustomMetricTag.Length <= 4294967295 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *flowCustomMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/flow_delay.go b/gosnappi/flow_delay.go new file mode 100644 index 00000000..7bf647bb --- /dev/null +++ b/gosnappi/flow_delay.go @@ -0,0 +1,508 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowDelay ***** +type flowDelay struct { + validation + obj *otg.FlowDelay + marshaller marshalFlowDelay + unMarshaller unMarshalFlowDelay +} + +func NewFlowDelay() FlowDelay { + obj := flowDelay{obj: &otg.FlowDelay{}} + obj.setDefault() + return &obj +} + +func (obj *flowDelay) msg() *otg.FlowDelay { + return obj.obj +} + +func (obj *flowDelay) setMsg(msg *otg.FlowDelay) FlowDelay { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowDelay struct { + obj *flowDelay +} + +type marshalFlowDelay interface { + // ToProto marshals FlowDelay to protobuf object *otg.FlowDelay + ToProto() (*otg.FlowDelay, error) + // ToPbText marshals FlowDelay to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowDelay to YAML text + ToYaml() (string, error) + // ToJson marshals FlowDelay to JSON text + ToJson() (string, error) +} + +type unMarshalflowDelay struct { + obj *flowDelay +} + +type unMarshalFlowDelay interface { + // FromProto unmarshals FlowDelay from protobuf object *otg.FlowDelay + FromProto(msg *otg.FlowDelay) (FlowDelay, error) + // FromPbText unmarshals FlowDelay from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowDelay from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowDelay from JSON text + FromJson(value string) error +} + +func (obj *flowDelay) Marshal() marshalFlowDelay { + if obj.marshaller == nil { + obj.marshaller = &marshalflowDelay{obj: obj} + } + return obj.marshaller +} + +func (obj *flowDelay) Unmarshal() unMarshalFlowDelay { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowDelay{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowDelay) ToProto() (*otg.FlowDelay, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowDelay) FromProto(msg *otg.FlowDelay) (FlowDelay, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowDelay) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowDelay) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowDelay) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowDelay) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowDelay) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowDelay) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowDelay) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowDelay) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowDelay) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowDelay) Clone() (FlowDelay, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowDelay() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowDelay is the optional container to specify the delay before starting +// transmission of packets. +type FlowDelay interface { + Validation + // msg marshals FlowDelay to protobuf object *otg.FlowDelay + // and doesn't set defaults + msg() *otg.FlowDelay + // setMsg unmarshals FlowDelay from protobuf object *otg.FlowDelay + // and doesn't set defaults + setMsg(*otg.FlowDelay) FlowDelay + // provides marshal interface + Marshal() marshalFlowDelay + // provides unmarshal interface + Unmarshal() unMarshalFlowDelay + // validate validates FlowDelay + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowDelay, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowDelayChoiceEnum, set in FlowDelay + Choice() FlowDelayChoiceEnum + // setChoice assigns FlowDelayChoiceEnum provided by user to FlowDelay + setChoice(value FlowDelayChoiceEnum) FlowDelay + // HasChoice checks if Choice has been set in FlowDelay + HasChoice() bool + // Bytes returns float32, set in FlowDelay. + Bytes() float32 + // SetBytes assigns float32 provided by user to FlowDelay + SetBytes(value float32) FlowDelay + // HasBytes checks if Bytes has been set in FlowDelay + HasBytes() bool + // Nanoseconds returns float32, set in FlowDelay. + Nanoseconds() float32 + // SetNanoseconds assigns float32 provided by user to FlowDelay + SetNanoseconds(value float32) FlowDelay + // HasNanoseconds checks if Nanoseconds has been set in FlowDelay + HasNanoseconds() bool + // Microseconds returns float32, set in FlowDelay. + Microseconds() float32 + // SetMicroseconds assigns float32 provided by user to FlowDelay + SetMicroseconds(value float32) FlowDelay + // HasMicroseconds checks if Microseconds has been set in FlowDelay + HasMicroseconds() bool +} + +type FlowDelayChoiceEnum string + +// Enum of Choice on FlowDelay +var FlowDelayChoice = struct { + BYTES FlowDelayChoiceEnum + NANOSECONDS FlowDelayChoiceEnum + MICROSECONDS FlowDelayChoiceEnum +}{ + BYTES: FlowDelayChoiceEnum("bytes"), + NANOSECONDS: FlowDelayChoiceEnum("nanoseconds"), + MICROSECONDS: FlowDelayChoiceEnum("microseconds"), +} + +func (obj *flowDelay) Choice() FlowDelayChoiceEnum { + return FlowDelayChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowDelay) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowDelay) setChoice(value FlowDelayChoiceEnum) FlowDelay { + intValue, ok := otg.FlowDelay_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowDelayChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowDelay_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Microseconds = nil + obj.obj.Nanoseconds = nil + obj.obj.Bytes = nil + + if value == FlowDelayChoice.BYTES { + defaultValue := float32(0) + obj.obj.Bytes = &defaultValue + } + + if value == FlowDelayChoice.NANOSECONDS { + defaultValue := float32(0) + obj.obj.Nanoseconds = &defaultValue + } + + if value == FlowDelayChoice.MICROSECONDS { + defaultValue := float32(0) + obj.obj.Microseconds = &defaultValue + } + + return obj +} + +// The delay before starting transmission of packets. +// A value of 0 indicates no delay. +// Bytes returns a float32 +func (obj *flowDelay) Bytes() float32 { + + if obj.obj.Bytes == nil { + obj.setChoice(FlowDelayChoice.BYTES) + } + + return *obj.obj.Bytes + +} + +// The delay before starting transmission of packets. +// A value of 0 indicates no delay. +// Bytes returns a float32 +func (obj *flowDelay) HasBytes() bool { + return obj.obj.Bytes != nil +} + +// The delay before starting transmission of packets. +// A value of 0 indicates no delay. +// SetBytes sets the float32 value in the FlowDelay object +func (obj *flowDelay) SetBytes(value float32) FlowDelay { + obj.setChoice(FlowDelayChoice.BYTES) + obj.obj.Bytes = &value + return obj +} + +// The delay before starting transmission of packets. +// A value of 0 indicates no delay. +// Nanoseconds returns a float32 +func (obj *flowDelay) Nanoseconds() float32 { + + if obj.obj.Nanoseconds == nil { + obj.setChoice(FlowDelayChoice.NANOSECONDS) + } + + return *obj.obj.Nanoseconds + +} + +// The delay before starting transmission of packets. +// A value of 0 indicates no delay. +// Nanoseconds returns a float32 +func (obj *flowDelay) HasNanoseconds() bool { + return obj.obj.Nanoseconds != nil +} + +// The delay before starting transmission of packets. +// A value of 0 indicates no delay. +// SetNanoseconds sets the float32 value in the FlowDelay object +func (obj *flowDelay) SetNanoseconds(value float32) FlowDelay { + obj.setChoice(FlowDelayChoice.NANOSECONDS) + obj.obj.Nanoseconds = &value + return obj +} + +// The delay before starting transmission of packets. +// A value of 0 indicates no delay. +// Microseconds returns a float32 +func (obj *flowDelay) Microseconds() float32 { + + if obj.obj.Microseconds == nil { + obj.setChoice(FlowDelayChoice.MICROSECONDS) + } + + return *obj.obj.Microseconds + +} + +// The delay before starting transmission of packets. +// A value of 0 indicates no delay. +// Microseconds returns a float32 +func (obj *flowDelay) HasMicroseconds() bool { + return obj.obj.Microseconds != nil +} + +// The delay before starting transmission of packets. +// A value of 0 indicates no delay. +// SetMicroseconds sets the float32 value in the FlowDelay object +func (obj *flowDelay) SetMicroseconds(value float32) FlowDelay { + obj.setChoice(FlowDelayChoice.MICROSECONDS) + obj.obj.Microseconds = &value + return obj +} + +func (obj *flowDelay) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Bytes != nil { + + if *obj.obj.Bytes < 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowDelay.Bytes <= max(float32) but Got %f", *obj.obj.Bytes)) + } + + } + + if obj.obj.Nanoseconds != nil { + + if *obj.obj.Nanoseconds < 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowDelay.Nanoseconds <= max(float32) but Got %f", *obj.obj.Nanoseconds)) + } + + } + + if obj.obj.Microseconds != nil { + + if *obj.obj.Microseconds < 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowDelay.Microseconds <= max(float32) but Got %f", *obj.obj.Microseconds)) + } + + } + +} + +func (obj *flowDelay) setDefault() { + var choices_set int = 0 + var choice FlowDelayChoiceEnum + + if obj.obj.Bytes != nil { + choices_set += 1 + choice = FlowDelayChoice.BYTES + } + + if obj.obj.Nanoseconds != nil { + choices_set += 1 + choice = FlowDelayChoice.NANOSECONDS + } + + if obj.obj.Microseconds != nil { + choices_set += 1 + choice = FlowDelayChoice.MICROSECONDS + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowDelayChoice.BYTES) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowDelay") + } + } else { + intVal := otg.FlowDelay_Choice_Enum_value[string(choice)] + enumValue := otg.FlowDelay_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_duration.go b/gosnappi/flow_duration.go new file mode 100644 index 00000000..52437757 --- /dev/null +++ b/gosnappi/flow_duration.go @@ -0,0 +1,568 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowDuration ***** +type flowDuration struct { + validation + obj *otg.FlowDuration + marshaller marshalFlowDuration + unMarshaller unMarshalFlowDuration + fixedPacketsHolder FlowFixedPackets + fixedSecondsHolder FlowFixedSeconds + burstHolder FlowBurst + continuousHolder FlowContinuous +} + +func NewFlowDuration() FlowDuration { + obj := flowDuration{obj: &otg.FlowDuration{}} + obj.setDefault() + return &obj +} + +func (obj *flowDuration) msg() *otg.FlowDuration { + return obj.obj +} + +func (obj *flowDuration) setMsg(msg *otg.FlowDuration) FlowDuration { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowDuration struct { + obj *flowDuration +} + +type marshalFlowDuration interface { + // ToProto marshals FlowDuration to protobuf object *otg.FlowDuration + ToProto() (*otg.FlowDuration, error) + // ToPbText marshals FlowDuration to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowDuration to YAML text + ToYaml() (string, error) + // ToJson marshals FlowDuration to JSON text + ToJson() (string, error) +} + +type unMarshalflowDuration struct { + obj *flowDuration +} + +type unMarshalFlowDuration interface { + // FromProto unmarshals FlowDuration from protobuf object *otg.FlowDuration + FromProto(msg *otg.FlowDuration) (FlowDuration, error) + // FromPbText unmarshals FlowDuration from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowDuration from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowDuration from JSON text + FromJson(value string) error +} + +func (obj *flowDuration) Marshal() marshalFlowDuration { + if obj.marshaller == nil { + obj.marshaller = &marshalflowDuration{obj: obj} + } + return obj.marshaller +} + +func (obj *flowDuration) Unmarshal() unMarshalFlowDuration { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowDuration{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowDuration) ToProto() (*otg.FlowDuration, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowDuration) FromProto(msg *otg.FlowDuration) (FlowDuration, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowDuration) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowDuration) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowDuration) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowDuration) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowDuration) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowDuration) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowDuration) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowDuration) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowDuration) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowDuration) Clone() (FlowDuration, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowDuration() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowDuration) setNil() { + obj.fixedPacketsHolder = nil + obj.fixedSecondsHolder = nil + obj.burstHolder = nil + obj.continuousHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowDuration is a container for different transmit durations. +type FlowDuration interface { + Validation + // msg marshals FlowDuration to protobuf object *otg.FlowDuration + // and doesn't set defaults + msg() *otg.FlowDuration + // setMsg unmarshals FlowDuration from protobuf object *otg.FlowDuration + // and doesn't set defaults + setMsg(*otg.FlowDuration) FlowDuration + // provides marshal interface + Marshal() marshalFlowDuration + // provides unmarshal interface + Unmarshal() unMarshalFlowDuration + // validate validates FlowDuration + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowDuration, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowDurationChoiceEnum, set in FlowDuration + Choice() FlowDurationChoiceEnum + // setChoice assigns FlowDurationChoiceEnum provided by user to FlowDuration + setChoice(value FlowDurationChoiceEnum) FlowDuration + // HasChoice checks if Choice has been set in FlowDuration + HasChoice() bool + // FixedPackets returns FlowFixedPackets, set in FlowDuration. + // FlowFixedPackets is transmit a fixed number of packets after which the flow will stop. + FixedPackets() FlowFixedPackets + // SetFixedPackets assigns FlowFixedPackets provided by user to FlowDuration. + // FlowFixedPackets is transmit a fixed number of packets after which the flow will stop. + SetFixedPackets(value FlowFixedPackets) FlowDuration + // HasFixedPackets checks if FixedPackets has been set in FlowDuration + HasFixedPackets() bool + // FixedSeconds returns FlowFixedSeconds, set in FlowDuration. + // FlowFixedSeconds is transmit for a fixed number of seconds after which the flow will stop. + FixedSeconds() FlowFixedSeconds + // SetFixedSeconds assigns FlowFixedSeconds provided by user to FlowDuration. + // FlowFixedSeconds is transmit for a fixed number of seconds after which the flow will stop. + SetFixedSeconds(value FlowFixedSeconds) FlowDuration + // HasFixedSeconds checks if FixedSeconds has been set in FlowDuration + HasFixedSeconds() bool + // Burst returns FlowBurst, set in FlowDuration. + // FlowBurst is transmits continuous or fixed burst of packets. + // For continuous burst of packets, it will not automatically stop. + // For fixed burst of packets, it will stop after transmitting fixed number of bursts. + Burst() FlowBurst + // SetBurst assigns FlowBurst provided by user to FlowDuration. + // FlowBurst is transmits continuous or fixed burst of packets. + // For continuous burst of packets, it will not automatically stop. + // For fixed burst of packets, it will stop after transmitting fixed number of bursts. + SetBurst(value FlowBurst) FlowDuration + // HasBurst checks if Burst has been set in FlowDuration + HasBurst() bool + // Continuous returns FlowContinuous, set in FlowDuration. + // FlowContinuous is transmit will be continuous and will not stop automatically. + Continuous() FlowContinuous + // SetContinuous assigns FlowContinuous provided by user to FlowDuration. + // FlowContinuous is transmit will be continuous and will not stop automatically. + SetContinuous(value FlowContinuous) FlowDuration + // HasContinuous checks if Continuous has been set in FlowDuration + HasContinuous() bool + setNil() +} + +type FlowDurationChoiceEnum string + +// Enum of Choice on FlowDuration +var FlowDurationChoice = struct { + FIXED_PACKETS FlowDurationChoiceEnum + FIXED_SECONDS FlowDurationChoiceEnum + BURST FlowDurationChoiceEnum + CONTINUOUS FlowDurationChoiceEnum +}{ + FIXED_PACKETS: FlowDurationChoiceEnum("fixed_packets"), + FIXED_SECONDS: FlowDurationChoiceEnum("fixed_seconds"), + BURST: FlowDurationChoiceEnum("burst"), + CONTINUOUS: FlowDurationChoiceEnum("continuous"), +} + +func (obj *flowDuration) Choice() FlowDurationChoiceEnum { + return FlowDurationChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// A choice used to determine the type of duration. +// Choice returns a string +func (obj *flowDuration) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowDuration) setChoice(value FlowDurationChoiceEnum) FlowDuration { + intValue, ok := otg.FlowDuration_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowDurationChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowDuration_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Continuous = nil + obj.continuousHolder = nil + obj.obj.Burst = nil + obj.burstHolder = nil + obj.obj.FixedSeconds = nil + obj.fixedSecondsHolder = nil + obj.obj.FixedPackets = nil + obj.fixedPacketsHolder = nil + + if value == FlowDurationChoice.FIXED_PACKETS { + obj.obj.FixedPackets = NewFlowFixedPackets().msg() + } + + if value == FlowDurationChoice.FIXED_SECONDS { + obj.obj.FixedSeconds = NewFlowFixedSeconds().msg() + } + + if value == FlowDurationChoice.BURST { + obj.obj.Burst = NewFlowBurst().msg() + } + + if value == FlowDurationChoice.CONTINUOUS { + obj.obj.Continuous = NewFlowContinuous().msg() + } + + return obj +} + +// description is TBD +// FixedPackets returns a FlowFixedPackets +func (obj *flowDuration) FixedPackets() FlowFixedPackets { + if obj.obj.FixedPackets == nil { + obj.setChoice(FlowDurationChoice.FIXED_PACKETS) + } + if obj.fixedPacketsHolder == nil { + obj.fixedPacketsHolder = &flowFixedPackets{obj: obj.obj.FixedPackets} + } + return obj.fixedPacketsHolder +} + +// description is TBD +// FixedPackets returns a FlowFixedPackets +func (obj *flowDuration) HasFixedPackets() bool { + return obj.obj.FixedPackets != nil +} + +// description is TBD +// SetFixedPackets sets the FlowFixedPackets value in the FlowDuration object +func (obj *flowDuration) SetFixedPackets(value FlowFixedPackets) FlowDuration { + obj.setChoice(FlowDurationChoice.FIXED_PACKETS) + obj.fixedPacketsHolder = nil + obj.obj.FixedPackets = value.msg() + + return obj +} + +// description is TBD +// FixedSeconds returns a FlowFixedSeconds +func (obj *flowDuration) FixedSeconds() FlowFixedSeconds { + if obj.obj.FixedSeconds == nil { + obj.setChoice(FlowDurationChoice.FIXED_SECONDS) + } + if obj.fixedSecondsHolder == nil { + obj.fixedSecondsHolder = &flowFixedSeconds{obj: obj.obj.FixedSeconds} + } + return obj.fixedSecondsHolder +} + +// description is TBD +// FixedSeconds returns a FlowFixedSeconds +func (obj *flowDuration) HasFixedSeconds() bool { + return obj.obj.FixedSeconds != nil +} + +// description is TBD +// SetFixedSeconds sets the FlowFixedSeconds value in the FlowDuration object +func (obj *flowDuration) SetFixedSeconds(value FlowFixedSeconds) FlowDuration { + obj.setChoice(FlowDurationChoice.FIXED_SECONDS) + obj.fixedSecondsHolder = nil + obj.obj.FixedSeconds = value.msg() + + return obj +} + +// description is TBD +// Burst returns a FlowBurst +func (obj *flowDuration) Burst() FlowBurst { + if obj.obj.Burst == nil { + obj.setChoice(FlowDurationChoice.BURST) + } + if obj.burstHolder == nil { + obj.burstHolder = &flowBurst{obj: obj.obj.Burst} + } + return obj.burstHolder +} + +// description is TBD +// Burst returns a FlowBurst +func (obj *flowDuration) HasBurst() bool { + return obj.obj.Burst != nil +} + +// description is TBD +// SetBurst sets the FlowBurst value in the FlowDuration object +func (obj *flowDuration) SetBurst(value FlowBurst) FlowDuration { + obj.setChoice(FlowDurationChoice.BURST) + obj.burstHolder = nil + obj.obj.Burst = value.msg() + + return obj +} + +// description is TBD +// Continuous returns a FlowContinuous +func (obj *flowDuration) Continuous() FlowContinuous { + if obj.obj.Continuous == nil { + obj.setChoice(FlowDurationChoice.CONTINUOUS) + } + if obj.continuousHolder == nil { + obj.continuousHolder = &flowContinuous{obj: obj.obj.Continuous} + } + return obj.continuousHolder +} + +// description is TBD +// Continuous returns a FlowContinuous +func (obj *flowDuration) HasContinuous() bool { + return obj.obj.Continuous != nil +} + +// description is TBD +// SetContinuous sets the FlowContinuous value in the FlowDuration object +func (obj *flowDuration) SetContinuous(value FlowContinuous) FlowDuration { + obj.setChoice(FlowDurationChoice.CONTINUOUS) + obj.continuousHolder = nil + obj.obj.Continuous = value.msg() + + return obj +} + +func (obj *flowDuration) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.FixedPackets != nil { + + obj.FixedPackets().validateObj(vObj, set_default) + } + + if obj.obj.FixedSeconds != nil { + + obj.FixedSeconds().validateObj(vObj, set_default) + } + + if obj.obj.Burst != nil { + + obj.Burst().validateObj(vObj, set_default) + } + + if obj.obj.Continuous != nil { + + obj.Continuous().validateObj(vObj, set_default) + } + +} + +func (obj *flowDuration) setDefault() { + var choices_set int = 0 + var choice FlowDurationChoiceEnum + + if obj.obj.FixedPackets != nil { + choices_set += 1 + choice = FlowDurationChoice.FIXED_PACKETS + } + + if obj.obj.FixedSeconds != nil { + choices_set += 1 + choice = FlowDurationChoice.FIXED_SECONDS + } + + if obj.obj.Burst != nil { + choices_set += 1 + choice = FlowDurationChoice.BURST + } + + if obj.obj.Continuous != nil { + choices_set += 1 + choice = FlowDurationChoice.CONTINUOUS + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowDurationChoice.CONTINUOUS) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowDuration") + } + } else { + intVal := otg.FlowDuration_Choice_Enum_value[string(choice)] + enumValue := otg.FlowDuration_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_duration_inter_burst_gap.go b/gosnappi/flow_duration_inter_burst_gap.go new file mode 100644 index 00000000..44a1b8e1 --- /dev/null +++ b/gosnappi/flow_duration_inter_burst_gap.go @@ -0,0 +1,507 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowDurationInterBurstGap ***** +type flowDurationInterBurstGap struct { + validation + obj *otg.FlowDurationInterBurstGap + marshaller marshalFlowDurationInterBurstGap + unMarshaller unMarshalFlowDurationInterBurstGap +} + +func NewFlowDurationInterBurstGap() FlowDurationInterBurstGap { + obj := flowDurationInterBurstGap{obj: &otg.FlowDurationInterBurstGap{}} + obj.setDefault() + return &obj +} + +func (obj *flowDurationInterBurstGap) msg() *otg.FlowDurationInterBurstGap { + return obj.obj +} + +func (obj *flowDurationInterBurstGap) setMsg(msg *otg.FlowDurationInterBurstGap) FlowDurationInterBurstGap { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowDurationInterBurstGap struct { + obj *flowDurationInterBurstGap +} + +type marshalFlowDurationInterBurstGap interface { + // ToProto marshals FlowDurationInterBurstGap to protobuf object *otg.FlowDurationInterBurstGap + ToProto() (*otg.FlowDurationInterBurstGap, error) + // ToPbText marshals FlowDurationInterBurstGap to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowDurationInterBurstGap to YAML text + ToYaml() (string, error) + // ToJson marshals FlowDurationInterBurstGap to JSON text + ToJson() (string, error) +} + +type unMarshalflowDurationInterBurstGap struct { + obj *flowDurationInterBurstGap +} + +type unMarshalFlowDurationInterBurstGap interface { + // FromProto unmarshals FlowDurationInterBurstGap from protobuf object *otg.FlowDurationInterBurstGap + FromProto(msg *otg.FlowDurationInterBurstGap) (FlowDurationInterBurstGap, error) + // FromPbText unmarshals FlowDurationInterBurstGap from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowDurationInterBurstGap from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowDurationInterBurstGap from JSON text + FromJson(value string) error +} + +func (obj *flowDurationInterBurstGap) Marshal() marshalFlowDurationInterBurstGap { + if obj.marshaller == nil { + obj.marshaller = &marshalflowDurationInterBurstGap{obj: obj} + } + return obj.marshaller +} + +func (obj *flowDurationInterBurstGap) Unmarshal() unMarshalFlowDurationInterBurstGap { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowDurationInterBurstGap{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowDurationInterBurstGap) ToProto() (*otg.FlowDurationInterBurstGap, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowDurationInterBurstGap) FromProto(msg *otg.FlowDurationInterBurstGap) (FlowDurationInterBurstGap, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowDurationInterBurstGap) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowDurationInterBurstGap) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowDurationInterBurstGap) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowDurationInterBurstGap) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowDurationInterBurstGap) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowDurationInterBurstGap) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowDurationInterBurstGap) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowDurationInterBurstGap) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowDurationInterBurstGap) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowDurationInterBurstGap) Clone() (FlowDurationInterBurstGap, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowDurationInterBurstGap() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowDurationInterBurstGap is the optional container for specifying a gap between bursts. +type FlowDurationInterBurstGap interface { + Validation + // msg marshals FlowDurationInterBurstGap to protobuf object *otg.FlowDurationInterBurstGap + // and doesn't set defaults + msg() *otg.FlowDurationInterBurstGap + // setMsg unmarshals FlowDurationInterBurstGap from protobuf object *otg.FlowDurationInterBurstGap + // and doesn't set defaults + setMsg(*otg.FlowDurationInterBurstGap) FlowDurationInterBurstGap + // provides marshal interface + Marshal() marshalFlowDurationInterBurstGap + // provides unmarshal interface + Unmarshal() unMarshalFlowDurationInterBurstGap + // validate validates FlowDurationInterBurstGap + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowDurationInterBurstGap, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowDurationInterBurstGapChoiceEnum, set in FlowDurationInterBurstGap + Choice() FlowDurationInterBurstGapChoiceEnum + // setChoice assigns FlowDurationInterBurstGapChoiceEnum provided by user to FlowDurationInterBurstGap + setChoice(value FlowDurationInterBurstGapChoiceEnum) FlowDurationInterBurstGap + // HasChoice checks if Choice has been set in FlowDurationInterBurstGap + HasChoice() bool + // Bytes returns float64, set in FlowDurationInterBurstGap. + Bytes() float64 + // SetBytes assigns float64 provided by user to FlowDurationInterBurstGap + SetBytes(value float64) FlowDurationInterBurstGap + // HasBytes checks if Bytes has been set in FlowDurationInterBurstGap + HasBytes() bool + // Nanoseconds returns float64, set in FlowDurationInterBurstGap. + Nanoseconds() float64 + // SetNanoseconds assigns float64 provided by user to FlowDurationInterBurstGap + SetNanoseconds(value float64) FlowDurationInterBurstGap + // HasNanoseconds checks if Nanoseconds has been set in FlowDurationInterBurstGap + HasNanoseconds() bool + // Microseconds returns float64, set in FlowDurationInterBurstGap. + Microseconds() float64 + // SetMicroseconds assigns float64 provided by user to FlowDurationInterBurstGap + SetMicroseconds(value float64) FlowDurationInterBurstGap + // HasMicroseconds checks if Microseconds has been set in FlowDurationInterBurstGap + HasMicroseconds() bool +} + +type FlowDurationInterBurstGapChoiceEnum string + +// Enum of Choice on FlowDurationInterBurstGap +var FlowDurationInterBurstGapChoice = struct { + BYTES FlowDurationInterBurstGapChoiceEnum + NANOSECONDS FlowDurationInterBurstGapChoiceEnum + MICROSECONDS FlowDurationInterBurstGapChoiceEnum +}{ + BYTES: FlowDurationInterBurstGapChoiceEnum("bytes"), + NANOSECONDS: FlowDurationInterBurstGapChoiceEnum("nanoseconds"), + MICROSECONDS: FlowDurationInterBurstGapChoiceEnum("microseconds"), +} + +func (obj *flowDurationInterBurstGap) Choice() FlowDurationInterBurstGapChoiceEnum { + return FlowDurationInterBurstGapChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The type of inter burst gap units. +// Choice returns a string +func (obj *flowDurationInterBurstGap) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowDurationInterBurstGap) setChoice(value FlowDurationInterBurstGapChoiceEnum) FlowDurationInterBurstGap { + intValue, ok := otg.FlowDurationInterBurstGap_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowDurationInterBurstGapChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowDurationInterBurstGap_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Microseconds = nil + obj.obj.Nanoseconds = nil + obj.obj.Bytes = nil + + if value == FlowDurationInterBurstGapChoice.BYTES { + defaultValue := float64(12) + obj.obj.Bytes = &defaultValue + } + + if value == FlowDurationInterBurstGapChoice.NANOSECONDS { + defaultValue := float64(96) + obj.obj.Nanoseconds = &defaultValue + } + + if value == FlowDurationInterBurstGapChoice.MICROSECONDS { + defaultValue := float64(0.096) + obj.obj.Microseconds = &defaultValue + } + + return obj +} + +// The amount of time between bursts expressed in bytes. +// A value of 0 indicates no gap between bursts. +// Bytes returns a float64 +func (obj *flowDurationInterBurstGap) Bytes() float64 { + + if obj.obj.Bytes == nil { + obj.setChoice(FlowDurationInterBurstGapChoice.BYTES) + } + + return *obj.obj.Bytes + +} + +// The amount of time between bursts expressed in bytes. +// A value of 0 indicates no gap between bursts. +// Bytes returns a float64 +func (obj *flowDurationInterBurstGap) HasBytes() bool { + return obj.obj.Bytes != nil +} + +// The amount of time between bursts expressed in bytes. +// A value of 0 indicates no gap between bursts. +// SetBytes sets the float64 value in the FlowDurationInterBurstGap object +func (obj *flowDurationInterBurstGap) SetBytes(value float64) FlowDurationInterBurstGap { + obj.setChoice(FlowDurationInterBurstGapChoice.BYTES) + obj.obj.Bytes = &value + return obj +} + +// The amount of time between bursts expressed in nanoseconds. +// A value of 0 indicates no gap between bursts. +// Nanoseconds returns a float64 +func (obj *flowDurationInterBurstGap) Nanoseconds() float64 { + + if obj.obj.Nanoseconds == nil { + obj.setChoice(FlowDurationInterBurstGapChoice.NANOSECONDS) + } + + return *obj.obj.Nanoseconds + +} + +// The amount of time between bursts expressed in nanoseconds. +// A value of 0 indicates no gap between bursts. +// Nanoseconds returns a float64 +func (obj *flowDurationInterBurstGap) HasNanoseconds() bool { + return obj.obj.Nanoseconds != nil +} + +// The amount of time between bursts expressed in nanoseconds. +// A value of 0 indicates no gap between bursts. +// SetNanoseconds sets the float64 value in the FlowDurationInterBurstGap object +func (obj *flowDurationInterBurstGap) SetNanoseconds(value float64) FlowDurationInterBurstGap { + obj.setChoice(FlowDurationInterBurstGapChoice.NANOSECONDS) + obj.obj.Nanoseconds = &value + return obj +} + +// The amount of time between bursts expressed in microseconds. +// A value of 0 indicates no gap between bursts. +// Microseconds returns a float64 +func (obj *flowDurationInterBurstGap) Microseconds() float64 { + + if obj.obj.Microseconds == nil { + obj.setChoice(FlowDurationInterBurstGapChoice.MICROSECONDS) + } + + return *obj.obj.Microseconds + +} + +// The amount of time between bursts expressed in microseconds. +// A value of 0 indicates no gap between bursts. +// Microseconds returns a float64 +func (obj *flowDurationInterBurstGap) HasMicroseconds() bool { + return obj.obj.Microseconds != nil +} + +// The amount of time between bursts expressed in microseconds. +// A value of 0 indicates no gap between bursts. +// SetMicroseconds sets the float64 value in the FlowDurationInterBurstGap object +func (obj *flowDurationInterBurstGap) SetMicroseconds(value float64) FlowDurationInterBurstGap { + obj.setChoice(FlowDurationInterBurstGapChoice.MICROSECONDS) + obj.obj.Microseconds = &value + return obj +} + +func (obj *flowDurationInterBurstGap) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Bytes != nil { + + if *obj.obj.Bytes < 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowDurationInterBurstGap.Bytes <= max(float64) but Got %f", *obj.obj.Bytes)) + } + + } + + if obj.obj.Nanoseconds != nil { + + if *obj.obj.Nanoseconds < 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowDurationInterBurstGap.Nanoseconds <= max(float64) but Got %f", *obj.obj.Nanoseconds)) + } + + } + + if obj.obj.Microseconds != nil { + + if *obj.obj.Microseconds < 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowDurationInterBurstGap.Microseconds <= max(float64) but Got %f", *obj.obj.Microseconds)) + } + + } + +} + +func (obj *flowDurationInterBurstGap) setDefault() { + var choices_set int = 0 + var choice FlowDurationInterBurstGapChoiceEnum + + if obj.obj.Bytes != nil { + choices_set += 1 + choice = FlowDurationInterBurstGapChoice.BYTES + } + + if obj.obj.Nanoseconds != nil { + choices_set += 1 + choice = FlowDurationInterBurstGapChoice.NANOSECONDS + } + + if obj.obj.Microseconds != nil { + choices_set += 1 + choice = FlowDurationInterBurstGapChoice.MICROSECONDS + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowDurationInterBurstGapChoice.BYTES) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowDurationInterBurstGap") + } + } else { + intVal := otg.FlowDurationInterBurstGap_Choice_Enum_value[string(choice)] + enumValue := otg.FlowDurationInterBurstGap_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_ethernet.go b/gosnappi/flow_ethernet.go new file mode 100644 index 00000000..b707b619 --- /dev/null +++ b/gosnappi/flow_ethernet.go @@ -0,0 +1,457 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowEthernet ***** +type flowEthernet struct { + validation + obj *otg.FlowEthernet + marshaller marshalFlowEthernet + unMarshaller unMarshalFlowEthernet + dstHolder PatternFlowEthernetDst + srcHolder PatternFlowEthernetSrc + etherTypeHolder PatternFlowEthernetEtherType + pfcQueueHolder PatternFlowEthernetPfcQueue +} + +func NewFlowEthernet() FlowEthernet { + obj := flowEthernet{obj: &otg.FlowEthernet{}} + obj.setDefault() + return &obj +} + +func (obj *flowEthernet) msg() *otg.FlowEthernet { + return obj.obj +} + +func (obj *flowEthernet) setMsg(msg *otg.FlowEthernet) FlowEthernet { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowEthernet struct { + obj *flowEthernet +} + +type marshalFlowEthernet interface { + // ToProto marshals FlowEthernet to protobuf object *otg.FlowEthernet + ToProto() (*otg.FlowEthernet, error) + // ToPbText marshals FlowEthernet to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowEthernet to YAML text + ToYaml() (string, error) + // ToJson marshals FlowEthernet to JSON text + ToJson() (string, error) +} + +type unMarshalflowEthernet struct { + obj *flowEthernet +} + +type unMarshalFlowEthernet interface { + // FromProto unmarshals FlowEthernet from protobuf object *otg.FlowEthernet + FromProto(msg *otg.FlowEthernet) (FlowEthernet, error) + // FromPbText unmarshals FlowEthernet from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowEthernet from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowEthernet from JSON text + FromJson(value string) error +} + +func (obj *flowEthernet) Marshal() marshalFlowEthernet { + if obj.marshaller == nil { + obj.marshaller = &marshalflowEthernet{obj: obj} + } + return obj.marshaller +} + +func (obj *flowEthernet) Unmarshal() unMarshalFlowEthernet { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowEthernet{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowEthernet) ToProto() (*otg.FlowEthernet, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowEthernet) FromProto(msg *otg.FlowEthernet) (FlowEthernet, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowEthernet) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowEthernet) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowEthernet) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowEthernet) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowEthernet) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowEthernet) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowEthernet) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowEthernet) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowEthernet) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowEthernet) Clone() (FlowEthernet, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowEthernet() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowEthernet) setNil() { + obj.dstHolder = nil + obj.srcHolder = nil + obj.etherTypeHolder = nil + obj.pfcQueueHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowEthernet is ethernet packet header +type FlowEthernet interface { + Validation + // msg marshals FlowEthernet to protobuf object *otg.FlowEthernet + // and doesn't set defaults + msg() *otg.FlowEthernet + // setMsg unmarshals FlowEthernet from protobuf object *otg.FlowEthernet + // and doesn't set defaults + setMsg(*otg.FlowEthernet) FlowEthernet + // provides marshal interface + Marshal() marshalFlowEthernet + // provides unmarshal interface + Unmarshal() unMarshalFlowEthernet + // validate validates FlowEthernet + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowEthernet, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Dst returns PatternFlowEthernetDst, set in FlowEthernet. + // PatternFlowEthernetDst is destination MAC address + Dst() PatternFlowEthernetDst + // SetDst assigns PatternFlowEthernetDst provided by user to FlowEthernet. + // PatternFlowEthernetDst is destination MAC address + SetDst(value PatternFlowEthernetDst) FlowEthernet + // HasDst checks if Dst has been set in FlowEthernet + HasDst() bool + // Src returns PatternFlowEthernetSrc, set in FlowEthernet. + // PatternFlowEthernetSrc is source MAC address + Src() PatternFlowEthernetSrc + // SetSrc assigns PatternFlowEthernetSrc provided by user to FlowEthernet. + // PatternFlowEthernetSrc is source MAC address + SetSrc(value PatternFlowEthernetSrc) FlowEthernet + // HasSrc checks if Src has been set in FlowEthernet + HasSrc() bool + // EtherType returns PatternFlowEthernetEtherType, set in FlowEthernet. + // PatternFlowEthernetEtherType is ethernet type + EtherType() PatternFlowEthernetEtherType + // SetEtherType assigns PatternFlowEthernetEtherType provided by user to FlowEthernet. + // PatternFlowEthernetEtherType is ethernet type + SetEtherType(value PatternFlowEthernetEtherType) FlowEthernet + // HasEtherType checks if EtherType has been set in FlowEthernet + HasEtherType() bool + // PfcQueue returns PatternFlowEthernetPfcQueue, set in FlowEthernet. + // PatternFlowEthernetPfcQueue is priority flow control queue + PfcQueue() PatternFlowEthernetPfcQueue + // SetPfcQueue assigns PatternFlowEthernetPfcQueue provided by user to FlowEthernet. + // PatternFlowEthernetPfcQueue is priority flow control queue + SetPfcQueue(value PatternFlowEthernetPfcQueue) FlowEthernet + // HasPfcQueue checks if PfcQueue has been set in FlowEthernet + HasPfcQueue() bool + setNil() +} + +// description is TBD +// Dst returns a PatternFlowEthernetDst +func (obj *flowEthernet) Dst() PatternFlowEthernetDst { + if obj.obj.Dst == nil { + obj.obj.Dst = NewPatternFlowEthernetDst().msg() + } + if obj.dstHolder == nil { + obj.dstHolder = &patternFlowEthernetDst{obj: obj.obj.Dst} + } + return obj.dstHolder +} + +// description is TBD +// Dst returns a PatternFlowEthernetDst +func (obj *flowEthernet) HasDst() bool { + return obj.obj.Dst != nil +} + +// description is TBD +// SetDst sets the PatternFlowEthernetDst value in the FlowEthernet object +func (obj *flowEthernet) SetDst(value PatternFlowEthernetDst) FlowEthernet { + + obj.dstHolder = nil + obj.obj.Dst = value.msg() + + return obj +} + +// description is TBD +// Src returns a PatternFlowEthernetSrc +func (obj *flowEthernet) Src() PatternFlowEthernetSrc { + if obj.obj.Src == nil { + obj.obj.Src = NewPatternFlowEthernetSrc().msg() + } + if obj.srcHolder == nil { + obj.srcHolder = &patternFlowEthernetSrc{obj: obj.obj.Src} + } + return obj.srcHolder +} + +// description is TBD +// Src returns a PatternFlowEthernetSrc +func (obj *flowEthernet) HasSrc() bool { + return obj.obj.Src != nil +} + +// description is TBD +// SetSrc sets the PatternFlowEthernetSrc value in the FlowEthernet object +func (obj *flowEthernet) SetSrc(value PatternFlowEthernetSrc) FlowEthernet { + + obj.srcHolder = nil + obj.obj.Src = value.msg() + + return obj +} + +// description is TBD +// EtherType returns a PatternFlowEthernetEtherType +func (obj *flowEthernet) EtherType() PatternFlowEthernetEtherType { + if obj.obj.EtherType == nil { + obj.obj.EtherType = NewPatternFlowEthernetEtherType().msg() + } + if obj.etherTypeHolder == nil { + obj.etherTypeHolder = &patternFlowEthernetEtherType{obj: obj.obj.EtherType} + } + return obj.etherTypeHolder +} + +// description is TBD +// EtherType returns a PatternFlowEthernetEtherType +func (obj *flowEthernet) HasEtherType() bool { + return obj.obj.EtherType != nil +} + +// description is TBD +// SetEtherType sets the PatternFlowEthernetEtherType value in the FlowEthernet object +func (obj *flowEthernet) SetEtherType(value PatternFlowEthernetEtherType) FlowEthernet { + + obj.etherTypeHolder = nil + obj.obj.EtherType = value.msg() + + return obj +} + +// description is TBD +// PfcQueue returns a PatternFlowEthernetPfcQueue +func (obj *flowEthernet) PfcQueue() PatternFlowEthernetPfcQueue { + if obj.obj.PfcQueue == nil { + obj.obj.PfcQueue = NewPatternFlowEthernetPfcQueue().msg() + } + if obj.pfcQueueHolder == nil { + obj.pfcQueueHolder = &patternFlowEthernetPfcQueue{obj: obj.obj.PfcQueue} + } + return obj.pfcQueueHolder +} + +// description is TBD +// PfcQueue returns a PatternFlowEthernetPfcQueue +func (obj *flowEthernet) HasPfcQueue() bool { + return obj.obj.PfcQueue != nil +} + +// description is TBD +// SetPfcQueue sets the PatternFlowEthernetPfcQueue value in the FlowEthernet object +func (obj *flowEthernet) SetPfcQueue(value PatternFlowEthernetPfcQueue) FlowEthernet { + + obj.pfcQueueHolder = nil + obj.obj.PfcQueue = value.msg() + + return obj +} + +func (obj *flowEthernet) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Dst != nil { + + obj.Dst().validateObj(vObj, set_default) + } + + if obj.obj.Src != nil { + + obj.Src().validateObj(vObj, set_default) + } + + if obj.obj.EtherType != nil { + + obj.EtherType().validateObj(vObj, set_default) + } + + if obj.obj.PfcQueue != nil { + + obj.PfcQueue().validateObj(vObj, set_default) + } + +} + +func (obj *flowEthernet) setDefault() { + +} diff --git a/gosnappi/flow_ethernet_pause.go b/gosnappi/flow_ethernet_pause.go new file mode 100644 index 00000000..3c5022c7 --- /dev/null +++ b/gosnappi/flow_ethernet_pause.go @@ -0,0 +1,500 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowEthernetPause ***** +type flowEthernetPause struct { + validation + obj *otg.FlowEthernetPause + marshaller marshalFlowEthernetPause + unMarshaller unMarshalFlowEthernetPause + dstHolder PatternFlowEthernetPauseDst + srcHolder PatternFlowEthernetPauseSrc + etherTypeHolder PatternFlowEthernetPauseEtherType + controlOpCodeHolder PatternFlowEthernetPauseControlOpCode + timeHolder PatternFlowEthernetPauseTime +} + +func NewFlowEthernetPause() FlowEthernetPause { + obj := flowEthernetPause{obj: &otg.FlowEthernetPause{}} + obj.setDefault() + return &obj +} + +func (obj *flowEthernetPause) msg() *otg.FlowEthernetPause { + return obj.obj +} + +func (obj *flowEthernetPause) setMsg(msg *otg.FlowEthernetPause) FlowEthernetPause { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowEthernetPause struct { + obj *flowEthernetPause +} + +type marshalFlowEthernetPause interface { + // ToProto marshals FlowEthernetPause to protobuf object *otg.FlowEthernetPause + ToProto() (*otg.FlowEthernetPause, error) + // ToPbText marshals FlowEthernetPause to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowEthernetPause to YAML text + ToYaml() (string, error) + // ToJson marshals FlowEthernetPause to JSON text + ToJson() (string, error) +} + +type unMarshalflowEthernetPause struct { + obj *flowEthernetPause +} + +type unMarshalFlowEthernetPause interface { + // FromProto unmarshals FlowEthernetPause from protobuf object *otg.FlowEthernetPause + FromProto(msg *otg.FlowEthernetPause) (FlowEthernetPause, error) + // FromPbText unmarshals FlowEthernetPause from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowEthernetPause from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowEthernetPause from JSON text + FromJson(value string) error +} + +func (obj *flowEthernetPause) Marshal() marshalFlowEthernetPause { + if obj.marshaller == nil { + obj.marshaller = &marshalflowEthernetPause{obj: obj} + } + return obj.marshaller +} + +func (obj *flowEthernetPause) Unmarshal() unMarshalFlowEthernetPause { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowEthernetPause{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowEthernetPause) ToProto() (*otg.FlowEthernetPause, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowEthernetPause) FromProto(msg *otg.FlowEthernetPause) (FlowEthernetPause, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowEthernetPause) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowEthernetPause) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowEthernetPause) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowEthernetPause) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowEthernetPause) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowEthernetPause) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowEthernetPause) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowEthernetPause) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowEthernetPause) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowEthernetPause) Clone() (FlowEthernetPause, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowEthernetPause() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowEthernetPause) setNil() { + obj.dstHolder = nil + obj.srcHolder = nil + obj.etherTypeHolder = nil + obj.controlOpCodeHolder = nil + obj.timeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowEthernetPause is iEEE 802.3x global ethernet pause packet header +type FlowEthernetPause interface { + Validation + // msg marshals FlowEthernetPause to protobuf object *otg.FlowEthernetPause + // and doesn't set defaults + msg() *otg.FlowEthernetPause + // setMsg unmarshals FlowEthernetPause from protobuf object *otg.FlowEthernetPause + // and doesn't set defaults + setMsg(*otg.FlowEthernetPause) FlowEthernetPause + // provides marshal interface + Marshal() marshalFlowEthernetPause + // provides unmarshal interface + Unmarshal() unMarshalFlowEthernetPause + // validate validates FlowEthernetPause + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowEthernetPause, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Dst returns PatternFlowEthernetPauseDst, set in FlowEthernetPause. + // PatternFlowEthernetPauseDst is destination MAC address + Dst() PatternFlowEthernetPauseDst + // SetDst assigns PatternFlowEthernetPauseDst provided by user to FlowEthernetPause. + // PatternFlowEthernetPauseDst is destination MAC address + SetDst(value PatternFlowEthernetPauseDst) FlowEthernetPause + // HasDst checks if Dst has been set in FlowEthernetPause + HasDst() bool + // Src returns PatternFlowEthernetPauseSrc, set in FlowEthernetPause. + // PatternFlowEthernetPauseSrc is source MAC address + Src() PatternFlowEthernetPauseSrc + // SetSrc assigns PatternFlowEthernetPauseSrc provided by user to FlowEthernetPause. + // PatternFlowEthernetPauseSrc is source MAC address + SetSrc(value PatternFlowEthernetPauseSrc) FlowEthernetPause + // HasSrc checks if Src has been set in FlowEthernetPause + HasSrc() bool + // EtherType returns PatternFlowEthernetPauseEtherType, set in FlowEthernetPause. + // PatternFlowEthernetPauseEtherType is ethernet type + EtherType() PatternFlowEthernetPauseEtherType + // SetEtherType assigns PatternFlowEthernetPauseEtherType provided by user to FlowEthernetPause. + // PatternFlowEthernetPauseEtherType is ethernet type + SetEtherType(value PatternFlowEthernetPauseEtherType) FlowEthernetPause + // HasEtherType checks if EtherType has been set in FlowEthernetPause + HasEtherType() bool + // ControlOpCode returns PatternFlowEthernetPauseControlOpCode, set in FlowEthernetPause. + // PatternFlowEthernetPauseControlOpCode is control operation code + ControlOpCode() PatternFlowEthernetPauseControlOpCode + // SetControlOpCode assigns PatternFlowEthernetPauseControlOpCode provided by user to FlowEthernetPause. + // PatternFlowEthernetPauseControlOpCode is control operation code + SetControlOpCode(value PatternFlowEthernetPauseControlOpCode) FlowEthernetPause + // HasControlOpCode checks if ControlOpCode has been set in FlowEthernetPause + HasControlOpCode() bool + // Time returns PatternFlowEthernetPauseTime, set in FlowEthernetPause. + // PatternFlowEthernetPauseTime is time + Time() PatternFlowEthernetPauseTime + // SetTime assigns PatternFlowEthernetPauseTime provided by user to FlowEthernetPause. + // PatternFlowEthernetPauseTime is time + SetTime(value PatternFlowEthernetPauseTime) FlowEthernetPause + // HasTime checks if Time has been set in FlowEthernetPause + HasTime() bool + setNil() +} + +// description is TBD +// Dst returns a PatternFlowEthernetPauseDst +func (obj *flowEthernetPause) Dst() PatternFlowEthernetPauseDst { + if obj.obj.Dst == nil { + obj.obj.Dst = NewPatternFlowEthernetPauseDst().msg() + } + if obj.dstHolder == nil { + obj.dstHolder = &patternFlowEthernetPauseDst{obj: obj.obj.Dst} + } + return obj.dstHolder +} + +// description is TBD +// Dst returns a PatternFlowEthernetPauseDst +func (obj *flowEthernetPause) HasDst() bool { + return obj.obj.Dst != nil +} + +// description is TBD +// SetDst sets the PatternFlowEthernetPauseDst value in the FlowEthernetPause object +func (obj *flowEthernetPause) SetDst(value PatternFlowEthernetPauseDst) FlowEthernetPause { + + obj.dstHolder = nil + obj.obj.Dst = value.msg() + + return obj +} + +// description is TBD +// Src returns a PatternFlowEthernetPauseSrc +func (obj *flowEthernetPause) Src() PatternFlowEthernetPauseSrc { + if obj.obj.Src == nil { + obj.obj.Src = NewPatternFlowEthernetPauseSrc().msg() + } + if obj.srcHolder == nil { + obj.srcHolder = &patternFlowEthernetPauseSrc{obj: obj.obj.Src} + } + return obj.srcHolder +} + +// description is TBD +// Src returns a PatternFlowEthernetPauseSrc +func (obj *flowEthernetPause) HasSrc() bool { + return obj.obj.Src != nil +} + +// description is TBD +// SetSrc sets the PatternFlowEthernetPauseSrc value in the FlowEthernetPause object +func (obj *flowEthernetPause) SetSrc(value PatternFlowEthernetPauseSrc) FlowEthernetPause { + + obj.srcHolder = nil + obj.obj.Src = value.msg() + + return obj +} + +// description is TBD +// EtherType returns a PatternFlowEthernetPauseEtherType +func (obj *flowEthernetPause) EtherType() PatternFlowEthernetPauseEtherType { + if obj.obj.EtherType == nil { + obj.obj.EtherType = NewPatternFlowEthernetPauseEtherType().msg() + } + if obj.etherTypeHolder == nil { + obj.etherTypeHolder = &patternFlowEthernetPauseEtherType{obj: obj.obj.EtherType} + } + return obj.etherTypeHolder +} + +// description is TBD +// EtherType returns a PatternFlowEthernetPauseEtherType +func (obj *flowEthernetPause) HasEtherType() bool { + return obj.obj.EtherType != nil +} + +// description is TBD +// SetEtherType sets the PatternFlowEthernetPauseEtherType value in the FlowEthernetPause object +func (obj *flowEthernetPause) SetEtherType(value PatternFlowEthernetPauseEtherType) FlowEthernetPause { + + obj.etherTypeHolder = nil + obj.obj.EtherType = value.msg() + + return obj +} + +// description is TBD +// ControlOpCode returns a PatternFlowEthernetPauseControlOpCode +func (obj *flowEthernetPause) ControlOpCode() PatternFlowEthernetPauseControlOpCode { + if obj.obj.ControlOpCode == nil { + obj.obj.ControlOpCode = NewPatternFlowEthernetPauseControlOpCode().msg() + } + if obj.controlOpCodeHolder == nil { + obj.controlOpCodeHolder = &patternFlowEthernetPauseControlOpCode{obj: obj.obj.ControlOpCode} + } + return obj.controlOpCodeHolder +} + +// description is TBD +// ControlOpCode returns a PatternFlowEthernetPauseControlOpCode +func (obj *flowEthernetPause) HasControlOpCode() bool { + return obj.obj.ControlOpCode != nil +} + +// description is TBD +// SetControlOpCode sets the PatternFlowEthernetPauseControlOpCode value in the FlowEthernetPause object +func (obj *flowEthernetPause) SetControlOpCode(value PatternFlowEthernetPauseControlOpCode) FlowEthernetPause { + + obj.controlOpCodeHolder = nil + obj.obj.ControlOpCode = value.msg() + + return obj +} + +// description is TBD +// Time returns a PatternFlowEthernetPauseTime +func (obj *flowEthernetPause) Time() PatternFlowEthernetPauseTime { + if obj.obj.Time == nil { + obj.obj.Time = NewPatternFlowEthernetPauseTime().msg() + } + if obj.timeHolder == nil { + obj.timeHolder = &patternFlowEthernetPauseTime{obj: obj.obj.Time} + } + return obj.timeHolder +} + +// description is TBD +// Time returns a PatternFlowEthernetPauseTime +func (obj *flowEthernetPause) HasTime() bool { + return obj.obj.Time != nil +} + +// description is TBD +// SetTime sets the PatternFlowEthernetPauseTime value in the FlowEthernetPause object +func (obj *flowEthernetPause) SetTime(value PatternFlowEthernetPauseTime) FlowEthernetPause { + + obj.timeHolder = nil + obj.obj.Time = value.msg() + + return obj +} + +func (obj *flowEthernetPause) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Dst != nil { + + obj.Dst().validateObj(vObj, set_default) + } + + if obj.obj.Src != nil { + + obj.Src().validateObj(vObj, set_default) + } + + if obj.obj.EtherType != nil { + + obj.EtherType().validateObj(vObj, set_default) + } + + if obj.obj.ControlOpCode != nil { + + obj.ControlOpCode().validateObj(vObj, set_default) + } + + if obj.obj.Time != nil { + + obj.Time().validateObj(vObj, set_default) + } + +} + +func (obj *flowEthernetPause) setDefault() { + +} diff --git a/gosnappi/flow_fixed_packets.go b/gosnappi/flow_fixed_packets.go new file mode 100644 index 00000000..2c394b88 --- /dev/null +++ b/gosnappi/flow_fixed_packets.go @@ -0,0 +1,402 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowFixedPackets ***** +type flowFixedPackets struct { + validation + obj *otg.FlowFixedPackets + marshaller marshalFlowFixedPackets + unMarshaller unMarshalFlowFixedPackets + delayHolder FlowDelay +} + +func NewFlowFixedPackets() FlowFixedPackets { + obj := flowFixedPackets{obj: &otg.FlowFixedPackets{}} + obj.setDefault() + return &obj +} + +func (obj *flowFixedPackets) msg() *otg.FlowFixedPackets { + return obj.obj +} + +func (obj *flowFixedPackets) setMsg(msg *otg.FlowFixedPackets) FlowFixedPackets { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowFixedPackets struct { + obj *flowFixedPackets +} + +type marshalFlowFixedPackets interface { + // ToProto marshals FlowFixedPackets to protobuf object *otg.FlowFixedPackets + ToProto() (*otg.FlowFixedPackets, error) + // ToPbText marshals FlowFixedPackets to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowFixedPackets to YAML text + ToYaml() (string, error) + // ToJson marshals FlowFixedPackets to JSON text + ToJson() (string, error) +} + +type unMarshalflowFixedPackets struct { + obj *flowFixedPackets +} + +type unMarshalFlowFixedPackets interface { + // FromProto unmarshals FlowFixedPackets from protobuf object *otg.FlowFixedPackets + FromProto(msg *otg.FlowFixedPackets) (FlowFixedPackets, error) + // FromPbText unmarshals FlowFixedPackets from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowFixedPackets from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowFixedPackets from JSON text + FromJson(value string) error +} + +func (obj *flowFixedPackets) Marshal() marshalFlowFixedPackets { + if obj.marshaller == nil { + obj.marshaller = &marshalflowFixedPackets{obj: obj} + } + return obj.marshaller +} + +func (obj *flowFixedPackets) Unmarshal() unMarshalFlowFixedPackets { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowFixedPackets{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowFixedPackets) ToProto() (*otg.FlowFixedPackets, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowFixedPackets) FromProto(msg *otg.FlowFixedPackets) (FlowFixedPackets, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowFixedPackets) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowFixedPackets) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowFixedPackets) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowFixedPackets) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowFixedPackets) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowFixedPackets) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowFixedPackets) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowFixedPackets) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowFixedPackets) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowFixedPackets) Clone() (FlowFixedPackets, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowFixedPackets() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowFixedPackets) setNil() { + obj.delayHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowFixedPackets is transmit a fixed number of packets after which the flow will stop. +type FlowFixedPackets interface { + Validation + // msg marshals FlowFixedPackets to protobuf object *otg.FlowFixedPackets + // and doesn't set defaults + msg() *otg.FlowFixedPackets + // setMsg unmarshals FlowFixedPackets from protobuf object *otg.FlowFixedPackets + // and doesn't set defaults + setMsg(*otg.FlowFixedPackets) FlowFixedPackets + // provides marshal interface + Marshal() marshalFlowFixedPackets + // provides unmarshal interface + Unmarshal() unMarshalFlowFixedPackets + // validate validates FlowFixedPackets + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowFixedPackets, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Packets returns uint32, set in FlowFixedPackets. + Packets() uint32 + // SetPackets assigns uint32 provided by user to FlowFixedPackets + SetPackets(value uint32) FlowFixedPackets + // HasPackets checks if Packets has been set in FlowFixedPackets + HasPackets() bool + // Gap returns uint32, set in FlowFixedPackets. + Gap() uint32 + // SetGap assigns uint32 provided by user to FlowFixedPackets + SetGap(value uint32) FlowFixedPackets + // HasGap checks if Gap has been set in FlowFixedPackets + HasGap() bool + // Delay returns FlowDelay, set in FlowFixedPackets. + // FlowDelay is the optional container to specify the delay before starting + // transmission of packets. + Delay() FlowDelay + // SetDelay assigns FlowDelay provided by user to FlowFixedPackets. + // FlowDelay is the optional container to specify the delay before starting + // transmission of packets. + SetDelay(value FlowDelay) FlowFixedPackets + // HasDelay checks if Delay has been set in FlowFixedPackets + HasDelay() bool + setNil() +} + +// Stop transmit of the flow after this number of packets. +// Packets returns a uint32 +func (obj *flowFixedPackets) Packets() uint32 { + + return *obj.obj.Packets + +} + +// Stop transmit of the flow after this number of packets. +// Packets returns a uint32 +func (obj *flowFixedPackets) HasPackets() bool { + return obj.obj.Packets != nil +} + +// Stop transmit of the flow after this number of packets. +// SetPackets sets the uint32 value in the FlowFixedPackets object +func (obj *flowFixedPackets) SetPackets(value uint32) FlowFixedPackets { + + obj.obj.Packets = &value + return obj +} + +// The minimum gap between packets expressed as bytes. +// Gap returns a uint32 +func (obj *flowFixedPackets) Gap() uint32 { + + return *obj.obj.Gap + +} + +// The minimum gap between packets expressed as bytes. +// Gap returns a uint32 +func (obj *flowFixedPackets) HasGap() bool { + return obj.obj.Gap != nil +} + +// The minimum gap between packets expressed as bytes. +// SetGap sets the uint32 value in the FlowFixedPackets object +func (obj *flowFixedPackets) SetGap(value uint32) FlowFixedPackets { + + obj.obj.Gap = &value + return obj +} + +// description is TBD +// Delay returns a FlowDelay +func (obj *flowFixedPackets) Delay() FlowDelay { + if obj.obj.Delay == nil { + obj.obj.Delay = NewFlowDelay().msg() + } + if obj.delayHolder == nil { + obj.delayHolder = &flowDelay{obj: obj.obj.Delay} + } + return obj.delayHolder +} + +// description is TBD +// Delay returns a FlowDelay +func (obj *flowFixedPackets) HasDelay() bool { + return obj.obj.Delay != nil +} + +// description is TBD +// SetDelay sets the FlowDelay value in the FlowFixedPackets object +func (obj *flowFixedPackets) SetDelay(value FlowDelay) FlowFixedPackets { + + obj.delayHolder = nil + obj.obj.Delay = value.msg() + + return obj +} + +func (obj *flowFixedPackets) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Packets != nil { + + if *obj.obj.Packets < 1 || *obj.obj.Packets > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= FlowFixedPackets.Packets <= 4294967295 but Got %d", *obj.obj.Packets)) + } + + } + + if obj.obj.Delay != nil { + + obj.Delay().validateObj(vObj, set_default) + } + +} + +func (obj *flowFixedPackets) setDefault() { + if obj.obj.Packets == nil { + obj.SetPackets(1) + } + if obj.obj.Gap == nil { + obj.SetGap(12) + } + +} diff --git a/gosnappi/flow_fixed_seconds.go b/gosnappi/flow_fixed_seconds.go new file mode 100644 index 00000000..eeb2e2ba --- /dev/null +++ b/gosnappi/flow_fixed_seconds.go @@ -0,0 +1,402 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowFixedSeconds ***** +type flowFixedSeconds struct { + validation + obj *otg.FlowFixedSeconds + marshaller marshalFlowFixedSeconds + unMarshaller unMarshalFlowFixedSeconds + delayHolder FlowDelay +} + +func NewFlowFixedSeconds() FlowFixedSeconds { + obj := flowFixedSeconds{obj: &otg.FlowFixedSeconds{}} + obj.setDefault() + return &obj +} + +func (obj *flowFixedSeconds) msg() *otg.FlowFixedSeconds { + return obj.obj +} + +func (obj *flowFixedSeconds) setMsg(msg *otg.FlowFixedSeconds) FlowFixedSeconds { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowFixedSeconds struct { + obj *flowFixedSeconds +} + +type marshalFlowFixedSeconds interface { + // ToProto marshals FlowFixedSeconds to protobuf object *otg.FlowFixedSeconds + ToProto() (*otg.FlowFixedSeconds, error) + // ToPbText marshals FlowFixedSeconds to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowFixedSeconds to YAML text + ToYaml() (string, error) + // ToJson marshals FlowFixedSeconds to JSON text + ToJson() (string, error) +} + +type unMarshalflowFixedSeconds struct { + obj *flowFixedSeconds +} + +type unMarshalFlowFixedSeconds interface { + // FromProto unmarshals FlowFixedSeconds from protobuf object *otg.FlowFixedSeconds + FromProto(msg *otg.FlowFixedSeconds) (FlowFixedSeconds, error) + // FromPbText unmarshals FlowFixedSeconds from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowFixedSeconds from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowFixedSeconds from JSON text + FromJson(value string) error +} + +func (obj *flowFixedSeconds) Marshal() marshalFlowFixedSeconds { + if obj.marshaller == nil { + obj.marshaller = &marshalflowFixedSeconds{obj: obj} + } + return obj.marshaller +} + +func (obj *flowFixedSeconds) Unmarshal() unMarshalFlowFixedSeconds { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowFixedSeconds{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowFixedSeconds) ToProto() (*otg.FlowFixedSeconds, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowFixedSeconds) FromProto(msg *otg.FlowFixedSeconds) (FlowFixedSeconds, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowFixedSeconds) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowFixedSeconds) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowFixedSeconds) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowFixedSeconds) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowFixedSeconds) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowFixedSeconds) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowFixedSeconds) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowFixedSeconds) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowFixedSeconds) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowFixedSeconds) Clone() (FlowFixedSeconds, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowFixedSeconds() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowFixedSeconds) setNil() { + obj.delayHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowFixedSeconds is transmit for a fixed number of seconds after which the flow will stop. +type FlowFixedSeconds interface { + Validation + // msg marshals FlowFixedSeconds to protobuf object *otg.FlowFixedSeconds + // and doesn't set defaults + msg() *otg.FlowFixedSeconds + // setMsg unmarshals FlowFixedSeconds from protobuf object *otg.FlowFixedSeconds + // and doesn't set defaults + setMsg(*otg.FlowFixedSeconds) FlowFixedSeconds + // provides marshal interface + Marshal() marshalFlowFixedSeconds + // provides unmarshal interface + Unmarshal() unMarshalFlowFixedSeconds + // validate validates FlowFixedSeconds + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowFixedSeconds, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Seconds returns float32, set in FlowFixedSeconds. + Seconds() float32 + // SetSeconds assigns float32 provided by user to FlowFixedSeconds + SetSeconds(value float32) FlowFixedSeconds + // HasSeconds checks if Seconds has been set in FlowFixedSeconds + HasSeconds() bool + // Gap returns uint32, set in FlowFixedSeconds. + Gap() uint32 + // SetGap assigns uint32 provided by user to FlowFixedSeconds + SetGap(value uint32) FlowFixedSeconds + // HasGap checks if Gap has been set in FlowFixedSeconds + HasGap() bool + // Delay returns FlowDelay, set in FlowFixedSeconds. + // FlowDelay is the optional container to specify the delay before starting + // transmission of packets. + Delay() FlowDelay + // SetDelay assigns FlowDelay provided by user to FlowFixedSeconds. + // FlowDelay is the optional container to specify the delay before starting + // transmission of packets. + SetDelay(value FlowDelay) FlowFixedSeconds + // HasDelay checks if Delay has been set in FlowFixedSeconds + HasDelay() bool + setNil() +} + +// Stop transmit of the flow after this number of seconds. +// Seconds returns a float32 +func (obj *flowFixedSeconds) Seconds() float32 { + + return *obj.obj.Seconds + +} + +// Stop transmit of the flow after this number of seconds. +// Seconds returns a float32 +func (obj *flowFixedSeconds) HasSeconds() bool { + return obj.obj.Seconds != nil +} + +// Stop transmit of the flow after this number of seconds. +// SetSeconds sets the float32 value in the FlowFixedSeconds object +func (obj *flowFixedSeconds) SetSeconds(value float32) FlowFixedSeconds { + + obj.obj.Seconds = &value + return obj +} + +// The minimum gap between packets expressed as bytes. +// Gap returns a uint32 +func (obj *flowFixedSeconds) Gap() uint32 { + + return *obj.obj.Gap + +} + +// The minimum gap between packets expressed as bytes. +// Gap returns a uint32 +func (obj *flowFixedSeconds) HasGap() bool { + return obj.obj.Gap != nil +} + +// The minimum gap between packets expressed as bytes. +// SetGap sets the uint32 value in the FlowFixedSeconds object +func (obj *flowFixedSeconds) SetGap(value uint32) FlowFixedSeconds { + + obj.obj.Gap = &value + return obj +} + +// description is TBD +// Delay returns a FlowDelay +func (obj *flowFixedSeconds) Delay() FlowDelay { + if obj.obj.Delay == nil { + obj.obj.Delay = NewFlowDelay().msg() + } + if obj.delayHolder == nil { + obj.delayHolder = &flowDelay{obj: obj.obj.Delay} + } + return obj.delayHolder +} + +// description is TBD +// Delay returns a FlowDelay +func (obj *flowFixedSeconds) HasDelay() bool { + return obj.obj.Delay != nil +} + +// description is TBD +// SetDelay sets the FlowDelay value in the FlowFixedSeconds object +func (obj *flowFixedSeconds) SetDelay(value FlowDelay) FlowFixedSeconds { + + obj.delayHolder = nil + obj.obj.Delay = value.msg() + + return obj +} + +func (obj *flowFixedSeconds) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Seconds != nil { + + if *obj.obj.Seconds < 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowFixedSeconds.Seconds <= max(float32) but Got %f", *obj.obj.Seconds)) + } + + } + + if obj.obj.Delay != nil { + + obj.Delay().validateObj(vObj, set_default) + } + +} + +func (obj *flowFixedSeconds) setDefault() { + if obj.obj.Seconds == nil { + obj.SetSeconds(1) + } + if obj.obj.Gap == nil { + obj.SetGap(12) + } + +} diff --git a/gosnappi/flow_gre.go b/gosnappi/flow_gre.go new file mode 100644 index 00000000..f41cb7e1 --- /dev/null +++ b/gosnappi/flow_gre.go @@ -0,0 +1,543 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowGre ***** +type flowGre struct { + validation + obj *otg.FlowGre + marshaller marshalFlowGre + unMarshaller unMarshalFlowGre + checksumPresentHolder PatternFlowGreChecksumPresent + reserved0Holder PatternFlowGreReserved0 + versionHolder PatternFlowGreVersion + protocolHolder PatternFlowGreProtocol + checksumHolder PatternFlowGreChecksum + reserved1Holder PatternFlowGreReserved1 +} + +func NewFlowGre() FlowGre { + obj := flowGre{obj: &otg.FlowGre{}} + obj.setDefault() + return &obj +} + +func (obj *flowGre) msg() *otg.FlowGre { + return obj.obj +} + +func (obj *flowGre) setMsg(msg *otg.FlowGre) FlowGre { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowGre struct { + obj *flowGre +} + +type marshalFlowGre interface { + // ToProto marshals FlowGre to protobuf object *otg.FlowGre + ToProto() (*otg.FlowGre, error) + // ToPbText marshals FlowGre to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowGre to YAML text + ToYaml() (string, error) + // ToJson marshals FlowGre to JSON text + ToJson() (string, error) +} + +type unMarshalflowGre struct { + obj *flowGre +} + +type unMarshalFlowGre interface { + // FromProto unmarshals FlowGre from protobuf object *otg.FlowGre + FromProto(msg *otg.FlowGre) (FlowGre, error) + // FromPbText unmarshals FlowGre from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowGre from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowGre from JSON text + FromJson(value string) error +} + +func (obj *flowGre) Marshal() marshalFlowGre { + if obj.marshaller == nil { + obj.marshaller = &marshalflowGre{obj: obj} + } + return obj.marshaller +} + +func (obj *flowGre) Unmarshal() unMarshalFlowGre { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowGre{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowGre) ToProto() (*otg.FlowGre, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowGre) FromProto(msg *otg.FlowGre) (FlowGre, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowGre) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowGre) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowGre) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowGre) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowGre) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowGre) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowGre) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowGre) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowGre) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowGre) Clone() (FlowGre, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowGre() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowGre) setNil() { + obj.checksumPresentHolder = nil + obj.reserved0Holder = nil + obj.versionHolder = nil + obj.protocolHolder = nil + obj.checksumHolder = nil + obj.reserved1Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowGre is standard GRE packet header (RFC2784) +type FlowGre interface { + Validation + // msg marshals FlowGre to protobuf object *otg.FlowGre + // and doesn't set defaults + msg() *otg.FlowGre + // setMsg unmarshals FlowGre from protobuf object *otg.FlowGre + // and doesn't set defaults + setMsg(*otg.FlowGre) FlowGre + // provides marshal interface + Marshal() marshalFlowGre + // provides unmarshal interface + Unmarshal() unMarshalFlowGre + // validate validates FlowGre + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowGre, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ChecksumPresent returns PatternFlowGreChecksumPresent, set in FlowGre. + // PatternFlowGreChecksumPresent is checksum present bit + ChecksumPresent() PatternFlowGreChecksumPresent + // SetChecksumPresent assigns PatternFlowGreChecksumPresent provided by user to FlowGre. + // PatternFlowGreChecksumPresent is checksum present bit + SetChecksumPresent(value PatternFlowGreChecksumPresent) FlowGre + // HasChecksumPresent checks if ChecksumPresent has been set in FlowGre + HasChecksumPresent() bool + // Reserved0 returns PatternFlowGreReserved0, set in FlowGre. + // PatternFlowGreReserved0 is reserved bits + Reserved0() PatternFlowGreReserved0 + // SetReserved0 assigns PatternFlowGreReserved0 provided by user to FlowGre. + // PatternFlowGreReserved0 is reserved bits + SetReserved0(value PatternFlowGreReserved0) FlowGre + // HasReserved0 checks if Reserved0 has been set in FlowGre + HasReserved0() bool + // Version returns PatternFlowGreVersion, set in FlowGre. + // PatternFlowGreVersion is gRE version number + Version() PatternFlowGreVersion + // SetVersion assigns PatternFlowGreVersion provided by user to FlowGre. + // PatternFlowGreVersion is gRE version number + SetVersion(value PatternFlowGreVersion) FlowGre + // HasVersion checks if Version has been set in FlowGre + HasVersion() bool + // Protocol returns PatternFlowGreProtocol, set in FlowGre. + // PatternFlowGreProtocol is protocol type of encapsulated payload + Protocol() PatternFlowGreProtocol + // SetProtocol assigns PatternFlowGreProtocol provided by user to FlowGre. + // PatternFlowGreProtocol is protocol type of encapsulated payload + SetProtocol(value PatternFlowGreProtocol) FlowGre + // HasProtocol checks if Protocol has been set in FlowGre + HasProtocol() bool + // Checksum returns PatternFlowGreChecksum, set in FlowGre. + // PatternFlowGreChecksum is optional checksum of GRE header and payload. Only present if the checksum_present bit is set. + Checksum() PatternFlowGreChecksum + // SetChecksum assigns PatternFlowGreChecksum provided by user to FlowGre. + // PatternFlowGreChecksum is optional checksum of GRE header and payload. Only present if the checksum_present bit is set. + SetChecksum(value PatternFlowGreChecksum) FlowGre + // HasChecksum checks if Checksum has been set in FlowGre + HasChecksum() bool + // Reserved1 returns PatternFlowGreReserved1, set in FlowGre. + // PatternFlowGreReserved1 is optional reserved field. Only present if the checksum_present bit is set. + Reserved1() PatternFlowGreReserved1 + // SetReserved1 assigns PatternFlowGreReserved1 provided by user to FlowGre. + // PatternFlowGreReserved1 is optional reserved field. Only present if the checksum_present bit is set. + SetReserved1(value PatternFlowGreReserved1) FlowGre + // HasReserved1 checks if Reserved1 has been set in FlowGre + HasReserved1() bool + setNil() +} + +// description is TBD +// ChecksumPresent returns a PatternFlowGreChecksumPresent +func (obj *flowGre) ChecksumPresent() PatternFlowGreChecksumPresent { + if obj.obj.ChecksumPresent == nil { + obj.obj.ChecksumPresent = NewPatternFlowGreChecksumPresent().msg() + } + if obj.checksumPresentHolder == nil { + obj.checksumPresentHolder = &patternFlowGreChecksumPresent{obj: obj.obj.ChecksumPresent} + } + return obj.checksumPresentHolder +} + +// description is TBD +// ChecksumPresent returns a PatternFlowGreChecksumPresent +func (obj *flowGre) HasChecksumPresent() bool { + return obj.obj.ChecksumPresent != nil +} + +// description is TBD +// SetChecksumPresent sets the PatternFlowGreChecksumPresent value in the FlowGre object +func (obj *flowGre) SetChecksumPresent(value PatternFlowGreChecksumPresent) FlowGre { + + obj.checksumPresentHolder = nil + obj.obj.ChecksumPresent = value.msg() + + return obj +} + +// description is TBD +// Reserved0 returns a PatternFlowGreReserved0 +func (obj *flowGre) Reserved0() PatternFlowGreReserved0 { + if obj.obj.Reserved0 == nil { + obj.obj.Reserved0 = NewPatternFlowGreReserved0().msg() + } + if obj.reserved0Holder == nil { + obj.reserved0Holder = &patternFlowGreReserved0{obj: obj.obj.Reserved0} + } + return obj.reserved0Holder +} + +// description is TBD +// Reserved0 returns a PatternFlowGreReserved0 +func (obj *flowGre) HasReserved0() bool { + return obj.obj.Reserved0 != nil +} + +// description is TBD +// SetReserved0 sets the PatternFlowGreReserved0 value in the FlowGre object +func (obj *flowGre) SetReserved0(value PatternFlowGreReserved0) FlowGre { + + obj.reserved0Holder = nil + obj.obj.Reserved0 = value.msg() + + return obj +} + +// description is TBD +// Version returns a PatternFlowGreVersion +func (obj *flowGre) Version() PatternFlowGreVersion { + if obj.obj.Version == nil { + obj.obj.Version = NewPatternFlowGreVersion().msg() + } + if obj.versionHolder == nil { + obj.versionHolder = &patternFlowGreVersion{obj: obj.obj.Version} + } + return obj.versionHolder +} + +// description is TBD +// Version returns a PatternFlowGreVersion +func (obj *flowGre) HasVersion() bool { + return obj.obj.Version != nil +} + +// description is TBD +// SetVersion sets the PatternFlowGreVersion value in the FlowGre object +func (obj *flowGre) SetVersion(value PatternFlowGreVersion) FlowGre { + + obj.versionHolder = nil + obj.obj.Version = value.msg() + + return obj +} + +// description is TBD +// Protocol returns a PatternFlowGreProtocol +func (obj *flowGre) Protocol() PatternFlowGreProtocol { + if obj.obj.Protocol == nil { + obj.obj.Protocol = NewPatternFlowGreProtocol().msg() + } + if obj.protocolHolder == nil { + obj.protocolHolder = &patternFlowGreProtocol{obj: obj.obj.Protocol} + } + return obj.protocolHolder +} + +// description is TBD +// Protocol returns a PatternFlowGreProtocol +func (obj *flowGre) HasProtocol() bool { + return obj.obj.Protocol != nil +} + +// description is TBD +// SetProtocol sets the PatternFlowGreProtocol value in the FlowGre object +func (obj *flowGre) SetProtocol(value PatternFlowGreProtocol) FlowGre { + + obj.protocolHolder = nil + obj.obj.Protocol = value.msg() + + return obj +} + +// description is TBD +// Checksum returns a PatternFlowGreChecksum +func (obj *flowGre) Checksum() PatternFlowGreChecksum { + if obj.obj.Checksum == nil { + obj.obj.Checksum = NewPatternFlowGreChecksum().msg() + } + if obj.checksumHolder == nil { + obj.checksumHolder = &patternFlowGreChecksum{obj: obj.obj.Checksum} + } + return obj.checksumHolder +} + +// description is TBD +// Checksum returns a PatternFlowGreChecksum +func (obj *flowGre) HasChecksum() bool { + return obj.obj.Checksum != nil +} + +// description is TBD +// SetChecksum sets the PatternFlowGreChecksum value in the FlowGre object +func (obj *flowGre) SetChecksum(value PatternFlowGreChecksum) FlowGre { + + obj.checksumHolder = nil + obj.obj.Checksum = value.msg() + + return obj +} + +// description is TBD +// Reserved1 returns a PatternFlowGreReserved1 +func (obj *flowGre) Reserved1() PatternFlowGreReserved1 { + if obj.obj.Reserved1 == nil { + obj.obj.Reserved1 = NewPatternFlowGreReserved1().msg() + } + if obj.reserved1Holder == nil { + obj.reserved1Holder = &patternFlowGreReserved1{obj: obj.obj.Reserved1} + } + return obj.reserved1Holder +} + +// description is TBD +// Reserved1 returns a PatternFlowGreReserved1 +func (obj *flowGre) HasReserved1() bool { + return obj.obj.Reserved1 != nil +} + +// description is TBD +// SetReserved1 sets the PatternFlowGreReserved1 value in the FlowGre object +func (obj *flowGre) SetReserved1(value PatternFlowGreReserved1) FlowGre { + + obj.reserved1Holder = nil + obj.obj.Reserved1 = value.msg() + + return obj +} + +func (obj *flowGre) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.ChecksumPresent != nil { + + obj.ChecksumPresent().validateObj(vObj, set_default) + } + + if obj.obj.Reserved0 != nil { + + obj.Reserved0().validateObj(vObj, set_default) + } + + if obj.obj.Version != nil { + + obj.Version().validateObj(vObj, set_default) + } + + if obj.obj.Protocol != nil { + + obj.Protocol().validateObj(vObj, set_default) + } + + if obj.obj.Checksum != nil { + + obj.Checksum().validateObj(vObj, set_default) + } + + if obj.obj.Reserved1 != nil { + + obj.Reserved1().validateObj(vObj, set_default) + } + +} + +func (obj *flowGre) setDefault() { + +} diff --git a/gosnappi/flow_gtp_extension.go b/gosnappi/flow_gtp_extension.go new file mode 100644 index 00000000..4ec45d33 --- /dev/null +++ b/gosnappi/flow_gtp_extension.go @@ -0,0 +1,414 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowGtpExtension ***** +type flowGtpExtension struct { + validation + obj *otg.FlowGtpExtension + marshaller marshalFlowGtpExtension + unMarshaller unMarshalFlowGtpExtension + extensionLengthHolder PatternFlowGtpExtensionExtensionLength + contentsHolder PatternFlowGtpExtensionContents + nextExtensionHeaderHolder PatternFlowGtpExtensionNextExtensionHeader +} + +func NewFlowGtpExtension() FlowGtpExtension { + obj := flowGtpExtension{obj: &otg.FlowGtpExtension{}} + obj.setDefault() + return &obj +} + +func (obj *flowGtpExtension) msg() *otg.FlowGtpExtension { + return obj.obj +} + +func (obj *flowGtpExtension) setMsg(msg *otg.FlowGtpExtension) FlowGtpExtension { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowGtpExtension struct { + obj *flowGtpExtension +} + +type marshalFlowGtpExtension interface { + // ToProto marshals FlowGtpExtension to protobuf object *otg.FlowGtpExtension + ToProto() (*otg.FlowGtpExtension, error) + // ToPbText marshals FlowGtpExtension to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowGtpExtension to YAML text + ToYaml() (string, error) + // ToJson marshals FlowGtpExtension to JSON text + ToJson() (string, error) +} + +type unMarshalflowGtpExtension struct { + obj *flowGtpExtension +} + +type unMarshalFlowGtpExtension interface { + // FromProto unmarshals FlowGtpExtension from protobuf object *otg.FlowGtpExtension + FromProto(msg *otg.FlowGtpExtension) (FlowGtpExtension, error) + // FromPbText unmarshals FlowGtpExtension from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowGtpExtension from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowGtpExtension from JSON text + FromJson(value string) error +} + +func (obj *flowGtpExtension) Marshal() marshalFlowGtpExtension { + if obj.marshaller == nil { + obj.marshaller = &marshalflowGtpExtension{obj: obj} + } + return obj.marshaller +} + +func (obj *flowGtpExtension) Unmarshal() unMarshalFlowGtpExtension { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowGtpExtension{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowGtpExtension) ToProto() (*otg.FlowGtpExtension, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowGtpExtension) FromProto(msg *otg.FlowGtpExtension) (FlowGtpExtension, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowGtpExtension) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowGtpExtension) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowGtpExtension) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowGtpExtension) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowGtpExtension) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowGtpExtension) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowGtpExtension) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowGtpExtension) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowGtpExtension) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowGtpExtension) Clone() (FlowGtpExtension, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowGtpExtension() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowGtpExtension) setNil() { + obj.extensionLengthHolder = nil + obj.contentsHolder = nil + obj.nextExtensionHeaderHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowGtpExtension is description is TBD +type FlowGtpExtension interface { + Validation + // msg marshals FlowGtpExtension to protobuf object *otg.FlowGtpExtension + // and doesn't set defaults + msg() *otg.FlowGtpExtension + // setMsg unmarshals FlowGtpExtension from protobuf object *otg.FlowGtpExtension + // and doesn't set defaults + setMsg(*otg.FlowGtpExtension) FlowGtpExtension + // provides marshal interface + Marshal() marshalFlowGtpExtension + // provides unmarshal interface + Unmarshal() unMarshalFlowGtpExtension + // validate validates FlowGtpExtension + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowGtpExtension, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ExtensionLength returns PatternFlowGtpExtensionExtensionLength, set in FlowGtpExtension. + // PatternFlowGtpExtensionExtensionLength is this field states the length of this extension header, including the length, the contents, and the next extension header field, in 4-octet units, so the length of the extension must always be a multiple of 4. + ExtensionLength() PatternFlowGtpExtensionExtensionLength + // SetExtensionLength assigns PatternFlowGtpExtensionExtensionLength provided by user to FlowGtpExtension. + // PatternFlowGtpExtensionExtensionLength is this field states the length of this extension header, including the length, the contents, and the next extension header field, in 4-octet units, so the length of the extension must always be a multiple of 4. + SetExtensionLength(value PatternFlowGtpExtensionExtensionLength) FlowGtpExtension + // HasExtensionLength checks if ExtensionLength has been set in FlowGtpExtension + HasExtensionLength() bool + // Contents returns PatternFlowGtpExtensionContents, set in FlowGtpExtension. + // PatternFlowGtpExtensionContents is the extension header contents + Contents() PatternFlowGtpExtensionContents + // SetContents assigns PatternFlowGtpExtensionContents provided by user to FlowGtpExtension. + // PatternFlowGtpExtensionContents is the extension header contents + SetContents(value PatternFlowGtpExtensionContents) FlowGtpExtension + // HasContents checks if Contents has been set in FlowGtpExtension + HasContents() bool + // NextExtensionHeader returns PatternFlowGtpExtensionNextExtensionHeader, set in FlowGtpExtension. + // PatternFlowGtpExtensionNextExtensionHeader is it states the type of the next extension, or 0 if no next extension exists. This permits chaining several next extension headers. + NextExtensionHeader() PatternFlowGtpExtensionNextExtensionHeader + // SetNextExtensionHeader assigns PatternFlowGtpExtensionNextExtensionHeader provided by user to FlowGtpExtension. + // PatternFlowGtpExtensionNextExtensionHeader is it states the type of the next extension, or 0 if no next extension exists. This permits chaining several next extension headers. + SetNextExtensionHeader(value PatternFlowGtpExtensionNextExtensionHeader) FlowGtpExtension + // HasNextExtensionHeader checks if NextExtensionHeader has been set in FlowGtpExtension + HasNextExtensionHeader() bool + setNil() +} + +// description is TBD +// ExtensionLength returns a PatternFlowGtpExtensionExtensionLength +func (obj *flowGtpExtension) ExtensionLength() PatternFlowGtpExtensionExtensionLength { + if obj.obj.ExtensionLength == nil { + obj.obj.ExtensionLength = NewPatternFlowGtpExtensionExtensionLength().msg() + } + if obj.extensionLengthHolder == nil { + obj.extensionLengthHolder = &patternFlowGtpExtensionExtensionLength{obj: obj.obj.ExtensionLength} + } + return obj.extensionLengthHolder +} + +// description is TBD +// ExtensionLength returns a PatternFlowGtpExtensionExtensionLength +func (obj *flowGtpExtension) HasExtensionLength() bool { + return obj.obj.ExtensionLength != nil +} + +// description is TBD +// SetExtensionLength sets the PatternFlowGtpExtensionExtensionLength value in the FlowGtpExtension object +func (obj *flowGtpExtension) SetExtensionLength(value PatternFlowGtpExtensionExtensionLength) FlowGtpExtension { + + obj.extensionLengthHolder = nil + obj.obj.ExtensionLength = value.msg() + + return obj +} + +// description is TBD +// Contents returns a PatternFlowGtpExtensionContents +func (obj *flowGtpExtension) Contents() PatternFlowGtpExtensionContents { + if obj.obj.Contents == nil { + obj.obj.Contents = NewPatternFlowGtpExtensionContents().msg() + } + if obj.contentsHolder == nil { + obj.contentsHolder = &patternFlowGtpExtensionContents{obj: obj.obj.Contents} + } + return obj.contentsHolder +} + +// description is TBD +// Contents returns a PatternFlowGtpExtensionContents +func (obj *flowGtpExtension) HasContents() bool { + return obj.obj.Contents != nil +} + +// description is TBD +// SetContents sets the PatternFlowGtpExtensionContents value in the FlowGtpExtension object +func (obj *flowGtpExtension) SetContents(value PatternFlowGtpExtensionContents) FlowGtpExtension { + + obj.contentsHolder = nil + obj.obj.Contents = value.msg() + + return obj +} + +// description is TBD +// NextExtensionHeader returns a PatternFlowGtpExtensionNextExtensionHeader +func (obj *flowGtpExtension) NextExtensionHeader() PatternFlowGtpExtensionNextExtensionHeader { + if obj.obj.NextExtensionHeader == nil { + obj.obj.NextExtensionHeader = NewPatternFlowGtpExtensionNextExtensionHeader().msg() + } + if obj.nextExtensionHeaderHolder == nil { + obj.nextExtensionHeaderHolder = &patternFlowGtpExtensionNextExtensionHeader{obj: obj.obj.NextExtensionHeader} + } + return obj.nextExtensionHeaderHolder +} + +// description is TBD +// NextExtensionHeader returns a PatternFlowGtpExtensionNextExtensionHeader +func (obj *flowGtpExtension) HasNextExtensionHeader() bool { + return obj.obj.NextExtensionHeader != nil +} + +// description is TBD +// SetNextExtensionHeader sets the PatternFlowGtpExtensionNextExtensionHeader value in the FlowGtpExtension object +func (obj *flowGtpExtension) SetNextExtensionHeader(value PatternFlowGtpExtensionNextExtensionHeader) FlowGtpExtension { + + obj.nextExtensionHeaderHolder = nil + obj.obj.NextExtensionHeader = value.msg() + + return obj +} + +func (obj *flowGtpExtension) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.ExtensionLength != nil { + + obj.ExtensionLength().validateObj(vObj, set_default) + } + + if obj.obj.Contents != nil { + + obj.Contents().validateObj(vObj, set_default) + } + + if obj.obj.NextExtensionHeader != nil { + + obj.NextExtensionHeader().validateObj(vObj, set_default) + } + +} + +func (obj *flowGtpExtension) setDefault() { + +} diff --git a/gosnappi/flow_gtpv1.go b/gosnappi/flow_gtpv1.go new file mode 100644 index 00000000..d0d18374 --- /dev/null +++ b/gosnappi/flow_gtpv1.go @@ -0,0 +1,906 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowGtpv1 ***** +type flowGtpv1 struct { + validation + obj *otg.FlowGtpv1 + marshaller marshalFlowGtpv1 + unMarshaller unMarshalFlowGtpv1 + versionHolder PatternFlowGtpv1Version + protocolTypeHolder PatternFlowGtpv1ProtocolType + reservedHolder PatternFlowGtpv1Reserved + eFlagHolder PatternFlowGtpv1EFlag + sFlagHolder PatternFlowGtpv1SFlag + pnFlagHolder PatternFlowGtpv1PnFlag + messageTypeHolder PatternFlowGtpv1MessageType + messageLengthHolder PatternFlowGtpv1MessageLength + teidHolder PatternFlowGtpv1Teid + squenceNumberHolder PatternFlowGtpv1SquenceNumber + nPduNumberHolder PatternFlowGtpv1NPduNumber + nextExtensionHeaderTypeHolder PatternFlowGtpv1NextExtensionHeaderType + extensionHeadersHolder FlowGtpv1FlowGtpExtensionIter +} + +func NewFlowGtpv1() FlowGtpv1 { + obj := flowGtpv1{obj: &otg.FlowGtpv1{}} + obj.setDefault() + return &obj +} + +func (obj *flowGtpv1) msg() *otg.FlowGtpv1 { + return obj.obj +} + +func (obj *flowGtpv1) setMsg(msg *otg.FlowGtpv1) FlowGtpv1 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowGtpv1 struct { + obj *flowGtpv1 +} + +type marshalFlowGtpv1 interface { + // ToProto marshals FlowGtpv1 to protobuf object *otg.FlowGtpv1 + ToProto() (*otg.FlowGtpv1, error) + // ToPbText marshals FlowGtpv1 to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowGtpv1 to YAML text + ToYaml() (string, error) + // ToJson marshals FlowGtpv1 to JSON text + ToJson() (string, error) +} + +type unMarshalflowGtpv1 struct { + obj *flowGtpv1 +} + +type unMarshalFlowGtpv1 interface { + // FromProto unmarshals FlowGtpv1 from protobuf object *otg.FlowGtpv1 + FromProto(msg *otg.FlowGtpv1) (FlowGtpv1, error) + // FromPbText unmarshals FlowGtpv1 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowGtpv1 from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowGtpv1 from JSON text + FromJson(value string) error +} + +func (obj *flowGtpv1) Marshal() marshalFlowGtpv1 { + if obj.marshaller == nil { + obj.marshaller = &marshalflowGtpv1{obj: obj} + } + return obj.marshaller +} + +func (obj *flowGtpv1) Unmarshal() unMarshalFlowGtpv1 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowGtpv1{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowGtpv1) ToProto() (*otg.FlowGtpv1, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowGtpv1) FromProto(msg *otg.FlowGtpv1) (FlowGtpv1, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowGtpv1) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowGtpv1) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowGtpv1) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowGtpv1) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowGtpv1) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowGtpv1) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowGtpv1) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowGtpv1) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowGtpv1) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowGtpv1) Clone() (FlowGtpv1, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowGtpv1() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowGtpv1) setNil() { + obj.versionHolder = nil + obj.protocolTypeHolder = nil + obj.reservedHolder = nil + obj.eFlagHolder = nil + obj.sFlagHolder = nil + obj.pnFlagHolder = nil + obj.messageTypeHolder = nil + obj.messageLengthHolder = nil + obj.teidHolder = nil + obj.squenceNumberHolder = nil + obj.nPduNumberHolder = nil + obj.nextExtensionHeaderTypeHolder = nil + obj.extensionHeadersHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowGtpv1 is gTPv1 packet header +type FlowGtpv1 interface { + Validation + // msg marshals FlowGtpv1 to protobuf object *otg.FlowGtpv1 + // and doesn't set defaults + msg() *otg.FlowGtpv1 + // setMsg unmarshals FlowGtpv1 from protobuf object *otg.FlowGtpv1 + // and doesn't set defaults + setMsg(*otg.FlowGtpv1) FlowGtpv1 + // provides marshal interface + Marshal() marshalFlowGtpv1 + // provides unmarshal interface + Unmarshal() unMarshalFlowGtpv1 + // validate validates FlowGtpv1 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowGtpv1, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Version returns PatternFlowGtpv1Version, set in FlowGtpv1. + // PatternFlowGtpv1Version is gTPv1 version + Version() PatternFlowGtpv1Version + // SetVersion assigns PatternFlowGtpv1Version provided by user to FlowGtpv1. + // PatternFlowGtpv1Version is gTPv1 version + SetVersion(value PatternFlowGtpv1Version) FlowGtpv1 + // HasVersion checks if Version has been set in FlowGtpv1 + HasVersion() bool + // ProtocolType returns PatternFlowGtpv1ProtocolType, set in FlowGtpv1. + // PatternFlowGtpv1ProtocolType is protocol type, GTP is 1, GTP' is 0 + ProtocolType() PatternFlowGtpv1ProtocolType + // SetProtocolType assigns PatternFlowGtpv1ProtocolType provided by user to FlowGtpv1. + // PatternFlowGtpv1ProtocolType is protocol type, GTP is 1, GTP' is 0 + SetProtocolType(value PatternFlowGtpv1ProtocolType) FlowGtpv1 + // HasProtocolType checks if ProtocolType has been set in FlowGtpv1 + HasProtocolType() bool + // Reserved returns PatternFlowGtpv1Reserved, set in FlowGtpv1. + // PatternFlowGtpv1Reserved is reserved field + Reserved() PatternFlowGtpv1Reserved + // SetReserved assigns PatternFlowGtpv1Reserved provided by user to FlowGtpv1. + // PatternFlowGtpv1Reserved is reserved field + SetReserved(value PatternFlowGtpv1Reserved) FlowGtpv1 + // HasReserved checks if Reserved has been set in FlowGtpv1 + HasReserved() bool + // EFlag returns PatternFlowGtpv1EFlag, set in FlowGtpv1. + // PatternFlowGtpv1EFlag is extension header field present + EFlag() PatternFlowGtpv1EFlag + // SetEFlag assigns PatternFlowGtpv1EFlag provided by user to FlowGtpv1. + // PatternFlowGtpv1EFlag is extension header field present + SetEFlag(value PatternFlowGtpv1EFlag) FlowGtpv1 + // HasEFlag checks if EFlag has been set in FlowGtpv1 + HasEFlag() bool + // SFlag returns PatternFlowGtpv1SFlag, set in FlowGtpv1. + // PatternFlowGtpv1SFlag is sequence number field present + SFlag() PatternFlowGtpv1SFlag + // SetSFlag assigns PatternFlowGtpv1SFlag provided by user to FlowGtpv1. + // PatternFlowGtpv1SFlag is sequence number field present + SetSFlag(value PatternFlowGtpv1SFlag) FlowGtpv1 + // HasSFlag checks if SFlag has been set in FlowGtpv1 + HasSFlag() bool + // PnFlag returns PatternFlowGtpv1PnFlag, set in FlowGtpv1. + // PatternFlowGtpv1PnFlag is n-PDU field present + PnFlag() PatternFlowGtpv1PnFlag + // SetPnFlag assigns PatternFlowGtpv1PnFlag provided by user to FlowGtpv1. + // PatternFlowGtpv1PnFlag is n-PDU field present + SetPnFlag(value PatternFlowGtpv1PnFlag) FlowGtpv1 + // HasPnFlag checks if PnFlag has been set in FlowGtpv1 + HasPnFlag() bool + // MessageType returns PatternFlowGtpv1MessageType, set in FlowGtpv1. + // PatternFlowGtpv1MessageType is the type of GTP message Different types of messages are defined in 3GPP TS 29.060 section 7.1 + MessageType() PatternFlowGtpv1MessageType + // SetMessageType assigns PatternFlowGtpv1MessageType provided by user to FlowGtpv1. + // PatternFlowGtpv1MessageType is the type of GTP message Different types of messages are defined in 3GPP TS 29.060 section 7.1 + SetMessageType(value PatternFlowGtpv1MessageType) FlowGtpv1 + // HasMessageType checks if MessageType has been set in FlowGtpv1 + HasMessageType() bool + // MessageLength returns PatternFlowGtpv1MessageLength, set in FlowGtpv1. + // PatternFlowGtpv1MessageLength is the length of the payload (the bytes following the mandatory 8-byte GTP header) in bytes that includes any optional fields + MessageLength() PatternFlowGtpv1MessageLength + // SetMessageLength assigns PatternFlowGtpv1MessageLength provided by user to FlowGtpv1. + // PatternFlowGtpv1MessageLength is the length of the payload (the bytes following the mandatory 8-byte GTP header) in bytes that includes any optional fields + SetMessageLength(value PatternFlowGtpv1MessageLength) FlowGtpv1 + // HasMessageLength checks if MessageLength has been set in FlowGtpv1 + HasMessageLength() bool + // Teid returns PatternFlowGtpv1Teid, set in FlowGtpv1. + // PatternFlowGtpv1Teid is tunnel endpoint identifier (TEID) used to multiplex connections in the same GTP tunnel + Teid() PatternFlowGtpv1Teid + // SetTeid assigns PatternFlowGtpv1Teid provided by user to FlowGtpv1. + // PatternFlowGtpv1Teid is tunnel endpoint identifier (TEID) used to multiplex connections in the same GTP tunnel + SetTeid(value PatternFlowGtpv1Teid) FlowGtpv1 + // HasTeid checks if Teid has been set in FlowGtpv1 + HasTeid() bool + // SquenceNumber returns PatternFlowGtpv1SquenceNumber, set in FlowGtpv1. + // PatternFlowGtpv1SquenceNumber is sequence number. Exists if any of the e_flag, s_flag, or pn_flag bits are on. Must be interpreted only if the s_flag bit is on. + SquenceNumber() PatternFlowGtpv1SquenceNumber + // SetSquenceNumber assigns PatternFlowGtpv1SquenceNumber provided by user to FlowGtpv1. + // PatternFlowGtpv1SquenceNumber is sequence number. Exists if any of the e_flag, s_flag, or pn_flag bits are on. Must be interpreted only if the s_flag bit is on. + SetSquenceNumber(value PatternFlowGtpv1SquenceNumber) FlowGtpv1 + // HasSquenceNumber checks if SquenceNumber has been set in FlowGtpv1 + HasSquenceNumber() bool + // NPduNumber returns PatternFlowGtpv1NPduNumber, set in FlowGtpv1. + // PatternFlowGtpv1NPduNumber is n-PDU number. Exists if any of the e_flag, s_flag, or pn_flag bits are on. Must be interpreted only if the pn_flag bit is on. + NPduNumber() PatternFlowGtpv1NPduNumber + // SetNPduNumber assigns PatternFlowGtpv1NPduNumber provided by user to FlowGtpv1. + // PatternFlowGtpv1NPduNumber is n-PDU number. Exists if any of the e_flag, s_flag, or pn_flag bits are on. Must be interpreted only if the pn_flag bit is on. + SetNPduNumber(value PatternFlowGtpv1NPduNumber) FlowGtpv1 + // HasNPduNumber checks if NPduNumber has been set in FlowGtpv1 + HasNPduNumber() bool + // NextExtensionHeaderType returns PatternFlowGtpv1NextExtensionHeaderType, set in FlowGtpv1. + // PatternFlowGtpv1NextExtensionHeaderType is next extension header. Exists if any of the e_flag, s_flag, or pn_flag bits are on. Must be interpreted only if the e_flag bit is on. + NextExtensionHeaderType() PatternFlowGtpv1NextExtensionHeaderType + // SetNextExtensionHeaderType assigns PatternFlowGtpv1NextExtensionHeaderType provided by user to FlowGtpv1. + // PatternFlowGtpv1NextExtensionHeaderType is next extension header. Exists if any of the e_flag, s_flag, or pn_flag bits are on. Must be interpreted only if the e_flag bit is on. + SetNextExtensionHeaderType(value PatternFlowGtpv1NextExtensionHeaderType) FlowGtpv1 + // HasNextExtensionHeaderType checks if NextExtensionHeaderType has been set in FlowGtpv1 + HasNextExtensionHeaderType() bool + // ExtensionHeaders returns FlowGtpv1FlowGtpExtensionIterIter, set in FlowGtpv1 + ExtensionHeaders() FlowGtpv1FlowGtpExtensionIter + setNil() +} + +// description is TBD +// Version returns a PatternFlowGtpv1Version +func (obj *flowGtpv1) Version() PatternFlowGtpv1Version { + if obj.obj.Version == nil { + obj.obj.Version = NewPatternFlowGtpv1Version().msg() + } + if obj.versionHolder == nil { + obj.versionHolder = &patternFlowGtpv1Version{obj: obj.obj.Version} + } + return obj.versionHolder +} + +// description is TBD +// Version returns a PatternFlowGtpv1Version +func (obj *flowGtpv1) HasVersion() bool { + return obj.obj.Version != nil +} + +// description is TBD +// SetVersion sets the PatternFlowGtpv1Version value in the FlowGtpv1 object +func (obj *flowGtpv1) SetVersion(value PatternFlowGtpv1Version) FlowGtpv1 { + + obj.versionHolder = nil + obj.obj.Version = value.msg() + + return obj +} + +// description is TBD +// ProtocolType returns a PatternFlowGtpv1ProtocolType +func (obj *flowGtpv1) ProtocolType() PatternFlowGtpv1ProtocolType { + if obj.obj.ProtocolType == nil { + obj.obj.ProtocolType = NewPatternFlowGtpv1ProtocolType().msg() + } + if obj.protocolTypeHolder == nil { + obj.protocolTypeHolder = &patternFlowGtpv1ProtocolType{obj: obj.obj.ProtocolType} + } + return obj.protocolTypeHolder +} + +// description is TBD +// ProtocolType returns a PatternFlowGtpv1ProtocolType +func (obj *flowGtpv1) HasProtocolType() bool { + return obj.obj.ProtocolType != nil +} + +// description is TBD +// SetProtocolType sets the PatternFlowGtpv1ProtocolType value in the FlowGtpv1 object +func (obj *flowGtpv1) SetProtocolType(value PatternFlowGtpv1ProtocolType) FlowGtpv1 { + + obj.protocolTypeHolder = nil + obj.obj.ProtocolType = value.msg() + + return obj +} + +// description is TBD +// Reserved returns a PatternFlowGtpv1Reserved +func (obj *flowGtpv1) Reserved() PatternFlowGtpv1Reserved { + if obj.obj.Reserved == nil { + obj.obj.Reserved = NewPatternFlowGtpv1Reserved().msg() + } + if obj.reservedHolder == nil { + obj.reservedHolder = &patternFlowGtpv1Reserved{obj: obj.obj.Reserved} + } + return obj.reservedHolder +} + +// description is TBD +// Reserved returns a PatternFlowGtpv1Reserved +func (obj *flowGtpv1) HasReserved() bool { + return obj.obj.Reserved != nil +} + +// description is TBD +// SetReserved sets the PatternFlowGtpv1Reserved value in the FlowGtpv1 object +func (obj *flowGtpv1) SetReserved(value PatternFlowGtpv1Reserved) FlowGtpv1 { + + obj.reservedHolder = nil + obj.obj.Reserved = value.msg() + + return obj +} + +// description is TBD +// EFlag returns a PatternFlowGtpv1EFlag +func (obj *flowGtpv1) EFlag() PatternFlowGtpv1EFlag { + if obj.obj.EFlag == nil { + obj.obj.EFlag = NewPatternFlowGtpv1EFlag().msg() + } + if obj.eFlagHolder == nil { + obj.eFlagHolder = &patternFlowGtpv1EFlag{obj: obj.obj.EFlag} + } + return obj.eFlagHolder +} + +// description is TBD +// EFlag returns a PatternFlowGtpv1EFlag +func (obj *flowGtpv1) HasEFlag() bool { + return obj.obj.EFlag != nil +} + +// description is TBD +// SetEFlag sets the PatternFlowGtpv1EFlag value in the FlowGtpv1 object +func (obj *flowGtpv1) SetEFlag(value PatternFlowGtpv1EFlag) FlowGtpv1 { + + obj.eFlagHolder = nil + obj.obj.EFlag = value.msg() + + return obj +} + +// description is TBD +// SFlag returns a PatternFlowGtpv1SFlag +func (obj *flowGtpv1) SFlag() PatternFlowGtpv1SFlag { + if obj.obj.SFlag == nil { + obj.obj.SFlag = NewPatternFlowGtpv1SFlag().msg() + } + if obj.sFlagHolder == nil { + obj.sFlagHolder = &patternFlowGtpv1SFlag{obj: obj.obj.SFlag} + } + return obj.sFlagHolder +} + +// description is TBD +// SFlag returns a PatternFlowGtpv1SFlag +func (obj *flowGtpv1) HasSFlag() bool { + return obj.obj.SFlag != nil +} + +// description is TBD +// SetSFlag sets the PatternFlowGtpv1SFlag value in the FlowGtpv1 object +func (obj *flowGtpv1) SetSFlag(value PatternFlowGtpv1SFlag) FlowGtpv1 { + + obj.sFlagHolder = nil + obj.obj.SFlag = value.msg() + + return obj +} + +// description is TBD +// PnFlag returns a PatternFlowGtpv1PnFlag +func (obj *flowGtpv1) PnFlag() PatternFlowGtpv1PnFlag { + if obj.obj.PnFlag == nil { + obj.obj.PnFlag = NewPatternFlowGtpv1PnFlag().msg() + } + if obj.pnFlagHolder == nil { + obj.pnFlagHolder = &patternFlowGtpv1PnFlag{obj: obj.obj.PnFlag} + } + return obj.pnFlagHolder +} + +// description is TBD +// PnFlag returns a PatternFlowGtpv1PnFlag +func (obj *flowGtpv1) HasPnFlag() bool { + return obj.obj.PnFlag != nil +} + +// description is TBD +// SetPnFlag sets the PatternFlowGtpv1PnFlag value in the FlowGtpv1 object +func (obj *flowGtpv1) SetPnFlag(value PatternFlowGtpv1PnFlag) FlowGtpv1 { + + obj.pnFlagHolder = nil + obj.obj.PnFlag = value.msg() + + return obj +} + +// description is TBD +// MessageType returns a PatternFlowGtpv1MessageType +func (obj *flowGtpv1) MessageType() PatternFlowGtpv1MessageType { + if obj.obj.MessageType == nil { + obj.obj.MessageType = NewPatternFlowGtpv1MessageType().msg() + } + if obj.messageTypeHolder == nil { + obj.messageTypeHolder = &patternFlowGtpv1MessageType{obj: obj.obj.MessageType} + } + return obj.messageTypeHolder +} + +// description is TBD +// MessageType returns a PatternFlowGtpv1MessageType +func (obj *flowGtpv1) HasMessageType() bool { + return obj.obj.MessageType != nil +} + +// description is TBD +// SetMessageType sets the PatternFlowGtpv1MessageType value in the FlowGtpv1 object +func (obj *flowGtpv1) SetMessageType(value PatternFlowGtpv1MessageType) FlowGtpv1 { + + obj.messageTypeHolder = nil + obj.obj.MessageType = value.msg() + + return obj +} + +// description is TBD +// MessageLength returns a PatternFlowGtpv1MessageLength +func (obj *flowGtpv1) MessageLength() PatternFlowGtpv1MessageLength { + if obj.obj.MessageLength == nil { + obj.obj.MessageLength = NewPatternFlowGtpv1MessageLength().msg() + } + if obj.messageLengthHolder == nil { + obj.messageLengthHolder = &patternFlowGtpv1MessageLength{obj: obj.obj.MessageLength} + } + return obj.messageLengthHolder +} + +// description is TBD +// MessageLength returns a PatternFlowGtpv1MessageLength +func (obj *flowGtpv1) HasMessageLength() bool { + return obj.obj.MessageLength != nil +} + +// description is TBD +// SetMessageLength sets the PatternFlowGtpv1MessageLength value in the FlowGtpv1 object +func (obj *flowGtpv1) SetMessageLength(value PatternFlowGtpv1MessageLength) FlowGtpv1 { + + obj.messageLengthHolder = nil + obj.obj.MessageLength = value.msg() + + return obj +} + +// description is TBD +// Teid returns a PatternFlowGtpv1Teid +func (obj *flowGtpv1) Teid() PatternFlowGtpv1Teid { + if obj.obj.Teid == nil { + obj.obj.Teid = NewPatternFlowGtpv1Teid().msg() + } + if obj.teidHolder == nil { + obj.teidHolder = &patternFlowGtpv1Teid{obj: obj.obj.Teid} + } + return obj.teidHolder +} + +// description is TBD +// Teid returns a PatternFlowGtpv1Teid +func (obj *flowGtpv1) HasTeid() bool { + return obj.obj.Teid != nil +} + +// description is TBD +// SetTeid sets the PatternFlowGtpv1Teid value in the FlowGtpv1 object +func (obj *flowGtpv1) SetTeid(value PatternFlowGtpv1Teid) FlowGtpv1 { + + obj.teidHolder = nil + obj.obj.Teid = value.msg() + + return obj +} + +// description is TBD +// SquenceNumber returns a PatternFlowGtpv1SquenceNumber +func (obj *flowGtpv1) SquenceNumber() PatternFlowGtpv1SquenceNumber { + if obj.obj.SquenceNumber == nil { + obj.obj.SquenceNumber = NewPatternFlowGtpv1SquenceNumber().msg() + } + if obj.squenceNumberHolder == nil { + obj.squenceNumberHolder = &patternFlowGtpv1SquenceNumber{obj: obj.obj.SquenceNumber} + } + return obj.squenceNumberHolder +} + +// description is TBD +// SquenceNumber returns a PatternFlowGtpv1SquenceNumber +func (obj *flowGtpv1) HasSquenceNumber() bool { + return obj.obj.SquenceNumber != nil +} + +// description is TBD +// SetSquenceNumber sets the PatternFlowGtpv1SquenceNumber value in the FlowGtpv1 object +func (obj *flowGtpv1) SetSquenceNumber(value PatternFlowGtpv1SquenceNumber) FlowGtpv1 { + + obj.squenceNumberHolder = nil + obj.obj.SquenceNumber = value.msg() + + return obj +} + +// description is TBD +// NPduNumber returns a PatternFlowGtpv1NPduNumber +func (obj *flowGtpv1) NPduNumber() PatternFlowGtpv1NPduNumber { + if obj.obj.NPduNumber == nil { + obj.obj.NPduNumber = NewPatternFlowGtpv1NPduNumber().msg() + } + if obj.nPduNumberHolder == nil { + obj.nPduNumberHolder = &patternFlowGtpv1NPduNumber{obj: obj.obj.NPduNumber} + } + return obj.nPduNumberHolder +} + +// description is TBD +// NPduNumber returns a PatternFlowGtpv1NPduNumber +func (obj *flowGtpv1) HasNPduNumber() bool { + return obj.obj.NPduNumber != nil +} + +// description is TBD +// SetNPduNumber sets the PatternFlowGtpv1NPduNumber value in the FlowGtpv1 object +func (obj *flowGtpv1) SetNPduNumber(value PatternFlowGtpv1NPduNumber) FlowGtpv1 { + + obj.nPduNumberHolder = nil + obj.obj.NPduNumber = value.msg() + + return obj +} + +// description is TBD +// NextExtensionHeaderType returns a PatternFlowGtpv1NextExtensionHeaderType +func (obj *flowGtpv1) NextExtensionHeaderType() PatternFlowGtpv1NextExtensionHeaderType { + if obj.obj.NextExtensionHeaderType == nil { + obj.obj.NextExtensionHeaderType = NewPatternFlowGtpv1NextExtensionHeaderType().msg() + } + if obj.nextExtensionHeaderTypeHolder == nil { + obj.nextExtensionHeaderTypeHolder = &patternFlowGtpv1NextExtensionHeaderType{obj: obj.obj.NextExtensionHeaderType} + } + return obj.nextExtensionHeaderTypeHolder +} + +// description is TBD +// NextExtensionHeaderType returns a PatternFlowGtpv1NextExtensionHeaderType +func (obj *flowGtpv1) HasNextExtensionHeaderType() bool { + return obj.obj.NextExtensionHeaderType != nil +} + +// description is TBD +// SetNextExtensionHeaderType sets the PatternFlowGtpv1NextExtensionHeaderType value in the FlowGtpv1 object +func (obj *flowGtpv1) SetNextExtensionHeaderType(value PatternFlowGtpv1NextExtensionHeaderType) FlowGtpv1 { + + obj.nextExtensionHeaderTypeHolder = nil + obj.obj.NextExtensionHeaderType = value.msg() + + return obj +} + +// A list of optional extension headers. +// ExtensionHeaders returns a []FlowGtpExtension +func (obj *flowGtpv1) ExtensionHeaders() FlowGtpv1FlowGtpExtensionIter { + if len(obj.obj.ExtensionHeaders) == 0 { + obj.obj.ExtensionHeaders = []*otg.FlowGtpExtension{} + } + if obj.extensionHeadersHolder == nil { + obj.extensionHeadersHolder = newFlowGtpv1FlowGtpExtensionIter(&obj.obj.ExtensionHeaders).setMsg(obj) + } + return obj.extensionHeadersHolder +} + +type flowGtpv1FlowGtpExtensionIter struct { + obj *flowGtpv1 + flowGtpExtensionSlice []FlowGtpExtension + fieldPtr *[]*otg.FlowGtpExtension +} + +func newFlowGtpv1FlowGtpExtensionIter(ptr *[]*otg.FlowGtpExtension) FlowGtpv1FlowGtpExtensionIter { + return &flowGtpv1FlowGtpExtensionIter{fieldPtr: ptr} +} + +type FlowGtpv1FlowGtpExtensionIter interface { + setMsg(*flowGtpv1) FlowGtpv1FlowGtpExtensionIter + Items() []FlowGtpExtension + Add() FlowGtpExtension + Append(items ...FlowGtpExtension) FlowGtpv1FlowGtpExtensionIter + Set(index int, newObj FlowGtpExtension) FlowGtpv1FlowGtpExtensionIter + Clear() FlowGtpv1FlowGtpExtensionIter + clearHolderSlice() FlowGtpv1FlowGtpExtensionIter + appendHolderSlice(item FlowGtpExtension) FlowGtpv1FlowGtpExtensionIter +} + +func (obj *flowGtpv1FlowGtpExtensionIter) setMsg(msg *flowGtpv1) FlowGtpv1FlowGtpExtensionIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flowGtpExtension{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *flowGtpv1FlowGtpExtensionIter) Items() []FlowGtpExtension { + return obj.flowGtpExtensionSlice +} + +func (obj *flowGtpv1FlowGtpExtensionIter) Add() FlowGtpExtension { + newObj := &otg.FlowGtpExtension{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flowGtpExtension{obj: newObj} + newLibObj.setDefault() + obj.flowGtpExtensionSlice = append(obj.flowGtpExtensionSlice, newLibObj) + return newLibObj +} + +func (obj *flowGtpv1FlowGtpExtensionIter) Append(items ...FlowGtpExtension) FlowGtpv1FlowGtpExtensionIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowGtpExtensionSlice = append(obj.flowGtpExtensionSlice, item) + } + return obj +} + +func (obj *flowGtpv1FlowGtpExtensionIter) Set(index int, newObj FlowGtpExtension) FlowGtpv1FlowGtpExtensionIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowGtpExtensionSlice[index] = newObj + return obj +} +func (obj *flowGtpv1FlowGtpExtensionIter) Clear() FlowGtpv1FlowGtpExtensionIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.FlowGtpExtension{} + obj.flowGtpExtensionSlice = []FlowGtpExtension{} + } + return obj +} +func (obj *flowGtpv1FlowGtpExtensionIter) clearHolderSlice() FlowGtpv1FlowGtpExtensionIter { + if len(obj.flowGtpExtensionSlice) > 0 { + obj.flowGtpExtensionSlice = []FlowGtpExtension{} + } + return obj +} +func (obj *flowGtpv1FlowGtpExtensionIter) appendHolderSlice(item FlowGtpExtension) FlowGtpv1FlowGtpExtensionIter { + obj.flowGtpExtensionSlice = append(obj.flowGtpExtensionSlice, item) + return obj +} + +func (obj *flowGtpv1) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Version != nil { + + obj.Version().validateObj(vObj, set_default) + } + + if obj.obj.ProtocolType != nil { + + obj.ProtocolType().validateObj(vObj, set_default) + } + + if obj.obj.Reserved != nil { + + obj.Reserved().validateObj(vObj, set_default) + } + + if obj.obj.EFlag != nil { + + obj.EFlag().validateObj(vObj, set_default) + } + + if obj.obj.SFlag != nil { + + obj.SFlag().validateObj(vObj, set_default) + } + + if obj.obj.PnFlag != nil { + + obj.PnFlag().validateObj(vObj, set_default) + } + + if obj.obj.MessageType != nil { + + obj.MessageType().validateObj(vObj, set_default) + } + + if obj.obj.MessageLength != nil { + + obj.MessageLength().validateObj(vObj, set_default) + } + + if obj.obj.Teid != nil { + + obj.Teid().validateObj(vObj, set_default) + } + + if obj.obj.SquenceNumber != nil { + + obj.SquenceNumber().validateObj(vObj, set_default) + } + + if obj.obj.NPduNumber != nil { + + obj.NPduNumber().validateObj(vObj, set_default) + } + + if obj.obj.NextExtensionHeaderType != nil { + + obj.NextExtensionHeaderType().validateObj(vObj, set_default) + } + + if len(obj.obj.ExtensionHeaders) != 0 { + + if set_default { + obj.ExtensionHeaders().clearHolderSlice() + for _, item := range obj.obj.ExtensionHeaders { + obj.ExtensionHeaders().appendHolderSlice(&flowGtpExtension{obj: item}) + } + } + for _, item := range obj.ExtensionHeaders().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *flowGtpv1) setDefault() { + +} diff --git a/gosnappi/flow_gtpv2.go b/gosnappi/flow_gtpv2.go new file mode 100644 index 00000000..18437265 --- /dev/null +++ b/gosnappi/flow_gtpv2.go @@ -0,0 +1,672 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowGtpv2 ***** +type flowGtpv2 struct { + validation + obj *otg.FlowGtpv2 + marshaller marshalFlowGtpv2 + unMarshaller unMarshalFlowGtpv2 + versionHolder PatternFlowGtpv2Version + piggybackingFlagHolder PatternFlowGtpv2PiggybackingFlag + teidFlagHolder PatternFlowGtpv2TeidFlag + spare1Holder PatternFlowGtpv2Spare1 + messageTypeHolder PatternFlowGtpv2MessageType + messageLengthHolder PatternFlowGtpv2MessageLength + teidHolder PatternFlowGtpv2Teid + sequenceNumberHolder PatternFlowGtpv2SequenceNumber + spare2Holder PatternFlowGtpv2Spare2 +} + +func NewFlowGtpv2() FlowGtpv2 { + obj := flowGtpv2{obj: &otg.FlowGtpv2{}} + obj.setDefault() + return &obj +} + +func (obj *flowGtpv2) msg() *otg.FlowGtpv2 { + return obj.obj +} + +func (obj *flowGtpv2) setMsg(msg *otg.FlowGtpv2) FlowGtpv2 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowGtpv2 struct { + obj *flowGtpv2 +} + +type marshalFlowGtpv2 interface { + // ToProto marshals FlowGtpv2 to protobuf object *otg.FlowGtpv2 + ToProto() (*otg.FlowGtpv2, error) + // ToPbText marshals FlowGtpv2 to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowGtpv2 to YAML text + ToYaml() (string, error) + // ToJson marshals FlowGtpv2 to JSON text + ToJson() (string, error) +} + +type unMarshalflowGtpv2 struct { + obj *flowGtpv2 +} + +type unMarshalFlowGtpv2 interface { + // FromProto unmarshals FlowGtpv2 from protobuf object *otg.FlowGtpv2 + FromProto(msg *otg.FlowGtpv2) (FlowGtpv2, error) + // FromPbText unmarshals FlowGtpv2 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowGtpv2 from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowGtpv2 from JSON text + FromJson(value string) error +} + +func (obj *flowGtpv2) Marshal() marshalFlowGtpv2 { + if obj.marshaller == nil { + obj.marshaller = &marshalflowGtpv2{obj: obj} + } + return obj.marshaller +} + +func (obj *flowGtpv2) Unmarshal() unMarshalFlowGtpv2 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowGtpv2{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowGtpv2) ToProto() (*otg.FlowGtpv2, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowGtpv2) FromProto(msg *otg.FlowGtpv2) (FlowGtpv2, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowGtpv2) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowGtpv2) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowGtpv2) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowGtpv2) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowGtpv2) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowGtpv2) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowGtpv2) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowGtpv2) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowGtpv2) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowGtpv2) Clone() (FlowGtpv2, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowGtpv2() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowGtpv2) setNil() { + obj.versionHolder = nil + obj.piggybackingFlagHolder = nil + obj.teidFlagHolder = nil + obj.spare1Holder = nil + obj.messageTypeHolder = nil + obj.messageLengthHolder = nil + obj.teidHolder = nil + obj.sequenceNumberHolder = nil + obj.spare2Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowGtpv2 is gTPv2 packet header +type FlowGtpv2 interface { + Validation + // msg marshals FlowGtpv2 to protobuf object *otg.FlowGtpv2 + // and doesn't set defaults + msg() *otg.FlowGtpv2 + // setMsg unmarshals FlowGtpv2 from protobuf object *otg.FlowGtpv2 + // and doesn't set defaults + setMsg(*otg.FlowGtpv2) FlowGtpv2 + // provides marshal interface + Marshal() marshalFlowGtpv2 + // provides unmarshal interface + Unmarshal() unMarshalFlowGtpv2 + // validate validates FlowGtpv2 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowGtpv2, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Version returns PatternFlowGtpv2Version, set in FlowGtpv2. + // PatternFlowGtpv2Version is version number + Version() PatternFlowGtpv2Version + // SetVersion assigns PatternFlowGtpv2Version provided by user to FlowGtpv2. + // PatternFlowGtpv2Version is version number + SetVersion(value PatternFlowGtpv2Version) FlowGtpv2 + // HasVersion checks if Version has been set in FlowGtpv2 + HasVersion() bool + // PiggybackingFlag returns PatternFlowGtpv2PiggybackingFlag, set in FlowGtpv2. + // PatternFlowGtpv2PiggybackingFlag is if piggybacking_flag is set to 1 then another GTP-C message with its own header shall be present at the end of the current message + PiggybackingFlag() PatternFlowGtpv2PiggybackingFlag + // SetPiggybackingFlag assigns PatternFlowGtpv2PiggybackingFlag provided by user to FlowGtpv2. + // PatternFlowGtpv2PiggybackingFlag is if piggybacking_flag is set to 1 then another GTP-C message with its own header shall be present at the end of the current message + SetPiggybackingFlag(value PatternFlowGtpv2PiggybackingFlag) FlowGtpv2 + // HasPiggybackingFlag checks if PiggybackingFlag has been set in FlowGtpv2 + HasPiggybackingFlag() bool + // TeidFlag returns PatternFlowGtpv2TeidFlag, set in FlowGtpv2. + // PatternFlowGtpv2TeidFlag is if teid_flag is set to 1 then the TEID field will be present between the message length and the sequence number. All messages except Echo and Echo reply require TEID to be present + TeidFlag() PatternFlowGtpv2TeidFlag + // SetTeidFlag assigns PatternFlowGtpv2TeidFlag provided by user to FlowGtpv2. + // PatternFlowGtpv2TeidFlag is if teid_flag is set to 1 then the TEID field will be present between the message length and the sequence number. All messages except Echo and Echo reply require TEID to be present + SetTeidFlag(value PatternFlowGtpv2TeidFlag) FlowGtpv2 + // HasTeidFlag checks if TeidFlag has been set in FlowGtpv2 + HasTeidFlag() bool + // Spare1 returns PatternFlowGtpv2Spare1, set in FlowGtpv2. + // PatternFlowGtpv2Spare1 is a 3-bit reserved field (must be 0). + Spare1() PatternFlowGtpv2Spare1 + // SetSpare1 assigns PatternFlowGtpv2Spare1 provided by user to FlowGtpv2. + // PatternFlowGtpv2Spare1 is a 3-bit reserved field (must be 0). + SetSpare1(value PatternFlowGtpv2Spare1) FlowGtpv2 + // HasSpare1 checks if Spare1 has been set in FlowGtpv2 + HasSpare1() bool + // MessageType returns PatternFlowGtpv2MessageType, set in FlowGtpv2. + // PatternFlowGtpv2MessageType is an 8-bit field that indicates the type of GTP message. Different types of messages are defined in 3GPP TS 29.060 section 7.1 + MessageType() PatternFlowGtpv2MessageType + // SetMessageType assigns PatternFlowGtpv2MessageType provided by user to FlowGtpv2. + // PatternFlowGtpv2MessageType is an 8-bit field that indicates the type of GTP message. Different types of messages are defined in 3GPP TS 29.060 section 7.1 + SetMessageType(value PatternFlowGtpv2MessageType) FlowGtpv2 + // HasMessageType checks if MessageType has been set in FlowGtpv2 + HasMessageType() bool + // MessageLength returns PatternFlowGtpv2MessageLength, set in FlowGtpv2. + // PatternFlowGtpv2MessageLength is a 16-bit field that indicates the length of the payload in bytes, excluding the mandatory GTP-c header (first 4 bytes). Includes the TEID and sequence_number if they are present. + MessageLength() PatternFlowGtpv2MessageLength + // SetMessageLength assigns PatternFlowGtpv2MessageLength provided by user to FlowGtpv2. + // PatternFlowGtpv2MessageLength is a 16-bit field that indicates the length of the payload in bytes, excluding the mandatory GTP-c header (first 4 bytes). Includes the TEID and sequence_number if they are present. + SetMessageLength(value PatternFlowGtpv2MessageLength) FlowGtpv2 + // HasMessageLength checks if MessageLength has been set in FlowGtpv2 + HasMessageLength() bool + // Teid returns PatternFlowGtpv2Teid, set in FlowGtpv2. + // PatternFlowGtpv2Teid is tunnel endpoint identifier. A 32-bit (4-octet) field used to multiplex different connections in the same GTP tunnel. Is present only if the teid_flag is set. + Teid() PatternFlowGtpv2Teid + // SetTeid assigns PatternFlowGtpv2Teid provided by user to FlowGtpv2. + // PatternFlowGtpv2Teid is tunnel endpoint identifier. A 32-bit (4-octet) field used to multiplex different connections in the same GTP tunnel. Is present only if the teid_flag is set. + SetTeid(value PatternFlowGtpv2Teid) FlowGtpv2 + // HasTeid checks if Teid has been set in FlowGtpv2 + HasTeid() bool + // SequenceNumber returns PatternFlowGtpv2SequenceNumber, set in FlowGtpv2. + // PatternFlowGtpv2SequenceNumber is the sequence number + SequenceNumber() PatternFlowGtpv2SequenceNumber + // SetSequenceNumber assigns PatternFlowGtpv2SequenceNumber provided by user to FlowGtpv2. + // PatternFlowGtpv2SequenceNumber is the sequence number + SetSequenceNumber(value PatternFlowGtpv2SequenceNumber) FlowGtpv2 + // HasSequenceNumber checks if SequenceNumber has been set in FlowGtpv2 + HasSequenceNumber() bool + // Spare2 returns PatternFlowGtpv2Spare2, set in FlowGtpv2. + // PatternFlowGtpv2Spare2 is reserved field + Spare2() PatternFlowGtpv2Spare2 + // SetSpare2 assigns PatternFlowGtpv2Spare2 provided by user to FlowGtpv2. + // PatternFlowGtpv2Spare2 is reserved field + SetSpare2(value PatternFlowGtpv2Spare2) FlowGtpv2 + // HasSpare2 checks if Spare2 has been set in FlowGtpv2 + HasSpare2() bool + setNil() +} + +// description is TBD +// Version returns a PatternFlowGtpv2Version +func (obj *flowGtpv2) Version() PatternFlowGtpv2Version { + if obj.obj.Version == nil { + obj.obj.Version = NewPatternFlowGtpv2Version().msg() + } + if obj.versionHolder == nil { + obj.versionHolder = &patternFlowGtpv2Version{obj: obj.obj.Version} + } + return obj.versionHolder +} + +// description is TBD +// Version returns a PatternFlowGtpv2Version +func (obj *flowGtpv2) HasVersion() bool { + return obj.obj.Version != nil +} + +// description is TBD +// SetVersion sets the PatternFlowGtpv2Version value in the FlowGtpv2 object +func (obj *flowGtpv2) SetVersion(value PatternFlowGtpv2Version) FlowGtpv2 { + + obj.versionHolder = nil + obj.obj.Version = value.msg() + + return obj +} + +// description is TBD +// PiggybackingFlag returns a PatternFlowGtpv2PiggybackingFlag +func (obj *flowGtpv2) PiggybackingFlag() PatternFlowGtpv2PiggybackingFlag { + if obj.obj.PiggybackingFlag == nil { + obj.obj.PiggybackingFlag = NewPatternFlowGtpv2PiggybackingFlag().msg() + } + if obj.piggybackingFlagHolder == nil { + obj.piggybackingFlagHolder = &patternFlowGtpv2PiggybackingFlag{obj: obj.obj.PiggybackingFlag} + } + return obj.piggybackingFlagHolder +} + +// description is TBD +// PiggybackingFlag returns a PatternFlowGtpv2PiggybackingFlag +func (obj *flowGtpv2) HasPiggybackingFlag() bool { + return obj.obj.PiggybackingFlag != nil +} + +// description is TBD +// SetPiggybackingFlag sets the PatternFlowGtpv2PiggybackingFlag value in the FlowGtpv2 object +func (obj *flowGtpv2) SetPiggybackingFlag(value PatternFlowGtpv2PiggybackingFlag) FlowGtpv2 { + + obj.piggybackingFlagHolder = nil + obj.obj.PiggybackingFlag = value.msg() + + return obj +} + +// description is TBD +// TeidFlag returns a PatternFlowGtpv2TeidFlag +func (obj *flowGtpv2) TeidFlag() PatternFlowGtpv2TeidFlag { + if obj.obj.TeidFlag == nil { + obj.obj.TeidFlag = NewPatternFlowGtpv2TeidFlag().msg() + } + if obj.teidFlagHolder == nil { + obj.teidFlagHolder = &patternFlowGtpv2TeidFlag{obj: obj.obj.TeidFlag} + } + return obj.teidFlagHolder +} + +// description is TBD +// TeidFlag returns a PatternFlowGtpv2TeidFlag +func (obj *flowGtpv2) HasTeidFlag() bool { + return obj.obj.TeidFlag != nil +} + +// description is TBD +// SetTeidFlag sets the PatternFlowGtpv2TeidFlag value in the FlowGtpv2 object +func (obj *flowGtpv2) SetTeidFlag(value PatternFlowGtpv2TeidFlag) FlowGtpv2 { + + obj.teidFlagHolder = nil + obj.obj.TeidFlag = value.msg() + + return obj +} + +// description is TBD +// Spare1 returns a PatternFlowGtpv2Spare1 +func (obj *flowGtpv2) Spare1() PatternFlowGtpv2Spare1 { + if obj.obj.Spare1 == nil { + obj.obj.Spare1 = NewPatternFlowGtpv2Spare1().msg() + } + if obj.spare1Holder == nil { + obj.spare1Holder = &patternFlowGtpv2Spare1{obj: obj.obj.Spare1} + } + return obj.spare1Holder +} + +// description is TBD +// Spare1 returns a PatternFlowGtpv2Spare1 +func (obj *flowGtpv2) HasSpare1() bool { + return obj.obj.Spare1 != nil +} + +// description is TBD +// SetSpare1 sets the PatternFlowGtpv2Spare1 value in the FlowGtpv2 object +func (obj *flowGtpv2) SetSpare1(value PatternFlowGtpv2Spare1) FlowGtpv2 { + + obj.spare1Holder = nil + obj.obj.Spare1 = value.msg() + + return obj +} + +// description is TBD +// MessageType returns a PatternFlowGtpv2MessageType +func (obj *flowGtpv2) MessageType() PatternFlowGtpv2MessageType { + if obj.obj.MessageType == nil { + obj.obj.MessageType = NewPatternFlowGtpv2MessageType().msg() + } + if obj.messageTypeHolder == nil { + obj.messageTypeHolder = &patternFlowGtpv2MessageType{obj: obj.obj.MessageType} + } + return obj.messageTypeHolder +} + +// description is TBD +// MessageType returns a PatternFlowGtpv2MessageType +func (obj *flowGtpv2) HasMessageType() bool { + return obj.obj.MessageType != nil +} + +// description is TBD +// SetMessageType sets the PatternFlowGtpv2MessageType value in the FlowGtpv2 object +func (obj *flowGtpv2) SetMessageType(value PatternFlowGtpv2MessageType) FlowGtpv2 { + + obj.messageTypeHolder = nil + obj.obj.MessageType = value.msg() + + return obj +} + +// description is TBD +// MessageLength returns a PatternFlowGtpv2MessageLength +func (obj *flowGtpv2) MessageLength() PatternFlowGtpv2MessageLength { + if obj.obj.MessageLength == nil { + obj.obj.MessageLength = NewPatternFlowGtpv2MessageLength().msg() + } + if obj.messageLengthHolder == nil { + obj.messageLengthHolder = &patternFlowGtpv2MessageLength{obj: obj.obj.MessageLength} + } + return obj.messageLengthHolder +} + +// description is TBD +// MessageLength returns a PatternFlowGtpv2MessageLength +func (obj *flowGtpv2) HasMessageLength() bool { + return obj.obj.MessageLength != nil +} + +// description is TBD +// SetMessageLength sets the PatternFlowGtpv2MessageLength value in the FlowGtpv2 object +func (obj *flowGtpv2) SetMessageLength(value PatternFlowGtpv2MessageLength) FlowGtpv2 { + + obj.messageLengthHolder = nil + obj.obj.MessageLength = value.msg() + + return obj +} + +// description is TBD +// Teid returns a PatternFlowGtpv2Teid +func (obj *flowGtpv2) Teid() PatternFlowGtpv2Teid { + if obj.obj.Teid == nil { + obj.obj.Teid = NewPatternFlowGtpv2Teid().msg() + } + if obj.teidHolder == nil { + obj.teidHolder = &patternFlowGtpv2Teid{obj: obj.obj.Teid} + } + return obj.teidHolder +} + +// description is TBD +// Teid returns a PatternFlowGtpv2Teid +func (obj *flowGtpv2) HasTeid() bool { + return obj.obj.Teid != nil +} + +// description is TBD +// SetTeid sets the PatternFlowGtpv2Teid value in the FlowGtpv2 object +func (obj *flowGtpv2) SetTeid(value PatternFlowGtpv2Teid) FlowGtpv2 { + + obj.teidHolder = nil + obj.obj.Teid = value.msg() + + return obj +} + +// description is TBD +// SequenceNumber returns a PatternFlowGtpv2SequenceNumber +func (obj *flowGtpv2) SequenceNumber() PatternFlowGtpv2SequenceNumber { + if obj.obj.SequenceNumber == nil { + obj.obj.SequenceNumber = NewPatternFlowGtpv2SequenceNumber().msg() + } + if obj.sequenceNumberHolder == nil { + obj.sequenceNumberHolder = &patternFlowGtpv2SequenceNumber{obj: obj.obj.SequenceNumber} + } + return obj.sequenceNumberHolder +} + +// description is TBD +// SequenceNumber returns a PatternFlowGtpv2SequenceNumber +func (obj *flowGtpv2) HasSequenceNumber() bool { + return obj.obj.SequenceNumber != nil +} + +// description is TBD +// SetSequenceNumber sets the PatternFlowGtpv2SequenceNumber value in the FlowGtpv2 object +func (obj *flowGtpv2) SetSequenceNumber(value PatternFlowGtpv2SequenceNumber) FlowGtpv2 { + + obj.sequenceNumberHolder = nil + obj.obj.SequenceNumber = value.msg() + + return obj +} + +// description is TBD +// Spare2 returns a PatternFlowGtpv2Spare2 +func (obj *flowGtpv2) Spare2() PatternFlowGtpv2Spare2 { + if obj.obj.Spare2 == nil { + obj.obj.Spare2 = NewPatternFlowGtpv2Spare2().msg() + } + if obj.spare2Holder == nil { + obj.spare2Holder = &patternFlowGtpv2Spare2{obj: obj.obj.Spare2} + } + return obj.spare2Holder +} + +// description is TBD +// Spare2 returns a PatternFlowGtpv2Spare2 +func (obj *flowGtpv2) HasSpare2() bool { + return obj.obj.Spare2 != nil +} + +// description is TBD +// SetSpare2 sets the PatternFlowGtpv2Spare2 value in the FlowGtpv2 object +func (obj *flowGtpv2) SetSpare2(value PatternFlowGtpv2Spare2) FlowGtpv2 { + + obj.spare2Holder = nil + obj.obj.Spare2 = value.msg() + + return obj +} + +func (obj *flowGtpv2) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Version != nil { + + obj.Version().validateObj(vObj, set_default) + } + + if obj.obj.PiggybackingFlag != nil { + + obj.PiggybackingFlag().validateObj(vObj, set_default) + } + + if obj.obj.TeidFlag != nil { + + obj.TeidFlag().validateObj(vObj, set_default) + } + + if obj.obj.Spare1 != nil { + + obj.Spare1().validateObj(vObj, set_default) + } + + if obj.obj.MessageType != nil { + + obj.MessageType().validateObj(vObj, set_default) + } + + if obj.obj.MessageLength != nil { + + obj.MessageLength().validateObj(vObj, set_default) + } + + if obj.obj.Teid != nil { + + obj.Teid().validateObj(vObj, set_default) + } + + if obj.obj.SequenceNumber != nil { + + obj.SequenceNumber().validateObj(vObj, set_default) + } + + if obj.obj.Spare2 != nil { + + obj.Spare2().validateObj(vObj, set_default) + } + +} + +func (obj *flowGtpv2) setDefault() { + +} diff --git a/gosnappi/flow_header.go b/gosnappi/flow_header.go new file mode 100644 index 00000000..f4e2020a --- /dev/null +++ b/gosnappi/flow_header.go @@ -0,0 +1,1515 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowHeader ***** +type flowHeader struct { + validation + obj *otg.FlowHeader + marshaller marshalFlowHeader + unMarshaller unMarshalFlowHeader + customHolder FlowCustom + ethernetHolder FlowEthernet + vlanHolder FlowVlan + vxlanHolder FlowVxlan + ipv4Holder FlowIpv4 + ipv6Holder FlowIpv6 + pfcpauseHolder FlowPfcPause + ethernetpauseHolder FlowEthernetPause + tcpHolder FlowTcp + udpHolder FlowUdp + greHolder FlowGre + gtpv1Holder FlowGtpv1 + gtpv2Holder FlowGtpv2 + arpHolder FlowArp + icmpHolder FlowIcmp + icmpv6Holder FlowIcmpv6 + pppHolder FlowPpp + igmpv1Holder FlowIgmpv1 + mplsHolder FlowMpls + snmpv2CHolder FlowSnmpv2C + rsvpHolder FlowRsvp +} + +func NewFlowHeader() FlowHeader { + obj := flowHeader{obj: &otg.FlowHeader{}} + obj.setDefault() + return &obj +} + +func (obj *flowHeader) msg() *otg.FlowHeader { + return obj.obj +} + +func (obj *flowHeader) setMsg(msg *otg.FlowHeader) FlowHeader { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowHeader struct { + obj *flowHeader +} + +type marshalFlowHeader interface { + // ToProto marshals FlowHeader to protobuf object *otg.FlowHeader + ToProto() (*otg.FlowHeader, error) + // ToPbText marshals FlowHeader to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowHeader to YAML text + ToYaml() (string, error) + // ToJson marshals FlowHeader to JSON text + ToJson() (string, error) +} + +type unMarshalflowHeader struct { + obj *flowHeader +} + +type unMarshalFlowHeader interface { + // FromProto unmarshals FlowHeader from protobuf object *otg.FlowHeader + FromProto(msg *otg.FlowHeader) (FlowHeader, error) + // FromPbText unmarshals FlowHeader from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowHeader from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowHeader from JSON text + FromJson(value string) error +} + +func (obj *flowHeader) Marshal() marshalFlowHeader { + if obj.marshaller == nil { + obj.marshaller = &marshalflowHeader{obj: obj} + } + return obj.marshaller +} + +func (obj *flowHeader) Unmarshal() unMarshalFlowHeader { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowHeader{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowHeader) ToProto() (*otg.FlowHeader, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowHeader) FromProto(msg *otg.FlowHeader) (FlowHeader, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowHeader) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowHeader) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowHeader) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowHeader) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowHeader) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowHeader) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowHeader) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowHeader) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowHeader) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowHeader) Clone() (FlowHeader, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowHeader() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowHeader) setNil() { + obj.customHolder = nil + obj.ethernetHolder = nil + obj.vlanHolder = nil + obj.vxlanHolder = nil + obj.ipv4Holder = nil + obj.ipv6Holder = nil + obj.pfcpauseHolder = nil + obj.ethernetpauseHolder = nil + obj.tcpHolder = nil + obj.udpHolder = nil + obj.greHolder = nil + obj.gtpv1Holder = nil + obj.gtpv2Holder = nil + obj.arpHolder = nil + obj.icmpHolder = nil + obj.icmpv6Holder = nil + obj.pppHolder = nil + obj.igmpv1Holder = nil + obj.mplsHolder = nil + obj.snmpv2CHolder = nil + obj.rsvpHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowHeader is configuration for all traffic packet headers +type FlowHeader interface { + Validation + // msg marshals FlowHeader to protobuf object *otg.FlowHeader + // and doesn't set defaults + msg() *otg.FlowHeader + // setMsg unmarshals FlowHeader from protobuf object *otg.FlowHeader + // and doesn't set defaults + setMsg(*otg.FlowHeader) FlowHeader + // provides marshal interface + Marshal() marshalFlowHeader + // provides unmarshal interface + Unmarshal() unMarshalFlowHeader + // validate validates FlowHeader + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowHeader, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowHeaderChoiceEnum, set in FlowHeader + Choice() FlowHeaderChoiceEnum + // setChoice assigns FlowHeaderChoiceEnum provided by user to FlowHeader + setChoice(value FlowHeaderChoiceEnum) FlowHeader + // HasChoice checks if Choice has been set in FlowHeader + HasChoice() bool + // Custom returns FlowCustom, set in FlowHeader. + // FlowCustom is custom packet header + Custom() FlowCustom + // SetCustom assigns FlowCustom provided by user to FlowHeader. + // FlowCustom is custom packet header + SetCustom(value FlowCustom) FlowHeader + // HasCustom checks if Custom has been set in FlowHeader + HasCustom() bool + // Ethernet returns FlowEthernet, set in FlowHeader. + // FlowEthernet is ethernet packet header + Ethernet() FlowEthernet + // SetEthernet assigns FlowEthernet provided by user to FlowHeader. + // FlowEthernet is ethernet packet header + SetEthernet(value FlowEthernet) FlowHeader + // HasEthernet checks if Ethernet has been set in FlowHeader + HasEthernet() bool + // Vlan returns FlowVlan, set in FlowHeader. + // FlowVlan is vLAN packet header + Vlan() FlowVlan + // SetVlan assigns FlowVlan provided by user to FlowHeader. + // FlowVlan is vLAN packet header + SetVlan(value FlowVlan) FlowHeader + // HasVlan checks if Vlan has been set in FlowHeader + HasVlan() bool + // Vxlan returns FlowVxlan, set in FlowHeader. + // FlowVxlan is vXLAN packet header + Vxlan() FlowVxlan + // SetVxlan assigns FlowVxlan provided by user to FlowHeader. + // FlowVxlan is vXLAN packet header + SetVxlan(value FlowVxlan) FlowHeader + // HasVxlan checks if Vxlan has been set in FlowHeader + HasVxlan() bool + // Ipv4 returns FlowIpv4, set in FlowHeader. + // FlowIpv4 is iPv4 packet header + Ipv4() FlowIpv4 + // SetIpv4 assigns FlowIpv4 provided by user to FlowHeader. + // FlowIpv4 is iPv4 packet header + SetIpv4(value FlowIpv4) FlowHeader + // HasIpv4 checks if Ipv4 has been set in FlowHeader + HasIpv4() bool + // Ipv6 returns FlowIpv6, set in FlowHeader. + // FlowIpv6 is iPv6 packet header + Ipv6() FlowIpv6 + // SetIpv6 assigns FlowIpv6 provided by user to FlowHeader. + // FlowIpv6 is iPv6 packet header + SetIpv6(value FlowIpv6) FlowHeader + // HasIpv6 checks if Ipv6 has been set in FlowHeader + HasIpv6() bool + // Pfcpause returns FlowPfcPause, set in FlowHeader. + // FlowPfcPause is iEEE 802.1Qbb PFC Pause packet header. + Pfcpause() FlowPfcPause + // SetPfcpause assigns FlowPfcPause provided by user to FlowHeader. + // FlowPfcPause is iEEE 802.1Qbb PFC Pause packet header. + SetPfcpause(value FlowPfcPause) FlowHeader + // HasPfcpause checks if Pfcpause has been set in FlowHeader + HasPfcpause() bool + // Ethernetpause returns FlowEthernetPause, set in FlowHeader. + // FlowEthernetPause is iEEE 802.3x global ethernet pause packet header + Ethernetpause() FlowEthernetPause + // SetEthernetpause assigns FlowEthernetPause provided by user to FlowHeader. + // FlowEthernetPause is iEEE 802.3x global ethernet pause packet header + SetEthernetpause(value FlowEthernetPause) FlowHeader + // HasEthernetpause checks if Ethernetpause has been set in FlowHeader + HasEthernetpause() bool + // Tcp returns FlowTcp, set in FlowHeader. + // FlowTcp is tCP packet header + Tcp() FlowTcp + // SetTcp assigns FlowTcp provided by user to FlowHeader. + // FlowTcp is tCP packet header + SetTcp(value FlowTcp) FlowHeader + // HasTcp checks if Tcp has been set in FlowHeader + HasTcp() bool + // Udp returns FlowUdp, set in FlowHeader. + // FlowUdp is uDP packet header + Udp() FlowUdp + // SetUdp assigns FlowUdp provided by user to FlowHeader. + // FlowUdp is uDP packet header + SetUdp(value FlowUdp) FlowHeader + // HasUdp checks if Udp has been set in FlowHeader + HasUdp() bool + // Gre returns FlowGre, set in FlowHeader. + // FlowGre is standard GRE packet header (RFC2784) + Gre() FlowGre + // SetGre assigns FlowGre provided by user to FlowHeader. + // FlowGre is standard GRE packet header (RFC2784) + SetGre(value FlowGre) FlowHeader + // HasGre checks if Gre has been set in FlowHeader + HasGre() bool + // Gtpv1 returns FlowGtpv1, set in FlowHeader. + // FlowGtpv1 is gTPv1 packet header + Gtpv1() FlowGtpv1 + // SetGtpv1 assigns FlowGtpv1 provided by user to FlowHeader. + // FlowGtpv1 is gTPv1 packet header + SetGtpv1(value FlowGtpv1) FlowHeader + // HasGtpv1 checks if Gtpv1 has been set in FlowHeader + HasGtpv1() bool + // Gtpv2 returns FlowGtpv2, set in FlowHeader. + // FlowGtpv2 is gTPv2 packet header + Gtpv2() FlowGtpv2 + // SetGtpv2 assigns FlowGtpv2 provided by user to FlowHeader. + // FlowGtpv2 is gTPv2 packet header + SetGtpv2(value FlowGtpv2) FlowHeader + // HasGtpv2 checks if Gtpv2 has been set in FlowHeader + HasGtpv2() bool + // Arp returns FlowArp, set in FlowHeader. + // FlowArp is aRP packet header + Arp() FlowArp + // SetArp assigns FlowArp provided by user to FlowHeader. + // FlowArp is aRP packet header + SetArp(value FlowArp) FlowHeader + // HasArp checks if Arp has been set in FlowHeader + HasArp() bool + // Icmp returns FlowIcmp, set in FlowHeader. + // FlowIcmp is iCMP packet header + Icmp() FlowIcmp + // SetIcmp assigns FlowIcmp provided by user to FlowHeader. + // FlowIcmp is iCMP packet header + SetIcmp(value FlowIcmp) FlowHeader + // HasIcmp checks if Icmp has been set in FlowHeader + HasIcmp() bool + // Icmpv6 returns FlowIcmpv6, set in FlowHeader. + // FlowIcmpv6 is iCMPv6 packet header + Icmpv6() FlowIcmpv6 + // SetIcmpv6 assigns FlowIcmpv6 provided by user to FlowHeader. + // FlowIcmpv6 is iCMPv6 packet header + SetIcmpv6(value FlowIcmpv6) FlowHeader + // HasIcmpv6 checks if Icmpv6 has been set in FlowHeader + HasIcmpv6() bool + // Ppp returns FlowPpp, set in FlowHeader. + // FlowPpp is pPP packet header + Ppp() FlowPpp + // SetPpp assigns FlowPpp provided by user to FlowHeader. + // FlowPpp is pPP packet header + SetPpp(value FlowPpp) FlowHeader + // HasPpp checks if Ppp has been set in FlowHeader + HasPpp() bool + // Igmpv1 returns FlowIgmpv1, set in FlowHeader. + // FlowIgmpv1 is iGMPv1 packet header + Igmpv1() FlowIgmpv1 + // SetIgmpv1 assigns FlowIgmpv1 provided by user to FlowHeader. + // FlowIgmpv1 is iGMPv1 packet header + SetIgmpv1(value FlowIgmpv1) FlowHeader + // HasIgmpv1 checks if Igmpv1 has been set in FlowHeader + HasIgmpv1() bool + // Mpls returns FlowMpls, set in FlowHeader. + // FlowMpls is mPLS packet header; When configuring multiple such headers, the count shall not exceed 20. + Mpls() FlowMpls + // SetMpls assigns FlowMpls provided by user to FlowHeader. + // FlowMpls is mPLS packet header; When configuring multiple such headers, the count shall not exceed 20. + SetMpls(value FlowMpls) FlowHeader + // HasMpls checks if Mpls has been set in FlowHeader + HasMpls() bool + // Snmpv2C returns FlowSnmpv2C, set in FlowHeader. + Snmpv2C() FlowSnmpv2C + // SetSnmpv2C assigns FlowSnmpv2C provided by user to FlowHeader. + SetSnmpv2C(value FlowSnmpv2C) FlowHeader + // HasSnmpv2C checks if Snmpv2C has been set in FlowHeader + HasSnmpv2C() bool + // Rsvp returns FlowRsvp, set in FlowHeader. + // FlowRsvp is rSVP packet header as defined in RFC2205 and RFC3209. Currently only supported message type is "Path" with mandatory objects and sub-objects. + Rsvp() FlowRsvp + // SetRsvp assigns FlowRsvp provided by user to FlowHeader. + // FlowRsvp is rSVP packet header as defined in RFC2205 and RFC3209. Currently only supported message type is "Path" with mandatory objects and sub-objects. + SetRsvp(value FlowRsvp) FlowHeader + // HasRsvp checks if Rsvp has been set in FlowHeader + HasRsvp() bool + setNil() +} + +type FlowHeaderChoiceEnum string + +// Enum of Choice on FlowHeader +var FlowHeaderChoice = struct { + CUSTOM FlowHeaderChoiceEnum + ETHERNET FlowHeaderChoiceEnum + VLAN FlowHeaderChoiceEnum + VXLAN FlowHeaderChoiceEnum + IPV4 FlowHeaderChoiceEnum + IPV6 FlowHeaderChoiceEnum + PFCPAUSE FlowHeaderChoiceEnum + ETHERNETPAUSE FlowHeaderChoiceEnum + TCP FlowHeaderChoiceEnum + UDP FlowHeaderChoiceEnum + GRE FlowHeaderChoiceEnum + GTPV1 FlowHeaderChoiceEnum + GTPV2 FlowHeaderChoiceEnum + ARP FlowHeaderChoiceEnum + ICMP FlowHeaderChoiceEnum + ICMPV6 FlowHeaderChoiceEnum + PPP FlowHeaderChoiceEnum + IGMPV1 FlowHeaderChoiceEnum + MPLS FlowHeaderChoiceEnum + SNMPV2C FlowHeaderChoiceEnum + RSVP FlowHeaderChoiceEnum +}{ + CUSTOM: FlowHeaderChoiceEnum("custom"), + ETHERNET: FlowHeaderChoiceEnum("ethernet"), + VLAN: FlowHeaderChoiceEnum("vlan"), + VXLAN: FlowHeaderChoiceEnum("vxlan"), + IPV4: FlowHeaderChoiceEnum("ipv4"), + IPV6: FlowHeaderChoiceEnum("ipv6"), + PFCPAUSE: FlowHeaderChoiceEnum("pfcpause"), + ETHERNETPAUSE: FlowHeaderChoiceEnum("ethernetpause"), + TCP: FlowHeaderChoiceEnum("tcp"), + UDP: FlowHeaderChoiceEnum("udp"), + GRE: FlowHeaderChoiceEnum("gre"), + GTPV1: FlowHeaderChoiceEnum("gtpv1"), + GTPV2: FlowHeaderChoiceEnum("gtpv2"), + ARP: FlowHeaderChoiceEnum("arp"), + ICMP: FlowHeaderChoiceEnum("icmp"), + ICMPV6: FlowHeaderChoiceEnum("icmpv6"), + PPP: FlowHeaderChoiceEnum("ppp"), + IGMPV1: FlowHeaderChoiceEnum("igmpv1"), + MPLS: FlowHeaderChoiceEnum("mpls"), + SNMPV2C: FlowHeaderChoiceEnum("snmpv2c"), + RSVP: FlowHeaderChoiceEnum("rsvp"), +} + +func (obj *flowHeader) Choice() FlowHeaderChoiceEnum { + return FlowHeaderChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The available types of flow headers. If one is not provided the +// default ethernet packet header MUST be provided. +// Choice returns a string +func (obj *flowHeader) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowHeader) setChoice(value FlowHeaderChoiceEnum) FlowHeader { + intValue, ok := otg.FlowHeader_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowHeaderChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowHeader_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Rsvp = nil + obj.rsvpHolder = nil + obj.obj.Snmpv2C = nil + obj.snmpv2CHolder = nil + obj.obj.Mpls = nil + obj.mplsHolder = nil + obj.obj.Igmpv1 = nil + obj.igmpv1Holder = nil + obj.obj.Ppp = nil + obj.pppHolder = nil + obj.obj.Icmpv6 = nil + obj.icmpv6Holder = nil + obj.obj.Icmp = nil + obj.icmpHolder = nil + obj.obj.Arp = nil + obj.arpHolder = nil + obj.obj.Gtpv2 = nil + obj.gtpv2Holder = nil + obj.obj.Gtpv1 = nil + obj.gtpv1Holder = nil + obj.obj.Gre = nil + obj.greHolder = nil + obj.obj.Udp = nil + obj.udpHolder = nil + obj.obj.Tcp = nil + obj.tcpHolder = nil + obj.obj.Ethernetpause = nil + obj.ethernetpauseHolder = nil + obj.obj.Pfcpause = nil + obj.pfcpauseHolder = nil + obj.obj.Ipv6 = nil + obj.ipv6Holder = nil + obj.obj.Ipv4 = nil + obj.ipv4Holder = nil + obj.obj.Vxlan = nil + obj.vxlanHolder = nil + obj.obj.Vlan = nil + obj.vlanHolder = nil + obj.obj.Ethernet = nil + obj.ethernetHolder = nil + obj.obj.Custom = nil + obj.customHolder = nil + + if value == FlowHeaderChoice.CUSTOM { + obj.obj.Custom = NewFlowCustom().msg() + } + + if value == FlowHeaderChoice.ETHERNET { + obj.obj.Ethernet = NewFlowEthernet().msg() + } + + if value == FlowHeaderChoice.VLAN { + obj.obj.Vlan = NewFlowVlan().msg() + } + + if value == FlowHeaderChoice.VXLAN { + obj.obj.Vxlan = NewFlowVxlan().msg() + } + + if value == FlowHeaderChoice.IPV4 { + obj.obj.Ipv4 = NewFlowIpv4().msg() + } + + if value == FlowHeaderChoice.IPV6 { + obj.obj.Ipv6 = NewFlowIpv6().msg() + } + + if value == FlowHeaderChoice.PFCPAUSE { + obj.obj.Pfcpause = NewFlowPfcPause().msg() + } + + if value == FlowHeaderChoice.ETHERNETPAUSE { + obj.obj.Ethernetpause = NewFlowEthernetPause().msg() + } + + if value == FlowHeaderChoice.TCP { + obj.obj.Tcp = NewFlowTcp().msg() + } + + if value == FlowHeaderChoice.UDP { + obj.obj.Udp = NewFlowUdp().msg() + } + + if value == FlowHeaderChoice.GRE { + obj.obj.Gre = NewFlowGre().msg() + } + + if value == FlowHeaderChoice.GTPV1 { + obj.obj.Gtpv1 = NewFlowGtpv1().msg() + } + + if value == FlowHeaderChoice.GTPV2 { + obj.obj.Gtpv2 = NewFlowGtpv2().msg() + } + + if value == FlowHeaderChoice.ARP { + obj.obj.Arp = NewFlowArp().msg() + } + + if value == FlowHeaderChoice.ICMP { + obj.obj.Icmp = NewFlowIcmp().msg() + } + + if value == FlowHeaderChoice.ICMPV6 { + obj.obj.Icmpv6 = NewFlowIcmpv6().msg() + } + + if value == FlowHeaderChoice.PPP { + obj.obj.Ppp = NewFlowPpp().msg() + } + + if value == FlowHeaderChoice.IGMPV1 { + obj.obj.Igmpv1 = NewFlowIgmpv1().msg() + } + + if value == FlowHeaderChoice.MPLS { + obj.obj.Mpls = NewFlowMpls().msg() + } + + if value == FlowHeaderChoice.SNMPV2C { + obj.obj.Snmpv2C = NewFlowSnmpv2C().msg() + } + + if value == FlowHeaderChoice.RSVP { + obj.obj.Rsvp = NewFlowRsvp().msg() + } + + return obj +} + +// description is TBD +// Custom returns a FlowCustom +func (obj *flowHeader) Custom() FlowCustom { + if obj.obj.Custom == nil { + obj.setChoice(FlowHeaderChoice.CUSTOM) + } + if obj.customHolder == nil { + obj.customHolder = &flowCustom{obj: obj.obj.Custom} + } + return obj.customHolder +} + +// description is TBD +// Custom returns a FlowCustom +func (obj *flowHeader) HasCustom() bool { + return obj.obj.Custom != nil +} + +// description is TBD +// SetCustom sets the FlowCustom value in the FlowHeader object +func (obj *flowHeader) SetCustom(value FlowCustom) FlowHeader { + obj.setChoice(FlowHeaderChoice.CUSTOM) + obj.customHolder = nil + obj.obj.Custom = value.msg() + + return obj +} + +// description is TBD +// Ethernet returns a FlowEthernet +func (obj *flowHeader) Ethernet() FlowEthernet { + if obj.obj.Ethernet == nil { + obj.setChoice(FlowHeaderChoice.ETHERNET) + } + if obj.ethernetHolder == nil { + obj.ethernetHolder = &flowEthernet{obj: obj.obj.Ethernet} + } + return obj.ethernetHolder +} + +// description is TBD +// Ethernet returns a FlowEthernet +func (obj *flowHeader) HasEthernet() bool { + return obj.obj.Ethernet != nil +} + +// description is TBD +// SetEthernet sets the FlowEthernet value in the FlowHeader object +func (obj *flowHeader) SetEthernet(value FlowEthernet) FlowHeader { + obj.setChoice(FlowHeaderChoice.ETHERNET) + obj.ethernetHolder = nil + obj.obj.Ethernet = value.msg() + + return obj +} + +// description is TBD +// Vlan returns a FlowVlan +func (obj *flowHeader) Vlan() FlowVlan { + if obj.obj.Vlan == nil { + obj.setChoice(FlowHeaderChoice.VLAN) + } + if obj.vlanHolder == nil { + obj.vlanHolder = &flowVlan{obj: obj.obj.Vlan} + } + return obj.vlanHolder +} + +// description is TBD +// Vlan returns a FlowVlan +func (obj *flowHeader) HasVlan() bool { + return obj.obj.Vlan != nil +} + +// description is TBD +// SetVlan sets the FlowVlan value in the FlowHeader object +func (obj *flowHeader) SetVlan(value FlowVlan) FlowHeader { + obj.setChoice(FlowHeaderChoice.VLAN) + obj.vlanHolder = nil + obj.obj.Vlan = value.msg() + + return obj +} + +// description is TBD +// Vxlan returns a FlowVxlan +func (obj *flowHeader) Vxlan() FlowVxlan { + if obj.obj.Vxlan == nil { + obj.setChoice(FlowHeaderChoice.VXLAN) + } + if obj.vxlanHolder == nil { + obj.vxlanHolder = &flowVxlan{obj: obj.obj.Vxlan} + } + return obj.vxlanHolder +} + +// description is TBD +// Vxlan returns a FlowVxlan +func (obj *flowHeader) HasVxlan() bool { + return obj.obj.Vxlan != nil +} + +// description is TBD +// SetVxlan sets the FlowVxlan value in the FlowHeader object +func (obj *flowHeader) SetVxlan(value FlowVxlan) FlowHeader { + obj.setChoice(FlowHeaderChoice.VXLAN) + obj.vxlanHolder = nil + obj.obj.Vxlan = value.msg() + + return obj +} + +// description is TBD +// Ipv4 returns a FlowIpv4 +func (obj *flowHeader) Ipv4() FlowIpv4 { + if obj.obj.Ipv4 == nil { + obj.setChoice(FlowHeaderChoice.IPV4) + } + if obj.ipv4Holder == nil { + obj.ipv4Holder = &flowIpv4{obj: obj.obj.Ipv4} + } + return obj.ipv4Holder +} + +// description is TBD +// Ipv4 returns a FlowIpv4 +func (obj *flowHeader) HasIpv4() bool { + return obj.obj.Ipv4 != nil +} + +// description is TBD +// SetIpv4 sets the FlowIpv4 value in the FlowHeader object +func (obj *flowHeader) SetIpv4(value FlowIpv4) FlowHeader { + obj.setChoice(FlowHeaderChoice.IPV4) + obj.ipv4Holder = nil + obj.obj.Ipv4 = value.msg() + + return obj +} + +// description is TBD +// Ipv6 returns a FlowIpv6 +func (obj *flowHeader) Ipv6() FlowIpv6 { + if obj.obj.Ipv6 == nil { + obj.setChoice(FlowHeaderChoice.IPV6) + } + if obj.ipv6Holder == nil { + obj.ipv6Holder = &flowIpv6{obj: obj.obj.Ipv6} + } + return obj.ipv6Holder +} + +// description is TBD +// Ipv6 returns a FlowIpv6 +func (obj *flowHeader) HasIpv6() bool { + return obj.obj.Ipv6 != nil +} + +// description is TBD +// SetIpv6 sets the FlowIpv6 value in the FlowHeader object +func (obj *flowHeader) SetIpv6(value FlowIpv6) FlowHeader { + obj.setChoice(FlowHeaderChoice.IPV6) + obj.ipv6Holder = nil + obj.obj.Ipv6 = value.msg() + + return obj +} + +// description is TBD +// Pfcpause returns a FlowPfcPause +func (obj *flowHeader) Pfcpause() FlowPfcPause { + if obj.obj.Pfcpause == nil { + obj.setChoice(FlowHeaderChoice.PFCPAUSE) + } + if obj.pfcpauseHolder == nil { + obj.pfcpauseHolder = &flowPfcPause{obj: obj.obj.Pfcpause} + } + return obj.pfcpauseHolder +} + +// description is TBD +// Pfcpause returns a FlowPfcPause +func (obj *flowHeader) HasPfcpause() bool { + return obj.obj.Pfcpause != nil +} + +// description is TBD +// SetPfcpause sets the FlowPfcPause value in the FlowHeader object +func (obj *flowHeader) SetPfcpause(value FlowPfcPause) FlowHeader { + obj.setChoice(FlowHeaderChoice.PFCPAUSE) + obj.pfcpauseHolder = nil + obj.obj.Pfcpause = value.msg() + + return obj +} + +// description is TBD +// Ethernetpause returns a FlowEthernetPause +func (obj *flowHeader) Ethernetpause() FlowEthernetPause { + if obj.obj.Ethernetpause == nil { + obj.setChoice(FlowHeaderChoice.ETHERNETPAUSE) + } + if obj.ethernetpauseHolder == nil { + obj.ethernetpauseHolder = &flowEthernetPause{obj: obj.obj.Ethernetpause} + } + return obj.ethernetpauseHolder +} + +// description is TBD +// Ethernetpause returns a FlowEthernetPause +func (obj *flowHeader) HasEthernetpause() bool { + return obj.obj.Ethernetpause != nil +} + +// description is TBD +// SetEthernetpause sets the FlowEthernetPause value in the FlowHeader object +func (obj *flowHeader) SetEthernetpause(value FlowEthernetPause) FlowHeader { + obj.setChoice(FlowHeaderChoice.ETHERNETPAUSE) + obj.ethernetpauseHolder = nil + obj.obj.Ethernetpause = value.msg() + + return obj +} + +// description is TBD +// Tcp returns a FlowTcp +func (obj *flowHeader) Tcp() FlowTcp { + if obj.obj.Tcp == nil { + obj.setChoice(FlowHeaderChoice.TCP) + } + if obj.tcpHolder == nil { + obj.tcpHolder = &flowTcp{obj: obj.obj.Tcp} + } + return obj.tcpHolder +} + +// description is TBD +// Tcp returns a FlowTcp +func (obj *flowHeader) HasTcp() bool { + return obj.obj.Tcp != nil +} + +// description is TBD +// SetTcp sets the FlowTcp value in the FlowHeader object +func (obj *flowHeader) SetTcp(value FlowTcp) FlowHeader { + obj.setChoice(FlowHeaderChoice.TCP) + obj.tcpHolder = nil + obj.obj.Tcp = value.msg() + + return obj +} + +// description is TBD +// Udp returns a FlowUdp +func (obj *flowHeader) Udp() FlowUdp { + if obj.obj.Udp == nil { + obj.setChoice(FlowHeaderChoice.UDP) + } + if obj.udpHolder == nil { + obj.udpHolder = &flowUdp{obj: obj.obj.Udp} + } + return obj.udpHolder +} + +// description is TBD +// Udp returns a FlowUdp +func (obj *flowHeader) HasUdp() bool { + return obj.obj.Udp != nil +} + +// description is TBD +// SetUdp sets the FlowUdp value in the FlowHeader object +func (obj *flowHeader) SetUdp(value FlowUdp) FlowHeader { + obj.setChoice(FlowHeaderChoice.UDP) + obj.udpHolder = nil + obj.obj.Udp = value.msg() + + return obj +} + +// description is TBD +// Gre returns a FlowGre +func (obj *flowHeader) Gre() FlowGre { + if obj.obj.Gre == nil { + obj.setChoice(FlowHeaderChoice.GRE) + } + if obj.greHolder == nil { + obj.greHolder = &flowGre{obj: obj.obj.Gre} + } + return obj.greHolder +} + +// description is TBD +// Gre returns a FlowGre +func (obj *flowHeader) HasGre() bool { + return obj.obj.Gre != nil +} + +// description is TBD +// SetGre sets the FlowGre value in the FlowHeader object +func (obj *flowHeader) SetGre(value FlowGre) FlowHeader { + obj.setChoice(FlowHeaderChoice.GRE) + obj.greHolder = nil + obj.obj.Gre = value.msg() + + return obj +} + +// description is TBD +// Gtpv1 returns a FlowGtpv1 +func (obj *flowHeader) Gtpv1() FlowGtpv1 { + if obj.obj.Gtpv1 == nil { + obj.setChoice(FlowHeaderChoice.GTPV1) + } + if obj.gtpv1Holder == nil { + obj.gtpv1Holder = &flowGtpv1{obj: obj.obj.Gtpv1} + } + return obj.gtpv1Holder +} + +// description is TBD +// Gtpv1 returns a FlowGtpv1 +func (obj *flowHeader) HasGtpv1() bool { + return obj.obj.Gtpv1 != nil +} + +// description is TBD +// SetGtpv1 sets the FlowGtpv1 value in the FlowHeader object +func (obj *flowHeader) SetGtpv1(value FlowGtpv1) FlowHeader { + obj.setChoice(FlowHeaderChoice.GTPV1) + obj.gtpv1Holder = nil + obj.obj.Gtpv1 = value.msg() + + return obj +} + +// description is TBD +// Gtpv2 returns a FlowGtpv2 +func (obj *flowHeader) Gtpv2() FlowGtpv2 { + if obj.obj.Gtpv2 == nil { + obj.setChoice(FlowHeaderChoice.GTPV2) + } + if obj.gtpv2Holder == nil { + obj.gtpv2Holder = &flowGtpv2{obj: obj.obj.Gtpv2} + } + return obj.gtpv2Holder +} + +// description is TBD +// Gtpv2 returns a FlowGtpv2 +func (obj *flowHeader) HasGtpv2() bool { + return obj.obj.Gtpv2 != nil +} + +// description is TBD +// SetGtpv2 sets the FlowGtpv2 value in the FlowHeader object +func (obj *flowHeader) SetGtpv2(value FlowGtpv2) FlowHeader { + obj.setChoice(FlowHeaderChoice.GTPV2) + obj.gtpv2Holder = nil + obj.obj.Gtpv2 = value.msg() + + return obj +} + +// description is TBD +// Arp returns a FlowArp +func (obj *flowHeader) Arp() FlowArp { + if obj.obj.Arp == nil { + obj.setChoice(FlowHeaderChoice.ARP) + } + if obj.arpHolder == nil { + obj.arpHolder = &flowArp{obj: obj.obj.Arp} + } + return obj.arpHolder +} + +// description is TBD +// Arp returns a FlowArp +func (obj *flowHeader) HasArp() bool { + return obj.obj.Arp != nil +} + +// description is TBD +// SetArp sets the FlowArp value in the FlowHeader object +func (obj *flowHeader) SetArp(value FlowArp) FlowHeader { + obj.setChoice(FlowHeaderChoice.ARP) + obj.arpHolder = nil + obj.obj.Arp = value.msg() + + return obj +} + +// description is TBD +// Icmp returns a FlowIcmp +func (obj *flowHeader) Icmp() FlowIcmp { + if obj.obj.Icmp == nil { + obj.setChoice(FlowHeaderChoice.ICMP) + } + if obj.icmpHolder == nil { + obj.icmpHolder = &flowIcmp{obj: obj.obj.Icmp} + } + return obj.icmpHolder +} + +// description is TBD +// Icmp returns a FlowIcmp +func (obj *flowHeader) HasIcmp() bool { + return obj.obj.Icmp != nil +} + +// description is TBD +// SetIcmp sets the FlowIcmp value in the FlowHeader object +func (obj *flowHeader) SetIcmp(value FlowIcmp) FlowHeader { + obj.setChoice(FlowHeaderChoice.ICMP) + obj.icmpHolder = nil + obj.obj.Icmp = value.msg() + + return obj +} + +// description is TBD +// Icmpv6 returns a FlowIcmpv6 +func (obj *flowHeader) Icmpv6() FlowIcmpv6 { + if obj.obj.Icmpv6 == nil { + obj.setChoice(FlowHeaderChoice.ICMPV6) + } + if obj.icmpv6Holder == nil { + obj.icmpv6Holder = &flowIcmpv6{obj: obj.obj.Icmpv6} + } + return obj.icmpv6Holder +} + +// description is TBD +// Icmpv6 returns a FlowIcmpv6 +func (obj *flowHeader) HasIcmpv6() bool { + return obj.obj.Icmpv6 != nil +} + +// description is TBD +// SetIcmpv6 sets the FlowIcmpv6 value in the FlowHeader object +func (obj *flowHeader) SetIcmpv6(value FlowIcmpv6) FlowHeader { + obj.setChoice(FlowHeaderChoice.ICMPV6) + obj.icmpv6Holder = nil + obj.obj.Icmpv6 = value.msg() + + return obj +} + +// description is TBD +// Ppp returns a FlowPpp +func (obj *flowHeader) Ppp() FlowPpp { + if obj.obj.Ppp == nil { + obj.setChoice(FlowHeaderChoice.PPP) + } + if obj.pppHolder == nil { + obj.pppHolder = &flowPpp{obj: obj.obj.Ppp} + } + return obj.pppHolder +} + +// description is TBD +// Ppp returns a FlowPpp +func (obj *flowHeader) HasPpp() bool { + return obj.obj.Ppp != nil +} + +// description is TBD +// SetPpp sets the FlowPpp value in the FlowHeader object +func (obj *flowHeader) SetPpp(value FlowPpp) FlowHeader { + obj.setChoice(FlowHeaderChoice.PPP) + obj.pppHolder = nil + obj.obj.Ppp = value.msg() + + return obj +} + +// description is TBD +// Igmpv1 returns a FlowIgmpv1 +func (obj *flowHeader) Igmpv1() FlowIgmpv1 { + if obj.obj.Igmpv1 == nil { + obj.setChoice(FlowHeaderChoice.IGMPV1) + } + if obj.igmpv1Holder == nil { + obj.igmpv1Holder = &flowIgmpv1{obj: obj.obj.Igmpv1} + } + return obj.igmpv1Holder +} + +// description is TBD +// Igmpv1 returns a FlowIgmpv1 +func (obj *flowHeader) HasIgmpv1() bool { + return obj.obj.Igmpv1 != nil +} + +// description is TBD +// SetIgmpv1 sets the FlowIgmpv1 value in the FlowHeader object +func (obj *flowHeader) SetIgmpv1(value FlowIgmpv1) FlowHeader { + obj.setChoice(FlowHeaderChoice.IGMPV1) + obj.igmpv1Holder = nil + obj.obj.Igmpv1 = value.msg() + + return obj +} + +// description is TBD +// Mpls returns a FlowMpls +func (obj *flowHeader) Mpls() FlowMpls { + if obj.obj.Mpls == nil { + obj.setChoice(FlowHeaderChoice.MPLS) + } + if obj.mplsHolder == nil { + obj.mplsHolder = &flowMpls{obj: obj.obj.Mpls} + } + return obj.mplsHolder +} + +// description is TBD +// Mpls returns a FlowMpls +func (obj *flowHeader) HasMpls() bool { + return obj.obj.Mpls != nil +} + +// description is TBD +// SetMpls sets the FlowMpls value in the FlowHeader object +func (obj *flowHeader) SetMpls(value FlowMpls) FlowHeader { + obj.setChoice(FlowHeaderChoice.MPLS) + obj.mplsHolder = nil + obj.obj.Mpls = value.msg() + + return obj +} + +// description is TBD +// Snmpv2C returns a FlowSnmpv2C +func (obj *flowHeader) Snmpv2C() FlowSnmpv2C { + if obj.obj.Snmpv2C == nil { + obj.setChoice(FlowHeaderChoice.SNMPV2C) + } + if obj.snmpv2CHolder == nil { + obj.snmpv2CHolder = &flowSnmpv2C{obj: obj.obj.Snmpv2C} + } + return obj.snmpv2CHolder +} + +// description is TBD +// Snmpv2C returns a FlowSnmpv2C +func (obj *flowHeader) HasSnmpv2C() bool { + return obj.obj.Snmpv2C != nil +} + +// description is TBD +// SetSnmpv2C sets the FlowSnmpv2C value in the FlowHeader object +func (obj *flowHeader) SetSnmpv2C(value FlowSnmpv2C) FlowHeader { + obj.setChoice(FlowHeaderChoice.SNMPV2C) + obj.snmpv2CHolder = nil + obj.obj.Snmpv2C = value.msg() + + return obj +} + +// description is TBD +// Rsvp returns a FlowRsvp +func (obj *flowHeader) Rsvp() FlowRsvp { + if obj.obj.Rsvp == nil { + obj.setChoice(FlowHeaderChoice.RSVP) + } + if obj.rsvpHolder == nil { + obj.rsvpHolder = &flowRsvp{obj: obj.obj.Rsvp} + } + return obj.rsvpHolder +} + +// description is TBD +// Rsvp returns a FlowRsvp +func (obj *flowHeader) HasRsvp() bool { + return obj.obj.Rsvp != nil +} + +// description is TBD +// SetRsvp sets the FlowRsvp value in the FlowHeader object +func (obj *flowHeader) SetRsvp(value FlowRsvp) FlowHeader { + obj.setChoice(FlowHeaderChoice.RSVP) + obj.rsvpHolder = nil + obj.obj.Rsvp = value.msg() + + return obj +} + +func (obj *flowHeader) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Custom != nil { + + obj.Custom().validateObj(vObj, set_default) + } + + if obj.obj.Ethernet != nil { + + obj.Ethernet().validateObj(vObj, set_default) + } + + if obj.obj.Vlan != nil { + + obj.Vlan().validateObj(vObj, set_default) + } + + if obj.obj.Vxlan != nil { + + obj.Vxlan().validateObj(vObj, set_default) + } + + if obj.obj.Ipv4 != nil { + + obj.Ipv4().validateObj(vObj, set_default) + } + + if obj.obj.Ipv6 != nil { + + obj.Ipv6().validateObj(vObj, set_default) + } + + if obj.obj.Pfcpause != nil { + + obj.Pfcpause().validateObj(vObj, set_default) + } + + if obj.obj.Ethernetpause != nil { + + obj.Ethernetpause().validateObj(vObj, set_default) + } + + if obj.obj.Tcp != nil { + + obj.Tcp().validateObj(vObj, set_default) + } + + if obj.obj.Udp != nil { + + obj.Udp().validateObj(vObj, set_default) + } + + if obj.obj.Gre != nil { + + obj.Gre().validateObj(vObj, set_default) + } + + if obj.obj.Gtpv1 != nil { + + obj.Gtpv1().validateObj(vObj, set_default) + } + + if obj.obj.Gtpv2 != nil { + + obj.Gtpv2().validateObj(vObj, set_default) + } + + if obj.obj.Arp != nil { + + obj.Arp().validateObj(vObj, set_default) + } + + if obj.obj.Icmp != nil { + + obj.Icmp().validateObj(vObj, set_default) + } + + if obj.obj.Icmpv6 != nil { + + obj.Icmpv6().validateObj(vObj, set_default) + } + + if obj.obj.Ppp != nil { + + obj.Ppp().validateObj(vObj, set_default) + } + + if obj.obj.Igmpv1 != nil { + + obj.Igmpv1().validateObj(vObj, set_default) + } + + if obj.obj.Mpls != nil { + + obj.Mpls().validateObj(vObj, set_default) + } + + if obj.obj.Snmpv2C != nil { + + obj.Snmpv2C().validateObj(vObj, set_default) + } + + if obj.obj.Rsvp != nil { + + obj.Rsvp().validateObj(vObj, set_default) + } + +} + +func (obj *flowHeader) setDefault() { + var choices_set int = 0 + var choice FlowHeaderChoiceEnum + + if obj.obj.Custom != nil { + choices_set += 1 + choice = FlowHeaderChoice.CUSTOM + } + + if obj.obj.Ethernet != nil { + choices_set += 1 + choice = FlowHeaderChoice.ETHERNET + } + + if obj.obj.Vlan != nil { + choices_set += 1 + choice = FlowHeaderChoice.VLAN + } + + if obj.obj.Vxlan != nil { + choices_set += 1 + choice = FlowHeaderChoice.VXLAN + } + + if obj.obj.Ipv4 != nil { + choices_set += 1 + choice = FlowHeaderChoice.IPV4 + } + + if obj.obj.Ipv6 != nil { + choices_set += 1 + choice = FlowHeaderChoice.IPV6 + } + + if obj.obj.Pfcpause != nil { + choices_set += 1 + choice = FlowHeaderChoice.PFCPAUSE + } + + if obj.obj.Ethernetpause != nil { + choices_set += 1 + choice = FlowHeaderChoice.ETHERNETPAUSE + } + + if obj.obj.Tcp != nil { + choices_set += 1 + choice = FlowHeaderChoice.TCP + } + + if obj.obj.Udp != nil { + choices_set += 1 + choice = FlowHeaderChoice.UDP + } + + if obj.obj.Gre != nil { + choices_set += 1 + choice = FlowHeaderChoice.GRE + } + + if obj.obj.Gtpv1 != nil { + choices_set += 1 + choice = FlowHeaderChoice.GTPV1 + } + + if obj.obj.Gtpv2 != nil { + choices_set += 1 + choice = FlowHeaderChoice.GTPV2 + } + + if obj.obj.Arp != nil { + choices_set += 1 + choice = FlowHeaderChoice.ARP + } + + if obj.obj.Icmp != nil { + choices_set += 1 + choice = FlowHeaderChoice.ICMP + } + + if obj.obj.Icmpv6 != nil { + choices_set += 1 + choice = FlowHeaderChoice.ICMPV6 + } + + if obj.obj.Ppp != nil { + choices_set += 1 + choice = FlowHeaderChoice.PPP + } + + if obj.obj.Igmpv1 != nil { + choices_set += 1 + choice = FlowHeaderChoice.IGMPV1 + } + + if obj.obj.Mpls != nil { + choices_set += 1 + choice = FlowHeaderChoice.MPLS + } + + if obj.obj.Snmpv2C != nil { + choices_set += 1 + choice = FlowHeaderChoice.SNMPV2C + } + + if obj.obj.Rsvp != nil { + choices_set += 1 + choice = FlowHeaderChoice.RSVP + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowHeaderChoice.ETHERNET) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowHeader") + } + } else { + intVal := otg.FlowHeader_Choice_Enum_value[string(choice)] + enumValue := otg.FlowHeader_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_icmp.go b/gosnappi/flow_icmp.go new file mode 100644 index 00000000..5e86943d --- /dev/null +++ b/gosnappi/flow_icmp.go @@ -0,0 +1,396 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIcmp ***** +type flowIcmp struct { + validation + obj *otg.FlowIcmp + marshaller marshalFlowIcmp + unMarshaller unMarshalFlowIcmp + echoHolder FlowIcmpEcho +} + +func NewFlowIcmp() FlowIcmp { + obj := flowIcmp{obj: &otg.FlowIcmp{}} + obj.setDefault() + return &obj +} + +func (obj *flowIcmp) msg() *otg.FlowIcmp { + return obj.obj +} + +func (obj *flowIcmp) setMsg(msg *otg.FlowIcmp) FlowIcmp { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIcmp struct { + obj *flowIcmp +} + +type marshalFlowIcmp interface { + // ToProto marshals FlowIcmp to protobuf object *otg.FlowIcmp + ToProto() (*otg.FlowIcmp, error) + // ToPbText marshals FlowIcmp to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIcmp to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIcmp to JSON text + ToJson() (string, error) +} + +type unMarshalflowIcmp struct { + obj *flowIcmp +} + +type unMarshalFlowIcmp interface { + // FromProto unmarshals FlowIcmp from protobuf object *otg.FlowIcmp + FromProto(msg *otg.FlowIcmp) (FlowIcmp, error) + // FromPbText unmarshals FlowIcmp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIcmp from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIcmp from JSON text + FromJson(value string) error +} + +func (obj *flowIcmp) Marshal() marshalFlowIcmp { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIcmp{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIcmp) Unmarshal() unMarshalFlowIcmp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIcmp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIcmp) ToProto() (*otg.FlowIcmp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIcmp) FromProto(msg *otg.FlowIcmp) (FlowIcmp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIcmp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIcmp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIcmp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIcmp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIcmp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIcmp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIcmp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIcmp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIcmp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIcmp) Clone() (FlowIcmp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIcmp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowIcmp) setNil() { + obj.echoHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowIcmp is iCMP packet header +type FlowIcmp interface { + Validation + // msg marshals FlowIcmp to protobuf object *otg.FlowIcmp + // and doesn't set defaults + msg() *otg.FlowIcmp + // setMsg unmarshals FlowIcmp from protobuf object *otg.FlowIcmp + // and doesn't set defaults + setMsg(*otg.FlowIcmp) FlowIcmp + // provides marshal interface + Marshal() marshalFlowIcmp + // provides unmarshal interface + Unmarshal() unMarshalFlowIcmp + // validate validates FlowIcmp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIcmp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowIcmpChoiceEnum, set in FlowIcmp + Choice() FlowIcmpChoiceEnum + // setChoice assigns FlowIcmpChoiceEnum provided by user to FlowIcmp + setChoice(value FlowIcmpChoiceEnum) FlowIcmp + // HasChoice checks if Choice has been set in FlowIcmp + HasChoice() bool + // Echo returns FlowIcmpEcho, set in FlowIcmp. + // FlowIcmpEcho is packet Header for ICMP echo request + Echo() FlowIcmpEcho + // SetEcho assigns FlowIcmpEcho provided by user to FlowIcmp. + // FlowIcmpEcho is packet Header for ICMP echo request + SetEcho(value FlowIcmpEcho) FlowIcmp + // HasEcho checks if Echo has been set in FlowIcmp + HasEcho() bool + setNil() +} + +type FlowIcmpChoiceEnum string + +// Enum of Choice on FlowIcmp +var FlowIcmpChoice = struct { + ECHO FlowIcmpChoiceEnum +}{ + ECHO: FlowIcmpChoiceEnum("echo"), +} + +func (obj *flowIcmp) Choice() FlowIcmpChoiceEnum { + return FlowIcmpChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowIcmp) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowIcmp) setChoice(value FlowIcmpChoiceEnum) FlowIcmp { + intValue, ok := otg.FlowIcmp_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowIcmpChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowIcmp_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Echo = nil + obj.echoHolder = nil + + if value == FlowIcmpChoice.ECHO { + obj.obj.Echo = NewFlowIcmpEcho().msg() + } + + return obj +} + +// description is TBD +// Echo returns a FlowIcmpEcho +func (obj *flowIcmp) Echo() FlowIcmpEcho { + if obj.obj.Echo == nil { + obj.setChoice(FlowIcmpChoice.ECHO) + } + if obj.echoHolder == nil { + obj.echoHolder = &flowIcmpEcho{obj: obj.obj.Echo} + } + return obj.echoHolder +} + +// description is TBD +// Echo returns a FlowIcmpEcho +func (obj *flowIcmp) HasEcho() bool { + return obj.obj.Echo != nil +} + +// description is TBD +// SetEcho sets the FlowIcmpEcho value in the FlowIcmp object +func (obj *flowIcmp) SetEcho(value FlowIcmpEcho) FlowIcmp { + obj.setChoice(FlowIcmpChoice.ECHO) + obj.echoHolder = nil + obj.obj.Echo = value.msg() + + return obj +} + +func (obj *flowIcmp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Echo != nil { + + obj.Echo().validateObj(vObj, set_default) + } + +} + +func (obj *flowIcmp) setDefault() { + var choices_set int = 0 + var choice FlowIcmpChoiceEnum + + if obj.obj.Echo != nil { + choices_set += 1 + choice = FlowIcmpChoice.ECHO + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowIcmpChoice.ECHO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowIcmp") + } + } else { + intVal := otg.FlowIcmp_Choice_Enum_value[string(choice)] + enumValue := otg.FlowIcmp_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_icmp_echo.go b/gosnappi/flow_icmp_echo.go new file mode 100644 index 00000000..f2f1a4de --- /dev/null +++ b/gosnappi/flow_icmp_echo.go @@ -0,0 +1,500 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIcmpEcho ***** +type flowIcmpEcho struct { + validation + obj *otg.FlowIcmpEcho + marshaller marshalFlowIcmpEcho + unMarshaller unMarshalFlowIcmpEcho + typeHolder PatternFlowIcmpEchoType + codeHolder PatternFlowIcmpEchoCode + checksumHolder PatternFlowIcmpEchoChecksum + identifierHolder PatternFlowIcmpEchoIdentifier + sequenceNumberHolder PatternFlowIcmpEchoSequenceNumber +} + +func NewFlowIcmpEcho() FlowIcmpEcho { + obj := flowIcmpEcho{obj: &otg.FlowIcmpEcho{}} + obj.setDefault() + return &obj +} + +func (obj *flowIcmpEcho) msg() *otg.FlowIcmpEcho { + return obj.obj +} + +func (obj *flowIcmpEcho) setMsg(msg *otg.FlowIcmpEcho) FlowIcmpEcho { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIcmpEcho struct { + obj *flowIcmpEcho +} + +type marshalFlowIcmpEcho interface { + // ToProto marshals FlowIcmpEcho to protobuf object *otg.FlowIcmpEcho + ToProto() (*otg.FlowIcmpEcho, error) + // ToPbText marshals FlowIcmpEcho to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIcmpEcho to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIcmpEcho to JSON text + ToJson() (string, error) +} + +type unMarshalflowIcmpEcho struct { + obj *flowIcmpEcho +} + +type unMarshalFlowIcmpEcho interface { + // FromProto unmarshals FlowIcmpEcho from protobuf object *otg.FlowIcmpEcho + FromProto(msg *otg.FlowIcmpEcho) (FlowIcmpEcho, error) + // FromPbText unmarshals FlowIcmpEcho from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIcmpEcho from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIcmpEcho from JSON text + FromJson(value string) error +} + +func (obj *flowIcmpEcho) Marshal() marshalFlowIcmpEcho { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIcmpEcho{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIcmpEcho) Unmarshal() unMarshalFlowIcmpEcho { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIcmpEcho{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIcmpEcho) ToProto() (*otg.FlowIcmpEcho, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIcmpEcho) FromProto(msg *otg.FlowIcmpEcho) (FlowIcmpEcho, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIcmpEcho) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIcmpEcho) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIcmpEcho) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIcmpEcho) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIcmpEcho) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIcmpEcho) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIcmpEcho) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIcmpEcho) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIcmpEcho) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIcmpEcho) Clone() (FlowIcmpEcho, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIcmpEcho() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowIcmpEcho) setNil() { + obj.typeHolder = nil + obj.codeHolder = nil + obj.checksumHolder = nil + obj.identifierHolder = nil + obj.sequenceNumberHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowIcmpEcho is packet Header for ICMP echo request +type FlowIcmpEcho interface { + Validation + // msg marshals FlowIcmpEcho to protobuf object *otg.FlowIcmpEcho + // and doesn't set defaults + msg() *otg.FlowIcmpEcho + // setMsg unmarshals FlowIcmpEcho from protobuf object *otg.FlowIcmpEcho + // and doesn't set defaults + setMsg(*otg.FlowIcmpEcho) FlowIcmpEcho + // provides marshal interface + Marshal() marshalFlowIcmpEcho + // provides unmarshal interface + Unmarshal() unMarshalFlowIcmpEcho + // validate validates FlowIcmpEcho + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIcmpEcho, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns PatternFlowIcmpEchoType, set in FlowIcmpEcho. + // PatternFlowIcmpEchoType is the type of ICMP echo packet + Type() PatternFlowIcmpEchoType + // SetType assigns PatternFlowIcmpEchoType provided by user to FlowIcmpEcho. + // PatternFlowIcmpEchoType is the type of ICMP echo packet + SetType(value PatternFlowIcmpEchoType) FlowIcmpEcho + // HasType checks if Type has been set in FlowIcmpEcho + HasType() bool + // Code returns PatternFlowIcmpEchoCode, set in FlowIcmpEcho. + // PatternFlowIcmpEchoCode is the ICMP subtype. The default code for ICMP echo request and reply is 0. + Code() PatternFlowIcmpEchoCode + // SetCode assigns PatternFlowIcmpEchoCode provided by user to FlowIcmpEcho. + // PatternFlowIcmpEchoCode is the ICMP subtype. The default code for ICMP echo request and reply is 0. + SetCode(value PatternFlowIcmpEchoCode) FlowIcmpEcho + // HasCode checks if Code has been set in FlowIcmpEcho + HasCode() bool + // Checksum returns PatternFlowIcmpEchoChecksum, set in FlowIcmpEcho. + // PatternFlowIcmpEchoChecksum is iCMP checksum + Checksum() PatternFlowIcmpEchoChecksum + // SetChecksum assigns PatternFlowIcmpEchoChecksum provided by user to FlowIcmpEcho. + // PatternFlowIcmpEchoChecksum is iCMP checksum + SetChecksum(value PatternFlowIcmpEchoChecksum) FlowIcmpEcho + // HasChecksum checks if Checksum has been set in FlowIcmpEcho + HasChecksum() bool + // Identifier returns PatternFlowIcmpEchoIdentifier, set in FlowIcmpEcho. + // PatternFlowIcmpEchoIdentifier is iCMP identifier + Identifier() PatternFlowIcmpEchoIdentifier + // SetIdentifier assigns PatternFlowIcmpEchoIdentifier provided by user to FlowIcmpEcho. + // PatternFlowIcmpEchoIdentifier is iCMP identifier + SetIdentifier(value PatternFlowIcmpEchoIdentifier) FlowIcmpEcho + // HasIdentifier checks if Identifier has been set in FlowIcmpEcho + HasIdentifier() bool + // SequenceNumber returns PatternFlowIcmpEchoSequenceNumber, set in FlowIcmpEcho. + // PatternFlowIcmpEchoSequenceNumber is iCMP sequence number + SequenceNumber() PatternFlowIcmpEchoSequenceNumber + // SetSequenceNumber assigns PatternFlowIcmpEchoSequenceNumber provided by user to FlowIcmpEcho. + // PatternFlowIcmpEchoSequenceNumber is iCMP sequence number + SetSequenceNumber(value PatternFlowIcmpEchoSequenceNumber) FlowIcmpEcho + // HasSequenceNumber checks if SequenceNumber has been set in FlowIcmpEcho + HasSequenceNumber() bool + setNil() +} + +// description is TBD +// Type returns a PatternFlowIcmpEchoType +func (obj *flowIcmpEcho) Type() PatternFlowIcmpEchoType { + if obj.obj.Type == nil { + obj.obj.Type = NewPatternFlowIcmpEchoType().msg() + } + if obj.typeHolder == nil { + obj.typeHolder = &patternFlowIcmpEchoType{obj: obj.obj.Type} + } + return obj.typeHolder +} + +// description is TBD +// Type returns a PatternFlowIcmpEchoType +func (obj *flowIcmpEcho) HasType() bool { + return obj.obj.Type != nil +} + +// description is TBD +// SetType sets the PatternFlowIcmpEchoType value in the FlowIcmpEcho object +func (obj *flowIcmpEcho) SetType(value PatternFlowIcmpEchoType) FlowIcmpEcho { + + obj.typeHolder = nil + obj.obj.Type = value.msg() + + return obj +} + +// description is TBD +// Code returns a PatternFlowIcmpEchoCode +func (obj *flowIcmpEcho) Code() PatternFlowIcmpEchoCode { + if obj.obj.Code == nil { + obj.obj.Code = NewPatternFlowIcmpEchoCode().msg() + } + if obj.codeHolder == nil { + obj.codeHolder = &patternFlowIcmpEchoCode{obj: obj.obj.Code} + } + return obj.codeHolder +} + +// description is TBD +// Code returns a PatternFlowIcmpEchoCode +func (obj *flowIcmpEcho) HasCode() bool { + return obj.obj.Code != nil +} + +// description is TBD +// SetCode sets the PatternFlowIcmpEchoCode value in the FlowIcmpEcho object +func (obj *flowIcmpEcho) SetCode(value PatternFlowIcmpEchoCode) FlowIcmpEcho { + + obj.codeHolder = nil + obj.obj.Code = value.msg() + + return obj +} + +// description is TBD +// Checksum returns a PatternFlowIcmpEchoChecksum +func (obj *flowIcmpEcho) Checksum() PatternFlowIcmpEchoChecksum { + if obj.obj.Checksum == nil { + obj.obj.Checksum = NewPatternFlowIcmpEchoChecksum().msg() + } + if obj.checksumHolder == nil { + obj.checksumHolder = &patternFlowIcmpEchoChecksum{obj: obj.obj.Checksum} + } + return obj.checksumHolder +} + +// description is TBD +// Checksum returns a PatternFlowIcmpEchoChecksum +func (obj *flowIcmpEcho) HasChecksum() bool { + return obj.obj.Checksum != nil +} + +// description is TBD +// SetChecksum sets the PatternFlowIcmpEchoChecksum value in the FlowIcmpEcho object +func (obj *flowIcmpEcho) SetChecksum(value PatternFlowIcmpEchoChecksum) FlowIcmpEcho { + + obj.checksumHolder = nil + obj.obj.Checksum = value.msg() + + return obj +} + +// description is TBD +// Identifier returns a PatternFlowIcmpEchoIdentifier +func (obj *flowIcmpEcho) Identifier() PatternFlowIcmpEchoIdentifier { + if obj.obj.Identifier == nil { + obj.obj.Identifier = NewPatternFlowIcmpEchoIdentifier().msg() + } + if obj.identifierHolder == nil { + obj.identifierHolder = &patternFlowIcmpEchoIdentifier{obj: obj.obj.Identifier} + } + return obj.identifierHolder +} + +// description is TBD +// Identifier returns a PatternFlowIcmpEchoIdentifier +func (obj *flowIcmpEcho) HasIdentifier() bool { + return obj.obj.Identifier != nil +} + +// description is TBD +// SetIdentifier sets the PatternFlowIcmpEchoIdentifier value in the FlowIcmpEcho object +func (obj *flowIcmpEcho) SetIdentifier(value PatternFlowIcmpEchoIdentifier) FlowIcmpEcho { + + obj.identifierHolder = nil + obj.obj.Identifier = value.msg() + + return obj +} + +// description is TBD +// SequenceNumber returns a PatternFlowIcmpEchoSequenceNumber +func (obj *flowIcmpEcho) SequenceNumber() PatternFlowIcmpEchoSequenceNumber { + if obj.obj.SequenceNumber == nil { + obj.obj.SequenceNumber = NewPatternFlowIcmpEchoSequenceNumber().msg() + } + if obj.sequenceNumberHolder == nil { + obj.sequenceNumberHolder = &patternFlowIcmpEchoSequenceNumber{obj: obj.obj.SequenceNumber} + } + return obj.sequenceNumberHolder +} + +// description is TBD +// SequenceNumber returns a PatternFlowIcmpEchoSequenceNumber +func (obj *flowIcmpEcho) HasSequenceNumber() bool { + return obj.obj.SequenceNumber != nil +} + +// description is TBD +// SetSequenceNumber sets the PatternFlowIcmpEchoSequenceNumber value in the FlowIcmpEcho object +func (obj *flowIcmpEcho) SetSequenceNumber(value PatternFlowIcmpEchoSequenceNumber) FlowIcmpEcho { + + obj.sequenceNumberHolder = nil + obj.obj.SequenceNumber = value.msg() + + return obj +} + +func (obj *flowIcmpEcho) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Type != nil { + + obj.Type().validateObj(vObj, set_default) + } + + if obj.obj.Code != nil { + + obj.Code().validateObj(vObj, set_default) + } + + if obj.obj.Checksum != nil { + + obj.Checksum().validateObj(vObj, set_default) + } + + if obj.obj.Identifier != nil { + + obj.Identifier().validateObj(vObj, set_default) + } + + if obj.obj.SequenceNumber != nil { + + obj.SequenceNumber().validateObj(vObj, set_default) + } + +} + +func (obj *flowIcmpEcho) setDefault() { + +} diff --git a/gosnappi/flow_icmpv6.go b/gosnappi/flow_icmpv6.go new file mode 100644 index 00000000..f9dbcdc0 --- /dev/null +++ b/gosnappi/flow_icmpv6.go @@ -0,0 +1,396 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIcmpv6 ***** +type flowIcmpv6 struct { + validation + obj *otg.FlowIcmpv6 + marshaller marshalFlowIcmpv6 + unMarshaller unMarshalFlowIcmpv6 + echoHolder FlowIcmpv6Echo +} + +func NewFlowIcmpv6() FlowIcmpv6 { + obj := flowIcmpv6{obj: &otg.FlowIcmpv6{}} + obj.setDefault() + return &obj +} + +func (obj *flowIcmpv6) msg() *otg.FlowIcmpv6 { + return obj.obj +} + +func (obj *flowIcmpv6) setMsg(msg *otg.FlowIcmpv6) FlowIcmpv6 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIcmpv6 struct { + obj *flowIcmpv6 +} + +type marshalFlowIcmpv6 interface { + // ToProto marshals FlowIcmpv6 to protobuf object *otg.FlowIcmpv6 + ToProto() (*otg.FlowIcmpv6, error) + // ToPbText marshals FlowIcmpv6 to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIcmpv6 to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIcmpv6 to JSON text + ToJson() (string, error) +} + +type unMarshalflowIcmpv6 struct { + obj *flowIcmpv6 +} + +type unMarshalFlowIcmpv6 interface { + // FromProto unmarshals FlowIcmpv6 from protobuf object *otg.FlowIcmpv6 + FromProto(msg *otg.FlowIcmpv6) (FlowIcmpv6, error) + // FromPbText unmarshals FlowIcmpv6 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIcmpv6 from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIcmpv6 from JSON text + FromJson(value string) error +} + +func (obj *flowIcmpv6) Marshal() marshalFlowIcmpv6 { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIcmpv6{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIcmpv6) Unmarshal() unMarshalFlowIcmpv6 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIcmpv6{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIcmpv6) ToProto() (*otg.FlowIcmpv6, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIcmpv6) FromProto(msg *otg.FlowIcmpv6) (FlowIcmpv6, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIcmpv6) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIcmpv6) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIcmpv6) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIcmpv6) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIcmpv6) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIcmpv6) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIcmpv6) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIcmpv6) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIcmpv6) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIcmpv6) Clone() (FlowIcmpv6, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIcmpv6() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowIcmpv6) setNil() { + obj.echoHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowIcmpv6 is iCMPv6 packet header +type FlowIcmpv6 interface { + Validation + // msg marshals FlowIcmpv6 to protobuf object *otg.FlowIcmpv6 + // and doesn't set defaults + msg() *otg.FlowIcmpv6 + // setMsg unmarshals FlowIcmpv6 from protobuf object *otg.FlowIcmpv6 + // and doesn't set defaults + setMsg(*otg.FlowIcmpv6) FlowIcmpv6 + // provides marshal interface + Marshal() marshalFlowIcmpv6 + // provides unmarshal interface + Unmarshal() unMarshalFlowIcmpv6 + // validate validates FlowIcmpv6 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIcmpv6, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowIcmpv6ChoiceEnum, set in FlowIcmpv6 + Choice() FlowIcmpv6ChoiceEnum + // setChoice assigns FlowIcmpv6ChoiceEnum provided by user to FlowIcmpv6 + setChoice(value FlowIcmpv6ChoiceEnum) FlowIcmpv6 + // HasChoice checks if Choice has been set in FlowIcmpv6 + HasChoice() bool + // Echo returns FlowIcmpv6Echo, set in FlowIcmpv6. + // FlowIcmpv6Echo is packet Header for ICMPv6 Echo + Echo() FlowIcmpv6Echo + // SetEcho assigns FlowIcmpv6Echo provided by user to FlowIcmpv6. + // FlowIcmpv6Echo is packet Header for ICMPv6 Echo + SetEcho(value FlowIcmpv6Echo) FlowIcmpv6 + // HasEcho checks if Echo has been set in FlowIcmpv6 + HasEcho() bool + setNil() +} + +type FlowIcmpv6ChoiceEnum string + +// Enum of Choice on FlowIcmpv6 +var FlowIcmpv6Choice = struct { + ECHO FlowIcmpv6ChoiceEnum +}{ + ECHO: FlowIcmpv6ChoiceEnum("echo"), +} + +func (obj *flowIcmpv6) Choice() FlowIcmpv6ChoiceEnum { + return FlowIcmpv6ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowIcmpv6) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowIcmpv6) setChoice(value FlowIcmpv6ChoiceEnum) FlowIcmpv6 { + intValue, ok := otg.FlowIcmpv6_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowIcmpv6ChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowIcmpv6_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Echo = nil + obj.echoHolder = nil + + if value == FlowIcmpv6Choice.ECHO { + obj.obj.Echo = NewFlowIcmpv6Echo().msg() + } + + return obj +} + +// description is TBD +// Echo returns a FlowIcmpv6Echo +func (obj *flowIcmpv6) Echo() FlowIcmpv6Echo { + if obj.obj.Echo == nil { + obj.setChoice(FlowIcmpv6Choice.ECHO) + } + if obj.echoHolder == nil { + obj.echoHolder = &flowIcmpv6Echo{obj: obj.obj.Echo} + } + return obj.echoHolder +} + +// description is TBD +// Echo returns a FlowIcmpv6Echo +func (obj *flowIcmpv6) HasEcho() bool { + return obj.obj.Echo != nil +} + +// description is TBD +// SetEcho sets the FlowIcmpv6Echo value in the FlowIcmpv6 object +func (obj *flowIcmpv6) SetEcho(value FlowIcmpv6Echo) FlowIcmpv6 { + obj.setChoice(FlowIcmpv6Choice.ECHO) + obj.echoHolder = nil + obj.obj.Echo = value.msg() + + return obj +} + +func (obj *flowIcmpv6) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Echo != nil { + + obj.Echo().validateObj(vObj, set_default) + } + +} + +func (obj *flowIcmpv6) setDefault() { + var choices_set int = 0 + var choice FlowIcmpv6ChoiceEnum + + if obj.obj.Echo != nil { + choices_set += 1 + choice = FlowIcmpv6Choice.ECHO + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowIcmpv6Choice.ECHO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowIcmpv6") + } + } else { + intVal := otg.FlowIcmpv6_Choice_Enum_value[string(choice)] + enumValue := otg.FlowIcmpv6_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_icmpv6_echo.go b/gosnappi/flow_icmpv6_echo.go new file mode 100644 index 00000000..1c683307 --- /dev/null +++ b/gosnappi/flow_icmpv6_echo.go @@ -0,0 +1,500 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIcmpv6Echo ***** +type flowIcmpv6Echo struct { + validation + obj *otg.FlowIcmpv6Echo + marshaller marshalFlowIcmpv6Echo + unMarshaller unMarshalFlowIcmpv6Echo + typeHolder PatternFlowIcmpv6EchoType + codeHolder PatternFlowIcmpv6EchoCode + identifierHolder PatternFlowIcmpv6EchoIdentifier + sequenceNumberHolder PatternFlowIcmpv6EchoSequenceNumber + checksumHolder PatternFlowIcmpv6EchoChecksum +} + +func NewFlowIcmpv6Echo() FlowIcmpv6Echo { + obj := flowIcmpv6Echo{obj: &otg.FlowIcmpv6Echo{}} + obj.setDefault() + return &obj +} + +func (obj *flowIcmpv6Echo) msg() *otg.FlowIcmpv6Echo { + return obj.obj +} + +func (obj *flowIcmpv6Echo) setMsg(msg *otg.FlowIcmpv6Echo) FlowIcmpv6Echo { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIcmpv6Echo struct { + obj *flowIcmpv6Echo +} + +type marshalFlowIcmpv6Echo interface { + // ToProto marshals FlowIcmpv6Echo to protobuf object *otg.FlowIcmpv6Echo + ToProto() (*otg.FlowIcmpv6Echo, error) + // ToPbText marshals FlowIcmpv6Echo to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIcmpv6Echo to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIcmpv6Echo to JSON text + ToJson() (string, error) +} + +type unMarshalflowIcmpv6Echo struct { + obj *flowIcmpv6Echo +} + +type unMarshalFlowIcmpv6Echo interface { + // FromProto unmarshals FlowIcmpv6Echo from protobuf object *otg.FlowIcmpv6Echo + FromProto(msg *otg.FlowIcmpv6Echo) (FlowIcmpv6Echo, error) + // FromPbText unmarshals FlowIcmpv6Echo from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIcmpv6Echo from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIcmpv6Echo from JSON text + FromJson(value string) error +} + +func (obj *flowIcmpv6Echo) Marshal() marshalFlowIcmpv6Echo { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIcmpv6Echo{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIcmpv6Echo) Unmarshal() unMarshalFlowIcmpv6Echo { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIcmpv6Echo{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIcmpv6Echo) ToProto() (*otg.FlowIcmpv6Echo, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIcmpv6Echo) FromProto(msg *otg.FlowIcmpv6Echo) (FlowIcmpv6Echo, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIcmpv6Echo) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIcmpv6Echo) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIcmpv6Echo) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIcmpv6Echo) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIcmpv6Echo) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIcmpv6Echo) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIcmpv6Echo) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIcmpv6Echo) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIcmpv6Echo) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIcmpv6Echo) Clone() (FlowIcmpv6Echo, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIcmpv6Echo() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowIcmpv6Echo) setNil() { + obj.typeHolder = nil + obj.codeHolder = nil + obj.identifierHolder = nil + obj.sequenceNumberHolder = nil + obj.checksumHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowIcmpv6Echo is packet Header for ICMPv6 Echo +type FlowIcmpv6Echo interface { + Validation + // msg marshals FlowIcmpv6Echo to protobuf object *otg.FlowIcmpv6Echo + // and doesn't set defaults + msg() *otg.FlowIcmpv6Echo + // setMsg unmarshals FlowIcmpv6Echo from protobuf object *otg.FlowIcmpv6Echo + // and doesn't set defaults + setMsg(*otg.FlowIcmpv6Echo) FlowIcmpv6Echo + // provides marshal interface + Marshal() marshalFlowIcmpv6Echo + // provides unmarshal interface + Unmarshal() unMarshalFlowIcmpv6Echo + // validate validates FlowIcmpv6Echo + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIcmpv6Echo, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns PatternFlowIcmpv6EchoType, set in FlowIcmpv6Echo. + // PatternFlowIcmpv6EchoType is iCMPv6 echo type + Type() PatternFlowIcmpv6EchoType + // SetType assigns PatternFlowIcmpv6EchoType provided by user to FlowIcmpv6Echo. + // PatternFlowIcmpv6EchoType is iCMPv6 echo type + SetType(value PatternFlowIcmpv6EchoType) FlowIcmpv6Echo + // HasType checks if Type has been set in FlowIcmpv6Echo + HasType() bool + // Code returns PatternFlowIcmpv6EchoCode, set in FlowIcmpv6Echo. + // PatternFlowIcmpv6EchoCode is iCMPv6 echo sub type + Code() PatternFlowIcmpv6EchoCode + // SetCode assigns PatternFlowIcmpv6EchoCode provided by user to FlowIcmpv6Echo. + // PatternFlowIcmpv6EchoCode is iCMPv6 echo sub type + SetCode(value PatternFlowIcmpv6EchoCode) FlowIcmpv6Echo + // HasCode checks if Code has been set in FlowIcmpv6Echo + HasCode() bool + // Identifier returns PatternFlowIcmpv6EchoIdentifier, set in FlowIcmpv6Echo. + // PatternFlowIcmpv6EchoIdentifier is iCMPv6 echo identifier + Identifier() PatternFlowIcmpv6EchoIdentifier + // SetIdentifier assigns PatternFlowIcmpv6EchoIdentifier provided by user to FlowIcmpv6Echo. + // PatternFlowIcmpv6EchoIdentifier is iCMPv6 echo identifier + SetIdentifier(value PatternFlowIcmpv6EchoIdentifier) FlowIcmpv6Echo + // HasIdentifier checks if Identifier has been set in FlowIcmpv6Echo + HasIdentifier() bool + // SequenceNumber returns PatternFlowIcmpv6EchoSequenceNumber, set in FlowIcmpv6Echo. + // PatternFlowIcmpv6EchoSequenceNumber is iCMPv6 echo sequence number + SequenceNumber() PatternFlowIcmpv6EchoSequenceNumber + // SetSequenceNumber assigns PatternFlowIcmpv6EchoSequenceNumber provided by user to FlowIcmpv6Echo. + // PatternFlowIcmpv6EchoSequenceNumber is iCMPv6 echo sequence number + SetSequenceNumber(value PatternFlowIcmpv6EchoSequenceNumber) FlowIcmpv6Echo + // HasSequenceNumber checks if SequenceNumber has been set in FlowIcmpv6Echo + HasSequenceNumber() bool + // Checksum returns PatternFlowIcmpv6EchoChecksum, set in FlowIcmpv6Echo. + // PatternFlowIcmpv6EchoChecksum is iCMPv6 checksum + Checksum() PatternFlowIcmpv6EchoChecksum + // SetChecksum assigns PatternFlowIcmpv6EchoChecksum provided by user to FlowIcmpv6Echo. + // PatternFlowIcmpv6EchoChecksum is iCMPv6 checksum + SetChecksum(value PatternFlowIcmpv6EchoChecksum) FlowIcmpv6Echo + // HasChecksum checks if Checksum has been set in FlowIcmpv6Echo + HasChecksum() bool + setNil() +} + +// description is TBD +// Type returns a PatternFlowIcmpv6EchoType +func (obj *flowIcmpv6Echo) Type() PatternFlowIcmpv6EchoType { + if obj.obj.Type == nil { + obj.obj.Type = NewPatternFlowIcmpv6EchoType().msg() + } + if obj.typeHolder == nil { + obj.typeHolder = &patternFlowIcmpv6EchoType{obj: obj.obj.Type} + } + return obj.typeHolder +} + +// description is TBD +// Type returns a PatternFlowIcmpv6EchoType +func (obj *flowIcmpv6Echo) HasType() bool { + return obj.obj.Type != nil +} + +// description is TBD +// SetType sets the PatternFlowIcmpv6EchoType value in the FlowIcmpv6Echo object +func (obj *flowIcmpv6Echo) SetType(value PatternFlowIcmpv6EchoType) FlowIcmpv6Echo { + + obj.typeHolder = nil + obj.obj.Type = value.msg() + + return obj +} + +// description is TBD +// Code returns a PatternFlowIcmpv6EchoCode +func (obj *flowIcmpv6Echo) Code() PatternFlowIcmpv6EchoCode { + if obj.obj.Code == nil { + obj.obj.Code = NewPatternFlowIcmpv6EchoCode().msg() + } + if obj.codeHolder == nil { + obj.codeHolder = &patternFlowIcmpv6EchoCode{obj: obj.obj.Code} + } + return obj.codeHolder +} + +// description is TBD +// Code returns a PatternFlowIcmpv6EchoCode +func (obj *flowIcmpv6Echo) HasCode() bool { + return obj.obj.Code != nil +} + +// description is TBD +// SetCode sets the PatternFlowIcmpv6EchoCode value in the FlowIcmpv6Echo object +func (obj *flowIcmpv6Echo) SetCode(value PatternFlowIcmpv6EchoCode) FlowIcmpv6Echo { + + obj.codeHolder = nil + obj.obj.Code = value.msg() + + return obj +} + +// description is TBD +// Identifier returns a PatternFlowIcmpv6EchoIdentifier +func (obj *flowIcmpv6Echo) Identifier() PatternFlowIcmpv6EchoIdentifier { + if obj.obj.Identifier == nil { + obj.obj.Identifier = NewPatternFlowIcmpv6EchoIdentifier().msg() + } + if obj.identifierHolder == nil { + obj.identifierHolder = &patternFlowIcmpv6EchoIdentifier{obj: obj.obj.Identifier} + } + return obj.identifierHolder +} + +// description is TBD +// Identifier returns a PatternFlowIcmpv6EchoIdentifier +func (obj *flowIcmpv6Echo) HasIdentifier() bool { + return obj.obj.Identifier != nil +} + +// description is TBD +// SetIdentifier sets the PatternFlowIcmpv6EchoIdentifier value in the FlowIcmpv6Echo object +func (obj *flowIcmpv6Echo) SetIdentifier(value PatternFlowIcmpv6EchoIdentifier) FlowIcmpv6Echo { + + obj.identifierHolder = nil + obj.obj.Identifier = value.msg() + + return obj +} + +// description is TBD +// SequenceNumber returns a PatternFlowIcmpv6EchoSequenceNumber +func (obj *flowIcmpv6Echo) SequenceNumber() PatternFlowIcmpv6EchoSequenceNumber { + if obj.obj.SequenceNumber == nil { + obj.obj.SequenceNumber = NewPatternFlowIcmpv6EchoSequenceNumber().msg() + } + if obj.sequenceNumberHolder == nil { + obj.sequenceNumberHolder = &patternFlowIcmpv6EchoSequenceNumber{obj: obj.obj.SequenceNumber} + } + return obj.sequenceNumberHolder +} + +// description is TBD +// SequenceNumber returns a PatternFlowIcmpv6EchoSequenceNumber +func (obj *flowIcmpv6Echo) HasSequenceNumber() bool { + return obj.obj.SequenceNumber != nil +} + +// description is TBD +// SetSequenceNumber sets the PatternFlowIcmpv6EchoSequenceNumber value in the FlowIcmpv6Echo object +func (obj *flowIcmpv6Echo) SetSequenceNumber(value PatternFlowIcmpv6EchoSequenceNumber) FlowIcmpv6Echo { + + obj.sequenceNumberHolder = nil + obj.obj.SequenceNumber = value.msg() + + return obj +} + +// description is TBD +// Checksum returns a PatternFlowIcmpv6EchoChecksum +func (obj *flowIcmpv6Echo) Checksum() PatternFlowIcmpv6EchoChecksum { + if obj.obj.Checksum == nil { + obj.obj.Checksum = NewPatternFlowIcmpv6EchoChecksum().msg() + } + if obj.checksumHolder == nil { + obj.checksumHolder = &patternFlowIcmpv6EchoChecksum{obj: obj.obj.Checksum} + } + return obj.checksumHolder +} + +// description is TBD +// Checksum returns a PatternFlowIcmpv6EchoChecksum +func (obj *flowIcmpv6Echo) HasChecksum() bool { + return obj.obj.Checksum != nil +} + +// description is TBD +// SetChecksum sets the PatternFlowIcmpv6EchoChecksum value in the FlowIcmpv6Echo object +func (obj *flowIcmpv6Echo) SetChecksum(value PatternFlowIcmpv6EchoChecksum) FlowIcmpv6Echo { + + obj.checksumHolder = nil + obj.obj.Checksum = value.msg() + + return obj +} + +func (obj *flowIcmpv6Echo) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Type != nil { + + obj.Type().validateObj(vObj, set_default) + } + + if obj.obj.Code != nil { + + obj.Code().validateObj(vObj, set_default) + } + + if obj.obj.Identifier != nil { + + obj.Identifier().validateObj(vObj, set_default) + } + + if obj.obj.SequenceNumber != nil { + + obj.SequenceNumber().validateObj(vObj, set_default) + } + + if obj.obj.Checksum != nil { + + obj.Checksum().validateObj(vObj, set_default) + } + +} + +func (obj *flowIcmpv6Echo) setDefault() { + +} diff --git a/gosnappi/flow_igmpv1.go b/gosnappi/flow_igmpv1.go new file mode 100644 index 00000000..005613dd --- /dev/null +++ b/gosnappi/flow_igmpv1.go @@ -0,0 +1,500 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIgmpv1 ***** +type flowIgmpv1 struct { + validation + obj *otg.FlowIgmpv1 + marshaller marshalFlowIgmpv1 + unMarshaller unMarshalFlowIgmpv1 + versionHolder PatternFlowIgmpv1Version + typeHolder PatternFlowIgmpv1Type + unusedHolder PatternFlowIgmpv1Unused + checksumHolder PatternFlowIgmpv1Checksum + groupAddressHolder PatternFlowIgmpv1GroupAddress +} + +func NewFlowIgmpv1() FlowIgmpv1 { + obj := flowIgmpv1{obj: &otg.FlowIgmpv1{}} + obj.setDefault() + return &obj +} + +func (obj *flowIgmpv1) msg() *otg.FlowIgmpv1 { + return obj.obj +} + +func (obj *flowIgmpv1) setMsg(msg *otg.FlowIgmpv1) FlowIgmpv1 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIgmpv1 struct { + obj *flowIgmpv1 +} + +type marshalFlowIgmpv1 interface { + // ToProto marshals FlowIgmpv1 to protobuf object *otg.FlowIgmpv1 + ToProto() (*otg.FlowIgmpv1, error) + // ToPbText marshals FlowIgmpv1 to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIgmpv1 to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIgmpv1 to JSON text + ToJson() (string, error) +} + +type unMarshalflowIgmpv1 struct { + obj *flowIgmpv1 +} + +type unMarshalFlowIgmpv1 interface { + // FromProto unmarshals FlowIgmpv1 from protobuf object *otg.FlowIgmpv1 + FromProto(msg *otg.FlowIgmpv1) (FlowIgmpv1, error) + // FromPbText unmarshals FlowIgmpv1 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIgmpv1 from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIgmpv1 from JSON text + FromJson(value string) error +} + +func (obj *flowIgmpv1) Marshal() marshalFlowIgmpv1 { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIgmpv1{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIgmpv1) Unmarshal() unMarshalFlowIgmpv1 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIgmpv1{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIgmpv1) ToProto() (*otg.FlowIgmpv1, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIgmpv1) FromProto(msg *otg.FlowIgmpv1) (FlowIgmpv1, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIgmpv1) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIgmpv1) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIgmpv1) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIgmpv1) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIgmpv1) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIgmpv1) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIgmpv1) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIgmpv1) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIgmpv1) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIgmpv1) Clone() (FlowIgmpv1, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIgmpv1() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowIgmpv1) setNil() { + obj.versionHolder = nil + obj.typeHolder = nil + obj.unusedHolder = nil + obj.checksumHolder = nil + obj.groupAddressHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowIgmpv1 is iGMPv1 packet header +type FlowIgmpv1 interface { + Validation + // msg marshals FlowIgmpv1 to protobuf object *otg.FlowIgmpv1 + // and doesn't set defaults + msg() *otg.FlowIgmpv1 + // setMsg unmarshals FlowIgmpv1 from protobuf object *otg.FlowIgmpv1 + // and doesn't set defaults + setMsg(*otg.FlowIgmpv1) FlowIgmpv1 + // provides marshal interface + Marshal() marshalFlowIgmpv1 + // provides unmarshal interface + Unmarshal() unMarshalFlowIgmpv1 + // validate validates FlowIgmpv1 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIgmpv1, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Version returns PatternFlowIgmpv1Version, set in FlowIgmpv1. + // PatternFlowIgmpv1Version is version number + Version() PatternFlowIgmpv1Version + // SetVersion assigns PatternFlowIgmpv1Version provided by user to FlowIgmpv1. + // PatternFlowIgmpv1Version is version number + SetVersion(value PatternFlowIgmpv1Version) FlowIgmpv1 + // HasVersion checks if Version has been set in FlowIgmpv1 + HasVersion() bool + // Type returns PatternFlowIgmpv1Type, set in FlowIgmpv1. + // PatternFlowIgmpv1Type is type of message + Type() PatternFlowIgmpv1Type + // SetType assigns PatternFlowIgmpv1Type provided by user to FlowIgmpv1. + // PatternFlowIgmpv1Type is type of message + SetType(value PatternFlowIgmpv1Type) FlowIgmpv1 + // HasType checks if Type has been set in FlowIgmpv1 + HasType() bool + // Unused returns PatternFlowIgmpv1Unused, set in FlowIgmpv1. + // PatternFlowIgmpv1Unused is unused + Unused() PatternFlowIgmpv1Unused + // SetUnused assigns PatternFlowIgmpv1Unused provided by user to FlowIgmpv1. + // PatternFlowIgmpv1Unused is unused + SetUnused(value PatternFlowIgmpv1Unused) FlowIgmpv1 + // HasUnused checks if Unused has been set in FlowIgmpv1 + HasUnused() bool + // Checksum returns PatternFlowIgmpv1Checksum, set in FlowIgmpv1. + // PatternFlowIgmpv1Checksum is checksum + Checksum() PatternFlowIgmpv1Checksum + // SetChecksum assigns PatternFlowIgmpv1Checksum provided by user to FlowIgmpv1. + // PatternFlowIgmpv1Checksum is checksum + SetChecksum(value PatternFlowIgmpv1Checksum) FlowIgmpv1 + // HasChecksum checks if Checksum has been set in FlowIgmpv1 + HasChecksum() bool + // GroupAddress returns PatternFlowIgmpv1GroupAddress, set in FlowIgmpv1. + // PatternFlowIgmpv1GroupAddress is group address + GroupAddress() PatternFlowIgmpv1GroupAddress + // SetGroupAddress assigns PatternFlowIgmpv1GroupAddress provided by user to FlowIgmpv1. + // PatternFlowIgmpv1GroupAddress is group address + SetGroupAddress(value PatternFlowIgmpv1GroupAddress) FlowIgmpv1 + // HasGroupAddress checks if GroupAddress has been set in FlowIgmpv1 + HasGroupAddress() bool + setNil() +} + +// description is TBD +// Version returns a PatternFlowIgmpv1Version +func (obj *flowIgmpv1) Version() PatternFlowIgmpv1Version { + if obj.obj.Version == nil { + obj.obj.Version = NewPatternFlowIgmpv1Version().msg() + } + if obj.versionHolder == nil { + obj.versionHolder = &patternFlowIgmpv1Version{obj: obj.obj.Version} + } + return obj.versionHolder +} + +// description is TBD +// Version returns a PatternFlowIgmpv1Version +func (obj *flowIgmpv1) HasVersion() bool { + return obj.obj.Version != nil +} + +// description is TBD +// SetVersion sets the PatternFlowIgmpv1Version value in the FlowIgmpv1 object +func (obj *flowIgmpv1) SetVersion(value PatternFlowIgmpv1Version) FlowIgmpv1 { + + obj.versionHolder = nil + obj.obj.Version = value.msg() + + return obj +} + +// description is TBD +// Type returns a PatternFlowIgmpv1Type +func (obj *flowIgmpv1) Type() PatternFlowIgmpv1Type { + if obj.obj.Type == nil { + obj.obj.Type = NewPatternFlowIgmpv1Type().msg() + } + if obj.typeHolder == nil { + obj.typeHolder = &patternFlowIgmpv1Type{obj: obj.obj.Type} + } + return obj.typeHolder +} + +// description is TBD +// Type returns a PatternFlowIgmpv1Type +func (obj *flowIgmpv1) HasType() bool { + return obj.obj.Type != nil +} + +// description is TBD +// SetType sets the PatternFlowIgmpv1Type value in the FlowIgmpv1 object +func (obj *flowIgmpv1) SetType(value PatternFlowIgmpv1Type) FlowIgmpv1 { + + obj.typeHolder = nil + obj.obj.Type = value.msg() + + return obj +} + +// description is TBD +// Unused returns a PatternFlowIgmpv1Unused +func (obj *flowIgmpv1) Unused() PatternFlowIgmpv1Unused { + if obj.obj.Unused == nil { + obj.obj.Unused = NewPatternFlowIgmpv1Unused().msg() + } + if obj.unusedHolder == nil { + obj.unusedHolder = &patternFlowIgmpv1Unused{obj: obj.obj.Unused} + } + return obj.unusedHolder +} + +// description is TBD +// Unused returns a PatternFlowIgmpv1Unused +func (obj *flowIgmpv1) HasUnused() bool { + return obj.obj.Unused != nil +} + +// description is TBD +// SetUnused sets the PatternFlowIgmpv1Unused value in the FlowIgmpv1 object +func (obj *flowIgmpv1) SetUnused(value PatternFlowIgmpv1Unused) FlowIgmpv1 { + + obj.unusedHolder = nil + obj.obj.Unused = value.msg() + + return obj +} + +// description is TBD +// Checksum returns a PatternFlowIgmpv1Checksum +func (obj *flowIgmpv1) Checksum() PatternFlowIgmpv1Checksum { + if obj.obj.Checksum == nil { + obj.obj.Checksum = NewPatternFlowIgmpv1Checksum().msg() + } + if obj.checksumHolder == nil { + obj.checksumHolder = &patternFlowIgmpv1Checksum{obj: obj.obj.Checksum} + } + return obj.checksumHolder +} + +// description is TBD +// Checksum returns a PatternFlowIgmpv1Checksum +func (obj *flowIgmpv1) HasChecksum() bool { + return obj.obj.Checksum != nil +} + +// description is TBD +// SetChecksum sets the PatternFlowIgmpv1Checksum value in the FlowIgmpv1 object +func (obj *flowIgmpv1) SetChecksum(value PatternFlowIgmpv1Checksum) FlowIgmpv1 { + + obj.checksumHolder = nil + obj.obj.Checksum = value.msg() + + return obj +} + +// description is TBD +// GroupAddress returns a PatternFlowIgmpv1GroupAddress +func (obj *flowIgmpv1) GroupAddress() PatternFlowIgmpv1GroupAddress { + if obj.obj.GroupAddress == nil { + obj.obj.GroupAddress = NewPatternFlowIgmpv1GroupAddress().msg() + } + if obj.groupAddressHolder == nil { + obj.groupAddressHolder = &patternFlowIgmpv1GroupAddress{obj: obj.obj.GroupAddress} + } + return obj.groupAddressHolder +} + +// description is TBD +// GroupAddress returns a PatternFlowIgmpv1GroupAddress +func (obj *flowIgmpv1) HasGroupAddress() bool { + return obj.obj.GroupAddress != nil +} + +// description is TBD +// SetGroupAddress sets the PatternFlowIgmpv1GroupAddress value in the FlowIgmpv1 object +func (obj *flowIgmpv1) SetGroupAddress(value PatternFlowIgmpv1GroupAddress) FlowIgmpv1 { + + obj.groupAddressHolder = nil + obj.obj.GroupAddress = value.msg() + + return obj +} + +func (obj *flowIgmpv1) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Version != nil { + + obj.Version().validateObj(vObj, set_default) + } + + if obj.obj.Type != nil { + + obj.Type().validateObj(vObj, set_default) + } + + if obj.obj.Unused != nil { + + obj.Unused().validateObj(vObj, set_default) + } + + if obj.obj.Checksum != nil { + + obj.Checksum().validateObj(vObj, set_default) + } + + if obj.obj.GroupAddress != nil { + + obj.GroupAddress().validateObj(vObj, set_default) + } + +} + +func (obj *flowIgmpv1) setDefault() { + +} diff --git a/gosnappi/flow_ipv4.go b/gosnappi/flow_ipv4.go new file mode 100644 index 00000000..096fe5a3 --- /dev/null +++ b/gosnappi/flow_ipv4.go @@ -0,0 +1,992 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIpv4 ***** +type flowIpv4 struct { + validation + obj *otg.FlowIpv4 + marshaller marshalFlowIpv4 + unMarshaller unMarshalFlowIpv4 + versionHolder PatternFlowIpv4Version + headerLengthHolder PatternFlowIpv4HeaderLength + priorityHolder FlowIpv4Priority + totalLengthHolder PatternFlowIpv4TotalLength + identificationHolder PatternFlowIpv4Identification + reservedHolder PatternFlowIpv4Reserved + dontFragmentHolder PatternFlowIpv4DontFragment + moreFragmentsHolder PatternFlowIpv4MoreFragments + fragmentOffsetHolder PatternFlowIpv4FragmentOffset + timeToLiveHolder PatternFlowIpv4TimeToLive + protocolHolder PatternFlowIpv4Protocol + headerChecksumHolder PatternFlowIpv4HeaderChecksum + srcHolder PatternFlowIpv4Src + dstHolder PatternFlowIpv4Dst + optionsHolder FlowIpv4FlowIpv4OptionsIter +} + +func NewFlowIpv4() FlowIpv4 { + obj := flowIpv4{obj: &otg.FlowIpv4{}} + obj.setDefault() + return &obj +} + +func (obj *flowIpv4) msg() *otg.FlowIpv4 { + return obj.obj +} + +func (obj *flowIpv4) setMsg(msg *otg.FlowIpv4) FlowIpv4 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIpv4 struct { + obj *flowIpv4 +} + +type marshalFlowIpv4 interface { + // ToProto marshals FlowIpv4 to protobuf object *otg.FlowIpv4 + ToProto() (*otg.FlowIpv4, error) + // ToPbText marshals FlowIpv4 to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIpv4 to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIpv4 to JSON text + ToJson() (string, error) +} + +type unMarshalflowIpv4 struct { + obj *flowIpv4 +} + +type unMarshalFlowIpv4 interface { + // FromProto unmarshals FlowIpv4 from protobuf object *otg.FlowIpv4 + FromProto(msg *otg.FlowIpv4) (FlowIpv4, error) + // FromPbText unmarshals FlowIpv4 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIpv4 from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIpv4 from JSON text + FromJson(value string) error +} + +func (obj *flowIpv4) Marshal() marshalFlowIpv4 { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIpv4{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIpv4) Unmarshal() unMarshalFlowIpv4 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIpv4{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIpv4) ToProto() (*otg.FlowIpv4, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIpv4) FromProto(msg *otg.FlowIpv4) (FlowIpv4, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIpv4) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIpv4) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIpv4) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIpv4) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIpv4) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIpv4) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIpv4) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIpv4) Clone() (FlowIpv4, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIpv4() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowIpv4) setNil() { + obj.versionHolder = nil + obj.headerLengthHolder = nil + obj.priorityHolder = nil + obj.totalLengthHolder = nil + obj.identificationHolder = nil + obj.reservedHolder = nil + obj.dontFragmentHolder = nil + obj.moreFragmentsHolder = nil + obj.fragmentOffsetHolder = nil + obj.timeToLiveHolder = nil + obj.protocolHolder = nil + obj.headerChecksumHolder = nil + obj.srcHolder = nil + obj.dstHolder = nil + obj.optionsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowIpv4 is iPv4 packet header +type FlowIpv4 interface { + Validation + // msg marshals FlowIpv4 to protobuf object *otg.FlowIpv4 + // and doesn't set defaults + msg() *otg.FlowIpv4 + // setMsg unmarshals FlowIpv4 from protobuf object *otg.FlowIpv4 + // and doesn't set defaults + setMsg(*otg.FlowIpv4) FlowIpv4 + // provides marshal interface + Marshal() marshalFlowIpv4 + // provides unmarshal interface + Unmarshal() unMarshalFlowIpv4 + // validate validates FlowIpv4 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIpv4, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Version returns PatternFlowIpv4Version, set in FlowIpv4. + // PatternFlowIpv4Version is version + Version() PatternFlowIpv4Version + // SetVersion assigns PatternFlowIpv4Version provided by user to FlowIpv4. + // PatternFlowIpv4Version is version + SetVersion(value PatternFlowIpv4Version) FlowIpv4 + // HasVersion checks if Version has been set in FlowIpv4 + HasVersion() bool + // HeaderLength returns PatternFlowIpv4HeaderLength, set in FlowIpv4. + // PatternFlowIpv4HeaderLength is header length + HeaderLength() PatternFlowIpv4HeaderLength + // SetHeaderLength assigns PatternFlowIpv4HeaderLength provided by user to FlowIpv4. + // PatternFlowIpv4HeaderLength is header length + SetHeaderLength(value PatternFlowIpv4HeaderLength) FlowIpv4 + // HasHeaderLength checks if HeaderLength has been set in FlowIpv4 + HasHeaderLength() bool + // Priority returns FlowIpv4Priority, set in FlowIpv4. + // FlowIpv4Priority is a container for ipv4 raw, tos, dscp ip priorities. + Priority() FlowIpv4Priority + // SetPriority assigns FlowIpv4Priority provided by user to FlowIpv4. + // FlowIpv4Priority is a container for ipv4 raw, tos, dscp ip priorities. + SetPriority(value FlowIpv4Priority) FlowIpv4 + // HasPriority checks if Priority has been set in FlowIpv4 + HasPriority() bool + // TotalLength returns PatternFlowIpv4TotalLength, set in FlowIpv4. + // PatternFlowIpv4TotalLength is total length + TotalLength() PatternFlowIpv4TotalLength + // SetTotalLength assigns PatternFlowIpv4TotalLength provided by user to FlowIpv4. + // PatternFlowIpv4TotalLength is total length + SetTotalLength(value PatternFlowIpv4TotalLength) FlowIpv4 + // HasTotalLength checks if TotalLength has been set in FlowIpv4 + HasTotalLength() bool + // Identification returns PatternFlowIpv4Identification, set in FlowIpv4. + // PatternFlowIpv4Identification is identification + Identification() PatternFlowIpv4Identification + // SetIdentification assigns PatternFlowIpv4Identification provided by user to FlowIpv4. + // PatternFlowIpv4Identification is identification + SetIdentification(value PatternFlowIpv4Identification) FlowIpv4 + // HasIdentification checks if Identification has been set in FlowIpv4 + HasIdentification() bool + // Reserved returns PatternFlowIpv4Reserved, set in FlowIpv4. + // PatternFlowIpv4Reserved is reserved flag. + Reserved() PatternFlowIpv4Reserved + // SetReserved assigns PatternFlowIpv4Reserved provided by user to FlowIpv4. + // PatternFlowIpv4Reserved is reserved flag. + SetReserved(value PatternFlowIpv4Reserved) FlowIpv4 + // HasReserved checks if Reserved has been set in FlowIpv4 + HasReserved() bool + // DontFragment returns PatternFlowIpv4DontFragment, set in FlowIpv4. + // PatternFlowIpv4DontFragment is dont fragment flag If the dont_fragment flag is set and fragmentation is required to route the packet then the packet is dropped. + DontFragment() PatternFlowIpv4DontFragment + // SetDontFragment assigns PatternFlowIpv4DontFragment provided by user to FlowIpv4. + // PatternFlowIpv4DontFragment is dont fragment flag If the dont_fragment flag is set and fragmentation is required to route the packet then the packet is dropped. + SetDontFragment(value PatternFlowIpv4DontFragment) FlowIpv4 + // HasDontFragment checks if DontFragment has been set in FlowIpv4 + HasDontFragment() bool + // MoreFragments returns PatternFlowIpv4MoreFragments, set in FlowIpv4. + // PatternFlowIpv4MoreFragments is more fragments flag + MoreFragments() PatternFlowIpv4MoreFragments + // SetMoreFragments assigns PatternFlowIpv4MoreFragments provided by user to FlowIpv4. + // PatternFlowIpv4MoreFragments is more fragments flag + SetMoreFragments(value PatternFlowIpv4MoreFragments) FlowIpv4 + // HasMoreFragments checks if MoreFragments has been set in FlowIpv4 + HasMoreFragments() bool + // FragmentOffset returns PatternFlowIpv4FragmentOffset, set in FlowIpv4. + // PatternFlowIpv4FragmentOffset is fragment offset + FragmentOffset() PatternFlowIpv4FragmentOffset + // SetFragmentOffset assigns PatternFlowIpv4FragmentOffset provided by user to FlowIpv4. + // PatternFlowIpv4FragmentOffset is fragment offset + SetFragmentOffset(value PatternFlowIpv4FragmentOffset) FlowIpv4 + // HasFragmentOffset checks if FragmentOffset has been set in FlowIpv4 + HasFragmentOffset() bool + // TimeToLive returns PatternFlowIpv4TimeToLive, set in FlowIpv4. + // PatternFlowIpv4TimeToLive is time to live + TimeToLive() PatternFlowIpv4TimeToLive + // SetTimeToLive assigns PatternFlowIpv4TimeToLive provided by user to FlowIpv4. + // PatternFlowIpv4TimeToLive is time to live + SetTimeToLive(value PatternFlowIpv4TimeToLive) FlowIpv4 + // HasTimeToLive checks if TimeToLive has been set in FlowIpv4 + HasTimeToLive() bool + // Protocol returns PatternFlowIpv4Protocol, set in FlowIpv4. + // PatternFlowIpv4Protocol is protocol, default is 61 any host internal protocol + Protocol() PatternFlowIpv4Protocol + // SetProtocol assigns PatternFlowIpv4Protocol provided by user to FlowIpv4. + // PatternFlowIpv4Protocol is protocol, default is 61 any host internal protocol + SetProtocol(value PatternFlowIpv4Protocol) FlowIpv4 + // HasProtocol checks if Protocol has been set in FlowIpv4 + HasProtocol() bool + // HeaderChecksum returns PatternFlowIpv4HeaderChecksum, set in FlowIpv4. + // PatternFlowIpv4HeaderChecksum is header checksum + HeaderChecksum() PatternFlowIpv4HeaderChecksum + // SetHeaderChecksum assigns PatternFlowIpv4HeaderChecksum provided by user to FlowIpv4. + // PatternFlowIpv4HeaderChecksum is header checksum + SetHeaderChecksum(value PatternFlowIpv4HeaderChecksum) FlowIpv4 + // HasHeaderChecksum checks if HeaderChecksum has been set in FlowIpv4 + HasHeaderChecksum() bool + // Src returns PatternFlowIpv4Src, set in FlowIpv4. + // PatternFlowIpv4Src is source address + Src() PatternFlowIpv4Src + // SetSrc assigns PatternFlowIpv4Src provided by user to FlowIpv4. + // PatternFlowIpv4Src is source address + SetSrc(value PatternFlowIpv4Src) FlowIpv4 + // HasSrc checks if Src has been set in FlowIpv4 + HasSrc() bool + // Dst returns PatternFlowIpv4Dst, set in FlowIpv4. + // PatternFlowIpv4Dst is destination address + Dst() PatternFlowIpv4Dst + // SetDst assigns PatternFlowIpv4Dst provided by user to FlowIpv4. + // PatternFlowIpv4Dst is destination address + SetDst(value PatternFlowIpv4Dst) FlowIpv4 + // HasDst checks if Dst has been set in FlowIpv4 + HasDst() bool + // Options returns FlowIpv4FlowIpv4OptionsIterIter, set in FlowIpv4 + Options() FlowIpv4FlowIpv4OptionsIter + setNil() +} + +// description is TBD +// Version returns a PatternFlowIpv4Version +func (obj *flowIpv4) Version() PatternFlowIpv4Version { + if obj.obj.Version == nil { + obj.obj.Version = NewPatternFlowIpv4Version().msg() + } + if obj.versionHolder == nil { + obj.versionHolder = &patternFlowIpv4Version{obj: obj.obj.Version} + } + return obj.versionHolder +} + +// description is TBD +// Version returns a PatternFlowIpv4Version +func (obj *flowIpv4) HasVersion() bool { + return obj.obj.Version != nil +} + +// description is TBD +// SetVersion sets the PatternFlowIpv4Version value in the FlowIpv4 object +func (obj *flowIpv4) SetVersion(value PatternFlowIpv4Version) FlowIpv4 { + + obj.versionHolder = nil + obj.obj.Version = value.msg() + + return obj +} + +// description is TBD +// HeaderLength returns a PatternFlowIpv4HeaderLength +func (obj *flowIpv4) HeaderLength() PatternFlowIpv4HeaderLength { + if obj.obj.HeaderLength == nil { + obj.obj.HeaderLength = NewPatternFlowIpv4HeaderLength().msg() + } + if obj.headerLengthHolder == nil { + obj.headerLengthHolder = &patternFlowIpv4HeaderLength{obj: obj.obj.HeaderLength} + } + return obj.headerLengthHolder +} + +// description is TBD +// HeaderLength returns a PatternFlowIpv4HeaderLength +func (obj *flowIpv4) HasHeaderLength() bool { + return obj.obj.HeaderLength != nil +} + +// description is TBD +// SetHeaderLength sets the PatternFlowIpv4HeaderLength value in the FlowIpv4 object +func (obj *flowIpv4) SetHeaderLength(value PatternFlowIpv4HeaderLength) FlowIpv4 { + + obj.headerLengthHolder = nil + obj.obj.HeaderLength = value.msg() + + return obj +} + +// description is TBD +// Priority returns a FlowIpv4Priority +func (obj *flowIpv4) Priority() FlowIpv4Priority { + if obj.obj.Priority == nil { + obj.obj.Priority = NewFlowIpv4Priority().msg() + } + if obj.priorityHolder == nil { + obj.priorityHolder = &flowIpv4Priority{obj: obj.obj.Priority} + } + return obj.priorityHolder +} + +// description is TBD +// Priority returns a FlowIpv4Priority +func (obj *flowIpv4) HasPriority() bool { + return obj.obj.Priority != nil +} + +// description is TBD +// SetPriority sets the FlowIpv4Priority value in the FlowIpv4 object +func (obj *flowIpv4) SetPriority(value FlowIpv4Priority) FlowIpv4 { + + obj.priorityHolder = nil + obj.obj.Priority = value.msg() + + return obj +} + +// description is TBD +// TotalLength returns a PatternFlowIpv4TotalLength +func (obj *flowIpv4) TotalLength() PatternFlowIpv4TotalLength { + if obj.obj.TotalLength == nil { + obj.obj.TotalLength = NewPatternFlowIpv4TotalLength().msg() + } + if obj.totalLengthHolder == nil { + obj.totalLengthHolder = &patternFlowIpv4TotalLength{obj: obj.obj.TotalLength} + } + return obj.totalLengthHolder +} + +// description is TBD +// TotalLength returns a PatternFlowIpv4TotalLength +func (obj *flowIpv4) HasTotalLength() bool { + return obj.obj.TotalLength != nil +} + +// description is TBD +// SetTotalLength sets the PatternFlowIpv4TotalLength value in the FlowIpv4 object +func (obj *flowIpv4) SetTotalLength(value PatternFlowIpv4TotalLength) FlowIpv4 { + + obj.totalLengthHolder = nil + obj.obj.TotalLength = value.msg() + + return obj +} + +// description is TBD +// Identification returns a PatternFlowIpv4Identification +func (obj *flowIpv4) Identification() PatternFlowIpv4Identification { + if obj.obj.Identification == nil { + obj.obj.Identification = NewPatternFlowIpv4Identification().msg() + } + if obj.identificationHolder == nil { + obj.identificationHolder = &patternFlowIpv4Identification{obj: obj.obj.Identification} + } + return obj.identificationHolder +} + +// description is TBD +// Identification returns a PatternFlowIpv4Identification +func (obj *flowIpv4) HasIdentification() bool { + return obj.obj.Identification != nil +} + +// description is TBD +// SetIdentification sets the PatternFlowIpv4Identification value in the FlowIpv4 object +func (obj *flowIpv4) SetIdentification(value PatternFlowIpv4Identification) FlowIpv4 { + + obj.identificationHolder = nil + obj.obj.Identification = value.msg() + + return obj +} + +// description is TBD +// Reserved returns a PatternFlowIpv4Reserved +func (obj *flowIpv4) Reserved() PatternFlowIpv4Reserved { + if obj.obj.Reserved == nil { + obj.obj.Reserved = NewPatternFlowIpv4Reserved().msg() + } + if obj.reservedHolder == nil { + obj.reservedHolder = &patternFlowIpv4Reserved{obj: obj.obj.Reserved} + } + return obj.reservedHolder +} + +// description is TBD +// Reserved returns a PatternFlowIpv4Reserved +func (obj *flowIpv4) HasReserved() bool { + return obj.obj.Reserved != nil +} + +// description is TBD +// SetReserved sets the PatternFlowIpv4Reserved value in the FlowIpv4 object +func (obj *flowIpv4) SetReserved(value PatternFlowIpv4Reserved) FlowIpv4 { + + obj.reservedHolder = nil + obj.obj.Reserved = value.msg() + + return obj +} + +// description is TBD +// DontFragment returns a PatternFlowIpv4DontFragment +func (obj *flowIpv4) DontFragment() PatternFlowIpv4DontFragment { + if obj.obj.DontFragment == nil { + obj.obj.DontFragment = NewPatternFlowIpv4DontFragment().msg() + } + if obj.dontFragmentHolder == nil { + obj.dontFragmentHolder = &patternFlowIpv4DontFragment{obj: obj.obj.DontFragment} + } + return obj.dontFragmentHolder +} + +// description is TBD +// DontFragment returns a PatternFlowIpv4DontFragment +func (obj *flowIpv4) HasDontFragment() bool { + return obj.obj.DontFragment != nil +} + +// description is TBD +// SetDontFragment sets the PatternFlowIpv4DontFragment value in the FlowIpv4 object +func (obj *flowIpv4) SetDontFragment(value PatternFlowIpv4DontFragment) FlowIpv4 { + + obj.dontFragmentHolder = nil + obj.obj.DontFragment = value.msg() + + return obj +} + +// description is TBD +// MoreFragments returns a PatternFlowIpv4MoreFragments +func (obj *flowIpv4) MoreFragments() PatternFlowIpv4MoreFragments { + if obj.obj.MoreFragments == nil { + obj.obj.MoreFragments = NewPatternFlowIpv4MoreFragments().msg() + } + if obj.moreFragmentsHolder == nil { + obj.moreFragmentsHolder = &patternFlowIpv4MoreFragments{obj: obj.obj.MoreFragments} + } + return obj.moreFragmentsHolder +} + +// description is TBD +// MoreFragments returns a PatternFlowIpv4MoreFragments +func (obj *flowIpv4) HasMoreFragments() bool { + return obj.obj.MoreFragments != nil +} + +// description is TBD +// SetMoreFragments sets the PatternFlowIpv4MoreFragments value in the FlowIpv4 object +func (obj *flowIpv4) SetMoreFragments(value PatternFlowIpv4MoreFragments) FlowIpv4 { + + obj.moreFragmentsHolder = nil + obj.obj.MoreFragments = value.msg() + + return obj +} + +// description is TBD +// FragmentOffset returns a PatternFlowIpv4FragmentOffset +func (obj *flowIpv4) FragmentOffset() PatternFlowIpv4FragmentOffset { + if obj.obj.FragmentOffset == nil { + obj.obj.FragmentOffset = NewPatternFlowIpv4FragmentOffset().msg() + } + if obj.fragmentOffsetHolder == nil { + obj.fragmentOffsetHolder = &patternFlowIpv4FragmentOffset{obj: obj.obj.FragmentOffset} + } + return obj.fragmentOffsetHolder +} + +// description is TBD +// FragmentOffset returns a PatternFlowIpv4FragmentOffset +func (obj *flowIpv4) HasFragmentOffset() bool { + return obj.obj.FragmentOffset != nil +} + +// description is TBD +// SetFragmentOffset sets the PatternFlowIpv4FragmentOffset value in the FlowIpv4 object +func (obj *flowIpv4) SetFragmentOffset(value PatternFlowIpv4FragmentOffset) FlowIpv4 { + + obj.fragmentOffsetHolder = nil + obj.obj.FragmentOffset = value.msg() + + return obj +} + +// description is TBD +// TimeToLive returns a PatternFlowIpv4TimeToLive +func (obj *flowIpv4) TimeToLive() PatternFlowIpv4TimeToLive { + if obj.obj.TimeToLive == nil { + obj.obj.TimeToLive = NewPatternFlowIpv4TimeToLive().msg() + } + if obj.timeToLiveHolder == nil { + obj.timeToLiveHolder = &patternFlowIpv4TimeToLive{obj: obj.obj.TimeToLive} + } + return obj.timeToLiveHolder +} + +// description is TBD +// TimeToLive returns a PatternFlowIpv4TimeToLive +func (obj *flowIpv4) HasTimeToLive() bool { + return obj.obj.TimeToLive != nil +} + +// description is TBD +// SetTimeToLive sets the PatternFlowIpv4TimeToLive value in the FlowIpv4 object +func (obj *flowIpv4) SetTimeToLive(value PatternFlowIpv4TimeToLive) FlowIpv4 { + + obj.timeToLiveHolder = nil + obj.obj.TimeToLive = value.msg() + + return obj +} + +// description is TBD +// Protocol returns a PatternFlowIpv4Protocol +func (obj *flowIpv4) Protocol() PatternFlowIpv4Protocol { + if obj.obj.Protocol == nil { + obj.obj.Protocol = NewPatternFlowIpv4Protocol().msg() + } + if obj.protocolHolder == nil { + obj.protocolHolder = &patternFlowIpv4Protocol{obj: obj.obj.Protocol} + } + return obj.protocolHolder +} + +// description is TBD +// Protocol returns a PatternFlowIpv4Protocol +func (obj *flowIpv4) HasProtocol() bool { + return obj.obj.Protocol != nil +} + +// description is TBD +// SetProtocol sets the PatternFlowIpv4Protocol value in the FlowIpv4 object +func (obj *flowIpv4) SetProtocol(value PatternFlowIpv4Protocol) FlowIpv4 { + + obj.protocolHolder = nil + obj.obj.Protocol = value.msg() + + return obj +} + +// description is TBD +// HeaderChecksum returns a PatternFlowIpv4HeaderChecksum +func (obj *flowIpv4) HeaderChecksum() PatternFlowIpv4HeaderChecksum { + if obj.obj.HeaderChecksum == nil { + obj.obj.HeaderChecksum = NewPatternFlowIpv4HeaderChecksum().msg() + } + if obj.headerChecksumHolder == nil { + obj.headerChecksumHolder = &patternFlowIpv4HeaderChecksum{obj: obj.obj.HeaderChecksum} + } + return obj.headerChecksumHolder +} + +// description is TBD +// HeaderChecksum returns a PatternFlowIpv4HeaderChecksum +func (obj *flowIpv4) HasHeaderChecksum() bool { + return obj.obj.HeaderChecksum != nil +} + +// description is TBD +// SetHeaderChecksum sets the PatternFlowIpv4HeaderChecksum value in the FlowIpv4 object +func (obj *flowIpv4) SetHeaderChecksum(value PatternFlowIpv4HeaderChecksum) FlowIpv4 { + + obj.headerChecksumHolder = nil + obj.obj.HeaderChecksum = value.msg() + + return obj +} + +// description is TBD +// Src returns a PatternFlowIpv4Src +func (obj *flowIpv4) Src() PatternFlowIpv4Src { + if obj.obj.Src == nil { + obj.obj.Src = NewPatternFlowIpv4Src().msg() + } + if obj.srcHolder == nil { + obj.srcHolder = &patternFlowIpv4Src{obj: obj.obj.Src} + } + return obj.srcHolder +} + +// description is TBD +// Src returns a PatternFlowIpv4Src +func (obj *flowIpv4) HasSrc() bool { + return obj.obj.Src != nil +} + +// description is TBD +// SetSrc sets the PatternFlowIpv4Src value in the FlowIpv4 object +func (obj *flowIpv4) SetSrc(value PatternFlowIpv4Src) FlowIpv4 { + + obj.srcHolder = nil + obj.obj.Src = value.msg() + + return obj +} + +// description is TBD +// Dst returns a PatternFlowIpv4Dst +func (obj *flowIpv4) Dst() PatternFlowIpv4Dst { + if obj.obj.Dst == nil { + obj.obj.Dst = NewPatternFlowIpv4Dst().msg() + } + if obj.dstHolder == nil { + obj.dstHolder = &patternFlowIpv4Dst{obj: obj.obj.Dst} + } + return obj.dstHolder +} + +// description is TBD +// Dst returns a PatternFlowIpv4Dst +func (obj *flowIpv4) HasDst() bool { + return obj.obj.Dst != nil +} + +// description is TBD +// SetDst sets the PatternFlowIpv4Dst value in the FlowIpv4 object +func (obj *flowIpv4) SetDst(value PatternFlowIpv4Dst) FlowIpv4 { + + obj.dstHolder = nil + obj.obj.Dst = value.msg() + + return obj +} + +// description is TBD +// Options returns a []FlowIpv4Options +func (obj *flowIpv4) Options() FlowIpv4FlowIpv4OptionsIter { + if len(obj.obj.Options) == 0 { + obj.obj.Options = []*otg.FlowIpv4Options{} + } + if obj.optionsHolder == nil { + obj.optionsHolder = newFlowIpv4FlowIpv4OptionsIter(&obj.obj.Options).setMsg(obj) + } + return obj.optionsHolder +} + +type flowIpv4FlowIpv4OptionsIter struct { + obj *flowIpv4 + flowIpv4OptionsSlice []FlowIpv4Options + fieldPtr *[]*otg.FlowIpv4Options +} + +func newFlowIpv4FlowIpv4OptionsIter(ptr *[]*otg.FlowIpv4Options) FlowIpv4FlowIpv4OptionsIter { + return &flowIpv4FlowIpv4OptionsIter{fieldPtr: ptr} +} + +type FlowIpv4FlowIpv4OptionsIter interface { + setMsg(*flowIpv4) FlowIpv4FlowIpv4OptionsIter + Items() []FlowIpv4Options + Add() FlowIpv4Options + Append(items ...FlowIpv4Options) FlowIpv4FlowIpv4OptionsIter + Set(index int, newObj FlowIpv4Options) FlowIpv4FlowIpv4OptionsIter + Clear() FlowIpv4FlowIpv4OptionsIter + clearHolderSlice() FlowIpv4FlowIpv4OptionsIter + appendHolderSlice(item FlowIpv4Options) FlowIpv4FlowIpv4OptionsIter +} + +func (obj *flowIpv4FlowIpv4OptionsIter) setMsg(msg *flowIpv4) FlowIpv4FlowIpv4OptionsIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flowIpv4Options{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *flowIpv4FlowIpv4OptionsIter) Items() []FlowIpv4Options { + return obj.flowIpv4OptionsSlice +} + +func (obj *flowIpv4FlowIpv4OptionsIter) Add() FlowIpv4Options { + newObj := &otg.FlowIpv4Options{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flowIpv4Options{obj: newObj} + newLibObj.setDefault() + obj.flowIpv4OptionsSlice = append(obj.flowIpv4OptionsSlice, newLibObj) + return newLibObj +} + +func (obj *flowIpv4FlowIpv4OptionsIter) Append(items ...FlowIpv4Options) FlowIpv4FlowIpv4OptionsIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowIpv4OptionsSlice = append(obj.flowIpv4OptionsSlice, item) + } + return obj +} + +func (obj *flowIpv4FlowIpv4OptionsIter) Set(index int, newObj FlowIpv4Options) FlowIpv4FlowIpv4OptionsIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowIpv4OptionsSlice[index] = newObj + return obj +} +func (obj *flowIpv4FlowIpv4OptionsIter) Clear() FlowIpv4FlowIpv4OptionsIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.FlowIpv4Options{} + obj.flowIpv4OptionsSlice = []FlowIpv4Options{} + } + return obj +} +func (obj *flowIpv4FlowIpv4OptionsIter) clearHolderSlice() FlowIpv4FlowIpv4OptionsIter { + if len(obj.flowIpv4OptionsSlice) > 0 { + obj.flowIpv4OptionsSlice = []FlowIpv4Options{} + } + return obj +} +func (obj *flowIpv4FlowIpv4OptionsIter) appendHolderSlice(item FlowIpv4Options) FlowIpv4FlowIpv4OptionsIter { + obj.flowIpv4OptionsSlice = append(obj.flowIpv4OptionsSlice, item) + return obj +} + +func (obj *flowIpv4) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Version != nil { + + obj.Version().validateObj(vObj, set_default) + } + + if obj.obj.HeaderLength != nil { + + obj.HeaderLength().validateObj(vObj, set_default) + } + + if obj.obj.Priority != nil { + + obj.Priority().validateObj(vObj, set_default) + } + + if obj.obj.TotalLength != nil { + + obj.TotalLength().validateObj(vObj, set_default) + } + + if obj.obj.Identification != nil { + + obj.Identification().validateObj(vObj, set_default) + } + + if obj.obj.Reserved != nil { + + obj.Reserved().validateObj(vObj, set_default) + } + + if obj.obj.DontFragment != nil { + + obj.DontFragment().validateObj(vObj, set_default) + } + + if obj.obj.MoreFragments != nil { + + obj.MoreFragments().validateObj(vObj, set_default) + } + + if obj.obj.FragmentOffset != nil { + + obj.FragmentOffset().validateObj(vObj, set_default) + } + + if obj.obj.TimeToLive != nil { + + obj.TimeToLive().validateObj(vObj, set_default) + } + + if obj.obj.Protocol != nil { + + obj.Protocol().validateObj(vObj, set_default) + } + + if obj.obj.HeaderChecksum != nil { + + obj.HeaderChecksum().validateObj(vObj, set_default) + } + + if obj.obj.Src != nil { + + obj.Src().validateObj(vObj, set_default) + } + + if obj.obj.Dst != nil { + + obj.Dst().validateObj(vObj, set_default) + } + + if len(obj.obj.Options) != 0 { + + if set_default { + obj.Options().clearHolderSlice() + for _, item := range obj.obj.Options { + obj.Options().appendHolderSlice(&flowIpv4Options{obj: item}) + } + } + for _, item := range obj.Options().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *flowIpv4) setDefault() { + +} diff --git a/gosnappi/flow_ipv4_auto.go b/gosnappi/flow_ipv4_auto.go new file mode 100644 index 00000000..2be58f3b --- /dev/null +++ b/gosnappi/flow_ipv4_auto.go @@ -0,0 +1,332 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIpv4Auto ***** +type flowIpv4Auto struct { + validation + obj *otg.FlowIpv4Auto + marshaller marshalFlowIpv4Auto + unMarshaller unMarshalFlowIpv4Auto +} + +func NewFlowIpv4Auto() FlowIpv4Auto { + obj := flowIpv4Auto{obj: &otg.FlowIpv4Auto{}} + obj.setDefault() + return &obj +} + +func (obj *flowIpv4Auto) msg() *otg.FlowIpv4Auto { + return obj.obj +} + +func (obj *flowIpv4Auto) setMsg(msg *otg.FlowIpv4Auto) FlowIpv4Auto { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIpv4Auto struct { + obj *flowIpv4Auto +} + +type marshalFlowIpv4Auto interface { + // ToProto marshals FlowIpv4Auto to protobuf object *otg.FlowIpv4Auto + ToProto() (*otg.FlowIpv4Auto, error) + // ToPbText marshals FlowIpv4Auto to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIpv4Auto to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIpv4Auto to JSON text + ToJson() (string, error) +} + +type unMarshalflowIpv4Auto struct { + obj *flowIpv4Auto +} + +type unMarshalFlowIpv4Auto interface { + // FromProto unmarshals FlowIpv4Auto from protobuf object *otg.FlowIpv4Auto + FromProto(msg *otg.FlowIpv4Auto) (FlowIpv4Auto, error) + // FromPbText unmarshals FlowIpv4Auto from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIpv4Auto from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIpv4Auto from JSON text + FromJson(value string) error +} + +func (obj *flowIpv4Auto) Marshal() marshalFlowIpv4Auto { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIpv4Auto{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIpv4Auto) Unmarshal() unMarshalFlowIpv4Auto { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIpv4Auto{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIpv4Auto) ToProto() (*otg.FlowIpv4Auto, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIpv4Auto) FromProto(msg *otg.FlowIpv4Auto) (FlowIpv4Auto, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIpv4Auto) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIpv4Auto) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIpv4Auto) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4Auto) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIpv4Auto) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4Auto) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIpv4Auto) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIpv4Auto) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIpv4Auto) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIpv4Auto) Clone() (FlowIpv4Auto, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIpv4Auto() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowIpv4Auto is the OTG implementation can provide a system generated, value for this property. +type FlowIpv4Auto interface { + Validation + // msg marshals FlowIpv4Auto to protobuf object *otg.FlowIpv4Auto + // and doesn't set defaults + msg() *otg.FlowIpv4Auto + // setMsg unmarshals FlowIpv4Auto from protobuf object *otg.FlowIpv4Auto + // and doesn't set defaults + setMsg(*otg.FlowIpv4Auto) FlowIpv4Auto + // provides marshal interface + Marshal() marshalFlowIpv4Auto + // provides unmarshal interface + Unmarshal() unMarshalFlowIpv4Auto + // validate validates FlowIpv4Auto + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIpv4Auto, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowIpv4AutoChoiceEnum, set in FlowIpv4Auto + Choice() FlowIpv4AutoChoiceEnum + // setChoice assigns FlowIpv4AutoChoiceEnum provided by user to FlowIpv4Auto + setChoice(value FlowIpv4AutoChoiceEnum) FlowIpv4Auto + // getter for Dhcp to set choice. + Dhcp() +} + +type FlowIpv4AutoChoiceEnum string + +// Enum of Choice on FlowIpv4Auto +var FlowIpv4AutoChoice = struct { + DHCP FlowIpv4AutoChoiceEnum +}{ + DHCP: FlowIpv4AutoChoiceEnum("dhcp"), +} + +func (obj *flowIpv4Auto) Choice() FlowIpv4AutoChoiceEnum { + return FlowIpv4AutoChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for Dhcp to set choice +func (obj *flowIpv4Auto) Dhcp() { + obj.setChoice(FlowIpv4AutoChoice.DHCP) +} + +func (obj *flowIpv4Auto) setChoice(value FlowIpv4AutoChoiceEnum) FlowIpv4Auto { + intValue, ok := otg.FlowIpv4Auto_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowIpv4AutoChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowIpv4Auto_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + + return obj +} + +func (obj *flowIpv4Auto) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface FlowIpv4Auto") + } +} + +func (obj *flowIpv4Auto) setDefault() { + var choices_set int = 0 + var choice FlowIpv4AutoChoiceEnum + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowIpv4Auto") + } + } else { + intVal := otg.FlowIpv4Auto_Choice_Enum_value[string(choice)] + enumValue := otg.FlowIpv4Auto_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_ipv4_dscp.go b/gosnappi/flow_ipv4_dscp.go new file mode 100644 index 00000000..c91000b4 --- /dev/null +++ b/gosnappi/flow_ipv4_dscp.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIpv4Dscp ***** +type flowIpv4Dscp struct { + validation + obj *otg.FlowIpv4Dscp + marshaller marshalFlowIpv4Dscp + unMarshaller unMarshalFlowIpv4Dscp + phbHolder PatternFlowIpv4DscpPhb + ecnHolder PatternFlowIpv4DscpEcn +} + +func NewFlowIpv4Dscp() FlowIpv4Dscp { + obj := flowIpv4Dscp{obj: &otg.FlowIpv4Dscp{}} + obj.setDefault() + return &obj +} + +func (obj *flowIpv4Dscp) msg() *otg.FlowIpv4Dscp { + return obj.obj +} + +func (obj *flowIpv4Dscp) setMsg(msg *otg.FlowIpv4Dscp) FlowIpv4Dscp { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIpv4Dscp struct { + obj *flowIpv4Dscp +} + +type marshalFlowIpv4Dscp interface { + // ToProto marshals FlowIpv4Dscp to protobuf object *otg.FlowIpv4Dscp + ToProto() (*otg.FlowIpv4Dscp, error) + // ToPbText marshals FlowIpv4Dscp to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIpv4Dscp to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIpv4Dscp to JSON text + ToJson() (string, error) +} + +type unMarshalflowIpv4Dscp struct { + obj *flowIpv4Dscp +} + +type unMarshalFlowIpv4Dscp interface { + // FromProto unmarshals FlowIpv4Dscp from protobuf object *otg.FlowIpv4Dscp + FromProto(msg *otg.FlowIpv4Dscp) (FlowIpv4Dscp, error) + // FromPbText unmarshals FlowIpv4Dscp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIpv4Dscp from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIpv4Dscp from JSON text + FromJson(value string) error +} + +func (obj *flowIpv4Dscp) Marshal() marshalFlowIpv4Dscp { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIpv4Dscp{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIpv4Dscp) Unmarshal() unMarshalFlowIpv4Dscp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIpv4Dscp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIpv4Dscp) ToProto() (*otg.FlowIpv4Dscp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIpv4Dscp) FromProto(msg *otg.FlowIpv4Dscp) (FlowIpv4Dscp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIpv4Dscp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIpv4Dscp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIpv4Dscp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4Dscp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIpv4Dscp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4Dscp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIpv4Dscp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIpv4Dscp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIpv4Dscp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIpv4Dscp) Clone() (FlowIpv4Dscp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIpv4Dscp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowIpv4Dscp) setNil() { + obj.phbHolder = nil + obj.ecnHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowIpv4Dscp is differentiated services code point (DSCP) packet field. +type FlowIpv4Dscp interface { + Validation + // msg marshals FlowIpv4Dscp to protobuf object *otg.FlowIpv4Dscp + // and doesn't set defaults + msg() *otg.FlowIpv4Dscp + // setMsg unmarshals FlowIpv4Dscp from protobuf object *otg.FlowIpv4Dscp + // and doesn't set defaults + setMsg(*otg.FlowIpv4Dscp) FlowIpv4Dscp + // provides marshal interface + Marshal() marshalFlowIpv4Dscp + // provides unmarshal interface + Unmarshal() unMarshalFlowIpv4Dscp + // validate validates FlowIpv4Dscp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIpv4Dscp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Phb returns PatternFlowIpv4DscpPhb, set in FlowIpv4Dscp. + // PatternFlowIpv4DscpPhb is per hop behavior + Phb() PatternFlowIpv4DscpPhb + // SetPhb assigns PatternFlowIpv4DscpPhb provided by user to FlowIpv4Dscp. + // PatternFlowIpv4DscpPhb is per hop behavior + SetPhb(value PatternFlowIpv4DscpPhb) FlowIpv4Dscp + // HasPhb checks if Phb has been set in FlowIpv4Dscp + HasPhb() bool + // Ecn returns PatternFlowIpv4DscpEcn, set in FlowIpv4Dscp. + // PatternFlowIpv4DscpEcn is explicit congestion notification + Ecn() PatternFlowIpv4DscpEcn + // SetEcn assigns PatternFlowIpv4DscpEcn provided by user to FlowIpv4Dscp. + // PatternFlowIpv4DscpEcn is explicit congestion notification + SetEcn(value PatternFlowIpv4DscpEcn) FlowIpv4Dscp + // HasEcn checks if Ecn has been set in FlowIpv4Dscp + HasEcn() bool + setNil() +} + +// description is TBD +// Phb returns a PatternFlowIpv4DscpPhb +func (obj *flowIpv4Dscp) Phb() PatternFlowIpv4DscpPhb { + if obj.obj.Phb == nil { + obj.obj.Phb = NewPatternFlowIpv4DscpPhb().msg() + } + if obj.phbHolder == nil { + obj.phbHolder = &patternFlowIpv4DscpPhb{obj: obj.obj.Phb} + } + return obj.phbHolder +} + +// description is TBD +// Phb returns a PatternFlowIpv4DscpPhb +func (obj *flowIpv4Dscp) HasPhb() bool { + return obj.obj.Phb != nil +} + +// description is TBD +// SetPhb sets the PatternFlowIpv4DscpPhb value in the FlowIpv4Dscp object +func (obj *flowIpv4Dscp) SetPhb(value PatternFlowIpv4DscpPhb) FlowIpv4Dscp { + + obj.phbHolder = nil + obj.obj.Phb = value.msg() + + return obj +} + +// description is TBD +// Ecn returns a PatternFlowIpv4DscpEcn +func (obj *flowIpv4Dscp) Ecn() PatternFlowIpv4DscpEcn { + if obj.obj.Ecn == nil { + obj.obj.Ecn = NewPatternFlowIpv4DscpEcn().msg() + } + if obj.ecnHolder == nil { + obj.ecnHolder = &patternFlowIpv4DscpEcn{obj: obj.obj.Ecn} + } + return obj.ecnHolder +} + +// description is TBD +// Ecn returns a PatternFlowIpv4DscpEcn +func (obj *flowIpv4Dscp) HasEcn() bool { + return obj.obj.Ecn != nil +} + +// description is TBD +// SetEcn sets the PatternFlowIpv4DscpEcn value in the FlowIpv4Dscp object +func (obj *flowIpv4Dscp) SetEcn(value PatternFlowIpv4DscpEcn) FlowIpv4Dscp { + + obj.ecnHolder = nil + obj.obj.Ecn = value.msg() + + return obj +} + +func (obj *flowIpv4Dscp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Phb != nil { + + obj.Phb().validateObj(vObj, set_default) + } + + if obj.obj.Ecn != nil { + + obj.Ecn().validateObj(vObj, set_default) + } + +} + +func (obj *flowIpv4Dscp) setDefault() { + +} diff --git a/gosnappi/flow_ipv4_options.go b/gosnappi/flow_ipv4_options.go new file mode 100644 index 00000000..26b22e9d --- /dev/null +++ b/gosnappi/flow_ipv4_options.go @@ -0,0 +1,405 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIpv4Options ***** +type flowIpv4Options struct { + validation + obj *otg.FlowIpv4Options + marshaller marshalFlowIpv4Options + unMarshaller unMarshalFlowIpv4Options + customHolder FlowIpv4OptionsCustom +} + +func NewFlowIpv4Options() FlowIpv4Options { + obj := flowIpv4Options{obj: &otg.FlowIpv4Options{}} + obj.setDefault() + return &obj +} + +func (obj *flowIpv4Options) msg() *otg.FlowIpv4Options { + return obj.obj +} + +func (obj *flowIpv4Options) setMsg(msg *otg.FlowIpv4Options) FlowIpv4Options { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIpv4Options struct { + obj *flowIpv4Options +} + +type marshalFlowIpv4Options interface { + // ToProto marshals FlowIpv4Options to protobuf object *otg.FlowIpv4Options + ToProto() (*otg.FlowIpv4Options, error) + // ToPbText marshals FlowIpv4Options to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIpv4Options to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIpv4Options to JSON text + ToJson() (string, error) +} + +type unMarshalflowIpv4Options struct { + obj *flowIpv4Options +} + +type unMarshalFlowIpv4Options interface { + // FromProto unmarshals FlowIpv4Options from protobuf object *otg.FlowIpv4Options + FromProto(msg *otg.FlowIpv4Options) (FlowIpv4Options, error) + // FromPbText unmarshals FlowIpv4Options from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIpv4Options from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIpv4Options from JSON text + FromJson(value string) error +} + +func (obj *flowIpv4Options) Marshal() marshalFlowIpv4Options { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIpv4Options{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIpv4Options) Unmarshal() unMarshalFlowIpv4Options { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIpv4Options{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIpv4Options) ToProto() (*otg.FlowIpv4Options, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIpv4Options) FromProto(msg *otg.FlowIpv4Options) (FlowIpv4Options, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIpv4Options) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIpv4Options) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIpv4Options) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4Options) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIpv4Options) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4Options) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIpv4Options) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIpv4Options) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIpv4Options) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIpv4Options) Clone() (FlowIpv4Options, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIpv4Options() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowIpv4Options) setNil() { + obj.customHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowIpv4Options is iPv4 options are optional extensions for the IPv4 header that can be utilised to provide additional information about the IPv4 datagram. It is encoded as a series of type, length and value attributes. The IP header length MUST be increased to accommodate the extra bytes needed to encode the IP options. The length of the all options included to a IPv4 header should not exceed 40 bytes since IPv4 Header length (4 bits) can at max specify 15 4-word octets for a total of 60 bytes which includes 20 bytes needed for mandatory attributes of the IPv4 header. If the user adds multiples IPv4 options that exceeds 40 bytes and specify header length as "auto", implementation should throw error. Currently IP options supported are: 1. router_alert option allows devices to intercept packets not addressed to them directly as defined in RFC2113. 2. custom option is provided to configure user defined IP options as needed. +type FlowIpv4Options interface { + Validation + // msg marshals FlowIpv4Options to protobuf object *otg.FlowIpv4Options + // and doesn't set defaults + msg() *otg.FlowIpv4Options + // setMsg unmarshals FlowIpv4Options from protobuf object *otg.FlowIpv4Options + // and doesn't set defaults + setMsg(*otg.FlowIpv4Options) FlowIpv4Options + // provides marshal interface + Marshal() marshalFlowIpv4Options + // provides unmarshal interface + Unmarshal() unMarshalFlowIpv4Options + // validate validates FlowIpv4Options + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIpv4Options, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowIpv4OptionsChoiceEnum, set in FlowIpv4Options + Choice() FlowIpv4OptionsChoiceEnum + // setChoice assigns FlowIpv4OptionsChoiceEnum provided by user to FlowIpv4Options + setChoice(value FlowIpv4OptionsChoiceEnum) FlowIpv4Options + // HasChoice checks if Choice has been set in FlowIpv4Options + HasChoice() bool + // getter for RouterAlert to set choice. + RouterAlert() + // Custom returns FlowIpv4OptionsCustom, set in FlowIpv4Options. + // FlowIpv4OptionsCustom is user defined IP options to be appended to the IPv4 header. + Custom() FlowIpv4OptionsCustom + // SetCustom assigns FlowIpv4OptionsCustom provided by user to FlowIpv4Options. + // FlowIpv4OptionsCustom is user defined IP options to be appended to the IPv4 header. + SetCustom(value FlowIpv4OptionsCustom) FlowIpv4Options + // HasCustom checks if Custom has been set in FlowIpv4Options + HasCustom() bool + setNil() +} + +type FlowIpv4OptionsChoiceEnum string + +// Enum of Choice on FlowIpv4Options +var FlowIpv4OptionsChoice = struct { + ROUTER_ALERT FlowIpv4OptionsChoiceEnum + CUSTOM FlowIpv4OptionsChoiceEnum +}{ + ROUTER_ALERT: FlowIpv4OptionsChoiceEnum("router_alert"), + CUSTOM: FlowIpv4OptionsChoiceEnum("custom"), +} + +func (obj *flowIpv4Options) Choice() FlowIpv4OptionsChoiceEnum { + return FlowIpv4OptionsChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for RouterAlert to set choice +func (obj *flowIpv4Options) RouterAlert() { + obj.setChoice(FlowIpv4OptionsChoice.ROUTER_ALERT) +} + +// description is TBD +// Choice returns a string +func (obj *flowIpv4Options) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowIpv4Options) setChoice(value FlowIpv4OptionsChoiceEnum) FlowIpv4Options { + intValue, ok := otg.FlowIpv4Options_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowIpv4OptionsChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowIpv4Options_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.customHolder = nil + + if value == FlowIpv4OptionsChoice.CUSTOM { + obj.obj.Custom = NewFlowIpv4OptionsCustom().msg() + } + + return obj +} + +// description is TBD +// Custom returns a FlowIpv4OptionsCustom +func (obj *flowIpv4Options) Custom() FlowIpv4OptionsCustom { + if obj.obj.Custom == nil { + obj.setChoice(FlowIpv4OptionsChoice.CUSTOM) + } + if obj.customHolder == nil { + obj.customHolder = &flowIpv4OptionsCustom{obj: obj.obj.Custom} + } + return obj.customHolder +} + +// description is TBD +// Custom returns a FlowIpv4OptionsCustom +func (obj *flowIpv4Options) HasCustom() bool { + return obj.obj.Custom != nil +} + +// description is TBD +// SetCustom sets the FlowIpv4OptionsCustom value in the FlowIpv4Options object +func (obj *flowIpv4Options) SetCustom(value FlowIpv4OptionsCustom) FlowIpv4Options { + obj.setChoice(FlowIpv4OptionsChoice.CUSTOM) + obj.customHolder = nil + obj.obj.Custom = value.msg() + + return obj +} + +func (obj *flowIpv4Options) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Custom != nil { + + obj.Custom().validateObj(vObj, set_default) + } + +} + +func (obj *flowIpv4Options) setDefault() { + var choices_set int = 0 + var choice FlowIpv4OptionsChoiceEnum + + if obj.obj.Custom != nil { + choices_set += 1 + choice = FlowIpv4OptionsChoice.CUSTOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowIpv4OptionsChoice.ROUTER_ALERT) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowIpv4Options") + } + } else { + intVal := otg.FlowIpv4Options_Choice_Enum_value[string(choice)] + enumValue := otg.FlowIpv4Options_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_ipv4_options_custom.go b/gosnappi/flow_ipv4_options_custom.go new file mode 100644 index 00000000..ba640025 --- /dev/null +++ b/gosnappi/flow_ipv4_options_custom.go @@ -0,0 +1,414 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIpv4OptionsCustom ***** +type flowIpv4OptionsCustom struct { + validation + obj *otg.FlowIpv4OptionsCustom + marshaller marshalFlowIpv4OptionsCustom + unMarshaller unMarshalFlowIpv4OptionsCustom + typeHolder FlowIpv4OptionsCustomType + lengthHolder FlowIpv4OptionsCustomLength +} + +func NewFlowIpv4OptionsCustom() FlowIpv4OptionsCustom { + obj := flowIpv4OptionsCustom{obj: &otg.FlowIpv4OptionsCustom{}} + obj.setDefault() + return &obj +} + +func (obj *flowIpv4OptionsCustom) msg() *otg.FlowIpv4OptionsCustom { + return obj.obj +} + +func (obj *flowIpv4OptionsCustom) setMsg(msg *otg.FlowIpv4OptionsCustom) FlowIpv4OptionsCustom { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIpv4OptionsCustom struct { + obj *flowIpv4OptionsCustom +} + +type marshalFlowIpv4OptionsCustom interface { + // ToProto marshals FlowIpv4OptionsCustom to protobuf object *otg.FlowIpv4OptionsCustom + ToProto() (*otg.FlowIpv4OptionsCustom, error) + // ToPbText marshals FlowIpv4OptionsCustom to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIpv4OptionsCustom to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIpv4OptionsCustom to JSON text + ToJson() (string, error) +} + +type unMarshalflowIpv4OptionsCustom struct { + obj *flowIpv4OptionsCustom +} + +type unMarshalFlowIpv4OptionsCustom interface { + // FromProto unmarshals FlowIpv4OptionsCustom from protobuf object *otg.FlowIpv4OptionsCustom + FromProto(msg *otg.FlowIpv4OptionsCustom) (FlowIpv4OptionsCustom, error) + // FromPbText unmarshals FlowIpv4OptionsCustom from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIpv4OptionsCustom from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIpv4OptionsCustom from JSON text + FromJson(value string) error +} + +func (obj *flowIpv4OptionsCustom) Marshal() marshalFlowIpv4OptionsCustom { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIpv4OptionsCustom{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIpv4OptionsCustom) Unmarshal() unMarshalFlowIpv4OptionsCustom { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIpv4OptionsCustom{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIpv4OptionsCustom) ToProto() (*otg.FlowIpv4OptionsCustom, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIpv4OptionsCustom) FromProto(msg *otg.FlowIpv4OptionsCustom) (FlowIpv4OptionsCustom, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIpv4OptionsCustom) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIpv4OptionsCustom) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIpv4OptionsCustom) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4OptionsCustom) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIpv4OptionsCustom) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4OptionsCustom) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIpv4OptionsCustom) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIpv4OptionsCustom) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIpv4OptionsCustom) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIpv4OptionsCustom) Clone() (FlowIpv4OptionsCustom, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIpv4OptionsCustom() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowIpv4OptionsCustom) setNil() { + obj.typeHolder = nil + obj.lengthHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowIpv4OptionsCustom is user defined IP options to be appended to the IPv4 header. +type FlowIpv4OptionsCustom interface { + Validation + // msg marshals FlowIpv4OptionsCustom to protobuf object *otg.FlowIpv4OptionsCustom + // and doesn't set defaults + msg() *otg.FlowIpv4OptionsCustom + // setMsg unmarshals FlowIpv4OptionsCustom from protobuf object *otg.FlowIpv4OptionsCustom + // and doesn't set defaults + setMsg(*otg.FlowIpv4OptionsCustom) FlowIpv4OptionsCustom + // provides marshal interface + Marshal() marshalFlowIpv4OptionsCustom + // provides unmarshal interface + Unmarshal() unMarshalFlowIpv4OptionsCustom + // validate validates FlowIpv4OptionsCustom + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIpv4OptionsCustom, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns FlowIpv4OptionsCustomType, set in FlowIpv4OptionsCustom. + // FlowIpv4OptionsCustomType is type options for custom options. + Type() FlowIpv4OptionsCustomType + // SetType assigns FlowIpv4OptionsCustomType provided by user to FlowIpv4OptionsCustom. + // FlowIpv4OptionsCustomType is type options for custom options. + SetType(value FlowIpv4OptionsCustomType) FlowIpv4OptionsCustom + // HasType checks if Type has been set in FlowIpv4OptionsCustom + HasType() bool + // Length returns FlowIpv4OptionsCustomLength, set in FlowIpv4OptionsCustom. + // FlowIpv4OptionsCustomLength is length for custom options. + Length() FlowIpv4OptionsCustomLength + // SetLength assigns FlowIpv4OptionsCustomLength provided by user to FlowIpv4OptionsCustom. + // FlowIpv4OptionsCustomLength is length for custom options. + SetLength(value FlowIpv4OptionsCustomLength) FlowIpv4OptionsCustom + // HasLength checks if Length has been set in FlowIpv4OptionsCustom + HasLength() bool + // Value returns string, set in FlowIpv4OptionsCustom. + Value() string + // SetValue assigns string provided by user to FlowIpv4OptionsCustom + SetValue(value string) FlowIpv4OptionsCustom + // HasValue checks if Value has been set in FlowIpv4OptionsCustom + HasValue() bool + setNil() +} + +// description is TBD +// Type returns a FlowIpv4OptionsCustomType +func (obj *flowIpv4OptionsCustom) Type() FlowIpv4OptionsCustomType { + if obj.obj.Type == nil { + obj.obj.Type = NewFlowIpv4OptionsCustomType().msg() + } + if obj.typeHolder == nil { + obj.typeHolder = &flowIpv4OptionsCustomType{obj: obj.obj.Type} + } + return obj.typeHolder +} + +// description is TBD +// Type returns a FlowIpv4OptionsCustomType +func (obj *flowIpv4OptionsCustom) HasType() bool { + return obj.obj.Type != nil +} + +// description is TBD +// SetType sets the FlowIpv4OptionsCustomType value in the FlowIpv4OptionsCustom object +func (obj *flowIpv4OptionsCustom) SetType(value FlowIpv4OptionsCustomType) FlowIpv4OptionsCustom { + + obj.typeHolder = nil + obj.obj.Type = value.msg() + + return obj +} + +// description is TBD +// Length returns a FlowIpv4OptionsCustomLength +func (obj *flowIpv4OptionsCustom) Length() FlowIpv4OptionsCustomLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowIpv4OptionsCustomLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowIpv4OptionsCustomLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// description is TBD +// Length returns a FlowIpv4OptionsCustomLength +func (obj *flowIpv4OptionsCustom) HasLength() bool { + return obj.obj.Length != nil +} + +// description is TBD +// SetLength sets the FlowIpv4OptionsCustomLength value in the FlowIpv4OptionsCustom object +func (obj *flowIpv4OptionsCustom) SetLength(value FlowIpv4OptionsCustomLength) FlowIpv4OptionsCustom { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// Value of the option field should not excced 38 bytes since maximum 40 bytes can be added as options in IPv4 header. For type and length requires 2 bytes, hence maximum of 38 bytes are expected. Maximum length of this attribute is 76 (38 * 2 hex character per byte). +// Value returns a string +func (obj *flowIpv4OptionsCustom) Value() string { + + return *obj.obj.Value + +} + +// Value of the option field should not excced 38 bytes since maximum 40 bytes can be added as options in IPv4 header. For type and length requires 2 bytes, hence maximum of 38 bytes are expected. Maximum length of this attribute is 76 (38 * 2 hex character per byte). +// Value returns a string +func (obj *flowIpv4OptionsCustom) HasValue() bool { + return obj.obj.Value != nil +} + +// Value of the option field should not excced 38 bytes since maximum 40 bytes can be added as options in IPv4 header. For type and length requires 2 bytes, hence maximum of 38 bytes are expected. Maximum length of this attribute is 76 (38 * 2 hex character per byte). +// SetValue sets the string value in the FlowIpv4OptionsCustom object +func (obj *flowIpv4OptionsCustom) SetValue(value string) FlowIpv4OptionsCustom { + + obj.obj.Value = &value + return obj +} + +func (obj *flowIpv4OptionsCustom) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Type != nil { + + obj.Type().validateObj(vObj, set_default) + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.Value != nil { + + if len(*obj.obj.Value) < 0 || len(*obj.obj.Value) > 76 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of FlowIpv4OptionsCustom.Value <= 76 but Got %d", + len(*obj.obj.Value))) + } + + } + +} + +func (obj *flowIpv4OptionsCustom) setDefault() { + if obj.obj.Value == nil { + obj.SetValue("0000") + } + +} diff --git a/gosnappi/flow_ipv4_options_custom_length.go b/gosnappi/flow_ipv4_options_custom_length.go new file mode 100644 index 00000000..86c032fb --- /dev/null +++ b/gosnappi/flow_ipv4_options_custom_length.go @@ -0,0 +1,413 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIpv4OptionsCustomLength ***** +type flowIpv4OptionsCustomLength struct { + validation + obj *otg.FlowIpv4OptionsCustomLength + marshaller marshalFlowIpv4OptionsCustomLength + unMarshaller unMarshalFlowIpv4OptionsCustomLength +} + +func NewFlowIpv4OptionsCustomLength() FlowIpv4OptionsCustomLength { + obj := flowIpv4OptionsCustomLength{obj: &otg.FlowIpv4OptionsCustomLength{}} + obj.setDefault() + return &obj +} + +func (obj *flowIpv4OptionsCustomLength) msg() *otg.FlowIpv4OptionsCustomLength { + return obj.obj +} + +func (obj *flowIpv4OptionsCustomLength) setMsg(msg *otg.FlowIpv4OptionsCustomLength) FlowIpv4OptionsCustomLength { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIpv4OptionsCustomLength struct { + obj *flowIpv4OptionsCustomLength +} + +type marshalFlowIpv4OptionsCustomLength interface { + // ToProto marshals FlowIpv4OptionsCustomLength to protobuf object *otg.FlowIpv4OptionsCustomLength + ToProto() (*otg.FlowIpv4OptionsCustomLength, error) + // ToPbText marshals FlowIpv4OptionsCustomLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIpv4OptionsCustomLength to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIpv4OptionsCustomLength to JSON text + ToJson() (string, error) +} + +type unMarshalflowIpv4OptionsCustomLength struct { + obj *flowIpv4OptionsCustomLength +} + +type unMarshalFlowIpv4OptionsCustomLength interface { + // FromProto unmarshals FlowIpv4OptionsCustomLength from protobuf object *otg.FlowIpv4OptionsCustomLength + FromProto(msg *otg.FlowIpv4OptionsCustomLength) (FlowIpv4OptionsCustomLength, error) + // FromPbText unmarshals FlowIpv4OptionsCustomLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIpv4OptionsCustomLength from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIpv4OptionsCustomLength from JSON text + FromJson(value string) error +} + +func (obj *flowIpv4OptionsCustomLength) Marshal() marshalFlowIpv4OptionsCustomLength { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIpv4OptionsCustomLength{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIpv4OptionsCustomLength) Unmarshal() unMarshalFlowIpv4OptionsCustomLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIpv4OptionsCustomLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIpv4OptionsCustomLength) ToProto() (*otg.FlowIpv4OptionsCustomLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIpv4OptionsCustomLength) FromProto(msg *otg.FlowIpv4OptionsCustomLength) (FlowIpv4OptionsCustomLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIpv4OptionsCustomLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIpv4OptionsCustomLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIpv4OptionsCustomLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4OptionsCustomLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIpv4OptionsCustomLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4OptionsCustomLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIpv4OptionsCustomLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIpv4OptionsCustomLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIpv4OptionsCustomLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIpv4OptionsCustomLength) Clone() (FlowIpv4OptionsCustomLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIpv4OptionsCustomLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowIpv4OptionsCustomLength is length for custom options. +type FlowIpv4OptionsCustomLength interface { + Validation + // msg marshals FlowIpv4OptionsCustomLength to protobuf object *otg.FlowIpv4OptionsCustomLength + // and doesn't set defaults + msg() *otg.FlowIpv4OptionsCustomLength + // setMsg unmarshals FlowIpv4OptionsCustomLength from protobuf object *otg.FlowIpv4OptionsCustomLength + // and doesn't set defaults + setMsg(*otg.FlowIpv4OptionsCustomLength) FlowIpv4OptionsCustomLength + // provides marshal interface + Marshal() marshalFlowIpv4OptionsCustomLength + // provides unmarshal interface + Unmarshal() unMarshalFlowIpv4OptionsCustomLength + // validate validates FlowIpv4OptionsCustomLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIpv4OptionsCustomLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowIpv4OptionsCustomLengthChoiceEnum, set in FlowIpv4OptionsCustomLength + Choice() FlowIpv4OptionsCustomLengthChoiceEnum + // setChoice assigns FlowIpv4OptionsCustomLengthChoiceEnum provided by user to FlowIpv4OptionsCustomLength + setChoice(value FlowIpv4OptionsCustomLengthChoiceEnum) FlowIpv4OptionsCustomLength + // HasChoice checks if Choice has been set in FlowIpv4OptionsCustomLength + HasChoice() bool + // Auto returns uint32, set in FlowIpv4OptionsCustomLength. + Auto() uint32 + // HasAuto checks if Auto has been set in FlowIpv4OptionsCustomLength + HasAuto() bool + // Value returns uint32, set in FlowIpv4OptionsCustomLength. + Value() uint32 + // SetValue assigns uint32 provided by user to FlowIpv4OptionsCustomLength + SetValue(value uint32) FlowIpv4OptionsCustomLength + // HasValue checks if Value has been set in FlowIpv4OptionsCustomLength + HasValue() bool +} + +type FlowIpv4OptionsCustomLengthChoiceEnum string + +// Enum of Choice on FlowIpv4OptionsCustomLength +var FlowIpv4OptionsCustomLengthChoice = struct { + AUTO FlowIpv4OptionsCustomLengthChoiceEnum + VALUE FlowIpv4OptionsCustomLengthChoiceEnum +}{ + AUTO: FlowIpv4OptionsCustomLengthChoiceEnum("auto"), + VALUE: FlowIpv4OptionsCustomLengthChoiceEnum("value"), +} + +func (obj *flowIpv4OptionsCustomLength) Choice() FlowIpv4OptionsCustomLengthChoiceEnum { + return FlowIpv4OptionsCustomLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// auto or configured value. +// Choice returns a string +func (obj *flowIpv4OptionsCustomLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowIpv4OptionsCustomLength) setChoice(value FlowIpv4OptionsCustomLengthChoiceEnum) FlowIpv4OptionsCustomLength { + intValue, ok := otg.FlowIpv4OptionsCustomLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowIpv4OptionsCustomLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowIpv4OptionsCustomLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Value = nil + obj.obj.Auto = nil + + if value == FlowIpv4OptionsCustomLengthChoice.AUTO { + defaultValue := uint32(0) + obj.obj.Auto = &defaultValue + } + + if value == FlowIpv4OptionsCustomLengthChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + return obj +} + +// The OTG implementation can provide a system generated value for this property. If the OTG is unable to generate a value the default value must be used. +// Auto returns a uint32 +func (obj *flowIpv4OptionsCustomLength) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(FlowIpv4OptionsCustomLengthChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated value for this property. If the OTG is unable to generate a value the default value must be used. +// Auto returns a uint32 +func (obj *flowIpv4OptionsCustomLength) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Value returns a uint32 +func (obj *flowIpv4OptionsCustomLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(FlowIpv4OptionsCustomLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *flowIpv4OptionsCustomLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the FlowIpv4OptionsCustomLength object +func (obj *flowIpv4OptionsCustomLength) SetValue(value uint32) FlowIpv4OptionsCustomLength { + obj.setChoice(FlowIpv4OptionsCustomLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +func (obj *flowIpv4OptionsCustomLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *flowIpv4OptionsCustomLength) setDefault() { + var choices_set int = 0 + var choice FlowIpv4OptionsCustomLengthChoiceEnum + + if obj.obj.Auto != nil { + choices_set += 1 + choice = FlowIpv4OptionsCustomLengthChoice.AUTO + } + + if obj.obj.Value != nil { + choices_set += 1 + choice = FlowIpv4OptionsCustomLengthChoice.VALUE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowIpv4OptionsCustomLengthChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowIpv4OptionsCustomLength") + } + } else { + intVal := otg.FlowIpv4OptionsCustomLength_Choice_Enum_value[string(choice)] + enumValue := otg.FlowIpv4OptionsCustomLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_ipv4_options_custom_type.go b/gosnappi/flow_ipv4_options_custom_type.go new file mode 100644 index 00000000..85c08f9c --- /dev/null +++ b/gosnappi/flow_ipv4_options_custom_type.go @@ -0,0 +1,414 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIpv4OptionsCustomType ***** +type flowIpv4OptionsCustomType struct { + validation + obj *otg.FlowIpv4OptionsCustomType + marshaller marshalFlowIpv4OptionsCustomType + unMarshaller unMarshalFlowIpv4OptionsCustomType + copiedFlagHolder PatternFlowIpv4OptionsCustomTypeCopiedFlag + optionClassHolder PatternFlowIpv4OptionsCustomTypeOptionClass + optionNumberHolder PatternFlowIpv4OptionsCustomTypeOptionNumber +} + +func NewFlowIpv4OptionsCustomType() FlowIpv4OptionsCustomType { + obj := flowIpv4OptionsCustomType{obj: &otg.FlowIpv4OptionsCustomType{}} + obj.setDefault() + return &obj +} + +func (obj *flowIpv4OptionsCustomType) msg() *otg.FlowIpv4OptionsCustomType { + return obj.obj +} + +func (obj *flowIpv4OptionsCustomType) setMsg(msg *otg.FlowIpv4OptionsCustomType) FlowIpv4OptionsCustomType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIpv4OptionsCustomType struct { + obj *flowIpv4OptionsCustomType +} + +type marshalFlowIpv4OptionsCustomType interface { + // ToProto marshals FlowIpv4OptionsCustomType to protobuf object *otg.FlowIpv4OptionsCustomType + ToProto() (*otg.FlowIpv4OptionsCustomType, error) + // ToPbText marshals FlowIpv4OptionsCustomType to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIpv4OptionsCustomType to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIpv4OptionsCustomType to JSON text + ToJson() (string, error) +} + +type unMarshalflowIpv4OptionsCustomType struct { + obj *flowIpv4OptionsCustomType +} + +type unMarshalFlowIpv4OptionsCustomType interface { + // FromProto unmarshals FlowIpv4OptionsCustomType from protobuf object *otg.FlowIpv4OptionsCustomType + FromProto(msg *otg.FlowIpv4OptionsCustomType) (FlowIpv4OptionsCustomType, error) + // FromPbText unmarshals FlowIpv4OptionsCustomType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIpv4OptionsCustomType from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIpv4OptionsCustomType from JSON text + FromJson(value string) error +} + +func (obj *flowIpv4OptionsCustomType) Marshal() marshalFlowIpv4OptionsCustomType { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIpv4OptionsCustomType{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIpv4OptionsCustomType) Unmarshal() unMarshalFlowIpv4OptionsCustomType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIpv4OptionsCustomType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIpv4OptionsCustomType) ToProto() (*otg.FlowIpv4OptionsCustomType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIpv4OptionsCustomType) FromProto(msg *otg.FlowIpv4OptionsCustomType) (FlowIpv4OptionsCustomType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIpv4OptionsCustomType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIpv4OptionsCustomType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIpv4OptionsCustomType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4OptionsCustomType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIpv4OptionsCustomType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4OptionsCustomType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIpv4OptionsCustomType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIpv4OptionsCustomType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIpv4OptionsCustomType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIpv4OptionsCustomType) Clone() (FlowIpv4OptionsCustomType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIpv4OptionsCustomType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowIpv4OptionsCustomType) setNil() { + obj.copiedFlagHolder = nil + obj.optionClassHolder = nil + obj.optionNumberHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowIpv4OptionsCustomType is type options for custom options. +type FlowIpv4OptionsCustomType interface { + Validation + // msg marshals FlowIpv4OptionsCustomType to protobuf object *otg.FlowIpv4OptionsCustomType + // and doesn't set defaults + msg() *otg.FlowIpv4OptionsCustomType + // setMsg unmarshals FlowIpv4OptionsCustomType from protobuf object *otg.FlowIpv4OptionsCustomType + // and doesn't set defaults + setMsg(*otg.FlowIpv4OptionsCustomType) FlowIpv4OptionsCustomType + // provides marshal interface + Marshal() marshalFlowIpv4OptionsCustomType + // provides unmarshal interface + Unmarshal() unMarshalFlowIpv4OptionsCustomType + // validate validates FlowIpv4OptionsCustomType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIpv4OptionsCustomType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // CopiedFlag returns PatternFlowIpv4OptionsCustomTypeCopiedFlag, set in FlowIpv4OptionsCustomType. + // PatternFlowIpv4OptionsCustomTypeCopiedFlag is this flag indicates this option is copied to all fragments on fragmentations. + CopiedFlag() PatternFlowIpv4OptionsCustomTypeCopiedFlag + // SetCopiedFlag assigns PatternFlowIpv4OptionsCustomTypeCopiedFlag provided by user to FlowIpv4OptionsCustomType. + // PatternFlowIpv4OptionsCustomTypeCopiedFlag is this flag indicates this option is copied to all fragments on fragmentations. + SetCopiedFlag(value PatternFlowIpv4OptionsCustomTypeCopiedFlag) FlowIpv4OptionsCustomType + // HasCopiedFlag checks if CopiedFlag has been set in FlowIpv4OptionsCustomType + HasCopiedFlag() bool + // OptionClass returns PatternFlowIpv4OptionsCustomTypeOptionClass, set in FlowIpv4OptionsCustomType. + // PatternFlowIpv4OptionsCustomTypeOptionClass is option class [Ref:https://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml#ip-parameters-1]. + OptionClass() PatternFlowIpv4OptionsCustomTypeOptionClass + // SetOptionClass assigns PatternFlowIpv4OptionsCustomTypeOptionClass provided by user to FlowIpv4OptionsCustomType. + // PatternFlowIpv4OptionsCustomTypeOptionClass is option class [Ref:https://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml#ip-parameters-1]. + SetOptionClass(value PatternFlowIpv4OptionsCustomTypeOptionClass) FlowIpv4OptionsCustomType + // HasOptionClass checks if OptionClass has been set in FlowIpv4OptionsCustomType + HasOptionClass() bool + // OptionNumber returns PatternFlowIpv4OptionsCustomTypeOptionNumber, set in FlowIpv4OptionsCustomType. + // PatternFlowIpv4OptionsCustomTypeOptionNumber is option Number [Ref:https://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml#ip-parameters-1]. + OptionNumber() PatternFlowIpv4OptionsCustomTypeOptionNumber + // SetOptionNumber assigns PatternFlowIpv4OptionsCustomTypeOptionNumber provided by user to FlowIpv4OptionsCustomType. + // PatternFlowIpv4OptionsCustomTypeOptionNumber is option Number [Ref:https://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml#ip-parameters-1]. + SetOptionNumber(value PatternFlowIpv4OptionsCustomTypeOptionNumber) FlowIpv4OptionsCustomType + // HasOptionNumber checks if OptionNumber has been set in FlowIpv4OptionsCustomType + HasOptionNumber() bool + setNil() +} + +// description is TBD +// CopiedFlag returns a PatternFlowIpv4OptionsCustomTypeCopiedFlag +func (obj *flowIpv4OptionsCustomType) CopiedFlag() PatternFlowIpv4OptionsCustomTypeCopiedFlag { + if obj.obj.CopiedFlag == nil { + obj.obj.CopiedFlag = NewPatternFlowIpv4OptionsCustomTypeCopiedFlag().msg() + } + if obj.copiedFlagHolder == nil { + obj.copiedFlagHolder = &patternFlowIpv4OptionsCustomTypeCopiedFlag{obj: obj.obj.CopiedFlag} + } + return obj.copiedFlagHolder +} + +// description is TBD +// CopiedFlag returns a PatternFlowIpv4OptionsCustomTypeCopiedFlag +func (obj *flowIpv4OptionsCustomType) HasCopiedFlag() bool { + return obj.obj.CopiedFlag != nil +} + +// description is TBD +// SetCopiedFlag sets the PatternFlowIpv4OptionsCustomTypeCopiedFlag value in the FlowIpv4OptionsCustomType object +func (obj *flowIpv4OptionsCustomType) SetCopiedFlag(value PatternFlowIpv4OptionsCustomTypeCopiedFlag) FlowIpv4OptionsCustomType { + + obj.copiedFlagHolder = nil + obj.obj.CopiedFlag = value.msg() + + return obj +} + +// description is TBD +// OptionClass returns a PatternFlowIpv4OptionsCustomTypeOptionClass +func (obj *flowIpv4OptionsCustomType) OptionClass() PatternFlowIpv4OptionsCustomTypeOptionClass { + if obj.obj.OptionClass == nil { + obj.obj.OptionClass = NewPatternFlowIpv4OptionsCustomTypeOptionClass().msg() + } + if obj.optionClassHolder == nil { + obj.optionClassHolder = &patternFlowIpv4OptionsCustomTypeOptionClass{obj: obj.obj.OptionClass} + } + return obj.optionClassHolder +} + +// description is TBD +// OptionClass returns a PatternFlowIpv4OptionsCustomTypeOptionClass +func (obj *flowIpv4OptionsCustomType) HasOptionClass() bool { + return obj.obj.OptionClass != nil +} + +// description is TBD +// SetOptionClass sets the PatternFlowIpv4OptionsCustomTypeOptionClass value in the FlowIpv4OptionsCustomType object +func (obj *flowIpv4OptionsCustomType) SetOptionClass(value PatternFlowIpv4OptionsCustomTypeOptionClass) FlowIpv4OptionsCustomType { + + obj.optionClassHolder = nil + obj.obj.OptionClass = value.msg() + + return obj +} + +// description is TBD +// OptionNumber returns a PatternFlowIpv4OptionsCustomTypeOptionNumber +func (obj *flowIpv4OptionsCustomType) OptionNumber() PatternFlowIpv4OptionsCustomTypeOptionNumber { + if obj.obj.OptionNumber == nil { + obj.obj.OptionNumber = NewPatternFlowIpv4OptionsCustomTypeOptionNumber().msg() + } + if obj.optionNumberHolder == nil { + obj.optionNumberHolder = &patternFlowIpv4OptionsCustomTypeOptionNumber{obj: obj.obj.OptionNumber} + } + return obj.optionNumberHolder +} + +// description is TBD +// OptionNumber returns a PatternFlowIpv4OptionsCustomTypeOptionNumber +func (obj *flowIpv4OptionsCustomType) HasOptionNumber() bool { + return obj.obj.OptionNumber != nil +} + +// description is TBD +// SetOptionNumber sets the PatternFlowIpv4OptionsCustomTypeOptionNumber value in the FlowIpv4OptionsCustomType object +func (obj *flowIpv4OptionsCustomType) SetOptionNumber(value PatternFlowIpv4OptionsCustomTypeOptionNumber) FlowIpv4OptionsCustomType { + + obj.optionNumberHolder = nil + obj.obj.OptionNumber = value.msg() + + return obj +} + +func (obj *flowIpv4OptionsCustomType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.CopiedFlag != nil { + + obj.CopiedFlag().validateObj(vObj, set_default) + } + + if obj.obj.OptionClass != nil { + + obj.OptionClass().validateObj(vObj, set_default) + } + + if obj.obj.OptionNumber != nil { + + obj.OptionNumber().validateObj(vObj, set_default) + } + +} + +func (obj *flowIpv4OptionsCustomType) setDefault() { + +} diff --git a/gosnappi/flow_ipv4_priority.go b/gosnappi/flow_ipv4_priority.go new file mode 100644 index 00000000..ce5cf8bb --- /dev/null +++ b/gosnappi/flow_ipv4_priority.go @@ -0,0 +1,508 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIpv4Priority ***** +type flowIpv4Priority struct { + validation + obj *otg.FlowIpv4Priority + marshaller marshalFlowIpv4Priority + unMarshaller unMarshalFlowIpv4Priority + rawHolder PatternFlowIpv4PriorityRaw + tosHolder FlowIpv4Tos + dscpHolder FlowIpv4Dscp +} + +func NewFlowIpv4Priority() FlowIpv4Priority { + obj := flowIpv4Priority{obj: &otg.FlowIpv4Priority{}} + obj.setDefault() + return &obj +} + +func (obj *flowIpv4Priority) msg() *otg.FlowIpv4Priority { + return obj.obj +} + +func (obj *flowIpv4Priority) setMsg(msg *otg.FlowIpv4Priority) FlowIpv4Priority { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIpv4Priority struct { + obj *flowIpv4Priority +} + +type marshalFlowIpv4Priority interface { + // ToProto marshals FlowIpv4Priority to protobuf object *otg.FlowIpv4Priority + ToProto() (*otg.FlowIpv4Priority, error) + // ToPbText marshals FlowIpv4Priority to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIpv4Priority to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIpv4Priority to JSON text + ToJson() (string, error) +} + +type unMarshalflowIpv4Priority struct { + obj *flowIpv4Priority +} + +type unMarshalFlowIpv4Priority interface { + // FromProto unmarshals FlowIpv4Priority from protobuf object *otg.FlowIpv4Priority + FromProto(msg *otg.FlowIpv4Priority) (FlowIpv4Priority, error) + // FromPbText unmarshals FlowIpv4Priority from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIpv4Priority from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIpv4Priority from JSON text + FromJson(value string) error +} + +func (obj *flowIpv4Priority) Marshal() marshalFlowIpv4Priority { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIpv4Priority{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIpv4Priority) Unmarshal() unMarshalFlowIpv4Priority { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIpv4Priority{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIpv4Priority) ToProto() (*otg.FlowIpv4Priority, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIpv4Priority) FromProto(msg *otg.FlowIpv4Priority) (FlowIpv4Priority, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIpv4Priority) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIpv4Priority) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIpv4Priority) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4Priority) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIpv4Priority) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4Priority) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIpv4Priority) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIpv4Priority) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIpv4Priority) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIpv4Priority) Clone() (FlowIpv4Priority, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIpv4Priority() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowIpv4Priority) setNil() { + obj.rawHolder = nil + obj.tosHolder = nil + obj.dscpHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowIpv4Priority is a container for ipv4 raw, tos, dscp ip priorities. +type FlowIpv4Priority interface { + Validation + // msg marshals FlowIpv4Priority to protobuf object *otg.FlowIpv4Priority + // and doesn't set defaults + msg() *otg.FlowIpv4Priority + // setMsg unmarshals FlowIpv4Priority from protobuf object *otg.FlowIpv4Priority + // and doesn't set defaults + setMsg(*otg.FlowIpv4Priority) FlowIpv4Priority + // provides marshal interface + Marshal() marshalFlowIpv4Priority + // provides unmarshal interface + Unmarshal() unMarshalFlowIpv4Priority + // validate validates FlowIpv4Priority + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIpv4Priority, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowIpv4PriorityChoiceEnum, set in FlowIpv4Priority + Choice() FlowIpv4PriorityChoiceEnum + // setChoice assigns FlowIpv4PriorityChoiceEnum provided by user to FlowIpv4Priority + setChoice(value FlowIpv4PriorityChoiceEnum) FlowIpv4Priority + // HasChoice checks if Choice has been set in FlowIpv4Priority + HasChoice() bool + // Raw returns PatternFlowIpv4PriorityRaw, set in FlowIpv4Priority. + // PatternFlowIpv4PriorityRaw is raw priority + Raw() PatternFlowIpv4PriorityRaw + // SetRaw assigns PatternFlowIpv4PriorityRaw provided by user to FlowIpv4Priority. + // PatternFlowIpv4PriorityRaw is raw priority + SetRaw(value PatternFlowIpv4PriorityRaw) FlowIpv4Priority + // HasRaw checks if Raw has been set in FlowIpv4Priority + HasRaw() bool + // Tos returns FlowIpv4Tos, set in FlowIpv4Priority. + // FlowIpv4Tos is type of service (TOS) packet field. + Tos() FlowIpv4Tos + // SetTos assigns FlowIpv4Tos provided by user to FlowIpv4Priority. + // FlowIpv4Tos is type of service (TOS) packet field. + SetTos(value FlowIpv4Tos) FlowIpv4Priority + // HasTos checks if Tos has been set in FlowIpv4Priority + HasTos() bool + // Dscp returns FlowIpv4Dscp, set in FlowIpv4Priority. + // FlowIpv4Dscp is differentiated services code point (DSCP) packet field. + Dscp() FlowIpv4Dscp + // SetDscp assigns FlowIpv4Dscp provided by user to FlowIpv4Priority. + // FlowIpv4Dscp is differentiated services code point (DSCP) packet field. + SetDscp(value FlowIpv4Dscp) FlowIpv4Priority + // HasDscp checks if Dscp has been set in FlowIpv4Priority + HasDscp() bool + setNil() +} + +type FlowIpv4PriorityChoiceEnum string + +// Enum of Choice on FlowIpv4Priority +var FlowIpv4PriorityChoice = struct { + RAW FlowIpv4PriorityChoiceEnum + TOS FlowIpv4PriorityChoiceEnum + DSCP FlowIpv4PriorityChoiceEnum +}{ + RAW: FlowIpv4PriorityChoiceEnum("raw"), + TOS: FlowIpv4PriorityChoiceEnum("tos"), + DSCP: FlowIpv4PriorityChoiceEnum("dscp"), +} + +func (obj *flowIpv4Priority) Choice() FlowIpv4PriorityChoiceEnum { + return FlowIpv4PriorityChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowIpv4Priority) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowIpv4Priority) setChoice(value FlowIpv4PriorityChoiceEnum) FlowIpv4Priority { + intValue, ok := otg.FlowIpv4Priority_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowIpv4PriorityChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowIpv4Priority_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Dscp = nil + obj.dscpHolder = nil + obj.obj.Tos = nil + obj.tosHolder = nil + obj.obj.Raw = nil + obj.rawHolder = nil + + if value == FlowIpv4PriorityChoice.RAW { + obj.obj.Raw = NewPatternFlowIpv4PriorityRaw().msg() + } + + if value == FlowIpv4PriorityChoice.TOS { + obj.obj.Tos = NewFlowIpv4Tos().msg() + } + + if value == FlowIpv4PriorityChoice.DSCP { + obj.obj.Dscp = NewFlowIpv4Dscp().msg() + } + + return obj +} + +// description is TBD +// Raw returns a PatternFlowIpv4PriorityRaw +func (obj *flowIpv4Priority) Raw() PatternFlowIpv4PriorityRaw { + if obj.obj.Raw == nil { + obj.setChoice(FlowIpv4PriorityChoice.RAW) + } + if obj.rawHolder == nil { + obj.rawHolder = &patternFlowIpv4PriorityRaw{obj: obj.obj.Raw} + } + return obj.rawHolder +} + +// description is TBD +// Raw returns a PatternFlowIpv4PriorityRaw +func (obj *flowIpv4Priority) HasRaw() bool { + return obj.obj.Raw != nil +} + +// description is TBD +// SetRaw sets the PatternFlowIpv4PriorityRaw value in the FlowIpv4Priority object +func (obj *flowIpv4Priority) SetRaw(value PatternFlowIpv4PriorityRaw) FlowIpv4Priority { + obj.setChoice(FlowIpv4PriorityChoice.RAW) + obj.rawHolder = nil + obj.obj.Raw = value.msg() + + return obj +} + +// description is TBD +// Tos returns a FlowIpv4Tos +func (obj *flowIpv4Priority) Tos() FlowIpv4Tos { + if obj.obj.Tos == nil { + obj.setChoice(FlowIpv4PriorityChoice.TOS) + } + if obj.tosHolder == nil { + obj.tosHolder = &flowIpv4Tos{obj: obj.obj.Tos} + } + return obj.tosHolder +} + +// description is TBD +// Tos returns a FlowIpv4Tos +func (obj *flowIpv4Priority) HasTos() bool { + return obj.obj.Tos != nil +} + +// description is TBD +// SetTos sets the FlowIpv4Tos value in the FlowIpv4Priority object +func (obj *flowIpv4Priority) SetTos(value FlowIpv4Tos) FlowIpv4Priority { + obj.setChoice(FlowIpv4PriorityChoice.TOS) + obj.tosHolder = nil + obj.obj.Tos = value.msg() + + return obj +} + +// description is TBD +// Dscp returns a FlowIpv4Dscp +func (obj *flowIpv4Priority) Dscp() FlowIpv4Dscp { + if obj.obj.Dscp == nil { + obj.setChoice(FlowIpv4PriorityChoice.DSCP) + } + if obj.dscpHolder == nil { + obj.dscpHolder = &flowIpv4Dscp{obj: obj.obj.Dscp} + } + return obj.dscpHolder +} + +// description is TBD +// Dscp returns a FlowIpv4Dscp +func (obj *flowIpv4Priority) HasDscp() bool { + return obj.obj.Dscp != nil +} + +// description is TBD +// SetDscp sets the FlowIpv4Dscp value in the FlowIpv4Priority object +func (obj *flowIpv4Priority) SetDscp(value FlowIpv4Dscp) FlowIpv4Priority { + obj.setChoice(FlowIpv4PriorityChoice.DSCP) + obj.dscpHolder = nil + obj.obj.Dscp = value.msg() + + return obj +} + +func (obj *flowIpv4Priority) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Raw != nil { + + obj.Raw().validateObj(vObj, set_default) + } + + if obj.obj.Tos != nil { + + obj.Tos().validateObj(vObj, set_default) + } + + if obj.obj.Dscp != nil { + + obj.Dscp().validateObj(vObj, set_default) + } + +} + +func (obj *flowIpv4Priority) setDefault() { + var choices_set int = 0 + var choice FlowIpv4PriorityChoiceEnum + + if obj.obj.Raw != nil { + choices_set += 1 + choice = FlowIpv4PriorityChoice.RAW + } + + if obj.obj.Tos != nil { + choices_set += 1 + choice = FlowIpv4PriorityChoice.TOS + } + + if obj.obj.Dscp != nil { + choices_set += 1 + choice = FlowIpv4PriorityChoice.DSCP + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowIpv4PriorityChoice.DSCP) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowIpv4Priority") + } + } else { + intVal := otg.FlowIpv4Priority_Choice_Enum_value[string(choice)] + enumValue := otg.FlowIpv4Priority_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_ipv4_tos.go b/gosnappi/flow_ipv4_tos.go new file mode 100644 index 00000000..1bd1f84e --- /dev/null +++ b/gosnappi/flow_ipv4_tos.go @@ -0,0 +1,543 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIpv4Tos ***** +type flowIpv4Tos struct { + validation + obj *otg.FlowIpv4Tos + marshaller marshalFlowIpv4Tos + unMarshaller unMarshalFlowIpv4Tos + precedenceHolder PatternFlowIpv4TosPrecedence + delayHolder PatternFlowIpv4TosDelay + throughputHolder PatternFlowIpv4TosThroughput + reliabilityHolder PatternFlowIpv4TosReliability + monetaryHolder PatternFlowIpv4TosMonetary + unusedHolder PatternFlowIpv4TosUnused +} + +func NewFlowIpv4Tos() FlowIpv4Tos { + obj := flowIpv4Tos{obj: &otg.FlowIpv4Tos{}} + obj.setDefault() + return &obj +} + +func (obj *flowIpv4Tos) msg() *otg.FlowIpv4Tos { + return obj.obj +} + +func (obj *flowIpv4Tos) setMsg(msg *otg.FlowIpv4Tos) FlowIpv4Tos { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIpv4Tos struct { + obj *flowIpv4Tos +} + +type marshalFlowIpv4Tos interface { + // ToProto marshals FlowIpv4Tos to protobuf object *otg.FlowIpv4Tos + ToProto() (*otg.FlowIpv4Tos, error) + // ToPbText marshals FlowIpv4Tos to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIpv4Tos to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIpv4Tos to JSON text + ToJson() (string, error) +} + +type unMarshalflowIpv4Tos struct { + obj *flowIpv4Tos +} + +type unMarshalFlowIpv4Tos interface { + // FromProto unmarshals FlowIpv4Tos from protobuf object *otg.FlowIpv4Tos + FromProto(msg *otg.FlowIpv4Tos) (FlowIpv4Tos, error) + // FromPbText unmarshals FlowIpv4Tos from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIpv4Tos from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIpv4Tos from JSON text + FromJson(value string) error +} + +func (obj *flowIpv4Tos) Marshal() marshalFlowIpv4Tos { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIpv4Tos{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIpv4Tos) Unmarshal() unMarshalFlowIpv4Tos { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIpv4Tos{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIpv4Tos) ToProto() (*otg.FlowIpv4Tos, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIpv4Tos) FromProto(msg *otg.FlowIpv4Tos) (FlowIpv4Tos, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIpv4Tos) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIpv4Tos) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIpv4Tos) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4Tos) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIpv4Tos) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv4Tos) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIpv4Tos) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIpv4Tos) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIpv4Tos) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIpv4Tos) Clone() (FlowIpv4Tos, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIpv4Tos() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowIpv4Tos) setNil() { + obj.precedenceHolder = nil + obj.delayHolder = nil + obj.throughputHolder = nil + obj.reliabilityHolder = nil + obj.monetaryHolder = nil + obj.unusedHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowIpv4Tos is type of service (TOS) packet field. +type FlowIpv4Tos interface { + Validation + // msg marshals FlowIpv4Tos to protobuf object *otg.FlowIpv4Tos + // and doesn't set defaults + msg() *otg.FlowIpv4Tos + // setMsg unmarshals FlowIpv4Tos from protobuf object *otg.FlowIpv4Tos + // and doesn't set defaults + setMsg(*otg.FlowIpv4Tos) FlowIpv4Tos + // provides marshal interface + Marshal() marshalFlowIpv4Tos + // provides unmarshal interface + Unmarshal() unMarshalFlowIpv4Tos + // validate validates FlowIpv4Tos + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIpv4Tos, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Precedence returns PatternFlowIpv4TosPrecedence, set in FlowIpv4Tos. + // PatternFlowIpv4TosPrecedence is precedence + Precedence() PatternFlowIpv4TosPrecedence + // SetPrecedence assigns PatternFlowIpv4TosPrecedence provided by user to FlowIpv4Tos. + // PatternFlowIpv4TosPrecedence is precedence + SetPrecedence(value PatternFlowIpv4TosPrecedence) FlowIpv4Tos + // HasPrecedence checks if Precedence has been set in FlowIpv4Tos + HasPrecedence() bool + // Delay returns PatternFlowIpv4TosDelay, set in FlowIpv4Tos. + // PatternFlowIpv4TosDelay is delay + Delay() PatternFlowIpv4TosDelay + // SetDelay assigns PatternFlowIpv4TosDelay provided by user to FlowIpv4Tos. + // PatternFlowIpv4TosDelay is delay + SetDelay(value PatternFlowIpv4TosDelay) FlowIpv4Tos + // HasDelay checks if Delay has been set in FlowIpv4Tos + HasDelay() bool + // Throughput returns PatternFlowIpv4TosThroughput, set in FlowIpv4Tos. + // PatternFlowIpv4TosThroughput is throughput + Throughput() PatternFlowIpv4TosThroughput + // SetThroughput assigns PatternFlowIpv4TosThroughput provided by user to FlowIpv4Tos. + // PatternFlowIpv4TosThroughput is throughput + SetThroughput(value PatternFlowIpv4TosThroughput) FlowIpv4Tos + // HasThroughput checks if Throughput has been set in FlowIpv4Tos + HasThroughput() bool + // Reliability returns PatternFlowIpv4TosReliability, set in FlowIpv4Tos. + // PatternFlowIpv4TosReliability is reliability + Reliability() PatternFlowIpv4TosReliability + // SetReliability assigns PatternFlowIpv4TosReliability provided by user to FlowIpv4Tos. + // PatternFlowIpv4TosReliability is reliability + SetReliability(value PatternFlowIpv4TosReliability) FlowIpv4Tos + // HasReliability checks if Reliability has been set in FlowIpv4Tos + HasReliability() bool + // Monetary returns PatternFlowIpv4TosMonetary, set in FlowIpv4Tos. + // PatternFlowIpv4TosMonetary is monetary + Monetary() PatternFlowIpv4TosMonetary + // SetMonetary assigns PatternFlowIpv4TosMonetary provided by user to FlowIpv4Tos. + // PatternFlowIpv4TosMonetary is monetary + SetMonetary(value PatternFlowIpv4TosMonetary) FlowIpv4Tos + // HasMonetary checks if Monetary has been set in FlowIpv4Tos + HasMonetary() bool + // Unused returns PatternFlowIpv4TosUnused, set in FlowIpv4Tos. + // PatternFlowIpv4TosUnused is unused + Unused() PatternFlowIpv4TosUnused + // SetUnused assigns PatternFlowIpv4TosUnused provided by user to FlowIpv4Tos. + // PatternFlowIpv4TosUnused is unused + SetUnused(value PatternFlowIpv4TosUnused) FlowIpv4Tos + // HasUnused checks if Unused has been set in FlowIpv4Tos + HasUnused() bool + setNil() +} + +// description is TBD +// Precedence returns a PatternFlowIpv4TosPrecedence +func (obj *flowIpv4Tos) Precedence() PatternFlowIpv4TosPrecedence { + if obj.obj.Precedence == nil { + obj.obj.Precedence = NewPatternFlowIpv4TosPrecedence().msg() + } + if obj.precedenceHolder == nil { + obj.precedenceHolder = &patternFlowIpv4TosPrecedence{obj: obj.obj.Precedence} + } + return obj.precedenceHolder +} + +// description is TBD +// Precedence returns a PatternFlowIpv4TosPrecedence +func (obj *flowIpv4Tos) HasPrecedence() bool { + return obj.obj.Precedence != nil +} + +// description is TBD +// SetPrecedence sets the PatternFlowIpv4TosPrecedence value in the FlowIpv4Tos object +func (obj *flowIpv4Tos) SetPrecedence(value PatternFlowIpv4TosPrecedence) FlowIpv4Tos { + + obj.precedenceHolder = nil + obj.obj.Precedence = value.msg() + + return obj +} + +// description is TBD +// Delay returns a PatternFlowIpv4TosDelay +func (obj *flowIpv4Tos) Delay() PatternFlowIpv4TosDelay { + if obj.obj.Delay == nil { + obj.obj.Delay = NewPatternFlowIpv4TosDelay().msg() + } + if obj.delayHolder == nil { + obj.delayHolder = &patternFlowIpv4TosDelay{obj: obj.obj.Delay} + } + return obj.delayHolder +} + +// description is TBD +// Delay returns a PatternFlowIpv4TosDelay +func (obj *flowIpv4Tos) HasDelay() bool { + return obj.obj.Delay != nil +} + +// description is TBD +// SetDelay sets the PatternFlowIpv4TosDelay value in the FlowIpv4Tos object +func (obj *flowIpv4Tos) SetDelay(value PatternFlowIpv4TosDelay) FlowIpv4Tos { + + obj.delayHolder = nil + obj.obj.Delay = value.msg() + + return obj +} + +// description is TBD +// Throughput returns a PatternFlowIpv4TosThroughput +func (obj *flowIpv4Tos) Throughput() PatternFlowIpv4TosThroughput { + if obj.obj.Throughput == nil { + obj.obj.Throughput = NewPatternFlowIpv4TosThroughput().msg() + } + if obj.throughputHolder == nil { + obj.throughputHolder = &patternFlowIpv4TosThroughput{obj: obj.obj.Throughput} + } + return obj.throughputHolder +} + +// description is TBD +// Throughput returns a PatternFlowIpv4TosThroughput +func (obj *flowIpv4Tos) HasThroughput() bool { + return obj.obj.Throughput != nil +} + +// description is TBD +// SetThroughput sets the PatternFlowIpv4TosThroughput value in the FlowIpv4Tos object +func (obj *flowIpv4Tos) SetThroughput(value PatternFlowIpv4TosThroughput) FlowIpv4Tos { + + obj.throughputHolder = nil + obj.obj.Throughput = value.msg() + + return obj +} + +// description is TBD +// Reliability returns a PatternFlowIpv4TosReliability +func (obj *flowIpv4Tos) Reliability() PatternFlowIpv4TosReliability { + if obj.obj.Reliability == nil { + obj.obj.Reliability = NewPatternFlowIpv4TosReliability().msg() + } + if obj.reliabilityHolder == nil { + obj.reliabilityHolder = &patternFlowIpv4TosReliability{obj: obj.obj.Reliability} + } + return obj.reliabilityHolder +} + +// description is TBD +// Reliability returns a PatternFlowIpv4TosReliability +func (obj *flowIpv4Tos) HasReliability() bool { + return obj.obj.Reliability != nil +} + +// description is TBD +// SetReliability sets the PatternFlowIpv4TosReliability value in the FlowIpv4Tos object +func (obj *flowIpv4Tos) SetReliability(value PatternFlowIpv4TosReliability) FlowIpv4Tos { + + obj.reliabilityHolder = nil + obj.obj.Reliability = value.msg() + + return obj +} + +// description is TBD +// Monetary returns a PatternFlowIpv4TosMonetary +func (obj *flowIpv4Tos) Monetary() PatternFlowIpv4TosMonetary { + if obj.obj.Monetary == nil { + obj.obj.Monetary = NewPatternFlowIpv4TosMonetary().msg() + } + if obj.monetaryHolder == nil { + obj.monetaryHolder = &patternFlowIpv4TosMonetary{obj: obj.obj.Monetary} + } + return obj.monetaryHolder +} + +// description is TBD +// Monetary returns a PatternFlowIpv4TosMonetary +func (obj *flowIpv4Tos) HasMonetary() bool { + return obj.obj.Monetary != nil +} + +// description is TBD +// SetMonetary sets the PatternFlowIpv4TosMonetary value in the FlowIpv4Tos object +func (obj *flowIpv4Tos) SetMonetary(value PatternFlowIpv4TosMonetary) FlowIpv4Tos { + + obj.monetaryHolder = nil + obj.obj.Monetary = value.msg() + + return obj +} + +// description is TBD +// Unused returns a PatternFlowIpv4TosUnused +func (obj *flowIpv4Tos) Unused() PatternFlowIpv4TosUnused { + if obj.obj.Unused == nil { + obj.obj.Unused = NewPatternFlowIpv4TosUnused().msg() + } + if obj.unusedHolder == nil { + obj.unusedHolder = &patternFlowIpv4TosUnused{obj: obj.obj.Unused} + } + return obj.unusedHolder +} + +// description is TBD +// Unused returns a PatternFlowIpv4TosUnused +func (obj *flowIpv4Tos) HasUnused() bool { + return obj.obj.Unused != nil +} + +// description is TBD +// SetUnused sets the PatternFlowIpv4TosUnused value in the FlowIpv4Tos object +func (obj *flowIpv4Tos) SetUnused(value PatternFlowIpv4TosUnused) FlowIpv4Tos { + + obj.unusedHolder = nil + obj.obj.Unused = value.msg() + + return obj +} + +func (obj *flowIpv4Tos) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Precedence != nil { + + obj.Precedence().validateObj(vObj, set_default) + } + + if obj.obj.Delay != nil { + + obj.Delay().validateObj(vObj, set_default) + } + + if obj.obj.Throughput != nil { + + obj.Throughput().validateObj(vObj, set_default) + } + + if obj.obj.Reliability != nil { + + obj.Reliability().validateObj(vObj, set_default) + } + + if obj.obj.Monetary != nil { + + obj.Monetary().validateObj(vObj, set_default) + } + + if obj.obj.Unused != nil { + + obj.Unused().validateObj(vObj, set_default) + } + +} + +func (obj *flowIpv4Tos) setDefault() { + +} diff --git a/gosnappi/flow_ipv6.go b/gosnappi/flow_ipv6.go new file mode 100644 index 00000000..8da80bf5 --- /dev/null +++ b/gosnappi/flow_ipv6.go @@ -0,0 +1,629 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIpv6 ***** +type flowIpv6 struct { + validation + obj *otg.FlowIpv6 + marshaller marshalFlowIpv6 + unMarshaller unMarshalFlowIpv6 + versionHolder PatternFlowIpv6Version + trafficClassHolder PatternFlowIpv6TrafficClass + flowLabelHolder PatternFlowIpv6FlowLabel + payloadLengthHolder PatternFlowIpv6PayloadLength + nextHeaderHolder PatternFlowIpv6NextHeader + hopLimitHolder PatternFlowIpv6HopLimit + srcHolder PatternFlowIpv6Src + dstHolder PatternFlowIpv6Dst +} + +func NewFlowIpv6() FlowIpv6 { + obj := flowIpv6{obj: &otg.FlowIpv6{}} + obj.setDefault() + return &obj +} + +func (obj *flowIpv6) msg() *otg.FlowIpv6 { + return obj.obj +} + +func (obj *flowIpv6) setMsg(msg *otg.FlowIpv6) FlowIpv6 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIpv6 struct { + obj *flowIpv6 +} + +type marshalFlowIpv6 interface { + // ToProto marshals FlowIpv6 to protobuf object *otg.FlowIpv6 + ToProto() (*otg.FlowIpv6, error) + // ToPbText marshals FlowIpv6 to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIpv6 to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIpv6 to JSON text + ToJson() (string, error) +} + +type unMarshalflowIpv6 struct { + obj *flowIpv6 +} + +type unMarshalFlowIpv6 interface { + // FromProto unmarshals FlowIpv6 from protobuf object *otg.FlowIpv6 + FromProto(msg *otg.FlowIpv6) (FlowIpv6, error) + // FromPbText unmarshals FlowIpv6 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIpv6 from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIpv6 from JSON text + FromJson(value string) error +} + +func (obj *flowIpv6) Marshal() marshalFlowIpv6 { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIpv6{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIpv6) Unmarshal() unMarshalFlowIpv6 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIpv6{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIpv6) ToProto() (*otg.FlowIpv6, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIpv6) FromProto(msg *otg.FlowIpv6) (FlowIpv6, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIpv6) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIpv6) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIpv6) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv6) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIpv6) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv6) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIpv6) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIpv6) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIpv6) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIpv6) Clone() (FlowIpv6, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIpv6() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowIpv6) setNil() { + obj.versionHolder = nil + obj.trafficClassHolder = nil + obj.flowLabelHolder = nil + obj.payloadLengthHolder = nil + obj.nextHeaderHolder = nil + obj.hopLimitHolder = nil + obj.srcHolder = nil + obj.dstHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowIpv6 is iPv6 packet header +type FlowIpv6 interface { + Validation + // msg marshals FlowIpv6 to protobuf object *otg.FlowIpv6 + // and doesn't set defaults + msg() *otg.FlowIpv6 + // setMsg unmarshals FlowIpv6 from protobuf object *otg.FlowIpv6 + // and doesn't set defaults + setMsg(*otg.FlowIpv6) FlowIpv6 + // provides marshal interface + Marshal() marshalFlowIpv6 + // provides unmarshal interface + Unmarshal() unMarshalFlowIpv6 + // validate validates FlowIpv6 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIpv6, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Version returns PatternFlowIpv6Version, set in FlowIpv6. + // PatternFlowIpv6Version is version number + Version() PatternFlowIpv6Version + // SetVersion assigns PatternFlowIpv6Version provided by user to FlowIpv6. + // PatternFlowIpv6Version is version number + SetVersion(value PatternFlowIpv6Version) FlowIpv6 + // HasVersion checks if Version has been set in FlowIpv6 + HasVersion() bool + // TrafficClass returns PatternFlowIpv6TrafficClass, set in FlowIpv6. + // PatternFlowIpv6TrafficClass is traffic class + TrafficClass() PatternFlowIpv6TrafficClass + // SetTrafficClass assigns PatternFlowIpv6TrafficClass provided by user to FlowIpv6. + // PatternFlowIpv6TrafficClass is traffic class + SetTrafficClass(value PatternFlowIpv6TrafficClass) FlowIpv6 + // HasTrafficClass checks if TrafficClass has been set in FlowIpv6 + HasTrafficClass() bool + // FlowLabel returns PatternFlowIpv6FlowLabel, set in FlowIpv6. + // PatternFlowIpv6FlowLabel is flow label + FlowLabel() PatternFlowIpv6FlowLabel + // SetFlowLabel assigns PatternFlowIpv6FlowLabel provided by user to FlowIpv6. + // PatternFlowIpv6FlowLabel is flow label + SetFlowLabel(value PatternFlowIpv6FlowLabel) FlowIpv6 + // HasFlowLabel checks if FlowLabel has been set in FlowIpv6 + HasFlowLabel() bool + // PayloadLength returns PatternFlowIpv6PayloadLength, set in FlowIpv6. + // PatternFlowIpv6PayloadLength is payload length + PayloadLength() PatternFlowIpv6PayloadLength + // SetPayloadLength assigns PatternFlowIpv6PayloadLength provided by user to FlowIpv6. + // PatternFlowIpv6PayloadLength is payload length + SetPayloadLength(value PatternFlowIpv6PayloadLength) FlowIpv6 + // HasPayloadLength checks if PayloadLength has been set in FlowIpv6 + HasPayloadLength() bool + // NextHeader returns PatternFlowIpv6NextHeader, set in FlowIpv6. + // PatternFlowIpv6NextHeader is next header + NextHeader() PatternFlowIpv6NextHeader + // SetNextHeader assigns PatternFlowIpv6NextHeader provided by user to FlowIpv6. + // PatternFlowIpv6NextHeader is next header + SetNextHeader(value PatternFlowIpv6NextHeader) FlowIpv6 + // HasNextHeader checks if NextHeader has been set in FlowIpv6 + HasNextHeader() bool + // HopLimit returns PatternFlowIpv6HopLimit, set in FlowIpv6. + // PatternFlowIpv6HopLimit is hop limit + HopLimit() PatternFlowIpv6HopLimit + // SetHopLimit assigns PatternFlowIpv6HopLimit provided by user to FlowIpv6. + // PatternFlowIpv6HopLimit is hop limit + SetHopLimit(value PatternFlowIpv6HopLimit) FlowIpv6 + // HasHopLimit checks if HopLimit has been set in FlowIpv6 + HasHopLimit() bool + // Src returns PatternFlowIpv6Src, set in FlowIpv6. + // PatternFlowIpv6Src is source address + Src() PatternFlowIpv6Src + // SetSrc assigns PatternFlowIpv6Src provided by user to FlowIpv6. + // PatternFlowIpv6Src is source address + SetSrc(value PatternFlowIpv6Src) FlowIpv6 + // HasSrc checks if Src has been set in FlowIpv6 + HasSrc() bool + // Dst returns PatternFlowIpv6Dst, set in FlowIpv6. + // PatternFlowIpv6Dst is destination address + Dst() PatternFlowIpv6Dst + // SetDst assigns PatternFlowIpv6Dst provided by user to FlowIpv6. + // PatternFlowIpv6Dst is destination address + SetDst(value PatternFlowIpv6Dst) FlowIpv6 + // HasDst checks if Dst has been set in FlowIpv6 + HasDst() bool + setNil() +} + +// description is TBD +// Version returns a PatternFlowIpv6Version +func (obj *flowIpv6) Version() PatternFlowIpv6Version { + if obj.obj.Version == nil { + obj.obj.Version = NewPatternFlowIpv6Version().msg() + } + if obj.versionHolder == nil { + obj.versionHolder = &patternFlowIpv6Version{obj: obj.obj.Version} + } + return obj.versionHolder +} + +// description is TBD +// Version returns a PatternFlowIpv6Version +func (obj *flowIpv6) HasVersion() bool { + return obj.obj.Version != nil +} + +// description is TBD +// SetVersion sets the PatternFlowIpv6Version value in the FlowIpv6 object +func (obj *flowIpv6) SetVersion(value PatternFlowIpv6Version) FlowIpv6 { + + obj.versionHolder = nil + obj.obj.Version = value.msg() + + return obj +} + +// description is TBD +// TrafficClass returns a PatternFlowIpv6TrafficClass +func (obj *flowIpv6) TrafficClass() PatternFlowIpv6TrafficClass { + if obj.obj.TrafficClass == nil { + obj.obj.TrafficClass = NewPatternFlowIpv6TrafficClass().msg() + } + if obj.trafficClassHolder == nil { + obj.trafficClassHolder = &patternFlowIpv6TrafficClass{obj: obj.obj.TrafficClass} + } + return obj.trafficClassHolder +} + +// description is TBD +// TrafficClass returns a PatternFlowIpv6TrafficClass +func (obj *flowIpv6) HasTrafficClass() bool { + return obj.obj.TrafficClass != nil +} + +// description is TBD +// SetTrafficClass sets the PatternFlowIpv6TrafficClass value in the FlowIpv6 object +func (obj *flowIpv6) SetTrafficClass(value PatternFlowIpv6TrafficClass) FlowIpv6 { + + obj.trafficClassHolder = nil + obj.obj.TrafficClass = value.msg() + + return obj +} + +// description is TBD +// FlowLabel returns a PatternFlowIpv6FlowLabel +func (obj *flowIpv6) FlowLabel() PatternFlowIpv6FlowLabel { + if obj.obj.FlowLabel == nil { + obj.obj.FlowLabel = NewPatternFlowIpv6FlowLabel().msg() + } + if obj.flowLabelHolder == nil { + obj.flowLabelHolder = &patternFlowIpv6FlowLabel{obj: obj.obj.FlowLabel} + } + return obj.flowLabelHolder +} + +// description is TBD +// FlowLabel returns a PatternFlowIpv6FlowLabel +func (obj *flowIpv6) HasFlowLabel() bool { + return obj.obj.FlowLabel != nil +} + +// description is TBD +// SetFlowLabel sets the PatternFlowIpv6FlowLabel value in the FlowIpv6 object +func (obj *flowIpv6) SetFlowLabel(value PatternFlowIpv6FlowLabel) FlowIpv6 { + + obj.flowLabelHolder = nil + obj.obj.FlowLabel = value.msg() + + return obj +} + +// description is TBD +// PayloadLength returns a PatternFlowIpv6PayloadLength +func (obj *flowIpv6) PayloadLength() PatternFlowIpv6PayloadLength { + if obj.obj.PayloadLength == nil { + obj.obj.PayloadLength = NewPatternFlowIpv6PayloadLength().msg() + } + if obj.payloadLengthHolder == nil { + obj.payloadLengthHolder = &patternFlowIpv6PayloadLength{obj: obj.obj.PayloadLength} + } + return obj.payloadLengthHolder +} + +// description is TBD +// PayloadLength returns a PatternFlowIpv6PayloadLength +func (obj *flowIpv6) HasPayloadLength() bool { + return obj.obj.PayloadLength != nil +} + +// description is TBD +// SetPayloadLength sets the PatternFlowIpv6PayloadLength value in the FlowIpv6 object +func (obj *flowIpv6) SetPayloadLength(value PatternFlowIpv6PayloadLength) FlowIpv6 { + + obj.payloadLengthHolder = nil + obj.obj.PayloadLength = value.msg() + + return obj +} + +// description is TBD +// NextHeader returns a PatternFlowIpv6NextHeader +func (obj *flowIpv6) NextHeader() PatternFlowIpv6NextHeader { + if obj.obj.NextHeader == nil { + obj.obj.NextHeader = NewPatternFlowIpv6NextHeader().msg() + } + if obj.nextHeaderHolder == nil { + obj.nextHeaderHolder = &patternFlowIpv6NextHeader{obj: obj.obj.NextHeader} + } + return obj.nextHeaderHolder +} + +// description is TBD +// NextHeader returns a PatternFlowIpv6NextHeader +func (obj *flowIpv6) HasNextHeader() bool { + return obj.obj.NextHeader != nil +} + +// description is TBD +// SetNextHeader sets the PatternFlowIpv6NextHeader value in the FlowIpv6 object +func (obj *flowIpv6) SetNextHeader(value PatternFlowIpv6NextHeader) FlowIpv6 { + + obj.nextHeaderHolder = nil + obj.obj.NextHeader = value.msg() + + return obj +} + +// description is TBD +// HopLimit returns a PatternFlowIpv6HopLimit +func (obj *flowIpv6) HopLimit() PatternFlowIpv6HopLimit { + if obj.obj.HopLimit == nil { + obj.obj.HopLimit = NewPatternFlowIpv6HopLimit().msg() + } + if obj.hopLimitHolder == nil { + obj.hopLimitHolder = &patternFlowIpv6HopLimit{obj: obj.obj.HopLimit} + } + return obj.hopLimitHolder +} + +// description is TBD +// HopLimit returns a PatternFlowIpv6HopLimit +func (obj *flowIpv6) HasHopLimit() bool { + return obj.obj.HopLimit != nil +} + +// description is TBD +// SetHopLimit sets the PatternFlowIpv6HopLimit value in the FlowIpv6 object +func (obj *flowIpv6) SetHopLimit(value PatternFlowIpv6HopLimit) FlowIpv6 { + + obj.hopLimitHolder = nil + obj.obj.HopLimit = value.msg() + + return obj +} + +// description is TBD +// Src returns a PatternFlowIpv6Src +func (obj *flowIpv6) Src() PatternFlowIpv6Src { + if obj.obj.Src == nil { + obj.obj.Src = NewPatternFlowIpv6Src().msg() + } + if obj.srcHolder == nil { + obj.srcHolder = &patternFlowIpv6Src{obj: obj.obj.Src} + } + return obj.srcHolder +} + +// description is TBD +// Src returns a PatternFlowIpv6Src +func (obj *flowIpv6) HasSrc() bool { + return obj.obj.Src != nil +} + +// description is TBD +// SetSrc sets the PatternFlowIpv6Src value in the FlowIpv6 object +func (obj *flowIpv6) SetSrc(value PatternFlowIpv6Src) FlowIpv6 { + + obj.srcHolder = nil + obj.obj.Src = value.msg() + + return obj +} + +// description is TBD +// Dst returns a PatternFlowIpv6Dst +func (obj *flowIpv6) Dst() PatternFlowIpv6Dst { + if obj.obj.Dst == nil { + obj.obj.Dst = NewPatternFlowIpv6Dst().msg() + } + if obj.dstHolder == nil { + obj.dstHolder = &patternFlowIpv6Dst{obj: obj.obj.Dst} + } + return obj.dstHolder +} + +// description is TBD +// Dst returns a PatternFlowIpv6Dst +func (obj *flowIpv6) HasDst() bool { + return obj.obj.Dst != nil +} + +// description is TBD +// SetDst sets the PatternFlowIpv6Dst value in the FlowIpv6 object +func (obj *flowIpv6) SetDst(value PatternFlowIpv6Dst) FlowIpv6 { + + obj.dstHolder = nil + obj.obj.Dst = value.msg() + + return obj +} + +func (obj *flowIpv6) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Version != nil { + + obj.Version().validateObj(vObj, set_default) + } + + if obj.obj.TrafficClass != nil { + + obj.TrafficClass().validateObj(vObj, set_default) + } + + if obj.obj.FlowLabel != nil { + + obj.FlowLabel().validateObj(vObj, set_default) + } + + if obj.obj.PayloadLength != nil { + + obj.PayloadLength().validateObj(vObj, set_default) + } + + if obj.obj.NextHeader != nil { + + obj.NextHeader().validateObj(vObj, set_default) + } + + if obj.obj.HopLimit != nil { + + obj.HopLimit().validateObj(vObj, set_default) + } + + if obj.obj.Src != nil { + + obj.Src().validateObj(vObj, set_default) + } + + if obj.obj.Dst != nil { + + obj.Dst().validateObj(vObj, set_default) + } + +} + +func (obj *flowIpv6) setDefault() { + +} diff --git a/gosnappi/flow_ipv6_auto.go b/gosnappi/flow_ipv6_auto.go new file mode 100644 index 00000000..db706e16 --- /dev/null +++ b/gosnappi/flow_ipv6_auto.go @@ -0,0 +1,332 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowIpv6Auto ***** +type flowIpv6Auto struct { + validation + obj *otg.FlowIpv6Auto + marshaller marshalFlowIpv6Auto + unMarshaller unMarshalFlowIpv6Auto +} + +func NewFlowIpv6Auto() FlowIpv6Auto { + obj := flowIpv6Auto{obj: &otg.FlowIpv6Auto{}} + obj.setDefault() + return &obj +} + +func (obj *flowIpv6Auto) msg() *otg.FlowIpv6Auto { + return obj.obj +} + +func (obj *flowIpv6Auto) setMsg(msg *otg.FlowIpv6Auto) FlowIpv6Auto { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowIpv6Auto struct { + obj *flowIpv6Auto +} + +type marshalFlowIpv6Auto interface { + // ToProto marshals FlowIpv6Auto to protobuf object *otg.FlowIpv6Auto + ToProto() (*otg.FlowIpv6Auto, error) + // ToPbText marshals FlowIpv6Auto to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowIpv6Auto to YAML text + ToYaml() (string, error) + // ToJson marshals FlowIpv6Auto to JSON text + ToJson() (string, error) +} + +type unMarshalflowIpv6Auto struct { + obj *flowIpv6Auto +} + +type unMarshalFlowIpv6Auto interface { + // FromProto unmarshals FlowIpv6Auto from protobuf object *otg.FlowIpv6Auto + FromProto(msg *otg.FlowIpv6Auto) (FlowIpv6Auto, error) + // FromPbText unmarshals FlowIpv6Auto from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowIpv6Auto from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowIpv6Auto from JSON text + FromJson(value string) error +} + +func (obj *flowIpv6Auto) Marshal() marshalFlowIpv6Auto { + if obj.marshaller == nil { + obj.marshaller = &marshalflowIpv6Auto{obj: obj} + } + return obj.marshaller +} + +func (obj *flowIpv6Auto) Unmarshal() unMarshalFlowIpv6Auto { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowIpv6Auto{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowIpv6Auto) ToProto() (*otg.FlowIpv6Auto, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowIpv6Auto) FromProto(msg *otg.FlowIpv6Auto) (FlowIpv6Auto, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowIpv6Auto) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowIpv6Auto) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowIpv6Auto) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv6Auto) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowIpv6Auto) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowIpv6Auto) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowIpv6Auto) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowIpv6Auto) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowIpv6Auto) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowIpv6Auto) Clone() (FlowIpv6Auto, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowIpv6Auto() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowIpv6Auto is the OTG implementation can provide a system generated, value for this property. +type FlowIpv6Auto interface { + Validation + // msg marshals FlowIpv6Auto to protobuf object *otg.FlowIpv6Auto + // and doesn't set defaults + msg() *otg.FlowIpv6Auto + // setMsg unmarshals FlowIpv6Auto from protobuf object *otg.FlowIpv6Auto + // and doesn't set defaults + setMsg(*otg.FlowIpv6Auto) FlowIpv6Auto + // provides marshal interface + Marshal() marshalFlowIpv6Auto + // provides unmarshal interface + Unmarshal() unMarshalFlowIpv6Auto + // validate validates FlowIpv6Auto + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowIpv6Auto, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowIpv6AutoChoiceEnum, set in FlowIpv6Auto + Choice() FlowIpv6AutoChoiceEnum + // setChoice assigns FlowIpv6AutoChoiceEnum provided by user to FlowIpv6Auto + setChoice(value FlowIpv6AutoChoiceEnum) FlowIpv6Auto + // getter for Dhcp to set choice. + Dhcp() +} + +type FlowIpv6AutoChoiceEnum string + +// Enum of Choice on FlowIpv6Auto +var FlowIpv6AutoChoice = struct { + DHCP FlowIpv6AutoChoiceEnum +}{ + DHCP: FlowIpv6AutoChoiceEnum("dhcp"), +} + +func (obj *flowIpv6Auto) Choice() FlowIpv6AutoChoiceEnum { + return FlowIpv6AutoChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for Dhcp to set choice +func (obj *flowIpv6Auto) Dhcp() { + obj.setChoice(FlowIpv6AutoChoice.DHCP) +} + +func (obj *flowIpv6Auto) setChoice(value FlowIpv6AutoChoiceEnum) FlowIpv6Auto { + intValue, ok := otg.FlowIpv6Auto_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowIpv6AutoChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowIpv6Auto_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + + return obj +} + +func (obj *flowIpv6Auto) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface FlowIpv6Auto") + } +} + +func (obj *flowIpv6Auto) setDefault() { + var choices_set int = 0 + var choice FlowIpv6AutoChoiceEnum + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowIpv6Auto") + } + } else { + intVal := otg.FlowIpv6Auto_Choice_Enum_value[string(choice)] + enumValue := otg.FlowIpv6Auto_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_latency_metrics.go b/gosnappi/flow_latency_metrics.go new file mode 100644 index 00000000..116eb5c9 --- /dev/null +++ b/gosnappi/flow_latency_metrics.go @@ -0,0 +1,374 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowLatencyMetrics ***** +type flowLatencyMetrics struct { + validation + obj *otg.FlowLatencyMetrics + marshaller marshalFlowLatencyMetrics + unMarshaller unMarshalFlowLatencyMetrics +} + +func NewFlowLatencyMetrics() FlowLatencyMetrics { + obj := flowLatencyMetrics{obj: &otg.FlowLatencyMetrics{}} + obj.setDefault() + return &obj +} + +func (obj *flowLatencyMetrics) msg() *otg.FlowLatencyMetrics { + return obj.obj +} + +func (obj *flowLatencyMetrics) setMsg(msg *otg.FlowLatencyMetrics) FlowLatencyMetrics { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowLatencyMetrics struct { + obj *flowLatencyMetrics +} + +type marshalFlowLatencyMetrics interface { + // ToProto marshals FlowLatencyMetrics to protobuf object *otg.FlowLatencyMetrics + ToProto() (*otg.FlowLatencyMetrics, error) + // ToPbText marshals FlowLatencyMetrics to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowLatencyMetrics to YAML text + ToYaml() (string, error) + // ToJson marshals FlowLatencyMetrics to JSON text + ToJson() (string, error) +} + +type unMarshalflowLatencyMetrics struct { + obj *flowLatencyMetrics +} + +type unMarshalFlowLatencyMetrics interface { + // FromProto unmarshals FlowLatencyMetrics from protobuf object *otg.FlowLatencyMetrics + FromProto(msg *otg.FlowLatencyMetrics) (FlowLatencyMetrics, error) + // FromPbText unmarshals FlowLatencyMetrics from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowLatencyMetrics from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowLatencyMetrics from JSON text + FromJson(value string) error +} + +func (obj *flowLatencyMetrics) Marshal() marshalFlowLatencyMetrics { + if obj.marshaller == nil { + obj.marshaller = &marshalflowLatencyMetrics{obj: obj} + } + return obj.marshaller +} + +func (obj *flowLatencyMetrics) Unmarshal() unMarshalFlowLatencyMetrics { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowLatencyMetrics{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowLatencyMetrics) ToProto() (*otg.FlowLatencyMetrics, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowLatencyMetrics) FromProto(msg *otg.FlowLatencyMetrics) (FlowLatencyMetrics, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowLatencyMetrics) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowLatencyMetrics) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowLatencyMetrics) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowLatencyMetrics) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowLatencyMetrics) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowLatencyMetrics) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowLatencyMetrics) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowLatencyMetrics) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowLatencyMetrics) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowLatencyMetrics) Clone() (FlowLatencyMetrics, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowLatencyMetrics() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowLatencyMetrics is the optional container for per flow latency metric configuration. +type FlowLatencyMetrics interface { + Validation + // msg marshals FlowLatencyMetrics to protobuf object *otg.FlowLatencyMetrics + // and doesn't set defaults + msg() *otg.FlowLatencyMetrics + // setMsg unmarshals FlowLatencyMetrics from protobuf object *otg.FlowLatencyMetrics + // and doesn't set defaults + setMsg(*otg.FlowLatencyMetrics) FlowLatencyMetrics + // provides marshal interface + Marshal() marshalFlowLatencyMetrics + // provides unmarshal interface + Unmarshal() unMarshalFlowLatencyMetrics + // validate validates FlowLatencyMetrics + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowLatencyMetrics, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Enable returns bool, set in FlowLatencyMetrics. + Enable() bool + // SetEnable assigns bool provided by user to FlowLatencyMetrics + SetEnable(value bool) FlowLatencyMetrics + // HasEnable checks if Enable has been set in FlowLatencyMetrics + HasEnable() bool + // Mode returns FlowLatencyMetricsModeEnum, set in FlowLatencyMetrics + Mode() FlowLatencyMetricsModeEnum + // SetMode assigns FlowLatencyMetricsModeEnum provided by user to FlowLatencyMetrics + SetMode(value FlowLatencyMetricsModeEnum) FlowLatencyMetrics + // HasMode checks if Mode has been set in FlowLatencyMetrics + HasMode() bool +} + +// True to enable latency metrics using timestamps. +// +// Enabling this option may affect the resultant packet payload due to +// additional instrumentation data. +// Enable returns a bool +func (obj *flowLatencyMetrics) Enable() bool { + + return *obj.obj.Enable + +} + +// True to enable latency metrics using timestamps. +// +// Enabling this option may affect the resultant packet payload due to +// additional instrumentation data. +// Enable returns a bool +func (obj *flowLatencyMetrics) HasEnable() bool { + return obj.obj.Enable != nil +} + +// True to enable latency metrics using timestamps. +// +// Enabling this option may affect the resultant packet payload due to +// additional instrumentation data. +// SetEnable sets the bool value in the FlowLatencyMetrics object +func (obj *flowLatencyMetrics) SetEnable(value bool) FlowLatencyMetrics { + + obj.obj.Enable = &value + return obj +} + +type FlowLatencyMetricsModeEnum string + +// Enum of Mode on FlowLatencyMetrics +var FlowLatencyMetricsMode = struct { + STORE_FORWARD FlowLatencyMetricsModeEnum + CUT_THROUGH FlowLatencyMetricsModeEnum +}{ + STORE_FORWARD: FlowLatencyMetricsModeEnum("store_forward"), + CUT_THROUGH: FlowLatencyMetricsModeEnum("cut_through"), +} + +func (obj *flowLatencyMetrics) Mode() FlowLatencyMetricsModeEnum { + return FlowLatencyMetricsModeEnum(obj.obj.Mode.Enum().String()) +} + +// Select the type of latency measurement. The different types of +// latency measurements are: +// +// store_forward: +// The time interval starting when the last bit of the frame leaves the +// sending port and ending when the first bit of the frame is seen on +// the receiving port (LIFO). This is based on the RFC 1242 standard. +// +// cut_through: +// The time interval starting when the first bit of the frame leaves +// the sending port and ending when the first bit of the frame is seen +// on the receiving port (FIFO). This is based on the RFC 1242 +// standard. +// Mode returns a string +func (obj *flowLatencyMetrics) HasMode() bool { + return obj.obj.Mode != nil +} + +func (obj *flowLatencyMetrics) SetMode(value FlowLatencyMetricsModeEnum) FlowLatencyMetrics { + intValue, ok := otg.FlowLatencyMetrics_Mode_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowLatencyMetricsModeEnum", string(value))) + return obj + } + enumValue := otg.FlowLatencyMetrics_Mode_Enum(intValue) + obj.obj.Mode = &enumValue + + return obj +} + +func (obj *flowLatencyMetrics) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *flowLatencyMetrics) setDefault() { + if obj.obj.Enable == nil { + obj.SetEnable(false) + } + if obj.obj.Mode == nil { + obj.SetMode(FlowLatencyMetricsMode.STORE_FORWARD) + + } + +} diff --git a/gosnappi/flow_metric.go b/gosnappi/flow_metric.go new file mode 100644 index 00000000..a6cb5404 --- /dev/null +++ b/gosnappi/flow_metric.go @@ -0,0 +1,813 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowMetric ***** +type flowMetric struct { + validation + obj *otg.FlowMetric + marshaller marshalFlowMetric + unMarshaller unMarshalFlowMetric + timestampsHolder MetricTimestamp + latencyHolder MetricLatency + taggedMetricsHolder FlowMetricFlowTaggedMetricIter +} + +func NewFlowMetric() FlowMetric { + obj := flowMetric{obj: &otg.FlowMetric{}} + obj.setDefault() + return &obj +} + +func (obj *flowMetric) msg() *otg.FlowMetric { + return obj.obj +} + +func (obj *flowMetric) setMsg(msg *otg.FlowMetric) FlowMetric { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowMetric struct { + obj *flowMetric +} + +type marshalFlowMetric interface { + // ToProto marshals FlowMetric to protobuf object *otg.FlowMetric + ToProto() (*otg.FlowMetric, error) + // ToPbText marshals FlowMetric to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowMetric to YAML text + ToYaml() (string, error) + // ToJson marshals FlowMetric to JSON text + ToJson() (string, error) +} + +type unMarshalflowMetric struct { + obj *flowMetric +} + +type unMarshalFlowMetric interface { + // FromProto unmarshals FlowMetric from protobuf object *otg.FlowMetric + FromProto(msg *otg.FlowMetric) (FlowMetric, error) + // FromPbText unmarshals FlowMetric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowMetric from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowMetric from JSON text + FromJson(value string) error +} + +func (obj *flowMetric) Marshal() marshalFlowMetric { + if obj.marshaller == nil { + obj.marshaller = &marshalflowMetric{obj: obj} + } + return obj.marshaller +} + +func (obj *flowMetric) Unmarshal() unMarshalFlowMetric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowMetric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowMetric) ToProto() (*otg.FlowMetric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowMetric) FromProto(msg *otg.FlowMetric) (FlowMetric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowMetric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowMetric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowMetric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowMetric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowMetric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowMetric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowMetric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowMetric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowMetric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowMetric) Clone() (FlowMetric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowMetric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowMetric) setNil() { + obj.timestampsHolder = nil + obj.latencyHolder = nil + obj.taggedMetricsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowMetric is a container for flow metrics. +// The container is keyed by the name, port_tx and port_rx. +type FlowMetric interface { + Validation + // msg marshals FlowMetric to protobuf object *otg.FlowMetric + // and doesn't set defaults + msg() *otg.FlowMetric + // setMsg unmarshals FlowMetric from protobuf object *otg.FlowMetric + // and doesn't set defaults + setMsg(*otg.FlowMetric) FlowMetric + // provides marshal interface + Marshal() marshalFlowMetric + // provides unmarshal interface + Unmarshal() unMarshalFlowMetric + // validate validates FlowMetric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowMetric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in FlowMetric. + Name() string + // SetName assigns string provided by user to FlowMetric + SetName(value string) FlowMetric + // HasName checks if Name has been set in FlowMetric + HasName() bool + // PortTx returns string, set in FlowMetric. + PortTx() string + // SetPortTx assigns string provided by user to FlowMetric + SetPortTx(value string) FlowMetric + // HasPortTx checks if PortTx has been set in FlowMetric + HasPortTx() bool + // PortRx returns string, set in FlowMetric. + PortRx() string + // SetPortRx assigns string provided by user to FlowMetric + SetPortRx(value string) FlowMetric + // HasPortRx checks if PortRx has been set in FlowMetric + HasPortRx() bool + // Transmit returns FlowMetricTransmitEnum, set in FlowMetric + Transmit() FlowMetricTransmitEnum + // SetTransmit assigns FlowMetricTransmitEnum provided by user to FlowMetric + SetTransmit(value FlowMetricTransmitEnum) FlowMetric + // HasTransmit checks if Transmit has been set in FlowMetric + HasTransmit() bool + // FramesTx returns uint64, set in FlowMetric. + FramesTx() uint64 + // SetFramesTx assigns uint64 provided by user to FlowMetric + SetFramesTx(value uint64) FlowMetric + // HasFramesTx checks if FramesTx has been set in FlowMetric + HasFramesTx() bool + // FramesRx returns uint64, set in FlowMetric. + FramesRx() uint64 + // SetFramesRx assigns uint64 provided by user to FlowMetric + SetFramesRx(value uint64) FlowMetric + // HasFramesRx checks if FramesRx has been set in FlowMetric + HasFramesRx() bool + // BytesTx returns uint64, set in FlowMetric. + BytesTx() uint64 + // SetBytesTx assigns uint64 provided by user to FlowMetric + SetBytesTx(value uint64) FlowMetric + // HasBytesTx checks if BytesTx has been set in FlowMetric + HasBytesTx() bool + // BytesRx returns uint64, set in FlowMetric. + BytesRx() uint64 + // SetBytesRx assigns uint64 provided by user to FlowMetric + SetBytesRx(value uint64) FlowMetric + // HasBytesRx checks if BytesRx has been set in FlowMetric + HasBytesRx() bool + // FramesTxRate returns float32, set in FlowMetric. + FramesTxRate() float32 + // SetFramesTxRate assigns float32 provided by user to FlowMetric + SetFramesTxRate(value float32) FlowMetric + // HasFramesTxRate checks if FramesTxRate has been set in FlowMetric + HasFramesTxRate() bool + // FramesRxRate returns float32, set in FlowMetric. + FramesRxRate() float32 + // SetFramesRxRate assigns float32 provided by user to FlowMetric + SetFramesRxRate(value float32) FlowMetric + // HasFramesRxRate checks if FramesRxRate has been set in FlowMetric + HasFramesRxRate() bool + // Loss returns float32, set in FlowMetric. + Loss() float32 + // SetLoss assigns float32 provided by user to FlowMetric + SetLoss(value float32) FlowMetric + // HasLoss checks if Loss has been set in FlowMetric + HasLoss() bool + // Timestamps returns MetricTimestamp, set in FlowMetric. + // MetricTimestamp is the container for timestamp metrics. + // The container will be empty if the timestamp has not been configured for + // the flow. + Timestamps() MetricTimestamp + // SetTimestamps assigns MetricTimestamp provided by user to FlowMetric. + // MetricTimestamp is the container for timestamp metrics. + // The container will be empty if the timestamp has not been configured for + // the flow. + SetTimestamps(value MetricTimestamp) FlowMetric + // HasTimestamps checks if Timestamps has been set in FlowMetric + HasTimestamps() bool + // Latency returns MetricLatency, set in FlowMetric. + // MetricLatency is the container for latency metrics. + // The min/max/avg values are dependent on the type of latency measurement + // mode that is configured. + // The container will be empty if the latency has not been configured for + // the flow. + Latency() MetricLatency + // SetLatency assigns MetricLatency provided by user to FlowMetric. + // MetricLatency is the container for latency metrics. + // The min/max/avg values are dependent on the type of latency measurement + // mode that is configured. + // The container will be empty if the latency has not been configured for + // the flow. + SetLatency(value MetricLatency) FlowMetric + // HasLatency checks if Latency has been set in FlowMetric + HasLatency() bool + // TaggedMetrics returns FlowMetricFlowTaggedMetricIterIter, set in FlowMetric + TaggedMetrics() FlowMetricFlowTaggedMetricIter + setNil() +} + +// The name of the flow +// Name returns a string +func (obj *flowMetric) Name() string { + + return *obj.obj.Name + +} + +// The name of the flow +// Name returns a string +func (obj *flowMetric) HasName() bool { + return obj.obj.Name != nil +} + +// The name of the flow +// SetName sets the string value in the FlowMetric object +func (obj *flowMetric) SetName(value string) FlowMetric { + + obj.obj.Name = &value + return obj +} + +// The name of the transmit port +// PortTx returns a string +func (obj *flowMetric) PortTx() string { + + return *obj.obj.PortTx + +} + +// The name of the transmit port +// PortTx returns a string +func (obj *flowMetric) HasPortTx() bool { + return obj.obj.PortTx != nil +} + +// The name of the transmit port +// SetPortTx sets the string value in the FlowMetric object +func (obj *flowMetric) SetPortTx(value string) FlowMetric { + + obj.obj.PortTx = &value + return obj +} + +// The name of the receive port +// PortRx returns a string +func (obj *flowMetric) PortRx() string { + + return *obj.obj.PortRx + +} + +// The name of the receive port +// PortRx returns a string +func (obj *flowMetric) HasPortRx() bool { + return obj.obj.PortRx != nil +} + +// The name of the receive port +// SetPortRx sets the string value in the FlowMetric object +func (obj *flowMetric) SetPortRx(value string) FlowMetric { + + obj.obj.PortRx = &value + return obj +} + +type FlowMetricTransmitEnum string + +// Enum of Transmit on FlowMetric +var FlowMetricTransmit = struct { + STARTED FlowMetricTransmitEnum + STOPPED FlowMetricTransmitEnum + PAUSED FlowMetricTransmitEnum +}{ + STARTED: FlowMetricTransmitEnum("started"), + STOPPED: FlowMetricTransmitEnum("stopped"), + PAUSED: FlowMetricTransmitEnum("paused"), +} + +func (obj *flowMetric) Transmit() FlowMetricTransmitEnum { + return FlowMetricTransmitEnum(obj.obj.Transmit.Enum().String()) +} + +// The transmit state of the flow. +// Transmit returns a string +func (obj *flowMetric) HasTransmit() bool { + return obj.obj.Transmit != nil +} + +func (obj *flowMetric) SetTransmit(value FlowMetricTransmitEnum) FlowMetric { + intValue, ok := otg.FlowMetric_Transmit_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowMetricTransmitEnum", string(value))) + return obj + } + enumValue := otg.FlowMetric_Transmit_Enum(intValue) + obj.obj.Transmit = &enumValue + + return obj +} + +// The current total number of frames transmitted +// FramesTx returns a uint64 +func (obj *flowMetric) FramesTx() uint64 { + + return *obj.obj.FramesTx + +} + +// The current total number of frames transmitted +// FramesTx returns a uint64 +func (obj *flowMetric) HasFramesTx() bool { + return obj.obj.FramesTx != nil +} + +// The current total number of frames transmitted +// SetFramesTx sets the uint64 value in the FlowMetric object +func (obj *flowMetric) SetFramesTx(value uint64) FlowMetric { + + obj.obj.FramesTx = &value + return obj +} + +// The current total number of valid frames received +// FramesRx returns a uint64 +func (obj *flowMetric) FramesRx() uint64 { + + return *obj.obj.FramesRx + +} + +// The current total number of valid frames received +// FramesRx returns a uint64 +func (obj *flowMetric) HasFramesRx() bool { + return obj.obj.FramesRx != nil +} + +// The current total number of valid frames received +// SetFramesRx sets the uint64 value in the FlowMetric object +func (obj *flowMetric) SetFramesRx(value uint64) FlowMetric { + + obj.obj.FramesRx = &value + return obj +} + +// The current total number of bytes transmitted +// BytesTx returns a uint64 +func (obj *flowMetric) BytesTx() uint64 { + + return *obj.obj.BytesTx + +} + +// The current total number of bytes transmitted +// BytesTx returns a uint64 +func (obj *flowMetric) HasBytesTx() bool { + return obj.obj.BytesTx != nil +} + +// The current total number of bytes transmitted +// SetBytesTx sets the uint64 value in the FlowMetric object +func (obj *flowMetric) SetBytesTx(value uint64) FlowMetric { + + obj.obj.BytesTx = &value + return obj +} + +// The current total number of bytes received +// BytesRx returns a uint64 +func (obj *flowMetric) BytesRx() uint64 { + + return *obj.obj.BytesRx + +} + +// The current total number of bytes received +// BytesRx returns a uint64 +func (obj *flowMetric) HasBytesRx() bool { + return obj.obj.BytesRx != nil +} + +// The current total number of bytes received +// SetBytesRx sets the uint64 value in the FlowMetric object +func (obj *flowMetric) SetBytesRx(value uint64) FlowMetric { + + obj.obj.BytesRx = &value + return obj +} + +// The current rate of frames transmitted +// FramesTxRate returns a float32 +func (obj *flowMetric) FramesTxRate() float32 { + + return *obj.obj.FramesTxRate + +} + +// The current rate of frames transmitted +// FramesTxRate returns a float32 +func (obj *flowMetric) HasFramesTxRate() bool { + return obj.obj.FramesTxRate != nil +} + +// The current rate of frames transmitted +// SetFramesTxRate sets the float32 value in the FlowMetric object +func (obj *flowMetric) SetFramesTxRate(value float32) FlowMetric { + + obj.obj.FramesTxRate = &value + return obj +} + +// The current rate of valid frames received +// FramesRxRate returns a float32 +func (obj *flowMetric) FramesRxRate() float32 { + + return *obj.obj.FramesRxRate + +} + +// The current rate of valid frames received +// FramesRxRate returns a float32 +func (obj *flowMetric) HasFramesRxRate() bool { + return obj.obj.FramesRxRate != nil +} + +// The current rate of valid frames received +// SetFramesRxRate sets the float32 value in the FlowMetric object +func (obj *flowMetric) SetFramesRxRate(value float32) FlowMetric { + + obj.obj.FramesRxRate = &value + return obj +} + +// The percentage of lost frames +// Loss returns a float32 +func (obj *flowMetric) Loss() float32 { + + return *obj.obj.Loss + +} + +// The percentage of lost frames +// Loss returns a float32 +func (obj *flowMetric) HasLoss() bool { + return obj.obj.Loss != nil +} + +// The percentage of lost frames +// SetLoss sets the float32 value in the FlowMetric object +func (obj *flowMetric) SetLoss(value float32) FlowMetric { + + obj.obj.Loss = &value + return obj +} + +// description is TBD +// Timestamps returns a MetricTimestamp +func (obj *flowMetric) Timestamps() MetricTimestamp { + if obj.obj.Timestamps == nil { + obj.obj.Timestamps = NewMetricTimestamp().msg() + } + if obj.timestampsHolder == nil { + obj.timestampsHolder = &metricTimestamp{obj: obj.obj.Timestamps} + } + return obj.timestampsHolder +} + +// description is TBD +// Timestamps returns a MetricTimestamp +func (obj *flowMetric) HasTimestamps() bool { + return obj.obj.Timestamps != nil +} + +// description is TBD +// SetTimestamps sets the MetricTimestamp value in the FlowMetric object +func (obj *flowMetric) SetTimestamps(value MetricTimestamp) FlowMetric { + + obj.timestampsHolder = nil + obj.obj.Timestamps = value.msg() + + return obj +} + +// description is TBD +// Latency returns a MetricLatency +func (obj *flowMetric) Latency() MetricLatency { + if obj.obj.Latency == nil { + obj.obj.Latency = NewMetricLatency().msg() + } + if obj.latencyHolder == nil { + obj.latencyHolder = &metricLatency{obj: obj.obj.Latency} + } + return obj.latencyHolder +} + +// description is TBD +// Latency returns a MetricLatency +func (obj *flowMetric) HasLatency() bool { + return obj.obj.Latency != nil +} + +// description is TBD +// SetLatency sets the MetricLatency value in the FlowMetric object +func (obj *flowMetric) SetLatency(value MetricLatency) FlowMetric { + + obj.latencyHolder = nil + obj.obj.Latency = value.msg() + + return obj +} + +// List of metrics corresponding to a set of values applicable +// for configured metric tags in ingress or egress packet header fields of corresponding flow. +// The container is keyed by list of tag-value pairs. +// TaggedMetrics returns a []FlowTaggedMetric +func (obj *flowMetric) TaggedMetrics() FlowMetricFlowTaggedMetricIter { + if len(obj.obj.TaggedMetrics) == 0 { + obj.obj.TaggedMetrics = []*otg.FlowTaggedMetric{} + } + if obj.taggedMetricsHolder == nil { + obj.taggedMetricsHolder = newFlowMetricFlowTaggedMetricIter(&obj.obj.TaggedMetrics).setMsg(obj) + } + return obj.taggedMetricsHolder +} + +type flowMetricFlowTaggedMetricIter struct { + obj *flowMetric + flowTaggedMetricSlice []FlowTaggedMetric + fieldPtr *[]*otg.FlowTaggedMetric +} + +func newFlowMetricFlowTaggedMetricIter(ptr *[]*otg.FlowTaggedMetric) FlowMetricFlowTaggedMetricIter { + return &flowMetricFlowTaggedMetricIter{fieldPtr: ptr} +} + +type FlowMetricFlowTaggedMetricIter interface { + setMsg(*flowMetric) FlowMetricFlowTaggedMetricIter + Items() []FlowTaggedMetric + Add() FlowTaggedMetric + Append(items ...FlowTaggedMetric) FlowMetricFlowTaggedMetricIter + Set(index int, newObj FlowTaggedMetric) FlowMetricFlowTaggedMetricIter + Clear() FlowMetricFlowTaggedMetricIter + clearHolderSlice() FlowMetricFlowTaggedMetricIter + appendHolderSlice(item FlowTaggedMetric) FlowMetricFlowTaggedMetricIter +} + +func (obj *flowMetricFlowTaggedMetricIter) setMsg(msg *flowMetric) FlowMetricFlowTaggedMetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flowTaggedMetric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *flowMetricFlowTaggedMetricIter) Items() []FlowTaggedMetric { + return obj.flowTaggedMetricSlice +} + +func (obj *flowMetricFlowTaggedMetricIter) Add() FlowTaggedMetric { + newObj := &otg.FlowTaggedMetric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flowTaggedMetric{obj: newObj} + newLibObj.setDefault() + obj.flowTaggedMetricSlice = append(obj.flowTaggedMetricSlice, newLibObj) + return newLibObj +} + +func (obj *flowMetricFlowTaggedMetricIter) Append(items ...FlowTaggedMetric) FlowMetricFlowTaggedMetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowTaggedMetricSlice = append(obj.flowTaggedMetricSlice, item) + } + return obj +} + +func (obj *flowMetricFlowTaggedMetricIter) Set(index int, newObj FlowTaggedMetric) FlowMetricFlowTaggedMetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowTaggedMetricSlice[index] = newObj + return obj +} +func (obj *flowMetricFlowTaggedMetricIter) Clear() FlowMetricFlowTaggedMetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.FlowTaggedMetric{} + obj.flowTaggedMetricSlice = []FlowTaggedMetric{} + } + return obj +} +func (obj *flowMetricFlowTaggedMetricIter) clearHolderSlice() FlowMetricFlowTaggedMetricIter { + if len(obj.flowTaggedMetricSlice) > 0 { + obj.flowTaggedMetricSlice = []FlowTaggedMetric{} + } + return obj +} +func (obj *flowMetricFlowTaggedMetricIter) appendHolderSlice(item FlowTaggedMetric) FlowMetricFlowTaggedMetricIter { + obj.flowTaggedMetricSlice = append(obj.flowTaggedMetricSlice, item) + return obj +} + +func (obj *flowMetric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Timestamps != nil { + + obj.Timestamps().validateObj(vObj, set_default) + } + + if obj.obj.Latency != nil { + + obj.Latency().validateObj(vObj, set_default) + } + + if len(obj.obj.TaggedMetrics) != 0 { + + if set_default { + obj.TaggedMetrics().clearHolderSlice() + for _, item := range obj.obj.TaggedMetrics { + obj.TaggedMetrics().appendHolderSlice(&flowTaggedMetric{obj: item}) + } + } + for _, item := range obj.TaggedMetrics().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *flowMetric) setDefault() { + +} diff --git a/gosnappi/flow_metric_tag.go b/gosnappi/flow_metric_tag.go new file mode 100644 index 00000000..816d4e7e --- /dev/null +++ b/gosnappi/flow_metric_tag.go @@ -0,0 +1,356 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowMetricTag ***** +type flowMetricTag struct { + validation + obj *otg.FlowMetricTag + marshaller marshalFlowMetricTag + unMarshaller unMarshalFlowMetricTag + valueHolder FlowMetricTagValue +} + +func NewFlowMetricTag() FlowMetricTag { + obj := flowMetricTag{obj: &otg.FlowMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *flowMetricTag) msg() *otg.FlowMetricTag { + return obj.obj +} + +func (obj *flowMetricTag) setMsg(msg *otg.FlowMetricTag) FlowMetricTag { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowMetricTag struct { + obj *flowMetricTag +} + +type marshalFlowMetricTag interface { + // ToProto marshals FlowMetricTag to protobuf object *otg.FlowMetricTag + ToProto() (*otg.FlowMetricTag, error) + // ToPbText marshals FlowMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals FlowMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalflowMetricTag struct { + obj *flowMetricTag +} + +type unMarshalFlowMetricTag interface { + // FromProto unmarshals FlowMetricTag from protobuf object *otg.FlowMetricTag + FromProto(msg *otg.FlowMetricTag) (FlowMetricTag, error) + // FromPbText unmarshals FlowMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowMetricTag from JSON text + FromJson(value string) error +} + +func (obj *flowMetricTag) Marshal() marshalFlowMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalflowMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *flowMetricTag) Unmarshal() unMarshalFlowMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowMetricTag) ToProto() (*otg.FlowMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowMetricTag) FromProto(msg *otg.FlowMetricTag) (FlowMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowMetricTag) Clone() (FlowMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowMetricTag) setNil() { + obj.valueHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowMetricTag is description is TBD +type FlowMetricTag interface { + Validation + // msg marshals FlowMetricTag to protobuf object *otg.FlowMetricTag + // and doesn't set defaults + msg() *otg.FlowMetricTag + // setMsg unmarshals FlowMetricTag from protobuf object *otg.FlowMetricTag + // and doesn't set defaults + setMsg(*otg.FlowMetricTag) FlowMetricTag + // provides marshal interface + Marshal() marshalFlowMetricTag + // provides unmarshal interface + Unmarshal() unMarshalFlowMetricTag + // validate validates FlowMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in FlowMetricTag. + Name() string + // SetName assigns string provided by user to FlowMetricTag + SetName(value string) FlowMetricTag + // HasName checks if Name has been set in FlowMetricTag + HasName() bool + // Value returns FlowMetricTagValue, set in FlowMetricTag. + // FlowMetricTagValue is a container for metric tag value + Value() FlowMetricTagValue + // SetValue assigns FlowMetricTagValue provided by user to FlowMetricTag. + // FlowMetricTagValue is a container for metric tag value + SetValue(value FlowMetricTagValue) FlowMetricTag + // HasValue checks if Value has been set in FlowMetricTag + HasValue() bool + setNil() +} + +// Name of packet field metric tag +// Name returns a string +func (obj *flowMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name of packet field metric tag +// Name returns a string +func (obj *flowMetricTag) HasName() bool { + return obj.obj.Name != nil +} + +// Name of packet field metric tag +// SetName sets the string value in the FlowMetricTag object +func (obj *flowMetricTag) SetName(value string) FlowMetricTag { + + obj.obj.Name = &value + return obj +} + +// description is TBD +// Value returns a FlowMetricTagValue +func (obj *flowMetricTag) Value() FlowMetricTagValue { + if obj.obj.Value == nil { + obj.obj.Value = NewFlowMetricTagValue().msg() + } + if obj.valueHolder == nil { + obj.valueHolder = &flowMetricTagValue{obj: obj.obj.Value} + } + return obj.valueHolder +} + +// description is TBD +// Value returns a FlowMetricTagValue +func (obj *flowMetricTag) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the FlowMetricTagValue value in the FlowMetricTag object +func (obj *flowMetricTag) SetValue(value FlowMetricTagValue) FlowMetricTag { + + obj.valueHolder = nil + obj.obj.Value = value.msg() + + return obj +} + +func (obj *flowMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + obj.Value().validateObj(vObj, set_default) + } + +} + +func (obj *flowMetricTag) setDefault() { + +} diff --git a/gosnappi/flow_metric_tag_filter.go b/gosnappi/flow_metric_tag_filter.go new file mode 100644 index 00000000..97c7ab95 --- /dev/null +++ b/gosnappi/flow_metric_tag_filter.go @@ -0,0 +1,337 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowMetricTagFilter ***** +type flowMetricTagFilter struct { + validation + obj *otg.FlowMetricTagFilter + marshaller marshalFlowMetricTagFilter + unMarshaller unMarshalFlowMetricTagFilter +} + +func NewFlowMetricTagFilter() FlowMetricTagFilter { + obj := flowMetricTagFilter{obj: &otg.FlowMetricTagFilter{}} + obj.setDefault() + return &obj +} + +func (obj *flowMetricTagFilter) msg() *otg.FlowMetricTagFilter { + return obj.obj +} + +func (obj *flowMetricTagFilter) setMsg(msg *otg.FlowMetricTagFilter) FlowMetricTagFilter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowMetricTagFilter struct { + obj *flowMetricTagFilter +} + +type marshalFlowMetricTagFilter interface { + // ToProto marshals FlowMetricTagFilter to protobuf object *otg.FlowMetricTagFilter + ToProto() (*otg.FlowMetricTagFilter, error) + // ToPbText marshals FlowMetricTagFilter to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowMetricTagFilter to YAML text + ToYaml() (string, error) + // ToJson marshals FlowMetricTagFilter to JSON text + ToJson() (string, error) +} + +type unMarshalflowMetricTagFilter struct { + obj *flowMetricTagFilter +} + +type unMarshalFlowMetricTagFilter interface { + // FromProto unmarshals FlowMetricTagFilter from protobuf object *otg.FlowMetricTagFilter + FromProto(msg *otg.FlowMetricTagFilter) (FlowMetricTagFilter, error) + // FromPbText unmarshals FlowMetricTagFilter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowMetricTagFilter from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowMetricTagFilter from JSON text + FromJson(value string) error +} + +func (obj *flowMetricTagFilter) Marshal() marshalFlowMetricTagFilter { + if obj.marshaller == nil { + obj.marshaller = &marshalflowMetricTagFilter{obj: obj} + } + return obj.marshaller +} + +func (obj *flowMetricTagFilter) Unmarshal() unMarshalFlowMetricTagFilter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowMetricTagFilter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowMetricTagFilter) ToProto() (*otg.FlowMetricTagFilter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowMetricTagFilter) FromProto(msg *otg.FlowMetricTagFilter) (FlowMetricTagFilter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowMetricTagFilter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowMetricTagFilter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowMetricTagFilter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowMetricTagFilter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowMetricTagFilter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowMetricTagFilter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowMetricTagFilter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowMetricTagFilter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowMetricTagFilter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowMetricTagFilter) Clone() (FlowMetricTagFilter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowMetricTagFilter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowMetricTagFilter is a container for filtering ingress and/or egress metric tags. +// The Tx stats may not be applicable in both the request and response filter. +type FlowMetricTagFilter interface { + Validation + // msg marshals FlowMetricTagFilter to protobuf object *otg.FlowMetricTagFilter + // and doesn't set defaults + msg() *otg.FlowMetricTagFilter + // setMsg unmarshals FlowMetricTagFilter from protobuf object *otg.FlowMetricTagFilter + // and doesn't set defaults + setMsg(*otg.FlowMetricTagFilter) FlowMetricTagFilter + // provides marshal interface + Marshal() marshalFlowMetricTagFilter + // provides unmarshal interface + Unmarshal() unMarshalFlowMetricTagFilter + // validate validates FlowMetricTagFilter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowMetricTagFilter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in FlowMetricTagFilter. + Name() string + // SetName assigns string provided by user to FlowMetricTagFilter + SetName(value string) FlowMetricTagFilter + // HasName checks if Name has been set in FlowMetricTagFilter + HasName() bool + // Values returns []string, set in FlowMetricTagFilter. + Values() []string + // SetValues assigns []string provided by user to FlowMetricTagFilter + SetValues(value []string) FlowMetricTagFilter +} + +// A metric tag name that MUST exist in a flow packet or +// flow egress_packet configuration +// Name returns a string +func (obj *flowMetricTagFilter) Name() string { + + return *obj.obj.Name + +} + +// A metric tag name that MUST exist in a flow packet or +// flow egress_packet configuration +// Name returns a string +func (obj *flowMetricTagFilter) HasName() bool { + return obj.obj.Name != nil +} + +// A metric tag name that MUST exist in a flow packet or +// flow egress_packet configuration +// SetName sets the string value in the FlowMetricTagFilter object +func (obj *flowMetricTagFilter) SetName(value string) FlowMetricTagFilter { + + obj.obj.Name = &value + return obj +} + +// A list of filters that can be applied to the metric tag name. +// By default all values will be included in the flow metric results. +// Values returns a []string +func (obj *flowMetricTagFilter) Values() []string { + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + return obj.obj.Values +} + +// A list of filters that can be applied to the metric tag name. +// By default all values will be included in the flow metric results. +// SetValues sets the []string value in the FlowMetricTagFilter object +func (obj *flowMetricTagFilter) SetValues(value []string) FlowMetricTagFilter { + + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +func (obj *flowMetricTagFilter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *flowMetricTagFilter) setDefault() { + +} diff --git a/gosnappi/flow_metric_tag_value.go b/gosnappi/flow_metric_tag_value.go new file mode 100644 index 00000000..28ccd039 --- /dev/null +++ b/gosnappi/flow_metric_tag_value.go @@ -0,0 +1,421 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowMetricTagValue ***** +type flowMetricTagValue struct { + validation + obj *otg.FlowMetricTagValue + marshaller marshalFlowMetricTagValue + unMarshaller unMarshalFlowMetricTagValue +} + +func NewFlowMetricTagValue() FlowMetricTagValue { + obj := flowMetricTagValue{obj: &otg.FlowMetricTagValue{}} + obj.setDefault() + return &obj +} + +func (obj *flowMetricTagValue) msg() *otg.FlowMetricTagValue { + return obj.obj +} + +func (obj *flowMetricTagValue) setMsg(msg *otg.FlowMetricTagValue) FlowMetricTagValue { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowMetricTagValue struct { + obj *flowMetricTagValue +} + +type marshalFlowMetricTagValue interface { + // ToProto marshals FlowMetricTagValue to protobuf object *otg.FlowMetricTagValue + ToProto() (*otg.FlowMetricTagValue, error) + // ToPbText marshals FlowMetricTagValue to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowMetricTagValue to YAML text + ToYaml() (string, error) + // ToJson marshals FlowMetricTagValue to JSON text + ToJson() (string, error) +} + +type unMarshalflowMetricTagValue struct { + obj *flowMetricTagValue +} + +type unMarshalFlowMetricTagValue interface { + // FromProto unmarshals FlowMetricTagValue from protobuf object *otg.FlowMetricTagValue + FromProto(msg *otg.FlowMetricTagValue) (FlowMetricTagValue, error) + // FromPbText unmarshals FlowMetricTagValue from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowMetricTagValue from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowMetricTagValue from JSON text + FromJson(value string) error +} + +func (obj *flowMetricTagValue) Marshal() marshalFlowMetricTagValue { + if obj.marshaller == nil { + obj.marshaller = &marshalflowMetricTagValue{obj: obj} + } + return obj.marshaller +} + +func (obj *flowMetricTagValue) Unmarshal() unMarshalFlowMetricTagValue { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowMetricTagValue{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowMetricTagValue) ToProto() (*otg.FlowMetricTagValue, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowMetricTagValue) FromProto(msg *otg.FlowMetricTagValue) (FlowMetricTagValue, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowMetricTagValue) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowMetricTagValue) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowMetricTagValue) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowMetricTagValue) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowMetricTagValue) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowMetricTagValue) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowMetricTagValue) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowMetricTagValue) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowMetricTagValue) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowMetricTagValue) Clone() (FlowMetricTagValue, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowMetricTagValue() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowMetricTagValue is a container for metric tag value +type FlowMetricTagValue interface { + Validation + // msg marshals FlowMetricTagValue to protobuf object *otg.FlowMetricTagValue + // and doesn't set defaults + msg() *otg.FlowMetricTagValue + // setMsg unmarshals FlowMetricTagValue from protobuf object *otg.FlowMetricTagValue + // and doesn't set defaults + setMsg(*otg.FlowMetricTagValue) FlowMetricTagValue + // provides marshal interface + Marshal() marshalFlowMetricTagValue + // provides unmarshal interface + Unmarshal() unMarshalFlowMetricTagValue + // validate validates FlowMetricTagValue + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowMetricTagValue, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowMetricTagValueChoiceEnum, set in FlowMetricTagValue + Choice() FlowMetricTagValueChoiceEnum + // setChoice assigns FlowMetricTagValueChoiceEnum provided by user to FlowMetricTagValue + setChoice(value FlowMetricTagValueChoiceEnum) FlowMetricTagValue + // HasChoice checks if Choice has been set in FlowMetricTagValue + HasChoice() bool + // Hex returns string, set in FlowMetricTagValue. + Hex() string + // SetHex assigns string provided by user to FlowMetricTagValue + SetHex(value string) FlowMetricTagValue + // HasHex checks if Hex has been set in FlowMetricTagValue + HasHex() bool + // Str returns string, set in FlowMetricTagValue. + Str() string + // SetStr assigns string provided by user to FlowMetricTagValue + SetStr(value string) FlowMetricTagValue + // HasStr checks if Str has been set in FlowMetricTagValue + HasStr() bool +} + +type FlowMetricTagValueChoiceEnum string + +// Enum of Choice on FlowMetricTagValue +var FlowMetricTagValueChoice = struct { + HEX FlowMetricTagValueChoiceEnum + STR FlowMetricTagValueChoiceEnum +}{ + HEX: FlowMetricTagValueChoiceEnum("hex"), + STR: FlowMetricTagValueChoiceEnum("str"), +} + +func (obj *flowMetricTagValue) Choice() FlowMetricTagValueChoiceEnum { + return FlowMetricTagValueChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// Available formats for metric tag value +// Choice returns a string +func (obj *flowMetricTagValue) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowMetricTagValue) setChoice(value FlowMetricTagValueChoiceEnum) FlowMetricTagValue { + intValue, ok := otg.FlowMetricTagValue_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowMetricTagValueChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowMetricTagValue_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Str = nil + obj.obj.Hex = nil + return obj +} + +// Value represented in hexadecimal format +// Hex returns a string +func (obj *flowMetricTagValue) Hex() string { + + if obj.obj.Hex == nil { + obj.setChoice(FlowMetricTagValueChoice.HEX) + } + + return *obj.obj.Hex + +} + +// Value represented in hexadecimal format +// Hex returns a string +func (obj *flowMetricTagValue) HasHex() bool { + return obj.obj.Hex != nil +} + +// Value represented in hexadecimal format +// SetHex sets the string value in the FlowMetricTagValue object +func (obj *flowMetricTagValue) SetHex(value string) FlowMetricTagValue { + obj.setChoice(FlowMetricTagValueChoice.HEX) + obj.obj.Hex = &value + return obj +} + +// Value represented in string format +// Str returns a string +func (obj *flowMetricTagValue) Str() string { + + if obj.obj.Str == nil { + obj.setChoice(FlowMetricTagValueChoice.STR) + } + + return *obj.obj.Str + +} + +// Value represented in string format +// Str returns a string +func (obj *flowMetricTagValue) HasStr() bool { + return obj.obj.Str != nil +} + +// Value represented in string format +// SetStr sets the string value in the FlowMetricTagValue object +func (obj *flowMetricTagValue) SetStr(value string) FlowMetricTagValue { + obj.setChoice(FlowMetricTagValueChoice.STR) + obj.obj.Str = &value + return obj +} + +func (obj *flowMetricTagValue) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Hex != nil { + + err := obj.validateHex(obj.Hex()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on FlowMetricTagValue.Hex")) + } + + } + +} + +func (obj *flowMetricTagValue) setDefault() { + var choices_set int = 0 + var choice FlowMetricTagValueChoiceEnum + + if obj.obj.Hex != nil { + choices_set += 1 + choice = FlowMetricTagValueChoice.HEX + } + + if obj.obj.Str != nil { + choices_set += 1 + choice = FlowMetricTagValueChoice.STR + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowMetricTagValueChoice.HEX) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowMetricTagValue") + } + } else { + intVal := otg.FlowMetricTagValue_Choice_Enum_value[string(choice)] + enumValue := otg.FlowMetricTagValue_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_metrics.go b/gosnappi/flow_metrics.go new file mode 100644 index 00000000..c546f103 --- /dev/null +++ b/gosnappi/flow_metrics.go @@ -0,0 +1,519 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowMetrics ***** +type flowMetrics struct { + validation + obj *otg.FlowMetrics + marshaller marshalFlowMetrics + unMarshaller unMarshalFlowMetrics + rxTxRatioHolder FlowRxTxRatio + latencyHolder FlowLatencyMetrics + predefinedMetricTagsHolder FlowPredefinedTags +} + +func NewFlowMetrics() FlowMetrics { + obj := flowMetrics{obj: &otg.FlowMetrics{}} + obj.setDefault() + return &obj +} + +func (obj *flowMetrics) msg() *otg.FlowMetrics { + return obj.obj +} + +func (obj *flowMetrics) setMsg(msg *otg.FlowMetrics) FlowMetrics { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowMetrics struct { + obj *flowMetrics +} + +type marshalFlowMetrics interface { + // ToProto marshals FlowMetrics to protobuf object *otg.FlowMetrics + ToProto() (*otg.FlowMetrics, error) + // ToPbText marshals FlowMetrics to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowMetrics to YAML text + ToYaml() (string, error) + // ToJson marshals FlowMetrics to JSON text + ToJson() (string, error) +} + +type unMarshalflowMetrics struct { + obj *flowMetrics +} + +type unMarshalFlowMetrics interface { + // FromProto unmarshals FlowMetrics from protobuf object *otg.FlowMetrics + FromProto(msg *otg.FlowMetrics) (FlowMetrics, error) + // FromPbText unmarshals FlowMetrics from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowMetrics from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowMetrics from JSON text + FromJson(value string) error +} + +func (obj *flowMetrics) Marshal() marshalFlowMetrics { + if obj.marshaller == nil { + obj.marshaller = &marshalflowMetrics{obj: obj} + } + return obj.marshaller +} + +func (obj *flowMetrics) Unmarshal() unMarshalFlowMetrics { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowMetrics{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowMetrics) ToProto() (*otg.FlowMetrics, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowMetrics) FromProto(msg *otg.FlowMetrics) (FlowMetrics, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowMetrics) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowMetrics) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowMetrics) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowMetrics) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowMetrics) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowMetrics) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowMetrics) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowMetrics) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowMetrics) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowMetrics) Clone() (FlowMetrics, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowMetrics() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowMetrics) setNil() { + obj.rxTxRatioHolder = nil + obj.latencyHolder = nil + obj.predefinedMetricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowMetrics is the optional container for configuring flow metrics. +type FlowMetrics interface { + Validation + // msg marshals FlowMetrics to protobuf object *otg.FlowMetrics + // and doesn't set defaults + msg() *otg.FlowMetrics + // setMsg unmarshals FlowMetrics from protobuf object *otg.FlowMetrics + // and doesn't set defaults + setMsg(*otg.FlowMetrics) FlowMetrics + // provides marshal interface + Marshal() marshalFlowMetrics + // provides unmarshal interface + Unmarshal() unMarshalFlowMetrics + // validate validates FlowMetrics + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowMetrics, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Enable returns bool, set in FlowMetrics. + Enable() bool + // SetEnable assigns bool provided by user to FlowMetrics + SetEnable(value bool) FlowMetrics + // HasEnable checks if Enable has been set in FlowMetrics + HasEnable() bool + // Loss returns bool, set in FlowMetrics. + Loss() bool + // SetLoss assigns bool provided by user to FlowMetrics + SetLoss(value bool) FlowMetrics + // HasLoss checks if Loss has been set in FlowMetrics + HasLoss() bool + // RxTxRatio returns FlowRxTxRatio, set in FlowMetrics. + // FlowRxTxRatio is rx Tx ratio is the ratio of expected number of Rx packets across all Rx ports to the Tx packets + // for the configured flow. It is a factor by which the Tx packet count is multiplied to calculate + // the sum of expected Rx packet count, across all Rx ports. This will be used to calculate loss + // percentage of flow at aggregate level. + RxTxRatio() FlowRxTxRatio + // SetRxTxRatio assigns FlowRxTxRatio provided by user to FlowMetrics. + // FlowRxTxRatio is rx Tx ratio is the ratio of expected number of Rx packets across all Rx ports to the Tx packets + // for the configured flow. It is a factor by which the Tx packet count is multiplied to calculate + // the sum of expected Rx packet count, across all Rx ports. This will be used to calculate loss + // percentage of flow at aggregate level. + SetRxTxRatio(value FlowRxTxRatio) FlowMetrics + // HasRxTxRatio checks if RxTxRatio has been set in FlowMetrics + HasRxTxRatio() bool + // Timestamps returns bool, set in FlowMetrics. + Timestamps() bool + // SetTimestamps assigns bool provided by user to FlowMetrics + SetTimestamps(value bool) FlowMetrics + // HasTimestamps checks if Timestamps has been set in FlowMetrics + HasTimestamps() bool + // Latency returns FlowLatencyMetrics, set in FlowMetrics. + // FlowLatencyMetrics is the optional container for per flow latency metric configuration. + Latency() FlowLatencyMetrics + // SetLatency assigns FlowLatencyMetrics provided by user to FlowMetrics. + // FlowLatencyMetrics is the optional container for per flow latency metric configuration. + SetLatency(value FlowLatencyMetrics) FlowMetrics + // HasLatency checks if Latency has been set in FlowMetrics + HasLatency() bool + // PredefinedMetricTags returns FlowPredefinedTags, set in FlowMetrics. + // FlowPredefinedTags is list of predefined flow tracking options, outside packet fields, that can be enabled. + PredefinedMetricTags() FlowPredefinedTags + // SetPredefinedMetricTags assigns FlowPredefinedTags provided by user to FlowMetrics. + // FlowPredefinedTags is list of predefined flow tracking options, outside packet fields, that can be enabled. + SetPredefinedMetricTags(value FlowPredefinedTags) FlowMetrics + // HasPredefinedMetricTags checks if PredefinedMetricTags has been set in FlowMetrics + HasPredefinedMetricTags() bool + setNil() +} + +// Enables flow metrics. +// Enabling this option may affect the resultant packet payload due to +// additional instrumentation data. +// Enable returns a bool +func (obj *flowMetrics) Enable() bool { + + return *obj.obj.Enable + +} + +// Enables flow metrics. +// Enabling this option may affect the resultant packet payload due to +// additional instrumentation data. +// Enable returns a bool +func (obj *flowMetrics) HasEnable() bool { + return obj.obj.Enable != nil +} + +// Enables flow metrics. +// Enabling this option may affect the resultant packet payload due to +// additional instrumentation data. +// SetEnable sets the bool value in the FlowMetrics object +func (obj *flowMetrics) SetEnable(value bool) FlowMetrics { + + obj.obj.Enable = &value + return obj +} + +// Enables additional flow metric loss calculation. +// Loss returns a bool +func (obj *flowMetrics) Loss() bool { + + return *obj.obj.Loss + +} + +// Enables additional flow metric loss calculation. +// Loss returns a bool +func (obj *flowMetrics) HasLoss() bool { + return obj.obj.Loss != nil +} + +// Enables additional flow metric loss calculation. +// SetLoss sets the bool value in the FlowMetrics object +func (obj *flowMetrics) SetLoss(value bool) FlowMetrics { + + obj.obj.Loss = &value + return obj +} + +// Rx Tx ratio. +// RxTxRatio returns a FlowRxTxRatio +func (obj *flowMetrics) RxTxRatio() FlowRxTxRatio { + if obj.obj.RxTxRatio == nil { + obj.obj.RxTxRatio = NewFlowRxTxRatio().msg() + } + if obj.rxTxRatioHolder == nil { + obj.rxTxRatioHolder = &flowRxTxRatio{obj: obj.obj.RxTxRatio} + } + return obj.rxTxRatioHolder +} + +// Rx Tx ratio. +// RxTxRatio returns a FlowRxTxRatio +func (obj *flowMetrics) HasRxTxRatio() bool { + return obj.obj.RxTxRatio != nil +} + +// Rx Tx ratio. +// SetRxTxRatio sets the FlowRxTxRatio value in the FlowMetrics object +func (obj *flowMetrics) SetRxTxRatio(value FlowRxTxRatio) FlowMetrics { + + obj.rxTxRatioHolder = nil + obj.obj.RxTxRatio = value.msg() + + return obj +} + +// Enables additional flow metric first and last timestamps. +// Timestamps returns a bool +func (obj *flowMetrics) Timestamps() bool { + + return *obj.obj.Timestamps + +} + +// Enables additional flow metric first and last timestamps. +// Timestamps returns a bool +func (obj *flowMetrics) HasTimestamps() bool { + return obj.obj.Timestamps != nil +} + +// Enables additional flow metric first and last timestamps. +// SetTimestamps sets the bool value in the FlowMetrics object +func (obj *flowMetrics) SetTimestamps(value bool) FlowMetrics { + + obj.obj.Timestamps = &value + return obj +} + +// Latency metrics. +// Latency returns a FlowLatencyMetrics +func (obj *flowMetrics) Latency() FlowLatencyMetrics { + if obj.obj.Latency == nil { + obj.obj.Latency = NewFlowLatencyMetrics().msg() + } + if obj.latencyHolder == nil { + obj.latencyHolder = &flowLatencyMetrics{obj: obj.obj.Latency} + } + return obj.latencyHolder +} + +// Latency metrics. +// Latency returns a FlowLatencyMetrics +func (obj *flowMetrics) HasLatency() bool { + return obj.obj.Latency != nil +} + +// Latency metrics. +// SetLatency sets the FlowLatencyMetrics value in the FlowMetrics object +func (obj *flowMetrics) SetLatency(value FlowLatencyMetrics) FlowMetrics { + + obj.latencyHolder = nil + obj.obj.Latency = value.msg() + + return obj +} + +// Predefined metric tags +// PredefinedMetricTags returns a FlowPredefinedTags +func (obj *flowMetrics) PredefinedMetricTags() FlowPredefinedTags { + if obj.obj.PredefinedMetricTags == nil { + obj.obj.PredefinedMetricTags = NewFlowPredefinedTags().msg() + } + if obj.predefinedMetricTagsHolder == nil { + obj.predefinedMetricTagsHolder = &flowPredefinedTags{obj: obj.obj.PredefinedMetricTags} + } + return obj.predefinedMetricTagsHolder +} + +// Predefined metric tags +// PredefinedMetricTags returns a FlowPredefinedTags +func (obj *flowMetrics) HasPredefinedMetricTags() bool { + return obj.obj.PredefinedMetricTags != nil +} + +// Predefined metric tags +// SetPredefinedMetricTags sets the FlowPredefinedTags value in the FlowMetrics object +func (obj *flowMetrics) SetPredefinedMetricTags(value FlowPredefinedTags) FlowMetrics { + + obj.predefinedMetricTagsHolder = nil + obj.obj.PredefinedMetricTags = value.msg() + + return obj +} + +func (obj *flowMetrics) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RxTxRatio != nil { + + obj.RxTxRatio().validateObj(vObj, set_default) + } + + if obj.obj.Latency != nil { + + obj.Latency().validateObj(vObj, set_default) + } + + if obj.obj.PredefinedMetricTags != nil { + + obj.PredefinedMetricTags().validateObj(vObj, set_default) + } + +} + +func (obj *flowMetrics) setDefault() { + if obj.obj.Enable == nil { + obj.SetEnable(false) + } + if obj.obj.Loss == nil { + obj.SetLoss(false) + } + if obj.obj.Timestamps == nil { + obj.SetTimestamps(false) + } + +} diff --git a/gosnappi/flow_metrics_request.go b/gosnappi/flow_metrics_request.go new file mode 100644 index 00000000..e747e9de --- /dev/null +++ b/gosnappi/flow_metrics_request.go @@ -0,0 +1,415 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowMetricsRequest ***** +type flowMetricsRequest struct { + validation + obj *otg.FlowMetricsRequest + marshaller marshalFlowMetricsRequest + unMarshaller unMarshalFlowMetricsRequest + taggedMetricsHolder FlowTaggedMetricsFilter +} + +func NewFlowMetricsRequest() FlowMetricsRequest { + obj := flowMetricsRequest{obj: &otg.FlowMetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *flowMetricsRequest) msg() *otg.FlowMetricsRequest { + return obj.obj +} + +func (obj *flowMetricsRequest) setMsg(msg *otg.FlowMetricsRequest) FlowMetricsRequest { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowMetricsRequest struct { + obj *flowMetricsRequest +} + +type marshalFlowMetricsRequest interface { + // ToProto marshals FlowMetricsRequest to protobuf object *otg.FlowMetricsRequest + ToProto() (*otg.FlowMetricsRequest, error) + // ToPbText marshals FlowMetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowMetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals FlowMetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshalflowMetricsRequest struct { + obj *flowMetricsRequest +} + +type unMarshalFlowMetricsRequest interface { + // FromProto unmarshals FlowMetricsRequest from protobuf object *otg.FlowMetricsRequest + FromProto(msg *otg.FlowMetricsRequest) (FlowMetricsRequest, error) + // FromPbText unmarshals FlowMetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowMetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowMetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *flowMetricsRequest) Marshal() marshalFlowMetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalflowMetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *flowMetricsRequest) Unmarshal() unMarshalFlowMetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowMetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowMetricsRequest) ToProto() (*otg.FlowMetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowMetricsRequest) FromProto(msg *otg.FlowMetricsRequest) (FlowMetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowMetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowMetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowMetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowMetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowMetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowMetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowMetricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowMetricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowMetricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowMetricsRequest) Clone() (FlowMetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowMetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowMetricsRequest) setNil() { + obj.taggedMetricsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowMetricsRequest is the container for a flow metric request. +type FlowMetricsRequest interface { + Validation + // msg marshals FlowMetricsRequest to protobuf object *otg.FlowMetricsRequest + // and doesn't set defaults + msg() *otg.FlowMetricsRequest + // setMsg unmarshals FlowMetricsRequest from protobuf object *otg.FlowMetricsRequest + // and doesn't set defaults + setMsg(*otg.FlowMetricsRequest) FlowMetricsRequest + // provides marshal interface + Marshal() marshalFlowMetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalFlowMetricsRequest + // validate validates FlowMetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowMetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // FlowNames returns []string, set in FlowMetricsRequest. + FlowNames() []string + // SetFlowNames assigns []string provided by user to FlowMetricsRequest + SetFlowNames(value []string) FlowMetricsRequest + // MetricNames returns []FlowMetricsRequestMetricNamesEnum, set in FlowMetricsRequest + MetricNames() []FlowMetricsRequestMetricNamesEnum + // SetMetricNames assigns []FlowMetricsRequestMetricNamesEnum provided by user to FlowMetricsRequest + SetMetricNames(value []FlowMetricsRequestMetricNamesEnum) FlowMetricsRequest + // TaggedMetrics returns FlowTaggedMetricsFilter, set in FlowMetricsRequest. + // FlowTaggedMetricsFilter is filter for tagged metrics + TaggedMetrics() FlowTaggedMetricsFilter + // SetTaggedMetrics assigns FlowTaggedMetricsFilter provided by user to FlowMetricsRequest. + // FlowTaggedMetricsFilter is filter for tagged metrics + SetTaggedMetrics(value FlowTaggedMetricsFilter) FlowMetricsRequest + // HasTaggedMetrics checks if TaggedMetrics has been set in FlowMetricsRequest + HasTaggedMetrics() bool + setNil() +} + +// Flow metrics will be retrieved for these flow names. +// If no flow names are specified then all flows will be returned. +// +// x-constraint: +// - /components/schemas/Flow/properties/name +// +// x-constraint: +// - /components/schemas/Flow/properties/name +// +// FlowNames returns a []string +func (obj *flowMetricsRequest) FlowNames() []string { + if obj.obj.FlowNames == nil { + obj.obj.FlowNames = make([]string, 0) + } + return obj.obj.FlowNames +} + +// Flow metrics will be retrieved for these flow names. +// If no flow names are specified then all flows will be returned. +// +// x-constraint: +// - /components/schemas/Flow/properties/name +// +// x-constraint: +// - /components/schemas/Flow/properties/name +// +// SetFlowNames sets the []string value in the FlowMetricsRequest object +func (obj *flowMetricsRequest) SetFlowNames(value []string) FlowMetricsRequest { + + if obj.obj.FlowNames == nil { + obj.obj.FlowNames = make([]string, 0) + } + obj.obj.FlowNames = value + + return obj +} + +type FlowMetricsRequestMetricNamesEnum string + +// Enum of MetricNames on FlowMetricsRequest +var FlowMetricsRequestMetricNames = struct { + TRANSMIT FlowMetricsRequestMetricNamesEnum + FRAMES_TX FlowMetricsRequestMetricNamesEnum + FRAMES_RX FlowMetricsRequestMetricNamesEnum + BYTES_TX FlowMetricsRequestMetricNamesEnum + BYTES_RX FlowMetricsRequestMetricNamesEnum + FRAMES_TX_RATE FlowMetricsRequestMetricNamesEnum + FRAMES_RX_RATE FlowMetricsRequestMetricNamesEnum +}{ + TRANSMIT: FlowMetricsRequestMetricNamesEnum("transmit"), + FRAMES_TX: FlowMetricsRequestMetricNamesEnum("frames_tx"), + FRAMES_RX: FlowMetricsRequestMetricNamesEnum("frames_rx"), + BYTES_TX: FlowMetricsRequestMetricNamesEnum("bytes_tx"), + BYTES_RX: FlowMetricsRequestMetricNamesEnum("bytes_rx"), + FRAMES_TX_RATE: FlowMetricsRequestMetricNamesEnum("frames_tx_rate"), + FRAMES_RX_RATE: FlowMetricsRequestMetricNamesEnum("frames_rx_rate"), +} + +func (obj *flowMetricsRequest) MetricNames() []FlowMetricsRequestMetricNamesEnum { + items := []FlowMetricsRequestMetricNamesEnum{} + for _, item := range obj.obj.MetricNames { + items = append(items, FlowMetricsRequestMetricNamesEnum(item.String())) + } + return items +} + +// The list of metric names that the returned result set will contain. If the list is empty then all metrics will be returned. +// SetMetricNames sets the []string value in the FlowMetricsRequest object +func (obj *flowMetricsRequest) SetMetricNames(value []FlowMetricsRequestMetricNamesEnum) FlowMetricsRequest { + + items := []otg.FlowMetricsRequest_MetricNames_Enum{} + for _, item := range value { + intValue := otg.FlowMetricsRequest_MetricNames_Enum_value[string(item)] + items = append(items, otg.FlowMetricsRequest_MetricNames_Enum(intValue)) + } + obj.obj.MetricNames = items + return obj +} + +// description is TBD +// TaggedMetrics returns a FlowTaggedMetricsFilter +func (obj *flowMetricsRequest) TaggedMetrics() FlowTaggedMetricsFilter { + if obj.obj.TaggedMetrics == nil { + obj.obj.TaggedMetrics = NewFlowTaggedMetricsFilter().msg() + } + if obj.taggedMetricsHolder == nil { + obj.taggedMetricsHolder = &flowTaggedMetricsFilter{obj: obj.obj.TaggedMetrics} + } + return obj.taggedMetricsHolder +} + +// description is TBD +// TaggedMetrics returns a FlowTaggedMetricsFilter +func (obj *flowMetricsRequest) HasTaggedMetrics() bool { + return obj.obj.TaggedMetrics != nil +} + +// description is TBD +// SetTaggedMetrics sets the FlowTaggedMetricsFilter value in the FlowMetricsRequest object +func (obj *flowMetricsRequest) SetTaggedMetrics(value FlowTaggedMetricsFilter) FlowMetricsRequest { + + obj.taggedMetricsHolder = nil + obj.obj.TaggedMetrics = value.msg() + + return obj +} + +func (obj *flowMetricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.TaggedMetrics != nil { + + obj.TaggedMetrics().validateObj(vObj, set_default) + } + +} + +func (obj *flowMetricsRequest) setDefault() { + +} diff --git a/gosnappi/flow_mpls.go b/gosnappi/flow_mpls.go new file mode 100644 index 00000000..7650c315 --- /dev/null +++ b/gosnappi/flow_mpls.go @@ -0,0 +1,457 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowMpls ***** +type flowMpls struct { + validation + obj *otg.FlowMpls + marshaller marshalFlowMpls + unMarshaller unMarshalFlowMpls + labelHolder PatternFlowMplsLabel + trafficClassHolder PatternFlowMplsTrafficClass + bottomOfStackHolder PatternFlowMplsBottomOfStack + timeToLiveHolder PatternFlowMplsTimeToLive +} + +func NewFlowMpls() FlowMpls { + obj := flowMpls{obj: &otg.FlowMpls{}} + obj.setDefault() + return &obj +} + +func (obj *flowMpls) msg() *otg.FlowMpls { + return obj.obj +} + +func (obj *flowMpls) setMsg(msg *otg.FlowMpls) FlowMpls { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowMpls struct { + obj *flowMpls +} + +type marshalFlowMpls interface { + // ToProto marshals FlowMpls to protobuf object *otg.FlowMpls + ToProto() (*otg.FlowMpls, error) + // ToPbText marshals FlowMpls to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowMpls to YAML text + ToYaml() (string, error) + // ToJson marshals FlowMpls to JSON text + ToJson() (string, error) +} + +type unMarshalflowMpls struct { + obj *flowMpls +} + +type unMarshalFlowMpls interface { + // FromProto unmarshals FlowMpls from protobuf object *otg.FlowMpls + FromProto(msg *otg.FlowMpls) (FlowMpls, error) + // FromPbText unmarshals FlowMpls from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowMpls from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowMpls from JSON text + FromJson(value string) error +} + +func (obj *flowMpls) Marshal() marshalFlowMpls { + if obj.marshaller == nil { + obj.marshaller = &marshalflowMpls{obj: obj} + } + return obj.marshaller +} + +func (obj *flowMpls) Unmarshal() unMarshalFlowMpls { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowMpls{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowMpls) ToProto() (*otg.FlowMpls, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowMpls) FromProto(msg *otg.FlowMpls) (FlowMpls, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowMpls) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowMpls) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowMpls) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowMpls) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowMpls) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowMpls) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowMpls) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowMpls) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowMpls) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowMpls) Clone() (FlowMpls, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowMpls() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowMpls) setNil() { + obj.labelHolder = nil + obj.trafficClassHolder = nil + obj.bottomOfStackHolder = nil + obj.timeToLiveHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowMpls is mPLS packet header; When configuring multiple such headers, the count shall not exceed 20. +type FlowMpls interface { + Validation + // msg marshals FlowMpls to protobuf object *otg.FlowMpls + // and doesn't set defaults + msg() *otg.FlowMpls + // setMsg unmarshals FlowMpls from protobuf object *otg.FlowMpls + // and doesn't set defaults + setMsg(*otg.FlowMpls) FlowMpls + // provides marshal interface + Marshal() marshalFlowMpls + // provides unmarshal interface + Unmarshal() unMarshalFlowMpls + // validate validates FlowMpls + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowMpls, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Label returns PatternFlowMplsLabel, set in FlowMpls. + // PatternFlowMplsLabel is label of routers + Label() PatternFlowMplsLabel + // SetLabel assigns PatternFlowMplsLabel provided by user to FlowMpls. + // PatternFlowMplsLabel is label of routers + SetLabel(value PatternFlowMplsLabel) FlowMpls + // HasLabel checks if Label has been set in FlowMpls + HasLabel() bool + // TrafficClass returns PatternFlowMplsTrafficClass, set in FlowMpls. + // PatternFlowMplsTrafficClass is traffic class + TrafficClass() PatternFlowMplsTrafficClass + // SetTrafficClass assigns PatternFlowMplsTrafficClass provided by user to FlowMpls. + // PatternFlowMplsTrafficClass is traffic class + SetTrafficClass(value PatternFlowMplsTrafficClass) FlowMpls + // HasTrafficClass checks if TrafficClass has been set in FlowMpls + HasTrafficClass() bool + // BottomOfStack returns PatternFlowMplsBottomOfStack, set in FlowMpls. + // PatternFlowMplsBottomOfStack is bottom of stack + BottomOfStack() PatternFlowMplsBottomOfStack + // SetBottomOfStack assigns PatternFlowMplsBottomOfStack provided by user to FlowMpls. + // PatternFlowMplsBottomOfStack is bottom of stack + SetBottomOfStack(value PatternFlowMplsBottomOfStack) FlowMpls + // HasBottomOfStack checks if BottomOfStack has been set in FlowMpls + HasBottomOfStack() bool + // TimeToLive returns PatternFlowMplsTimeToLive, set in FlowMpls. + // PatternFlowMplsTimeToLive is time to live + TimeToLive() PatternFlowMplsTimeToLive + // SetTimeToLive assigns PatternFlowMplsTimeToLive provided by user to FlowMpls. + // PatternFlowMplsTimeToLive is time to live + SetTimeToLive(value PatternFlowMplsTimeToLive) FlowMpls + // HasTimeToLive checks if TimeToLive has been set in FlowMpls + HasTimeToLive() bool + setNil() +} + +// description is TBD +// Label returns a PatternFlowMplsLabel +func (obj *flowMpls) Label() PatternFlowMplsLabel { + if obj.obj.Label == nil { + obj.obj.Label = NewPatternFlowMplsLabel().msg() + } + if obj.labelHolder == nil { + obj.labelHolder = &patternFlowMplsLabel{obj: obj.obj.Label} + } + return obj.labelHolder +} + +// description is TBD +// Label returns a PatternFlowMplsLabel +func (obj *flowMpls) HasLabel() bool { + return obj.obj.Label != nil +} + +// description is TBD +// SetLabel sets the PatternFlowMplsLabel value in the FlowMpls object +func (obj *flowMpls) SetLabel(value PatternFlowMplsLabel) FlowMpls { + + obj.labelHolder = nil + obj.obj.Label = value.msg() + + return obj +} + +// description is TBD +// TrafficClass returns a PatternFlowMplsTrafficClass +func (obj *flowMpls) TrafficClass() PatternFlowMplsTrafficClass { + if obj.obj.TrafficClass == nil { + obj.obj.TrafficClass = NewPatternFlowMplsTrafficClass().msg() + } + if obj.trafficClassHolder == nil { + obj.trafficClassHolder = &patternFlowMplsTrafficClass{obj: obj.obj.TrafficClass} + } + return obj.trafficClassHolder +} + +// description is TBD +// TrafficClass returns a PatternFlowMplsTrafficClass +func (obj *flowMpls) HasTrafficClass() bool { + return obj.obj.TrafficClass != nil +} + +// description is TBD +// SetTrafficClass sets the PatternFlowMplsTrafficClass value in the FlowMpls object +func (obj *flowMpls) SetTrafficClass(value PatternFlowMplsTrafficClass) FlowMpls { + + obj.trafficClassHolder = nil + obj.obj.TrafficClass = value.msg() + + return obj +} + +// description is TBD +// BottomOfStack returns a PatternFlowMplsBottomOfStack +func (obj *flowMpls) BottomOfStack() PatternFlowMplsBottomOfStack { + if obj.obj.BottomOfStack == nil { + obj.obj.BottomOfStack = NewPatternFlowMplsBottomOfStack().msg() + } + if obj.bottomOfStackHolder == nil { + obj.bottomOfStackHolder = &patternFlowMplsBottomOfStack{obj: obj.obj.BottomOfStack} + } + return obj.bottomOfStackHolder +} + +// description is TBD +// BottomOfStack returns a PatternFlowMplsBottomOfStack +func (obj *flowMpls) HasBottomOfStack() bool { + return obj.obj.BottomOfStack != nil +} + +// description is TBD +// SetBottomOfStack sets the PatternFlowMplsBottomOfStack value in the FlowMpls object +func (obj *flowMpls) SetBottomOfStack(value PatternFlowMplsBottomOfStack) FlowMpls { + + obj.bottomOfStackHolder = nil + obj.obj.BottomOfStack = value.msg() + + return obj +} + +// description is TBD +// TimeToLive returns a PatternFlowMplsTimeToLive +func (obj *flowMpls) TimeToLive() PatternFlowMplsTimeToLive { + if obj.obj.TimeToLive == nil { + obj.obj.TimeToLive = NewPatternFlowMplsTimeToLive().msg() + } + if obj.timeToLiveHolder == nil { + obj.timeToLiveHolder = &patternFlowMplsTimeToLive{obj: obj.obj.TimeToLive} + } + return obj.timeToLiveHolder +} + +// description is TBD +// TimeToLive returns a PatternFlowMplsTimeToLive +func (obj *flowMpls) HasTimeToLive() bool { + return obj.obj.TimeToLive != nil +} + +// description is TBD +// SetTimeToLive sets the PatternFlowMplsTimeToLive value in the FlowMpls object +func (obj *flowMpls) SetTimeToLive(value PatternFlowMplsTimeToLive) FlowMpls { + + obj.timeToLiveHolder = nil + obj.obj.TimeToLive = value.msg() + + return obj +} + +func (obj *flowMpls) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Label != nil { + + obj.Label().validateObj(vObj, set_default) + } + + if obj.obj.TrafficClass != nil { + + obj.TrafficClass().validateObj(vObj, set_default) + } + + if obj.obj.BottomOfStack != nil { + + obj.BottomOfStack().validateObj(vObj, set_default) + } + + if obj.obj.TimeToLive != nil { + + obj.TimeToLive().validateObj(vObj, set_default) + } + +} + +func (obj *flowMpls) setDefault() { + +} diff --git a/gosnappi/flow_pfc_pause.go b/gosnappi/flow_pfc_pause.go new file mode 100644 index 00000000..6cabca73 --- /dev/null +++ b/gosnappi/flow_pfc_pause.go @@ -0,0 +1,844 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowPfcPause ***** +type flowPfcPause struct { + validation + obj *otg.FlowPfcPause + marshaller marshalFlowPfcPause + unMarshaller unMarshalFlowPfcPause + dstHolder PatternFlowPfcPauseDst + srcHolder PatternFlowPfcPauseSrc + etherTypeHolder PatternFlowPfcPauseEtherType + controlOpCodeHolder PatternFlowPfcPauseControlOpCode + classEnableVectorHolder PatternFlowPfcPauseClassEnableVector + pauseClass_0Holder PatternFlowPfcPausePauseClass0 + pauseClass_1Holder PatternFlowPfcPausePauseClass1 + pauseClass_2Holder PatternFlowPfcPausePauseClass2 + pauseClass_3Holder PatternFlowPfcPausePauseClass3 + pauseClass_4Holder PatternFlowPfcPausePauseClass4 + pauseClass_5Holder PatternFlowPfcPausePauseClass5 + pauseClass_6Holder PatternFlowPfcPausePauseClass6 + pauseClass_7Holder PatternFlowPfcPausePauseClass7 +} + +func NewFlowPfcPause() FlowPfcPause { + obj := flowPfcPause{obj: &otg.FlowPfcPause{}} + obj.setDefault() + return &obj +} + +func (obj *flowPfcPause) msg() *otg.FlowPfcPause { + return obj.obj +} + +func (obj *flowPfcPause) setMsg(msg *otg.FlowPfcPause) FlowPfcPause { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowPfcPause struct { + obj *flowPfcPause +} + +type marshalFlowPfcPause interface { + // ToProto marshals FlowPfcPause to protobuf object *otg.FlowPfcPause + ToProto() (*otg.FlowPfcPause, error) + // ToPbText marshals FlowPfcPause to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowPfcPause to YAML text + ToYaml() (string, error) + // ToJson marshals FlowPfcPause to JSON text + ToJson() (string, error) +} + +type unMarshalflowPfcPause struct { + obj *flowPfcPause +} + +type unMarshalFlowPfcPause interface { + // FromProto unmarshals FlowPfcPause from protobuf object *otg.FlowPfcPause + FromProto(msg *otg.FlowPfcPause) (FlowPfcPause, error) + // FromPbText unmarshals FlowPfcPause from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowPfcPause from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowPfcPause from JSON text + FromJson(value string) error +} + +func (obj *flowPfcPause) Marshal() marshalFlowPfcPause { + if obj.marshaller == nil { + obj.marshaller = &marshalflowPfcPause{obj: obj} + } + return obj.marshaller +} + +func (obj *flowPfcPause) Unmarshal() unMarshalFlowPfcPause { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowPfcPause{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowPfcPause) ToProto() (*otg.FlowPfcPause, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowPfcPause) FromProto(msg *otg.FlowPfcPause) (FlowPfcPause, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowPfcPause) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowPfcPause) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowPfcPause) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowPfcPause) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowPfcPause) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowPfcPause) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowPfcPause) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowPfcPause) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowPfcPause) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowPfcPause) Clone() (FlowPfcPause, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowPfcPause() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowPfcPause) setNil() { + obj.dstHolder = nil + obj.srcHolder = nil + obj.etherTypeHolder = nil + obj.controlOpCodeHolder = nil + obj.classEnableVectorHolder = nil + obj.pauseClass_0Holder = nil + obj.pauseClass_1Holder = nil + obj.pauseClass_2Holder = nil + obj.pauseClass_3Holder = nil + obj.pauseClass_4Holder = nil + obj.pauseClass_5Holder = nil + obj.pauseClass_6Holder = nil + obj.pauseClass_7Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowPfcPause is iEEE 802.1Qbb PFC Pause packet header. +type FlowPfcPause interface { + Validation + // msg marshals FlowPfcPause to protobuf object *otg.FlowPfcPause + // and doesn't set defaults + msg() *otg.FlowPfcPause + // setMsg unmarshals FlowPfcPause from protobuf object *otg.FlowPfcPause + // and doesn't set defaults + setMsg(*otg.FlowPfcPause) FlowPfcPause + // provides marshal interface + Marshal() marshalFlowPfcPause + // provides unmarshal interface + Unmarshal() unMarshalFlowPfcPause + // validate validates FlowPfcPause + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowPfcPause, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Dst returns PatternFlowPfcPauseDst, set in FlowPfcPause. + // PatternFlowPfcPauseDst is destination MAC address + Dst() PatternFlowPfcPauseDst + // SetDst assigns PatternFlowPfcPauseDst provided by user to FlowPfcPause. + // PatternFlowPfcPauseDst is destination MAC address + SetDst(value PatternFlowPfcPauseDst) FlowPfcPause + // HasDst checks if Dst has been set in FlowPfcPause + HasDst() bool + // Src returns PatternFlowPfcPauseSrc, set in FlowPfcPause. + // PatternFlowPfcPauseSrc is source MAC address + Src() PatternFlowPfcPauseSrc + // SetSrc assigns PatternFlowPfcPauseSrc provided by user to FlowPfcPause. + // PatternFlowPfcPauseSrc is source MAC address + SetSrc(value PatternFlowPfcPauseSrc) FlowPfcPause + // HasSrc checks if Src has been set in FlowPfcPause + HasSrc() bool + // EtherType returns PatternFlowPfcPauseEtherType, set in FlowPfcPause. + // PatternFlowPfcPauseEtherType is ethernet type + EtherType() PatternFlowPfcPauseEtherType + // SetEtherType assigns PatternFlowPfcPauseEtherType provided by user to FlowPfcPause. + // PatternFlowPfcPauseEtherType is ethernet type + SetEtherType(value PatternFlowPfcPauseEtherType) FlowPfcPause + // HasEtherType checks if EtherType has been set in FlowPfcPause + HasEtherType() bool + // ControlOpCode returns PatternFlowPfcPauseControlOpCode, set in FlowPfcPause. + // PatternFlowPfcPauseControlOpCode is control operation code + ControlOpCode() PatternFlowPfcPauseControlOpCode + // SetControlOpCode assigns PatternFlowPfcPauseControlOpCode provided by user to FlowPfcPause. + // PatternFlowPfcPauseControlOpCode is control operation code + SetControlOpCode(value PatternFlowPfcPauseControlOpCode) FlowPfcPause + // HasControlOpCode checks if ControlOpCode has been set in FlowPfcPause + HasControlOpCode() bool + // ClassEnableVector returns PatternFlowPfcPauseClassEnableVector, set in FlowPfcPause. + // PatternFlowPfcPauseClassEnableVector is destination + ClassEnableVector() PatternFlowPfcPauseClassEnableVector + // SetClassEnableVector assigns PatternFlowPfcPauseClassEnableVector provided by user to FlowPfcPause. + // PatternFlowPfcPauseClassEnableVector is destination + SetClassEnableVector(value PatternFlowPfcPauseClassEnableVector) FlowPfcPause + // HasClassEnableVector checks if ClassEnableVector has been set in FlowPfcPause + HasClassEnableVector() bool + // PauseClass0 returns PatternFlowPfcPausePauseClass0, set in FlowPfcPause. + // PatternFlowPfcPausePauseClass0 is pause class 0 + PauseClass0() PatternFlowPfcPausePauseClass0 + // SetPauseClass0 assigns PatternFlowPfcPausePauseClass0 provided by user to FlowPfcPause. + // PatternFlowPfcPausePauseClass0 is pause class 0 + SetPauseClass0(value PatternFlowPfcPausePauseClass0) FlowPfcPause + // HasPauseClass0 checks if PauseClass0 has been set in FlowPfcPause + HasPauseClass0() bool + // PauseClass1 returns PatternFlowPfcPausePauseClass1, set in FlowPfcPause. + // PatternFlowPfcPausePauseClass1 is pause class 1 + PauseClass1() PatternFlowPfcPausePauseClass1 + // SetPauseClass1 assigns PatternFlowPfcPausePauseClass1 provided by user to FlowPfcPause. + // PatternFlowPfcPausePauseClass1 is pause class 1 + SetPauseClass1(value PatternFlowPfcPausePauseClass1) FlowPfcPause + // HasPauseClass1 checks if PauseClass1 has been set in FlowPfcPause + HasPauseClass1() bool + // PauseClass2 returns PatternFlowPfcPausePauseClass2, set in FlowPfcPause. + // PatternFlowPfcPausePauseClass2 is pause class 2 + PauseClass2() PatternFlowPfcPausePauseClass2 + // SetPauseClass2 assigns PatternFlowPfcPausePauseClass2 provided by user to FlowPfcPause. + // PatternFlowPfcPausePauseClass2 is pause class 2 + SetPauseClass2(value PatternFlowPfcPausePauseClass2) FlowPfcPause + // HasPauseClass2 checks if PauseClass2 has been set in FlowPfcPause + HasPauseClass2() bool + // PauseClass3 returns PatternFlowPfcPausePauseClass3, set in FlowPfcPause. + // PatternFlowPfcPausePauseClass3 is pause class 3 + PauseClass3() PatternFlowPfcPausePauseClass3 + // SetPauseClass3 assigns PatternFlowPfcPausePauseClass3 provided by user to FlowPfcPause. + // PatternFlowPfcPausePauseClass3 is pause class 3 + SetPauseClass3(value PatternFlowPfcPausePauseClass3) FlowPfcPause + // HasPauseClass3 checks if PauseClass3 has been set in FlowPfcPause + HasPauseClass3() bool + // PauseClass4 returns PatternFlowPfcPausePauseClass4, set in FlowPfcPause. + // PatternFlowPfcPausePauseClass4 is pause class 4 + PauseClass4() PatternFlowPfcPausePauseClass4 + // SetPauseClass4 assigns PatternFlowPfcPausePauseClass4 provided by user to FlowPfcPause. + // PatternFlowPfcPausePauseClass4 is pause class 4 + SetPauseClass4(value PatternFlowPfcPausePauseClass4) FlowPfcPause + // HasPauseClass4 checks if PauseClass4 has been set in FlowPfcPause + HasPauseClass4() bool + // PauseClass5 returns PatternFlowPfcPausePauseClass5, set in FlowPfcPause. + // PatternFlowPfcPausePauseClass5 is pause class 5 + PauseClass5() PatternFlowPfcPausePauseClass5 + // SetPauseClass5 assigns PatternFlowPfcPausePauseClass5 provided by user to FlowPfcPause. + // PatternFlowPfcPausePauseClass5 is pause class 5 + SetPauseClass5(value PatternFlowPfcPausePauseClass5) FlowPfcPause + // HasPauseClass5 checks if PauseClass5 has been set in FlowPfcPause + HasPauseClass5() bool + // PauseClass6 returns PatternFlowPfcPausePauseClass6, set in FlowPfcPause. + // PatternFlowPfcPausePauseClass6 is pause class 6 + PauseClass6() PatternFlowPfcPausePauseClass6 + // SetPauseClass6 assigns PatternFlowPfcPausePauseClass6 provided by user to FlowPfcPause. + // PatternFlowPfcPausePauseClass6 is pause class 6 + SetPauseClass6(value PatternFlowPfcPausePauseClass6) FlowPfcPause + // HasPauseClass6 checks if PauseClass6 has been set in FlowPfcPause + HasPauseClass6() bool + // PauseClass7 returns PatternFlowPfcPausePauseClass7, set in FlowPfcPause. + // PatternFlowPfcPausePauseClass7 is pause class 7 + PauseClass7() PatternFlowPfcPausePauseClass7 + // SetPauseClass7 assigns PatternFlowPfcPausePauseClass7 provided by user to FlowPfcPause. + // PatternFlowPfcPausePauseClass7 is pause class 7 + SetPauseClass7(value PatternFlowPfcPausePauseClass7) FlowPfcPause + // HasPauseClass7 checks if PauseClass7 has been set in FlowPfcPause + HasPauseClass7() bool + setNil() +} + +// description is TBD +// Dst returns a PatternFlowPfcPauseDst +func (obj *flowPfcPause) Dst() PatternFlowPfcPauseDst { + if obj.obj.Dst == nil { + obj.obj.Dst = NewPatternFlowPfcPauseDst().msg() + } + if obj.dstHolder == nil { + obj.dstHolder = &patternFlowPfcPauseDst{obj: obj.obj.Dst} + } + return obj.dstHolder +} + +// description is TBD +// Dst returns a PatternFlowPfcPauseDst +func (obj *flowPfcPause) HasDst() bool { + return obj.obj.Dst != nil +} + +// description is TBD +// SetDst sets the PatternFlowPfcPauseDst value in the FlowPfcPause object +func (obj *flowPfcPause) SetDst(value PatternFlowPfcPauseDst) FlowPfcPause { + + obj.dstHolder = nil + obj.obj.Dst = value.msg() + + return obj +} + +// description is TBD +// Src returns a PatternFlowPfcPauseSrc +func (obj *flowPfcPause) Src() PatternFlowPfcPauseSrc { + if obj.obj.Src == nil { + obj.obj.Src = NewPatternFlowPfcPauseSrc().msg() + } + if obj.srcHolder == nil { + obj.srcHolder = &patternFlowPfcPauseSrc{obj: obj.obj.Src} + } + return obj.srcHolder +} + +// description is TBD +// Src returns a PatternFlowPfcPauseSrc +func (obj *flowPfcPause) HasSrc() bool { + return obj.obj.Src != nil +} + +// description is TBD +// SetSrc sets the PatternFlowPfcPauseSrc value in the FlowPfcPause object +func (obj *flowPfcPause) SetSrc(value PatternFlowPfcPauseSrc) FlowPfcPause { + + obj.srcHolder = nil + obj.obj.Src = value.msg() + + return obj +} + +// description is TBD +// EtherType returns a PatternFlowPfcPauseEtherType +func (obj *flowPfcPause) EtherType() PatternFlowPfcPauseEtherType { + if obj.obj.EtherType == nil { + obj.obj.EtherType = NewPatternFlowPfcPauseEtherType().msg() + } + if obj.etherTypeHolder == nil { + obj.etherTypeHolder = &patternFlowPfcPauseEtherType{obj: obj.obj.EtherType} + } + return obj.etherTypeHolder +} + +// description is TBD +// EtherType returns a PatternFlowPfcPauseEtherType +func (obj *flowPfcPause) HasEtherType() bool { + return obj.obj.EtherType != nil +} + +// description is TBD +// SetEtherType sets the PatternFlowPfcPauseEtherType value in the FlowPfcPause object +func (obj *flowPfcPause) SetEtherType(value PatternFlowPfcPauseEtherType) FlowPfcPause { + + obj.etherTypeHolder = nil + obj.obj.EtherType = value.msg() + + return obj +} + +// description is TBD +// ControlOpCode returns a PatternFlowPfcPauseControlOpCode +func (obj *flowPfcPause) ControlOpCode() PatternFlowPfcPauseControlOpCode { + if obj.obj.ControlOpCode == nil { + obj.obj.ControlOpCode = NewPatternFlowPfcPauseControlOpCode().msg() + } + if obj.controlOpCodeHolder == nil { + obj.controlOpCodeHolder = &patternFlowPfcPauseControlOpCode{obj: obj.obj.ControlOpCode} + } + return obj.controlOpCodeHolder +} + +// description is TBD +// ControlOpCode returns a PatternFlowPfcPauseControlOpCode +func (obj *flowPfcPause) HasControlOpCode() bool { + return obj.obj.ControlOpCode != nil +} + +// description is TBD +// SetControlOpCode sets the PatternFlowPfcPauseControlOpCode value in the FlowPfcPause object +func (obj *flowPfcPause) SetControlOpCode(value PatternFlowPfcPauseControlOpCode) FlowPfcPause { + + obj.controlOpCodeHolder = nil + obj.obj.ControlOpCode = value.msg() + + return obj +} + +// description is TBD +// ClassEnableVector returns a PatternFlowPfcPauseClassEnableVector +func (obj *flowPfcPause) ClassEnableVector() PatternFlowPfcPauseClassEnableVector { + if obj.obj.ClassEnableVector == nil { + obj.obj.ClassEnableVector = NewPatternFlowPfcPauseClassEnableVector().msg() + } + if obj.classEnableVectorHolder == nil { + obj.classEnableVectorHolder = &patternFlowPfcPauseClassEnableVector{obj: obj.obj.ClassEnableVector} + } + return obj.classEnableVectorHolder +} + +// description is TBD +// ClassEnableVector returns a PatternFlowPfcPauseClassEnableVector +func (obj *flowPfcPause) HasClassEnableVector() bool { + return obj.obj.ClassEnableVector != nil +} + +// description is TBD +// SetClassEnableVector sets the PatternFlowPfcPauseClassEnableVector value in the FlowPfcPause object +func (obj *flowPfcPause) SetClassEnableVector(value PatternFlowPfcPauseClassEnableVector) FlowPfcPause { + + obj.classEnableVectorHolder = nil + obj.obj.ClassEnableVector = value.msg() + + return obj +} + +// description is TBD +// PauseClass0 returns a PatternFlowPfcPausePauseClass0 +func (obj *flowPfcPause) PauseClass0() PatternFlowPfcPausePauseClass0 { + if obj.obj.PauseClass_0 == nil { + obj.obj.PauseClass_0 = NewPatternFlowPfcPausePauseClass0().msg() + } + if obj.pauseClass_0Holder == nil { + obj.pauseClass_0Holder = &patternFlowPfcPausePauseClass0{obj: obj.obj.PauseClass_0} + } + return obj.pauseClass_0Holder +} + +// description is TBD +// PauseClass0 returns a PatternFlowPfcPausePauseClass0 +func (obj *flowPfcPause) HasPauseClass0() bool { + return obj.obj.PauseClass_0 != nil +} + +// description is TBD +// SetPauseClass0 sets the PatternFlowPfcPausePauseClass0 value in the FlowPfcPause object +func (obj *flowPfcPause) SetPauseClass0(value PatternFlowPfcPausePauseClass0) FlowPfcPause { + + obj.pauseClass_0Holder = nil + obj.obj.PauseClass_0 = value.msg() + + return obj +} + +// description is TBD +// PauseClass1 returns a PatternFlowPfcPausePauseClass1 +func (obj *flowPfcPause) PauseClass1() PatternFlowPfcPausePauseClass1 { + if obj.obj.PauseClass_1 == nil { + obj.obj.PauseClass_1 = NewPatternFlowPfcPausePauseClass1().msg() + } + if obj.pauseClass_1Holder == nil { + obj.pauseClass_1Holder = &patternFlowPfcPausePauseClass1{obj: obj.obj.PauseClass_1} + } + return obj.pauseClass_1Holder +} + +// description is TBD +// PauseClass1 returns a PatternFlowPfcPausePauseClass1 +func (obj *flowPfcPause) HasPauseClass1() bool { + return obj.obj.PauseClass_1 != nil +} + +// description is TBD +// SetPauseClass1 sets the PatternFlowPfcPausePauseClass1 value in the FlowPfcPause object +func (obj *flowPfcPause) SetPauseClass1(value PatternFlowPfcPausePauseClass1) FlowPfcPause { + + obj.pauseClass_1Holder = nil + obj.obj.PauseClass_1 = value.msg() + + return obj +} + +// description is TBD +// PauseClass2 returns a PatternFlowPfcPausePauseClass2 +func (obj *flowPfcPause) PauseClass2() PatternFlowPfcPausePauseClass2 { + if obj.obj.PauseClass_2 == nil { + obj.obj.PauseClass_2 = NewPatternFlowPfcPausePauseClass2().msg() + } + if obj.pauseClass_2Holder == nil { + obj.pauseClass_2Holder = &patternFlowPfcPausePauseClass2{obj: obj.obj.PauseClass_2} + } + return obj.pauseClass_2Holder +} + +// description is TBD +// PauseClass2 returns a PatternFlowPfcPausePauseClass2 +func (obj *flowPfcPause) HasPauseClass2() bool { + return obj.obj.PauseClass_2 != nil +} + +// description is TBD +// SetPauseClass2 sets the PatternFlowPfcPausePauseClass2 value in the FlowPfcPause object +func (obj *flowPfcPause) SetPauseClass2(value PatternFlowPfcPausePauseClass2) FlowPfcPause { + + obj.pauseClass_2Holder = nil + obj.obj.PauseClass_2 = value.msg() + + return obj +} + +// description is TBD +// PauseClass3 returns a PatternFlowPfcPausePauseClass3 +func (obj *flowPfcPause) PauseClass3() PatternFlowPfcPausePauseClass3 { + if obj.obj.PauseClass_3 == nil { + obj.obj.PauseClass_3 = NewPatternFlowPfcPausePauseClass3().msg() + } + if obj.pauseClass_3Holder == nil { + obj.pauseClass_3Holder = &patternFlowPfcPausePauseClass3{obj: obj.obj.PauseClass_3} + } + return obj.pauseClass_3Holder +} + +// description is TBD +// PauseClass3 returns a PatternFlowPfcPausePauseClass3 +func (obj *flowPfcPause) HasPauseClass3() bool { + return obj.obj.PauseClass_3 != nil +} + +// description is TBD +// SetPauseClass3 sets the PatternFlowPfcPausePauseClass3 value in the FlowPfcPause object +func (obj *flowPfcPause) SetPauseClass3(value PatternFlowPfcPausePauseClass3) FlowPfcPause { + + obj.pauseClass_3Holder = nil + obj.obj.PauseClass_3 = value.msg() + + return obj +} + +// description is TBD +// PauseClass4 returns a PatternFlowPfcPausePauseClass4 +func (obj *flowPfcPause) PauseClass4() PatternFlowPfcPausePauseClass4 { + if obj.obj.PauseClass_4 == nil { + obj.obj.PauseClass_4 = NewPatternFlowPfcPausePauseClass4().msg() + } + if obj.pauseClass_4Holder == nil { + obj.pauseClass_4Holder = &patternFlowPfcPausePauseClass4{obj: obj.obj.PauseClass_4} + } + return obj.pauseClass_4Holder +} + +// description is TBD +// PauseClass4 returns a PatternFlowPfcPausePauseClass4 +func (obj *flowPfcPause) HasPauseClass4() bool { + return obj.obj.PauseClass_4 != nil +} + +// description is TBD +// SetPauseClass4 sets the PatternFlowPfcPausePauseClass4 value in the FlowPfcPause object +func (obj *flowPfcPause) SetPauseClass4(value PatternFlowPfcPausePauseClass4) FlowPfcPause { + + obj.pauseClass_4Holder = nil + obj.obj.PauseClass_4 = value.msg() + + return obj +} + +// description is TBD +// PauseClass5 returns a PatternFlowPfcPausePauseClass5 +func (obj *flowPfcPause) PauseClass5() PatternFlowPfcPausePauseClass5 { + if obj.obj.PauseClass_5 == nil { + obj.obj.PauseClass_5 = NewPatternFlowPfcPausePauseClass5().msg() + } + if obj.pauseClass_5Holder == nil { + obj.pauseClass_5Holder = &patternFlowPfcPausePauseClass5{obj: obj.obj.PauseClass_5} + } + return obj.pauseClass_5Holder +} + +// description is TBD +// PauseClass5 returns a PatternFlowPfcPausePauseClass5 +func (obj *flowPfcPause) HasPauseClass5() bool { + return obj.obj.PauseClass_5 != nil +} + +// description is TBD +// SetPauseClass5 sets the PatternFlowPfcPausePauseClass5 value in the FlowPfcPause object +func (obj *flowPfcPause) SetPauseClass5(value PatternFlowPfcPausePauseClass5) FlowPfcPause { + + obj.pauseClass_5Holder = nil + obj.obj.PauseClass_5 = value.msg() + + return obj +} + +// description is TBD +// PauseClass6 returns a PatternFlowPfcPausePauseClass6 +func (obj *flowPfcPause) PauseClass6() PatternFlowPfcPausePauseClass6 { + if obj.obj.PauseClass_6 == nil { + obj.obj.PauseClass_6 = NewPatternFlowPfcPausePauseClass6().msg() + } + if obj.pauseClass_6Holder == nil { + obj.pauseClass_6Holder = &patternFlowPfcPausePauseClass6{obj: obj.obj.PauseClass_6} + } + return obj.pauseClass_6Holder +} + +// description is TBD +// PauseClass6 returns a PatternFlowPfcPausePauseClass6 +func (obj *flowPfcPause) HasPauseClass6() bool { + return obj.obj.PauseClass_6 != nil +} + +// description is TBD +// SetPauseClass6 sets the PatternFlowPfcPausePauseClass6 value in the FlowPfcPause object +func (obj *flowPfcPause) SetPauseClass6(value PatternFlowPfcPausePauseClass6) FlowPfcPause { + + obj.pauseClass_6Holder = nil + obj.obj.PauseClass_6 = value.msg() + + return obj +} + +// description is TBD +// PauseClass7 returns a PatternFlowPfcPausePauseClass7 +func (obj *flowPfcPause) PauseClass7() PatternFlowPfcPausePauseClass7 { + if obj.obj.PauseClass_7 == nil { + obj.obj.PauseClass_7 = NewPatternFlowPfcPausePauseClass7().msg() + } + if obj.pauseClass_7Holder == nil { + obj.pauseClass_7Holder = &patternFlowPfcPausePauseClass7{obj: obj.obj.PauseClass_7} + } + return obj.pauseClass_7Holder +} + +// description is TBD +// PauseClass7 returns a PatternFlowPfcPausePauseClass7 +func (obj *flowPfcPause) HasPauseClass7() bool { + return obj.obj.PauseClass_7 != nil +} + +// description is TBD +// SetPauseClass7 sets the PatternFlowPfcPausePauseClass7 value in the FlowPfcPause object +func (obj *flowPfcPause) SetPauseClass7(value PatternFlowPfcPausePauseClass7) FlowPfcPause { + + obj.pauseClass_7Holder = nil + obj.obj.PauseClass_7 = value.msg() + + return obj +} + +func (obj *flowPfcPause) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Dst != nil { + + obj.Dst().validateObj(vObj, set_default) + } + + if obj.obj.Src != nil { + + obj.Src().validateObj(vObj, set_default) + } + + if obj.obj.EtherType != nil { + + obj.EtherType().validateObj(vObj, set_default) + } + + if obj.obj.ControlOpCode != nil { + + obj.ControlOpCode().validateObj(vObj, set_default) + } + + if obj.obj.ClassEnableVector != nil { + + obj.ClassEnableVector().validateObj(vObj, set_default) + } + + if obj.obj.PauseClass_0 != nil { + + obj.PauseClass0().validateObj(vObj, set_default) + } + + if obj.obj.PauseClass_1 != nil { + + obj.PauseClass1().validateObj(vObj, set_default) + } + + if obj.obj.PauseClass_2 != nil { + + obj.PauseClass2().validateObj(vObj, set_default) + } + + if obj.obj.PauseClass_3 != nil { + + obj.PauseClass3().validateObj(vObj, set_default) + } + + if obj.obj.PauseClass_4 != nil { + + obj.PauseClass4().validateObj(vObj, set_default) + } + + if obj.obj.PauseClass_5 != nil { + + obj.PauseClass5().validateObj(vObj, set_default) + } + + if obj.obj.PauseClass_6 != nil { + + obj.PauseClass6().validateObj(vObj, set_default) + } + + if obj.obj.PauseClass_7 != nil { + + obj.PauseClass7().validateObj(vObj, set_default) + } + +} + +func (obj *flowPfcPause) setDefault() { + +} diff --git a/gosnappi/flow_port.go b/gosnappi/flow_port.go new file mode 100644 index 00000000..0faf6317 --- /dev/null +++ b/gosnappi/flow_port.go @@ -0,0 +1,442 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowPort ***** +type flowPort struct { + validation + obj *otg.FlowPort + marshaller marshalFlowPort + unMarshaller unMarshalFlowPort +} + +func NewFlowPort() FlowPort { + obj := flowPort{obj: &otg.FlowPort{}} + obj.setDefault() + return &obj +} + +func (obj *flowPort) msg() *otg.FlowPort { + return obj.obj +} + +func (obj *flowPort) setMsg(msg *otg.FlowPort) FlowPort { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowPort struct { + obj *flowPort +} + +type marshalFlowPort interface { + // ToProto marshals FlowPort to protobuf object *otg.FlowPort + ToProto() (*otg.FlowPort, error) + // ToPbText marshals FlowPort to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowPort to YAML text + ToYaml() (string, error) + // ToJson marshals FlowPort to JSON text + ToJson() (string, error) +} + +type unMarshalflowPort struct { + obj *flowPort +} + +type unMarshalFlowPort interface { + // FromProto unmarshals FlowPort from protobuf object *otg.FlowPort + FromProto(msg *otg.FlowPort) (FlowPort, error) + // FromPbText unmarshals FlowPort from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowPort from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowPort from JSON text + FromJson(value string) error +} + +func (obj *flowPort) Marshal() marshalFlowPort { + if obj.marshaller == nil { + obj.marshaller = &marshalflowPort{obj: obj} + } + return obj.marshaller +} + +func (obj *flowPort) Unmarshal() unMarshalFlowPort { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowPort{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowPort) ToProto() (*otg.FlowPort, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowPort) FromProto(msg *otg.FlowPort) (FlowPort, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowPort) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowPort) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowPort) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowPort) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowPort) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowPort) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowPort) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowPort) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowPort) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowPort) Clone() (FlowPort, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowPort() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowPort is a container for a transmit port and 0..n intended receive ports. +// When assigning this container to a flow the flows's +// packet headers will not be populated with any address resolution +// information such as source and/or destination addresses. +// For example Flow.Ethernet dst mac address values will be defaulted to 0. +// For full control over the Flow.properties.packet header contents use this +// container. +type FlowPort interface { + Validation + // msg marshals FlowPort to protobuf object *otg.FlowPort + // and doesn't set defaults + msg() *otg.FlowPort + // setMsg unmarshals FlowPort from protobuf object *otg.FlowPort + // and doesn't set defaults + setMsg(*otg.FlowPort) FlowPort + // provides marshal interface + Marshal() marshalFlowPort + // provides unmarshal interface + Unmarshal() unMarshalFlowPort + // validate validates FlowPort + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowPort, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // TxName returns string, set in FlowPort. + TxName() string + // SetTxName assigns string provided by user to FlowPort + SetTxName(value string) FlowPort + // RxName returns string, set in FlowPort. + RxName() string + // SetRxName assigns string provided by user to FlowPort + SetRxName(value string) FlowPort + // HasRxName checks if RxName has been set in FlowPort + HasRxName() bool + // RxNames returns []string, set in FlowPort. + RxNames() []string + // SetRxNames assigns []string provided by user to FlowPort + SetRxNames(value []string) FlowPort +} + +// The unique name of a port that is the transmit port. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// - /components/schemas/Lag/properties/name +// +// TxName returns a string +func (obj *flowPort) TxName() string { + + return *obj.obj.TxName + +} + +// The unique name of a port that is the transmit port. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// - /components/schemas/Lag/properties/name +// +// SetTxName sets the string value in the FlowPort object +func (obj *flowPort) SetTxName(value string) FlowPort { + + obj.obj.TxName = &value + return obj +} + +// Deprecated: This property is deprecated in favor of property rx_names +// +// Deprecated: This property is deprecated in favor of property rx_names +// +// The unique name of a port that is the intended receive port. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// - /components/schemas/Lag/properties/name +// +// RxName returns a string +func (obj *flowPort) RxName() string { + + return *obj.obj.RxName + +} + +// Deprecated: This property is deprecated in favor of property rx_names +// +// Deprecated: This property is deprecated in favor of property rx_names +// +// The unique name of a port that is the intended receive port. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// - /components/schemas/Lag/properties/name +// +// RxName returns a string +func (obj *flowPort) HasRxName() bool { + return obj.obj.RxName != nil +} + +// Deprecated: This property is deprecated in favor of property rx_names +// +// Deprecated: This property is deprecated in favor of property rx_names +// +// The unique name of a port that is the intended receive port. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// - /components/schemas/Lag/properties/name +// +// SetRxName sets the string value in the FlowPort object +func (obj *flowPort) SetRxName(value string) FlowPort { + + obj.obj.RxName = &value + return obj +} + +// Unique name of ports or lags that are intended receive endpoints. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// - /components/schemas/Lag/properties/name +// +// RxNames returns a []string +func (obj *flowPort) RxNames() []string { + if obj.obj.RxNames == nil { + obj.obj.RxNames = make([]string, 0) + } + return obj.obj.RxNames +} + +// Unique name of ports or lags that are intended receive endpoints. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// - /components/schemas/Lag/properties/name +// +// SetRxNames sets the []string value in the FlowPort object +func (obj *flowPort) SetRxNames(value []string) FlowPort { + + if obj.obj.RxNames == nil { + obj.obj.RxNames = make([]string, 0) + } + obj.obj.RxNames = value + + return obj +} + +func (obj *flowPort) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // TxName is required + if obj.obj.TxName == nil { + vObj.validationErrors = append(vObj.validationErrors, "TxName is required field on interface FlowPort") + } + + // RxName is deprecated + if obj.obj.RxName != nil { + obj.addWarnings("RxName property in schema FlowPort is deprecated, This property is deprecated in favor of property rx_names") + } + +} + +func (obj *flowPort) setDefault() { + +} diff --git a/gosnappi/flow_ppp.go b/gosnappi/flow_ppp.go new file mode 100644 index 00000000..c3b7b4a7 --- /dev/null +++ b/gosnappi/flow_ppp.go @@ -0,0 +1,414 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowPpp ***** +type flowPpp struct { + validation + obj *otg.FlowPpp + marshaller marshalFlowPpp + unMarshaller unMarshalFlowPpp + addressHolder PatternFlowPppAddress + controlHolder PatternFlowPppControl + protocolTypeHolder PatternFlowPppProtocolType +} + +func NewFlowPpp() FlowPpp { + obj := flowPpp{obj: &otg.FlowPpp{}} + obj.setDefault() + return &obj +} + +func (obj *flowPpp) msg() *otg.FlowPpp { + return obj.obj +} + +func (obj *flowPpp) setMsg(msg *otg.FlowPpp) FlowPpp { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowPpp struct { + obj *flowPpp +} + +type marshalFlowPpp interface { + // ToProto marshals FlowPpp to protobuf object *otg.FlowPpp + ToProto() (*otg.FlowPpp, error) + // ToPbText marshals FlowPpp to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowPpp to YAML text + ToYaml() (string, error) + // ToJson marshals FlowPpp to JSON text + ToJson() (string, error) +} + +type unMarshalflowPpp struct { + obj *flowPpp +} + +type unMarshalFlowPpp interface { + // FromProto unmarshals FlowPpp from protobuf object *otg.FlowPpp + FromProto(msg *otg.FlowPpp) (FlowPpp, error) + // FromPbText unmarshals FlowPpp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowPpp from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowPpp from JSON text + FromJson(value string) error +} + +func (obj *flowPpp) Marshal() marshalFlowPpp { + if obj.marshaller == nil { + obj.marshaller = &marshalflowPpp{obj: obj} + } + return obj.marshaller +} + +func (obj *flowPpp) Unmarshal() unMarshalFlowPpp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowPpp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowPpp) ToProto() (*otg.FlowPpp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowPpp) FromProto(msg *otg.FlowPpp) (FlowPpp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowPpp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowPpp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowPpp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowPpp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowPpp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowPpp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowPpp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowPpp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowPpp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowPpp) Clone() (FlowPpp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowPpp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowPpp) setNil() { + obj.addressHolder = nil + obj.controlHolder = nil + obj.protocolTypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowPpp is pPP packet header +type FlowPpp interface { + Validation + // msg marshals FlowPpp to protobuf object *otg.FlowPpp + // and doesn't set defaults + msg() *otg.FlowPpp + // setMsg unmarshals FlowPpp from protobuf object *otg.FlowPpp + // and doesn't set defaults + setMsg(*otg.FlowPpp) FlowPpp + // provides marshal interface + Marshal() marshalFlowPpp + // provides unmarshal interface + Unmarshal() unMarshalFlowPpp + // validate validates FlowPpp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowPpp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Address returns PatternFlowPppAddress, set in FlowPpp. + // PatternFlowPppAddress is pPP address + Address() PatternFlowPppAddress + // SetAddress assigns PatternFlowPppAddress provided by user to FlowPpp. + // PatternFlowPppAddress is pPP address + SetAddress(value PatternFlowPppAddress) FlowPpp + // HasAddress checks if Address has been set in FlowPpp + HasAddress() bool + // Control returns PatternFlowPppControl, set in FlowPpp. + // PatternFlowPppControl is pPP control + Control() PatternFlowPppControl + // SetControl assigns PatternFlowPppControl provided by user to FlowPpp. + // PatternFlowPppControl is pPP control + SetControl(value PatternFlowPppControl) FlowPpp + // HasControl checks if Control has been set in FlowPpp + HasControl() bool + // ProtocolType returns PatternFlowPppProtocolType, set in FlowPpp. + // PatternFlowPppProtocolType is pPP protocol type + ProtocolType() PatternFlowPppProtocolType + // SetProtocolType assigns PatternFlowPppProtocolType provided by user to FlowPpp. + // PatternFlowPppProtocolType is pPP protocol type + SetProtocolType(value PatternFlowPppProtocolType) FlowPpp + // HasProtocolType checks if ProtocolType has been set in FlowPpp + HasProtocolType() bool + setNil() +} + +// description is TBD +// Address returns a PatternFlowPppAddress +func (obj *flowPpp) Address() PatternFlowPppAddress { + if obj.obj.Address == nil { + obj.obj.Address = NewPatternFlowPppAddress().msg() + } + if obj.addressHolder == nil { + obj.addressHolder = &patternFlowPppAddress{obj: obj.obj.Address} + } + return obj.addressHolder +} + +// description is TBD +// Address returns a PatternFlowPppAddress +func (obj *flowPpp) HasAddress() bool { + return obj.obj.Address != nil +} + +// description is TBD +// SetAddress sets the PatternFlowPppAddress value in the FlowPpp object +func (obj *flowPpp) SetAddress(value PatternFlowPppAddress) FlowPpp { + + obj.addressHolder = nil + obj.obj.Address = value.msg() + + return obj +} + +// description is TBD +// Control returns a PatternFlowPppControl +func (obj *flowPpp) Control() PatternFlowPppControl { + if obj.obj.Control == nil { + obj.obj.Control = NewPatternFlowPppControl().msg() + } + if obj.controlHolder == nil { + obj.controlHolder = &patternFlowPppControl{obj: obj.obj.Control} + } + return obj.controlHolder +} + +// description is TBD +// Control returns a PatternFlowPppControl +func (obj *flowPpp) HasControl() bool { + return obj.obj.Control != nil +} + +// description is TBD +// SetControl sets the PatternFlowPppControl value in the FlowPpp object +func (obj *flowPpp) SetControl(value PatternFlowPppControl) FlowPpp { + + obj.controlHolder = nil + obj.obj.Control = value.msg() + + return obj +} + +// description is TBD +// ProtocolType returns a PatternFlowPppProtocolType +func (obj *flowPpp) ProtocolType() PatternFlowPppProtocolType { + if obj.obj.ProtocolType == nil { + obj.obj.ProtocolType = NewPatternFlowPppProtocolType().msg() + } + if obj.protocolTypeHolder == nil { + obj.protocolTypeHolder = &patternFlowPppProtocolType{obj: obj.obj.ProtocolType} + } + return obj.protocolTypeHolder +} + +// description is TBD +// ProtocolType returns a PatternFlowPppProtocolType +func (obj *flowPpp) HasProtocolType() bool { + return obj.obj.ProtocolType != nil +} + +// description is TBD +// SetProtocolType sets the PatternFlowPppProtocolType value in the FlowPpp object +func (obj *flowPpp) SetProtocolType(value PatternFlowPppProtocolType) FlowPpp { + + obj.protocolTypeHolder = nil + obj.obj.ProtocolType = value.msg() + + return obj +} + +func (obj *flowPpp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Address != nil { + + obj.Address().validateObj(vObj, set_default) + } + + if obj.obj.Control != nil { + + obj.Control().validateObj(vObj, set_default) + } + + if obj.obj.ProtocolType != nil { + + obj.ProtocolType().validateObj(vObj, set_default) + } + +} + +func (obj *flowPpp) setDefault() { + +} diff --git a/gosnappi/flow_predefined_tags.go b/gosnappi/flow_predefined_tags.go new file mode 100644 index 00000000..393ff8b5 --- /dev/null +++ b/gosnappi/flow_predefined_tags.go @@ -0,0 +1,312 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowPredefinedTags ***** +type flowPredefinedTags struct { + validation + obj *otg.FlowPredefinedTags + marshaller marshalFlowPredefinedTags + unMarshaller unMarshalFlowPredefinedTags +} + +func NewFlowPredefinedTags() FlowPredefinedTags { + obj := flowPredefinedTags{obj: &otg.FlowPredefinedTags{}} + obj.setDefault() + return &obj +} + +func (obj *flowPredefinedTags) msg() *otg.FlowPredefinedTags { + return obj.obj +} + +func (obj *flowPredefinedTags) setMsg(msg *otg.FlowPredefinedTags) FlowPredefinedTags { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowPredefinedTags struct { + obj *flowPredefinedTags +} + +type marshalFlowPredefinedTags interface { + // ToProto marshals FlowPredefinedTags to protobuf object *otg.FlowPredefinedTags + ToProto() (*otg.FlowPredefinedTags, error) + // ToPbText marshals FlowPredefinedTags to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowPredefinedTags to YAML text + ToYaml() (string, error) + // ToJson marshals FlowPredefinedTags to JSON text + ToJson() (string, error) +} + +type unMarshalflowPredefinedTags struct { + obj *flowPredefinedTags +} + +type unMarshalFlowPredefinedTags interface { + // FromProto unmarshals FlowPredefinedTags from protobuf object *otg.FlowPredefinedTags + FromProto(msg *otg.FlowPredefinedTags) (FlowPredefinedTags, error) + // FromPbText unmarshals FlowPredefinedTags from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowPredefinedTags from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowPredefinedTags from JSON text + FromJson(value string) error +} + +func (obj *flowPredefinedTags) Marshal() marshalFlowPredefinedTags { + if obj.marshaller == nil { + obj.marshaller = &marshalflowPredefinedTags{obj: obj} + } + return obj.marshaller +} + +func (obj *flowPredefinedTags) Unmarshal() unMarshalFlowPredefinedTags { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowPredefinedTags{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowPredefinedTags) ToProto() (*otg.FlowPredefinedTags, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowPredefinedTags) FromProto(msg *otg.FlowPredefinedTags) (FlowPredefinedTags, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowPredefinedTags) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowPredefinedTags) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowPredefinedTags) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowPredefinedTags) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowPredefinedTags) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowPredefinedTags) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowPredefinedTags) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowPredefinedTags) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowPredefinedTags) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowPredefinedTags) Clone() (FlowPredefinedTags, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowPredefinedTags() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowPredefinedTags is list of predefined flow tracking options, outside packet fields, that can be enabled. +type FlowPredefinedTags interface { + Validation + // msg marshals FlowPredefinedTags to protobuf object *otg.FlowPredefinedTags + // and doesn't set defaults + msg() *otg.FlowPredefinedTags + // setMsg unmarshals FlowPredefinedTags from protobuf object *otg.FlowPredefinedTags + // and doesn't set defaults + setMsg(*otg.FlowPredefinedTags) FlowPredefinedTags + // provides marshal interface + Marshal() marshalFlowPredefinedTags + // provides unmarshal interface + Unmarshal() unMarshalFlowPredefinedTags + // validate validates FlowPredefinedTags + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowPredefinedTags, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RxName returns bool, set in FlowPredefinedTags. + RxName() bool + // SetRxName assigns bool provided by user to FlowPredefinedTags + SetRxName(value bool) FlowPredefinedTags + // HasRxName checks if RxName has been set in FlowPredefinedTags + HasRxName() bool +} + +// Enables Rx port or lag level disaggregation with predefined metrics tag name set as "rx_name". +// The Rx port / lag names can be found under tagged_metrics tag names in flow metrics response. +// RxName returns a bool +func (obj *flowPredefinedTags) RxName() bool { + + return *obj.obj.RxName + +} + +// Enables Rx port or lag level disaggregation with predefined metrics tag name set as "rx_name". +// The Rx port / lag names can be found under tagged_metrics tag names in flow metrics response. +// RxName returns a bool +func (obj *flowPredefinedTags) HasRxName() bool { + return obj.obj.RxName != nil +} + +// Enables Rx port or lag level disaggregation with predefined metrics tag name set as "rx_name". +// The Rx port / lag names can be found under tagged_metrics tag names in flow metrics response. +// SetRxName sets the bool value in the FlowPredefinedTags object +func (obj *flowPredefinedTags) SetRxName(value bool) FlowPredefinedTags { + + obj.obj.RxName = &value + return obj +} + +func (obj *flowPredefinedTags) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *flowPredefinedTags) setDefault() { + if obj.obj.RxName == nil { + obj.SetRxName(false) + } + +} diff --git a/gosnappi/flow_rate.go b/gosnappi/flow_rate.go new file mode 100644 index 00000000..959e02eb --- /dev/null +++ b/gosnappi/flow_rate.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRate ***** +type flowRate struct { + validation + obj *otg.FlowRate + marshaller marshalFlowRate + unMarshaller unMarshalFlowRate +} + +func NewFlowRate() FlowRate { + obj := flowRate{obj: &otg.FlowRate{}} + obj.setDefault() + return &obj +} + +func (obj *flowRate) msg() *otg.FlowRate { + return obj.obj +} + +func (obj *flowRate) setMsg(msg *otg.FlowRate) FlowRate { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRate struct { + obj *flowRate +} + +type marshalFlowRate interface { + // ToProto marshals FlowRate to protobuf object *otg.FlowRate + ToProto() (*otg.FlowRate, error) + // ToPbText marshals FlowRate to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRate to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRate to JSON text + ToJson() (string, error) +} + +type unMarshalflowRate struct { + obj *flowRate +} + +type unMarshalFlowRate interface { + // FromProto unmarshals FlowRate from protobuf object *otg.FlowRate + FromProto(msg *otg.FlowRate) (FlowRate, error) + // FromPbText unmarshals FlowRate from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRate from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRate from JSON text + FromJson(value string) error +} + +func (obj *flowRate) Marshal() marshalFlowRate { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRate{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRate) Unmarshal() unMarshalFlowRate { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRate{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRate) ToProto() (*otg.FlowRate, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRate) FromProto(msg *otg.FlowRate) (FlowRate, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRate) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRate) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRate) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRate) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRate) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRate) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRate) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRate) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRate) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRate) Clone() (FlowRate, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRate() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowRate is the rate of packet transmission +type FlowRate interface { + Validation + // msg marshals FlowRate to protobuf object *otg.FlowRate + // and doesn't set defaults + msg() *otg.FlowRate + // setMsg unmarshals FlowRate from protobuf object *otg.FlowRate + // and doesn't set defaults + setMsg(*otg.FlowRate) FlowRate + // provides marshal interface + Marshal() marshalFlowRate + // provides unmarshal interface + Unmarshal() unMarshalFlowRate + // validate validates FlowRate + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRate, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRateChoiceEnum, set in FlowRate + Choice() FlowRateChoiceEnum + // setChoice assigns FlowRateChoiceEnum provided by user to FlowRate + setChoice(value FlowRateChoiceEnum) FlowRate + // HasChoice checks if Choice has been set in FlowRate + HasChoice() bool + // Pps returns uint64, set in FlowRate. + Pps() uint64 + // SetPps assigns uint64 provided by user to FlowRate + SetPps(value uint64) FlowRate + // HasPps checks if Pps has been set in FlowRate + HasPps() bool + // Bps returns uint64, set in FlowRate. + Bps() uint64 + // SetBps assigns uint64 provided by user to FlowRate + SetBps(value uint64) FlowRate + // HasBps checks if Bps has been set in FlowRate + HasBps() bool + // Kbps returns uint64, set in FlowRate. + Kbps() uint64 + // SetKbps assigns uint64 provided by user to FlowRate + SetKbps(value uint64) FlowRate + // HasKbps checks if Kbps has been set in FlowRate + HasKbps() bool + // Mbps returns uint64, set in FlowRate. + Mbps() uint64 + // SetMbps assigns uint64 provided by user to FlowRate + SetMbps(value uint64) FlowRate + // HasMbps checks if Mbps has been set in FlowRate + HasMbps() bool + // Gbps returns uint32, set in FlowRate. + Gbps() uint32 + // SetGbps assigns uint32 provided by user to FlowRate + SetGbps(value uint32) FlowRate + // HasGbps checks if Gbps has been set in FlowRate + HasGbps() bool + // Percentage returns float32, set in FlowRate. + Percentage() float32 + // SetPercentage assigns float32 provided by user to FlowRate + SetPercentage(value float32) FlowRate + // HasPercentage checks if Percentage has been set in FlowRate + HasPercentage() bool +} + +type FlowRateChoiceEnum string + +// Enum of Choice on FlowRate +var FlowRateChoice = struct { + PPS FlowRateChoiceEnum + BPS FlowRateChoiceEnum + KBPS FlowRateChoiceEnum + MBPS FlowRateChoiceEnum + GBPS FlowRateChoiceEnum + PERCENTAGE FlowRateChoiceEnum +}{ + PPS: FlowRateChoiceEnum("pps"), + BPS: FlowRateChoiceEnum("bps"), + KBPS: FlowRateChoiceEnum("kbps"), + MBPS: FlowRateChoiceEnum("mbps"), + GBPS: FlowRateChoiceEnum("gbps"), + PERCENTAGE: FlowRateChoiceEnum("percentage"), +} + +func (obj *flowRate) Choice() FlowRateChoiceEnum { + return FlowRateChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The available types of flow rate. +// Choice returns a string +func (obj *flowRate) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRate) setChoice(value FlowRateChoiceEnum) FlowRate { + intValue, ok := otg.FlowRate_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRateChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRate_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Percentage = nil + obj.obj.Gbps = nil + obj.obj.Mbps = nil + obj.obj.Kbps = nil + obj.obj.Bps = nil + obj.obj.Pps = nil + + if value == FlowRateChoice.PPS { + defaultValue := uint64(1000) + obj.obj.Pps = &defaultValue + } + + if value == FlowRateChoice.BPS { + defaultValue := uint64(1000000000) + obj.obj.Bps = &defaultValue + } + + if value == FlowRateChoice.KBPS { + defaultValue := uint64(1000000) + obj.obj.Kbps = &defaultValue + } + + if value == FlowRateChoice.MBPS { + defaultValue := uint64(1000) + obj.obj.Mbps = &defaultValue + } + + if value == FlowRateChoice.GBPS { + defaultValue := uint32(1) + obj.obj.Gbps = &defaultValue + } + + if value == FlowRateChoice.PERCENTAGE { + defaultValue := float32(100) + obj.obj.Percentage = &defaultValue + } + + return obj +} + +// Packets per second. +// Pps returns a uint64 +func (obj *flowRate) Pps() uint64 { + + if obj.obj.Pps == nil { + obj.setChoice(FlowRateChoice.PPS) + } + + return *obj.obj.Pps + +} + +// Packets per second. +// Pps returns a uint64 +func (obj *flowRate) HasPps() bool { + return obj.obj.Pps != nil +} + +// Packets per second. +// SetPps sets the uint64 value in the FlowRate object +func (obj *flowRate) SetPps(value uint64) FlowRate { + obj.setChoice(FlowRateChoice.PPS) + obj.obj.Pps = &value + return obj +} + +// Bits per second. +// Bps returns a uint64 +func (obj *flowRate) Bps() uint64 { + + if obj.obj.Bps == nil { + obj.setChoice(FlowRateChoice.BPS) + } + + return *obj.obj.Bps + +} + +// Bits per second. +// Bps returns a uint64 +func (obj *flowRate) HasBps() bool { + return obj.obj.Bps != nil +} + +// Bits per second. +// SetBps sets the uint64 value in the FlowRate object +func (obj *flowRate) SetBps(value uint64) FlowRate { + obj.setChoice(FlowRateChoice.BPS) + obj.obj.Bps = &value + return obj +} + +// Kilobits per second. +// Kbps returns a uint64 +func (obj *flowRate) Kbps() uint64 { + + if obj.obj.Kbps == nil { + obj.setChoice(FlowRateChoice.KBPS) + } + + return *obj.obj.Kbps + +} + +// Kilobits per second. +// Kbps returns a uint64 +func (obj *flowRate) HasKbps() bool { + return obj.obj.Kbps != nil +} + +// Kilobits per second. +// SetKbps sets the uint64 value in the FlowRate object +func (obj *flowRate) SetKbps(value uint64) FlowRate { + obj.setChoice(FlowRateChoice.KBPS) + obj.obj.Kbps = &value + return obj +} + +// Megabits per second. +// Mbps returns a uint64 +func (obj *flowRate) Mbps() uint64 { + + if obj.obj.Mbps == nil { + obj.setChoice(FlowRateChoice.MBPS) + } + + return *obj.obj.Mbps + +} + +// Megabits per second. +// Mbps returns a uint64 +func (obj *flowRate) HasMbps() bool { + return obj.obj.Mbps != nil +} + +// Megabits per second. +// SetMbps sets the uint64 value in the FlowRate object +func (obj *flowRate) SetMbps(value uint64) FlowRate { + obj.setChoice(FlowRateChoice.MBPS) + obj.obj.Mbps = &value + return obj +} + +// Gigabits per second. +// Gbps returns a uint32 +func (obj *flowRate) Gbps() uint32 { + + if obj.obj.Gbps == nil { + obj.setChoice(FlowRateChoice.GBPS) + } + + return *obj.obj.Gbps + +} + +// Gigabits per second. +// Gbps returns a uint32 +func (obj *flowRate) HasGbps() bool { + return obj.obj.Gbps != nil +} + +// Gigabits per second. +// SetGbps sets the uint32 value in the FlowRate object +func (obj *flowRate) SetGbps(value uint32) FlowRate { + obj.setChoice(FlowRateChoice.GBPS) + obj.obj.Gbps = &value + return obj +} + +// The percentage of a port location's available bandwidth. +// Percentage returns a float32 +func (obj *flowRate) Percentage() float32 { + + if obj.obj.Percentage == nil { + obj.setChoice(FlowRateChoice.PERCENTAGE) + } + + return *obj.obj.Percentage + +} + +// The percentage of a port location's available bandwidth. +// Percentage returns a float32 +func (obj *flowRate) HasPercentage() bool { + return obj.obj.Percentage != nil +} + +// The percentage of a port location's available bandwidth. +// SetPercentage sets the float32 value in the FlowRate object +func (obj *flowRate) SetPercentage(value float32) FlowRate { + obj.setChoice(FlowRateChoice.PERCENTAGE) + obj.obj.Percentage = &value + return obj +} + +func (obj *flowRate) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Pps != nil { + + if *obj.obj.Pps < 1 || *obj.obj.Pps > 18446744073709551615 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= FlowRate.Pps <= 18446744073709551615 but Got %d", *obj.obj.Pps)) + } + + } + + if obj.obj.Bps != nil { + + if *obj.obj.Bps < 672 || *obj.obj.Bps > 18446744073709551615 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("672 <= FlowRate.Bps <= 18446744073709551615 but Got %d", *obj.obj.Bps)) + } + + } + + if obj.obj.Kbps != nil { + + if *obj.obj.Kbps < 1 || *obj.obj.Kbps > 18446744073709551615 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= FlowRate.Kbps <= 18446744073709551615 but Got %d", *obj.obj.Kbps)) + } + + } + + if obj.obj.Mbps != nil { + + if *obj.obj.Mbps < 1 || *obj.obj.Mbps > 18446744073709551615 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= FlowRate.Mbps <= 18446744073709551615 but Got %d", *obj.obj.Mbps)) + } + + } + + if obj.obj.Gbps != nil { + + if *obj.obj.Gbps < 1 || *obj.obj.Gbps > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= FlowRate.Gbps <= 4294967295 but Got %d", *obj.obj.Gbps)) + } + + } + + if obj.obj.Percentage != nil { + + if *obj.obj.Percentage < 0 || *obj.obj.Percentage > 100 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowRate.Percentage <= 100 but Got %f", *obj.obj.Percentage)) + } + + } + +} + +func (obj *flowRate) setDefault() { + var choices_set int = 0 + var choice FlowRateChoiceEnum + + if obj.obj.Pps != nil { + choices_set += 1 + choice = FlowRateChoice.PPS + } + + if obj.obj.Bps != nil { + choices_set += 1 + choice = FlowRateChoice.BPS + } + + if obj.obj.Kbps != nil { + choices_set += 1 + choice = FlowRateChoice.KBPS + } + + if obj.obj.Mbps != nil { + choices_set += 1 + choice = FlowRateChoice.MBPS + } + + if obj.obj.Gbps != nil { + choices_set += 1 + choice = FlowRateChoice.GBPS + } + + if obj.obj.Percentage != nil { + choices_set += 1 + choice = FlowRateChoice.PERCENTAGE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRateChoice.PPS) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRate") + } + } else { + intVal := otg.FlowRate_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRate_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_router.go b/gosnappi/flow_router.go new file mode 100644 index 00000000..a41160b6 --- /dev/null +++ b/gosnappi/flow_router.go @@ -0,0 +1,514 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRouter ***** +type flowRouter struct { + validation + obj *otg.FlowRouter + marshaller marshalFlowRouter + unMarshaller unMarshalFlowRouter +} + +func NewFlowRouter() FlowRouter { + obj := flowRouter{obj: &otg.FlowRouter{}} + obj.setDefault() + return &obj +} + +func (obj *flowRouter) msg() *otg.FlowRouter { + return obj.obj +} + +func (obj *flowRouter) setMsg(msg *otg.FlowRouter) FlowRouter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRouter struct { + obj *flowRouter +} + +type marshalFlowRouter interface { + // ToProto marshals FlowRouter to protobuf object *otg.FlowRouter + ToProto() (*otg.FlowRouter, error) + // ToPbText marshals FlowRouter to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRouter to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRouter to JSON text + ToJson() (string, error) +} + +type unMarshalflowRouter struct { + obj *flowRouter +} + +type unMarshalFlowRouter interface { + // FromProto unmarshals FlowRouter from protobuf object *otg.FlowRouter + FromProto(msg *otg.FlowRouter) (FlowRouter, error) + // FromPbText unmarshals FlowRouter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRouter from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRouter from JSON text + FromJson(value string) error +} + +func (obj *flowRouter) Marshal() marshalFlowRouter { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRouter{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRouter) Unmarshal() unMarshalFlowRouter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRouter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRouter) ToProto() (*otg.FlowRouter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRouter) FromProto(msg *otg.FlowRouter) (FlowRouter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRouter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRouter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRouter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRouter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRouter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRouter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRouter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRouter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRouter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRouter) Clone() (FlowRouter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRouter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowRouter is a container for declaring a map of 1..n transmit devices to 1..n receive devices. This allows for a single flow to have different tx to rx device flows such as a single one to one map or a many to many map. +type FlowRouter interface { + Validation + // msg marshals FlowRouter to protobuf object *otg.FlowRouter + // and doesn't set defaults + msg() *otg.FlowRouter + // setMsg unmarshals FlowRouter from protobuf object *otg.FlowRouter + // and doesn't set defaults + setMsg(*otg.FlowRouter) FlowRouter + // provides marshal interface + Marshal() marshalFlowRouter + // provides unmarshal interface + Unmarshal() unMarshalFlowRouter + // validate validates FlowRouter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRouter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Mode returns FlowRouterModeEnum, set in FlowRouter + Mode() FlowRouterModeEnum + // SetMode assigns FlowRouterModeEnum provided by user to FlowRouter + SetMode(value FlowRouterModeEnum) FlowRouter + // HasMode checks if Mode has been set in FlowRouter + HasMode() bool + // TxNames returns []string, set in FlowRouter. + TxNames() []string + // SetTxNames assigns []string provided by user to FlowRouter + SetTxNames(value []string) FlowRouter + // RxNames returns []string, set in FlowRouter. + RxNames() []string + // SetRxNames assigns []string provided by user to FlowRouter + SetRxNames(value []string) FlowRouter +} + +type FlowRouterModeEnum string + +// Enum of Mode on FlowRouter +var FlowRouterMode = struct { + MESH FlowRouterModeEnum + ONE_TO_ONE FlowRouterModeEnum +}{ + MESH: FlowRouterModeEnum("mesh"), + ONE_TO_ONE: FlowRouterModeEnum("one_to_one"), +} + +func (obj *flowRouter) Mode() FlowRouterModeEnum { + return FlowRouterModeEnum(obj.obj.Mode.Enum().String()) +} + +// Determines the intent of creating traffic sub-flow(s) between the device +// endpoints, from the entities of tx_names to the entities of rx_names +// to derive how auto packet fields can be populated with +// the actual value(s) by the implementation. +// +// The one_to_one mode creates traffic sub-flow(s) between each device endpoint pair in +// tx_names to rx_names by index. +// The length of tx_names and rx_names MUST be the same. +// The same device name can be repeated multiple times in tx_names or rx_names, in any order to create desired meshing between device(s). +// For 2 values in tx_names and 2 values in rx_names, 2 device endpoint pairs would be generated (each pair representing a traffic sub-flow). +// +// The mesh mode creates traffic sub-flow(s) between each value in tx_names to +// every value in rx_names, forming the device endpoint pair(s). +// For 2 values in tx_names and 3 values in rx_names, generated device endpoint pairs would be 2x3=6. +// +// A generated device endpoint pair with same device endpoint name for both transmit & receive device endpoint MUST raise an error. +// +// Packet fields of type auto would be populated with one value for each device endpoint pair (representing the traffic sub-flow). +// The value would be determined considering transmit & receive device of the sub-flow. And the sequence of the populated value(s) +// would be in the order of generated device endpoint pair(s). +// If 2 device endpoint pairs are generated (based on mode, tx_names and rx_names), say (d1 to d3) and (d2 to d3), and ethernet.dst is set as auto, then +// the auto field would be replaced by the implementation with a sequence of 2 values, [v1,v2] where +// v1 is determined using context (d1,d3) and v2 using context (d2,d3). +// The final outcome is that packets generated on the wire will contain the values v1,v2,v1,... for ethernet.dst field. Any non-auto packet fields +// should be configured accordingly. For example, non-auto packet field ethernet.src can be configured with values [u1, u2], where +// u1 & u2 are source MAC of the connected interface of device d1 and d2 respectively. Then packets on the wire will contain correct value pairs +// (u1,v1),(u2,v2),(u1,v1),... for (ethernet.src,ethernet.dst) fields. +// Mode returns a string +func (obj *flowRouter) HasMode() bool { + return obj.obj.Mode != nil +} + +func (obj *flowRouter) SetMode(value FlowRouterModeEnum) FlowRouter { + intValue, ok := otg.FlowRouter_Mode_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRouterModeEnum", string(value))) + return obj + } + enumValue := otg.FlowRouter_Mode_Enum(intValue) + obj.obj.Mode = &enumValue + + return obj +} + +// TBD +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Bgp.V4RouteRange/properties/name +// - /components/schemas/Bgp.V6RouteRange/properties/name +// - /components/schemas/Bgp.CMacIpRange/properties/name +// - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name +// - /components/schemas/Isis.V4RouteRange/properties/name +// - /components/schemas/Isis.V6RouteRange/properties/name +// - /components/schemas/Ospfv2.V4RouteRange/properties/name +// - /components/schemas/Device.Dhcpv4client/properties/name +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Bgp.V4RouteRange/properties/name +// - /components/schemas/Bgp.V6RouteRange/properties/name +// - /components/schemas/Bgp.CMacIpRange/properties/name +// - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name +// - /components/schemas/Isis.V4RouteRange/properties/name +// - /components/schemas/Isis.V6RouteRange/properties/name +// - /components/schemas/Ospfv2.V4RouteRange/properties/name +// - /components/schemas/Device.Dhcpv4client/properties/name +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// TxNames returns a []string +func (obj *flowRouter) TxNames() []string { + if obj.obj.TxNames == nil { + obj.obj.TxNames = make([]string, 0) + } + return obj.obj.TxNames +} + +// TBD +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Bgp.V4RouteRange/properties/name +// - /components/schemas/Bgp.V6RouteRange/properties/name +// - /components/schemas/Bgp.CMacIpRange/properties/name +// - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name +// - /components/schemas/Isis.V4RouteRange/properties/name +// - /components/schemas/Isis.V6RouteRange/properties/name +// - /components/schemas/Ospfv2.V4RouteRange/properties/name +// - /components/schemas/Device.Dhcpv4client/properties/name +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Bgp.V4RouteRange/properties/name +// - /components/schemas/Bgp.V6RouteRange/properties/name +// - /components/schemas/Bgp.CMacIpRange/properties/name +// - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name +// - /components/schemas/Isis.V4RouteRange/properties/name +// - /components/schemas/Isis.V6RouteRange/properties/name +// - /components/schemas/Ospfv2.V4RouteRange/properties/name +// - /components/schemas/Device.Dhcpv4client/properties/name +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// SetTxNames sets the []string value in the FlowRouter object +func (obj *flowRouter) SetTxNames(value []string) FlowRouter { + + if obj.obj.TxNames == nil { + obj.obj.TxNames = make([]string, 0) + } + obj.obj.TxNames = value + + return obj +} + +// TBD +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Bgp.V4RouteRange/properties/name +// - /components/schemas/Bgp.V6RouteRange/properties/name +// - /components/schemas/Bgp.CMacIpRange/properties/name +// - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name +// - /components/schemas/Isis.V4RouteRange/properties/name +// - /components/schemas/Isis.V6RouteRange/properties/name +// - /components/schemas/Device.Dhcpv4client/properties/name +// - /components/schemas/Ospfv2.V4RouteRange/properties/name +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Bgp.V4RouteRange/properties/name +// - /components/schemas/Bgp.V6RouteRange/properties/name +// - /components/schemas/Bgp.CMacIpRange/properties/name +// - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name +// - /components/schemas/Isis.V4RouteRange/properties/name +// - /components/schemas/Isis.V6RouteRange/properties/name +// - /components/schemas/Device.Dhcpv4client/properties/name +// - /components/schemas/Ospfv2.V4RouteRange/properties/name +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// RxNames returns a []string +func (obj *flowRouter) RxNames() []string { + if obj.obj.RxNames == nil { + obj.obj.RxNames = make([]string, 0) + } + return obj.obj.RxNames +} + +// TBD +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Bgp.V4RouteRange/properties/name +// - /components/schemas/Bgp.V6RouteRange/properties/name +// - /components/schemas/Bgp.CMacIpRange/properties/name +// - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name +// - /components/schemas/Isis.V4RouteRange/properties/name +// - /components/schemas/Isis.V6RouteRange/properties/name +// - /components/schemas/Device.Dhcpv4client/properties/name +// - /components/schemas/Ospfv2.V4RouteRange/properties/name +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Bgp.V4RouteRange/properties/name +// - /components/schemas/Bgp.V6RouteRange/properties/name +// - /components/schemas/Bgp.CMacIpRange/properties/name +// - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name +// - /components/schemas/Isis.V4RouteRange/properties/name +// - /components/schemas/Isis.V6RouteRange/properties/name +// - /components/schemas/Device.Dhcpv4client/properties/name +// - /components/schemas/Ospfv2.V4RouteRange/properties/name +// - /components/schemas/Device.Dhcpv6client/properties/name +// +// SetRxNames sets the []string value in the FlowRouter object +func (obj *flowRouter) SetRxNames(value []string) FlowRouter { + + if obj.obj.RxNames == nil { + obj.obj.RxNames = make([]string, 0) + } + obj.obj.RxNames = value + + return obj +} + +func (obj *flowRouter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *flowRouter) setDefault() { + if obj.obj.Mode == nil { + obj.SetMode(FlowRouterMode.MESH) + + } + +} diff --git a/gosnappi/flow_rsvp.go b/gosnappi/flow_rsvp.go new file mode 100644 index 00000000..bef09bd4 --- /dev/null +++ b/gosnappi/flow_rsvp.go @@ -0,0 +1,585 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRsvp ***** +type flowRsvp struct { + validation + obj *otg.FlowRsvp + marshaller marshalFlowRsvp + unMarshaller unMarshalFlowRsvp + rsvpChecksumHolder PatternFlowRsvpRsvpChecksum + timeToLiveHolder PatternFlowRsvpTimeToLive + reservedHolder PatternFlowRsvpReserved + rsvpLengthHolder FlowRSVPLength + messageTypeHolder FlowRSVPMessage +} + +func NewFlowRsvp() FlowRsvp { + obj := flowRsvp{obj: &otg.FlowRsvp{}} + obj.setDefault() + return &obj +} + +func (obj *flowRsvp) msg() *otg.FlowRsvp { + return obj.obj +} + +func (obj *flowRsvp) setMsg(msg *otg.FlowRsvp) FlowRsvp { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRsvp struct { + obj *flowRsvp +} + +type marshalFlowRsvp interface { + // ToProto marshals FlowRsvp to protobuf object *otg.FlowRsvp + ToProto() (*otg.FlowRsvp, error) + // ToPbText marshals FlowRsvp to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRsvp to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRsvp to JSON text + ToJson() (string, error) +} + +type unMarshalflowRsvp struct { + obj *flowRsvp +} + +type unMarshalFlowRsvp interface { + // FromProto unmarshals FlowRsvp from protobuf object *otg.FlowRsvp + FromProto(msg *otg.FlowRsvp) (FlowRsvp, error) + // FromPbText unmarshals FlowRsvp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRsvp from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRsvp from JSON text + FromJson(value string) error +} + +func (obj *flowRsvp) Marshal() marshalFlowRsvp { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRsvp{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRsvp) Unmarshal() unMarshalFlowRsvp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRsvp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRsvp) ToProto() (*otg.FlowRsvp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRsvp) FromProto(msg *otg.FlowRsvp) (FlowRsvp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRsvp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRsvp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRsvp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRsvp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRsvp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRsvp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRsvp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRsvp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRsvp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRsvp) Clone() (FlowRsvp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRsvp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRsvp) setNil() { + obj.rsvpChecksumHolder = nil + obj.timeToLiveHolder = nil + obj.reservedHolder = nil + obj.rsvpLengthHolder = nil + obj.messageTypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRsvp is rSVP packet header as defined in RFC2205 and RFC3209. Currently only supported message type is "Path" with mandatory objects and sub-objects. +type FlowRsvp interface { + Validation + // msg marshals FlowRsvp to protobuf object *otg.FlowRsvp + // and doesn't set defaults + msg() *otg.FlowRsvp + // setMsg unmarshals FlowRsvp from protobuf object *otg.FlowRsvp + // and doesn't set defaults + setMsg(*otg.FlowRsvp) FlowRsvp + // provides marshal interface + Marshal() marshalFlowRsvp + // provides unmarshal interface + Unmarshal() unMarshalFlowRsvp + // validate validates FlowRsvp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRsvp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Version returns uint32, set in FlowRsvp. + Version() uint32 + // SetVersion assigns uint32 provided by user to FlowRsvp + SetVersion(value uint32) FlowRsvp + // HasVersion checks if Version has been set in FlowRsvp + HasVersion() bool + // Flag returns FlowRsvpFlagEnum, set in FlowRsvp + Flag() FlowRsvpFlagEnum + // SetFlag assigns FlowRsvpFlagEnum provided by user to FlowRsvp + SetFlag(value FlowRsvpFlagEnum) FlowRsvp + // HasFlag checks if Flag has been set in FlowRsvp + HasFlag() bool + // RsvpChecksum returns PatternFlowRsvpRsvpChecksum, set in FlowRsvp. + // PatternFlowRsvpRsvpChecksum is the one's complement of the one's complement sum of the message, with the checksum field replaced by zero for the purpose of computing the checksum. An all-zero value means that no checksum was transmitted. + RsvpChecksum() PatternFlowRsvpRsvpChecksum + // SetRsvpChecksum assigns PatternFlowRsvpRsvpChecksum provided by user to FlowRsvp. + // PatternFlowRsvpRsvpChecksum is the one's complement of the one's complement sum of the message, with the checksum field replaced by zero for the purpose of computing the checksum. An all-zero value means that no checksum was transmitted. + SetRsvpChecksum(value PatternFlowRsvpRsvpChecksum) FlowRsvp + // HasRsvpChecksum checks if RsvpChecksum has been set in FlowRsvp + HasRsvpChecksum() bool + // TimeToLive returns PatternFlowRsvpTimeToLive, set in FlowRsvp. + // PatternFlowRsvpTimeToLive is the IP time-to-live(TTL) value with which the message was sent. + TimeToLive() PatternFlowRsvpTimeToLive + // SetTimeToLive assigns PatternFlowRsvpTimeToLive provided by user to FlowRsvp. + // PatternFlowRsvpTimeToLive is the IP time-to-live(TTL) value with which the message was sent. + SetTimeToLive(value PatternFlowRsvpTimeToLive) FlowRsvp + // HasTimeToLive checks if TimeToLive has been set in FlowRsvp + HasTimeToLive() bool + // Reserved returns PatternFlowRsvpReserved, set in FlowRsvp. + // PatternFlowRsvpReserved is reserved + Reserved() PatternFlowRsvpReserved + // SetReserved assigns PatternFlowRsvpReserved provided by user to FlowRsvp. + // PatternFlowRsvpReserved is reserved + SetReserved(value PatternFlowRsvpReserved) FlowRsvp + // HasReserved checks if Reserved has been set in FlowRsvp + HasReserved() bool + // RsvpLength returns FlowRSVPLength, set in FlowRsvp. + // FlowRSVPLength is description is TBD + RsvpLength() FlowRSVPLength + // SetRsvpLength assigns FlowRSVPLength provided by user to FlowRsvp. + // FlowRSVPLength is description is TBD + SetRsvpLength(value FlowRSVPLength) FlowRsvp + // HasRsvpLength checks if RsvpLength has been set in FlowRsvp + HasRsvpLength() bool + // MessageType returns FlowRSVPMessage, set in FlowRsvp. + // FlowRSVPMessage is description is TBD + MessageType() FlowRSVPMessage + // SetMessageType assigns FlowRSVPMessage provided by user to FlowRsvp. + // FlowRSVPMessage is description is TBD + SetMessageType(value FlowRSVPMessage) FlowRsvp + // HasMessageType checks if MessageType has been set in FlowRsvp + HasMessageType() bool + setNil() +} + +// RSVP Protocol Version. +// Version returns a uint32 +func (obj *flowRsvp) Version() uint32 { + + return *obj.obj.Version + +} + +// RSVP Protocol Version. +// Version returns a uint32 +func (obj *flowRsvp) HasVersion() bool { + return obj.obj.Version != nil +} + +// RSVP Protocol Version. +// SetVersion sets the uint32 value in the FlowRsvp object +func (obj *flowRsvp) SetVersion(value uint32) FlowRsvp { + + obj.obj.Version = &value + return obj +} + +type FlowRsvpFlagEnum string + +// Enum of Flag on FlowRsvp +var FlowRsvpFlag = struct { + NOT_REFRESH_REDUCTION_CAPABLE FlowRsvpFlagEnum + REFRESH_REDUCTION_CAPABLE FlowRsvpFlagEnum +}{ + NOT_REFRESH_REDUCTION_CAPABLE: FlowRsvpFlagEnum("not_refresh_reduction_capable"), + REFRESH_REDUCTION_CAPABLE: FlowRsvpFlagEnum("refresh_reduction_capable"), +} + +func (obj *flowRsvp) Flag() FlowRsvpFlagEnum { + return FlowRsvpFlagEnum(obj.obj.Flag.Enum().String()) +} + +// Flag, 0x01-0x08: Reserved. +// Flag returns a string +func (obj *flowRsvp) HasFlag() bool { + return obj.obj.Flag != nil +} + +func (obj *flowRsvp) SetFlag(value FlowRsvpFlagEnum) FlowRsvp { + intValue, ok := otg.FlowRsvp_Flag_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRsvpFlagEnum", string(value))) + return obj + } + enumValue := otg.FlowRsvp_Flag_Enum(intValue) + obj.obj.Flag = &enumValue + + return obj +} + +// description is TBD +// RsvpChecksum returns a PatternFlowRsvpRsvpChecksum +func (obj *flowRsvp) RsvpChecksum() PatternFlowRsvpRsvpChecksum { + if obj.obj.RsvpChecksum == nil { + obj.obj.RsvpChecksum = NewPatternFlowRsvpRsvpChecksum().msg() + } + if obj.rsvpChecksumHolder == nil { + obj.rsvpChecksumHolder = &patternFlowRsvpRsvpChecksum{obj: obj.obj.RsvpChecksum} + } + return obj.rsvpChecksumHolder +} + +// description is TBD +// RsvpChecksum returns a PatternFlowRsvpRsvpChecksum +func (obj *flowRsvp) HasRsvpChecksum() bool { + return obj.obj.RsvpChecksum != nil +} + +// description is TBD +// SetRsvpChecksum sets the PatternFlowRsvpRsvpChecksum value in the FlowRsvp object +func (obj *flowRsvp) SetRsvpChecksum(value PatternFlowRsvpRsvpChecksum) FlowRsvp { + + obj.rsvpChecksumHolder = nil + obj.obj.RsvpChecksum = value.msg() + + return obj +} + +// description is TBD +// TimeToLive returns a PatternFlowRsvpTimeToLive +func (obj *flowRsvp) TimeToLive() PatternFlowRsvpTimeToLive { + if obj.obj.TimeToLive == nil { + obj.obj.TimeToLive = NewPatternFlowRsvpTimeToLive().msg() + } + if obj.timeToLiveHolder == nil { + obj.timeToLiveHolder = &patternFlowRsvpTimeToLive{obj: obj.obj.TimeToLive} + } + return obj.timeToLiveHolder +} + +// description is TBD +// TimeToLive returns a PatternFlowRsvpTimeToLive +func (obj *flowRsvp) HasTimeToLive() bool { + return obj.obj.TimeToLive != nil +} + +// description is TBD +// SetTimeToLive sets the PatternFlowRsvpTimeToLive value in the FlowRsvp object +func (obj *flowRsvp) SetTimeToLive(value PatternFlowRsvpTimeToLive) FlowRsvp { + + obj.timeToLiveHolder = nil + obj.obj.TimeToLive = value.msg() + + return obj +} + +// description is TBD +// Reserved returns a PatternFlowRsvpReserved +func (obj *flowRsvp) Reserved() PatternFlowRsvpReserved { + if obj.obj.Reserved == nil { + obj.obj.Reserved = NewPatternFlowRsvpReserved().msg() + } + if obj.reservedHolder == nil { + obj.reservedHolder = &patternFlowRsvpReserved{obj: obj.obj.Reserved} + } + return obj.reservedHolder +} + +// description is TBD +// Reserved returns a PatternFlowRsvpReserved +func (obj *flowRsvp) HasReserved() bool { + return obj.obj.Reserved != nil +} + +// description is TBD +// SetReserved sets the PatternFlowRsvpReserved value in the FlowRsvp object +func (obj *flowRsvp) SetReserved(value PatternFlowRsvpReserved) FlowRsvp { + + obj.reservedHolder = nil + obj.obj.Reserved = value.msg() + + return obj +} + +// The sum of the lengths of the common header and all objects included in the message. +// RsvpLength returns a FlowRSVPLength +func (obj *flowRsvp) RsvpLength() FlowRSVPLength { + if obj.obj.RsvpLength == nil { + obj.obj.RsvpLength = NewFlowRSVPLength().msg() + } + if obj.rsvpLengthHolder == nil { + obj.rsvpLengthHolder = &flowRSVPLength{obj: obj.obj.RsvpLength} + } + return obj.rsvpLengthHolder +} + +// The sum of the lengths of the common header and all objects included in the message. +// RsvpLength returns a FlowRSVPLength +func (obj *flowRsvp) HasRsvpLength() bool { + return obj.obj.RsvpLength != nil +} + +// The sum of the lengths of the common header and all objects included in the message. +// SetRsvpLength sets the FlowRSVPLength value in the FlowRsvp object +func (obj *flowRsvp) SetRsvpLength(value FlowRSVPLength) FlowRsvp { + + obj.rsvpLengthHolder = nil + obj.obj.RsvpLength = value.msg() + + return obj +} + +// An 8-bit number that identifies the function of the RSVP message. There are aound 20 message types defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-2 . Among these presently supported is "Path"(value: 1) message type. +// MessageType returns a FlowRSVPMessage +func (obj *flowRsvp) MessageType() FlowRSVPMessage { + if obj.obj.MessageType == nil { + obj.obj.MessageType = NewFlowRSVPMessage().msg() + } + if obj.messageTypeHolder == nil { + obj.messageTypeHolder = &flowRSVPMessage{obj: obj.obj.MessageType} + } + return obj.messageTypeHolder +} + +// An 8-bit number that identifies the function of the RSVP message. There are aound 20 message types defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-2 . Among these presently supported is "Path"(value: 1) message type. +// MessageType returns a FlowRSVPMessage +func (obj *flowRsvp) HasMessageType() bool { + return obj.obj.MessageType != nil +} + +// An 8-bit number that identifies the function of the RSVP message. There are aound 20 message types defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-2 . Among these presently supported is "Path"(value: 1) message type. +// SetMessageType sets the FlowRSVPMessage value in the FlowRsvp object +func (obj *flowRsvp) SetMessageType(value FlowRSVPMessage) FlowRsvp { + + obj.messageTypeHolder = nil + obj.obj.MessageType = value.msg() + + return obj +} + +func (obj *flowRsvp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Version != nil { + + if *obj.obj.Version > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowRsvp.Version <= 15 but Got %d", *obj.obj.Version)) + } + + } + + if obj.obj.RsvpChecksum != nil { + + obj.RsvpChecksum().validateObj(vObj, set_default) + } + + if obj.obj.TimeToLive != nil { + + obj.TimeToLive().validateObj(vObj, set_default) + } + + if obj.obj.Reserved != nil { + + obj.Reserved().validateObj(vObj, set_default) + } + + if obj.obj.RsvpLength != nil { + + obj.RsvpLength().validateObj(vObj, set_default) + } + + if obj.obj.MessageType != nil { + + obj.MessageType().validateObj(vObj, set_default) + } + +} + +func (obj *flowRsvp) setDefault() { + if obj.obj.Version == nil { + obj.SetVersion(1) + } + if obj.obj.Flag == nil { + obj.SetFlag(FlowRsvpFlag.NOT_REFRESH_REDUCTION_CAPABLE) + + } + +} diff --git a/gosnappi/flow_rsvp_explicit_route_as_number_length.go b/gosnappi/flow_rsvp_explicit_route_as_number_length.go new file mode 100644 index 00000000..67a9d89f --- /dev/null +++ b/gosnappi/flow_rsvp_explicit_route_as_number_length.go @@ -0,0 +1,423 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPExplicitRouteASNumberLength ***** +type flowRSVPExplicitRouteASNumberLength struct { + validation + obj *otg.FlowRSVPExplicitRouteASNumberLength + marshaller marshalFlowRSVPExplicitRouteASNumberLength + unMarshaller unMarshalFlowRSVPExplicitRouteASNumberLength +} + +func NewFlowRSVPExplicitRouteASNumberLength() FlowRSVPExplicitRouteASNumberLength { + obj := flowRSVPExplicitRouteASNumberLength{obj: &otg.FlowRSVPExplicitRouteASNumberLength{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPExplicitRouteASNumberLength) msg() *otg.FlowRSVPExplicitRouteASNumberLength { + return obj.obj +} + +func (obj *flowRSVPExplicitRouteASNumberLength) setMsg(msg *otg.FlowRSVPExplicitRouteASNumberLength) FlowRSVPExplicitRouteASNumberLength { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPExplicitRouteASNumberLength struct { + obj *flowRSVPExplicitRouteASNumberLength +} + +type marshalFlowRSVPExplicitRouteASNumberLength interface { + // ToProto marshals FlowRSVPExplicitRouteASNumberLength to protobuf object *otg.FlowRSVPExplicitRouteASNumberLength + ToProto() (*otg.FlowRSVPExplicitRouteASNumberLength, error) + // ToPbText marshals FlowRSVPExplicitRouteASNumberLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPExplicitRouteASNumberLength to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPExplicitRouteASNumberLength to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPExplicitRouteASNumberLength struct { + obj *flowRSVPExplicitRouteASNumberLength +} + +type unMarshalFlowRSVPExplicitRouteASNumberLength interface { + // FromProto unmarshals FlowRSVPExplicitRouteASNumberLength from protobuf object *otg.FlowRSVPExplicitRouteASNumberLength + FromProto(msg *otg.FlowRSVPExplicitRouteASNumberLength) (FlowRSVPExplicitRouteASNumberLength, error) + // FromPbText unmarshals FlowRSVPExplicitRouteASNumberLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPExplicitRouteASNumberLength from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPExplicitRouteASNumberLength from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPExplicitRouteASNumberLength) Marshal() marshalFlowRSVPExplicitRouteASNumberLength { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPExplicitRouteASNumberLength{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPExplicitRouteASNumberLength) Unmarshal() unMarshalFlowRSVPExplicitRouteASNumberLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPExplicitRouteASNumberLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPExplicitRouteASNumberLength) ToProto() (*otg.FlowRSVPExplicitRouteASNumberLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPExplicitRouteASNumberLength) FromProto(msg *otg.FlowRSVPExplicitRouteASNumberLength) (FlowRSVPExplicitRouteASNumberLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPExplicitRouteASNumberLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPExplicitRouteASNumberLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPExplicitRouteASNumberLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPExplicitRouteASNumberLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPExplicitRouteASNumberLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPExplicitRouteASNumberLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPExplicitRouteASNumberLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPExplicitRouteASNumberLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPExplicitRouteASNumberLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPExplicitRouteASNumberLength) Clone() (FlowRSVPExplicitRouteASNumberLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPExplicitRouteASNumberLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowRSVPExplicitRouteASNumberLength is description is TBD +type FlowRSVPExplicitRouteASNumberLength interface { + Validation + // msg marshals FlowRSVPExplicitRouteASNumberLength to protobuf object *otg.FlowRSVPExplicitRouteASNumberLength + // and doesn't set defaults + msg() *otg.FlowRSVPExplicitRouteASNumberLength + // setMsg unmarshals FlowRSVPExplicitRouteASNumberLength from protobuf object *otg.FlowRSVPExplicitRouteASNumberLength + // and doesn't set defaults + setMsg(*otg.FlowRSVPExplicitRouteASNumberLength) FlowRSVPExplicitRouteASNumberLength + // provides marshal interface + Marshal() marshalFlowRSVPExplicitRouteASNumberLength + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPExplicitRouteASNumberLength + // validate validates FlowRSVPExplicitRouteASNumberLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPExplicitRouteASNumberLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPExplicitRouteASNumberLengthChoiceEnum, set in FlowRSVPExplicitRouteASNumberLength + Choice() FlowRSVPExplicitRouteASNumberLengthChoiceEnum + // setChoice assigns FlowRSVPExplicitRouteASNumberLengthChoiceEnum provided by user to FlowRSVPExplicitRouteASNumberLength + setChoice(value FlowRSVPExplicitRouteASNumberLengthChoiceEnum) FlowRSVPExplicitRouteASNumberLength + // HasChoice checks if Choice has been set in FlowRSVPExplicitRouteASNumberLength + HasChoice() bool + // Auto returns uint32, set in FlowRSVPExplicitRouteASNumberLength. + Auto() uint32 + // HasAuto checks if Auto has been set in FlowRSVPExplicitRouteASNumberLength + HasAuto() bool + // Value returns uint32, set in FlowRSVPExplicitRouteASNumberLength. + Value() uint32 + // SetValue assigns uint32 provided by user to FlowRSVPExplicitRouteASNumberLength + SetValue(value uint32) FlowRSVPExplicitRouteASNumberLength + // HasValue checks if Value has been set in FlowRSVPExplicitRouteASNumberLength + HasValue() bool +} + +type FlowRSVPExplicitRouteASNumberLengthChoiceEnum string + +// Enum of Choice on FlowRSVPExplicitRouteASNumberLength +var FlowRSVPExplicitRouteASNumberLengthChoice = struct { + AUTO FlowRSVPExplicitRouteASNumberLengthChoiceEnum + VALUE FlowRSVPExplicitRouteASNumberLengthChoiceEnum +}{ + AUTO: FlowRSVPExplicitRouteASNumberLengthChoiceEnum("auto"), + VALUE: FlowRSVPExplicitRouteASNumberLengthChoiceEnum("value"), +} + +func (obj *flowRSVPExplicitRouteASNumberLength) Choice() FlowRSVPExplicitRouteASNumberLengthChoiceEnum { + return FlowRSVPExplicitRouteASNumberLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// auto or configured value. +// Choice returns a string +func (obj *flowRSVPExplicitRouteASNumberLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPExplicitRouteASNumberLength) setChoice(value FlowRSVPExplicitRouteASNumberLengthChoiceEnum) FlowRSVPExplicitRouteASNumberLength { + intValue, ok := otg.FlowRSVPExplicitRouteASNumberLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPExplicitRouteASNumberLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPExplicitRouteASNumberLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Value = nil + obj.obj.Auto = nil + + if value == FlowRSVPExplicitRouteASNumberLengthChoice.AUTO { + defaultValue := uint32(4) + obj.obj.Auto = &defaultValue + } + + if value == FlowRSVPExplicitRouteASNumberLengthChoice.VALUE { + defaultValue := uint32(4) + obj.obj.Value = &defaultValue + } + + return obj +} + +// The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. +// Auto returns a uint32 +func (obj *flowRSVPExplicitRouteASNumberLength) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(FlowRSVPExplicitRouteASNumberLengthChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. +// Auto returns a uint32 +func (obj *flowRSVPExplicitRouteASNumberLength) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Value returns a uint32 +func (obj *flowRSVPExplicitRouteASNumberLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(FlowRSVPExplicitRouteASNumberLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *flowRSVPExplicitRouteASNumberLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the FlowRSVPExplicitRouteASNumberLength object +func (obj *flowRSVPExplicitRouteASNumberLength) SetValue(value uint32) FlowRSVPExplicitRouteASNumberLength { + obj.setChoice(FlowRSVPExplicitRouteASNumberLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +func (obj *flowRSVPExplicitRouteASNumberLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowRSVPExplicitRouteASNumberLength.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + +} + +func (obj *flowRSVPExplicitRouteASNumberLength) setDefault() { + var choices_set int = 0 + var choice FlowRSVPExplicitRouteASNumberLengthChoiceEnum + + if obj.obj.Auto != nil { + choices_set += 1 + choice = FlowRSVPExplicitRouteASNumberLengthChoice.AUTO + } + + if obj.obj.Value != nil { + choices_set += 1 + choice = FlowRSVPExplicitRouteASNumberLengthChoice.VALUE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPExplicitRouteASNumberLengthChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPExplicitRouteASNumberLength") + } + } else { + intVal := otg.FlowRSVPExplicitRouteASNumberLength_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPExplicitRouteASNumberLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_explicit_route_length.go b/gosnappi/flow_rsvp_explicit_route_length.go new file mode 100644 index 00000000..9a28e4e5 --- /dev/null +++ b/gosnappi/flow_rsvp_explicit_route_length.go @@ -0,0 +1,423 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPExplicitRouteLength ***** +type flowRSVPExplicitRouteLength struct { + validation + obj *otg.FlowRSVPExplicitRouteLength + marshaller marshalFlowRSVPExplicitRouteLength + unMarshaller unMarshalFlowRSVPExplicitRouteLength +} + +func NewFlowRSVPExplicitRouteLength() FlowRSVPExplicitRouteLength { + obj := flowRSVPExplicitRouteLength{obj: &otg.FlowRSVPExplicitRouteLength{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPExplicitRouteLength) msg() *otg.FlowRSVPExplicitRouteLength { + return obj.obj +} + +func (obj *flowRSVPExplicitRouteLength) setMsg(msg *otg.FlowRSVPExplicitRouteLength) FlowRSVPExplicitRouteLength { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPExplicitRouteLength struct { + obj *flowRSVPExplicitRouteLength +} + +type marshalFlowRSVPExplicitRouteLength interface { + // ToProto marshals FlowRSVPExplicitRouteLength to protobuf object *otg.FlowRSVPExplicitRouteLength + ToProto() (*otg.FlowRSVPExplicitRouteLength, error) + // ToPbText marshals FlowRSVPExplicitRouteLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPExplicitRouteLength to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPExplicitRouteLength to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPExplicitRouteLength struct { + obj *flowRSVPExplicitRouteLength +} + +type unMarshalFlowRSVPExplicitRouteLength interface { + // FromProto unmarshals FlowRSVPExplicitRouteLength from protobuf object *otg.FlowRSVPExplicitRouteLength + FromProto(msg *otg.FlowRSVPExplicitRouteLength) (FlowRSVPExplicitRouteLength, error) + // FromPbText unmarshals FlowRSVPExplicitRouteLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPExplicitRouteLength from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPExplicitRouteLength from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPExplicitRouteLength) Marshal() marshalFlowRSVPExplicitRouteLength { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPExplicitRouteLength{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPExplicitRouteLength) Unmarshal() unMarshalFlowRSVPExplicitRouteLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPExplicitRouteLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPExplicitRouteLength) ToProto() (*otg.FlowRSVPExplicitRouteLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPExplicitRouteLength) FromProto(msg *otg.FlowRSVPExplicitRouteLength) (FlowRSVPExplicitRouteLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPExplicitRouteLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPExplicitRouteLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPExplicitRouteLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPExplicitRouteLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPExplicitRouteLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPExplicitRouteLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPExplicitRouteLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPExplicitRouteLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPExplicitRouteLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPExplicitRouteLength) Clone() (FlowRSVPExplicitRouteLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPExplicitRouteLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowRSVPExplicitRouteLength is description is TBD +type FlowRSVPExplicitRouteLength interface { + Validation + // msg marshals FlowRSVPExplicitRouteLength to protobuf object *otg.FlowRSVPExplicitRouteLength + // and doesn't set defaults + msg() *otg.FlowRSVPExplicitRouteLength + // setMsg unmarshals FlowRSVPExplicitRouteLength from protobuf object *otg.FlowRSVPExplicitRouteLength + // and doesn't set defaults + setMsg(*otg.FlowRSVPExplicitRouteLength) FlowRSVPExplicitRouteLength + // provides marshal interface + Marshal() marshalFlowRSVPExplicitRouteLength + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPExplicitRouteLength + // validate validates FlowRSVPExplicitRouteLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPExplicitRouteLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPExplicitRouteLengthChoiceEnum, set in FlowRSVPExplicitRouteLength + Choice() FlowRSVPExplicitRouteLengthChoiceEnum + // setChoice assigns FlowRSVPExplicitRouteLengthChoiceEnum provided by user to FlowRSVPExplicitRouteLength + setChoice(value FlowRSVPExplicitRouteLengthChoiceEnum) FlowRSVPExplicitRouteLength + // HasChoice checks if Choice has been set in FlowRSVPExplicitRouteLength + HasChoice() bool + // Auto returns uint32, set in FlowRSVPExplicitRouteLength. + Auto() uint32 + // HasAuto checks if Auto has been set in FlowRSVPExplicitRouteLength + HasAuto() bool + // Value returns uint32, set in FlowRSVPExplicitRouteLength. + Value() uint32 + // SetValue assigns uint32 provided by user to FlowRSVPExplicitRouteLength + SetValue(value uint32) FlowRSVPExplicitRouteLength + // HasValue checks if Value has been set in FlowRSVPExplicitRouteLength + HasValue() bool +} + +type FlowRSVPExplicitRouteLengthChoiceEnum string + +// Enum of Choice on FlowRSVPExplicitRouteLength +var FlowRSVPExplicitRouteLengthChoice = struct { + AUTO FlowRSVPExplicitRouteLengthChoiceEnum + VALUE FlowRSVPExplicitRouteLengthChoiceEnum +}{ + AUTO: FlowRSVPExplicitRouteLengthChoiceEnum("auto"), + VALUE: FlowRSVPExplicitRouteLengthChoiceEnum("value"), +} + +func (obj *flowRSVPExplicitRouteLength) Choice() FlowRSVPExplicitRouteLengthChoiceEnum { + return FlowRSVPExplicitRouteLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// auto or configured value. +// Choice returns a string +func (obj *flowRSVPExplicitRouteLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPExplicitRouteLength) setChoice(value FlowRSVPExplicitRouteLengthChoiceEnum) FlowRSVPExplicitRouteLength { + intValue, ok := otg.FlowRSVPExplicitRouteLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPExplicitRouteLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPExplicitRouteLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Value = nil + obj.obj.Auto = nil + + if value == FlowRSVPExplicitRouteLengthChoice.AUTO { + defaultValue := uint32(8) + obj.obj.Auto = &defaultValue + } + + if value == FlowRSVPExplicitRouteLengthChoice.VALUE { + defaultValue := uint32(8) + obj.obj.Value = &defaultValue + } + + return obj +} + +// The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. +// Auto returns a uint32 +func (obj *flowRSVPExplicitRouteLength) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(FlowRSVPExplicitRouteLengthChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. +// Auto returns a uint32 +func (obj *flowRSVPExplicitRouteLength) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Value returns a uint32 +func (obj *flowRSVPExplicitRouteLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(FlowRSVPExplicitRouteLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *flowRSVPExplicitRouteLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the FlowRSVPExplicitRouteLength object +func (obj *flowRSVPExplicitRouteLength) SetValue(value uint32) FlowRSVPExplicitRouteLength { + obj.setChoice(FlowRSVPExplicitRouteLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +func (obj *flowRSVPExplicitRouteLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowRSVPExplicitRouteLength.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + +} + +func (obj *flowRSVPExplicitRouteLength) setDefault() { + var choices_set int = 0 + var choice FlowRSVPExplicitRouteLengthChoiceEnum + + if obj.obj.Auto != nil { + choices_set += 1 + choice = FlowRSVPExplicitRouteLengthChoice.AUTO + } + + if obj.obj.Value != nil { + choices_set += 1 + choice = FlowRSVPExplicitRouteLengthChoice.VALUE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPExplicitRouteLengthChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPExplicitRouteLength") + } + } else { + intVal := otg.FlowRSVPExplicitRouteLength_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPExplicitRouteLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_length.go b/gosnappi/flow_rsvp_length.go new file mode 100644 index 00000000..3fc19b26 --- /dev/null +++ b/gosnappi/flow_rsvp_length.go @@ -0,0 +1,423 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPLength ***** +type flowRSVPLength struct { + validation + obj *otg.FlowRSVPLength + marshaller marshalFlowRSVPLength + unMarshaller unMarshalFlowRSVPLength +} + +func NewFlowRSVPLength() FlowRSVPLength { + obj := flowRSVPLength{obj: &otg.FlowRSVPLength{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPLength) msg() *otg.FlowRSVPLength { + return obj.obj +} + +func (obj *flowRSVPLength) setMsg(msg *otg.FlowRSVPLength) FlowRSVPLength { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPLength struct { + obj *flowRSVPLength +} + +type marshalFlowRSVPLength interface { + // ToProto marshals FlowRSVPLength to protobuf object *otg.FlowRSVPLength + ToProto() (*otg.FlowRSVPLength, error) + // ToPbText marshals FlowRSVPLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPLength to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPLength to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPLength struct { + obj *flowRSVPLength +} + +type unMarshalFlowRSVPLength interface { + // FromProto unmarshals FlowRSVPLength from protobuf object *otg.FlowRSVPLength + FromProto(msg *otg.FlowRSVPLength) (FlowRSVPLength, error) + // FromPbText unmarshals FlowRSVPLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPLength from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPLength from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPLength) Marshal() marshalFlowRSVPLength { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPLength{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPLength) Unmarshal() unMarshalFlowRSVPLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPLength) ToProto() (*otg.FlowRSVPLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPLength) FromProto(msg *otg.FlowRSVPLength) (FlowRSVPLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPLength) Clone() (FlowRSVPLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowRSVPLength is description is TBD +type FlowRSVPLength interface { + Validation + // msg marshals FlowRSVPLength to protobuf object *otg.FlowRSVPLength + // and doesn't set defaults + msg() *otg.FlowRSVPLength + // setMsg unmarshals FlowRSVPLength from protobuf object *otg.FlowRSVPLength + // and doesn't set defaults + setMsg(*otg.FlowRSVPLength) FlowRSVPLength + // provides marshal interface + Marshal() marshalFlowRSVPLength + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPLength + // validate validates FlowRSVPLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPLengthChoiceEnum, set in FlowRSVPLength + Choice() FlowRSVPLengthChoiceEnum + // setChoice assigns FlowRSVPLengthChoiceEnum provided by user to FlowRSVPLength + setChoice(value FlowRSVPLengthChoiceEnum) FlowRSVPLength + // HasChoice checks if Choice has been set in FlowRSVPLength + HasChoice() bool + // Auto returns uint32, set in FlowRSVPLength. + Auto() uint32 + // HasAuto checks if Auto has been set in FlowRSVPLength + HasAuto() bool + // Value returns uint32, set in FlowRSVPLength. + Value() uint32 + // SetValue assigns uint32 provided by user to FlowRSVPLength + SetValue(value uint32) FlowRSVPLength + // HasValue checks if Value has been set in FlowRSVPLength + HasValue() bool +} + +type FlowRSVPLengthChoiceEnum string + +// Enum of Choice on FlowRSVPLength +var FlowRSVPLengthChoice = struct { + AUTO FlowRSVPLengthChoiceEnum + VALUE FlowRSVPLengthChoiceEnum +}{ + AUTO: FlowRSVPLengthChoiceEnum("auto"), + VALUE: FlowRSVPLengthChoiceEnum("value"), +} + +func (obj *flowRSVPLength) Choice() FlowRSVPLengthChoiceEnum { + return FlowRSVPLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// auto or configured value. +// Choice returns a string +func (obj *flowRSVPLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPLength) setChoice(value FlowRSVPLengthChoiceEnum) FlowRSVPLength { + intValue, ok := otg.FlowRSVPLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Value = nil + obj.obj.Auto = nil + + if value == FlowRSVPLengthChoice.AUTO { + defaultValue := uint32(0) + obj.obj.Auto = &defaultValue + } + + if value == FlowRSVPLengthChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + return obj +} + +// The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. +// Auto returns a uint32 +func (obj *flowRSVPLength) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(FlowRSVPLengthChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. +// Auto returns a uint32 +func (obj *flowRSVPLength) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Value returns a uint32 +func (obj *flowRSVPLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(FlowRSVPLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *flowRSVPLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the FlowRSVPLength object +func (obj *flowRSVPLength) SetValue(value uint32) FlowRSVPLength { + obj.setChoice(FlowRSVPLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +func (obj *flowRSVPLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowRSVPLength.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + +} + +func (obj *flowRSVPLength) setDefault() { + var choices_set int = 0 + var choice FlowRSVPLengthChoiceEnum + + if obj.obj.Auto != nil { + choices_set += 1 + choice = FlowRSVPLengthChoice.AUTO + } + + if obj.obj.Value != nil { + choices_set += 1 + choice = FlowRSVPLengthChoice.VALUE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPLengthChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPLength") + } + } else { + intVal := otg.FlowRSVPLength_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_lsp_tunnel_flag.go b/gosnappi/flow_rsvp_lsp_tunnel_flag.go new file mode 100644 index 00000000..5047737d --- /dev/null +++ b/gosnappi/flow_rsvp_lsp_tunnel_flag.go @@ -0,0 +1,360 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPLspTunnelFlag ***** +type flowRSVPLspTunnelFlag struct { + validation + obj *otg.FlowRSVPLspTunnelFlag + marshaller marshalFlowRSVPLspTunnelFlag + unMarshaller unMarshalFlowRSVPLspTunnelFlag +} + +func NewFlowRSVPLspTunnelFlag() FlowRSVPLspTunnelFlag { + obj := flowRSVPLspTunnelFlag{obj: &otg.FlowRSVPLspTunnelFlag{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPLspTunnelFlag) msg() *otg.FlowRSVPLspTunnelFlag { + return obj.obj +} + +func (obj *flowRSVPLspTunnelFlag) setMsg(msg *otg.FlowRSVPLspTunnelFlag) FlowRSVPLspTunnelFlag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPLspTunnelFlag struct { + obj *flowRSVPLspTunnelFlag +} + +type marshalFlowRSVPLspTunnelFlag interface { + // ToProto marshals FlowRSVPLspTunnelFlag to protobuf object *otg.FlowRSVPLspTunnelFlag + ToProto() (*otg.FlowRSVPLspTunnelFlag, error) + // ToPbText marshals FlowRSVPLspTunnelFlag to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPLspTunnelFlag to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPLspTunnelFlag to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPLspTunnelFlag struct { + obj *flowRSVPLspTunnelFlag +} + +type unMarshalFlowRSVPLspTunnelFlag interface { + // FromProto unmarshals FlowRSVPLspTunnelFlag from protobuf object *otg.FlowRSVPLspTunnelFlag + FromProto(msg *otg.FlowRSVPLspTunnelFlag) (FlowRSVPLspTunnelFlag, error) + // FromPbText unmarshals FlowRSVPLspTunnelFlag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPLspTunnelFlag from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPLspTunnelFlag from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPLspTunnelFlag) Marshal() marshalFlowRSVPLspTunnelFlag { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPLspTunnelFlag{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPLspTunnelFlag) Unmarshal() unMarshalFlowRSVPLspTunnelFlag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPLspTunnelFlag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPLspTunnelFlag) ToProto() (*otg.FlowRSVPLspTunnelFlag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPLspTunnelFlag) FromProto(msg *otg.FlowRSVPLspTunnelFlag) (FlowRSVPLspTunnelFlag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPLspTunnelFlag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPLspTunnelFlag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPLspTunnelFlag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPLspTunnelFlag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPLspTunnelFlag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPLspTunnelFlag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPLspTunnelFlag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPLspTunnelFlag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPLspTunnelFlag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPLspTunnelFlag) Clone() (FlowRSVPLspTunnelFlag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPLspTunnelFlag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowRSVPLspTunnelFlag is description is TBD +type FlowRSVPLspTunnelFlag interface { + Validation + // msg marshals FlowRSVPLspTunnelFlag to protobuf object *otg.FlowRSVPLspTunnelFlag + // and doesn't set defaults + msg() *otg.FlowRSVPLspTunnelFlag + // setMsg unmarshals FlowRSVPLspTunnelFlag from protobuf object *otg.FlowRSVPLspTunnelFlag + // and doesn't set defaults + setMsg(*otg.FlowRSVPLspTunnelFlag) FlowRSVPLspTunnelFlag + // provides marshal interface + Marshal() marshalFlowRSVPLspTunnelFlag + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPLspTunnelFlag + // validate validates FlowRSVPLspTunnelFlag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPLspTunnelFlag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPLspTunnelFlagChoiceEnum, set in FlowRSVPLspTunnelFlag + Choice() FlowRSVPLspTunnelFlagChoiceEnum + // setChoice assigns FlowRSVPLspTunnelFlagChoiceEnum provided by user to FlowRSVPLspTunnelFlag + setChoice(value FlowRSVPLspTunnelFlagChoiceEnum) FlowRSVPLspTunnelFlag + // HasChoice checks if Choice has been set in FlowRSVPLspTunnelFlag + HasChoice() bool + // getter for SeStyleDesired to set choice. + SeStyleDesired() + // getter for LocalProtectionDesired to set choice. + LocalProtectionDesired() + // getter for LabelRecordingDesired to set choice. + LabelRecordingDesired() +} + +type FlowRSVPLspTunnelFlagChoiceEnum string + +// Enum of Choice on FlowRSVPLspTunnelFlag +var FlowRSVPLspTunnelFlagChoice = struct { + LOCAL_PROTECTION_DESIRED FlowRSVPLspTunnelFlagChoiceEnum + LABEL_RECORDING_DESIRED FlowRSVPLspTunnelFlagChoiceEnum + SE_STYLE_DESIRED FlowRSVPLspTunnelFlagChoiceEnum +}{ + LOCAL_PROTECTION_DESIRED: FlowRSVPLspTunnelFlagChoiceEnum("local_protection_desired"), + LABEL_RECORDING_DESIRED: FlowRSVPLspTunnelFlagChoiceEnum("label_recording_desired"), + SE_STYLE_DESIRED: FlowRSVPLspTunnelFlagChoiceEnum("se_style_desired"), +} + +func (obj *flowRSVPLspTunnelFlag) Choice() FlowRSVPLspTunnelFlagChoiceEnum { + return FlowRSVPLspTunnelFlagChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for SeStyleDesired to set choice +func (obj *flowRSVPLspTunnelFlag) SeStyleDesired() { + obj.setChoice(FlowRSVPLspTunnelFlagChoice.SE_STYLE_DESIRED) +} + +// getter for LocalProtectionDesired to set choice +func (obj *flowRSVPLspTunnelFlag) LocalProtectionDesired() { + obj.setChoice(FlowRSVPLspTunnelFlagChoice.LOCAL_PROTECTION_DESIRED) +} + +// getter for LabelRecordingDesired to set choice +func (obj *flowRSVPLspTunnelFlag) LabelRecordingDesired() { + obj.setChoice(FlowRSVPLspTunnelFlagChoice.LABEL_RECORDING_DESIRED) +} + +// description is TBD +// Choice returns a string +func (obj *flowRSVPLspTunnelFlag) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPLspTunnelFlag) setChoice(value FlowRSVPLspTunnelFlagChoiceEnum) FlowRSVPLspTunnelFlag { + intValue, ok := otg.FlowRSVPLspTunnelFlag_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPLspTunnelFlagChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPLspTunnelFlag_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + + return obj +} + +func (obj *flowRSVPLspTunnelFlag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *flowRSVPLspTunnelFlag) setDefault() { + var choices_set int = 0 + var choice FlowRSVPLspTunnelFlagChoiceEnum + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPLspTunnelFlagChoice.LOCAL_PROTECTION_DESIRED) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPLspTunnelFlag") + } + } else { + intVal := otg.FlowRSVPLspTunnelFlag_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPLspTunnelFlag_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_message.go b/gosnappi/flow_rsvp_message.go new file mode 100644 index 00000000..baba64f4 --- /dev/null +++ b/gosnappi/flow_rsvp_message.go @@ -0,0 +1,396 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPMessage ***** +type flowRSVPMessage struct { + validation + obj *otg.FlowRSVPMessage + marshaller marshalFlowRSVPMessage + unMarshaller unMarshalFlowRSVPMessage + pathHolder FlowRSVPPathMessage +} + +func NewFlowRSVPMessage() FlowRSVPMessage { + obj := flowRSVPMessage{obj: &otg.FlowRSVPMessage{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPMessage) msg() *otg.FlowRSVPMessage { + return obj.obj +} + +func (obj *flowRSVPMessage) setMsg(msg *otg.FlowRSVPMessage) FlowRSVPMessage { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPMessage struct { + obj *flowRSVPMessage +} + +type marshalFlowRSVPMessage interface { + // ToProto marshals FlowRSVPMessage to protobuf object *otg.FlowRSVPMessage + ToProto() (*otg.FlowRSVPMessage, error) + // ToPbText marshals FlowRSVPMessage to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPMessage to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPMessage to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPMessage struct { + obj *flowRSVPMessage +} + +type unMarshalFlowRSVPMessage interface { + // FromProto unmarshals FlowRSVPMessage from protobuf object *otg.FlowRSVPMessage + FromProto(msg *otg.FlowRSVPMessage) (FlowRSVPMessage, error) + // FromPbText unmarshals FlowRSVPMessage from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPMessage from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPMessage from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPMessage) Marshal() marshalFlowRSVPMessage { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPMessage{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPMessage) Unmarshal() unMarshalFlowRSVPMessage { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPMessage{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPMessage) ToProto() (*otg.FlowRSVPMessage, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPMessage) FromProto(msg *otg.FlowRSVPMessage) (FlowRSVPMessage, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPMessage) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPMessage) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPMessage) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPMessage) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPMessage) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPMessage) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPMessage) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPMessage) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPMessage) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPMessage) Clone() (FlowRSVPMessage, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPMessage() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPMessage) setNil() { + obj.pathHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPMessage is description is TBD +type FlowRSVPMessage interface { + Validation + // msg marshals FlowRSVPMessage to protobuf object *otg.FlowRSVPMessage + // and doesn't set defaults + msg() *otg.FlowRSVPMessage + // setMsg unmarshals FlowRSVPMessage from protobuf object *otg.FlowRSVPMessage + // and doesn't set defaults + setMsg(*otg.FlowRSVPMessage) FlowRSVPMessage + // provides marshal interface + Marshal() marshalFlowRSVPMessage + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPMessage + // validate validates FlowRSVPMessage + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPMessage, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPMessageChoiceEnum, set in FlowRSVPMessage + Choice() FlowRSVPMessageChoiceEnum + // setChoice assigns FlowRSVPMessageChoiceEnum provided by user to FlowRSVPMessage + setChoice(value FlowRSVPMessageChoiceEnum) FlowRSVPMessage + // HasChoice checks if Choice has been set in FlowRSVPMessage + HasChoice() bool + // Path returns FlowRSVPPathMessage, set in FlowRSVPMessage. + // FlowRSVPPathMessage is "Path" message requires the following list of objects in order as defined in https://www.rfc-editor.org/rfc/rfc3209.html#page-15: 1. SESSION 2. RSVP_HOP 3. TIME_VALUES 4. EXPLICIT_ROUTE [optional] 5. LABEL_REQUEST 6. SESSION_ATTRIBUTE [optional] 7. SENDER_TEMPLATE 8. SENDER_TSPEC 9. RECORD_ROUTE [optional] + Path() FlowRSVPPathMessage + // SetPath assigns FlowRSVPPathMessage provided by user to FlowRSVPMessage. + // FlowRSVPPathMessage is "Path" message requires the following list of objects in order as defined in https://www.rfc-editor.org/rfc/rfc3209.html#page-15: 1. SESSION 2. RSVP_HOP 3. TIME_VALUES 4. EXPLICIT_ROUTE [optional] 5. LABEL_REQUEST 6. SESSION_ATTRIBUTE [optional] 7. SENDER_TEMPLATE 8. SENDER_TSPEC 9. RECORD_ROUTE [optional] + SetPath(value FlowRSVPPathMessage) FlowRSVPMessage + // HasPath checks if Path has been set in FlowRSVPMessage + HasPath() bool + setNil() +} + +type FlowRSVPMessageChoiceEnum string + +// Enum of Choice on FlowRSVPMessage +var FlowRSVPMessageChoice = struct { + PATH FlowRSVPMessageChoiceEnum +}{ + PATH: FlowRSVPMessageChoiceEnum("path"), +} + +func (obj *flowRSVPMessage) Choice() FlowRSVPMessageChoiceEnum { + return FlowRSVPMessageChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowRSVPMessage) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPMessage) setChoice(value FlowRSVPMessageChoiceEnum) FlowRSVPMessage { + intValue, ok := otg.FlowRSVPMessage_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPMessageChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPMessage_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Path = nil + obj.pathHolder = nil + + if value == FlowRSVPMessageChoice.PATH { + obj.obj.Path = NewFlowRSVPPathMessage().msg() + } + + return obj +} + +// description is TBD +// Path returns a FlowRSVPPathMessage +func (obj *flowRSVPMessage) Path() FlowRSVPPathMessage { + if obj.obj.Path == nil { + obj.setChoice(FlowRSVPMessageChoice.PATH) + } + if obj.pathHolder == nil { + obj.pathHolder = &flowRSVPPathMessage{obj: obj.obj.Path} + } + return obj.pathHolder +} + +// description is TBD +// Path returns a FlowRSVPPathMessage +func (obj *flowRSVPMessage) HasPath() bool { + return obj.obj.Path != nil +} + +// description is TBD +// SetPath sets the FlowRSVPPathMessage value in the FlowRSVPMessage object +func (obj *flowRSVPMessage) SetPath(value FlowRSVPPathMessage) FlowRSVPMessage { + obj.setChoice(FlowRSVPMessageChoice.PATH) + obj.pathHolder = nil + obj.obj.Path = value.msg() + + return obj +} + +func (obj *flowRSVPMessage) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Path != nil { + + obj.Path().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPMessage) setDefault() { + var choices_set int = 0 + var choice FlowRSVPMessageChoiceEnum + + if obj.obj.Path != nil { + choices_set += 1 + choice = FlowRSVPMessageChoice.PATH + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPMessageChoice.PATH) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPMessage") + } + } else { + intVal := otg.FlowRSVPMessage_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPMessage_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_object_length.go b/gosnappi/flow_rsvp_object_length.go new file mode 100644 index 00000000..09c3be5b --- /dev/null +++ b/gosnappi/flow_rsvp_object_length.go @@ -0,0 +1,423 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPObjectLength ***** +type flowRSVPObjectLength struct { + validation + obj *otg.FlowRSVPObjectLength + marshaller marshalFlowRSVPObjectLength + unMarshaller unMarshalFlowRSVPObjectLength +} + +func NewFlowRSVPObjectLength() FlowRSVPObjectLength { + obj := flowRSVPObjectLength{obj: &otg.FlowRSVPObjectLength{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPObjectLength) msg() *otg.FlowRSVPObjectLength { + return obj.obj +} + +func (obj *flowRSVPObjectLength) setMsg(msg *otg.FlowRSVPObjectLength) FlowRSVPObjectLength { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPObjectLength struct { + obj *flowRSVPObjectLength +} + +type marshalFlowRSVPObjectLength interface { + // ToProto marshals FlowRSVPObjectLength to protobuf object *otg.FlowRSVPObjectLength + ToProto() (*otg.FlowRSVPObjectLength, error) + // ToPbText marshals FlowRSVPObjectLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPObjectLength to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPObjectLength to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPObjectLength struct { + obj *flowRSVPObjectLength +} + +type unMarshalFlowRSVPObjectLength interface { + // FromProto unmarshals FlowRSVPObjectLength from protobuf object *otg.FlowRSVPObjectLength + FromProto(msg *otg.FlowRSVPObjectLength) (FlowRSVPObjectLength, error) + // FromPbText unmarshals FlowRSVPObjectLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPObjectLength from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPObjectLength from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPObjectLength) Marshal() marshalFlowRSVPObjectLength { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPObjectLength{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPObjectLength) Unmarshal() unMarshalFlowRSVPObjectLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPObjectLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPObjectLength) ToProto() (*otg.FlowRSVPObjectLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPObjectLength) FromProto(msg *otg.FlowRSVPObjectLength) (FlowRSVPObjectLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPObjectLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPObjectLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPObjectLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPObjectLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPObjectLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPObjectLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPObjectLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPObjectLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPObjectLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPObjectLength) Clone() (FlowRSVPObjectLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPObjectLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowRSVPObjectLength is description is TBD +type FlowRSVPObjectLength interface { + Validation + // msg marshals FlowRSVPObjectLength to protobuf object *otg.FlowRSVPObjectLength + // and doesn't set defaults + msg() *otg.FlowRSVPObjectLength + // setMsg unmarshals FlowRSVPObjectLength from protobuf object *otg.FlowRSVPObjectLength + // and doesn't set defaults + setMsg(*otg.FlowRSVPObjectLength) FlowRSVPObjectLength + // provides marshal interface + Marshal() marshalFlowRSVPObjectLength + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPObjectLength + // validate validates FlowRSVPObjectLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPObjectLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPObjectLengthChoiceEnum, set in FlowRSVPObjectLength + Choice() FlowRSVPObjectLengthChoiceEnum + // setChoice assigns FlowRSVPObjectLengthChoiceEnum provided by user to FlowRSVPObjectLength + setChoice(value FlowRSVPObjectLengthChoiceEnum) FlowRSVPObjectLength + // HasChoice checks if Choice has been set in FlowRSVPObjectLength + HasChoice() bool + // Auto returns uint32, set in FlowRSVPObjectLength. + Auto() uint32 + // HasAuto checks if Auto has been set in FlowRSVPObjectLength + HasAuto() bool + // Value returns uint32, set in FlowRSVPObjectLength. + Value() uint32 + // SetValue assigns uint32 provided by user to FlowRSVPObjectLength + SetValue(value uint32) FlowRSVPObjectLength + // HasValue checks if Value has been set in FlowRSVPObjectLength + HasValue() bool +} + +type FlowRSVPObjectLengthChoiceEnum string + +// Enum of Choice on FlowRSVPObjectLength +var FlowRSVPObjectLengthChoice = struct { + AUTO FlowRSVPObjectLengthChoiceEnum + VALUE FlowRSVPObjectLengthChoiceEnum +}{ + AUTO: FlowRSVPObjectLengthChoiceEnum("auto"), + VALUE: FlowRSVPObjectLengthChoiceEnum("value"), +} + +func (obj *flowRSVPObjectLength) Choice() FlowRSVPObjectLengthChoiceEnum { + return FlowRSVPObjectLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// auto or configured value. +// Choice returns a string +func (obj *flowRSVPObjectLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPObjectLength) setChoice(value FlowRSVPObjectLengthChoiceEnum) FlowRSVPObjectLength { + intValue, ok := otg.FlowRSVPObjectLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPObjectLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPObjectLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Value = nil + obj.obj.Auto = nil + + if value == FlowRSVPObjectLengthChoice.AUTO { + defaultValue := uint32(4) + obj.obj.Auto = &defaultValue + } + + if value == FlowRSVPObjectLengthChoice.VALUE { + defaultValue := uint32(4) + obj.obj.Value = &defaultValue + } + + return obj +} + +// The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. +// Auto returns a uint32 +func (obj *flowRSVPObjectLength) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(FlowRSVPObjectLengthChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. +// Auto returns a uint32 +func (obj *flowRSVPObjectLength) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Value returns a uint32 +func (obj *flowRSVPObjectLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(FlowRSVPObjectLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *flowRSVPObjectLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the FlowRSVPObjectLength object +func (obj *flowRSVPObjectLength) SetValue(value uint32) FlowRSVPObjectLength { + obj.setChoice(FlowRSVPObjectLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +func (obj *flowRSVPObjectLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value < 4 || *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("4 <= FlowRSVPObjectLength.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + +} + +func (obj *flowRSVPObjectLength) setDefault() { + var choices_set int = 0 + var choice FlowRSVPObjectLengthChoiceEnum + + if obj.obj.Auto != nil { + choices_set += 1 + choice = FlowRSVPObjectLengthChoice.AUTO + } + + if obj.obj.Value != nil { + choices_set += 1 + choice = FlowRSVPObjectLengthChoice.VALUE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPObjectLengthChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPObjectLength") + } + } else { + intVal := otg.FlowRSVPObjectLength_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPObjectLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_path_explicit_route_type1.go b/gosnappi/flow_rsvp_path_explicit_route_type1.go new file mode 100644 index 00000000..40e95ad1 --- /dev/null +++ b/gosnappi/flow_rsvp_path_explicit_route_type1.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathExplicitRouteType1 ***** +type flowRSVPPathExplicitRouteType1 struct { + validation + obj *otg.FlowRSVPPathExplicitRouteType1 + marshaller marshalFlowRSVPPathExplicitRouteType1 + unMarshaller unMarshalFlowRSVPPathExplicitRouteType1 + subobjectsHolder FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter +} + +func NewFlowRSVPPathExplicitRouteType1() FlowRSVPPathExplicitRouteType1 { + obj := flowRSVPPathExplicitRouteType1{obj: &otg.FlowRSVPPathExplicitRouteType1{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathExplicitRouteType1) msg() *otg.FlowRSVPPathExplicitRouteType1 { + return obj.obj +} + +func (obj *flowRSVPPathExplicitRouteType1) setMsg(msg *otg.FlowRSVPPathExplicitRouteType1) FlowRSVPPathExplicitRouteType1 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathExplicitRouteType1 struct { + obj *flowRSVPPathExplicitRouteType1 +} + +type marshalFlowRSVPPathExplicitRouteType1 interface { + // ToProto marshals FlowRSVPPathExplicitRouteType1 to protobuf object *otg.FlowRSVPPathExplicitRouteType1 + ToProto() (*otg.FlowRSVPPathExplicitRouteType1, error) + // ToPbText marshals FlowRSVPPathExplicitRouteType1 to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathExplicitRouteType1 to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathExplicitRouteType1 to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathExplicitRouteType1 struct { + obj *flowRSVPPathExplicitRouteType1 +} + +type unMarshalFlowRSVPPathExplicitRouteType1 interface { + // FromProto unmarshals FlowRSVPPathExplicitRouteType1 from protobuf object *otg.FlowRSVPPathExplicitRouteType1 + FromProto(msg *otg.FlowRSVPPathExplicitRouteType1) (FlowRSVPPathExplicitRouteType1, error) + // FromPbText unmarshals FlowRSVPPathExplicitRouteType1 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathExplicitRouteType1 from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathExplicitRouteType1 from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathExplicitRouteType1) Marshal() marshalFlowRSVPPathExplicitRouteType1 { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathExplicitRouteType1{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathExplicitRouteType1) Unmarshal() unMarshalFlowRSVPPathExplicitRouteType1 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathExplicitRouteType1{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathExplicitRouteType1) ToProto() (*otg.FlowRSVPPathExplicitRouteType1, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathExplicitRouteType1) FromProto(msg *otg.FlowRSVPPathExplicitRouteType1) (FlowRSVPPathExplicitRouteType1, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathExplicitRouteType1) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathExplicitRouteType1) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathExplicitRouteType1) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathExplicitRouteType1) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathExplicitRouteType1) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathExplicitRouteType1) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathExplicitRouteType1) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathExplicitRouteType1) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathExplicitRouteType1) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathExplicitRouteType1) Clone() (FlowRSVPPathExplicitRouteType1, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathExplicitRouteType1() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathExplicitRouteType1) setNil() { + obj.subobjectsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathExplicitRouteType1 is type1 Explicit Route has subobjects. Currently supported subobjects are IPv4 prefix and Autonomous system number. +type FlowRSVPPathExplicitRouteType1 interface { + Validation + // msg marshals FlowRSVPPathExplicitRouteType1 to protobuf object *otg.FlowRSVPPathExplicitRouteType1 + // and doesn't set defaults + msg() *otg.FlowRSVPPathExplicitRouteType1 + // setMsg unmarshals FlowRSVPPathExplicitRouteType1 from protobuf object *otg.FlowRSVPPathExplicitRouteType1 + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathExplicitRouteType1) FlowRSVPPathExplicitRouteType1 + // provides marshal interface + Marshal() marshalFlowRSVPPathExplicitRouteType1 + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathExplicitRouteType1 + // validate validates FlowRSVPPathExplicitRouteType1 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathExplicitRouteType1, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Subobjects returns FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIterIter, set in FlowRSVPPathExplicitRouteType1 + Subobjects() FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter + setNil() +} + +// description is TBD +// Subobjects returns a []FlowRSVPType1ExplicitRouteSubobjects +func (obj *flowRSVPPathExplicitRouteType1) Subobjects() FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter { + if len(obj.obj.Subobjects) == 0 { + obj.obj.Subobjects = []*otg.FlowRSVPType1ExplicitRouteSubobjects{} + } + if obj.subobjectsHolder == nil { + obj.subobjectsHolder = newFlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter(&obj.obj.Subobjects).setMsg(obj) + } + return obj.subobjectsHolder +} + +type flowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter struct { + obj *flowRSVPPathExplicitRouteType1 + flowRSVPType1ExplicitRouteSubobjectsSlice []FlowRSVPType1ExplicitRouteSubobjects + fieldPtr *[]*otg.FlowRSVPType1ExplicitRouteSubobjects +} + +func newFlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter(ptr *[]*otg.FlowRSVPType1ExplicitRouteSubobjects) FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter { + return &flowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter{fieldPtr: ptr} +} + +type FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter interface { + setMsg(*flowRSVPPathExplicitRouteType1) FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter + Items() []FlowRSVPType1ExplicitRouteSubobjects + Add() FlowRSVPType1ExplicitRouteSubobjects + Append(items ...FlowRSVPType1ExplicitRouteSubobjects) FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter + Set(index int, newObj FlowRSVPType1ExplicitRouteSubobjects) FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter + Clear() FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter + clearHolderSlice() FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter + appendHolderSlice(item FlowRSVPType1ExplicitRouteSubobjects) FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter +} + +func (obj *flowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter) setMsg(msg *flowRSVPPathExplicitRouteType1) FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flowRSVPType1ExplicitRouteSubobjects{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *flowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter) Items() []FlowRSVPType1ExplicitRouteSubobjects { + return obj.flowRSVPType1ExplicitRouteSubobjectsSlice +} + +func (obj *flowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter) Add() FlowRSVPType1ExplicitRouteSubobjects { + newObj := &otg.FlowRSVPType1ExplicitRouteSubobjects{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flowRSVPType1ExplicitRouteSubobjects{obj: newObj} + newLibObj.setDefault() + obj.flowRSVPType1ExplicitRouteSubobjectsSlice = append(obj.flowRSVPType1ExplicitRouteSubobjectsSlice, newLibObj) + return newLibObj +} + +func (obj *flowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter) Append(items ...FlowRSVPType1ExplicitRouteSubobjects) FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowRSVPType1ExplicitRouteSubobjectsSlice = append(obj.flowRSVPType1ExplicitRouteSubobjectsSlice, item) + } + return obj +} + +func (obj *flowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter) Set(index int, newObj FlowRSVPType1ExplicitRouteSubobjects) FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowRSVPType1ExplicitRouteSubobjectsSlice[index] = newObj + return obj +} +func (obj *flowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter) Clear() FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.FlowRSVPType1ExplicitRouteSubobjects{} + obj.flowRSVPType1ExplicitRouteSubobjectsSlice = []FlowRSVPType1ExplicitRouteSubobjects{} + } + return obj +} +func (obj *flowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter) clearHolderSlice() FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter { + if len(obj.flowRSVPType1ExplicitRouteSubobjectsSlice) > 0 { + obj.flowRSVPType1ExplicitRouteSubobjectsSlice = []FlowRSVPType1ExplicitRouteSubobjects{} + } + return obj +} +func (obj *flowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter) appendHolderSlice(item FlowRSVPType1ExplicitRouteSubobjects) FlowRSVPPathExplicitRouteType1FlowRSVPType1ExplicitRouteSubobjectsIter { + obj.flowRSVPType1ExplicitRouteSubobjectsSlice = append(obj.flowRSVPType1ExplicitRouteSubobjectsSlice, item) + return obj +} + +func (obj *flowRSVPPathExplicitRouteType1) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Subobjects) != 0 { + + if set_default { + obj.Subobjects().clearHolderSlice() + for _, item := range obj.obj.Subobjects { + obj.Subobjects().appendHolderSlice(&flowRSVPType1ExplicitRouteSubobjects{obj: item}) + } + } + for _, item := range obj.Subobjects().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *flowRSVPPathExplicitRouteType1) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_explicit_route_type1_as_number.go b/gosnappi/flow_rsvp_path_explicit_route_type1_as_number.go new file mode 100644 index 00000000..92b16d05 --- /dev/null +++ b/gosnappi/flow_rsvp_path_explicit_route_type1_as_number.go @@ -0,0 +1,412 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathExplicitRouteType1ASNumber ***** +type flowRSVPPathExplicitRouteType1ASNumber struct { + validation + obj *otg.FlowRSVPPathExplicitRouteType1ASNumber + marshaller marshalFlowRSVPPathExplicitRouteType1ASNumber + unMarshaller unMarshalFlowRSVPPathExplicitRouteType1ASNumber + lBitHolder PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + lengthHolder FlowRSVPExplicitRouteASNumberLength +} + +func NewFlowRSVPPathExplicitRouteType1ASNumber() FlowRSVPPathExplicitRouteType1ASNumber { + obj := flowRSVPPathExplicitRouteType1ASNumber{obj: &otg.FlowRSVPPathExplicitRouteType1ASNumber{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathExplicitRouteType1ASNumber) msg() *otg.FlowRSVPPathExplicitRouteType1ASNumber { + return obj.obj +} + +func (obj *flowRSVPPathExplicitRouteType1ASNumber) setMsg(msg *otg.FlowRSVPPathExplicitRouteType1ASNumber) FlowRSVPPathExplicitRouteType1ASNumber { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathExplicitRouteType1ASNumber struct { + obj *flowRSVPPathExplicitRouteType1ASNumber +} + +type marshalFlowRSVPPathExplicitRouteType1ASNumber interface { + // ToProto marshals FlowRSVPPathExplicitRouteType1ASNumber to protobuf object *otg.FlowRSVPPathExplicitRouteType1ASNumber + ToProto() (*otg.FlowRSVPPathExplicitRouteType1ASNumber, error) + // ToPbText marshals FlowRSVPPathExplicitRouteType1ASNumber to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathExplicitRouteType1ASNumber to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathExplicitRouteType1ASNumber to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathExplicitRouteType1ASNumber struct { + obj *flowRSVPPathExplicitRouteType1ASNumber +} + +type unMarshalFlowRSVPPathExplicitRouteType1ASNumber interface { + // FromProto unmarshals FlowRSVPPathExplicitRouteType1ASNumber from protobuf object *otg.FlowRSVPPathExplicitRouteType1ASNumber + FromProto(msg *otg.FlowRSVPPathExplicitRouteType1ASNumber) (FlowRSVPPathExplicitRouteType1ASNumber, error) + // FromPbText unmarshals FlowRSVPPathExplicitRouteType1ASNumber from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathExplicitRouteType1ASNumber from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathExplicitRouteType1ASNumber from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathExplicitRouteType1ASNumber) Marshal() marshalFlowRSVPPathExplicitRouteType1ASNumber { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathExplicitRouteType1ASNumber{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathExplicitRouteType1ASNumber) Unmarshal() unMarshalFlowRSVPPathExplicitRouteType1ASNumber { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathExplicitRouteType1ASNumber{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathExplicitRouteType1ASNumber) ToProto() (*otg.FlowRSVPPathExplicitRouteType1ASNumber, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathExplicitRouteType1ASNumber) FromProto(msg *otg.FlowRSVPPathExplicitRouteType1ASNumber) (FlowRSVPPathExplicitRouteType1ASNumber, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathExplicitRouteType1ASNumber) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathExplicitRouteType1ASNumber) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathExplicitRouteType1ASNumber) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathExplicitRouteType1ASNumber) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathExplicitRouteType1ASNumber) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathExplicitRouteType1ASNumber) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathExplicitRouteType1ASNumber) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathExplicitRouteType1ASNumber) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathExplicitRouteType1ASNumber) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathExplicitRouteType1ASNumber) Clone() (FlowRSVPPathExplicitRouteType1ASNumber, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathExplicitRouteType1ASNumber() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathExplicitRouteType1ASNumber) setNil() { + obj.lBitHolder = nil + obj.lengthHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathExplicitRouteType1ASNumber is class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Autonomous system number, C-Type: 32 +type FlowRSVPPathExplicitRouteType1ASNumber interface { + Validation + // msg marshals FlowRSVPPathExplicitRouteType1ASNumber to protobuf object *otg.FlowRSVPPathExplicitRouteType1ASNumber + // and doesn't set defaults + msg() *otg.FlowRSVPPathExplicitRouteType1ASNumber + // setMsg unmarshals FlowRSVPPathExplicitRouteType1ASNumber from protobuf object *otg.FlowRSVPPathExplicitRouteType1ASNumber + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathExplicitRouteType1ASNumber) FlowRSVPPathExplicitRouteType1ASNumber + // provides marshal interface + Marshal() marshalFlowRSVPPathExplicitRouteType1ASNumber + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathExplicitRouteType1ASNumber + // validate validates FlowRSVPPathExplicitRouteType1ASNumber + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathExplicitRouteType1ASNumber, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LBit returns PatternFlowRSVPPathExplicitRouteType1ASNumberLBit, set in FlowRSVPPathExplicitRouteType1ASNumber. + // PatternFlowRSVPPathExplicitRouteType1ASNumberLBit is the L bit is an attribute of the subobject. The L bit is set if the subobject represents a loose hop in the explicit route. If the bit is not set, the subobject represents a strict hop in the explicit route. + LBit() PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + // SetLBit assigns PatternFlowRSVPPathExplicitRouteType1ASNumberLBit provided by user to FlowRSVPPathExplicitRouteType1ASNumber. + // PatternFlowRSVPPathExplicitRouteType1ASNumberLBit is the L bit is an attribute of the subobject. The L bit is set if the subobject represents a loose hop in the explicit route. If the bit is not set, the subobject represents a strict hop in the explicit route. + SetLBit(value PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) FlowRSVPPathExplicitRouteType1ASNumber + // HasLBit checks if LBit has been set in FlowRSVPPathExplicitRouteType1ASNumber + HasLBit() bool + // Length returns FlowRSVPExplicitRouteASNumberLength, set in FlowRSVPPathExplicitRouteType1ASNumber. + // FlowRSVPExplicitRouteASNumberLength is description is TBD + Length() FlowRSVPExplicitRouteASNumberLength + // SetLength assigns FlowRSVPExplicitRouteASNumberLength provided by user to FlowRSVPPathExplicitRouteType1ASNumber. + // FlowRSVPExplicitRouteASNumberLength is description is TBD + SetLength(value FlowRSVPExplicitRouteASNumberLength) FlowRSVPPathExplicitRouteType1ASNumber + // HasLength checks if Length has been set in FlowRSVPPathExplicitRouteType1ASNumber + HasLength() bool + // AsNumber returns uint32, set in FlowRSVPPathExplicitRouteType1ASNumber. + AsNumber() uint32 + // SetAsNumber assigns uint32 provided by user to FlowRSVPPathExplicitRouteType1ASNumber + SetAsNumber(value uint32) FlowRSVPPathExplicitRouteType1ASNumber + // HasAsNumber checks if AsNumber has been set in FlowRSVPPathExplicitRouteType1ASNumber + HasAsNumber() bool + setNil() +} + +// description is TBD +// LBit returns a PatternFlowRSVPPathExplicitRouteType1ASNumberLBit +func (obj *flowRSVPPathExplicitRouteType1ASNumber) LBit() PatternFlowRSVPPathExplicitRouteType1ASNumberLBit { + if obj.obj.LBit == nil { + obj.obj.LBit = NewPatternFlowRSVPPathExplicitRouteType1ASNumberLBit().msg() + } + if obj.lBitHolder == nil { + obj.lBitHolder = &patternFlowRSVPPathExplicitRouteType1ASNumberLBit{obj: obj.obj.LBit} + } + return obj.lBitHolder +} + +// description is TBD +// LBit returns a PatternFlowRSVPPathExplicitRouteType1ASNumberLBit +func (obj *flowRSVPPathExplicitRouteType1ASNumber) HasLBit() bool { + return obj.obj.LBit != nil +} + +// description is TBD +// SetLBit sets the PatternFlowRSVPPathExplicitRouteType1ASNumberLBit value in the FlowRSVPPathExplicitRouteType1ASNumber object +func (obj *flowRSVPPathExplicitRouteType1ASNumber) SetLBit(value PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) FlowRSVPPathExplicitRouteType1ASNumber { + + obj.lBitHolder = nil + obj.obj.LBit = value.msg() + + return obj +} + +// The Length contains the total length of the subobject in bytes,including L, Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. +// Length returns a FlowRSVPExplicitRouteASNumberLength +func (obj *flowRSVPPathExplicitRouteType1ASNumber) Length() FlowRSVPExplicitRouteASNumberLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowRSVPExplicitRouteASNumberLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowRSVPExplicitRouteASNumberLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// The Length contains the total length of the subobject in bytes,including L, Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. +// Length returns a FlowRSVPExplicitRouteASNumberLength +func (obj *flowRSVPPathExplicitRouteType1ASNumber) HasLength() bool { + return obj.obj.Length != nil +} + +// The Length contains the total length of the subobject in bytes,including L, Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. +// SetLength sets the FlowRSVPExplicitRouteASNumberLength value in the FlowRSVPPathExplicitRouteType1ASNumber object +func (obj *flowRSVPPathExplicitRouteType1ASNumber) SetLength(value FlowRSVPExplicitRouteASNumberLength) FlowRSVPPathExplicitRouteType1ASNumber { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// Autonomous System number to be set in the ERO sub-object that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'as_number'. +// AsNumber returns a uint32 +func (obj *flowRSVPPathExplicitRouteType1ASNumber) AsNumber() uint32 { + + return *obj.obj.AsNumber + +} + +// Autonomous System number to be set in the ERO sub-object that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'as_number'. +// AsNumber returns a uint32 +func (obj *flowRSVPPathExplicitRouteType1ASNumber) HasAsNumber() bool { + return obj.obj.AsNumber != nil +} + +// Autonomous System number to be set in the ERO sub-object that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'as_number'. +// SetAsNumber sets the uint32 value in the FlowRSVPPathExplicitRouteType1ASNumber object +func (obj *flowRSVPPathExplicitRouteType1ASNumber) SetAsNumber(value uint32) FlowRSVPPathExplicitRouteType1ASNumber { + + obj.obj.AsNumber = &value + return obj +} + +func (obj *flowRSVPPathExplicitRouteType1ASNumber) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.LBit != nil { + + obj.LBit().validateObj(vObj, set_default) + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.AsNumber != nil { + + if *obj.obj.AsNumber > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowRSVPPathExplicitRouteType1ASNumber.AsNumber <= 65535 but Got %d", *obj.obj.AsNumber)) + } + + } + +} + +func (obj *flowRSVPPathExplicitRouteType1ASNumber) setDefault() { + if obj.obj.AsNumber == nil { + obj.SetAsNumber(0) + } + +} diff --git a/gosnappi/flow_rsvp_path_explicit_route_type1_ipv4_prefix.go b/gosnappi/flow_rsvp_path_explicit_route_type1_ipv4_prefix.go new file mode 100644 index 00000000..365d287d --- /dev/null +++ b/gosnappi/flow_rsvp_path_explicit_route_type1_ipv4_prefix.go @@ -0,0 +1,455 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathExplicitRouteType1Ipv4Prefix ***** +type flowRSVPPathExplicitRouteType1Ipv4Prefix struct { + validation + obj *otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix + marshaller marshalFlowRSVPPathExplicitRouteType1Ipv4Prefix + unMarshaller unMarshalFlowRSVPPathExplicitRouteType1Ipv4Prefix + lBitHolder PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + lengthHolder FlowRSVPExplicitRouteLength + ipv4AddressHolder PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address +} + +func NewFlowRSVPPathExplicitRouteType1Ipv4Prefix() FlowRSVPPathExplicitRouteType1Ipv4Prefix { + obj := flowRSVPPathExplicitRouteType1Ipv4Prefix{obj: &otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) msg() *otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix { + return obj.obj +} + +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) setMsg(msg *otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix) FlowRSVPPathExplicitRouteType1Ipv4Prefix { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathExplicitRouteType1Ipv4Prefix struct { + obj *flowRSVPPathExplicitRouteType1Ipv4Prefix +} + +type marshalFlowRSVPPathExplicitRouteType1Ipv4Prefix interface { + // ToProto marshals FlowRSVPPathExplicitRouteType1Ipv4Prefix to protobuf object *otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix + ToProto() (*otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix, error) + // ToPbText marshals FlowRSVPPathExplicitRouteType1Ipv4Prefix to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathExplicitRouteType1Ipv4Prefix to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathExplicitRouteType1Ipv4Prefix to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathExplicitRouteType1Ipv4Prefix struct { + obj *flowRSVPPathExplicitRouteType1Ipv4Prefix +} + +type unMarshalFlowRSVPPathExplicitRouteType1Ipv4Prefix interface { + // FromProto unmarshals FlowRSVPPathExplicitRouteType1Ipv4Prefix from protobuf object *otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix + FromProto(msg *otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix) (FlowRSVPPathExplicitRouteType1Ipv4Prefix, error) + // FromPbText unmarshals FlowRSVPPathExplicitRouteType1Ipv4Prefix from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathExplicitRouteType1Ipv4Prefix from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathExplicitRouteType1Ipv4Prefix from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) Marshal() marshalFlowRSVPPathExplicitRouteType1Ipv4Prefix { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathExplicitRouteType1Ipv4Prefix{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) Unmarshal() unMarshalFlowRSVPPathExplicitRouteType1Ipv4Prefix { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathExplicitRouteType1Ipv4Prefix{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathExplicitRouteType1Ipv4Prefix) ToProto() (*otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathExplicitRouteType1Ipv4Prefix) FromProto(msg *otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix) (FlowRSVPPathExplicitRouteType1Ipv4Prefix, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathExplicitRouteType1Ipv4Prefix) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathExplicitRouteType1Ipv4Prefix) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathExplicitRouteType1Ipv4Prefix) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathExplicitRouteType1Ipv4Prefix) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathExplicitRouteType1Ipv4Prefix) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathExplicitRouteType1Ipv4Prefix) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) Clone() (FlowRSVPPathExplicitRouteType1Ipv4Prefix, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathExplicitRouteType1Ipv4Prefix() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) setNil() { + obj.lBitHolder = nil + obj.lengthHolder = nil + obj.ipv4AddressHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathExplicitRouteType1Ipv4Prefix is class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Prefix, C-Type: 1 +type FlowRSVPPathExplicitRouteType1Ipv4Prefix interface { + Validation + // msg marshals FlowRSVPPathExplicitRouteType1Ipv4Prefix to protobuf object *otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix + // and doesn't set defaults + msg() *otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix + // setMsg unmarshals FlowRSVPPathExplicitRouteType1Ipv4Prefix from protobuf object *otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix) FlowRSVPPathExplicitRouteType1Ipv4Prefix + // provides marshal interface + Marshal() marshalFlowRSVPPathExplicitRouteType1Ipv4Prefix + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathExplicitRouteType1Ipv4Prefix + // validate validates FlowRSVPPathExplicitRouteType1Ipv4Prefix + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathExplicitRouteType1Ipv4Prefix, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LBit returns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit, set in FlowRSVPPathExplicitRouteType1Ipv4Prefix. + // PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit is the L bit is an attribute of the subobject. The L bit is set if the subobject represents a loose hop in the explicit route. If the bit is not set, the subobject represents a strict hop in the explicit route. + LBit() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + // SetLBit assigns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit provided by user to FlowRSVPPathExplicitRouteType1Ipv4Prefix. + // PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit is the L bit is an attribute of the subobject. The L bit is set if the subobject represents a loose hop in the explicit route. If the bit is not set, the subobject represents a strict hop in the explicit route. + SetLBit(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) FlowRSVPPathExplicitRouteType1Ipv4Prefix + // HasLBit checks if LBit has been set in FlowRSVPPathExplicitRouteType1Ipv4Prefix + HasLBit() bool + // Length returns FlowRSVPExplicitRouteLength, set in FlowRSVPPathExplicitRouteType1Ipv4Prefix. + // FlowRSVPExplicitRouteLength is description is TBD + Length() FlowRSVPExplicitRouteLength + // SetLength assigns FlowRSVPExplicitRouteLength provided by user to FlowRSVPPathExplicitRouteType1Ipv4Prefix. + // FlowRSVPExplicitRouteLength is description is TBD + SetLength(value FlowRSVPExplicitRouteLength) FlowRSVPPathExplicitRouteType1Ipv4Prefix + // HasLength checks if Length has been set in FlowRSVPPathExplicitRouteType1Ipv4Prefix + HasLength() bool + // Ipv4Address returns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address, set in FlowRSVPPathExplicitRouteType1Ipv4Prefix. + // PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address is this IPv4 address is treated as a prefix based on the prefix length value below. Bits beyond the prefix are ignored on receipt and SHOULD be set to zero on transmission. + Ipv4Address() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + // SetIpv4Address assigns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address provided by user to FlowRSVPPathExplicitRouteType1Ipv4Prefix. + // PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address is this IPv4 address is treated as a prefix based on the prefix length value below. Bits beyond the prefix are ignored on receipt and SHOULD be set to zero on transmission. + SetIpv4Address(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) FlowRSVPPathExplicitRouteType1Ipv4Prefix + // HasIpv4Address checks if Ipv4Address has been set in FlowRSVPPathExplicitRouteType1Ipv4Prefix + HasIpv4Address() bool + // Prefix returns uint32, set in FlowRSVPPathExplicitRouteType1Ipv4Prefix. + Prefix() uint32 + // SetPrefix assigns uint32 provided by user to FlowRSVPPathExplicitRouteType1Ipv4Prefix + SetPrefix(value uint32) FlowRSVPPathExplicitRouteType1Ipv4Prefix + // HasPrefix checks if Prefix has been set in FlowRSVPPathExplicitRouteType1Ipv4Prefix + HasPrefix() bool + setNil() +} + +// description is TBD +// LBit returns a PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) LBit() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit { + if obj.obj.LBit == nil { + obj.obj.LBit = NewPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit().msg() + } + if obj.lBitHolder == nil { + obj.lBitHolder = &patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit{obj: obj.obj.LBit} + } + return obj.lBitHolder +} + +// description is TBD +// LBit returns a PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) HasLBit() bool { + return obj.obj.LBit != nil +} + +// description is TBD +// SetLBit sets the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit value in the FlowRSVPPathExplicitRouteType1Ipv4Prefix object +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) SetLBit(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) FlowRSVPPathExplicitRouteType1Ipv4Prefix { + + obj.lBitHolder = nil + obj.obj.LBit = value.msg() + + return obj +} + +// The Length contains the total length of the subobject in bytes,including L,Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. +// Length returns a FlowRSVPExplicitRouteLength +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) Length() FlowRSVPExplicitRouteLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowRSVPExplicitRouteLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowRSVPExplicitRouteLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// The Length contains the total length of the subobject in bytes,including L,Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. +// Length returns a FlowRSVPExplicitRouteLength +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) HasLength() bool { + return obj.obj.Length != nil +} + +// The Length contains the total length of the subobject in bytes,including L,Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. +// SetLength sets the FlowRSVPExplicitRouteLength value in the FlowRSVPPathExplicitRouteType1Ipv4Prefix object +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) SetLength(value FlowRSVPExplicitRouteLength) FlowRSVPPathExplicitRouteType1Ipv4Prefix { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// description is TBD +// Ipv4Address returns a PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) Ipv4Address() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address { + if obj.obj.Ipv4Address == nil { + obj.obj.Ipv4Address = NewPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address().msg() + } + if obj.ipv4AddressHolder == nil { + obj.ipv4AddressHolder = &patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address{obj: obj.obj.Ipv4Address} + } + return obj.ipv4AddressHolder +} + +// description is TBD +// Ipv4Address returns a PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) HasIpv4Address() bool { + return obj.obj.Ipv4Address != nil +} + +// description is TBD +// SetIpv4Address sets the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address value in the FlowRSVPPathExplicitRouteType1Ipv4Prefix object +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) SetIpv4Address(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) FlowRSVPPathExplicitRouteType1Ipv4Prefix { + + obj.ipv4AddressHolder = nil + obj.obj.Ipv4Address = value.msg() + + return obj +} + +// The prefix length of the IPv4 address. +// Prefix returns a uint32 +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) Prefix() uint32 { + + return *obj.obj.Prefix + +} + +// The prefix length of the IPv4 address. +// Prefix returns a uint32 +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) HasPrefix() bool { + return obj.obj.Prefix != nil +} + +// The prefix length of the IPv4 address. +// SetPrefix sets the uint32 value in the FlowRSVPPathExplicitRouteType1Ipv4Prefix object +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) SetPrefix(value uint32) FlowRSVPPathExplicitRouteType1Ipv4Prefix { + + obj.obj.Prefix = &value + return obj +} + +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.LBit != nil { + + obj.LBit().validateObj(vObj, set_default) + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.Ipv4Address != nil { + + obj.Ipv4Address().validateObj(vObj, set_default) + } + + if obj.obj.Prefix != nil { + + if *obj.obj.Prefix < 1 || *obj.obj.Prefix > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= FlowRSVPPathExplicitRouteType1Ipv4Prefix.Prefix <= 32 but Got %d", *obj.obj.Prefix)) + } + + } + +} + +func (obj *flowRSVPPathExplicitRouteType1Ipv4Prefix) setDefault() { + if obj.obj.Prefix == nil { + obj.SetPrefix(32) + } + +} diff --git a/gosnappi/flow_rsvp_path_label_request_without_label_range.go b/gosnappi/flow_rsvp_path_label_request_without_label_range.go new file mode 100644 index 00000000..84a34dfa --- /dev/null +++ b/gosnappi/flow_rsvp_path_label_request_without_label_range.go @@ -0,0 +1,369 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathLabelRequestWithoutLabelRange ***** +type flowRSVPPathLabelRequestWithoutLabelRange struct { + validation + obj *otg.FlowRSVPPathLabelRequestWithoutLabelRange + marshaller marshalFlowRSVPPathLabelRequestWithoutLabelRange + unMarshaller unMarshalFlowRSVPPathLabelRequestWithoutLabelRange + reservedHolder PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + l3PidHolder PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid +} + +func NewFlowRSVPPathLabelRequestWithoutLabelRange() FlowRSVPPathLabelRequestWithoutLabelRange { + obj := flowRSVPPathLabelRequestWithoutLabelRange{obj: &otg.FlowRSVPPathLabelRequestWithoutLabelRange{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) msg() *otg.FlowRSVPPathLabelRequestWithoutLabelRange { + return obj.obj +} + +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) setMsg(msg *otg.FlowRSVPPathLabelRequestWithoutLabelRange) FlowRSVPPathLabelRequestWithoutLabelRange { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathLabelRequestWithoutLabelRange struct { + obj *flowRSVPPathLabelRequestWithoutLabelRange +} + +type marshalFlowRSVPPathLabelRequestWithoutLabelRange interface { + // ToProto marshals FlowRSVPPathLabelRequestWithoutLabelRange to protobuf object *otg.FlowRSVPPathLabelRequestWithoutLabelRange + ToProto() (*otg.FlowRSVPPathLabelRequestWithoutLabelRange, error) + // ToPbText marshals FlowRSVPPathLabelRequestWithoutLabelRange to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathLabelRequestWithoutLabelRange to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathLabelRequestWithoutLabelRange to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathLabelRequestWithoutLabelRange struct { + obj *flowRSVPPathLabelRequestWithoutLabelRange +} + +type unMarshalFlowRSVPPathLabelRequestWithoutLabelRange interface { + // FromProto unmarshals FlowRSVPPathLabelRequestWithoutLabelRange from protobuf object *otg.FlowRSVPPathLabelRequestWithoutLabelRange + FromProto(msg *otg.FlowRSVPPathLabelRequestWithoutLabelRange) (FlowRSVPPathLabelRequestWithoutLabelRange, error) + // FromPbText unmarshals FlowRSVPPathLabelRequestWithoutLabelRange from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathLabelRequestWithoutLabelRange from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathLabelRequestWithoutLabelRange from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) Marshal() marshalFlowRSVPPathLabelRequestWithoutLabelRange { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathLabelRequestWithoutLabelRange{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) Unmarshal() unMarshalFlowRSVPPathLabelRequestWithoutLabelRange { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathLabelRequestWithoutLabelRange{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathLabelRequestWithoutLabelRange) ToProto() (*otg.FlowRSVPPathLabelRequestWithoutLabelRange, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathLabelRequestWithoutLabelRange) FromProto(msg *otg.FlowRSVPPathLabelRequestWithoutLabelRange) (FlowRSVPPathLabelRequestWithoutLabelRange, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathLabelRequestWithoutLabelRange) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathLabelRequestWithoutLabelRange) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathLabelRequestWithoutLabelRange) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathLabelRequestWithoutLabelRange) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathLabelRequestWithoutLabelRange) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathLabelRequestWithoutLabelRange) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) Clone() (FlowRSVPPathLabelRequestWithoutLabelRange, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathLabelRequestWithoutLabelRange() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) setNil() { + obj.reservedHolder = nil + obj.l3PidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathLabelRequestWithoutLabelRange is class = LABEL_REQUEST, Without Label Range C-Type = 1 +type FlowRSVPPathLabelRequestWithoutLabelRange interface { + Validation + // msg marshals FlowRSVPPathLabelRequestWithoutLabelRange to protobuf object *otg.FlowRSVPPathLabelRequestWithoutLabelRange + // and doesn't set defaults + msg() *otg.FlowRSVPPathLabelRequestWithoutLabelRange + // setMsg unmarshals FlowRSVPPathLabelRequestWithoutLabelRange from protobuf object *otg.FlowRSVPPathLabelRequestWithoutLabelRange + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathLabelRequestWithoutLabelRange) FlowRSVPPathLabelRequestWithoutLabelRange + // provides marshal interface + Marshal() marshalFlowRSVPPathLabelRequestWithoutLabelRange + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathLabelRequestWithoutLabelRange + // validate validates FlowRSVPPathLabelRequestWithoutLabelRange + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathLabelRequestWithoutLabelRange, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Reserved returns PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved, set in FlowRSVPPathLabelRequestWithoutLabelRange. + // PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved is this field is reserved. It MUST be set to zero on transmission and MUST be ignored on receipt. + Reserved() PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + // SetReserved assigns PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved provided by user to FlowRSVPPathLabelRequestWithoutLabelRange. + // PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved is this field is reserved. It MUST be set to zero on transmission and MUST be ignored on receipt. + SetReserved(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) FlowRSVPPathLabelRequestWithoutLabelRange + // HasReserved checks if Reserved has been set in FlowRSVPPathLabelRequestWithoutLabelRange + HasReserved() bool + // L3Pid returns PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid, set in FlowRSVPPathLabelRequestWithoutLabelRange. + L3Pid() PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + // SetL3Pid assigns PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid provided by user to FlowRSVPPathLabelRequestWithoutLabelRange. + SetL3Pid(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) FlowRSVPPathLabelRequestWithoutLabelRange + // HasL3Pid checks if L3Pid has been set in FlowRSVPPathLabelRequestWithoutLabelRange + HasL3Pid() bool + setNil() +} + +// description is TBD +// Reserved returns a PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) Reserved() PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved { + if obj.obj.Reserved == nil { + obj.obj.Reserved = NewPatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved().msg() + } + if obj.reservedHolder == nil { + obj.reservedHolder = &patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved{obj: obj.obj.Reserved} + } + return obj.reservedHolder +} + +// description is TBD +// Reserved returns a PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) HasReserved() bool { + return obj.obj.Reserved != nil +} + +// description is TBD +// SetReserved sets the PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved value in the FlowRSVPPathLabelRequestWithoutLabelRange object +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) SetReserved(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) FlowRSVPPathLabelRequestWithoutLabelRange { + + obj.reservedHolder = nil + obj.obj.Reserved = value.msg() + + return obj +} + +// description is TBD +// L3Pid returns a PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) L3Pid() PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid { + if obj.obj.L3Pid == nil { + obj.obj.L3Pid = NewPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid().msg() + } + if obj.l3PidHolder == nil { + obj.l3PidHolder = &patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid{obj: obj.obj.L3Pid} + } + return obj.l3PidHolder +} + +// description is TBD +// L3Pid returns a PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) HasL3Pid() bool { + return obj.obj.L3Pid != nil +} + +// description is TBD +// SetL3Pid sets the PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid value in the FlowRSVPPathLabelRequestWithoutLabelRange object +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) SetL3Pid(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) FlowRSVPPathLabelRequestWithoutLabelRange { + + obj.l3PidHolder = nil + obj.obj.L3Pid = value.msg() + + return obj +} + +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Reserved != nil { + + obj.Reserved().validateObj(vObj, set_default) + } + + if obj.obj.L3Pid != nil { + + obj.L3Pid().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathLabelRequestWithoutLabelRange) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_message.go b/gosnappi/flow_rsvp_path_message.go new file mode 100644 index 00000000..11509ca6 --- /dev/null +++ b/gosnappi/flow_rsvp_path_message.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathMessage ***** +type flowRSVPPathMessage struct { + validation + obj *otg.FlowRSVPPathMessage + marshaller marshalFlowRSVPPathMessage + unMarshaller unMarshalFlowRSVPPathMessage + objectsHolder FlowRSVPPathMessageFlowRSVPPathObjectsIter +} + +func NewFlowRSVPPathMessage() FlowRSVPPathMessage { + obj := flowRSVPPathMessage{obj: &otg.FlowRSVPPathMessage{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathMessage) msg() *otg.FlowRSVPPathMessage { + return obj.obj +} + +func (obj *flowRSVPPathMessage) setMsg(msg *otg.FlowRSVPPathMessage) FlowRSVPPathMessage { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathMessage struct { + obj *flowRSVPPathMessage +} + +type marshalFlowRSVPPathMessage interface { + // ToProto marshals FlowRSVPPathMessage to protobuf object *otg.FlowRSVPPathMessage + ToProto() (*otg.FlowRSVPPathMessage, error) + // ToPbText marshals FlowRSVPPathMessage to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathMessage to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathMessage to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathMessage struct { + obj *flowRSVPPathMessage +} + +type unMarshalFlowRSVPPathMessage interface { + // FromProto unmarshals FlowRSVPPathMessage from protobuf object *otg.FlowRSVPPathMessage + FromProto(msg *otg.FlowRSVPPathMessage) (FlowRSVPPathMessage, error) + // FromPbText unmarshals FlowRSVPPathMessage from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathMessage from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathMessage from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathMessage) Marshal() marshalFlowRSVPPathMessage { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathMessage{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathMessage) Unmarshal() unMarshalFlowRSVPPathMessage { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathMessage{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathMessage) ToProto() (*otg.FlowRSVPPathMessage, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathMessage) FromProto(msg *otg.FlowRSVPPathMessage) (FlowRSVPPathMessage, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathMessage) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathMessage) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathMessage) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathMessage) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathMessage) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathMessage) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathMessage) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathMessage) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathMessage) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathMessage) Clone() (FlowRSVPPathMessage, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathMessage() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathMessage) setNil() { + obj.objectsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathMessage is "Path" message requires the following list of objects in order as defined in https://www.rfc-editor.org/rfc/rfc3209.html#page-15: 1. SESSION 2. RSVP_HOP 3. TIME_VALUES 4. EXPLICIT_ROUTE [optional] 5. LABEL_REQUEST 6. SESSION_ATTRIBUTE [optional] 7. SENDER_TEMPLATE 8. SENDER_TSPEC 9. RECORD_ROUTE [optional] +type FlowRSVPPathMessage interface { + Validation + // msg marshals FlowRSVPPathMessage to protobuf object *otg.FlowRSVPPathMessage + // and doesn't set defaults + msg() *otg.FlowRSVPPathMessage + // setMsg unmarshals FlowRSVPPathMessage from protobuf object *otg.FlowRSVPPathMessage + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathMessage) FlowRSVPPathMessage + // provides marshal interface + Marshal() marshalFlowRSVPPathMessage + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathMessage + // validate validates FlowRSVPPathMessage + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathMessage, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Objects returns FlowRSVPPathMessageFlowRSVPPathObjectsIterIter, set in FlowRSVPPathMessage + Objects() FlowRSVPPathMessageFlowRSVPPathObjectsIter + setNil() +} + +// "Path" message requires atleast SESSION, RSVP_HOP, TIME_VALUES, LABEL_REQUEST, SENDER_TEMPLATE and SENDER_TSPEC objects in order. +// Objects returns a []FlowRSVPPathObjects +func (obj *flowRSVPPathMessage) Objects() FlowRSVPPathMessageFlowRSVPPathObjectsIter { + if len(obj.obj.Objects) == 0 { + obj.obj.Objects = []*otg.FlowRSVPPathObjects{} + } + if obj.objectsHolder == nil { + obj.objectsHolder = newFlowRSVPPathMessageFlowRSVPPathObjectsIter(&obj.obj.Objects).setMsg(obj) + } + return obj.objectsHolder +} + +type flowRSVPPathMessageFlowRSVPPathObjectsIter struct { + obj *flowRSVPPathMessage + flowRSVPPathObjectsSlice []FlowRSVPPathObjects + fieldPtr *[]*otg.FlowRSVPPathObjects +} + +func newFlowRSVPPathMessageFlowRSVPPathObjectsIter(ptr *[]*otg.FlowRSVPPathObjects) FlowRSVPPathMessageFlowRSVPPathObjectsIter { + return &flowRSVPPathMessageFlowRSVPPathObjectsIter{fieldPtr: ptr} +} + +type FlowRSVPPathMessageFlowRSVPPathObjectsIter interface { + setMsg(*flowRSVPPathMessage) FlowRSVPPathMessageFlowRSVPPathObjectsIter + Items() []FlowRSVPPathObjects + Add() FlowRSVPPathObjects + Append(items ...FlowRSVPPathObjects) FlowRSVPPathMessageFlowRSVPPathObjectsIter + Set(index int, newObj FlowRSVPPathObjects) FlowRSVPPathMessageFlowRSVPPathObjectsIter + Clear() FlowRSVPPathMessageFlowRSVPPathObjectsIter + clearHolderSlice() FlowRSVPPathMessageFlowRSVPPathObjectsIter + appendHolderSlice(item FlowRSVPPathObjects) FlowRSVPPathMessageFlowRSVPPathObjectsIter +} + +func (obj *flowRSVPPathMessageFlowRSVPPathObjectsIter) setMsg(msg *flowRSVPPathMessage) FlowRSVPPathMessageFlowRSVPPathObjectsIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flowRSVPPathObjects{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *flowRSVPPathMessageFlowRSVPPathObjectsIter) Items() []FlowRSVPPathObjects { + return obj.flowRSVPPathObjectsSlice +} + +func (obj *flowRSVPPathMessageFlowRSVPPathObjectsIter) Add() FlowRSVPPathObjects { + newObj := &otg.FlowRSVPPathObjects{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flowRSVPPathObjects{obj: newObj} + newLibObj.setDefault() + obj.flowRSVPPathObjectsSlice = append(obj.flowRSVPPathObjectsSlice, newLibObj) + return newLibObj +} + +func (obj *flowRSVPPathMessageFlowRSVPPathObjectsIter) Append(items ...FlowRSVPPathObjects) FlowRSVPPathMessageFlowRSVPPathObjectsIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowRSVPPathObjectsSlice = append(obj.flowRSVPPathObjectsSlice, item) + } + return obj +} + +func (obj *flowRSVPPathMessageFlowRSVPPathObjectsIter) Set(index int, newObj FlowRSVPPathObjects) FlowRSVPPathMessageFlowRSVPPathObjectsIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowRSVPPathObjectsSlice[index] = newObj + return obj +} +func (obj *flowRSVPPathMessageFlowRSVPPathObjectsIter) Clear() FlowRSVPPathMessageFlowRSVPPathObjectsIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.FlowRSVPPathObjects{} + obj.flowRSVPPathObjectsSlice = []FlowRSVPPathObjects{} + } + return obj +} +func (obj *flowRSVPPathMessageFlowRSVPPathObjectsIter) clearHolderSlice() FlowRSVPPathMessageFlowRSVPPathObjectsIter { + if len(obj.flowRSVPPathObjectsSlice) > 0 { + obj.flowRSVPPathObjectsSlice = []FlowRSVPPathObjects{} + } + return obj +} +func (obj *flowRSVPPathMessageFlowRSVPPathObjectsIter) appendHolderSlice(item FlowRSVPPathObjects) FlowRSVPPathMessageFlowRSVPPathObjectsIter { + obj.flowRSVPPathObjectsSlice = append(obj.flowRSVPPathObjectsSlice, item) + return obj +} + +func (obj *flowRSVPPathMessage) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Objects) != 0 { + + if set_default { + obj.Objects().clearHolderSlice() + for _, item := range obj.obj.Objects { + obj.Objects().appendHolderSlice(&flowRSVPPathObjects{obj: item}) + } + } + for _, item := range obj.Objects().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *flowRSVPPathMessage) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_objects.go b/gosnappi/flow_rsvp_path_objects.go new file mode 100644 index 00000000..f77ebd84 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjects ***** +type flowRSVPPathObjects struct { + validation + obj *otg.FlowRSVPPathObjects + marshaller marshalFlowRSVPPathObjects + unMarshaller unMarshalFlowRSVPPathObjects + classNumHolder FlowRSVPPathObjectsClass +} + +func NewFlowRSVPPathObjects() FlowRSVPPathObjects { + obj := flowRSVPPathObjects{obj: &otg.FlowRSVPPathObjects{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjects) msg() *otg.FlowRSVPPathObjects { + return obj.obj +} + +func (obj *flowRSVPPathObjects) setMsg(msg *otg.FlowRSVPPathObjects) FlowRSVPPathObjects { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjects struct { + obj *flowRSVPPathObjects +} + +type marshalFlowRSVPPathObjects interface { + // ToProto marshals FlowRSVPPathObjects to protobuf object *otg.FlowRSVPPathObjects + ToProto() (*otg.FlowRSVPPathObjects, error) + // ToPbText marshals FlowRSVPPathObjects to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjects to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjects to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjects struct { + obj *flowRSVPPathObjects +} + +type unMarshalFlowRSVPPathObjects interface { + // FromProto unmarshals FlowRSVPPathObjects from protobuf object *otg.FlowRSVPPathObjects + FromProto(msg *otg.FlowRSVPPathObjects) (FlowRSVPPathObjects, error) + // FromPbText unmarshals FlowRSVPPathObjects from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjects from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjects from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjects) Marshal() marshalFlowRSVPPathObjects { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjects{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjects) Unmarshal() unMarshalFlowRSVPPathObjects { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjects{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjects) ToProto() (*otg.FlowRSVPPathObjects, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjects) FromProto(msg *otg.FlowRSVPPathObjects) (FlowRSVPPathObjects, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjects) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjects) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjects) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjects) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjects) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjects) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjects) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjects) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjects) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjects) Clone() (FlowRSVPPathObjects, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjects() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjects) setNil() { + obj.classNumHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjects is every RSVP object encapsulated in an RSVP message consists of a 32-bit word header and the object's contents. +type FlowRSVPPathObjects interface { + Validation + // msg marshals FlowRSVPPathObjects to protobuf object *otg.FlowRSVPPathObjects + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjects + // setMsg unmarshals FlowRSVPPathObjects from protobuf object *otg.FlowRSVPPathObjects + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjects) FlowRSVPPathObjects + // provides marshal interface + Marshal() marshalFlowRSVPPathObjects + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjects + // validate validates FlowRSVPPathObjects + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjects, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ClassNum returns FlowRSVPPathObjectsClass, set in FlowRSVPPathObjects. + // FlowRSVPPathObjectsClass is the class number is used to identify the class of an object. Defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-4 . Curently supported class numbers are for "Path" message type. "Path" message: Supported Class numbers and it's value: SESSION: 1, RSVP_HOP: 3, TIME_VALUES: 5, EXPLICIT_ROUTE: 20, LABEL_REQUEST: 19, SESSION_ATTRIBUTE: 207, SENDER_TEMPLATE: 11, SENDER_TSPEC: 12, RECORD_ROUTE: 21, Custom: User defined bytes based on class and c-types not supported in above options. + ClassNum() FlowRSVPPathObjectsClass + // SetClassNum assigns FlowRSVPPathObjectsClass provided by user to FlowRSVPPathObjects. + // FlowRSVPPathObjectsClass is the class number is used to identify the class of an object. Defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-4 . Curently supported class numbers are for "Path" message type. "Path" message: Supported Class numbers and it's value: SESSION: 1, RSVP_HOP: 3, TIME_VALUES: 5, EXPLICIT_ROUTE: 20, LABEL_REQUEST: 19, SESSION_ATTRIBUTE: 207, SENDER_TEMPLATE: 11, SENDER_TSPEC: 12, RECORD_ROUTE: 21, Custom: User defined bytes based on class and c-types not supported in above options. + SetClassNum(value FlowRSVPPathObjectsClass) FlowRSVPPathObjects + // HasClassNum checks if ClassNum has been set in FlowRSVPPathObjects + HasClassNum() bool + setNil() +} + +// description is TBD +// ClassNum returns a FlowRSVPPathObjectsClass +func (obj *flowRSVPPathObjects) ClassNum() FlowRSVPPathObjectsClass { + if obj.obj.ClassNum == nil { + obj.obj.ClassNum = NewFlowRSVPPathObjectsClass().msg() + } + if obj.classNumHolder == nil { + obj.classNumHolder = &flowRSVPPathObjectsClass{obj: obj.obj.ClassNum} + } + return obj.classNumHolder +} + +// description is TBD +// ClassNum returns a FlowRSVPPathObjectsClass +func (obj *flowRSVPPathObjects) HasClassNum() bool { + return obj.obj.ClassNum != nil +} + +// description is TBD +// SetClassNum sets the FlowRSVPPathObjectsClass value in the FlowRSVPPathObjects object +func (obj *flowRSVPPathObjects) SetClassNum(value FlowRSVPPathObjectsClass) FlowRSVPPathObjects { + + obj.classNumHolder = nil + obj.obj.ClassNum = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjects) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.ClassNum != nil { + + obj.ClassNum().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjects) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_objects_class.go b/gosnappi/flow_rsvp_path_objects_class.go new file mode 100644 index 00000000..2f1a5d53 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_class.go @@ -0,0 +1,891 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsClass ***** +type flowRSVPPathObjectsClass struct { + validation + obj *otg.FlowRSVPPathObjectsClass + marshaller marshalFlowRSVPPathObjectsClass + unMarshaller unMarshalFlowRSVPPathObjectsClass + sessionHolder FlowRSVPPathObjectsClassSession + rsvpHopHolder FlowRSVPPathObjectsClassRsvpHop + timeValuesHolder FlowRSVPPathObjectsClassTimeValues + explicitRouteHolder FlowRSVPPathObjectsClassExplicitRoute + labelRequestHolder FlowRSVPPathObjectsClassLabelRequest + sessionAttributeHolder FlowRSVPPathObjectsClassSessionAttribute + senderTemplateHolder FlowRSVPPathObjectsClassSenderTemplate + senderTspecHolder FlowRSVPPathObjectsClassSenderTspec + recordRouteHolder FlowRSVPPathObjectsClassRecordRoute + customHolder FlowRSVPPathObjectsCustom +} + +func NewFlowRSVPPathObjectsClass() FlowRSVPPathObjectsClass { + obj := flowRSVPPathObjectsClass{obj: &otg.FlowRSVPPathObjectsClass{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsClass) msg() *otg.FlowRSVPPathObjectsClass { + return obj.obj +} + +func (obj *flowRSVPPathObjectsClass) setMsg(msg *otg.FlowRSVPPathObjectsClass) FlowRSVPPathObjectsClass { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsClass struct { + obj *flowRSVPPathObjectsClass +} + +type marshalFlowRSVPPathObjectsClass interface { + // ToProto marshals FlowRSVPPathObjectsClass to protobuf object *otg.FlowRSVPPathObjectsClass + ToProto() (*otg.FlowRSVPPathObjectsClass, error) + // ToPbText marshals FlowRSVPPathObjectsClass to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsClass to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsClass to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsClass struct { + obj *flowRSVPPathObjectsClass +} + +type unMarshalFlowRSVPPathObjectsClass interface { + // FromProto unmarshals FlowRSVPPathObjectsClass from protobuf object *otg.FlowRSVPPathObjectsClass + FromProto(msg *otg.FlowRSVPPathObjectsClass) (FlowRSVPPathObjectsClass, error) + // FromPbText unmarshals FlowRSVPPathObjectsClass from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsClass from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsClass from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsClass) Marshal() marshalFlowRSVPPathObjectsClass { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsClass{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsClass) Unmarshal() unMarshalFlowRSVPPathObjectsClass { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsClass{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsClass) ToProto() (*otg.FlowRSVPPathObjectsClass, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsClass) FromProto(msg *otg.FlowRSVPPathObjectsClass) (FlowRSVPPathObjectsClass, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsClass) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsClass) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsClass) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClass) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsClass) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClass) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsClass) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClass) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClass) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsClass) Clone() (FlowRSVPPathObjectsClass, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsClass() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsClass) setNil() { + obj.sessionHolder = nil + obj.rsvpHopHolder = nil + obj.timeValuesHolder = nil + obj.explicitRouteHolder = nil + obj.labelRequestHolder = nil + obj.sessionAttributeHolder = nil + obj.senderTemplateHolder = nil + obj.senderTspecHolder = nil + obj.recordRouteHolder = nil + obj.customHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsClass is the class number is used to identify the class of an object. Defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-4 . Curently supported class numbers are for "Path" message type. "Path" message: Supported Class numbers and it's value: SESSION: 1, RSVP_HOP: 3, TIME_VALUES: 5, EXPLICIT_ROUTE: 20, LABEL_REQUEST: 19, SESSION_ATTRIBUTE: 207, SENDER_TEMPLATE: 11, SENDER_TSPEC: 12, RECORD_ROUTE: 21, Custom: User defined bytes based on class and c-types not supported in above options. +type FlowRSVPPathObjectsClass interface { + Validation + // msg marshals FlowRSVPPathObjectsClass to protobuf object *otg.FlowRSVPPathObjectsClass + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsClass + // setMsg unmarshals FlowRSVPPathObjectsClass from protobuf object *otg.FlowRSVPPathObjectsClass + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsClass) FlowRSVPPathObjectsClass + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsClass + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsClass + // validate validates FlowRSVPPathObjectsClass + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsClass, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPPathObjectsClassChoiceEnum, set in FlowRSVPPathObjectsClass + Choice() FlowRSVPPathObjectsClassChoiceEnum + // setChoice assigns FlowRSVPPathObjectsClassChoiceEnum provided by user to FlowRSVPPathObjectsClass + setChoice(value FlowRSVPPathObjectsClassChoiceEnum) FlowRSVPPathObjectsClass + // Session returns FlowRSVPPathObjectsClassSession, set in FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassSession is c-Type is specific to a class num. + Session() FlowRSVPPathObjectsClassSession + // SetSession assigns FlowRSVPPathObjectsClassSession provided by user to FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassSession is c-Type is specific to a class num. + SetSession(value FlowRSVPPathObjectsClassSession) FlowRSVPPathObjectsClass + // HasSession checks if Session has been set in FlowRSVPPathObjectsClass + HasSession() bool + // RsvpHop returns FlowRSVPPathObjectsClassRsvpHop, set in FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassRsvpHop is c-Type is specific to a class num. + RsvpHop() FlowRSVPPathObjectsClassRsvpHop + // SetRsvpHop assigns FlowRSVPPathObjectsClassRsvpHop provided by user to FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassRsvpHop is c-Type is specific to a class num. + SetRsvpHop(value FlowRSVPPathObjectsClassRsvpHop) FlowRSVPPathObjectsClass + // HasRsvpHop checks if RsvpHop has been set in FlowRSVPPathObjectsClass + HasRsvpHop() bool + // TimeValues returns FlowRSVPPathObjectsClassTimeValues, set in FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassTimeValues is c-Type is specific to a class num. + TimeValues() FlowRSVPPathObjectsClassTimeValues + // SetTimeValues assigns FlowRSVPPathObjectsClassTimeValues provided by user to FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassTimeValues is c-Type is specific to a class num. + SetTimeValues(value FlowRSVPPathObjectsClassTimeValues) FlowRSVPPathObjectsClass + // HasTimeValues checks if TimeValues has been set in FlowRSVPPathObjectsClass + HasTimeValues() bool + // ExplicitRoute returns FlowRSVPPathObjectsClassExplicitRoute, set in FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassExplicitRoute is c-Type is specific to a class num. + ExplicitRoute() FlowRSVPPathObjectsClassExplicitRoute + // SetExplicitRoute assigns FlowRSVPPathObjectsClassExplicitRoute provided by user to FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassExplicitRoute is c-Type is specific to a class num. + SetExplicitRoute(value FlowRSVPPathObjectsClassExplicitRoute) FlowRSVPPathObjectsClass + // HasExplicitRoute checks if ExplicitRoute has been set in FlowRSVPPathObjectsClass + HasExplicitRoute() bool + // LabelRequest returns FlowRSVPPathObjectsClassLabelRequest, set in FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassLabelRequest is c-Type is specific to a class num. + LabelRequest() FlowRSVPPathObjectsClassLabelRequest + // SetLabelRequest assigns FlowRSVPPathObjectsClassLabelRequest provided by user to FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassLabelRequest is c-Type is specific to a class num. + SetLabelRequest(value FlowRSVPPathObjectsClassLabelRequest) FlowRSVPPathObjectsClass + // HasLabelRequest checks if LabelRequest has been set in FlowRSVPPathObjectsClass + HasLabelRequest() bool + // SessionAttribute returns FlowRSVPPathObjectsClassSessionAttribute, set in FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassSessionAttribute is c-Type is specific to a class num. + SessionAttribute() FlowRSVPPathObjectsClassSessionAttribute + // SetSessionAttribute assigns FlowRSVPPathObjectsClassSessionAttribute provided by user to FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassSessionAttribute is c-Type is specific to a class num. + SetSessionAttribute(value FlowRSVPPathObjectsClassSessionAttribute) FlowRSVPPathObjectsClass + // HasSessionAttribute checks if SessionAttribute has been set in FlowRSVPPathObjectsClass + HasSessionAttribute() bool + // SenderTemplate returns FlowRSVPPathObjectsClassSenderTemplate, set in FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassSenderTemplate is c-Type is specific to a class num. + SenderTemplate() FlowRSVPPathObjectsClassSenderTemplate + // SetSenderTemplate assigns FlowRSVPPathObjectsClassSenderTemplate provided by user to FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassSenderTemplate is c-Type is specific to a class num. + SetSenderTemplate(value FlowRSVPPathObjectsClassSenderTemplate) FlowRSVPPathObjectsClass + // HasSenderTemplate checks if SenderTemplate has been set in FlowRSVPPathObjectsClass + HasSenderTemplate() bool + // SenderTspec returns FlowRSVPPathObjectsClassSenderTspec, set in FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassSenderTspec is c-Type is specific to a class num. + SenderTspec() FlowRSVPPathObjectsClassSenderTspec + // SetSenderTspec assigns FlowRSVPPathObjectsClassSenderTspec provided by user to FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassSenderTspec is c-Type is specific to a class num. + SetSenderTspec(value FlowRSVPPathObjectsClassSenderTspec) FlowRSVPPathObjectsClass + // HasSenderTspec checks if SenderTspec has been set in FlowRSVPPathObjectsClass + HasSenderTspec() bool + // RecordRoute returns FlowRSVPPathObjectsClassRecordRoute, set in FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassRecordRoute is c-Type is specific to a class num. + RecordRoute() FlowRSVPPathObjectsClassRecordRoute + // SetRecordRoute assigns FlowRSVPPathObjectsClassRecordRoute provided by user to FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsClassRecordRoute is c-Type is specific to a class num. + SetRecordRoute(value FlowRSVPPathObjectsClassRecordRoute) FlowRSVPPathObjectsClass + // HasRecordRoute checks if RecordRoute has been set in FlowRSVPPathObjectsClass + HasRecordRoute() bool + // Custom returns FlowRSVPPathObjectsCustom, set in FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsCustom is custom packet header + Custom() FlowRSVPPathObjectsCustom + // SetCustom assigns FlowRSVPPathObjectsCustom provided by user to FlowRSVPPathObjectsClass. + // FlowRSVPPathObjectsCustom is custom packet header + SetCustom(value FlowRSVPPathObjectsCustom) FlowRSVPPathObjectsClass + // HasCustom checks if Custom has been set in FlowRSVPPathObjectsClass + HasCustom() bool + setNil() +} + +type FlowRSVPPathObjectsClassChoiceEnum string + +// Enum of Choice on FlowRSVPPathObjectsClass +var FlowRSVPPathObjectsClassChoice = struct { + SESSION FlowRSVPPathObjectsClassChoiceEnum + RSVP_HOP FlowRSVPPathObjectsClassChoiceEnum + TIME_VALUES FlowRSVPPathObjectsClassChoiceEnum + EXPLICIT_ROUTE FlowRSVPPathObjectsClassChoiceEnum + LABEL_REQUEST FlowRSVPPathObjectsClassChoiceEnum + SESSION_ATTRIBUTE FlowRSVPPathObjectsClassChoiceEnum + SENDER_TEMPLATE FlowRSVPPathObjectsClassChoiceEnum + SENDER_TSPEC FlowRSVPPathObjectsClassChoiceEnum + RECORD_ROUTE FlowRSVPPathObjectsClassChoiceEnum + CUSTOM FlowRSVPPathObjectsClassChoiceEnum +}{ + SESSION: FlowRSVPPathObjectsClassChoiceEnum("session"), + RSVP_HOP: FlowRSVPPathObjectsClassChoiceEnum("rsvp_hop"), + TIME_VALUES: FlowRSVPPathObjectsClassChoiceEnum("time_values"), + EXPLICIT_ROUTE: FlowRSVPPathObjectsClassChoiceEnum("explicit_route"), + LABEL_REQUEST: FlowRSVPPathObjectsClassChoiceEnum("label_request"), + SESSION_ATTRIBUTE: FlowRSVPPathObjectsClassChoiceEnum("session_attribute"), + SENDER_TEMPLATE: FlowRSVPPathObjectsClassChoiceEnum("sender_template"), + SENDER_TSPEC: FlowRSVPPathObjectsClassChoiceEnum("sender_tspec"), + RECORD_ROUTE: FlowRSVPPathObjectsClassChoiceEnum("record_route"), + CUSTOM: FlowRSVPPathObjectsClassChoiceEnum("custom"), +} + +func (obj *flowRSVPPathObjectsClass) Choice() FlowRSVPPathObjectsClassChoiceEnum { + return FlowRSVPPathObjectsClassChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *flowRSVPPathObjectsClass) setChoice(value FlowRSVPPathObjectsClassChoiceEnum) FlowRSVPPathObjectsClass { + intValue, ok := otg.FlowRSVPPathObjectsClass_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPPathObjectsClassChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPPathObjectsClass_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.customHolder = nil + obj.obj.RecordRoute = nil + obj.recordRouteHolder = nil + obj.obj.SenderTspec = nil + obj.senderTspecHolder = nil + obj.obj.SenderTemplate = nil + obj.senderTemplateHolder = nil + obj.obj.SessionAttribute = nil + obj.sessionAttributeHolder = nil + obj.obj.LabelRequest = nil + obj.labelRequestHolder = nil + obj.obj.ExplicitRoute = nil + obj.explicitRouteHolder = nil + obj.obj.TimeValues = nil + obj.timeValuesHolder = nil + obj.obj.RsvpHop = nil + obj.rsvpHopHolder = nil + obj.obj.Session = nil + obj.sessionHolder = nil + + if value == FlowRSVPPathObjectsClassChoice.SESSION { + obj.obj.Session = NewFlowRSVPPathObjectsClassSession().msg() + } + + if value == FlowRSVPPathObjectsClassChoice.RSVP_HOP { + obj.obj.RsvpHop = NewFlowRSVPPathObjectsClassRsvpHop().msg() + } + + if value == FlowRSVPPathObjectsClassChoice.TIME_VALUES { + obj.obj.TimeValues = NewFlowRSVPPathObjectsClassTimeValues().msg() + } + + if value == FlowRSVPPathObjectsClassChoice.EXPLICIT_ROUTE { + obj.obj.ExplicitRoute = NewFlowRSVPPathObjectsClassExplicitRoute().msg() + } + + if value == FlowRSVPPathObjectsClassChoice.LABEL_REQUEST { + obj.obj.LabelRequest = NewFlowRSVPPathObjectsClassLabelRequest().msg() + } + + if value == FlowRSVPPathObjectsClassChoice.SESSION_ATTRIBUTE { + obj.obj.SessionAttribute = NewFlowRSVPPathObjectsClassSessionAttribute().msg() + } + + if value == FlowRSVPPathObjectsClassChoice.SENDER_TEMPLATE { + obj.obj.SenderTemplate = NewFlowRSVPPathObjectsClassSenderTemplate().msg() + } + + if value == FlowRSVPPathObjectsClassChoice.SENDER_TSPEC { + obj.obj.SenderTspec = NewFlowRSVPPathObjectsClassSenderTspec().msg() + } + + if value == FlowRSVPPathObjectsClassChoice.RECORD_ROUTE { + obj.obj.RecordRoute = NewFlowRSVPPathObjectsClassRecordRoute().msg() + } + + if value == FlowRSVPPathObjectsClassChoice.CUSTOM { + obj.obj.Custom = NewFlowRSVPPathObjectsCustom().msg() + } + + return obj +} + +// description is TBD +// Session returns a FlowRSVPPathObjectsClassSession +func (obj *flowRSVPPathObjectsClass) Session() FlowRSVPPathObjectsClassSession { + if obj.obj.Session == nil { + obj.setChoice(FlowRSVPPathObjectsClassChoice.SESSION) + } + if obj.sessionHolder == nil { + obj.sessionHolder = &flowRSVPPathObjectsClassSession{obj: obj.obj.Session} + } + return obj.sessionHolder +} + +// description is TBD +// Session returns a FlowRSVPPathObjectsClassSession +func (obj *flowRSVPPathObjectsClass) HasSession() bool { + return obj.obj.Session != nil +} + +// description is TBD +// SetSession sets the FlowRSVPPathObjectsClassSession value in the FlowRSVPPathObjectsClass object +func (obj *flowRSVPPathObjectsClass) SetSession(value FlowRSVPPathObjectsClassSession) FlowRSVPPathObjectsClass { + obj.setChoice(FlowRSVPPathObjectsClassChoice.SESSION) + obj.sessionHolder = nil + obj.obj.Session = value.msg() + + return obj +} + +// description is TBD +// RsvpHop returns a FlowRSVPPathObjectsClassRsvpHop +func (obj *flowRSVPPathObjectsClass) RsvpHop() FlowRSVPPathObjectsClassRsvpHop { + if obj.obj.RsvpHop == nil { + obj.setChoice(FlowRSVPPathObjectsClassChoice.RSVP_HOP) + } + if obj.rsvpHopHolder == nil { + obj.rsvpHopHolder = &flowRSVPPathObjectsClassRsvpHop{obj: obj.obj.RsvpHop} + } + return obj.rsvpHopHolder +} + +// description is TBD +// RsvpHop returns a FlowRSVPPathObjectsClassRsvpHop +func (obj *flowRSVPPathObjectsClass) HasRsvpHop() bool { + return obj.obj.RsvpHop != nil +} + +// description is TBD +// SetRsvpHop sets the FlowRSVPPathObjectsClassRsvpHop value in the FlowRSVPPathObjectsClass object +func (obj *flowRSVPPathObjectsClass) SetRsvpHop(value FlowRSVPPathObjectsClassRsvpHop) FlowRSVPPathObjectsClass { + obj.setChoice(FlowRSVPPathObjectsClassChoice.RSVP_HOP) + obj.rsvpHopHolder = nil + obj.obj.RsvpHop = value.msg() + + return obj +} + +// description is TBD +// TimeValues returns a FlowRSVPPathObjectsClassTimeValues +func (obj *flowRSVPPathObjectsClass) TimeValues() FlowRSVPPathObjectsClassTimeValues { + if obj.obj.TimeValues == nil { + obj.setChoice(FlowRSVPPathObjectsClassChoice.TIME_VALUES) + } + if obj.timeValuesHolder == nil { + obj.timeValuesHolder = &flowRSVPPathObjectsClassTimeValues{obj: obj.obj.TimeValues} + } + return obj.timeValuesHolder +} + +// description is TBD +// TimeValues returns a FlowRSVPPathObjectsClassTimeValues +func (obj *flowRSVPPathObjectsClass) HasTimeValues() bool { + return obj.obj.TimeValues != nil +} + +// description is TBD +// SetTimeValues sets the FlowRSVPPathObjectsClassTimeValues value in the FlowRSVPPathObjectsClass object +func (obj *flowRSVPPathObjectsClass) SetTimeValues(value FlowRSVPPathObjectsClassTimeValues) FlowRSVPPathObjectsClass { + obj.setChoice(FlowRSVPPathObjectsClassChoice.TIME_VALUES) + obj.timeValuesHolder = nil + obj.obj.TimeValues = value.msg() + + return obj +} + +// description is TBD +// ExplicitRoute returns a FlowRSVPPathObjectsClassExplicitRoute +func (obj *flowRSVPPathObjectsClass) ExplicitRoute() FlowRSVPPathObjectsClassExplicitRoute { + if obj.obj.ExplicitRoute == nil { + obj.setChoice(FlowRSVPPathObjectsClassChoice.EXPLICIT_ROUTE) + } + if obj.explicitRouteHolder == nil { + obj.explicitRouteHolder = &flowRSVPPathObjectsClassExplicitRoute{obj: obj.obj.ExplicitRoute} + } + return obj.explicitRouteHolder +} + +// description is TBD +// ExplicitRoute returns a FlowRSVPPathObjectsClassExplicitRoute +func (obj *flowRSVPPathObjectsClass) HasExplicitRoute() bool { + return obj.obj.ExplicitRoute != nil +} + +// description is TBD +// SetExplicitRoute sets the FlowRSVPPathObjectsClassExplicitRoute value in the FlowRSVPPathObjectsClass object +func (obj *flowRSVPPathObjectsClass) SetExplicitRoute(value FlowRSVPPathObjectsClassExplicitRoute) FlowRSVPPathObjectsClass { + obj.setChoice(FlowRSVPPathObjectsClassChoice.EXPLICIT_ROUTE) + obj.explicitRouteHolder = nil + obj.obj.ExplicitRoute = value.msg() + + return obj +} + +// description is TBD +// LabelRequest returns a FlowRSVPPathObjectsClassLabelRequest +func (obj *flowRSVPPathObjectsClass) LabelRequest() FlowRSVPPathObjectsClassLabelRequest { + if obj.obj.LabelRequest == nil { + obj.setChoice(FlowRSVPPathObjectsClassChoice.LABEL_REQUEST) + } + if obj.labelRequestHolder == nil { + obj.labelRequestHolder = &flowRSVPPathObjectsClassLabelRequest{obj: obj.obj.LabelRequest} + } + return obj.labelRequestHolder +} + +// description is TBD +// LabelRequest returns a FlowRSVPPathObjectsClassLabelRequest +func (obj *flowRSVPPathObjectsClass) HasLabelRequest() bool { + return obj.obj.LabelRequest != nil +} + +// description is TBD +// SetLabelRequest sets the FlowRSVPPathObjectsClassLabelRequest value in the FlowRSVPPathObjectsClass object +func (obj *flowRSVPPathObjectsClass) SetLabelRequest(value FlowRSVPPathObjectsClassLabelRequest) FlowRSVPPathObjectsClass { + obj.setChoice(FlowRSVPPathObjectsClassChoice.LABEL_REQUEST) + obj.labelRequestHolder = nil + obj.obj.LabelRequest = value.msg() + + return obj +} + +// description is TBD +// SessionAttribute returns a FlowRSVPPathObjectsClassSessionAttribute +func (obj *flowRSVPPathObjectsClass) SessionAttribute() FlowRSVPPathObjectsClassSessionAttribute { + if obj.obj.SessionAttribute == nil { + obj.setChoice(FlowRSVPPathObjectsClassChoice.SESSION_ATTRIBUTE) + } + if obj.sessionAttributeHolder == nil { + obj.sessionAttributeHolder = &flowRSVPPathObjectsClassSessionAttribute{obj: obj.obj.SessionAttribute} + } + return obj.sessionAttributeHolder +} + +// description is TBD +// SessionAttribute returns a FlowRSVPPathObjectsClassSessionAttribute +func (obj *flowRSVPPathObjectsClass) HasSessionAttribute() bool { + return obj.obj.SessionAttribute != nil +} + +// description is TBD +// SetSessionAttribute sets the FlowRSVPPathObjectsClassSessionAttribute value in the FlowRSVPPathObjectsClass object +func (obj *flowRSVPPathObjectsClass) SetSessionAttribute(value FlowRSVPPathObjectsClassSessionAttribute) FlowRSVPPathObjectsClass { + obj.setChoice(FlowRSVPPathObjectsClassChoice.SESSION_ATTRIBUTE) + obj.sessionAttributeHolder = nil + obj.obj.SessionAttribute = value.msg() + + return obj +} + +// description is TBD +// SenderTemplate returns a FlowRSVPPathObjectsClassSenderTemplate +func (obj *flowRSVPPathObjectsClass) SenderTemplate() FlowRSVPPathObjectsClassSenderTemplate { + if obj.obj.SenderTemplate == nil { + obj.setChoice(FlowRSVPPathObjectsClassChoice.SENDER_TEMPLATE) + } + if obj.senderTemplateHolder == nil { + obj.senderTemplateHolder = &flowRSVPPathObjectsClassSenderTemplate{obj: obj.obj.SenderTemplate} + } + return obj.senderTemplateHolder +} + +// description is TBD +// SenderTemplate returns a FlowRSVPPathObjectsClassSenderTemplate +func (obj *flowRSVPPathObjectsClass) HasSenderTemplate() bool { + return obj.obj.SenderTemplate != nil +} + +// description is TBD +// SetSenderTemplate sets the FlowRSVPPathObjectsClassSenderTemplate value in the FlowRSVPPathObjectsClass object +func (obj *flowRSVPPathObjectsClass) SetSenderTemplate(value FlowRSVPPathObjectsClassSenderTemplate) FlowRSVPPathObjectsClass { + obj.setChoice(FlowRSVPPathObjectsClassChoice.SENDER_TEMPLATE) + obj.senderTemplateHolder = nil + obj.obj.SenderTemplate = value.msg() + + return obj +} + +// description is TBD +// SenderTspec returns a FlowRSVPPathObjectsClassSenderTspec +func (obj *flowRSVPPathObjectsClass) SenderTspec() FlowRSVPPathObjectsClassSenderTspec { + if obj.obj.SenderTspec == nil { + obj.setChoice(FlowRSVPPathObjectsClassChoice.SENDER_TSPEC) + } + if obj.senderTspecHolder == nil { + obj.senderTspecHolder = &flowRSVPPathObjectsClassSenderTspec{obj: obj.obj.SenderTspec} + } + return obj.senderTspecHolder +} + +// description is TBD +// SenderTspec returns a FlowRSVPPathObjectsClassSenderTspec +func (obj *flowRSVPPathObjectsClass) HasSenderTspec() bool { + return obj.obj.SenderTspec != nil +} + +// description is TBD +// SetSenderTspec sets the FlowRSVPPathObjectsClassSenderTspec value in the FlowRSVPPathObjectsClass object +func (obj *flowRSVPPathObjectsClass) SetSenderTspec(value FlowRSVPPathObjectsClassSenderTspec) FlowRSVPPathObjectsClass { + obj.setChoice(FlowRSVPPathObjectsClassChoice.SENDER_TSPEC) + obj.senderTspecHolder = nil + obj.obj.SenderTspec = value.msg() + + return obj +} + +// description is TBD +// RecordRoute returns a FlowRSVPPathObjectsClassRecordRoute +func (obj *flowRSVPPathObjectsClass) RecordRoute() FlowRSVPPathObjectsClassRecordRoute { + if obj.obj.RecordRoute == nil { + obj.setChoice(FlowRSVPPathObjectsClassChoice.RECORD_ROUTE) + } + if obj.recordRouteHolder == nil { + obj.recordRouteHolder = &flowRSVPPathObjectsClassRecordRoute{obj: obj.obj.RecordRoute} + } + return obj.recordRouteHolder +} + +// description is TBD +// RecordRoute returns a FlowRSVPPathObjectsClassRecordRoute +func (obj *flowRSVPPathObjectsClass) HasRecordRoute() bool { + return obj.obj.RecordRoute != nil +} + +// description is TBD +// SetRecordRoute sets the FlowRSVPPathObjectsClassRecordRoute value in the FlowRSVPPathObjectsClass object +func (obj *flowRSVPPathObjectsClass) SetRecordRoute(value FlowRSVPPathObjectsClassRecordRoute) FlowRSVPPathObjectsClass { + obj.setChoice(FlowRSVPPathObjectsClassChoice.RECORD_ROUTE) + obj.recordRouteHolder = nil + obj.obj.RecordRoute = value.msg() + + return obj +} + +// description is TBD +// Custom returns a FlowRSVPPathObjectsCustom +func (obj *flowRSVPPathObjectsClass) Custom() FlowRSVPPathObjectsCustom { + if obj.obj.Custom == nil { + obj.setChoice(FlowRSVPPathObjectsClassChoice.CUSTOM) + } + if obj.customHolder == nil { + obj.customHolder = &flowRSVPPathObjectsCustom{obj: obj.obj.Custom} + } + return obj.customHolder +} + +// description is TBD +// Custom returns a FlowRSVPPathObjectsCustom +func (obj *flowRSVPPathObjectsClass) HasCustom() bool { + return obj.obj.Custom != nil +} + +// description is TBD +// SetCustom sets the FlowRSVPPathObjectsCustom value in the FlowRSVPPathObjectsClass object +func (obj *flowRSVPPathObjectsClass) SetCustom(value FlowRSVPPathObjectsCustom) FlowRSVPPathObjectsClass { + obj.setChoice(FlowRSVPPathObjectsClassChoice.CUSTOM) + obj.customHolder = nil + obj.obj.Custom = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsClass) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface FlowRSVPPathObjectsClass") + } + + if obj.obj.Session != nil { + + obj.Session().validateObj(vObj, set_default) + } + + if obj.obj.RsvpHop != nil { + + obj.RsvpHop().validateObj(vObj, set_default) + } + + if obj.obj.TimeValues != nil { + + obj.TimeValues().validateObj(vObj, set_default) + } + + if obj.obj.ExplicitRoute != nil { + + obj.ExplicitRoute().validateObj(vObj, set_default) + } + + if obj.obj.LabelRequest != nil { + + obj.LabelRequest().validateObj(vObj, set_default) + } + + if obj.obj.SessionAttribute != nil { + + obj.SessionAttribute().validateObj(vObj, set_default) + } + + if obj.obj.SenderTemplate != nil { + + obj.SenderTemplate().validateObj(vObj, set_default) + } + + if obj.obj.SenderTspec != nil { + + obj.SenderTspec().validateObj(vObj, set_default) + } + + if obj.obj.RecordRoute != nil { + + obj.RecordRoute().validateObj(vObj, set_default) + } + + if obj.obj.Custom != nil { + + obj.Custom().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsClass) setDefault() { + var choices_set int = 0 + var choice FlowRSVPPathObjectsClassChoiceEnum + + if obj.obj.Session != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsClassChoice.SESSION + } + + if obj.obj.RsvpHop != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsClassChoice.RSVP_HOP + } + + if obj.obj.TimeValues != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsClassChoice.TIME_VALUES + } + + if obj.obj.ExplicitRoute != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsClassChoice.EXPLICIT_ROUTE + } + + if obj.obj.LabelRequest != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsClassChoice.LABEL_REQUEST + } + + if obj.obj.SessionAttribute != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsClassChoice.SESSION_ATTRIBUTE + } + + if obj.obj.SenderTemplate != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsClassChoice.SENDER_TEMPLATE + } + + if obj.obj.SenderTspec != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsClassChoice.SENDER_TSPEC + } + + if obj.obj.RecordRoute != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsClassChoice.RECORD_ROUTE + } + + if obj.obj.Custom != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsClassChoice.CUSTOM + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPPathObjectsClass") + } + } else { + intVal := otg.FlowRSVPPathObjectsClass_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPPathObjectsClass_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_path_objects_class_explicit_route.go b/gosnappi/flow_rsvp_path_objects_class_explicit_route.go new file mode 100644 index 00000000..635dcb10 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_class_explicit_route.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsClassExplicitRoute ***** +type flowRSVPPathObjectsClassExplicitRoute struct { + validation + obj *otg.FlowRSVPPathObjectsClassExplicitRoute + marshaller marshalFlowRSVPPathObjectsClassExplicitRoute + unMarshaller unMarshalFlowRSVPPathObjectsClassExplicitRoute + lengthHolder FlowRSVPObjectLength + cTypeHolder FlowRSVPPathObjectsClassExplicitRouteCType +} + +func NewFlowRSVPPathObjectsClassExplicitRoute() FlowRSVPPathObjectsClassExplicitRoute { + obj := flowRSVPPathObjectsClassExplicitRoute{obj: &otg.FlowRSVPPathObjectsClassExplicitRoute{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsClassExplicitRoute) msg() *otg.FlowRSVPPathObjectsClassExplicitRoute { + return obj.obj +} + +func (obj *flowRSVPPathObjectsClassExplicitRoute) setMsg(msg *otg.FlowRSVPPathObjectsClassExplicitRoute) FlowRSVPPathObjectsClassExplicitRoute { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsClassExplicitRoute struct { + obj *flowRSVPPathObjectsClassExplicitRoute +} + +type marshalFlowRSVPPathObjectsClassExplicitRoute interface { + // ToProto marshals FlowRSVPPathObjectsClassExplicitRoute to protobuf object *otg.FlowRSVPPathObjectsClassExplicitRoute + ToProto() (*otg.FlowRSVPPathObjectsClassExplicitRoute, error) + // ToPbText marshals FlowRSVPPathObjectsClassExplicitRoute to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsClassExplicitRoute to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsClassExplicitRoute to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsClassExplicitRoute struct { + obj *flowRSVPPathObjectsClassExplicitRoute +} + +type unMarshalFlowRSVPPathObjectsClassExplicitRoute interface { + // FromProto unmarshals FlowRSVPPathObjectsClassExplicitRoute from protobuf object *otg.FlowRSVPPathObjectsClassExplicitRoute + FromProto(msg *otg.FlowRSVPPathObjectsClassExplicitRoute) (FlowRSVPPathObjectsClassExplicitRoute, error) + // FromPbText unmarshals FlowRSVPPathObjectsClassExplicitRoute from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsClassExplicitRoute from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsClassExplicitRoute from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsClassExplicitRoute) Marshal() marshalFlowRSVPPathObjectsClassExplicitRoute { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsClassExplicitRoute{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsClassExplicitRoute) Unmarshal() unMarshalFlowRSVPPathObjectsClassExplicitRoute { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsClassExplicitRoute{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsClassExplicitRoute) ToProto() (*otg.FlowRSVPPathObjectsClassExplicitRoute, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassExplicitRoute) FromProto(msg *otg.FlowRSVPPathObjectsClassExplicitRoute) (FlowRSVPPathObjectsClassExplicitRoute, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsClassExplicitRoute) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassExplicitRoute) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsClassExplicitRoute) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassExplicitRoute) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsClassExplicitRoute) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassExplicitRoute) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsClassExplicitRoute) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassExplicitRoute) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassExplicitRoute) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsClassExplicitRoute) Clone() (FlowRSVPPathObjectsClassExplicitRoute, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsClassExplicitRoute() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsClassExplicitRoute) setNil() { + obj.lengthHolder = nil + obj.cTypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsClassExplicitRoute is c-Type is specific to a class num. +type FlowRSVPPathObjectsClassExplicitRoute interface { + Validation + // msg marshals FlowRSVPPathObjectsClassExplicitRoute to protobuf object *otg.FlowRSVPPathObjectsClassExplicitRoute + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsClassExplicitRoute + // setMsg unmarshals FlowRSVPPathObjectsClassExplicitRoute from protobuf object *otg.FlowRSVPPathObjectsClassExplicitRoute + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsClassExplicitRoute) FlowRSVPPathObjectsClassExplicitRoute + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsClassExplicitRoute + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsClassExplicitRoute + // validate validates FlowRSVPPathObjectsClassExplicitRoute + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsClassExplicitRoute, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Length returns FlowRSVPObjectLength, set in FlowRSVPPathObjectsClassExplicitRoute. + // FlowRSVPObjectLength is description is TBD + Length() FlowRSVPObjectLength + // SetLength assigns FlowRSVPObjectLength provided by user to FlowRSVPPathObjectsClassExplicitRoute. + // FlowRSVPObjectLength is description is TBD + SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassExplicitRoute + // HasLength checks if Length has been set in FlowRSVPPathObjectsClassExplicitRoute + HasLength() bool + // CType returns FlowRSVPPathObjectsClassExplicitRouteCType, set in FlowRSVPPathObjectsClassExplicitRoute. + // FlowRSVPPathObjectsClassExplicitRouteCType is object for EXPLICIT_ROUTE class and c-type is Type 1 Explicit Route (1). + CType() FlowRSVPPathObjectsClassExplicitRouteCType + // SetCType assigns FlowRSVPPathObjectsClassExplicitRouteCType provided by user to FlowRSVPPathObjectsClassExplicitRoute. + // FlowRSVPPathObjectsClassExplicitRouteCType is object for EXPLICIT_ROUTE class and c-type is Type 1 Explicit Route (1). + SetCType(value FlowRSVPPathObjectsClassExplicitRouteCType) FlowRSVPPathObjectsClassExplicitRoute + // HasCType checks if CType has been set in FlowRSVPPathObjectsClassExplicitRoute + HasCType() bool + setNil() +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassExplicitRoute) Length() FlowRSVPObjectLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowRSVPObjectLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowRSVPObjectLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassExplicitRoute) HasLength() bool { + return obj.obj.Length != nil +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// SetLength sets the FlowRSVPObjectLength value in the FlowRSVPPathObjectsClassExplicitRoute object +func (obj *flowRSVPPathObjectsClassExplicitRoute) SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassExplicitRoute { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsClassExplicitRouteCType +func (obj *flowRSVPPathObjectsClassExplicitRoute) CType() FlowRSVPPathObjectsClassExplicitRouteCType { + if obj.obj.CType == nil { + obj.obj.CType = NewFlowRSVPPathObjectsClassExplicitRouteCType().msg() + } + if obj.cTypeHolder == nil { + obj.cTypeHolder = &flowRSVPPathObjectsClassExplicitRouteCType{obj: obj.obj.CType} + } + return obj.cTypeHolder +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsClassExplicitRouteCType +func (obj *flowRSVPPathObjectsClassExplicitRoute) HasCType() bool { + return obj.obj.CType != nil +} + +// description is TBD +// SetCType sets the FlowRSVPPathObjectsClassExplicitRouteCType value in the FlowRSVPPathObjectsClassExplicitRoute object +func (obj *flowRSVPPathObjectsClassExplicitRoute) SetCType(value FlowRSVPPathObjectsClassExplicitRouteCType) FlowRSVPPathObjectsClassExplicitRoute { + + obj.cTypeHolder = nil + obj.obj.CType = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsClassExplicitRoute) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.CType != nil { + + obj.CType().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsClassExplicitRoute) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_objects_class_explicit_route_c_type.go b/gosnappi/flow_rsvp_path_objects_class_explicit_route_c_type.go new file mode 100644 index 00000000..90480b17 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_class_explicit_route_c_type.go @@ -0,0 +1,396 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsClassExplicitRouteCType ***** +type flowRSVPPathObjectsClassExplicitRouteCType struct { + validation + obj *otg.FlowRSVPPathObjectsClassExplicitRouteCType + marshaller marshalFlowRSVPPathObjectsClassExplicitRouteCType + unMarshaller unMarshalFlowRSVPPathObjectsClassExplicitRouteCType + type_1Holder FlowRSVPPathExplicitRouteType1 +} + +func NewFlowRSVPPathObjectsClassExplicitRouteCType() FlowRSVPPathObjectsClassExplicitRouteCType { + obj := flowRSVPPathObjectsClassExplicitRouteCType{obj: &otg.FlowRSVPPathObjectsClassExplicitRouteCType{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) msg() *otg.FlowRSVPPathObjectsClassExplicitRouteCType { + return obj.obj +} + +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) setMsg(msg *otg.FlowRSVPPathObjectsClassExplicitRouteCType) FlowRSVPPathObjectsClassExplicitRouteCType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsClassExplicitRouteCType struct { + obj *flowRSVPPathObjectsClassExplicitRouteCType +} + +type marshalFlowRSVPPathObjectsClassExplicitRouteCType interface { + // ToProto marshals FlowRSVPPathObjectsClassExplicitRouteCType to protobuf object *otg.FlowRSVPPathObjectsClassExplicitRouteCType + ToProto() (*otg.FlowRSVPPathObjectsClassExplicitRouteCType, error) + // ToPbText marshals FlowRSVPPathObjectsClassExplicitRouteCType to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsClassExplicitRouteCType to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsClassExplicitRouteCType to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsClassExplicitRouteCType struct { + obj *flowRSVPPathObjectsClassExplicitRouteCType +} + +type unMarshalFlowRSVPPathObjectsClassExplicitRouteCType interface { + // FromProto unmarshals FlowRSVPPathObjectsClassExplicitRouteCType from protobuf object *otg.FlowRSVPPathObjectsClassExplicitRouteCType + FromProto(msg *otg.FlowRSVPPathObjectsClassExplicitRouteCType) (FlowRSVPPathObjectsClassExplicitRouteCType, error) + // FromPbText unmarshals FlowRSVPPathObjectsClassExplicitRouteCType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsClassExplicitRouteCType from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsClassExplicitRouteCType from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) Marshal() marshalFlowRSVPPathObjectsClassExplicitRouteCType { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsClassExplicitRouteCType{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) Unmarshal() unMarshalFlowRSVPPathObjectsClassExplicitRouteCType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsClassExplicitRouteCType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsClassExplicitRouteCType) ToProto() (*otg.FlowRSVPPathObjectsClassExplicitRouteCType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassExplicitRouteCType) FromProto(msg *otg.FlowRSVPPathObjectsClassExplicitRouteCType) (FlowRSVPPathObjectsClassExplicitRouteCType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsClassExplicitRouteCType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassExplicitRouteCType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsClassExplicitRouteCType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassExplicitRouteCType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsClassExplicitRouteCType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassExplicitRouteCType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) Clone() (FlowRSVPPathObjectsClassExplicitRouteCType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsClassExplicitRouteCType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) setNil() { + obj.type_1Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsClassExplicitRouteCType is object for EXPLICIT_ROUTE class and c-type is Type 1 Explicit Route (1). +type FlowRSVPPathObjectsClassExplicitRouteCType interface { + Validation + // msg marshals FlowRSVPPathObjectsClassExplicitRouteCType to protobuf object *otg.FlowRSVPPathObjectsClassExplicitRouteCType + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsClassExplicitRouteCType + // setMsg unmarshals FlowRSVPPathObjectsClassExplicitRouteCType from protobuf object *otg.FlowRSVPPathObjectsClassExplicitRouteCType + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsClassExplicitRouteCType) FlowRSVPPathObjectsClassExplicitRouteCType + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsClassExplicitRouteCType + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsClassExplicitRouteCType + // validate validates FlowRSVPPathObjectsClassExplicitRouteCType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsClassExplicitRouteCType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPPathObjectsClassExplicitRouteCTypeChoiceEnum, set in FlowRSVPPathObjectsClassExplicitRouteCType + Choice() FlowRSVPPathObjectsClassExplicitRouteCTypeChoiceEnum + // setChoice assigns FlowRSVPPathObjectsClassExplicitRouteCTypeChoiceEnum provided by user to FlowRSVPPathObjectsClassExplicitRouteCType + setChoice(value FlowRSVPPathObjectsClassExplicitRouteCTypeChoiceEnum) FlowRSVPPathObjectsClassExplicitRouteCType + // HasChoice checks if Choice has been set in FlowRSVPPathObjectsClassExplicitRouteCType + HasChoice() bool + // Type1 returns FlowRSVPPathExplicitRouteType1, set in FlowRSVPPathObjectsClassExplicitRouteCType. + // FlowRSVPPathExplicitRouteType1 is type1 Explicit Route has subobjects. Currently supported subobjects are IPv4 prefix and Autonomous system number. + Type1() FlowRSVPPathExplicitRouteType1 + // SetType1 assigns FlowRSVPPathExplicitRouteType1 provided by user to FlowRSVPPathObjectsClassExplicitRouteCType. + // FlowRSVPPathExplicitRouteType1 is type1 Explicit Route has subobjects. Currently supported subobjects are IPv4 prefix and Autonomous system number. + SetType1(value FlowRSVPPathExplicitRouteType1) FlowRSVPPathObjectsClassExplicitRouteCType + // HasType1 checks if Type1 has been set in FlowRSVPPathObjectsClassExplicitRouteCType + HasType1() bool + setNil() +} + +type FlowRSVPPathObjectsClassExplicitRouteCTypeChoiceEnum string + +// Enum of Choice on FlowRSVPPathObjectsClassExplicitRouteCType +var FlowRSVPPathObjectsClassExplicitRouteCTypeChoice = struct { + TYPE_1 FlowRSVPPathObjectsClassExplicitRouteCTypeChoiceEnum +}{ + TYPE_1: FlowRSVPPathObjectsClassExplicitRouteCTypeChoiceEnum("type_1"), +} + +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) Choice() FlowRSVPPathObjectsClassExplicitRouteCTypeChoiceEnum { + return FlowRSVPPathObjectsClassExplicitRouteCTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) setChoice(value FlowRSVPPathObjectsClassExplicitRouteCTypeChoiceEnum) FlowRSVPPathObjectsClassExplicitRouteCType { + intValue, ok := otg.FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPPathObjectsClassExplicitRouteCTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Type_1 = nil + obj.type_1Holder = nil + + if value == FlowRSVPPathObjectsClassExplicitRouteCTypeChoice.TYPE_1 { + obj.obj.Type_1 = NewFlowRSVPPathExplicitRouteType1().msg() + } + + return obj +} + +// description is TBD +// Type1 returns a FlowRSVPPathExplicitRouteType1 +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) Type1() FlowRSVPPathExplicitRouteType1 { + if obj.obj.Type_1 == nil { + obj.setChoice(FlowRSVPPathObjectsClassExplicitRouteCTypeChoice.TYPE_1) + } + if obj.type_1Holder == nil { + obj.type_1Holder = &flowRSVPPathExplicitRouteType1{obj: obj.obj.Type_1} + } + return obj.type_1Holder +} + +// description is TBD +// Type1 returns a FlowRSVPPathExplicitRouteType1 +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) HasType1() bool { + return obj.obj.Type_1 != nil +} + +// description is TBD +// SetType1 sets the FlowRSVPPathExplicitRouteType1 value in the FlowRSVPPathObjectsClassExplicitRouteCType object +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) SetType1(value FlowRSVPPathExplicitRouteType1) FlowRSVPPathObjectsClassExplicitRouteCType { + obj.setChoice(FlowRSVPPathObjectsClassExplicitRouteCTypeChoice.TYPE_1) + obj.type_1Holder = nil + obj.obj.Type_1 = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Type_1 != nil { + + obj.Type1().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsClassExplicitRouteCType) setDefault() { + var choices_set int = 0 + var choice FlowRSVPPathObjectsClassExplicitRouteCTypeChoiceEnum + + if obj.obj.Type_1 != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsClassExplicitRouteCTypeChoice.TYPE_1 + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPPathObjectsClassExplicitRouteCTypeChoice.TYPE_1) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPPathObjectsClassExplicitRouteCType") + } + } else { + intVal := otg.FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_path_objects_class_label_request.go b/gosnappi/flow_rsvp_path_objects_class_label_request.go new file mode 100644 index 00000000..004382dc --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_class_label_request.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsClassLabelRequest ***** +type flowRSVPPathObjectsClassLabelRequest struct { + validation + obj *otg.FlowRSVPPathObjectsClassLabelRequest + marshaller marshalFlowRSVPPathObjectsClassLabelRequest + unMarshaller unMarshalFlowRSVPPathObjectsClassLabelRequest + lengthHolder FlowRSVPObjectLength + cTypeHolder FlowRSVPPathObjectsLabelRequestCType +} + +func NewFlowRSVPPathObjectsClassLabelRequest() FlowRSVPPathObjectsClassLabelRequest { + obj := flowRSVPPathObjectsClassLabelRequest{obj: &otg.FlowRSVPPathObjectsClassLabelRequest{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsClassLabelRequest) msg() *otg.FlowRSVPPathObjectsClassLabelRequest { + return obj.obj +} + +func (obj *flowRSVPPathObjectsClassLabelRequest) setMsg(msg *otg.FlowRSVPPathObjectsClassLabelRequest) FlowRSVPPathObjectsClassLabelRequest { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsClassLabelRequest struct { + obj *flowRSVPPathObjectsClassLabelRequest +} + +type marshalFlowRSVPPathObjectsClassLabelRequest interface { + // ToProto marshals FlowRSVPPathObjectsClassLabelRequest to protobuf object *otg.FlowRSVPPathObjectsClassLabelRequest + ToProto() (*otg.FlowRSVPPathObjectsClassLabelRequest, error) + // ToPbText marshals FlowRSVPPathObjectsClassLabelRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsClassLabelRequest to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsClassLabelRequest to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsClassLabelRequest struct { + obj *flowRSVPPathObjectsClassLabelRequest +} + +type unMarshalFlowRSVPPathObjectsClassLabelRequest interface { + // FromProto unmarshals FlowRSVPPathObjectsClassLabelRequest from protobuf object *otg.FlowRSVPPathObjectsClassLabelRequest + FromProto(msg *otg.FlowRSVPPathObjectsClassLabelRequest) (FlowRSVPPathObjectsClassLabelRequest, error) + // FromPbText unmarshals FlowRSVPPathObjectsClassLabelRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsClassLabelRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsClassLabelRequest from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsClassLabelRequest) Marshal() marshalFlowRSVPPathObjectsClassLabelRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsClassLabelRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsClassLabelRequest) Unmarshal() unMarshalFlowRSVPPathObjectsClassLabelRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsClassLabelRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsClassLabelRequest) ToProto() (*otg.FlowRSVPPathObjectsClassLabelRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassLabelRequest) FromProto(msg *otg.FlowRSVPPathObjectsClassLabelRequest) (FlowRSVPPathObjectsClassLabelRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsClassLabelRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassLabelRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsClassLabelRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassLabelRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsClassLabelRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassLabelRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsClassLabelRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassLabelRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassLabelRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsClassLabelRequest) Clone() (FlowRSVPPathObjectsClassLabelRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsClassLabelRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsClassLabelRequest) setNil() { + obj.lengthHolder = nil + obj.cTypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsClassLabelRequest is c-Type is specific to a class num. +type FlowRSVPPathObjectsClassLabelRequest interface { + Validation + // msg marshals FlowRSVPPathObjectsClassLabelRequest to protobuf object *otg.FlowRSVPPathObjectsClassLabelRequest + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsClassLabelRequest + // setMsg unmarshals FlowRSVPPathObjectsClassLabelRequest from protobuf object *otg.FlowRSVPPathObjectsClassLabelRequest + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsClassLabelRequest) FlowRSVPPathObjectsClassLabelRequest + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsClassLabelRequest + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsClassLabelRequest + // validate validates FlowRSVPPathObjectsClassLabelRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsClassLabelRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Length returns FlowRSVPObjectLength, set in FlowRSVPPathObjectsClassLabelRequest. + // FlowRSVPObjectLength is description is TBD + Length() FlowRSVPObjectLength + // SetLength assigns FlowRSVPObjectLength provided by user to FlowRSVPPathObjectsClassLabelRequest. + // FlowRSVPObjectLength is description is TBD + SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassLabelRequest + // HasLength checks if Length has been set in FlowRSVPPathObjectsClassLabelRequest + HasLength() bool + // CType returns FlowRSVPPathObjectsLabelRequestCType, set in FlowRSVPPathObjectsClassLabelRequest. + // FlowRSVPPathObjectsLabelRequestCType is object for LABEL_REQUEST class. Currently supported c-type is Without Label Range (1). + CType() FlowRSVPPathObjectsLabelRequestCType + // SetCType assigns FlowRSVPPathObjectsLabelRequestCType provided by user to FlowRSVPPathObjectsClassLabelRequest. + // FlowRSVPPathObjectsLabelRequestCType is object for LABEL_REQUEST class. Currently supported c-type is Without Label Range (1). + SetCType(value FlowRSVPPathObjectsLabelRequestCType) FlowRSVPPathObjectsClassLabelRequest + // HasCType checks if CType has been set in FlowRSVPPathObjectsClassLabelRequest + HasCType() bool + setNil() +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassLabelRequest) Length() FlowRSVPObjectLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowRSVPObjectLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowRSVPObjectLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassLabelRequest) HasLength() bool { + return obj.obj.Length != nil +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// SetLength sets the FlowRSVPObjectLength value in the FlowRSVPPathObjectsClassLabelRequest object +func (obj *flowRSVPPathObjectsClassLabelRequest) SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassLabelRequest { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsLabelRequestCType +func (obj *flowRSVPPathObjectsClassLabelRequest) CType() FlowRSVPPathObjectsLabelRequestCType { + if obj.obj.CType == nil { + obj.obj.CType = NewFlowRSVPPathObjectsLabelRequestCType().msg() + } + if obj.cTypeHolder == nil { + obj.cTypeHolder = &flowRSVPPathObjectsLabelRequestCType{obj: obj.obj.CType} + } + return obj.cTypeHolder +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsLabelRequestCType +func (obj *flowRSVPPathObjectsClassLabelRequest) HasCType() bool { + return obj.obj.CType != nil +} + +// description is TBD +// SetCType sets the FlowRSVPPathObjectsLabelRequestCType value in the FlowRSVPPathObjectsClassLabelRequest object +func (obj *flowRSVPPathObjectsClassLabelRequest) SetCType(value FlowRSVPPathObjectsLabelRequestCType) FlowRSVPPathObjectsClassLabelRequest { + + obj.cTypeHolder = nil + obj.obj.CType = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsClassLabelRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.CType != nil { + + obj.CType().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsClassLabelRequest) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_objects_class_record_route.go b/gosnappi/flow_rsvp_path_objects_class_record_route.go new file mode 100644 index 00000000..555f7a79 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_class_record_route.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsClassRecordRoute ***** +type flowRSVPPathObjectsClassRecordRoute struct { + validation + obj *otg.FlowRSVPPathObjectsClassRecordRoute + marshaller marshalFlowRSVPPathObjectsClassRecordRoute + unMarshaller unMarshalFlowRSVPPathObjectsClassRecordRoute + lengthHolder FlowRSVPObjectLength + cTypeHolder FlowRSVPPathObjectsRecordRouteCType +} + +func NewFlowRSVPPathObjectsClassRecordRoute() FlowRSVPPathObjectsClassRecordRoute { + obj := flowRSVPPathObjectsClassRecordRoute{obj: &otg.FlowRSVPPathObjectsClassRecordRoute{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsClassRecordRoute) msg() *otg.FlowRSVPPathObjectsClassRecordRoute { + return obj.obj +} + +func (obj *flowRSVPPathObjectsClassRecordRoute) setMsg(msg *otg.FlowRSVPPathObjectsClassRecordRoute) FlowRSVPPathObjectsClassRecordRoute { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsClassRecordRoute struct { + obj *flowRSVPPathObjectsClassRecordRoute +} + +type marshalFlowRSVPPathObjectsClassRecordRoute interface { + // ToProto marshals FlowRSVPPathObjectsClassRecordRoute to protobuf object *otg.FlowRSVPPathObjectsClassRecordRoute + ToProto() (*otg.FlowRSVPPathObjectsClassRecordRoute, error) + // ToPbText marshals FlowRSVPPathObjectsClassRecordRoute to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsClassRecordRoute to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsClassRecordRoute to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsClassRecordRoute struct { + obj *flowRSVPPathObjectsClassRecordRoute +} + +type unMarshalFlowRSVPPathObjectsClassRecordRoute interface { + // FromProto unmarshals FlowRSVPPathObjectsClassRecordRoute from protobuf object *otg.FlowRSVPPathObjectsClassRecordRoute + FromProto(msg *otg.FlowRSVPPathObjectsClassRecordRoute) (FlowRSVPPathObjectsClassRecordRoute, error) + // FromPbText unmarshals FlowRSVPPathObjectsClassRecordRoute from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsClassRecordRoute from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsClassRecordRoute from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsClassRecordRoute) Marshal() marshalFlowRSVPPathObjectsClassRecordRoute { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsClassRecordRoute{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsClassRecordRoute) Unmarshal() unMarshalFlowRSVPPathObjectsClassRecordRoute { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsClassRecordRoute{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsClassRecordRoute) ToProto() (*otg.FlowRSVPPathObjectsClassRecordRoute, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassRecordRoute) FromProto(msg *otg.FlowRSVPPathObjectsClassRecordRoute) (FlowRSVPPathObjectsClassRecordRoute, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsClassRecordRoute) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassRecordRoute) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsClassRecordRoute) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassRecordRoute) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsClassRecordRoute) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassRecordRoute) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsClassRecordRoute) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassRecordRoute) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassRecordRoute) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsClassRecordRoute) Clone() (FlowRSVPPathObjectsClassRecordRoute, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsClassRecordRoute() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsClassRecordRoute) setNil() { + obj.lengthHolder = nil + obj.cTypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsClassRecordRoute is c-Type is specific to a class num. +type FlowRSVPPathObjectsClassRecordRoute interface { + Validation + // msg marshals FlowRSVPPathObjectsClassRecordRoute to protobuf object *otg.FlowRSVPPathObjectsClassRecordRoute + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsClassRecordRoute + // setMsg unmarshals FlowRSVPPathObjectsClassRecordRoute from protobuf object *otg.FlowRSVPPathObjectsClassRecordRoute + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsClassRecordRoute) FlowRSVPPathObjectsClassRecordRoute + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsClassRecordRoute + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsClassRecordRoute + // validate validates FlowRSVPPathObjectsClassRecordRoute + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsClassRecordRoute, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Length returns FlowRSVPObjectLength, set in FlowRSVPPathObjectsClassRecordRoute. + // FlowRSVPObjectLength is description is TBD + Length() FlowRSVPObjectLength + // SetLength assigns FlowRSVPObjectLength provided by user to FlowRSVPPathObjectsClassRecordRoute. + // FlowRSVPObjectLength is description is TBD + SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassRecordRoute + // HasLength checks if Length has been set in FlowRSVPPathObjectsClassRecordRoute + HasLength() bool + // CType returns FlowRSVPPathObjectsRecordRouteCType, set in FlowRSVPPathObjectsClassRecordRoute. + // FlowRSVPPathObjectsRecordRouteCType is object for RECORD_ROUTE class. c-type is Type 1 Route Record (1). + CType() FlowRSVPPathObjectsRecordRouteCType + // SetCType assigns FlowRSVPPathObjectsRecordRouteCType provided by user to FlowRSVPPathObjectsClassRecordRoute. + // FlowRSVPPathObjectsRecordRouteCType is object for RECORD_ROUTE class. c-type is Type 1 Route Record (1). + SetCType(value FlowRSVPPathObjectsRecordRouteCType) FlowRSVPPathObjectsClassRecordRoute + // HasCType checks if CType has been set in FlowRSVPPathObjectsClassRecordRoute + HasCType() bool + setNil() +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassRecordRoute) Length() FlowRSVPObjectLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowRSVPObjectLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowRSVPObjectLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassRecordRoute) HasLength() bool { + return obj.obj.Length != nil +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// SetLength sets the FlowRSVPObjectLength value in the FlowRSVPPathObjectsClassRecordRoute object +func (obj *flowRSVPPathObjectsClassRecordRoute) SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassRecordRoute { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsRecordRouteCType +func (obj *flowRSVPPathObjectsClassRecordRoute) CType() FlowRSVPPathObjectsRecordRouteCType { + if obj.obj.CType == nil { + obj.obj.CType = NewFlowRSVPPathObjectsRecordRouteCType().msg() + } + if obj.cTypeHolder == nil { + obj.cTypeHolder = &flowRSVPPathObjectsRecordRouteCType{obj: obj.obj.CType} + } + return obj.cTypeHolder +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsRecordRouteCType +func (obj *flowRSVPPathObjectsClassRecordRoute) HasCType() bool { + return obj.obj.CType != nil +} + +// description is TBD +// SetCType sets the FlowRSVPPathObjectsRecordRouteCType value in the FlowRSVPPathObjectsClassRecordRoute object +func (obj *flowRSVPPathObjectsClassRecordRoute) SetCType(value FlowRSVPPathObjectsRecordRouteCType) FlowRSVPPathObjectsClassRecordRoute { + + obj.cTypeHolder = nil + obj.obj.CType = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsClassRecordRoute) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.CType != nil { + + obj.CType().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsClassRecordRoute) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_objects_class_rsvp_hop.go b/gosnappi/flow_rsvp_path_objects_class_rsvp_hop.go new file mode 100644 index 00000000..43074331 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_class_rsvp_hop.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsClassRsvpHop ***** +type flowRSVPPathObjectsClassRsvpHop struct { + validation + obj *otg.FlowRSVPPathObjectsClassRsvpHop + marshaller marshalFlowRSVPPathObjectsClassRsvpHop + unMarshaller unMarshalFlowRSVPPathObjectsClassRsvpHop + lengthHolder FlowRSVPObjectLength + cTypeHolder FlowRSVPPathObjectsRsvpHopCType +} + +func NewFlowRSVPPathObjectsClassRsvpHop() FlowRSVPPathObjectsClassRsvpHop { + obj := flowRSVPPathObjectsClassRsvpHop{obj: &otg.FlowRSVPPathObjectsClassRsvpHop{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsClassRsvpHop) msg() *otg.FlowRSVPPathObjectsClassRsvpHop { + return obj.obj +} + +func (obj *flowRSVPPathObjectsClassRsvpHop) setMsg(msg *otg.FlowRSVPPathObjectsClassRsvpHop) FlowRSVPPathObjectsClassRsvpHop { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsClassRsvpHop struct { + obj *flowRSVPPathObjectsClassRsvpHop +} + +type marshalFlowRSVPPathObjectsClassRsvpHop interface { + // ToProto marshals FlowRSVPPathObjectsClassRsvpHop to protobuf object *otg.FlowRSVPPathObjectsClassRsvpHop + ToProto() (*otg.FlowRSVPPathObjectsClassRsvpHop, error) + // ToPbText marshals FlowRSVPPathObjectsClassRsvpHop to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsClassRsvpHop to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsClassRsvpHop to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsClassRsvpHop struct { + obj *flowRSVPPathObjectsClassRsvpHop +} + +type unMarshalFlowRSVPPathObjectsClassRsvpHop interface { + // FromProto unmarshals FlowRSVPPathObjectsClassRsvpHop from protobuf object *otg.FlowRSVPPathObjectsClassRsvpHop + FromProto(msg *otg.FlowRSVPPathObjectsClassRsvpHop) (FlowRSVPPathObjectsClassRsvpHop, error) + // FromPbText unmarshals FlowRSVPPathObjectsClassRsvpHop from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsClassRsvpHop from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsClassRsvpHop from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsClassRsvpHop) Marshal() marshalFlowRSVPPathObjectsClassRsvpHop { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsClassRsvpHop{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsClassRsvpHop) Unmarshal() unMarshalFlowRSVPPathObjectsClassRsvpHop { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsClassRsvpHop{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsClassRsvpHop) ToProto() (*otg.FlowRSVPPathObjectsClassRsvpHop, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassRsvpHop) FromProto(msg *otg.FlowRSVPPathObjectsClassRsvpHop) (FlowRSVPPathObjectsClassRsvpHop, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsClassRsvpHop) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassRsvpHop) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsClassRsvpHop) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassRsvpHop) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsClassRsvpHop) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassRsvpHop) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsClassRsvpHop) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassRsvpHop) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassRsvpHop) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsClassRsvpHop) Clone() (FlowRSVPPathObjectsClassRsvpHop, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsClassRsvpHop() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsClassRsvpHop) setNil() { + obj.lengthHolder = nil + obj.cTypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsClassRsvpHop is c-Type is specific to a class num. +type FlowRSVPPathObjectsClassRsvpHop interface { + Validation + // msg marshals FlowRSVPPathObjectsClassRsvpHop to protobuf object *otg.FlowRSVPPathObjectsClassRsvpHop + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsClassRsvpHop + // setMsg unmarshals FlowRSVPPathObjectsClassRsvpHop from protobuf object *otg.FlowRSVPPathObjectsClassRsvpHop + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsClassRsvpHop) FlowRSVPPathObjectsClassRsvpHop + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsClassRsvpHop + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsClassRsvpHop + // validate validates FlowRSVPPathObjectsClassRsvpHop + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsClassRsvpHop, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Length returns FlowRSVPObjectLength, set in FlowRSVPPathObjectsClassRsvpHop. + // FlowRSVPObjectLength is description is TBD + Length() FlowRSVPObjectLength + // SetLength assigns FlowRSVPObjectLength provided by user to FlowRSVPPathObjectsClassRsvpHop. + // FlowRSVPObjectLength is description is TBD + SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassRsvpHop + // HasLength checks if Length has been set in FlowRSVPPathObjectsClassRsvpHop + HasLength() bool + // CType returns FlowRSVPPathObjectsRsvpHopCType, set in FlowRSVPPathObjectsClassRsvpHop. + // FlowRSVPPathObjectsRsvpHopCType is object for RSVP_HOP class. Currently supported c-type is IPv4 (1). + CType() FlowRSVPPathObjectsRsvpHopCType + // SetCType assigns FlowRSVPPathObjectsRsvpHopCType provided by user to FlowRSVPPathObjectsClassRsvpHop. + // FlowRSVPPathObjectsRsvpHopCType is object for RSVP_HOP class. Currently supported c-type is IPv4 (1). + SetCType(value FlowRSVPPathObjectsRsvpHopCType) FlowRSVPPathObjectsClassRsvpHop + // HasCType checks if CType has been set in FlowRSVPPathObjectsClassRsvpHop + HasCType() bool + setNil() +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassRsvpHop) Length() FlowRSVPObjectLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowRSVPObjectLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowRSVPObjectLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassRsvpHop) HasLength() bool { + return obj.obj.Length != nil +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// SetLength sets the FlowRSVPObjectLength value in the FlowRSVPPathObjectsClassRsvpHop object +func (obj *flowRSVPPathObjectsClassRsvpHop) SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassRsvpHop { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsRsvpHopCType +func (obj *flowRSVPPathObjectsClassRsvpHop) CType() FlowRSVPPathObjectsRsvpHopCType { + if obj.obj.CType == nil { + obj.obj.CType = NewFlowRSVPPathObjectsRsvpHopCType().msg() + } + if obj.cTypeHolder == nil { + obj.cTypeHolder = &flowRSVPPathObjectsRsvpHopCType{obj: obj.obj.CType} + } + return obj.cTypeHolder +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsRsvpHopCType +func (obj *flowRSVPPathObjectsClassRsvpHop) HasCType() bool { + return obj.obj.CType != nil +} + +// description is TBD +// SetCType sets the FlowRSVPPathObjectsRsvpHopCType value in the FlowRSVPPathObjectsClassRsvpHop object +func (obj *flowRSVPPathObjectsClassRsvpHop) SetCType(value FlowRSVPPathObjectsRsvpHopCType) FlowRSVPPathObjectsClassRsvpHop { + + obj.cTypeHolder = nil + obj.obj.CType = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsClassRsvpHop) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.CType != nil { + + obj.CType().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsClassRsvpHop) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_objects_class_sender_template.go b/gosnappi/flow_rsvp_path_objects_class_sender_template.go new file mode 100644 index 00000000..b69684ef --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_class_sender_template.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsClassSenderTemplate ***** +type flowRSVPPathObjectsClassSenderTemplate struct { + validation + obj *otg.FlowRSVPPathObjectsClassSenderTemplate + marshaller marshalFlowRSVPPathObjectsClassSenderTemplate + unMarshaller unMarshalFlowRSVPPathObjectsClassSenderTemplate + lengthHolder FlowRSVPObjectLength + cTypeHolder FlowRSVPPathObjectsSenderTemplateCType +} + +func NewFlowRSVPPathObjectsClassSenderTemplate() FlowRSVPPathObjectsClassSenderTemplate { + obj := flowRSVPPathObjectsClassSenderTemplate{obj: &otg.FlowRSVPPathObjectsClassSenderTemplate{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsClassSenderTemplate) msg() *otg.FlowRSVPPathObjectsClassSenderTemplate { + return obj.obj +} + +func (obj *flowRSVPPathObjectsClassSenderTemplate) setMsg(msg *otg.FlowRSVPPathObjectsClassSenderTemplate) FlowRSVPPathObjectsClassSenderTemplate { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsClassSenderTemplate struct { + obj *flowRSVPPathObjectsClassSenderTemplate +} + +type marshalFlowRSVPPathObjectsClassSenderTemplate interface { + // ToProto marshals FlowRSVPPathObjectsClassSenderTemplate to protobuf object *otg.FlowRSVPPathObjectsClassSenderTemplate + ToProto() (*otg.FlowRSVPPathObjectsClassSenderTemplate, error) + // ToPbText marshals FlowRSVPPathObjectsClassSenderTemplate to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsClassSenderTemplate to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsClassSenderTemplate to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsClassSenderTemplate struct { + obj *flowRSVPPathObjectsClassSenderTemplate +} + +type unMarshalFlowRSVPPathObjectsClassSenderTemplate interface { + // FromProto unmarshals FlowRSVPPathObjectsClassSenderTemplate from protobuf object *otg.FlowRSVPPathObjectsClassSenderTemplate + FromProto(msg *otg.FlowRSVPPathObjectsClassSenderTemplate) (FlowRSVPPathObjectsClassSenderTemplate, error) + // FromPbText unmarshals FlowRSVPPathObjectsClassSenderTemplate from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsClassSenderTemplate from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsClassSenderTemplate from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsClassSenderTemplate) Marshal() marshalFlowRSVPPathObjectsClassSenderTemplate { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsClassSenderTemplate{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsClassSenderTemplate) Unmarshal() unMarshalFlowRSVPPathObjectsClassSenderTemplate { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsClassSenderTemplate{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsClassSenderTemplate) ToProto() (*otg.FlowRSVPPathObjectsClassSenderTemplate, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSenderTemplate) FromProto(msg *otg.FlowRSVPPathObjectsClassSenderTemplate) (FlowRSVPPathObjectsClassSenderTemplate, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsClassSenderTemplate) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSenderTemplate) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsClassSenderTemplate) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSenderTemplate) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsClassSenderTemplate) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSenderTemplate) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsClassSenderTemplate) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassSenderTemplate) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassSenderTemplate) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsClassSenderTemplate) Clone() (FlowRSVPPathObjectsClassSenderTemplate, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsClassSenderTemplate() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsClassSenderTemplate) setNil() { + obj.lengthHolder = nil + obj.cTypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsClassSenderTemplate is c-Type is specific to a class num. +type FlowRSVPPathObjectsClassSenderTemplate interface { + Validation + // msg marshals FlowRSVPPathObjectsClassSenderTemplate to protobuf object *otg.FlowRSVPPathObjectsClassSenderTemplate + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsClassSenderTemplate + // setMsg unmarshals FlowRSVPPathObjectsClassSenderTemplate from protobuf object *otg.FlowRSVPPathObjectsClassSenderTemplate + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsClassSenderTemplate) FlowRSVPPathObjectsClassSenderTemplate + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsClassSenderTemplate + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsClassSenderTemplate + // validate validates FlowRSVPPathObjectsClassSenderTemplate + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsClassSenderTemplate, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Length returns FlowRSVPObjectLength, set in FlowRSVPPathObjectsClassSenderTemplate. + // FlowRSVPObjectLength is description is TBD + Length() FlowRSVPObjectLength + // SetLength assigns FlowRSVPObjectLength provided by user to FlowRSVPPathObjectsClassSenderTemplate. + // FlowRSVPObjectLength is description is TBD + SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassSenderTemplate + // HasLength checks if Length has been set in FlowRSVPPathObjectsClassSenderTemplate + HasLength() bool + // CType returns FlowRSVPPathObjectsSenderTemplateCType, set in FlowRSVPPathObjectsClassSenderTemplate. + // FlowRSVPPathObjectsSenderTemplateCType is object for SENDER_TEMPLATE class. Currently supported c-type is LSP Tunnel IPv4 (7). + CType() FlowRSVPPathObjectsSenderTemplateCType + // SetCType assigns FlowRSVPPathObjectsSenderTemplateCType provided by user to FlowRSVPPathObjectsClassSenderTemplate. + // FlowRSVPPathObjectsSenderTemplateCType is object for SENDER_TEMPLATE class. Currently supported c-type is LSP Tunnel IPv4 (7). + SetCType(value FlowRSVPPathObjectsSenderTemplateCType) FlowRSVPPathObjectsClassSenderTemplate + // HasCType checks if CType has been set in FlowRSVPPathObjectsClassSenderTemplate + HasCType() bool + setNil() +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassSenderTemplate) Length() FlowRSVPObjectLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowRSVPObjectLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowRSVPObjectLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassSenderTemplate) HasLength() bool { + return obj.obj.Length != nil +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// SetLength sets the FlowRSVPObjectLength value in the FlowRSVPPathObjectsClassSenderTemplate object +func (obj *flowRSVPPathObjectsClassSenderTemplate) SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassSenderTemplate { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsSenderTemplateCType +func (obj *flowRSVPPathObjectsClassSenderTemplate) CType() FlowRSVPPathObjectsSenderTemplateCType { + if obj.obj.CType == nil { + obj.obj.CType = NewFlowRSVPPathObjectsSenderTemplateCType().msg() + } + if obj.cTypeHolder == nil { + obj.cTypeHolder = &flowRSVPPathObjectsSenderTemplateCType{obj: obj.obj.CType} + } + return obj.cTypeHolder +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsSenderTemplateCType +func (obj *flowRSVPPathObjectsClassSenderTemplate) HasCType() bool { + return obj.obj.CType != nil +} + +// description is TBD +// SetCType sets the FlowRSVPPathObjectsSenderTemplateCType value in the FlowRSVPPathObjectsClassSenderTemplate object +func (obj *flowRSVPPathObjectsClassSenderTemplate) SetCType(value FlowRSVPPathObjectsSenderTemplateCType) FlowRSVPPathObjectsClassSenderTemplate { + + obj.cTypeHolder = nil + obj.obj.CType = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsClassSenderTemplate) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.CType != nil { + + obj.CType().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsClassSenderTemplate) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_objects_class_sender_tspec.go b/gosnappi/flow_rsvp_path_objects_class_sender_tspec.go new file mode 100644 index 00000000..d3b2fba5 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_class_sender_tspec.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsClassSenderTspec ***** +type flowRSVPPathObjectsClassSenderTspec struct { + validation + obj *otg.FlowRSVPPathObjectsClassSenderTspec + marshaller marshalFlowRSVPPathObjectsClassSenderTspec + unMarshaller unMarshalFlowRSVPPathObjectsClassSenderTspec + lengthHolder FlowRSVPObjectLength + cTypeHolder FlowRSVPPathObjectsSenderTspecCType +} + +func NewFlowRSVPPathObjectsClassSenderTspec() FlowRSVPPathObjectsClassSenderTspec { + obj := flowRSVPPathObjectsClassSenderTspec{obj: &otg.FlowRSVPPathObjectsClassSenderTspec{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsClassSenderTspec) msg() *otg.FlowRSVPPathObjectsClassSenderTspec { + return obj.obj +} + +func (obj *flowRSVPPathObjectsClassSenderTspec) setMsg(msg *otg.FlowRSVPPathObjectsClassSenderTspec) FlowRSVPPathObjectsClassSenderTspec { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsClassSenderTspec struct { + obj *flowRSVPPathObjectsClassSenderTspec +} + +type marshalFlowRSVPPathObjectsClassSenderTspec interface { + // ToProto marshals FlowRSVPPathObjectsClassSenderTspec to protobuf object *otg.FlowRSVPPathObjectsClassSenderTspec + ToProto() (*otg.FlowRSVPPathObjectsClassSenderTspec, error) + // ToPbText marshals FlowRSVPPathObjectsClassSenderTspec to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsClassSenderTspec to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsClassSenderTspec to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsClassSenderTspec struct { + obj *flowRSVPPathObjectsClassSenderTspec +} + +type unMarshalFlowRSVPPathObjectsClassSenderTspec interface { + // FromProto unmarshals FlowRSVPPathObjectsClassSenderTspec from protobuf object *otg.FlowRSVPPathObjectsClassSenderTspec + FromProto(msg *otg.FlowRSVPPathObjectsClassSenderTspec) (FlowRSVPPathObjectsClassSenderTspec, error) + // FromPbText unmarshals FlowRSVPPathObjectsClassSenderTspec from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsClassSenderTspec from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsClassSenderTspec from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsClassSenderTspec) Marshal() marshalFlowRSVPPathObjectsClassSenderTspec { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsClassSenderTspec{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsClassSenderTspec) Unmarshal() unMarshalFlowRSVPPathObjectsClassSenderTspec { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsClassSenderTspec{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsClassSenderTspec) ToProto() (*otg.FlowRSVPPathObjectsClassSenderTspec, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSenderTspec) FromProto(msg *otg.FlowRSVPPathObjectsClassSenderTspec) (FlowRSVPPathObjectsClassSenderTspec, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsClassSenderTspec) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSenderTspec) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsClassSenderTspec) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSenderTspec) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsClassSenderTspec) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSenderTspec) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsClassSenderTspec) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassSenderTspec) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassSenderTspec) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsClassSenderTspec) Clone() (FlowRSVPPathObjectsClassSenderTspec, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsClassSenderTspec() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsClassSenderTspec) setNil() { + obj.lengthHolder = nil + obj.cTypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsClassSenderTspec is c-Type is specific to a class num. +type FlowRSVPPathObjectsClassSenderTspec interface { + Validation + // msg marshals FlowRSVPPathObjectsClassSenderTspec to protobuf object *otg.FlowRSVPPathObjectsClassSenderTspec + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsClassSenderTspec + // setMsg unmarshals FlowRSVPPathObjectsClassSenderTspec from protobuf object *otg.FlowRSVPPathObjectsClassSenderTspec + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsClassSenderTspec) FlowRSVPPathObjectsClassSenderTspec + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsClassSenderTspec + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsClassSenderTspec + // validate validates FlowRSVPPathObjectsClassSenderTspec + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsClassSenderTspec, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Length returns FlowRSVPObjectLength, set in FlowRSVPPathObjectsClassSenderTspec. + // FlowRSVPObjectLength is description is TBD + Length() FlowRSVPObjectLength + // SetLength assigns FlowRSVPObjectLength provided by user to FlowRSVPPathObjectsClassSenderTspec. + // FlowRSVPObjectLength is description is TBD + SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassSenderTspec + // HasLength checks if Length has been set in FlowRSVPPathObjectsClassSenderTspec + HasLength() bool + // CType returns FlowRSVPPathObjectsSenderTspecCType, set in FlowRSVPPathObjectsClassSenderTspec. + // FlowRSVPPathObjectsSenderTspecCType is object for SENDER_TSPEC class. Currently supported c-type is int-serv (2). + CType() FlowRSVPPathObjectsSenderTspecCType + // SetCType assigns FlowRSVPPathObjectsSenderTspecCType provided by user to FlowRSVPPathObjectsClassSenderTspec. + // FlowRSVPPathObjectsSenderTspecCType is object for SENDER_TSPEC class. Currently supported c-type is int-serv (2). + SetCType(value FlowRSVPPathObjectsSenderTspecCType) FlowRSVPPathObjectsClassSenderTspec + // HasCType checks if CType has been set in FlowRSVPPathObjectsClassSenderTspec + HasCType() bool + setNil() +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassSenderTspec) Length() FlowRSVPObjectLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowRSVPObjectLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowRSVPObjectLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassSenderTspec) HasLength() bool { + return obj.obj.Length != nil +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// SetLength sets the FlowRSVPObjectLength value in the FlowRSVPPathObjectsClassSenderTspec object +func (obj *flowRSVPPathObjectsClassSenderTspec) SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassSenderTspec { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsSenderTspecCType +func (obj *flowRSVPPathObjectsClassSenderTspec) CType() FlowRSVPPathObjectsSenderTspecCType { + if obj.obj.CType == nil { + obj.obj.CType = NewFlowRSVPPathObjectsSenderTspecCType().msg() + } + if obj.cTypeHolder == nil { + obj.cTypeHolder = &flowRSVPPathObjectsSenderTspecCType{obj: obj.obj.CType} + } + return obj.cTypeHolder +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsSenderTspecCType +func (obj *flowRSVPPathObjectsClassSenderTspec) HasCType() bool { + return obj.obj.CType != nil +} + +// description is TBD +// SetCType sets the FlowRSVPPathObjectsSenderTspecCType value in the FlowRSVPPathObjectsClassSenderTspec object +func (obj *flowRSVPPathObjectsClassSenderTspec) SetCType(value FlowRSVPPathObjectsSenderTspecCType) FlowRSVPPathObjectsClassSenderTspec { + + obj.cTypeHolder = nil + obj.obj.CType = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsClassSenderTspec) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.CType != nil { + + obj.CType().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsClassSenderTspec) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_objects_class_session.go b/gosnappi/flow_rsvp_path_objects_class_session.go new file mode 100644 index 00000000..1f9c86d6 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_class_session.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsClassSession ***** +type flowRSVPPathObjectsClassSession struct { + validation + obj *otg.FlowRSVPPathObjectsClassSession + marshaller marshalFlowRSVPPathObjectsClassSession + unMarshaller unMarshalFlowRSVPPathObjectsClassSession + lengthHolder FlowRSVPObjectLength + cTypeHolder FlowRSVPPathObjectsSessionCType +} + +func NewFlowRSVPPathObjectsClassSession() FlowRSVPPathObjectsClassSession { + obj := flowRSVPPathObjectsClassSession{obj: &otg.FlowRSVPPathObjectsClassSession{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsClassSession) msg() *otg.FlowRSVPPathObjectsClassSession { + return obj.obj +} + +func (obj *flowRSVPPathObjectsClassSession) setMsg(msg *otg.FlowRSVPPathObjectsClassSession) FlowRSVPPathObjectsClassSession { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsClassSession struct { + obj *flowRSVPPathObjectsClassSession +} + +type marshalFlowRSVPPathObjectsClassSession interface { + // ToProto marshals FlowRSVPPathObjectsClassSession to protobuf object *otg.FlowRSVPPathObjectsClassSession + ToProto() (*otg.FlowRSVPPathObjectsClassSession, error) + // ToPbText marshals FlowRSVPPathObjectsClassSession to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsClassSession to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsClassSession to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsClassSession struct { + obj *flowRSVPPathObjectsClassSession +} + +type unMarshalFlowRSVPPathObjectsClassSession interface { + // FromProto unmarshals FlowRSVPPathObjectsClassSession from protobuf object *otg.FlowRSVPPathObjectsClassSession + FromProto(msg *otg.FlowRSVPPathObjectsClassSession) (FlowRSVPPathObjectsClassSession, error) + // FromPbText unmarshals FlowRSVPPathObjectsClassSession from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsClassSession from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsClassSession from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsClassSession) Marshal() marshalFlowRSVPPathObjectsClassSession { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsClassSession{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsClassSession) Unmarshal() unMarshalFlowRSVPPathObjectsClassSession { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsClassSession{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsClassSession) ToProto() (*otg.FlowRSVPPathObjectsClassSession, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSession) FromProto(msg *otg.FlowRSVPPathObjectsClassSession) (FlowRSVPPathObjectsClassSession, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsClassSession) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSession) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsClassSession) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSession) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsClassSession) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSession) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsClassSession) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassSession) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassSession) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsClassSession) Clone() (FlowRSVPPathObjectsClassSession, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsClassSession() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsClassSession) setNil() { + obj.lengthHolder = nil + obj.cTypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsClassSession is c-Type is specific to a class num. +type FlowRSVPPathObjectsClassSession interface { + Validation + // msg marshals FlowRSVPPathObjectsClassSession to protobuf object *otg.FlowRSVPPathObjectsClassSession + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsClassSession + // setMsg unmarshals FlowRSVPPathObjectsClassSession from protobuf object *otg.FlowRSVPPathObjectsClassSession + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsClassSession) FlowRSVPPathObjectsClassSession + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsClassSession + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsClassSession + // validate validates FlowRSVPPathObjectsClassSession + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsClassSession, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Length returns FlowRSVPObjectLength, set in FlowRSVPPathObjectsClassSession. + // FlowRSVPObjectLength is description is TBD + Length() FlowRSVPObjectLength + // SetLength assigns FlowRSVPObjectLength provided by user to FlowRSVPPathObjectsClassSession. + // FlowRSVPObjectLength is description is TBD + SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassSession + // HasLength checks if Length has been set in FlowRSVPPathObjectsClassSession + HasLength() bool + // CType returns FlowRSVPPathObjectsSessionCType, set in FlowRSVPPathObjectsClassSession. + // FlowRSVPPathObjectsSessionCType is the body of an object corresponding to the class number and c-type. Currently supported c-type for SESSION object is LSP Tunnel IPv4 (7). + CType() FlowRSVPPathObjectsSessionCType + // SetCType assigns FlowRSVPPathObjectsSessionCType provided by user to FlowRSVPPathObjectsClassSession. + // FlowRSVPPathObjectsSessionCType is the body of an object corresponding to the class number and c-type. Currently supported c-type for SESSION object is LSP Tunnel IPv4 (7). + SetCType(value FlowRSVPPathObjectsSessionCType) FlowRSVPPathObjectsClassSession + // HasCType checks if CType has been set in FlowRSVPPathObjectsClassSession + HasCType() bool + setNil() +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassSession) Length() FlowRSVPObjectLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowRSVPObjectLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowRSVPObjectLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassSession) HasLength() bool { + return obj.obj.Length != nil +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// SetLength sets the FlowRSVPObjectLength value in the FlowRSVPPathObjectsClassSession object +func (obj *flowRSVPPathObjectsClassSession) SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassSession { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsSessionCType +func (obj *flowRSVPPathObjectsClassSession) CType() FlowRSVPPathObjectsSessionCType { + if obj.obj.CType == nil { + obj.obj.CType = NewFlowRSVPPathObjectsSessionCType().msg() + } + if obj.cTypeHolder == nil { + obj.cTypeHolder = &flowRSVPPathObjectsSessionCType{obj: obj.obj.CType} + } + return obj.cTypeHolder +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsSessionCType +func (obj *flowRSVPPathObjectsClassSession) HasCType() bool { + return obj.obj.CType != nil +} + +// description is TBD +// SetCType sets the FlowRSVPPathObjectsSessionCType value in the FlowRSVPPathObjectsClassSession object +func (obj *flowRSVPPathObjectsClassSession) SetCType(value FlowRSVPPathObjectsSessionCType) FlowRSVPPathObjectsClassSession { + + obj.cTypeHolder = nil + obj.obj.CType = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsClassSession) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.CType != nil { + + obj.CType().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsClassSession) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_objects_class_session_attribute.go b/gosnappi/flow_rsvp_path_objects_class_session_attribute.go new file mode 100644 index 00000000..c90f4fbd --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_class_session_attribute.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsClassSessionAttribute ***** +type flowRSVPPathObjectsClassSessionAttribute struct { + validation + obj *otg.FlowRSVPPathObjectsClassSessionAttribute + marshaller marshalFlowRSVPPathObjectsClassSessionAttribute + unMarshaller unMarshalFlowRSVPPathObjectsClassSessionAttribute + lengthHolder FlowRSVPObjectLength + cTypeHolder FlowRSVPPathObjectsSessionAttributeCType +} + +func NewFlowRSVPPathObjectsClassSessionAttribute() FlowRSVPPathObjectsClassSessionAttribute { + obj := flowRSVPPathObjectsClassSessionAttribute{obj: &otg.FlowRSVPPathObjectsClassSessionAttribute{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsClassSessionAttribute) msg() *otg.FlowRSVPPathObjectsClassSessionAttribute { + return obj.obj +} + +func (obj *flowRSVPPathObjectsClassSessionAttribute) setMsg(msg *otg.FlowRSVPPathObjectsClassSessionAttribute) FlowRSVPPathObjectsClassSessionAttribute { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsClassSessionAttribute struct { + obj *flowRSVPPathObjectsClassSessionAttribute +} + +type marshalFlowRSVPPathObjectsClassSessionAttribute interface { + // ToProto marshals FlowRSVPPathObjectsClassSessionAttribute to protobuf object *otg.FlowRSVPPathObjectsClassSessionAttribute + ToProto() (*otg.FlowRSVPPathObjectsClassSessionAttribute, error) + // ToPbText marshals FlowRSVPPathObjectsClassSessionAttribute to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsClassSessionAttribute to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsClassSessionAttribute to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsClassSessionAttribute struct { + obj *flowRSVPPathObjectsClassSessionAttribute +} + +type unMarshalFlowRSVPPathObjectsClassSessionAttribute interface { + // FromProto unmarshals FlowRSVPPathObjectsClassSessionAttribute from protobuf object *otg.FlowRSVPPathObjectsClassSessionAttribute + FromProto(msg *otg.FlowRSVPPathObjectsClassSessionAttribute) (FlowRSVPPathObjectsClassSessionAttribute, error) + // FromPbText unmarshals FlowRSVPPathObjectsClassSessionAttribute from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsClassSessionAttribute from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsClassSessionAttribute from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsClassSessionAttribute) Marshal() marshalFlowRSVPPathObjectsClassSessionAttribute { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsClassSessionAttribute{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsClassSessionAttribute) Unmarshal() unMarshalFlowRSVPPathObjectsClassSessionAttribute { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsClassSessionAttribute{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsClassSessionAttribute) ToProto() (*otg.FlowRSVPPathObjectsClassSessionAttribute, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSessionAttribute) FromProto(msg *otg.FlowRSVPPathObjectsClassSessionAttribute) (FlowRSVPPathObjectsClassSessionAttribute, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsClassSessionAttribute) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSessionAttribute) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsClassSessionAttribute) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSessionAttribute) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsClassSessionAttribute) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassSessionAttribute) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsClassSessionAttribute) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassSessionAttribute) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassSessionAttribute) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsClassSessionAttribute) Clone() (FlowRSVPPathObjectsClassSessionAttribute, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsClassSessionAttribute() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsClassSessionAttribute) setNil() { + obj.lengthHolder = nil + obj.cTypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsClassSessionAttribute is c-Type is specific to a class num. +type FlowRSVPPathObjectsClassSessionAttribute interface { + Validation + // msg marshals FlowRSVPPathObjectsClassSessionAttribute to protobuf object *otg.FlowRSVPPathObjectsClassSessionAttribute + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsClassSessionAttribute + // setMsg unmarshals FlowRSVPPathObjectsClassSessionAttribute from protobuf object *otg.FlowRSVPPathObjectsClassSessionAttribute + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsClassSessionAttribute) FlowRSVPPathObjectsClassSessionAttribute + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsClassSessionAttribute + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsClassSessionAttribute + // validate validates FlowRSVPPathObjectsClassSessionAttribute + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsClassSessionAttribute, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Length returns FlowRSVPObjectLength, set in FlowRSVPPathObjectsClassSessionAttribute. + // FlowRSVPObjectLength is description is TBD + Length() FlowRSVPObjectLength + // SetLength assigns FlowRSVPObjectLength provided by user to FlowRSVPPathObjectsClassSessionAttribute. + // FlowRSVPObjectLength is description is TBD + SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassSessionAttribute + // HasLength checks if Length has been set in FlowRSVPPathObjectsClassSessionAttribute + HasLength() bool + // CType returns FlowRSVPPathObjectsSessionAttributeCType, set in FlowRSVPPathObjectsClassSessionAttribute. + // FlowRSVPPathObjectsSessionAttributeCType is object for SESSION_ATTRIBUTE class. Currently supported c-type is LSP_Tunnel_RA (1) and LSP_Tunnel (7). + CType() FlowRSVPPathObjectsSessionAttributeCType + // SetCType assigns FlowRSVPPathObjectsSessionAttributeCType provided by user to FlowRSVPPathObjectsClassSessionAttribute. + // FlowRSVPPathObjectsSessionAttributeCType is object for SESSION_ATTRIBUTE class. Currently supported c-type is LSP_Tunnel_RA (1) and LSP_Tunnel (7). + SetCType(value FlowRSVPPathObjectsSessionAttributeCType) FlowRSVPPathObjectsClassSessionAttribute + // HasCType checks if CType has been set in FlowRSVPPathObjectsClassSessionAttribute + HasCType() bool + setNil() +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassSessionAttribute) Length() FlowRSVPObjectLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowRSVPObjectLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowRSVPObjectLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassSessionAttribute) HasLength() bool { + return obj.obj.Length != nil +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// SetLength sets the FlowRSVPObjectLength value in the FlowRSVPPathObjectsClassSessionAttribute object +func (obj *flowRSVPPathObjectsClassSessionAttribute) SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassSessionAttribute { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsSessionAttributeCType +func (obj *flowRSVPPathObjectsClassSessionAttribute) CType() FlowRSVPPathObjectsSessionAttributeCType { + if obj.obj.CType == nil { + obj.obj.CType = NewFlowRSVPPathObjectsSessionAttributeCType().msg() + } + if obj.cTypeHolder == nil { + obj.cTypeHolder = &flowRSVPPathObjectsSessionAttributeCType{obj: obj.obj.CType} + } + return obj.cTypeHolder +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsSessionAttributeCType +func (obj *flowRSVPPathObjectsClassSessionAttribute) HasCType() bool { + return obj.obj.CType != nil +} + +// description is TBD +// SetCType sets the FlowRSVPPathObjectsSessionAttributeCType value in the FlowRSVPPathObjectsClassSessionAttribute object +func (obj *flowRSVPPathObjectsClassSessionAttribute) SetCType(value FlowRSVPPathObjectsSessionAttributeCType) FlowRSVPPathObjectsClassSessionAttribute { + + obj.cTypeHolder = nil + obj.obj.CType = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsClassSessionAttribute) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.CType != nil { + + obj.CType().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsClassSessionAttribute) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_objects_class_time_values.go b/gosnappi/flow_rsvp_path_objects_class_time_values.go new file mode 100644 index 00000000..663074a8 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_class_time_values.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsClassTimeValues ***** +type flowRSVPPathObjectsClassTimeValues struct { + validation + obj *otg.FlowRSVPPathObjectsClassTimeValues + marshaller marshalFlowRSVPPathObjectsClassTimeValues + unMarshaller unMarshalFlowRSVPPathObjectsClassTimeValues + lengthHolder FlowRSVPObjectLength + cTypeHolder FlowRSVPPathObjectsTimeValuesCType +} + +func NewFlowRSVPPathObjectsClassTimeValues() FlowRSVPPathObjectsClassTimeValues { + obj := flowRSVPPathObjectsClassTimeValues{obj: &otg.FlowRSVPPathObjectsClassTimeValues{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsClassTimeValues) msg() *otg.FlowRSVPPathObjectsClassTimeValues { + return obj.obj +} + +func (obj *flowRSVPPathObjectsClassTimeValues) setMsg(msg *otg.FlowRSVPPathObjectsClassTimeValues) FlowRSVPPathObjectsClassTimeValues { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsClassTimeValues struct { + obj *flowRSVPPathObjectsClassTimeValues +} + +type marshalFlowRSVPPathObjectsClassTimeValues interface { + // ToProto marshals FlowRSVPPathObjectsClassTimeValues to protobuf object *otg.FlowRSVPPathObjectsClassTimeValues + ToProto() (*otg.FlowRSVPPathObjectsClassTimeValues, error) + // ToPbText marshals FlowRSVPPathObjectsClassTimeValues to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsClassTimeValues to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsClassTimeValues to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsClassTimeValues struct { + obj *flowRSVPPathObjectsClassTimeValues +} + +type unMarshalFlowRSVPPathObjectsClassTimeValues interface { + // FromProto unmarshals FlowRSVPPathObjectsClassTimeValues from protobuf object *otg.FlowRSVPPathObjectsClassTimeValues + FromProto(msg *otg.FlowRSVPPathObjectsClassTimeValues) (FlowRSVPPathObjectsClassTimeValues, error) + // FromPbText unmarshals FlowRSVPPathObjectsClassTimeValues from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsClassTimeValues from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsClassTimeValues from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsClassTimeValues) Marshal() marshalFlowRSVPPathObjectsClassTimeValues { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsClassTimeValues{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsClassTimeValues) Unmarshal() unMarshalFlowRSVPPathObjectsClassTimeValues { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsClassTimeValues{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsClassTimeValues) ToProto() (*otg.FlowRSVPPathObjectsClassTimeValues, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassTimeValues) FromProto(msg *otg.FlowRSVPPathObjectsClassTimeValues) (FlowRSVPPathObjectsClassTimeValues, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsClassTimeValues) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassTimeValues) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsClassTimeValues) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassTimeValues) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsClassTimeValues) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsClassTimeValues) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsClassTimeValues) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassTimeValues) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsClassTimeValues) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsClassTimeValues) Clone() (FlowRSVPPathObjectsClassTimeValues, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsClassTimeValues() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsClassTimeValues) setNil() { + obj.lengthHolder = nil + obj.cTypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsClassTimeValues is c-Type is specific to a class num. +type FlowRSVPPathObjectsClassTimeValues interface { + Validation + // msg marshals FlowRSVPPathObjectsClassTimeValues to protobuf object *otg.FlowRSVPPathObjectsClassTimeValues + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsClassTimeValues + // setMsg unmarshals FlowRSVPPathObjectsClassTimeValues from protobuf object *otg.FlowRSVPPathObjectsClassTimeValues + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsClassTimeValues) FlowRSVPPathObjectsClassTimeValues + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsClassTimeValues + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsClassTimeValues + // validate validates FlowRSVPPathObjectsClassTimeValues + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsClassTimeValues, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Length returns FlowRSVPObjectLength, set in FlowRSVPPathObjectsClassTimeValues. + // FlowRSVPObjectLength is description is TBD + Length() FlowRSVPObjectLength + // SetLength assigns FlowRSVPObjectLength provided by user to FlowRSVPPathObjectsClassTimeValues. + // FlowRSVPObjectLength is description is TBD + SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassTimeValues + // HasLength checks if Length has been set in FlowRSVPPathObjectsClassTimeValues + HasLength() bool + // CType returns FlowRSVPPathObjectsTimeValuesCType, set in FlowRSVPPathObjectsClassTimeValues. + // FlowRSVPPathObjectsTimeValuesCType is object for TIME_VALUES class. Currently supported c-type is Type 1 Time Value (1). + CType() FlowRSVPPathObjectsTimeValuesCType + // SetCType assigns FlowRSVPPathObjectsTimeValuesCType provided by user to FlowRSVPPathObjectsClassTimeValues. + // FlowRSVPPathObjectsTimeValuesCType is object for TIME_VALUES class. Currently supported c-type is Type 1 Time Value (1). + SetCType(value FlowRSVPPathObjectsTimeValuesCType) FlowRSVPPathObjectsClassTimeValues + // HasCType checks if CType has been set in FlowRSVPPathObjectsClassTimeValues + HasCType() bool + setNil() +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassTimeValues) Length() FlowRSVPObjectLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowRSVPObjectLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowRSVPObjectLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsClassTimeValues) HasLength() bool { + return obj.obj.Length != nil +} + +// A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. +// SetLength sets the FlowRSVPObjectLength value in the FlowRSVPPathObjectsClassTimeValues object +func (obj *flowRSVPPathObjectsClassTimeValues) SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsClassTimeValues { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsTimeValuesCType +func (obj *flowRSVPPathObjectsClassTimeValues) CType() FlowRSVPPathObjectsTimeValuesCType { + if obj.obj.CType == nil { + obj.obj.CType = NewFlowRSVPPathObjectsTimeValuesCType().msg() + } + if obj.cTypeHolder == nil { + obj.cTypeHolder = &flowRSVPPathObjectsTimeValuesCType{obj: obj.obj.CType} + } + return obj.cTypeHolder +} + +// description is TBD +// CType returns a FlowRSVPPathObjectsTimeValuesCType +func (obj *flowRSVPPathObjectsClassTimeValues) HasCType() bool { + return obj.obj.CType != nil +} + +// description is TBD +// SetCType sets the FlowRSVPPathObjectsTimeValuesCType value in the FlowRSVPPathObjectsClassTimeValues object +func (obj *flowRSVPPathObjectsClassTimeValues) SetCType(value FlowRSVPPathObjectsTimeValuesCType) FlowRSVPPathObjectsClassTimeValues { + + obj.cTypeHolder = nil + obj.obj.CType = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsClassTimeValues) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.CType != nil { + + obj.CType().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsClassTimeValues) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_objects_custom.go b/gosnappi/flow_rsvp_path_objects_custom.go new file mode 100644 index 00000000..510d0475 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_custom.go @@ -0,0 +1,414 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsCustom ***** +type flowRSVPPathObjectsCustom struct { + validation + obj *otg.FlowRSVPPathObjectsCustom + marshaller marshalFlowRSVPPathObjectsCustom + unMarshaller unMarshalFlowRSVPPathObjectsCustom + typeHolder PatternFlowRSVPPathObjectsCustomType + lengthHolder FlowRSVPObjectLength +} + +func NewFlowRSVPPathObjectsCustom() FlowRSVPPathObjectsCustom { + obj := flowRSVPPathObjectsCustom{obj: &otg.FlowRSVPPathObjectsCustom{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsCustom) msg() *otg.FlowRSVPPathObjectsCustom { + return obj.obj +} + +func (obj *flowRSVPPathObjectsCustom) setMsg(msg *otg.FlowRSVPPathObjectsCustom) FlowRSVPPathObjectsCustom { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsCustom struct { + obj *flowRSVPPathObjectsCustom +} + +type marshalFlowRSVPPathObjectsCustom interface { + // ToProto marshals FlowRSVPPathObjectsCustom to protobuf object *otg.FlowRSVPPathObjectsCustom + ToProto() (*otg.FlowRSVPPathObjectsCustom, error) + // ToPbText marshals FlowRSVPPathObjectsCustom to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsCustom to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsCustom to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsCustom struct { + obj *flowRSVPPathObjectsCustom +} + +type unMarshalFlowRSVPPathObjectsCustom interface { + // FromProto unmarshals FlowRSVPPathObjectsCustom from protobuf object *otg.FlowRSVPPathObjectsCustom + FromProto(msg *otg.FlowRSVPPathObjectsCustom) (FlowRSVPPathObjectsCustom, error) + // FromPbText unmarshals FlowRSVPPathObjectsCustom from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsCustom from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsCustom from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsCustom) Marshal() marshalFlowRSVPPathObjectsCustom { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsCustom{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsCustom) Unmarshal() unMarshalFlowRSVPPathObjectsCustom { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsCustom{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsCustom) ToProto() (*otg.FlowRSVPPathObjectsCustom, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsCustom) FromProto(msg *otg.FlowRSVPPathObjectsCustom) (FlowRSVPPathObjectsCustom, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsCustom) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsCustom) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsCustom) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsCustom) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsCustom) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsCustom) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsCustom) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsCustom) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsCustom) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsCustom) Clone() (FlowRSVPPathObjectsCustom, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsCustom() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsCustom) setNil() { + obj.typeHolder = nil + obj.lengthHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsCustom is custom packet header +type FlowRSVPPathObjectsCustom interface { + Validation + // msg marshals FlowRSVPPathObjectsCustom to protobuf object *otg.FlowRSVPPathObjectsCustom + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsCustom + // setMsg unmarshals FlowRSVPPathObjectsCustom from protobuf object *otg.FlowRSVPPathObjectsCustom + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsCustom) FlowRSVPPathObjectsCustom + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsCustom + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsCustom + // validate validates FlowRSVPPathObjectsCustom + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsCustom, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns PatternFlowRSVPPathObjectsCustomType, set in FlowRSVPPathObjectsCustom. + // PatternFlowRSVPPathObjectsCustomType is user defined object type. + Type() PatternFlowRSVPPathObjectsCustomType + // SetType assigns PatternFlowRSVPPathObjectsCustomType provided by user to FlowRSVPPathObjectsCustom. + // PatternFlowRSVPPathObjectsCustomType is user defined object type. + SetType(value PatternFlowRSVPPathObjectsCustomType) FlowRSVPPathObjectsCustom + // HasType checks if Type has been set in FlowRSVPPathObjectsCustom + HasType() bool + // Length returns FlowRSVPObjectLength, set in FlowRSVPPathObjectsCustom. + // FlowRSVPObjectLength is description is TBD + Length() FlowRSVPObjectLength + // SetLength assigns FlowRSVPObjectLength provided by user to FlowRSVPPathObjectsCustom. + // FlowRSVPObjectLength is description is TBD + SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsCustom + // HasLength checks if Length has been set in FlowRSVPPathObjectsCustom + HasLength() bool + // Bytes returns string, set in FlowRSVPPathObjectsCustom. + Bytes() string + // SetBytes assigns string provided by user to FlowRSVPPathObjectsCustom + SetBytes(value string) FlowRSVPPathObjectsCustom + // HasBytes checks if Bytes has been set in FlowRSVPPathObjectsCustom + HasBytes() bool + setNil() +} + +// description is TBD +// Type returns a PatternFlowRSVPPathObjectsCustomType +func (obj *flowRSVPPathObjectsCustom) Type() PatternFlowRSVPPathObjectsCustomType { + if obj.obj.Type == nil { + obj.obj.Type = NewPatternFlowRSVPPathObjectsCustomType().msg() + } + if obj.typeHolder == nil { + obj.typeHolder = &patternFlowRSVPPathObjectsCustomType{obj: obj.obj.Type} + } + return obj.typeHolder +} + +// description is TBD +// Type returns a PatternFlowRSVPPathObjectsCustomType +func (obj *flowRSVPPathObjectsCustom) HasType() bool { + return obj.obj.Type != nil +} + +// description is TBD +// SetType sets the PatternFlowRSVPPathObjectsCustomType value in the FlowRSVPPathObjectsCustom object +func (obj *flowRSVPPathObjectsCustom) SetType(value PatternFlowRSVPPathObjectsCustomType) FlowRSVPPathObjectsCustom { + + obj.typeHolder = nil + obj.obj.Type = value.msg() + + return obj +} + +// description is TBD +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsCustom) Length() FlowRSVPObjectLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowRSVPObjectLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowRSVPObjectLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// description is TBD +// Length returns a FlowRSVPObjectLength +func (obj *flowRSVPPathObjectsCustom) HasLength() bool { + return obj.obj.Length != nil +} + +// description is TBD +// SetLength sets the FlowRSVPObjectLength value in the FlowRSVPPathObjectsCustom object +func (obj *flowRSVPPathObjectsCustom) SetLength(value FlowRSVPObjectLength) FlowRSVPPathObjectsCustom { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// A custom packet header defined as a string of hex bytes. The string MUST contain sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be discarded. Value of the this field should not excced 65525 bytes since maximum 65528 bytes can be added as object-contents in RSVP header. For type and length requires 3 bytes, hence maximum of 65524 bytes are expected. Maximum length of this attribute is 131050 (65525 * 2 hex character per byte). +// Bytes returns a string +func (obj *flowRSVPPathObjectsCustom) Bytes() string { + + return *obj.obj.Bytes + +} + +// A custom packet header defined as a string of hex bytes. The string MUST contain sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be discarded. Value of the this field should not excced 65525 bytes since maximum 65528 bytes can be added as object-contents in RSVP header. For type and length requires 3 bytes, hence maximum of 65524 bytes are expected. Maximum length of this attribute is 131050 (65525 * 2 hex character per byte). +// Bytes returns a string +func (obj *flowRSVPPathObjectsCustom) HasBytes() bool { + return obj.obj.Bytes != nil +} + +// A custom packet header defined as a string of hex bytes. The string MUST contain sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be discarded. Value of the this field should not excced 65525 bytes since maximum 65528 bytes can be added as object-contents in RSVP header. For type and length requires 3 bytes, hence maximum of 65524 bytes are expected. Maximum length of this attribute is 131050 (65525 * 2 hex character per byte). +// SetBytes sets the string value in the FlowRSVPPathObjectsCustom object +func (obj *flowRSVPPathObjectsCustom) SetBytes(value string) FlowRSVPPathObjectsCustom { + + obj.obj.Bytes = &value + return obj +} + +func (obj *flowRSVPPathObjectsCustom) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Type != nil { + + obj.Type().validateObj(vObj, set_default) + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.Bytes != nil { + + if len(*obj.obj.Bytes) < 1 || len(*obj.obj.Bytes) > 131050 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "1 <= length of FlowRSVPPathObjectsCustom.Bytes <= 131050 but Got %d", + len(*obj.obj.Bytes))) + } + + } + +} + +func (obj *flowRSVPPathObjectsCustom) setDefault() { + if obj.obj.Bytes == nil { + obj.SetBytes("0000") + } + +} diff --git a/gosnappi/flow_rsvp_path_objects_label_request_c_type.go b/gosnappi/flow_rsvp_path_objects_label_request_c_type.go new file mode 100644 index 00000000..65aaf40c --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_label_request_c_type.go @@ -0,0 +1,396 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsLabelRequestCType ***** +type flowRSVPPathObjectsLabelRequestCType struct { + validation + obj *otg.FlowRSVPPathObjectsLabelRequestCType + marshaller marshalFlowRSVPPathObjectsLabelRequestCType + unMarshaller unMarshalFlowRSVPPathObjectsLabelRequestCType + withoutLabelRangeHolder FlowRSVPPathLabelRequestWithoutLabelRange +} + +func NewFlowRSVPPathObjectsLabelRequestCType() FlowRSVPPathObjectsLabelRequestCType { + obj := flowRSVPPathObjectsLabelRequestCType{obj: &otg.FlowRSVPPathObjectsLabelRequestCType{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsLabelRequestCType) msg() *otg.FlowRSVPPathObjectsLabelRequestCType { + return obj.obj +} + +func (obj *flowRSVPPathObjectsLabelRequestCType) setMsg(msg *otg.FlowRSVPPathObjectsLabelRequestCType) FlowRSVPPathObjectsLabelRequestCType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsLabelRequestCType struct { + obj *flowRSVPPathObjectsLabelRequestCType +} + +type marshalFlowRSVPPathObjectsLabelRequestCType interface { + // ToProto marshals FlowRSVPPathObjectsLabelRequestCType to protobuf object *otg.FlowRSVPPathObjectsLabelRequestCType + ToProto() (*otg.FlowRSVPPathObjectsLabelRequestCType, error) + // ToPbText marshals FlowRSVPPathObjectsLabelRequestCType to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsLabelRequestCType to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsLabelRequestCType to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsLabelRequestCType struct { + obj *flowRSVPPathObjectsLabelRequestCType +} + +type unMarshalFlowRSVPPathObjectsLabelRequestCType interface { + // FromProto unmarshals FlowRSVPPathObjectsLabelRequestCType from protobuf object *otg.FlowRSVPPathObjectsLabelRequestCType + FromProto(msg *otg.FlowRSVPPathObjectsLabelRequestCType) (FlowRSVPPathObjectsLabelRequestCType, error) + // FromPbText unmarshals FlowRSVPPathObjectsLabelRequestCType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsLabelRequestCType from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsLabelRequestCType from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsLabelRequestCType) Marshal() marshalFlowRSVPPathObjectsLabelRequestCType { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsLabelRequestCType{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsLabelRequestCType) Unmarshal() unMarshalFlowRSVPPathObjectsLabelRequestCType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsLabelRequestCType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsLabelRequestCType) ToProto() (*otg.FlowRSVPPathObjectsLabelRequestCType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsLabelRequestCType) FromProto(msg *otg.FlowRSVPPathObjectsLabelRequestCType) (FlowRSVPPathObjectsLabelRequestCType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsLabelRequestCType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsLabelRequestCType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsLabelRequestCType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsLabelRequestCType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsLabelRequestCType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsLabelRequestCType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsLabelRequestCType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsLabelRequestCType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsLabelRequestCType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsLabelRequestCType) Clone() (FlowRSVPPathObjectsLabelRequestCType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsLabelRequestCType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsLabelRequestCType) setNil() { + obj.withoutLabelRangeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsLabelRequestCType is object for LABEL_REQUEST class. Currently supported c-type is Without Label Range (1). +type FlowRSVPPathObjectsLabelRequestCType interface { + Validation + // msg marshals FlowRSVPPathObjectsLabelRequestCType to protobuf object *otg.FlowRSVPPathObjectsLabelRequestCType + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsLabelRequestCType + // setMsg unmarshals FlowRSVPPathObjectsLabelRequestCType from protobuf object *otg.FlowRSVPPathObjectsLabelRequestCType + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsLabelRequestCType) FlowRSVPPathObjectsLabelRequestCType + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsLabelRequestCType + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsLabelRequestCType + // validate validates FlowRSVPPathObjectsLabelRequestCType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsLabelRequestCType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPPathObjectsLabelRequestCTypeChoiceEnum, set in FlowRSVPPathObjectsLabelRequestCType + Choice() FlowRSVPPathObjectsLabelRequestCTypeChoiceEnum + // setChoice assigns FlowRSVPPathObjectsLabelRequestCTypeChoiceEnum provided by user to FlowRSVPPathObjectsLabelRequestCType + setChoice(value FlowRSVPPathObjectsLabelRequestCTypeChoiceEnum) FlowRSVPPathObjectsLabelRequestCType + // HasChoice checks if Choice has been set in FlowRSVPPathObjectsLabelRequestCType + HasChoice() bool + // WithoutLabelRange returns FlowRSVPPathLabelRequestWithoutLabelRange, set in FlowRSVPPathObjectsLabelRequestCType. + // FlowRSVPPathLabelRequestWithoutLabelRange is class = LABEL_REQUEST, Without Label Range C-Type = 1 + WithoutLabelRange() FlowRSVPPathLabelRequestWithoutLabelRange + // SetWithoutLabelRange assigns FlowRSVPPathLabelRequestWithoutLabelRange provided by user to FlowRSVPPathObjectsLabelRequestCType. + // FlowRSVPPathLabelRequestWithoutLabelRange is class = LABEL_REQUEST, Without Label Range C-Type = 1 + SetWithoutLabelRange(value FlowRSVPPathLabelRequestWithoutLabelRange) FlowRSVPPathObjectsLabelRequestCType + // HasWithoutLabelRange checks if WithoutLabelRange has been set in FlowRSVPPathObjectsLabelRequestCType + HasWithoutLabelRange() bool + setNil() +} + +type FlowRSVPPathObjectsLabelRequestCTypeChoiceEnum string + +// Enum of Choice on FlowRSVPPathObjectsLabelRequestCType +var FlowRSVPPathObjectsLabelRequestCTypeChoice = struct { + WITHOUT_LABEL_RANGE FlowRSVPPathObjectsLabelRequestCTypeChoiceEnum +}{ + WITHOUT_LABEL_RANGE: FlowRSVPPathObjectsLabelRequestCTypeChoiceEnum("without_label_range"), +} + +func (obj *flowRSVPPathObjectsLabelRequestCType) Choice() FlowRSVPPathObjectsLabelRequestCTypeChoiceEnum { + return FlowRSVPPathObjectsLabelRequestCTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowRSVPPathObjectsLabelRequestCType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPPathObjectsLabelRequestCType) setChoice(value FlowRSVPPathObjectsLabelRequestCTypeChoiceEnum) FlowRSVPPathObjectsLabelRequestCType { + intValue, ok := otg.FlowRSVPPathObjectsLabelRequestCType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPPathObjectsLabelRequestCTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPPathObjectsLabelRequestCType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.WithoutLabelRange = nil + obj.withoutLabelRangeHolder = nil + + if value == FlowRSVPPathObjectsLabelRequestCTypeChoice.WITHOUT_LABEL_RANGE { + obj.obj.WithoutLabelRange = NewFlowRSVPPathLabelRequestWithoutLabelRange().msg() + } + + return obj +} + +// description is TBD +// WithoutLabelRange returns a FlowRSVPPathLabelRequestWithoutLabelRange +func (obj *flowRSVPPathObjectsLabelRequestCType) WithoutLabelRange() FlowRSVPPathLabelRequestWithoutLabelRange { + if obj.obj.WithoutLabelRange == nil { + obj.setChoice(FlowRSVPPathObjectsLabelRequestCTypeChoice.WITHOUT_LABEL_RANGE) + } + if obj.withoutLabelRangeHolder == nil { + obj.withoutLabelRangeHolder = &flowRSVPPathLabelRequestWithoutLabelRange{obj: obj.obj.WithoutLabelRange} + } + return obj.withoutLabelRangeHolder +} + +// description is TBD +// WithoutLabelRange returns a FlowRSVPPathLabelRequestWithoutLabelRange +func (obj *flowRSVPPathObjectsLabelRequestCType) HasWithoutLabelRange() bool { + return obj.obj.WithoutLabelRange != nil +} + +// description is TBD +// SetWithoutLabelRange sets the FlowRSVPPathLabelRequestWithoutLabelRange value in the FlowRSVPPathObjectsLabelRequestCType object +func (obj *flowRSVPPathObjectsLabelRequestCType) SetWithoutLabelRange(value FlowRSVPPathLabelRequestWithoutLabelRange) FlowRSVPPathObjectsLabelRequestCType { + obj.setChoice(FlowRSVPPathObjectsLabelRequestCTypeChoice.WITHOUT_LABEL_RANGE) + obj.withoutLabelRangeHolder = nil + obj.obj.WithoutLabelRange = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsLabelRequestCType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.WithoutLabelRange != nil { + + obj.WithoutLabelRange().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsLabelRequestCType) setDefault() { + var choices_set int = 0 + var choice FlowRSVPPathObjectsLabelRequestCTypeChoiceEnum + + if obj.obj.WithoutLabelRange != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsLabelRequestCTypeChoice.WITHOUT_LABEL_RANGE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPPathObjectsLabelRequestCTypeChoice.WITHOUT_LABEL_RANGE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPPathObjectsLabelRequestCType") + } + } else { + intVal := otg.FlowRSVPPathObjectsLabelRequestCType_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPPathObjectsLabelRequestCType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_path_objects_record_route_c_type.go b/gosnappi/flow_rsvp_path_objects_record_route_c_type.go new file mode 100644 index 00000000..33cd0a60 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_record_route_c_type.go @@ -0,0 +1,396 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsRecordRouteCType ***** +type flowRSVPPathObjectsRecordRouteCType struct { + validation + obj *otg.FlowRSVPPathObjectsRecordRouteCType + marshaller marshalFlowRSVPPathObjectsRecordRouteCType + unMarshaller unMarshalFlowRSVPPathObjectsRecordRouteCType + type_1Holder FlowRSVPPathRecordRouteType1 +} + +func NewFlowRSVPPathObjectsRecordRouteCType() FlowRSVPPathObjectsRecordRouteCType { + obj := flowRSVPPathObjectsRecordRouteCType{obj: &otg.FlowRSVPPathObjectsRecordRouteCType{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsRecordRouteCType) msg() *otg.FlowRSVPPathObjectsRecordRouteCType { + return obj.obj +} + +func (obj *flowRSVPPathObjectsRecordRouteCType) setMsg(msg *otg.FlowRSVPPathObjectsRecordRouteCType) FlowRSVPPathObjectsRecordRouteCType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsRecordRouteCType struct { + obj *flowRSVPPathObjectsRecordRouteCType +} + +type marshalFlowRSVPPathObjectsRecordRouteCType interface { + // ToProto marshals FlowRSVPPathObjectsRecordRouteCType to protobuf object *otg.FlowRSVPPathObjectsRecordRouteCType + ToProto() (*otg.FlowRSVPPathObjectsRecordRouteCType, error) + // ToPbText marshals FlowRSVPPathObjectsRecordRouteCType to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsRecordRouteCType to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsRecordRouteCType to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsRecordRouteCType struct { + obj *flowRSVPPathObjectsRecordRouteCType +} + +type unMarshalFlowRSVPPathObjectsRecordRouteCType interface { + // FromProto unmarshals FlowRSVPPathObjectsRecordRouteCType from protobuf object *otg.FlowRSVPPathObjectsRecordRouteCType + FromProto(msg *otg.FlowRSVPPathObjectsRecordRouteCType) (FlowRSVPPathObjectsRecordRouteCType, error) + // FromPbText unmarshals FlowRSVPPathObjectsRecordRouteCType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsRecordRouteCType from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsRecordRouteCType from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsRecordRouteCType) Marshal() marshalFlowRSVPPathObjectsRecordRouteCType { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsRecordRouteCType{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsRecordRouteCType) Unmarshal() unMarshalFlowRSVPPathObjectsRecordRouteCType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsRecordRouteCType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsRecordRouteCType) ToProto() (*otg.FlowRSVPPathObjectsRecordRouteCType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsRecordRouteCType) FromProto(msg *otg.FlowRSVPPathObjectsRecordRouteCType) (FlowRSVPPathObjectsRecordRouteCType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsRecordRouteCType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsRecordRouteCType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsRecordRouteCType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsRecordRouteCType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsRecordRouteCType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsRecordRouteCType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsRecordRouteCType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsRecordRouteCType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsRecordRouteCType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsRecordRouteCType) Clone() (FlowRSVPPathObjectsRecordRouteCType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsRecordRouteCType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsRecordRouteCType) setNil() { + obj.type_1Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsRecordRouteCType is object for RECORD_ROUTE class. c-type is Type 1 Route Record (1). +type FlowRSVPPathObjectsRecordRouteCType interface { + Validation + // msg marshals FlowRSVPPathObjectsRecordRouteCType to protobuf object *otg.FlowRSVPPathObjectsRecordRouteCType + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsRecordRouteCType + // setMsg unmarshals FlowRSVPPathObjectsRecordRouteCType from protobuf object *otg.FlowRSVPPathObjectsRecordRouteCType + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsRecordRouteCType) FlowRSVPPathObjectsRecordRouteCType + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsRecordRouteCType + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsRecordRouteCType + // validate validates FlowRSVPPathObjectsRecordRouteCType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsRecordRouteCType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPPathObjectsRecordRouteCTypeChoiceEnum, set in FlowRSVPPathObjectsRecordRouteCType + Choice() FlowRSVPPathObjectsRecordRouteCTypeChoiceEnum + // setChoice assigns FlowRSVPPathObjectsRecordRouteCTypeChoiceEnum provided by user to FlowRSVPPathObjectsRecordRouteCType + setChoice(value FlowRSVPPathObjectsRecordRouteCTypeChoiceEnum) FlowRSVPPathObjectsRecordRouteCType + // HasChoice checks if Choice has been set in FlowRSVPPathObjectsRecordRouteCType + HasChoice() bool + // Type1 returns FlowRSVPPathRecordRouteType1, set in FlowRSVPPathObjectsRecordRouteCType. + // FlowRSVPPathRecordRouteType1 is type1 record route has list of subobjects. Currently supported subobjects are IPv4 address(1) and Label(3). + Type1() FlowRSVPPathRecordRouteType1 + // SetType1 assigns FlowRSVPPathRecordRouteType1 provided by user to FlowRSVPPathObjectsRecordRouteCType. + // FlowRSVPPathRecordRouteType1 is type1 record route has list of subobjects. Currently supported subobjects are IPv4 address(1) and Label(3). + SetType1(value FlowRSVPPathRecordRouteType1) FlowRSVPPathObjectsRecordRouteCType + // HasType1 checks if Type1 has been set in FlowRSVPPathObjectsRecordRouteCType + HasType1() bool + setNil() +} + +type FlowRSVPPathObjectsRecordRouteCTypeChoiceEnum string + +// Enum of Choice on FlowRSVPPathObjectsRecordRouteCType +var FlowRSVPPathObjectsRecordRouteCTypeChoice = struct { + TYPE_1 FlowRSVPPathObjectsRecordRouteCTypeChoiceEnum +}{ + TYPE_1: FlowRSVPPathObjectsRecordRouteCTypeChoiceEnum("type_1"), +} + +func (obj *flowRSVPPathObjectsRecordRouteCType) Choice() FlowRSVPPathObjectsRecordRouteCTypeChoiceEnum { + return FlowRSVPPathObjectsRecordRouteCTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowRSVPPathObjectsRecordRouteCType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPPathObjectsRecordRouteCType) setChoice(value FlowRSVPPathObjectsRecordRouteCTypeChoiceEnum) FlowRSVPPathObjectsRecordRouteCType { + intValue, ok := otg.FlowRSVPPathObjectsRecordRouteCType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPPathObjectsRecordRouteCTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPPathObjectsRecordRouteCType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Type_1 = nil + obj.type_1Holder = nil + + if value == FlowRSVPPathObjectsRecordRouteCTypeChoice.TYPE_1 { + obj.obj.Type_1 = NewFlowRSVPPathRecordRouteType1().msg() + } + + return obj +} + +// description is TBD +// Type1 returns a FlowRSVPPathRecordRouteType1 +func (obj *flowRSVPPathObjectsRecordRouteCType) Type1() FlowRSVPPathRecordRouteType1 { + if obj.obj.Type_1 == nil { + obj.setChoice(FlowRSVPPathObjectsRecordRouteCTypeChoice.TYPE_1) + } + if obj.type_1Holder == nil { + obj.type_1Holder = &flowRSVPPathRecordRouteType1{obj: obj.obj.Type_1} + } + return obj.type_1Holder +} + +// description is TBD +// Type1 returns a FlowRSVPPathRecordRouteType1 +func (obj *flowRSVPPathObjectsRecordRouteCType) HasType1() bool { + return obj.obj.Type_1 != nil +} + +// description is TBD +// SetType1 sets the FlowRSVPPathRecordRouteType1 value in the FlowRSVPPathObjectsRecordRouteCType object +func (obj *flowRSVPPathObjectsRecordRouteCType) SetType1(value FlowRSVPPathRecordRouteType1) FlowRSVPPathObjectsRecordRouteCType { + obj.setChoice(FlowRSVPPathObjectsRecordRouteCTypeChoice.TYPE_1) + obj.type_1Holder = nil + obj.obj.Type_1 = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsRecordRouteCType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Type_1 != nil { + + obj.Type1().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsRecordRouteCType) setDefault() { + var choices_set int = 0 + var choice FlowRSVPPathObjectsRecordRouteCTypeChoiceEnum + + if obj.obj.Type_1 != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsRecordRouteCTypeChoice.TYPE_1 + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPPathObjectsRecordRouteCTypeChoice.TYPE_1) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPPathObjectsRecordRouteCType") + } + } else { + intVal := otg.FlowRSVPPathObjectsRecordRouteCType_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPPathObjectsRecordRouteCType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_path_objects_record_route_sub_object_type.go b/gosnappi/flow_rsvp_path_objects_record_route_sub_object_type.go new file mode 100644 index 00000000..f56a374a --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_record_route_sub_object_type.go @@ -0,0 +1,452 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsRecordRouteSubObjectType ***** +type flowRSVPPathObjectsRecordRouteSubObjectType struct { + validation + obj *otg.FlowRSVPPathObjectsRecordRouteSubObjectType + marshaller marshalFlowRSVPPathObjectsRecordRouteSubObjectType + unMarshaller unMarshalFlowRSVPPathObjectsRecordRouteSubObjectType + ipv4AddressHolder FlowRSVPPathRecordRouteType1Ipv4Address + labelHolder FlowRSVPPathRecordRouteType1Label +} + +func NewFlowRSVPPathObjectsRecordRouteSubObjectType() FlowRSVPPathObjectsRecordRouteSubObjectType { + obj := flowRSVPPathObjectsRecordRouteSubObjectType{obj: &otg.FlowRSVPPathObjectsRecordRouteSubObjectType{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) msg() *otg.FlowRSVPPathObjectsRecordRouteSubObjectType { + return obj.obj +} + +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) setMsg(msg *otg.FlowRSVPPathObjectsRecordRouteSubObjectType) FlowRSVPPathObjectsRecordRouteSubObjectType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsRecordRouteSubObjectType struct { + obj *flowRSVPPathObjectsRecordRouteSubObjectType +} + +type marshalFlowRSVPPathObjectsRecordRouteSubObjectType interface { + // ToProto marshals FlowRSVPPathObjectsRecordRouteSubObjectType to protobuf object *otg.FlowRSVPPathObjectsRecordRouteSubObjectType + ToProto() (*otg.FlowRSVPPathObjectsRecordRouteSubObjectType, error) + // ToPbText marshals FlowRSVPPathObjectsRecordRouteSubObjectType to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsRecordRouteSubObjectType to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsRecordRouteSubObjectType to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsRecordRouteSubObjectType struct { + obj *flowRSVPPathObjectsRecordRouteSubObjectType +} + +type unMarshalFlowRSVPPathObjectsRecordRouteSubObjectType interface { + // FromProto unmarshals FlowRSVPPathObjectsRecordRouteSubObjectType from protobuf object *otg.FlowRSVPPathObjectsRecordRouteSubObjectType + FromProto(msg *otg.FlowRSVPPathObjectsRecordRouteSubObjectType) (FlowRSVPPathObjectsRecordRouteSubObjectType, error) + // FromPbText unmarshals FlowRSVPPathObjectsRecordRouteSubObjectType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsRecordRouteSubObjectType from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsRecordRouteSubObjectType from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) Marshal() marshalFlowRSVPPathObjectsRecordRouteSubObjectType { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsRecordRouteSubObjectType{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) Unmarshal() unMarshalFlowRSVPPathObjectsRecordRouteSubObjectType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsRecordRouteSubObjectType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsRecordRouteSubObjectType) ToProto() (*otg.FlowRSVPPathObjectsRecordRouteSubObjectType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsRecordRouteSubObjectType) FromProto(msg *otg.FlowRSVPPathObjectsRecordRouteSubObjectType) (FlowRSVPPathObjectsRecordRouteSubObjectType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsRecordRouteSubObjectType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsRecordRouteSubObjectType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsRecordRouteSubObjectType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsRecordRouteSubObjectType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsRecordRouteSubObjectType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsRecordRouteSubObjectType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) Clone() (FlowRSVPPathObjectsRecordRouteSubObjectType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsRecordRouteSubObjectType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) setNil() { + obj.ipv4AddressHolder = nil + obj.labelHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsRecordRouteSubObjectType is currently supported subobjects are IPv4 address(1) and Label(3). +type FlowRSVPPathObjectsRecordRouteSubObjectType interface { + Validation + // msg marshals FlowRSVPPathObjectsRecordRouteSubObjectType to protobuf object *otg.FlowRSVPPathObjectsRecordRouteSubObjectType + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsRecordRouteSubObjectType + // setMsg unmarshals FlowRSVPPathObjectsRecordRouteSubObjectType from protobuf object *otg.FlowRSVPPathObjectsRecordRouteSubObjectType + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsRecordRouteSubObjectType) FlowRSVPPathObjectsRecordRouteSubObjectType + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsRecordRouteSubObjectType + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsRecordRouteSubObjectType + // validate validates FlowRSVPPathObjectsRecordRouteSubObjectType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsRecordRouteSubObjectType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPPathObjectsRecordRouteSubObjectTypeChoiceEnum, set in FlowRSVPPathObjectsRecordRouteSubObjectType + Choice() FlowRSVPPathObjectsRecordRouteSubObjectTypeChoiceEnum + // setChoice assigns FlowRSVPPathObjectsRecordRouteSubObjectTypeChoiceEnum provided by user to FlowRSVPPathObjectsRecordRouteSubObjectType + setChoice(value FlowRSVPPathObjectsRecordRouteSubObjectTypeChoiceEnum) FlowRSVPPathObjectsRecordRouteSubObjectType + // HasChoice checks if Choice has been set in FlowRSVPPathObjectsRecordRouteSubObjectType + HasChoice() bool + // Ipv4Address returns FlowRSVPPathRecordRouteType1Ipv4Address, set in FlowRSVPPathObjectsRecordRouteSubObjectType. + // FlowRSVPPathRecordRouteType1Ipv4Address is class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Address, C-Type: 1 + Ipv4Address() FlowRSVPPathRecordRouteType1Ipv4Address + // SetIpv4Address assigns FlowRSVPPathRecordRouteType1Ipv4Address provided by user to FlowRSVPPathObjectsRecordRouteSubObjectType. + // FlowRSVPPathRecordRouteType1Ipv4Address is class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Address, C-Type: 1 + SetIpv4Address(value FlowRSVPPathRecordRouteType1Ipv4Address) FlowRSVPPathObjectsRecordRouteSubObjectType + // HasIpv4Address checks if Ipv4Address has been set in FlowRSVPPathObjectsRecordRouteSubObjectType + HasIpv4Address() bool + // Label returns FlowRSVPPathRecordRouteType1Label, set in FlowRSVPPathObjectsRecordRouteSubObjectType. + // FlowRSVPPathRecordRouteType1Label is class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Label, C-Type: 3 + Label() FlowRSVPPathRecordRouteType1Label + // SetLabel assigns FlowRSVPPathRecordRouteType1Label provided by user to FlowRSVPPathObjectsRecordRouteSubObjectType. + // FlowRSVPPathRecordRouteType1Label is class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Label, C-Type: 3 + SetLabel(value FlowRSVPPathRecordRouteType1Label) FlowRSVPPathObjectsRecordRouteSubObjectType + // HasLabel checks if Label has been set in FlowRSVPPathObjectsRecordRouteSubObjectType + HasLabel() bool + setNil() +} + +type FlowRSVPPathObjectsRecordRouteSubObjectTypeChoiceEnum string + +// Enum of Choice on FlowRSVPPathObjectsRecordRouteSubObjectType +var FlowRSVPPathObjectsRecordRouteSubObjectTypeChoice = struct { + IPV4_ADDRESS FlowRSVPPathObjectsRecordRouteSubObjectTypeChoiceEnum + LABEL FlowRSVPPathObjectsRecordRouteSubObjectTypeChoiceEnum +}{ + IPV4_ADDRESS: FlowRSVPPathObjectsRecordRouteSubObjectTypeChoiceEnum("ipv4_address"), + LABEL: FlowRSVPPathObjectsRecordRouteSubObjectTypeChoiceEnum("label"), +} + +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) Choice() FlowRSVPPathObjectsRecordRouteSubObjectTypeChoiceEnum { + return FlowRSVPPathObjectsRecordRouteSubObjectTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) setChoice(value FlowRSVPPathObjectsRecordRouteSubObjectTypeChoiceEnum) FlowRSVPPathObjectsRecordRouteSubObjectType { + intValue, ok := otg.FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPPathObjectsRecordRouteSubObjectTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Label = nil + obj.labelHolder = nil + obj.obj.Ipv4Address = nil + obj.ipv4AddressHolder = nil + + if value == FlowRSVPPathObjectsRecordRouteSubObjectTypeChoice.IPV4_ADDRESS { + obj.obj.Ipv4Address = NewFlowRSVPPathRecordRouteType1Ipv4Address().msg() + } + + if value == FlowRSVPPathObjectsRecordRouteSubObjectTypeChoice.LABEL { + obj.obj.Label = NewFlowRSVPPathRecordRouteType1Label().msg() + } + + return obj +} + +// description is TBD +// Ipv4Address returns a FlowRSVPPathRecordRouteType1Ipv4Address +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) Ipv4Address() FlowRSVPPathRecordRouteType1Ipv4Address { + if obj.obj.Ipv4Address == nil { + obj.setChoice(FlowRSVPPathObjectsRecordRouteSubObjectTypeChoice.IPV4_ADDRESS) + } + if obj.ipv4AddressHolder == nil { + obj.ipv4AddressHolder = &flowRSVPPathRecordRouteType1Ipv4Address{obj: obj.obj.Ipv4Address} + } + return obj.ipv4AddressHolder +} + +// description is TBD +// Ipv4Address returns a FlowRSVPPathRecordRouteType1Ipv4Address +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) HasIpv4Address() bool { + return obj.obj.Ipv4Address != nil +} + +// description is TBD +// SetIpv4Address sets the FlowRSVPPathRecordRouteType1Ipv4Address value in the FlowRSVPPathObjectsRecordRouteSubObjectType object +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) SetIpv4Address(value FlowRSVPPathRecordRouteType1Ipv4Address) FlowRSVPPathObjectsRecordRouteSubObjectType { + obj.setChoice(FlowRSVPPathObjectsRecordRouteSubObjectTypeChoice.IPV4_ADDRESS) + obj.ipv4AddressHolder = nil + obj.obj.Ipv4Address = value.msg() + + return obj +} + +// description is TBD +// Label returns a FlowRSVPPathRecordRouteType1Label +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) Label() FlowRSVPPathRecordRouteType1Label { + if obj.obj.Label == nil { + obj.setChoice(FlowRSVPPathObjectsRecordRouteSubObjectTypeChoice.LABEL) + } + if obj.labelHolder == nil { + obj.labelHolder = &flowRSVPPathRecordRouteType1Label{obj: obj.obj.Label} + } + return obj.labelHolder +} + +// description is TBD +// Label returns a FlowRSVPPathRecordRouteType1Label +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) HasLabel() bool { + return obj.obj.Label != nil +} + +// description is TBD +// SetLabel sets the FlowRSVPPathRecordRouteType1Label value in the FlowRSVPPathObjectsRecordRouteSubObjectType object +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) SetLabel(value FlowRSVPPathRecordRouteType1Label) FlowRSVPPathObjectsRecordRouteSubObjectType { + obj.setChoice(FlowRSVPPathObjectsRecordRouteSubObjectTypeChoice.LABEL) + obj.labelHolder = nil + obj.obj.Label = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv4Address != nil { + + obj.Ipv4Address().validateObj(vObj, set_default) + } + + if obj.obj.Label != nil { + + obj.Label().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsRecordRouteSubObjectType) setDefault() { + var choices_set int = 0 + var choice FlowRSVPPathObjectsRecordRouteSubObjectTypeChoiceEnum + + if obj.obj.Ipv4Address != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsRecordRouteSubObjectTypeChoice.IPV4_ADDRESS + } + + if obj.obj.Label != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsRecordRouteSubObjectTypeChoice.LABEL + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPPathObjectsRecordRouteSubObjectTypeChoice.IPV4_ADDRESS) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPPathObjectsRecordRouteSubObjectType") + } + } else { + intVal := otg.FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_path_objects_rsvp_hop_c_type.go b/gosnappi/flow_rsvp_path_objects_rsvp_hop_c_type.go new file mode 100644 index 00000000..89c6f0c2 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_rsvp_hop_c_type.go @@ -0,0 +1,396 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsRsvpHopCType ***** +type flowRSVPPathObjectsRsvpHopCType struct { + validation + obj *otg.FlowRSVPPathObjectsRsvpHopCType + marshaller marshalFlowRSVPPathObjectsRsvpHopCType + unMarshaller unMarshalFlowRSVPPathObjectsRsvpHopCType + ipv4Holder FlowRSVPPathRsvpHopIpv4 +} + +func NewFlowRSVPPathObjectsRsvpHopCType() FlowRSVPPathObjectsRsvpHopCType { + obj := flowRSVPPathObjectsRsvpHopCType{obj: &otg.FlowRSVPPathObjectsRsvpHopCType{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsRsvpHopCType) msg() *otg.FlowRSVPPathObjectsRsvpHopCType { + return obj.obj +} + +func (obj *flowRSVPPathObjectsRsvpHopCType) setMsg(msg *otg.FlowRSVPPathObjectsRsvpHopCType) FlowRSVPPathObjectsRsvpHopCType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsRsvpHopCType struct { + obj *flowRSVPPathObjectsRsvpHopCType +} + +type marshalFlowRSVPPathObjectsRsvpHopCType interface { + // ToProto marshals FlowRSVPPathObjectsRsvpHopCType to protobuf object *otg.FlowRSVPPathObjectsRsvpHopCType + ToProto() (*otg.FlowRSVPPathObjectsRsvpHopCType, error) + // ToPbText marshals FlowRSVPPathObjectsRsvpHopCType to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsRsvpHopCType to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsRsvpHopCType to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsRsvpHopCType struct { + obj *flowRSVPPathObjectsRsvpHopCType +} + +type unMarshalFlowRSVPPathObjectsRsvpHopCType interface { + // FromProto unmarshals FlowRSVPPathObjectsRsvpHopCType from protobuf object *otg.FlowRSVPPathObjectsRsvpHopCType + FromProto(msg *otg.FlowRSVPPathObjectsRsvpHopCType) (FlowRSVPPathObjectsRsvpHopCType, error) + // FromPbText unmarshals FlowRSVPPathObjectsRsvpHopCType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsRsvpHopCType from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsRsvpHopCType from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsRsvpHopCType) Marshal() marshalFlowRSVPPathObjectsRsvpHopCType { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsRsvpHopCType{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsRsvpHopCType) Unmarshal() unMarshalFlowRSVPPathObjectsRsvpHopCType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsRsvpHopCType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsRsvpHopCType) ToProto() (*otg.FlowRSVPPathObjectsRsvpHopCType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsRsvpHopCType) FromProto(msg *otg.FlowRSVPPathObjectsRsvpHopCType) (FlowRSVPPathObjectsRsvpHopCType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsRsvpHopCType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsRsvpHopCType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsRsvpHopCType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsRsvpHopCType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsRsvpHopCType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsRsvpHopCType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsRsvpHopCType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsRsvpHopCType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsRsvpHopCType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsRsvpHopCType) Clone() (FlowRSVPPathObjectsRsvpHopCType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsRsvpHopCType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsRsvpHopCType) setNil() { + obj.ipv4Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsRsvpHopCType is object for RSVP_HOP class. Currently supported c-type is IPv4 (1). +type FlowRSVPPathObjectsRsvpHopCType interface { + Validation + // msg marshals FlowRSVPPathObjectsRsvpHopCType to protobuf object *otg.FlowRSVPPathObjectsRsvpHopCType + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsRsvpHopCType + // setMsg unmarshals FlowRSVPPathObjectsRsvpHopCType from protobuf object *otg.FlowRSVPPathObjectsRsvpHopCType + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsRsvpHopCType) FlowRSVPPathObjectsRsvpHopCType + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsRsvpHopCType + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsRsvpHopCType + // validate validates FlowRSVPPathObjectsRsvpHopCType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsRsvpHopCType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPPathObjectsRsvpHopCTypeChoiceEnum, set in FlowRSVPPathObjectsRsvpHopCType + Choice() FlowRSVPPathObjectsRsvpHopCTypeChoiceEnum + // setChoice assigns FlowRSVPPathObjectsRsvpHopCTypeChoiceEnum provided by user to FlowRSVPPathObjectsRsvpHopCType + setChoice(value FlowRSVPPathObjectsRsvpHopCTypeChoiceEnum) FlowRSVPPathObjectsRsvpHopCType + // HasChoice checks if Choice has been set in FlowRSVPPathObjectsRsvpHopCType + HasChoice() bool + // Ipv4 returns FlowRSVPPathRsvpHopIpv4, set in FlowRSVPPathObjectsRsvpHopCType. + // FlowRSVPPathRsvpHopIpv4 is iPv4 RSVP_HOP object: Class = 3, C-Type = 1 + Ipv4() FlowRSVPPathRsvpHopIpv4 + // SetIpv4 assigns FlowRSVPPathRsvpHopIpv4 provided by user to FlowRSVPPathObjectsRsvpHopCType. + // FlowRSVPPathRsvpHopIpv4 is iPv4 RSVP_HOP object: Class = 3, C-Type = 1 + SetIpv4(value FlowRSVPPathRsvpHopIpv4) FlowRSVPPathObjectsRsvpHopCType + // HasIpv4 checks if Ipv4 has been set in FlowRSVPPathObjectsRsvpHopCType + HasIpv4() bool + setNil() +} + +type FlowRSVPPathObjectsRsvpHopCTypeChoiceEnum string + +// Enum of Choice on FlowRSVPPathObjectsRsvpHopCType +var FlowRSVPPathObjectsRsvpHopCTypeChoice = struct { + IPV4 FlowRSVPPathObjectsRsvpHopCTypeChoiceEnum +}{ + IPV4: FlowRSVPPathObjectsRsvpHopCTypeChoiceEnum("ipv4"), +} + +func (obj *flowRSVPPathObjectsRsvpHopCType) Choice() FlowRSVPPathObjectsRsvpHopCTypeChoiceEnum { + return FlowRSVPPathObjectsRsvpHopCTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowRSVPPathObjectsRsvpHopCType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPPathObjectsRsvpHopCType) setChoice(value FlowRSVPPathObjectsRsvpHopCTypeChoiceEnum) FlowRSVPPathObjectsRsvpHopCType { + intValue, ok := otg.FlowRSVPPathObjectsRsvpHopCType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPPathObjectsRsvpHopCTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPPathObjectsRsvpHopCType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ipv4 = nil + obj.ipv4Holder = nil + + if value == FlowRSVPPathObjectsRsvpHopCTypeChoice.IPV4 { + obj.obj.Ipv4 = NewFlowRSVPPathRsvpHopIpv4().msg() + } + + return obj +} + +// description is TBD +// Ipv4 returns a FlowRSVPPathRsvpHopIpv4 +func (obj *flowRSVPPathObjectsRsvpHopCType) Ipv4() FlowRSVPPathRsvpHopIpv4 { + if obj.obj.Ipv4 == nil { + obj.setChoice(FlowRSVPPathObjectsRsvpHopCTypeChoice.IPV4) + } + if obj.ipv4Holder == nil { + obj.ipv4Holder = &flowRSVPPathRsvpHopIpv4{obj: obj.obj.Ipv4} + } + return obj.ipv4Holder +} + +// description is TBD +// Ipv4 returns a FlowRSVPPathRsvpHopIpv4 +func (obj *flowRSVPPathObjectsRsvpHopCType) HasIpv4() bool { + return obj.obj.Ipv4 != nil +} + +// description is TBD +// SetIpv4 sets the FlowRSVPPathRsvpHopIpv4 value in the FlowRSVPPathObjectsRsvpHopCType object +func (obj *flowRSVPPathObjectsRsvpHopCType) SetIpv4(value FlowRSVPPathRsvpHopIpv4) FlowRSVPPathObjectsRsvpHopCType { + obj.setChoice(FlowRSVPPathObjectsRsvpHopCTypeChoice.IPV4) + obj.ipv4Holder = nil + obj.obj.Ipv4 = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsRsvpHopCType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv4 != nil { + + obj.Ipv4().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsRsvpHopCType) setDefault() { + var choices_set int = 0 + var choice FlowRSVPPathObjectsRsvpHopCTypeChoiceEnum + + if obj.obj.Ipv4 != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsRsvpHopCTypeChoice.IPV4 + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPPathObjectsRsvpHopCTypeChoice.IPV4) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPPathObjectsRsvpHopCType") + } + } else { + intVal := otg.FlowRSVPPathObjectsRsvpHopCType_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPPathObjectsRsvpHopCType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_path_objects_sender_template_c_type.go b/gosnappi/flow_rsvp_path_objects_sender_template_c_type.go new file mode 100644 index 00000000..13e1e2f6 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_sender_template_c_type.go @@ -0,0 +1,396 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsSenderTemplateCType ***** +type flowRSVPPathObjectsSenderTemplateCType struct { + validation + obj *otg.FlowRSVPPathObjectsSenderTemplateCType + marshaller marshalFlowRSVPPathObjectsSenderTemplateCType + unMarshaller unMarshalFlowRSVPPathObjectsSenderTemplateCType + lspTunnelIpv4Holder FlowRSVPPathSenderTemplateLspTunnelIpv4 +} + +func NewFlowRSVPPathObjectsSenderTemplateCType() FlowRSVPPathObjectsSenderTemplateCType { + obj := flowRSVPPathObjectsSenderTemplateCType{obj: &otg.FlowRSVPPathObjectsSenderTemplateCType{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsSenderTemplateCType) msg() *otg.FlowRSVPPathObjectsSenderTemplateCType { + return obj.obj +} + +func (obj *flowRSVPPathObjectsSenderTemplateCType) setMsg(msg *otg.FlowRSVPPathObjectsSenderTemplateCType) FlowRSVPPathObjectsSenderTemplateCType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsSenderTemplateCType struct { + obj *flowRSVPPathObjectsSenderTemplateCType +} + +type marshalFlowRSVPPathObjectsSenderTemplateCType interface { + // ToProto marshals FlowRSVPPathObjectsSenderTemplateCType to protobuf object *otg.FlowRSVPPathObjectsSenderTemplateCType + ToProto() (*otg.FlowRSVPPathObjectsSenderTemplateCType, error) + // ToPbText marshals FlowRSVPPathObjectsSenderTemplateCType to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsSenderTemplateCType to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsSenderTemplateCType to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsSenderTemplateCType struct { + obj *flowRSVPPathObjectsSenderTemplateCType +} + +type unMarshalFlowRSVPPathObjectsSenderTemplateCType interface { + // FromProto unmarshals FlowRSVPPathObjectsSenderTemplateCType from protobuf object *otg.FlowRSVPPathObjectsSenderTemplateCType + FromProto(msg *otg.FlowRSVPPathObjectsSenderTemplateCType) (FlowRSVPPathObjectsSenderTemplateCType, error) + // FromPbText unmarshals FlowRSVPPathObjectsSenderTemplateCType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsSenderTemplateCType from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsSenderTemplateCType from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsSenderTemplateCType) Marshal() marshalFlowRSVPPathObjectsSenderTemplateCType { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsSenderTemplateCType{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsSenderTemplateCType) Unmarshal() unMarshalFlowRSVPPathObjectsSenderTemplateCType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsSenderTemplateCType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsSenderTemplateCType) ToProto() (*otg.FlowRSVPPathObjectsSenderTemplateCType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsSenderTemplateCType) FromProto(msg *otg.FlowRSVPPathObjectsSenderTemplateCType) (FlowRSVPPathObjectsSenderTemplateCType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsSenderTemplateCType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsSenderTemplateCType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsSenderTemplateCType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsSenderTemplateCType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsSenderTemplateCType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsSenderTemplateCType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsSenderTemplateCType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsSenderTemplateCType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsSenderTemplateCType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsSenderTemplateCType) Clone() (FlowRSVPPathObjectsSenderTemplateCType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsSenderTemplateCType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsSenderTemplateCType) setNil() { + obj.lspTunnelIpv4Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsSenderTemplateCType is object for SENDER_TEMPLATE class. Currently supported c-type is LSP Tunnel IPv4 (7). +type FlowRSVPPathObjectsSenderTemplateCType interface { + Validation + // msg marshals FlowRSVPPathObjectsSenderTemplateCType to protobuf object *otg.FlowRSVPPathObjectsSenderTemplateCType + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsSenderTemplateCType + // setMsg unmarshals FlowRSVPPathObjectsSenderTemplateCType from protobuf object *otg.FlowRSVPPathObjectsSenderTemplateCType + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsSenderTemplateCType) FlowRSVPPathObjectsSenderTemplateCType + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsSenderTemplateCType + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsSenderTemplateCType + // validate validates FlowRSVPPathObjectsSenderTemplateCType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsSenderTemplateCType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPPathObjectsSenderTemplateCTypeChoiceEnum, set in FlowRSVPPathObjectsSenderTemplateCType + Choice() FlowRSVPPathObjectsSenderTemplateCTypeChoiceEnum + // setChoice assigns FlowRSVPPathObjectsSenderTemplateCTypeChoiceEnum provided by user to FlowRSVPPathObjectsSenderTemplateCType + setChoice(value FlowRSVPPathObjectsSenderTemplateCTypeChoiceEnum) FlowRSVPPathObjectsSenderTemplateCType + // HasChoice checks if Choice has been set in FlowRSVPPathObjectsSenderTemplateCType + HasChoice() bool + // LspTunnelIpv4 returns FlowRSVPPathSenderTemplateLspTunnelIpv4, set in FlowRSVPPathObjectsSenderTemplateCType. + // FlowRSVPPathSenderTemplateLspTunnelIpv4 is class = SENDER_TEMPLATE, LSP_TUNNEL_IPv4 C-Type = 7 + LspTunnelIpv4() FlowRSVPPathSenderTemplateLspTunnelIpv4 + // SetLspTunnelIpv4 assigns FlowRSVPPathSenderTemplateLspTunnelIpv4 provided by user to FlowRSVPPathObjectsSenderTemplateCType. + // FlowRSVPPathSenderTemplateLspTunnelIpv4 is class = SENDER_TEMPLATE, LSP_TUNNEL_IPv4 C-Type = 7 + SetLspTunnelIpv4(value FlowRSVPPathSenderTemplateLspTunnelIpv4) FlowRSVPPathObjectsSenderTemplateCType + // HasLspTunnelIpv4 checks if LspTunnelIpv4 has been set in FlowRSVPPathObjectsSenderTemplateCType + HasLspTunnelIpv4() bool + setNil() +} + +type FlowRSVPPathObjectsSenderTemplateCTypeChoiceEnum string + +// Enum of Choice on FlowRSVPPathObjectsSenderTemplateCType +var FlowRSVPPathObjectsSenderTemplateCTypeChoice = struct { + LSP_TUNNEL_IPV4 FlowRSVPPathObjectsSenderTemplateCTypeChoiceEnum +}{ + LSP_TUNNEL_IPV4: FlowRSVPPathObjectsSenderTemplateCTypeChoiceEnum("lsp_tunnel_ipv4"), +} + +func (obj *flowRSVPPathObjectsSenderTemplateCType) Choice() FlowRSVPPathObjectsSenderTemplateCTypeChoiceEnum { + return FlowRSVPPathObjectsSenderTemplateCTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowRSVPPathObjectsSenderTemplateCType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPPathObjectsSenderTemplateCType) setChoice(value FlowRSVPPathObjectsSenderTemplateCTypeChoiceEnum) FlowRSVPPathObjectsSenderTemplateCType { + intValue, ok := otg.FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPPathObjectsSenderTemplateCTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.LspTunnelIpv4 = nil + obj.lspTunnelIpv4Holder = nil + + if value == FlowRSVPPathObjectsSenderTemplateCTypeChoice.LSP_TUNNEL_IPV4 { + obj.obj.LspTunnelIpv4 = NewFlowRSVPPathSenderTemplateLspTunnelIpv4().msg() + } + + return obj +} + +// description is TBD +// LspTunnelIpv4 returns a FlowRSVPPathSenderTemplateLspTunnelIpv4 +func (obj *flowRSVPPathObjectsSenderTemplateCType) LspTunnelIpv4() FlowRSVPPathSenderTemplateLspTunnelIpv4 { + if obj.obj.LspTunnelIpv4 == nil { + obj.setChoice(FlowRSVPPathObjectsSenderTemplateCTypeChoice.LSP_TUNNEL_IPV4) + } + if obj.lspTunnelIpv4Holder == nil { + obj.lspTunnelIpv4Holder = &flowRSVPPathSenderTemplateLspTunnelIpv4{obj: obj.obj.LspTunnelIpv4} + } + return obj.lspTunnelIpv4Holder +} + +// description is TBD +// LspTunnelIpv4 returns a FlowRSVPPathSenderTemplateLspTunnelIpv4 +func (obj *flowRSVPPathObjectsSenderTemplateCType) HasLspTunnelIpv4() bool { + return obj.obj.LspTunnelIpv4 != nil +} + +// description is TBD +// SetLspTunnelIpv4 sets the FlowRSVPPathSenderTemplateLspTunnelIpv4 value in the FlowRSVPPathObjectsSenderTemplateCType object +func (obj *flowRSVPPathObjectsSenderTemplateCType) SetLspTunnelIpv4(value FlowRSVPPathSenderTemplateLspTunnelIpv4) FlowRSVPPathObjectsSenderTemplateCType { + obj.setChoice(FlowRSVPPathObjectsSenderTemplateCTypeChoice.LSP_TUNNEL_IPV4) + obj.lspTunnelIpv4Holder = nil + obj.obj.LspTunnelIpv4 = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsSenderTemplateCType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.LspTunnelIpv4 != nil { + + obj.LspTunnelIpv4().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsSenderTemplateCType) setDefault() { + var choices_set int = 0 + var choice FlowRSVPPathObjectsSenderTemplateCTypeChoiceEnum + + if obj.obj.LspTunnelIpv4 != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsSenderTemplateCTypeChoice.LSP_TUNNEL_IPV4 + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPPathObjectsSenderTemplateCTypeChoice.LSP_TUNNEL_IPV4) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPPathObjectsSenderTemplateCType") + } + } else { + intVal := otg.FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_path_objects_sender_tspec_c_type.go b/gosnappi/flow_rsvp_path_objects_sender_tspec_c_type.go new file mode 100644 index 00000000..05421f54 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_sender_tspec_c_type.go @@ -0,0 +1,396 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsSenderTspecCType ***** +type flowRSVPPathObjectsSenderTspecCType struct { + validation + obj *otg.FlowRSVPPathObjectsSenderTspecCType + marshaller marshalFlowRSVPPathObjectsSenderTspecCType + unMarshaller unMarshalFlowRSVPPathObjectsSenderTspecCType + intServHolder FlowRSVPPathSenderTspecIntServ +} + +func NewFlowRSVPPathObjectsSenderTspecCType() FlowRSVPPathObjectsSenderTspecCType { + obj := flowRSVPPathObjectsSenderTspecCType{obj: &otg.FlowRSVPPathObjectsSenderTspecCType{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsSenderTspecCType) msg() *otg.FlowRSVPPathObjectsSenderTspecCType { + return obj.obj +} + +func (obj *flowRSVPPathObjectsSenderTspecCType) setMsg(msg *otg.FlowRSVPPathObjectsSenderTspecCType) FlowRSVPPathObjectsSenderTspecCType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsSenderTspecCType struct { + obj *flowRSVPPathObjectsSenderTspecCType +} + +type marshalFlowRSVPPathObjectsSenderTspecCType interface { + // ToProto marshals FlowRSVPPathObjectsSenderTspecCType to protobuf object *otg.FlowRSVPPathObjectsSenderTspecCType + ToProto() (*otg.FlowRSVPPathObjectsSenderTspecCType, error) + // ToPbText marshals FlowRSVPPathObjectsSenderTspecCType to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsSenderTspecCType to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsSenderTspecCType to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsSenderTspecCType struct { + obj *flowRSVPPathObjectsSenderTspecCType +} + +type unMarshalFlowRSVPPathObjectsSenderTspecCType interface { + // FromProto unmarshals FlowRSVPPathObjectsSenderTspecCType from protobuf object *otg.FlowRSVPPathObjectsSenderTspecCType + FromProto(msg *otg.FlowRSVPPathObjectsSenderTspecCType) (FlowRSVPPathObjectsSenderTspecCType, error) + // FromPbText unmarshals FlowRSVPPathObjectsSenderTspecCType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsSenderTspecCType from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsSenderTspecCType from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsSenderTspecCType) Marshal() marshalFlowRSVPPathObjectsSenderTspecCType { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsSenderTspecCType{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsSenderTspecCType) Unmarshal() unMarshalFlowRSVPPathObjectsSenderTspecCType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsSenderTspecCType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsSenderTspecCType) ToProto() (*otg.FlowRSVPPathObjectsSenderTspecCType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsSenderTspecCType) FromProto(msg *otg.FlowRSVPPathObjectsSenderTspecCType) (FlowRSVPPathObjectsSenderTspecCType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsSenderTspecCType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsSenderTspecCType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsSenderTspecCType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsSenderTspecCType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsSenderTspecCType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsSenderTspecCType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsSenderTspecCType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsSenderTspecCType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsSenderTspecCType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsSenderTspecCType) Clone() (FlowRSVPPathObjectsSenderTspecCType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsSenderTspecCType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsSenderTspecCType) setNil() { + obj.intServHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsSenderTspecCType is object for SENDER_TSPEC class. Currently supported c-type is int-serv (2). +type FlowRSVPPathObjectsSenderTspecCType interface { + Validation + // msg marshals FlowRSVPPathObjectsSenderTspecCType to protobuf object *otg.FlowRSVPPathObjectsSenderTspecCType + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsSenderTspecCType + // setMsg unmarshals FlowRSVPPathObjectsSenderTspecCType from protobuf object *otg.FlowRSVPPathObjectsSenderTspecCType + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsSenderTspecCType) FlowRSVPPathObjectsSenderTspecCType + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsSenderTspecCType + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsSenderTspecCType + // validate validates FlowRSVPPathObjectsSenderTspecCType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsSenderTspecCType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPPathObjectsSenderTspecCTypeChoiceEnum, set in FlowRSVPPathObjectsSenderTspecCType + Choice() FlowRSVPPathObjectsSenderTspecCTypeChoiceEnum + // setChoice assigns FlowRSVPPathObjectsSenderTspecCTypeChoiceEnum provided by user to FlowRSVPPathObjectsSenderTspecCType + setChoice(value FlowRSVPPathObjectsSenderTspecCTypeChoiceEnum) FlowRSVPPathObjectsSenderTspecCType + // HasChoice checks if Choice has been set in FlowRSVPPathObjectsSenderTspecCType + HasChoice() bool + // IntServ returns FlowRSVPPathSenderTspecIntServ, set in FlowRSVPPathObjectsSenderTspecCType. + // FlowRSVPPathSenderTspecIntServ is int-serv SENDER_TSPEC object: Class = 12, C-Type = 2 + IntServ() FlowRSVPPathSenderTspecIntServ + // SetIntServ assigns FlowRSVPPathSenderTspecIntServ provided by user to FlowRSVPPathObjectsSenderTspecCType. + // FlowRSVPPathSenderTspecIntServ is int-serv SENDER_TSPEC object: Class = 12, C-Type = 2 + SetIntServ(value FlowRSVPPathSenderTspecIntServ) FlowRSVPPathObjectsSenderTspecCType + // HasIntServ checks if IntServ has been set in FlowRSVPPathObjectsSenderTspecCType + HasIntServ() bool + setNil() +} + +type FlowRSVPPathObjectsSenderTspecCTypeChoiceEnum string + +// Enum of Choice on FlowRSVPPathObjectsSenderTspecCType +var FlowRSVPPathObjectsSenderTspecCTypeChoice = struct { + INT_SERV FlowRSVPPathObjectsSenderTspecCTypeChoiceEnum +}{ + INT_SERV: FlowRSVPPathObjectsSenderTspecCTypeChoiceEnum("int_serv"), +} + +func (obj *flowRSVPPathObjectsSenderTspecCType) Choice() FlowRSVPPathObjectsSenderTspecCTypeChoiceEnum { + return FlowRSVPPathObjectsSenderTspecCTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowRSVPPathObjectsSenderTspecCType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPPathObjectsSenderTspecCType) setChoice(value FlowRSVPPathObjectsSenderTspecCTypeChoiceEnum) FlowRSVPPathObjectsSenderTspecCType { + intValue, ok := otg.FlowRSVPPathObjectsSenderTspecCType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPPathObjectsSenderTspecCTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPPathObjectsSenderTspecCType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.IntServ = nil + obj.intServHolder = nil + + if value == FlowRSVPPathObjectsSenderTspecCTypeChoice.INT_SERV { + obj.obj.IntServ = NewFlowRSVPPathSenderTspecIntServ().msg() + } + + return obj +} + +// description is TBD +// IntServ returns a FlowRSVPPathSenderTspecIntServ +func (obj *flowRSVPPathObjectsSenderTspecCType) IntServ() FlowRSVPPathSenderTspecIntServ { + if obj.obj.IntServ == nil { + obj.setChoice(FlowRSVPPathObjectsSenderTspecCTypeChoice.INT_SERV) + } + if obj.intServHolder == nil { + obj.intServHolder = &flowRSVPPathSenderTspecIntServ{obj: obj.obj.IntServ} + } + return obj.intServHolder +} + +// description is TBD +// IntServ returns a FlowRSVPPathSenderTspecIntServ +func (obj *flowRSVPPathObjectsSenderTspecCType) HasIntServ() bool { + return obj.obj.IntServ != nil +} + +// description is TBD +// SetIntServ sets the FlowRSVPPathSenderTspecIntServ value in the FlowRSVPPathObjectsSenderTspecCType object +func (obj *flowRSVPPathObjectsSenderTspecCType) SetIntServ(value FlowRSVPPathSenderTspecIntServ) FlowRSVPPathObjectsSenderTspecCType { + obj.setChoice(FlowRSVPPathObjectsSenderTspecCTypeChoice.INT_SERV) + obj.intServHolder = nil + obj.obj.IntServ = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsSenderTspecCType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.IntServ != nil { + + obj.IntServ().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsSenderTspecCType) setDefault() { + var choices_set int = 0 + var choice FlowRSVPPathObjectsSenderTspecCTypeChoiceEnum + + if obj.obj.IntServ != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsSenderTspecCTypeChoice.INT_SERV + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPPathObjectsSenderTspecCTypeChoice.INT_SERV) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPPathObjectsSenderTspecCType") + } + } else { + intVal := otg.FlowRSVPPathObjectsSenderTspecCType_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPPathObjectsSenderTspecCType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_path_objects_session_attribute_c_type.go b/gosnappi/flow_rsvp_path_objects_session_attribute_c_type.go new file mode 100644 index 00000000..6ef47733 --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_session_attribute_c_type.go @@ -0,0 +1,452 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsSessionAttributeCType ***** +type flowRSVPPathObjectsSessionAttributeCType struct { + validation + obj *otg.FlowRSVPPathObjectsSessionAttributeCType + marshaller marshalFlowRSVPPathObjectsSessionAttributeCType + unMarshaller unMarshalFlowRSVPPathObjectsSessionAttributeCType + lspTunnelHolder FlowRSVPPathSessionAttributeLspTunnel + lspTunnelRaHolder FlowRSVPPathSessionAttributeLspTunnelRa +} + +func NewFlowRSVPPathObjectsSessionAttributeCType() FlowRSVPPathObjectsSessionAttributeCType { + obj := flowRSVPPathObjectsSessionAttributeCType{obj: &otg.FlowRSVPPathObjectsSessionAttributeCType{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsSessionAttributeCType) msg() *otg.FlowRSVPPathObjectsSessionAttributeCType { + return obj.obj +} + +func (obj *flowRSVPPathObjectsSessionAttributeCType) setMsg(msg *otg.FlowRSVPPathObjectsSessionAttributeCType) FlowRSVPPathObjectsSessionAttributeCType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsSessionAttributeCType struct { + obj *flowRSVPPathObjectsSessionAttributeCType +} + +type marshalFlowRSVPPathObjectsSessionAttributeCType interface { + // ToProto marshals FlowRSVPPathObjectsSessionAttributeCType to protobuf object *otg.FlowRSVPPathObjectsSessionAttributeCType + ToProto() (*otg.FlowRSVPPathObjectsSessionAttributeCType, error) + // ToPbText marshals FlowRSVPPathObjectsSessionAttributeCType to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsSessionAttributeCType to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsSessionAttributeCType to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsSessionAttributeCType struct { + obj *flowRSVPPathObjectsSessionAttributeCType +} + +type unMarshalFlowRSVPPathObjectsSessionAttributeCType interface { + // FromProto unmarshals FlowRSVPPathObjectsSessionAttributeCType from protobuf object *otg.FlowRSVPPathObjectsSessionAttributeCType + FromProto(msg *otg.FlowRSVPPathObjectsSessionAttributeCType) (FlowRSVPPathObjectsSessionAttributeCType, error) + // FromPbText unmarshals FlowRSVPPathObjectsSessionAttributeCType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsSessionAttributeCType from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsSessionAttributeCType from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsSessionAttributeCType) Marshal() marshalFlowRSVPPathObjectsSessionAttributeCType { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsSessionAttributeCType{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsSessionAttributeCType) Unmarshal() unMarshalFlowRSVPPathObjectsSessionAttributeCType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsSessionAttributeCType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsSessionAttributeCType) ToProto() (*otg.FlowRSVPPathObjectsSessionAttributeCType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsSessionAttributeCType) FromProto(msg *otg.FlowRSVPPathObjectsSessionAttributeCType) (FlowRSVPPathObjectsSessionAttributeCType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsSessionAttributeCType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsSessionAttributeCType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsSessionAttributeCType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsSessionAttributeCType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsSessionAttributeCType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsSessionAttributeCType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsSessionAttributeCType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsSessionAttributeCType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsSessionAttributeCType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsSessionAttributeCType) Clone() (FlowRSVPPathObjectsSessionAttributeCType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsSessionAttributeCType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsSessionAttributeCType) setNil() { + obj.lspTunnelHolder = nil + obj.lspTunnelRaHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsSessionAttributeCType is object for SESSION_ATTRIBUTE class. Currently supported c-type is LSP_Tunnel_RA (1) and LSP_Tunnel (7). +type FlowRSVPPathObjectsSessionAttributeCType interface { + Validation + // msg marshals FlowRSVPPathObjectsSessionAttributeCType to protobuf object *otg.FlowRSVPPathObjectsSessionAttributeCType + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsSessionAttributeCType + // setMsg unmarshals FlowRSVPPathObjectsSessionAttributeCType from protobuf object *otg.FlowRSVPPathObjectsSessionAttributeCType + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsSessionAttributeCType) FlowRSVPPathObjectsSessionAttributeCType + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsSessionAttributeCType + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsSessionAttributeCType + // validate validates FlowRSVPPathObjectsSessionAttributeCType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsSessionAttributeCType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPPathObjectsSessionAttributeCTypeChoiceEnum, set in FlowRSVPPathObjectsSessionAttributeCType + Choice() FlowRSVPPathObjectsSessionAttributeCTypeChoiceEnum + // setChoice assigns FlowRSVPPathObjectsSessionAttributeCTypeChoiceEnum provided by user to FlowRSVPPathObjectsSessionAttributeCType + setChoice(value FlowRSVPPathObjectsSessionAttributeCTypeChoiceEnum) FlowRSVPPathObjectsSessionAttributeCType + // HasChoice checks if Choice has been set in FlowRSVPPathObjectsSessionAttributeCType + HasChoice() bool + // LspTunnel returns FlowRSVPPathSessionAttributeLspTunnel, set in FlowRSVPPathObjectsSessionAttributeCType. + // FlowRSVPPathSessionAttributeLspTunnel is sESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 7, resource affinity information. + LspTunnel() FlowRSVPPathSessionAttributeLspTunnel + // SetLspTunnel assigns FlowRSVPPathSessionAttributeLspTunnel provided by user to FlowRSVPPathObjectsSessionAttributeCType. + // FlowRSVPPathSessionAttributeLspTunnel is sESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 7, resource affinity information. + SetLspTunnel(value FlowRSVPPathSessionAttributeLspTunnel) FlowRSVPPathObjectsSessionAttributeCType + // HasLspTunnel checks if LspTunnel has been set in FlowRSVPPathObjectsSessionAttributeCType + HasLspTunnel() bool + // LspTunnelRa returns FlowRSVPPathSessionAttributeLspTunnelRa, set in FlowRSVPPathObjectsSessionAttributeCType. + // FlowRSVPPathSessionAttributeLspTunnelRa is sESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 1, it carries resource affinity information. + LspTunnelRa() FlowRSVPPathSessionAttributeLspTunnelRa + // SetLspTunnelRa assigns FlowRSVPPathSessionAttributeLspTunnelRa provided by user to FlowRSVPPathObjectsSessionAttributeCType. + // FlowRSVPPathSessionAttributeLspTunnelRa is sESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 1, it carries resource affinity information. + SetLspTunnelRa(value FlowRSVPPathSessionAttributeLspTunnelRa) FlowRSVPPathObjectsSessionAttributeCType + // HasLspTunnelRa checks if LspTunnelRa has been set in FlowRSVPPathObjectsSessionAttributeCType + HasLspTunnelRa() bool + setNil() +} + +type FlowRSVPPathObjectsSessionAttributeCTypeChoiceEnum string + +// Enum of Choice on FlowRSVPPathObjectsSessionAttributeCType +var FlowRSVPPathObjectsSessionAttributeCTypeChoice = struct { + LSP_TUNNEL FlowRSVPPathObjectsSessionAttributeCTypeChoiceEnum + LSP_TUNNEL_RA FlowRSVPPathObjectsSessionAttributeCTypeChoiceEnum +}{ + LSP_TUNNEL: FlowRSVPPathObjectsSessionAttributeCTypeChoiceEnum("lsp_tunnel"), + LSP_TUNNEL_RA: FlowRSVPPathObjectsSessionAttributeCTypeChoiceEnum("lsp_tunnel_ra"), +} + +func (obj *flowRSVPPathObjectsSessionAttributeCType) Choice() FlowRSVPPathObjectsSessionAttributeCTypeChoiceEnum { + return FlowRSVPPathObjectsSessionAttributeCTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowRSVPPathObjectsSessionAttributeCType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPPathObjectsSessionAttributeCType) setChoice(value FlowRSVPPathObjectsSessionAttributeCTypeChoiceEnum) FlowRSVPPathObjectsSessionAttributeCType { + intValue, ok := otg.FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPPathObjectsSessionAttributeCTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.LspTunnelRa = nil + obj.lspTunnelRaHolder = nil + obj.obj.LspTunnel = nil + obj.lspTunnelHolder = nil + + if value == FlowRSVPPathObjectsSessionAttributeCTypeChoice.LSP_TUNNEL { + obj.obj.LspTunnel = NewFlowRSVPPathSessionAttributeLspTunnel().msg() + } + + if value == FlowRSVPPathObjectsSessionAttributeCTypeChoice.LSP_TUNNEL_RA { + obj.obj.LspTunnelRa = NewFlowRSVPPathSessionAttributeLspTunnelRa().msg() + } + + return obj +} + +// description is TBD +// LspTunnel returns a FlowRSVPPathSessionAttributeLspTunnel +func (obj *flowRSVPPathObjectsSessionAttributeCType) LspTunnel() FlowRSVPPathSessionAttributeLspTunnel { + if obj.obj.LspTunnel == nil { + obj.setChoice(FlowRSVPPathObjectsSessionAttributeCTypeChoice.LSP_TUNNEL) + } + if obj.lspTunnelHolder == nil { + obj.lspTunnelHolder = &flowRSVPPathSessionAttributeLspTunnel{obj: obj.obj.LspTunnel} + } + return obj.lspTunnelHolder +} + +// description is TBD +// LspTunnel returns a FlowRSVPPathSessionAttributeLspTunnel +func (obj *flowRSVPPathObjectsSessionAttributeCType) HasLspTunnel() bool { + return obj.obj.LspTunnel != nil +} + +// description is TBD +// SetLspTunnel sets the FlowRSVPPathSessionAttributeLspTunnel value in the FlowRSVPPathObjectsSessionAttributeCType object +func (obj *flowRSVPPathObjectsSessionAttributeCType) SetLspTunnel(value FlowRSVPPathSessionAttributeLspTunnel) FlowRSVPPathObjectsSessionAttributeCType { + obj.setChoice(FlowRSVPPathObjectsSessionAttributeCTypeChoice.LSP_TUNNEL) + obj.lspTunnelHolder = nil + obj.obj.LspTunnel = value.msg() + + return obj +} + +// description is TBD +// LspTunnelRa returns a FlowRSVPPathSessionAttributeLspTunnelRa +func (obj *flowRSVPPathObjectsSessionAttributeCType) LspTunnelRa() FlowRSVPPathSessionAttributeLspTunnelRa { + if obj.obj.LspTunnelRa == nil { + obj.setChoice(FlowRSVPPathObjectsSessionAttributeCTypeChoice.LSP_TUNNEL_RA) + } + if obj.lspTunnelRaHolder == nil { + obj.lspTunnelRaHolder = &flowRSVPPathSessionAttributeLspTunnelRa{obj: obj.obj.LspTunnelRa} + } + return obj.lspTunnelRaHolder +} + +// description is TBD +// LspTunnelRa returns a FlowRSVPPathSessionAttributeLspTunnelRa +func (obj *flowRSVPPathObjectsSessionAttributeCType) HasLspTunnelRa() bool { + return obj.obj.LspTunnelRa != nil +} + +// description is TBD +// SetLspTunnelRa sets the FlowRSVPPathSessionAttributeLspTunnelRa value in the FlowRSVPPathObjectsSessionAttributeCType object +func (obj *flowRSVPPathObjectsSessionAttributeCType) SetLspTunnelRa(value FlowRSVPPathSessionAttributeLspTunnelRa) FlowRSVPPathObjectsSessionAttributeCType { + obj.setChoice(FlowRSVPPathObjectsSessionAttributeCTypeChoice.LSP_TUNNEL_RA) + obj.lspTunnelRaHolder = nil + obj.obj.LspTunnelRa = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsSessionAttributeCType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.LspTunnel != nil { + + obj.LspTunnel().validateObj(vObj, set_default) + } + + if obj.obj.LspTunnelRa != nil { + + obj.LspTunnelRa().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsSessionAttributeCType) setDefault() { + var choices_set int = 0 + var choice FlowRSVPPathObjectsSessionAttributeCTypeChoiceEnum + + if obj.obj.LspTunnel != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsSessionAttributeCTypeChoice.LSP_TUNNEL + } + + if obj.obj.LspTunnelRa != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsSessionAttributeCTypeChoice.LSP_TUNNEL_RA + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPPathObjectsSessionAttributeCTypeChoice.LSP_TUNNEL) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPPathObjectsSessionAttributeCType") + } + } else { + intVal := otg.FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_path_objects_session_c_type.go b/gosnappi/flow_rsvp_path_objects_session_c_type.go new file mode 100644 index 00000000..66dc095b --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_session_c_type.go @@ -0,0 +1,396 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsSessionCType ***** +type flowRSVPPathObjectsSessionCType struct { + validation + obj *otg.FlowRSVPPathObjectsSessionCType + marshaller marshalFlowRSVPPathObjectsSessionCType + unMarshaller unMarshalFlowRSVPPathObjectsSessionCType + lspTunnelIpv4Holder FlowRSVPPathSessionLspTunnelIpv4 +} + +func NewFlowRSVPPathObjectsSessionCType() FlowRSVPPathObjectsSessionCType { + obj := flowRSVPPathObjectsSessionCType{obj: &otg.FlowRSVPPathObjectsSessionCType{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsSessionCType) msg() *otg.FlowRSVPPathObjectsSessionCType { + return obj.obj +} + +func (obj *flowRSVPPathObjectsSessionCType) setMsg(msg *otg.FlowRSVPPathObjectsSessionCType) FlowRSVPPathObjectsSessionCType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsSessionCType struct { + obj *flowRSVPPathObjectsSessionCType +} + +type marshalFlowRSVPPathObjectsSessionCType interface { + // ToProto marshals FlowRSVPPathObjectsSessionCType to protobuf object *otg.FlowRSVPPathObjectsSessionCType + ToProto() (*otg.FlowRSVPPathObjectsSessionCType, error) + // ToPbText marshals FlowRSVPPathObjectsSessionCType to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsSessionCType to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsSessionCType to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsSessionCType struct { + obj *flowRSVPPathObjectsSessionCType +} + +type unMarshalFlowRSVPPathObjectsSessionCType interface { + // FromProto unmarshals FlowRSVPPathObjectsSessionCType from protobuf object *otg.FlowRSVPPathObjectsSessionCType + FromProto(msg *otg.FlowRSVPPathObjectsSessionCType) (FlowRSVPPathObjectsSessionCType, error) + // FromPbText unmarshals FlowRSVPPathObjectsSessionCType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsSessionCType from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsSessionCType from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsSessionCType) Marshal() marshalFlowRSVPPathObjectsSessionCType { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsSessionCType{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsSessionCType) Unmarshal() unMarshalFlowRSVPPathObjectsSessionCType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsSessionCType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsSessionCType) ToProto() (*otg.FlowRSVPPathObjectsSessionCType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsSessionCType) FromProto(msg *otg.FlowRSVPPathObjectsSessionCType) (FlowRSVPPathObjectsSessionCType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsSessionCType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsSessionCType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsSessionCType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsSessionCType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsSessionCType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsSessionCType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsSessionCType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsSessionCType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsSessionCType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsSessionCType) Clone() (FlowRSVPPathObjectsSessionCType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsSessionCType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsSessionCType) setNil() { + obj.lspTunnelIpv4Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsSessionCType is the body of an object corresponding to the class number and c-type. Currently supported c-type for SESSION object is LSP Tunnel IPv4 (7). +type FlowRSVPPathObjectsSessionCType interface { + Validation + // msg marshals FlowRSVPPathObjectsSessionCType to protobuf object *otg.FlowRSVPPathObjectsSessionCType + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsSessionCType + // setMsg unmarshals FlowRSVPPathObjectsSessionCType from protobuf object *otg.FlowRSVPPathObjectsSessionCType + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsSessionCType) FlowRSVPPathObjectsSessionCType + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsSessionCType + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsSessionCType + // validate validates FlowRSVPPathObjectsSessionCType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsSessionCType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPPathObjectsSessionCTypeChoiceEnum, set in FlowRSVPPathObjectsSessionCType + Choice() FlowRSVPPathObjectsSessionCTypeChoiceEnum + // setChoice assigns FlowRSVPPathObjectsSessionCTypeChoiceEnum provided by user to FlowRSVPPathObjectsSessionCType + setChoice(value FlowRSVPPathObjectsSessionCTypeChoiceEnum) FlowRSVPPathObjectsSessionCType + // HasChoice checks if Choice has been set in FlowRSVPPathObjectsSessionCType + HasChoice() bool + // LspTunnelIpv4 returns FlowRSVPPathSessionLspTunnelIpv4, set in FlowRSVPPathObjectsSessionCType. + // FlowRSVPPathSessionLspTunnelIpv4 is class = SESSION, LSP_TUNNEL_IPv4 C-Type = 7. + LspTunnelIpv4() FlowRSVPPathSessionLspTunnelIpv4 + // SetLspTunnelIpv4 assigns FlowRSVPPathSessionLspTunnelIpv4 provided by user to FlowRSVPPathObjectsSessionCType. + // FlowRSVPPathSessionLspTunnelIpv4 is class = SESSION, LSP_TUNNEL_IPv4 C-Type = 7. + SetLspTunnelIpv4(value FlowRSVPPathSessionLspTunnelIpv4) FlowRSVPPathObjectsSessionCType + // HasLspTunnelIpv4 checks if LspTunnelIpv4 has been set in FlowRSVPPathObjectsSessionCType + HasLspTunnelIpv4() bool + setNil() +} + +type FlowRSVPPathObjectsSessionCTypeChoiceEnum string + +// Enum of Choice on FlowRSVPPathObjectsSessionCType +var FlowRSVPPathObjectsSessionCTypeChoice = struct { + LSP_TUNNEL_IPV4 FlowRSVPPathObjectsSessionCTypeChoiceEnum +}{ + LSP_TUNNEL_IPV4: FlowRSVPPathObjectsSessionCTypeChoiceEnum("lsp_tunnel_ipv4"), +} + +func (obj *flowRSVPPathObjectsSessionCType) Choice() FlowRSVPPathObjectsSessionCTypeChoiceEnum { + return FlowRSVPPathObjectsSessionCTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowRSVPPathObjectsSessionCType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPPathObjectsSessionCType) setChoice(value FlowRSVPPathObjectsSessionCTypeChoiceEnum) FlowRSVPPathObjectsSessionCType { + intValue, ok := otg.FlowRSVPPathObjectsSessionCType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPPathObjectsSessionCTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPPathObjectsSessionCType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.LspTunnelIpv4 = nil + obj.lspTunnelIpv4Holder = nil + + if value == FlowRSVPPathObjectsSessionCTypeChoice.LSP_TUNNEL_IPV4 { + obj.obj.LspTunnelIpv4 = NewFlowRSVPPathSessionLspTunnelIpv4().msg() + } + + return obj +} + +// description is TBD +// LspTunnelIpv4 returns a FlowRSVPPathSessionLspTunnelIpv4 +func (obj *flowRSVPPathObjectsSessionCType) LspTunnelIpv4() FlowRSVPPathSessionLspTunnelIpv4 { + if obj.obj.LspTunnelIpv4 == nil { + obj.setChoice(FlowRSVPPathObjectsSessionCTypeChoice.LSP_TUNNEL_IPV4) + } + if obj.lspTunnelIpv4Holder == nil { + obj.lspTunnelIpv4Holder = &flowRSVPPathSessionLspTunnelIpv4{obj: obj.obj.LspTunnelIpv4} + } + return obj.lspTunnelIpv4Holder +} + +// description is TBD +// LspTunnelIpv4 returns a FlowRSVPPathSessionLspTunnelIpv4 +func (obj *flowRSVPPathObjectsSessionCType) HasLspTunnelIpv4() bool { + return obj.obj.LspTunnelIpv4 != nil +} + +// description is TBD +// SetLspTunnelIpv4 sets the FlowRSVPPathSessionLspTunnelIpv4 value in the FlowRSVPPathObjectsSessionCType object +func (obj *flowRSVPPathObjectsSessionCType) SetLspTunnelIpv4(value FlowRSVPPathSessionLspTunnelIpv4) FlowRSVPPathObjectsSessionCType { + obj.setChoice(FlowRSVPPathObjectsSessionCTypeChoice.LSP_TUNNEL_IPV4) + obj.lspTunnelIpv4Holder = nil + obj.obj.LspTunnelIpv4 = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsSessionCType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.LspTunnelIpv4 != nil { + + obj.LspTunnelIpv4().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsSessionCType) setDefault() { + var choices_set int = 0 + var choice FlowRSVPPathObjectsSessionCTypeChoiceEnum + + if obj.obj.LspTunnelIpv4 != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsSessionCTypeChoice.LSP_TUNNEL_IPV4 + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPPathObjectsSessionCTypeChoice.LSP_TUNNEL_IPV4) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPPathObjectsSessionCType") + } + } else { + intVal := otg.FlowRSVPPathObjectsSessionCType_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPPathObjectsSessionCType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_path_objects_time_values_c_type.go b/gosnappi/flow_rsvp_path_objects_time_values_c_type.go new file mode 100644 index 00000000..cdb0ad3d --- /dev/null +++ b/gosnappi/flow_rsvp_path_objects_time_values_c_type.go @@ -0,0 +1,396 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathObjectsTimeValuesCType ***** +type flowRSVPPathObjectsTimeValuesCType struct { + validation + obj *otg.FlowRSVPPathObjectsTimeValuesCType + marshaller marshalFlowRSVPPathObjectsTimeValuesCType + unMarshaller unMarshalFlowRSVPPathObjectsTimeValuesCType + type_1Holder FlowRSVPPathTimeValuesType1 +} + +func NewFlowRSVPPathObjectsTimeValuesCType() FlowRSVPPathObjectsTimeValuesCType { + obj := flowRSVPPathObjectsTimeValuesCType{obj: &otg.FlowRSVPPathObjectsTimeValuesCType{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathObjectsTimeValuesCType) msg() *otg.FlowRSVPPathObjectsTimeValuesCType { + return obj.obj +} + +func (obj *flowRSVPPathObjectsTimeValuesCType) setMsg(msg *otg.FlowRSVPPathObjectsTimeValuesCType) FlowRSVPPathObjectsTimeValuesCType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathObjectsTimeValuesCType struct { + obj *flowRSVPPathObjectsTimeValuesCType +} + +type marshalFlowRSVPPathObjectsTimeValuesCType interface { + // ToProto marshals FlowRSVPPathObjectsTimeValuesCType to protobuf object *otg.FlowRSVPPathObjectsTimeValuesCType + ToProto() (*otg.FlowRSVPPathObjectsTimeValuesCType, error) + // ToPbText marshals FlowRSVPPathObjectsTimeValuesCType to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathObjectsTimeValuesCType to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathObjectsTimeValuesCType to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathObjectsTimeValuesCType struct { + obj *flowRSVPPathObjectsTimeValuesCType +} + +type unMarshalFlowRSVPPathObjectsTimeValuesCType interface { + // FromProto unmarshals FlowRSVPPathObjectsTimeValuesCType from protobuf object *otg.FlowRSVPPathObjectsTimeValuesCType + FromProto(msg *otg.FlowRSVPPathObjectsTimeValuesCType) (FlowRSVPPathObjectsTimeValuesCType, error) + // FromPbText unmarshals FlowRSVPPathObjectsTimeValuesCType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathObjectsTimeValuesCType from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathObjectsTimeValuesCType from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathObjectsTimeValuesCType) Marshal() marshalFlowRSVPPathObjectsTimeValuesCType { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathObjectsTimeValuesCType{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathObjectsTimeValuesCType) Unmarshal() unMarshalFlowRSVPPathObjectsTimeValuesCType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathObjectsTimeValuesCType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathObjectsTimeValuesCType) ToProto() (*otg.FlowRSVPPathObjectsTimeValuesCType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathObjectsTimeValuesCType) FromProto(msg *otg.FlowRSVPPathObjectsTimeValuesCType) (FlowRSVPPathObjectsTimeValuesCType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathObjectsTimeValuesCType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathObjectsTimeValuesCType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathObjectsTimeValuesCType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsTimeValuesCType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathObjectsTimeValuesCType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathObjectsTimeValuesCType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathObjectsTimeValuesCType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsTimeValuesCType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathObjectsTimeValuesCType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathObjectsTimeValuesCType) Clone() (FlowRSVPPathObjectsTimeValuesCType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathObjectsTimeValuesCType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathObjectsTimeValuesCType) setNil() { + obj.type_1Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathObjectsTimeValuesCType is object for TIME_VALUES class. Currently supported c-type is Type 1 Time Value (1). +type FlowRSVPPathObjectsTimeValuesCType interface { + Validation + // msg marshals FlowRSVPPathObjectsTimeValuesCType to protobuf object *otg.FlowRSVPPathObjectsTimeValuesCType + // and doesn't set defaults + msg() *otg.FlowRSVPPathObjectsTimeValuesCType + // setMsg unmarshals FlowRSVPPathObjectsTimeValuesCType from protobuf object *otg.FlowRSVPPathObjectsTimeValuesCType + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathObjectsTimeValuesCType) FlowRSVPPathObjectsTimeValuesCType + // provides marshal interface + Marshal() marshalFlowRSVPPathObjectsTimeValuesCType + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathObjectsTimeValuesCType + // validate validates FlowRSVPPathObjectsTimeValuesCType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathObjectsTimeValuesCType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPPathObjectsTimeValuesCTypeChoiceEnum, set in FlowRSVPPathObjectsTimeValuesCType + Choice() FlowRSVPPathObjectsTimeValuesCTypeChoiceEnum + // setChoice assigns FlowRSVPPathObjectsTimeValuesCTypeChoiceEnum provided by user to FlowRSVPPathObjectsTimeValuesCType + setChoice(value FlowRSVPPathObjectsTimeValuesCTypeChoiceEnum) FlowRSVPPathObjectsTimeValuesCType + // HasChoice checks if Choice has been set in FlowRSVPPathObjectsTimeValuesCType + HasChoice() bool + // Type1 returns FlowRSVPPathTimeValuesType1, set in FlowRSVPPathObjectsTimeValuesCType. + // FlowRSVPPathTimeValuesType1 is tIME_VALUES Object: Class = 5, C-Type = 1 + Type1() FlowRSVPPathTimeValuesType1 + // SetType1 assigns FlowRSVPPathTimeValuesType1 provided by user to FlowRSVPPathObjectsTimeValuesCType. + // FlowRSVPPathTimeValuesType1 is tIME_VALUES Object: Class = 5, C-Type = 1 + SetType1(value FlowRSVPPathTimeValuesType1) FlowRSVPPathObjectsTimeValuesCType + // HasType1 checks if Type1 has been set in FlowRSVPPathObjectsTimeValuesCType + HasType1() bool + setNil() +} + +type FlowRSVPPathObjectsTimeValuesCTypeChoiceEnum string + +// Enum of Choice on FlowRSVPPathObjectsTimeValuesCType +var FlowRSVPPathObjectsTimeValuesCTypeChoice = struct { + TYPE_1 FlowRSVPPathObjectsTimeValuesCTypeChoiceEnum +}{ + TYPE_1: FlowRSVPPathObjectsTimeValuesCTypeChoiceEnum("type_1"), +} + +func (obj *flowRSVPPathObjectsTimeValuesCType) Choice() FlowRSVPPathObjectsTimeValuesCTypeChoiceEnum { + return FlowRSVPPathObjectsTimeValuesCTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowRSVPPathObjectsTimeValuesCType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPPathObjectsTimeValuesCType) setChoice(value FlowRSVPPathObjectsTimeValuesCTypeChoiceEnum) FlowRSVPPathObjectsTimeValuesCType { + intValue, ok := otg.FlowRSVPPathObjectsTimeValuesCType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPPathObjectsTimeValuesCTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPPathObjectsTimeValuesCType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Type_1 = nil + obj.type_1Holder = nil + + if value == FlowRSVPPathObjectsTimeValuesCTypeChoice.TYPE_1 { + obj.obj.Type_1 = NewFlowRSVPPathTimeValuesType1().msg() + } + + return obj +} + +// description is TBD +// Type1 returns a FlowRSVPPathTimeValuesType1 +func (obj *flowRSVPPathObjectsTimeValuesCType) Type1() FlowRSVPPathTimeValuesType1 { + if obj.obj.Type_1 == nil { + obj.setChoice(FlowRSVPPathObjectsTimeValuesCTypeChoice.TYPE_1) + } + if obj.type_1Holder == nil { + obj.type_1Holder = &flowRSVPPathTimeValuesType1{obj: obj.obj.Type_1} + } + return obj.type_1Holder +} + +// description is TBD +// Type1 returns a FlowRSVPPathTimeValuesType1 +func (obj *flowRSVPPathObjectsTimeValuesCType) HasType1() bool { + return obj.obj.Type_1 != nil +} + +// description is TBD +// SetType1 sets the FlowRSVPPathTimeValuesType1 value in the FlowRSVPPathObjectsTimeValuesCType object +func (obj *flowRSVPPathObjectsTimeValuesCType) SetType1(value FlowRSVPPathTimeValuesType1) FlowRSVPPathObjectsTimeValuesCType { + obj.setChoice(FlowRSVPPathObjectsTimeValuesCTypeChoice.TYPE_1) + obj.type_1Holder = nil + obj.obj.Type_1 = value.msg() + + return obj +} + +func (obj *flowRSVPPathObjectsTimeValuesCType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Type_1 != nil { + + obj.Type1().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathObjectsTimeValuesCType) setDefault() { + var choices_set int = 0 + var choice FlowRSVPPathObjectsTimeValuesCTypeChoiceEnum + + if obj.obj.Type_1 != nil { + choices_set += 1 + choice = FlowRSVPPathObjectsTimeValuesCTypeChoice.TYPE_1 + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPPathObjectsTimeValuesCTypeChoice.TYPE_1) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPPathObjectsTimeValuesCType") + } + } else { + intVal := otg.FlowRSVPPathObjectsTimeValuesCType_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPPathObjectsTimeValuesCType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_path_record_route_label.go b/gosnappi/flow_rsvp_path_record_route_label.go new file mode 100644 index 00000000..0f1d8f55 --- /dev/null +++ b/gosnappi/flow_rsvp_path_record_route_label.go @@ -0,0 +1,445 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathRecordRouteLabel ***** +type flowRSVPPathRecordRouteLabel struct { + validation + obj *otg.FlowRSVPPathRecordRouteLabel + marshaller marshalFlowRSVPPathRecordRouteLabel + unMarshaller unMarshalFlowRSVPPathRecordRouteLabel +} + +func NewFlowRSVPPathRecordRouteLabel() FlowRSVPPathRecordRouteLabel { + obj := flowRSVPPathRecordRouteLabel{obj: &otg.FlowRSVPPathRecordRouteLabel{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathRecordRouteLabel) msg() *otg.FlowRSVPPathRecordRouteLabel { + return obj.obj +} + +func (obj *flowRSVPPathRecordRouteLabel) setMsg(msg *otg.FlowRSVPPathRecordRouteLabel) FlowRSVPPathRecordRouteLabel { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathRecordRouteLabel struct { + obj *flowRSVPPathRecordRouteLabel +} + +type marshalFlowRSVPPathRecordRouteLabel interface { + // ToProto marshals FlowRSVPPathRecordRouteLabel to protobuf object *otg.FlowRSVPPathRecordRouteLabel + ToProto() (*otg.FlowRSVPPathRecordRouteLabel, error) + // ToPbText marshals FlowRSVPPathRecordRouteLabel to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathRecordRouteLabel to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathRecordRouteLabel to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathRecordRouteLabel struct { + obj *flowRSVPPathRecordRouteLabel +} + +type unMarshalFlowRSVPPathRecordRouteLabel interface { + // FromProto unmarshals FlowRSVPPathRecordRouteLabel from protobuf object *otg.FlowRSVPPathRecordRouteLabel + FromProto(msg *otg.FlowRSVPPathRecordRouteLabel) (FlowRSVPPathRecordRouteLabel, error) + // FromPbText unmarshals FlowRSVPPathRecordRouteLabel from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathRecordRouteLabel from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathRecordRouteLabel from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathRecordRouteLabel) Marshal() marshalFlowRSVPPathRecordRouteLabel { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathRecordRouteLabel{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathRecordRouteLabel) Unmarshal() unMarshalFlowRSVPPathRecordRouteLabel { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathRecordRouteLabel{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathRecordRouteLabel) ToProto() (*otg.FlowRSVPPathRecordRouteLabel, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteLabel) FromProto(msg *otg.FlowRSVPPathRecordRouteLabel) (FlowRSVPPathRecordRouteLabel, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathRecordRouteLabel) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteLabel) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathRecordRouteLabel) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteLabel) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathRecordRouteLabel) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteLabel) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathRecordRouteLabel) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathRecordRouteLabel) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathRecordRouteLabel) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathRecordRouteLabel) Clone() (FlowRSVPPathRecordRouteLabel, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathRecordRouteLabel() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowRSVPPathRecordRouteLabel is description is TBD +type FlowRSVPPathRecordRouteLabel interface { + Validation + // msg marshals FlowRSVPPathRecordRouteLabel to protobuf object *otg.FlowRSVPPathRecordRouteLabel + // and doesn't set defaults + msg() *otg.FlowRSVPPathRecordRouteLabel + // setMsg unmarshals FlowRSVPPathRecordRouteLabel from protobuf object *otg.FlowRSVPPathRecordRouteLabel + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathRecordRouteLabel) FlowRSVPPathRecordRouteLabel + // provides marshal interface + Marshal() marshalFlowRSVPPathRecordRouteLabel + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathRecordRouteLabel + // validate validates FlowRSVPPathRecordRouteLabel + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathRecordRouteLabel, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPPathRecordRouteLabelChoiceEnum, set in FlowRSVPPathRecordRouteLabel + Choice() FlowRSVPPathRecordRouteLabelChoiceEnum + // setChoice assigns FlowRSVPPathRecordRouteLabelChoiceEnum provided by user to FlowRSVPPathRecordRouteLabel + setChoice(value FlowRSVPPathRecordRouteLabelChoiceEnum) FlowRSVPPathRecordRouteLabel + // HasChoice checks if Choice has been set in FlowRSVPPathRecordRouteLabel + HasChoice() bool + // AsInteger returns uint32, set in FlowRSVPPathRecordRouteLabel. + AsInteger() uint32 + // SetAsInteger assigns uint32 provided by user to FlowRSVPPathRecordRouteLabel + SetAsInteger(value uint32) FlowRSVPPathRecordRouteLabel + // HasAsInteger checks if AsInteger has been set in FlowRSVPPathRecordRouteLabel + HasAsInteger() bool + // AsHex returns string, set in FlowRSVPPathRecordRouteLabel. + AsHex() string + // SetAsHex assigns string provided by user to FlowRSVPPathRecordRouteLabel + SetAsHex(value string) FlowRSVPPathRecordRouteLabel + // HasAsHex checks if AsHex has been set in FlowRSVPPathRecordRouteLabel + HasAsHex() bool +} + +type FlowRSVPPathRecordRouteLabelChoiceEnum string + +// Enum of Choice on FlowRSVPPathRecordRouteLabel +var FlowRSVPPathRecordRouteLabelChoice = struct { + AS_INTEGER FlowRSVPPathRecordRouteLabelChoiceEnum + AS_HEX FlowRSVPPathRecordRouteLabelChoiceEnum +}{ + AS_INTEGER: FlowRSVPPathRecordRouteLabelChoiceEnum("as_integer"), + AS_HEX: FlowRSVPPathRecordRouteLabelChoiceEnum("as_hex"), +} + +func (obj *flowRSVPPathRecordRouteLabel) Choice() FlowRSVPPathRecordRouteLabelChoiceEnum { + return FlowRSVPPathRecordRouteLabelChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// 32 bit integer or hex value. +// Choice returns a string +func (obj *flowRSVPPathRecordRouteLabel) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPPathRecordRouteLabel) setChoice(value FlowRSVPPathRecordRouteLabelChoiceEnum) FlowRSVPPathRecordRouteLabel { + intValue, ok := otg.FlowRSVPPathRecordRouteLabel_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPPathRecordRouteLabelChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPPathRecordRouteLabel_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.AsHex = nil + obj.obj.AsInteger = nil + + if value == FlowRSVPPathRecordRouteLabelChoice.AS_INTEGER { + defaultValue := uint32(16) + obj.obj.AsInteger = &defaultValue + } + + if value == FlowRSVPPathRecordRouteLabelChoice.AS_HEX { + defaultValue := "10" + obj.obj.AsHex = &defaultValue + } + + return obj +} + +// description is TBD +// AsInteger returns a uint32 +func (obj *flowRSVPPathRecordRouteLabel) AsInteger() uint32 { + + if obj.obj.AsInteger == nil { + obj.setChoice(FlowRSVPPathRecordRouteLabelChoice.AS_INTEGER) + } + + return *obj.obj.AsInteger + +} + +// description is TBD +// AsInteger returns a uint32 +func (obj *flowRSVPPathRecordRouteLabel) HasAsInteger() bool { + return obj.obj.AsInteger != nil +} + +// description is TBD +// SetAsInteger sets the uint32 value in the FlowRSVPPathRecordRouteLabel object +func (obj *flowRSVPPathRecordRouteLabel) SetAsInteger(value uint32) FlowRSVPPathRecordRouteLabel { + obj.setChoice(FlowRSVPPathRecordRouteLabelChoice.AS_INTEGER) + obj.obj.AsInteger = &value + return obj +} + +// Value of the this field should not excced 4 bytes. Maximum length of this attribute is 8 (4 * 2 hex character per byte). +// AsHex returns a string +func (obj *flowRSVPPathRecordRouteLabel) AsHex() string { + + if obj.obj.AsHex == nil { + obj.setChoice(FlowRSVPPathRecordRouteLabelChoice.AS_HEX) + } + + return *obj.obj.AsHex + +} + +// Value of the this field should not excced 4 bytes. Maximum length of this attribute is 8 (4 * 2 hex character per byte). +// AsHex returns a string +func (obj *flowRSVPPathRecordRouteLabel) HasAsHex() bool { + return obj.obj.AsHex != nil +} + +// Value of the this field should not excced 4 bytes. Maximum length of this attribute is 8 (4 * 2 hex character per byte). +// SetAsHex sets the string value in the FlowRSVPPathRecordRouteLabel object +func (obj *flowRSVPPathRecordRouteLabel) SetAsHex(value string) FlowRSVPPathRecordRouteLabel { + obj.setChoice(FlowRSVPPathRecordRouteLabelChoice.AS_HEX) + obj.obj.AsHex = &value + return obj +} + +func (obj *flowRSVPPathRecordRouteLabel) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.AsInteger != nil { + + if *obj.obj.AsInteger > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowRSVPPathRecordRouteLabel.AsInteger <= 1048575 but Got %d", *obj.obj.AsInteger)) + } + + } + + if obj.obj.AsHex != nil { + + if len(*obj.obj.AsHex) > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "None <= length of FlowRSVPPathRecordRouteLabel.AsHex <= 8 but Got %d", + len(*obj.obj.AsHex))) + } + + } + +} + +func (obj *flowRSVPPathRecordRouteLabel) setDefault() { + var choices_set int = 0 + var choice FlowRSVPPathRecordRouteLabelChoiceEnum + + if obj.obj.AsInteger != nil { + choices_set += 1 + choice = FlowRSVPPathRecordRouteLabelChoice.AS_INTEGER + } + + if obj.obj.AsHex != nil { + choices_set += 1 + choice = FlowRSVPPathRecordRouteLabelChoice.AS_HEX + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPPathRecordRouteLabelChoice.AS_INTEGER) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPPathRecordRouteLabel") + } + } else { + intVal := otg.FlowRSVPPathRecordRouteLabel_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPPathRecordRouteLabel_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_path_record_route_type1.go b/gosnappi/flow_rsvp_path_record_route_type1.go new file mode 100644 index 00000000..8ef81e04 --- /dev/null +++ b/gosnappi/flow_rsvp_path_record_route_type1.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathRecordRouteType1 ***** +type flowRSVPPathRecordRouteType1 struct { + validation + obj *otg.FlowRSVPPathRecordRouteType1 + marshaller marshalFlowRSVPPathRecordRouteType1 + unMarshaller unMarshalFlowRSVPPathRecordRouteType1 + subobjectsHolder FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter +} + +func NewFlowRSVPPathRecordRouteType1() FlowRSVPPathRecordRouteType1 { + obj := flowRSVPPathRecordRouteType1{obj: &otg.FlowRSVPPathRecordRouteType1{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathRecordRouteType1) msg() *otg.FlowRSVPPathRecordRouteType1 { + return obj.obj +} + +func (obj *flowRSVPPathRecordRouteType1) setMsg(msg *otg.FlowRSVPPathRecordRouteType1) FlowRSVPPathRecordRouteType1 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathRecordRouteType1 struct { + obj *flowRSVPPathRecordRouteType1 +} + +type marshalFlowRSVPPathRecordRouteType1 interface { + // ToProto marshals FlowRSVPPathRecordRouteType1 to protobuf object *otg.FlowRSVPPathRecordRouteType1 + ToProto() (*otg.FlowRSVPPathRecordRouteType1, error) + // ToPbText marshals FlowRSVPPathRecordRouteType1 to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathRecordRouteType1 to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathRecordRouteType1 to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathRecordRouteType1 struct { + obj *flowRSVPPathRecordRouteType1 +} + +type unMarshalFlowRSVPPathRecordRouteType1 interface { + // FromProto unmarshals FlowRSVPPathRecordRouteType1 from protobuf object *otg.FlowRSVPPathRecordRouteType1 + FromProto(msg *otg.FlowRSVPPathRecordRouteType1) (FlowRSVPPathRecordRouteType1, error) + // FromPbText unmarshals FlowRSVPPathRecordRouteType1 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathRecordRouteType1 from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathRecordRouteType1 from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathRecordRouteType1) Marshal() marshalFlowRSVPPathRecordRouteType1 { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathRecordRouteType1{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathRecordRouteType1) Unmarshal() unMarshalFlowRSVPPathRecordRouteType1 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathRecordRouteType1{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathRecordRouteType1) ToProto() (*otg.FlowRSVPPathRecordRouteType1, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteType1) FromProto(msg *otg.FlowRSVPPathRecordRouteType1) (FlowRSVPPathRecordRouteType1, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathRecordRouteType1) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteType1) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathRecordRouteType1) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteType1) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathRecordRouteType1) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteType1) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathRecordRouteType1) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathRecordRouteType1) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathRecordRouteType1) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathRecordRouteType1) Clone() (FlowRSVPPathRecordRouteType1, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathRecordRouteType1() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathRecordRouteType1) setNil() { + obj.subobjectsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathRecordRouteType1 is type1 record route has list of subobjects. Currently supported subobjects are IPv4 address(1) and Label(3). +type FlowRSVPPathRecordRouteType1 interface { + Validation + // msg marshals FlowRSVPPathRecordRouteType1 to protobuf object *otg.FlowRSVPPathRecordRouteType1 + // and doesn't set defaults + msg() *otg.FlowRSVPPathRecordRouteType1 + // setMsg unmarshals FlowRSVPPathRecordRouteType1 from protobuf object *otg.FlowRSVPPathRecordRouteType1 + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathRecordRouteType1) FlowRSVPPathRecordRouteType1 + // provides marshal interface + Marshal() marshalFlowRSVPPathRecordRouteType1 + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathRecordRouteType1 + // validate validates FlowRSVPPathRecordRouteType1 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathRecordRouteType1, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Subobjects returns FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIterIter, set in FlowRSVPPathRecordRouteType1 + Subobjects() FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter + setNil() +} + +// description is TBD +// Subobjects returns a []FlowRSVPType1RecordRouteSubobjects +func (obj *flowRSVPPathRecordRouteType1) Subobjects() FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter { + if len(obj.obj.Subobjects) == 0 { + obj.obj.Subobjects = []*otg.FlowRSVPType1RecordRouteSubobjects{} + } + if obj.subobjectsHolder == nil { + obj.subobjectsHolder = newFlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter(&obj.obj.Subobjects).setMsg(obj) + } + return obj.subobjectsHolder +} + +type flowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter struct { + obj *flowRSVPPathRecordRouteType1 + flowRSVPType1RecordRouteSubobjectsSlice []FlowRSVPType1RecordRouteSubobjects + fieldPtr *[]*otg.FlowRSVPType1RecordRouteSubobjects +} + +func newFlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter(ptr *[]*otg.FlowRSVPType1RecordRouteSubobjects) FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter { + return &flowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter{fieldPtr: ptr} +} + +type FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter interface { + setMsg(*flowRSVPPathRecordRouteType1) FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter + Items() []FlowRSVPType1RecordRouteSubobjects + Add() FlowRSVPType1RecordRouteSubobjects + Append(items ...FlowRSVPType1RecordRouteSubobjects) FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter + Set(index int, newObj FlowRSVPType1RecordRouteSubobjects) FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter + Clear() FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter + clearHolderSlice() FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter + appendHolderSlice(item FlowRSVPType1RecordRouteSubobjects) FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter +} + +func (obj *flowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter) setMsg(msg *flowRSVPPathRecordRouteType1) FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flowRSVPType1RecordRouteSubobjects{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *flowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter) Items() []FlowRSVPType1RecordRouteSubobjects { + return obj.flowRSVPType1RecordRouteSubobjectsSlice +} + +func (obj *flowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter) Add() FlowRSVPType1RecordRouteSubobjects { + newObj := &otg.FlowRSVPType1RecordRouteSubobjects{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flowRSVPType1RecordRouteSubobjects{obj: newObj} + newLibObj.setDefault() + obj.flowRSVPType1RecordRouteSubobjectsSlice = append(obj.flowRSVPType1RecordRouteSubobjectsSlice, newLibObj) + return newLibObj +} + +func (obj *flowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter) Append(items ...FlowRSVPType1RecordRouteSubobjects) FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowRSVPType1RecordRouteSubobjectsSlice = append(obj.flowRSVPType1RecordRouteSubobjectsSlice, item) + } + return obj +} + +func (obj *flowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter) Set(index int, newObj FlowRSVPType1RecordRouteSubobjects) FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowRSVPType1RecordRouteSubobjectsSlice[index] = newObj + return obj +} +func (obj *flowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter) Clear() FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.FlowRSVPType1RecordRouteSubobjects{} + obj.flowRSVPType1RecordRouteSubobjectsSlice = []FlowRSVPType1RecordRouteSubobjects{} + } + return obj +} +func (obj *flowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter) clearHolderSlice() FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter { + if len(obj.flowRSVPType1RecordRouteSubobjectsSlice) > 0 { + obj.flowRSVPType1RecordRouteSubobjectsSlice = []FlowRSVPType1RecordRouteSubobjects{} + } + return obj +} +func (obj *flowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter) appendHolderSlice(item FlowRSVPType1RecordRouteSubobjects) FlowRSVPPathRecordRouteType1FlowRSVPType1RecordRouteSubobjectsIter { + obj.flowRSVPType1RecordRouteSubobjectsSlice = append(obj.flowRSVPType1RecordRouteSubobjectsSlice, item) + return obj +} + +func (obj *flowRSVPPathRecordRouteType1) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Subobjects) != 0 { + + if set_default { + obj.Subobjects().clearHolderSlice() + for _, item := range obj.obj.Subobjects { + obj.Subobjects().appendHolderSlice(&flowRSVPType1RecordRouteSubobjects{obj: item}) + } + } + for _, item := range obj.Subobjects().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *flowRSVPPathRecordRouteType1) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_record_route_type1_ipv4_address.go b/gosnappi/flow_rsvp_path_record_route_type1_ipv4_address.go new file mode 100644 index 00000000..6848189e --- /dev/null +++ b/gosnappi/flow_rsvp_path_record_route_type1_ipv4_address.go @@ -0,0 +1,457 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathRecordRouteType1Ipv4Address ***** +type flowRSVPPathRecordRouteType1Ipv4Address struct { + validation + obj *otg.FlowRSVPPathRecordRouteType1Ipv4Address + marshaller marshalFlowRSVPPathRecordRouteType1Ipv4Address + unMarshaller unMarshalFlowRSVPPathRecordRouteType1Ipv4Address + lengthHolder FlowRSVPRouteRecordLength + ipv4AddressHolder PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + prefixLengthHolder PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + flagsHolder FlowRSVPRecordRouteIPv4Flag +} + +func NewFlowRSVPPathRecordRouteType1Ipv4Address() FlowRSVPPathRecordRouteType1Ipv4Address { + obj := flowRSVPPathRecordRouteType1Ipv4Address{obj: &otg.FlowRSVPPathRecordRouteType1Ipv4Address{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) msg() *otg.FlowRSVPPathRecordRouteType1Ipv4Address { + return obj.obj +} + +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) setMsg(msg *otg.FlowRSVPPathRecordRouteType1Ipv4Address) FlowRSVPPathRecordRouteType1Ipv4Address { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathRecordRouteType1Ipv4Address struct { + obj *flowRSVPPathRecordRouteType1Ipv4Address +} + +type marshalFlowRSVPPathRecordRouteType1Ipv4Address interface { + // ToProto marshals FlowRSVPPathRecordRouteType1Ipv4Address to protobuf object *otg.FlowRSVPPathRecordRouteType1Ipv4Address + ToProto() (*otg.FlowRSVPPathRecordRouteType1Ipv4Address, error) + // ToPbText marshals FlowRSVPPathRecordRouteType1Ipv4Address to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathRecordRouteType1Ipv4Address to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathRecordRouteType1Ipv4Address to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathRecordRouteType1Ipv4Address struct { + obj *flowRSVPPathRecordRouteType1Ipv4Address +} + +type unMarshalFlowRSVPPathRecordRouteType1Ipv4Address interface { + // FromProto unmarshals FlowRSVPPathRecordRouteType1Ipv4Address from protobuf object *otg.FlowRSVPPathRecordRouteType1Ipv4Address + FromProto(msg *otg.FlowRSVPPathRecordRouteType1Ipv4Address) (FlowRSVPPathRecordRouteType1Ipv4Address, error) + // FromPbText unmarshals FlowRSVPPathRecordRouteType1Ipv4Address from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathRecordRouteType1Ipv4Address from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathRecordRouteType1Ipv4Address from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) Marshal() marshalFlowRSVPPathRecordRouteType1Ipv4Address { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathRecordRouteType1Ipv4Address{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) Unmarshal() unMarshalFlowRSVPPathRecordRouteType1Ipv4Address { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathRecordRouteType1Ipv4Address{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathRecordRouteType1Ipv4Address) ToProto() (*otg.FlowRSVPPathRecordRouteType1Ipv4Address, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteType1Ipv4Address) FromProto(msg *otg.FlowRSVPPathRecordRouteType1Ipv4Address) (FlowRSVPPathRecordRouteType1Ipv4Address, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathRecordRouteType1Ipv4Address) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteType1Ipv4Address) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathRecordRouteType1Ipv4Address) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteType1Ipv4Address) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathRecordRouteType1Ipv4Address) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteType1Ipv4Address) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) Clone() (FlowRSVPPathRecordRouteType1Ipv4Address, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathRecordRouteType1Ipv4Address() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) setNil() { + obj.lengthHolder = nil + obj.ipv4AddressHolder = nil + obj.prefixLengthHolder = nil + obj.flagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathRecordRouteType1Ipv4Address is class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Address, C-Type: 1 +type FlowRSVPPathRecordRouteType1Ipv4Address interface { + Validation + // msg marshals FlowRSVPPathRecordRouteType1Ipv4Address to protobuf object *otg.FlowRSVPPathRecordRouteType1Ipv4Address + // and doesn't set defaults + msg() *otg.FlowRSVPPathRecordRouteType1Ipv4Address + // setMsg unmarshals FlowRSVPPathRecordRouteType1Ipv4Address from protobuf object *otg.FlowRSVPPathRecordRouteType1Ipv4Address + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathRecordRouteType1Ipv4Address) FlowRSVPPathRecordRouteType1Ipv4Address + // provides marshal interface + Marshal() marshalFlowRSVPPathRecordRouteType1Ipv4Address + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathRecordRouteType1Ipv4Address + // validate validates FlowRSVPPathRecordRouteType1Ipv4Address + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathRecordRouteType1Ipv4Address, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Length returns FlowRSVPRouteRecordLength, set in FlowRSVPPathRecordRouteType1Ipv4Address. + // FlowRSVPRouteRecordLength is description is TBD + Length() FlowRSVPRouteRecordLength + // SetLength assigns FlowRSVPRouteRecordLength provided by user to FlowRSVPPathRecordRouteType1Ipv4Address. + // FlowRSVPRouteRecordLength is description is TBD + SetLength(value FlowRSVPRouteRecordLength) FlowRSVPPathRecordRouteType1Ipv4Address + // HasLength checks if Length has been set in FlowRSVPPathRecordRouteType1Ipv4Address + HasLength() bool + // Ipv4Address returns PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address, set in FlowRSVPPathRecordRouteType1Ipv4Address. + // PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address is a 32-bit unicast, host address. Any network-reachable interface address is allowed here. Illegal addresses, such as certain loopback addresses, SHOULD NOT be used. + Ipv4Address() PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + // SetIpv4Address assigns PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address provided by user to FlowRSVPPathRecordRouteType1Ipv4Address. + // PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address is a 32-bit unicast, host address. Any network-reachable interface address is allowed here. Illegal addresses, such as certain loopback addresses, SHOULD NOT be used. + SetIpv4Address(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) FlowRSVPPathRecordRouteType1Ipv4Address + // HasIpv4Address checks if Ipv4Address has been set in FlowRSVPPathRecordRouteType1Ipv4Address + HasIpv4Address() bool + // PrefixLength returns PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength, set in FlowRSVPPathRecordRouteType1Ipv4Address. + // PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength is prefix-length of IPv4 address. + PrefixLength() PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + // SetPrefixLength assigns PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength provided by user to FlowRSVPPathRecordRouteType1Ipv4Address. + // PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength is prefix-length of IPv4 address. + SetPrefixLength(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) FlowRSVPPathRecordRouteType1Ipv4Address + // HasPrefixLength checks if PrefixLength has been set in FlowRSVPPathRecordRouteType1Ipv4Address + HasPrefixLength() bool + // Flags returns FlowRSVPRecordRouteIPv4Flag, set in FlowRSVPPathRecordRouteType1Ipv4Address. + // FlowRSVPRecordRouteIPv4Flag is description is TBD + Flags() FlowRSVPRecordRouteIPv4Flag + // SetFlags assigns FlowRSVPRecordRouteIPv4Flag provided by user to FlowRSVPPathRecordRouteType1Ipv4Address. + // FlowRSVPRecordRouteIPv4Flag is description is TBD + SetFlags(value FlowRSVPRecordRouteIPv4Flag) FlowRSVPPathRecordRouteType1Ipv4Address + // HasFlags checks if Flags has been set in FlowRSVPPathRecordRouteType1Ipv4Address + HasFlags() bool + setNil() +} + +// The Length contains the total length of the subobject in bytes, including the Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. +// Length returns a FlowRSVPRouteRecordLength +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) Length() FlowRSVPRouteRecordLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowRSVPRouteRecordLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowRSVPRouteRecordLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// The Length contains the total length of the subobject in bytes, including the Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. +// Length returns a FlowRSVPRouteRecordLength +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) HasLength() bool { + return obj.obj.Length != nil +} + +// The Length contains the total length of the subobject in bytes, including the Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. +// SetLength sets the FlowRSVPRouteRecordLength value in the FlowRSVPPathRecordRouteType1Ipv4Address object +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) SetLength(value FlowRSVPRouteRecordLength) FlowRSVPPathRecordRouteType1Ipv4Address { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// description is TBD +// Ipv4Address returns a PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) Ipv4Address() PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address { + if obj.obj.Ipv4Address == nil { + obj.obj.Ipv4Address = NewPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address().msg() + } + if obj.ipv4AddressHolder == nil { + obj.ipv4AddressHolder = &patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address{obj: obj.obj.Ipv4Address} + } + return obj.ipv4AddressHolder +} + +// description is TBD +// Ipv4Address returns a PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) HasIpv4Address() bool { + return obj.obj.Ipv4Address != nil +} + +// description is TBD +// SetIpv4Address sets the PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address value in the FlowRSVPPathRecordRouteType1Ipv4Address object +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) SetIpv4Address(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) FlowRSVPPathRecordRouteType1Ipv4Address { + + obj.ipv4AddressHolder = nil + obj.obj.Ipv4Address = value.msg() + + return obj +} + +// description is TBD +// PrefixLength returns a PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) PrefixLength() PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength { + if obj.obj.PrefixLength == nil { + obj.obj.PrefixLength = NewPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength().msg() + } + if obj.prefixLengthHolder == nil { + obj.prefixLengthHolder = &patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength{obj: obj.obj.PrefixLength} + } + return obj.prefixLengthHolder +} + +// description is TBD +// PrefixLength returns a PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) HasPrefixLength() bool { + return obj.obj.PrefixLength != nil +} + +// description is TBD +// SetPrefixLength sets the PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength value in the FlowRSVPPathRecordRouteType1Ipv4Address object +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) SetPrefixLength(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) FlowRSVPPathRecordRouteType1Ipv4Address { + + obj.prefixLengthHolder = nil + obj.obj.PrefixLength = value.msg() + + return obj +} + +// 0x01 local_protection_available, 0x02 local_protection_in_use +// Flags returns a FlowRSVPRecordRouteIPv4Flag +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) Flags() FlowRSVPRecordRouteIPv4Flag { + if obj.obj.Flags == nil { + obj.obj.Flags = NewFlowRSVPRecordRouteIPv4Flag().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &flowRSVPRecordRouteIPv4Flag{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// 0x01 local_protection_available, 0x02 local_protection_in_use +// Flags returns a FlowRSVPRecordRouteIPv4Flag +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) HasFlags() bool { + return obj.obj.Flags != nil +} + +// 0x01 local_protection_available, 0x02 local_protection_in_use +// SetFlags sets the FlowRSVPRecordRouteIPv4Flag value in the FlowRSVPPathRecordRouteType1Ipv4Address object +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) SetFlags(value FlowRSVPRecordRouteIPv4Flag) FlowRSVPPathRecordRouteType1Ipv4Address { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.Ipv4Address != nil { + + obj.Ipv4Address().validateObj(vObj, set_default) + } + + if obj.obj.PrefixLength != nil { + + obj.PrefixLength().validateObj(vObj, set_default) + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathRecordRouteType1Ipv4Address) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_record_route_type1_label.go b/gosnappi/flow_rsvp_path_record_route_type1_label.go new file mode 100644 index 00000000..eb1c7a1e --- /dev/null +++ b/gosnappi/flow_rsvp_path_record_route_type1_label.go @@ -0,0 +1,457 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathRecordRouteType1Label ***** +type flowRSVPPathRecordRouteType1Label struct { + validation + obj *otg.FlowRSVPPathRecordRouteType1Label + marshaller marshalFlowRSVPPathRecordRouteType1Label + unMarshaller unMarshalFlowRSVPPathRecordRouteType1Label + lengthHolder FlowRSVPRouteRecordLength + flagsHolder PatternFlowRSVPPathRecordRouteType1LabelFlags + cTypeHolder PatternFlowRSVPPathRecordRouteType1LabelCType + labelHolder FlowRSVPPathRecordRouteLabel +} + +func NewFlowRSVPPathRecordRouteType1Label() FlowRSVPPathRecordRouteType1Label { + obj := flowRSVPPathRecordRouteType1Label{obj: &otg.FlowRSVPPathRecordRouteType1Label{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathRecordRouteType1Label) msg() *otg.FlowRSVPPathRecordRouteType1Label { + return obj.obj +} + +func (obj *flowRSVPPathRecordRouteType1Label) setMsg(msg *otg.FlowRSVPPathRecordRouteType1Label) FlowRSVPPathRecordRouteType1Label { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathRecordRouteType1Label struct { + obj *flowRSVPPathRecordRouteType1Label +} + +type marshalFlowRSVPPathRecordRouteType1Label interface { + // ToProto marshals FlowRSVPPathRecordRouteType1Label to protobuf object *otg.FlowRSVPPathRecordRouteType1Label + ToProto() (*otg.FlowRSVPPathRecordRouteType1Label, error) + // ToPbText marshals FlowRSVPPathRecordRouteType1Label to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathRecordRouteType1Label to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathRecordRouteType1Label to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathRecordRouteType1Label struct { + obj *flowRSVPPathRecordRouteType1Label +} + +type unMarshalFlowRSVPPathRecordRouteType1Label interface { + // FromProto unmarshals FlowRSVPPathRecordRouteType1Label from protobuf object *otg.FlowRSVPPathRecordRouteType1Label + FromProto(msg *otg.FlowRSVPPathRecordRouteType1Label) (FlowRSVPPathRecordRouteType1Label, error) + // FromPbText unmarshals FlowRSVPPathRecordRouteType1Label from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathRecordRouteType1Label from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathRecordRouteType1Label from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathRecordRouteType1Label) Marshal() marshalFlowRSVPPathRecordRouteType1Label { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathRecordRouteType1Label{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathRecordRouteType1Label) Unmarshal() unMarshalFlowRSVPPathRecordRouteType1Label { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathRecordRouteType1Label{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathRecordRouteType1Label) ToProto() (*otg.FlowRSVPPathRecordRouteType1Label, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteType1Label) FromProto(msg *otg.FlowRSVPPathRecordRouteType1Label) (FlowRSVPPathRecordRouteType1Label, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathRecordRouteType1Label) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteType1Label) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathRecordRouteType1Label) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteType1Label) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathRecordRouteType1Label) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathRecordRouteType1Label) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathRecordRouteType1Label) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathRecordRouteType1Label) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathRecordRouteType1Label) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathRecordRouteType1Label) Clone() (FlowRSVPPathRecordRouteType1Label, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathRecordRouteType1Label() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathRecordRouteType1Label) setNil() { + obj.lengthHolder = nil + obj.flagsHolder = nil + obj.cTypeHolder = nil + obj.labelHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathRecordRouteType1Label is class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Label, C-Type: 3 +type FlowRSVPPathRecordRouteType1Label interface { + Validation + // msg marshals FlowRSVPPathRecordRouteType1Label to protobuf object *otg.FlowRSVPPathRecordRouteType1Label + // and doesn't set defaults + msg() *otg.FlowRSVPPathRecordRouteType1Label + // setMsg unmarshals FlowRSVPPathRecordRouteType1Label from protobuf object *otg.FlowRSVPPathRecordRouteType1Label + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathRecordRouteType1Label) FlowRSVPPathRecordRouteType1Label + // provides marshal interface + Marshal() marshalFlowRSVPPathRecordRouteType1Label + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathRecordRouteType1Label + // validate validates FlowRSVPPathRecordRouteType1Label + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathRecordRouteType1Label, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Length returns FlowRSVPRouteRecordLength, set in FlowRSVPPathRecordRouteType1Label. + // FlowRSVPRouteRecordLength is description is TBD + Length() FlowRSVPRouteRecordLength + // SetLength assigns FlowRSVPRouteRecordLength provided by user to FlowRSVPPathRecordRouteType1Label. + // FlowRSVPRouteRecordLength is description is TBD + SetLength(value FlowRSVPRouteRecordLength) FlowRSVPPathRecordRouteType1Label + // HasLength checks if Length has been set in FlowRSVPPathRecordRouteType1Label + HasLength() bool + // Flags returns PatternFlowRSVPPathRecordRouteType1LabelFlags, set in FlowRSVPPathRecordRouteType1Label. + // PatternFlowRSVPPathRecordRouteType1LabelFlags is 0x01 = Global label. This flag indicates that the label will be understood if received on any interface. + Flags() PatternFlowRSVPPathRecordRouteType1LabelFlags + // SetFlags assigns PatternFlowRSVPPathRecordRouteType1LabelFlags provided by user to FlowRSVPPathRecordRouteType1Label. + // PatternFlowRSVPPathRecordRouteType1LabelFlags is 0x01 = Global label. This flag indicates that the label will be understood if received on any interface. + SetFlags(value PatternFlowRSVPPathRecordRouteType1LabelFlags) FlowRSVPPathRecordRouteType1Label + // HasFlags checks if Flags has been set in FlowRSVPPathRecordRouteType1Label + HasFlags() bool + // CType returns PatternFlowRSVPPathRecordRouteType1LabelCType, set in FlowRSVPPathRecordRouteType1Label. + // PatternFlowRSVPPathRecordRouteType1LabelCType is the C-Type of the included Label Object. Copied from the Label object. + CType() PatternFlowRSVPPathRecordRouteType1LabelCType + // SetCType assigns PatternFlowRSVPPathRecordRouteType1LabelCType provided by user to FlowRSVPPathRecordRouteType1Label. + // PatternFlowRSVPPathRecordRouteType1LabelCType is the C-Type of the included Label Object. Copied from the Label object. + SetCType(value PatternFlowRSVPPathRecordRouteType1LabelCType) FlowRSVPPathRecordRouteType1Label + // HasCType checks if CType has been set in FlowRSVPPathRecordRouteType1Label + HasCType() bool + // Label returns FlowRSVPPathRecordRouteLabel, set in FlowRSVPPathRecordRouteType1Label. + // FlowRSVPPathRecordRouteLabel is description is TBD + Label() FlowRSVPPathRecordRouteLabel + // SetLabel assigns FlowRSVPPathRecordRouteLabel provided by user to FlowRSVPPathRecordRouteType1Label. + // FlowRSVPPathRecordRouteLabel is description is TBD + SetLabel(value FlowRSVPPathRecordRouteLabel) FlowRSVPPathRecordRouteType1Label + // HasLabel checks if Label has been set in FlowRSVPPathRecordRouteType1Label + HasLabel() bool + setNil() +} + +// The Length contains the total length of the subobject in bytes, including the Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. +// Length returns a FlowRSVPRouteRecordLength +func (obj *flowRSVPPathRecordRouteType1Label) Length() FlowRSVPRouteRecordLength { + if obj.obj.Length == nil { + obj.obj.Length = NewFlowRSVPRouteRecordLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &flowRSVPRouteRecordLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// The Length contains the total length of the subobject in bytes, including the Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. +// Length returns a FlowRSVPRouteRecordLength +func (obj *flowRSVPPathRecordRouteType1Label) HasLength() bool { + return obj.obj.Length != nil +} + +// The Length contains the total length of the subobject in bytes, including the Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. +// SetLength sets the FlowRSVPRouteRecordLength value in the FlowRSVPPathRecordRouteType1Label object +func (obj *flowRSVPPathRecordRouteType1Label) SetLength(value FlowRSVPRouteRecordLength) FlowRSVPPathRecordRouteType1Label { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// description is TBD +// Flags returns a PatternFlowRSVPPathRecordRouteType1LabelFlags +func (obj *flowRSVPPathRecordRouteType1Label) Flags() PatternFlowRSVPPathRecordRouteType1LabelFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewPatternFlowRSVPPathRecordRouteType1LabelFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &patternFlowRSVPPathRecordRouteType1LabelFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// description is TBD +// Flags returns a PatternFlowRSVPPathRecordRouteType1LabelFlags +func (obj *flowRSVPPathRecordRouteType1Label) HasFlags() bool { + return obj.obj.Flags != nil +} + +// description is TBD +// SetFlags sets the PatternFlowRSVPPathRecordRouteType1LabelFlags value in the FlowRSVPPathRecordRouteType1Label object +func (obj *flowRSVPPathRecordRouteType1Label) SetFlags(value PatternFlowRSVPPathRecordRouteType1LabelFlags) FlowRSVPPathRecordRouteType1Label { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// description is TBD +// CType returns a PatternFlowRSVPPathRecordRouteType1LabelCType +func (obj *flowRSVPPathRecordRouteType1Label) CType() PatternFlowRSVPPathRecordRouteType1LabelCType { + if obj.obj.CType == nil { + obj.obj.CType = NewPatternFlowRSVPPathRecordRouteType1LabelCType().msg() + } + if obj.cTypeHolder == nil { + obj.cTypeHolder = &patternFlowRSVPPathRecordRouteType1LabelCType{obj: obj.obj.CType} + } + return obj.cTypeHolder +} + +// description is TBD +// CType returns a PatternFlowRSVPPathRecordRouteType1LabelCType +func (obj *flowRSVPPathRecordRouteType1Label) HasCType() bool { + return obj.obj.CType != nil +} + +// description is TBD +// SetCType sets the PatternFlowRSVPPathRecordRouteType1LabelCType value in the FlowRSVPPathRecordRouteType1Label object +func (obj *flowRSVPPathRecordRouteType1Label) SetCType(value PatternFlowRSVPPathRecordRouteType1LabelCType) FlowRSVPPathRecordRouteType1Label { + + obj.cTypeHolder = nil + obj.obj.CType = value.msg() + + return obj +} + +// The contents of the Label Object. Copied from the Label Object. +// Label returns a FlowRSVPPathRecordRouteLabel +func (obj *flowRSVPPathRecordRouteType1Label) Label() FlowRSVPPathRecordRouteLabel { + if obj.obj.Label == nil { + obj.obj.Label = NewFlowRSVPPathRecordRouteLabel().msg() + } + if obj.labelHolder == nil { + obj.labelHolder = &flowRSVPPathRecordRouteLabel{obj: obj.obj.Label} + } + return obj.labelHolder +} + +// The contents of the Label Object. Copied from the Label Object. +// Label returns a FlowRSVPPathRecordRouteLabel +func (obj *flowRSVPPathRecordRouteType1Label) HasLabel() bool { + return obj.obj.Label != nil +} + +// The contents of the Label Object. Copied from the Label Object. +// SetLabel sets the FlowRSVPPathRecordRouteLabel value in the FlowRSVPPathRecordRouteType1Label object +func (obj *flowRSVPPathRecordRouteType1Label) SetLabel(value FlowRSVPPathRecordRouteLabel) FlowRSVPPathRecordRouteType1Label { + + obj.labelHolder = nil + obj.obj.Label = value.msg() + + return obj +} + +func (obj *flowRSVPPathRecordRouteType1Label) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.CType != nil { + + obj.CType().validateObj(vObj, set_default) + } + + if obj.obj.Label != nil { + + obj.Label().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathRecordRouteType1Label) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_rsvp_hop_ipv4.go b/gosnappi/flow_rsvp_path_rsvp_hop_ipv4.go new file mode 100644 index 00000000..b243060e --- /dev/null +++ b/gosnappi/flow_rsvp_path_rsvp_hop_ipv4.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathRsvpHopIpv4 ***** +type flowRSVPPathRsvpHopIpv4 struct { + validation + obj *otg.FlowRSVPPathRsvpHopIpv4 + marshaller marshalFlowRSVPPathRsvpHopIpv4 + unMarshaller unMarshalFlowRSVPPathRsvpHopIpv4 + ipv4AddressHolder PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + logicalInterfaceHandleHolder PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle +} + +func NewFlowRSVPPathRsvpHopIpv4() FlowRSVPPathRsvpHopIpv4 { + obj := flowRSVPPathRsvpHopIpv4{obj: &otg.FlowRSVPPathRsvpHopIpv4{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathRsvpHopIpv4) msg() *otg.FlowRSVPPathRsvpHopIpv4 { + return obj.obj +} + +func (obj *flowRSVPPathRsvpHopIpv4) setMsg(msg *otg.FlowRSVPPathRsvpHopIpv4) FlowRSVPPathRsvpHopIpv4 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathRsvpHopIpv4 struct { + obj *flowRSVPPathRsvpHopIpv4 +} + +type marshalFlowRSVPPathRsvpHopIpv4 interface { + // ToProto marshals FlowRSVPPathRsvpHopIpv4 to protobuf object *otg.FlowRSVPPathRsvpHopIpv4 + ToProto() (*otg.FlowRSVPPathRsvpHopIpv4, error) + // ToPbText marshals FlowRSVPPathRsvpHopIpv4 to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathRsvpHopIpv4 to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathRsvpHopIpv4 to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathRsvpHopIpv4 struct { + obj *flowRSVPPathRsvpHopIpv4 +} + +type unMarshalFlowRSVPPathRsvpHopIpv4 interface { + // FromProto unmarshals FlowRSVPPathRsvpHopIpv4 from protobuf object *otg.FlowRSVPPathRsvpHopIpv4 + FromProto(msg *otg.FlowRSVPPathRsvpHopIpv4) (FlowRSVPPathRsvpHopIpv4, error) + // FromPbText unmarshals FlowRSVPPathRsvpHopIpv4 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathRsvpHopIpv4 from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathRsvpHopIpv4 from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathRsvpHopIpv4) Marshal() marshalFlowRSVPPathRsvpHopIpv4 { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathRsvpHopIpv4{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathRsvpHopIpv4) Unmarshal() unMarshalFlowRSVPPathRsvpHopIpv4 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathRsvpHopIpv4{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathRsvpHopIpv4) ToProto() (*otg.FlowRSVPPathRsvpHopIpv4, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathRsvpHopIpv4) FromProto(msg *otg.FlowRSVPPathRsvpHopIpv4) (FlowRSVPPathRsvpHopIpv4, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathRsvpHopIpv4) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathRsvpHopIpv4) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathRsvpHopIpv4) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathRsvpHopIpv4) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathRsvpHopIpv4) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathRsvpHopIpv4) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathRsvpHopIpv4) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathRsvpHopIpv4) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathRsvpHopIpv4) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathRsvpHopIpv4) Clone() (FlowRSVPPathRsvpHopIpv4, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathRsvpHopIpv4() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathRsvpHopIpv4) setNil() { + obj.ipv4AddressHolder = nil + obj.logicalInterfaceHandleHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathRsvpHopIpv4 is iPv4 RSVP_HOP object: Class = 3, C-Type = 1 +type FlowRSVPPathRsvpHopIpv4 interface { + Validation + // msg marshals FlowRSVPPathRsvpHopIpv4 to protobuf object *otg.FlowRSVPPathRsvpHopIpv4 + // and doesn't set defaults + msg() *otg.FlowRSVPPathRsvpHopIpv4 + // setMsg unmarshals FlowRSVPPathRsvpHopIpv4 from protobuf object *otg.FlowRSVPPathRsvpHopIpv4 + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathRsvpHopIpv4) FlowRSVPPathRsvpHopIpv4 + // provides marshal interface + Marshal() marshalFlowRSVPPathRsvpHopIpv4 + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathRsvpHopIpv4 + // validate validates FlowRSVPPathRsvpHopIpv4 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathRsvpHopIpv4, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv4Address returns PatternFlowRSVPPathRsvpHopIpv4Ipv4Address, set in FlowRSVPPathRsvpHopIpv4. + // PatternFlowRSVPPathRsvpHopIpv4Ipv4Address is the IPv4 address of the interface through which the last RSVP-knowledgeable hop forwarded this message. + Ipv4Address() PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + // SetIpv4Address assigns PatternFlowRSVPPathRsvpHopIpv4Ipv4Address provided by user to FlowRSVPPathRsvpHopIpv4. + // PatternFlowRSVPPathRsvpHopIpv4Ipv4Address is the IPv4 address of the interface through which the last RSVP-knowledgeable hop forwarded this message. + SetIpv4Address(value PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) FlowRSVPPathRsvpHopIpv4 + // HasIpv4Address checks if Ipv4Address has been set in FlowRSVPPathRsvpHopIpv4 + HasIpv4Address() bool + // LogicalInterfaceHandle returns PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle, set in FlowRSVPPathRsvpHopIpv4. + // PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle is logical Interface Handle (LIH) is used to distinguish logical outgoing interfaces. A node receiving an LIH in a Path message saves its value and returns it in the HOP objects of subsequent Resv messages sent to the node that originated the LIH. The LIH should be identically zero if there is no logical interface handle. + LogicalInterfaceHandle() PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + // SetLogicalInterfaceHandle assigns PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle provided by user to FlowRSVPPathRsvpHopIpv4. + // PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle is logical Interface Handle (LIH) is used to distinguish logical outgoing interfaces. A node receiving an LIH in a Path message saves its value and returns it in the HOP objects of subsequent Resv messages sent to the node that originated the LIH. The LIH should be identically zero if there is no logical interface handle. + SetLogicalInterfaceHandle(value PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) FlowRSVPPathRsvpHopIpv4 + // HasLogicalInterfaceHandle checks if LogicalInterfaceHandle has been set in FlowRSVPPathRsvpHopIpv4 + HasLogicalInterfaceHandle() bool + setNil() +} + +// description is TBD +// Ipv4Address returns a PatternFlowRSVPPathRsvpHopIpv4Ipv4Address +func (obj *flowRSVPPathRsvpHopIpv4) Ipv4Address() PatternFlowRSVPPathRsvpHopIpv4Ipv4Address { + if obj.obj.Ipv4Address == nil { + obj.obj.Ipv4Address = NewPatternFlowRSVPPathRsvpHopIpv4Ipv4Address().msg() + } + if obj.ipv4AddressHolder == nil { + obj.ipv4AddressHolder = &patternFlowRSVPPathRsvpHopIpv4Ipv4Address{obj: obj.obj.Ipv4Address} + } + return obj.ipv4AddressHolder +} + +// description is TBD +// Ipv4Address returns a PatternFlowRSVPPathRsvpHopIpv4Ipv4Address +func (obj *flowRSVPPathRsvpHopIpv4) HasIpv4Address() bool { + return obj.obj.Ipv4Address != nil +} + +// description is TBD +// SetIpv4Address sets the PatternFlowRSVPPathRsvpHopIpv4Ipv4Address value in the FlowRSVPPathRsvpHopIpv4 object +func (obj *flowRSVPPathRsvpHopIpv4) SetIpv4Address(value PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) FlowRSVPPathRsvpHopIpv4 { + + obj.ipv4AddressHolder = nil + obj.obj.Ipv4Address = value.msg() + + return obj +} + +// description is TBD +// LogicalInterfaceHandle returns a PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle +func (obj *flowRSVPPathRsvpHopIpv4) LogicalInterfaceHandle() PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle { + if obj.obj.LogicalInterfaceHandle == nil { + obj.obj.LogicalInterfaceHandle = NewPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle().msg() + } + if obj.logicalInterfaceHandleHolder == nil { + obj.logicalInterfaceHandleHolder = &patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle{obj: obj.obj.LogicalInterfaceHandle} + } + return obj.logicalInterfaceHandleHolder +} + +// description is TBD +// LogicalInterfaceHandle returns a PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle +func (obj *flowRSVPPathRsvpHopIpv4) HasLogicalInterfaceHandle() bool { + return obj.obj.LogicalInterfaceHandle != nil +} + +// description is TBD +// SetLogicalInterfaceHandle sets the PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle value in the FlowRSVPPathRsvpHopIpv4 object +func (obj *flowRSVPPathRsvpHopIpv4) SetLogicalInterfaceHandle(value PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) FlowRSVPPathRsvpHopIpv4 { + + obj.logicalInterfaceHandleHolder = nil + obj.obj.LogicalInterfaceHandle = value.msg() + + return obj +} + +func (obj *flowRSVPPathRsvpHopIpv4) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv4Address != nil { + + obj.Ipv4Address().validateObj(vObj, set_default) + } + + if obj.obj.LogicalInterfaceHandle != nil { + + obj.LogicalInterfaceHandle().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathRsvpHopIpv4) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_sender_template_lsp_tunnel_ipv4.go b/gosnappi/flow_rsvp_path_sender_template_lsp_tunnel_ipv4.go new file mode 100644 index 00000000..49f0286a --- /dev/null +++ b/gosnappi/flow_rsvp_path_sender_template_lsp_tunnel_ipv4.go @@ -0,0 +1,414 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathSenderTemplateLspTunnelIpv4 ***** +type flowRSVPPathSenderTemplateLspTunnelIpv4 struct { + validation + obj *otg.FlowRSVPPathSenderTemplateLspTunnelIpv4 + marshaller marshalFlowRSVPPathSenderTemplateLspTunnelIpv4 + unMarshaller unMarshalFlowRSVPPathSenderTemplateLspTunnelIpv4 + ipv4TunnelSenderAddressHolder PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + reservedHolder PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + lspIdHolder PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId +} + +func NewFlowRSVPPathSenderTemplateLspTunnelIpv4() FlowRSVPPathSenderTemplateLspTunnelIpv4 { + obj := flowRSVPPathSenderTemplateLspTunnelIpv4{obj: &otg.FlowRSVPPathSenderTemplateLspTunnelIpv4{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) msg() *otg.FlowRSVPPathSenderTemplateLspTunnelIpv4 { + return obj.obj +} + +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) setMsg(msg *otg.FlowRSVPPathSenderTemplateLspTunnelIpv4) FlowRSVPPathSenderTemplateLspTunnelIpv4 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathSenderTemplateLspTunnelIpv4 struct { + obj *flowRSVPPathSenderTemplateLspTunnelIpv4 +} + +type marshalFlowRSVPPathSenderTemplateLspTunnelIpv4 interface { + // ToProto marshals FlowRSVPPathSenderTemplateLspTunnelIpv4 to protobuf object *otg.FlowRSVPPathSenderTemplateLspTunnelIpv4 + ToProto() (*otg.FlowRSVPPathSenderTemplateLspTunnelIpv4, error) + // ToPbText marshals FlowRSVPPathSenderTemplateLspTunnelIpv4 to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathSenderTemplateLspTunnelIpv4 to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathSenderTemplateLspTunnelIpv4 to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathSenderTemplateLspTunnelIpv4 struct { + obj *flowRSVPPathSenderTemplateLspTunnelIpv4 +} + +type unMarshalFlowRSVPPathSenderTemplateLspTunnelIpv4 interface { + // FromProto unmarshals FlowRSVPPathSenderTemplateLspTunnelIpv4 from protobuf object *otg.FlowRSVPPathSenderTemplateLspTunnelIpv4 + FromProto(msg *otg.FlowRSVPPathSenderTemplateLspTunnelIpv4) (FlowRSVPPathSenderTemplateLspTunnelIpv4, error) + // FromPbText unmarshals FlowRSVPPathSenderTemplateLspTunnelIpv4 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathSenderTemplateLspTunnelIpv4 from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathSenderTemplateLspTunnelIpv4 from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) Marshal() marshalFlowRSVPPathSenderTemplateLspTunnelIpv4 { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathSenderTemplateLspTunnelIpv4{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) Unmarshal() unMarshalFlowRSVPPathSenderTemplateLspTunnelIpv4 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathSenderTemplateLspTunnelIpv4{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathSenderTemplateLspTunnelIpv4) ToProto() (*otg.FlowRSVPPathSenderTemplateLspTunnelIpv4, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathSenderTemplateLspTunnelIpv4) FromProto(msg *otg.FlowRSVPPathSenderTemplateLspTunnelIpv4) (FlowRSVPPathSenderTemplateLspTunnelIpv4, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathSenderTemplateLspTunnelIpv4) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathSenderTemplateLspTunnelIpv4) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathSenderTemplateLspTunnelIpv4) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathSenderTemplateLspTunnelIpv4) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathSenderTemplateLspTunnelIpv4) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathSenderTemplateLspTunnelIpv4) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) Clone() (FlowRSVPPathSenderTemplateLspTunnelIpv4, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathSenderTemplateLspTunnelIpv4() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) setNil() { + obj.ipv4TunnelSenderAddressHolder = nil + obj.reservedHolder = nil + obj.lspIdHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathSenderTemplateLspTunnelIpv4 is class = SENDER_TEMPLATE, LSP_TUNNEL_IPv4 C-Type = 7 +type FlowRSVPPathSenderTemplateLspTunnelIpv4 interface { + Validation + // msg marshals FlowRSVPPathSenderTemplateLspTunnelIpv4 to protobuf object *otg.FlowRSVPPathSenderTemplateLspTunnelIpv4 + // and doesn't set defaults + msg() *otg.FlowRSVPPathSenderTemplateLspTunnelIpv4 + // setMsg unmarshals FlowRSVPPathSenderTemplateLspTunnelIpv4 from protobuf object *otg.FlowRSVPPathSenderTemplateLspTunnelIpv4 + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathSenderTemplateLspTunnelIpv4) FlowRSVPPathSenderTemplateLspTunnelIpv4 + // provides marshal interface + Marshal() marshalFlowRSVPPathSenderTemplateLspTunnelIpv4 + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathSenderTemplateLspTunnelIpv4 + // validate validates FlowRSVPPathSenderTemplateLspTunnelIpv4 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathSenderTemplateLspTunnelIpv4, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv4TunnelSenderAddress returns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress, set in FlowRSVPPathSenderTemplateLspTunnelIpv4. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress is iPv4 address for a sender node. + Ipv4TunnelSenderAddress() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + // SetIpv4TunnelSenderAddress assigns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress provided by user to FlowRSVPPathSenderTemplateLspTunnelIpv4. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress is iPv4 address for a sender node. + SetIpv4TunnelSenderAddress(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) FlowRSVPPathSenderTemplateLspTunnelIpv4 + // HasIpv4TunnelSenderAddress checks if Ipv4TunnelSenderAddress has been set in FlowRSVPPathSenderTemplateLspTunnelIpv4 + HasIpv4TunnelSenderAddress() bool + // Reserved returns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved, set in FlowRSVPPathSenderTemplateLspTunnelIpv4. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved is reserved field, MUST be zero. + Reserved() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + // SetReserved assigns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved provided by user to FlowRSVPPathSenderTemplateLspTunnelIpv4. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved is reserved field, MUST be zero. + SetReserved(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) FlowRSVPPathSenderTemplateLspTunnelIpv4 + // HasReserved checks if Reserved has been set in FlowRSVPPathSenderTemplateLspTunnelIpv4 + HasReserved() bool + // LspId returns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId, set in FlowRSVPPathSenderTemplateLspTunnelIpv4. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId is a 16-bit identifier used in the SENDER_TEMPLATE that can be changed to allow a sender to share resources with itself. + LspId() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + // SetLspId assigns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId provided by user to FlowRSVPPathSenderTemplateLspTunnelIpv4. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId is a 16-bit identifier used in the SENDER_TEMPLATE that can be changed to allow a sender to share resources with itself. + SetLspId(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) FlowRSVPPathSenderTemplateLspTunnelIpv4 + // HasLspId checks if LspId has been set in FlowRSVPPathSenderTemplateLspTunnelIpv4 + HasLspId() bool + setNil() +} + +// description is TBD +// Ipv4TunnelSenderAddress returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) Ipv4TunnelSenderAddress() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress { + if obj.obj.Ipv4TunnelSenderAddress == nil { + obj.obj.Ipv4TunnelSenderAddress = NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress().msg() + } + if obj.ipv4TunnelSenderAddressHolder == nil { + obj.ipv4TunnelSenderAddressHolder = &patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress{obj: obj.obj.Ipv4TunnelSenderAddress} + } + return obj.ipv4TunnelSenderAddressHolder +} + +// description is TBD +// Ipv4TunnelSenderAddress returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) HasIpv4TunnelSenderAddress() bool { + return obj.obj.Ipv4TunnelSenderAddress != nil +} + +// description is TBD +// SetIpv4TunnelSenderAddress sets the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress value in the FlowRSVPPathSenderTemplateLspTunnelIpv4 object +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) SetIpv4TunnelSenderAddress(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) FlowRSVPPathSenderTemplateLspTunnelIpv4 { + + obj.ipv4TunnelSenderAddressHolder = nil + obj.obj.Ipv4TunnelSenderAddress = value.msg() + + return obj +} + +// description is TBD +// Reserved returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) Reserved() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved { + if obj.obj.Reserved == nil { + obj.obj.Reserved = NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved().msg() + } + if obj.reservedHolder == nil { + obj.reservedHolder = &patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved{obj: obj.obj.Reserved} + } + return obj.reservedHolder +} + +// description is TBD +// Reserved returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) HasReserved() bool { + return obj.obj.Reserved != nil +} + +// description is TBD +// SetReserved sets the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved value in the FlowRSVPPathSenderTemplateLspTunnelIpv4 object +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) SetReserved(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) FlowRSVPPathSenderTemplateLspTunnelIpv4 { + + obj.reservedHolder = nil + obj.obj.Reserved = value.msg() + + return obj +} + +// description is TBD +// LspId returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) LspId() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId { + if obj.obj.LspId == nil { + obj.obj.LspId = NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId().msg() + } + if obj.lspIdHolder == nil { + obj.lspIdHolder = &patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId{obj: obj.obj.LspId} + } + return obj.lspIdHolder +} + +// description is TBD +// LspId returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) HasLspId() bool { + return obj.obj.LspId != nil +} + +// description is TBD +// SetLspId sets the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId value in the FlowRSVPPathSenderTemplateLspTunnelIpv4 object +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) SetLspId(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) FlowRSVPPathSenderTemplateLspTunnelIpv4 { + + obj.lspIdHolder = nil + obj.obj.LspId = value.msg() + + return obj +} + +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv4TunnelSenderAddress != nil { + + obj.Ipv4TunnelSenderAddress().validateObj(vObj, set_default) + } + + if obj.obj.Reserved != nil { + + obj.Reserved().validateObj(vObj, set_default) + } + + if obj.obj.LspId != nil { + + obj.LspId().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathSenderTemplateLspTunnelIpv4) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_sender_tspec_int_serv.go b/gosnappi/flow_rsvp_path_sender_tspec_int_serv.go new file mode 100644 index 00000000..707d9f53 --- /dev/null +++ b/gosnappi/flow_rsvp_path_sender_tspec_int_serv.go @@ -0,0 +1,894 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathSenderTspecIntServ ***** +type flowRSVPPathSenderTspecIntServ struct { + validation + obj *otg.FlowRSVPPathSenderTspecIntServ + marshaller marshalFlowRSVPPathSenderTspecIntServ + unMarshaller unMarshalFlowRSVPPathSenderTspecIntServ + versionHolder PatternFlowRSVPPathSenderTspecIntServVersion + reserved1Holder PatternFlowRSVPPathSenderTspecIntServReserved1 + overallLengthHolder PatternFlowRSVPPathSenderTspecIntServOverallLength + serviceHeaderHolder PatternFlowRSVPPathSenderTspecIntServServiceHeader + zeroBitHolder PatternFlowRSVPPathSenderTspecIntServZeroBit + reserved2Holder PatternFlowRSVPPathSenderTspecIntServReserved2 + lengthOfServiceDataHolder PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + parameterIdTokenBucketTspecHolder PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + parameter_127FlagHolder PatternFlowRSVPPathSenderTspecIntServParameter127Flag + parameter_127LengthHolder PatternFlowRSVPPathSenderTspecIntServParameter127Length + minimumPolicedUnitHolder PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + maximumPacketSizeHolder PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize +} + +func NewFlowRSVPPathSenderTspecIntServ() FlowRSVPPathSenderTspecIntServ { + obj := flowRSVPPathSenderTspecIntServ{obj: &otg.FlowRSVPPathSenderTspecIntServ{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathSenderTspecIntServ) msg() *otg.FlowRSVPPathSenderTspecIntServ { + return obj.obj +} + +func (obj *flowRSVPPathSenderTspecIntServ) setMsg(msg *otg.FlowRSVPPathSenderTspecIntServ) FlowRSVPPathSenderTspecIntServ { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathSenderTspecIntServ struct { + obj *flowRSVPPathSenderTspecIntServ +} + +type marshalFlowRSVPPathSenderTspecIntServ interface { + // ToProto marshals FlowRSVPPathSenderTspecIntServ to protobuf object *otg.FlowRSVPPathSenderTspecIntServ + ToProto() (*otg.FlowRSVPPathSenderTspecIntServ, error) + // ToPbText marshals FlowRSVPPathSenderTspecIntServ to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathSenderTspecIntServ to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathSenderTspecIntServ to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathSenderTspecIntServ struct { + obj *flowRSVPPathSenderTspecIntServ +} + +type unMarshalFlowRSVPPathSenderTspecIntServ interface { + // FromProto unmarshals FlowRSVPPathSenderTspecIntServ from protobuf object *otg.FlowRSVPPathSenderTspecIntServ + FromProto(msg *otg.FlowRSVPPathSenderTspecIntServ) (FlowRSVPPathSenderTspecIntServ, error) + // FromPbText unmarshals FlowRSVPPathSenderTspecIntServ from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathSenderTspecIntServ from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathSenderTspecIntServ from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathSenderTspecIntServ) Marshal() marshalFlowRSVPPathSenderTspecIntServ { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathSenderTspecIntServ{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathSenderTspecIntServ) Unmarshal() unMarshalFlowRSVPPathSenderTspecIntServ { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathSenderTspecIntServ{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathSenderTspecIntServ) ToProto() (*otg.FlowRSVPPathSenderTspecIntServ, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathSenderTspecIntServ) FromProto(msg *otg.FlowRSVPPathSenderTspecIntServ) (FlowRSVPPathSenderTspecIntServ, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathSenderTspecIntServ) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathSenderTspecIntServ) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathSenderTspecIntServ) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathSenderTspecIntServ) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathSenderTspecIntServ) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathSenderTspecIntServ) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathSenderTspecIntServ) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathSenderTspecIntServ) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathSenderTspecIntServ) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathSenderTspecIntServ) Clone() (FlowRSVPPathSenderTspecIntServ, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathSenderTspecIntServ() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathSenderTspecIntServ) setNil() { + obj.versionHolder = nil + obj.reserved1Holder = nil + obj.overallLengthHolder = nil + obj.serviceHeaderHolder = nil + obj.zeroBitHolder = nil + obj.reserved2Holder = nil + obj.lengthOfServiceDataHolder = nil + obj.parameterIdTokenBucketTspecHolder = nil + obj.parameter_127FlagHolder = nil + obj.parameter_127LengthHolder = nil + obj.minimumPolicedUnitHolder = nil + obj.maximumPacketSizeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathSenderTspecIntServ is int-serv SENDER_TSPEC object: Class = 12, C-Type = 2 +type FlowRSVPPathSenderTspecIntServ interface { + Validation + // msg marshals FlowRSVPPathSenderTspecIntServ to protobuf object *otg.FlowRSVPPathSenderTspecIntServ + // and doesn't set defaults + msg() *otg.FlowRSVPPathSenderTspecIntServ + // setMsg unmarshals FlowRSVPPathSenderTspecIntServ from protobuf object *otg.FlowRSVPPathSenderTspecIntServ + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathSenderTspecIntServ) FlowRSVPPathSenderTspecIntServ + // provides marshal interface + Marshal() marshalFlowRSVPPathSenderTspecIntServ + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathSenderTspecIntServ + // validate validates FlowRSVPPathSenderTspecIntServ + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathSenderTspecIntServ, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Version returns PatternFlowRSVPPathSenderTspecIntServVersion, set in FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServVersion is message format version number. + Version() PatternFlowRSVPPathSenderTspecIntServVersion + // SetVersion assigns PatternFlowRSVPPathSenderTspecIntServVersion provided by user to FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServVersion is message format version number. + SetVersion(value PatternFlowRSVPPathSenderTspecIntServVersion) FlowRSVPPathSenderTspecIntServ + // HasVersion checks if Version has been set in FlowRSVPPathSenderTspecIntServ + HasVersion() bool + // Reserved1 returns PatternFlowRSVPPathSenderTspecIntServReserved1, set in FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServReserved1 is reserved. + Reserved1() PatternFlowRSVPPathSenderTspecIntServReserved1 + // SetReserved1 assigns PatternFlowRSVPPathSenderTspecIntServReserved1 provided by user to FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServReserved1 is reserved. + SetReserved1(value PatternFlowRSVPPathSenderTspecIntServReserved1) FlowRSVPPathSenderTspecIntServ + // HasReserved1 checks if Reserved1 has been set in FlowRSVPPathSenderTspecIntServ + HasReserved1() bool + // OverallLength returns PatternFlowRSVPPathSenderTspecIntServOverallLength, set in FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServOverallLength is overall length (7 words not including header). + OverallLength() PatternFlowRSVPPathSenderTspecIntServOverallLength + // SetOverallLength assigns PatternFlowRSVPPathSenderTspecIntServOverallLength provided by user to FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServOverallLength is overall length (7 words not including header). + SetOverallLength(value PatternFlowRSVPPathSenderTspecIntServOverallLength) FlowRSVPPathSenderTspecIntServ + // HasOverallLength checks if OverallLength has been set in FlowRSVPPathSenderTspecIntServ + HasOverallLength() bool + // ServiceHeader returns PatternFlowRSVPPathSenderTspecIntServServiceHeader, set in FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServServiceHeader is service header, service number - '1' (Generic information) if in a PATH message. + ServiceHeader() PatternFlowRSVPPathSenderTspecIntServServiceHeader + // SetServiceHeader assigns PatternFlowRSVPPathSenderTspecIntServServiceHeader provided by user to FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServServiceHeader is service header, service number - '1' (Generic information) if in a PATH message. + SetServiceHeader(value PatternFlowRSVPPathSenderTspecIntServServiceHeader) FlowRSVPPathSenderTspecIntServ + // HasServiceHeader checks if ServiceHeader has been set in FlowRSVPPathSenderTspecIntServ + HasServiceHeader() bool + // ZeroBit returns PatternFlowRSVPPathSenderTspecIntServZeroBit, set in FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServZeroBit is mUST be 0. + ZeroBit() PatternFlowRSVPPathSenderTspecIntServZeroBit + // SetZeroBit assigns PatternFlowRSVPPathSenderTspecIntServZeroBit provided by user to FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServZeroBit is mUST be 0. + SetZeroBit(value PatternFlowRSVPPathSenderTspecIntServZeroBit) FlowRSVPPathSenderTspecIntServ + // HasZeroBit checks if ZeroBit has been set in FlowRSVPPathSenderTspecIntServ + HasZeroBit() bool + // Reserved2 returns PatternFlowRSVPPathSenderTspecIntServReserved2, set in FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServReserved2 is reserved. + Reserved2() PatternFlowRSVPPathSenderTspecIntServReserved2 + // SetReserved2 assigns PatternFlowRSVPPathSenderTspecIntServReserved2 provided by user to FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServReserved2 is reserved. + SetReserved2(value PatternFlowRSVPPathSenderTspecIntServReserved2) FlowRSVPPathSenderTspecIntServ + // HasReserved2 checks if Reserved2 has been set in FlowRSVPPathSenderTspecIntServ + HasReserved2() bool + // LengthOfServiceData returns PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData, set in FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData is length of service data, 6 words not including per-service header. + LengthOfServiceData() PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + // SetLengthOfServiceData assigns PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData provided by user to FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData is length of service data, 6 words not including per-service header. + SetLengthOfServiceData(value PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) FlowRSVPPathSenderTspecIntServ + // HasLengthOfServiceData checks if LengthOfServiceData has been set in FlowRSVPPathSenderTspecIntServ + HasLengthOfServiceData() bool + // ParameterIdTokenBucketTspec returns PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec, set in FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec is parameter ID, parameter 127 (Token Bucket TSpec) + ParameterIdTokenBucketTspec() PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + // SetParameterIdTokenBucketTspec assigns PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec provided by user to FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec is parameter ID, parameter 127 (Token Bucket TSpec) + SetParameterIdTokenBucketTspec(value PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) FlowRSVPPathSenderTspecIntServ + // HasParameterIdTokenBucketTspec checks if ParameterIdTokenBucketTspec has been set in FlowRSVPPathSenderTspecIntServ + HasParameterIdTokenBucketTspec() bool + // Parameter127Flag returns PatternFlowRSVPPathSenderTspecIntServParameter127Flag, set in FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServParameter127Flag is parameter 127 flags (none set) + Parameter127Flag() PatternFlowRSVPPathSenderTspecIntServParameter127Flag + // SetParameter127Flag assigns PatternFlowRSVPPathSenderTspecIntServParameter127Flag provided by user to FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServParameter127Flag is parameter 127 flags (none set) + SetParameter127Flag(value PatternFlowRSVPPathSenderTspecIntServParameter127Flag) FlowRSVPPathSenderTspecIntServ + // HasParameter127Flag checks if Parameter127Flag has been set in FlowRSVPPathSenderTspecIntServ + HasParameter127Flag() bool + // Parameter127Length returns PatternFlowRSVPPathSenderTspecIntServParameter127Length, set in FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServParameter127Length is parameter 127 length, 5 words not including per-service header + Parameter127Length() PatternFlowRSVPPathSenderTspecIntServParameter127Length + // SetParameter127Length assigns PatternFlowRSVPPathSenderTspecIntServParameter127Length provided by user to FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServParameter127Length is parameter 127 length, 5 words not including per-service header + SetParameter127Length(value PatternFlowRSVPPathSenderTspecIntServParameter127Length) FlowRSVPPathSenderTspecIntServ + // HasParameter127Length checks if Parameter127Length has been set in FlowRSVPPathSenderTspecIntServ + HasParameter127Length() bool + // TokenBucketRate returns float32, set in FlowRSVPPathSenderTspecIntServ. + TokenBucketRate() float32 + // SetTokenBucketRate assigns float32 provided by user to FlowRSVPPathSenderTspecIntServ + SetTokenBucketRate(value float32) FlowRSVPPathSenderTspecIntServ + // HasTokenBucketRate checks if TokenBucketRate has been set in FlowRSVPPathSenderTspecIntServ + HasTokenBucketRate() bool + // TokenBucketSize returns float32, set in FlowRSVPPathSenderTspecIntServ. + TokenBucketSize() float32 + // SetTokenBucketSize assigns float32 provided by user to FlowRSVPPathSenderTspecIntServ + SetTokenBucketSize(value float32) FlowRSVPPathSenderTspecIntServ + // HasTokenBucketSize checks if TokenBucketSize has been set in FlowRSVPPathSenderTspecIntServ + HasTokenBucketSize() bool + // PeakDataRate returns float32, set in FlowRSVPPathSenderTspecIntServ. + PeakDataRate() float32 + // SetPeakDataRate assigns float32 provided by user to FlowRSVPPathSenderTspecIntServ + SetPeakDataRate(value float32) FlowRSVPPathSenderTspecIntServ + // HasPeakDataRate checks if PeakDataRate has been set in FlowRSVPPathSenderTspecIntServ + HasPeakDataRate() bool + // MinimumPolicedUnit returns PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit, set in FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit is the minimum policed unit parameter should generally be set equal to the size of the smallest packet generated by the application. + MinimumPolicedUnit() PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + // SetMinimumPolicedUnit assigns PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit provided by user to FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit is the minimum policed unit parameter should generally be set equal to the size of the smallest packet generated by the application. + SetMinimumPolicedUnit(value PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) FlowRSVPPathSenderTspecIntServ + // HasMinimumPolicedUnit checks if MinimumPolicedUnit has been set in FlowRSVPPathSenderTspecIntServ + HasMinimumPolicedUnit() bool + // MaximumPacketSize returns PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize, set in FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize is the maximum packet size parameter should be set to the size of the largest packet the application might wish to generate. This value must, by definition, be equal to or larger than the value of The minimum policed unit. + MaximumPacketSize() PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + // SetMaximumPacketSize assigns PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize provided by user to FlowRSVPPathSenderTspecIntServ. + // PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize is the maximum packet size parameter should be set to the size of the largest packet the application might wish to generate. This value must, by definition, be equal to or larger than the value of The minimum policed unit. + SetMaximumPacketSize(value PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) FlowRSVPPathSenderTspecIntServ + // HasMaximumPacketSize checks if MaximumPacketSize has been set in FlowRSVPPathSenderTspecIntServ + HasMaximumPacketSize() bool + setNil() +} + +// description is TBD +// Version returns a PatternFlowRSVPPathSenderTspecIntServVersion +func (obj *flowRSVPPathSenderTspecIntServ) Version() PatternFlowRSVPPathSenderTspecIntServVersion { + if obj.obj.Version == nil { + obj.obj.Version = NewPatternFlowRSVPPathSenderTspecIntServVersion().msg() + } + if obj.versionHolder == nil { + obj.versionHolder = &patternFlowRSVPPathSenderTspecIntServVersion{obj: obj.obj.Version} + } + return obj.versionHolder +} + +// description is TBD +// Version returns a PatternFlowRSVPPathSenderTspecIntServVersion +func (obj *flowRSVPPathSenderTspecIntServ) HasVersion() bool { + return obj.obj.Version != nil +} + +// description is TBD +// SetVersion sets the PatternFlowRSVPPathSenderTspecIntServVersion value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetVersion(value PatternFlowRSVPPathSenderTspecIntServVersion) FlowRSVPPathSenderTspecIntServ { + + obj.versionHolder = nil + obj.obj.Version = value.msg() + + return obj +} + +// description is TBD +// Reserved1 returns a PatternFlowRSVPPathSenderTspecIntServReserved1 +func (obj *flowRSVPPathSenderTspecIntServ) Reserved1() PatternFlowRSVPPathSenderTspecIntServReserved1 { + if obj.obj.Reserved1 == nil { + obj.obj.Reserved1 = NewPatternFlowRSVPPathSenderTspecIntServReserved1().msg() + } + if obj.reserved1Holder == nil { + obj.reserved1Holder = &patternFlowRSVPPathSenderTspecIntServReserved1{obj: obj.obj.Reserved1} + } + return obj.reserved1Holder +} + +// description is TBD +// Reserved1 returns a PatternFlowRSVPPathSenderTspecIntServReserved1 +func (obj *flowRSVPPathSenderTspecIntServ) HasReserved1() bool { + return obj.obj.Reserved1 != nil +} + +// description is TBD +// SetReserved1 sets the PatternFlowRSVPPathSenderTspecIntServReserved1 value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetReserved1(value PatternFlowRSVPPathSenderTspecIntServReserved1) FlowRSVPPathSenderTspecIntServ { + + obj.reserved1Holder = nil + obj.obj.Reserved1 = value.msg() + + return obj +} + +// description is TBD +// OverallLength returns a PatternFlowRSVPPathSenderTspecIntServOverallLength +func (obj *flowRSVPPathSenderTspecIntServ) OverallLength() PatternFlowRSVPPathSenderTspecIntServOverallLength { + if obj.obj.OverallLength == nil { + obj.obj.OverallLength = NewPatternFlowRSVPPathSenderTspecIntServOverallLength().msg() + } + if obj.overallLengthHolder == nil { + obj.overallLengthHolder = &patternFlowRSVPPathSenderTspecIntServOverallLength{obj: obj.obj.OverallLength} + } + return obj.overallLengthHolder +} + +// description is TBD +// OverallLength returns a PatternFlowRSVPPathSenderTspecIntServOverallLength +func (obj *flowRSVPPathSenderTspecIntServ) HasOverallLength() bool { + return obj.obj.OverallLength != nil +} + +// description is TBD +// SetOverallLength sets the PatternFlowRSVPPathSenderTspecIntServOverallLength value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetOverallLength(value PatternFlowRSVPPathSenderTspecIntServOverallLength) FlowRSVPPathSenderTspecIntServ { + + obj.overallLengthHolder = nil + obj.obj.OverallLength = value.msg() + + return obj +} + +// description is TBD +// ServiceHeader returns a PatternFlowRSVPPathSenderTspecIntServServiceHeader +func (obj *flowRSVPPathSenderTspecIntServ) ServiceHeader() PatternFlowRSVPPathSenderTspecIntServServiceHeader { + if obj.obj.ServiceHeader == nil { + obj.obj.ServiceHeader = NewPatternFlowRSVPPathSenderTspecIntServServiceHeader().msg() + } + if obj.serviceHeaderHolder == nil { + obj.serviceHeaderHolder = &patternFlowRSVPPathSenderTspecIntServServiceHeader{obj: obj.obj.ServiceHeader} + } + return obj.serviceHeaderHolder +} + +// description is TBD +// ServiceHeader returns a PatternFlowRSVPPathSenderTspecIntServServiceHeader +func (obj *flowRSVPPathSenderTspecIntServ) HasServiceHeader() bool { + return obj.obj.ServiceHeader != nil +} + +// description is TBD +// SetServiceHeader sets the PatternFlowRSVPPathSenderTspecIntServServiceHeader value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetServiceHeader(value PatternFlowRSVPPathSenderTspecIntServServiceHeader) FlowRSVPPathSenderTspecIntServ { + + obj.serviceHeaderHolder = nil + obj.obj.ServiceHeader = value.msg() + + return obj +} + +// description is TBD +// ZeroBit returns a PatternFlowRSVPPathSenderTspecIntServZeroBit +func (obj *flowRSVPPathSenderTspecIntServ) ZeroBit() PatternFlowRSVPPathSenderTspecIntServZeroBit { + if obj.obj.ZeroBit == nil { + obj.obj.ZeroBit = NewPatternFlowRSVPPathSenderTspecIntServZeroBit().msg() + } + if obj.zeroBitHolder == nil { + obj.zeroBitHolder = &patternFlowRSVPPathSenderTspecIntServZeroBit{obj: obj.obj.ZeroBit} + } + return obj.zeroBitHolder +} + +// description is TBD +// ZeroBit returns a PatternFlowRSVPPathSenderTspecIntServZeroBit +func (obj *flowRSVPPathSenderTspecIntServ) HasZeroBit() bool { + return obj.obj.ZeroBit != nil +} + +// description is TBD +// SetZeroBit sets the PatternFlowRSVPPathSenderTspecIntServZeroBit value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetZeroBit(value PatternFlowRSVPPathSenderTspecIntServZeroBit) FlowRSVPPathSenderTspecIntServ { + + obj.zeroBitHolder = nil + obj.obj.ZeroBit = value.msg() + + return obj +} + +// description is TBD +// Reserved2 returns a PatternFlowRSVPPathSenderTspecIntServReserved2 +func (obj *flowRSVPPathSenderTspecIntServ) Reserved2() PatternFlowRSVPPathSenderTspecIntServReserved2 { + if obj.obj.Reserved2 == nil { + obj.obj.Reserved2 = NewPatternFlowRSVPPathSenderTspecIntServReserved2().msg() + } + if obj.reserved2Holder == nil { + obj.reserved2Holder = &patternFlowRSVPPathSenderTspecIntServReserved2{obj: obj.obj.Reserved2} + } + return obj.reserved2Holder +} + +// description is TBD +// Reserved2 returns a PatternFlowRSVPPathSenderTspecIntServReserved2 +func (obj *flowRSVPPathSenderTspecIntServ) HasReserved2() bool { + return obj.obj.Reserved2 != nil +} + +// description is TBD +// SetReserved2 sets the PatternFlowRSVPPathSenderTspecIntServReserved2 value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetReserved2(value PatternFlowRSVPPathSenderTspecIntServReserved2) FlowRSVPPathSenderTspecIntServ { + + obj.reserved2Holder = nil + obj.obj.Reserved2 = value.msg() + + return obj +} + +// description is TBD +// LengthOfServiceData returns a PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData +func (obj *flowRSVPPathSenderTspecIntServ) LengthOfServiceData() PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData { + if obj.obj.LengthOfServiceData == nil { + obj.obj.LengthOfServiceData = NewPatternFlowRSVPPathSenderTspecIntServLengthOfServiceData().msg() + } + if obj.lengthOfServiceDataHolder == nil { + obj.lengthOfServiceDataHolder = &patternFlowRSVPPathSenderTspecIntServLengthOfServiceData{obj: obj.obj.LengthOfServiceData} + } + return obj.lengthOfServiceDataHolder +} + +// description is TBD +// LengthOfServiceData returns a PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData +func (obj *flowRSVPPathSenderTspecIntServ) HasLengthOfServiceData() bool { + return obj.obj.LengthOfServiceData != nil +} + +// description is TBD +// SetLengthOfServiceData sets the PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetLengthOfServiceData(value PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) FlowRSVPPathSenderTspecIntServ { + + obj.lengthOfServiceDataHolder = nil + obj.obj.LengthOfServiceData = value.msg() + + return obj +} + +// description is TBD +// ParameterIdTokenBucketTspec returns a PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec +func (obj *flowRSVPPathSenderTspecIntServ) ParameterIdTokenBucketTspec() PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec { + if obj.obj.ParameterIdTokenBucketTspec == nil { + obj.obj.ParameterIdTokenBucketTspec = NewPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec().msg() + } + if obj.parameterIdTokenBucketTspecHolder == nil { + obj.parameterIdTokenBucketTspecHolder = &patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec{obj: obj.obj.ParameterIdTokenBucketTspec} + } + return obj.parameterIdTokenBucketTspecHolder +} + +// description is TBD +// ParameterIdTokenBucketTspec returns a PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec +func (obj *flowRSVPPathSenderTspecIntServ) HasParameterIdTokenBucketTspec() bool { + return obj.obj.ParameterIdTokenBucketTspec != nil +} + +// description is TBD +// SetParameterIdTokenBucketTspec sets the PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetParameterIdTokenBucketTspec(value PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) FlowRSVPPathSenderTspecIntServ { + + obj.parameterIdTokenBucketTspecHolder = nil + obj.obj.ParameterIdTokenBucketTspec = value.msg() + + return obj +} + +// description is TBD +// Parameter127Flag returns a PatternFlowRSVPPathSenderTspecIntServParameter127Flag +func (obj *flowRSVPPathSenderTspecIntServ) Parameter127Flag() PatternFlowRSVPPathSenderTspecIntServParameter127Flag { + if obj.obj.Parameter_127Flag == nil { + obj.obj.Parameter_127Flag = NewPatternFlowRSVPPathSenderTspecIntServParameter127Flag().msg() + } + if obj.parameter_127FlagHolder == nil { + obj.parameter_127FlagHolder = &patternFlowRSVPPathSenderTspecIntServParameter127Flag{obj: obj.obj.Parameter_127Flag} + } + return obj.parameter_127FlagHolder +} + +// description is TBD +// Parameter127Flag returns a PatternFlowRSVPPathSenderTspecIntServParameter127Flag +func (obj *flowRSVPPathSenderTspecIntServ) HasParameter127Flag() bool { + return obj.obj.Parameter_127Flag != nil +} + +// description is TBD +// SetParameter127Flag sets the PatternFlowRSVPPathSenderTspecIntServParameter127Flag value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetParameter127Flag(value PatternFlowRSVPPathSenderTspecIntServParameter127Flag) FlowRSVPPathSenderTspecIntServ { + + obj.parameter_127FlagHolder = nil + obj.obj.Parameter_127Flag = value.msg() + + return obj +} + +// description is TBD +// Parameter127Length returns a PatternFlowRSVPPathSenderTspecIntServParameter127Length +func (obj *flowRSVPPathSenderTspecIntServ) Parameter127Length() PatternFlowRSVPPathSenderTspecIntServParameter127Length { + if obj.obj.Parameter_127Length == nil { + obj.obj.Parameter_127Length = NewPatternFlowRSVPPathSenderTspecIntServParameter127Length().msg() + } + if obj.parameter_127LengthHolder == nil { + obj.parameter_127LengthHolder = &patternFlowRSVPPathSenderTspecIntServParameter127Length{obj: obj.obj.Parameter_127Length} + } + return obj.parameter_127LengthHolder +} + +// description is TBD +// Parameter127Length returns a PatternFlowRSVPPathSenderTspecIntServParameter127Length +func (obj *flowRSVPPathSenderTspecIntServ) HasParameter127Length() bool { + return obj.obj.Parameter_127Length != nil +} + +// description is TBD +// SetParameter127Length sets the PatternFlowRSVPPathSenderTspecIntServParameter127Length value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetParameter127Length(value PatternFlowRSVPPathSenderTspecIntServParameter127Length) FlowRSVPPathSenderTspecIntServ { + + obj.parameter_127LengthHolder = nil + obj.obj.Parameter_127Length = value.msg() + + return obj +} + +// Token bucket rate is set to sender's view of its generated traffic. +// TokenBucketRate returns a float32 +func (obj *flowRSVPPathSenderTspecIntServ) TokenBucketRate() float32 { + + return *obj.obj.TokenBucketRate + +} + +// Token bucket rate is set to sender's view of its generated traffic. +// TokenBucketRate returns a float32 +func (obj *flowRSVPPathSenderTspecIntServ) HasTokenBucketRate() bool { + return obj.obj.TokenBucketRate != nil +} + +// Token bucket rate is set to sender's view of its generated traffic. +// SetTokenBucketRate sets the float32 value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetTokenBucketRate(value float32) FlowRSVPPathSenderTspecIntServ { + + obj.obj.TokenBucketRate = &value + return obj +} + +// Token bucket size is set to sender's view of its generated traffic. +// TokenBucketSize returns a float32 +func (obj *flowRSVPPathSenderTspecIntServ) TokenBucketSize() float32 { + + return *obj.obj.TokenBucketSize + +} + +// Token bucket size is set to sender's view of its generated traffic. +// TokenBucketSize returns a float32 +func (obj *flowRSVPPathSenderTspecIntServ) HasTokenBucketSize() bool { + return obj.obj.TokenBucketSize != nil +} + +// Token bucket size is set to sender's view of its generated traffic. +// SetTokenBucketSize sets the float32 value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetTokenBucketSize(value float32) FlowRSVPPathSenderTspecIntServ { + + obj.obj.TokenBucketSize = &value + return obj +} + +// The peak rate may be set to the sender's peak traffic generation rate (if known and controlled), the physical interface line rate (if known), or positive infinity (if no better value is available). +// PeakDataRate returns a float32 +func (obj *flowRSVPPathSenderTspecIntServ) PeakDataRate() float32 { + + return *obj.obj.PeakDataRate + +} + +// The peak rate may be set to the sender's peak traffic generation rate (if known and controlled), the physical interface line rate (if known), or positive infinity (if no better value is available). +// PeakDataRate returns a float32 +func (obj *flowRSVPPathSenderTspecIntServ) HasPeakDataRate() bool { + return obj.obj.PeakDataRate != nil +} + +// The peak rate may be set to the sender's peak traffic generation rate (if known and controlled), the physical interface line rate (if known), or positive infinity (if no better value is available). +// SetPeakDataRate sets the float32 value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetPeakDataRate(value float32) FlowRSVPPathSenderTspecIntServ { + + obj.obj.PeakDataRate = &value + return obj +} + +// description is TBD +// MinimumPolicedUnit returns a PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit +func (obj *flowRSVPPathSenderTspecIntServ) MinimumPolicedUnit() PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit { + if obj.obj.MinimumPolicedUnit == nil { + obj.obj.MinimumPolicedUnit = NewPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit().msg() + } + if obj.minimumPolicedUnitHolder == nil { + obj.minimumPolicedUnitHolder = &patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit{obj: obj.obj.MinimumPolicedUnit} + } + return obj.minimumPolicedUnitHolder +} + +// description is TBD +// MinimumPolicedUnit returns a PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit +func (obj *flowRSVPPathSenderTspecIntServ) HasMinimumPolicedUnit() bool { + return obj.obj.MinimumPolicedUnit != nil +} + +// description is TBD +// SetMinimumPolicedUnit sets the PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetMinimumPolicedUnit(value PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) FlowRSVPPathSenderTspecIntServ { + + obj.minimumPolicedUnitHolder = nil + obj.obj.MinimumPolicedUnit = value.msg() + + return obj +} + +// description is TBD +// MaximumPacketSize returns a PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize +func (obj *flowRSVPPathSenderTspecIntServ) MaximumPacketSize() PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize { + if obj.obj.MaximumPacketSize == nil { + obj.obj.MaximumPacketSize = NewPatternFlowRSVPPathSenderTspecIntServMaximumPacketSize().msg() + } + if obj.maximumPacketSizeHolder == nil { + obj.maximumPacketSizeHolder = &patternFlowRSVPPathSenderTspecIntServMaximumPacketSize{obj: obj.obj.MaximumPacketSize} + } + return obj.maximumPacketSizeHolder +} + +// description is TBD +// MaximumPacketSize returns a PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize +func (obj *flowRSVPPathSenderTspecIntServ) HasMaximumPacketSize() bool { + return obj.obj.MaximumPacketSize != nil +} + +// description is TBD +// SetMaximumPacketSize sets the PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize value in the FlowRSVPPathSenderTspecIntServ object +func (obj *flowRSVPPathSenderTspecIntServ) SetMaximumPacketSize(value PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) FlowRSVPPathSenderTspecIntServ { + + obj.maximumPacketSizeHolder = nil + obj.obj.MaximumPacketSize = value.msg() + + return obj +} + +func (obj *flowRSVPPathSenderTspecIntServ) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Version != nil { + + obj.Version().validateObj(vObj, set_default) + } + + if obj.obj.Reserved1 != nil { + + obj.Reserved1().validateObj(vObj, set_default) + } + + if obj.obj.OverallLength != nil { + + obj.OverallLength().validateObj(vObj, set_default) + } + + if obj.obj.ServiceHeader != nil { + + obj.ServiceHeader().validateObj(vObj, set_default) + } + + if obj.obj.ZeroBit != nil { + + obj.ZeroBit().validateObj(vObj, set_default) + } + + if obj.obj.Reserved2 != nil { + + obj.Reserved2().validateObj(vObj, set_default) + } + + if obj.obj.LengthOfServiceData != nil { + + obj.LengthOfServiceData().validateObj(vObj, set_default) + } + + if obj.obj.ParameterIdTokenBucketTspec != nil { + + obj.ParameterIdTokenBucketTspec().validateObj(vObj, set_default) + } + + if obj.obj.Parameter_127Flag != nil { + + obj.Parameter127Flag().validateObj(vObj, set_default) + } + + if obj.obj.Parameter_127Length != nil { + + obj.Parameter127Length().validateObj(vObj, set_default) + } + + if obj.obj.MinimumPolicedUnit != nil { + + obj.MinimumPolicedUnit().validateObj(vObj, set_default) + } + + if obj.obj.MaximumPacketSize != nil { + + obj.MaximumPacketSize().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathSenderTspecIntServ) setDefault() { + if obj.obj.TokenBucketRate == nil { + obj.SetTokenBucketRate(0) + } + if obj.obj.TokenBucketSize == nil { + obj.SetTokenBucketSize(0) + } + if obj.obj.PeakDataRate == nil { + obj.SetPeakDataRate(0) + } + +} diff --git a/gosnappi/flow_rsvp_path_session_attribute_lsp_tunnel.go b/gosnappi/flow_rsvp_path_session_attribute_lsp_tunnel.go new file mode 100644 index 00000000..93ae23e0 --- /dev/null +++ b/gosnappi/flow_rsvp_path_session_attribute_lsp_tunnel.go @@ -0,0 +1,496 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathSessionAttributeLspTunnel ***** +type flowRSVPPathSessionAttributeLspTunnel struct { + validation + obj *otg.FlowRSVPPathSessionAttributeLspTunnel + marshaller marshalFlowRSVPPathSessionAttributeLspTunnel + unMarshaller unMarshalFlowRSVPPathSessionAttributeLspTunnel + flagsHolder FlowRSVPLspTunnelFlag + nameLengthHolder FlowRSVPSessionAttributeNameLength +} + +func NewFlowRSVPPathSessionAttributeLspTunnel() FlowRSVPPathSessionAttributeLspTunnel { + obj := flowRSVPPathSessionAttributeLspTunnel{obj: &otg.FlowRSVPPathSessionAttributeLspTunnel{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathSessionAttributeLspTunnel) msg() *otg.FlowRSVPPathSessionAttributeLspTunnel { + return obj.obj +} + +func (obj *flowRSVPPathSessionAttributeLspTunnel) setMsg(msg *otg.FlowRSVPPathSessionAttributeLspTunnel) FlowRSVPPathSessionAttributeLspTunnel { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathSessionAttributeLspTunnel struct { + obj *flowRSVPPathSessionAttributeLspTunnel +} + +type marshalFlowRSVPPathSessionAttributeLspTunnel interface { + // ToProto marshals FlowRSVPPathSessionAttributeLspTunnel to protobuf object *otg.FlowRSVPPathSessionAttributeLspTunnel + ToProto() (*otg.FlowRSVPPathSessionAttributeLspTunnel, error) + // ToPbText marshals FlowRSVPPathSessionAttributeLspTunnel to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathSessionAttributeLspTunnel to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathSessionAttributeLspTunnel to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathSessionAttributeLspTunnel struct { + obj *flowRSVPPathSessionAttributeLspTunnel +} + +type unMarshalFlowRSVPPathSessionAttributeLspTunnel interface { + // FromProto unmarshals FlowRSVPPathSessionAttributeLspTunnel from protobuf object *otg.FlowRSVPPathSessionAttributeLspTunnel + FromProto(msg *otg.FlowRSVPPathSessionAttributeLspTunnel) (FlowRSVPPathSessionAttributeLspTunnel, error) + // FromPbText unmarshals FlowRSVPPathSessionAttributeLspTunnel from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathSessionAttributeLspTunnel from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathSessionAttributeLspTunnel from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathSessionAttributeLspTunnel) Marshal() marshalFlowRSVPPathSessionAttributeLspTunnel { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathSessionAttributeLspTunnel{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathSessionAttributeLspTunnel) Unmarshal() unMarshalFlowRSVPPathSessionAttributeLspTunnel { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathSessionAttributeLspTunnel{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathSessionAttributeLspTunnel) ToProto() (*otg.FlowRSVPPathSessionAttributeLspTunnel, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathSessionAttributeLspTunnel) FromProto(msg *otg.FlowRSVPPathSessionAttributeLspTunnel) (FlowRSVPPathSessionAttributeLspTunnel, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathSessionAttributeLspTunnel) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathSessionAttributeLspTunnel) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathSessionAttributeLspTunnel) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathSessionAttributeLspTunnel) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathSessionAttributeLspTunnel) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathSessionAttributeLspTunnel) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathSessionAttributeLspTunnel) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathSessionAttributeLspTunnel) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathSessionAttributeLspTunnel) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathSessionAttributeLspTunnel) Clone() (FlowRSVPPathSessionAttributeLspTunnel, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathSessionAttributeLspTunnel() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathSessionAttributeLspTunnel) setNil() { + obj.flagsHolder = nil + obj.nameLengthHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathSessionAttributeLspTunnel is sESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 7, resource affinity information. +type FlowRSVPPathSessionAttributeLspTunnel interface { + Validation + // msg marshals FlowRSVPPathSessionAttributeLspTunnel to protobuf object *otg.FlowRSVPPathSessionAttributeLspTunnel + // and doesn't set defaults + msg() *otg.FlowRSVPPathSessionAttributeLspTunnel + // setMsg unmarshals FlowRSVPPathSessionAttributeLspTunnel from protobuf object *otg.FlowRSVPPathSessionAttributeLspTunnel + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathSessionAttributeLspTunnel) FlowRSVPPathSessionAttributeLspTunnel + // provides marshal interface + Marshal() marshalFlowRSVPPathSessionAttributeLspTunnel + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathSessionAttributeLspTunnel + // validate validates FlowRSVPPathSessionAttributeLspTunnel + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathSessionAttributeLspTunnel, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // SetupPriority returns uint32, set in FlowRSVPPathSessionAttributeLspTunnel. + SetupPriority() uint32 + // SetSetupPriority assigns uint32 provided by user to FlowRSVPPathSessionAttributeLspTunnel + SetSetupPriority(value uint32) FlowRSVPPathSessionAttributeLspTunnel + // HasSetupPriority checks if SetupPriority has been set in FlowRSVPPathSessionAttributeLspTunnel + HasSetupPriority() bool + // HoldingPriority returns uint32, set in FlowRSVPPathSessionAttributeLspTunnel. + HoldingPriority() uint32 + // SetHoldingPriority assigns uint32 provided by user to FlowRSVPPathSessionAttributeLspTunnel + SetHoldingPriority(value uint32) FlowRSVPPathSessionAttributeLspTunnel + // HasHoldingPriority checks if HoldingPriority has been set in FlowRSVPPathSessionAttributeLspTunnel + HasHoldingPriority() bool + // Flags returns FlowRSVPLspTunnelFlag, set in FlowRSVPPathSessionAttributeLspTunnel. + // FlowRSVPLspTunnelFlag is description is TBD + Flags() FlowRSVPLspTunnelFlag + // SetFlags assigns FlowRSVPLspTunnelFlag provided by user to FlowRSVPPathSessionAttributeLspTunnel. + // FlowRSVPLspTunnelFlag is description is TBD + SetFlags(value FlowRSVPLspTunnelFlag) FlowRSVPPathSessionAttributeLspTunnel + // HasFlags checks if Flags has been set in FlowRSVPPathSessionAttributeLspTunnel + HasFlags() bool + // NameLength returns FlowRSVPSessionAttributeNameLength, set in FlowRSVPPathSessionAttributeLspTunnel. + // FlowRSVPSessionAttributeNameLength is description is TBD + NameLength() FlowRSVPSessionAttributeNameLength + // SetNameLength assigns FlowRSVPSessionAttributeNameLength provided by user to FlowRSVPPathSessionAttributeLspTunnel. + // FlowRSVPSessionAttributeNameLength is description is TBD + SetNameLength(value FlowRSVPSessionAttributeNameLength) FlowRSVPPathSessionAttributeLspTunnel + // HasNameLength checks if NameLength has been set in FlowRSVPPathSessionAttributeLspTunnel + HasNameLength() bool + // SessionName returns string, set in FlowRSVPPathSessionAttributeLspTunnel. + SessionName() string + // SetSessionName assigns string provided by user to FlowRSVPPathSessionAttributeLspTunnel + SetSessionName(value string) FlowRSVPPathSessionAttributeLspTunnel + // HasSessionName checks if SessionName has been set in FlowRSVPPathSessionAttributeLspTunnel + HasSessionName() bool + setNil() +} + +// The priority of the session with respect to taking resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. +// SetupPriority returns a uint32 +func (obj *flowRSVPPathSessionAttributeLspTunnel) SetupPriority() uint32 { + + return *obj.obj.SetupPriority + +} + +// The priority of the session with respect to taking resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. +// SetupPriority returns a uint32 +func (obj *flowRSVPPathSessionAttributeLspTunnel) HasSetupPriority() bool { + return obj.obj.SetupPriority != nil +} + +// The priority of the session with respect to taking resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. +// SetSetupPriority sets the uint32 value in the FlowRSVPPathSessionAttributeLspTunnel object +func (obj *flowRSVPPathSessionAttributeLspTunnel) SetSetupPriority(value uint32) FlowRSVPPathSessionAttributeLspTunnel { + + obj.obj.SetupPriority = &value + return obj +} + +// The priority of the session with respect to holding resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. +// HoldingPriority returns a uint32 +func (obj *flowRSVPPathSessionAttributeLspTunnel) HoldingPriority() uint32 { + + return *obj.obj.HoldingPriority + +} + +// The priority of the session with respect to holding resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. +// HoldingPriority returns a uint32 +func (obj *flowRSVPPathSessionAttributeLspTunnel) HasHoldingPriority() bool { + return obj.obj.HoldingPriority != nil +} + +// The priority of the session with respect to holding resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. +// SetHoldingPriority sets the uint32 value in the FlowRSVPPathSessionAttributeLspTunnel object +func (obj *flowRSVPPathSessionAttributeLspTunnel) SetHoldingPriority(value uint32) FlowRSVPPathSessionAttributeLspTunnel { + + obj.obj.HoldingPriority = &value + return obj +} + +// 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired +// Flags returns a FlowRSVPLspTunnelFlag +func (obj *flowRSVPPathSessionAttributeLspTunnel) Flags() FlowRSVPLspTunnelFlag { + if obj.obj.Flags == nil { + obj.obj.Flags = NewFlowRSVPLspTunnelFlag().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &flowRSVPLspTunnelFlag{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired +// Flags returns a FlowRSVPLspTunnelFlag +func (obj *flowRSVPPathSessionAttributeLspTunnel) HasFlags() bool { + return obj.obj.Flags != nil +} + +// 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired +// SetFlags sets the FlowRSVPLspTunnelFlag value in the FlowRSVPPathSessionAttributeLspTunnel object +func (obj *flowRSVPPathSessionAttributeLspTunnel) SetFlags(value FlowRSVPLspTunnelFlag) FlowRSVPPathSessionAttributeLspTunnel { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// The length of the display string before padding, in bytes. +// NameLength returns a FlowRSVPSessionAttributeNameLength +func (obj *flowRSVPPathSessionAttributeLspTunnel) NameLength() FlowRSVPSessionAttributeNameLength { + if obj.obj.NameLength == nil { + obj.obj.NameLength = NewFlowRSVPSessionAttributeNameLength().msg() + } + if obj.nameLengthHolder == nil { + obj.nameLengthHolder = &flowRSVPSessionAttributeNameLength{obj: obj.obj.NameLength} + } + return obj.nameLengthHolder +} + +// The length of the display string before padding, in bytes. +// NameLength returns a FlowRSVPSessionAttributeNameLength +func (obj *flowRSVPPathSessionAttributeLspTunnel) HasNameLength() bool { + return obj.obj.NameLength != nil +} + +// The length of the display string before padding, in bytes. +// SetNameLength sets the FlowRSVPSessionAttributeNameLength value in the FlowRSVPPathSessionAttributeLspTunnel object +func (obj *flowRSVPPathSessionAttributeLspTunnel) SetNameLength(value FlowRSVPSessionAttributeNameLength) FlowRSVPPathSessionAttributeLspTunnel { + + obj.nameLengthHolder = nil + obj.obj.NameLength = value.msg() + + return obj +} + +// A null padded string of characters. +// SessionName returns a string +func (obj *flowRSVPPathSessionAttributeLspTunnel) SessionName() string { + + return *obj.obj.SessionName + +} + +// A null padded string of characters. +// SessionName returns a string +func (obj *flowRSVPPathSessionAttributeLspTunnel) HasSessionName() bool { + return obj.obj.SessionName != nil +} + +// A null padded string of characters. +// SetSessionName sets the string value in the FlowRSVPPathSessionAttributeLspTunnel object +func (obj *flowRSVPPathSessionAttributeLspTunnel) SetSessionName(value string) FlowRSVPPathSessionAttributeLspTunnel { + + obj.obj.SessionName = &value + return obj +} + +func (obj *flowRSVPPathSessionAttributeLspTunnel) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.SetupPriority != nil { + + if *obj.obj.SetupPriority > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowRSVPPathSessionAttributeLspTunnel.SetupPriority <= 7 but Got %d", *obj.obj.SetupPriority)) + } + + } + + if obj.obj.HoldingPriority != nil { + + if *obj.obj.HoldingPriority > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowRSVPPathSessionAttributeLspTunnel.HoldingPriority <= 7 but Got %d", *obj.obj.HoldingPriority)) + } + + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.NameLength != nil { + + obj.NameLength().validateObj(vObj, set_default) + } + + if obj.obj.SessionName != nil { + + if len(*obj.obj.SessionName) < 0 || len(*obj.obj.SessionName) > 254 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of FlowRSVPPathSessionAttributeLspTunnel.SessionName <= 254 but Got %d", + len(*obj.obj.SessionName))) + } + + } + +} + +func (obj *flowRSVPPathSessionAttributeLspTunnel) setDefault() { + if obj.obj.SetupPriority == nil { + obj.SetSetupPriority(7) + } + if obj.obj.HoldingPriority == nil { + obj.SetHoldingPriority(7) + } + if obj.obj.SessionName == nil { + obj.SetSessionName("") + } + +} diff --git a/gosnappi/flow_rsvp_path_session_attribute_lsp_tunnel_ra.go b/gosnappi/flow_rsvp_path_session_attribute_lsp_tunnel_ra.go new file mode 100644 index 00000000..420b2377 --- /dev/null +++ b/gosnappi/flow_rsvp_path_session_attribute_lsp_tunnel_ra.go @@ -0,0 +1,625 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathSessionAttributeLspTunnelRa ***** +type flowRSVPPathSessionAttributeLspTunnelRa struct { + validation + obj *otg.FlowRSVPPathSessionAttributeLspTunnelRa + marshaller marshalFlowRSVPPathSessionAttributeLspTunnelRa + unMarshaller unMarshalFlowRSVPPathSessionAttributeLspTunnelRa + flagsHolder FlowRSVPLspTunnelFlag + nameLengthHolder FlowRSVPSessionAttributeNameLength +} + +func NewFlowRSVPPathSessionAttributeLspTunnelRa() FlowRSVPPathSessionAttributeLspTunnelRa { + obj := flowRSVPPathSessionAttributeLspTunnelRa{obj: &otg.FlowRSVPPathSessionAttributeLspTunnelRa{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) msg() *otg.FlowRSVPPathSessionAttributeLspTunnelRa { + return obj.obj +} + +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) setMsg(msg *otg.FlowRSVPPathSessionAttributeLspTunnelRa) FlowRSVPPathSessionAttributeLspTunnelRa { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathSessionAttributeLspTunnelRa struct { + obj *flowRSVPPathSessionAttributeLspTunnelRa +} + +type marshalFlowRSVPPathSessionAttributeLspTunnelRa interface { + // ToProto marshals FlowRSVPPathSessionAttributeLspTunnelRa to protobuf object *otg.FlowRSVPPathSessionAttributeLspTunnelRa + ToProto() (*otg.FlowRSVPPathSessionAttributeLspTunnelRa, error) + // ToPbText marshals FlowRSVPPathSessionAttributeLspTunnelRa to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathSessionAttributeLspTunnelRa to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathSessionAttributeLspTunnelRa to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathSessionAttributeLspTunnelRa struct { + obj *flowRSVPPathSessionAttributeLspTunnelRa +} + +type unMarshalFlowRSVPPathSessionAttributeLspTunnelRa interface { + // FromProto unmarshals FlowRSVPPathSessionAttributeLspTunnelRa from protobuf object *otg.FlowRSVPPathSessionAttributeLspTunnelRa + FromProto(msg *otg.FlowRSVPPathSessionAttributeLspTunnelRa) (FlowRSVPPathSessionAttributeLspTunnelRa, error) + // FromPbText unmarshals FlowRSVPPathSessionAttributeLspTunnelRa from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathSessionAttributeLspTunnelRa from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathSessionAttributeLspTunnelRa from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) Marshal() marshalFlowRSVPPathSessionAttributeLspTunnelRa { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathSessionAttributeLspTunnelRa{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) Unmarshal() unMarshalFlowRSVPPathSessionAttributeLspTunnelRa { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathSessionAttributeLspTunnelRa{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathSessionAttributeLspTunnelRa) ToProto() (*otg.FlowRSVPPathSessionAttributeLspTunnelRa, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathSessionAttributeLspTunnelRa) FromProto(msg *otg.FlowRSVPPathSessionAttributeLspTunnelRa) (FlowRSVPPathSessionAttributeLspTunnelRa, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathSessionAttributeLspTunnelRa) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathSessionAttributeLspTunnelRa) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathSessionAttributeLspTunnelRa) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathSessionAttributeLspTunnelRa) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathSessionAttributeLspTunnelRa) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathSessionAttributeLspTunnelRa) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) Clone() (FlowRSVPPathSessionAttributeLspTunnelRa, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathSessionAttributeLspTunnelRa() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) setNil() { + obj.flagsHolder = nil + obj.nameLengthHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathSessionAttributeLspTunnelRa is sESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 1, it carries resource affinity information. +type FlowRSVPPathSessionAttributeLspTunnelRa interface { + Validation + // msg marshals FlowRSVPPathSessionAttributeLspTunnelRa to protobuf object *otg.FlowRSVPPathSessionAttributeLspTunnelRa + // and doesn't set defaults + msg() *otg.FlowRSVPPathSessionAttributeLspTunnelRa + // setMsg unmarshals FlowRSVPPathSessionAttributeLspTunnelRa from protobuf object *otg.FlowRSVPPathSessionAttributeLspTunnelRa + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathSessionAttributeLspTunnelRa) FlowRSVPPathSessionAttributeLspTunnelRa + // provides marshal interface + Marshal() marshalFlowRSVPPathSessionAttributeLspTunnelRa + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathSessionAttributeLspTunnelRa + // validate validates FlowRSVPPathSessionAttributeLspTunnelRa + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathSessionAttributeLspTunnelRa, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ExcludeAny returns string, set in FlowRSVPPathSessionAttributeLspTunnelRa. + ExcludeAny() string + // SetExcludeAny assigns string provided by user to FlowRSVPPathSessionAttributeLspTunnelRa + SetExcludeAny(value string) FlowRSVPPathSessionAttributeLspTunnelRa + // HasExcludeAny checks if ExcludeAny has been set in FlowRSVPPathSessionAttributeLspTunnelRa + HasExcludeAny() bool + // IncludeAny returns string, set in FlowRSVPPathSessionAttributeLspTunnelRa. + IncludeAny() string + // SetIncludeAny assigns string provided by user to FlowRSVPPathSessionAttributeLspTunnelRa + SetIncludeAny(value string) FlowRSVPPathSessionAttributeLspTunnelRa + // HasIncludeAny checks if IncludeAny has been set in FlowRSVPPathSessionAttributeLspTunnelRa + HasIncludeAny() bool + // IncludeAll returns string, set in FlowRSVPPathSessionAttributeLspTunnelRa. + IncludeAll() string + // SetIncludeAll assigns string provided by user to FlowRSVPPathSessionAttributeLspTunnelRa + SetIncludeAll(value string) FlowRSVPPathSessionAttributeLspTunnelRa + // HasIncludeAll checks if IncludeAll has been set in FlowRSVPPathSessionAttributeLspTunnelRa + HasIncludeAll() bool + // SetupPriority returns uint32, set in FlowRSVPPathSessionAttributeLspTunnelRa. + SetupPriority() uint32 + // SetSetupPriority assigns uint32 provided by user to FlowRSVPPathSessionAttributeLspTunnelRa + SetSetupPriority(value uint32) FlowRSVPPathSessionAttributeLspTunnelRa + // HasSetupPriority checks if SetupPriority has been set in FlowRSVPPathSessionAttributeLspTunnelRa + HasSetupPriority() bool + // HoldingPriority returns uint32, set in FlowRSVPPathSessionAttributeLspTunnelRa. + HoldingPriority() uint32 + // SetHoldingPriority assigns uint32 provided by user to FlowRSVPPathSessionAttributeLspTunnelRa + SetHoldingPriority(value uint32) FlowRSVPPathSessionAttributeLspTunnelRa + // HasHoldingPriority checks if HoldingPriority has been set in FlowRSVPPathSessionAttributeLspTunnelRa + HasHoldingPriority() bool + // Flags returns FlowRSVPLspTunnelFlag, set in FlowRSVPPathSessionAttributeLspTunnelRa. + // FlowRSVPLspTunnelFlag is description is TBD + Flags() FlowRSVPLspTunnelFlag + // SetFlags assigns FlowRSVPLspTunnelFlag provided by user to FlowRSVPPathSessionAttributeLspTunnelRa. + // FlowRSVPLspTunnelFlag is description is TBD + SetFlags(value FlowRSVPLspTunnelFlag) FlowRSVPPathSessionAttributeLspTunnelRa + // HasFlags checks if Flags has been set in FlowRSVPPathSessionAttributeLspTunnelRa + HasFlags() bool + // NameLength returns FlowRSVPSessionAttributeNameLength, set in FlowRSVPPathSessionAttributeLspTunnelRa. + // FlowRSVPSessionAttributeNameLength is description is TBD + NameLength() FlowRSVPSessionAttributeNameLength + // SetNameLength assigns FlowRSVPSessionAttributeNameLength provided by user to FlowRSVPPathSessionAttributeLspTunnelRa. + // FlowRSVPSessionAttributeNameLength is description is TBD + SetNameLength(value FlowRSVPSessionAttributeNameLength) FlowRSVPPathSessionAttributeLspTunnelRa + // HasNameLength checks if NameLength has been set in FlowRSVPPathSessionAttributeLspTunnelRa + HasNameLength() bool + // SessionName returns string, set in FlowRSVPPathSessionAttributeLspTunnelRa. + SessionName() string + // SetSessionName assigns string provided by user to FlowRSVPPathSessionAttributeLspTunnelRa + SetSessionName(value string) FlowRSVPPathSessionAttributeLspTunnelRa + // HasSessionName checks if SessionName has been set in FlowRSVPPathSessionAttributeLspTunnelRa + HasSessionName() bool + setNil() +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link unacceptable. A null set (all bits set to zero) doesn't render the link unacceptable. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// ExcludeAny returns a string +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) ExcludeAny() string { + + return *obj.obj.ExcludeAny + +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link unacceptable. A null set (all bits set to zero) doesn't render the link unacceptable. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// ExcludeAny returns a string +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) HasExcludeAny() bool { + return obj.obj.ExcludeAny != nil +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link unacceptable. A null set (all bits set to zero) doesn't render the link unacceptable. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// SetExcludeAny sets the string value in the FlowRSVPPathSessionAttributeLspTunnelRa object +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) SetExcludeAny(value string) FlowRSVPPathSessionAttributeLspTunnelRa { + + obj.obj.ExcludeAny = &value + return obj +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// IncludeAny returns a string +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) IncludeAny() string { + + return *obj.obj.IncludeAny + +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// IncludeAny returns a string +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) HasIncludeAny() bool { + return obj.obj.IncludeAny != nil +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// SetIncludeAny sets the string value in the FlowRSVPPathSessionAttributeLspTunnelRa object +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) SetIncludeAny(value string) FlowRSVPPathSessionAttributeLspTunnelRa { + + obj.obj.IncludeAny = &value + return obj +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel all of which must be present for a link to be acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// IncludeAll returns a string +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) IncludeAll() string { + + return *obj.obj.IncludeAll + +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel all of which must be present for a link to be acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// IncludeAll returns a string +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) HasIncludeAll() bool { + return obj.obj.IncludeAll != nil +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel all of which must be present for a link to be acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// SetIncludeAll sets the string value in the FlowRSVPPathSessionAttributeLspTunnelRa object +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) SetIncludeAll(value string) FlowRSVPPathSessionAttributeLspTunnelRa { + + obj.obj.IncludeAll = &value + return obj +} + +// The priority of the session with respect to taking resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. +// SetupPriority returns a uint32 +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) SetupPriority() uint32 { + + return *obj.obj.SetupPriority + +} + +// The priority of the session with respect to taking resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. +// SetupPriority returns a uint32 +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) HasSetupPriority() bool { + return obj.obj.SetupPriority != nil +} + +// The priority of the session with respect to taking resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. +// SetSetupPriority sets the uint32 value in the FlowRSVPPathSessionAttributeLspTunnelRa object +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) SetSetupPriority(value uint32) FlowRSVPPathSessionAttributeLspTunnelRa { + + obj.obj.SetupPriority = &value + return obj +} + +// The priority of the session with respect to holding resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. +// HoldingPriority returns a uint32 +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) HoldingPriority() uint32 { + + return *obj.obj.HoldingPriority + +} + +// The priority of the session with respect to holding resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. +// HoldingPriority returns a uint32 +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) HasHoldingPriority() bool { + return obj.obj.HoldingPriority != nil +} + +// The priority of the session with respect to holding resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. +// SetHoldingPriority sets the uint32 value in the FlowRSVPPathSessionAttributeLspTunnelRa object +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) SetHoldingPriority(value uint32) FlowRSVPPathSessionAttributeLspTunnelRa { + + obj.obj.HoldingPriority = &value + return obj +} + +// 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired +// Flags returns a FlowRSVPLspTunnelFlag +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) Flags() FlowRSVPLspTunnelFlag { + if obj.obj.Flags == nil { + obj.obj.Flags = NewFlowRSVPLspTunnelFlag().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &flowRSVPLspTunnelFlag{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired +// Flags returns a FlowRSVPLspTunnelFlag +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) HasFlags() bool { + return obj.obj.Flags != nil +} + +// 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired +// SetFlags sets the FlowRSVPLspTunnelFlag value in the FlowRSVPPathSessionAttributeLspTunnelRa object +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) SetFlags(value FlowRSVPLspTunnelFlag) FlowRSVPPathSessionAttributeLspTunnelRa { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// The length of the display string before padding, in bytes. +// NameLength returns a FlowRSVPSessionAttributeNameLength +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) NameLength() FlowRSVPSessionAttributeNameLength { + if obj.obj.NameLength == nil { + obj.obj.NameLength = NewFlowRSVPSessionAttributeNameLength().msg() + } + if obj.nameLengthHolder == nil { + obj.nameLengthHolder = &flowRSVPSessionAttributeNameLength{obj: obj.obj.NameLength} + } + return obj.nameLengthHolder +} + +// The length of the display string before padding, in bytes. +// NameLength returns a FlowRSVPSessionAttributeNameLength +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) HasNameLength() bool { + return obj.obj.NameLength != nil +} + +// The length of the display string before padding, in bytes. +// SetNameLength sets the FlowRSVPSessionAttributeNameLength value in the FlowRSVPPathSessionAttributeLspTunnelRa object +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) SetNameLength(value FlowRSVPSessionAttributeNameLength) FlowRSVPPathSessionAttributeLspTunnelRa { + + obj.nameLengthHolder = nil + obj.obj.NameLength = value.msg() + + return obj +} + +// A null padded string of characters. +// SessionName returns a string +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) SessionName() string { + + return *obj.obj.SessionName + +} + +// A null padded string of characters. +// SessionName returns a string +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) HasSessionName() bool { + return obj.obj.SessionName != nil +} + +// A null padded string of characters. +// SetSessionName sets the string value in the FlowRSVPPathSessionAttributeLspTunnelRa object +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) SetSessionName(value string) FlowRSVPPathSessionAttributeLspTunnelRa { + + obj.obj.SessionName = &value + return obj +} + +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.ExcludeAny != nil { + + if len(*obj.obj.ExcludeAny) < 0 || len(*obj.obj.ExcludeAny) > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of FlowRSVPPathSessionAttributeLspTunnelRa.ExcludeAny <= 8 but Got %d", + len(*obj.obj.ExcludeAny))) + } + + } + + if obj.obj.IncludeAny != nil { + + if len(*obj.obj.IncludeAny) < 0 || len(*obj.obj.IncludeAny) > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of FlowRSVPPathSessionAttributeLspTunnelRa.IncludeAny <= 8 but Got %d", + len(*obj.obj.IncludeAny))) + } + + } + + if obj.obj.IncludeAll != nil { + + if len(*obj.obj.IncludeAll) < 0 || len(*obj.obj.IncludeAll) > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of FlowRSVPPathSessionAttributeLspTunnelRa.IncludeAll <= 8 but Got %d", + len(*obj.obj.IncludeAll))) + } + + } + + if obj.obj.SetupPriority != nil { + + if *obj.obj.SetupPriority > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowRSVPPathSessionAttributeLspTunnelRa.SetupPriority <= 7 but Got %d", *obj.obj.SetupPriority)) + } + + } + + if obj.obj.HoldingPriority != nil { + + if *obj.obj.HoldingPriority > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowRSVPPathSessionAttributeLspTunnelRa.HoldingPriority <= 7 but Got %d", *obj.obj.HoldingPriority)) + } + + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.NameLength != nil { + + obj.NameLength().validateObj(vObj, set_default) + } + + if obj.obj.SessionName != nil { + + if len(*obj.obj.SessionName) < 0 || len(*obj.obj.SessionName) > 254 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of FlowRSVPPathSessionAttributeLspTunnelRa.SessionName <= 254 but Got %d", + len(*obj.obj.SessionName))) + } + + } + +} + +func (obj *flowRSVPPathSessionAttributeLspTunnelRa) setDefault() { + if obj.obj.ExcludeAny == nil { + obj.SetExcludeAny("00") + } + if obj.obj.IncludeAny == nil { + obj.SetIncludeAny("00") + } + if obj.obj.IncludeAll == nil { + obj.SetIncludeAll("00") + } + if obj.obj.SetupPriority == nil { + obj.SetSetupPriority(7) + } + if obj.obj.HoldingPriority == nil { + obj.SetHoldingPriority(7) + } + if obj.obj.SessionName == nil { + obj.SetSessionName("") + } + +} diff --git a/gosnappi/flow_rsvp_path_session_ext_tunnel_id.go b/gosnappi/flow_rsvp_path_session_ext_tunnel_id.go new file mode 100644 index 00000000..4f6283e8 --- /dev/null +++ b/gosnappi/flow_rsvp_path_session_ext_tunnel_id.go @@ -0,0 +1,452 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathSessionExtTunnelId ***** +type flowRSVPPathSessionExtTunnelId struct { + validation + obj *otg.FlowRSVPPathSessionExtTunnelId + marshaller marshalFlowRSVPPathSessionExtTunnelId + unMarshaller unMarshalFlowRSVPPathSessionExtTunnelId + asIntegerHolder PatternFlowRSVPPathSessionExtTunnelIdAsInteger + asIpv4Holder PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 +} + +func NewFlowRSVPPathSessionExtTunnelId() FlowRSVPPathSessionExtTunnelId { + obj := flowRSVPPathSessionExtTunnelId{obj: &otg.FlowRSVPPathSessionExtTunnelId{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathSessionExtTunnelId) msg() *otg.FlowRSVPPathSessionExtTunnelId { + return obj.obj +} + +func (obj *flowRSVPPathSessionExtTunnelId) setMsg(msg *otg.FlowRSVPPathSessionExtTunnelId) FlowRSVPPathSessionExtTunnelId { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathSessionExtTunnelId struct { + obj *flowRSVPPathSessionExtTunnelId +} + +type marshalFlowRSVPPathSessionExtTunnelId interface { + // ToProto marshals FlowRSVPPathSessionExtTunnelId to protobuf object *otg.FlowRSVPPathSessionExtTunnelId + ToProto() (*otg.FlowRSVPPathSessionExtTunnelId, error) + // ToPbText marshals FlowRSVPPathSessionExtTunnelId to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathSessionExtTunnelId to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathSessionExtTunnelId to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathSessionExtTunnelId struct { + obj *flowRSVPPathSessionExtTunnelId +} + +type unMarshalFlowRSVPPathSessionExtTunnelId interface { + // FromProto unmarshals FlowRSVPPathSessionExtTunnelId from protobuf object *otg.FlowRSVPPathSessionExtTunnelId + FromProto(msg *otg.FlowRSVPPathSessionExtTunnelId) (FlowRSVPPathSessionExtTunnelId, error) + // FromPbText unmarshals FlowRSVPPathSessionExtTunnelId from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathSessionExtTunnelId from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathSessionExtTunnelId from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathSessionExtTunnelId) Marshal() marshalFlowRSVPPathSessionExtTunnelId { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathSessionExtTunnelId{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathSessionExtTunnelId) Unmarshal() unMarshalFlowRSVPPathSessionExtTunnelId { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathSessionExtTunnelId{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathSessionExtTunnelId) ToProto() (*otg.FlowRSVPPathSessionExtTunnelId, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathSessionExtTunnelId) FromProto(msg *otg.FlowRSVPPathSessionExtTunnelId) (FlowRSVPPathSessionExtTunnelId, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathSessionExtTunnelId) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathSessionExtTunnelId) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathSessionExtTunnelId) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathSessionExtTunnelId) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathSessionExtTunnelId) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathSessionExtTunnelId) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathSessionExtTunnelId) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathSessionExtTunnelId) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathSessionExtTunnelId) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathSessionExtTunnelId) Clone() (FlowRSVPPathSessionExtTunnelId, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathSessionExtTunnelId() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathSessionExtTunnelId) setNil() { + obj.asIntegerHolder = nil + obj.asIpv4Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathSessionExtTunnelId is description is TBD +type FlowRSVPPathSessionExtTunnelId interface { + Validation + // msg marshals FlowRSVPPathSessionExtTunnelId to protobuf object *otg.FlowRSVPPathSessionExtTunnelId + // and doesn't set defaults + msg() *otg.FlowRSVPPathSessionExtTunnelId + // setMsg unmarshals FlowRSVPPathSessionExtTunnelId from protobuf object *otg.FlowRSVPPathSessionExtTunnelId + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathSessionExtTunnelId) FlowRSVPPathSessionExtTunnelId + // provides marshal interface + Marshal() marshalFlowRSVPPathSessionExtTunnelId + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathSessionExtTunnelId + // validate validates FlowRSVPPathSessionExtTunnelId + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathSessionExtTunnelId, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPPathSessionExtTunnelIdChoiceEnum, set in FlowRSVPPathSessionExtTunnelId + Choice() FlowRSVPPathSessionExtTunnelIdChoiceEnum + // setChoice assigns FlowRSVPPathSessionExtTunnelIdChoiceEnum provided by user to FlowRSVPPathSessionExtTunnelId + setChoice(value FlowRSVPPathSessionExtTunnelIdChoiceEnum) FlowRSVPPathSessionExtTunnelId + // HasChoice checks if Choice has been set in FlowRSVPPathSessionExtTunnelId + HasChoice() bool + // AsInteger returns PatternFlowRSVPPathSessionExtTunnelIdAsInteger, set in FlowRSVPPathSessionExtTunnelId. + // PatternFlowRSVPPathSessionExtTunnelIdAsInteger is tBD + AsInteger() PatternFlowRSVPPathSessionExtTunnelIdAsInteger + // SetAsInteger assigns PatternFlowRSVPPathSessionExtTunnelIdAsInteger provided by user to FlowRSVPPathSessionExtTunnelId. + // PatternFlowRSVPPathSessionExtTunnelIdAsInteger is tBD + SetAsInteger(value PatternFlowRSVPPathSessionExtTunnelIdAsInteger) FlowRSVPPathSessionExtTunnelId + // HasAsInteger checks if AsInteger has been set in FlowRSVPPathSessionExtTunnelId + HasAsInteger() bool + // AsIpv4 returns PatternFlowRSVPPathSessionExtTunnelIdAsIpv4, set in FlowRSVPPathSessionExtTunnelId. + // PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 is iPv4 address of the ingress endpoint for the tunnel. + AsIpv4() PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + // SetAsIpv4 assigns PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 provided by user to FlowRSVPPathSessionExtTunnelId. + // PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 is iPv4 address of the ingress endpoint for the tunnel. + SetAsIpv4(value PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) FlowRSVPPathSessionExtTunnelId + // HasAsIpv4 checks if AsIpv4 has been set in FlowRSVPPathSessionExtTunnelId + HasAsIpv4() bool + setNil() +} + +type FlowRSVPPathSessionExtTunnelIdChoiceEnum string + +// Enum of Choice on FlowRSVPPathSessionExtTunnelId +var FlowRSVPPathSessionExtTunnelIdChoice = struct { + AS_INTEGER FlowRSVPPathSessionExtTunnelIdChoiceEnum + AS_IPV4 FlowRSVPPathSessionExtTunnelIdChoiceEnum +}{ + AS_INTEGER: FlowRSVPPathSessionExtTunnelIdChoiceEnum("as_integer"), + AS_IPV4: FlowRSVPPathSessionExtTunnelIdChoiceEnum("as_ipv4"), +} + +func (obj *flowRSVPPathSessionExtTunnelId) Choice() FlowRSVPPathSessionExtTunnelIdChoiceEnum { + return FlowRSVPPathSessionExtTunnelIdChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// 32 bit integer or IPv4 address. +// Choice returns a string +func (obj *flowRSVPPathSessionExtTunnelId) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPPathSessionExtTunnelId) setChoice(value FlowRSVPPathSessionExtTunnelIdChoiceEnum) FlowRSVPPathSessionExtTunnelId { + intValue, ok := otg.FlowRSVPPathSessionExtTunnelId_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPPathSessionExtTunnelIdChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPPathSessionExtTunnelId_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.AsIpv4 = nil + obj.asIpv4Holder = nil + obj.obj.AsInteger = nil + obj.asIntegerHolder = nil + + if value == FlowRSVPPathSessionExtTunnelIdChoice.AS_INTEGER { + obj.obj.AsInteger = NewPatternFlowRSVPPathSessionExtTunnelIdAsInteger().msg() + } + + if value == FlowRSVPPathSessionExtTunnelIdChoice.AS_IPV4 { + obj.obj.AsIpv4 = NewPatternFlowRSVPPathSessionExtTunnelIdAsIpv4().msg() + } + + return obj +} + +// description is TBD +// AsInteger returns a PatternFlowRSVPPathSessionExtTunnelIdAsInteger +func (obj *flowRSVPPathSessionExtTunnelId) AsInteger() PatternFlowRSVPPathSessionExtTunnelIdAsInteger { + if obj.obj.AsInteger == nil { + obj.setChoice(FlowRSVPPathSessionExtTunnelIdChoice.AS_INTEGER) + } + if obj.asIntegerHolder == nil { + obj.asIntegerHolder = &patternFlowRSVPPathSessionExtTunnelIdAsInteger{obj: obj.obj.AsInteger} + } + return obj.asIntegerHolder +} + +// description is TBD +// AsInteger returns a PatternFlowRSVPPathSessionExtTunnelIdAsInteger +func (obj *flowRSVPPathSessionExtTunnelId) HasAsInteger() bool { + return obj.obj.AsInteger != nil +} + +// description is TBD +// SetAsInteger sets the PatternFlowRSVPPathSessionExtTunnelIdAsInteger value in the FlowRSVPPathSessionExtTunnelId object +func (obj *flowRSVPPathSessionExtTunnelId) SetAsInteger(value PatternFlowRSVPPathSessionExtTunnelIdAsInteger) FlowRSVPPathSessionExtTunnelId { + obj.setChoice(FlowRSVPPathSessionExtTunnelIdChoice.AS_INTEGER) + obj.asIntegerHolder = nil + obj.obj.AsInteger = value.msg() + + return obj +} + +// description is TBD +// AsIpv4 returns a PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 +func (obj *flowRSVPPathSessionExtTunnelId) AsIpv4() PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 { + if obj.obj.AsIpv4 == nil { + obj.setChoice(FlowRSVPPathSessionExtTunnelIdChoice.AS_IPV4) + } + if obj.asIpv4Holder == nil { + obj.asIpv4Holder = &patternFlowRSVPPathSessionExtTunnelIdAsIpv4{obj: obj.obj.AsIpv4} + } + return obj.asIpv4Holder +} + +// description is TBD +// AsIpv4 returns a PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 +func (obj *flowRSVPPathSessionExtTunnelId) HasAsIpv4() bool { + return obj.obj.AsIpv4 != nil +} + +// description is TBD +// SetAsIpv4 sets the PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 value in the FlowRSVPPathSessionExtTunnelId object +func (obj *flowRSVPPathSessionExtTunnelId) SetAsIpv4(value PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) FlowRSVPPathSessionExtTunnelId { + obj.setChoice(FlowRSVPPathSessionExtTunnelIdChoice.AS_IPV4) + obj.asIpv4Holder = nil + obj.obj.AsIpv4 = value.msg() + + return obj +} + +func (obj *flowRSVPPathSessionExtTunnelId) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.AsInteger != nil { + + obj.AsInteger().validateObj(vObj, set_default) + } + + if obj.obj.AsIpv4 != nil { + + obj.AsIpv4().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathSessionExtTunnelId) setDefault() { + var choices_set int = 0 + var choice FlowRSVPPathSessionExtTunnelIdChoiceEnum + + if obj.obj.AsInteger != nil { + choices_set += 1 + choice = FlowRSVPPathSessionExtTunnelIdChoice.AS_INTEGER + } + + if obj.obj.AsIpv4 != nil { + choices_set += 1 + choice = FlowRSVPPathSessionExtTunnelIdChoice.AS_IPV4 + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPPathSessionExtTunnelIdChoice.AS_INTEGER) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPPathSessionExtTunnelId") + } + } else { + intVal := otg.FlowRSVPPathSessionExtTunnelId_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPPathSessionExtTunnelId_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_path_session_lsp_tunnel_ipv4.go b/gosnappi/flow_rsvp_path_session_lsp_tunnel_ipv4.go new file mode 100644 index 00000000..22321254 --- /dev/null +++ b/gosnappi/flow_rsvp_path_session_lsp_tunnel_ipv4.go @@ -0,0 +1,457 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathSessionLspTunnelIpv4 ***** +type flowRSVPPathSessionLspTunnelIpv4 struct { + validation + obj *otg.FlowRSVPPathSessionLspTunnelIpv4 + marshaller marshalFlowRSVPPathSessionLspTunnelIpv4 + unMarshaller unMarshalFlowRSVPPathSessionLspTunnelIpv4 + ipv4TunnelEndPointAddressHolder PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + reservedHolder PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + tunnelIdHolder PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + extendedTunnelIdHolder FlowRSVPPathSessionExtTunnelId +} + +func NewFlowRSVPPathSessionLspTunnelIpv4() FlowRSVPPathSessionLspTunnelIpv4 { + obj := flowRSVPPathSessionLspTunnelIpv4{obj: &otg.FlowRSVPPathSessionLspTunnelIpv4{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathSessionLspTunnelIpv4) msg() *otg.FlowRSVPPathSessionLspTunnelIpv4 { + return obj.obj +} + +func (obj *flowRSVPPathSessionLspTunnelIpv4) setMsg(msg *otg.FlowRSVPPathSessionLspTunnelIpv4) FlowRSVPPathSessionLspTunnelIpv4 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathSessionLspTunnelIpv4 struct { + obj *flowRSVPPathSessionLspTunnelIpv4 +} + +type marshalFlowRSVPPathSessionLspTunnelIpv4 interface { + // ToProto marshals FlowRSVPPathSessionLspTunnelIpv4 to protobuf object *otg.FlowRSVPPathSessionLspTunnelIpv4 + ToProto() (*otg.FlowRSVPPathSessionLspTunnelIpv4, error) + // ToPbText marshals FlowRSVPPathSessionLspTunnelIpv4 to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathSessionLspTunnelIpv4 to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathSessionLspTunnelIpv4 to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathSessionLspTunnelIpv4 struct { + obj *flowRSVPPathSessionLspTunnelIpv4 +} + +type unMarshalFlowRSVPPathSessionLspTunnelIpv4 interface { + // FromProto unmarshals FlowRSVPPathSessionLspTunnelIpv4 from protobuf object *otg.FlowRSVPPathSessionLspTunnelIpv4 + FromProto(msg *otg.FlowRSVPPathSessionLspTunnelIpv4) (FlowRSVPPathSessionLspTunnelIpv4, error) + // FromPbText unmarshals FlowRSVPPathSessionLspTunnelIpv4 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathSessionLspTunnelIpv4 from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathSessionLspTunnelIpv4 from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathSessionLspTunnelIpv4) Marshal() marshalFlowRSVPPathSessionLspTunnelIpv4 { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathSessionLspTunnelIpv4{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathSessionLspTunnelIpv4) Unmarshal() unMarshalFlowRSVPPathSessionLspTunnelIpv4 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathSessionLspTunnelIpv4{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathSessionLspTunnelIpv4) ToProto() (*otg.FlowRSVPPathSessionLspTunnelIpv4, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathSessionLspTunnelIpv4) FromProto(msg *otg.FlowRSVPPathSessionLspTunnelIpv4) (FlowRSVPPathSessionLspTunnelIpv4, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathSessionLspTunnelIpv4) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathSessionLspTunnelIpv4) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathSessionLspTunnelIpv4) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathSessionLspTunnelIpv4) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathSessionLspTunnelIpv4) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathSessionLspTunnelIpv4) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathSessionLspTunnelIpv4) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathSessionLspTunnelIpv4) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathSessionLspTunnelIpv4) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathSessionLspTunnelIpv4) Clone() (FlowRSVPPathSessionLspTunnelIpv4, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathSessionLspTunnelIpv4() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathSessionLspTunnelIpv4) setNil() { + obj.ipv4TunnelEndPointAddressHolder = nil + obj.reservedHolder = nil + obj.tunnelIdHolder = nil + obj.extendedTunnelIdHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathSessionLspTunnelIpv4 is class = SESSION, LSP_TUNNEL_IPv4 C-Type = 7. +type FlowRSVPPathSessionLspTunnelIpv4 interface { + Validation + // msg marshals FlowRSVPPathSessionLspTunnelIpv4 to protobuf object *otg.FlowRSVPPathSessionLspTunnelIpv4 + // and doesn't set defaults + msg() *otg.FlowRSVPPathSessionLspTunnelIpv4 + // setMsg unmarshals FlowRSVPPathSessionLspTunnelIpv4 from protobuf object *otg.FlowRSVPPathSessionLspTunnelIpv4 + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathSessionLspTunnelIpv4) FlowRSVPPathSessionLspTunnelIpv4 + // provides marshal interface + Marshal() marshalFlowRSVPPathSessionLspTunnelIpv4 + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathSessionLspTunnelIpv4 + // validate validates FlowRSVPPathSessionLspTunnelIpv4 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathSessionLspTunnelIpv4, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv4TunnelEndPointAddress returns PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress, set in FlowRSVPPathSessionLspTunnelIpv4. + // PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress is iPv4 address of the egress node for the tunnel. + Ipv4TunnelEndPointAddress() PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + // SetIpv4TunnelEndPointAddress assigns PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress provided by user to FlowRSVPPathSessionLspTunnelIpv4. + // PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress is iPv4 address of the egress node for the tunnel. + SetIpv4TunnelEndPointAddress(value PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) FlowRSVPPathSessionLspTunnelIpv4 + // HasIpv4TunnelEndPointAddress checks if Ipv4TunnelEndPointAddress has been set in FlowRSVPPathSessionLspTunnelIpv4 + HasIpv4TunnelEndPointAddress() bool + // Reserved returns PatternFlowRSVPPathSessionLspTunnelIpv4Reserved, set in FlowRSVPPathSessionLspTunnelIpv4. + // PatternFlowRSVPPathSessionLspTunnelIpv4Reserved is reserved field, MUST be zero. + Reserved() PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + // SetReserved assigns PatternFlowRSVPPathSessionLspTunnelIpv4Reserved provided by user to FlowRSVPPathSessionLspTunnelIpv4. + // PatternFlowRSVPPathSessionLspTunnelIpv4Reserved is reserved field, MUST be zero. + SetReserved(value PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) FlowRSVPPathSessionLspTunnelIpv4 + // HasReserved checks if Reserved has been set in FlowRSVPPathSessionLspTunnelIpv4 + HasReserved() bool + // TunnelId returns PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId, set in FlowRSVPPathSessionLspTunnelIpv4. + // PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId is a 16-bit identifier used in the SESSION that remains constant over the life of the tunnel. + TunnelId() PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + // SetTunnelId assigns PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId provided by user to FlowRSVPPathSessionLspTunnelIpv4. + // PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId is a 16-bit identifier used in the SESSION that remains constant over the life of the tunnel. + SetTunnelId(value PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) FlowRSVPPathSessionLspTunnelIpv4 + // HasTunnelId checks if TunnelId has been set in FlowRSVPPathSessionLspTunnelIpv4 + HasTunnelId() bool + // ExtendedTunnelId returns FlowRSVPPathSessionExtTunnelId, set in FlowRSVPPathSessionLspTunnelIpv4. + // FlowRSVPPathSessionExtTunnelId is description is TBD + ExtendedTunnelId() FlowRSVPPathSessionExtTunnelId + // SetExtendedTunnelId assigns FlowRSVPPathSessionExtTunnelId provided by user to FlowRSVPPathSessionLspTunnelIpv4. + // FlowRSVPPathSessionExtTunnelId is description is TBD + SetExtendedTunnelId(value FlowRSVPPathSessionExtTunnelId) FlowRSVPPathSessionLspTunnelIpv4 + // HasExtendedTunnelId checks if ExtendedTunnelId has been set in FlowRSVPPathSessionLspTunnelIpv4 + HasExtendedTunnelId() bool + setNil() +} + +// description is TBD +// Ipv4TunnelEndPointAddress returns a PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress +func (obj *flowRSVPPathSessionLspTunnelIpv4) Ipv4TunnelEndPointAddress() PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress { + if obj.obj.Ipv4TunnelEndPointAddress == nil { + obj.obj.Ipv4TunnelEndPointAddress = NewPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress().msg() + } + if obj.ipv4TunnelEndPointAddressHolder == nil { + obj.ipv4TunnelEndPointAddressHolder = &patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress{obj: obj.obj.Ipv4TunnelEndPointAddress} + } + return obj.ipv4TunnelEndPointAddressHolder +} + +// description is TBD +// Ipv4TunnelEndPointAddress returns a PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress +func (obj *flowRSVPPathSessionLspTunnelIpv4) HasIpv4TunnelEndPointAddress() bool { + return obj.obj.Ipv4TunnelEndPointAddress != nil +} + +// description is TBD +// SetIpv4TunnelEndPointAddress sets the PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress value in the FlowRSVPPathSessionLspTunnelIpv4 object +func (obj *flowRSVPPathSessionLspTunnelIpv4) SetIpv4TunnelEndPointAddress(value PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) FlowRSVPPathSessionLspTunnelIpv4 { + + obj.ipv4TunnelEndPointAddressHolder = nil + obj.obj.Ipv4TunnelEndPointAddress = value.msg() + + return obj +} + +// description is TBD +// Reserved returns a PatternFlowRSVPPathSessionLspTunnelIpv4Reserved +func (obj *flowRSVPPathSessionLspTunnelIpv4) Reserved() PatternFlowRSVPPathSessionLspTunnelIpv4Reserved { + if obj.obj.Reserved == nil { + obj.obj.Reserved = NewPatternFlowRSVPPathSessionLspTunnelIpv4Reserved().msg() + } + if obj.reservedHolder == nil { + obj.reservedHolder = &patternFlowRSVPPathSessionLspTunnelIpv4Reserved{obj: obj.obj.Reserved} + } + return obj.reservedHolder +} + +// description is TBD +// Reserved returns a PatternFlowRSVPPathSessionLspTunnelIpv4Reserved +func (obj *flowRSVPPathSessionLspTunnelIpv4) HasReserved() bool { + return obj.obj.Reserved != nil +} + +// description is TBD +// SetReserved sets the PatternFlowRSVPPathSessionLspTunnelIpv4Reserved value in the FlowRSVPPathSessionLspTunnelIpv4 object +func (obj *flowRSVPPathSessionLspTunnelIpv4) SetReserved(value PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) FlowRSVPPathSessionLspTunnelIpv4 { + + obj.reservedHolder = nil + obj.obj.Reserved = value.msg() + + return obj +} + +// description is TBD +// TunnelId returns a PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId +func (obj *flowRSVPPathSessionLspTunnelIpv4) TunnelId() PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId { + if obj.obj.TunnelId == nil { + obj.obj.TunnelId = NewPatternFlowRSVPPathSessionLspTunnelIpv4TunnelId().msg() + } + if obj.tunnelIdHolder == nil { + obj.tunnelIdHolder = &patternFlowRSVPPathSessionLspTunnelIpv4TunnelId{obj: obj.obj.TunnelId} + } + return obj.tunnelIdHolder +} + +// description is TBD +// TunnelId returns a PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId +func (obj *flowRSVPPathSessionLspTunnelIpv4) HasTunnelId() bool { + return obj.obj.TunnelId != nil +} + +// description is TBD +// SetTunnelId sets the PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId value in the FlowRSVPPathSessionLspTunnelIpv4 object +func (obj *flowRSVPPathSessionLspTunnelIpv4) SetTunnelId(value PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) FlowRSVPPathSessionLspTunnelIpv4 { + + obj.tunnelIdHolder = nil + obj.obj.TunnelId = value.msg() + + return obj +} + +// A 32-bit identifier used in the SESSION that remains constant over the life of the tunnel. Normally set to all zeros. Ingress nodes that wish to narrow the scope of a SESSION to the ingress-egress pair may place their IPv4 address here as a globally unique identifier. +// ExtendedTunnelId returns a FlowRSVPPathSessionExtTunnelId +func (obj *flowRSVPPathSessionLspTunnelIpv4) ExtendedTunnelId() FlowRSVPPathSessionExtTunnelId { + if obj.obj.ExtendedTunnelId == nil { + obj.obj.ExtendedTunnelId = NewFlowRSVPPathSessionExtTunnelId().msg() + } + if obj.extendedTunnelIdHolder == nil { + obj.extendedTunnelIdHolder = &flowRSVPPathSessionExtTunnelId{obj: obj.obj.ExtendedTunnelId} + } + return obj.extendedTunnelIdHolder +} + +// A 32-bit identifier used in the SESSION that remains constant over the life of the tunnel. Normally set to all zeros. Ingress nodes that wish to narrow the scope of a SESSION to the ingress-egress pair may place their IPv4 address here as a globally unique identifier. +// ExtendedTunnelId returns a FlowRSVPPathSessionExtTunnelId +func (obj *flowRSVPPathSessionLspTunnelIpv4) HasExtendedTunnelId() bool { + return obj.obj.ExtendedTunnelId != nil +} + +// A 32-bit identifier used in the SESSION that remains constant over the life of the tunnel. Normally set to all zeros. Ingress nodes that wish to narrow the scope of a SESSION to the ingress-egress pair may place their IPv4 address here as a globally unique identifier. +// SetExtendedTunnelId sets the FlowRSVPPathSessionExtTunnelId value in the FlowRSVPPathSessionLspTunnelIpv4 object +func (obj *flowRSVPPathSessionLspTunnelIpv4) SetExtendedTunnelId(value FlowRSVPPathSessionExtTunnelId) FlowRSVPPathSessionLspTunnelIpv4 { + + obj.extendedTunnelIdHolder = nil + obj.obj.ExtendedTunnelId = value.msg() + + return obj +} + +func (obj *flowRSVPPathSessionLspTunnelIpv4) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv4TunnelEndPointAddress != nil { + + obj.Ipv4TunnelEndPointAddress().validateObj(vObj, set_default) + } + + if obj.obj.Reserved != nil { + + obj.Reserved().validateObj(vObj, set_default) + } + + if obj.obj.TunnelId != nil { + + obj.TunnelId().validateObj(vObj, set_default) + } + + if obj.obj.ExtendedTunnelId != nil { + + obj.ExtendedTunnelId().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathSessionLspTunnelIpv4) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_path_time_values_type1.go b/gosnappi/flow_rsvp_path_time_values_type1.go new file mode 100644 index 00000000..217fac32 --- /dev/null +++ b/gosnappi/flow_rsvp_path_time_values_type1.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPPathTimeValuesType1 ***** +type flowRSVPPathTimeValuesType1 struct { + validation + obj *otg.FlowRSVPPathTimeValuesType1 + marshaller marshalFlowRSVPPathTimeValuesType1 + unMarshaller unMarshalFlowRSVPPathTimeValuesType1 + refreshPeriodRHolder PatternFlowRSVPPathTimeValuesType1RefreshPeriodR +} + +func NewFlowRSVPPathTimeValuesType1() FlowRSVPPathTimeValuesType1 { + obj := flowRSVPPathTimeValuesType1{obj: &otg.FlowRSVPPathTimeValuesType1{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPPathTimeValuesType1) msg() *otg.FlowRSVPPathTimeValuesType1 { + return obj.obj +} + +func (obj *flowRSVPPathTimeValuesType1) setMsg(msg *otg.FlowRSVPPathTimeValuesType1) FlowRSVPPathTimeValuesType1 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPPathTimeValuesType1 struct { + obj *flowRSVPPathTimeValuesType1 +} + +type marshalFlowRSVPPathTimeValuesType1 interface { + // ToProto marshals FlowRSVPPathTimeValuesType1 to protobuf object *otg.FlowRSVPPathTimeValuesType1 + ToProto() (*otg.FlowRSVPPathTimeValuesType1, error) + // ToPbText marshals FlowRSVPPathTimeValuesType1 to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPPathTimeValuesType1 to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPPathTimeValuesType1 to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPPathTimeValuesType1 struct { + obj *flowRSVPPathTimeValuesType1 +} + +type unMarshalFlowRSVPPathTimeValuesType1 interface { + // FromProto unmarshals FlowRSVPPathTimeValuesType1 from protobuf object *otg.FlowRSVPPathTimeValuesType1 + FromProto(msg *otg.FlowRSVPPathTimeValuesType1) (FlowRSVPPathTimeValuesType1, error) + // FromPbText unmarshals FlowRSVPPathTimeValuesType1 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPPathTimeValuesType1 from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPPathTimeValuesType1 from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPPathTimeValuesType1) Marshal() marshalFlowRSVPPathTimeValuesType1 { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPPathTimeValuesType1{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPPathTimeValuesType1) Unmarshal() unMarshalFlowRSVPPathTimeValuesType1 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPPathTimeValuesType1{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPPathTimeValuesType1) ToProto() (*otg.FlowRSVPPathTimeValuesType1, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPPathTimeValuesType1) FromProto(msg *otg.FlowRSVPPathTimeValuesType1) (FlowRSVPPathTimeValuesType1, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPPathTimeValuesType1) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPPathTimeValuesType1) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPPathTimeValuesType1) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathTimeValuesType1) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPPathTimeValuesType1) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPPathTimeValuesType1) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPPathTimeValuesType1) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPPathTimeValuesType1) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPPathTimeValuesType1) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPPathTimeValuesType1) Clone() (FlowRSVPPathTimeValuesType1, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPPathTimeValuesType1() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPPathTimeValuesType1) setNil() { + obj.refreshPeriodRHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPPathTimeValuesType1 is tIME_VALUES Object: Class = 5, C-Type = 1 +type FlowRSVPPathTimeValuesType1 interface { + Validation + // msg marshals FlowRSVPPathTimeValuesType1 to protobuf object *otg.FlowRSVPPathTimeValuesType1 + // and doesn't set defaults + msg() *otg.FlowRSVPPathTimeValuesType1 + // setMsg unmarshals FlowRSVPPathTimeValuesType1 from protobuf object *otg.FlowRSVPPathTimeValuesType1 + // and doesn't set defaults + setMsg(*otg.FlowRSVPPathTimeValuesType1) FlowRSVPPathTimeValuesType1 + // provides marshal interface + Marshal() marshalFlowRSVPPathTimeValuesType1 + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPPathTimeValuesType1 + // validate validates FlowRSVPPathTimeValuesType1 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPPathTimeValuesType1, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RefreshPeriodR returns PatternFlowRSVPPathTimeValuesType1RefreshPeriodR, set in FlowRSVPPathTimeValuesType1. + // PatternFlowRSVPPathTimeValuesType1RefreshPeriodR is the refresh timeout period R used to generate this message;in milliseconds. + RefreshPeriodR() PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + // SetRefreshPeriodR assigns PatternFlowRSVPPathTimeValuesType1RefreshPeriodR provided by user to FlowRSVPPathTimeValuesType1. + // PatternFlowRSVPPathTimeValuesType1RefreshPeriodR is the refresh timeout period R used to generate this message;in milliseconds. + SetRefreshPeriodR(value PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) FlowRSVPPathTimeValuesType1 + // HasRefreshPeriodR checks if RefreshPeriodR has been set in FlowRSVPPathTimeValuesType1 + HasRefreshPeriodR() bool + setNil() +} + +// description is TBD +// RefreshPeriodR returns a PatternFlowRSVPPathTimeValuesType1RefreshPeriodR +func (obj *flowRSVPPathTimeValuesType1) RefreshPeriodR() PatternFlowRSVPPathTimeValuesType1RefreshPeriodR { + if obj.obj.RefreshPeriodR == nil { + obj.obj.RefreshPeriodR = NewPatternFlowRSVPPathTimeValuesType1RefreshPeriodR().msg() + } + if obj.refreshPeriodRHolder == nil { + obj.refreshPeriodRHolder = &patternFlowRSVPPathTimeValuesType1RefreshPeriodR{obj: obj.obj.RefreshPeriodR} + } + return obj.refreshPeriodRHolder +} + +// description is TBD +// RefreshPeriodR returns a PatternFlowRSVPPathTimeValuesType1RefreshPeriodR +func (obj *flowRSVPPathTimeValuesType1) HasRefreshPeriodR() bool { + return obj.obj.RefreshPeriodR != nil +} + +// description is TBD +// SetRefreshPeriodR sets the PatternFlowRSVPPathTimeValuesType1RefreshPeriodR value in the FlowRSVPPathTimeValuesType1 object +func (obj *flowRSVPPathTimeValuesType1) SetRefreshPeriodR(value PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) FlowRSVPPathTimeValuesType1 { + + obj.refreshPeriodRHolder = nil + obj.obj.RefreshPeriodR = value.msg() + + return obj +} + +func (obj *flowRSVPPathTimeValuesType1) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RefreshPeriodR != nil { + + obj.RefreshPeriodR().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPPathTimeValuesType1) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_record_route_i_pv4_flag.go b/gosnappi/flow_rsvp_record_route_i_pv4_flag.go new file mode 100644 index 00000000..8ec9fad0 --- /dev/null +++ b/gosnappi/flow_rsvp_record_route_i_pv4_flag.go @@ -0,0 +1,351 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPRecordRouteIPv4Flag ***** +type flowRSVPRecordRouteIPv4Flag struct { + validation + obj *otg.FlowRSVPRecordRouteIPv4Flag + marshaller marshalFlowRSVPRecordRouteIPv4Flag + unMarshaller unMarshalFlowRSVPRecordRouteIPv4Flag +} + +func NewFlowRSVPRecordRouteIPv4Flag() FlowRSVPRecordRouteIPv4Flag { + obj := flowRSVPRecordRouteIPv4Flag{obj: &otg.FlowRSVPRecordRouteIPv4Flag{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPRecordRouteIPv4Flag) msg() *otg.FlowRSVPRecordRouteIPv4Flag { + return obj.obj +} + +func (obj *flowRSVPRecordRouteIPv4Flag) setMsg(msg *otg.FlowRSVPRecordRouteIPv4Flag) FlowRSVPRecordRouteIPv4Flag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPRecordRouteIPv4Flag struct { + obj *flowRSVPRecordRouteIPv4Flag +} + +type marshalFlowRSVPRecordRouteIPv4Flag interface { + // ToProto marshals FlowRSVPRecordRouteIPv4Flag to protobuf object *otg.FlowRSVPRecordRouteIPv4Flag + ToProto() (*otg.FlowRSVPRecordRouteIPv4Flag, error) + // ToPbText marshals FlowRSVPRecordRouteIPv4Flag to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPRecordRouteIPv4Flag to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPRecordRouteIPv4Flag to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPRecordRouteIPv4Flag struct { + obj *flowRSVPRecordRouteIPv4Flag +} + +type unMarshalFlowRSVPRecordRouteIPv4Flag interface { + // FromProto unmarshals FlowRSVPRecordRouteIPv4Flag from protobuf object *otg.FlowRSVPRecordRouteIPv4Flag + FromProto(msg *otg.FlowRSVPRecordRouteIPv4Flag) (FlowRSVPRecordRouteIPv4Flag, error) + // FromPbText unmarshals FlowRSVPRecordRouteIPv4Flag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPRecordRouteIPv4Flag from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPRecordRouteIPv4Flag from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPRecordRouteIPv4Flag) Marshal() marshalFlowRSVPRecordRouteIPv4Flag { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPRecordRouteIPv4Flag{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPRecordRouteIPv4Flag) Unmarshal() unMarshalFlowRSVPRecordRouteIPv4Flag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPRecordRouteIPv4Flag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPRecordRouteIPv4Flag) ToProto() (*otg.FlowRSVPRecordRouteIPv4Flag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPRecordRouteIPv4Flag) FromProto(msg *otg.FlowRSVPRecordRouteIPv4Flag) (FlowRSVPRecordRouteIPv4Flag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPRecordRouteIPv4Flag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPRecordRouteIPv4Flag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPRecordRouteIPv4Flag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPRecordRouteIPv4Flag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPRecordRouteIPv4Flag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPRecordRouteIPv4Flag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPRecordRouteIPv4Flag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPRecordRouteIPv4Flag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPRecordRouteIPv4Flag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPRecordRouteIPv4Flag) Clone() (FlowRSVPRecordRouteIPv4Flag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPRecordRouteIPv4Flag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowRSVPRecordRouteIPv4Flag is description is TBD +type FlowRSVPRecordRouteIPv4Flag interface { + Validation + // msg marshals FlowRSVPRecordRouteIPv4Flag to protobuf object *otg.FlowRSVPRecordRouteIPv4Flag + // and doesn't set defaults + msg() *otg.FlowRSVPRecordRouteIPv4Flag + // setMsg unmarshals FlowRSVPRecordRouteIPv4Flag from protobuf object *otg.FlowRSVPRecordRouteIPv4Flag + // and doesn't set defaults + setMsg(*otg.FlowRSVPRecordRouteIPv4Flag) FlowRSVPRecordRouteIPv4Flag + // provides marshal interface + Marshal() marshalFlowRSVPRecordRouteIPv4Flag + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPRecordRouteIPv4Flag + // validate validates FlowRSVPRecordRouteIPv4Flag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPRecordRouteIPv4Flag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPRecordRouteIPv4FlagChoiceEnum, set in FlowRSVPRecordRouteIPv4Flag + Choice() FlowRSVPRecordRouteIPv4FlagChoiceEnum + // setChoice assigns FlowRSVPRecordRouteIPv4FlagChoiceEnum provided by user to FlowRSVPRecordRouteIPv4Flag + setChoice(value FlowRSVPRecordRouteIPv4FlagChoiceEnum) FlowRSVPRecordRouteIPv4Flag + // HasChoice checks if Choice has been set in FlowRSVPRecordRouteIPv4Flag + HasChoice() bool + // getter for LocalProtectionAvailable to set choice. + LocalProtectionAvailable() + // getter for LocalProtectionInUse to set choice. + LocalProtectionInUse() +} + +type FlowRSVPRecordRouteIPv4FlagChoiceEnum string + +// Enum of Choice on FlowRSVPRecordRouteIPv4Flag +var FlowRSVPRecordRouteIPv4FlagChoice = struct { + LOCAL_PROTECTION_AVAILABLE FlowRSVPRecordRouteIPv4FlagChoiceEnum + LOCAL_PROTECTION_IN_USE FlowRSVPRecordRouteIPv4FlagChoiceEnum +}{ + LOCAL_PROTECTION_AVAILABLE: FlowRSVPRecordRouteIPv4FlagChoiceEnum("local_protection_available"), + LOCAL_PROTECTION_IN_USE: FlowRSVPRecordRouteIPv4FlagChoiceEnum("local_protection_in_use"), +} + +func (obj *flowRSVPRecordRouteIPv4Flag) Choice() FlowRSVPRecordRouteIPv4FlagChoiceEnum { + return FlowRSVPRecordRouteIPv4FlagChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for LocalProtectionAvailable to set choice +func (obj *flowRSVPRecordRouteIPv4Flag) LocalProtectionAvailable() { + obj.setChoice(FlowRSVPRecordRouteIPv4FlagChoice.LOCAL_PROTECTION_AVAILABLE) +} + +// getter for LocalProtectionInUse to set choice +func (obj *flowRSVPRecordRouteIPv4Flag) LocalProtectionInUse() { + obj.setChoice(FlowRSVPRecordRouteIPv4FlagChoice.LOCAL_PROTECTION_IN_USE) +} + +// description is TBD +// Choice returns a string +func (obj *flowRSVPRecordRouteIPv4Flag) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPRecordRouteIPv4Flag) setChoice(value FlowRSVPRecordRouteIPv4FlagChoiceEnum) FlowRSVPRecordRouteIPv4Flag { + intValue, ok := otg.FlowRSVPRecordRouteIPv4Flag_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPRecordRouteIPv4FlagChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPRecordRouteIPv4Flag_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + + return obj +} + +func (obj *flowRSVPRecordRouteIPv4Flag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *flowRSVPRecordRouteIPv4Flag) setDefault() { + var choices_set int = 0 + var choice FlowRSVPRecordRouteIPv4FlagChoiceEnum + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPRecordRouteIPv4FlagChoice.LOCAL_PROTECTION_AVAILABLE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPRecordRouteIPv4Flag") + } + } else { + intVal := otg.FlowRSVPRecordRouteIPv4Flag_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPRecordRouteIPv4Flag_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_route_record_length.go b/gosnappi/flow_rsvp_route_record_length.go new file mode 100644 index 00000000..d7a05279 --- /dev/null +++ b/gosnappi/flow_rsvp_route_record_length.go @@ -0,0 +1,423 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPRouteRecordLength ***** +type flowRSVPRouteRecordLength struct { + validation + obj *otg.FlowRSVPRouteRecordLength + marshaller marshalFlowRSVPRouteRecordLength + unMarshaller unMarshalFlowRSVPRouteRecordLength +} + +func NewFlowRSVPRouteRecordLength() FlowRSVPRouteRecordLength { + obj := flowRSVPRouteRecordLength{obj: &otg.FlowRSVPRouteRecordLength{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPRouteRecordLength) msg() *otg.FlowRSVPRouteRecordLength { + return obj.obj +} + +func (obj *flowRSVPRouteRecordLength) setMsg(msg *otg.FlowRSVPRouteRecordLength) FlowRSVPRouteRecordLength { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPRouteRecordLength struct { + obj *flowRSVPRouteRecordLength +} + +type marshalFlowRSVPRouteRecordLength interface { + // ToProto marshals FlowRSVPRouteRecordLength to protobuf object *otg.FlowRSVPRouteRecordLength + ToProto() (*otg.FlowRSVPRouteRecordLength, error) + // ToPbText marshals FlowRSVPRouteRecordLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPRouteRecordLength to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPRouteRecordLength to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPRouteRecordLength struct { + obj *flowRSVPRouteRecordLength +} + +type unMarshalFlowRSVPRouteRecordLength interface { + // FromProto unmarshals FlowRSVPRouteRecordLength from protobuf object *otg.FlowRSVPRouteRecordLength + FromProto(msg *otg.FlowRSVPRouteRecordLength) (FlowRSVPRouteRecordLength, error) + // FromPbText unmarshals FlowRSVPRouteRecordLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPRouteRecordLength from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPRouteRecordLength from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPRouteRecordLength) Marshal() marshalFlowRSVPRouteRecordLength { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPRouteRecordLength{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPRouteRecordLength) Unmarshal() unMarshalFlowRSVPRouteRecordLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPRouteRecordLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPRouteRecordLength) ToProto() (*otg.FlowRSVPRouteRecordLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPRouteRecordLength) FromProto(msg *otg.FlowRSVPRouteRecordLength) (FlowRSVPRouteRecordLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPRouteRecordLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPRouteRecordLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPRouteRecordLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPRouteRecordLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPRouteRecordLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPRouteRecordLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPRouteRecordLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPRouteRecordLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPRouteRecordLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPRouteRecordLength) Clone() (FlowRSVPRouteRecordLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPRouteRecordLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowRSVPRouteRecordLength is description is TBD +type FlowRSVPRouteRecordLength interface { + Validation + // msg marshals FlowRSVPRouteRecordLength to protobuf object *otg.FlowRSVPRouteRecordLength + // and doesn't set defaults + msg() *otg.FlowRSVPRouteRecordLength + // setMsg unmarshals FlowRSVPRouteRecordLength from protobuf object *otg.FlowRSVPRouteRecordLength + // and doesn't set defaults + setMsg(*otg.FlowRSVPRouteRecordLength) FlowRSVPRouteRecordLength + // provides marshal interface + Marshal() marshalFlowRSVPRouteRecordLength + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPRouteRecordLength + // validate validates FlowRSVPRouteRecordLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPRouteRecordLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPRouteRecordLengthChoiceEnum, set in FlowRSVPRouteRecordLength + Choice() FlowRSVPRouteRecordLengthChoiceEnum + // setChoice assigns FlowRSVPRouteRecordLengthChoiceEnum provided by user to FlowRSVPRouteRecordLength + setChoice(value FlowRSVPRouteRecordLengthChoiceEnum) FlowRSVPRouteRecordLength + // HasChoice checks if Choice has been set in FlowRSVPRouteRecordLength + HasChoice() bool + // Auto returns uint32, set in FlowRSVPRouteRecordLength. + Auto() uint32 + // HasAuto checks if Auto has been set in FlowRSVPRouteRecordLength + HasAuto() bool + // Value returns uint32, set in FlowRSVPRouteRecordLength. + Value() uint32 + // SetValue assigns uint32 provided by user to FlowRSVPRouteRecordLength + SetValue(value uint32) FlowRSVPRouteRecordLength + // HasValue checks if Value has been set in FlowRSVPRouteRecordLength + HasValue() bool +} + +type FlowRSVPRouteRecordLengthChoiceEnum string + +// Enum of Choice on FlowRSVPRouteRecordLength +var FlowRSVPRouteRecordLengthChoice = struct { + AUTO FlowRSVPRouteRecordLengthChoiceEnum + VALUE FlowRSVPRouteRecordLengthChoiceEnum +}{ + AUTO: FlowRSVPRouteRecordLengthChoiceEnum("auto"), + VALUE: FlowRSVPRouteRecordLengthChoiceEnum("value"), +} + +func (obj *flowRSVPRouteRecordLength) Choice() FlowRSVPRouteRecordLengthChoiceEnum { + return FlowRSVPRouteRecordLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// auto or configured value. +// Choice returns a string +func (obj *flowRSVPRouteRecordLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPRouteRecordLength) setChoice(value FlowRSVPRouteRecordLengthChoiceEnum) FlowRSVPRouteRecordLength { + intValue, ok := otg.FlowRSVPRouteRecordLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPRouteRecordLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPRouteRecordLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Value = nil + obj.obj.Auto = nil + + if value == FlowRSVPRouteRecordLengthChoice.AUTO { + defaultValue := uint32(8) + obj.obj.Auto = &defaultValue + } + + if value == FlowRSVPRouteRecordLengthChoice.VALUE { + defaultValue := uint32(8) + obj.obj.Value = &defaultValue + } + + return obj +} + +// The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. +// Auto returns a uint32 +func (obj *flowRSVPRouteRecordLength) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(FlowRSVPRouteRecordLengthChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. +// Auto returns a uint32 +func (obj *flowRSVPRouteRecordLength) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Value returns a uint32 +func (obj *flowRSVPRouteRecordLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(FlowRSVPRouteRecordLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *flowRSVPRouteRecordLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the FlowRSVPRouteRecordLength object +func (obj *flowRSVPRouteRecordLength) SetValue(value uint32) FlowRSVPRouteRecordLength { + obj.setChoice(FlowRSVPRouteRecordLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +func (obj *flowRSVPRouteRecordLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowRSVPRouteRecordLength.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + +} + +func (obj *flowRSVPRouteRecordLength) setDefault() { + var choices_set int = 0 + var choice FlowRSVPRouteRecordLengthChoiceEnum + + if obj.obj.Auto != nil { + choices_set += 1 + choice = FlowRSVPRouteRecordLengthChoice.AUTO + } + + if obj.obj.Value != nil { + choices_set += 1 + choice = FlowRSVPRouteRecordLengthChoice.VALUE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPRouteRecordLengthChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPRouteRecordLength") + } + } else { + intVal := otg.FlowRSVPRouteRecordLength_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPRouteRecordLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_session_attribute_name_length.go b/gosnappi/flow_rsvp_session_attribute_name_length.go new file mode 100644 index 00000000..cf2b608b --- /dev/null +++ b/gosnappi/flow_rsvp_session_attribute_name_length.go @@ -0,0 +1,423 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPSessionAttributeNameLength ***** +type flowRSVPSessionAttributeNameLength struct { + validation + obj *otg.FlowRSVPSessionAttributeNameLength + marshaller marshalFlowRSVPSessionAttributeNameLength + unMarshaller unMarshalFlowRSVPSessionAttributeNameLength +} + +func NewFlowRSVPSessionAttributeNameLength() FlowRSVPSessionAttributeNameLength { + obj := flowRSVPSessionAttributeNameLength{obj: &otg.FlowRSVPSessionAttributeNameLength{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPSessionAttributeNameLength) msg() *otg.FlowRSVPSessionAttributeNameLength { + return obj.obj +} + +func (obj *flowRSVPSessionAttributeNameLength) setMsg(msg *otg.FlowRSVPSessionAttributeNameLength) FlowRSVPSessionAttributeNameLength { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPSessionAttributeNameLength struct { + obj *flowRSVPSessionAttributeNameLength +} + +type marshalFlowRSVPSessionAttributeNameLength interface { + // ToProto marshals FlowRSVPSessionAttributeNameLength to protobuf object *otg.FlowRSVPSessionAttributeNameLength + ToProto() (*otg.FlowRSVPSessionAttributeNameLength, error) + // ToPbText marshals FlowRSVPSessionAttributeNameLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPSessionAttributeNameLength to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPSessionAttributeNameLength to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPSessionAttributeNameLength struct { + obj *flowRSVPSessionAttributeNameLength +} + +type unMarshalFlowRSVPSessionAttributeNameLength interface { + // FromProto unmarshals FlowRSVPSessionAttributeNameLength from protobuf object *otg.FlowRSVPSessionAttributeNameLength + FromProto(msg *otg.FlowRSVPSessionAttributeNameLength) (FlowRSVPSessionAttributeNameLength, error) + // FromPbText unmarshals FlowRSVPSessionAttributeNameLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPSessionAttributeNameLength from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPSessionAttributeNameLength from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPSessionAttributeNameLength) Marshal() marshalFlowRSVPSessionAttributeNameLength { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPSessionAttributeNameLength{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPSessionAttributeNameLength) Unmarshal() unMarshalFlowRSVPSessionAttributeNameLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPSessionAttributeNameLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPSessionAttributeNameLength) ToProto() (*otg.FlowRSVPSessionAttributeNameLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPSessionAttributeNameLength) FromProto(msg *otg.FlowRSVPSessionAttributeNameLength) (FlowRSVPSessionAttributeNameLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPSessionAttributeNameLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPSessionAttributeNameLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPSessionAttributeNameLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPSessionAttributeNameLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPSessionAttributeNameLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPSessionAttributeNameLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPSessionAttributeNameLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPSessionAttributeNameLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPSessionAttributeNameLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPSessionAttributeNameLength) Clone() (FlowRSVPSessionAttributeNameLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPSessionAttributeNameLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowRSVPSessionAttributeNameLength is description is TBD +type FlowRSVPSessionAttributeNameLength interface { + Validation + // msg marshals FlowRSVPSessionAttributeNameLength to protobuf object *otg.FlowRSVPSessionAttributeNameLength + // and doesn't set defaults + msg() *otg.FlowRSVPSessionAttributeNameLength + // setMsg unmarshals FlowRSVPSessionAttributeNameLength from protobuf object *otg.FlowRSVPSessionAttributeNameLength + // and doesn't set defaults + setMsg(*otg.FlowRSVPSessionAttributeNameLength) FlowRSVPSessionAttributeNameLength + // provides marshal interface + Marshal() marshalFlowRSVPSessionAttributeNameLength + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPSessionAttributeNameLength + // validate validates FlowRSVPSessionAttributeNameLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPSessionAttributeNameLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPSessionAttributeNameLengthChoiceEnum, set in FlowRSVPSessionAttributeNameLength + Choice() FlowRSVPSessionAttributeNameLengthChoiceEnum + // setChoice assigns FlowRSVPSessionAttributeNameLengthChoiceEnum provided by user to FlowRSVPSessionAttributeNameLength + setChoice(value FlowRSVPSessionAttributeNameLengthChoiceEnum) FlowRSVPSessionAttributeNameLength + // HasChoice checks if Choice has been set in FlowRSVPSessionAttributeNameLength + HasChoice() bool + // Auto returns uint32, set in FlowRSVPSessionAttributeNameLength. + Auto() uint32 + // HasAuto checks if Auto has been set in FlowRSVPSessionAttributeNameLength + HasAuto() bool + // Value returns uint32, set in FlowRSVPSessionAttributeNameLength. + Value() uint32 + // SetValue assigns uint32 provided by user to FlowRSVPSessionAttributeNameLength + SetValue(value uint32) FlowRSVPSessionAttributeNameLength + // HasValue checks if Value has been set in FlowRSVPSessionAttributeNameLength + HasValue() bool +} + +type FlowRSVPSessionAttributeNameLengthChoiceEnum string + +// Enum of Choice on FlowRSVPSessionAttributeNameLength +var FlowRSVPSessionAttributeNameLengthChoice = struct { + AUTO FlowRSVPSessionAttributeNameLengthChoiceEnum + VALUE FlowRSVPSessionAttributeNameLengthChoiceEnum +}{ + AUTO: FlowRSVPSessionAttributeNameLengthChoiceEnum("auto"), + VALUE: FlowRSVPSessionAttributeNameLengthChoiceEnum("value"), +} + +func (obj *flowRSVPSessionAttributeNameLength) Choice() FlowRSVPSessionAttributeNameLengthChoiceEnum { + return FlowRSVPSessionAttributeNameLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// auto or configured value. +// Choice returns a string +func (obj *flowRSVPSessionAttributeNameLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPSessionAttributeNameLength) setChoice(value FlowRSVPSessionAttributeNameLengthChoiceEnum) FlowRSVPSessionAttributeNameLength { + intValue, ok := otg.FlowRSVPSessionAttributeNameLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPSessionAttributeNameLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPSessionAttributeNameLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Value = nil + obj.obj.Auto = nil + + if value == FlowRSVPSessionAttributeNameLengthChoice.AUTO { + defaultValue := uint32(0) + obj.obj.Auto = &defaultValue + } + + if value == FlowRSVPSessionAttributeNameLengthChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + return obj +} + +// The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. +// Auto returns a uint32 +func (obj *flowRSVPSessionAttributeNameLength) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(FlowRSVPSessionAttributeNameLengthChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. +// Auto returns a uint32 +func (obj *flowRSVPSessionAttributeNameLength) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Value returns a uint32 +func (obj *flowRSVPSessionAttributeNameLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(FlowRSVPSessionAttributeNameLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *flowRSVPSessionAttributeNameLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the FlowRSVPSessionAttributeNameLength object +func (obj *flowRSVPSessionAttributeNameLength) SetValue(value uint32) FlowRSVPSessionAttributeNameLength { + obj.setChoice(FlowRSVPSessionAttributeNameLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +func (obj *flowRSVPSessionAttributeNameLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= FlowRSVPSessionAttributeNameLength.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + +} + +func (obj *flowRSVPSessionAttributeNameLength) setDefault() { + var choices_set int = 0 + var choice FlowRSVPSessionAttributeNameLengthChoiceEnum + + if obj.obj.Auto != nil { + choices_set += 1 + choice = FlowRSVPSessionAttributeNameLengthChoice.AUTO + } + + if obj.obj.Value != nil { + choices_set += 1 + choice = FlowRSVPSessionAttributeNameLengthChoice.VALUE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPSessionAttributeNameLengthChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPSessionAttributeNameLength") + } + } else { + intVal := otg.FlowRSVPSessionAttributeNameLength_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPSessionAttributeNameLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_type1_explicit_route_subobjects.go b/gosnappi/flow_rsvp_type1_explicit_route_subobjects.go new file mode 100644 index 00000000..597b77b0 --- /dev/null +++ b/gosnappi/flow_rsvp_type1_explicit_route_subobjects.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPType1ExplicitRouteSubobjects ***** +type flowRSVPType1ExplicitRouteSubobjects struct { + validation + obj *otg.FlowRSVPType1ExplicitRouteSubobjects + marshaller marshalFlowRSVPType1ExplicitRouteSubobjects + unMarshaller unMarshalFlowRSVPType1ExplicitRouteSubobjects + typeHolder FlowRSVPType1ExplicitRouteSubobjectsType +} + +func NewFlowRSVPType1ExplicitRouteSubobjects() FlowRSVPType1ExplicitRouteSubobjects { + obj := flowRSVPType1ExplicitRouteSubobjects{obj: &otg.FlowRSVPType1ExplicitRouteSubobjects{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPType1ExplicitRouteSubobjects) msg() *otg.FlowRSVPType1ExplicitRouteSubobjects { + return obj.obj +} + +func (obj *flowRSVPType1ExplicitRouteSubobjects) setMsg(msg *otg.FlowRSVPType1ExplicitRouteSubobjects) FlowRSVPType1ExplicitRouteSubobjects { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPType1ExplicitRouteSubobjects struct { + obj *flowRSVPType1ExplicitRouteSubobjects +} + +type marshalFlowRSVPType1ExplicitRouteSubobjects interface { + // ToProto marshals FlowRSVPType1ExplicitRouteSubobjects to protobuf object *otg.FlowRSVPType1ExplicitRouteSubobjects + ToProto() (*otg.FlowRSVPType1ExplicitRouteSubobjects, error) + // ToPbText marshals FlowRSVPType1ExplicitRouteSubobjects to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPType1ExplicitRouteSubobjects to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPType1ExplicitRouteSubobjects to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPType1ExplicitRouteSubobjects struct { + obj *flowRSVPType1ExplicitRouteSubobjects +} + +type unMarshalFlowRSVPType1ExplicitRouteSubobjects interface { + // FromProto unmarshals FlowRSVPType1ExplicitRouteSubobjects from protobuf object *otg.FlowRSVPType1ExplicitRouteSubobjects + FromProto(msg *otg.FlowRSVPType1ExplicitRouteSubobjects) (FlowRSVPType1ExplicitRouteSubobjects, error) + // FromPbText unmarshals FlowRSVPType1ExplicitRouteSubobjects from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPType1ExplicitRouteSubobjects from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPType1ExplicitRouteSubobjects from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPType1ExplicitRouteSubobjects) Marshal() marshalFlowRSVPType1ExplicitRouteSubobjects { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPType1ExplicitRouteSubobjects{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPType1ExplicitRouteSubobjects) Unmarshal() unMarshalFlowRSVPType1ExplicitRouteSubobjects { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPType1ExplicitRouteSubobjects{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPType1ExplicitRouteSubobjects) ToProto() (*otg.FlowRSVPType1ExplicitRouteSubobjects, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPType1ExplicitRouteSubobjects) FromProto(msg *otg.FlowRSVPType1ExplicitRouteSubobjects) (FlowRSVPType1ExplicitRouteSubobjects, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPType1ExplicitRouteSubobjects) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPType1ExplicitRouteSubobjects) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPType1ExplicitRouteSubobjects) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPType1ExplicitRouteSubobjects) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPType1ExplicitRouteSubobjects) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPType1ExplicitRouteSubobjects) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPType1ExplicitRouteSubobjects) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPType1ExplicitRouteSubobjects) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPType1ExplicitRouteSubobjects) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPType1ExplicitRouteSubobjects) Clone() (FlowRSVPType1ExplicitRouteSubobjects, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPType1ExplicitRouteSubobjects() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPType1ExplicitRouteSubobjects) setNil() { + obj.typeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPType1ExplicitRouteSubobjects is type is specific to a subobject. +type FlowRSVPType1ExplicitRouteSubobjects interface { + Validation + // msg marshals FlowRSVPType1ExplicitRouteSubobjects to protobuf object *otg.FlowRSVPType1ExplicitRouteSubobjects + // and doesn't set defaults + msg() *otg.FlowRSVPType1ExplicitRouteSubobjects + // setMsg unmarshals FlowRSVPType1ExplicitRouteSubobjects from protobuf object *otg.FlowRSVPType1ExplicitRouteSubobjects + // and doesn't set defaults + setMsg(*otg.FlowRSVPType1ExplicitRouteSubobjects) FlowRSVPType1ExplicitRouteSubobjects + // provides marshal interface + Marshal() marshalFlowRSVPType1ExplicitRouteSubobjects + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPType1ExplicitRouteSubobjects + // validate validates FlowRSVPType1ExplicitRouteSubobjects + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPType1ExplicitRouteSubobjects, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns FlowRSVPType1ExplicitRouteSubobjectsType, set in FlowRSVPType1ExplicitRouteSubobjects. + // FlowRSVPType1ExplicitRouteSubobjectsType is currently supported subobjects are IPv4 address(1) and Autonomous system number(32). + Type() FlowRSVPType1ExplicitRouteSubobjectsType + // SetType assigns FlowRSVPType1ExplicitRouteSubobjectsType provided by user to FlowRSVPType1ExplicitRouteSubobjects. + // FlowRSVPType1ExplicitRouteSubobjectsType is currently supported subobjects are IPv4 address(1) and Autonomous system number(32). + SetType(value FlowRSVPType1ExplicitRouteSubobjectsType) FlowRSVPType1ExplicitRouteSubobjects + // HasType checks if Type has been set in FlowRSVPType1ExplicitRouteSubobjects + HasType() bool + setNil() +} + +// description is TBD +// Type returns a FlowRSVPType1ExplicitRouteSubobjectsType +func (obj *flowRSVPType1ExplicitRouteSubobjects) Type() FlowRSVPType1ExplicitRouteSubobjectsType { + if obj.obj.Type == nil { + obj.obj.Type = NewFlowRSVPType1ExplicitRouteSubobjectsType().msg() + } + if obj.typeHolder == nil { + obj.typeHolder = &flowRSVPType1ExplicitRouteSubobjectsType{obj: obj.obj.Type} + } + return obj.typeHolder +} + +// description is TBD +// Type returns a FlowRSVPType1ExplicitRouteSubobjectsType +func (obj *flowRSVPType1ExplicitRouteSubobjects) HasType() bool { + return obj.obj.Type != nil +} + +// description is TBD +// SetType sets the FlowRSVPType1ExplicitRouteSubobjectsType value in the FlowRSVPType1ExplicitRouteSubobjects object +func (obj *flowRSVPType1ExplicitRouteSubobjects) SetType(value FlowRSVPType1ExplicitRouteSubobjectsType) FlowRSVPType1ExplicitRouteSubobjects { + + obj.typeHolder = nil + obj.obj.Type = value.msg() + + return obj +} + +func (obj *flowRSVPType1ExplicitRouteSubobjects) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Type != nil { + + obj.Type().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPType1ExplicitRouteSubobjects) setDefault() { + +} diff --git a/gosnappi/flow_rsvp_type1_explicit_route_subobjects_type.go b/gosnappi/flow_rsvp_type1_explicit_route_subobjects_type.go new file mode 100644 index 00000000..4dd6d7af --- /dev/null +++ b/gosnappi/flow_rsvp_type1_explicit_route_subobjects_type.go @@ -0,0 +1,452 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPType1ExplicitRouteSubobjectsType ***** +type flowRSVPType1ExplicitRouteSubobjectsType struct { + validation + obj *otg.FlowRSVPType1ExplicitRouteSubobjectsType + marshaller marshalFlowRSVPType1ExplicitRouteSubobjectsType + unMarshaller unMarshalFlowRSVPType1ExplicitRouteSubobjectsType + ipv4PrefixHolder FlowRSVPPathExplicitRouteType1Ipv4Prefix + asNumberHolder FlowRSVPPathExplicitRouteType1ASNumber +} + +func NewFlowRSVPType1ExplicitRouteSubobjectsType() FlowRSVPType1ExplicitRouteSubobjectsType { + obj := flowRSVPType1ExplicitRouteSubobjectsType{obj: &otg.FlowRSVPType1ExplicitRouteSubobjectsType{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) msg() *otg.FlowRSVPType1ExplicitRouteSubobjectsType { + return obj.obj +} + +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) setMsg(msg *otg.FlowRSVPType1ExplicitRouteSubobjectsType) FlowRSVPType1ExplicitRouteSubobjectsType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPType1ExplicitRouteSubobjectsType struct { + obj *flowRSVPType1ExplicitRouteSubobjectsType +} + +type marshalFlowRSVPType1ExplicitRouteSubobjectsType interface { + // ToProto marshals FlowRSVPType1ExplicitRouteSubobjectsType to protobuf object *otg.FlowRSVPType1ExplicitRouteSubobjectsType + ToProto() (*otg.FlowRSVPType1ExplicitRouteSubobjectsType, error) + // ToPbText marshals FlowRSVPType1ExplicitRouteSubobjectsType to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPType1ExplicitRouteSubobjectsType to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPType1ExplicitRouteSubobjectsType to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPType1ExplicitRouteSubobjectsType struct { + obj *flowRSVPType1ExplicitRouteSubobjectsType +} + +type unMarshalFlowRSVPType1ExplicitRouteSubobjectsType interface { + // FromProto unmarshals FlowRSVPType1ExplicitRouteSubobjectsType from protobuf object *otg.FlowRSVPType1ExplicitRouteSubobjectsType + FromProto(msg *otg.FlowRSVPType1ExplicitRouteSubobjectsType) (FlowRSVPType1ExplicitRouteSubobjectsType, error) + // FromPbText unmarshals FlowRSVPType1ExplicitRouteSubobjectsType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPType1ExplicitRouteSubobjectsType from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPType1ExplicitRouteSubobjectsType from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) Marshal() marshalFlowRSVPType1ExplicitRouteSubobjectsType { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPType1ExplicitRouteSubobjectsType{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) Unmarshal() unMarshalFlowRSVPType1ExplicitRouteSubobjectsType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPType1ExplicitRouteSubobjectsType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPType1ExplicitRouteSubobjectsType) ToProto() (*otg.FlowRSVPType1ExplicitRouteSubobjectsType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPType1ExplicitRouteSubobjectsType) FromProto(msg *otg.FlowRSVPType1ExplicitRouteSubobjectsType) (FlowRSVPType1ExplicitRouteSubobjectsType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPType1ExplicitRouteSubobjectsType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPType1ExplicitRouteSubobjectsType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPType1ExplicitRouteSubobjectsType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPType1ExplicitRouteSubobjectsType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPType1ExplicitRouteSubobjectsType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPType1ExplicitRouteSubobjectsType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) Clone() (FlowRSVPType1ExplicitRouteSubobjectsType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPType1ExplicitRouteSubobjectsType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) setNil() { + obj.ipv4PrefixHolder = nil + obj.asNumberHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPType1ExplicitRouteSubobjectsType is currently supported subobjects are IPv4 address(1) and Autonomous system number(32). +type FlowRSVPType1ExplicitRouteSubobjectsType interface { + Validation + // msg marshals FlowRSVPType1ExplicitRouteSubobjectsType to protobuf object *otg.FlowRSVPType1ExplicitRouteSubobjectsType + // and doesn't set defaults + msg() *otg.FlowRSVPType1ExplicitRouteSubobjectsType + // setMsg unmarshals FlowRSVPType1ExplicitRouteSubobjectsType from protobuf object *otg.FlowRSVPType1ExplicitRouteSubobjectsType + // and doesn't set defaults + setMsg(*otg.FlowRSVPType1ExplicitRouteSubobjectsType) FlowRSVPType1ExplicitRouteSubobjectsType + // provides marshal interface + Marshal() marshalFlowRSVPType1ExplicitRouteSubobjectsType + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPType1ExplicitRouteSubobjectsType + // validate validates FlowRSVPType1ExplicitRouteSubobjectsType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPType1ExplicitRouteSubobjectsType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRSVPType1ExplicitRouteSubobjectsTypeChoiceEnum, set in FlowRSVPType1ExplicitRouteSubobjectsType + Choice() FlowRSVPType1ExplicitRouteSubobjectsTypeChoiceEnum + // setChoice assigns FlowRSVPType1ExplicitRouteSubobjectsTypeChoiceEnum provided by user to FlowRSVPType1ExplicitRouteSubobjectsType + setChoice(value FlowRSVPType1ExplicitRouteSubobjectsTypeChoiceEnum) FlowRSVPType1ExplicitRouteSubobjectsType + // HasChoice checks if Choice has been set in FlowRSVPType1ExplicitRouteSubobjectsType + HasChoice() bool + // Ipv4Prefix returns FlowRSVPPathExplicitRouteType1Ipv4Prefix, set in FlowRSVPType1ExplicitRouteSubobjectsType. + // FlowRSVPPathExplicitRouteType1Ipv4Prefix is class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Prefix, C-Type: 1 + Ipv4Prefix() FlowRSVPPathExplicitRouteType1Ipv4Prefix + // SetIpv4Prefix assigns FlowRSVPPathExplicitRouteType1Ipv4Prefix provided by user to FlowRSVPType1ExplicitRouteSubobjectsType. + // FlowRSVPPathExplicitRouteType1Ipv4Prefix is class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Prefix, C-Type: 1 + SetIpv4Prefix(value FlowRSVPPathExplicitRouteType1Ipv4Prefix) FlowRSVPType1ExplicitRouteSubobjectsType + // HasIpv4Prefix checks if Ipv4Prefix has been set in FlowRSVPType1ExplicitRouteSubobjectsType + HasIpv4Prefix() bool + // AsNumber returns FlowRSVPPathExplicitRouteType1ASNumber, set in FlowRSVPType1ExplicitRouteSubobjectsType. + // FlowRSVPPathExplicitRouteType1ASNumber is class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Autonomous system number, C-Type: 32 + AsNumber() FlowRSVPPathExplicitRouteType1ASNumber + // SetAsNumber assigns FlowRSVPPathExplicitRouteType1ASNumber provided by user to FlowRSVPType1ExplicitRouteSubobjectsType. + // FlowRSVPPathExplicitRouteType1ASNumber is class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Autonomous system number, C-Type: 32 + SetAsNumber(value FlowRSVPPathExplicitRouteType1ASNumber) FlowRSVPType1ExplicitRouteSubobjectsType + // HasAsNumber checks if AsNumber has been set in FlowRSVPType1ExplicitRouteSubobjectsType + HasAsNumber() bool + setNil() +} + +type FlowRSVPType1ExplicitRouteSubobjectsTypeChoiceEnum string + +// Enum of Choice on FlowRSVPType1ExplicitRouteSubobjectsType +var FlowRSVPType1ExplicitRouteSubobjectsTypeChoice = struct { + IPV4_PREFIX FlowRSVPType1ExplicitRouteSubobjectsTypeChoiceEnum + AS_NUMBER FlowRSVPType1ExplicitRouteSubobjectsTypeChoiceEnum +}{ + IPV4_PREFIX: FlowRSVPType1ExplicitRouteSubobjectsTypeChoiceEnum("ipv4_prefix"), + AS_NUMBER: FlowRSVPType1ExplicitRouteSubobjectsTypeChoiceEnum("as_number"), +} + +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) Choice() FlowRSVPType1ExplicitRouteSubobjectsTypeChoiceEnum { + return FlowRSVPType1ExplicitRouteSubobjectsTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) setChoice(value FlowRSVPType1ExplicitRouteSubobjectsTypeChoiceEnum) FlowRSVPType1ExplicitRouteSubobjectsType { + intValue, ok := otg.FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRSVPType1ExplicitRouteSubobjectsTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.AsNumber = nil + obj.asNumberHolder = nil + obj.obj.Ipv4Prefix = nil + obj.ipv4PrefixHolder = nil + + if value == FlowRSVPType1ExplicitRouteSubobjectsTypeChoice.IPV4_PREFIX { + obj.obj.Ipv4Prefix = NewFlowRSVPPathExplicitRouteType1Ipv4Prefix().msg() + } + + if value == FlowRSVPType1ExplicitRouteSubobjectsTypeChoice.AS_NUMBER { + obj.obj.AsNumber = NewFlowRSVPPathExplicitRouteType1ASNumber().msg() + } + + return obj +} + +// description is TBD +// Ipv4Prefix returns a FlowRSVPPathExplicitRouteType1Ipv4Prefix +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) Ipv4Prefix() FlowRSVPPathExplicitRouteType1Ipv4Prefix { + if obj.obj.Ipv4Prefix == nil { + obj.setChoice(FlowRSVPType1ExplicitRouteSubobjectsTypeChoice.IPV4_PREFIX) + } + if obj.ipv4PrefixHolder == nil { + obj.ipv4PrefixHolder = &flowRSVPPathExplicitRouteType1Ipv4Prefix{obj: obj.obj.Ipv4Prefix} + } + return obj.ipv4PrefixHolder +} + +// description is TBD +// Ipv4Prefix returns a FlowRSVPPathExplicitRouteType1Ipv4Prefix +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) HasIpv4Prefix() bool { + return obj.obj.Ipv4Prefix != nil +} + +// description is TBD +// SetIpv4Prefix sets the FlowRSVPPathExplicitRouteType1Ipv4Prefix value in the FlowRSVPType1ExplicitRouteSubobjectsType object +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) SetIpv4Prefix(value FlowRSVPPathExplicitRouteType1Ipv4Prefix) FlowRSVPType1ExplicitRouteSubobjectsType { + obj.setChoice(FlowRSVPType1ExplicitRouteSubobjectsTypeChoice.IPV4_PREFIX) + obj.ipv4PrefixHolder = nil + obj.obj.Ipv4Prefix = value.msg() + + return obj +} + +// description is TBD +// AsNumber returns a FlowRSVPPathExplicitRouteType1ASNumber +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) AsNumber() FlowRSVPPathExplicitRouteType1ASNumber { + if obj.obj.AsNumber == nil { + obj.setChoice(FlowRSVPType1ExplicitRouteSubobjectsTypeChoice.AS_NUMBER) + } + if obj.asNumberHolder == nil { + obj.asNumberHolder = &flowRSVPPathExplicitRouteType1ASNumber{obj: obj.obj.AsNumber} + } + return obj.asNumberHolder +} + +// description is TBD +// AsNumber returns a FlowRSVPPathExplicitRouteType1ASNumber +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) HasAsNumber() bool { + return obj.obj.AsNumber != nil +} + +// description is TBD +// SetAsNumber sets the FlowRSVPPathExplicitRouteType1ASNumber value in the FlowRSVPType1ExplicitRouteSubobjectsType object +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) SetAsNumber(value FlowRSVPPathExplicitRouteType1ASNumber) FlowRSVPType1ExplicitRouteSubobjectsType { + obj.setChoice(FlowRSVPType1ExplicitRouteSubobjectsTypeChoice.AS_NUMBER) + obj.asNumberHolder = nil + obj.obj.AsNumber = value.msg() + + return obj +} + +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv4Prefix != nil { + + obj.Ipv4Prefix().validateObj(vObj, set_default) + } + + if obj.obj.AsNumber != nil { + + obj.AsNumber().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPType1ExplicitRouteSubobjectsType) setDefault() { + var choices_set int = 0 + var choice FlowRSVPType1ExplicitRouteSubobjectsTypeChoiceEnum + + if obj.obj.Ipv4Prefix != nil { + choices_set += 1 + choice = FlowRSVPType1ExplicitRouteSubobjectsTypeChoice.IPV4_PREFIX + } + + if obj.obj.AsNumber != nil { + choices_set += 1 + choice = FlowRSVPType1ExplicitRouteSubobjectsTypeChoice.AS_NUMBER + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRSVPType1ExplicitRouteSubobjectsTypeChoice.IPV4_PREFIX) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRSVPType1ExplicitRouteSubobjectsType") + } + } else { + intVal := otg.FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rsvp_type1_record_route_subobjects.go b/gosnappi/flow_rsvp_type1_record_route_subobjects.go new file mode 100644 index 00000000..bb318aed --- /dev/null +++ b/gosnappi/flow_rsvp_type1_record_route_subobjects.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRSVPType1RecordRouteSubobjects ***** +type flowRSVPType1RecordRouteSubobjects struct { + validation + obj *otg.FlowRSVPType1RecordRouteSubobjects + marshaller marshalFlowRSVPType1RecordRouteSubobjects + unMarshaller unMarshalFlowRSVPType1RecordRouteSubobjects + typeHolder FlowRSVPPathObjectsRecordRouteSubObjectType +} + +func NewFlowRSVPType1RecordRouteSubobjects() FlowRSVPType1RecordRouteSubobjects { + obj := flowRSVPType1RecordRouteSubobjects{obj: &otg.FlowRSVPType1RecordRouteSubobjects{}} + obj.setDefault() + return &obj +} + +func (obj *flowRSVPType1RecordRouteSubobjects) msg() *otg.FlowRSVPType1RecordRouteSubobjects { + return obj.obj +} + +func (obj *flowRSVPType1RecordRouteSubobjects) setMsg(msg *otg.FlowRSVPType1RecordRouteSubobjects) FlowRSVPType1RecordRouteSubobjects { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRSVPType1RecordRouteSubobjects struct { + obj *flowRSVPType1RecordRouteSubobjects +} + +type marshalFlowRSVPType1RecordRouteSubobjects interface { + // ToProto marshals FlowRSVPType1RecordRouteSubobjects to protobuf object *otg.FlowRSVPType1RecordRouteSubobjects + ToProto() (*otg.FlowRSVPType1RecordRouteSubobjects, error) + // ToPbText marshals FlowRSVPType1RecordRouteSubobjects to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRSVPType1RecordRouteSubobjects to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRSVPType1RecordRouteSubobjects to JSON text + ToJson() (string, error) +} + +type unMarshalflowRSVPType1RecordRouteSubobjects struct { + obj *flowRSVPType1RecordRouteSubobjects +} + +type unMarshalFlowRSVPType1RecordRouteSubobjects interface { + // FromProto unmarshals FlowRSVPType1RecordRouteSubobjects from protobuf object *otg.FlowRSVPType1RecordRouteSubobjects + FromProto(msg *otg.FlowRSVPType1RecordRouteSubobjects) (FlowRSVPType1RecordRouteSubobjects, error) + // FromPbText unmarshals FlowRSVPType1RecordRouteSubobjects from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRSVPType1RecordRouteSubobjects from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRSVPType1RecordRouteSubobjects from JSON text + FromJson(value string) error +} + +func (obj *flowRSVPType1RecordRouteSubobjects) Marshal() marshalFlowRSVPType1RecordRouteSubobjects { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRSVPType1RecordRouteSubobjects{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRSVPType1RecordRouteSubobjects) Unmarshal() unMarshalFlowRSVPType1RecordRouteSubobjects { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRSVPType1RecordRouteSubobjects{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRSVPType1RecordRouteSubobjects) ToProto() (*otg.FlowRSVPType1RecordRouteSubobjects, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRSVPType1RecordRouteSubobjects) FromProto(msg *otg.FlowRSVPType1RecordRouteSubobjects) (FlowRSVPType1RecordRouteSubobjects, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRSVPType1RecordRouteSubobjects) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRSVPType1RecordRouteSubobjects) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRSVPType1RecordRouteSubobjects) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPType1RecordRouteSubobjects) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRSVPType1RecordRouteSubobjects) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRSVPType1RecordRouteSubobjects) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRSVPType1RecordRouteSubobjects) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRSVPType1RecordRouteSubobjects) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRSVPType1RecordRouteSubobjects) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRSVPType1RecordRouteSubobjects) Clone() (FlowRSVPType1RecordRouteSubobjects, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRSVPType1RecordRouteSubobjects() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRSVPType1RecordRouteSubobjects) setNil() { + obj.typeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRSVPType1RecordRouteSubobjects is type is specific to a subobject. +type FlowRSVPType1RecordRouteSubobjects interface { + Validation + // msg marshals FlowRSVPType1RecordRouteSubobjects to protobuf object *otg.FlowRSVPType1RecordRouteSubobjects + // and doesn't set defaults + msg() *otg.FlowRSVPType1RecordRouteSubobjects + // setMsg unmarshals FlowRSVPType1RecordRouteSubobjects from protobuf object *otg.FlowRSVPType1RecordRouteSubobjects + // and doesn't set defaults + setMsg(*otg.FlowRSVPType1RecordRouteSubobjects) FlowRSVPType1RecordRouteSubobjects + // provides marshal interface + Marshal() marshalFlowRSVPType1RecordRouteSubobjects + // provides unmarshal interface + Unmarshal() unMarshalFlowRSVPType1RecordRouteSubobjects + // validate validates FlowRSVPType1RecordRouteSubobjects + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRSVPType1RecordRouteSubobjects, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns FlowRSVPPathObjectsRecordRouteSubObjectType, set in FlowRSVPType1RecordRouteSubobjects. + // FlowRSVPPathObjectsRecordRouteSubObjectType is currently supported subobjects are IPv4 address(1) and Label(3). + Type() FlowRSVPPathObjectsRecordRouteSubObjectType + // SetType assigns FlowRSVPPathObjectsRecordRouteSubObjectType provided by user to FlowRSVPType1RecordRouteSubobjects. + // FlowRSVPPathObjectsRecordRouteSubObjectType is currently supported subobjects are IPv4 address(1) and Label(3). + SetType(value FlowRSVPPathObjectsRecordRouteSubObjectType) FlowRSVPType1RecordRouteSubobjects + // HasType checks if Type has been set in FlowRSVPType1RecordRouteSubobjects + HasType() bool + setNil() +} + +// description is TBD +// Type returns a FlowRSVPPathObjectsRecordRouteSubObjectType +func (obj *flowRSVPType1RecordRouteSubobjects) Type() FlowRSVPPathObjectsRecordRouteSubObjectType { + if obj.obj.Type == nil { + obj.obj.Type = NewFlowRSVPPathObjectsRecordRouteSubObjectType().msg() + } + if obj.typeHolder == nil { + obj.typeHolder = &flowRSVPPathObjectsRecordRouteSubObjectType{obj: obj.obj.Type} + } + return obj.typeHolder +} + +// description is TBD +// Type returns a FlowRSVPPathObjectsRecordRouteSubObjectType +func (obj *flowRSVPType1RecordRouteSubobjects) HasType() bool { + return obj.obj.Type != nil +} + +// description is TBD +// SetType sets the FlowRSVPPathObjectsRecordRouteSubObjectType value in the FlowRSVPType1RecordRouteSubobjects object +func (obj *flowRSVPType1RecordRouteSubobjects) SetType(value FlowRSVPPathObjectsRecordRouteSubObjectType) FlowRSVPType1RecordRouteSubobjects { + + obj.typeHolder = nil + obj.obj.Type = value.msg() + + return obj +} + +func (obj *flowRSVPType1RecordRouteSubobjects) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Type != nil { + + obj.Type().validateObj(vObj, set_default) + } + +} + +func (obj *flowRSVPType1RecordRouteSubobjects) setDefault() { + +} diff --git a/gosnappi/flow_rx_tx_ratio.go b/gosnappi/flow_rx_tx_ratio.go new file mode 100644 index 00000000..46d9dc10 --- /dev/null +++ b/gosnappi/flow_rx_tx_ratio.go @@ -0,0 +1,461 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRxTxRatio ***** +type flowRxTxRatio struct { + validation + obj *otg.FlowRxTxRatio + marshaller marshalFlowRxTxRatio + unMarshaller unMarshalFlowRxTxRatio + rxCountHolder FlowRxTxRatioRxCount +} + +func NewFlowRxTxRatio() FlowRxTxRatio { + obj := flowRxTxRatio{obj: &otg.FlowRxTxRatio{}} + obj.setDefault() + return &obj +} + +func (obj *flowRxTxRatio) msg() *otg.FlowRxTxRatio { + return obj.obj +} + +func (obj *flowRxTxRatio) setMsg(msg *otg.FlowRxTxRatio) FlowRxTxRatio { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRxTxRatio struct { + obj *flowRxTxRatio +} + +type marshalFlowRxTxRatio interface { + // ToProto marshals FlowRxTxRatio to protobuf object *otg.FlowRxTxRatio + ToProto() (*otg.FlowRxTxRatio, error) + // ToPbText marshals FlowRxTxRatio to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRxTxRatio to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRxTxRatio to JSON text + ToJson() (string, error) +} + +type unMarshalflowRxTxRatio struct { + obj *flowRxTxRatio +} + +type unMarshalFlowRxTxRatio interface { + // FromProto unmarshals FlowRxTxRatio from protobuf object *otg.FlowRxTxRatio + FromProto(msg *otg.FlowRxTxRatio) (FlowRxTxRatio, error) + // FromPbText unmarshals FlowRxTxRatio from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRxTxRatio from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRxTxRatio from JSON text + FromJson(value string) error +} + +func (obj *flowRxTxRatio) Marshal() marshalFlowRxTxRatio { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRxTxRatio{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRxTxRatio) Unmarshal() unMarshalFlowRxTxRatio { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRxTxRatio{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRxTxRatio) ToProto() (*otg.FlowRxTxRatio, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRxTxRatio) FromProto(msg *otg.FlowRxTxRatio) (FlowRxTxRatio, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRxTxRatio) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRxTxRatio) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRxTxRatio) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRxTxRatio) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRxTxRatio) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRxTxRatio) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRxTxRatio) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRxTxRatio) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRxTxRatio) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRxTxRatio) Clone() (FlowRxTxRatio, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRxTxRatio() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowRxTxRatio) setNil() { + obj.rxCountHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowRxTxRatio is rx Tx ratio is the ratio of expected number of Rx packets across all Rx ports to the Tx packets +// for the configured flow. It is a factor by which the Tx packet count is multiplied to calculate +// the sum of expected Rx packet count, across all Rx ports. This will be used to calculate loss +// percentage of flow at aggregate level. +type FlowRxTxRatio interface { + Validation + // msg marshals FlowRxTxRatio to protobuf object *otg.FlowRxTxRatio + // and doesn't set defaults + msg() *otg.FlowRxTxRatio + // setMsg unmarshals FlowRxTxRatio from protobuf object *otg.FlowRxTxRatio + // and doesn't set defaults + setMsg(*otg.FlowRxTxRatio) FlowRxTxRatio + // provides marshal interface + Marshal() marshalFlowRxTxRatio + // provides unmarshal interface + Unmarshal() unMarshalFlowRxTxRatio + // validate validates FlowRxTxRatio + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRxTxRatio, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowRxTxRatioChoiceEnum, set in FlowRxTxRatio + Choice() FlowRxTxRatioChoiceEnum + // setChoice assigns FlowRxTxRatioChoiceEnum provided by user to FlowRxTxRatio + setChoice(value FlowRxTxRatioChoiceEnum) FlowRxTxRatio + // HasChoice checks if Choice has been set in FlowRxTxRatio + HasChoice() bool + // RxCount returns FlowRxTxRatioRxCount, set in FlowRxTxRatio. + // FlowRxTxRatioRxCount is this is for cases where one copy of Tx packet is received on all Rx ports and so the sum total of Rx packets + // received across all Rx ports is a multiple of Rx port count and Tx packets. + RxCount() FlowRxTxRatioRxCount + // SetRxCount assigns FlowRxTxRatioRxCount provided by user to FlowRxTxRatio. + // FlowRxTxRatioRxCount is this is for cases where one copy of Tx packet is received on all Rx ports and so the sum total of Rx packets + // received across all Rx ports is a multiple of Rx port count and Tx packets. + SetRxCount(value FlowRxTxRatioRxCount) FlowRxTxRatio + // HasRxCount checks if RxCount has been set in FlowRxTxRatio + HasRxCount() bool + // Value returns float32, set in FlowRxTxRatio. + Value() float32 + // SetValue assigns float32 provided by user to FlowRxTxRatio + SetValue(value float32) FlowRxTxRatio + // HasValue checks if Value has been set in FlowRxTxRatio + HasValue() bool + setNil() +} + +type FlowRxTxRatioChoiceEnum string + +// Enum of Choice on FlowRxTxRatio +var FlowRxTxRatioChoice = struct { + RX_COUNT FlowRxTxRatioChoiceEnum + VALUE FlowRxTxRatioChoiceEnum +}{ + RX_COUNT: FlowRxTxRatioChoiceEnum("rx_count"), + VALUE: FlowRxTxRatioChoiceEnum("value"), +} + +func (obj *flowRxTxRatio) Choice() FlowRxTxRatioChoiceEnum { + return FlowRxTxRatioChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowRxTxRatio) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowRxTxRatio) setChoice(value FlowRxTxRatioChoiceEnum) FlowRxTxRatio { + intValue, ok := otg.FlowRxTxRatio_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowRxTxRatioChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowRxTxRatio_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Value = nil + obj.obj.RxCount = nil + obj.rxCountHolder = nil + + if value == FlowRxTxRatioChoice.RX_COUNT { + obj.obj.RxCount = NewFlowRxTxRatioRxCount().msg() + } + + if value == FlowRxTxRatioChoice.VALUE { + defaultValue := float32(1.0) + obj.obj.Value = &defaultValue + } + + return obj +} + +// description is TBD +// RxCount returns a FlowRxTxRatioRxCount +func (obj *flowRxTxRatio) RxCount() FlowRxTxRatioRxCount { + if obj.obj.RxCount == nil { + obj.setChoice(FlowRxTxRatioChoice.RX_COUNT) + } + if obj.rxCountHolder == nil { + obj.rxCountHolder = &flowRxTxRatioRxCount{obj: obj.obj.RxCount} + } + return obj.rxCountHolder +} + +// description is TBD +// RxCount returns a FlowRxTxRatioRxCount +func (obj *flowRxTxRatio) HasRxCount() bool { + return obj.obj.RxCount != nil +} + +// description is TBD +// SetRxCount sets the FlowRxTxRatioRxCount value in the FlowRxTxRatio object +func (obj *flowRxTxRatio) SetRxCount(value FlowRxTxRatioRxCount) FlowRxTxRatio { + obj.setChoice(FlowRxTxRatioChoice.RX_COUNT) + obj.rxCountHolder = nil + obj.obj.RxCount = value.msg() + + return obj +} + +// Should be a positive, non-zero value. The default value of 1, is when the Rx packet count across +// all ports is expected to match the Tx packet count. A custom integer value (>1) can be specified for +// loss calculation for cases when there are multiple destination addresses configured within one flow, +// but DUT is configured to replicate only to a subset of Rx ports. For cases when Tx side generates two +// packets from each source in 1:1 protection mode but only one of the two packets are received by the +// Rx port, we may need to specify a fractional value instead. +// Value returns a float32 +func (obj *flowRxTxRatio) Value() float32 { + + if obj.obj.Value == nil { + obj.setChoice(FlowRxTxRatioChoice.VALUE) + } + + return *obj.obj.Value + +} + +// Should be a positive, non-zero value. The default value of 1, is when the Rx packet count across +// all ports is expected to match the Tx packet count. A custom integer value (>1) can be specified for +// loss calculation for cases when there are multiple destination addresses configured within one flow, +// but DUT is configured to replicate only to a subset of Rx ports. For cases when Tx side generates two +// packets from each source in 1:1 protection mode but only one of the two packets are received by the +// Rx port, we may need to specify a fractional value instead. +// Value returns a float32 +func (obj *flowRxTxRatio) HasValue() bool { + return obj.obj.Value != nil +} + +// Should be a positive, non-zero value. The default value of 1, is when the Rx packet count across +// all ports is expected to match the Tx packet count. A custom integer value (>1) can be specified for +// loss calculation for cases when there are multiple destination addresses configured within one flow, +// but DUT is configured to replicate only to a subset of Rx ports. For cases when Tx side generates two +// packets from each source in 1:1 protection mode but only one of the two packets are received by the +// Rx port, we may need to specify a fractional value instead. +// SetValue sets the float32 value in the FlowRxTxRatio object +func (obj *flowRxTxRatio) SetValue(value float32) FlowRxTxRatio { + obj.setChoice(FlowRxTxRatioChoice.VALUE) + obj.obj.Value = &value + return obj +} + +func (obj *flowRxTxRatio) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RxCount != nil { + + obj.RxCount().validateObj(vObj, set_default) + } + +} + +func (obj *flowRxTxRatio) setDefault() { + var choices_set int = 0 + var choice FlowRxTxRatioChoiceEnum + + if obj.obj.RxCount != nil { + choices_set += 1 + choice = FlowRxTxRatioChoice.RX_COUNT + } + + if obj.obj.Value != nil { + choices_set += 1 + choice = FlowRxTxRatioChoice.VALUE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowRxTxRatioChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowRxTxRatio") + } + } else { + intVal := otg.FlowRxTxRatio_Choice_Enum_value[string(choice)] + enumValue := otg.FlowRxTxRatio_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_rx_tx_ratio_rx_count.go b/gosnappi/flow_rx_tx_ratio_rx_count.go new file mode 100644 index 00000000..babfc601 --- /dev/null +++ b/gosnappi/flow_rx_tx_ratio_rx_count.go @@ -0,0 +1,279 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowRxTxRatioRxCount ***** +type flowRxTxRatioRxCount struct { + validation + obj *otg.FlowRxTxRatioRxCount + marshaller marshalFlowRxTxRatioRxCount + unMarshaller unMarshalFlowRxTxRatioRxCount +} + +func NewFlowRxTxRatioRxCount() FlowRxTxRatioRxCount { + obj := flowRxTxRatioRxCount{obj: &otg.FlowRxTxRatioRxCount{}} + obj.setDefault() + return &obj +} + +func (obj *flowRxTxRatioRxCount) msg() *otg.FlowRxTxRatioRxCount { + return obj.obj +} + +func (obj *flowRxTxRatioRxCount) setMsg(msg *otg.FlowRxTxRatioRxCount) FlowRxTxRatioRxCount { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowRxTxRatioRxCount struct { + obj *flowRxTxRatioRxCount +} + +type marshalFlowRxTxRatioRxCount interface { + // ToProto marshals FlowRxTxRatioRxCount to protobuf object *otg.FlowRxTxRatioRxCount + ToProto() (*otg.FlowRxTxRatioRxCount, error) + // ToPbText marshals FlowRxTxRatioRxCount to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowRxTxRatioRxCount to YAML text + ToYaml() (string, error) + // ToJson marshals FlowRxTxRatioRxCount to JSON text + ToJson() (string, error) +} + +type unMarshalflowRxTxRatioRxCount struct { + obj *flowRxTxRatioRxCount +} + +type unMarshalFlowRxTxRatioRxCount interface { + // FromProto unmarshals FlowRxTxRatioRxCount from protobuf object *otg.FlowRxTxRatioRxCount + FromProto(msg *otg.FlowRxTxRatioRxCount) (FlowRxTxRatioRxCount, error) + // FromPbText unmarshals FlowRxTxRatioRxCount from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowRxTxRatioRxCount from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowRxTxRatioRxCount from JSON text + FromJson(value string) error +} + +func (obj *flowRxTxRatioRxCount) Marshal() marshalFlowRxTxRatioRxCount { + if obj.marshaller == nil { + obj.marshaller = &marshalflowRxTxRatioRxCount{obj: obj} + } + return obj.marshaller +} + +func (obj *flowRxTxRatioRxCount) Unmarshal() unMarshalFlowRxTxRatioRxCount { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowRxTxRatioRxCount{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowRxTxRatioRxCount) ToProto() (*otg.FlowRxTxRatioRxCount, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowRxTxRatioRxCount) FromProto(msg *otg.FlowRxTxRatioRxCount) (FlowRxTxRatioRxCount, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowRxTxRatioRxCount) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowRxTxRatioRxCount) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowRxTxRatioRxCount) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRxTxRatioRxCount) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowRxTxRatioRxCount) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowRxTxRatioRxCount) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowRxTxRatioRxCount) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowRxTxRatioRxCount) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowRxTxRatioRxCount) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowRxTxRatioRxCount) Clone() (FlowRxTxRatioRxCount, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowRxTxRatioRxCount() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowRxTxRatioRxCount is this is for cases where one copy of Tx packet is received on all Rx ports and so the sum total of Rx packets +// received across all Rx ports is a multiple of Rx port count and Tx packets. +type FlowRxTxRatioRxCount interface { + Validation + // msg marshals FlowRxTxRatioRxCount to protobuf object *otg.FlowRxTxRatioRxCount + // and doesn't set defaults + msg() *otg.FlowRxTxRatioRxCount + // setMsg unmarshals FlowRxTxRatioRxCount from protobuf object *otg.FlowRxTxRatioRxCount + // and doesn't set defaults + setMsg(*otg.FlowRxTxRatioRxCount) FlowRxTxRatioRxCount + // provides marshal interface + Marshal() marshalFlowRxTxRatioRxCount + // provides unmarshal interface + Unmarshal() unMarshalFlowRxTxRatioRxCount + // validate validates FlowRxTxRatioRxCount + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowRxTxRatioRxCount, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() +} + +func (obj *flowRxTxRatioRxCount) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *flowRxTxRatioRxCount) setDefault() { + +} diff --git a/gosnappi/flow_size.go b/gosnappi/flow_size.go new file mode 100644 index 00000000..f586f599 --- /dev/null +++ b/gosnappi/flow_size.go @@ -0,0 +1,563 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowSize ***** +type flowSize struct { + validation + obj *otg.FlowSize + marshaller marshalFlowSize + unMarshaller unMarshalFlowSize + incrementHolder FlowSizeIncrement + randomHolder FlowSizeRandom + weightPairsHolder FlowSizeWeightPairs +} + +func NewFlowSize() FlowSize { + obj := flowSize{obj: &otg.FlowSize{}} + obj.setDefault() + return &obj +} + +func (obj *flowSize) msg() *otg.FlowSize { + return obj.obj +} + +func (obj *flowSize) setMsg(msg *otg.FlowSize) FlowSize { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowSize struct { + obj *flowSize +} + +type marshalFlowSize interface { + // ToProto marshals FlowSize to protobuf object *otg.FlowSize + ToProto() (*otg.FlowSize, error) + // ToPbText marshals FlowSize to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowSize to YAML text + ToYaml() (string, error) + // ToJson marshals FlowSize to JSON text + ToJson() (string, error) +} + +type unMarshalflowSize struct { + obj *flowSize +} + +type unMarshalFlowSize interface { + // FromProto unmarshals FlowSize from protobuf object *otg.FlowSize + FromProto(msg *otg.FlowSize) (FlowSize, error) + // FromPbText unmarshals FlowSize from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowSize from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowSize from JSON text + FromJson(value string) error +} + +func (obj *flowSize) Marshal() marshalFlowSize { + if obj.marshaller == nil { + obj.marshaller = &marshalflowSize{obj: obj} + } + return obj.marshaller +} + +func (obj *flowSize) Unmarshal() unMarshalFlowSize { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowSize{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowSize) ToProto() (*otg.FlowSize, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowSize) FromProto(msg *otg.FlowSize) (FlowSize, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowSize) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowSize) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowSize) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSize) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowSize) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSize) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowSize) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowSize) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowSize) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowSize) Clone() (FlowSize, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowSize() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowSize) setNil() { + obj.incrementHolder = nil + obj.randomHolder = nil + obj.weightPairsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowSize is the frame size which overrides the total length of the packet +type FlowSize interface { + Validation + // msg marshals FlowSize to protobuf object *otg.FlowSize + // and doesn't set defaults + msg() *otg.FlowSize + // setMsg unmarshals FlowSize from protobuf object *otg.FlowSize + // and doesn't set defaults + setMsg(*otg.FlowSize) FlowSize + // provides marshal interface + Marshal() marshalFlowSize + // provides unmarshal interface + Unmarshal() unMarshalFlowSize + // validate validates FlowSize + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowSize, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowSizeChoiceEnum, set in FlowSize + Choice() FlowSizeChoiceEnum + // setChoice assigns FlowSizeChoiceEnum provided by user to FlowSize + setChoice(value FlowSizeChoiceEnum) FlowSize + // HasChoice checks if Choice has been set in FlowSize + HasChoice() bool + // Fixed returns uint32, set in FlowSize. + Fixed() uint32 + // SetFixed assigns uint32 provided by user to FlowSize + SetFixed(value uint32) FlowSize + // HasFixed checks if Fixed has been set in FlowSize + HasFixed() bool + // Increment returns FlowSizeIncrement, set in FlowSize. + // FlowSizeIncrement is frame size that increments from a starting size to + // an ending size incrementing by a step size. + Increment() FlowSizeIncrement + // SetIncrement assigns FlowSizeIncrement provided by user to FlowSize. + // FlowSizeIncrement is frame size that increments from a starting size to + // an ending size incrementing by a step size. + SetIncrement(value FlowSizeIncrement) FlowSize + // HasIncrement checks if Increment has been set in FlowSize + HasIncrement() bool + // Random returns FlowSizeRandom, set in FlowSize. + // FlowSizeRandom is random frame size from a min value to a max value. + Random() FlowSizeRandom + // SetRandom assigns FlowSizeRandom provided by user to FlowSize. + // FlowSizeRandom is random frame size from a min value to a max value. + SetRandom(value FlowSizeRandom) FlowSize + // HasRandom checks if Random has been set in FlowSize + HasRandom() bool + // WeightPairs returns FlowSizeWeightPairs, set in FlowSize. + // FlowSizeWeightPairs is frame size distribution, defined as pairs (including IMIX distribution). + // Frames are randomly generated such that the proportion of each frame size out of the total number of frames + // are matching with the weight value of the pair. However, as with any other probability + // distribution, the sample distribution is close to theoretical value only if the size of the sample is reasonably large. + // When the number of frames is very low the transmitted frames may not come close to the ratio described in the weight. + WeightPairs() FlowSizeWeightPairs + // SetWeightPairs assigns FlowSizeWeightPairs provided by user to FlowSize. + // FlowSizeWeightPairs is frame size distribution, defined as pairs (including IMIX distribution). + // Frames are randomly generated such that the proportion of each frame size out of the total number of frames + // are matching with the weight value of the pair. However, as with any other probability + // distribution, the sample distribution is close to theoretical value only if the size of the sample is reasonably large. + // When the number of frames is very low the transmitted frames may not come close to the ratio described in the weight. + SetWeightPairs(value FlowSizeWeightPairs) FlowSize + // HasWeightPairs checks if WeightPairs has been set in FlowSize + HasWeightPairs() bool + setNil() +} + +type FlowSizeChoiceEnum string + +// Enum of Choice on FlowSize +var FlowSizeChoice = struct { + FIXED FlowSizeChoiceEnum + INCREMENT FlowSizeChoiceEnum + RANDOM FlowSizeChoiceEnum + WEIGHT_PAIRS FlowSizeChoiceEnum +}{ + FIXED: FlowSizeChoiceEnum("fixed"), + INCREMENT: FlowSizeChoiceEnum("increment"), + RANDOM: FlowSizeChoiceEnum("random"), + WEIGHT_PAIRS: FlowSizeChoiceEnum("weight_pairs"), +} + +func (obj *flowSize) Choice() FlowSizeChoiceEnum { + return FlowSizeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowSize) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowSize) setChoice(value FlowSizeChoiceEnum) FlowSize { + intValue, ok := otg.FlowSize_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowSizeChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowSize_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.WeightPairs = nil + obj.weightPairsHolder = nil + obj.obj.Random = nil + obj.randomHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Fixed = nil + + if value == FlowSizeChoice.FIXED { + defaultValue := uint32(64) + obj.obj.Fixed = &defaultValue + } + + if value == FlowSizeChoice.INCREMENT { + obj.obj.Increment = NewFlowSizeIncrement().msg() + } + + if value == FlowSizeChoice.RANDOM { + obj.obj.Random = NewFlowSizeRandom().msg() + } + + if value == FlowSizeChoice.WEIGHT_PAIRS { + obj.obj.WeightPairs = NewFlowSizeWeightPairs().msg() + } + + return obj +} + +// description is TBD +// Fixed returns a uint32 +func (obj *flowSize) Fixed() uint32 { + + if obj.obj.Fixed == nil { + obj.setChoice(FlowSizeChoice.FIXED) + } + + return *obj.obj.Fixed + +} + +// description is TBD +// Fixed returns a uint32 +func (obj *flowSize) HasFixed() bool { + return obj.obj.Fixed != nil +} + +// description is TBD +// SetFixed sets the uint32 value in the FlowSize object +func (obj *flowSize) SetFixed(value uint32) FlowSize { + obj.setChoice(FlowSizeChoice.FIXED) + obj.obj.Fixed = &value + return obj +} + +// description is TBD +// Increment returns a FlowSizeIncrement +func (obj *flowSize) Increment() FlowSizeIncrement { + if obj.obj.Increment == nil { + obj.setChoice(FlowSizeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &flowSizeIncrement{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a FlowSizeIncrement +func (obj *flowSize) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the FlowSizeIncrement value in the FlowSize object +func (obj *flowSize) SetIncrement(value FlowSizeIncrement) FlowSize { + obj.setChoice(FlowSizeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Random returns a FlowSizeRandom +func (obj *flowSize) Random() FlowSizeRandom { + if obj.obj.Random == nil { + obj.setChoice(FlowSizeChoice.RANDOM) + } + if obj.randomHolder == nil { + obj.randomHolder = &flowSizeRandom{obj: obj.obj.Random} + } + return obj.randomHolder +} + +// description is TBD +// Random returns a FlowSizeRandom +func (obj *flowSize) HasRandom() bool { + return obj.obj.Random != nil +} + +// description is TBD +// SetRandom sets the FlowSizeRandom value in the FlowSize object +func (obj *flowSize) SetRandom(value FlowSizeRandom) FlowSize { + obj.setChoice(FlowSizeChoice.RANDOM) + obj.randomHolder = nil + obj.obj.Random = value.msg() + + return obj +} + +// description is TBD +// WeightPairs returns a FlowSizeWeightPairs +func (obj *flowSize) WeightPairs() FlowSizeWeightPairs { + if obj.obj.WeightPairs == nil { + obj.setChoice(FlowSizeChoice.WEIGHT_PAIRS) + } + if obj.weightPairsHolder == nil { + obj.weightPairsHolder = &flowSizeWeightPairs{obj: obj.obj.WeightPairs} + } + return obj.weightPairsHolder +} + +// description is TBD +// WeightPairs returns a FlowSizeWeightPairs +func (obj *flowSize) HasWeightPairs() bool { + return obj.obj.WeightPairs != nil +} + +// description is TBD +// SetWeightPairs sets the FlowSizeWeightPairs value in the FlowSize object +func (obj *flowSize) SetWeightPairs(value FlowSizeWeightPairs) FlowSize { + obj.setChoice(FlowSizeChoice.WEIGHT_PAIRS) + obj.weightPairsHolder = nil + obj.obj.WeightPairs = value.msg() + + return obj +} + +func (obj *flowSize) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Random != nil { + + obj.Random().validateObj(vObj, set_default) + } + + if obj.obj.WeightPairs != nil { + + obj.WeightPairs().validateObj(vObj, set_default) + } + +} + +func (obj *flowSize) setDefault() { + var choices_set int = 0 + var choice FlowSizeChoiceEnum + + if obj.obj.Fixed != nil { + choices_set += 1 + choice = FlowSizeChoice.FIXED + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = FlowSizeChoice.INCREMENT + } + + if obj.obj.Random != nil { + choices_set += 1 + choice = FlowSizeChoice.RANDOM + } + + if obj.obj.WeightPairs != nil { + choices_set += 1 + choice = FlowSizeChoice.WEIGHT_PAIRS + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowSizeChoice.FIXED) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowSize") + } + } else { + intVal := otg.FlowSize_Choice_Enum_value[string(choice)] + enumValue := otg.FlowSize_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_size_increment.go b/gosnappi/flow_size_increment.go new file mode 100644 index 00000000..97cd41dd --- /dev/null +++ b/gosnappi/flow_size_increment.go @@ -0,0 +1,392 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowSizeIncrement ***** +type flowSizeIncrement struct { + validation + obj *otg.FlowSizeIncrement + marshaller marshalFlowSizeIncrement + unMarshaller unMarshalFlowSizeIncrement +} + +func NewFlowSizeIncrement() FlowSizeIncrement { + obj := flowSizeIncrement{obj: &otg.FlowSizeIncrement{}} + obj.setDefault() + return &obj +} + +func (obj *flowSizeIncrement) msg() *otg.FlowSizeIncrement { + return obj.obj +} + +func (obj *flowSizeIncrement) setMsg(msg *otg.FlowSizeIncrement) FlowSizeIncrement { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowSizeIncrement struct { + obj *flowSizeIncrement +} + +type marshalFlowSizeIncrement interface { + // ToProto marshals FlowSizeIncrement to protobuf object *otg.FlowSizeIncrement + ToProto() (*otg.FlowSizeIncrement, error) + // ToPbText marshals FlowSizeIncrement to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowSizeIncrement to YAML text + ToYaml() (string, error) + // ToJson marshals FlowSizeIncrement to JSON text + ToJson() (string, error) +} + +type unMarshalflowSizeIncrement struct { + obj *flowSizeIncrement +} + +type unMarshalFlowSizeIncrement interface { + // FromProto unmarshals FlowSizeIncrement from protobuf object *otg.FlowSizeIncrement + FromProto(msg *otg.FlowSizeIncrement) (FlowSizeIncrement, error) + // FromPbText unmarshals FlowSizeIncrement from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowSizeIncrement from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowSizeIncrement from JSON text + FromJson(value string) error +} + +func (obj *flowSizeIncrement) Marshal() marshalFlowSizeIncrement { + if obj.marshaller == nil { + obj.marshaller = &marshalflowSizeIncrement{obj: obj} + } + return obj.marshaller +} + +func (obj *flowSizeIncrement) Unmarshal() unMarshalFlowSizeIncrement { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowSizeIncrement{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowSizeIncrement) ToProto() (*otg.FlowSizeIncrement, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowSizeIncrement) FromProto(msg *otg.FlowSizeIncrement) (FlowSizeIncrement, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowSizeIncrement) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowSizeIncrement) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowSizeIncrement) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSizeIncrement) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowSizeIncrement) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSizeIncrement) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowSizeIncrement) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowSizeIncrement) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowSizeIncrement) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowSizeIncrement) Clone() (FlowSizeIncrement, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowSizeIncrement() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowSizeIncrement is frame size that increments from a starting size to +// an ending size incrementing by a step size. +type FlowSizeIncrement interface { + Validation + // msg marshals FlowSizeIncrement to protobuf object *otg.FlowSizeIncrement + // and doesn't set defaults + msg() *otg.FlowSizeIncrement + // setMsg unmarshals FlowSizeIncrement from protobuf object *otg.FlowSizeIncrement + // and doesn't set defaults + setMsg(*otg.FlowSizeIncrement) FlowSizeIncrement + // provides marshal interface + Marshal() marshalFlowSizeIncrement + // provides unmarshal interface + Unmarshal() unMarshalFlowSizeIncrement + // validate validates FlowSizeIncrement + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowSizeIncrement, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in FlowSizeIncrement. + Start() uint32 + // SetStart assigns uint32 provided by user to FlowSizeIncrement + SetStart(value uint32) FlowSizeIncrement + // HasStart checks if Start has been set in FlowSizeIncrement + HasStart() bool + // End returns uint32, set in FlowSizeIncrement. + End() uint32 + // SetEnd assigns uint32 provided by user to FlowSizeIncrement + SetEnd(value uint32) FlowSizeIncrement + // HasEnd checks if End has been set in FlowSizeIncrement + HasEnd() bool + // Step returns uint32, set in FlowSizeIncrement. + Step() uint32 + // SetStep assigns uint32 provided by user to FlowSizeIncrement + SetStep(value uint32) FlowSizeIncrement + // HasStep checks if Step has been set in FlowSizeIncrement + HasStep() bool +} + +// Starting frame size in bytes +// Start returns a uint32 +func (obj *flowSizeIncrement) Start() uint32 { + + return *obj.obj.Start + +} + +// Starting frame size in bytes +// Start returns a uint32 +func (obj *flowSizeIncrement) HasStart() bool { + return obj.obj.Start != nil +} + +// Starting frame size in bytes +// SetStart sets the uint32 value in the FlowSizeIncrement object +func (obj *flowSizeIncrement) SetStart(value uint32) FlowSizeIncrement { + + obj.obj.Start = &value + return obj +} + +// Ending frame size in bytes +// End returns a uint32 +func (obj *flowSizeIncrement) End() uint32 { + + return *obj.obj.End + +} + +// Ending frame size in bytes +// End returns a uint32 +func (obj *flowSizeIncrement) HasEnd() bool { + return obj.obj.End != nil +} + +// Ending frame size in bytes +// SetEnd sets the uint32 value in the FlowSizeIncrement object +func (obj *flowSizeIncrement) SetEnd(value uint32) FlowSizeIncrement { + + obj.obj.End = &value + return obj +} + +// Step frame size in bytes +// Step returns a uint32 +func (obj *flowSizeIncrement) Step() uint32 { + + return *obj.obj.Step + +} + +// Step frame size in bytes +// Step returns a uint32 +func (obj *flowSizeIncrement) HasStep() bool { + return obj.obj.Step != nil +} + +// Step frame size in bytes +// SetStep sets the uint32 value in the FlowSizeIncrement object +func (obj *flowSizeIncrement) SetStep(value uint32) FlowSizeIncrement { + + obj.obj.Step = &value + return obj +} + +func (obj *flowSizeIncrement) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start < 1 || *obj.obj.Start > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= FlowSizeIncrement.Start <= 4294967295 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.End != nil { + + if *obj.obj.End < 64 || *obj.obj.End > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("64 <= FlowSizeIncrement.End <= 4294967295 but Got %d", *obj.obj.End)) + } + + } + +} + +func (obj *flowSizeIncrement) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(64) + } + if obj.obj.End == nil { + obj.SetEnd(1518) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + +} diff --git a/gosnappi/flow_size_random.go b/gosnappi/flow_size_random.go new file mode 100644 index 00000000..c0318424 --- /dev/null +++ b/gosnappi/flow_size_random.go @@ -0,0 +1,340 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowSizeRandom ***** +type flowSizeRandom struct { + validation + obj *otg.FlowSizeRandom + marshaller marshalFlowSizeRandom + unMarshaller unMarshalFlowSizeRandom +} + +func NewFlowSizeRandom() FlowSizeRandom { + obj := flowSizeRandom{obj: &otg.FlowSizeRandom{}} + obj.setDefault() + return &obj +} + +func (obj *flowSizeRandom) msg() *otg.FlowSizeRandom { + return obj.obj +} + +func (obj *flowSizeRandom) setMsg(msg *otg.FlowSizeRandom) FlowSizeRandom { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowSizeRandom struct { + obj *flowSizeRandom +} + +type marshalFlowSizeRandom interface { + // ToProto marshals FlowSizeRandom to protobuf object *otg.FlowSizeRandom + ToProto() (*otg.FlowSizeRandom, error) + // ToPbText marshals FlowSizeRandom to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowSizeRandom to YAML text + ToYaml() (string, error) + // ToJson marshals FlowSizeRandom to JSON text + ToJson() (string, error) +} + +type unMarshalflowSizeRandom struct { + obj *flowSizeRandom +} + +type unMarshalFlowSizeRandom interface { + // FromProto unmarshals FlowSizeRandom from protobuf object *otg.FlowSizeRandom + FromProto(msg *otg.FlowSizeRandom) (FlowSizeRandom, error) + // FromPbText unmarshals FlowSizeRandom from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowSizeRandom from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowSizeRandom from JSON text + FromJson(value string) error +} + +func (obj *flowSizeRandom) Marshal() marshalFlowSizeRandom { + if obj.marshaller == nil { + obj.marshaller = &marshalflowSizeRandom{obj: obj} + } + return obj.marshaller +} + +func (obj *flowSizeRandom) Unmarshal() unMarshalFlowSizeRandom { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowSizeRandom{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowSizeRandom) ToProto() (*otg.FlowSizeRandom, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowSizeRandom) FromProto(msg *otg.FlowSizeRandom) (FlowSizeRandom, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowSizeRandom) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowSizeRandom) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowSizeRandom) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSizeRandom) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowSizeRandom) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSizeRandom) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowSizeRandom) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowSizeRandom) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowSizeRandom) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowSizeRandom) Clone() (FlowSizeRandom, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowSizeRandom() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowSizeRandom is random frame size from a min value to a max value. +type FlowSizeRandom interface { + Validation + // msg marshals FlowSizeRandom to protobuf object *otg.FlowSizeRandom + // and doesn't set defaults + msg() *otg.FlowSizeRandom + // setMsg unmarshals FlowSizeRandom from protobuf object *otg.FlowSizeRandom + // and doesn't set defaults + setMsg(*otg.FlowSizeRandom) FlowSizeRandom + // provides marshal interface + Marshal() marshalFlowSizeRandom + // provides unmarshal interface + Unmarshal() unMarshalFlowSizeRandom + // validate validates FlowSizeRandom + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowSizeRandom, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Min returns uint32, set in FlowSizeRandom. + Min() uint32 + // SetMin assigns uint32 provided by user to FlowSizeRandom + SetMin(value uint32) FlowSizeRandom + // HasMin checks if Min has been set in FlowSizeRandom + HasMin() bool + // Max returns uint32, set in FlowSizeRandom. + Max() uint32 + // SetMax assigns uint32 provided by user to FlowSizeRandom + SetMax(value uint32) FlowSizeRandom + // HasMax checks if Max has been set in FlowSizeRandom + HasMax() bool +} + +// description is TBD +// Min returns a uint32 +func (obj *flowSizeRandom) Min() uint32 { + + return *obj.obj.Min + +} + +// description is TBD +// Min returns a uint32 +func (obj *flowSizeRandom) HasMin() bool { + return obj.obj.Min != nil +} + +// description is TBD +// SetMin sets the uint32 value in the FlowSizeRandom object +func (obj *flowSizeRandom) SetMin(value uint32) FlowSizeRandom { + + obj.obj.Min = &value + return obj +} + +// description is TBD +// Max returns a uint32 +func (obj *flowSizeRandom) Max() uint32 { + + return *obj.obj.Max + +} + +// description is TBD +// Max returns a uint32 +func (obj *flowSizeRandom) HasMax() bool { + return obj.obj.Max != nil +} + +// description is TBD +// SetMax sets the uint32 value in the FlowSizeRandom object +func (obj *flowSizeRandom) SetMax(value uint32) FlowSizeRandom { + + obj.obj.Max = &value + return obj +} + +func (obj *flowSizeRandom) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *flowSizeRandom) setDefault() { + if obj.obj.Min == nil { + obj.SetMin(64) + } + if obj.obj.Max == nil { + obj.SetMax(1518) + } + +} diff --git a/gosnappi/flow_size_weight_pairs.go b/gosnappi/flow_size_weight_pairs.go new file mode 100644 index 00000000..ca427cc9 --- /dev/null +++ b/gosnappi/flow_size_weight_pairs.go @@ -0,0 +1,526 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowSizeWeightPairs ***** +type flowSizeWeightPairs struct { + validation + obj *otg.FlowSizeWeightPairs + marshaller marshalFlowSizeWeightPairs + unMarshaller unMarshalFlowSizeWeightPairs + customHolder FlowSizeWeightPairsFlowSizeWeightPairsCustomIter +} + +func NewFlowSizeWeightPairs() FlowSizeWeightPairs { + obj := flowSizeWeightPairs{obj: &otg.FlowSizeWeightPairs{}} + obj.setDefault() + return &obj +} + +func (obj *flowSizeWeightPairs) msg() *otg.FlowSizeWeightPairs { + return obj.obj +} + +func (obj *flowSizeWeightPairs) setMsg(msg *otg.FlowSizeWeightPairs) FlowSizeWeightPairs { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowSizeWeightPairs struct { + obj *flowSizeWeightPairs +} + +type marshalFlowSizeWeightPairs interface { + // ToProto marshals FlowSizeWeightPairs to protobuf object *otg.FlowSizeWeightPairs + ToProto() (*otg.FlowSizeWeightPairs, error) + // ToPbText marshals FlowSizeWeightPairs to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowSizeWeightPairs to YAML text + ToYaml() (string, error) + // ToJson marshals FlowSizeWeightPairs to JSON text + ToJson() (string, error) +} + +type unMarshalflowSizeWeightPairs struct { + obj *flowSizeWeightPairs +} + +type unMarshalFlowSizeWeightPairs interface { + // FromProto unmarshals FlowSizeWeightPairs from protobuf object *otg.FlowSizeWeightPairs + FromProto(msg *otg.FlowSizeWeightPairs) (FlowSizeWeightPairs, error) + // FromPbText unmarshals FlowSizeWeightPairs from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowSizeWeightPairs from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowSizeWeightPairs from JSON text + FromJson(value string) error +} + +func (obj *flowSizeWeightPairs) Marshal() marshalFlowSizeWeightPairs { + if obj.marshaller == nil { + obj.marshaller = &marshalflowSizeWeightPairs{obj: obj} + } + return obj.marshaller +} + +func (obj *flowSizeWeightPairs) Unmarshal() unMarshalFlowSizeWeightPairs { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowSizeWeightPairs{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowSizeWeightPairs) ToProto() (*otg.FlowSizeWeightPairs, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowSizeWeightPairs) FromProto(msg *otg.FlowSizeWeightPairs) (FlowSizeWeightPairs, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowSizeWeightPairs) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowSizeWeightPairs) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowSizeWeightPairs) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSizeWeightPairs) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowSizeWeightPairs) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSizeWeightPairs) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowSizeWeightPairs) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowSizeWeightPairs) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowSizeWeightPairs) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowSizeWeightPairs) Clone() (FlowSizeWeightPairs, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowSizeWeightPairs() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowSizeWeightPairs) setNil() { + obj.customHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowSizeWeightPairs is frame size distribution, defined as pairs (including IMIX distribution). +// Frames are randomly generated such that the proportion of each frame size out of the total number of frames +// are matching with the weight value of the pair. However, as with any other probability +// distribution, the sample distribution is close to theoretical value only if the size of the sample is reasonably large. +// When the number of frames is very low the transmitted frames may not come close to the ratio described in the weight. +type FlowSizeWeightPairs interface { + Validation + // msg marshals FlowSizeWeightPairs to protobuf object *otg.FlowSizeWeightPairs + // and doesn't set defaults + msg() *otg.FlowSizeWeightPairs + // setMsg unmarshals FlowSizeWeightPairs from protobuf object *otg.FlowSizeWeightPairs + // and doesn't set defaults + setMsg(*otg.FlowSizeWeightPairs) FlowSizeWeightPairs + // provides marshal interface + Marshal() marshalFlowSizeWeightPairs + // provides unmarshal interface + Unmarshal() unMarshalFlowSizeWeightPairs + // validate validates FlowSizeWeightPairs + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowSizeWeightPairs, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowSizeWeightPairsChoiceEnum, set in FlowSizeWeightPairs + Choice() FlowSizeWeightPairsChoiceEnum + // setChoice assigns FlowSizeWeightPairsChoiceEnum provided by user to FlowSizeWeightPairs + setChoice(value FlowSizeWeightPairsChoiceEnum) FlowSizeWeightPairs + // HasChoice checks if Choice has been set in FlowSizeWeightPairs + HasChoice() bool + // Predefined returns FlowSizeWeightPairsPredefinedEnum, set in FlowSizeWeightPairs + Predefined() FlowSizeWeightPairsPredefinedEnum + // SetPredefined assigns FlowSizeWeightPairsPredefinedEnum provided by user to FlowSizeWeightPairs + SetPredefined(value FlowSizeWeightPairsPredefinedEnum) FlowSizeWeightPairs + // HasPredefined checks if Predefined has been set in FlowSizeWeightPairs + HasPredefined() bool + // Custom returns FlowSizeWeightPairsFlowSizeWeightPairsCustomIterIter, set in FlowSizeWeightPairs + Custom() FlowSizeWeightPairsFlowSizeWeightPairsCustomIter + setNil() +} + +type FlowSizeWeightPairsChoiceEnum string + +// Enum of Choice on FlowSizeWeightPairs +var FlowSizeWeightPairsChoice = struct { + PREDEFINED FlowSizeWeightPairsChoiceEnum + CUSTOM FlowSizeWeightPairsChoiceEnum +}{ + PREDEFINED: FlowSizeWeightPairsChoiceEnum("predefined"), + CUSTOM: FlowSizeWeightPairsChoiceEnum("custom"), +} + +func (obj *flowSizeWeightPairs) Choice() FlowSizeWeightPairsChoiceEnum { + return FlowSizeWeightPairsChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowSizeWeightPairs) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowSizeWeightPairs) setChoice(value FlowSizeWeightPairsChoiceEnum) FlowSizeWeightPairs { + intValue, ok := otg.FlowSizeWeightPairs_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowSizeWeightPairsChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowSizeWeightPairs_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.customHolder = nil + obj.obj.Predefined = otg.FlowSizeWeightPairs_Predefined_unspecified.Enum() + + if value == FlowSizeWeightPairsChoice.CUSTOM { + obj.obj.Custom = []*otg.FlowSizeWeightPairsCustom{} + } + + return obj +} + +type FlowSizeWeightPairsPredefinedEnum string + +// Enum of Predefined on FlowSizeWeightPairs +var FlowSizeWeightPairsPredefined = struct { + IMIX FlowSizeWeightPairsPredefinedEnum + IPSEC_IMIX FlowSizeWeightPairsPredefinedEnum + IPV6_IMIX FlowSizeWeightPairsPredefinedEnum + STANDARD_IMIX FlowSizeWeightPairsPredefinedEnum + TCP_IMIX FlowSizeWeightPairsPredefinedEnum +}{ + IMIX: FlowSizeWeightPairsPredefinedEnum("imix"), + IPSEC_IMIX: FlowSizeWeightPairsPredefinedEnum("ipsec_imix"), + IPV6_IMIX: FlowSizeWeightPairsPredefinedEnum("ipv6_imix"), + STANDARD_IMIX: FlowSizeWeightPairsPredefinedEnum("standard_imix"), + TCP_IMIX: FlowSizeWeightPairsPredefinedEnum("tcp_imix"), +} + +func (obj *flowSizeWeightPairs) Predefined() FlowSizeWeightPairsPredefinedEnum { + return FlowSizeWeightPairsPredefinedEnum(obj.obj.Predefined.Enum().String()) +} + +// Specify predefined frame size distribution pairs (including IMIX distribution). +// The available predefined distribution pairs are: +// - IMIX (64:7, 570:4, and 1518:1) +// - IPSec IMIX (90:58.67, 92:2, 594:23.66 and 1418:15.67) +// - IPv6 IMIX (60:58.67, 496:2, 594:23.66 and 1518:15.67) +// - Standard IMIX (58:58.67, 62:2, 594:23.66 and 1518:15.67) +// - TCP IMIX (90:58.67, 92:2, 594:23.66 and 1518:15.67) +// Predefined returns a string +func (obj *flowSizeWeightPairs) HasPredefined() bool { + return obj.obj.Predefined != nil +} + +func (obj *flowSizeWeightPairs) SetPredefined(value FlowSizeWeightPairsPredefinedEnum) FlowSizeWeightPairs { + intValue, ok := otg.FlowSizeWeightPairs_Predefined_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowSizeWeightPairsPredefinedEnum", string(value))) + return obj + } + enumValue := otg.FlowSizeWeightPairs_Predefined_Enum(intValue) + obj.obj.Predefined = &enumValue + + return obj +} + +// description is TBD +// Custom returns a []FlowSizeWeightPairsCustom +func (obj *flowSizeWeightPairs) Custom() FlowSizeWeightPairsFlowSizeWeightPairsCustomIter { + if len(obj.obj.Custom) == 0 { + obj.setChoice(FlowSizeWeightPairsChoice.CUSTOM) + } + if obj.customHolder == nil { + obj.customHolder = newFlowSizeWeightPairsFlowSizeWeightPairsCustomIter(&obj.obj.Custom).setMsg(obj) + } + return obj.customHolder +} + +type flowSizeWeightPairsFlowSizeWeightPairsCustomIter struct { + obj *flowSizeWeightPairs + flowSizeWeightPairsCustomSlice []FlowSizeWeightPairsCustom + fieldPtr *[]*otg.FlowSizeWeightPairsCustom +} + +func newFlowSizeWeightPairsFlowSizeWeightPairsCustomIter(ptr *[]*otg.FlowSizeWeightPairsCustom) FlowSizeWeightPairsFlowSizeWeightPairsCustomIter { + return &flowSizeWeightPairsFlowSizeWeightPairsCustomIter{fieldPtr: ptr} +} + +type FlowSizeWeightPairsFlowSizeWeightPairsCustomIter interface { + setMsg(*flowSizeWeightPairs) FlowSizeWeightPairsFlowSizeWeightPairsCustomIter + Items() []FlowSizeWeightPairsCustom + Add() FlowSizeWeightPairsCustom + Append(items ...FlowSizeWeightPairsCustom) FlowSizeWeightPairsFlowSizeWeightPairsCustomIter + Set(index int, newObj FlowSizeWeightPairsCustom) FlowSizeWeightPairsFlowSizeWeightPairsCustomIter + Clear() FlowSizeWeightPairsFlowSizeWeightPairsCustomIter + clearHolderSlice() FlowSizeWeightPairsFlowSizeWeightPairsCustomIter + appendHolderSlice(item FlowSizeWeightPairsCustom) FlowSizeWeightPairsFlowSizeWeightPairsCustomIter +} + +func (obj *flowSizeWeightPairsFlowSizeWeightPairsCustomIter) setMsg(msg *flowSizeWeightPairs) FlowSizeWeightPairsFlowSizeWeightPairsCustomIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flowSizeWeightPairsCustom{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *flowSizeWeightPairsFlowSizeWeightPairsCustomIter) Items() []FlowSizeWeightPairsCustom { + return obj.flowSizeWeightPairsCustomSlice +} + +func (obj *flowSizeWeightPairsFlowSizeWeightPairsCustomIter) Add() FlowSizeWeightPairsCustom { + newObj := &otg.FlowSizeWeightPairsCustom{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flowSizeWeightPairsCustom{obj: newObj} + newLibObj.setDefault() + obj.flowSizeWeightPairsCustomSlice = append(obj.flowSizeWeightPairsCustomSlice, newLibObj) + return newLibObj +} + +func (obj *flowSizeWeightPairsFlowSizeWeightPairsCustomIter) Append(items ...FlowSizeWeightPairsCustom) FlowSizeWeightPairsFlowSizeWeightPairsCustomIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowSizeWeightPairsCustomSlice = append(obj.flowSizeWeightPairsCustomSlice, item) + } + return obj +} + +func (obj *flowSizeWeightPairsFlowSizeWeightPairsCustomIter) Set(index int, newObj FlowSizeWeightPairsCustom) FlowSizeWeightPairsFlowSizeWeightPairsCustomIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowSizeWeightPairsCustomSlice[index] = newObj + return obj +} +func (obj *flowSizeWeightPairsFlowSizeWeightPairsCustomIter) Clear() FlowSizeWeightPairsFlowSizeWeightPairsCustomIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.FlowSizeWeightPairsCustom{} + obj.flowSizeWeightPairsCustomSlice = []FlowSizeWeightPairsCustom{} + } + return obj +} +func (obj *flowSizeWeightPairsFlowSizeWeightPairsCustomIter) clearHolderSlice() FlowSizeWeightPairsFlowSizeWeightPairsCustomIter { + if len(obj.flowSizeWeightPairsCustomSlice) > 0 { + obj.flowSizeWeightPairsCustomSlice = []FlowSizeWeightPairsCustom{} + } + return obj +} +func (obj *flowSizeWeightPairsFlowSizeWeightPairsCustomIter) appendHolderSlice(item FlowSizeWeightPairsCustom) FlowSizeWeightPairsFlowSizeWeightPairsCustomIter { + obj.flowSizeWeightPairsCustomSlice = append(obj.flowSizeWeightPairsCustomSlice, item) + return obj +} + +func (obj *flowSizeWeightPairs) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Custom) != 0 { + + if set_default { + obj.Custom().clearHolderSlice() + for _, item := range obj.obj.Custom { + obj.Custom().appendHolderSlice(&flowSizeWeightPairsCustom{obj: item}) + } + } + for _, item := range obj.Custom().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *flowSizeWeightPairs) setDefault() { + var choices_set int = 0 + var choice FlowSizeWeightPairsChoiceEnum + + if obj.obj.Predefined != nil && obj.obj.Predefined.Number() != 0 { + choices_set += 1 + choice = FlowSizeWeightPairsChoice.PREDEFINED + } + + if len(obj.obj.Custom) > 0 { + choices_set += 1 + choice = FlowSizeWeightPairsChoice.CUSTOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowSizeWeightPairsChoice.PREDEFINED) + if obj.obj.Predefined.Number() == 0 { + obj.SetPredefined(FlowSizeWeightPairsPredefined.IMIX) + + } + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowSizeWeightPairs") + } + } else { + intVal := otg.FlowSizeWeightPairs_Choice_Enum_value[string(choice)] + enumValue := otg.FlowSizeWeightPairs_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_size_weight_pairs_custom.go b/gosnappi/flow_size_weight_pairs_custom.go new file mode 100644 index 00000000..5c8b4779 --- /dev/null +++ b/gosnappi/flow_size_weight_pairs_custom.go @@ -0,0 +1,353 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowSizeWeightPairsCustom ***** +type flowSizeWeightPairsCustom struct { + validation + obj *otg.FlowSizeWeightPairsCustom + marshaller marshalFlowSizeWeightPairsCustom + unMarshaller unMarshalFlowSizeWeightPairsCustom +} + +func NewFlowSizeWeightPairsCustom() FlowSizeWeightPairsCustom { + obj := flowSizeWeightPairsCustom{obj: &otg.FlowSizeWeightPairsCustom{}} + obj.setDefault() + return &obj +} + +func (obj *flowSizeWeightPairsCustom) msg() *otg.FlowSizeWeightPairsCustom { + return obj.obj +} + +func (obj *flowSizeWeightPairsCustom) setMsg(msg *otg.FlowSizeWeightPairsCustom) FlowSizeWeightPairsCustom { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowSizeWeightPairsCustom struct { + obj *flowSizeWeightPairsCustom +} + +type marshalFlowSizeWeightPairsCustom interface { + // ToProto marshals FlowSizeWeightPairsCustom to protobuf object *otg.FlowSizeWeightPairsCustom + ToProto() (*otg.FlowSizeWeightPairsCustom, error) + // ToPbText marshals FlowSizeWeightPairsCustom to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowSizeWeightPairsCustom to YAML text + ToYaml() (string, error) + // ToJson marshals FlowSizeWeightPairsCustom to JSON text + ToJson() (string, error) +} + +type unMarshalflowSizeWeightPairsCustom struct { + obj *flowSizeWeightPairsCustom +} + +type unMarshalFlowSizeWeightPairsCustom interface { + // FromProto unmarshals FlowSizeWeightPairsCustom from protobuf object *otg.FlowSizeWeightPairsCustom + FromProto(msg *otg.FlowSizeWeightPairsCustom) (FlowSizeWeightPairsCustom, error) + // FromPbText unmarshals FlowSizeWeightPairsCustom from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowSizeWeightPairsCustom from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowSizeWeightPairsCustom from JSON text + FromJson(value string) error +} + +func (obj *flowSizeWeightPairsCustom) Marshal() marshalFlowSizeWeightPairsCustom { + if obj.marshaller == nil { + obj.marshaller = &marshalflowSizeWeightPairsCustom{obj: obj} + } + return obj.marshaller +} + +func (obj *flowSizeWeightPairsCustom) Unmarshal() unMarshalFlowSizeWeightPairsCustom { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowSizeWeightPairsCustom{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowSizeWeightPairsCustom) ToProto() (*otg.FlowSizeWeightPairsCustom, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowSizeWeightPairsCustom) FromProto(msg *otg.FlowSizeWeightPairsCustom) (FlowSizeWeightPairsCustom, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowSizeWeightPairsCustom) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowSizeWeightPairsCustom) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowSizeWeightPairsCustom) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSizeWeightPairsCustom) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowSizeWeightPairsCustom) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSizeWeightPairsCustom) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowSizeWeightPairsCustom) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowSizeWeightPairsCustom) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowSizeWeightPairsCustom) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowSizeWeightPairsCustom) Clone() (FlowSizeWeightPairsCustom, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowSizeWeightPairsCustom() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowSizeWeightPairsCustom is custom frame size distribution pair. +type FlowSizeWeightPairsCustom interface { + Validation + // msg marshals FlowSizeWeightPairsCustom to protobuf object *otg.FlowSizeWeightPairsCustom + // and doesn't set defaults + msg() *otg.FlowSizeWeightPairsCustom + // setMsg unmarshals FlowSizeWeightPairsCustom from protobuf object *otg.FlowSizeWeightPairsCustom + // and doesn't set defaults + setMsg(*otg.FlowSizeWeightPairsCustom) FlowSizeWeightPairsCustom + // provides marshal interface + Marshal() marshalFlowSizeWeightPairsCustom + // provides unmarshal interface + Unmarshal() unMarshalFlowSizeWeightPairsCustom + // validate validates FlowSizeWeightPairsCustom + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowSizeWeightPairsCustom, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Size returns uint32, set in FlowSizeWeightPairsCustom. + Size() uint32 + // SetSize assigns uint32 provided by user to FlowSizeWeightPairsCustom + SetSize(value uint32) FlowSizeWeightPairsCustom + // HasSize checks if Size has been set in FlowSizeWeightPairsCustom + HasSize() bool + // Weight returns float32, set in FlowSizeWeightPairsCustom. + Weight() float32 + // SetWeight assigns float32 provided by user to FlowSizeWeightPairsCustom + SetWeight(value float32) FlowSizeWeightPairsCustom + // HasWeight checks if Weight has been set in FlowSizeWeightPairsCustom + HasWeight() bool +} + +// The size of the frame (in bytes) for this weight pair. +// Size returns a uint32 +func (obj *flowSizeWeightPairsCustom) Size() uint32 { + + return *obj.obj.Size + +} + +// The size of the frame (in bytes) for this weight pair. +// Size returns a uint32 +func (obj *flowSizeWeightPairsCustom) HasSize() bool { + return obj.obj.Size != nil +} + +// The size of the frame (in bytes) for this weight pair. +// SetSize sets the uint32 value in the FlowSizeWeightPairsCustom object +func (obj *flowSizeWeightPairsCustom) SetSize(value uint32) FlowSizeWeightPairsCustom { + + obj.obj.Size = &value + return obj +} + +// Weight assigned to the corresponding frame size in this weight pair. +// Higher weight means more packets. +// Weight returns a float32 +func (obj *flowSizeWeightPairsCustom) Weight() float32 { + + return *obj.obj.Weight + +} + +// Weight assigned to the corresponding frame size in this weight pair. +// Higher weight means more packets. +// Weight returns a float32 +func (obj *flowSizeWeightPairsCustom) HasWeight() bool { + return obj.obj.Weight != nil +} + +// Weight assigned to the corresponding frame size in this weight pair. +// Higher weight means more packets. +// SetWeight sets the float32 value in the FlowSizeWeightPairsCustom object +func (obj *flowSizeWeightPairsCustom) SetWeight(value float32) FlowSizeWeightPairsCustom { + + obj.obj.Weight = &value + return obj +} + +func (obj *flowSizeWeightPairsCustom) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Size != nil { + + if *obj.obj.Size < 12 || *obj.obj.Size > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("12 <= FlowSizeWeightPairsCustom.Size <= 65535 but Got %d", *obj.obj.Size)) + } + + } + +} + +func (obj *flowSizeWeightPairsCustom) setDefault() { + if obj.obj.Size == nil { + obj.SetSize(64) + } + if obj.obj.Weight == nil { + obj.SetWeight(1) + } + +} diff --git a/gosnappi/flow_snmpv2_c.go b/gosnappi/flow_snmpv2_c.go new file mode 100644 index 00000000..d31c065b --- /dev/null +++ b/gosnappi/flow_snmpv2_c.go @@ -0,0 +1,407 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowSnmpv2C ***** +type flowSnmpv2C struct { + validation + obj *otg.FlowSnmpv2C + marshaller marshalFlowSnmpv2C + unMarshaller unMarshalFlowSnmpv2C + versionHolder PatternFlowSnmpv2CVersion + dataHolder FlowSnmpv2CData +} + +func NewFlowSnmpv2C() FlowSnmpv2C { + obj := flowSnmpv2C{obj: &otg.FlowSnmpv2C{}} + obj.setDefault() + return &obj +} + +func (obj *flowSnmpv2C) msg() *otg.FlowSnmpv2C { + return obj.obj +} + +func (obj *flowSnmpv2C) setMsg(msg *otg.FlowSnmpv2C) FlowSnmpv2C { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowSnmpv2C struct { + obj *flowSnmpv2C +} + +type marshalFlowSnmpv2C interface { + // ToProto marshals FlowSnmpv2C to protobuf object *otg.FlowSnmpv2C + ToProto() (*otg.FlowSnmpv2C, error) + // ToPbText marshals FlowSnmpv2C to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowSnmpv2C to YAML text + ToYaml() (string, error) + // ToJson marshals FlowSnmpv2C to JSON text + ToJson() (string, error) +} + +type unMarshalflowSnmpv2C struct { + obj *flowSnmpv2C +} + +type unMarshalFlowSnmpv2C interface { + // FromProto unmarshals FlowSnmpv2C from protobuf object *otg.FlowSnmpv2C + FromProto(msg *otg.FlowSnmpv2C) (FlowSnmpv2C, error) + // FromPbText unmarshals FlowSnmpv2C from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowSnmpv2C from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowSnmpv2C from JSON text + FromJson(value string) error +} + +func (obj *flowSnmpv2C) Marshal() marshalFlowSnmpv2C { + if obj.marshaller == nil { + obj.marshaller = &marshalflowSnmpv2C{obj: obj} + } + return obj.marshaller +} + +func (obj *flowSnmpv2C) Unmarshal() unMarshalFlowSnmpv2C { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowSnmpv2C{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowSnmpv2C) ToProto() (*otg.FlowSnmpv2C, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowSnmpv2C) FromProto(msg *otg.FlowSnmpv2C) (FlowSnmpv2C, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowSnmpv2C) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowSnmpv2C) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowSnmpv2C) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSnmpv2C) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowSnmpv2C) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSnmpv2C) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowSnmpv2C) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowSnmpv2C) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowSnmpv2C) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowSnmpv2C) Clone() (FlowSnmpv2C, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowSnmpv2C() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowSnmpv2C) setNil() { + obj.versionHolder = nil + obj.dataHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowSnmpv2C is sNMPv2C packet header as defined in RFC1901 and RFC3416. +type FlowSnmpv2C interface { + Validation + // msg marshals FlowSnmpv2C to protobuf object *otg.FlowSnmpv2C + // and doesn't set defaults + msg() *otg.FlowSnmpv2C + // setMsg unmarshals FlowSnmpv2C from protobuf object *otg.FlowSnmpv2C + // and doesn't set defaults + setMsg(*otg.FlowSnmpv2C) FlowSnmpv2C + // provides marshal interface + Marshal() marshalFlowSnmpv2C + // provides unmarshal interface + Unmarshal() unMarshalFlowSnmpv2C + // validate validates FlowSnmpv2C + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowSnmpv2C, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Version returns PatternFlowSnmpv2CVersion, set in FlowSnmpv2C. + Version() PatternFlowSnmpv2CVersion + // SetVersion assigns PatternFlowSnmpv2CVersion provided by user to FlowSnmpv2C. + SetVersion(value PatternFlowSnmpv2CVersion) FlowSnmpv2C + // HasVersion checks if Version has been set in FlowSnmpv2C + HasVersion() bool + // Community returns string, set in FlowSnmpv2C. + Community() string + // SetCommunity assigns string provided by user to FlowSnmpv2C + SetCommunity(value string) FlowSnmpv2C + // HasCommunity checks if Community has been set in FlowSnmpv2C + HasCommunity() bool + // Data returns FlowSnmpv2CData, set in FlowSnmpv2C. + Data() FlowSnmpv2CData + // SetData assigns FlowSnmpv2CData provided by user to FlowSnmpv2C. + SetData(value FlowSnmpv2CData) FlowSnmpv2C + setNil() +} + +// description is TBD +// Version returns a PatternFlowSnmpv2CVersion +func (obj *flowSnmpv2C) Version() PatternFlowSnmpv2CVersion { + if obj.obj.Version == nil { + obj.obj.Version = NewPatternFlowSnmpv2CVersion().msg() + } + if obj.versionHolder == nil { + obj.versionHolder = &patternFlowSnmpv2CVersion{obj: obj.obj.Version} + } + return obj.versionHolder +} + +// description is TBD +// Version returns a PatternFlowSnmpv2CVersion +func (obj *flowSnmpv2C) HasVersion() bool { + return obj.obj.Version != nil +} + +// description is TBD +// SetVersion sets the PatternFlowSnmpv2CVersion value in the FlowSnmpv2C object +func (obj *flowSnmpv2C) SetVersion(value PatternFlowSnmpv2CVersion) FlowSnmpv2C { + + obj.versionHolder = nil + obj.obj.Version = value.msg() + + return obj +} + +// It is an ASCII based octet string which identifies the SNMP community in which the sender and recipient of this message are located. It should match the read-only or read-write community string configured on the recipient for the PDU to be accepted. +// Community returns a string +func (obj *flowSnmpv2C) Community() string { + + return *obj.obj.Community + +} + +// It is an ASCII based octet string which identifies the SNMP community in which the sender and recipient of this message are located. It should match the read-only or read-write community string configured on the recipient for the PDU to be accepted. +// Community returns a string +func (obj *flowSnmpv2C) HasCommunity() bool { + return obj.obj.Community != nil +} + +// It is an ASCII based octet string which identifies the SNMP community in which the sender and recipient of this message are located. It should match the read-only or read-write community string configured on the recipient for the PDU to be accepted. +// SetCommunity sets the string value in the FlowSnmpv2C object +func (obj *flowSnmpv2C) SetCommunity(value string) FlowSnmpv2C { + + obj.obj.Community = &value + return obj +} + +// description is TBD +// Data returns a FlowSnmpv2CData +func (obj *flowSnmpv2C) Data() FlowSnmpv2CData { + if obj.obj.Data == nil { + obj.obj.Data = NewFlowSnmpv2CData().msg() + } + if obj.dataHolder == nil { + obj.dataHolder = &flowSnmpv2CData{obj: obj.obj.Data} + } + return obj.dataHolder +} + +// description is TBD +// SetData sets the FlowSnmpv2CData value in the FlowSnmpv2C object +func (obj *flowSnmpv2C) SetData(value FlowSnmpv2CData) FlowSnmpv2C { + + obj.dataHolder = nil + obj.obj.Data = value.msg() + + return obj +} + +func (obj *flowSnmpv2C) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Version != nil { + + obj.Version().validateObj(vObj, set_default) + } + + if obj.obj.Community != nil { + + if len(*obj.obj.Community) > 10000 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "None <= length of FlowSnmpv2C.Community <= 10000 but Got %d", + len(*obj.obj.Community))) + } + + } + + // Data is required + if obj.obj.Data == nil { + vObj.validationErrors = append(vObj.validationErrors, "Data is required field on interface FlowSnmpv2C") + } + + if obj.obj.Data != nil { + + obj.Data().validateObj(vObj, set_default) + } + +} + +func (obj *flowSnmpv2C) setDefault() { + if obj.obj.Community == nil { + obj.SetCommunity("community") + } + +} diff --git a/gosnappi/flow_snmpv2_c_bulk_pdu.go b/gosnappi/flow_snmpv2_c_bulk_pdu.go new file mode 100644 index 00000000..b8f393d1 --- /dev/null +++ b/gosnappi/flow_snmpv2_c_bulk_pdu.go @@ -0,0 +1,513 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowSnmpv2CBulkPDU ***** +type flowSnmpv2CBulkPDU struct { + validation + obj *otg.FlowSnmpv2CBulkPDU + marshaller marshalFlowSnmpv2CBulkPDU + unMarshaller unMarshalFlowSnmpv2CBulkPDU + requestIdHolder PatternFlowSnmpv2CBulkPDURequestId + nonRepeatersHolder PatternFlowSnmpv2CBulkPDUNonRepeaters + maxRepetitionsHolder PatternFlowSnmpv2CBulkPDUMaxRepetitions + variableBindingsHolder FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter +} + +func NewFlowSnmpv2CBulkPDU() FlowSnmpv2CBulkPDU { + obj := flowSnmpv2CBulkPDU{obj: &otg.FlowSnmpv2CBulkPDU{}} + obj.setDefault() + return &obj +} + +func (obj *flowSnmpv2CBulkPDU) msg() *otg.FlowSnmpv2CBulkPDU { + return obj.obj +} + +func (obj *flowSnmpv2CBulkPDU) setMsg(msg *otg.FlowSnmpv2CBulkPDU) FlowSnmpv2CBulkPDU { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowSnmpv2CBulkPDU struct { + obj *flowSnmpv2CBulkPDU +} + +type marshalFlowSnmpv2CBulkPDU interface { + // ToProto marshals FlowSnmpv2CBulkPDU to protobuf object *otg.FlowSnmpv2CBulkPDU + ToProto() (*otg.FlowSnmpv2CBulkPDU, error) + // ToPbText marshals FlowSnmpv2CBulkPDU to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowSnmpv2CBulkPDU to YAML text + ToYaml() (string, error) + // ToJson marshals FlowSnmpv2CBulkPDU to JSON text + ToJson() (string, error) +} + +type unMarshalflowSnmpv2CBulkPDU struct { + obj *flowSnmpv2CBulkPDU +} + +type unMarshalFlowSnmpv2CBulkPDU interface { + // FromProto unmarshals FlowSnmpv2CBulkPDU from protobuf object *otg.FlowSnmpv2CBulkPDU + FromProto(msg *otg.FlowSnmpv2CBulkPDU) (FlowSnmpv2CBulkPDU, error) + // FromPbText unmarshals FlowSnmpv2CBulkPDU from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowSnmpv2CBulkPDU from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowSnmpv2CBulkPDU from JSON text + FromJson(value string) error +} + +func (obj *flowSnmpv2CBulkPDU) Marshal() marshalFlowSnmpv2CBulkPDU { + if obj.marshaller == nil { + obj.marshaller = &marshalflowSnmpv2CBulkPDU{obj: obj} + } + return obj.marshaller +} + +func (obj *flowSnmpv2CBulkPDU) Unmarshal() unMarshalFlowSnmpv2CBulkPDU { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowSnmpv2CBulkPDU{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowSnmpv2CBulkPDU) ToProto() (*otg.FlowSnmpv2CBulkPDU, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowSnmpv2CBulkPDU) FromProto(msg *otg.FlowSnmpv2CBulkPDU) (FlowSnmpv2CBulkPDU, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowSnmpv2CBulkPDU) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowSnmpv2CBulkPDU) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowSnmpv2CBulkPDU) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSnmpv2CBulkPDU) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowSnmpv2CBulkPDU) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSnmpv2CBulkPDU) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowSnmpv2CBulkPDU) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowSnmpv2CBulkPDU) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowSnmpv2CBulkPDU) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowSnmpv2CBulkPDU) Clone() (FlowSnmpv2CBulkPDU, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowSnmpv2CBulkPDU() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowSnmpv2CBulkPDU) setNil() { + obj.requestIdHolder = nil + obj.nonRepeatersHolder = nil + obj.maxRepetitionsHolder = nil + obj.variableBindingsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowSnmpv2CBulkPDU is the purpose of the GetBulkRequest-PDU is to request the transfer of a potentially large amount of data, including, but not limited to, the efficient and rapid retrieval of large tables. +type FlowSnmpv2CBulkPDU interface { + Validation + // msg marshals FlowSnmpv2CBulkPDU to protobuf object *otg.FlowSnmpv2CBulkPDU + // and doesn't set defaults + msg() *otg.FlowSnmpv2CBulkPDU + // setMsg unmarshals FlowSnmpv2CBulkPDU from protobuf object *otg.FlowSnmpv2CBulkPDU + // and doesn't set defaults + setMsg(*otg.FlowSnmpv2CBulkPDU) FlowSnmpv2CBulkPDU + // provides marshal interface + Marshal() marshalFlowSnmpv2CBulkPDU + // provides unmarshal interface + Unmarshal() unMarshalFlowSnmpv2CBulkPDU + // validate validates FlowSnmpv2CBulkPDU + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowSnmpv2CBulkPDU, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RequestId returns PatternFlowSnmpv2CBulkPDURequestId, set in FlowSnmpv2CBulkPDU. + RequestId() PatternFlowSnmpv2CBulkPDURequestId + // SetRequestId assigns PatternFlowSnmpv2CBulkPDURequestId provided by user to FlowSnmpv2CBulkPDU. + SetRequestId(value PatternFlowSnmpv2CBulkPDURequestId) FlowSnmpv2CBulkPDU + // HasRequestId checks if RequestId has been set in FlowSnmpv2CBulkPDU + HasRequestId() bool + // NonRepeaters returns PatternFlowSnmpv2CBulkPDUNonRepeaters, set in FlowSnmpv2CBulkPDU. + NonRepeaters() PatternFlowSnmpv2CBulkPDUNonRepeaters + // SetNonRepeaters assigns PatternFlowSnmpv2CBulkPDUNonRepeaters provided by user to FlowSnmpv2CBulkPDU. + SetNonRepeaters(value PatternFlowSnmpv2CBulkPDUNonRepeaters) FlowSnmpv2CBulkPDU + // HasNonRepeaters checks if NonRepeaters has been set in FlowSnmpv2CBulkPDU + HasNonRepeaters() bool + // MaxRepetitions returns PatternFlowSnmpv2CBulkPDUMaxRepetitions, set in FlowSnmpv2CBulkPDU. + MaxRepetitions() PatternFlowSnmpv2CBulkPDUMaxRepetitions + // SetMaxRepetitions assigns PatternFlowSnmpv2CBulkPDUMaxRepetitions provided by user to FlowSnmpv2CBulkPDU. + SetMaxRepetitions(value PatternFlowSnmpv2CBulkPDUMaxRepetitions) FlowSnmpv2CBulkPDU + // HasMaxRepetitions checks if MaxRepetitions has been set in FlowSnmpv2CBulkPDU + HasMaxRepetitions() bool + // VariableBindings returns FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIterIter, set in FlowSnmpv2CBulkPDU + VariableBindings() FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter + setNil() +} + +// description is TBD +// RequestId returns a PatternFlowSnmpv2CBulkPDURequestId +func (obj *flowSnmpv2CBulkPDU) RequestId() PatternFlowSnmpv2CBulkPDURequestId { + if obj.obj.RequestId == nil { + obj.obj.RequestId = NewPatternFlowSnmpv2CBulkPDURequestId().msg() + } + if obj.requestIdHolder == nil { + obj.requestIdHolder = &patternFlowSnmpv2CBulkPDURequestId{obj: obj.obj.RequestId} + } + return obj.requestIdHolder +} + +// description is TBD +// RequestId returns a PatternFlowSnmpv2CBulkPDURequestId +func (obj *flowSnmpv2CBulkPDU) HasRequestId() bool { + return obj.obj.RequestId != nil +} + +// description is TBD +// SetRequestId sets the PatternFlowSnmpv2CBulkPDURequestId value in the FlowSnmpv2CBulkPDU object +func (obj *flowSnmpv2CBulkPDU) SetRequestId(value PatternFlowSnmpv2CBulkPDURequestId) FlowSnmpv2CBulkPDU { + + obj.requestIdHolder = nil + obj.obj.RequestId = value.msg() + + return obj +} + +// description is TBD +// NonRepeaters returns a PatternFlowSnmpv2CBulkPDUNonRepeaters +func (obj *flowSnmpv2CBulkPDU) NonRepeaters() PatternFlowSnmpv2CBulkPDUNonRepeaters { + if obj.obj.NonRepeaters == nil { + obj.obj.NonRepeaters = NewPatternFlowSnmpv2CBulkPDUNonRepeaters().msg() + } + if obj.nonRepeatersHolder == nil { + obj.nonRepeatersHolder = &patternFlowSnmpv2CBulkPDUNonRepeaters{obj: obj.obj.NonRepeaters} + } + return obj.nonRepeatersHolder +} + +// description is TBD +// NonRepeaters returns a PatternFlowSnmpv2CBulkPDUNonRepeaters +func (obj *flowSnmpv2CBulkPDU) HasNonRepeaters() bool { + return obj.obj.NonRepeaters != nil +} + +// description is TBD +// SetNonRepeaters sets the PatternFlowSnmpv2CBulkPDUNonRepeaters value in the FlowSnmpv2CBulkPDU object +func (obj *flowSnmpv2CBulkPDU) SetNonRepeaters(value PatternFlowSnmpv2CBulkPDUNonRepeaters) FlowSnmpv2CBulkPDU { + + obj.nonRepeatersHolder = nil + obj.obj.NonRepeaters = value.msg() + + return obj +} + +// description is TBD +// MaxRepetitions returns a PatternFlowSnmpv2CBulkPDUMaxRepetitions +func (obj *flowSnmpv2CBulkPDU) MaxRepetitions() PatternFlowSnmpv2CBulkPDUMaxRepetitions { + if obj.obj.MaxRepetitions == nil { + obj.obj.MaxRepetitions = NewPatternFlowSnmpv2CBulkPDUMaxRepetitions().msg() + } + if obj.maxRepetitionsHolder == nil { + obj.maxRepetitionsHolder = &patternFlowSnmpv2CBulkPDUMaxRepetitions{obj: obj.obj.MaxRepetitions} + } + return obj.maxRepetitionsHolder +} + +// description is TBD +// MaxRepetitions returns a PatternFlowSnmpv2CBulkPDUMaxRepetitions +func (obj *flowSnmpv2CBulkPDU) HasMaxRepetitions() bool { + return obj.obj.MaxRepetitions != nil +} + +// description is TBD +// SetMaxRepetitions sets the PatternFlowSnmpv2CBulkPDUMaxRepetitions value in the FlowSnmpv2CBulkPDU object +func (obj *flowSnmpv2CBulkPDU) SetMaxRepetitions(value PatternFlowSnmpv2CBulkPDUMaxRepetitions) FlowSnmpv2CBulkPDU { + + obj.maxRepetitionsHolder = nil + obj.obj.MaxRepetitions = value.msg() + + return obj +} + +// A Sequence of variable_bindings. +// VariableBindings returns a []FlowSnmpv2CVariableBinding +func (obj *flowSnmpv2CBulkPDU) VariableBindings() FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter { + if len(obj.obj.VariableBindings) == 0 { + obj.obj.VariableBindings = []*otg.FlowSnmpv2CVariableBinding{} + } + if obj.variableBindingsHolder == nil { + obj.variableBindingsHolder = newFlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter(&obj.obj.VariableBindings).setMsg(obj) + } + return obj.variableBindingsHolder +} + +type flowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter struct { + obj *flowSnmpv2CBulkPDU + flowSnmpv2CVariableBindingSlice []FlowSnmpv2CVariableBinding + fieldPtr *[]*otg.FlowSnmpv2CVariableBinding +} + +func newFlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter(ptr *[]*otg.FlowSnmpv2CVariableBinding) FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter { + return &flowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter{fieldPtr: ptr} +} + +type FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter interface { + setMsg(*flowSnmpv2CBulkPDU) FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter + Items() []FlowSnmpv2CVariableBinding + Add() FlowSnmpv2CVariableBinding + Append(items ...FlowSnmpv2CVariableBinding) FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter + Set(index int, newObj FlowSnmpv2CVariableBinding) FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter + Clear() FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter + clearHolderSlice() FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter + appendHolderSlice(item FlowSnmpv2CVariableBinding) FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter +} + +func (obj *flowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter) setMsg(msg *flowSnmpv2CBulkPDU) FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flowSnmpv2CVariableBinding{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *flowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter) Items() []FlowSnmpv2CVariableBinding { + return obj.flowSnmpv2CVariableBindingSlice +} + +func (obj *flowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter) Add() FlowSnmpv2CVariableBinding { + newObj := &otg.FlowSnmpv2CVariableBinding{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flowSnmpv2CVariableBinding{obj: newObj} + newLibObj.setDefault() + obj.flowSnmpv2CVariableBindingSlice = append(obj.flowSnmpv2CVariableBindingSlice, newLibObj) + return newLibObj +} + +func (obj *flowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter) Append(items ...FlowSnmpv2CVariableBinding) FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowSnmpv2CVariableBindingSlice = append(obj.flowSnmpv2CVariableBindingSlice, item) + } + return obj +} + +func (obj *flowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter) Set(index int, newObj FlowSnmpv2CVariableBinding) FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowSnmpv2CVariableBindingSlice[index] = newObj + return obj +} +func (obj *flowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter) Clear() FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.FlowSnmpv2CVariableBinding{} + obj.flowSnmpv2CVariableBindingSlice = []FlowSnmpv2CVariableBinding{} + } + return obj +} +func (obj *flowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter) clearHolderSlice() FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter { + if len(obj.flowSnmpv2CVariableBindingSlice) > 0 { + obj.flowSnmpv2CVariableBindingSlice = []FlowSnmpv2CVariableBinding{} + } + return obj +} +func (obj *flowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter) appendHolderSlice(item FlowSnmpv2CVariableBinding) FlowSnmpv2CBulkPDUFlowSnmpv2CVariableBindingIter { + obj.flowSnmpv2CVariableBindingSlice = append(obj.flowSnmpv2CVariableBindingSlice, item) + return obj +} + +func (obj *flowSnmpv2CBulkPDU) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RequestId != nil { + + obj.RequestId().validateObj(vObj, set_default) + } + + if obj.obj.NonRepeaters != nil { + + obj.NonRepeaters().validateObj(vObj, set_default) + } + + if obj.obj.MaxRepetitions != nil { + + obj.MaxRepetitions().validateObj(vObj, set_default) + } + + if len(obj.obj.VariableBindings) != 0 { + + if set_default { + obj.VariableBindings().clearHolderSlice() + for _, item := range obj.obj.VariableBindings { + obj.VariableBindings().appendHolderSlice(&flowSnmpv2CVariableBinding{obj: item}) + } + } + for _, item := range obj.VariableBindings().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *flowSnmpv2CBulkPDU) setDefault() { + +} diff --git a/gosnappi/flow_snmpv2_c_data.go b/gosnappi/flow_snmpv2_c_data.go new file mode 100644 index 00000000..4b31a2e4 --- /dev/null +++ b/gosnappi/flow_snmpv2_c_data.go @@ -0,0 +1,766 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowSnmpv2CData ***** +type flowSnmpv2CData struct { + validation + obj *otg.FlowSnmpv2CData + marshaller marshalFlowSnmpv2CData + unMarshaller unMarshalFlowSnmpv2CData + getRequestHolder FlowSnmpv2CPDU + getNextRequestHolder FlowSnmpv2CPDU + responseHolder FlowSnmpv2CPDU + setRequestHolder FlowSnmpv2CPDU + getBulkRequestHolder FlowSnmpv2CBulkPDU + informRequestHolder FlowSnmpv2CPDU + snmpv2TrapHolder FlowSnmpv2CPDU + reportHolder FlowSnmpv2CPDU +} + +func NewFlowSnmpv2CData() FlowSnmpv2CData { + obj := flowSnmpv2CData{obj: &otg.FlowSnmpv2CData{}} + obj.setDefault() + return &obj +} + +func (obj *flowSnmpv2CData) msg() *otg.FlowSnmpv2CData { + return obj.obj +} + +func (obj *flowSnmpv2CData) setMsg(msg *otg.FlowSnmpv2CData) FlowSnmpv2CData { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowSnmpv2CData struct { + obj *flowSnmpv2CData +} + +type marshalFlowSnmpv2CData interface { + // ToProto marshals FlowSnmpv2CData to protobuf object *otg.FlowSnmpv2CData + ToProto() (*otg.FlowSnmpv2CData, error) + // ToPbText marshals FlowSnmpv2CData to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowSnmpv2CData to YAML text + ToYaml() (string, error) + // ToJson marshals FlowSnmpv2CData to JSON text + ToJson() (string, error) +} + +type unMarshalflowSnmpv2CData struct { + obj *flowSnmpv2CData +} + +type unMarshalFlowSnmpv2CData interface { + // FromProto unmarshals FlowSnmpv2CData from protobuf object *otg.FlowSnmpv2CData + FromProto(msg *otg.FlowSnmpv2CData) (FlowSnmpv2CData, error) + // FromPbText unmarshals FlowSnmpv2CData from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowSnmpv2CData from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowSnmpv2CData from JSON text + FromJson(value string) error +} + +func (obj *flowSnmpv2CData) Marshal() marshalFlowSnmpv2CData { + if obj.marshaller == nil { + obj.marshaller = &marshalflowSnmpv2CData{obj: obj} + } + return obj.marshaller +} + +func (obj *flowSnmpv2CData) Unmarshal() unMarshalFlowSnmpv2CData { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowSnmpv2CData{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowSnmpv2CData) ToProto() (*otg.FlowSnmpv2CData, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowSnmpv2CData) FromProto(msg *otg.FlowSnmpv2CData) (FlowSnmpv2CData, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowSnmpv2CData) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowSnmpv2CData) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowSnmpv2CData) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSnmpv2CData) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowSnmpv2CData) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSnmpv2CData) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowSnmpv2CData) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowSnmpv2CData) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowSnmpv2CData) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowSnmpv2CData) Clone() (FlowSnmpv2CData, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowSnmpv2CData() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowSnmpv2CData) setNil() { + obj.getRequestHolder = nil + obj.getNextRequestHolder = nil + obj.responseHolder = nil + obj.setRequestHolder = nil + obj.getBulkRequestHolder = nil + obj.informRequestHolder = nil + obj.snmpv2TrapHolder = nil + obj.reportHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowSnmpv2CData is this contains the body of the SNMPv2C message. +// +// - Encoding of subsequent fields follow ASN.1 specification. +// Refer: http://www.itu.int/ITU-T/asn1 +type FlowSnmpv2CData interface { + Validation + // msg marshals FlowSnmpv2CData to protobuf object *otg.FlowSnmpv2CData + // and doesn't set defaults + msg() *otg.FlowSnmpv2CData + // setMsg unmarshals FlowSnmpv2CData from protobuf object *otg.FlowSnmpv2CData + // and doesn't set defaults + setMsg(*otg.FlowSnmpv2CData) FlowSnmpv2CData + // provides marshal interface + Marshal() marshalFlowSnmpv2CData + // provides unmarshal interface + Unmarshal() unMarshalFlowSnmpv2CData + // validate validates FlowSnmpv2CData + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowSnmpv2CData, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowSnmpv2CDataChoiceEnum, set in FlowSnmpv2CData + Choice() FlowSnmpv2CDataChoiceEnum + // setChoice assigns FlowSnmpv2CDataChoiceEnum provided by user to FlowSnmpv2CData + setChoice(value FlowSnmpv2CDataChoiceEnum) FlowSnmpv2CData + // GetRequest returns FlowSnmpv2CPDU, set in FlowSnmpv2CData. + GetRequest() FlowSnmpv2CPDU + // SetGetRequest assigns FlowSnmpv2CPDU provided by user to FlowSnmpv2CData. + SetGetRequest(value FlowSnmpv2CPDU) FlowSnmpv2CData + // HasGetRequest checks if GetRequest has been set in FlowSnmpv2CData + HasGetRequest() bool + // GetNextRequest returns FlowSnmpv2CPDU, set in FlowSnmpv2CData. + GetNextRequest() FlowSnmpv2CPDU + // SetGetNextRequest assigns FlowSnmpv2CPDU provided by user to FlowSnmpv2CData. + SetGetNextRequest(value FlowSnmpv2CPDU) FlowSnmpv2CData + // HasGetNextRequest checks if GetNextRequest has been set in FlowSnmpv2CData + HasGetNextRequest() bool + // Response returns FlowSnmpv2CPDU, set in FlowSnmpv2CData. + Response() FlowSnmpv2CPDU + // SetResponse assigns FlowSnmpv2CPDU provided by user to FlowSnmpv2CData. + SetResponse(value FlowSnmpv2CPDU) FlowSnmpv2CData + // HasResponse checks if Response has been set in FlowSnmpv2CData + HasResponse() bool + // SetRequest returns FlowSnmpv2CPDU, set in FlowSnmpv2CData. + SetRequest() FlowSnmpv2CPDU + // SetSetRequest assigns FlowSnmpv2CPDU provided by user to FlowSnmpv2CData. + SetSetRequest(value FlowSnmpv2CPDU) FlowSnmpv2CData + // HasSetRequest checks if SetRequest has been set in FlowSnmpv2CData + HasSetRequest() bool + // GetBulkRequest returns FlowSnmpv2CBulkPDU, set in FlowSnmpv2CData. + GetBulkRequest() FlowSnmpv2CBulkPDU + // SetGetBulkRequest assigns FlowSnmpv2CBulkPDU provided by user to FlowSnmpv2CData. + SetGetBulkRequest(value FlowSnmpv2CBulkPDU) FlowSnmpv2CData + // HasGetBulkRequest checks if GetBulkRequest has been set in FlowSnmpv2CData + HasGetBulkRequest() bool + // InformRequest returns FlowSnmpv2CPDU, set in FlowSnmpv2CData. + InformRequest() FlowSnmpv2CPDU + // SetInformRequest assigns FlowSnmpv2CPDU provided by user to FlowSnmpv2CData. + SetInformRequest(value FlowSnmpv2CPDU) FlowSnmpv2CData + // HasInformRequest checks if InformRequest has been set in FlowSnmpv2CData + HasInformRequest() bool + // Snmpv2Trap returns FlowSnmpv2CPDU, set in FlowSnmpv2CData. + Snmpv2Trap() FlowSnmpv2CPDU + // SetSnmpv2Trap assigns FlowSnmpv2CPDU provided by user to FlowSnmpv2CData. + SetSnmpv2Trap(value FlowSnmpv2CPDU) FlowSnmpv2CData + // HasSnmpv2Trap checks if Snmpv2Trap has been set in FlowSnmpv2CData + HasSnmpv2Trap() bool + // Report returns FlowSnmpv2CPDU, set in FlowSnmpv2CData. + Report() FlowSnmpv2CPDU + // SetReport assigns FlowSnmpv2CPDU provided by user to FlowSnmpv2CData. + SetReport(value FlowSnmpv2CPDU) FlowSnmpv2CData + // HasReport checks if Report has been set in FlowSnmpv2CData + HasReport() bool + setNil() +} + +type FlowSnmpv2CDataChoiceEnum string + +// Enum of Choice on FlowSnmpv2CData +var FlowSnmpv2CDataChoice = struct { + GET_REQUEST FlowSnmpv2CDataChoiceEnum + GET_NEXT_REQUEST FlowSnmpv2CDataChoiceEnum + RESPONSE FlowSnmpv2CDataChoiceEnum + SET_REQUEST FlowSnmpv2CDataChoiceEnum + GET_BULK_REQUEST FlowSnmpv2CDataChoiceEnum + INFORM_REQUEST FlowSnmpv2CDataChoiceEnum + SNMPV2_TRAP FlowSnmpv2CDataChoiceEnum + REPORT FlowSnmpv2CDataChoiceEnum +}{ + GET_REQUEST: FlowSnmpv2CDataChoiceEnum("get_request"), + GET_NEXT_REQUEST: FlowSnmpv2CDataChoiceEnum("get_next_request"), + RESPONSE: FlowSnmpv2CDataChoiceEnum("response"), + SET_REQUEST: FlowSnmpv2CDataChoiceEnum("set_request"), + GET_BULK_REQUEST: FlowSnmpv2CDataChoiceEnum("get_bulk_request"), + INFORM_REQUEST: FlowSnmpv2CDataChoiceEnum("inform_request"), + SNMPV2_TRAP: FlowSnmpv2CDataChoiceEnum("snmpv2_trap"), + REPORT: FlowSnmpv2CDataChoiceEnum("report"), +} + +func (obj *flowSnmpv2CData) Choice() FlowSnmpv2CDataChoiceEnum { + return FlowSnmpv2CDataChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *flowSnmpv2CData) setChoice(value FlowSnmpv2CDataChoiceEnum) FlowSnmpv2CData { + intValue, ok := otg.FlowSnmpv2CData_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowSnmpv2CDataChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowSnmpv2CData_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Report = nil + obj.reportHolder = nil + obj.obj.Snmpv2Trap = nil + obj.snmpv2TrapHolder = nil + obj.obj.InformRequest = nil + obj.informRequestHolder = nil + obj.obj.GetBulkRequest = nil + obj.getBulkRequestHolder = nil + obj.obj.SetRequest = nil + obj.setRequestHolder = nil + obj.obj.Response = nil + obj.responseHolder = nil + obj.obj.GetNextRequest = nil + obj.getNextRequestHolder = nil + obj.obj.GetRequest = nil + obj.getRequestHolder = nil + + if value == FlowSnmpv2CDataChoice.GET_REQUEST { + obj.obj.GetRequest = NewFlowSnmpv2CPDU().msg() + } + + if value == FlowSnmpv2CDataChoice.GET_NEXT_REQUEST { + obj.obj.GetNextRequest = NewFlowSnmpv2CPDU().msg() + } + + if value == FlowSnmpv2CDataChoice.RESPONSE { + obj.obj.Response = NewFlowSnmpv2CPDU().msg() + } + + if value == FlowSnmpv2CDataChoice.SET_REQUEST { + obj.obj.SetRequest = NewFlowSnmpv2CPDU().msg() + } + + if value == FlowSnmpv2CDataChoice.GET_BULK_REQUEST { + obj.obj.GetBulkRequest = NewFlowSnmpv2CBulkPDU().msg() + } + + if value == FlowSnmpv2CDataChoice.INFORM_REQUEST { + obj.obj.InformRequest = NewFlowSnmpv2CPDU().msg() + } + + if value == FlowSnmpv2CDataChoice.SNMPV2_TRAP { + obj.obj.Snmpv2Trap = NewFlowSnmpv2CPDU().msg() + } + + if value == FlowSnmpv2CDataChoice.REPORT { + obj.obj.Report = NewFlowSnmpv2CPDU().msg() + } + + return obj +} + +// description is TBD +// GetRequest returns a FlowSnmpv2CPDU +func (obj *flowSnmpv2CData) GetRequest() FlowSnmpv2CPDU { + if obj.obj.GetRequest == nil { + obj.setChoice(FlowSnmpv2CDataChoice.GET_REQUEST) + } + if obj.getRequestHolder == nil { + obj.getRequestHolder = &flowSnmpv2CPDU{obj: obj.obj.GetRequest} + } + return obj.getRequestHolder +} + +// description is TBD +// GetRequest returns a FlowSnmpv2CPDU +func (obj *flowSnmpv2CData) HasGetRequest() bool { + return obj.obj.GetRequest != nil +} + +// description is TBD +// SetGetRequest sets the FlowSnmpv2CPDU value in the FlowSnmpv2CData object +func (obj *flowSnmpv2CData) SetGetRequest(value FlowSnmpv2CPDU) FlowSnmpv2CData { + obj.setChoice(FlowSnmpv2CDataChoice.GET_REQUEST) + obj.getRequestHolder = nil + obj.obj.GetRequest = value.msg() + + return obj +} + +// description is TBD +// GetNextRequest returns a FlowSnmpv2CPDU +func (obj *flowSnmpv2CData) GetNextRequest() FlowSnmpv2CPDU { + if obj.obj.GetNextRequest == nil { + obj.setChoice(FlowSnmpv2CDataChoice.GET_NEXT_REQUEST) + } + if obj.getNextRequestHolder == nil { + obj.getNextRequestHolder = &flowSnmpv2CPDU{obj: obj.obj.GetNextRequest} + } + return obj.getNextRequestHolder +} + +// description is TBD +// GetNextRequest returns a FlowSnmpv2CPDU +func (obj *flowSnmpv2CData) HasGetNextRequest() bool { + return obj.obj.GetNextRequest != nil +} + +// description is TBD +// SetGetNextRequest sets the FlowSnmpv2CPDU value in the FlowSnmpv2CData object +func (obj *flowSnmpv2CData) SetGetNextRequest(value FlowSnmpv2CPDU) FlowSnmpv2CData { + obj.setChoice(FlowSnmpv2CDataChoice.GET_NEXT_REQUEST) + obj.getNextRequestHolder = nil + obj.obj.GetNextRequest = value.msg() + + return obj +} + +// description is TBD +// Response returns a FlowSnmpv2CPDU +func (obj *flowSnmpv2CData) Response() FlowSnmpv2CPDU { + if obj.obj.Response == nil { + obj.setChoice(FlowSnmpv2CDataChoice.RESPONSE) + } + if obj.responseHolder == nil { + obj.responseHolder = &flowSnmpv2CPDU{obj: obj.obj.Response} + } + return obj.responseHolder +} + +// description is TBD +// Response returns a FlowSnmpv2CPDU +func (obj *flowSnmpv2CData) HasResponse() bool { + return obj.obj.Response != nil +} + +// description is TBD +// SetResponse sets the FlowSnmpv2CPDU value in the FlowSnmpv2CData object +func (obj *flowSnmpv2CData) SetResponse(value FlowSnmpv2CPDU) FlowSnmpv2CData { + obj.setChoice(FlowSnmpv2CDataChoice.RESPONSE) + obj.responseHolder = nil + obj.obj.Response = value.msg() + + return obj +} + +// description is TBD +// SetRequest returns a FlowSnmpv2CPDU +func (obj *flowSnmpv2CData) SetRequest() FlowSnmpv2CPDU { + if obj.obj.SetRequest == nil { + obj.setChoice(FlowSnmpv2CDataChoice.SET_REQUEST) + } + if obj.setRequestHolder == nil { + obj.setRequestHolder = &flowSnmpv2CPDU{obj: obj.obj.SetRequest} + } + return obj.setRequestHolder +} + +// description is TBD +// SetRequest returns a FlowSnmpv2CPDU +func (obj *flowSnmpv2CData) HasSetRequest() bool { + return obj.obj.SetRequest != nil +} + +// description is TBD +// SetSetRequest sets the FlowSnmpv2CPDU value in the FlowSnmpv2CData object +func (obj *flowSnmpv2CData) SetSetRequest(value FlowSnmpv2CPDU) FlowSnmpv2CData { + obj.setChoice(FlowSnmpv2CDataChoice.SET_REQUEST) + obj.setRequestHolder = nil + obj.obj.SetRequest = value.msg() + + return obj +} + +// description is TBD +// GetBulkRequest returns a FlowSnmpv2CBulkPDU +func (obj *flowSnmpv2CData) GetBulkRequest() FlowSnmpv2CBulkPDU { + if obj.obj.GetBulkRequest == nil { + obj.setChoice(FlowSnmpv2CDataChoice.GET_BULK_REQUEST) + } + if obj.getBulkRequestHolder == nil { + obj.getBulkRequestHolder = &flowSnmpv2CBulkPDU{obj: obj.obj.GetBulkRequest} + } + return obj.getBulkRequestHolder +} + +// description is TBD +// GetBulkRequest returns a FlowSnmpv2CBulkPDU +func (obj *flowSnmpv2CData) HasGetBulkRequest() bool { + return obj.obj.GetBulkRequest != nil +} + +// description is TBD +// SetGetBulkRequest sets the FlowSnmpv2CBulkPDU value in the FlowSnmpv2CData object +func (obj *flowSnmpv2CData) SetGetBulkRequest(value FlowSnmpv2CBulkPDU) FlowSnmpv2CData { + obj.setChoice(FlowSnmpv2CDataChoice.GET_BULK_REQUEST) + obj.getBulkRequestHolder = nil + obj.obj.GetBulkRequest = value.msg() + + return obj +} + +// description is TBD +// InformRequest returns a FlowSnmpv2CPDU +func (obj *flowSnmpv2CData) InformRequest() FlowSnmpv2CPDU { + if obj.obj.InformRequest == nil { + obj.setChoice(FlowSnmpv2CDataChoice.INFORM_REQUEST) + } + if obj.informRequestHolder == nil { + obj.informRequestHolder = &flowSnmpv2CPDU{obj: obj.obj.InformRequest} + } + return obj.informRequestHolder +} + +// description is TBD +// InformRequest returns a FlowSnmpv2CPDU +func (obj *flowSnmpv2CData) HasInformRequest() bool { + return obj.obj.InformRequest != nil +} + +// description is TBD +// SetInformRequest sets the FlowSnmpv2CPDU value in the FlowSnmpv2CData object +func (obj *flowSnmpv2CData) SetInformRequest(value FlowSnmpv2CPDU) FlowSnmpv2CData { + obj.setChoice(FlowSnmpv2CDataChoice.INFORM_REQUEST) + obj.informRequestHolder = nil + obj.obj.InformRequest = value.msg() + + return obj +} + +// description is TBD +// Snmpv2Trap returns a FlowSnmpv2CPDU +func (obj *flowSnmpv2CData) Snmpv2Trap() FlowSnmpv2CPDU { + if obj.obj.Snmpv2Trap == nil { + obj.setChoice(FlowSnmpv2CDataChoice.SNMPV2_TRAP) + } + if obj.snmpv2TrapHolder == nil { + obj.snmpv2TrapHolder = &flowSnmpv2CPDU{obj: obj.obj.Snmpv2Trap} + } + return obj.snmpv2TrapHolder +} + +// description is TBD +// Snmpv2Trap returns a FlowSnmpv2CPDU +func (obj *flowSnmpv2CData) HasSnmpv2Trap() bool { + return obj.obj.Snmpv2Trap != nil +} + +// description is TBD +// SetSnmpv2Trap sets the FlowSnmpv2CPDU value in the FlowSnmpv2CData object +func (obj *flowSnmpv2CData) SetSnmpv2Trap(value FlowSnmpv2CPDU) FlowSnmpv2CData { + obj.setChoice(FlowSnmpv2CDataChoice.SNMPV2_TRAP) + obj.snmpv2TrapHolder = nil + obj.obj.Snmpv2Trap = value.msg() + + return obj +} + +// description is TBD +// Report returns a FlowSnmpv2CPDU +func (obj *flowSnmpv2CData) Report() FlowSnmpv2CPDU { + if obj.obj.Report == nil { + obj.setChoice(FlowSnmpv2CDataChoice.REPORT) + } + if obj.reportHolder == nil { + obj.reportHolder = &flowSnmpv2CPDU{obj: obj.obj.Report} + } + return obj.reportHolder +} + +// description is TBD +// Report returns a FlowSnmpv2CPDU +func (obj *flowSnmpv2CData) HasReport() bool { + return obj.obj.Report != nil +} + +// description is TBD +// SetReport sets the FlowSnmpv2CPDU value in the FlowSnmpv2CData object +func (obj *flowSnmpv2CData) SetReport(value FlowSnmpv2CPDU) FlowSnmpv2CData { + obj.setChoice(FlowSnmpv2CDataChoice.REPORT) + obj.reportHolder = nil + obj.obj.Report = value.msg() + + return obj +} + +func (obj *flowSnmpv2CData) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface FlowSnmpv2CData") + } + + if obj.obj.GetRequest != nil { + + obj.GetRequest().validateObj(vObj, set_default) + } + + if obj.obj.GetNextRequest != nil { + + obj.GetNextRequest().validateObj(vObj, set_default) + } + + if obj.obj.Response != nil { + + obj.Response().validateObj(vObj, set_default) + } + + if obj.obj.SetRequest != nil { + + obj.SetRequest().validateObj(vObj, set_default) + } + + if obj.obj.GetBulkRequest != nil { + + obj.GetBulkRequest().validateObj(vObj, set_default) + } + + if obj.obj.InformRequest != nil { + + obj.InformRequest().validateObj(vObj, set_default) + } + + if obj.obj.Snmpv2Trap != nil { + + obj.Snmpv2Trap().validateObj(vObj, set_default) + } + + if obj.obj.Report != nil { + + obj.Report().validateObj(vObj, set_default) + } + +} + +func (obj *flowSnmpv2CData) setDefault() { + var choices_set int = 0 + var choice FlowSnmpv2CDataChoiceEnum + + if obj.obj.GetRequest != nil { + choices_set += 1 + choice = FlowSnmpv2CDataChoice.GET_REQUEST + } + + if obj.obj.GetNextRequest != nil { + choices_set += 1 + choice = FlowSnmpv2CDataChoice.GET_NEXT_REQUEST + } + + if obj.obj.Response != nil { + choices_set += 1 + choice = FlowSnmpv2CDataChoice.RESPONSE + } + + if obj.obj.SetRequest != nil { + choices_set += 1 + choice = FlowSnmpv2CDataChoice.SET_REQUEST + } + + if obj.obj.GetBulkRequest != nil { + choices_set += 1 + choice = FlowSnmpv2CDataChoice.GET_BULK_REQUEST + } + + if obj.obj.InformRequest != nil { + choices_set += 1 + choice = FlowSnmpv2CDataChoice.INFORM_REQUEST + } + + if obj.obj.Snmpv2Trap != nil { + choices_set += 1 + choice = FlowSnmpv2CDataChoice.SNMPV2_TRAP + } + + if obj.obj.Report != nil { + choices_set += 1 + choice = FlowSnmpv2CDataChoice.REPORT + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowSnmpv2CData") + } + } else { + intVal := otg.FlowSnmpv2CData_Choice_Enum_value[string(choice)] + enumValue := otg.FlowSnmpv2CData_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_snmpv2_c_variable_binding.go b/gosnappi/flow_snmpv2_c_variable_binding.go new file mode 100644 index 00000000..aa6f7d43 --- /dev/null +++ b/gosnappi/flow_snmpv2_c_variable_binding.go @@ -0,0 +1,405 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowSnmpv2CVariableBinding ***** +type flowSnmpv2CVariableBinding struct { + validation + obj *otg.FlowSnmpv2CVariableBinding + marshaller marshalFlowSnmpv2CVariableBinding + unMarshaller unMarshalFlowSnmpv2CVariableBinding + valueHolder FlowSnmpv2CVariableBindingValue +} + +func NewFlowSnmpv2CVariableBinding() FlowSnmpv2CVariableBinding { + obj := flowSnmpv2CVariableBinding{obj: &otg.FlowSnmpv2CVariableBinding{}} + obj.setDefault() + return &obj +} + +func (obj *flowSnmpv2CVariableBinding) msg() *otg.FlowSnmpv2CVariableBinding { + return obj.obj +} + +func (obj *flowSnmpv2CVariableBinding) setMsg(msg *otg.FlowSnmpv2CVariableBinding) FlowSnmpv2CVariableBinding { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowSnmpv2CVariableBinding struct { + obj *flowSnmpv2CVariableBinding +} + +type marshalFlowSnmpv2CVariableBinding interface { + // ToProto marshals FlowSnmpv2CVariableBinding to protobuf object *otg.FlowSnmpv2CVariableBinding + ToProto() (*otg.FlowSnmpv2CVariableBinding, error) + // ToPbText marshals FlowSnmpv2CVariableBinding to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowSnmpv2CVariableBinding to YAML text + ToYaml() (string, error) + // ToJson marshals FlowSnmpv2CVariableBinding to JSON text + ToJson() (string, error) +} + +type unMarshalflowSnmpv2CVariableBinding struct { + obj *flowSnmpv2CVariableBinding +} + +type unMarshalFlowSnmpv2CVariableBinding interface { + // FromProto unmarshals FlowSnmpv2CVariableBinding from protobuf object *otg.FlowSnmpv2CVariableBinding + FromProto(msg *otg.FlowSnmpv2CVariableBinding) (FlowSnmpv2CVariableBinding, error) + // FromPbText unmarshals FlowSnmpv2CVariableBinding from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowSnmpv2CVariableBinding from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowSnmpv2CVariableBinding from JSON text + FromJson(value string) error +} + +func (obj *flowSnmpv2CVariableBinding) Marshal() marshalFlowSnmpv2CVariableBinding { + if obj.marshaller == nil { + obj.marshaller = &marshalflowSnmpv2CVariableBinding{obj: obj} + } + return obj.marshaller +} + +func (obj *flowSnmpv2CVariableBinding) Unmarshal() unMarshalFlowSnmpv2CVariableBinding { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowSnmpv2CVariableBinding{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowSnmpv2CVariableBinding) ToProto() (*otg.FlowSnmpv2CVariableBinding, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowSnmpv2CVariableBinding) FromProto(msg *otg.FlowSnmpv2CVariableBinding) (FlowSnmpv2CVariableBinding, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowSnmpv2CVariableBinding) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowSnmpv2CVariableBinding) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowSnmpv2CVariableBinding) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSnmpv2CVariableBinding) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowSnmpv2CVariableBinding) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSnmpv2CVariableBinding) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowSnmpv2CVariableBinding) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowSnmpv2CVariableBinding) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowSnmpv2CVariableBinding) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowSnmpv2CVariableBinding) Clone() (FlowSnmpv2CVariableBinding, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowSnmpv2CVariableBinding() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowSnmpv2CVariableBinding) setNil() { + obj.valueHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowSnmpv2CVariableBinding is a Sequence of two fields, an object_identifier and the value for/from that object_identifier. +type FlowSnmpv2CVariableBinding interface { + Validation + // msg marshals FlowSnmpv2CVariableBinding to protobuf object *otg.FlowSnmpv2CVariableBinding + // and doesn't set defaults + msg() *otg.FlowSnmpv2CVariableBinding + // setMsg unmarshals FlowSnmpv2CVariableBinding from protobuf object *otg.FlowSnmpv2CVariableBinding + // and doesn't set defaults + setMsg(*otg.FlowSnmpv2CVariableBinding) FlowSnmpv2CVariableBinding + // provides marshal interface + Marshal() marshalFlowSnmpv2CVariableBinding + // provides unmarshal interface + Unmarshal() unMarshalFlowSnmpv2CVariableBinding + // validate validates FlowSnmpv2CVariableBinding + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowSnmpv2CVariableBinding, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ObjectIdentifier returns string, set in FlowSnmpv2CVariableBinding. + ObjectIdentifier() string + // SetObjectIdentifier assigns string provided by user to FlowSnmpv2CVariableBinding + SetObjectIdentifier(value string) FlowSnmpv2CVariableBinding + // HasObjectIdentifier checks if ObjectIdentifier has been set in FlowSnmpv2CVariableBinding + HasObjectIdentifier() bool + // Value returns FlowSnmpv2CVariableBindingValue, set in FlowSnmpv2CVariableBinding. + Value() FlowSnmpv2CVariableBindingValue + // SetValue assigns FlowSnmpv2CVariableBindingValue provided by user to FlowSnmpv2CVariableBinding. + SetValue(value FlowSnmpv2CVariableBindingValue) FlowSnmpv2CVariableBinding + // HasValue checks if Value has been set in FlowSnmpv2CVariableBinding + HasValue() bool + setNil() +} + +// The Object Identifier points to a particular parameter in the SNMP agent. +// - Encoding of this field follows RFC2578(section 3.5) and ASN.1 X.690(section 8.1.3.6) specification. +// Refer: http://www.itu.int/ITU-T/asn1/ +// - According to BER, the first two numbers of any OID (x.y) are encoded as one value using the formula (40*x)+y. +// Example, the first two numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, because (40*1)+3 = 43. +// - After the first two numbers are encoded, the subsequent numbers in the OID are each encoded as a byte. +// - However, a special rule is required for large numbers because one byte can only represent a number from 0-127. +// - The rule for large numbers states that only the lower 7 bits in the byte are used for holding the value (0-127). +// - The highest order bit(8th) is used as a flag to indicate that this number spans more than one byte. Therefore, any number over 127 must be encoded using more than one byte. +// - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0' cannot be encoded using a single byte. +// According to this rule, the number 2680 must be encoded as 0x94 0x78. +// Since the most significant bit is set in the first byte (0x94), it indicates that number spans to the next byte. +// Since the most significant bit is not set in the next byte (0x78), it indicates that the number ends at the second byte. +// The value is derived by appending 7 bits from each of the concatenated bytes i.e (0x14 *128^1) + (0x78 * 128^0) = 2680. +// ObjectIdentifier returns a string +func (obj *flowSnmpv2CVariableBinding) ObjectIdentifier() string { + + return *obj.obj.ObjectIdentifier + +} + +// The Object Identifier points to a particular parameter in the SNMP agent. +// - Encoding of this field follows RFC2578(section 3.5) and ASN.1 X.690(section 8.1.3.6) specification. +// Refer: http://www.itu.int/ITU-T/asn1/ +// - According to BER, the first two numbers of any OID (x.y) are encoded as one value using the formula (40*x)+y. +// Example, the first two numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, because (40*1)+3 = 43. +// - After the first two numbers are encoded, the subsequent numbers in the OID are each encoded as a byte. +// - However, a special rule is required for large numbers because one byte can only represent a number from 0-127. +// - The rule for large numbers states that only the lower 7 bits in the byte are used for holding the value (0-127). +// - The highest order bit(8th) is used as a flag to indicate that this number spans more than one byte. Therefore, any number over 127 must be encoded using more than one byte. +// - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0' cannot be encoded using a single byte. +// According to this rule, the number 2680 must be encoded as 0x94 0x78. +// Since the most significant bit is set in the first byte (0x94), it indicates that number spans to the next byte. +// Since the most significant bit is not set in the next byte (0x78), it indicates that the number ends at the second byte. +// The value is derived by appending 7 bits from each of the concatenated bytes i.e (0x14 *128^1) + (0x78 * 128^0) = 2680. +// ObjectIdentifier returns a string +func (obj *flowSnmpv2CVariableBinding) HasObjectIdentifier() bool { + return obj.obj.ObjectIdentifier != nil +} + +// The Object Identifier points to a particular parameter in the SNMP agent. +// - Encoding of this field follows RFC2578(section 3.5) and ASN.1 X.690(section 8.1.3.6) specification. +// Refer: http://www.itu.int/ITU-T/asn1/ +// - According to BER, the first two numbers of any OID (x.y) are encoded as one value using the formula (40*x)+y. +// Example, the first two numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, because (40*1)+3 = 43. +// - After the first two numbers are encoded, the subsequent numbers in the OID are each encoded as a byte. +// - However, a special rule is required for large numbers because one byte can only represent a number from 0-127. +// - The rule for large numbers states that only the lower 7 bits in the byte are used for holding the value (0-127). +// - The highest order bit(8th) is used as a flag to indicate that this number spans more than one byte. Therefore, any number over 127 must be encoded using more than one byte. +// - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0' cannot be encoded using a single byte. +// According to this rule, the number 2680 must be encoded as 0x94 0x78. +// Since the most significant bit is set in the first byte (0x94), it indicates that number spans to the next byte. +// Since the most significant bit is not set in the next byte (0x78), it indicates that the number ends at the second byte. +// The value is derived by appending 7 bits from each of the concatenated bytes i.e (0x14 *128^1) + (0x78 * 128^0) = 2680. +// SetObjectIdentifier sets the string value in the FlowSnmpv2CVariableBinding object +func (obj *flowSnmpv2CVariableBinding) SetObjectIdentifier(value string) FlowSnmpv2CVariableBinding { + + obj.obj.ObjectIdentifier = &value + return obj +} + +// description is TBD +// Value returns a FlowSnmpv2CVariableBindingValue +func (obj *flowSnmpv2CVariableBinding) Value() FlowSnmpv2CVariableBindingValue { + if obj.obj.Value == nil { + obj.obj.Value = NewFlowSnmpv2CVariableBindingValue().msg() + } + if obj.valueHolder == nil { + obj.valueHolder = &flowSnmpv2CVariableBindingValue{obj: obj.obj.Value} + } + return obj.valueHolder +} + +// description is TBD +// Value returns a FlowSnmpv2CVariableBindingValue +func (obj *flowSnmpv2CVariableBinding) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the FlowSnmpv2CVariableBindingValue value in the FlowSnmpv2CVariableBinding object +func (obj *flowSnmpv2CVariableBinding) SetValue(value FlowSnmpv2CVariableBindingValue) FlowSnmpv2CVariableBinding { + + obj.valueHolder = nil + obj.obj.Value = value.msg() + + return obj +} + +func (obj *flowSnmpv2CVariableBinding) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.ObjectIdentifier != nil { + + err := obj.validateOid(obj.ObjectIdentifier()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on FlowSnmpv2CVariableBinding.ObjectIdentifier")) + } + + } + + if obj.obj.Value != nil { + + obj.Value().validateObj(vObj, set_default) + } + +} + +func (obj *flowSnmpv2CVariableBinding) setDefault() { + if obj.obj.ObjectIdentifier == nil { + obj.SetObjectIdentifier("0.1") + } + +} diff --git a/gosnappi/flow_snmpv2_c_variable_binding_string_value.go b/gosnappi/flow_snmpv2_c_variable_binding_string_value.go new file mode 100644 index 00000000..0ba93612 --- /dev/null +++ b/gosnappi/flow_snmpv2_c_variable_binding_string_value.go @@ -0,0 +1,447 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowSnmpv2CVariableBindingStringValue ***** +type flowSnmpv2CVariableBindingStringValue struct { + validation + obj *otg.FlowSnmpv2CVariableBindingStringValue + marshaller marshalFlowSnmpv2CVariableBindingStringValue + unMarshaller unMarshalFlowSnmpv2CVariableBindingStringValue +} + +func NewFlowSnmpv2CVariableBindingStringValue() FlowSnmpv2CVariableBindingStringValue { + obj := flowSnmpv2CVariableBindingStringValue{obj: &otg.FlowSnmpv2CVariableBindingStringValue{}} + obj.setDefault() + return &obj +} + +func (obj *flowSnmpv2CVariableBindingStringValue) msg() *otg.FlowSnmpv2CVariableBindingStringValue { + return obj.obj +} + +func (obj *flowSnmpv2CVariableBindingStringValue) setMsg(msg *otg.FlowSnmpv2CVariableBindingStringValue) FlowSnmpv2CVariableBindingStringValue { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowSnmpv2CVariableBindingStringValue struct { + obj *flowSnmpv2CVariableBindingStringValue +} + +type marshalFlowSnmpv2CVariableBindingStringValue interface { + // ToProto marshals FlowSnmpv2CVariableBindingStringValue to protobuf object *otg.FlowSnmpv2CVariableBindingStringValue + ToProto() (*otg.FlowSnmpv2CVariableBindingStringValue, error) + // ToPbText marshals FlowSnmpv2CVariableBindingStringValue to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowSnmpv2CVariableBindingStringValue to YAML text + ToYaml() (string, error) + // ToJson marshals FlowSnmpv2CVariableBindingStringValue to JSON text + ToJson() (string, error) +} + +type unMarshalflowSnmpv2CVariableBindingStringValue struct { + obj *flowSnmpv2CVariableBindingStringValue +} + +type unMarshalFlowSnmpv2CVariableBindingStringValue interface { + // FromProto unmarshals FlowSnmpv2CVariableBindingStringValue from protobuf object *otg.FlowSnmpv2CVariableBindingStringValue + FromProto(msg *otg.FlowSnmpv2CVariableBindingStringValue) (FlowSnmpv2CVariableBindingStringValue, error) + // FromPbText unmarshals FlowSnmpv2CVariableBindingStringValue from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowSnmpv2CVariableBindingStringValue from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowSnmpv2CVariableBindingStringValue from JSON text + FromJson(value string) error +} + +func (obj *flowSnmpv2CVariableBindingStringValue) Marshal() marshalFlowSnmpv2CVariableBindingStringValue { + if obj.marshaller == nil { + obj.marshaller = &marshalflowSnmpv2CVariableBindingStringValue{obj: obj} + } + return obj.marshaller +} + +func (obj *flowSnmpv2CVariableBindingStringValue) Unmarshal() unMarshalFlowSnmpv2CVariableBindingStringValue { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowSnmpv2CVariableBindingStringValue{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowSnmpv2CVariableBindingStringValue) ToProto() (*otg.FlowSnmpv2CVariableBindingStringValue, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowSnmpv2CVariableBindingStringValue) FromProto(msg *otg.FlowSnmpv2CVariableBindingStringValue) (FlowSnmpv2CVariableBindingStringValue, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowSnmpv2CVariableBindingStringValue) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowSnmpv2CVariableBindingStringValue) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowSnmpv2CVariableBindingStringValue) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSnmpv2CVariableBindingStringValue) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowSnmpv2CVariableBindingStringValue) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSnmpv2CVariableBindingStringValue) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowSnmpv2CVariableBindingStringValue) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowSnmpv2CVariableBindingStringValue) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowSnmpv2CVariableBindingStringValue) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowSnmpv2CVariableBindingStringValue) Clone() (FlowSnmpv2CVariableBindingStringValue, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowSnmpv2CVariableBindingStringValue() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// FlowSnmpv2CVariableBindingStringValue is it contains the raw/ascii string value to be sent. +type FlowSnmpv2CVariableBindingStringValue interface { + Validation + // msg marshals FlowSnmpv2CVariableBindingStringValue to protobuf object *otg.FlowSnmpv2CVariableBindingStringValue + // and doesn't set defaults + msg() *otg.FlowSnmpv2CVariableBindingStringValue + // setMsg unmarshals FlowSnmpv2CVariableBindingStringValue from protobuf object *otg.FlowSnmpv2CVariableBindingStringValue + // and doesn't set defaults + setMsg(*otg.FlowSnmpv2CVariableBindingStringValue) FlowSnmpv2CVariableBindingStringValue + // provides marshal interface + Marshal() marshalFlowSnmpv2CVariableBindingStringValue + // provides unmarshal interface + Unmarshal() unMarshalFlowSnmpv2CVariableBindingStringValue + // validate validates FlowSnmpv2CVariableBindingStringValue + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowSnmpv2CVariableBindingStringValue, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowSnmpv2CVariableBindingStringValueChoiceEnum, set in FlowSnmpv2CVariableBindingStringValue + Choice() FlowSnmpv2CVariableBindingStringValueChoiceEnum + // setChoice assigns FlowSnmpv2CVariableBindingStringValueChoiceEnum provided by user to FlowSnmpv2CVariableBindingStringValue + setChoice(value FlowSnmpv2CVariableBindingStringValueChoiceEnum) FlowSnmpv2CVariableBindingStringValue + // HasChoice checks if Choice has been set in FlowSnmpv2CVariableBindingStringValue + HasChoice() bool + // Ascii returns string, set in FlowSnmpv2CVariableBindingStringValue. + Ascii() string + // SetAscii assigns string provided by user to FlowSnmpv2CVariableBindingStringValue + SetAscii(value string) FlowSnmpv2CVariableBindingStringValue + // HasAscii checks if Ascii has been set in FlowSnmpv2CVariableBindingStringValue + HasAscii() bool + // Raw returns string, set in FlowSnmpv2CVariableBindingStringValue. + Raw() string + // SetRaw assigns string provided by user to FlowSnmpv2CVariableBindingStringValue + SetRaw(value string) FlowSnmpv2CVariableBindingStringValue + // HasRaw checks if Raw has been set in FlowSnmpv2CVariableBindingStringValue + HasRaw() bool +} + +type FlowSnmpv2CVariableBindingStringValueChoiceEnum string + +// Enum of Choice on FlowSnmpv2CVariableBindingStringValue +var FlowSnmpv2CVariableBindingStringValueChoice = struct { + ASCII FlowSnmpv2CVariableBindingStringValueChoiceEnum + RAW FlowSnmpv2CVariableBindingStringValueChoiceEnum +}{ + ASCII: FlowSnmpv2CVariableBindingStringValueChoiceEnum("ascii"), + RAW: FlowSnmpv2CVariableBindingStringValueChoiceEnum("raw"), +} + +func (obj *flowSnmpv2CVariableBindingStringValue) Choice() FlowSnmpv2CVariableBindingStringValueChoiceEnum { + return FlowSnmpv2CVariableBindingStringValueChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *flowSnmpv2CVariableBindingStringValue) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowSnmpv2CVariableBindingStringValue) setChoice(value FlowSnmpv2CVariableBindingStringValueChoiceEnum) FlowSnmpv2CVariableBindingStringValue { + intValue, ok := otg.FlowSnmpv2CVariableBindingStringValue_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowSnmpv2CVariableBindingStringValueChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowSnmpv2CVariableBindingStringValue_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Raw = nil + obj.obj.Ascii = nil + + if value == FlowSnmpv2CVariableBindingStringValueChoice.ASCII { + defaultValue := "ascii" + obj.obj.Ascii = &defaultValue + } + + if value == FlowSnmpv2CVariableBindingStringValueChoice.RAW { + defaultValue := "00" + obj.obj.Raw = &defaultValue + } + + return obj +} + +// It contains the ASCII string to be sent. As of now it is restricted to 10000 bytes. +// Ascii returns a string +func (obj *flowSnmpv2CVariableBindingStringValue) Ascii() string { + + if obj.obj.Ascii == nil { + obj.setChoice(FlowSnmpv2CVariableBindingStringValueChoice.ASCII) + } + + return *obj.obj.Ascii + +} + +// It contains the ASCII string to be sent. As of now it is restricted to 10000 bytes. +// Ascii returns a string +func (obj *flowSnmpv2CVariableBindingStringValue) HasAscii() bool { + return obj.obj.Ascii != nil +} + +// It contains the ASCII string to be sent. As of now it is restricted to 10000 bytes. +// SetAscii sets the string value in the FlowSnmpv2CVariableBindingStringValue object +func (obj *flowSnmpv2CVariableBindingStringValue) SetAscii(value string) FlowSnmpv2CVariableBindingStringValue { + obj.setChoice(FlowSnmpv2CVariableBindingStringValueChoice.ASCII) + obj.obj.Ascii = &value + return obj +} + +// It contains the hex string to be sent. As of now it is restricted to 10000 bytes. +// Raw returns a string +func (obj *flowSnmpv2CVariableBindingStringValue) Raw() string { + + if obj.obj.Raw == nil { + obj.setChoice(FlowSnmpv2CVariableBindingStringValueChoice.RAW) + } + + return *obj.obj.Raw + +} + +// It contains the hex string to be sent. As of now it is restricted to 10000 bytes. +// Raw returns a string +func (obj *flowSnmpv2CVariableBindingStringValue) HasRaw() bool { + return obj.obj.Raw != nil +} + +// It contains the hex string to be sent. As of now it is restricted to 10000 bytes. +// SetRaw sets the string value in the FlowSnmpv2CVariableBindingStringValue object +func (obj *flowSnmpv2CVariableBindingStringValue) SetRaw(value string) FlowSnmpv2CVariableBindingStringValue { + obj.setChoice(FlowSnmpv2CVariableBindingStringValueChoice.RAW) + obj.obj.Raw = &value + return obj +} + +func (obj *flowSnmpv2CVariableBindingStringValue) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ascii != nil { + + if len(*obj.obj.Ascii) > 10000 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "None <= length of FlowSnmpv2CVariableBindingStringValue.Ascii <= 10000 but Got %d", + len(*obj.obj.Ascii))) + } + + } + + if obj.obj.Raw != nil { + + if len(*obj.obj.Raw) > 10000 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "None <= length of FlowSnmpv2CVariableBindingStringValue.Raw <= 10000 but Got %d", + len(*obj.obj.Raw))) + } + + } + +} + +func (obj *flowSnmpv2CVariableBindingStringValue) setDefault() { + var choices_set int = 0 + var choice FlowSnmpv2CVariableBindingStringValueChoiceEnum + + if obj.obj.Ascii != nil { + choices_set += 1 + choice = FlowSnmpv2CVariableBindingStringValueChoice.ASCII + } + + if obj.obj.Raw != nil { + choices_set += 1 + choice = FlowSnmpv2CVariableBindingStringValueChoice.RAW + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowSnmpv2CVariableBindingStringValueChoice.ASCII) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowSnmpv2CVariableBindingStringValue") + } + } else { + intVal := otg.FlowSnmpv2CVariableBindingStringValue_Choice_Enum_value[string(choice)] + enumValue := otg.FlowSnmpv2CVariableBindingStringValue_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_snmpv2_c_variable_binding_value.go b/gosnappi/flow_snmpv2_c_variable_binding_value.go new file mode 100644 index 00000000..a38962a9 --- /dev/null +++ b/gosnappi/flow_snmpv2_c_variable_binding_value.go @@ -0,0 +1,877 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowSnmpv2CVariableBindingValue ***** +type flowSnmpv2CVariableBindingValue struct { + validation + obj *otg.FlowSnmpv2CVariableBindingValue + marshaller marshalFlowSnmpv2CVariableBindingValue + unMarshaller unMarshalFlowSnmpv2CVariableBindingValue + integerValueHolder PatternFlowSnmpv2CVariableBindingValueIntegerValue + stringValueHolder FlowSnmpv2CVariableBindingStringValue + ipAddressValueHolder PatternFlowSnmpv2CVariableBindingValueIpAddressValue + counterValueHolder PatternFlowSnmpv2CVariableBindingValueCounterValue + timeticksValueHolder PatternFlowSnmpv2CVariableBindingValueTimeticksValue + bigCounterValueHolder PatternFlowSnmpv2CVariableBindingValueBigCounterValue + unsignedIntegerValueHolder PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue +} + +func NewFlowSnmpv2CVariableBindingValue() FlowSnmpv2CVariableBindingValue { + obj := flowSnmpv2CVariableBindingValue{obj: &otg.FlowSnmpv2CVariableBindingValue{}} + obj.setDefault() + return &obj +} + +func (obj *flowSnmpv2CVariableBindingValue) msg() *otg.FlowSnmpv2CVariableBindingValue { + return obj.obj +} + +func (obj *flowSnmpv2CVariableBindingValue) setMsg(msg *otg.FlowSnmpv2CVariableBindingValue) FlowSnmpv2CVariableBindingValue { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowSnmpv2CVariableBindingValue struct { + obj *flowSnmpv2CVariableBindingValue +} + +type marshalFlowSnmpv2CVariableBindingValue interface { + // ToProto marshals FlowSnmpv2CVariableBindingValue to protobuf object *otg.FlowSnmpv2CVariableBindingValue + ToProto() (*otg.FlowSnmpv2CVariableBindingValue, error) + // ToPbText marshals FlowSnmpv2CVariableBindingValue to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowSnmpv2CVariableBindingValue to YAML text + ToYaml() (string, error) + // ToJson marshals FlowSnmpv2CVariableBindingValue to JSON text + ToJson() (string, error) +} + +type unMarshalflowSnmpv2CVariableBindingValue struct { + obj *flowSnmpv2CVariableBindingValue +} + +type unMarshalFlowSnmpv2CVariableBindingValue interface { + // FromProto unmarshals FlowSnmpv2CVariableBindingValue from protobuf object *otg.FlowSnmpv2CVariableBindingValue + FromProto(msg *otg.FlowSnmpv2CVariableBindingValue) (FlowSnmpv2CVariableBindingValue, error) + // FromPbText unmarshals FlowSnmpv2CVariableBindingValue from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowSnmpv2CVariableBindingValue from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowSnmpv2CVariableBindingValue from JSON text + FromJson(value string) error +} + +func (obj *flowSnmpv2CVariableBindingValue) Marshal() marshalFlowSnmpv2CVariableBindingValue { + if obj.marshaller == nil { + obj.marshaller = &marshalflowSnmpv2CVariableBindingValue{obj: obj} + } + return obj.marshaller +} + +func (obj *flowSnmpv2CVariableBindingValue) Unmarshal() unMarshalFlowSnmpv2CVariableBindingValue { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowSnmpv2CVariableBindingValue{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowSnmpv2CVariableBindingValue) ToProto() (*otg.FlowSnmpv2CVariableBindingValue, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowSnmpv2CVariableBindingValue) FromProto(msg *otg.FlowSnmpv2CVariableBindingValue) (FlowSnmpv2CVariableBindingValue, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowSnmpv2CVariableBindingValue) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowSnmpv2CVariableBindingValue) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowSnmpv2CVariableBindingValue) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSnmpv2CVariableBindingValue) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowSnmpv2CVariableBindingValue) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSnmpv2CVariableBindingValue) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowSnmpv2CVariableBindingValue) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowSnmpv2CVariableBindingValue) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowSnmpv2CVariableBindingValue) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowSnmpv2CVariableBindingValue) Clone() (FlowSnmpv2CVariableBindingValue, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowSnmpv2CVariableBindingValue() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowSnmpv2CVariableBindingValue) setNil() { + obj.integerValueHolder = nil + obj.stringValueHolder = nil + obj.ipAddressValueHolder = nil + obj.counterValueHolder = nil + obj.timeticksValueHolder = nil + obj.bigCounterValueHolder = nil + obj.unsignedIntegerValueHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowSnmpv2CVariableBindingValue is the value for the object_identifier as per RFC2578. +type FlowSnmpv2CVariableBindingValue interface { + Validation + // msg marshals FlowSnmpv2CVariableBindingValue to protobuf object *otg.FlowSnmpv2CVariableBindingValue + // and doesn't set defaults + msg() *otg.FlowSnmpv2CVariableBindingValue + // setMsg unmarshals FlowSnmpv2CVariableBindingValue from protobuf object *otg.FlowSnmpv2CVariableBindingValue + // and doesn't set defaults + setMsg(*otg.FlowSnmpv2CVariableBindingValue) FlowSnmpv2CVariableBindingValue + // provides marshal interface + Marshal() marshalFlowSnmpv2CVariableBindingValue + // provides unmarshal interface + Unmarshal() unMarshalFlowSnmpv2CVariableBindingValue + // validate validates FlowSnmpv2CVariableBindingValue + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowSnmpv2CVariableBindingValue, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowSnmpv2CVariableBindingValueChoiceEnum, set in FlowSnmpv2CVariableBindingValue + Choice() FlowSnmpv2CVariableBindingValueChoiceEnum + // setChoice assigns FlowSnmpv2CVariableBindingValueChoiceEnum provided by user to FlowSnmpv2CVariableBindingValue + setChoice(value FlowSnmpv2CVariableBindingValueChoiceEnum) FlowSnmpv2CVariableBindingValue + // HasChoice checks if Choice has been set in FlowSnmpv2CVariableBindingValue + HasChoice() bool + // getter for NoValue to set choice. + NoValue() + // IntegerValue returns PatternFlowSnmpv2CVariableBindingValueIntegerValue, set in FlowSnmpv2CVariableBindingValue. + IntegerValue() PatternFlowSnmpv2CVariableBindingValueIntegerValue + // SetIntegerValue assigns PatternFlowSnmpv2CVariableBindingValueIntegerValue provided by user to FlowSnmpv2CVariableBindingValue. + SetIntegerValue(value PatternFlowSnmpv2CVariableBindingValueIntegerValue) FlowSnmpv2CVariableBindingValue + // HasIntegerValue checks if IntegerValue has been set in FlowSnmpv2CVariableBindingValue + HasIntegerValue() bool + // StringValue returns FlowSnmpv2CVariableBindingStringValue, set in FlowSnmpv2CVariableBindingValue. + StringValue() FlowSnmpv2CVariableBindingStringValue + // SetStringValue assigns FlowSnmpv2CVariableBindingStringValue provided by user to FlowSnmpv2CVariableBindingValue. + SetStringValue(value FlowSnmpv2CVariableBindingStringValue) FlowSnmpv2CVariableBindingValue + // HasStringValue checks if StringValue has been set in FlowSnmpv2CVariableBindingValue + HasStringValue() bool + // ObjectIdentifierValue returns string, set in FlowSnmpv2CVariableBindingValue. + ObjectIdentifierValue() string + // SetObjectIdentifierValue assigns string provided by user to FlowSnmpv2CVariableBindingValue + SetObjectIdentifierValue(value string) FlowSnmpv2CVariableBindingValue + // HasObjectIdentifierValue checks if ObjectIdentifierValue has been set in FlowSnmpv2CVariableBindingValue + HasObjectIdentifierValue() bool + // IpAddressValue returns PatternFlowSnmpv2CVariableBindingValueIpAddressValue, set in FlowSnmpv2CVariableBindingValue. + IpAddressValue() PatternFlowSnmpv2CVariableBindingValueIpAddressValue + // SetIpAddressValue assigns PatternFlowSnmpv2CVariableBindingValueIpAddressValue provided by user to FlowSnmpv2CVariableBindingValue. + SetIpAddressValue(value PatternFlowSnmpv2CVariableBindingValueIpAddressValue) FlowSnmpv2CVariableBindingValue + // HasIpAddressValue checks if IpAddressValue has been set in FlowSnmpv2CVariableBindingValue + HasIpAddressValue() bool + // CounterValue returns PatternFlowSnmpv2CVariableBindingValueCounterValue, set in FlowSnmpv2CVariableBindingValue. + CounterValue() PatternFlowSnmpv2CVariableBindingValueCounterValue + // SetCounterValue assigns PatternFlowSnmpv2CVariableBindingValueCounterValue provided by user to FlowSnmpv2CVariableBindingValue. + SetCounterValue(value PatternFlowSnmpv2CVariableBindingValueCounterValue) FlowSnmpv2CVariableBindingValue + // HasCounterValue checks if CounterValue has been set in FlowSnmpv2CVariableBindingValue + HasCounterValue() bool + // TimeticksValue returns PatternFlowSnmpv2CVariableBindingValueTimeticksValue, set in FlowSnmpv2CVariableBindingValue. + TimeticksValue() PatternFlowSnmpv2CVariableBindingValueTimeticksValue + // SetTimeticksValue assigns PatternFlowSnmpv2CVariableBindingValueTimeticksValue provided by user to FlowSnmpv2CVariableBindingValue. + SetTimeticksValue(value PatternFlowSnmpv2CVariableBindingValueTimeticksValue) FlowSnmpv2CVariableBindingValue + // HasTimeticksValue checks if TimeticksValue has been set in FlowSnmpv2CVariableBindingValue + HasTimeticksValue() bool + // ArbitraryValue returns string, set in FlowSnmpv2CVariableBindingValue. + ArbitraryValue() string + // SetArbitraryValue assigns string provided by user to FlowSnmpv2CVariableBindingValue + SetArbitraryValue(value string) FlowSnmpv2CVariableBindingValue + // HasArbitraryValue checks if ArbitraryValue has been set in FlowSnmpv2CVariableBindingValue + HasArbitraryValue() bool + // BigCounterValue returns PatternFlowSnmpv2CVariableBindingValueBigCounterValue, set in FlowSnmpv2CVariableBindingValue. + BigCounterValue() PatternFlowSnmpv2CVariableBindingValueBigCounterValue + // SetBigCounterValue assigns PatternFlowSnmpv2CVariableBindingValueBigCounterValue provided by user to FlowSnmpv2CVariableBindingValue. + SetBigCounterValue(value PatternFlowSnmpv2CVariableBindingValueBigCounterValue) FlowSnmpv2CVariableBindingValue + // HasBigCounterValue checks if BigCounterValue has been set in FlowSnmpv2CVariableBindingValue + HasBigCounterValue() bool + // UnsignedIntegerValue returns PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue, set in FlowSnmpv2CVariableBindingValue. + UnsignedIntegerValue() PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + // SetUnsignedIntegerValue assigns PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue provided by user to FlowSnmpv2CVariableBindingValue. + SetUnsignedIntegerValue(value PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) FlowSnmpv2CVariableBindingValue + // HasUnsignedIntegerValue checks if UnsignedIntegerValue has been set in FlowSnmpv2CVariableBindingValue + HasUnsignedIntegerValue() bool + setNil() +} + +type FlowSnmpv2CVariableBindingValueChoiceEnum string + +// Enum of Choice on FlowSnmpv2CVariableBindingValue +var FlowSnmpv2CVariableBindingValueChoice = struct { + NO_VALUE FlowSnmpv2CVariableBindingValueChoiceEnum + INTEGER_VALUE FlowSnmpv2CVariableBindingValueChoiceEnum + STRING_VALUE FlowSnmpv2CVariableBindingValueChoiceEnum + OBJECT_IDENTIFIER_VALUE FlowSnmpv2CVariableBindingValueChoiceEnum + IP_ADDRESS_VALUE FlowSnmpv2CVariableBindingValueChoiceEnum + COUNTER_VALUE FlowSnmpv2CVariableBindingValueChoiceEnum + TIMETICKS_VALUE FlowSnmpv2CVariableBindingValueChoiceEnum + ARBITRARY_VALUE FlowSnmpv2CVariableBindingValueChoiceEnum + BIG_COUNTER_VALUE FlowSnmpv2CVariableBindingValueChoiceEnum + UNSIGNED_INTEGER_VALUE FlowSnmpv2CVariableBindingValueChoiceEnum +}{ + NO_VALUE: FlowSnmpv2CVariableBindingValueChoiceEnum("no_value"), + INTEGER_VALUE: FlowSnmpv2CVariableBindingValueChoiceEnum("integer_value"), + STRING_VALUE: FlowSnmpv2CVariableBindingValueChoiceEnum("string_value"), + OBJECT_IDENTIFIER_VALUE: FlowSnmpv2CVariableBindingValueChoiceEnum("object_identifier_value"), + IP_ADDRESS_VALUE: FlowSnmpv2CVariableBindingValueChoiceEnum("ip_address_value"), + COUNTER_VALUE: FlowSnmpv2CVariableBindingValueChoiceEnum("counter_value"), + TIMETICKS_VALUE: FlowSnmpv2CVariableBindingValueChoiceEnum("timeticks_value"), + ARBITRARY_VALUE: FlowSnmpv2CVariableBindingValueChoiceEnum("arbitrary_value"), + BIG_COUNTER_VALUE: FlowSnmpv2CVariableBindingValueChoiceEnum("big_counter_value"), + UNSIGNED_INTEGER_VALUE: FlowSnmpv2CVariableBindingValueChoiceEnum("unsigned_integer_value"), +} + +func (obj *flowSnmpv2CVariableBindingValue) Choice() FlowSnmpv2CVariableBindingValueChoiceEnum { + return FlowSnmpv2CVariableBindingValueChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for NoValue to set choice +func (obj *flowSnmpv2CVariableBindingValue) NoValue() { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.NO_VALUE) +} + +// description is TBD +// Choice returns a string +func (obj *flowSnmpv2CVariableBindingValue) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowSnmpv2CVariableBindingValue) setChoice(value FlowSnmpv2CVariableBindingValueChoiceEnum) FlowSnmpv2CVariableBindingValue { + intValue, ok := otg.FlowSnmpv2CVariableBindingValue_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowSnmpv2CVariableBindingValueChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowSnmpv2CVariableBindingValue_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.UnsignedIntegerValue = nil + obj.unsignedIntegerValueHolder = nil + obj.obj.BigCounterValue = nil + obj.bigCounterValueHolder = nil + obj.obj.ArbitraryValue = nil + obj.obj.TimeticksValue = nil + obj.timeticksValueHolder = nil + obj.obj.CounterValue = nil + obj.counterValueHolder = nil + obj.obj.IpAddressValue = nil + obj.ipAddressValueHolder = nil + obj.obj.ObjectIdentifierValue = nil + obj.obj.StringValue = nil + obj.stringValueHolder = nil + obj.obj.IntegerValue = nil + obj.integerValueHolder = nil + + if value == FlowSnmpv2CVariableBindingValueChoice.INTEGER_VALUE { + obj.obj.IntegerValue = NewPatternFlowSnmpv2CVariableBindingValueIntegerValue().msg() + } + + if value == FlowSnmpv2CVariableBindingValueChoice.STRING_VALUE { + obj.obj.StringValue = NewFlowSnmpv2CVariableBindingStringValue().msg() + } + + if value == FlowSnmpv2CVariableBindingValueChoice.OBJECT_IDENTIFIER_VALUE { + defaultValue := "0.1" + obj.obj.ObjectIdentifierValue = &defaultValue + } + + if value == FlowSnmpv2CVariableBindingValueChoice.IP_ADDRESS_VALUE { + obj.obj.IpAddressValue = NewPatternFlowSnmpv2CVariableBindingValueIpAddressValue().msg() + } + + if value == FlowSnmpv2CVariableBindingValueChoice.COUNTER_VALUE { + obj.obj.CounterValue = NewPatternFlowSnmpv2CVariableBindingValueCounterValue().msg() + } + + if value == FlowSnmpv2CVariableBindingValueChoice.TIMETICKS_VALUE { + obj.obj.TimeticksValue = NewPatternFlowSnmpv2CVariableBindingValueTimeticksValue().msg() + } + + if value == FlowSnmpv2CVariableBindingValueChoice.ARBITRARY_VALUE { + defaultValue := "00" + obj.obj.ArbitraryValue = &defaultValue + } + + if value == FlowSnmpv2CVariableBindingValueChoice.BIG_COUNTER_VALUE { + obj.obj.BigCounterValue = NewPatternFlowSnmpv2CVariableBindingValueBigCounterValue().msg() + } + + if value == FlowSnmpv2CVariableBindingValueChoice.UNSIGNED_INTEGER_VALUE { + obj.obj.UnsignedIntegerValue = NewPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue().msg() + } + + return obj +} + +// description is TBD +// IntegerValue returns a PatternFlowSnmpv2CVariableBindingValueIntegerValue +func (obj *flowSnmpv2CVariableBindingValue) IntegerValue() PatternFlowSnmpv2CVariableBindingValueIntegerValue { + if obj.obj.IntegerValue == nil { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.INTEGER_VALUE) + } + if obj.integerValueHolder == nil { + obj.integerValueHolder = &patternFlowSnmpv2CVariableBindingValueIntegerValue{obj: obj.obj.IntegerValue} + } + return obj.integerValueHolder +} + +// description is TBD +// IntegerValue returns a PatternFlowSnmpv2CVariableBindingValueIntegerValue +func (obj *flowSnmpv2CVariableBindingValue) HasIntegerValue() bool { + return obj.obj.IntegerValue != nil +} + +// description is TBD +// SetIntegerValue sets the PatternFlowSnmpv2CVariableBindingValueIntegerValue value in the FlowSnmpv2CVariableBindingValue object +func (obj *flowSnmpv2CVariableBindingValue) SetIntegerValue(value PatternFlowSnmpv2CVariableBindingValueIntegerValue) FlowSnmpv2CVariableBindingValue { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.INTEGER_VALUE) + obj.integerValueHolder = nil + obj.obj.IntegerValue = value.msg() + + return obj +} + +// description is TBD +// StringValue returns a FlowSnmpv2CVariableBindingStringValue +func (obj *flowSnmpv2CVariableBindingValue) StringValue() FlowSnmpv2CVariableBindingStringValue { + if obj.obj.StringValue == nil { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.STRING_VALUE) + } + if obj.stringValueHolder == nil { + obj.stringValueHolder = &flowSnmpv2CVariableBindingStringValue{obj: obj.obj.StringValue} + } + return obj.stringValueHolder +} + +// description is TBD +// StringValue returns a FlowSnmpv2CVariableBindingStringValue +func (obj *flowSnmpv2CVariableBindingValue) HasStringValue() bool { + return obj.obj.StringValue != nil +} + +// description is TBD +// SetStringValue sets the FlowSnmpv2CVariableBindingStringValue value in the FlowSnmpv2CVariableBindingValue object +func (obj *flowSnmpv2CVariableBindingValue) SetStringValue(value FlowSnmpv2CVariableBindingStringValue) FlowSnmpv2CVariableBindingValue { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.STRING_VALUE) + obj.stringValueHolder = nil + obj.obj.StringValue = value.msg() + + return obj +} + +// The Object Identifier points to a particular parameter in the SNMP agent. +// - Encoding of this field follows RFC2578(section 3.5) and ASN.1 X.690(section 8.1.3.6) specification. +// Refer: http://www.itu.int/ITU-T/asn1/ +// - According to BER, the first two numbers of any OID (x.y) are encoded as one value using the formula (40*x)+y. +// Example, the first two numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, because (40*1)+3 = 43. +// - After the first two numbers are encoded, the subsequent numbers in the OID are each encoded as a byte. +// - However, a special rule is required for large numbers because one byte can only represent a number from 0-127. +// - The rule for large numbers states that only the lower 7 bits in the byte are used for holding the value (0-127). +// - The highest order bit(8th) is used as a flag to indicate that this number spans more than one byte. Therefore, any number over 127 must be encoded using more than one byte. +// - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0' cannot be encoded using a single byte. +// According to this rule, the number 2680 must be encoded as 0x94 0x78. +// Since the most significant bit is set in the first byte (0x94), it indicates that number spans to the next byte. +// Since the most significant bit is not set in the next byte (0x78), it indicates that the number ends at the second byte. +// The value is derived by appending 7 bits from each of the concatenated bytes i.e (0x14 *128^1) + (0x78 * 128^0) = 2680. +// ObjectIdentifierValue returns a string +func (obj *flowSnmpv2CVariableBindingValue) ObjectIdentifierValue() string { + + if obj.obj.ObjectIdentifierValue == nil { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.OBJECT_IDENTIFIER_VALUE) + } + + return *obj.obj.ObjectIdentifierValue + +} + +// The Object Identifier points to a particular parameter in the SNMP agent. +// - Encoding of this field follows RFC2578(section 3.5) and ASN.1 X.690(section 8.1.3.6) specification. +// Refer: http://www.itu.int/ITU-T/asn1/ +// - According to BER, the first two numbers of any OID (x.y) are encoded as one value using the formula (40*x)+y. +// Example, the first two numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, because (40*1)+3 = 43. +// - After the first two numbers are encoded, the subsequent numbers in the OID are each encoded as a byte. +// - However, a special rule is required for large numbers because one byte can only represent a number from 0-127. +// - The rule for large numbers states that only the lower 7 bits in the byte are used for holding the value (0-127). +// - The highest order bit(8th) is used as a flag to indicate that this number spans more than one byte. Therefore, any number over 127 must be encoded using more than one byte. +// - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0' cannot be encoded using a single byte. +// According to this rule, the number 2680 must be encoded as 0x94 0x78. +// Since the most significant bit is set in the first byte (0x94), it indicates that number spans to the next byte. +// Since the most significant bit is not set in the next byte (0x78), it indicates that the number ends at the second byte. +// The value is derived by appending 7 bits from each of the concatenated bytes i.e (0x14 *128^1) + (0x78 * 128^0) = 2680. +// ObjectIdentifierValue returns a string +func (obj *flowSnmpv2CVariableBindingValue) HasObjectIdentifierValue() bool { + return obj.obj.ObjectIdentifierValue != nil +} + +// The Object Identifier points to a particular parameter in the SNMP agent. +// - Encoding of this field follows RFC2578(section 3.5) and ASN.1 X.690(section 8.1.3.6) specification. +// Refer: http://www.itu.int/ITU-T/asn1/ +// - According to BER, the first two numbers of any OID (x.y) are encoded as one value using the formula (40*x)+y. +// Example, the first two numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, because (40*1)+3 = 43. +// - After the first two numbers are encoded, the subsequent numbers in the OID are each encoded as a byte. +// - However, a special rule is required for large numbers because one byte can only represent a number from 0-127. +// - The rule for large numbers states that only the lower 7 bits in the byte are used for holding the value (0-127). +// - The highest order bit(8th) is used as a flag to indicate that this number spans more than one byte. Therefore, any number over 127 must be encoded using more than one byte. +// - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0' cannot be encoded using a single byte. +// According to this rule, the number 2680 must be encoded as 0x94 0x78. +// Since the most significant bit is set in the first byte (0x94), it indicates that number spans to the next byte. +// Since the most significant bit is not set in the next byte (0x78), it indicates that the number ends at the second byte. +// The value is derived by appending 7 bits from each of the concatenated bytes i.e (0x14 *128^1) + (0x78 * 128^0) = 2680. +// SetObjectIdentifierValue sets the string value in the FlowSnmpv2CVariableBindingValue object +func (obj *flowSnmpv2CVariableBindingValue) SetObjectIdentifierValue(value string) FlowSnmpv2CVariableBindingValue { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.OBJECT_IDENTIFIER_VALUE) + obj.obj.ObjectIdentifierValue = &value + return obj +} + +// description is TBD +// IpAddressValue returns a PatternFlowSnmpv2CVariableBindingValueIpAddressValue +func (obj *flowSnmpv2CVariableBindingValue) IpAddressValue() PatternFlowSnmpv2CVariableBindingValueIpAddressValue { + if obj.obj.IpAddressValue == nil { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.IP_ADDRESS_VALUE) + } + if obj.ipAddressValueHolder == nil { + obj.ipAddressValueHolder = &patternFlowSnmpv2CVariableBindingValueIpAddressValue{obj: obj.obj.IpAddressValue} + } + return obj.ipAddressValueHolder +} + +// description is TBD +// IpAddressValue returns a PatternFlowSnmpv2CVariableBindingValueIpAddressValue +func (obj *flowSnmpv2CVariableBindingValue) HasIpAddressValue() bool { + return obj.obj.IpAddressValue != nil +} + +// description is TBD +// SetIpAddressValue sets the PatternFlowSnmpv2CVariableBindingValueIpAddressValue value in the FlowSnmpv2CVariableBindingValue object +func (obj *flowSnmpv2CVariableBindingValue) SetIpAddressValue(value PatternFlowSnmpv2CVariableBindingValueIpAddressValue) FlowSnmpv2CVariableBindingValue { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.IP_ADDRESS_VALUE) + obj.ipAddressValueHolder = nil + obj.obj.IpAddressValue = value.msg() + + return obj +} + +// description is TBD +// CounterValue returns a PatternFlowSnmpv2CVariableBindingValueCounterValue +func (obj *flowSnmpv2CVariableBindingValue) CounterValue() PatternFlowSnmpv2CVariableBindingValueCounterValue { + if obj.obj.CounterValue == nil { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.COUNTER_VALUE) + } + if obj.counterValueHolder == nil { + obj.counterValueHolder = &patternFlowSnmpv2CVariableBindingValueCounterValue{obj: obj.obj.CounterValue} + } + return obj.counterValueHolder +} + +// description is TBD +// CounterValue returns a PatternFlowSnmpv2CVariableBindingValueCounterValue +func (obj *flowSnmpv2CVariableBindingValue) HasCounterValue() bool { + return obj.obj.CounterValue != nil +} + +// description is TBD +// SetCounterValue sets the PatternFlowSnmpv2CVariableBindingValueCounterValue value in the FlowSnmpv2CVariableBindingValue object +func (obj *flowSnmpv2CVariableBindingValue) SetCounterValue(value PatternFlowSnmpv2CVariableBindingValueCounterValue) FlowSnmpv2CVariableBindingValue { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.COUNTER_VALUE) + obj.counterValueHolder = nil + obj.obj.CounterValue = value.msg() + + return obj +} + +// description is TBD +// TimeticksValue returns a PatternFlowSnmpv2CVariableBindingValueTimeticksValue +func (obj *flowSnmpv2CVariableBindingValue) TimeticksValue() PatternFlowSnmpv2CVariableBindingValueTimeticksValue { + if obj.obj.TimeticksValue == nil { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.TIMETICKS_VALUE) + } + if obj.timeticksValueHolder == nil { + obj.timeticksValueHolder = &patternFlowSnmpv2CVariableBindingValueTimeticksValue{obj: obj.obj.TimeticksValue} + } + return obj.timeticksValueHolder +} + +// description is TBD +// TimeticksValue returns a PatternFlowSnmpv2CVariableBindingValueTimeticksValue +func (obj *flowSnmpv2CVariableBindingValue) HasTimeticksValue() bool { + return obj.obj.TimeticksValue != nil +} + +// description is TBD +// SetTimeticksValue sets the PatternFlowSnmpv2CVariableBindingValueTimeticksValue value in the FlowSnmpv2CVariableBindingValue object +func (obj *flowSnmpv2CVariableBindingValue) SetTimeticksValue(value PatternFlowSnmpv2CVariableBindingValueTimeticksValue) FlowSnmpv2CVariableBindingValue { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.TIMETICKS_VALUE) + obj.timeticksValueHolder = nil + obj.obj.TimeticksValue = value.msg() + + return obj +} + +// It contains the hex bytes of the value to be sent. As of now it is restricted to 10000 bytes. +// ArbitraryValue returns a string +func (obj *flowSnmpv2CVariableBindingValue) ArbitraryValue() string { + + if obj.obj.ArbitraryValue == nil { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.ARBITRARY_VALUE) + } + + return *obj.obj.ArbitraryValue + +} + +// It contains the hex bytes of the value to be sent. As of now it is restricted to 10000 bytes. +// ArbitraryValue returns a string +func (obj *flowSnmpv2CVariableBindingValue) HasArbitraryValue() bool { + return obj.obj.ArbitraryValue != nil +} + +// It contains the hex bytes of the value to be sent. As of now it is restricted to 10000 bytes. +// SetArbitraryValue sets the string value in the FlowSnmpv2CVariableBindingValue object +func (obj *flowSnmpv2CVariableBindingValue) SetArbitraryValue(value string) FlowSnmpv2CVariableBindingValue { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.ARBITRARY_VALUE) + obj.obj.ArbitraryValue = &value + return obj +} + +// description is TBD +// BigCounterValue returns a PatternFlowSnmpv2CVariableBindingValueBigCounterValue +func (obj *flowSnmpv2CVariableBindingValue) BigCounterValue() PatternFlowSnmpv2CVariableBindingValueBigCounterValue { + if obj.obj.BigCounterValue == nil { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.BIG_COUNTER_VALUE) + } + if obj.bigCounterValueHolder == nil { + obj.bigCounterValueHolder = &patternFlowSnmpv2CVariableBindingValueBigCounterValue{obj: obj.obj.BigCounterValue} + } + return obj.bigCounterValueHolder +} + +// description is TBD +// BigCounterValue returns a PatternFlowSnmpv2CVariableBindingValueBigCounterValue +func (obj *flowSnmpv2CVariableBindingValue) HasBigCounterValue() bool { + return obj.obj.BigCounterValue != nil +} + +// description is TBD +// SetBigCounterValue sets the PatternFlowSnmpv2CVariableBindingValueBigCounterValue value in the FlowSnmpv2CVariableBindingValue object +func (obj *flowSnmpv2CVariableBindingValue) SetBigCounterValue(value PatternFlowSnmpv2CVariableBindingValueBigCounterValue) FlowSnmpv2CVariableBindingValue { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.BIG_COUNTER_VALUE) + obj.bigCounterValueHolder = nil + obj.obj.BigCounterValue = value.msg() + + return obj +} + +// description is TBD +// UnsignedIntegerValue returns a PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue +func (obj *flowSnmpv2CVariableBindingValue) UnsignedIntegerValue() PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue { + if obj.obj.UnsignedIntegerValue == nil { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.UNSIGNED_INTEGER_VALUE) + } + if obj.unsignedIntegerValueHolder == nil { + obj.unsignedIntegerValueHolder = &patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue{obj: obj.obj.UnsignedIntegerValue} + } + return obj.unsignedIntegerValueHolder +} + +// description is TBD +// UnsignedIntegerValue returns a PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue +func (obj *flowSnmpv2CVariableBindingValue) HasUnsignedIntegerValue() bool { + return obj.obj.UnsignedIntegerValue != nil +} + +// description is TBD +// SetUnsignedIntegerValue sets the PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue value in the FlowSnmpv2CVariableBindingValue object +func (obj *flowSnmpv2CVariableBindingValue) SetUnsignedIntegerValue(value PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) FlowSnmpv2CVariableBindingValue { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.UNSIGNED_INTEGER_VALUE) + obj.unsignedIntegerValueHolder = nil + obj.obj.UnsignedIntegerValue = value.msg() + + return obj +} + +func (obj *flowSnmpv2CVariableBindingValue) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.IntegerValue != nil { + + obj.IntegerValue().validateObj(vObj, set_default) + } + + if obj.obj.StringValue != nil { + + obj.StringValue().validateObj(vObj, set_default) + } + + if obj.obj.ObjectIdentifierValue != nil { + + err := obj.validateOid(obj.ObjectIdentifierValue()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on FlowSnmpv2CVariableBindingValue.ObjectIdentifierValue")) + } + + } + + if obj.obj.IpAddressValue != nil { + + obj.IpAddressValue().validateObj(vObj, set_default) + } + + if obj.obj.CounterValue != nil { + + obj.CounterValue().validateObj(vObj, set_default) + } + + if obj.obj.TimeticksValue != nil { + + obj.TimeticksValue().validateObj(vObj, set_default) + } + + if obj.obj.ArbitraryValue != nil { + + if len(*obj.obj.ArbitraryValue) > 10000 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "None <= length of FlowSnmpv2CVariableBindingValue.ArbitraryValue <= 10000 but Got %d", + len(*obj.obj.ArbitraryValue))) + } + + } + + if obj.obj.BigCounterValue != nil { + + obj.BigCounterValue().validateObj(vObj, set_default) + } + + if obj.obj.UnsignedIntegerValue != nil { + + obj.UnsignedIntegerValue().validateObj(vObj, set_default) + } + +} + +func (obj *flowSnmpv2CVariableBindingValue) setDefault() { + var choices_set int = 0 + var choice FlowSnmpv2CVariableBindingValueChoiceEnum + + if obj.obj.IntegerValue != nil { + choices_set += 1 + choice = FlowSnmpv2CVariableBindingValueChoice.INTEGER_VALUE + } + + if obj.obj.StringValue != nil { + choices_set += 1 + choice = FlowSnmpv2CVariableBindingValueChoice.STRING_VALUE + } + + if obj.obj.ObjectIdentifierValue != nil { + choices_set += 1 + choice = FlowSnmpv2CVariableBindingValueChoice.OBJECT_IDENTIFIER_VALUE + } + + if obj.obj.IpAddressValue != nil { + choices_set += 1 + choice = FlowSnmpv2CVariableBindingValueChoice.IP_ADDRESS_VALUE + } + + if obj.obj.CounterValue != nil { + choices_set += 1 + choice = FlowSnmpv2CVariableBindingValueChoice.COUNTER_VALUE + } + + if obj.obj.TimeticksValue != nil { + choices_set += 1 + choice = FlowSnmpv2CVariableBindingValueChoice.TIMETICKS_VALUE + } + + if obj.obj.ArbitraryValue != nil { + choices_set += 1 + choice = FlowSnmpv2CVariableBindingValueChoice.ARBITRARY_VALUE + } + + if obj.obj.BigCounterValue != nil { + choices_set += 1 + choice = FlowSnmpv2CVariableBindingValueChoice.BIG_COUNTER_VALUE + } + + if obj.obj.UnsignedIntegerValue != nil { + choices_set += 1 + choice = FlowSnmpv2CVariableBindingValueChoice.UNSIGNED_INTEGER_VALUE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowSnmpv2CVariableBindingValueChoice.NO_VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowSnmpv2CVariableBindingValue") + } + } else { + intVal := otg.FlowSnmpv2CVariableBindingValue_Choice_Enum_value[string(choice)] + enumValue := otg.FlowSnmpv2CVariableBindingValue_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_snmpv2_cpdu.go b/gosnappi/flow_snmpv2_cpdu.go new file mode 100644 index 00000000..b3b9c6e6 --- /dev/null +++ b/gosnappi/flow_snmpv2_cpdu.go @@ -0,0 +1,550 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowSnmpv2CPDU ***** +type flowSnmpv2CPDU struct { + validation + obj *otg.FlowSnmpv2CPDU + marshaller marshalFlowSnmpv2CPDU + unMarshaller unMarshalFlowSnmpv2CPDU + requestIdHolder PatternFlowSnmpv2CPDURequestId + errorIndexHolder PatternFlowSnmpv2CPDUErrorIndex + variableBindingsHolder FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter +} + +func NewFlowSnmpv2CPDU() FlowSnmpv2CPDU { + obj := flowSnmpv2CPDU{obj: &otg.FlowSnmpv2CPDU{}} + obj.setDefault() + return &obj +} + +func (obj *flowSnmpv2CPDU) msg() *otg.FlowSnmpv2CPDU { + return obj.obj +} + +func (obj *flowSnmpv2CPDU) setMsg(msg *otg.FlowSnmpv2CPDU) FlowSnmpv2CPDU { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowSnmpv2CPDU struct { + obj *flowSnmpv2CPDU +} + +type marshalFlowSnmpv2CPDU interface { + // ToProto marshals FlowSnmpv2CPDU to protobuf object *otg.FlowSnmpv2CPDU + ToProto() (*otg.FlowSnmpv2CPDU, error) + // ToPbText marshals FlowSnmpv2CPDU to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowSnmpv2CPDU to YAML text + ToYaml() (string, error) + // ToJson marshals FlowSnmpv2CPDU to JSON text + ToJson() (string, error) +} + +type unMarshalflowSnmpv2CPDU struct { + obj *flowSnmpv2CPDU +} + +type unMarshalFlowSnmpv2CPDU interface { + // FromProto unmarshals FlowSnmpv2CPDU from protobuf object *otg.FlowSnmpv2CPDU + FromProto(msg *otg.FlowSnmpv2CPDU) (FlowSnmpv2CPDU, error) + // FromPbText unmarshals FlowSnmpv2CPDU from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowSnmpv2CPDU from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowSnmpv2CPDU from JSON text + FromJson(value string) error +} + +func (obj *flowSnmpv2CPDU) Marshal() marshalFlowSnmpv2CPDU { + if obj.marshaller == nil { + obj.marshaller = &marshalflowSnmpv2CPDU{obj: obj} + } + return obj.marshaller +} + +func (obj *flowSnmpv2CPDU) Unmarshal() unMarshalFlowSnmpv2CPDU { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowSnmpv2CPDU{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowSnmpv2CPDU) ToProto() (*otg.FlowSnmpv2CPDU, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowSnmpv2CPDU) FromProto(msg *otg.FlowSnmpv2CPDU) (FlowSnmpv2CPDU, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowSnmpv2CPDU) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowSnmpv2CPDU) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowSnmpv2CPDU) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSnmpv2CPDU) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowSnmpv2CPDU) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowSnmpv2CPDU) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowSnmpv2CPDU) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowSnmpv2CPDU) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowSnmpv2CPDU) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowSnmpv2CPDU) Clone() (FlowSnmpv2CPDU, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowSnmpv2CPDU() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowSnmpv2CPDU) setNil() { + obj.requestIdHolder = nil + obj.errorIndexHolder = nil + obj.variableBindingsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowSnmpv2CPDU is this contains the body of the SNMPv2C PDU. +type FlowSnmpv2CPDU interface { + Validation + // msg marshals FlowSnmpv2CPDU to protobuf object *otg.FlowSnmpv2CPDU + // and doesn't set defaults + msg() *otg.FlowSnmpv2CPDU + // setMsg unmarshals FlowSnmpv2CPDU from protobuf object *otg.FlowSnmpv2CPDU + // and doesn't set defaults + setMsg(*otg.FlowSnmpv2CPDU) FlowSnmpv2CPDU + // provides marshal interface + Marshal() marshalFlowSnmpv2CPDU + // provides unmarshal interface + Unmarshal() unMarshalFlowSnmpv2CPDU + // validate validates FlowSnmpv2CPDU + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowSnmpv2CPDU, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RequestId returns PatternFlowSnmpv2CPDURequestId, set in FlowSnmpv2CPDU. + RequestId() PatternFlowSnmpv2CPDURequestId + // SetRequestId assigns PatternFlowSnmpv2CPDURequestId provided by user to FlowSnmpv2CPDU. + SetRequestId(value PatternFlowSnmpv2CPDURequestId) FlowSnmpv2CPDU + // HasRequestId checks if RequestId has been set in FlowSnmpv2CPDU + HasRequestId() bool + // ErrorStatus returns FlowSnmpv2CPDUErrorStatusEnum, set in FlowSnmpv2CPDU + ErrorStatus() FlowSnmpv2CPDUErrorStatusEnum + // SetErrorStatus assigns FlowSnmpv2CPDUErrorStatusEnum provided by user to FlowSnmpv2CPDU + SetErrorStatus(value FlowSnmpv2CPDUErrorStatusEnum) FlowSnmpv2CPDU + // HasErrorStatus checks if ErrorStatus has been set in FlowSnmpv2CPDU + HasErrorStatus() bool + // ErrorIndex returns PatternFlowSnmpv2CPDUErrorIndex, set in FlowSnmpv2CPDU. + ErrorIndex() PatternFlowSnmpv2CPDUErrorIndex + // SetErrorIndex assigns PatternFlowSnmpv2CPDUErrorIndex provided by user to FlowSnmpv2CPDU. + SetErrorIndex(value PatternFlowSnmpv2CPDUErrorIndex) FlowSnmpv2CPDU + // HasErrorIndex checks if ErrorIndex has been set in FlowSnmpv2CPDU + HasErrorIndex() bool + // VariableBindings returns FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIterIter, set in FlowSnmpv2CPDU + VariableBindings() FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter + setNil() +} + +// description is TBD +// RequestId returns a PatternFlowSnmpv2CPDURequestId +func (obj *flowSnmpv2CPDU) RequestId() PatternFlowSnmpv2CPDURequestId { + if obj.obj.RequestId == nil { + obj.obj.RequestId = NewPatternFlowSnmpv2CPDURequestId().msg() + } + if obj.requestIdHolder == nil { + obj.requestIdHolder = &patternFlowSnmpv2CPDURequestId{obj: obj.obj.RequestId} + } + return obj.requestIdHolder +} + +// description is TBD +// RequestId returns a PatternFlowSnmpv2CPDURequestId +func (obj *flowSnmpv2CPDU) HasRequestId() bool { + return obj.obj.RequestId != nil +} + +// description is TBD +// SetRequestId sets the PatternFlowSnmpv2CPDURequestId value in the FlowSnmpv2CPDU object +func (obj *flowSnmpv2CPDU) SetRequestId(value PatternFlowSnmpv2CPDURequestId) FlowSnmpv2CPDU { + + obj.requestIdHolder = nil + obj.obj.RequestId = value.msg() + + return obj +} + +type FlowSnmpv2CPDUErrorStatusEnum string + +// Enum of ErrorStatus on FlowSnmpv2CPDU +var FlowSnmpv2CPDUErrorStatus = struct { + NO_ERROR FlowSnmpv2CPDUErrorStatusEnum + TOO_BIG FlowSnmpv2CPDUErrorStatusEnum + NO_SUCH_NAME FlowSnmpv2CPDUErrorStatusEnum + BAD_VALUE FlowSnmpv2CPDUErrorStatusEnum + READ_ONLY FlowSnmpv2CPDUErrorStatusEnum + GEN_ERR FlowSnmpv2CPDUErrorStatusEnum + NO_ACCESS FlowSnmpv2CPDUErrorStatusEnum + WRONG_TYPE FlowSnmpv2CPDUErrorStatusEnum + WRONG_LENGTH FlowSnmpv2CPDUErrorStatusEnum + WRONG_ENCODING FlowSnmpv2CPDUErrorStatusEnum + WRONG_VALUE FlowSnmpv2CPDUErrorStatusEnum + NO_CREATION FlowSnmpv2CPDUErrorStatusEnum + INCONSISTENT_VALUE FlowSnmpv2CPDUErrorStatusEnum + RESOURCE_UNAVAILABLE FlowSnmpv2CPDUErrorStatusEnum + COMMIT_FAILED FlowSnmpv2CPDUErrorStatusEnum + UNDO_FAILED FlowSnmpv2CPDUErrorStatusEnum + AUTHORIZATION_ERROR FlowSnmpv2CPDUErrorStatusEnum + NOT_WRITABLE FlowSnmpv2CPDUErrorStatusEnum + INCONSISTENT_NAME FlowSnmpv2CPDUErrorStatusEnum +}{ + NO_ERROR: FlowSnmpv2CPDUErrorStatusEnum("no_error"), + TOO_BIG: FlowSnmpv2CPDUErrorStatusEnum("too_big"), + NO_SUCH_NAME: FlowSnmpv2CPDUErrorStatusEnum("no_such_name"), + BAD_VALUE: FlowSnmpv2CPDUErrorStatusEnum("bad_value"), + READ_ONLY: FlowSnmpv2CPDUErrorStatusEnum("read_only"), + GEN_ERR: FlowSnmpv2CPDUErrorStatusEnum("gen_err"), + NO_ACCESS: FlowSnmpv2CPDUErrorStatusEnum("no_access"), + WRONG_TYPE: FlowSnmpv2CPDUErrorStatusEnum("wrong_type"), + WRONG_LENGTH: FlowSnmpv2CPDUErrorStatusEnum("wrong_length"), + WRONG_ENCODING: FlowSnmpv2CPDUErrorStatusEnum("wrong_encoding"), + WRONG_VALUE: FlowSnmpv2CPDUErrorStatusEnum("wrong_value"), + NO_CREATION: FlowSnmpv2CPDUErrorStatusEnum("no_creation"), + INCONSISTENT_VALUE: FlowSnmpv2CPDUErrorStatusEnum("inconsistent_value"), + RESOURCE_UNAVAILABLE: FlowSnmpv2CPDUErrorStatusEnum("resource_unavailable"), + COMMIT_FAILED: FlowSnmpv2CPDUErrorStatusEnum("commit_failed"), + UNDO_FAILED: FlowSnmpv2CPDUErrorStatusEnum("undo_failed"), + AUTHORIZATION_ERROR: FlowSnmpv2CPDUErrorStatusEnum("authorization_error"), + NOT_WRITABLE: FlowSnmpv2CPDUErrorStatusEnum("not_writable"), + INCONSISTENT_NAME: FlowSnmpv2CPDUErrorStatusEnum("inconsistent_name"), +} + +func (obj *flowSnmpv2CPDU) ErrorStatus() FlowSnmpv2CPDUErrorStatusEnum { + return FlowSnmpv2CPDUErrorStatusEnum(obj.obj.ErrorStatus.Enum().String()) +} + +// The SNMP agent places an error code in this field in the response message if an error occurred processing the request. +// ErrorStatus returns a string +func (obj *flowSnmpv2CPDU) HasErrorStatus() bool { + return obj.obj.ErrorStatus != nil +} + +func (obj *flowSnmpv2CPDU) SetErrorStatus(value FlowSnmpv2CPDUErrorStatusEnum) FlowSnmpv2CPDU { + intValue, ok := otg.FlowSnmpv2CPDU_ErrorStatus_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowSnmpv2CPDUErrorStatusEnum", string(value))) + return obj + } + enumValue := otg.FlowSnmpv2CPDU_ErrorStatus_Enum(intValue) + obj.obj.ErrorStatus = &enumValue + + return obj +} + +// description is TBD +// ErrorIndex returns a PatternFlowSnmpv2CPDUErrorIndex +func (obj *flowSnmpv2CPDU) ErrorIndex() PatternFlowSnmpv2CPDUErrorIndex { + if obj.obj.ErrorIndex == nil { + obj.obj.ErrorIndex = NewPatternFlowSnmpv2CPDUErrorIndex().msg() + } + if obj.errorIndexHolder == nil { + obj.errorIndexHolder = &patternFlowSnmpv2CPDUErrorIndex{obj: obj.obj.ErrorIndex} + } + return obj.errorIndexHolder +} + +// description is TBD +// ErrorIndex returns a PatternFlowSnmpv2CPDUErrorIndex +func (obj *flowSnmpv2CPDU) HasErrorIndex() bool { + return obj.obj.ErrorIndex != nil +} + +// description is TBD +// SetErrorIndex sets the PatternFlowSnmpv2CPDUErrorIndex value in the FlowSnmpv2CPDU object +func (obj *flowSnmpv2CPDU) SetErrorIndex(value PatternFlowSnmpv2CPDUErrorIndex) FlowSnmpv2CPDU { + + obj.errorIndexHolder = nil + obj.obj.ErrorIndex = value.msg() + + return obj +} + +// A Sequence of variable_bindings. +// VariableBindings returns a []FlowSnmpv2CVariableBinding +func (obj *flowSnmpv2CPDU) VariableBindings() FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter { + if len(obj.obj.VariableBindings) == 0 { + obj.obj.VariableBindings = []*otg.FlowSnmpv2CVariableBinding{} + } + if obj.variableBindingsHolder == nil { + obj.variableBindingsHolder = newFlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter(&obj.obj.VariableBindings).setMsg(obj) + } + return obj.variableBindingsHolder +} + +type flowSnmpv2CPDUFlowSnmpv2CVariableBindingIter struct { + obj *flowSnmpv2CPDU + flowSnmpv2CVariableBindingSlice []FlowSnmpv2CVariableBinding + fieldPtr *[]*otg.FlowSnmpv2CVariableBinding +} + +func newFlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter(ptr *[]*otg.FlowSnmpv2CVariableBinding) FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter { + return &flowSnmpv2CPDUFlowSnmpv2CVariableBindingIter{fieldPtr: ptr} +} + +type FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter interface { + setMsg(*flowSnmpv2CPDU) FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter + Items() []FlowSnmpv2CVariableBinding + Add() FlowSnmpv2CVariableBinding + Append(items ...FlowSnmpv2CVariableBinding) FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter + Set(index int, newObj FlowSnmpv2CVariableBinding) FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter + Clear() FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter + clearHolderSlice() FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter + appendHolderSlice(item FlowSnmpv2CVariableBinding) FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter +} + +func (obj *flowSnmpv2CPDUFlowSnmpv2CVariableBindingIter) setMsg(msg *flowSnmpv2CPDU) FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flowSnmpv2CVariableBinding{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *flowSnmpv2CPDUFlowSnmpv2CVariableBindingIter) Items() []FlowSnmpv2CVariableBinding { + return obj.flowSnmpv2CVariableBindingSlice +} + +func (obj *flowSnmpv2CPDUFlowSnmpv2CVariableBindingIter) Add() FlowSnmpv2CVariableBinding { + newObj := &otg.FlowSnmpv2CVariableBinding{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flowSnmpv2CVariableBinding{obj: newObj} + newLibObj.setDefault() + obj.flowSnmpv2CVariableBindingSlice = append(obj.flowSnmpv2CVariableBindingSlice, newLibObj) + return newLibObj +} + +func (obj *flowSnmpv2CPDUFlowSnmpv2CVariableBindingIter) Append(items ...FlowSnmpv2CVariableBinding) FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowSnmpv2CVariableBindingSlice = append(obj.flowSnmpv2CVariableBindingSlice, item) + } + return obj +} + +func (obj *flowSnmpv2CPDUFlowSnmpv2CVariableBindingIter) Set(index int, newObj FlowSnmpv2CVariableBinding) FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowSnmpv2CVariableBindingSlice[index] = newObj + return obj +} +func (obj *flowSnmpv2CPDUFlowSnmpv2CVariableBindingIter) Clear() FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.FlowSnmpv2CVariableBinding{} + obj.flowSnmpv2CVariableBindingSlice = []FlowSnmpv2CVariableBinding{} + } + return obj +} +func (obj *flowSnmpv2CPDUFlowSnmpv2CVariableBindingIter) clearHolderSlice() FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter { + if len(obj.flowSnmpv2CVariableBindingSlice) > 0 { + obj.flowSnmpv2CVariableBindingSlice = []FlowSnmpv2CVariableBinding{} + } + return obj +} +func (obj *flowSnmpv2CPDUFlowSnmpv2CVariableBindingIter) appendHolderSlice(item FlowSnmpv2CVariableBinding) FlowSnmpv2CPDUFlowSnmpv2CVariableBindingIter { + obj.flowSnmpv2CVariableBindingSlice = append(obj.flowSnmpv2CVariableBindingSlice, item) + return obj +} + +func (obj *flowSnmpv2CPDU) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RequestId != nil { + + obj.RequestId().validateObj(vObj, set_default) + } + + if obj.obj.ErrorIndex != nil { + + obj.ErrorIndex().validateObj(vObj, set_default) + } + + if len(obj.obj.VariableBindings) != 0 { + + if set_default { + obj.VariableBindings().clearHolderSlice() + for _, item := range obj.obj.VariableBindings { + obj.VariableBindings().appendHolderSlice(&flowSnmpv2CVariableBinding{obj: item}) + } + } + for _, item := range obj.VariableBindings().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *flowSnmpv2CPDU) setDefault() { + if obj.obj.ErrorStatus == nil { + obj.SetErrorStatus(FlowSnmpv2CPDUErrorStatus.NO_ERROR) + + } + +} diff --git a/gosnappi/flow_tagged_metric.go b/gosnappi/flow_tagged_metric.go new file mode 100644 index 00000000..f76cfe97 --- /dev/null +++ b/gosnappi/flow_tagged_metric.go @@ -0,0 +1,686 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowTaggedMetric ***** +type flowTaggedMetric struct { + validation + obj *otg.FlowTaggedMetric + marshaller marshalFlowTaggedMetric + unMarshaller unMarshalFlowTaggedMetric + tagsHolder FlowTaggedMetricFlowMetricTagIter + timestampsHolder MetricTimestamp + latencyHolder MetricLatency +} + +func NewFlowTaggedMetric() FlowTaggedMetric { + obj := flowTaggedMetric{obj: &otg.FlowTaggedMetric{}} + obj.setDefault() + return &obj +} + +func (obj *flowTaggedMetric) msg() *otg.FlowTaggedMetric { + return obj.obj +} + +func (obj *flowTaggedMetric) setMsg(msg *otg.FlowTaggedMetric) FlowTaggedMetric { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowTaggedMetric struct { + obj *flowTaggedMetric +} + +type marshalFlowTaggedMetric interface { + // ToProto marshals FlowTaggedMetric to protobuf object *otg.FlowTaggedMetric + ToProto() (*otg.FlowTaggedMetric, error) + // ToPbText marshals FlowTaggedMetric to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowTaggedMetric to YAML text + ToYaml() (string, error) + // ToJson marshals FlowTaggedMetric to JSON text + ToJson() (string, error) +} + +type unMarshalflowTaggedMetric struct { + obj *flowTaggedMetric +} + +type unMarshalFlowTaggedMetric interface { + // FromProto unmarshals FlowTaggedMetric from protobuf object *otg.FlowTaggedMetric + FromProto(msg *otg.FlowTaggedMetric) (FlowTaggedMetric, error) + // FromPbText unmarshals FlowTaggedMetric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowTaggedMetric from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowTaggedMetric from JSON text + FromJson(value string) error +} + +func (obj *flowTaggedMetric) Marshal() marshalFlowTaggedMetric { + if obj.marshaller == nil { + obj.marshaller = &marshalflowTaggedMetric{obj: obj} + } + return obj.marshaller +} + +func (obj *flowTaggedMetric) Unmarshal() unMarshalFlowTaggedMetric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowTaggedMetric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowTaggedMetric) ToProto() (*otg.FlowTaggedMetric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowTaggedMetric) FromProto(msg *otg.FlowTaggedMetric) (FlowTaggedMetric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowTaggedMetric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowTaggedMetric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowTaggedMetric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowTaggedMetric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowTaggedMetric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowTaggedMetric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowTaggedMetric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowTaggedMetric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowTaggedMetric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowTaggedMetric) Clone() (FlowTaggedMetric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowTaggedMetric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowTaggedMetric) setNil() { + obj.tagsHolder = nil + obj.timestampsHolder = nil + obj.latencyHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowTaggedMetric is metrics for each set of values applicable for configured +// metric tags in ingress or egress packet header fields of corresponding flow. +// The container is keyed by list of tag-value pairs. +type FlowTaggedMetric interface { + Validation + // msg marshals FlowTaggedMetric to protobuf object *otg.FlowTaggedMetric + // and doesn't set defaults + msg() *otg.FlowTaggedMetric + // setMsg unmarshals FlowTaggedMetric from protobuf object *otg.FlowTaggedMetric + // and doesn't set defaults + setMsg(*otg.FlowTaggedMetric) FlowTaggedMetric + // provides marshal interface + Marshal() marshalFlowTaggedMetric + // provides unmarshal interface + Unmarshal() unMarshalFlowTaggedMetric + // validate validates FlowTaggedMetric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowTaggedMetric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Tags returns FlowTaggedMetricFlowMetricTagIterIter, set in FlowTaggedMetric + Tags() FlowTaggedMetricFlowMetricTagIter + // FramesTx returns uint64, set in FlowTaggedMetric. + FramesTx() uint64 + // SetFramesTx assigns uint64 provided by user to FlowTaggedMetric + SetFramesTx(value uint64) FlowTaggedMetric + // HasFramesTx checks if FramesTx has been set in FlowTaggedMetric + HasFramesTx() bool + // FramesRx returns uint64, set in FlowTaggedMetric. + FramesRx() uint64 + // SetFramesRx assigns uint64 provided by user to FlowTaggedMetric + SetFramesRx(value uint64) FlowTaggedMetric + // HasFramesRx checks if FramesRx has been set in FlowTaggedMetric + HasFramesRx() bool + // BytesTx returns uint64, set in FlowTaggedMetric. + BytesTx() uint64 + // SetBytesTx assigns uint64 provided by user to FlowTaggedMetric + SetBytesTx(value uint64) FlowTaggedMetric + // HasBytesTx checks if BytesTx has been set in FlowTaggedMetric + HasBytesTx() bool + // BytesRx returns uint64, set in FlowTaggedMetric. + BytesRx() uint64 + // SetBytesRx assigns uint64 provided by user to FlowTaggedMetric + SetBytesRx(value uint64) FlowTaggedMetric + // HasBytesRx checks if BytesRx has been set in FlowTaggedMetric + HasBytesRx() bool + // FramesTxRate returns float32, set in FlowTaggedMetric. + FramesTxRate() float32 + // SetFramesTxRate assigns float32 provided by user to FlowTaggedMetric + SetFramesTxRate(value float32) FlowTaggedMetric + // HasFramesTxRate checks if FramesTxRate has been set in FlowTaggedMetric + HasFramesTxRate() bool + // FramesRxRate returns float32, set in FlowTaggedMetric. + FramesRxRate() float32 + // SetFramesRxRate assigns float32 provided by user to FlowTaggedMetric + SetFramesRxRate(value float32) FlowTaggedMetric + // HasFramesRxRate checks if FramesRxRate has been set in FlowTaggedMetric + HasFramesRxRate() bool + // Loss returns float32, set in FlowTaggedMetric. + Loss() float32 + // SetLoss assigns float32 provided by user to FlowTaggedMetric + SetLoss(value float32) FlowTaggedMetric + // HasLoss checks if Loss has been set in FlowTaggedMetric + HasLoss() bool + // Timestamps returns MetricTimestamp, set in FlowTaggedMetric. + // MetricTimestamp is the container for timestamp metrics. + // The container will be empty if the timestamp has not been configured for + // the flow. + Timestamps() MetricTimestamp + // SetTimestamps assigns MetricTimestamp provided by user to FlowTaggedMetric. + // MetricTimestamp is the container for timestamp metrics. + // The container will be empty if the timestamp has not been configured for + // the flow. + SetTimestamps(value MetricTimestamp) FlowTaggedMetric + // HasTimestamps checks if Timestamps has been set in FlowTaggedMetric + HasTimestamps() bool + // Latency returns MetricLatency, set in FlowTaggedMetric. + // MetricLatency is the container for latency metrics. + // The min/max/avg values are dependent on the type of latency measurement + // mode that is configured. + // The container will be empty if the latency has not been configured for + // the flow. + Latency() MetricLatency + // SetLatency assigns MetricLatency provided by user to FlowTaggedMetric. + // MetricLatency is the container for latency metrics. + // The min/max/avg values are dependent on the type of latency measurement + // mode that is configured. + // The container will be empty if the latency has not been configured for + // the flow. + SetLatency(value MetricLatency) FlowTaggedMetric + // HasLatency checks if Latency has been set in FlowTaggedMetric + HasLatency() bool + setNil() +} + +// List of tag and value pairs +// Tags returns a []FlowMetricTag +func (obj *flowTaggedMetric) Tags() FlowTaggedMetricFlowMetricTagIter { + if len(obj.obj.Tags) == 0 { + obj.obj.Tags = []*otg.FlowMetricTag{} + } + if obj.tagsHolder == nil { + obj.tagsHolder = newFlowTaggedMetricFlowMetricTagIter(&obj.obj.Tags).setMsg(obj) + } + return obj.tagsHolder +} + +type flowTaggedMetricFlowMetricTagIter struct { + obj *flowTaggedMetric + flowMetricTagSlice []FlowMetricTag + fieldPtr *[]*otg.FlowMetricTag +} + +func newFlowTaggedMetricFlowMetricTagIter(ptr *[]*otg.FlowMetricTag) FlowTaggedMetricFlowMetricTagIter { + return &flowTaggedMetricFlowMetricTagIter{fieldPtr: ptr} +} + +type FlowTaggedMetricFlowMetricTagIter interface { + setMsg(*flowTaggedMetric) FlowTaggedMetricFlowMetricTagIter + Items() []FlowMetricTag + Add() FlowMetricTag + Append(items ...FlowMetricTag) FlowTaggedMetricFlowMetricTagIter + Set(index int, newObj FlowMetricTag) FlowTaggedMetricFlowMetricTagIter + Clear() FlowTaggedMetricFlowMetricTagIter + clearHolderSlice() FlowTaggedMetricFlowMetricTagIter + appendHolderSlice(item FlowMetricTag) FlowTaggedMetricFlowMetricTagIter +} + +func (obj *flowTaggedMetricFlowMetricTagIter) setMsg(msg *flowTaggedMetric) FlowTaggedMetricFlowMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flowMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *flowTaggedMetricFlowMetricTagIter) Items() []FlowMetricTag { + return obj.flowMetricTagSlice +} + +func (obj *flowTaggedMetricFlowMetricTagIter) Add() FlowMetricTag { + newObj := &otg.FlowMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flowMetricTag{obj: newObj} + newLibObj.setDefault() + obj.flowMetricTagSlice = append(obj.flowMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *flowTaggedMetricFlowMetricTagIter) Append(items ...FlowMetricTag) FlowTaggedMetricFlowMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowMetricTagSlice = append(obj.flowMetricTagSlice, item) + } + return obj +} + +func (obj *flowTaggedMetricFlowMetricTagIter) Set(index int, newObj FlowMetricTag) FlowTaggedMetricFlowMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowMetricTagSlice[index] = newObj + return obj +} +func (obj *flowTaggedMetricFlowMetricTagIter) Clear() FlowTaggedMetricFlowMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.FlowMetricTag{} + obj.flowMetricTagSlice = []FlowMetricTag{} + } + return obj +} +func (obj *flowTaggedMetricFlowMetricTagIter) clearHolderSlice() FlowTaggedMetricFlowMetricTagIter { + if len(obj.flowMetricTagSlice) > 0 { + obj.flowMetricTagSlice = []FlowMetricTag{} + } + return obj +} +func (obj *flowTaggedMetricFlowMetricTagIter) appendHolderSlice(item FlowMetricTag) FlowTaggedMetricFlowMetricTagIter { + obj.flowMetricTagSlice = append(obj.flowMetricTagSlice, item) + return obj +} + +// The current total number of frames transmitted +// FramesTx returns a uint64 +func (obj *flowTaggedMetric) FramesTx() uint64 { + + return *obj.obj.FramesTx + +} + +// The current total number of frames transmitted +// FramesTx returns a uint64 +func (obj *flowTaggedMetric) HasFramesTx() bool { + return obj.obj.FramesTx != nil +} + +// The current total number of frames transmitted +// SetFramesTx sets the uint64 value in the FlowTaggedMetric object +func (obj *flowTaggedMetric) SetFramesTx(value uint64) FlowTaggedMetric { + + obj.obj.FramesTx = &value + return obj +} + +// The current total number of valid frames received +// FramesRx returns a uint64 +func (obj *flowTaggedMetric) FramesRx() uint64 { + + return *obj.obj.FramesRx + +} + +// The current total number of valid frames received +// FramesRx returns a uint64 +func (obj *flowTaggedMetric) HasFramesRx() bool { + return obj.obj.FramesRx != nil +} + +// The current total number of valid frames received +// SetFramesRx sets the uint64 value in the FlowTaggedMetric object +func (obj *flowTaggedMetric) SetFramesRx(value uint64) FlowTaggedMetric { + + obj.obj.FramesRx = &value + return obj +} + +// The current total number of bytes transmitted +// BytesTx returns a uint64 +func (obj *flowTaggedMetric) BytesTx() uint64 { + + return *obj.obj.BytesTx + +} + +// The current total number of bytes transmitted +// BytesTx returns a uint64 +func (obj *flowTaggedMetric) HasBytesTx() bool { + return obj.obj.BytesTx != nil +} + +// The current total number of bytes transmitted +// SetBytesTx sets the uint64 value in the FlowTaggedMetric object +func (obj *flowTaggedMetric) SetBytesTx(value uint64) FlowTaggedMetric { + + obj.obj.BytesTx = &value + return obj +} + +// The current total number of bytes received +// BytesRx returns a uint64 +func (obj *flowTaggedMetric) BytesRx() uint64 { + + return *obj.obj.BytesRx + +} + +// The current total number of bytes received +// BytesRx returns a uint64 +func (obj *flowTaggedMetric) HasBytesRx() bool { + return obj.obj.BytesRx != nil +} + +// The current total number of bytes received +// SetBytesRx sets the uint64 value in the FlowTaggedMetric object +func (obj *flowTaggedMetric) SetBytesRx(value uint64) FlowTaggedMetric { + + obj.obj.BytesRx = &value + return obj +} + +// The current rate of frames transmitted +// FramesTxRate returns a float32 +func (obj *flowTaggedMetric) FramesTxRate() float32 { + + return *obj.obj.FramesTxRate + +} + +// The current rate of frames transmitted +// FramesTxRate returns a float32 +func (obj *flowTaggedMetric) HasFramesTxRate() bool { + return obj.obj.FramesTxRate != nil +} + +// The current rate of frames transmitted +// SetFramesTxRate sets the float32 value in the FlowTaggedMetric object +func (obj *flowTaggedMetric) SetFramesTxRate(value float32) FlowTaggedMetric { + + obj.obj.FramesTxRate = &value + return obj +} + +// The current rate of valid frames received +// FramesRxRate returns a float32 +func (obj *flowTaggedMetric) FramesRxRate() float32 { + + return *obj.obj.FramesRxRate + +} + +// The current rate of valid frames received +// FramesRxRate returns a float32 +func (obj *flowTaggedMetric) HasFramesRxRate() bool { + return obj.obj.FramesRxRate != nil +} + +// The current rate of valid frames received +// SetFramesRxRate sets the float32 value in the FlowTaggedMetric object +func (obj *flowTaggedMetric) SetFramesRxRate(value float32) FlowTaggedMetric { + + obj.obj.FramesRxRate = &value + return obj +} + +// The percentage of lost frames +// Loss returns a float32 +func (obj *flowTaggedMetric) Loss() float32 { + + return *obj.obj.Loss + +} + +// The percentage of lost frames +// Loss returns a float32 +func (obj *flowTaggedMetric) HasLoss() bool { + return obj.obj.Loss != nil +} + +// The percentage of lost frames +// SetLoss sets the float32 value in the FlowTaggedMetric object +func (obj *flowTaggedMetric) SetLoss(value float32) FlowTaggedMetric { + + obj.obj.Loss = &value + return obj +} + +// description is TBD +// Timestamps returns a MetricTimestamp +func (obj *flowTaggedMetric) Timestamps() MetricTimestamp { + if obj.obj.Timestamps == nil { + obj.obj.Timestamps = NewMetricTimestamp().msg() + } + if obj.timestampsHolder == nil { + obj.timestampsHolder = &metricTimestamp{obj: obj.obj.Timestamps} + } + return obj.timestampsHolder +} + +// description is TBD +// Timestamps returns a MetricTimestamp +func (obj *flowTaggedMetric) HasTimestamps() bool { + return obj.obj.Timestamps != nil +} + +// description is TBD +// SetTimestamps sets the MetricTimestamp value in the FlowTaggedMetric object +func (obj *flowTaggedMetric) SetTimestamps(value MetricTimestamp) FlowTaggedMetric { + + obj.timestampsHolder = nil + obj.obj.Timestamps = value.msg() + + return obj +} + +// description is TBD +// Latency returns a MetricLatency +func (obj *flowTaggedMetric) Latency() MetricLatency { + if obj.obj.Latency == nil { + obj.obj.Latency = NewMetricLatency().msg() + } + if obj.latencyHolder == nil { + obj.latencyHolder = &metricLatency{obj: obj.obj.Latency} + } + return obj.latencyHolder +} + +// description is TBD +// Latency returns a MetricLatency +func (obj *flowTaggedMetric) HasLatency() bool { + return obj.obj.Latency != nil +} + +// description is TBD +// SetLatency sets the MetricLatency value in the FlowTaggedMetric object +func (obj *flowTaggedMetric) SetLatency(value MetricLatency) FlowTaggedMetric { + + obj.latencyHolder = nil + obj.obj.Latency = value.msg() + + return obj +} + +func (obj *flowTaggedMetric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Tags) != 0 { + + if set_default { + obj.Tags().clearHolderSlice() + for _, item := range obj.obj.Tags { + obj.Tags().appendHolderSlice(&flowMetricTag{obj: item}) + } + } + for _, item := range obj.Tags().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Timestamps != nil { + + obj.Timestamps().validateObj(vObj, set_default) + } + + if obj.obj.Latency != nil { + + obj.Latency().validateObj(vObj, set_default) + } + +} + +func (obj *flowTaggedMetric) setDefault() { + +} diff --git a/gosnappi/flow_tagged_metrics_filter.go b/gosnappi/flow_tagged_metrics_filter.go new file mode 100644 index 00000000..6b096f39 --- /dev/null +++ b/gosnappi/flow_tagged_metrics_filter.go @@ -0,0 +1,496 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowTaggedMetricsFilter ***** +type flowTaggedMetricsFilter struct { + validation + obj *otg.FlowTaggedMetricsFilter + marshaller marshalFlowTaggedMetricsFilter + unMarshaller unMarshalFlowTaggedMetricsFilter + filtersHolder FlowTaggedMetricsFilterFlowMetricTagFilterIter +} + +func NewFlowTaggedMetricsFilter() FlowTaggedMetricsFilter { + obj := flowTaggedMetricsFilter{obj: &otg.FlowTaggedMetricsFilter{}} + obj.setDefault() + return &obj +} + +func (obj *flowTaggedMetricsFilter) msg() *otg.FlowTaggedMetricsFilter { + return obj.obj +} + +func (obj *flowTaggedMetricsFilter) setMsg(msg *otg.FlowTaggedMetricsFilter) FlowTaggedMetricsFilter { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowTaggedMetricsFilter struct { + obj *flowTaggedMetricsFilter +} + +type marshalFlowTaggedMetricsFilter interface { + // ToProto marshals FlowTaggedMetricsFilter to protobuf object *otg.FlowTaggedMetricsFilter + ToProto() (*otg.FlowTaggedMetricsFilter, error) + // ToPbText marshals FlowTaggedMetricsFilter to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowTaggedMetricsFilter to YAML text + ToYaml() (string, error) + // ToJson marshals FlowTaggedMetricsFilter to JSON text + ToJson() (string, error) +} + +type unMarshalflowTaggedMetricsFilter struct { + obj *flowTaggedMetricsFilter +} + +type unMarshalFlowTaggedMetricsFilter interface { + // FromProto unmarshals FlowTaggedMetricsFilter from protobuf object *otg.FlowTaggedMetricsFilter + FromProto(msg *otg.FlowTaggedMetricsFilter) (FlowTaggedMetricsFilter, error) + // FromPbText unmarshals FlowTaggedMetricsFilter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowTaggedMetricsFilter from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowTaggedMetricsFilter from JSON text + FromJson(value string) error +} + +func (obj *flowTaggedMetricsFilter) Marshal() marshalFlowTaggedMetricsFilter { + if obj.marshaller == nil { + obj.marshaller = &marshalflowTaggedMetricsFilter{obj: obj} + } + return obj.marshaller +} + +func (obj *flowTaggedMetricsFilter) Unmarshal() unMarshalFlowTaggedMetricsFilter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowTaggedMetricsFilter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowTaggedMetricsFilter) ToProto() (*otg.FlowTaggedMetricsFilter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowTaggedMetricsFilter) FromProto(msg *otg.FlowTaggedMetricsFilter) (FlowTaggedMetricsFilter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowTaggedMetricsFilter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowTaggedMetricsFilter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowTaggedMetricsFilter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowTaggedMetricsFilter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowTaggedMetricsFilter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowTaggedMetricsFilter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowTaggedMetricsFilter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowTaggedMetricsFilter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowTaggedMetricsFilter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowTaggedMetricsFilter) Clone() (FlowTaggedMetricsFilter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowTaggedMetricsFilter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowTaggedMetricsFilter) setNil() { + obj.filtersHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowTaggedMetricsFilter is filter for tagged metrics +type FlowTaggedMetricsFilter interface { + Validation + // msg marshals FlowTaggedMetricsFilter to protobuf object *otg.FlowTaggedMetricsFilter + // and doesn't set defaults + msg() *otg.FlowTaggedMetricsFilter + // setMsg unmarshals FlowTaggedMetricsFilter from protobuf object *otg.FlowTaggedMetricsFilter + // and doesn't set defaults + setMsg(*otg.FlowTaggedMetricsFilter) FlowTaggedMetricsFilter + // provides marshal interface + Marshal() marshalFlowTaggedMetricsFilter + // provides unmarshal interface + Unmarshal() unMarshalFlowTaggedMetricsFilter + // validate validates FlowTaggedMetricsFilter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowTaggedMetricsFilter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Include returns bool, set in FlowTaggedMetricsFilter. + Include() bool + // SetInclude assigns bool provided by user to FlowTaggedMetricsFilter + SetInclude(value bool) FlowTaggedMetricsFilter + // HasInclude checks if Include has been set in FlowTaggedMetricsFilter + HasInclude() bool + // IncludeEmptyMetrics returns bool, set in FlowTaggedMetricsFilter. + IncludeEmptyMetrics() bool + // SetIncludeEmptyMetrics assigns bool provided by user to FlowTaggedMetricsFilter + SetIncludeEmptyMetrics(value bool) FlowTaggedMetricsFilter + // HasIncludeEmptyMetrics checks if IncludeEmptyMetrics has been set in FlowTaggedMetricsFilter + HasIncludeEmptyMetrics() bool + // MetricNames returns []FlowTaggedMetricsFilterMetricNamesEnum, set in FlowTaggedMetricsFilter + MetricNames() []FlowTaggedMetricsFilterMetricNamesEnum + // SetMetricNames assigns []FlowTaggedMetricsFilterMetricNamesEnum provided by user to FlowTaggedMetricsFilter + SetMetricNames(value []FlowTaggedMetricsFilterMetricNamesEnum) FlowTaggedMetricsFilter + // Filters returns FlowTaggedMetricsFilterFlowMetricTagFilterIterIter, set in FlowTaggedMetricsFilter + Filters() FlowTaggedMetricsFilterFlowMetricTagFilterIter + setNil() +} + +// Controls inclusion/exclusion of tagged metrics when fetching flow metrics. +// Include returns a bool +func (obj *flowTaggedMetricsFilter) Include() bool { + + return *obj.obj.Include + +} + +// Controls inclusion/exclusion of tagged metrics when fetching flow metrics. +// Include returns a bool +func (obj *flowTaggedMetricsFilter) HasInclude() bool { + return obj.obj.Include != nil +} + +// Controls inclusion/exclusion of tagged metrics when fetching flow metrics. +// SetInclude sets the bool value in the FlowTaggedMetricsFilter object +func (obj *flowTaggedMetricsFilter) SetInclude(value bool) FlowTaggedMetricsFilter { + + obj.obj.Include = &value + return obj +} + +// Controls inclusion/exclusion of tagged metrics where each underlying attributes has zero value or absent value. +// IncludeEmptyMetrics returns a bool +func (obj *flowTaggedMetricsFilter) IncludeEmptyMetrics() bool { + + return *obj.obj.IncludeEmptyMetrics + +} + +// Controls inclusion/exclusion of tagged metrics where each underlying attributes has zero value or absent value. +// IncludeEmptyMetrics returns a bool +func (obj *flowTaggedMetricsFilter) HasIncludeEmptyMetrics() bool { + return obj.obj.IncludeEmptyMetrics != nil +} + +// Controls inclusion/exclusion of tagged metrics where each underlying attributes has zero value or absent value. +// SetIncludeEmptyMetrics sets the bool value in the FlowTaggedMetricsFilter object +func (obj *flowTaggedMetricsFilter) SetIncludeEmptyMetrics(value bool) FlowTaggedMetricsFilter { + + obj.obj.IncludeEmptyMetrics = &value + return obj +} + +type FlowTaggedMetricsFilterMetricNamesEnum string + +// Enum of MetricNames on FlowTaggedMetricsFilter +var FlowTaggedMetricsFilterMetricNames = struct { + FRAMES_TX FlowTaggedMetricsFilterMetricNamesEnum + FRAMES_RX FlowTaggedMetricsFilterMetricNamesEnum + BYTES_TX FlowTaggedMetricsFilterMetricNamesEnum + BYTES_RX FlowTaggedMetricsFilterMetricNamesEnum + FRAMES_TX_RATE FlowTaggedMetricsFilterMetricNamesEnum + FRAMES_RX_RATE FlowTaggedMetricsFilterMetricNamesEnum +}{ + FRAMES_TX: FlowTaggedMetricsFilterMetricNamesEnum("frames_tx"), + FRAMES_RX: FlowTaggedMetricsFilterMetricNamesEnum("frames_rx"), + BYTES_TX: FlowTaggedMetricsFilterMetricNamesEnum("bytes_tx"), + BYTES_RX: FlowTaggedMetricsFilterMetricNamesEnum("bytes_rx"), + FRAMES_TX_RATE: FlowTaggedMetricsFilterMetricNamesEnum("frames_tx_rate"), + FRAMES_RX_RATE: FlowTaggedMetricsFilterMetricNamesEnum("frames_rx_rate"), +} + +func (obj *flowTaggedMetricsFilter) MetricNames() []FlowTaggedMetricsFilterMetricNamesEnum { + items := []FlowTaggedMetricsFilterMetricNamesEnum{} + for _, item := range obj.obj.MetricNames { + items = append(items, FlowTaggedMetricsFilterMetricNamesEnum(item.String())) + } + return items +} + +// The list of metric names that the returned result set will contain. If the list is empty then all metrics will be returned. +// SetMetricNames sets the []string value in the FlowTaggedMetricsFilter object +func (obj *flowTaggedMetricsFilter) SetMetricNames(value []FlowTaggedMetricsFilterMetricNamesEnum) FlowTaggedMetricsFilter { + + items := []otg.FlowTaggedMetricsFilter_MetricNames_Enum{} + for _, item := range value { + intValue := otg.FlowTaggedMetricsFilter_MetricNames_Enum_value[string(item)] + items = append(items, otg.FlowTaggedMetricsFilter_MetricNames_Enum(intValue)) + } + obj.obj.MetricNames = items + return obj +} + +// List of filters to selectively fetch tagged metrics with certain tag and corresponding value. +// Filters returns a []FlowMetricTagFilter +func (obj *flowTaggedMetricsFilter) Filters() FlowTaggedMetricsFilterFlowMetricTagFilterIter { + if len(obj.obj.Filters) == 0 { + obj.obj.Filters = []*otg.FlowMetricTagFilter{} + } + if obj.filtersHolder == nil { + obj.filtersHolder = newFlowTaggedMetricsFilterFlowMetricTagFilterIter(&obj.obj.Filters).setMsg(obj) + } + return obj.filtersHolder +} + +type flowTaggedMetricsFilterFlowMetricTagFilterIter struct { + obj *flowTaggedMetricsFilter + flowMetricTagFilterSlice []FlowMetricTagFilter + fieldPtr *[]*otg.FlowMetricTagFilter +} + +func newFlowTaggedMetricsFilterFlowMetricTagFilterIter(ptr *[]*otg.FlowMetricTagFilter) FlowTaggedMetricsFilterFlowMetricTagFilterIter { + return &flowTaggedMetricsFilterFlowMetricTagFilterIter{fieldPtr: ptr} +} + +type FlowTaggedMetricsFilterFlowMetricTagFilterIter interface { + setMsg(*flowTaggedMetricsFilter) FlowTaggedMetricsFilterFlowMetricTagFilterIter + Items() []FlowMetricTagFilter + Add() FlowMetricTagFilter + Append(items ...FlowMetricTagFilter) FlowTaggedMetricsFilterFlowMetricTagFilterIter + Set(index int, newObj FlowMetricTagFilter) FlowTaggedMetricsFilterFlowMetricTagFilterIter + Clear() FlowTaggedMetricsFilterFlowMetricTagFilterIter + clearHolderSlice() FlowTaggedMetricsFilterFlowMetricTagFilterIter + appendHolderSlice(item FlowMetricTagFilter) FlowTaggedMetricsFilterFlowMetricTagFilterIter +} + +func (obj *flowTaggedMetricsFilterFlowMetricTagFilterIter) setMsg(msg *flowTaggedMetricsFilter) FlowTaggedMetricsFilterFlowMetricTagFilterIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flowMetricTagFilter{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *flowTaggedMetricsFilterFlowMetricTagFilterIter) Items() []FlowMetricTagFilter { + return obj.flowMetricTagFilterSlice +} + +func (obj *flowTaggedMetricsFilterFlowMetricTagFilterIter) Add() FlowMetricTagFilter { + newObj := &otg.FlowMetricTagFilter{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flowMetricTagFilter{obj: newObj} + newLibObj.setDefault() + obj.flowMetricTagFilterSlice = append(obj.flowMetricTagFilterSlice, newLibObj) + return newLibObj +} + +func (obj *flowTaggedMetricsFilterFlowMetricTagFilterIter) Append(items ...FlowMetricTagFilter) FlowTaggedMetricsFilterFlowMetricTagFilterIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowMetricTagFilterSlice = append(obj.flowMetricTagFilterSlice, item) + } + return obj +} + +func (obj *flowTaggedMetricsFilterFlowMetricTagFilterIter) Set(index int, newObj FlowMetricTagFilter) FlowTaggedMetricsFilterFlowMetricTagFilterIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowMetricTagFilterSlice[index] = newObj + return obj +} +func (obj *flowTaggedMetricsFilterFlowMetricTagFilterIter) Clear() FlowTaggedMetricsFilterFlowMetricTagFilterIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.FlowMetricTagFilter{} + obj.flowMetricTagFilterSlice = []FlowMetricTagFilter{} + } + return obj +} +func (obj *flowTaggedMetricsFilterFlowMetricTagFilterIter) clearHolderSlice() FlowTaggedMetricsFilterFlowMetricTagFilterIter { + if len(obj.flowMetricTagFilterSlice) > 0 { + obj.flowMetricTagFilterSlice = []FlowMetricTagFilter{} + } + return obj +} +func (obj *flowTaggedMetricsFilterFlowMetricTagFilterIter) appendHolderSlice(item FlowMetricTagFilter) FlowTaggedMetricsFilterFlowMetricTagFilterIter { + obj.flowMetricTagFilterSlice = append(obj.flowMetricTagFilterSlice, item) + return obj +} + +func (obj *flowTaggedMetricsFilter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Filters) != 0 { + + if set_default { + obj.Filters().clearHolderSlice() + for _, item := range obj.obj.Filters { + obj.Filters().appendHolderSlice(&flowMetricTagFilter{obj: item}) + } + } + for _, item := range obj.Filters().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *flowTaggedMetricsFilter) setDefault() { + if obj.obj.Include == nil { + obj.SetInclude(true) + } + if obj.obj.IncludeEmptyMetrics == nil { + obj.SetIncludeEmptyMetrics(false) + } + +} diff --git a/gosnappi/flow_tcp.go b/gosnappi/flow_tcp.go new file mode 100644 index 00000000..a9b4c3ad --- /dev/null +++ b/gosnappi/flow_tcp.go @@ -0,0 +1,973 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowTcp ***** +type flowTcp struct { + validation + obj *otg.FlowTcp + marshaller marshalFlowTcp + unMarshaller unMarshalFlowTcp + srcPortHolder PatternFlowTcpSrcPort + dstPortHolder PatternFlowTcpDstPort + seqNumHolder PatternFlowTcpSeqNum + ackNumHolder PatternFlowTcpAckNum + dataOffsetHolder PatternFlowTcpDataOffset + ecnNsHolder PatternFlowTcpEcnNs + ecnCwrHolder PatternFlowTcpEcnCwr + ecnEchoHolder PatternFlowTcpEcnEcho + ctlUrgHolder PatternFlowTcpCtlUrg + ctlAckHolder PatternFlowTcpCtlAck + ctlPshHolder PatternFlowTcpCtlPsh + ctlRstHolder PatternFlowTcpCtlRst + ctlSynHolder PatternFlowTcpCtlSyn + ctlFinHolder PatternFlowTcpCtlFin + windowHolder PatternFlowTcpWindow + checksumHolder PatternFlowTcpChecksum +} + +func NewFlowTcp() FlowTcp { + obj := flowTcp{obj: &otg.FlowTcp{}} + obj.setDefault() + return &obj +} + +func (obj *flowTcp) msg() *otg.FlowTcp { + return obj.obj +} + +func (obj *flowTcp) setMsg(msg *otg.FlowTcp) FlowTcp { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowTcp struct { + obj *flowTcp +} + +type marshalFlowTcp interface { + // ToProto marshals FlowTcp to protobuf object *otg.FlowTcp + ToProto() (*otg.FlowTcp, error) + // ToPbText marshals FlowTcp to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowTcp to YAML text + ToYaml() (string, error) + // ToJson marshals FlowTcp to JSON text + ToJson() (string, error) +} + +type unMarshalflowTcp struct { + obj *flowTcp +} + +type unMarshalFlowTcp interface { + // FromProto unmarshals FlowTcp from protobuf object *otg.FlowTcp + FromProto(msg *otg.FlowTcp) (FlowTcp, error) + // FromPbText unmarshals FlowTcp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowTcp from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowTcp from JSON text + FromJson(value string) error +} + +func (obj *flowTcp) Marshal() marshalFlowTcp { + if obj.marshaller == nil { + obj.marshaller = &marshalflowTcp{obj: obj} + } + return obj.marshaller +} + +func (obj *flowTcp) Unmarshal() unMarshalFlowTcp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowTcp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowTcp) ToProto() (*otg.FlowTcp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowTcp) FromProto(msg *otg.FlowTcp) (FlowTcp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowTcp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowTcp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowTcp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowTcp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowTcp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowTcp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowTcp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowTcp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowTcp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowTcp) Clone() (FlowTcp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowTcp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowTcp) setNil() { + obj.srcPortHolder = nil + obj.dstPortHolder = nil + obj.seqNumHolder = nil + obj.ackNumHolder = nil + obj.dataOffsetHolder = nil + obj.ecnNsHolder = nil + obj.ecnCwrHolder = nil + obj.ecnEchoHolder = nil + obj.ctlUrgHolder = nil + obj.ctlAckHolder = nil + obj.ctlPshHolder = nil + obj.ctlRstHolder = nil + obj.ctlSynHolder = nil + obj.ctlFinHolder = nil + obj.windowHolder = nil + obj.checksumHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowTcp is tCP packet header +type FlowTcp interface { + Validation + // msg marshals FlowTcp to protobuf object *otg.FlowTcp + // and doesn't set defaults + msg() *otg.FlowTcp + // setMsg unmarshals FlowTcp from protobuf object *otg.FlowTcp + // and doesn't set defaults + setMsg(*otg.FlowTcp) FlowTcp + // provides marshal interface + Marshal() marshalFlowTcp + // provides unmarshal interface + Unmarshal() unMarshalFlowTcp + // validate validates FlowTcp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowTcp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // SrcPort returns PatternFlowTcpSrcPort, set in FlowTcp. + // PatternFlowTcpSrcPort is source port + SrcPort() PatternFlowTcpSrcPort + // SetSrcPort assigns PatternFlowTcpSrcPort provided by user to FlowTcp. + // PatternFlowTcpSrcPort is source port + SetSrcPort(value PatternFlowTcpSrcPort) FlowTcp + // HasSrcPort checks if SrcPort has been set in FlowTcp + HasSrcPort() bool + // DstPort returns PatternFlowTcpDstPort, set in FlowTcp. + // PatternFlowTcpDstPort is destination port + DstPort() PatternFlowTcpDstPort + // SetDstPort assigns PatternFlowTcpDstPort provided by user to FlowTcp. + // PatternFlowTcpDstPort is destination port + SetDstPort(value PatternFlowTcpDstPort) FlowTcp + // HasDstPort checks if DstPort has been set in FlowTcp + HasDstPort() bool + // SeqNum returns PatternFlowTcpSeqNum, set in FlowTcp. + // PatternFlowTcpSeqNum is sequence number + SeqNum() PatternFlowTcpSeqNum + // SetSeqNum assigns PatternFlowTcpSeqNum provided by user to FlowTcp. + // PatternFlowTcpSeqNum is sequence number + SetSeqNum(value PatternFlowTcpSeqNum) FlowTcp + // HasSeqNum checks if SeqNum has been set in FlowTcp + HasSeqNum() bool + // AckNum returns PatternFlowTcpAckNum, set in FlowTcp. + // PatternFlowTcpAckNum is acknowledgement number + AckNum() PatternFlowTcpAckNum + // SetAckNum assigns PatternFlowTcpAckNum provided by user to FlowTcp. + // PatternFlowTcpAckNum is acknowledgement number + SetAckNum(value PatternFlowTcpAckNum) FlowTcp + // HasAckNum checks if AckNum has been set in FlowTcp + HasAckNum() bool + // DataOffset returns PatternFlowTcpDataOffset, set in FlowTcp. + // PatternFlowTcpDataOffset is the number of 32 bit words in the TCP header. This indicates where the data begins. + DataOffset() PatternFlowTcpDataOffset + // SetDataOffset assigns PatternFlowTcpDataOffset provided by user to FlowTcp. + // PatternFlowTcpDataOffset is the number of 32 bit words in the TCP header. This indicates where the data begins. + SetDataOffset(value PatternFlowTcpDataOffset) FlowTcp + // HasDataOffset checks if DataOffset has been set in FlowTcp + HasDataOffset() bool + // EcnNs returns PatternFlowTcpEcnNs, set in FlowTcp. + // PatternFlowTcpEcnNs is explicit congestion notification, concealment protection. + EcnNs() PatternFlowTcpEcnNs + // SetEcnNs assigns PatternFlowTcpEcnNs provided by user to FlowTcp. + // PatternFlowTcpEcnNs is explicit congestion notification, concealment protection. + SetEcnNs(value PatternFlowTcpEcnNs) FlowTcp + // HasEcnNs checks if EcnNs has been set in FlowTcp + HasEcnNs() bool + // EcnCwr returns PatternFlowTcpEcnCwr, set in FlowTcp. + // PatternFlowTcpEcnCwr is explicit congestion notification, congestion window reduced. + EcnCwr() PatternFlowTcpEcnCwr + // SetEcnCwr assigns PatternFlowTcpEcnCwr provided by user to FlowTcp. + // PatternFlowTcpEcnCwr is explicit congestion notification, congestion window reduced. + SetEcnCwr(value PatternFlowTcpEcnCwr) FlowTcp + // HasEcnCwr checks if EcnCwr has been set in FlowTcp + HasEcnCwr() bool + // EcnEcho returns PatternFlowTcpEcnEcho, set in FlowTcp. + // PatternFlowTcpEcnEcho is explicit congestion notification, echo. 1 indicates the peer is ecn capable. 0 indicates that a packet with ipv4.ecn = 11 in the ip header was received during normal transmission. + EcnEcho() PatternFlowTcpEcnEcho + // SetEcnEcho assigns PatternFlowTcpEcnEcho provided by user to FlowTcp. + // PatternFlowTcpEcnEcho is explicit congestion notification, echo. 1 indicates the peer is ecn capable. 0 indicates that a packet with ipv4.ecn = 11 in the ip header was received during normal transmission. + SetEcnEcho(value PatternFlowTcpEcnEcho) FlowTcp + // HasEcnEcho checks if EcnEcho has been set in FlowTcp + HasEcnEcho() bool + // CtlUrg returns PatternFlowTcpCtlUrg, set in FlowTcp. + // PatternFlowTcpCtlUrg is a value of 1 indicates that the urgent pointer field is significant. + CtlUrg() PatternFlowTcpCtlUrg + // SetCtlUrg assigns PatternFlowTcpCtlUrg provided by user to FlowTcp. + // PatternFlowTcpCtlUrg is a value of 1 indicates that the urgent pointer field is significant. + SetCtlUrg(value PatternFlowTcpCtlUrg) FlowTcp + // HasCtlUrg checks if CtlUrg has been set in FlowTcp + HasCtlUrg() bool + // CtlAck returns PatternFlowTcpCtlAck, set in FlowTcp. + // PatternFlowTcpCtlAck is a value of 1 indicates that the ackknowledgment field is significant. + CtlAck() PatternFlowTcpCtlAck + // SetCtlAck assigns PatternFlowTcpCtlAck provided by user to FlowTcp. + // PatternFlowTcpCtlAck is a value of 1 indicates that the ackknowledgment field is significant. + SetCtlAck(value PatternFlowTcpCtlAck) FlowTcp + // HasCtlAck checks if CtlAck has been set in FlowTcp + HasCtlAck() bool + // CtlPsh returns PatternFlowTcpCtlPsh, set in FlowTcp. + // PatternFlowTcpCtlPsh is asks to push the buffered data to the receiving application. + CtlPsh() PatternFlowTcpCtlPsh + // SetCtlPsh assigns PatternFlowTcpCtlPsh provided by user to FlowTcp. + // PatternFlowTcpCtlPsh is asks to push the buffered data to the receiving application. + SetCtlPsh(value PatternFlowTcpCtlPsh) FlowTcp + // HasCtlPsh checks if CtlPsh has been set in FlowTcp + HasCtlPsh() bool + // CtlRst returns PatternFlowTcpCtlRst, set in FlowTcp. + // PatternFlowTcpCtlRst is reset the connection. + CtlRst() PatternFlowTcpCtlRst + // SetCtlRst assigns PatternFlowTcpCtlRst provided by user to FlowTcp. + // PatternFlowTcpCtlRst is reset the connection. + SetCtlRst(value PatternFlowTcpCtlRst) FlowTcp + // HasCtlRst checks if CtlRst has been set in FlowTcp + HasCtlRst() bool + // CtlSyn returns PatternFlowTcpCtlSyn, set in FlowTcp. + // PatternFlowTcpCtlSyn is synchronize sequenece numbers. + CtlSyn() PatternFlowTcpCtlSyn + // SetCtlSyn assigns PatternFlowTcpCtlSyn provided by user to FlowTcp. + // PatternFlowTcpCtlSyn is synchronize sequenece numbers. + SetCtlSyn(value PatternFlowTcpCtlSyn) FlowTcp + // HasCtlSyn checks if CtlSyn has been set in FlowTcp + HasCtlSyn() bool + // CtlFin returns PatternFlowTcpCtlFin, set in FlowTcp. + // PatternFlowTcpCtlFin is last packet from the sender. + CtlFin() PatternFlowTcpCtlFin + // SetCtlFin assigns PatternFlowTcpCtlFin provided by user to FlowTcp. + // PatternFlowTcpCtlFin is last packet from the sender. + SetCtlFin(value PatternFlowTcpCtlFin) FlowTcp + // HasCtlFin checks if CtlFin has been set in FlowTcp + HasCtlFin() bool + // Window returns PatternFlowTcpWindow, set in FlowTcp. + // PatternFlowTcpWindow is tcp connection window. + Window() PatternFlowTcpWindow + // SetWindow assigns PatternFlowTcpWindow provided by user to FlowTcp. + // PatternFlowTcpWindow is tcp connection window. + SetWindow(value PatternFlowTcpWindow) FlowTcp + // HasWindow checks if Window has been set in FlowTcp + HasWindow() bool + // Checksum returns PatternFlowTcpChecksum, set in FlowTcp. + // PatternFlowTcpChecksum is the one's complement of the one's complement sum of all 16 bit words in header and text. An all-zero value means that no checksum will be transmitted. While computing the checksum, the checksum field itself is replaced with zeros. + Checksum() PatternFlowTcpChecksum + // SetChecksum assigns PatternFlowTcpChecksum provided by user to FlowTcp. + // PatternFlowTcpChecksum is the one's complement of the one's complement sum of all 16 bit words in header and text. An all-zero value means that no checksum will be transmitted. While computing the checksum, the checksum field itself is replaced with zeros. + SetChecksum(value PatternFlowTcpChecksum) FlowTcp + // HasChecksum checks if Checksum has been set in FlowTcp + HasChecksum() bool + setNil() +} + +// description is TBD +// SrcPort returns a PatternFlowTcpSrcPort +func (obj *flowTcp) SrcPort() PatternFlowTcpSrcPort { + if obj.obj.SrcPort == nil { + obj.obj.SrcPort = NewPatternFlowTcpSrcPort().msg() + } + if obj.srcPortHolder == nil { + obj.srcPortHolder = &patternFlowTcpSrcPort{obj: obj.obj.SrcPort} + } + return obj.srcPortHolder +} + +// description is TBD +// SrcPort returns a PatternFlowTcpSrcPort +func (obj *flowTcp) HasSrcPort() bool { + return obj.obj.SrcPort != nil +} + +// description is TBD +// SetSrcPort sets the PatternFlowTcpSrcPort value in the FlowTcp object +func (obj *flowTcp) SetSrcPort(value PatternFlowTcpSrcPort) FlowTcp { + + obj.srcPortHolder = nil + obj.obj.SrcPort = value.msg() + + return obj +} + +// description is TBD +// DstPort returns a PatternFlowTcpDstPort +func (obj *flowTcp) DstPort() PatternFlowTcpDstPort { + if obj.obj.DstPort == nil { + obj.obj.DstPort = NewPatternFlowTcpDstPort().msg() + } + if obj.dstPortHolder == nil { + obj.dstPortHolder = &patternFlowTcpDstPort{obj: obj.obj.DstPort} + } + return obj.dstPortHolder +} + +// description is TBD +// DstPort returns a PatternFlowTcpDstPort +func (obj *flowTcp) HasDstPort() bool { + return obj.obj.DstPort != nil +} + +// description is TBD +// SetDstPort sets the PatternFlowTcpDstPort value in the FlowTcp object +func (obj *flowTcp) SetDstPort(value PatternFlowTcpDstPort) FlowTcp { + + obj.dstPortHolder = nil + obj.obj.DstPort = value.msg() + + return obj +} + +// description is TBD +// SeqNum returns a PatternFlowTcpSeqNum +func (obj *flowTcp) SeqNum() PatternFlowTcpSeqNum { + if obj.obj.SeqNum == nil { + obj.obj.SeqNum = NewPatternFlowTcpSeqNum().msg() + } + if obj.seqNumHolder == nil { + obj.seqNumHolder = &patternFlowTcpSeqNum{obj: obj.obj.SeqNum} + } + return obj.seqNumHolder +} + +// description is TBD +// SeqNum returns a PatternFlowTcpSeqNum +func (obj *flowTcp) HasSeqNum() bool { + return obj.obj.SeqNum != nil +} + +// description is TBD +// SetSeqNum sets the PatternFlowTcpSeqNum value in the FlowTcp object +func (obj *flowTcp) SetSeqNum(value PatternFlowTcpSeqNum) FlowTcp { + + obj.seqNumHolder = nil + obj.obj.SeqNum = value.msg() + + return obj +} + +// description is TBD +// AckNum returns a PatternFlowTcpAckNum +func (obj *flowTcp) AckNum() PatternFlowTcpAckNum { + if obj.obj.AckNum == nil { + obj.obj.AckNum = NewPatternFlowTcpAckNum().msg() + } + if obj.ackNumHolder == nil { + obj.ackNumHolder = &patternFlowTcpAckNum{obj: obj.obj.AckNum} + } + return obj.ackNumHolder +} + +// description is TBD +// AckNum returns a PatternFlowTcpAckNum +func (obj *flowTcp) HasAckNum() bool { + return obj.obj.AckNum != nil +} + +// description is TBD +// SetAckNum sets the PatternFlowTcpAckNum value in the FlowTcp object +func (obj *flowTcp) SetAckNum(value PatternFlowTcpAckNum) FlowTcp { + + obj.ackNumHolder = nil + obj.obj.AckNum = value.msg() + + return obj +} + +// description is TBD +// DataOffset returns a PatternFlowTcpDataOffset +func (obj *flowTcp) DataOffset() PatternFlowTcpDataOffset { + if obj.obj.DataOffset == nil { + obj.obj.DataOffset = NewPatternFlowTcpDataOffset().msg() + } + if obj.dataOffsetHolder == nil { + obj.dataOffsetHolder = &patternFlowTcpDataOffset{obj: obj.obj.DataOffset} + } + return obj.dataOffsetHolder +} + +// description is TBD +// DataOffset returns a PatternFlowTcpDataOffset +func (obj *flowTcp) HasDataOffset() bool { + return obj.obj.DataOffset != nil +} + +// description is TBD +// SetDataOffset sets the PatternFlowTcpDataOffset value in the FlowTcp object +func (obj *flowTcp) SetDataOffset(value PatternFlowTcpDataOffset) FlowTcp { + + obj.dataOffsetHolder = nil + obj.obj.DataOffset = value.msg() + + return obj +} + +// description is TBD +// EcnNs returns a PatternFlowTcpEcnNs +func (obj *flowTcp) EcnNs() PatternFlowTcpEcnNs { + if obj.obj.EcnNs == nil { + obj.obj.EcnNs = NewPatternFlowTcpEcnNs().msg() + } + if obj.ecnNsHolder == nil { + obj.ecnNsHolder = &patternFlowTcpEcnNs{obj: obj.obj.EcnNs} + } + return obj.ecnNsHolder +} + +// description is TBD +// EcnNs returns a PatternFlowTcpEcnNs +func (obj *flowTcp) HasEcnNs() bool { + return obj.obj.EcnNs != nil +} + +// description is TBD +// SetEcnNs sets the PatternFlowTcpEcnNs value in the FlowTcp object +func (obj *flowTcp) SetEcnNs(value PatternFlowTcpEcnNs) FlowTcp { + + obj.ecnNsHolder = nil + obj.obj.EcnNs = value.msg() + + return obj +} + +// description is TBD +// EcnCwr returns a PatternFlowTcpEcnCwr +func (obj *flowTcp) EcnCwr() PatternFlowTcpEcnCwr { + if obj.obj.EcnCwr == nil { + obj.obj.EcnCwr = NewPatternFlowTcpEcnCwr().msg() + } + if obj.ecnCwrHolder == nil { + obj.ecnCwrHolder = &patternFlowTcpEcnCwr{obj: obj.obj.EcnCwr} + } + return obj.ecnCwrHolder +} + +// description is TBD +// EcnCwr returns a PatternFlowTcpEcnCwr +func (obj *flowTcp) HasEcnCwr() bool { + return obj.obj.EcnCwr != nil +} + +// description is TBD +// SetEcnCwr sets the PatternFlowTcpEcnCwr value in the FlowTcp object +func (obj *flowTcp) SetEcnCwr(value PatternFlowTcpEcnCwr) FlowTcp { + + obj.ecnCwrHolder = nil + obj.obj.EcnCwr = value.msg() + + return obj +} + +// description is TBD +// EcnEcho returns a PatternFlowTcpEcnEcho +func (obj *flowTcp) EcnEcho() PatternFlowTcpEcnEcho { + if obj.obj.EcnEcho == nil { + obj.obj.EcnEcho = NewPatternFlowTcpEcnEcho().msg() + } + if obj.ecnEchoHolder == nil { + obj.ecnEchoHolder = &patternFlowTcpEcnEcho{obj: obj.obj.EcnEcho} + } + return obj.ecnEchoHolder +} + +// description is TBD +// EcnEcho returns a PatternFlowTcpEcnEcho +func (obj *flowTcp) HasEcnEcho() bool { + return obj.obj.EcnEcho != nil +} + +// description is TBD +// SetEcnEcho sets the PatternFlowTcpEcnEcho value in the FlowTcp object +func (obj *flowTcp) SetEcnEcho(value PatternFlowTcpEcnEcho) FlowTcp { + + obj.ecnEchoHolder = nil + obj.obj.EcnEcho = value.msg() + + return obj +} + +// description is TBD +// CtlUrg returns a PatternFlowTcpCtlUrg +func (obj *flowTcp) CtlUrg() PatternFlowTcpCtlUrg { + if obj.obj.CtlUrg == nil { + obj.obj.CtlUrg = NewPatternFlowTcpCtlUrg().msg() + } + if obj.ctlUrgHolder == nil { + obj.ctlUrgHolder = &patternFlowTcpCtlUrg{obj: obj.obj.CtlUrg} + } + return obj.ctlUrgHolder +} + +// description is TBD +// CtlUrg returns a PatternFlowTcpCtlUrg +func (obj *flowTcp) HasCtlUrg() bool { + return obj.obj.CtlUrg != nil +} + +// description is TBD +// SetCtlUrg sets the PatternFlowTcpCtlUrg value in the FlowTcp object +func (obj *flowTcp) SetCtlUrg(value PatternFlowTcpCtlUrg) FlowTcp { + + obj.ctlUrgHolder = nil + obj.obj.CtlUrg = value.msg() + + return obj +} + +// description is TBD +// CtlAck returns a PatternFlowTcpCtlAck +func (obj *flowTcp) CtlAck() PatternFlowTcpCtlAck { + if obj.obj.CtlAck == nil { + obj.obj.CtlAck = NewPatternFlowTcpCtlAck().msg() + } + if obj.ctlAckHolder == nil { + obj.ctlAckHolder = &patternFlowTcpCtlAck{obj: obj.obj.CtlAck} + } + return obj.ctlAckHolder +} + +// description is TBD +// CtlAck returns a PatternFlowTcpCtlAck +func (obj *flowTcp) HasCtlAck() bool { + return obj.obj.CtlAck != nil +} + +// description is TBD +// SetCtlAck sets the PatternFlowTcpCtlAck value in the FlowTcp object +func (obj *flowTcp) SetCtlAck(value PatternFlowTcpCtlAck) FlowTcp { + + obj.ctlAckHolder = nil + obj.obj.CtlAck = value.msg() + + return obj +} + +// description is TBD +// CtlPsh returns a PatternFlowTcpCtlPsh +func (obj *flowTcp) CtlPsh() PatternFlowTcpCtlPsh { + if obj.obj.CtlPsh == nil { + obj.obj.CtlPsh = NewPatternFlowTcpCtlPsh().msg() + } + if obj.ctlPshHolder == nil { + obj.ctlPshHolder = &patternFlowTcpCtlPsh{obj: obj.obj.CtlPsh} + } + return obj.ctlPshHolder +} + +// description is TBD +// CtlPsh returns a PatternFlowTcpCtlPsh +func (obj *flowTcp) HasCtlPsh() bool { + return obj.obj.CtlPsh != nil +} + +// description is TBD +// SetCtlPsh sets the PatternFlowTcpCtlPsh value in the FlowTcp object +func (obj *flowTcp) SetCtlPsh(value PatternFlowTcpCtlPsh) FlowTcp { + + obj.ctlPshHolder = nil + obj.obj.CtlPsh = value.msg() + + return obj +} + +// description is TBD +// CtlRst returns a PatternFlowTcpCtlRst +func (obj *flowTcp) CtlRst() PatternFlowTcpCtlRst { + if obj.obj.CtlRst == nil { + obj.obj.CtlRst = NewPatternFlowTcpCtlRst().msg() + } + if obj.ctlRstHolder == nil { + obj.ctlRstHolder = &patternFlowTcpCtlRst{obj: obj.obj.CtlRst} + } + return obj.ctlRstHolder +} + +// description is TBD +// CtlRst returns a PatternFlowTcpCtlRst +func (obj *flowTcp) HasCtlRst() bool { + return obj.obj.CtlRst != nil +} + +// description is TBD +// SetCtlRst sets the PatternFlowTcpCtlRst value in the FlowTcp object +func (obj *flowTcp) SetCtlRst(value PatternFlowTcpCtlRst) FlowTcp { + + obj.ctlRstHolder = nil + obj.obj.CtlRst = value.msg() + + return obj +} + +// description is TBD +// CtlSyn returns a PatternFlowTcpCtlSyn +func (obj *flowTcp) CtlSyn() PatternFlowTcpCtlSyn { + if obj.obj.CtlSyn == nil { + obj.obj.CtlSyn = NewPatternFlowTcpCtlSyn().msg() + } + if obj.ctlSynHolder == nil { + obj.ctlSynHolder = &patternFlowTcpCtlSyn{obj: obj.obj.CtlSyn} + } + return obj.ctlSynHolder +} + +// description is TBD +// CtlSyn returns a PatternFlowTcpCtlSyn +func (obj *flowTcp) HasCtlSyn() bool { + return obj.obj.CtlSyn != nil +} + +// description is TBD +// SetCtlSyn sets the PatternFlowTcpCtlSyn value in the FlowTcp object +func (obj *flowTcp) SetCtlSyn(value PatternFlowTcpCtlSyn) FlowTcp { + + obj.ctlSynHolder = nil + obj.obj.CtlSyn = value.msg() + + return obj +} + +// description is TBD +// CtlFin returns a PatternFlowTcpCtlFin +func (obj *flowTcp) CtlFin() PatternFlowTcpCtlFin { + if obj.obj.CtlFin == nil { + obj.obj.CtlFin = NewPatternFlowTcpCtlFin().msg() + } + if obj.ctlFinHolder == nil { + obj.ctlFinHolder = &patternFlowTcpCtlFin{obj: obj.obj.CtlFin} + } + return obj.ctlFinHolder +} + +// description is TBD +// CtlFin returns a PatternFlowTcpCtlFin +func (obj *flowTcp) HasCtlFin() bool { + return obj.obj.CtlFin != nil +} + +// description is TBD +// SetCtlFin sets the PatternFlowTcpCtlFin value in the FlowTcp object +func (obj *flowTcp) SetCtlFin(value PatternFlowTcpCtlFin) FlowTcp { + + obj.ctlFinHolder = nil + obj.obj.CtlFin = value.msg() + + return obj +} + +// description is TBD +// Window returns a PatternFlowTcpWindow +func (obj *flowTcp) Window() PatternFlowTcpWindow { + if obj.obj.Window == nil { + obj.obj.Window = NewPatternFlowTcpWindow().msg() + } + if obj.windowHolder == nil { + obj.windowHolder = &patternFlowTcpWindow{obj: obj.obj.Window} + } + return obj.windowHolder +} + +// description is TBD +// Window returns a PatternFlowTcpWindow +func (obj *flowTcp) HasWindow() bool { + return obj.obj.Window != nil +} + +// description is TBD +// SetWindow sets the PatternFlowTcpWindow value in the FlowTcp object +func (obj *flowTcp) SetWindow(value PatternFlowTcpWindow) FlowTcp { + + obj.windowHolder = nil + obj.obj.Window = value.msg() + + return obj +} + +// description is TBD +// Checksum returns a PatternFlowTcpChecksum +func (obj *flowTcp) Checksum() PatternFlowTcpChecksum { + if obj.obj.Checksum == nil { + obj.obj.Checksum = NewPatternFlowTcpChecksum().msg() + } + if obj.checksumHolder == nil { + obj.checksumHolder = &patternFlowTcpChecksum{obj: obj.obj.Checksum} + } + return obj.checksumHolder +} + +// description is TBD +// Checksum returns a PatternFlowTcpChecksum +func (obj *flowTcp) HasChecksum() bool { + return obj.obj.Checksum != nil +} + +// description is TBD +// SetChecksum sets the PatternFlowTcpChecksum value in the FlowTcp object +func (obj *flowTcp) SetChecksum(value PatternFlowTcpChecksum) FlowTcp { + + obj.checksumHolder = nil + obj.obj.Checksum = value.msg() + + return obj +} + +func (obj *flowTcp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.SrcPort != nil { + + obj.SrcPort().validateObj(vObj, set_default) + } + + if obj.obj.DstPort != nil { + + obj.DstPort().validateObj(vObj, set_default) + } + + if obj.obj.SeqNum != nil { + + obj.SeqNum().validateObj(vObj, set_default) + } + + if obj.obj.AckNum != nil { + + obj.AckNum().validateObj(vObj, set_default) + } + + if obj.obj.DataOffset != nil { + + obj.DataOffset().validateObj(vObj, set_default) + } + + if obj.obj.EcnNs != nil { + + obj.EcnNs().validateObj(vObj, set_default) + } + + if obj.obj.EcnCwr != nil { + + obj.EcnCwr().validateObj(vObj, set_default) + } + + if obj.obj.EcnEcho != nil { + + obj.EcnEcho().validateObj(vObj, set_default) + } + + if obj.obj.CtlUrg != nil { + + obj.CtlUrg().validateObj(vObj, set_default) + } + + if obj.obj.CtlAck != nil { + + obj.CtlAck().validateObj(vObj, set_default) + } + + if obj.obj.CtlPsh != nil { + + obj.CtlPsh().validateObj(vObj, set_default) + } + + if obj.obj.CtlRst != nil { + + obj.CtlRst().validateObj(vObj, set_default) + } + + if obj.obj.CtlSyn != nil { + + obj.CtlSyn().validateObj(vObj, set_default) + } + + if obj.obj.CtlFin != nil { + + obj.CtlFin().validateObj(vObj, set_default) + } + + if obj.obj.Window != nil { + + obj.Window().validateObj(vObj, set_default) + } + + if obj.obj.Checksum != nil { + + obj.Checksum().validateObj(vObj, set_default) + } + +} + +func (obj *flowTcp) setDefault() { + +} diff --git a/gosnappi/flow_tx_rx.go b/gosnappi/flow_tx_rx.go new file mode 100644 index 00000000..1705d767 --- /dev/null +++ b/gosnappi/flow_tx_rx.go @@ -0,0 +1,465 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowTxRx ***** +type flowTxRx struct { + validation + obj *otg.FlowTxRx + marshaller marshalFlowTxRx + unMarshaller unMarshalFlowTxRx + portHolder FlowPort + deviceHolder FlowRouter +} + +func NewFlowTxRx() FlowTxRx { + obj := flowTxRx{obj: &otg.FlowTxRx{}} + obj.setDefault() + return &obj +} + +func (obj *flowTxRx) msg() *otg.FlowTxRx { + return obj.obj +} + +func (obj *flowTxRx) setMsg(msg *otg.FlowTxRx) FlowTxRx { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowTxRx struct { + obj *flowTxRx +} + +type marshalFlowTxRx interface { + // ToProto marshals FlowTxRx to protobuf object *otg.FlowTxRx + ToProto() (*otg.FlowTxRx, error) + // ToPbText marshals FlowTxRx to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowTxRx to YAML text + ToYaml() (string, error) + // ToJson marshals FlowTxRx to JSON text + ToJson() (string, error) +} + +type unMarshalflowTxRx struct { + obj *flowTxRx +} + +type unMarshalFlowTxRx interface { + // FromProto unmarshals FlowTxRx from protobuf object *otg.FlowTxRx + FromProto(msg *otg.FlowTxRx) (FlowTxRx, error) + // FromPbText unmarshals FlowTxRx from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowTxRx from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowTxRx from JSON text + FromJson(value string) error +} + +func (obj *flowTxRx) Marshal() marshalFlowTxRx { + if obj.marshaller == nil { + obj.marshaller = &marshalflowTxRx{obj: obj} + } + return obj.marshaller +} + +func (obj *flowTxRx) Unmarshal() unMarshalFlowTxRx { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowTxRx{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowTxRx) ToProto() (*otg.FlowTxRx, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowTxRx) FromProto(msg *otg.FlowTxRx) (FlowTxRx, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowTxRx) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowTxRx) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowTxRx) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowTxRx) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowTxRx) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowTxRx) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowTxRx) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowTxRx) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowTxRx) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowTxRx) Clone() (FlowTxRx, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowTxRx() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowTxRx) setNil() { + obj.portHolder = nil + obj.deviceHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowTxRx is a container for different types of transmit and receive +// endpoint containers. +type FlowTxRx interface { + Validation + // msg marshals FlowTxRx to protobuf object *otg.FlowTxRx + // and doesn't set defaults + msg() *otg.FlowTxRx + // setMsg unmarshals FlowTxRx from protobuf object *otg.FlowTxRx + // and doesn't set defaults + setMsg(*otg.FlowTxRx) FlowTxRx + // provides marshal interface + Marshal() marshalFlowTxRx + // provides unmarshal interface + Unmarshal() unMarshalFlowTxRx + // validate validates FlowTxRx + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowTxRx, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns FlowTxRxChoiceEnum, set in FlowTxRx + Choice() FlowTxRxChoiceEnum + // setChoice assigns FlowTxRxChoiceEnum provided by user to FlowTxRx + setChoice(value FlowTxRxChoiceEnum) FlowTxRx + // HasChoice checks if Choice has been set in FlowTxRx + HasChoice() bool + // Port returns FlowPort, set in FlowTxRx. + // FlowPort is a container for a transmit port and 0..n intended receive ports. + // When assigning this container to a flow the flows's + // packet headers will not be populated with any address resolution + // information such as source and/or destination addresses. + // For example Flow.Ethernet dst mac address values will be defaulted to 0. + // For full control over the Flow.properties.packet header contents use this + // container. + Port() FlowPort + // SetPort assigns FlowPort provided by user to FlowTxRx. + // FlowPort is a container for a transmit port and 0..n intended receive ports. + // When assigning this container to a flow the flows's + // packet headers will not be populated with any address resolution + // information such as source and/or destination addresses. + // For example Flow.Ethernet dst mac address values will be defaulted to 0. + // For full control over the Flow.properties.packet header contents use this + // container. + SetPort(value FlowPort) FlowTxRx + // HasPort checks if Port has been set in FlowTxRx + HasPort() bool + // Device returns FlowRouter, set in FlowTxRx. + // FlowRouter is a container for declaring a map of 1..n transmit devices to 1..n receive devices. This allows for a single flow to have different tx to rx device flows such as a single one to one map or a many to many map. + Device() FlowRouter + // SetDevice assigns FlowRouter provided by user to FlowTxRx. + // FlowRouter is a container for declaring a map of 1..n transmit devices to 1..n receive devices. This allows for a single flow to have different tx to rx device flows such as a single one to one map or a many to many map. + SetDevice(value FlowRouter) FlowTxRx + // HasDevice checks if Device has been set in FlowTxRx + HasDevice() bool + setNil() +} + +type FlowTxRxChoiceEnum string + +// Enum of Choice on FlowTxRx +var FlowTxRxChoice = struct { + PORT FlowTxRxChoiceEnum + DEVICE FlowTxRxChoiceEnum +}{ + PORT: FlowTxRxChoiceEnum("port"), + DEVICE: FlowTxRxChoiceEnum("device"), +} + +func (obj *flowTxRx) Choice() FlowTxRxChoiceEnum { + return FlowTxRxChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The type of transmit and receive container used by the flow. +// Choice returns a string +func (obj *flowTxRx) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *flowTxRx) setChoice(value FlowTxRxChoiceEnum) FlowTxRx { + intValue, ok := otg.FlowTxRx_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on FlowTxRxChoiceEnum", string(value))) + return obj + } + enumValue := otg.FlowTxRx_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Device = nil + obj.deviceHolder = nil + obj.obj.Port = nil + obj.portHolder = nil + + if value == FlowTxRxChoice.PORT { + obj.obj.Port = NewFlowPort().msg() + } + + if value == FlowTxRxChoice.DEVICE { + obj.obj.Device = NewFlowRouter().msg() + } + + return obj +} + +// description is TBD +// Port returns a FlowPort +func (obj *flowTxRx) Port() FlowPort { + if obj.obj.Port == nil { + obj.setChoice(FlowTxRxChoice.PORT) + } + if obj.portHolder == nil { + obj.portHolder = &flowPort{obj: obj.obj.Port} + } + return obj.portHolder +} + +// description is TBD +// Port returns a FlowPort +func (obj *flowTxRx) HasPort() bool { + return obj.obj.Port != nil +} + +// description is TBD +// SetPort sets the FlowPort value in the FlowTxRx object +func (obj *flowTxRx) SetPort(value FlowPort) FlowTxRx { + obj.setChoice(FlowTxRxChoice.PORT) + obj.portHolder = nil + obj.obj.Port = value.msg() + + return obj +} + +// description is TBD +// Device returns a FlowRouter +func (obj *flowTxRx) Device() FlowRouter { + if obj.obj.Device == nil { + obj.setChoice(FlowTxRxChoice.DEVICE) + } + if obj.deviceHolder == nil { + obj.deviceHolder = &flowRouter{obj: obj.obj.Device} + } + return obj.deviceHolder +} + +// description is TBD +// Device returns a FlowRouter +func (obj *flowTxRx) HasDevice() bool { + return obj.obj.Device != nil +} + +// description is TBD +// SetDevice sets the FlowRouter value in the FlowTxRx object +func (obj *flowTxRx) SetDevice(value FlowRouter) FlowTxRx { + obj.setChoice(FlowTxRxChoice.DEVICE) + obj.deviceHolder = nil + obj.obj.Device = value.msg() + + return obj +} + +func (obj *flowTxRx) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Port != nil { + + obj.Port().validateObj(vObj, set_default) + } + + if obj.obj.Device != nil { + + obj.Device().validateObj(vObj, set_default) + } + +} + +func (obj *flowTxRx) setDefault() { + var choices_set int = 0 + var choice FlowTxRxChoiceEnum + + if obj.obj.Port != nil { + choices_set += 1 + choice = FlowTxRxChoice.PORT + } + + if obj.obj.Device != nil { + choices_set += 1 + choice = FlowTxRxChoice.DEVICE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(FlowTxRxChoice.PORT) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in FlowTxRx") + } + } else { + intVal := otg.FlowTxRx_Choice_Enum_value[string(choice)] + enumValue := otg.FlowTxRx_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/flow_udp.go b/gosnappi/flow_udp.go new file mode 100644 index 00000000..b96923f9 --- /dev/null +++ b/gosnappi/flow_udp.go @@ -0,0 +1,457 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowUdp ***** +type flowUdp struct { + validation + obj *otg.FlowUdp + marshaller marshalFlowUdp + unMarshaller unMarshalFlowUdp + srcPortHolder PatternFlowUdpSrcPort + dstPortHolder PatternFlowUdpDstPort + lengthHolder PatternFlowUdpLength + checksumHolder PatternFlowUdpChecksum +} + +func NewFlowUdp() FlowUdp { + obj := flowUdp{obj: &otg.FlowUdp{}} + obj.setDefault() + return &obj +} + +func (obj *flowUdp) msg() *otg.FlowUdp { + return obj.obj +} + +func (obj *flowUdp) setMsg(msg *otg.FlowUdp) FlowUdp { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowUdp struct { + obj *flowUdp +} + +type marshalFlowUdp interface { + // ToProto marshals FlowUdp to protobuf object *otg.FlowUdp + ToProto() (*otg.FlowUdp, error) + // ToPbText marshals FlowUdp to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowUdp to YAML text + ToYaml() (string, error) + // ToJson marshals FlowUdp to JSON text + ToJson() (string, error) +} + +type unMarshalflowUdp struct { + obj *flowUdp +} + +type unMarshalFlowUdp interface { + // FromProto unmarshals FlowUdp from protobuf object *otg.FlowUdp + FromProto(msg *otg.FlowUdp) (FlowUdp, error) + // FromPbText unmarshals FlowUdp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowUdp from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowUdp from JSON text + FromJson(value string) error +} + +func (obj *flowUdp) Marshal() marshalFlowUdp { + if obj.marshaller == nil { + obj.marshaller = &marshalflowUdp{obj: obj} + } + return obj.marshaller +} + +func (obj *flowUdp) Unmarshal() unMarshalFlowUdp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowUdp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowUdp) ToProto() (*otg.FlowUdp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowUdp) FromProto(msg *otg.FlowUdp) (FlowUdp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowUdp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowUdp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowUdp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowUdp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowUdp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowUdp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowUdp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowUdp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowUdp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowUdp) Clone() (FlowUdp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowUdp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowUdp) setNil() { + obj.srcPortHolder = nil + obj.dstPortHolder = nil + obj.lengthHolder = nil + obj.checksumHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowUdp is uDP packet header +type FlowUdp interface { + Validation + // msg marshals FlowUdp to protobuf object *otg.FlowUdp + // and doesn't set defaults + msg() *otg.FlowUdp + // setMsg unmarshals FlowUdp from protobuf object *otg.FlowUdp + // and doesn't set defaults + setMsg(*otg.FlowUdp) FlowUdp + // provides marshal interface + Marshal() marshalFlowUdp + // provides unmarshal interface + Unmarshal() unMarshalFlowUdp + // validate validates FlowUdp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowUdp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // SrcPort returns PatternFlowUdpSrcPort, set in FlowUdp. + // PatternFlowUdpSrcPort is source port + SrcPort() PatternFlowUdpSrcPort + // SetSrcPort assigns PatternFlowUdpSrcPort provided by user to FlowUdp. + // PatternFlowUdpSrcPort is source port + SetSrcPort(value PatternFlowUdpSrcPort) FlowUdp + // HasSrcPort checks if SrcPort has been set in FlowUdp + HasSrcPort() bool + // DstPort returns PatternFlowUdpDstPort, set in FlowUdp. + // PatternFlowUdpDstPort is destination port + DstPort() PatternFlowUdpDstPort + // SetDstPort assigns PatternFlowUdpDstPort provided by user to FlowUdp. + // PatternFlowUdpDstPort is destination port + SetDstPort(value PatternFlowUdpDstPort) FlowUdp + // HasDstPort checks if DstPort has been set in FlowUdp + HasDstPort() bool + // Length returns PatternFlowUdpLength, set in FlowUdp. + // PatternFlowUdpLength is length + Length() PatternFlowUdpLength + // SetLength assigns PatternFlowUdpLength provided by user to FlowUdp. + // PatternFlowUdpLength is length + SetLength(value PatternFlowUdpLength) FlowUdp + // HasLength checks if Length has been set in FlowUdp + HasLength() bool + // Checksum returns PatternFlowUdpChecksum, set in FlowUdp. + // PatternFlowUdpChecksum is uDP checksum + Checksum() PatternFlowUdpChecksum + // SetChecksum assigns PatternFlowUdpChecksum provided by user to FlowUdp. + // PatternFlowUdpChecksum is uDP checksum + SetChecksum(value PatternFlowUdpChecksum) FlowUdp + // HasChecksum checks if Checksum has been set in FlowUdp + HasChecksum() bool + setNil() +} + +// description is TBD +// SrcPort returns a PatternFlowUdpSrcPort +func (obj *flowUdp) SrcPort() PatternFlowUdpSrcPort { + if obj.obj.SrcPort == nil { + obj.obj.SrcPort = NewPatternFlowUdpSrcPort().msg() + } + if obj.srcPortHolder == nil { + obj.srcPortHolder = &patternFlowUdpSrcPort{obj: obj.obj.SrcPort} + } + return obj.srcPortHolder +} + +// description is TBD +// SrcPort returns a PatternFlowUdpSrcPort +func (obj *flowUdp) HasSrcPort() bool { + return obj.obj.SrcPort != nil +} + +// description is TBD +// SetSrcPort sets the PatternFlowUdpSrcPort value in the FlowUdp object +func (obj *flowUdp) SetSrcPort(value PatternFlowUdpSrcPort) FlowUdp { + + obj.srcPortHolder = nil + obj.obj.SrcPort = value.msg() + + return obj +} + +// description is TBD +// DstPort returns a PatternFlowUdpDstPort +func (obj *flowUdp) DstPort() PatternFlowUdpDstPort { + if obj.obj.DstPort == nil { + obj.obj.DstPort = NewPatternFlowUdpDstPort().msg() + } + if obj.dstPortHolder == nil { + obj.dstPortHolder = &patternFlowUdpDstPort{obj: obj.obj.DstPort} + } + return obj.dstPortHolder +} + +// description is TBD +// DstPort returns a PatternFlowUdpDstPort +func (obj *flowUdp) HasDstPort() bool { + return obj.obj.DstPort != nil +} + +// description is TBD +// SetDstPort sets the PatternFlowUdpDstPort value in the FlowUdp object +func (obj *flowUdp) SetDstPort(value PatternFlowUdpDstPort) FlowUdp { + + obj.dstPortHolder = nil + obj.obj.DstPort = value.msg() + + return obj +} + +// description is TBD +// Length returns a PatternFlowUdpLength +func (obj *flowUdp) Length() PatternFlowUdpLength { + if obj.obj.Length == nil { + obj.obj.Length = NewPatternFlowUdpLength().msg() + } + if obj.lengthHolder == nil { + obj.lengthHolder = &patternFlowUdpLength{obj: obj.obj.Length} + } + return obj.lengthHolder +} + +// description is TBD +// Length returns a PatternFlowUdpLength +func (obj *flowUdp) HasLength() bool { + return obj.obj.Length != nil +} + +// description is TBD +// SetLength sets the PatternFlowUdpLength value in the FlowUdp object +func (obj *flowUdp) SetLength(value PatternFlowUdpLength) FlowUdp { + + obj.lengthHolder = nil + obj.obj.Length = value.msg() + + return obj +} + +// description is TBD +// Checksum returns a PatternFlowUdpChecksum +func (obj *flowUdp) Checksum() PatternFlowUdpChecksum { + if obj.obj.Checksum == nil { + obj.obj.Checksum = NewPatternFlowUdpChecksum().msg() + } + if obj.checksumHolder == nil { + obj.checksumHolder = &patternFlowUdpChecksum{obj: obj.obj.Checksum} + } + return obj.checksumHolder +} + +// description is TBD +// Checksum returns a PatternFlowUdpChecksum +func (obj *flowUdp) HasChecksum() bool { + return obj.obj.Checksum != nil +} + +// description is TBD +// SetChecksum sets the PatternFlowUdpChecksum value in the FlowUdp object +func (obj *flowUdp) SetChecksum(value PatternFlowUdpChecksum) FlowUdp { + + obj.checksumHolder = nil + obj.obj.Checksum = value.msg() + + return obj +} + +func (obj *flowUdp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.SrcPort != nil { + + obj.SrcPort().validateObj(vObj, set_default) + } + + if obj.obj.DstPort != nil { + + obj.DstPort().validateObj(vObj, set_default) + } + + if obj.obj.Length != nil { + + obj.Length().validateObj(vObj, set_default) + } + + if obj.obj.Checksum != nil { + + obj.Checksum().validateObj(vObj, set_default) + } + +} + +func (obj *flowUdp) setDefault() { + +} diff --git a/gosnappi/flow_vlan.go b/gosnappi/flow_vlan.go new file mode 100644 index 00000000..8b9cbe47 --- /dev/null +++ b/gosnappi/flow_vlan.go @@ -0,0 +1,457 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowVlan ***** +type flowVlan struct { + validation + obj *otg.FlowVlan + marshaller marshalFlowVlan + unMarshaller unMarshalFlowVlan + priorityHolder PatternFlowVlanPriority + cfiHolder PatternFlowVlanCfi + idHolder PatternFlowVlanId + tpidHolder PatternFlowVlanTpid +} + +func NewFlowVlan() FlowVlan { + obj := flowVlan{obj: &otg.FlowVlan{}} + obj.setDefault() + return &obj +} + +func (obj *flowVlan) msg() *otg.FlowVlan { + return obj.obj +} + +func (obj *flowVlan) setMsg(msg *otg.FlowVlan) FlowVlan { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowVlan struct { + obj *flowVlan +} + +type marshalFlowVlan interface { + // ToProto marshals FlowVlan to protobuf object *otg.FlowVlan + ToProto() (*otg.FlowVlan, error) + // ToPbText marshals FlowVlan to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowVlan to YAML text + ToYaml() (string, error) + // ToJson marshals FlowVlan to JSON text + ToJson() (string, error) +} + +type unMarshalflowVlan struct { + obj *flowVlan +} + +type unMarshalFlowVlan interface { + // FromProto unmarshals FlowVlan from protobuf object *otg.FlowVlan + FromProto(msg *otg.FlowVlan) (FlowVlan, error) + // FromPbText unmarshals FlowVlan from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowVlan from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowVlan from JSON text + FromJson(value string) error +} + +func (obj *flowVlan) Marshal() marshalFlowVlan { + if obj.marshaller == nil { + obj.marshaller = &marshalflowVlan{obj: obj} + } + return obj.marshaller +} + +func (obj *flowVlan) Unmarshal() unMarshalFlowVlan { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowVlan{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowVlan) ToProto() (*otg.FlowVlan, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowVlan) FromProto(msg *otg.FlowVlan) (FlowVlan, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowVlan) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowVlan) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowVlan) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowVlan) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowVlan) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowVlan) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowVlan) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowVlan) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowVlan) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowVlan) Clone() (FlowVlan, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowVlan() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowVlan) setNil() { + obj.priorityHolder = nil + obj.cfiHolder = nil + obj.idHolder = nil + obj.tpidHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowVlan is vLAN packet header +type FlowVlan interface { + Validation + // msg marshals FlowVlan to protobuf object *otg.FlowVlan + // and doesn't set defaults + msg() *otg.FlowVlan + // setMsg unmarshals FlowVlan from protobuf object *otg.FlowVlan + // and doesn't set defaults + setMsg(*otg.FlowVlan) FlowVlan + // provides marshal interface + Marshal() marshalFlowVlan + // provides unmarshal interface + Unmarshal() unMarshalFlowVlan + // validate validates FlowVlan + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowVlan, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Priority returns PatternFlowVlanPriority, set in FlowVlan. + // PatternFlowVlanPriority is priority code point + Priority() PatternFlowVlanPriority + // SetPriority assigns PatternFlowVlanPriority provided by user to FlowVlan. + // PatternFlowVlanPriority is priority code point + SetPriority(value PatternFlowVlanPriority) FlowVlan + // HasPriority checks if Priority has been set in FlowVlan + HasPriority() bool + // Cfi returns PatternFlowVlanCfi, set in FlowVlan. + // PatternFlowVlanCfi is canonical format indicator or drop elegible indicator + Cfi() PatternFlowVlanCfi + // SetCfi assigns PatternFlowVlanCfi provided by user to FlowVlan. + // PatternFlowVlanCfi is canonical format indicator or drop elegible indicator + SetCfi(value PatternFlowVlanCfi) FlowVlan + // HasCfi checks if Cfi has been set in FlowVlan + HasCfi() bool + // Id returns PatternFlowVlanId, set in FlowVlan. + // PatternFlowVlanId is vlan identifier + Id() PatternFlowVlanId + // SetId assigns PatternFlowVlanId provided by user to FlowVlan. + // PatternFlowVlanId is vlan identifier + SetId(value PatternFlowVlanId) FlowVlan + // HasId checks if Id has been set in FlowVlan + HasId() bool + // Tpid returns PatternFlowVlanTpid, set in FlowVlan. + // PatternFlowVlanTpid is protocol identifier + Tpid() PatternFlowVlanTpid + // SetTpid assigns PatternFlowVlanTpid provided by user to FlowVlan. + // PatternFlowVlanTpid is protocol identifier + SetTpid(value PatternFlowVlanTpid) FlowVlan + // HasTpid checks if Tpid has been set in FlowVlan + HasTpid() bool + setNil() +} + +// description is TBD +// Priority returns a PatternFlowVlanPriority +func (obj *flowVlan) Priority() PatternFlowVlanPriority { + if obj.obj.Priority == nil { + obj.obj.Priority = NewPatternFlowVlanPriority().msg() + } + if obj.priorityHolder == nil { + obj.priorityHolder = &patternFlowVlanPriority{obj: obj.obj.Priority} + } + return obj.priorityHolder +} + +// description is TBD +// Priority returns a PatternFlowVlanPriority +func (obj *flowVlan) HasPriority() bool { + return obj.obj.Priority != nil +} + +// description is TBD +// SetPriority sets the PatternFlowVlanPriority value in the FlowVlan object +func (obj *flowVlan) SetPriority(value PatternFlowVlanPriority) FlowVlan { + + obj.priorityHolder = nil + obj.obj.Priority = value.msg() + + return obj +} + +// description is TBD +// Cfi returns a PatternFlowVlanCfi +func (obj *flowVlan) Cfi() PatternFlowVlanCfi { + if obj.obj.Cfi == nil { + obj.obj.Cfi = NewPatternFlowVlanCfi().msg() + } + if obj.cfiHolder == nil { + obj.cfiHolder = &patternFlowVlanCfi{obj: obj.obj.Cfi} + } + return obj.cfiHolder +} + +// description is TBD +// Cfi returns a PatternFlowVlanCfi +func (obj *flowVlan) HasCfi() bool { + return obj.obj.Cfi != nil +} + +// description is TBD +// SetCfi sets the PatternFlowVlanCfi value in the FlowVlan object +func (obj *flowVlan) SetCfi(value PatternFlowVlanCfi) FlowVlan { + + obj.cfiHolder = nil + obj.obj.Cfi = value.msg() + + return obj +} + +// description is TBD +// Id returns a PatternFlowVlanId +func (obj *flowVlan) Id() PatternFlowVlanId { + if obj.obj.Id == nil { + obj.obj.Id = NewPatternFlowVlanId().msg() + } + if obj.idHolder == nil { + obj.idHolder = &patternFlowVlanId{obj: obj.obj.Id} + } + return obj.idHolder +} + +// description is TBD +// Id returns a PatternFlowVlanId +func (obj *flowVlan) HasId() bool { + return obj.obj.Id != nil +} + +// description is TBD +// SetId sets the PatternFlowVlanId value in the FlowVlan object +func (obj *flowVlan) SetId(value PatternFlowVlanId) FlowVlan { + + obj.idHolder = nil + obj.obj.Id = value.msg() + + return obj +} + +// description is TBD +// Tpid returns a PatternFlowVlanTpid +func (obj *flowVlan) Tpid() PatternFlowVlanTpid { + if obj.obj.Tpid == nil { + obj.obj.Tpid = NewPatternFlowVlanTpid().msg() + } + if obj.tpidHolder == nil { + obj.tpidHolder = &patternFlowVlanTpid{obj: obj.obj.Tpid} + } + return obj.tpidHolder +} + +// description is TBD +// Tpid returns a PatternFlowVlanTpid +func (obj *flowVlan) HasTpid() bool { + return obj.obj.Tpid != nil +} + +// description is TBD +// SetTpid sets the PatternFlowVlanTpid value in the FlowVlan object +func (obj *flowVlan) SetTpid(value PatternFlowVlanTpid) FlowVlan { + + obj.tpidHolder = nil + obj.obj.Tpid = value.msg() + + return obj +} + +func (obj *flowVlan) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Priority != nil { + + obj.Priority().validateObj(vObj, set_default) + } + + if obj.obj.Cfi != nil { + + obj.Cfi().validateObj(vObj, set_default) + } + + if obj.obj.Id != nil { + + obj.Id().validateObj(vObj, set_default) + } + + if obj.obj.Tpid != nil { + + obj.Tpid().validateObj(vObj, set_default) + } + +} + +func (obj *flowVlan) setDefault() { + +} diff --git a/gosnappi/flow_vxlan.go b/gosnappi/flow_vxlan.go new file mode 100644 index 00000000..8ef504ae --- /dev/null +++ b/gosnappi/flow_vxlan.go @@ -0,0 +1,457 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowVxlan ***** +type flowVxlan struct { + validation + obj *otg.FlowVxlan + marshaller marshalFlowVxlan + unMarshaller unMarshalFlowVxlan + flagsHolder PatternFlowVxlanFlags + reserved0Holder PatternFlowVxlanReserved0 + vniHolder PatternFlowVxlanVni + reserved1Holder PatternFlowVxlanReserved1 +} + +func NewFlowVxlan() FlowVxlan { + obj := flowVxlan{obj: &otg.FlowVxlan{}} + obj.setDefault() + return &obj +} + +func (obj *flowVxlan) msg() *otg.FlowVxlan { + return obj.obj +} + +func (obj *flowVxlan) setMsg(msg *otg.FlowVxlan) FlowVxlan { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowVxlan struct { + obj *flowVxlan +} + +type marshalFlowVxlan interface { + // ToProto marshals FlowVxlan to protobuf object *otg.FlowVxlan + ToProto() (*otg.FlowVxlan, error) + // ToPbText marshals FlowVxlan to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowVxlan to YAML text + ToYaml() (string, error) + // ToJson marshals FlowVxlan to JSON text + ToJson() (string, error) +} + +type unMarshalflowVxlan struct { + obj *flowVxlan +} + +type unMarshalFlowVxlan interface { + // FromProto unmarshals FlowVxlan from protobuf object *otg.FlowVxlan + FromProto(msg *otg.FlowVxlan) (FlowVxlan, error) + // FromPbText unmarshals FlowVxlan from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowVxlan from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowVxlan from JSON text + FromJson(value string) error +} + +func (obj *flowVxlan) Marshal() marshalFlowVxlan { + if obj.marshaller == nil { + obj.marshaller = &marshalflowVxlan{obj: obj} + } + return obj.marshaller +} + +func (obj *flowVxlan) Unmarshal() unMarshalFlowVxlan { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowVxlan{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowVxlan) ToProto() (*otg.FlowVxlan, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowVxlan) FromProto(msg *otg.FlowVxlan) (FlowVxlan, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowVxlan) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowVxlan) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowVxlan) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowVxlan) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowVxlan) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowVxlan) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowVxlan) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowVxlan) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowVxlan) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowVxlan) Clone() (FlowVxlan, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowVxlan() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowVxlan) setNil() { + obj.flagsHolder = nil + obj.reserved0Holder = nil + obj.vniHolder = nil + obj.reserved1Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowVxlan is vXLAN packet header +type FlowVxlan interface { + Validation + // msg marshals FlowVxlan to protobuf object *otg.FlowVxlan + // and doesn't set defaults + msg() *otg.FlowVxlan + // setMsg unmarshals FlowVxlan from protobuf object *otg.FlowVxlan + // and doesn't set defaults + setMsg(*otg.FlowVxlan) FlowVxlan + // provides marshal interface + Marshal() marshalFlowVxlan + // provides unmarshal interface + Unmarshal() unMarshalFlowVxlan + // validate validates FlowVxlan + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowVxlan, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns PatternFlowVxlanFlags, set in FlowVxlan. + // PatternFlowVxlanFlags is flags field with a bit format of RRRRIRRR. The I flag MUST be set to 1 for a valid vxlan network id (VNI). The other 7 bits (designated "R") are reserved fields and MUST be set to zero on transmission and ignored on receipt. + Flags() PatternFlowVxlanFlags + // SetFlags assigns PatternFlowVxlanFlags provided by user to FlowVxlan. + // PatternFlowVxlanFlags is flags field with a bit format of RRRRIRRR. The I flag MUST be set to 1 for a valid vxlan network id (VNI). The other 7 bits (designated "R") are reserved fields and MUST be set to zero on transmission and ignored on receipt. + SetFlags(value PatternFlowVxlanFlags) FlowVxlan + // HasFlags checks if Flags has been set in FlowVxlan + HasFlags() bool + // Reserved0 returns PatternFlowVxlanReserved0, set in FlowVxlan. + // PatternFlowVxlanReserved0 is reserved field + Reserved0() PatternFlowVxlanReserved0 + // SetReserved0 assigns PatternFlowVxlanReserved0 provided by user to FlowVxlan. + // PatternFlowVxlanReserved0 is reserved field + SetReserved0(value PatternFlowVxlanReserved0) FlowVxlan + // HasReserved0 checks if Reserved0 has been set in FlowVxlan + HasReserved0() bool + // Vni returns PatternFlowVxlanVni, set in FlowVxlan. + // PatternFlowVxlanVni is vXLAN network id + Vni() PatternFlowVxlanVni + // SetVni assigns PatternFlowVxlanVni provided by user to FlowVxlan. + // PatternFlowVxlanVni is vXLAN network id + SetVni(value PatternFlowVxlanVni) FlowVxlan + // HasVni checks if Vni has been set in FlowVxlan + HasVni() bool + // Reserved1 returns PatternFlowVxlanReserved1, set in FlowVxlan. + // PatternFlowVxlanReserved1 is reserved field + Reserved1() PatternFlowVxlanReserved1 + // SetReserved1 assigns PatternFlowVxlanReserved1 provided by user to FlowVxlan. + // PatternFlowVxlanReserved1 is reserved field + SetReserved1(value PatternFlowVxlanReserved1) FlowVxlan + // HasReserved1 checks if Reserved1 has been set in FlowVxlan + HasReserved1() bool + setNil() +} + +// description is TBD +// Flags returns a PatternFlowVxlanFlags +func (obj *flowVxlan) Flags() PatternFlowVxlanFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewPatternFlowVxlanFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &patternFlowVxlanFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// description is TBD +// Flags returns a PatternFlowVxlanFlags +func (obj *flowVxlan) HasFlags() bool { + return obj.obj.Flags != nil +} + +// description is TBD +// SetFlags sets the PatternFlowVxlanFlags value in the FlowVxlan object +func (obj *flowVxlan) SetFlags(value PatternFlowVxlanFlags) FlowVxlan { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// description is TBD +// Reserved0 returns a PatternFlowVxlanReserved0 +func (obj *flowVxlan) Reserved0() PatternFlowVxlanReserved0 { + if obj.obj.Reserved0 == nil { + obj.obj.Reserved0 = NewPatternFlowVxlanReserved0().msg() + } + if obj.reserved0Holder == nil { + obj.reserved0Holder = &patternFlowVxlanReserved0{obj: obj.obj.Reserved0} + } + return obj.reserved0Holder +} + +// description is TBD +// Reserved0 returns a PatternFlowVxlanReserved0 +func (obj *flowVxlan) HasReserved0() bool { + return obj.obj.Reserved0 != nil +} + +// description is TBD +// SetReserved0 sets the PatternFlowVxlanReserved0 value in the FlowVxlan object +func (obj *flowVxlan) SetReserved0(value PatternFlowVxlanReserved0) FlowVxlan { + + obj.reserved0Holder = nil + obj.obj.Reserved0 = value.msg() + + return obj +} + +// description is TBD +// Vni returns a PatternFlowVxlanVni +func (obj *flowVxlan) Vni() PatternFlowVxlanVni { + if obj.obj.Vni == nil { + obj.obj.Vni = NewPatternFlowVxlanVni().msg() + } + if obj.vniHolder == nil { + obj.vniHolder = &patternFlowVxlanVni{obj: obj.obj.Vni} + } + return obj.vniHolder +} + +// description is TBD +// Vni returns a PatternFlowVxlanVni +func (obj *flowVxlan) HasVni() bool { + return obj.obj.Vni != nil +} + +// description is TBD +// SetVni sets the PatternFlowVxlanVni value in the FlowVxlan object +func (obj *flowVxlan) SetVni(value PatternFlowVxlanVni) FlowVxlan { + + obj.vniHolder = nil + obj.obj.Vni = value.msg() + + return obj +} + +// description is TBD +// Reserved1 returns a PatternFlowVxlanReserved1 +func (obj *flowVxlan) Reserved1() PatternFlowVxlanReserved1 { + if obj.obj.Reserved1 == nil { + obj.obj.Reserved1 = NewPatternFlowVxlanReserved1().msg() + } + if obj.reserved1Holder == nil { + obj.reserved1Holder = &patternFlowVxlanReserved1{obj: obj.obj.Reserved1} + } + return obj.reserved1Holder +} + +// description is TBD +// Reserved1 returns a PatternFlowVxlanReserved1 +func (obj *flowVxlan) HasReserved1() bool { + return obj.obj.Reserved1 != nil +} + +// description is TBD +// SetReserved1 sets the PatternFlowVxlanReserved1 value in the FlowVxlan object +func (obj *flowVxlan) SetReserved1(value PatternFlowVxlanReserved1) FlowVxlan { + + obj.reserved1Holder = nil + obj.obj.Reserved1 = value.msg() + + return obj +} + +func (obj *flowVxlan) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.Reserved0 != nil { + + obj.Reserved0().validateObj(vObj, set_default) + } + + if obj.obj.Vni != nil { + + obj.Vni().validateObj(vObj, set_default) + } + + if obj.obj.Reserved1 != nil { + + obj.Reserved1().validateObj(vObj, set_default) + } + +} + +func (obj *flowVxlan) setDefault() { + +} diff --git a/gosnappi/flows_update.go b/gosnappi/flows_update.go new file mode 100644 index 00000000..e3cdc055 --- /dev/null +++ b/gosnappi/flows_update.go @@ -0,0 +1,426 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** FlowsUpdate ***** +type flowsUpdate struct { + validation + obj *otg.FlowsUpdate + marshaller marshalFlowsUpdate + unMarshaller unMarshalFlowsUpdate + flowsHolder FlowsUpdateFlowIter +} + +func NewFlowsUpdate() FlowsUpdate { + obj := flowsUpdate{obj: &otg.FlowsUpdate{}} + obj.setDefault() + return &obj +} + +func (obj *flowsUpdate) msg() *otg.FlowsUpdate { + return obj.obj +} + +func (obj *flowsUpdate) setMsg(msg *otg.FlowsUpdate) FlowsUpdate { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalflowsUpdate struct { + obj *flowsUpdate +} + +type marshalFlowsUpdate interface { + // ToProto marshals FlowsUpdate to protobuf object *otg.FlowsUpdate + ToProto() (*otg.FlowsUpdate, error) + // ToPbText marshals FlowsUpdate to protobuf text + ToPbText() (string, error) + // ToYaml marshals FlowsUpdate to YAML text + ToYaml() (string, error) + // ToJson marshals FlowsUpdate to JSON text + ToJson() (string, error) +} + +type unMarshalflowsUpdate struct { + obj *flowsUpdate +} + +type unMarshalFlowsUpdate interface { + // FromProto unmarshals FlowsUpdate from protobuf object *otg.FlowsUpdate + FromProto(msg *otg.FlowsUpdate) (FlowsUpdate, error) + // FromPbText unmarshals FlowsUpdate from protobuf text + FromPbText(value string) error + // FromYaml unmarshals FlowsUpdate from YAML text + FromYaml(value string) error + // FromJson unmarshals FlowsUpdate from JSON text + FromJson(value string) error +} + +func (obj *flowsUpdate) Marshal() marshalFlowsUpdate { + if obj.marshaller == nil { + obj.marshaller = &marshalflowsUpdate{obj: obj} + } + return obj.marshaller +} + +func (obj *flowsUpdate) Unmarshal() unMarshalFlowsUpdate { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalflowsUpdate{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalflowsUpdate) ToProto() (*otg.FlowsUpdate, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalflowsUpdate) FromProto(msg *otg.FlowsUpdate) (FlowsUpdate, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalflowsUpdate) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalflowsUpdate) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalflowsUpdate) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowsUpdate) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalflowsUpdate) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalflowsUpdate) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *flowsUpdate) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *flowsUpdate) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *flowsUpdate) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *flowsUpdate) Clone() (FlowsUpdate, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewFlowsUpdate() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *flowsUpdate) setNil() { + obj.flowsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// FlowsUpdate is a container of flows with associated properties to be updated without affecting the flows current transmit state. +type FlowsUpdate interface { + Validation + // msg marshals FlowsUpdate to protobuf object *otg.FlowsUpdate + // and doesn't set defaults + msg() *otg.FlowsUpdate + // setMsg unmarshals FlowsUpdate from protobuf object *otg.FlowsUpdate + // and doesn't set defaults + setMsg(*otg.FlowsUpdate) FlowsUpdate + // provides marshal interface + Marshal() marshalFlowsUpdate + // provides unmarshal interface + Unmarshal() unMarshalFlowsUpdate + // validate validates FlowsUpdate + validate() error + // A stringer function + String() string + // Clones the object + Clone() (FlowsUpdate, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PropertyNames returns []FlowsUpdatePropertyNamesEnum, set in FlowsUpdate + PropertyNames() []FlowsUpdatePropertyNamesEnum + // SetPropertyNames assigns []FlowsUpdatePropertyNamesEnum provided by user to FlowsUpdate + SetPropertyNames(value []FlowsUpdatePropertyNamesEnum) FlowsUpdate + // Flows returns FlowsUpdateFlowIterIter, set in FlowsUpdate + Flows() FlowsUpdateFlowIter + setNil() +} + +type FlowsUpdatePropertyNamesEnum string + +// Enum of PropertyNames on FlowsUpdate +var FlowsUpdatePropertyNames = struct { + RATE FlowsUpdatePropertyNamesEnum + SIZE FlowsUpdatePropertyNamesEnum +}{ + RATE: FlowsUpdatePropertyNamesEnum("rate"), + SIZE: FlowsUpdatePropertyNamesEnum("size"), +} + +func (obj *flowsUpdate) PropertyNames() []FlowsUpdatePropertyNamesEnum { + items := []FlowsUpdatePropertyNamesEnum{} + for _, item := range obj.obj.PropertyNames { + items = append(items, FlowsUpdatePropertyNamesEnum(item.String())) + } + return items +} + +// Flow properties to be updated without affecting the transmit state. +// SetPropertyNames sets the []string value in the FlowsUpdate object +func (obj *flowsUpdate) SetPropertyNames(value []FlowsUpdatePropertyNamesEnum) FlowsUpdate { + + items := []otg.FlowsUpdate_PropertyNames_Enum{} + for _, item := range value { + intValue := otg.FlowsUpdate_PropertyNames_Enum_value[string(item)] + items = append(items, otg.FlowsUpdate_PropertyNames_Enum(intValue)) + } + obj.obj.PropertyNames = items + return obj +} + +// The list of configured flows for which given property will be updated. +// Flows returns a []Flow +func (obj *flowsUpdate) Flows() FlowsUpdateFlowIter { + if len(obj.obj.Flows) == 0 { + obj.obj.Flows = []*otg.Flow{} + } + if obj.flowsHolder == nil { + obj.flowsHolder = newFlowsUpdateFlowIter(&obj.obj.Flows).setMsg(obj) + } + return obj.flowsHolder +} + +type flowsUpdateFlowIter struct { + obj *flowsUpdate + flowSlice []Flow + fieldPtr *[]*otg.Flow +} + +func newFlowsUpdateFlowIter(ptr *[]*otg.Flow) FlowsUpdateFlowIter { + return &flowsUpdateFlowIter{fieldPtr: ptr} +} + +type FlowsUpdateFlowIter interface { + setMsg(*flowsUpdate) FlowsUpdateFlowIter + Items() []Flow + Add() Flow + Append(items ...Flow) FlowsUpdateFlowIter + Set(index int, newObj Flow) FlowsUpdateFlowIter + Clear() FlowsUpdateFlowIter + clearHolderSlice() FlowsUpdateFlowIter + appendHolderSlice(item Flow) FlowsUpdateFlowIter +} + +func (obj *flowsUpdateFlowIter) setMsg(msg *flowsUpdate) FlowsUpdateFlowIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flow{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *flowsUpdateFlowIter) Items() []Flow { + return obj.flowSlice +} + +func (obj *flowsUpdateFlowIter) Add() Flow { + newObj := &otg.Flow{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flow{obj: newObj} + newLibObj.setDefault() + obj.flowSlice = append(obj.flowSlice, newLibObj) + return newLibObj +} + +func (obj *flowsUpdateFlowIter) Append(items ...Flow) FlowsUpdateFlowIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowSlice = append(obj.flowSlice, item) + } + return obj +} + +func (obj *flowsUpdateFlowIter) Set(index int, newObj Flow) FlowsUpdateFlowIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowSlice[index] = newObj + return obj +} +func (obj *flowsUpdateFlowIter) Clear() FlowsUpdateFlowIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Flow{} + obj.flowSlice = []Flow{} + } + return obj +} +func (obj *flowsUpdateFlowIter) clearHolderSlice() FlowsUpdateFlowIter { + if len(obj.flowSlice) > 0 { + obj.flowSlice = []Flow{} + } + return obj +} +func (obj *flowsUpdateFlowIter) appendHolderSlice(item Flow) FlowsUpdateFlowIter { + obj.flowSlice = append(obj.flowSlice, item) + return obj +} + +func (obj *flowsUpdate) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Flows) != 0 { + + if set_default { + obj.Flows().clearHolderSlice() + for _, item := range obj.obj.Flows { + obj.Flows().appendHolderSlice(&flow{obj: item}) + } + } + for _, item := range obj.Flows().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *flowsUpdate) setDefault() { + +} diff --git a/gosnappi/get_capture_response.go b/gosnappi/get_capture_response.go new file mode 100644 index 00000000..b0afe7a1 --- /dev/null +++ b/gosnappi/get_capture_response.go @@ -0,0 +1,305 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** GetCaptureResponse ***** +type getCaptureResponse struct { + validation + obj *otg.GetCaptureResponse + marshaller marshalGetCaptureResponse + unMarshaller unMarshalGetCaptureResponse +} + +func NewGetCaptureResponse() GetCaptureResponse { + obj := getCaptureResponse{obj: &otg.GetCaptureResponse{}} + obj.setDefault() + return &obj +} + +func (obj *getCaptureResponse) msg() *otg.GetCaptureResponse { + return obj.obj +} + +func (obj *getCaptureResponse) setMsg(msg *otg.GetCaptureResponse) GetCaptureResponse { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalgetCaptureResponse struct { + obj *getCaptureResponse +} + +type marshalGetCaptureResponse interface { + // ToProto marshals GetCaptureResponse to protobuf object *otg.GetCaptureResponse + ToProto() (*otg.GetCaptureResponse, error) + // ToPbText marshals GetCaptureResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals GetCaptureResponse to YAML text + ToYaml() (string, error) + // ToJson marshals GetCaptureResponse to JSON text + ToJson() (string, error) +} + +type unMarshalgetCaptureResponse struct { + obj *getCaptureResponse +} + +type unMarshalGetCaptureResponse interface { + // FromProto unmarshals GetCaptureResponse from protobuf object *otg.GetCaptureResponse + FromProto(msg *otg.GetCaptureResponse) (GetCaptureResponse, error) + // FromPbText unmarshals GetCaptureResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals GetCaptureResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals GetCaptureResponse from JSON text + FromJson(value string) error +} + +func (obj *getCaptureResponse) Marshal() marshalGetCaptureResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalgetCaptureResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *getCaptureResponse) Unmarshal() unMarshalGetCaptureResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalgetCaptureResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalgetCaptureResponse) ToProto() (*otg.GetCaptureResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalgetCaptureResponse) FromProto(msg *otg.GetCaptureResponse) (GetCaptureResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalgetCaptureResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalgetCaptureResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalgetCaptureResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalgetCaptureResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalgetCaptureResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalgetCaptureResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *getCaptureResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *getCaptureResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *getCaptureResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *getCaptureResponse) Clone() (GetCaptureResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewGetCaptureResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// GetCaptureResponse is description is TBD +type GetCaptureResponse interface { + Validation + // msg marshals GetCaptureResponse to protobuf object *otg.GetCaptureResponse + // and doesn't set defaults + msg() *otg.GetCaptureResponse + // setMsg unmarshals GetCaptureResponse from protobuf object *otg.GetCaptureResponse + // and doesn't set defaults + setMsg(*otg.GetCaptureResponse) GetCaptureResponse + // provides marshal interface + Marshal() marshalGetCaptureResponse + // provides unmarshal interface + Unmarshal() unMarshalGetCaptureResponse + // validate validates GetCaptureResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (GetCaptureResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ResponseBytes returns []byte, set in GetCaptureResponse. + ResponseBytes() []byte + // SetResponseBytes assigns []byte provided by user to GetCaptureResponse + SetResponseBytes(value []byte) GetCaptureResponse + // HasResponseBytes checks if ResponseBytes has been set in GetCaptureResponse + HasResponseBytes() bool +} + +// description is TBD +// ResponseBytes returns a []byte +func (obj *getCaptureResponse) ResponseBytes() []byte { + + return obj.obj.ResponseBytes +} + +// description is TBD +// ResponseBytes returns a []byte +func (obj *getCaptureResponse) HasResponseBytes() bool { + return obj.obj.ResponseBytes != nil +} + +// description is TBD +// SetResponseBytes sets the []byte value in the GetCaptureResponse object +func (obj *getCaptureResponse) SetResponseBytes(value []byte) GetCaptureResponse { + + obj.obj.ResponseBytes = value + return obj +} + +func (obj *getCaptureResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *getCaptureResponse) setDefault() { + +} diff --git a/gosnappi/get_config_response.go b/gosnappi/get_config_response.go new file mode 100644 index 00000000..c1ca1a64 --- /dev/null +++ b/gosnappi/get_config_response.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** GetConfigResponse ***** +type getConfigResponse struct { + validation + obj *otg.GetConfigResponse + marshaller marshalGetConfigResponse + unMarshaller unMarshalGetConfigResponse + configHolder Config +} + +func NewGetConfigResponse() GetConfigResponse { + obj := getConfigResponse{obj: &otg.GetConfigResponse{}} + obj.setDefault() + return &obj +} + +func (obj *getConfigResponse) msg() *otg.GetConfigResponse { + return obj.obj +} + +func (obj *getConfigResponse) setMsg(msg *otg.GetConfigResponse) GetConfigResponse { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalgetConfigResponse struct { + obj *getConfigResponse +} + +type marshalGetConfigResponse interface { + // ToProto marshals GetConfigResponse to protobuf object *otg.GetConfigResponse + ToProto() (*otg.GetConfigResponse, error) + // ToPbText marshals GetConfigResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals GetConfigResponse to YAML text + ToYaml() (string, error) + // ToJson marshals GetConfigResponse to JSON text + ToJson() (string, error) +} + +type unMarshalgetConfigResponse struct { + obj *getConfigResponse +} + +type unMarshalGetConfigResponse interface { + // FromProto unmarshals GetConfigResponse from protobuf object *otg.GetConfigResponse + FromProto(msg *otg.GetConfigResponse) (GetConfigResponse, error) + // FromPbText unmarshals GetConfigResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals GetConfigResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals GetConfigResponse from JSON text + FromJson(value string) error +} + +func (obj *getConfigResponse) Marshal() marshalGetConfigResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalgetConfigResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *getConfigResponse) Unmarshal() unMarshalGetConfigResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalgetConfigResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalgetConfigResponse) ToProto() (*otg.GetConfigResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalgetConfigResponse) FromProto(msg *otg.GetConfigResponse) (GetConfigResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalgetConfigResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalgetConfigResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalgetConfigResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalgetConfigResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalgetConfigResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalgetConfigResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *getConfigResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *getConfigResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *getConfigResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *getConfigResponse) Clone() (GetConfigResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewGetConfigResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *getConfigResponse) setNil() { + obj.configHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// GetConfigResponse is description is TBD +type GetConfigResponse interface { + Validation + // msg marshals GetConfigResponse to protobuf object *otg.GetConfigResponse + // and doesn't set defaults + msg() *otg.GetConfigResponse + // setMsg unmarshals GetConfigResponse from protobuf object *otg.GetConfigResponse + // and doesn't set defaults + setMsg(*otg.GetConfigResponse) GetConfigResponse + // provides marshal interface + Marshal() marshalGetConfigResponse + // provides unmarshal interface + Unmarshal() unMarshalGetConfigResponse + // validate validates GetConfigResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (GetConfigResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Config returns Config, set in GetConfigResponse. + // Config is a container for all models that are part of the configuration. + Config() Config + // SetConfig assigns Config provided by user to GetConfigResponse. + // Config is a container for all models that are part of the configuration. + SetConfig(value Config) GetConfigResponse + // HasConfig checks if Config has been set in GetConfigResponse + HasConfig() bool + setNil() +} + +// description is TBD +// Config returns a Config +func (obj *getConfigResponse) Config() Config { + if obj.obj.Config == nil { + obj.obj.Config = NewConfig().msg() + } + if obj.configHolder == nil { + obj.configHolder = &config{obj: obj.obj.Config} + } + return obj.configHolder +} + +// description is TBD +// Config returns a Config +func (obj *getConfigResponse) HasConfig() bool { + return obj.obj.Config != nil +} + +// description is TBD +// SetConfig sets the Config value in the GetConfigResponse object +func (obj *getConfigResponse) SetConfig(value Config) GetConfigResponse { + + obj.configHolder = nil + obj.obj.Config = value.msg() + + return obj +} + +func (obj *getConfigResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Config != nil { + + obj.Config().validateObj(vObj, set_default) + } + +} + +func (obj *getConfigResponse) setDefault() { + +} diff --git a/gosnappi/get_metrics_response.go b/gosnappi/get_metrics_response.go new file mode 100644 index 00000000..261202d0 --- /dev/null +++ b/gosnappi/get_metrics_response.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** GetMetricsResponse ***** +type getMetricsResponse struct { + validation + obj *otg.GetMetricsResponse + marshaller marshalGetMetricsResponse + unMarshaller unMarshalGetMetricsResponse + metricsResponseHolder MetricsResponse +} + +func NewGetMetricsResponse() GetMetricsResponse { + obj := getMetricsResponse{obj: &otg.GetMetricsResponse{}} + obj.setDefault() + return &obj +} + +func (obj *getMetricsResponse) msg() *otg.GetMetricsResponse { + return obj.obj +} + +func (obj *getMetricsResponse) setMsg(msg *otg.GetMetricsResponse) GetMetricsResponse { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalgetMetricsResponse struct { + obj *getMetricsResponse +} + +type marshalGetMetricsResponse interface { + // ToProto marshals GetMetricsResponse to protobuf object *otg.GetMetricsResponse + ToProto() (*otg.GetMetricsResponse, error) + // ToPbText marshals GetMetricsResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals GetMetricsResponse to YAML text + ToYaml() (string, error) + // ToJson marshals GetMetricsResponse to JSON text + ToJson() (string, error) +} + +type unMarshalgetMetricsResponse struct { + obj *getMetricsResponse +} + +type unMarshalGetMetricsResponse interface { + // FromProto unmarshals GetMetricsResponse from protobuf object *otg.GetMetricsResponse + FromProto(msg *otg.GetMetricsResponse) (GetMetricsResponse, error) + // FromPbText unmarshals GetMetricsResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals GetMetricsResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals GetMetricsResponse from JSON text + FromJson(value string) error +} + +func (obj *getMetricsResponse) Marshal() marshalGetMetricsResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalgetMetricsResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *getMetricsResponse) Unmarshal() unMarshalGetMetricsResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalgetMetricsResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalgetMetricsResponse) ToProto() (*otg.GetMetricsResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalgetMetricsResponse) FromProto(msg *otg.GetMetricsResponse) (GetMetricsResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalgetMetricsResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalgetMetricsResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalgetMetricsResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalgetMetricsResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalgetMetricsResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalgetMetricsResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *getMetricsResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *getMetricsResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *getMetricsResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *getMetricsResponse) Clone() (GetMetricsResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewGetMetricsResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *getMetricsResponse) setNil() { + obj.metricsResponseHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// GetMetricsResponse is description is TBD +type GetMetricsResponse interface { + Validation + // msg marshals GetMetricsResponse to protobuf object *otg.GetMetricsResponse + // and doesn't set defaults + msg() *otg.GetMetricsResponse + // setMsg unmarshals GetMetricsResponse from protobuf object *otg.GetMetricsResponse + // and doesn't set defaults + setMsg(*otg.GetMetricsResponse) GetMetricsResponse + // provides marshal interface + Marshal() marshalGetMetricsResponse + // provides unmarshal interface + Unmarshal() unMarshalGetMetricsResponse + // validate validates GetMetricsResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (GetMetricsResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // MetricsResponse returns MetricsResponse, set in GetMetricsResponse. + // MetricsResponse is response containing chosen traffic generator metrics. + MetricsResponse() MetricsResponse + // SetMetricsResponse assigns MetricsResponse provided by user to GetMetricsResponse. + // MetricsResponse is response containing chosen traffic generator metrics. + SetMetricsResponse(value MetricsResponse) GetMetricsResponse + // HasMetricsResponse checks if MetricsResponse has been set in GetMetricsResponse + HasMetricsResponse() bool + setNil() +} + +// description is TBD +// MetricsResponse returns a MetricsResponse +func (obj *getMetricsResponse) MetricsResponse() MetricsResponse { + if obj.obj.MetricsResponse == nil { + obj.obj.MetricsResponse = NewMetricsResponse().msg() + } + if obj.metricsResponseHolder == nil { + obj.metricsResponseHolder = &metricsResponse{obj: obj.obj.MetricsResponse} + } + return obj.metricsResponseHolder +} + +// description is TBD +// MetricsResponse returns a MetricsResponse +func (obj *getMetricsResponse) HasMetricsResponse() bool { + return obj.obj.MetricsResponse != nil +} + +// description is TBD +// SetMetricsResponse sets the MetricsResponse value in the GetMetricsResponse object +func (obj *getMetricsResponse) SetMetricsResponse(value MetricsResponse) GetMetricsResponse { + + obj.metricsResponseHolder = nil + obj.obj.MetricsResponse = value.msg() + + return obj +} + +func (obj *getMetricsResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.MetricsResponse != nil { + + obj.MetricsResponse().validateObj(vObj, set_default) + } + +} + +func (obj *getMetricsResponse) setDefault() { + +} diff --git a/gosnappi/get_states_response.go b/gosnappi/get_states_response.go new file mode 100644 index 00000000..3578c95e --- /dev/null +++ b/gosnappi/get_states_response.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** GetStatesResponse ***** +type getStatesResponse struct { + validation + obj *otg.GetStatesResponse + marshaller marshalGetStatesResponse + unMarshaller unMarshalGetStatesResponse + statesResponseHolder StatesResponse +} + +func NewGetStatesResponse() GetStatesResponse { + obj := getStatesResponse{obj: &otg.GetStatesResponse{}} + obj.setDefault() + return &obj +} + +func (obj *getStatesResponse) msg() *otg.GetStatesResponse { + return obj.obj +} + +func (obj *getStatesResponse) setMsg(msg *otg.GetStatesResponse) GetStatesResponse { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalgetStatesResponse struct { + obj *getStatesResponse +} + +type marshalGetStatesResponse interface { + // ToProto marshals GetStatesResponse to protobuf object *otg.GetStatesResponse + ToProto() (*otg.GetStatesResponse, error) + // ToPbText marshals GetStatesResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals GetStatesResponse to YAML text + ToYaml() (string, error) + // ToJson marshals GetStatesResponse to JSON text + ToJson() (string, error) +} + +type unMarshalgetStatesResponse struct { + obj *getStatesResponse +} + +type unMarshalGetStatesResponse interface { + // FromProto unmarshals GetStatesResponse from protobuf object *otg.GetStatesResponse + FromProto(msg *otg.GetStatesResponse) (GetStatesResponse, error) + // FromPbText unmarshals GetStatesResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals GetStatesResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals GetStatesResponse from JSON text + FromJson(value string) error +} + +func (obj *getStatesResponse) Marshal() marshalGetStatesResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalgetStatesResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *getStatesResponse) Unmarshal() unMarshalGetStatesResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalgetStatesResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalgetStatesResponse) ToProto() (*otg.GetStatesResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalgetStatesResponse) FromProto(msg *otg.GetStatesResponse) (GetStatesResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalgetStatesResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalgetStatesResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalgetStatesResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalgetStatesResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalgetStatesResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalgetStatesResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *getStatesResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *getStatesResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *getStatesResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *getStatesResponse) Clone() (GetStatesResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewGetStatesResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *getStatesResponse) setNil() { + obj.statesResponseHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// GetStatesResponse is description is TBD +type GetStatesResponse interface { + Validation + // msg marshals GetStatesResponse to protobuf object *otg.GetStatesResponse + // and doesn't set defaults + msg() *otg.GetStatesResponse + // setMsg unmarshals GetStatesResponse from protobuf object *otg.GetStatesResponse + // and doesn't set defaults + setMsg(*otg.GetStatesResponse) GetStatesResponse + // provides marshal interface + Marshal() marshalGetStatesResponse + // provides unmarshal interface + Unmarshal() unMarshalGetStatesResponse + // validate validates GetStatesResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (GetStatesResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // StatesResponse returns StatesResponse, set in GetStatesResponse. + // StatesResponse is response containing chosen traffic generator states + StatesResponse() StatesResponse + // SetStatesResponse assigns StatesResponse provided by user to GetStatesResponse. + // StatesResponse is response containing chosen traffic generator states + SetStatesResponse(value StatesResponse) GetStatesResponse + // HasStatesResponse checks if StatesResponse has been set in GetStatesResponse + HasStatesResponse() bool + setNil() +} + +// description is TBD +// StatesResponse returns a StatesResponse +func (obj *getStatesResponse) StatesResponse() StatesResponse { + if obj.obj.StatesResponse == nil { + obj.obj.StatesResponse = NewStatesResponse().msg() + } + if obj.statesResponseHolder == nil { + obj.statesResponseHolder = &statesResponse{obj: obj.obj.StatesResponse} + } + return obj.statesResponseHolder +} + +// description is TBD +// StatesResponse returns a StatesResponse +func (obj *getStatesResponse) HasStatesResponse() bool { + return obj.obj.StatesResponse != nil +} + +// description is TBD +// SetStatesResponse sets the StatesResponse value in the GetStatesResponse object +func (obj *getStatesResponse) SetStatesResponse(value StatesResponse) GetStatesResponse { + + obj.statesResponseHolder = nil + obj.obj.StatesResponse = value.msg() + + return obj +} + +func (obj *getStatesResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.StatesResponse != nil { + + obj.StatesResponse().validateObj(vObj, set_default) + } + +} + +func (obj *getStatesResponse) setDefault() { + +} diff --git a/gosnappi/get_version_response.go b/gosnappi/get_version_response.go new file mode 100644 index 00000000..c1a4c4bf --- /dev/null +++ b/gosnappi/get_version_response.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** GetVersionResponse ***** +type getVersionResponse struct { + validation + obj *otg.GetVersionResponse + marshaller marshalGetVersionResponse + unMarshaller unMarshalGetVersionResponse + versionHolder Version +} + +func NewGetVersionResponse() GetVersionResponse { + obj := getVersionResponse{obj: &otg.GetVersionResponse{}} + obj.setDefault() + return &obj +} + +func (obj *getVersionResponse) msg() *otg.GetVersionResponse { + return obj.obj +} + +func (obj *getVersionResponse) setMsg(msg *otg.GetVersionResponse) GetVersionResponse { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalgetVersionResponse struct { + obj *getVersionResponse +} + +type marshalGetVersionResponse interface { + // ToProto marshals GetVersionResponse to protobuf object *otg.GetVersionResponse + ToProto() (*otg.GetVersionResponse, error) + // ToPbText marshals GetVersionResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals GetVersionResponse to YAML text + ToYaml() (string, error) + // ToJson marshals GetVersionResponse to JSON text + ToJson() (string, error) +} + +type unMarshalgetVersionResponse struct { + obj *getVersionResponse +} + +type unMarshalGetVersionResponse interface { + // FromProto unmarshals GetVersionResponse from protobuf object *otg.GetVersionResponse + FromProto(msg *otg.GetVersionResponse) (GetVersionResponse, error) + // FromPbText unmarshals GetVersionResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals GetVersionResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals GetVersionResponse from JSON text + FromJson(value string) error +} + +func (obj *getVersionResponse) Marshal() marshalGetVersionResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalgetVersionResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *getVersionResponse) Unmarshal() unMarshalGetVersionResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalgetVersionResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalgetVersionResponse) ToProto() (*otg.GetVersionResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalgetVersionResponse) FromProto(msg *otg.GetVersionResponse) (GetVersionResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalgetVersionResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalgetVersionResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalgetVersionResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalgetVersionResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalgetVersionResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalgetVersionResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *getVersionResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *getVersionResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *getVersionResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *getVersionResponse) Clone() (GetVersionResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewGetVersionResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *getVersionResponse) setNil() { + obj.versionHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// GetVersionResponse is description is TBD +type GetVersionResponse interface { + Validation + // msg marshals GetVersionResponse to protobuf object *otg.GetVersionResponse + // and doesn't set defaults + msg() *otg.GetVersionResponse + // setMsg unmarshals GetVersionResponse from protobuf object *otg.GetVersionResponse + // and doesn't set defaults + setMsg(*otg.GetVersionResponse) GetVersionResponse + // provides marshal interface + Marshal() marshalGetVersionResponse + // provides unmarshal interface + Unmarshal() unMarshalGetVersionResponse + // validate validates GetVersionResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (GetVersionResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Version returns Version, set in GetVersionResponse. + // Version is version details + Version() Version + // SetVersion assigns Version provided by user to GetVersionResponse. + // Version is version details + SetVersion(value Version) GetVersionResponse + // HasVersion checks if Version has been set in GetVersionResponse + HasVersion() bool + setNil() +} + +// description is TBD +// Version returns a Version +func (obj *getVersionResponse) Version() Version { + if obj.obj.Version == nil { + obj.obj.Version = NewVersion().msg() + } + if obj.versionHolder == nil { + obj.versionHolder = &version{obj: obj.obj.Version} + } + return obj.versionHolder +} + +// description is TBD +// Version returns a Version +func (obj *getVersionResponse) HasVersion() bool { + return obj.obj.Version != nil +} + +// description is TBD +// SetVersion sets the Version value in the GetVersionResponse object +func (obj *getVersionResponse) SetVersion(value Version) GetVersionResponse { + + obj.versionHolder = nil + obj.obj.Version = value.msg() + + return obj +} + +func (obj *getVersionResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Version != nil { + + obj.Version().validateObj(vObj, set_default) + } + +} + +func (obj *getVersionResponse) setDefault() { + +} diff --git a/gosnappi/isis_advanced.go b/gosnappi/isis_advanced.go new file mode 100644 index 00000000..3bc450d1 --- /dev/null +++ b/gosnappi/isis_advanced.go @@ -0,0 +1,661 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisAdvanced ***** +type isisAdvanced struct { + validation + obj *otg.IsisAdvanced + marshaller marshalIsisAdvanced + unMarshaller unMarshalIsisAdvanced +} + +func NewIsisAdvanced() IsisAdvanced { + obj := isisAdvanced{obj: &otg.IsisAdvanced{}} + obj.setDefault() + return &obj +} + +func (obj *isisAdvanced) msg() *otg.IsisAdvanced { + return obj.obj +} + +func (obj *isisAdvanced) setMsg(msg *otg.IsisAdvanced) IsisAdvanced { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisAdvanced struct { + obj *isisAdvanced +} + +type marshalIsisAdvanced interface { + // ToProto marshals IsisAdvanced to protobuf object *otg.IsisAdvanced + ToProto() (*otg.IsisAdvanced, error) + // ToPbText marshals IsisAdvanced to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisAdvanced to YAML text + ToYaml() (string, error) + // ToJson marshals IsisAdvanced to JSON text + ToJson() (string, error) +} + +type unMarshalisisAdvanced struct { + obj *isisAdvanced +} + +type unMarshalIsisAdvanced interface { + // FromProto unmarshals IsisAdvanced from protobuf object *otg.IsisAdvanced + FromProto(msg *otg.IsisAdvanced) (IsisAdvanced, error) + // FromPbText unmarshals IsisAdvanced from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisAdvanced from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisAdvanced from JSON text + FromJson(value string) error +} + +func (obj *isisAdvanced) Marshal() marshalIsisAdvanced { + if obj.marshaller == nil { + obj.marshaller = &marshalisisAdvanced{obj: obj} + } + return obj.marshaller +} + +func (obj *isisAdvanced) Unmarshal() unMarshalIsisAdvanced { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisAdvanced{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisAdvanced) ToProto() (*otg.IsisAdvanced, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisAdvanced) FromProto(msg *otg.IsisAdvanced) (IsisAdvanced, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisAdvanced) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisAdvanced) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisAdvanced) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisAdvanced) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisAdvanced) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisAdvanced) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisAdvanced) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisAdvanced) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisAdvanced) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisAdvanced) Clone() (IsisAdvanced, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisAdvanced() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisAdvanced is contains ISIS router advanced properties. +type IsisAdvanced interface { + Validation + // msg marshals IsisAdvanced to protobuf object *otg.IsisAdvanced + // and doesn't set defaults + msg() *otg.IsisAdvanced + // setMsg unmarshals IsisAdvanced from protobuf object *otg.IsisAdvanced + // and doesn't set defaults + setMsg(*otg.IsisAdvanced) IsisAdvanced + // provides marshal interface + Marshal() marshalIsisAdvanced + // provides unmarshal interface + Unmarshal() unMarshalIsisAdvanced + // validate validates IsisAdvanced + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisAdvanced, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EnableHelloPadding returns bool, set in IsisAdvanced. + EnableHelloPadding() bool + // SetEnableHelloPadding assigns bool provided by user to IsisAdvanced + SetEnableHelloPadding(value bool) IsisAdvanced + // HasEnableHelloPadding checks if EnableHelloPadding has been set in IsisAdvanced + HasEnableHelloPadding() bool + // MaxAreaAddresses returns uint32, set in IsisAdvanced. + MaxAreaAddresses() uint32 + // SetMaxAreaAddresses assigns uint32 provided by user to IsisAdvanced + SetMaxAreaAddresses(value uint32) IsisAdvanced + // HasMaxAreaAddresses checks if MaxAreaAddresses has been set in IsisAdvanced + HasMaxAreaAddresses() bool + // AreaAddresses returns []string, set in IsisAdvanced. + AreaAddresses() []string + // SetAreaAddresses assigns []string provided by user to IsisAdvanced + SetAreaAddresses(value []string) IsisAdvanced + // LspRefreshRate returns uint32, set in IsisAdvanced. + LspRefreshRate() uint32 + // SetLspRefreshRate assigns uint32 provided by user to IsisAdvanced + SetLspRefreshRate(value uint32) IsisAdvanced + // HasLspRefreshRate checks if LspRefreshRate has been set in IsisAdvanced + HasLspRefreshRate() bool + // LspLifetime returns uint32, set in IsisAdvanced. + LspLifetime() uint32 + // SetLspLifetime assigns uint32 provided by user to IsisAdvanced + SetLspLifetime(value uint32) IsisAdvanced + // HasLspLifetime checks if LspLifetime has been set in IsisAdvanced + HasLspLifetime() bool + // PsnpInterval returns uint32, set in IsisAdvanced. + PsnpInterval() uint32 + // SetPsnpInterval assigns uint32 provided by user to IsisAdvanced + SetPsnpInterval(value uint32) IsisAdvanced + // HasPsnpInterval checks if PsnpInterval has been set in IsisAdvanced + HasPsnpInterval() bool + // CsnpInterval returns uint32, set in IsisAdvanced. + CsnpInterval() uint32 + // SetCsnpInterval assigns uint32 provided by user to IsisAdvanced + SetCsnpInterval(value uint32) IsisAdvanced + // HasCsnpInterval checks if CsnpInterval has been set in IsisAdvanced + HasCsnpInterval() bool + // MaxLspSize returns uint32, set in IsisAdvanced. + MaxLspSize() uint32 + // SetMaxLspSize assigns uint32 provided by user to IsisAdvanced + SetMaxLspSize(value uint32) IsisAdvanced + // HasMaxLspSize checks if MaxLspSize has been set in IsisAdvanced + HasMaxLspSize() bool + // LspMgroupMinTransInterval returns uint32, set in IsisAdvanced. + LspMgroupMinTransInterval() uint32 + // SetLspMgroupMinTransInterval assigns uint32 provided by user to IsisAdvanced + SetLspMgroupMinTransInterval(value uint32) IsisAdvanced + // HasLspMgroupMinTransInterval checks if LspMgroupMinTransInterval has been set in IsisAdvanced + HasLspMgroupMinTransInterval() bool + // EnableAttachedBit returns bool, set in IsisAdvanced. + EnableAttachedBit() bool + // SetEnableAttachedBit assigns bool provided by user to IsisAdvanced + SetEnableAttachedBit(value bool) IsisAdvanced + // HasEnableAttachedBit checks if EnableAttachedBit has been set in IsisAdvanced + HasEnableAttachedBit() bool +} + +// It enables padding of Hello message to MTU size. +// EnableHelloPadding returns a bool +func (obj *isisAdvanced) EnableHelloPadding() bool { + + return *obj.obj.EnableHelloPadding + +} + +// It enables padding of Hello message to MTU size. +// EnableHelloPadding returns a bool +func (obj *isisAdvanced) HasEnableHelloPadding() bool { + return obj.obj.EnableHelloPadding != nil +} + +// It enables padding of Hello message to MTU size. +// SetEnableHelloPadding sets the bool value in the IsisAdvanced object +func (obj *isisAdvanced) SetEnableHelloPadding(value bool) IsisAdvanced { + + obj.obj.EnableHelloPadding = &value + return obj +} + +// The Number of Area Addresses permitted, with a valid range from 0 to 254. A zero indicates a maximum of 3 addresses. +// MaxAreaAddresses returns a uint32 +func (obj *isisAdvanced) MaxAreaAddresses() uint32 { + + return *obj.obj.MaxAreaAddresses + +} + +// The Number of Area Addresses permitted, with a valid range from 0 to 254. A zero indicates a maximum of 3 addresses. +// MaxAreaAddresses returns a uint32 +func (obj *isisAdvanced) HasMaxAreaAddresses() bool { + return obj.obj.MaxAreaAddresses != nil +} + +// The Number of Area Addresses permitted, with a valid range from 0 to 254. A zero indicates a maximum of 3 addresses. +// SetMaxAreaAddresses sets the uint32 value in the IsisAdvanced object +func (obj *isisAdvanced) SetMaxAreaAddresses(value uint32) IsisAdvanced { + + obj.obj.MaxAreaAddresses = &value + return obj +} + +// Its combination of the ISP and HO-DSP.Usually all nodes within an area have the same area address. If no area addresses are configured, a default area of "490001" will be advertised. +// AreaAddresses returns a []string +func (obj *isisAdvanced) AreaAddresses() []string { + if obj.obj.AreaAddresses == nil { + obj.obj.AreaAddresses = make([]string, 0) + } + return obj.obj.AreaAddresses +} + +// Its combination of the ISP and HO-DSP.Usually all nodes within an area have the same area address. If no area addresses are configured, a default area of "490001" will be advertised. +// SetAreaAddresses sets the []string value in the IsisAdvanced object +func (obj *isisAdvanced) SetAreaAddresses(value []string) IsisAdvanced { + + if obj.obj.AreaAddresses == nil { + obj.obj.AreaAddresses = make([]string, 0) + } + obj.obj.AreaAddresses = value + + return obj +} + +// The rate at which LSPs are re-sent in seconds. +// LspRefreshRate returns a uint32 +func (obj *isisAdvanced) LspRefreshRate() uint32 { + + return *obj.obj.LspRefreshRate + +} + +// The rate at which LSPs are re-sent in seconds. +// LspRefreshRate returns a uint32 +func (obj *isisAdvanced) HasLspRefreshRate() bool { + return obj.obj.LspRefreshRate != nil +} + +// The rate at which LSPs are re-sent in seconds. +// SetLspRefreshRate sets the uint32 value in the IsisAdvanced object +func (obj *isisAdvanced) SetLspRefreshRate(value uint32) IsisAdvanced { + + obj.obj.LspRefreshRate = &value + return obj +} + +// The MaxAge for retaining a learned LSP on this router in seconds. +// LspLifetime returns a uint32 +func (obj *isisAdvanced) LspLifetime() uint32 { + + return *obj.obj.LspLifetime + +} + +// The MaxAge for retaining a learned LSP on this router in seconds. +// LspLifetime returns a uint32 +func (obj *isisAdvanced) HasLspLifetime() bool { + return obj.obj.LspLifetime != nil +} + +// The MaxAge for retaining a learned LSP on this router in seconds. +// SetLspLifetime sets the uint32 value in the IsisAdvanced object +func (obj *isisAdvanced) SetLspLifetime(value uint32) IsisAdvanced { + + obj.obj.LspLifetime = &value + return obj +} + +// The number of milliseconds between transmissions of Partial Sequence Number PDU. +// PsnpInterval returns a uint32 +func (obj *isisAdvanced) PsnpInterval() uint32 { + + return *obj.obj.PsnpInterval + +} + +// The number of milliseconds between transmissions of Partial Sequence Number PDU. +// PsnpInterval returns a uint32 +func (obj *isisAdvanced) HasPsnpInterval() bool { + return obj.obj.PsnpInterval != nil +} + +// The number of milliseconds between transmissions of Partial Sequence Number PDU. +// SetPsnpInterval sets the uint32 value in the IsisAdvanced object +func (obj *isisAdvanced) SetPsnpInterval(value uint32) IsisAdvanced { + + obj.obj.PsnpInterval = &value + return obj +} + +// The number of milliseconds between transmissions of Partial Sequence Number PDU. +// CsnpInterval returns a uint32 +func (obj *isisAdvanced) CsnpInterval() uint32 { + + return *obj.obj.CsnpInterval + +} + +// The number of milliseconds between transmissions of Partial Sequence Number PDU. +// CsnpInterval returns a uint32 +func (obj *isisAdvanced) HasCsnpInterval() bool { + return obj.obj.CsnpInterval != nil +} + +// The number of milliseconds between transmissions of Partial Sequence Number PDU. +// SetCsnpInterval sets the uint32 value in the IsisAdvanced object +func (obj *isisAdvanced) SetCsnpInterval(value uint32) IsisAdvanced { + + obj.obj.CsnpInterval = &value + return obj +} + +// The maximum size in bytes of any LSP that can be transmitted over a link of equal or less than maximum MTU size. +// MaxLspSize returns a uint32 +func (obj *isisAdvanced) MaxLspSize() uint32 { + + return *obj.obj.MaxLspSize + +} + +// The maximum size in bytes of any LSP that can be transmitted over a link of equal or less than maximum MTU size. +// MaxLspSize returns a uint32 +func (obj *isisAdvanced) HasMaxLspSize() bool { + return obj.obj.MaxLspSize != nil +} + +// The maximum size in bytes of any LSP that can be transmitted over a link of equal or less than maximum MTU size. +// SetMaxLspSize sets the uint32 value in the IsisAdvanced object +func (obj *isisAdvanced) SetMaxLspSize(value uint32) IsisAdvanced { + + obj.obj.MaxLspSize = &value + return obj +} + +// The number of seconds between transmissions of LSPs/MGROUP-PDUs. +// LspMgroupMinTransInterval returns a uint32 +func (obj *isisAdvanced) LspMgroupMinTransInterval() uint32 { + + return *obj.obj.LspMgroupMinTransInterval + +} + +// The number of seconds between transmissions of LSPs/MGROUP-PDUs. +// LspMgroupMinTransInterval returns a uint32 +func (obj *isisAdvanced) HasLspMgroupMinTransInterval() bool { + return obj.obj.LspMgroupMinTransInterval != nil +} + +// The number of seconds between transmissions of LSPs/MGROUP-PDUs. +// SetLspMgroupMinTransInterval sets the uint32 value in the IsisAdvanced object +func (obj *isisAdvanced) SetLspMgroupMinTransInterval(value uint32) IsisAdvanced { + + obj.obj.LspMgroupMinTransInterval = &value + return obj +} + +// If the Attached bit is enabled, it indicates that the ISIS router is attached to another area or the Level 2 backbone. The purpose of an Attached-Bit is to accomplish Inter-Area Routing. When an L1/L2 router is connected to more than one area, it sets the Attached-bit on its L1 LSP. This can cause a default route ( 0.0.0.0/0 ) to be installed by the receiving router. +// EnableAttachedBit returns a bool +func (obj *isisAdvanced) EnableAttachedBit() bool { + + return *obj.obj.EnableAttachedBit + +} + +// If the Attached bit is enabled, it indicates that the ISIS router is attached to another area or the Level 2 backbone. The purpose of an Attached-Bit is to accomplish Inter-Area Routing. When an L1/L2 router is connected to more than one area, it sets the Attached-bit on its L1 LSP. This can cause a default route ( 0.0.0.0/0 ) to be installed by the receiving router. +// EnableAttachedBit returns a bool +func (obj *isisAdvanced) HasEnableAttachedBit() bool { + return obj.obj.EnableAttachedBit != nil +} + +// If the Attached bit is enabled, it indicates that the ISIS router is attached to another area or the Level 2 backbone. The purpose of an Attached-Bit is to accomplish Inter-Area Routing. When an L1/L2 router is connected to more than one area, it sets the Attached-bit on its L1 LSP. This can cause a default route ( 0.0.0.0/0 ) to be installed by the receiving router. +// SetEnableAttachedBit sets the bool value in the IsisAdvanced object +func (obj *isisAdvanced) SetEnableAttachedBit(value bool) IsisAdvanced { + + obj.obj.EnableAttachedBit = &value + return obj +} + +func (obj *isisAdvanced) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.MaxAreaAddresses != nil { + + if *obj.obj.MaxAreaAddresses > 254 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= IsisAdvanced.MaxAreaAddresses <= 254 but Got %d", *obj.obj.MaxAreaAddresses)) + } + + } + + if obj.obj.AreaAddresses != nil { + + err := obj.validateHexSlice(obj.AreaAddresses()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on IsisAdvanced.AreaAddresses")) + } + + } + + if obj.obj.LspRefreshRate != nil { + + if *obj.obj.LspRefreshRate > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= IsisAdvanced.LspRefreshRate <= 65535 but Got %d", *obj.obj.LspRefreshRate)) + } + + } + + if obj.obj.LspLifetime != nil { + + if *obj.obj.LspLifetime > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= IsisAdvanced.LspLifetime <= 65535 but Got %d", *obj.obj.LspLifetime)) + } + + } + + if obj.obj.PsnpInterval != nil { + + if *obj.obj.PsnpInterval > 60000 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= IsisAdvanced.PsnpInterval <= 60000 but Got %d", *obj.obj.PsnpInterval)) + } + + } + + if obj.obj.CsnpInterval != nil { + + if *obj.obj.CsnpInterval < 1 || *obj.obj.CsnpInterval > 65535000 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= IsisAdvanced.CsnpInterval <= 65535000 but Got %d", *obj.obj.CsnpInterval)) + } + + } + + if obj.obj.MaxLspSize != nil { + + if *obj.obj.MaxLspSize < 64 || *obj.obj.MaxLspSize > 9216 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("64 <= IsisAdvanced.MaxLspSize <= 9216 but Got %d", *obj.obj.MaxLspSize)) + } + + } + + if obj.obj.LspMgroupMinTransInterval != nil { + + if *obj.obj.LspMgroupMinTransInterval < 1 || *obj.obj.LspMgroupMinTransInterval > 60000 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= IsisAdvanced.LspMgroupMinTransInterval <= 60000 but Got %d", *obj.obj.LspMgroupMinTransInterval)) + } + + } + +} + +func (obj *isisAdvanced) setDefault() { + if obj.obj.EnableHelloPadding == nil { + obj.SetEnableHelloPadding(true) + } + if obj.obj.MaxAreaAddresses == nil { + obj.SetMaxAreaAddresses(3) + } + if obj.obj.LspRefreshRate == nil { + obj.SetLspRefreshRate(600) + } + if obj.obj.LspLifetime == nil { + obj.SetLspLifetime(1200) + } + if obj.obj.PsnpInterval == nil { + obj.SetPsnpInterval(2000) + } + if obj.obj.CsnpInterval == nil { + obj.SetCsnpInterval(10000) + } + if obj.obj.MaxLspSize == nil { + obj.SetMaxLspSize(1492) + } + if obj.obj.LspMgroupMinTransInterval == nil { + obj.SetLspMgroupMinTransInterval(5000) + } + if obj.obj.EnableAttachedBit == nil { + obj.SetEnableAttachedBit(true) + } + +} diff --git a/gosnappi/isis_authentication.go b/gosnappi/isis_authentication.go new file mode 100644 index 00000000..ad456ec8 --- /dev/null +++ b/gosnappi/isis_authentication.go @@ -0,0 +1,408 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisAuthentication ***** +type isisAuthentication struct { + validation + obj *otg.IsisAuthentication + marshaller marshalIsisAuthentication + unMarshaller unMarshalIsisAuthentication + areaAuthHolder IsisAuthenticationBase + domainAuthHolder IsisAuthenticationBase +} + +func NewIsisAuthentication() IsisAuthentication { + obj := isisAuthentication{obj: &otg.IsisAuthentication{}} + obj.setDefault() + return &obj +} + +func (obj *isisAuthentication) msg() *otg.IsisAuthentication { + return obj.obj +} + +func (obj *isisAuthentication) setMsg(msg *otg.IsisAuthentication) IsisAuthentication { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisAuthentication struct { + obj *isisAuthentication +} + +type marshalIsisAuthentication interface { + // ToProto marshals IsisAuthentication to protobuf object *otg.IsisAuthentication + ToProto() (*otg.IsisAuthentication, error) + // ToPbText marshals IsisAuthentication to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisAuthentication to YAML text + ToYaml() (string, error) + // ToJson marshals IsisAuthentication to JSON text + ToJson() (string, error) +} + +type unMarshalisisAuthentication struct { + obj *isisAuthentication +} + +type unMarshalIsisAuthentication interface { + // FromProto unmarshals IsisAuthentication from protobuf object *otg.IsisAuthentication + FromProto(msg *otg.IsisAuthentication) (IsisAuthentication, error) + // FromPbText unmarshals IsisAuthentication from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisAuthentication from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisAuthentication from JSON text + FromJson(value string) error +} + +func (obj *isisAuthentication) Marshal() marshalIsisAuthentication { + if obj.marshaller == nil { + obj.marshaller = &marshalisisAuthentication{obj: obj} + } + return obj.marshaller +} + +func (obj *isisAuthentication) Unmarshal() unMarshalIsisAuthentication { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisAuthentication{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisAuthentication) ToProto() (*otg.IsisAuthentication, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisAuthentication) FromProto(msg *otg.IsisAuthentication) (IsisAuthentication, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisAuthentication) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisAuthentication) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisAuthentication) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisAuthentication) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisAuthentication) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisAuthentication) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisAuthentication) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisAuthentication) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisAuthentication) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisAuthentication) Clone() (IsisAuthentication, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisAuthentication() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisAuthentication) setNil() { + obj.areaAuthHolder = nil + obj.domainAuthHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisAuthentication is this contains ISIS Area/Domain authentication properties. +type IsisAuthentication interface { + Validation + // msg marshals IsisAuthentication to protobuf object *otg.IsisAuthentication + // and doesn't set defaults + msg() *otg.IsisAuthentication + // setMsg unmarshals IsisAuthentication from protobuf object *otg.IsisAuthentication + // and doesn't set defaults + setMsg(*otg.IsisAuthentication) IsisAuthentication + // provides marshal interface + Marshal() marshalIsisAuthentication + // provides unmarshal interface + Unmarshal() unMarshalIsisAuthentication + // validate validates IsisAuthentication + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisAuthentication, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // IgnoreReceiveMd5 returns bool, set in IsisAuthentication. + IgnoreReceiveMd5() bool + // SetIgnoreReceiveMd5 assigns bool provided by user to IsisAuthentication + SetIgnoreReceiveMd5(value bool) IsisAuthentication + // HasIgnoreReceiveMd5 checks if IgnoreReceiveMd5 has been set in IsisAuthentication + HasIgnoreReceiveMd5() bool + // AreaAuth returns IsisAuthenticationBase, set in IsisAuthentication. + // IsisAuthenticationBase is optional container for ISIS authentication properties. + AreaAuth() IsisAuthenticationBase + // SetAreaAuth assigns IsisAuthenticationBase provided by user to IsisAuthentication. + // IsisAuthenticationBase is optional container for ISIS authentication properties. + SetAreaAuth(value IsisAuthenticationBase) IsisAuthentication + // HasAreaAuth checks if AreaAuth has been set in IsisAuthentication + HasAreaAuth() bool + // DomainAuth returns IsisAuthenticationBase, set in IsisAuthentication. + // IsisAuthenticationBase is optional container for ISIS authentication properties. + DomainAuth() IsisAuthenticationBase + // SetDomainAuth assigns IsisAuthenticationBase provided by user to IsisAuthentication. + // IsisAuthenticationBase is optional container for ISIS authentication properties. + SetDomainAuth(value IsisAuthenticationBase) IsisAuthentication + // HasDomainAuth checks if DomainAuth has been set in IsisAuthentication + HasDomainAuth() bool + setNil() +} + +// Do not verify MD5 checksum in received LSPs. +// IgnoreReceiveMd5 returns a bool +func (obj *isisAuthentication) IgnoreReceiveMd5() bool { + + return *obj.obj.IgnoreReceiveMd5 + +} + +// Do not verify MD5 checksum in received LSPs. +// IgnoreReceiveMd5 returns a bool +func (obj *isisAuthentication) HasIgnoreReceiveMd5() bool { + return obj.obj.IgnoreReceiveMd5 != nil +} + +// Do not verify MD5 checksum in received LSPs. +// SetIgnoreReceiveMd5 sets the bool value in the IsisAuthentication object +func (obj *isisAuthentication) SetIgnoreReceiveMd5(value bool) IsisAuthentication { + + obj.obj.IgnoreReceiveMd5 = &value + return obj +} + +// The Area authentication method used for the emulated ISIS router. +// This is used for L1 LSPs. +// AreaAuth returns a IsisAuthenticationBase +func (obj *isisAuthentication) AreaAuth() IsisAuthenticationBase { + if obj.obj.AreaAuth == nil { + obj.obj.AreaAuth = NewIsisAuthenticationBase().msg() + } + if obj.areaAuthHolder == nil { + obj.areaAuthHolder = &isisAuthenticationBase{obj: obj.obj.AreaAuth} + } + return obj.areaAuthHolder +} + +// The Area authentication method used for the emulated ISIS router. +// This is used for L1 LSPs. +// AreaAuth returns a IsisAuthenticationBase +func (obj *isisAuthentication) HasAreaAuth() bool { + return obj.obj.AreaAuth != nil +} + +// The Area authentication method used for the emulated ISIS router. +// This is used for L1 LSPs. +// SetAreaAuth sets the IsisAuthenticationBase value in the IsisAuthentication object +func (obj *isisAuthentication) SetAreaAuth(value IsisAuthenticationBase) IsisAuthentication { + + obj.areaAuthHolder = nil + obj.obj.AreaAuth = value.msg() + + return obj +} + +// The Domain authentication method used for the emulated ISIS router. +// This is used for L2 LSPs. +// DomainAuth returns a IsisAuthenticationBase +func (obj *isisAuthentication) DomainAuth() IsisAuthenticationBase { + if obj.obj.DomainAuth == nil { + obj.obj.DomainAuth = NewIsisAuthenticationBase().msg() + } + if obj.domainAuthHolder == nil { + obj.domainAuthHolder = &isisAuthenticationBase{obj: obj.obj.DomainAuth} + } + return obj.domainAuthHolder +} + +// The Domain authentication method used for the emulated ISIS router. +// This is used for L2 LSPs. +// DomainAuth returns a IsisAuthenticationBase +func (obj *isisAuthentication) HasDomainAuth() bool { + return obj.obj.DomainAuth != nil +} + +// The Domain authentication method used for the emulated ISIS router. +// This is used for L2 LSPs. +// SetDomainAuth sets the IsisAuthenticationBase value in the IsisAuthentication object +func (obj *isisAuthentication) SetDomainAuth(value IsisAuthenticationBase) IsisAuthentication { + + obj.domainAuthHolder = nil + obj.obj.DomainAuth = value.msg() + + return obj +} + +func (obj *isisAuthentication) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.AreaAuth != nil { + + obj.AreaAuth().validateObj(vObj, set_default) + } + + if obj.obj.DomainAuth != nil { + + obj.DomainAuth().validateObj(vObj, set_default) + } + +} + +func (obj *isisAuthentication) setDefault() { + if obj.obj.IgnoreReceiveMd5 == nil { + obj.SetIgnoreReceiveMd5(true) + } + +} diff --git a/gosnappi/isis_authentication_base.go b/gosnappi/isis_authentication_base.go new file mode 100644 index 00000000..bb78f997 --- /dev/null +++ b/gosnappi/isis_authentication_base.go @@ -0,0 +1,395 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisAuthenticationBase ***** +type isisAuthenticationBase struct { + validation + obj *otg.IsisAuthenticationBase + marshaller marshalIsisAuthenticationBase + unMarshaller unMarshalIsisAuthenticationBase +} + +func NewIsisAuthenticationBase() IsisAuthenticationBase { + obj := isisAuthenticationBase{obj: &otg.IsisAuthenticationBase{}} + obj.setDefault() + return &obj +} + +func (obj *isisAuthenticationBase) msg() *otg.IsisAuthenticationBase { + return obj.obj +} + +func (obj *isisAuthenticationBase) setMsg(msg *otg.IsisAuthenticationBase) IsisAuthenticationBase { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisAuthenticationBase struct { + obj *isisAuthenticationBase +} + +type marshalIsisAuthenticationBase interface { + // ToProto marshals IsisAuthenticationBase to protobuf object *otg.IsisAuthenticationBase + ToProto() (*otg.IsisAuthenticationBase, error) + // ToPbText marshals IsisAuthenticationBase to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisAuthenticationBase to YAML text + ToYaml() (string, error) + // ToJson marshals IsisAuthenticationBase to JSON text + ToJson() (string, error) +} + +type unMarshalisisAuthenticationBase struct { + obj *isisAuthenticationBase +} + +type unMarshalIsisAuthenticationBase interface { + // FromProto unmarshals IsisAuthenticationBase from protobuf object *otg.IsisAuthenticationBase + FromProto(msg *otg.IsisAuthenticationBase) (IsisAuthenticationBase, error) + // FromPbText unmarshals IsisAuthenticationBase from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisAuthenticationBase from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisAuthenticationBase from JSON text + FromJson(value string) error +} + +func (obj *isisAuthenticationBase) Marshal() marshalIsisAuthenticationBase { + if obj.marshaller == nil { + obj.marshaller = &marshalisisAuthenticationBase{obj: obj} + } + return obj.marshaller +} + +func (obj *isisAuthenticationBase) Unmarshal() unMarshalIsisAuthenticationBase { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisAuthenticationBase{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisAuthenticationBase) ToProto() (*otg.IsisAuthenticationBase, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisAuthenticationBase) FromProto(msg *otg.IsisAuthenticationBase) (IsisAuthenticationBase, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisAuthenticationBase) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisAuthenticationBase) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisAuthenticationBase) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisAuthenticationBase) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisAuthenticationBase) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisAuthenticationBase) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisAuthenticationBase) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisAuthenticationBase) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisAuthenticationBase) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisAuthenticationBase) Clone() (IsisAuthenticationBase, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisAuthenticationBase() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisAuthenticationBase is optional container for ISIS authentication properties. +type IsisAuthenticationBase interface { + Validation + // msg marshals IsisAuthenticationBase to protobuf object *otg.IsisAuthenticationBase + // and doesn't set defaults + msg() *otg.IsisAuthenticationBase + // setMsg unmarshals IsisAuthenticationBase from protobuf object *otg.IsisAuthenticationBase + // and doesn't set defaults + setMsg(*otg.IsisAuthenticationBase) IsisAuthenticationBase + // provides marshal interface + Marshal() marshalIsisAuthenticationBase + // provides unmarshal interface + Unmarshal() unMarshalIsisAuthenticationBase + // validate validates IsisAuthenticationBase + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisAuthenticationBase, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // AuthType returns IsisAuthenticationBaseAuthTypeEnum, set in IsisAuthenticationBase + AuthType() IsisAuthenticationBaseAuthTypeEnum + // SetAuthType assigns IsisAuthenticationBaseAuthTypeEnum provided by user to IsisAuthenticationBase + SetAuthType(value IsisAuthenticationBaseAuthTypeEnum) IsisAuthenticationBase + // Md5 returns string, set in IsisAuthenticationBase. + Md5() string + // SetMd5 assigns string provided by user to IsisAuthenticationBase + SetMd5(value string) IsisAuthenticationBase + // HasMd5 checks if Md5 has been set in IsisAuthenticationBase + HasMd5() bool + // Password returns string, set in IsisAuthenticationBase. + Password() string + // SetPassword assigns string provided by user to IsisAuthenticationBase + SetPassword(value string) IsisAuthenticationBase + // HasPassword checks if Password has been set in IsisAuthenticationBase + HasPassword() bool +} + +type IsisAuthenticationBaseAuthTypeEnum string + +// Enum of AuthType on IsisAuthenticationBase +var IsisAuthenticationBaseAuthType = struct { + MD5 IsisAuthenticationBaseAuthTypeEnum + PASSWORD IsisAuthenticationBaseAuthTypeEnum +}{ + MD5: IsisAuthenticationBaseAuthTypeEnum("md5"), + PASSWORD: IsisAuthenticationBaseAuthTypeEnum("password"), +} + +func (obj *isisAuthenticationBase) AuthType() IsisAuthenticationBaseAuthTypeEnum { + return IsisAuthenticationBaseAuthTypeEnum(obj.obj.AuthType.Enum().String()) +} + +func (obj *isisAuthenticationBase) SetAuthType(value IsisAuthenticationBaseAuthTypeEnum) IsisAuthenticationBase { + intValue, ok := otg.IsisAuthenticationBase_AuthType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on IsisAuthenticationBaseAuthTypeEnum", string(value))) + return obj + } + enumValue := otg.IsisAuthenticationBase_AuthType_Enum(intValue) + obj.obj.AuthType = &enumValue + + return obj +} + +// Authentication as an MD5 key. +// Md5 returns a string +func (obj *isisAuthenticationBase) Md5() string { + + return *obj.obj.Md5 + +} + +// Authentication as an MD5 key. +// Md5 returns a string +func (obj *isisAuthenticationBase) HasMd5() bool { + return obj.obj.Md5 != nil +} + +// Authentication as an MD5 key. +// SetMd5 sets the string value in the IsisAuthenticationBase object +func (obj *isisAuthenticationBase) SetMd5(value string) IsisAuthenticationBase { + + obj.obj.Md5 = &value + return obj +} + +// Authentication as a clear text password. +// Password returns a string +func (obj *isisAuthenticationBase) Password() string { + + return *obj.obj.Password + +} + +// Authentication as a clear text password. +// Password returns a string +func (obj *isisAuthenticationBase) HasPassword() bool { + return obj.obj.Password != nil +} + +// Authentication as a clear text password. +// SetPassword sets the string value in the IsisAuthenticationBase object +func (obj *isisAuthenticationBase) SetPassword(value string) IsisAuthenticationBase { + + obj.obj.Password = &value + return obj +} + +func (obj *isisAuthenticationBase) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // AuthType is required + if obj.obj.AuthType == nil { + vObj.validationErrors = append(vObj.validationErrors, "AuthType is required field on interface IsisAuthenticationBase") + } + + if obj.obj.Md5 != nil { + + if len(*obj.obj.Md5) < 0 || len(*obj.obj.Md5) > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of IsisAuthenticationBase.Md5 <= 255 but Got %d", + len(*obj.obj.Md5))) + } + + } + + if obj.obj.Password != nil { + + if len(*obj.obj.Password) < 0 || len(*obj.obj.Password) > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of IsisAuthenticationBase.Password <= 255 but Got %d", + len(*obj.obj.Password))) + } + + } + +} + +func (obj *isisAuthenticationBase) setDefault() { + +} diff --git a/gosnappi/isis_basic.go b/gosnappi/isis_basic.go new file mode 100644 index 00000000..b4e46536 --- /dev/null +++ b/gosnappi/isis_basic.go @@ -0,0 +1,405 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisBasic ***** +type isisBasic struct { + validation + obj *otg.IsisBasic + marshaller marshalIsisBasic + unMarshaller unMarshalIsisBasic +} + +func NewIsisBasic() IsisBasic { + obj := isisBasic{obj: &otg.IsisBasic{}} + obj.setDefault() + return &obj +} + +func (obj *isisBasic) msg() *otg.IsisBasic { + return obj.obj +} + +func (obj *isisBasic) setMsg(msg *otg.IsisBasic) IsisBasic { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisBasic struct { + obj *isisBasic +} + +type marshalIsisBasic interface { + // ToProto marshals IsisBasic to protobuf object *otg.IsisBasic + ToProto() (*otg.IsisBasic, error) + // ToPbText marshals IsisBasic to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisBasic to YAML text + ToYaml() (string, error) + // ToJson marshals IsisBasic to JSON text + ToJson() (string, error) +} + +type unMarshalisisBasic struct { + obj *isisBasic +} + +type unMarshalIsisBasic interface { + // FromProto unmarshals IsisBasic from protobuf object *otg.IsisBasic + FromProto(msg *otg.IsisBasic) (IsisBasic, error) + // FromPbText unmarshals IsisBasic from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisBasic from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisBasic from JSON text + FromJson(value string) error +} + +func (obj *isisBasic) Marshal() marshalIsisBasic { + if obj.marshaller == nil { + obj.marshaller = &marshalisisBasic{obj: obj} + } + return obj.marshaller +} + +func (obj *isisBasic) Unmarshal() unMarshalIsisBasic { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisBasic{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisBasic) ToProto() (*otg.IsisBasic, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisBasic) FromProto(msg *otg.IsisBasic) (IsisBasic, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisBasic) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisBasic) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisBasic) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisBasic) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisBasic) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisBasic) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisBasic) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisBasic) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisBasic) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisBasic) Clone() (IsisBasic, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisBasic() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisBasic is this contains ISIS router basic properties. +type IsisBasic interface { + Validation + // msg marshals IsisBasic to protobuf object *otg.IsisBasic + // and doesn't set defaults + msg() *otg.IsisBasic + // setMsg unmarshals IsisBasic from protobuf object *otg.IsisBasic + // and doesn't set defaults + setMsg(*otg.IsisBasic) IsisBasic + // provides marshal interface + Marshal() marshalIsisBasic + // provides unmarshal interface + Unmarshal() unMarshalIsisBasic + // validate validates IsisBasic + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisBasic, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv4TeRouterId returns string, set in IsisBasic. + Ipv4TeRouterId() string + // SetIpv4TeRouterId assigns string provided by user to IsisBasic + SetIpv4TeRouterId(value string) IsisBasic + // HasIpv4TeRouterId checks if Ipv4TeRouterId has been set in IsisBasic + HasIpv4TeRouterId() bool + // Hostname returns string, set in IsisBasic. + Hostname() string + // SetHostname assigns string provided by user to IsisBasic + SetHostname(value string) IsisBasic + // HasHostname checks if Hostname has been set in IsisBasic + HasHostname() bool + // EnableWideMetric returns bool, set in IsisBasic. + EnableWideMetric() bool + // SetEnableWideMetric assigns bool provided by user to IsisBasic + SetEnableWideMetric(value bool) IsisBasic + // HasEnableWideMetric checks if EnableWideMetric has been set in IsisBasic + HasEnableWideMetric() bool + // LearnedLspFilter returns bool, set in IsisBasic. + LearnedLspFilter() bool + // SetLearnedLspFilter assigns bool provided by user to IsisBasic + SetLearnedLspFilter(value bool) IsisBasic + // HasLearnedLspFilter checks if LearnedLspFilter has been set in IsisBasic + HasLearnedLspFilter() bool +} + +// IPv4 Traffic Engineering(TE) router id. This address should be configured as an IPv4 Loopback address in 'ipv4_loopbacks' in the Device. +// Ipv4TeRouterId returns a string +func (obj *isisBasic) Ipv4TeRouterId() string { + + return *obj.obj.Ipv4TeRouterId + +} + +// IPv4 Traffic Engineering(TE) router id. This address should be configured as an IPv4 Loopback address in 'ipv4_loopbacks' in the Device. +// Ipv4TeRouterId returns a string +func (obj *isisBasic) HasIpv4TeRouterId() bool { + return obj.obj.Ipv4TeRouterId != nil +} + +// IPv4 Traffic Engineering(TE) router id. This address should be configured as an IPv4 Loopback address in 'ipv4_loopbacks' in the Device. +// SetIpv4TeRouterId sets the string value in the IsisBasic object +func (obj *isisBasic) SetIpv4TeRouterId(value string) IsisBasic { + + obj.obj.Ipv4TeRouterId = &value + return obj +} + +// Host name for the router. The host name is transmitted in all the packets sent from the router. +// Hostname returns a string +func (obj *isisBasic) Hostname() string { + + return *obj.obj.Hostname + +} + +// Host name for the router. The host name is transmitted in all the packets sent from the router. +// Hostname returns a string +func (obj *isisBasic) HasHostname() bool { + return obj.obj.Hostname != nil +} + +// Host name for the router. The host name is transmitted in all the packets sent from the router. +// SetHostname sets the string value in the IsisBasic object +func (obj *isisBasic) SetHostname(value string) IsisBasic { + + obj.obj.Hostname = &value + return obj +} + +// When set to true, it allows sending of more detailed metric information for the routes using 32-bit wide values using TLV 135 IP reachability and more detailed reachability information for IS reachability by using TLV 22. The detailed usage is described in RFC3784. +// EnableWideMetric returns a bool +func (obj *isisBasic) EnableWideMetric() bool { + + return *obj.obj.EnableWideMetric + +} + +// When set to true, it allows sending of more detailed metric information for the routes using 32-bit wide values using TLV 135 IP reachability and more detailed reachability information for IS reachability by using TLV 22. The detailed usage is described in RFC3784. +// EnableWideMetric returns a bool +func (obj *isisBasic) HasEnableWideMetric() bool { + return obj.obj.EnableWideMetric != nil +} + +// When set to true, it allows sending of more detailed metric information for the routes using 32-bit wide values using TLV 135 IP reachability and more detailed reachability information for IS reachability by using TLV 22. The detailed usage is described in RFC3784. +// SetEnableWideMetric sets the bool value in the IsisBasic object +func (obj *isisBasic) SetEnableWideMetric(value bool) IsisBasic { + + obj.obj.EnableWideMetric = &value + return obj +} + +// Configuration for controlling storage of ISIS learned LSPs are received from the neighbors. +// LearnedLspFilter returns a bool +func (obj *isisBasic) LearnedLspFilter() bool { + + return *obj.obj.LearnedLspFilter + +} + +// Configuration for controlling storage of ISIS learned LSPs are received from the neighbors. +// LearnedLspFilter returns a bool +func (obj *isisBasic) HasLearnedLspFilter() bool { + return obj.obj.LearnedLspFilter != nil +} + +// Configuration for controlling storage of ISIS learned LSPs are received from the neighbors. +// SetLearnedLspFilter sets the bool value in the IsisBasic object +func (obj *isisBasic) SetLearnedLspFilter(value bool) IsisBasic { + + obj.obj.LearnedLspFilter = &value + return obj +} + +func (obj *isisBasic) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv4TeRouterId != nil { + + err := obj.validateIpv4(obj.Ipv4TeRouterId()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on IsisBasic.Ipv4TeRouterId")) + } + + } + +} + +func (obj *isisBasic) setDefault() { + if obj.obj.EnableWideMetric == nil { + obj.SetEnableWideMetric(true) + } + if obj.obj.LearnedLspFilter == nil { + obj.SetLearnedLspFilter(false) + } + +} diff --git a/gosnappi/isis_interface.go b/gosnappi/isis_interface.go new file mode 100644 index 00000000..fedfbfc2 --- /dev/null +++ b/gosnappi/isis_interface.go @@ -0,0 +1,943 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisInterface ***** +type isisInterface struct { + validation + obj *otg.IsisInterface + marshaller marshalIsisInterface + unMarshaller unMarshalIsisInterface + l1SettingsHolder IsisInterfaceLevel + l2SettingsHolder IsisInterfaceLevel + multiTopologyIdsHolder IsisInterfaceIsisMTIter + trafficEngineeringHolder IsisInterfaceLinkStateTEIter + authenticationHolder IsisInterfaceAuthentication + advancedHolder IsisInterfaceAdvanced + linkProtectionHolder IsisInterfaceLinkProtection +} + +func NewIsisInterface() IsisInterface { + obj := isisInterface{obj: &otg.IsisInterface{}} + obj.setDefault() + return &obj +} + +func (obj *isisInterface) msg() *otg.IsisInterface { + return obj.obj +} + +func (obj *isisInterface) setMsg(msg *otg.IsisInterface) IsisInterface { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisInterface struct { + obj *isisInterface +} + +type marshalIsisInterface interface { + // ToProto marshals IsisInterface to protobuf object *otg.IsisInterface + ToProto() (*otg.IsisInterface, error) + // ToPbText marshals IsisInterface to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisInterface to YAML text + ToYaml() (string, error) + // ToJson marshals IsisInterface to JSON text + ToJson() (string, error) +} + +type unMarshalisisInterface struct { + obj *isisInterface +} + +type unMarshalIsisInterface interface { + // FromProto unmarshals IsisInterface from protobuf object *otg.IsisInterface + FromProto(msg *otg.IsisInterface) (IsisInterface, error) + // FromPbText unmarshals IsisInterface from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisInterface from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisInterface from JSON text + FromJson(value string) error +} + +func (obj *isisInterface) Marshal() marshalIsisInterface { + if obj.marshaller == nil { + obj.marshaller = &marshalisisInterface{obj: obj} + } + return obj.marshaller +} + +func (obj *isisInterface) Unmarshal() unMarshalIsisInterface { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisInterface{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisInterface) ToProto() (*otg.IsisInterface, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisInterface) FromProto(msg *otg.IsisInterface) (IsisInterface, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisInterface) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisInterface) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisInterface) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisInterface) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisInterface) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisInterface) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisInterface) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisInterface) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisInterface) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisInterface) Clone() (IsisInterface, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisInterface() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisInterface) setNil() { + obj.l1SettingsHolder = nil + obj.l2SettingsHolder = nil + obj.multiTopologyIdsHolder = nil + obj.trafficEngineeringHolder = nil + obj.authenticationHolder = nil + obj.advancedHolder = nil + obj.linkProtectionHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisInterface is configuration for single ISIS interface. +type IsisInterface interface { + Validation + // msg marshals IsisInterface to protobuf object *otg.IsisInterface + // and doesn't set defaults + msg() *otg.IsisInterface + // setMsg unmarshals IsisInterface from protobuf object *otg.IsisInterface + // and doesn't set defaults + setMsg(*otg.IsisInterface) IsisInterface + // provides marshal interface + Marshal() marshalIsisInterface + // provides unmarshal interface + Unmarshal() unMarshalIsisInterface + // validate validates IsisInterface + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisInterface, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EthName returns string, set in IsisInterface. + EthName() string + // SetEthName assigns string provided by user to IsisInterface + SetEthName(value string) IsisInterface + // Metric returns uint32, set in IsisInterface. + Metric() uint32 + // SetMetric assigns uint32 provided by user to IsisInterface + SetMetric(value uint32) IsisInterface + // HasMetric checks if Metric has been set in IsisInterface + HasMetric() bool + // NetworkType returns IsisInterfaceNetworkTypeEnum, set in IsisInterface + NetworkType() IsisInterfaceNetworkTypeEnum + // SetNetworkType assigns IsisInterfaceNetworkTypeEnum provided by user to IsisInterface + SetNetworkType(value IsisInterfaceNetworkTypeEnum) IsisInterface + // HasNetworkType checks if NetworkType has been set in IsisInterface + HasNetworkType() bool + // LevelType returns IsisInterfaceLevelTypeEnum, set in IsisInterface + LevelType() IsisInterfaceLevelTypeEnum + // SetLevelType assigns IsisInterfaceLevelTypeEnum provided by user to IsisInterface + SetLevelType(value IsisInterfaceLevelTypeEnum) IsisInterface + // HasLevelType checks if LevelType has been set in IsisInterface + HasLevelType() bool + // L1Settings returns IsisInterfaceLevel, set in IsisInterface. + // IsisInterfaceLevel is configuration for the properties of Level 1 Hello. + L1Settings() IsisInterfaceLevel + // SetL1Settings assigns IsisInterfaceLevel provided by user to IsisInterface. + // IsisInterfaceLevel is configuration for the properties of Level 1 Hello. + SetL1Settings(value IsisInterfaceLevel) IsisInterface + // HasL1Settings checks if L1Settings has been set in IsisInterface + HasL1Settings() bool + // L2Settings returns IsisInterfaceLevel, set in IsisInterface. + // IsisInterfaceLevel is configuration for the properties of Level 1 Hello. + L2Settings() IsisInterfaceLevel + // SetL2Settings assigns IsisInterfaceLevel provided by user to IsisInterface. + // IsisInterfaceLevel is configuration for the properties of Level 1 Hello. + SetL2Settings(value IsisInterfaceLevel) IsisInterface + // HasL2Settings checks if L2Settings has been set in IsisInterface + HasL2Settings() bool + // MultiTopologyIds returns IsisInterfaceIsisMTIterIter, set in IsisInterface + MultiTopologyIds() IsisInterfaceIsisMTIter + // TrafficEngineering returns IsisInterfaceLinkStateTEIterIter, set in IsisInterface + TrafficEngineering() IsisInterfaceLinkStateTEIter + // Authentication returns IsisInterfaceAuthentication, set in IsisInterface. + // IsisInterfaceAuthentication is optional container for circuit authentication properties. + Authentication() IsisInterfaceAuthentication + // SetAuthentication assigns IsisInterfaceAuthentication provided by user to IsisInterface. + // IsisInterfaceAuthentication is optional container for circuit authentication properties. + SetAuthentication(value IsisInterfaceAuthentication) IsisInterface + // HasAuthentication checks if Authentication has been set in IsisInterface + HasAuthentication() bool + // Advanced returns IsisInterfaceAdvanced, set in IsisInterface. + // IsisInterfaceAdvanced is optional container for advanced interface properties. + Advanced() IsisInterfaceAdvanced + // SetAdvanced assigns IsisInterfaceAdvanced provided by user to IsisInterface. + // IsisInterfaceAdvanced is optional container for advanced interface properties. + SetAdvanced(value IsisInterfaceAdvanced) IsisInterface + // HasAdvanced checks if Advanced has been set in IsisInterface + HasAdvanced() bool + // LinkProtection returns IsisInterfaceLinkProtection, set in IsisInterface. + // IsisInterfaceLinkProtection is optional container for the link protection sub TLV (type 20). + LinkProtection() IsisInterfaceLinkProtection + // SetLinkProtection assigns IsisInterfaceLinkProtection provided by user to IsisInterface. + // IsisInterfaceLinkProtection is optional container for the link protection sub TLV (type 20). + SetLinkProtection(value IsisInterfaceLinkProtection) IsisInterface + // HasLinkProtection checks if LinkProtection has been set in IsisInterface + HasLinkProtection() bool + // SrlgValues returns []uint32, set in IsisInterface. + SrlgValues() []uint32 + // SetSrlgValues assigns []uint32 provided by user to IsisInterface + SetSrlgValues(value []uint32) IsisInterface + // Name returns string, set in IsisInterface. + Name() string + // SetName assigns string provided by user to IsisInterface + SetName(value string) IsisInterface + setNil() +} + +// The unique name of the Ethernet interface on which ISIS is running. Two ISIS interfaces cannot share the same Ethernet. The underlying Ethernet Interface can an emulated or simulated interface. A simulated ethernet interface can be assumed to be connected by a primary (internal to a simulated topology) or a secondary link (connected to a device behind a different simulated topology). +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// EthName returns a string +func (obj *isisInterface) EthName() string { + + return *obj.obj.EthName + +} + +// The unique name of the Ethernet interface on which ISIS is running. Two ISIS interfaces cannot share the same Ethernet. The underlying Ethernet Interface can an emulated or simulated interface. A simulated ethernet interface can be assumed to be connected by a primary (internal to a simulated topology) or a secondary link (connected to a device behind a different simulated topology). +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// SetEthName sets the string value in the IsisInterface object +func (obj *isisInterface) SetEthName(value string) IsisInterface { + + obj.obj.EthName = &value + return obj +} + +// The default metric cost for the interface. +// Metric returns a uint32 +func (obj *isisInterface) Metric() uint32 { + + return *obj.obj.Metric + +} + +// The default metric cost for the interface. +// Metric returns a uint32 +func (obj *isisInterface) HasMetric() bool { + return obj.obj.Metric != nil +} + +// The default metric cost for the interface. +// SetMetric sets the uint32 value in the IsisInterface object +func (obj *isisInterface) SetMetric(value uint32) IsisInterface { + + obj.obj.Metric = &value + return obj +} + +type IsisInterfaceNetworkTypeEnum string + +// Enum of NetworkType on IsisInterface +var IsisInterfaceNetworkType = struct { + BROADCAST IsisInterfaceNetworkTypeEnum + POINT_TO_POINT IsisInterfaceNetworkTypeEnum +}{ + BROADCAST: IsisInterfaceNetworkTypeEnum("broadcast"), + POINT_TO_POINT: IsisInterfaceNetworkTypeEnum("point_to_point"), +} + +func (obj *isisInterface) NetworkType() IsisInterfaceNetworkTypeEnum { + return IsisInterfaceNetworkTypeEnum(obj.obj.NetworkType.Enum().String()) +} + +// The type of network link. +// NetworkType returns a string +func (obj *isisInterface) HasNetworkType() bool { + return obj.obj.NetworkType != nil +} + +func (obj *isisInterface) SetNetworkType(value IsisInterfaceNetworkTypeEnum) IsisInterface { + intValue, ok := otg.IsisInterface_NetworkType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on IsisInterfaceNetworkTypeEnum", string(value))) + return obj + } + enumValue := otg.IsisInterface_NetworkType_Enum(intValue) + obj.obj.NetworkType = &enumValue + + return obj +} + +type IsisInterfaceLevelTypeEnum string + +// Enum of LevelType on IsisInterface +var IsisInterfaceLevelType = struct { + LEVEL_1 IsisInterfaceLevelTypeEnum + LEVEL_2 IsisInterfaceLevelTypeEnum + LEVEL_1_2 IsisInterfaceLevelTypeEnum +}{ + LEVEL_1: IsisInterfaceLevelTypeEnum("level_1"), + LEVEL_2: IsisInterfaceLevelTypeEnum("level_2"), + LEVEL_1_2: IsisInterfaceLevelTypeEnum("level_1_2"), +} + +func (obj *isisInterface) LevelType() IsisInterfaceLevelTypeEnum { + return IsisInterfaceLevelTypeEnum(obj.obj.LevelType.Enum().String()) +} + +// This indicates whether this router is participating in Level-1 (L1), +// Level-2 (L2) or both L1 and L2 domains on this interface. +// LevelType returns a string +func (obj *isisInterface) HasLevelType() bool { + return obj.obj.LevelType != nil +} + +func (obj *isisInterface) SetLevelType(value IsisInterfaceLevelTypeEnum) IsisInterface { + intValue, ok := otg.IsisInterface_LevelType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on IsisInterfaceLevelTypeEnum", string(value))) + return obj + } + enumValue := otg.IsisInterface_LevelType_Enum(intValue) + obj.obj.LevelType = &enumValue + + return obj +} + +// Settings of Level 1 Hello. +// L1Settings returns a IsisInterfaceLevel +func (obj *isisInterface) L1Settings() IsisInterfaceLevel { + if obj.obj.L1Settings == nil { + obj.obj.L1Settings = NewIsisInterfaceLevel().msg() + } + if obj.l1SettingsHolder == nil { + obj.l1SettingsHolder = &isisInterfaceLevel{obj: obj.obj.L1Settings} + } + return obj.l1SettingsHolder +} + +// Settings of Level 1 Hello. +// L1Settings returns a IsisInterfaceLevel +func (obj *isisInterface) HasL1Settings() bool { + return obj.obj.L1Settings != nil +} + +// Settings of Level 1 Hello. +// SetL1Settings sets the IsisInterfaceLevel value in the IsisInterface object +func (obj *isisInterface) SetL1Settings(value IsisInterfaceLevel) IsisInterface { + + obj.l1SettingsHolder = nil + obj.obj.L1Settings = value.msg() + + return obj +} + +// Settings of Level 2 Hello. +// L2Settings returns a IsisInterfaceLevel +func (obj *isisInterface) L2Settings() IsisInterfaceLevel { + if obj.obj.L2Settings == nil { + obj.obj.L2Settings = NewIsisInterfaceLevel().msg() + } + if obj.l2SettingsHolder == nil { + obj.l2SettingsHolder = &isisInterfaceLevel{obj: obj.obj.L2Settings} + } + return obj.l2SettingsHolder +} + +// Settings of Level 2 Hello. +// L2Settings returns a IsisInterfaceLevel +func (obj *isisInterface) HasL2Settings() bool { + return obj.obj.L2Settings != nil +} + +// Settings of Level 2 Hello. +// SetL2Settings sets the IsisInterfaceLevel value in the IsisInterface object +func (obj *isisInterface) SetL2Settings(value IsisInterfaceLevel) IsisInterface { + + obj.l2SettingsHolder = nil + obj.obj.L2Settings = value.msg() + + return obj +} + +// Contains the properties of multiple topologies. +// MultiTopologyIds returns a []IsisMT +func (obj *isisInterface) MultiTopologyIds() IsisInterfaceIsisMTIter { + if len(obj.obj.MultiTopologyIds) == 0 { + obj.obj.MultiTopologyIds = []*otg.IsisMT{} + } + if obj.multiTopologyIdsHolder == nil { + obj.multiTopologyIdsHolder = newIsisInterfaceIsisMTIter(&obj.obj.MultiTopologyIds).setMsg(obj) + } + return obj.multiTopologyIdsHolder +} + +type isisInterfaceIsisMTIter struct { + obj *isisInterface + isisMTSlice []IsisMT + fieldPtr *[]*otg.IsisMT +} + +func newIsisInterfaceIsisMTIter(ptr *[]*otg.IsisMT) IsisInterfaceIsisMTIter { + return &isisInterfaceIsisMTIter{fieldPtr: ptr} +} + +type IsisInterfaceIsisMTIter interface { + setMsg(*isisInterface) IsisInterfaceIsisMTIter + Items() []IsisMT + Add() IsisMT + Append(items ...IsisMT) IsisInterfaceIsisMTIter + Set(index int, newObj IsisMT) IsisInterfaceIsisMTIter + Clear() IsisInterfaceIsisMTIter + clearHolderSlice() IsisInterfaceIsisMTIter + appendHolderSlice(item IsisMT) IsisInterfaceIsisMTIter +} + +func (obj *isisInterfaceIsisMTIter) setMsg(msg *isisInterface) IsisInterfaceIsisMTIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisMT{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisInterfaceIsisMTIter) Items() []IsisMT { + return obj.isisMTSlice +} + +func (obj *isisInterfaceIsisMTIter) Add() IsisMT { + newObj := &otg.IsisMT{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisMT{obj: newObj} + newLibObj.setDefault() + obj.isisMTSlice = append(obj.isisMTSlice, newLibObj) + return newLibObj +} + +func (obj *isisInterfaceIsisMTIter) Append(items ...IsisMT) IsisInterfaceIsisMTIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisMTSlice = append(obj.isisMTSlice, item) + } + return obj +} + +func (obj *isisInterfaceIsisMTIter) Set(index int, newObj IsisMT) IsisInterfaceIsisMTIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisMTSlice[index] = newObj + return obj +} +func (obj *isisInterfaceIsisMTIter) Clear() IsisInterfaceIsisMTIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisMT{} + obj.isisMTSlice = []IsisMT{} + } + return obj +} +func (obj *isisInterfaceIsisMTIter) clearHolderSlice() IsisInterfaceIsisMTIter { + if len(obj.isisMTSlice) > 0 { + obj.isisMTSlice = []IsisMT{} + } + return obj +} +func (obj *isisInterfaceIsisMTIter) appendHolderSlice(item IsisMT) IsisInterfaceIsisMTIter { + obj.isisMTSlice = append(obj.isisMTSlice, item) + return obj +} + +// Contains a list of Traffic Engineering attributes. +// TrafficEngineering returns a []LinkStateTE +func (obj *isisInterface) TrafficEngineering() IsisInterfaceLinkStateTEIter { + if len(obj.obj.TrafficEngineering) == 0 { + obj.obj.TrafficEngineering = []*otg.LinkStateTE{} + } + if obj.trafficEngineeringHolder == nil { + obj.trafficEngineeringHolder = newIsisInterfaceLinkStateTEIter(&obj.obj.TrafficEngineering).setMsg(obj) + } + return obj.trafficEngineeringHolder +} + +type isisInterfaceLinkStateTEIter struct { + obj *isisInterface + linkStateTESlice []LinkStateTE + fieldPtr *[]*otg.LinkStateTE +} + +func newIsisInterfaceLinkStateTEIter(ptr *[]*otg.LinkStateTE) IsisInterfaceLinkStateTEIter { + return &isisInterfaceLinkStateTEIter{fieldPtr: ptr} +} + +type IsisInterfaceLinkStateTEIter interface { + setMsg(*isisInterface) IsisInterfaceLinkStateTEIter + Items() []LinkStateTE + Add() LinkStateTE + Append(items ...LinkStateTE) IsisInterfaceLinkStateTEIter + Set(index int, newObj LinkStateTE) IsisInterfaceLinkStateTEIter + Clear() IsisInterfaceLinkStateTEIter + clearHolderSlice() IsisInterfaceLinkStateTEIter + appendHolderSlice(item LinkStateTE) IsisInterfaceLinkStateTEIter +} + +func (obj *isisInterfaceLinkStateTEIter) setMsg(msg *isisInterface) IsisInterfaceLinkStateTEIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&linkStateTE{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisInterfaceLinkStateTEIter) Items() []LinkStateTE { + return obj.linkStateTESlice +} + +func (obj *isisInterfaceLinkStateTEIter) Add() LinkStateTE { + newObj := &otg.LinkStateTE{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &linkStateTE{obj: newObj} + newLibObj.setDefault() + obj.linkStateTESlice = append(obj.linkStateTESlice, newLibObj) + return newLibObj +} + +func (obj *isisInterfaceLinkStateTEIter) Append(items ...LinkStateTE) IsisInterfaceLinkStateTEIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.linkStateTESlice = append(obj.linkStateTESlice, item) + } + return obj +} + +func (obj *isisInterfaceLinkStateTEIter) Set(index int, newObj LinkStateTE) IsisInterfaceLinkStateTEIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.linkStateTESlice[index] = newObj + return obj +} +func (obj *isisInterfaceLinkStateTEIter) Clear() IsisInterfaceLinkStateTEIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.LinkStateTE{} + obj.linkStateTESlice = []LinkStateTE{} + } + return obj +} +func (obj *isisInterfaceLinkStateTEIter) clearHolderSlice() IsisInterfaceLinkStateTEIter { + if len(obj.linkStateTESlice) > 0 { + obj.linkStateTESlice = []LinkStateTE{} + } + return obj +} +func (obj *isisInterfaceLinkStateTEIter) appendHolderSlice(item LinkStateTE) IsisInterfaceLinkStateTEIter { + obj.linkStateTESlice = append(obj.linkStateTESlice, item) + return obj +} + +// The Circuit authentication method used for the interfaces on this emulated ISIS v4/v6 router. +// Authentication returns a IsisInterfaceAuthentication +func (obj *isisInterface) Authentication() IsisInterfaceAuthentication { + if obj.obj.Authentication == nil { + obj.obj.Authentication = NewIsisInterfaceAuthentication().msg() + } + if obj.authenticationHolder == nil { + obj.authenticationHolder = &isisInterfaceAuthentication{obj: obj.obj.Authentication} + } + return obj.authenticationHolder +} + +// The Circuit authentication method used for the interfaces on this emulated ISIS v4/v6 router. +// Authentication returns a IsisInterfaceAuthentication +func (obj *isisInterface) HasAuthentication() bool { + return obj.obj.Authentication != nil +} + +// The Circuit authentication method used for the interfaces on this emulated ISIS v4/v6 router. +// SetAuthentication sets the IsisInterfaceAuthentication value in the IsisInterface object +func (obj *isisInterface) SetAuthentication(value IsisInterfaceAuthentication) IsisInterface { + + obj.authenticationHolder = nil + obj.obj.Authentication = value.msg() + + return obj +} + +// Optional container for advanced interface properties. +// Advanced returns a IsisInterfaceAdvanced +func (obj *isisInterface) Advanced() IsisInterfaceAdvanced { + if obj.obj.Advanced == nil { + obj.obj.Advanced = NewIsisInterfaceAdvanced().msg() + } + if obj.advancedHolder == nil { + obj.advancedHolder = &isisInterfaceAdvanced{obj: obj.obj.Advanced} + } + return obj.advancedHolder +} + +// Optional container for advanced interface properties. +// Advanced returns a IsisInterfaceAdvanced +func (obj *isisInterface) HasAdvanced() bool { + return obj.obj.Advanced != nil +} + +// Optional container for advanced interface properties. +// SetAdvanced sets the IsisInterfaceAdvanced value in the IsisInterface object +func (obj *isisInterface) SetAdvanced(value IsisInterfaceAdvanced) IsisInterface { + + obj.advancedHolder = nil + obj.obj.Advanced = value.msg() + + return obj +} + +// Link protection on the ISIS link between two interfaces. +// LinkProtection returns a IsisInterfaceLinkProtection +func (obj *isisInterface) LinkProtection() IsisInterfaceLinkProtection { + if obj.obj.LinkProtection == nil { + obj.obj.LinkProtection = NewIsisInterfaceLinkProtection().msg() + } + if obj.linkProtectionHolder == nil { + obj.linkProtectionHolder = &isisInterfaceLinkProtection{obj: obj.obj.LinkProtection} + } + return obj.linkProtectionHolder +} + +// Link protection on the ISIS link between two interfaces. +// LinkProtection returns a IsisInterfaceLinkProtection +func (obj *isisInterface) HasLinkProtection() bool { + return obj.obj.LinkProtection != nil +} + +// Link protection on the ISIS link between two interfaces. +// SetLinkProtection sets the IsisInterfaceLinkProtection value in the IsisInterface object +func (obj *isisInterface) SetLinkProtection(value IsisInterfaceLinkProtection) IsisInterface { + + obj.linkProtectionHolder = nil + obj.obj.LinkProtection = value.msg() + + return obj +} + +// This contains list of SRLG values for the link between two interfaces. +// SrlgValues returns a []uint32 +func (obj *isisInterface) SrlgValues() []uint32 { + if obj.obj.SrlgValues == nil { + obj.obj.SrlgValues = make([]uint32, 0) + } + return obj.obj.SrlgValues +} + +// This contains list of SRLG values for the link between two interfaces. +// SetSrlgValues sets the []uint32 value in the IsisInterface object +func (obj *isisInterface) SetSrlgValues(value []uint32) IsisInterface { + + if obj.obj.SrlgValues == nil { + obj.obj.SrlgValues = make([]uint32, 0) + } + obj.obj.SrlgValues = value + + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *isisInterface) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the IsisInterface object +func (obj *isisInterface) SetName(value string) IsisInterface { + + obj.obj.Name = &value + return obj +} + +func (obj *isisInterface) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // EthName is required + if obj.obj.EthName == nil { + vObj.validationErrors = append(vObj.validationErrors, "EthName is required field on interface IsisInterface") + } + + if obj.obj.Metric != nil { + + if *obj.obj.Metric > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= IsisInterface.Metric <= 16777215 but Got %d", *obj.obj.Metric)) + } + + } + + if obj.obj.L1Settings != nil { + + obj.L1Settings().validateObj(vObj, set_default) + } + + if obj.obj.L2Settings != nil { + + obj.L2Settings().validateObj(vObj, set_default) + } + + if len(obj.obj.MultiTopologyIds) != 0 { + + if set_default { + obj.MultiTopologyIds().clearHolderSlice() + for _, item := range obj.obj.MultiTopologyIds { + obj.MultiTopologyIds().appendHolderSlice(&isisMT{obj: item}) + } + } + for _, item := range obj.MultiTopologyIds().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.TrafficEngineering) != 0 { + + if set_default { + obj.TrafficEngineering().clearHolderSlice() + for _, item := range obj.obj.TrafficEngineering { + obj.TrafficEngineering().appendHolderSlice(&linkStateTE{obj: item}) + } + } + for _, item := range obj.TrafficEngineering().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Authentication != nil { + + obj.Authentication().validateObj(vObj, set_default) + } + + if obj.obj.Advanced != nil { + + obj.Advanced().validateObj(vObj, set_default) + } + + if obj.obj.LinkProtection != nil { + + obj.LinkProtection().validateObj(vObj, set_default) + } + + if obj.obj.SrlgValues != nil { + + for _, item := range obj.obj.SrlgValues { + if item > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= IsisInterface.SrlgValues <= 16777215 but Got %d", item)) + } + + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface IsisInterface") + } +} + +func (obj *isisInterface) setDefault() { + if obj.obj.Metric == nil { + obj.SetMetric(10) + } + if obj.obj.NetworkType == nil { + obj.SetNetworkType(IsisInterfaceNetworkType.BROADCAST) + + } + if obj.obj.LevelType == nil { + obj.SetLevelType(IsisInterfaceLevelType.LEVEL_2) + + } + +} diff --git a/gosnappi/isis_interface_advanced.go b/gosnappi/isis_interface_advanced.go new file mode 100644 index 00000000..9367cd13 --- /dev/null +++ b/gosnappi/isis_interface_advanced.go @@ -0,0 +1,451 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisInterfaceAdvanced ***** +type isisInterfaceAdvanced struct { + validation + obj *otg.IsisInterfaceAdvanced + marshaller marshalIsisInterfaceAdvanced + unMarshaller unMarshalIsisInterfaceAdvanced +} + +func NewIsisInterfaceAdvanced() IsisInterfaceAdvanced { + obj := isisInterfaceAdvanced{obj: &otg.IsisInterfaceAdvanced{}} + obj.setDefault() + return &obj +} + +func (obj *isisInterfaceAdvanced) msg() *otg.IsisInterfaceAdvanced { + return obj.obj +} + +func (obj *isisInterfaceAdvanced) setMsg(msg *otg.IsisInterfaceAdvanced) IsisInterfaceAdvanced { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisInterfaceAdvanced struct { + obj *isisInterfaceAdvanced +} + +type marshalIsisInterfaceAdvanced interface { + // ToProto marshals IsisInterfaceAdvanced to protobuf object *otg.IsisInterfaceAdvanced + ToProto() (*otg.IsisInterfaceAdvanced, error) + // ToPbText marshals IsisInterfaceAdvanced to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisInterfaceAdvanced to YAML text + ToYaml() (string, error) + // ToJson marshals IsisInterfaceAdvanced to JSON text + ToJson() (string, error) +} + +type unMarshalisisInterfaceAdvanced struct { + obj *isisInterfaceAdvanced +} + +type unMarshalIsisInterfaceAdvanced interface { + // FromProto unmarshals IsisInterfaceAdvanced from protobuf object *otg.IsisInterfaceAdvanced + FromProto(msg *otg.IsisInterfaceAdvanced) (IsisInterfaceAdvanced, error) + // FromPbText unmarshals IsisInterfaceAdvanced from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisInterfaceAdvanced from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisInterfaceAdvanced from JSON text + FromJson(value string) error +} + +func (obj *isisInterfaceAdvanced) Marshal() marshalIsisInterfaceAdvanced { + if obj.marshaller == nil { + obj.marshaller = &marshalisisInterfaceAdvanced{obj: obj} + } + return obj.marshaller +} + +func (obj *isisInterfaceAdvanced) Unmarshal() unMarshalIsisInterfaceAdvanced { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisInterfaceAdvanced{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisInterfaceAdvanced) ToProto() (*otg.IsisInterfaceAdvanced, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisInterfaceAdvanced) FromProto(msg *otg.IsisInterfaceAdvanced) (IsisInterfaceAdvanced, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisInterfaceAdvanced) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisInterfaceAdvanced) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisInterfaceAdvanced) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisInterfaceAdvanced) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisInterfaceAdvanced) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisInterfaceAdvanced) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisInterfaceAdvanced) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisInterfaceAdvanced) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisInterfaceAdvanced) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisInterfaceAdvanced) Clone() (IsisInterfaceAdvanced, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisInterfaceAdvanced() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisInterfaceAdvanced is optional container for advanced interface properties. +type IsisInterfaceAdvanced interface { + Validation + // msg marshals IsisInterfaceAdvanced to protobuf object *otg.IsisInterfaceAdvanced + // and doesn't set defaults + msg() *otg.IsisInterfaceAdvanced + // setMsg unmarshals IsisInterfaceAdvanced from protobuf object *otg.IsisInterfaceAdvanced + // and doesn't set defaults + setMsg(*otg.IsisInterfaceAdvanced) IsisInterfaceAdvanced + // provides marshal interface + Marshal() marshalIsisInterfaceAdvanced + // provides unmarshal interface + Unmarshal() unMarshalIsisInterfaceAdvanced + // validate validates IsisInterfaceAdvanced + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisInterfaceAdvanced, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // AutoAdjustMtu returns bool, set in IsisInterfaceAdvanced. + AutoAdjustMtu() bool + // SetAutoAdjustMtu assigns bool provided by user to IsisInterfaceAdvanced + SetAutoAdjustMtu(value bool) IsisInterfaceAdvanced + // HasAutoAdjustMtu checks if AutoAdjustMtu has been set in IsisInterfaceAdvanced + HasAutoAdjustMtu() bool + // AutoAdjustArea returns bool, set in IsisInterfaceAdvanced. + AutoAdjustArea() bool + // SetAutoAdjustArea assigns bool provided by user to IsisInterfaceAdvanced + SetAutoAdjustArea(value bool) IsisInterfaceAdvanced + // HasAutoAdjustArea checks if AutoAdjustArea has been set in IsisInterfaceAdvanced + HasAutoAdjustArea() bool + // AutoAdjustSupportedProtocols returns bool, set in IsisInterfaceAdvanced. + AutoAdjustSupportedProtocols() bool + // SetAutoAdjustSupportedProtocols assigns bool provided by user to IsisInterfaceAdvanced + SetAutoAdjustSupportedProtocols(value bool) IsisInterfaceAdvanced + // HasAutoAdjustSupportedProtocols checks if AutoAdjustSupportedProtocols has been set in IsisInterfaceAdvanced + HasAutoAdjustSupportedProtocols() bool + // Enable3WayHandshake returns bool, set in IsisInterfaceAdvanced. + Enable3WayHandshake() bool + // SetEnable3WayHandshake assigns bool provided by user to IsisInterfaceAdvanced + SetEnable3WayHandshake(value bool) IsisInterfaceAdvanced + // HasEnable3WayHandshake checks if Enable3WayHandshake has been set in IsisInterfaceAdvanced + HasEnable3WayHandshake() bool + // P2PHellosToUnicastMac returns bool, set in IsisInterfaceAdvanced. + P2PHellosToUnicastMac() bool + // SetP2PHellosToUnicastMac assigns bool provided by user to IsisInterfaceAdvanced + SetP2PHellosToUnicastMac(value bool) IsisInterfaceAdvanced + // HasP2PHellosToUnicastMac checks if P2PHellosToUnicastMac has been set in IsisInterfaceAdvanced + HasP2PHellosToUnicastMac() bool +} + +// If a padded Hello message is received on the interface, the length of +// the Hello packets sent out on that interface is adjusted to match. +// AutoAdjustMtu returns a bool +func (obj *isisInterfaceAdvanced) AutoAdjustMtu() bool { + + return *obj.obj.AutoAdjustMtu + +} + +// If a padded Hello message is received on the interface, the length of +// the Hello packets sent out on that interface is adjusted to match. +// AutoAdjustMtu returns a bool +func (obj *isisInterfaceAdvanced) HasAutoAdjustMtu() bool { + return obj.obj.AutoAdjustMtu != nil +} + +// If a padded Hello message is received on the interface, the length of +// the Hello packets sent out on that interface is adjusted to match. +// SetAutoAdjustMtu sets the bool value in the IsisInterfaceAdvanced object +func (obj *isisInterfaceAdvanced) SetAutoAdjustMtu(value bool) IsisInterfaceAdvanced { + + obj.obj.AutoAdjustMtu = &value + return obj +} + +// If a Level 1 Hello is received on this emulated router for an area +// not currently in its area list, an area from the received Hello is +// added to that list. This ensures an area match for all future +// Level 1 Hellos from the source L1 router. +// AutoAdjustArea returns a bool +func (obj *isisInterfaceAdvanced) AutoAdjustArea() bool { + + return *obj.obj.AutoAdjustArea + +} + +// If a Level 1 Hello is received on this emulated router for an area +// not currently in its area list, an area from the received Hello is +// added to that list. This ensures an area match for all future +// Level 1 Hellos from the source L1 router. +// AutoAdjustArea returns a bool +func (obj *isisInterfaceAdvanced) HasAutoAdjustArea() bool { + return obj.obj.AutoAdjustArea != nil +} + +// If a Level 1 Hello is received on this emulated router for an area +// not currently in its area list, an area from the received Hello is +// added to that list. This ensures an area match for all future +// Level 1 Hellos from the source L1 router. +// SetAutoAdjustArea sets the bool value in the IsisInterfaceAdvanced object +func (obj *isisInterfaceAdvanced) SetAutoAdjustArea(value bool) IsisInterfaceAdvanced { + + obj.obj.AutoAdjustArea = &value + return obj +} + +// If a Hello message listing supported protocols is received on this +// emulated router, the supported protocols advertised by this router +// are changed to match exactly. +// AutoAdjustSupportedProtocols returns a bool +func (obj *isisInterfaceAdvanced) AutoAdjustSupportedProtocols() bool { + + return *obj.obj.AutoAdjustSupportedProtocols + +} + +// If a Hello message listing supported protocols is received on this +// emulated router, the supported protocols advertised by this router +// are changed to match exactly. +// AutoAdjustSupportedProtocols returns a bool +func (obj *isisInterfaceAdvanced) HasAutoAdjustSupportedProtocols() bool { + return obj.obj.AutoAdjustSupportedProtocols != nil +} + +// If a Hello message listing supported protocols is received on this +// emulated router, the supported protocols advertised by this router +// are changed to match exactly. +// SetAutoAdjustSupportedProtocols sets the bool value in the IsisInterfaceAdvanced object +func (obj *isisInterfaceAdvanced) SetAutoAdjustSupportedProtocols(value bool) IsisInterfaceAdvanced { + + obj.obj.AutoAdjustSupportedProtocols = &value + return obj +} + +// If it is true, the Point-to-Point circuit will include 3-way TLV in its Point-to-Point IIH and attempt to establish the adjacency as specified in RFC 5303. This field is not applicable if network_type is set to 'broadcast' type in ISIS interface. +// Enable3WayHandshake returns a bool +func (obj *isisInterfaceAdvanced) Enable3WayHandshake() bool { + + return *obj.obj.Enable_3WayHandshake + +} + +// If it is true, the Point-to-Point circuit will include 3-way TLV in its Point-to-Point IIH and attempt to establish the adjacency as specified in RFC 5303. This field is not applicable if network_type is set to 'broadcast' type in ISIS interface. +// Enable3WayHandshake returns a bool +func (obj *isisInterfaceAdvanced) HasEnable3WayHandshake() bool { + return obj.obj.Enable_3WayHandshake != nil +} + +// If it is true, the Point-to-Point circuit will include 3-way TLV in its Point-to-Point IIH and attempt to establish the adjacency as specified in RFC 5303. This field is not applicable if network_type is set to 'broadcast' type in ISIS interface. +// SetEnable3WayHandshake sets the bool value in the IsisInterfaceAdvanced object +func (obj *isisInterfaceAdvanced) SetEnable3WayHandshake(value bool) IsisInterfaceAdvanced { + + obj.obj.Enable_3WayHandshake = &value + return obj +} + +// If it is true, the Point-to-Point Hello messages will be sent to the unicast MAC address. +// P2PHellosToUnicastMac returns a bool +func (obj *isisInterfaceAdvanced) P2PHellosToUnicastMac() bool { + + return *obj.obj.P2PHellosToUnicastMac + +} + +// If it is true, the Point-to-Point Hello messages will be sent to the unicast MAC address. +// P2PHellosToUnicastMac returns a bool +func (obj *isisInterfaceAdvanced) HasP2PHellosToUnicastMac() bool { + return obj.obj.P2PHellosToUnicastMac != nil +} + +// If it is true, the Point-to-Point Hello messages will be sent to the unicast MAC address. +// SetP2PHellosToUnicastMac sets the bool value in the IsisInterfaceAdvanced object +func (obj *isisInterfaceAdvanced) SetP2PHellosToUnicastMac(value bool) IsisInterfaceAdvanced { + + obj.obj.P2PHellosToUnicastMac = &value + return obj +} + +func (obj *isisInterfaceAdvanced) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *isisInterfaceAdvanced) setDefault() { + if obj.obj.AutoAdjustMtu == nil { + obj.SetAutoAdjustMtu(true) + } + if obj.obj.AutoAdjustArea == nil { + obj.SetAutoAdjustArea(true) + } + if obj.obj.AutoAdjustSupportedProtocols == nil { + obj.SetAutoAdjustSupportedProtocols(false) + } + if obj.obj.Enable_3WayHandshake == nil { + obj.SetEnable3WayHandshake(true) + } + if obj.obj.P2PHellosToUnicastMac == nil { + obj.SetP2PHellosToUnicastMac(false) + } + +} diff --git a/gosnappi/isis_interface_authentication.go b/gosnappi/isis_interface_authentication.go new file mode 100644 index 00000000..ba833523 --- /dev/null +++ b/gosnappi/isis_interface_authentication.go @@ -0,0 +1,395 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisInterfaceAuthentication ***** +type isisInterfaceAuthentication struct { + validation + obj *otg.IsisInterfaceAuthentication + marshaller marshalIsisInterfaceAuthentication + unMarshaller unMarshalIsisInterfaceAuthentication +} + +func NewIsisInterfaceAuthentication() IsisInterfaceAuthentication { + obj := isisInterfaceAuthentication{obj: &otg.IsisInterfaceAuthentication{}} + obj.setDefault() + return &obj +} + +func (obj *isisInterfaceAuthentication) msg() *otg.IsisInterfaceAuthentication { + return obj.obj +} + +func (obj *isisInterfaceAuthentication) setMsg(msg *otg.IsisInterfaceAuthentication) IsisInterfaceAuthentication { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisInterfaceAuthentication struct { + obj *isisInterfaceAuthentication +} + +type marshalIsisInterfaceAuthentication interface { + // ToProto marshals IsisInterfaceAuthentication to protobuf object *otg.IsisInterfaceAuthentication + ToProto() (*otg.IsisInterfaceAuthentication, error) + // ToPbText marshals IsisInterfaceAuthentication to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisInterfaceAuthentication to YAML text + ToYaml() (string, error) + // ToJson marshals IsisInterfaceAuthentication to JSON text + ToJson() (string, error) +} + +type unMarshalisisInterfaceAuthentication struct { + obj *isisInterfaceAuthentication +} + +type unMarshalIsisInterfaceAuthentication interface { + // FromProto unmarshals IsisInterfaceAuthentication from protobuf object *otg.IsisInterfaceAuthentication + FromProto(msg *otg.IsisInterfaceAuthentication) (IsisInterfaceAuthentication, error) + // FromPbText unmarshals IsisInterfaceAuthentication from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisInterfaceAuthentication from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisInterfaceAuthentication from JSON text + FromJson(value string) error +} + +func (obj *isisInterfaceAuthentication) Marshal() marshalIsisInterfaceAuthentication { + if obj.marshaller == nil { + obj.marshaller = &marshalisisInterfaceAuthentication{obj: obj} + } + return obj.marshaller +} + +func (obj *isisInterfaceAuthentication) Unmarshal() unMarshalIsisInterfaceAuthentication { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisInterfaceAuthentication{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisInterfaceAuthentication) ToProto() (*otg.IsisInterfaceAuthentication, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisInterfaceAuthentication) FromProto(msg *otg.IsisInterfaceAuthentication) (IsisInterfaceAuthentication, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisInterfaceAuthentication) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisInterfaceAuthentication) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisInterfaceAuthentication) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisInterfaceAuthentication) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisInterfaceAuthentication) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisInterfaceAuthentication) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisInterfaceAuthentication) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisInterfaceAuthentication) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisInterfaceAuthentication) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisInterfaceAuthentication) Clone() (IsisInterfaceAuthentication, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisInterfaceAuthentication() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisInterfaceAuthentication is optional container for circuit authentication properties. +type IsisInterfaceAuthentication interface { + Validation + // msg marshals IsisInterfaceAuthentication to protobuf object *otg.IsisInterfaceAuthentication + // and doesn't set defaults + msg() *otg.IsisInterfaceAuthentication + // setMsg unmarshals IsisInterfaceAuthentication from protobuf object *otg.IsisInterfaceAuthentication + // and doesn't set defaults + setMsg(*otg.IsisInterfaceAuthentication) IsisInterfaceAuthentication + // provides marshal interface + Marshal() marshalIsisInterfaceAuthentication + // provides unmarshal interface + Unmarshal() unMarshalIsisInterfaceAuthentication + // validate validates IsisInterfaceAuthentication + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisInterfaceAuthentication, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // AuthType returns IsisInterfaceAuthenticationAuthTypeEnum, set in IsisInterfaceAuthentication + AuthType() IsisInterfaceAuthenticationAuthTypeEnum + // SetAuthType assigns IsisInterfaceAuthenticationAuthTypeEnum provided by user to IsisInterfaceAuthentication + SetAuthType(value IsisInterfaceAuthenticationAuthTypeEnum) IsisInterfaceAuthentication + // Md5 returns string, set in IsisInterfaceAuthentication. + Md5() string + // SetMd5 assigns string provided by user to IsisInterfaceAuthentication + SetMd5(value string) IsisInterfaceAuthentication + // HasMd5 checks if Md5 has been set in IsisInterfaceAuthentication + HasMd5() bool + // Password returns string, set in IsisInterfaceAuthentication. + Password() string + // SetPassword assigns string provided by user to IsisInterfaceAuthentication + SetPassword(value string) IsisInterfaceAuthentication + // HasPassword checks if Password has been set in IsisInterfaceAuthentication + HasPassword() bool +} + +type IsisInterfaceAuthenticationAuthTypeEnum string + +// Enum of AuthType on IsisInterfaceAuthentication +var IsisInterfaceAuthenticationAuthType = struct { + MD5 IsisInterfaceAuthenticationAuthTypeEnum + PASSWORD IsisInterfaceAuthenticationAuthTypeEnum +}{ + MD5: IsisInterfaceAuthenticationAuthTypeEnum("md5"), + PASSWORD: IsisInterfaceAuthenticationAuthTypeEnum("password"), +} + +func (obj *isisInterfaceAuthentication) AuthType() IsisInterfaceAuthenticationAuthTypeEnum { + return IsisInterfaceAuthenticationAuthTypeEnum(obj.obj.AuthType.Enum().String()) +} + +func (obj *isisInterfaceAuthentication) SetAuthType(value IsisInterfaceAuthenticationAuthTypeEnum) IsisInterfaceAuthentication { + intValue, ok := otg.IsisInterfaceAuthentication_AuthType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on IsisInterfaceAuthenticationAuthTypeEnum", string(value))) + return obj + } + enumValue := otg.IsisInterfaceAuthentication_AuthType_Enum(intValue) + obj.obj.AuthType = &enumValue + + return obj +} + +// MD5 key to be used for authentication. +// Md5 returns a string +func (obj *isisInterfaceAuthentication) Md5() string { + + return *obj.obj.Md5 + +} + +// MD5 key to be used for authentication. +// Md5 returns a string +func (obj *isisInterfaceAuthentication) HasMd5() bool { + return obj.obj.Md5 != nil +} + +// MD5 key to be used for authentication. +// SetMd5 sets the string value in the IsisInterfaceAuthentication object +func (obj *isisInterfaceAuthentication) SetMd5(value string) IsisInterfaceAuthentication { + + obj.obj.Md5 = &value + return obj +} + +// The password, in clear text, to be used for Authentication. +// Password returns a string +func (obj *isisInterfaceAuthentication) Password() string { + + return *obj.obj.Password + +} + +// The password, in clear text, to be used for Authentication. +// Password returns a string +func (obj *isisInterfaceAuthentication) HasPassword() bool { + return obj.obj.Password != nil +} + +// The password, in clear text, to be used for Authentication. +// SetPassword sets the string value in the IsisInterfaceAuthentication object +func (obj *isisInterfaceAuthentication) SetPassword(value string) IsisInterfaceAuthentication { + + obj.obj.Password = &value + return obj +} + +func (obj *isisInterfaceAuthentication) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // AuthType is required + if obj.obj.AuthType == nil { + vObj.validationErrors = append(vObj.validationErrors, "AuthType is required field on interface IsisInterfaceAuthentication") + } + + if obj.obj.Md5 != nil { + + if len(*obj.obj.Md5) < 0 || len(*obj.obj.Md5) > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of IsisInterfaceAuthentication.Md5 <= 255 but Got %d", + len(*obj.obj.Md5))) + } + + } + + if obj.obj.Password != nil { + + if len(*obj.obj.Password) < 0 || len(*obj.obj.Password) > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of IsisInterfaceAuthentication.Password <= 255 but Got %d", + len(*obj.obj.Password))) + } + + } + +} + +func (obj *isisInterfaceAuthentication) setDefault() { + +} diff --git a/gosnappi/isis_interface_level.go b/gosnappi/isis_interface_level.go new file mode 100644 index 00000000..0100c04a --- /dev/null +++ b/gosnappi/isis_interface_level.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisInterfaceLevel ***** +type isisInterfaceLevel struct { + validation + obj *otg.IsisInterfaceLevel + marshaller marshalIsisInterfaceLevel + unMarshaller unMarshalIsisInterfaceLevel +} + +func NewIsisInterfaceLevel() IsisInterfaceLevel { + obj := isisInterfaceLevel{obj: &otg.IsisInterfaceLevel{}} + obj.setDefault() + return &obj +} + +func (obj *isisInterfaceLevel) msg() *otg.IsisInterfaceLevel { + return obj.obj +} + +func (obj *isisInterfaceLevel) setMsg(msg *otg.IsisInterfaceLevel) IsisInterfaceLevel { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisInterfaceLevel struct { + obj *isisInterfaceLevel +} + +type marshalIsisInterfaceLevel interface { + // ToProto marshals IsisInterfaceLevel to protobuf object *otg.IsisInterfaceLevel + ToProto() (*otg.IsisInterfaceLevel, error) + // ToPbText marshals IsisInterfaceLevel to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisInterfaceLevel to YAML text + ToYaml() (string, error) + // ToJson marshals IsisInterfaceLevel to JSON text + ToJson() (string, error) +} + +type unMarshalisisInterfaceLevel struct { + obj *isisInterfaceLevel +} + +type unMarshalIsisInterfaceLevel interface { + // FromProto unmarshals IsisInterfaceLevel from protobuf object *otg.IsisInterfaceLevel + FromProto(msg *otg.IsisInterfaceLevel) (IsisInterfaceLevel, error) + // FromPbText unmarshals IsisInterfaceLevel from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisInterfaceLevel from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisInterfaceLevel from JSON text + FromJson(value string) error +} + +func (obj *isisInterfaceLevel) Marshal() marshalIsisInterfaceLevel { + if obj.marshaller == nil { + obj.marshaller = &marshalisisInterfaceLevel{obj: obj} + } + return obj.marshaller +} + +func (obj *isisInterfaceLevel) Unmarshal() unMarshalIsisInterfaceLevel { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisInterfaceLevel{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisInterfaceLevel) ToProto() (*otg.IsisInterfaceLevel, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisInterfaceLevel) FromProto(msg *otg.IsisInterfaceLevel) (IsisInterfaceLevel, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisInterfaceLevel) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisInterfaceLevel) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisInterfaceLevel) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisInterfaceLevel) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisInterfaceLevel) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisInterfaceLevel) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisInterfaceLevel) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisInterfaceLevel) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisInterfaceLevel) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisInterfaceLevel) Clone() (IsisInterfaceLevel, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisInterfaceLevel() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisInterfaceLevel is configuration for the properties of Level 1 Hello. +type IsisInterfaceLevel interface { + Validation + // msg marshals IsisInterfaceLevel to protobuf object *otg.IsisInterfaceLevel + // and doesn't set defaults + msg() *otg.IsisInterfaceLevel + // setMsg unmarshals IsisInterfaceLevel from protobuf object *otg.IsisInterfaceLevel + // and doesn't set defaults + setMsg(*otg.IsisInterfaceLevel) IsisInterfaceLevel + // provides marshal interface + Marshal() marshalIsisInterfaceLevel + // provides unmarshal interface + Unmarshal() unMarshalIsisInterfaceLevel + // validate validates IsisInterfaceLevel + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisInterfaceLevel, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Priority returns uint32, set in IsisInterfaceLevel. + Priority() uint32 + // SetPriority assigns uint32 provided by user to IsisInterfaceLevel + SetPriority(value uint32) IsisInterfaceLevel + // HasPriority checks if Priority has been set in IsisInterfaceLevel + HasPriority() bool + // HelloInterval returns uint32, set in IsisInterfaceLevel. + HelloInterval() uint32 + // SetHelloInterval assigns uint32 provided by user to IsisInterfaceLevel + SetHelloInterval(value uint32) IsisInterfaceLevel + // HasHelloInterval checks if HelloInterval has been set in IsisInterfaceLevel + HasHelloInterval() bool + // DeadInterval returns uint32, set in IsisInterfaceLevel. + DeadInterval() uint32 + // SetDeadInterval assigns uint32 provided by user to IsisInterfaceLevel + SetDeadInterval(value uint32) IsisInterfaceLevel + // HasDeadInterval checks if DeadInterval has been set in IsisInterfaceLevel + HasDeadInterval() bool +} + +// The Priority setting in Level 1 LAN Hellos for Designated Router election. +// Priority returns a uint32 +func (obj *isisInterfaceLevel) Priority() uint32 { + + return *obj.obj.Priority + +} + +// The Priority setting in Level 1 LAN Hellos for Designated Router election. +// Priority returns a uint32 +func (obj *isisInterfaceLevel) HasPriority() bool { + return obj.obj.Priority != nil +} + +// The Priority setting in Level 1 LAN Hellos for Designated Router election. +// SetPriority sets the uint32 value in the IsisInterfaceLevel object +func (obj *isisInterfaceLevel) SetPriority(value uint32) IsisInterfaceLevel { + + obj.obj.Priority = &value + return obj +} + +// The Hello interval for Level 1 Hello messages, in seconds. +// HelloInterval returns a uint32 +func (obj *isisInterfaceLevel) HelloInterval() uint32 { + + return *obj.obj.HelloInterval + +} + +// The Hello interval for Level 1 Hello messages, in seconds. +// HelloInterval returns a uint32 +func (obj *isisInterfaceLevel) HasHelloInterval() bool { + return obj.obj.HelloInterval != nil +} + +// The Hello interval for Level 1 Hello messages, in seconds. +// SetHelloInterval sets the uint32 value in the IsisInterfaceLevel object +func (obj *isisInterfaceLevel) SetHelloInterval(value uint32) IsisInterfaceLevel { + + obj.obj.HelloInterval = &value + return obj +} + +// The Dead (Holding Time) interval for Level 1 Hello messages, in seconds. +// DeadInterval returns a uint32 +func (obj *isisInterfaceLevel) DeadInterval() uint32 { + + return *obj.obj.DeadInterval + +} + +// The Dead (Holding Time) interval for Level 1 Hello messages, in seconds. +// DeadInterval returns a uint32 +func (obj *isisInterfaceLevel) HasDeadInterval() bool { + return obj.obj.DeadInterval != nil +} + +// The Dead (Holding Time) interval for Level 1 Hello messages, in seconds. +// SetDeadInterval sets the uint32 value in the IsisInterfaceLevel object +func (obj *isisInterfaceLevel) SetDeadInterval(value uint32) IsisInterfaceLevel { + + obj.obj.DeadInterval = &value + return obj +} + +func (obj *isisInterfaceLevel) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *isisInterfaceLevel) setDefault() { + if obj.obj.Priority == nil { + obj.SetPriority(0) + } + if obj.obj.HelloInterval == nil { + obj.SetHelloInterval(10) + } + if obj.obj.DeadInterval == nil { + obj.SetDeadInterval(30) + } + +} diff --git a/gosnappi/isis_interface_link_protection.go b/gosnappi/isis_interface_link_protection.go new file mode 100644 index 00000000..9531a35a --- /dev/null +++ b/gosnappi/isis_interface_link_protection.go @@ -0,0 +1,553 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisInterfaceLinkProtection ***** +type isisInterfaceLinkProtection struct { + validation + obj *otg.IsisInterfaceLinkProtection + marshaller marshalIsisInterfaceLinkProtection + unMarshaller unMarshalIsisInterfaceLinkProtection +} + +func NewIsisInterfaceLinkProtection() IsisInterfaceLinkProtection { + obj := isisInterfaceLinkProtection{obj: &otg.IsisInterfaceLinkProtection{}} + obj.setDefault() + return &obj +} + +func (obj *isisInterfaceLinkProtection) msg() *otg.IsisInterfaceLinkProtection { + return obj.obj +} + +func (obj *isisInterfaceLinkProtection) setMsg(msg *otg.IsisInterfaceLinkProtection) IsisInterfaceLinkProtection { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisInterfaceLinkProtection struct { + obj *isisInterfaceLinkProtection +} + +type marshalIsisInterfaceLinkProtection interface { + // ToProto marshals IsisInterfaceLinkProtection to protobuf object *otg.IsisInterfaceLinkProtection + ToProto() (*otg.IsisInterfaceLinkProtection, error) + // ToPbText marshals IsisInterfaceLinkProtection to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisInterfaceLinkProtection to YAML text + ToYaml() (string, error) + // ToJson marshals IsisInterfaceLinkProtection to JSON text + ToJson() (string, error) +} + +type unMarshalisisInterfaceLinkProtection struct { + obj *isisInterfaceLinkProtection +} + +type unMarshalIsisInterfaceLinkProtection interface { + // FromProto unmarshals IsisInterfaceLinkProtection from protobuf object *otg.IsisInterfaceLinkProtection + FromProto(msg *otg.IsisInterfaceLinkProtection) (IsisInterfaceLinkProtection, error) + // FromPbText unmarshals IsisInterfaceLinkProtection from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisInterfaceLinkProtection from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisInterfaceLinkProtection from JSON text + FromJson(value string) error +} + +func (obj *isisInterfaceLinkProtection) Marshal() marshalIsisInterfaceLinkProtection { + if obj.marshaller == nil { + obj.marshaller = &marshalisisInterfaceLinkProtection{obj: obj} + } + return obj.marshaller +} + +func (obj *isisInterfaceLinkProtection) Unmarshal() unMarshalIsisInterfaceLinkProtection { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisInterfaceLinkProtection{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisInterfaceLinkProtection) ToProto() (*otg.IsisInterfaceLinkProtection, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisInterfaceLinkProtection) FromProto(msg *otg.IsisInterfaceLinkProtection) (IsisInterfaceLinkProtection, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisInterfaceLinkProtection) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisInterfaceLinkProtection) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisInterfaceLinkProtection) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisInterfaceLinkProtection) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisInterfaceLinkProtection) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisInterfaceLinkProtection) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisInterfaceLinkProtection) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisInterfaceLinkProtection) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisInterfaceLinkProtection) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisInterfaceLinkProtection) Clone() (IsisInterfaceLinkProtection, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisInterfaceLinkProtection() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisInterfaceLinkProtection is optional container for the link protection sub TLV (type 20). +type IsisInterfaceLinkProtection interface { + Validation + // msg marshals IsisInterfaceLinkProtection to protobuf object *otg.IsisInterfaceLinkProtection + // and doesn't set defaults + msg() *otg.IsisInterfaceLinkProtection + // setMsg unmarshals IsisInterfaceLinkProtection from protobuf object *otg.IsisInterfaceLinkProtection + // and doesn't set defaults + setMsg(*otg.IsisInterfaceLinkProtection) IsisInterfaceLinkProtection + // provides marshal interface + Marshal() marshalIsisInterfaceLinkProtection + // provides unmarshal interface + Unmarshal() unMarshalIsisInterfaceLinkProtection + // validate validates IsisInterfaceLinkProtection + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisInterfaceLinkProtection, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ExtraTraffic returns bool, set in IsisInterfaceLinkProtection. + ExtraTraffic() bool + // SetExtraTraffic assigns bool provided by user to IsisInterfaceLinkProtection + SetExtraTraffic(value bool) IsisInterfaceLinkProtection + // HasExtraTraffic checks if ExtraTraffic has been set in IsisInterfaceLinkProtection + HasExtraTraffic() bool + // Unprotected returns bool, set in IsisInterfaceLinkProtection. + Unprotected() bool + // SetUnprotected assigns bool provided by user to IsisInterfaceLinkProtection + SetUnprotected(value bool) IsisInterfaceLinkProtection + // HasUnprotected checks if Unprotected has been set in IsisInterfaceLinkProtection + HasUnprotected() bool + // Shared returns bool, set in IsisInterfaceLinkProtection. + Shared() bool + // SetShared assigns bool provided by user to IsisInterfaceLinkProtection + SetShared(value bool) IsisInterfaceLinkProtection + // HasShared checks if Shared has been set in IsisInterfaceLinkProtection + HasShared() bool + // Dedicated1To1 returns bool, set in IsisInterfaceLinkProtection. + Dedicated1To1() bool + // SetDedicated1To1 assigns bool provided by user to IsisInterfaceLinkProtection + SetDedicated1To1(value bool) IsisInterfaceLinkProtection + // HasDedicated1To1 checks if Dedicated1To1 has been set in IsisInterfaceLinkProtection + HasDedicated1To1() bool + // Dedicated1Plus1 returns bool, set in IsisInterfaceLinkProtection. + Dedicated1Plus1() bool + // SetDedicated1Plus1 assigns bool provided by user to IsisInterfaceLinkProtection + SetDedicated1Plus1(value bool) IsisInterfaceLinkProtection + // HasDedicated1Plus1 checks if Dedicated1Plus1 has been set in IsisInterfaceLinkProtection + HasDedicated1Plus1() bool + // Enhanced returns bool, set in IsisInterfaceLinkProtection. + Enhanced() bool + // SetEnhanced assigns bool provided by user to IsisInterfaceLinkProtection + SetEnhanced(value bool) IsisInterfaceLinkProtection + // HasEnhanced checks if Enhanced has been set in IsisInterfaceLinkProtection + HasEnhanced() bool + // Reserved40 returns bool, set in IsisInterfaceLinkProtection. + Reserved40() bool + // SetReserved40 assigns bool provided by user to IsisInterfaceLinkProtection + SetReserved40(value bool) IsisInterfaceLinkProtection + // HasReserved40 checks if Reserved40 has been set in IsisInterfaceLinkProtection + HasReserved40() bool + // Reserved80 returns bool, set in IsisInterfaceLinkProtection. + Reserved80() bool + // SetReserved80 assigns bool provided by user to IsisInterfaceLinkProtection + SetReserved80(value bool) IsisInterfaceLinkProtection + // HasReserved80 checks if Reserved80 has been set in IsisInterfaceLinkProtection + HasReserved80() bool +} + +// Enable this to protect other link or links. LSPs on a link of this type are lost +// if any of the links fail. +// ExtraTraffic returns a bool +func (obj *isisInterfaceLinkProtection) ExtraTraffic() bool { + + return *obj.obj.ExtraTraffic + +} + +// Enable this to protect other link or links. LSPs on a link of this type are lost +// if any of the links fail. +// ExtraTraffic returns a bool +func (obj *isisInterfaceLinkProtection) HasExtraTraffic() bool { + return obj.obj.ExtraTraffic != nil +} + +// Enable this to protect other link or links. LSPs on a link of this type are lost +// if any of the links fail. +// SetExtraTraffic sets the bool value in the IsisInterfaceLinkProtection object +func (obj *isisInterfaceLinkProtection) SetExtraTraffic(value bool) IsisInterfaceLinkProtection { + + obj.obj.ExtraTraffic = &value + return obj +} + +// Enabling this signifies that there is no other link protecting this +// link. LSPs on a link of this type are lost if the link fails. +// Unprotected returns a bool +func (obj *isisInterfaceLinkProtection) Unprotected() bool { + + return *obj.obj.Unprotected + +} + +// Enabling this signifies that there is no other link protecting this +// link. LSPs on a link of this type are lost if the link fails. +// Unprotected returns a bool +func (obj *isisInterfaceLinkProtection) HasUnprotected() bool { + return obj.obj.Unprotected != nil +} + +// Enabling this signifies that there is no other link protecting this +// link. LSPs on a link of this type are lost if the link fails. +// SetUnprotected sets the bool value in the IsisInterfaceLinkProtection object +func (obj *isisInterfaceLinkProtection) SetUnprotected(value bool) IsisInterfaceLinkProtection { + + obj.obj.Unprotected = &value + return obj +} + +// Enable this to share the Extra Traffic links between one or more +// links of type Shared.There are one or more disjoint links of type +// Extra Traffic that are protecting this link. +// Shared returns a bool +func (obj *isisInterfaceLinkProtection) Shared() bool { + + return *obj.obj.Shared + +} + +// Enable this to share the Extra Traffic links between one or more +// links of type Shared.There are one or more disjoint links of type +// Extra Traffic that are protecting this link. +// Shared returns a bool +func (obj *isisInterfaceLinkProtection) HasShared() bool { + return obj.obj.Shared != nil +} + +// Enable this to share the Extra Traffic links between one or more +// links of type Shared.There are one or more disjoint links of type +// Extra Traffic that are protecting this link. +// SetShared sets the bool value in the IsisInterfaceLinkProtection object +func (obj *isisInterfaceLinkProtection) SetShared(value bool) IsisInterfaceLinkProtection { + + obj.obj.Shared = &value + return obj +} + +// Enabling this signifies that there is one dedicated disjoint link +// of type Extra Traffic that is protecting this link. +// Dedicated1To1 returns a bool +func (obj *isisInterfaceLinkProtection) Dedicated1To1() bool { + + return *obj.obj.Dedicated_1To_1 + +} + +// Enabling this signifies that there is one dedicated disjoint link +// of type Extra Traffic that is protecting this link. +// Dedicated1To1 returns a bool +func (obj *isisInterfaceLinkProtection) HasDedicated1To1() bool { + return obj.obj.Dedicated_1To_1 != nil +} + +// Enabling this signifies that there is one dedicated disjoint link +// of type Extra Traffic that is protecting this link. +// SetDedicated1To1 sets the bool value in the IsisInterfaceLinkProtection object +func (obj *isisInterfaceLinkProtection) SetDedicated1To1(value bool) IsisInterfaceLinkProtection { + + obj.obj.Dedicated_1To_1 = &value + return obj +} + +// Enabling this signifies that a dedicated disjoint link is protecting +// this link. However, the protecting link is not advertised in the +// link state database and is therefore not available for the routing +// of LSPs. +// Dedicated1Plus1 returns a bool +func (obj *isisInterfaceLinkProtection) Dedicated1Plus1() bool { + + return *obj.obj.Dedicated_1Plus_1 + +} + +// Enabling this signifies that a dedicated disjoint link is protecting +// this link. However, the protecting link is not advertised in the +// link state database and is therefore not available for the routing +// of LSPs. +// Dedicated1Plus1 returns a bool +func (obj *isisInterfaceLinkProtection) HasDedicated1Plus1() bool { + return obj.obj.Dedicated_1Plus_1 != nil +} + +// Enabling this signifies that a dedicated disjoint link is protecting +// this link. However, the protecting link is not advertised in the +// link state database and is therefore not available for the routing +// of LSPs. +// SetDedicated1Plus1 sets the bool value in the IsisInterfaceLinkProtection object +func (obj *isisInterfaceLinkProtection) SetDedicated1Plus1(value bool) IsisInterfaceLinkProtection { + + obj.obj.Dedicated_1Plus_1 = &value + return obj +} + +// Enabling this signifies that a protection scheme that is more +// reliable than Dedicated 1+1. +// Enhanced returns a bool +func (obj *isisInterfaceLinkProtection) Enhanced() bool { + + return *obj.obj.Enhanced + +} + +// Enabling this signifies that a protection scheme that is more +// reliable than Dedicated 1+1. +// Enhanced returns a bool +func (obj *isisInterfaceLinkProtection) HasEnhanced() bool { + return obj.obj.Enhanced != nil +} + +// Enabling this signifies that a protection scheme that is more +// reliable than Dedicated 1+1. +// SetEnhanced sets the bool value in the IsisInterfaceLinkProtection object +func (obj *isisInterfaceLinkProtection) SetEnhanced(value bool) IsisInterfaceLinkProtection { + + obj.obj.Enhanced = &value + return obj +} + +// This is a Protection Scheme with value 0x40. +// Reserved40 returns a bool +func (obj *isisInterfaceLinkProtection) Reserved40() bool { + + return *obj.obj.Reserved_40 + +} + +// This is a Protection Scheme with value 0x40. +// Reserved40 returns a bool +func (obj *isisInterfaceLinkProtection) HasReserved40() bool { + return obj.obj.Reserved_40 != nil +} + +// This is a Protection Scheme with value 0x40. +// SetReserved40 sets the bool value in the IsisInterfaceLinkProtection object +func (obj *isisInterfaceLinkProtection) SetReserved40(value bool) IsisInterfaceLinkProtection { + + obj.obj.Reserved_40 = &value + return obj +} + +// This is a Protection Scheme with value 0x80. +// Reserved80 returns a bool +func (obj *isisInterfaceLinkProtection) Reserved80() bool { + + return *obj.obj.Reserved_80 + +} + +// This is a Protection Scheme with value 0x80. +// Reserved80 returns a bool +func (obj *isisInterfaceLinkProtection) HasReserved80() bool { + return obj.obj.Reserved_80 != nil +} + +// This is a Protection Scheme with value 0x80. +// SetReserved80 sets the bool value in the IsisInterfaceLinkProtection object +func (obj *isisInterfaceLinkProtection) SetReserved80(value bool) IsisInterfaceLinkProtection { + + obj.obj.Reserved_80 = &value + return obj +} + +func (obj *isisInterfaceLinkProtection) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *isisInterfaceLinkProtection) setDefault() { + if obj.obj.ExtraTraffic == nil { + obj.SetExtraTraffic(false) + } + if obj.obj.Unprotected == nil { + obj.SetUnprotected(false) + } + if obj.obj.Shared == nil { + obj.SetShared(false) + } + if obj.obj.Dedicated_1To_1 == nil { + obj.SetDedicated1To1(false) + } + if obj.obj.Dedicated_1Plus_1 == nil { + obj.SetDedicated1Plus1(false) + } + if obj.obj.Enhanced == nil { + obj.SetEnhanced(false) + } + if obj.obj.Reserved_40 == nil { + obj.SetReserved40(false) + } + if obj.obj.Reserved_80 == nil { + obj.SetReserved80(false) + } + +} diff --git a/gosnappi/isis_lsp_extended_ipv4_reachability_tlv.go b/gosnappi/isis_lsp_extended_ipv4_reachability_tlv.go new file mode 100644 index 00000000..72bfc219 --- /dev/null +++ b/gosnappi/isis_lsp_extended_ipv4_reachability_tlv.go @@ -0,0 +1,391 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspExtendedIpv4ReachabilityTlv ***** +type isisLspExtendedIpv4ReachabilityTlv struct { + validation + obj *otg.IsisLspExtendedIpv4ReachabilityTlv + marshaller marshalIsisLspExtendedIpv4ReachabilityTlv + unMarshaller unMarshalIsisLspExtendedIpv4ReachabilityTlv + prefixesHolder IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter +} + +func NewIsisLspExtendedIpv4ReachabilityTlv() IsisLspExtendedIpv4ReachabilityTlv { + obj := isisLspExtendedIpv4ReachabilityTlv{obj: &otg.IsisLspExtendedIpv4ReachabilityTlv{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspExtendedIpv4ReachabilityTlv) msg() *otg.IsisLspExtendedIpv4ReachabilityTlv { + return obj.obj +} + +func (obj *isisLspExtendedIpv4ReachabilityTlv) setMsg(msg *otg.IsisLspExtendedIpv4ReachabilityTlv) IsisLspExtendedIpv4ReachabilityTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspExtendedIpv4ReachabilityTlv struct { + obj *isisLspExtendedIpv4ReachabilityTlv +} + +type marshalIsisLspExtendedIpv4ReachabilityTlv interface { + // ToProto marshals IsisLspExtendedIpv4ReachabilityTlv to protobuf object *otg.IsisLspExtendedIpv4ReachabilityTlv + ToProto() (*otg.IsisLspExtendedIpv4ReachabilityTlv, error) + // ToPbText marshals IsisLspExtendedIpv4ReachabilityTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspExtendedIpv4ReachabilityTlv to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspExtendedIpv4ReachabilityTlv to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspExtendedIpv4ReachabilityTlv struct { + obj *isisLspExtendedIpv4ReachabilityTlv +} + +type unMarshalIsisLspExtendedIpv4ReachabilityTlv interface { + // FromProto unmarshals IsisLspExtendedIpv4ReachabilityTlv from protobuf object *otg.IsisLspExtendedIpv4ReachabilityTlv + FromProto(msg *otg.IsisLspExtendedIpv4ReachabilityTlv) (IsisLspExtendedIpv4ReachabilityTlv, error) + // FromPbText unmarshals IsisLspExtendedIpv4ReachabilityTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspExtendedIpv4ReachabilityTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspExtendedIpv4ReachabilityTlv from JSON text + FromJson(value string) error +} + +func (obj *isisLspExtendedIpv4ReachabilityTlv) Marshal() marshalIsisLspExtendedIpv4ReachabilityTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspExtendedIpv4ReachabilityTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspExtendedIpv4ReachabilityTlv) Unmarshal() unMarshalIsisLspExtendedIpv4ReachabilityTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspExtendedIpv4ReachabilityTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspExtendedIpv4ReachabilityTlv) ToProto() (*otg.IsisLspExtendedIpv4ReachabilityTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspExtendedIpv4ReachabilityTlv) FromProto(msg *otg.IsisLspExtendedIpv4ReachabilityTlv) (IsisLspExtendedIpv4ReachabilityTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspExtendedIpv4ReachabilityTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspExtendedIpv4ReachabilityTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspExtendedIpv4ReachabilityTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspExtendedIpv4ReachabilityTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspExtendedIpv4ReachabilityTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspExtendedIpv4ReachabilityTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspExtendedIpv4ReachabilityTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspExtendedIpv4ReachabilityTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspExtendedIpv4ReachabilityTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspExtendedIpv4ReachabilityTlv) Clone() (IsisLspExtendedIpv4ReachabilityTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspExtendedIpv4ReachabilityTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisLspExtendedIpv4ReachabilityTlv) setNil() { + obj.prefixesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisLspExtendedIpv4ReachabilityTlv is this container defines list of IPv4 extended reachability information in one Extended IPv4 External Reachability TLV. +// It is advertised when the 'wide metric' is enabled. +type IsisLspExtendedIpv4ReachabilityTlv interface { + Validation + // msg marshals IsisLspExtendedIpv4ReachabilityTlv to protobuf object *otg.IsisLspExtendedIpv4ReachabilityTlv + // and doesn't set defaults + msg() *otg.IsisLspExtendedIpv4ReachabilityTlv + // setMsg unmarshals IsisLspExtendedIpv4ReachabilityTlv from protobuf object *otg.IsisLspExtendedIpv4ReachabilityTlv + // and doesn't set defaults + setMsg(*otg.IsisLspExtendedIpv4ReachabilityTlv) IsisLspExtendedIpv4ReachabilityTlv + // provides marshal interface + Marshal() marshalIsisLspExtendedIpv4ReachabilityTlv + // provides unmarshal interface + Unmarshal() unMarshalIsisLspExtendedIpv4ReachabilityTlv + // validate validates IsisLspExtendedIpv4ReachabilityTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspExtendedIpv4ReachabilityTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Prefixes returns IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIterIter, set in IsisLspExtendedIpv4ReachabilityTlv + Prefixes() IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter + setNil() +} + +// IPv4 prefix contained within extended reachability TLVs. +// Prefixes returns a []IsisLspExtendedV4Prefix +func (obj *isisLspExtendedIpv4ReachabilityTlv) Prefixes() IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter { + if len(obj.obj.Prefixes) == 0 { + obj.obj.Prefixes = []*otg.IsisLspExtendedV4Prefix{} + } + if obj.prefixesHolder == nil { + obj.prefixesHolder = newIsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter(&obj.obj.Prefixes).setMsg(obj) + } + return obj.prefixesHolder +} + +type isisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter struct { + obj *isisLspExtendedIpv4ReachabilityTlv + isisLspExtendedV4PrefixSlice []IsisLspExtendedV4Prefix + fieldPtr *[]*otg.IsisLspExtendedV4Prefix +} + +func newIsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter(ptr *[]*otg.IsisLspExtendedV4Prefix) IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter { + return &isisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter{fieldPtr: ptr} +} + +type IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter interface { + setMsg(*isisLspExtendedIpv4ReachabilityTlv) IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter + Items() []IsisLspExtendedV4Prefix + Add() IsisLspExtendedV4Prefix + Append(items ...IsisLspExtendedV4Prefix) IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter + Set(index int, newObj IsisLspExtendedV4Prefix) IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter + Clear() IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter + clearHolderSlice() IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter + appendHolderSlice(item IsisLspExtendedV4Prefix) IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter +} + +func (obj *isisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter) setMsg(msg *isisLspExtendedIpv4ReachabilityTlv) IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspExtendedV4Prefix{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter) Items() []IsisLspExtendedV4Prefix { + return obj.isisLspExtendedV4PrefixSlice +} + +func (obj *isisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter) Add() IsisLspExtendedV4Prefix { + newObj := &otg.IsisLspExtendedV4Prefix{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspExtendedV4Prefix{obj: newObj} + newLibObj.setDefault() + obj.isisLspExtendedV4PrefixSlice = append(obj.isisLspExtendedV4PrefixSlice, newLibObj) + return newLibObj +} + +func (obj *isisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter) Append(items ...IsisLspExtendedV4Prefix) IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspExtendedV4PrefixSlice = append(obj.isisLspExtendedV4PrefixSlice, item) + } + return obj +} + +func (obj *isisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter) Set(index int, newObj IsisLspExtendedV4Prefix) IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspExtendedV4PrefixSlice[index] = newObj + return obj +} +func (obj *isisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter) Clear() IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspExtendedV4Prefix{} + obj.isisLspExtendedV4PrefixSlice = []IsisLspExtendedV4Prefix{} + } + return obj +} +func (obj *isisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter) clearHolderSlice() IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter { + if len(obj.isisLspExtendedV4PrefixSlice) > 0 { + obj.isisLspExtendedV4PrefixSlice = []IsisLspExtendedV4Prefix{} + } + return obj +} +func (obj *isisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter) appendHolderSlice(item IsisLspExtendedV4Prefix) IsisLspExtendedIpv4ReachabilityTlvIsisLspExtendedV4PrefixIter { + obj.isisLspExtendedV4PrefixSlice = append(obj.isisLspExtendedV4PrefixSlice, item) + return obj +} + +func (obj *isisLspExtendedIpv4ReachabilityTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Prefixes) != 0 { + + if set_default { + obj.Prefixes().clearHolderSlice() + for _, item := range obj.obj.Prefixes { + obj.Prefixes().appendHolderSlice(&isisLspExtendedV4Prefix{obj: item}) + } + } + for _, item := range obj.Prefixes().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *isisLspExtendedIpv4ReachabilityTlv) setDefault() { + +} diff --git a/gosnappi/isis_lsp_extended_is_reachability_tlv.go b/gosnappi/isis_lsp_extended_is_reachability_tlv.go new file mode 100644 index 00000000..0bac852b --- /dev/null +++ b/gosnappi/isis_lsp_extended_is_reachability_tlv.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspExtendedIsReachabilityTlv ***** +type isisLspExtendedIsReachabilityTlv struct { + validation + obj *otg.IsisLspExtendedIsReachabilityTlv + marshaller marshalIsisLspExtendedIsReachabilityTlv + unMarshaller unMarshalIsisLspExtendedIsReachabilityTlv + neighborsHolder IsisLspExtendedIsReachabilityTlvIsisLspneighborIter +} + +func NewIsisLspExtendedIsReachabilityTlv() IsisLspExtendedIsReachabilityTlv { + obj := isisLspExtendedIsReachabilityTlv{obj: &otg.IsisLspExtendedIsReachabilityTlv{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspExtendedIsReachabilityTlv) msg() *otg.IsisLspExtendedIsReachabilityTlv { + return obj.obj +} + +func (obj *isisLspExtendedIsReachabilityTlv) setMsg(msg *otg.IsisLspExtendedIsReachabilityTlv) IsisLspExtendedIsReachabilityTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspExtendedIsReachabilityTlv struct { + obj *isisLspExtendedIsReachabilityTlv +} + +type marshalIsisLspExtendedIsReachabilityTlv interface { + // ToProto marshals IsisLspExtendedIsReachabilityTlv to protobuf object *otg.IsisLspExtendedIsReachabilityTlv + ToProto() (*otg.IsisLspExtendedIsReachabilityTlv, error) + // ToPbText marshals IsisLspExtendedIsReachabilityTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspExtendedIsReachabilityTlv to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspExtendedIsReachabilityTlv to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspExtendedIsReachabilityTlv struct { + obj *isisLspExtendedIsReachabilityTlv +} + +type unMarshalIsisLspExtendedIsReachabilityTlv interface { + // FromProto unmarshals IsisLspExtendedIsReachabilityTlv from protobuf object *otg.IsisLspExtendedIsReachabilityTlv + FromProto(msg *otg.IsisLspExtendedIsReachabilityTlv) (IsisLspExtendedIsReachabilityTlv, error) + // FromPbText unmarshals IsisLspExtendedIsReachabilityTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspExtendedIsReachabilityTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspExtendedIsReachabilityTlv from JSON text + FromJson(value string) error +} + +func (obj *isisLspExtendedIsReachabilityTlv) Marshal() marshalIsisLspExtendedIsReachabilityTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspExtendedIsReachabilityTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspExtendedIsReachabilityTlv) Unmarshal() unMarshalIsisLspExtendedIsReachabilityTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspExtendedIsReachabilityTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspExtendedIsReachabilityTlv) ToProto() (*otg.IsisLspExtendedIsReachabilityTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspExtendedIsReachabilityTlv) FromProto(msg *otg.IsisLspExtendedIsReachabilityTlv) (IsisLspExtendedIsReachabilityTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspExtendedIsReachabilityTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspExtendedIsReachabilityTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspExtendedIsReachabilityTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspExtendedIsReachabilityTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspExtendedIsReachabilityTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspExtendedIsReachabilityTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspExtendedIsReachabilityTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspExtendedIsReachabilityTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspExtendedIsReachabilityTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspExtendedIsReachabilityTlv) Clone() (IsisLspExtendedIsReachabilityTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspExtendedIsReachabilityTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisLspExtendedIsReachabilityTlv) setNil() { + obj.neighborsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisLspExtendedIsReachabilityTlv is this is list of ISIS neighbors and attributes in Extended-IS-Reachability TLV (type 22). +type IsisLspExtendedIsReachabilityTlv interface { + Validation + // msg marshals IsisLspExtendedIsReachabilityTlv to protobuf object *otg.IsisLspExtendedIsReachabilityTlv + // and doesn't set defaults + msg() *otg.IsisLspExtendedIsReachabilityTlv + // setMsg unmarshals IsisLspExtendedIsReachabilityTlv from protobuf object *otg.IsisLspExtendedIsReachabilityTlv + // and doesn't set defaults + setMsg(*otg.IsisLspExtendedIsReachabilityTlv) IsisLspExtendedIsReachabilityTlv + // provides marshal interface + Marshal() marshalIsisLspExtendedIsReachabilityTlv + // provides unmarshal interface + Unmarshal() unMarshalIsisLspExtendedIsReachabilityTlv + // validate validates IsisLspExtendedIsReachabilityTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspExtendedIsReachabilityTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Neighbors returns IsisLspExtendedIsReachabilityTlvIsisLspneighborIterIter, set in IsisLspExtendedIsReachabilityTlv + Neighbors() IsisLspExtendedIsReachabilityTlvIsisLspneighborIter + setNil() +} + +// This container describes IS neighbors. +// Neighbors returns a []IsisLspneighbor +func (obj *isisLspExtendedIsReachabilityTlv) Neighbors() IsisLspExtendedIsReachabilityTlvIsisLspneighborIter { + if len(obj.obj.Neighbors) == 0 { + obj.obj.Neighbors = []*otg.IsisLspneighbor{} + } + if obj.neighborsHolder == nil { + obj.neighborsHolder = newIsisLspExtendedIsReachabilityTlvIsisLspneighborIter(&obj.obj.Neighbors).setMsg(obj) + } + return obj.neighborsHolder +} + +type isisLspExtendedIsReachabilityTlvIsisLspneighborIter struct { + obj *isisLspExtendedIsReachabilityTlv + isisLspneighborSlice []IsisLspneighbor + fieldPtr *[]*otg.IsisLspneighbor +} + +func newIsisLspExtendedIsReachabilityTlvIsisLspneighborIter(ptr *[]*otg.IsisLspneighbor) IsisLspExtendedIsReachabilityTlvIsisLspneighborIter { + return &isisLspExtendedIsReachabilityTlvIsisLspneighborIter{fieldPtr: ptr} +} + +type IsisLspExtendedIsReachabilityTlvIsisLspneighborIter interface { + setMsg(*isisLspExtendedIsReachabilityTlv) IsisLspExtendedIsReachabilityTlvIsisLspneighborIter + Items() []IsisLspneighbor + Add() IsisLspneighbor + Append(items ...IsisLspneighbor) IsisLspExtendedIsReachabilityTlvIsisLspneighborIter + Set(index int, newObj IsisLspneighbor) IsisLspExtendedIsReachabilityTlvIsisLspneighborIter + Clear() IsisLspExtendedIsReachabilityTlvIsisLspneighborIter + clearHolderSlice() IsisLspExtendedIsReachabilityTlvIsisLspneighborIter + appendHolderSlice(item IsisLspneighbor) IsisLspExtendedIsReachabilityTlvIsisLspneighborIter +} + +func (obj *isisLspExtendedIsReachabilityTlvIsisLspneighborIter) setMsg(msg *isisLspExtendedIsReachabilityTlv) IsisLspExtendedIsReachabilityTlvIsisLspneighborIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspneighbor{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisLspExtendedIsReachabilityTlvIsisLspneighborIter) Items() []IsisLspneighbor { + return obj.isisLspneighborSlice +} + +func (obj *isisLspExtendedIsReachabilityTlvIsisLspneighborIter) Add() IsisLspneighbor { + newObj := &otg.IsisLspneighbor{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspneighbor{obj: newObj} + newLibObj.setDefault() + obj.isisLspneighborSlice = append(obj.isisLspneighborSlice, newLibObj) + return newLibObj +} + +func (obj *isisLspExtendedIsReachabilityTlvIsisLspneighborIter) Append(items ...IsisLspneighbor) IsisLspExtendedIsReachabilityTlvIsisLspneighborIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspneighborSlice = append(obj.isisLspneighborSlice, item) + } + return obj +} + +func (obj *isisLspExtendedIsReachabilityTlvIsisLspneighborIter) Set(index int, newObj IsisLspneighbor) IsisLspExtendedIsReachabilityTlvIsisLspneighborIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspneighborSlice[index] = newObj + return obj +} +func (obj *isisLspExtendedIsReachabilityTlvIsisLspneighborIter) Clear() IsisLspExtendedIsReachabilityTlvIsisLspneighborIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspneighbor{} + obj.isisLspneighborSlice = []IsisLspneighbor{} + } + return obj +} +func (obj *isisLspExtendedIsReachabilityTlvIsisLspneighborIter) clearHolderSlice() IsisLspExtendedIsReachabilityTlvIsisLspneighborIter { + if len(obj.isisLspneighborSlice) > 0 { + obj.isisLspneighborSlice = []IsisLspneighbor{} + } + return obj +} +func (obj *isisLspExtendedIsReachabilityTlvIsisLspneighborIter) appendHolderSlice(item IsisLspneighbor) IsisLspExtendedIsReachabilityTlvIsisLspneighborIter { + obj.isisLspneighborSlice = append(obj.isisLspneighborSlice, item) + return obj +} + +func (obj *isisLspExtendedIsReachabilityTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Neighbors) != 0 { + + if set_default { + obj.Neighbors().clearHolderSlice() + for _, item := range obj.obj.Neighbors { + obj.Neighbors().appendHolderSlice(&isisLspneighbor{obj: item}) + } + } + for _, item := range obj.Neighbors().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *isisLspExtendedIsReachabilityTlv) setDefault() { + +} diff --git a/gosnappi/isis_lsp_extended_v4_prefix.go b/gosnappi/isis_lsp_extended_v4_prefix.go new file mode 100644 index 00000000..e3a921da --- /dev/null +++ b/gosnappi/isis_lsp_extended_v4_prefix.go @@ -0,0 +1,474 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspExtendedV4Prefix ***** +type isisLspExtendedV4Prefix struct { + validation + obj *otg.IsisLspExtendedV4Prefix + marshaller marshalIsisLspExtendedV4Prefix + unMarshaller unMarshalIsisLspExtendedV4Prefix + prefixAttributesHolder IsisLspPrefixAttributes +} + +func NewIsisLspExtendedV4Prefix() IsisLspExtendedV4Prefix { + obj := isisLspExtendedV4Prefix{obj: &otg.IsisLspExtendedV4Prefix{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspExtendedV4Prefix) msg() *otg.IsisLspExtendedV4Prefix { + return obj.obj +} + +func (obj *isisLspExtendedV4Prefix) setMsg(msg *otg.IsisLspExtendedV4Prefix) IsisLspExtendedV4Prefix { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspExtendedV4Prefix struct { + obj *isisLspExtendedV4Prefix +} + +type marshalIsisLspExtendedV4Prefix interface { + // ToProto marshals IsisLspExtendedV4Prefix to protobuf object *otg.IsisLspExtendedV4Prefix + ToProto() (*otg.IsisLspExtendedV4Prefix, error) + // ToPbText marshals IsisLspExtendedV4Prefix to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspExtendedV4Prefix to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspExtendedV4Prefix to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspExtendedV4Prefix struct { + obj *isisLspExtendedV4Prefix +} + +type unMarshalIsisLspExtendedV4Prefix interface { + // FromProto unmarshals IsisLspExtendedV4Prefix from protobuf object *otg.IsisLspExtendedV4Prefix + FromProto(msg *otg.IsisLspExtendedV4Prefix) (IsisLspExtendedV4Prefix, error) + // FromPbText unmarshals IsisLspExtendedV4Prefix from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspExtendedV4Prefix from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspExtendedV4Prefix from JSON text + FromJson(value string) error +} + +func (obj *isisLspExtendedV4Prefix) Marshal() marshalIsisLspExtendedV4Prefix { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspExtendedV4Prefix{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspExtendedV4Prefix) Unmarshal() unMarshalIsisLspExtendedV4Prefix { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspExtendedV4Prefix{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspExtendedV4Prefix) ToProto() (*otg.IsisLspExtendedV4Prefix, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspExtendedV4Prefix) FromProto(msg *otg.IsisLspExtendedV4Prefix) (IsisLspExtendedV4Prefix, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspExtendedV4Prefix) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspExtendedV4Prefix) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspExtendedV4Prefix) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspExtendedV4Prefix) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspExtendedV4Prefix) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspExtendedV4Prefix) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspExtendedV4Prefix) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspExtendedV4Prefix) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspExtendedV4Prefix) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspExtendedV4Prefix) Clone() (IsisLspExtendedV4Prefix, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspExtendedV4Prefix() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisLspExtendedV4Prefix) setNil() { + obj.prefixAttributesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisLspExtendedV4Prefix is this group defines attributes of an IPv4 standard prefix. +type IsisLspExtendedV4Prefix interface { + Validation + // msg marshals IsisLspExtendedV4Prefix to protobuf object *otg.IsisLspExtendedV4Prefix + // and doesn't set defaults + msg() *otg.IsisLspExtendedV4Prefix + // setMsg unmarshals IsisLspExtendedV4Prefix from protobuf object *otg.IsisLspExtendedV4Prefix + // and doesn't set defaults + setMsg(*otg.IsisLspExtendedV4Prefix) IsisLspExtendedV4Prefix + // provides marshal interface + Marshal() marshalIsisLspExtendedV4Prefix + // provides unmarshal interface + Unmarshal() unMarshalIsisLspExtendedV4Prefix + // validate validates IsisLspExtendedV4Prefix + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspExtendedV4Prefix, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv4Address returns string, set in IsisLspExtendedV4Prefix. + Ipv4Address() string + // SetIpv4Address assigns string provided by user to IsisLspExtendedV4Prefix + SetIpv4Address(value string) IsisLspExtendedV4Prefix + // HasIpv4Address checks if Ipv4Address has been set in IsisLspExtendedV4Prefix + HasIpv4Address() bool + // PrefixLength returns uint32, set in IsisLspExtendedV4Prefix. + PrefixLength() uint32 + // SetPrefixLength assigns uint32 provided by user to IsisLspExtendedV4Prefix + SetPrefixLength(value uint32) IsisLspExtendedV4Prefix + // HasPrefixLength checks if PrefixLength has been set in IsisLspExtendedV4Prefix + HasPrefixLength() bool + // Metric returns uint32, set in IsisLspExtendedV4Prefix. + Metric() uint32 + // SetMetric assigns uint32 provided by user to IsisLspExtendedV4Prefix + SetMetric(value uint32) IsisLspExtendedV4Prefix + // HasMetric checks if Metric has been set in IsisLspExtendedV4Prefix + HasMetric() bool + // RedistributionType returns IsisLspExtendedV4PrefixRedistributionTypeEnum, set in IsisLspExtendedV4Prefix + RedistributionType() IsisLspExtendedV4PrefixRedistributionTypeEnum + // SetRedistributionType assigns IsisLspExtendedV4PrefixRedistributionTypeEnum provided by user to IsisLspExtendedV4Prefix + SetRedistributionType(value IsisLspExtendedV4PrefixRedistributionTypeEnum) IsisLspExtendedV4Prefix + // HasRedistributionType checks if RedistributionType has been set in IsisLspExtendedV4Prefix + HasRedistributionType() bool + // PrefixAttributes returns IsisLspPrefixAttributes, set in IsisLspExtendedV4Prefix. + // IsisLspPrefixAttributes is this contains the properties of ISIS Prefix attributes for the extended IPv4 and IPv6 reachability. https://www.rfc-editor.org/rfc/rfc7794.html + PrefixAttributes() IsisLspPrefixAttributes + // SetPrefixAttributes assigns IsisLspPrefixAttributes provided by user to IsisLspExtendedV4Prefix. + // IsisLspPrefixAttributes is this contains the properties of ISIS Prefix attributes for the extended IPv4 and IPv6 reachability. https://www.rfc-editor.org/rfc/rfc7794.html + SetPrefixAttributes(value IsisLspPrefixAttributes) IsisLspExtendedV4Prefix + // HasPrefixAttributes checks if PrefixAttributes has been set in IsisLspExtendedV4Prefix + HasPrefixAttributes() bool + setNil() +} + +// An IPv4 unicast prefix reachable via the originator of this LSP. +// Ipv4Address returns a string +func (obj *isisLspExtendedV4Prefix) Ipv4Address() string { + + return *obj.obj.Ipv4Address + +} + +// An IPv4 unicast prefix reachable via the originator of this LSP. +// Ipv4Address returns a string +func (obj *isisLspExtendedV4Prefix) HasIpv4Address() bool { + return obj.obj.Ipv4Address != nil +} + +// An IPv4 unicast prefix reachable via the originator of this LSP. +// SetIpv4Address sets the string value in the IsisLspExtendedV4Prefix object +func (obj *isisLspExtendedV4Prefix) SetIpv4Address(value string) IsisLspExtendedV4Prefix { + + obj.obj.Ipv4Address = &value + return obj +} + +// The length of the IPv4 prefix. +// PrefixLength returns a uint32 +func (obj *isisLspExtendedV4Prefix) PrefixLength() uint32 { + + return *obj.obj.PrefixLength + +} + +// The length of the IPv4 prefix. +// PrefixLength returns a uint32 +func (obj *isisLspExtendedV4Prefix) HasPrefixLength() bool { + return obj.obj.PrefixLength != nil +} + +// The length of the IPv4 prefix. +// SetPrefixLength sets the uint32 value in the IsisLspExtendedV4Prefix object +func (obj *isisLspExtendedV4Prefix) SetPrefixLength(value uint32) IsisLspExtendedV4Prefix { + + obj.obj.PrefixLength = &value + return obj +} + +// ISIS wide metric. +// Metric returns a uint32 +func (obj *isisLspExtendedV4Prefix) Metric() uint32 { + + return *obj.obj.Metric + +} + +// ISIS wide metric. +// Metric returns a uint32 +func (obj *isisLspExtendedV4Prefix) HasMetric() bool { + return obj.obj.Metric != nil +} + +// ISIS wide metric. +// SetMetric sets the uint32 value in the IsisLspExtendedV4Prefix object +func (obj *isisLspExtendedV4Prefix) SetMetric(value uint32) IsisLspExtendedV4Prefix { + + obj.obj.Metric = &value + return obj +} + +type IsisLspExtendedV4PrefixRedistributionTypeEnum string + +// Enum of RedistributionType on IsisLspExtendedV4Prefix +var IsisLspExtendedV4PrefixRedistributionType = struct { + UP IsisLspExtendedV4PrefixRedistributionTypeEnum + DOWN IsisLspExtendedV4PrefixRedistributionTypeEnum +}{ + UP: IsisLspExtendedV4PrefixRedistributionTypeEnum("up"), + DOWN: IsisLspExtendedV4PrefixRedistributionTypeEnum("down"), +} + +func (obj *isisLspExtendedV4Prefix) RedistributionType() IsisLspExtendedV4PrefixRedistributionTypeEnum { + return IsisLspExtendedV4PrefixRedistributionTypeEnum(obj.obj.RedistributionType.Enum().String()) +} + +// Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, +// and for all other prefixes in L1 and L2 LSPs. (default) +// Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. +// The prefixes are being advertised from a higher level (L2) down to a lower level (L1). +// RedistributionType returns a string +func (obj *isisLspExtendedV4Prefix) HasRedistributionType() bool { + return obj.obj.RedistributionType != nil +} + +func (obj *isisLspExtendedV4Prefix) SetRedistributionType(value IsisLspExtendedV4PrefixRedistributionTypeEnum) IsisLspExtendedV4Prefix { + intValue, ok := otg.IsisLspExtendedV4Prefix_RedistributionType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on IsisLspExtendedV4PrefixRedistributionTypeEnum", string(value))) + return obj + } + enumValue := otg.IsisLspExtendedV4Prefix_RedistributionType_Enum(intValue) + obj.obj.RedistributionType = &enumValue + + return obj +} + +// description is TBD +// PrefixAttributes returns a IsisLspPrefixAttributes +func (obj *isisLspExtendedV4Prefix) PrefixAttributes() IsisLspPrefixAttributes { + if obj.obj.PrefixAttributes == nil { + obj.obj.PrefixAttributes = NewIsisLspPrefixAttributes().msg() + } + if obj.prefixAttributesHolder == nil { + obj.prefixAttributesHolder = &isisLspPrefixAttributes{obj: obj.obj.PrefixAttributes} + } + return obj.prefixAttributesHolder +} + +// description is TBD +// PrefixAttributes returns a IsisLspPrefixAttributes +func (obj *isisLspExtendedV4Prefix) HasPrefixAttributes() bool { + return obj.obj.PrefixAttributes != nil +} + +// description is TBD +// SetPrefixAttributes sets the IsisLspPrefixAttributes value in the IsisLspExtendedV4Prefix object +func (obj *isisLspExtendedV4Prefix) SetPrefixAttributes(value IsisLspPrefixAttributes) IsisLspExtendedV4Prefix { + + obj.prefixAttributesHolder = nil + obj.obj.PrefixAttributes = value.msg() + + return obj +} + +func (obj *isisLspExtendedV4Prefix) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv4Address != nil { + + err := obj.validateIpv4(obj.Ipv4Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on IsisLspExtendedV4Prefix.Ipv4Address")) + } + + } + + if obj.obj.PrefixLength != nil { + + if *obj.obj.PrefixLength > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= IsisLspExtendedV4Prefix.PrefixLength <= 32 but Got %d", *obj.obj.PrefixLength)) + } + + } + + if obj.obj.PrefixAttributes != nil { + + obj.PrefixAttributes().validateObj(vObj, set_default) + } + +} + +func (obj *isisLspExtendedV4Prefix) setDefault() { + +} diff --git a/gosnappi/isis_lsp_flags.go b/gosnappi/isis_lsp_flags.go new file mode 100644 index 00000000..696afacc --- /dev/null +++ b/gosnappi/isis_lsp_flags.go @@ -0,0 +1,458 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspFlags ***** +type isisLspFlags struct { + validation + obj *otg.IsisLspFlags + marshaller marshalIsisLspFlags + unMarshaller unMarshalIsisLspFlags +} + +func NewIsisLspFlags() IsisLspFlags { + obj := isisLspFlags{obj: &otg.IsisLspFlags{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspFlags) msg() *otg.IsisLspFlags { + return obj.obj +} + +func (obj *isisLspFlags) setMsg(msg *otg.IsisLspFlags) IsisLspFlags { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspFlags struct { + obj *isisLspFlags +} + +type marshalIsisLspFlags interface { + // ToProto marshals IsisLspFlags to protobuf object *otg.IsisLspFlags + ToProto() (*otg.IsisLspFlags, error) + // ToPbText marshals IsisLspFlags to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspFlags to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspFlags to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspFlags struct { + obj *isisLspFlags +} + +type unMarshalIsisLspFlags interface { + // FromProto unmarshals IsisLspFlags from protobuf object *otg.IsisLspFlags + FromProto(msg *otg.IsisLspFlags) (IsisLspFlags, error) + // FromPbText unmarshals IsisLspFlags from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspFlags from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspFlags from JSON text + FromJson(value string) error +} + +func (obj *isisLspFlags) Marshal() marshalIsisLspFlags { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspFlags{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspFlags) Unmarshal() unMarshalIsisLspFlags { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspFlags{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspFlags) ToProto() (*otg.IsisLspFlags, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspFlags) FromProto(msg *otg.IsisLspFlags) (IsisLspFlags, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspFlags) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspFlags) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspFlags) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspFlags) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspFlags) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspFlags) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspFlags) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspFlags) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspFlags) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspFlags) Clone() (IsisLspFlags, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspFlags() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisLspFlags is lSP Type flags. +type IsisLspFlags interface { + Validation + // msg marshals IsisLspFlags to protobuf object *otg.IsisLspFlags + // and doesn't set defaults + msg() *otg.IsisLspFlags + // setMsg unmarshals IsisLspFlags from protobuf object *otg.IsisLspFlags + // and doesn't set defaults + setMsg(*otg.IsisLspFlags) IsisLspFlags + // provides marshal interface + Marshal() marshalIsisLspFlags + // provides unmarshal interface + Unmarshal() unMarshalIsisLspFlags + // validate validates IsisLspFlags + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspFlags, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PartitionRepair returns bool, set in IsisLspFlags. + PartitionRepair() bool + // SetPartitionRepair assigns bool provided by user to IsisLspFlags + SetPartitionRepair(value bool) IsisLspFlags + // HasPartitionRepair checks if PartitionRepair has been set in IsisLspFlags + HasPartitionRepair() bool + // AttachedError returns bool, set in IsisLspFlags. + AttachedError() bool + // SetAttachedError assigns bool provided by user to IsisLspFlags + SetAttachedError(value bool) IsisLspFlags + // HasAttachedError checks if AttachedError has been set in IsisLspFlags + HasAttachedError() bool + // AttachedExpense returns bool, set in IsisLspFlags. + AttachedExpense() bool + // SetAttachedExpense assigns bool provided by user to IsisLspFlags + SetAttachedExpense(value bool) IsisLspFlags + // HasAttachedExpense checks if AttachedExpense has been set in IsisLspFlags + HasAttachedExpense() bool + // AttachedDelay returns bool, set in IsisLspFlags. + AttachedDelay() bool + // SetAttachedDelay assigns bool provided by user to IsisLspFlags + SetAttachedDelay(value bool) IsisLspFlags + // HasAttachedDelay checks if AttachedDelay has been set in IsisLspFlags + HasAttachedDelay() bool + // AttachedDefault returns bool, set in IsisLspFlags. + AttachedDefault() bool + // SetAttachedDefault assigns bool provided by user to IsisLspFlags + SetAttachedDefault(value bool) IsisLspFlags + // HasAttachedDefault checks if AttachedDefault has been set in IsisLspFlags + HasAttachedDefault() bool + // Overload returns bool, set in IsisLspFlags. + Overload() bool + // SetOverload assigns bool provided by user to IsisLspFlags + SetOverload(value bool) IsisLspFlags + // HasOverload checks if Overload has been set in IsisLspFlags + HasOverload() bool +} + +// When set, the originator supports partition repair. +// PartitionRepair returns a bool +func (obj *isisLspFlags) PartitionRepair() bool { + + return *obj.obj.PartitionRepair + +} + +// When set, the originator supports partition repair. +// PartitionRepair returns a bool +func (obj *isisLspFlags) HasPartitionRepair() bool { + return obj.obj.PartitionRepair != nil +} + +// When set, the originator supports partition repair. +// SetPartitionRepair sets the bool value in the IsisLspFlags object +func (obj *isisLspFlags) SetPartitionRepair(value bool) IsisLspFlags { + + obj.obj.PartitionRepair = &value + return obj +} + +// When set, the originator is attached to another area using the referred metric. +// AttachedError returns a bool +func (obj *isisLspFlags) AttachedError() bool { + + return *obj.obj.AttachedError + +} + +// When set, the originator is attached to another area using the referred metric. +// AttachedError returns a bool +func (obj *isisLspFlags) HasAttachedError() bool { + return obj.obj.AttachedError != nil +} + +// When set, the originator is attached to another area using the referred metric. +// SetAttachedError sets the bool value in the IsisLspFlags object +func (obj *isisLspFlags) SetAttachedError(value bool) IsisLspFlags { + + obj.obj.AttachedError = &value + return obj +} + +// When set, the originator is attached to another +// area using the referred metric. +// AttachedExpense returns a bool +func (obj *isisLspFlags) AttachedExpense() bool { + + return *obj.obj.AttachedExpense + +} + +// When set, the originator is attached to another +// area using the referred metric. +// AttachedExpense returns a bool +func (obj *isisLspFlags) HasAttachedExpense() bool { + return obj.obj.AttachedExpense != nil +} + +// When set, the originator is attached to another +// area using the referred metric. +// SetAttachedExpense sets the bool value in the IsisLspFlags object +func (obj *isisLspFlags) SetAttachedExpense(value bool) IsisLspFlags { + + obj.obj.AttachedExpense = &value + return obj +} + +// Delay Metric - when set, the originator is attached to another +// area using the referred metric. +// AttachedDelay returns a bool +func (obj *isisLspFlags) AttachedDelay() bool { + + return *obj.obj.AttachedDelay + +} + +// Delay Metric - when set, the originator is attached to another +// area using the referred metric. +// AttachedDelay returns a bool +func (obj *isisLspFlags) HasAttachedDelay() bool { + return obj.obj.AttachedDelay != nil +} + +// Delay Metric - when set, the originator is attached to another +// area using the referred metric. +// SetAttachedDelay sets the bool value in the IsisLspFlags object +func (obj *isisLspFlags) SetAttachedDelay(value bool) IsisLspFlags { + + obj.obj.AttachedDelay = &value + return obj +} + +// Default Metric - when set, the originator is attached to another +// area using the referred metric. +// AttachedDefault returns a bool +func (obj *isisLspFlags) AttachedDefault() bool { + + return *obj.obj.AttachedDefault + +} + +// Default Metric - when set, the originator is attached to another +// area using the referred metric. +// AttachedDefault returns a bool +func (obj *isisLspFlags) HasAttachedDefault() bool { + return obj.obj.AttachedDefault != nil +} + +// Default Metric - when set, the originator is attached to another +// area using the referred metric. +// SetAttachedDefault sets the bool value in the IsisLspFlags object +func (obj *isisLspFlags) SetAttachedDefault(value bool) IsisLspFlags { + + obj.obj.AttachedDefault = &value + return obj +} + +// Overload bit - when set, the originator is overloaded, and must +// be avoided in path calculation. +// Overload returns a bool +func (obj *isisLspFlags) Overload() bool { + + return *obj.obj.Overload + +} + +// Overload bit - when set, the originator is overloaded, and must +// be avoided in path calculation. +// Overload returns a bool +func (obj *isisLspFlags) HasOverload() bool { + return obj.obj.Overload != nil +} + +// Overload bit - when set, the originator is overloaded, and must +// be avoided in path calculation. +// SetOverload sets the bool value in the IsisLspFlags object +func (obj *isisLspFlags) SetOverload(value bool) IsisLspFlags { + + obj.obj.Overload = &value + return obj +} + +func (obj *isisLspFlags) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *isisLspFlags) setDefault() { + +} diff --git a/gosnappi/isis_lsp_hostname.go b/gosnappi/isis_lsp_hostname.go new file mode 100644 index 00000000..65a1734e --- /dev/null +++ b/gosnappi/isis_lsp_hostname.go @@ -0,0 +1,306 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspHostname ***** +type isisLspHostname struct { + validation + obj *otg.IsisLspHostname + marshaller marshalIsisLspHostname + unMarshaller unMarshalIsisLspHostname +} + +func NewIsisLspHostname() IsisLspHostname { + obj := isisLspHostname{obj: &otg.IsisLspHostname{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspHostname) msg() *otg.IsisLspHostname { + return obj.obj +} + +func (obj *isisLspHostname) setMsg(msg *otg.IsisLspHostname) IsisLspHostname { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspHostname struct { + obj *isisLspHostname +} + +type marshalIsisLspHostname interface { + // ToProto marshals IsisLspHostname to protobuf object *otg.IsisLspHostname + ToProto() (*otg.IsisLspHostname, error) + // ToPbText marshals IsisLspHostname to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspHostname to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspHostname to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspHostname struct { + obj *isisLspHostname +} + +type unMarshalIsisLspHostname interface { + // FromProto unmarshals IsisLspHostname from protobuf object *otg.IsisLspHostname + FromProto(msg *otg.IsisLspHostname) (IsisLspHostname, error) + // FromPbText unmarshals IsisLspHostname from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspHostname from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspHostname from JSON text + FromJson(value string) error +} + +func (obj *isisLspHostname) Marshal() marshalIsisLspHostname { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspHostname{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspHostname) Unmarshal() unMarshalIsisLspHostname { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspHostname{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspHostname) ToProto() (*otg.IsisLspHostname, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspHostname) FromProto(msg *otg.IsisLspHostname) (IsisLspHostname, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspHostname) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspHostname) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspHostname) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspHostname) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspHostname) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspHostname) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspHostname) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspHostname) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspHostname) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspHostname) Clone() (IsisLspHostname, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspHostname() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisLspHostname is it contains Hostname for the TLV 137. +type IsisLspHostname interface { + Validation + // msg marshals IsisLspHostname to protobuf object *otg.IsisLspHostname + // and doesn't set defaults + msg() *otg.IsisLspHostname + // setMsg unmarshals IsisLspHostname from protobuf object *otg.IsisLspHostname + // and doesn't set defaults + setMsg(*otg.IsisLspHostname) IsisLspHostname + // provides marshal interface + Marshal() marshalIsisLspHostname + // provides unmarshal interface + Unmarshal() unMarshalIsisLspHostname + // validate validates IsisLspHostname + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspHostname, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Hostname returns string, set in IsisLspHostname. + Hostname() string + // SetHostname assigns string provided by user to IsisLspHostname + SetHostname(value string) IsisLspHostname + // HasHostname checks if Hostname has been set in IsisLspHostname + HasHostname() bool +} + +// Hostname for an ISIS router. +// Hostname returns a string +func (obj *isisLspHostname) Hostname() string { + + return *obj.obj.Hostname + +} + +// Hostname for an ISIS router. +// Hostname returns a string +func (obj *isisLspHostname) HasHostname() bool { + return obj.obj.Hostname != nil +} + +// Hostname for an ISIS router. +// SetHostname sets the string value in the IsisLspHostname object +func (obj *isisLspHostname) SetHostname(value string) IsisLspHostname { + + obj.obj.Hostname = &value + return obj +} + +func (obj *isisLspHostname) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *isisLspHostname) setDefault() { + +} diff --git a/gosnappi/isis_lsp_ipv4_external_reachability_tlv.go b/gosnappi/isis_lsp_ipv4_external_reachability_tlv.go new file mode 100644 index 00000000..eb87f03f --- /dev/null +++ b/gosnappi/isis_lsp_ipv4_external_reachability_tlv.go @@ -0,0 +1,391 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspIpv4ExternalReachabilityTlv ***** +type isisLspIpv4ExternalReachabilityTlv struct { + validation + obj *otg.IsisLspIpv4ExternalReachabilityTlv + marshaller marshalIsisLspIpv4ExternalReachabilityTlv + unMarshaller unMarshalIsisLspIpv4ExternalReachabilityTlv + prefixesHolder IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter +} + +func NewIsisLspIpv4ExternalReachabilityTlv() IsisLspIpv4ExternalReachabilityTlv { + obj := isisLspIpv4ExternalReachabilityTlv{obj: &otg.IsisLspIpv4ExternalReachabilityTlv{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspIpv4ExternalReachabilityTlv) msg() *otg.IsisLspIpv4ExternalReachabilityTlv { + return obj.obj +} + +func (obj *isisLspIpv4ExternalReachabilityTlv) setMsg(msg *otg.IsisLspIpv4ExternalReachabilityTlv) IsisLspIpv4ExternalReachabilityTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspIpv4ExternalReachabilityTlv struct { + obj *isisLspIpv4ExternalReachabilityTlv +} + +type marshalIsisLspIpv4ExternalReachabilityTlv interface { + // ToProto marshals IsisLspIpv4ExternalReachabilityTlv to protobuf object *otg.IsisLspIpv4ExternalReachabilityTlv + ToProto() (*otg.IsisLspIpv4ExternalReachabilityTlv, error) + // ToPbText marshals IsisLspIpv4ExternalReachabilityTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspIpv4ExternalReachabilityTlv to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspIpv4ExternalReachabilityTlv to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspIpv4ExternalReachabilityTlv struct { + obj *isisLspIpv4ExternalReachabilityTlv +} + +type unMarshalIsisLspIpv4ExternalReachabilityTlv interface { + // FromProto unmarshals IsisLspIpv4ExternalReachabilityTlv from protobuf object *otg.IsisLspIpv4ExternalReachabilityTlv + FromProto(msg *otg.IsisLspIpv4ExternalReachabilityTlv) (IsisLspIpv4ExternalReachabilityTlv, error) + // FromPbText unmarshals IsisLspIpv4ExternalReachabilityTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspIpv4ExternalReachabilityTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspIpv4ExternalReachabilityTlv from JSON text + FromJson(value string) error +} + +func (obj *isisLspIpv4ExternalReachabilityTlv) Marshal() marshalIsisLspIpv4ExternalReachabilityTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspIpv4ExternalReachabilityTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspIpv4ExternalReachabilityTlv) Unmarshal() unMarshalIsisLspIpv4ExternalReachabilityTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspIpv4ExternalReachabilityTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspIpv4ExternalReachabilityTlv) ToProto() (*otg.IsisLspIpv4ExternalReachabilityTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspIpv4ExternalReachabilityTlv) FromProto(msg *otg.IsisLspIpv4ExternalReachabilityTlv) (IsisLspIpv4ExternalReachabilityTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspIpv4ExternalReachabilityTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspIpv4ExternalReachabilityTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspIpv4ExternalReachabilityTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspIpv4ExternalReachabilityTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspIpv4ExternalReachabilityTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspIpv4ExternalReachabilityTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspIpv4ExternalReachabilityTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspIpv4ExternalReachabilityTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspIpv4ExternalReachabilityTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspIpv4ExternalReachabilityTlv) Clone() (IsisLspIpv4ExternalReachabilityTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspIpv4ExternalReachabilityTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisLspIpv4ExternalReachabilityTlv) setNil() { + obj.prefixesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisLspIpv4ExternalReachabilityTlv is this container defines list of IPv4 external reachability information in one IPv4 external reachability TLV. +// This is advertised when the origin-type is set 'external' in route range configurations. +type IsisLspIpv4ExternalReachabilityTlv interface { + Validation + // msg marshals IsisLspIpv4ExternalReachabilityTlv to protobuf object *otg.IsisLspIpv4ExternalReachabilityTlv + // and doesn't set defaults + msg() *otg.IsisLspIpv4ExternalReachabilityTlv + // setMsg unmarshals IsisLspIpv4ExternalReachabilityTlv from protobuf object *otg.IsisLspIpv4ExternalReachabilityTlv + // and doesn't set defaults + setMsg(*otg.IsisLspIpv4ExternalReachabilityTlv) IsisLspIpv4ExternalReachabilityTlv + // provides marshal interface + Marshal() marshalIsisLspIpv4ExternalReachabilityTlv + // provides unmarshal interface + Unmarshal() unMarshalIsisLspIpv4ExternalReachabilityTlv + // validate validates IsisLspIpv4ExternalReachabilityTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspIpv4ExternalReachabilityTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Prefixes returns IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIterIter, set in IsisLspIpv4ExternalReachabilityTlv + Prefixes() IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter + setNil() +} + +// Describes list of IPv4 prefixes in this TLV.. +// Prefixes returns a []IsisLspV4Prefix +func (obj *isisLspIpv4ExternalReachabilityTlv) Prefixes() IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter { + if len(obj.obj.Prefixes) == 0 { + obj.obj.Prefixes = []*otg.IsisLspV4Prefix{} + } + if obj.prefixesHolder == nil { + obj.prefixesHolder = newIsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter(&obj.obj.Prefixes).setMsg(obj) + } + return obj.prefixesHolder +} + +type isisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter struct { + obj *isisLspIpv4ExternalReachabilityTlv + isisLspV4PrefixSlice []IsisLspV4Prefix + fieldPtr *[]*otg.IsisLspV4Prefix +} + +func newIsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter(ptr *[]*otg.IsisLspV4Prefix) IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter { + return &isisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter{fieldPtr: ptr} +} + +type IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter interface { + setMsg(*isisLspIpv4ExternalReachabilityTlv) IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter + Items() []IsisLspV4Prefix + Add() IsisLspV4Prefix + Append(items ...IsisLspV4Prefix) IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter + Set(index int, newObj IsisLspV4Prefix) IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter + Clear() IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter + clearHolderSlice() IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter + appendHolderSlice(item IsisLspV4Prefix) IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter +} + +func (obj *isisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter) setMsg(msg *isisLspIpv4ExternalReachabilityTlv) IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspV4Prefix{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter) Items() []IsisLspV4Prefix { + return obj.isisLspV4PrefixSlice +} + +func (obj *isisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter) Add() IsisLspV4Prefix { + newObj := &otg.IsisLspV4Prefix{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspV4Prefix{obj: newObj} + newLibObj.setDefault() + obj.isisLspV4PrefixSlice = append(obj.isisLspV4PrefixSlice, newLibObj) + return newLibObj +} + +func (obj *isisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter) Append(items ...IsisLspV4Prefix) IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspV4PrefixSlice = append(obj.isisLspV4PrefixSlice, item) + } + return obj +} + +func (obj *isisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter) Set(index int, newObj IsisLspV4Prefix) IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspV4PrefixSlice[index] = newObj + return obj +} +func (obj *isisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter) Clear() IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspV4Prefix{} + obj.isisLspV4PrefixSlice = []IsisLspV4Prefix{} + } + return obj +} +func (obj *isisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter) clearHolderSlice() IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter { + if len(obj.isisLspV4PrefixSlice) > 0 { + obj.isisLspV4PrefixSlice = []IsisLspV4Prefix{} + } + return obj +} +func (obj *isisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter) appendHolderSlice(item IsisLspV4Prefix) IsisLspIpv4ExternalReachabilityTlvIsisLspV4PrefixIter { + obj.isisLspV4PrefixSlice = append(obj.isisLspV4PrefixSlice, item) + return obj +} + +func (obj *isisLspIpv4ExternalReachabilityTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Prefixes) != 0 { + + if set_default { + obj.Prefixes().clearHolderSlice() + for _, item := range obj.obj.Prefixes { + obj.Prefixes().appendHolderSlice(&isisLspV4Prefix{obj: item}) + } + } + for _, item := range obj.Prefixes().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *isisLspIpv4ExternalReachabilityTlv) setDefault() { + +} diff --git a/gosnappi/isis_lsp_ipv4_internal_reachability_tlv.go b/gosnappi/isis_lsp_ipv4_internal_reachability_tlv.go new file mode 100644 index 00000000..e703754e --- /dev/null +++ b/gosnappi/isis_lsp_ipv4_internal_reachability_tlv.go @@ -0,0 +1,391 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspIpv4InternalReachabilityTlv ***** +type isisLspIpv4InternalReachabilityTlv struct { + validation + obj *otg.IsisLspIpv4InternalReachabilityTlv + marshaller marshalIsisLspIpv4InternalReachabilityTlv + unMarshaller unMarshalIsisLspIpv4InternalReachabilityTlv + prefixesHolder IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter +} + +func NewIsisLspIpv4InternalReachabilityTlv() IsisLspIpv4InternalReachabilityTlv { + obj := isisLspIpv4InternalReachabilityTlv{obj: &otg.IsisLspIpv4InternalReachabilityTlv{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspIpv4InternalReachabilityTlv) msg() *otg.IsisLspIpv4InternalReachabilityTlv { + return obj.obj +} + +func (obj *isisLspIpv4InternalReachabilityTlv) setMsg(msg *otg.IsisLspIpv4InternalReachabilityTlv) IsisLspIpv4InternalReachabilityTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspIpv4InternalReachabilityTlv struct { + obj *isisLspIpv4InternalReachabilityTlv +} + +type marshalIsisLspIpv4InternalReachabilityTlv interface { + // ToProto marshals IsisLspIpv4InternalReachabilityTlv to protobuf object *otg.IsisLspIpv4InternalReachabilityTlv + ToProto() (*otg.IsisLspIpv4InternalReachabilityTlv, error) + // ToPbText marshals IsisLspIpv4InternalReachabilityTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspIpv4InternalReachabilityTlv to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspIpv4InternalReachabilityTlv to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspIpv4InternalReachabilityTlv struct { + obj *isisLspIpv4InternalReachabilityTlv +} + +type unMarshalIsisLspIpv4InternalReachabilityTlv interface { + // FromProto unmarshals IsisLspIpv4InternalReachabilityTlv from protobuf object *otg.IsisLspIpv4InternalReachabilityTlv + FromProto(msg *otg.IsisLspIpv4InternalReachabilityTlv) (IsisLspIpv4InternalReachabilityTlv, error) + // FromPbText unmarshals IsisLspIpv4InternalReachabilityTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspIpv4InternalReachabilityTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspIpv4InternalReachabilityTlv from JSON text + FromJson(value string) error +} + +func (obj *isisLspIpv4InternalReachabilityTlv) Marshal() marshalIsisLspIpv4InternalReachabilityTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspIpv4InternalReachabilityTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspIpv4InternalReachabilityTlv) Unmarshal() unMarshalIsisLspIpv4InternalReachabilityTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspIpv4InternalReachabilityTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspIpv4InternalReachabilityTlv) ToProto() (*otg.IsisLspIpv4InternalReachabilityTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspIpv4InternalReachabilityTlv) FromProto(msg *otg.IsisLspIpv4InternalReachabilityTlv) (IsisLspIpv4InternalReachabilityTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspIpv4InternalReachabilityTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspIpv4InternalReachabilityTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspIpv4InternalReachabilityTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspIpv4InternalReachabilityTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspIpv4InternalReachabilityTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspIpv4InternalReachabilityTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspIpv4InternalReachabilityTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspIpv4InternalReachabilityTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspIpv4InternalReachabilityTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspIpv4InternalReachabilityTlv) Clone() (IsisLspIpv4InternalReachabilityTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspIpv4InternalReachabilityTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisLspIpv4InternalReachabilityTlv) setNil() { + obj.prefixesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisLspIpv4InternalReachabilityTlv is this container defines list of IPv4 internal reachability information in one IPv4 internal reachability TLV. +// This is advertised when the origin-type is set 'internal' in route range configurations. +type IsisLspIpv4InternalReachabilityTlv interface { + Validation + // msg marshals IsisLspIpv4InternalReachabilityTlv to protobuf object *otg.IsisLspIpv4InternalReachabilityTlv + // and doesn't set defaults + msg() *otg.IsisLspIpv4InternalReachabilityTlv + // setMsg unmarshals IsisLspIpv4InternalReachabilityTlv from protobuf object *otg.IsisLspIpv4InternalReachabilityTlv + // and doesn't set defaults + setMsg(*otg.IsisLspIpv4InternalReachabilityTlv) IsisLspIpv4InternalReachabilityTlv + // provides marshal interface + Marshal() marshalIsisLspIpv4InternalReachabilityTlv + // provides unmarshal interface + Unmarshal() unMarshalIsisLspIpv4InternalReachabilityTlv + // validate validates IsisLspIpv4InternalReachabilityTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspIpv4InternalReachabilityTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Prefixes returns IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIterIter, set in IsisLspIpv4InternalReachabilityTlv + Prefixes() IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter + setNil() +} + +// Describes list of IPv4 prefixes in this TLV. +// Prefixes returns a []IsisLspV4Prefix +func (obj *isisLspIpv4InternalReachabilityTlv) Prefixes() IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter { + if len(obj.obj.Prefixes) == 0 { + obj.obj.Prefixes = []*otg.IsisLspV4Prefix{} + } + if obj.prefixesHolder == nil { + obj.prefixesHolder = newIsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter(&obj.obj.Prefixes).setMsg(obj) + } + return obj.prefixesHolder +} + +type isisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter struct { + obj *isisLspIpv4InternalReachabilityTlv + isisLspV4PrefixSlice []IsisLspV4Prefix + fieldPtr *[]*otg.IsisLspV4Prefix +} + +func newIsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter(ptr *[]*otg.IsisLspV4Prefix) IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter { + return &isisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter{fieldPtr: ptr} +} + +type IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter interface { + setMsg(*isisLspIpv4InternalReachabilityTlv) IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter + Items() []IsisLspV4Prefix + Add() IsisLspV4Prefix + Append(items ...IsisLspV4Prefix) IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter + Set(index int, newObj IsisLspV4Prefix) IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter + Clear() IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter + clearHolderSlice() IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter + appendHolderSlice(item IsisLspV4Prefix) IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter +} + +func (obj *isisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter) setMsg(msg *isisLspIpv4InternalReachabilityTlv) IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspV4Prefix{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter) Items() []IsisLspV4Prefix { + return obj.isisLspV4PrefixSlice +} + +func (obj *isisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter) Add() IsisLspV4Prefix { + newObj := &otg.IsisLspV4Prefix{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspV4Prefix{obj: newObj} + newLibObj.setDefault() + obj.isisLspV4PrefixSlice = append(obj.isisLspV4PrefixSlice, newLibObj) + return newLibObj +} + +func (obj *isisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter) Append(items ...IsisLspV4Prefix) IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspV4PrefixSlice = append(obj.isisLspV4PrefixSlice, item) + } + return obj +} + +func (obj *isisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter) Set(index int, newObj IsisLspV4Prefix) IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspV4PrefixSlice[index] = newObj + return obj +} +func (obj *isisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter) Clear() IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspV4Prefix{} + obj.isisLspV4PrefixSlice = []IsisLspV4Prefix{} + } + return obj +} +func (obj *isisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter) clearHolderSlice() IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter { + if len(obj.isisLspV4PrefixSlice) > 0 { + obj.isisLspV4PrefixSlice = []IsisLspV4Prefix{} + } + return obj +} +func (obj *isisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter) appendHolderSlice(item IsisLspV4Prefix) IsisLspIpv4InternalReachabilityTlvIsisLspV4PrefixIter { + obj.isisLspV4PrefixSlice = append(obj.isisLspV4PrefixSlice, item) + return obj +} + +func (obj *isisLspIpv4InternalReachabilityTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Prefixes) != 0 { + + if set_default { + obj.Prefixes().clearHolderSlice() + for _, item := range obj.obj.Prefixes { + obj.Prefixes().appendHolderSlice(&isisLspV4Prefix{obj: item}) + } + } + for _, item := range obj.Prefixes().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *isisLspIpv4InternalReachabilityTlv) setDefault() { + +} diff --git a/gosnappi/isis_lsp_ipv6_reachability_tlv.go b/gosnappi/isis_lsp_ipv6_reachability_tlv.go new file mode 100644 index 00000000..4e913b87 --- /dev/null +++ b/gosnappi/isis_lsp_ipv6_reachability_tlv.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspIpv6ReachabilityTlv ***** +type isisLspIpv6ReachabilityTlv struct { + validation + obj *otg.IsisLspIpv6ReachabilityTlv + marshaller marshalIsisLspIpv6ReachabilityTlv + unMarshaller unMarshalIsisLspIpv6ReachabilityTlv + prefixesHolder IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter +} + +func NewIsisLspIpv6ReachabilityTlv() IsisLspIpv6ReachabilityTlv { + obj := isisLspIpv6ReachabilityTlv{obj: &otg.IsisLspIpv6ReachabilityTlv{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspIpv6ReachabilityTlv) msg() *otg.IsisLspIpv6ReachabilityTlv { + return obj.obj +} + +func (obj *isisLspIpv6ReachabilityTlv) setMsg(msg *otg.IsisLspIpv6ReachabilityTlv) IsisLspIpv6ReachabilityTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspIpv6ReachabilityTlv struct { + obj *isisLspIpv6ReachabilityTlv +} + +type marshalIsisLspIpv6ReachabilityTlv interface { + // ToProto marshals IsisLspIpv6ReachabilityTlv to protobuf object *otg.IsisLspIpv6ReachabilityTlv + ToProto() (*otg.IsisLspIpv6ReachabilityTlv, error) + // ToPbText marshals IsisLspIpv6ReachabilityTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspIpv6ReachabilityTlv to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspIpv6ReachabilityTlv to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspIpv6ReachabilityTlv struct { + obj *isisLspIpv6ReachabilityTlv +} + +type unMarshalIsisLspIpv6ReachabilityTlv interface { + // FromProto unmarshals IsisLspIpv6ReachabilityTlv from protobuf object *otg.IsisLspIpv6ReachabilityTlv + FromProto(msg *otg.IsisLspIpv6ReachabilityTlv) (IsisLspIpv6ReachabilityTlv, error) + // FromPbText unmarshals IsisLspIpv6ReachabilityTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspIpv6ReachabilityTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspIpv6ReachabilityTlv from JSON text + FromJson(value string) error +} + +func (obj *isisLspIpv6ReachabilityTlv) Marshal() marshalIsisLspIpv6ReachabilityTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspIpv6ReachabilityTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspIpv6ReachabilityTlv) Unmarshal() unMarshalIsisLspIpv6ReachabilityTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspIpv6ReachabilityTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspIpv6ReachabilityTlv) ToProto() (*otg.IsisLspIpv6ReachabilityTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspIpv6ReachabilityTlv) FromProto(msg *otg.IsisLspIpv6ReachabilityTlv) (IsisLspIpv6ReachabilityTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspIpv6ReachabilityTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspIpv6ReachabilityTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspIpv6ReachabilityTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspIpv6ReachabilityTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspIpv6ReachabilityTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspIpv6ReachabilityTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspIpv6ReachabilityTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspIpv6ReachabilityTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspIpv6ReachabilityTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspIpv6ReachabilityTlv) Clone() (IsisLspIpv6ReachabilityTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspIpv6ReachabilityTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisLspIpv6ReachabilityTlv) setNil() { + obj.prefixesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisLspIpv6ReachabilityTlv is it defines list of IPv6 extended reachability information in one IPv6 Reachability TLV. +type IsisLspIpv6ReachabilityTlv interface { + Validation + // msg marshals IsisLspIpv6ReachabilityTlv to protobuf object *otg.IsisLspIpv6ReachabilityTlv + // and doesn't set defaults + msg() *otg.IsisLspIpv6ReachabilityTlv + // setMsg unmarshals IsisLspIpv6ReachabilityTlv from protobuf object *otg.IsisLspIpv6ReachabilityTlv + // and doesn't set defaults + setMsg(*otg.IsisLspIpv6ReachabilityTlv) IsisLspIpv6ReachabilityTlv + // provides marshal interface + Marshal() marshalIsisLspIpv6ReachabilityTlv + // provides unmarshal interface + Unmarshal() unMarshalIsisLspIpv6ReachabilityTlv + // validate validates IsisLspIpv6ReachabilityTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspIpv6ReachabilityTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Prefixes returns IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIterIter, set in IsisLspIpv6ReachabilityTlv + Prefixes() IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter + setNil() +} + +// IPv6 prefix contained within reachability TLVs. +// Prefixes returns a []IsisLspV6Prefix +func (obj *isisLspIpv6ReachabilityTlv) Prefixes() IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter { + if len(obj.obj.Prefixes) == 0 { + obj.obj.Prefixes = []*otg.IsisLspV6Prefix{} + } + if obj.prefixesHolder == nil { + obj.prefixesHolder = newIsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter(&obj.obj.Prefixes).setMsg(obj) + } + return obj.prefixesHolder +} + +type isisLspIpv6ReachabilityTlvIsisLspV6PrefixIter struct { + obj *isisLspIpv6ReachabilityTlv + isisLspV6PrefixSlice []IsisLspV6Prefix + fieldPtr *[]*otg.IsisLspV6Prefix +} + +func newIsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter(ptr *[]*otg.IsisLspV6Prefix) IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter { + return &isisLspIpv6ReachabilityTlvIsisLspV6PrefixIter{fieldPtr: ptr} +} + +type IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter interface { + setMsg(*isisLspIpv6ReachabilityTlv) IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter + Items() []IsisLspV6Prefix + Add() IsisLspV6Prefix + Append(items ...IsisLspV6Prefix) IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter + Set(index int, newObj IsisLspV6Prefix) IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter + Clear() IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter + clearHolderSlice() IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter + appendHolderSlice(item IsisLspV6Prefix) IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter +} + +func (obj *isisLspIpv6ReachabilityTlvIsisLspV6PrefixIter) setMsg(msg *isisLspIpv6ReachabilityTlv) IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspV6Prefix{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisLspIpv6ReachabilityTlvIsisLspV6PrefixIter) Items() []IsisLspV6Prefix { + return obj.isisLspV6PrefixSlice +} + +func (obj *isisLspIpv6ReachabilityTlvIsisLspV6PrefixIter) Add() IsisLspV6Prefix { + newObj := &otg.IsisLspV6Prefix{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspV6Prefix{obj: newObj} + newLibObj.setDefault() + obj.isisLspV6PrefixSlice = append(obj.isisLspV6PrefixSlice, newLibObj) + return newLibObj +} + +func (obj *isisLspIpv6ReachabilityTlvIsisLspV6PrefixIter) Append(items ...IsisLspV6Prefix) IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspV6PrefixSlice = append(obj.isisLspV6PrefixSlice, item) + } + return obj +} + +func (obj *isisLspIpv6ReachabilityTlvIsisLspV6PrefixIter) Set(index int, newObj IsisLspV6Prefix) IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspV6PrefixSlice[index] = newObj + return obj +} +func (obj *isisLspIpv6ReachabilityTlvIsisLspV6PrefixIter) Clear() IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspV6Prefix{} + obj.isisLspV6PrefixSlice = []IsisLspV6Prefix{} + } + return obj +} +func (obj *isisLspIpv6ReachabilityTlvIsisLspV6PrefixIter) clearHolderSlice() IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter { + if len(obj.isisLspV6PrefixSlice) > 0 { + obj.isisLspV6PrefixSlice = []IsisLspV6Prefix{} + } + return obj +} +func (obj *isisLspIpv6ReachabilityTlvIsisLspV6PrefixIter) appendHolderSlice(item IsisLspV6Prefix) IsisLspIpv6ReachabilityTlvIsisLspV6PrefixIter { + obj.isisLspV6PrefixSlice = append(obj.isisLspV6PrefixSlice, item) + return obj +} + +func (obj *isisLspIpv6ReachabilityTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Prefixes) != 0 { + + if set_default { + obj.Prefixes().clearHolderSlice() + for _, item := range obj.obj.Prefixes { + obj.Prefixes().appendHolderSlice(&isisLspV6Prefix{obj: item}) + } + } + for _, item := range obj.Prefixes().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *isisLspIpv6ReachabilityTlv) setDefault() { + +} diff --git a/gosnappi/isis_lsp_is_reachability_tlv.go b/gosnappi/isis_lsp_is_reachability_tlv.go new file mode 100644 index 00000000..a0621ca7 --- /dev/null +++ b/gosnappi/isis_lsp_is_reachability_tlv.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspIsReachabilityTlv ***** +type isisLspIsReachabilityTlv struct { + validation + obj *otg.IsisLspIsReachabilityTlv + marshaller marshalIsisLspIsReachabilityTlv + unMarshaller unMarshalIsisLspIsReachabilityTlv + neighborsHolder IsisLspIsReachabilityTlvIsisLspneighborIter +} + +func NewIsisLspIsReachabilityTlv() IsisLspIsReachabilityTlv { + obj := isisLspIsReachabilityTlv{obj: &otg.IsisLspIsReachabilityTlv{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspIsReachabilityTlv) msg() *otg.IsisLspIsReachabilityTlv { + return obj.obj +} + +func (obj *isisLspIsReachabilityTlv) setMsg(msg *otg.IsisLspIsReachabilityTlv) IsisLspIsReachabilityTlv { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspIsReachabilityTlv struct { + obj *isisLspIsReachabilityTlv +} + +type marshalIsisLspIsReachabilityTlv interface { + // ToProto marshals IsisLspIsReachabilityTlv to protobuf object *otg.IsisLspIsReachabilityTlv + ToProto() (*otg.IsisLspIsReachabilityTlv, error) + // ToPbText marshals IsisLspIsReachabilityTlv to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspIsReachabilityTlv to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspIsReachabilityTlv to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspIsReachabilityTlv struct { + obj *isisLspIsReachabilityTlv +} + +type unMarshalIsisLspIsReachabilityTlv interface { + // FromProto unmarshals IsisLspIsReachabilityTlv from protobuf object *otg.IsisLspIsReachabilityTlv + FromProto(msg *otg.IsisLspIsReachabilityTlv) (IsisLspIsReachabilityTlv, error) + // FromPbText unmarshals IsisLspIsReachabilityTlv from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspIsReachabilityTlv from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspIsReachabilityTlv from JSON text + FromJson(value string) error +} + +func (obj *isisLspIsReachabilityTlv) Marshal() marshalIsisLspIsReachabilityTlv { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspIsReachabilityTlv{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspIsReachabilityTlv) Unmarshal() unMarshalIsisLspIsReachabilityTlv { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspIsReachabilityTlv{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspIsReachabilityTlv) ToProto() (*otg.IsisLspIsReachabilityTlv, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspIsReachabilityTlv) FromProto(msg *otg.IsisLspIsReachabilityTlv) (IsisLspIsReachabilityTlv, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspIsReachabilityTlv) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspIsReachabilityTlv) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspIsReachabilityTlv) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspIsReachabilityTlv) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspIsReachabilityTlv) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspIsReachabilityTlv) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspIsReachabilityTlv) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspIsReachabilityTlv) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspIsReachabilityTlv) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspIsReachabilityTlv) Clone() (IsisLspIsReachabilityTlv, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspIsReachabilityTlv() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisLspIsReachabilityTlv) setNil() { + obj.neighborsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisLspIsReachabilityTlv is this container describes list of ISIS neighbors and attributes in IS-Reachability TLV (type 2). +type IsisLspIsReachabilityTlv interface { + Validation + // msg marshals IsisLspIsReachabilityTlv to protobuf object *otg.IsisLspIsReachabilityTlv + // and doesn't set defaults + msg() *otg.IsisLspIsReachabilityTlv + // setMsg unmarshals IsisLspIsReachabilityTlv from protobuf object *otg.IsisLspIsReachabilityTlv + // and doesn't set defaults + setMsg(*otg.IsisLspIsReachabilityTlv) IsisLspIsReachabilityTlv + // provides marshal interface + Marshal() marshalIsisLspIsReachabilityTlv + // provides unmarshal interface + Unmarshal() unMarshalIsisLspIsReachabilityTlv + // validate validates IsisLspIsReachabilityTlv + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspIsReachabilityTlv, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Neighbors returns IsisLspIsReachabilityTlvIsisLspneighborIterIter, set in IsisLspIsReachabilityTlv + Neighbors() IsisLspIsReachabilityTlvIsisLspneighborIter + setNil() +} + +// This container describes Intermediate System (IS) neighbors. +// Neighbors returns a []IsisLspneighbor +func (obj *isisLspIsReachabilityTlv) Neighbors() IsisLspIsReachabilityTlvIsisLspneighborIter { + if len(obj.obj.Neighbors) == 0 { + obj.obj.Neighbors = []*otg.IsisLspneighbor{} + } + if obj.neighborsHolder == nil { + obj.neighborsHolder = newIsisLspIsReachabilityTlvIsisLspneighborIter(&obj.obj.Neighbors).setMsg(obj) + } + return obj.neighborsHolder +} + +type isisLspIsReachabilityTlvIsisLspneighborIter struct { + obj *isisLspIsReachabilityTlv + isisLspneighborSlice []IsisLspneighbor + fieldPtr *[]*otg.IsisLspneighbor +} + +func newIsisLspIsReachabilityTlvIsisLspneighborIter(ptr *[]*otg.IsisLspneighbor) IsisLspIsReachabilityTlvIsisLspneighborIter { + return &isisLspIsReachabilityTlvIsisLspneighborIter{fieldPtr: ptr} +} + +type IsisLspIsReachabilityTlvIsisLspneighborIter interface { + setMsg(*isisLspIsReachabilityTlv) IsisLspIsReachabilityTlvIsisLspneighborIter + Items() []IsisLspneighbor + Add() IsisLspneighbor + Append(items ...IsisLspneighbor) IsisLspIsReachabilityTlvIsisLspneighborIter + Set(index int, newObj IsisLspneighbor) IsisLspIsReachabilityTlvIsisLspneighborIter + Clear() IsisLspIsReachabilityTlvIsisLspneighborIter + clearHolderSlice() IsisLspIsReachabilityTlvIsisLspneighborIter + appendHolderSlice(item IsisLspneighbor) IsisLspIsReachabilityTlvIsisLspneighborIter +} + +func (obj *isisLspIsReachabilityTlvIsisLspneighborIter) setMsg(msg *isisLspIsReachabilityTlv) IsisLspIsReachabilityTlvIsisLspneighborIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspneighbor{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisLspIsReachabilityTlvIsisLspneighborIter) Items() []IsisLspneighbor { + return obj.isisLspneighborSlice +} + +func (obj *isisLspIsReachabilityTlvIsisLspneighborIter) Add() IsisLspneighbor { + newObj := &otg.IsisLspneighbor{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspneighbor{obj: newObj} + newLibObj.setDefault() + obj.isisLspneighborSlice = append(obj.isisLspneighborSlice, newLibObj) + return newLibObj +} + +func (obj *isisLspIsReachabilityTlvIsisLspneighborIter) Append(items ...IsisLspneighbor) IsisLspIsReachabilityTlvIsisLspneighborIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspneighborSlice = append(obj.isisLspneighborSlice, item) + } + return obj +} + +func (obj *isisLspIsReachabilityTlvIsisLspneighborIter) Set(index int, newObj IsisLspneighbor) IsisLspIsReachabilityTlvIsisLspneighborIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspneighborSlice[index] = newObj + return obj +} +func (obj *isisLspIsReachabilityTlvIsisLspneighborIter) Clear() IsisLspIsReachabilityTlvIsisLspneighborIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspneighbor{} + obj.isisLspneighborSlice = []IsisLspneighbor{} + } + return obj +} +func (obj *isisLspIsReachabilityTlvIsisLspneighborIter) clearHolderSlice() IsisLspIsReachabilityTlvIsisLspneighborIter { + if len(obj.isisLspneighborSlice) > 0 { + obj.isisLspneighborSlice = []IsisLspneighbor{} + } + return obj +} +func (obj *isisLspIsReachabilityTlvIsisLspneighborIter) appendHolderSlice(item IsisLspneighbor) IsisLspIsReachabilityTlvIsisLspneighborIter { + obj.isisLspneighborSlice = append(obj.isisLspneighborSlice, item) + return obj +} + +func (obj *isisLspIsReachabilityTlv) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Neighbors) != 0 { + + if set_default { + obj.Neighbors().clearHolderSlice() + for _, item := range obj.obj.Neighbors { + obj.Neighbors().appendHolderSlice(&isisLspneighbor{obj: item}) + } + } + for _, item := range obj.Neighbors().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *isisLspIsReachabilityTlv) setDefault() { + +} diff --git a/gosnappi/isis_lsp_prefix_attributes.go b/gosnappi/isis_lsp_prefix_attributes.go new file mode 100644 index 00000000..bf72af90 --- /dev/null +++ b/gosnappi/isis_lsp_prefix_attributes.go @@ -0,0 +1,362 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspPrefixAttributes ***** +type isisLspPrefixAttributes struct { + validation + obj *otg.IsisLspPrefixAttributes + marshaller marshalIsisLspPrefixAttributes + unMarshaller unMarshalIsisLspPrefixAttributes +} + +func NewIsisLspPrefixAttributes() IsisLspPrefixAttributes { + obj := isisLspPrefixAttributes{obj: &otg.IsisLspPrefixAttributes{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspPrefixAttributes) msg() *otg.IsisLspPrefixAttributes { + return obj.obj +} + +func (obj *isisLspPrefixAttributes) setMsg(msg *otg.IsisLspPrefixAttributes) IsisLspPrefixAttributes { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspPrefixAttributes struct { + obj *isisLspPrefixAttributes +} + +type marshalIsisLspPrefixAttributes interface { + // ToProto marshals IsisLspPrefixAttributes to protobuf object *otg.IsisLspPrefixAttributes + ToProto() (*otg.IsisLspPrefixAttributes, error) + // ToPbText marshals IsisLspPrefixAttributes to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspPrefixAttributes to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspPrefixAttributes to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspPrefixAttributes struct { + obj *isisLspPrefixAttributes +} + +type unMarshalIsisLspPrefixAttributes interface { + // FromProto unmarshals IsisLspPrefixAttributes from protobuf object *otg.IsisLspPrefixAttributes + FromProto(msg *otg.IsisLspPrefixAttributes) (IsisLspPrefixAttributes, error) + // FromPbText unmarshals IsisLspPrefixAttributes from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspPrefixAttributes from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspPrefixAttributes from JSON text + FromJson(value string) error +} + +func (obj *isisLspPrefixAttributes) Marshal() marshalIsisLspPrefixAttributes { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspPrefixAttributes{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspPrefixAttributes) Unmarshal() unMarshalIsisLspPrefixAttributes { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspPrefixAttributes{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspPrefixAttributes) ToProto() (*otg.IsisLspPrefixAttributes, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspPrefixAttributes) FromProto(msg *otg.IsisLspPrefixAttributes) (IsisLspPrefixAttributes, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspPrefixAttributes) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspPrefixAttributes) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspPrefixAttributes) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspPrefixAttributes) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspPrefixAttributes) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspPrefixAttributes) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspPrefixAttributes) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspPrefixAttributes) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspPrefixAttributes) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspPrefixAttributes) Clone() (IsisLspPrefixAttributes, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspPrefixAttributes() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisLspPrefixAttributes is this contains the properties of ISIS Prefix attributes for the extended IPv4 and IPv6 reachability. https://www.rfc-editor.org/rfc/rfc7794.html +type IsisLspPrefixAttributes interface { + Validation + // msg marshals IsisLspPrefixAttributes to protobuf object *otg.IsisLspPrefixAttributes + // and doesn't set defaults + msg() *otg.IsisLspPrefixAttributes + // setMsg unmarshals IsisLspPrefixAttributes from protobuf object *otg.IsisLspPrefixAttributes + // and doesn't set defaults + setMsg(*otg.IsisLspPrefixAttributes) IsisLspPrefixAttributes + // provides marshal interface + Marshal() marshalIsisLspPrefixAttributes + // provides unmarshal interface + Unmarshal() unMarshalIsisLspPrefixAttributes + // validate validates IsisLspPrefixAttributes + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspPrefixAttributes, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // XFlag returns bool, set in IsisLspPrefixAttributes. + XFlag() bool + // SetXFlag assigns bool provided by user to IsisLspPrefixAttributes + SetXFlag(value bool) IsisLspPrefixAttributes + // HasXFlag checks if XFlag has been set in IsisLspPrefixAttributes + HasXFlag() bool + // RFlag returns bool, set in IsisLspPrefixAttributes. + RFlag() bool + // SetRFlag assigns bool provided by user to IsisLspPrefixAttributes + SetRFlag(value bool) IsisLspPrefixAttributes + // HasRFlag checks if RFlag has been set in IsisLspPrefixAttributes + HasRFlag() bool + // NFlag returns bool, set in IsisLspPrefixAttributes. + NFlag() bool + // SetNFlag assigns bool provided by user to IsisLspPrefixAttributes + SetNFlag(value bool) IsisLspPrefixAttributes + // HasNFlag checks if NFlag has been set in IsisLspPrefixAttributes + HasNFlag() bool +} + +// External Prefix Flag (Bit 0) +// XFlag returns a bool +func (obj *isisLspPrefixAttributes) XFlag() bool { + + return *obj.obj.XFlag + +} + +// External Prefix Flag (Bit 0) +// XFlag returns a bool +func (obj *isisLspPrefixAttributes) HasXFlag() bool { + return obj.obj.XFlag != nil +} + +// External Prefix Flag (Bit 0) +// SetXFlag sets the bool value in the IsisLspPrefixAttributes object +func (obj *isisLspPrefixAttributes) SetXFlag(value bool) IsisLspPrefixAttributes { + + obj.obj.XFlag = &value + return obj +} + +// Re-advertisement Flag (Bit 1) +// RFlag returns a bool +func (obj *isisLspPrefixAttributes) RFlag() bool { + + return *obj.obj.RFlag + +} + +// Re-advertisement Flag (Bit 1) +// RFlag returns a bool +func (obj *isisLspPrefixAttributes) HasRFlag() bool { + return obj.obj.RFlag != nil +} + +// Re-advertisement Flag (Bit 1) +// SetRFlag sets the bool value in the IsisLspPrefixAttributes object +func (obj *isisLspPrefixAttributes) SetRFlag(value bool) IsisLspPrefixAttributes { + + obj.obj.RFlag = &value + return obj +} + +// Node Flag (Bit 2) +// NFlag returns a bool +func (obj *isisLspPrefixAttributes) NFlag() bool { + + return *obj.obj.NFlag + +} + +// Node Flag (Bit 2) +// NFlag returns a bool +func (obj *isisLspPrefixAttributes) HasNFlag() bool { + return obj.obj.NFlag != nil +} + +// Node Flag (Bit 2) +// SetNFlag sets the bool value in the IsisLspPrefixAttributes object +func (obj *isisLspPrefixAttributes) SetNFlag(value bool) IsisLspPrefixAttributes { + + obj.obj.NFlag = &value + return obj +} + +func (obj *isisLspPrefixAttributes) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *isisLspPrefixAttributes) setDefault() { + +} diff --git a/gosnappi/isis_lsp_state.go b/gosnappi/isis_lsp_state.go new file mode 100644 index 00000000..6a87eeec --- /dev/null +++ b/gosnappi/isis_lsp_state.go @@ -0,0 +1,577 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspState ***** +type isisLspState struct { + validation + obj *otg.IsisLspState + marshaller marshalIsisLspState + unMarshaller unMarshalIsisLspState + flagsHolder IsisLspFlags + tlvsHolder IsisLspTlvs +} + +func NewIsisLspState() IsisLspState { + obj := isisLspState{obj: &otg.IsisLspState{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspState) msg() *otg.IsisLspState { + return obj.obj +} + +func (obj *isisLspState) setMsg(msg *otg.IsisLspState) IsisLspState { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspState struct { + obj *isisLspState +} + +type marshalIsisLspState interface { + // ToProto marshals IsisLspState to protobuf object *otg.IsisLspState + ToProto() (*otg.IsisLspState, error) + // ToPbText marshals IsisLspState to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspState to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspState to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspState struct { + obj *isisLspState +} + +type unMarshalIsisLspState interface { + // FromProto unmarshals IsisLspState from protobuf object *otg.IsisLspState + FromProto(msg *otg.IsisLspState) (IsisLspState, error) + // FromPbText unmarshals IsisLspState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspState from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspState from JSON text + FromJson(value string) error +} + +func (obj *isisLspState) Marshal() marshalIsisLspState { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspState{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspState) Unmarshal() unMarshalIsisLspState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspState) ToProto() (*otg.IsisLspState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspState) FromProto(msg *otg.IsisLspState) (IsisLspState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspState) Clone() (IsisLspState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisLspState) setNil() { + obj.flagsHolder = nil + obj.tlvsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisLspState is iSIS LSP. +type IsisLspState interface { + Validation + // msg marshals IsisLspState to protobuf object *otg.IsisLspState + // and doesn't set defaults + msg() *otg.IsisLspState + // setMsg unmarshals IsisLspState from protobuf object *otg.IsisLspState + // and doesn't set defaults + setMsg(*otg.IsisLspState) IsisLspState + // provides marshal interface + Marshal() marshalIsisLspState + // provides unmarshal interface + Unmarshal() unMarshalIsisLspState + // validate validates IsisLspState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LspId returns string, set in IsisLspState. + LspId() string + // SetLspId assigns string provided by user to IsisLspState + SetLspId(value string) IsisLspState + // PduType returns IsisLspStatePduTypeEnum, set in IsisLspState + PduType() IsisLspStatePduTypeEnum + // SetPduType assigns IsisLspStatePduTypeEnum provided by user to IsisLspState + SetPduType(value IsisLspStatePduTypeEnum) IsisLspState + // HasPduType checks if PduType has been set in IsisLspState + HasPduType() bool + // RemainingLifetime returns uint32, set in IsisLspState. + RemainingLifetime() uint32 + // SetRemainingLifetime assigns uint32 provided by user to IsisLspState + SetRemainingLifetime(value uint32) IsisLspState + // HasRemainingLifetime checks if RemainingLifetime has been set in IsisLspState + HasRemainingLifetime() bool + // SequenceNumber returns uint64, set in IsisLspState. + SequenceNumber() uint64 + // SetSequenceNumber assigns uint64 provided by user to IsisLspState + SetSequenceNumber(value uint64) IsisLspState + // HasSequenceNumber checks if SequenceNumber has been set in IsisLspState + HasSequenceNumber() bool + // PduLength returns uint32, set in IsisLspState. + PduLength() uint32 + // SetPduLength assigns uint32 provided by user to IsisLspState + SetPduLength(value uint32) IsisLspState + // HasPduLength checks if PduLength has been set in IsisLspState + HasPduLength() bool + // Flags returns IsisLspFlags, set in IsisLspState. + // IsisLspFlags is lSP Type flags. + Flags() IsisLspFlags + // SetFlags assigns IsisLspFlags provided by user to IsisLspState. + // IsisLspFlags is lSP Type flags. + SetFlags(value IsisLspFlags) IsisLspState + // HasFlags checks if Flags has been set in IsisLspState + HasFlags() bool + // IsType returns uint32, set in IsisLspState. + IsType() uint32 + // SetIsType assigns uint32 provided by user to IsisLspState + SetIsType(value uint32) IsisLspState + // HasIsType checks if IsType has been set in IsisLspState + HasIsType() bool + // Tlvs returns IsisLspTlvs, set in IsisLspState. + // IsisLspTlvs is this contains the list of TLVs present in one LSP. + Tlvs() IsisLspTlvs + // SetTlvs assigns IsisLspTlvs provided by user to IsisLspState. + // IsisLspTlvs is this contains the list of TLVs present in one LSP. + SetTlvs(value IsisLspTlvs) IsisLspState + // HasTlvs checks if Tlvs has been set in IsisLspState + HasTlvs() bool + setNil() +} + +// LSP ID in the format, e.g. '640000000001-00-00'. LSP ID consists of the System ID of a neighbor, the Pseudonode ID, and the LSP number. The last two bytes represent Pseudonode ID and LSP number respectively. A pseudonode is a logical representation of the LAN which is generated by a Designated Intermediate System (DIS) on a LAN segment. If one LSP exceeds the maximum LSP size then it is sent in another LSP with the LSP number incremented by one. A router's learned LSP gets refreshed by 'remaining_lifetime'. Then the sequence number is incremented by 1. +// LspId returns a string +func (obj *isisLspState) LspId() string { + + return *obj.obj.LspId + +} + +// LSP ID in the format, e.g. '640000000001-00-00'. LSP ID consists of the System ID of a neighbor, the Pseudonode ID, and the LSP number. The last two bytes represent Pseudonode ID and LSP number respectively. A pseudonode is a logical representation of the LAN which is generated by a Designated Intermediate System (DIS) on a LAN segment. If one LSP exceeds the maximum LSP size then it is sent in another LSP with the LSP number incremented by one. A router's learned LSP gets refreshed by 'remaining_lifetime'. Then the sequence number is incremented by 1. +// SetLspId sets the string value in the IsisLspState object +func (obj *isisLspState) SetLspId(value string) IsisLspState { + + obj.obj.LspId = &value + return obj +} + +type IsisLspStatePduTypeEnum string + +// Enum of PduType on IsisLspState +var IsisLspStatePduType = struct { + LEVEL_1 IsisLspStatePduTypeEnum + LEVEL_2 IsisLspStatePduTypeEnum +}{ + LEVEL_1: IsisLspStatePduTypeEnum("level_1"), + LEVEL_2: IsisLspStatePduTypeEnum("level_2"), +} + +func (obj *isisLspState) PduType() IsisLspStatePduTypeEnum { + return IsisLspStatePduTypeEnum(obj.obj.PduType.Enum().String()) +} + +// Link State PDU type. +// PduType returns a string +func (obj *isisLspState) HasPduType() bool { + return obj.obj.PduType != nil +} + +func (obj *isisLspState) SetPduType(value IsisLspStatePduTypeEnum) IsisLspState { + intValue, ok := otg.IsisLspState_PduType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on IsisLspStatePduTypeEnum", string(value))) + return obj + } + enumValue := otg.IsisLspState_PduType_Enum(intValue) + obj.obj.PduType = &enumValue + + return obj +} + +// Remaining lifetime in seconds before LSP expires. +// RemainingLifetime returns a uint32 +func (obj *isisLspState) RemainingLifetime() uint32 { + + return *obj.obj.RemainingLifetime + +} + +// Remaining lifetime in seconds before LSP expires. +// RemainingLifetime returns a uint32 +func (obj *isisLspState) HasRemainingLifetime() bool { + return obj.obj.RemainingLifetime != nil +} + +// Remaining lifetime in seconds before LSP expires. +// SetRemainingLifetime sets the uint32 value in the IsisLspState object +func (obj *isisLspState) SetRemainingLifetime(value uint32) IsisLspState { + + obj.obj.RemainingLifetime = &value + return obj +} + +// Sequence number of the LSP. +// SequenceNumber returns a uint64 +func (obj *isisLspState) SequenceNumber() uint64 { + + return *obj.obj.SequenceNumber + +} + +// Sequence number of the LSP. +// SequenceNumber returns a uint64 +func (obj *isisLspState) HasSequenceNumber() bool { + return obj.obj.SequenceNumber != nil +} + +// Sequence number of the LSP. +// SetSequenceNumber sets the uint64 value in the IsisLspState object +func (obj *isisLspState) SetSequenceNumber(value uint64) IsisLspState { + + obj.obj.SequenceNumber = &value + return obj +} + +// Total length of the LSP. +// PduLength returns a uint32 +func (obj *isisLspState) PduLength() uint32 { + + return *obj.obj.PduLength + +} + +// Total length of the LSP. +// PduLength returns a uint32 +func (obj *isisLspState) HasPduLength() bool { + return obj.obj.PduLength != nil +} + +// Total length of the LSP. +// SetPduLength sets the uint32 value in the IsisLspState object +func (obj *isisLspState) SetPduLength(value uint32) IsisLspState { + + obj.obj.PduLength = &value + return obj +} + +// LSP Type-Block flags. +// Flags returns a IsisLspFlags +func (obj *isisLspState) Flags() IsisLspFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewIsisLspFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &isisLspFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// LSP Type-Block flags. +// Flags returns a IsisLspFlags +func (obj *isisLspState) HasFlags() bool { + return obj.obj.Flags != nil +} + +// LSP Type-Block flags. +// SetFlags sets the IsisLspFlags value in the IsisLspState object +func (obj *isisLspState) SetFlags(value IsisLspFlags) IsisLspState { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// IS Type - bits 1 and 2 indicate the type of Intermediate System. +// 1 - ( i.e. bit 1 set) Level 1 Intermediate system. +// 2 - Unused value. +// 3 - (i.e. bits 1 and 2 set) Level 2 Intermediate system. +// IsType returns a uint32 +func (obj *isisLspState) IsType() uint32 { + + return *obj.obj.IsType + +} + +// IS Type - bits 1 and 2 indicate the type of Intermediate System. +// 1 - ( i.e. bit 1 set) Level 1 Intermediate system. +// 2 - Unused value. +// 3 - (i.e. bits 1 and 2 set) Level 2 Intermediate system. +// IsType returns a uint32 +func (obj *isisLspState) HasIsType() bool { + return obj.obj.IsType != nil +} + +// IS Type - bits 1 and 2 indicate the type of Intermediate System. +// 1 - ( i.e. bit 1 set) Level 1 Intermediate system. +// 2 - Unused value. +// 3 - (i.e. bits 1 and 2 set) Level 2 Intermediate system. +// SetIsType sets the uint32 value in the IsisLspState object +func (obj *isisLspState) SetIsType(value uint32) IsisLspState { + + obj.obj.IsType = &value + return obj +} + +// It refers to Link State PDU State TLVs container. +// Tlvs returns a IsisLspTlvs +func (obj *isisLspState) Tlvs() IsisLspTlvs { + if obj.obj.Tlvs == nil { + obj.obj.Tlvs = NewIsisLspTlvs().msg() + } + if obj.tlvsHolder == nil { + obj.tlvsHolder = &isisLspTlvs{obj: obj.obj.Tlvs} + } + return obj.tlvsHolder +} + +// It refers to Link State PDU State TLVs container. +// Tlvs returns a IsisLspTlvs +func (obj *isisLspState) HasTlvs() bool { + return obj.obj.Tlvs != nil +} + +// It refers to Link State PDU State TLVs container. +// SetTlvs sets the IsisLspTlvs value in the IsisLspState object +func (obj *isisLspState) SetTlvs(value IsisLspTlvs) IsisLspState { + + obj.tlvsHolder = nil + obj.obj.Tlvs = value.msg() + + return obj +} + +func (obj *isisLspState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // LspId is required + if obj.obj.LspId == nil { + vObj.validationErrors = append(vObj.validationErrors, "LspId is required field on interface IsisLspState") + } + + if obj.obj.PduLength != nil { + + if *obj.obj.PduLength > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= IsisLspState.PduLength <= 65535 but Got %d", *obj.obj.PduLength)) + } + + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + + if obj.obj.IsType != nil { + + if *obj.obj.IsType > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= IsisLspState.IsType <= 3 but Got %d", *obj.obj.IsType)) + } + + } + + if obj.obj.Tlvs != nil { + + obj.Tlvs().validateObj(vObj, set_default) + } + +} + +func (obj *isisLspState) setDefault() { + +} diff --git a/gosnappi/isis_lsp_tlvs.go b/gosnappi/isis_lsp_tlvs.go new file mode 100644 index 00000000..a94999cd --- /dev/null +++ b/gosnappi/isis_lsp_tlvs.go @@ -0,0 +1,1020 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspTlvs ***** +type isisLspTlvs struct { + validation + obj *otg.IsisLspTlvs + marshaller marshalIsisLspTlvs + unMarshaller unMarshalIsisLspTlvs + hostnameTlvsHolder IsisLspTlvsIsisLspHostnameIter + isReachabilityTlvsHolder IsisLspTlvsIsisLspIsReachabilityTlvIter + extendedIsReachabilityTlvsHolder IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter + ipv4InternalReachabilityTlvsHolder IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter + ipv4ExternalReachabilityTlvsHolder IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter + extendedIpv4ReachabilityTlvsHolder IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter + ipv6ReachabilityTlvsHolder IsisLspTlvsIsisLspIpv6ReachabilityTlvIter +} + +func NewIsisLspTlvs() IsisLspTlvs { + obj := isisLspTlvs{obj: &otg.IsisLspTlvs{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspTlvs) msg() *otg.IsisLspTlvs { + return obj.obj +} + +func (obj *isisLspTlvs) setMsg(msg *otg.IsisLspTlvs) IsisLspTlvs { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspTlvs struct { + obj *isisLspTlvs +} + +type marshalIsisLspTlvs interface { + // ToProto marshals IsisLspTlvs to protobuf object *otg.IsisLspTlvs + ToProto() (*otg.IsisLspTlvs, error) + // ToPbText marshals IsisLspTlvs to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspTlvs to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspTlvs to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspTlvs struct { + obj *isisLspTlvs +} + +type unMarshalIsisLspTlvs interface { + // FromProto unmarshals IsisLspTlvs from protobuf object *otg.IsisLspTlvs + FromProto(msg *otg.IsisLspTlvs) (IsisLspTlvs, error) + // FromPbText unmarshals IsisLspTlvs from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspTlvs from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspTlvs from JSON text + FromJson(value string) error +} + +func (obj *isisLspTlvs) Marshal() marshalIsisLspTlvs { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspTlvs{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspTlvs) Unmarshal() unMarshalIsisLspTlvs { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspTlvs{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspTlvs) ToProto() (*otg.IsisLspTlvs, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspTlvs) FromProto(msg *otg.IsisLspTlvs) (IsisLspTlvs, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspTlvs) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspTlvs) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspTlvs) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspTlvs) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspTlvs) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspTlvs) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspTlvs) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspTlvs) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspTlvs) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspTlvs) Clone() (IsisLspTlvs, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspTlvs() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisLspTlvs) setNil() { + obj.hostnameTlvsHolder = nil + obj.isReachabilityTlvsHolder = nil + obj.extendedIsReachabilityTlvsHolder = nil + obj.ipv4InternalReachabilityTlvsHolder = nil + obj.ipv4ExternalReachabilityTlvsHolder = nil + obj.extendedIpv4ReachabilityTlvsHolder = nil + obj.ipv6ReachabilityTlvsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisLspTlvs is this contains the list of TLVs present in one LSP. +type IsisLspTlvs interface { + Validation + // msg marshals IsisLspTlvs to protobuf object *otg.IsisLspTlvs + // and doesn't set defaults + msg() *otg.IsisLspTlvs + // setMsg unmarshals IsisLspTlvs from protobuf object *otg.IsisLspTlvs + // and doesn't set defaults + setMsg(*otg.IsisLspTlvs) IsisLspTlvs + // provides marshal interface + Marshal() marshalIsisLspTlvs + // provides unmarshal interface + Unmarshal() unMarshalIsisLspTlvs + // validate validates IsisLspTlvs + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspTlvs, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // HostnameTlvs returns IsisLspTlvsIsisLspHostnameIterIter, set in IsisLspTlvs + HostnameTlvs() IsisLspTlvsIsisLspHostnameIter + // IsReachabilityTlvs returns IsisLspTlvsIsisLspIsReachabilityTlvIterIter, set in IsisLspTlvs + IsReachabilityTlvs() IsisLspTlvsIsisLspIsReachabilityTlvIter + // ExtendedIsReachabilityTlvs returns IsisLspTlvsIsisLspExtendedIsReachabilityTlvIterIter, set in IsisLspTlvs + ExtendedIsReachabilityTlvs() IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter + // Ipv4InternalReachabilityTlvs returns IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIterIter, set in IsisLspTlvs + Ipv4InternalReachabilityTlvs() IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter + // Ipv4ExternalReachabilityTlvs returns IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIterIter, set in IsisLspTlvs + Ipv4ExternalReachabilityTlvs() IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter + // ExtendedIpv4ReachabilityTlvs returns IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIterIter, set in IsisLspTlvs + ExtendedIpv4ReachabilityTlvs() IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter + // Ipv6ReachabilityTlvs returns IsisLspTlvsIsisLspIpv6ReachabilityTlvIterIter, set in IsisLspTlvs + Ipv6ReachabilityTlvs() IsisLspTlvsIsisLspIpv6ReachabilityTlvIter + setNil() +} + +// Array of Hostname TLVs ( type 137) present in this LSP. +// HostnameTlvs returns a []IsisLspHostname +func (obj *isisLspTlvs) HostnameTlvs() IsisLspTlvsIsisLspHostnameIter { + if len(obj.obj.HostnameTlvs) == 0 { + obj.obj.HostnameTlvs = []*otg.IsisLspHostname{} + } + if obj.hostnameTlvsHolder == nil { + obj.hostnameTlvsHolder = newIsisLspTlvsIsisLspHostnameIter(&obj.obj.HostnameTlvs).setMsg(obj) + } + return obj.hostnameTlvsHolder +} + +type isisLspTlvsIsisLspHostnameIter struct { + obj *isisLspTlvs + isisLspHostnameSlice []IsisLspHostname + fieldPtr *[]*otg.IsisLspHostname +} + +func newIsisLspTlvsIsisLspHostnameIter(ptr *[]*otg.IsisLspHostname) IsisLspTlvsIsisLspHostnameIter { + return &isisLspTlvsIsisLspHostnameIter{fieldPtr: ptr} +} + +type IsisLspTlvsIsisLspHostnameIter interface { + setMsg(*isisLspTlvs) IsisLspTlvsIsisLspHostnameIter + Items() []IsisLspHostname + Add() IsisLspHostname + Append(items ...IsisLspHostname) IsisLspTlvsIsisLspHostnameIter + Set(index int, newObj IsisLspHostname) IsisLspTlvsIsisLspHostnameIter + Clear() IsisLspTlvsIsisLspHostnameIter + clearHolderSlice() IsisLspTlvsIsisLspHostnameIter + appendHolderSlice(item IsisLspHostname) IsisLspTlvsIsisLspHostnameIter +} + +func (obj *isisLspTlvsIsisLspHostnameIter) setMsg(msg *isisLspTlvs) IsisLspTlvsIsisLspHostnameIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspHostname{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisLspTlvsIsisLspHostnameIter) Items() []IsisLspHostname { + return obj.isisLspHostnameSlice +} + +func (obj *isisLspTlvsIsisLspHostnameIter) Add() IsisLspHostname { + newObj := &otg.IsisLspHostname{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspHostname{obj: newObj} + newLibObj.setDefault() + obj.isisLspHostnameSlice = append(obj.isisLspHostnameSlice, newLibObj) + return newLibObj +} + +func (obj *isisLspTlvsIsisLspHostnameIter) Append(items ...IsisLspHostname) IsisLspTlvsIsisLspHostnameIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspHostnameSlice = append(obj.isisLspHostnameSlice, item) + } + return obj +} + +func (obj *isisLspTlvsIsisLspHostnameIter) Set(index int, newObj IsisLspHostname) IsisLspTlvsIsisLspHostnameIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspHostnameSlice[index] = newObj + return obj +} +func (obj *isisLspTlvsIsisLspHostnameIter) Clear() IsisLspTlvsIsisLspHostnameIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspHostname{} + obj.isisLspHostnameSlice = []IsisLspHostname{} + } + return obj +} +func (obj *isisLspTlvsIsisLspHostnameIter) clearHolderSlice() IsisLspTlvsIsisLspHostnameIter { + if len(obj.isisLspHostnameSlice) > 0 { + obj.isisLspHostnameSlice = []IsisLspHostname{} + } + return obj +} +func (obj *isisLspTlvsIsisLspHostnameIter) appendHolderSlice(item IsisLspHostname) IsisLspTlvsIsisLspHostnameIter { + obj.isisLspHostnameSlice = append(obj.isisLspHostnameSlice, item) + return obj +} + +// Array of IS-Reachability TLVs (type 2) present in this LSP. +// IsReachabilityTlvs returns a []IsisLspIsReachabilityTlv +func (obj *isisLspTlvs) IsReachabilityTlvs() IsisLspTlvsIsisLspIsReachabilityTlvIter { + if len(obj.obj.IsReachabilityTlvs) == 0 { + obj.obj.IsReachabilityTlvs = []*otg.IsisLspIsReachabilityTlv{} + } + if obj.isReachabilityTlvsHolder == nil { + obj.isReachabilityTlvsHolder = newIsisLspTlvsIsisLspIsReachabilityTlvIter(&obj.obj.IsReachabilityTlvs).setMsg(obj) + } + return obj.isReachabilityTlvsHolder +} + +type isisLspTlvsIsisLspIsReachabilityTlvIter struct { + obj *isisLspTlvs + isisLspIsReachabilityTlvSlice []IsisLspIsReachabilityTlv + fieldPtr *[]*otg.IsisLspIsReachabilityTlv +} + +func newIsisLspTlvsIsisLspIsReachabilityTlvIter(ptr *[]*otg.IsisLspIsReachabilityTlv) IsisLspTlvsIsisLspIsReachabilityTlvIter { + return &isisLspTlvsIsisLspIsReachabilityTlvIter{fieldPtr: ptr} +} + +type IsisLspTlvsIsisLspIsReachabilityTlvIter interface { + setMsg(*isisLspTlvs) IsisLspTlvsIsisLspIsReachabilityTlvIter + Items() []IsisLspIsReachabilityTlv + Add() IsisLspIsReachabilityTlv + Append(items ...IsisLspIsReachabilityTlv) IsisLspTlvsIsisLspIsReachabilityTlvIter + Set(index int, newObj IsisLspIsReachabilityTlv) IsisLspTlvsIsisLspIsReachabilityTlvIter + Clear() IsisLspTlvsIsisLspIsReachabilityTlvIter + clearHolderSlice() IsisLspTlvsIsisLspIsReachabilityTlvIter + appendHolderSlice(item IsisLspIsReachabilityTlv) IsisLspTlvsIsisLspIsReachabilityTlvIter +} + +func (obj *isisLspTlvsIsisLspIsReachabilityTlvIter) setMsg(msg *isisLspTlvs) IsisLspTlvsIsisLspIsReachabilityTlvIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspIsReachabilityTlv{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisLspTlvsIsisLspIsReachabilityTlvIter) Items() []IsisLspIsReachabilityTlv { + return obj.isisLspIsReachabilityTlvSlice +} + +func (obj *isisLspTlvsIsisLspIsReachabilityTlvIter) Add() IsisLspIsReachabilityTlv { + newObj := &otg.IsisLspIsReachabilityTlv{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspIsReachabilityTlv{obj: newObj} + newLibObj.setDefault() + obj.isisLspIsReachabilityTlvSlice = append(obj.isisLspIsReachabilityTlvSlice, newLibObj) + return newLibObj +} + +func (obj *isisLspTlvsIsisLspIsReachabilityTlvIter) Append(items ...IsisLspIsReachabilityTlv) IsisLspTlvsIsisLspIsReachabilityTlvIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspIsReachabilityTlvSlice = append(obj.isisLspIsReachabilityTlvSlice, item) + } + return obj +} + +func (obj *isisLspTlvsIsisLspIsReachabilityTlvIter) Set(index int, newObj IsisLspIsReachabilityTlv) IsisLspTlvsIsisLspIsReachabilityTlvIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspIsReachabilityTlvSlice[index] = newObj + return obj +} +func (obj *isisLspTlvsIsisLspIsReachabilityTlvIter) Clear() IsisLspTlvsIsisLspIsReachabilityTlvIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspIsReachabilityTlv{} + obj.isisLspIsReachabilityTlvSlice = []IsisLspIsReachabilityTlv{} + } + return obj +} +func (obj *isisLspTlvsIsisLspIsReachabilityTlvIter) clearHolderSlice() IsisLspTlvsIsisLspIsReachabilityTlvIter { + if len(obj.isisLspIsReachabilityTlvSlice) > 0 { + obj.isisLspIsReachabilityTlvSlice = []IsisLspIsReachabilityTlv{} + } + return obj +} +func (obj *isisLspTlvsIsisLspIsReachabilityTlvIter) appendHolderSlice(item IsisLspIsReachabilityTlv) IsisLspTlvsIsisLspIsReachabilityTlvIter { + obj.isisLspIsReachabilityTlvSlice = append(obj.isisLspIsReachabilityTlvSlice, item) + return obj +} + +// Array of Extended IS-Reachability TLVs (type 22) present in this LSP. +// ExtendedIsReachabilityTlvs returns a []IsisLspExtendedIsReachabilityTlv +func (obj *isisLspTlvs) ExtendedIsReachabilityTlvs() IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter { + if len(obj.obj.ExtendedIsReachabilityTlvs) == 0 { + obj.obj.ExtendedIsReachabilityTlvs = []*otg.IsisLspExtendedIsReachabilityTlv{} + } + if obj.extendedIsReachabilityTlvsHolder == nil { + obj.extendedIsReachabilityTlvsHolder = newIsisLspTlvsIsisLspExtendedIsReachabilityTlvIter(&obj.obj.ExtendedIsReachabilityTlvs).setMsg(obj) + } + return obj.extendedIsReachabilityTlvsHolder +} + +type isisLspTlvsIsisLspExtendedIsReachabilityTlvIter struct { + obj *isisLspTlvs + isisLspExtendedIsReachabilityTlvSlice []IsisLspExtendedIsReachabilityTlv + fieldPtr *[]*otg.IsisLspExtendedIsReachabilityTlv +} + +func newIsisLspTlvsIsisLspExtendedIsReachabilityTlvIter(ptr *[]*otg.IsisLspExtendedIsReachabilityTlv) IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter { + return &isisLspTlvsIsisLspExtendedIsReachabilityTlvIter{fieldPtr: ptr} +} + +type IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter interface { + setMsg(*isisLspTlvs) IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter + Items() []IsisLspExtendedIsReachabilityTlv + Add() IsisLspExtendedIsReachabilityTlv + Append(items ...IsisLspExtendedIsReachabilityTlv) IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter + Set(index int, newObj IsisLspExtendedIsReachabilityTlv) IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter + Clear() IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter + clearHolderSlice() IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter + appendHolderSlice(item IsisLspExtendedIsReachabilityTlv) IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter +} + +func (obj *isisLspTlvsIsisLspExtendedIsReachabilityTlvIter) setMsg(msg *isisLspTlvs) IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspExtendedIsReachabilityTlv{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisLspTlvsIsisLspExtendedIsReachabilityTlvIter) Items() []IsisLspExtendedIsReachabilityTlv { + return obj.isisLspExtendedIsReachabilityTlvSlice +} + +func (obj *isisLspTlvsIsisLspExtendedIsReachabilityTlvIter) Add() IsisLspExtendedIsReachabilityTlv { + newObj := &otg.IsisLspExtendedIsReachabilityTlv{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspExtendedIsReachabilityTlv{obj: newObj} + newLibObj.setDefault() + obj.isisLspExtendedIsReachabilityTlvSlice = append(obj.isisLspExtendedIsReachabilityTlvSlice, newLibObj) + return newLibObj +} + +func (obj *isisLspTlvsIsisLspExtendedIsReachabilityTlvIter) Append(items ...IsisLspExtendedIsReachabilityTlv) IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspExtendedIsReachabilityTlvSlice = append(obj.isisLspExtendedIsReachabilityTlvSlice, item) + } + return obj +} + +func (obj *isisLspTlvsIsisLspExtendedIsReachabilityTlvIter) Set(index int, newObj IsisLspExtendedIsReachabilityTlv) IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspExtendedIsReachabilityTlvSlice[index] = newObj + return obj +} +func (obj *isisLspTlvsIsisLspExtendedIsReachabilityTlvIter) Clear() IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspExtendedIsReachabilityTlv{} + obj.isisLspExtendedIsReachabilityTlvSlice = []IsisLspExtendedIsReachabilityTlv{} + } + return obj +} +func (obj *isisLspTlvsIsisLspExtendedIsReachabilityTlvIter) clearHolderSlice() IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter { + if len(obj.isisLspExtendedIsReachabilityTlvSlice) > 0 { + obj.isisLspExtendedIsReachabilityTlvSlice = []IsisLspExtendedIsReachabilityTlv{} + } + return obj +} +func (obj *isisLspTlvsIsisLspExtendedIsReachabilityTlvIter) appendHolderSlice(item IsisLspExtendedIsReachabilityTlv) IsisLspTlvsIsisLspExtendedIsReachabilityTlvIter { + obj.isisLspExtendedIsReachabilityTlvSlice = append(obj.isisLspExtendedIsReachabilityTlvSlice, item) + return obj +} + +// Array of IPv4 Internal Reachability TLVs (type 128) present in this LSP. +// Ipv4InternalReachabilityTlvs returns a []IsisLspIpv4InternalReachabilityTlv +func (obj *isisLspTlvs) Ipv4InternalReachabilityTlvs() IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter { + if len(obj.obj.Ipv4InternalReachabilityTlvs) == 0 { + obj.obj.Ipv4InternalReachabilityTlvs = []*otg.IsisLspIpv4InternalReachabilityTlv{} + } + if obj.ipv4InternalReachabilityTlvsHolder == nil { + obj.ipv4InternalReachabilityTlvsHolder = newIsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter(&obj.obj.Ipv4InternalReachabilityTlvs).setMsg(obj) + } + return obj.ipv4InternalReachabilityTlvsHolder +} + +type isisLspTlvsIsisLspIpv4InternalReachabilityTlvIter struct { + obj *isisLspTlvs + isisLspIpv4InternalReachabilityTlvSlice []IsisLspIpv4InternalReachabilityTlv + fieldPtr *[]*otg.IsisLspIpv4InternalReachabilityTlv +} + +func newIsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter(ptr *[]*otg.IsisLspIpv4InternalReachabilityTlv) IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter { + return &isisLspTlvsIsisLspIpv4InternalReachabilityTlvIter{fieldPtr: ptr} +} + +type IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter interface { + setMsg(*isisLspTlvs) IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter + Items() []IsisLspIpv4InternalReachabilityTlv + Add() IsisLspIpv4InternalReachabilityTlv + Append(items ...IsisLspIpv4InternalReachabilityTlv) IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter + Set(index int, newObj IsisLspIpv4InternalReachabilityTlv) IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter + Clear() IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter + clearHolderSlice() IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter + appendHolderSlice(item IsisLspIpv4InternalReachabilityTlv) IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter +} + +func (obj *isisLspTlvsIsisLspIpv4InternalReachabilityTlvIter) setMsg(msg *isisLspTlvs) IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspIpv4InternalReachabilityTlv{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisLspTlvsIsisLspIpv4InternalReachabilityTlvIter) Items() []IsisLspIpv4InternalReachabilityTlv { + return obj.isisLspIpv4InternalReachabilityTlvSlice +} + +func (obj *isisLspTlvsIsisLspIpv4InternalReachabilityTlvIter) Add() IsisLspIpv4InternalReachabilityTlv { + newObj := &otg.IsisLspIpv4InternalReachabilityTlv{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspIpv4InternalReachabilityTlv{obj: newObj} + newLibObj.setDefault() + obj.isisLspIpv4InternalReachabilityTlvSlice = append(obj.isisLspIpv4InternalReachabilityTlvSlice, newLibObj) + return newLibObj +} + +func (obj *isisLspTlvsIsisLspIpv4InternalReachabilityTlvIter) Append(items ...IsisLspIpv4InternalReachabilityTlv) IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspIpv4InternalReachabilityTlvSlice = append(obj.isisLspIpv4InternalReachabilityTlvSlice, item) + } + return obj +} + +func (obj *isisLspTlvsIsisLspIpv4InternalReachabilityTlvIter) Set(index int, newObj IsisLspIpv4InternalReachabilityTlv) IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspIpv4InternalReachabilityTlvSlice[index] = newObj + return obj +} +func (obj *isisLspTlvsIsisLspIpv4InternalReachabilityTlvIter) Clear() IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspIpv4InternalReachabilityTlv{} + obj.isisLspIpv4InternalReachabilityTlvSlice = []IsisLspIpv4InternalReachabilityTlv{} + } + return obj +} +func (obj *isisLspTlvsIsisLspIpv4InternalReachabilityTlvIter) clearHolderSlice() IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter { + if len(obj.isisLspIpv4InternalReachabilityTlvSlice) > 0 { + obj.isisLspIpv4InternalReachabilityTlvSlice = []IsisLspIpv4InternalReachabilityTlv{} + } + return obj +} +func (obj *isisLspTlvsIsisLspIpv4InternalReachabilityTlvIter) appendHolderSlice(item IsisLspIpv4InternalReachabilityTlv) IsisLspTlvsIsisLspIpv4InternalReachabilityTlvIter { + obj.isisLspIpv4InternalReachabilityTlvSlice = append(obj.isisLspIpv4InternalReachabilityTlvSlice, item) + return obj +} + +// Array of IPv4 External Reachability TLVs (type 130) present in this LSP. +// Ipv4ExternalReachabilityTlvs returns a []IsisLspIpv4ExternalReachabilityTlv +func (obj *isisLspTlvs) Ipv4ExternalReachabilityTlvs() IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter { + if len(obj.obj.Ipv4ExternalReachabilityTlvs) == 0 { + obj.obj.Ipv4ExternalReachabilityTlvs = []*otg.IsisLspIpv4ExternalReachabilityTlv{} + } + if obj.ipv4ExternalReachabilityTlvsHolder == nil { + obj.ipv4ExternalReachabilityTlvsHolder = newIsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter(&obj.obj.Ipv4ExternalReachabilityTlvs).setMsg(obj) + } + return obj.ipv4ExternalReachabilityTlvsHolder +} + +type isisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter struct { + obj *isisLspTlvs + isisLspIpv4ExternalReachabilityTlvSlice []IsisLspIpv4ExternalReachabilityTlv + fieldPtr *[]*otg.IsisLspIpv4ExternalReachabilityTlv +} + +func newIsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter(ptr *[]*otg.IsisLspIpv4ExternalReachabilityTlv) IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter { + return &isisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter{fieldPtr: ptr} +} + +type IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter interface { + setMsg(*isisLspTlvs) IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter + Items() []IsisLspIpv4ExternalReachabilityTlv + Add() IsisLspIpv4ExternalReachabilityTlv + Append(items ...IsisLspIpv4ExternalReachabilityTlv) IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter + Set(index int, newObj IsisLspIpv4ExternalReachabilityTlv) IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter + Clear() IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter + clearHolderSlice() IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter + appendHolderSlice(item IsisLspIpv4ExternalReachabilityTlv) IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter +} + +func (obj *isisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter) setMsg(msg *isisLspTlvs) IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspIpv4ExternalReachabilityTlv{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter) Items() []IsisLspIpv4ExternalReachabilityTlv { + return obj.isisLspIpv4ExternalReachabilityTlvSlice +} + +func (obj *isisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter) Add() IsisLspIpv4ExternalReachabilityTlv { + newObj := &otg.IsisLspIpv4ExternalReachabilityTlv{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspIpv4ExternalReachabilityTlv{obj: newObj} + newLibObj.setDefault() + obj.isisLspIpv4ExternalReachabilityTlvSlice = append(obj.isisLspIpv4ExternalReachabilityTlvSlice, newLibObj) + return newLibObj +} + +func (obj *isisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter) Append(items ...IsisLspIpv4ExternalReachabilityTlv) IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspIpv4ExternalReachabilityTlvSlice = append(obj.isisLspIpv4ExternalReachabilityTlvSlice, item) + } + return obj +} + +func (obj *isisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter) Set(index int, newObj IsisLspIpv4ExternalReachabilityTlv) IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspIpv4ExternalReachabilityTlvSlice[index] = newObj + return obj +} +func (obj *isisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter) Clear() IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspIpv4ExternalReachabilityTlv{} + obj.isisLspIpv4ExternalReachabilityTlvSlice = []IsisLspIpv4ExternalReachabilityTlv{} + } + return obj +} +func (obj *isisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter) clearHolderSlice() IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter { + if len(obj.isisLspIpv4ExternalReachabilityTlvSlice) > 0 { + obj.isisLspIpv4ExternalReachabilityTlvSlice = []IsisLspIpv4ExternalReachabilityTlv{} + } + return obj +} +func (obj *isisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter) appendHolderSlice(item IsisLspIpv4ExternalReachabilityTlv) IsisLspTlvsIsisLspIpv4ExternalReachabilityTlvIter { + obj.isisLspIpv4ExternalReachabilityTlvSlice = append(obj.isisLspIpv4ExternalReachabilityTlvSlice, item) + return obj +} + +// Array of IPv4 Extended Reachability TLVs (type 135) present in this LSP. +// ExtendedIpv4ReachabilityTlvs returns a []IsisLspExtendedIpv4ReachabilityTlv +func (obj *isisLspTlvs) ExtendedIpv4ReachabilityTlvs() IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter { + if len(obj.obj.ExtendedIpv4ReachabilityTlvs) == 0 { + obj.obj.ExtendedIpv4ReachabilityTlvs = []*otg.IsisLspExtendedIpv4ReachabilityTlv{} + } + if obj.extendedIpv4ReachabilityTlvsHolder == nil { + obj.extendedIpv4ReachabilityTlvsHolder = newIsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter(&obj.obj.ExtendedIpv4ReachabilityTlvs).setMsg(obj) + } + return obj.extendedIpv4ReachabilityTlvsHolder +} + +type isisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter struct { + obj *isisLspTlvs + isisLspExtendedIpv4ReachabilityTlvSlice []IsisLspExtendedIpv4ReachabilityTlv + fieldPtr *[]*otg.IsisLspExtendedIpv4ReachabilityTlv +} + +func newIsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter(ptr *[]*otg.IsisLspExtendedIpv4ReachabilityTlv) IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter { + return &isisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter{fieldPtr: ptr} +} + +type IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter interface { + setMsg(*isisLspTlvs) IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter + Items() []IsisLspExtendedIpv4ReachabilityTlv + Add() IsisLspExtendedIpv4ReachabilityTlv + Append(items ...IsisLspExtendedIpv4ReachabilityTlv) IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter + Set(index int, newObj IsisLspExtendedIpv4ReachabilityTlv) IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter + Clear() IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter + clearHolderSlice() IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter + appendHolderSlice(item IsisLspExtendedIpv4ReachabilityTlv) IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter +} + +func (obj *isisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter) setMsg(msg *isisLspTlvs) IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspExtendedIpv4ReachabilityTlv{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter) Items() []IsisLspExtendedIpv4ReachabilityTlv { + return obj.isisLspExtendedIpv4ReachabilityTlvSlice +} + +func (obj *isisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter) Add() IsisLspExtendedIpv4ReachabilityTlv { + newObj := &otg.IsisLspExtendedIpv4ReachabilityTlv{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspExtendedIpv4ReachabilityTlv{obj: newObj} + newLibObj.setDefault() + obj.isisLspExtendedIpv4ReachabilityTlvSlice = append(obj.isisLspExtendedIpv4ReachabilityTlvSlice, newLibObj) + return newLibObj +} + +func (obj *isisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter) Append(items ...IsisLspExtendedIpv4ReachabilityTlv) IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspExtendedIpv4ReachabilityTlvSlice = append(obj.isisLspExtendedIpv4ReachabilityTlvSlice, item) + } + return obj +} + +func (obj *isisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter) Set(index int, newObj IsisLspExtendedIpv4ReachabilityTlv) IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspExtendedIpv4ReachabilityTlvSlice[index] = newObj + return obj +} +func (obj *isisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter) Clear() IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspExtendedIpv4ReachabilityTlv{} + obj.isisLspExtendedIpv4ReachabilityTlvSlice = []IsisLspExtendedIpv4ReachabilityTlv{} + } + return obj +} +func (obj *isisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter) clearHolderSlice() IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter { + if len(obj.isisLspExtendedIpv4ReachabilityTlvSlice) > 0 { + obj.isisLspExtendedIpv4ReachabilityTlvSlice = []IsisLspExtendedIpv4ReachabilityTlv{} + } + return obj +} +func (obj *isisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter) appendHolderSlice(item IsisLspExtendedIpv4ReachabilityTlv) IsisLspTlvsIsisLspExtendedIpv4ReachabilityTlvIter { + obj.isisLspExtendedIpv4ReachabilityTlvSlice = append(obj.isisLspExtendedIpv4ReachabilityTlvSlice, item) + return obj +} + +// Array of IPv6 Reachability TLVs (type 236) present in this LSP. +// Ipv6ReachabilityTlvs returns a []IsisLspIpv6ReachabilityTlv +func (obj *isisLspTlvs) Ipv6ReachabilityTlvs() IsisLspTlvsIsisLspIpv6ReachabilityTlvIter { + if len(obj.obj.Ipv6ReachabilityTlvs) == 0 { + obj.obj.Ipv6ReachabilityTlvs = []*otg.IsisLspIpv6ReachabilityTlv{} + } + if obj.ipv6ReachabilityTlvsHolder == nil { + obj.ipv6ReachabilityTlvsHolder = newIsisLspTlvsIsisLspIpv6ReachabilityTlvIter(&obj.obj.Ipv6ReachabilityTlvs).setMsg(obj) + } + return obj.ipv6ReachabilityTlvsHolder +} + +type isisLspTlvsIsisLspIpv6ReachabilityTlvIter struct { + obj *isisLspTlvs + isisLspIpv6ReachabilityTlvSlice []IsisLspIpv6ReachabilityTlv + fieldPtr *[]*otg.IsisLspIpv6ReachabilityTlv +} + +func newIsisLspTlvsIsisLspIpv6ReachabilityTlvIter(ptr *[]*otg.IsisLspIpv6ReachabilityTlv) IsisLspTlvsIsisLspIpv6ReachabilityTlvIter { + return &isisLspTlvsIsisLspIpv6ReachabilityTlvIter{fieldPtr: ptr} +} + +type IsisLspTlvsIsisLspIpv6ReachabilityTlvIter interface { + setMsg(*isisLspTlvs) IsisLspTlvsIsisLspIpv6ReachabilityTlvIter + Items() []IsisLspIpv6ReachabilityTlv + Add() IsisLspIpv6ReachabilityTlv + Append(items ...IsisLspIpv6ReachabilityTlv) IsisLspTlvsIsisLspIpv6ReachabilityTlvIter + Set(index int, newObj IsisLspIpv6ReachabilityTlv) IsisLspTlvsIsisLspIpv6ReachabilityTlvIter + Clear() IsisLspTlvsIsisLspIpv6ReachabilityTlvIter + clearHolderSlice() IsisLspTlvsIsisLspIpv6ReachabilityTlvIter + appendHolderSlice(item IsisLspIpv6ReachabilityTlv) IsisLspTlvsIsisLspIpv6ReachabilityTlvIter +} + +func (obj *isisLspTlvsIsisLspIpv6ReachabilityTlvIter) setMsg(msg *isisLspTlvs) IsisLspTlvsIsisLspIpv6ReachabilityTlvIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspIpv6ReachabilityTlv{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisLspTlvsIsisLspIpv6ReachabilityTlvIter) Items() []IsisLspIpv6ReachabilityTlv { + return obj.isisLspIpv6ReachabilityTlvSlice +} + +func (obj *isisLspTlvsIsisLspIpv6ReachabilityTlvIter) Add() IsisLspIpv6ReachabilityTlv { + newObj := &otg.IsisLspIpv6ReachabilityTlv{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspIpv6ReachabilityTlv{obj: newObj} + newLibObj.setDefault() + obj.isisLspIpv6ReachabilityTlvSlice = append(obj.isisLspIpv6ReachabilityTlvSlice, newLibObj) + return newLibObj +} + +func (obj *isisLspTlvsIsisLspIpv6ReachabilityTlvIter) Append(items ...IsisLspIpv6ReachabilityTlv) IsisLspTlvsIsisLspIpv6ReachabilityTlvIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspIpv6ReachabilityTlvSlice = append(obj.isisLspIpv6ReachabilityTlvSlice, item) + } + return obj +} + +func (obj *isisLspTlvsIsisLspIpv6ReachabilityTlvIter) Set(index int, newObj IsisLspIpv6ReachabilityTlv) IsisLspTlvsIsisLspIpv6ReachabilityTlvIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspIpv6ReachabilityTlvSlice[index] = newObj + return obj +} +func (obj *isisLspTlvsIsisLspIpv6ReachabilityTlvIter) Clear() IsisLspTlvsIsisLspIpv6ReachabilityTlvIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspIpv6ReachabilityTlv{} + obj.isisLspIpv6ReachabilityTlvSlice = []IsisLspIpv6ReachabilityTlv{} + } + return obj +} +func (obj *isisLspTlvsIsisLspIpv6ReachabilityTlvIter) clearHolderSlice() IsisLspTlvsIsisLspIpv6ReachabilityTlvIter { + if len(obj.isisLspIpv6ReachabilityTlvSlice) > 0 { + obj.isisLspIpv6ReachabilityTlvSlice = []IsisLspIpv6ReachabilityTlv{} + } + return obj +} +func (obj *isisLspTlvsIsisLspIpv6ReachabilityTlvIter) appendHolderSlice(item IsisLspIpv6ReachabilityTlv) IsisLspTlvsIsisLspIpv6ReachabilityTlvIter { + obj.isisLspIpv6ReachabilityTlvSlice = append(obj.isisLspIpv6ReachabilityTlvSlice, item) + return obj +} + +func (obj *isisLspTlvs) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.HostnameTlvs) != 0 { + + if set_default { + obj.HostnameTlvs().clearHolderSlice() + for _, item := range obj.obj.HostnameTlvs { + obj.HostnameTlvs().appendHolderSlice(&isisLspHostname{obj: item}) + } + } + for _, item := range obj.HostnameTlvs().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.IsReachabilityTlvs) != 0 { + + if set_default { + obj.IsReachabilityTlvs().clearHolderSlice() + for _, item := range obj.obj.IsReachabilityTlvs { + obj.IsReachabilityTlvs().appendHolderSlice(&isisLspIsReachabilityTlv{obj: item}) + } + } + for _, item := range obj.IsReachabilityTlvs().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.ExtendedIsReachabilityTlvs) != 0 { + + if set_default { + obj.ExtendedIsReachabilityTlvs().clearHolderSlice() + for _, item := range obj.obj.ExtendedIsReachabilityTlvs { + obj.ExtendedIsReachabilityTlvs().appendHolderSlice(&isisLspExtendedIsReachabilityTlv{obj: item}) + } + } + for _, item := range obj.ExtendedIsReachabilityTlvs().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ipv4InternalReachabilityTlvs) != 0 { + + if set_default { + obj.Ipv4InternalReachabilityTlvs().clearHolderSlice() + for _, item := range obj.obj.Ipv4InternalReachabilityTlvs { + obj.Ipv4InternalReachabilityTlvs().appendHolderSlice(&isisLspIpv4InternalReachabilityTlv{obj: item}) + } + } + for _, item := range obj.Ipv4InternalReachabilityTlvs().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ipv4ExternalReachabilityTlvs) != 0 { + + if set_default { + obj.Ipv4ExternalReachabilityTlvs().clearHolderSlice() + for _, item := range obj.obj.Ipv4ExternalReachabilityTlvs { + obj.Ipv4ExternalReachabilityTlvs().appendHolderSlice(&isisLspIpv4ExternalReachabilityTlv{obj: item}) + } + } + for _, item := range obj.Ipv4ExternalReachabilityTlvs().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.ExtendedIpv4ReachabilityTlvs) != 0 { + + if set_default { + obj.ExtendedIpv4ReachabilityTlvs().clearHolderSlice() + for _, item := range obj.obj.ExtendedIpv4ReachabilityTlvs { + obj.ExtendedIpv4ReachabilityTlvs().appendHolderSlice(&isisLspExtendedIpv4ReachabilityTlv{obj: item}) + } + } + for _, item := range obj.ExtendedIpv4ReachabilityTlvs().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ipv6ReachabilityTlvs) != 0 { + + if set_default { + obj.Ipv6ReachabilityTlvs().clearHolderSlice() + for _, item := range obj.obj.Ipv6ReachabilityTlvs { + obj.Ipv6ReachabilityTlvs().appendHolderSlice(&isisLspIpv6ReachabilityTlv{obj: item}) + } + } + for _, item := range obj.Ipv6ReachabilityTlvs().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *isisLspTlvs) setDefault() { + +} diff --git a/gosnappi/isis_lsp_v4_prefix.go b/gosnappi/isis_lsp_v4_prefix.go new file mode 100644 index 00000000..eb5e0b25 --- /dev/null +++ b/gosnappi/isis_lsp_v4_prefix.go @@ -0,0 +1,458 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspV4Prefix ***** +type isisLspV4Prefix struct { + validation + obj *otg.IsisLspV4Prefix + marshaller marshalIsisLspV4Prefix + unMarshaller unMarshalIsisLspV4Prefix +} + +func NewIsisLspV4Prefix() IsisLspV4Prefix { + obj := isisLspV4Prefix{obj: &otg.IsisLspV4Prefix{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspV4Prefix) msg() *otg.IsisLspV4Prefix { + return obj.obj +} + +func (obj *isisLspV4Prefix) setMsg(msg *otg.IsisLspV4Prefix) IsisLspV4Prefix { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspV4Prefix struct { + obj *isisLspV4Prefix +} + +type marshalIsisLspV4Prefix interface { + // ToProto marshals IsisLspV4Prefix to protobuf object *otg.IsisLspV4Prefix + ToProto() (*otg.IsisLspV4Prefix, error) + // ToPbText marshals IsisLspV4Prefix to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspV4Prefix to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspV4Prefix to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspV4Prefix struct { + obj *isisLspV4Prefix +} + +type unMarshalIsisLspV4Prefix interface { + // FromProto unmarshals IsisLspV4Prefix from protobuf object *otg.IsisLspV4Prefix + FromProto(msg *otg.IsisLspV4Prefix) (IsisLspV4Prefix, error) + // FromPbText unmarshals IsisLspV4Prefix from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspV4Prefix from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspV4Prefix from JSON text + FromJson(value string) error +} + +func (obj *isisLspV4Prefix) Marshal() marshalIsisLspV4Prefix { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspV4Prefix{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspV4Prefix) Unmarshal() unMarshalIsisLspV4Prefix { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspV4Prefix{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspV4Prefix) ToProto() (*otg.IsisLspV4Prefix, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspV4Prefix) FromProto(msg *otg.IsisLspV4Prefix) (IsisLspV4Prefix, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspV4Prefix) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspV4Prefix) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspV4Prefix) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspV4Prefix) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspV4Prefix) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspV4Prefix) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspV4Prefix) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspV4Prefix) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspV4Prefix) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspV4Prefix) Clone() (IsisLspV4Prefix, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspV4Prefix() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisLspV4Prefix is this group defines attributes of an IPv4 standard prefix. +type IsisLspV4Prefix interface { + Validation + // msg marshals IsisLspV4Prefix to protobuf object *otg.IsisLspV4Prefix + // and doesn't set defaults + msg() *otg.IsisLspV4Prefix + // setMsg unmarshals IsisLspV4Prefix from protobuf object *otg.IsisLspV4Prefix + // and doesn't set defaults + setMsg(*otg.IsisLspV4Prefix) IsisLspV4Prefix + // provides marshal interface + Marshal() marshalIsisLspV4Prefix + // provides unmarshal interface + Unmarshal() unMarshalIsisLspV4Prefix + // validate validates IsisLspV4Prefix + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspV4Prefix, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv4Address returns string, set in IsisLspV4Prefix. + Ipv4Address() string + // SetIpv4Address assigns string provided by user to IsisLspV4Prefix + SetIpv4Address(value string) IsisLspV4Prefix + // HasIpv4Address checks if Ipv4Address has been set in IsisLspV4Prefix + HasIpv4Address() bool + // PrefixLength returns uint32, set in IsisLspV4Prefix. + PrefixLength() uint32 + // SetPrefixLength assigns uint32 provided by user to IsisLspV4Prefix + SetPrefixLength(value uint32) IsisLspV4Prefix + // HasPrefixLength checks if PrefixLength has been set in IsisLspV4Prefix + HasPrefixLength() bool + // RedistributionType returns IsisLspV4PrefixRedistributionTypeEnum, set in IsisLspV4Prefix + RedistributionType() IsisLspV4PrefixRedistributionTypeEnum + // SetRedistributionType assigns IsisLspV4PrefixRedistributionTypeEnum provided by user to IsisLspV4Prefix + SetRedistributionType(value IsisLspV4PrefixRedistributionTypeEnum) IsisLspV4Prefix + // HasRedistributionType checks if RedistributionType has been set in IsisLspV4Prefix + HasRedistributionType() bool + // DefaultMetric returns uint32, set in IsisLspV4Prefix. + DefaultMetric() uint32 + // SetDefaultMetric assigns uint32 provided by user to IsisLspV4Prefix + SetDefaultMetric(value uint32) IsisLspV4Prefix + // HasDefaultMetric checks if DefaultMetric has been set in IsisLspV4Prefix + HasDefaultMetric() bool + // OriginType returns IsisLspV4PrefixOriginTypeEnum, set in IsisLspV4Prefix + OriginType() IsisLspV4PrefixOriginTypeEnum + // SetOriginType assigns IsisLspV4PrefixOriginTypeEnum provided by user to IsisLspV4Prefix + SetOriginType(value IsisLspV4PrefixOriginTypeEnum) IsisLspV4Prefix + // HasOriginType checks if OriginType has been set in IsisLspV4Prefix + HasOriginType() bool +} + +// An IPv4 unicast prefix reachable via the originator of this LSP. +// Ipv4Address returns a string +func (obj *isisLspV4Prefix) Ipv4Address() string { + + return *obj.obj.Ipv4Address + +} + +// An IPv4 unicast prefix reachable via the originator of this LSP. +// Ipv4Address returns a string +func (obj *isisLspV4Prefix) HasIpv4Address() bool { + return obj.obj.Ipv4Address != nil +} + +// An IPv4 unicast prefix reachable via the originator of this LSP. +// SetIpv4Address sets the string value in the IsisLspV4Prefix object +func (obj *isisLspV4Prefix) SetIpv4Address(value string) IsisLspV4Prefix { + + obj.obj.Ipv4Address = &value + return obj +} + +// The length of the IPv4 prefix. +// PrefixLength returns a uint32 +func (obj *isisLspV4Prefix) PrefixLength() uint32 { + + return *obj.obj.PrefixLength + +} + +// The length of the IPv4 prefix. +// PrefixLength returns a uint32 +func (obj *isisLspV4Prefix) HasPrefixLength() bool { + return obj.obj.PrefixLength != nil +} + +// The length of the IPv4 prefix. +// SetPrefixLength sets the uint32 value in the IsisLspV4Prefix object +func (obj *isisLspV4Prefix) SetPrefixLength(value uint32) IsisLspV4Prefix { + + obj.obj.PrefixLength = &value + return obj +} + +type IsisLspV4PrefixRedistributionTypeEnum string + +// Enum of RedistributionType on IsisLspV4Prefix +var IsisLspV4PrefixRedistributionType = struct { + UP IsisLspV4PrefixRedistributionTypeEnum + DOWN IsisLspV4PrefixRedistributionTypeEnum +}{ + UP: IsisLspV4PrefixRedistributionTypeEnum("up"), + DOWN: IsisLspV4PrefixRedistributionTypeEnum("down"), +} + +func (obj *isisLspV4Prefix) RedistributionType() IsisLspV4PrefixRedistributionTypeEnum { + return IsisLspV4PrefixRedistributionTypeEnum(obj.obj.RedistributionType.Enum().String()) +} + +// Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, +// and for all other prefixes in L1 and L2 LSPs. (default) +// Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. +// The prefixes are being advertised from a higher level (L2) down to a lower level (L1). +// RedistributionType returns a string +func (obj *isisLspV4Prefix) HasRedistributionType() bool { + return obj.obj.RedistributionType != nil +} + +func (obj *isisLspV4Prefix) SetRedistributionType(value IsisLspV4PrefixRedistributionTypeEnum) IsisLspV4Prefix { + intValue, ok := otg.IsisLspV4Prefix_RedistributionType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on IsisLspV4PrefixRedistributionTypeEnum", string(value))) + return obj + } + enumValue := otg.IsisLspV4Prefix_RedistributionType_Enum(intValue) + obj.obj.RedistributionType = &enumValue + + return obj +} + +// ISIS default metric value. +// DefaultMetric returns a uint32 +func (obj *isisLspV4Prefix) DefaultMetric() uint32 { + + return *obj.obj.DefaultMetric + +} + +// ISIS default metric value. +// DefaultMetric returns a uint32 +func (obj *isisLspV4Prefix) HasDefaultMetric() bool { + return obj.obj.DefaultMetric != nil +} + +// ISIS default metric value. +// SetDefaultMetric sets the uint32 value in the IsisLspV4Prefix object +func (obj *isisLspV4Prefix) SetDefaultMetric(value uint32) IsisLspV4Prefix { + + obj.obj.DefaultMetric = &value + return obj +} + +type IsisLspV4PrefixOriginTypeEnum string + +// Enum of OriginType on IsisLspV4Prefix +var IsisLspV4PrefixOriginType = struct { + INTERNAL IsisLspV4PrefixOriginTypeEnum + EXTERNAL IsisLspV4PrefixOriginTypeEnum +}{ + INTERNAL: IsisLspV4PrefixOriginTypeEnum("internal"), + EXTERNAL: IsisLspV4PrefixOriginTypeEnum("external"), +} + +func (obj *isisLspV4Prefix) OriginType() IsisLspV4PrefixOriginTypeEnum { + return IsisLspV4PrefixOriginTypeEnum(obj.obj.OriginType.Enum().String()) +} + +// The origin of the advertised route-internal or external to the ISIS area. Options include the following: +// Internal-for intra-area routes, through Level 1 LSPs. +// External-for inter-area routes redistributed within L1, through Level +// 1 LSPs. +// OriginType returns a string +func (obj *isisLspV4Prefix) HasOriginType() bool { + return obj.obj.OriginType != nil +} + +func (obj *isisLspV4Prefix) SetOriginType(value IsisLspV4PrefixOriginTypeEnum) IsisLspV4Prefix { + intValue, ok := otg.IsisLspV4Prefix_OriginType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on IsisLspV4PrefixOriginTypeEnum", string(value))) + return obj + } + enumValue := otg.IsisLspV4Prefix_OriginType_Enum(intValue) + obj.obj.OriginType = &enumValue + + return obj +} + +func (obj *isisLspV4Prefix) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.PrefixLength != nil { + + if *obj.obj.PrefixLength > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= IsisLspV4Prefix.PrefixLength <= 32 but Got %d", *obj.obj.PrefixLength)) + } + + } + +} + +func (obj *isisLspV4Prefix) setDefault() { + +} diff --git a/gosnappi/isis_lsp_v6_prefix.go b/gosnappi/isis_lsp_v6_prefix.go new file mode 100644 index 00000000..f91f5816 --- /dev/null +++ b/gosnappi/isis_lsp_v6_prefix.go @@ -0,0 +1,517 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspV6Prefix ***** +type isisLspV6Prefix struct { + validation + obj *otg.IsisLspV6Prefix + marshaller marshalIsisLspV6Prefix + unMarshaller unMarshalIsisLspV6Prefix + prefixAttributesHolder IsisLspPrefixAttributes +} + +func NewIsisLspV6Prefix() IsisLspV6Prefix { + obj := isisLspV6Prefix{obj: &otg.IsisLspV6Prefix{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspV6Prefix) msg() *otg.IsisLspV6Prefix { + return obj.obj +} + +func (obj *isisLspV6Prefix) setMsg(msg *otg.IsisLspV6Prefix) IsisLspV6Prefix { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspV6Prefix struct { + obj *isisLspV6Prefix +} + +type marshalIsisLspV6Prefix interface { + // ToProto marshals IsisLspV6Prefix to protobuf object *otg.IsisLspV6Prefix + ToProto() (*otg.IsisLspV6Prefix, error) + // ToPbText marshals IsisLspV6Prefix to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspV6Prefix to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspV6Prefix to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspV6Prefix struct { + obj *isisLspV6Prefix +} + +type unMarshalIsisLspV6Prefix interface { + // FromProto unmarshals IsisLspV6Prefix from protobuf object *otg.IsisLspV6Prefix + FromProto(msg *otg.IsisLspV6Prefix) (IsisLspV6Prefix, error) + // FromPbText unmarshals IsisLspV6Prefix from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspV6Prefix from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspV6Prefix from JSON text + FromJson(value string) error +} + +func (obj *isisLspV6Prefix) Marshal() marshalIsisLspV6Prefix { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspV6Prefix{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspV6Prefix) Unmarshal() unMarshalIsisLspV6Prefix { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspV6Prefix{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspV6Prefix) ToProto() (*otg.IsisLspV6Prefix, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspV6Prefix) FromProto(msg *otg.IsisLspV6Prefix) (IsisLspV6Prefix, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspV6Prefix) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspV6Prefix) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspV6Prefix) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspV6Prefix) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspV6Prefix) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspV6Prefix) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspV6Prefix) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspV6Prefix) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspV6Prefix) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspV6Prefix) Clone() (IsisLspV6Prefix, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspV6Prefix() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisLspV6Prefix) setNil() { + obj.prefixAttributesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisLspV6Prefix is it defines attributes of an IPv6 standard prefix. +type IsisLspV6Prefix interface { + Validation + // msg marshals IsisLspV6Prefix to protobuf object *otg.IsisLspV6Prefix + // and doesn't set defaults + msg() *otg.IsisLspV6Prefix + // setMsg unmarshals IsisLspV6Prefix from protobuf object *otg.IsisLspV6Prefix + // and doesn't set defaults + setMsg(*otg.IsisLspV6Prefix) IsisLspV6Prefix + // provides marshal interface + Marshal() marshalIsisLspV6Prefix + // provides unmarshal interface + Unmarshal() unMarshalIsisLspV6Prefix + // validate validates IsisLspV6Prefix + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspV6Prefix, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv6Address returns string, set in IsisLspV6Prefix. + Ipv6Address() string + // SetIpv6Address assigns string provided by user to IsisLspV6Prefix + SetIpv6Address(value string) IsisLspV6Prefix + // HasIpv6Address checks if Ipv6Address has been set in IsisLspV6Prefix + HasIpv6Address() bool + // PrefixLength returns uint32, set in IsisLspV6Prefix. + PrefixLength() uint32 + // SetPrefixLength assigns uint32 provided by user to IsisLspV6Prefix + SetPrefixLength(value uint32) IsisLspV6Prefix + // HasPrefixLength checks if PrefixLength has been set in IsisLspV6Prefix + HasPrefixLength() bool + // Metric returns uint32, set in IsisLspV6Prefix. + Metric() uint32 + // SetMetric assigns uint32 provided by user to IsisLspV6Prefix + SetMetric(value uint32) IsisLspV6Prefix + // HasMetric checks if Metric has been set in IsisLspV6Prefix + HasMetric() bool + // RedistributionType returns IsisLspV6PrefixRedistributionTypeEnum, set in IsisLspV6Prefix + RedistributionType() IsisLspV6PrefixRedistributionTypeEnum + // SetRedistributionType assigns IsisLspV6PrefixRedistributionTypeEnum provided by user to IsisLspV6Prefix + SetRedistributionType(value IsisLspV6PrefixRedistributionTypeEnum) IsisLspV6Prefix + // HasRedistributionType checks if RedistributionType has been set in IsisLspV6Prefix + HasRedistributionType() bool + // OriginType returns IsisLspV6PrefixOriginTypeEnum, set in IsisLspV6Prefix + OriginType() IsisLspV6PrefixOriginTypeEnum + // SetOriginType assigns IsisLspV6PrefixOriginTypeEnum provided by user to IsisLspV6Prefix + SetOriginType(value IsisLspV6PrefixOriginTypeEnum) IsisLspV6Prefix + // HasOriginType checks if OriginType has been set in IsisLspV6Prefix + HasOriginType() bool + // PrefixAttributes returns IsisLspPrefixAttributes, set in IsisLspV6Prefix. + // IsisLspPrefixAttributes is this contains the properties of ISIS Prefix attributes for the extended IPv4 and IPv6 reachability. https://www.rfc-editor.org/rfc/rfc7794.html + PrefixAttributes() IsisLspPrefixAttributes + // SetPrefixAttributes assigns IsisLspPrefixAttributes provided by user to IsisLspV6Prefix. + // IsisLspPrefixAttributes is this contains the properties of ISIS Prefix attributes for the extended IPv4 and IPv6 reachability. https://www.rfc-editor.org/rfc/rfc7794.html + SetPrefixAttributes(value IsisLspPrefixAttributes) IsisLspV6Prefix + // HasPrefixAttributes checks if PrefixAttributes has been set in IsisLspV6Prefix + HasPrefixAttributes() bool + setNil() +} + +// An IPv6 unicast prefix reachable via the originator of this LSP. +// Ipv6Address returns a string +func (obj *isisLspV6Prefix) Ipv6Address() string { + + return *obj.obj.Ipv6Address + +} + +// An IPv6 unicast prefix reachable via the originator of this LSP. +// Ipv6Address returns a string +func (obj *isisLspV6Prefix) HasIpv6Address() bool { + return obj.obj.Ipv6Address != nil +} + +// An IPv6 unicast prefix reachable via the originator of this LSP. +// SetIpv6Address sets the string value in the IsisLspV6Prefix object +func (obj *isisLspV6Prefix) SetIpv6Address(value string) IsisLspV6Prefix { + + obj.obj.Ipv6Address = &value + return obj +} + +// The length of the IPv6 prefix. +// PrefixLength returns a uint32 +func (obj *isisLspV6Prefix) PrefixLength() uint32 { + + return *obj.obj.PrefixLength + +} + +// The length of the IPv6 prefix. +// PrefixLength returns a uint32 +func (obj *isisLspV6Prefix) HasPrefixLength() bool { + return obj.obj.PrefixLength != nil +} + +// The length of the IPv6 prefix. +// SetPrefixLength sets the uint32 value in the IsisLspV6Prefix object +func (obj *isisLspV6Prefix) SetPrefixLength(value uint32) IsisLspV6Prefix { + + obj.obj.PrefixLength = &value + return obj +} + +// ISIS wide metric. +// Metric returns a uint32 +func (obj *isisLspV6Prefix) Metric() uint32 { + + return *obj.obj.Metric + +} + +// ISIS wide metric. +// Metric returns a uint32 +func (obj *isisLspV6Prefix) HasMetric() bool { + return obj.obj.Metric != nil +} + +// ISIS wide metric. +// SetMetric sets the uint32 value in the IsisLspV6Prefix object +func (obj *isisLspV6Prefix) SetMetric(value uint32) IsisLspV6Prefix { + + obj.obj.Metric = &value + return obj +} + +type IsisLspV6PrefixRedistributionTypeEnum string + +// Enum of RedistributionType on IsisLspV6Prefix +var IsisLspV6PrefixRedistributionType = struct { + UP IsisLspV6PrefixRedistributionTypeEnum + DOWN IsisLspV6PrefixRedistributionTypeEnum +}{ + UP: IsisLspV6PrefixRedistributionTypeEnum("up"), + DOWN: IsisLspV6PrefixRedistributionTypeEnum("down"), +} + +func (obj *isisLspV6Prefix) RedistributionType() IsisLspV6PrefixRedistributionTypeEnum { + return IsisLspV6PrefixRedistributionTypeEnum(obj.obj.RedistributionType.Enum().String()) +} + +// Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, +// and for all other prefixes in L1 and L2 LSPs. (default) +// Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. +// The prefixes are being advertised from a higher level (L2) down to a lower level (L1). +// RedistributionType returns a string +func (obj *isisLspV6Prefix) HasRedistributionType() bool { + return obj.obj.RedistributionType != nil +} + +func (obj *isisLspV6Prefix) SetRedistributionType(value IsisLspV6PrefixRedistributionTypeEnum) IsisLspV6Prefix { + intValue, ok := otg.IsisLspV6Prefix_RedistributionType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on IsisLspV6PrefixRedistributionTypeEnum", string(value))) + return obj + } + enumValue := otg.IsisLspV6Prefix_RedistributionType_Enum(intValue) + obj.obj.RedistributionType = &enumValue + + return obj +} + +type IsisLspV6PrefixOriginTypeEnum string + +// Enum of OriginType on IsisLspV6Prefix +var IsisLspV6PrefixOriginType = struct { + INTERNAL IsisLspV6PrefixOriginTypeEnum + EXTERNAL IsisLspV6PrefixOriginTypeEnum +}{ + INTERNAL: IsisLspV6PrefixOriginTypeEnum("internal"), + EXTERNAL: IsisLspV6PrefixOriginTypeEnum("external"), +} + +func (obj *isisLspV6Prefix) OriginType() IsisLspV6PrefixOriginTypeEnum { + return IsisLspV6PrefixOriginTypeEnum(obj.obj.OriginType.Enum().String()) +} + +// The origin of the advertised route-internal or external to the ISIS area. Options include the following: +// Internal-for intra-area routes, through Level 1 LSPs. +// External-for inter-area routes redistributed within L1, through Level +// 1 LSPs. +// OriginType returns a string +func (obj *isisLspV6Prefix) HasOriginType() bool { + return obj.obj.OriginType != nil +} + +func (obj *isisLspV6Prefix) SetOriginType(value IsisLspV6PrefixOriginTypeEnum) IsisLspV6Prefix { + intValue, ok := otg.IsisLspV6Prefix_OriginType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on IsisLspV6PrefixOriginTypeEnum", string(value))) + return obj + } + enumValue := otg.IsisLspV6Prefix_OriginType_Enum(intValue) + obj.obj.OriginType = &enumValue + + return obj +} + +// description is TBD +// PrefixAttributes returns a IsisLspPrefixAttributes +func (obj *isisLspV6Prefix) PrefixAttributes() IsisLspPrefixAttributes { + if obj.obj.PrefixAttributes == nil { + obj.obj.PrefixAttributes = NewIsisLspPrefixAttributes().msg() + } + if obj.prefixAttributesHolder == nil { + obj.prefixAttributesHolder = &isisLspPrefixAttributes{obj: obj.obj.PrefixAttributes} + } + return obj.prefixAttributesHolder +} + +// description is TBD +// PrefixAttributes returns a IsisLspPrefixAttributes +func (obj *isisLspV6Prefix) HasPrefixAttributes() bool { + return obj.obj.PrefixAttributes != nil +} + +// description is TBD +// SetPrefixAttributes sets the IsisLspPrefixAttributes value in the IsisLspV6Prefix object +func (obj *isisLspV6Prefix) SetPrefixAttributes(value IsisLspPrefixAttributes) IsisLspV6Prefix { + + obj.prefixAttributesHolder = nil + obj.obj.PrefixAttributes = value.msg() + + return obj +} + +func (obj *isisLspV6Prefix) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv6Address != nil { + + err := obj.validateIpv6(obj.Ipv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on IsisLspV6Prefix.Ipv6Address")) + } + + } + + if obj.obj.PrefixLength != nil { + + if *obj.obj.PrefixLength > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= IsisLspV6Prefix.PrefixLength <= 128 but Got %d", *obj.obj.PrefixLength)) + } + + } + + if obj.obj.PrefixAttributes != nil { + + obj.PrefixAttributes().validateObj(vObj, set_default) + } + +} + +func (obj *isisLspV6Prefix) setDefault() { + +} diff --git a/gosnappi/isis_lspneighbor.go b/gosnappi/isis_lspneighbor.go new file mode 100644 index 00000000..8f8b78f9 --- /dev/null +++ b/gosnappi/isis_lspneighbor.go @@ -0,0 +1,315 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspneighbor ***** +type isisLspneighbor struct { + validation + obj *otg.IsisLspneighbor + marshaller marshalIsisLspneighbor + unMarshaller unMarshalIsisLspneighbor +} + +func NewIsisLspneighbor() IsisLspneighbor { + obj := isisLspneighbor{obj: &otg.IsisLspneighbor{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspneighbor) msg() *otg.IsisLspneighbor { + return obj.obj +} + +func (obj *isisLspneighbor) setMsg(msg *otg.IsisLspneighbor) IsisLspneighbor { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspneighbor struct { + obj *isisLspneighbor +} + +type marshalIsisLspneighbor interface { + // ToProto marshals IsisLspneighbor to protobuf object *otg.IsisLspneighbor + ToProto() (*otg.IsisLspneighbor, error) + // ToPbText marshals IsisLspneighbor to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspneighbor to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspneighbor to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspneighbor struct { + obj *isisLspneighbor +} + +type unMarshalIsisLspneighbor interface { + // FromProto unmarshals IsisLspneighbor from protobuf object *otg.IsisLspneighbor + FromProto(msg *otg.IsisLspneighbor) (IsisLspneighbor, error) + // FromPbText unmarshals IsisLspneighbor from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspneighbor from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspneighbor from JSON text + FromJson(value string) error +} + +func (obj *isisLspneighbor) Marshal() marshalIsisLspneighbor { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspneighbor{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspneighbor) Unmarshal() unMarshalIsisLspneighbor { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspneighbor{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspneighbor) ToProto() (*otg.IsisLspneighbor, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspneighbor) FromProto(msg *otg.IsisLspneighbor) (IsisLspneighbor, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspneighbor) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspneighbor) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspneighbor) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspneighbor) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspneighbor) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspneighbor) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspneighbor) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspneighbor) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspneighbor) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspneighbor) Clone() (IsisLspneighbor, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspneighbor() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisLspneighbor is this contains IS neighbors. +type IsisLspneighbor interface { + Validation + // msg marshals IsisLspneighbor to protobuf object *otg.IsisLspneighbor + // and doesn't set defaults + msg() *otg.IsisLspneighbor + // setMsg unmarshals IsisLspneighbor from protobuf object *otg.IsisLspneighbor + // and doesn't set defaults + setMsg(*otg.IsisLspneighbor) IsisLspneighbor + // provides marshal interface + Marshal() marshalIsisLspneighbor + // provides unmarshal interface + Unmarshal() unMarshalIsisLspneighbor + // validate validates IsisLspneighbor + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspneighbor, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // SystemId returns string, set in IsisLspneighbor. + SystemId() string + // SetSystemId assigns string provided by user to IsisLspneighbor + SetSystemId(value string) IsisLspneighbor + // HasSystemId checks if SystemId has been set in IsisLspneighbor + HasSystemId() bool +} + +// The System ID for this emulated ISIS router, e.g. "640100010000". +// SystemId returns a string +func (obj *isisLspneighbor) SystemId() string { + + return *obj.obj.SystemId + +} + +// The System ID for this emulated ISIS router, e.g. "640100010000". +// SystemId returns a string +func (obj *isisLspneighbor) HasSystemId() bool { + return obj.obj.SystemId != nil +} + +// The System ID for this emulated ISIS router, e.g. "640100010000". +// SetSystemId sets the string value in the IsisLspneighbor object +func (obj *isisLspneighbor) SetSystemId(value string) IsisLspneighbor { + + obj.obj.SystemId = &value + return obj +} + +func (obj *isisLspneighbor) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.SystemId != nil { + + err := obj.validateHex(obj.SystemId()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on IsisLspneighbor.SystemId")) + } + + } + +} + +func (obj *isisLspneighbor) setDefault() { + +} diff --git a/gosnappi/isis_lsps_state.go b/gosnappi/isis_lsps_state.go new file mode 100644 index 00000000..228ff4ee --- /dev/null +++ b/gosnappi/isis_lsps_state.go @@ -0,0 +1,418 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspsState ***** +type isisLspsState struct { + validation + obj *otg.IsisLspsState + marshaller marshalIsisLspsState + unMarshaller unMarshalIsisLspsState + lspsHolder IsisLspsStateIsisLspStateIter +} + +func NewIsisLspsState() IsisLspsState { + obj := isisLspsState{obj: &otg.IsisLspsState{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspsState) msg() *otg.IsisLspsState { + return obj.obj +} + +func (obj *isisLspsState) setMsg(msg *otg.IsisLspsState) IsisLspsState { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspsState struct { + obj *isisLspsState +} + +type marshalIsisLspsState interface { + // ToProto marshals IsisLspsState to protobuf object *otg.IsisLspsState + ToProto() (*otg.IsisLspsState, error) + // ToPbText marshals IsisLspsState to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspsState to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspsState to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspsState struct { + obj *isisLspsState +} + +type unMarshalIsisLspsState interface { + // FromProto unmarshals IsisLspsState from protobuf object *otg.IsisLspsState + FromProto(msg *otg.IsisLspsState) (IsisLspsState, error) + // FromPbText unmarshals IsisLspsState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspsState from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspsState from JSON text + FromJson(value string) error +} + +func (obj *isisLspsState) Marshal() marshalIsisLspsState { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspsState{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspsState) Unmarshal() unMarshalIsisLspsState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspsState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspsState) ToProto() (*otg.IsisLspsState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspsState) FromProto(msg *otg.IsisLspsState) (IsisLspsState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspsState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspsState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspsState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspsState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspsState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspsState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspsState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspsState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspsState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspsState) Clone() (IsisLspsState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspsState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisLspsState) setNil() { + obj.lspsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisLspsState is the result of ISIS LSP information that are retrieved. +type IsisLspsState interface { + Validation + // msg marshals IsisLspsState to protobuf object *otg.IsisLspsState + // and doesn't set defaults + msg() *otg.IsisLspsState + // setMsg unmarshals IsisLspsState from protobuf object *otg.IsisLspsState + // and doesn't set defaults + setMsg(*otg.IsisLspsState) IsisLspsState + // provides marshal interface + Marshal() marshalIsisLspsState + // provides unmarshal interface + Unmarshal() unMarshalIsisLspsState + // validate validates IsisLspsState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspsState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // IsisRouterName returns string, set in IsisLspsState. + IsisRouterName() string + // SetIsisRouterName assigns string provided by user to IsisLspsState + SetIsisRouterName(value string) IsisLspsState + // HasIsisRouterName checks if IsisRouterName has been set in IsisLspsState + HasIsisRouterName() bool + // Lsps returns IsisLspsStateIsisLspStateIterIter, set in IsisLspsState + Lsps() IsisLspsStateIsisLspStateIter + setNil() +} + +// The name of the ISIS Router. +// IsisRouterName returns a string +func (obj *isisLspsState) IsisRouterName() string { + + return *obj.obj.IsisRouterName + +} + +// The name of the ISIS Router. +// IsisRouterName returns a string +func (obj *isisLspsState) HasIsisRouterName() bool { + return obj.obj.IsisRouterName != nil +} + +// The name of the ISIS Router. +// SetIsisRouterName sets the string value in the IsisLspsState object +func (obj *isisLspsState) SetIsisRouterName(value string) IsisLspsState { + + obj.obj.IsisRouterName = &value + return obj +} + +// One or more LSPs that are learned by this ISIS router. +// Lsps returns a []IsisLspState +func (obj *isisLspsState) Lsps() IsisLspsStateIsisLspStateIter { + if len(obj.obj.Lsps) == 0 { + obj.obj.Lsps = []*otg.IsisLspState{} + } + if obj.lspsHolder == nil { + obj.lspsHolder = newIsisLspsStateIsisLspStateIter(&obj.obj.Lsps).setMsg(obj) + } + return obj.lspsHolder +} + +type isisLspsStateIsisLspStateIter struct { + obj *isisLspsState + isisLspStateSlice []IsisLspState + fieldPtr *[]*otg.IsisLspState +} + +func newIsisLspsStateIsisLspStateIter(ptr *[]*otg.IsisLspState) IsisLspsStateIsisLspStateIter { + return &isisLspsStateIsisLspStateIter{fieldPtr: ptr} +} + +type IsisLspsStateIsisLspStateIter interface { + setMsg(*isisLspsState) IsisLspsStateIsisLspStateIter + Items() []IsisLspState + Add() IsisLspState + Append(items ...IsisLspState) IsisLspsStateIsisLspStateIter + Set(index int, newObj IsisLspState) IsisLspsStateIsisLspStateIter + Clear() IsisLspsStateIsisLspStateIter + clearHolderSlice() IsisLspsStateIsisLspStateIter + appendHolderSlice(item IsisLspState) IsisLspsStateIsisLspStateIter +} + +func (obj *isisLspsStateIsisLspStateIter) setMsg(msg *isisLspsState) IsisLspsStateIsisLspStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisLspsStateIsisLspStateIter) Items() []IsisLspState { + return obj.isisLspStateSlice +} + +func (obj *isisLspsStateIsisLspStateIter) Add() IsisLspState { + newObj := &otg.IsisLspState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspState{obj: newObj} + newLibObj.setDefault() + obj.isisLspStateSlice = append(obj.isisLspStateSlice, newLibObj) + return newLibObj +} + +func (obj *isisLspsStateIsisLspStateIter) Append(items ...IsisLspState) IsisLspsStateIsisLspStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspStateSlice = append(obj.isisLspStateSlice, item) + } + return obj +} + +func (obj *isisLspsStateIsisLspStateIter) Set(index int, newObj IsisLspState) IsisLspsStateIsisLspStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspStateSlice[index] = newObj + return obj +} +func (obj *isisLspsStateIsisLspStateIter) Clear() IsisLspsStateIsisLspStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspState{} + obj.isisLspStateSlice = []IsisLspState{} + } + return obj +} +func (obj *isisLspsStateIsisLspStateIter) clearHolderSlice() IsisLspsStateIsisLspStateIter { + if len(obj.isisLspStateSlice) > 0 { + obj.isisLspStateSlice = []IsisLspState{} + } + return obj +} +func (obj *isisLspsStateIsisLspStateIter) appendHolderSlice(item IsisLspState) IsisLspsStateIsisLspStateIter { + obj.isisLspStateSlice = append(obj.isisLspStateSlice, item) + return obj +} + +func (obj *isisLspsState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Lsps) != 0 { + + if set_default { + obj.Lsps().clearHolderSlice() + for _, item := range obj.obj.Lsps { + obj.Lsps().appendHolderSlice(&isisLspState{obj: item}) + } + } + for _, item := range obj.Lsps().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *isisLspsState) setDefault() { + +} diff --git a/gosnappi/isis_lsps_state_request.go b/gosnappi/isis_lsps_state_request.go new file mode 100644 index 00000000..2089395e --- /dev/null +++ b/gosnappi/isis_lsps_state_request.go @@ -0,0 +1,317 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisLspsStateRequest ***** +type isisLspsStateRequest struct { + validation + obj *otg.IsisLspsStateRequest + marshaller marshalIsisLspsStateRequest + unMarshaller unMarshalIsisLspsStateRequest +} + +func NewIsisLspsStateRequest() IsisLspsStateRequest { + obj := isisLspsStateRequest{obj: &otg.IsisLspsStateRequest{}} + obj.setDefault() + return &obj +} + +func (obj *isisLspsStateRequest) msg() *otg.IsisLspsStateRequest { + return obj.obj +} + +func (obj *isisLspsStateRequest) setMsg(msg *otg.IsisLspsStateRequest) IsisLspsStateRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisLspsStateRequest struct { + obj *isisLspsStateRequest +} + +type marshalIsisLspsStateRequest interface { + // ToProto marshals IsisLspsStateRequest to protobuf object *otg.IsisLspsStateRequest + ToProto() (*otg.IsisLspsStateRequest, error) + // ToPbText marshals IsisLspsStateRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisLspsStateRequest to YAML text + ToYaml() (string, error) + // ToJson marshals IsisLspsStateRequest to JSON text + ToJson() (string, error) +} + +type unMarshalisisLspsStateRequest struct { + obj *isisLspsStateRequest +} + +type unMarshalIsisLspsStateRequest interface { + // FromProto unmarshals IsisLspsStateRequest from protobuf object *otg.IsisLspsStateRequest + FromProto(msg *otg.IsisLspsStateRequest) (IsisLspsStateRequest, error) + // FromPbText unmarshals IsisLspsStateRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisLspsStateRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisLspsStateRequest from JSON text + FromJson(value string) error +} + +func (obj *isisLspsStateRequest) Marshal() marshalIsisLspsStateRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalisisLspsStateRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *isisLspsStateRequest) Unmarshal() unMarshalIsisLspsStateRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisLspsStateRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisLspsStateRequest) ToProto() (*otg.IsisLspsStateRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisLspsStateRequest) FromProto(msg *otg.IsisLspsStateRequest) (IsisLspsStateRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisLspsStateRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisLspsStateRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisLspsStateRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspsStateRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisLspsStateRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisLspsStateRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisLspsStateRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisLspsStateRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisLspsStateRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisLspsStateRequest) Clone() (IsisLspsStateRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisLspsStateRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisLspsStateRequest is the request to retrieve ISIS Link State PDU (LSP) information learned by the router. +type IsisLspsStateRequest interface { + Validation + // msg marshals IsisLspsStateRequest to protobuf object *otg.IsisLspsStateRequest + // and doesn't set defaults + msg() *otg.IsisLspsStateRequest + // setMsg unmarshals IsisLspsStateRequest from protobuf object *otg.IsisLspsStateRequest + // and doesn't set defaults + setMsg(*otg.IsisLspsStateRequest) IsisLspsStateRequest + // provides marshal interface + Marshal() marshalIsisLspsStateRequest + // provides unmarshal interface + Unmarshal() unMarshalIsisLspsStateRequest + // validate validates IsisLspsStateRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisLspsStateRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // IsisRouterNames returns []string, set in IsisLspsStateRequest. + IsisRouterNames() []string + // SetIsisRouterNames assigns []string provided by user to IsisLspsStateRequest + SetIsisRouterNames(value []string) IsisLspsStateRequest +} + +// The names of ISIS routers for which learned information is requested. An empty list will return results for all ISIS routers. +// +// x-constraint: +// - /components/schemas/Device.IsisRouter/properties/name +// +// x-constraint: +// - /components/schemas/Device.IsisRouter/properties/name +// +// IsisRouterNames returns a []string +func (obj *isisLspsStateRequest) IsisRouterNames() []string { + if obj.obj.IsisRouterNames == nil { + obj.obj.IsisRouterNames = make([]string, 0) + } + return obj.obj.IsisRouterNames +} + +// The names of ISIS routers for which learned information is requested. An empty list will return results for all ISIS routers. +// +// x-constraint: +// - /components/schemas/Device.IsisRouter/properties/name +// +// x-constraint: +// - /components/schemas/Device.IsisRouter/properties/name +// +// SetIsisRouterNames sets the []string value in the IsisLspsStateRequest object +func (obj *isisLspsStateRequest) SetIsisRouterNames(value []string) IsisLspsStateRequest { + + if obj.obj.IsisRouterNames == nil { + obj.obj.IsisRouterNames = make([]string, 0) + } + obj.obj.IsisRouterNames = value + + return obj +} + +func (obj *isisLspsStateRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *isisLspsStateRequest) setDefault() { + +} diff --git a/gosnappi/isis_metric.go b/gosnappi/isis_metric.go new file mode 100644 index 00000000..76446185 --- /dev/null +++ b/gosnappi/isis_metric.go @@ -0,0 +1,1034 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisMetric ***** +type isisMetric struct { + validation + obj *otg.IsisMetric + marshaller marshalIsisMetric + unMarshaller unMarshalIsisMetric +} + +func NewIsisMetric() IsisMetric { + obj := isisMetric{obj: &otg.IsisMetric{}} + obj.setDefault() + return &obj +} + +func (obj *isisMetric) msg() *otg.IsisMetric { + return obj.obj +} + +func (obj *isisMetric) setMsg(msg *otg.IsisMetric) IsisMetric { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisMetric struct { + obj *isisMetric +} + +type marshalIsisMetric interface { + // ToProto marshals IsisMetric to protobuf object *otg.IsisMetric + ToProto() (*otg.IsisMetric, error) + // ToPbText marshals IsisMetric to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisMetric to YAML text + ToYaml() (string, error) + // ToJson marshals IsisMetric to JSON text + ToJson() (string, error) +} + +type unMarshalisisMetric struct { + obj *isisMetric +} + +type unMarshalIsisMetric interface { + // FromProto unmarshals IsisMetric from protobuf object *otg.IsisMetric + FromProto(msg *otg.IsisMetric) (IsisMetric, error) + // FromPbText unmarshals IsisMetric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisMetric from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisMetric from JSON text + FromJson(value string) error +} + +func (obj *isisMetric) Marshal() marshalIsisMetric { + if obj.marshaller == nil { + obj.marshaller = &marshalisisMetric{obj: obj} + } + return obj.marshaller +} + +func (obj *isisMetric) Unmarshal() unMarshalIsisMetric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisMetric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisMetric) ToProto() (*otg.IsisMetric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisMetric) FromProto(msg *otg.IsisMetric) (IsisMetric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisMetric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisMetric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisMetric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisMetric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisMetric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisMetric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisMetric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisMetric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisMetric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisMetric) Clone() (IsisMetric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisMetric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisMetric is iSIS per router statistics information. +type IsisMetric interface { + Validation + // msg marshals IsisMetric to protobuf object *otg.IsisMetric + // and doesn't set defaults + msg() *otg.IsisMetric + // setMsg unmarshals IsisMetric from protobuf object *otg.IsisMetric + // and doesn't set defaults + setMsg(*otg.IsisMetric) IsisMetric + // provides marshal interface + Marshal() marshalIsisMetric + // provides unmarshal interface + Unmarshal() unMarshalIsisMetric + // validate validates IsisMetric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisMetric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in IsisMetric. + Name() string + // SetName assigns string provided by user to IsisMetric + SetName(value string) IsisMetric + // HasName checks if Name has been set in IsisMetric + HasName() bool + // L1SessionsUp returns uint32, set in IsisMetric. + L1SessionsUp() uint32 + // SetL1SessionsUp assigns uint32 provided by user to IsisMetric + SetL1SessionsUp(value uint32) IsisMetric + // HasL1SessionsUp checks if L1SessionsUp has been set in IsisMetric + HasL1SessionsUp() bool + // L1SessionFlap returns uint64, set in IsisMetric. + L1SessionFlap() uint64 + // SetL1SessionFlap assigns uint64 provided by user to IsisMetric + SetL1SessionFlap(value uint64) IsisMetric + // HasL1SessionFlap checks if L1SessionFlap has been set in IsisMetric + HasL1SessionFlap() bool + // L1BroadcastHellosSent returns uint64, set in IsisMetric. + L1BroadcastHellosSent() uint64 + // SetL1BroadcastHellosSent assigns uint64 provided by user to IsisMetric + SetL1BroadcastHellosSent(value uint64) IsisMetric + // HasL1BroadcastHellosSent checks if L1BroadcastHellosSent has been set in IsisMetric + HasL1BroadcastHellosSent() bool + // L1BroadcastHellosReceived returns uint64, set in IsisMetric. + L1BroadcastHellosReceived() uint64 + // SetL1BroadcastHellosReceived assigns uint64 provided by user to IsisMetric + SetL1BroadcastHellosReceived(value uint64) IsisMetric + // HasL1BroadcastHellosReceived checks if L1BroadcastHellosReceived has been set in IsisMetric + HasL1BroadcastHellosReceived() bool + // L1PointToPointHellosSent returns uint64, set in IsisMetric. + L1PointToPointHellosSent() uint64 + // SetL1PointToPointHellosSent assigns uint64 provided by user to IsisMetric + SetL1PointToPointHellosSent(value uint64) IsisMetric + // HasL1PointToPointHellosSent checks if L1PointToPointHellosSent has been set in IsisMetric + HasL1PointToPointHellosSent() bool + // L1PointToPointHellosReceived returns uint64, set in IsisMetric. + L1PointToPointHellosReceived() uint64 + // SetL1PointToPointHellosReceived assigns uint64 provided by user to IsisMetric + SetL1PointToPointHellosReceived(value uint64) IsisMetric + // HasL1PointToPointHellosReceived checks if L1PointToPointHellosReceived has been set in IsisMetric + HasL1PointToPointHellosReceived() bool + // L1DatabaseSize returns uint64, set in IsisMetric. + L1DatabaseSize() uint64 + // SetL1DatabaseSize assigns uint64 provided by user to IsisMetric + SetL1DatabaseSize(value uint64) IsisMetric + // HasL1DatabaseSize checks if L1DatabaseSize has been set in IsisMetric + HasL1DatabaseSize() bool + // L1PsnpSent returns uint64, set in IsisMetric. + L1PsnpSent() uint64 + // SetL1PsnpSent assigns uint64 provided by user to IsisMetric + SetL1PsnpSent(value uint64) IsisMetric + // HasL1PsnpSent checks if L1PsnpSent has been set in IsisMetric + HasL1PsnpSent() bool + // L1PsnpReceived returns uint64, set in IsisMetric. + L1PsnpReceived() uint64 + // SetL1PsnpReceived assigns uint64 provided by user to IsisMetric + SetL1PsnpReceived(value uint64) IsisMetric + // HasL1PsnpReceived checks if L1PsnpReceived has been set in IsisMetric + HasL1PsnpReceived() bool + // L1CsnpSent returns uint64, set in IsisMetric. + L1CsnpSent() uint64 + // SetL1CsnpSent assigns uint64 provided by user to IsisMetric + SetL1CsnpSent(value uint64) IsisMetric + // HasL1CsnpSent checks if L1CsnpSent has been set in IsisMetric + HasL1CsnpSent() bool + // L1CsnpReceived returns uint64, set in IsisMetric. + L1CsnpReceived() uint64 + // SetL1CsnpReceived assigns uint64 provided by user to IsisMetric + SetL1CsnpReceived(value uint64) IsisMetric + // HasL1CsnpReceived checks if L1CsnpReceived has been set in IsisMetric + HasL1CsnpReceived() bool + // L1LspSent returns uint64, set in IsisMetric. + L1LspSent() uint64 + // SetL1LspSent assigns uint64 provided by user to IsisMetric + SetL1LspSent(value uint64) IsisMetric + // HasL1LspSent checks if L1LspSent has been set in IsisMetric + HasL1LspSent() bool + // L1LspReceived returns uint64, set in IsisMetric. + L1LspReceived() uint64 + // SetL1LspReceived assigns uint64 provided by user to IsisMetric + SetL1LspReceived(value uint64) IsisMetric + // HasL1LspReceived checks if L1LspReceived has been set in IsisMetric + HasL1LspReceived() bool + // L2SessionsUp returns uint32, set in IsisMetric. + L2SessionsUp() uint32 + // SetL2SessionsUp assigns uint32 provided by user to IsisMetric + SetL2SessionsUp(value uint32) IsisMetric + // HasL2SessionsUp checks if L2SessionsUp has been set in IsisMetric + HasL2SessionsUp() bool + // L2SessionFlap returns uint64, set in IsisMetric. + L2SessionFlap() uint64 + // SetL2SessionFlap assigns uint64 provided by user to IsisMetric + SetL2SessionFlap(value uint64) IsisMetric + // HasL2SessionFlap checks if L2SessionFlap has been set in IsisMetric + HasL2SessionFlap() bool + // L2BroadcastHellosSent returns uint64, set in IsisMetric. + L2BroadcastHellosSent() uint64 + // SetL2BroadcastHellosSent assigns uint64 provided by user to IsisMetric + SetL2BroadcastHellosSent(value uint64) IsisMetric + // HasL2BroadcastHellosSent checks if L2BroadcastHellosSent has been set in IsisMetric + HasL2BroadcastHellosSent() bool + // L2BroadcastHellosReceived returns uint64, set in IsisMetric. + L2BroadcastHellosReceived() uint64 + // SetL2BroadcastHellosReceived assigns uint64 provided by user to IsisMetric + SetL2BroadcastHellosReceived(value uint64) IsisMetric + // HasL2BroadcastHellosReceived checks if L2BroadcastHellosReceived has been set in IsisMetric + HasL2BroadcastHellosReceived() bool + // L2PointToPointHellosSent returns uint64, set in IsisMetric. + L2PointToPointHellosSent() uint64 + // SetL2PointToPointHellosSent assigns uint64 provided by user to IsisMetric + SetL2PointToPointHellosSent(value uint64) IsisMetric + // HasL2PointToPointHellosSent checks if L2PointToPointHellosSent has been set in IsisMetric + HasL2PointToPointHellosSent() bool + // L2PointToPointHellosReceived returns uint64, set in IsisMetric. + L2PointToPointHellosReceived() uint64 + // SetL2PointToPointHellosReceived assigns uint64 provided by user to IsisMetric + SetL2PointToPointHellosReceived(value uint64) IsisMetric + // HasL2PointToPointHellosReceived checks if L2PointToPointHellosReceived has been set in IsisMetric + HasL2PointToPointHellosReceived() bool + // L2DatabaseSize returns uint64, set in IsisMetric. + L2DatabaseSize() uint64 + // SetL2DatabaseSize assigns uint64 provided by user to IsisMetric + SetL2DatabaseSize(value uint64) IsisMetric + // HasL2DatabaseSize checks if L2DatabaseSize has been set in IsisMetric + HasL2DatabaseSize() bool + // L2PsnpSent returns uint64, set in IsisMetric. + L2PsnpSent() uint64 + // SetL2PsnpSent assigns uint64 provided by user to IsisMetric + SetL2PsnpSent(value uint64) IsisMetric + // HasL2PsnpSent checks if L2PsnpSent has been set in IsisMetric + HasL2PsnpSent() bool + // L2PsnpReceived returns uint64, set in IsisMetric. + L2PsnpReceived() uint64 + // SetL2PsnpReceived assigns uint64 provided by user to IsisMetric + SetL2PsnpReceived(value uint64) IsisMetric + // HasL2PsnpReceived checks if L2PsnpReceived has been set in IsisMetric + HasL2PsnpReceived() bool + // L2CsnpSent returns uint64, set in IsisMetric. + L2CsnpSent() uint64 + // SetL2CsnpSent assigns uint64 provided by user to IsisMetric + SetL2CsnpSent(value uint64) IsisMetric + // HasL2CsnpSent checks if L2CsnpSent has been set in IsisMetric + HasL2CsnpSent() bool + // L2CsnpReceived returns uint64, set in IsisMetric. + L2CsnpReceived() uint64 + // SetL2CsnpReceived assigns uint64 provided by user to IsisMetric + SetL2CsnpReceived(value uint64) IsisMetric + // HasL2CsnpReceived checks if L2CsnpReceived has been set in IsisMetric + HasL2CsnpReceived() bool + // L2LspSent returns uint64, set in IsisMetric. + L2LspSent() uint64 + // SetL2LspSent assigns uint64 provided by user to IsisMetric + SetL2LspSent(value uint64) IsisMetric + // HasL2LspSent checks if L2LspSent has been set in IsisMetric + HasL2LspSent() bool + // L2LspReceived returns uint64, set in IsisMetric. + L2LspReceived() uint64 + // SetL2LspReceived assigns uint64 provided by user to IsisMetric + SetL2LspReceived(value uint64) IsisMetric + // HasL2LspReceived checks if L2LspReceived has been set in IsisMetric + HasL2LspReceived() bool +} + +// The name of a configured ISIS router. +// Name returns a string +func (obj *isisMetric) Name() string { + + return *obj.obj.Name + +} + +// The name of a configured ISIS router. +// Name returns a string +func (obj *isisMetric) HasName() bool { + return obj.obj.Name != nil +} + +// The name of a configured ISIS router. +// SetName sets the string value in the IsisMetric object +func (obj *isisMetric) SetName(value string) IsisMetric { + + obj.obj.Name = &value + return obj +} + +// The number of Level 1 (L1) sessions that are fully up. +// L1SessionsUp returns a uint32 +func (obj *isisMetric) L1SessionsUp() uint32 { + + return *obj.obj.L1SessionsUp + +} + +// The number of Level 1 (L1) sessions that are fully up. +// L1SessionsUp returns a uint32 +func (obj *isisMetric) HasL1SessionsUp() bool { + return obj.obj.L1SessionsUp != nil +} + +// The number of Level 1 (L1) sessions that are fully up. +// SetL1SessionsUp sets the uint32 value in the IsisMetric object +func (obj *isisMetric) SetL1SessionsUp(value uint32) IsisMetric { + + obj.obj.L1SessionsUp = &value + return obj +} + +// The number of Level 1 Sessions Flap. +// L1SessionFlap returns a uint64 +func (obj *isisMetric) L1SessionFlap() uint64 { + + return *obj.obj.L1SessionFlap + +} + +// The number of Level 1 Sessions Flap. +// L1SessionFlap returns a uint64 +func (obj *isisMetric) HasL1SessionFlap() bool { + return obj.obj.L1SessionFlap != nil +} + +// The number of Level 1 Sessions Flap. +// SetL1SessionFlap sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL1SessionFlap(value uint64) IsisMetric { + + obj.obj.L1SessionFlap = &value + return obj +} + +// Number of Level 1 Hello messages sent. +// L1BroadcastHellosSent returns a uint64 +func (obj *isisMetric) L1BroadcastHellosSent() uint64 { + + return *obj.obj.L1BroadcastHellosSent + +} + +// Number of Level 1 Hello messages sent. +// L1BroadcastHellosSent returns a uint64 +func (obj *isisMetric) HasL1BroadcastHellosSent() bool { + return obj.obj.L1BroadcastHellosSent != nil +} + +// Number of Level 1 Hello messages sent. +// SetL1BroadcastHellosSent sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL1BroadcastHellosSent(value uint64) IsisMetric { + + obj.obj.L1BroadcastHellosSent = &value + return obj +} + +// Number of Level 1 Hello messages received. +// L1BroadcastHellosReceived returns a uint64 +func (obj *isisMetric) L1BroadcastHellosReceived() uint64 { + + return *obj.obj.L1BroadcastHellosReceived + +} + +// Number of Level 1 Hello messages received. +// L1BroadcastHellosReceived returns a uint64 +func (obj *isisMetric) HasL1BroadcastHellosReceived() bool { + return obj.obj.L1BroadcastHellosReceived != nil +} + +// Number of Level 1 Hello messages received. +// SetL1BroadcastHellosReceived sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL1BroadcastHellosReceived(value uint64) IsisMetric { + + obj.obj.L1BroadcastHellosReceived = &value + return obj +} + +// Number of Level 1 Point-to-Point(P2P) Hello messages sent. +// L1PointToPointHellosSent returns a uint64 +func (obj *isisMetric) L1PointToPointHellosSent() uint64 { + + return *obj.obj.L1PointToPointHellosSent + +} + +// Number of Level 1 Point-to-Point(P2P) Hello messages sent. +// L1PointToPointHellosSent returns a uint64 +func (obj *isisMetric) HasL1PointToPointHellosSent() bool { + return obj.obj.L1PointToPointHellosSent != nil +} + +// Number of Level 1 Point-to-Point(P2P) Hello messages sent. +// SetL1PointToPointHellosSent sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL1PointToPointHellosSent(value uint64) IsisMetric { + + obj.obj.L1PointToPointHellosSent = &value + return obj +} + +// Number of Level 1 Point-to-Point(P2P) Hello messages received. +// L1PointToPointHellosReceived returns a uint64 +func (obj *isisMetric) L1PointToPointHellosReceived() uint64 { + + return *obj.obj.L1PointToPointHellosReceived + +} + +// Number of Level 1 Point-to-Point(P2P) Hello messages received. +// L1PointToPointHellosReceived returns a uint64 +func (obj *isisMetric) HasL1PointToPointHellosReceived() bool { + return obj.obj.L1PointToPointHellosReceived != nil +} + +// Number of Level 1 Point-to-Point(P2P) Hello messages received. +// SetL1PointToPointHellosReceived sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL1PointToPointHellosReceived(value uint64) IsisMetric { + + obj.obj.L1PointToPointHellosReceived = &value + return obj +} + +// Number of Link State Updates (LSPs) in the Level 1 LSP Databases. +// L1DatabaseSize returns a uint64 +func (obj *isisMetric) L1DatabaseSize() uint64 { + + return *obj.obj.L1DatabaseSize + +} + +// Number of Link State Updates (LSPs) in the Level 1 LSP Databases. +// L1DatabaseSize returns a uint64 +func (obj *isisMetric) HasL1DatabaseSize() bool { + return obj.obj.L1DatabaseSize != nil +} + +// Number of Link State Updates (LSPs) in the Level 1 LSP Databases. +// SetL1DatabaseSize sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL1DatabaseSize(value uint64) IsisMetric { + + obj.obj.L1DatabaseSize = &value + return obj +} + +// Number of Level 1 (L1) Partial Sequence Number Packet (PSNPs) sent. +// L1PsnpSent returns a uint64 +func (obj *isisMetric) L1PsnpSent() uint64 { + + return *obj.obj.L1PsnpSent + +} + +// Number of Level 1 (L1) Partial Sequence Number Packet (PSNPs) sent. +// L1PsnpSent returns a uint64 +func (obj *isisMetric) HasL1PsnpSent() bool { + return obj.obj.L1PsnpSent != nil +} + +// Number of Level 1 (L1) Partial Sequence Number Packet (PSNPs) sent. +// SetL1PsnpSent sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL1PsnpSent(value uint64) IsisMetric { + + obj.obj.L1PsnpSent = &value + return obj +} + +// Number of Level 1 (L1) Complete Sequence Number Packet (PSNPs) received. +// L1PsnpReceived returns a uint64 +func (obj *isisMetric) L1PsnpReceived() uint64 { + + return *obj.obj.L1PsnpReceived + +} + +// Number of Level 1 (L1) Complete Sequence Number Packet (PSNPs) received. +// L1PsnpReceived returns a uint64 +func (obj *isisMetric) HasL1PsnpReceived() bool { + return obj.obj.L1PsnpReceived != nil +} + +// Number of Level 1 (L1) Complete Sequence Number Packet (PSNPs) received. +// SetL1PsnpReceived sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL1PsnpReceived(value uint64) IsisMetric { + + obj.obj.L1PsnpReceived = &value + return obj +} + +// Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) sent. +// L1CsnpSent returns a uint64 +func (obj *isisMetric) L1CsnpSent() uint64 { + + return *obj.obj.L1CsnpSent + +} + +// Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) sent. +// L1CsnpSent returns a uint64 +func (obj *isisMetric) HasL1CsnpSent() bool { + return obj.obj.L1CsnpSent != nil +} + +// Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) sent. +// SetL1CsnpSent sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL1CsnpSent(value uint64) IsisMetric { + + obj.obj.L1CsnpSent = &value + return obj +} + +// Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) received. +// L1CsnpReceived returns a uint64 +func (obj *isisMetric) L1CsnpReceived() uint64 { + + return *obj.obj.L1CsnpReceived + +} + +// Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) received. +// L1CsnpReceived returns a uint64 +func (obj *isisMetric) HasL1CsnpReceived() bool { + return obj.obj.L1CsnpReceived != nil +} + +// Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) received. +// SetL1CsnpReceived sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL1CsnpReceived(value uint64) IsisMetric { + + obj.obj.L1CsnpReceived = &value + return obj +} + +// Number of Level 1 (L1) Link State Protocol Data Units (LSPs) sent. +// L1LspSent returns a uint64 +func (obj *isisMetric) L1LspSent() uint64 { + + return *obj.obj.L1LspSent + +} + +// Number of Level 1 (L1) Link State Protocol Data Units (LSPs) sent. +// L1LspSent returns a uint64 +func (obj *isisMetric) HasL1LspSent() bool { + return obj.obj.L1LspSent != nil +} + +// Number of Level 1 (L1) Link State Protocol Data Units (LSPs) sent. +// SetL1LspSent sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL1LspSent(value uint64) IsisMetric { + + obj.obj.L1LspSent = &value + return obj +} + +// Number of Level 1 (L1) Link State Protocol Data Units (LSPs) received. +// L1LspReceived returns a uint64 +func (obj *isisMetric) L1LspReceived() uint64 { + + return *obj.obj.L1LspReceived + +} + +// Number of Level 1 (L1) Link State Protocol Data Units (LSPs) received. +// L1LspReceived returns a uint64 +func (obj *isisMetric) HasL1LspReceived() bool { + return obj.obj.L1LspReceived != nil +} + +// Number of Level 1 (L1) Link State Protocol Data Units (LSPs) received. +// SetL1LspReceived sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL1LspReceived(value uint64) IsisMetric { + + obj.obj.L1LspReceived = &value + return obj +} + +// The number of Level 2 (L2) sessions that are fully up. +// L2SessionsUp returns a uint32 +func (obj *isisMetric) L2SessionsUp() uint32 { + + return *obj.obj.L2SessionsUp + +} + +// The number of Level 2 (L2) sessions that are fully up. +// L2SessionsUp returns a uint32 +func (obj *isisMetric) HasL2SessionsUp() bool { + return obj.obj.L2SessionsUp != nil +} + +// The number of Level 2 (L2) sessions that are fully up. +// SetL2SessionsUp sets the uint32 value in the IsisMetric object +func (obj *isisMetric) SetL2SessionsUp(value uint32) IsisMetric { + + obj.obj.L2SessionsUp = &value + return obj +} + +// The number of Level 2 Sessions Flap. +// L2SessionFlap returns a uint64 +func (obj *isisMetric) L2SessionFlap() uint64 { + + return *obj.obj.L2SessionFlap + +} + +// The number of Level 2 Sessions Flap. +// L2SessionFlap returns a uint64 +func (obj *isisMetric) HasL2SessionFlap() bool { + return obj.obj.L2SessionFlap != nil +} + +// The number of Level 2 Sessions Flap. +// SetL2SessionFlap sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL2SessionFlap(value uint64) IsisMetric { + + obj.obj.L2SessionFlap = &value + return obj +} + +// Number of Level 2 Hello messages sent. +// L2BroadcastHellosSent returns a uint64 +func (obj *isisMetric) L2BroadcastHellosSent() uint64 { + + return *obj.obj.L2BroadcastHellosSent + +} + +// Number of Level 2 Hello messages sent. +// L2BroadcastHellosSent returns a uint64 +func (obj *isisMetric) HasL2BroadcastHellosSent() bool { + return obj.obj.L2BroadcastHellosSent != nil +} + +// Number of Level 2 Hello messages sent. +// SetL2BroadcastHellosSent sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL2BroadcastHellosSent(value uint64) IsisMetric { + + obj.obj.L2BroadcastHellosSent = &value + return obj +} + +// Number of Level 2 Hello messages received. +// L2BroadcastHellosReceived returns a uint64 +func (obj *isisMetric) L2BroadcastHellosReceived() uint64 { + + return *obj.obj.L2BroadcastHellosReceived + +} + +// Number of Level 2 Hello messages received. +// L2BroadcastHellosReceived returns a uint64 +func (obj *isisMetric) HasL2BroadcastHellosReceived() bool { + return obj.obj.L2BroadcastHellosReceived != nil +} + +// Number of Level 2 Hello messages received. +// SetL2BroadcastHellosReceived sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL2BroadcastHellosReceived(value uint64) IsisMetric { + + obj.obj.L2BroadcastHellosReceived = &value + return obj +} + +// Number of Level 2 Point-to-Point(P2P) Hello messages sent. +// L2PointToPointHellosSent returns a uint64 +func (obj *isisMetric) L2PointToPointHellosSent() uint64 { + + return *obj.obj.L2PointToPointHellosSent + +} + +// Number of Level 2 Point-to-Point(P2P) Hello messages sent. +// L2PointToPointHellosSent returns a uint64 +func (obj *isisMetric) HasL2PointToPointHellosSent() bool { + return obj.obj.L2PointToPointHellosSent != nil +} + +// Number of Level 2 Point-to-Point(P2P) Hello messages sent. +// SetL2PointToPointHellosSent sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL2PointToPointHellosSent(value uint64) IsisMetric { + + obj.obj.L2PointToPointHellosSent = &value + return obj +} + +// Number of Level 2 Point-to-Point(P2P) Hello messages received. +// L2PointToPointHellosReceived returns a uint64 +func (obj *isisMetric) L2PointToPointHellosReceived() uint64 { + + return *obj.obj.L2PointToPointHellosReceived + +} + +// Number of Level 2 Point-to-Point(P2P) Hello messages received. +// L2PointToPointHellosReceived returns a uint64 +func (obj *isisMetric) HasL2PointToPointHellosReceived() bool { + return obj.obj.L2PointToPointHellosReceived != nil +} + +// Number of Level 2 Point-to-Point(P2P) Hello messages received. +// SetL2PointToPointHellosReceived sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL2PointToPointHellosReceived(value uint64) IsisMetric { + + obj.obj.L2PointToPointHellosReceived = &value + return obj +} + +// Number of Link State Updates (LSPs) in the Level 2 LSP Databases. +// L2DatabaseSize returns a uint64 +func (obj *isisMetric) L2DatabaseSize() uint64 { + + return *obj.obj.L2DatabaseSize + +} + +// Number of Link State Updates (LSPs) in the Level 2 LSP Databases. +// L2DatabaseSize returns a uint64 +func (obj *isisMetric) HasL2DatabaseSize() bool { + return obj.obj.L2DatabaseSize != nil +} + +// Number of Link State Updates (LSPs) in the Level 2 LSP Databases. +// SetL2DatabaseSize sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL2DatabaseSize(value uint64) IsisMetric { + + obj.obj.L2DatabaseSize = &value + return obj +} + +// Number of Level 2 (L2) Partial Sequence Number Packet (PSNPs) sent. +// L2PsnpSent returns a uint64 +func (obj *isisMetric) L2PsnpSent() uint64 { + + return *obj.obj.L2PsnpSent + +} + +// Number of Level 2 (L2) Partial Sequence Number Packet (PSNPs) sent. +// L2PsnpSent returns a uint64 +func (obj *isisMetric) HasL2PsnpSent() bool { + return obj.obj.L2PsnpSent != nil +} + +// Number of Level 2 (L2) Partial Sequence Number Packet (PSNPs) sent. +// SetL2PsnpSent sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL2PsnpSent(value uint64) IsisMetric { + + obj.obj.L2PsnpSent = &value + return obj +} + +// Number of Level 2 (L2) Complete Sequence Number Packet (PSNPs) received. +// L2PsnpReceived returns a uint64 +func (obj *isisMetric) L2PsnpReceived() uint64 { + + return *obj.obj.L2PsnpReceived + +} + +// Number of Level 2 (L2) Complete Sequence Number Packet (PSNPs) received. +// L2PsnpReceived returns a uint64 +func (obj *isisMetric) HasL2PsnpReceived() bool { + return obj.obj.L2PsnpReceived != nil +} + +// Number of Level 2 (L2) Complete Sequence Number Packet (PSNPs) received. +// SetL2PsnpReceived sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL2PsnpReceived(value uint64) IsisMetric { + + obj.obj.L2PsnpReceived = &value + return obj +} + +// Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) sent. +// L2CsnpSent returns a uint64 +func (obj *isisMetric) L2CsnpSent() uint64 { + + return *obj.obj.L2CsnpSent + +} + +// Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) sent. +// L2CsnpSent returns a uint64 +func (obj *isisMetric) HasL2CsnpSent() bool { + return obj.obj.L2CsnpSent != nil +} + +// Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) sent. +// SetL2CsnpSent sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL2CsnpSent(value uint64) IsisMetric { + + obj.obj.L2CsnpSent = &value + return obj +} + +// Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) received. +// L2CsnpReceived returns a uint64 +func (obj *isisMetric) L2CsnpReceived() uint64 { + + return *obj.obj.L2CsnpReceived + +} + +// Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) received. +// L2CsnpReceived returns a uint64 +func (obj *isisMetric) HasL2CsnpReceived() bool { + return obj.obj.L2CsnpReceived != nil +} + +// Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) received. +// SetL2CsnpReceived sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL2CsnpReceived(value uint64) IsisMetric { + + obj.obj.L2CsnpReceived = &value + return obj +} + +// Number of Level 2 (L2) Link State Protocol Data Units (LSPs) sent. +// L2LspSent returns a uint64 +func (obj *isisMetric) L2LspSent() uint64 { + + return *obj.obj.L2LspSent + +} + +// Number of Level 2 (L2) Link State Protocol Data Units (LSPs) sent. +// L2LspSent returns a uint64 +func (obj *isisMetric) HasL2LspSent() bool { + return obj.obj.L2LspSent != nil +} + +// Number of Level 2 (L2) Link State Protocol Data Units (LSPs) sent. +// SetL2LspSent sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL2LspSent(value uint64) IsisMetric { + + obj.obj.L2LspSent = &value + return obj +} + +// Number of Level 2 (L2) Link State Protocol Data Units (LSPs) received. +// L2LspReceived returns a uint64 +func (obj *isisMetric) L2LspReceived() uint64 { + + return *obj.obj.L2LspReceived + +} + +// Number of Level 2 (L2) Link State Protocol Data Units (LSPs) received. +// L2LspReceived returns a uint64 +func (obj *isisMetric) HasL2LspReceived() bool { + return obj.obj.L2LspReceived != nil +} + +// Number of Level 2 (L2) Link State Protocol Data Units (LSPs) received. +// SetL2LspReceived sets the uint64 value in the IsisMetric object +func (obj *isisMetric) SetL2LspReceived(value uint64) IsisMetric { + + obj.obj.L2LspReceived = &value + return obj +} + +func (obj *isisMetric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *isisMetric) setDefault() { + +} diff --git a/gosnappi/isis_metrics_request.go b/gosnappi/isis_metrics_request.go new file mode 100644 index 00000000..9f8d5bfd --- /dev/null +++ b/gosnappi/isis_metrics_request.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisMetricsRequest ***** +type isisMetricsRequest struct { + validation + obj *otg.IsisMetricsRequest + marshaller marshalIsisMetricsRequest + unMarshaller unMarshalIsisMetricsRequest +} + +func NewIsisMetricsRequest() IsisMetricsRequest { + obj := isisMetricsRequest{obj: &otg.IsisMetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *isisMetricsRequest) msg() *otg.IsisMetricsRequest { + return obj.obj +} + +func (obj *isisMetricsRequest) setMsg(msg *otg.IsisMetricsRequest) IsisMetricsRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisMetricsRequest struct { + obj *isisMetricsRequest +} + +type marshalIsisMetricsRequest interface { + // ToProto marshals IsisMetricsRequest to protobuf object *otg.IsisMetricsRequest + ToProto() (*otg.IsisMetricsRequest, error) + // ToPbText marshals IsisMetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisMetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals IsisMetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshalisisMetricsRequest struct { + obj *isisMetricsRequest +} + +type unMarshalIsisMetricsRequest interface { + // FromProto unmarshals IsisMetricsRequest from protobuf object *otg.IsisMetricsRequest + FromProto(msg *otg.IsisMetricsRequest) (IsisMetricsRequest, error) + // FromPbText unmarshals IsisMetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisMetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisMetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *isisMetricsRequest) Marshal() marshalIsisMetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalisisMetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *isisMetricsRequest) Unmarshal() unMarshalIsisMetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisMetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisMetricsRequest) ToProto() (*otg.IsisMetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisMetricsRequest) FromProto(msg *otg.IsisMetricsRequest) (IsisMetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisMetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisMetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisMetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisMetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisMetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisMetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisMetricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisMetricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisMetricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisMetricsRequest) Clone() (IsisMetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisMetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisMetricsRequest is the request to retrieve ISIS per Router metrics/statistics. +type IsisMetricsRequest interface { + Validation + // msg marshals IsisMetricsRequest to protobuf object *otg.IsisMetricsRequest + // and doesn't set defaults + msg() *otg.IsisMetricsRequest + // setMsg unmarshals IsisMetricsRequest from protobuf object *otg.IsisMetricsRequest + // and doesn't set defaults + setMsg(*otg.IsisMetricsRequest) IsisMetricsRequest + // provides marshal interface + Marshal() marshalIsisMetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalIsisMetricsRequest + // validate validates IsisMetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisMetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RouterNames returns []string, set in IsisMetricsRequest. + RouterNames() []string + // SetRouterNames assigns []string provided by user to IsisMetricsRequest + SetRouterNames(value []string) IsisMetricsRequest + // ColumnNames returns []IsisMetricsRequestColumnNamesEnum, set in IsisMetricsRequest + ColumnNames() []IsisMetricsRequestColumnNamesEnum + // SetColumnNames assigns []IsisMetricsRequestColumnNamesEnum provided by user to IsisMetricsRequest + SetColumnNames(value []IsisMetricsRequestColumnNamesEnum) IsisMetricsRequest +} + +// The names of ISIS Routers to return results for. An empty list will return results for all ISIS router. +// +// x-constraint: +// - /components/schemas/Device.IsisRouter/properties/name +// +// x-constraint: +// - /components/schemas/Device.IsisRouter/properties/name +// +// RouterNames returns a []string +func (obj *isisMetricsRequest) RouterNames() []string { + if obj.obj.RouterNames == nil { + obj.obj.RouterNames = make([]string, 0) + } + return obj.obj.RouterNames +} + +// The names of ISIS Routers to return results for. An empty list will return results for all ISIS router. +// +// x-constraint: +// - /components/schemas/Device.IsisRouter/properties/name +// +// x-constraint: +// - /components/schemas/Device.IsisRouter/properties/name +// +// SetRouterNames sets the []string value in the IsisMetricsRequest object +func (obj *isisMetricsRequest) SetRouterNames(value []string) IsisMetricsRequest { + + if obj.obj.RouterNames == nil { + obj.obj.RouterNames = make([]string, 0) + } + obj.obj.RouterNames = value + + return obj +} + +type IsisMetricsRequestColumnNamesEnum string + +// Enum of ColumnNames on IsisMetricsRequest +var IsisMetricsRequestColumnNames = struct { + L1_SESSIONS_UP IsisMetricsRequestColumnNamesEnum + L1_SESSION_FLAP IsisMetricsRequestColumnNamesEnum + L1_DATABASE_SIZE IsisMetricsRequestColumnNamesEnum + L1_BROADCAST_HELLOS_SENT IsisMetricsRequestColumnNamesEnum + L1_BROADCAST_HELLOS_RECEIVED IsisMetricsRequestColumnNamesEnum + L1_POINT_TO_POINT_HELLOS_SENT IsisMetricsRequestColumnNamesEnum + L1_POINT_TO_POINT_HELLOS_RECEIVED IsisMetricsRequestColumnNamesEnum + L1_PSNP_SENT IsisMetricsRequestColumnNamesEnum + L1_PSNP_RECEIVED IsisMetricsRequestColumnNamesEnum + L1_CSNP_SENT IsisMetricsRequestColumnNamesEnum + L1_CSNP_RECEIVED IsisMetricsRequestColumnNamesEnum + L1_LSP_SENT IsisMetricsRequestColumnNamesEnum + L1_LSP_RECEIVED IsisMetricsRequestColumnNamesEnum + L2_SESSIONS_UP IsisMetricsRequestColumnNamesEnum + L2_SESSION_FLAP IsisMetricsRequestColumnNamesEnum + L2_DATABASE_SIZE IsisMetricsRequestColumnNamesEnum + L2_BROADCAST_HELLOS_SENT IsisMetricsRequestColumnNamesEnum + L2_BROADCAST_HELLOS_RECEIVED IsisMetricsRequestColumnNamesEnum + L2_POINT_TO_POINT_HELLOS_SENT IsisMetricsRequestColumnNamesEnum + L2_POINT_TO_POINT_HELLOS_RECEIVED IsisMetricsRequestColumnNamesEnum + L2_PSNP_SENT IsisMetricsRequestColumnNamesEnum + L2_PSNP_RECEIVED IsisMetricsRequestColumnNamesEnum + L2_CSNP_SENT IsisMetricsRequestColumnNamesEnum + L2_CSNP_RECEIVED IsisMetricsRequestColumnNamesEnum + L2_LSP_SENT IsisMetricsRequestColumnNamesEnum + L2_LSP_RECEIVED IsisMetricsRequestColumnNamesEnum +}{ + L1_SESSIONS_UP: IsisMetricsRequestColumnNamesEnum("l1_sessions_up"), + L1_SESSION_FLAP: IsisMetricsRequestColumnNamesEnum("l1_session_flap"), + L1_DATABASE_SIZE: IsisMetricsRequestColumnNamesEnum("l1_database_size"), + L1_BROADCAST_HELLOS_SENT: IsisMetricsRequestColumnNamesEnum("l1_broadcast_hellos_sent"), + L1_BROADCAST_HELLOS_RECEIVED: IsisMetricsRequestColumnNamesEnum("l1_broadcast_hellos_received"), + L1_POINT_TO_POINT_HELLOS_SENT: IsisMetricsRequestColumnNamesEnum("l1_point_to_point_hellos_sent"), + L1_POINT_TO_POINT_HELLOS_RECEIVED: IsisMetricsRequestColumnNamesEnum("l1_point_to_point_hellos_received"), + L1_PSNP_SENT: IsisMetricsRequestColumnNamesEnum("l1_psnp_sent"), + L1_PSNP_RECEIVED: IsisMetricsRequestColumnNamesEnum("l1_psnp_received"), + L1_CSNP_SENT: IsisMetricsRequestColumnNamesEnum("l1_csnp_sent"), + L1_CSNP_RECEIVED: IsisMetricsRequestColumnNamesEnum("l1_csnp_received"), + L1_LSP_SENT: IsisMetricsRequestColumnNamesEnum("l1_lsp_sent"), + L1_LSP_RECEIVED: IsisMetricsRequestColumnNamesEnum("l1_lsp_received"), + L2_SESSIONS_UP: IsisMetricsRequestColumnNamesEnum("l2_sessions_up"), + L2_SESSION_FLAP: IsisMetricsRequestColumnNamesEnum("l2_session_flap"), + L2_DATABASE_SIZE: IsisMetricsRequestColumnNamesEnum("l2_database_size"), + L2_BROADCAST_HELLOS_SENT: IsisMetricsRequestColumnNamesEnum("l2_broadcast_hellos_sent"), + L2_BROADCAST_HELLOS_RECEIVED: IsisMetricsRequestColumnNamesEnum("l2_broadcast_hellos_received"), + L2_POINT_TO_POINT_HELLOS_SENT: IsisMetricsRequestColumnNamesEnum("l2_point_to_point_hellos_sent"), + L2_POINT_TO_POINT_HELLOS_RECEIVED: IsisMetricsRequestColumnNamesEnum("l2_point_to_point_hellos_received"), + L2_PSNP_SENT: IsisMetricsRequestColumnNamesEnum("l2_psnp_sent"), + L2_PSNP_RECEIVED: IsisMetricsRequestColumnNamesEnum("l2_psnp_received"), + L2_CSNP_SENT: IsisMetricsRequestColumnNamesEnum("l2_csnp_sent"), + L2_CSNP_RECEIVED: IsisMetricsRequestColumnNamesEnum("l2_csnp_received"), + L2_LSP_SENT: IsisMetricsRequestColumnNamesEnum("l2_lsp_sent"), + L2_LSP_RECEIVED: IsisMetricsRequestColumnNamesEnum("l2_lsp_received"), +} + +func (obj *isisMetricsRequest) ColumnNames() []IsisMetricsRequestColumnNamesEnum { + items := []IsisMetricsRequestColumnNamesEnum{} + for _, item := range obj.obj.ColumnNames { + items = append(items, IsisMetricsRequestColumnNamesEnum(item.String())) + } + return items +} + +// The list of column names that the returned result set will contain. If the list is empty then all columns will be returned except for any result_groups. The name of the ISIS Router cannot be excluded. +// SetColumnNames sets the []string value in the IsisMetricsRequest object +func (obj *isisMetricsRequest) SetColumnNames(value []IsisMetricsRequestColumnNamesEnum) IsisMetricsRequest { + + items := []otg.IsisMetricsRequest_ColumnNames_Enum{} + for _, item := range value { + intValue := otg.IsisMetricsRequest_ColumnNames_Enum_value[string(item)] + items = append(items, otg.IsisMetricsRequest_ColumnNames_Enum(intValue)) + } + obj.obj.ColumnNames = items + return obj +} + +func (obj *isisMetricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *isisMetricsRequest) setDefault() { + +} diff --git a/gosnappi/isis_mt.go b/gosnappi/isis_mt.go new file mode 100644 index 00000000..9b4e5bf5 --- /dev/null +++ b/gosnappi/isis_mt.go @@ -0,0 +1,361 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisMT ***** +type isisMT struct { + validation + obj *otg.IsisMT + marshaller marshalIsisMT + unMarshaller unMarshalIsisMT +} + +func NewIsisMT() IsisMT { + obj := isisMT{obj: &otg.IsisMT{}} + obj.setDefault() + return &obj +} + +func (obj *isisMT) msg() *otg.IsisMT { + return obj.obj +} + +func (obj *isisMT) setMsg(msg *otg.IsisMT) IsisMT { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisMT struct { + obj *isisMT +} + +type marshalIsisMT interface { + // ToProto marshals IsisMT to protobuf object *otg.IsisMT + ToProto() (*otg.IsisMT, error) + // ToPbText marshals IsisMT to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisMT to YAML text + ToYaml() (string, error) + // ToJson marshals IsisMT to JSON text + ToJson() (string, error) +} + +type unMarshalisisMT struct { + obj *isisMT +} + +type unMarshalIsisMT interface { + // FromProto unmarshals IsisMT from protobuf object *otg.IsisMT + FromProto(msg *otg.IsisMT) (IsisMT, error) + // FromPbText unmarshals IsisMT from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisMT from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisMT from JSON text + FromJson(value string) error +} + +func (obj *isisMT) Marshal() marshalIsisMT { + if obj.marshaller == nil { + obj.marshaller = &marshalisisMT{obj: obj} + } + return obj.marshaller +} + +func (obj *isisMT) Unmarshal() unMarshalIsisMT { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisMT{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisMT) ToProto() (*otg.IsisMT, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisMT) FromProto(msg *otg.IsisMT) (IsisMT, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisMT) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisMT) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisMT) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisMT) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisMT) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisMT) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisMT) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisMT) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisMT) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisMT) Clone() (IsisMT, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisMT() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// IsisMT is configuration of properties per interface per topology when multiple topologies are configured in an ISIS router. +// in a ISIS router. +type IsisMT interface { + Validation + // msg marshals IsisMT to protobuf object *otg.IsisMT + // and doesn't set defaults + msg() *otg.IsisMT + // setMsg unmarshals IsisMT from protobuf object *otg.IsisMT + // and doesn't set defaults + setMsg(*otg.IsisMT) IsisMT + // provides marshal interface + Marshal() marshalIsisMT + // provides unmarshal interface + Unmarshal() unMarshalIsisMT + // validate validates IsisMT + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisMT, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // MtId returns uint32, set in IsisMT. + MtId() uint32 + // SetMtId assigns uint32 provided by user to IsisMT + SetMtId(value uint32) IsisMT + // HasMtId checks if MtId has been set in IsisMT + HasMtId() bool + // LinkMetric returns uint32, set in IsisMT. + LinkMetric() uint32 + // SetLinkMetric assigns uint32 provided by user to IsisMT + SetLinkMetric(value uint32) IsisMT + // HasLinkMetric checks if LinkMetric has been set in IsisMT + HasLinkMetric() bool +} + +// The Multi Topology ID for one of the topologies supported on the ISIS interface. +// MtId returns a uint32 +func (obj *isisMT) MtId() uint32 { + + return *obj.obj.MtId + +} + +// The Multi Topology ID for one of the topologies supported on the ISIS interface. +// MtId returns a uint32 +func (obj *isisMT) HasMtId() bool { + return obj.obj.MtId != nil +} + +// The Multi Topology ID for one of the topologies supported on the ISIS interface. +// SetMtId sets the uint32 value in the IsisMT object +func (obj *isisMT) SetMtId(value uint32) IsisMT { + + obj.obj.MtId = &value + return obj +} + +// Specifies the link metric for this topology on the ISIS interface. +// LinkMetric returns a uint32 +func (obj *isisMT) LinkMetric() uint32 { + + return *obj.obj.LinkMetric + +} + +// Specifies the link metric for this topology on the ISIS interface. +// LinkMetric returns a uint32 +func (obj *isisMT) HasLinkMetric() bool { + return obj.obj.LinkMetric != nil +} + +// Specifies the link metric for this topology on the ISIS interface. +// SetLinkMetric sets the uint32 value in the IsisMT object +func (obj *isisMT) SetLinkMetric(value uint32) IsisMT { + + obj.obj.LinkMetric = &value + return obj +} + +func (obj *isisMT) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.MtId != nil { + + if *obj.obj.MtId > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= IsisMT.MtId <= 65535 but Got %d", *obj.obj.MtId)) + } + + } + + if obj.obj.LinkMetric != nil { + + if *obj.obj.LinkMetric > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= IsisMT.LinkMetric <= 16777215 but Got %d", *obj.obj.LinkMetric)) + } + + } + +} + +func (obj *isisMT) setDefault() { + if obj.obj.MtId == nil { + obj.SetMtId(0) + } + if obj.obj.LinkMetric == nil { + obj.SetLinkMetric(10) + } + +} diff --git a/gosnappi/isis_v4_route_range.go b/gosnappi/isis_v4_route_range.go new file mode 100644 index 00000000..61f9cde8 --- /dev/null +++ b/gosnappi/isis_v4_route_range.go @@ -0,0 +1,680 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisV4RouteRange ***** +type isisV4RouteRange struct { + validation + obj *otg.IsisV4RouteRange + marshaller marshalIsisV4RouteRange + unMarshaller unMarshalIsisV4RouteRange + addressesHolder IsisV4RouteRangeV4RouteAddressIter +} + +func NewIsisV4RouteRange() IsisV4RouteRange { + obj := isisV4RouteRange{obj: &otg.IsisV4RouteRange{}} + obj.setDefault() + return &obj +} + +func (obj *isisV4RouteRange) msg() *otg.IsisV4RouteRange { + return obj.obj +} + +func (obj *isisV4RouteRange) setMsg(msg *otg.IsisV4RouteRange) IsisV4RouteRange { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisV4RouteRange struct { + obj *isisV4RouteRange +} + +type marshalIsisV4RouteRange interface { + // ToProto marshals IsisV4RouteRange to protobuf object *otg.IsisV4RouteRange + ToProto() (*otg.IsisV4RouteRange, error) + // ToPbText marshals IsisV4RouteRange to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisV4RouteRange to YAML text + ToYaml() (string, error) + // ToJson marshals IsisV4RouteRange to JSON text + ToJson() (string, error) +} + +type unMarshalisisV4RouteRange struct { + obj *isisV4RouteRange +} + +type unMarshalIsisV4RouteRange interface { + // FromProto unmarshals IsisV4RouteRange from protobuf object *otg.IsisV4RouteRange + FromProto(msg *otg.IsisV4RouteRange) (IsisV4RouteRange, error) + // FromPbText unmarshals IsisV4RouteRange from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisV4RouteRange from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisV4RouteRange from JSON text + FromJson(value string) error +} + +func (obj *isisV4RouteRange) Marshal() marshalIsisV4RouteRange { + if obj.marshaller == nil { + obj.marshaller = &marshalisisV4RouteRange{obj: obj} + } + return obj.marshaller +} + +func (obj *isisV4RouteRange) Unmarshal() unMarshalIsisV4RouteRange { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisV4RouteRange{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisV4RouteRange) ToProto() (*otg.IsisV4RouteRange, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisV4RouteRange) FromProto(msg *otg.IsisV4RouteRange) (IsisV4RouteRange, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisV4RouteRange) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisV4RouteRange) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisV4RouteRange) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisV4RouteRange) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisV4RouteRange) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisV4RouteRange) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisV4RouteRange) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisV4RouteRange) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisV4RouteRange) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisV4RouteRange) Clone() (IsisV4RouteRange, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisV4RouteRange() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisV4RouteRange) setNil() { + obj.addressesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisV4RouteRange is emulated ISIS IPv4 routes. +type IsisV4RouteRange interface { + Validation + // msg marshals IsisV4RouteRange to protobuf object *otg.IsisV4RouteRange + // and doesn't set defaults + msg() *otg.IsisV4RouteRange + // setMsg unmarshals IsisV4RouteRange from protobuf object *otg.IsisV4RouteRange + // and doesn't set defaults + setMsg(*otg.IsisV4RouteRange) IsisV4RouteRange + // provides marshal interface + Marshal() marshalIsisV4RouteRange + // provides unmarshal interface + Unmarshal() unMarshalIsisV4RouteRange + // validate validates IsisV4RouteRange + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisV4RouteRange, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Addresses returns IsisV4RouteRangeV4RouteAddressIterIter, set in IsisV4RouteRange + Addresses() IsisV4RouteRangeV4RouteAddressIter + // LinkMetric returns uint32, set in IsisV4RouteRange. + LinkMetric() uint32 + // SetLinkMetric assigns uint32 provided by user to IsisV4RouteRange + SetLinkMetric(value uint32) IsisV4RouteRange + // HasLinkMetric checks if LinkMetric has been set in IsisV4RouteRange + HasLinkMetric() bool + // OriginType returns IsisV4RouteRangeOriginTypeEnum, set in IsisV4RouteRange + OriginType() IsisV4RouteRangeOriginTypeEnum + // SetOriginType assigns IsisV4RouteRangeOriginTypeEnum provided by user to IsisV4RouteRange + SetOriginType(value IsisV4RouteRangeOriginTypeEnum) IsisV4RouteRange + // HasOriginType checks if OriginType has been set in IsisV4RouteRange + HasOriginType() bool + // RedistributionType returns IsisV4RouteRangeRedistributionTypeEnum, set in IsisV4RouteRange + RedistributionType() IsisV4RouteRangeRedistributionTypeEnum + // SetRedistributionType assigns IsisV4RouteRangeRedistributionTypeEnum provided by user to IsisV4RouteRange + SetRedistributionType(value IsisV4RouteRangeRedistributionTypeEnum) IsisV4RouteRange + // HasRedistributionType checks if RedistributionType has been set in IsisV4RouteRange + HasRedistributionType() bool + // Name returns string, set in IsisV4RouteRange. + Name() string + // SetName assigns string provided by user to IsisV4RouteRange + SetName(value string) IsisV4RouteRange + // PrefixAttrEnabled returns bool, set in IsisV4RouteRange. + PrefixAttrEnabled() bool + // SetPrefixAttrEnabled assigns bool provided by user to IsisV4RouteRange + SetPrefixAttrEnabled(value bool) IsisV4RouteRange + // HasPrefixAttrEnabled checks if PrefixAttrEnabled has been set in IsisV4RouteRange + HasPrefixAttrEnabled() bool + // XFlag returns bool, set in IsisV4RouteRange. + XFlag() bool + // SetXFlag assigns bool provided by user to IsisV4RouteRange + SetXFlag(value bool) IsisV4RouteRange + // HasXFlag checks if XFlag has been set in IsisV4RouteRange + HasXFlag() bool + // RFlag returns bool, set in IsisV4RouteRange. + RFlag() bool + // SetRFlag assigns bool provided by user to IsisV4RouteRange + SetRFlag(value bool) IsisV4RouteRange + // HasRFlag checks if RFlag has been set in IsisV4RouteRange + HasRFlag() bool + // NFlag returns bool, set in IsisV4RouteRange. + NFlag() bool + // SetNFlag assigns bool provided by user to IsisV4RouteRange + SetNFlag(value bool) IsisV4RouteRange + // HasNFlag checks if NFlag has been set in IsisV4RouteRange + HasNFlag() bool + setNil() +} + +// A list of group of IPv4 route addresses. +// Addresses returns a []V4RouteAddress +func (obj *isisV4RouteRange) Addresses() IsisV4RouteRangeV4RouteAddressIter { + if len(obj.obj.Addresses) == 0 { + obj.obj.Addresses = []*otg.V4RouteAddress{} + } + if obj.addressesHolder == nil { + obj.addressesHolder = newIsisV4RouteRangeV4RouteAddressIter(&obj.obj.Addresses).setMsg(obj) + } + return obj.addressesHolder +} + +type isisV4RouteRangeV4RouteAddressIter struct { + obj *isisV4RouteRange + v4RouteAddressSlice []V4RouteAddress + fieldPtr *[]*otg.V4RouteAddress +} + +func newIsisV4RouteRangeV4RouteAddressIter(ptr *[]*otg.V4RouteAddress) IsisV4RouteRangeV4RouteAddressIter { + return &isisV4RouteRangeV4RouteAddressIter{fieldPtr: ptr} +} + +type IsisV4RouteRangeV4RouteAddressIter interface { + setMsg(*isisV4RouteRange) IsisV4RouteRangeV4RouteAddressIter + Items() []V4RouteAddress + Add() V4RouteAddress + Append(items ...V4RouteAddress) IsisV4RouteRangeV4RouteAddressIter + Set(index int, newObj V4RouteAddress) IsisV4RouteRangeV4RouteAddressIter + Clear() IsisV4RouteRangeV4RouteAddressIter + clearHolderSlice() IsisV4RouteRangeV4RouteAddressIter + appendHolderSlice(item V4RouteAddress) IsisV4RouteRangeV4RouteAddressIter +} + +func (obj *isisV4RouteRangeV4RouteAddressIter) setMsg(msg *isisV4RouteRange) IsisV4RouteRangeV4RouteAddressIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&v4RouteAddress{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisV4RouteRangeV4RouteAddressIter) Items() []V4RouteAddress { + return obj.v4RouteAddressSlice +} + +func (obj *isisV4RouteRangeV4RouteAddressIter) Add() V4RouteAddress { + newObj := &otg.V4RouteAddress{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &v4RouteAddress{obj: newObj} + newLibObj.setDefault() + obj.v4RouteAddressSlice = append(obj.v4RouteAddressSlice, newLibObj) + return newLibObj +} + +func (obj *isisV4RouteRangeV4RouteAddressIter) Append(items ...V4RouteAddress) IsisV4RouteRangeV4RouteAddressIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.v4RouteAddressSlice = append(obj.v4RouteAddressSlice, item) + } + return obj +} + +func (obj *isisV4RouteRangeV4RouteAddressIter) Set(index int, newObj V4RouteAddress) IsisV4RouteRangeV4RouteAddressIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.v4RouteAddressSlice[index] = newObj + return obj +} +func (obj *isisV4RouteRangeV4RouteAddressIter) Clear() IsisV4RouteRangeV4RouteAddressIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.V4RouteAddress{} + obj.v4RouteAddressSlice = []V4RouteAddress{} + } + return obj +} +func (obj *isisV4RouteRangeV4RouteAddressIter) clearHolderSlice() IsisV4RouteRangeV4RouteAddressIter { + if len(obj.v4RouteAddressSlice) > 0 { + obj.v4RouteAddressSlice = []V4RouteAddress{} + } + return obj +} +func (obj *isisV4RouteRangeV4RouteAddressIter) appendHolderSlice(item V4RouteAddress) IsisV4RouteRangeV4RouteAddressIter { + obj.v4RouteAddressSlice = append(obj.v4RouteAddressSlice, item) + return obj +} + +// The user-defined metric associated with this route range. +// LinkMetric returns a uint32 +func (obj *isisV4RouteRange) LinkMetric() uint32 { + + return *obj.obj.LinkMetric + +} + +// The user-defined metric associated with this route range. +// LinkMetric returns a uint32 +func (obj *isisV4RouteRange) HasLinkMetric() bool { + return obj.obj.LinkMetric != nil +} + +// The user-defined metric associated with this route range. +// SetLinkMetric sets the uint32 value in the IsisV4RouteRange object +func (obj *isisV4RouteRange) SetLinkMetric(value uint32) IsisV4RouteRange { + + obj.obj.LinkMetric = &value + return obj +} + +type IsisV4RouteRangeOriginTypeEnum string + +// Enum of OriginType on IsisV4RouteRange +var IsisV4RouteRangeOriginType = struct { + INTERNAL IsisV4RouteRangeOriginTypeEnum + EXTERNAL IsisV4RouteRangeOriginTypeEnum +}{ + INTERNAL: IsisV4RouteRangeOriginTypeEnum("internal"), + EXTERNAL: IsisV4RouteRangeOriginTypeEnum("external"), +} + +func (obj *isisV4RouteRange) OriginType() IsisV4RouteRangeOriginTypeEnum { + return IsisV4RouteRangeOriginTypeEnum(obj.obj.OriginType.Enum().String()) +} + +// The origin of the advertised route-internal or external to the ISIS area. Options include the following: +// Internal-for intra-area routes, through Level 1 LSPs. +// External-for inter-area routes redistributed within L1, through Level +// 1 LSPs. +// OriginType returns a string +func (obj *isisV4RouteRange) HasOriginType() bool { + return obj.obj.OriginType != nil +} + +func (obj *isisV4RouteRange) SetOriginType(value IsisV4RouteRangeOriginTypeEnum) IsisV4RouteRange { + intValue, ok := otg.IsisV4RouteRange_OriginType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on IsisV4RouteRangeOriginTypeEnum", string(value))) + return obj + } + enumValue := otg.IsisV4RouteRange_OriginType_Enum(intValue) + obj.obj.OriginType = &enumValue + + return obj +} + +type IsisV4RouteRangeRedistributionTypeEnum string + +// Enum of RedistributionType on IsisV4RouteRange +var IsisV4RouteRangeRedistributionType = struct { + UP IsisV4RouteRangeRedistributionTypeEnum + DOWN IsisV4RouteRangeRedistributionTypeEnum +}{ + UP: IsisV4RouteRangeRedistributionTypeEnum("up"), + DOWN: IsisV4RouteRangeRedistributionTypeEnum("down"), +} + +func (obj *isisV4RouteRange) RedistributionType() IsisV4RouteRangeRedistributionTypeEnum { + return IsisV4RouteRangeRedistributionTypeEnum(obj.obj.RedistributionType.Enum().String()) +} + +// Defines the Up/Down (Redistribution) bit defined for TLVs 128 and 130 by RFC 2966. It is used for domain-wide advertisement of prefix information. +// +// Up (0)-used when a prefix is initially advertised within the ISIS L3 +// hierarchy, +// and for all other prefixes in L1 and L2 LSPs. (default) +// Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. +// +// The prefixes are being advertised from a higher level (L2) down to a lower level (L1). +// RedistributionType returns a string +func (obj *isisV4RouteRange) HasRedistributionType() bool { + return obj.obj.RedistributionType != nil +} + +func (obj *isisV4RouteRange) SetRedistributionType(value IsisV4RouteRangeRedistributionTypeEnum) IsisV4RouteRange { + intValue, ok := otg.IsisV4RouteRange_RedistributionType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on IsisV4RouteRangeRedistributionTypeEnum", string(value))) + return obj + } + enumValue := otg.IsisV4RouteRange_RedistributionType_Enum(intValue) + obj.obj.RedistributionType = &enumValue + + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *isisV4RouteRange) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the IsisV4RouteRange object +func (obj *isisV4RouteRange) SetName(value string) IsisV4RouteRange { + + obj.obj.Name = &value + return obj +} + +// Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability Attribute Flags +// will be advertised or not. +// PrefixAttrEnabled returns a bool +func (obj *isisV4RouteRange) PrefixAttrEnabled() bool { + + return *obj.obj.PrefixAttrEnabled + +} + +// Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability Attribute Flags +// will be advertised or not. +// PrefixAttrEnabled returns a bool +func (obj *isisV4RouteRange) HasPrefixAttrEnabled() bool { + return obj.obj.PrefixAttrEnabled != nil +} + +// Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability Attribute Flags +// will be advertised or not. +// SetPrefixAttrEnabled sets the bool value in the IsisV4RouteRange object +func (obj *isisV4RouteRange) SetPrefixAttrEnabled(value bool) IsisV4RouteRange { + + obj.obj.PrefixAttrEnabled = &value + return obj +} + +// External Prefix Flag (Bit 0) +// XFlag returns a bool +func (obj *isisV4RouteRange) XFlag() bool { + + return *obj.obj.XFlag + +} + +// External Prefix Flag (Bit 0) +// XFlag returns a bool +func (obj *isisV4RouteRange) HasXFlag() bool { + return obj.obj.XFlag != nil +} + +// External Prefix Flag (Bit 0) +// SetXFlag sets the bool value in the IsisV4RouteRange object +func (obj *isisV4RouteRange) SetXFlag(value bool) IsisV4RouteRange { + + obj.obj.XFlag = &value + return obj +} + +// Re-advertisement Flag (Bit 1) +// RFlag returns a bool +func (obj *isisV4RouteRange) RFlag() bool { + + return *obj.obj.RFlag + +} + +// Re-advertisement Flag (Bit 1) +// RFlag returns a bool +func (obj *isisV4RouteRange) HasRFlag() bool { + return obj.obj.RFlag != nil +} + +// Re-advertisement Flag (Bit 1) +// SetRFlag sets the bool value in the IsisV4RouteRange object +func (obj *isisV4RouteRange) SetRFlag(value bool) IsisV4RouteRange { + + obj.obj.RFlag = &value + return obj +} + +// Node Flag (Bit 2) +// NFlag returns a bool +func (obj *isisV4RouteRange) NFlag() bool { + + return *obj.obj.NFlag + +} + +// Node Flag (Bit 2) +// NFlag returns a bool +func (obj *isisV4RouteRange) HasNFlag() bool { + return obj.obj.NFlag != nil +} + +// Node Flag (Bit 2) +// SetNFlag sets the bool value in the IsisV4RouteRange object +func (obj *isisV4RouteRange) SetNFlag(value bool) IsisV4RouteRange { + + obj.obj.NFlag = &value + return obj +} + +func (obj *isisV4RouteRange) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Addresses) != 0 { + + if set_default { + obj.Addresses().clearHolderSlice() + for _, item := range obj.obj.Addresses { + obj.Addresses().appendHolderSlice(&v4RouteAddress{obj: item}) + } + } + for _, item := range obj.Addresses().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.LinkMetric != nil { + + if *obj.obj.LinkMetric > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= IsisV4RouteRange.LinkMetric <= 16777215 but Got %d", *obj.obj.LinkMetric)) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface IsisV4RouteRange") + } +} + +func (obj *isisV4RouteRange) setDefault() { + if obj.obj.LinkMetric == nil { + obj.SetLinkMetric(0) + } + if obj.obj.OriginType == nil { + obj.SetOriginType(IsisV4RouteRangeOriginType.INTERNAL) + + } + if obj.obj.RedistributionType == nil { + obj.SetRedistributionType(IsisV4RouteRangeRedistributionType.UP) + + } + if obj.obj.PrefixAttrEnabled == nil { + obj.SetPrefixAttrEnabled(false) + } + if obj.obj.XFlag == nil { + obj.SetXFlag(false) + } + if obj.obj.RFlag == nil { + obj.SetRFlag(false) + } + if obj.obj.NFlag == nil { + obj.SetNFlag(false) + } + +} diff --git a/gosnappi/isis_v6_route_range.go b/gosnappi/isis_v6_route_range.go new file mode 100644 index 00000000..4d3f9066 --- /dev/null +++ b/gosnappi/isis_v6_route_range.go @@ -0,0 +1,680 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** IsisV6RouteRange ***** +type isisV6RouteRange struct { + validation + obj *otg.IsisV6RouteRange + marshaller marshalIsisV6RouteRange + unMarshaller unMarshalIsisV6RouteRange + addressesHolder IsisV6RouteRangeV6RouteAddressIter +} + +func NewIsisV6RouteRange() IsisV6RouteRange { + obj := isisV6RouteRange{obj: &otg.IsisV6RouteRange{}} + obj.setDefault() + return &obj +} + +func (obj *isisV6RouteRange) msg() *otg.IsisV6RouteRange { + return obj.obj +} + +func (obj *isisV6RouteRange) setMsg(msg *otg.IsisV6RouteRange) IsisV6RouteRange { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalisisV6RouteRange struct { + obj *isisV6RouteRange +} + +type marshalIsisV6RouteRange interface { + // ToProto marshals IsisV6RouteRange to protobuf object *otg.IsisV6RouteRange + ToProto() (*otg.IsisV6RouteRange, error) + // ToPbText marshals IsisV6RouteRange to protobuf text + ToPbText() (string, error) + // ToYaml marshals IsisV6RouteRange to YAML text + ToYaml() (string, error) + // ToJson marshals IsisV6RouteRange to JSON text + ToJson() (string, error) +} + +type unMarshalisisV6RouteRange struct { + obj *isisV6RouteRange +} + +type unMarshalIsisV6RouteRange interface { + // FromProto unmarshals IsisV6RouteRange from protobuf object *otg.IsisV6RouteRange + FromProto(msg *otg.IsisV6RouteRange) (IsisV6RouteRange, error) + // FromPbText unmarshals IsisV6RouteRange from protobuf text + FromPbText(value string) error + // FromYaml unmarshals IsisV6RouteRange from YAML text + FromYaml(value string) error + // FromJson unmarshals IsisV6RouteRange from JSON text + FromJson(value string) error +} + +func (obj *isisV6RouteRange) Marshal() marshalIsisV6RouteRange { + if obj.marshaller == nil { + obj.marshaller = &marshalisisV6RouteRange{obj: obj} + } + return obj.marshaller +} + +func (obj *isisV6RouteRange) Unmarshal() unMarshalIsisV6RouteRange { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalisisV6RouteRange{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalisisV6RouteRange) ToProto() (*otg.IsisV6RouteRange, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalisisV6RouteRange) FromProto(msg *otg.IsisV6RouteRange) (IsisV6RouteRange, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalisisV6RouteRange) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalisisV6RouteRange) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalisisV6RouteRange) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisV6RouteRange) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalisisV6RouteRange) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalisisV6RouteRange) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *isisV6RouteRange) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *isisV6RouteRange) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *isisV6RouteRange) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *isisV6RouteRange) Clone() (IsisV6RouteRange, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewIsisV6RouteRange() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *isisV6RouteRange) setNil() { + obj.addressesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// IsisV6RouteRange is emulated ISIS IPv6 routes. +type IsisV6RouteRange interface { + Validation + // msg marshals IsisV6RouteRange to protobuf object *otg.IsisV6RouteRange + // and doesn't set defaults + msg() *otg.IsisV6RouteRange + // setMsg unmarshals IsisV6RouteRange from protobuf object *otg.IsisV6RouteRange + // and doesn't set defaults + setMsg(*otg.IsisV6RouteRange) IsisV6RouteRange + // provides marshal interface + Marshal() marshalIsisV6RouteRange + // provides unmarshal interface + Unmarshal() unMarshalIsisV6RouteRange + // validate validates IsisV6RouteRange + validate() error + // A stringer function + String() string + // Clones the object + Clone() (IsisV6RouteRange, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Addresses returns IsisV6RouteRangeV6RouteAddressIterIter, set in IsisV6RouteRange + Addresses() IsisV6RouteRangeV6RouteAddressIter + // LinkMetric returns uint32, set in IsisV6RouteRange. + LinkMetric() uint32 + // SetLinkMetric assigns uint32 provided by user to IsisV6RouteRange + SetLinkMetric(value uint32) IsisV6RouteRange + // HasLinkMetric checks if LinkMetric has been set in IsisV6RouteRange + HasLinkMetric() bool + // OriginType returns IsisV6RouteRangeOriginTypeEnum, set in IsisV6RouteRange + OriginType() IsisV6RouteRangeOriginTypeEnum + // SetOriginType assigns IsisV6RouteRangeOriginTypeEnum provided by user to IsisV6RouteRange + SetOriginType(value IsisV6RouteRangeOriginTypeEnum) IsisV6RouteRange + // HasOriginType checks if OriginType has been set in IsisV6RouteRange + HasOriginType() bool + // RedistributionType returns IsisV6RouteRangeRedistributionTypeEnum, set in IsisV6RouteRange + RedistributionType() IsisV6RouteRangeRedistributionTypeEnum + // SetRedistributionType assigns IsisV6RouteRangeRedistributionTypeEnum provided by user to IsisV6RouteRange + SetRedistributionType(value IsisV6RouteRangeRedistributionTypeEnum) IsisV6RouteRange + // HasRedistributionType checks if RedistributionType has been set in IsisV6RouteRange + HasRedistributionType() bool + // Name returns string, set in IsisV6RouteRange. + Name() string + // SetName assigns string provided by user to IsisV6RouteRange + SetName(value string) IsisV6RouteRange + // PrefixAttrEnabled returns bool, set in IsisV6RouteRange. + PrefixAttrEnabled() bool + // SetPrefixAttrEnabled assigns bool provided by user to IsisV6RouteRange + SetPrefixAttrEnabled(value bool) IsisV6RouteRange + // HasPrefixAttrEnabled checks if PrefixAttrEnabled has been set in IsisV6RouteRange + HasPrefixAttrEnabled() bool + // XFlag returns bool, set in IsisV6RouteRange. + XFlag() bool + // SetXFlag assigns bool provided by user to IsisV6RouteRange + SetXFlag(value bool) IsisV6RouteRange + // HasXFlag checks if XFlag has been set in IsisV6RouteRange + HasXFlag() bool + // RFlag returns bool, set in IsisV6RouteRange. + RFlag() bool + // SetRFlag assigns bool provided by user to IsisV6RouteRange + SetRFlag(value bool) IsisV6RouteRange + // HasRFlag checks if RFlag has been set in IsisV6RouteRange + HasRFlag() bool + // NFlag returns bool, set in IsisV6RouteRange. + NFlag() bool + // SetNFlag assigns bool provided by user to IsisV6RouteRange + SetNFlag(value bool) IsisV6RouteRange + // HasNFlag checks if NFlag has been set in IsisV6RouteRange + HasNFlag() bool + setNil() +} + +// A list of group of IPv6 route addresses. +// Addresses returns a []V6RouteAddress +func (obj *isisV6RouteRange) Addresses() IsisV6RouteRangeV6RouteAddressIter { + if len(obj.obj.Addresses) == 0 { + obj.obj.Addresses = []*otg.V6RouteAddress{} + } + if obj.addressesHolder == nil { + obj.addressesHolder = newIsisV6RouteRangeV6RouteAddressIter(&obj.obj.Addresses).setMsg(obj) + } + return obj.addressesHolder +} + +type isisV6RouteRangeV6RouteAddressIter struct { + obj *isisV6RouteRange + v6RouteAddressSlice []V6RouteAddress + fieldPtr *[]*otg.V6RouteAddress +} + +func newIsisV6RouteRangeV6RouteAddressIter(ptr *[]*otg.V6RouteAddress) IsisV6RouteRangeV6RouteAddressIter { + return &isisV6RouteRangeV6RouteAddressIter{fieldPtr: ptr} +} + +type IsisV6RouteRangeV6RouteAddressIter interface { + setMsg(*isisV6RouteRange) IsisV6RouteRangeV6RouteAddressIter + Items() []V6RouteAddress + Add() V6RouteAddress + Append(items ...V6RouteAddress) IsisV6RouteRangeV6RouteAddressIter + Set(index int, newObj V6RouteAddress) IsisV6RouteRangeV6RouteAddressIter + Clear() IsisV6RouteRangeV6RouteAddressIter + clearHolderSlice() IsisV6RouteRangeV6RouteAddressIter + appendHolderSlice(item V6RouteAddress) IsisV6RouteRangeV6RouteAddressIter +} + +func (obj *isisV6RouteRangeV6RouteAddressIter) setMsg(msg *isisV6RouteRange) IsisV6RouteRangeV6RouteAddressIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&v6RouteAddress{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *isisV6RouteRangeV6RouteAddressIter) Items() []V6RouteAddress { + return obj.v6RouteAddressSlice +} + +func (obj *isisV6RouteRangeV6RouteAddressIter) Add() V6RouteAddress { + newObj := &otg.V6RouteAddress{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &v6RouteAddress{obj: newObj} + newLibObj.setDefault() + obj.v6RouteAddressSlice = append(obj.v6RouteAddressSlice, newLibObj) + return newLibObj +} + +func (obj *isisV6RouteRangeV6RouteAddressIter) Append(items ...V6RouteAddress) IsisV6RouteRangeV6RouteAddressIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.v6RouteAddressSlice = append(obj.v6RouteAddressSlice, item) + } + return obj +} + +func (obj *isisV6RouteRangeV6RouteAddressIter) Set(index int, newObj V6RouteAddress) IsisV6RouteRangeV6RouteAddressIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.v6RouteAddressSlice[index] = newObj + return obj +} +func (obj *isisV6RouteRangeV6RouteAddressIter) Clear() IsisV6RouteRangeV6RouteAddressIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.V6RouteAddress{} + obj.v6RouteAddressSlice = []V6RouteAddress{} + } + return obj +} +func (obj *isisV6RouteRangeV6RouteAddressIter) clearHolderSlice() IsisV6RouteRangeV6RouteAddressIter { + if len(obj.v6RouteAddressSlice) > 0 { + obj.v6RouteAddressSlice = []V6RouteAddress{} + } + return obj +} +func (obj *isisV6RouteRangeV6RouteAddressIter) appendHolderSlice(item V6RouteAddress) IsisV6RouteRangeV6RouteAddressIter { + obj.v6RouteAddressSlice = append(obj.v6RouteAddressSlice, item) + return obj +} + +// The user-defined metric associated with this route range. +// LinkMetric returns a uint32 +func (obj *isisV6RouteRange) LinkMetric() uint32 { + + return *obj.obj.LinkMetric + +} + +// The user-defined metric associated with this route range. +// LinkMetric returns a uint32 +func (obj *isisV6RouteRange) HasLinkMetric() bool { + return obj.obj.LinkMetric != nil +} + +// The user-defined metric associated with this route range. +// SetLinkMetric sets the uint32 value in the IsisV6RouteRange object +func (obj *isisV6RouteRange) SetLinkMetric(value uint32) IsisV6RouteRange { + + obj.obj.LinkMetric = &value + return obj +} + +type IsisV6RouteRangeOriginTypeEnum string + +// Enum of OriginType on IsisV6RouteRange +var IsisV6RouteRangeOriginType = struct { + INTERNAL IsisV6RouteRangeOriginTypeEnum + EXTERNAL IsisV6RouteRangeOriginTypeEnum +}{ + INTERNAL: IsisV6RouteRangeOriginTypeEnum("internal"), + EXTERNAL: IsisV6RouteRangeOriginTypeEnum("external"), +} + +func (obj *isisV6RouteRange) OriginType() IsisV6RouteRangeOriginTypeEnum { + return IsisV6RouteRangeOriginTypeEnum(obj.obj.OriginType.Enum().String()) +} + +// The origin of the advertised route-internal or external to the ISIS area. Options include the following: +// Internal-for intra-area routes, through Level 1 LSPs. +// External-for inter-area routes redistributed within L1, through Level +// 1 LSPs. +// OriginType returns a string +func (obj *isisV6RouteRange) HasOriginType() bool { + return obj.obj.OriginType != nil +} + +func (obj *isisV6RouteRange) SetOriginType(value IsisV6RouteRangeOriginTypeEnum) IsisV6RouteRange { + intValue, ok := otg.IsisV6RouteRange_OriginType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on IsisV6RouteRangeOriginTypeEnum", string(value))) + return obj + } + enumValue := otg.IsisV6RouteRange_OriginType_Enum(intValue) + obj.obj.OriginType = &enumValue + + return obj +} + +type IsisV6RouteRangeRedistributionTypeEnum string + +// Enum of RedistributionType on IsisV6RouteRange +var IsisV6RouteRangeRedistributionType = struct { + UP IsisV6RouteRangeRedistributionTypeEnum + DOWN IsisV6RouteRangeRedistributionTypeEnum +}{ + UP: IsisV6RouteRangeRedistributionTypeEnum("up"), + DOWN: IsisV6RouteRangeRedistributionTypeEnum("down"), +} + +func (obj *isisV6RouteRange) RedistributionType() IsisV6RouteRangeRedistributionTypeEnum { + return IsisV6RouteRangeRedistributionTypeEnum(obj.obj.RedistributionType.Enum().String()) +} + +// Defines the Up/Down (Redistribution) bit defined for TLVs 128 and 130 by RFC 2966. It is used for domain-wide advertisement of prefix information. +// +// Up (0)-used when a prefix is initially advertised within the ISIS L3 +// hierarchy, +// and for all other prefixes in L1 and L2 LSPs. (default) +// Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. +// +// The prefixes are being advertised from a higher level (L2) down to a lower level (L1). +// RedistributionType returns a string +func (obj *isisV6RouteRange) HasRedistributionType() bool { + return obj.obj.RedistributionType != nil +} + +func (obj *isisV6RouteRange) SetRedistributionType(value IsisV6RouteRangeRedistributionTypeEnum) IsisV6RouteRange { + intValue, ok := otg.IsisV6RouteRange_RedistributionType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on IsisV6RouteRangeRedistributionTypeEnum", string(value))) + return obj + } + enumValue := otg.IsisV6RouteRange_RedistributionType_Enum(intValue) + obj.obj.RedistributionType = &enumValue + + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *isisV6RouteRange) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the IsisV6RouteRange object +func (obj *isisV6RouteRange) SetName(value string) IsisV6RouteRange { + + obj.obj.Name = &value + return obj +} + +// Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability Attribute Flags +// will be advertised or not. +// PrefixAttrEnabled returns a bool +func (obj *isisV6RouteRange) PrefixAttrEnabled() bool { + + return *obj.obj.PrefixAttrEnabled + +} + +// Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability Attribute Flags +// will be advertised or not. +// PrefixAttrEnabled returns a bool +func (obj *isisV6RouteRange) HasPrefixAttrEnabled() bool { + return obj.obj.PrefixAttrEnabled != nil +} + +// Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability Attribute Flags +// will be advertised or not. +// SetPrefixAttrEnabled sets the bool value in the IsisV6RouteRange object +func (obj *isisV6RouteRange) SetPrefixAttrEnabled(value bool) IsisV6RouteRange { + + obj.obj.PrefixAttrEnabled = &value + return obj +} + +// External Prefix Flag (Bit 0) +// XFlag returns a bool +func (obj *isisV6RouteRange) XFlag() bool { + + return *obj.obj.XFlag + +} + +// External Prefix Flag (Bit 0) +// XFlag returns a bool +func (obj *isisV6RouteRange) HasXFlag() bool { + return obj.obj.XFlag != nil +} + +// External Prefix Flag (Bit 0) +// SetXFlag sets the bool value in the IsisV6RouteRange object +func (obj *isisV6RouteRange) SetXFlag(value bool) IsisV6RouteRange { + + obj.obj.XFlag = &value + return obj +} + +// Re-advertisement Flag (Bit 1) +// RFlag returns a bool +func (obj *isisV6RouteRange) RFlag() bool { + + return *obj.obj.RFlag + +} + +// Re-advertisement Flag (Bit 1) +// RFlag returns a bool +func (obj *isisV6RouteRange) HasRFlag() bool { + return obj.obj.RFlag != nil +} + +// Re-advertisement Flag (Bit 1) +// SetRFlag sets the bool value in the IsisV6RouteRange object +func (obj *isisV6RouteRange) SetRFlag(value bool) IsisV6RouteRange { + + obj.obj.RFlag = &value + return obj +} + +// Node Flag (Bit 2) +// NFlag returns a bool +func (obj *isisV6RouteRange) NFlag() bool { + + return *obj.obj.NFlag + +} + +// Node Flag (Bit 2) +// NFlag returns a bool +func (obj *isisV6RouteRange) HasNFlag() bool { + return obj.obj.NFlag != nil +} + +// Node Flag (Bit 2) +// SetNFlag sets the bool value in the IsisV6RouteRange object +func (obj *isisV6RouteRange) SetNFlag(value bool) IsisV6RouteRange { + + obj.obj.NFlag = &value + return obj +} + +func (obj *isisV6RouteRange) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Addresses) != 0 { + + if set_default { + obj.Addresses().clearHolderSlice() + for _, item := range obj.obj.Addresses { + obj.Addresses().appendHolderSlice(&v6RouteAddress{obj: item}) + } + } + for _, item := range obj.Addresses().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.LinkMetric != nil { + + if *obj.obj.LinkMetric > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= IsisV6RouteRange.LinkMetric <= 16777215 but Got %d", *obj.obj.LinkMetric)) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface IsisV6RouteRange") + } +} + +func (obj *isisV6RouteRange) setDefault() { + if obj.obj.LinkMetric == nil { + obj.SetLinkMetric(0) + } + if obj.obj.OriginType == nil { + obj.SetOriginType(IsisV6RouteRangeOriginType.INTERNAL) + + } + if obj.obj.RedistributionType == nil { + obj.SetRedistributionType(IsisV6RouteRangeRedistributionType.UP) + + } + if obj.obj.PrefixAttrEnabled == nil { + obj.SetPrefixAttrEnabled(false) + } + if obj.obj.XFlag == nil { + obj.SetXFlag(false) + } + if obj.obj.RFlag == nil { + obj.SetRFlag(false) + } + if obj.obj.NFlag == nil { + obj.SetNFlag(false) + } + +} diff --git a/gosnappi/lacp_metric.go b/gosnappi/lacp_metric.go new file mode 100644 index 00000000..af4fdec1 --- /dev/null +++ b/gosnappi/lacp_metric.go @@ -0,0 +1,808 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LacpMetric ***** +type lacpMetric struct { + validation + obj *otg.LacpMetric + marshaller marshalLacpMetric + unMarshaller unMarshalLacpMetric +} + +func NewLacpMetric() LacpMetric { + obj := lacpMetric{obj: &otg.LacpMetric{}} + obj.setDefault() + return &obj +} + +func (obj *lacpMetric) msg() *otg.LacpMetric { + return obj.obj +} + +func (obj *lacpMetric) setMsg(msg *otg.LacpMetric) LacpMetric { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallacpMetric struct { + obj *lacpMetric +} + +type marshalLacpMetric interface { + // ToProto marshals LacpMetric to protobuf object *otg.LacpMetric + ToProto() (*otg.LacpMetric, error) + // ToPbText marshals LacpMetric to protobuf text + ToPbText() (string, error) + // ToYaml marshals LacpMetric to YAML text + ToYaml() (string, error) + // ToJson marshals LacpMetric to JSON text + ToJson() (string, error) +} + +type unMarshallacpMetric struct { + obj *lacpMetric +} + +type unMarshalLacpMetric interface { + // FromProto unmarshals LacpMetric from protobuf object *otg.LacpMetric + FromProto(msg *otg.LacpMetric) (LacpMetric, error) + // FromPbText unmarshals LacpMetric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LacpMetric from YAML text + FromYaml(value string) error + // FromJson unmarshals LacpMetric from JSON text + FromJson(value string) error +} + +func (obj *lacpMetric) Marshal() marshalLacpMetric { + if obj.marshaller == nil { + obj.marshaller = &marshallacpMetric{obj: obj} + } + return obj.marshaller +} + +func (obj *lacpMetric) Unmarshal() unMarshalLacpMetric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallacpMetric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallacpMetric) ToProto() (*otg.LacpMetric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallacpMetric) FromProto(msg *otg.LacpMetric) (LacpMetric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallacpMetric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallacpMetric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallacpMetric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallacpMetric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallacpMetric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallacpMetric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lacpMetric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lacpMetric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lacpMetric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lacpMetric) Clone() (LacpMetric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLacpMetric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LacpMetric is lACP metrics (statistics) per LAG member. +type LacpMetric interface { + Validation + // msg marshals LacpMetric to protobuf object *otg.LacpMetric + // and doesn't set defaults + msg() *otg.LacpMetric + // setMsg unmarshals LacpMetric from protobuf object *otg.LacpMetric + // and doesn't set defaults + setMsg(*otg.LacpMetric) LacpMetric + // provides marshal interface + Marshal() marshalLacpMetric + // provides unmarshal interface + Unmarshal() unMarshalLacpMetric + // validate validates LacpMetric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LacpMetric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LagName returns string, set in LacpMetric. + LagName() string + // SetLagName assigns string provided by user to LacpMetric + SetLagName(value string) LacpMetric + // HasLagName checks if LagName has been set in LacpMetric + HasLagName() bool + // LagMemberPortName returns string, set in LacpMetric. + LagMemberPortName() string + // SetLagMemberPortName assigns string provided by user to LacpMetric + SetLagMemberPortName(value string) LacpMetric + // HasLagMemberPortName checks if LagMemberPortName has been set in LacpMetric + HasLagMemberPortName() bool + // LacpPacketsRx returns uint64, set in LacpMetric. + LacpPacketsRx() uint64 + // SetLacpPacketsRx assigns uint64 provided by user to LacpMetric + SetLacpPacketsRx(value uint64) LacpMetric + // HasLacpPacketsRx checks if LacpPacketsRx has been set in LacpMetric + HasLacpPacketsRx() bool + // LacpPacketsTx returns uint64, set in LacpMetric. + LacpPacketsTx() uint64 + // SetLacpPacketsTx assigns uint64 provided by user to LacpMetric + SetLacpPacketsTx(value uint64) LacpMetric + // HasLacpPacketsTx checks if LacpPacketsTx has been set in LacpMetric + HasLacpPacketsTx() bool + // LacpRxErrors returns uint64, set in LacpMetric. + LacpRxErrors() uint64 + // SetLacpRxErrors assigns uint64 provided by user to LacpMetric + SetLacpRxErrors(value uint64) LacpMetric + // HasLacpRxErrors checks if LacpRxErrors has been set in LacpMetric + HasLacpRxErrors() bool + // Activity returns LacpMetricActivityEnum, set in LacpMetric + Activity() LacpMetricActivityEnum + // SetActivity assigns LacpMetricActivityEnum provided by user to LacpMetric + SetActivity(value LacpMetricActivityEnum) LacpMetric + // HasActivity checks if Activity has been set in LacpMetric + HasActivity() bool + // Timeout returns LacpMetricTimeoutEnum, set in LacpMetric + Timeout() LacpMetricTimeoutEnum + // SetTimeout assigns LacpMetricTimeoutEnum provided by user to LacpMetric + SetTimeout(value LacpMetricTimeoutEnum) LacpMetric + // HasTimeout checks if Timeout has been set in LacpMetric + HasTimeout() bool + // Synchronization returns LacpMetricSynchronizationEnum, set in LacpMetric + Synchronization() LacpMetricSynchronizationEnum + // SetSynchronization assigns LacpMetricSynchronizationEnum provided by user to LacpMetric + SetSynchronization(value LacpMetricSynchronizationEnum) LacpMetric + // HasSynchronization checks if Synchronization has been set in LacpMetric + HasSynchronization() bool + // Aggregatable returns bool, set in LacpMetric. + Aggregatable() bool + // SetAggregatable assigns bool provided by user to LacpMetric + SetAggregatable(value bool) LacpMetric + // HasAggregatable checks if Aggregatable has been set in LacpMetric + HasAggregatable() bool + // Collecting returns bool, set in LacpMetric. + Collecting() bool + // SetCollecting assigns bool provided by user to LacpMetric + SetCollecting(value bool) LacpMetric + // HasCollecting checks if Collecting has been set in LacpMetric + HasCollecting() bool + // Distributing returns bool, set in LacpMetric. + Distributing() bool + // SetDistributing assigns bool provided by user to LacpMetric + SetDistributing(value bool) LacpMetric + // HasDistributing checks if Distributing has been set in LacpMetric + HasDistributing() bool + // SystemId returns string, set in LacpMetric. + SystemId() string + // SetSystemId assigns string provided by user to LacpMetric + SetSystemId(value string) LacpMetric + // HasSystemId checks if SystemId has been set in LacpMetric + HasSystemId() bool + // OperKey returns uint32, set in LacpMetric. + OperKey() uint32 + // SetOperKey assigns uint32 provided by user to LacpMetric + SetOperKey(value uint32) LacpMetric + // HasOperKey checks if OperKey has been set in LacpMetric + HasOperKey() bool + // PartnerId returns string, set in LacpMetric. + PartnerId() string + // SetPartnerId assigns string provided by user to LacpMetric + SetPartnerId(value string) LacpMetric + // HasPartnerId checks if PartnerId has been set in LacpMetric + HasPartnerId() bool + // PartnerKey returns uint32, set in LacpMetric. + PartnerKey() uint32 + // SetPartnerKey assigns uint32 provided by user to LacpMetric + SetPartnerKey(value uint32) LacpMetric + // HasPartnerKey checks if PartnerKey has been set in LacpMetric + HasPartnerKey() bool + // PortNum returns uint32, set in LacpMetric. + PortNum() uint32 + // SetPortNum assigns uint32 provided by user to LacpMetric + SetPortNum(value uint32) LacpMetric + // HasPortNum checks if PortNum has been set in LacpMetric + HasPortNum() bool + // PartnerPortNum returns uint32, set in LacpMetric. + PartnerPortNum() uint32 + // SetPartnerPortNum assigns uint32 provided by user to LacpMetric + SetPartnerPortNum(value uint32) LacpMetric + // HasPartnerPortNum checks if PartnerPortNum has been set in LacpMetric + HasPartnerPortNum() bool +} + +// The name of a LAG (ports group) configured with LACP. +// LagName returns a string +func (obj *lacpMetric) LagName() string { + + return *obj.obj.LagName + +} + +// The name of a LAG (ports group) configured with LACP. +// LagName returns a string +func (obj *lacpMetric) HasLagName() bool { + return obj.obj.LagName != nil +} + +// The name of a LAG (ports group) configured with LACP. +// SetLagName sets the string value in the LacpMetric object +func (obj *lacpMetric) SetLagName(value string) LacpMetric { + + obj.obj.LagName = &value + return obj +} + +// The name of a LAG member (port) configured with LACP. +// LagMemberPortName returns a string +func (obj *lacpMetric) LagMemberPortName() string { + + return *obj.obj.LagMemberPortName + +} + +// The name of a LAG member (port) configured with LACP. +// LagMemberPortName returns a string +func (obj *lacpMetric) HasLagMemberPortName() bool { + return obj.obj.LagMemberPortName != nil +} + +// The name of a LAG member (port) configured with LACP. +// SetLagMemberPortName sets the string value in the LacpMetric object +func (obj *lacpMetric) SetLagMemberPortName(value string) LacpMetric { + + obj.obj.LagMemberPortName = &value + return obj +} + +// Number of LACPDUs received. +// LacpPacketsRx returns a uint64 +func (obj *lacpMetric) LacpPacketsRx() uint64 { + + return *obj.obj.LacpPacketsRx + +} + +// Number of LACPDUs received. +// LacpPacketsRx returns a uint64 +func (obj *lacpMetric) HasLacpPacketsRx() bool { + return obj.obj.LacpPacketsRx != nil +} + +// Number of LACPDUs received. +// SetLacpPacketsRx sets the uint64 value in the LacpMetric object +func (obj *lacpMetric) SetLacpPacketsRx(value uint64) LacpMetric { + + obj.obj.LacpPacketsRx = &value + return obj +} + +// Number of LACPDUs transmitted. +// LacpPacketsTx returns a uint64 +func (obj *lacpMetric) LacpPacketsTx() uint64 { + + return *obj.obj.LacpPacketsTx + +} + +// Number of LACPDUs transmitted. +// LacpPacketsTx returns a uint64 +func (obj *lacpMetric) HasLacpPacketsTx() bool { + return obj.obj.LacpPacketsTx != nil +} + +// Number of LACPDUs transmitted. +// SetLacpPacketsTx sets the uint64 value in the LacpMetric object +func (obj *lacpMetric) SetLacpPacketsTx(value uint64) LacpMetric { + + obj.obj.LacpPacketsTx = &value + return obj +} + +// Number of LACPDUs receive packet errors. +// LacpRxErrors returns a uint64 +func (obj *lacpMetric) LacpRxErrors() uint64 { + + return *obj.obj.LacpRxErrors + +} + +// Number of LACPDUs receive packet errors. +// LacpRxErrors returns a uint64 +func (obj *lacpMetric) HasLacpRxErrors() bool { + return obj.obj.LacpRxErrors != nil +} + +// Number of LACPDUs receive packet errors. +// SetLacpRxErrors sets the uint64 value in the LacpMetric object +func (obj *lacpMetric) SetLacpRxErrors(value uint64) LacpMetric { + + obj.obj.LacpRxErrors = &value + return obj +} + +type LacpMetricActivityEnum string + +// Enum of Activity on LacpMetric +var LacpMetricActivity = struct { + ACTIVE LacpMetricActivityEnum + PASSIVE LacpMetricActivityEnum +}{ + ACTIVE: LacpMetricActivityEnum("active"), + PASSIVE: LacpMetricActivityEnum("passive"), +} + +func (obj *lacpMetric) Activity() LacpMetricActivityEnum { + return LacpMetricActivityEnum(obj.obj.Activity.Enum().String()) +} + +// Indicates participant is active or passive. +// Activity returns a string +func (obj *lacpMetric) HasActivity() bool { + return obj.obj.Activity != nil +} + +func (obj *lacpMetric) SetActivity(value LacpMetricActivityEnum) LacpMetric { + intValue, ok := otg.LacpMetric_Activity_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LacpMetricActivityEnum", string(value))) + return obj + } + enumValue := otg.LacpMetric_Activity_Enum(intValue) + obj.obj.Activity = &enumValue + + return obj +} + +type LacpMetricTimeoutEnum string + +// Enum of Timeout on LacpMetric +var LacpMetricTimeout = struct { + SHORT LacpMetricTimeoutEnum + LONG LacpMetricTimeoutEnum +}{ + SHORT: LacpMetricTimeoutEnum("short"), + LONG: LacpMetricTimeoutEnum("long"), +} + +func (obj *lacpMetric) Timeout() LacpMetricTimeoutEnum { + return LacpMetricTimeoutEnum(obj.obj.Timeout.Enum().String()) +} + +// The timeout type (short or long) used by the participant. +// Timeout returns a string +func (obj *lacpMetric) HasTimeout() bool { + return obj.obj.Timeout != nil +} + +func (obj *lacpMetric) SetTimeout(value LacpMetricTimeoutEnum) LacpMetric { + intValue, ok := otg.LacpMetric_Timeout_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LacpMetricTimeoutEnum", string(value))) + return obj + } + enumValue := otg.LacpMetric_Timeout_Enum(intValue) + obj.obj.Timeout = &enumValue + + return obj +} + +type LacpMetricSynchronizationEnum string + +// Enum of Synchronization on LacpMetric +var LacpMetricSynchronization = struct { + IN_SYNC LacpMetricSynchronizationEnum + OUT_SYNC LacpMetricSynchronizationEnum +}{ + IN_SYNC: LacpMetricSynchronizationEnum("in_sync"), + OUT_SYNC: LacpMetricSynchronizationEnum("out_sync"), +} + +func (obj *lacpMetric) Synchronization() LacpMetricSynchronizationEnum { + return LacpMetricSynchronizationEnum(obj.obj.Synchronization.Enum().String()) +} + +// Indicates whether the participant is in-sync or out-of-sync. +// Synchronization returns a string +func (obj *lacpMetric) HasSynchronization() bool { + return obj.obj.Synchronization != nil +} + +func (obj *lacpMetric) SetSynchronization(value LacpMetricSynchronizationEnum) LacpMetric { + intValue, ok := otg.LacpMetric_Synchronization_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LacpMetricSynchronizationEnum", string(value))) + return obj + } + enumValue := otg.LacpMetric_Synchronization_Enum(intValue) + obj.obj.Synchronization = &enumValue + + return obj +} + +// A true value indicates that the participant will allow the link to be used as part of the aggregate. A false value indicates the link should be used as an individual link. +// Aggregatable returns a bool +func (obj *lacpMetric) Aggregatable() bool { + + return *obj.obj.Aggregatable + +} + +// A true value indicates that the participant will allow the link to be used as part of the aggregate. A false value indicates the link should be used as an individual link. +// Aggregatable returns a bool +func (obj *lacpMetric) HasAggregatable() bool { + return obj.obj.Aggregatable != nil +} + +// A true value indicates that the participant will allow the link to be used as part of the aggregate. A false value indicates the link should be used as an individual link. +// SetAggregatable sets the bool value in the LacpMetric object +func (obj *lacpMetric) SetAggregatable(value bool) LacpMetric { + + obj.obj.Aggregatable = &value + return obj +} + +// If true, the participant is collecting incoming frames on the link, otherwise false. +// Collecting returns a bool +func (obj *lacpMetric) Collecting() bool { + + return *obj.obj.Collecting + +} + +// If true, the participant is collecting incoming frames on the link, otherwise false. +// Collecting returns a bool +func (obj *lacpMetric) HasCollecting() bool { + return obj.obj.Collecting != nil +} + +// If true, the participant is collecting incoming frames on the link, otherwise false. +// SetCollecting sets the bool value in the LacpMetric object +func (obj *lacpMetric) SetCollecting(value bool) LacpMetric { + + obj.obj.Collecting = &value + return obj +} + +// When true, the participant is distributing outgoing frames; when false, distribution is disabled. +// Distributing returns a bool +func (obj *lacpMetric) Distributing() bool { + + return *obj.obj.Distributing + +} + +// When true, the participant is distributing outgoing frames; when false, distribution is disabled. +// Distributing returns a bool +func (obj *lacpMetric) HasDistributing() bool { + return obj.obj.Distributing != nil +} + +// When true, the participant is distributing outgoing frames; when false, distribution is disabled. +// SetDistributing sets the bool value in the LacpMetric object +func (obj *lacpMetric) SetDistributing(value bool) LacpMetric { + + obj.obj.Distributing = &value + return obj +} + +// MAC address that defines the local system ID for the aggregate interface. +// SystemId returns a string +func (obj *lacpMetric) SystemId() string { + + return *obj.obj.SystemId + +} + +// MAC address that defines the local system ID for the aggregate interface. +// SystemId returns a string +func (obj *lacpMetric) HasSystemId() bool { + return obj.obj.SystemId != nil +} + +// MAC address that defines the local system ID for the aggregate interface. +// SetSystemId sets the string value in the LacpMetric object +func (obj *lacpMetric) SetSystemId(value string) LacpMetric { + + obj.obj.SystemId = &value + return obj +} + +// Current operational value of the key for the aggregate interface. +// OperKey returns a uint32 +func (obj *lacpMetric) OperKey() uint32 { + + return *obj.obj.OperKey + +} + +// Current operational value of the key for the aggregate interface. +// OperKey returns a uint32 +func (obj *lacpMetric) HasOperKey() bool { + return obj.obj.OperKey != nil +} + +// Current operational value of the key for the aggregate interface. +// SetOperKey sets the uint32 value in the LacpMetric object +func (obj *lacpMetric) SetOperKey(value uint32) LacpMetric { + + obj.obj.OperKey = &value + return obj +} + +// MAC address representing the protocol partner's interface system ID. +// PartnerId returns a string +func (obj *lacpMetric) PartnerId() string { + + return *obj.obj.PartnerId + +} + +// MAC address representing the protocol partner's interface system ID. +// PartnerId returns a string +func (obj *lacpMetric) HasPartnerId() bool { + return obj.obj.PartnerId != nil +} + +// MAC address representing the protocol partner's interface system ID. +// SetPartnerId sets the string value in the LacpMetric object +func (obj *lacpMetric) SetPartnerId(value string) LacpMetric { + + obj.obj.PartnerId = &value + return obj +} + +// Operational value of the protocol partner's key. +// PartnerKey returns a uint32 +func (obj *lacpMetric) PartnerKey() uint32 { + + return *obj.obj.PartnerKey + +} + +// Operational value of the protocol partner's key. +// PartnerKey returns a uint32 +func (obj *lacpMetric) HasPartnerKey() bool { + return obj.obj.PartnerKey != nil +} + +// Operational value of the protocol partner's key. +// SetPartnerKey sets the uint32 value in the LacpMetric object +func (obj *lacpMetric) SetPartnerKey(value uint32) LacpMetric { + + obj.obj.PartnerKey = &value + return obj +} + +// Port number of the local (actor) aggregation member. +// PortNum returns a uint32 +func (obj *lacpMetric) PortNum() uint32 { + + return *obj.obj.PortNum + +} + +// Port number of the local (actor) aggregation member. +// PortNum returns a uint32 +func (obj *lacpMetric) HasPortNum() bool { + return obj.obj.PortNum != nil +} + +// Port number of the local (actor) aggregation member. +// SetPortNum sets the uint32 value in the LacpMetric object +func (obj *lacpMetric) SetPortNum(value uint32) LacpMetric { + + obj.obj.PortNum = &value + return obj +} + +// Port number of the partner (remote) port for this member port. +// PartnerPortNum returns a uint32 +func (obj *lacpMetric) PartnerPortNum() uint32 { + + return *obj.obj.PartnerPortNum + +} + +// Port number of the partner (remote) port for this member port. +// PartnerPortNum returns a uint32 +func (obj *lacpMetric) HasPartnerPortNum() bool { + return obj.obj.PartnerPortNum != nil +} + +// Port number of the partner (remote) port for this member port. +// SetPartnerPortNum sets the uint32 value in the LacpMetric object +func (obj *lacpMetric) SetPartnerPortNum(value uint32) LacpMetric { + + obj.obj.PartnerPortNum = &value + return obj +} + +func (obj *lacpMetric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.SystemId != nil { + + err := obj.validateMac(obj.SystemId()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on LacpMetric.SystemId")) + } + + } + + if obj.obj.PartnerId != nil { + + err := obj.validateMac(obj.PartnerId()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on LacpMetric.PartnerId")) + } + + } + +} + +func (obj *lacpMetric) setDefault() { + +} diff --git a/gosnappi/lacp_metrics_request.go b/gosnappi/lacp_metrics_request.go new file mode 100644 index 00000000..998c38f9 --- /dev/null +++ b/gosnappi/lacp_metrics_request.go @@ -0,0 +1,418 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LacpMetricsRequest ***** +type lacpMetricsRequest struct { + validation + obj *otg.LacpMetricsRequest + marshaller marshalLacpMetricsRequest + unMarshaller unMarshalLacpMetricsRequest +} + +func NewLacpMetricsRequest() LacpMetricsRequest { + obj := lacpMetricsRequest{obj: &otg.LacpMetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *lacpMetricsRequest) msg() *otg.LacpMetricsRequest { + return obj.obj +} + +func (obj *lacpMetricsRequest) setMsg(msg *otg.LacpMetricsRequest) LacpMetricsRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallacpMetricsRequest struct { + obj *lacpMetricsRequest +} + +type marshalLacpMetricsRequest interface { + // ToProto marshals LacpMetricsRequest to protobuf object *otg.LacpMetricsRequest + ToProto() (*otg.LacpMetricsRequest, error) + // ToPbText marshals LacpMetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals LacpMetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals LacpMetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshallacpMetricsRequest struct { + obj *lacpMetricsRequest +} + +type unMarshalLacpMetricsRequest interface { + // FromProto unmarshals LacpMetricsRequest from protobuf object *otg.LacpMetricsRequest + FromProto(msg *otg.LacpMetricsRequest) (LacpMetricsRequest, error) + // FromPbText unmarshals LacpMetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LacpMetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals LacpMetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *lacpMetricsRequest) Marshal() marshalLacpMetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshallacpMetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *lacpMetricsRequest) Unmarshal() unMarshalLacpMetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallacpMetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallacpMetricsRequest) ToProto() (*otg.LacpMetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallacpMetricsRequest) FromProto(msg *otg.LacpMetricsRequest) (LacpMetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallacpMetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallacpMetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallacpMetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallacpMetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallacpMetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallacpMetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lacpMetricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lacpMetricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lacpMetricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lacpMetricsRequest) Clone() (LacpMetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLacpMetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LacpMetricsRequest is the request to retrieve LACP per LAG member metrics/statistics. +type LacpMetricsRequest interface { + Validation + // msg marshals LacpMetricsRequest to protobuf object *otg.LacpMetricsRequest + // and doesn't set defaults + msg() *otg.LacpMetricsRequest + // setMsg unmarshals LacpMetricsRequest from protobuf object *otg.LacpMetricsRequest + // and doesn't set defaults + setMsg(*otg.LacpMetricsRequest) LacpMetricsRequest + // provides marshal interface + Marshal() marshalLacpMetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalLacpMetricsRequest + // validate validates LacpMetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LacpMetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LagNames returns []string, set in LacpMetricsRequest. + LagNames() []string + // SetLagNames assigns []string provided by user to LacpMetricsRequest + SetLagNames(value []string) LacpMetricsRequest + // LagMemberPortNames returns []string, set in LacpMetricsRequest. + LagMemberPortNames() []string + // SetLagMemberPortNames assigns []string provided by user to LacpMetricsRequest + SetLagMemberPortNames(value []string) LacpMetricsRequest + // ColumnNames returns []LacpMetricsRequestColumnNamesEnum, set in LacpMetricsRequest + ColumnNames() []LacpMetricsRequestColumnNamesEnum + // SetColumnNames assigns []LacpMetricsRequestColumnNamesEnum provided by user to LacpMetricsRequest + SetColumnNames(value []LacpMetricsRequestColumnNamesEnum) LacpMetricsRequest +} + +// The names of LAG (ports group) for which LACP metrics to be returned. An empty list will return metrics for all LAGs. +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// LagNames returns a []string +func (obj *lacpMetricsRequest) LagNames() []string { + if obj.obj.LagNames == nil { + obj.obj.LagNames = make([]string, 0) + } + return obj.obj.LagNames +} + +// The names of LAG (ports group) for which LACP metrics to be returned. An empty list will return metrics for all LAGs. +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// SetLagNames sets the []string value in the LacpMetricsRequest object +func (obj *lacpMetricsRequest) SetLagNames(value []string) LacpMetricsRequest { + + if obj.obj.LagNames == nil { + obj.obj.LagNames = make([]string, 0) + } + obj.obj.LagNames = value + + return obj +} + +// The names of LAG members (ports) for which LACP metrics to be returned. An empty list will return metrics for all LAG members. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// LagMemberPortNames returns a []string +func (obj *lacpMetricsRequest) LagMemberPortNames() []string { + if obj.obj.LagMemberPortNames == nil { + obj.obj.LagMemberPortNames = make([]string, 0) + } + return obj.obj.LagMemberPortNames +} + +// The names of LAG members (ports) for which LACP metrics to be returned. An empty list will return metrics for all LAG members. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// SetLagMemberPortNames sets the []string value in the LacpMetricsRequest object +func (obj *lacpMetricsRequest) SetLagMemberPortNames(value []string) LacpMetricsRequest { + + if obj.obj.LagMemberPortNames == nil { + obj.obj.LagMemberPortNames = make([]string, 0) + } + obj.obj.LagMemberPortNames = value + + return obj +} + +type LacpMetricsRequestColumnNamesEnum string + +// Enum of ColumnNames on LacpMetricsRequest +var LacpMetricsRequestColumnNames = struct { + LACP_PACKETS_RX LacpMetricsRequestColumnNamesEnum + LACP_PACKETS_TX LacpMetricsRequestColumnNamesEnum + LACP_RX_ERRORS LacpMetricsRequestColumnNamesEnum + ACTIVITY LacpMetricsRequestColumnNamesEnum + TIMEOUT LacpMetricsRequestColumnNamesEnum + SYNCHRONIZATION LacpMetricsRequestColumnNamesEnum + AGGREGATABLE LacpMetricsRequestColumnNamesEnum + COLLECTING LacpMetricsRequestColumnNamesEnum + DISTRIBUTING LacpMetricsRequestColumnNamesEnum + SYSTEM_ID LacpMetricsRequestColumnNamesEnum + OPER_KEY LacpMetricsRequestColumnNamesEnum + PARTNER_ID LacpMetricsRequestColumnNamesEnum + PARTNER_KEY LacpMetricsRequestColumnNamesEnum + PORT_NUM LacpMetricsRequestColumnNamesEnum + PARTNER_PORT_NUM LacpMetricsRequestColumnNamesEnum +}{ + LACP_PACKETS_RX: LacpMetricsRequestColumnNamesEnum("lacp_packets_rx"), + LACP_PACKETS_TX: LacpMetricsRequestColumnNamesEnum("lacp_packets_tx"), + LACP_RX_ERRORS: LacpMetricsRequestColumnNamesEnum("lacp_rx_errors"), + ACTIVITY: LacpMetricsRequestColumnNamesEnum("activity"), + TIMEOUT: LacpMetricsRequestColumnNamesEnum("timeout"), + SYNCHRONIZATION: LacpMetricsRequestColumnNamesEnum("synchronization"), + AGGREGATABLE: LacpMetricsRequestColumnNamesEnum("aggregatable"), + COLLECTING: LacpMetricsRequestColumnNamesEnum("collecting"), + DISTRIBUTING: LacpMetricsRequestColumnNamesEnum("distributing"), + SYSTEM_ID: LacpMetricsRequestColumnNamesEnum("system_id"), + OPER_KEY: LacpMetricsRequestColumnNamesEnum("oper_key"), + PARTNER_ID: LacpMetricsRequestColumnNamesEnum("partner_id"), + PARTNER_KEY: LacpMetricsRequestColumnNamesEnum("partner_key"), + PORT_NUM: LacpMetricsRequestColumnNamesEnum("port_num"), + PARTNER_PORT_NUM: LacpMetricsRequestColumnNamesEnum("partner_port_num"), +} + +func (obj *lacpMetricsRequest) ColumnNames() []LacpMetricsRequestColumnNamesEnum { + items := []LacpMetricsRequestColumnNamesEnum{} + for _, item := range obj.obj.ColumnNames { + items = append(items, LacpMetricsRequestColumnNamesEnum(item.String())) + } + return items +} + +// The list of column names that the returned result set will contain. If the list is empty then all columns will be returned. The name of LAG and LAG member can not be excluded. +// SetColumnNames sets the []string value in the LacpMetricsRequest object +func (obj *lacpMetricsRequest) SetColumnNames(value []LacpMetricsRequestColumnNamesEnum) LacpMetricsRequest { + + items := []otg.LacpMetricsRequest_ColumnNames_Enum{} + for _, item := range value { + intValue := otg.LacpMetricsRequest_ColumnNames_Enum_value[string(item)] + items = append(items, otg.LacpMetricsRequest_ColumnNames_Enum(intValue)) + } + obj.obj.ColumnNames = items + return obj +} + +func (obj *lacpMetricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *lacpMetricsRequest) setDefault() { + +} diff --git a/gosnappi/lag.go b/gosnappi/lag.go new file mode 100644 index 00000000..e6d96870 --- /dev/null +++ b/gosnappi/lag.go @@ -0,0 +1,501 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Lag ***** +type lag struct { + validation + obj *otg.Lag + marshaller marshalLag + unMarshaller unMarshalLag + portsHolder LagLagPortIter + protocolHolder LagProtocol +} + +func NewLag() Lag { + obj := lag{obj: &otg.Lag{}} + obj.setDefault() + return &obj +} + +func (obj *lag) msg() *otg.Lag { + return obj.obj +} + +func (obj *lag) setMsg(msg *otg.Lag) Lag { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshallag struct { + obj *lag +} + +type marshalLag interface { + // ToProto marshals Lag to protobuf object *otg.Lag + ToProto() (*otg.Lag, error) + // ToPbText marshals Lag to protobuf text + ToPbText() (string, error) + // ToYaml marshals Lag to YAML text + ToYaml() (string, error) + // ToJson marshals Lag to JSON text + ToJson() (string, error) +} + +type unMarshallag struct { + obj *lag +} + +type unMarshalLag interface { + // FromProto unmarshals Lag from protobuf object *otg.Lag + FromProto(msg *otg.Lag) (Lag, error) + // FromPbText unmarshals Lag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Lag from YAML text + FromYaml(value string) error + // FromJson unmarshals Lag from JSON text + FromJson(value string) error +} + +func (obj *lag) Marshal() marshalLag { + if obj.marshaller == nil { + obj.marshaller = &marshallag{obj: obj} + } + return obj.marshaller +} + +func (obj *lag) Unmarshal() unMarshalLag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallag) ToProto() (*otg.Lag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallag) FromProto(msg *otg.Lag) (Lag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lag) Clone() (Lag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *lag) setNil() { + obj.portsHolder = nil + obj.protocolHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Lag is the container for LAG (ports group) - aggregation of multiple LAG members (ports) +type Lag interface { + Validation + // msg marshals Lag to protobuf object *otg.Lag + // and doesn't set defaults + msg() *otg.Lag + // setMsg unmarshals Lag from protobuf object *otg.Lag + // and doesn't set defaults + setMsg(*otg.Lag) Lag + // provides marshal interface + Marshal() marshalLag + // provides unmarshal interface + Unmarshal() unMarshalLag + // validate validates Lag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Lag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ports returns LagLagPortIterIter, set in Lag + Ports() LagLagPortIter + // Protocol returns LagProtocol, set in Lag. + // LagProtocol is description is TBD + Protocol() LagProtocol + // SetProtocol assigns LagProtocol provided by user to Lag. + // LagProtocol is description is TBD + SetProtocol(value LagProtocol) Lag + // HasProtocol checks if Protocol has been set in Lag + HasProtocol() bool + // MinLinks returns uint32, set in Lag. + MinLinks() uint32 + // SetMinLinks assigns uint32 provided by user to Lag + SetMinLinks(value uint32) Lag + // HasMinLinks checks if MinLinks has been set in Lag + HasMinLinks() bool + // Name returns string, set in Lag. + Name() string + // SetName assigns string provided by user to Lag + SetName(value string) Lag + setNil() +} + +// description is TBD +// Ports returns a []LagPort +func (obj *lag) Ports() LagLagPortIter { + if len(obj.obj.Ports) == 0 { + obj.obj.Ports = []*otg.LagPort{} + } + if obj.portsHolder == nil { + obj.portsHolder = newLagLagPortIter(&obj.obj.Ports).setMsg(obj) + } + return obj.portsHolder +} + +type lagLagPortIter struct { + obj *lag + lagPortSlice []LagPort + fieldPtr *[]*otg.LagPort +} + +func newLagLagPortIter(ptr *[]*otg.LagPort) LagLagPortIter { + return &lagLagPortIter{fieldPtr: ptr} +} + +type LagLagPortIter interface { + setMsg(*lag) LagLagPortIter + Items() []LagPort + Add() LagPort + Append(items ...LagPort) LagLagPortIter + Set(index int, newObj LagPort) LagLagPortIter + Clear() LagLagPortIter + clearHolderSlice() LagLagPortIter + appendHolderSlice(item LagPort) LagLagPortIter +} + +func (obj *lagLagPortIter) setMsg(msg *lag) LagLagPortIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&lagPort{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *lagLagPortIter) Items() []LagPort { + return obj.lagPortSlice +} + +func (obj *lagLagPortIter) Add() LagPort { + newObj := &otg.LagPort{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &lagPort{obj: newObj} + newLibObj.setDefault() + obj.lagPortSlice = append(obj.lagPortSlice, newLibObj) + return newLibObj +} + +func (obj *lagLagPortIter) Append(items ...LagPort) LagLagPortIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.lagPortSlice = append(obj.lagPortSlice, item) + } + return obj +} + +func (obj *lagLagPortIter) Set(index int, newObj LagPort) LagLagPortIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.lagPortSlice[index] = newObj + return obj +} +func (obj *lagLagPortIter) Clear() LagLagPortIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.LagPort{} + obj.lagPortSlice = []LagPort{} + } + return obj +} +func (obj *lagLagPortIter) clearHolderSlice() LagLagPortIter { + if len(obj.lagPortSlice) > 0 { + obj.lagPortSlice = []LagPort{} + } + return obj +} +func (obj *lagLagPortIter) appendHolderSlice(item LagPort) LagLagPortIter { + obj.lagPortSlice = append(obj.lagPortSlice, item) + return obj +} + +// description is TBD +// Protocol returns a LagProtocol +func (obj *lag) Protocol() LagProtocol { + if obj.obj.Protocol == nil { + obj.obj.Protocol = NewLagProtocol().msg() + } + if obj.protocolHolder == nil { + obj.protocolHolder = &lagProtocol{obj: obj.obj.Protocol} + } + return obj.protocolHolder +} + +// description is TBD +// Protocol returns a LagProtocol +func (obj *lag) HasProtocol() bool { + return obj.obj.Protocol != nil +} + +// description is TBD +// SetProtocol sets the LagProtocol value in the Lag object +func (obj *lag) SetProtocol(value LagProtocol) Lag { + + obj.protocolHolder = nil + obj.obj.Protocol = value.msg() + + return obj +} + +// Specifies the mininum number of member interfaces that must be active for the aggregate interface to be available. +// If the aggregate interface is not available due to min-links criterion not being met, LACPDUs continue to be transmitted and received by the member interfaces if LACP is enabled, but other PDUs are not transmitted or received. +// MinLinks returns a uint32 +func (obj *lag) MinLinks() uint32 { + + return *obj.obj.MinLinks + +} + +// Specifies the mininum number of member interfaces that must be active for the aggregate interface to be available. +// If the aggregate interface is not available due to min-links criterion not being met, LACPDUs continue to be transmitted and received by the member interfaces if LACP is enabled, but other PDUs are not transmitted or received. +// MinLinks returns a uint32 +func (obj *lag) HasMinLinks() bool { + return obj.obj.MinLinks != nil +} + +// Specifies the mininum number of member interfaces that must be active for the aggregate interface to be available. +// If the aggregate interface is not available due to min-links criterion not being met, LACPDUs continue to be transmitted and received by the member interfaces if LACP is enabled, but other PDUs are not transmitted or received. +// SetMinLinks sets the uint32 value in the Lag object +func (obj *lag) SetMinLinks(value uint32) Lag { + + obj.obj.MinLinks = &value + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *lag) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the Lag object +func (obj *lag) SetName(value string) Lag { + + obj.obj.Name = &value + return obj +} + +func (obj *lag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Ports) != 0 { + + if set_default { + obj.Ports().clearHolderSlice() + for _, item := range obj.obj.Ports { + obj.Ports().appendHolderSlice(&lagPort{obj: item}) + } + } + for _, item := range obj.Ports().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Protocol != nil { + + obj.Protocol().validateObj(vObj, set_default) + } + + if obj.obj.MinLinks != nil { + + if *obj.obj.MinLinks > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Lag.MinLinks <= 32 but Got %d", *obj.obj.MinLinks)) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface Lag") + } +} + +func (obj *lag) setDefault() { + if obj.obj.MinLinks == nil { + obj.SetMinLinks(1) + } + +} diff --git a/gosnappi/lag_metric.go b/gosnappi/lag_metric.go new file mode 100644 index 00000000..9e01854e --- /dev/null +++ b/gosnappi/lag_metric.go @@ -0,0 +1,629 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LagMetric ***** +type lagMetric struct { + validation + obj *otg.LagMetric + marshaller marshalLagMetric + unMarshaller unMarshalLagMetric +} + +func NewLagMetric() LagMetric { + obj := lagMetric{obj: &otg.LagMetric{}} + obj.setDefault() + return &obj +} + +func (obj *lagMetric) msg() *otg.LagMetric { + return obj.obj +} + +func (obj *lagMetric) setMsg(msg *otg.LagMetric) LagMetric { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallagMetric struct { + obj *lagMetric +} + +type marshalLagMetric interface { + // ToProto marshals LagMetric to protobuf object *otg.LagMetric + ToProto() (*otg.LagMetric, error) + // ToPbText marshals LagMetric to protobuf text + ToPbText() (string, error) + // ToYaml marshals LagMetric to YAML text + ToYaml() (string, error) + // ToJson marshals LagMetric to JSON text + ToJson() (string, error) +} + +type unMarshallagMetric struct { + obj *lagMetric +} + +type unMarshalLagMetric interface { + // FromProto unmarshals LagMetric from protobuf object *otg.LagMetric + FromProto(msg *otg.LagMetric) (LagMetric, error) + // FromPbText unmarshals LagMetric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LagMetric from YAML text + FromYaml(value string) error + // FromJson unmarshals LagMetric from JSON text + FromJson(value string) error +} + +func (obj *lagMetric) Marshal() marshalLagMetric { + if obj.marshaller == nil { + obj.marshaller = &marshallagMetric{obj: obj} + } + return obj.marshaller +} + +func (obj *lagMetric) Unmarshal() unMarshalLagMetric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallagMetric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallagMetric) ToProto() (*otg.LagMetric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallagMetric) FromProto(msg *otg.LagMetric) (LagMetric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallagMetric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallagMetric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallagMetric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallagMetric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallagMetric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallagMetric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lagMetric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lagMetric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lagMetric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lagMetric) Clone() (LagMetric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLagMetric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LagMetric is description is TBD +type LagMetric interface { + Validation + // msg marshals LagMetric to protobuf object *otg.LagMetric + // and doesn't set defaults + msg() *otg.LagMetric + // setMsg unmarshals LagMetric from protobuf object *otg.LagMetric + // and doesn't set defaults + setMsg(*otg.LagMetric) LagMetric + // provides marshal interface + Marshal() marshalLagMetric + // provides unmarshal interface + Unmarshal() unMarshalLagMetric + // validate validates LagMetric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LagMetric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in LagMetric. + Name() string + // SetName assigns string provided by user to LagMetric + SetName(value string) LagMetric + // HasName checks if Name has been set in LagMetric + HasName() bool + // OperStatus returns LagMetricOperStatusEnum, set in LagMetric + OperStatus() LagMetricOperStatusEnum + // SetOperStatus assigns LagMetricOperStatusEnum provided by user to LagMetric + SetOperStatus(value LagMetricOperStatusEnum) LagMetric + // HasOperStatus checks if OperStatus has been set in LagMetric + HasOperStatus() bool + // MemberPortsUp returns uint32, set in LagMetric. + MemberPortsUp() uint32 + // SetMemberPortsUp assigns uint32 provided by user to LagMetric + SetMemberPortsUp(value uint32) LagMetric + // HasMemberPortsUp checks if MemberPortsUp has been set in LagMetric + HasMemberPortsUp() bool + // FramesTx returns uint64, set in LagMetric. + FramesTx() uint64 + // SetFramesTx assigns uint64 provided by user to LagMetric + SetFramesTx(value uint64) LagMetric + // HasFramesTx checks if FramesTx has been set in LagMetric + HasFramesTx() bool + // FramesRx returns uint64, set in LagMetric. + FramesRx() uint64 + // SetFramesRx assigns uint64 provided by user to LagMetric + SetFramesRx(value uint64) LagMetric + // HasFramesRx checks if FramesRx has been set in LagMetric + HasFramesRx() bool + // BytesTx returns uint64, set in LagMetric. + BytesTx() uint64 + // SetBytesTx assigns uint64 provided by user to LagMetric + SetBytesTx(value uint64) LagMetric + // HasBytesTx checks if BytesTx has been set in LagMetric + HasBytesTx() bool + // BytesRx returns uint64, set in LagMetric. + BytesRx() uint64 + // SetBytesRx assigns uint64 provided by user to LagMetric + SetBytesRx(value uint64) LagMetric + // HasBytesRx checks if BytesRx has been set in LagMetric + HasBytesRx() bool + // FramesTxRate returns float32, set in LagMetric. + FramesTxRate() float32 + // SetFramesTxRate assigns float32 provided by user to LagMetric + SetFramesTxRate(value float32) LagMetric + // HasFramesTxRate checks if FramesTxRate has been set in LagMetric + HasFramesTxRate() bool + // FramesRxRate returns float32, set in LagMetric. + FramesRxRate() float32 + // SetFramesRxRate assigns float32 provided by user to LagMetric + SetFramesRxRate(value float32) LagMetric + // HasFramesRxRate checks if FramesRxRate has been set in LagMetric + HasFramesRxRate() bool + // BytesTxRate returns float32, set in LagMetric. + BytesTxRate() float32 + // SetBytesTxRate assigns float32 provided by user to LagMetric + SetBytesTxRate(value float32) LagMetric + // HasBytesTxRate checks if BytesTxRate has been set in LagMetric + HasBytesTxRate() bool + // BytesRxRate returns float32, set in LagMetric. + BytesRxRate() float32 + // SetBytesRxRate assigns float32 provided by user to LagMetric + SetBytesRxRate(value float32) LagMetric + // HasBytesRxRate checks if BytesRxRate has been set in LagMetric + HasBytesRxRate() bool +} + +// The name of a configured LAG +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// Name returns a string +func (obj *lagMetric) Name() string { + + return *obj.obj.Name + +} + +// The name of a configured LAG +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// Name returns a string +func (obj *lagMetric) HasName() bool { + return obj.obj.Name != nil +} + +// The name of a configured LAG +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// SetName sets the string value in the LagMetric object +func (obj *lagMetric) SetName(value string) LagMetric { + + obj.obj.Name = &value + return obj +} + +type LagMetricOperStatusEnum string + +// Enum of OperStatus on LagMetric +var LagMetricOperStatus = struct { + UP LagMetricOperStatusEnum + DOWN LagMetricOperStatusEnum +}{ + UP: LagMetricOperStatusEnum("up"), + DOWN: LagMetricOperStatusEnum("down"), +} + +func (obj *lagMetric) OperStatus() LagMetricOperStatusEnum { + return LagMetricOperStatusEnum(obj.obj.OperStatus.Enum().String()) +} + +// The current operational state of the LAG. The state can be up or down. State 'up' indicates member_ports_up >= min_links. +// OperStatus returns a string +func (obj *lagMetric) HasOperStatus() bool { + return obj.obj.OperStatus != nil +} + +func (obj *lagMetric) SetOperStatus(value LagMetricOperStatusEnum) LagMetric { + intValue, ok := otg.LagMetric_OperStatus_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LagMetricOperStatusEnum", string(value))) + return obj + } + enumValue := otg.LagMetric_OperStatus_Enum(intValue) + obj.obj.OperStatus = &enumValue + + return obj +} + +// The number of LAG member ports up. +// MemberPortsUp returns a uint32 +func (obj *lagMetric) MemberPortsUp() uint32 { + + return *obj.obj.MemberPortsUp + +} + +// The number of LAG member ports up. +// MemberPortsUp returns a uint32 +func (obj *lagMetric) HasMemberPortsUp() bool { + return obj.obj.MemberPortsUp != nil +} + +// The number of LAG member ports up. +// SetMemberPortsUp sets the uint32 value in the LagMetric object +func (obj *lagMetric) SetMemberPortsUp(value uint32) LagMetric { + + obj.obj.MemberPortsUp = &value + return obj +} + +// The current total number of frames transmitted. +// FramesTx returns a uint64 +func (obj *lagMetric) FramesTx() uint64 { + + return *obj.obj.FramesTx + +} + +// The current total number of frames transmitted. +// FramesTx returns a uint64 +func (obj *lagMetric) HasFramesTx() bool { + return obj.obj.FramesTx != nil +} + +// The current total number of frames transmitted. +// SetFramesTx sets the uint64 value in the LagMetric object +func (obj *lagMetric) SetFramesTx(value uint64) LagMetric { + + obj.obj.FramesTx = &value + return obj +} + +// The current total number of valid frames received. +// FramesRx returns a uint64 +func (obj *lagMetric) FramesRx() uint64 { + + return *obj.obj.FramesRx + +} + +// The current total number of valid frames received. +// FramesRx returns a uint64 +func (obj *lagMetric) HasFramesRx() bool { + return obj.obj.FramesRx != nil +} + +// The current total number of valid frames received. +// SetFramesRx sets the uint64 value in the LagMetric object +func (obj *lagMetric) SetFramesRx(value uint64) LagMetric { + + obj.obj.FramesRx = &value + return obj +} + +// The current total number of bytes transmitted. +// BytesTx returns a uint64 +func (obj *lagMetric) BytesTx() uint64 { + + return *obj.obj.BytesTx + +} + +// The current total number of bytes transmitted. +// BytesTx returns a uint64 +func (obj *lagMetric) HasBytesTx() bool { + return obj.obj.BytesTx != nil +} + +// The current total number of bytes transmitted. +// SetBytesTx sets the uint64 value in the LagMetric object +func (obj *lagMetric) SetBytesTx(value uint64) LagMetric { + + obj.obj.BytesTx = &value + return obj +} + +// The current total number of valid bytes received. +// BytesRx returns a uint64 +func (obj *lagMetric) BytesRx() uint64 { + + return *obj.obj.BytesRx + +} + +// The current total number of valid bytes received. +// BytesRx returns a uint64 +func (obj *lagMetric) HasBytesRx() bool { + return obj.obj.BytesRx != nil +} + +// The current total number of valid bytes received. +// SetBytesRx sets the uint64 value in the LagMetric object +func (obj *lagMetric) SetBytesRx(value uint64) LagMetric { + + obj.obj.BytesRx = &value + return obj +} + +// The current rate of frames transmitted. +// FramesTxRate returns a float32 +func (obj *lagMetric) FramesTxRate() float32 { + + return *obj.obj.FramesTxRate + +} + +// The current rate of frames transmitted. +// FramesTxRate returns a float32 +func (obj *lagMetric) HasFramesTxRate() bool { + return obj.obj.FramesTxRate != nil +} + +// The current rate of frames transmitted. +// SetFramesTxRate sets the float32 value in the LagMetric object +func (obj *lagMetric) SetFramesTxRate(value float32) LagMetric { + + obj.obj.FramesTxRate = &value + return obj +} + +// The current rate of valid frames received. +// FramesRxRate returns a float32 +func (obj *lagMetric) FramesRxRate() float32 { + + return *obj.obj.FramesRxRate + +} + +// The current rate of valid frames received. +// FramesRxRate returns a float32 +func (obj *lagMetric) HasFramesRxRate() bool { + return obj.obj.FramesRxRate != nil +} + +// The current rate of valid frames received. +// SetFramesRxRate sets the float32 value in the LagMetric object +func (obj *lagMetric) SetFramesRxRate(value float32) LagMetric { + + obj.obj.FramesRxRate = &value + return obj +} + +// The current rate of bytes transmitted. +// BytesTxRate returns a float32 +func (obj *lagMetric) BytesTxRate() float32 { + + return *obj.obj.BytesTxRate + +} + +// The current rate of bytes transmitted. +// BytesTxRate returns a float32 +func (obj *lagMetric) HasBytesTxRate() bool { + return obj.obj.BytesTxRate != nil +} + +// The current rate of bytes transmitted. +// SetBytesTxRate sets the float32 value in the LagMetric object +func (obj *lagMetric) SetBytesTxRate(value float32) LagMetric { + + obj.obj.BytesTxRate = &value + return obj +} + +// The current rate of bytes received. +// BytesRxRate returns a float32 +func (obj *lagMetric) BytesRxRate() float32 { + + return *obj.obj.BytesRxRate + +} + +// The current rate of bytes received. +// BytesRxRate returns a float32 +func (obj *lagMetric) HasBytesRxRate() bool { + return obj.obj.BytesRxRate != nil +} + +// The current rate of bytes received. +// SetBytesRxRate sets the float32 value in the LagMetric object +func (obj *lagMetric) SetBytesRxRate(value float32) LagMetric { + + obj.obj.BytesRxRate = &value + return obj +} + +func (obj *lagMetric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.BytesRx != nil { + + if *obj.obj.BytesRx > 18446744073709551615 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= LagMetric.BytesRx <= 18446744073709551615 but Got %d", *obj.obj.BytesRx)) + } + + } + +} + +func (obj *lagMetric) setDefault() { + +} diff --git a/gosnappi/lag_metrics_request.go b/gosnappi/lag_metrics_request.go new file mode 100644 index 00000000..b7d5c7bc --- /dev/null +++ b/gosnappi/lag_metrics_request.go @@ -0,0 +1,369 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LagMetricsRequest ***** +type lagMetricsRequest struct { + validation + obj *otg.LagMetricsRequest + marshaller marshalLagMetricsRequest + unMarshaller unMarshalLagMetricsRequest +} + +func NewLagMetricsRequest() LagMetricsRequest { + obj := lagMetricsRequest{obj: &otg.LagMetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *lagMetricsRequest) msg() *otg.LagMetricsRequest { + return obj.obj +} + +func (obj *lagMetricsRequest) setMsg(msg *otg.LagMetricsRequest) LagMetricsRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallagMetricsRequest struct { + obj *lagMetricsRequest +} + +type marshalLagMetricsRequest interface { + // ToProto marshals LagMetricsRequest to protobuf object *otg.LagMetricsRequest + ToProto() (*otg.LagMetricsRequest, error) + // ToPbText marshals LagMetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals LagMetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals LagMetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshallagMetricsRequest struct { + obj *lagMetricsRequest +} + +type unMarshalLagMetricsRequest interface { + // FromProto unmarshals LagMetricsRequest from protobuf object *otg.LagMetricsRequest + FromProto(msg *otg.LagMetricsRequest) (LagMetricsRequest, error) + // FromPbText unmarshals LagMetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LagMetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals LagMetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *lagMetricsRequest) Marshal() marshalLagMetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshallagMetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *lagMetricsRequest) Unmarshal() unMarshalLagMetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallagMetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallagMetricsRequest) ToProto() (*otg.LagMetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallagMetricsRequest) FromProto(msg *otg.LagMetricsRequest) (LagMetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallagMetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallagMetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallagMetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallagMetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallagMetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallagMetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lagMetricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lagMetricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lagMetricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lagMetricsRequest) Clone() (LagMetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLagMetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LagMetricsRequest is the request to retrieve per LAG metrics/statistics. +type LagMetricsRequest interface { + Validation + // msg marshals LagMetricsRequest to protobuf object *otg.LagMetricsRequest + // and doesn't set defaults + msg() *otg.LagMetricsRequest + // setMsg unmarshals LagMetricsRequest from protobuf object *otg.LagMetricsRequest + // and doesn't set defaults + setMsg(*otg.LagMetricsRequest) LagMetricsRequest + // provides marshal interface + Marshal() marshalLagMetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalLagMetricsRequest + // validate validates LagMetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LagMetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LagNames returns []string, set in LagMetricsRequest. + LagNames() []string + // SetLagNames assigns []string provided by user to LagMetricsRequest + SetLagNames(value []string) LagMetricsRequest + // ColumnNames returns []LagMetricsRequestColumnNamesEnum, set in LagMetricsRequest + ColumnNames() []LagMetricsRequestColumnNamesEnum + // SetColumnNames assigns []LagMetricsRequestColumnNamesEnum provided by user to LagMetricsRequest + SetColumnNames(value []LagMetricsRequestColumnNamesEnum) LagMetricsRequest +} + +// The names of LAGs to return results for. An empty list will return results for all LAGs. +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// LagNames returns a []string +func (obj *lagMetricsRequest) LagNames() []string { + if obj.obj.LagNames == nil { + obj.obj.LagNames = make([]string, 0) + } + return obj.obj.LagNames +} + +// The names of LAGs to return results for. An empty list will return results for all LAGs. +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// x-constraint: +// - /components/schemas/Lag/properties/name +// +// SetLagNames sets the []string value in the LagMetricsRequest object +func (obj *lagMetricsRequest) SetLagNames(value []string) LagMetricsRequest { + + if obj.obj.LagNames == nil { + obj.obj.LagNames = make([]string, 0) + } + obj.obj.LagNames = value + + return obj +} + +type LagMetricsRequestColumnNamesEnum string + +// Enum of ColumnNames on LagMetricsRequest +var LagMetricsRequestColumnNames = struct { + OPER_STATUS LagMetricsRequestColumnNamesEnum + MEMBER_PORTS_UP LagMetricsRequestColumnNamesEnum + FRAMES_TX LagMetricsRequestColumnNamesEnum + FRAMES_RX LagMetricsRequestColumnNamesEnum + BYTES_TX LagMetricsRequestColumnNamesEnum + BYTES_RX LagMetricsRequestColumnNamesEnum + FRAMES_TX_RATE LagMetricsRequestColumnNamesEnum + FRAMES_RX_RATE LagMetricsRequestColumnNamesEnum + BYTES_TX_RATE LagMetricsRequestColumnNamesEnum + BYTES_RX_RATE LagMetricsRequestColumnNamesEnum +}{ + OPER_STATUS: LagMetricsRequestColumnNamesEnum("oper_status"), + MEMBER_PORTS_UP: LagMetricsRequestColumnNamesEnum("member_ports_up"), + FRAMES_TX: LagMetricsRequestColumnNamesEnum("frames_tx"), + FRAMES_RX: LagMetricsRequestColumnNamesEnum("frames_rx"), + BYTES_TX: LagMetricsRequestColumnNamesEnum("bytes_tx"), + BYTES_RX: LagMetricsRequestColumnNamesEnum("bytes_rx"), + FRAMES_TX_RATE: LagMetricsRequestColumnNamesEnum("frames_tx_rate"), + FRAMES_RX_RATE: LagMetricsRequestColumnNamesEnum("frames_rx_rate"), + BYTES_TX_RATE: LagMetricsRequestColumnNamesEnum("bytes_tx_rate"), + BYTES_RX_RATE: LagMetricsRequestColumnNamesEnum("bytes_rx_rate"), +} + +func (obj *lagMetricsRequest) ColumnNames() []LagMetricsRequestColumnNamesEnum { + items := []LagMetricsRequestColumnNamesEnum{} + for _, item := range obj.obj.ColumnNames { + items = append(items, LagMetricsRequestColumnNamesEnum(item.String())) + } + return items +} + +// The list of column names that the returned result set will contain. If the list is empty then all columns will be returned. The name of the LAG cannot be excluded. +// SetColumnNames sets the []string value in the LagMetricsRequest object +func (obj *lagMetricsRequest) SetColumnNames(value []LagMetricsRequestColumnNamesEnum) LagMetricsRequest { + + items := []otg.LagMetricsRequest_ColumnNames_Enum{} + for _, item := range value { + intValue := otg.LagMetricsRequest_ColumnNames_Enum_value[string(item)] + items = append(items, otg.LagMetricsRequest_ColumnNames_Enum(intValue)) + } + obj.obj.ColumnNames = items + return obj +} + +func (obj *lagMetricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *lagMetricsRequest) setDefault() { + +} diff --git a/gosnappi/lag_port.go b/gosnappi/lag_port.go new file mode 100644 index 00000000..07f25110 --- /dev/null +++ b/gosnappi/lag_port.go @@ -0,0 +1,407 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LagPort ***** +type lagPort struct { + validation + obj *otg.LagPort + marshaller marshalLagPort + unMarshaller unMarshalLagPort + lacpHolder LagPortLacp + ethernetHolder DeviceEthernetBase +} + +func NewLagPort() LagPort { + obj := lagPort{obj: &otg.LagPort{}} + obj.setDefault() + return &obj +} + +func (obj *lagPort) msg() *otg.LagPort { + return obj.obj +} + +func (obj *lagPort) setMsg(msg *otg.LagPort) LagPort { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshallagPort struct { + obj *lagPort +} + +type marshalLagPort interface { + // ToProto marshals LagPort to protobuf object *otg.LagPort + ToProto() (*otg.LagPort, error) + // ToPbText marshals LagPort to protobuf text + ToPbText() (string, error) + // ToYaml marshals LagPort to YAML text + ToYaml() (string, error) + // ToJson marshals LagPort to JSON text + ToJson() (string, error) +} + +type unMarshallagPort struct { + obj *lagPort +} + +type unMarshalLagPort interface { + // FromProto unmarshals LagPort from protobuf object *otg.LagPort + FromProto(msg *otg.LagPort) (LagPort, error) + // FromPbText unmarshals LagPort from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LagPort from YAML text + FromYaml(value string) error + // FromJson unmarshals LagPort from JSON text + FromJson(value string) error +} + +func (obj *lagPort) Marshal() marshalLagPort { + if obj.marshaller == nil { + obj.marshaller = &marshallagPort{obj: obj} + } + return obj.marshaller +} + +func (obj *lagPort) Unmarshal() unMarshalLagPort { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallagPort{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallagPort) ToProto() (*otg.LagPort, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallagPort) FromProto(msg *otg.LagPort) (LagPort, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallagPort) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallagPort) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallagPort) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallagPort) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallagPort) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallagPort) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lagPort) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lagPort) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lagPort) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lagPort) Clone() (LagPort, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLagPort() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *lagPort) setNil() { + obj.lacpHolder = nil + obj.ethernetHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// LagPort is the container for a port's ethernet interface and LAG protocol settings +type LagPort interface { + Validation + // msg marshals LagPort to protobuf object *otg.LagPort + // and doesn't set defaults + msg() *otg.LagPort + // setMsg unmarshals LagPort from protobuf object *otg.LagPort + // and doesn't set defaults + setMsg(*otg.LagPort) LagPort + // provides marshal interface + Marshal() marshalLagPort + // provides unmarshal interface + Unmarshal() unMarshalLagPort + // validate validates LagPort + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LagPort, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PortName returns string, set in LagPort. + PortName() string + // SetPortName assigns string provided by user to LagPort + SetPortName(value string) LagPort + // Lacp returns LagPortLacp, set in LagPort. + // LagPortLacp is the container for link aggregation control protocol settings of a LAG member (port). + Lacp() LagPortLacp + // SetLacp assigns LagPortLacp provided by user to LagPort. + // LagPortLacp is the container for link aggregation control protocol settings of a LAG member (port). + SetLacp(value LagPortLacp) LagPort + // HasLacp checks if Lacp has been set in LagPort + HasLacp() bool + // Ethernet returns DeviceEthernetBase, set in LagPort. + // DeviceEthernetBase is base Ethernet interface. + Ethernet() DeviceEthernetBase + // SetEthernet assigns DeviceEthernetBase provided by user to LagPort. + // DeviceEthernetBase is base Ethernet interface. + SetEthernet(value DeviceEthernetBase) LagPort + setNil() +} + +// The name of a port object that will be part of the LAG. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// PortName returns a string +func (obj *lagPort) PortName() string { + + return *obj.obj.PortName + +} + +// The name of a port object that will be part of the LAG. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// SetPortName sets the string value in the LagPort object +func (obj *lagPort) SetPortName(value string) LagPort { + + obj.obj.PortName = &value + return obj +} + +// description is TBD +// Lacp returns a LagPortLacp +func (obj *lagPort) Lacp() LagPortLacp { + if obj.obj.Lacp == nil { + obj.obj.Lacp = NewLagPortLacp().msg() + } + if obj.lacpHolder == nil { + obj.lacpHolder = &lagPortLacp{obj: obj.obj.Lacp} + } + return obj.lacpHolder +} + +// description is TBD +// Lacp returns a LagPortLacp +func (obj *lagPort) HasLacp() bool { + return obj.obj.Lacp != nil +} + +// description is TBD +// SetLacp sets the LagPortLacp value in the LagPort object +func (obj *lagPort) SetLacp(value LagPortLacp) LagPort { + + obj.lacpHolder = nil + obj.obj.Lacp = value.msg() + + return obj +} + +// description is TBD +// Ethernet returns a DeviceEthernetBase +func (obj *lagPort) Ethernet() DeviceEthernetBase { + if obj.obj.Ethernet == nil { + obj.obj.Ethernet = NewDeviceEthernetBase().msg() + } + if obj.ethernetHolder == nil { + obj.ethernetHolder = &deviceEthernetBase{obj: obj.obj.Ethernet} + } + return obj.ethernetHolder +} + +// description is TBD +// SetEthernet sets the DeviceEthernetBase value in the LagPort object +func (obj *lagPort) SetEthernet(value DeviceEthernetBase) LagPort { + + obj.ethernetHolder = nil + obj.obj.Ethernet = value.msg() + + return obj +} + +func (obj *lagPort) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // PortName is required + if obj.obj.PortName == nil { + vObj.validationErrors = append(vObj.validationErrors, "PortName is required field on interface LagPort") + } + + if obj.obj.Lacp != nil { + + obj.Lacp().validateObj(vObj, set_default) + } + + // Ethernet is required + if obj.obj.Ethernet == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ethernet is required field on interface LagPort") + } + + if obj.obj.Ethernet != nil { + + obj.Ethernet().validateObj(vObj, set_default) + } + +} + +func (obj *lagPort) setDefault() { + +} diff --git a/gosnappi/lag_port_lacp.go b/gosnappi/lag_port_lacp.go new file mode 100644 index 00000000..bc506bbe --- /dev/null +++ b/gosnappi/lag_port_lacp.go @@ -0,0 +1,488 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LagPortLacp ***** +type lagPortLacp struct { + validation + obj *otg.LagPortLacp + marshaller marshalLagPortLacp + unMarshaller unMarshalLagPortLacp +} + +func NewLagPortLacp() LagPortLacp { + obj := lagPortLacp{obj: &otg.LagPortLacp{}} + obj.setDefault() + return &obj +} + +func (obj *lagPortLacp) msg() *otg.LagPortLacp { + return obj.obj +} + +func (obj *lagPortLacp) setMsg(msg *otg.LagPortLacp) LagPortLacp { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallagPortLacp struct { + obj *lagPortLacp +} + +type marshalLagPortLacp interface { + // ToProto marshals LagPortLacp to protobuf object *otg.LagPortLacp + ToProto() (*otg.LagPortLacp, error) + // ToPbText marshals LagPortLacp to protobuf text + ToPbText() (string, error) + // ToYaml marshals LagPortLacp to YAML text + ToYaml() (string, error) + // ToJson marshals LagPortLacp to JSON text + ToJson() (string, error) +} + +type unMarshallagPortLacp struct { + obj *lagPortLacp +} + +type unMarshalLagPortLacp interface { + // FromProto unmarshals LagPortLacp from protobuf object *otg.LagPortLacp + FromProto(msg *otg.LagPortLacp) (LagPortLacp, error) + // FromPbText unmarshals LagPortLacp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LagPortLacp from YAML text + FromYaml(value string) error + // FromJson unmarshals LagPortLacp from JSON text + FromJson(value string) error +} + +func (obj *lagPortLacp) Marshal() marshalLagPortLacp { + if obj.marshaller == nil { + obj.marshaller = &marshallagPortLacp{obj: obj} + } + return obj.marshaller +} + +func (obj *lagPortLacp) Unmarshal() unMarshalLagPortLacp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallagPortLacp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallagPortLacp) ToProto() (*otg.LagPortLacp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallagPortLacp) FromProto(msg *otg.LagPortLacp) (LagPortLacp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallagPortLacp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallagPortLacp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallagPortLacp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallagPortLacp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallagPortLacp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallagPortLacp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lagPortLacp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lagPortLacp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lagPortLacp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lagPortLacp) Clone() (LagPortLacp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLagPortLacp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LagPortLacp is the container for link aggregation control protocol settings of a LAG member (port). +type LagPortLacp interface { + Validation + // msg marshals LagPortLacp to protobuf object *otg.LagPortLacp + // and doesn't set defaults + msg() *otg.LagPortLacp + // setMsg unmarshals LagPortLacp from protobuf object *otg.LagPortLacp + // and doesn't set defaults + setMsg(*otg.LagPortLacp) LagPortLacp + // provides marshal interface + Marshal() marshalLagPortLacp + // provides unmarshal interface + Unmarshal() unMarshalLagPortLacp + // validate validates LagPortLacp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LagPortLacp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ActorPortNumber returns uint32, set in LagPortLacp. + ActorPortNumber() uint32 + // SetActorPortNumber assigns uint32 provided by user to LagPortLacp + SetActorPortNumber(value uint32) LagPortLacp + // HasActorPortNumber checks if ActorPortNumber has been set in LagPortLacp + HasActorPortNumber() bool + // ActorPortPriority returns uint32, set in LagPortLacp. + ActorPortPriority() uint32 + // SetActorPortPriority assigns uint32 provided by user to LagPortLacp + SetActorPortPriority(value uint32) LagPortLacp + // HasActorPortPriority checks if ActorPortPriority has been set in LagPortLacp + HasActorPortPriority() bool + // ActorActivity returns LagPortLacpActorActivityEnum, set in LagPortLacp + ActorActivity() LagPortLacpActorActivityEnum + // SetActorActivity assigns LagPortLacpActorActivityEnum provided by user to LagPortLacp + SetActorActivity(value LagPortLacpActorActivityEnum) LagPortLacp + // HasActorActivity checks if ActorActivity has been set in LagPortLacp + HasActorActivity() bool + // LacpduPeriodicTimeInterval returns uint32, set in LagPortLacp. + LacpduPeriodicTimeInterval() uint32 + // SetLacpduPeriodicTimeInterval assigns uint32 provided by user to LagPortLacp + SetLacpduPeriodicTimeInterval(value uint32) LagPortLacp + // HasLacpduPeriodicTimeInterval checks if LacpduPeriodicTimeInterval has been set in LagPortLacp + HasLacpduPeriodicTimeInterval() bool + // LacpduTimeout returns uint32, set in LagPortLacp. + LacpduTimeout() uint32 + // SetLacpduTimeout assigns uint32 provided by user to LagPortLacp + SetLacpduTimeout(value uint32) LagPortLacp + // HasLacpduTimeout checks if LacpduTimeout has been set in LagPortLacp + HasLacpduTimeout() bool +} + +// The actor port number +// ActorPortNumber returns a uint32 +func (obj *lagPortLacp) ActorPortNumber() uint32 { + + return *obj.obj.ActorPortNumber + +} + +// The actor port number +// ActorPortNumber returns a uint32 +func (obj *lagPortLacp) HasActorPortNumber() bool { + return obj.obj.ActorPortNumber != nil +} + +// The actor port number +// SetActorPortNumber sets the uint32 value in the LagPortLacp object +func (obj *lagPortLacp) SetActorPortNumber(value uint32) LagPortLacp { + + obj.obj.ActorPortNumber = &value + return obj +} + +// The actor port priority +// ActorPortPriority returns a uint32 +func (obj *lagPortLacp) ActorPortPriority() uint32 { + + return *obj.obj.ActorPortPriority + +} + +// The actor port priority +// ActorPortPriority returns a uint32 +func (obj *lagPortLacp) HasActorPortPriority() bool { + return obj.obj.ActorPortPriority != nil +} + +// The actor port priority +// SetActorPortPriority sets the uint32 value in the LagPortLacp object +func (obj *lagPortLacp) SetActorPortPriority(value uint32) LagPortLacp { + + obj.obj.ActorPortPriority = &value + return obj +} + +type LagPortLacpActorActivityEnum string + +// Enum of ActorActivity on LagPortLacp +var LagPortLacpActorActivity = struct { + PASSIVE LagPortLacpActorActivityEnum + ACTIVE LagPortLacpActorActivityEnum +}{ + PASSIVE: LagPortLacpActorActivityEnum("passive"), + ACTIVE: LagPortLacpActorActivityEnum("active"), +} + +func (obj *lagPortLacp) ActorActivity() LagPortLacpActorActivityEnum { + return LagPortLacpActorActivityEnum(obj.obj.ActorActivity.Enum().String()) +} + +// Sets the value of LACP actor activity as either passive or active. +// Passive indicates the port's preference for not transmitting LACPDUs unless its partner's control is Active. +// Active indicates the port's preference to participate in the protocol regardless of the partner's control value. +// ActorActivity returns a string +func (obj *lagPortLacp) HasActorActivity() bool { + return obj.obj.ActorActivity != nil +} + +func (obj *lagPortLacp) SetActorActivity(value LagPortLacpActorActivityEnum) LagPortLacp { + intValue, ok := otg.LagPortLacp_ActorActivity_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LagPortLacpActorActivityEnum", string(value))) + return obj + } + enumValue := otg.LagPortLacp_ActorActivity_Enum(intValue) + obj.obj.ActorActivity = &enumValue + + return obj +} + +// This field defines how frequently LACPDUs are sent to the link partner +// LacpduPeriodicTimeInterval returns a uint32 +func (obj *lagPortLacp) LacpduPeriodicTimeInterval() uint32 { + + return *obj.obj.LacpduPeriodicTimeInterval + +} + +// This field defines how frequently LACPDUs are sent to the link partner +// LacpduPeriodicTimeInterval returns a uint32 +func (obj *lagPortLacp) HasLacpduPeriodicTimeInterval() bool { + return obj.obj.LacpduPeriodicTimeInterval != nil +} + +// This field defines how frequently LACPDUs are sent to the link partner +// SetLacpduPeriodicTimeInterval sets the uint32 value in the LagPortLacp object +func (obj *lagPortLacp) SetLacpduPeriodicTimeInterval(value uint32) LagPortLacp { + + obj.obj.LacpduPeriodicTimeInterval = &value + return obj +} + +// This timer is used to detect whether received protocol information has expired +// LacpduTimeout returns a uint32 +func (obj *lagPortLacp) LacpduTimeout() uint32 { + + return *obj.obj.LacpduTimeout + +} + +// This timer is used to detect whether received protocol information has expired +// LacpduTimeout returns a uint32 +func (obj *lagPortLacp) HasLacpduTimeout() bool { + return obj.obj.LacpduTimeout != nil +} + +// This timer is used to detect whether received protocol information has expired +// SetLacpduTimeout sets the uint32 value in the LagPortLacp object +func (obj *lagPortLacp) SetLacpduTimeout(value uint32) LagPortLacp { + + obj.obj.LacpduTimeout = &value + return obj +} + +func (obj *lagPortLacp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.ActorPortNumber != nil { + + if *obj.obj.ActorPortNumber > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= LagPortLacp.ActorPortNumber <= 65535 but Got %d", *obj.obj.ActorPortNumber)) + } + + } + + if obj.obj.ActorPortPriority != nil { + + if *obj.obj.ActorPortPriority > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= LagPortLacp.ActorPortPriority <= 65535 but Got %d", *obj.obj.ActorPortPriority)) + } + + } + + if obj.obj.LacpduPeriodicTimeInterval != nil { + + if *obj.obj.LacpduPeriodicTimeInterval > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= LagPortLacp.LacpduPeriodicTimeInterval <= 65535 but Got %d", *obj.obj.LacpduPeriodicTimeInterval)) + } + + } + + if obj.obj.LacpduTimeout != nil { + + if *obj.obj.LacpduTimeout > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= LagPortLacp.LacpduTimeout <= 65535 but Got %d", *obj.obj.LacpduTimeout)) + } + + } + +} + +func (obj *lagPortLacp) setDefault() { + if obj.obj.ActorPortNumber == nil { + obj.SetActorPortNumber(0) + } + if obj.obj.ActorPortPriority == nil { + obj.SetActorPortPriority(1) + } + if obj.obj.ActorActivity == nil { + obj.SetActorActivity(LagPortLacpActorActivity.ACTIVE) + + } + if obj.obj.LacpduPeriodicTimeInterval == nil { + obj.SetLacpduPeriodicTimeInterval(0) + } + if obj.obj.LacpduTimeout == nil { + obj.SetLacpduTimeout(0) + } + +} diff --git a/gosnappi/lag_protocol.go b/gosnappi/lag_protocol.go new file mode 100644 index 00000000..5b072d11 --- /dev/null +++ b/gosnappi/lag_protocol.go @@ -0,0 +1,452 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LagProtocol ***** +type lagProtocol struct { + validation + obj *otg.LagProtocol + marshaller marshalLagProtocol + unMarshaller unMarshalLagProtocol + lacpHolder LagProtocolLacp + staticHolder LagProtocolStatic +} + +func NewLagProtocol() LagProtocol { + obj := lagProtocol{obj: &otg.LagProtocol{}} + obj.setDefault() + return &obj +} + +func (obj *lagProtocol) msg() *otg.LagProtocol { + return obj.obj +} + +func (obj *lagProtocol) setMsg(msg *otg.LagProtocol) LagProtocol { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshallagProtocol struct { + obj *lagProtocol +} + +type marshalLagProtocol interface { + // ToProto marshals LagProtocol to protobuf object *otg.LagProtocol + ToProto() (*otg.LagProtocol, error) + // ToPbText marshals LagProtocol to protobuf text + ToPbText() (string, error) + // ToYaml marshals LagProtocol to YAML text + ToYaml() (string, error) + // ToJson marshals LagProtocol to JSON text + ToJson() (string, error) +} + +type unMarshallagProtocol struct { + obj *lagProtocol +} + +type unMarshalLagProtocol interface { + // FromProto unmarshals LagProtocol from protobuf object *otg.LagProtocol + FromProto(msg *otg.LagProtocol) (LagProtocol, error) + // FromPbText unmarshals LagProtocol from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LagProtocol from YAML text + FromYaml(value string) error + // FromJson unmarshals LagProtocol from JSON text + FromJson(value string) error +} + +func (obj *lagProtocol) Marshal() marshalLagProtocol { + if obj.marshaller == nil { + obj.marshaller = &marshallagProtocol{obj: obj} + } + return obj.marshaller +} + +func (obj *lagProtocol) Unmarshal() unMarshalLagProtocol { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallagProtocol{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallagProtocol) ToProto() (*otg.LagProtocol, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallagProtocol) FromProto(msg *otg.LagProtocol) (LagProtocol, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallagProtocol) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallagProtocol) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallagProtocol) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallagProtocol) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallagProtocol) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallagProtocol) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lagProtocol) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lagProtocol) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lagProtocol) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lagProtocol) Clone() (LagProtocol, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLagProtocol() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *lagProtocol) setNil() { + obj.lacpHolder = nil + obj.staticHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// LagProtocol is description is TBD +type LagProtocol interface { + Validation + // msg marshals LagProtocol to protobuf object *otg.LagProtocol + // and doesn't set defaults + msg() *otg.LagProtocol + // setMsg unmarshals LagProtocol from protobuf object *otg.LagProtocol + // and doesn't set defaults + setMsg(*otg.LagProtocol) LagProtocol + // provides marshal interface + Marshal() marshalLagProtocol + // provides unmarshal interface + Unmarshal() unMarshalLagProtocol + // validate validates LagProtocol + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LagProtocol, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns LagProtocolChoiceEnum, set in LagProtocol + Choice() LagProtocolChoiceEnum + // setChoice assigns LagProtocolChoiceEnum provided by user to LagProtocol + setChoice(value LagProtocolChoiceEnum) LagProtocol + // HasChoice checks if Choice has been set in LagProtocol + HasChoice() bool + // Lacp returns LagProtocolLacp, set in LagProtocol. + // LagProtocolLacp is the container for link aggregation control protocol settings of a LAG (ports group). + Lacp() LagProtocolLacp + // SetLacp assigns LagProtocolLacp provided by user to LagProtocol. + // LagProtocolLacp is the container for link aggregation control protocol settings of a LAG (ports group). + SetLacp(value LagProtocolLacp) LagProtocol + // HasLacp checks if Lacp has been set in LagProtocol + HasLacp() bool + // Static returns LagProtocolStatic, set in LagProtocol. + // LagProtocolStatic is the container for static link aggregation protocol settings. + Static() LagProtocolStatic + // SetStatic assigns LagProtocolStatic provided by user to LagProtocol. + // LagProtocolStatic is the container for static link aggregation protocol settings. + SetStatic(value LagProtocolStatic) LagProtocol + // HasStatic checks if Static has been set in LagProtocol + HasStatic() bool + setNil() +} + +type LagProtocolChoiceEnum string + +// Enum of Choice on LagProtocol +var LagProtocolChoice = struct { + LACP LagProtocolChoiceEnum + STATIC LagProtocolChoiceEnum +}{ + LACP: LagProtocolChoiceEnum("lacp"), + STATIC: LagProtocolChoiceEnum("static"), +} + +func (obj *lagProtocol) Choice() LagProtocolChoiceEnum { + return LagProtocolChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The type of controlling protocol for the LAG (ports group). +// Choice returns a string +func (obj *lagProtocol) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *lagProtocol) setChoice(value LagProtocolChoiceEnum) LagProtocol { + intValue, ok := otg.LagProtocol_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LagProtocolChoiceEnum", string(value))) + return obj + } + enumValue := otg.LagProtocol_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Static = nil + obj.staticHolder = nil + obj.obj.Lacp = nil + obj.lacpHolder = nil + + if value == LagProtocolChoice.LACP { + obj.obj.Lacp = NewLagProtocolLacp().msg() + } + + if value == LagProtocolChoice.STATIC { + obj.obj.Static = NewLagProtocolStatic().msg() + } + + return obj +} + +// description is TBD +// Lacp returns a LagProtocolLacp +func (obj *lagProtocol) Lacp() LagProtocolLacp { + if obj.obj.Lacp == nil { + obj.setChoice(LagProtocolChoice.LACP) + } + if obj.lacpHolder == nil { + obj.lacpHolder = &lagProtocolLacp{obj: obj.obj.Lacp} + } + return obj.lacpHolder +} + +// description is TBD +// Lacp returns a LagProtocolLacp +func (obj *lagProtocol) HasLacp() bool { + return obj.obj.Lacp != nil +} + +// description is TBD +// SetLacp sets the LagProtocolLacp value in the LagProtocol object +func (obj *lagProtocol) SetLacp(value LagProtocolLacp) LagProtocol { + obj.setChoice(LagProtocolChoice.LACP) + obj.lacpHolder = nil + obj.obj.Lacp = value.msg() + + return obj +} + +// description is TBD +// Static returns a LagProtocolStatic +func (obj *lagProtocol) Static() LagProtocolStatic { + if obj.obj.Static == nil { + obj.setChoice(LagProtocolChoice.STATIC) + } + if obj.staticHolder == nil { + obj.staticHolder = &lagProtocolStatic{obj: obj.obj.Static} + } + return obj.staticHolder +} + +// description is TBD +// Static returns a LagProtocolStatic +func (obj *lagProtocol) HasStatic() bool { + return obj.obj.Static != nil +} + +// description is TBD +// SetStatic sets the LagProtocolStatic value in the LagProtocol object +func (obj *lagProtocol) SetStatic(value LagProtocolStatic) LagProtocol { + obj.setChoice(LagProtocolChoice.STATIC) + obj.staticHolder = nil + obj.obj.Static = value.msg() + + return obj +} + +func (obj *lagProtocol) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Lacp != nil { + + obj.Lacp().validateObj(vObj, set_default) + } + + if obj.obj.Static != nil { + + obj.Static().validateObj(vObj, set_default) + } + +} + +func (obj *lagProtocol) setDefault() { + var choices_set int = 0 + var choice LagProtocolChoiceEnum + + if obj.obj.Lacp != nil { + choices_set += 1 + choice = LagProtocolChoice.LACP + } + + if obj.obj.Static != nil { + choices_set += 1 + choice = LagProtocolChoice.STATIC + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(LagProtocolChoice.LACP) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in LagProtocol") + } + } else { + intVal := otg.LagProtocol_Choice_Enum_value[string(choice)] + enumValue := otg.LagProtocol_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/lag_protocol_lacp.go b/gosnappi/lag_protocol_lacp.go new file mode 100644 index 00000000..dfdd9f98 --- /dev/null +++ b/gosnappi/lag_protocol_lacp.go @@ -0,0 +1,400 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LagProtocolLacp ***** +type lagProtocolLacp struct { + validation + obj *otg.LagProtocolLacp + marshaller marshalLagProtocolLacp + unMarshaller unMarshalLagProtocolLacp +} + +func NewLagProtocolLacp() LagProtocolLacp { + obj := lagProtocolLacp{obj: &otg.LagProtocolLacp{}} + obj.setDefault() + return &obj +} + +func (obj *lagProtocolLacp) msg() *otg.LagProtocolLacp { + return obj.obj +} + +func (obj *lagProtocolLacp) setMsg(msg *otg.LagProtocolLacp) LagProtocolLacp { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallagProtocolLacp struct { + obj *lagProtocolLacp +} + +type marshalLagProtocolLacp interface { + // ToProto marshals LagProtocolLacp to protobuf object *otg.LagProtocolLacp + ToProto() (*otg.LagProtocolLacp, error) + // ToPbText marshals LagProtocolLacp to protobuf text + ToPbText() (string, error) + // ToYaml marshals LagProtocolLacp to YAML text + ToYaml() (string, error) + // ToJson marshals LagProtocolLacp to JSON text + ToJson() (string, error) +} + +type unMarshallagProtocolLacp struct { + obj *lagProtocolLacp +} + +type unMarshalLagProtocolLacp interface { + // FromProto unmarshals LagProtocolLacp from protobuf object *otg.LagProtocolLacp + FromProto(msg *otg.LagProtocolLacp) (LagProtocolLacp, error) + // FromPbText unmarshals LagProtocolLacp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LagProtocolLacp from YAML text + FromYaml(value string) error + // FromJson unmarshals LagProtocolLacp from JSON text + FromJson(value string) error +} + +func (obj *lagProtocolLacp) Marshal() marshalLagProtocolLacp { + if obj.marshaller == nil { + obj.marshaller = &marshallagProtocolLacp{obj: obj} + } + return obj.marshaller +} + +func (obj *lagProtocolLacp) Unmarshal() unMarshalLagProtocolLacp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallagProtocolLacp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallagProtocolLacp) ToProto() (*otg.LagProtocolLacp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallagProtocolLacp) FromProto(msg *otg.LagProtocolLacp) (LagProtocolLacp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallagProtocolLacp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallagProtocolLacp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallagProtocolLacp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallagProtocolLacp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallagProtocolLacp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallagProtocolLacp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lagProtocolLacp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lagProtocolLacp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lagProtocolLacp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lagProtocolLacp) Clone() (LagProtocolLacp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLagProtocolLacp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LagProtocolLacp is the container for link aggregation control protocol settings of a LAG (ports group). +type LagProtocolLacp interface { + Validation + // msg marshals LagProtocolLacp to protobuf object *otg.LagProtocolLacp + // and doesn't set defaults + msg() *otg.LagProtocolLacp + // setMsg unmarshals LagProtocolLacp from protobuf object *otg.LagProtocolLacp + // and doesn't set defaults + setMsg(*otg.LagProtocolLacp) LagProtocolLacp + // provides marshal interface + Marshal() marshalLagProtocolLacp + // provides unmarshal interface + Unmarshal() unMarshalLagProtocolLacp + // validate validates LagProtocolLacp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LagProtocolLacp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ActorSystemId returns string, set in LagProtocolLacp. + ActorSystemId() string + // SetActorSystemId assigns string provided by user to LagProtocolLacp + SetActorSystemId(value string) LagProtocolLacp + // HasActorSystemId checks if ActorSystemId has been set in LagProtocolLacp + HasActorSystemId() bool + // ActorSystemPriority returns uint32, set in LagProtocolLacp. + ActorSystemPriority() uint32 + // SetActorSystemPriority assigns uint32 provided by user to LagProtocolLacp + SetActorSystemPriority(value uint32) LagProtocolLacp + // HasActorSystemPriority checks if ActorSystemPriority has been set in LagProtocolLacp + HasActorSystemPriority() bool + // ActorKey returns uint32, set in LagProtocolLacp. + ActorKey() uint32 + // SetActorKey assigns uint32 provided by user to LagProtocolLacp + SetActorKey(value uint32) LagProtocolLacp + // HasActorKey checks if ActorKey has been set in LagProtocolLacp + HasActorKey() bool +} + +// The actor system id +// ActorSystemId returns a string +func (obj *lagProtocolLacp) ActorSystemId() string { + + return *obj.obj.ActorSystemId + +} + +// The actor system id +// ActorSystemId returns a string +func (obj *lagProtocolLacp) HasActorSystemId() bool { + return obj.obj.ActorSystemId != nil +} + +// The actor system id +// SetActorSystemId sets the string value in the LagProtocolLacp object +func (obj *lagProtocolLacp) SetActorSystemId(value string) LagProtocolLacp { + + obj.obj.ActorSystemId = &value + return obj +} + +// The actor system priority +// ActorSystemPriority returns a uint32 +func (obj *lagProtocolLacp) ActorSystemPriority() uint32 { + + return *obj.obj.ActorSystemPriority + +} + +// The actor system priority +// ActorSystemPriority returns a uint32 +func (obj *lagProtocolLacp) HasActorSystemPriority() bool { + return obj.obj.ActorSystemPriority != nil +} + +// The actor system priority +// SetActorSystemPriority sets the uint32 value in the LagProtocolLacp object +func (obj *lagProtocolLacp) SetActorSystemPriority(value uint32) LagProtocolLacp { + + obj.obj.ActorSystemPriority = &value + return obj +} + +// The actor key +// ActorKey returns a uint32 +func (obj *lagProtocolLacp) ActorKey() uint32 { + + return *obj.obj.ActorKey + +} + +// The actor key +// ActorKey returns a uint32 +func (obj *lagProtocolLacp) HasActorKey() bool { + return obj.obj.ActorKey != nil +} + +// The actor key +// SetActorKey sets the uint32 value in the LagProtocolLacp object +func (obj *lagProtocolLacp) SetActorKey(value uint32) LagProtocolLacp { + + obj.obj.ActorKey = &value + return obj +} + +func (obj *lagProtocolLacp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.ActorSystemId != nil { + + err := obj.validateMac(obj.ActorSystemId()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on LagProtocolLacp.ActorSystemId")) + } + + } + + if obj.obj.ActorSystemPriority != nil { + + if *obj.obj.ActorSystemPriority > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= LagProtocolLacp.ActorSystemPriority <= 65535 but Got %d", *obj.obj.ActorSystemPriority)) + } + + } + + if obj.obj.ActorKey != nil { + + if *obj.obj.ActorKey > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= LagProtocolLacp.ActorKey <= 65535 but Got %d", *obj.obj.ActorKey)) + } + + } + +} + +func (obj *lagProtocolLacp) setDefault() { + if obj.obj.ActorSystemId == nil { + obj.SetActorSystemId("00:00:00:00:00:00") + } + if obj.obj.ActorSystemPriority == nil { + obj.SetActorSystemPriority(0) + } + if obj.obj.ActorKey == nil { + obj.SetActorKey(0) + } + +} diff --git a/gosnappi/lag_protocol_static.go b/gosnappi/lag_protocol_static.go new file mode 100644 index 00000000..13b1d255 --- /dev/null +++ b/gosnappi/lag_protocol_static.go @@ -0,0 +1,319 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LagProtocolStatic ***** +type lagProtocolStatic struct { + validation + obj *otg.LagProtocolStatic + marshaller marshalLagProtocolStatic + unMarshaller unMarshalLagProtocolStatic +} + +func NewLagProtocolStatic() LagProtocolStatic { + obj := lagProtocolStatic{obj: &otg.LagProtocolStatic{}} + obj.setDefault() + return &obj +} + +func (obj *lagProtocolStatic) msg() *otg.LagProtocolStatic { + return obj.obj +} + +func (obj *lagProtocolStatic) setMsg(msg *otg.LagProtocolStatic) LagProtocolStatic { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallagProtocolStatic struct { + obj *lagProtocolStatic +} + +type marshalLagProtocolStatic interface { + // ToProto marshals LagProtocolStatic to protobuf object *otg.LagProtocolStatic + ToProto() (*otg.LagProtocolStatic, error) + // ToPbText marshals LagProtocolStatic to protobuf text + ToPbText() (string, error) + // ToYaml marshals LagProtocolStatic to YAML text + ToYaml() (string, error) + // ToJson marshals LagProtocolStatic to JSON text + ToJson() (string, error) +} + +type unMarshallagProtocolStatic struct { + obj *lagProtocolStatic +} + +type unMarshalLagProtocolStatic interface { + // FromProto unmarshals LagProtocolStatic from protobuf object *otg.LagProtocolStatic + FromProto(msg *otg.LagProtocolStatic) (LagProtocolStatic, error) + // FromPbText unmarshals LagProtocolStatic from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LagProtocolStatic from YAML text + FromYaml(value string) error + // FromJson unmarshals LagProtocolStatic from JSON text + FromJson(value string) error +} + +func (obj *lagProtocolStatic) Marshal() marshalLagProtocolStatic { + if obj.marshaller == nil { + obj.marshaller = &marshallagProtocolStatic{obj: obj} + } + return obj.marshaller +} + +func (obj *lagProtocolStatic) Unmarshal() unMarshalLagProtocolStatic { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallagProtocolStatic{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallagProtocolStatic) ToProto() (*otg.LagProtocolStatic, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallagProtocolStatic) FromProto(msg *otg.LagProtocolStatic) (LagProtocolStatic, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallagProtocolStatic) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallagProtocolStatic) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallagProtocolStatic) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallagProtocolStatic) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallagProtocolStatic) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallagProtocolStatic) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lagProtocolStatic) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lagProtocolStatic) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lagProtocolStatic) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lagProtocolStatic) Clone() (LagProtocolStatic, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLagProtocolStatic() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LagProtocolStatic is the container for static link aggregation protocol settings. +type LagProtocolStatic interface { + Validation + // msg marshals LagProtocolStatic to protobuf object *otg.LagProtocolStatic + // and doesn't set defaults + msg() *otg.LagProtocolStatic + // setMsg unmarshals LagProtocolStatic from protobuf object *otg.LagProtocolStatic + // and doesn't set defaults + setMsg(*otg.LagProtocolStatic) LagProtocolStatic + // provides marshal interface + Marshal() marshalLagProtocolStatic + // provides unmarshal interface + Unmarshal() unMarshalLagProtocolStatic + // validate validates LagProtocolStatic + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LagProtocolStatic, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LagId returns uint32, set in LagProtocolStatic. + LagId() uint32 + // SetLagId assigns uint32 provided by user to LagProtocolStatic + SetLagId(value uint32) LagProtocolStatic + // HasLagId checks if LagId has been set in LagProtocolStatic + HasLagId() bool +} + +// The static lag id +// LagId returns a uint32 +func (obj *lagProtocolStatic) LagId() uint32 { + + return *obj.obj.LagId + +} + +// The static lag id +// LagId returns a uint32 +func (obj *lagProtocolStatic) HasLagId() bool { + return obj.obj.LagId != nil +} + +// The static lag id +// SetLagId sets the uint32 value in the LagProtocolStatic object +func (obj *lagProtocolStatic) SetLagId(value uint32) LagProtocolStatic { + + obj.obj.LagId = &value + return obj +} + +func (obj *lagProtocolStatic) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.LagId != nil { + + if *obj.obj.LagId > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= LagProtocolStatic.LagId <= 65535 but Got %d", *obj.obj.LagId)) + } + + } + +} + +func (obj *lagProtocolStatic) setDefault() { + if obj.obj.LagId == nil { + obj.SetLagId(0) + } + +} diff --git a/gosnappi/layer1.go b/gosnappi/layer1.go new file mode 100644 index 00000000..6e6dfb57 --- /dev/null +++ b/gosnappi/layer1.go @@ -0,0 +1,711 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Layer1 ***** +type layer1 struct { + validation + obj *otg.Layer1 + marshaller marshalLayer1 + unMarshaller unMarshalLayer1 + autoNegotiationHolder Layer1AutoNegotiation + flowControlHolder Layer1FlowControl +} + +func NewLayer1() Layer1 { + obj := layer1{obj: &otg.Layer1{}} + obj.setDefault() + return &obj +} + +func (obj *layer1) msg() *otg.Layer1 { + return obj.obj +} + +func (obj *layer1) setMsg(msg *otg.Layer1) Layer1 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshallayer1 struct { + obj *layer1 +} + +type marshalLayer1 interface { + // ToProto marshals Layer1 to protobuf object *otg.Layer1 + ToProto() (*otg.Layer1, error) + // ToPbText marshals Layer1 to protobuf text + ToPbText() (string, error) + // ToYaml marshals Layer1 to YAML text + ToYaml() (string, error) + // ToJson marshals Layer1 to JSON text + ToJson() (string, error) +} + +type unMarshallayer1 struct { + obj *layer1 +} + +type unMarshalLayer1 interface { + // FromProto unmarshals Layer1 from protobuf object *otg.Layer1 + FromProto(msg *otg.Layer1) (Layer1, error) + // FromPbText unmarshals Layer1 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Layer1 from YAML text + FromYaml(value string) error + // FromJson unmarshals Layer1 from JSON text + FromJson(value string) error +} + +func (obj *layer1) Marshal() marshalLayer1 { + if obj.marshaller == nil { + obj.marshaller = &marshallayer1{obj: obj} + } + return obj.marshaller +} + +func (obj *layer1) Unmarshal() unMarshalLayer1 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallayer1{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallayer1) ToProto() (*otg.Layer1, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallayer1) FromProto(msg *otg.Layer1) (Layer1, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallayer1) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallayer1) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallayer1) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallayer1) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallayer1) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallayer1) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *layer1) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *layer1) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *layer1) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *layer1) Clone() (Layer1, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLayer1() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *layer1) setNil() { + obj.autoNegotiationHolder = nil + obj.flowControlHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Layer1 is a container for layer1 settings. +type Layer1 interface { + Validation + // msg marshals Layer1 to protobuf object *otg.Layer1 + // and doesn't set defaults + msg() *otg.Layer1 + // setMsg unmarshals Layer1 from protobuf object *otg.Layer1 + // and doesn't set defaults + setMsg(*otg.Layer1) Layer1 + // provides marshal interface + Marshal() marshalLayer1 + // provides unmarshal interface + Unmarshal() unMarshalLayer1 + // validate validates Layer1 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Layer1, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PortNames returns []string, set in Layer1. + PortNames() []string + // SetPortNames assigns []string provided by user to Layer1 + SetPortNames(value []string) Layer1 + // Speed returns Layer1SpeedEnum, set in Layer1 + Speed() Layer1SpeedEnum + // SetSpeed assigns Layer1SpeedEnum provided by user to Layer1 + SetSpeed(value Layer1SpeedEnum) Layer1 + // HasSpeed checks if Speed has been set in Layer1 + HasSpeed() bool + // Media returns Layer1MediaEnum, set in Layer1 + Media() Layer1MediaEnum + // SetMedia assigns Layer1MediaEnum provided by user to Layer1 + SetMedia(value Layer1MediaEnum) Layer1 + // HasMedia checks if Media has been set in Layer1 + HasMedia() bool + // Promiscuous returns bool, set in Layer1. + Promiscuous() bool + // SetPromiscuous assigns bool provided by user to Layer1 + SetPromiscuous(value bool) Layer1 + // HasPromiscuous checks if Promiscuous has been set in Layer1 + HasPromiscuous() bool + // Mtu returns uint32, set in Layer1. + Mtu() uint32 + // SetMtu assigns uint32 provided by user to Layer1 + SetMtu(value uint32) Layer1 + // HasMtu checks if Mtu has been set in Layer1 + HasMtu() bool + // IeeeMediaDefaults returns bool, set in Layer1. + IeeeMediaDefaults() bool + // SetIeeeMediaDefaults assigns bool provided by user to Layer1 + SetIeeeMediaDefaults(value bool) Layer1 + // HasIeeeMediaDefaults checks if IeeeMediaDefaults has been set in Layer1 + HasIeeeMediaDefaults() bool + // AutoNegotiate returns bool, set in Layer1. + AutoNegotiate() bool + // SetAutoNegotiate assigns bool provided by user to Layer1 + SetAutoNegotiate(value bool) Layer1 + // HasAutoNegotiate checks if AutoNegotiate has been set in Layer1 + HasAutoNegotiate() bool + // AutoNegotiation returns Layer1AutoNegotiation, set in Layer1. + // Layer1AutoNegotiation is configuration for auto negotiation settings + AutoNegotiation() Layer1AutoNegotiation + // SetAutoNegotiation assigns Layer1AutoNegotiation provided by user to Layer1. + // Layer1AutoNegotiation is configuration for auto negotiation settings + SetAutoNegotiation(value Layer1AutoNegotiation) Layer1 + // HasAutoNegotiation checks if AutoNegotiation has been set in Layer1 + HasAutoNegotiation() bool + // FlowControl returns Layer1FlowControl, set in Layer1. + // Layer1FlowControl is a container for layer1 receive flow control settings. + // To enable flow control settings on ports this object must be a valid + // object not a null value. + FlowControl() Layer1FlowControl + // SetFlowControl assigns Layer1FlowControl provided by user to Layer1. + // Layer1FlowControl is a container for layer1 receive flow control settings. + // To enable flow control settings on ports this object must be a valid + // object not a null value. + SetFlowControl(value Layer1FlowControl) Layer1 + // HasFlowControl checks if FlowControl has been set in Layer1 + HasFlowControl() bool + // Name returns string, set in Layer1. + Name() string + // SetName assigns string provided by user to Layer1 + SetName(value string) Layer1 + setNil() +} + +// A list of unique names of port objects that will share the +// choice settings. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// PortNames returns a []string +func (obj *layer1) PortNames() []string { + if obj.obj.PortNames == nil { + obj.obj.PortNames = make([]string, 0) + } + return obj.obj.PortNames +} + +// A list of unique names of port objects that will share the +// choice settings. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// SetPortNames sets the []string value in the Layer1 object +func (obj *layer1) SetPortNames(value []string) Layer1 { + + if obj.obj.PortNames == nil { + obj.obj.PortNames = make([]string, 0) + } + obj.obj.PortNames = value + + return obj +} + +type Layer1SpeedEnum string + +// Enum of Speed on Layer1 +var Layer1Speed = struct { + SPEED_10_FD_MBPS Layer1SpeedEnum + SPEED_10_HD_MBPS Layer1SpeedEnum + SPEED_100_FD_MBPS Layer1SpeedEnum + SPEED_100_HD_MBPS Layer1SpeedEnum + SPEED_1_GBPS Layer1SpeedEnum + SPEED_10_GBPS Layer1SpeedEnum + SPEED_25_GBPS Layer1SpeedEnum + SPEED_40_GBPS Layer1SpeedEnum + SPEED_50_GBPS Layer1SpeedEnum + SPEED_100_GBPS Layer1SpeedEnum + SPEED_200_GBPS Layer1SpeedEnum + SPEED_400_GBPS Layer1SpeedEnum + SPEED_800_GBPS Layer1SpeedEnum +}{ + SPEED_10_FD_MBPS: Layer1SpeedEnum("speed_10_fd_mbps"), + SPEED_10_HD_MBPS: Layer1SpeedEnum("speed_10_hd_mbps"), + SPEED_100_FD_MBPS: Layer1SpeedEnum("speed_100_fd_mbps"), + SPEED_100_HD_MBPS: Layer1SpeedEnum("speed_100_hd_mbps"), + SPEED_1_GBPS: Layer1SpeedEnum("speed_1_gbps"), + SPEED_10_GBPS: Layer1SpeedEnum("speed_10_gbps"), + SPEED_25_GBPS: Layer1SpeedEnum("speed_25_gbps"), + SPEED_40_GBPS: Layer1SpeedEnum("speed_40_gbps"), + SPEED_50_GBPS: Layer1SpeedEnum("speed_50_gbps"), + SPEED_100_GBPS: Layer1SpeedEnum("speed_100_gbps"), + SPEED_200_GBPS: Layer1SpeedEnum("speed_200_gbps"), + SPEED_400_GBPS: Layer1SpeedEnum("speed_400_gbps"), + SPEED_800_GBPS: Layer1SpeedEnum("speed_800_gbps"), +} + +func (obj *layer1) Speed() Layer1SpeedEnum { + return Layer1SpeedEnum(obj.obj.Speed.Enum().String()) +} + +// Set the speed if supported. When no speed is explicitly set, the current +// speed of underlying test interface shall be assumed. +// Speed returns a string +func (obj *layer1) HasSpeed() bool { + return obj.obj.Speed != nil +} + +func (obj *layer1) SetSpeed(value Layer1SpeedEnum) Layer1 { + intValue, ok := otg.Layer1_Speed_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Layer1SpeedEnum", string(value))) + return obj + } + enumValue := otg.Layer1_Speed_Enum(intValue) + obj.obj.Speed = &enumValue + + return obj +} + +type Layer1MediaEnum string + +// Enum of Media on Layer1 +var Layer1Media = struct { + COPPER Layer1MediaEnum + FIBER Layer1MediaEnum + SGMII Layer1MediaEnum +}{ + COPPER: Layer1MediaEnum("copper"), + FIBER: Layer1MediaEnum("fiber"), + SGMII: Layer1MediaEnum("sgmii"), +} + +func (obj *layer1) Media() Layer1MediaEnum { + return Layer1MediaEnum(obj.obj.Media.Enum().String()) +} + +// Set the type of media for test interface if supported. When no media +// type is explicitly set, the current media type of underlying test +// interface shall be assumed. +// Media returns a string +func (obj *layer1) HasMedia() bool { + return obj.obj.Media != nil +} + +func (obj *layer1) SetMedia(value Layer1MediaEnum) Layer1 { + intValue, ok := otg.Layer1_Media_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Layer1MediaEnum", string(value))) + return obj + } + enumValue := otg.Layer1_Media_Enum(intValue) + obj.obj.Media = &enumValue + + return obj +} + +// Enable promiscuous mode on test interface. A warning shall be raised if +// this field is set to `true`, even when it's not supported, ignoring +// the setting altogether. +// Promiscuous returns a bool +func (obj *layer1) Promiscuous() bool { + + return *obj.obj.Promiscuous + +} + +// Enable promiscuous mode on test interface. A warning shall be raised if +// this field is set to `true`, even when it's not supported, ignoring +// the setting altogether. +// Promiscuous returns a bool +func (obj *layer1) HasPromiscuous() bool { + return obj.obj.Promiscuous != nil +} + +// Enable promiscuous mode on test interface. A warning shall be raised if +// this field is set to `true`, even when it's not supported, ignoring +// the setting altogether. +// SetPromiscuous sets the bool value in the Layer1 object +func (obj *layer1) SetPromiscuous(value bool) Layer1 { + + obj.obj.Promiscuous = &value + return obj +} + +// Set the maximum transmission unit size. A warning shall be raised if +// the specified value is valid but not supported, ignoring the setting altogether. +// Mtu returns a uint32 +func (obj *layer1) Mtu() uint32 { + + return *obj.obj.Mtu + +} + +// Set the maximum transmission unit size. A warning shall be raised if +// the specified value is valid but not supported, ignoring the setting altogether. +// Mtu returns a uint32 +func (obj *layer1) HasMtu() bool { + return obj.obj.Mtu != nil +} + +// Set the maximum transmission unit size. A warning shall be raised if +// the specified value is valid but not supported, ignoring the setting altogether. +// SetMtu sets the uint32 value in the Layer1 object +func (obj *layer1) SetMtu(value uint32) Layer1 { + + obj.obj.Mtu = &value + return obj +} + +// Under Review: This field is currently under review for pending exploration on use cases +// +// Under Review: This field is currently under review for pending exploration on use cases +// +// Set to true to override the auto_negotiate, link_training +// and rs_fec settings for gigabit ethernet interfaces. +// IeeeMediaDefaults returns a bool +func (obj *layer1) IeeeMediaDefaults() bool { + + return *obj.obj.IeeeMediaDefaults + +} + +// Under Review: This field is currently under review for pending exploration on use cases +// +// Under Review: This field is currently under review for pending exploration on use cases +// +// Set to true to override the auto_negotiate, link_training +// and rs_fec settings for gigabit ethernet interfaces. +// IeeeMediaDefaults returns a bool +func (obj *layer1) HasIeeeMediaDefaults() bool { + return obj.obj.IeeeMediaDefaults != nil +} + +// Under Review: This field is currently under review for pending exploration on use cases +// +// Under Review: This field is currently under review for pending exploration on use cases +// +// Set to true to override the auto_negotiate, link_training +// and rs_fec settings for gigabit ethernet interfaces. +// SetIeeeMediaDefaults sets the bool value in the Layer1 object +func (obj *layer1) SetIeeeMediaDefaults(value bool) Layer1 { + + obj.obj.IeeeMediaDefaults = &value + return obj +} + +// Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists. +// +// Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists. +// +// Enable/disable auto negotiation. +// AutoNegotiate returns a bool +func (obj *layer1) AutoNegotiate() bool { + + return *obj.obj.AutoNegotiate + +} + +// Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists. +// +// Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists. +// +// Enable/disable auto negotiation. +// AutoNegotiate returns a bool +func (obj *layer1) HasAutoNegotiate() bool { + return obj.obj.AutoNegotiate != nil +} + +// Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists. +// +// Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists. +// +// Enable/disable auto negotiation. +// SetAutoNegotiate sets the bool value in the Layer1 object +func (obj *layer1) SetAutoNegotiate(value bool) Layer1 { + + obj.obj.AutoNegotiate = &value + return obj +} + +// description is TBD +// AutoNegotiation returns a Layer1AutoNegotiation +func (obj *layer1) AutoNegotiation() Layer1AutoNegotiation { + if obj.obj.AutoNegotiation == nil { + obj.obj.AutoNegotiation = NewLayer1AutoNegotiation().msg() + } + if obj.autoNegotiationHolder == nil { + obj.autoNegotiationHolder = &layer1AutoNegotiation{obj: obj.obj.AutoNegotiation} + } + return obj.autoNegotiationHolder +} + +// description is TBD +// AutoNegotiation returns a Layer1AutoNegotiation +func (obj *layer1) HasAutoNegotiation() bool { + return obj.obj.AutoNegotiation != nil +} + +// description is TBD +// SetAutoNegotiation sets the Layer1AutoNegotiation value in the Layer1 object +func (obj *layer1) SetAutoNegotiation(value Layer1AutoNegotiation) Layer1 { + + obj.autoNegotiationHolder = nil + obj.obj.AutoNegotiation = value.msg() + + return obj +} + +// description is TBD +// FlowControl returns a Layer1FlowControl +func (obj *layer1) FlowControl() Layer1FlowControl { + if obj.obj.FlowControl == nil { + obj.obj.FlowControl = NewLayer1FlowControl().msg() + } + if obj.flowControlHolder == nil { + obj.flowControlHolder = &layer1FlowControl{obj: obj.obj.FlowControl} + } + return obj.flowControlHolder +} + +// description is TBD +// FlowControl returns a Layer1FlowControl +func (obj *layer1) HasFlowControl() bool { + return obj.obj.FlowControl != nil +} + +// description is TBD +// SetFlowControl sets the Layer1FlowControl value in the Layer1 object +func (obj *layer1) SetFlowControl(value Layer1FlowControl) Layer1 { + + obj.flowControlHolder = nil + obj.obj.FlowControl = value.msg() + + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *layer1) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the Layer1 object +func (obj *layer1) SetName(value string) Layer1 { + + obj.obj.Name = &value + return obj +} + +func (obj *layer1) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Mtu != nil { + + if *obj.obj.Mtu < 64 || *obj.obj.Mtu > 9000 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("64 <= Layer1.Mtu <= 9000 but Got %d", *obj.obj.Mtu)) + } + + } + + if obj.obj.AutoNegotiation != nil { + + obj.AutoNegotiation().validateObj(vObj, set_default) + } + + if obj.obj.FlowControl != nil { + + obj.FlowControl().validateObj(vObj, set_default) + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface Layer1") + } +} + +func (obj *layer1) setDefault() { + if obj.obj.Promiscuous == nil { + obj.SetPromiscuous(true) + } + if obj.obj.Mtu == nil { + obj.SetMtu(1500) + } + +} diff --git a/gosnappi/layer1_auto_negotiation.go b/gosnappi/layer1_auto_negotiation.go new file mode 100644 index 00000000..b52a06dc --- /dev/null +++ b/gosnappi/layer1_auto_negotiation.go @@ -0,0 +1,510 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Layer1AutoNegotiation ***** +type layer1AutoNegotiation struct { + validation + obj *otg.Layer1AutoNegotiation + marshaller marshalLayer1AutoNegotiation + unMarshaller unMarshalLayer1AutoNegotiation +} + +func NewLayer1AutoNegotiation() Layer1AutoNegotiation { + obj := layer1AutoNegotiation{obj: &otg.Layer1AutoNegotiation{}} + obj.setDefault() + return &obj +} + +func (obj *layer1AutoNegotiation) msg() *otg.Layer1AutoNegotiation { + return obj.obj +} + +func (obj *layer1AutoNegotiation) setMsg(msg *otg.Layer1AutoNegotiation) Layer1AutoNegotiation { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallayer1AutoNegotiation struct { + obj *layer1AutoNegotiation +} + +type marshalLayer1AutoNegotiation interface { + // ToProto marshals Layer1AutoNegotiation to protobuf object *otg.Layer1AutoNegotiation + ToProto() (*otg.Layer1AutoNegotiation, error) + // ToPbText marshals Layer1AutoNegotiation to protobuf text + ToPbText() (string, error) + // ToYaml marshals Layer1AutoNegotiation to YAML text + ToYaml() (string, error) + // ToJson marshals Layer1AutoNegotiation to JSON text + ToJson() (string, error) +} + +type unMarshallayer1AutoNegotiation struct { + obj *layer1AutoNegotiation +} + +type unMarshalLayer1AutoNegotiation interface { + // FromProto unmarshals Layer1AutoNegotiation from protobuf object *otg.Layer1AutoNegotiation + FromProto(msg *otg.Layer1AutoNegotiation) (Layer1AutoNegotiation, error) + // FromPbText unmarshals Layer1AutoNegotiation from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Layer1AutoNegotiation from YAML text + FromYaml(value string) error + // FromJson unmarshals Layer1AutoNegotiation from JSON text + FromJson(value string) error +} + +func (obj *layer1AutoNegotiation) Marshal() marshalLayer1AutoNegotiation { + if obj.marshaller == nil { + obj.marshaller = &marshallayer1AutoNegotiation{obj: obj} + } + return obj.marshaller +} + +func (obj *layer1AutoNegotiation) Unmarshal() unMarshalLayer1AutoNegotiation { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallayer1AutoNegotiation{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallayer1AutoNegotiation) ToProto() (*otg.Layer1AutoNegotiation, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallayer1AutoNegotiation) FromProto(msg *otg.Layer1AutoNegotiation) (Layer1AutoNegotiation, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallayer1AutoNegotiation) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallayer1AutoNegotiation) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallayer1AutoNegotiation) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallayer1AutoNegotiation) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallayer1AutoNegotiation) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallayer1AutoNegotiation) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *layer1AutoNegotiation) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *layer1AutoNegotiation) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *layer1AutoNegotiation) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *layer1AutoNegotiation) Clone() (Layer1AutoNegotiation, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLayer1AutoNegotiation() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Layer1AutoNegotiation is configuration for auto negotiation settings +type Layer1AutoNegotiation interface { + Validation + // msg marshals Layer1AutoNegotiation to protobuf object *otg.Layer1AutoNegotiation + // and doesn't set defaults + msg() *otg.Layer1AutoNegotiation + // setMsg unmarshals Layer1AutoNegotiation from protobuf object *otg.Layer1AutoNegotiation + // and doesn't set defaults + setMsg(*otg.Layer1AutoNegotiation) Layer1AutoNegotiation + // provides marshal interface + Marshal() marshalLayer1AutoNegotiation + // provides unmarshal interface + Unmarshal() unMarshalLayer1AutoNegotiation + // validate validates Layer1AutoNegotiation + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Layer1AutoNegotiation, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Advertise1000Mbps returns bool, set in Layer1AutoNegotiation. + Advertise1000Mbps() bool + // SetAdvertise1000Mbps assigns bool provided by user to Layer1AutoNegotiation + SetAdvertise1000Mbps(value bool) Layer1AutoNegotiation + // HasAdvertise1000Mbps checks if Advertise1000Mbps has been set in Layer1AutoNegotiation + HasAdvertise1000Mbps() bool + // Advertise100FdMbps returns bool, set in Layer1AutoNegotiation. + Advertise100FdMbps() bool + // SetAdvertise100FdMbps assigns bool provided by user to Layer1AutoNegotiation + SetAdvertise100FdMbps(value bool) Layer1AutoNegotiation + // HasAdvertise100FdMbps checks if Advertise100FdMbps has been set in Layer1AutoNegotiation + HasAdvertise100FdMbps() bool + // Advertise100HdMbps returns bool, set in Layer1AutoNegotiation. + Advertise100HdMbps() bool + // SetAdvertise100HdMbps assigns bool provided by user to Layer1AutoNegotiation + SetAdvertise100HdMbps(value bool) Layer1AutoNegotiation + // HasAdvertise100HdMbps checks if Advertise100HdMbps has been set in Layer1AutoNegotiation + HasAdvertise100HdMbps() bool + // Advertise10FdMbps returns bool, set in Layer1AutoNegotiation. + Advertise10FdMbps() bool + // SetAdvertise10FdMbps assigns bool provided by user to Layer1AutoNegotiation + SetAdvertise10FdMbps(value bool) Layer1AutoNegotiation + // HasAdvertise10FdMbps checks if Advertise10FdMbps has been set in Layer1AutoNegotiation + HasAdvertise10FdMbps() bool + // Advertise10HdMbps returns bool, set in Layer1AutoNegotiation. + Advertise10HdMbps() bool + // SetAdvertise10HdMbps assigns bool provided by user to Layer1AutoNegotiation + SetAdvertise10HdMbps(value bool) Layer1AutoNegotiation + // HasAdvertise10HdMbps checks if Advertise10HdMbps has been set in Layer1AutoNegotiation + HasAdvertise10HdMbps() bool + // LinkTraining returns bool, set in Layer1AutoNegotiation. + LinkTraining() bool + // SetLinkTraining assigns bool provided by user to Layer1AutoNegotiation + SetLinkTraining(value bool) Layer1AutoNegotiation + // HasLinkTraining checks if LinkTraining has been set in Layer1AutoNegotiation + HasLinkTraining() bool + // RsFec returns bool, set in Layer1AutoNegotiation. + RsFec() bool + // SetRsFec assigns bool provided by user to Layer1AutoNegotiation + SetRsFec(value bool) Layer1AutoNegotiation + // HasRsFec checks if RsFec has been set in Layer1AutoNegotiation + HasRsFec() bool +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// Advertise1000Mbps returns a bool +func (obj *layer1AutoNegotiation) Advertise1000Mbps() bool { + + return *obj.obj.Advertise_1000Mbps + +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// Advertise1000Mbps returns a bool +func (obj *layer1AutoNegotiation) HasAdvertise1000Mbps() bool { + return obj.obj.Advertise_1000Mbps != nil +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// SetAdvertise1000Mbps sets the bool value in the Layer1AutoNegotiation object +func (obj *layer1AutoNegotiation) SetAdvertise1000Mbps(value bool) Layer1AutoNegotiation { + + obj.obj.Advertise_1000Mbps = &value + return obj +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// Advertise100FdMbps returns a bool +func (obj *layer1AutoNegotiation) Advertise100FdMbps() bool { + + return *obj.obj.Advertise_100FdMbps + +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// Advertise100FdMbps returns a bool +func (obj *layer1AutoNegotiation) HasAdvertise100FdMbps() bool { + return obj.obj.Advertise_100FdMbps != nil +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// SetAdvertise100FdMbps sets the bool value in the Layer1AutoNegotiation object +func (obj *layer1AutoNegotiation) SetAdvertise100FdMbps(value bool) Layer1AutoNegotiation { + + obj.obj.Advertise_100FdMbps = &value + return obj +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// Advertise100HdMbps returns a bool +func (obj *layer1AutoNegotiation) Advertise100HdMbps() bool { + + return *obj.obj.Advertise_100HdMbps + +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// Advertise100HdMbps returns a bool +func (obj *layer1AutoNegotiation) HasAdvertise100HdMbps() bool { + return obj.obj.Advertise_100HdMbps != nil +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// SetAdvertise100HdMbps sets the bool value in the Layer1AutoNegotiation object +func (obj *layer1AutoNegotiation) SetAdvertise100HdMbps(value bool) Layer1AutoNegotiation { + + obj.obj.Advertise_100HdMbps = &value + return obj +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// Advertise10FdMbps returns a bool +func (obj *layer1AutoNegotiation) Advertise10FdMbps() bool { + + return *obj.obj.Advertise_10FdMbps + +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// Advertise10FdMbps returns a bool +func (obj *layer1AutoNegotiation) HasAdvertise10FdMbps() bool { + return obj.obj.Advertise_10FdMbps != nil +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// SetAdvertise10FdMbps sets the bool value in the Layer1AutoNegotiation object +func (obj *layer1AutoNegotiation) SetAdvertise10FdMbps(value bool) Layer1AutoNegotiation { + + obj.obj.Advertise_10FdMbps = &value + return obj +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// Advertise10HdMbps returns a bool +func (obj *layer1AutoNegotiation) Advertise10HdMbps() bool { + + return *obj.obj.Advertise_10HdMbps + +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// Advertise10HdMbps returns a bool +func (obj *layer1AutoNegotiation) HasAdvertise10HdMbps() bool { + return obj.obj.Advertise_10HdMbps != nil +} + +// If auto_negotiate is true and the interface supports this option +// then this speed will be advertised. +// SetAdvertise10HdMbps sets the bool value in the Layer1AutoNegotiation object +func (obj *layer1AutoNegotiation) SetAdvertise10HdMbps(value bool) Layer1AutoNegotiation { + + obj.obj.Advertise_10HdMbps = &value + return obj +} + +// Enable/disable gigabit ethernet link training. +// LinkTraining returns a bool +func (obj *layer1AutoNegotiation) LinkTraining() bool { + + return *obj.obj.LinkTraining + +} + +// Enable/disable gigabit ethernet link training. +// LinkTraining returns a bool +func (obj *layer1AutoNegotiation) HasLinkTraining() bool { + return obj.obj.LinkTraining != nil +} + +// Enable/disable gigabit ethernet link training. +// SetLinkTraining sets the bool value in the Layer1AutoNegotiation object +func (obj *layer1AutoNegotiation) SetLinkTraining(value bool) Layer1AutoNegotiation { + + obj.obj.LinkTraining = &value + return obj +} + +// Enable/disable gigabit ethernet reed solomon forward error correction (RS FEC). +// RsFec returns a bool +func (obj *layer1AutoNegotiation) RsFec() bool { + + return *obj.obj.RsFec + +} + +// Enable/disable gigabit ethernet reed solomon forward error correction (RS FEC). +// RsFec returns a bool +func (obj *layer1AutoNegotiation) HasRsFec() bool { + return obj.obj.RsFec != nil +} + +// Enable/disable gigabit ethernet reed solomon forward error correction (RS FEC). +// SetRsFec sets the bool value in the Layer1AutoNegotiation object +func (obj *layer1AutoNegotiation) SetRsFec(value bool) Layer1AutoNegotiation { + + obj.obj.RsFec = &value + return obj +} + +func (obj *layer1AutoNegotiation) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *layer1AutoNegotiation) setDefault() { + if obj.obj.Advertise_1000Mbps == nil { + obj.SetAdvertise1000Mbps(true) + } + if obj.obj.Advertise_100FdMbps == nil { + obj.SetAdvertise100FdMbps(true) + } + if obj.obj.Advertise_100HdMbps == nil { + obj.SetAdvertise100HdMbps(true) + } + if obj.obj.Advertise_10FdMbps == nil { + obj.SetAdvertise10FdMbps(true) + } + if obj.obj.Advertise_10HdMbps == nil { + obj.SetAdvertise10HdMbps(true) + } + if obj.obj.LinkTraining == nil { + obj.SetLinkTraining(false) + } + if obj.obj.RsFec == nil { + obj.SetRsFec(false) + } + +} diff --git a/gosnappi/layer1_flow_control.go b/gosnappi/layer1_flow_control.go new file mode 100644 index 00000000..2f08c07f --- /dev/null +++ b/gosnappi/layer1_flow_control.go @@ -0,0 +1,494 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Layer1FlowControl ***** +type layer1FlowControl struct { + validation + obj *otg.Layer1FlowControl + marshaller marshalLayer1FlowControl + unMarshaller unMarshalLayer1FlowControl + ieee_802_1QbbHolder Layer1Ieee8021Qbb + ieee_802_3XHolder Layer1Ieee8023X +} + +func NewLayer1FlowControl() Layer1FlowControl { + obj := layer1FlowControl{obj: &otg.Layer1FlowControl{}} + obj.setDefault() + return &obj +} + +func (obj *layer1FlowControl) msg() *otg.Layer1FlowControl { + return obj.obj +} + +func (obj *layer1FlowControl) setMsg(msg *otg.Layer1FlowControl) Layer1FlowControl { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshallayer1FlowControl struct { + obj *layer1FlowControl +} + +type marshalLayer1FlowControl interface { + // ToProto marshals Layer1FlowControl to protobuf object *otg.Layer1FlowControl + ToProto() (*otg.Layer1FlowControl, error) + // ToPbText marshals Layer1FlowControl to protobuf text + ToPbText() (string, error) + // ToYaml marshals Layer1FlowControl to YAML text + ToYaml() (string, error) + // ToJson marshals Layer1FlowControl to JSON text + ToJson() (string, error) +} + +type unMarshallayer1FlowControl struct { + obj *layer1FlowControl +} + +type unMarshalLayer1FlowControl interface { + // FromProto unmarshals Layer1FlowControl from protobuf object *otg.Layer1FlowControl + FromProto(msg *otg.Layer1FlowControl) (Layer1FlowControl, error) + // FromPbText unmarshals Layer1FlowControl from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Layer1FlowControl from YAML text + FromYaml(value string) error + // FromJson unmarshals Layer1FlowControl from JSON text + FromJson(value string) error +} + +func (obj *layer1FlowControl) Marshal() marshalLayer1FlowControl { + if obj.marshaller == nil { + obj.marshaller = &marshallayer1FlowControl{obj: obj} + } + return obj.marshaller +} + +func (obj *layer1FlowControl) Unmarshal() unMarshalLayer1FlowControl { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallayer1FlowControl{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallayer1FlowControl) ToProto() (*otg.Layer1FlowControl, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallayer1FlowControl) FromProto(msg *otg.Layer1FlowControl) (Layer1FlowControl, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallayer1FlowControl) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallayer1FlowControl) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallayer1FlowControl) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallayer1FlowControl) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallayer1FlowControl) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallayer1FlowControl) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *layer1FlowControl) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *layer1FlowControl) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *layer1FlowControl) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *layer1FlowControl) Clone() (Layer1FlowControl, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLayer1FlowControl() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *layer1FlowControl) setNil() { + obj.ieee_802_1QbbHolder = nil + obj.ieee_802_3XHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Layer1FlowControl is a container for layer1 receive flow control settings. +// To enable flow control settings on ports this object must be a valid +// object not a null value. +type Layer1FlowControl interface { + Validation + // msg marshals Layer1FlowControl to protobuf object *otg.Layer1FlowControl + // and doesn't set defaults + msg() *otg.Layer1FlowControl + // setMsg unmarshals Layer1FlowControl from protobuf object *otg.Layer1FlowControl + // and doesn't set defaults + setMsg(*otg.Layer1FlowControl) Layer1FlowControl + // provides marshal interface + Marshal() marshalLayer1FlowControl + // provides unmarshal interface + Unmarshal() unMarshalLayer1FlowControl + // validate validates Layer1FlowControl + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Layer1FlowControl, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // DirectedAddress returns string, set in Layer1FlowControl. + DirectedAddress() string + // SetDirectedAddress assigns string provided by user to Layer1FlowControl + SetDirectedAddress(value string) Layer1FlowControl + // HasDirectedAddress checks if DirectedAddress has been set in Layer1FlowControl + HasDirectedAddress() bool + // Choice returns Layer1FlowControlChoiceEnum, set in Layer1FlowControl + Choice() Layer1FlowControlChoiceEnum + // setChoice assigns Layer1FlowControlChoiceEnum provided by user to Layer1FlowControl + setChoice(value Layer1FlowControlChoiceEnum) Layer1FlowControl + // HasChoice checks if Choice has been set in Layer1FlowControl + HasChoice() bool + // Ieee8021Qbb returns Layer1Ieee8021Qbb, set in Layer1FlowControl. + Ieee8021Qbb() Layer1Ieee8021Qbb + // SetIeee8021Qbb assigns Layer1Ieee8021Qbb provided by user to Layer1FlowControl. + SetIeee8021Qbb(value Layer1Ieee8021Qbb) Layer1FlowControl + // HasIeee8021Qbb checks if Ieee8021Qbb has been set in Layer1FlowControl + HasIeee8021Qbb() bool + // Ieee8023X returns Layer1Ieee8023X, set in Layer1FlowControl. + Ieee8023X() Layer1Ieee8023X + // SetIeee8023X assigns Layer1Ieee8023X provided by user to Layer1FlowControl. + SetIeee8023X(value Layer1Ieee8023X) Layer1FlowControl + // HasIeee8023X checks if Ieee8023X has been set in Layer1FlowControl + HasIeee8023X() bool + setNil() +} + +// The 48bit mac address that the layer1 port names will listen on +// for a directed pause. +// DirectedAddress returns a string +func (obj *layer1FlowControl) DirectedAddress() string { + + return *obj.obj.DirectedAddress + +} + +// The 48bit mac address that the layer1 port names will listen on +// for a directed pause. +// DirectedAddress returns a string +func (obj *layer1FlowControl) HasDirectedAddress() bool { + return obj.obj.DirectedAddress != nil +} + +// The 48bit mac address that the layer1 port names will listen on +// for a directed pause. +// SetDirectedAddress sets the string value in the Layer1FlowControl object +func (obj *layer1FlowControl) SetDirectedAddress(value string) Layer1FlowControl { + + obj.obj.DirectedAddress = &value + return obj +} + +type Layer1FlowControlChoiceEnum string + +// Enum of Choice on Layer1FlowControl +var Layer1FlowControlChoice = struct { + IEEE_802_1QBB Layer1FlowControlChoiceEnum + IEEE_802_3X Layer1FlowControlChoiceEnum +}{ + IEEE_802_1QBB: Layer1FlowControlChoiceEnum("ieee_802_1qbb"), + IEEE_802_3X: Layer1FlowControlChoiceEnum("ieee_802_3x"), +} + +func (obj *layer1FlowControl) Choice() Layer1FlowControlChoiceEnum { + return Layer1FlowControlChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The type of priority flow control. +// Choice returns a string +func (obj *layer1FlowControl) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *layer1FlowControl) setChoice(value Layer1FlowControlChoiceEnum) Layer1FlowControl { + intValue, ok := otg.Layer1FlowControl_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Layer1FlowControlChoiceEnum", string(value))) + return obj + } + enumValue := otg.Layer1FlowControl_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ieee_802_3X = nil + obj.ieee_802_3XHolder = nil + obj.obj.Ieee_802_1Qbb = nil + obj.ieee_802_1QbbHolder = nil + + if value == Layer1FlowControlChoice.IEEE_802_1QBB { + obj.obj.Ieee_802_1Qbb = NewLayer1Ieee8021Qbb().msg() + } + + if value == Layer1FlowControlChoice.IEEE_802_3X { + obj.obj.Ieee_802_3X = NewLayer1Ieee8023X().msg() + } + + return obj +} + +// description is TBD +// Ieee8021Qbb returns a Layer1Ieee8021Qbb +func (obj *layer1FlowControl) Ieee8021Qbb() Layer1Ieee8021Qbb { + if obj.obj.Ieee_802_1Qbb == nil { + obj.setChoice(Layer1FlowControlChoice.IEEE_802_1QBB) + } + if obj.ieee_802_1QbbHolder == nil { + obj.ieee_802_1QbbHolder = &layer1Ieee8021Qbb{obj: obj.obj.Ieee_802_1Qbb} + } + return obj.ieee_802_1QbbHolder +} + +// description is TBD +// Ieee8021Qbb returns a Layer1Ieee8021Qbb +func (obj *layer1FlowControl) HasIeee8021Qbb() bool { + return obj.obj.Ieee_802_1Qbb != nil +} + +// description is TBD +// SetIeee8021Qbb sets the Layer1Ieee8021Qbb value in the Layer1FlowControl object +func (obj *layer1FlowControl) SetIeee8021Qbb(value Layer1Ieee8021Qbb) Layer1FlowControl { + obj.setChoice(Layer1FlowControlChoice.IEEE_802_1QBB) + obj.ieee_802_1QbbHolder = nil + obj.obj.Ieee_802_1Qbb = value.msg() + + return obj +} + +// description is TBD +// Ieee8023X returns a Layer1Ieee8023X +func (obj *layer1FlowControl) Ieee8023X() Layer1Ieee8023X { + if obj.obj.Ieee_802_3X == nil { + obj.setChoice(Layer1FlowControlChoice.IEEE_802_3X) + } + if obj.ieee_802_3XHolder == nil { + obj.ieee_802_3XHolder = &layer1Ieee8023X{obj: obj.obj.Ieee_802_3X} + } + return obj.ieee_802_3XHolder +} + +// description is TBD +// Ieee8023X returns a Layer1Ieee8023X +func (obj *layer1FlowControl) HasIeee8023X() bool { + return obj.obj.Ieee_802_3X != nil +} + +// description is TBD +// SetIeee8023X sets the Layer1Ieee8023X value in the Layer1FlowControl object +func (obj *layer1FlowControl) SetIeee8023X(value Layer1Ieee8023X) Layer1FlowControl { + obj.setChoice(Layer1FlowControlChoice.IEEE_802_3X) + obj.ieee_802_3XHolder = nil + obj.obj.Ieee_802_3X = value.msg() + + return obj +} + +func (obj *layer1FlowControl) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.DirectedAddress != nil { + + err := obj.validateMac(obj.DirectedAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Layer1FlowControl.DirectedAddress")) + } + + } + + if obj.obj.Ieee_802_1Qbb != nil { + + obj.Ieee8021Qbb().validateObj(vObj, set_default) + } + + if obj.obj.Ieee_802_3X != nil { + + obj.Ieee8023X().validateObj(vObj, set_default) + } + +} + +func (obj *layer1FlowControl) setDefault() { + var choices_set int = 0 + var choice Layer1FlowControlChoiceEnum + + if obj.obj.Ieee_802_1Qbb != nil { + choices_set += 1 + choice = Layer1FlowControlChoice.IEEE_802_1QBB + } + + if obj.obj.Ieee_802_3X != nil { + choices_set += 1 + choice = Layer1FlowControlChoice.IEEE_802_3X + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Layer1FlowControlChoice.IEEE_802_1QBB) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Layer1FlowControl") + } + } else { + intVal := otg.Layer1FlowControl_Choice_Enum_value[string(choice)] + enumValue := otg.Layer1FlowControl_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + + if obj.obj.DirectedAddress == nil { + obj.SetDirectedAddress("01:80:C2:00:00:01") + } + +} diff --git a/gosnappi/layer1_ieee8021_qbb.go b/gosnappi/layer1_ieee8021_qbb.go new file mode 100644 index 00000000..0ed54812 --- /dev/null +++ b/gosnappi/layer1_ieee8021_qbb.go @@ -0,0 +1,678 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Layer1Ieee8021Qbb ***** +type layer1Ieee8021Qbb struct { + validation + obj *otg.Layer1Ieee8021Qbb + marshaller marshalLayer1Ieee8021Qbb + unMarshaller unMarshalLayer1Ieee8021Qbb +} + +func NewLayer1Ieee8021Qbb() Layer1Ieee8021Qbb { + obj := layer1Ieee8021Qbb{obj: &otg.Layer1Ieee8021Qbb{}} + obj.setDefault() + return &obj +} + +func (obj *layer1Ieee8021Qbb) msg() *otg.Layer1Ieee8021Qbb { + return obj.obj +} + +func (obj *layer1Ieee8021Qbb) setMsg(msg *otg.Layer1Ieee8021Qbb) Layer1Ieee8021Qbb { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallayer1Ieee8021Qbb struct { + obj *layer1Ieee8021Qbb +} + +type marshalLayer1Ieee8021Qbb interface { + // ToProto marshals Layer1Ieee8021Qbb to protobuf object *otg.Layer1Ieee8021Qbb + ToProto() (*otg.Layer1Ieee8021Qbb, error) + // ToPbText marshals Layer1Ieee8021Qbb to protobuf text + ToPbText() (string, error) + // ToYaml marshals Layer1Ieee8021Qbb to YAML text + ToYaml() (string, error) + // ToJson marshals Layer1Ieee8021Qbb to JSON text + ToJson() (string, error) +} + +type unMarshallayer1Ieee8021Qbb struct { + obj *layer1Ieee8021Qbb +} + +type unMarshalLayer1Ieee8021Qbb interface { + // FromProto unmarshals Layer1Ieee8021Qbb from protobuf object *otg.Layer1Ieee8021Qbb + FromProto(msg *otg.Layer1Ieee8021Qbb) (Layer1Ieee8021Qbb, error) + // FromPbText unmarshals Layer1Ieee8021Qbb from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Layer1Ieee8021Qbb from YAML text + FromYaml(value string) error + // FromJson unmarshals Layer1Ieee8021Qbb from JSON text + FromJson(value string) error +} + +func (obj *layer1Ieee8021Qbb) Marshal() marshalLayer1Ieee8021Qbb { + if obj.marshaller == nil { + obj.marshaller = &marshallayer1Ieee8021Qbb{obj: obj} + } + return obj.marshaller +} + +func (obj *layer1Ieee8021Qbb) Unmarshal() unMarshalLayer1Ieee8021Qbb { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallayer1Ieee8021Qbb{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallayer1Ieee8021Qbb) ToProto() (*otg.Layer1Ieee8021Qbb, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallayer1Ieee8021Qbb) FromProto(msg *otg.Layer1Ieee8021Qbb) (Layer1Ieee8021Qbb, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallayer1Ieee8021Qbb) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallayer1Ieee8021Qbb) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallayer1Ieee8021Qbb) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallayer1Ieee8021Qbb) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallayer1Ieee8021Qbb) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallayer1Ieee8021Qbb) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *layer1Ieee8021Qbb) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *layer1Ieee8021Qbb) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *layer1Ieee8021Qbb) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *layer1Ieee8021Qbb) Clone() (Layer1Ieee8021Qbb, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLayer1Ieee8021Qbb() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Layer1Ieee8021Qbb is these settings enhance the existing 802.3x pause priority capabilities +// to enable flow control based on 802.1p priorities (classes of service). +type Layer1Ieee8021Qbb interface { + Validation + // msg marshals Layer1Ieee8021Qbb to protobuf object *otg.Layer1Ieee8021Qbb + // and doesn't set defaults + msg() *otg.Layer1Ieee8021Qbb + // setMsg unmarshals Layer1Ieee8021Qbb from protobuf object *otg.Layer1Ieee8021Qbb + // and doesn't set defaults + setMsg(*otg.Layer1Ieee8021Qbb) Layer1Ieee8021Qbb + // provides marshal interface + Marshal() marshalLayer1Ieee8021Qbb + // provides unmarshal interface + Unmarshal() unMarshalLayer1Ieee8021Qbb + // validate validates Layer1Ieee8021Qbb + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Layer1Ieee8021Qbb, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PfcDelay returns uint32, set in Layer1Ieee8021Qbb. + PfcDelay() uint32 + // SetPfcDelay assigns uint32 provided by user to Layer1Ieee8021Qbb + SetPfcDelay(value uint32) Layer1Ieee8021Qbb + // HasPfcDelay checks if PfcDelay has been set in Layer1Ieee8021Qbb + HasPfcDelay() bool + // PfcClass0 returns uint32, set in Layer1Ieee8021Qbb. + PfcClass0() uint32 + // SetPfcClass0 assigns uint32 provided by user to Layer1Ieee8021Qbb + SetPfcClass0(value uint32) Layer1Ieee8021Qbb + // HasPfcClass0 checks if PfcClass0 has been set in Layer1Ieee8021Qbb + HasPfcClass0() bool + // PfcClass1 returns uint32, set in Layer1Ieee8021Qbb. + PfcClass1() uint32 + // SetPfcClass1 assigns uint32 provided by user to Layer1Ieee8021Qbb + SetPfcClass1(value uint32) Layer1Ieee8021Qbb + // HasPfcClass1 checks if PfcClass1 has been set in Layer1Ieee8021Qbb + HasPfcClass1() bool + // PfcClass2 returns uint32, set in Layer1Ieee8021Qbb. + PfcClass2() uint32 + // SetPfcClass2 assigns uint32 provided by user to Layer1Ieee8021Qbb + SetPfcClass2(value uint32) Layer1Ieee8021Qbb + // HasPfcClass2 checks if PfcClass2 has been set in Layer1Ieee8021Qbb + HasPfcClass2() bool + // PfcClass3 returns uint32, set in Layer1Ieee8021Qbb. + PfcClass3() uint32 + // SetPfcClass3 assigns uint32 provided by user to Layer1Ieee8021Qbb + SetPfcClass3(value uint32) Layer1Ieee8021Qbb + // HasPfcClass3 checks if PfcClass3 has been set in Layer1Ieee8021Qbb + HasPfcClass3() bool + // PfcClass4 returns uint32, set in Layer1Ieee8021Qbb. + PfcClass4() uint32 + // SetPfcClass4 assigns uint32 provided by user to Layer1Ieee8021Qbb + SetPfcClass4(value uint32) Layer1Ieee8021Qbb + // HasPfcClass4 checks if PfcClass4 has been set in Layer1Ieee8021Qbb + HasPfcClass4() bool + // PfcClass5 returns uint32, set in Layer1Ieee8021Qbb. + PfcClass5() uint32 + // SetPfcClass5 assigns uint32 provided by user to Layer1Ieee8021Qbb + SetPfcClass5(value uint32) Layer1Ieee8021Qbb + // HasPfcClass5 checks if PfcClass5 has been set in Layer1Ieee8021Qbb + HasPfcClass5() bool + // PfcClass6 returns uint32, set in Layer1Ieee8021Qbb. + PfcClass6() uint32 + // SetPfcClass6 assigns uint32 provided by user to Layer1Ieee8021Qbb + SetPfcClass6(value uint32) Layer1Ieee8021Qbb + // HasPfcClass6 checks if PfcClass6 has been set in Layer1Ieee8021Qbb + HasPfcClass6() bool + // PfcClass7 returns uint32, set in Layer1Ieee8021Qbb. + PfcClass7() uint32 + // SetPfcClass7 assigns uint32 provided by user to Layer1Ieee8021Qbb + SetPfcClass7(value uint32) Layer1Ieee8021Qbb + // HasPfcClass7 checks if PfcClass7 has been set in Layer1Ieee8021Qbb + HasPfcClass7() bool +} + +// The upper limit on the transmit time of a queue after receiving a +// message to pause a specified priority. +// A value of 0 or null indicates that pfc delay will not be enabled. +// PfcDelay returns a uint32 +func (obj *layer1Ieee8021Qbb) PfcDelay() uint32 { + + return *obj.obj.PfcDelay + +} + +// The upper limit on the transmit time of a queue after receiving a +// message to pause a specified priority. +// A value of 0 or null indicates that pfc delay will not be enabled. +// PfcDelay returns a uint32 +func (obj *layer1Ieee8021Qbb) HasPfcDelay() bool { + return obj.obj.PfcDelay != nil +} + +// The upper limit on the transmit time of a queue after receiving a +// message to pause a specified priority. +// A value of 0 or null indicates that pfc delay will not be enabled. +// SetPfcDelay sets the uint32 value in the Layer1Ieee8021Qbb object +func (obj *layer1Ieee8021Qbb) SetPfcDelay(value uint32) Layer1Ieee8021Qbb { + + obj.obj.PfcDelay = &value + return obj +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass0 returns a uint32 +func (obj *layer1Ieee8021Qbb) PfcClass0() uint32 { + + return *obj.obj.PfcClass_0 + +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass0 returns a uint32 +func (obj *layer1Ieee8021Qbb) HasPfcClass0() bool { + return obj.obj.PfcClass_0 != nil +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// SetPfcClass0 sets the uint32 value in the Layer1Ieee8021Qbb object +func (obj *layer1Ieee8021Qbb) SetPfcClass0(value uint32) Layer1Ieee8021Qbb { + + obj.obj.PfcClass_0 = &value + return obj +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass1 returns a uint32 +func (obj *layer1Ieee8021Qbb) PfcClass1() uint32 { + + return *obj.obj.PfcClass_1 + +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass1 returns a uint32 +func (obj *layer1Ieee8021Qbb) HasPfcClass1() bool { + return obj.obj.PfcClass_1 != nil +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// SetPfcClass1 sets the uint32 value in the Layer1Ieee8021Qbb object +func (obj *layer1Ieee8021Qbb) SetPfcClass1(value uint32) Layer1Ieee8021Qbb { + + obj.obj.PfcClass_1 = &value + return obj +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass2 returns a uint32 +func (obj *layer1Ieee8021Qbb) PfcClass2() uint32 { + + return *obj.obj.PfcClass_2 + +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass2 returns a uint32 +func (obj *layer1Ieee8021Qbb) HasPfcClass2() bool { + return obj.obj.PfcClass_2 != nil +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// SetPfcClass2 sets the uint32 value in the Layer1Ieee8021Qbb object +func (obj *layer1Ieee8021Qbb) SetPfcClass2(value uint32) Layer1Ieee8021Qbb { + + obj.obj.PfcClass_2 = &value + return obj +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass3 returns a uint32 +func (obj *layer1Ieee8021Qbb) PfcClass3() uint32 { + + return *obj.obj.PfcClass_3 + +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass3 returns a uint32 +func (obj *layer1Ieee8021Qbb) HasPfcClass3() bool { + return obj.obj.PfcClass_3 != nil +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// SetPfcClass3 sets the uint32 value in the Layer1Ieee8021Qbb object +func (obj *layer1Ieee8021Qbb) SetPfcClass3(value uint32) Layer1Ieee8021Qbb { + + obj.obj.PfcClass_3 = &value + return obj +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass4 returns a uint32 +func (obj *layer1Ieee8021Qbb) PfcClass4() uint32 { + + return *obj.obj.PfcClass_4 + +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass4 returns a uint32 +func (obj *layer1Ieee8021Qbb) HasPfcClass4() bool { + return obj.obj.PfcClass_4 != nil +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// SetPfcClass4 sets the uint32 value in the Layer1Ieee8021Qbb object +func (obj *layer1Ieee8021Qbb) SetPfcClass4(value uint32) Layer1Ieee8021Qbb { + + obj.obj.PfcClass_4 = &value + return obj +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass5 returns a uint32 +func (obj *layer1Ieee8021Qbb) PfcClass5() uint32 { + + return *obj.obj.PfcClass_5 + +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass5 returns a uint32 +func (obj *layer1Ieee8021Qbb) HasPfcClass5() bool { + return obj.obj.PfcClass_5 != nil +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// SetPfcClass5 sets the uint32 value in the Layer1Ieee8021Qbb object +func (obj *layer1Ieee8021Qbb) SetPfcClass5(value uint32) Layer1Ieee8021Qbb { + + obj.obj.PfcClass_5 = &value + return obj +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass6 returns a uint32 +func (obj *layer1Ieee8021Qbb) PfcClass6() uint32 { + + return *obj.obj.PfcClass_6 + +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass6 returns a uint32 +func (obj *layer1Ieee8021Qbb) HasPfcClass6() bool { + return obj.obj.PfcClass_6 != nil +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// SetPfcClass6 sets the uint32 value in the Layer1Ieee8021Qbb object +func (obj *layer1Ieee8021Qbb) SetPfcClass6(value uint32) Layer1Ieee8021Qbb { + + obj.obj.PfcClass_6 = &value + return obj +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass7 returns a uint32 +func (obj *layer1Ieee8021Qbb) PfcClass7() uint32 { + + return *obj.obj.PfcClass_7 + +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// PfcClass7 returns a uint32 +func (obj *layer1Ieee8021Qbb) HasPfcClass7() bool { + return obj.obj.PfcClass_7 != nil +} + +// The valid values are null, 0 - 7. +// A null value indicates there is no setting for this pfc class. +// SetPfcClass7 sets the uint32 value in the Layer1Ieee8021Qbb object +func (obj *layer1Ieee8021Qbb) SetPfcClass7(value uint32) Layer1Ieee8021Qbb { + + obj.obj.PfcClass_7 = &value + return obj +} + +func (obj *layer1Ieee8021Qbb) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.PfcDelay != nil { + + if *obj.obj.PfcDelay > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Layer1Ieee8021Qbb.PfcDelay <= 65535 but Got %d", *obj.obj.PfcDelay)) + } + + } + + if obj.obj.PfcClass_0 != nil { + + if *obj.obj.PfcClass_0 > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Layer1Ieee8021Qbb.PfcClass_0 <= 7 but Got %d", *obj.obj.PfcClass_0)) + } + + } + + if obj.obj.PfcClass_1 != nil { + + if *obj.obj.PfcClass_1 > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Layer1Ieee8021Qbb.PfcClass_1 <= 7 but Got %d", *obj.obj.PfcClass_1)) + } + + } + + if obj.obj.PfcClass_2 != nil { + + if *obj.obj.PfcClass_2 > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Layer1Ieee8021Qbb.PfcClass_2 <= 7 but Got %d", *obj.obj.PfcClass_2)) + } + + } + + if obj.obj.PfcClass_3 != nil { + + if *obj.obj.PfcClass_3 > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Layer1Ieee8021Qbb.PfcClass_3 <= 7 but Got %d", *obj.obj.PfcClass_3)) + } + + } + + if obj.obj.PfcClass_4 != nil { + + if *obj.obj.PfcClass_4 > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Layer1Ieee8021Qbb.PfcClass_4 <= 7 but Got %d", *obj.obj.PfcClass_4)) + } + + } + + if obj.obj.PfcClass_5 != nil { + + if *obj.obj.PfcClass_5 > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Layer1Ieee8021Qbb.PfcClass_5 <= 7 but Got %d", *obj.obj.PfcClass_5)) + } + + } + + if obj.obj.PfcClass_6 != nil { + + if *obj.obj.PfcClass_6 > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Layer1Ieee8021Qbb.PfcClass_6 <= 7 but Got %d", *obj.obj.PfcClass_6)) + } + + } + + if obj.obj.PfcClass_7 != nil { + + if *obj.obj.PfcClass_7 > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Layer1Ieee8021Qbb.PfcClass_7 <= 7 but Got %d", *obj.obj.PfcClass_7)) + } + + } + +} + +func (obj *layer1Ieee8021Qbb) setDefault() { + if obj.obj.PfcDelay == nil { + obj.SetPfcDelay(0) + } + if obj.obj.PfcClass_0 == nil { + obj.SetPfcClass0(0) + } + if obj.obj.PfcClass_1 == nil { + obj.SetPfcClass1(1) + } + if obj.obj.PfcClass_2 == nil { + obj.SetPfcClass2(2) + } + if obj.obj.PfcClass_3 == nil { + obj.SetPfcClass3(3) + } + if obj.obj.PfcClass_4 == nil { + obj.SetPfcClass4(4) + } + if obj.obj.PfcClass_5 == nil { + obj.SetPfcClass5(5) + } + if obj.obj.PfcClass_6 == nil { + obj.SetPfcClass6(6) + } + if obj.obj.PfcClass_7 == nil { + obj.SetPfcClass7(7) + } + +} diff --git a/gosnappi/layer1_ieee8023_x.go b/gosnappi/layer1_ieee8023_x.go new file mode 100644 index 00000000..380bd1a9 --- /dev/null +++ b/gosnappi/layer1_ieee8023_x.go @@ -0,0 +1,278 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Layer1Ieee8023X ***** +type layer1Ieee8023X struct { + validation + obj *otg.Layer1Ieee8023X + marshaller marshalLayer1Ieee8023X + unMarshaller unMarshalLayer1Ieee8023X +} + +func NewLayer1Ieee8023X() Layer1Ieee8023X { + obj := layer1Ieee8023X{obj: &otg.Layer1Ieee8023X{}} + obj.setDefault() + return &obj +} + +func (obj *layer1Ieee8023X) msg() *otg.Layer1Ieee8023X { + return obj.obj +} + +func (obj *layer1Ieee8023X) setMsg(msg *otg.Layer1Ieee8023X) Layer1Ieee8023X { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallayer1Ieee8023X struct { + obj *layer1Ieee8023X +} + +type marshalLayer1Ieee8023X interface { + // ToProto marshals Layer1Ieee8023X to protobuf object *otg.Layer1Ieee8023X + ToProto() (*otg.Layer1Ieee8023X, error) + // ToPbText marshals Layer1Ieee8023X to protobuf text + ToPbText() (string, error) + // ToYaml marshals Layer1Ieee8023X to YAML text + ToYaml() (string, error) + // ToJson marshals Layer1Ieee8023X to JSON text + ToJson() (string, error) +} + +type unMarshallayer1Ieee8023X struct { + obj *layer1Ieee8023X +} + +type unMarshalLayer1Ieee8023X interface { + // FromProto unmarshals Layer1Ieee8023X from protobuf object *otg.Layer1Ieee8023X + FromProto(msg *otg.Layer1Ieee8023X) (Layer1Ieee8023X, error) + // FromPbText unmarshals Layer1Ieee8023X from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Layer1Ieee8023X from YAML text + FromYaml(value string) error + // FromJson unmarshals Layer1Ieee8023X from JSON text + FromJson(value string) error +} + +func (obj *layer1Ieee8023X) Marshal() marshalLayer1Ieee8023X { + if obj.marshaller == nil { + obj.marshaller = &marshallayer1Ieee8023X{obj: obj} + } + return obj.marshaller +} + +func (obj *layer1Ieee8023X) Unmarshal() unMarshalLayer1Ieee8023X { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallayer1Ieee8023X{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallayer1Ieee8023X) ToProto() (*otg.Layer1Ieee8023X, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallayer1Ieee8023X) FromProto(msg *otg.Layer1Ieee8023X) (Layer1Ieee8023X, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallayer1Ieee8023X) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallayer1Ieee8023X) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallayer1Ieee8023X) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallayer1Ieee8023X) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallayer1Ieee8023X) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallayer1Ieee8023X) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *layer1Ieee8023X) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *layer1Ieee8023X) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *layer1Ieee8023X) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *layer1Ieee8023X) Clone() (Layer1Ieee8023X, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLayer1Ieee8023X() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Layer1Ieee8023X is a container for ieee 802.3x rx pause settings +type Layer1Ieee8023X interface { + Validation + // msg marshals Layer1Ieee8023X to protobuf object *otg.Layer1Ieee8023X + // and doesn't set defaults + msg() *otg.Layer1Ieee8023X + // setMsg unmarshals Layer1Ieee8023X from protobuf object *otg.Layer1Ieee8023X + // and doesn't set defaults + setMsg(*otg.Layer1Ieee8023X) Layer1Ieee8023X + // provides marshal interface + Marshal() marshalLayer1Ieee8023X + // provides unmarshal interface + Unmarshal() unMarshalLayer1Ieee8023X + // validate validates Layer1Ieee8023X + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Layer1Ieee8023X, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() +} + +func (obj *layer1Ieee8023X) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *layer1Ieee8023X) setDefault() { + +} diff --git a/gosnappi/link_state_te.go b/gosnappi/link_state_te.go new file mode 100644 index 00000000..7bb82e39 --- /dev/null +++ b/gosnappi/link_state_te.go @@ -0,0 +1,486 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LinkStateTE ***** +type linkStateTE struct { + validation + obj *otg.LinkStateTE + marshaller marshalLinkStateTE + unMarshaller unMarshalLinkStateTE + priorityBandwidthsHolder LinkStatepriorityBandwidths +} + +func NewLinkStateTE() LinkStateTE { + obj := linkStateTE{obj: &otg.LinkStateTE{}} + obj.setDefault() + return &obj +} + +func (obj *linkStateTE) msg() *otg.LinkStateTE { + return obj.obj +} + +func (obj *linkStateTE) setMsg(msg *otg.LinkStateTE) LinkStateTE { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshallinkStateTE struct { + obj *linkStateTE +} + +type marshalLinkStateTE interface { + // ToProto marshals LinkStateTE to protobuf object *otg.LinkStateTE + ToProto() (*otg.LinkStateTE, error) + // ToPbText marshals LinkStateTE to protobuf text + ToPbText() (string, error) + // ToYaml marshals LinkStateTE to YAML text + ToYaml() (string, error) + // ToJson marshals LinkStateTE to JSON text + ToJson() (string, error) +} + +type unMarshallinkStateTE struct { + obj *linkStateTE +} + +type unMarshalLinkStateTE interface { + // FromProto unmarshals LinkStateTE from protobuf object *otg.LinkStateTE + FromProto(msg *otg.LinkStateTE) (LinkStateTE, error) + // FromPbText unmarshals LinkStateTE from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LinkStateTE from YAML text + FromYaml(value string) error + // FromJson unmarshals LinkStateTE from JSON text + FromJson(value string) error +} + +func (obj *linkStateTE) Marshal() marshalLinkStateTE { + if obj.marshaller == nil { + obj.marshaller = &marshallinkStateTE{obj: obj} + } + return obj.marshaller +} + +func (obj *linkStateTE) Unmarshal() unMarshalLinkStateTE { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallinkStateTE{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallinkStateTE) ToProto() (*otg.LinkStateTE, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallinkStateTE) FromProto(msg *otg.LinkStateTE) (LinkStateTE, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallinkStateTE) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallinkStateTE) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallinkStateTE) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallinkStateTE) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallinkStateTE) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallinkStateTE) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *linkStateTE) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *linkStateTE) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *linkStateTE) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *linkStateTE) Clone() (LinkStateTE, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLinkStateTE() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *linkStateTE) setNil() { + obj.priorityBandwidthsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// LinkStateTE is a container for Traffic Engineering properties on a interface. +type LinkStateTE interface { + Validation + // msg marshals LinkStateTE to protobuf object *otg.LinkStateTE + // and doesn't set defaults + msg() *otg.LinkStateTE + // setMsg unmarshals LinkStateTE from protobuf object *otg.LinkStateTE + // and doesn't set defaults + setMsg(*otg.LinkStateTE) LinkStateTE + // provides marshal interface + Marshal() marshalLinkStateTE + // provides unmarshal interface + Unmarshal() unMarshalLinkStateTE + // validate validates LinkStateTE + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LinkStateTE, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // AdministrativeGroup returns string, set in LinkStateTE. + AdministrativeGroup() string + // SetAdministrativeGroup assigns string provided by user to LinkStateTE + SetAdministrativeGroup(value string) LinkStateTE + // HasAdministrativeGroup checks if AdministrativeGroup has been set in LinkStateTE + HasAdministrativeGroup() bool + // MetricLevel returns uint32, set in LinkStateTE. + MetricLevel() uint32 + // SetMetricLevel assigns uint32 provided by user to LinkStateTE + SetMetricLevel(value uint32) LinkStateTE + // HasMetricLevel checks if MetricLevel has been set in LinkStateTE + HasMetricLevel() bool + // MaxBandwith returns uint32, set in LinkStateTE. + MaxBandwith() uint32 + // SetMaxBandwith assigns uint32 provided by user to LinkStateTE + SetMaxBandwith(value uint32) LinkStateTE + // HasMaxBandwith checks if MaxBandwith has been set in LinkStateTE + HasMaxBandwith() bool + // MaxReservableBandwidth returns uint32, set in LinkStateTE. + MaxReservableBandwidth() uint32 + // SetMaxReservableBandwidth assigns uint32 provided by user to LinkStateTE + SetMaxReservableBandwidth(value uint32) LinkStateTE + // HasMaxReservableBandwidth checks if MaxReservableBandwidth has been set in LinkStateTE + HasMaxReservableBandwidth() bool + // PriorityBandwidths returns LinkStatepriorityBandwidths, set in LinkStateTE. + // LinkStatepriorityBandwidths is specifies the amount of bandwidth that can be reserved with a setup priority of 0 + // through 7, arranged in increasing order with priority 0 having highest priority. + // In ISIS, this is sent in sub-TLV (11) of Extended IS Reachability TLV. + PriorityBandwidths() LinkStatepriorityBandwidths + // SetPriorityBandwidths assigns LinkStatepriorityBandwidths provided by user to LinkStateTE. + // LinkStatepriorityBandwidths is specifies the amount of bandwidth that can be reserved with a setup priority of 0 + // through 7, arranged in increasing order with priority 0 having highest priority. + // In ISIS, this is sent in sub-TLV (11) of Extended IS Reachability TLV. + SetPriorityBandwidths(value LinkStatepriorityBandwidths) LinkStateTE + // HasPriorityBandwidths checks if PriorityBandwidths has been set in LinkStateTE + HasPriorityBandwidths() bool + setNil() +} + +// The Administrative group sub-TLV (sub-TLV 3). It is a 4-octet +// user-defined bit mask used to assign administrative group numbers +// to the interface, for use in assigning colors and resource classes. +// Each set bit corresponds to a single administrative group for this +// interface. The settings translate into Group numbers, which range +// from 0 to 31 (integers). +// AdministrativeGroup returns a string +func (obj *linkStateTE) AdministrativeGroup() string { + + return *obj.obj.AdministrativeGroup + +} + +// The Administrative group sub-TLV (sub-TLV 3). It is a 4-octet +// user-defined bit mask used to assign administrative group numbers +// to the interface, for use in assigning colors and resource classes. +// Each set bit corresponds to a single administrative group for this +// interface. The settings translate into Group numbers, which range +// from 0 to 31 (integers). +// AdministrativeGroup returns a string +func (obj *linkStateTE) HasAdministrativeGroup() bool { + return obj.obj.AdministrativeGroup != nil +} + +// The Administrative group sub-TLV (sub-TLV 3). It is a 4-octet +// user-defined bit mask used to assign administrative group numbers +// to the interface, for use in assigning colors and resource classes. +// Each set bit corresponds to a single administrative group for this +// interface. The settings translate into Group numbers, which range +// from 0 to 31 (integers). +// SetAdministrativeGroup sets the string value in the LinkStateTE object +func (obj *linkStateTE) SetAdministrativeGroup(value string) LinkStateTE { + + obj.obj.AdministrativeGroup = &value + return obj +} + +// The user-assigned link metric for Traffic Engineering. +// MetricLevel returns a uint32 +func (obj *linkStateTE) MetricLevel() uint32 { + + return *obj.obj.MetricLevel + +} + +// The user-assigned link metric for Traffic Engineering. +// MetricLevel returns a uint32 +func (obj *linkStateTE) HasMetricLevel() bool { + return obj.obj.MetricLevel != nil +} + +// The user-assigned link metric for Traffic Engineering. +// SetMetricLevel sets the uint32 value in the LinkStateTE object +func (obj *linkStateTE) SetMetricLevel(value uint32) LinkStateTE { + + obj.obj.MetricLevel = &value + return obj +} + +// The maximum link bandwidth (sub-TLV 9) in bytes/sec allowed for this +// link for a direction. +// MaxBandwith returns a uint32 +func (obj *linkStateTE) MaxBandwith() uint32 { + + return *obj.obj.MaxBandwith + +} + +// The maximum link bandwidth (sub-TLV 9) in bytes/sec allowed for this +// link for a direction. +// MaxBandwith returns a uint32 +func (obj *linkStateTE) HasMaxBandwith() bool { + return obj.obj.MaxBandwith != nil +} + +// The maximum link bandwidth (sub-TLV 9) in bytes/sec allowed for this +// link for a direction. +// SetMaxBandwith sets the uint32 value in the LinkStateTE object +func (obj *linkStateTE) SetMaxBandwith(value uint32) LinkStateTE { + + obj.obj.MaxBandwith = &value + return obj +} + +// The maximum link bandwidth (sub-TLV 10) in bytes/sec allowed for this +// link in a direction. +// MaxReservableBandwidth returns a uint32 +func (obj *linkStateTE) MaxReservableBandwidth() uint32 { + + return *obj.obj.MaxReservableBandwidth + +} + +// The maximum link bandwidth (sub-TLV 10) in bytes/sec allowed for this +// link in a direction. +// MaxReservableBandwidth returns a uint32 +func (obj *linkStateTE) HasMaxReservableBandwidth() bool { + return obj.obj.MaxReservableBandwidth != nil +} + +// The maximum link bandwidth (sub-TLV 10) in bytes/sec allowed for this +// link in a direction. +// SetMaxReservableBandwidth sets the uint32 value in the LinkStateTE object +func (obj *linkStateTE) SetMaxReservableBandwidth(value uint32) LinkStateTE { + + obj.obj.MaxReservableBandwidth = &value + return obj +} + +// Configuration of bandwidths of priority 0 through priority 7. +// PriorityBandwidths returns a LinkStatepriorityBandwidths +func (obj *linkStateTE) PriorityBandwidths() LinkStatepriorityBandwidths { + if obj.obj.PriorityBandwidths == nil { + obj.obj.PriorityBandwidths = NewLinkStatepriorityBandwidths().msg() + } + if obj.priorityBandwidthsHolder == nil { + obj.priorityBandwidthsHolder = &linkStatepriorityBandwidths{obj: obj.obj.PriorityBandwidths} + } + return obj.priorityBandwidthsHolder +} + +// Configuration of bandwidths of priority 0 through priority 7. +// PriorityBandwidths returns a LinkStatepriorityBandwidths +func (obj *linkStateTE) HasPriorityBandwidths() bool { + return obj.obj.PriorityBandwidths != nil +} + +// Configuration of bandwidths of priority 0 through priority 7. +// SetPriorityBandwidths sets the LinkStatepriorityBandwidths value in the LinkStateTE object +func (obj *linkStateTE) SetPriorityBandwidths(value LinkStatepriorityBandwidths) LinkStateTE { + + obj.priorityBandwidthsHolder = nil + obj.obj.PriorityBandwidths = value.msg() + + return obj +} + +func (obj *linkStateTE) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.AdministrativeGroup != nil { + + err := obj.validateHex(obj.AdministrativeGroup()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on LinkStateTE.AdministrativeGroup")) + } + + } + + if obj.obj.PriorityBandwidths != nil { + + obj.PriorityBandwidths().validateObj(vObj, set_default) + } + +} + +func (obj *linkStateTE) setDefault() { + if obj.obj.AdministrativeGroup == nil { + obj.SetAdministrativeGroup("00000000") + } + if obj.obj.MetricLevel == nil { + obj.SetMetricLevel(0) + } + if obj.obj.MaxBandwith == nil { + obj.SetMaxBandwith(125000000) + } + if obj.obj.MaxReservableBandwidth == nil { + obj.SetMaxReservableBandwidth(125000000) + } + +} diff --git a/gosnappi/link_statepriority_bandwidths.go b/gosnappi/link_statepriority_bandwidths.go new file mode 100644 index 00000000..3dc73809 --- /dev/null +++ b/gosnappi/link_statepriority_bandwidths.go @@ -0,0 +1,528 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LinkStatepriorityBandwidths ***** +type linkStatepriorityBandwidths struct { + validation + obj *otg.LinkStatepriorityBandwidths + marshaller marshalLinkStatepriorityBandwidths + unMarshaller unMarshalLinkStatepriorityBandwidths +} + +func NewLinkStatepriorityBandwidths() LinkStatepriorityBandwidths { + obj := linkStatepriorityBandwidths{obj: &otg.LinkStatepriorityBandwidths{}} + obj.setDefault() + return &obj +} + +func (obj *linkStatepriorityBandwidths) msg() *otg.LinkStatepriorityBandwidths { + return obj.obj +} + +func (obj *linkStatepriorityBandwidths) setMsg(msg *otg.LinkStatepriorityBandwidths) LinkStatepriorityBandwidths { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallinkStatepriorityBandwidths struct { + obj *linkStatepriorityBandwidths +} + +type marshalLinkStatepriorityBandwidths interface { + // ToProto marshals LinkStatepriorityBandwidths to protobuf object *otg.LinkStatepriorityBandwidths + ToProto() (*otg.LinkStatepriorityBandwidths, error) + // ToPbText marshals LinkStatepriorityBandwidths to protobuf text + ToPbText() (string, error) + // ToYaml marshals LinkStatepriorityBandwidths to YAML text + ToYaml() (string, error) + // ToJson marshals LinkStatepriorityBandwidths to JSON text + ToJson() (string, error) +} + +type unMarshallinkStatepriorityBandwidths struct { + obj *linkStatepriorityBandwidths +} + +type unMarshalLinkStatepriorityBandwidths interface { + // FromProto unmarshals LinkStatepriorityBandwidths from protobuf object *otg.LinkStatepriorityBandwidths + FromProto(msg *otg.LinkStatepriorityBandwidths) (LinkStatepriorityBandwidths, error) + // FromPbText unmarshals LinkStatepriorityBandwidths from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LinkStatepriorityBandwidths from YAML text + FromYaml(value string) error + // FromJson unmarshals LinkStatepriorityBandwidths from JSON text + FromJson(value string) error +} + +func (obj *linkStatepriorityBandwidths) Marshal() marshalLinkStatepriorityBandwidths { + if obj.marshaller == nil { + obj.marshaller = &marshallinkStatepriorityBandwidths{obj: obj} + } + return obj.marshaller +} + +func (obj *linkStatepriorityBandwidths) Unmarshal() unMarshalLinkStatepriorityBandwidths { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallinkStatepriorityBandwidths{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallinkStatepriorityBandwidths) ToProto() (*otg.LinkStatepriorityBandwidths, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallinkStatepriorityBandwidths) FromProto(msg *otg.LinkStatepriorityBandwidths) (LinkStatepriorityBandwidths, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallinkStatepriorityBandwidths) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallinkStatepriorityBandwidths) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallinkStatepriorityBandwidths) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallinkStatepriorityBandwidths) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallinkStatepriorityBandwidths) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallinkStatepriorityBandwidths) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *linkStatepriorityBandwidths) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *linkStatepriorityBandwidths) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *linkStatepriorityBandwidths) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *linkStatepriorityBandwidths) Clone() (LinkStatepriorityBandwidths, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLinkStatepriorityBandwidths() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LinkStatepriorityBandwidths is specifies the amount of bandwidth that can be reserved with a setup priority of 0 +// through 7, arranged in increasing order with priority 0 having highest priority. +// In ISIS, this is sent in sub-TLV (11) of Extended IS Reachability TLV. +type LinkStatepriorityBandwidths interface { + Validation + // msg marshals LinkStatepriorityBandwidths to protobuf object *otg.LinkStatepriorityBandwidths + // and doesn't set defaults + msg() *otg.LinkStatepriorityBandwidths + // setMsg unmarshals LinkStatepriorityBandwidths from protobuf object *otg.LinkStatepriorityBandwidths + // and doesn't set defaults + setMsg(*otg.LinkStatepriorityBandwidths) LinkStatepriorityBandwidths + // provides marshal interface + Marshal() marshalLinkStatepriorityBandwidths + // provides unmarshal interface + Unmarshal() unMarshalLinkStatepriorityBandwidths + // validate validates LinkStatepriorityBandwidths + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LinkStatepriorityBandwidths, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Pb0 returns uint32, set in LinkStatepriorityBandwidths. + Pb0() uint32 + // SetPb0 assigns uint32 provided by user to LinkStatepriorityBandwidths + SetPb0(value uint32) LinkStatepriorityBandwidths + // HasPb0 checks if Pb0 has been set in LinkStatepriorityBandwidths + HasPb0() bool + // Pb1 returns uint32, set in LinkStatepriorityBandwidths. + Pb1() uint32 + // SetPb1 assigns uint32 provided by user to LinkStatepriorityBandwidths + SetPb1(value uint32) LinkStatepriorityBandwidths + // HasPb1 checks if Pb1 has been set in LinkStatepriorityBandwidths + HasPb1() bool + // Pb2 returns uint32, set in LinkStatepriorityBandwidths. + Pb2() uint32 + // SetPb2 assigns uint32 provided by user to LinkStatepriorityBandwidths + SetPb2(value uint32) LinkStatepriorityBandwidths + // HasPb2 checks if Pb2 has been set in LinkStatepriorityBandwidths + HasPb2() bool + // Pb3 returns uint32, set in LinkStatepriorityBandwidths. + Pb3() uint32 + // SetPb3 assigns uint32 provided by user to LinkStatepriorityBandwidths + SetPb3(value uint32) LinkStatepriorityBandwidths + // HasPb3 checks if Pb3 has been set in LinkStatepriorityBandwidths + HasPb3() bool + // Pb4 returns uint32, set in LinkStatepriorityBandwidths. + Pb4() uint32 + // SetPb4 assigns uint32 provided by user to LinkStatepriorityBandwidths + SetPb4(value uint32) LinkStatepriorityBandwidths + // HasPb4 checks if Pb4 has been set in LinkStatepriorityBandwidths + HasPb4() bool + // Pb5 returns uint32, set in LinkStatepriorityBandwidths. + Pb5() uint32 + // SetPb5 assigns uint32 provided by user to LinkStatepriorityBandwidths + SetPb5(value uint32) LinkStatepriorityBandwidths + // HasPb5 checks if Pb5 has been set in LinkStatepriorityBandwidths + HasPb5() bool + // Pb6 returns uint32, set in LinkStatepriorityBandwidths. + Pb6() uint32 + // SetPb6 assigns uint32 provided by user to LinkStatepriorityBandwidths + SetPb6(value uint32) LinkStatepriorityBandwidths + // HasPb6 checks if Pb6 has been set in LinkStatepriorityBandwidths + HasPb6() bool + // Pb7 returns uint32, set in LinkStatepriorityBandwidths. + Pb7() uint32 + // SetPb7 assigns uint32 provided by user to LinkStatepriorityBandwidths + SetPb7(value uint32) LinkStatepriorityBandwidths + // HasPb7 checks if Pb7 has been set in LinkStatepriorityBandwidths + HasPb7() bool +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 0. +// Pb0 returns a uint32 +func (obj *linkStatepriorityBandwidths) Pb0() uint32 { + + return *obj.obj.Pb0 + +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 0. +// Pb0 returns a uint32 +func (obj *linkStatepriorityBandwidths) HasPb0() bool { + return obj.obj.Pb0 != nil +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 0. +// SetPb0 sets the uint32 value in the LinkStatepriorityBandwidths object +func (obj *linkStatepriorityBandwidths) SetPb0(value uint32) LinkStatepriorityBandwidths { + + obj.obj.Pb0 = &value + return obj +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 1. +// Pb1 returns a uint32 +func (obj *linkStatepriorityBandwidths) Pb1() uint32 { + + return *obj.obj.Pb1 + +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 1. +// Pb1 returns a uint32 +func (obj *linkStatepriorityBandwidths) HasPb1() bool { + return obj.obj.Pb1 != nil +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 1. +// SetPb1 sets the uint32 value in the LinkStatepriorityBandwidths object +func (obj *linkStatepriorityBandwidths) SetPb1(value uint32) LinkStatepriorityBandwidths { + + obj.obj.Pb1 = &value + return obj +} + +// Specify the amount of bandwidth that can be reserved for the Priority 2. +// Pb2 returns a uint32 +func (obj *linkStatepriorityBandwidths) Pb2() uint32 { + + return *obj.obj.Pb2 + +} + +// Specify the amount of bandwidth that can be reserved for the Priority 2. +// Pb2 returns a uint32 +func (obj *linkStatepriorityBandwidths) HasPb2() bool { + return obj.obj.Pb2 != nil +} + +// Specify the amount of bandwidth that can be reserved for the Priority 2. +// SetPb2 sets the uint32 value in the LinkStatepriorityBandwidths object +func (obj *linkStatepriorityBandwidths) SetPb2(value uint32) LinkStatepriorityBandwidths { + + obj.obj.Pb2 = &value + return obj +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 3. +// Pb3 returns a uint32 +func (obj *linkStatepriorityBandwidths) Pb3() uint32 { + + return *obj.obj.Pb3 + +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 3. +// Pb3 returns a uint32 +func (obj *linkStatepriorityBandwidths) HasPb3() bool { + return obj.obj.Pb3 != nil +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 3. +// SetPb3 sets the uint32 value in the LinkStatepriorityBandwidths object +func (obj *linkStatepriorityBandwidths) SetPb3(value uint32) LinkStatepriorityBandwidths { + + obj.obj.Pb3 = &value + return obj +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 4. +// Pb4 returns a uint32 +func (obj *linkStatepriorityBandwidths) Pb4() uint32 { + + return *obj.obj.Pb4 + +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 4. +// Pb4 returns a uint32 +func (obj *linkStatepriorityBandwidths) HasPb4() bool { + return obj.obj.Pb4 != nil +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 4. +// SetPb4 sets the uint32 value in the LinkStatepriorityBandwidths object +func (obj *linkStatepriorityBandwidths) SetPb4(value uint32) LinkStatepriorityBandwidths { + + obj.obj.Pb4 = &value + return obj +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 5. +// Pb5 returns a uint32 +func (obj *linkStatepriorityBandwidths) Pb5() uint32 { + + return *obj.obj.Pb5 + +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 5. +// Pb5 returns a uint32 +func (obj *linkStatepriorityBandwidths) HasPb5() bool { + return obj.obj.Pb5 != nil +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 5. +// SetPb5 sets the uint32 value in the LinkStatepriorityBandwidths object +func (obj *linkStatepriorityBandwidths) SetPb5(value uint32) LinkStatepriorityBandwidths { + + obj.obj.Pb5 = &value + return obj +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 6. +// Pb6 returns a uint32 +func (obj *linkStatepriorityBandwidths) Pb6() uint32 { + + return *obj.obj.Pb6 + +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 6. +// Pb6 returns a uint32 +func (obj *linkStatepriorityBandwidths) HasPb6() bool { + return obj.obj.Pb6 != nil +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 6. +// SetPb6 sets the uint32 value in the LinkStatepriorityBandwidths object +func (obj *linkStatepriorityBandwidths) SetPb6(value uint32) LinkStatepriorityBandwidths { + + obj.obj.Pb6 = &value + return obj +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 7. +// Pb7 returns a uint32 +func (obj *linkStatepriorityBandwidths) Pb7() uint32 { + + return *obj.obj.Pb7 + +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 7. +// Pb7 returns a uint32 +func (obj *linkStatepriorityBandwidths) HasPb7() bool { + return obj.obj.Pb7 != nil +} + +// Specifies the amount of bandwidth that can be reserved for the Priority 7. +// SetPb7 sets the uint32 value in the LinkStatepriorityBandwidths object +func (obj *linkStatepriorityBandwidths) SetPb7(value uint32) LinkStatepriorityBandwidths { + + obj.obj.Pb7 = &value + return obj +} + +func (obj *linkStatepriorityBandwidths) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *linkStatepriorityBandwidths) setDefault() { + if obj.obj.Pb0 == nil { + obj.SetPb0(125000000) + } + if obj.obj.Pb1 == nil { + obj.SetPb1(125000000) + } + if obj.obj.Pb2 == nil { + obj.SetPb2(125000000) + } + if obj.obj.Pb3 == nil { + obj.SetPb3(125000000) + } + if obj.obj.Pb4 == nil { + obj.SetPb4(125000000) + } + if obj.obj.Pb5 == nil { + obj.SetPb5(125000000) + } + if obj.obj.Pb6 == nil { + obj.SetPb6(125000000) + } + if obj.obj.Pb7 == nil { + obj.SetPb7(125000000) + } + +} diff --git a/gosnappi/lldp.go b/gosnappi/lldp.go new file mode 100644 index 00000000..d1e05821 --- /dev/null +++ b/gosnappi/lldp.go @@ -0,0 +1,666 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Lldp ***** +type lldp struct { + validation + obj *otg.Lldp + marshaller marshalLldp + unMarshaller unMarshalLldp + connectionHolder LldpConnection + chassisIdHolder LldpChassisId + portIdHolder LldpPortId + systemNameHolder LldpSystemName + orgInfosHolder LldpLldpOrgInfoIter +} + +func NewLldp() Lldp { + obj := lldp{obj: &otg.Lldp{}} + obj.setDefault() + return &obj +} + +func (obj *lldp) msg() *otg.Lldp { + return obj.obj +} + +func (obj *lldp) setMsg(msg *otg.Lldp) Lldp { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldp struct { + obj *lldp +} + +type marshalLldp interface { + // ToProto marshals Lldp to protobuf object *otg.Lldp + ToProto() (*otg.Lldp, error) + // ToPbText marshals Lldp to protobuf text + ToPbText() (string, error) + // ToYaml marshals Lldp to YAML text + ToYaml() (string, error) + // ToJson marshals Lldp to JSON text + ToJson() (string, error) +} + +type unMarshallldp struct { + obj *lldp +} + +type unMarshalLldp interface { + // FromProto unmarshals Lldp from protobuf object *otg.Lldp + FromProto(msg *otg.Lldp) (Lldp, error) + // FromPbText unmarshals Lldp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Lldp from YAML text + FromYaml(value string) error + // FromJson unmarshals Lldp from JSON text + FromJson(value string) error +} + +func (obj *lldp) Marshal() marshalLldp { + if obj.marshaller == nil { + obj.marshaller = &marshallldp{obj: obj} + } + return obj.marshaller +} + +func (obj *lldp) Unmarshal() unMarshalLldp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldp) ToProto() (*otg.Lldp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldp) FromProto(msg *otg.Lldp) (Lldp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldp) Clone() (Lldp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *lldp) setNil() { + obj.connectionHolder = nil + obj.chassisIdHolder = nil + obj.portIdHolder = nil + obj.systemNameHolder = nil + obj.orgInfosHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Lldp is configuration of LLDP protocol IEEE Ref: https://www.ieee802.org/1/files/public/docs2002/lldp-protocol-00.pdf +type Lldp interface { + Validation + // msg marshals Lldp to protobuf object *otg.Lldp + // and doesn't set defaults + msg() *otg.Lldp + // setMsg unmarshals Lldp from protobuf object *otg.Lldp + // and doesn't set defaults + setMsg(*otg.Lldp) Lldp + // provides marshal interface + Marshal() marshalLldp + // provides unmarshal interface + Unmarshal() unMarshalLldp + // validate validates Lldp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Lldp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Connection returns LldpConnection, set in Lldp. + // LldpConnection is lLDP connection to a test port. In future if more connection options arise LLDP connection object will be enhanced. + Connection() LldpConnection + // SetConnection assigns LldpConnection provided by user to Lldp. + // LldpConnection is lLDP connection to a test port. In future if more connection options arise LLDP connection object will be enhanced. + SetConnection(value LldpConnection) Lldp + // ChassisId returns LldpChassisId, set in Lldp. + // LldpChassisId is the Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. This field identifies the format and source of the chassis identifier string. It is based on the enumerator defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. + ChassisId() LldpChassisId + // SetChassisId assigns LldpChassisId provided by user to Lldp. + // LldpChassisId is the Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. This field identifies the format and source of the chassis identifier string. It is based on the enumerator defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. + SetChassisId(value LldpChassisId) Lldp + // HasChassisId checks if ChassisId has been set in Lldp + HasChassisId() bool + // PortId returns LldpPortId, set in Lldp. + // LldpPortId is the Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent.This field identifies the format and source of the port identifier string. It is based on the enumerator defined by the PtopoPortIdType object from RFC2922. + PortId() LldpPortId + // SetPortId assigns LldpPortId provided by user to Lldp. + // LldpPortId is the Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent.This field identifies the format and source of the port identifier string. It is based on the enumerator defined by the PtopoPortIdType object from RFC2922. + SetPortId(value LldpPortId) Lldp + // HasPortId checks if PortId has been set in Lldp + HasPortId() bool + // SystemName returns LldpSystemName, set in Lldp. + // LldpSystemName is the system Name configured in the System Name TLV. + SystemName() LldpSystemName + // SetSystemName assigns LldpSystemName provided by user to Lldp. + // LldpSystemName is the system Name configured in the System Name TLV. + SetSystemName(value LldpSystemName) Lldp + // HasSystemName checks if SystemName has been set in Lldp + HasSystemName() bool + // HoldTime returns uint32, set in Lldp. + HoldTime() uint32 + // SetHoldTime assigns uint32 provided by user to Lldp + SetHoldTime(value uint32) Lldp + // HasHoldTime checks if HoldTime has been set in Lldp + HasHoldTime() bool + // AdvertisementInterval returns uint32, set in Lldp. + AdvertisementInterval() uint32 + // SetAdvertisementInterval assigns uint32 provided by user to Lldp + SetAdvertisementInterval(value uint32) Lldp + // HasAdvertisementInterval checks if AdvertisementInterval has been set in Lldp + HasAdvertisementInterval() bool + // Name returns string, set in Lldp. + Name() string + // SetName assigns string provided by user to Lldp + SetName(value string) Lldp + // OrgInfos returns LldpLldpOrgInfoIterIter, set in Lldp + OrgInfos() LldpLldpOrgInfoIter + setNil() +} + +// The unique name of the object on which LLDP is running. +// Connection returns a LldpConnection +func (obj *lldp) Connection() LldpConnection { + if obj.obj.Connection == nil { + obj.obj.Connection = NewLldpConnection().msg() + } + if obj.connectionHolder == nil { + obj.connectionHolder = &lldpConnection{obj: obj.obj.Connection} + } + return obj.connectionHolder +} + +// The unique name of the object on which LLDP is running. +// SetConnection sets the LldpConnection value in the Lldp object +func (obj *lldp) SetConnection(value LldpConnection) Lldp { + + obj.connectionHolder = nil + obj.obj.Connection = value.msg() + + return obj +} + +// The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. If mac address is specified it should be in colon seperated mac address format. +// ChassisId returns a LldpChassisId +func (obj *lldp) ChassisId() LldpChassisId { + if obj.obj.ChassisId == nil { + obj.obj.ChassisId = NewLldpChassisId().msg() + } + if obj.chassisIdHolder == nil { + obj.chassisIdHolder = &lldpChassisId{obj: obj.obj.ChassisId} + } + return obj.chassisIdHolder +} + +// The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. If mac address is specified it should be in colon seperated mac address format. +// ChassisId returns a LldpChassisId +func (obj *lldp) HasChassisId() bool { + return obj.obj.ChassisId != nil +} + +// The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. If mac address is specified it should be in colon seperated mac address format. +// SetChassisId sets the LldpChassisId value in the Lldp object +func (obj *lldp) SetChassisId(value LldpChassisId) Lldp { + + obj.chassisIdHolder = nil + obj.obj.ChassisId = value.msg() + + return obj +} + +// The Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater port, then this TLV is optional. +// PortId returns a LldpPortId +func (obj *lldp) PortId() LldpPortId { + if obj.obj.PortId == nil { + obj.obj.PortId = NewLldpPortId().msg() + } + if obj.portIdHolder == nil { + obj.portIdHolder = &lldpPortId{obj: obj.obj.PortId} + } + return obj.portIdHolder +} + +// The Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater port, then this TLV is optional. +// PortId returns a LldpPortId +func (obj *lldp) HasPortId() bool { + return obj.obj.PortId != nil +} + +// The Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater port, then this TLV is optional. +// SetPortId sets the LldpPortId value in the Lldp object +func (obj *lldp) SetPortId(value LldpPortId) Lldp { + + obj.portIdHolder = nil + obj.obj.PortId = value.msg() + + return obj +} + +// The system name field shall contain an alpha-numeric string that indicates the system's administratively assigned name. The system name should be the system's fully qualified domain name. If implementations support IETF RFC 3418, the sysName object should be used for this field. +// SystemName returns a LldpSystemName +func (obj *lldp) SystemName() LldpSystemName { + if obj.obj.SystemName == nil { + obj.obj.SystemName = NewLldpSystemName().msg() + } + if obj.systemNameHolder == nil { + obj.systemNameHolder = &lldpSystemName{obj: obj.obj.SystemName} + } + return obj.systemNameHolder +} + +// The system name field shall contain an alpha-numeric string that indicates the system's administratively assigned name. The system name should be the system's fully qualified domain name. If implementations support IETF RFC 3418, the sysName object should be used for this field. +// SystemName returns a LldpSystemName +func (obj *lldp) HasSystemName() bool { + return obj.obj.SystemName != nil +} + +// The system name field shall contain an alpha-numeric string that indicates the system's administratively assigned name. The system name should be the system's fully qualified domain name. If implementations support IETF RFC 3418, the sysName object should be used for this field. +// SetSystemName sets the LldpSystemName value in the Lldp object +func (obj *lldp) SetSystemName(value LldpSystemName) Lldp { + + obj.systemNameHolder = nil + obj.obj.SystemName = value.msg() + + return obj +} + +// Specifies the amount of time in seconds a receiving device should maintain LLDP information sent by the device before discarding it. +// HoldTime returns a uint32 +func (obj *lldp) HoldTime() uint32 { + + return *obj.obj.HoldTime + +} + +// Specifies the amount of time in seconds a receiving device should maintain LLDP information sent by the device before discarding it. +// HoldTime returns a uint32 +func (obj *lldp) HasHoldTime() bool { + return obj.obj.HoldTime != nil +} + +// Specifies the amount of time in seconds a receiving device should maintain LLDP information sent by the device before discarding it. +// SetHoldTime sets the uint32 value in the Lldp object +func (obj *lldp) SetHoldTime(value uint32) Lldp { + + obj.obj.HoldTime = &value + return obj +} + +// Set the transmission frequency of LLDP updates in seconds. +// AdvertisementInterval returns a uint32 +func (obj *lldp) AdvertisementInterval() uint32 { + + return *obj.obj.AdvertisementInterval + +} + +// Set the transmission frequency of LLDP updates in seconds. +// AdvertisementInterval returns a uint32 +func (obj *lldp) HasAdvertisementInterval() bool { + return obj.obj.AdvertisementInterval != nil +} + +// Set the transmission frequency of LLDP updates in seconds. +// SetAdvertisementInterval sets the uint32 value in the Lldp object +func (obj *lldp) SetAdvertisementInterval(value uint32) Lldp { + + obj.obj.AdvertisementInterval = &value + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *lldp) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the Lldp object +func (obj *lldp) SetName(value string) Lldp { + + obj.obj.Name = &value + return obj +} + +// The Organization Information is used to define the organization specific TLVs. The organization specific TLV is defined in IEEE 802.1AB-2016 specification. This category is provided to allow different organizations, such as IEEE 802.1, IEEE 802.3, IETF, as well as individual software and equipment vendors, to define TLVs that advertise information to remote entities attached to the same media. +// OrgInfos returns a []LldpOrgInfo +func (obj *lldp) OrgInfos() LldpLldpOrgInfoIter { + if len(obj.obj.OrgInfos) == 0 { + obj.obj.OrgInfos = []*otg.LldpOrgInfo{} + } + if obj.orgInfosHolder == nil { + obj.orgInfosHolder = newLldpLldpOrgInfoIter(&obj.obj.OrgInfos).setMsg(obj) + } + return obj.orgInfosHolder +} + +type lldpLldpOrgInfoIter struct { + obj *lldp + lldpOrgInfoSlice []LldpOrgInfo + fieldPtr *[]*otg.LldpOrgInfo +} + +func newLldpLldpOrgInfoIter(ptr *[]*otg.LldpOrgInfo) LldpLldpOrgInfoIter { + return &lldpLldpOrgInfoIter{fieldPtr: ptr} +} + +type LldpLldpOrgInfoIter interface { + setMsg(*lldp) LldpLldpOrgInfoIter + Items() []LldpOrgInfo + Add() LldpOrgInfo + Append(items ...LldpOrgInfo) LldpLldpOrgInfoIter + Set(index int, newObj LldpOrgInfo) LldpLldpOrgInfoIter + Clear() LldpLldpOrgInfoIter + clearHolderSlice() LldpLldpOrgInfoIter + appendHolderSlice(item LldpOrgInfo) LldpLldpOrgInfoIter +} + +func (obj *lldpLldpOrgInfoIter) setMsg(msg *lldp) LldpLldpOrgInfoIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&lldpOrgInfo{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *lldpLldpOrgInfoIter) Items() []LldpOrgInfo { + return obj.lldpOrgInfoSlice +} + +func (obj *lldpLldpOrgInfoIter) Add() LldpOrgInfo { + newObj := &otg.LldpOrgInfo{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &lldpOrgInfo{obj: newObj} + newLibObj.setDefault() + obj.lldpOrgInfoSlice = append(obj.lldpOrgInfoSlice, newLibObj) + return newLibObj +} + +func (obj *lldpLldpOrgInfoIter) Append(items ...LldpOrgInfo) LldpLldpOrgInfoIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.lldpOrgInfoSlice = append(obj.lldpOrgInfoSlice, item) + } + return obj +} + +func (obj *lldpLldpOrgInfoIter) Set(index int, newObj LldpOrgInfo) LldpLldpOrgInfoIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.lldpOrgInfoSlice[index] = newObj + return obj +} +func (obj *lldpLldpOrgInfoIter) Clear() LldpLldpOrgInfoIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.LldpOrgInfo{} + obj.lldpOrgInfoSlice = []LldpOrgInfo{} + } + return obj +} +func (obj *lldpLldpOrgInfoIter) clearHolderSlice() LldpLldpOrgInfoIter { + if len(obj.lldpOrgInfoSlice) > 0 { + obj.lldpOrgInfoSlice = []LldpOrgInfo{} + } + return obj +} +func (obj *lldpLldpOrgInfoIter) appendHolderSlice(item LldpOrgInfo) LldpLldpOrgInfoIter { + obj.lldpOrgInfoSlice = append(obj.lldpOrgInfoSlice, item) + return obj +} + +func (obj *lldp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Connection is required + if obj.obj.Connection == nil { + vObj.validationErrors = append(vObj.validationErrors, "Connection is required field on interface Lldp") + } + + if obj.obj.Connection != nil { + + obj.Connection().validateObj(vObj, set_default) + } + + if obj.obj.ChassisId != nil { + + obj.ChassisId().validateObj(vObj, set_default) + } + + if obj.obj.PortId != nil { + + obj.PortId().validateObj(vObj, set_default) + } + + if obj.obj.SystemName != nil { + + obj.SystemName().validateObj(vObj, set_default) + } + + if obj.obj.HoldTime != nil { + + if *obj.obj.HoldTime < 10 || *obj.obj.HoldTime > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("10 <= Lldp.HoldTime <= 65535 but Got %d", *obj.obj.HoldTime)) + } + + } + + if obj.obj.AdvertisementInterval != nil { + + if *obj.obj.AdvertisementInterval < 5 || *obj.obj.AdvertisementInterval > 65534 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("5 <= Lldp.AdvertisementInterval <= 65534 but Got %d", *obj.obj.AdvertisementInterval)) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface Lldp") + } + + if len(obj.obj.OrgInfos) != 0 { + + if set_default { + obj.OrgInfos().clearHolderSlice() + for _, item := range obj.obj.OrgInfos { + obj.OrgInfos().appendHolderSlice(&lldpOrgInfo{obj: item}) + } + } + for _, item := range obj.OrgInfos().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *lldp) setDefault() { + if obj.obj.HoldTime == nil { + obj.SetHoldTime(120) + } + if obj.obj.AdvertisementInterval == nil { + obj.SetAdvertisementInterval(30) + } + +} diff --git a/gosnappi/lldp_capability_state.go b/gosnappi/lldp_capability_state.go new file mode 100644 index 00000000..3bf844fb --- /dev/null +++ b/gosnappi/lldp_capability_state.go @@ -0,0 +1,364 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LldpCapabilityState ***** +type lldpCapabilityState struct { + validation + obj *otg.LldpCapabilityState + marshaller marshalLldpCapabilityState + unMarshaller unMarshalLldpCapabilityState +} + +func NewLldpCapabilityState() LldpCapabilityState { + obj := lldpCapabilityState{obj: &otg.LldpCapabilityState{}} + obj.setDefault() + return &obj +} + +func (obj *lldpCapabilityState) msg() *otg.LldpCapabilityState { + return obj.obj +} + +func (obj *lldpCapabilityState) setMsg(msg *otg.LldpCapabilityState) LldpCapabilityState { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldpCapabilityState struct { + obj *lldpCapabilityState +} + +type marshalLldpCapabilityState interface { + // ToProto marshals LldpCapabilityState to protobuf object *otg.LldpCapabilityState + ToProto() (*otg.LldpCapabilityState, error) + // ToPbText marshals LldpCapabilityState to protobuf text + ToPbText() (string, error) + // ToYaml marshals LldpCapabilityState to YAML text + ToYaml() (string, error) + // ToJson marshals LldpCapabilityState to JSON text + ToJson() (string, error) +} + +type unMarshallldpCapabilityState struct { + obj *lldpCapabilityState +} + +type unMarshalLldpCapabilityState interface { + // FromProto unmarshals LldpCapabilityState from protobuf object *otg.LldpCapabilityState + FromProto(msg *otg.LldpCapabilityState) (LldpCapabilityState, error) + // FromPbText unmarshals LldpCapabilityState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LldpCapabilityState from YAML text + FromYaml(value string) error + // FromJson unmarshals LldpCapabilityState from JSON text + FromJson(value string) error +} + +func (obj *lldpCapabilityState) Marshal() marshalLldpCapabilityState { + if obj.marshaller == nil { + obj.marshaller = &marshallldpCapabilityState{obj: obj} + } + return obj.marshaller +} + +func (obj *lldpCapabilityState) Unmarshal() unMarshalLldpCapabilityState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldpCapabilityState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldpCapabilityState) ToProto() (*otg.LldpCapabilityState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldpCapabilityState) FromProto(msg *otg.LldpCapabilityState) (LldpCapabilityState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldpCapabilityState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldpCapabilityState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldpCapabilityState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpCapabilityState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldpCapabilityState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpCapabilityState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldpCapabilityState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldpCapabilityState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldpCapabilityState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldpCapabilityState) Clone() (LldpCapabilityState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldpCapabilityState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LldpCapabilityState is lLDP system capability advertised by the neighbor +type LldpCapabilityState interface { + Validation + // msg marshals LldpCapabilityState to protobuf object *otg.LldpCapabilityState + // and doesn't set defaults + msg() *otg.LldpCapabilityState + // setMsg unmarshals LldpCapabilityState from protobuf object *otg.LldpCapabilityState + // and doesn't set defaults + setMsg(*otg.LldpCapabilityState) LldpCapabilityState + // provides marshal interface + Marshal() marshalLldpCapabilityState + // provides unmarshal interface + Unmarshal() unMarshalLldpCapabilityState + // validate validates LldpCapabilityState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LldpCapabilityState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // CapabilityName returns LldpCapabilityStateCapabilityNameEnum, set in LldpCapabilityState + CapabilityName() LldpCapabilityStateCapabilityNameEnum + // SetCapabilityName assigns LldpCapabilityStateCapabilityNameEnum provided by user to LldpCapabilityState + SetCapabilityName(value LldpCapabilityStateCapabilityNameEnum) LldpCapabilityState + // HasCapabilityName checks if CapabilityName has been set in LldpCapabilityState + HasCapabilityName() bool + // CapabilityEnabled returns bool, set in LldpCapabilityState. + CapabilityEnabled() bool + // SetCapabilityEnabled assigns bool provided by user to LldpCapabilityState + SetCapabilityEnabled(value bool) LldpCapabilityState + // HasCapabilityEnabled checks if CapabilityEnabled has been set in LldpCapabilityState + HasCapabilityEnabled() bool +} + +type LldpCapabilityStateCapabilityNameEnum string + +// Enum of CapabilityName on LldpCapabilityState +var LldpCapabilityStateCapabilityName = struct { + MAC_BRIDGE LldpCapabilityStateCapabilityNameEnum + TWO_PORT_MAC_RELAY LldpCapabilityStateCapabilityNameEnum + REPEATER LldpCapabilityStateCapabilityNameEnum + DOCSIS_CABLE_DEVICE LldpCapabilityStateCapabilityNameEnum + S_VLAN LldpCapabilityStateCapabilityNameEnum + TELEPHONE LldpCapabilityStateCapabilityNameEnum + OTHER LldpCapabilityStateCapabilityNameEnum + ROUTER LldpCapabilityStateCapabilityNameEnum + C_VLAN LldpCapabilityStateCapabilityNameEnum + STATION_ONLY LldpCapabilityStateCapabilityNameEnum + WLAN_ACCESS_POINT LldpCapabilityStateCapabilityNameEnum +}{ + MAC_BRIDGE: LldpCapabilityStateCapabilityNameEnum("mac_bridge"), + TWO_PORT_MAC_RELAY: LldpCapabilityStateCapabilityNameEnum("two_port_mac_relay"), + REPEATER: LldpCapabilityStateCapabilityNameEnum("repeater"), + DOCSIS_CABLE_DEVICE: LldpCapabilityStateCapabilityNameEnum("docsis_cable_device"), + S_VLAN: LldpCapabilityStateCapabilityNameEnum("s_vlan"), + TELEPHONE: LldpCapabilityStateCapabilityNameEnum("telephone"), + OTHER: LldpCapabilityStateCapabilityNameEnum("other"), + ROUTER: LldpCapabilityStateCapabilityNameEnum("router"), + C_VLAN: LldpCapabilityStateCapabilityNameEnum("c_vlan"), + STATION_ONLY: LldpCapabilityStateCapabilityNameEnum("station_only"), + WLAN_ACCESS_POINT: LldpCapabilityStateCapabilityNameEnum("wlan_access_point"), +} + +func (obj *lldpCapabilityState) CapabilityName() LldpCapabilityStateCapabilityNameEnum { + return LldpCapabilityStateCapabilityNameEnum(obj.obj.CapabilityName.Enum().String()) +} + +// Name of the system capability advertised by the neighbor. Capabilities are represented in a bitmap that defines the primary functions of the system. The capabilities are defined in IEEE 802.1AB. +// CapabilityName returns a string +func (obj *lldpCapabilityState) HasCapabilityName() bool { + return obj.obj.CapabilityName != nil +} + +func (obj *lldpCapabilityState) SetCapabilityName(value LldpCapabilityStateCapabilityNameEnum) LldpCapabilityState { + intValue, ok := otg.LldpCapabilityState_CapabilityName_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LldpCapabilityStateCapabilityNameEnum", string(value))) + return obj + } + enumValue := otg.LldpCapabilityState_CapabilityName_Enum(intValue) + obj.obj.CapabilityName = &enumValue + + return obj +} + +// Indicates whether the corresponding system capability is enabled on the neighbor. +// CapabilityEnabled returns a bool +func (obj *lldpCapabilityState) CapabilityEnabled() bool { + + return *obj.obj.CapabilityEnabled + +} + +// Indicates whether the corresponding system capability is enabled on the neighbor. +// CapabilityEnabled returns a bool +func (obj *lldpCapabilityState) HasCapabilityEnabled() bool { + return obj.obj.CapabilityEnabled != nil +} + +// Indicates whether the corresponding system capability is enabled on the neighbor. +// SetCapabilityEnabled sets the bool value in the LldpCapabilityState object +func (obj *lldpCapabilityState) SetCapabilityEnabled(value bool) LldpCapabilityState { + + obj.obj.CapabilityEnabled = &value + return obj +} + +func (obj *lldpCapabilityState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *lldpCapabilityState) setDefault() { + +} diff --git a/gosnappi/lldp_chassis_id.go b/gosnappi/lldp_chassis_id.go new file mode 100644 index 00000000..6a3b37ab --- /dev/null +++ b/gosnappi/lldp_chassis_id.go @@ -0,0 +1,476 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LldpChassisId ***** +type lldpChassisId struct { + validation + obj *otg.LldpChassisId + marshaller marshalLldpChassisId + unMarshaller unMarshalLldpChassisId + macAddressSubtypeHolder LldpChassisMacSubType +} + +func NewLldpChassisId() LldpChassisId { + obj := lldpChassisId{obj: &otg.LldpChassisId{}} + obj.setDefault() + return &obj +} + +func (obj *lldpChassisId) msg() *otg.LldpChassisId { + return obj.obj +} + +func (obj *lldpChassisId) setMsg(msg *otg.LldpChassisId) LldpChassisId { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldpChassisId struct { + obj *lldpChassisId +} + +type marshalLldpChassisId interface { + // ToProto marshals LldpChassisId to protobuf object *otg.LldpChassisId + ToProto() (*otg.LldpChassisId, error) + // ToPbText marshals LldpChassisId to protobuf text + ToPbText() (string, error) + // ToYaml marshals LldpChassisId to YAML text + ToYaml() (string, error) + // ToJson marshals LldpChassisId to JSON text + ToJson() (string, error) +} + +type unMarshallldpChassisId struct { + obj *lldpChassisId +} + +type unMarshalLldpChassisId interface { + // FromProto unmarshals LldpChassisId from protobuf object *otg.LldpChassisId + FromProto(msg *otg.LldpChassisId) (LldpChassisId, error) + // FromPbText unmarshals LldpChassisId from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LldpChassisId from YAML text + FromYaml(value string) error + // FromJson unmarshals LldpChassisId from JSON text + FromJson(value string) error +} + +func (obj *lldpChassisId) Marshal() marshalLldpChassisId { + if obj.marshaller == nil { + obj.marshaller = &marshallldpChassisId{obj: obj} + } + return obj.marshaller +} + +func (obj *lldpChassisId) Unmarshal() unMarshalLldpChassisId { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldpChassisId{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldpChassisId) ToProto() (*otg.LldpChassisId, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldpChassisId) FromProto(msg *otg.LldpChassisId) (LldpChassisId, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldpChassisId) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldpChassisId) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldpChassisId) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpChassisId) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldpChassisId) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpChassisId) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldpChassisId) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldpChassisId) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldpChassisId) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldpChassisId) Clone() (LldpChassisId, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldpChassisId() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *lldpChassisId) setNil() { + obj.macAddressSubtypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// LldpChassisId is the Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. This field identifies the format and source of the chassis identifier string. It is based on the enumerator defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. +type LldpChassisId interface { + Validation + // msg marshals LldpChassisId to protobuf object *otg.LldpChassisId + // and doesn't set defaults + msg() *otg.LldpChassisId + // setMsg unmarshals LldpChassisId from protobuf object *otg.LldpChassisId + // and doesn't set defaults + setMsg(*otg.LldpChassisId) LldpChassisId + // provides marshal interface + Marshal() marshalLldpChassisId + // provides unmarshal interface + Unmarshal() unMarshalLldpChassisId + // validate validates LldpChassisId + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LldpChassisId, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns LldpChassisIdChoiceEnum, set in LldpChassisId + Choice() LldpChassisIdChoiceEnum + // setChoice assigns LldpChassisIdChoiceEnum provided by user to LldpChassisId + setChoice(value LldpChassisIdChoiceEnum) LldpChassisId + // HasChoice checks if Choice has been set in LldpChassisId + HasChoice() bool + // MacAddressSubtype returns LldpChassisMacSubType, set in LldpChassisId. + // LldpChassisMacSubType is the MAC address configured in the Chassis ID TLV. + MacAddressSubtype() LldpChassisMacSubType + // SetMacAddressSubtype assigns LldpChassisMacSubType provided by user to LldpChassisId. + // LldpChassisMacSubType is the MAC address configured in the Chassis ID TLV. + SetMacAddressSubtype(value LldpChassisMacSubType) LldpChassisId + // HasMacAddressSubtype checks if MacAddressSubtype has been set in LldpChassisId + HasMacAddressSubtype() bool + // InterfaceNameSubtype returns string, set in LldpChassisId. + InterfaceNameSubtype() string + // SetInterfaceNameSubtype assigns string provided by user to LldpChassisId + SetInterfaceNameSubtype(value string) LldpChassisId + // HasInterfaceNameSubtype checks if InterfaceNameSubtype has been set in LldpChassisId + HasInterfaceNameSubtype() bool + // LocalSubtype returns string, set in LldpChassisId. + LocalSubtype() string + // SetLocalSubtype assigns string provided by user to LldpChassisId + SetLocalSubtype(value string) LldpChassisId + // HasLocalSubtype checks if LocalSubtype has been set in LldpChassisId + HasLocalSubtype() bool + setNil() +} + +type LldpChassisIdChoiceEnum string + +// Enum of Choice on LldpChassisId +var LldpChassisIdChoice = struct { + MAC_ADDRESS_SUBTYPE LldpChassisIdChoiceEnum + INTERFACE_NAME_SUBTYPE LldpChassisIdChoiceEnum + LOCAL_SUBTYPE LldpChassisIdChoiceEnum +}{ + MAC_ADDRESS_SUBTYPE: LldpChassisIdChoiceEnum("mac_address_subtype"), + INTERFACE_NAME_SUBTYPE: LldpChassisIdChoiceEnum("interface_name_subtype"), + LOCAL_SUBTYPE: LldpChassisIdChoiceEnum("local_subtype"), +} + +func (obj *lldpChassisId) Choice() LldpChassisIdChoiceEnum { + return LldpChassisIdChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// Chassis ID subtype to be used in Chassis ID TLV. +// Choice returns a string +func (obj *lldpChassisId) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *lldpChassisId) setChoice(value LldpChassisIdChoiceEnum) LldpChassisId { + intValue, ok := otg.LldpChassisId_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LldpChassisIdChoiceEnum", string(value))) + return obj + } + enumValue := otg.LldpChassisId_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.LocalSubtype = nil + obj.obj.InterfaceNameSubtype = nil + obj.obj.MacAddressSubtype = nil + obj.macAddressSubtypeHolder = nil + + if value == LldpChassisIdChoice.MAC_ADDRESS_SUBTYPE { + obj.obj.MacAddressSubtype = NewLldpChassisMacSubType().msg() + } + + return obj +} + +// description is TBD +// MacAddressSubtype returns a LldpChassisMacSubType +func (obj *lldpChassisId) MacAddressSubtype() LldpChassisMacSubType { + if obj.obj.MacAddressSubtype == nil { + obj.setChoice(LldpChassisIdChoice.MAC_ADDRESS_SUBTYPE) + } + if obj.macAddressSubtypeHolder == nil { + obj.macAddressSubtypeHolder = &lldpChassisMacSubType{obj: obj.obj.MacAddressSubtype} + } + return obj.macAddressSubtypeHolder +} + +// description is TBD +// MacAddressSubtype returns a LldpChassisMacSubType +func (obj *lldpChassisId) HasMacAddressSubtype() bool { + return obj.obj.MacAddressSubtype != nil +} + +// description is TBD +// SetMacAddressSubtype sets the LldpChassisMacSubType value in the LldpChassisId object +func (obj *lldpChassisId) SetMacAddressSubtype(value LldpChassisMacSubType) LldpChassisId { + obj.setChoice(LldpChassisIdChoice.MAC_ADDRESS_SUBTYPE) + obj.macAddressSubtypeHolder = nil + obj.obj.MacAddressSubtype = value.msg() + + return obj +} + +// Name of an interface of the chassis that uniquely identifies the chassis. +// InterfaceNameSubtype returns a string +func (obj *lldpChassisId) InterfaceNameSubtype() string { + + if obj.obj.InterfaceNameSubtype == nil { + obj.setChoice(LldpChassisIdChoice.INTERFACE_NAME_SUBTYPE) + } + + return *obj.obj.InterfaceNameSubtype + +} + +// Name of an interface of the chassis that uniquely identifies the chassis. +// InterfaceNameSubtype returns a string +func (obj *lldpChassisId) HasInterfaceNameSubtype() bool { + return obj.obj.InterfaceNameSubtype != nil +} + +// Name of an interface of the chassis that uniquely identifies the chassis. +// SetInterfaceNameSubtype sets the string value in the LldpChassisId object +func (obj *lldpChassisId) SetInterfaceNameSubtype(value string) LldpChassisId { + obj.setChoice(LldpChassisIdChoice.INTERFACE_NAME_SUBTYPE) + obj.obj.InterfaceNameSubtype = &value + return obj +} + +// Locally assigned name of the chassis. +// LocalSubtype returns a string +func (obj *lldpChassisId) LocalSubtype() string { + + if obj.obj.LocalSubtype == nil { + obj.setChoice(LldpChassisIdChoice.LOCAL_SUBTYPE) + } + + return *obj.obj.LocalSubtype + +} + +// Locally assigned name of the chassis. +// LocalSubtype returns a string +func (obj *lldpChassisId) HasLocalSubtype() bool { + return obj.obj.LocalSubtype != nil +} + +// Locally assigned name of the chassis. +// SetLocalSubtype sets the string value in the LldpChassisId object +func (obj *lldpChassisId) SetLocalSubtype(value string) LldpChassisId { + obj.setChoice(LldpChassisIdChoice.LOCAL_SUBTYPE) + obj.obj.LocalSubtype = &value + return obj +} + +func (obj *lldpChassisId) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.MacAddressSubtype != nil { + + obj.MacAddressSubtype().validateObj(vObj, set_default) + } + +} + +func (obj *lldpChassisId) setDefault() { + var choices_set int = 0 + var choice LldpChassisIdChoiceEnum + + if obj.obj.MacAddressSubtype != nil { + choices_set += 1 + choice = LldpChassisIdChoice.MAC_ADDRESS_SUBTYPE + } + + if obj.obj.InterfaceNameSubtype != nil { + choices_set += 1 + choice = LldpChassisIdChoice.INTERFACE_NAME_SUBTYPE + } + + if obj.obj.LocalSubtype != nil { + choices_set += 1 + choice = LldpChassisIdChoice.LOCAL_SUBTYPE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(LldpChassisIdChoice.MAC_ADDRESS_SUBTYPE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in LldpChassisId") + } + } else { + intVal := otg.LldpChassisId_Choice_Enum_value[string(choice)] + enumValue := otg.LldpChassisId_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/lldp_chassis_mac_sub_type.go b/gosnappi/lldp_chassis_mac_sub_type.go new file mode 100644 index 00000000..34e5af08 --- /dev/null +++ b/gosnappi/lldp_chassis_mac_sub_type.go @@ -0,0 +1,420 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LldpChassisMacSubType ***** +type lldpChassisMacSubType struct { + validation + obj *otg.LldpChassisMacSubType + marshaller marshalLldpChassisMacSubType + unMarshaller unMarshalLldpChassisMacSubType +} + +func NewLldpChassisMacSubType() LldpChassisMacSubType { + obj := lldpChassisMacSubType{obj: &otg.LldpChassisMacSubType{}} + obj.setDefault() + return &obj +} + +func (obj *lldpChassisMacSubType) msg() *otg.LldpChassisMacSubType { + return obj.obj +} + +func (obj *lldpChassisMacSubType) setMsg(msg *otg.LldpChassisMacSubType) LldpChassisMacSubType { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldpChassisMacSubType struct { + obj *lldpChassisMacSubType +} + +type marshalLldpChassisMacSubType interface { + // ToProto marshals LldpChassisMacSubType to protobuf object *otg.LldpChassisMacSubType + ToProto() (*otg.LldpChassisMacSubType, error) + // ToPbText marshals LldpChassisMacSubType to protobuf text + ToPbText() (string, error) + // ToYaml marshals LldpChassisMacSubType to YAML text + ToYaml() (string, error) + // ToJson marshals LldpChassisMacSubType to JSON text + ToJson() (string, error) +} + +type unMarshallldpChassisMacSubType struct { + obj *lldpChassisMacSubType +} + +type unMarshalLldpChassisMacSubType interface { + // FromProto unmarshals LldpChassisMacSubType from protobuf object *otg.LldpChassisMacSubType + FromProto(msg *otg.LldpChassisMacSubType) (LldpChassisMacSubType, error) + // FromPbText unmarshals LldpChassisMacSubType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LldpChassisMacSubType from YAML text + FromYaml(value string) error + // FromJson unmarshals LldpChassisMacSubType from JSON text + FromJson(value string) error +} + +func (obj *lldpChassisMacSubType) Marshal() marshalLldpChassisMacSubType { + if obj.marshaller == nil { + obj.marshaller = &marshallldpChassisMacSubType{obj: obj} + } + return obj.marshaller +} + +func (obj *lldpChassisMacSubType) Unmarshal() unMarshalLldpChassisMacSubType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldpChassisMacSubType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldpChassisMacSubType) ToProto() (*otg.LldpChassisMacSubType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldpChassisMacSubType) FromProto(msg *otg.LldpChassisMacSubType) (LldpChassisMacSubType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldpChassisMacSubType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldpChassisMacSubType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldpChassisMacSubType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpChassisMacSubType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldpChassisMacSubType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpChassisMacSubType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldpChassisMacSubType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldpChassisMacSubType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldpChassisMacSubType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldpChassisMacSubType) Clone() (LldpChassisMacSubType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldpChassisMacSubType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LldpChassisMacSubType is the MAC address configured in the Chassis ID TLV. +type LldpChassisMacSubType interface { + Validation + // msg marshals LldpChassisMacSubType to protobuf object *otg.LldpChassisMacSubType + // and doesn't set defaults + msg() *otg.LldpChassisMacSubType + // setMsg unmarshals LldpChassisMacSubType from protobuf object *otg.LldpChassisMacSubType + // and doesn't set defaults + setMsg(*otg.LldpChassisMacSubType) LldpChassisMacSubType + // provides marshal interface + Marshal() marshalLldpChassisMacSubType + // provides unmarshal interface + Unmarshal() unMarshalLldpChassisMacSubType + // validate validates LldpChassisMacSubType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LldpChassisMacSubType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns LldpChassisMacSubTypeChoiceEnum, set in LldpChassisMacSubType + Choice() LldpChassisMacSubTypeChoiceEnum + // setChoice assigns LldpChassisMacSubTypeChoiceEnum provided by user to LldpChassisMacSubType + setChoice(value LldpChassisMacSubTypeChoiceEnum) LldpChassisMacSubType + // HasChoice checks if Choice has been set in LldpChassisMacSubType + HasChoice() bool + // Auto returns string, set in LldpChassisMacSubType. + Auto() string + // HasAuto checks if Auto has been set in LldpChassisMacSubType + HasAuto() bool + // Value returns string, set in LldpChassisMacSubType. + Value() string + // SetValue assigns string provided by user to LldpChassisMacSubType + SetValue(value string) LldpChassisMacSubType + // HasValue checks if Value has been set in LldpChassisMacSubType + HasValue() bool +} + +type LldpChassisMacSubTypeChoiceEnum string + +// Enum of Choice on LldpChassisMacSubType +var LldpChassisMacSubTypeChoice = struct { + AUTO LldpChassisMacSubTypeChoiceEnum + VALUE LldpChassisMacSubTypeChoiceEnum +}{ + AUTO: LldpChassisMacSubTypeChoiceEnum("auto"), + VALUE: LldpChassisMacSubTypeChoiceEnum("value"), +} + +func (obj *lldpChassisMacSubType) Choice() LldpChassisMacSubTypeChoiceEnum { + return LldpChassisMacSubTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// In auto mode the system generated value is set for this property, while if the choice is selected as value, a user configured value will be used for this property. +// Choice returns a string +func (obj *lldpChassisMacSubType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *lldpChassisMacSubType) setChoice(value LldpChassisMacSubTypeChoiceEnum) LldpChassisMacSubType { + intValue, ok := otg.LldpChassisMacSubType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LldpChassisMacSubTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.LldpChassisMacSubType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Value = nil + obj.obj.Auto = nil + return obj +} + +// The OTG implementation must provide a system generated value for this property. +// Auto returns a string +func (obj *lldpChassisMacSubType) Auto() string { + + if obj.obj.Auto == nil { + obj.setChoice(LldpChassisMacSubTypeChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation must provide a system generated value for this property. +// Auto returns a string +func (obj *lldpChassisMacSubType) HasAuto() bool { + return obj.obj.Auto != nil +} + +// User must specify a value if mode is not auto. +// Value returns a string +func (obj *lldpChassisMacSubType) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(LldpChassisMacSubTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// User must specify a value if mode is not auto. +// Value returns a string +func (obj *lldpChassisMacSubType) HasValue() bool { + return obj.obj.Value != nil +} + +// User must specify a value if mode is not auto. +// SetValue sets the string value in the LldpChassisMacSubType object +func (obj *lldpChassisMacSubType) SetValue(value string) LldpChassisMacSubType { + obj.setChoice(LldpChassisMacSubTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +func (obj *lldpChassisMacSubType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Auto != nil { + + err := obj.validateMac(obj.Auto()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on LldpChassisMacSubType.Auto")) + } + + } + + if obj.obj.Value != nil { + + err := obj.validateMac(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on LldpChassisMacSubType.Value")) + } + + } + +} + +func (obj *lldpChassisMacSubType) setDefault() { + var choices_set int = 0 + var choice LldpChassisMacSubTypeChoiceEnum + + if obj.obj.Auto != nil { + choices_set += 1 + choice = LldpChassisMacSubTypeChoice.AUTO + } + + if obj.obj.Value != nil { + choices_set += 1 + choice = LldpChassisMacSubTypeChoice.VALUE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(LldpChassisMacSubTypeChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in LldpChassisMacSubType") + } + } else { + intVal := otg.LldpChassisMacSubType_Choice_Enum_value[string(choice)] + enumValue := otg.LldpChassisMacSubType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/lldp_connection.go b/gosnappi/lldp_connection.go new file mode 100644 index 00000000..cdbd74ff --- /dev/null +++ b/gosnappi/lldp_connection.go @@ -0,0 +1,387 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LldpConnection ***** +type lldpConnection struct { + validation + obj *otg.LldpConnection + marshaller marshalLldpConnection + unMarshaller unMarshalLldpConnection +} + +func NewLldpConnection() LldpConnection { + obj := lldpConnection{obj: &otg.LldpConnection{}} + obj.setDefault() + return &obj +} + +func (obj *lldpConnection) msg() *otg.LldpConnection { + return obj.obj +} + +func (obj *lldpConnection) setMsg(msg *otg.LldpConnection) LldpConnection { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldpConnection struct { + obj *lldpConnection +} + +type marshalLldpConnection interface { + // ToProto marshals LldpConnection to protobuf object *otg.LldpConnection + ToProto() (*otg.LldpConnection, error) + // ToPbText marshals LldpConnection to protobuf text + ToPbText() (string, error) + // ToYaml marshals LldpConnection to YAML text + ToYaml() (string, error) + // ToJson marshals LldpConnection to JSON text + ToJson() (string, error) +} + +type unMarshallldpConnection struct { + obj *lldpConnection +} + +type unMarshalLldpConnection interface { + // FromProto unmarshals LldpConnection from protobuf object *otg.LldpConnection + FromProto(msg *otg.LldpConnection) (LldpConnection, error) + // FromPbText unmarshals LldpConnection from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LldpConnection from YAML text + FromYaml(value string) error + // FromJson unmarshals LldpConnection from JSON text + FromJson(value string) error +} + +func (obj *lldpConnection) Marshal() marshalLldpConnection { + if obj.marshaller == nil { + obj.marshaller = &marshallldpConnection{obj: obj} + } + return obj.marshaller +} + +func (obj *lldpConnection) Unmarshal() unMarshalLldpConnection { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldpConnection{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldpConnection) ToProto() (*otg.LldpConnection, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldpConnection) FromProto(msg *otg.LldpConnection) (LldpConnection, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldpConnection) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldpConnection) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldpConnection) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpConnection) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldpConnection) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpConnection) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldpConnection) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldpConnection) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldpConnection) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldpConnection) Clone() (LldpConnection, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldpConnection() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LldpConnection is lLDP connection to a test port. In future if more connection options arise LLDP connection object will be enhanced. +type LldpConnection interface { + Validation + // msg marshals LldpConnection to protobuf object *otg.LldpConnection + // and doesn't set defaults + msg() *otg.LldpConnection + // setMsg unmarshals LldpConnection from protobuf object *otg.LldpConnection + // and doesn't set defaults + setMsg(*otg.LldpConnection) LldpConnection + // provides marshal interface + Marshal() marshalLldpConnection + // provides unmarshal interface + Unmarshal() unMarshalLldpConnection + // validate validates LldpConnection + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LldpConnection, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns LldpConnectionChoiceEnum, set in LldpConnection + Choice() LldpConnectionChoiceEnum + // setChoice assigns LldpConnectionChoiceEnum provided by user to LldpConnection + setChoice(value LldpConnectionChoiceEnum) LldpConnection + // HasChoice checks if Choice has been set in LldpConnection + HasChoice() bool + // PortName returns string, set in LldpConnection. + PortName() string + // SetPortName assigns string provided by user to LldpConnection + SetPortName(value string) LldpConnection + // HasPortName checks if PortName has been set in LldpConnection + HasPortName() bool +} + +type LldpConnectionChoiceEnum string + +// Enum of Choice on LldpConnection +var LldpConnectionChoice = struct { + PORT_NAME LldpConnectionChoiceEnum +}{ + PORT_NAME: LldpConnectionChoiceEnum("port_name"), +} + +func (obj *lldpConnection) Choice() LldpConnectionChoiceEnum { + return LldpConnectionChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The name of the test port or other connection objects on which LLDP is configured. +// Choice returns a string +func (obj *lldpConnection) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *lldpConnection) setChoice(value LldpConnectionChoiceEnum) LldpConnection { + intValue, ok := otg.LldpConnection_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LldpConnectionChoiceEnum", string(value))) + return obj + } + enumValue := otg.LldpConnection_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.PortName = nil + return obj +} + +// Name of the test port on which LLDP is configured on. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// PortName returns a string +func (obj *lldpConnection) PortName() string { + + if obj.obj.PortName == nil { + obj.setChoice(LldpConnectionChoice.PORT_NAME) + } + + return *obj.obj.PortName + +} + +// Name of the test port on which LLDP is configured on. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// PortName returns a string +func (obj *lldpConnection) HasPortName() bool { + return obj.obj.PortName != nil +} + +// Name of the test port on which LLDP is configured on. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// SetPortName sets the string value in the LldpConnection object +func (obj *lldpConnection) SetPortName(value string) LldpConnection { + obj.setChoice(LldpConnectionChoice.PORT_NAME) + obj.obj.PortName = &value + return obj +} + +func (obj *lldpConnection) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *lldpConnection) setDefault() { + var choices_set int = 0 + var choice LldpConnectionChoiceEnum + + if obj.obj.PortName != nil { + choices_set += 1 + choice = LldpConnectionChoice.PORT_NAME + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in LldpConnection") + } + } else { + intVal := otg.LldpConnection_Choice_Enum_value[string(choice)] + enumValue := otg.LldpConnection_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/lldp_custom_tlv_state.go b/gosnappi/lldp_custom_tlv_state.go new file mode 100644 index 00000000..2d8aece9 --- /dev/null +++ b/gosnappi/lldp_custom_tlv_state.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LldpCustomTLVState ***** +type lldpCustomTLVState struct { + validation + obj *otg.LldpCustomTLVState + marshaller marshalLldpCustomTLVState + unMarshaller unMarshalLldpCustomTLVState +} + +func NewLldpCustomTLVState() LldpCustomTLVState { + obj := lldpCustomTLVState{obj: &otg.LldpCustomTLVState{}} + obj.setDefault() + return &obj +} + +func (obj *lldpCustomTLVState) msg() *otg.LldpCustomTLVState { + return obj.obj +} + +func (obj *lldpCustomTLVState) setMsg(msg *otg.LldpCustomTLVState) LldpCustomTLVState { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldpCustomTLVState struct { + obj *lldpCustomTLVState +} + +type marshalLldpCustomTLVState interface { + // ToProto marshals LldpCustomTLVState to protobuf object *otg.LldpCustomTLVState + ToProto() (*otg.LldpCustomTLVState, error) + // ToPbText marshals LldpCustomTLVState to protobuf text + ToPbText() (string, error) + // ToYaml marshals LldpCustomTLVState to YAML text + ToYaml() (string, error) + // ToJson marshals LldpCustomTLVState to JSON text + ToJson() (string, error) +} + +type unMarshallldpCustomTLVState struct { + obj *lldpCustomTLVState +} + +type unMarshalLldpCustomTLVState interface { + // FromProto unmarshals LldpCustomTLVState from protobuf object *otg.LldpCustomTLVState + FromProto(msg *otg.LldpCustomTLVState) (LldpCustomTLVState, error) + // FromPbText unmarshals LldpCustomTLVState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LldpCustomTLVState from YAML text + FromYaml(value string) error + // FromJson unmarshals LldpCustomTLVState from JSON text + FromJson(value string) error +} + +func (obj *lldpCustomTLVState) Marshal() marshalLldpCustomTLVState { + if obj.marshaller == nil { + obj.marshaller = &marshallldpCustomTLVState{obj: obj} + } + return obj.marshaller +} + +func (obj *lldpCustomTLVState) Unmarshal() unMarshalLldpCustomTLVState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldpCustomTLVState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldpCustomTLVState) ToProto() (*otg.LldpCustomTLVState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldpCustomTLVState) FromProto(msg *otg.LldpCustomTLVState) (LldpCustomTLVState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldpCustomTLVState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldpCustomTLVState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldpCustomTLVState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpCustomTLVState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldpCustomTLVState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpCustomTLVState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldpCustomTLVState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldpCustomTLVState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldpCustomTLVState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldpCustomTLVState) Clone() (LldpCustomTLVState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldpCustomTLVState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LldpCustomTLVState is custom TLV received from a neighbor.Custom TLVs are organization specific TLVs advertised with TLV type 127. +type LldpCustomTLVState interface { + Validation + // msg marshals LldpCustomTLVState to protobuf object *otg.LldpCustomTLVState + // and doesn't set defaults + msg() *otg.LldpCustomTLVState + // setMsg unmarshals LldpCustomTLVState from protobuf object *otg.LldpCustomTLVState + // and doesn't set defaults + setMsg(*otg.LldpCustomTLVState) LldpCustomTLVState + // provides marshal interface + Marshal() marshalLldpCustomTLVState + // provides unmarshal interface + Unmarshal() unMarshalLldpCustomTLVState + // validate validates LldpCustomTLVState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LldpCustomTLVState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // CustomType returns uint32, set in LldpCustomTLVState. + CustomType() uint32 + // SetCustomType assigns uint32 provided by user to LldpCustomTLVState + SetCustomType(value uint32) LldpCustomTLVState + // HasCustomType checks if CustomType has been set in LldpCustomTLVState + HasCustomType() bool + // Oui returns string, set in LldpCustomTLVState. + Oui() string + // SetOui assigns string provided by user to LldpCustomTLVState + SetOui(value string) LldpCustomTLVState + // HasOui checks if Oui has been set in LldpCustomTLVState + HasOui() bool + // OuiSubtype returns uint32, set in LldpCustomTLVState. + OuiSubtype() uint32 + // SetOuiSubtype assigns uint32 provided by user to LldpCustomTLVState + SetOuiSubtype(value uint32) LldpCustomTLVState + // HasOuiSubtype checks if OuiSubtype has been set in LldpCustomTLVState + HasOuiSubtype() bool + // Information returns string, set in LldpCustomTLVState. + Information() string + // SetInformation assigns string provided by user to LldpCustomTLVState + SetInformation(value string) LldpCustomTLVState + // HasInformation checks if Information has been set in LldpCustomTLVState + HasInformation() bool +} + +// The integer value identifying the type of information contained in the value field. +// CustomType returns a uint32 +func (obj *lldpCustomTLVState) CustomType() uint32 { + + return *obj.obj.CustomType + +} + +// The integer value identifying the type of information contained in the value field. +// CustomType returns a uint32 +func (obj *lldpCustomTLVState) HasCustomType() bool { + return obj.obj.CustomType != nil +} + +// The integer value identifying the type of information contained in the value field. +// SetCustomType sets the uint32 value in the LldpCustomTLVState object +func (obj *lldpCustomTLVState) SetCustomType(value uint32) LldpCustomTLVState { + + obj.obj.CustomType = &value + return obj +} + +// The organizationally unique identifier field shall contain the organization's OUI as defined in Clause 9 of IEEE Std 802. The high-order octet is 0 and the low-order 3 octets are the SMI Network Management Private Enterprise Code of the Vendor in network byte order, as defined in the 'Assigned Numbers' RFC [RFC3232]. +// Oui returns a string +func (obj *lldpCustomTLVState) Oui() string { + + return *obj.obj.Oui + +} + +// The organizationally unique identifier field shall contain the organization's OUI as defined in Clause 9 of IEEE Std 802. The high-order octet is 0 and the low-order 3 octets are the SMI Network Management Private Enterprise Code of the Vendor in network byte order, as defined in the 'Assigned Numbers' RFC [RFC3232]. +// Oui returns a string +func (obj *lldpCustomTLVState) HasOui() bool { + return obj.obj.Oui != nil +} + +// The organizationally unique identifier field shall contain the organization's OUI as defined in Clause 9 of IEEE Std 802. The high-order octet is 0 and the low-order 3 octets are the SMI Network Management Private Enterprise Code of the Vendor in network byte order, as defined in the 'Assigned Numbers' RFC [RFC3232]. +// SetOui sets the string value in the LldpCustomTLVState object +func (obj *lldpCustomTLVState) SetOui(value string) LldpCustomTLVState { + + obj.obj.Oui = &value + return obj +} + +// The organizationally defined subtype field shall contain a unique subtype value assigned by the defining organization. +// OuiSubtype returns a uint32 +func (obj *lldpCustomTLVState) OuiSubtype() uint32 { + + return *obj.obj.OuiSubtype + +} + +// The organizationally defined subtype field shall contain a unique subtype value assigned by the defining organization. +// OuiSubtype returns a uint32 +func (obj *lldpCustomTLVState) HasOuiSubtype() bool { + return obj.obj.OuiSubtype != nil +} + +// The organizationally defined subtype field shall contain a unique subtype value assigned by the defining organization. +// SetOuiSubtype sets the uint32 value in the LldpCustomTLVState object +func (obj *lldpCustomTLVState) SetOuiSubtype(value uint32) LldpCustomTLVState { + + obj.obj.OuiSubtype = &value + return obj +} + +// Contains information on the remaining bytes of the received Organization-Specific TLV after the sub-type field. The value must be returned in lowercase hexadecimal format. +// Information returns a string +func (obj *lldpCustomTLVState) Information() string { + + return *obj.obj.Information + +} + +// Contains information on the remaining bytes of the received Organization-Specific TLV after the sub-type field. The value must be returned in lowercase hexadecimal format. +// Information returns a string +func (obj *lldpCustomTLVState) HasInformation() bool { + return obj.obj.Information != nil +} + +// Contains information on the remaining bytes of the received Organization-Specific TLV after the sub-type field. The value must be returned in lowercase hexadecimal format. +// SetInformation sets the string value in the LldpCustomTLVState object +func (obj *lldpCustomTLVState) SetInformation(value string) LldpCustomTLVState { + + obj.obj.Information = &value + return obj +} + +func (obj *lldpCustomTLVState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *lldpCustomTLVState) setDefault() { + +} diff --git a/gosnappi/lldp_metric.go b/gosnappi/lldp_metric.go new file mode 100644 index 00000000..8dc519f7 --- /dev/null +++ b/gosnappi/lldp_metric.go @@ -0,0 +1,474 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LldpMetric ***** +type lldpMetric struct { + validation + obj *otg.LldpMetric + marshaller marshalLldpMetric + unMarshaller unMarshalLldpMetric +} + +func NewLldpMetric() LldpMetric { + obj := lldpMetric{obj: &otg.LldpMetric{}} + obj.setDefault() + return &obj +} + +func (obj *lldpMetric) msg() *otg.LldpMetric { + return obj.obj +} + +func (obj *lldpMetric) setMsg(msg *otg.LldpMetric) LldpMetric { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldpMetric struct { + obj *lldpMetric +} + +type marshalLldpMetric interface { + // ToProto marshals LldpMetric to protobuf object *otg.LldpMetric + ToProto() (*otg.LldpMetric, error) + // ToPbText marshals LldpMetric to protobuf text + ToPbText() (string, error) + // ToYaml marshals LldpMetric to YAML text + ToYaml() (string, error) + // ToJson marshals LldpMetric to JSON text + ToJson() (string, error) +} + +type unMarshallldpMetric struct { + obj *lldpMetric +} + +type unMarshalLldpMetric interface { + // FromProto unmarshals LldpMetric from protobuf object *otg.LldpMetric + FromProto(msg *otg.LldpMetric) (LldpMetric, error) + // FromPbText unmarshals LldpMetric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LldpMetric from YAML text + FromYaml(value string) error + // FromJson unmarshals LldpMetric from JSON text + FromJson(value string) error +} + +func (obj *lldpMetric) Marshal() marshalLldpMetric { + if obj.marshaller == nil { + obj.marshaller = &marshallldpMetric{obj: obj} + } + return obj.marshaller +} + +func (obj *lldpMetric) Unmarshal() unMarshalLldpMetric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldpMetric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldpMetric) ToProto() (*otg.LldpMetric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldpMetric) FromProto(msg *otg.LldpMetric) (LldpMetric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldpMetric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldpMetric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldpMetric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpMetric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldpMetric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpMetric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldpMetric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldpMetric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldpMetric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldpMetric) Clone() (LldpMetric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldpMetric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LldpMetric is lLDP per instance statistics information. +type LldpMetric interface { + Validation + // msg marshals LldpMetric to protobuf object *otg.LldpMetric + // and doesn't set defaults + msg() *otg.LldpMetric + // setMsg unmarshals LldpMetric from protobuf object *otg.LldpMetric + // and doesn't set defaults + setMsg(*otg.LldpMetric) LldpMetric + // provides marshal interface + Marshal() marshalLldpMetric + // provides unmarshal interface + Unmarshal() unMarshalLldpMetric + // validate validates LldpMetric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LldpMetric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in LldpMetric. + Name() string + // SetName assigns string provided by user to LldpMetric + SetName(value string) LldpMetric + // HasName checks if Name has been set in LldpMetric + HasName() bool + // FramesRx returns uint64, set in LldpMetric. + FramesRx() uint64 + // SetFramesRx assigns uint64 provided by user to LldpMetric + SetFramesRx(value uint64) LldpMetric + // HasFramesRx checks if FramesRx has been set in LldpMetric + HasFramesRx() bool + // FramesTx returns uint64, set in LldpMetric. + FramesTx() uint64 + // SetFramesTx assigns uint64 provided by user to LldpMetric + SetFramesTx(value uint64) LldpMetric + // HasFramesTx checks if FramesTx has been set in LldpMetric + HasFramesTx() bool + // FramesErrorRx returns uint64, set in LldpMetric. + FramesErrorRx() uint64 + // SetFramesErrorRx assigns uint64 provided by user to LldpMetric + SetFramesErrorRx(value uint64) LldpMetric + // HasFramesErrorRx checks if FramesErrorRx has been set in LldpMetric + HasFramesErrorRx() bool + // FramesDiscard returns uint64, set in LldpMetric. + FramesDiscard() uint64 + // SetFramesDiscard assigns uint64 provided by user to LldpMetric + SetFramesDiscard(value uint64) LldpMetric + // HasFramesDiscard checks if FramesDiscard has been set in LldpMetric + HasFramesDiscard() bool + // TlvsDiscard returns uint64, set in LldpMetric. + TlvsDiscard() uint64 + // SetTlvsDiscard assigns uint64 provided by user to LldpMetric + SetTlvsDiscard(value uint64) LldpMetric + // HasTlvsDiscard checks if TlvsDiscard has been set in LldpMetric + HasTlvsDiscard() bool + // TlvsUnknown returns uint64, set in LldpMetric. + TlvsUnknown() uint64 + // SetTlvsUnknown assigns uint64 provided by user to LldpMetric + SetTlvsUnknown(value uint64) LldpMetric + // HasTlvsUnknown checks if TlvsUnknown has been set in LldpMetric + HasTlvsUnknown() bool +} + +// The name of the configured LLDP instance. +// Name returns a string +func (obj *lldpMetric) Name() string { + + return *obj.obj.Name + +} + +// The name of the configured LLDP instance. +// Name returns a string +func (obj *lldpMetric) HasName() bool { + return obj.obj.Name != nil +} + +// The name of the configured LLDP instance. +// SetName sets the string value in the LldpMetric object +func (obj *lldpMetric) SetName(value string) LldpMetric { + + obj.obj.Name = &value + return obj +} + +// Number of LLDP frames received. +// FramesRx returns a uint64 +func (obj *lldpMetric) FramesRx() uint64 { + + return *obj.obj.FramesRx + +} + +// Number of LLDP frames received. +// FramesRx returns a uint64 +func (obj *lldpMetric) HasFramesRx() bool { + return obj.obj.FramesRx != nil +} + +// Number of LLDP frames received. +// SetFramesRx sets the uint64 value in the LldpMetric object +func (obj *lldpMetric) SetFramesRx(value uint64) LldpMetric { + + obj.obj.FramesRx = &value + return obj +} + +// Number of LLDP frames transmitted. +// FramesTx returns a uint64 +func (obj *lldpMetric) FramesTx() uint64 { + + return *obj.obj.FramesTx + +} + +// Number of LLDP frames transmitted. +// FramesTx returns a uint64 +func (obj *lldpMetric) HasFramesTx() bool { + return obj.obj.FramesTx != nil +} + +// Number of LLDP frames transmitted. +// SetFramesTx sets the uint64 value in the LldpMetric object +func (obj *lldpMetric) SetFramesTx(value uint64) LldpMetric { + + obj.obj.FramesTx = &value + return obj +} + +// Number of LLDP frames received with packet errors. This stat should be incremented based on statsFramesInErrorsTotal increment rule in section 10.3.2 of IEEE Std 802.1 AB-2005. +// FramesErrorRx returns a uint64 +func (obj *lldpMetric) FramesErrorRx() uint64 { + + return *obj.obj.FramesErrorRx + +} + +// Number of LLDP frames received with packet errors. This stat should be incremented based on statsFramesInErrorsTotal increment rule in section 10.3.2 of IEEE Std 802.1 AB-2005. +// FramesErrorRx returns a uint64 +func (obj *lldpMetric) HasFramesErrorRx() bool { + return obj.obj.FramesErrorRx != nil +} + +// Number of LLDP frames received with packet errors. This stat should be incremented based on statsFramesInErrorsTotal increment rule in section 10.3.2 of IEEE Std 802.1 AB-2005. +// SetFramesErrorRx sets the uint64 value in the LldpMetric object +func (obj *lldpMetric) SetFramesErrorRx(value uint64) LldpMetric { + + obj.obj.FramesErrorRx = &value + return obj +} + +// Number of LLDP frames received that are discarded. This stat should be incremented when one or more of the three mandatory TLVs at the beginning of the LLDPDU is missing, out of order or contains an out of range information string length. This stat should follow the validation rules in section 10.3.2 of IEEE Std 802.1 AB-2005. +// FramesDiscard returns a uint64 +func (obj *lldpMetric) FramesDiscard() uint64 { + + return *obj.obj.FramesDiscard + +} + +// Number of LLDP frames received that are discarded. This stat should be incremented when one or more of the three mandatory TLVs at the beginning of the LLDPDU is missing, out of order or contains an out of range information string length. This stat should follow the validation rules in section 10.3.2 of IEEE Std 802.1 AB-2005. +// FramesDiscard returns a uint64 +func (obj *lldpMetric) HasFramesDiscard() bool { + return obj.obj.FramesDiscard != nil +} + +// Number of LLDP frames received that are discarded. This stat should be incremented when one or more of the three mandatory TLVs at the beginning of the LLDPDU is missing, out of order or contains an out of range information string length. This stat should follow the validation rules in section 10.3.2 of IEEE Std 802.1 AB-2005. +// SetFramesDiscard sets the uint64 value in the LldpMetric object +func (obj *lldpMetric) SetFramesDiscard(value uint64) LldpMetric { + + obj.obj.FramesDiscard = &value + return obj +} + +// Number of LLDP tlvs received that are discarded. If any TLV contains an error condition specific for that particular TLV or if any TLV extends past the physical end of the frame then these TLVs will be discarded. +// TlvsDiscard returns a uint64 +func (obj *lldpMetric) TlvsDiscard() uint64 { + + return *obj.obj.TlvsDiscard + +} + +// Number of LLDP tlvs received that are discarded. If any TLV contains an error condition specific for that particular TLV or if any TLV extends past the physical end of the frame then these TLVs will be discarded. +// TlvsDiscard returns a uint64 +func (obj *lldpMetric) HasTlvsDiscard() bool { + return obj.obj.TlvsDiscard != nil +} + +// Number of LLDP tlvs received that are discarded. If any TLV contains an error condition specific for that particular TLV or if any TLV extends past the physical end of the frame then these TLVs will be discarded. +// SetTlvsDiscard sets the uint64 value in the LldpMetric object +func (obj *lldpMetric) SetTlvsDiscard(value uint64) LldpMetric { + + obj.obj.TlvsDiscard = &value + return obj +} + +// Number of LLDP unknown tlvs received. If the OUI of the organizationlly specific TLV and/or organizationally defined subtype are not recognized,or if TLV type value is in the range of reserved TLV types then these TLVs will be considered as unknown TLVs. +// TlvsUnknown returns a uint64 +func (obj *lldpMetric) TlvsUnknown() uint64 { + + return *obj.obj.TlvsUnknown + +} + +// Number of LLDP unknown tlvs received. If the OUI of the organizationlly specific TLV and/or organizationally defined subtype are not recognized,or if TLV type value is in the range of reserved TLV types then these TLVs will be considered as unknown TLVs. +// TlvsUnknown returns a uint64 +func (obj *lldpMetric) HasTlvsUnknown() bool { + return obj.obj.TlvsUnknown != nil +} + +// Number of LLDP unknown tlvs received. If the OUI of the organizationlly specific TLV and/or organizationally defined subtype are not recognized,or if TLV type value is in the range of reserved TLV types then these TLVs will be considered as unknown TLVs. +// SetTlvsUnknown sets the uint64 value in the LldpMetric object +func (obj *lldpMetric) SetTlvsUnknown(value uint64) LldpMetric { + + obj.obj.TlvsUnknown = &value + return obj +} + +func (obj *lldpMetric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *lldpMetric) setDefault() { + +} diff --git a/gosnappi/lldp_metrics_request.go b/gosnappi/lldp_metrics_request.go new file mode 100644 index 00000000..c5d42d8c --- /dev/null +++ b/gosnappi/lldp_metrics_request.go @@ -0,0 +1,361 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LldpMetricsRequest ***** +type lldpMetricsRequest struct { + validation + obj *otg.LldpMetricsRequest + marshaller marshalLldpMetricsRequest + unMarshaller unMarshalLldpMetricsRequest +} + +func NewLldpMetricsRequest() LldpMetricsRequest { + obj := lldpMetricsRequest{obj: &otg.LldpMetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *lldpMetricsRequest) msg() *otg.LldpMetricsRequest { + return obj.obj +} + +func (obj *lldpMetricsRequest) setMsg(msg *otg.LldpMetricsRequest) LldpMetricsRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldpMetricsRequest struct { + obj *lldpMetricsRequest +} + +type marshalLldpMetricsRequest interface { + // ToProto marshals LldpMetricsRequest to protobuf object *otg.LldpMetricsRequest + ToProto() (*otg.LldpMetricsRequest, error) + // ToPbText marshals LldpMetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals LldpMetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals LldpMetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshallldpMetricsRequest struct { + obj *lldpMetricsRequest +} + +type unMarshalLldpMetricsRequest interface { + // FromProto unmarshals LldpMetricsRequest from protobuf object *otg.LldpMetricsRequest + FromProto(msg *otg.LldpMetricsRequest) (LldpMetricsRequest, error) + // FromPbText unmarshals LldpMetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LldpMetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals LldpMetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *lldpMetricsRequest) Marshal() marshalLldpMetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshallldpMetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *lldpMetricsRequest) Unmarshal() unMarshalLldpMetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldpMetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldpMetricsRequest) ToProto() (*otg.LldpMetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldpMetricsRequest) FromProto(msg *otg.LldpMetricsRequest) (LldpMetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldpMetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldpMetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldpMetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpMetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldpMetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpMetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldpMetricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldpMetricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldpMetricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldpMetricsRequest) Clone() (LldpMetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldpMetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LldpMetricsRequest is the request to retrieve LLDP per instance metrics/statistics. +type LldpMetricsRequest interface { + Validation + // msg marshals LldpMetricsRequest to protobuf object *otg.LldpMetricsRequest + // and doesn't set defaults + msg() *otg.LldpMetricsRequest + // setMsg unmarshals LldpMetricsRequest from protobuf object *otg.LldpMetricsRequest + // and doesn't set defaults + setMsg(*otg.LldpMetricsRequest) LldpMetricsRequest + // provides marshal interface + Marshal() marshalLldpMetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalLldpMetricsRequest + // validate validates LldpMetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LldpMetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LldpNames returns []string, set in LldpMetricsRequest. + LldpNames() []string + // SetLldpNames assigns []string provided by user to LldpMetricsRequest + SetLldpNames(value []string) LldpMetricsRequest + // ColumnNames returns []LldpMetricsRequestColumnNamesEnum, set in LldpMetricsRequest + ColumnNames() []LldpMetricsRequestColumnNamesEnum + // SetColumnNames assigns []LldpMetricsRequestColumnNamesEnum provided by user to LldpMetricsRequest + SetColumnNames(value []LldpMetricsRequestColumnNamesEnum) LldpMetricsRequest +} + +// The names of LLDP instances to return results for. An empty list will return results for all LLDP instances. +// +// x-constraint: +// - /components/schemas/Lldp/properties/name +// +// x-constraint: +// - /components/schemas/Lldp/properties/name +// +// LldpNames returns a []string +func (obj *lldpMetricsRequest) LldpNames() []string { + if obj.obj.LldpNames == nil { + obj.obj.LldpNames = make([]string, 0) + } + return obj.obj.LldpNames +} + +// The names of LLDP instances to return results for. An empty list will return results for all LLDP instances. +// +// x-constraint: +// - /components/schemas/Lldp/properties/name +// +// x-constraint: +// - /components/schemas/Lldp/properties/name +// +// SetLldpNames sets the []string value in the LldpMetricsRequest object +func (obj *lldpMetricsRequest) SetLldpNames(value []string) LldpMetricsRequest { + + if obj.obj.LldpNames == nil { + obj.obj.LldpNames = make([]string, 0) + } + obj.obj.LldpNames = value + + return obj +} + +type LldpMetricsRequestColumnNamesEnum string + +// Enum of ColumnNames on LldpMetricsRequest +var LldpMetricsRequestColumnNames = struct { + FRAMES_RX LldpMetricsRequestColumnNamesEnum + FRAMES_TX LldpMetricsRequestColumnNamesEnum + FRAMES_ERROR_RX LldpMetricsRequestColumnNamesEnum + FRAMES_DISCARD LldpMetricsRequestColumnNamesEnum + TLVS_DISCARD LldpMetricsRequestColumnNamesEnum + TLVS_UNKNOWN LldpMetricsRequestColumnNamesEnum +}{ + FRAMES_RX: LldpMetricsRequestColumnNamesEnum("frames_rx"), + FRAMES_TX: LldpMetricsRequestColumnNamesEnum("frames_tx"), + FRAMES_ERROR_RX: LldpMetricsRequestColumnNamesEnum("frames_error_rx"), + FRAMES_DISCARD: LldpMetricsRequestColumnNamesEnum("frames_discard"), + TLVS_DISCARD: LldpMetricsRequestColumnNamesEnum("tlvs_discard"), + TLVS_UNKNOWN: LldpMetricsRequestColumnNamesEnum("tlvs_unknown"), +} + +func (obj *lldpMetricsRequest) ColumnNames() []LldpMetricsRequestColumnNamesEnum { + items := []LldpMetricsRequestColumnNamesEnum{} + for _, item := range obj.obj.ColumnNames { + items = append(items, LldpMetricsRequestColumnNamesEnum(item.String())) + } + return items +} + +// The requested list of column names for the result set. If the list is empty then metrics for all columns will be returned. The name of LLDP instance can not be excluded. +// SetColumnNames sets the []string value in the LldpMetricsRequest object +func (obj *lldpMetricsRequest) SetColumnNames(value []LldpMetricsRequestColumnNamesEnum) LldpMetricsRequest { + + items := []otg.LldpMetricsRequest_ColumnNames_Enum{} + for _, item := range value { + intValue := otg.LldpMetricsRequest_ColumnNames_Enum_value[string(item)] + items = append(items, otg.LldpMetricsRequest_ColumnNames_Enum(intValue)) + } + obj.obj.ColumnNames = items + return obj +} + +func (obj *lldpMetricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *lldpMetricsRequest) setDefault() { + +} diff --git a/gosnappi/lldp_neighbors_state.go b/gosnappi/lldp_neighbors_state.go new file mode 100644 index 00000000..44de3edc --- /dev/null +++ b/gosnappi/lldp_neighbors_state.go @@ -0,0 +1,931 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LldpNeighborsState ***** +type lldpNeighborsState struct { + validation + obj *otg.LldpNeighborsState + marshaller marshalLldpNeighborsState + unMarshaller unMarshalLldpNeighborsState + customTlvsHolder LldpNeighborsStateLldpCustomTLVStateIter + capabilitiesHolder LldpNeighborsStateLldpCapabilityStateIter +} + +func NewLldpNeighborsState() LldpNeighborsState { + obj := lldpNeighborsState{obj: &otg.LldpNeighborsState{}} + obj.setDefault() + return &obj +} + +func (obj *lldpNeighborsState) msg() *otg.LldpNeighborsState { + return obj.obj +} + +func (obj *lldpNeighborsState) setMsg(msg *otg.LldpNeighborsState) LldpNeighborsState { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldpNeighborsState struct { + obj *lldpNeighborsState +} + +type marshalLldpNeighborsState interface { + // ToProto marshals LldpNeighborsState to protobuf object *otg.LldpNeighborsState + ToProto() (*otg.LldpNeighborsState, error) + // ToPbText marshals LldpNeighborsState to protobuf text + ToPbText() (string, error) + // ToYaml marshals LldpNeighborsState to YAML text + ToYaml() (string, error) + // ToJson marshals LldpNeighborsState to JSON text + ToJson() (string, error) +} + +type unMarshallldpNeighborsState struct { + obj *lldpNeighborsState +} + +type unMarshalLldpNeighborsState interface { + // FromProto unmarshals LldpNeighborsState from protobuf object *otg.LldpNeighborsState + FromProto(msg *otg.LldpNeighborsState) (LldpNeighborsState, error) + // FromPbText unmarshals LldpNeighborsState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LldpNeighborsState from YAML text + FromYaml(value string) error + // FromJson unmarshals LldpNeighborsState from JSON text + FromJson(value string) error +} + +func (obj *lldpNeighborsState) Marshal() marshalLldpNeighborsState { + if obj.marshaller == nil { + obj.marshaller = &marshallldpNeighborsState{obj: obj} + } + return obj.marshaller +} + +func (obj *lldpNeighborsState) Unmarshal() unMarshalLldpNeighborsState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldpNeighborsState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldpNeighborsState) ToProto() (*otg.LldpNeighborsState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldpNeighborsState) FromProto(msg *otg.LldpNeighborsState) (LldpNeighborsState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldpNeighborsState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldpNeighborsState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldpNeighborsState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpNeighborsState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldpNeighborsState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpNeighborsState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldpNeighborsState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldpNeighborsState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldpNeighborsState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldpNeighborsState) Clone() (LldpNeighborsState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldpNeighborsState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *lldpNeighborsState) setNil() { + obj.customTlvsHolder = nil + obj.capabilitiesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// LldpNeighborsState is lLDP neighbor information. +type LldpNeighborsState interface { + Validation + // msg marshals LldpNeighborsState to protobuf object *otg.LldpNeighborsState + // and doesn't set defaults + msg() *otg.LldpNeighborsState + // setMsg unmarshals LldpNeighborsState from protobuf object *otg.LldpNeighborsState + // and doesn't set defaults + setMsg(*otg.LldpNeighborsState) LldpNeighborsState + // provides marshal interface + Marshal() marshalLldpNeighborsState + // provides unmarshal interface + Unmarshal() unMarshalLldpNeighborsState + // validate validates LldpNeighborsState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LldpNeighborsState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LldpName returns string, set in LldpNeighborsState. + LldpName() string + // SetLldpName assigns string provided by user to LldpNeighborsState + SetLldpName(value string) LldpNeighborsState + // HasLldpName checks if LldpName has been set in LldpNeighborsState + HasLldpName() bool + // SystemName returns string, set in LldpNeighborsState. + SystemName() string + // SetSystemName assigns string provided by user to LldpNeighborsState + SetSystemName(value string) LldpNeighborsState + // HasSystemName checks if SystemName has been set in LldpNeighborsState + HasSystemName() bool + // SystemDescription returns string, set in LldpNeighborsState. + SystemDescription() string + // SetSystemDescription assigns string provided by user to LldpNeighborsState + SetSystemDescription(value string) LldpNeighborsState + // HasSystemDescription checks if SystemDescription has been set in LldpNeighborsState + HasSystemDescription() bool + // ChassisId returns string, set in LldpNeighborsState. + ChassisId() string + // SetChassisId assigns string provided by user to LldpNeighborsState + SetChassisId(value string) LldpNeighborsState + // HasChassisId checks if ChassisId has been set in LldpNeighborsState + HasChassisId() bool + // ChassisIdType returns LldpNeighborsStateChassisIdTypeEnum, set in LldpNeighborsState + ChassisIdType() LldpNeighborsStateChassisIdTypeEnum + // SetChassisIdType assigns LldpNeighborsStateChassisIdTypeEnum provided by user to LldpNeighborsState + SetChassisIdType(value LldpNeighborsStateChassisIdTypeEnum) LldpNeighborsState + // HasChassisIdType checks if ChassisIdType has been set in LldpNeighborsState + HasChassisIdType() bool + // NeighborId returns string, set in LldpNeighborsState. + NeighborId() string + // SetNeighborId assigns string provided by user to LldpNeighborsState + SetNeighborId(value string) LldpNeighborsState + // HasNeighborId checks if NeighborId has been set in LldpNeighborsState + HasNeighborId() bool + // Age returns uint32, set in LldpNeighborsState. + Age() uint32 + // SetAge assigns uint32 provided by user to LldpNeighborsState + SetAge(value uint32) LldpNeighborsState + // HasAge checks if Age has been set in LldpNeighborsState + HasAge() bool + // LastUpdate returns uint32, set in LldpNeighborsState. + LastUpdate() uint32 + // SetLastUpdate assigns uint32 provided by user to LldpNeighborsState + SetLastUpdate(value uint32) LldpNeighborsState + // HasLastUpdate checks if LastUpdate has been set in LldpNeighborsState + HasLastUpdate() bool + // Ttl returns uint32, set in LldpNeighborsState. + Ttl() uint32 + // SetTtl assigns uint32 provided by user to LldpNeighborsState + SetTtl(value uint32) LldpNeighborsState + // HasTtl checks if Ttl has been set in LldpNeighborsState + HasTtl() bool + // PortId returns string, set in LldpNeighborsState. + PortId() string + // SetPortId assigns string provided by user to LldpNeighborsState + SetPortId(value string) LldpNeighborsState + // HasPortId checks if PortId has been set in LldpNeighborsState + HasPortId() bool + // PortIdType returns LldpNeighborsStatePortIdTypeEnum, set in LldpNeighborsState + PortIdType() LldpNeighborsStatePortIdTypeEnum + // SetPortIdType assigns LldpNeighborsStatePortIdTypeEnum provided by user to LldpNeighborsState + SetPortIdType(value LldpNeighborsStatePortIdTypeEnum) LldpNeighborsState + // HasPortIdType checks if PortIdType has been set in LldpNeighborsState + HasPortIdType() bool + // PortDescription returns string, set in LldpNeighborsState. + PortDescription() string + // SetPortDescription assigns string provided by user to LldpNeighborsState + SetPortDescription(value string) LldpNeighborsState + // HasPortDescription checks if PortDescription has been set in LldpNeighborsState + HasPortDescription() bool + // ManagementAddress returns string, set in LldpNeighborsState. + ManagementAddress() string + // SetManagementAddress assigns string provided by user to LldpNeighborsState + SetManagementAddress(value string) LldpNeighborsState + // HasManagementAddress checks if ManagementAddress has been set in LldpNeighborsState + HasManagementAddress() bool + // ManagementAddressType returns string, set in LldpNeighborsState. + ManagementAddressType() string + // SetManagementAddressType assigns string provided by user to LldpNeighborsState + SetManagementAddressType(value string) LldpNeighborsState + // HasManagementAddressType checks if ManagementAddressType has been set in LldpNeighborsState + HasManagementAddressType() bool + // CustomTlvs returns LldpNeighborsStateLldpCustomTLVStateIterIter, set in LldpNeighborsState + CustomTlvs() LldpNeighborsStateLldpCustomTLVStateIter + // Capabilities returns LldpNeighborsStateLldpCapabilityStateIterIter, set in LldpNeighborsState + Capabilities() LldpNeighborsStateLldpCapabilityStateIter + setNil() +} + +// The name of the LLDP instance. +// LldpName returns a string +func (obj *lldpNeighborsState) LldpName() string { + + return *obj.obj.LldpName + +} + +// The name of the LLDP instance. +// LldpName returns a string +func (obj *lldpNeighborsState) HasLldpName() bool { + return obj.obj.LldpName != nil +} + +// The name of the LLDP instance. +// SetLldpName sets the string value in the LldpNeighborsState object +func (obj *lldpNeighborsState) SetLldpName(value string) LldpNeighborsState { + + obj.obj.LldpName = &value + return obj +} + +// The system name field shall contain an alpha-numeric string that indicates the system's administratively assigned name. The system name should be the system's fully qualified domain name. If implementations support IETF RFC 3418, the sysName object should be used for this field. +// SystemName returns a string +func (obj *lldpNeighborsState) SystemName() string { + + return *obj.obj.SystemName + +} + +// The system name field shall contain an alpha-numeric string that indicates the system's administratively assigned name. The system name should be the system's fully qualified domain name. If implementations support IETF RFC 3418, the sysName object should be used for this field. +// SystemName returns a string +func (obj *lldpNeighborsState) HasSystemName() bool { + return obj.obj.SystemName != nil +} + +// The system name field shall contain an alpha-numeric string that indicates the system's administratively assigned name. The system name should be the system's fully qualified domain name. If implementations support IETF RFC 3418, the sysName object should be used for this field. +// SetSystemName sets the string value in the LldpNeighborsState object +func (obj *lldpNeighborsState) SetSystemName(value string) LldpNeighborsState { + + obj.obj.SystemName = &value + return obj +} + +// The system description field shall contain an alpha-numeric string that is the textual description of the network entity. The system description should include the full name and version identification of the system's hardware type, software operating system, and networking software. If implementations support IETF RFC 3418, the sysDescr object should be used for this field. +// SystemDescription returns a string +func (obj *lldpNeighborsState) SystemDescription() string { + + return *obj.obj.SystemDescription + +} + +// The system description field shall contain an alpha-numeric string that is the textual description of the network entity. The system description should include the full name and version identification of the system's hardware type, software operating system, and networking software. If implementations support IETF RFC 3418, the sysDescr object should be used for this field. +// SystemDescription returns a string +func (obj *lldpNeighborsState) HasSystemDescription() bool { + return obj.obj.SystemDescription != nil +} + +// The system description field shall contain an alpha-numeric string that is the textual description of the network entity. The system description should include the full name and version identification of the system's hardware type, software operating system, and networking software. If implementations support IETF RFC 3418, the sysDescr object should be used for this field. +// SetSystemDescription sets the string value in the LldpNeighborsState object +func (obj *lldpNeighborsState) SetSystemDescription(value string) LldpNeighborsState { + + obj.obj.SystemDescription = &value + return obj +} + +// The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. +// ChassisId returns a string +func (obj *lldpNeighborsState) ChassisId() string { + + return *obj.obj.ChassisId + +} + +// The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. +// ChassisId returns a string +func (obj *lldpNeighborsState) HasChassisId() bool { + return obj.obj.ChassisId != nil +} + +// The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. +// SetChassisId sets the string value in the LldpNeighborsState object +func (obj *lldpNeighborsState) SetChassisId(value string) LldpNeighborsState { + + obj.obj.ChassisId = &value + return obj +} + +type LldpNeighborsStateChassisIdTypeEnum string + +// Enum of ChassisIdType on LldpNeighborsState +var LldpNeighborsStateChassisIdType = struct { + PORT_COMPONENT LldpNeighborsStateChassisIdTypeEnum + NETWORK_ADDRESS LldpNeighborsStateChassisIdTypeEnum + CHASSIS_COMPONENT LldpNeighborsStateChassisIdTypeEnum + MAC_ADDRESS LldpNeighborsStateChassisIdTypeEnum + INTERFACE_NAME LldpNeighborsStateChassisIdTypeEnum + LOCAL LldpNeighborsStateChassisIdTypeEnum + INTERFACE_ALIAS LldpNeighborsStateChassisIdTypeEnum +}{ + PORT_COMPONENT: LldpNeighborsStateChassisIdTypeEnum("port_component"), + NETWORK_ADDRESS: LldpNeighborsStateChassisIdTypeEnum("network_address"), + CHASSIS_COMPONENT: LldpNeighborsStateChassisIdTypeEnum("chassis_component"), + MAC_ADDRESS: LldpNeighborsStateChassisIdTypeEnum("mac_address"), + INTERFACE_NAME: LldpNeighborsStateChassisIdTypeEnum("interface_name"), + LOCAL: LldpNeighborsStateChassisIdTypeEnum("local"), + INTERFACE_ALIAS: LldpNeighborsStateChassisIdTypeEnum("interface_alias"), +} + +func (obj *lldpNeighborsState) ChassisIdType() LldpNeighborsStateChassisIdTypeEnum { + return LldpNeighborsStateChassisIdTypeEnum(obj.obj.ChassisIdType.Enum().String()) +} + +// This field identifies the format and source of the chassis identifier string. It is an enumerator defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. +// ChassisIdType returns a string +func (obj *lldpNeighborsState) HasChassisIdType() bool { + return obj.obj.ChassisIdType != nil +} + +func (obj *lldpNeighborsState) SetChassisIdType(value LldpNeighborsStateChassisIdTypeEnum) LldpNeighborsState { + intValue, ok := otg.LldpNeighborsState_ChassisIdType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LldpNeighborsStateChassisIdTypeEnum", string(value))) + return obj + } + enumValue := otg.LldpNeighborsState_ChassisIdType_Enum(intValue) + obj.obj.ChassisIdType = &enumValue + + return obj +} + +// System generated identifier for the neighbor on the LLDP instance. +// NeighborId returns a string +func (obj *lldpNeighborsState) NeighborId() string { + + return *obj.obj.NeighborId + +} + +// System generated identifier for the neighbor on the LLDP instance. +// NeighborId returns a string +func (obj *lldpNeighborsState) HasNeighborId() bool { + return obj.obj.NeighborId != nil +} + +// System generated identifier for the neighbor on the LLDP instance. +// SetNeighborId sets the string value in the LldpNeighborsState object +func (obj *lldpNeighborsState) SetNeighborId(value string) LldpNeighborsState { + + obj.obj.NeighborId = &value + return obj +} + +// Age since discovery in seconds. +// Age returns a uint32 +func (obj *lldpNeighborsState) Age() uint32 { + + return *obj.obj.Age + +} + +// Age since discovery in seconds. +// Age returns a uint32 +func (obj *lldpNeighborsState) HasAge() bool { + return obj.obj.Age != nil +} + +// Age since discovery in seconds. +// SetAge sets the uint32 value in the LldpNeighborsState object +func (obj *lldpNeighborsState) SetAge(value uint32) LldpNeighborsState { + + obj.obj.Age = &value + return obj +} + +// Seconds since last update received. +// LastUpdate returns a uint32 +func (obj *lldpNeighborsState) LastUpdate() uint32 { + + return *obj.obj.LastUpdate + +} + +// Seconds since last update received. +// LastUpdate returns a uint32 +func (obj *lldpNeighborsState) HasLastUpdate() bool { + return obj.obj.LastUpdate != nil +} + +// Seconds since last update received. +// SetLastUpdate sets the uint32 value in the LldpNeighborsState object +func (obj *lldpNeighborsState) SetLastUpdate(value uint32) LldpNeighborsState { + + obj.obj.LastUpdate = &value + return obj +} + +// The time-to-live (TTL) in seconds is a mandatory TLV which indicates how long information from the neighbor should be considered valid. +// Ttl returns a uint32 +func (obj *lldpNeighborsState) Ttl() uint32 { + + return *obj.obj.Ttl + +} + +// The time-to-live (TTL) in seconds is a mandatory TLV which indicates how long information from the neighbor should be considered valid. +// Ttl returns a uint32 +func (obj *lldpNeighborsState) HasTtl() bool { + return obj.obj.Ttl != nil +} + +// The time-to-live (TTL) in seconds is a mandatory TLV which indicates how long information from the neighbor should be considered valid. +// SetTtl sets the uint32 value in the LldpNeighborsState object +func (obj *lldpNeighborsState) SetTtl(value uint32) LldpNeighborsState { + + obj.obj.Ttl = &value + return obj +} + +// The Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater port, then this TLV is optional. +// PortId returns a string +func (obj *lldpNeighborsState) PortId() string { + + return *obj.obj.PortId + +} + +// The Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater port, then this TLV is optional. +// PortId returns a string +func (obj *lldpNeighborsState) HasPortId() bool { + return obj.obj.PortId != nil +} + +// The Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater port, then this TLV is optional. +// SetPortId sets the string value in the LldpNeighborsState object +func (obj *lldpNeighborsState) SetPortId(value string) LldpNeighborsState { + + obj.obj.PortId = &value + return obj +} + +type LldpNeighborsStatePortIdTypeEnum string + +// Enum of PortIdType on LldpNeighborsState +var LldpNeighborsStatePortIdType = struct { + PORT_COMPONENT LldpNeighborsStatePortIdTypeEnum + NETWORK_ADDRESS LldpNeighborsStatePortIdTypeEnum + AGENT_CIRCUIT_ID LldpNeighborsStatePortIdTypeEnum + MAC_ADDRESS LldpNeighborsStatePortIdTypeEnum + INTERFACE_NAME LldpNeighborsStatePortIdTypeEnum + LOCAL LldpNeighborsStatePortIdTypeEnum + INTERFACE_ALIAS LldpNeighborsStatePortIdTypeEnum +}{ + PORT_COMPONENT: LldpNeighborsStatePortIdTypeEnum("port_component"), + NETWORK_ADDRESS: LldpNeighborsStatePortIdTypeEnum("network_address"), + AGENT_CIRCUIT_ID: LldpNeighborsStatePortIdTypeEnum("agent_circuit_id"), + MAC_ADDRESS: LldpNeighborsStatePortIdTypeEnum("mac_address"), + INTERFACE_NAME: LldpNeighborsStatePortIdTypeEnum("interface_name"), + LOCAL: LldpNeighborsStatePortIdTypeEnum("local"), + INTERFACE_ALIAS: LldpNeighborsStatePortIdTypeEnum("interface_alias"), +} + +func (obj *lldpNeighborsState) PortIdType() LldpNeighborsStatePortIdTypeEnum { + return LldpNeighborsStatePortIdTypeEnum(obj.obj.PortIdType.Enum().String()) +} + +// This field identifies the format and source of the port identifier string. It is an enumerator defined by the PtopoPortIdType object from RFC2922. +// PortIdType returns a string +func (obj *lldpNeighborsState) HasPortIdType() bool { + return obj.obj.PortIdType != nil +} + +func (obj *lldpNeighborsState) SetPortIdType(value LldpNeighborsStatePortIdTypeEnum) LldpNeighborsState { + intValue, ok := otg.LldpNeighborsState_PortIdType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LldpNeighborsStatePortIdTypeEnum", string(value))) + return obj + } + enumValue := otg.LldpNeighborsState_PortIdType_Enum(intValue) + obj.obj.PortIdType = &enumValue + + return obj +} + +// The binary string containing the actual port identifier for the port which this LLDP PDU was transmitted. The source and format of this field is defined by PtopoPortId from RFC2922. +// PortDescription returns a string +func (obj *lldpNeighborsState) PortDescription() string { + + return *obj.obj.PortDescription + +} + +// The binary string containing the actual port identifier for the port which this LLDP PDU was transmitted. The source and format of this field is defined by PtopoPortId from RFC2922. +// PortDescription returns a string +func (obj *lldpNeighborsState) HasPortDescription() bool { + return obj.obj.PortDescription != nil +} + +// The binary string containing the actual port identifier for the port which this LLDP PDU was transmitted. The source and format of this field is defined by PtopoPortId from RFC2922. +// SetPortDescription sets the string value in the LldpNeighborsState object +func (obj *lldpNeighborsState) SetPortDescription(value string) LldpNeighborsState { + + obj.obj.PortDescription = &value + return obj +} + +// The Management Address is a mandatory TLV which identifies a network address associated with the local LLDP agent, which can be used to reach the agent on the port identified in the Port ID TLV. +// ManagementAddress returns a string +func (obj *lldpNeighborsState) ManagementAddress() string { + + return *obj.obj.ManagementAddress + +} + +// The Management Address is a mandatory TLV which identifies a network address associated with the local LLDP agent, which can be used to reach the agent on the port identified in the Port ID TLV. +// ManagementAddress returns a string +func (obj *lldpNeighborsState) HasManagementAddress() bool { + return obj.obj.ManagementAddress != nil +} + +// The Management Address is a mandatory TLV which identifies a network address associated with the local LLDP agent, which can be used to reach the agent on the port identified in the Port ID TLV. +// SetManagementAddress sets the string value in the LldpNeighborsState object +func (obj *lldpNeighborsState) SetManagementAddress(value string) LldpNeighborsState { + + obj.obj.ManagementAddress = &value + return obj +} + +// The enumerated value for the network address type identified in this TLV. This enumeration is defined in the 'Assigned Numbers' RFC [RFC3232] and the ianaAddressFamilyNumbers object. +// ManagementAddressType returns a string +func (obj *lldpNeighborsState) ManagementAddressType() string { + + return *obj.obj.ManagementAddressType + +} + +// The enumerated value for the network address type identified in this TLV. This enumeration is defined in the 'Assigned Numbers' RFC [RFC3232] and the ianaAddressFamilyNumbers object. +// ManagementAddressType returns a string +func (obj *lldpNeighborsState) HasManagementAddressType() bool { + return obj.obj.ManagementAddressType != nil +} + +// The enumerated value for the network address type identified in this TLV. This enumeration is defined in the 'Assigned Numbers' RFC [RFC3232] and the ianaAddressFamilyNumbers object. +// SetManagementAddressType sets the string value in the LldpNeighborsState object +func (obj *lldpNeighborsState) SetManagementAddressType(value string) LldpNeighborsState { + + obj.obj.ManagementAddressType = &value + return obj +} + +// description is TBD +// CustomTlvs returns a []LldpCustomTLVState +func (obj *lldpNeighborsState) CustomTlvs() LldpNeighborsStateLldpCustomTLVStateIter { + if len(obj.obj.CustomTlvs) == 0 { + obj.obj.CustomTlvs = []*otg.LldpCustomTLVState{} + } + if obj.customTlvsHolder == nil { + obj.customTlvsHolder = newLldpNeighborsStateLldpCustomTLVStateIter(&obj.obj.CustomTlvs).setMsg(obj) + } + return obj.customTlvsHolder +} + +type lldpNeighborsStateLldpCustomTLVStateIter struct { + obj *lldpNeighborsState + lldpCustomTLVStateSlice []LldpCustomTLVState + fieldPtr *[]*otg.LldpCustomTLVState +} + +func newLldpNeighborsStateLldpCustomTLVStateIter(ptr *[]*otg.LldpCustomTLVState) LldpNeighborsStateLldpCustomTLVStateIter { + return &lldpNeighborsStateLldpCustomTLVStateIter{fieldPtr: ptr} +} + +type LldpNeighborsStateLldpCustomTLVStateIter interface { + setMsg(*lldpNeighborsState) LldpNeighborsStateLldpCustomTLVStateIter + Items() []LldpCustomTLVState + Add() LldpCustomTLVState + Append(items ...LldpCustomTLVState) LldpNeighborsStateLldpCustomTLVStateIter + Set(index int, newObj LldpCustomTLVState) LldpNeighborsStateLldpCustomTLVStateIter + Clear() LldpNeighborsStateLldpCustomTLVStateIter + clearHolderSlice() LldpNeighborsStateLldpCustomTLVStateIter + appendHolderSlice(item LldpCustomTLVState) LldpNeighborsStateLldpCustomTLVStateIter +} + +func (obj *lldpNeighborsStateLldpCustomTLVStateIter) setMsg(msg *lldpNeighborsState) LldpNeighborsStateLldpCustomTLVStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&lldpCustomTLVState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *lldpNeighborsStateLldpCustomTLVStateIter) Items() []LldpCustomTLVState { + return obj.lldpCustomTLVStateSlice +} + +func (obj *lldpNeighborsStateLldpCustomTLVStateIter) Add() LldpCustomTLVState { + newObj := &otg.LldpCustomTLVState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &lldpCustomTLVState{obj: newObj} + newLibObj.setDefault() + obj.lldpCustomTLVStateSlice = append(obj.lldpCustomTLVStateSlice, newLibObj) + return newLibObj +} + +func (obj *lldpNeighborsStateLldpCustomTLVStateIter) Append(items ...LldpCustomTLVState) LldpNeighborsStateLldpCustomTLVStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.lldpCustomTLVStateSlice = append(obj.lldpCustomTLVStateSlice, item) + } + return obj +} + +func (obj *lldpNeighborsStateLldpCustomTLVStateIter) Set(index int, newObj LldpCustomTLVState) LldpNeighborsStateLldpCustomTLVStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.lldpCustomTLVStateSlice[index] = newObj + return obj +} +func (obj *lldpNeighborsStateLldpCustomTLVStateIter) Clear() LldpNeighborsStateLldpCustomTLVStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.LldpCustomTLVState{} + obj.lldpCustomTLVStateSlice = []LldpCustomTLVState{} + } + return obj +} +func (obj *lldpNeighborsStateLldpCustomTLVStateIter) clearHolderSlice() LldpNeighborsStateLldpCustomTLVStateIter { + if len(obj.lldpCustomTLVStateSlice) > 0 { + obj.lldpCustomTLVStateSlice = []LldpCustomTLVState{} + } + return obj +} +func (obj *lldpNeighborsStateLldpCustomTLVStateIter) appendHolderSlice(item LldpCustomTLVState) LldpNeighborsStateLldpCustomTLVStateIter { + obj.lldpCustomTLVStateSlice = append(obj.lldpCustomTLVStateSlice, item) + return obj +} + +// description is TBD +// Capabilities returns a []LldpCapabilityState +func (obj *lldpNeighborsState) Capabilities() LldpNeighborsStateLldpCapabilityStateIter { + if len(obj.obj.Capabilities) == 0 { + obj.obj.Capabilities = []*otg.LldpCapabilityState{} + } + if obj.capabilitiesHolder == nil { + obj.capabilitiesHolder = newLldpNeighborsStateLldpCapabilityStateIter(&obj.obj.Capabilities).setMsg(obj) + } + return obj.capabilitiesHolder +} + +type lldpNeighborsStateLldpCapabilityStateIter struct { + obj *lldpNeighborsState + lldpCapabilityStateSlice []LldpCapabilityState + fieldPtr *[]*otg.LldpCapabilityState +} + +func newLldpNeighborsStateLldpCapabilityStateIter(ptr *[]*otg.LldpCapabilityState) LldpNeighborsStateLldpCapabilityStateIter { + return &lldpNeighborsStateLldpCapabilityStateIter{fieldPtr: ptr} +} + +type LldpNeighborsStateLldpCapabilityStateIter interface { + setMsg(*lldpNeighborsState) LldpNeighborsStateLldpCapabilityStateIter + Items() []LldpCapabilityState + Add() LldpCapabilityState + Append(items ...LldpCapabilityState) LldpNeighborsStateLldpCapabilityStateIter + Set(index int, newObj LldpCapabilityState) LldpNeighborsStateLldpCapabilityStateIter + Clear() LldpNeighborsStateLldpCapabilityStateIter + clearHolderSlice() LldpNeighborsStateLldpCapabilityStateIter + appendHolderSlice(item LldpCapabilityState) LldpNeighborsStateLldpCapabilityStateIter +} + +func (obj *lldpNeighborsStateLldpCapabilityStateIter) setMsg(msg *lldpNeighborsState) LldpNeighborsStateLldpCapabilityStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&lldpCapabilityState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *lldpNeighborsStateLldpCapabilityStateIter) Items() []LldpCapabilityState { + return obj.lldpCapabilityStateSlice +} + +func (obj *lldpNeighborsStateLldpCapabilityStateIter) Add() LldpCapabilityState { + newObj := &otg.LldpCapabilityState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &lldpCapabilityState{obj: newObj} + newLibObj.setDefault() + obj.lldpCapabilityStateSlice = append(obj.lldpCapabilityStateSlice, newLibObj) + return newLibObj +} + +func (obj *lldpNeighborsStateLldpCapabilityStateIter) Append(items ...LldpCapabilityState) LldpNeighborsStateLldpCapabilityStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.lldpCapabilityStateSlice = append(obj.lldpCapabilityStateSlice, item) + } + return obj +} + +func (obj *lldpNeighborsStateLldpCapabilityStateIter) Set(index int, newObj LldpCapabilityState) LldpNeighborsStateLldpCapabilityStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.lldpCapabilityStateSlice[index] = newObj + return obj +} +func (obj *lldpNeighborsStateLldpCapabilityStateIter) Clear() LldpNeighborsStateLldpCapabilityStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.LldpCapabilityState{} + obj.lldpCapabilityStateSlice = []LldpCapabilityState{} + } + return obj +} +func (obj *lldpNeighborsStateLldpCapabilityStateIter) clearHolderSlice() LldpNeighborsStateLldpCapabilityStateIter { + if len(obj.lldpCapabilityStateSlice) > 0 { + obj.lldpCapabilityStateSlice = []LldpCapabilityState{} + } + return obj +} +func (obj *lldpNeighborsStateLldpCapabilityStateIter) appendHolderSlice(item LldpCapabilityState) LldpNeighborsStateLldpCapabilityStateIter { + obj.lldpCapabilityStateSlice = append(obj.lldpCapabilityStateSlice, item) + return obj +} + +func (obj *lldpNeighborsState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.CustomTlvs) != 0 { + + if set_default { + obj.CustomTlvs().clearHolderSlice() + for _, item := range obj.obj.CustomTlvs { + obj.CustomTlvs().appendHolderSlice(&lldpCustomTLVState{obj: item}) + } + } + for _, item := range obj.CustomTlvs().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Capabilities) != 0 { + + if set_default { + obj.Capabilities().clearHolderSlice() + for _, item := range obj.obj.Capabilities { + obj.Capabilities().appendHolderSlice(&lldpCapabilityState{obj: item}) + } + } + for _, item := range obj.Capabilities().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *lldpNeighborsState) setDefault() { + +} diff --git a/gosnappi/lldp_neighbors_state_request.go b/gosnappi/lldp_neighbors_state_request.go new file mode 100644 index 00000000..87eb348a --- /dev/null +++ b/gosnappi/lldp_neighbors_state_request.go @@ -0,0 +1,342 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LldpNeighborsStateRequest ***** +type lldpNeighborsStateRequest struct { + validation + obj *otg.LldpNeighborsStateRequest + marshaller marshalLldpNeighborsStateRequest + unMarshaller unMarshalLldpNeighborsStateRequest +} + +func NewLldpNeighborsStateRequest() LldpNeighborsStateRequest { + obj := lldpNeighborsStateRequest{obj: &otg.LldpNeighborsStateRequest{}} + obj.setDefault() + return &obj +} + +func (obj *lldpNeighborsStateRequest) msg() *otg.LldpNeighborsStateRequest { + return obj.obj +} + +func (obj *lldpNeighborsStateRequest) setMsg(msg *otg.LldpNeighborsStateRequest) LldpNeighborsStateRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldpNeighborsStateRequest struct { + obj *lldpNeighborsStateRequest +} + +type marshalLldpNeighborsStateRequest interface { + // ToProto marshals LldpNeighborsStateRequest to protobuf object *otg.LldpNeighborsStateRequest + ToProto() (*otg.LldpNeighborsStateRequest, error) + // ToPbText marshals LldpNeighborsStateRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals LldpNeighborsStateRequest to YAML text + ToYaml() (string, error) + // ToJson marshals LldpNeighborsStateRequest to JSON text + ToJson() (string, error) +} + +type unMarshallldpNeighborsStateRequest struct { + obj *lldpNeighborsStateRequest +} + +type unMarshalLldpNeighborsStateRequest interface { + // FromProto unmarshals LldpNeighborsStateRequest from protobuf object *otg.LldpNeighborsStateRequest + FromProto(msg *otg.LldpNeighborsStateRequest) (LldpNeighborsStateRequest, error) + // FromPbText unmarshals LldpNeighborsStateRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LldpNeighborsStateRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals LldpNeighborsStateRequest from JSON text + FromJson(value string) error +} + +func (obj *lldpNeighborsStateRequest) Marshal() marshalLldpNeighborsStateRequest { + if obj.marshaller == nil { + obj.marshaller = &marshallldpNeighborsStateRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *lldpNeighborsStateRequest) Unmarshal() unMarshalLldpNeighborsStateRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldpNeighborsStateRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldpNeighborsStateRequest) ToProto() (*otg.LldpNeighborsStateRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldpNeighborsStateRequest) FromProto(msg *otg.LldpNeighborsStateRequest) (LldpNeighborsStateRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldpNeighborsStateRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldpNeighborsStateRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldpNeighborsStateRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpNeighborsStateRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldpNeighborsStateRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpNeighborsStateRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldpNeighborsStateRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldpNeighborsStateRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldpNeighborsStateRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldpNeighborsStateRequest) Clone() (LldpNeighborsStateRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldpNeighborsStateRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LldpNeighborsStateRequest is the request to retrieve LLDP neighbor information for a given instance. +type LldpNeighborsStateRequest interface { + Validation + // msg marshals LldpNeighborsStateRequest to protobuf object *otg.LldpNeighborsStateRequest + // and doesn't set defaults + msg() *otg.LldpNeighborsStateRequest + // setMsg unmarshals LldpNeighborsStateRequest from protobuf object *otg.LldpNeighborsStateRequest + // and doesn't set defaults + setMsg(*otg.LldpNeighborsStateRequest) LldpNeighborsStateRequest + // provides marshal interface + Marshal() marshalLldpNeighborsStateRequest + // provides unmarshal interface + Unmarshal() unMarshalLldpNeighborsStateRequest + // validate validates LldpNeighborsStateRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LldpNeighborsStateRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LldpNames returns []string, set in LldpNeighborsStateRequest. + LldpNames() []string + // SetLldpNames assigns []string provided by user to LldpNeighborsStateRequest + SetLldpNames(value []string) LldpNeighborsStateRequest + // NeighborIdFilters returns []string, set in LldpNeighborsStateRequest. + NeighborIdFilters() []string + // SetNeighborIdFilters assigns []string provided by user to LldpNeighborsStateRequest + SetNeighborIdFilters(value []string) LldpNeighborsStateRequest +} + +// The names of LLDP instances for which neighbor information will be retrieved. If no names are specified then the results will contain neighbor information for all configured LLDP instances. +// +// x-constraint: +// - /components/schemas/Lldp/properties/name +// +// x-constraint: +// - /components/schemas/Lldp/properties/name +// +// LldpNames returns a []string +func (obj *lldpNeighborsStateRequest) LldpNames() []string { + if obj.obj.LldpNames == nil { + obj.obj.LldpNames = make([]string, 0) + } + return obj.obj.LldpNames +} + +// The names of LLDP instances for which neighbor information will be retrieved. If no names are specified then the results will contain neighbor information for all configured LLDP instances. +// +// x-constraint: +// - /components/schemas/Lldp/properties/name +// +// x-constraint: +// - /components/schemas/Lldp/properties/name +// +// SetLldpNames sets the []string value in the LldpNeighborsStateRequest object +func (obj *lldpNeighborsStateRequest) SetLldpNames(value []string) LldpNeighborsStateRequest { + + if obj.obj.LldpNames == nil { + obj.obj.LldpNames = make([]string, 0) + } + obj.obj.LldpNames = value + + return obj +} + +// Specify the neighbors for which information will be returned. If empty or missing then information for all neighbors will be returned. +// NeighborIdFilters returns a []string +func (obj *lldpNeighborsStateRequest) NeighborIdFilters() []string { + if obj.obj.NeighborIdFilters == nil { + obj.obj.NeighborIdFilters = make([]string, 0) + } + return obj.obj.NeighborIdFilters +} + +// Specify the neighbors for which information will be returned. If empty or missing then information for all neighbors will be returned. +// SetNeighborIdFilters sets the []string value in the LldpNeighborsStateRequest object +func (obj *lldpNeighborsStateRequest) SetNeighborIdFilters(value []string) LldpNeighborsStateRequest { + + if obj.obj.NeighborIdFilters == nil { + obj.obj.NeighborIdFilters = make([]string, 0) + } + obj.obj.NeighborIdFilters = value + + return obj +} + +func (obj *lldpNeighborsStateRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *lldpNeighborsStateRequest) setDefault() { + +} diff --git a/gosnappi/lldp_org_info.go b/gosnappi/lldp_org_info.go new file mode 100644 index 00000000..8a07b560 --- /dev/null +++ b/gosnappi/lldp_org_info.go @@ -0,0 +1,412 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LldpOrgInfo ***** +type lldpOrgInfo struct { + validation + obj *otg.LldpOrgInfo + marshaller marshalLldpOrgInfo + unMarshaller unMarshalLldpOrgInfo + informationHolder LldpOrgInfoType +} + +func NewLldpOrgInfo() LldpOrgInfo { + obj := lldpOrgInfo{obj: &otg.LldpOrgInfo{}} + obj.setDefault() + return &obj +} + +func (obj *lldpOrgInfo) msg() *otg.LldpOrgInfo { + return obj.obj +} + +func (obj *lldpOrgInfo) setMsg(msg *otg.LldpOrgInfo) LldpOrgInfo { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldpOrgInfo struct { + obj *lldpOrgInfo +} + +type marshalLldpOrgInfo interface { + // ToProto marshals LldpOrgInfo to protobuf object *otg.LldpOrgInfo + ToProto() (*otg.LldpOrgInfo, error) + // ToPbText marshals LldpOrgInfo to protobuf text + ToPbText() (string, error) + // ToYaml marshals LldpOrgInfo to YAML text + ToYaml() (string, error) + // ToJson marshals LldpOrgInfo to JSON text + ToJson() (string, error) +} + +type unMarshallldpOrgInfo struct { + obj *lldpOrgInfo +} + +type unMarshalLldpOrgInfo interface { + // FromProto unmarshals LldpOrgInfo from protobuf object *otg.LldpOrgInfo + FromProto(msg *otg.LldpOrgInfo) (LldpOrgInfo, error) + // FromPbText unmarshals LldpOrgInfo from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LldpOrgInfo from YAML text + FromYaml(value string) error + // FromJson unmarshals LldpOrgInfo from JSON text + FromJson(value string) error +} + +func (obj *lldpOrgInfo) Marshal() marshalLldpOrgInfo { + if obj.marshaller == nil { + obj.marshaller = &marshallldpOrgInfo{obj: obj} + } + return obj.marshaller +} + +func (obj *lldpOrgInfo) Unmarshal() unMarshalLldpOrgInfo { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldpOrgInfo{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldpOrgInfo) ToProto() (*otg.LldpOrgInfo, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldpOrgInfo) FromProto(msg *otg.LldpOrgInfo) (LldpOrgInfo, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldpOrgInfo) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldpOrgInfo) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldpOrgInfo) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpOrgInfo) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldpOrgInfo) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpOrgInfo) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldpOrgInfo) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldpOrgInfo) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldpOrgInfo) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldpOrgInfo) Clone() (LldpOrgInfo, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldpOrgInfo() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *lldpOrgInfo) setNil() { + obj.informationHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// LldpOrgInfo is the organization specific information configured in the Organization Specific TLV. +type LldpOrgInfo interface { + Validation + // msg marshals LldpOrgInfo to protobuf object *otg.LldpOrgInfo + // and doesn't set defaults + msg() *otg.LldpOrgInfo + // setMsg unmarshals LldpOrgInfo from protobuf object *otg.LldpOrgInfo + // and doesn't set defaults + setMsg(*otg.LldpOrgInfo) LldpOrgInfo + // provides marshal interface + Marshal() marshalLldpOrgInfo + // provides unmarshal interface + Unmarshal() unMarshalLldpOrgInfo + // validate validates LldpOrgInfo + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LldpOrgInfo, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Oui returns string, set in LldpOrgInfo. + Oui() string + // SetOui assigns string provided by user to LldpOrgInfo + SetOui(value string) LldpOrgInfo + // HasOui checks if Oui has been set in LldpOrgInfo + HasOui() bool + // Subtype returns uint32, set in LldpOrgInfo. + Subtype() uint32 + // SetSubtype assigns uint32 provided by user to LldpOrgInfo + SetSubtype(value uint32) LldpOrgInfo + // HasSubtype checks if Subtype has been set in LldpOrgInfo + HasSubtype() bool + // Information returns LldpOrgInfoType, set in LldpOrgInfo. + // LldpOrgInfoType is contains either the Alpha-numeric information encoded in UTF-8 (as specified in IETF RFC 3629) or include one or more information fields with their associated field-type identifiers designators, similar to those in the Management Address TLV. Currently only one choice as info is given in future if required it can be extended to define sub tlvs. + Information() LldpOrgInfoType + // SetInformation assigns LldpOrgInfoType provided by user to LldpOrgInfo. + // LldpOrgInfoType is contains either the Alpha-numeric information encoded in UTF-8 (as specified in IETF RFC 3629) or include one or more information fields with their associated field-type identifiers designators, similar to those in the Management Address TLV. Currently only one choice as info is given in future if required it can be extended to define sub tlvs. + SetInformation(value LldpOrgInfoType) LldpOrgInfo + // HasInformation checks if Information has been set in LldpOrgInfo + HasInformation() bool + setNil() +} + +// The organizationally unique identifier field shall contain the organization's OUI as defined in Clause 9 of IEEE Std 802. It is a 24 bit number that uniquely identifies a vendor, manufacturer, or other organizations. +// Oui returns a string +func (obj *lldpOrgInfo) Oui() string { + + return *obj.obj.Oui + +} + +// The organizationally unique identifier field shall contain the organization's OUI as defined in Clause 9 of IEEE Std 802. It is a 24 bit number that uniquely identifies a vendor, manufacturer, or other organizations. +// Oui returns a string +func (obj *lldpOrgInfo) HasOui() bool { + return obj.obj.Oui != nil +} + +// The organizationally unique identifier field shall contain the organization's OUI as defined in Clause 9 of IEEE Std 802. It is a 24 bit number that uniquely identifies a vendor, manufacturer, or other organizations. +// SetOui sets the string value in the LldpOrgInfo object +func (obj *lldpOrgInfo) SetOui(value string) LldpOrgInfo { + + obj.obj.Oui = &value + return obj +} + +// The organizationally defined subtype field shall contain a unique subtype value assigned by the defining organization. +// Subtype returns a uint32 +func (obj *lldpOrgInfo) Subtype() uint32 { + + return *obj.obj.Subtype + +} + +// The organizationally defined subtype field shall contain a unique subtype value assigned by the defining organization. +// Subtype returns a uint32 +func (obj *lldpOrgInfo) HasSubtype() bool { + return obj.obj.Subtype != nil +} + +// The organizationally defined subtype field shall contain a unique subtype value assigned by the defining organization. +// SetSubtype sets the uint32 value in the LldpOrgInfo object +func (obj *lldpOrgInfo) SetSubtype(value uint32) LldpOrgInfo { + + obj.obj.Subtype = &value + return obj +} + +// Contains the organizationally defined information. The actual format of the organizationally defined information string field is organizationally specific and can contain either binary or alpha-numeric information that is instance specific for the particular TLV type and subtype. Alpha-numeric information are encoded in UTF-8 (as specified in IETF RFC 3629). Or include one or more information fields with their associated field-type identifiers, designators similar to those in the Management Address TLV. +// Information returns a LldpOrgInfoType +func (obj *lldpOrgInfo) Information() LldpOrgInfoType { + if obj.obj.Information == nil { + obj.obj.Information = NewLldpOrgInfoType().msg() + } + if obj.informationHolder == nil { + obj.informationHolder = &lldpOrgInfoType{obj: obj.obj.Information} + } + return obj.informationHolder +} + +// Contains the organizationally defined information. The actual format of the organizationally defined information string field is organizationally specific and can contain either binary or alpha-numeric information that is instance specific for the particular TLV type and subtype. Alpha-numeric information are encoded in UTF-8 (as specified in IETF RFC 3629). Or include one or more information fields with their associated field-type identifiers, designators similar to those in the Management Address TLV. +// Information returns a LldpOrgInfoType +func (obj *lldpOrgInfo) HasInformation() bool { + return obj.obj.Information != nil +} + +// Contains the organizationally defined information. The actual format of the organizationally defined information string field is organizationally specific and can contain either binary or alpha-numeric information that is instance specific for the particular TLV type and subtype. Alpha-numeric information are encoded in UTF-8 (as specified in IETF RFC 3629). Or include one or more information fields with their associated field-type identifiers, designators similar to those in the Management Address TLV. +// SetInformation sets the LldpOrgInfoType value in the LldpOrgInfo object +func (obj *lldpOrgInfo) SetInformation(value LldpOrgInfoType) LldpOrgInfo { + + obj.informationHolder = nil + obj.obj.Information = value.msg() + + return obj +} + +func (obj *lldpOrgInfo) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Oui != nil { + + if len(*obj.obj.Oui) < 6 || len(*obj.obj.Oui) > 6 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "6 <= length of LldpOrgInfo.Oui <= 6 but Got %d", + len(*obj.obj.Oui))) + } + + } + + if obj.obj.Subtype != nil { + + if *obj.obj.Subtype < 1 || *obj.obj.Subtype > 127 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= LldpOrgInfo.Subtype <= 127 but Got %d", *obj.obj.Subtype)) + } + + } + + if obj.obj.Information != nil { + + obj.Information().validateObj(vObj, set_default) + } + +} + +func (obj *lldpOrgInfo) setDefault() { + if obj.obj.Oui == nil { + obj.SetOui("0080C2") + } + if obj.obj.Subtype == nil { + obj.SetSubtype(1) + } + +} diff --git a/gosnappi/lldp_org_info_type.go b/gosnappi/lldp_org_info_type.go new file mode 100644 index 00000000..2b68b451 --- /dev/null +++ b/gosnappi/lldp_org_info_type.go @@ -0,0 +1,384 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LldpOrgInfoType ***** +type lldpOrgInfoType struct { + validation + obj *otg.LldpOrgInfoType + marshaller marshalLldpOrgInfoType + unMarshaller unMarshalLldpOrgInfoType +} + +func NewLldpOrgInfoType() LldpOrgInfoType { + obj := lldpOrgInfoType{obj: &otg.LldpOrgInfoType{}} + obj.setDefault() + return &obj +} + +func (obj *lldpOrgInfoType) msg() *otg.LldpOrgInfoType { + return obj.obj +} + +func (obj *lldpOrgInfoType) setMsg(msg *otg.LldpOrgInfoType) LldpOrgInfoType { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldpOrgInfoType struct { + obj *lldpOrgInfoType +} + +type marshalLldpOrgInfoType interface { + // ToProto marshals LldpOrgInfoType to protobuf object *otg.LldpOrgInfoType + ToProto() (*otg.LldpOrgInfoType, error) + // ToPbText marshals LldpOrgInfoType to protobuf text + ToPbText() (string, error) + // ToYaml marshals LldpOrgInfoType to YAML text + ToYaml() (string, error) + // ToJson marshals LldpOrgInfoType to JSON text + ToJson() (string, error) +} + +type unMarshallldpOrgInfoType struct { + obj *lldpOrgInfoType +} + +type unMarshalLldpOrgInfoType interface { + // FromProto unmarshals LldpOrgInfoType from protobuf object *otg.LldpOrgInfoType + FromProto(msg *otg.LldpOrgInfoType) (LldpOrgInfoType, error) + // FromPbText unmarshals LldpOrgInfoType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LldpOrgInfoType from YAML text + FromYaml(value string) error + // FromJson unmarshals LldpOrgInfoType from JSON text + FromJson(value string) error +} + +func (obj *lldpOrgInfoType) Marshal() marshalLldpOrgInfoType { + if obj.marshaller == nil { + obj.marshaller = &marshallldpOrgInfoType{obj: obj} + } + return obj.marshaller +} + +func (obj *lldpOrgInfoType) Unmarshal() unMarshalLldpOrgInfoType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldpOrgInfoType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldpOrgInfoType) ToProto() (*otg.LldpOrgInfoType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldpOrgInfoType) FromProto(msg *otg.LldpOrgInfoType) (LldpOrgInfoType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldpOrgInfoType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldpOrgInfoType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldpOrgInfoType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpOrgInfoType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldpOrgInfoType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpOrgInfoType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldpOrgInfoType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldpOrgInfoType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldpOrgInfoType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldpOrgInfoType) Clone() (LldpOrgInfoType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldpOrgInfoType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LldpOrgInfoType is contains either the Alpha-numeric information encoded in UTF-8 (as specified in IETF RFC 3629) or include one or more information fields with their associated field-type identifiers designators, similar to those in the Management Address TLV. Currently only one choice as info is given in future if required it can be extended to define sub tlvs. +type LldpOrgInfoType interface { + Validation + // msg marshals LldpOrgInfoType to protobuf object *otg.LldpOrgInfoType + // and doesn't set defaults + msg() *otg.LldpOrgInfoType + // setMsg unmarshals LldpOrgInfoType from protobuf object *otg.LldpOrgInfoType + // and doesn't set defaults + setMsg(*otg.LldpOrgInfoType) LldpOrgInfoType + // provides marshal interface + Marshal() marshalLldpOrgInfoType + // provides unmarshal interface + Unmarshal() unMarshalLldpOrgInfoType + // validate validates LldpOrgInfoType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LldpOrgInfoType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns LldpOrgInfoTypeChoiceEnum, set in LldpOrgInfoType + Choice() LldpOrgInfoTypeChoiceEnum + // setChoice assigns LldpOrgInfoTypeChoiceEnum provided by user to LldpOrgInfoType + setChoice(value LldpOrgInfoTypeChoiceEnum) LldpOrgInfoType + // HasChoice checks if Choice has been set in LldpOrgInfoType + HasChoice() bool + // Info returns string, set in LldpOrgInfoType. + Info() string + // SetInfo assigns string provided by user to LldpOrgInfoType + SetInfo(value string) LldpOrgInfoType + // HasInfo checks if Info has been set in LldpOrgInfoType + HasInfo() bool +} + +type LldpOrgInfoTypeChoiceEnum string + +// Enum of Choice on LldpOrgInfoType +var LldpOrgInfoTypeChoice = struct { + INFO LldpOrgInfoTypeChoiceEnum +}{ + INFO: LldpOrgInfoTypeChoiceEnum("info"), +} + +func (obj *lldpOrgInfoType) Choice() LldpOrgInfoTypeChoiceEnum { + return LldpOrgInfoTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// In info mode the organizationally defined information contain either binary or alpha-numeric information encoded in UTF-8 (as specified in IETF RFC 3629). +// Choice returns a string +func (obj *lldpOrgInfoType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *lldpOrgInfoType) setChoice(value LldpOrgInfoTypeChoiceEnum) LldpOrgInfoType { + intValue, ok := otg.LldpOrgInfoType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LldpOrgInfoTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.LldpOrgInfoType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Info = nil + return obj +} + +// The organizationally defined information encoded in UTF-8 (as specified in IETF RFC 3629). This byte stream can be of any length from 1 to 507 bytes. In the info byte stream, one byte is represented as string of 2 characters, for example 2 character string (0x)AB represents value of a single byte. So the maximum length of this attribute is 1014 (507 * 2 hex characters per byte). +// Info returns a string +func (obj *lldpOrgInfoType) Info() string { + + if obj.obj.Info == nil { + obj.setChoice(LldpOrgInfoTypeChoice.INFO) + } + + return *obj.obj.Info + +} + +// The organizationally defined information encoded in UTF-8 (as specified in IETF RFC 3629). This byte stream can be of any length from 1 to 507 bytes. In the info byte stream, one byte is represented as string of 2 characters, for example 2 character string (0x)AB represents value of a single byte. So the maximum length of this attribute is 1014 (507 * 2 hex characters per byte). +// Info returns a string +func (obj *lldpOrgInfoType) HasInfo() bool { + return obj.obj.Info != nil +} + +// The organizationally defined information encoded in UTF-8 (as specified in IETF RFC 3629). This byte stream can be of any length from 1 to 507 bytes. In the info byte stream, one byte is represented as string of 2 characters, for example 2 character string (0x)AB represents value of a single byte. So the maximum length of this attribute is 1014 (507 * 2 hex characters per byte). +// SetInfo sets the string value in the LldpOrgInfoType object +func (obj *lldpOrgInfoType) SetInfo(value string) LldpOrgInfoType { + obj.setChoice(LldpOrgInfoTypeChoice.INFO) + obj.obj.Info = &value + return obj +} + +func (obj *lldpOrgInfoType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Info != nil { + + if len(*obj.obj.Info) < 1 || len(*obj.obj.Info) > 1014 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "1 <= length of LldpOrgInfoType.Info <= 1014 but Got %d", + len(*obj.obj.Info))) + } + + } + +} + +func (obj *lldpOrgInfoType) setDefault() { + var choices_set int = 0 + var choice LldpOrgInfoTypeChoiceEnum + + if obj.obj.Info != nil { + choices_set += 1 + choice = LldpOrgInfoTypeChoice.INFO + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(LldpOrgInfoTypeChoice.INFO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in LldpOrgInfoType") + } + } else { + intVal := otg.LldpOrgInfoType_Choice_Enum_value[string(choice)] + enumValue := otg.LldpOrgInfoType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/lldp_port_id.go b/gosnappi/lldp_port_id.go new file mode 100644 index 00000000..e9a7bb3e --- /dev/null +++ b/gosnappi/lldp_port_id.go @@ -0,0 +1,476 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LldpPortId ***** +type lldpPortId struct { + validation + obj *otg.LldpPortId + marshaller marshalLldpPortId + unMarshaller unMarshalLldpPortId + interfaceNameSubtypeHolder LldpPortInterfaceNameSubType +} + +func NewLldpPortId() LldpPortId { + obj := lldpPortId{obj: &otg.LldpPortId{}} + obj.setDefault() + return &obj +} + +func (obj *lldpPortId) msg() *otg.LldpPortId { + return obj.obj +} + +func (obj *lldpPortId) setMsg(msg *otg.LldpPortId) LldpPortId { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldpPortId struct { + obj *lldpPortId +} + +type marshalLldpPortId interface { + // ToProto marshals LldpPortId to protobuf object *otg.LldpPortId + ToProto() (*otg.LldpPortId, error) + // ToPbText marshals LldpPortId to protobuf text + ToPbText() (string, error) + // ToYaml marshals LldpPortId to YAML text + ToYaml() (string, error) + // ToJson marshals LldpPortId to JSON text + ToJson() (string, error) +} + +type unMarshallldpPortId struct { + obj *lldpPortId +} + +type unMarshalLldpPortId interface { + // FromProto unmarshals LldpPortId from protobuf object *otg.LldpPortId + FromProto(msg *otg.LldpPortId) (LldpPortId, error) + // FromPbText unmarshals LldpPortId from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LldpPortId from YAML text + FromYaml(value string) error + // FromJson unmarshals LldpPortId from JSON text + FromJson(value string) error +} + +func (obj *lldpPortId) Marshal() marshalLldpPortId { + if obj.marshaller == nil { + obj.marshaller = &marshallldpPortId{obj: obj} + } + return obj.marshaller +} + +func (obj *lldpPortId) Unmarshal() unMarshalLldpPortId { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldpPortId{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldpPortId) ToProto() (*otg.LldpPortId, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldpPortId) FromProto(msg *otg.LldpPortId) (LldpPortId, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldpPortId) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldpPortId) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldpPortId) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpPortId) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldpPortId) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpPortId) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldpPortId) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldpPortId) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldpPortId) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldpPortId) Clone() (LldpPortId, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldpPortId() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *lldpPortId) setNil() { + obj.interfaceNameSubtypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// LldpPortId is the Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent.This field identifies the format and source of the port identifier string. It is based on the enumerator defined by the PtopoPortIdType object from RFC2922. +type LldpPortId interface { + Validation + // msg marshals LldpPortId to protobuf object *otg.LldpPortId + // and doesn't set defaults + msg() *otg.LldpPortId + // setMsg unmarshals LldpPortId from protobuf object *otg.LldpPortId + // and doesn't set defaults + setMsg(*otg.LldpPortId) LldpPortId + // provides marshal interface + Marshal() marshalLldpPortId + // provides unmarshal interface + Unmarshal() unMarshalLldpPortId + // validate validates LldpPortId + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LldpPortId, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns LldpPortIdChoiceEnum, set in LldpPortId + Choice() LldpPortIdChoiceEnum + // setChoice assigns LldpPortIdChoiceEnum provided by user to LldpPortId + setChoice(value LldpPortIdChoiceEnum) LldpPortId + // HasChoice checks if Choice has been set in LldpPortId + HasChoice() bool + // MacAddressSubtype returns string, set in LldpPortId. + MacAddressSubtype() string + // SetMacAddressSubtype assigns string provided by user to LldpPortId + SetMacAddressSubtype(value string) LldpPortId + // HasMacAddressSubtype checks if MacAddressSubtype has been set in LldpPortId + HasMacAddressSubtype() bool + // InterfaceNameSubtype returns LldpPortInterfaceNameSubType, set in LldpPortId. + // LldpPortInterfaceNameSubType is the interface name configured in the Port ID TLV. + InterfaceNameSubtype() LldpPortInterfaceNameSubType + // SetInterfaceNameSubtype assigns LldpPortInterfaceNameSubType provided by user to LldpPortId. + // LldpPortInterfaceNameSubType is the interface name configured in the Port ID TLV. + SetInterfaceNameSubtype(value LldpPortInterfaceNameSubType) LldpPortId + // HasInterfaceNameSubtype checks if InterfaceNameSubtype has been set in LldpPortId + HasInterfaceNameSubtype() bool + // LocalSubtype returns string, set in LldpPortId. + LocalSubtype() string + // SetLocalSubtype assigns string provided by user to LldpPortId + SetLocalSubtype(value string) LldpPortId + // HasLocalSubtype checks if LocalSubtype has been set in LldpPortId + HasLocalSubtype() bool + setNil() +} + +type LldpPortIdChoiceEnum string + +// Enum of Choice on LldpPortId +var LldpPortIdChoice = struct { + MAC_ADDRESS_SUBTYPE LldpPortIdChoiceEnum + INTERFACE_NAME_SUBTYPE LldpPortIdChoiceEnum + LOCAL_SUBTYPE LldpPortIdChoiceEnum +}{ + MAC_ADDRESS_SUBTYPE: LldpPortIdChoiceEnum("mac_address_subtype"), + INTERFACE_NAME_SUBTYPE: LldpPortIdChoiceEnum("interface_name_subtype"), + LOCAL_SUBTYPE: LldpPortIdChoiceEnum("local_subtype"), +} + +func (obj *lldpPortId) Choice() LldpPortIdChoiceEnum { + return LldpPortIdChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// Port ID subtype to be used in Port ID TLV. +// Choice returns a string +func (obj *lldpPortId) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *lldpPortId) setChoice(value LldpPortIdChoiceEnum) LldpPortId { + intValue, ok := otg.LldpPortId_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LldpPortIdChoiceEnum", string(value))) + return obj + } + enumValue := otg.LldpPortId_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.LocalSubtype = nil + obj.obj.InterfaceNameSubtype = nil + obj.interfaceNameSubtypeHolder = nil + obj.obj.MacAddressSubtype = nil + + if value == LldpPortIdChoice.INTERFACE_NAME_SUBTYPE { + obj.obj.InterfaceNameSubtype = NewLldpPortInterfaceNameSubType().msg() + } + + return obj +} + +// The MAC Address configured in the Port ID TLV. +// MacAddressSubtype returns a string +func (obj *lldpPortId) MacAddressSubtype() string { + + if obj.obj.MacAddressSubtype == nil { + obj.setChoice(LldpPortIdChoice.MAC_ADDRESS_SUBTYPE) + } + + return *obj.obj.MacAddressSubtype + +} + +// The MAC Address configured in the Port ID TLV. +// MacAddressSubtype returns a string +func (obj *lldpPortId) HasMacAddressSubtype() bool { + return obj.obj.MacAddressSubtype != nil +} + +// The MAC Address configured in the Port ID TLV. +// SetMacAddressSubtype sets the string value in the LldpPortId object +func (obj *lldpPortId) SetMacAddressSubtype(value string) LldpPortId { + obj.setChoice(LldpPortIdChoice.MAC_ADDRESS_SUBTYPE) + obj.obj.MacAddressSubtype = &value + return obj +} + +// description is TBD +// InterfaceNameSubtype returns a LldpPortInterfaceNameSubType +func (obj *lldpPortId) InterfaceNameSubtype() LldpPortInterfaceNameSubType { + if obj.obj.InterfaceNameSubtype == nil { + obj.setChoice(LldpPortIdChoice.INTERFACE_NAME_SUBTYPE) + } + if obj.interfaceNameSubtypeHolder == nil { + obj.interfaceNameSubtypeHolder = &lldpPortInterfaceNameSubType{obj: obj.obj.InterfaceNameSubtype} + } + return obj.interfaceNameSubtypeHolder +} + +// description is TBD +// InterfaceNameSubtype returns a LldpPortInterfaceNameSubType +func (obj *lldpPortId) HasInterfaceNameSubtype() bool { + return obj.obj.InterfaceNameSubtype != nil +} + +// description is TBD +// SetInterfaceNameSubtype sets the LldpPortInterfaceNameSubType value in the LldpPortId object +func (obj *lldpPortId) SetInterfaceNameSubtype(value LldpPortInterfaceNameSubType) LldpPortId { + obj.setChoice(LldpPortIdChoice.INTERFACE_NAME_SUBTYPE) + obj.interfaceNameSubtypeHolder = nil + obj.obj.InterfaceNameSubtype = value.msg() + + return obj +} + +// The Locally assigned name configured in the Port ID TLV. +// LocalSubtype returns a string +func (obj *lldpPortId) LocalSubtype() string { + + if obj.obj.LocalSubtype == nil { + obj.setChoice(LldpPortIdChoice.LOCAL_SUBTYPE) + } + + return *obj.obj.LocalSubtype + +} + +// The Locally assigned name configured in the Port ID TLV. +// LocalSubtype returns a string +func (obj *lldpPortId) HasLocalSubtype() bool { + return obj.obj.LocalSubtype != nil +} + +// The Locally assigned name configured in the Port ID TLV. +// SetLocalSubtype sets the string value in the LldpPortId object +func (obj *lldpPortId) SetLocalSubtype(value string) LldpPortId { + obj.setChoice(LldpPortIdChoice.LOCAL_SUBTYPE) + obj.obj.LocalSubtype = &value + return obj +} + +func (obj *lldpPortId) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.InterfaceNameSubtype != nil { + + obj.InterfaceNameSubtype().validateObj(vObj, set_default) + } + +} + +func (obj *lldpPortId) setDefault() { + var choices_set int = 0 + var choice LldpPortIdChoiceEnum + + if obj.obj.MacAddressSubtype != nil { + choices_set += 1 + choice = LldpPortIdChoice.MAC_ADDRESS_SUBTYPE + } + + if obj.obj.InterfaceNameSubtype != nil { + choices_set += 1 + choice = LldpPortIdChoice.INTERFACE_NAME_SUBTYPE + } + + if obj.obj.LocalSubtype != nil { + choices_set += 1 + choice = LldpPortIdChoice.LOCAL_SUBTYPE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(LldpPortIdChoice.INTERFACE_NAME_SUBTYPE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in LldpPortId") + } + } else { + intVal := otg.LldpPortId_Choice_Enum_value[string(choice)] + enumValue := otg.LldpPortId_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/lldp_port_interface_name_sub_type.go b/gosnappi/lldp_port_interface_name_sub_type.go new file mode 100644 index 00000000..5b91c989 --- /dev/null +++ b/gosnappi/lldp_port_interface_name_sub_type.go @@ -0,0 +1,402 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LldpPortInterfaceNameSubType ***** +type lldpPortInterfaceNameSubType struct { + validation + obj *otg.LldpPortInterfaceNameSubType + marshaller marshalLldpPortInterfaceNameSubType + unMarshaller unMarshalLldpPortInterfaceNameSubType +} + +func NewLldpPortInterfaceNameSubType() LldpPortInterfaceNameSubType { + obj := lldpPortInterfaceNameSubType{obj: &otg.LldpPortInterfaceNameSubType{}} + obj.setDefault() + return &obj +} + +func (obj *lldpPortInterfaceNameSubType) msg() *otg.LldpPortInterfaceNameSubType { + return obj.obj +} + +func (obj *lldpPortInterfaceNameSubType) setMsg(msg *otg.LldpPortInterfaceNameSubType) LldpPortInterfaceNameSubType { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldpPortInterfaceNameSubType struct { + obj *lldpPortInterfaceNameSubType +} + +type marshalLldpPortInterfaceNameSubType interface { + // ToProto marshals LldpPortInterfaceNameSubType to protobuf object *otg.LldpPortInterfaceNameSubType + ToProto() (*otg.LldpPortInterfaceNameSubType, error) + // ToPbText marshals LldpPortInterfaceNameSubType to protobuf text + ToPbText() (string, error) + // ToYaml marshals LldpPortInterfaceNameSubType to YAML text + ToYaml() (string, error) + // ToJson marshals LldpPortInterfaceNameSubType to JSON text + ToJson() (string, error) +} + +type unMarshallldpPortInterfaceNameSubType struct { + obj *lldpPortInterfaceNameSubType +} + +type unMarshalLldpPortInterfaceNameSubType interface { + // FromProto unmarshals LldpPortInterfaceNameSubType from protobuf object *otg.LldpPortInterfaceNameSubType + FromProto(msg *otg.LldpPortInterfaceNameSubType) (LldpPortInterfaceNameSubType, error) + // FromPbText unmarshals LldpPortInterfaceNameSubType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LldpPortInterfaceNameSubType from YAML text + FromYaml(value string) error + // FromJson unmarshals LldpPortInterfaceNameSubType from JSON text + FromJson(value string) error +} + +func (obj *lldpPortInterfaceNameSubType) Marshal() marshalLldpPortInterfaceNameSubType { + if obj.marshaller == nil { + obj.marshaller = &marshallldpPortInterfaceNameSubType{obj: obj} + } + return obj.marshaller +} + +func (obj *lldpPortInterfaceNameSubType) Unmarshal() unMarshalLldpPortInterfaceNameSubType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldpPortInterfaceNameSubType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldpPortInterfaceNameSubType) ToProto() (*otg.LldpPortInterfaceNameSubType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldpPortInterfaceNameSubType) FromProto(msg *otg.LldpPortInterfaceNameSubType) (LldpPortInterfaceNameSubType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldpPortInterfaceNameSubType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldpPortInterfaceNameSubType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldpPortInterfaceNameSubType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpPortInterfaceNameSubType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldpPortInterfaceNameSubType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpPortInterfaceNameSubType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldpPortInterfaceNameSubType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldpPortInterfaceNameSubType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldpPortInterfaceNameSubType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldpPortInterfaceNameSubType) Clone() (LldpPortInterfaceNameSubType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldpPortInterfaceNameSubType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LldpPortInterfaceNameSubType is the interface name configured in the Port ID TLV. +type LldpPortInterfaceNameSubType interface { + Validation + // msg marshals LldpPortInterfaceNameSubType to protobuf object *otg.LldpPortInterfaceNameSubType + // and doesn't set defaults + msg() *otg.LldpPortInterfaceNameSubType + // setMsg unmarshals LldpPortInterfaceNameSubType from protobuf object *otg.LldpPortInterfaceNameSubType + // and doesn't set defaults + setMsg(*otg.LldpPortInterfaceNameSubType) LldpPortInterfaceNameSubType + // provides marshal interface + Marshal() marshalLldpPortInterfaceNameSubType + // provides unmarshal interface + Unmarshal() unMarshalLldpPortInterfaceNameSubType + // validate validates LldpPortInterfaceNameSubType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LldpPortInterfaceNameSubType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns LldpPortInterfaceNameSubTypeChoiceEnum, set in LldpPortInterfaceNameSubType + Choice() LldpPortInterfaceNameSubTypeChoiceEnum + // setChoice assigns LldpPortInterfaceNameSubTypeChoiceEnum provided by user to LldpPortInterfaceNameSubType + setChoice(value LldpPortInterfaceNameSubTypeChoiceEnum) LldpPortInterfaceNameSubType + // HasChoice checks if Choice has been set in LldpPortInterfaceNameSubType + HasChoice() bool + // Auto returns string, set in LldpPortInterfaceNameSubType. + Auto() string + // HasAuto checks if Auto has been set in LldpPortInterfaceNameSubType + HasAuto() bool + // Value returns string, set in LldpPortInterfaceNameSubType. + Value() string + // SetValue assigns string provided by user to LldpPortInterfaceNameSubType + SetValue(value string) LldpPortInterfaceNameSubType + // HasValue checks if Value has been set in LldpPortInterfaceNameSubType + HasValue() bool +} + +type LldpPortInterfaceNameSubTypeChoiceEnum string + +// Enum of Choice on LldpPortInterfaceNameSubType +var LldpPortInterfaceNameSubTypeChoice = struct { + AUTO LldpPortInterfaceNameSubTypeChoiceEnum + VALUE LldpPortInterfaceNameSubTypeChoiceEnum +}{ + AUTO: LldpPortInterfaceNameSubTypeChoiceEnum("auto"), + VALUE: LldpPortInterfaceNameSubTypeChoiceEnum("value"), +} + +func (obj *lldpPortInterfaceNameSubType) Choice() LldpPortInterfaceNameSubTypeChoiceEnum { + return LldpPortInterfaceNameSubTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// In auto mode the system generated value is set for this property, while if the choice is selected as value, a user configured value will be used for this property. +// Choice returns a string +func (obj *lldpPortInterfaceNameSubType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *lldpPortInterfaceNameSubType) setChoice(value LldpPortInterfaceNameSubTypeChoiceEnum) LldpPortInterfaceNameSubType { + intValue, ok := otg.LldpPortInterfaceNameSubType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LldpPortInterfaceNameSubTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.LldpPortInterfaceNameSubType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Value = nil + obj.obj.Auto = nil + return obj +} + +// The OTG implementation must provide a system generated value for this property. +// Auto returns a string +func (obj *lldpPortInterfaceNameSubType) Auto() string { + + if obj.obj.Auto == nil { + obj.setChoice(LldpPortInterfaceNameSubTypeChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation must provide a system generated value for this property. +// Auto returns a string +func (obj *lldpPortInterfaceNameSubType) HasAuto() bool { + return obj.obj.Auto != nil +} + +// User must specify a value if mode is not auto. +// Value returns a string +func (obj *lldpPortInterfaceNameSubType) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(LldpPortInterfaceNameSubTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// User must specify a value if mode is not auto. +// Value returns a string +func (obj *lldpPortInterfaceNameSubType) HasValue() bool { + return obj.obj.Value != nil +} + +// User must specify a value if mode is not auto. +// SetValue sets the string value in the LldpPortInterfaceNameSubType object +func (obj *lldpPortInterfaceNameSubType) SetValue(value string) LldpPortInterfaceNameSubType { + obj.setChoice(LldpPortInterfaceNameSubTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +func (obj *lldpPortInterfaceNameSubType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *lldpPortInterfaceNameSubType) setDefault() { + var choices_set int = 0 + var choice LldpPortInterfaceNameSubTypeChoiceEnum + + if obj.obj.Auto != nil { + choices_set += 1 + choice = LldpPortInterfaceNameSubTypeChoice.AUTO + } + + if obj.obj.Value != nil { + choices_set += 1 + choice = LldpPortInterfaceNameSubTypeChoice.VALUE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(LldpPortInterfaceNameSubTypeChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in LldpPortInterfaceNameSubType") + } + } else { + intVal := otg.LldpPortInterfaceNameSubType_Choice_Enum_value[string(choice)] + enumValue := otg.LldpPortInterfaceNameSubType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/lldp_system_name.go b/gosnappi/lldp_system_name.go new file mode 100644 index 00000000..2ffd6b46 --- /dev/null +++ b/gosnappi/lldp_system_name.go @@ -0,0 +1,402 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** LldpSystemName ***** +type lldpSystemName struct { + validation + obj *otg.LldpSystemName + marshaller marshalLldpSystemName + unMarshaller unMarshalLldpSystemName +} + +func NewLldpSystemName() LldpSystemName { + obj := lldpSystemName{obj: &otg.LldpSystemName{}} + obj.setDefault() + return &obj +} + +func (obj *lldpSystemName) msg() *otg.LldpSystemName { + return obj.obj +} + +func (obj *lldpSystemName) setMsg(msg *otg.LldpSystemName) LldpSystemName { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshallldpSystemName struct { + obj *lldpSystemName +} + +type marshalLldpSystemName interface { + // ToProto marshals LldpSystemName to protobuf object *otg.LldpSystemName + ToProto() (*otg.LldpSystemName, error) + // ToPbText marshals LldpSystemName to protobuf text + ToPbText() (string, error) + // ToYaml marshals LldpSystemName to YAML text + ToYaml() (string, error) + // ToJson marshals LldpSystemName to JSON text + ToJson() (string, error) +} + +type unMarshallldpSystemName struct { + obj *lldpSystemName +} + +type unMarshalLldpSystemName interface { + // FromProto unmarshals LldpSystemName from protobuf object *otg.LldpSystemName + FromProto(msg *otg.LldpSystemName) (LldpSystemName, error) + // FromPbText unmarshals LldpSystemName from protobuf text + FromPbText(value string) error + // FromYaml unmarshals LldpSystemName from YAML text + FromYaml(value string) error + // FromJson unmarshals LldpSystemName from JSON text + FromJson(value string) error +} + +func (obj *lldpSystemName) Marshal() marshalLldpSystemName { + if obj.marshaller == nil { + obj.marshaller = &marshallldpSystemName{obj: obj} + } + return obj.marshaller +} + +func (obj *lldpSystemName) Unmarshal() unMarshalLldpSystemName { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshallldpSystemName{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshallldpSystemName) ToProto() (*otg.LldpSystemName, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshallldpSystemName) FromProto(msg *otg.LldpSystemName) (LldpSystemName, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshallldpSystemName) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshallldpSystemName) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshallldpSystemName) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpSystemName) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshallldpSystemName) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshallldpSystemName) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *lldpSystemName) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *lldpSystemName) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *lldpSystemName) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *lldpSystemName) Clone() (LldpSystemName, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewLldpSystemName() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// LldpSystemName is the system Name configured in the System Name TLV. +type LldpSystemName interface { + Validation + // msg marshals LldpSystemName to protobuf object *otg.LldpSystemName + // and doesn't set defaults + msg() *otg.LldpSystemName + // setMsg unmarshals LldpSystemName from protobuf object *otg.LldpSystemName + // and doesn't set defaults + setMsg(*otg.LldpSystemName) LldpSystemName + // provides marshal interface + Marshal() marshalLldpSystemName + // provides unmarshal interface + Unmarshal() unMarshalLldpSystemName + // validate validates LldpSystemName + validate() error + // A stringer function + String() string + // Clones the object + Clone() (LldpSystemName, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns LldpSystemNameChoiceEnum, set in LldpSystemName + Choice() LldpSystemNameChoiceEnum + // setChoice assigns LldpSystemNameChoiceEnum provided by user to LldpSystemName + setChoice(value LldpSystemNameChoiceEnum) LldpSystemName + // HasChoice checks if Choice has been set in LldpSystemName + HasChoice() bool + // Auto returns string, set in LldpSystemName. + Auto() string + // HasAuto checks if Auto has been set in LldpSystemName + HasAuto() bool + // Value returns string, set in LldpSystemName. + Value() string + // SetValue assigns string provided by user to LldpSystemName + SetValue(value string) LldpSystemName + // HasValue checks if Value has been set in LldpSystemName + HasValue() bool +} + +type LldpSystemNameChoiceEnum string + +// Enum of Choice on LldpSystemName +var LldpSystemNameChoice = struct { + AUTO LldpSystemNameChoiceEnum + VALUE LldpSystemNameChoiceEnum +}{ + AUTO: LldpSystemNameChoiceEnum("auto"), + VALUE: LldpSystemNameChoiceEnum("value"), +} + +func (obj *lldpSystemName) Choice() LldpSystemNameChoiceEnum { + return LldpSystemNameChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// In auto mode the system generated value is set for this property, while if the choice is selected as value, a user configured value will be used for this property. +// Choice returns a string +func (obj *lldpSystemName) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *lldpSystemName) setChoice(value LldpSystemNameChoiceEnum) LldpSystemName { + intValue, ok := otg.LldpSystemName_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on LldpSystemNameChoiceEnum", string(value))) + return obj + } + enumValue := otg.LldpSystemName_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Value = nil + obj.obj.Auto = nil + return obj +} + +// The OTG implementation must provide a system generated value for this property. +// Auto returns a string +func (obj *lldpSystemName) Auto() string { + + if obj.obj.Auto == nil { + obj.setChoice(LldpSystemNameChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation must provide a system generated value for this property. +// Auto returns a string +func (obj *lldpSystemName) HasAuto() bool { + return obj.obj.Auto != nil +} + +// User must specify a value if mode is not auto. +// Value returns a string +func (obj *lldpSystemName) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(LldpSystemNameChoice.VALUE) + } + + return *obj.obj.Value + +} + +// User must specify a value if mode is not auto. +// Value returns a string +func (obj *lldpSystemName) HasValue() bool { + return obj.obj.Value != nil +} + +// User must specify a value if mode is not auto. +// SetValue sets the string value in the LldpSystemName object +func (obj *lldpSystemName) SetValue(value string) LldpSystemName { + obj.setChoice(LldpSystemNameChoice.VALUE) + obj.obj.Value = &value + return obj +} + +func (obj *lldpSystemName) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *lldpSystemName) setDefault() { + var choices_set int = 0 + var choice LldpSystemNameChoiceEnum + + if obj.obj.Auto != nil { + choices_set += 1 + choice = LldpSystemNameChoice.AUTO + } + + if obj.obj.Value != nil { + choices_set += 1 + choice = LldpSystemNameChoice.VALUE + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(LldpSystemNameChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in LldpSystemName") + } + } else { + intVal := otg.LldpSystemName_Choice_Enum_value[string(choice)] + enumValue := otg.LldpSystemName_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/mac_route_address.go b/gosnappi/mac_route_address.go new file mode 100644 index 00000000..a8ba2865 --- /dev/null +++ b/gosnappi/mac_route_address.go @@ -0,0 +1,434 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** MACRouteAddress ***** +type mACRouteAddress struct { + validation + obj *otg.MACRouteAddress + marshaller marshalMACRouteAddress + unMarshaller unMarshalMACRouteAddress +} + +func NewMACRouteAddress() MACRouteAddress { + obj := mACRouteAddress{obj: &otg.MACRouteAddress{}} + obj.setDefault() + return &obj +} + +func (obj *mACRouteAddress) msg() *otg.MACRouteAddress { + return obj.obj +} + +func (obj *mACRouteAddress) setMsg(msg *otg.MACRouteAddress) MACRouteAddress { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalmACRouteAddress struct { + obj *mACRouteAddress +} + +type marshalMACRouteAddress interface { + // ToProto marshals MACRouteAddress to protobuf object *otg.MACRouteAddress + ToProto() (*otg.MACRouteAddress, error) + // ToPbText marshals MACRouteAddress to protobuf text + ToPbText() (string, error) + // ToYaml marshals MACRouteAddress to YAML text + ToYaml() (string, error) + // ToJson marshals MACRouteAddress to JSON text + ToJson() (string, error) +} + +type unMarshalmACRouteAddress struct { + obj *mACRouteAddress +} + +type unMarshalMACRouteAddress interface { + // FromProto unmarshals MACRouteAddress from protobuf object *otg.MACRouteAddress + FromProto(msg *otg.MACRouteAddress) (MACRouteAddress, error) + // FromPbText unmarshals MACRouteAddress from protobuf text + FromPbText(value string) error + // FromYaml unmarshals MACRouteAddress from YAML text + FromYaml(value string) error + // FromJson unmarshals MACRouteAddress from JSON text + FromJson(value string) error +} + +func (obj *mACRouteAddress) Marshal() marshalMACRouteAddress { + if obj.marshaller == nil { + obj.marshaller = &marshalmACRouteAddress{obj: obj} + } + return obj.marshaller +} + +func (obj *mACRouteAddress) Unmarshal() unMarshalMACRouteAddress { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalmACRouteAddress{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalmACRouteAddress) ToProto() (*otg.MACRouteAddress, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalmACRouteAddress) FromProto(msg *otg.MACRouteAddress) (MACRouteAddress, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalmACRouteAddress) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalmACRouteAddress) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalmACRouteAddress) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalmACRouteAddress) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalmACRouteAddress) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalmACRouteAddress) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *mACRouteAddress) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *mACRouteAddress) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *mACRouteAddress) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *mACRouteAddress) Clone() (MACRouteAddress, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewMACRouteAddress() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// MACRouteAddress is a container for MAC route addresses. +type MACRouteAddress interface { + Validation + // msg marshals MACRouteAddress to protobuf object *otg.MACRouteAddress + // and doesn't set defaults + msg() *otg.MACRouteAddress + // setMsg unmarshals MACRouteAddress from protobuf object *otg.MACRouteAddress + // and doesn't set defaults + setMsg(*otg.MACRouteAddress) MACRouteAddress + // provides marshal interface + Marshal() marshalMACRouteAddress + // provides unmarshal interface + Unmarshal() unMarshalMACRouteAddress + // validate validates MACRouteAddress + validate() error + // A stringer function + String() string + // Clones the object + Clone() (MACRouteAddress, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Address returns string, set in MACRouteAddress. + Address() string + // SetAddress assigns string provided by user to MACRouteAddress + SetAddress(value string) MACRouteAddress + // Prefix returns uint32, set in MACRouteAddress. + Prefix() uint32 + // SetPrefix assigns uint32 provided by user to MACRouteAddress + SetPrefix(value uint32) MACRouteAddress + // HasPrefix checks if Prefix has been set in MACRouteAddress + HasPrefix() bool + // Count returns uint32, set in MACRouteAddress. + Count() uint32 + // SetCount assigns uint32 provided by user to MACRouteAddress + SetCount(value uint32) MACRouteAddress + // HasCount checks if Count has been set in MACRouteAddress + HasCount() bool + // Step returns uint32, set in MACRouteAddress. + Step() uint32 + // SetStep assigns uint32 provided by user to MACRouteAddress + SetStep(value uint32) MACRouteAddress + // HasStep checks if Step has been set in MACRouteAddress + HasStep() bool +} + +// The starting address of the MAC Range. +// Address returns a string +func (obj *mACRouteAddress) Address() string { + + return *obj.obj.Address + +} + +// The starting address of the MAC Range. +// SetAddress sets the string value in the MACRouteAddress object +func (obj *mACRouteAddress) SetAddress(value string) MACRouteAddress { + + obj.obj.Address = &value + return obj +} + +// The MAC prefix length to be applied to the address. +// Prefix returns a uint32 +func (obj *mACRouteAddress) Prefix() uint32 { + + return *obj.obj.Prefix + +} + +// The MAC prefix length to be applied to the address. +// Prefix returns a uint32 +func (obj *mACRouteAddress) HasPrefix() bool { + return obj.obj.Prefix != nil +} + +// The MAC prefix length to be applied to the address. +// SetPrefix sets the uint32 value in the MACRouteAddress object +func (obj *mACRouteAddress) SetPrefix(value uint32) MACRouteAddress { + + obj.obj.Prefix = &value + return obj +} + +// The total number of mac addresses in the range. +// Count returns a uint32 +func (obj *mACRouteAddress) Count() uint32 { + + return *obj.obj.Count + +} + +// The total number of mac addresses in the range. +// Count returns a uint32 +func (obj *mACRouteAddress) HasCount() bool { + return obj.obj.Count != nil +} + +// The total number of mac addresses in the range. +// SetCount sets the uint32 value in the MACRouteAddress object +func (obj *mACRouteAddress) SetCount(value uint32) MACRouteAddress { + + obj.obj.Count = &value + return obj +} + +// Increments the mac address prefixes within a mac range where multiple routes are present. The value is incremented according to the mac prefix Length and Step. +// Step returns a uint32 +func (obj *mACRouteAddress) Step() uint32 { + + return *obj.obj.Step + +} + +// Increments the mac address prefixes within a mac range where multiple routes are present. The value is incremented according to the mac prefix Length and Step. +// Step returns a uint32 +func (obj *mACRouteAddress) HasStep() bool { + return obj.obj.Step != nil +} + +// Increments the mac address prefixes within a mac range where multiple routes are present. The value is incremented according to the mac prefix Length and Step. +// SetStep sets the uint32 value in the MACRouteAddress object +func (obj *mACRouteAddress) SetStep(value uint32) MACRouteAddress { + + obj.obj.Step = &value + return obj +} + +func (obj *mACRouteAddress) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Address is required + if obj.obj.Address == nil { + vObj.validationErrors = append(vObj.validationErrors, "Address is required field on interface MACRouteAddress") + } + if obj.obj.Address != nil { + + err := obj.validateMac(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on MACRouteAddress.Address")) + } + + } + + if obj.obj.Prefix != nil { + + if *obj.obj.Prefix > 48 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= MACRouteAddress.Prefix <= 48 but Got %d", *obj.obj.Prefix)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count < 1 || *obj.obj.Count > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= MACRouteAddress.Count <= 4294967295 but Got %d", *obj.obj.Count)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step < 1 || *obj.obj.Step > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= MACRouteAddress.Step <= 4294967295 but Got %d", *obj.obj.Step)) + } + + } + +} + +func (obj *mACRouteAddress) setDefault() { + if obj.obj.Prefix == nil { + obj.SetPrefix(48) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + +} diff --git a/gosnappi/metric_latency.go b/gosnappi/metric_latency.go new file mode 100644 index 00000000..aa7f74db --- /dev/null +++ b/gosnappi/metric_latency.go @@ -0,0 +1,366 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** MetricLatency ***** +type metricLatency struct { + validation + obj *otg.MetricLatency + marshaller marshalMetricLatency + unMarshaller unMarshalMetricLatency +} + +func NewMetricLatency() MetricLatency { + obj := metricLatency{obj: &otg.MetricLatency{}} + obj.setDefault() + return &obj +} + +func (obj *metricLatency) msg() *otg.MetricLatency { + return obj.obj +} + +func (obj *metricLatency) setMsg(msg *otg.MetricLatency) MetricLatency { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalmetricLatency struct { + obj *metricLatency +} + +type marshalMetricLatency interface { + // ToProto marshals MetricLatency to protobuf object *otg.MetricLatency + ToProto() (*otg.MetricLatency, error) + // ToPbText marshals MetricLatency to protobuf text + ToPbText() (string, error) + // ToYaml marshals MetricLatency to YAML text + ToYaml() (string, error) + // ToJson marshals MetricLatency to JSON text + ToJson() (string, error) +} + +type unMarshalmetricLatency struct { + obj *metricLatency +} + +type unMarshalMetricLatency interface { + // FromProto unmarshals MetricLatency from protobuf object *otg.MetricLatency + FromProto(msg *otg.MetricLatency) (MetricLatency, error) + // FromPbText unmarshals MetricLatency from protobuf text + FromPbText(value string) error + // FromYaml unmarshals MetricLatency from YAML text + FromYaml(value string) error + // FromJson unmarshals MetricLatency from JSON text + FromJson(value string) error +} + +func (obj *metricLatency) Marshal() marshalMetricLatency { + if obj.marshaller == nil { + obj.marshaller = &marshalmetricLatency{obj: obj} + } + return obj.marshaller +} + +func (obj *metricLatency) Unmarshal() unMarshalMetricLatency { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalmetricLatency{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalmetricLatency) ToProto() (*otg.MetricLatency, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalmetricLatency) FromProto(msg *otg.MetricLatency) (MetricLatency, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalmetricLatency) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalmetricLatency) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalmetricLatency) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalmetricLatency) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalmetricLatency) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalmetricLatency) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *metricLatency) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *metricLatency) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *metricLatency) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *metricLatency) Clone() (MetricLatency, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewMetricLatency() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// MetricLatency is the container for latency metrics. +// The min/max/avg values are dependent on the type of latency measurement +// mode that is configured. +// The container will be empty if the latency has not been configured for +// the flow. +type MetricLatency interface { + Validation + // msg marshals MetricLatency to protobuf object *otg.MetricLatency + // and doesn't set defaults + msg() *otg.MetricLatency + // setMsg unmarshals MetricLatency from protobuf object *otg.MetricLatency + // and doesn't set defaults + setMsg(*otg.MetricLatency) MetricLatency + // provides marshal interface + Marshal() marshalMetricLatency + // provides unmarshal interface + Unmarshal() unMarshalMetricLatency + // validate validates MetricLatency + validate() error + // A stringer function + String() string + // Clones the object + Clone() (MetricLatency, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // MinimumNs returns float64, set in MetricLatency. + MinimumNs() float64 + // SetMinimumNs assigns float64 provided by user to MetricLatency + SetMinimumNs(value float64) MetricLatency + // HasMinimumNs checks if MinimumNs has been set in MetricLatency + HasMinimumNs() bool + // MaximumNs returns float64, set in MetricLatency. + MaximumNs() float64 + // SetMaximumNs assigns float64 provided by user to MetricLatency + SetMaximumNs(value float64) MetricLatency + // HasMaximumNs checks if MaximumNs has been set in MetricLatency + HasMaximumNs() bool + // AverageNs returns float64, set in MetricLatency. + AverageNs() float64 + // SetAverageNs assigns float64 provided by user to MetricLatency + SetAverageNs(value float64) MetricLatency + // HasAverageNs checks if AverageNs has been set in MetricLatency + HasAverageNs() bool +} + +// Minimum latency in nanoseconds +// MinimumNs returns a float64 +func (obj *metricLatency) MinimumNs() float64 { + + return *obj.obj.MinimumNs + +} + +// Minimum latency in nanoseconds +// MinimumNs returns a float64 +func (obj *metricLatency) HasMinimumNs() bool { + return obj.obj.MinimumNs != nil +} + +// Minimum latency in nanoseconds +// SetMinimumNs sets the float64 value in the MetricLatency object +func (obj *metricLatency) SetMinimumNs(value float64) MetricLatency { + + obj.obj.MinimumNs = &value + return obj +} + +// Maximum latency in nanoseconds +// MaximumNs returns a float64 +func (obj *metricLatency) MaximumNs() float64 { + + return *obj.obj.MaximumNs + +} + +// Maximum latency in nanoseconds +// MaximumNs returns a float64 +func (obj *metricLatency) HasMaximumNs() bool { + return obj.obj.MaximumNs != nil +} + +// Maximum latency in nanoseconds +// SetMaximumNs sets the float64 value in the MetricLatency object +func (obj *metricLatency) SetMaximumNs(value float64) MetricLatency { + + obj.obj.MaximumNs = &value + return obj +} + +// Average latency in nanoseconds +// AverageNs returns a float64 +func (obj *metricLatency) AverageNs() float64 { + + return *obj.obj.AverageNs + +} + +// Average latency in nanoseconds +// AverageNs returns a float64 +func (obj *metricLatency) HasAverageNs() bool { + return obj.obj.AverageNs != nil +} + +// Average latency in nanoseconds +// SetAverageNs sets the float64 value in the MetricLatency object +func (obj *metricLatency) SetAverageNs(value float64) MetricLatency { + + obj.obj.AverageNs = &value + return obj +} + +func (obj *metricLatency) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *metricLatency) setDefault() { + +} diff --git a/gosnappi/metric_timestamp.go b/gosnappi/metric_timestamp.go new file mode 100644 index 00000000..f2f637fc --- /dev/null +++ b/gosnappi/metric_timestamp.go @@ -0,0 +1,336 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** MetricTimestamp ***** +type metricTimestamp struct { + validation + obj *otg.MetricTimestamp + marshaller marshalMetricTimestamp + unMarshaller unMarshalMetricTimestamp +} + +func NewMetricTimestamp() MetricTimestamp { + obj := metricTimestamp{obj: &otg.MetricTimestamp{}} + obj.setDefault() + return &obj +} + +func (obj *metricTimestamp) msg() *otg.MetricTimestamp { + return obj.obj +} + +func (obj *metricTimestamp) setMsg(msg *otg.MetricTimestamp) MetricTimestamp { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalmetricTimestamp struct { + obj *metricTimestamp +} + +type marshalMetricTimestamp interface { + // ToProto marshals MetricTimestamp to protobuf object *otg.MetricTimestamp + ToProto() (*otg.MetricTimestamp, error) + // ToPbText marshals MetricTimestamp to protobuf text + ToPbText() (string, error) + // ToYaml marshals MetricTimestamp to YAML text + ToYaml() (string, error) + // ToJson marshals MetricTimestamp to JSON text + ToJson() (string, error) +} + +type unMarshalmetricTimestamp struct { + obj *metricTimestamp +} + +type unMarshalMetricTimestamp interface { + // FromProto unmarshals MetricTimestamp from protobuf object *otg.MetricTimestamp + FromProto(msg *otg.MetricTimestamp) (MetricTimestamp, error) + // FromPbText unmarshals MetricTimestamp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals MetricTimestamp from YAML text + FromYaml(value string) error + // FromJson unmarshals MetricTimestamp from JSON text + FromJson(value string) error +} + +func (obj *metricTimestamp) Marshal() marshalMetricTimestamp { + if obj.marshaller == nil { + obj.marshaller = &marshalmetricTimestamp{obj: obj} + } + return obj.marshaller +} + +func (obj *metricTimestamp) Unmarshal() unMarshalMetricTimestamp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalmetricTimestamp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalmetricTimestamp) ToProto() (*otg.MetricTimestamp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalmetricTimestamp) FromProto(msg *otg.MetricTimestamp) (MetricTimestamp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalmetricTimestamp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalmetricTimestamp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalmetricTimestamp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalmetricTimestamp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalmetricTimestamp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalmetricTimestamp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *metricTimestamp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *metricTimestamp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *metricTimestamp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *metricTimestamp) Clone() (MetricTimestamp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewMetricTimestamp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// MetricTimestamp is the container for timestamp metrics. +// The container will be empty if the timestamp has not been configured for +// the flow. +type MetricTimestamp interface { + Validation + // msg marshals MetricTimestamp to protobuf object *otg.MetricTimestamp + // and doesn't set defaults + msg() *otg.MetricTimestamp + // setMsg unmarshals MetricTimestamp from protobuf object *otg.MetricTimestamp + // and doesn't set defaults + setMsg(*otg.MetricTimestamp) MetricTimestamp + // provides marshal interface + Marshal() marshalMetricTimestamp + // provides unmarshal interface + Unmarshal() unMarshalMetricTimestamp + // validate validates MetricTimestamp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (MetricTimestamp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // FirstTimestampNs returns float64, set in MetricTimestamp. + FirstTimestampNs() float64 + // SetFirstTimestampNs assigns float64 provided by user to MetricTimestamp + SetFirstTimestampNs(value float64) MetricTimestamp + // HasFirstTimestampNs checks if FirstTimestampNs has been set in MetricTimestamp + HasFirstTimestampNs() bool + // LastTimestampNs returns float64, set in MetricTimestamp. + LastTimestampNs() float64 + // SetLastTimestampNs assigns float64 provided by user to MetricTimestamp + SetLastTimestampNs(value float64) MetricTimestamp + // HasLastTimestampNs checks if LastTimestampNs has been set in MetricTimestamp + HasLastTimestampNs() bool +} + +// First timestamp in nanoseconds +// FirstTimestampNs returns a float64 +func (obj *metricTimestamp) FirstTimestampNs() float64 { + + return *obj.obj.FirstTimestampNs + +} + +// First timestamp in nanoseconds +// FirstTimestampNs returns a float64 +func (obj *metricTimestamp) HasFirstTimestampNs() bool { + return obj.obj.FirstTimestampNs != nil +} + +// First timestamp in nanoseconds +// SetFirstTimestampNs sets the float64 value in the MetricTimestamp object +func (obj *metricTimestamp) SetFirstTimestampNs(value float64) MetricTimestamp { + + obj.obj.FirstTimestampNs = &value + return obj +} + +// Last timestamp in nanoseconds +// LastTimestampNs returns a float64 +func (obj *metricTimestamp) LastTimestampNs() float64 { + + return *obj.obj.LastTimestampNs + +} + +// Last timestamp in nanoseconds +// LastTimestampNs returns a float64 +func (obj *metricTimestamp) HasLastTimestampNs() bool { + return obj.obj.LastTimestampNs != nil +} + +// Last timestamp in nanoseconds +// SetLastTimestampNs sets the float64 value in the MetricTimestamp object +func (obj *metricTimestamp) SetLastTimestampNs(value float64) MetricTimestamp { + + obj.obj.LastTimestampNs = &value + return obj +} + +func (obj *metricTimestamp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *metricTimestamp) setDefault() { + +} diff --git a/gosnappi/metrics_request.go b/gosnappi/metrics_request.go new file mode 100644 index 00000000..59bad687 --- /dev/null +++ b/gosnappi/metrics_request.go @@ -0,0 +1,1124 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** MetricsRequest ***** +type metricsRequest struct { + validation + obj *otg.MetricsRequest + marshaller marshalMetricsRequest + unMarshaller unMarshalMetricsRequest + portHolder PortMetricsRequest + flowHolder FlowMetricsRequest + bgpv4Holder Bgpv4MetricsRequest + bgpv6Holder Bgpv6MetricsRequest + isisHolder IsisMetricsRequest + lagHolder LagMetricsRequest + lacpHolder LacpMetricsRequest + lldpHolder LldpMetricsRequest + rsvpHolder RsvpMetricsRequest + dhcpv4ClientHolder Dhcpv4ClientMetricsRequest + dhcpv4ServerHolder Dhcpv4ServerMetricsRequest + dhcpv6ClientHolder Dhcpv6ClientMetricsRequest + dhcpv6ServerHolder Dhcpv6ServerMetricsRequest + ospfv2Holder Ospfv2MetricsRequest +} + +func NewMetricsRequest() MetricsRequest { + obj := metricsRequest{obj: &otg.MetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *metricsRequest) msg() *otg.MetricsRequest { + return obj.obj +} + +func (obj *metricsRequest) setMsg(msg *otg.MetricsRequest) MetricsRequest { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalmetricsRequest struct { + obj *metricsRequest +} + +type marshalMetricsRequest interface { + // ToProto marshals MetricsRequest to protobuf object *otg.MetricsRequest + ToProto() (*otg.MetricsRequest, error) + // ToPbText marshals MetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals MetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals MetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshalmetricsRequest struct { + obj *metricsRequest +} + +type unMarshalMetricsRequest interface { + // FromProto unmarshals MetricsRequest from protobuf object *otg.MetricsRequest + FromProto(msg *otg.MetricsRequest) (MetricsRequest, error) + // FromPbText unmarshals MetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals MetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals MetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *metricsRequest) Marshal() marshalMetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalmetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *metricsRequest) Unmarshal() unMarshalMetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalmetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalmetricsRequest) ToProto() (*otg.MetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalmetricsRequest) FromProto(msg *otg.MetricsRequest) (MetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalmetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalmetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalmetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalmetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalmetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalmetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *metricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *metricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *metricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *metricsRequest) Clone() (MetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewMetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *metricsRequest) setNil() { + obj.portHolder = nil + obj.flowHolder = nil + obj.bgpv4Holder = nil + obj.bgpv6Holder = nil + obj.isisHolder = nil + obj.lagHolder = nil + obj.lacpHolder = nil + obj.lldpHolder = nil + obj.rsvpHolder = nil + obj.dhcpv4ClientHolder = nil + obj.dhcpv4ServerHolder = nil + obj.dhcpv6ClientHolder = nil + obj.dhcpv6ServerHolder = nil + obj.ospfv2Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// MetricsRequest is request to traffic generator for metrics of choice. +type MetricsRequest interface { + Validation + // msg marshals MetricsRequest to protobuf object *otg.MetricsRequest + // and doesn't set defaults + msg() *otg.MetricsRequest + // setMsg unmarshals MetricsRequest from protobuf object *otg.MetricsRequest + // and doesn't set defaults + setMsg(*otg.MetricsRequest) MetricsRequest + // provides marshal interface + Marshal() marshalMetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalMetricsRequest + // validate validates MetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (MetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns MetricsRequestChoiceEnum, set in MetricsRequest + Choice() MetricsRequestChoiceEnum + // setChoice assigns MetricsRequestChoiceEnum provided by user to MetricsRequest + setChoice(value MetricsRequestChoiceEnum) MetricsRequest + // HasChoice checks if Choice has been set in MetricsRequest + HasChoice() bool + // Port returns PortMetricsRequest, set in MetricsRequest. + // PortMetricsRequest is the port result request to the traffic generator + Port() PortMetricsRequest + // SetPort assigns PortMetricsRequest provided by user to MetricsRequest. + // PortMetricsRequest is the port result request to the traffic generator + SetPort(value PortMetricsRequest) MetricsRequest + // HasPort checks if Port has been set in MetricsRequest + HasPort() bool + // Flow returns FlowMetricsRequest, set in MetricsRequest. + // FlowMetricsRequest is the container for a flow metric request. + Flow() FlowMetricsRequest + // SetFlow assigns FlowMetricsRequest provided by user to MetricsRequest. + // FlowMetricsRequest is the container for a flow metric request. + SetFlow(value FlowMetricsRequest) MetricsRequest + // HasFlow checks if Flow has been set in MetricsRequest + HasFlow() bool + // Bgpv4 returns Bgpv4MetricsRequest, set in MetricsRequest. + // Bgpv4MetricsRequest is the request to retrieve BGPv4 per peer metrics/statistics. + Bgpv4() Bgpv4MetricsRequest + // SetBgpv4 assigns Bgpv4MetricsRequest provided by user to MetricsRequest. + // Bgpv4MetricsRequest is the request to retrieve BGPv4 per peer metrics/statistics. + SetBgpv4(value Bgpv4MetricsRequest) MetricsRequest + // HasBgpv4 checks if Bgpv4 has been set in MetricsRequest + HasBgpv4() bool + // Bgpv6 returns Bgpv6MetricsRequest, set in MetricsRequest. + // Bgpv6MetricsRequest is the request to retrieve BGPv6 per peer metrics/statistics. + Bgpv6() Bgpv6MetricsRequest + // SetBgpv6 assigns Bgpv6MetricsRequest provided by user to MetricsRequest. + // Bgpv6MetricsRequest is the request to retrieve BGPv6 per peer metrics/statistics. + SetBgpv6(value Bgpv6MetricsRequest) MetricsRequest + // HasBgpv6 checks if Bgpv6 has been set in MetricsRequest + HasBgpv6() bool + // Isis returns IsisMetricsRequest, set in MetricsRequest. + // IsisMetricsRequest is the request to retrieve ISIS per Router metrics/statistics. + Isis() IsisMetricsRequest + // SetIsis assigns IsisMetricsRequest provided by user to MetricsRequest. + // IsisMetricsRequest is the request to retrieve ISIS per Router metrics/statistics. + SetIsis(value IsisMetricsRequest) MetricsRequest + // HasIsis checks if Isis has been set in MetricsRequest + HasIsis() bool + // Lag returns LagMetricsRequest, set in MetricsRequest. + // LagMetricsRequest is the request to retrieve per LAG metrics/statistics. + Lag() LagMetricsRequest + // SetLag assigns LagMetricsRequest provided by user to MetricsRequest. + // LagMetricsRequest is the request to retrieve per LAG metrics/statistics. + SetLag(value LagMetricsRequest) MetricsRequest + // HasLag checks if Lag has been set in MetricsRequest + HasLag() bool + // Lacp returns LacpMetricsRequest, set in MetricsRequest. + // LacpMetricsRequest is the request to retrieve LACP per LAG member metrics/statistics. + Lacp() LacpMetricsRequest + // SetLacp assigns LacpMetricsRequest provided by user to MetricsRequest. + // LacpMetricsRequest is the request to retrieve LACP per LAG member metrics/statistics. + SetLacp(value LacpMetricsRequest) MetricsRequest + // HasLacp checks if Lacp has been set in MetricsRequest + HasLacp() bool + // Lldp returns LldpMetricsRequest, set in MetricsRequest. + // LldpMetricsRequest is the request to retrieve LLDP per instance metrics/statistics. + Lldp() LldpMetricsRequest + // SetLldp assigns LldpMetricsRequest provided by user to MetricsRequest. + // LldpMetricsRequest is the request to retrieve LLDP per instance metrics/statistics. + SetLldp(value LldpMetricsRequest) MetricsRequest + // HasLldp checks if Lldp has been set in MetricsRequest + HasLldp() bool + // Rsvp returns RsvpMetricsRequest, set in MetricsRequest. + // RsvpMetricsRequest is the request to retrieve RSVP-TE per Router metrics/statistics. + Rsvp() RsvpMetricsRequest + // SetRsvp assigns RsvpMetricsRequest provided by user to MetricsRequest. + // RsvpMetricsRequest is the request to retrieve RSVP-TE per Router metrics/statistics. + SetRsvp(value RsvpMetricsRequest) MetricsRequest + // HasRsvp checks if Rsvp has been set in MetricsRequest + HasRsvp() bool + // Dhcpv4Client returns Dhcpv4ClientMetricsRequest, set in MetricsRequest. + // Dhcpv4ClientMetricsRequest is the request to retrieve DHCPv4 per client metrics/statistics. + Dhcpv4Client() Dhcpv4ClientMetricsRequest + // SetDhcpv4Client assigns Dhcpv4ClientMetricsRequest provided by user to MetricsRequest. + // Dhcpv4ClientMetricsRequest is the request to retrieve DHCPv4 per client metrics/statistics. + SetDhcpv4Client(value Dhcpv4ClientMetricsRequest) MetricsRequest + // HasDhcpv4Client checks if Dhcpv4Client has been set in MetricsRequest + HasDhcpv4Client() bool + // Dhcpv4Server returns Dhcpv4ServerMetricsRequest, set in MetricsRequest. + // Dhcpv4ServerMetricsRequest is the request to retrieve DHCPv4 per Server metrics/statistics. + Dhcpv4Server() Dhcpv4ServerMetricsRequest + // SetDhcpv4Server assigns Dhcpv4ServerMetricsRequest provided by user to MetricsRequest. + // Dhcpv4ServerMetricsRequest is the request to retrieve DHCPv4 per Server metrics/statistics. + SetDhcpv4Server(value Dhcpv4ServerMetricsRequest) MetricsRequest + // HasDhcpv4Server checks if Dhcpv4Server has been set in MetricsRequest + HasDhcpv4Server() bool + // Dhcpv6Client returns Dhcpv6ClientMetricsRequest, set in MetricsRequest. + // Dhcpv6ClientMetricsRequest is the request to retrieve DHCPv6 per client metrics/statistics. + Dhcpv6Client() Dhcpv6ClientMetricsRequest + // SetDhcpv6Client assigns Dhcpv6ClientMetricsRequest provided by user to MetricsRequest. + // Dhcpv6ClientMetricsRequest is the request to retrieve DHCPv6 per client metrics/statistics. + SetDhcpv6Client(value Dhcpv6ClientMetricsRequest) MetricsRequest + // HasDhcpv6Client checks if Dhcpv6Client has been set in MetricsRequest + HasDhcpv6Client() bool + // Dhcpv6Server returns Dhcpv6ServerMetricsRequest, set in MetricsRequest. + // Dhcpv6ServerMetricsRequest is the request to retrieve DHCPv6 per Server metrics/statistics. + Dhcpv6Server() Dhcpv6ServerMetricsRequest + // SetDhcpv6Server assigns Dhcpv6ServerMetricsRequest provided by user to MetricsRequest. + // Dhcpv6ServerMetricsRequest is the request to retrieve DHCPv6 per Server metrics/statistics. + SetDhcpv6Server(value Dhcpv6ServerMetricsRequest) MetricsRequest + // HasDhcpv6Server checks if Dhcpv6Server has been set in MetricsRequest + HasDhcpv6Server() bool + // Ospfv2 returns Ospfv2MetricsRequest, set in MetricsRequest. + // Ospfv2MetricsRequest is the request to retrieve OSPFv2 per Router metrics/statistics. + Ospfv2() Ospfv2MetricsRequest + // SetOspfv2 assigns Ospfv2MetricsRequest provided by user to MetricsRequest. + // Ospfv2MetricsRequest is the request to retrieve OSPFv2 per Router metrics/statistics. + SetOspfv2(value Ospfv2MetricsRequest) MetricsRequest + // HasOspfv2 checks if Ospfv2 has been set in MetricsRequest + HasOspfv2() bool + setNil() +} + +type MetricsRequestChoiceEnum string + +// Enum of Choice on MetricsRequest +var MetricsRequestChoice = struct { + PORT MetricsRequestChoiceEnum + FLOW MetricsRequestChoiceEnum + BGPV4 MetricsRequestChoiceEnum + BGPV6 MetricsRequestChoiceEnum + ISIS MetricsRequestChoiceEnum + LAG MetricsRequestChoiceEnum + LACP MetricsRequestChoiceEnum + LLDP MetricsRequestChoiceEnum + RSVP MetricsRequestChoiceEnum + DHCPV4_CLIENT MetricsRequestChoiceEnum + DHCPV4_SERVER MetricsRequestChoiceEnum + DHCPV6_CLIENT MetricsRequestChoiceEnum + DHCPV6_SERVER MetricsRequestChoiceEnum + OSPFV2 MetricsRequestChoiceEnum +}{ + PORT: MetricsRequestChoiceEnum("port"), + FLOW: MetricsRequestChoiceEnum("flow"), + BGPV4: MetricsRequestChoiceEnum("bgpv4"), + BGPV6: MetricsRequestChoiceEnum("bgpv6"), + ISIS: MetricsRequestChoiceEnum("isis"), + LAG: MetricsRequestChoiceEnum("lag"), + LACP: MetricsRequestChoiceEnum("lacp"), + LLDP: MetricsRequestChoiceEnum("lldp"), + RSVP: MetricsRequestChoiceEnum("rsvp"), + DHCPV4_CLIENT: MetricsRequestChoiceEnum("dhcpv4_client"), + DHCPV4_SERVER: MetricsRequestChoiceEnum("dhcpv4_server"), + DHCPV6_CLIENT: MetricsRequestChoiceEnum("dhcpv6_client"), + DHCPV6_SERVER: MetricsRequestChoiceEnum("dhcpv6_server"), + OSPFV2: MetricsRequestChoiceEnum("ospfv2"), +} + +func (obj *metricsRequest) Choice() MetricsRequestChoiceEnum { + return MetricsRequestChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *metricsRequest) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *metricsRequest) setChoice(value MetricsRequestChoiceEnum) MetricsRequest { + intValue, ok := otg.MetricsRequest_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on MetricsRequestChoiceEnum", string(value))) + return obj + } + enumValue := otg.MetricsRequest_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ospfv2 = nil + obj.ospfv2Holder = nil + obj.obj.Dhcpv6Server = nil + obj.dhcpv6ServerHolder = nil + obj.obj.Dhcpv6Client = nil + obj.dhcpv6ClientHolder = nil + obj.obj.Dhcpv4Server = nil + obj.dhcpv4ServerHolder = nil + obj.obj.Dhcpv4Client = nil + obj.dhcpv4ClientHolder = nil + obj.obj.Rsvp = nil + obj.rsvpHolder = nil + obj.obj.Lldp = nil + obj.lldpHolder = nil + obj.obj.Lacp = nil + obj.lacpHolder = nil + obj.obj.Lag = nil + obj.lagHolder = nil + obj.obj.Isis = nil + obj.isisHolder = nil + obj.obj.Bgpv6 = nil + obj.bgpv6Holder = nil + obj.obj.Bgpv4 = nil + obj.bgpv4Holder = nil + obj.obj.Flow = nil + obj.flowHolder = nil + obj.obj.Port = nil + obj.portHolder = nil + + if value == MetricsRequestChoice.PORT { + obj.obj.Port = NewPortMetricsRequest().msg() + } + + if value == MetricsRequestChoice.FLOW { + obj.obj.Flow = NewFlowMetricsRequest().msg() + } + + if value == MetricsRequestChoice.BGPV4 { + obj.obj.Bgpv4 = NewBgpv4MetricsRequest().msg() + } + + if value == MetricsRequestChoice.BGPV6 { + obj.obj.Bgpv6 = NewBgpv6MetricsRequest().msg() + } + + if value == MetricsRequestChoice.ISIS { + obj.obj.Isis = NewIsisMetricsRequest().msg() + } + + if value == MetricsRequestChoice.LAG { + obj.obj.Lag = NewLagMetricsRequest().msg() + } + + if value == MetricsRequestChoice.LACP { + obj.obj.Lacp = NewLacpMetricsRequest().msg() + } + + if value == MetricsRequestChoice.LLDP { + obj.obj.Lldp = NewLldpMetricsRequest().msg() + } + + if value == MetricsRequestChoice.RSVP { + obj.obj.Rsvp = NewRsvpMetricsRequest().msg() + } + + if value == MetricsRequestChoice.DHCPV4_CLIENT { + obj.obj.Dhcpv4Client = NewDhcpv4ClientMetricsRequest().msg() + } + + if value == MetricsRequestChoice.DHCPV4_SERVER { + obj.obj.Dhcpv4Server = NewDhcpv4ServerMetricsRequest().msg() + } + + if value == MetricsRequestChoice.DHCPV6_CLIENT { + obj.obj.Dhcpv6Client = NewDhcpv6ClientMetricsRequest().msg() + } + + if value == MetricsRequestChoice.DHCPV6_SERVER { + obj.obj.Dhcpv6Server = NewDhcpv6ServerMetricsRequest().msg() + } + + if value == MetricsRequestChoice.OSPFV2 { + obj.obj.Ospfv2 = NewOspfv2MetricsRequest().msg() + } + + return obj +} + +// description is TBD +// Port returns a PortMetricsRequest +func (obj *metricsRequest) Port() PortMetricsRequest { + if obj.obj.Port == nil { + obj.setChoice(MetricsRequestChoice.PORT) + } + if obj.portHolder == nil { + obj.portHolder = &portMetricsRequest{obj: obj.obj.Port} + } + return obj.portHolder +} + +// description is TBD +// Port returns a PortMetricsRequest +func (obj *metricsRequest) HasPort() bool { + return obj.obj.Port != nil +} + +// description is TBD +// SetPort sets the PortMetricsRequest value in the MetricsRequest object +func (obj *metricsRequest) SetPort(value PortMetricsRequest) MetricsRequest { + obj.setChoice(MetricsRequestChoice.PORT) + obj.portHolder = nil + obj.obj.Port = value.msg() + + return obj +} + +// description is TBD +// Flow returns a FlowMetricsRequest +func (obj *metricsRequest) Flow() FlowMetricsRequest { + if obj.obj.Flow == nil { + obj.setChoice(MetricsRequestChoice.FLOW) + } + if obj.flowHolder == nil { + obj.flowHolder = &flowMetricsRequest{obj: obj.obj.Flow} + } + return obj.flowHolder +} + +// description is TBD +// Flow returns a FlowMetricsRequest +func (obj *metricsRequest) HasFlow() bool { + return obj.obj.Flow != nil +} + +// description is TBD +// SetFlow sets the FlowMetricsRequest value in the MetricsRequest object +func (obj *metricsRequest) SetFlow(value FlowMetricsRequest) MetricsRequest { + obj.setChoice(MetricsRequestChoice.FLOW) + obj.flowHolder = nil + obj.obj.Flow = value.msg() + + return obj +} + +// description is TBD +// Bgpv4 returns a Bgpv4MetricsRequest +func (obj *metricsRequest) Bgpv4() Bgpv4MetricsRequest { + if obj.obj.Bgpv4 == nil { + obj.setChoice(MetricsRequestChoice.BGPV4) + } + if obj.bgpv4Holder == nil { + obj.bgpv4Holder = &bgpv4MetricsRequest{obj: obj.obj.Bgpv4} + } + return obj.bgpv4Holder +} + +// description is TBD +// Bgpv4 returns a Bgpv4MetricsRequest +func (obj *metricsRequest) HasBgpv4() bool { + return obj.obj.Bgpv4 != nil +} + +// description is TBD +// SetBgpv4 sets the Bgpv4MetricsRequest value in the MetricsRequest object +func (obj *metricsRequest) SetBgpv4(value Bgpv4MetricsRequest) MetricsRequest { + obj.setChoice(MetricsRequestChoice.BGPV4) + obj.bgpv4Holder = nil + obj.obj.Bgpv4 = value.msg() + + return obj +} + +// description is TBD +// Bgpv6 returns a Bgpv6MetricsRequest +func (obj *metricsRequest) Bgpv6() Bgpv6MetricsRequest { + if obj.obj.Bgpv6 == nil { + obj.setChoice(MetricsRequestChoice.BGPV6) + } + if obj.bgpv6Holder == nil { + obj.bgpv6Holder = &bgpv6MetricsRequest{obj: obj.obj.Bgpv6} + } + return obj.bgpv6Holder +} + +// description is TBD +// Bgpv6 returns a Bgpv6MetricsRequest +func (obj *metricsRequest) HasBgpv6() bool { + return obj.obj.Bgpv6 != nil +} + +// description is TBD +// SetBgpv6 sets the Bgpv6MetricsRequest value in the MetricsRequest object +func (obj *metricsRequest) SetBgpv6(value Bgpv6MetricsRequest) MetricsRequest { + obj.setChoice(MetricsRequestChoice.BGPV6) + obj.bgpv6Holder = nil + obj.obj.Bgpv6 = value.msg() + + return obj +} + +// description is TBD +// Isis returns a IsisMetricsRequest +func (obj *metricsRequest) Isis() IsisMetricsRequest { + if obj.obj.Isis == nil { + obj.setChoice(MetricsRequestChoice.ISIS) + } + if obj.isisHolder == nil { + obj.isisHolder = &isisMetricsRequest{obj: obj.obj.Isis} + } + return obj.isisHolder +} + +// description is TBD +// Isis returns a IsisMetricsRequest +func (obj *metricsRequest) HasIsis() bool { + return obj.obj.Isis != nil +} + +// description is TBD +// SetIsis sets the IsisMetricsRequest value in the MetricsRequest object +func (obj *metricsRequest) SetIsis(value IsisMetricsRequest) MetricsRequest { + obj.setChoice(MetricsRequestChoice.ISIS) + obj.isisHolder = nil + obj.obj.Isis = value.msg() + + return obj +} + +// description is TBD +// Lag returns a LagMetricsRequest +func (obj *metricsRequest) Lag() LagMetricsRequest { + if obj.obj.Lag == nil { + obj.setChoice(MetricsRequestChoice.LAG) + } + if obj.lagHolder == nil { + obj.lagHolder = &lagMetricsRequest{obj: obj.obj.Lag} + } + return obj.lagHolder +} + +// description is TBD +// Lag returns a LagMetricsRequest +func (obj *metricsRequest) HasLag() bool { + return obj.obj.Lag != nil +} + +// description is TBD +// SetLag sets the LagMetricsRequest value in the MetricsRequest object +func (obj *metricsRequest) SetLag(value LagMetricsRequest) MetricsRequest { + obj.setChoice(MetricsRequestChoice.LAG) + obj.lagHolder = nil + obj.obj.Lag = value.msg() + + return obj +} + +// description is TBD +// Lacp returns a LacpMetricsRequest +func (obj *metricsRequest) Lacp() LacpMetricsRequest { + if obj.obj.Lacp == nil { + obj.setChoice(MetricsRequestChoice.LACP) + } + if obj.lacpHolder == nil { + obj.lacpHolder = &lacpMetricsRequest{obj: obj.obj.Lacp} + } + return obj.lacpHolder +} + +// description is TBD +// Lacp returns a LacpMetricsRequest +func (obj *metricsRequest) HasLacp() bool { + return obj.obj.Lacp != nil +} + +// description is TBD +// SetLacp sets the LacpMetricsRequest value in the MetricsRequest object +func (obj *metricsRequest) SetLacp(value LacpMetricsRequest) MetricsRequest { + obj.setChoice(MetricsRequestChoice.LACP) + obj.lacpHolder = nil + obj.obj.Lacp = value.msg() + + return obj +} + +// description is TBD +// Lldp returns a LldpMetricsRequest +func (obj *metricsRequest) Lldp() LldpMetricsRequest { + if obj.obj.Lldp == nil { + obj.setChoice(MetricsRequestChoice.LLDP) + } + if obj.lldpHolder == nil { + obj.lldpHolder = &lldpMetricsRequest{obj: obj.obj.Lldp} + } + return obj.lldpHolder +} + +// description is TBD +// Lldp returns a LldpMetricsRequest +func (obj *metricsRequest) HasLldp() bool { + return obj.obj.Lldp != nil +} + +// description is TBD +// SetLldp sets the LldpMetricsRequest value in the MetricsRequest object +func (obj *metricsRequest) SetLldp(value LldpMetricsRequest) MetricsRequest { + obj.setChoice(MetricsRequestChoice.LLDP) + obj.lldpHolder = nil + obj.obj.Lldp = value.msg() + + return obj +} + +// description is TBD +// Rsvp returns a RsvpMetricsRequest +func (obj *metricsRequest) Rsvp() RsvpMetricsRequest { + if obj.obj.Rsvp == nil { + obj.setChoice(MetricsRequestChoice.RSVP) + } + if obj.rsvpHolder == nil { + obj.rsvpHolder = &rsvpMetricsRequest{obj: obj.obj.Rsvp} + } + return obj.rsvpHolder +} + +// description is TBD +// Rsvp returns a RsvpMetricsRequest +func (obj *metricsRequest) HasRsvp() bool { + return obj.obj.Rsvp != nil +} + +// description is TBD +// SetRsvp sets the RsvpMetricsRequest value in the MetricsRequest object +func (obj *metricsRequest) SetRsvp(value RsvpMetricsRequest) MetricsRequest { + obj.setChoice(MetricsRequestChoice.RSVP) + obj.rsvpHolder = nil + obj.obj.Rsvp = value.msg() + + return obj +} + +// description is TBD +// Dhcpv4Client returns a Dhcpv4ClientMetricsRequest +func (obj *metricsRequest) Dhcpv4Client() Dhcpv4ClientMetricsRequest { + if obj.obj.Dhcpv4Client == nil { + obj.setChoice(MetricsRequestChoice.DHCPV4_CLIENT) + } + if obj.dhcpv4ClientHolder == nil { + obj.dhcpv4ClientHolder = &dhcpv4ClientMetricsRequest{obj: obj.obj.Dhcpv4Client} + } + return obj.dhcpv4ClientHolder +} + +// description is TBD +// Dhcpv4Client returns a Dhcpv4ClientMetricsRequest +func (obj *metricsRequest) HasDhcpv4Client() bool { + return obj.obj.Dhcpv4Client != nil +} + +// description is TBD +// SetDhcpv4Client sets the Dhcpv4ClientMetricsRequest value in the MetricsRequest object +func (obj *metricsRequest) SetDhcpv4Client(value Dhcpv4ClientMetricsRequest) MetricsRequest { + obj.setChoice(MetricsRequestChoice.DHCPV4_CLIENT) + obj.dhcpv4ClientHolder = nil + obj.obj.Dhcpv4Client = value.msg() + + return obj +} + +// description is TBD +// Dhcpv4Server returns a Dhcpv4ServerMetricsRequest +func (obj *metricsRequest) Dhcpv4Server() Dhcpv4ServerMetricsRequest { + if obj.obj.Dhcpv4Server == nil { + obj.setChoice(MetricsRequestChoice.DHCPV4_SERVER) + } + if obj.dhcpv4ServerHolder == nil { + obj.dhcpv4ServerHolder = &dhcpv4ServerMetricsRequest{obj: obj.obj.Dhcpv4Server} + } + return obj.dhcpv4ServerHolder +} + +// description is TBD +// Dhcpv4Server returns a Dhcpv4ServerMetricsRequest +func (obj *metricsRequest) HasDhcpv4Server() bool { + return obj.obj.Dhcpv4Server != nil +} + +// description is TBD +// SetDhcpv4Server sets the Dhcpv4ServerMetricsRequest value in the MetricsRequest object +func (obj *metricsRequest) SetDhcpv4Server(value Dhcpv4ServerMetricsRequest) MetricsRequest { + obj.setChoice(MetricsRequestChoice.DHCPV4_SERVER) + obj.dhcpv4ServerHolder = nil + obj.obj.Dhcpv4Server = value.msg() + + return obj +} + +// description is TBD +// Dhcpv6Client returns a Dhcpv6ClientMetricsRequest +func (obj *metricsRequest) Dhcpv6Client() Dhcpv6ClientMetricsRequest { + if obj.obj.Dhcpv6Client == nil { + obj.setChoice(MetricsRequestChoice.DHCPV6_CLIENT) + } + if obj.dhcpv6ClientHolder == nil { + obj.dhcpv6ClientHolder = &dhcpv6ClientMetricsRequest{obj: obj.obj.Dhcpv6Client} + } + return obj.dhcpv6ClientHolder +} + +// description is TBD +// Dhcpv6Client returns a Dhcpv6ClientMetricsRequest +func (obj *metricsRequest) HasDhcpv6Client() bool { + return obj.obj.Dhcpv6Client != nil +} + +// description is TBD +// SetDhcpv6Client sets the Dhcpv6ClientMetricsRequest value in the MetricsRequest object +func (obj *metricsRequest) SetDhcpv6Client(value Dhcpv6ClientMetricsRequest) MetricsRequest { + obj.setChoice(MetricsRequestChoice.DHCPV6_CLIENT) + obj.dhcpv6ClientHolder = nil + obj.obj.Dhcpv6Client = value.msg() + + return obj +} + +// description is TBD +// Dhcpv6Server returns a Dhcpv6ServerMetricsRequest +func (obj *metricsRequest) Dhcpv6Server() Dhcpv6ServerMetricsRequest { + if obj.obj.Dhcpv6Server == nil { + obj.setChoice(MetricsRequestChoice.DHCPV6_SERVER) + } + if obj.dhcpv6ServerHolder == nil { + obj.dhcpv6ServerHolder = &dhcpv6ServerMetricsRequest{obj: obj.obj.Dhcpv6Server} + } + return obj.dhcpv6ServerHolder +} + +// description is TBD +// Dhcpv6Server returns a Dhcpv6ServerMetricsRequest +func (obj *metricsRequest) HasDhcpv6Server() bool { + return obj.obj.Dhcpv6Server != nil +} + +// description is TBD +// SetDhcpv6Server sets the Dhcpv6ServerMetricsRequest value in the MetricsRequest object +func (obj *metricsRequest) SetDhcpv6Server(value Dhcpv6ServerMetricsRequest) MetricsRequest { + obj.setChoice(MetricsRequestChoice.DHCPV6_SERVER) + obj.dhcpv6ServerHolder = nil + obj.obj.Dhcpv6Server = value.msg() + + return obj +} + +// description is TBD +// Ospfv2 returns a Ospfv2MetricsRequest +func (obj *metricsRequest) Ospfv2() Ospfv2MetricsRequest { + if obj.obj.Ospfv2 == nil { + obj.setChoice(MetricsRequestChoice.OSPFV2) + } + if obj.ospfv2Holder == nil { + obj.ospfv2Holder = &ospfv2MetricsRequest{obj: obj.obj.Ospfv2} + } + return obj.ospfv2Holder +} + +// description is TBD +// Ospfv2 returns a Ospfv2MetricsRequest +func (obj *metricsRequest) HasOspfv2() bool { + return obj.obj.Ospfv2 != nil +} + +// description is TBD +// SetOspfv2 sets the Ospfv2MetricsRequest value in the MetricsRequest object +func (obj *metricsRequest) SetOspfv2(value Ospfv2MetricsRequest) MetricsRequest { + obj.setChoice(MetricsRequestChoice.OSPFV2) + obj.ospfv2Holder = nil + obj.obj.Ospfv2 = value.msg() + + return obj +} + +func (obj *metricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Port != nil { + + obj.Port().validateObj(vObj, set_default) + } + + if obj.obj.Flow != nil { + + obj.Flow().validateObj(vObj, set_default) + } + + if obj.obj.Bgpv4 != nil { + + obj.Bgpv4().validateObj(vObj, set_default) + } + + if obj.obj.Bgpv6 != nil { + + obj.Bgpv6().validateObj(vObj, set_default) + } + + if obj.obj.Isis != nil { + + obj.Isis().validateObj(vObj, set_default) + } + + if obj.obj.Lag != nil { + + obj.Lag().validateObj(vObj, set_default) + } + + if obj.obj.Lacp != nil { + + obj.Lacp().validateObj(vObj, set_default) + } + + if obj.obj.Lldp != nil { + + obj.Lldp().validateObj(vObj, set_default) + } + + if obj.obj.Rsvp != nil { + + obj.Rsvp().validateObj(vObj, set_default) + } + + if obj.obj.Dhcpv4Client != nil { + + obj.Dhcpv4Client().validateObj(vObj, set_default) + } + + if obj.obj.Dhcpv4Server != nil { + + obj.Dhcpv4Server().validateObj(vObj, set_default) + } + + if obj.obj.Dhcpv6Client != nil { + + obj.Dhcpv6Client().validateObj(vObj, set_default) + } + + if obj.obj.Dhcpv6Server != nil { + + obj.Dhcpv6Server().validateObj(vObj, set_default) + } + + if obj.obj.Ospfv2 != nil { + + obj.Ospfv2().validateObj(vObj, set_default) + } + +} + +func (obj *metricsRequest) setDefault() { + var choices_set int = 0 + var choice MetricsRequestChoiceEnum + + if obj.obj.Port != nil { + choices_set += 1 + choice = MetricsRequestChoice.PORT + } + + if obj.obj.Flow != nil { + choices_set += 1 + choice = MetricsRequestChoice.FLOW + } + + if obj.obj.Bgpv4 != nil { + choices_set += 1 + choice = MetricsRequestChoice.BGPV4 + } + + if obj.obj.Bgpv6 != nil { + choices_set += 1 + choice = MetricsRequestChoice.BGPV6 + } + + if obj.obj.Isis != nil { + choices_set += 1 + choice = MetricsRequestChoice.ISIS + } + + if obj.obj.Lag != nil { + choices_set += 1 + choice = MetricsRequestChoice.LAG + } + + if obj.obj.Lacp != nil { + choices_set += 1 + choice = MetricsRequestChoice.LACP + } + + if obj.obj.Lldp != nil { + choices_set += 1 + choice = MetricsRequestChoice.LLDP + } + + if obj.obj.Rsvp != nil { + choices_set += 1 + choice = MetricsRequestChoice.RSVP + } + + if obj.obj.Dhcpv4Client != nil { + choices_set += 1 + choice = MetricsRequestChoice.DHCPV4_CLIENT + } + + if obj.obj.Dhcpv4Server != nil { + choices_set += 1 + choice = MetricsRequestChoice.DHCPV4_SERVER + } + + if obj.obj.Dhcpv6Client != nil { + choices_set += 1 + choice = MetricsRequestChoice.DHCPV6_CLIENT + } + + if obj.obj.Dhcpv6Server != nil { + choices_set += 1 + choice = MetricsRequestChoice.DHCPV6_SERVER + } + + if obj.obj.Ospfv2 != nil { + choices_set += 1 + choice = MetricsRequestChoice.OSPFV2 + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(MetricsRequestChoice.PORT) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in MetricsRequest") + } + } else { + intVal := otg.MetricsRequest_Choice_Enum_value[string(choice)] + enumValue := otg.MetricsRequest_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/metrics_response.go b/gosnappi/metrics_response.go new file mode 100644 index 00000000..121f735d --- /dev/null +++ b/gosnappi/metrics_response.go @@ -0,0 +1,1976 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** MetricsResponse ***** +type metricsResponse struct { + validation + obj *otg.MetricsResponse + marshaller marshalMetricsResponse + unMarshaller unMarshalMetricsResponse + portMetricsHolder MetricsResponsePortMetricIter + flowMetricsHolder MetricsResponseFlowMetricIter + bgpv4MetricsHolder MetricsResponseBgpv4MetricIter + bgpv6MetricsHolder MetricsResponseBgpv6MetricIter + isisMetricsHolder MetricsResponseIsisMetricIter + lagMetricsHolder MetricsResponseLagMetricIter + lacpMetricsHolder MetricsResponseLacpMetricIter + lldpMetricsHolder MetricsResponseLldpMetricIter + rsvpMetricsHolder MetricsResponseRsvpMetricIter + dhcpv4ClientMetricsHolder MetricsResponseDhcpv4ClientMetricIter + dhcpv4ServerMetricsHolder MetricsResponseDhcpv4ServerMetricIter + dhcpv6ClientMetricsHolder MetricsResponseDhcpv6ClientMetricIter + dhcpv6ServerMetricsHolder MetricsResponseDhcpv6ServerMetricIter + ospfv2MetricsHolder MetricsResponseOspfv2MetricIter +} + +func NewMetricsResponse() MetricsResponse { + obj := metricsResponse{obj: &otg.MetricsResponse{}} + obj.setDefault() + return &obj +} + +func (obj *metricsResponse) msg() *otg.MetricsResponse { + return obj.obj +} + +func (obj *metricsResponse) setMsg(msg *otg.MetricsResponse) MetricsResponse { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalmetricsResponse struct { + obj *metricsResponse +} + +type marshalMetricsResponse interface { + // ToProto marshals MetricsResponse to protobuf object *otg.MetricsResponse + ToProto() (*otg.MetricsResponse, error) + // ToPbText marshals MetricsResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals MetricsResponse to YAML text + ToYaml() (string, error) + // ToJson marshals MetricsResponse to JSON text + ToJson() (string, error) +} + +type unMarshalmetricsResponse struct { + obj *metricsResponse +} + +type unMarshalMetricsResponse interface { + // FromProto unmarshals MetricsResponse from protobuf object *otg.MetricsResponse + FromProto(msg *otg.MetricsResponse) (MetricsResponse, error) + // FromPbText unmarshals MetricsResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals MetricsResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals MetricsResponse from JSON text + FromJson(value string) error +} + +func (obj *metricsResponse) Marshal() marshalMetricsResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalmetricsResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *metricsResponse) Unmarshal() unMarshalMetricsResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalmetricsResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalmetricsResponse) ToProto() (*otg.MetricsResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalmetricsResponse) FromProto(msg *otg.MetricsResponse) (MetricsResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalmetricsResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalmetricsResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalmetricsResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalmetricsResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalmetricsResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalmetricsResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *metricsResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *metricsResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *metricsResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *metricsResponse) Clone() (MetricsResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewMetricsResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *metricsResponse) setNil() { + obj.portMetricsHolder = nil + obj.flowMetricsHolder = nil + obj.bgpv4MetricsHolder = nil + obj.bgpv6MetricsHolder = nil + obj.isisMetricsHolder = nil + obj.lagMetricsHolder = nil + obj.lacpMetricsHolder = nil + obj.lldpMetricsHolder = nil + obj.rsvpMetricsHolder = nil + obj.dhcpv4ClientMetricsHolder = nil + obj.dhcpv4ServerMetricsHolder = nil + obj.dhcpv6ClientMetricsHolder = nil + obj.dhcpv6ServerMetricsHolder = nil + obj.ospfv2MetricsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// MetricsResponse is response containing chosen traffic generator metrics. +type MetricsResponse interface { + Validation + // msg marshals MetricsResponse to protobuf object *otg.MetricsResponse + // and doesn't set defaults + msg() *otg.MetricsResponse + // setMsg unmarshals MetricsResponse from protobuf object *otg.MetricsResponse + // and doesn't set defaults + setMsg(*otg.MetricsResponse) MetricsResponse + // provides marshal interface + Marshal() marshalMetricsResponse + // provides unmarshal interface + Unmarshal() unMarshalMetricsResponse + // validate validates MetricsResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (MetricsResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns MetricsResponseChoiceEnum, set in MetricsResponse + Choice() MetricsResponseChoiceEnum + // setChoice assigns MetricsResponseChoiceEnum provided by user to MetricsResponse + setChoice(value MetricsResponseChoiceEnum) MetricsResponse + // HasChoice checks if Choice has been set in MetricsResponse + HasChoice() bool + // getter for Dhcpv4Client to set choice. + Dhcpv4Client() + // getter for Dhcpv4Server to set choice. + Dhcpv4Server() + // getter for Dhcpv6Server to set choice. + Dhcpv6Server() + // getter for Dhcpv6Client to set choice. + Dhcpv6Client() + // PortMetrics returns MetricsResponsePortMetricIterIter, set in MetricsResponse + PortMetrics() MetricsResponsePortMetricIter + // FlowMetrics returns MetricsResponseFlowMetricIterIter, set in MetricsResponse + FlowMetrics() MetricsResponseFlowMetricIter + // Bgpv4Metrics returns MetricsResponseBgpv4MetricIterIter, set in MetricsResponse + Bgpv4Metrics() MetricsResponseBgpv4MetricIter + // Bgpv6Metrics returns MetricsResponseBgpv6MetricIterIter, set in MetricsResponse + Bgpv6Metrics() MetricsResponseBgpv6MetricIter + // IsisMetrics returns MetricsResponseIsisMetricIterIter, set in MetricsResponse + IsisMetrics() MetricsResponseIsisMetricIter + // LagMetrics returns MetricsResponseLagMetricIterIter, set in MetricsResponse + LagMetrics() MetricsResponseLagMetricIter + // LacpMetrics returns MetricsResponseLacpMetricIterIter, set in MetricsResponse + LacpMetrics() MetricsResponseLacpMetricIter + // LldpMetrics returns MetricsResponseLldpMetricIterIter, set in MetricsResponse + LldpMetrics() MetricsResponseLldpMetricIter + // RsvpMetrics returns MetricsResponseRsvpMetricIterIter, set in MetricsResponse + RsvpMetrics() MetricsResponseRsvpMetricIter + // Dhcpv4ClientMetrics returns MetricsResponseDhcpv4ClientMetricIterIter, set in MetricsResponse + Dhcpv4ClientMetrics() MetricsResponseDhcpv4ClientMetricIter + // Dhcpv4ServerMetrics returns MetricsResponseDhcpv4ServerMetricIterIter, set in MetricsResponse + Dhcpv4ServerMetrics() MetricsResponseDhcpv4ServerMetricIter + // Dhcpv6ClientMetrics returns MetricsResponseDhcpv6ClientMetricIterIter, set in MetricsResponse + Dhcpv6ClientMetrics() MetricsResponseDhcpv6ClientMetricIter + // Dhcpv6ServerMetrics returns MetricsResponseDhcpv6ServerMetricIterIter, set in MetricsResponse + Dhcpv6ServerMetrics() MetricsResponseDhcpv6ServerMetricIter + // Ospfv2Metrics returns MetricsResponseOspfv2MetricIterIter, set in MetricsResponse + Ospfv2Metrics() MetricsResponseOspfv2MetricIter + setNil() +} + +type MetricsResponseChoiceEnum string + +// Enum of Choice on MetricsResponse +var MetricsResponseChoice = struct { + FLOW_METRICS MetricsResponseChoiceEnum + PORT_METRICS MetricsResponseChoiceEnum + BGPV4_METRICS MetricsResponseChoiceEnum + BGPV6_METRICS MetricsResponseChoiceEnum + ISIS_METRICS MetricsResponseChoiceEnum + LAG_METRICS MetricsResponseChoiceEnum + LACP_METRICS MetricsResponseChoiceEnum + LLDP_METRICS MetricsResponseChoiceEnum + RSVP_METRICS MetricsResponseChoiceEnum + DHCPV4_CLIENT MetricsResponseChoiceEnum + DHCPV4_SERVER MetricsResponseChoiceEnum + DHCPV6_CLIENT MetricsResponseChoiceEnum + DHCPV6_SERVER MetricsResponseChoiceEnum + OSPFV2_METRICS MetricsResponseChoiceEnum +}{ + FLOW_METRICS: MetricsResponseChoiceEnum("flow_metrics"), + PORT_METRICS: MetricsResponseChoiceEnum("port_metrics"), + BGPV4_METRICS: MetricsResponseChoiceEnum("bgpv4_metrics"), + BGPV6_METRICS: MetricsResponseChoiceEnum("bgpv6_metrics"), + ISIS_METRICS: MetricsResponseChoiceEnum("isis_metrics"), + LAG_METRICS: MetricsResponseChoiceEnum("lag_metrics"), + LACP_METRICS: MetricsResponseChoiceEnum("lacp_metrics"), + LLDP_METRICS: MetricsResponseChoiceEnum("lldp_metrics"), + RSVP_METRICS: MetricsResponseChoiceEnum("rsvp_metrics"), + DHCPV4_CLIENT: MetricsResponseChoiceEnum("dhcpv4_client"), + DHCPV4_SERVER: MetricsResponseChoiceEnum("dhcpv4_server"), + DHCPV6_CLIENT: MetricsResponseChoiceEnum("dhcpv6_client"), + DHCPV6_SERVER: MetricsResponseChoiceEnum("dhcpv6_server"), + OSPFV2_METRICS: MetricsResponseChoiceEnum("ospfv2_metrics"), +} + +func (obj *metricsResponse) Choice() MetricsResponseChoiceEnum { + return MetricsResponseChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for Dhcpv4Client to set choice +func (obj *metricsResponse) Dhcpv4Client() { + obj.setChoice(MetricsResponseChoice.DHCPV4_CLIENT) +} + +// getter for Dhcpv4Server to set choice +func (obj *metricsResponse) Dhcpv4Server() { + obj.setChoice(MetricsResponseChoice.DHCPV4_SERVER) +} + +// getter for Dhcpv6Server to set choice +func (obj *metricsResponse) Dhcpv6Server() { + obj.setChoice(MetricsResponseChoice.DHCPV6_SERVER) +} + +// getter for Dhcpv6Client to set choice +func (obj *metricsResponse) Dhcpv6Client() { + obj.setChoice(MetricsResponseChoice.DHCPV6_CLIENT) +} + +// description is TBD +// Choice returns a string +func (obj *metricsResponse) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *metricsResponse) setChoice(value MetricsResponseChoiceEnum) MetricsResponse { + intValue, ok := otg.MetricsResponse_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on MetricsResponseChoiceEnum", string(value))) + return obj + } + enumValue := otg.MetricsResponse_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ospfv2Metrics = nil + obj.ospfv2MetricsHolder = nil + obj.obj.RsvpMetrics = nil + obj.rsvpMetricsHolder = nil + obj.obj.LldpMetrics = nil + obj.lldpMetricsHolder = nil + obj.obj.LacpMetrics = nil + obj.lacpMetricsHolder = nil + obj.obj.LagMetrics = nil + obj.lagMetricsHolder = nil + obj.obj.IsisMetrics = nil + obj.isisMetricsHolder = nil + obj.obj.Bgpv6Metrics = nil + obj.bgpv6MetricsHolder = nil + obj.obj.Bgpv4Metrics = nil + obj.bgpv4MetricsHolder = nil + obj.obj.FlowMetrics = nil + obj.flowMetricsHolder = nil + obj.obj.PortMetrics = nil + obj.portMetricsHolder = nil + + if value == MetricsResponseChoice.PORT_METRICS { + obj.obj.PortMetrics = []*otg.PortMetric{} + } + + if value == MetricsResponseChoice.FLOW_METRICS { + obj.obj.FlowMetrics = []*otg.FlowMetric{} + } + + if value == MetricsResponseChoice.BGPV4_METRICS { + obj.obj.Bgpv4Metrics = []*otg.Bgpv4Metric{} + } + + if value == MetricsResponseChoice.BGPV6_METRICS { + obj.obj.Bgpv6Metrics = []*otg.Bgpv6Metric{} + } + + if value == MetricsResponseChoice.ISIS_METRICS { + obj.obj.IsisMetrics = []*otg.IsisMetric{} + } + + if value == MetricsResponseChoice.LAG_METRICS { + obj.obj.LagMetrics = []*otg.LagMetric{} + } + + if value == MetricsResponseChoice.LACP_METRICS { + obj.obj.LacpMetrics = []*otg.LacpMetric{} + } + + if value == MetricsResponseChoice.LLDP_METRICS { + obj.obj.LldpMetrics = []*otg.LldpMetric{} + } + + if value == MetricsResponseChoice.RSVP_METRICS { + obj.obj.RsvpMetrics = []*otg.RsvpMetric{} + } + + if value == MetricsResponseChoice.OSPFV2_METRICS { + obj.obj.Ospfv2Metrics = []*otg.Ospfv2Metric{} + } + + return obj +} + +// description is TBD +// PortMetrics returns a []PortMetric +func (obj *metricsResponse) PortMetrics() MetricsResponsePortMetricIter { + if len(obj.obj.PortMetrics) == 0 { + obj.setChoice(MetricsResponseChoice.PORT_METRICS) + } + if obj.portMetricsHolder == nil { + obj.portMetricsHolder = newMetricsResponsePortMetricIter(&obj.obj.PortMetrics).setMsg(obj) + } + return obj.portMetricsHolder +} + +type metricsResponsePortMetricIter struct { + obj *metricsResponse + portMetricSlice []PortMetric + fieldPtr *[]*otg.PortMetric +} + +func newMetricsResponsePortMetricIter(ptr *[]*otg.PortMetric) MetricsResponsePortMetricIter { + return &metricsResponsePortMetricIter{fieldPtr: ptr} +} + +type MetricsResponsePortMetricIter interface { + setMsg(*metricsResponse) MetricsResponsePortMetricIter + Items() []PortMetric + Add() PortMetric + Append(items ...PortMetric) MetricsResponsePortMetricIter + Set(index int, newObj PortMetric) MetricsResponsePortMetricIter + Clear() MetricsResponsePortMetricIter + clearHolderSlice() MetricsResponsePortMetricIter + appendHolderSlice(item PortMetric) MetricsResponsePortMetricIter +} + +func (obj *metricsResponsePortMetricIter) setMsg(msg *metricsResponse) MetricsResponsePortMetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&portMetric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *metricsResponsePortMetricIter) Items() []PortMetric { + return obj.portMetricSlice +} + +func (obj *metricsResponsePortMetricIter) Add() PortMetric { + newObj := &otg.PortMetric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &portMetric{obj: newObj} + newLibObj.setDefault() + obj.portMetricSlice = append(obj.portMetricSlice, newLibObj) + return newLibObj +} + +func (obj *metricsResponsePortMetricIter) Append(items ...PortMetric) MetricsResponsePortMetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.portMetricSlice = append(obj.portMetricSlice, item) + } + return obj +} + +func (obj *metricsResponsePortMetricIter) Set(index int, newObj PortMetric) MetricsResponsePortMetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.portMetricSlice[index] = newObj + return obj +} +func (obj *metricsResponsePortMetricIter) Clear() MetricsResponsePortMetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PortMetric{} + obj.portMetricSlice = []PortMetric{} + } + return obj +} +func (obj *metricsResponsePortMetricIter) clearHolderSlice() MetricsResponsePortMetricIter { + if len(obj.portMetricSlice) > 0 { + obj.portMetricSlice = []PortMetric{} + } + return obj +} +func (obj *metricsResponsePortMetricIter) appendHolderSlice(item PortMetric) MetricsResponsePortMetricIter { + obj.portMetricSlice = append(obj.portMetricSlice, item) + return obj +} + +// description is TBD +// FlowMetrics returns a []FlowMetric +func (obj *metricsResponse) FlowMetrics() MetricsResponseFlowMetricIter { + if len(obj.obj.FlowMetrics) == 0 { + obj.setChoice(MetricsResponseChoice.FLOW_METRICS) + } + if obj.flowMetricsHolder == nil { + obj.flowMetricsHolder = newMetricsResponseFlowMetricIter(&obj.obj.FlowMetrics).setMsg(obj) + } + return obj.flowMetricsHolder +} + +type metricsResponseFlowMetricIter struct { + obj *metricsResponse + flowMetricSlice []FlowMetric + fieldPtr *[]*otg.FlowMetric +} + +func newMetricsResponseFlowMetricIter(ptr *[]*otg.FlowMetric) MetricsResponseFlowMetricIter { + return &metricsResponseFlowMetricIter{fieldPtr: ptr} +} + +type MetricsResponseFlowMetricIter interface { + setMsg(*metricsResponse) MetricsResponseFlowMetricIter + Items() []FlowMetric + Add() FlowMetric + Append(items ...FlowMetric) MetricsResponseFlowMetricIter + Set(index int, newObj FlowMetric) MetricsResponseFlowMetricIter + Clear() MetricsResponseFlowMetricIter + clearHolderSlice() MetricsResponseFlowMetricIter + appendHolderSlice(item FlowMetric) MetricsResponseFlowMetricIter +} + +func (obj *metricsResponseFlowMetricIter) setMsg(msg *metricsResponse) MetricsResponseFlowMetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&flowMetric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *metricsResponseFlowMetricIter) Items() []FlowMetric { + return obj.flowMetricSlice +} + +func (obj *metricsResponseFlowMetricIter) Add() FlowMetric { + newObj := &otg.FlowMetric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &flowMetric{obj: newObj} + newLibObj.setDefault() + obj.flowMetricSlice = append(obj.flowMetricSlice, newLibObj) + return newLibObj +} + +func (obj *metricsResponseFlowMetricIter) Append(items ...FlowMetric) MetricsResponseFlowMetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.flowMetricSlice = append(obj.flowMetricSlice, item) + } + return obj +} + +func (obj *metricsResponseFlowMetricIter) Set(index int, newObj FlowMetric) MetricsResponseFlowMetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.flowMetricSlice[index] = newObj + return obj +} +func (obj *metricsResponseFlowMetricIter) Clear() MetricsResponseFlowMetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.FlowMetric{} + obj.flowMetricSlice = []FlowMetric{} + } + return obj +} +func (obj *metricsResponseFlowMetricIter) clearHolderSlice() MetricsResponseFlowMetricIter { + if len(obj.flowMetricSlice) > 0 { + obj.flowMetricSlice = []FlowMetric{} + } + return obj +} +func (obj *metricsResponseFlowMetricIter) appendHolderSlice(item FlowMetric) MetricsResponseFlowMetricIter { + obj.flowMetricSlice = append(obj.flowMetricSlice, item) + return obj +} + +// description is TBD +// Bgpv4Metrics returns a []Bgpv4Metric +func (obj *metricsResponse) Bgpv4Metrics() MetricsResponseBgpv4MetricIter { + if len(obj.obj.Bgpv4Metrics) == 0 { + obj.setChoice(MetricsResponseChoice.BGPV4_METRICS) + } + if obj.bgpv4MetricsHolder == nil { + obj.bgpv4MetricsHolder = newMetricsResponseBgpv4MetricIter(&obj.obj.Bgpv4Metrics).setMsg(obj) + } + return obj.bgpv4MetricsHolder +} + +type metricsResponseBgpv4MetricIter struct { + obj *metricsResponse + bgpv4MetricSlice []Bgpv4Metric + fieldPtr *[]*otg.Bgpv4Metric +} + +func newMetricsResponseBgpv4MetricIter(ptr *[]*otg.Bgpv4Metric) MetricsResponseBgpv4MetricIter { + return &metricsResponseBgpv4MetricIter{fieldPtr: ptr} +} + +type MetricsResponseBgpv4MetricIter interface { + setMsg(*metricsResponse) MetricsResponseBgpv4MetricIter + Items() []Bgpv4Metric + Add() Bgpv4Metric + Append(items ...Bgpv4Metric) MetricsResponseBgpv4MetricIter + Set(index int, newObj Bgpv4Metric) MetricsResponseBgpv4MetricIter + Clear() MetricsResponseBgpv4MetricIter + clearHolderSlice() MetricsResponseBgpv4MetricIter + appendHolderSlice(item Bgpv4Metric) MetricsResponseBgpv4MetricIter +} + +func (obj *metricsResponseBgpv4MetricIter) setMsg(msg *metricsResponse) MetricsResponseBgpv4MetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpv4Metric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *metricsResponseBgpv4MetricIter) Items() []Bgpv4Metric { + return obj.bgpv4MetricSlice +} + +func (obj *metricsResponseBgpv4MetricIter) Add() Bgpv4Metric { + newObj := &otg.Bgpv4Metric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpv4Metric{obj: newObj} + newLibObj.setDefault() + obj.bgpv4MetricSlice = append(obj.bgpv4MetricSlice, newLibObj) + return newLibObj +} + +func (obj *metricsResponseBgpv4MetricIter) Append(items ...Bgpv4Metric) MetricsResponseBgpv4MetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpv4MetricSlice = append(obj.bgpv4MetricSlice, item) + } + return obj +} + +func (obj *metricsResponseBgpv4MetricIter) Set(index int, newObj Bgpv4Metric) MetricsResponseBgpv4MetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpv4MetricSlice[index] = newObj + return obj +} +func (obj *metricsResponseBgpv4MetricIter) Clear() MetricsResponseBgpv4MetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Bgpv4Metric{} + obj.bgpv4MetricSlice = []Bgpv4Metric{} + } + return obj +} +func (obj *metricsResponseBgpv4MetricIter) clearHolderSlice() MetricsResponseBgpv4MetricIter { + if len(obj.bgpv4MetricSlice) > 0 { + obj.bgpv4MetricSlice = []Bgpv4Metric{} + } + return obj +} +func (obj *metricsResponseBgpv4MetricIter) appendHolderSlice(item Bgpv4Metric) MetricsResponseBgpv4MetricIter { + obj.bgpv4MetricSlice = append(obj.bgpv4MetricSlice, item) + return obj +} + +// description is TBD +// Bgpv6Metrics returns a []Bgpv6Metric +func (obj *metricsResponse) Bgpv6Metrics() MetricsResponseBgpv6MetricIter { + if len(obj.obj.Bgpv6Metrics) == 0 { + obj.setChoice(MetricsResponseChoice.BGPV6_METRICS) + } + if obj.bgpv6MetricsHolder == nil { + obj.bgpv6MetricsHolder = newMetricsResponseBgpv6MetricIter(&obj.obj.Bgpv6Metrics).setMsg(obj) + } + return obj.bgpv6MetricsHolder +} + +type metricsResponseBgpv6MetricIter struct { + obj *metricsResponse + bgpv6MetricSlice []Bgpv6Metric + fieldPtr *[]*otg.Bgpv6Metric +} + +func newMetricsResponseBgpv6MetricIter(ptr *[]*otg.Bgpv6Metric) MetricsResponseBgpv6MetricIter { + return &metricsResponseBgpv6MetricIter{fieldPtr: ptr} +} + +type MetricsResponseBgpv6MetricIter interface { + setMsg(*metricsResponse) MetricsResponseBgpv6MetricIter + Items() []Bgpv6Metric + Add() Bgpv6Metric + Append(items ...Bgpv6Metric) MetricsResponseBgpv6MetricIter + Set(index int, newObj Bgpv6Metric) MetricsResponseBgpv6MetricIter + Clear() MetricsResponseBgpv6MetricIter + clearHolderSlice() MetricsResponseBgpv6MetricIter + appendHolderSlice(item Bgpv6Metric) MetricsResponseBgpv6MetricIter +} + +func (obj *metricsResponseBgpv6MetricIter) setMsg(msg *metricsResponse) MetricsResponseBgpv6MetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpv6Metric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *metricsResponseBgpv6MetricIter) Items() []Bgpv6Metric { + return obj.bgpv6MetricSlice +} + +func (obj *metricsResponseBgpv6MetricIter) Add() Bgpv6Metric { + newObj := &otg.Bgpv6Metric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpv6Metric{obj: newObj} + newLibObj.setDefault() + obj.bgpv6MetricSlice = append(obj.bgpv6MetricSlice, newLibObj) + return newLibObj +} + +func (obj *metricsResponseBgpv6MetricIter) Append(items ...Bgpv6Metric) MetricsResponseBgpv6MetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpv6MetricSlice = append(obj.bgpv6MetricSlice, item) + } + return obj +} + +func (obj *metricsResponseBgpv6MetricIter) Set(index int, newObj Bgpv6Metric) MetricsResponseBgpv6MetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpv6MetricSlice[index] = newObj + return obj +} +func (obj *metricsResponseBgpv6MetricIter) Clear() MetricsResponseBgpv6MetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Bgpv6Metric{} + obj.bgpv6MetricSlice = []Bgpv6Metric{} + } + return obj +} +func (obj *metricsResponseBgpv6MetricIter) clearHolderSlice() MetricsResponseBgpv6MetricIter { + if len(obj.bgpv6MetricSlice) > 0 { + obj.bgpv6MetricSlice = []Bgpv6Metric{} + } + return obj +} +func (obj *metricsResponseBgpv6MetricIter) appendHolderSlice(item Bgpv6Metric) MetricsResponseBgpv6MetricIter { + obj.bgpv6MetricSlice = append(obj.bgpv6MetricSlice, item) + return obj +} + +// description is TBD +// IsisMetrics returns a []IsisMetric +func (obj *metricsResponse) IsisMetrics() MetricsResponseIsisMetricIter { + if len(obj.obj.IsisMetrics) == 0 { + obj.setChoice(MetricsResponseChoice.ISIS_METRICS) + } + if obj.isisMetricsHolder == nil { + obj.isisMetricsHolder = newMetricsResponseIsisMetricIter(&obj.obj.IsisMetrics).setMsg(obj) + } + return obj.isisMetricsHolder +} + +type metricsResponseIsisMetricIter struct { + obj *metricsResponse + isisMetricSlice []IsisMetric + fieldPtr *[]*otg.IsisMetric +} + +func newMetricsResponseIsisMetricIter(ptr *[]*otg.IsisMetric) MetricsResponseIsisMetricIter { + return &metricsResponseIsisMetricIter{fieldPtr: ptr} +} + +type MetricsResponseIsisMetricIter interface { + setMsg(*metricsResponse) MetricsResponseIsisMetricIter + Items() []IsisMetric + Add() IsisMetric + Append(items ...IsisMetric) MetricsResponseIsisMetricIter + Set(index int, newObj IsisMetric) MetricsResponseIsisMetricIter + Clear() MetricsResponseIsisMetricIter + clearHolderSlice() MetricsResponseIsisMetricIter + appendHolderSlice(item IsisMetric) MetricsResponseIsisMetricIter +} + +func (obj *metricsResponseIsisMetricIter) setMsg(msg *metricsResponse) MetricsResponseIsisMetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisMetric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *metricsResponseIsisMetricIter) Items() []IsisMetric { + return obj.isisMetricSlice +} + +func (obj *metricsResponseIsisMetricIter) Add() IsisMetric { + newObj := &otg.IsisMetric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisMetric{obj: newObj} + newLibObj.setDefault() + obj.isisMetricSlice = append(obj.isisMetricSlice, newLibObj) + return newLibObj +} + +func (obj *metricsResponseIsisMetricIter) Append(items ...IsisMetric) MetricsResponseIsisMetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisMetricSlice = append(obj.isisMetricSlice, item) + } + return obj +} + +func (obj *metricsResponseIsisMetricIter) Set(index int, newObj IsisMetric) MetricsResponseIsisMetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisMetricSlice[index] = newObj + return obj +} +func (obj *metricsResponseIsisMetricIter) Clear() MetricsResponseIsisMetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisMetric{} + obj.isisMetricSlice = []IsisMetric{} + } + return obj +} +func (obj *metricsResponseIsisMetricIter) clearHolderSlice() MetricsResponseIsisMetricIter { + if len(obj.isisMetricSlice) > 0 { + obj.isisMetricSlice = []IsisMetric{} + } + return obj +} +func (obj *metricsResponseIsisMetricIter) appendHolderSlice(item IsisMetric) MetricsResponseIsisMetricIter { + obj.isisMetricSlice = append(obj.isisMetricSlice, item) + return obj +} + +// description is TBD +// LagMetrics returns a []LagMetric +func (obj *metricsResponse) LagMetrics() MetricsResponseLagMetricIter { + if len(obj.obj.LagMetrics) == 0 { + obj.setChoice(MetricsResponseChoice.LAG_METRICS) + } + if obj.lagMetricsHolder == nil { + obj.lagMetricsHolder = newMetricsResponseLagMetricIter(&obj.obj.LagMetrics).setMsg(obj) + } + return obj.lagMetricsHolder +} + +type metricsResponseLagMetricIter struct { + obj *metricsResponse + lagMetricSlice []LagMetric + fieldPtr *[]*otg.LagMetric +} + +func newMetricsResponseLagMetricIter(ptr *[]*otg.LagMetric) MetricsResponseLagMetricIter { + return &metricsResponseLagMetricIter{fieldPtr: ptr} +} + +type MetricsResponseLagMetricIter interface { + setMsg(*metricsResponse) MetricsResponseLagMetricIter + Items() []LagMetric + Add() LagMetric + Append(items ...LagMetric) MetricsResponseLagMetricIter + Set(index int, newObj LagMetric) MetricsResponseLagMetricIter + Clear() MetricsResponseLagMetricIter + clearHolderSlice() MetricsResponseLagMetricIter + appendHolderSlice(item LagMetric) MetricsResponseLagMetricIter +} + +func (obj *metricsResponseLagMetricIter) setMsg(msg *metricsResponse) MetricsResponseLagMetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&lagMetric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *metricsResponseLagMetricIter) Items() []LagMetric { + return obj.lagMetricSlice +} + +func (obj *metricsResponseLagMetricIter) Add() LagMetric { + newObj := &otg.LagMetric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &lagMetric{obj: newObj} + newLibObj.setDefault() + obj.lagMetricSlice = append(obj.lagMetricSlice, newLibObj) + return newLibObj +} + +func (obj *metricsResponseLagMetricIter) Append(items ...LagMetric) MetricsResponseLagMetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.lagMetricSlice = append(obj.lagMetricSlice, item) + } + return obj +} + +func (obj *metricsResponseLagMetricIter) Set(index int, newObj LagMetric) MetricsResponseLagMetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.lagMetricSlice[index] = newObj + return obj +} +func (obj *metricsResponseLagMetricIter) Clear() MetricsResponseLagMetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.LagMetric{} + obj.lagMetricSlice = []LagMetric{} + } + return obj +} +func (obj *metricsResponseLagMetricIter) clearHolderSlice() MetricsResponseLagMetricIter { + if len(obj.lagMetricSlice) > 0 { + obj.lagMetricSlice = []LagMetric{} + } + return obj +} +func (obj *metricsResponseLagMetricIter) appendHolderSlice(item LagMetric) MetricsResponseLagMetricIter { + obj.lagMetricSlice = append(obj.lagMetricSlice, item) + return obj +} + +// description is TBD +// LacpMetrics returns a []LacpMetric +func (obj *metricsResponse) LacpMetrics() MetricsResponseLacpMetricIter { + if len(obj.obj.LacpMetrics) == 0 { + obj.setChoice(MetricsResponseChoice.LACP_METRICS) + } + if obj.lacpMetricsHolder == nil { + obj.lacpMetricsHolder = newMetricsResponseLacpMetricIter(&obj.obj.LacpMetrics).setMsg(obj) + } + return obj.lacpMetricsHolder +} + +type metricsResponseLacpMetricIter struct { + obj *metricsResponse + lacpMetricSlice []LacpMetric + fieldPtr *[]*otg.LacpMetric +} + +func newMetricsResponseLacpMetricIter(ptr *[]*otg.LacpMetric) MetricsResponseLacpMetricIter { + return &metricsResponseLacpMetricIter{fieldPtr: ptr} +} + +type MetricsResponseLacpMetricIter interface { + setMsg(*metricsResponse) MetricsResponseLacpMetricIter + Items() []LacpMetric + Add() LacpMetric + Append(items ...LacpMetric) MetricsResponseLacpMetricIter + Set(index int, newObj LacpMetric) MetricsResponseLacpMetricIter + Clear() MetricsResponseLacpMetricIter + clearHolderSlice() MetricsResponseLacpMetricIter + appendHolderSlice(item LacpMetric) MetricsResponseLacpMetricIter +} + +func (obj *metricsResponseLacpMetricIter) setMsg(msg *metricsResponse) MetricsResponseLacpMetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&lacpMetric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *metricsResponseLacpMetricIter) Items() []LacpMetric { + return obj.lacpMetricSlice +} + +func (obj *metricsResponseLacpMetricIter) Add() LacpMetric { + newObj := &otg.LacpMetric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &lacpMetric{obj: newObj} + newLibObj.setDefault() + obj.lacpMetricSlice = append(obj.lacpMetricSlice, newLibObj) + return newLibObj +} + +func (obj *metricsResponseLacpMetricIter) Append(items ...LacpMetric) MetricsResponseLacpMetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.lacpMetricSlice = append(obj.lacpMetricSlice, item) + } + return obj +} + +func (obj *metricsResponseLacpMetricIter) Set(index int, newObj LacpMetric) MetricsResponseLacpMetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.lacpMetricSlice[index] = newObj + return obj +} +func (obj *metricsResponseLacpMetricIter) Clear() MetricsResponseLacpMetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.LacpMetric{} + obj.lacpMetricSlice = []LacpMetric{} + } + return obj +} +func (obj *metricsResponseLacpMetricIter) clearHolderSlice() MetricsResponseLacpMetricIter { + if len(obj.lacpMetricSlice) > 0 { + obj.lacpMetricSlice = []LacpMetric{} + } + return obj +} +func (obj *metricsResponseLacpMetricIter) appendHolderSlice(item LacpMetric) MetricsResponseLacpMetricIter { + obj.lacpMetricSlice = append(obj.lacpMetricSlice, item) + return obj +} + +// description is TBD +// LldpMetrics returns a []LldpMetric +func (obj *metricsResponse) LldpMetrics() MetricsResponseLldpMetricIter { + if len(obj.obj.LldpMetrics) == 0 { + obj.setChoice(MetricsResponseChoice.LLDP_METRICS) + } + if obj.lldpMetricsHolder == nil { + obj.lldpMetricsHolder = newMetricsResponseLldpMetricIter(&obj.obj.LldpMetrics).setMsg(obj) + } + return obj.lldpMetricsHolder +} + +type metricsResponseLldpMetricIter struct { + obj *metricsResponse + lldpMetricSlice []LldpMetric + fieldPtr *[]*otg.LldpMetric +} + +func newMetricsResponseLldpMetricIter(ptr *[]*otg.LldpMetric) MetricsResponseLldpMetricIter { + return &metricsResponseLldpMetricIter{fieldPtr: ptr} +} + +type MetricsResponseLldpMetricIter interface { + setMsg(*metricsResponse) MetricsResponseLldpMetricIter + Items() []LldpMetric + Add() LldpMetric + Append(items ...LldpMetric) MetricsResponseLldpMetricIter + Set(index int, newObj LldpMetric) MetricsResponseLldpMetricIter + Clear() MetricsResponseLldpMetricIter + clearHolderSlice() MetricsResponseLldpMetricIter + appendHolderSlice(item LldpMetric) MetricsResponseLldpMetricIter +} + +func (obj *metricsResponseLldpMetricIter) setMsg(msg *metricsResponse) MetricsResponseLldpMetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&lldpMetric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *metricsResponseLldpMetricIter) Items() []LldpMetric { + return obj.lldpMetricSlice +} + +func (obj *metricsResponseLldpMetricIter) Add() LldpMetric { + newObj := &otg.LldpMetric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &lldpMetric{obj: newObj} + newLibObj.setDefault() + obj.lldpMetricSlice = append(obj.lldpMetricSlice, newLibObj) + return newLibObj +} + +func (obj *metricsResponseLldpMetricIter) Append(items ...LldpMetric) MetricsResponseLldpMetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.lldpMetricSlice = append(obj.lldpMetricSlice, item) + } + return obj +} + +func (obj *metricsResponseLldpMetricIter) Set(index int, newObj LldpMetric) MetricsResponseLldpMetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.lldpMetricSlice[index] = newObj + return obj +} +func (obj *metricsResponseLldpMetricIter) Clear() MetricsResponseLldpMetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.LldpMetric{} + obj.lldpMetricSlice = []LldpMetric{} + } + return obj +} +func (obj *metricsResponseLldpMetricIter) clearHolderSlice() MetricsResponseLldpMetricIter { + if len(obj.lldpMetricSlice) > 0 { + obj.lldpMetricSlice = []LldpMetric{} + } + return obj +} +func (obj *metricsResponseLldpMetricIter) appendHolderSlice(item LldpMetric) MetricsResponseLldpMetricIter { + obj.lldpMetricSlice = append(obj.lldpMetricSlice, item) + return obj +} + +// description is TBD +// RsvpMetrics returns a []RsvpMetric +func (obj *metricsResponse) RsvpMetrics() MetricsResponseRsvpMetricIter { + if len(obj.obj.RsvpMetrics) == 0 { + obj.setChoice(MetricsResponseChoice.RSVP_METRICS) + } + if obj.rsvpMetricsHolder == nil { + obj.rsvpMetricsHolder = newMetricsResponseRsvpMetricIter(&obj.obj.RsvpMetrics).setMsg(obj) + } + return obj.rsvpMetricsHolder +} + +type metricsResponseRsvpMetricIter struct { + obj *metricsResponse + rsvpMetricSlice []RsvpMetric + fieldPtr *[]*otg.RsvpMetric +} + +func newMetricsResponseRsvpMetricIter(ptr *[]*otg.RsvpMetric) MetricsResponseRsvpMetricIter { + return &metricsResponseRsvpMetricIter{fieldPtr: ptr} +} + +type MetricsResponseRsvpMetricIter interface { + setMsg(*metricsResponse) MetricsResponseRsvpMetricIter + Items() []RsvpMetric + Add() RsvpMetric + Append(items ...RsvpMetric) MetricsResponseRsvpMetricIter + Set(index int, newObj RsvpMetric) MetricsResponseRsvpMetricIter + Clear() MetricsResponseRsvpMetricIter + clearHolderSlice() MetricsResponseRsvpMetricIter + appendHolderSlice(item RsvpMetric) MetricsResponseRsvpMetricIter +} + +func (obj *metricsResponseRsvpMetricIter) setMsg(msg *metricsResponse) MetricsResponseRsvpMetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&rsvpMetric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *metricsResponseRsvpMetricIter) Items() []RsvpMetric { + return obj.rsvpMetricSlice +} + +func (obj *metricsResponseRsvpMetricIter) Add() RsvpMetric { + newObj := &otg.RsvpMetric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &rsvpMetric{obj: newObj} + newLibObj.setDefault() + obj.rsvpMetricSlice = append(obj.rsvpMetricSlice, newLibObj) + return newLibObj +} + +func (obj *metricsResponseRsvpMetricIter) Append(items ...RsvpMetric) MetricsResponseRsvpMetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.rsvpMetricSlice = append(obj.rsvpMetricSlice, item) + } + return obj +} + +func (obj *metricsResponseRsvpMetricIter) Set(index int, newObj RsvpMetric) MetricsResponseRsvpMetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.rsvpMetricSlice[index] = newObj + return obj +} +func (obj *metricsResponseRsvpMetricIter) Clear() MetricsResponseRsvpMetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.RsvpMetric{} + obj.rsvpMetricSlice = []RsvpMetric{} + } + return obj +} +func (obj *metricsResponseRsvpMetricIter) clearHolderSlice() MetricsResponseRsvpMetricIter { + if len(obj.rsvpMetricSlice) > 0 { + obj.rsvpMetricSlice = []RsvpMetric{} + } + return obj +} +func (obj *metricsResponseRsvpMetricIter) appendHolderSlice(item RsvpMetric) MetricsResponseRsvpMetricIter { + obj.rsvpMetricSlice = append(obj.rsvpMetricSlice, item) + return obj +} + +// description is TBD +// Dhcpv4ClientMetrics returns a []Dhcpv4ClientMetric +func (obj *metricsResponse) Dhcpv4ClientMetrics() MetricsResponseDhcpv4ClientMetricIter { + if len(obj.obj.Dhcpv4ClientMetrics) == 0 { + obj.obj.Dhcpv4ClientMetrics = []*otg.Dhcpv4ClientMetric{} + } + if obj.dhcpv4ClientMetricsHolder == nil { + obj.dhcpv4ClientMetricsHolder = newMetricsResponseDhcpv4ClientMetricIter(&obj.obj.Dhcpv4ClientMetrics).setMsg(obj) + } + return obj.dhcpv4ClientMetricsHolder +} + +type metricsResponseDhcpv4ClientMetricIter struct { + obj *metricsResponse + dhcpv4ClientMetricSlice []Dhcpv4ClientMetric + fieldPtr *[]*otg.Dhcpv4ClientMetric +} + +func newMetricsResponseDhcpv4ClientMetricIter(ptr *[]*otg.Dhcpv4ClientMetric) MetricsResponseDhcpv4ClientMetricIter { + return &metricsResponseDhcpv4ClientMetricIter{fieldPtr: ptr} +} + +type MetricsResponseDhcpv4ClientMetricIter interface { + setMsg(*metricsResponse) MetricsResponseDhcpv4ClientMetricIter + Items() []Dhcpv4ClientMetric + Add() Dhcpv4ClientMetric + Append(items ...Dhcpv4ClientMetric) MetricsResponseDhcpv4ClientMetricIter + Set(index int, newObj Dhcpv4ClientMetric) MetricsResponseDhcpv4ClientMetricIter + Clear() MetricsResponseDhcpv4ClientMetricIter + clearHolderSlice() MetricsResponseDhcpv4ClientMetricIter + appendHolderSlice(item Dhcpv4ClientMetric) MetricsResponseDhcpv4ClientMetricIter +} + +func (obj *metricsResponseDhcpv4ClientMetricIter) setMsg(msg *metricsResponse) MetricsResponseDhcpv4ClientMetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv4ClientMetric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *metricsResponseDhcpv4ClientMetricIter) Items() []Dhcpv4ClientMetric { + return obj.dhcpv4ClientMetricSlice +} + +func (obj *metricsResponseDhcpv4ClientMetricIter) Add() Dhcpv4ClientMetric { + newObj := &otg.Dhcpv4ClientMetric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv4ClientMetric{obj: newObj} + newLibObj.setDefault() + obj.dhcpv4ClientMetricSlice = append(obj.dhcpv4ClientMetricSlice, newLibObj) + return newLibObj +} + +func (obj *metricsResponseDhcpv4ClientMetricIter) Append(items ...Dhcpv4ClientMetric) MetricsResponseDhcpv4ClientMetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv4ClientMetricSlice = append(obj.dhcpv4ClientMetricSlice, item) + } + return obj +} + +func (obj *metricsResponseDhcpv4ClientMetricIter) Set(index int, newObj Dhcpv4ClientMetric) MetricsResponseDhcpv4ClientMetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv4ClientMetricSlice[index] = newObj + return obj +} +func (obj *metricsResponseDhcpv4ClientMetricIter) Clear() MetricsResponseDhcpv4ClientMetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv4ClientMetric{} + obj.dhcpv4ClientMetricSlice = []Dhcpv4ClientMetric{} + } + return obj +} +func (obj *metricsResponseDhcpv4ClientMetricIter) clearHolderSlice() MetricsResponseDhcpv4ClientMetricIter { + if len(obj.dhcpv4ClientMetricSlice) > 0 { + obj.dhcpv4ClientMetricSlice = []Dhcpv4ClientMetric{} + } + return obj +} +func (obj *metricsResponseDhcpv4ClientMetricIter) appendHolderSlice(item Dhcpv4ClientMetric) MetricsResponseDhcpv4ClientMetricIter { + obj.dhcpv4ClientMetricSlice = append(obj.dhcpv4ClientMetricSlice, item) + return obj +} + +// description is TBD +// Dhcpv4ServerMetrics returns a []Dhcpv4ServerMetric +func (obj *metricsResponse) Dhcpv4ServerMetrics() MetricsResponseDhcpv4ServerMetricIter { + if len(obj.obj.Dhcpv4ServerMetrics) == 0 { + obj.obj.Dhcpv4ServerMetrics = []*otg.Dhcpv4ServerMetric{} + } + if obj.dhcpv4ServerMetricsHolder == nil { + obj.dhcpv4ServerMetricsHolder = newMetricsResponseDhcpv4ServerMetricIter(&obj.obj.Dhcpv4ServerMetrics).setMsg(obj) + } + return obj.dhcpv4ServerMetricsHolder +} + +type metricsResponseDhcpv4ServerMetricIter struct { + obj *metricsResponse + dhcpv4ServerMetricSlice []Dhcpv4ServerMetric + fieldPtr *[]*otg.Dhcpv4ServerMetric +} + +func newMetricsResponseDhcpv4ServerMetricIter(ptr *[]*otg.Dhcpv4ServerMetric) MetricsResponseDhcpv4ServerMetricIter { + return &metricsResponseDhcpv4ServerMetricIter{fieldPtr: ptr} +} + +type MetricsResponseDhcpv4ServerMetricIter interface { + setMsg(*metricsResponse) MetricsResponseDhcpv4ServerMetricIter + Items() []Dhcpv4ServerMetric + Add() Dhcpv4ServerMetric + Append(items ...Dhcpv4ServerMetric) MetricsResponseDhcpv4ServerMetricIter + Set(index int, newObj Dhcpv4ServerMetric) MetricsResponseDhcpv4ServerMetricIter + Clear() MetricsResponseDhcpv4ServerMetricIter + clearHolderSlice() MetricsResponseDhcpv4ServerMetricIter + appendHolderSlice(item Dhcpv4ServerMetric) MetricsResponseDhcpv4ServerMetricIter +} + +func (obj *metricsResponseDhcpv4ServerMetricIter) setMsg(msg *metricsResponse) MetricsResponseDhcpv4ServerMetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv4ServerMetric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *metricsResponseDhcpv4ServerMetricIter) Items() []Dhcpv4ServerMetric { + return obj.dhcpv4ServerMetricSlice +} + +func (obj *metricsResponseDhcpv4ServerMetricIter) Add() Dhcpv4ServerMetric { + newObj := &otg.Dhcpv4ServerMetric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv4ServerMetric{obj: newObj} + newLibObj.setDefault() + obj.dhcpv4ServerMetricSlice = append(obj.dhcpv4ServerMetricSlice, newLibObj) + return newLibObj +} + +func (obj *metricsResponseDhcpv4ServerMetricIter) Append(items ...Dhcpv4ServerMetric) MetricsResponseDhcpv4ServerMetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv4ServerMetricSlice = append(obj.dhcpv4ServerMetricSlice, item) + } + return obj +} + +func (obj *metricsResponseDhcpv4ServerMetricIter) Set(index int, newObj Dhcpv4ServerMetric) MetricsResponseDhcpv4ServerMetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv4ServerMetricSlice[index] = newObj + return obj +} +func (obj *metricsResponseDhcpv4ServerMetricIter) Clear() MetricsResponseDhcpv4ServerMetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv4ServerMetric{} + obj.dhcpv4ServerMetricSlice = []Dhcpv4ServerMetric{} + } + return obj +} +func (obj *metricsResponseDhcpv4ServerMetricIter) clearHolderSlice() MetricsResponseDhcpv4ServerMetricIter { + if len(obj.dhcpv4ServerMetricSlice) > 0 { + obj.dhcpv4ServerMetricSlice = []Dhcpv4ServerMetric{} + } + return obj +} +func (obj *metricsResponseDhcpv4ServerMetricIter) appendHolderSlice(item Dhcpv4ServerMetric) MetricsResponseDhcpv4ServerMetricIter { + obj.dhcpv4ServerMetricSlice = append(obj.dhcpv4ServerMetricSlice, item) + return obj +} + +// description is TBD +// Dhcpv6ClientMetrics returns a []Dhcpv6ClientMetric +func (obj *metricsResponse) Dhcpv6ClientMetrics() MetricsResponseDhcpv6ClientMetricIter { + if len(obj.obj.Dhcpv6ClientMetrics) == 0 { + obj.obj.Dhcpv6ClientMetrics = []*otg.Dhcpv6ClientMetric{} + } + if obj.dhcpv6ClientMetricsHolder == nil { + obj.dhcpv6ClientMetricsHolder = newMetricsResponseDhcpv6ClientMetricIter(&obj.obj.Dhcpv6ClientMetrics).setMsg(obj) + } + return obj.dhcpv6ClientMetricsHolder +} + +type metricsResponseDhcpv6ClientMetricIter struct { + obj *metricsResponse + dhcpv6ClientMetricSlice []Dhcpv6ClientMetric + fieldPtr *[]*otg.Dhcpv6ClientMetric +} + +func newMetricsResponseDhcpv6ClientMetricIter(ptr *[]*otg.Dhcpv6ClientMetric) MetricsResponseDhcpv6ClientMetricIter { + return &metricsResponseDhcpv6ClientMetricIter{fieldPtr: ptr} +} + +type MetricsResponseDhcpv6ClientMetricIter interface { + setMsg(*metricsResponse) MetricsResponseDhcpv6ClientMetricIter + Items() []Dhcpv6ClientMetric + Add() Dhcpv6ClientMetric + Append(items ...Dhcpv6ClientMetric) MetricsResponseDhcpv6ClientMetricIter + Set(index int, newObj Dhcpv6ClientMetric) MetricsResponseDhcpv6ClientMetricIter + Clear() MetricsResponseDhcpv6ClientMetricIter + clearHolderSlice() MetricsResponseDhcpv6ClientMetricIter + appendHolderSlice(item Dhcpv6ClientMetric) MetricsResponseDhcpv6ClientMetricIter +} + +func (obj *metricsResponseDhcpv6ClientMetricIter) setMsg(msg *metricsResponse) MetricsResponseDhcpv6ClientMetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv6ClientMetric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *metricsResponseDhcpv6ClientMetricIter) Items() []Dhcpv6ClientMetric { + return obj.dhcpv6ClientMetricSlice +} + +func (obj *metricsResponseDhcpv6ClientMetricIter) Add() Dhcpv6ClientMetric { + newObj := &otg.Dhcpv6ClientMetric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv6ClientMetric{obj: newObj} + newLibObj.setDefault() + obj.dhcpv6ClientMetricSlice = append(obj.dhcpv6ClientMetricSlice, newLibObj) + return newLibObj +} + +func (obj *metricsResponseDhcpv6ClientMetricIter) Append(items ...Dhcpv6ClientMetric) MetricsResponseDhcpv6ClientMetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv6ClientMetricSlice = append(obj.dhcpv6ClientMetricSlice, item) + } + return obj +} + +func (obj *metricsResponseDhcpv6ClientMetricIter) Set(index int, newObj Dhcpv6ClientMetric) MetricsResponseDhcpv6ClientMetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv6ClientMetricSlice[index] = newObj + return obj +} +func (obj *metricsResponseDhcpv6ClientMetricIter) Clear() MetricsResponseDhcpv6ClientMetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv6ClientMetric{} + obj.dhcpv6ClientMetricSlice = []Dhcpv6ClientMetric{} + } + return obj +} +func (obj *metricsResponseDhcpv6ClientMetricIter) clearHolderSlice() MetricsResponseDhcpv6ClientMetricIter { + if len(obj.dhcpv6ClientMetricSlice) > 0 { + obj.dhcpv6ClientMetricSlice = []Dhcpv6ClientMetric{} + } + return obj +} +func (obj *metricsResponseDhcpv6ClientMetricIter) appendHolderSlice(item Dhcpv6ClientMetric) MetricsResponseDhcpv6ClientMetricIter { + obj.dhcpv6ClientMetricSlice = append(obj.dhcpv6ClientMetricSlice, item) + return obj +} + +// description is TBD +// Dhcpv6ServerMetrics returns a []Dhcpv6ServerMetric +func (obj *metricsResponse) Dhcpv6ServerMetrics() MetricsResponseDhcpv6ServerMetricIter { + if len(obj.obj.Dhcpv6ServerMetrics) == 0 { + obj.obj.Dhcpv6ServerMetrics = []*otg.Dhcpv6ServerMetric{} + } + if obj.dhcpv6ServerMetricsHolder == nil { + obj.dhcpv6ServerMetricsHolder = newMetricsResponseDhcpv6ServerMetricIter(&obj.obj.Dhcpv6ServerMetrics).setMsg(obj) + } + return obj.dhcpv6ServerMetricsHolder +} + +type metricsResponseDhcpv6ServerMetricIter struct { + obj *metricsResponse + dhcpv6ServerMetricSlice []Dhcpv6ServerMetric + fieldPtr *[]*otg.Dhcpv6ServerMetric +} + +func newMetricsResponseDhcpv6ServerMetricIter(ptr *[]*otg.Dhcpv6ServerMetric) MetricsResponseDhcpv6ServerMetricIter { + return &metricsResponseDhcpv6ServerMetricIter{fieldPtr: ptr} +} + +type MetricsResponseDhcpv6ServerMetricIter interface { + setMsg(*metricsResponse) MetricsResponseDhcpv6ServerMetricIter + Items() []Dhcpv6ServerMetric + Add() Dhcpv6ServerMetric + Append(items ...Dhcpv6ServerMetric) MetricsResponseDhcpv6ServerMetricIter + Set(index int, newObj Dhcpv6ServerMetric) MetricsResponseDhcpv6ServerMetricIter + Clear() MetricsResponseDhcpv6ServerMetricIter + clearHolderSlice() MetricsResponseDhcpv6ServerMetricIter + appendHolderSlice(item Dhcpv6ServerMetric) MetricsResponseDhcpv6ServerMetricIter +} + +func (obj *metricsResponseDhcpv6ServerMetricIter) setMsg(msg *metricsResponse) MetricsResponseDhcpv6ServerMetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv6ServerMetric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *metricsResponseDhcpv6ServerMetricIter) Items() []Dhcpv6ServerMetric { + return obj.dhcpv6ServerMetricSlice +} + +func (obj *metricsResponseDhcpv6ServerMetricIter) Add() Dhcpv6ServerMetric { + newObj := &otg.Dhcpv6ServerMetric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv6ServerMetric{obj: newObj} + newLibObj.setDefault() + obj.dhcpv6ServerMetricSlice = append(obj.dhcpv6ServerMetricSlice, newLibObj) + return newLibObj +} + +func (obj *metricsResponseDhcpv6ServerMetricIter) Append(items ...Dhcpv6ServerMetric) MetricsResponseDhcpv6ServerMetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv6ServerMetricSlice = append(obj.dhcpv6ServerMetricSlice, item) + } + return obj +} + +func (obj *metricsResponseDhcpv6ServerMetricIter) Set(index int, newObj Dhcpv6ServerMetric) MetricsResponseDhcpv6ServerMetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv6ServerMetricSlice[index] = newObj + return obj +} +func (obj *metricsResponseDhcpv6ServerMetricIter) Clear() MetricsResponseDhcpv6ServerMetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv6ServerMetric{} + obj.dhcpv6ServerMetricSlice = []Dhcpv6ServerMetric{} + } + return obj +} +func (obj *metricsResponseDhcpv6ServerMetricIter) clearHolderSlice() MetricsResponseDhcpv6ServerMetricIter { + if len(obj.dhcpv6ServerMetricSlice) > 0 { + obj.dhcpv6ServerMetricSlice = []Dhcpv6ServerMetric{} + } + return obj +} +func (obj *metricsResponseDhcpv6ServerMetricIter) appendHolderSlice(item Dhcpv6ServerMetric) MetricsResponseDhcpv6ServerMetricIter { + obj.dhcpv6ServerMetricSlice = append(obj.dhcpv6ServerMetricSlice, item) + return obj +} + +// description is TBD +// Ospfv2Metrics returns a []Ospfv2Metric +func (obj *metricsResponse) Ospfv2Metrics() MetricsResponseOspfv2MetricIter { + if len(obj.obj.Ospfv2Metrics) == 0 { + obj.setChoice(MetricsResponseChoice.OSPFV2_METRICS) + } + if obj.ospfv2MetricsHolder == nil { + obj.ospfv2MetricsHolder = newMetricsResponseOspfv2MetricIter(&obj.obj.Ospfv2Metrics).setMsg(obj) + } + return obj.ospfv2MetricsHolder +} + +type metricsResponseOspfv2MetricIter struct { + obj *metricsResponse + ospfv2MetricSlice []Ospfv2Metric + fieldPtr *[]*otg.Ospfv2Metric +} + +func newMetricsResponseOspfv2MetricIter(ptr *[]*otg.Ospfv2Metric) MetricsResponseOspfv2MetricIter { + return &metricsResponseOspfv2MetricIter{fieldPtr: ptr} +} + +type MetricsResponseOspfv2MetricIter interface { + setMsg(*metricsResponse) MetricsResponseOspfv2MetricIter + Items() []Ospfv2Metric + Add() Ospfv2Metric + Append(items ...Ospfv2Metric) MetricsResponseOspfv2MetricIter + Set(index int, newObj Ospfv2Metric) MetricsResponseOspfv2MetricIter + Clear() MetricsResponseOspfv2MetricIter + clearHolderSlice() MetricsResponseOspfv2MetricIter + appendHolderSlice(item Ospfv2Metric) MetricsResponseOspfv2MetricIter +} + +func (obj *metricsResponseOspfv2MetricIter) setMsg(msg *metricsResponse) MetricsResponseOspfv2MetricIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&ospfv2Metric{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *metricsResponseOspfv2MetricIter) Items() []Ospfv2Metric { + return obj.ospfv2MetricSlice +} + +func (obj *metricsResponseOspfv2MetricIter) Add() Ospfv2Metric { + newObj := &otg.Ospfv2Metric{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &ospfv2Metric{obj: newObj} + newLibObj.setDefault() + obj.ospfv2MetricSlice = append(obj.ospfv2MetricSlice, newLibObj) + return newLibObj +} + +func (obj *metricsResponseOspfv2MetricIter) Append(items ...Ospfv2Metric) MetricsResponseOspfv2MetricIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.ospfv2MetricSlice = append(obj.ospfv2MetricSlice, item) + } + return obj +} + +func (obj *metricsResponseOspfv2MetricIter) Set(index int, newObj Ospfv2Metric) MetricsResponseOspfv2MetricIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.ospfv2MetricSlice[index] = newObj + return obj +} +func (obj *metricsResponseOspfv2MetricIter) Clear() MetricsResponseOspfv2MetricIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Ospfv2Metric{} + obj.ospfv2MetricSlice = []Ospfv2Metric{} + } + return obj +} +func (obj *metricsResponseOspfv2MetricIter) clearHolderSlice() MetricsResponseOspfv2MetricIter { + if len(obj.ospfv2MetricSlice) > 0 { + obj.ospfv2MetricSlice = []Ospfv2Metric{} + } + return obj +} +func (obj *metricsResponseOspfv2MetricIter) appendHolderSlice(item Ospfv2Metric) MetricsResponseOspfv2MetricIter { + obj.ospfv2MetricSlice = append(obj.ospfv2MetricSlice, item) + return obj +} + +func (obj *metricsResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.PortMetrics) != 0 { + + if set_default { + obj.PortMetrics().clearHolderSlice() + for _, item := range obj.obj.PortMetrics { + obj.PortMetrics().appendHolderSlice(&portMetric{obj: item}) + } + } + for _, item := range obj.PortMetrics().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.FlowMetrics) != 0 { + + if set_default { + obj.FlowMetrics().clearHolderSlice() + for _, item := range obj.obj.FlowMetrics { + obj.FlowMetrics().appendHolderSlice(&flowMetric{obj: item}) + } + } + for _, item := range obj.FlowMetrics().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Bgpv4Metrics) != 0 { + + if set_default { + obj.Bgpv4Metrics().clearHolderSlice() + for _, item := range obj.obj.Bgpv4Metrics { + obj.Bgpv4Metrics().appendHolderSlice(&bgpv4Metric{obj: item}) + } + } + for _, item := range obj.Bgpv4Metrics().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Bgpv6Metrics) != 0 { + + if set_default { + obj.Bgpv6Metrics().clearHolderSlice() + for _, item := range obj.obj.Bgpv6Metrics { + obj.Bgpv6Metrics().appendHolderSlice(&bgpv6Metric{obj: item}) + } + } + for _, item := range obj.Bgpv6Metrics().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.IsisMetrics) != 0 { + + if set_default { + obj.IsisMetrics().clearHolderSlice() + for _, item := range obj.obj.IsisMetrics { + obj.IsisMetrics().appendHolderSlice(&isisMetric{obj: item}) + } + } + for _, item := range obj.IsisMetrics().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.LagMetrics) != 0 { + + if set_default { + obj.LagMetrics().clearHolderSlice() + for _, item := range obj.obj.LagMetrics { + obj.LagMetrics().appendHolderSlice(&lagMetric{obj: item}) + } + } + for _, item := range obj.LagMetrics().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.LacpMetrics) != 0 { + + if set_default { + obj.LacpMetrics().clearHolderSlice() + for _, item := range obj.obj.LacpMetrics { + obj.LacpMetrics().appendHolderSlice(&lacpMetric{obj: item}) + } + } + for _, item := range obj.LacpMetrics().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.LldpMetrics) != 0 { + + if set_default { + obj.LldpMetrics().clearHolderSlice() + for _, item := range obj.obj.LldpMetrics { + obj.LldpMetrics().appendHolderSlice(&lldpMetric{obj: item}) + } + } + for _, item := range obj.LldpMetrics().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.RsvpMetrics) != 0 { + + if set_default { + obj.RsvpMetrics().clearHolderSlice() + for _, item := range obj.obj.RsvpMetrics { + obj.RsvpMetrics().appendHolderSlice(&rsvpMetric{obj: item}) + } + } + for _, item := range obj.RsvpMetrics().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Dhcpv4ClientMetrics) != 0 { + + if set_default { + obj.Dhcpv4ClientMetrics().clearHolderSlice() + for _, item := range obj.obj.Dhcpv4ClientMetrics { + obj.Dhcpv4ClientMetrics().appendHolderSlice(&dhcpv4ClientMetric{obj: item}) + } + } + for _, item := range obj.Dhcpv4ClientMetrics().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Dhcpv4ServerMetrics) != 0 { + + if set_default { + obj.Dhcpv4ServerMetrics().clearHolderSlice() + for _, item := range obj.obj.Dhcpv4ServerMetrics { + obj.Dhcpv4ServerMetrics().appendHolderSlice(&dhcpv4ServerMetric{obj: item}) + } + } + for _, item := range obj.Dhcpv4ServerMetrics().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Dhcpv6ClientMetrics) != 0 { + + if set_default { + obj.Dhcpv6ClientMetrics().clearHolderSlice() + for _, item := range obj.obj.Dhcpv6ClientMetrics { + obj.Dhcpv6ClientMetrics().appendHolderSlice(&dhcpv6ClientMetric{obj: item}) + } + } + for _, item := range obj.Dhcpv6ClientMetrics().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Dhcpv6ServerMetrics) != 0 { + + if set_default { + obj.Dhcpv6ServerMetrics().clearHolderSlice() + for _, item := range obj.obj.Dhcpv6ServerMetrics { + obj.Dhcpv6ServerMetrics().appendHolderSlice(&dhcpv6ServerMetric{obj: item}) + } + } + for _, item := range obj.Dhcpv6ServerMetrics().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ospfv2Metrics) != 0 { + + if set_default { + obj.Ospfv2Metrics().clearHolderSlice() + for _, item := range obj.obj.Ospfv2Metrics { + obj.Ospfv2Metrics().appendHolderSlice(&ospfv2Metric{obj: item}) + } + } + for _, item := range obj.Ospfv2Metrics().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *metricsResponse) setDefault() { + var choices_set int = 0 + var choice MetricsResponseChoiceEnum + + if len(obj.obj.FlowMetrics) > 0 { + choices_set += 1 + choice = MetricsResponseChoice.FLOW_METRICS + } + + if len(obj.obj.PortMetrics) > 0 { + choices_set += 1 + choice = MetricsResponseChoice.PORT_METRICS + } + + if len(obj.obj.Bgpv4Metrics) > 0 { + choices_set += 1 + choice = MetricsResponseChoice.BGPV4_METRICS + } + + if len(obj.obj.Bgpv6Metrics) > 0 { + choices_set += 1 + choice = MetricsResponseChoice.BGPV6_METRICS + } + + if len(obj.obj.IsisMetrics) > 0 { + choices_set += 1 + choice = MetricsResponseChoice.ISIS_METRICS + } + + if len(obj.obj.LagMetrics) > 0 { + choices_set += 1 + choice = MetricsResponseChoice.LAG_METRICS + } + + if len(obj.obj.LacpMetrics) > 0 { + choices_set += 1 + choice = MetricsResponseChoice.LACP_METRICS + } + + if len(obj.obj.LldpMetrics) > 0 { + choices_set += 1 + choice = MetricsResponseChoice.LLDP_METRICS + } + + if len(obj.obj.RsvpMetrics) > 0 { + choices_set += 1 + choice = MetricsResponseChoice.RSVP_METRICS + } + + if len(obj.obj.Ospfv2Metrics) > 0 { + choices_set += 1 + choice = MetricsResponseChoice.OSPFV2_METRICS + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(MetricsResponseChoice.PORT_METRICS) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in MetricsResponse") + } + } else { + intVal := otg.MetricsResponse_Choice_Enum_value[string(choice)] + enumValue := otg.MetricsResponse_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/neighborsv4_state.go b/gosnappi/neighborsv4_state.go new file mode 100644 index 00000000..46ad8fca --- /dev/null +++ b/gosnappi/neighborsv4_state.go @@ -0,0 +1,373 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Neighborsv4State ***** +type neighborsv4State struct { + validation + obj *otg.Neighborsv4State + marshaller marshalNeighborsv4State + unMarshaller unMarshalNeighborsv4State +} + +func NewNeighborsv4State() Neighborsv4State { + obj := neighborsv4State{obj: &otg.Neighborsv4State{}} + obj.setDefault() + return &obj +} + +func (obj *neighborsv4State) msg() *otg.Neighborsv4State { + return obj.obj +} + +func (obj *neighborsv4State) setMsg(msg *otg.Neighborsv4State) Neighborsv4State { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalneighborsv4State struct { + obj *neighborsv4State +} + +type marshalNeighborsv4State interface { + // ToProto marshals Neighborsv4State to protobuf object *otg.Neighborsv4State + ToProto() (*otg.Neighborsv4State, error) + // ToPbText marshals Neighborsv4State to protobuf text + ToPbText() (string, error) + // ToYaml marshals Neighborsv4State to YAML text + ToYaml() (string, error) + // ToJson marshals Neighborsv4State to JSON text + ToJson() (string, error) +} + +type unMarshalneighborsv4State struct { + obj *neighborsv4State +} + +type unMarshalNeighborsv4State interface { + // FromProto unmarshals Neighborsv4State from protobuf object *otg.Neighborsv4State + FromProto(msg *otg.Neighborsv4State) (Neighborsv4State, error) + // FromPbText unmarshals Neighborsv4State from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Neighborsv4State from YAML text + FromYaml(value string) error + // FromJson unmarshals Neighborsv4State from JSON text + FromJson(value string) error +} + +func (obj *neighborsv4State) Marshal() marshalNeighborsv4State { + if obj.marshaller == nil { + obj.marshaller = &marshalneighborsv4State{obj: obj} + } + return obj.marshaller +} + +func (obj *neighborsv4State) Unmarshal() unMarshalNeighborsv4State { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalneighborsv4State{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalneighborsv4State) ToProto() (*otg.Neighborsv4State, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalneighborsv4State) FromProto(msg *otg.Neighborsv4State) (Neighborsv4State, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalneighborsv4State) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalneighborsv4State) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalneighborsv4State) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalneighborsv4State) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalneighborsv4State) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalneighborsv4State) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *neighborsv4State) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *neighborsv4State) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *neighborsv4State) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *neighborsv4State) Clone() (Neighborsv4State, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewNeighborsv4State() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Neighborsv4State is iPv4 Neighbor state (ARP cache entry). +type Neighborsv4State interface { + Validation + // msg marshals Neighborsv4State to protobuf object *otg.Neighborsv4State + // and doesn't set defaults + msg() *otg.Neighborsv4State + // setMsg unmarshals Neighborsv4State from protobuf object *otg.Neighborsv4State + // and doesn't set defaults + setMsg(*otg.Neighborsv4State) Neighborsv4State + // provides marshal interface + Marshal() marshalNeighborsv4State + // provides unmarshal interface + Unmarshal() unMarshalNeighborsv4State + // validate validates Neighborsv4State + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Neighborsv4State, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EthernetName returns string, set in Neighborsv4State. + EthernetName() string + // SetEthernetName assigns string provided by user to Neighborsv4State + SetEthernetName(value string) Neighborsv4State + // Ipv4Address returns string, set in Neighborsv4State. + Ipv4Address() string + // SetIpv4Address assigns string provided by user to Neighborsv4State + SetIpv4Address(value string) Neighborsv4State + // LinkLayerAddress returns string, set in Neighborsv4State. + LinkLayerAddress() string + // SetLinkLayerAddress assigns string provided by user to Neighborsv4State + SetLinkLayerAddress(value string) Neighborsv4State + // HasLinkLayerAddress checks if LinkLayerAddress has been set in Neighborsv4State + HasLinkLayerAddress() bool +} + +// The name of the Ethernet interface associated with the Neighbor state (ARP cache entry). +// EthernetName returns a string +func (obj *neighborsv4State) EthernetName() string { + + return *obj.obj.EthernetName + +} + +// The name of the Ethernet interface associated with the Neighbor state (ARP cache entry). +// SetEthernetName sets the string value in the Neighborsv4State object +func (obj *neighborsv4State) SetEthernetName(value string) Neighborsv4State { + + obj.obj.EthernetName = &value + return obj +} + +// The IPv4 address of the neighbor. +// Ipv4Address returns a string +func (obj *neighborsv4State) Ipv4Address() string { + + return *obj.obj.Ipv4Address + +} + +// The IPv4 address of the neighbor. +// SetIpv4Address sets the string value in the Neighborsv4State object +func (obj *neighborsv4State) SetIpv4Address(value string) Neighborsv4State { + + obj.obj.Ipv4Address = &value + return obj +} + +// The link-layer address (MAC) of the neighbor. +// LinkLayerAddress returns a string +func (obj *neighborsv4State) LinkLayerAddress() string { + + return *obj.obj.LinkLayerAddress + +} + +// The link-layer address (MAC) of the neighbor. +// LinkLayerAddress returns a string +func (obj *neighborsv4State) HasLinkLayerAddress() bool { + return obj.obj.LinkLayerAddress != nil +} + +// The link-layer address (MAC) of the neighbor. +// SetLinkLayerAddress sets the string value in the Neighborsv4State object +func (obj *neighborsv4State) SetLinkLayerAddress(value string) Neighborsv4State { + + obj.obj.LinkLayerAddress = &value + return obj +} + +func (obj *neighborsv4State) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // EthernetName is required + if obj.obj.EthernetName == nil { + vObj.validationErrors = append(vObj.validationErrors, "EthernetName is required field on interface Neighborsv4State") + } + + // Ipv4Address is required + if obj.obj.Ipv4Address == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv4Address is required field on interface Neighborsv4State") + } + if obj.obj.Ipv4Address != nil { + + err := obj.validateIpv4(obj.Ipv4Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Neighborsv4State.Ipv4Address")) + } + + } + + if obj.obj.LinkLayerAddress != nil { + + err := obj.validateMac(obj.LinkLayerAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Neighborsv4State.LinkLayerAddress")) + } + + } + +} + +func (obj *neighborsv4State) setDefault() { + +} diff --git a/gosnappi/neighborsv4_states_request.go b/gosnappi/neighborsv4_states_request.go new file mode 100644 index 00000000..b4a71c89 --- /dev/null +++ b/gosnappi/neighborsv4_states_request.go @@ -0,0 +1,317 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Neighborsv4StatesRequest ***** +type neighborsv4StatesRequest struct { + validation + obj *otg.Neighborsv4StatesRequest + marshaller marshalNeighborsv4StatesRequest + unMarshaller unMarshalNeighborsv4StatesRequest +} + +func NewNeighborsv4StatesRequest() Neighborsv4StatesRequest { + obj := neighborsv4StatesRequest{obj: &otg.Neighborsv4StatesRequest{}} + obj.setDefault() + return &obj +} + +func (obj *neighborsv4StatesRequest) msg() *otg.Neighborsv4StatesRequest { + return obj.obj +} + +func (obj *neighborsv4StatesRequest) setMsg(msg *otg.Neighborsv4StatesRequest) Neighborsv4StatesRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalneighborsv4StatesRequest struct { + obj *neighborsv4StatesRequest +} + +type marshalNeighborsv4StatesRequest interface { + // ToProto marshals Neighborsv4StatesRequest to protobuf object *otg.Neighborsv4StatesRequest + ToProto() (*otg.Neighborsv4StatesRequest, error) + // ToPbText marshals Neighborsv4StatesRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Neighborsv4StatesRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Neighborsv4StatesRequest to JSON text + ToJson() (string, error) +} + +type unMarshalneighborsv4StatesRequest struct { + obj *neighborsv4StatesRequest +} + +type unMarshalNeighborsv4StatesRequest interface { + // FromProto unmarshals Neighborsv4StatesRequest from protobuf object *otg.Neighborsv4StatesRequest + FromProto(msg *otg.Neighborsv4StatesRequest) (Neighborsv4StatesRequest, error) + // FromPbText unmarshals Neighborsv4StatesRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Neighborsv4StatesRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Neighborsv4StatesRequest from JSON text + FromJson(value string) error +} + +func (obj *neighborsv4StatesRequest) Marshal() marshalNeighborsv4StatesRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalneighborsv4StatesRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *neighborsv4StatesRequest) Unmarshal() unMarshalNeighborsv4StatesRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalneighborsv4StatesRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalneighborsv4StatesRequest) ToProto() (*otg.Neighborsv4StatesRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalneighborsv4StatesRequest) FromProto(msg *otg.Neighborsv4StatesRequest) (Neighborsv4StatesRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalneighborsv4StatesRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalneighborsv4StatesRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalneighborsv4StatesRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalneighborsv4StatesRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalneighborsv4StatesRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalneighborsv4StatesRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *neighborsv4StatesRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *neighborsv4StatesRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *neighborsv4StatesRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *neighborsv4StatesRequest) Clone() (Neighborsv4StatesRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewNeighborsv4StatesRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Neighborsv4StatesRequest is the request to retrieve IPv4 Neighbor state (ARP cache entries) of a network interface(s). +type Neighborsv4StatesRequest interface { + Validation + // msg marshals Neighborsv4StatesRequest to protobuf object *otg.Neighborsv4StatesRequest + // and doesn't set defaults + msg() *otg.Neighborsv4StatesRequest + // setMsg unmarshals Neighborsv4StatesRequest from protobuf object *otg.Neighborsv4StatesRequest + // and doesn't set defaults + setMsg(*otg.Neighborsv4StatesRequest) Neighborsv4StatesRequest + // provides marshal interface + Marshal() marshalNeighborsv4StatesRequest + // provides unmarshal interface + Unmarshal() unMarshalNeighborsv4StatesRequest + // validate validates Neighborsv4StatesRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Neighborsv4StatesRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EthernetNames returns []string, set in Neighborsv4StatesRequest. + EthernetNames() []string + // SetEthernetNames assigns []string provided by user to Neighborsv4StatesRequest + SetEthernetNames(value []string) Neighborsv4StatesRequest +} + +// The names of Ethernet interfaces for which Neighbor state (ARP cache entries) will be retrieved. If no names are specified then the results will contain Neighbor state (ARP cache entries) for all available Ethernet interfaces. +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// EthernetNames returns a []string +func (obj *neighborsv4StatesRequest) EthernetNames() []string { + if obj.obj.EthernetNames == nil { + obj.obj.EthernetNames = make([]string, 0) + } + return obj.obj.EthernetNames +} + +// The names of Ethernet interfaces for which Neighbor state (ARP cache entries) will be retrieved. If no names are specified then the results will contain Neighbor state (ARP cache entries) for all available Ethernet interfaces. +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// SetEthernetNames sets the []string value in the Neighborsv4StatesRequest object +func (obj *neighborsv4StatesRequest) SetEthernetNames(value []string) Neighborsv4StatesRequest { + + if obj.obj.EthernetNames == nil { + obj.obj.EthernetNames = make([]string, 0) + } + obj.obj.EthernetNames = value + + return obj +} + +func (obj *neighborsv4StatesRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *neighborsv4StatesRequest) setDefault() { + +} diff --git a/gosnappi/neighborsv6_state.go b/gosnappi/neighborsv6_state.go new file mode 100644 index 00000000..8cdbc5fc --- /dev/null +++ b/gosnappi/neighborsv6_state.go @@ -0,0 +1,373 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Neighborsv6State ***** +type neighborsv6State struct { + validation + obj *otg.Neighborsv6State + marshaller marshalNeighborsv6State + unMarshaller unMarshalNeighborsv6State +} + +func NewNeighborsv6State() Neighborsv6State { + obj := neighborsv6State{obj: &otg.Neighborsv6State{}} + obj.setDefault() + return &obj +} + +func (obj *neighborsv6State) msg() *otg.Neighborsv6State { + return obj.obj +} + +func (obj *neighborsv6State) setMsg(msg *otg.Neighborsv6State) Neighborsv6State { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalneighborsv6State struct { + obj *neighborsv6State +} + +type marshalNeighborsv6State interface { + // ToProto marshals Neighborsv6State to protobuf object *otg.Neighborsv6State + ToProto() (*otg.Neighborsv6State, error) + // ToPbText marshals Neighborsv6State to protobuf text + ToPbText() (string, error) + // ToYaml marshals Neighborsv6State to YAML text + ToYaml() (string, error) + // ToJson marshals Neighborsv6State to JSON text + ToJson() (string, error) +} + +type unMarshalneighborsv6State struct { + obj *neighborsv6State +} + +type unMarshalNeighborsv6State interface { + // FromProto unmarshals Neighborsv6State from protobuf object *otg.Neighborsv6State + FromProto(msg *otg.Neighborsv6State) (Neighborsv6State, error) + // FromPbText unmarshals Neighborsv6State from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Neighborsv6State from YAML text + FromYaml(value string) error + // FromJson unmarshals Neighborsv6State from JSON text + FromJson(value string) error +} + +func (obj *neighborsv6State) Marshal() marshalNeighborsv6State { + if obj.marshaller == nil { + obj.marshaller = &marshalneighborsv6State{obj: obj} + } + return obj.marshaller +} + +func (obj *neighborsv6State) Unmarshal() unMarshalNeighborsv6State { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalneighborsv6State{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalneighborsv6State) ToProto() (*otg.Neighborsv6State, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalneighborsv6State) FromProto(msg *otg.Neighborsv6State) (Neighborsv6State, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalneighborsv6State) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalneighborsv6State) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalneighborsv6State) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalneighborsv6State) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalneighborsv6State) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalneighborsv6State) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *neighborsv6State) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *neighborsv6State) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *neighborsv6State) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *neighborsv6State) Clone() (Neighborsv6State, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewNeighborsv6State() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Neighborsv6State is iPv6 Neighbor state (NDISC cache entry). +type Neighborsv6State interface { + Validation + // msg marshals Neighborsv6State to protobuf object *otg.Neighborsv6State + // and doesn't set defaults + msg() *otg.Neighborsv6State + // setMsg unmarshals Neighborsv6State from protobuf object *otg.Neighborsv6State + // and doesn't set defaults + setMsg(*otg.Neighborsv6State) Neighborsv6State + // provides marshal interface + Marshal() marshalNeighborsv6State + // provides unmarshal interface + Unmarshal() unMarshalNeighborsv6State + // validate validates Neighborsv6State + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Neighborsv6State, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EthernetName returns string, set in Neighborsv6State. + EthernetName() string + // SetEthernetName assigns string provided by user to Neighborsv6State + SetEthernetName(value string) Neighborsv6State + // Ipv6Address returns string, set in Neighborsv6State. + Ipv6Address() string + // SetIpv6Address assigns string provided by user to Neighborsv6State + SetIpv6Address(value string) Neighborsv6State + // LinkLayerAddress returns string, set in Neighborsv6State. + LinkLayerAddress() string + // SetLinkLayerAddress assigns string provided by user to Neighborsv6State + SetLinkLayerAddress(value string) Neighborsv6State + // HasLinkLayerAddress checks if LinkLayerAddress has been set in Neighborsv6State + HasLinkLayerAddress() bool +} + +// The name of the Ethernet interface associated with the Neighbor state (NDISC cache entry). +// EthernetName returns a string +func (obj *neighborsv6State) EthernetName() string { + + return *obj.obj.EthernetName + +} + +// The name of the Ethernet interface associated with the Neighbor state (NDISC cache entry). +// SetEthernetName sets the string value in the Neighborsv6State object +func (obj *neighborsv6State) SetEthernetName(value string) Neighborsv6State { + + obj.obj.EthernetName = &value + return obj +} + +// The IPv6 address of the neighbor. +// Ipv6Address returns a string +func (obj *neighborsv6State) Ipv6Address() string { + + return *obj.obj.Ipv6Address + +} + +// The IPv6 address of the neighbor. +// SetIpv6Address sets the string value in the Neighborsv6State object +func (obj *neighborsv6State) SetIpv6Address(value string) Neighborsv6State { + + obj.obj.Ipv6Address = &value + return obj +} + +// The link-layer address (MAC) of the neighbor. +// LinkLayerAddress returns a string +func (obj *neighborsv6State) LinkLayerAddress() string { + + return *obj.obj.LinkLayerAddress + +} + +// The link-layer address (MAC) of the neighbor. +// LinkLayerAddress returns a string +func (obj *neighborsv6State) HasLinkLayerAddress() bool { + return obj.obj.LinkLayerAddress != nil +} + +// The link-layer address (MAC) of the neighbor. +// SetLinkLayerAddress sets the string value in the Neighborsv6State object +func (obj *neighborsv6State) SetLinkLayerAddress(value string) Neighborsv6State { + + obj.obj.LinkLayerAddress = &value + return obj +} + +func (obj *neighborsv6State) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // EthernetName is required + if obj.obj.EthernetName == nil { + vObj.validationErrors = append(vObj.validationErrors, "EthernetName is required field on interface Neighborsv6State") + } + + // Ipv6Address is required + if obj.obj.Ipv6Address == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv6Address is required field on interface Neighborsv6State") + } + if obj.obj.Ipv6Address != nil { + + err := obj.validateIpv6(obj.Ipv6Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Neighborsv6State.Ipv6Address")) + } + + } + + if obj.obj.LinkLayerAddress != nil { + + err := obj.validateMac(obj.LinkLayerAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Neighborsv6State.LinkLayerAddress")) + } + + } + +} + +func (obj *neighborsv6State) setDefault() { + +} diff --git a/gosnappi/neighborsv6_states_request.go b/gosnappi/neighborsv6_states_request.go new file mode 100644 index 00000000..60f8bfce --- /dev/null +++ b/gosnappi/neighborsv6_states_request.go @@ -0,0 +1,317 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Neighborsv6StatesRequest ***** +type neighborsv6StatesRequest struct { + validation + obj *otg.Neighborsv6StatesRequest + marshaller marshalNeighborsv6StatesRequest + unMarshaller unMarshalNeighborsv6StatesRequest +} + +func NewNeighborsv6StatesRequest() Neighborsv6StatesRequest { + obj := neighborsv6StatesRequest{obj: &otg.Neighborsv6StatesRequest{}} + obj.setDefault() + return &obj +} + +func (obj *neighborsv6StatesRequest) msg() *otg.Neighborsv6StatesRequest { + return obj.obj +} + +func (obj *neighborsv6StatesRequest) setMsg(msg *otg.Neighborsv6StatesRequest) Neighborsv6StatesRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalneighborsv6StatesRequest struct { + obj *neighborsv6StatesRequest +} + +type marshalNeighborsv6StatesRequest interface { + // ToProto marshals Neighborsv6StatesRequest to protobuf object *otg.Neighborsv6StatesRequest + ToProto() (*otg.Neighborsv6StatesRequest, error) + // ToPbText marshals Neighborsv6StatesRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Neighborsv6StatesRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Neighborsv6StatesRequest to JSON text + ToJson() (string, error) +} + +type unMarshalneighborsv6StatesRequest struct { + obj *neighborsv6StatesRequest +} + +type unMarshalNeighborsv6StatesRequest interface { + // FromProto unmarshals Neighborsv6StatesRequest from protobuf object *otg.Neighborsv6StatesRequest + FromProto(msg *otg.Neighborsv6StatesRequest) (Neighborsv6StatesRequest, error) + // FromPbText unmarshals Neighborsv6StatesRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Neighborsv6StatesRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Neighborsv6StatesRequest from JSON text + FromJson(value string) error +} + +func (obj *neighborsv6StatesRequest) Marshal() marshalNeighborsv6StatesRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalneighborsv6StatesRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *neighborsv6StatesRequest) Unmarshal() unMarshalNeighborsv6StatesRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalneighborsv6StatesRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalneighborsv6StatesRequest) ToProto() (*otg.Neighborsv6StatesRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalneighborsv6StatesRequest) FromProto(msg *otg.Neighborsv6StatesRequest) (Neighborsv6StatesRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalneighborsv6StatesRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalneighborsv6StatesRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalneighborsv6StatesRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalneighborsv6StatesRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalneighborsv6StatesRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalneighborsv6StatesRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *neighborsv6StatesRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *neighborsv6StatesRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *neighborsv6StatesRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *neighborsv6StatesRequest) Clone() (Neighborsv6StatesRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewNeighborsv6StatesRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Neighborsv6StatesRequest is the request to retrieve IPv6 Neighbor state (NDISC cache entries) of a network interface(s). +type Neighborsv6StatesRequest interface { + Validation + // msg marshals Neighborsv6StatesRequest to protobuf object *otg.Neighborsv6StatesRequest + // and doesn't set defaults + msg() *otg.Neighborsv6StatesRequest + // setMsg unmarshals Neighborsv6StatesRequest from protobuf object *otg.Neighborsv6StatesRequest + // and doesn't set defaults + setMsg(*otg.Neighborsv6StatesRequest) Neighborsv6StatesRequest + // provides marshal interface + Marshal() marshalNeighborsv6StatesRequest + // provides unmarshal interface + Unmarshal() unMarshalNeighborsv6StatesRequest + // validate validates Neighborsv6StatesRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Neighborsv6StatesRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // EthernetNames returns []string, set in Neighborsv6StatesRequest. + EthernetNames() []string + // SetEthernetNames assigns []string provided by user to Neighborsv6StatesRequest + SetEthernetNames(value []string) Neighborsv6StatesRequest +} + +// The names of Ethernet interfaces for which Neighbor state (NDISC cache entries) will be retrieved. If no names are specified then the results will contain Neighbor state (NDISC cache entries) for all available Ethernet interfaces. +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// EthernetNames returns a []string +func (obj *neighborsv6StatesRequest) EthernetNames() []string { + if obj.obj.EthernetNames == nil { + obj.obj.EthernetNames = make([]string, 0) + } + return obj.obj.EthernetNames +} + +// The names of Ethernet interfaces for which Neighbor state (NDISC cache entries) will be retrieved. If no names are specified then the results will contain Neighbor state (NDISC cache entries) for all available Ethernet interfaces. +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ethernet/properties/name +// +// SetEthernetNames sets the []string value in the Neighborsv6StatesRequest object +func (obj *neighborsv6StatesRequest) SetEthernetNames(value []string) Neighborsv6StatesRequest { + + if obj.obj.EthernetNames == nil { + obj.obj.EthernetNames = make([]string, 0) + } + obj.obj.EthernetNames = value + + return obj +} + +func (obj *neighborsv6StatesRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *neighborsv6StatesRequest) setDefault() { + +} diff --git a/gosnappi/ospfv2_authentication_md5.go b/gosnappi/ospfv2_authentication_md5.go new file mode 100644 index 00000000..3f24ff29 --- /dev/null +++ b/gosnappi/ospfv2_authentication_md5.go @@ -0,0 +1,363 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2AuthenticationMd5 ***** +type ospfv2AuthenticationMd5 struct { + validation + obj *otg.Ospfv2AuthenticationMd5 + marshaller marshalOspfv2AuthenticationMd5 + unMarshaller unMarshalOspfv2AuthenticationMd5 +} + +func NewOspfv2AuthenticationMd5() Ospfv2AuthenticationMd5 { + obj := ospfv2AuthenticationMd5{obj: &otg.Ospfv2AuthenticationMd5{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2AuthenticationMd5) msg() *otg.Ospfv2AuthenticationMd5 { + return obj.obj +} + +func (obj *ospfv2AuthenticationMd5) setMsg(msg *otg.Ospfv2AuthenticationMd5) Ospfv2AuthenticationMd5 { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2AuthenticationMd5 struct { + obj *ospfv2AuthenticationMd5 +} + +type marshalOspfv2AuthenticationMd5 interface { + // ToProto marshals Ospfv2AuthenticationMd5 to protobuf object *otg.Ospfv2AuthenticationMd5 + ToProto() (*otg.Ospfv2AuthenticationMd5, error) + // ToPbText marshals Ospfv2AuthenticationMd5 to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2AuthenticationMd5 to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2AuthenticationMd5 to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2AuthenticationMd5 struct { + obj *ospfv2AuthenticationMd5 +} + +type unMarshalOspfv2AuthenticationMd5 interface { + // FromProto unmarshals Ospfv2AuthenticationMd5 from protobuf object *otg.Ospfv2AuthenticationMd5 + FromProto(msg *otg.Ospfv2AuthenticationMd5) (Ospfv2AuthenticationMd5, error) + // FromPbText unmarshals Ospfv2AuthenticationMd5 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2AuthenticationMd5 from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2AuthenticationMd5 from JSON text + FromJson(value string) error +} + +func (obj *ospfv2AuthenticationMd5) Marshal() marshalOspfv2AuthenticationMd5 { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2AuthenticationMd5{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2AuthenticationMd5) Unmarshal() unMarshalOspfv2AuthenticationMd5 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2AuthenticationMd5{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2AuthenticationMd5) ToProto() (*otg.Ospfv2AuthenticationMd5, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2AuthenticationMd5) FromProto(msg *otg.Ospfv2AuthenticationMd5) (Ospfv2AuthenticationMd5, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2AuthenticationMd5) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2AuthenticationMd5) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2AuthenticationMd5) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2AuthenticationMd5) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2AuthenticationMd5) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2AuthenticationMd5) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2AuthenticationMd5) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2AuthenticationMd5) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2AuthenticationMd5) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2AuthenticationMd5) Clone() (Ospfv2AuthenticationMd5, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2AuthenticationMd5() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Ospfv2AuthenticationMd5 is container of Cryptographic authentication. +// If the authentication type is of 'md5' then 'md5_key_id' and 'md5_key' +// both are to be configured. A shared secret key is configured in all routers attached to a common network/subnet. +// For each OSPF protocol packet, the key is used to generate/verify a "message digest" that is appended to the end +// of the OSPF packet. +type Ospfv2AuthenticationMd5 interface { + Validation + // msg marshals Ospfv2AuthenticationMd5 to protobuf object *otg.Ospfv2AuthenticationMd5 + // and doesn't set defaults + msg() *otg.Ospfv2AuthenticationMd5 + // setMsg unmarshals Ospfv2AuthenticationMd5 from protobuf object *otg.Ospfv2AuthenticationMd5 + // and doesn't set defaults + setMsg(*otg.Ospfv2AuthenticationMd5) Ospfv2AuthenticationMd5 + // provides marshal interface + Marshal() marshalOspfv2AuthenticationMd5 + // provides unmarshal interface + Unmarshal() unMarshalOspfv2AuthenticationMd5 + // validate validates Ospfv2AuthenticationMd5 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2AuthenticationMd5, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // KeyId returns uint32, set in Ospfv2AuthenticationMd5. + KeyId() uint32 + // SetKeyId assigns uint32 provided by user to Ospfv2AuthenticationMd5 + SetKeyId(value uint32) Ospfv2AuthenticationMd5 + // HasKeyId checks if KeyId has been set in Ospfv2AuthenticationMd5 + HasKeyId() bool + // Key returns string, set in Ospfv2AuthenticationMd5. + Key() string + // SetKey assigns string provided by user to Ospfv2AuthenticationMd5 + SetKey(value string) Ospfv2AuthenticationMd5 + // HasKey checks if Key has been set in Ospfv2AuthenticationMd5 + HasKey() bool +} + +// The unique MD5 Key Identifier per-interface. +// KeyId returns a uint32 +func (obj *ospfv2AuthenticationMd5) KeyId() uint32 { + + return *obj.obj.KeyId + +} + +// The unique MD5 Key Identifier per-interface. +// KeyId returns a uint32 +func (obj *ospfv2AuthenticationMd5) HasKeyId() bool { + return obj.obj.KeyId != nil +} + +// The unique MD5 Key Identifier per-interface. +// SetKeyId sets the uint32 value in the Ospfv2AuthenticationMd5 object +func (obj *ospfv2AuthenticationMd5) SetKeyId(value uint32) Ospfv2AuthenticationMd5 { + + obj.obj.KeyId = &value + return obj +} + +// An alphanumeric secret used to generate the 16 byte MD5 hash value added +// to the OSPFv2 PDU in the Authentication TLV. +// Key returns a string +func (obj *ospfv2AuthenticationMd5) Key() string { + + return *obj.obj.Key + +} + +// An alphanumeric secret used to generate the 16 byte MD5 hash value added +// to the OSPFv2 PDU in the Authentication TLV. +// Key returns a string +func (obj *ospfv2AuthenticationMd5) HasKey() bool { + return obj.obj.Key != nil +} + +// An alphanumeric secret used to generate the 16 byte MD5 hash value added +// to the OSPFv2 PDU in the Authentication TLV. +// SetKey sets the string value in the Ospfv2AuthenticationMd5 object +func (obj *ospfv2AuthenticationMd5) SetKey(value string) Ospfv2AuthenticationMd5 { + + obj.obj.Key = &value + return obj +} + +func (obj *ospfv2AuthenticationMd5) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.KeyId != nil { + + if *obj.obj.KeyId < 1 || *obj.obj.KeyId > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= Ospfv2AuthenticationMd5.KeyId <= 255 but Got %d", *obj.obj.KeyId)) + } + + } + + if obj.obj.Key != nil { + + if len(*obj.obj.Key) < 1 || len(*obj.obj.Key) > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "1 <= length of Ospfv2AuthenticationMd5.Key <= 16 but Got %d", + len(*obj.obj.Key))) + } + + } + +} + +func (obj *ospfv2AuthenticationMd5) setDefault() { + +} diff --git a/gosnappi/ospfv2_external_as_lsa.go b/gosnappi/ospfv2_external_as_lsa.go new file mode 100644 index 00000000..950f4001 --- /dev/null +++ b/gosnappi/ospfv2_external_as_lsa.go @@ -0,0 +1,422 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2ExternalAsLsa ***** +type ospfv2ExternalAsLsa struct { + validation + obj *otg.Ospfv2ExternalAsLsa + marshaller marshalOspfv2ExternalAsLsa + unMarshaller unMarshalOspfv2ExternalAsLsa + headerHolder Ospfv2LsaHeader +} + +func NewOspfv2ExternalAsLsa() Ospfv2ExternalAsLsa { + obj := ospfv2ExternalAsLsa{obj: &otg.Ospfv2ExternalAsLsa{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2ExternalAsLsa) msg() *otg.Ospfv2ExternalAsLsa { + return obj.obj +} + +func (obj *ospfv2ExternalAsLsa) setMsg(msg *otg.Ospfv2ExternalAsLsa) Ospfv2ExternalAsLsa { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2ExternalAsLsa struct { + obj *ospfv2ExternalAsLsa +} + +type marshalOspfv2ExternalAsLsa interface { + // ToProto marshals Ospfv2ExternalAsLsa to protobuf object *otg.Ospfv2ExternalAsLsa + ToProto() (*otg.Ospfv2ExternalAsLsa, error) + // ToPbText marshals Ospfv2ExternalAsLsa to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2ExternalAsLsa to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2ExternalAsLsa to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2ExternalAsLsa struct { + obj *ospfv2ExternalAsLsa +} + +type unMarshalOspfv2ExternalAsLsa interface { + // FromProto unmarshals Ospfv2ExternalAsLsa from protobuf object *otg.Ospfv2ExternalAsLsa + FromProto(msg *otg.Ospfv2ExternalAsLsa) (Ospfv2ExternalAsLsa, error) + // FromPbText unmarshals Ospfv2ExternalAsLsa from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2ExternalAsLsa from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2ExternalAsLsa from JSON text + FromJson(value string) error +} + +func (obj *ospfv2ExternalAsLsa) Marshal() marshalOspfv2ExternalAsLsa { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2ExternalAsLsa{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2ExternalAsLsa) Unmarshal() unMarshalOspfv2ExternalAsLsa { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2ExternalAsLsa{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2ExternalAsLsa) ToProto() (*otg.Ospfv2ExternalAsLsa, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2ExternalAsLsa) FromProto(msg *otg.Ospfv2ExternalAsLsa) (Ospfv2ExternalAsLsa, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2ExternalAsLsa) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2ExternalAsLsa) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2ExternalAsLsa) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2ExternalAsLsa) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2ExternalAsLsa) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2ExternalAsLsa) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2ExternalAsLsa) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2ExternalAsLsa) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2ExternalAsLsa) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2ExternalAsLsa) Clone() (Ospfv2ExternalAsLsa, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2ExternalAsLsa() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2ExternalAsLsa) setNil() { + obj.headerHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2ExternalAsLsa is contents of OSPFv2 AS-External-LSA - Type 5. +// The value of the IPv4 prefix that was received is present in header.lsa_id. +type Ospfv2ExternalAsLsa interface { + Validation + // msg marshals Ospfv2ExternalAsLsa to protobuf object *otg.Ospfv2ExternalAsLsa + // and doesn't set defaults + msg() *otg.Ospfv2ExternalAsLsa + // setMsg unmarshals Ospfv2ExternalAsLsa from protobuf object *otg.Ospfv2ExternalAsLsa + // and doesn't set defaults + setMsg(*otg.Ospfv2ExternalAsLsa) Ospfv2ExternalAsLsa + // provides marshal interface + Marshal() marshalOspfv2ExternalAsLsa + // provides unmarshal interface + Unmarshal() unMarshalOspfv2ExternalAsLsa + // validate validates Ospfv2ExternalAsLsa + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2ExternalAsLsa, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Header returns Ospfv2LsaHeader, set in Ospfv2ExternalAsLsa. + // Ospfv2LsaHeader is attributes in LSA Header. + Header() Ospfv2LsaHeader + // SetHeader assigns Ospfv2LsaHeader provided by user to Ospfv2ExternalAsLsa. + // Ospfv2LsaHeader is attributes in LSA Header. + SetHeader(value Ospfv2LsaHeader) Ospfv2ExternalAsLsa + // HasHeader checks if Header has been set in Ospfv2ExternalAsLsa + HasHeader() bool + // NetworkMask returns string, set in Ospfv2ExternalAsLsa. + NetworkMask() string + // SetNetworkMask assigns string provided by user to Ospfv2ExternalAsLsa + SetNetworkMask(value string) Ospfv2ExternalAsLsa + // HasNetworkMask checks if NetworkMask has been set in Ospfv2ExternalAsLsa + HasNetworkMask() bool + // Metric returns uint32, set in Ospfv2ExternalAsLsa. + Metric() uint32 + // SetMetric assigns uint32 provided by user to Ospfv2ExternalAsLsa + SetMetric(value uint32) Ospfv2ExternalAsLsa + // HasMetric checks if Metric has been set in Ospfv2ExternalAsLsa + HasMetric() bool + // MetricType returns uint32, set in Ospfv2ExternalAsLsa. + MetricType() uint32 + // SetMetricType assigns uint32 provided by user to Ospfv2ExternalAsLsa + SetMetricType(value uint32) Ospfv2ExternalAsLsa + // HasMetricType checks if MetricType has been set in Ospfv2ExternalAsLsa + HasMetricType() bool + setNil() +} + +// Contents of the LSA header. +// Header returns a Ospfv2LsaHeader +func (obj *ospfv2ExternalAsLsa) Header() Ospfv2LsaHeader { + if obj.obj.Header == nil { + obj.obj.Header = NewOspfv2LsaHeader().msg() + } + if obj.headerHolder == nil { + obj.headerHolder = &ospfv2LsaHeader{obj: obj.obj.Header} + } + return obj.headerHolder +} + +// Contents of the LSA header. +// Header returns a Ospfv2LsaHeader +func (obj *ospfv2ExternalAsLsa) HasHeader() bool { + return obj.obj.Header != nil +} + +// Contents of the LSA header. +// SetHeader sets the Ospfv2LsaHeader value in the Ospfv2ExternalAsLsa object +func (obj *ospfv2ExternalAsLsa) SetHeader(value Ospfv2LsaHeader) Ospfv2ExternalAsLsa { + + obj.headerHolder = nil + obj.obj.Header = value.msg() + + return obj +} + +// The IPv4 address mask for the network. +// NetworkMask returns a string +func (obj *ospfv2ExternalAsLsa) NetworkMask() string { + + return *obj.obj.NetworkMask + +} + +// The IPv4 address mask for the network. +// NetworkMask returns a string +func (obj *ospfv2ExternalAsLsa) HasNetworkMask() bool { + return obj.obj.NetworkMask != nil +} + +// The IPv4 address mask for the network. +// SetNetworkMask sets the string value in the Ospfv2ExternalAsLsa object +func (obj *ospfv2ExternalAsLsa) SetNetworkMask(value string) Ospfv2ExternalAsLsa { + + obj.obj.NetworkMask = &value + return obj +} + +// The cost of the summary route TOS level 0 and all unspecified levels. +// Metric returns a uint32 +func (obj *ospfv2ExternalAsLsa) Metric() uint32 { + + return *obj.obj.Metric + +} + +// The cost of the summary route TOS level 0 and all unspecified levels. +// Metric returns a uint32 +func (obj *ospfv2ExternalAsLsa) HasMetric() bool { + return obj.obj.Metric != nil +} + +// The cost of the summary route TOS level 0 and all unspecified levels. +// SetMetric sets the uint32 value in the Ospfv2ExternalAsLsa object +func (obj *ospfv2ExternalAsLsa) SetMetric(value uint32) Ospfv2ExternalAsLsa { + + obj.obj.Metric = &value + return obj +} + +// The type of metric associated with the route range. +// MetricType returns a uint32 +func (obj *ospfv2ExternalAsLsa) MetricType() uint32 { + + return *obj.obj.MetricType + +} + +// The type of metric associated with the route range. +// MetricType returns a uint32 +func (obj *ospfv2ExternalAsLsa) HasMetricType() bool { + return obj.obj.MetricType != nil +} + +// The type of metric associated with the route range. +// SetMetricType sets the uint32 value in the Ospfv2ExternalAsLsa object +func (obj *ospfv2ExternalAsLsa) SetMetricType(value uint32) Ospfv2ExternalAsLsa { + + obj.obj.MetricType = &value + return obj +} + +func (obj *ospfv2ExternalAsLsa) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Header != nil { + + obj.Header().validateObj(vObj, set_default) + } + + if obj.obj.NetworkMask != nil { + + err := obj.validateIpv4(obj.NetworkMask()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Ospfv2ExternalAsLsa.NetworkMask")) + } + + } + +} + +func (obj *ospfv2ExternalAsLsa) setDefault() { + +} diff --git a/gosnappi/ospfv2_graceful_restart.go b/gosnappi/ospfv2_graceful_restart.go new file mode 100644 index 00000000..e4dccfbc --- /dev/null +++ b/gosnappi/ospfv2_graceful_restart.go @@ -0,0 +1,309 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2GracefulRestart ***** +type ospfv2GracefulRestart struct { + validation + obj *otg.Ospfv2GracefulRestart + marshaller marshalOspfv2GracefulRestart + unMarshaller unMarshalOspfv2GracefulRestart +} + +func NewOspfv2GracefulRestart() Ospfv2GracefulRestart { + obj := ospfv2GracefulRestart{obj: &otg.Ospfv2GracefulRestart{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2GracefulRestart) msg() *otg.Ospfv2GracefulRestart { + return obj.obj +} + +func (obj *ospfv2GracefulRestart) setMsg(msg *otg.Ospfv2GracefulRestart) Ospfv2GracefulRestart { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2GracefulRestart struct { + obj *ospfv2GracefulRestart +} + +type marshalOspfv2GracefulRestart interface { + // ToProto marshals Ospfv2GracefulRestart to protobuf object *otg.Ospfv2GracefulRestart + ToProto() (*otg.Ospfv2GracefulRestart, error) + // ToPbText marshals Ospfv2GracefulRestart to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2GracefulRestart to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2GracefulRestart to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2GracefulRestart struct { + obj *ospfv2GracefulRestart +} + +type unMarshalOspfv2GracefulRestart interface { + // FromProto unmarshals Ospfv2GracefulRestart from protobuf object *otg.Ospfv2GracefulRestart + FromProto(msg *otg.Ospfv2GracefulRestart) (Ospfv2GracefulRestart, error) + // FromPbText unmarshals Ospfv2GracefulRestart from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2GracefulRestart from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2GracefulRestart from JSON text + FromJson(value string) error +} + +func (obj *ospfv2GracefulRestart) Marshal() marshalOspfv2GracefulRestart { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2GracefulRestart{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2GracefulRestart) Unmarshal() unMarshalOspfv2GracefulRestart { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2GracefulRestart{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2GracefulRestart) ToProto() (*otg.Ospfv2GracefulRestart, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2GracefulRestart) FromProto(msg *otg.Ospfv2GracefulRestart) (Ospfv2GracefulRestart, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2GracefulRestart) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2GracefulRestart) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2GracefulRestart) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2GracefulRestart) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2GracefulRestart) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2GracefulRestart) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2GracefulRestart) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2GracefulRestart) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2GracefulRestart) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2GracefulRestart) Clone() (Ospfv2GracefulRestart, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2GracefulRestart() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Ospfv2GracefulRestart is container of properties of OSPFv2 Graceful Retstart. +type Ospfv2GracefulRestart interface { + Validation + // msg marshals Ospfv2GracefulRestart to protobuf object *otg.Ospfv2GracefulRestart + // and doesn't set defaults + msg() *otg.Ospfv2GracefulRestart + // setMsg unmarshals Ospfv2GracefulRestart from protobuf object *otg.Ospfv2GracefulRestart + // and doesn't set defaults + setMsg(*otg.Ospfv2GracefulRestart) Ospfv2GracefulRestart + // provides marshal interface + Marshal() marshalOspfv2GracefulRestart + // provides unmarshal interface + Unmarshal() unMarshalOspfv2GracefulRestart + // validate validates Ospfv2GracefulRestart + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2GracefulRestart, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // HelperMode returns bool, set in Ospfv2GracefulRestart. + HelperMode() bool + // SetHelperMode assigns bool provided by user to Ospfv2GracefulRestart + SetHelperMode(value bool) Ospfv2GracefulRestart + // HasHelperMode checks if HelperMode has been set in Ospfv2GracefulRestart + HasHelperMode() bool +} + +// Support of Graceful Restart in Helper Mode. +// HelperMode returns a bool +func (obj *ospfv2GracefulRestart) HelperMode() bool { + + return *obj.obj.HelperMode + +} + +// Support of Graceful Restart in Helper Mode. +// HelperMode returns a bool +func (obj *ospfv2GracefulRestart) HasHelperMode() bool { + return obj.obj.HelperMode != nil +} + +// Support of Graceful Restart in Helper Mode. +// SetHelperMode sets the bool value in the Ospfv2GracefulRestart object +func (obj *ospfv2GracefulRestart) SetHelperMode(value bool) Ospfv2GracefulRestart { + + obj.obj.HelperMode = &value + return obj +} + +func (obj *ospfv2GracefulRestart) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *ospfv2GracefulRestart) setDefault() { + if obj.obj.HelperMode == nil { + obj.SetHelperMode(false) + } + +} diff --git a/gosnappi/ospfv2_interface.go b/gosnappi/ospfv2_interface.go new file mode 100644 index 00000000..3fd42416 --- /dev/null +++ b/gosnappi/ospfv2_interface.go @@ -0,0 +1,728 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2Interface ***** +type ospfv2Interface struct { + validation + obj *otg.Ospfv2Interface + marshaller marshalOspfv2Interface + unMarshaller unMarshalOspfv2Interface + areaHolder Ospfv2InterfaceArea + networkTypeHolder Ospfv2InterfaceNetworkType + trafficEngineeringHolder Ospfv2InterfaceLinkStateTEIter + authenticationHolder Ospfv2InterfaceAuthentication + advancedHolder Ospfv2InterfaceAdvanced + linkProtectionHolder Ospfv2InterfaceLinkProtection +} + +func NewOspfv2Interface() Ospfv2Interface { + obj := ospfv2Interface{obj: &otg.Ospfv2Interface{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2Interface) msg() *otg.Ospfv2Interface { + return obj.obj +} + +func (obj *ospfv2Interface) setMsg(msg *otg.Ospfv2Interface) Ospfv2Interface { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2Interface struct { + obj *ospfv2Interface +} + +type marshalOspfv2Interface interface { + // ToProto marshals Ospfv2Interface to protobuf object *otg.Ospfv2Interface + ToProto() (*otg.Ospfv2Interface, error) + // ToPbText marshals Ospfv2Interface to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2Interface to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2Interface to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2Interface struct { + obj *ospfv2Interface +} + +type unMarshalOspfv2Interface interface { + // FromProto unmarshals Ospfv2Interface from protobuf object *otg.Ospfv2Interface + FromProto(msg *otg.Ospfv2Interface) (Ospfv2Interface, error) + // FromPbText unmarshals Ospfv2Interface from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2Interface from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2Interface from JSON text + FromJson(value string) error +} + +func (obj *ospfv2Interface) Marshal() marshalOspfv2Interface { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2Interface{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2Interface) Unmarshal() unMarshalOspfv2Interface { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2Interface{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2Interface) ToProto() (*otg.Ospfv2Interface, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2Interface) FromProto(msg *otg.Ospfv2Interface) (Ospfv2Interface, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2Interface) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2Interface) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2Interface) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2Interface) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2Interface) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2Interface) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2Interface) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2Interface) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2Interface) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2Interface) Clone() (Ospfv2Interface, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2Interface() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2Interface) setNil() { + obj.areaHolder = nil + obj.networkTypeHolder = nil + obj.trafficEngineeringHolder = nil + obj.authenticationHolder = nil + obj.advancedHolder = nil + obj.linkProtectionHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2Interface is configuration for single OSPFv2 interface. +type Ospfv2Interface interface { + Validation + // msg marshals Ospfv2Interface to protobuf object *otg.Ospfv2Interface + // and doesn't set defaults + msg() *otg.Ospfv2Interface + // setMsg unmarshals Ospfv2Interface from protobuf object *otg.Ospfv2Interface + // and doesn't set defaults + setMsg(*otg.Ospfv2Interface) Ospfv2Interface + // provides marshal interface + Marshal() marshalOspfv2Interface + // provides unmarshal interface + Unmarshal() unMarshalOspfv2Interface + // validate validates Ospfv2Interface + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2Interface, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in Ospfv2Interface. + Name() string + // SetName assigns string provided by user to Ospfv2Interface + SetName(value string) Ospfv2Interface + // Ipv4Name returns string, set in Ospfv2Interface. + Ipv4Name() string + // SetIpv4Name assigns string provided by user to Ospfv2Interface + SetIpv4Name(value string) Ospfv2Interface + // Area returns Ospfv2InterfaceArea, set in Ospfv2Interface. + // Ospfv2InterfaceArea is container for OSPF Area ID identifies the routing area to which the host belongs.. + Area() Ospfv2InterfaceArea + // SetArea assigns Ospfv2InterfaceArea provided by user to Ospfv2Interface. + // Ospfv2InterfaceArea is container for OSPF Area ID identifies the routing area to which the host belongs.. + SetArea(value Ospfv2InterfaceArea) Ospfv2Interface + // HasArea checks if Area has been set in Ospfv2Interface + HasArea() bool + // NetworkType returns Ospfv2InterfaceNetworkType, set in Ospfv2Interface. + // Ospfv2InterfaceNetworkType is the OSPF network link type options. + // - Point to Point: + // - Broadcast: + // - Point to Multipoint: In this case, at least a neigbor to be configured. + NetworkType() Ospfv2InterfaceNetworkType + // SetNetworkType assigns Ospfv2InterfaceNetworkType provided by user to Ospfv2Interface. + // Ospfv2InterfaceNetworkType is the OSPF network link type options. + // - Point to Point: + // - Broadcast: + // - Point to Multipoint: In this case, at least a neigbor to be configured. + SetNetworkType(value Ospfv2InterfaceNetworkType) Ospfv2Interface + // HasNetworkType checks if NetworkType has been set in Ospfv2Interface + HasNetworkType() bool + // TrafficEngineering returns Ospfv2InterfaceLinkStateTEIterIter, set in Ospfv2Interface + TrafficEngineering() Ospfv2InterfaceLinkStateTEIter + // Authentication returns Ospfv2InterfaceAuthentication, set in Ospfv2Interface. + // Ospfv2InterfaceAuthentication is this contains OSPFv2 authentication properties. + // Reference: https://www.rfc-editor.org/rfc/rfc2328#appendix-D + Authentication() Ospfv2InterfaceAuthentication + // SetAuthentication assigns Ospfv2InterfaceAuthentication provided by user to Ospfv2Interface. + // Ospfv2InterfaceAuthentication is this contains OSPFv2 authentication properties. + // Reference: https://www.rfc-editor.org/rfc/rfc2328#appendix-D + SetAuthentication(value Ospfv2InterfaceAuthentication) Ospfv2Interface + // HasAuthentication checks if Authentication has been set in Ospfv2Interface + HasAuthentication() bool + // Advanced returns Ospfv2InterfaceAdvanced, set in Ospfv2Interface. + // Ospfv2InterfaceAdvanced is contains OSPFv2 advanced properties. + Advanced() Ospfv2InterfaceAdvanced + // SetAdvanced assigns Ospfv2InterfaceAdvanced provided by user to Ospfv2Interface. + // Ospfv2InterfaceAdvanced is contains OSPFv2 advanced properties. + SetAdvanced(value Ospfv2InterfaceAdvanced) Ospfv2Interface + // HasAdvanced checks if Advanced has been set in Ospfv2Interface + HasAdvanced() bool + // LinkProtection returns Ospfv2InterfaceLinkProtection, set in Ospfv2Interface. + // Ospfv2InterfaceLinkProtection is optional container for the link protection sub TLV (type 20). + LinkProtection() Ospfv2InterfaceLinkProtection + // SetLinkProtection assigns Ospfv2InterfaceLinkProtection provided by user to Ospfv2Interface. + // Ospfv2InterfaceLinkProtection is optional container for the link protection sub TLV (type 20). + SetLinkProtection(value Ospfv2InterfaceLinkProtection) Ospfv2Interface + // HasLinkProtection checks if LinkProtection has been set in Ospfv2Interface + HasLinkProtection() bool + // SrlgValues returns []uint32, set in Ospfv2Interface. + SrlgValues() []uint32 + // SetSrlgValues assigns []uint32 provided by user to Ospfv2Interface + SetSrlgValues(value []uint32) Ospfv2Interface + setNil() +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *ospfv2Interface) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the Ospfv2Interface object +func (obj *ospfv2Interface) SetName(value string) Ospfv2Interface { + + obj.obj.Name = &value + return obj +} + +// The globally unique name of the IPv4 interface connected to the DUT. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// Ipv4Name returns a string +func (obj *ospfv2Interface) Ipv4Name() string { + + return *obj.obj.Ipv4Name + +} + +// The globally unique name of the IPv4 interface connected to the DUT. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// SetIpv4Name sets the string value in the Ospfv2Interface object +func (obj *ospfv2Interface) SetIpv4Name(value string) Ospfv2Interface { + + obj.obj.Ipv4Name = &value + return obj +} + +// The Area ID of the area to which the attached network belongs. +// All routing protocol packets originating from the interface are +// labelled with this Area ID. +// Area returns a Ospfv2InterfaceArea +func (obj *ospfv2Interface) Area() Ospfv2InterfaceArea { + if obj.obj.Area == nil { + obj.obj.Area = NewOspfv2InterfaceArea().msg() + } + if obj.areaHolder == nil { + obj.areaHolder = &ospfv2InterfaceArea{obj: obj.obj.Area} + } + return obj.areaHolder +} + +// The Area ID of the area to which the attached network belongs. +// All routing protocol packets originating from the interface are +// labelled with this Area ID. +// Area returns a Ospfv2InterfaceArea +func (obj *ospfv2Interface) HasArea() bool { + return obj.obj.Area != nil +} + +// The Area ID of the area to which the attached network belongs. +// All routing protocol packets originating from the interface are +// labelled with this Area ID. +// SetArea sets the Ospfv2InterfaceArea value in the Ospfv2Interface object +func (obj *ospfv2Interface) SetArea(value Ospfv2InterfaceArea) Ospfv2Interface { + + obj.areaHolder = nil + obj.obj.Area = value.msg() + + return obj +} + +// The OSPF network link type. +// NetworkType returns a Ospfv2InterfaceNetworkType +func (obj *ospfv2Interface) NetworkType() Ospfv2InterfaceNetworkType { + if obj.obj.NetworkType == nil { + obj.obj.NetworkType = NewOspfv2InterfaceNetworkType().msg() + } + if obj.networkTypeHolder == nil { + obj.networkTypeHolder = &ospfv2InterfaceNetworkType{obj: obj.obj.NetworkType} + } + return obj.networkTypeHolder +} + +// The OSPF network link type. +// NetworkType returns a Ospfv2InterfaceNetworkType +func (obj *ospfv2Interface) HasNetworkType() bool { + return obj.obj.NetworkType != nil +} + +// The OSPF network link type. +// SetNetworkType sets the Ospfv2InterfaceNetworkType value in the Ospfv2Interface object +func (obj *ospfv2Interface) SetNetworkType(value Ospfv2InterfaceNetworkType) Ospfv2Interface { + + obj.networkTypeHolder = nil + obj.obj.NetworkType = value.msg() + + return obj +} + +// Contains a list of Traffic Engineering attributes. +// TrafficEngineering returns a []LinkStateTE +func (obj *ospfv2Interface) TrafficEngineering() Ospfv2InterfaceLinkStateTEIter { + if len(obj.obj.TrafficEngineering) == 0 { + obj.obj.TrafficEngineering = []*otg.LinkStateTE{} + } + if obj.trafficEngineeringHolder == nil { + obj.trafficEngineeringHolder = newOspfv2InterfaceLinkStateTEIter(&obj.obj.TrafficEngineering).setMsg(obj) + } + return obj.trafficEngineeringHolder +} + +type ospfv2InterfaceLinkStateTEIter struct { + obj *ospfv2Interface + linkStateTESlice []LinkStateTE + fieldPtr *[]*otg.LinkStateTE +} + +func newOspfv2InterfaceLinkStateTEIter(ptr *[]*otg.LinkStateTE) Ospfv2InterfaceLinkStateTEIter { + return &ospfv2InterfaceLinkStateTEIter{fieldPtr: ptr} +} + +type Ospfv2InterfaceLinkStateTEIter interface { + setMsg(*ospfv2Interface) Ospfv2InterfaceLinkStateTEIter + Items() []LinkStateTE + Add() LinkStateTE + Append(items ...LinkStateTE) Ospfv2InterfaceLinkStateTEIter + Set(index int, newObj LinkStateTE) Ospfv2InterfaceLinkStateTEIter + Clear() Ospfv2InterfaceLinkStateTEIter + clearHolderSlice() Ospfv2InterfaceLinkStateTEIter + appendHolderSlice(item LinkStateTE) Ospfv2InterfaceLinkStateTEIter +} + +func (obj *ospfv2InterfaceLinkStateTEIter) setMsg(msg *ospfv2Interface) Ospfv2InterfaceLinkStateTEIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&linkStateTE{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *ospfv2InterfaceLinkStateTEIter) Items() []LinkStateTE { + return obj.linkStateTESlice +} + +func (obj *ospfv2InterfaceLinkStateTEIter) Add() LinkStateTE { + newObj := &otg.LinkStateTE{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &linkStateTE{obj: newObj} + newLibObj.setDefault() + obj.linkStateTESlice = append(obj.linkStateTESlice, newLibObj) + return newLibObj +} + +func (obj *ospfv2InterfaceLinkStateTEIter) Append(items ...LinkStateTE) Ospfv2InterfaceLinkStateTEIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.linkStateTESlice = append(obj.linkStateTESlice, item) + } + return obj +} + +func (obj *ospfv2InterfaceLinkStateTEIter) Set(index int, newObj LinkStateTE) Ospfv2InterfaceLinkStateTEIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.linkStateTESlice[index] = newObj + return obj +} +func (obj *ospfv2InterfaceLinkStateTEIter) Clear() Ospfv2InterfaceLinkStateTEIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.LinkStateTE{} + obj.linkStateTESlice = []LinkStateTE{} + } + return obj +} +func (obj *ospfv2InterfaceLinkStateTEIter) clearHolderSlice() Ospfv2InterfaceLinkStateTEIter { + if len(obj.linkStateTESlice) > 0 { + obj.linkStateTESlice = []LinkStateTE{} + } + return obj +} +func (obj *ospfv2InterfaceLinkStateTEIter) appendHolderSlice(item LinkStateTE) Ospfv2InterfaceLinkStateTEIter { + obj.linkStateTESlice = append(obj.linkStateTESlice, item) + return obj +} + +// OSPFv2 authentication properties. +// If the authentication is not configured, none OSPF packet exchange is authenticated. +// Authentication returns a Ospfv2InterfaceAuthentication +func (obj *ospfv2Interface) Authentication() Ospfv2InterfaceAuthentication { + if obj.obj.Authentication == nil { + obj.obj.Authentication = NewOspfv2InterfaceAuthentication().msg() + } + if obj.authenticationHolder == nil { + obj.authenticationHolder = &ospfv2InterfaceAuthentication{obj: obj.obj.Authentication} + } + return obj.authenticationHolder +} + +// OSPFv2 authentication properties. +// If the authentication is not configured, none OSPF packet exchange is authenticated. +// Authentication returns a Ospfv2InterfaceAuthentication +func (obj *ospfv2Interface) HasAuthentication() bool { + return obj.obj.Authentication != nil +} + +// OSPFv2 authentication properties. +// If the authentication is not configured, none OSPF packet exchange is authenticated. +// SetAuthentication sets the Ospfv2InterfaceAuthentication value in the Ospfv2Interface object +func (obj *ospfv2Interface) SetAuthentication(value Ospfv2InterfaceAuthentication) Ospfv2Interface { + + obj.authenticationHolder = nil + obj.obj.Authentication = value.msg() + + return obj +} + +// Optional container for advanced interface properties. +// Advanced returns a Ospfv2InterfaceAdvanced +func (obj *ospfv2Interface) Advanced() Ospfv2InterfaceAdvanced { + if obj.obj.Advanced == nil { + obj.obj.Advanced = NewOspfv2InterfaceAdvanced().msg() + } + if obj.advancedHolder == nil { + obj.advancedHolder = &ospfv2InterfaceAdvanced{obj: obj.obj.Advanced} + } + return obj.advancedHolder +} + +// Optional container for advanced interface properties. +// Advanced returns a Ospfv2InterfaceAdvanced +func (obj *ospfv2Interface) HasAdvanced() bool { + return obj.obj.Advanced != nil +} + +// Optional container for advanced interface properties. +// SetAdvanced sets the Ospfv2InterfaceAdvanced value in the Ospfv2Interface object +func (obj *ospfv2Interface) SetAdvanced(value Ospfv2InterfaceAdvanced) Ospfv2Interface { + + obj.advancedHolder = nil + obj.obj.Advanced = value.msg() + + return obj +} + +// Link protection on the OSPFv2 link between two interfaces. +// LinkProtection returns a Ospfv2InterfaceLinkProtection +func (obj *ospfv2Interface) LinkProtection() Ospfv2InterfaceLinkProtection { + if obj.obj.LinkProtection == nil { + obj.obj.LinkProtection = NewOspfv2InterfaceLinkProtection().msg() + } + if obj.linkProtectionHolder == nil { + obj.linkProtectionHolder = &ospfv2InterfaceLinkProtection{obj: obj.obj.LinkProtection} + } + return obj.linkProtectionHolder +} + +// Link protection on the OSPFv2 link between two interfaces. +// LinkProtection returns a Ospfv2InterfaceLinkProtection +func (obj *ospfv2Interface) HasLinkProtection() bool { + return obj.obj.LinkProtection != nil +} + +// Link protection on the OSPFv2 link between two interfaces. +// SetLinkProtection sets the Ospfv2InterfaceLinkProtection value in the Ospfv2Interface object +func (obj *ospfv2Interface) SetLinkProtection(value Ospfv2InterfaceLinkProtection) Ospfv2Interface { + + obj.linkProtectionHolder = nil + obj.obj.LinkProtection = value.msg() + + return obj +} + +// A Shared Risk Link Group (SRLG) is represented by a 32-bit number unique within an IGP (OSPFv2 and IS-IS) domain. +// An SRLG is a set of links sharing a common resource, which affects all links in the set if the common resource fails. +// Links share the same risk of failure and are therefore considered to belong to the same SRLG. +// SrlgValues returns a []uint32 +func (obj *ospfv2Interface) SrlgValues() []uint32 { + if obj.obj.SrlgValues == nil { + obj.obj.SrlgValues = make([]uint32, 0) + } + return obj.obj.SrlgValues +} + +// A Shared Risk Link Group (SRLG) is represented by a 32-bit number unique within an IGP (OSPFv2 and IS-IS) domain. +// An SRLG is a set of links sharing a common resource, which affects all links in the set if the common resource fails. +// Links share the same risk of failure and are therefore considered to belong to the same SRLG. +// SetSrlgValues sets the []uint32 value in the Ospfv2Interface object +func (obj *ospfv2Interface) SetSrlgValues(value []uint32) Ospfv2Interface { + + if obj.obj.SrlgValues == nil { + obj.obj.SrlgValues = make([]uint32, 0) + } + obj.obj.SrlgValues = value + + return obj +} + +func (obj *ospfv2Interface) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface Ospfv2Interface") + } + + // Ipv4Name is required + if obj.obj.Ipv4Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv4Name is required field on interface Ospfv2Interface") + } + + if obj.obj.Area != nil { + + obj.Area().validateObj(vObj, set_default) + } + + if obj.obj.NetworkType != nil { + + obj.NetworkType().validateObj(vObj, set_default) + } + + if len(obj.obj.TrafficEngineering) != 0 { + + if set_default { + obj.TrafficEngineering().clearHolderSlice() + for _, item := range obj.obj.TrafficEngineering { + obj.TrafficEngineering().appendHolderSlice(&linkStateTE{obj: item}) + } + } + for _, item := range obj.TrafficEngineering().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Authentication != nil { + + obj.Authentication().validateObj(vObj, set_default) + } + + if obj.obj.Advanced != nil { + + obj.Advanced().validateObj(vObj, set_default) + } + + if obj.obj.LinkProtection != nil { + + obj.LinkProtection().validateObj(vObj, set_default) + } + + if obj.obj.SrlgValues != nil { + + for _, item := range obj.obj.SrlgValues { + if item > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= Ospfv2Interface.SrlgValues <= 16777215 but Got %d", item)) + } + + } + + } + +} + +func (obj *ospfv2Interface) setDefault() { + +} diff --git a/gosnappi/ospfv2_interface_advanced.go b/gosnappi/ospfv2_interface_advanced.go new file mode 100644 index 00000000..c1fb665b --- /dev/null +++ b/gosnappi/ospfv2_interface_advanced.go @@ -0,0 +1,457 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2InterfaceAdvanced ***** +type ospfv2InterfaceAdvanced struct { + validation + obj *otg.Ospfv2InterfaceAdvanced + marshaller marshalOspfv2InterfaceAdvanced + unMarshaller unMarshalOspfv2InterfaceAdvanced +} + +func NewOspfv2InterfaceAdvanced() Ospfv2InterfaceAdvanced { + obj := ospfv2InterfaceAdvanced{obj: &otg.Ospfv2InterfaceAdvanced{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2InterfaceAdvanced) msg() *otg.Ospfv2InterfaceAdvanced { + return obj.obj +} + +func (obj *ospfv2InterfaceAdvanced) setMsg(msg *otg.Ospfv2InterfaceAdvanced) Ospfv2InterfaceAdvanced { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2InterfaceAdvanced struct { + obj *ospfv2InterfaceAdvanced +} + +type marshalOspfv2InterfaceAdvanced interface { + // ToProto marshals Ospfv2InterfaceAdvanced to protobuf object *otg.Ospfv2InterfaceAdvanced + ToProto() (*otg.Ospfv2InterfaceAdvanced, error) + // ToPbText marshals Ospfv2InterfaceAdvanced to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2InterfaceAdvanced to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2InterfaceAdvanced to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2InterfaceAdvanced struct { + obj *ospfv2InterfaceAdvanced +} + +type unMarshalOspfv2InterfaceAdvanced interface { + // FromProto unmarshals Ospfv2InterfaceAdvanced from protobuf object *otg.Ospfv2InterfaceAdvanced + FromProto(msg *otg.Ospfv2InterfaceAdvanced) (Ospfv2InterfaceAdvanced, error) + // FromPbText unmarshals Ospfv2InterfaceAdvanced from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2InterfaceAdvanced from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2InterfaceAdvanced from JSON text + FromJson(value string) error +} + +func (obj *ospfv2InterfaceAdvanced) Marshal() marshalOspfv2InterfaceAdvanced { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2InterfaceAdvanced{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2InterfaceAdvanced) Unmarshal() unMarshalOspfv2InterfaceAdvanced { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2InterfaceAdvanced{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2InterfaceAdvanced) ToProto() (*otg.Ospfv2InterfaceAdvanced, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2InterfaceAdvanced) FromProto(msg *otg.Ospfv2InterfaceAdvanced) (Ospfv2InterfaceAdvanced, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2InterfaceAdvanced) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2InterfaceAdvanced) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2InterfaceAdvanced) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2InterfaceAdvanced) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2InterfaceAdvanced) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2InterfaceAdvanced) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2InterfaceAdvanced) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2InterfaceAdvanced) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2InterfaceAdvanced) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2InterfaceAdvanced) Clone() (Ospfv2InterfaceAdvanced, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2InterfaceAdvanced() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Ospfv2InterfaceAdvanced is contains OSPFv2 advanced properties. +type Ospfv2InterfaceAdvanced interface { + Validation + // msg marshals Ospfv2InterfaceAdvanced to protobuf object *otg.Ospfv2InterfaceAdvanced + // and doesn't set defaults + msg() *otg.Ospfv2InterfaceAdvanced + // setMsg unmarshals Ospfv2InterfaceAdvanced from protobuf object *otg.Ospfv2InterfaceAdvanced + // and doesn't set defaults + setMsg(*otg.Ospfv2InterfaceAdvanced) Ospfv2InterfaceAdvanced + // provides marshal interface + Marshal() marshalOspfv2InterfaceAdvanced + // provides unmarshal interface + Unmarshal() unMarshalOspfv2InterfaceAdvanced + // validate validates Ospfv2InterfaceAdvanced + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2InterfaceAdvanced, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // HelloInterval returns uint32, set in Ospfv2InterfaceAdvanced. + HelloInterval() uint32 + // SetHelloInterval assigns uint32 provided by user to Ospfv2InterfaceAdvanced + SetHelloInterval(value uint32) Ospfv2InterfaceAdvanced + // HasHelloInterval checks if HelloInterval has been set in Ospfv2InterfaceAdvanced + HasHelloInterval() bool + // DeadInterval returns uint32, set in Ospfv2InterfaceAdvanced. + DeadInterval() uint32 + // SetDeadInterval assigns uint32 provided by user to Ospfv2InterfaceAdvanced + SetDeadInterval(value uint32) Ospfv2InterfaceAdvanced + // HasDeadInterval checks if DeadInterval has been set in Ospfv2InterfaceAdvanced + HasDeadInterval() bool + // RoutingMetric returns uint32, set in Ospfv2InterfaceAdvanced. + RoutingMetric() uint32 + // SetRoutingMetric assigns uint32 provided by user to Ospfv2InterfaceAdvanced + SetRoutingMetric(value uint32) Ospfv2InterfaceAdvanced + // HasRoutingMetric checks if RoutingMetric has been set in Ospfv2InterfaceAdvanced + HasRoutingMetric() bool + // Priority returns uint32, set in Ospfv2InterfaceAdvanced. + Priority() uint32 + // SetPriority assigns uint32 provided by user to Ospfv2InterfaceAdvanced + SetPriority(value uint32) Ospfv2InterfaceAdvanced + // HasPriority checks if Priority has been set in Ospfv2InterfaceAdvanced + HasPriority() bool + // ValidateReceivedMtu returns bool, set in Ospfv2InterfaceAdvanced. + ValidateReceivedMtu() bool + // SetValidateReceivedMtu assigns bool provided by user to Ospfv2InterfaceAdvanced + SetValidateReceivedMtu(value bool) Ospfv2InterfaceAdvanced + // HasValidateReceivedMtu checks if ValidateReceivedMtu has been set in Ospfv2InterfaceAdvanced + HasValidateReceivedMtu() bool +} + +// The time interval, in seconds, between the Hello packets that +// the router sends on the interface. Advertised in Hello packets +// sent out this interface. +// HelloInterval returns a uint32 +func (obj *ospfv2InterfaceAdvanced) HelloInterval() uint32 { + + return *obj.obj.HelloInterval + +} + +// The time interval, in seconds, between the Hello packets that +// the router sends on the interface. Advertised in Hello packets +// sent out this interface. +// HelloInterval returns a uint32 +func (obj *ospfv2InterfaceAdvanced) HasHelloInterval() bool { + return obj.obj.HelloInterval != nil +} + +// The time interval, in seconds, between the Hello packets that +// the router sends on the interface. Advertised in Hello packets +// sent out this interface. +// SetHelloInterval sets the uint32 value in the Ospfv2InterfaceAdvanced object +func (obj *ospfv2InterfaceAdvanced) SetHelloInterval(value uint32) Ospfv2InterfaceAdvanced { + + obj.obj.HelloInterval = &value + return obj +} + +// The time interval in seconds before the router's neighbors will declare +// it down, when they stop hearing the router's Hello Packets. +// Advertised in Hello packets sent out this interface. +// DeadInterval returns a uint32 +func (obj *ospfv2InterfaceAdvanced) DeadInterval() uint32 { + + return *obj.obj.DeadInterval + +} + +// The time interval in seconds before the router's neighbors will declare +// it down, when they stop hearing the router's Hello Packets. +// Advertised in Hello packets sent out this interface. +// DeadInterval returns a uint32 +func (obj *ospfv2InterfaceAdvanced) HasDeadInterval() bool { + return obj.obj.DeadInterval != nil +} + +// The time interval in seconds before the router's neighbors will declare +// it down, when they stop hearing the router's Hello Packets. +// Advertised in Hello packets sent out this interface. +// SetDeadInterval sets the uint32 value in the Ospfv2InterfaceAdvanced object +func (obj *ospfv2InterfaceAdvanced) SetDeadInterval(value uint32) Ospfv2InterfaceAdvanced { + + obj.obj.DeadInterval = &value + return obj +} + +// Routing metric associated with the interface.. +// RoutingMetric returns a uint32 +func (obj *ospfv2InterfaceAdvanced) RoutingMetric() uint32 { + + return *obj.obj.RoutingMetric + +} + +// Routing metric associated with the interface.. +// RoutingMetric returns a uint32 +func (obj *ospfv2InterfaceAdvanced) HasRoutingMetric() bool { + return obj.obj.RoutingMetric != nil +} + +// Routing metric associated with the interface.. +// SetRoutingMetric sets the uint32 value in the Ospfv2InterfaceAdvanced object +func (obj *ospfv2InterfaceAdvanced) SetRoutingMetric(value uint32) Ospfv2InterfaceAdvanced { + + obj.obj.RoutingMetric = &value + return obj +} + +// The Priority for (Backup) Designated Router election. +// This value is used in Hello packets for the Designated Router (DR) election process. +// The default is 0, which indicates that the router will not participate in the DR election process. +// Priority returns a uint32 +func (obj *ospfv2InterfaceAdvanced) Priority() uint32 { + + return *obj.obj.Priority + +} + +// The Priority for (Backup) Designated Router election. +// This value is used in Hello packets for the Designated Router (DR) election process. +// The default is 0, which indicates that the router will not participate in the DR election process. +// Priority returns a uint32 +func (obj *ospfv2InterfaceAdvanced) HasPriority() bool { + return obj.obj.Priority != nil +} + +// The Priority for (Backup) Designated Router election. +// This value is used in Hello packets for the Designated Router (DR) election process. +// The default is 0, which indicates that the router will not participate in the DR election process. +// SetPriority sets the uint32 value in the Ospfv2InterfaceAdvanced object +func (obj *ospfv2InterfaceAdvanced) SetPriority(value uint32) Ospfv2InterfaceAdvanced { + + obj.obj.Priority = &value + return obj +} + +// If this is set to true, then the MTU received from the neighbor during Database (DB) Exchange +// will be validated, otherwise it will be ignored. +// +// ValidateReceivedMtu returns a bool +func (obj *ospfv2InterfaceAdvanced) ValidateReceivedMtu() bool { + + return *obj.obj.ValidateReceivedMtu + +} + +// If this is set to true, then the MTU received from the neighbor during Database (DB) Exchange +// will be validated, otherwise it will be ignored. +// +// ValidateReceivedMtu returns a bool +func (obj *ospfv2InterfaceAdvanced) HasValidateReceivedMtu() bool { + return obj.obj.ValidateReceivedMtu != nil +} + +// If this is set to true, then the MTU received from the neighbor during Database (DB) Exchange +// will be validated, otherwise it will be ignored. +// +// SetValidateReceivedMtu sets the bool value in the Ospfv2InterfaceAdvanced object +func (obj *ospfv2InterfaceAdvanced) SetValidateReceivedMtu(value bool) Ospfv2InterfaceAdvanced { + + obj.obj.ValidateReceivedMtu = &value + return obj +} + +func (obj *ospfv2InterfaceAdvanced) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *ospfv2InterfaceAdvanced) setDefault() { + if obj.obj.HelloInterval == nil { + obj.SetHelloInterval(10) + } + if obj.obj.DeadInterval == nil { + obj.SetDeadInterval(40) + } + if obj.obj.RoutingMetric == nil { + obj.SetRoutingMetric(0) + } + if obj.obj.Priority == nil { + obj.SetPriority(0) + } + if obj.obj.ValidateReceivedMtu == nil { + obj.SetValidateReceivedMtu(true) + } + +} diff --git a/gosnappi/ospfv2_interface_area.go b/gosnappi/ospfv2_interface_area.go new file mode 100644 index 00000000..47404ca6 --- /dev/null +++ b/gosnappi/ospfv2_interface_area.go @@ -0,0 +1,429 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2InterfaceArea ***** +type ospfv2InterfaceArea struct { + validation + obj *otg.Ospfv2InterfaceArea + marshaller marshalOspfv2InterfaceArea + unMarshaller unMarshalOspfv2InterfaceArea +} + +func NewOspfv2InterfaceArea() Ospfv2InterfaceArea { + obj := ospfv2InterfaceArea{obj: &otg.Ospfv2InterfaceArea{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2InterfaceArea) msg() *otg.Ospfv2InterfaceArea { + return obj.obj +} + +func (obj *ospfv2InterfaceArea) setMsg(msg *otg.Ospfv2InterfaceArea) Ospfv2InterfaceArea { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2InterfaceArea struct { + obj *ospfv2InterfaceArea +} + +type marshalOspfv2InterfaceArea interface { + // ToProto marshals Ospfv2InterfaceArea to protobuf object *otg.Ospfv2InterfaceArea + ToProto() (*otg.Ospfv2InterfaceArea, error) + // ToPbText marshals Ospfv2InterfaceArea to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2InterfaceArea to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2InterfaceArea to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2InterfaceArea struct { + obj *ospfv2InterfaceArea +} + +type unMarshalOspfv2InterfaceArea interface { + // FromProto unmarshals Ospfv2InterfaceArea from protobuf object *otg.Ospfv2InterfaceArea + FromProto(msg *otg.Ospfv2InterfaceArea) (Ospfv2InterfaceArea, error) + // FromPbText unmarshals Ospfv2InterfaceArea from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2InterfaceArea from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2InterfaceArea from JSON text + FromJson(value string) error +} + +func (obj *ospfv2InterfaceArea) Marshal() marshalOspfv2InterfaceArea { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2InterfaceArea{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2InterfaceArea) Unmarshal() unMarshalOspfv2InterfaceArea { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2InterfaceArea{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2InterfaceArea) ToProto() (*otg.Ospfv2InterfaceArea, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2InterfaceArea) FromProto(msg *otg.Ospfv2InterfaceArea) (Ospfv2InterfaceArea, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2InterfaceArea) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2InterfaceArea) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2InterfaceArea) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2InterfaceArea) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2InterfaceArea) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2InterfaceArea) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2InterfaceArea) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2InterfaceArea) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2InterfaceArea) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2InterfaceArea) Clone() (Ospfv2InterfaceArea, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2InterfaceArea() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Ospfv2InterfaceArea is container for OSPF Area ID identifies the routing area to which the host belongs.. +type Ospfv2InterfaceArea interface { + Validation + // msg marshals Ospfv2InterfaceArea to protobuf object *otg.Ospfv2InterfaceArea + // and doesn't set defaults + msg() *otg.Ospfv2InterfaceArea + // setMsg unmarshals Ospfv2InterfaceArea from protobuf object *otg.Ospfv2InterfaceArea + // and doesn't set defaults + setMsg(*otg.Ospfv2InterfaceArea) Ospfv2InterfaceArea + // provides marshal interface + Marshal() marshalOspfv2InterfaceArea + // provides unmarshal interface + Unmarshal() unMarshalOspfv2InterfaceArea + // validate validates Ospfv2InterfaceArea + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2InterfaceArea, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns Ospfv2InterfaceAreaChoiceEnum, set in Ospfv2InterfaceArea + Choice() Ospfv2InterfaceAreaChoiceEnum + // setChoice assigns Ospfv2InterfaceAreaChoiceEnum provided by user to Ospfv2InterfaceArea + setChoice(value Ospfv2InterfaceAreaChoiceEnum) Ospfv2InterfaceArea + // HasChoice checks if Choice has been set in Ospfv2InterfaceArea + HasChoice() bool + // Id returns uint32, set in Ospfv2InterfaceArea. + Id() uint32 + // SetId assigns uint32 provided by user to Ospfv2InterfaceArea + SetId(value uint32) Ospfv2InterfaceArea + // HasId checks if Id has been set in Ospfv2InterfaceArea + HasId() bool + // Ip returns string, set in Ospfv2InterfaceArea. + Ip() string + // SetIp assigns string provided by user to Ospfv2InterfaceArea + SetIp(value string) Ospfv2InterfaceArea + // HasIp checks if Ip has been set in Ospfv2InterfaceArea + HasIp() bool +} + +type Ospfv2InterfaceAreaChoiceEnum string + +// Enum of Choice on Ospfv2InterfaceArea +var Ospfv2InterfaceAreaChoice = struct { + ID Ospfv2InterfaceAreaChoiceEnum + IP Ospfv2InterfaceAreaChoiceEnum +}{ + ID: Ospfv2InterfaceAreaChoiceEnum("id"), + IP: Ospfv2InterfaceAreaChoiceEnum("ip"), +} + +func (obj *ospfv2InterfaceArea) Choice() Ospfv2InterfaceAreaChoiceEnum { + return Ospfv2InterfaceAreaChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The OSPF Area ID identifies the routing area to which the host belongs. Area ID type can be following format. +// - id: A 32-bit number identifying the area. +// - ip: The Area ID in IPv4 address format. +// Choice returns a string +func (obj *ospfv2InterfaceArea) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *ospfv2InterfaceArea) setChoice(value Ospfv2InterfaceAreaChoiceEnum) Ospfv2InterfaceArea { + intValue, ok := otg.Ospfv2InterfaceArea_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Ospfv2InterfaceAreaChoiceEnum", string(value))) + return obj + } + enumValue := otg.Ospfv2InterfaceArea_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ip = nil + obj.obj.Id = nil + + if value == Ospfv2InterfaceAreaChoice.ID { + defaultValue := uint32(0) + obj.obj.Id = &defaultValue + } + + return obj +} + +// The Area ID. +// Id returns a uint32 +func (obj *ospfv2InterfaceArea) Id() uint32 { + + if obj.obj.Id == nil { + obj.setChoice(Ospfv2InterfaceAreaChoice.ID) + } + + return *obj.obj.Id + +} + +// The Area ID. +// Id returns a uint32 +func (obj *ospfv2InterfaceArea) HasId() bool { + return obj.obj.Id != nil +} + +// The Area ID. +// SetId sets the uint32 value in the Ospfv2InterfaceArea object +func (obj *ospfv2InterfaceArea) SetId(value uint32) Ospfv2InterfaceArea { + obj.setChoice(Ospfv2InterfaceAreaChoice.ID) + obj.obj.Id = &value + return obj +} + +// The Area ID in IPv4 address format. +// Ip returns a string +func (obj *ospfv2InterfaceArea) Ip() string { + + if obj.obj.Ip == nil { + obj.setChoice(Ospfv2InterfaceAreaChoice.IP) + } + + return *obj.obj.Ip + +} + +// The Area ID in IPv4 address format. +// Ip returns a string +func (obj *ospfv2InterfaceArea) HasIp() bool { + return obj.obj.Ip != nil +} + +// The Area ID in IPv4 address format. +// SetIp sets the string value in the Ospfv2InterfaceArea object +func (obj *ospfv2InterfaceArea) SetIp(value string) Ospfv2InterfaceArea { + obj.setChoice(Ospfv2InterfaceAreaChoice.IP) + obj.obj.Ip = &value + return obj +} + +func (obj *ospfv2InterfaceArea) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ip != nil { + + err := obj.validateIpv4(obj.Ip()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Ospfv2InterfaceArea.Ip")) + } + + } + +} + +func (obj *ospfv2InterfaceArea) setDefault() { + var choices_set int = 0 + var choice Ospfv2InterfaceAreaChoiceEnum + + if obj.obj.Id != nil { + choices_set += 1 + choice = Ospfv2InterfaceAreaChoice.ID + } + + if obj.obj.Ip != nil { + choices_set += 1 + choice = Ospfv2InterfaceAreaChoice.IP + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Ospfv2InterfaceAreaChoice.ID) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Ospfv2InterfaceArea") + } + } else { + intVal := otg.Ospfv2InterfaceArea_Choice_Enum_value[string(choice)] + enumValue := otg.Ospfv2InterfaceArea_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/ospfv2_interface_authentication.go b/gosnappi/ospfv2_interface_authentication.go new file mode 100644 index 00000000..ef2fbe2f --- /dev/null +++ b/gosnappi/ospfv2_interface_authentication.go @@ -0,0 +1,520 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2InterfaceAuthentication ***** +type ospfv2InterfaceAuthentication struct { + validation + obj *otg.Ospfv2InterfaceAuthentication + marshaller marshalOspfv2InterfaceAuthentication + unMarshaller unMarshalOspfv2InterfaceAuthentication + md5SHolder Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter +} + +func NewOspfv2InterfaceAuthentication() Ospfv2InterfaceAuthentication { + obj := ospfv2InterfaceAuthentication{obj: &otg.Ospfv2InterfaceAuthentication{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2InterfaceAuthentication) msg() *otg.Ospfv2InterfaceAuthentication { + return obj.obj +} + +func (obj *ospfv2InterfaceAuthentication) setMsg(msg *otg.Ospfv2InterfaceAuthentication) Ospfv2InterfaceAuthentication { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2InterfaceAuthentication struct { + obj *ospfv2InterfaceAuthentication +} + +type marshalOspfv2InterfaceAuthentication interface { + // ToProto marshals Ospfv2InterfaceAuthentication to protobuf object *otg.Ospfv2InterfaceAuthentication + ToProto() (*otg.Ospfv2InterfaceAuthentication, error) + // ToPbText marshals Ospfv2InterfaceAuthentication to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2InterfaceAuthentication to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2InterfaceAuthentication to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2InterfaceAuthentication struct { + obj *ospfv2InterfaceAuthentication +} + +type unMarshalOspfv2InterfaceAuthentication interface { + // FromProto unmarshals Ospfv2InterfaceAuthentication from protobuf object *otg.Ospfv2InterfaceAuthentication + FromProto(msg *otg.Ospfv2InterfaceAuthentication) (Ospfv2InterfaceAuthentication, error) + // FromPbText unmarshals Ospfv2InterfaceAuthentication from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2InterfaceAuthentication from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2InterfaceAuthentication from JSON text + FromJson(value string) error +} + +func (obj *ospfv2InterfaceAuthentication) Marshal() marshalOspfv2InterfaceAuthentication { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2InterfaceAuthentication{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2InterfaceAuthentication) Unmarshal() unMarshalOspfv2InterfaceAuthentication { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2InterfaceAuthentication{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2InterfaceAuthentication) ToProto() (*otg.Ospfv2InterfaceAuthentication, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2InterfaceAuthentication) FromProto(msg *otg.Ospfv2InterfaceAuthentication) (Ospfv2InterfaceAuthentication, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2InterfaceAuthentication) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2InterfaceAuthentication) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2InterfaceAuthentication) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2InterfaceAuthentication) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2InterfaceAuthentication) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2InterfaceAuthentication) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2InterfaceAuthentication) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2InterfaceAuthentication) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2InterfaceAuthentication) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2InterfaceAuthentication) Clone() (Ospfv2InterfaceAuthentication, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2InterfaceAuthentication() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2InterfaceAuthentication) setNil() { + obj.md5SHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2InterfaceAuthentication is this contains OSPFv2 authentication properties. +// Reference: https://www.rfc-editor.org/rfc/rfc2328#appendix-D +type Ospfv2InterfaceAuthentication interface { + Validation + // msg marshals Ospfv2InterfaceAuthentication to protobuf object *otg.Ospfv2InterfaceAuthentication + // and doesn't set defaults + msg() *otg.Ospfv2InterfaceAuthentication + // setMsg unmarshals Ospfv2InterfaceAuthentication from protobuf object *otg.Ospfv2InterfaceAuthentication + // and doesn't set defaults + setMsg(*otg.Ospfv2InterfaceAuthentication) Ospfv2InterfaceAuthentication + // provides marshal interface + Marshal() marshalOspfv2InterfaceAuthentication + // provides unmarshal interface + Unmarshal() unMarshalOspfv2InterfaceAuthentication + // validate validates Ospfv2InterfaceAuthentication + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2InterfaceAuthentication, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns Ospfv2InterfaceAuthenticationChoiceEnum, set in Ospfv2InterfaceAuthentication + Choice() Ospfv2InterfaceAuthenticationChoiceEnum + // setChoice assigns Ospfv2InterfaceAuthenticationChoiceEnum provided by user to Ospfv2InterfaceAuthentication + setChoice(value Ospfv2InterfaceAuthenticationChoiceEnum) Ospfv2InterfaceAuthentication + // HasChoice checks if Choice has been set in Ospfv2InterfaceAuthentication + HasChoice() bool + // Md5S returns Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5IterIter, set in Ospfv2InterfaceAuthentication + Md5S() Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter + // ClearText returns string, set in Ospfv2InterfaceAuthentication. + ClearText() string + // SetClearText assigns string provided by user to Ospfv2InterfaceAuthentication + SetClearText(value string) Ospfv2InterfaceAuthentication + // HasClearText checks if ClearText has been set in Ospfv2InterfaceAuthentication + HasClearText() bool + setNil() +} + +type Ospfv2InterfaceAuthenticationChoiceEnum string + +// Enum of Choice on Ospfv2InterfaceAuthentication +var Ospfv2InterfaceAuthenticationChoice = struct { + MD5S Ospfv2InterfaceAuthenticationChoiceEnum + CLEAR_TEXT Ospfv2InterfaceAuthenticationChoiceEnum +}{ + MD5S: Ospfv2InterfaceAuthenticationChoiceEnum("md5s"), + CLEAR_TEXT: Ospfv2InterfaceAuthenticationChoiceEnum("clear_text"), +} + +func (obj *ospfv2InterfaceAuthentication) Choice() Ospfv2InterfaceAuthenticationChoiceEnum { + return Ospfv2InterfaceAuthenticationChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The authentication method. +// - md5 - Cryptographic authentication. +// - clear_text - Simple password authentication. A 64-bit field is configured on a per-network basis. +// All packets sent on a particular network must have this configured value (in clear text) +// in their OSPF header 64-bit authentication field. +// Choice returns a string +func (obj *ospfv2InterfaceAuthentication) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *ospfv2InterfaceAuthentication) setChoice(value Ospfv2InterfaceAuthenticationChoiceEnum) Ospfv2InterfaceAuthentication { + intValue, ok := otg.Ospfv2InterfaceAuthentication_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Ospfv2InterfaceAuthenticationChoiceEnum", string(value))) + return obj + } + enumValue := otg.Ospfv2InterfaceAuthentication_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.ClearText = nil + obj.obj.Md5S = nil + obj.md5SHolder = nil + + if value == Ospfv2InterfaceAuthenticationChoice.MD5S { + obj.obj.Md5S = []*otg.Ospfv2AuthenticationMd5{} + } + + if value == Ospfv2InterfaceAuthenticationChoice.CLEAR_TEXT { + defaultValue := "otg" + obj.obj.ClearText = &defaultValue + } + + return obj +} + +// List of MD5 Key IDs and MD5 Keys. +// Md5S returns a []Ospfv2AuthenticationMd5 +func (obj *ospfv2InterfaceAuthentication) Md5S() Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter { + if len(obj.obj.Md5S) == 0 { + obj.setChoice(Ospfv2InterfaceAuthenticationChoice.MD5S) + } + if obj.md5SHolder == nil { + obj.md5SHolder = newOspfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter(&obj.obj.Md5S).setMsg(obj) + } + return obj.md5SHolder +} + +type ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter struct { + obj *ospfv2InterfaceAuthentication + ospfv2AuthenticationMd5Slice []Ospfv2AuthenticationMd5 + fieldPtr *[]*otg.Ospfv2AuthenticationMd5 +} + +func newOspfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter(ptr *[]*otg.Ospfv2AuthenticationMd5) Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter { + return &ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter{fieldPtr: ptr} +} + +type Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter interface { + setMsg(*ospfv2InterfaceAuthentication) Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter + Items() []Ospfv2AuthenticationMd5 + Add() Ospfv2AuthenticationMd5 + Append(items ...Ospfv2AuthenticationMd5) Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter + Set(index int, newObj Ospfv2AuthenticationMd5) Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter + Clear() Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter + clearHolderSlice() Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter + appendHolderSlice(item Ospfv2AuthenticationMd5) Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter +} + +func (obj *ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter) setMsg(msg *ospfv2InterfaceAuthentication) Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&ospfv2AuthenticationMd5{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter) Items() []Ospfv2AuthenticationMd5 { + return obj.ospfv2AuthenticationMd5Slice +} + +func (obj *ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter) Add() Ospfv2AuthenticationMd5 { + newObj := &otg.Ospfv2AuthenticationMd5{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &ospfv2AuthenticationMd5{obj: newObj} + newLibObj.setDefault() + obj.ospfv2AuthenticationMd5Slice = append(obj.ospfv2AuthenticationMd5Slice, newLibObj) + return newLibObj +} + +func (obj *ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter) Append(items ...Ospfv2AuthenticationMd5) Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.ospfv2AuthenticationMd5Slice = append(obj.ospfv2AuthenticationMd5Slice, item) + } + return obj +} + +func (obj *ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter) Set(index int, newObj Ospfv2AuthenticationMd5) Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.ospfv2AuthenticationMd5Slice[index] = newObj + return obj +} +func (obj *ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter) Clear() Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Ospfv2AuthenticationMd5{} + obj.ospfv2AuthenticationMd5Slice = []Ospfv2AuthenticationMd5{} + } + return obj +} +func (obj *ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter) clearHolderSlice() Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter { + if len(obj.ospfv2AuthenticationMd5Slice) > 0 { + obj.ospfv2AuthenticationMd5Slice = []Ospfv2AuthenticationMd5{} + } + return obj +} +func (obj *ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter) appendHolderSlice(item Ospfv2AuthenticationMd5) Ospfv2InterfaceAuthenticationOspfv2AuthenticationMd5Iter { + obj.ospfv2AuthenticationMd5Slice = append(obj.ospfv2AuthenticationMd5Slice, item) + return obj +} + +// The 8 Byte authentication field in the OSPF packet. +// ClearText returns a string +func (obj *ospfv2InterfaceAuthentication) ClearText() string { + + if obj.obj.ClearText == nil { + obj.setChoice(Ospfv2InterfaceAuthenticationChoice.CLEAR_TEXT) + } + + return *obj.obj.ClearText + +} + +// The 8 Byte authentication field in the OSPF packet. +// ClearText returns a string +func (obj *ospfv2InterfaceAuthentication) HasClearText() bool { + return obj.obj.ClearText != nil +} + +// The 8 Byte authentication field in the OSPF packet. +// SetClearText sets the string value in the Ospfv2InterfaceAuthentication object +func (obj *ospfv2InterfaceAuthentication) SetClearText(value string) Ospfv2InterfaceAuthentication { + obj.setChoice(Ospfv2InterfaceAuthenticationChoice.CLEAR_TEXT) + obj.obj.ClearText = &value + return obj +} + +func (obj *ospfv2InterfaceAuthentication) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Md5S) != 0 { + + if set_default { + obj.Md5S().clearHolderSlice() + for _, item := range obj.obj.Md5S { + obj.Md5S().appendHolderSlice(&ospfv2AuthenticationMd5{obj: item}) + } + } + for _, item := range obj.Md5S().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.ClearText != nil { + + if len(*obj.obj.ClearText) < 1 || len(*obj.obj.ClearText) > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "1 <= length of Ospfv2InterfaceAuthentication.ClearText <= 8 but Got %d", + len(*obj.obj.ClearText))) + } + + } + +} + +func (obj *ospfv2InterfaceAuthentication) setDefault() { + var choices_set int = 0 + var choice Ospfv2InterfaceAuthenticationChoiceEnum + + if len(obj.obj.Md5S) > 0 { + choices_set += 1 + choice = Ospfv2InterfaceAuthenticationChoice.MD5S + } + + if obj.obj.ClearText != nil { + choices_set += 1 + choice = Ospfv2InterfaceAuthenticationChoice.CLEAR_TEXT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Ospfv2InterfaceAuthenticationChoice.CLEAR_TEXT) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Ospfv2InterfaceAuthentication") + } + } else { + intVal := otg.Ospfv2InterfaceAuthentication_Choice_Enum_value[string(choice)] + enumValue := otg.Ospfv2InterfaceAuthentication_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/ospfv2_interface_link_protection.go b/gosnappi/ospfv2_interface_link_protection.go new file mode 100644 index 00000000..689e5a92 --- /dev/null +++ b/gosnappi/ospfv2_interface_link_protection.go @@ -0,0 +1,553 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2InterfaceLinkProtection ***** +type ospfv2InterfaceLinkProtection struct { + validation + obj *otg.Ospfv2InterfaceLinkProtection + marshaller marshalOspfv2InterfaceLinkProtection + unMarshaller unMarshalOspfv2InterfaceLinkProtection +} + +func NewOspfv2InterfaceLinkProtection() Ospfv2InterfaceLinkProtection { + obj := ospfv2InterfaceLinkProtection{obj: &otg.Ospfv2InterfaceLinkProtection{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2InterfaceLinkProtection) msg() *otg.Ospfv2InterfaceLinkProtection { + return obj.obj +} + +func (obj *ospfv2InterfaceLinkProtection) setMsg(msg *otg.Ospfv2InterfaceLinkProtection) Ospfv2InterfaceLinkProtection { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2InterfaceLinkProtection struct { + obj *ospfv2InterfaceLinkProtection +} + +type marshalOspfv2InterfaceLinkProtection interface { + // ToProto marshals Ospfv2InterfaceLinkProtection to protobuf object *otg.Ospfv2InterfaceLinkProtection + ToProto() (*otg.Ospfv2InterfaceLinkProtection, error) + // ToPbText marshals Ospfv2InterfaceLinkProtection to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2InterfaceLinkProtection to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2InterfaceLinkProtection to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2InterfaceLinkProtection struct { + obj *ospfv2InterfaceLinkProtection +} + +type unMarshalOspfv2InterfaceLinkProtection interface { + // FromProto unmarshals Ospfv2InterfaceLinkProtection from protobuf object *otg.Ospfv2InterfaceLinkProtection + FromProto(msg *otg.Ospfv2InterfaceLinkProtection) (Ospfv2InterfaceLinkProtection, error) + // FromPbText unmarshals Ospfv2InterfaceLinkProtection from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2InterfaceLinkProtection from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2InterfaceLinkProtection from JSON text + FromJson(value string) error +} + +func (obj *ospfv2InterfaceLinkProtection) Marshal() marshalOspfv2InterfaceLinkProtection { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2InterfaceLinkProtection{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2InterfaceLinkProtection) Unmarshal() unMarshalOspfv2InterfaceLinkProtection { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2InterfaceLinkProtection{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2InterfaceLinkProtection) ToProto() (*otg.Ospfv2InterfaceLinkProtection, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2InterfaceLinkProtection) FromProto(msg *otg.Ospfv2InterfaceLinkProtection) (Ospfv2InterfaceLinkProtection, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2InterfaceLinkProtection) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2InterfaceLinkProtection) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2InterfaceLinkProtection) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2InterfaceLinkProtection) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2InterfaceLinkProtection) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2InterfaceLinkProtection) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2InterfaceLinkProtection) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2InterfaceLinkProtection) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2InterfaceLinkProtection) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2InterfaceLinkProtection) Clone() (Ospfv2InterfaceLinkProtection, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2InterfaceLinkProtection() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Ospfv2InterfaceLinkProtection is optional container for the link protection sub TLV (type 20). +type Ospfv2InterfaceLinkProtection interface { + Validation + // msg marshals Ospfv2InterfaceLinkProtection to protobuf object *otg.Ospfv2InterfaceLinkProtection + // and doesn't set defaults + msg() *otg.Ospfv2InterfaceLinkProtection + // setMsg unmarshals Ospfv2InterfaceLinkProtection from protobuf object *otg.Ospfv2InterfaceLinkProtection + // and doesn't set defaults + setMsg(*otg.Ospfv2InterfaceLinkProtection) Ospfv2InterfaceLinkProtection + // provides marshal interface + Marshal() marshalOspfv2InterfaceLinkProtection + // provides unmarshal interface + Unmarshal() unMarshalOspfv2InterfaceLinkProtection + // validate validates Ospfv2InterfaceLinkProtection + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2InterfaceLinkProtection, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ExtraTraffic returns bool, set in Ospfv2InterfaceLinkProtection. + ExtraTraffic() bool + // SetExtraTraffic assigns bool provided by user to Ospfv2InterfaceLinkProtection + SetExtraTraffic(value bool) Ospfv2InterfaceLinkProtection + // HasExtraTraffic checks if ExtraTraffic has been set in Ospfv2InterfaceLinkProtection + HasExtraTraffic() bool + // Unprotected returns bool, set in Ospfv2InterfaceLinkProtection. + Unprotected() bool + // SetUnprotected assigns bool provided by user to Ospfv2InterfaceLinkProtection + SetUnprotected(value bool) Ospfv2InterfaceLinkProtection + // HasUnprotected checks if Unprotected has been set in Ospfv2InterfaceLinkProtection + HasUnprotected() bool + // Shared returns bool, set in Ospfv2InterfaceLinkProtection. + Shared() bool + // SetShared assigns bool provided by user to Ospfv2InterfaceLinkProtection + SetShared(value bool) Ospfv2InterfaceLinkProtection + // HasShared checks if Shared has been set in Ospfv2InterfaceLinkProtection + HasShared() bool + // Dedicated1To1 returns bool, set in Ospfv2InterfaceLinkProtection. + Dedicated1To1() bool + // SetDedicated1To1 assigns bool provided by user to Ospfv2InterfaceLinkProtection + SetDedicated1To1(value bool) Ospfv2InterfaceLinkProtection + // HasDedicated1To1 checks if Dedicated1To1 has been set in Ospfv2InterfaceLinkProtection + HasDedicated1To1() bool + // Dedicated1Plus1 returns bool, set in Ospfv2InterfaceLinkProtection. + Dedicated1Plus1() bool + // SetDedicated1Plus1 assigns bool provided by user to Ospfv2InterfaceLinkProtection + SetDedicated1Plus1(value bool) Ospfv2InterfaceLinkProtection + // HasDedicated1Plus1 checks if Dedicated1Plus1 has been set in Ospfv2InterfaceLinkProtection + HasDedicated1Plus1() bool + // Enhanced returns bool, set in Ospfv2InterfaceLinkProtection. + Enhanced() bool + // SetEnhanced assigns bool provided by user to Ospfv2InterfaceLinkProtection + SetEnhanced(value bool) Ospfv2InterfaceLinkProtection + // HasEnhanced checks if Enhanced has been set in Ospfv2InterfaceLinkProtection + HasEnhanced() bool + // Reserved40 returns bool, set in Ospfv2InterfaceLinkProtection. + Reserved40() bool + // SetReserved40 assigns bool provided by user to Ospfv2InterfaceLinkProtection + SetReserved40(value bool) Ospfv2InterfaceLinkProtection + // HasReserved40 checks if Reserved40 has been set in Ospfv2InterfaceLinkProtection + HasReserved40() bool + // Reserved80 returns bool, set in Ospfv2InterfaceLinkProtection. + Reserved80() bool + // SetReserved80 assigns bool provided by user to Ospfv2InterfaceLinkProtection + SetReserved80(value bool) Ospfv2InterfaceLinkProtection + // HasReserved80 checks if Reserved80 has been set in Ospfv2InterfaceLinkProtection + HasReserved80() bool +} + +// Enable this to protect other link or links. LSAs on a link of this type are lost +// if any of the links fail. +// ExtraTraffic returns a bool +func (obj *ospfv2InterfaceLinkProtection) ExtraTraffic() bool { + + return *obj.obj.ExtraTraffic + +} + +// Enable this to protect other link or links. LSAs on a link of this type are lost +// if any of the links fail. +// ExtraTraffic returns a bool +func (obj *ospfv2InterfaceLinkProtection) HasExtraTraffic() bool { + return obj.obj.ExtraTraffic != nil +} + +// Enable this to protect other link or links. LSAs on a link of this type are lost +// if any of the links fail. +// SetExtraTraffic sets the bool value in the Ospfv2InterfaceLinkProtection object +func (obj *ospfv2InterfaceLinkProtection) SetExtraTraffic(value bool) Ospfv2InterfaceLinkProtection { + + obj.obj.ExtraTraffic = &value + return obj +} + +// Enabling this signifies that there is no other link protecting this +// link. LSAs on a link of this type are lost if the link fails. +// Unprotected returns a bool +func (obj *ospfv2InterfaceLinkProtection) Unprotected() bool { + + return *obj.obj.Unprotected + +} + +// Enabling this signifies that there is no other link protecting this +// link. LSAs on a link of this type are lost if the link fails. +// Unprotected returns a bool +func (obj *ospfv2InterfaceLinkProtection) HasUnprotected() bool { + return obj.obj.Unprotected != nil +} + +// Enabling this signifies that there is no other link protecting this +// link. LSAs on a link of this type are lost if the link fails. +// SetUnprotected sets the bool value in the Ospfv2InterfaceLinkProtection object +func (obj *ospfv2InterfaceLinkProtection) SetUnprotected(value bool) Ospfv2InterfaceLinkProtection { + + obj.obj.Unprotected = &value + return obj +} + +// Enable this to share the Extra Traffic links between one or more +// links of type Shared.There are one or more disjoint links of type +// Extra Traffic that are protecting this link. +// Shared returns a bool +func (obj *ospfv2InterfaceLinkProtection) Shared() bool { + + return *obj.obj.Shared + +} + +// Enable this to share the Extra Traffic links between one or more +// links of type Shared.There are one or more disjoint links of type +// Extra Traffic that are protecting this link. +// Shared returns a bool +func (obj *ospfv2InterfaceLinkProtection) HasShared() bool { + return obj.obj.Shared != nil +} + +// Enable this to share the Extra Traffic links between one or more +// links of type Shared.There are one or more disjoint links of type +// Extra Traffic that are protecting this link. +// SetShared sets the bool value in the Ospfv2InterfaceLinkProtection object +func (obj *ospfv2InterfaceLinkProtection) SetShared(value bool) Ospfv2InterfaceLinkProtection { + + obj.obj.Shared = &value + return obj +} + +// Enabling this signifies that there is one dedicated disjoint link +// of type Extra Traffic that is protecting this link. +// Dedicated1To1 returns a bool +func (obj *ospfv2InterfaceLinkProtection) Dedicated1To1() bool { + + return *obj.obj.Dedicated_1To_1 + +} + +// Enabling this signifies that there is one dedicated disjoint link +// of type Extra Traffic that is protecting this link. +// Dedicated1To1 returns a bool +func (obj *ospfv2InterfaceLinkProtection) HasDedicated1To1() bool { + return obj.obj.Dedicated_1To_1 != nil +} + +// Enabling this signifies that there is one dedicated disjoint link +// of type Extra Traffic that is protecting this link. +// SetDedicated1To1 sets the bool value in the Ospfv2InterfaceLinkProtection object +func (obj *ospfv2InterfaceLinkProtection) SetDedicated1To1(value bool) Ospfv2InterfaceLinkProtection { + + obj.obj.Dedicated_1To_1 = &value + return obj +} + +// Enabling this signifies that a dedicated disjoint link is protecting +// this link. However, the protecting link is not advertised in the +// link state database and is therefore not available for the routing +// of LSAs. +// Dedicated1Plus1 returns a bool +func (obj *ospfv2InterfaceLinkProtection) Dedicated1Plus1() bool { + + return *obj.obj.Dedicated_1Plus_1 + +} + +// Enabling this signifies that a dedicated disjoint link is protecting +// this link. However, the protecting link is not advertised in the +// link state database and is therefore not available for the routing +// of LSAs. +// Dedicated1Plus1 returns a bool +func (obj *ospfv2InterfaceLinkProtection) HasDedicated1Plus1() bool { + return obj.obj.Dedicated_1Plus_1 != nil +} + +// Enabling this signifies that a dedicated disjoint link is protecting +// this link. However, the protecting link is not advertised in the +// link state database and is therefore not available for the routing +// of LSAs. +// SetDedicated1Plus1 sets the bool value in the Ospfv2InterfaceLinkProtection object +func (obj *ospfv2InterfaceLinkProtection) SetDedicated1Plus1(value bool) Ospfv2InterfaceLinkProtection { + + obj.obj.Dedicated_1Plus_1 = &value + return obj +} + +// Enabling this signifies that a protection scheme that is more +// reliable than Dedicated 1+1. +// Enhanced returns a bool +func (obj *ospfv2InterfaceLinkProtection) Enhanced() bool { + + return *obj.obj.Enhanced + +} + +// Enabling this signifies that a protection scheme that is more +// reliable than Dedicated 1+1. +// Enhanced returns a bool +func (obj *ospfv2InterfaceLinkProtection) HasEnhanced() bool { + return obj.obj.Enhanced != nil +} + +// Enabling this signifies that a protection scheme that is more +// reliable than Dedicated 1+1. +// SetEnhanced sets the bool value in the Ospfv2InterfaceLinkProtection object +func (obj *ospfv2InterfaceLinkProtection) SetEnhanced(value bool) Ospfv2InterfaceLinkProtection { + + obj.obj.Enhanced = &value + return obj +} + +// This is a Protection Scheme with value 0x40. +// Reserved40 returns a bool +func (obj *ospfv2InterfaceLinkProtection) Reserved40() bool { + + return *obj.obj.Reserved_40 + +} + +// This is a Protection Scheme with value 0x40. +// Reserved40 returns a bool +func (obj *ospfv2InterfaceLinkProtection) HasReserved40() bool { + return obj.obj.Reserved_40 != nil +} + +// This is a Protection Scheme with value 0x40. +// SetReserved40 sets the bool value in the Ospfv2InterfaceLinkProtection object +func (obj *ospfv2InterfaceLinkProtection) SetReserved40(value bool) Ospfv2InterfaceLinkProtection { + + obj.obj.Reserved_40 = &value + return obj +} + +// This is a Protection Scheme with value 0x80. +// Reserved80 returns a bool +func (obj *ospfv2InterfaceLinkProtection) Reserved80() bool { + + return *obj.obj.Reserved_80 + +} + +// This is a Protection Scheme with value 0x80. +// Reserved80 returns a bool +func (obj *ospfv2InterfaceLinkProtection) HasReserved80() bool { + return obj.obj.Reserved_80 != nil +} + +// This is a Protection Scheme with value 0x80. +// SetReserved80 sets the bool value in the Ospfv2InterfaceLinkProtection object +func (obj *ospfv2InterfaceLinkProtection) SetReserved80(value bool) Ospfv2InterfaceLinkProtection { + + obj.obj.Reserved_80 = &value + return obj +} + +func (obj *ospfv2InterfaceLinkProtection) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *ospfv2InterfaceLinkProtection) setDefault() { + if obj.obj.ExtraTraffic == nil { + obj.SetExtraTraffic(false) + } + if obj.obj.Unprotected == nil { + obj.SetUnprotected(false) + } + if obj.obj.Shared == nil { + obj.SetShared(false) + } + if obj.obj.Dedicated_1To_1 == nil { + obj.SetDedicated1To1(false) + } + if obj.obj.Dedicated_1Plus_1 == nil { + obj.SetDedicated1Plus1(false) + } + if obj.obj.Enhanced == nil { + obj.SetEnhanced(false) + } + if obj.obj.Reserved_40 == nil { + obj.SetReserved40(false) + } + if obj.obj.Reserved_80 == nil { + obj.SetReserved80(false) + } + +} diff --git a/gosnappi/ospfv2_interface_neighbor.go b/gosnappi/ospfv2_interface_neighbor.go new file mode 100644 index 00000000..1c7089bf --- /dev/null +++ b/gosnappi/ospfv2_interface_neighbor.go @@ -0,0 +1,315 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2InterfaceNeighbor ***** +type ospfv2InterfaceNeighbor struct { + validation + obj *otg.Ospfv2InterfaceNeighbor + marshaller marshalOspfv2InterfaceNeighbor + unMarshaller unMarshalOspfv2InterfaceNeighbor +} + +func NewOspfv2InterfaceNeighbor() Ospfv2InterfaceNeighbor { + obj := ospfv2InterfaceNeighbor{obj: &otg.Ospfv2InterfaceNeighbor{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2InterfaceNeighbor) msg() *otg.Ospfv2InterfaceNeighbor { + return obj.obj +} + +func (obj *ospfv2InterfaceNeighbor) setMsg(msg *otg.Ospfv2InterfaceNeighbor) Ospfv2InterfaceNeighbor { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2InterfaceNeighbor struct { + obj *ospfv2InterfaceNeighbor +} + +type marshalOspfv2InterfaceNeighbor interface { + // ToProto marshals Ospfv2InterfaceNeighbor to protobuf object *otg.Ospfv2InterfaceNeighbor + ToProto() (*otg.Ospfv2InterfaceNeighbor, error) + // ToPbText marshals Ospfv2InterfaceNeighbor to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2InterfaceNeighbor to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2InterfaceNeighbor to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2InterfaceNeighbor struct { + obj *ospfv2InterfaceNeighbor +} + +type unMarshalOspfv2InterfaceNeighbor interface { + // FromProto unmarshals Ospfv2InterfaceNeighbor from protobuf object *otg.Ospfv2InterfaceNeighbor + FromProto(msg *otg.Ospfv2InterfaceNeighbor) (Ospfv2InterfaceNeighbor, error) + // FromPbText unmarshals Ospfv2InterfaceNeighbor from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2InterfaceNeighbor from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2InterfaceNeighbor from JSON text + FromJson(value string) error +} + +func (obj *ospfv2InterfaceNeighbor) Marshal() marshalOspfv2InterfaceNeighbor { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2InterfaceNeighbor{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2InterfaceNeighbor) Unmarshal() unMarshalOspfv2InterfaceNeighbor { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2InterfaceNeighbor{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2InterfaceNeighbor) ToProto() (*otg.Ospfv2InterfaceNeighbor, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2InterfaceNeighbor) FromProto(msg *otg.Ospfv2InterfaceNeighbor) (Ospfv2InterfaceNeighbor, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2InterfaceNeighbor) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2InterfaceNeighbor) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2InterfaceNeighbor) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2InterfaceNeighbor) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2InterfaceNeighbor) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2InterfaceNeighbor) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2InterfaceNeighbor) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2InterfaceNeighbor) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2InterfaceNeighbor) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2InterfaceNeighbor) Clone() (Ospfv2InterfaceNeighbor, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2InterfaceNeighbor() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Ospfv2InterfaceNeighbor is configuration of a neighbor. +type Ospfv2InterfaceNeighbor interface { + Validation + // msg marshals Ospfv2InterfaceNeighbor to protobuf object *otg.Ospfv2InterfaceNeighbor + // and doesn't set defaults + msg() *otg.Ospfv2InterfaceNeighbor + // setMsg unmarshals Ospfv2InterfaceNeighbor from protobuf object *otg.Ospfv2InterfaceNeighbor + // and doesn't set defaults + setMsg(*otg.Ospfv2InterfaceNeighbor) Ospfv2InterfaceNeighbor + // provides marshal interface + Marshal() marshalOspfv2InterfaceNeighbor + // provides unmarshal interface + Unmarshal() unMarshalOspfv2InterfaceNeighbor + // validate validates Ospfv2InterfaceNeighbor + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2InterfaceNeighbor, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // NeighborIp returns string, set in Ospfv2InterfaceNeighbor. + NeighborIp() string + // SetNeighborIp assigns string provided by user to Ospfv2InterfaceNeighbor + SetNeighborIp(value string) Ospfv2InterfaceNeighbor + // HasNeighborIp checks if NeighborIp has been set in Ospfv2InterfaceNeighbor + HasNeighborIp() bool +} + +// description is TBD +// NeighborIp returns a string +func (obj *ospfv2InterfaceNeighbor) NeighborIp() string { + + return *obj.obj.NeighborIp + +} + +// description is TBD +// NeighborIp returns a string +func (obj *ospfv2InterfaceNeighbor) HasNeighborIp() bool { + return obj.obj.NeighborIp != nil +} + +// description is TBD +// SetNeighborIp sets the string value in the Ospfv2InterfaceNeighbor object +func (obj *ospfv2InterfaceNeighbor) SetNeighborIp(value string) Ospfv2InterfaceNeighbor { + + obj.obj.NeighborIp = &value + return obj +} + +func (obj *ospfv2InterfaceNeighbor) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.NeighborIp != nil { + + err := obj.validateIpv4(obj.NeighborIp()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Ospfv2InterfaceNeighbor.NeighborIp")) + } + + } + +} + +func (obj *ospfv2InterfaceNeighbor) setDefault() { + +} diff --git a/gosnappi/ospfv2_interface_network_type.go b/gosnappi/ospfv2_interface_network_type.go new file mode 100644 index 00000000..3ec53c4b --- /dev/null +++ b/gosnappi/ospfv2_interface_network_type.go @@ -0,0 +1,479 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2InterfaceNetworkType ***** +type ospfv2InterfaceNetworkType struct { + validation + obj *otg.Ospfv2InterfaceNetworkType + marshaller marshalOspfv2InterfaceNetworkType + unMarshaller unMarshalOspfv2InterfaceNetworkType + pointToMultipointHolder Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter +} + +func NewOspfv2InterfaceNetworkType() Ospfv2InterfaceNetworkType { + obj := ospfv2InterfaceNetworkType{obj: &otg.Ospfv2InterfaceNetworkType{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2InterfaceNetworkType) msg() *otg.Ospfv2InterfaceNetworkType { + return obj.obj +} + +func (obj *ospfv2InterfaceNetworkType) setMsg(msg *otg.Ospfv2InterfaceNetworkType) Ospfv2InterfaceNetworkType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2InterfaceNetworkType struct { + obj *ospfv2InterfaceNetworkType +} + +type marshalOspfv2InterfaceNetworkType interface { + // ToProto marshals Ospfv2InterfaceNetworkType to protobuf object *otg.Ospfv2InterfaceNetworkType + ToProto() (*otg.Ospfv2InterfaceNetworkType, error) + // ToPbText marshals Ospfv2InterfaceNetworkType to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2InterfaceNetworkType to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2InterfaceNetworkType to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2InterfaceNetworkType struct { + obj *ospfv2InterfaceNetworkType +} + +type unMarshalOspfv2InterfaceNetworkType interface { + // FromProto unmarshals Ospfv2InterfaceNetworkType from protobuf object *otg.Ospfv2InterfaceNetworkType + FromProto(msg *otg.Ospfv2InterfaceNetworkType) (Ospfv2InterfaceNetworkType, error) + // FromPbText unmarshals Ospfv2InterfaceNetworkType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2InterfaceNetworkType from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2InterfaceNetworkType from JSON text + FromJson(value string) error +} + +func (obj *ospfv2InterfaceNetworkType) Marshal() marshalOspfv2InterfaceNetworkType { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2InterfaceNetworkType{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2InterfaceNetworkType) Unmarshal() unMarshalOspfv2InterfaceNetworkType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2InterfaceNetworkType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2InterfaceNetworkType) ToProto() (*otg.Ospfv2InterfaceNetworkType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2InterfaceNetworkType) FromProto(msg *otg.Ospfv2InterfaceNetworkType) (Ospfv2InterfaceNetworkType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2InterfaceNetworkType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2InterfaceNetworkType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2InterfaceNetworkType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2InterfaceNetworkType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2InterfaceNetworkType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2InterfaceNetworkType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2InterfaceNetworkType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2InterfaceNetworkType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2InterfaceNetworkType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2InterfaceNetworkType) Clone() (Ospfv2InterfaceNetworkType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2InterfaceNetworkType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2InterfaceNetworkType) setNil() { + obj.pointToMultipointHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2InterfaceNetworkType is the OSPF network link type options. +// - Point to Point: +// - Broadcast: +// - Point to Multipoint: In this case, at least a neigbor to be configured. +type Ospfv2InterfaceNetworkType interface { + Validation + // msg marshals Ospfv2InterfaceNetworkType to protobuf object *otg.Ospfv2InterfaceNetworkType + // and doesn't set defaults + msg() *otg.Ospfv2InterfaceNetworkType + // setMsg unmarshals Ospfv2InterfaceNetworkType from protobuf object *otg.Ospfv2InterfaceNetworkType + // and doesn't set defaults + setMsg(*otg.Ospfv2InterfaceNetworkType) Ospfv2InterfaceNetworkType + // provides marshal interface + Marshal() marshalOspfv2InterfaceNetworkType + // provides unmarshal interface + Unmarshal() unMarshalOspfv2InterfaceNetworkType + // validate validates Ospfv2InterfaceNetworkType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2InterfaceNetworkType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns Ospfv2InterfaceNetworkTypeChoiceEnum, set in Ospfv2InterfaceNetworkType + Choice() Ospfv2InterfaceNetworkTypeChoiceEnum + // setChoice assigns Ospfv2InterfaceNetworkTypeChoiceEnum provided by user to Ospfv2InterfaceNetworkType + setChoice(value Ospfv2InterfaceNetworkTypeChoiceEnum) Ospfv2InterfaceNetworkType + // HasChoice checks if Choice has been set in Ospfv2InterfaceNetworkType + HasChoice() bool + // getter for Broadcast to set choice. + Broadcast() + // getter for PointToPoint to set choice. + PointToPoint() + // PointToMultipoint returns Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIterIter, set in Ospfv2InterfaceNetworkType + PointToMultipoint() Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter + setNil() +} + +type Ospfv2InterfaceNetworkTypeChoiceEnum string + +// Enum of Choice on Ospfv2InterfaceNetworkType +var Ospfv2InterfaceNetworkTypeChoice = struct { + BROADCAST Ospfv2InterfaceNetworkTypeChoiceEnum + POINT_TO_POINT Ospfv2InterfaceNetworkTypeChoiceEnum + POINT_TO_MULTIPOINT Ospfv2InterfaceNetworkTypeChoiceEnum +}{ + BROADCAST: Ospfv2InterfaceNetworkTypeChoiceEnum("broadcast"), + POINT_TO_POINT: Ospfv2InterfaceNetworkTypeChoiceEnum("point_to_point"), + POINT_TO_MULTIPOINT: Ospfv2InterfaceNetworkTypeChoiceEnum("point_to_multipoint"), +} + +func (obj *ospfv2InterfaceNetworkType) Choice() Ospfv2InterfaceNetworkTypeChoiceEnum { + return Ospfv2InterfaceNetworkTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for Broadcast to set choice +func (obj *ospfv2InterfaceNetworkType) Broadcast() { + obj.setChoice(Ospfv2InterfaceNetworkTypeChoice.BROADCAST) +} + +// getter for PointToPoint to set choice +func (obj *ospfv2InterfaceNetworkType) PointToPoint() { + obj.setChoice(Ospfv2InterfaceNetworkTypeChoice.POINT_TO_POINT) +} + +// description is TBD +// Choice returns a string +func (obj *ospfv2InterfaceNetworkType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *ospfv2InterfaceNetworkType) setChoice(value Ospfv2InterfaceNetworkTypeChoiceEnum) Ospfv2InterfaceNetworkType { + intValue, ok := otg.Ospfv2InterfaceNetworkType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Ospfv2InterfaceNetworkTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.Ospfv2InterfaceNetworkType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.PointToMultipoint = nil + obj.pointToMultipointHolder = nil + + if value == Ospfv2InterfaceNetworkTypeChoice.POINT_TO_MULTIPOINT { + obj.obj.PointToMultipoint = []*otg.Ospfv2InterfaceNeighbor{} + } + + return obj +} + +// List of Neigbhors. +// PointToMultipoint returns a []Ospfv2InterfaceNeighbor +func (obj *ospfv2InterfaceNetworkType) PointToMultipoint() Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter { + if len(obj.obj.PointToMultipoint) == 0 { + obj.setChoice(Ospfv2InterfaceNetworkTypeChoice.POINT_TO_MULTIPOINT) + } + if obj.pointToMultipointHolder == nil { + obj.pointToMultipointHolder = newOspfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter(&obj.obj.PointToMultipoint).setMsg(obj) + } + return obj.pointToMultipointHolder +} + +type ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter struct { + obj *ospfv2InterfaceNetworkType + ospfv2InterfaceNeighborSlice []Ospfv2InterfaceNeighbor + fieldPtr *[]*otg.Ospfv2InterfaceNeighbor +} + +func newOspfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter(ptr *[]*otg.Ospfv2InterfaceNeighbor) Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter { + return &ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter{fieldPtr: ptr} +} + +type Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter interface { + setMsg(*ospfv2InterfaceNetworkType) Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter + Items() []Ospfv2InterfaceNeighbor + Add() Ospfv2InterfaceNeighbor + Append(items ...Ospfv2InterfaceNeighbor) Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter + Set(index int, newObj Ospfv2InterfaceNeighbor) Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter + Clear() Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter + clearHolderSlice() Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter + appendHolderSlice(item Ospfv2InterfaceNeighbor) Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter +} + +func (obj *ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter) setMsg(msg *ospfv2InterfaceNetworkType) Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&ospfv2InterfaceNeighbor{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter) Items() []Ospfv2InterfaceNeighbor { + return obj.ospfv2InterfaceNeighborSlice +} + +func (obj *ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter) Add() Ospfv2InterfaceNeighbor { + newObj := &otg.Ospfv2InterfaceNeighbor{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &ospfv2InterfaceNeighbor{obj: newObj} + newLibObj.setDefault() + obj.ospfv2InterfaceNeighborSlice = append(obj.ospfv2InterfaceNeighborSlice, newLibObj) + return newLibObj +} + +func (obj *ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter) Append(items ...Ospfv2InterfaceNeighbor) Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.ospfv2InterfaceNeighborSlice = append(obj.ospfv2InterfaceNeighborSlice, item) + } + return obj +} + +func (obj *ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter) Set(index int, newObj Ospfv2InterfaceNeighbor) Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.ospfv2InterfaceNeighborSlice[index] = newObj + return obj +} +func (obj *ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter) Clear() Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Ospfv2InterfaceNeighbor{} + obj.ospfv2InterfaceNeighborSlice = []Ospfv2InterfaceNeighbor{} + } + return obj +} +func (obj *ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter) clearHolderSlice() Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter { + if len(obj.ospfv2InterfaceNeighborSlice) > 0 { + obj.ospfv2InterfaceNeighborSlice = []Ospfv2InterfaceNeighbor{} + } + return obj +} +func (obj *ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter) appendHolderSlice(item Ospfv2InterfaceNeighbor) Ospfv2InterfaceNetworkTypeOspfv2InterfaceNeighborIter { + obj.ospfv2InterfaceNeighborSlice = append(obj.ospfv2InterfaceNeighborSlice, item) + return obj +} + +func (obj *ospfv2InterfaceNetworkType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.PointToMultipoint) != 0 { + + if set_default { + obj.PointToMultipoint().clearHolderSlice() + for _, item := range obj.obj.PointToMultipoint { + obj.PointToMultipoint().appendHolderSlice(&ospfv2InterfaceNeighbor{obj: item}) + } + } + for _, item := range obj.PointToMultipoint().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *ospfv2InterfaceNetworkType) setDefault() { + var choices_set int = 0 + var choice Ospfv2InterfaceNetworkTypeChoiceEnum + + if len(obj.obj.PointToMultipoint) > 0 { + choices_set += 1 + choice = Ospfv2InterfaceNetworkTypeChoice.POINT_TO_MULTIPOINT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Ospfv2InterfaceNetworkTypeChoice.BROADCAST) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Ospfv2InterfaceNetworkType") + } + } else { + intVal := otg.Ospfv2InterfaceNetworkType_Choice_Enum_value[string(choice)] + enumValue := otg.Ospfv2InterfaceNetworkType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/ospfv2_link.go b/gosnappi/ospfv2_link.go new file mode 100644 index 00000000..e23ce5b5 --- /dev/null +++ b/gosnappi/ospfv2_link.go @@ -0,0 +1,457 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2Link ***** +type ospfv2Link struct { + validation + obj *otg.Ospfv2Link + marshaller marshalOspfv2Link + unMarshaller unMarshalOspfv2Link +} + +func NewOspfv2Link() Ospfv2Link { + obj := ospfv2Link{obj: &otg.Ospfv2Link{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2Link) msg() *otg.Ospfv2Link { + return obj.obj +} + +func (obj *ospfv2Link) setMsg(msg *otg.Ospfv2Link) Ospfv2Link { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2Link struct { + obj *ospfv2Link +} + +type marshalOspfv2Link interface { + // ToProto marshals Ospfv2Link to protobuf object *otg.Ospfv2Link + ToProto() (*otg.Ospfv2Link, error) + // ToPbText marshals Ospfv2Link to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2Link to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2Link to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2Link struct { + obj *ospfv2Link +} + +type unMarshalOspfv2Link interface { + // FromProto unmarshals Ospfv2Link from protobuf object *otg.Ospfv2Link + FromProto(msg *otg.Ospfv2Link) (Ospfv2Link, error) + // FromPbText unmarshals Ospfv2Link from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2Link from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2Link from JSON text + FromJson(value string) error +} + +func (obj *ospfv2Link) Marshal() marshalOspfv2Link { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2Link{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2Link) Unmarshal() unMarshalOspfv2Link { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2Link{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2Link) ToProto() (*otg.Ospfv2Link, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2Link) FromProto(msg *otg.Ospfv2Link) (Ospfv2Link, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2Link) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2Link) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2Link) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2Link) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2Link) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2Link) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2Link) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2Link) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2Link) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2Link) Clone() (Ospfv2Link, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2Link() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Ospfv2Link is generic attributes used to identify links within OSPFv2. +type Ospfv2Link interface { + Validation + // msg marshals Ospfv2Link to protobuf object *otg.Ospfv2Link + // and doesn't set defaults + msg() *otg.Ospfv2Link + // setMsg unmarshals Ospfv2Link from protobuf object *otg.Ospfv2Link + // and doesn't set defaults + setMsg(*otg.Ospfv2Link) Ospfv2Link + // provides marshal interface + Marshal() marshalOspfv2Link + // provides unmarshal interface + Unmarshal() unMarshalOspfv2Link + // validate validates Ospfv2Link + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2Link, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns Ospfv2LinkTypeEnum, set in Ospfv2Link + Type() Ospfv2LinkTypeEnum + // SetType assigns Ospfv2LinkTypeEnum provided by user to Ospfv2Link + SetType(value Ospfv2LinkTypeEnum) Ospfv2Link + // HasType checks if Type has been set in Ospfv2Link + HasType() bool + // Id returns string, set in Ospfv2Link. + Id() string + // SetId assigns string provided by user to Ospfv2Link + SetId(value string) Ospfv2Link + // HasId checks if Id has been set in Ospfv2Link + HasId() bool + // Data returns string, set in Ospfv2Link. + Data() string + // SetData assigns string provided by user to Ospfv2Link + SetData(value string) Ospfv2Link + // HasData checks if Data has been set in Ospfv2Link + HasData() bool + // Metric returns uint32, set in Ospfv2Link. + Metric() uint32 + // SetMetric assigns uint32 provided by user to Ospfv2Link + SetMetric(value uint32) Ospfv2Link + // HasMetric checks if Metric has been set in Ospfv2Link + HasMetric() bool +} + +type Ospfv2LinkTypeEnum string + +// Enum of Type on Ospfv2Link +var Ospfv2LinkType = struct { + POINT_TO_POINT Ospfv2LinkTypeEnum + TRANSIT Ospfv2LinkTypeEnum + STUB Ospfv2LinkTypeEnum + VIRTUAL Ospfv2LinkTypeEnum +}{ + POINT_TO_POINT: Ospfv2LinkTypeEnum("point_to_point"), + TRANSIT: Ospfv2LinkTypeEnum("transit"), + STUB: Ospfv2LinkTypeEnum("stub"), + VIRTUAL: Ospfv2LinkTypeEnum("virtual"), +} + +func (obj *ospfv2Link) Type() Ospfv2LinkTypeEnum { + return Ospfv2LinkTypeEnum(obj.obj.Type.Enum().String()) +} + +// The data associated with the link type. The value is dependent upon the subtype of the LSA. - point_to_point: The LSA represents a point-to-point connection to another router. - transit: The LSA represents a connection to a transit network. - stub: The LSA represents a connection to a stub network. - virtual: The LSA represents a virtual link connection. +// Type returns a string +func (obj *ospfv2Link) HasType() bool { + return obj.obj.Type != nil +} + +func (obj *ospfv2Link) SetType(value Ospfv2LinkTypeEnum) Ospfv2Link { + intValue, ok := otg.Ospfv2Link_Type_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Ospfv2LinkTypeEnum", string(value))) + return obj + } + enumValue := otg.Ospfv2Link_Type_Enum(intValue) + obj.obj.Type = &enumValue + + return obj +} + +// The identifier for the link specified. The value of the link +// identifier is dependent upon the type of the LSA. +// Id returns a string +func (obj *ospfv2Link) Id() string { + + return *obj.obj.Id + +} + +// The identifier for the link specified. The value of the link +// identifier is dependent upon the type of the LSA. +// Id returns a string +func (obj *ospfv2Link) HasId() bool { + return obj.obj.Id != nil +} + +// The identifier for the link specified. The value of the link +// identifier is dependent upon the type of the LSA. +// SetId sets the string value in the Ospfv2Link object +func (obj *ospfv2Link) SetId(value string) Ospfv2Link { + + obj.obj.Id = &value + return obj +} + +// The data associated with the link type. The value is +// dependent upon the subtype of the LSA. When the connection is +// to a stub network it represents the mask; for p2p connections +// that are unnumbered it represents the ifIndex value of the +// router's interface; for all other connections it represents +// the local system's IP address. +// Data returns a string +func (obj *ospfv2Link) Data() string { + + return *obj.obj.Data + +} + +// The data associated with the link type. The value is +// dependent upon the subtype of the LSA. When the connection is +// to a stub network it represents the mask; for p2p connections +// that are unnumbered it represents the ifIndex value of the +// router's interface; for all other connections it represents +// the local system's IP address. +// Data returns a string +func (obj *ospfv2Link) HasData() bool { + return obj.obj.Data != nil +} + +// The data associated with the link type. The value is +// dependent upon the subtype of the LSA. When the connection is +// to a stub network it represents the mask; for p2p connections +// that are unnumbered it represents the ifIndex value of the +// router's interface; for all other connections it represents +// the local system's IP address. +// SetData sets the string value in the Ospfv2Link object +func (obj *ospfv2Link) SetData(value string) Ospfv2Link { + + obj.obj.Data = &value + return obj +} + +// The data associated with the link type. The value is +// dependent upon the subtype of the LSA. When the connection is +// to a stub network it represents the mask; for p2p connections +// that are unnumbered it represents the ifIndex value of the +// router's interface; for all other connections it represents +// the local system's IP address. +// Metric returns a uint32 +func (obj *ospfv2Link) Metric() uint32 { + + return *obj.obj.Metric + +} + +// The data associated with the link type. The value is +// dependent upon the subtype of the LSA. When the connection is +// to a stub network it represents the mask; for p2p connections +// that are unnumbered it represents the ifIndex value of the +// router's interface; for all other connections it represents +// the local system's IP address. +// Metric returns a uint32 +func (obj *ospfv2Link) HasMetric() bool { + return obj.obj.Metric != nil +} + +// The data associated with the link type. The value is +// dependent upon the subtype of the LSA. When the connection is +// to a stub network it represents the mask; for p2p connections +// that are unnumbered it represents the ifIndex value of the +// router's interface; for all other connections it represents +// the local system's IP address. +// SetMetric sets the uint32 value in the Ospfv2Link object +func (obj *ospfv2Link) SetMetric(value uint32) Ospfv2Link { + + obj.obj.Metric = &value + return obj +} + +func (obj *ospfv2Link) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Id != nil { + + err := obj.validateIpv4(obj.Id()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Ospfv2Link.Id")) + } + + } + + if obj.obj.Data != nil { + + err := obj.validateIpv4(obj.Data()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Ospfv2Link.Data")) + } + + } + +} + +func (obj *ospfv2Link) setDefault() { + +} diff --git a/gosnappi/ospfv2_lsa_header.go b/gosnappi/ospfv2_lsa_header.go new file mode 100644 index 00000000..568ab0fa --- /dev/null +++ b/gosnappi/ospfv2_lsa_header.go @@ -0,0 +1,436 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2LsaHeader ***** +type ospfv2LsaHeader struct { + validation + obj *otg.Ospfv2LsaHeader + marshaller marshalOspfv2LsaHeader + unMarshaller unMarshalOspfv2LsaHeader +} + +func NewOspfv2LsaHeader() Ospfv2LsaHeader { + obj := ospfv2LsaHeader{obj: &otg.Ospfv2LsaHeader{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2LsaHeader) msg() *otg.Ospfv2LsaHeader { + return obj.obj +} + +func (obj *ospfv2LsaHeader) setMsg(msg *otg.Ospfv2LsaHeader) Ospfv2LsaHeader { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2LsaHeader struct { + obj *ospfv2LsaHeader +} + +type marshalOspfv2LsaHeader interface { + // ToProto marshals Ospfv2LsaHeader to protobuf object *otg.Ospfv2LsaHeader + ToProto() (*otg.Ospfv2LsaHeader, error) + // ToPbText marshals Ospfv2LsaHeader to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2LsaHeader to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2LsaHeader to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2LsaHeader struct { + obj *ospfv2LsaHeader +} + +type unMarshalOspfv2LsaHeader interface { + // FromProto unmarshals Ospfv2LsaHeader from protobuf object *otg.Ospfv2LsaHeader + FromProto(msg *otg.Ospfv2LsaHeader) (Ospfv2LsaHeader, error) + // FromPbText unmarshals Ospfv2LsaHeader from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2LsaHeader from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2LsaHeader from JSON text + FromJson(value string) error +} + +func (obj *ospfv2LsaHeader) Marshal() marshalOspfv2LsaHeader { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2LsaHeader{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2LsaHeader) Unmarshal() unMarshalOspfv2LsaHeader { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2LsaHeader{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2LsaHeader) ToProto() (*otg.Ospfv2LsaHeader, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2LsaHeader) FromProto(msg *otg.Ospfv2LsaHeader) (Ospfv2LsaHeader, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2LsaHeader) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2LsaHeader) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2LsaHeader) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2LsaHeader) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2LsaHeader) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2LsaHeader) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2LsaHeader) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2LsaHeader) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2LsaHeader) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2LsaHeader) Clone() (Ospfv2LsaHeader, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2LsaHeader() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Ospfv2LsaHeader is attributes in LSA Header. +type Ospfv2LsaHeader interface { + Validation + // msg marshals Ospfv2LsaHeader to protobuf object *otg.Ospfv2LsaHeader + // and doesn't set defaults + msg() *otg.Ospfv2LsaHeader + // setMsg unmarshals Ospfv2LsaHeader from protobuf object *otg.Ospfv2LsaHeader + // and doesn't set defaults + setMsg(*otg.Ospfv2LsaHeader) Ospfv2LsaHeader + // provides marshal interface + Marshal() marshalOspfv2LsaHeader + // provides unmarshal interface + Unmarshal() unMarshalOspfv2LsaHeader + // validate validates Ospfv2LsaHeader + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2LsaHeader, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LsaId returns string, set in Ospfv2LsaHeader. + LsaId() string + // SetLsaId assigns string provided by user to Ospfv2LsaHeader + SetLsaId(value string) Ospfv2LsaHeader + // HasLsaId checks if LsaId has been set in Ospfv2LsaHeader + HasLsaId() bool + // AdvertisingRouterId returns string, set in Ospfv2LsaHeader. + AdvertisingRouterId() string + // SetAdvertisingRouterId assigns string provided by user to Ospfv2LsaHeader + SetAdvertisingRouterId(value string) Ospfv2LsaHeader + // HasAdvertisingRouterId checks if AdvertisingRouterId has been set in Ospfv2LsaHeader + HasAdvertisingRouterId() bool + // SequenceNumber returns uint32, set in Ospfv2LsaHeader. + SequenceNumber() uint32 + // SetSequenceNumber assigns uint32 provided by user to Ospfv2LsaHeader + SetSequenceNumber(value uint32) Ospfv2LsaHeader + // HasSequenceNumber checks if SequenceNumber has been set in Ospfv2LsaHeader + HasSequenceNumber() bool + // Age returns uint32, set in Ospfv2LsaHeader. + Age() uint32 + // SetAge assigns uint32 provided by user to Ospfv2LsaHeader + SetAge(value uint32) Ospfv2LsaHeader + // HasAge checks if Age has been set in Ospfv2LsaHeader + HasAge() bool + // OptionBits returns uint32, set in Ospfv2LsaHeader. + OptionBits() uint32 + // SetOptionBits assigns uint32 provided by user to Ospfv2LsaHeader + SetOptionBits(value uint32) Ospfv2LsaHeader + // HasOptionBits checks if OptionBits has been set in Ospfv2LsaHeader + HasOptionBits() bool +} + +// LSA ID in the IPv4 format. The Link State ID for the specified LSA type. +// LsaId returns a string +func (obj *ospfv2LsaHeader) LsaId() string { + + return *obj.obj.LsaId + +} + +// LSA ID in the IPv4 format. The Link State ID for the specified LSA type. +// LsaId returns a string +func (obj *ospfv2LsaHeader) HasLsaId() bool { + return obj.obj.LsaId != nil +} + +// LSA ID in the IPv4 format. The Link State ID for the specified LSA type. +// SetLsaId sets the string value in the Ospfv2LsaHeader object +func (obj *ospfv2LsaHeader) SetLsaId(value string) Ospfv2LsaHeader { + + obj.obj.LsaId = &value + return obj +} + +// The router ID (in the IPv4 format) of the router that originated the LSA. +// AdvertisingRouterId returns a string +func (obj *ospfv2LsaHeader) AdvertisingRouterId() string { + + return *obj.obj.AdvertisingRouterId + +} + +// The router ID (in the IPv4 format) of the router that originated the LSA. +// AdvertisingRouterId returns a string +func (obj *ospfv2LsaHeader) HasAdvertisingRouterId() bool { + return obj.obj.AdvertisingRouterId != nil +} + +// The router ID (in the IPv4 format) of the router that originated the LSA. +// SetAdvertisingRouterId sets the string value in the Ospfv2LsaHeader object +func (obj *ospfv2LsaHeader) SetAdvertisingRouterId(value string) Ospfv2LsaHeader { + + obj.obj.AdvertisingRouterId = &value + return obj +} + +// Sequence number to detect old and duplicate LSAs. The greater the sequence number the more recent the LSA. +// SequenceNumber returns a uint32 +func (obj *ospfv2LsaHeader) SequenceNumber() uint32 { + + return *obj.obj.SequenceNumber + +} + +// Sequence number to detect old and duplicate LSAs. The greater the sequence number the more recent the LSA. +// SequenceNumber returns a uint32 +func (obj *ospfv2LsaHeader) HasSequenceNumber() bool { + return obj.obj.SequenceNumber != nil +} + +// Sequence number to detect old and duplicate LSAs. The greater the sequence number the more recent the LSA. +// SetSequenceNumber sets the uint32 value in the Ospfv2LsaHeader object +func (obj *ospfv2LsaHeader) SetSequenceNumber(value uint32) Ospfv2LsaHeader { + + obj.obj.SequenceNumber = &value + return obj +} + +// The time since the LSA's generation in seconds. +// Age returns a uint32 +func (obj *ospfv2LsaHeader) Age() uint32 { + + return *obj.obj.Age + +} + +// The time since the LSA's generation in seconds. +// Age returns a uint32 +func (obj *ospfv2LsaHeader) HasAge() bool { + return obj.obj.Age != nil +} + +// The time since the LSA's generation in seconds. +// SetAge sets the uint32 value in the Ospfv2LsaHeader object +func (obj *ospfv2LsaHeader) SetAge(value uint32) Ospfv2LsaHeader { + + obj.obj.Age = &value + return obj +} + +// The optional bits. +// OptionBits returns a uint32 +func (obj *ospfv2LsaHeader) OptionBits() uint32 { + + return *obj.obj.OptionBits + +} + +// The optional bits. +// OptionBits returns a uint32 +func (obj *ospfv2LsaHeader) HasOptionBits() bool { + return obj.obj.OptionBits != nil +} + +// The optional bits. +// SetOptionBits sets the uint32 value in the Ospfv2LsaHeader object +func (obj *ospfv2LsaHeader) SetOptionBits(value uint32) Ospfv2LsaHeader { + + obj.obj.OptionBits = &value + return obj +} + +func (obj *ospfv2LsaHeader) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.LsaId != nil { + + err := obj.validateIpv4(obj.LsaId()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Ospfv2LsaHeader.LsaId")) + } + + } + + if obj.obj.AdvertisingRouterId != nil { + + err := obj.validateIpv4(obj.AdvertisingRouterId()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Ospfv2LsaHeader.AdvertisingRouterId")) + } + + } + +} + +func (obj *ospfv2LsaHeader) setDefault() { + +} diff --git a/gosnappi/ospfv2_lsa_state.go b/gosnappi/ospfv2_lsa_state.go new file mode 100644 index 00000000..fe57108c --- /dev/null +++ b/gosnappi/ospfv2_lsa_state.go @@ -0,0 +1,1048 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2LsaState ***** +type ospfv2LsaState struct { + validation + obj *otg.Ospfv2LsaState + marshaller marshalOspfv2LsaState + unMarshaller unMarshalOspfv2LsaState + routerLsasHolder Ospfv2LsaStateOspfv2RouterLsaIter + networkLsasHolder Ospfv2LsaStateOspfv2NetworkLsaIter + networkSummaryLsasHolder Ospfv2LsaStateOspfv2NetworkSummaryLsaIter + summaryAsLsasHolder Ospfv2LsaStateOspfv2SummaryAsLsaIter + externalAsLsasHolder Ospfv2LsaStateOspfv2ExternalAsLsaIter + nssaLsasHolder Ospfv2LsaStateOspfv2NssaLsaIter + opaqueLsasHolder Ospfv2LsaStateOspfv2OpaqueLsaIter +} + +func NewOspfv2LsaState() Ospfv2LsaState { + obj := ospfv2LsaState{obj: &otg.Ospfv2LsaState{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2LsaState) msg() *otg.Ospfv2LsaState { + return obj.obj +} + +func (obj *ospfv2LsaState) setMsg(msg *otg.Ospfv2LsaState) Ospfv2LsaState { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2LsaState struct { + obj *ospfv2LsaState +} + +type marshalOspfv2LsaState interface { + // ToProto marshals Ospfv2LsaState to protobuf object *otg.Ospfv2LsaState + ToProto() (*otg.Ospfv2LsaState, error) + // ToPbText marshals Ospfv2LsaState to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2LsaState to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2LsaState to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2LsaState struct { + obj *ospfv2LsaState +} + +type unMarshalOspfv2LsaState interface { + // FromProto unmarshals Ospfv2LsaState from protobuf object *otg.Ospfv2LsaState + FromProto(msg *otg.Ospfv2LsaState) (Ospfv2LsaState, error) + // FromPbText unmarshals Ospfv2LsaState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2LsaState from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2LsaState from JSON text + FromJson(value string) error +} + +func (obj *ospfv2LsaState) Marshal() marshalOspfv2LsaState { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2LsaState{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2LsaState) Unmarshal() unMarshalOspfv2LsaState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2LsaState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2LsaState) ToProto() (*otg.Ospfv2LsaState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2LsaState) FromProto(msg *otg.Ospfv2LsaState) (Ospfv2LsaState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2LsaState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2LsaState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2LsaState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2LsaState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2LsaState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2LsaState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2LsaState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2LsaState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2LsaState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2LsaState) Clone() (Ospfv2LsaState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2LsaState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2LsaState) setNil() { + obj.routerLsasHolder = nil + obj.networkLsasHolder = nil + obj.networkSummaryLsasHolder = nil + obj.summaryAsLsasHolder = nil + obj.externalAsLsasHolder = nil + obj.nssaLsasHolder = nil + obj.opaqueLsasHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2LsaState is the result of OSPFv2 LSA information that are retrieved. +type Ospfv2LsaState interface { + Validation + // msg marshals Ospfv2LsaState to protobuf object *otg.Ospfv2LsaState + // and doesn't set defaults + msg() *otg.Ospfv2LsaState + // setMsg unmarshals Ospfv2LsaState from protobuf object *otg.Ospfv2LsaState + // and doesn't set defaults + setMsg(*otg.Ospfv2LsaState) Ospfv2LsaState + // provides marshal interface + Marshal() marshalOspfv2LsaState + // provides unmarshal interface + Unmarshal() unMarshalOspfv2LsaState + // validate validates Ospfv2LsaState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2LsaState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RouterName returns string, set in Ospfv2LsaState. + RouterName() string + // SetRouterName assigns string provided by user to Ospfv2LsaState + SetRouterName(value string) Ospfv2LsaState + // HasRouterName checks if RouterName has been set in Ospfv2LsaState + HasRouterName() bool + // RouterLsas returns Ospfv2LsaStateOspfv2RouterLsaIterIter, set in Ospfv2LsaState + RouterLsas() Ospfv2LsaStateOspfv2RouterLsaIter + // NetworkLsas returns Ospfv2LsaStateOspfv2NetworkLsaIterIter, set in Ospfv2LsaState + NetworkLsas() Ospfv2LsaStateOspfv2NetworkLsaIter + // NetworkSummaryLsas returns Ospfv2LsaStateOspfv2NetworkSummaryLsaIterIter, set in Ospfv2LsaState + NetworkSummaryLsas() Ospfv2LsaStateOspfv2NetworkSummaryLsaIter + // SummaryAsLsas returns Ospfv2LsaStateOspfv2SummaryAsLsaIterIter, set in Ospfv2LsaState + SummaryAsLsas() Ospfv2LsaStateOspfv2SummaryAsLsaIter + // ExternalAsLsas returns Ospfv2LsaStateOspfv2ExternalAsLsaIterIter, set in Ospfv2LsaState + ExternalAsLsas() Ospfv2LsaStateOspfv2ExternalAsLsaIter + // NssaLsas returns Ospfv2LsaStateOspfv2NssaLsaIterIter, set in Ospfv2LsaState + NssaLsas() Ospfv2LsaStateOspfv2NssaLsaIter + // OpaqueLsas returns Ospfv2LsaStateOspfv2OpaqueLsaIterIter, set in Ospfv2LsaState + OpaqueLsas() Ospfv2LsaStateOspfv2OpaqueLsaIter + setNil() +} + +// The name of the OSPFv2 Router that learned the LSA information. +// RouterName returns a string +func (obj *ospfv2LsaState) RouterName() string { + + return *obj.obj.RouterName + +} + +// The name of the OSPFv2 Router that learned the LSA information. +// RouterName returns a string +func (obj *ospfv2LsaState) HasRouterName() bool { + return obj.obj.RouterName != nil +} + +// The name of the OSPFv2 Router that learned the LSA information. +// SetRouterName sets the string value in the Ospfv2LsaState object +func (obj *ospfv2LsaState) SetRouterName(value string) Ospfv2LsaState { + + obj.obj.RouterName = &value + return obj +} + +// One or more OSPFv2 Router-LSA - Type 1. +// RouterLsas returns a []Ospfv2RouterLsa +func (obj *ospfv2LsaState) RouterLsas() Ospfv2LsaStateOspfv2RouterLsaIter { + if len(obj.obj.RouterLsas) == 0 { + obj.obj.RouterLsas = []*otg.Ospfv2RouterLsa{} + } + if obj.routerLsasHolder == nil { + obj.routerLsasHolder = newOspfv2LsaStateOspfv2RouterLsaIter(&obj.obj.RouterLsas).setMsg(obj) + } + return obj.routerLsasHolder +} + +type ospfv2LsaStateOspfv2RouterLsaIter struct { + obj *ospfv2LsaState + ospfv2RouterLsaSlice []Ospfv2RouterLsa + fieldPtr *[]*otg.Ospfv2RouterLsa +} + +func newOspfv2LsaStateOspfv2RouterLsaIter(ptr *[]*otg.Ospfv2RouterLsa) Ospfv2LsaStateOspfv2RouterLsaIter { + return &ospfv2LsaStateOspfv2RouterLsaIter{fieldPtr: ptr} +} + +type Ospfv2LsaStateOspfv2RouterLsaIter interface { + setMsg(*ospfv2LsaState) Ospfv2LsaStateOspfv2RouterLsaIter + Items() []Ospfv2RouterLsa + Add() Ospfv2RouterLsa + Append(items ...Ospfv2RouterLsa) Ospfv2LsaStateOspfv2RouterLsaIter + Set(index int, newObj Ospfv2RouterLsa) Ospfv2LsaStateOspfv2RouterLsaIter + Clear() Ospfv2LsaStateOspfv2RouterLsaIter + clearHolderSlice() Ospfv2LsaStateOspfv2RouterLsaIter + appendHolderSlice(item Ospfv2RouterLsa) Ospfv2LsaStateOspfv2RouterLsaIter +} + +func (obj *ospfv2LsaStateOspfv2RouterLsaIter) setMsg(msg *ospfv2LsaState) Ospfv2LsaStateOspfv2RouterLsaIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&ospfv2RouterLsa{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *ospfv2LsaStateOspfv2RouterLsaIter) Items() []Ospfv2RouterLsa { + return obj.ospfv2RouterLsaSlice +} + +func (obj *ospfv2LsaStateOspfv2RouterLsaIter) Add() Ospfv2RouterLsa { + newObj := &otg.Ospfv2RouterLsa{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &ospfv2RouterLsa{obj: newObj} + newLibObj.setDefault() + obj.ospfv2RouterLsaSlice = append(obj.ospfv2RouterLsaSlice, newLibObj) + return newLibObj +} + +func (obj *ospfv2LsaStateOspfv2RouterLsaIter) Append(items ...Ospfv2RouterLsa) Ospfv2LsaStateOspfv2RouterLsaIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.ospfv2RouterLsaSlice = append(obj.ospfv2RouterLsaSlice, item) + } + return obj +} + +func (obj *ospfv2LsaStateOspfv2RouterLsaIter) Set(index int, newObj Ospfv2RouterLsa) Ospfv2LsaStateOspfv2RouterLsaIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.ospfv2RouterLsaSlice[index] = newObj + return obj +} +func (obj *ospfv2LsaStateOspfv2RouterLsaIter) Clear() Ospfv2LsaStateOspfv2RouterLsaIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Ospfv2RouterLsa{} + obj.ospfv2RouterLsaSlice = []Ospfv2RouterLsa{} + } + return obj +} +func (obj *ospfv2LsaStateOspfv2RouterLsaIter) clearHolderSlice() Ospfv2LsaStateOspfv2RouterLsaIter { + if len(obj.ospfv2RouterLsaSlice) > 0 { + obj.ospfv2RouterLsaSlice = []Ospfv2RouterLsa{} + } + return obj +} +func (obj *ospfv2LsaStateOspfv2RouterLsaIter) appendHolderSlice(item Ospfv2RouterLsa) Ospfv2LsaStateOspfv2RouterLsaIter { + obj.ospfv2RouterLsaSlice = append(obj.ospfv2RouterLsaSlice, item) + return obj +} + +// One or more OSPFv2 Network-LSA - Type 2. +// NetworkLsas returns a []Ospfv2NetworkLsa +func (obj *ospfv2LsaState) NetworkLsas() Ospfv2LsaStateOspfv2NetworkLsaIter { + if len(obj.obj.NetworkLsas) == 0 { + obj.obj.NetworkLsas = []*otg.Ospfv2NetworkLsa{} + } + if obj.networkLsasHolder == nil { + obj.networkLsasHolder = newOspfv2LsaStateOspfv2NetworkLsaIter(&obj.obj.NetworkLsas).setMsg(obj) + } + return obj.networkLsasHolder +} + +type ospfv2LsaStateOspfv2NetworkLsaIter struct { + obj *ospfv2LsaState + ospfv2NetworkLsaSlice []Ospfv2NetworkLsa + fieldPtr *[]*otg.Ospfv2NetworkLsa +} + +func newOspfv2LsaStateOspfv2NetworkLsaIter(ptr *[]*otg.Ospfv2NetworkLsa) Ospfv2LsaStateOspfv2NetworkLsaIter { + return &ospfv2LsaStateOspfv2NetworkLsaIter{fieldPtr: ptr} +} + +type Ospfv2LsaStateOspfv2NetworkLsaIter interface { + setMsg(*ospfv2LsaState) Ospfv2LsaStateOspfv2NetworkLsaIter + Items() []Ospfv2NetworkLsa + Add() Ospfv2NetworkLsa + Append(items ...Ospfv2NetworkLsa) Ospfv2LsaStateOspfv2NetworkLsaIter + Set(index int, newObj Ospfv2NetworkLsa) Ospfv2LsaStateOspfv2NetworkLsaIter + Clear() Ospfv2LsaStateOspfv2NetworkLsaIter + clearHolderSlice() Ospfv2LsaStateOspfv2NetworkLsaIter + appendHolderSlice(item Ospfv2NetworkLsa) Ospfv2LsaStateOspfv2NetworkLsaIter +} + +func (obj *ospfv2LsaStateOspfv2NetworkLsaIter) setMsg(msg *ospfv2LsaState) Ospfv2LsaStateOspfv2NetworkLsaIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&ospfv2NetworkLsa{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *ospfv2LsaStateOspfv2NetworkLsaIter) Items() []Ospfv2NetworkLsa { + return obj.ospfv2NetworkLsaSlice +} + +func (obj *ospfv2LsaStateOspfv2NetworkLsaIter) Add() Ospfv2NetworkLsa { + newObj := &otg.Ospfv2NetworkLsa{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &ospfv2NetworkLsa{obj: newObj} + newLibObj.setDefault() + obj.ospfv2NetworkLsaSlice = append(obj.ospfv2NetworkLsaSlice, newLibObj) + return newLibObj +} + +func (obj *ospfv2LsaStateOspfv2NetworkLsaIter) Append(items ...Ospfv2NetworkLsa) Ospfv2LsaStateOspfv2NetworkLsaIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.ospfv2NetworkLsaSlice = append(obj.ospfv2NetworkLsaSlice, item) + } + return obj +} + +func (obj *ospfv2LsaStateOspfv2NetworkLsaIter) Set(index int, newObj Ospfv2NetworkLsa) Ospfv2LsaStateOspfv2NetworkLsaIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.ospfv2NetworkLsaSlice[index] = newObj + return obj +} +func (obj *ospfv2LsaStateOspfv2NetworkLsaIter) Clear() Ospfv2LsaStateOspfv2NetworkLsaIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Ospfv2NetworkLsa{} + obj.ospfv2NetworkLsaSlice = []Ospfv2NetworkLsa{} + } + return obj +} +func (obj *ospfv2LsaStateOspfv2NetworkLsaIter) clearHolderSlice() Ospfv2LsaStateOspfv2NetworkLsaIter { + if len(obj.ospfv2NetworkLsaSlice) > 0 { + obj.ospfv2NetworkLsaSlice = []Ospfv2NetworkLsa{} + } + return obj +} +func (obj *ospfv2LsaStateOspfv2NetworkLsaIter) appendHolderSlice(item Ospfv2NetworkLsa) Ospfv2LsaStateOspfv2NetworkLsaIter { + obj.ospfv2NetworkLsaSlice = append(obj.ospfv2NetworkLsaSlice, item) + return obj +} + +// One or more OSPFv2 Network summary LSA - Type 3. +// NetworkSummaryLsas returns a []Ospfv2NetworkSummaryLsa +func (obj *ospfv2LsaState) NetworkSummaryLsas() Ospfv2LsaStateOspfv2NetworkSummaryLsaIter { + if len(obj.obj.NetworkSummaryLsas) == 0 { + obj.obj.NetworkSummaryLsas = []*otg.Ospfv2NetworkSummaryLsa{} + } + if obj.networkSummaryLsasHolder == nil { + obj.networkSummaryLsasHolder = newOspfv2LsaStateOspfv2NetworkSummaryLsaIter(&obj.obj.NetworkSummaryLsas).setMsg(obj) + } + return obj.networkSummaryLsasHolder +} + +type ospfv2LsaStateOspfv2NetworkSummaryLsaIter struct { + obj *ospfv2LsaState + ospfv2NetworkSummaryLsaSlice []Ospfv2NetworkSummaryLsa + fieldPtr *[]*otg.Ospfv2NetworkSummaryLsa +} + +func newOspfv2LsaStateOspfv2NetworkSummaryLsaIter(ptr *[]*otg.Ospfv2NetworkSummaryLsa) Ospfv2LsaStateOspfv2NetworkSummaryLsaIter { + return &ospfv2LsaStateOspfv2NetworkSummaryLsaIter{fieldPtr: ptr} +} + +type Ospfv2LsaStateOspfv2NetworkSummaryLsaIter interface { + setMsg(*ospfv2LsaState) Ospfv2LsaStateOspfv2NetworkSummaryLsaIter + Items() []Ospfv2NetworkSummaryLsa + Add() Ospfv2NetworkSummaryLsa + Append(items ...Ospfv2NetworkSummaryLsa) Ospfv2LsaStateOspfv2NetworkSummaryLsaIter + Set(index int, newObj Ospfv2NetworkSummaryLsa) Ospfv2LsaStateOspfv2NetworkSummaryLsaIter + Clear() Ospfv2LsaStateOspfv2NetworkSummaryLsaIter + clearHolderSlice() Ospfv2LsaStateOspfv2NetworkSummaryLsaIter + appendHolderSlice(item Ospfv2NetworkSummaryLsa) Ospfv2LsaStateOspfv2NetworkSummaryLsaIter +} + +func (obj *ospfv2LsaStateOspfv2NetworkSummaryLsaIter) setMsg(msg *ospfv2LsaState) Ospfv2LsaStateOspfv2NetworkSummaryLsaIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&ospfv2NetworkSummaryLsa{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *ospfv2LsaStateOspfv2NetworkSummaryLsaIter) Items() []Ospfv2NetworkSummaryLsa { + return obj.ospfv2NetworkSummaryLsaSlice +} + +func (obj *ospfv2LsaStateOspfv2NetworkSummaryLsaIter) Add() Ospfv2NetworkSummaryLsa { + newObj := &otg.Ospfv2NetworkSummaryLsa{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &ospfv2NetworkSummaryLsa{obj: newObj} + newLibObj.setDefault() + obj.ospfv2NetworkSummaryLsaSlice = append(obj.ospfv2NetworkSummaryLsaSlice, newLibObj) + return newLibObj +} + +func (obj *ospfv2LsaStateOspfv2NetworkSummaryLsaIter) Append(items ...Ospfv2NetworkSummaryLsa) Ospfv2LsaStateOspfv2NetworkSummaryLsaIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.ospfv2NetworkSummaryLsaSlice = append(obj.ospfv2NetworkSummaryLsaSlice, item) + } + return obj +} + +func (obj *ospfv2LsaStateOspfv2NetworkSummaryLsaIter) Set(index int, newObj Ospfv2NetworkSummaryLsa) Ospfv2LsaStateOspfv2NetworkSummaryLsaIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.ospfv2NetworkSummaryLsaSlice[index] = newObj + return obj +} +func (obj *ospfv2LsaStateOspfv2NetworkSummaryLsaIter) Clear() Ospfv2LsaStateOspfv2NetworkSummaryLsaIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Ospfv2NetworkSummaryLsa{} + obj.ospfv2NetworkSummaryLsaSlice = []Ospfv2NetworkSummaryLsa{} + } + return obj +} +func (obj *ospfv2LsaStateOspfv2NetworkSummaryLsaIter) clearHolderSlice() Ospfv2LsaStateOspfv2NetworkSummaryLsaIter { + if len(obj.ospfv2NetworkSummaryLsaSlice) > 0 { + obj.ospfv2NetworkSummaryLsaSlice = []Ospfv2NetworkSummaryLsa{} + } + return obj +} +func (obj *ospfv2LsaStateOspfv2NetworkSummaryLsaIter) appendHolderSlice(item Ospfv2NetworkSummaryLsa) Ospfv2LsaStateOspfv2NetworkSummaryLsaIter { + obj.ospfv2NetworkSummaryLsaSlice = append(obj.ospfv2NetworkSummaryLsaSlice, item) + return obj +} + +// One or more OSPFv2 Autonomous System Boundary Router (ASBR) summary LSA - Type 4. +// SummaryAsLsas returns a []Ospfv2SummaryAsLsa +func (obj *ospfv2LsaState) SummaryAsLsas() Ospfv2LsaStateOspfv2SummaryAsLsaIter { + if len(obj.obj.SummaryAsLsas) == 0 { + obj.obj.SummaryAsLsas = []*otg.Ospfv2SummaryAsLsa{} + } + if obj.summaryAsLsasHolder == nil { + obj.summaryAsLsasHolder = newOspfv2LsaStateOspfv2SummaryAsLsaIter(&obj.obj.SummaryAsLsas).setMsg(obj) + } + return obj.summaryAsLsasHolder +} + +type ospfv2LsaStateOspfv2SummaryAsLsaIter struct { + obj *ospfv2LsaState + ospfv2SummaryAsLsaSlice []Ospfv2SummaryAsLsa + fieldPtr *[]*otg.Ospfv2SummaryAsLsa +} + +func newOspfv2LsaStateOspfv2SummaryAsLsaIter(ptr *[]*otg.Ospfv2SummaryAsLsa) Ospfv2LsaStateOspfv2SummaryAsLsaIter { + return &ospfv2LsaStateOspfv2SummaryAsLsaIter{fieldPtr: ptr} +} + +type Ospfv2LsaStateOspfv2SummaryAsLsaIter interface { + setMsg(*ospfv2LsaState) Ospfv2LsaStateOspfv2SummaryAsLsaIter + Items() []Ospfv2SummaryAsLsa + Add() Ospfv2SummaryAsLsa + Append(items ...Ospfv2SummaryAsLsa) Ospfv2LsaStateOspfv2SummaryAsLsaIter + Set(index int, newObj Ospfv2SummaryAsLsa) Ospfv2LsaStateOspfv2SummaryAsLsaIter + Clear() Ospfv2LsaStateOspfv2SummaryAsLsaIter + clearHolderSlice() Ospfv2LsaStateOspfv2SummaryAsLsaIter + appendHolderSlice(item Ospfv2SummaryAsLsa) Ospfv2LsaStateOspfv2SummaryAsLsaIter +} + +func (obj *ospfv2LsaStateOspfv2SummaryAsLsaIter) setMsg(msg *ospfv2LsaState) Ospfv2LsaStateOspfv2SummaryAsLsaIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&ospfv2SummaryAsLsa{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *ospfv2LsaStateOspfv2SummaryAsLsaIter) Items() []Ospfv2SummaryAsLsa { + return obj.ospfv2SummaryAsLsaSlice +} + +func (obj *ospfv2LsaStateOspfv2SummaryAsLsaIter) Add() Ospfv2SummaryAsLsa { + newObj := &otg.Ospfv2SummaryAsLsa{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &ospfv2SummaryAsLsa{obj: newObj} + newLibObj.setDefault() + obj.ospfv2SummaryAsLsaSlice = append(obj.ospfv2SummaryAsLsaSlice, newLibObj) + return newLibObj +} + +func (obj *ospfv2LsaStateOspfv2SummaryAsLsaIter) Append(items ...Ospfv2SummaryAsLsa) Ospfv2LsaStateOspfv2SummaryAsLsaIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.ospfv2SummaryAsLsaSlice = append(obj.ospfv2SummaryAsLsaSlice, item) + } + return obj +} + +func (obj *ospfv2LsaStateOspfv2SummaryAsLsaIter) Set(index int, newObj Ospfv2SummaryAsLsa) Ospfv2LsaStateOspfv2SummaryAsLsaIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.ospfv2SummaryAsLsaSlice[index] = newObj + return obj +} +func (obj *ospfv2LsaStateOspfv2SummaryAsLsaIter) Clear() Ospfv2LsaStateOspfv2SummaryAsLsaIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Ospfv2SummaryAsLsa{} + obj.ospfv2SummaryAsLsaSlice = []Ospfv2SummaryAsLsa{} + } + return obj +} +func (obj *ospfv2LsaStateOspfv2SummaryAsLsaIter) clearHolderSlice() Ospfv2LsaStateOspfv2SummaryAsLsaIter { + if len(obj.ospfv2SummaryAsLsaSlice) > 0 { + obj.ospfv2SummaryAsLsaSlice = []Ospfv2SummaryAsLsa{} + } + return obj +} +func (obj *ospfv2LsaStateOspfv2SummaryAsLsaIter) appendHolderSlice(item Ospfv2SummaryAsLsa) Ospfv2LsaStateOspfv2SummaryAsLsaIter { + obj.ospfv2SummaryAsLsaSlice = append(obj.ospfv2SummaryAsLsaSlice, item) + return obj +} + +// OSPFv2 AS-External-LSA - Type 5. +// ExternalAsLsas returns a []Ospfv2ExternalAsLsa +func (obj *ospfv2LsaState) ExternalAsLsas() Ospfv2LsaStateOspfv2ExternalAsLsaIter { + if len(obj.obj.ExternalAsLsas) == 0 { + obj.obj.ExternalAsLsas = []*otg.Ospfv2ExternalAsLsa{} + } + if obj.externalAsLsasHolder == nil { + obj.externalAsLsasHolder = newOspfv2LsaStateOspfv2ExternalAsLsaIter(&obj.obj.ExternalAsLsas).setMsg(obj) + } + return obj.externalAsLsasHolder +} + +type ospfv2LsaStateOspfv2ExternalAsLsaIter struct { + obj *ospfv2LsaState + ospfv2ExternalAsLsaSlice []Ospfv2ExternalAsLsa + fieldPtr *[]*otg.Ospfv2ExternalAsLsa +} + +func newOspfv2LsaStateOspfv2ExternalAsLsaIter(ptr *[]*otg.Ospfv2ExternalAsLsa) Ospfv2LsaStateOspfv2ExternalAsLsaIter { + return &ospfv2LsaStateOspfv2ExternalAsLsaIter{fieldPtr: ptr} +} + +type Ospfv2LsaStateOspfv2ExternalAsLsaIter interface { + setMsg(*ospfv2LsaState) Ospfv2LsaStateOspfv2ExternalAsLsaIter + Items() []Ospfv2ExternalAsLsa + Add() Ospfv2ExternalAsLsa + Append(items ...Ospfv2ExternalAsLsa) Ospfv2LsaStateOspfv2ExternalAsLsaIter + Set(index int, newObj Ospfv2ExternalAsLsa) Ospfv2LsaStateOspfv2ExternalAsLsaIter + Clear() Ospfv2LsaStateOspfv2ExternalAsLsaIter + clearHolderSlice() Ospfv2LsaStateOspfv2ExternalAsLsaIter + appendHolderSlice(item Ospfv2ExternalAsLsa) Ospfv2LsaStateOspfv2ExternalAsLsaIter +} + +func (obj *ospfv2LsaStateOspfv2ExternalAsLsaIter) setMsg(msg *ospfv2LsaState) Ospfv2LsaStateOspfv2ExternalAsLsaIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&ospfv2ExternalAsLsa{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *ospfv2LsaStateOspfv2ExternalAsLsaIter) Items() []Ospfv2ExternalAsLsa { + return obj.ospfv2ExternalAsLsaSlice +} + +func (obj *ospfv2LsaStateOspfv2ExternalAsLsaIter) Add() Ospfv2ExternalAsLsa { + newObj := &otg.Ospfv2ExternalAsLsa{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &ospfv2ExternalAsLsa{obj: newObj} + newLibObj.setDefault() + obj.ospfv2ExternalAsLsaSlice = append(obj.ospfv2ExternalAsLsaSlice, newLibObj) + return newLibObj +} + +func (obj *ospfv2LsaStateOspfv2ExternalAsLsaIter) Append(items ...Ospfv2ExternalAsLsa) Ospfv2LsaStateOspfv2ExternalAsLsaIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.ospfv2ExternalAsLsaSlice = append(obj.ospfv2ExternalAsLsaSlice, item) + } + return obj +} + +func (obj *ospfv2LsaStateOspfv2ExternalAsLsaIter) Set(index int, newObj Ospfv2ExternalAsLsa) Ospfv2LsaStateOspfv2ExternalAsLsaIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.ospfv2ExternalAsLsaSlice[index] = newObj + return obj +} +func (obj *ospfv2LsaStateOspfv2ExternalAsLsaIter) Clear() Ospfv2LsaStateOspfv2ExternalAsLsaIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Ospfv2ExternalAsLsa{} + obj.ospfv2ExternalAsLsaSlice = []Ospfv2ExternalAsLsa{} + } + return obj +} +func (obj *ospfv2LsaStateOspfv2ExternalAsLsaIter) clearHolderSlice() Ospfv2LsaStateOspfv2ExternalAsLsaIter { + if len(obj.ospfv2ExternalAsLsaSlice) > 0 { + obj.ospfv2ExternalAsLsaSlice = []Ospfv2ExternalAsLsa{} + } + return obj +} +func (obj *ospfv2LsaStateOspfv2ExternalAsLsaIter) appendHolderSlice(item Ospfv2ExternalAsLsa) Ospfv2LsaStateOspfv2ExternalAsLsaIter { + obj.ospfv2ExternalAsLsaSlice = append(obj.ospfv2ExternalAsLsaSlice, item) + return obj +} + +// One or more OSPFv2 NSSA-LSA - Type 7. +// NssaLsas returns a []Ospfv2NssaLsa +func (obj *ospfv2LsaState) NssaLsas() Ospfv2LsaStateOspfv2NssaLsaIter { + if len(obj.obj.NssaLsas) == 0 { + obj.obj.NssaLsas = []*otg.Ospfv2NssaLsa{} + } + if obj.nssaLsasHolder == nil { + obj.nssaLsasHolder = newOspfv2LsaStateOspfv2NssaLsaIter(&obj.obj.NssaLsas).setMsg(obj) + } + return obj.nssaLsasHolder +} + +type ospfv2LsaStateOspfv2NssaLsaIter struct { + obj *ospfv2LsaState + ospfv2NssaLsaSlice []Ospfv2NssaLsa + fieldPtr *[]*otg.Ospfv2NssaLsa +} + +func newOspfv2LsaStateOspfv2NssaLsaIter(ptr *[]*otg.Ospfv2NssaLsa) Ospfv2LsaStateOspfv2NssaLsaIter { + return &ospfv2LsaStateOspfv2NssaLsaIter{fieldPtr: ptr} +} + +type Ospfv2LsaStateOspfv2NssaLsaIter interface { + setMsg(*ospfv2LsaState) Ospfv2LsaStateOspfv2NssaLsaIter + Items() []Ospfv2NssaLsa + Add() Ospfv2NssaLsa + Append(items ...Ospfv2NssaLsa) Ospfv2LsaStateOspfv2NssaLsaIter + Set(index int, newObj Ospfv2NssaLsa) Ospfv2LsaStateOspfv2NssaLsaIter + Clear() Ospfv2LsaStateOspfv2NssaLsaIter + clearHolderSlice() Ospfv2LsaStateOspfv2NssaLsaIter + appendHolderSlice(item Ospfv2NssaLsa) Ospfv2LsaStateOspfv2NssaLsaIter +} + +func (obj *ospfv2LsaStateOspfv2NssaLsaIter) setMsg(msg *ospfv2LsaState) Ospfv2LsaStateOspfv2NssaLsaIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&ospfv2NssaLsa{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *ospfv2LsaStateOspfv2NssaLsaIter) Items() []Ospfv2NssaLsa { + return obj.ospfv2NssaLsaSlice +} + +func (obj *ospfv2LsaStateOspfv2NssaLsaIter) Add() Ospfv2NssaLsa { + newObj := &otg.Ospfv2NssaLsa{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &ospfv2NssaLsa{obj: newObj} + newLibObj.setDefault() + obj.ospfv2NssaLsaSlice = append(obj.ospfv2NssaLsaSlice, newLibObj) + return newLibObj +} + +func (obj *ospfv2LsaStateOspfv2NssaLsaIter) Append(items ...Ospfv2NssaLsa) Ospfv2LsaStateOspfv2NssaLsaIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.ospfv2NssaLsaSlice = append(obj.ospfv2NssaLsaSlice, item) + } + return obj +} + +func (obj *ospfv2LsaStateOspfv2NssaLsaIter) Set(index int, newObj Ospfv2NssaLsa) Ospfv2LsaStateOspfv2NssaLsaIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.ospfv2NssaLsaSlice[index] = newObj + return obj +} +func (obj *ospfv2LsaStateOspfv2NssaLsaIter) Clear() Ospfv2LsaStateOspfv2NssaLsaIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Ospfv2NssaLsa{} + obj.ospfv2NssaLsaSlice = []Ospfv2NssaLsa{} + } + return obj +} +func (obj *ospfv2LsaStateOspfv2NssaLsaIter) clearHolderSlice() Ospfv2LsaStateOspfv2NssaLsaIter { + if len(obj.ospfv2NssaLsaSlice) > 0 { + obj.ospfv2NssaLsaSlice = []Ospfv2NssaLsa{} + } + return obj +} +func (obj *ospfv2LsaStateOspfv2NssaLsaIter) appendHolderSlice(item Ospfv2NssaLsa) Ospfv2LsaStateOspfv2NssaLsaIter { + obj.ospfv2NssaLsaSlice = append(obj.ospfv2NssaLsaSlice, item) + return obj +} + +// One or more OSPFv2 Link-Scope Opaque-LSA - Type 9. +// OpaqueLsas returns a []Ospfv2OpaqueLsa +func (obj *ospfv2LsaState) OpaqueLsas() Ospfv2LsaStateOspfv2OpaqueLsaIter { + if len(obj.obj.OpaqueLsas) == 0 { + obj.obj.OpaqueLsas = []*otg.Ospfv2OpaqueLsa{} + } + if obj.opaqueLsasHolder == nil { + obj.opaqueLsasHolder = newOspfv2LsaStateOspfv2OpaqueLsaIter(&obj.obj.OpaqueLsas).setMsg(obj) + } + return obj.opaqueLsasHolder +} + +type ospfv2LsaStateOspfv2OpaqueLsaIter struct { + obj *ospfv2LsaState + ospfv2OpaqueLsaSlice []Ospfv2OpaqueLsa + fieldPtr *[]*otg.Ospfv2OpaqueLsa +} + +func newOspfv2LsaStateOspfv2OpaqueLsaIter(ptr *[]*otg.Ospfv2OpaqueLsa) Ospfv2LsaStateOspfv2OpaqueLsaIter { + return &ospfv2LsaStateOspfv2OpaqueLsaIter{fieldPtr: ptr} +} + +type Ospfv2LsaStateOspfv2OpaqueLsaIter interface { + setMsg(*ospfv2LsaState) Ospfv2LsaStateOspfv2OpaqueLsaIter + Items() []Ospfv2OpaqueLsa + Add() Ospfv2OpaqueLsa + Append(items ...Ospfv2OpaqueLsa) Ospfv2LsaStateOspfv2OpaqueLsaIter + Set(index int, newObj Ospfv2OpaqueLsa) Ospfv2LsaStateOspfv2OpaqueLsaIter + Clear() Ospfv2LsaStateOspfv2OpaqueLsaIter + clearHolderSlice() Ospfv2LsaStateOspfv2OpaqueLsaIter + appendHolderSlice(item Ospfv2OpaqueLsa) Ospfv2LsaStateOspfv2OpaqueLsaIter +} + +func (obj *ospfv2LsaStateOspfv2OpaqueLsaIter) setMsg(msg *ospfv2LsaState) Ospfv2LsaStateOspfv2OpaqueLsaIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&ospfv2OpaqueLsa{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *ospfv2LsaStateOspfv2OpaqueLsaIter) Items() []Ospfv2OpaqueLsa { + return obj.ospfv2OpaqueLsaSlice +} + +func (obj *ospfv2LsaStateOspfv2OpaqueLsaIter) Add() Ospfv2OpaqueLsa { + newObj := &otg.Ospfv2OpaqueLsa{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &ospfv2OpaqueLsa{obj: newObj} + newLibObj.setDefault() + obj.ospfv2OpaqueLsaSlice = append(obj.ospfv2OpaqueLsaSlice, newLibObj) + return newLibObj +} + +func (obj *ospfv2LsaStateOspfv2OpaqueLsaIter) Append(items ...Ospfv2OpaqueLsa) Ospfv2LsaStateOspfv2OpaqueLsaIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.ospfv2OpaqueLsaSlice = append(obj.ospfv2OpaqueLsaSlice, item) + } + return obj +} + +func (obj *ospfv2LsaStateOspfv2OpaqueLsaIter) Set(index int, newObj Ospfv2OpaqueLsa) Ospfv2LsaStateOspfv2OpaqueLsaIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.ospfv2OpaqueLsaSlice[index] = newObj + return obj +} +func (obj *ospfv2LsaStateOspfv2OpaqueLsaIter) Clear() Ospfv2LsaStateOspfv2OpaqueLsaIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Ospfv2OpaqueLsa{} + obj.ospfv2OpaqueLsaSlice = []Ospfv2OpaqueLsa{} + } + return obj +} +func (obj *ospfv2LsaStateOspfv2OpaqueLsaIter) clearHolderSlice() Ospfv2LsaStateOspfv2OpaqueLsaIter { + if len(obj.ospfv2OpaqueLsaSlice) > 0 { + obj.ospfv2OpaqueLsaSlice = []Ospfv2OpaqueLsa{} + } + return obj +} +func (obj *ospfv2LsaStateOspfv2OpaqueLsaIter) appendHolderSlice(item Ospfv2OpaqueLsa) Ospfv2LsaStateOspfv2OpaqueLsaIter { + obj.ospfv2OpaqueLsaSlice = append(obj.ospfv2OpaqueLsaSlice, item) + return obj +} + +func (obj *ospfv2LsaState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.RouterLsas) != 0 { + + if set_default { + obj.RouterLsas().clearHolderSlice() + for _, item := range obj.obj.RouterLsas { + obj.RouterLsas().appendHolderSlice(&ospfv2RouterLsa{obj: item}) + } + } + for _, item := range obj.RouterLsas().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.NetworkLsas) != 0 { + + if set_default { + obj.NetworkLsas().clearHolderSlice() + for _, item := range obj.obj.NetworkLsas { + obj.NetworkLsas().appendHolderSlice(&ospfv2NetworkLsa{obj: item}) + } + } + for _, item := range obj.NetworkLsas().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.NetworkSummaryLsas) != 0 { + + if set_default { + obj.NetworkSummaryLsas().clearHolderSlice() + for _, item := range obj.obj.NetworkSummaryLsas { + obj.NetworkSummaryLsas().appendHolderSlice(&ospfv2NetworkSummaryLsa{obj: item}) + } + } + for _, item := range obj.NetworkSummaryLsas().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.SummaryAsLsas) != 0 { + + if set_default { + obj.SummaryAsLsas().clearHolderSlice() + for _, item := range obj.obj.SummaryAsLsas { + obj.SummaryAsLsas().appendHolderSlice(&ospfv2SummaryAsLsa{obj: item}) + } + } + for _, item := range obj.SummaryAsLsas().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.ExternalAsLsas) != 0 { + + if set_default { + obj.ExternalAsLsas().clearHolderSlice() + for _, item := range obj.obj.ExternalAsLsas { + obj.ExternalAsLsas().appendHolderSlice(&ospfv2ExternalAsLsa{obj: item}) + } + } + for _, item := range obj.ExternalAsLsas().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.NssaLsas) != 0 { + + if set_default { + obj.NssaLsas().clearHolderSlice() + for _, item := range obj.obj.NssaLsas { + obj.NssaLsas().appendHolderSlice(&ospfv2NssaLsa{obj: item}) + } + } + for _, item := range obj.NssaLsas().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.OpaqueLsas) != 0 { + + if set_default { + obj.OpaqueLsas().clearHolderSlice() + for _, item := range obj.obj.OpaqueLsas { + obj.OpaqueLsas().appendHolderSlice(&ospfv2OpaqueLsa{obj: item}) + } + } + for _, item := range obj.OpaqueLsas().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *ospfv2LsaState) setDefault() { + +} diff --git a/gosnappi/ospfv2_lsas_state_request.go b/gosnappi/ospfv2_lsas_state_request.go new file mode 100644 index 00000000..a78cfe7c --- /dev/null +++ b/gosnappi/ospfv2_lsas_state_request.go @@ -0,0 +1,317 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2LsasStateRequest ***** +type ospfv2LsasStateRequest struct { + validation + obj *otg.Ospfv2LsasStateRequest + marshaller marshalOspfv2LsasStateRequest + unMarshaller unMarshalOspfv2LsasStateRequest +} + +func NewOspfv2LsasStateRequest() Ospfv2LsasStateRequest { + obj := ospfv2LsasStateRequest{obj: &otg.Ospfv2LsasStateRequest{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2LsasStateRequest) msg() *otg.Ospfv2LsasStateRequest { + return obj.obj +} + +func (obj *ospfv2LsasStateRequest) setMsg(msg *otg.Ospfv2LsasStateRequest) Ospfv2LsasStateRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2LsasStateRequest struct { + obj *ospfv2LsasStateRequest +} + +type marshalOspfv2LsasStateRequest interface { + // ToProto marshals Ospfv2LsasStateRequest to protobuf object *otg.Ospfv2LsasStateRequest + ToProto() (*otg.Ospfv2LsasStateRequest, error) + // ToPbText marshals Ospfv2LsasStateRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2LsasStateRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2LsasStateRequest to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2LsasStateRequest struct { + obj *ospfv2LsasStateRequest +} + +type unMarshalOspfv2LsasStateRequest interface { + // FromProto unmarshals Ospfv2LsasStateRequest from protobuf object *otg.Ospfv2LsasStateRequest + FromProto(msg *otg.Ospfv2LsasStateRequest) (Ospfv2LsasStateRequest, error) + // FromPbText unmarshals Ospfv2LsasStateRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2LsasStateRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2LsasStateRequest from JSON text + FromJson(value string) error +} + +func (obj *ospfv2LsasStateRequest) Marshal() marshalOspfv2LsasStateRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2LsasStateRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2LsasStateRequest) Unmarshal() unMarshalOspfv2LsasStateRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2LsasStateRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2LsasStateRequest) ToProto() (*otg.Ospfv2LsasStateRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2LsasStateRequest) FromProto(msg *otg.Ospfv2LsasStateRequest) (Ospfv2LsasStateRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2LsasStateRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2LsasStateRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2LsasStateRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2LsasStateRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2LsasStateRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2LsasStateRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2LsasStateRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2LsasStateRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2LsasStateRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2LsasStateRequest) Clone() (Ospfv2LsasStateRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2LsasStateRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Ospfv2LsasStateRequest is the request to retrieve OSPFv2 Link State Advertisements (LSA) information learned by the routers. +type Ospfv2LsasStateRequest interface { + Validation + // msg marshals Ospfv2LsasStateRequest to protobuf object *otg.Ospfv2LsasStateRequest + // and doesn't set defaults + msg() *otg.Ospfv2LsasStateRequest + // setMsg unmarshals Ospfv2LsasStateRequest from protobuf object *otg.Ospfv2LsasStateRequest + // and doesn't set defaults + setMsg(*otg.Ospfv2LsasStateRequest) Ospfv2LsasStateRequest + // provides marshal interface + Marshal() marshalOspfv2LsasStateRequest + // provides unmarshal interface + Unmarshal() unMarshalOspfv2LsasStateRequest + // validate validates Ospfv2LsasStateRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2LsasStateRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RouterNames returns []string, set in Ospfv2LsasStateRequest. + RouterNames() []string + // SetRouterNames assigns []string provided by user to Ospfv2LsasStateRequest + SetRouterNames(value []string) Ospfv2LsasStateRequest +} + +// The names of OSPFv2 routers for which learned information is requested. An empty list will return results for all OSPFv2 routers. +// +// x-constraint: +// - /components/schemas/Device.Ospfv2Router/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ospfv2Router/properties/name +// +// RouterNames returns a []string +func (obj *ospfv2LsasStateRequest) RouterNames() []string { + if obj.obj.RouterNames == nil { + obj.obj.RouterNames = make([]string, 0) + } + return obj.obj.RouterNames +} + +// The names of OSPFv2 routers for which learned information is requested. An empty list will return results for all OSPFv2 routers. +// +// x-constraint: +// - /components/schemas/Device.Ospfv2Router/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ospfv2Router/properties/name +// +// SetRouterNames sets the []string value in the Ospfv2LsasStateRequest object +func (obj *ospfv2LsasStateRequest) SetRouterNames(value []string) Ospfv2LsasStateRequest { + + if obj.obj.RouterNames == nil { + obj.obj.RouterNames = make([]string, 0) + } + obj.obj.RouterNames = value + + return obj +} + +func (obj *ospfv2LsasStateRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *ospfv2LsasStateRequest) setDefault() { + +} diff --git a/gosnappi/ospfv2_metric.go b/gosnappi/ospfv2_metric.go new file mode 100644 index 00000000..eba15077 --- /dev/null +++ b/gosnappi/ospfv2_metric.go @@ -0,0 +1,1230 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2Metric ***** +type ospfv2Metric struct { + validation + obj *otg.Ospfv2Metric + marshaller marshalOspfv2Metric + unMarshaller unMarshalOspfv2Metric +} + +func NewOspfv2Metric() Ospfv2Metric { + obj := ospfv2Metric{obj: &otg.Ospfv2Metric{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2Metric) msg() *otg.Ospfv2Metric { + return obj.obj +} + +func (obj *ospfv2Metric) setMsg(msg *otg.Ospfv2Metric) Ospfv2Metric { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2Metric struct { + obj *ospfv2Metric +} + +type marshalOspfv2Metric interface { + // ToProto marshals Ospfv2Metric to protobuf object *otg.Ospfv2Metric + ToProto() (*otg.Ospfv2Metric, error) + // ToPbText marshals Ospfv2Metric to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2Metric to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2Metric to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2Metric struct { + obj *ospfv2Metric +} + +type unMarshalOspfv2Metric interface { + // FromProto unmarshals Ospfv2Metric from protobuf object *otg.Ospfv2Metric + FromProto(msg *otg.Ospfv2Metric) (Ospfv2Metric, error) + // FromPbText unmarshals Ospfv2Metric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2Metric from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2Metric from JSON text + FromJson(value string) error +} + +func (obj *ospfv2Metric) Marshal() marshalOspfv2Metric { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2Metric{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2Metric) Unmarshal() unMarshalOspfv2Metric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2Metric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2Metric) ToProto() (*otg.Ospfv2Metric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2Metric) FromProto(msg *otg.Ospfv2Metric) (Ospfv2Metric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2Metric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2Metric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2Metric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2Metric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2Metric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2Metric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2Metric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2Metric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2Metric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2Metric) Clone() (Ospfv2Metric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2Metric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Ospfv2Metric is oSPFv2 per router statistics information. +type Ospfv2Metric interface { + Validation + // msg marshals Ospfv2Metric to protobuf object *otg.Ospfv2Metric + // and doesn't set defaults + msg() *otg.Ospfv2Metric + // setMsg unmarshals Ospfv2Metric from protobuf object *otg.Ospfv2Metric + // and doesn't set defaults + setMsg(*otg.Ospfv2Metric) Ospfv2Metric + // provides marshal interface + Marshal() marshalOspfv2Metric + // provides unmarshal interface + Unmarshal() unMarshalOspfv2Metric + // validate validates Ospfv2Metric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2Metric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in Ospfv2Metric. + Name() string + // SetName assigns string provided by user to Ospfv2Metric + SetName(value string) Ospfv2Metric + // HasName checks if Name has been set in Ospfv2Metric + HasName() bool + // FullStateCount returns uint64, set in Ospfv2Metric. + FullStateCount() uint64 + // SetFullStateCount assigns uint64 provided by user to Ospfv2Metric + SetFullStateCount(value uint64) Ospfv2Metric + // HasFullStateCount checks if FullStateCount has been set in Ospfv2Metric + HasFullStateCount() bool + // DownStateCount returns uint64, set in Ospfv2Metric. + DownStateCount() uint64 + // SetDownStateCount assigns uint64 provided by user to Ospfv2Metric + SetDownStateCount(value uint64) Ospfv2Metric + // HasDownStateCount checks if DownStateCount has been set in Ospfv2Metric + HasDownStateCount() bool + // SessionsFlap returns uint64, set in Ospfv2Metric. + SessionsFlap() uint64 + // SetSessionsFlap assigns uint64 provided by user to Ospfv2Metric + SetSessionsFlap(value uint64) Ospfv2Metric + // HasSessionsFlap checks if SessionsFlap has been set in Ospfv2Metric + HasSessionsFlap() bool + // HellosSent returns uint64, set in Ospfv2Metric. + HellosSent() uint64 + // SetHellosSent assigns uint64 provided by user to Ospfv2Metric + SetHellosSent(value uint64) Ospfv2Metric + // HasHellosSent checks if HellosSent has been set in Ospfv2Metric + HasHellosSent() bool + // HellosReceived returns uint64, set in Ospfv2Metric. + HellosReceived() uint64 + // SetHellosReceived assigns uint64 provided by user to Ospfv2Metric + SetHellosReceived(value uint64) Ospfv2Metric + // HasHellosReceived checks if HellosReceived has been set in Ospfv2Metric + HasHellosReceived() bool + // DbdSent returns uint64, set in Ospfv2Metric. + DbdSent() uint64 + // SetDbdSent assigns uint64 provided by user to Ospfv2Metric + SetDbdSent(value uint64) Ospfv2Metric + // HasDbdSent checks if DbdSent has been set in Ospfv2Metric + HasDbdSent() bool + // DbdReceived returns uint64, set in Ospfv2Metric. + DbdReceived() uint64 + // SetDbdReceived assigns uint64 provided by user to Ospfv2Metric + SetDbdReceived(value uint64) Ospfv2Metric + // HasDbdReceived checks if DbdReceived has been set in Ospfv2Metric + HasDbdReceived() bool + // LsRequestSent returns uint64, set in Ospfv2Metric. + LsRequestSent() uint64 + // SetLsRequestSent assigns uint64 provided by user to Ospfv2Metric + SetLsRequestSent(value uint64) Ospfv2Metric + // HasLsRequestSent checks if LsRequestSent has been set in Ospfv2Metric + HasLsRequestSent() bool + // LsRequestReceived returns uint64, set in Ospfv2Metric. + LsRequestReceived() uint64 + // SetLsRequestReceived assigns uint64 provided by user to Ospfv2Metric + SetLsRequestReceived(value uint64) Ospfv2Metric + // HasLsRequestReceived checks if LsRequestReceived has been set in Ospfv2Metric + HasLsRequestReceived() bool + // LsUpdateSent returns uint64, set in Ospfv2Metric. + LsUpdateSent() uint64 + // SetLsUpdateSent assigns uint64 provided by user to Ospfv2Metric + SetLsUpdateSent(value uint64) Ospfv2Metric + // HasLsUpdateSent checks if LsUpdateSent has been set in Ospfv2Metric + HasLsUpdateSent() bool + // LsUpdateReceived returns uint64, set in Ospfv2Metric. + LsUpdateReceived() uint64 + // SetLsUpdateReceived assigns uint64 provided by user to Ospfv2Metric + SetLsUpdateReceived(value uint64) Ospfv2Metric + // HasLsUpdateReceived checks if LsUpdateReceived has been set in Ospfv2Metric + HasLsUpdateReceived() bool + // LsAckSent returns uint64, set in Ospfv2Metric. + LsAckSent() uint64 + // SetLsAckSent assigns uint64 provided by user to Ospfv2Metric + SetLsAckSent(value uint64) Ospfv2Metric + // HasLsAckSent checks if LsAckSent has been set in Ospfv2Metric + HasLsAckSent() bool + // LsAckReceived returns uint64, set in Ospfv2Metric. + LsAckReceived() uint64 + // SetLsAckReceived assigns uint64 provided by user to Ospfv2Metric + SetLsAckReceived(value uint64) Ospfv2Metric + // HasLsAckReceived checks if LsAckReceived has been set in Ospfv2Metric + HasLsAckReceived() bool + // LsaSent returns uint64, set in Ospfv2Metric. + LsaSent() uint64 + // SetLsaSent assigns uint64 provided by user to Ospfv2Metric + SetLsaSent(value uint64) Ospfv2Metric + // HasLsaSent checks if LsaSent has been set in Ospfv2Metric + HasLsaSent() bool + // LsaReceived returns uint64, set in Ospfv2Metric. + LsaReceived() uint64 + // SetLsaReceived assigns uint64 provided by user to Ospfv2Metric + SetLsaReceived(value uint64) Ospfv2Metric + // HasLsaReceived checks if LsaReceived has been set in Ospfv2Metric + HasLsaReceived() bool + // LsaAckSent returns uint64, set in Ospfv2Metric. + LsaAckSent() uint64 + // SetLsaAckSent assigns uint64 provided by user to Ospfv2Metric + SetLsaAckSent(value uint64) Ospfv2Metric + // HasLsaAckSent checks if LsaAckSent has been set in Ospfv2Metric + HasLsaAckSent() bool + // LsaAckReceived returns uint64, set in Ospfv2Metric. + LsaAckReceived() uint64 + // SetLsaAckReceived assigns uint64 provided by user to Ospfv2Metric + SetLsaAckReceived(value uint64) Ospfv2Metric + // HasLsaAckReceived checks if LsaAckReceived has been set in Ospfv2Metric + HasLsaAckReceived() bool + // RouterLsaSent returns uint64, set in Ospfv2Metric. + RouterLsaSent() uint64 + // SetRouterLsaSent assigns uint64 provided by user to Ospfv2Metric + SetRouterLsaSent(value uint64) Ospfv2Metric + // HasRouterLsaSent checks if RouterLsaSent has been set in Ospfv2Metric + HasRouterLsaSent() bool + // RouterLsaReceived returns uint64, set in Ospfv2Metric. + RouterLsaReceived() uint64 + // SetRouterLsaReceived assigns uint64 provided by user to Ospfv2Metric + SetRouterLsaReceived(value uint64) Ospfv2Metric + // HasRouterLsaReceived checks if RouterLsaReceived has been set in Ospfv2Metric + HasRouterLsaReceived() bool + // NetworkLsaSent returns uint64, set in Ospfv2Metric. + NetworkLsaSent() uint64 + // SetNetworkLsaSent assigns uint64 provided by user to Ospfv2Metric + SetNetworkLsaSent(value uint64) Ospfv2Metric + // HasNetworkLsaSent checks if NetworkLsaSent has been set in Ospfv2Metric + HasNetworkLsaSent() bool + // NetworkLsaReceived returns uint64, set in Ospfv2Metric. + NetworkLsaReceived() uint64 + // SetNetworkLsaReceived assigns uint64 provided by user to Ospfv2Metric + SetNetworkLsaReceived(value uint64) Ospfv2Metric + // HasNetworkLsaReceived checks if NetworkLsaReceived has been set in Ospfv2Metric + HasNetworkLsaReceived() bool + // SummaryLsaSent returns uint64, set in Ospfv2Metric. + SummaryLsaSent() uint64 + // SetSummaryLsaSent assigns uint64 provided by user to Ospfv2Metric + SetSummaryLsaSent(value uint64) Ospfv2Metric + // HasSummaryLsaSent checks if SummaryLsaSent has been set in Ospfv2Metric + HasSummaryLsaSent() bool + // SummaryLsaReceived returns uint64, set in Ospfv2Metric. + SummaryLsaReceived() uint64 + // SetSummaryLsaReceived assigns uint64 provided by user to Ospfv2Metric + SetSummaryLsaReceived(value uint64) Ospfv2Metric + // HasSummaryLsaReceived checks if SummaryLsaReceived has been set in Ospfv2Metric + HasSummaryLsaReceived() bool + // ExternalLsaSent returns uint64, set in Ospfv2Metric. + ExternalLsaSent() uint64 + // SetExternalLsaSent assigns uint64 provided by user to Ospfv2Metric + SetExternalLsaSent(value uint64) Ospfv2Metric + // HasExternalLsaSent checks if ExternalLsaSent has been set in Ospfv2Metric + HasExternalLsaSent() bool + // ExternalLsaReceived returns uint64, set in Ospfv2Metric. + ExternalLsaReceived() uint64 + // SetExternalLsaReceived assigns uint64 provided by user to Ospfv2Metric + SetExternalLsaReceived(value uint64) Ospfv2Metric + // HasExternalLsaReceived checks if ExternalLsaReceived has been set in Ospfv2Metric + HasExternalLsaReceived() bool + // NssaLsaSent returns uint64, set in Ospfv2Metric. + NssaLsaSent() uint64 + // SetNssaLsaSent assigns uint64 provided by user to Ospfv2Metric + SetNssaLsaSent(value uint64) Ospfv2Metric + // HasNssaLsaSent checks if NssaLsaSent has been set in Ospfv2Metric + HasNssaLsaSent() bool + // NssaLsaReceived returns uint64, set in Ospfv2Metric. + NssaLsaReceived() uint64 + // SetNssaLsaReceived assigns uint64 provided by user to Ospfv2Metric + SetNssaLsaReceived(value uint64) Ospfv2Metric + // HasNssaLsaReceived checks if NssaLsaReceived has been set in Ospfv2Metric + HasNssaLsaReceived() bool + // OpaqueLocalSent returns uint64, set in Ospfv2Metric. + OpaqueLocalSent() uint64 + // SetOpaqueLocalSent assigns uint64 provided by user to Ospfv2Metric + SetOpaqueLocalSent(value uint64) Ospfv2Metric + // HasOpaqueLocalSent checks if OpaqueLocalSent has been set in Ospfv2Metric + HasOpaqueLocalSent() bool + // OpaqueLocalReceived returns uint64, set in Ospfv2Metric. + OpaqueLocalReceived() uint64 + // SetOpaqueLocalReceived assigns uint64 provided by user to Ospfv2Metric + SetOpaqueLocalReceived(value uint64) Ospfv2Metric + // HasOpaqueLocalReceived checks if OpaqueLocalReceived has been set in Ospfv2Metric + HasOpaqueLocalReceived() bool + // OpaqueAreaSent returns uint64, set in Ospfv2Metric. + OpaqueAreaSent() uint64 + // SetOpaqueAreaSent assigns uint64 provided by user to Ospfv2Metric + SetOpaqueAreaSent(value uint64) Ospfv2Metric + // HasOpaqueAreaSent checks if OpaqueAreaSent has been set in Ospfv2Metric + HasOpaqueAreaSent() bool + // OpaqueAreaReceived returns uint64, set in Ospfv2Metric. + OpaqueAreaReceived() uint64 + // SetOpaqueAreaReceived assigns uint64 provided by user to Ospfv2Metric + SetOpaqueAreaReceived(value uint64) Ospfv2Metric + // HasOpaqueAreaReceived checks if OpaqueAreaReceived has been set in Ospfv2Metric + HasOpaqueAreaReceived() bool + // OpaqueDomainSent returns uint64, set in Ospfv2Metric. + OpaqueDomainSent() uint64 + // SetOpaqueDomainSent assigns uint64 provided by user to Ospfv2Metric + SetOpaqueDomainSent(value uint64) Ospfv2Metric + // HasOpaqueDomainSent checks if OpaqueDomainSent has been set in Ospfv2Metric + HasOpaqueDomainSent() bool + // OpaqueDomainReceived returns uint64, set in Ospfv2Metric. + OpaqueDomainReceived() uint64 + // SetOpaqueDomainReceived assigns uint64 provided by user to Ospfv2Metric + SetOpaqueDomainReceived(value uint64) Ospfv2Metric + // HasOpaqueDomainReceived checks if OpaqueDomainReceived has been set in Ospfv2Metric + HasOpaqueDomainReceived() bool +} + +// The name of a configured OSPFv2 router. +// Name returns a string +func (obj *ospfv2Metric) Name() string { + + return *obj.obj.Name + +} + +// The name of a configured OSPFv2 router. +// Name returns a string +func (obj *ospfv2Metric) HasName() bool { + return obj.obj.Name != nil +} + +// The name of a configured OSPFv2 router. +// SetName sets the string value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetName(value string) Ospfv2Metric { + + obj.obj.Name = &value + return obj +} + +// The number of OSPFv2 sessions in up state. +// FullStateCount returns a uint64 +func (obj *ospfv2Metric) FullStateCount() uint64 { + + return *obj.obj.FullStateCount + +} + +// The number of OSPFv2 sessions in up state. +// FullStateCount returns a uint64 +func (obj *ospfv2Metric) HasFullStateCount() bool { + return obj.obj.FullStateCount != nil +} + +// The number of OSPFv2 sessions in up state. +// SetFullStateCount sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetFullStateCount(value uint64) Ospfv2Metric { + + obj.obj.FullStateCount = &value + return obj +} + +// The number of OSPFv2 sessions in down state. +// DownStateCount returns a uint64 +func (obj *ospfv2Metric) DownStateCount() uint64 { + + return *obj.obj.DownStateCount + +} + +// The number of OSPFv2 sessions in down state. +// DownStateCount returns a uint64 +func (obj *ospfv2Metric) HasDownStateCount() bool { + return obj.obj.DownStateCount != nil +} + +// The number of OSPFv2 sessions in down state. +// SetDownStateCount sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetDownStateCount(value uint64) Ospfv2Metric { + + obj.obj.DownStateCount = &value + return obj +} + +// The number of change of OSPFv2 sessions from up to down state. +// SessionsFlap returns a uint64 +func (obj *ospfv2Metric) SessionsFlap() uint64 { + + return *obj.obj.SessionsFlap + +} + +// The number of change of OSPFv2 sessions from up to down state. +// SessionsFlap returns a uint64 +func (obj *ospfv2Metric) HasSessionsFlap() bool { + return obj.obj.SessionsFlap != nil +} + +// The number of change of OSPFv2 sessions from up to down state. +// SetSessionsFlap sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetSessionsFlap(value uint64) Ospfv2Metric { + + obj.obj.SessionsFlap = &value + return obj +} + +// The number of OSPFv2 Hello messages transmitted. +// HellosSent returns a uint64 +func (obj *ospfv2Metric) HellosSent() uint64 { + + return *obj.obj.HellosSent + +} + +// The number of OSPFv2 Hello messages transmitted. +// HellosSent returns a uint64 +func (obj *ospfv2Metric) HasHellosSent() bool { + return obj.obj.HellosSent != nil +} + +// The number of OSPFv2 Hello messages transmitted. +// SetHellosSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetHellosSent(value uint64) Ospfv2Metric { + + obj.obj.HellosSent = &value + return obj +} + +// The number of OSPFv2 Hello messages received. +// HellosReceived returns a uint64 +func (obj *ospfv2Metric) HellosReceived() uint64 { + + return *obj.obj.HellosReceived + +} + +// The number of OSPFv2 Hello messages received. +// HellosReceived returns a uint64 +func (obj *ospfv2Metric) HasHellosReceived() bool { + return obj.obj.HellosReceived != nil +} + +// The number of OSPFv2 Hello messages received. +// SetHellosReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetHellosReceived(value uint64) Ospfv2Metric { + + obj.obj.HellosReceived = &value + return obj +} + +// The number of OSPFv2 Database Description (DBD) messages transmitted. +// DbdSent returns a uint64 +func (obj *ospfv2Metric) DbdSent() uint64 { + + return *obj.obj.DbdSent + +} + +// The number of OSPFv2 Database Description (DBD) messages transmitted. +// DbdSent returns a uint64 +func (obj *ospfv2Metric) HasDbdSent() bool { + return obj.obj.DbdSent != nil +} + +// The number of OSPFv2 Database Description (DBD) messages transmitted. +// SetDbdSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetDbdSent(value uint64) Ospfv2Metric { + + obj.obj.DbdSent = &value + return obj +} + +// The number of OSPFv2 Database Description (DBD) messages received. +// DbdReceived returns a uint64 +func (obj *ospfv2Metric) DbdReceived() uint64 { + + return *obj.obj.DbdReceived + +} + +// The number of OSPFv2 Database Description (DBD) messages received. +// DbdReceived returns a uint64 +func (obj *ospfv2Metric) HasDbdReceived() bool { + return obj.obj.DbdReceived != nil +} + +// The number of OSPFv2 Database Description (DBD) messages received. +// SetDbdReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetDbdReceived(value uint64) Ospfv2Metric { + + obj.obj.DbdReceived = &value + return obj +} + +// The number of OSPFv2 LinkState (LS) Request messages transmitted. +// LsRequestSent returns a uint64 +func (obj *ospfv2Metric) LsRequestSent() uint64 { + + return *obj.obj.LsRequestSent + +} + +// The number of OSPFv2 LinkState (LS) Request messages transmitted. +// LsRequestSent returns a uint64 +func (obj *ospfv2Metric) HasLsRequestSent() bool { + return obj.obj.LsRequestSent != nil +} + +// The number of OSPFv2 LinkState (LS) Request messages transmitted. +// SetLsRequestSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetLsRequestSent(value uint64) Ospfv2Metric { + + obj.obj.LsRequestSent = &value + return obj +} + +// The number of OSPFv2 LinkState (LS) Request messages received. +// LsRequestReceived returns a uint64 +func (obj *ospfv2Metric) LsRequestReceived() uint64 { + + return *obj.obj.LsRequestReceived + +} + +// The number of OSPFv2 LinkState (LS) Request messages received. +// LsRequestReceived returns a uint64 +func (obj *ospfv2Metric) HasLsRequestReceived() bool { + return obj.obj.LsRequestReceived != nil +} + +// The number of OSPFv2 LinkState (LS) Request messages received. +// SetLsRequestReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetLsRequestReceived(value uint64) Ospfv2Metric { + + obj.obj.LsRequestReceived = &value + return obj +} + +// The number of OSPFv2 LinkState (LS) Update messages transmitted. +// LsUpdateSent returns a uint64 +func (obj *ospfv2Metric) LsUpdateSent() uint64 { + + return *obj.obj.LsUpdateSent + +} + +// The number of OSPFv2 LinkState (LS) Update messages transmitted. +// LsUpdateSent returns a uint64 +func (obj *ospfv2Metric) HasLsUpdateSent() bool { + return obj.obj.LsUpdateSent != nil +} + +// The number of OSPFv2 LinkState (LS) Update messages transmitted. +// SetLsUpdateSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetLsUpdateSent(value uint64) Ospfv2Metric { + + obj.obj.LsUpdateSent = &value + return obj +} + +// The number of OSPFv2 LinkState (LS) Update messages received. +// LsUpdateReceived returns a uint64 +func (obj *ospfv2Metric) LsUpdateReceived() uint64 { + + return *obj.obj.LsUpdateReceived + +} + +// The number of OSPFv2 LinkState (LS) Update messages received. +// LsUpdateReceived returns a uint64 +func (obj *ospfv2Metric) HasLsUpdateReceived() bool { + return obj.obj.LsUpdateReceived != nil +} + +// The number of OSPFv2 LinkState (LS) Update messages received. +// SetLsUpdateReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetLsUpdateReceived(value uint64) Ospfv2Metric { + + obj.obj.LsUpdateReceived = &value + return obj +} + +// The number of OSPFv2 LinkState (LS) Acknowledgement messages transmitted. +// LsAckSent returns a uint64 +func (obj *ospfv2Metric) LsAckSent() uint64 { + + return *obj.obj.LsAckSent + +} + +// The number of OSPFv2 LinkState (LS) Acknowledgement messages transmitted. +// LsAckSent returns a uint64 +func (obj *ospfv2Metric) HasLsAckSent() bool { + return obj.obj.LsAckSent != nil +} + +// The number of OSPFv2 LinkState (LS) Acknowledgement messages transmitted. +// SetLsAckSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetLsAckSent(value uint64) Ospfv2Metric { + + obj.obj.LsAckSent = &value + return obj +} + +// The number of OSPFv2 LinkState (LS) Acknowledgement messages received. +// LsAckReceived returns a uint64 +func (obj *ospfv2Metric) LsAckReceived() uint64 { + + return *obj.obj.LsAckReceived + +} + +// The number of OSPFv2 LinkState (LS) Acknowledgement messages received. +// LsAckReceived returns a uint64 +func (obj *ospfv2Metric) HasLsAckReceived() bool { + return obj.obj.LsAckReceived != nil +} + +// The number of OSPFv2 LinkState (LS) Acknowledgement messages received. +// SetLsAckReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetLsAckReceived(value uint64) Ospfv2Metric { + + obj.obj.LsAckReceived = &value + return obj +} + +// The total number of OSPFv2 LinkState Advertisement (LSA) messages transmitted. +// LsaSent returns a uint64 +func (obj *ospfv2Metric) LsaSent() uint64 { + + return *obj.obj.LsaSent + +} + +// The total number of OSPFv2 LinkState Advertisement (LSA) messages transmitted. +// LsaSent returns a uint64 +func (obj *ospfv2Metric) HasLsaSent() bool { + return obj.obj.LsaSent != nil +} + +// The total number of OSPFv2 LinkState Advertisement (LSA) messages transmitted. +// SetLsaSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetLsaSent(value uint64) Ospfv2Metric { + + obj.obj.LsaSent = &value + return obj +} + +// The total number of OSPFv2 LinkState Advertisement (LSA) messages received. +// LsaReceived returns a uint64 +func (obj *ospfv2Metric) LsaReceived() uint64 { + + return *obj.obj.LsaReceived + +} + +// The total number of OSPFv2 LinkState Advertisement (LSA) messages received. +// LsaReceived returns a uint64 +func (obj *ospfv2Metric) HasLsaReceived() bool { + return obj.obj.LsaReceived != nil +} + +// The total number of OSPFv2 LinkState Advertisement (LSA) messages received. +// SetLsaReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetLsaReceived(value uint64) Ospfv2Metric { + + obj.obj.LsaReceived = &value + return obj +} + +// The total number of OSPFv2 LinkState Advertisement (LSA) messages acknowledged. +// LsaAckSent returns a uint64 +func (obj *ospfv2Metric) LsaAckSent() uint64 { + + return *obj.obj.LsaAckSent + +} + +// The total number of OSPFv2 LinkState Advertisement (LSA) messages acknowledged. +// LsaAckSent returns a uint64 +func (obj *ospfv2Metric) HasLsaAckSent() bool { + return obj.obj.LsaAckSent != nil +} + +// The total number of OSPFv2 LinkState Advertisement (LSA) messages acknowledged. +// SetLsaAckSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetLsaAckSent(value uint64) Ospfv2Metric { + + obj.obj.LsaAckSent = &value + return obj +} + +// The total number of OSPFv2 LinkState Advertisement (LSA) acknowledge messages received . +// LsaAckReceived returns a uint64 +func (obj *ospfv2Metric) LsaAckReceived() uint64 { + + return *obj.obj.LsaAckReceived + +} + +// The total number of OSPFv2 LinkState Advertisement (LSA) acknowledge messages received . +// LsaAckReceived returns a uint64 +func (obj *ospfv2Metric) HasLsaAckReceived() bool { + return obj.obj.LsaAckReceived != nil +} + +// The total number of OSPFv2 LinkState Advertisement (LSA) acknowledge messages received . +// SetLsaAckReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetLsaAckReceived(value uint64) Ospfv2Metric { + + obj.obj.LsaAckReceived = &value + return obj +} + +// The number of OSPFv2 Router (Type 1) LSAs transmitted. +// RouterLsaSent returns a uint64 +func (obj *ospfv2Metric) RouterLsaSent() uint64 { + + return *obj.obj.RouterLsaSent + +} + +// The number of OSPFv2 Router (Type 1) LSAs transmitted. +// RouterLsaSent returns a uint64 +func (obj *ospfv2Metric) HasRouterLsaSent() bool { + return obj.obj.RouterLsaSent != nil +} + +// The number of OSPFv2 Router (Type 1) LSAs transmitted. +// SetRouterLsaSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetRouterLsaSent(value uint64) Ospfv2Metric { + + obj.obj.RouterLsaSent = &value + return obj +} + +// The number of OSPFv2 Router (Type 1) LSAs received. +// RouterLsaReceived returns a uint64 +func (obj *ospfv2Metric) RouterLsaReceived() uint64 { + + return *obj.obj.RouterLsaReceived + +} + +// The number of OSPFv2 Router (Type 1) LSAs received. +// RouterLsaReceived returns a uint64 +func (obj *ospfv2Metric) HasRouterLsaReceived() bool { + return obj.obj.RouterLsaReceived != nil +} + +// The number of OSPFv2 Router (Type 1) LSAs received. +// SetRouterLsaReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetRouterLsaReceived(value uint64) Ospfv2Metric { + + obj.obj.RouterLsaReceived = &value + return obj +} + +// The number of OSPFv2 Network (Type 2) LSAs transmitted. +// NetworkLsaSent returns a uint64 +func (obj *ospfv2Metric) NetworkLsaSent() uint64 { + + return *obj.obj.NetworkLsaSent + +} + +// The number of OSPFv2 Network (Type 2) LSAs transmitted. +// NetworkLsaSent returns a uint64 +func (obj *ospfv2Metric) HasNetworkLsaSent() bool { + return obj.obj.NetworkLsaSent != nil +} + +// The number of OSPFv2 Network (Type 2) LSAs transmitted. +// SetNetworkLsaSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetNetworkLsaSent(value uint64) Ospfv2Metric { + + obj.obj.NetworkLsaSent = &value + return obj +} + +// The number of OSPFv2 Network (Type 2) LSAs transmitted. +// NetworkLsaReceived returns a uint64 +func (obj *ospfv2Metric) NetworkLsaReceived() uint64 { + + return *obj.obj.NetworkLsaReceived + +} + +// The number of OSPFv2 Network (Type 2) LSAs transmitted. +// NetworkLsaReceived returns a uint64 +func (obj *ospfv2Metric) HasNetworkLsaReceived() bool { + return obj.obj.NetworkLsaReceived != nil +} + +// The number of OSPFv2 Network (Type 2) LSAs transmitted. +// SetNetworkLsaReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetNetworkLsaReceived(value uint64) Ospfv2Metric { + + obj.obj.NetworkLsaReceived = &value + return obj +} + +// The number of OSPFv2 Summary IP (Type 3) LSAs transmitted. +// SummaryLsaSent returns a uint64 +func (obj *ospfv2Metric) SummaryLsaSent() uint64 { + + return *obj.obj.SummaryLsaSent + +} + +// The number of OSPFv2 Summary IP (Type 3) LSAs transmitted. +// SummaryLsaSent returns a uint64 +func (obj *ospfv2Metric) HasSummaryLsaSent() bool { + return obj.obj.SummaryLsaSent != nil +} + +// The number of OSPFv2 Summary IP (Type 3) LSAs transmitted. +// SetSummaryLsaSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetSummaryLsaSent(value uint64) Ospfv2Metric { + + obj.obj.SummaryLsaSent = &value + return obj +} + +// The number of OSPFv2 Summary IP (Type 3) LSA received. +// SummaryLsaReceived returns a uint64 +func (obj *ospfv2Metric) SummaryLsaReceived() uint64 { + + return *obj.obj.SummaryLsaReceived + +} + +// The number of OSPFv2 Summary IP (Type 3) LSA received. +// SummaryLsaReceived returns a uint64 +func (obj *ospfv2Metric) HasSummaryLsaReceived() bool { + return obj.obj.SummaryLsaReceived != nil +} + +// The number of OSPFv2 Summary IP (Type 3) LSA received. +// SetSummaryLsaReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetSummaryLsaReceived(value uint64) Ospfv2Metric { + + obj.obj.SummaryLsaReceived = &value + return obj +} + +// The number of OSPFv2 External (Type 5) LSAs transmitted. +// ExternalLsaSent returns a uint64 +func (obj *ospfv2Metric) ExternalLsaSent() uint64 { + + return *obj.obj.ExternalLsaSent + +} + +// The number of OSPFv2 External (Type 5) LSAs transmitted. +// ExternalLsaSent returns a uint64 +func (obj *ospfv2Metric) HasExternalLsaSent() bool { + return obj.obj.ExternalLsaSent != nil +} + +// The number of OSPFv2 External (Type 5) LSAs transmitted. +// SetExternalLsaSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetExternalLsaSent(value uint64) Ospfv2Metric { + + obj.obj.ExternalLsaSent = &value + return obj +} + +// The number of OSPFv2 External (Type 5) LSAs received. +// ExternalLsaReceived returns a uint64 +func (obj *ospfv2Metric) ExternalLsaReceived() uint64 { + + return *obj.obj.ExternalLsaReceived + +} + +// The number of OSPFv2 External (Type 5) LSAs received. +// ExternalLsaReceived returns a uint64 +func (obj *ospfv2Metric) HasExternalLsaReceived() bool { + return obj.obj.ExternalLsaReceived != nil +} + +// The number of OSPFv2 External (Type 5) LSAs received. +// SetExternalLsaReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetExternalLsaReceived(value uint64) Ospfv2Metric { + + obj.obj.ExternalLsaReceived = &value + return obj +} + +// The number of OSPFv2 NSSA (Type 7) LSAs transmitted. +// NssaLsaSent returns a uint64 +func (obj *ospfv2Metric) NssaLsaSent() uint64 { + + return *obj.obj.NssaLsaSent + +} + +// The number of OSPFv2 NSSA (Type 7) LSAs transmitted. +// NssaLsaSent returns a uint64 +func (obj *ospfv2Metric) HasNssaLsaSent() bool { + return obj.obj.NssaLsaSent != nil +} + +// The number of OSPFv2 NSSA (Type 7) LSAs transmitted. +// SetNssaLsaSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetNssaLsaSent(value uint64) Ospfv2Metric { + + obj.obj.NssaLsaSent = &value + return obj +} + +// The number of OSPFv2 NSSA (Type 7) LSAs received. +// NssaLsaReceived returns a uint64 +func (obj *ospfv2Metric) NssaLsaReceived() uint64 { + + return *obj.obj.NssaLsaReceived + +} + +// The number of OSPFv2 NSSA (Type 7) LSAs received. +// NssaLsaReceived returns a uint64 +func (obj *ospfv2Metric) HasNssaLsaReceived() bool { + return obj.obj.NssaLsaReceived != nil +} + +// The number of OSPFv2 NSSA (Type 7) LSAs received. +// SetNssaLsaReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetNssaLsaReceived(value uint64) Ospfv2Metric { + + obj.obj.NssaLsaReceived = &value + return obj +} + +// The number of OSPFv2 Opaque Local (Type 9) LSAs transmitted. +// OpaqueLocalSent returns a uint64 +func (obj *ospfv2Metric) OpaqueLocalSent() uint64 { + + return *obj.obj.OpaqueLocalSent + +} + +// The number of OSPFv2 Opaque Local (Type 9) LSAs transmitted. +// OpaqueLocalSent returns a uint64 +func (obj *ospfv2Metric) HasOpaqueLocalSent() bool { + return obj.obj.OpaqueLocalSent != nil +} + +// The number of OSPFv2 Opaque Local (Type 9) LSAs transmitted. +// SetOpaqueLocalSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetOpaqueLocalSent(value uint64) Ospfv2Metric { + + obj.obj.OpaqueLocalSent = &value + return obj +} + +// The number of OSPFv2 Opaque Local (Type 9) LSAs received. +// OpaqueLocalReceived returns a uint64 +func (obj *ospfv2Metric) OpaqueLocalReceived() uint64 { + + return *obj.obj.OpaqueLocalReceived + +} + +// The number of OSPFv2 Opaque Local (Type 9) LSAs received. +// OpaqueLocalReceived returns a uint64 +func (obj *ospfv2Metric) HasOpaqueLocalReceived() bool { + return obj.obj.OpaqueLocalReceived != nil +} + +// The number of OSPFv2 Opaque Local (Type 9) LSAs received. +// SetOpaqueLocalReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetOpaqueLocalReceived(value uint64) Ospfv2Metric { + + obj.obj.OpaqueLocalReceived = &value + return obj +} + +// The number of OSPF Opaque Area (Type 10) LSAs transmitted. +// OpaqueAreaSent returns a uint64 +func (obj *ospfv2Metric) OpaqueAreaSent() uint64 { + + return *obj.obj.OpaqueAreaSent + +} + +// The number of OSPF Opaque Area (Type 10) LSAs transmitted. +// OpaqueAreaSent returns a uint64 +func (obj *ospfv2Metric) HasOpaqueAreaSent() bool { + return obj.obj.OpaqueAreaSent != nil +} + +// The number of OSPF Opaque Area (Type 10) LSAs transmitted. +// SetOpaqueAreaSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetOpaqueAreaSent(value uint64) Ospfv2Metric { + + obj.obj.OpaqueAreaSent = &value + return obj +} + +// The number of OSPFv2 Opaque Area (Type 10) LSAs received. +// OpaqueAreaReceived returns a uint64 +func (obj *ospfv2Metric) OpaqueAreaReceived() uint64 { + + return *obj.obj.OpaqueAreaReceived + +} + +// The number of OSPFv2 Opaque Area (Type 10) LSAs received. +// OpaqueAreaReceived returns a uint64 +func (obj *ospfv2Metric) HasOpaqueAreaReceived() bool { + return obj.obj.OpaqueAreaReceived != nil +} + +// The number of OSPFv2 Opaque Area (Type 10) LSAs received. +// SetOpaqueAreaReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetOpaqueAreaReceived(value uint64) Ospfv2Metric { + + obj.obj.OpaqueAreaReceived = &value + return obj +} + +// The number of OSPFv2 Opaque Domain (Type 11) LSAs transmitted. +// OpaqueDomainSent returns a uint64 +func (obj *ospfv2Metric) OpaqueDomainSent() uint64 { + + return *obj.obj.OpaqueDomainSent + +} + +// The number of OSPFv2 Opaque Domain (Type 11) LSAs transmitted. +// OpaqueDomainSent returns a uint64 +func (obj *ospfv2Metric) HasOpaqueDomainSent() bool { + return obj.obj.OpaqueDomainSent != nil +} + +// The number of OSPFv2 Opaque Domain (Type 11) LSAs transmitted. +// SetOpaqueDomainSent sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetOpaqueDomainSent(value uint64) Ospfv2Metric { + + obj.obj.OpaqueDomainSent = &value + return obj +} + +// The number of OSPFv2 Opaque Domain (Type 11) LSAs received. +// OpaqueDomainReceived returns a uint64 +func (obj *ospfv2Metric) OpaqueDomainReceived() uint64 { + + return *obj.obj.OpaqueDomainReceived + +} + +// The number of OSPFv2 Opaque Domain (Type 11) LSAs received. +// OpaqueDomainReceived returns a uint64 +func (obj *ospfv2Metric) HasOpaqueDomainReceived() bool { + return obj.obj.OpaqueDomainReceived != nil +} + +// The number of OSPFv2 Opaque Domain (Type 11) LSAs received. +// SetOpaqueDomainReceived sets the uint64 value in the Ospfv2Metric object +func (obj *ospfv2Metric) SetOpaqueDomainReceived(value uint64) Ospfv2Metric { + + obj.obj.OpaqueDomainReceived = &value + return obj +} + +func (obj *ospfv2Metric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *ospfv2Metric) setDefault() { + +} diff --git a/gosnappi/ospfv2_metrics_request.go b/gosnappi/ospfv2_metrics_request.go new file mode 100644 index 00000000..af116a56 --- /dev/null +++ b/gosnappi/ospfv2_metrics_request.go @@ -0,0 +1,418 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2MetricsRequest ***** +type ospfv2MetricsRequest struct { + validation + obj *otg.Ospfv2MetricsRequest + marshaller marshalOspfv2MetricsRequest + unMarshaller unMarshalOspfv2MetricsRequest +} + +func NewOspfv2MetricsRequest() Ospfv2MetricsRequest { + obj := ospfv2MetricsRequest{obj: &otg.Ospfv2MetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2MetricsRequest) msg() *otg.Ospfv2MetricsRequest { + return obj.obj +} + +func (obj *ospfv2MetricsRequest) setMsg(msg *otg.Ospfv2MetricsRequest) Ospfv2MetricsRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2MetricsRequest struct { + obj *ospfv2MetricsRequest +} + +type marshalOspfv2MetricsRequest interface { + // ToProto marshals Ospfv2MetricsRequest to protobuf object *otg.Ospfv2MetricsRequest + ToProto() (*otg.Ospfv2MetricsRequest, error) + // ToPbText marshals Ospfv2MetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2MetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2MetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2MetricsRequest struct { + obj *ospfv2MetricsRequest +} + +type unMarshalOspfv2MetricsRequest interface { + // FromProto unmarshals Ospfv2MetricsRequest from protobuf object *otg.Ospfv2MetricsRequest + FromProto(msg *otg.Ospfv2MetricsRequest) (Ospfv2MetricsRequest, error) + // FromPbText unmarshals Ospfv2MetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2MetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2MetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *ospfv2MetricsRequest) Marshal() marshalOspfv2MetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2MetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2MetricsRequest) Unmarshal() unMarshalOspfv2MetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2MetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2MetricsRequest) ToProto() (*otg.Ospfv2MetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2MetricsRequest) FromProto(msg *otg.Ospfv2MetricsRequest) (Ospfv2MetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2MetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2MetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2MetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2MetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2MetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2MetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2MetricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2MetricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2MetricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2MetricsRequest) Clone() (Ospfv2MetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2MetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Ospfv2MetricsRequest is the request to retrieve OSPFv2 per Router metrics/statistics. +type Ospfv2MetricsRequest interface { + Validation + // msg marshals Ospfv2MetricsRequest to protobuf object *otg.Ospfv2MetricsRequest + // and doesn't set defaults + msg() *otg.Ospfv2MetricsRequest + // setMsg unmarshals Ospfv2MetricsRequest from protobuf object *otg.Ospfv2MetricsRequest + // and doesn't set defaults + setMsg(*otg.Ospfv2MetricsRequest) Ospfv2MetricsRequest + // provides marshal interface + Marshal() marshalOspfv2MetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalOspfv2MetricsRequest + // validate validates Ospfv2MetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2MetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RouterNames returns []string, set in Ospfv2MetricsRequest. + RouterNames() []string + // SetRouterNames assigns []string provided by user to Ospfv2MetricsRequest + SetRouterNames(value []string) Ospfv2MetricsRequest + // ColumnNames returns []Ospfv2MetricsRequestColumnNamesEnum, set in Ospfv2MetricsRequest + ColumnNames() []Ospfv2MetricsRequestColumnNamesEnum + // SetColumnNames assigns []Ospfv2MetricsRequestColumnNamesEnum provided by user to Ospfv2MetricsRequest + SetColumnNames(value []Ospfv2MetricsRequestColumnNamesEnum) Ospfv2MetricsRequest +} + +// The names of OSPFv2 routers to return results for. An empty list will return results for all OSPFv2 router. +// +// x-constraint: +// - /components/schemas/Device.Ospfv2/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ospfv2/properties/name +// +// RouterNames returns a []string +func (obj *ospfv2MetricsRequest) RouterNames() []string { + if obj.obj.RouterNames == nil { + obj.obj.RouterNames = make([]string, 0) + } + return obj.obj.RouterNames +} + +// The names of OSPFv2 routers to return results for. An empty list will return results for all OSPFv2 router. +// +// x-constraint: +// - /components/schemas/Device.Ospfv2/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ospfv2/properties/name +// +// SetRouterNames sets the []string value in the Ospfv2MetricsRequest object +func (obj *ospfv2MetricsRequest) SetRouterNames(value []string) Ospfv2MetricsRequest { + + if obj.obj.RouterNames == nil { + obj.obj.RouterNames = make([]string, 0) + } + obj.obj.RouterNames = value + + return obj +} + +type Ospfv2MetricsRequestColumnNamesEnum string + +// Enum of ColumnNames on Ospfv2MetricsRequest +var Ospfv2MetricsRequestColumnNames = struct { + FULL_STATE_COUNT Ospfv2MetricsRequestColumnNamesEnum + DOWN_STATE_COUNT Ospfv2MetricsRequestColumnNamesEnum + SESSIONS_FLAP Ospfv2MetricsRequestColumnNamesEnum + HELLOS_SENT Ospfv2MetricsRequestColumnNamesEnum + HELLOS_RECEIVED Ospfv2MetricsRequestColumnNamesEnum + DBD_SENT Ospfv2MetricsRequestColumnNamesEnum + DBD_RECEIVED Ospfv2MetricsRequestColumnNamesEnum + LS_REQUEST_SENT Ospfv2MetricsRequestColumnNamesEnum + LS_REQUEST_RECEIVED Ospfv2MetricsRequestColumnNamesEnum + LS_UPDATE_SENT Ospfv2MetricsRequestColumnNamesEnum + LS_UPDATE_RECEIVED Ospfv2MetricsRequestColumnNamesEnum + LS_ACK_SENT Ospfv2MetricsRequestColumnNamesEnum + LS_ACK_RECEIVED Ospfv2MetricsRequestColumnNamesEnum + LSA_SENT Ospfv2MetricsRequestColumnNamesEnum + LSA_RECEIVED Ospfv2MetricsRequestColumnNamesEnum + LSA_ACK_SENT Ospfv2MetricsRequestColumnNamesEnum + LSA_ACK_RECEIVED Ospfv2MetricsRequestColumnNamesEnum + ROUTER_LSA_SENT Ospfv2MetricsRequestColumnNamesEnum + ROUTER_LSA_RECEIVED Ospfv2MetricsRequestColumnNamesEnum + NETWORK_LSA_SENT Ospfv2MetricsRequestColumnNamesEnum + NETWORK_LSA_RECEIVED Ospfv2MetricsRequestColumnNamesEnum + SUMMARY_LSA_SENT Ospfv2MetricsRequestColumnNamesEnum + SUMMARY_LSA_RECEIVED Ospfv2MetricsRequestColumnNamesEnum + EXTERNAL_LSA_SENT Ospfv2MetricsRequestColumnNamesEnum + EXTERNAL_LSA_RECEIVED Ospfv2MetricsRequestColumnNamesEnum + NSSA_LSA_SENT Ospfv2MetricsRequestColumnNamesEnum + NSSA_LSA_RECEIVED Ospfv2MetricsRequestColumnNamesEnum + OPAQUE_LOCAL_SENT Ospfv2MetricsRequestColumnNamesEnum + OPAQUE_LOCAL_RECEIVED Ospfv2MetricsRequestColumnNamesEnum + OPAQUE_AREA_SENT Ospfv2MetricsRequestColumnNamesEnum + OPAQUE_AREA_RECEIVED Ospfv2MetricsRequestColumnNamesEnum + OPAQUE_DOMAIN_SENT Ospfv2MetricsRequestColumnNamesEnum + OPAQUE_DOMAIN_RECEIVED Ospfv2MetricsRequestColumnNamesEnum +}{ + FULL_STATE_COUNT: Ospfv2MetricsRequestColumnNamesEnum("full_state_count"), + DOWN_STATE_COUNT: Ospfv2MetricsRequestColumnNamesEnum("down_state_count"), + SESSIONS_FLAP: Ospfv2MetricsRequestColumnNamesEnum("sessions_flap"), + HELLOS_SENT: Ospfv2MetricsRequestColumnNamesEnum("hellos_sent"), + HELLOS_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("hellos_received"), + DBD_SENT: Ospfv2MetricsRequestColumnNamesEnum("dbd_sent"), + DBD_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("dbd_received"), + LS_REQUEST_SENT: Ospfv2MetricsRequestColumnNamesEnum("ls_request_sent"), + LS_REQUEST_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("ls_request_received"), + LS_UPDATE_SENT: Ospfv2MetricsRequestColumnNamesEnum("ls_update_sent"), + LS_UPDATE_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("ls_update_received"), + LS_ACK_SENT: Ospfv2MetricsRequestColumnNamesEnum("ls_ack_sent"), + LS_ACK_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("ls_ack_received"), + LSA_SENT: Ospfv2MetricsRequestColumnNamesEnum("lsa_sent"), + LSA_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("lsa_received"), + LSA_ACK_SENT: Ospfv2MetricsRequestColumnNamesEnum("lsa_ack_sent"), + LSA_ACK_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("lsa_ack_received"), + ROUTER_LSA_SENT: Ospfv2MetricsRequestColumnNamesEnum("router_lsa_sent"), + ROUTER_LSA_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("router_lsa_received"), + NETWORK_LSA_SENT: Ospfv2MetricsRequestColumnNamesEnum("network_lsa_sent"), + NETWORK_LSA_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("network_lsa_received"), + SUMMARY_LSA_SENT: Ospfv2MetricsRequestColumnNamesEnum("summary_lsa_sent"), + SUMMARY_LSA_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("summary_lsa_received"), + EXTERNAL_LSA_SENT: Ospfv2MetricsRequestColumnNamesEnum("external_lsa_sent"), + EXTERNAL_LSA_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("external_lsa_received"), + NSSA_LSA_SENT: Ospfv2MetricsRequestColumnNamesEnum("nssa_lsa_sent"), + NSSA_LSA_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("nssa_lsa_received"), + OPAQUE_LOCAL_SENT: Ospfv2MetricsRequestColumnNamesEnum("opaque_local_sent"), + OPAQUE_LOCAL_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("opaque_local_received"), + OPAQUE_AREA_SENT: Ospfv2MetricsRequestColumnNamesEnum("opaque_area_sent"), + OPAQUE_AREA_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("opaque_area_received"), + OPAQUE_DOMAIN_SENT: Ospfv2MetricsRequestColumnNamesEnum("opaque_domain_sent"), + OPAQUE_DOMAIN_RECEIVED: Ospfv2MetricsRequestColumnNamesEnum("opaque_domain_received"), +} + +func (obj *ospfv2MetricsRequest) ColumnNames() []Ospfv2MetricsRequestColumnNamesEnum { + items := []Ospfv2MetricsRequestColumnNamesEnum{} + for _, item := range obj.obj.ColumnNames { + items = append(items, Ospfv2MetricsRequestColumnNamesEnum(item.String())) + } + return items +} + +// The list of column names that the returned result set will contain. +// If the list is empty then all columns will be returned except for +// any result_groups. +// The name of the OSPFv2 Router cannot be excluded. +// SetColumnNames sets the []string value in the Ospfv2MetricsRequest object +func (obj *ospfv2MetricsRequest) SetColumnNames(value []Ospfv2MetricsRequestColumnNamesEnum) Ospfv2MetricsRequest { + + items := []otg.Ospfv2MetricsRequest_ColumnNames_Enum{} + for _, item := range value { + intValue := otg.Ospfv2MetricsRequest_ColumnNames_Enum_value[string(item)] + items = append(items, otg.Ospfv2MetricsRequest_ColumnNames_Enum(intValue)) + } + obj.obj.ColumnNames = items + return obj +} + +func (obj *ospfv2MetricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *ospfv2MetricsRequest) setDefault() { + +} diff --git a/gosnappi/ospfv2_network_lsa.go b/gosnappi/ospfv2_network_lsa.go new file mode 100644 index 00000000..333884f1 --- /dev/null +++ b/gosnappi/ospfv2_network_lsa.go @@ -0,0 +1,399 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2NetworkLsa ***** +type ospfv2NetworkLsa struct { + validation + obj *otg.Ospfv2NetworkLsa + marshaller marshalOspfv2NetworkLsa + unMarshaller unMarshalOspfv2NetworkLsa + headerHolder Ospfv2LsaHeader +} + +func NewOspfv2NetworkLsa() Ospfv2NetworkLsa { + obj := ospfv2NetworkLsa{obj: &otg.Ospfv2NetworkLsa{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2NetworkLsa) msg() *otg.Ospfv2NetworkLsa { + return obj.obj +} + +func (obj *ospfv2NetworkLsa) setMsg(msg *otg.Ospfv2NetworkLsa) Ospfv2NetworkLsa { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2NetworkLsa struct { + obj *ospfv2NetworkLsa +} + +type marshalOspfv2NetworkLsa interface { + // ToProto marshals Ospfv2NetworkLsa to protobuf object *otg.Ospfv2NetworkLsa + ToProto() (*otg.Ospfv2NetworkLsa, error) + // ToPbText marshals Ospfv2NetworkLsa to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2NetworkLsa to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2NetworkLsa to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2NetworkLsa struct { + obj *ospfv2NetworkLsa +} + +type unMarshalOspfv2NetworkLsa interface { + // FromProto unmarshals Ospfv2NetworkLsa from protobuf object *otg.Ospfv2NetworkLsa + FromProto(msg *otg.Ospfv2NetworkLsa) (Ospfv2NetworkLsa, error) + // FromPbText unmarshals Ospfv2NetworkLsa from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2NetworkLsa from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2NetworkLsa from JSON text + FromJson(value string) error +} + +func (obj *ospfv2NetworkLsa) Marshal() marshalOspfv2NetworkLsa { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2NetworkLsa{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2NetworkLsa) Unmarshal() unMarshalOspfv2NetworkLsa { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2NetworkLsa{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2NetworkLsa) ToProto() (*otg.Ospfv2NetworkLsa, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2NetworkLsa) FromProto(msg *otg.Ospfv2NetworkLsa) (Ospfv2NetworkLsa, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2NetworkLsa) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2NetworkLsa) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2NetworkLsa) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2NetworkLsa) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2NetworkLsa) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2NetworkLsa) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2NetworkLsa) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2NetworkLsa) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2NetworkLsa) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2NetworkLsa) Clone() (Ospfv2NetworkLsa, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2NetworkLsa() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2NetworkLsa) setNil() { + obj.headerHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2NetworkLsa is contents of the Network LSA. +type Ospfv2NetworkLsa interface { + Validation + // msg marshals Ospfv2NetworkLsa to protobuf object *otg.Ospfv2NetworkLsa + // and doesn't set defaults + msg() *otg.Ospfv2NetworkLsa + // setMsg unmarshals Ospfv2NetworkLsa from protobuf object *otg.Ospfv2NetworkLsa + // and doesn't set defaults + setMsg(*otg.Ospfv2NetworkLsa) Ospfv2NetworkLsa + // provides marshal interface + Marshal() marshalOspfv2NetworkLsa + // provides unmarshal interface + Unmarshal() unMarshalOspfv2NetworkLsa + // validate validates Ospfv2NetworkLsa + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2NetworkLsa, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Header returns Ospfv2LsaHeader, set in Ospfv2NetworkLsa. + // Ospfv2LsaHeader is attributes in LSA Header. + Header() Ospfv2LsaHeader + // SetHeader assigns Ospfv2LsaHeader provided by user to Ospfv2NetworkLsa. + // Ospfv2LsaHeader is attributes in LSA Header. + SetHeader(value Ospfv2LsaHeader) Ospfv2NetworkLsa + // HasHeader checks if Header has been set in Ospfv2NetworkLsa + HasHeader() bool + // NetworkMask returns string, set in Ospfv2NetworkLsa. + NetworkMask() string + // SetNetworkMask assigns string provided by user to Ospfv2NetworkLsa + SetNetworkMask(value string) Ospfv2NetworkLsa + // HasNetworkMask checks if NetworkMask has been set in Ospfv2NetworkLsa + HasNetworkMask() bool + // NeighborRouterIds returns []string, set in Ospfv2NetworkLsa. + NeighborRouterIds() []string + // SetNeighborRouterIds assigns []string provided by user to Ospfv2NetworkLsa + SetNeighborRouterIds(value []string) Ospfv2NetworkLsa + setNil() +} + +// Contents of the LSA header. +// Header returns a Ospfv2LsaHeader +func (obj *ospfv2NetworkLsa) Header() Ospfv2LsaHeader { + if obj.obj.Header == nil { + obj.obj.Header = NewOspfv2LsaHeader().msg() + } + if obj.headerHolder == nil { + obj.headerHolder = &ospfv2LsaHeader{obj: obj.obj.Header} + } + return obj.headerHolder +} + +// Contents of the LSA header. +// Header returns a Ospfv2LsaHeader +func (obj *ospfv2NetworkLsa) HasHeader() bool { + return obj.obj.Header != nil +} + +// Contents of the LSA header. +// SetHeader sets the Ospfv2LsaHeader value in the Ospfv2NetworkLsa object +func (obj *ospfv2NetworkLsa) SetHeader(value Ospfv2LsaHeader) Ospfv2NetworkLsa { + + obj.headerHolder = nil + obj.obj.Header = value.msg() + + return obj +} + +// The IPv4 address mask for the network. +// NetworkMask returns a string +func (obj *ospfv2NetworkLsa) NetworkMask() string { + + return *obj.obj.NetworkMask + +} + +// The IPv4 address mask for the network. +// NetworkMask returns a string +func (obj *ospfv2NetworkLsa) HasNetworkMask() bool { + return obj.obj.NetworkMask != nil +} + +// The IPv4 address mask for the network. +// SetNetworkMask sets the string value in the Ospfv2NetworkLsa object +func (obj *ospfv2NetworkLsa) SetNetworkMask(value string) Ospfv2NetworkLsa { + + obj.obj.NetworkMask = &value + return obj +} + +// Neighbor router ids that are described within the LSA. +// NeighborRouterIds returns a []string +func (obj *ospfv2NetworkLsa) NeighborRouterIds() []string { + if obj.obj.NeighborRouterIds == nil { + obj.obj.NeighborRouterIds = make([]string, 0) + } + return obj.obj.NeighborRouterIds +} + +// Neighbor router ids that are described within the LSA. +// SetNeighborRouterIds sets the []string value in the Ospfv2NetworkLsa object +func (obj *ospfv2NetworkLsa) SetNeighborRouterIds(value []string) Ospfv2NetworkLsa { + + if obj.obj.NeighborRouterIds == nil { + obj.obj.NeighborRouterIds = make([]string, 0) + } + obj.obj.NeighborRouterIds = value + + return obj +} + +func (obj *ospfv2NetworkLsa) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Header != nil { + + obj.Header().validateObj(vObj, set_default) + } + + if obj.obj.NetworkMask != nil { + + err := obj.validateIpv4(obj.NetworkMask()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Ospfv2NetworkLsa.NetworkMask")) + } + + } + + if obj.obj.NeighborRouterIds != nil { + + err := obj.validateIpv4Slice(obj.NeighborRouterIds()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Ospfv2NetworkLsa.NeighborRouterIds")) + } + + } + +} + +func (obj *ospfv2NetworkLsa) setDefault() { + +} diff --git a/gosnappi/ospfv2_network_summary_lsa.go b/gosnappi/ospfv2_network_summary_lsa.go new file mode 100644 index 00000000..2479c4e0 --- /dev/null +++ b/gosnappi/ospfv2_network_summary_lsa.go @@ -0,0 +1,394 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2NetworkSummaryLsa ***** +type ospfv2NetworkSummaryLsa struct { + validation + obj *otg.Ospfv2NetworkSummaryLsa + marshaller marshalOspfv2NetworkSummaryLsa + unMarshaller unMarshalOspfv2NetworkSummaryLsa + headerHolder Ospfv2LsaHeader +} + +func NewOspfv2NetworkSummaryLsa() Ospfv2NetworkSummaryLsa { + obj := ospfv2NetworkSummaryLsa{obj: &otg.Ospfv2NetworkSummaryLsa{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2NetworkSummaryLsa) msg() *otg.Ospfv2NetworkSummaryLsa { + return obj.obj +} + +func (obj *ospfv2NetworkSummaryLsa) setMsg(msg *otg.Ospfv2NetworkSummaryLsa) Ospfv2NetworkSummaryLsa { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2NetworkSummaryLsa struct { + obj *ospfv2NetworkSummaryLsa +} + +type marshalOspfv2NetworkSummaryLsa interface { + // ToProto marshals Ospfv2NetworkSummaryLsa to protobuf object *otg.Ospfv2NetworkSummaryLsa + ToProto() (*otg.Ospfv2NetworkSummaryLsa, error) + // ToPbText marshals Ospfv2NetworkSummaryLsa to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2NetworkSummaryLsa to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2NetworkSummaryLsa to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2NetworkSummaryLsa struct { + obj *ospfv2NetworkSummaryLsa +} + +type unMarshalOspfv2NetworkSummaryLsa interface { + // FromProto unmarshals Ospfv2NetworkSummaryLsa from protobuf object *otg.Ospfv2NetworkSummaryLsa + FromProto(msg *otg.Ospfv2NetworkSummaryLsa) (Ospfv2NetworkSummaryLsa, error) + // FromPbText unmarshals Ospfv2NetworkSummaryLsa from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2NetworkSummaryLsa from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2NetworkSummaryLsa from JSON text + FromJson(value string) error +} + +func (obj *ospfv2NetworkSummaryLsa) Marshal() marshalOspfv2NetworkSummaryLsa { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2NetworkSummaryLsa{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2NetworkSummaryLsa) Unmarshal() unMarshalOspfv2NetworkSummaryLsa { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2NetworkSummaryLsa{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2NetworkSummaryLsa) ToProto() (*otg.Ospfv2NetworkSummaryLsa, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2NetworkSummaryLsa) FromProto(msg *otg.Ospfv2NetworkSummaryLsa) (Ospfv2NetworkSummaryLsa, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2NetworkSummaryLsa) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2NetworkSummaryLsa) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2NetworkSummaryLsa) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2NetworkSummaryLsa) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2NetworkSummaryLsa) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2NetworkSummaryLsa) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2NetworkSummaryLsa) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2NetworkSummaryLsa) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2NetworkSummaryLsa) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2NetworkSummaryLsa) Clone() (Ospfv2NetworkSummaryLsa, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2NetworkSummaryLsa() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2NetworkSummaryLsa) setNil() { + obj.headerHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2NetworkSummaryLsa is contents of the Network Summary LSA - Type 3. +// The value of the IPv4 prefix that was received is present in header.lsa_id. +type Ospfv2NetworkSummaryLsa interface { + Validation + // msg marshals Ospfv2NetworkSummaryLsa to protobuf object *otg.Ospfv2NetworkSummaryLsa + // and doesn't set defaults + msg() *otg.Ospfv2NetworkSummaryLsa + // setMsg unmarshals Ospfv2NetworkSummaryLsa from protobuf object *otg.Ospfv2NetworkSummaryLsa + // and doesn't set defaults + setMsg(*otg.Ospfv2NetworkSummaryLsa) Ospfv2NetworkSummaryLsa + // provides marshal interface + Marshal() marshalOspfv2NetworkSummaryLsa + // provides unmarshal interface + Unmarshal() unMarshalOspfv2NetworkSummaryLsa + // validate validates Ospfv2NetworkSummaryLsa + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2NetworkSummaryLsa, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Header returns Ospfv2LsaHeader, set in Ospfv2NetworkSummaryLsa. + // Ospfv2LsaHeader is attributes in LSA Header. + Header() Ospfv2LsaHeader + // SetHeader assigns Ospfv2LsaHeader provided by user to Ospfv2NetworkSummaryLsa. + // Ospfv2LsaHeader is attributes in LSA Header. + SetHeader(value Ospfv2LsaHeader) Ospfv2NetworkSummaryLsa + // HasHeader checks if Header has been set in Ospfv2NetworkSummaryLsa + HasHeader() bool + // NetworkMask returns string, set in Ospfv2NetworkSummaryLsa. + NetworkMask() string + // SetNetworkMask assigns string provided by user to Ospfv2NetworkSummaryLsa + SetNetworkMask(value string) Ospfv2NetworkSummaryLsa + // HasNetworkMask checks if NetworkMask has been set in Ospfv2NetworkSummaryLsa + HasNetworkMask() bool + // Metric returns uint32, set in Ospfv2NetworkSummaryLsa. + Metric() uint32 + // SetMetric assigns uint32 provided by user to Ospfv2NetworkSummaryLsa + SetMetric(value uint32) Ospfv2NetworkSummaryLsa + // HasMetric checks if Metric has been set in Ospfv2NetworkSummaryLsa + HasMetric() bool + setNil() +} + +// Contents of the LSA header. +// Header returns a Ospfv2LsaHeader +func (obj *ospfv2NetworkSummaryLsa) Header() Ospfv2LsaHeader { + if obj.obj.Header == nil { + obj.obj.Header = NewOspfv2LsaHeader().msg() + } + if obj.headerHolder == nil { + obj.headerHolder = &ospfv2LsaHeader{obj: obj.obj.Header} + } + return obj.headerHolder +} + +// Contents of the LSA header. +// Header returns a Ospfv2LsaHeader +func (obj *ospfv2NetworkSummaryLsa) HasHeader() bool { + return obj.obj.Header != nil +} + +// Contents of the LSA header. +// SetHeader sets the Ospfv2LsaHeader value in the Ospfv2NetworkSummaryLsa object +func (obj *ospfv2NetworkSummaryLsa) SetHeader(value Ospfv2LsaHeader) Ospfv2NetworkSummaryLsa { + + obj.headerHolder = nil + obj.obj.Header = value.msg() + + return obj +} + +// The IPv4 address mask for the network. +// NetworkMask returns a string +func (obj *ospfv2NetworkSummaryLsa) NetworkMask() string { + + return *obj.obj.NetworkMask + +} + +// The IPv4 address mask for the network. +// NetworkMask returns a string +func (obj *ospfv2NetworkSummaryLsa) HasNetworkMask() bool { + return obj.obj.NetworkMask != nil +} + +// The IPv4 address mask for the network. +// SetNetworkMask sets the string value in the Ospfv2NetworkSummaryLsa object +func (obj *ospfv2NetworkSummaryLsa) SetNetworkMask(value string) Ospfv2NetworkSummaryLsa { + + obj.obj.NetworkMask = &value + return obj +} + +// The cost of the summary route TOS level 0 and all unspecified levels. +// Metric returns a uint32 +func (obj *ospfv2NetworkSummaryLsa) Metric() uint32 { + + return *obj.obj.Metric + +} + +// The cost of the summary route TOS level 0 and all unspecified levels. +// Metric returns a uint32 +func (obj *ospfv2NetworkSummaryLsa) HasMetric() bool { + return obj.obj.Metric != nil +} + +// The cost of the summary route TOS level 0 and all unspecified levels. +// SetMetric sets the uint32 value in the Ospfv2NetworkSummaryLsa object +func (obj *ospfv2NetworkSummaryLsa) SetMetric(value uint32) Ospfv2NetworkSummaryLsa { + + obj.obj.Metric = &value + return obj +} + +func (obj *ospfv2NetworkSummaryLsa) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Header != nil { + + obj.Header().validateObj(vObj, set_default) + } + + if obj.obj.NetworkMask != nil { + + err := obj.validateIpv4(obj.NetworkMask()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Ospfv2NetworkSummaryLsa.NetworkMask")) + } + + } + +} + +func (obj *ospfv2NetworkSummaryLsa) setDefault() { + +} diff --git a/gosnappi/ospfv2_nssa_lsa.go b/gosnappi/ospfv2_nssa_lsa.go new file mode 100644 index 00000000..e1d494c3 --- /dev/null +++ b/gosnappi/ospfv2_nssa_lsa.go @@ -0,0 +1,459 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2NssaLsa ***** +type ospfv2NssaLsa struct { + validation + obj *otg.Ospfv2NssaLsa + marshaller marshalOspfv2NssaLsa + unMarshaller unMarshalOspfv2NssaLsa + headerHolder Ospfv2LsaHeader +} + +func NewOspfv2NssaLsa() Ospfv2NssaLsa { + obj := ospfv2NssaLsa{obj: &otg.Ospfv2NssaLsa{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2NssaLsa) msg() *otg.Ospfv2NssaLsa { + return obj.obj +} + +func (obj *ospfv2NssaLsa) setMsg(msg *otg.Ospfv2NssaLsa) Ospfv2NssaLsa { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2NssaLsa struct { + obj *ospfv2NssaLsa +} + +type marshalOspfv2NssaLsa interface { + // ToProto marshals Ospfv2NssaLsa to protobuf object *otg.Ospfv2NssaLsa + ToProto() (*otg.Ospfv2NssaLsa, error) + // ToPbText marshals Ospfv2NssaLsa to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2NssaLsa to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2NssaLsa to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2NssaLsa struct { + obj *ospfv2NssaLsa +} + +type unMarshalOspfv2NssaLsa interface { + // FromProto unmarshals Ospfv2NssaLsa from protobuf object *otg.Ospfv2NssaLsa + FromProto(msg *otg.Ospfv2NssaLsa) (Ospfv2NssaLsa, error) + // FromPbText unmarshals Ospfv2NssaLsa from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2NssaLsa from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2NssaLsa from JSON text + FromJson(value string) error +} + +func (obj *ospfv2NssaLsa) Marshal() marshalOspfv2NssaLsa { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2NssaLsa{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2NssaLsa) Unmarshal() unMarshalOspfv2NssaLsa { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2NssaLsa{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2NssaLsa) ToProto() (*otg.Ospfv2NssaLsa, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2NssaLsa) FromProto(msg *otg.Ospfv2NssaLsa) (Ospfv2NssaLsa, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2NssaLsa) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2NssaLsa) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2NssaLsa) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2NssaLsa) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2NssaLsa) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2NssaLsa) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2NssaLsa) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2NssaLsa) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2NssaLsa) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2NssaLsa) Clone() (Ospfv2NssaLsa, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2NssaLsa() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2NssaLsa) setNil() { + obj.headerHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2NssaLsa is contents of OSPFv2 NSSA LSA - Type 7. +// The value of the IPv4 prefix that was received is present in header.lsa_id. +type Ospfv2NssaLsa interface { + Validation + // msg marshals Ospfv2NssaLsa to protobuf object *otg.Ospfv2NssaLsa + // and doesn't set defaults + msg() *otg.Ospfv2NssaLsa + // setMsg unmarshals Ospfv2NssaLsa from protobuf object *otg.Ospfv2NssaLsa + // and doesn't set defaults + setMsg(*otg.Ospfv2NssaLsa) Ospfv2NssaLsa + // provides marshal interface + Marshal() marshalOspfv2NssaLsa + // provides unmarshal interface + Unmarshal() unMarshalOspfv2NssaLsa + // validate validates Ospfv2NssaLsa + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2NssaLsa, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Header returns Ospfv2LsaHeader, set in Ospfv2NssaLsa. + // Ospfv2LsaHeader is attributes in LSA Header. + Header() Ospfv2LsaHeader + // SetHeader assigns Ospfv2LsaHeader provided by user to Ospfv2NssaLsa. + // Ospfv2LsaHeader is attributes in LSA Header. + SetHeader(value Ospfv2LsaHeader) Ospfv2NssaLsa + // HasHeader checks if Header has been set in Ospfv2NssaLsa + HasHeader() bool + // NetworkMask returns string, set in Ospfv2NssaLsa. + NetworkMask() string + // SetNetworkMask assigns string provided by user to Ospfv2NssaLsa + SetNetworkMask(value string) Ospfv2NssaLsa + // HasNetworkMask checks if NetworkMask has been set in Ospfv2NssaLsa + HasNetworkMask() bool + // Metric returns uint32, set in Ospfv2NssaLsa. + Metric() uint32 + // SetMetric assigns uint32 provided by user to Ospfv2NssaLsa + SetMetric(value uint32) Ospfv2NssaLsa + // HasMetric checks if Metric has been set in Ospfv2NssaLsa + HasMetric() bool + // MetricType returns uint32, set in Ospfv2NssaLsa. + MetricType() uint32 + // SetMetricType assigns uint32 provided by user to Ospfv2NssaLsa + SetMetricType(value uint32) Ospfv2NssaLsa + // HasMetricType checks if MetricType has been set in Ospfv2NssaLsa + HasMetricType() bool + // ForwardingAddress returns string, set in Ospfv2NssaLsa. + ForwardingAddress() string + // SetForwardingAddress assigns string provided by user to Ospfv2NssaLsa + SetForwardingAddress(value string) Ospfv2NssaLsa + // HasForwardingAddress checks if ForwardingAddress has been set in Ospfv2NssaLsa + HasForwardingAddress() bool + setNil() +} + +// Contents of the LSA header. +// Header returns a Ospfv2LsaHeader +func (obj *ospfv2NssaLsa) Header() Ospfv2LsaHeader { + if obj.obj.Header == nil { + obj.obj.Header = NewOspfv2LsaHeader().msg() + } + if obj.headerHolder == nil { + obj.headerHolder = &ospfv2LsaHeader{obj: obj.obj.Header} + } + return obj.headerHolder +} + +// Contents of the LSA header. +// Header returns a Ospfv2LsaHeader +func (obj *ospfv2NssaLsa) HasHeader() bool { + return obj.obj.Header != nil +} + +// Contents of the LSA header. +// SetHeader sets the Ospfv2LsaHeader value in the Ospfv2NssaLsa object +func (obj *ospfv2NssaLsa) SetHeader(value Ospfv2LsaHeader) Ospfv2NssaLsa { + + obj.headerHolder = nil + obj.obj.Header = value.msg() + + return obj +} + +// The IPv4 address mask for the network. +// NetworkMask returns a string +func (obj *ospfv2NssaLsa) NetworkMask() string { + + return *obj.obj.NetworkMask + +} + +// The IPv4 address mask for the network. +// NetworkMask returns a string +func (obj *ospfv2NssaLsa) HasNetworkMask() bool { + return obj.obj.NetworkMask != nil +} + +// The IPv4 address mask for the network. +// SetNetworkMask sets the string value in the Ospfv2NssaLsa object +func (obj *ospfv2NssaLsa) SetNetworkMask(value string) Ospfv2NssaLsa { + + obj.obj.NetworkMask = &value + return obj +} + +// The cost of the summary route TOS level 0 and all unspecified levels. +// Metric returns a uint32 +func (obj *ospfv2NssaLsa) Metric() uint32 { + + return *obj.obj.Metric + +} + +// The cost of the summary route TOS level 0 and all unspecified levels. +// Metric returns a uint32 +func (obj *ospfv2NssaLsa) HasMetric() bool { + return obj.obj.Metric != nil +} + +// The cost of the summary route TOS level 0 and all unspecified levels. +// SetMetric sets the uint32 value in the Ospfv2NssaLsa object +func (obj *ospfv2NssaLsa) SetMetric(value uint32) Ospfv2NssaLsa { + + obj.obj.Metric = &value + return obj +} + +// The type of metric associated with the route range. +// MetricType returns a uint32 +func (obj *ospfv2NssaLsa) MetricType() uint32 { + + return *obj.obj.MetricType + +} + +// The type of metric associated with the route range. +// MetricType returns a uint32 +func (obj *ospfv2NssaLsa) HasMetricType() bool { + return obj.obj.MetricType != nil +} + +// The type of metric associated with the route range. +// SetMetricType sets the uint32 value in the Ospfv2NssaLsa object +func (obj *ospfv2NssaLsa) SetMetricType(value uint32) Ospfv2NssaLsa { + + obj.obj.MetricType = &value + return obj +} + +// IPv4 Forwarding address. +// ForwardingAddress returns a string +func (obj *ospfv2NssaLsa) ForwardingAddress() string { + + return *obj.obj.ForwardingAddress + +} + +// IPv4 Forwarding address. +// ForwardingAddress returns a string +func (obj *ospfv2NssaLsa) HasForwardingAddress() bool { + return obj.obj.ForwardingAddress != nil +} + +// IPv4 Forwarding address. +// SetForwardingAddress sets the string value in the Ospfv2NssaLsa object +func (obj *ospfv2NssaLsa) SetForwardingAddress(value string) Ospfv2NssaLsa { + + obj.obj.ForwardingAddress = &value + return obj +} + +func (obj *ospfv2NssaLsa) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Header != nil { + + obj.Header().validateObj(vObj, set_default) + } + + if obj.obj.NetworkMask != nil { + + err := obj.validateIpv4(obj.NetworkMask()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Ospfv2NssaLsa.NetworkMask")) + } + + } + + if obj.obj.ForwardingAddress != nil { + + err := obj.validateIpv4(obj.ForwardingAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Ospfv2NssaLsa.ForwardingAddress")) + } + + } + +} + +func (obj *ospfv2NssaLsa) setDefault() { + +} diff --git a/gosnappi/ospfv2_opaque_lsa.go b/gosnappi/ospfv2_opaque_lsa.go new file mode 100644 index 00000000..6934137c --- /dev/null +++ b/gosnappi/ospfv2_opaque_lsa.go @@ -0,0 +1,370 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2OpaqueLsa ***** +type ospfv2OpaqueLsa struct { + validation + obj *otg.Ospfv2OpaqueLsa + marshaller marshalOspfv2OpaqueLsa + unMarshaller unMarshalOspfv2OpaqueLsa + headerHolder Ospfv2LsaHeader +} + +func NewOspfv2OpaqueLsa() Ospfv2OpaqueLsa { + obj := ospfv2OpaqueLsa{obj: &otg.Ospfv2OpaqueLsa{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2OpaqueLsa) msg() *otg.Ospfv2OpaqueLsa { + return obj.obj +} + +func (obj *ospfv2OpaqueLsa) setMsg(msg *otg.Ospfv2OpaqueLsa) Ospfv2OpaqueLsa { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2OpaqueLsa struct { + obj *ospfv2OpaqueLsa +} + +type marshalOspfv2OpaqueLsa interface { + // ToProto marshals Ospfv2OpaqueLsa to protobuf object *otg.Ospfv2OpaqueLsa + ToProto() (*otg.Ospfv2OpaqueLsa, error) + // ToPbText marshals Ospfv2OpaqueLsa to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2OpaqueLsa to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2OpaqueLsa to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2OpaqueLsa struct { + obj *ospfv2OpaqueLsa +} + +type unMarshalOspfv2OpaqueLsa interface { + // FromProto unmarshals Ospfv2OpaqueLsa from protobuf object *otg.Ospfv2OpaqueLsa + FromProto(msg *otg.Ospfv2OpaqueLsa) (Ospfv2OpaqueLsa, error) + // FromPbText unmarshals Ospfv2OpaqueLsa from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2OpaqueLsa from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2OpaqueLsa from JSON text + FromJson(value string) error +} + +func (obj *ospfv2OpaqueLsa) Marshal() marshalOspfv2OpaqueLsa { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2OpaqueLsa{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2OpaqueLsa) Unmarshal() unMarshalOspfv2OpaqueLsa { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2OpaqueLsa{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2OpaqueLsa) ToProto() (*otg.Ospfv2OpaqueLsa, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2OpaqueLsa) FromProto(msg *otg.Ospfv2OpaqueLsa) (Ospfv2OpaqueLsa, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2OpaqueLsa) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2OpaqueLsa) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2OpaqueLsa) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2OpaqueLsa) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2OpaqueLsa) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2OpaqueLsa) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2OpaqueLsa) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2OpaqueLsa) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2OpaqueLsa) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2OpaqueLsa) Clone() (Ospfv2OpaqueLsa, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2OpaqueLsa() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2OpaqueLsa) setNil() { + obj.headerHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2OpaqueLsa is contents of OSPFv2 Opaque LSA - Type 7. +type Ospfv2OpaqueLsa interface { + Validation + // msg marshals Ospfv2OpaqueLsa to protobuf object *otg.Ospfv2OpaqueLsa + // and doesn't set defaults + msg() *otg.Ospfv2OpaqueLsa + // setMsg unmarshals Ospfv2OpaqueLsa from protobuf object *otg.Ospfv2OpaqueLsa + // and doesn't set defaults + setMsg(*otg.Ospfv2OpaqueLsa) Ospfv2OpaqueLsa + // provides marshal interface + Marshal() marshalOspfv2OpaqueLsa + // provides unmarshal interface + Unmarshal() unMarshalOspfv2OpaqueLsa + // validate validates Ospfv2OpaqueLsa + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2OpaqueLsa, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Header returns Ospfv2LsaHeader, set in Ospfv2OpaqueLsa. + // Ospfv2LsaHeader is attributes in LSA Header. + Header() Ospfv2LsaHeader + // SetHeader assigns Ospfv2LsaHeader provided by user to Ospfv2OpaqueLsa. + // Ospfv2LsaHeader is attributes in LSA Header. + SetHeader(value Ospfv2LsaHeader) Ospfv2OpaqueLsa + // HasHeader checks if Header has been set in Ospfv2OpaqueLsa + HasHeader() bool + // Type returns Ospfv2OpaqueLsaTypeEnum, set in Ospfv2OpaqueLsa + Type() Ospfv2OpaqueLsaTypeEnum + // SetType assigns Ospfv2OpaqueLsaTypeEnum provided by user to Ospfv2OpaqueLsa + SetType(value Ospfv2OpaqueLsaTypeEnum) Ospfv2OpaqueLsa + // HasType checks if Type has been set in Ospfv2OpaqueLsa + HasType() bool + setNil() +} + +// Contents of the LSA header. +// Header returns a Ospfv2LsaHeader +func (obj *ospfv2OpaqueLsa) Header() Ospfv2LsaHeader { + if obj.obj.Header == nil { + obj.obj.Header = NewOspfv2LsaHeader().msg() + } + if obj.headerHolder == nil { + obj.headerHolder = &ospfv2LsaHeader{obj: obj.obj.Header} + } + return obj.headerHolder +} + +// Contents of the LSA header. +// Header returns a Ospfv2LsaHeader +func (obj *ospfv2OpaqueLsa) HasHeader() bool { + return obj.obj.Header != nil +} + +// Contents of the LSA header. +// SetHeader sets the Ospfv2LsaHeader value in the Ospfv2OpaqueLsa object +func (obj *ospfv2OpaqueLsa) SetHeader(value Ospfv2LsaHeader) Ospfv2OpaqueLsa { + + obj.headerHolder = nil + obj.obj.Header = value.msg() + + return obj +} + +type Ospfv2OpaqueLsaTypeEnum string + +// Enum of Type on Ospfv2OpaqueLsa +var Ospfv2OpaqueLsaType = struct { + LOCAL Ospfv2OpaqueLsaTypeEnum + AREA Ospfv2OpaqueLsaTypeEnum + DOMAIN Ospfv2OpaqueLsaTypeEnum +}{ + LOCAL: Ospfv2OpaqueLsaTypeEnum("local"), + AREA: Ospfv2OpaqueLsaTypeEnum("area"), + DOMAIN: Ospfv2OpaqueLsaTypeEnum("domain"), +} + +func (obj *ospfv2OpaqueLsa) Type() Ospfv2OpaqueLsaTypeEnum { + return Ospfv2OpaqueLsaTypeEnum(obj.obj.Type.Enum().String()) +} + +// The type of Opaque TE LSAs. The LSA type. +// Type returns a string +func (obj *ospfv2OpaqueLsa) HasType() bool { + return obj.obj.Type != nil +} + +func (obj *ospfv2OpaqueLsa) SetType(value Ospfv2OpaqueLsaTypeEnum) Ospfv2OpaqueLsa { + intValue, ok := otg.Ospfv2OpaqueLsa_Type_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Ospfv2OpaqueLsaTypeEnum", string(value))) + return obj + } + enumValue := otg.Ospfv2OpaqueLsa_Type_Enum(intValue) + obj.obj.Type = &enumValue + + return obj +} + +func (obj *ospfv2OpaqueLsa) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Header != nil { + + obj.Header().validateObj(vObj, set_default) + } + +} + +func (obj *ospfv2OpaqueLsa) setDefault() { + +} diff --git a/gosnappi/ospfv2_options.go b/gosnappi/ospfv2_options.go new file mode 100644 index 00000000..89add3e8 --- /dev/null +++ b/gosnappi/ospfv2_options.go @@ -0,0 +1,594 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2Options ***** +type ospfv2Options struct { + validation + obj *otg.Ospfv2Options + marshaller marshalOspfv2Options + unMarshaller unMarshalOspfv2Options +} + +func NewOspfv2Options() Ospfv2Options { + obj := ospfv2Options{obj: &otg.Ospfv2Options{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2Options) msg() *otg.Ospfv2Options { + return obj.obj +} + +func (obj *ospfv2Options) setMsg(msg *otg.Ospfv2Options) Ospfv2Options { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2Options struct { + obj *ospfv2Options +} + +type marshalOspfv2Options interface { + // ToProto marshals Ospfv2Options to protobuf object *otg.Ospfv2Options + ToProto() (*otg.Ospfv2Options, error) + // ToPbText marshals Ospfv2Options to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2Options to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2Options to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2Options struct { + obj *ospfv2Options +} + +type unMarshalOspfv2Options interface { + // FromProto unmarshals Ospfv2Options from protobuf object *otg.Ospfv2Options + FromProto(msg *otg.Ospfv2Options) (Ospfv2Options, error) + // FromPbText unmarshals Ospfv2Options from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2Options from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2Options from JSON text + FromJson(value string) error +} + +func (obj *ospfv2Options) Marshal() marshalOspfv2Options { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2Options{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2Options) Unmarshal() unMarshalOspfv2Options { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2Options{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2Options) ToProto() (*otg.Ospfv2Options, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2Options) FromProto(msg *otg.Ospfv2Options) (Ospfv2Options, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2Options) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2Options) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2Options) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2Options) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2Options) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2Options) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2Options) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2Options) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2Options) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2Options) Clone() (Ospfv2Options, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2Options() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Ospfv2Options is the OSPFv2 Options field is present Database Description packets and all LSAs. +// This enables OSPF routers to support (or not support) optional capabilities, +// and to communicate their capability level to other OSPF routers. +// When capabilities are exchanged in Database Description packets a +// router can choose not to forward certain LSAs to a neighbor because +// of its reduced functionality. +// Reference: A.2 The Options field: https://www.rfc-editor.org/rfc/rfc2328#page-46. +type Ospfv2Options interface { + Validation + // msg marshals Ospfv2Options to protobuf object *otg.Ospfv2Options + // and doesn't set defaults + msg() *otg.Ospfv2Options + // setMsg unmarshals Ospfv2Options from protobuf object *otg.Ospfv2Options + // and doesn't set defaults + setMsg(*otg.Ospfv2Options) Ospfv2Options + // provides marshal interface + Marshal() marshalOspfv2Options + // provides unmarshal interface + Unmarshal() unMarshalOspfv2Options + // validate validates Ospfv2Options + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2Options, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // TBit returns bool, set in Ospfv2Options. + TBit() bool + // SetTBit assigns bool provided by user to Ospfv2Options + SetTBit(value bool) Ospfv2Options + // HasTBit checks if TBit has been set in Ospfv2Options + HasTBit() bool + // EBit returns bool, set in Ospfv2Options. + EBit() bool + // SetEBit assigns bool provided by user to Ospfv2Options + SetEBit(value bool) Ospfv2Options + // HasEBit checks if EBit has been set in Ospfv2Options + HasEBit() bool + // McBit returns bool, set in Ospfv2Options. + McBit() bool + // SetMcBit assigns bool provided by user to Ospfv2Options + SetMcBit(value bool) Ospfv2Options + // HasMcBit checks if McBit has been set in Ospfv2Options + HasMcBit() bool + // NpBit returns bool, set in Ospfv2Options. + NpBit() bool + // SetNpBit assigns bool provided by user to Ospfv2Options + SetNpBit(value bool) Ospfv2Options + // HasNpBit checks if NpBit has been set in Ospfv2Options + HasNpBit() bool + // EaBit returns bool, set in Ospfv2Options. + EaBit() bool + // SetEaBit assigns bool provided by user to Ospfv2Options + SetEaBit(value bool) Ospfv2Options + // HasEaBit checks if EaBit has been set in Ospfv2Options + HasEaBit() bool + // DcBit returns bool, set in Ospfv2Options. + DcBit() bool + // SetDcBit assigns bool provided by user to Ospfv2Options + SetDcBit(value bool) Ospfv2Options + // HasDcBit checks if DcBit has been set in Ospfv2Options + HasDcBit() bool + // OBit returns bool, set in Ospfv2Options. + OBit() bool + // SetOBit assigns bool provided by user to Ospfv2Options + SetOBit(value bool) Ospfv2Options + // HasOBit checks if OBit has been set in Ospfv2Options + HasOBit() bool + // UnusedBit returns bool, set in Ospfv2Options. + UnusedBit() bool + // SetUnusedBit assigns bool provided by user to Ospfv2Options + SetUnusedBit(value bool) Ospfv2Options + // HasUnusedBit checks if UnusedBit has been set in Ospfv2Options + HasUnusedBit() bool + // LsaBBit returns bool, set in Ospfv2Options. + LsaBBit() bool + // SetLsaBBit assigns bool provided by user to Ospfv2Options + SetLsaBBit(value bool) Ospfv2Options + // HasLsaBBit checks if LsaBBit has been set in Ospfv2Options + HasLsaBBit() bool + // LsaEBit returns bool, set in Ospfv2Options. + LsaEBit() bool + // SetLsaEBit assigns bool provided by user to Ospfv2Options + SetLsaEBit(value bool) Ospfv2Options + // HasLsaEBit checks if LsaEBit has been set in Ospfv2Options + HasLsaEBit() bool +} + +// Type of Service: 0th-bit: describes OSPFv2's TOS capability. +// TBit returns a bool +func (obj *ospfv2Options) TBit() bool { + + return *obj.obj.TBit + +} + +// Type of Service: 0th-bit: describes OSPFv2's TOS capability. +// TBit returns a bool +func (obj *ospfv2Options) HasTBit() bool { + return obj.obj.TBit != nil +} + +// Type of Service: 0th-bit: describes OSPFv2's TOS capability. +// SetTBit sets the bool value in the Ospfv2Options object +func (obj *ospfv2Options) SetTBit(value bool) Ospfv2Options { + + obj.obj.TBit = &value + return obj +} + +// External Capability: 1st-bit: describes the way AS-external-LSAs are flooded. +// EBit returns a bool +func (obj *ospfv2Options) EBit() bool { + + return *obj.obj.EBit + +} + +// External Capability: 1st-bit: describes the way AS-external-LSAs are flooded. +// EBit returns a bool +func (obj *ospfv2Options) HasEBit() bool { + return obj.obj.EBit != nil +} + +// External Capability: 1st-bit: describes the way AS-external-LSAs are flooded. +// SetEBit sets the bool value in the Ospfv2Options object +func (obj *ospfv2Options) SetEBit(value bool) Ospfv2Options { + + obj.obj.EBit = &value + return obj +} + +// Multicast Capability: 2nd-bit: describes whether IP multicast datagrams are forwarded according to the specifications in [Ref18], rfc2328. +// McBit returns a bool +func (obj *ospfv2Options) McBit() bool { + + return *obj.obj.McBit + +} + +// Multicast Capability: 2nd-bit: describes whether IP multicast datagrams are forwarded according to the specifications in [Ref18], rfc2328. +// McBit returns a bool +func (obj *ospfv2Options) HasMcBit() bool { + return obj.obj.McBit != nil +} + +// Multicast Capability: 2nd-bit: describes whether IP multicast datagrams are forwarded according to the specifications in [Ref18], rfc2328. +// SetMcBit sets the bool value in the Ospfv2Options object +func (obj *ospfv2Options) SetMcBit(value bool) Ospfv2Options { + + obj.obj.McBit = &value + return obj +} + +// NSSA Capability: 3rd-bit: describes the handling of Type-7 LSAs, as specified in [Ref19], rfc2328. +// NpBit returns a bool +func (obj *ospfv2Options) NpBit() bool { + + return *obj.obj.NpBit + +} + +// NSSA Capability: 3rd-bit: describes the handling of Type-7 LSAs, as specified in [Ref19], rfc2328. +// NpBit returns a bool +func (obj *ospfv2Options) HasNpBit() bool { + return obj.obj.NpBit != nil +} + +// NSSA Capability: 3rd-bit: describes the handling of Type-7 LSAs, as specified in [Ref19], rfc2328. +// SetNpBit sets the bool value in the Ospfv2Options object +func (obj *ospfv2Options) SetNpBit(value bool) Ospfv2Options { + + obj.obj.NpBit = &value + return obj +} + +// External Attribute: 4th-bit: describes the router's willingness to receive and forward External-Attributes-LSAs, as specified in [Ref20], rfc2328. +// EaBit returns a bool +func (obj *ospfv2Options) EaBit() bool { + + return *obj.obj.EaBit + +} + +// External Attribute: 4th-bit: describes the router's willingness to receive and forward External-Attributes-LSAs, as specified in [Ref20], rfc2328. +// EaBit returns a bool +func (obj *ospfv2Options) HasEaBit() bool { + return obj.obj.EaBit != nil +} + +// External Attribute: 4th-bit: describes the router's willingness to receive and forward External-Attributes-LSAs, as specified in [Ref20], rfc2328. +// SetEaBit sets the bool value in the Ospfv2Options object +func (obj *ospfv2Options) SetEaBit(value bool) Ospfv2Options { + + obj.obj.EaBit = &value + return obj +} + +// Demand Circuit: 5th-bit: describes the router's handling of demand circuits, as specified in [Ref21], rfc2328. +// DcBit returns a bool +func (obj *ospfv2Options) DcBit() bool { + + return *obj.obj.DcBit + +} + +// Demand Circuit: 5th-bit: describes the router's handling of demand circuits, as specified in [Ref21], rfc2328. +// DcBit returns a bool +func (obj *ospfv2Options) HasDcBit() bool { + return obj.obj.DcBit != nil +} + +// Demand Circuit: 5th-bit: describes the router's handling of demand circuits, as specified in [Ref21], rfc2328. +// SetDcBit sets the bool value in the Ospfv2Options object +func (obj *ospfv2Options) SetDcBit(value bool) Ospfv2Options { + + obj.obj.DcBit = &value + return obj +} + +// Opaque LSA's Forwarded: 6th-bit: describes the router's willingness to receive and forward Opaque-LSAs, rfc2370. +// OBit returns a bool +func (obj *ospfv2Options) OBit() bool { + + return *obj.obj.OBit + +} + +// Opaque LSA's Forwarded: 6th-bit: describes the router's willingness to receive and forward Opaque-LSAs, rfc2370. +// OBit returns a bool +func (obj *ospfv2Options) HasOBit() bool { + return obj.obj.OBit != nil +} + +// Opaque LSA's Forwarded: 6th-bit: describes the router's willingness to receive and forward Opaque-LSAs, rfc2370. +// SetOBit sets the bool value in the Ospfv2Options object +func (obj *ospfv2Options) SetOBit(value bool) Ospfv2Options { + + obj.obj.OBit = &value + return obj +} + +// Opaque LSA's Forwarded: 7th-bit: unused bit. +// UnusedBit returns a bool +func (obj *ospfv2Options) UnusedBit() bool { + + return *obj.obj.UnusedBit + +} + +// Opaque LSA's Forwarded: 7th-bit: unused bit. +// UnusedBit returns a bool +func (obj *ospfv2Options) HasUnusedBit() bool { + return obj.obj.UnusedBit != nil +} + +// Opaque LSA's Forwarded: 7th-bit: unused bit. +// SetUnusedBit sets the bool value in the Ospfv2Options object +func (obj *ospfv2Options) SetUnusedBit(value bool) Ospfv2Options { + + obj.obj.UnusedBit = &value + return obj +} + +// Set to indicate that the router acts as an Area Border Router. +// LsaBBit returns a bool +func (obj *ospfv2Options) LsaBBit() bool { + + return *obj.obj.LsaBBit + +} + +// Set to indicate that the router acts as an Area Border Router. +// LsaBBit returns a bool +func (obj *ospfv2Options) HasLsaBBit() bool { + return obj.obj.LsaBBit != nil +} + +// Set to indicate that the router acts as an Area Border Router. +// SetLsaBBit sets the bool value in the Ospfv2Options object +func (obj *ospfv2Options) SetLsaBBit(value bool) Ospfv2Options { + + obj.obj.LsaBBit = &value + return obj +} + +// Set to indicate that the router acts as an AS Boundary Router. +// LsaEBit returns a bool +func (obj *ospfv2Options) LsaEBit() bool { + + return *obj.obj.LsaEBit + +} + +// Set to indicate that the router acts as an AS Boundary Router. +// LsaEBit returns a bool +func (obj *ospfv2Options) HasLsaEBit() bool { + return obj.obj.LsaEBit != nil +} + +// Set to indicate that the router acts as an AS Boundary Router. +// SetLsaEBit sets the bool value in the Ospfv2Options object +func (obj *ospfv2Options) SetLsaEBit(value bool) Ospfv2Options { + + obj.obj.LsaEBit = &value + return obj +} + +func (obj *ospfv2Options) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *ospfv2Options) setDefault() { + if obj.obj.TBit == nil { + obj.SetTBit(false) + } + if obj.obj.EBit == nil { + obj.SetEBit(false) + } + if obj.obj.McBit == nil { + obj.SetMcBit(false) + } + if obj.obj.NpBit == nil { + obj.SetNpBit(false) + } + if obj.obj.EaBit == nil { + obj.SetEaBit(false) + } + if obj.obj.DcBit == nil { + obj.SetDcBit(false) + } + if obj.obj.OBit == nil { + obj.SetOBit(false) + } + if obj.obj.UnusedBit == nil { + obj.SetUnusedBit(false) + } + if obj.obj.LsaBBit == nil { + obj.SetLsaBBit(false) + } + if obj.obj.LsaEBit == nil { + obj.SetLsaEBit(false) + } + +} diff --git a/gosnappi/ospfv2_router_id.go b/gosnappi/ospfv2_router_id.go new file mode 100644 index 00000000..267f3b80 --- /dev/null +++ b/gosnappi/ospfv2_router_id.go @@ -0,0 +1,392 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2RouterId ***** +type ospfv2RouterId struct { + validation + obj *otg.Ospfv2RouterId + marshaller marshalOspfv2RouterId + unMarshaller unMarshalOspfv2RouterId +} + +func NewOspfv2RouterId() Ospfv2RouterId { + obj := ospfv2RouterId{obj: &otg.Ospfv2RouterId{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2RouterId) msg() *otg.Ospfv2RouterId { + return obj.obj +} + +func (obj *ospfv2RouterId) setMsg(msg *otg.Ospfv2RouterId) Ospfv2RouterId { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2RouterId struct { + obj *ospfv2RouterId +} + +type marshalOspfv2RouterId interface { + // ToProto marshals Ospfv2RouterId to protobuf object *otg.Ospfv2RouterId + ToProto() (*otg.Ospfv2RouterId, error) + // ToPbText marshals Ospfv2RouterId to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2RouterId to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2RouterId to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2RouterId struct { + obj *ospfv2RouterId +} + +type unMarshalOspfv2RouterId interface { + // FromProto unmarshals Ospfv2RouterId from protobuf object *otg.Ospfv2RouterId + FromProto(msg *otg.Ospfv2RouterId) (Ospfv2RouterId, error) + // FromPbText unmarshals Ospfv2RouterId from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2RouterId from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2RouterId from JSON text + FromJson(value string) error +} + +func (obj *ospfv2RouterId) Marshal() marshalOspfv2RouterId { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2RouterId{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2RouterId) Unmarshal() unMarshalOspfv2RouterId { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2RouterId{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2RouterId) ToProto() (*otg.Ospfv2RouterId, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2RouterId) FromProto(msg *otg.Ospfv2RouterId) (Ospfv2RouterId, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2RouterId) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2RouterId) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2RouterId) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2RouterId) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2RouterId) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2RouterId) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2RouterId) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2RouterId) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2RouterId) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2RouterId) Clone() (Ospfv2RouterId, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2RouterId() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Ospfv2RouterId is container for OSPFv2 Router ID configuration. +type Ospfv2RouterId interface { + Validation + // msg marshals Ospfv2RouterId to protobuf object *otg.Ospfv2RouterId + // and doesn't set defaults + msg() *otg.Ospfv2RouterId + // setMsg unmarshals Ospfv2RouterId from protobuf object *otg.Ospfv2RouterId + // and doesn't set defaults + setMsg(*otg.Ospfv2RouterId) Ospfv2RouterId + // provides marshal interface + Marshal() marshalOspfv2RouterId + // provides unmarshal interface + Unmarshal() unMarshalOspfv2RouterId + // validate validates Ospfv2RouterId + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2RouterId, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns Ospfv2RouterIdChoiceEnum, set in Ospfv2RouterId + Choice() Ospfv2RouterIdChoiceEnum + // setChoice assigns Ospfv2RouterIdChoiceEnum provided by user to Ospfv2RouterId + setChoice(value Ospfv2RouterIdChoiceEnum) Ospfv2RouterId + // HasChoice checks if Choice has been set in Ospfv2RouterId + HasChoice() bool + // getter for InterfaceIp to set choice. + InterfaceIp() + // Custom returns string, set in Ospfv2RouterId. + Custom() string + // SetCustom assigns string provided by user to Ospfv2RouterId + SetCustom(value string) Ospfv2RouterId + // HasCustom checks if Custom has been set in Ospfv2RouterId + HasCustom() bool +} + +type Ospfv2RouterIdChoiceEnum string + +// Enum of Choice on Ospfv2RouterId +var Ospfv2RouterIdChoice = struct { + INTERFACE_IP Ospfv2RouterIdChoiceEnum + CUSTOM Ospfv2RouterIdChoiceEnum +}{ + INTERFACE_IP: Ospfv2RouterIdChoiceEnum("interface_ip"), + CUSTOM: Ospfv2RouterIdChoiceEnum("custom"), +} + +func (obj *ospfv2RouterId) Choice() Ospfv2RouterIdChoiceEnum { + return Ospfv2RouterIdChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// getter for InterfaceIp to set choice +func (obj *ospfv2RouterId) InterfaceIp() { + obj.setChoice(Ospfv2RouterIdChoice.INTERFACE_IP) +} + +// IP address of Router ID for this emulated OSPFv2 router. +// - interface_ip: When IPv4 interface address to be assigned as Router ID. +// - custom: When, Router ID needs to be configured different from Interface IPv4 address. +// Choice returns a string +func (obj *ospfv2RouterId) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *ospfv2RouterId) setChoice(value Ospfv2RouterIdChoiceEnum) Ospfv2RouterId { + intValue, ok := otg.Ospfv2RouterId_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Ospfv2RouterIdChoiceEnum", string(value))) + return obj + } + enumValue := otg.Ospfv2RouterId_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + return obj +} + +// Router ID in IPv4 address format. +// Custom returns a string +func (obj *ospfv2RouterId) Custom() string { + + if obj.obj.Custom == nil { + obj.setChoice(Ospfv2RouterIdChoice.CUSTOM) + } + + return *obj.obj.Custom + +} + +// Router ID in IPv4 address format. +// Custom returns a string +func (obj *ospfv2RouterId) HasCustom() bool { + return obj.obj.Custom != nil +} + +// Router ID in IPv4 address format. +// SetCustom sets the string value in the Ospfv2RouterId object +func (obj *ospfv2RouterId) SetCustom(value string) Ospfv2RouterId { + obj.setChoice(Ospfv2RouterIdChoice.CUSTOM) + obj.obj.Custom = &value + return obj +} + +func (obj *ospfv2RouterId) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Custom != nil { + + err := obj.validateIpv4(obj.Custom()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Ospfv2RouterId.Custom")) + } + + } + +} + +func (obj *ospfv2RouterId) setDefault() { + var choices_set int = 0 + var choice Ospfv2RouterIdChoiceEnum + + if obj.obj.Custom != nil { + choices_set += 1 + choice = Ospfv2RouterIdChoice.CUSTOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Ospfv2RouterIdChoice.INTERFACE_IP) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Ospfv2RouterId") + } + } else { + intVal := otg.Ospfv2RouterId_Choice_Enum_value[string(choice)] + enumValue := otg.Ospfv2RouterId_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/ospfv2_router_lsa.go b/gosnappi/ospfv2_router_lsa.go new file mode 100644 index 00000000..5876be18 --- /dev/null +++ b/gosnappi/ospfv2_router_lsa.go @@ -0,0 +1,433 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2RouterLsa ***** +type ospfv2RouterLsa struct { + validation + obj *otg.Ospfv2RouterLsa + marshaller marshalOspfv2RouterLsa + unMarshaller unMarshalOspfv2RouterLsa + headerHolder Ospfv2LsaHeader + linksHolder Ospfv2RouterLsaOspfv2LinkIter +} + +func NewOspfv2RouterLsa() Ospfv2RouterLsa { + obj := ospfv2RouterLsa{obj: &otg.Ospfv2RouterLsa{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2RouterLsa) msg() *otg.Ospfv2RouterLsa { + return obj.obj +} + +func (obj *ospfv2RouterLsa) setMsg(msg *otg.Ospfv2RouterLsa) Ospfv2RouterLsa { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2RouterLsa struct { + obj *ospfv2RouterLsa +} + +type marshalOspfv2RouterLsa interface { + // ToProto marshals Ospfv2RouterLsa to protobuf object *otg.Ospfv2RouterLsa + ToProto() (*otg.Ospfv2RouterLsa, error) + // ToPbText marshals Ospfv2RouterLsa to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2RouterLsa to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2RouterLsa to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2RouterLsa struct { + obj *ospfv2RouterLsa +} + +type unMarshalOspfv2RouterLsa interface { + // FromProto unmarshals Ospfv2RouterLsa from protobuf object *otg.Ospfv2RouterLsa + FromProto(msg *otg.Ospfv2RouterLsa) (Ospfv2RouterLsa, error) + // FromPbText unmarshals Ospfv2RouterLsa from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2RouterLsa from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2RouterLsa from JSON text + FromJson(value string) error +} + +func (obj *ospfv2RouterLsa) Marshal() marshalOspfv2RouterLsa { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2RouterLsa{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2RouterLsa) Unmarshal() unMarshalOspfv2RouterLsa { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2RouterLsa{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2RouterLsa) ToProto() (*otg.Ospfv2RouterLsa, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2RouterLsa) FromProto(msg *otg.Ospfv2RouterLsa) (Ospfv2RouterLsa, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2RouterLsa) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2RouterLsa) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2RouterLsa) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2RouterLsa) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2RouterLsa) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2RouterLsa) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2RouterLsa) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2RouterLsa) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2RouterLsa) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2RouterLsa) Clone() (Ospfv2RouterLsa, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2RouterLsa() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2RouterLsa) setNil() { + obj.headerHolder = nil + obj.linksHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2RouterLsa is contents of the router LSA. +type Ospfv2RouterLsa interface { + Validation + // msg marshals Ospfv2RouterLsa to protobuf object *otg.Ospfv2RouterLsa + // and doesn't set defaults + msg() *otg.Ospfv2RouterLsa + // setMsg unmarshals Ospfv2RouterLsa from protobuf object *otg.Ospfv2RouterLsa + // and doesn't set defaults + setMsg(*otg.Ospfv2RouterLsa) Ospfv2RouterLsa + // provides marshal interface + Marshal() marshalOspfv2RouterLsa + // provides unmarshal interface + Unmarshal() unMarshalOspfv2RouterLsa + // validate validates Ospfv2RouterLsa + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2RouterLsa, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Header returns Ospfv2LsaHeader, set in Ospfv2RouterLsa. + // Ospfv2LsaHeader is attributes in LSA Header. + Header() Ospfv2LsaHeader + // SetHeader assigns Ospfv2LsaHeader provided by user to Ospfv2RouterLsa. + // Ospfv2LsaHeader is attributes in LSA Header. + SetHeader(value Ospfv2LsaHeader) Ospfv2RouterLsa + // HasHeader checks if Header has been set in Ospfv2RouterLsa + HasHeader() bool + // Links returns Ospfv2RouterLsaOspfv2LinkIterIter, set in Ospfv2RouterLsa + Links() Ospfv2RouterLsaOspfv2LinkIter + setNil() +} + +// Contents of the LSA header. +// Header returns a Ospfv2LsaHeader +func (obj *ospfv2RouterLsa) Header() Ospfv2LsaHeader { + if obj.obj.Header == nil { + obj.obj.Header = NewOspfv2LsaHeader().msg() + } + if obj.headerHolder == nil { + obj.headerHolder = &ospfv2LsaHeader{obj: obj.obj.Header} + } + return obj.headerHolder +} + +// Contents of the LSA header. +// Header returns a Ospfv2LsaHeader +func (obj *ospfv2RouterLsa) HasHeader() bool { + return obj.obj.Header != nil +} + +// Contents of the LSA header. +// SetHeader sets the Ospfv2LsaHeader value in the Ospfv2RouterLsa object +func (obj *ospfv2RouterLsa) SetHeader(value Ospfv2LsaHeader) Ospfv2RouterLsa { + + obj.headerHolder = nil + obj.obj.Header = value.msg() + + return obj +} + +// Links that are described within the LSA. +// Links returns a []Ospfv2Link +func (obj *ospfv2RouterLsa) Links() Ospfv2RouterLsaOspfv2LinkIter { + if len(obj.obj.Links) == 0 { + obj.obj.Links = []*otg.Ospfv2Link{} + } + if obj.linksHolder == nil { + obj.linksHolder = newOspfv2RouterLsaOspfv2LinkIter(&obj.obj.Links).setMsg(obj) + } + return obj.linksHolder +} + +type ospfv2RouterLsaOspfv2LinkIter struct { + obj *ospfv2RouterLsa + ospfv2LinkSlice []Ospfv2Link + fieldPtr *[]*otg.Ospfv2Link +} + +func newOspfv2RouterLsaOspfv2LinkIter(ptr *[]*otg.Ospfv2Link) Ospfv2RouterLsaOspfv2LinkIter { + return &ospfv2RouterLsaOspfv2LinkIter{fieldPtr: ptr} +} + +type Ospfv2RouterLsaOspfv2LinkIter interface { + setMsg(*ospfv2RouterLsa) Ospfv2RouterLsaOspfv2LinkIter + Items() []Ospfv2Link + Add() Ospfv2Link + Append(items ...Ospfv2Link) Ospfv2RouterLsaOspfv2LinkIter + Set(index int, newObj Ospfv2Link) Ospfv2RouterLsaOspfv2LinkIter + Clear() Ospfv2RouterLsaOspfv2LinkIter + clearHolderSlice() Ospfv2RouterLsaOspfv2LinkIter + appendHolderSlice(item Ospfv2Link) Ospfv2RouterLsaOspfv2LinkIter +} + +func (obj *ospfv2RouterLsaOspfv2LinkIter) setMsg(msg *ospfv2RouterLsa) Ospfv2RouterLsaOspfv2LinkIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&ospfv2Link{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *ospfv2RouterLsaOspfv2LinkIter) Items() []Ospfv2Link { + return obj.ospfv2LinkSlice +} + +func (obj *ospfv2RouterLsaOspfv2LinkIter) Add() Ospfv2Link { + newObj := &otg.Ospfv2Link{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &ospfv2Link{obj: newObj} + newLibObj.setDefault() + obj.ospfv2LinkSlice = append(obj.ospfv2LinkSlice, newLibObj) + return newLibObj +} + +func (obj *ospfv2RouterLsaOspfv2LinkIter) Append(items ...Ospfv2Link) Ospfv2RouterLsaOspfv2LinkIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.ospfv2LinkSlice = append(obj.ospfv2LinkSlice, item) + } + return obj +} + +func (obj *ospfv2RouterLsaOspfv2LinkIter) Set(index int, newObj Ospfv2Link) Ospfv2RouterLsaOspfv2LinkIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.ospfv2LinkSlice[index] = newObj + return obj +} +func (obj *ospfv2RouterLsaOspfv2LinkIter) Clear() Ospfv2RouterLsaOspfv2LinkIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Ospfv2Link{} + obj.ospfv2LinkSlice = []Ospfv2Link{} + } + return obj +} +func (obj *ospfv2RouterLsaOspfv2LinkIter) clearHolderSlice() Ospfv2RouterLsaOspfv2LinkIter { + if len(obj.ospfv2LinkSlice) > 0 { + obj.ospfv2LinkSlice = []Ospfv2Link{} + } + return obj +} +func (obj *ospfv2RouterLsaOspfv2LinkIter) appendHolderSlice(item Ospfv2Link) Ospfv2RouterLsaOspfv2LinkIter { + obj.ospfv2LinkSlice = append(obj.ospfv2LinkSlice, item) + return obj +} + +func (obj *ospfv2RouterLsa) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Header != nil { + + obj.Header().validateObj(vObj, set_default) + } + + if len(obj.obj.Links) != 0 { + + if set_default { + obj.Links().clearHolderSlice() + for _, item := range obj.obj.Links { + obj.Links().appendHolderSlice(&ospfv2Link{obj: item}) + } + } + for _, item := range obj.Links().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *ospfv2RouterLsa) setDefault() { + +} diff --git a/gosnappi/ospfv2_summary_as_lsa.go b/gosnappi/ospfv2_summary_as_lsa.go new file mode 100644 index 00000000..db93c67b --- /dev/null +++ b/gosnappi/ospfv2_summary_as_lsa.go @@ -0,0 +1,393 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2SummaryAsLsa ***** +type ospfv2SummaryAsLsa struct { + validation + obj *otg.Ospfv2SummaryAsLsa + marshaller marshalOspfv2SummaryAsLsa + unMarshaller unMarshalOspfv2SummaryAsLsa + headerHolder Ospfv2LsaHeader +} + +func NewOspfv2SummaryAsLsa() Ospfv2SummaryAsLsa { + obj := ospfv2SummaryAsLsa{obj: &otg.Ospfv2SummaryAsLsa{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2SummaryAsLsa) msg() *otg.Ospfv2SummaryAsLsa { + return obj.obj +} + +func (obj *ospfv2SummaryAsLsa) setMsg(msg *otg.Ospfv2SummaryAsLsa) Ospfv2SummaryAsLsa { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2SummaryAsLsa struct { + obj *ospfv2SummaryAsLsa +} + +type marshalOspfv2SummaryAsLsa interface { + // ToProto marshals Ospfv2SummaryAsLsa to protobuf object *otg.Ospfv2SummaryAsLsa + ToProto() (*otg.Ospfv2SummaryAsLsa, error) + // ToPbText marshals Ospfv2SummaryAsLsa to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2SummaryAsLsa to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2SummaryAsLsa to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2SummaryAsLsa struct { + obj *ospfv2SummaryAsLsa +} + +type unMarshalOspfv2SummaryAsLsa interface { + // FromProto unmarshals Ospfv2SummaryAsLsa from protobuf object *otg.Ospfv2SummaryAsLsa + FromProto(msg *otg.Ospfv2SummaryAsLsa) (Ospfv2SummaryAsLsa, error) + // FromPbText unmarshals Ospfv2SummaryAsLsa from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2SummaryAsLsa from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2SummaryAsLsa from JSON text + FromJson(value string) error +} + +func (obj *ospfv2SummaryAsLsa) Marshal() marshalOspfv2SummaryAsLsa { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2SummaryAsLsa{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2SummaryAsLsa) Unmarshal() unMarshalOspfv2SummaryAsLsa { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2SummaryAsLsa{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2SummaryAsLsa) ToProto() (*otg.Ospfv2SummaryAsLsa, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2SummaryAsLsa) FromProto(msg *otg.Ospfv2SummaryAsLsa) (Ospfv2SummaryAsLsa, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2SummaryAsLsa) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2SummaryAsLsa) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2SummaryAsLsa) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2SummaryAsLsa) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2SummaryAsLsa) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2SummaryAsLsa) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2SummaryAsLsa) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2SummaryAsLsa) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2SummaryAsLsa) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2SummaryAsLsa) Clone() (Ospfv2SummaryAsLsa, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2SummaryAsLsa() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2SummaryAsLsa) setNil() { + obj.headerHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2SummaryAsLsa is contents of OSPFv2 Autonomous System Boundary Router (ASBR) summary LSA - Type 4. +type Ospfv2SummaryAsLsa interface { + Validation + // msg marshals Ospfv2SummaryAsLsa to protobuf object *otg.Ospfv2SummaryAsLsa + // and doesn't set defaults + msg() *otg.Ospfv2SummaryAsLsa + // setMsg unmarshals Ospfv2SummaryAsLsa from protobuf object *otg.Ospfv2SummaryAsLsa + // and doesn't set defaults + setMsg(*otg.Ospfv2SummaryAsLsa) Ospfv2SummaryAsLsa + // provides marshal interface + Marshal() marshalOspfv2SummaryAsLsa + // provides unmarshal interface + Unmarshal() unMarshalOspfv2SummaryAsLsa + // validate validates Ospfv2SummaryAsLsa + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2SummaryAsLsa, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Header returns Ospfv2LsaHeader, set in Ospfv2SummaryAsLsa. + // Ospfv2LsaHeader is attributes in LSA Header. + Header() Ospfv2LsaHeader + // SetHeader assigns Ospfv2LsaHeader provided by user to Ospfv2SummaryAsLsa. + // Ospfv2LsaHeader is attributes in LSA Header. + SetHeader(value Ospfv2LsaHeader) Ospfv2SummaryAsLsa + // HasHeader checks if Header has been set in Ospfv2SummaryAsLsa + HasHeader() bool + // NetworkMask returns string, set in Ospfv2SummaryAsLsa. + NetworkMask() string + // SetNetworkMask assigns string provided by user to Ospfv2SummaryAsLsa + SetNetworkMask(value string) Ospfv2SummaryAsLsa + // HasNetworkMask checks if NetworkMask has been set in Ospfv2SummaryAsLsa + HasNetworkMask() bool + // Metric returns uint32, set in Ospfv2SummaryAsLsa. + Metric() uint32 + // SetMetric assigns uint32 provided by user to Ospfv2SummaryAsLsa + SetMetric(value uint32) Ospfv2SummaryAsLsa + // HasMetric checks if Metric has been set in Ospfv2SummaryAsLsa + HasMetric() bool + setNil() +} + +// Contents of the LSA header. +// Header returns a Ospfv2LsaHeader +func (obj *ospfv2SummaryAsLsa) Header() Ospfv2LsaHeader { + if obj.obj.Header == nil { + obj.obj.Header = NewOspfv2LsaHeader().msg() + } + if obj.headerHolder == nil { + obj.headerHolder = &ospfv2LsaHeader{obj: obj.obj.Header} + } + return obj.headerHolder +} + +// Contents of the LSA header. +// Header returns a Ospfv2LsaHeader +func (obj *ospfv2SummaryAsLsa) HasHeader() bool { + return obj.obj.Header != nil +} + +// Contents of the LSA header. +// SetHeader sets the Ospfv2LsaHeader value in the Ospfv2SummaryAsLsa object +func (obj *ospfv2SummaryAsLsa) SetHeader(value Ospfv2LsaHeader) Ospfv2SummaryAsLsa { + + obj.headerHolder = nil + obj.obj.Header = value.msg() + + return obj +} + +// The IPv4 address mask for the network. +// NetworkMask returns a string +func (obj *ospfv2SummaryAsLsa) NetworkMask() string { + + return *obj.obj.NetworkMask + +} + +// The IPv4 address mask for the network. +// NetworkMask returns a string +func (obj *ospfv2SummaryAsLsa) HasNetworkMask() bool { + return obj.obj.NetworkMask != nil +} + +// The IPv4 address mask for the network. +// SetNetworkMask sets the string value in the Ospfv2SummaryAsLsa object +func (obj *ospfv2SummaryAsLsa) SetNetworkMask(value string) Ospfv2SummaryAsLsa { + + obj.obj.NetworkMask = &value + return obj +} + +// The cost of the summary route TOS level 0 and all unspecified levels. +// Metric returns a uint32 +func (obj *ospfv2SummaryAsLsa) Metric() uint32 { + + return *obj.obj.Metric + +} + +// The cost of the summary route TOS level 0 and all unspecified levels. +// Metric returns a uint32 +func (obj *ospfv2SummaryAsLsa) HasMetric() bool { + return obj.obj.Metric != nil +} + +// The cost of the summary route TOS level 0 and all unspecified levels. +// SetMetric sets the uint32 value in the Ospfv2SummaryAsLsa object +func (obj *ospfv2SummaryAsLsa) SetMetric(value uint32) Ospfv2SummaryAsLsa { + + obj.obj.Metric = &value + return obj +} + +func (obj *ospfv2SummaryAsLsa) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Header != nil { + + obj.Header().validateObj(vObj, set_default) + } + + if obj.obj.NetworkMask != nil { + + err := obj.validateIpv4(obj.NetworkMask()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on Ospfv2SummaryAsLsa.NetworkMask")) + } + + } + +} + +func (obj *ospfv2SummaryAsLsa) setDefault() { + +} diff --git a/gosnappi/ospfv2_v4_route_range.go b/gosnappi/ospfv2_v4_route_range.go new file mode 100644 index 00000000..796730af --- /dev/null +++ b/gosnappi/ospfv2_v4_route_range.go @@ -0,0 +1,501 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2V4RouteRange ***** +type ospfv2V4RouteRange struct { + validation + obj *otg.Ospfv2V4RouteRange + marshaller marshalOspfv2V4RouteRange + unMarshaller unMarshalOspfv2V4RouteRange + addressesHolder Ospfv2V4RouteRangeV4RouteAddressIter + routeOriginHolder Ospfv2V4RRRouteOrigin +} + +func NewOspfv2V4RouteRange() Ospfv2V4RouteRange { + obj := ospfv2V4RouteRange{obj: &otg.Ospfv2V4RouteRange{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2V4RouteRange) msg() *otg.Ospfv2V4RouteRange { + return obj.obj +} + +func (obj *ospfv2V4RouteRange) setMsg(msg *otg.Ospfv2V4RouteRange) Ospfv2V4RouteRange { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2V4RouteRange struct { + obj *ospfv2V4RouteRange +} + +type marshalOspfv2V4RouteRange interface { + // ToProto marshals Ospfv2V4RouteRange to protobuf object *otg.Ospfv2V4RouteRange + ToProto() (*otg.Ospfv2V4RouteRange, error) + // ToPbText marshals Ospfv2V4RouteRange to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2V4RouteRange to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2V4RouteRange to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2V4RouteRange struct { + obj *ospfv2V4RouteRange +} + +type unMarshalOspfv2V4RouteRange interface { + // FromProto unmarshals Ospfv2V4RouteRange from protobuf object *otg.Ospfv2V4RouteRange + FromProto(msg *otg.Ospfv2V4RouteRange) (Ospfv2V4RouteRange, error) + // FromPbText unmarshals Ospfv2V4RouteRange from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2V4RouteRange from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2V4RouteRange from JSON text + FromJson(value string) error +} + +func (obj *ospfv2V4RouteRange) Marshal() marshalOspfv2V4RouteRange { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2V4RouteRange{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2V4RouteRange) Unmarshal() unMarshalOspfv2V4RouteRange { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2V4RouteRange{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2V4RouteRange) ToProto() (*otg.Ospfv2V4RouteRange, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2V4RouteRange) FromProto(msg *otg.Ospfv2V4RouteRange) (Ospfv2V4RouteRange, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2V4RouteRange) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2V4RouteRange) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2V4RouteRange) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RouteRange) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2V4RouteRange) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RouteRange) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2V4RouteRange) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2V4RouteRange) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2V4RouteRange) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2V4RouteRange) Clone() (Ospfv2V4RouteRange, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2V4RouteRange() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2V4RouteRange) setNil() { + obj.addressesHolder = nil + obj.routeOriginHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2V4RouteRange is emulated OSPFv2 IPv4 routes. +type Ospfv2V4RouteRange interface { + Validation + // msg marshals Ospfv2V4RouteRange to protobuf object *otg.Ospfv2V4RouteRange + // and doesn't set defaults + msg() *otg.Ospfv2V4RouteRange + // setMsg unmarshals Ospfv2V4RouteRange from protobuf object *otg.Ospfv2V4RouteRange + // and doesn't set defaults + setMsg(*otg.Ospfv2V4RouteRange) Ospfv2V4RouteRange + // provides marshal interface + Marshal() marshalOspfv2V4RouteRange + // provides unmarshal interface + Unmarshal() unMarshalOspfv2V4RouteRange + // validate validates Ospfv2V4RouteRange + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2V4RouteRange, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in Ospfv2V4RouteRange. + Name() string + // SetName assigns string provided by user to Ospfv2V4RouteRange + SetName(value string) Ospfv2V4RouteRange + // Addresses returns Ospfv2V4RouteRangeV4RouteAddressIterIter, set in Ospfv2V4RouteRange + Addresses() Ospfv2V4RouteRangeV4RouteAddressIter + // Metric returns uint32, set in Ospfv2V4RouteRange. + Metric() uint32 + // SetMetric assigns uint32 provided by user to Ospfv2V4RouteRange + SetMetric(value uint32) Ospfv2V4RouteRange + // HasMetric checks if Metric has been set in Ospfv2V4RouteRange + HasMetric() bool + // RouteOrigin returns Ospfv2V4RRRouteOrigin, set in Ospfv2V4RouteRange. + // Ospfv2V4RRRouteOrigin is container of type of the OSPFv2 types correspond directly to the OSPFv2 LSAs types as + // defined in the "OSPFv2 Link State (LS) Type - http://www.iana.org/assignments/ospfv2-parameters. + RouteOrigin() Ospfv2V4RRRouteOrigin + // SetRouteOrigin assigns Ospfv2V4RRRouteOrigin provided by user to Ospfv2V4RouteRange. + // Ospfv2V4RRRouteOrigin is container of type of the OSPFv2 types correspond directly to the OSPFv2 LSAs types as + // defined in the "OSPFv2 Link State (LS) Type - http://www.iana.org/assignments/ospfv2-parameters. + SetRouteOrigin(value Ospfv2V4RRRouteOrigin) Ospfv2V4RouteRange + // HasRouteOrigin checks if RouteOrigin has been set in Ospfv2V4RouteRange + HasRouteOrigin() bool + setNil() +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *ospfv2V4RouteRange) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the Ospfv2V4RouteRange object +func (obj *ospfv2V4RouteRange) SetName(value string) Ospfv2V4RouteRange { + + obj.obj.Name = &value + return obj +} + +// A list of group of IPv4 route addresses. +// Addresses returns a []V4RouteAddress +func (obj *ospfv2V4RouteRange) Addresses() Ospfv2V4RouteRangeV4RouteAddressIter { + if len(obj.obj.Addresses) == 0 { + obj.obj.Addresses = []*otg.V4RouteAddress{} + } + if obj.addressesHolder == nil { + obj.addressesHolder = newOspfv2V4RouteRangeV4RouteAddressIter(&obj.obj.Addresses).setMsg(obj) + } + return obj.addressesHolder +} + +type ospfv2V4RouteRangeV4RouteAddressIter struct { + obj *ospfv2V4RouteRange + v4RouteAddressSlice []V4RouteAddress + fieldPtr *[]*otg.V4RouteAddress +} + +func newOspfv2V4RouteRangeV4RouteAddressIter(ptr *[]*otg.V4RouteAddress) Ospfv2V4RouteRangeV4RouteAddressIter { + return &ospfv2V4RouteRangeV4RouteAddressIter{fieldPtr: ptr} +} + +type Ospfv2V4RouteRangeV4RouteAddressIter interface { + setMsg(*ospfv2V4RouteRange) Ospfv2V4RouteRangeV4RouteAddressIter + Items() []V4RouteAddress + Add() V4RouteAddress + Append(items ...V4RouteAddress) Ospfv2V4RouteRangeV4RouteAddressIter + Set(index int, newObj V4RouteAddress) Ospfv2V4RouteRangeV4RouteAddressIter + Clear() Ospfv2V4RouteRangeV4RouteAddressIter + clearHolderSlice() Ospfv2V4RouteRangeV4RouteAddressIter + appendHolderSlice(item V4RouteAddress) Ospfv2V4RouteRangeV4RouteAddressIter +} + +func (obj *ospfv2V4RouteRangeV4RouteAddressIter) setMsg(msg *ospfv2V4RouteRange) Ospfv2V4RouteRangeV4RouteAddressIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&v4RouteAddress{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *ospfv2V4RouteRangeV4RouteAddressIter) Items() []V4RouteAddress { + return obj.v4RouteAddressSlice +} + +func (obj *ospfv2V4RouteRangeV4RouteAddressIter) Add() V4RouteAddress { + newObj := &otg.V4RouteAddress{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &v4RouteAddress{obj: newObj} + newLibObj.setDefault() + obj.v4RouteAddressSlice = append(obj.v4RouteAddressSlice, newLibObj) + return newLibObj +} + +func (obj *ospfv2V4RouteRangeV4RouteAddressIter) Append(items ...V4RouteAddress) Ospfv2V4RouteRangeV4RouteAddressIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.v4RouteAddressSlice = append(obj.v4RouteAddressSlice, item) + } + return obj +} + +func (obj *ospfv2V4RouteRangeV4RouteAddressIter) Set(index int, newObj V4RouteAddress) Ospfv2V4RouteRangeV4RouteAddressIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.v4RouteAddressSlice[index] = newObj + return obj +} +func (obj *ospfv2V4RouteRangeV4RouteAddressIter) Clear() Ospfv2V4RouteRangeV4RouteAddressIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.V4RouteAddress{} + obj.v4RouteAddressSlice = []V4RouteAddress{} + } + return obj +} +func (obj *ospfv2V4RouteRangeV4RouteAddressIter) clearHolderSlice() Ospfv2V4RouteRangeV4RouteAddressIter { + if len(obj.v4RouteAddressSlice) > 0 { + obj.v4RouteAddressSlice = []V4RouteAddress{} + } + return obj +} +func (obj *ospfv2V4RouteRangeV4RouteAddressIter) appendHolderSlice(item V4RouteAddress) Ospfv2V4RouteRangeV4RouteAddressIter { + obj.v4RouteAddressSlice = append(obj.v4RouteAddressSlice, item) + return obj +} + +// The user-defined metric associated with this route range. +// Metric returns a uint32 +func (obj *ospfv2V4RouteRange) Metric() uint32 { + + return *obj.obj.Metric + +} + +// The user-defined metric associated with this route range. +// Metric returns a uint32 +func (obj *ospfv2V4RouteRange) HasMetric() bool { + return obj.obj.Metric != nil +} + +// The user-defined metric associated with this route range. +// SetMetric sets the uint32 value in the Ospfv2V4RouteRange object +func (obj *ospfv2V4RouteRange) SetMetric(value uint32) Ospfv2V4RouteRange { + + obj.obj.Metric = &value + return obj +} + +// The type of the OSPFv2 routes. +// RouteOrigin returns a Ospfv2V4RRRouteOrigin +func (obj *ospfv2V4RouteRange) RouteOrigin() Ospfv2V4RRRouteOrigin { + if obj.obj.RouteOrigin == nil { + obj.obj.RouteOrigin = NewOspfv2V4RRRouteOrigin().msg() + } + if obj.routeOriginHolder == nil { + obj.routeOriginHolder = &ospfv2V4RRRouteOrigin{obj: obj.obj.RouteOrigin} + } + return obj.routeOriginHolder +} + +// The type of the OSPFv2 routes. +// RouteOrigin returns a Ospfv2V4RRRouteOrigin +func (obj *ospfv2V4RouteRange) HasRouteOrigin() bool { + return obj.obj.RouteOrigin != nil +} + +// The type of the OSPFv2 routes. +// SetRouteOrigin sets the Ospfv2V4RRRouteOrigin value in the Ospfv2V4RouteRange object +func (obj *ospfv2V4RouteRange) SetRouteOrigin(value Ospfv2V4RRRouteOrigin) Ospfv2V4RouteRange { + + obj.routeOriginHolder = nil + obj.obj.RouteOrigin = value.msg() + + return obj +} + +func (obj *ospfv2V4RouteRange) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface Ospfv2V4RouteRange") + } + + if len(obj.obj.Addresses) != 0 { + + if set_default { + obj.Addresses().clearHolderSlice() + for _, item := range obj.obj.Addresses { + obj.Addresses().appendHolderSlice(&v4RouteAddress{obj: item}) + } + } + for _, item := range obj.Addresses().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Metric != nil { + + if *obj.obj.Metric > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= Ospfv2V4RouteRange.Metric <= 16777215 but Got %d", *obj.obj.Metric)) + } + + } + + if obj.obj.RouteOrigin != nil { + + obj.RouteOrigin().validateObj(vObj, set_default) + } + +} + +func (obj *ospfv2V4RouteRange) setDefault() { + if obj.obj.Metric == nil { + obj.SetMetric(0) + } + +} diff --git a/gosnappi/ospfv2_v4rr_extd_prefix_flags.go b/gosnappi/ospfv2_v4rr_extd_prefix_flags.go new file mode 100644 index 00000000..c7ffc9a3 --- /dev/null +++ b/gosnappi/ospfv2_v4rr_extd_prefix_flags.go @@ -0,0 +1,358 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2V4RRExtdPrefixFlags ***** +type ospfv2V4RRExtdPrefixFlags struct { + validation + obj *otg.Ospfv2V4RRExtdPrefixFlags + marshaller marshalOspfv2V4RRExtdPrefixFlags + unMarshaller unMarshalOspfv2V4RRExtdPrefixFlags +} + +func NewOspfv2V4RRExtdPrefixFlags() Ospfv2V4RRExtdPrefixFlags { + obj := ospfv2V4RRExtdPrefixFlags{obj: &otg.Ospfv2V4RRExtdPrefixFlags{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2V4RRExtdPrefixFlags) msg() *otg.Ospfv2V4RRExtdPrefixFlags { + return obj.obj +} + +func (obj *ospfv2V4RRExtdPrefixFlags) setMsg(msg *otg.Ospfv2V4RRExtdPrefixFlags) Ospfv2V4RRExtdPrefixFlags { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2V4RRExtdPrefixFlags struct { + obj *ospfv2V4RRExtdPrefixFlags +} + +type marshalOspfv2V4RRExtdPrefixFlags interface { + // ToProto marshals Ospfv2V4RRExtdPrefixFlags to protobuf object *otg.Ospfv2V4RRExtdPrefixFlags + ToProto() (*otg.Ospfv2V4RRExtdPrefixFlags, error) + // ToPbText marshals Ospfv2V4RRExtdPrefixFlags to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2V4RRExtdPrefixFlags to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2V4RRExtdPrefixFlags to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2V4RRExtdPrefixFlags struct { + obj *ospfv2V4RRExtdPrefixFlags +} + +type unMarshalOspfv2V4RRExtdPrefixFlags interface { + // FromProto unmarshals Ospfv2V4RRExtdPrefixFlags from protobuf object *otg.Ospfv2V4RRExtdPrefixFlags + FromProto(msg *otg.Ospfv2V4RRExtdPrefixFlags) (Ospfv2V4RRExtdPrefixFlags, error) + // FromPbText unmarshals Ospfv2V4RRExtdPrefixFlags from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2V4RRExtdPrefixFlags from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2V4RRExtdPrefixFlags from JSON text + FromJson(value string) error +} + +func (obj *ospfv2V4RRExtdPrefixFlags) Marshal() marshalOspfv2V4RRExtdPrefixFlags { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2V4RRExtdPrefixFlags{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2V4RRExtdPrefixFlags) Unmarshal() unMarshalOspfv2V4RRExtdPrefixFlags { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2V4RRExtdPrefixFlags{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2V4RRExtdPrefixFlags) ToProto() (*otg.Ospfv2V4RRExtdPrefixFlags, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2V4RRExtdPrefixFlags) FromProto(msg *otg.Ospfv2V4RRExtdPrefixFlags) (Ospfv2V4RRExtdPrefixFlags, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2V4RRExtdPrefixFlags) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2V4RRExtdPrefixFlags) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2V4RRExtdPrefixFlags) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RRExtdPrefixFlags) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2V4RRExtdPrefixFlags) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RRExtdPrefixFlags) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2V4RRExtdPrefixFlags) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2V4RRExtdPrefixFlags) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2V4RRExtdPrefixFlags) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2V4RRExtdPrefixFlags) Clone() (Ospfv2V4RRExtdPrefixFlags, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2V4RRExtdPrefixFlags() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Ospfv2V4RRExtdPrefixFlags is one-octet field contains flags applicable to the prefix. https://datatracker.ietf.org/doc/html/rfc7684. +type Ospfv2V4RRExtdPrefixFlags interface { + Validation + // msg marshals Ospfv2V4RRExtdPrefixFlags to protobuf object *otg.Ospfv2V4RRExtdPrefixFlags + // and doesn't set defaults + msg() *otg.Ospfv2V4RRExtdPrefixFlags + // setMsg unmarshals Ospfv2V4RRExtdPrefixFlags from protobuf object *otg.Ospfv2V4RRExtdPrefixFlags + // and doesn't set defaults + setMsg(*otg.Ospfv2V4RRExtdPrefixFlags) Ospfv2V4RRExtdPrefixFlags + // provides marshal interface + Marshal() marshalOspfv2V4RRExtdPrefixFlags + // provides unmarshal interface + Unmarshal() unMarshalOspfv2V4RRExtdPrefixFlags + // validate validates Ospfv2V4RRExtdPrefixFlags + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2V4RRExtdPrefixFlags, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // AFlag returns bool, set in Ospfv2V4RRExtdPrefixFlags. + AFlag() bool + // SetAFlag assigns bool provided by user to Ospfv2V4RRExtdPrefixFlags + SetAFlag(value bool) Ospfv2V4RRExtdPrefixFlags + // HasAFlag checks if AFlag has been set in Ospfv2V4RRExtdPrefixFlags + HasAFlag() bool + // NFlag returns bool, set in Ospfv2V4RRExtdPrefixFlags. + NFlag() bool + // SetNFlag assigns bool provided by user to Ospfv2V4RRExtdPrefixFlags + SetNFlag(value bool) Ospfv2V4RRExtdPrefixFlags + // HasNFlag checks if NFlag has been set in Ospfv2V4RRExtdPrefixFlags + HasNFlag() bool +} + +// 0x80 - (Attach Flag): An Area Border Router (ABR) +// generating an OSPFv2 Extended Prefix TLV for an inter-area +// prefix that is locally connected or attached in another +// connected area SHOULD set this flag. +// AFlag returns a bool +func (obj *ospfv2V4RRExtdPrefixFlags) AFlag() bool { + + return *obj.obj.AFlag + +} + +// 0x80 - (Attach Flag): An Area Border Router (ABR) +// generating an OSPFv2 Extended Prefix TLV for an inter-area +// prefix that is locally connected or attached in another +// connected area SHOULD set this flag. +// AFlag returns a bool +func (obj *ospfv2V4RRExtdPrefixFlags) HasAFlag() bool { + return obj.obj.AFlag != nil +} + +// 0x80 - (Attach Flag): An Area Border Router (ABR) +// generating an OSPFv2 Extended Prefix TLV for an inter-area +// prefix that is locally connected or attached in another +// connected area SHOULD set this flag. +// SetAFlag sets the bool value in the Ospfv2V4RRExtdPrefixFlags object +func (obj *ospfv2V4RRExtdPrefixFlags) SetAFlag(value bool) Ospfv2V4RRExtdPrefixFlags { + + obj.obj.AFlag = &value + return obj +} + +// N-Flag (Node Flag): Set when the prefix identifies the +// advertising router, i.e., the prefix is a host prefix +// advertising a globally reachable address typically associated +// with a loopback address. +// NFlag returns a bool +func (obj *ospfv2V4RRExtdPrefixFlags) NFlag() bool { + + return *obj.obj.NFlag + +} + +// N-Flag (Node Flag): Set when the prefix identifies the +// advertising router, i.e., the prefix is a host prefix +// advertising a globally reachable address typically associated +// with a loopback address. +// NFlag returns a bool +func (obj *ospfv2V4RRExtdPrefixFlags) HasNFlag() bool { + return obj.obj.NFlag != nil +} + +// N-Flag (Node Flag): Set when the prefix identifies the +// advertising router, i.e., the prefix is a host prefix +// advertising a globally reachable address typically associated +// with a loopback address. +// SetNFlag sets the bool value in the Ospfv2V4RRExtdPrefixFlags object +func (obj *ospfv2V4RRExtdPrefixFlags) SetNFlag(value bool) Ospfv2V4RRExtdPrefixFlags { + + obj.obj.NFlag = &value + return obj +} + +func (obj *ospfv2V4RRExtdPrefixFlags) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *ospfv2V4RRExtdPrefixFlags) setDefault() { + if obj.obj.AFlag == nil { + obj.SetAFlag(false) + } + if obj.obj.NFlag == nil { + obj.SetNFlag(false) + } + +} diff --git a/gosnappi/ospfv2_v4rr_external_type1.go b/gosnappi/ospfv2_v4rr_external_type1.go new file mode 100644 index 00000000..320dcb74 --- /dev/null +++ b/gosnappi/ospfv2_v4rr_external_type1.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2V4RRExternalType1 ***** +type ospfv2V4RRExternalType1 struct { + validation + obj *otg.Ospfv2V4RRExternalType1 + marshaller marshalOspfv2V4RRExternalType1 + unMarshaller unMarshalOspfv2V4RRExternalType1 + flagsHolder Ospfv2V4RRExtdPrefixFlags +} + +func NewOspfv2V4RRExternalType1() Ospfv2V4RRExternalType1 { + obj := ospfv2V4RRExternalType1{obj: &otg.Ospfv2V4RRExternalType1{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2V4RRExternalType1) msg() *otg.Ospfv2V4RRExternalType1 { + return obj.obj +} + +func (obj *ospfv2V4RRExternalType1) setMsg(msg *otg.Ospfv2V4RRExternalType1) Ospfv2V4RRExternalType1 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2V4RRExternalType1 struct { + obj *ospfv2V4RRExternalType1 +} + +type marshalOspfv2V4RRExternalType1 interface { + // ToProto marshals Ospfv2V4RRExternalType1 to protobuf object *otg.Ospfv2V4RRExternalType1 + ToProto() (*otg.Ospfv2V4RRExternalType1, error) + // ToPbText marshals Ospfv2V4RRExternalType1 to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2V4RRExternalType1 to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2V4RRExternalType1 to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2V4RRExternalType1 struct { + obj *ospfv2V4RRExternalType1 +} + +type unMarshalOspfv2V4RRExternalType1 interface { + // FromProto unmarshals Ospfv2V4RRExternalType1 from protobuf object *otg.Ospfv2V4RRExternalType1 + FromProto(msg *otg.Ospfv2V4RRExternalType1) (Ospfv2V4RRExternalType1, error) + // FromPbText unmarshals Ospfv2V4RRExternalType1 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2V4RRExternalType1 from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2V4RRExternalType1 from JSON text + FromJson(value string) error +} + +func (obj *ospfv2V4RRExternalType1) Marshal() marshalOspfv2V4RRExternalType1 { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2V4RRExternalType1{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2V4RRExternalType1) Unmarshal() unMarshalOspfv2V4RRExternalType1 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2V4RRExternalType1{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2V4RRExternalType1) ToProto() (*otg.Ospfv2V4RRExternalType1, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2V4RRExternalType1) FromProto(msg *otg.Ospfv2V4RRExternalType1) (Ospfv2V4RRExternalType1, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2V4RRExternalType1) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2V4RRExternalType1) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2V4RRExternalType1) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RRExternalType1) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2V4RRExternalType1) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RRExternalType1) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2V4RRExternalType1) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2V4RRExternalType1) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2V4RRExternalType1) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2V4RRExternalType1) Clone() (Ospfv2V4RRExternalType1, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2V4RRExternalType1() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2V4RRExternalType1) setNil() { + obj.flagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2V4RRExternalType1 is container for Intra-Area. +type Ospfv2V4RRExternalType1 interface { + Validation + // msg marshals Ospfv2V4RRExternalType1 to protobuf object *otg.Ospfv2V4RRExternalType1 + // and doesn't set defaults + msg() *otg.Ospfv2V4RRExternalType1 + // setMsg unmarshals Ospfv2V4RRExternalType1 from protobuf object *otg.Ospfv2V4RRExternalType1 + // and doesn't set defaults + setMsg(*otg.Ospfv2V4RRExternalType1) Ospfv2V4RRExternalType1 + // provides marshal interface + Marshal() marshalOspfv2V4RRExternalType1 + // provides unmarshal interface + Unmarshal() unMarshalOspfv2V4RRExternalType1 + // validate validates Ospfv2V4RRExternalType1 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2V4RRExternalType1, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns Ospfv2V4RRExtdPrefixFlags, set in Ospfv2V4RRExternalType1. + // Ospfv2V4RRExtdPrefixFlags is one-octet field contains flags applicable to the prefix. https://datatracker.ietf.org/doc/html/rfc7684. + Flags() Ospfv2V4RRExtdPrefixFlags + // SetFlags assigns Ospfv2V4RRExtdPrefixFlags provided by user to Ospfv2V4RRExternalType1. + // Ospfv2V4RRExtdPrefixFlags is one-octet field contains flags applicable to the prefix. https://datatracker.ietf.org/doc/html/rfc7684. + SetFlags(value Ospfv2V4RRExtdPrefixFlags) Ospfv2V4RRExternalType1 + // HasFlags checks if Flags has been set in Ospfv2V4RRExternalType1 + HasFlags() bool + setNil() +} + +// One-octet field contains flags applicable to the prefix. +// Flags returns a Ospfv2V4RRExtdPrefixFlags +func (obj *ospfv2V4RRExternalType1) Flags() Ospfv2V4RRExtdPrefixFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewOspfv2V4RRExtdPrefixFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &ospfv2V4RRExtdPrefixFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// One-octet field contains flags applicable to the prefix. +// Flags returns a Ospfv2V4RRExtdPrefixFlags +func (obj *ospfv2V4RRExternalType1) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One-octet field contains flags applicable to the prefix. +// SetFlags sets the Ospfv2V4RRExtdPrefixFlags value in the Ospfv2V4RRExternalType1 object +func (obj *ospfv2V4RRExternalType1) SetFlags(value Ospfv2V4RRExtdPrefixFlags) Ospfv2V4RRExternalType1 { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +func (obj *ospfv2V4RRExternalType1) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + +} + +func (obj *ospfv2V4RRExternalType1) setDefault() { + +} diff --git a/gosnappi/ospfv2_v4rr_external_type2.go b/gosnappi/ospfv2_v4rr_external_type2.go new file mode 100644 index 00000000..aa78e884 --- /dev/null +++ b/gosnappi/ospfv2_v4rr_external_type2.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2V4RRExternalType2 ***** +type ospfv2V4RRExternalType2 struct { + validation + obj *otg.Ospfv2V4RRExternalType2 + marshaller marshalOspfv2V4RRExternalType2 + unMarshaller unMarshalOspfv2V4RRExternalType2 + flagsHolder Ospfv2V4RRExtdPrefixFlags +} + +func NewOspfv2V4RRExternalType2() Ospfv2V4RRExternalType2 { + obj := ospfv2V4RRExternalType2{obj: &otg.Ospfv2V4RRExternalType2{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2V4RRExternalType2) msg() *otg.Ospfv2V4RRExternalType2 { + return obj.obj +} + +func (obj *ospfv2V4RRExternalType2) setMsg(msg *otg.Ospfv2V4RRExternalType2) Ospfv2V4RRExternalType2 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2V4RRExternalType2 struct { + obj *ospfv2V4RRExternalType2 +} + +type marshalOspfv2V4RRExternalType2 interface { + // ToProto marshals Ospfv2V4RRExternalType2 to protobuf object *otg.Ospfv2V4RRExternalType2 + ToProto() (*otg.Ospfv2V4RRExternalType2, error) + // ToPbText marshals Ospfv2V4RRExternalType2 to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2V4RRExternalType2 to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2V4RRExternalType2 to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2V4RRExternalType2 struct { + obj *ospfv2V4RRExternalType2 +} + +type unMarshalOspfv2V4RRExternalType2 interface { + // FromProto unmarshals Ospfv2V4RRExternalType2 from protobuf object *otg.Ospfv2V4RRExternalType2 + FromProto(msg *otg.Ospfv2V4RRExternalType2) (Ospfv2V4RRExternalType2, error) + // FromPbText unmarshals Ospfv2V4RRExternalType2 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2V4RRExternalType2 from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2V4RRExternalType2 from JSON text + FromJson(value string) error +} + +func (obj *ospfv2V4RRExternalType2) Marshal() marshalOspfv2V4RRExternalType2 { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2V4RRExternalType2{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2V4RRExternalType2) Unmarshal() unMarshalOspfv2V4RRExternalType2 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2V4RRExternalType2{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2V4RRExternalType2) ToProto() (*otg.Ospfv2V4RRExternalType2, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2V4RRExternalType2) FromProto(msg *otg.Ospfv2V4RRExternalType2) (Ospfv2V4RRExternalType2, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2V4RRExternalType2) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2V4RRExternalType2) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2V4RRExternalType2) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RRExternalType2) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2V4RRExternalType2) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RRExternalType2) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2V4RRExternalType2) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2V4RRExternalType2) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2V4RRExternalType2) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2V4RRExternalType2) Clone() (Ospfv2V4RRExternalType2, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2V4RRExternalType2() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2V4RRExternalType2) setNil() { + obj.flagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2V4RRExternalType2 is container for Intra-Area. +type Ospfv2V4RRExternalType2 interface { + Validation + // msg marshals Ospfv2V4RRExternalType2 to protobuf object *otg.Ospfv2V4RRExternalType2 + // and doesn't set defaults + msg() *otg.Ospfv2V4RRExternalType2 + // setMsg unmarshals Ospfv2V4RRExternalType2 from protobuf object *otg.Ospfv2V4RRExternalType2 + // and doesn't set defaults + setMsg(*otg.Ospfv2V4RRExternalType2) Ospfv2V4RRExternalType2 + // provides marshal interface + Marshal() marshalOspfv2V4RRExternalType2 + // provides unmarshal interface + Unmarshal() unMarshalOspfv2V4RRExternalType2 + // validate validates Ospfv2V4RRExternalType2 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2V4RRExternalType2, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns Ospfv2V4RRExtdPrefixFlags, set in Ospfv2V4RRExternalType2. + // Ospfv2V4RRExtdPrefixFlags is one-octet field contains flags applicable to the prefix. https://datatracker.ietf.org/doc/html/rfc7684. + Flags() Ospfv2V4RRExtdPrefixFlags + // SetFlags assigns Ospfv2V4RRExtdPrefixFlags provided by user to Ospfv2V4RRExternalType2. + // Ospfv2V4RRExtdPrefixFlags is one-octet field contains flags applicable to the prefix. https://datatracker.ietf.org/doc/html/rfc7684. + SetFlags(value Ospfv2V4RRExtdPrefixFlags) Ospfv2V4RRExternalType2 + // HasFlags checks if Flags has been set in Ospfv2V4RRExternalType2 + HasFlags() bool + setNil() +} + +// One-octet field contains flags applicable to the prefix. +// Flags returns a Ospfv2V4RRExtdPrefixFlags +func (obj *ospfv2V4RRExternalType2) Flags() Ospfv2V4RRExtdPrefixFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewOspfv2V4RRExtdPrefixFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &ospfv2V4RRExtdPrefixFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// One-octet field contains flags applicable to the prefix. +// Flags returns a Ospfv2V4RRExtdPrefixFlags +func (obj *ospfv2V4RRExternalType2) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One-octet field contains flags applicable to the prefix. +// SetFlags sets the Ospfv2V4RRExtdPrefixFlags value in the Ospfv2V4RRExternalType2 object +func (obj *ospfv2V4RRExternalType2) SetFlags(value Ospfv2V4RRExtdPrefixFlags) Ospfv2V4RRExternalType2 { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +func (obj *ospfv2V4RRExternalType2) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + +} + +func (obj *ospfv2V4RRExternalType2) setDefault() { + +} diff --git a/gosnappi/ospfv2_v4rr_inter_area.go b/gosnappi/ospfv2_v4rr_inter_area.go new file mode 100644 index 00000000..1df34692 --- /dev/null +++ b/gosnappi/ospfv2_v4rr_inter_area.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2V4RRInterArea ***** +type ospfv2V4RRInterArea struct { + validation + obj *otg.Ospfv2V4RRInterArea + marshaller marshalOspfv2V4RRInterArea + unMarshaller unMarshalOspfv2V4RRInterArea + flagsHolder Ospfv2V4RRExtdPrefixFlags +} + +func NewOspfv2V4RRInterArea() Ospfv2V4RRInterArea { + obj := ospfv2V4RRInterArea{obj: &otg.Ospfv2V4RRInterArea{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2V4RRInterArea) msg() *otg.Ospfv2V4RRInterArea { + return obj.obj +} + +func (obj *ospfv2V4RRInterArea) setMsg(msg *otg.Ospfv2V4RRInterArea) Ospfv2V4RRInterArea { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2V4RRInterArea struct { + obj *ospfv2V4RRInterArea +} + +type marshalOspfv2V4RRInterArea interface { + // ToProto marshals Ospfv2V4RRInterArea to protobuf object *otg.Ospfv2V4RRInterArea + ToProto() (*otg.Ospfv2V4RRInterArea, error) + // ToPbText marshals Ospfv2V4RRInterArea to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2V4RRInterArea to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2V4RRInterArea to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2V4RRInterArea struct { + obj *ospfv2V4RRInterArea +} + +type unMarshalOspfv2V4RRInterArea interface { + // FromProto unmarshals Ospfv2V4RRInterArea from protobuf object *otg.Ospfv2V4RRInterArea + FromProto(msg *otg.Ospfv2V4RRInterArea) (Ospfv2V4RRInterArea, error) + // FromPbText unmarshals Ospfv2V4RRInterArea from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2V4RRInterArea from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2V4RRInterArea from JSON text + FromJson(value string) error +} + +func (obj *ospfv2V4RRInterArea) Marshal() marshalOspfv2V4RRInterArea { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2V4RRInterArea{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2V4RRInterArea) Unmarshal() unMarshalOspfv2V4RRInterArea { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2V4RRInterArea{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2V4RRInterArea) ToProto() (*otg.Ospfv2V4RRInterArea, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2V4RRInterArea) FromProto(msg *otg.Ospfv2V4RRInterArea) (Ospfv2V4RRInterArea, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2V4RRInterArea) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2V4RRInterArea) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2V4RRInterArea) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RRInterArea) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2V4RRInterArea) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RRInterArea) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2V4RRInterArea) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2V4RRInterArea) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2V4RRInterArea) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2V4RRInterArea) Clone() (Ospfv2V4RRInterArea, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2V4RRInterArea() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2V4RRInterArea) setNil() { + obj.flagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2V4RRInterArea is container for Intra-Area. +type Ospfv2V4RRInterArea interface { + Validation + // msg marshals Ospfv2V4RRInterArea to protobuf object *otg.Ospfv2V4RRInterArea + // and doesn't set defaults + msg() *otg.Ospfv2V4RRInterArea + // setMsg unmarshals Ospfv2V4RRInterArea from protobuf object *otg.Ospfv2V4RRInterArea + // and doesn't set defaults + setMsg(*otg.Ospfv2V4RRInterArea) Ospfv2V4RRInterArea + // provides marshal interface + Marshal() marshalOspfv2V4RRInterArea + // provides unmarshal interface + Unmarshal() unMarshalOspfv2V4RRInterArea + // validate validates Ospfv2V4RRInterArea + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2V4RRInterArea, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns Ospfv2V4RRExtdPrefixFlags, set in Ospfv2V4RRInterArea. + // Ospfv2V4RRExtdPrefixFlags is one-octet field contains flags applicable to the prefix. https://datatracker.ietf.org/doc/html/rfc7684. + Flags() Ospfv2V4RRExtdPrefixFlags + // SetFlags assigns Ospfv2V4RRExtdPrefixFlags provided by user to Ospfv2V4RRInterArea. + // Ospfv2V4RRExtdPrefixFlags is one-octet field contains flags applicable to the prefix. https://datatracker.ietf.org/doc/html/rfc7684. + SetFlags(value Ospfv2V4RRExtdPrefixFlags) Ospfv2V4RRInterArea + // HasFlags checks if Flags has been set in Ospfv2V4RRInterArea + HasFlags() bool + setNil() +} + +// One-octet field contains flags applicable to the prefix. +// Flags returns a Ospfv2V4RRExtdPrefixFlags +func (obj *ospfv2V4RRInterArea) Flags() Ospfv2V4RRExtdPrefixFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewOspfv2V4RRExtdPrefixFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &ospfv2V4RRExtdPrefixFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// One-octet field contains flags applicable to the prefix. +// Flags returns a Ospfv2V4RRExtdPrefixFlags +func (obj *ospfv2V4RRInterArea) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One-octet field contains flags applicable to the prefix. +// SetFlags sets the Ospfv2V4RRExtdPrefixFlags value in the Ospfv2V4RRInterArea object +func (obj *ospfv2V4RRInterArea) SetFlags(value Ospfv2V4RRExtdPrefixFlags) Ospfv2V4RRInterArea { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +func (obj *ospfv2V4RRInterArea) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + +} + +func (obj *ospfv2V4RRInterArea) setDefault() { + +} diff --git a/gosnappi/ospfv2_v4rr_intra_area.go b/gosnappi/ospfv2_v4rr_intra_area.go new file mode 100644 index 00000000..2860c1fc --- /dev/null +++ b/gosnappi/ospfv2_v4rr_intra_area.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2V4RRIntraArea ***** +type ospfv2V4RRIntraArea struct { + validation + obj *otg.Ospfv2V4RRIntraArea + marshaller marshalOspfv2V4RRIntraArea + unMarshaller unMarshalOspfv2V4RRIntraArea + flagsHolder Ospfv2V4RRExtdPrefixFlags +} + +func NewOspfv2V4RRIntraArea() Ospfv2V4RRIntraArea { + obj := ospfv2V4RRIntraArea{obj: &otg.Ospfv2V4RRIntraArea{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2V4RRIntraArea) msg() *otg.Ospfv2V4RRIntraArea { + return obj.obj +} + +func (obj *ospfv2V4RRIntraArea) setMsg(msg *otg.Ospfv2V4RRIntraArea) Ospfv2V4RRIntraArea { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2V4RRIntraArea struct { + obj *ospfv2V4RRIntraArea +} + +type marshalOspfv2V4RRIntraArea interface { + // ToProto marshals Ospfv2V4RRIntraArea to protobuf object *otg.Ospfv2V4RRIntraArea + ToProto() (*otg.Ospfv2V4RRIntraArea, error) + // ToPbText marshals Ospfv2V4RRIntraArea to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2V4RRIntraArea to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2V4RRIntraArea to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2V4RRIntraArea struct { + obj *ospfv2V4RRIntraArea +} + +type unMarshalOspfv2V4RRIntraArea interface { + // FromProto unmarshals Ospfv2V4RRIntraArea from protobuf object *otg.Ospfv2V4RRIntraArea + FromProto(msg *otg.Ospfv2V4RRIntraArea) (Ospfv2V4RRIntraArea, error) + // FromPbText unmarshals Ospfv2V4RRIntraArea from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2V4RRIntraArea from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2V4RRIntraArea from JSON text + FromJson(value string) error +} + +func (obj *ospfv2V4RRIntraArea) Marshal() marshalOspfv2V4RRIntraArea { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2V4RRIntraArea{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2V4RRIntraArea) Unmarshal() unMarshalOspfv2V4RRIntraArea { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2V4RRIntraArea{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2V4RRIntraArea) ToProto() (*otg.Ospfv2V4RRIntraArea, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2V4RRIntraArea) FromProto(msg *otg.Ospfv2V4RRIntraArea) (Ospfv2V4RRIntraArea, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2V4RRIntraArea) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2V4RRIntraArea) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2V4RRIntraArea) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RRIntraArea) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2V4RRIntraArea) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RRIntraArea) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2V4RRIntraArea) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2V4RRIntraArea) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2V4RRIntraArea) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2V4RRIntraArea) Clone() (Ospfv2V4RRIntraArea, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2V4RRIntraArea() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2V4RRIntraArea) setNil() { + obj.flagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2V4RRIntraArea is container for Intra-Area. +type Ospfv2V4RRIntraArea interface { + Validation + // msg marshals Ospfv2V4RRIntraArea to protobuf object *otg.Ospfv2V4RRIntraArea + // and doesn't set defaults + msg() *otg.Ospfv2V4RRIntraArea + // setMsg unmarshals Ospfv2V4RRIntraArea from protobuf object *otg.Ospfv2V4RRIntraArea + // and doesn't set defaults + setMsg(*otg.Ospfv2V4RRIntraArea) Ospfv2V4RRIntraArea + // provides marshal interface + Marshal() marshalOspfv2V4RRIntraArea + // provides unmarshal interface + Unmarshal() unMarshalOspfv2V4RRIntraArea + // validate validates Ospfv2V4RRIntraArea + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2V4RRIntraArea, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns Ospfv2V4RRExtdPrefixFlags, set in Ospfv2V4RRIntraArea. + // Ospfv2V4RRExtdPrefixFlags is one-octet field contains flags applicable to the prefix. https://datatracker.ietf.org/doc/html/rfc7684. + Flags() Ospfv2V4RRExtdPrefixFlags + // SetFlags assigns Ospfv2V4RRExtdPrefixFlags provided by user to Ospfv2V4RRIntraArea. + // Ospfv2V4RRExtdPrefixFlags is one-octet field contains flags applicable to the prefix. https://datatracker.ietf.org/doc/html/rfc7684. + SetFlags(value Ospfv2V4RRExtdPrefixFlags) Ospfv2V4RRIntraArea + // HasFlags checks if Flags has been set in Ospfv2V4RRIntraArea + HasFlags() bool + setNil() +} + +// One-octet field contains flags applicable to the prefix. +// Flags returns a Ospfv2V4RRExtdPrefixFlags +func (obj *ospfv2V4RRIntraArea) Flags() Ospfv2V4RRExtdPrefixFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewOspfv2V4RRExtdPrefixFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &ospfv2V4RRExtdPrefixFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// One-octet field contains flags applicable to the prefix. +// Flags returns a Ospfv2V4RRExtdPrefixFlags +func (obj *ospfv2V4RRIntraArea) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One-octet field contains flags applicable to the prefix. +// SetFlags sets the Ospfv2V4RRExtdPrefixFlags value in the Ospfv2V4RRIntraArea object +func (obj *ospfv2V4RRIntraArea) SetFlags(value Ospfv2V4RRExtdPrefixFlags) Ospfv2V4RRIntraArea { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +func (obj *ospfv2V4RRIntraArea) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + +} + +func (obj *ospfv2V4RRIntraArea) setDefault() { + +} diff --git a/gosnappi/ospfv2_v4rr_nssa_external.go b/gosnappi/ospfv2_v4rr_nssa_external.go new file mode 100644 index 00000000..7d34c054 --- /dev/null +++ b/gosnappi/ospfv2_v4rr_nssa_external.go @@ -0,0 +1,359 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2V4RRNssaExternal ***** +type ospfv2V4RRNssaExternal struct { + validation + obj *otg.Ospfv2V4RRNssaExternal + marshaller marshalOspfv2V4RRNssaExternal + unMarshaller unMarshalOspfv2V4RRNssaExternal + flagsHolder Ospfv2V4RRExtdPrefixFlags +} + +func NewOspfv2V4RRNssaExternal() Ospfv2V4RRNssaExternal { + obj := ospfv2V4RRNssaExternal{obj: &otg.Ospfv2V4RRNssaExternal{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2V4RRNssaExternal) msg() *otg.Ospfv2V4RRNssaExternal { + return obj.obj +} + +func (obj *ospfv2V4RRNssaExternal) setMsg(msg *otg.Ospfv2V4RRNssaExternal) Ospfv2V4RRNssaExternal { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2V4RRNssaExternal struct { + obj *ospfv2V4RRNssaExternal +} + +type marshalOspfv2V4RRNssaExternal interface { + // ToProto marshals Ospfv2V4RRNssaExternal to protobuf object *otg.Ospfv2V4RRNssaExternal + ToProto() (*otg.Ospfv2V4RRNssaExternal, error) + // ToPbText marshals Ospfv2V4RRNssaExternal to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2V4RRNssaExternal to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2V4RRNssaExternal to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2V4RRNssaExternal struct { + obj *ospfv2V4RRNssaExternal +} + +type unMarshalOspfv2V4RRNssaExternal interface { + // FromProto unmarshals Ospfv2V4RRNssaExternal from protobuf object *otg.Ospfv2V4RRNssaExternal + FromProto(msg *otg.Ospfv2V4RRNssaExternal) (Ospfv2V4RRNssaExternal, error) + // FromPbText unmarshals Ospfv2V4RRNssaExternal from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2V4RRNssaExternal from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2V4RRNssaExternal from JSON text + FromJson(value string) error +} + +func (obj *ospfv2V4RRNssaExternal) Marshal() marshalOspfv2V4RRNssaExternal { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2V4RRNssaExternal{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2V4RRNssaExternal) Unmarshal() unMarshalOspfv2V4RRNssaExternal { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2V4RRNssaExternal{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2V4RRNssaExternal) ToProto() (*otg.Ospfv2V4RRNssaExternal, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2V4RRNssaExternal) FromProto(msg *otg.Ospfv2V4RRNssaExternal) (Ospfv2V4RRNssaExternal, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2V4RRNssaExternal) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2V4RRNssaExternal) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2V4RRNssaExternal) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RRNssaExternal) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2V4RRNssaExternal) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RRNssaExternal) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2V4RRNssaExternal) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2V4RRNssaExternal) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2V4RRNssaExternal) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2V4RRNssaExternal) Clone() (Ospfv2V4RRNssaExternal, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2V4RRNssaExternal() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2V4RRNssaExternal) setNil() { + obj.flagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2V4RRNssaExternal is container for Intra-Area. +type Ospfv2V4RRNssaExternal interface { + Validation + // msg marshals Ospfv2V4RRNssaExternal to protobuf object *otg.Ospfv2V4RRNssaExternal + // and doesn't set defaults + msg() *otg.Ospfv2V4RRNssaExternal + // setMsg unmarshals Ospfv2V4RRNssaExternal from protobuf object *otg.Ospfv2V4RRNssaExternal + // and doesn't set defaults + setMsg(*otg.Ospfv2V4RRNssaExternal) Ospfv2V4RRNssaExternal + // provides marshal interface + Marshal() marshalOspfv2V4RRNssaExternal + // provides unmarshal interface + Unmarshal() unMarshalOspfv2V4RRNssaExternal + // validate validates Ospfv2V4RRNssaExternal + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2V4RRNssaExternal, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns Ospfv2V4RRExtdPrefixFlags, set in Ospfv2V4RRNssaExternal. + // Ospfv2V4RRExtdPrefixFlags is one-octet field contains flags applicable to the prefix. https://datatracker.ietf.org/doc/html/rfc7684. + Flags() Ospfv2V4RRExtdPrefixFlags + // SetFlags assigns Ospfv2V4RRExtdPrefixFlags provided by user to Ospfv2V4RRNssaExternal. + // Ospfv2V4RRExtdPrefixFlags is one-octet field contains flags applicable to the prefix. https://datatracker.ietf.org/doc/html/rfc7684. + SetFlags(value Ospfv2V4RRExtdPrefixFlags) Ospfv2V4RRNssaExternal + // HasFlags checks if Flags has been set in Ospfv2V4RRNssaExternal + HasFlags() bool + // Propagation returns bool, set in Ospfv2V4RRNssaExternal. + Propagation() bool + // SetPropagation assigns bool provided by user to Ospfv2V4RRNssaExternal + SetPropagation(value bool) Ospfv2V4RRNssaExternal + // HasPropagation checks if Propagation has been set in Ospfv2V4RRNssaExternal + HasPropagation() bool + setNil() +} + +// One-octet field contains flags applicable to the prefix. +// Flags returns a Ospfv2V4RRExtdPrefixFlags +func (obj *ospfv2V4RRNssaExternal) Flags() Ospfv2V4RRExtdPrefixFlags { + if obj.obj.Flags == nil { + obj.obj.Flags = NewOspfv2V4RRExtdPrefixFlags().msg() + } + if obj.flagsHolder == nil { + obj.flagsHolder = &ospfv2V4RRExtdPrefixFlags{obj: obj.obj.Flags} + } + return obj.flagsHolder +} + +// One-octet field contains flags applicable to the prefix. +// Flags returns a Ospfv2V4RRExtdPrefixFlags +func (obj *ospfv2V4RRNssaExternal) HasFlags() bool { + return obj.obj.Flags != nil +} + +// One-octet field contains flags applicable to the prefix. +// SetFlags sets the Ospfv2V4RRExtdPrefixFlags value in the Ospfv2V4RRNssaExternal object +func (obj *ospfv2V4RRNssaExternal) SetFlags(value Ospfv2V4RRExtdPrefixFlags) Ospfv2V4RRNssaExternal { + + obj.flagsHolder = nil + obj.obj.Flags = value.msg() + + return obj +} + +// The flag is set True if LSA will be propagated between Areas. +// Propagation returns a bool +func (obj *ospfv2V4RRNssaExternal) Propagation() bool { + + return *obj.obj.Propagation + +} + +// The flag is set True if LSA will be propagated between Areas. +// Propagation returns a bool +func (obj *ospfv2V4RRNssaExternal) HasPropagation() bool { + return obj.obj.Propagation != nil +} + +// The flag is set True if LSA will be propagated between Areas. +// SetPropagation sets the bool value in the Ospfv2V4RRNssaExternal object +func (obj *ospfv2V4RRNssaExternal) SetPropagation(value bool) Ospfv2V4RRNssaExternal { + + obj.obj.Propagation = &value + return obj +} + +func (obj *ospfv2V4RRNssaExternal) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + obj.Flags().validateObj(vObj, set_default) + } + +} + +func (obj *ospfv2V4RRNssaExternal) setDefault() { + if obj.obj.Propagation == nil { + obj.SetPropagation(false) + } + +} diff --git a/gosnappi/ospfv2_v4rr_route_origin.go b/gosnappi/ospfv2_v4rr_route_origin.go new file mode 100644 index 00000000..3d59b7f3 --- /dev/null +++ b/gosnappi/ospfv2_v4rr_route_origin.go @@ -0,0 +1,621 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Ospfv2V4RRRouteOrigin ***** +type ospfv2V4RRRouteOrigin struct { + validation + obj *otg.Ospfv2V4RRRouteOrigin + marshaller marshalOspfv2V4RRRouteOrigin + unMarshaller unMarshalOspfv2V4RRRouteOrigin + intraAreaHolder Ospfv2V4RRIntraArea + interAreaHolder Ospfv2V4RRInterArea + externalType_1Holder Ospfv2V4RRExternalType1 + externalType_2Holder Ospfv2V4RRExternalType2 + nssaExternalHolder Ospfv2V4RRNssaExternal +} + +func NewOspfv2V4RRRouteOrigin() Ospfv2V4RRRouteOrigin { + obj := ospfv2V4RRRouteOrigin{obj: &otg.Ospfv2V4RRRouteOrigin{}} + obj.setDefault() + return &obj +} + +func (obj *ospfv2V4RRRouteOrigin) msg() *otg.Ospfv2V4RRRouteOrigin { + return obj.obj +} + +func (obj *ospfv2V4RRRouteOrigin) setMsg(msg *otg.Ospfv2V4RRRouteOrigin) Ospfv2V4RRRouteOrigin { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalospfv2V4RRRouteOrigin struct { + obj *ospfv2V4RRRouteOrigin +} + +type marshalOspfv2V4RRRouteOrigin interface { + // ToProto marshals Ospfv2V4RRRouteOrigin to protobuf object *otg.Ospfv2V4RRRouteOrigin + ToProto() (*otg.Ospfv2V4RRRouteOrigin, error) + // ToPbText marshals Ospfv2V4RRRouteOrigin to protobuf text + ToPbText() (string, error) + // ToYaml marshals Ospfv2V4RRRouteOrigin to YAML text + ToYaml() (string, error) + // ToJson marshals Ospfv2V4RRRouteOrigin to JSON text + ToJson() (string, error) +} + +type unMarshalospfv2V4RRRouteOrigin struct { + obj *ospfv2V4RRRouteOrigin +} + +type unMarshalOspfv2V4RRRouteOrigin interface { + // FromProto unmarshals Ospfv2V4RRRouteOrigin from protobuf object *otg.Ospfv2V4RRRouteOrigin + FromProto(msg *otg.Ospfv2V4RRRouteOrigin) (Ospfv2V4RRRouteOrigin, error) + // FromPbText unmarshals Ospfv2V4RRRouteOrigin from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Ospfv2V4RRRouteOrigin from YAML text + FromYaml(value string) error + // FromJson unmarshals Ospfv2V4RRRouteOrigin from JSON text + FromJson(value string) error +} + +func (obj *ospfv2V4RRRouteOrigin) Marshal() marshalOspfv2V4RRRouteOrigin { + if obj.marshaller == nil { + obj.marshaller = &marshalospfv2V4RRRouteOrigin{obj: obj} + } + return obj.marshaller +} + +func (obj *ospfv2V4RRRouteOrigin) Unmarshal() unMarshalOspfv2V4RRRouteOrigin { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalospfv2V4RRRouteOrigin{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalospfv2V4RRRouteOrigin) ToProto() (*otg.Ospfv2V4RRRouteOrigin, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalospfv2V4RRRouteOrigin) FromProto(msg *otg.Ospfv2V4RRRouteOrigin) (Ospfv2V4RRRouteOrigin, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalospfv2V4RRRouteOrigin) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalospfv2V4RRRouteOrigin) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalospfv2V4RRRouteOrigin) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RRRouteOrigin) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalospfv2V4RRRouteOrigin) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalospfv2V4RRRouteOrigin) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *ospfv2V4RRRouteOrigin) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *ospfv2V4RRRouteOrigin) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *ospfv2V4RRRouteOrigin) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *ospfv2V4RRRouteOrigin) Clone() (Ospfv2V4RRRouteOrigin, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewOspfv2V4RRRouteOrigin() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *ospfv2V4RRRouteOrigin) setNil() { + obj.intraAreaHolder = nil + obj.interAreaHolder = nil + obj.externalType_1Holder = nil + obj.externalType_2Holder = nil + obj.nssaExternalHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// Ospfv2V4RRRouteOrigin is container of type of the OSPFv2 types correspond directly to the OSPFv2 LSAs types as +// defined in the "OSPFv2 Link State (LS) Type - http://www.iana.org/assignments/ospfv2-parameters. +type Ospfv2V4RRRouteOrigin interface { + Validation + // msg marshals Ospfv2V4RRRouteOrigin to protobuf object *otg.Ospfv2V4RRRouteOrigin + // and doesn't set defaults + msg() *otg.Ospfv2V4RRRouteOrigin + // setMsg unmarshals Ospfv2V4RRRouteOrigin from protobuf object *otg.Ospfv2V4RRRouteOrigin + // and doesn't set defaults + setMsg(*otg.Ospfv2V4RRRouteOrigin) Ospfv2V4RRRouteOrigin + // provides marshal interface + Marshal() marshalOspfv2V4RRRouteOrigin + // provides unmarshal interface + Unmarshal() unMarshalOspfv2V4RRRouteOrigin + // validate validates Ospfv2V4RRRouteOrigin + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Ospfv2V4RRRouteOrigin, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns Ospfv2V4RRRouteOriginChoiceEnum, set in Ospfv2V4RRRouteOrigin + Choice() Ospfv2V4RRRouteOriginChoiceEnum + // setChoice assigns Ospfv2V4RRRouteOriginChoiceEnum provided by user to Ospfv2V4RRRouteOrigin + setChoice(value Ospfv2V4RRRouteOriginChoiceEnum) Ospfv2V4RRRouteOrigin + // HasChoice checks if Choice has been set in Ospfv2V4RRRouteOrigin + HasChoice() bool + // IntraArea returns Ospfv2V4RRIntraArea, set in Ospfv2V4RRRouteOrigin. + // Ospfv2V4RRIntraArea is container for Intra-Area. + IntraArea() Ospfv2V4RRIntraArea + // SetIntraArea assigns Ospfv2V4RRIntraArea provided by user to Ospfv2V4RRRouteOrigin. + // Ospfv2V4RRIntraArea is container for Intra-Area. + SetIntraArea(value Ospfv2V4RRIntraArea) Ospfv2V4RRRouteOrigin + // HasIntraArea checks if IntraArea has been set in Ospfv2V4RRRouteOrigin + HasIntraArea() bool + // InterArea returns Ospfv2V4RRInterArea, set in Ospfv2V4RRRouteOrigin. + // Ospfv2V4RRInterArea is container for Intra-Area. + InterArea() Ospfv2V4RRInterArea + // SetInterArea assigns Ospfv2V4RRInterArea provided by user to Ospfv2V4RRRouteOrigin. + // Ospfv2V4RRInterArea is container for Intra-Area. + SetInterArea(value Ospfv2V4RRInterArea) Ospfv2V4RRRouteOrigin + // HasInterArea checks if InterArea has been set in Ospfv2V4RRRouteOrigin + HasInterArea() bool + // ExternalType1 returns Ospfv2V4RRExternalType1, set in Ospfv2V4RRRouteOrigin. + // Ospfv2V4RRExternalType1 is container for Intra-Area. + ExternalType1() Ospfv2V4RRExternalType1 + // SetExternalType1 assigns Ospfv2V4RRExternalType1 provided by user to Ospfv2V4RRRouteOrigin. + // Ospfv2V4RRExternalType1 is container for Intra-Area. + SetExternalType1(value Ospfv2V4RRExternalType1) Ospfv2V4RRRouteOrigin + // HasExternalType1 checks if ExternalType1 has been set in Ospfv2V4RRRouteOrigin + HasExternalType1() bool + // ExternalType2 returns Ospfv2V4RRExternalType2, set in Ospfv2V4RRRouteOrigin. + // Ospfv2V4RRExternalType2 is container for Intra-Area. + ExternalType2() Ospfv2V4RRExternalType2 + // SetExternalType2 assigns Ospfv2V4RRExternalType2 provided by user to Ospfv2V4RRRouteOrigin. + // Ospfv2V4RRExternalType2 is container for Intra-Area. + SetExternalType2(value Ospfv2V4RRExternalType2) Ospfv2V4RRRouteOrigin + // HasExternalType2 checks if ExternalType2 has been set in Ospfv2V4RRRouteOrigin + HasExternalType2() bool + // NssaExternal returns Ospfv2V4RRNssaExternal, set in Ospfv2V4RRRouteOrigin. + // Ospfv2V4RRNssaExternal is container for Intra-Area. + NssaExternal() Ospfv2V4RRNssaExternal + // SetNssaExternal assigns Ospfv2V4RRNssaExternal provided by user to Ospfv2V4RRRouteOrigin. + // Ospfv2V4RRNssaExternal is container for Intra-Area. + SetNssaExternal(value Ospfv2V4RRNssaExternal) Ospfv2V4RRRouteOrigin + // HasNssaExternal checks if NssaExternal has been set in Ospfv2V4RRRouteOrigin + HasNssaExternal() bool + setNil() +} + +type Ospfv2V4RRRouteOriginChoiceEnum string + +// Enum of Choice on Ospfv2V4RRRouteOrigin +var Ospfv2V4RRRouteOriginChoice = struct { + INTRA_AREA Ospfv2V4RRRouteOriginChoiceEnum + INTER_AREA Ospfv2V4RRRouteOriginChoiceEnum + EXTERNAL_TYPE_1 Ospfv2V4RRRouteOriginChoiceEnum + EXTERNAL_TYPE_2 Ospfv2V4RRRouteOriginChoiceEnum + NSSA_EXTERNAL Ospfv2V4RRRouteOriginChoiceEnum +}{ + INTRA_AREA: Ospfv2V4RRRouteOriginChoiceEnum("intra_area"), + INTER_AREA: Ospfv2V4RRRouteOriginChoiceEnum("inter_area"), + EXTERNAL_TYPE_1: Ospfv2V4RRRouteOriginChoiceEnum("external_type_1"), + EXTERNAL_TYPE_2: Ospfv2V4RRRouteOriginChoiceEnum("external_type_2"), + NSSA_EXTERNAL: Ospfv2V4RRRouteOriginChoiceEnum("nssa_external"), +} + +func (obj *ospfv2V4RRRouteOrigin) Choice() Ospfv2V4RRRouteOriginChoiceEnum { + return Ospfv2V4RRRouteOriginChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// Supported types are: - intra_area: for Intra-Area. - inter_area: for Inter Area. - external_type_1: for Autonomous System (AS) External with internal AS meteric. - external_type_2: for Autonomous System (AS) External with internal and external AS meteric. - nssa_external: for 7 Not-So-Stubby Area (NSSA) External. +// Choice returns a string +func (obj *ospfv2V4RRRouteOrigin) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *ospfv2V4RRRouteOrigin) setChoice(value Ospfv2V4RRRouteOriginChoiceEnum) Ospfv2V4RRRouteOrigin { + intValue, ok := otg.Ospfv2V4RRRouteOrigin_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on Ospfv2V4RRRouteOriginChoiceEnum", string(value))) + return obj + } + enumValue := otg.Ospfv2V4RRRouteOrigin_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.NssaExternal = nil + obj.nssaExternalHolder = nil + obj.obj.ExternalType_2 = nil + obj.externalType_2Holder = nil + obj.obj.ExternalType_1 = nil + obj.externalType_1Holder = nil + obj.obj.InterArea = nil + obj.interAreaHolder = nil + obj.obj.IntraArea = nil + obj.intraAreaHolder = nil + + if value == Ospfv2V4RRRouteOriginChoice.INTRA_AREA { + obj.obj.IntraArea = NewOspfv2V4RRIntraArea().msg() + } + + if value == Ospfv2V4RRRouteOriginChoice.INTER_AREA { + obj.obj.InterArea = NewOspfv2V4RRInterArea().msg() + } + + if value == Ospfv2V4RRRouteOriginChoice.EXTERNAL_TYPE_1 { + obj.obj.ExternalType_1 = NewOspfv2V4RRExternalType1().msg() + } + + if value == Ospfv2V4RRRouteOriginChoice.EXTERNAL_TYPE_2 { + obj.obj.ExternalType_2 = NewOspfv2V4RRExternalType2().msg() + } + + if value == Ospfv2V4RRRouteOriginChoice.NSSA_EXTERNAL { + obj.obj.NssaExternal = NewOspfv2V4RRNssaExternal().msg() + } + + return obj +} + +// Configuration for the Intra-Area. +// IntraArea returns a Ospfv2V4RRIntraArea +func (obj *ospfv2V4RRRouteOrigin) IntraArea() Ospfv2V4RRIntraArea { + if obj.obj.IntraArea == nil { + obj.setChoice(Ospfv2V4RRRouteOriginChoice.INTRA_AREA) + } + if obj.intraAreaHolder == nil { + obj.intraAreaHolder = &ospfv2V4RRIntraArea{obj: obj.obj.IntraArea} + } + return obj.intraAreaHolder +} + +// Configuration for the Intra-Area. +// IntraArea returns a Ospfv2V4RRIntraArea +func (obj *ospfv2V4RRRouteOrigin) HasIntraArea() bool { + return obj.obj.IntraArea != nil +} + +// Configuration for the Intra-Area. +// SetIntraArea sets the Ospfv2V4RRIntraArea value in the Ospfv2V4RRRouteOrigin object +func (obj *ospfv2V4RRRouteOrigin) SetIntraArea(value Ospfv2V4RRIntraArea) Ospfv2V4RRRouteOrigin { + obj.setChoice(Ospfv2V4RRRouteOriginChoice.INTRA_AREA) + obj.intraAreaHolder = nil + obj.obj.IntraArea = value.msg() + + return obj +} + +// Configuration for the Intra-Area. +// InterArea returns a Ospfv2V4RRInterArea +func (obj *ospfv2V4RRRouteOrigin) InterArea() Ospfv2V4RRInterArea { + if obj.obj.InterArea == nil { + obj.setChoice(Ospfv2V4RRRouteOriginChoice.INTER_AREA) + } + if obj.interAreaHolder == nil { + obj.interAreaHolder = &ospfv2V4RRInterArea{obj: obj.obj.InterArea} + } + return obj.interAreaHolder +} + +// Configuration for the Intra-Area. +// InterArea returns a Ospfv2V4RRInterArea +func (obj *ospfv2V4RRRouteOrigin) HasInterArea() bool { + return obj.obj.InterArea != nil +} + +// Configuration for the Intra-Area. +// SetInterArea sets the Ospfv2V4RRInterArea value in the Ospfv2V4RRRouteOrigin object +func (obj *ospfv2V4RRRouteOrigin) SetInterArea(value Ospfv2V4RRInterArea) Ospfv2V4RRRouteOrigin { + obj.setChoice(Ospfv2V4RRRouteOriginChoice.INTER_AREA) + obj.interAreaHolder = nil + obj.obj.InterArea = value.msg() + + return obj +} + +// Configuration for the External Type 1. +// ExternalType1 returns a Ospfv2V4RRExternalType1 +func (obj *ospfv2V4RRRouteOrigin) ExternalType1() Ospfv2V4RRExternalType1 { + if obj.obj.ExternalType_1 == nil { + obj.setChoice(Ospfv2V4RRRouteOriginChoice.EXTERNAL_TYPE_1) + } + if obj.externalType_1Holder == nil { + obj.externalType_1Holder = &ospfv2V4RRExternalType1{obj: obj.obj.ExternalType_1} + } + return obj.externalType_1Holder +} + +// Configuration for the External Type 1. +// ExternalType1 returns a Ospfv2V4RRExternalType1 +func (obj *ospfv2V4RRRouteOrigin) HasExternalType1() bool { + return obj.obj.ExternalType_1 != nil +} + +// Configuration for the External Type 1. +// SetExternalType1 sets the Ospfv2V4RRExternalType1 value in the Ospfv2V4RRRouteOrigin object +func (obj *ospfv2V4RRRouteOrigin) SetExternalType1(value Ospfv2V4RRExternalType1) Ospfv2V4RRRouteOrigin { + obj.setChoice(Ospfv2V4RRRouteOriginChoice.EXTERNAL_TYPE_1) + obj.externalType_1Holder = nil + obj.obj.ExternalType_1 = value.msg() + + return obj +} + +// Configuration for the External Type 2. +// ExternalType2 returns a Ospfv2V4RRExternalType2 +func (obj *ospfv2V4RRRouteOrigin) ExternalType2() Ospfv2V4RRExternalType2 { + if obj.obj.ExternalType_2 == nil { + obj.setChoice(Ospfv2V4RRRouteOriginChoice.EXTERNAL_TYPE_2) + } + if obj.externalType_2Holder == nil { + obj.externalType_2Holder = &ospfv2V4RRExternalType2{obj: obj.obj.ExternalType_2} + } + return obj.externalType_2Holder +} + +// Configuration for the External Type 2. +// ExternalType2 returns a Ospfv2V4RRExternalType2 +func (obj *ospfv2V4RRRouteOrigin) HasExternalType2() bool { + return obj.obj.ExternalType_2 != nil +} + +// Configuration for the External Type 2. +// SetExternalType2 sets the Ospfv2V4RRExternalType2 value in the Ospfv2V4RRRouteOrigin object +func (obj *ospfv2V4RRRouteOrigin) SetExternalType2(value Ospfv2V4RRExternalType2) Ospfv2V4RRRouteOrigin { + obj.setChoice(Ospfv2V4RRRouteOriginChoice.EXTERNAL_TYPE_2) + obj.externalType_2Holder = nil + obj.obj.ExternalType_2 = value.msg() + + return obj +} + +// Configuration for the External Type 2. +// NssaExternal returns a Ospfv2V4RRNssaExternal +func (obj *ospfv2V4RRRouteOrigin) NssaExternal() Ospfv2V4RRNssaExternal { + if obj.obj.NssaExternal == nil { + obj.setChoice(Ospfv2V4RRRouteOriginChoice.NSSA_EXTERNAL) + } + if obj.nssaExternalHolder == nil { + obj.nssaExternalHolder = &ospfv2V4RRNssaExternal{obj: obj.obj.NssaExternal} + } + return obj.nssaExternalHolder +} + +// Configuration for the External Type 2. +// NssaExternal returns a Ospfv2V4RRNssaExternal +func (obj *ospfv2V4RRRouteOrigin) HasNssaExternal() bool { + return obj.obj.NssaExternal != nil +} + +// Configuration for the External Type 2. +// SetNssaExternal sets the Ospfv2V4RRNssaExternal value in the Ospfv2V4RRRouteOrigin object +func (obj *ospfv2V4RRRouteOrigin) SetNssaExternal(value Ospfv2V4RRNssaExternal) Ospfv2V4RRRouteOrigin { + obj.setChoice(Ospfv2V4RRRouteOriginChoice.NSSA_EXTERNAL) + obj.nssaExternalHolder = nil + obj.obj.NssaExternal = value.msg() + + return obj +} + +func (obj *ospfv2V4RRRouteOrigin) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.IntraArea != nil { + + obj.IntraArea().validateObj(vObj, set_default) + } + + if obj.obj.InterArea != nil { + + obj.InterArea().validateObj(vObj, set_default) + } + + if obj.obj.ExternalType_1 != nil { + + obj.ExternalType1().validateObj(vObj, set_default) + } + + if obj.obj.ExternalType_2 != nil { + + obj.ExternalType2().validateObj(vObj, set_default) + } + + if obj.obj.NssaExternal != nil { + + obj.NssaExternal().validateObj(vObj, set_default) + } + +} + +func (obj *ospfv2V4RRRouteOrigin) setDefault() { + var choices_set int = 0 + var choice Ospfv2V4RRRouteOriginChoiceEnum + + if obj.obj.IntraArea != nil { + choices_set += 1 + choice = Ospfv2V4RRRouteOriginChoice.INTRA_AREA + } + + if obj.obj.InterArea != nil { + choices_set += 1 + choice = Ospfv2V4RRRouteOriginChoice.INTER_AREA + } + + if obj.obj.NssaExternal != nil { + choices_set += 1 + choice = Ospfv2V4RRRouteOriginChoice.NSSA_EXTERNAL + } + + if obj.obj.ExternalType_1 != nil { + choices_set += 1 + choice = Ospfv2V4RRRouteOriginChoice.EXTERNAL_TYPE_1 + } + + if obj.obj.ExternalType_2 != nil { + choices_set += 1 + choice = Ospfv2V4RRRouteOriginChoice.EXTERNAL_TYPE_2 + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(Ospfv2V4RRRouteOriginChoice.INTER_AREA) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in Ospfv2V4RRRouteOrigin") + } + } else { + intVal := otg.Ospfv2V4RRRouteOrigin_Choice_Enum_value[string(choice)] + enumValue := otg.Ospfv2V4RRRouteOrigin_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/otg/otg.pb.go b/gosnappi/otg/otg.pb.go index 30f221f6..b37c268d 100644 --- a/gosnappi/otg/otg.pb.go +++ b/gosnappi/otg/otg.pb.go @@ -1,4 +1,4 @@ -// Open Traffic Generator API 1.1.0 +// Open Traffic Generator API 1.17.0 // Open Traffic Generator API defines a model-driven, vendor-neutral and standard // interface for emulating layer 2-7 network devices and generating test traffic. // @@ -135,10 +135,11 @@ func (LagPortLacp_ActorActivity_Enum) EnumDescriptor() ([]byte, []int) { type EthernetConnection_Choice_Enum int32 const ( - EthernetConnection_Choice_unspecified EthernetConnection_Choice_Enum = 0 - EthernetConnection_Choice_port_name EthernetConnection_Choice_Enum = 1 - EthernetConnection_Choice_lag_name EthernetConnection_Choice_Enum = 2 - EthernetConnection_Choice_vxlan_name EthernetConnection_Choice_Enum = 3 + EthernetConnection_Choice_unspecified EthernetConnection_Choice_Enum = 0 + EthernetConnection_Choice_port_name EthernetConnection_Choice_Enum = 1 + EthernetConnection_Choice_lag_name EthernetConnection_Choice_Enum = 2 + EthernetConnection_Choice_vxlan_name EthernetConnection_Choice_Enum = 3 + EthernetConnection_Choice_simulated_link EthernetConnection_Choice_Enum = 4 ) // Enum value maps for EthernetConnection_Choice_Enum. @@ -148,12 +149,14 @@ var ( 1: "port_name", 2: "lag_name", 3: "vxlan_name", + 4: "simulated_link", } EthernetConnection_Choice_Enum_value = map[string]int32{ - "unspecified": 0, - "port_name": 1, - "lag_name": 2, - "vxlan_name": 3, + "unspecified": 0, + "port_name": 1, + "lag_name": 2, + "vxlan_name": 3, + "simulated_link": 4, } ) @@ -184,6 +187,55 @@ func (EthernetConnection_Choice_Enum) EnumDescriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{12, 0, 0} } +type EthernetSimulatedLink_LinkType_Enum int32 + +const ( + EthernetSimulatedLink_LinkType_unspecified EthernetSimulatedLink_LinkType_Enum = 0 + EthernetSimulatedLink_LinkType_primary EthernetSimulatedLink_LinkType_Enum = 1 + EthernetSimulatedLink_LinkType_secondary EthernetSimulatedLink_LinkType_Enum = 2 +) + +// Enum value maps for EthernetSimulatedLink_LinkType_Enum. +var ( + EthernetSimulatedLink_LinkType_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "primary", + 2: "secondary", + } + EthernetSimulatedLink_LinkType_Enum_value = map[string]int32{ + "unspecified": 0, + "primary": 1, + "secondary": 2, + } +) + +func (x EthernetSimulatedLink_LinkType_Enum) Enum() *EthernetSimulatedLink_LinkType_Enum { + p := new(EthernetSimulatedLink_LinkType_Enum) + *p = x + return p +} + +func (x EthernetSimulatedLink_LinkType_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EthernetSimulatedLink_LinkType_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[3].Descriptor() +} + +func (EthernetSimulatedLink_LinkType_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[3] +} + +func (x EthernetSimulatedLink_LinkType_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EthernetSimulatedLink_LinkType_Enum.Descriptor instead. +func (EthernetSimulatedLink_LinkType_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{13, 0, 0} +} + type DeviceVlan_Tpid_Enum int32 const ( @@ -226,11 +278,11 @@ func (x DeviceVlan_Tpid_Enum) String() string { } func (DeviceVlan_Tpid_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[3].Descriptor() + return file_otg_proto_enumTypes[4].Descriptor() } func (DeviceVlan_Tpid_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[3] + return &file_otg_proto_enumTypes[4] } func (x DeviceVlan_Tpid_Enum) Number() protoreflect.EnumNumber { @@ -239,7 +291,7 @@ func (x DeviceVlan_Tpid_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use DeviceVlan_Tpid_Enum.Descriptor instead. func (DeviceVlan_Tpid_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{13, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{14, 0, 0} } type DeviceIpv4GatewayMAC_Choice_Enum int32 @@ -275,11 +327,11 @@ func (x DeviceIpv4GatewayMAC_Choice_Enum) String() string { } func (DeviceIpv4GatewayMAC_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[4].Descriptor() + return file_otg_proto_enumTypes[5].Descriptor() } func (DeviceIpv4GatewayMAC_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[4] + return &file_otg_proto_enumTypes[5] } func (x DeviceIpv4GatewayMAC_Choice_Enum) Number() protoreflect.EnumNumber { @@ -288,7 +340,7 @@ func (x DeviceIpv4GatewayMAC_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use DeviceIpv4GatewayMAC_Choice_Enum.Descriptor instead. func (DeviceIpv4GatewayMAC_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{16, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{17, 0, 0} } type DeviceIpv6GatewayMAC_Choice_Enum int32 @@ -324,11 +376,11 @@ func (x DeviceIpv6GatewayMAC_Choice_Enum) String() string { } func (DeviceIpv6GatewayMAC_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[5].Descriptor() + return file_otg_proto_enumTypes[6].Descriptor() } func (DeviceIpv6GatewayMAC_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[5] + return &file_otg_proto_enumTypes[6] } func (x DeviceIpv6GatewayMAC_Choice_Enum) Number() protoreflect.EnumNumber { @@ -337,7 +389,603 @@ func (x DeviceIpv6GatewayMAC_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use DeviceIpv6GatewayMAC_Choice_Enum.Descriptor instead. func (DeviceIpv6GatewayMAC_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{19, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{20, 0, 0} +} + +type DeviceDhcpv4Client_Choice_Enum int32 + +const ( + DeviceDhcpv4Client_Choice_unspecified DeviceDhcpv4Client_Choice_Enum = 0 + DeviceDhcpv4Client_Choice_first_server DeviceDhcpv4Client_Choice_Enum = 1 + DeviceDhcpv4Client_Choice_server_address DeviceDhcpv4Client_Choice_Enum = 2 +) + +// Enum value maps for DeviceDhcpv4Client_Choice_Enum. +var ( + DeviceDhcpv4Client_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "first_server", + 2: "server_address", + } + DeviceDhcpv4Client_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "first_server": 1, + "server_address": 2, + } +) + +func (x DeviceDhcpv4Client_Choice_Enum) Enum() *DeviceDhcpv4Client_Choice_Enum { + p := new(DeviceDhcpv4Client_Choice_Enum) + *p = x + return p +} + +func (x DeviceDhcpv4Client_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeviceDhcpv4Client_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[7].Descriptor() +} + +func (DeviceDhcpv4Client_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[7] +} + +func (x DeviceDhcpv4Client_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeviceDhcpv4Client_Choice_Enum.Descriptor instead. +func (DeviceDhcpv4Client_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{21, 0, 0} +} + +type DeviceDhcpv6ClientIaType_Choice_Enum int32 + +const ( + DeviceDhcpv6ClientIaType_Choice_unspecified DeviceDhcpv6ClientIaType_Choice_Enum = 0 + DeviceDhcpv6ClientIaType_Choice_iana DeviceDhcpv6ClientIaType_Choice_Enum = 1 + DeviceDhcpv6ClientIaType_Choice_iata DeviceDhcpv6ClientIaType_Choice_Enum = 2 + DeviceDhcpv6ClientIaType_Choice_iapd DeviceDhcpv6ClientIaType_Choice_Enum = 3 + DeviceDhcpv6ClientIaType_Choice_ianapd DeviceDhcpv6ClientIaType_Choice_Enum = 4 +) + +// Enum value maps for DeviceDhcpv6ClientIaType_Choice_Enum. +var ( + DeviceDhcpv6ClientIaType_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "iana", + 2: "iata", + 3: "iapd", + 4: "ianapd", + } + DeviceDhcpv6ClientIaType_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "iana": 1, + "iata": 2, + "iapd": 3, + "ianapd": 4, + } +) + +func (x DeviceDhcpv6ClientIaType_Choice_Enum) Enum() *DeviceDhcpv6ClientIaType_Choice_Enum { + p := new(DeviceDhcpv6ClientIaType_Choice_Enum) + *p = x + return p +} + +func (x DeviceDhcpv6ClientIaType_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeviceDhcpv6ClientIaType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[8].Descriptor() +} + +func (DeviceDhcpv6ClientIaType_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[8] +} + +func (x DeviceDhcpv6ClientIaType_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeviceDhcpv6ClientIaType_Choice_Enum.Descriptor instead. +func (DeviceDhcpv6ClientIaType_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{26, 0, 0} +} + +type DeviceDhcpv6ClientDuidType_Choice_Enum int32 + +const ( + DeviceDhcpv6ClientDuidType_Choice_unspecified DeviceDhcpv6ClientDuidType_Choice_Enum = 0 + DeviceDhcpv6ClientDuidType_Choice_llt DeviceDhcpv6ClientDuidType_Choice_Enum = 1 + DeviceDhcpv6ClientDuidType_Choice_en DeviceDhcpv6ClientDuidType_Choice_Enum = 2 + DeviceDhcpv6ClientDuidType_Choice_ll DeviceDhcpv6ClientDuidType_Choice_Enum = 3 +) + +// Enum value maps for DeviceDhcpv6ClientDuidType_Choice_Enum. +var ( + DeviceDhcpv6ClientDuidType_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "llt", + 2: "en", + 3: "ll", + } + DeviceDhcpv6ClientDuidType_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "llt": 1, + "en": 2, + "ll": 3, + } +) + +func (x DeviceDhcpv6ClientDuidType_Choice_Enum) Enum() *DeviceDhcpv6ClientDuidType_Choice_Enum { + p := new(DeviceDhcpv6ClientDuidType_Choice_Enum) + *p = x + return p +} + +func (x DeviceDhcpv6ClientDuidType_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeviceDhcpv6ClientDuidType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[9].Descriptor() +} + +func (DeviceDhcpv6ClientDuidType_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[9] +} + +func (x DeviceDhcpv6ClientDuidType_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeviceDhcpv6ClientDuidType_Choice_Enum.Descriptor instead. +func (DeviceDhcpv6ClientDuidType_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{28, 0, 0} +} + +type Dhcpv6ClientOptionsServerIdentifier_Choice_Enum int32 + +const ( + Dhcpv6ClientOptionsServerIdentifier_Choice_unspecified Dhcpv6ClientOptionsServerIdentifier_Choice_Enum = 0 + Dhcpv6ClientOptionsServerIdentifier_Choice_duid_llt Dhcpv6ClientOptionsServerIdentifier_Choice_Enum = 1 + Dhcpv6ClientOptionsServerIdentifier_Choice_duid_en Dhcpv6ClientOptionsServerIdentifier_Choice_Enum = 2 + Dhcpv6ClientOptionsServerIdentifier_Choice_duid_ll Dhcpv6ClientOptionsServerIdentifier_Choice_Enum = 3 + Dhcpv6ClientOptionsServerIdentifier_Choice_duid_uuid Dhcpv6ClientOptionsServerIdentifier_Choice_Enum = 4 +) + +// Enum value maps for Dhcpv6ClientOptionsServerIdentifier_Choice_Enum. +var ( + Dhcpv6ClientOptionsServerIdentifier_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "duid_llt", + 2: "duid_en", + 3: "duid_ll", + 4: "duid_uuid", + } + Dhcpv6ClientOptionsServerIdentifier_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "duid_llt": 1, + "duid_en": 2, + "duid_ll": 3, + "duid_uuid": 4, + } +) + +func (x Dhcpv6ClientOptionsServerIdentifier_Choice_Enum) Enum() *Dhcpv6ClientOptionsServerIdentifier_Choice_Enum { + p := new(Dhcpv6ClientOptionsServerIdentifier_Choice_Enum) + *p = x + return p +} + +func (x Dhcpv6ClientOptionsServerIdentifier_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dhcpv6ClientOptionsServerIdentifier_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[10].Descriptor() +} + +func (Dhcpv6ClientOptionsServerIdentifier_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[10] +} + +func (x Dhcpv6ClientOptionsServerIdentifier_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dhcpv6ClientOptionsServerIdentifier_Choice_Enum.Descriptor instead. +func (Dhcpv6ClientOptionsServerIdentifier_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{31, 0, 0} +} + +type Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum int32 + +const ( + Dhcpv6ClientOptionsDuidUuidVersion_Choice_unspecified Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum = 0 + Dhcpv6ClientOptionsDuidUuidVersion_Choice_v_1 Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum = 1 + Dhcpv6ClientOptionsDuidUuidVersion_Choice_v_2 Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum = 2 + Dhcpv6ClientOptionsDuidUuidVersion_Choice_v_3 Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum = 3 + Dhcpv6ClientOptionsDuidUuidVersion_Choice_v_4 Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum = 4 + Dhcpv6ClientOptionsDuidUuidVersion_Choice_v_5 Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum = 5 +) + +// Enum value maps for Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum. +var ( + Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "v_1", + 2: "v_2", + 3: "v_3", + 4: "v_4", + 5: "v_5", + } + Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "v_1": 1, + "v_2": 2, + "v_3": 3, + "v_4": 4, + "v_5": 5, + } +) + +func (x Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum) Enum() *Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum { + p := new(Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum) + *p = x + return p +} + +func (x Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[11].Descriptor() +} + +func (Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[11] +} + +func (x Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum.Descriptor instead. +func (Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{36, 0, 0} +} + +type Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum int32 + +const ( + Dhcpv6ClientOptionsDuidUuidVariant_Choice_unspecified Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum = 0 + Dhcpv6ClientOptionsDuidUuidVariant_Choice_ncs Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum = 1 + Dhcpv6ClientOptionsDuidUuidVariant_Choice_dce Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum = 2 + Dhcpv6ClientOptionsDuidUuidVariant_Choice_guid Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum = 3 + Dhcpv6ClientOptionsDuidUuidVariant_Choice_var_reserved Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum = 4 +) + +// Enum value maps for Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum. +var ( + Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "ncs", + 2: "dce", + 3: "guid", + 4: "var_reserved", + } + Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "ncs": 1, + "dce": 2, + "guid": 3, + "var_reserved": 4, + } +) + +func (x Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum) Enum() *Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum { + p := new(Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum) + *p = x + return p +} + +func (x Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[12].Descriptor() +} + +func (Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[12] +} + +func (x Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum.Descriptor instead. +func (Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{37, 0, 0} +} + +type Dhcpv6ClientOptionsOptionsRequest_Choice_Enum int32 + +const ( + Dhcpv6ClientOptionsOptionsRequest_Choice_unspecified Dhcpv6ClientOptionsOptionsRequest_Choice_Enum = 0 + Dhcpv6ClientOptionsOptionsRequest_Choice_vendor_information Dhcpv6ClientOptionsOptionsRequest_Choice_Enum = 1 + Dhcpv6ClientOptionsOptionsRequest_Choice_name_servers Dhcpv6ClientOptionsOptionsRequest_Choice_Enum = 2 + Dhcpv6ClientOptionsOptionsRequest_Choice_fqdn Dhcpv6ClientOptionsOptionsRequest_Choice_Enum = 3 + Dhcpv6ClientOptionsOptionsRequest_Choice_bootfile_url Dhcpv6ClientOptionsOptionsRequest_Choice_Enum = 4 + Dhcpv6ClientOptionsOptionsRequest_Choice_sztp Dhcpv6ClientOptionsOptionsRequest_Choice_Enum = 5 + Dhcpv6ClientOptionsOptionsRequest_Choice_custom Dhcpv6ClientOptionsOptionsRequest_Choice_Enum = 6 +) + +// Enum value maps for Dhcpv6ClientOptionsOptionsRequest_Choice_Enum. +var ( + Dhcpv6ClientOptionsOptionsRequest_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "vendor_information", + 2: "name_servers", + 3: "fqdn", + 4: "bootfile_url", + 5: "sztp", + 6: "custom", + } + Dhcpv6ClientOptionsOptionsRequest_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "vendor_information": 1, + "name_servers": 2, + "fqdn": 3, + "bootfile_url": 4, + "sztp": 5, + "custom": 6, + } +) + +func (x Dhcpv6ClientOptionsOptionsRequest_Choice_Enum) Enum() *Dhcpv6ClientOptionsOptionsRequest_Choice_Enum { + p := new(Dhcpv6ClientOptionsOptionsRequest_Choice_Enum) + *p = x + return p +} + +func (x Dhcpv6ClientOptionsOptionsRequest_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dhcpv6ClientOptionsOptionsRequest_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[13].Descriptor() +} + +func (Dhcpv6ClientOptionsOptionsRequest_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[13] +} + +func (x Dhcpv6ClientOptionsOptionsRequest_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dhcpv6ClientOptionsOptionsRequest_Choice_Enum.Descriptor instead. +func (Dhcpv6ClientOptionsOptionsRequest_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{39, 0, 0} +} + +type Dhcpv6ClientOptionsIncludedMessages_Choice_Enum int32 + +const ( + Dhcpv6ClientOptionsIncludedMessages_Choice_unspecified Dhcpv6ClientOptionsIncludedMessages_Choice_Enum = 0 + Dhcpv6ClientOptionsIncludedMessages_Choice_all Dhcpv6ClientOptionsIncludedMessages_Choice_Enum = 1 + Dhcpv6ClientOptionsIncludedMessages_Choice_msg_types Dhcpv6ClientOptionsIncludedMessages_Choice_Enum = 2 +) + +// Enum value maps for Dhcpv6ClientOptionsIncludedMessages_Choice_Enum. +var ( + Dhcpv6ClientOptionsIncludedMessages_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "all", + 2: "msg_types", + } + Dhcpv6ClientOptionsIncludedMessages_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "all": 1, + "msg_types": 2, + } +) + +func (x Dhcpv6ClientOptionsIncludedMessages_Choice_Enum) Enum() *Dhcpv6ClientOptionsIncludedMessages_Choice_Enum { + p := new(Dhcpv6ClientOptionsIncludedMessages_Choice_Enum) + *p = x + return p +} + +func (x Dhcpv6ClientOptionsIncludedMessages_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dhcpv6ClientOptionsIncludedMessages_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[14].Descriptor() +} + +func (Dhcpv6ClientOptionsIncludedMessages_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[14] +} + +func (x Dhcpv6ClientOptionsIncludedMessages_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dhcpv6ClientOptionsIncludedMessages_Choice_Enum.Descriptor instead. +func (Dhcpv6ClientOptionsIncludedMessages_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{42, 0, 0} +} + +type Dhcpv6ClientOptionsMessageType_Choice_Enum int32 + +const ( + Dhcpv6ClientOptionsMessageType_Choice_unspecified Dhcpv6ClientOptionsMessageType_Choice_Enum = 0 + Dhcpv6ClientOptionsMessageType_Choice_solicit Dhcpv6ClientOptionsMessageType_Choice_Enum = 1 + Dhcpv6ClientOptionsMessageType_Choice_request Dhcpv6ClientOptionsMessageType_Choice_Enum = 2 + Dhcpv6ClientOptionsMessageType_Choice_inform_request Dhcpv6ClientOptionsMessageType_Choice_Enum = 3 + Dhcpv6ClientOptionsMessageType_Choice_release Dhcpv6ClientOptionsMessageType_Choice_Enum = 4 + Dhcpv6ClientOptionsMessageType_Choice_renew Dhcpv6ClientOptionsMessageType_Choice_Enum = 5 + Dhcpv6ClientOptionsMessageType_Choice_rebind Dhcpv6ClientOptionsMessageType_Choice_Enum = 6 +) + +// Enum value maps for Dhcpv6ClientOptionsMessageType_Choice_Enum. +var ( + Dhcpv6ClientOptionsMessageType_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "solicit", + 2: "request", + 3: "inform_request", + 4: "release", + 5: "renew", + 6: "rebind", + } + Dhcpv6ClientOptionsMessageType_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "solicit": 1, + "request": 2, + "inform_request": 3, + "release": 4, + "renew": 5, + "rebind": 6, + } +) + +func (x Dhcpv6ClientOptionsMessageType_Choice_Enum) Enum() *Dhcpv6ClientOptionsMessageType_Choice_Enum { + p := new(Dhcpv6ClientOptionsMessageType_Choice_Enum) + *p = x + return p +} + +func (x Dhcpv6ClientOptionsMessageType_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dhcpv6ClientOptionsMessageType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[15].Descriptor() +} + +func (Dhcpv6ClientOptionsMessageType_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[15] +} + +func (x Dhcpv6ClientOptionsMessageType_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dhcpv6ClientOptionsMessageType_Choice_Enum.Descriptor instead. +func (Dhcpv6ClientOptionsMessageType_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{43, 0, 0} +} + +type Dhcpv6ServerOptionsIncludedMessages_Choice_Enum int32 + +const ( + Dhcpv6ServerOptionsIncludedMessages_Choice_unspecified Dhcpv6ServerOptionsIncludedMessages_Choice_Enum = 0 + Dhcpv6ServerOptionsIncludedMessages_Choice_all Dhcpv6ServerOptionsIncludedMessages_Choice_Enum = 1 + Dhcpv6ServerOptionsIncludedMessages_Choice_msg_types Dhcpv6ServerOptionsIncludedMessages_Choice_Enum = 2 +) + +// Enum value maps for Dhcpv6ServerOptionsIncludedMessages_Choice_Enum. +var ( + Dhcpv6ServerOptionsIncludedMessages_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "all", + 2: "msg_types", + } + Dhcpv6ServerOptionsIncludedMessages_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "all": 1, + "msg_types": 2, + } +) + +func (x Dhcpv6ServerOptionsIncludedMessages_Choice_Enum) Enum() *Dhcpv6ServerOptionsIncludedMessages_Choice_Enum { + p := new(Dhcpv6ServerOptionsIncludedMessages_Choice_Enum) + *p = x + return p +} + +func (x Dhcpv6ServerOptionsIncludedMessages_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dhcpv6ServerOptionsIncludedMessages_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[16].Descriptor() +} + +func (Dhcpv6ServerOptionsIncludedMessages_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[16] +} + +func (x Dhcpv6ServerOptionsIncludedMessages_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dhcpv6ServerOptionsIncludedMessages_Choice_Enum.Descriptor instead. +func (Dhcpv6ServerOptionsIncludedMessages_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{46, 0, 0} +} + +type Dhcpv6ServerOptionsMessageType_Choice_Enum int32 + +const ( + Dhcpv6ServerOptionsMessageType_Choice_unspecified Dhcpv6ServerOptionsMessageType_Choice_Enum = 0 + Dhcpv6ServerOptionsMessageType_Choice_advertise Dhcpv6ServerOptionsMessageType_Choice_Enum = 1 + Dhcpv6ServerOptionsMessageType_Choice_reply Dhcpv6ServerOptionsMessageType_Choice_Enum = 2 + Dhcpv6ServerOptionsMessageType_Choice_re_configure Dhcpv6ServerOptionsMessageType_Choice_Enum = 3 +) + +// Enum value maps for Dhcpv6ServerOptionsMessageType_Choice_Enum. +var ( + Dhcpv6ServerOptionsMessageType_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "advertise", + 2: "reply", + 3: "re_configure", + } + Dhcpv6ServerOptionsMessageType_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "advertise": 1, + "reply": 2, + "re_configure": 3, + } +) + +func (x Dhcpv6ServerOptionsMessageType_Choice_Enum) Enum() *Dhcpv6ServerOptionsMessageType_Choice_Enum { + p := new(Dhcpv6ServerOptionsMessageType_Choice_Enum) + *p = x + return p +} + +func (x Dhcpv6ServerOptionsMessageType_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dhcpv6ServerOptionsMessageType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[17].Descriptor() +} + +func (Dhcpv6ServerOptionsMessageType_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[17] +} + +func (x Dhcpv6ServerOptionsMessageType_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dhcpv6ServerOptionsMessageType_Choice_Enum.Descriptor instead. +func (Dhcpv6ServerOptionsMessageType_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{47, 0, 0} } type Layer1_Speed_Enum int32 @@ -406,11 +1054,11 @@ func (x Layer1_Speed_Enum) String() string { } func (Layer1_Speed_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[6].Descriptor() + return file_otg_proto_enumTypes[18].Descriptor() } func (Layer1_Speed_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[6] + return &file_otg_proto_enumTypes[18] } func (x Layer1_Speed_Enum) Number() protoreflect.EnumNumber { @@ -419,7 +1067,7 @@ func (x Layer1_Speed_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use Layer1_Speed_Enum.Descriptor instead. func (Layer1_Speed_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{20, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{52, 0, 0} } type Layer1_Media_Enum int32 @@ -458,11 +1106,11 @@ func (x Layer1_Media_Enum) String() string { } func (Layer1_Media_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[7].Descriptor() + return file_otg_proto_enumTypes[19].Descriptor() } func (Layer1_Media_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[7] + return &file_otg_proto_enumTypes[19] } func (x Layer1_Media_Enum) Number() protoreflect.EnumNumber { @@ -471,7 +1119,7 @@ func (x Layer1_Media_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use Layer1_Media_Enum.Descriptor instead. func (Layer1_Media_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{20, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{52, 1, 0} } type Layer1FlowControl_Choice_Enum int32 @@ -507,11 +1155,11 @@ func (x Layer1FlowControl_Choice_Enum) String() string { } func (Layer1FlowControl_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[8].Descriptor() + return file_otg_proto_enumTypes[20].Descriptor() } func (Layer1FlowControl_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[8] + return &file_otg_proto_enumTypes[20] } func (x Layer1FlowControl_Choice_Enum) Number() protoreflect.EnumNumber { @@ -520,7 +1168,7 @@ func (x Layer1FlowControl_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use Layer1FlowControl_Choice_Enum.Descriptor instead. func (Layer1FlowControl_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{22, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{54, 0, 0} } type Capture_Format_Enum int32 @@ -556,11 +1204,11 @@ func (x Capture_Format_Enum) String() string { } func (Capture_Format_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[9].Descriptor() + return file_otg_proto_enumTypes[21].Descriptor() } func (Capture_Format_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[9] + return &file_otg_proto_enumTypes[21] } func (x Capture_Format_Enum) Number() protoreflect.EnumNumber { @@ -569,7 +1217,7 @@ func (x Capture_Format_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use Capture_Format_Enum.Descriptor instead. func (Capture_Format_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{25, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{57, 0, 0} } type CaptureFilter_Choice_Enum int32 @@ -614,11 +1262,11 @@ func (x CaptureFilter_Choice_Enum) String() string { } func (CaptureFilter_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[10].Descriptor() + return file_otg_proto_enumTypes[22].Descriptor() } func (CaptureFilter_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[10] + return &file_otg_proto_enumTypes[22] } func (x CaptureFilter_Choice_Enum) Number() protoreflect.EnumNumber { @@ -627,7 +1275,7 @@ func (x CaptureFilter_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use CaptureFilter_Choice_Enum.Descriptor instead. func (CaptureFilter_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{26, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{58, 0, 0} } type IsisInterface_NetworkType_Enum int32 @@ -663,11 +1311,11 @@ func (x IsisInterface_NetworkType_Enum) String() string { } func (IsisInterface_NetworkType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[11].Descriptor() + return file_otg_proto_enumTypes[23].Descriptor() } func (IsisInterface_NetworkType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[11] + return &file_otg_proto_enumTypes[23] } func (x IsisInterface_NetworkType_Enum) Number() protoreflect.EnumNumber { @@ -676,7 +1324,7 @@ func (x IsisInterface_NetworkType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use IsisInterface_NetworkType_Enum.Descriptor instead. func (IsisInterface_NetworkType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{37, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{69, 0, 0} } type IsisInterface_LevelType_Enum int32 @@ -715,11 +1363,11 @@ func (x IsisInterface_LevelType_Enum) String() string { } func (IsisInterface_LevelType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[12].Descriptor() + return file_otg_proto_enumTypes[24].Descriptor() } func (IsisInterface_LevelType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[12] + return &file_otg_proto_enumTypes[24] } func (x IsisInterface_LevelType_Enum) Number() protoreflect.EnumNumber { @@ -728,7 +1376,7 @@ func (x IsisInterface_LevelType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use IsisInterface_LevelType_Enum.Descriptor instead. func (IsisInterface_LevelType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{37, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{69, 1, 0} } type IsisInterfaceAuthentication_AuthType_Enum int32 @@ -764,11 +1412,11 @@ func (x IsisInterfaceAuthentication_AuthType_Enum) String() string { } func (IsisInterfaceAuthentication_AuthType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[13].Descriptor() + return file_otg_proto_enumTypes[25].Descriptor() } func (IsisInterfaceAuthentication_AuthType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[13] + return &file_otg_proto_enumTypes[25] } func (x IsisInterfaceAuthentication_AuthType_Enum) Number() protoreflect.EnumNumber { @@ -777,7 +1425,7 @@ func (x IsisInterfaceAuthentication_AuthType_Enum) Number() protoreflect.EnumNum // Deprecated: Use IsisInterfaceAuthentication_AuthType_Enum.Descriptor instead. func (IsisInterfaceAuthentication_AuthType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{42, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{74, 0, 0} } type IsisAuthenticationBase_AuthType_Enum int32 @@ -813,11 +1461,11 @@ func (x IsisAuthenticationBase_AuthType_Enum) String() string { } func (IsisAuthenticationBase_AuthType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[14].Descriptor() + return file_otg_proto_enumTypes[26].Descriptor() } func (IsisAuthenticationBase_AuthType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[14] + return &file_otg_proto_enumTypes[26] } func (x IsisAuthenticationBase_AuthType_Enum) Number() protoreflect.EnumNumber { @@ -826,7 +1474,7 @@ func (x IsisAuthenticationBase_AuthType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use IsisAuthenticationBase_AuthType_Enum.Descriptor instead. func (IsisAuthenticationBase_AuthType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{48, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{80, 0, 0} } type IsisV4RouteRange_OriginType_Enum int32 @@ -862,11 +1510,11 @@ func (x IsisV4RouteRange_OriginType_Enum) String() string { } func (IsisV4RouteRange_OriginType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[15].Descriptor() + return file_otg_proto_enumTypes[27].Descriptor() } func (IsisV4RouteRange_OriginType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[15] + return &file_otg_proto_enumTypes[27] } func (x IsisV4RouteRange_OriginType_Enum) Number() protoreflect.EnumNumber { @@ -875,7 +1523,7 @@ func (x IsisV4RouteRange_OriginType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use IsisV4RouteRange_OriginType_Enum.Descriptor instead. func (IsisV4RouteRange_OriginType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{49, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{81, 0, 0} } type IsisV4RouteRange_RedistributionType_Enum int32 @@ -911,11 +1559,11 @@ func (x IsisV4RouteRange_RedistributionType_Enum) String() string { } func (IsisV4RouteRange_RedistributionType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[16].Descriptor() + return file_otg_proto_enumTypes[28].Descriptor() } func (IsisV4RouteRange_RedistributionType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[16] + return &file_otg_proto_enumTypes[28] } func (x IsisV4RouteRange_RedistributionType_Enum) Number() protoreflect.EnumNumber { @@ -924,7 +1572,7 @@ func (x IsisV4RouteRange_RedistributionType_Enum) Number() protoreflect.EnumNumb // Deprecated: Use IsisV4RouteRange_RedistributionType_Enum.Descriptor instead. func (IsisV4RouteRange_RedistributionType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{49, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{81, 1, 0} } type IsisV6RouteRange_OriginType_Enum int32 @@ -960,11 +1608,11 @@ func (x IsisV6RouteRange_OriginType_Enum) String() string { } func (IsisV6RouteRange_OriginType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[17].Descriptor() + return file_otg_proto_enumTypes[29].Descriptor() } func (IsisV6RouteRange_OriginType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[17] + return &file_otg_proto_enumTypes[29] } func (x IsisV6RouteRange_OriginType_Enum) Number() protoreflect.EnumNumber { @@ -973,7 +1621,7 @@ func (x IsisV6RouteRange_OriginType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use IsisV6RouteRange_OriginType_Enum.Descriptor instead. func (IsisV6RouteRange_OriginType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{53, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{85, 0, 0} } type IsisV6RouteRange_RedistributionType_Enum int32 @@ -1009,11 +1657,11 @@ func (x IsisV6RouteRange_RedistributionType_Enum) String() string { } func (IsisV6RouteRange_RedistributionType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[18].Descriptor() + return file_otg_proto_enumTypes[30].Descriptor() } func (IsisV6RouteRange_RedistributionType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[18] + return &file_otg_proto_enumTypes[30] } func (x IsisV6RouteRange_RedistributionType_Enum) Number() protoreflect.EnumNumber { @@ -1022,7 +1670,7 @@ func (x IsisV6RouteRange_RedistributionType_Enum) Number() protoreflect.EnumNumb // Deprecated: Use IsisV6RouteRange_RedistributionType_Enum.Descriptor instead. func (IsisV6RouteRange_RedistributionType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{53, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{85, 1, 0} } type DeviceBgpMessageHeaderError_Subcode_Enum int32 @@ -1061,11 +1709,11 @@ func (x DeviceBgpMessageHeaderError_Subcode_Enum) String() string { } func (DeviceBgpMessageHeaderError_Subcode_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[19].Descriptor() + return file_otg_proto_enumTypes[31].Descriptor() } func (DeviceBgpMessageHeaderError_Subcode_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[19] + return &file_otg_proto_enumTypes[31] } func (x DeviceBgpMessageHeaderError_Subcode_Enum) Number() protoreflect.EnumNumber { @@ -1074,7 +1722,7 @@ func (x DeviceBgpMessageHeaderError_Subcode_Enum) Number() protoreflect.EnumNumb // Deprecated: Use DeviceBgpMessageHeaderError_Subcode_Enum.Descriptor instead. func (DeviceBgpMessageHeaderError_Subcode_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{55, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{87, 0, 0} } type DeviceBgpOpenMessageError_Subcode_Enum int32 @@ -1125,11 +1773,11 @@ func (x DeviceBgpOpenMessageError_Subcode_Enum) String() string { } func (DeviceBgpOpenMessageError_Subcode_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[20].Descriptor() + return file_otg_proto_enumTypes[32].Descriptor() } func (DeviceBgpOpenMessageError_Subcode_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[20] + return &file_otg_proto_enumTypes[32] } func (x DeviceBgpOpenMessageError_Subcode_Enum) Number() protoreflect.EnumNumber { @@ -1138,7 +1786,7 @@ func (x DeviceBgpOpenMessageError_Subcode_Enum) Number() protoreflect.EnumNumber // Deprecated: Use DeviceBgpOpenMessageError_Subcode_Enum.Descriptor instead. func (DeviceBgpOpenMessageError_Subcode_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{56, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{88, 0, 0} } type DeviceBgpUpdateMessageError_Subcode_Enum int32 @@ -1201,11 +1849,11 @@ func (x DeviceBgpUpdateMessageError_Subcode_Enum) String() string { } func (DeviceBgpUpdateMessageError_Subcode_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[21].Descriptor() + return file_otg_proto_enumTypes[33].Descriptor() } func (DeviceBgpUpdateMessageError_Subcode_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[21] + return &file_otg_proto_enumTypes[33] } func (x DeviceBgpUpdateMessageError_Subcode_Enum) Number() protoreflect.EnumNumber { @@ -1214,7 +1862,7 @@ func (x DeviceBgpUpdateMessageError_Subcode_Enum) Number() protoreflect.EnumNumb // Deprecated: Use DeviceBgpUpdateMessageError_Subcode_Enum.Descriptor instead. func (DeviceBgpUpdateMessageError_Subcode_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{57, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{89, 0, 0} } type DeviceBgpCeaseError_Subcode_Enum int32 @@ -1229,22 +1877,24 @@ const ( DeviceBgpCeaseError_Subcode_other_config_changes_code6_subcode6 DeviceBgpCeaseError_Subcode_Enum = 6 DeviceBgpCeaseError_Subcode_connection_collision_resolution_code6_subcode7 DeviceBgpCeaseError_Subcode_Enum = 7 DeviceBgpCeaseError_Subcode_out_of_resources_code6_subcode8 DeviceBgpCeaseError_Subcode_Enum = 8 - DeviceBgpCeaseError_Subcode_bfd_session_down_code6_subcode9 DeviceBgpCeaseError_Subcode_Enum = 9 + DeviceBgpCeaseError_Subcode_bfd_session_down_code6_subcode10 DeviceBgpCeaseError_Subcode_Enum = 9 + DeviceBgpCeaseError_Subcode_hard_reset_code6_subcode9 DeviceBgpCeaseError_Subcode_Enum = 10 ) // Enum value maps for DeviceBgpCeaseError_Subcode_Enum. var ( DeviceBgpCeaseError_Subcode_Enum_name = map[int32]string{ - 0: "unspecified", - 1: "max_number_prefix_reached_code6_subcode1", - 2: "admin_shutdown_code6_subcode2", - 3: "peer_deleted_code6_subcode3", - 4: "admin_reset_code6_subcode4", - 5: "connection_reject_code6_subcode5", - 6: "other_config_changes_code6_subcode6", - 7: "connection_collision_resolution_code6_subcode7", - 8: "out_of_resources_code6_subcode8", - 9: "bfd_session_down_code6_subcode9", + 0: "unspecified", + 1: "max_number_prefix_reached_code6_subcode1", + 2: "admin_shutdown_code6_subcode2", + 3: "peer_deleted_code6_subcode3", + 4: "admin_reset_code6_subcode4", + 5: "connection_reject_code6_subcode5", + 6: "other_config_changes_code6_subcode6", + 7: "connection_collision_resolution_code6_subcode7", + 8: "out_of_resources_code6_subcode8", + 9: "bfd_session_down_code6_subcode10", + 10: "hard_reset_code6_subcode9", } DeviceBgpCeaseError_Subcode_Enum_value = map[string]int32{ "unspecified": 0, @@ -1256,7 +1906,8 @@ var ( "other_config_changes_code6_subcode6": 6, "connection_collision_resolution_code6_subcode7": 7, "out_of_resources_code6_subcode8": 8, - "bfd_session_down_code6_subcode9": 9, + "bfd_session_down_code6_subcode10": 9, + "hard_reset_code6_subcode9": 10, } ) @@ -1271,11 +1922,11 @@ func (x DeviceBgpCeaseError_Subcode_Enum) String() string { } func (DeviceBgpCeaseError_Subcode_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[22].Descriptor() + return file_otg_proto_enumTypes[34].Descriptor() } func (DeviceBgpCeaseError_Subcode_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[22] + return &file_otg_proto_enumTypes[34] } func (x DeviceBgpCeaseError_Subcode_Enum) Number() protoreflect.EnumNumber { @@ -1284,7 +1935,7 @@ func (x DeviceBgpCeaseError_Subcode_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use DeviceBgpCeaseError_Subcode_Enum.Descriptor instead. func (DeviceBgpCeaseError_Subcode_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{60, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{92, 0, 0} } type BgpV4Peer_AsType_Enum int32 @@ -1320,11 +1971,11 @@ func (x BgpV4Peer_AsType_Enum) String() string { } func (BgpV4Peer_AsType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[23].Descriptor() + return file_otg_proto_enumTypes[35].Descriptor() } func (BgpV4Peer_AsType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[23] + return &file_otg_proto_enumTypes[35] } func (x BgpV4Peer_AsType_Enum) Number() protoreflect.EnumNumber { @@ -1333,7 +1984,7 @@ func (x BgpV4Peer_AsType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpV4Peer_AsType_Enum.Descriptor instead. func (BgpV4Peer_AsType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{62, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{94, 0, 0} } type BgpV4Peer_AsNumberWidth_Enum int32 @@ -1369,11 +2020,11 @@ func (x BgpV4Peer_AsNumberWidth_Enum) String() string { } func (BgpV4Peer_AsNumberWidth_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[24].Descriptor() + return file_otg_proto_enumTypes[36].Descriptor() } func (BgpV4Peer_AsNumberWidth_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[24] + return &file_otg_proto_enumTypes[36] } func (x BgpV4Peer_AsNumberWidth_Enum) Number() protoreflect.EnumNumber { @@ -1382,7 +2033,7 @@ func (x BgpV4Peer_AsNumberWidth_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpV4Peer_AsNumberWidth_Enum.Descriptor instead. func (BgpV4Peer_AsNumberWidth_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{62, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{94, 1, 0} } type BgpV4EthernetSegment_ActiveMode_Enum int32 @@ -1418,11 +2069,11 @@ func (x BgpV4EthernetSegment_ActiveMode_Enum) String() string { } func (BgpV4EthernetSegment_ActiveMode_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[25].Descriptor() + return file_otg_proto_enumTypes[37].Descriptor() } func (BgpV4EthernetSegment_ActiveMode_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[25] + return &file_otg_proto_enumTypes[37] } func (x BgpV4EthernetSegment_ActiveMode_Enum) Number() protoreflect.EnumNumber { @@ -1431,7 +2082,7 @@ func (x BgpV4EthernetSegment_ActiveMode_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpV4EthernetSegment_ActiveMode_Enum.Descriptor instead. func (BgpV4EthernetSegment_ActiveMode_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{64, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{96, 0, 0} } type BgpRouteAdvanced_Origin_Enum int32 @@ -1470,11 +2121,11 @@ func (x BgpRouteAdvanced_Origin_Enum) String() string { } func (BgpRouteAdvanced_Origin_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[26].Descriptor() + return file_otg_proto_enumTypes[38].Descriptor() } func (BgpRouteAdvanced_Origin_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[26] + return &file_otg_proto_enumTypes[38] } func (x BgpRouteAdvanced_Origin_Enum) Number() protoreflect.EnumNumber { @@ -1483,7 +2134,7 @@ func (x BgpRouteAdvanced_Origin_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpRouteAdvanced_Origin_Enum.Descriptor instead. func (BgpRouteAdvanced_Origin_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{66, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{98, 0, 0} } type BgpCommunity_Type_Enum int32 @@ -1531,11 +2182,11 @@ func (x BgpCommunity_Type_Enum) String() string { } func (BgpCommunity_Type_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[27].Descriptor() + return file_otg_proto_enumTypes[39].Descriptor() } func (BgpCommunity_Type_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[27] + return &file_otg_proto_enumTypes[39] } func (x BgpCommunity_Type_Enum) Number() protoreflect.EnumNumber { @@ -1544,7 +2195,7 @@ func (x BgpCommunity_Type_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpCommunity_Type_Enum.Descriptor instead. func (BgpCommunity_Type_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{67, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{99, 0, 0} } type BgpExtCommunity_Type_Enum int32 @@ -1592,11 +2243,11 @@ func (x BgpExtCommunity_Type_Enum) String() string { } func (BgpExtCommunity_Type_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[28].Descriptor() + return file_otg_proto_enumTypes[40].Descriptor() } func (BgpExtCommunity_Type_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[28] + return &file_otg_proto_enumTypes[40] } func (x BgpExtCommunity_Type_Enum) Number() protoreflect.EnumNumber { @@ -1605,7 +2256,7 @@ func (x BgpExtCommunity_Type_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpExtCommunity_Type_Enum.Descriptor instead. func (BgpExtCommunity_Type_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{68, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{100, 0, 0} } type BgpExtCommunity_Subtype_Enum int32 @@ -1653,11 +2304,11 @@ func (x BgpExtCommunity_Subtype_Enum) String() string { } func (BgpExtCommunity_Subtype_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[29].Descriptor() + return file_otg_proto_enumTypes[41].Descriptor() } func (BgpExtCommunity_Subtype_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[29] + return &file_otg_proto_enumTypes[41] } func (x BgpExtCommunity_Subtype_Enum) Number() protoreflect.EnumNumber { @@ -1666,7 +2317,7 @@ func (x BgpExtCommunity_Subtype_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpExtCommunity_Subtype_Enum.Descriptor instead. func (BgpExtCommunity_Subtype_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{68, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{100, 1, 0} } type BgpAsPath_AsSetMode_Enum int32 @@ -1714,11 +2365,11 @@ func (x BgpAsPath_AsSetMode_Enum) String() string { } func (BgpAsPath_AsSetMode_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[30].Descriptor() + return file_otg_proto_enumTypes[42].Descriptor() } func (BgpAsPath_AsSetMode_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[30] + return &file_otg_proto_enumTypes[42] } func (x BgpAsPath_AsSetMode_Enum) Number() protoreflect.EnumNumber { @@ -1727,7 +2378,7 @@ func (x BgpAsPath_AsSetMode_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpAsPath_AsSetMode_Enum.Descriptor instead. func (BgpAsPath_AsSetMode_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{69, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{101, 0, 0} } type BgpAsPathSegment_Type_Enum int32 @@ -1769,11 +2420,11 @@ func (x BgpAsPathSegment_Type_Enum) String() string { } func (BgpAsPathSegment_Type_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[31].Descriptor() + return file_otg_proto_enumTypes[43].Descriptor() } func (BgpAsPathSegment_Type_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[31] + return &file_otg_proto_enumTypes[43] } func (x BgpAsPathSegment_Type_Enum) Number() protoreflect.EnumNumber { @@ -1782,7 +2433,7 @@ func (x BgpAsPathSegment_Type_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpAsPathSegment_Type_Enum.Descriptor instead. func (BgpAsPathSegment_Type_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{70, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{102, 0, 0} } type BgpV4EvpnEvis_Choice_Enum int32 @@ -1815,11 +2466,11 @@ func (x BgpV4EvpnEvis_Choice_Enum) String() string { } func (BgpV4EvpnEvis_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[32].Descriptor() + return file_otg_proto_enumTypes[44].Descriptor() } func (BgpV4EvpnEvis_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[32] + return &file_otg_proto_enumTypes[44] } func (x BgpV4EvpnEvis_Choice_Enum) Number() protoreflect.EnumNumber { @@ -1828,7 +2479,7 @@ func (x BgpV4EvpnEvis_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpV4EvpnEvis_Choice_Enum.Descriptor instead. func (BgpV4EvpnEvis_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{71, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{103, 0, 0} } type BgpV4EviVxlan_ReplicationType_Enum int32 @@ -1861,11 +2512,11 @@ func (x BgpV4EviVxlan_ReplicationType_Enum) String() string { } func (BgpV4EviVxlan_ReplicationType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[33].Descriptor() + return file_otg_proto_enumTypes[45].Descriptor() } func (BgpV4EviVxlan_ReplicationType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[33] + return &file_otg_proto_enumTypes[45] } func (x BgpV4EviVxlan_ReplicationType_Enum) Number() protoreflect.EnumNumber { @@ -1874,7 +2525,7 @@ func (x BgpV4EviVxlan_ReplicationType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpV4EviVxlan_ReplicationType_Enum.Descriptor instead. func (BgpV4EviVxlan_ReplicationType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{72, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{104, 0, 0} } type BgpRouteDistinguisher_RdType_Enum int32 @@ -1913,11 +2564,11 @@ func (x BgpRouteDistinguisher_RdType_Enum) String() string { } func (BgpRouteDistinguisher_RdType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[34].Descriptor() + return file_otg_proto_enumTypes[46].Descriptor() } func (BgpRouteDistinguisher_RdType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[34] + return &file_otg_proto_enumTypes[46] } func (x BgpRouteDistinguisher_RdType_Enum) Number() protoreflect.EnumNumber { @@ -1926,7 +2577,7 @@ func (x BgpRouteDistinguisher_RdType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpRouteDistinguisher_RdType_Enum.Descriptor instead. func (BgpRouteDistinguisher_RdType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{75, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{107, 0, 0} } type BgpRouteTarget_RtType_Enum int32 @@ -1965,11 +2616,11 @@ func (x BgpRouteTarget_RtType_Enum) String() string { } func (BgpRouteTarget_RtType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[35].Descriptor() + return file_otg_proto_enumTypes[47].Descriptor() } func (BgpRouteTarget_RtType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[35] + return &file_otg_proto_enumTypes[47] } func (x BgpRouteTarget_RtType_Enum) Number() protoreflect.EnumNumber { @@ -1978,7 +2629,7 @@ func (x BgpRouteTarget_RtType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpRouteTarget_RtType_Enum.Descriptor instead. func (BgpRouteTarget_RtType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{76, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{108, 0, 0} } type BgpV4RouteRange_NextHopMode_Enum int32 @@ -2014,11 +2665,11 @@ func (x BgpV4RouteRange_NextHopMode_Enum) String() string { } func (BgpV4RouteRange_NextHopMode_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[36].Descriptor() + return file_otg_proto_enumTypes[48].Descriptor() } func (BgpV4RouteRange_NextHopMode_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[36] + return &file_otg_proto_enumTypes[48] } func (x BgpV4RouteRange_NextHopMode_Enum) Number() protoreflect.EnumNumber { @@ -2027,7 +2678,7 @@ func (x BgpV4RouteRange_NextHopMode_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpV4RouteRange_NextHopMode_Enum.Descriptor instead. func (BgpV4RouteRange_NextHopMode_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{80, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{112, 0, 0} } type BgpV4RouteRange_NextHopAddressType_Enum int32 @@ -2063,11 +2714,11 @@ func (x BgpV4RouteRange_NextHopAddressType_Enum) String() string { } func (BgpV4RouteRange_NextHopAddressType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[37].Descriptor() + return file_otg_proto_enumTypes[49].Descriptor() } func (BgpV4RouteRange_NextHopAddressType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[37] + return &file_otg_proto_enumTypes[49] } func (x BgpV4RouteRange_NextHopAddressType_Enum) Number() protoreflect.EnumNumber { @@ -2076,7 +2727,7 @@ func (x BgpV4RouteRange_NextHopAddressType_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use BgpV4RouteRange_NextHopAddressType_Enum.Descriptor instead. func (BgpV4RouteRange_NextHopAddressType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{80, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{112, 1, 0} } type BgpExtendedCommunity_Choice_Enum int32 @@ -2127,11 +2778,11 @@ func (x BgpExtendedCommunity_Choice_Enum) String() string { } func (BgpExtendedCommunity_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[38].Descriptor() + return file_otg_proto_enumTypes[50].Descriptor() } func (BgpExtendedCommunity_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[38] + return &file_otg_proto_enumTypes[50] } func (x BgpExtendedCommunity_Choice_Enum) Number() protoreflect.EnumNumber { @@ -2140,7 +2791,7 @@ func (x BgpExtendedCommunity_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpExtendedCommunity_Choice_Enum.Descriptor instead. func (BgpExtendedCommunity_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{82, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{114, 0, 0} } type BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum int32 @@ -2176,11 +2827,11 @@ func (x BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum) String() string } func (BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[39].Descriptor() + return file_otg_proto_enumTypes[51].Descriptor() } func (BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[39] + return &file_otg_proto_enumTypes[51] } func (x BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -2189,7 +2840,7 @@ func (x BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum) Number() protore // Deprecated: Use BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum.Descriptor instead. func (BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{85, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{117, 0, 0} } type BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum int32 @@ -2225,11 +2876,11 @@ func (x BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum) String() stri } func (BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[40].Descriptor() + return file_otg_proto_enumTypes[52].Descriptor() } func (BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[40] + return &file_otg_proto_enumTypes[52] } func (x BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -2238,7 +2889,7 @@ func (x BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum) Number() prot // Deprecated: Use BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum.Descriptor instead. func (BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{88, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{120, 0, 0} } type BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum int32 @@ -2274,11 +2925,11 @@ func (x BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum) String() string } func (BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[41].Descriptor() + return file_otg_proto_enumTypes[53].Descriptor() } func (BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[41] + return &file_otg_proto_enumTypes[53] } func (x BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -2287,7 +2938,7 @@ func (x BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum) Number() protore // Deprecated: Use BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum.Descriptor instead. func (BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{91, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{123, 0, 0} } type BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum int32 @@ -2323,11 +2974,11 @@ func (x BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum) String() string { } func (BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[42].Descriptor() + return file_otg_proto_enumTypes[54].Descriptor() } func (BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[42] + return &file_otg_proto_enumTypes[54] } func (x BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -2336,7 +2987,7 @@ func (x BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum) Number() protorefl // Deprecated: Use BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum.Descriptor instead. func (BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{94, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{126, 0, 0} } type BgpExtendedCommunityTransitiveEvpnType_Choice_Enum int32 @@ -2369,11 +3020,11 @@ func (x BgpExtendedCommunityTransitiveEvpnType_Choice_Enum) String() string { } func (BgpExtendedCommunityTransitiveEvpnType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[43].Descriptor() + return file_otg_proto_enumTypes[55].Descriptor() } func (BgpExtendedCommunityTransitiveEvpnType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[43] + return &file_otg_proto_enumTypes[55] } func (x BgpExtendedCommunityTransitiveEvpnType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -2382,7 +3033,7 @@ func (x BgpExtendedCommunityTransitiveEvpnType_Choice_Enum) Number() protoreflec // Deprecated: Use BgpExtendedCommunityTransitiveEvpnType_Choice_Enum.Descriptor instead. func (BgpExtendedCommunityTransitiveEvpnType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{96, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{128, 0, 0} } type BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum int32 @@ -2415,11 +3066,11 @@ func (x BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum) String() stri } func (BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[44].Descriptor() + return file_otg_proto_enumTypes[56].Descriptor() } func (BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[44] + return &file_otg_proto_enumTypes[56] } func (x BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -2428,7 +3079,7 @@ func (x BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum) Number() prot // Deprecated: Use BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum.Descriptor instead. func (BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{98, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{130, 0, 0} } type BgpV6RouteRange_NextHopMode_Enum int32 @@ -2464,11 +3115,11 @@ func (x BgpV6RouteRange_NextHopMode_Enum) String() string { } func (BgpV6RouteRange_NextHopMode_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[45].Descriptor() + return file_otg_proto_enumTypes[57].Descriptor() } func (BgpV6RouteRange_NextHopMode_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[45] + return &file_otg_proto_enumTypes[57] } func (x BgpV6RouteRange_NextHopMode_Enum) Number() protoreflect.EnumNumber { @@ -2477,7 +3128,7 @@ func (x BgpV6RouteRange_NextHopMode_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpV6RouteRange_NextHopMode_Enum.Descriptor instead. func (BgpV6RouteRange_NextHopMode_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{100, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{132, 0, 0} } type BgpV6RouteRange_NextHopAddressType_Enum int32 @@ -2513,11 +3164,11 @@ func (x BgpV6RouteRange_NextHopAddressType_Enum) String() string { } func (BgpV6RouteRange_NextHopAddressType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[46].Descriptor() + return file_otg_proto_enumTypes[58].Descriptor() } func (BgpV6RouteRange_NextHopAddressType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[46] + return &file_otg_proto_enumTypes[58] } func (x BgpV6RouteRange_NextHopAddressType_Enum) Number() protoreflect.EnumNumber { @@ -2526,7 +3177,7 @@ func (x BgpV6RouteRange_NextHopAddressType_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use BgpV6RouteRange_NextHopAddressType_Enum.Descriptor instead. func (BgpV6RouteRange_NextHopAddressType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{100, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{132, 1, 0} } type BgpSrteV4Policy_NextHopMode_Enum int32 @@ -2562,11 +3213,11 @@ func (x BgpSrteV4Policy_NextHopMode_Enum) String() string { } func (BgpSrteV4Policy_NextHopMode_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[47].Descriptor() + return file_otg_proto_enumTypes[59].Descriptor() } func (BgpSrteV4Policy_NextHopMode_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[47] + return &file_otg_proto_enumTypes[59] } func (x BgpSrteV4Policy_NextHopMode_Enum) Number() protoreflect.EnumNumber { @@ -2575,7 +3226,7 @@ func (x BgpSrteV4Policy_NextHopMode_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpSrteV4Policy_NextHopMode_Enum.Descriptor instead. func (BgpSrteV4Policy_NextHopMode_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{101, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{133, 0, 0} } type BgpSrteV4Policy_NextHopAddressType_Enum int32 @@ -2611,11 +3262,11 @@ func (x BgpSrteV4Policy_NextHopAddressType_Enum) String() string { } func (BgpSrteV4Policy_NextHopAddressType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[48].Descriptor() + return file_otg_proto_enumTypes[60].Descriptor() } func (BgpSrteV4Policy_NextHopAddressType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[48] + return &file_otg_proto_enumTypes[60] } func (x BgpSrteV4Policy_NextHopAddressType_Enum) Number() protoreflect.EnumNumber { @@ -2624,7 +3275,7 @@ func (x BgpSrteV4Policy_NextHopAddressType_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use BgpSrteV4Policy_NextHopAddressType_Enum.Descriptor instead. func (BgpSrteV4Policy_NextHopAddressType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{101, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{133, 1, 0} } type BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum int32 @@ -2660,11 +3311,11 @@ func (x BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum) String() string { } func (BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[49].Descriptor() + return file_otg_proto_enumTypes[61].Descriptor() } func (BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[49] + return &file_otg_proto_enumTypes[61] } func (x BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum) Number() protoreflect.EnumNumber { @@ -2673,7 +3324,7 @@ func (x BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum) Number() protoreflect.En // Deprecated: Use BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum.Descriptor instead. func (BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{103, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{135, 0, 0} } type BgpSrteBindingSubTlv_BindingSidType_Enum int32 @@ -2712,11 +3363,11 @@ func (x BgpSrteBindingSubTlv_BindingSidType_Enum) String() string { } func (BgpSrteBindingSubTlv_BindingSidType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[50].Descriptor() + return file_otg_proto_enumTypes[62].Descriptor() } func (BgpSrteBindingSubTlv_BindingSidType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[50] + return &file_otg_proto_enumTypes[62] } func (x BgpSrteBindingSubTlv_BindingSidType_Enum) Number() protoreflect.EnumNumber { @@ -2725,7 +3376,7 @@ func (x BgpSrteBindingSubTlv_BindingSidType_Enum) Number() protoreflect.EnumNumb // Deprecated: Use BgpSrteBindingSubTlv_BindingSidType_Enum.Descriptor instead. func (BgpSrteBindingSubTlv_BindingSidType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{105, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{137, 0, 0} } type BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum int32 @@ -2770,11 +3421,11 @@ func (x BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum) Strin } func (BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[51].Descriptor() + return file_otg_proto_enumTypes[63].Descriptor() } func (BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[51] + return &file_otg_proto_enumTypes[63] } func (x BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum) Number() protoreflect.EnumNumber { @@ -2783,7 +3434,7 @@ func (x BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum) Numbe // Deprecated: Use BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum.Descriptor instead. func (BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{109, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{141, 0, 0} } type BgpSrteSegment_SegmentType_Enum int32 @@ -2846,11 +3497,11 @@ func (x BgpSrteSegment_SegmentType_Enum) String() string { } func (BgpSrteSegment_SegmentType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[52].Descriptor() + return file_otg_proto_enumTypes[64].Descriptor() } func (BgpSrteSegment_SegmentType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[52] + return &file_otg_proto_enumTypes[64] } func (x BgpSrteSegment_SegmentType_Enum) Number() protoreflect.EnumNumber { @@ -2859,7 +3510,7 @@ func (x BgpSrteSegment_SegmentType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpSrteSegment_SegmentType_Enum.Descriptor instead. func (BgpSrteSegment_SegmentType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{111, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{143, 0, 0} } type BgpSrteV6Policy_NextHopMode_Enum int32 @@ -2895,11 +3546,11 @@ func (x BgpSrteV6Policy_NextHopMode_Enum) String() string { } func (BgpSrteV6Policy_NextHopMode_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[53].Descriptor() + return file_otg_proto_enumTypes[65].Descriptor() } func (BgpSrteV6Policy_NextHopMode_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[53] + return &file_otg_proto_enumTypes[65] } func (x BgpSrteV6Policy_NextHopMode_Enum) Number() protoreflect.EnumNumber { @@ -2908,7 +3559,7 @@ func (x BgpSrteV6Policy_NextHopMode_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpSrteV6Policy_NextHopMode_Enum.Descriptor instead. func (BgpSrteV6Policy_NextHopMode_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{125, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{157, 0, 0} } type BgpSrteV6Policy_NextHopAddressType_Enum int32 @@ -2944,11 +3595,11 @@ func (x BgpSrteV6Policy_NextHopAddressType_Enum) String() string { } func (BgpSrteV6Policy_NextHopAddressType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[54].Descriptor() + return file_otg_proto_enumTypes[66].Descriptor() } func (BgpSrteV6Policy_NextHopAddressType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[54] + return &file_otg_proto_enumTypes[66] } func (x BgpSrteV6Policy_NextHopAddressType_Enum) Number() protoreflect.EnumNumber { @@ -2957,7 +3608,7 @@ func (x BgpSrteV6Policy_NextHopAddressType_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use BgpSrteV6Policy_NextHopAddressType_Enum.Descriptor instead. func (BgpSrteV6Policy_NextHopAddressType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{125, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{157, 1, 0} } type BgpUpdateReplay_Choice_Enum int32 @@ -2993,11 +3644,11 @@ func (x BgpUpdateReplay_Choice_Enum) String() string { } func (BgpUpdateReplay_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[55].Descriptor() + return file_otg_proto_enumTypes[67].Descriptor() } func (BgpUpdateReplay_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[55] + return &file_otg_proto_enumTypes[67] } func (x BgpUpdateReplay_Choice_Enum) Number() protoreflect.EnumNumber { @@ -3006,7 +3657,7 @@ func (x BgpUpdateReplay_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpUpdateReplay_Choice_Enum.Descriptor instead. func (BgpUpdateReplay_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{128, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{160, 0, 0} } type BgpAttributes_Origin_Enum int32 @@ -3045,11 +3696,11 @@ func (x BgpAttributes_Origin_Enum) String() string { } func (BgpAttributes_Origin_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[56].Descriptor() + return file_otg_proto_enumTypes[68].Descriptor() } func (BgpAttributes_Origin_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[56] + return &file_otg_proto_enumTypes[68] } func (x BgpAttributes_Origin_Enum) Number() protoreflect.EnumNumber { @@ -3058,7 +3709,7 @@ func (x BgpAttributes_Origin_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpAttributes_Origin_Enum.Descriptor instead. func (BgpAttributes_Origin_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{137, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{171, 0, 0} } type BgpAttributesAsPath_Choice_Enum int32 @@ -3094,11 +3745,11 @@ func (x BgpAttributesAsPath_Choice_Enum) String() string { } func (BgpAttributesAsPath_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[57].Descriptor() + return file_otg_proto_enumTypes[69].Descriptor() } func (BgpAttributesAsPath_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[57] + return &file_otg_proto_enumTypes[69] } func (x BgpAttributesAsPath_Choice_Enum) Number() protoreflect.EnumNumber { @@ -3107,7 +3758,7 @@ func (x BgpAttributesAsPath_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpAttributesAsPath_Choice_Enum.Descriptor instead. func (BgpAttributesAsPath_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{139, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{173, 0, 0} } type BgpAttributesFourByteAsPathSegment_Type_Enum int32 @@ -3149,11 +3800,11 @@ func (x BgpAttributesFourByteAsPathSegment_Type_Enum) String() string { } func (BgpAttributesFourByteAsPathSegment_Type_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[58].Descriptor() + return file_otg_proto_enumTypes[70].Descriptor() } func (BgpAttributesFourByteAsPathSegment_Type_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[58] + return &file_otg_proto_enumTypes[70] } func (x BgpAttributesFourByteAsPathSegment_Type_Enum) Number() protoreflect.EnumNumber { @@ -3162,7 +3813,7 @@ func (x BgpAttributesFourByteAsPathSegment_Type_Enum) Number() protoreflect.Enum // Deprecated: Use BgpAttributesFourByteAsPathSegment_Type_Enum.Descriptor instead. func (BgpAttributesFourByteAsPathSegment_Type_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{141, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{175, 0, 0} } type BgpAttributesTwoByteAsPathSegment_Type_Enum int32 @@ -3204,11 +3855,11 @@ func (x BgpAttributesTwoByteAsPathSegment_Type_Enum) String() string { } func (BgpAttributesTwoByteAsPathSegment_Type_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[59].Descriptor() + return file_otg_proto_enumTypes[71].Descriptor() } func (BgpAttributesTwoByteAsPathSegment_Type_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[59] + return &file_otg_proto_enumTypes[71] } func (x BgpAttributesTwoByteAsPathSegment_Type_Enum) Number() protoreflect.EnumNumber { @@ -3217,7 +3868,7 @@ func (x BgpAttributesTwoByteAsPathSegment_Type_Enum) Number() protoreflect.EnumN // Deprecated: Use BgpAttributesTwoByteAsPathSegment_Type_Enum.Descriptor instead. func (BgpAttributesTwoByteAsPathSegment_Type_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{143, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{177, 0, 0} } type BgpAttributesAggregator_Choice_Enum int32 @@ -3253,11 +3904,11 @@ func (x BgpAttributesAggregator_Choice_Enum) String() string { } func (BgpAttributesAggregator_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[60].Descriptor() + return file_otg_proto_enumTypes[72].Descriptor() } func (BgpAttributesAggregator_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[60] + return &file_otg_proto_enumTypes[72] } func (x BgpAttributesAggregator_Choice_Enum) Number() protoreflect.EnumNumber { @@ -3266,7 +3917,7 @@ func (x BgpAttributesAggregator_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpAttributesAggregator_Choice_Enum.Descriptor instead. func (BgpAttributesAggregator_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{145, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{179, 0, 0} } type BgpAttributesCommunity_Choice_Enum int32 @@ -3314,11 +3965,11 @@ func (x BgpAttributesCommunity_Choice_Enum) String() string { } func (BgpAttributesCommunity_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[61].Descriptor() + return file_otg_proto_enumTypes[73].Descriptor() } func (BgpAttributesCommunity_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[61] + return &file_otg_proto_enumTypes[73] } func (x BgpAttributesCommunity_Choice_Enum) Number() protoreflect.EnumNumber { @@ -3327,7 +3978,7 @@ func (x BgpAttributesCommunity_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpAttributesCommunity_Choice_Enum.Descriptor instead. func (BgpAttributesCommunity_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{147, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{181, 0, 0} } type BgpAttributesNextHop_Choice_Enum int32 @@ -3366,11 +4017,11 @@ func (x BgpAttributesNextHop_Choice_Enum) String() string { } func (BgpAttributesNextHop_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[62].Descriptor() + return file_otg_proto_enumTypes[74].Descriptor() } func (BgpAttributesNextHop_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[62] + return &file_otg_proto_enumTypes[74] } func (x BgpAttributesNextHop_Choice_Enum) Number() protoreflect.EnumNumber { @@ -3379,15 +4030,17 @@ func (x BgpAttributesNextHop_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpAttributesNextHop_Choice_Enum.Descriptor instead. func (BgpAttributesNextHop_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{149, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{183, 0, 0} } type BgpAttributesMpReachNlri_Choice_Enum int32 const ( - BgpAttributesMpReachNlri_Choice_unspecified BgpAttributesMpReachNlri_Choice_Enum = 0 - BgpAttributesMpReachNlri_Choice_ipv4_unicast BgpAttributesMpReachNlri_Choice_Enum = 1 - BgpAttributesMpReachNlri_Choice_ipv6_unicast BgpAttributesMpReachNlri_Choice_Enum = 2 + BgpAttributesMpReachNlri_Choice_unspecified BgpAttributesMpReachNlri_Choice_Enum = 0 + BgpAttributesMpReachNlri_Choice_ipv4_unicast BgpAttributesMpReachNlri_Choice_Enum = 1 + BgpAttributesMpReachNlri_Choice_ipv6_unicast BgpAttributesMpReachNlri_Choice_Enum = 2 + BgpAttributesMpReachNlri_Choice_ipv4_srpolicy BgpAttributesMpReachNlri_Choice_Enum = 3 + BgpAttributesMpReachNlri_Choice_ipv6_srpolicy BgpAttributesMpReachNlri_Choice_Enum = 4 ) // Enum value maps for BgpAttributesMpReachNlri_Choice_Enum. @@ -3396,11 +4049,15 @@ var ( 0: "unspecified", 1: "ipv4_unicast", 2: "ipv6_unicast", + 3: "ipv4_srpolicy", + 4: "ipv6_srpolicy", } BgpAttributesMpReachNlri_Choice_Enum_value = map[string]int32{ - "unspecified": 0, - "ipv4_unicast": 1, - "ipv6_unicast": 2, + "unspecified": 0, + "ipv4_unicast": 1, + "ipv6_unicast": 2, + "ipv4_srpolicy": 3, + "ipv6_srpolicy": 4, } ) @@ -3415,11 +4072,11 @@ func (x BgpAttributesMpReachNlri_Choice_Enum) String() string { } func (BgpAttributesMpReachNlri_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[63].Descriptor() + return file_otg_proto_enumTypes[75].Descriptor() } func (BgpAttributesMpReachNlri_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[63] + return &file_otg_proto_enumTypes[75] } func (x BgpAttributesMpReachNlri_Choice_Enum) Number() protoreflect.EnumNumber { @@ -3428,15 +4085,17 @@ func (x BgpAttributesMpReachNlri_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpAttributesMpReachNlri_Choice_Enum.Descriptor instead. func (BgpAttributesMpReachNlri_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{151, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{185, 0, 0} } type BgpAttributesMpUnreachNlri_Choice_Enum int32 const ( - BgpAttributesMpUnreachNlri_Choice_unspecified BgpAttributesMpUnreachNlri_Choice_Enum = 0 - BgpAttributesMpUnreachNlri_Choice_ipv4_unicast BgpAttributesMpUnreachNlri_Choice_Enum = 1 - BgpAttributesMpUnreachNlri_Choice_ipv6_unicast BgpAttributesMpUnreachNlri_Choice_Enum = 2 + BgpAttributesMpUnreachNlri_Choice_unspecified BgpAttributesMpUnreachNlri_Choice_Enum = 0 + BgpAttributesMpUnreachNlri_Choice_ipv4_unicast BgpAttributesMpUnreachNlri_Choice_Enum = 1 + BgpAttributesMpUnreachNlri_Choice_ipv6_unicast BgpAttributesMpUnreachNlri_Choice_Enum = 2 + BgpAttributesMpUnreachNlri_Choice_ipv4_srpolicy BgpAttributesMpUnreachNlri_Choice_Enum = 3 + BgpAttributesMpUnreachNlri_Choice_ipv6_srpolicy BgpAttributesMpUnreachNlri_Choice_Enum = 4 ) // Enum value maps for BgpAttributesMpUnreachNlri_Choice_Enum. @@ -3445,11 +4104,15 @@ var ( 0: "unspecified", 1: "ipv4_unicast", 2: "ipv6_unicast", + 3: "ipv4_srpolicy", + 4: "ipv6_srpolicy", } BgpAttributesMpUnreachNlri_Choice_Enum_value = map[string]int32{ - "unspecified": 0, - "ipv4_unicast": 1, - "ipv6_unicast": 2, + "unspecified": 0, + "ipv4_unicast": 1, + "ipv6_unicast": 2, + "ipv4_srpolicy": 3, + "ipv6_srpolicy": 4, } ) @@ -3464,11 +4127,11 @@ func (x BgpAttributesMpUnreachNlri_Choice_Enum) String() string { } func (BgpAttributesMpUnreachNlri_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[64].Descriptor() + return file_otg_proto_enumTypes[76].Descriptor() } func (BgpAttributesMpUnreachNlri_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[64] + return &file_otg_proto_enumTypes[76] } func (x BgpAttributesMpUnreachNlri_Choice_Enum) Number() protoreflect.EnumNumber { @@ -3477,7 +4140,236 @@ func (x BgpAttributesMpUnreachNlri_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use BgpAttributesMpUnreachNlri_Choice_Enum.Descriptor instead. func (BgpAttributesMpUnreachNlri_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{152, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{186, 0, 0} +} + +type BgpAttributesTunnelEncapsulation_Choice_Enum int32 + +const ( + BgpAttributesTunnelEncapsulation_Choice_unspecified BgpAttributesTunnelEncapsulation_Choice_Enum = 0 + BgpAttributesTunnelEncapsulation_Choice_sr_policy BgpAttributesTunnelEncapsulation_Choice_Enum = 1 +) + +// Enum value maps for BgpAttributesTunnelEncapsulation_Choice_Enum. +var ( + BgpAttributesTunnelEncapsulation_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "sr_policy", + } + BgpAttributesTunnelEncapsulation_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "sr_policy": 1, + } +) + +func (x BgpAttributesTunnelEncapsulation_Choice_Enum) Enum() *BgpAttributesTunnelEncapsulation_Choice_Enum { + p := new(BgpAttributesTunnelEncapsulation_Choice_Enum) + *p = x + return p +} + +func (x BgpAttributesTunnelEncapsulation_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BgpAttributesTunnelEncapsulation_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[77].Descriptor() +} + +func (BgpAttributesTunnelEncapsulation_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[77] +} + +func (x BgpAttributesTunnelEncapsulation_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BgpAttributesTunnelEncapsulation_Choice_Enum.Descriptor instead. +func (BgpAttributesTunnelEncapsulation_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{190, 0, 0} +} + +type BgpAttributesBsid_Choice_Enum int32 + +const ( + BgpAttributesBsid_Choice_unspecified BgpAttributesBsid_Choice_Enum = 0 + BgpAttributesBsid_Choice_mpls BgpAttributesBsid_Choice_Enum = 1 + BgpAttributesBsid_Choice_srv6 BgpAttributesBsid_Choice_Enum = 2 +) + +// Enum value maps for BgpAttributesBsid_Choice_Enum. +var ( + BgpAttributesBsid_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "mpls", + 2: "srv6", + } + BgpAttributesBsid_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "mpls": 1, + "srv6": 2, + } +) + +func (x BgpAttributesBsid_Choice_Enum) Enum() *BgpAttributesBsid_Choice_Enum { + p := new(BgpAttributesBsid_Choice_Enum) + *p = x + return p +} + +func (x BgpAttributesBsid_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BgpAttributesBsid_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[78].Descriptor() +} + +func (BgpAttributesBsid_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[78] +} + +func (x BgpAttributesBsid_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BgpAttributesBsid_Choice_Enum.Descriptor instead. +func (BgpAttributesBsid_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{192, 0, 0} +} + +type BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum int32 + +const ( + BgpAttributesSrPolicyExplicitNullPolicy_Choice_unspecified BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum = 0 + BgpAttributesSrPolicyExplicitNullPolicy_Choice_unknown BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum = 1 + BgpAttributesSrPolicyExplicitNullPolicy_Choice_push_ipv4 BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum = 2 + BgpAttributesSrPolicyExplicitNullPolicy_Choice_push_ipv6 BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum = 3 + BgpAttributesSrPolicyExplicitNullPolicy_Choice_push_ipv4_and_ipv6 BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum = 4 + BgpAttributesSrPolicyExplicitNullPolicy_Choice_donot_push BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum = 5 +) + +// Enum value maps for BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum. +var ( + BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "unknown", + 2: "push_ipv4", + 3: "push_ipv6", + 4: "push_ipv4_and_ipv6", + 5: "donot_push", + } + BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "unknown": 1, + "push_ipv4": 2, + "push_ipv6": 3, + "push_ipv4_and_ipv6": 4, + "donot_push": 5, + } +) + +func (x BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum) Enum() *BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum { + p := new(BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum) + *p = x + return p +} + +func (x BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[79].Descriptor() +} + +func (BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[79] +} + +func (x BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum.Descriptor instead. +func (BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{202, 0, 0} +} + +type BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum int32 + +const ( + BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_unspecified BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum = 0 + BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_type_a BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum = 1 + BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_type_b BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum = 2 + BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_type_c BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum = 3 + BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_type_d BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum = 4 + BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_type_e BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum = 5 + BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_type_f BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum = 6 + BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_type_g BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum = 7 + BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_type_h BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum = 8 + BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_type_i BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum = 9 + BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_type_j BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum = 10 + BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_type_k BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum = 11 +) + +// Enum value maps for BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum. +var ( + BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "type_a", + 2: "type_b", + 3: "type_c", + 4: "type_d", + 5: "type_e", + 6: "type_f", + 7: "type_g", + 8: "type_h", + 9: "type_i", + 10: "type_j", + 11: "type_k", + } + BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "type_a": 1, + "type_b": 2, + "type_c": 3, + "type_d": 4, + "type_e": 5, + "type_f": 6, + "type_g": 7, + "type_h": 8, + "type_i": 9, + "type_j": 10, + "type_k": 11, + } +) + +func (x BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum) Enum() *BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum { + p := new(BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum) + *p = x + return p +} + +func (x BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[80].Descriptor() +} + +func (BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[80] +} + +func (x BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum.Descriptor instead. +func (BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{205, 0, 0} } type BgpV6Peer_AsType_Enum int32 @@ -3513,11 +4405,11 @@ func (x BgpV6Peer_AsType_Enum) String() string { } func (BgpV6Peer_AsType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[65].Descriptor() + return file_otg_proto_enumTypes[81].Descriptor() } func (BgpV6Peer_AsType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[65] + return &file_otg_proto_enumTypes[81] } func (x BgpV6Peer_AsType_Enum) Number() protoreflect.EnumNumber { @@ -3526,7 +4418,7 @@ func (x BgpV6Peer_AsType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpV6Peer_AsType_Enum.Descriptor instead. func (BgpV6Peer_AsType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{156, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{220, 0, 0} } type BgpV6Peer_AsNumberWidth_Enum int32 @@ -3562,11 +4454,11 @@ func (x BgpV6Peer_AsNumberWidth_Enum) String() string { } func (BgpV6Peer_AsNumberWidth_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[66].Descriptor() + return file_otg_proto_enumTypes[82].Descriptor() } func (BgpV6Peer_AsNumberWidth_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[66] + return &file_otg_proto_enumTypes[82] } func (x BgpV6Peer_AsNumberWidth_Enum) Number() protoreflect.EnumNumber { @@ -3575,7 +4467,7 @@ func (x BgpV6Peer_AsNumberWidth_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpV6Peer_AsNumberWidth_Enum.Descriptor instead. func (BgpV6Peer_AsNumberWidth_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{156, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{220, 1, 0} } type BgpV6EthernetSegment_ActiveMode_Enum int32 @@ -3611,11 +4503,11 @@ func (x BgpV6EthernetSegment_ActiveMode_Enum) String() string { } func (BgpV6EthernetSegment_ActiveMode_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[67].Descriptor() + return file_otg_proto_enumTypes[83].Descriptor() } func (BgpV6EthernetSegment_ActiveMode_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[67] + return &file_otg_proto_enumTypes[83] } func (x BgpV6EthernetSegment_ActiveMode_Enum) Number() protoreflect.EnumNumber { @@ -3624,7 +4516,7 @@ func (x BgpV6EthernetSegment_ActiveMode_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpV6EthernetSegment_ActiveMode_Enum.Descriptor instead. func (BgpV6EthernetSegment_ActiveMode_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{159, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{223, 0, 0} } type BgpV6EvpnEvis_Choice_Enum int32 @@ -3657,11 +4549,11 @@ func (x BgpV6EvpnEvis_Choice_Enum) String() string { } func (BgpV6EvpnEvis_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[68].Descriptor() + return file_otg_proto_enumTypes[84].Descriptor() } func (BgpV6EvpnEvis_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[68] + return &file_otg_proto_enumTypes[84] } func (x BgpV6EvpnEvis_Choice_Enum) Number() protoreflect.EnumNumber { @@ -3670,7 +4562,7 @@ func (x BgpV6EvpnEvis_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpV6EvpnEvis_Choice_Enum.Descriptor instead. func (BgpV6EvpnEvis_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{160, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{224, 0, 0} } type BgpV6EviVxlan_ReplicationType_Enum int32 @@ -3703,11 +4595,11 @@ func (x BgpV6EviVxlan_ReplicationType_Enum) String() string { } func (BgpV6EviVxlan_ReplicationType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[69].Descriptor() + return file_otg_proto_enumTypes[85].Descriptor() } func (BgpV6EviVxlan_ReplicationType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[69] + return &file_otg_proto_enumTypes[85] } func (x BgpV6EviVxlan_ReplicationType_Enum) Number() protoreflect.EnumNumber { @@ -3716,7 +4608,7 @@ func (x BgpV6EviVxlan_ReplicationType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use BgpV6EviVxlan_ReplicationType_Enum.Descriptor instead. func (BgpV6EviVxlan_ReplicationType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{161, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{225, 0, 0} } type VxlanV4TunnelDestinationIPMode_Choice_Enum int32 @@ -3752,11 +4644,11 @@ func (x VxlanV4TunnelDestinationIPMode_Choice_Enum) String() string { } func (VxlanV4TunnelDestinationIPMode_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[70].Descriptor() + return file_otg_proto_enumTypes[86].Descriptor() } func (VxlanV4TunnelDestinationIPMode_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[70] + return &file_otg_proto_enumTypes[86] } func (x VxlanV4TunnelDestinationIPMode_Choice_Enum) Number() protoreflect.EnumNumber { @@ -3765,7 +4657,7 @@ func (x VxlanV4TunnelDestinationIPMode_Choice_Enum) Number() protoreflect.EnumNu // Deprecated: Use VxlanV4TunnelDestinationIPMode_Choice_Enum.Descriptor instead. func (VxlanV4TunnelDestinationIPMode_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{166, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{230, 0, 0} } type VxlanV6TunnelDestinationIPMode_Choice_Enum int32 @@ -3801,11 +4693,11 @@ func (x VxlanV6TunnelDestinationIPMode_Choice_Enum) String() string { } func (VxlanV6TunnelDestinationIPMode_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[71].Descriptor() + return file_otg_proto_enumTypes[87].Descriptor() } func (VxlanV6TunnelDestinationIPMode_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[71] + return &file_otg_proto_enumTypes[87] } func (x VxlanV6TunnelDestinationIPMode_Choice_Enum) Number() protoreflect.EnumNumber { @@ -3814,7 +4706,7 @@ func (x VxlanV6TunnelDestinationIPMode_Choice_Enum) Number() protoreflect.EnumNu // Deprecated: Use VxlanV6TunnelDestinationIPMode_Choice_Enum.Descriptor instead. func (VxlanV6TunnelDestinationIPMode_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{167, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{231, 0, 0} } type RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum int32 @@ -3853,11 +4745,11 @@ func (x RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum) String() str } func (RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[72].Descriptor() + return file_otg_proto_enumTypes[88].Descriptor() } func (RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[72] + return &file_otg_proto_enumTypes[88] } func (x RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum) Number() protoreflect.EnumNumber { @@ -3866,7 +4758,7 @@ func (x RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum) Number() pro // Deprecated: Use RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum.Descriptor instead. func (RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{178, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{242, 0, 0} } type RsvpEro_PrependNeighborIp_Enum int32 @@ -3905,11 +4797,11 @@ func (x RsvpEro_PrependNeighborIp_Enum) String() string { } func (RsvpEro_PrependNeighborIp_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[73].Descriptor() + return file_otg_proto_enumTypes[89].Descriptor() } func (RsvpEro_PrependNeighborIp_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[73] + return &file_otg_proto_enumTypes[89] } func (x RsvpEro_PrependNeighborIp_Enum) Number() protoreflect.EnumNumber { @@ -3918,7 +4810,7 @@ func (x RsvpEro_PrependNeighborIp_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use RsvpEro_PrependNeighborIp_Enum.Descriptor instead. func (RsvpEro_PrependNeighborIp_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{184, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{248, 0, 0} } type RsvpEroSubobject_Type_Enum int32 @@ -3954,11 +4846,11 @@ func (x RsvpEroSubobject_Type_Enum) String() string { } func (RsvpEroSubobject_Type_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[74].Descriptor() + return file_otg_proto_enumTypes[90].Descriptor() } func (RsvpEroSubobject_Type_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[74] + return &file_otg_proto_enumTypes[90] } func (x RsvpEroSubobject_Type_Enum) Number() protoreflect.EnumNumber { @@ -3967,7 +4859,7 @@ func (x RsvpEroSubobject_Type_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use RsvpEroSubobject_Type_Enum.Descriptor instead. func (RsvpEroSubobject_Type_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{185, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{249, 0, 0} } type RsvpEroSubobject_HopType_Enum int32 @@ -4003,11 +4895,11 @@ func (x RsvpEroSubobject_HopType_Enum) String() string { } func (RsvpEroSubobject_HopType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[75].Descriptor() + return file_otg_proto_enumTypes[91].Descriptor() } func (RsvpEroSubobject_HopType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[75] + return &file_otg_proto_enumTypes[91] } func (x RsvpEroSubobject_HopType_Enum) Number() protoreflect.EnumNumber { @@ -4016,7 +4908,319 @@ func (x RsvpEroSubobject_HopType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use RsvpEroSubobject_HopType_Enum.Descriptor instead. func (RsvpEroSubobject_HopType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{185, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{249, 1, 0} +} + +type Dhcpv6ServerIaType_Choice_Enum int32 + +const ( + Dhcpv6ServerIaType_Choice_unspecified Dhcpv6ServerIaType_Choice_Enum = 0 + Dhcpv6ServerIaType_Choice_iana Dhcpv6ServerIaType_Choice_Enum = 1 + Dhcpv6ServerIaType_Choice_iata Dhcpv6ServerIaType_Choice_Enum = 2 + Dhcpv6ServerIaType_Choice_iapd Dhcpv6ServerIaType_Choice_Enum = 3 + Dhcpv6ServerIaType_Choice_ianapd Dhcpv6ServerIaType_Choice_Enum = 4 +) + +// Enum value maps for Dhcpv6ServerIaType_Choice_Enum. +var ( + Dhcpv6ServerIaType_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "iana", + 2: "iata", + 3: "iapd", + 4: "ianapd", + } + Dhcpv6ServerIaType_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "iana": 1, + "iata": 2, + "iapd": 3, + "ianapd": 4, + } +) + +func (x Dhcpv6ServerIaType_Choice_Enum) Enum() *Dhcpv6ServerIaType_Choice_Enum { + p := new(Dhcpv6ServerIaType_Choice_Enum) + *p = x + return p +} + +func (x Dhcpv6ServerIaType_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dhcpv6ServerIaType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[92].Descriptor() +} + +func (Dhcpv6ServerIaType_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[92] +} + +func (x Dhcpv6ServerIaType_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dhcpv6ServerIaType_Choice_Enum.Descriptor instead. +func (Dhcpv6ServerIaType_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{257, 0, 0} +} + +type Ospfv2RouterId_Choice_Enum int32 + +const ( + Ospfv2RouterId_Choice_unspecified Ospfv2RouterId_Choice_Enum = 0 + Ospfv2RouterId_Choice_interface_ip Ospfv2RouterId_Choice_Enum = 1 + Ospfv2RouterId_Choice_custom Ospfv2RouterId_Choice_Enum = 2 +) + +// Enum value maps for Ospfv2RouterId_Choice_Enum. +var ( + Ospfv2RouterId_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "interface_ip", + 2: "custom", + } + Ospfv2RouterId_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "interface_ip": 1, + "custom": 2, + } +) + +func (x Ospfv2RouterId_Choice_Enum) Enum() *Ospfv2RouterId_Choice_Enum { + p := new(Ospfv2RouterId_Choice_Enum) + *p = x + return p +} + +func (x Ospfv2RouterId_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Ospfv2RouterId_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[93].Descriptor() +} + +func (Ospfv2RouterId_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[93] +} + +func (x Ospfv2RouterId_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Ospfv2RouterId_Choice_Enum.Descriptor instead. +func (Ospfv2RouterId_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{264, 0, 0} +} + +type Ospfv2InterfaceArea_Choice_Enum int32 + +const ( + Ospfv2InterfaceArea_Choice_unspecified Ospfv2InterfaceArea_Choice_Enum = 0 + Ospfv2InterfaceArea_Choice_id Ospfv2InterfaceArea_Choice_Enum = 1 + Ospfv2InterfaceArea_Choice_ip Ospfv2InterfaceArea_Choice_Enum = 2 +) + +// Enum value maps for Ospfv2InterfaceArea_Choice_Enum. +var ( + Ospfv2InterfaceArea_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "id", + 2: "ip", + } + Ospfv2InterfaceArea_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "id": 1, + "ip": 2, + } +) + +func (x Ospfv2InterfaceArea_Choice_Enum) Enum() *Ospfv2InterfaceArea_Choice_Enum { + p := new(Ospfv2InterfaceArea_Choice_Enum) + *p = x + return p +} + +func (x Ospfv2InterfaceArea_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Ospfv2InterfaceArea_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[94].Descriptor() +} + +func (Ospfv2InterfaceArea_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[94] +} + +func (x Ospfv2InterfaceArea_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Ospfv2InterfaceArea_Choice_Enum.Descriptor instead. +func (Ospfv2InterfaceArea_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{268, 0, 0} +} + +type Ospfv2InterfaceNetworkType_Choice_Enum int32 + +const ( + Ospfv2InterfaceNetworkType_Choice_unspecified Ospfv2InterfaceNetworkType_Choice_Enum = 0 + Ospfv2InterfaceNetworkType_Choice_broadcast Ospfv2InterfaceNetworkType_Choice_Enum = 1 + Ospfv2InterfaceNetworkType_Choice_point_to_point Ospfv2InterfaceNetworkType_Choice_Enum = 2 + Ospfv2InterfaceNetworkType_Choice_point_to_multipoint Ospfv2InterfaceNetworkType_Choice_Enum = 3 +) + +// Enum value maps for Ospfv2InterfaceNetworkType_Choice_Enum. +var ( + Ospfv2InterfaceNetworkType_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "broadcast", + 2: "point_to_point", + 3: "point_to_multipoint", + } + Ospfv2InterfaceNetworkType_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "broadcast": 1, + "point_to_point": 2, + "point_to_multipoint": 3, + } +) + +func (x Ospfv2InterfaceNetworkType_Choice_Enum) Enum() *Ospfv2InterfaceNetworkType_Choice_Enum { + p := new(Ospfv2InterfaceNetworkType_Choice_Enum) + *p = x + return p +} + +func (x Ospfv2InterfaceNetworkType_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Ospfv2InterfaceNetworkType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[95].Descriptor() +} + +func (Ospfv2InterfaceNetworkType_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[95] +} + +func (x Ospfv2InterfaceNetworkType_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Ospfv2InterfaceNetworkType_Choice_Enum.Descriptor instead. +func (Ospfv2InterfaceNetworkType_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{269, 0, 0} +} + +type Ospfv2InterfaceAuthentication_Choice_Enum int32 + +const ( + Ospfv2InterfaceAuthentication_Choice_unspecified Ospfv2InterfaceAuthentication_Choice_Enum = 0 + Ospfv2InterfaceAuthentication_Choice_md5s Ospfv2InterfaceAuthentication_Choice_Enum = 1 + Ospfv2InterfaceAuthentication_Choice_clear_text Ospfv2InterfaceAuthentication_Choice_Enum = 2 +) + +// Enum value maps for Ospfv2InterfaceAuthentication_Choice_Enum. +var ( + Ospfv2InterfaceAuthentication_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "md5s", + 2: "clear_text", + } + Ospfv2InterfaceAuthentication_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "md5s": 1, + "clear_text": 2, + } +) + +func (x Ospfv2InterfaceAuthentication_Choice_Enum) Enum() *Ospfv2InterfaceAuthentication_Choice_Enum { + p := new(Ospfv2InterfaceAuthentication_Choice_Enum) + *p = x + return p +} + +func (x Ospfv2InterfaceAuthentication_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Ospfv2InterfaceAuthentication_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[96].Descriptor() +} + +func (Ospfv2InterfaceAuthentication_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[96] +} + +func (x Ospfv2InterfaceAuthentication_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Ospfv2InterfaceAuthentication_Choice_Enum.Descriptor instead. +func (Ospfv2InterfaceAuthentication_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{273, 0, 0} +} + +type Ospfv2V4RRRouteOrigin_Choice_Enum int32 + +const ( + Ospfv2V4RRRouteOrigin_Choice_unspecified Ospfv2V4RRRouteOrigin_Choice_Enum = 0 + Ospfv2V4RRRouteOrigin_Choice_intra_area Ospfv2V4RRRouteOrigin_Choice_Enum = 1 + Ospfv2V4RRRouteOrigin_Choice_inter_area Ospfv2V4RRRouteOrigin_Choice_Enum = 2 + Ospfv2V4RRRouteOrigin_Choice_external_type_1 Ospfv2V4RRRouteOrigin_Choice_Enum = 3 + Ospfv2V4RRRouteOrigin_Choice_external_type_2 Ospfv2V4RRRouteOrigin_Choice_Enum = 4 + Ospfv2V4RRRouteOrigin_Choice_nssa_external Ospfv2V4RRRouteOrigin_Choice_Enum = 5 +) + +// Enum value maps for Ospfv2V4RRRouteOrigin_Choice_Enum. +var ( + Ospfv2V4RRRouteOrigin_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "intra_area", + 2: "inter_area", + 3: "external_type_1", + 4: "external_type_2", + 5: "nssa_external", + } + Ospfv2V4RRRouteOrigin_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "intra_area": 1, + "inter_area": 2, + "external_type_1": 3, + "external_type_2": 4, + "nssa_external": 5, + } +) + +func (x Ospfv2V4RRRouteOrigin_Choice_Enum) Enum() *Ospfv2V4RRRouteOrigin_Choice_Enum { + p := new(Ospfv2V4RRRouteOrigin_Choice_Enum) + *p = x + return p +} + +func (x Ospfv2V4RRRouteOrigin_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Ospfv2V4RRRouteOrigin_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[97].Descriptor() +} + +func (Ospfv2V4RRRouteOrigin_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[97] +} + +func (x Ospfv2V4RRRouteOrigin_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Ospfv2V4RRRouteOrigin_Choice_Enum.Descriptor instead. +func (Ospfv2V4RRRouteOrigin_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{277, 0, 0} } type FlowTxRx_Choice_Enum int32 @@ -4052,11 +5256,11 @@ func (x FlowTxRx_Choice_Enum) String() string { } func (FlowTxRx_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[76].Descriptor() + return file_otg_proto_enumTypes[98].Descriptor() } func (FlowTxRx_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[76] + return &file_otg_proto_enumTypes[98] } func (x FlowTxRx_Choice_Enum) Number() protoreflect.EnumNumber { @@ -4065,7 +5269,7 @@ func (x FlowTxRx_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowTxRx_Choice_Enum.Descriptor instead. func (FlowTxRx_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{187, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{285, 0, 0} } type FlowRouter_Mode_Enum int32 @@ -4101,11 +5305,11 @@ func (x FlowRouter_Mode_Enum) String() string { } func (FlowRouter_Mode_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[77].Descriptor() + return file_otg_proto_enumTypes[99].Descriptor() } func (FlowRouter_Mode_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[77] + return &file_otg_proto_enumTypes[99] } func (x FlowRouter_Mode_Enum) Number() protoreflect.EnumNumber { @@ -4114,7 +5318,7 @@ func (x FlowRouter_Mode_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowRouter_Mode_Enum.Descriptor instead. func (FlowRouter_Mode_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{189, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{287, 0, 0} } type FlowHeader_Choice_Enum int32 @@ -4207,11 +5411,11 @@ func (x FlowHeader_Choice_Enum) String() string { } func (FlowHeader_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[78].Descriptor() + return file_otg_proto_enumTypes[100].Descriptor() } func (FlowHeader_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[78] + return &file_otg_proto_enumTypes[100] } func (x FlowHeader_Choice_Enum) Number() protoreflect.EnumNumber { @@ -4220,7 +5424,7 @@ func (x FlowHeader_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowHeader_Choice_Enum.Descriptor instead. func (FlowHeader_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{190, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{288, 0, 0} } type FlowIpv4Options_Choice_Enum int32 @@ -4256,11 +5460,11 @@ func (x FlowIpv4Options_Choice_Enum) String() string { } func (FlowIpv4Options_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[79].Descriptor() + return file_otg_proto_enumTypes[101].Descriptor() } func (FlowIpv4Options_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[79] + return &file_otg_proto_enumTypes[101] } func (x FlowIpv4Options_Choice_Enum) Number() protoreflect.EnumNumber { @@ -4269,7 +5473,7 @@ func (x FlowIpv4Options_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowIpv4Options_Choice_Enum.Descriptor instead. func (FlowIpv4Options_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{197, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{295, 0, 0} } type FlowIpv4OptionsCustomLength_Choice_Enum int32 @@ -4305,11 +5509,11 @@ func (x FlowIpv4OptionsCustomLength_Choice_Enum) String() string { } func (FlowIpv4OptionsCustomLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[80].Descriptor() + return file_otg_proto_enumTypes[102].Descriptor() } func (FlowIpv4OptionsCustomLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[80] + return &file_otg_proto_enumTypes[102] } func (x FlowIpv4OptionsCustomLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -4318,7 +5522,7 @@ func (x FlowIpv4OptionsCustomLength_Choice_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use FlowIpv4OptionsCustomLength_Choice_Enum.Descriptor instead. func (FlowIpv4OptionsCustomLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{200, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{298, 0, 0} } type FlowIpv4Priority_Choice_Enum int32 @@ -4357,11 +5561,11 @@ func (x FlowIpv4Priority_Choice_Enum) String() string { } func (FlowIpv4Priority_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[81].Descriptor() + return file_otg_proto_enumTypes[103].Descriptor() } func (FlowIpv4Priority_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[81] + return &file_otg_proto_enumTypes[103] } func (x FlowIpv4Priority_Choice_Enum) Number() protoreflect.EnumNumber { @@ -4370,7 +5574,99 @@ func (x FlowIpv4Priority_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowIpv4Priority_Choice_Enum.Descriptor instead. func (FlowIpv4Priority_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{201, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{299, 0, 0} +} + +type FlowIpv4Auto_Choice_Enum int32 + +const ( + FlowIpv4Auto_Choice_unspecified FlowIpv4Auto_Choice_Enum = 0 + FlowIpv4Auto_Choice_dhcp FlowIpv4Auto_Choice_Enum = 1 +) + +// Enum value maps for FlowIpv4Auto_Choice_Enum. +var ( + FlowIpv4Auto_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "dhcp", + } + FlowIpv4Auto_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "dhcp": 1, + } +) + +func (x FlowIpv4Auto_Choice_Enum) Enum() *FlowIpv4Auto_Choice_Enum { + p := new(FlowIpv4Auto_Choice_Enum) + *p = x + return p +} + +func (x FlowIpv4Auto_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FlowIpv4Auto_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[104].Descriptor() +} + +func (FlowIpv4Auto_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[104] +} + +func (x FlowIpv4Auto_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FlowIpv4Auto_Choice_Enum.Descriptor instead. +func (FlowIpv4Auto_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{302, 0, 0} +} + +type FlowIpv6Auto_Choice_Enum int32 + +const ( + FlowIpv6Auto_Choice_unspecified FlowIpv6Auto_Choice_Enum = 0 + FlowIpv6Auto_Choice_dhcp FlowIpv6Auto_Choice_Enum = 1 +) + +// Enum value maps for FlowIpv6Auto_Choice_Enum. +var ( + FlowIpv6Auto_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "dhcp", + } + FlowIpv6Auto_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "dhcp": 1, + } +) + +func (x FlowIpv6Auto_Choice_Enum) Enum() *FlowIpv6Auto_Choice_Enum { + p := new(FlowIpv6Auto_Choice_Enum) + *p = x + return p +} + +func (x FlowIpv6Auto_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FlowIpv6Auto_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[105].Descriptor() +} + +func (FlowIpv6Auto_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[105] +} + +func (x FlowIpv6Auto_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FlowIpv6Auto_Choice_Enum.Descriptor instead. +func (FlowIpv6Auto_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{304, 0, 0} } type FlowIcmp_Choice_Enum int32 @@ -4403,11 +5699,11 @@ func (x FlowIcmp_Choice_Enum) String() string { } func (FlowIcmp_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[82].Descriptor() + return file_otg_proto_enumTypes[106].Descriptor() } func (FlowIcmp_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[82] + return &file_otg_proto_enumTypes[106] } func (x FlowIcmp_Choice_Enum) Number() protoreflect.EnumNumber { @@ -4416,7 +5712,7 @@ func (x FlowIcmp_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowIcmp_Choice_Enum.Descriptor instead. func (FlowIcmp_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{214, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{314, 0, 0} } type FlowIcmpv6_Choice_Enum int32 @@ -4449,11 +5745,11 @@ func (x FlowIcmpv6_Choice_Enum) String() string { } func (FlowIcmpv6_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[83].Descriptor() + return file_otg_proto_enumTypes[107].Descriptor() } func (FlowIcmpv6_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[83] + return &file_otg_proto_enumTypes[107] } func (x FlowIcmpv6_Choice_Enum) Number() protoreflect.EnumNumber { @@ -4462,7 +5758,7 @@ func (x FlowIcmpv6_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowIcmpv6_Choice_Enum.Descriptor instead. func (FlowIcmpv6_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{216, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{316, 0, 0} } type FlowSnmpv2CData_Choice_Enum int32 @@ -4516,11 +5812,11 @@ func (x FlowSnmpv2CData_Choice_Enum) String() string { } func (FlowSnmpv2CData_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[84].Descriptor() + return file_otg_proto_enumTypes[108].Descriptor() } func (FlowSnmpv2CData_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[84] + return &file_otg_proto_enumTypes[108] } func (x FlowSnmpv2CData_Choice_Enum) Number() protoreflect.EnumNumber { @@ -4529,7 +5825,7 @@ func (x FlowSnmpv2CData_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowSnmpv2CData_Choice_Enum.Descriptor instead. func (FlowSnmpv2CData_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{222, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{322, 0, 0} } type FlowSnmpv2CPDU_ErrorStatus_Enum int32 @@ -4616,11 +5912,11 @@ func (x FlowSnmpv2CPDU_ErrorStatus_Enum) String() string { } func (FlowSnmpv2CPDU_ErrorStatus_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[85].Descriptor() + return file_otg_proto_enumTypes[109].Descriptor() } func (FlowSnmpv2CPDU_ErrorStatus_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[85] + return &file_otg_proto_enumTypes[109] } func (x FlowSnmpv2CPDU_ErrorStatus_Enum) Number() protoreflect.EnumNumber { @@ -4629,7 +5925,7 @@ func (x FlowSnmpv2CPDU_ErrorStatus_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowSnmpv2CPDU_ErrorStatus_Enum.Descriptor instead. func (FlowSnmpv2CPDU_ErrorStatus_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{223, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{323, 0, 0} } type FlowSnmpv2CVariableBindingValue_Choice_Enum int32 @@ -4689,11 +5985,11 @@ func (x FlowSnmpv2CVariableBindingValue_Choice_Enum) String() string { } func (FlowSnmpv2CVariableBindingValue_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[86].Descriptor() + return file_otg_proto_enumTypes[110].Descriptor() } func (FlowSnmpv2CVariableBindingValue_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[86] + return &file_otg_proto_enumTypes[110] } func (x FlowSnmpv2CVariableBindingValue_Choice_Enum) Number() protoreflect.EnumNumber { @@ -4702,7 +5998,7 @@ func (x FlowSnmpv2CVariableBindingValue_Choice_Enum) Number() protoreflect.EnumN // Deprecated: Use FlowSnmpv2CVariableBindingValue_Choice_Enum.Descriptor instead. func (FlowSnmpv2CVariableBindingValue_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{226, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{326, 0, 0} } type FlowSnmpv2CVariableBindingStringValue_Choice_Enum int32 @@ -4738,11 +6034,11 @@ func (x FlowSnmpv2CVariableBindingStringValue_Choice_Enum) String() string { } func (FlowSnmpv2CVariableBindingStringValue_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[87].Descriptor() + return file_otg_proto_enumTypes[111].Descriptor() } func (FlowSnmpv2CVariableBindingStringValue_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[87] + return &file_otg_proto_enumTypes[111] } func (x FlowSnmpv2CVariableBindingStringValue_Choice_Enum) Number() protoreflect.EnumNumber { @@ -4751,7 +6047,7 @@ func (x FlowSnmpv2CVariableBindingStringValue_Choice_Enum) Number() protoreflect // Deprecated: Use FlowSnmpv2CVariableBindingStringValue_Choice_Enum.Descriptor instead. func (FlowSnmpv2CVariableBindingStringValue_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{227, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{327, 0, 0} } type FlowRsvp_Flag_Enum int32 @@ -4787,11 +6083,11 @@ func (x FlowRsvp_Flag_Enum) String() string { } func (FlowRsvp_Flag_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[88].Descriptor() + return file_otg_proto_enumTypes[112].Descriptor() } func (FlowRsvp_Flag_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[88] + return &file_otg_proto_enumTypes[112] } func (x FlowRsvp_Flag_Enum) Number() protoreflect.EnumNumber { @@ -4800,7 +6096,7 @@ func (x FlowRsvp_Flag_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowRsvp_Flag_Enum.Descriptor instead. func (FlowRsvp_Flag_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{228, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{328, 0, 0} } type FlowRSVPLength_Choice_Enum int32 @@ -4836,11 +6132,11 @@ func (x FlowRSVPLength_Choice_Enum) String() string { } func (FlowRSVPLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[89].Descriptor() + return file_otg_proto_enumTypes[113].Descriptor() } func (FlowRSVPLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[89] + return &file_otg_proto_enumTypes[113] } func (x FlowRSVPLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -4849,7 +6145,7 @@ func (x FlowRSVPLength_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowRSVPLength_Choice_Enum.Descriptor instead. func (FlowRSVPLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{229, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{329, 0, 0} } type FlowRSVPMessage_Choice_Enum int32 @@ -4882,11 +6178,11 @@ func (x FlowRSVPMessage_Choice_Enum) String() string { } func (FlowRSVPMessage_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[90].Descriptor() + return file_otg_proto_enumTypes[114].Descriptor() } func (FlowRSVPMessage_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[90] + return &file_otg_proto_enumTypes[114] } func (x FlowRSVPMessage_Choice_Enum) Number() protoreflect.EnumNumber { @@ -4895,7 +6191,7 @@ func (x FlowRSVPMessage_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowRSVPMessage_Choice_Enum.Descriptor instead. func (FlowRSVPMessage_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{230, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{330, 0, 0} } type FlowRSVPObjectLength_Choice_Enum int32 @@ -4931,11 +6227,11 @@ func (x FlowRSVPObjectLength_Choice_Enum) String() string { } func (FlowRSVPObjectLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[91].Descriptor() + return file_otg_proto_enumTypes[115].Descriptor() } func (FlowRSVPObjectLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[91] + return &file_otg_proto_enumTypes[115] } func (x FlowRSVPObjectLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -4944,7 +6240,7 @@ func (x FlowRSVPObjectLength_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowRSVPObjectLength_Choice_Enum.Descriptor instead. func (FlowRSVPObjectLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{233, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{333, 0, 0} } type FlowRSVPPathObjectsClass_Choice_Enum int32 @@ -5004,11 +6300,11 @@ func (x FlowRSVPPathObjectsClass_Choice_Enum) String() string { } func (FlowRSVPPathObjectsClass_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[92].Descriptor() + return file_otg_proto_enumTypes[116].Descriptor() } func (FlowRSVPPathObjectsClass_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[92] + return &file_otg_proto_enumTypes[116] } func (x FlowRSVPPathObjectsClass_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5017,7 +6313,7 @@ func (x FlowRSVPPathObjectsClass_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowRSVPPathObjectsClass_Choice_Enum.Descriptor instead. func (FlowRSVPPathObjectsClass_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{234, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{334, 0, 0} } type FlowRSVPPathObjectsSessionCType_Choice_Enum int32 @@ -5050,11 +6346,11 @@ func (x FlowRSVPPathObjectsSessionCType_Choice_Enum) String() string { } func (FlowRSVPPathObjectsSessionCType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[93].Descriptor() + return file_otg_proto_enumTypes[117].Descriptor() } func (FlowRSVPPathObjectsSessionCType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[93] + return &file_otg_proto_enumTypes[117] } func (x FlowRSVPPathObjectsSessionCType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5063,7 +6359,7 @@ func (x FlowRSVPPathObjectsSessionCType_Choice_Enum) Number() protoreflect.EnumN // Deprecated: Use FlowRSVPPathObjectsSessionCType_Choice_Enum.Descriptor instead. func (FlowRSVPPathObjectsSessionCType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{236, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{336, 0, 0} } type FlowRSVPPathSessionExtTunnelId_Choice_Enum int32 @@ -5099,11 +6395,11 @@ func (x FlowRSVPPathSessionExtTunnelId_Choice_Enum) String() string { } func (FlowRSVPPathSessionExtTunnelId_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[94].Descriptor() + return file_otg_proto_enumTypes[118].Descriptor() } func (FlowRSVPPathSessionExtTunnelId_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[94] + return &file_otg_proto_enumTypes[118] } func (x FlowRSVPPathSessionExtTunnelId_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5112,7 +6408,7 @@ func (x FlowRSVPPathSessionExtTunnelId_Choice_Enum) Number() protoreflect.EnumNu // Deprecated: Use FlowRSVPPathSessionExtTunnelId_Choice_Enum.Descriptor instead. func (FlowRSVPPathSessionExtTunnelId_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{238, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{338, 0, 0} } type FlowRSVPPathObjectsRsvpHopCType_Choice_Enum int32 @@ -5145,11 +6441,11 @@ func (x FlowRSVPPathObjectsRsvpHopCType_Choice_Enum) String() string { } func (FlowRSVPPathObjectsRsvpHopCType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[95].Descriptor() + return file_otg_proto_enumTypes[119].Descriptor() } func (FlowRSVPPathObjectsRsvpHopCType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[95] + return &file_otg_proto_enumTypes[119] } func (x FlowRSVPPathObjectsRsvpHopCType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5158,7 +6454,7 @@ func (x FlowRSVPPathObjectsRsvpHopCType_Choice_Enum) Number() protoreflect.EnumN // Deprecated: Use FlowRSVPPathObjectsRsvpHopCType_Choice_Enum.Descriptor instead. func (FlowRSVPPathObjectsRsvpHopCType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{240, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{340, 0, 0} } type FlowRSVPPathObjectsTimeValuesCType_Choice_Enum int32 @@ -5191,11 +6487,11 @@ func (x FlowRSVPPathObjectsTimeValuesCType_Choice_Enum) String() string { } func (FlowRSVPPathObjectsTimeValuesCType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[96].Descriptor() + return file_otg_proto_enumTypes[120].Descriptor() } func (FlowRSVPPathObjectsTimeValuesCType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[96] + return &file_otg_proto_enumTypes[120] } func (x FlowRSVPPathObjectsTimeValuesCType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5204,7 +6500,7 @@ func (x FlowRSVPPathObjectsTimeValuesCType_Choice_Enum) Number() protoreflect.En // Deprecated: Use FlowRSVPPathObjectsTimeValuesCType_Choice_Enum.Descriptor instead. func (FlowRSVPPathObjectsTimeValuesCType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{243, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{343, 0, 0} } type FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum int32 @@ -5237,11 +6533,11 @@ func (x FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum) String() string } func (FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[97].Descriptor() + return file_otg_proto_enumTypes[121].Descriptor() } func (FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[97] + return &file_otg_proto_enumTypes[121] } func (x FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5250,7 +6546,7 @@ func (x FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum) Number() protore // Deprecated: Use FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum.Descriptor instead. func (FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{246, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{346, 0, 0} } type FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum int32 @@ -5286,11 +6582,11 @@ func (x FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum) String() string { } func (FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[98].Descriptor() + return file_otg_proto_enumTypes[122].Descriptor() } func (FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[98] + return &file_otg_proto_enumTypes[122] } func (x FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5299,7 +6595,7 @@ func (x FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum) Number() protorefl // Deprecated: Use FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum.Descriptor instead. func (FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{249, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{349, 0, 0} } type FlowRSVPExplicitRouteLength_Choice_Enum int32 @@ -5335,11 +6631,11 @@ func (x FlowRSVPExplicitRouteLength_Choice_Enum) String() string { } func (FlowRSVPExplicitRouteLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[99].Descriptor() + return file_otg_proto_enumTypes[123].Descriptor() } func (FlowRSVPExplicitRouteLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[99] + return &file_otg_proto_enumTypes[123] } func (x FlowRSVPExplicitRouteLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5348,7 +6644,7 @@ func (x FlowRSVPExplicitRouteLength_Choice_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use FlowRSVPExplicitRouteLength_Choice_Enum.Descriptor instead. func (FlowRSVPExplicitRouteLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{252, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{352, 0, 0} } type FlowRSVPExplicitRouteASNumberLength_Choice_Enum int32 @@ -5384,11 +6680,11 @@ func (x FlowRSVPExplicitRouteASNumberLength_Choice_Enum) String() string { } func (FlowRSVPExplicitRouteASNumberLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[100].Descriptor() + return file_otg_proto_enumTypes[124].Descriptor() } func (FlowRSVPExplicitRouteASNumberLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[100] + return &file_otg_proto_enumTypes[124] } func (x FlowRSVPExplicitRouteASNumberLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5397,7 +6693,7 @@ func (x FlowRSVPExplicitRouteASNumberLength_Choice_Enum) Number() protoreflect.E // Deprecated: Use FlowRSVPExplicitRouteASNumberLength_Choice_Enum.Descriptor instead. func (FlowRSVPExplicitRouteASNumberLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{253, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{353, 0, 0} } type FlowRSVPPathObjectsLabelRequestCType_Choice_Enum int32 @@ -5430,11 +6726,11 @@ func (x FlowRSVPPathObjectsLabelRequestCType_Choice_Enum) String() string { } func (FlowRSVPPathObjectsLabelRequestCType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[101].Descriptor() + return file_otg_proto_enumTypes[125].Descriptor() } func (FlowRSVPPathObjectsLabelRequestCType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[101] + return &file_otg_proto_enumTypes[125] } func (x FlowRSVPPathObjectsLabelRequestCType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5443,7 +6739,7 @@ func (x FlowRSVPPathObjectsLabelRequestCType_Choice_Enum) Number() protoreflect. // Deprecated: Use FlowRSVPPathObjectsLabelRequestCType_Choice_Enum.Descriptor instead. func (FlowRSVPPathObjectsLabelRequestCType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{255, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{355, 0, 0} } type FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum int32 @@ -5479,11 +6775,11 @@ func (x FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum) String() string { } func (FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[102].Descriptor() + return file_otg_proto_enumTypes[126].Descriptor() } func (FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[102] + return &file_otg_proto_enumTypes[126] } func (x FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5492,7 +6788,7 @@ func (x FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum) Number() protorefl // Deprecated: Use FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum.Descriptor instead. func (FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{258, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{358, 0, 0} } type FlowRSVPLspTunnelFlag_Choice_Enum int32 @@ -5531,11 +6827,11 @@ func (x FlowRSVPLspTunnelFlag_Choice_Enum) String() string { } func (FlowRSVPLspTunnelFlag_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[103].Descriptor() + return file_otg_proto_enumTypes[127].Descriptor() } func (FlowRSVPLspTunnelFlag_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[103] + return &file_otg_proto_enumTypes[127] } func (x FlowRSVPLspTunnelFlag_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5544,7 +6840,7 @@ func (x FlowRSVPLspTunnelFlag_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowRSVPLspTunnelFlag_Choice_Enum.Descriptor instead. func (FlowRSVPLspTunnelFlag_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{261, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{361, 0, 0} } type FlowRSVPSessionAttributeNameLength_Choice_Enum int32 @@ -5580,11 +6876,11 @@ func (x FlowRSVPSessionAttributeNameLength_Choice_Enum) String() string { } func (FlowRSVPSessionAttributeNameLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[104].Descriptor() + return file_otg_proto_enumTypes[128].Descriptor() } func (FlowRSVPSessionAttributeNameLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[104] + return &file_otg_proto_enumTypes[128] } func (x FlowRSVPSessionAttributeNameLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5593,7 +6889,7 @@ func (x FlowRSVPSessionAttributeNameLength_Choice_Enum) Number() protoreflect.En // Deprecated: Use FlowRSVPSessionAttributeNameLength_Choice_Enum.Descriptor instead. func (FlowRSVPSessionAttributeNameLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{262, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{362, 0, 0} } type FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum int32 @@ -5626,11 +6922,11 @@ func (x FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum) String() string { } func (FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[105].Descriptor() + return file_otg_proto_enumTypes[129].Descriptor() } func (FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[105] + return &file_otg_proto_enumTypes[129] } func (x FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5639,7 +6935,7 @@ func (x FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum) Number() protoreflec // Deprecated: Use FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum.Descriptor instead. func (FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{264, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{364, 0, 0} } type FlowRSVPPathObjectsSenderTspecCType_Choice_Enum int32 @@ -5672,11 +6968,11 @@ func (x FlowRSVPPathObjectsSenderTspecCType_Choice_Enum) String() string { } func (FlowRSVPPathObjectsSenderTspecCType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[106].Descriptor() + return file_otg_proto_enumTypes[130].Descriptor() } func (FlowRSVPPathObjectsSenderTspecCType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[106] + return &file_otg_proto_enumTypes[130] } func (x FlowRSVPPathObjectsSenderTspecCType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5685,7 +6981,7 @@ func (x FlowRSVPPathObjectsSenderTspecCType_Choice_Enum) Number() protoreflect.E // Deprecated: Use FlowRSVPPathObjectsSenderTspecCType_Choice_Enum.Descriptor instead. func (FlowRSVPPathObjectsSenderTspecCType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{267, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{367, 0, 0} } type FlowRSVPPathObjectsRecordRouteCType_Choice_Enum int32 @@ -5718,11 +7014,11 @@ func (x FlowRSVPPathObjectsRecordRouteCType_Choice_Enum) String() string { } func (FlowRSVPPathObjectsRecordRouteCType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[107].Descriptor() + return file_otg_proto_enumTypes[131].Descriptor() } func (FlowRSVPPathObjectsRecordRouteCType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[107] + return &file_otg_proto_enumTypes[131] } func (x FlowRSVPPathObjectsRecordRouteCType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5731,7 +7027,7 @@ func (x FlowRSVPPathObjectsRecordRouteCType_Choice_Enum) Number() protoreflect.E // Deprecated: Use FlowRSVPPathObjectsRecordRouteCType_Choice_Enum.Descriptor instead. func (FlowRSVPPathObjectsRecordRouteCType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{270, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{370, 0, 0} } type FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum int32 @@ -5767,11 +7063,11 @@ func (x FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum) String() string } func (FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[108].Descriptor() + return file_otg_proto_enumTypes[132].Descriptor() } func (FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[108] + return &file_otg_proto_enumTypes[132] } func (x FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5780,7 +7076,7 @@ func (x FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum) Number() protor // Deprecated: Use FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum.Descriptor instead. func (FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{273, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{373, 0, 0} } type FlowRSVPRecordRouteIPv4Flag_Choice_Enum int32 @@ -5816,11 +7112,11 @@ func (x FlowRSVPRecordRouteIPv4Flag_Choice_Enum) String() string { } func (FlowRSVPRecordRouteIPv4Flag_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[109].Descriptor() + return file_otg_proto_enumTypes[133].Descriptor() } func (FlowRSVPRecordRouteIPv4Flag_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[109] + return &file_otg_proto_enumTypes[133] } func (x FlowRSVPRecordRouteIPv4Flag_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5829,7 +7125,7 @@ func (x FlowRSVPRecordRouteIPv4Flag_Choice_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use FlowRSVPRecordRouteIPv4Flag_Choice_Enum.Descriptor instead. func (FlowRSVPRecordRouteIPv4Flag_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{275, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{375, 0, 0} } type FlowRSVPPathRecordRouteLabel_Choice_Enum int32 @@ -5865,11 +7161,11 @@ func (x FlowRSVPPathRecordRouteLabel_Choice_Enum) String() string { } func (FlowRSVPPathRecordRouteLabel_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[110].Descriptor() + return file_otg_proto_enumTypes[134].Descriptor() } func (FlowRSVPPathRecordRouteLabel_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[110] + return &file_otg_proto_enumTypes[134] } func (x FlowRSVPPathRecordRouteLabel_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5878,7 +7174,7 @@ func (x FlowRSVPPathRecordRouteLabel_Choice_Enum) Number() protoreflect.EnumNumb // Deprecated: Use FlowRSVPPathRecordRouteLabel_Choice_Enum.Descriptor instead. func (FlowRSVPPathRecordRouteLabel_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{277, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{377, 0, 0} } type FlowRSVPRouteRecordLength_Choice_Enum int32 @@ -5914,11 +7210,11 @@ func (x FlowRSVPRouteRecordLength_Choice_Enum) String() string { } func (FlowRSVPRouteRecordLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[111].Descriptor() + return file_otg_proto_enumTypes[135].Descriptor() } func (FlowRSVPRouteRecordLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[111] + return &file_otg_proto_enumTypes[135] } func (x FlowRSVPRouteRecordLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5927,7 +7223,7 @@ func (x FlowRSVPRouteRecordLength_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use FlowRSVPRouteRecordLength_Choice_Enum.Descriptor instead. func (FlowRSVPRouteRecordLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{278, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{378, 0, 0} } type FlowSize_Choice_Enum int32 @@ -5969,11 +7265,11 @@ func (x FlowSize_Choice_Enum) String() string { } func (FlowSize_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[112].Descriptor() + return file_otg_proto_enumTypes[136].Descriptor() } func (FlowSize_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[112] + return &file_otg_proto_enumTypes[136] } func (x FlowSize_Choice_Enum) Number() protoreflect.EnumNumber { @@ -5982,7 +7278,7 @@ func (x FlowSize_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowSize_Choice_Enum.Descriptor instead. func (FlowSize_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{280, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{380, 0, 0} } type FlowSizeWeightPairs_Choice_Enum int32 @@ -6018,11 +7314,11 @@ func (x FlowSizeWeightPairs_Choice_Enum) String() string { } func (FlowSizeWeightPairs_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[113].Descriptor() + return file_otg_proto_enumTypes[137].Descriptor() } func (FlowSizeWeightPairs_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[113] + return &file_otg_proto_enumTypes[137] } func (x FlowSizeWeightPairs_Choice_Enum) Number() protoreflect.EnumNumber { @@ -6031,7 +7327,7 @@ func (x FlowSizeWeightPairs_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowSizeWeightPairs_Choice_Enum.Descriptor instead. func (FlowSizeWeightPairs_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{283, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{383, 0, 0} } type FlowSizeWeightPairs_Predefined_Enum int32 @@ -6076,11 +7372,11 @@ func (x FlowSizeWeightPairs_Predefined_Enum) String() string { } func (FlowSizeWeightPairs_Predefined_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[114].Descriptor() + return file_otg_proto_enumTypes[138].Descriptor() } func (FlowSizeWeightPairs_Predefined_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[114] + return &file_otg_proto_enumTypes[138] } func (x FlowSizeWeightPairs_Predefined_Enum) Number() protoreflect.EnumNumber { @@ -6089,7 +7385,7 @@ func (x FlowSizeWeightPairs_Predefined_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowSizeWeightPairs_Predefined_Enum.Descriptor instead. func (FlowSizeWeightPairs_Predefined_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{283, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{383, 1, 0} } type FlowRate_Choice_Enum int32 @@ -6137,11 +7433,11 @@ func (x FlowRate_Choice_Enum) String() string { } func (FlowRate_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[115].Descriptor() + return file_otg_proto_enumTypes[139].Descriptor() } func (FlowRate_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[115] + return &file_otg_proto_enumTypes[139] } func (x FlowRate_Choice_Enum) Number() protoreflect.EnumNumber { @@ -6150,7 +7446,7 @@ func (x FlowRate_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowRate_Choice_Enum.Descriptor instead. func (FlowRate_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{285, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{385, 0, 0} } type FlowDuration_Choice_Enum int32 @@ -6192,11 +7488,11 @@ func (x FlowDuration_Choice_Enum) String() string { } func (FlowDuration_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[116].Descriptor() + return file_otg_proto_enumTypes[140].Descriptor() } func (FlowDuration_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[116] + return &file_otg_proto_enumTypes[140] } func (x FlowDuration_Choice_Enum) Number() protoreflect.EnumNumber { @@ -6205,7 +7501,7 @@ func (x FlowDuration_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowDuration_Choice_Enum.Descriptor instead. func (FlowDuration_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{286, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{386, 0, 0} } type FlowDelay_Choice_Enum int32 @@ -6244,11 +7540,11 @@ func (x FlowDelay_Choice_Enum) String() string { } func (FlowDelay_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[117].Descriptor() + return file_otg_proto_enumTypes[141].Descriptor() } func (FlowDelay_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[117] + return &file_otg_proto_enumTypes[141] } func (x FlowDelay_Choice_Enum) Number() protoreflect.EnumNumber { @@ -6257,7 +7553,7 @@ func (x FlowDelay_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowDelay_Choice_Enum.Descriptor instead. func (FlowDelay_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{288, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{388, 0, 0} } type FlowDurationInterBurstGap_Choice_Enum int32 @@ -6296,11 +7592,11 @@ func (x FlowDurationInterBurstGap_Choice_Enum) String() string { } func (FlowDurationInterBurstGap_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[118].Descriptor() + return file_otg_proto_enumTypes[142].Descriptor() } func (FlowDurationInterBurstGap_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[118] + return &file_otg_proto_enumTypes[142] } func (x FlowDurationInterBurstGap_Choice_Enum) Number() protoreflect.EnumNumber { @@ -6309,7 +7605,7 @@ func (x FlowDurationInterBurstGap_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use FlowDurationInterBurstGap_Choice_Enum.Descriptor instead. func (FlowDurationInterBurstGap_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{292, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{392, 0, 0} } type FlowLatencyMetrics_Mode_Enum int32 @@ -6345,11 +7641,11 @@ func (x FlowLatencyMetrics_Mode_Enum) String() string { } func (FlowLatencyMetrics_Mode_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[119].Descriptor() + return file_otg_proto_enumTypes[143].Descriptor() } func (FlowLatencyMetrics_Mode_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[119] + return &file_otg_proto_enumTypes[143] } func (x FlowLatencyMetrics_Mode_Enum) Number() protoreflect.EnumNumber { @@ -6358,7 +7654,7 @@ func (x FlowLatencyMetrics_Mode_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowLatencyMetrics_Mode_Enum.Descriptor instead. func (FlowLatencyMetrics_Mode_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{294, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{394, 0, 0} } type FlowRxTxRatio_Choice_Enum int32 @@ -6394,11 +7690,11 @@ func (x FlowRxTxRatio_Choice_Enum) String() string { } func (FlowRxTxRatio_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[120].Descriptor() + return file_otg_proto_enumTypes[144].Descriptor() } func (FlowRxTxRatio_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[120] + return &file_otg_proto_enumTypes[144] } func (x FlowRxTxRatio_Choice_Enum) Number() protoreflect.EnumNumber { @@ -6407,7 +7703,7 @@ func (x FlowRxTxRatio_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowRxTxRatio_Choice_Enum.Descriptor instead. func (FlowRxTxRatio_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{296, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{396, 0, 0} } type EventRequest_Type_Enum int32 @@ -6455,11 +7751,11 @@ func (x EventRequest_Type_Enum) String() string { } func (EventRequest_Type_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[121].Descriptor() + return file_otg_proto_enumTypes[145].Descriptor() } func (EventRequest_Type_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[121] + return &file_otg_proto_enumTypes[145] } func (x EventRequest_Type_Enum) Number() protoreflect.EnumNumber { @@ -6468,7 +7764,7 @@ func (x EventRequest_Type_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use EventRequest_Type_Enum.Descriptor instead. func (EventRequest_Type_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{302, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{402, 0, 0} } type LldpConnection_Choice_Enum int32 @@ -6501,11 +7797,11 @@ func (x LldpConnection_Choice_Enum) String() string { } func (LldpConnection_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[122].Descriptor() + return file_otg_proto_enumTypes[146].Descriptor() } func (LldpConnection_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[122] + return &file_otg_proto_enumTypes[146] } func (x LldpConnection_Choice_Enum) Number() protoreflect.EnumNumber { @@ -6514,7 +7810,7 @@ func (x LldpConnection_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use LldpConnection_Choice_Enum.Descriptor instead. func (LldpConnection_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{305, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{405, 0, 0} } type LldpChassisId_Choice_Enum int32 @@ -6553,11 +7849,11 @@ func (x LldpChassisId_Choice_Enum) String() string { } func (LldpChassisId_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[123].Descriptor() + return file_otg_proto_enumTypes[147].Descriptor() } func (LldpChassisId_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[123] + return &file_otg_proto_enumTypes[147] } func (x LldpChassisId_Choice_Enum) Number() protoreflect.EnumNumber { @@ -6566,7 +7862,7 @@ func (x LldpChassisId_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use LldpChassisId_Choice_Enum.Descriptor instead. func (LldpChassisId_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{306, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{406, 0, 0} } type LldpPortId_Choice_Enum int32 @@ -6605,11 +7901,11 @@ func (x LldpPortId_Choice_Enum) String() string { } func (LldpPortId_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[124].Descriptor() + return file_otg_proto_enumTypes[148].Descriptor() } func (LldpPortId_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[124] + return &file_otg_proto_enumTypes[148] } func (x LldpPortId_Choice_Enum) Number() protoreflect.EnumNumber { @@ -6618,7 +7914,7 @@ func (x LldpPortId_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use LldpPortId_Choice_Enum.Descriptor instead. func (LldpPortId_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{307, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{407, 0, 0} } type LldpChassisMacSubType_Choice_Enum int32 @@ -6654,11 +7950,11 @@ func (x LldpChassisMacSubType_Choice_Enum) String() string { } func (LldpChassisMacSubType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[125].Descriptor() + return file_otg_proto_enumTypes[149].Descriptor() } func (LldpChassisMacSubType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[125] + return &file_otg_proto_enumTypes[149] } func (x LldpChassisMacSubType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -6667,7 +7963,7 @@ func (x LldpChassisMacSubType_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use LldpChassisMacSubType_Choice_Enum.Descriptor instead. func (LldpChassisMacSubType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{308, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{408, 0, 0} } type LldpPortInterfaceNameSubType_Choice_Enum int32 @@ -6703,11 +7999,11 @@ func (x LldpPortInterfaceNameSubType_Choice_Enum) String() string { } func (LldpPortInterfaceNameSubType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[126].Descriptor() + return file_otg_proto_enumTypes[150].Descriptor() } func (LldpPortInterfaceNameSubType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[126] + return &file_otg_proto_enumTypes[150] } func (x LldpPortInterfaceNameSubType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -6716,7 +8012,7 @@ func (x LldpPortInterfaceNameSubType_Choice_Enum) Number() protoreflect.EnumNumb // Deprecated: Use LldpPortInterfaceNameSubType_Choice_Enum.Descriptor instead. func (LldpPortInterfaceNameSubType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{309, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{409, 0, 0} } type LldpSystemName_Choice_Enum int32 @@ -6752,11 +8048,11 @@ func (x LldpSystemName_Choice_Enum) String() string { } func (LldpSystemName_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[127].Descriptor() + return file_otg_proto_enumTypes[151].Descriptor() } func (LldpSystemName_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[127] + return &file_otg_proto_enumTypes[151] } func (x LldpSystemName_Choice_Enum) Number() protoreflect.EnumNumber { @@ -6765,7 +8061,53 @@ func (x LldpSystemName_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use LldpSystemName_Choice_Enum.Descriptor instead. func (LldpSystemName_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{310, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{410, 0, 0} +} + +type LldpOrgInfoType_Choice_Enum int32 + +const ( + LldpOrgInfoType_Choice_unspecified LldpOrgInfoType_Choice_Enum = 0 + LldpOrgInfoType_Choice_info LldpOrgInfoType_Choice_Enum = 1 +) + +// Enum value maps for LldpOrgInfoType_Choice_Enum. +var ( + LldpOrgInfoType_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "info", + } + LldpOrgInfoType_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "info": 1, + } +) + +func (x LldpOrgInfoType_Choice_Enum) Enum() *LldpOrgInfoType_Choice_Enum { + p := new(LldpOrgInfoType_Choice_Enum) + *p = x + return p +} + +func (x LldpOrgInfoType_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LldpOrgInfoType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[152].Descriptor() +} + +func (LldpOrgInfoType_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[152] +} + +func (x LldpOrgInfoType_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LldpOrgInfoType_Choice_Enum.Descriptor instead. +func (LldpOrgInfoType_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{412, 0, 0} } type Error_Kind_Enum int32 @@ -6801,11 +8143,11 @@ func (x Error_Kind_Enum) String() string { } func (Error_Kind_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[128].Descriptor() + return file_otg_proto_enumTypes[153].Descriptor() } func (Error_Kind_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[128] + return &file_otg_proto_enumTypes[153] } func (x Error_Kind_Enum) Number() protoreflect.EnumNumber { @@ -6814,7 +8156,7 @@ func (x Error_Kind_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use Error_Kind_Enum.Descriptor instead. func (Error_Kind_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{311, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{413, 0, 0} } type ConfigUpdate_Choice_Enum int32 @@ -6847,11 +8189,11 @@ func (x ConfigUpdate_Choice_Enum) String() string { } func (ConfigUpdate_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[129].Descriptor() + return file_otg_proto_enumTypes[154].Descriptor() } func (ConfigUpdate_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[129] + return &file_otg_proto_enumTypes[154] } func (x ConfigUpdate_Choice_Enum) Number() protoreflect.EnumNumber { @@ -6860,7 +8202,7 @@ func (x ConfigUpdate_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use ConfigUpdate_Choice_Enum.Descriptor instead. func (ConfigUpdate_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{313, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{415, 0, 0} } type FlowsUpdate_PropertyNames_Enum int32 @@ -6896,11 +8238,11 @@ func (x FlowsUpdate_PropertyNames_Enum) String() string { } func (FlowsUpdate_PropertyNames_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[130].Descriptor() + return file_otg_proto_enumTypes[155].Descriptor() } func (FlowsUpdate_PropertyNames_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[130] + return &file_otg_proto_enumTypes[155] } func (x FlowsUpdate_PropertyNames_Enum) Number() protoreflect.EnumNumber { @@ -6909,7 +8251,7 @@ func (x FlowsUpdate_PropertyNames_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowsUpdate_PropertyNames_Enum.Descriptor instead. func (FlowsUpdate_PropertyNames_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{314, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{416, 0, 0} } type ControlState_Choice_Enum int32 @@ -6948,11 +8290,11 @@ func (x ControlState_Choice_Enum) String() string { } func (ControlState_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[131].Descriptor() + return file_otg_proto_enumTypes[156].Descriptor() } func (ControlState_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[131] + return &file_otg_proto_enumTypes[156] } func (x ControlState_Choice_Enum) Number() protoreflect.EnumNumber { @@ -6961,7 +8303,7 @@ func (x ControlState_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use ControlState_Choice_Enum.Descriptor instead. func (ControlState_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{315, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{417, 0, 0} } type StatePort_Choice_Enum int32 @@ -6997,11 +8339,11 @@ func (x StatePort_Choice_Enum) String() string { } func (StatePort_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[132].Descriptor() + return file_otg_proto_enumTypes[157].Descriptor() } func (StatePort_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[132] + return &file_otg_proto_enumTypes[157] } func (x StatePort_Choice_Enum) Number() protoreflect.EnumNumber { @@ -7010,7 +8352,7 @@ func (x StatePort_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StatePort_Choice_Enum.Descriptor instead. func (StatePort_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{316, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{418, 0, 0} } type StateTraffic_Choice_Enum int32 @@ -7043,11 +8385,11 @@ func (x StateTraffic_Choice_Enum) String() string { } func (StateTraffic_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[133].Descriptor() + return file_otg_proto_enumTypes[158].Descriptor() } func (StateTraffic_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[133] + return &file_otg_proto_enumTypes[158] } func (x StateTraffic_Choice_Enum) Number() protoreflect.EnumNumber { @@ -7056,7 +8398,7 @@ func (x StateTraffic_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StateTraffic_Choice_Enum.Descriptor instead. func (StateTraffic_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{317, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{419, 0, 0} } type StateProtocol_Choice_Enum int32 @@ -7068,6 +8410,7 @@ const ( StateProtocol_Choice_lacp StateProtocol_Choice_Enum = 3 StateProtocol_Choice_bgp StateProtocol_Choice_Enum = 4 StateProtocol_Choice_isis StateProtocol_Choice_Enum = 5 + StateProtocol_Choice_ospfv2 StateProtocol_Choice_Enum = 6 ) // Enum value maps for StateProtocol_Choice_Enum. @@ -7079,6 +8422,7 @@ var ( 3: "lacp", 4: "bgp", 5: "isis", + 6: "ospfv2", } StateProtocol_Choice_Enum_value = map[string]int32{ "unspecified": 0, @@ -7087,6 +8431,7 @@ var ( "lacp": 3, "bgp": 4, "isis": 5, + "ospfv2": 6, } ) @@ -7101,11 +8446,11 @@ func (x StateProtocol_Choice_Enum) String() string { } func (StateProtocol_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[134].Descriptor() + return file_otg_proto_enumTypes[159].Descriptor() } func (StateProtocol_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[134] + return &file_otg_proto_enumTypes[159] } func (x StateProtocol_Choice_Enum) Number() protoreflect.EnumNumber { @@ -7114,7 +8459,7 @@ func (x StateProtocol_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StateProtocol_Choice_Enum.Descriptor instead. func (StateProtocol_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{318, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{420, 0, 0} } type StatePortLink_State_Enum int32 @@ -7150,11 +8495,11 @@ func (x StatePortLink_State_Enum) String() string { } func (StatePortLink_State_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[135].Descriptor() + return file_otg_proto_enumTypes[160].Descriptor() } func (StatePortLink_State_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[135] + return &file_otg_proto_enumTypes[160] } func (x StatePortLink_State_Enum) Number() protoreflect.EnumNumber { @@ -7163,7 +8508,7 @@ func (x StatePortLink_State_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StatePortLink_State_Enum.Descriptor instead. func (StatePortLink_State_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{319, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{421, 0, 0} } type StatePortCapture_State_Enum int32 @@ -7199,11 +8544,11 @@ func (x StatePortCapture_State_Enum) String() string { } func (StatePortCapture_State_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[136].Descriptor() + return file_otg_proto_enumTypes[161].Descriptor() } func (StatePortCapture_State_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[136] + return &file_otg_proto_enumTypes[161] } func (x StatePortCapture_State_Enum) Number() protoreflect.EnumNumber { @@ -7212,7 +8557,7 @@ func (x StatePortCapture_State_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StatePortCapture_State_Enum.Descriptor instead. func (StatePortCapture_State_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{320, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{422, 0, 0} } type StateTrafficFlowTransmit_State_Enum int32 @@ -7254,11 +8599,11 @@ func (x StateTrafficFlowTransmit_State_Enum) String() string { } func (StateTrafficFlowTransmit_State_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[137].Descriptor() + return file_otg_proto_enumTypes[162].Descriptor() } func (StateTrafficFlowTransmit_State_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[137] + return &file_otg_proto_enumTypes[162] } func (x StateTrafficFlowTransmit_State_Enum) Number() protoreflect.EnumNumber { @@ -7267,7 +8612,7 @@ func (x StateTrafficFlowTransmit_State_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StateTrafficFlowTransmit_State_Enum.Descriptor instead. func (StateTrafficFlowTransmit_State_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{321, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{423, 0, 0} } type StateProtocolAll_State_Enum int32 @@ -7303,11 +8648,11 @@ func (x StateProtocolAll_State_Enum) String() string { } func (StateProtocolAll_State_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[138].Descriptor() + return file_otg_proto_enumTypes[163].Descriptor() } func (StateProtocolAll_State_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[138] + return &file_otg_proto_enumTypes[163] } func (x StateProtocolAll_State_Enum) Number() protoreflect.EnumNumber { @@ -7316,7 +8661,7 @@ func (x StateProtocolAll_State_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StateProtocolAll_State_Enum.Descriptor instead. func (StateProtocolAll_State_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{322, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{424, 0, 0} } type StateProtocolRoute_State_Enum int32 @@ -7352,11 +8697,11 @@ func (x StateProtocolRoute_State_Enum) String() string { } func (StateProtocolRoute_State_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[139].Descriptor() + return file_otg_proto_enumTypes[164].Descriptor() } func (StateProtocolRoute_State_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[139] + return &file_otg_proto_enumTypes[164] } func (x StateProtocolRoute_State_Enum) Number() protoreflect.EnumNumber { @@ -7365,7 +8710,7 @@ func (x StateProtocolRoute_State_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StateProtocolRoute_State_Enum.Descriptor instead. func (StateProtocolRoute_State_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{323, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{425, 0, 0} } type StateProtocolLacp_Choice_Enum int32 @@ -7401,11 +8746,11 @@ func (x StateProtocolLacp_Choice_Enum) String() string { } func (StateProtocolLacp_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[140].Descriptor() + return file_otg_proto_enumTypes[165].Descriptor() } func (StateProtocolLacp_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[140] + return &file_otg_proto_enumTypes[165] } func (x StateProtocolLacp_Choice_Enum) Number() protoreflect.EnumNumber { @@ -7414,7 +8759,7 @@ func (x StateProtocolLacp_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StateProtocolLacp_Choice_Enum.Descriptor instead. func (StateProtocolLacp_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{324, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{426, 0, 0} } type StateProtocolLacpAdmin_State_Enum int32 @@ -7450,11 +8795,11 @@ func (x StateProtocolLacpAdmin_State_Enum) String() string { } func (StateProtocolLacpAdmin_State_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[141].Descriptor() + return file_otg_proto_enumTypes[166].Descriptor() } func (StateProtocolLacpAdmin_State_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[141] + return &file_otg_proto_enumTypes[166] } func (x StateProtocolLacpAdmin_State_Enum) Number() protoreflect.EnumNumber { @@ -7463,7 +8808,7 @@ func (x StateProtocolLacpAdmin_State_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StateProtocolLacpAdmin_State_Enum.Descriptor instead. func (StateProtocolLacpAdmin_State_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{325, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{427, 0, 0} } type StateProtocolLacpMemberPorts_State_Enum int32 @@ -7499,11 +8844,11 @@ func (x StateProtocolLacpMemberPorts_State_Enum) String() string { } func (StateProtocolLacpMemberPorts_State_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[142].Descriptor() + return file_otg_proto_enumTypes[167].Descriptor() } func (StateProtocolLacpMemberPorts_State_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[142] + return &file_otg_proto_enumTypes[167] } func (x StateProtocolLacpMemberPorts_State_Enum) Number() protoreflect.EnumNumber { @@ -7512,7 +8857,7 @@ func (x StateProtocolLacpMemberPorts_State_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use StateProtocolLacpMemberPorts_State_Enum.Descriptor instead. func (StateProtocolLacpMemberPorts_State_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{326, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{428, 0, 0} } type StateProtocolBgp_Choice_Enum int32 @@ -7545,11 +8890,11 @@ func (x StateProtocolBgp_Choice_Enum) String() string { } func (StateProtocolBgp_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[143].Descriptor() + return file_otg_proto_enumTypes[168].Descriptor() } func (StateProtocolBgp_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[143] + return &file_otg_proto_enumTypes[168] } func (x StateProtocolBgp_Choice_Enum) Number() protoreflect.EnumNumber { @@ -7558,7 +8903,7 @@ func (x StateProtocolBgp_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StateProtocolBgp_Choice_Enum.Descriptor instead. func (StateProtocolBgp_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{327, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{429, 0, 0} } type StateProtocolBgpPeers_State_Enum int32 @@ -7594,11 +8939,11 @@ func (x StateProtocolBgpPeers_State_Enum) String() string { } func (StateProtocolBgpPeers_State_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[144].Descriptor() + return file_otg_proto_enumTypes[169].Descriptor() } func (StateProtocolBgpPeers_State_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[144] + return &file_otg_proto_enumTypes[169] } func (x StateProtocolBgpPeers_State_Enum) Number() protoreflect.EnumNumber { @@ -7607,7 +8952,7 @@ func (x StateProtocolBgpPeers_State_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StateProtocolBgpPeers_State_Enum.Descriptor instead. func (StateProtocolBgpPeers_State_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{328, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{430, 0, 0} } type StateProtocolIsis_Choice_Enum int32 @@ -7640,11 +8985,11 @@ func (x StateProtocolIsis_Choice_Enum) String() string { } func (StateProtocolIsis_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[145].Descriptor() + return file_otg_proto_enumTypes[170].Descriptor() } func (StateProtocolIsis_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[145] + return &file_otg_proto_enumTypes[170] } func (x StateProtocolIsis_Choice_Enum) Number() protoreflect.EnumNumber { @@ -7653,7 +8998,7 @@ func (x StateProtocolIsis_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StateProtocolIsis_Choice_Enum.Descriptor instead. func (StateProtocolIsis_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{329, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{431, 0, 0} } type StateProtocolIsisRouters_State_Enum int32 @@ -7689,11 +9034,11 @@ func (x StateProtocolIsisRouters_State_Enum) String() string { } func (StateProtocolIsisRouters_State_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[146].Descriptor() + return file_otg_proto_enumTypes[171].Descriptor() } func (StateProtocolIsisRouters_State_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[146] + return &file_otg_proto_enumTypes[171] } func (x StateProtocolIsisRouters_State_Enum) Number() protoreflect.EnumNumber { @@ -7702,7 +9047,102 @@ func (x StateProtocolIsisRouters_State_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StateProtocolIsisRouters_State_Enum.Descriptor instead. func (StateProtocolIsisRouters_State_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{330, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{432, 0, 0} +} + +type StateProtocolOspfv2_Choice_Enum int32 + +const ( + StateProtocolOspfv2_Choice_unspecified StateProtocolOspfv2_Choice_Enum = 0 + StateProtocolOspfv2_Choice_routers StateProtocolOspfv2_Choice_Enum = 1 +) + +// Enum value maps for StateProtocolOspfv2_Choice_Enum. +var ( + StateProtocolOspfv2_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "routers", + } + StateProtocolOspfv2_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "routers": 1, + } +) + +func (x StateProtocolOspfv2_Choice_Enum) Enum() *StateProtocolOspfv2_Choice_Enum { + p := new(StateProtocolOspfv2_Choice_Enum) + *p = x + return p +} + +func (x StateProtocolOspfv2_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StateProtocolOspfv2_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[172].Descriptor() +} + +func (StateProtocolOspfv2_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[172] +} + +func (x StateProtocolOspfv2_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StateProtocolOspfv2_Choice_Enum.Descriptor instead. +func (StateProtocolOspfv2_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{433, 0, 0} +} + +type StateProtocolOspfv2Routers_State_Enum int32 + +const ( + StateProtocolOspfv2Routers_State_unspecified StateProtocolOspfv2Routers_State_Enum = 0 + StateProtocolOspfv2Routers_State_up StateProtocolOspfv2Routers_State_Enum = 1 + StateProtocolOspfv2Routers_State_down StateProtocolOspfv2Routers_State_Enum = 2 +) + +// Enum value maps for StateProtocolOspfv2Routers_State_Enum. +var ( + StateProtocolOspfv2Routers_State_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "up", + 2: "down", + } + StateProtocolOspfv2Routers_State_Enum_value = map[string]int32{ + "unspecified": 0, + "up": 1, + "down": 2, + } +) + +func (x StateProtocolOspfv2Routers_State_Enum) Enum() *StateProtocolOspfv2Routers_State_Enum { + p := new(StateProtocolOspfv2Routers_State_Enum) + *p = x + return p +} + +func (x StateProtocolOspfv2Routers_State_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StateProtocolOspfv2Routers_State_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[173].Descriptor() +} + +func (StateProtocolOspfv2Routers_State_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[173] +} + +func (x StateProtocolOspfv2Routers_State_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StateProtocolOspfv2Routers_State_Enum.Descriptor instead. +func (StateProtocolOspfv2Routers_State_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{434, 0, 0} } type ControlAction_Choice_Enum int32 @@ -7735,11 +9175,11 @@ func (x ControlAction_Choice_Enum) String() string { } func (ControlAction_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[147].Descriptor() + return file_otg_proto_enumTypes[174].Descriptor() } func (ControlAction_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[147] + return &file_otg_proto_enumTypes[174] } func (x ControlAction_Choice_Enum) Number() protoreflect.EnumNumber { @@ -7748,7 +9188,7 @@ func (x ControlAction_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use ControlAction_Choice_Enum.Descriptor instead. func (ControlAction_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{331, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{435, 0, 0} } type ActionResponse_Choice_Enum int32 @@ -7781,11 +9221,11 @@ func (x ActionResponse_Choice_Enum) String() string { } func (ActionResponse_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[148].Descriptor() + return file_otg_proto_enumTypes[175].Descriptor() } func (ActionResponse_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[148] + return &file_otg_proto_enumTypes[175] } func (x ActionResponse_Choice_Enum) Number() protoreflect.EnumNumber { @@ -7794,7 +9234,7 @@ func (x ActionResponse_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use ActionResponse_Choice_Enum.Descriptor instead. func (ActionResponse_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{333, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{437, 0, 0} } type ActionProtocol_Choice_Enum int32 @@ -7833,11 +9273,11 @@ func (x ActionProtocol_Choice_Enum) String() string { } func (ActionProtocol_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[149].Descriptor() + return file_otg_proto_enumTypes[176].Descriptor() } func (ActionProtocol_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[149] + return &file_otg_proto_enumTypes[176] } func (x ActionProtocol_Choice_Enum) Number() protoreflect.EnumNumber { @@ -7846,7 +9286,7 @@ func (x ActionProtocol_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use ActionProtocol_Choice_Enum.Descriptor instead. func (ActionProtocol_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{334, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{438, 0, 0} } type ActionResponseProtocol_Choice_Enum int32 @@ -7882,11 +9322,11 @@ func (x ActionResponseProtocol_Choice_Enum) String() string { } func (ActionResponseProtocol_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[150].Descriptor() + return file_otg_proto_enumTypes[177].Descriptor() } func (ActionResponseProtocol_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[150] + return &file_otg_proto_enumTypes[177] } func (x ActionResponseProtocol_Choice_Enum) Number() protoreflect.EnumNumber { @@ -7895,7 +9335,7 @@ func (x ActionResponseProtocol_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use ActionResponseProtocol_Choice_Enum.Descriptor instead. func (ActionResponseProtocol_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{335, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{439, 0, 0} } type ActionProtocolIpv4_Choice_Enum int32 @@ -7928,11 +9368,11 @@ func (x ActionProtocolIpv4_Choice_Enum) String() string { } func (ActionProtocolIpv4_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[151].Descriptor() + return file_otg_proto_enumTypes[178].Descriptor() } func (ActionProtocolIpv4_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[151] + return &file_otg_proto_enumTypes[178] } func (x ActionProtocolIpv4_Choice_Enum) Number() protoreflect.EnumNumber { @@ -7941,7 +9381,7 @@ func (x ActionProtocolIpv4_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use ActionProtocolIpv4_Choice_Enum.Descriptor instead. func (ActionProtocolIpv4_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{336, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{440, 0, 0} } type ActionResponseProtocolIpv4_Choice_Enum int32 @@ -7974,11 +9414,11 @@ func (x ActionResponseProtocolIpv4_Choice_Enum) String() string { } func (ActionResponseProtocolIpv4_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[152].Descriptor() + return file_otg_proto_enumTypes[179].Descriptor() } func (ActionResponseProtocolIpv4_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[152] + return &file_otg_proto_enumTypes[179] } func (x ActionResponseProtocolIpv4_Choice_Enum) Number() protoreflect.EnumNumber { @@ -7987,7 +9427,7 @@ func (x ActionResponseProtocolIpv4_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use ActionResponseProtocolIpv4_Choice_Enum.Descriptor instead. func (ActionResponseProtocolIpv4_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{337, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{441, 0, 0} } type ActionResponseProtocolIpv4PingResponse_Result_Enum int32 @@ -8023,11 +9463,11 @@ func (x ActionResponseProtocolIpv4PingResponse_Result_Enum) String() string { } func (ActionResponseProtocolIpv4PingResponse_Result_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[153].Descriptor() + return file_otg_proto_enumTypes[180].Descriptor() } func (ActionResponseProtocolIpv4PingResponse_Result_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[153] + return &file_otg_proto_enumTypes[180] } func (x ActionResponseProtocolIpv4PingResponse_Result_Enum) Number() protoreflect.EnumNumber { @@ -8036,7 +9476,7 @@ func (x ActionResponseProtocolIpv4PingResponse_Result_Enum) Number() protoreflec // Deprecated: Use ActionResponseProtocolIpv4PingResponse_Result_Enum.Descriptor instead. func (ActionResponseProtocolIpv4PingResponse_Result_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{341, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{445, 0, 0} } type ActionProtocolIpv6_Choice_Enum int32 @@ -8069,11 +9509,11 @@ func (x ActionProtocolIpv6_Choice_Enum) String() string { } func (ActionProtocolIpv6_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[154].Descriptor() + return file_otg_proto_enumTypes[181].Descriptor() } func (ActionProtocolIpv6_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[154] + return &file_otg_proto_enumTypes[181] } func (x ActionProtocolIpv6_Choice_Enum) Number() protoreflect.EnumNumber { @@ -8082,7 +9522,7 @@ func (x ActionProtocolIpv6_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use ActionProtocolIpv6_Choice_Enum.Descriptor instead. func (ActionProtocolIpv6_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{342, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{446, 0, 0} } type ActionResponseProtocolIpv6_Choice_Enum int32 @@ -8115,11 +9555,11 @@ func (x ActionResponseProtocolIpv6_Choice_Enum) String() string { } func (ActionResponseProtocolIpv6_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[155].Descriptor() + return file_otg_proto_enumTypes[182].Descriptor() } func (ActionResponseProtocolIpv6_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[155] + return &file_otg_proto_enumTypes[182] } func (x ActionResponseProtocolIpv6_Choice_Enum) Number() protoreflect.EnumNumber { @@ -8128,7 +9568,7 @@ func (x ActionResponseProtocolIpv6_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use ActionResponseProtocolIpv6_Choice_Enum.Descriptor instead. func (ActionResponseProtocolIpv6_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{343, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{447, 0, 0} } type ActionResponseProtocolIpv6PingResponse_Result_Enum int32 @@ -8164,11 +9604,11 @@ func (x ActionResponseProtocolIpv6PingResponse_Result_Enum) String() string { } func (ActionResponseProtocolIpv6PingResponse_Result_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[156].Descriptor() + return file_otg_proto_enumTypes[183].Descriptor() } func (ActionResponseProtocolIpv6PingResponse_Result_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[156] + return &file_otg_proto_enumTypes[183] } func (x ActionResponseProtocolIpv6PingResponse_Result_Enum) Number() protoreflect.EnumNumber { @@ -8177,7 +9617,7 @@ func (x ActionResponseProtocolIpv6PingResponse_Result_Enum) Number() protoreflec // Deprecated: Use ActionResponseProtocolIpv6PingResponse_Result_Enum.Descriptor instead. func (ActionResponseProtocolIpv6PingResponse_Result_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{347, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{451, 0, 0} } type ActionProtocolBgp_Choice_Enum int32 @@ -8213,11 +9653,11 @@ func (x ActionProtocolBgp_Choice_Enum) String() string { } func (ActionProtocolBgp_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[157].Descriptor() + return file_otg_proto_enumTypes[184].Descriptor() } func (ActionProtocolBgp_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[157] + return &file_otg_proto_enumTypes[184] } func (x ActionProtocolBgp_Choice_Enum) Number() protoreflect.EnumNumber { @@ -8226,7 +9666,7 @@ func (x ActionProtocolBgp_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use ActionProtocolBgp_Choice_Enum.Descriptor instead. func (ActionProtocolBgp_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{348, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{452, 0, 0} } type ActionProtocolBgpNotification_Choice_Enum int32 @@ -8277,11 +9717,11 @@ func (x ActionProtocolBgpNotification_Choice_Enum) String() string { } func (ActionProtocolBgpNotification_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[158].Descriptor() + return file_otg_proto_enumTypes[185].Descriptor() } func (ActionProtocolBgpNotification_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[158] + return &file_otg_proto_enumTypes[185] } func (x ActionProtocolBgpNotification_Choice_Enum) Number() protoreflect.EnumNumber { @@ -8290,49 +9730,128 @@ func (x ActionProtocolBgpNotification_Choice_Enum) Number() protoreflect.EnumNum // Deprecated: Use ActionProtocolBgpNotification_Choice_Enum.Descriptor instead. func (ActionProtocolBgpNotification_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{349, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{453, 0, 0} +} + +type ActionProtocolBgpGracefulRestartNotification_Choice_Enum int32 + +const ( + ActionProtocolBgpGracefulRestartNotification_Choice_unspecified ActionProtocolBgpGracefulRestartNotification_Choice_Enum = 0 + ActionProtocolBgpGracefulRestartNotification_Choice_cease ActionProtocolBgpGracefulRestartNotification_Choice_Enum = 1 + ActionProtocolBgpGracefulRestartNotification_Choice_message_header_error ActionProtocolBgpGracefulRestartNotification_Choice_Enum = 2 + ActionProtocolBgpGracefulRestartNotification_Choice_open_message_error ActionProtocolBgpGracefulRestartNotification_Choice_Enum = 3 + ActionProtocolBgpGracefulRestartNotification_Choice_update_message_error ActionProtocolBgpGracefulRestartNotification_Choice_Enum = 4 + ActionProtocolBgpGracefulRestartNotification_Choice_hold_timer_expired ActionProtocolBgpGracefulRestartNotification_Choice_Enum = 5 + ActionProtocolBgpGracefulRestartNotification_Choice_finite_state_machine_error ActionProtocolBgpGracefulRestartNotification_Choice_Enum = 6 + ActionProtocolBgpGracefulRestartNotification_Choice_custom ActionProtocolBgpGracefulRestartNotification_Choice_Enum = 7 +) + +// Enum value maps for ActionProtocolBgpGracefulRestartNotification_Choice_Enum. +var ( + ActionProtocolBgpGracefulRestartNotification_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "cease", + 2: "message_header_error", + 3: "open_message_error", + 4: "update_message_error", + 5: "hold_timer_expired", + 6: "finite_state_machine_error", + 7: "custom", + } + ActionProtocolBgpGracefulRestartNotification_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "cease": 1, + "message_header_error": 2, + "open_message_error": 3, + "update_message_error": 4, + "hold_timer_expired": 5, + "finite_state_machine_error": 6, + "custom": 7, + } +) + +func (x ActionProtocolBgpGracefulRestartNotification_Choice_Enum) Enum() *ActionProtocolBgpGracefulRestartNotification_Choice_Enum { + p := new(ActionProtocolBgpGracefulRestartNotification_Choice_Enum) + *p = x + return p +} + +func (x ActionProtocolBgpGracefulRestartNotification_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ActionProtocolBgpGracefulRestartNotification_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[186].Descriptor() +} + +func (ActionProtocolBgpGracefulRestartNotification_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[186] +} + +func (x ActionProtocolBgpGracefulRestartNotification_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ActionProtocolBgpGracefulRestartNotification_Choice_Enum.Descriptor instead. +func (ActionProtocolBgpGracefulRestartNotification_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{455, 0, 0} } type MetricsRequest_Choice_Enum int32 const ( - MetricsRequest_Choice_unspecified MetricsRequest_Choice_Enum = 0 - MetricsRequest_Choice_port MetricsRequest_Choice_Enum = 1 - MetricsRequest_Choice_flow MetricsRequest_Choice_Enum = 2 - MetricsRequest_Choice_bgpv4 MetricsRequest_Choice_Enum = 3 - MetricsRequest_Choice_bgpv6 MetricsRequest_Choice_Enum = 4 - MetricsRequest_Choice_isis MetricsRequest_Choice_Enum = 5 - MetricsRequest_Choice_lag MetricsRequest_Choice_Enum = 6 - MetricsRequest_Choice_lacp MetricsRequest_Choice_Enum = 7 - MetricsRequest_Choice_lldp MetricsRequest_Choice_Enum = 8 - MetricsRequest_Choice_rsvp MetricsRequest_Choice_Enum = 9 + MetricsRequest_Choice_unspecified MetricsRequest_Choice_Enum = 0 + MetricsRequest_Choice_port MetricsRequest_Choice_Enum = 1 + MetricsRequest_Choice_flow MetricsRequest_Choice_Enum = 2 + MetricsRequest_Choice_bgpv4 MetricsRequest_Choice_Enum = 3 + MetricsRequest_Choice_bgpv6 MetricsRequest_Choice_Enum = 4 + MetricsRequest_Choice_isis MetricsRequest_Choice_Enum = 5 + MetricsRequest_Choice_lag MetricsRequest_Choice_Enum = 6 + MetricsRequest_Choice_lacp MetricsRequest_Choice_Enum = 7 + MetricsRequest_Choice_lldp MetricsRequest_Choice_Enum = 8 + MetricsRequest_Choice_rsvp MetricsRequest_Choice_Enum = 9 + MetricsRequest_Choice_dhcpv4_client MetricsRequest_Choice_Enum = 10 + MetricsRequest_Choice_dhcpv4_server MetricsRequest_Choice_Enum = 11 + MetricsRequest_Choice_dhcpv6_client MetricsRequest_Choice_Enum = 12 + MetricsRequest_Choice_dhcpv6_server MetricsRequest_Choice_Enum = 13 + MetricsRequest_Choice_ospfv2 MetricsRequest_Choice_Enum = 14 ) // Enum value maps for MetricsRequest_Choice_Enum. var ( MetricsRequest_Choice_Enum_name = map[int32]string{ - 0: "unspecified", - 1: "port", - 2: "flow", - 3: "bgpv4", - 4: "bgpv6", - 5: "isis", - 6: "lag", - 7: "lacp", - 8: "lldp", - 9: "rsvp", + 0: "unspecified", + 1: "port", + 2: "flow", + 3: "bgpv4", + 4: "bgpv6", + 5: "isis", + 6: "lag", + 7: "lacp", + 8: "lldp", + 9: "rsvp", + 10: "dhcpv4_client", + 11: "dhcpv4_server", + 12: "dhcpv6_client", + 13: "dhcpv6_server", + 14: "ospfv2", } MetricsRequest_Choice_Enum_value = map[string]int32{ - "unspecified": 0, - "port": 1, - "flow": 2, - "bgpv4": 3, - "bgpv6": 4, - "isis": 5, - "lag": 6, - "lacp": 7, - "lldp": 8, - "rsvp": 9, + "unspecified": 0, + "port": 1, + "flow": 2, + "bgpv4": 3, + "bgpv6": 4, + "isis": 5, + "lag": 6, + "lacp": 7, + "lldp": 8, + "rsvp": 9, + "dhcpv4_client": 10, + "dhcpv4_server": 11, + "dhcpv6_client": 12, + "dhcpv6_server": 13, + "ospfv2": 14, } ) @@ -8347,11 +9866,11 @@ func (x MetricsRequest_Choice_Enum) String() string { } func (MetricsRequest_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[159].Descriptor() + return file_otg_proto_enumTypes[187].Descriptor() } func (MetricsRequest_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[159] + return &file_otg_proto_enumTypes[187] } func (x MetricsRequest_Choice_Enum) Number() protoreflect.EnumNumber { @@ -8360,49 +9879,64 @@ func (x MetricsRequest_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use MetricsRequest_Choice_Enum.Descriptor instead. func (MetricsRequest_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{351, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{456, 0, 0} } type MetricsResponse_Choice_Enum int32 const ( - MetricsResponse_Choice_unspecified MetricsResponse_Choice_Enum = 0 - MetricsResponse_Choice_flow_metrics MetricsResponse_Choice_Enum = 1 - MetricsResponse_Choice_port_metrics MetricsResponse_Choice_Enum = 2 - MetricsResponse_Choice_bgpv4_metrics MetricsResponse_Choice_Enum = 3 - MetricsResponse_Choice_bgpv6_metrics MetricsResponse_Choice_Enum = 4 - MetricsResponse_Choice_isis_metrics MetricsResponse_Choice_Enum = 5 - MetricsResponse_Choice_lag_metrics MetricsResponse_Choice_Enum = 6 - MetricsResponse_Choice_lacp_metrics MetricsResponse_Choice_Enum = 7 - MetricsResponse_Choice_lldp_metrics MetricsResponse_Choice_Enum = 8 - MetricsResponse_Choice_rsvp_metrics MetricsResponse_Choice_Enum = 9 + MetricsResponse_Choice_unspecified MetricsResponse_Choice_Enum = 0 + MetricsResponse_Choice_flow_metrics MetricsResponse_Choice_Enum = 1 + MetricsResponse_Choice_port_metrics MetricsResponse_Choice_Enum = 2 + MetricsResponse_Choice_bgpv4_metrics MetricsResponse_Choice_Enum = 3 + MetricsResponse_Choice_bgpv6_metrics MetricsResponse_Choice_Enum = 4 + MetricsResponse_Choice_isis_metrics MetricsResponse_Choice_Enum = 5 + MetricsResponse_Choice_lag_metrics MetricsResponse_Choice_Enum = 6 + MetricsResponse_Choice_lacp_metrics MetricsResponse_Choice_Enum = 7 + MetricsResponse_Choice_lldp_metrics MetricsResponse_Choice_Enum = 8 + MetricsResponse_Choice_rsvp_metrics MetricsResponse_Choice_Enum = 9 + MetricsResponse_Choice_dhcpv4_client MetricsResponse_Choice_Enum = 10 + MetricsResponse_Choice_dhcpv4_server MetricsResponse_Choice_Enum = 11 + MetricsResponse_Choice_dhcpv6_client MetricsResponse_Choice_Enum = 12 + MetricsResponse_Choice_dhcpv6_server MetricsResponse_Choice_Enum = 13 + MetricsResponse_Choice_ospfv2_metrics MetricsResponse_Choice_Enum = 14 ) // Enum value maps for MetricsResponse_Choice_Enum. var ( MetricsResponse_Choice_Enum_name = map[int32]string{ - 0: "unspecified", - 1: "flow_metrics", - 2: "port_metrics", - 3: "bgpv4_metrics", - 4: "bgpv6_metrics", - 5: "isis_metrics", - 6: "lag_metrics", - 7: "lacp_metrics", - 8: "lldp_metrics", - 9: "rsvp_metrics", + 0: "unspecified", + 1: "flow_metrics", + 2: "port_metrics", + 3: "bgpv4_metrics", + 4: "bgpv6_metrics", + 5: "isis_metrics", + 6: "lag_metrics", + 7: "lacp_metrics", + 8: "lldp_metrics", + 9: "rsvp_metrics", + 10: "dhcpv4_client", + 11: "dhcpv4_server", + 12: "dhcpv6_client", + 13: "dhcpv6_server", + 14: "ospfv2_metrics", } MetricsResponse_Choice_Enum_value = map[string]int32{ - "unspecified": 0, - "flow_metrics": 1, - "port_metrics": 2, - "bgpv4_metrics": 3, - "bgpv6_metrics": 4, - "isis_metrics": 5, - "lag_metrics": 6, - "lacp_metrics": 7, - "lldp_metrics": 8, - "rsvp_metrics": 9, + "unspecified": 0, + "flow_metrics": 1, + "port_metrics": 2, + "bgpv4_metrics": 3, + "bgpv6_metrics": 4, + "isis_metrics": 5, + "lag_metrics": 6, + "lacp_metrics": 7, + "lldp_metrics": 8, + "rsvp_metrics": 9, + "dhcpv4_client": 10, + "dhcpv4_server": 11, + "dhcpv6_client": 12, + "dhcpv6_server": 13, + "ospfv2_metrics": 14, } ) @@ -8417,11 +9951,11 @@ func (x MetricsResponse_Choice_Enum) String() string { } func (MetricsResponse_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[160].Descriptor() + return file_otg_proto_enumTypes[188].Descriptor() } func (MetricsResponse_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[160] + return &file_otg_proto_enumTypes[188] } func (x MetricsResponse_Choice_Enum) Number() protoreflect.EnumNumber { @@ -8430,7 +9964,7 @@ func (x MetricsResponse_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use MetricsResponse_Choice_Enum.Descriptor instead. func (MetricsResponse_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{352, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{457, 0, 0} } type PortMetricsRequest_ColumnNames_Enum int32 @@ -8496,11 +10030,11 @@ func (x PortMetricsRequest_ColumnNames_Enum) String() string { } func (PortMetricsRequest_ColumnNames_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[161].Descriptor() + return file_otg_proto_enumTypes[189].Descriptor() } func (PortMetricsRequest_ColumnNames_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[161] + return &file_otg_proto_enumTypes[189] } func (x PortMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { @@ -8509,7 +10043,7 @@ func (x PortMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PortMetricsRequest_ColumnNames_Enum.Descriptor instead. func (PortMetricsRequest_ColumnNames_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{353, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{458, 0, 0} } type PortMetric_Link_Enum int32 @@ -8545,11 +10079,11 @@ func (x PortMetric_Link_Enum) String() string { } func (PortMetric_Link_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[162].Descriptor() + return file_otg_proto_enumTypes[190].Descriptor() } func (PortMetric_Link_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[162] + return &file_otg_proto_enumTypes[190] } func (x PortMetric_Link_Enum) Number() protoreflect.EnumNumber { @@ -8558,7 +10092,7 @@ func (x PortMetric_Link_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PortMetric_Link_Enum.Descriptor instead. func (PortMetric_Link_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{354, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{459, 0, 0} } type PortMetric_Capture_Enum int32 @@ -8594,11 +10128,11 @@ func (x PortMetric_Capture_Enum) String() string { } func (PortMetric_Capture_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[163].Descriptor() + return file_otg_proto_enumTypes[191].Descriptor() } func (PortMetric_Capture_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[163] + return &file_otg_proto_enumTypes[191] } func (x PortMetric_Capture_Enum) Number() protoreflect.EnumNumber { @@ -8607,7 +10141,7 @@ func (x PortMetric_Capture_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PortMetric_Capture_Enum.Descriptor instead. func (PortMetric_Capture_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{354, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{459, 1, 0} } type PortMetric_Transmit_Enum int32 @@ -8643,11 +10177,11 @@ func (x PortMetric_Transmit_Enum) String() string { } func (PortMetric_Transmit_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[164].Descriptor() + return file_otg_proto_enumTypes[192].Descriptor() } func (PortMetric_Transmit_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[164] + return &file_otg_proto_enumTypes[192] } func (x PortMetric_Transmit_Enum) Number() protoreflect.EnumNumber { @@ -8656,7 +10190,7 @@ func (x PortMetric_Transmit_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PortMetric_Transmit_Enum.Descriptor instead. func (PortMetric_Transmit_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{354, 2, 0} + return file_otg_proto_rawDescGZIP(), []int{459, 2, 0} } type FlowMetricsRequest_MetricNames_Enum int32 @@ -8707,11 +10241,11 @@ func (x FlowMetricsRequest_MetricNames_Enum) String() string { } func (FlowMetricsRequest_MetricNames_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[165].Descriptor() + return file_otg_proto_enumTypes[193].Descriptor() } func (FlowMetricsRequest_MetricNames_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[165] + return &file_otg_proto_enumTypes[193] } func (x FlowMetricsRequest_MetricNames_Enum) Number() protoreflect.EnumNumber { @@ -8720,7 +10254,7 @@ func (x FlowMetricsRequest_MetricNames_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowMetricsRequest_MetricNames_Enum.Descriptor instead. func (FlowMetricsRequest_MetricNames_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{355, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{460, 0, 0} } type FlowTaggedMetricsFilter_MetricNames_Enum int32 @@ -8768,11 +10302,11 @@ func (x FlowTaggedMetricsFilter_MetricNames_Enum) String() string { } func (FlowTaggedMetricsFilter_MetricNames_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[166].Descriptor() + return file_otg_proto_enumTypes[194].Descriptor() } func (FlowTaggedMetricsFilter_MetricNames_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[166] + return &file_otg_proto_enumTypes[194] } func (x FlowTaggedMetricsFilter_MetricNames_Enum) Number() protoreflect.EnumNumber { @@ -8781,7 +10315,7 @@ func (x FlowTaggedMetricsFilter_MetricNames_Enum) Number() protoreflect.EnumNumb // Deprecated: Use FlowTaggedMetricsFilter_MetricNames_Enum.Descriptor instead. func (FlowTaggedMetricsFilter_MetricNames_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{356, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{461, 0, 0} } type FlowMetric_Transmit_Enum int32 @@ -8820,11 +10354,11 @@ func (x FlowMetric_Transmit_Enum) String() string { } func (FlowMetric_Transmit_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[167].Descriptor() + return file_otg_proto_enumTypes[195].Descriptor() } func (FlowMetric_Transmit_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[167] + return &file_otg_proto_enumTypes[195] } func (x FlowMetric_Transmit_Enum) Number() protoreflect.EnumNumber { @@ -8833,7 +10367,7 @@ func (x FlowMetric_Transmit_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowMetric_Transmit_Enum.Descriptor instead. func (FlowMetric_Transmit_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{358, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{463, 0, 0} } type FlowMetricTagValue_Choice_Enum int32 @@ -8869,11 +10403,11 @@ func (x FlowMetricTagValue_Choice_Enum) String() string { } func (FlowMetricTagValue_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[168].Descriptor() + return file_otg_proto_enumTypes[196].Descriptor() } func (FlowMetricTagValue_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[168] + return &file_otg_proto_enumTypes[196] } func (x FlowMetricTagValue_Choice_Enum) Number() protoreflect.EnumNumber { @@ -8882,7 +10416,7 @@ func (x FlowMetricTagValue_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use FlowMetricTagValue_Choice_Enum.Descriptor instead. func (FlowMetricTagValue_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{361, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{466, 0, 0} } type Bgpv4MetricsRequest_ColumnNames_Enum int32 @@ -8960,11 +10494,11 @@ func (x Bgpv4MetricsRequest_ColumnNames_Enum) String() string { } func (Bgpv4MetricsRequest_ColumnNames_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[169].Descriptor() + return file_otg_proto_enumTypes[197].Descriptor() } func (Bgpv4MetricsRequest_ColumnNames_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[169] + return &file_otg_proto_enumTypes[197] } func (x Bgpv4MetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { @@ -8973,7 +10507,7 @@ func (x Bgpv4MetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use Bgpv4MetricsRequest_ColumnNames_Enum.Descriptor instead. func (Bgpv4MetricsRequest_ColumnNames_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{364, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{469, 0, 0} } type Bgpv4Metric_SessionState_Enum int32 @@ -9009,11 +10543,11 @@ func (x Bgpv4Metric_SessionState_Enum) String() string { } func (Bgpv4Metric_SessionState_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[170].Descriptor() + return file_otg_proto_enumTypes[198].Descriptor() } func (Bgpv4Metric_SessionState_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[170] + return &file_otg_proto_enumTypes[198] } func (x Bgpv4Metric_SessionState_Enum) Number() protoreflect.EnumNumber { @@ -9022,7 +10556,7 @@ func (x Bgpv4Metric_SessionState_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use Bgpv4Metric_SessionState_Enum.Descriptor instead. func (Bgpv4Metric_SessionState_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{365, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{470, 0, 0} } type Bgpv4Metric_FsmState_Enum int32 @@ -9070,11 +10604,11 @@ func (x Bgpv4Metric_FsmState_Enum) String() string { } func (Bgpv4Metric_FsmState_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[171].Descriptor() + return file_otg_proto_enumTypes[199].Descriptor() } func (Bgpv4Metric_FsmState_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[171] + return &file_otg_proto_enumTypes[199] } func (x Bgpv4Metric_FsmState_Enum) Number() protoreflect.EnumNumber { @@ -9083,7 +10617,7 @@ func (x Bgpv4Metric_FsmState_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use Bgpv4Metric_FsmState_Enum.Descriptor instead. func (Bgpv4Metric_FsmState_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{365, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{470, 1, 0} } type Bgpv6MetricsRequest_ColumnNames_Enum int32 @@ -9161,11 +10695,11 @@ func (x Bgpv6MetricsRequest_ColumnNames_Enum) String() string { } func (Bgpv6MetricsRequest_ColumnNames_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[172].Descriptor() + return file_otg_proto_enumTypes[200].Descriptor() } func (Bgpv6MetricsRequest_ColumnNames_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[172] + return &file_otg_proto_enumTypes[200] } func (x Bgpv6MetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { @@ -9174,7 +10708,7 @@ func (x Bgpv6MetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use Bgpv6MetricsRequest_ColumnNames_Enum.Descriptor instead. func (Bgpv6MetricsRequest_ColumnNames_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{366, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{471, 0, 0} } type Bgpv6Metric_SessionState_Enum int32 @@ -9210,11 +10744,11 @@ func (x Bgpv6Metric_SessionState_Enum) String() string { } func (Bgpv6Metric_SessionState_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[173].Descriptor() + return file_otg_proto_enumTypes[201].Descriptor() } func (Bgpv6Metric_SessionState_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[173] + return &file_otg_proto_enumTypes[201] } func (x Bgpv6Metric_SessionState_Enum) Number() protoreflect.EnumNumber { @@ -9223,7 +10757,7 @@ func (x Bgpv6Metric_SessionState_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use Bgpv6Metric_SessionState_Enum.Descriptor instead. func (Bgpv6Metric_SessionState_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{367, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{472, 0, 0} } type Bgpv6Metric_FsmState_Enum int32 @@ -9271,11 +10805,11 @@ func (x Bgpv6Metric_FsmState_Enum) String() string { } func (Bgpv6Metric_FsmState_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[174].Descriptor() + return file_otg_proto_enumTypes[202].Descriptor() } func (Bgpv6Metric_FsmState_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[174] + return &file_otg_proto_enumTypes[202] } func (x Bgpv6Metric_FsmState_Enum) Number() protoreflect.EnumNumber { @@ -9284,7 +10818,7 @@ func (x Bgpv6Metric_FsmState_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use Bgpv6Metric_FsmState_Enum.Descriptor instead. func (Bgpv6Metric_FsmState_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{367, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{472, 1, 0} } type IsisMetricsRequest_ColumnNames_Enum int32 @@ -9392,11 +10926,11 @@ func (x IsisMetricsRequest_ColumnNames_Enum) String() string { } func (IsisMetricsRequest_ColumnNames_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[175].Descriptor() + return file_otg_proto_enumTypes[203].Descriptor() } func (IsisMetricsRequest_ColumnNames_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[175] + return &file_otg_proto_enumTypes[203] } func (x IsisMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { @@ -9405,7 +10939,7 @@ func (x IsisMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use IsisMetricsRequest_ColumnNames_Enum.Descriptor instead. func (IsisMetricsRequest_ColumnNames_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{368, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{473, 0, 0} } type LagMetricsRequest_ColumnNames_Enum int32 @@ -9465,11 +10999,11 @@ func (x LagMetricsRequest_ColumnNames_Enum) String() string { } func (LagMetricsRequest_ColumnNames_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[176].Descriptor() + return file_otg_proto_enumTypes[204].Descriptor() } func (LagMetricsRequest_ColumnNames_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[176] + return &file_otg_proto_enumTypes[204] } func (x LagMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { @@ -9478,7 +11012,7 @@ func (x LagMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use LagMetricsRequest_ColumnNames_Enum.Descriptor instead. func (LagMetricsRequest_ColumnNames_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{370, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{475, 0, 0} } type LagMetric_OperStatus_Enum int32 @@ -9514,11 +11048,11 @@ func (x LagMetric_OperStatus_Enum) String() string { } func (LagMetric_OperStatus_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[177].Descriptor() + return file_otg_proto_enumTypes[205].Descriptor() } func (LagMetric_OperStatus_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[177] + return &file_otg_proto_enumTypes[205] } func (x LagMetric_OperStatus_Enum) Number() protoreflect.EnumNumber { @@ -9527,7 +11061,7 @@ func (x LagMetric_OperStatus_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use LagMetric_OperStatus_Enum.Descriptor instead. func (LagMetric_OperStatus_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{371, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{476, 0, 0} } type LacpMetricsRequest_ColumnNames_Enum int32 @@ -9602,11 +11136,11 @@ func (x LacpMetricsRequest_ColumnNames_Enum) String() string { } func (LacpMetricsRequest_ColumnNames_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[178].Descriptor() + return file_otg_proto_enumTypes[206].Descriptor() } func (LacpMetricsRequest_ColumnNames_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[178] + return &file_otg_proto_enumTypes[206] } func (x LacpMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { @@ -9615,7 +11149,7 @@ func (x LacpMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use LacpMetricsRequest_ColumnNames_Enum.Descriptor instead. func (LacpMetricsRequest_ColumnNames_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{372, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{477, 0, 0} } type LacpMetric_Activity_Enum int32 @@ -9651,11 +11185,11 @@ func (x LacpMetric_Activity_Enum) String() string { } func (LacpMetric_Activity_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[179].Descriptor() + return file_otg_proto_enumTypes[207].Descriptor() } func (LacpMetric_Activity_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[179] + return &file_otg_proto_enumTypes[207] } func (x LacpMetric_Activity_Enum) Number() protoreflect.EnumNumber { @@ -9664,7 +11198,7 @@ func (x LacpMetric_Activity_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use LacpMetric_Activity_Enum.Descriptor instead. func (LacpMetric_Activity_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{373, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{478, 0, 0} } type LacpMetric_Timeout_Enum int32 @@ -9700,11 +11234,11 @@ func (x LacpMetric_Timeout_Enum) String() string { } func (LacpMetric_Timeout_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[180].Descriptor() + return file_otg_proto_enumTypes[208].Descriptor() } func (LacpMetric_Timeout_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[180] + return &file_otg_proto_enumTypes[208] } func (x LacpMetric_Timeout_Enum) Number() protoreflect.EnumNumber { @@ -9713,7 +11247,7 @@ func (x LacpMetric_Timeout_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use LacpMetric_Timeout_Enum.Descriptor instead. func (LacpMetric_Timeout_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{373, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{478, 1, 0} } type LacpMetric_Synchronization_Enum int32 @@ -9749,11 +11283,11 @@ func (x LacpMetric_Synchronization_Enum) String() string { } func (LacpMetric_Synchronization_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[181].Descriptor() + return file_otg_proto_enumTypes[209].Descriptor() } func (LacpMetric_Synchronization_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[181] + return &file_otg_proto_enumTypes[209] } func (x LacpMetric_Synchronization_Enum) Number() protoreflect.EnumNumber { @@ -9762,7 +11296,7 @@ func (x LacpMetric_Synchronization_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use LacpMetric_Synchronization_Enum.Descriptor instead. func (LacpMetric_Synchronization_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{373, 2, 0} + return file_otg_proto_rawDescGZIP(), []int{478, 2, 0} } type LldpMetricsRequest_ColumnNames_Enum int32 @@ -9810,11 +11344,11 @@ func (x LldpMetricsRequest_ColumnNames_Enum) String() string { } func (LldpMetricsRequest_ColumnNames_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[182].Descriptor() + return file_otg_proto_enumTypes[210].Descriptor() } func (LldpMetricsRequest_ColumnNames_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[182] + return &file_otg_proto_enumTypes[210] } func (x LldpMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { @@ -9823,7 +11357,7 @@ func (x LldpMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use LldpMetricsRequest_ColumnNames_Enum.Descriptor instead. func (LldpMetricsRequest_ColumnNames_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{374, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{479, 0, 0} } type RsvpMetricsRequest_ColumnNames_Enum int32 @@ -9943,11 +11477,11 @@ func (x RsvpMetricsRequest_ColumnNames_Enum) String() string { } func (RsvpMetricsRequest_ColumnNames_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[183].Descriptor() + return file_otg_proto_enumTypes[211].Descriptor() } func (RsvpMetricsRequest_ColumnNames_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[183] + return &file_otg_proto_enumTypes[211] } func (x RsvpMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { @@ -9956,40 +11490,495 @@ func (x RsvpMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use RsvpMetricsRequest_ColumnNames_Enum.Descriptor instead. func (RsvpMetricsRequest_ColumnNames_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{376, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{481, 0, 0} +} + +type Dhcpv4ClientMetricsRequest_ColumnNames_Enum int32 + +const ( + Dhcpv4ClientMetricsRequest_ColumnNames_unspecified Dhcpv4ClientMetricsRequest_ColumnNames_Enum = 0 + Dhcpv4ClientMetricsRequest_ColumnNames_discovers_sent Dhcpv4ClientMetricsRequest_ColumnNames_Enum = 1 + Dhcpv4ClientMetricsRequest_ColumnNames_offers_received Dhcpv4ClientMetricsRequest_ColumnNames_Enum = 2 + Dhcpv4ClientMetricsRequest_ColumnNames_requests_sent Dhcpv4ClientMetricsRequest_ColumnNames_Enum = 3 + Dhcpv4ClientMetricsRequest_ColumnNames_acks_received Dhcpv4ClientMetricsRequest_ColumnNames_Enum = 4 + Dhcpv4ClientMetricsRequest_ColumnNames_nacks_received Dhcpv4ClientMetricsRequest_ColumnNames_Enum = 5 + Dhcpv4ClientMetricsRequest_ColumnNames_releases_sent Dhcpv4ClientMetricsRequest_ColumnNames_Enum = 6 + Dhcpv4ClientMetricsRequest_ColumnNames_declines_sent Dhcpv4ClientMetricsRequest_ColumnNames_Enum = 7 +) + +// Enum value maps for Dhcpv4ClientMetricsRequest_ColumnNames_Enum. +var ( + Dhcpv4ClientMetricsRequest_ColumnNames_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "discovers_sent", + 2: "offers_received", + 3: "requests_sent", + 4: "acks_received", + 5: "nacks_received", + 6: "releases_sent", + 7: "declines_sent", + } + Dhcpv4ClientMetricsRequest_ColumnNames_Enum_value = map[string]int32{ + "unspecified": 0, + "discovers_sent": 1, + "offers_received": 2, + "requests_sent": 3, + "acks_received": 4, + "nacks_received": 5, + "releases_sent": 6, + "declines_sent": 7, + } +) + +func (x Dhcpv4ClientMetricsRequest_ColumnNames_Enum) Enum() *Dhcpv4ClientMetricsRequest_ColumnNames_Enum { + p := new(Dhcpv4ClientMetricsRequest_ColumnNames_Enum) + *p = x + return p +} + +func (x Dhcpv4ClientMetricsRequest_ColumnNames_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dhcpv4ClientMetricsRequest_ColumnNames_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[212].Descriptor() +} + +func (Dhcpv4ClientMetricsRequest_ColumnNames_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[212] +} + +func (x Dhcpv4ClientMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dhcpv4ClientMetricsRequest_ColumnNames_Enum.Descriptor instead. +func (Dhcpv4ClientMetricsRequest_ColumnNames_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{483, 0, 0} +} + +type Dhcpv4ServerMetricsRequest_ColumnNames_Enum int32 + +const ( + Dhcpv4ServerMetricsRequest_ColumnNames_unspecified Dhcpv4ServerMetricsRequest_ColumnNames_Enum = 0 + Dhcpv4ServerMetricsRequest_ColumnNames_discovers_received Dhcpv4ServerMetricsRequest_ColumnNames_Enum = 1 + Dhcpv4ServerMetricsRequest_ColumnNames_offers_sent Dhcpv4ServerMetricsRequest_ColumnNames_Enum = 2 + Dhcpv4ServerMetricsRequest_ColumnNames_requests_received Dhcpv4ServerMetricsRequest_ColumnNames_Enum = 3 + Dhcpv4ServerMetricsRequest_ColumnNames_acks_sent Dhcpv4ServerMetricsRequest_ColumnNames_Enum = 4 + Dhcpv4ServerMetricsRequest_ColumnNames_nacks_sent Dhcpv4ServerMetricsRequest_ColumnNames_Enum = 5 + Dhcpv4ServerMetricsRequest_ColumnNames_releases_received Dhcpv4ServerMetricsRequest_ColumnNames_Enum = 6 + Dhcpv4ServerMetricsRequest_ColumnNames_declines_received Dhcpv4ServerMetricsRequest_ColumnNames_Enum = 7 +) + +// Enum value maps for Dhcpv4ServerMetricsRequest_ColumnNames_Enum. +var ( + Dhcpv4ServerMetricsRequest_ColumnNames_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "discovers_received", + 2: "offers_sent", + 3: "requests_received", + 4: "acks_sent", + 5: "nacks_sent", + 6: "releases_received", + 7: "declines_received", + } + Dhcpv4ServerMetricsRequest_ColumnNames_Enum_value = map[string]int32{ + "unspecified": 0, + "discovers_received": 1, + "offers_sent": 2, + "requests_received": 3, + "acks_sent": 4, + "nacks_sent": 5, + "releases_received": 6, + "declines_received": 7, + } +) + +func (x Dhcpv4ServerMetricsRequest_ColumnNames_Enum) Enum() *Dhcpv4ServerMetricsRequest_ColumnNames_Enum { + p := new(Dhcpv4ServerMetricsRequest_ColumnNames_Enum) + *p = x + return p +} + +func (x Dhcpv4ServerMetricsRequest_ColumnNames_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dhcpv4ServerMetricsRequest_ColumnNames_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[213].Descriptor() +} + +func (Dhcpv4ServerMetricsRequest_ColumnNames_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[213] +} + +func (x Dhcpv4ServerMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dhcpv4ServerMetricsRequest_ColumnNames_Enum.Descriptor instead. +func (Dhcpv4ServerMetricsRequest_ColumnNames_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{485, 0, 0} +} + +type Dhcpv6ClientMetricsRequest_ColumnNames_Enum int32 + +const ( + Dhcpv6ClientMetricsRequest_ColumnNames_unspecified Dhcpv6ClientMetricsRequest_ColumnNames_Enum = 0 + Dhcpv6ClientMetricsRequest_ColumnNames_solicits_sent Dhcpv6ClientMetricsRequest_ColumnNames_Enum = 1 + Dhcpv6ClientMetricsRequest_ColumnNames_advertisements_received Dhcpv6ClientMetricsRequest_ColumnNames_Enum = 2 + Dhcpv6ClientMetricsRequest_ColumnNames_advertisements_ignored Dhcpv6ClientMetricsRequest_ColumnNames_Enum = 3 + Dhcpv6ClientMetricsRequest_ColumnNames_requests_sent Dhcpv6ClientMetricsRequest_ColumnNames_Enum = 4 + Dhcpv6ClientMetricsRequest_ColumnNames_nacks_received Dhcpv6ClientMetricsRequest_ColumnNames_Enum = 5 + Dhcpv6ClientMetricsRequest_ColumnNames_replies_received Dhcpv6ClientMetricsRequest_ColumnNames_Enum = 6 + Dhcpv6ClientMetricsRequest_ColumnNames_information_requests_sent Dhcpv6ClientMetricsRequest_ColumnNames_Enum = 7 + Dhcpv6ClientMetricsRequest_ColumnNames_renews_sent Dhcpv6ClientMetricsRequest_ColumnNames_Enum = 8 + Dhcpv6ClientMetricsRequest_ColumnNames_rebinds_sent Dhcpv6ClientMetricsRequest_ColumnNames_Enum = 9 + Dhcpv6ClientMetricsRequest_ColumnNames_releases_sent Dhcpv6ClientMetricsRequest_ColumnNames_Enum = 10 + Dhcpv6ClientMetricsRequest_ColumnNames_reconfigures_received Dhcpv6ClientMetricsRequest_ColumnNames_Enum = 11 + Dhcpv6ClientMetricsRequest_ColumnNames_rapid_commit_solicits_sent Dhcpv6ClientMetricsRequest_ColumnNames_Enum = 12 + Dhcpv6ClientMetricsRequest_ColumnNames_rapid_commit_replies_received Dhcpv6ClientMetricsRequest_ColumnNames_Enum = 13 +) + +// Enum value maps for Dhcpv6ClientMetricsRequest_ColumnNames_Enum. +var ( + Dhcpv6ClientMetricsRequest_ColumnNames_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "solicits_sent", + 2: "advertisements_received", + 3: "advertisements_ignored", + 4: "requests_sent", + 5: "nacks_received", + 6: "replies_received", + 7: "information_requests_sent", + 8: "renews_sent", + 9: "rebinds_sent", + 10: "releases_sent", + 11: "reconfigures_received", + 12: "rapid_commit_solicits_sent", + 13: "rapid_commit_replies_received", + } + Dhcpv6ClientMetricsRequest_ColumnNames_Enum_value = map[string]int32{ + "unspecified": 0, + "solicits_sent": 1, + "advertisements_received": 2, + "advertisements_ignored": 3, + "requests_sent": 4, + "nacks_received": 5, + "replies_received": 6, + "information_requests_sent": 7, + "renews_sent": 8, + "rebinds_sent": 9, + "releases_sent": 10, + "reconfigures_received": 11, + "rapid_commit_solicits_sent": 12, + "rapid_commit_replies_received": 13, + } +) + +func (x Dhcpv6ClientMetricsRequest_ColumnNames_Enum) Enum() *Dhcpv6ClientMetricsRequest_ColumnNames_Enum { + p := new(Dhcpv6ClientMetricsRequest_ColumnNames_Enum) + *p = x + return p +} + +func (x Dhcpv6ClientMetricsRequest_ColumnNames_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dhcpv6ClientMetricsRequest_ColumnNames_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[214].Descriptor() +} + +func (Dhcpv6ClientMetricsRequest_ColumnNames_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[214] +} + +func (x Dhcpv6ClientMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dhcpv6ClientMetricsRequest_ColumnNames_Enum.Descriptor instead. +func (Dhcpv6ClientMetricsRequest_ColumnNames_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{487, 0, 0} +} + +type Dhcpv6ServerMetricsRequest_ColumnNames_Enum int32 + +const ( + Dhcpv6ServerMetricsRequest_ColumnNames_unspecified Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 0 + Dhcpv6ServerMetricsRequest_ColumnNames_solicits_received Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 1 + Dhcpv6ServerMetricsRequest_ColumnNames_solicits_ignored Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 2 + Dhcpv6ServerMetricsRequest_ColumnNames_advertisements_sent Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 3 + Dhcpv6ServerMetricsRequest_ColumnNames_requests_received Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 4 + Dhcpv6ServerMetricsRequest_ColumnNames_nacks_sent Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 5 + Dhcpv6ServerMetricsRequest_ColumnNames_confirms_received Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 6 + Dhcpv6ServerMetricsRequest_ColumnNames_renewals_received Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 7 + Dhcpv6ServerMetricsRequest_ColumnNames_rebinds_received Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 8 + Dhcpv6ServerMetricsRequest_ColumnNames_replies_sent Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 9 + Dhcpv6ServerMetricsRequest_ColumnNames_releases_received Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 10 + Dhcpv6ServerMetricsRequest_ColumnNames_declines_received Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 11 + Dhcpv6ServerMetricsRequest_ColumnNames_information_requests_received Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 12 + Dhcpv6ServerMetricsRequest_ColumnNames_relay_forwards_received Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 13 + Dhcpv6ServerMetricsRequest_ColumnNames_relay_replies_sent Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 14 + Dhcpv6ServerMetricsRequest_ColumnNames_reconfigures_sent Dhcpv6ServerMetricsRequest_ColumnNames_Enum = 15 +) + +// Enum value maps for Dhcpv6ServerMetricsRequest_ColumnNames_Enum. +var ( + Dhcpv6ServerMetricsRequest_ColumnNames_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "solicits_received", + 2: "solicits_ignored", + 3: "advertisements_sent", + 4: "requests_received", + 5: "nacks_sent", + 6: "confirms_received", + 7: "renewals_received", + 8: "rebinds_received", + 9: "replies_sent", + 10: "releases_received", + 11: "declines_received", + 12: "information_requests_received", + 13: "relay_forwards_received", + 14: "relay_replies_sent", + 15: "reconfigures_sent", + } + Dhcpv6ServerMetricsRequest_ColumnNames_Enum_value = map[string]int32{ + "unspecified": 0, + "solicits_received": 1, + "solicits_ignored": 2, + "advertisements_sent": 3, + "requests_received": 4, + "nacks_sent": 5, + "confirms_received": 6, + "renewals_received": 7, + "rebinds_received": 8, + "replies_sent": 9, + "releases_received": 10, + "declines_received": 11, + "information_requests_received": 12, + "relay_forwards_received": 13, + "relay_replies_sent": 14, + "reconfigures_sent": 15, + } +) + +func (x Dhcpv6ServerMetricsRequest_ColumnNames_Enum) Enum() *Dhcpv6ServerMetricsRequest_ColumnNames_Enum { + p := new(Dhcpv6ServerMetricsRequest_ColumnNames_Enum) + *p = x + return p +} + +func (x Dhcpv6ServerMetricsRequest_ColumnNames_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dhcpv6ServerMetricsRequest_ColumnNames_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[215].Descriptor() +} + +func (Dhcpv6ServerMetricsRequest_ColumnNames_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[215] +} + +func (x Dhcpv6ServerMetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dhcpv6ServerMetricsRequest_ColumnNames_Enum.Descriptor instead. +func (Dhcpv6ServerMetricsRequest_ColumnNames_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{489, 0, 0} +} + +type Ospfv2MetricsRequest_ColumnNames_Enum int32 + +const ( + Ospfv2MetricsRequest_ColumnNames_unspecified Ospfv2MetricsRequest_ColumnNames_Enum = 0 + Ospfv2MetricsRequest_ColumnNames_full_state_count Ospfv2MetricsRequest_ColumnNames_Enum = 1 + Ospfv2MetricsRequest_ColumnNames_down_state_count Ospfv2MetricsRequest_ColumnNames_Enum = 2 + Ospfv2MetricsRequest_ColumnNames_sessions_flap Ospfv2MetricsRequest_ColumnNames_Enum = 3 + Ospfv2MetricsRequest_ColumnNames_hellos_sent Ospfv2MetricsRequest_ColumnNames_Enum = 4 + Ospfv2MetricsRequest_ColumnNames_hellos_received Ospfv2MetricsRequest_ColumnNames_Enum = 5 + Ospfv2MetricsRequest_ColumnNames_dbd_sent Ospfv2MetricsRequest_ColumnNames_Enum = 6 + Ospfv2MetricsRequest_ColumnNames_dbd_received Ospfv2MetricsRequest_ColumnNames_Enum = 7 + Ospfv2MetricsRequest_ColumnNames_ls_request_sent Ospfv2MetricsRequest_ColumnNames_Enum = 8 + Ospfv2MetricsRequest_ColumnNames_ls_request_received Ospfv2MetricsRequest_ColumnNames_Enum = 9 + Ospfv2MetricsRequest_ColumnNames_ls_update_sent Ospfv2MetricsRequest_ColumnNames_Enum = 10 + Ospfv2MetricsRequest_ColumnNames_ls_update_received Ospfv2MetricsRequest_ColumnNames_Enum = 11 + Ospfv2MetricsRequest_ColumnNames_ls_ack_sent Ospfv2MetricsRequest_ColumnNames_Enum = 12 + Ospfv2MetricsRequest_ColumnNames_ls_ack_received Ospfv2MetricsRequest_ColumnNames_Enum = 13 + Ospfv2MetricsRequest_ColumnNames_lsa_sent Ospfv2MetricsRequest_ColumnNames_Enum = 14 + Ospfv2MetricsRequest_ColumnNames_lsa_received Ospfv2MetricsRequest_ColumnNames_Enum = 15 + Ospfv2MetricsRequest_ColumnNames_lsa_ack_sent Ospfv2MetricsRequest_ColumnNames_Enum = 16 + Ospfv2MetricsRequest_ColumnNames_lsa_ack_received Ospfv2MetricsRequest_ColumnNames_Enum = 17 + Ospfv2MetricsRequest_ColumnNames_router_lsa_sent Ospfv2MetricsRequest_ColumnNames_Enum = 18 + Ospfv2MetricsRequest_ColumnNames_router_lsa_received Ospfv2MetricsRequest_ColumnNames_Enum = 19 + Ospfv2MetricsRequest_ColumnNames_network_lsa_sent Ospfv2MetricsRequest_ColumnNames_Enum = 20 + Ospfv2MetricsRequest_ColumnNames_network_lsa_received Ospfv2MetricsRequest_ColumnNames_Enum = 21 + Ospfv2MetricsRequest_ColumnNames_summary_lsa_sent Ospfv2MetricsRequest_ColumnNames_Enum = 22 + Ospfv2MetricsRequest_ColumnNames_summary_lsa_received Ospfv2MetricsRequest_ColumnNames_Enum = 23 + Ospfv2MetricsRequest_ColumnNames_external_lsa_sent Ospfv2MetricsRequest_ColumnNames_Enum = 24 + Ospfv2MetricsRequest_ColumnNames_external_lsa_received Ospfv2MetricsRequest_ColumnNames_Enum = 25 + Ospfv2MetricsRequest_ColumnNames_nssa_lsa_sent Ospfv2MetricsRequest_ColumnNames_Enum = 26 + Ospfv2MetricsRequest_ColumnNames_nssa_lsa_received Ospfv2MetricsRequest_ColumnNames_Enum = 27 + Ospfv2MetricsRequest_ColumnNames_opaque_local_sent Ospfv2MetricsRequest_ColumnNames_Enum = 28 + Ospfv2MetricsRequest_ColumnNames_opaque_local_received Ospfv2MetricsRequest_ColumnNames_Enum = 29 + Ospfv2MetricsRequest_ColumnNames_opaque_area_sent Ospfv2MetricsRequest_ColumnNames_Enum = 30 + Ospfv2MetricsRequest_ColumnNames_opaque_area_received Ospfv2MetricsRequest_ColumnNames_Enum = 31 + Ospfv2MetricsRequest_ColumnNames_opaque_domain_sent Ospfv2MetricsRequest_ColumnNames_Enum = 32 + Ospfv2MetricsRequest_ColumnNames_opaque_domain_received Ospfv2MetricsRequest_ColumnNames_Enum = 33 +) + +// Enum value maps for Ospfv2MetricsRequest_ColumnNames_Enum. +var ( + Ospfv2MetricsRequest_ColumnNames_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "full_state_count", + 2: "down_state_count", + 3: "sessions_flap", + 4: "hellos_sent", + 5: "hellos_received", + 6: "dbd_sent", + 7: "dbd_received", + 8: "ls_request_sent", + 9: "ls_request_received", + 10: "ls_update_sent", + 11: "ls_update_received", + 12: "ls_ack_sent", + 13: "ls_ack_received", + 14: "lsa_sent", + 15: "lsa_received", + 16: "lsa_ack_sent", + 17: "lsa_ack_received", + 18: "router_lsa_sent", + 19: "router_lsa_received", + 20: "network_lsa_sent", + 21: "network_lsa_received", + 22: "summary_lsa_sent", + 23: "summary_lsa_received", + 24: "external_lsa_sent", + 25: "external_lsa_received", + 26: "nssa_lsa_sent", + 27: "nssa_lsa_received", + 28: "opaque_local_sent", + 29: "opaque_local_received", + 30: "opaque_area_sent", + 31: "opaque_area_received", + 32: "opaque_domain_sent", + 33: "opaque_domain_received", + } + Ospfv2MetricsRequest_ColumnNames_Enum_value = map[string]int32{ + "unspecified": 0, + "full_state_count": 1, + "down_state_count": 2, + "sessions_flap": 3, + "hellos_sent": 4, + "hellos_received": 5, + "dbd_sent": 6, + "dbd_received": 7, + "ls_request_sent": 8, + "ls_request_received": 9, + "ls_update_sent": 10, + "ls_update_received": 11, + "ls_ack_sent": 12, + "ls_ack_received": 13, + "lsa_sent": 14, + "lsa_received": 15, + "lsa_ack_sent": 16, + "lsa_ack_received": 17, + "router_lsa_sent": 18, + "router_lsa_received": 19, + "network_lsa_sent": 20, + "network_lsa_received": 21, + "summary_lsa_sent": 22, + "summary_lsa_received": 23, + "external_lsa_sent": 24, + "external_lsa_received": 25, + "nssa_lsa_sent": 26, + "nssa_lsa_received": 27, + "opaque_local_sent": 28, + "opaque_local_received": 29, + "opaque_area_sent": 30, + "opaque_area_received": 31, + "opaque_domain_sent": 32, + "opaque_domain_received": 33, + } +) + +func (x Ospfv2MetricsRequest_ColumnNames_Enum) Enum() *Ospfv2MetricsRequest_ColumnNames_Enum { + p := new(Ospfv2MetricsRequest_ColumnNames_Enum) + *p = x + return p +} + +func (x Ospfv2MetricsRequest_ColumnNames_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Ospfv2MetricsRequest_ColumnNames_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[216].Descriptor() +} + +func (Ospfv2MetricsRequest_ColumnNames_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[216] +} + +func (x Ospfv2MetricsRequest_ColumnNames_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Ospfv2MetricsRequest_ColumnNames_Enum.Descriptor instead. +func (Ospfv2MetricsRequest_ColumnNames_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{491, 0, 0} } type StatesRequest_Choice_Enum int32 const ( - StatesRequest_Choice_unspecified StatesRequest_Choice_Enum = 0 - StatesRequest_Choice_ipv4_neighbors StatesRequest_Choice_Enum = 1 - StatesRequest_Choice_ipv6_neighbors StatesRequest_Choice_Enum = 2 - StatesRequest_Choice_bgp_prefixes StatesRequest_Choice_Enum = 3 - StatesRequest_Choice_isis_lsps StatesRequest_Choice_Enum = 4 - StatesRequest_Choice_lldp_neighbors StatesRequest_Choice_Enum = 5 - StatesRequest_Choice_rsvp_lsps StatesRequest_Choice_Enum = 6 + StatesRequest_Choice_unspecified StatesRequest_Choice_Enum = 0 + StatesRequest_Choice_ipv4_neighbors StatesRequest_Choice_Enum = 1 + StatesRequest_Choice_ipv6_neighbors StatesRequest_Choice_Enum = 2 + StatesRequest_Choice_bgp_prefixes StatesRequest_Choice_Enum = 3 + StatesRequest_Choice_isis_lsps StatesRequest_Choice_Enum = 4 + StatesRequest_Choice_lldp_neighbors StatesRequest_Choice_Enum = 5 + StatesRequest_Choice_rsvp_lsps StatesRequest_Choice_Enum = 6 + StatesRequest_Choice_dhcpv4_interfaces StatesRequest_Choice_Enum = 7 + StatesRequest_Choice_dhcpv4_leases StatesRequest_Choice_Enum = 8 + StatesRequest_Choice_dhcpv6_interfaces StatesRequest_Choice_Enum = 9 + StatesRequest_Choice_dhcpv6_leases StatesRequest_Choice_Enum = 10 + StatesRequest_Choice_ospfv2_lsas StatesRequest_Choice_Enum = 11 ) // Enum value maps for StatesRequest_Choice_Enum. var ( StatesRequest_Choice_Enum_name = map[int32]string{ - 0: "unspecified", - 1: "ipv4_neighbors", - 2: "ipv6_neighbors", - 3: "bgp_prefixes", - 4: "isis_lsps", - 5: "lldp_neighbors", - 6: "rsvp_lsps", + 0: "unspecified", + 1: "ipv4_neighbors", + 2: "ipv6_neighbors", + 3: "bgp_prefixes", + 4: "isis_lsps", + 5: "lldp_neighbors", + 6: "rsvp_lsps", + 7: "dhcpv4_interfaces", + 8: "dhcpv4_leases", + 9: "dhcpv6_interfaces", + 10: "dhcpv6_leases", + 11: "ospfv2_lsas", } StatesRequest_Choice_Enum_value = map[string]int32{ - "unspecified": 0, - "ipv4_neighbors": 1, - "ipv6_neighbors": 2, - "bgp_prefixes": 3, - "isis_lsps": 4, - "lldp_neighbors": 5, - "rsvp_lsps": 6, + "unspecified": 0, + "ipv4_neighbors": 1, + "ipv6_neighbors": 2, + "bgp_prefixes": 3, + "isis_lsps": 4, + "lldp_neighbors": 5, + "rsvp_lsps": 6, + "dhcpv4_interfaces": 7, + "dhcpv4_leases": 8, + "dhcpv6_interfaces": 9, + "dhcpv6_leases": 10, + "ospfv2_lsas": 11, } ) @@ -10004,11 +11993,11 @@ func (x StatesRequest_Choice_Enum) String() string { } func (StatesRequest_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[184].Descriptor() + return file_otg_proto_enumTypes[217].Descriptor() } func (StatesRequest_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[184] + return &file_otg_proto_enumTypes[217] } func (x StatesRequest_Choice_Enum) Number() protoreflect.EnumNumber { @@ -10017,40 +12006,55 @@ func (x StatesRequest_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StatesRequest_Choice_Enum.Descriptor instead. func (StatesRequest_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{378, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{493, 0, 0} } type StatesResponse_Choice_Enum int32 const ( - StatesResponse_Choice_unspecified StatesResponse_Choice_Enum = 0 - StatesResponse_Choice_ipv4_neighbors StatesResponse_Choice_Enum = 1 - StatesResponse_Choice_ipv6_neighbors StatesResponse_Choice_Enum = 2 - StatesResponse_Choice_bgp_prefixes StatesResponse_Choice_Enum = 3 - StatesResponse_Choice_isis_lsps StatesResponse_Choice_Enum = 4 - StatesResponse_Choice_lldp_neighbors StatesResponse_Choice_Enum = 5 - StatesResponse_Choice_rsvp_lsps StatesResponse_Choice_Enum = 6 + StatesResponse_Choice_unspecified StatesResponse_Choice_Enum = 0 + StatesResponse_Choice_ipv4_neighbors StatesResponse_Choice_Enum = 1 + StatesResponse_Choice_ipv6_neighbors StatesResponse_Choice_Enum = 2 + StatesResponse_Choice_bgp_prefixes StatesResponse_Choice_Enum = 3 + StatesResponse_Choice_isis_lsps StatesResponse_Choice_Enum = 4 + StatesResponse_Choice_lldp_neighbors StatesResponse_Choice_Enum = 5 + StatesResponse_Choice_rsvp_lsps StatesResponse_Choice_Enum = 6 + StatesResponse_Choice_dhcpv4_interfaces StatesResponse_Choice_Enum = 7 + StatesResponse_Choice_dhcpv4_leases StatesResponse_Choice_Enum = 8 + StatesResponse_Choice_dhcpv6_interfaces StatesResponse_Choice_Enum = 9 + StatesResponse_Choice_dhcpv6_leases StatesResponse_Choice_Enum = 10 + StatesResponse_Choice_ospfv2_lsas StatesResponse_Choice_Enum = 11 ) // Enum value maps for StatesResponse_Choice_Enum. var ( StatesResponse_Choice_Enum_name = map[int32]string{ - 0: "unspecified", - 1: "ipv4_neighbors", - 2: "ipv6_neighbors", - 3: "bgp_prefixes", - 4: "isis_lsps", - 5: "lldp_neighbors", - 6: "rsvp_lsps", + 0: "unspecified", + 1: "ipv4_neighbors", + 2: "ipv6_neighbors", + 3: "bgp_prefixes", + 4: "isis_lsps", + 5: "lldp_neighbors", + 6: "rsvp_lsps", + 7: "dhcpv4_interfaces", + 8: "dhcpv4_leases", + 9: "dhcpv6_interfaces", + 10: "dhcpv6_leases", + 11: "ospfv2_lsas", } StatesResponse_Choice_Enum_value = map[string]int32{ - "unspecified": 0, - "ipv4_neighbors": 1, - "ipv6_neighbors": 2, - "bgp_prefixes": 3, - "isis_lsps": 4, - "lldp_neighbors": 5, - "rsvp_lsps": 6, + "unspecified": 0, + "ipv4_neighbors": 1, + "ipv6_neighbors": 2, + "bgp_prefixes": 3, + "isis_lsps": 4, + "lldp_neighbors": 5, + "rsvp_lsps": 6, + "dhcpv4_interfaces": 7, + "dhcpv4_leases": 8, + "dhcpv6_interfaces": 9, + "dhcpv6_leases": 10, + "ospfv2_lsas": 11, } ) @@ -10065,11 +12069,11 @@ func (x StatesResponse_Choice_Enum) String() string { } func (StatesResponse_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[185].Descriptor() + return file_otg_proto_enumTypes[218].Descriptor() } func (StatesResponse_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[185] + return &file_otg_proto_enumTypes[218] } func (x StatesResponse_Choice_Enum) Number() protoreflect.EnumNumber { @@ -10078,7 +12082,7 @@ func (x StatesResponse_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use StatesResponse_Choice_Enum.Descriptor instead. func (StatesResponse_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{379, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{494, 0, 0} } type BgpPrefixStateRequest_PrefixFilters_Enum int32 @@ -10114,11 +12118,11 @@ func (x BgpPrefixStateRequest_PrefixFilters_Enum) String() string { } func (BgpPrefixStateRequest_PrefixFilters_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[186].Descriptor() + return file_otg_proto_enumTypes[219].Descriptor() } func (BgpPrefixStateRequest_PrefixFilters_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[186] + return &file_otg_proto_enumTypes[219] } func (x BgpPrefixStateRequest_PrefixFilters_Enum) Number() protoreflect.EnumNumber { @@ -10127,7 +12131,7 @@ func (x BgpPrefixStateRequest_PrefixFilters_Enum) Number() protoreflect.EnumNumb // Deprecated: Use BgpPrefixStateRequest_PrefixFilters_Enum.Descriptor instead. func (BgpPrefixStateRequest_PrefixFilters_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{384, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{499, 0, 0} } type BgpPrefixIpv4UnicastFilter_Origin_Enum int32 @@ -10166,11 +12170,11 @@ func (x BgpPrefixIpv4UnicastFilter_Origin_Enum) String() string { } func (BgpPrefixIpv4UnicastFilter_Origin_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[187].Descriptor() + return file_otg_proto_enumTypes[220].Descriptor() } func (BgpPrefixIpv4UnicastFilter_Origin_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[187] + return &file_otg_proto_enumTypes[220] } func (x BgpPrefixIpv4UnicastFilter_Origin_Enum) Number() protoreflect.EnumNumber { @@ -10179,7 +12183,7 @@ func (x BgpPrefixIpv4UnicastFilter_Origin_Enum) Number() protoreflect.EnumNumber // Deprecated: Use BgpPrefixIpv4UnicastFilter_Origin_Enum.Descriptor instead. func (BgpPrefixIpv4UnicastFilter_Origin_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{385, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{500, 0, 0} } type BgpPrefixIpv6UnicastFilter_Origin_Enum int32 @@ -10218,11 +12222,11 @@ func (x BgpPrefixIpv6UnicastFilter_Origin_Enum) String() string { } func (BgpPrefixIpv6UnicastFilter_Origin_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[188].Descriptor() + return file_otg_proto_enumTypes[221].Descriptor() } func (BgpPrefixIpv6UnicastFilter_Origin_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[188] + return &file_otg_proto_enumTypes[221] } func (x BgpPrefixIpv6UnicastFilter_Origin_Enum) Number() protoreflect.EnumNumber { @@ -10231,7 +12235,7 @@ func (x BgpPrefixIpv6UnicastFilter_Origin_Enum) Number() protoreflect.EnumNumber // Deprecated: Use BgpPrefixIpv6UnicastFilter_Origin_Enum.Descriptor instead. func (BgpPrefixIpv6UnicastFilter_Origin_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{386, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{501, 0, 0} } type BgpPrefixIpv4UnicastState_Origin_Enum int32 @@ -10270,11 +12274,11 @@ func (x BgpPrefixIpv4UnicastState_Origin_Enum) String() string { } func (BgpPrefixIpv4UnicastState_Origin_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[189].Descriptor() + return file_otg_proto_enumTypes[222].Descriptor() } func (BgpPrefixIpv4UnicastState_Origin_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[189] + return &file_otg_proto_enumTypes[222] } func (x BgpPrefixIpv4UnicastState_Origin_Enum) Number() protoreflect.EnumNumber { @@ -10283,7 +12287,7 @@ func (x BgpPrefixIpv4UnicastState_Origin_Enum) Number() protoreflect.EnumNumber // Deprecated: Use BgpPrefixIpv4UnicastState_Origin_Enum.Descriptor instead. func (BgpPrefixIpv4UnicastState_Origin_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{388, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{503, 0, 0} } type BgpPrefixIpv6UnicastState_Origin_Enum int32 @@ -10322,11 +12326,11 @@ func (x BgpPrefixIpv6UnicastState_Origin_Enum) String() string { } func (BgpPrefixIpv6UnicastState_Origin_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[190].Descriptor() + return file_otg_proto_enumTypes[223].Descriptor() } func (BgpPrefixIpv6UnicastState_Origin_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[190] + return &file_otg_proto_enumTypes[223] } func (x BgpPrefixIpv6UnicastState_Origin_Enum) Number() protoreflect.EnumNumber { @@ -10335,7 +12339,307 @@ func (x BgpPrefixIpv6UnicastState_Origin_Enum) Number() protoreflect.EnumNumber // Deprecated: Use BgpPrefixIpv6UnicastState_Origin_Enum.Descriptor instead. func (BgpPrefixIpv6UnicastState_Origin_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{389, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{504, 0, 0} +} + +type ResultExtendedCommunityStructured_Choice_Enum int32 + +const ( + ResultExtendedCommunityStructured_Choice_unspecified ResultExtendedCommunityStructured_Choice_Enum = 0 + ResultExtendedCommunityStructured_Choice_transitive_2octet_as_type ResultExtendedCommunityStructured_Choice_Enum = 1 + ResultExtendedCommunityStructured_Choice_transitive_ipv4_address_type ResultExtendedCommunityStructured_Choice_Enum = 2 + ResultExtendedCommunityStructured_Choice_transitive_4octet_as_type ResultExtendedCommunityStructured_Choice_Enum = 3 + ResultExtendedCommunityStructured_Choice_transitive_opaque_type ResultExtendedCommunityStructured_Choice_Enum = 4 + ResultExtendedCommunityStructured_Choice_non_transitive_2octet_as_type ResultExtendedCommunityStructured_Choice_Enum = 5 +) + +// Enum value maps for ResultExtendedCommunityStructured_Choice_Enum. +var ( + ResultExtendedCommunityStructured_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "transitive_2octet_as_type", + 2: "transitive_ipv4_address_type", + 3: "transitive_4octet_as_type", + 4: "transitive_opaque_type", + 5: "non_transitive_2octet_as_type", + } + ResultExtendedCommunityStructured_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "transitive_2octet_as_type": 1, + "transitive_ipv4_address_type": 2, + "transitive_4octet_as_type": 3, + "transitive_opaque_type": 4, + "non_transitive_2octet_as_type": 5, + } +) + +func (x ResultExtendedCommunityStructured_Choice_Enum) Enum() *ResultExtendedCommunityStructured_Choice_Enum { + p := new(ResultExtendedCommunityStructured_Choice_Enum) + *p = x + return p +} + +func (x ResultExtendedCommunityStructured_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResultExtendedCommunityStructured_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[224].Descriptor() +} + +func (ResultExtendedCommunityStructured_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[224] +} + +func (x ResultExtendedCommunityStructured_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResultExtendedCommunityStructured_Choice_Enum.Descriptor instead. +func (ResultExtendedCommunityStructured_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{506, 0, 0} +} + +type ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum int32 + +const ( + ResultExtendedCommunityTransitive2OctetAsType_Choice_unspecified ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum = 0 + ResultExtendedCommunityTransitive2OctetAsType_Choice_route_target_subtype ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum = 1 + ResultExtendedCommunityTransitive2OctetAsType_Choice_route_origin_subtype ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum = 2 +) + +// Enum value maps for ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum. +var ( + ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "route_target_subtype", + 2: "route_origin_subtype", + } + ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "route_target_subtype": 1, + "route_origin_subtype": 2, + } +) + +func (x ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum) Enum() *ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum { + p := new(ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum) + *p = x + return p +} + +func (x ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[225].Descriptor() +} + +func (ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[225] +} + +func (x ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum.Descriptor instead. +func (ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{509, 0, 0} +} + +type ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum int32 + +const ( + ResultExtendedCommunityTransitiveIpv4AddressType_Choice_unspecified ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum = 0 + ResultExtendedCommunityTransitiveIpv4AddressType_Choice_route_target_subtype ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum = 1 + ResultExtendedCommunityTransitiveIpv4AddressType_Choice_route_origin_subtype ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum = 2 +) + +// Enum value maps for ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum. +var ( + ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "route_target_subtype", + 2: "route_origin_subtype", + } + ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "route_target_subtype": 1, + "route_origin_subtype": 2, + } +) + +func (x ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum) Enum() *ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum { + p := new(ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum) + *p = x + return p +} + +func (x ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[226].Descriptor() +} + +func (ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[226] +} + +func (x ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum.Descriptor instead. +func (ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{512, 0, 0} +} + +type ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum int32 + +const ( + ResultExtendedCommunityTransitive4OctetAsType_Choice_unspecified ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum = 0 + ResultExtendedCommunityTransitive4OctetAsType_Choice_route_target_subtype ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum = 1 + ResultExtendedCommunityTransitive4OctetAsType_Choice_route_origin_subtype ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum = 2 +) + +// Enum value maps for ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum. +var ( + ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "route_target_subtype", + 2: "route_origin_subtype", + } + ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "route_target_subtype": 1, + "route_origin_subtype": 2, + } +) + +func (x ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum) Enum() *ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum { + p := new(ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum) + *p = x + return p +} + +func (x ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[227].Descriptor() +} + +func (ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[227] +} + +func (x ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum.Descriptor instead. +func (ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{515, 0, 0} +} + +type ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum int32 + +const ( + ResultExtendedCommunityTransitiveOpaqueType_Choice_unspecified ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum = 0 + ResultExtendedCommunityTransitiveOpaqueType_Choice_color_subtype ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum = 1 + ResultExtendedCommunityTransitiveOpaqueType_Choice_encapsulation_subtype ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum = 2 +) + +// Enum value maps for ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum. +var ( + ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "color_subtype", + 2: "encapsulation_subtype", + } + ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "color_subtype": 1, + "encapsulation_subtype": 2, + } +) + +func (x ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum) Enum() *ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum { + p := new(ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum) + *p = x + return p +} + +func (x ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[228].Descriptor() +} + +func (ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[228] +} + +func (x ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum.Descriptor instead. +func (ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{518, 0, 0} +} + +type ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum int32 + +const ( + ResultExtendedCommunityNonTransitive2OctetAsType_Choice_unspecified ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum = 0 + ResultExtendedCommunityNonTransitive2OctetAsType_Choice_link_bandwidth_subtype ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum = 1 +) + +// Enum value maps for ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum. +var ( + ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "link_bandwidth_subtype", + } + ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "link_bandwidth_subtype": 1, + } +) + +func (x ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum) Enum() *ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum { + p := new(ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum) + *p = x + return p +} + +func (x ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[229].Descriptor() +} + +func (ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[229] +} + +func (x ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum.Descriptor instead. +func (ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{520, 0, 0} } type ResultBgpCommunity_Type_Enum int32 @@ -10383,11 +12687,11 @@ func (x ResultBgpCommunity_Type_Enum) String() string { } func (ResultBgpCommunity_Type_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[191].Descriptor() + return file_otg_proto_enumTypes[230].Descriptor() } func (ResultBgpCommunity_Type_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[191] + return &file_otg_proto_enumTypes[230] } func (x ResultBgpCommunity_Type_Enum) Number() protoreflect.EnumNumber { @@ -10396,7 +12700,7 @@ func (x ResultBgpCommunity_Type_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use ResultBgpCommunity_Type_Enum.Descriptor instead. func (ResultBgpCommunity_Type_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{390, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{521, 0, 0} } type ResultBgpAsPathSegment_Type_Enum int32 @@ -10438,11 +12742,11 @@ func (x ResultBgpAsPathSegment_Type_Enum) String() string { } func (ResultBgpAsPathSegment_Type_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[192].Descriptor() + return file_otg_proto_enumTypes[231].Descriptor() } func (ResultBgpAsPathSegment_Type_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[192] + return &file_otg_proto_enumTypes[231] } func (x ResultBgpAsPathSegment_Type_Enum) Number() protoreflect.EnumNumber { @@ -10451,7 +12755,7 @@ func (x ResultBgpAsPathSegment_Type_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use ResultBgpAsPathSegment_Type_Enum.Descriptor instead. func (ResultBgpAsPathSegment_Type_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{392, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{523, 0, 0} } type IsisLspState_PduType_Enum int32 @@ -10487,11 +12791,11 @@ func (x IsisLspState_PduType_Enum) String() string { } func (IsisLspState_PduType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[193].Descriptor() + return file_otg_proto_enumTypes[232].Descriptor() } func (IsisLspState_PduType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[193] + return &file_otg_proto_enumTypes[232] } func (x IsisLspState_PduType_Enum) Number() protoreflect.EnumNumber { @@ -10500,7 +12804,7 @@ func (x IsisLspState_PduType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use IsisLspState_PduType_Enum.Descriptor instead. func (IsisLspState_PduType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{395, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{526, 0, 0} } type IsisLspV4Prefix_RedistributionType_Enum int32 @@ -10536,11 +12840,11 @@ func (x IsisLspV4Prefix_RedistributionType_Enum) String() string { } func (IsisLspV4Prefix_RedistributionType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[194].Descriptor() + return file_otg_proto_enumTypes[233].Descriptor() } func (IsisLspV4Prefix_RedistributionType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[194] + return &file_otg_proto_enumTypes[233] } func (x IsisLspV4Prefix_RedistributionType_Enum) Number() protoreflect.EnumNumber { @@ -10549,7 +12853,7 @@ func (x IsisLspV4Prefix_RedistributionType_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use IsisLspV4Prefix_RedistributionType_Enum.Descriptor instead. func (IsisLspV4Prefix_RedistributionType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{404, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{535, 0, 0} } type IsisLspV4Prefix_OriginType_Enum int32 @@ -10585,11 +12889,11 @@ func (x IsisLspV4Prefix_OriginType_Enum) String() string { } func (IsisLspV4Prefix_OriginType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[195].Descriptor() + return file_otg_proto_enumTypes[234].Descriptor() } func (IsisLspV4Prefix_OriginType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[195] + return &file_otg_proto_enumTypes[234] } func (x IsisLspV4Prefix_OriginType_Enum) Number() protoreflect.EnumNumber { @@ -10598,7 +12902,7 @@ func (x IsisLspV4Prefix_OriginType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use IsisLspV4Prefix_OriginType_Enum.Descriptor instead. func (IsisLspV4Prefix_OriginType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{404, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{535, 1, 0} } type IsisLspExtendedV4Prefix_RedistributionType_Enum int32 @@ -10634,11 +12938,11 @@ func (x IsisLspExtendedV4Prefix_RedistributionType_Enum) String() string { } func (IsisLspExtendedV4Prefix_RedistributionType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[196].Descriptor() + return file_otg_proto_enumTypes[235].Descriptor() } func (IsisLspExtendedV4Prefix_RedistributionType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[196] + return &file_otg_proto_enumTypes[235] } func (x IsisLspExtendedV4Prefix_RedistributionType_Enum) Number() protoreflect.EnumNumber { @@ -10647,7 +12951,7 @@ func (x IsisLspExtendedV4Prefix_RedistributionType_Enum) Number() protoreflect.E // Deprecated: Use IsisLspExtendedV4Prefix_RedistributionType_Enum.Descriptor instead. func (IsisLspExtendedV4Prefix_RedistributionType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{406, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{537, 0, 0} } type IsisLspV6Prefix_RedistributionType_Enum int32 @@ -10683,11 +12987,11 @@ func (x IsisLspV6Prefix_RedistributionType_Enum) String() string { } func (IsisLspV6Prefix_RedistributionType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[197].Descriptor() + return file_otg_proto_enumTypes[236].Descriptor() } func (IsisLspV6Prefix_RedistributionType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[197] + return &file_otg_proto_enumTypes[236] } func (x IsisLspV6Prefix_RedistributionType_Enum) Number() protoreflect.EnumNumber { @@ -10696,7 +13000,7 @@ func (x IsisLspV6Prefix_RedistributionType_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use IsisLspV6Prefix_RedistributionType_Enum.Descriptor instead. func (IsisLspV6Prefix_RedistributionType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{408, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{539, 0, 0} } type IsisLspV6Prefix_OriginType_Enum int32 @@ -10732,11 +13036,11 @@ func (x IsisLspV6Prefix_OriginType_Enum) String() string { } func (IsisLspV6Prefix_OriginType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[198].Descriptor() + return file_otg_proto_enumTypes[237].Descriptor() } func (IsisLspV6Prefix_OriginType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[198] + return &file_otg_proto_enumTypes[237] } func (x IsisLspV6Prefix_OriginType_Enum) Number() protoreflect.EnumNumber { @@ -10745,7 +13049,7 @@ func (x IsisLspV6Prefix_OriginType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use IsisLspV6Prefix_OriginType_Enum.Descriptor instead. func (IsisLspV6Prefix_OriginType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{408, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{539, 1, 0} } type LldpNeighborsState_ChassisIdType_Enum int32 @@ -10796,11 +13100,11 @@ func (x LldpNeighborsState_ChassisIdType_Enum) String() string { } func (LldpNeighborsState_ChassisIdType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[199].Descriptor() + return file_otg_proto_enumTypes[238].Descriptor() } func (LldpNeighborsState_ChassisIdType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[199] + return &file_otg_proto_enumTypes[238] } func (x LldpNeighborsState_ChassisIdType_Enum) Number() protoreflect.EnumNumber { @@ -10809,7 +13113,7 @@ func (x LldpNeighborsState_ChassisIdType_Enum) Number() protoreflect.EnumNumber // Deprecated: Use LldpNeighborsState_ChassisIdType_Enum.Descriptor instead. func (LldpNeighborsState_ChassisIdType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{411, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{542, 0, 0} } type LldpNeighborsState_PortIdType_Enum int32 @@ -10860,11 +13164,11 @@ func (x LldpNeighborsState_PortIdType_Enum) String() string { } func (LldpNeighborsState_PortIdType_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[200].Descriptor() + return file_otg_proto_enumTypes[239].Descriptor() } func (LldpNeighborsState_PortIdType_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[200] + return &file_otg_proto_enumTypes[239] } func (x LldpNeighborsState_PortIdType_Enum) Number() protoreflect.EnumNumber { @@ -10873,7 +13177,7 @@ func (x LldpNeighborsState_PortIdType_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use LldpNeighborsState_PortIdType_Enum.Descriptor instead. func (LldpNeighborsState_PortIdType_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{411, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{542, 1, 0} } type LldpCapabilityState_CapabilityName_Enum int32 @@ -10936,11 +13240,11 @@ func (x LldpCapabilityState_CapabilityName_Enum) String() string { } func (LldpCapabilityState_CapabilityName_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[201].Descriptor() + return file_otg_proto_enumTypes[240].Descriptor() } func (LldpCapabilityState_CapabilityName_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[201] + return &file_otg_proto_enumTypes[240] } func (x LldpCapabilityState_CapabilityName_Enum) Number() protoreflect.EnumNumber { @@ -10949,7 +13253,7 @@ func (x LldpCapabilityState_CapabilityName_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use LldpCapabilityState_CapabilityName_Enum.Descriptor instead. func (LldpCapabilityState_CapabilityName_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{413, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{544, 0, 0} } type RsvpLspState_SessionStatus_Enum int32 @@ -10985,11 +13289,11 @@ func (x RsvpLspState_SessionStatus_Enum) String() string { } func (RsvpLspState_SessionStatus_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[202].Descriptor() + return file_otg_proto_enumTypes[241].Descriptor() } func (RsvpLspState_SessionStatus_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[202] + return &file_otg_proto_enumTypes[241] } func (x RsvpLspState_SessionStatus_Enum) Number() protoreflect.EnumNumber { @@ -10998,7 +13302,7 @@ func (x RsvpLspState_SessionStatus_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use RsvpLspState_SessionStatus_Enum.Descriptor instead. func (RsvpLspState_SessionStatus_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{417, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{548, 0, 0} } type RsvpLspState_LastFlapReason_Enum int32 @@ -11037,11 +13341,11 @@ func (x RsvpLspState_LastFlapReason_Enum) String() string { } func (RsvpLspState_LastFlapReason_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[203].Descriptor() + return file_otg_proto_enumTypes[242].Descriptor() } func (RsvpLspState_LastFlapReason_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[203] + return &file_otg_proto_enumTypes[242] } func (x RsvpLspState_LastFlapReason_Enum) Number() protoreflect.EnumNumber { @@ -11050,7 +13354,7 @@ func (x RsvpLspState_LastFlapReason_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use RsvpLspState_LastFlapReason_Enum.Descriptor instead. func (RsvpLspState_LastFlapReason_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{417, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{548, 1, 0} } type RsvpLspIpv4Ero_Type_Enum int32 @@ -11098,11 +13402,11 @@ func (x RsvpLspIpv4Ero_Type_Enum) String() string { } func (RsvpLspIpv4Ero_Type_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[204].Descriptor() + return file_otg_proto_enumTypes[243].Descriptor() } func (RsvpLspIpv4Ero_Type_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[204] + return &file_otg_proto_enumTypes[243] } func (x RsvpLspIpv4Ero_Type_Enum) Number() protoreflect.EnumNumber { @@ -11111,7 +13415,114 @@ func (x RsvpLspIpv4Ero_Type_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use RsvpLspIpv4Ero_Type_Enum.Descriptor instead. func (RsvpLspIpv4Ero_Type_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{419, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{550, 0, 0} +} + +type Ospfv2OpaqueLsa_Type_Enum int32 + +const ( + Ospfv2OpaqueLsa_Type_unspecified Ospfv2OpaqueLsa_Type_Enum = 0 + Ospfv2OpaqueLsa_Type_local Ospfv2OpaqueLsa_Type_Enum = 1 + Ospfv2OpaqueLsa_Type_area Ospfv2OpaqueLsa_Type_Enum = 2 + Ospfv2OpaqueLsa_Type_domain Ospfv2OpaqueLsa_Type_Enum = 3 +) + +// Enum value maps for Ospfv2OpaqueLsa_Type_Enum. +var ( + Ospfv2OpaqueLsa_Type_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "local", + 2: "area", + 3: "domain", + } + Ospfv2OpaqueLsa_Type_Enum_value = map[string]int32{ + "unspecified": 0, + "local": 1, + "area": 2, + "domain": 3, + } +) + +func (x Ospfv2OpaqueLsa_Type_Enum) Enum() *Ospfv2OpaqueLsa_Type_Enum { + p := new(Ospfv2OpaqueLsa_Type_Enum) + *p = x + return p +} + +func (x Ospfv2OpaqueLsa_Type_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Ospfv2OpaqueLsa_Type_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[244].Descriptor() +} + +func (Ospfv2OpaqueLsa_Type_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[244] +} + +func (x Ospfv2OpaqueLsa_Type_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Ospfv2OpaqueLsa_Type_Enum.Descriptor instead. +func (Ospfv2OpaqueLsa_Type_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{571, 0, 0} +} + +type Ospfv2Link_Type_Enum int32 + +const ( + Ospfv2Link_Type_unspecified Ospfv2Link_Type_Enum = 0 + Ospfv2Link_Type_point_to_point Ospfv2Link_Type_Enum = 1 + Ospfv2Link_Type_transit Ospfv2Link_Type_Enum = 2 + Ospfv2Link_Type_stub Ospfv2Link_Type_Enum = 3 + Ospfv2Link_Type_virtual Ospfv2Link_Type_Enum = 4 +) + +// Enum value maps for Ospfv2Link_Type_Enum. +var ( + Ospfv2Link_Type_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "point_to_point", + 2: "transit", + 3: "stub", + 4: "virtual", + } + Ospfv2Link_Type_Enum_value = map[string]int32{ + "unspecified": 0, + "point_to_point": 1, + "transit": 2, + "stub": 3, + "virtual": 4, + } +) + +func (x Ospfv2Link_Type_Enum) Enum() *Ospfv2Link_Type_Enum { + p := new(Ospfv2Link_Type_Enum) + *p = x + return p +} + +func (x Ospfv2Link_Type_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Ospfv2Link_Type_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[245].Descriptor() +} + +func (Ospfv2Link_Type_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[245] +} + +func (x Ospfv2Link_Type_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Ospfv2Link_Type_Enum.Descriptor instead. +func (Ospfv2Link_Type_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{573, 0, 0} } type PatternFlowEthernetDst_Choice_Enum int32 @@ -11156,11 +13567,11 @@ func (x PatternFlowEthernetDst_Choice_Enum) String() string { } func (PatternFlowEthernetDst_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[205].Descriptor() + return file_otg_proto_enumTypes[246].Descriptor() } func (PatternFlowEthernetDst_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[205] + return &file_otg_proto_enumTypes[246] } func (x PatternFlowEthernetDst_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11169,7 +13580,7 @@ func (x PatternFlowEthernetDst_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowEthernetDst_Choice_Enum.Descriptor instead. func (PatternFlowEthernetDst_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{423, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{577, 0, 0} } type PatternFlowEthernetSrc_Choice_Enum int32 @@ -11211,11 +13622,11 @@ func (x PatternFlowEthernetSrc_Choice_Enum) String() string { } func (PatternFlowEthernetSrc_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[206].Descriptor() + return file_otg_proto_enumTypes[247].Descriptor() } func (PatternFlowEthernetSrc_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[206] + return &file_otg_proto_enumTypes[247] } func (x PatternFlowEthernetSrc_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11224,7 +13635,7 @@ func (x PatternFlowEthernetSrc_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowEthernetSrc_Choice_Enum.Descriptor instead. func (PatternFlowEthernetSrc_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{426, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{580, 0, 0} } type PatternFlowEthernetEtherType_Choice_Enum int32 @@ -11269,11 +13680,11 @@ func (x PatternFlowEthernetEtherType_Choice_Enum) String() string { } func (PatternFlowEthernetEtherType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[207].Descriptor() + return file_otg_proto_enumTypes[248].Descriptor() } func (PatternFlowEthernetEtherType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[207] + return &file_otg_proto_enumTypes[248] } func (x PatternFlowEthernetEtherType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11282,7 +13693,7 @@ func (x PatternFlowEthernetEtherType_Choice_Enum) Number() protoreflect.EnumNumb // Deprecated: Use PatternFlowEthernetEtherType_Choice_Enum.Descriptor instead. func (PatternFlowEthernetEtherType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{429, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{583, 0, 0} } type PatternFlowEthernetPfcQueue_Choice_Enum int32 @@ -11324,11 +13735,11 @@ func (x PatternFlowEthernetPfcQueue_Choice_Enum) String() string { } func (PatternFlowEthernetPfcQueue_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[208].Descriptor() + return file_otg_proto_enumTypes[249].Descriptor() } func (PatternFlowEthernetPfcQueue_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[208] + return &file_otg_proto_enumTypes[249] } func (x PatternFlowEthernetPfcQueue_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11337,7 +13748,7 @@ func (x PatternFlowEthernetPfcQueue_Choice_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use PatternFlowEthernetPfcQueue_Choice_Enum.Descriptor instead. func (PatternFlowEthernetPfcQueue_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{432, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{586, 0, 0} } type PatternFlowVlanPriority_Choice_Enum int32 @@ -11379,11 +13790,11 @@ func (x PatternFlowVlanPriority_Choice_Enum) String() string { } func (PatternFlowVlanPriority_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[209].Descriptor() + return file_otg_proto_enumTypes[250].Descriptor() } func (PatternFlowVlanPriority_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[209] + return &file_otg_proto_enumTypes[250] } func (x PatternFlowVlanPriority_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11392,7 +13803,7 @@ func (x PatternFlowVlanPriority_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowVlanPriority_Choice_Enum.Descriptor instead. func (PatternFlowVlanPriority_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{435, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{589, 0, 0} } type PatternFlowVlanCfi_Choice_Enum int32 @@ -11434,11 +13845,11 @@ func (x PatternFlowVlanCfi_Choice_Enum) String() string { } func (PatternFlowVlanCfi_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[210].Descriptor() + return file_otg_proto_enumTypes[251].Descriptor() } func (PatternFlowVlanCfi_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[210] + return &file_otg_proto_enumTypes[251] } func (x PatternFlowVlanCfi_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11447,7 +13858,7 @@ func (x PatternFlowVlanCfi_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowVlanCfi_Choice_Enum.Descriptor instead. func (PatternFlowVlanCfi_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{438, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{592, 0, 0} } type PatternFlowVlanId_Choice_Enum int32 @@ -11489,11 +13900,11 @@ func (x PatternFlowVlanId_Choice_Enum) String() string { } func (PatternFlowVlanId_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[211].Descriptor() + return file_otg_proto_enumTypes[252].Descriptor() } func (PatternFlowVlanId_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[211] + return &file_otg_proto_enumTypes[252] } func (x PatternFlowVlanId_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11502,7 +13913,7 @@ func (x PatternFlowVlanId_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowVlanId_Choice_Enum.Descriptor instead. func (PatternFlowVlanId_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{441, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{595, 0, 0} } type PatternFlowVlanTpid_Choice_Enum int32 @@ -11544,11 +13955,11 @@ func (x PatternFlowVlanTpid_Choice_Enum) String() string { } func (PatternFlowVlanTpid_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[212].Descriptor() + return file_otg_proto_enumTypes[253].Descriptor() } func (PatternFlowVlanTpid_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[212] + return &file_otg_proto_enumTypes[253] } func (x PatternFlowVlanTpid_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11557,7 +13968,7 @@ func (x PatternFlowVlanTpid_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowVlanTpid_Choice_Enum.Descriptor instead. func (PatternFlowVlanTpid_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{444, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{598, 0, 0} } type PatternFlowVxlanFlags_Choice_Enum int32 @@ -11599,11 +14010,11 @@ func (x PatternFlowVxlanFlags_Choice_Enum) String() string { } func (PatternFlowVxlanFlags_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[213].Descriptor() + return file_otg_proto_enumTypes[254].Descriptor() } func (PatternFlowVxlanFlags_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[213] + return &file_otg_proto_enumTypes[254] } func (x PatternFlowVxlanFlags_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11612,7 +14023,7 @@ func (x PatternFlowVxlanFlags_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowVxlanFlags_Choice_Enum.Descriptor instead. func (PatternFlowVxlanFlags_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{447, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{601, 0, 0} } type PatternFlowVxlanReserved0_Choice_Enum int32 @@ -11654,11 +14065,11 @@ func (x PatternFlowVxlanReserved0_Choice_Enum) String() string { } func (PatternFlowVxlanReserved0_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[214].Descriptor() + return file_otg_proto_enumTypes[255].Descriptor() } func (PatternFlowVxlanReserved0_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[214] + return &file_otg_proto_enumTypes[255] } func (x PatternFlowVxlanReserved0_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11667,7 +14078,7 @@ func (x PatternFlowVxlanReserved0_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowVxlanReserved0_Choice_Enum.Descriptor instead. func (PatternFlowVxlanReserved0_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{450, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{604, 0, 0} } type PatternFlowVxlanVni_Choice_Enum int32 @@ -11712,11 +14123,11 @@ func (x PatternFlowVxlanVni_Choice_Enum) String() string { } func (PatternFlowVxlanVni_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[215].Descriptor() + return file_otg_proto_enumTypes[256].Descriptor() } func (PatternFlowVxlanVni_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[215] + return &file_otg_proto_enumTypes[256] } func (x PatternFlowVxlanVni_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11725,7 +14136,7 @@ func (x PatternFlowVxlanVni_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowVxlanVni_Choice_Enum.Descriptor instead. func (PatternFlowVxlanVni_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{453, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{607, 0, 0} } type PatternFlowVxlanReserved1_Choice_Enum int32 @@ -11767,11 +14178,11 @@ func (x PatternFlowVxlanReserved1_Choice_Enum) String() string { } func (PatternFlowVxlanReserved1_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[216].Descriptor() + return file_otg_proto_enumTypes[257].Descriptor() } func (PatternFlowVxlanReserved1_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[216] + return &file_otg_proto_enumTypes[257] } func (x PatternFlowVxlanReserved1_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11780,7 +14191,7 @@ func (x PatternFlowVxlanReserved1_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowVxlanReserved1_Choice_Enum.Descriptor instead. func (PatternFlowVxlanReserved1_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{456, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{610, 0, 0} } type PatternFlowIpv4Version_Choice_Enum int32 @@ -11822,11 +14233,11 @@ func (x PatternFlowIpv4Version_Choice_Enum) String() string { } func (PatternFlowIpv4Version_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[217].Descriptor() + return file_otg_proto_enumTypes[258].Descriptor() } func (PatternFlowIpv4Version_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[217] + return &file_otg_proto_enumTypes[258] } func (x PatternFlowIpv4Version_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11835,7 +14246,7 @@ func (x PatternFlowIpv4Version_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIpv4Version_Choice_Enum.Descriptor instead. func (PatternFlowIpv4Version_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{459, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{613, 0, 0} } type PatternFlowIpv4HeaderLength_Choice_Enum int32 @@ -11880,11 +14291,11 @@ func (x PatternFlowIpv4HeaderLength_Choice_Enum) String() string { } func (PatternFlowIpv4HeaderLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[218].Descriptor() + return file_otg_proto_enumTypes[259].Descriptor() } func (PatternFlowIpv4HeaderLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[218] + return &file_otg_proto_enumTypes[259] } func (x PatternFlowIpv4HeaderLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11893,7 +14304,7 @@ func (x PatternFlowIpv4HeaderLength_Choice_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use PatternFlowIpv4HeaderLength_Choice_Enum.Descriptor instead. func (PatternFlowIpv4HeaderLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{462, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{616, 0, 0} } type PatternFlowIpv4TotalLength_Choice_Enum int32 @@ -11938,11 +14349,11 @@ func (x PatternFlowIpv4TotalLength_Choice_Enum) String() string { } func (PatternFlowIpv4TotalLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[219].Descriptor() + return file_otg_proto_enumTypes[260].Descriptor() } func (PatternFlowIpv4TotalLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[219] + return &file_otg_proto_enumTypes[260] } func (x PatternFlowIpv4TotalLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -11951,7 +14362,7 @@ func (x PatternFlowIpv4TotalLength_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowIpv4TotalLength_Choice_Enum.Descriptor instead. func (PatternFlowIpv4TotalLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{465, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{619, 0, 0} } type PatternFlowIpv4Identification_Choice_Enum int32 @@ -11993,11 +14404,11 @@ func (x PatternFlowIpv4Identification_Choice_Enum) String() string { } func (PatternFlowIpv4Identification_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[220].Descriptor() + return file_otg_proto_enumTypes[261].Descriptor() } func (PatternFlowIpv4Identification_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[220] + return &file_otg_proto_enumTypes[261] } func (x PatternFlowIpv4Identification_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12006,7 +14417,7 @@ func (x PatternFlowIpv4Identification_Choice_Enum) Number() protoreflect.EnumNum // Deprecated: Use PatternFlowIpv4Identification_Choice_Enum.Descriptor instead. func (PatternFlowIpv4Identification_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{468, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{622, 0, 0} } type PatternFlowIpv4Reserved_Choice_Enum int32 @@ -12048,11 +14459,11 @@ func (x PatternFlowIpv4Reserved_Choice_Enum) String() string { } func (PatternFlowIpv4Reserved_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[221].Descriptor() + return file_otg_proto_enumTypes[262].Descriptor() } func (PatternFlowIpv4Reserved_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[221] + return &file_otg_proto_enumTypes[262] } func (x PatternFlowIpv4Reserved_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12061,7 +14472,7 @@ func (x PatternFlowIpv4Reserved_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIpv4Reserved_Choice_Enum.Descriptor instead. func (PatternFlowIpv4Reserved_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{471, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{625, 0, 0} } type PatternFlowIpv4DontFragment_Choice_Enum int32 @@ -12103,11 +14514,11 @@ func (x PatternFlowIpv4DontFragment_Choice_Enum) String() string { } func (PatternFlowIpv4DontFragment_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[222].Descriptor() + return file_otg_proto_enumTypes[263].Descriptor() } func (PatternFlowIpv4DontFragment_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[222] + return &file_otg_proto_enumTypes[263] } func (x PatternFlowIpv4DontFragment_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12116,7 +14527,7 @@ func (x PatternFlowIpv4DontFragment_Choice_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use PatternFlowIpv4DontFragment_Choice_Enum.Descriptor instead. func (PatternFlowIpv4DontFragment_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{474, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{628, 0, 0} } type PatternFlowIpv4MoreFragments_Choice_Enum int32 @@ -12158,11 +14569,11 @@ func (x PatternFlowIpv4MoreFragments_Choice_Enum) String() string { } func (PatternFlowIpv4MoreFragments_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[223].Descriptor() + return file_otg_proto_enumTypes[264].Descriptor() } func (PatternFlowIpv4MoreFragments_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[223] + return &file_otg_proto_enumTypes[264] } func (x PatternFlowIpv4MoreFragments_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12171,7 +14582,7 @@ func (x PatternFlowIpv4MoreFragments_Choice_Enum) Number() protoreflect.EnumNumb // Deprecated: Use PatternFlowIpv4MoreFragments_Choice_Enum.Descriptor instead. func (PatternFlowIpv4MoreFragments_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{477, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{631, 0, 0} } type PatternFlowIpv4FragmentOffset_Choice_Enum int32 @@ -12213,11 +14624,11 @@ func (x PatternFlowIpv4FragmentOffset_Choice_Enum) String() string { } func (PatternFlowIpv4FragmentOffset_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[224].Descriptor() + return file_otg_proto_enumTypes[265].Descriptor() } func (PatternFlowIpv4FragmentOffset_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[224] + return &file_otg_proto_enumTypes[265] } func (x PatternFlowIpv4FragmentOffset_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12226,7 +14637,7 @@ func (x PatternFlowIpv4FragmentOffset_Choice_Enum) Number() protoreflect.EnumNum // Deprecated: Use PatternFlowIpv4FragmentOffset_Choice_Enum.Descriptor instead. func (PatternFlowIpv4FragmentOffset_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{480, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{634, 0, 0} } type PatternFlowIpv4TimeToLive_Choice_Enum int32 @@ -12268,11 +14679,11 @@ func (x PatternFlowIpv4TimeToLive_Choice_Enum) String() string { } func (PatternFlowIpv4TimeToLive_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[225].Descriptor() + return file_otg_proto_enumTypes[266].Descriptor() } func (PatternFlowIpv4TimeToLive_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[225] + return &file_otg_proto_enumTypes[266] } func (x PatternFlowIpv4TimeToLive_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12281,7 +14692,7 @@ func (x PatternFlowIpv4TimeToLive_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowIpv4TimeToLive_Choice_Enum.Descriptor instead. func (PatternFlowIpv4TimeToLive_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{483, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{637, 0, 0} } type PatternFlowIpv4Protocol_Choice_Enum int32 @@ -12326,11 +14737,11 @@ func (x PatternFlowIpv4Protocol_Choice_Enum) String() string { } func (PatternFlowIpv4Protocol_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[226].Descriptor() + return file_otg_proto_enumTypes[267].Descriptor() } func (PatternFlowIpv4Protocol_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[226] + return &file_otg_proto_enumTypes[267] } func (x PatternFlowIpv4Protocol_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12339,7 +14750,7 @@ func (x PatternFlowIpv4Protocol_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIpv4Protocol_Choice_Enum.Descriptor instead. func (PatternFlowIpv4Protocol_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{486, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{640, 0, 0} } type PatternFlowIpv4HeaderChecksum_Choice_Enum int32 @@ -12375,11 +14786,11 @@ func (x PatternFlowIpv4HeaderChecksum_Choice_Enum) String() string { } func (PatternFlowIpv4HeaderChecksum_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[227].Descriptor() + return file_otg_proto_enumTypes[268].Descriptor() } func (PatternFlowIpv4HeaderChecksum_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[227] + return &file_otg_proto_enumTypes[268] } func (x PatternFlowIpv4HeaderChecksum_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12388,7 +14799,7 @@ func (x PatternFlowIpv4HeaderChecksum_Choice_Enum) Number() protoreflect.EnumNum // Deprecated: Use PatternFlowIpv4HeaderChecksum_Choice_Enum.Descriptor instead. func (PatternFlowIpv4HeaderChecksum_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{487, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{641, 0, 0} } type PatternFlowIpv4HeaderChecksum_Generated_Enum int32 @@ -12424,11 +14835,11 @@ func (x PatternFlowIpv4HeaderChecksum_Generated_Enum) String() string { } func (PatternFlowIpv4HeaderChecksum_Generated_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[228].Descriptor() + return file_otg_proto_enumTypes[269].Descriptor() } func (PatternFlowIpv4HeaderChecksum_Generated_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[228] + return &file_otg_proto_enumTypes[269] } func (x PatternFlowIpv4HeaderChecksum_Generated_Enum) Number() protoreflect.EnumNumber { @@ -12437,7 +14848,7 @@ func (x PatternFlowIpv4HeaderChecksum_Generated_Enum) Number() protoreflect.Enum // Deprecated: Use PatternFlowIpv4HeaderChecksum_Generated_Enum.Descriptor instead. func (PatternFlowIpv4HeaderChecksum_Generated_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{487, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{641, 1, 0} } type PatternFlowIpv4Src_Choice_Enum int32 @@ -12448,6 +14859,8 @@ const ( PatternFlowIpv4Src_Choice_values PatternFlowIpv4Src_Choice_Enum = 3 PatternFlowIpv4Src_Choice_increment PatternFlowIpv4Src_Choice_Enum = 4 PatternFlowIpv4Src_Choice_decrement PatternFlowIpv4Src_Choice_Enum = 5 + PatternFlowIpv4Src_Choice_auto PatternFlowIpv4Src_Choice_Enum = 1 + PatternFlowIpv4Src_Choice_random PatternFlowIpv4Src_Choice_Enum = 6 ) // Enum value maps for PatternFlowIpv4Src_Choice_Enum. @@ -12458,6 +14871,8 @@ var ( 3: "values", 4: "increment", 5: "decrement", + 1: "auto", + 6: "random", } PatternFlowIpv4Src_Choice_Enum_value = map[string]int32{ "unspecified": 0, @@ -12465,6 +14880,8 @@ var ( "values": 3, "increment": 4, "decrement": 5, + "auto": 1, + "random": 6, } ) @@ -12479,11 +14896,11 @@ func (x PatternFlowIpv4Src_Choice_Enum) String() string { } func (PatternFlowIpv4Src_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[229].Descriptor() + return file_otg_proto_enumTypes[270].Descriptor() } func (PatternFlowIpv4Src_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[229] + return &file_otg_proto_enumTypes[270] } func (x PatternFlowIpv4Src_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12492,7 +14909,7 @@ func (x PatternFlowIpv4Src_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIpv4Src_Choice_Enum.Descriptor instead. func (PatternFlowIpv4Src_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{490, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{645, 0, 0} } type PatternFlowIpv4Dst_Choice_Enum int32 @@ -12503,6 +14920,8 @@ const ( PatternFlowIpv4Dst_Choice_values PatternFlowIpv4Dst_Choice_Enum = 3 PatternFlowIpv4Dst_Choice_increment PatternFlowIpv4Dst_Choice_Enum = 4 PatternFlowIpv4Dst_Choice_decrement PatternFlowIpv4Dst_Choice_Enum = 5 + PatternFlowIpv4Dst_Choice_auto PatternFlowIpv4Dst_Choice_Enum = 1 + PatternFlowIpv4Dst_Choice_random PatternFlowIpv4Dst_Choice_Enum = 6 ) // Enum value maps for PatternFlowIpv4Dst_Choice_Enum. @@ -12513,6 +14932,8 @@ var ( 3: "values", 4: "increment", 5: "decrement", + 1: "auto", + 6: "random", } PatternFlowIpv4Dst_Choice_Enum_value = map[string]int32{ "unspecified": 0, @@ -12520,6 +14941,8 @@ var ( "values": 3, "increment": 4, "decrement": 5, + "auto": 1, + "random": 6, } ) @@ -12534,11 +14957,11 @@ func (x PatternFlowIpv4Dst_Choice_Enum) String() string { } func (PatternFlowIpv4Dst_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[230].Descriptor() + return file_otg_proto_enumTypes[271].Descriptor() } func (PatternFlowIpv4Dst_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[230] + return &file_otg_proto_enumTypes[271] } func (x PatternFlowIpv4Dst_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12547,7 +14970,7 @@ func (x PatternFlowIpv4Dst_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIpv4Dst_Choice_Enum.Descriptor instead. func (PatternFlowIpv4Dst_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{493, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{649, 0, 0} } type PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum int32 @@ -12589,11 +15012,11 @@ func (x PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum) String() string } func (PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[231].Descriptor() + return file_otg_proto_enumTypes[272].Descriptor() } func (PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[231] + return &file_otg_proto_enumTypes[272] } func (x PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12602,7 +15025,7 @@ func (x PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum) Number() protore // Deprecated: Use PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum.Descriptor instead. func (PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{495, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{651, 0, 0} } type PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum int32 @@ -12644,11 +15067,11 @@ func (x PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum) String() string } func (PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[232].Descriptor() + return file_otg_proto_enumTypes[273].Descriptor() } func (PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[232] + return &file_otg_proto_enumTypes[273] } func (x PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12657,7 +15080,7 @@ func (x PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum) Number() protor // Deprecated: Use PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum.Descriptor instead. func (PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{497, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{653, 0, 0} } type PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum int32 @@ -12699,11 +15122,11 @@ func (x PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum) String() strin } func (PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[233].Descriptor() + return file_otg_proto_enumTypes[274].Descriptor() } func (PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[233] + return &file_otg_proto_enumTypes[274] } func (x PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12712,7 +15135,7 @@ func (x PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum) Number() proto // Deprecated: Use PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum.Descriptor instead. func (PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{499, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{655, 0, 0} } type PatternFlowIpv4PriorityRaw_Choice_Enum int32 @@ -12754,11 +15177,11 @@ func (x PatternFlowIpv4PriorityRaw_Choice_Enum) String() string { } func (PatternFlowIpv4PriorityRaw_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[234].Descriptor() + return file_otg_proto_enumTypes[275].Descriptor() } func (PatternFlowIpv4PriorityRaw_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[234] + return &file_otg_proto_enumTypes[275] } func (x PatternFlowIpv4PriorityRaw_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12767,7 +15190,7 @@ func (x PatternFlowIpv4PriorityRaw_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowIpv4PriorityRaw_Choice_Enum.Descriptor instead. func (PatternFlowIpv4PriorityRaw_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{502, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{658, 0, 0} } type PatternFlowIpv4DscpPhb_Choice_Enum int32 @@ -12809,11 +15232,11 @@ func (x PatternFlowIpv4DscpPhb_Choice_Enum) String() string { } func (PatternFlowIpv4DscpPhb_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[235].Descriptor() + return file_otg_proto_enumTypes[276].Descriptor() } func (PatternFlowIpv4DscpPhb_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[235] + return &file_otg_proto_enumTypes[276] } func (x PatternFlowIpv4DscpPhb_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12822,7 +15245,7 @@ func (x PatternFlowIpv4DscpPhb_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIpv4DscpPhb_Choice_Enum.Descriptor instead. func (PatternFlowIpv4DscpPhb_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{505, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{661, 0, 0} } type PatternFlowIpv4DscpEcn_Choice_Enum int32 @@ -12864,11 +15287,11 @@ func (x PatternFlowIpv4DscpEcn_Choice_Enum) String() string { } func (PatternFlowIpv4DscpEcn_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[236].Descriptor() + return file_otg_proto_enumTypes[277].Descriptor() } func (PatternFlowIpv4DscpEcn_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[236] + return &file_otg_proto_enumTypes[277] } func (x PatternFlowIpv4DscpEcn_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12877,7 +15300,7 @@ func (x PatternFlowIpv4DscpEcn_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIpv4DscpEcn_Choice_Enum.Descriptor instead. func (PatternFlowIpv4DscpEcn_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{508, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{664, 0, 0} } type PatternFlowIpv4TosPrecedence_Choice_Enum int32 @@ -12919,11 +15342,11 @@ func (x PatternFlowIpv4TosPrecedence_Choice_Enum) String() string { } func (PatternFlowIpv4TosPrecedence_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[237].Descriptor() + return file_otg_proto_enumTypes[278].Descriptor() } func (PatternFlowIpv4TosPrecedence_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[237] + return &file_otg_proto_enumTypes[278] } func (x PatternFlowIpv4TosPrecedence_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12932,7 +15355,7 @@ func (x PatternFlowIpv4TosPrecedence_Choice_Enum) Number() protoreflect.EnumNumb // Deprecated: Use PatternFlowIpv4TosPrecedence_Choice_Enum.Descriptor instead. func (PatternFlowIpv4TosPrecedence_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{511, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{667, 0, 0} } type PatternFlowIpv4TosDelay_Choice_Enum int32 @@ -12974,11 +15397,11 @@ func (x PatternFlowIpv4TosDelay_Choice_Enum) String() string { } func (PatternFlowIpv4TosDelay_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[238].Descriptor() + return file_otg_proto_enumTypes[279].Descriptor() } func (PatternFlowIpv4TosDelay_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[238] + return &file_otg_proto_enumTypes[279] } func (x PatternFlowIpv4TosDelay_Choice_Enum) Number() protoreflect.EnumNumber { @@ -12987,7 +15410,7 @@ func (x PatternFlowIpv4TosDelay_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIpv4TosDelay_Choice_Enum.Descriptor instead. func (PatternFlowIpv4TosDelay_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{514, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{670, 0, 0} } type PatternFlowIpv4TosThroughput_Choice_Enum int32 @@ -13029,11 +15452,11 @@ func (x PatternFlowIpv4TosThroughput_Choice_Enum) String() string { } func (PatternFlowIpv4TosThroughput_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[239].Descriptor() + return file_otg_proto_enumTypes[280].Descriptor() } func (PatternFlowIpv4TosThroughput_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[239] + return &file_otg_proto_enumTypes[280] } func (x PatternFlowIpv4TosThroughput_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13042,7 +15465,7 @@ func (x PatternFlowIpv4TosThroughput_Choice_Enum) Number() protoreflect.EnumNumb // Deprecated: Use PatternFlowIpv4TosThroughput_Choice_Enum.Descriptor instead. func (PatternFlowIpv4TosThroughput_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{517, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{673, 0, 0} } type PatternFlowIpv4TosReliability_Choice_Enum int32 @@ -13084,11 +15507,11 @@ func (x PatternFlowIpv4TosReliability_Choice_Enum) String() string { } func (PatternFlowIpv4TosReliability_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[240].Descriptor() + return file_otg_proto_enumTypes[281].Descriptor() } func (PatternFlowIpv4TosReliability_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[240] + return &file_otg_proto_enumTypes[281] } func (x PatternFlowIpv4TosReliability_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13097,7 +15520,7 @@ func (x PatternFlowIpv4TosReliability_Choice_Enum) Number() protoreflect.EnumNum // Deprecated: Use PatternFlowIpv4TosReliability_Choice_Enum.Descriptor instead. func (PatternFlowIpv4TosReliability_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{520, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{676, 0, 0} } type PatternFlowIpv4TosMonetary_Choice_Enum int32 @@ -13139,11 +15562,11 @@ func (x PatternFlowIpv4TosMonetary_Choice_Enum) String() string { } func (PatternFlowIpv4TosMonetary_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[241].Descriptor() + return file_otg_proto_enumTypes[282].Descriptor() } func (PatternFlowIpv4TosMonetary_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[241] + return &file_otg_proto_enumTypes[282] } func (x PatternFlowIpv4TosMonetary_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13152,7 +15575,7 @@ func (x PatternFlowIpv4TosMonetary_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowIpv4TosMonetary_Choice_Enum.Descriptor instead. func (PatternFlowIpv4TosMonetary_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{523, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{679, 0, 0} } type PatternFlowIpv4TosUnused_Choice_Enum int32 @@ -13194,11 +15617,11 @@ func (x PatternFlowIpv4TosUnused_Choice_Enum) String() string { } func (PatternFlowIpv4TosUnused_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[242].Descriptor() + return file_otg_proto_enumTypes[283].Descriptor() } func (PatternFlowIpv4TosUnused_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[242] + return &file_otg_proto_enumTypes[283] } func (x PatternFlowIpv4TosUnused_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13207,7 +15630,7 @@ func (x PatternFlowIpv4TosUnused_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIpv4TosUnused_Choice_Enum.Descriptor instead. func (PatternFlowIpv4TosUnused_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{526, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{682, 0, 0} } type PatternFlowIpv6Version_Choice_Enum int32 @@ -13249,11 +15672,11 @@ func (x PatternFlowIpv6Version_Choice_Enum) String() string { } func (PatternFlowIpv6Version_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[243].Descriptor() + return file_otg_proto_enumTypes[284].Descriptor() } func (PatternFlowIpv6Version_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[243] + return &file_otg_proto_enumTypes[284] } func (x PatternFlowIpv6Version_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13262,7 +15685,7 @@ func (x PatternFlowIpv6Version_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIpv6Version_Choice_Enum.Descriptor instead. func (PatternFlowIpv6Version_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{529, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{685, 0, 0} } type PatternFlowIpv6TrafficClass_Choice_Enum int32 @@ -13304,11 +15727,11 @@ func (x PatternFlowIpv6TrafficClass_Choice_Enum) String() string { } func (PatternFlowIpv6TrafficClass_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[244].Descriptor() + return file_otg_proto_enumTypes[285].Descriptor() } func (PatternFlowIpv6TrafficClass_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[244] + return &file_otg_proto_enumTypes[285] } func (x PatternFlowIpv6TrafficClass_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13317,7 +15740,7 @@ func (x PatternFlowIpv6TrafficClass_Choice_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use PatternFlowIpv6TrafficClass_Choice_Enum.Descriptor instead. func (PatternFlowIpv6TrafficClass_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{532, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{688, 0, 0} } type PatternFlowIpv6FlowLabel_Choice_Enum int32 @@ -13328,6 +15751,7 @@ const ( PatternFlowIpv6FlowLabel_Choice_values PatternFlowIpv6FlowLabel_Choice_Enum = 3 PatternFlowIpv6FlowLabel_Choice_increment PatternFlowIpv6FlowLabel_Choice_Enum = 4 PatternFlowIpv6FlowLabel_Choice_decrement PatternFlowIpv6FlowLabel_Choice_Enum = 5 + PatternFlowIpv6FlowLabel_Choice_random PatternFlowIpv6FlowLabel_Choice_Enum = 6 ) // Enum value maps for PatternFlowIpv6FlowLabel_Choice_Enum. @@ -13338,6 +15762,7 @@ var ( 3: "values", 4: "increment", 5: "decrement", + 6: "random", } PatternFlowIpv6FlowLabel_Choice_Enum_value = map[string]int32{ "unspecified": 0, @@ -13345,6 +15770,7 @@ var ( "values": 3, "increment": 4, "decrement": 5, + "random": 6, } ) @@ -13359,11 +15785,11 @@ func (x PatternFlowIpv6FlowLabel_Choice_Enum) String() string { } func (PatternFlowIpv6FlowLabel_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[245].Descriptor() + return file_otg_proto_enumTypes[286].Descriptor() } func (PatternFlowIpv6FlowLabel_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[245] + return &file_otg_proto_enumTypes[286] } func (x PatternFlowIpv6FlowLabel_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13372,7 +15798,7 @@ func (x PatternFlowIpv6FlowLabel_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIpv6FlowLabel_Choice_Enum.Descriptor instead. func (PatternFlowIpv6FlowLabel_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{535, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{692, 0, 0} } type PatternFlowIpv6PayloadLength_Choice_Enum int32 @@ -13417,11 +15843,11 @@ func (x PatternFlowIpv6PayloadLength_Choice_Enum) String() string { } func (PatternFlowIpv6PayloadLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[246].Descriptor() + return file_otg_proto_enumTypes[287].Descriptor() } func (PatternFlowIpv6PayloadLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[246] + return &file_otg_proto_enumTypes[287] } func (x PatternFlowIpv6PayloadLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13430,7 +15856,7 @@ func (x PatternFlowIpv6PayloadLength_Choice_Enum) Number() protoreflect.EnumNumb // Deprecated: Use PatternFlowIpv6PayloadLength_Choice_Enum.Descriptor instead. func (PatternFlowIpv6PayloadLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{538, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{695, 0, 0} } type PatternFlowIpv6NextHeader_Choice_Enum int32 @@ -13475,11 +15901,11 @@ func (x PatternFlowIpv6NextHeader_Choice_Enum) String() string { } func (PatternFlowIpv6NextHeader_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[247].Descriptor() + return file_otg_proto_enumTypes[288].Descriptor() } func (PatternFlowIpv6NextHeader_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[247] + return &file_otg_proto_enumTypes[288] } func (x PatternFlowIpv6NextHeader_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13488,7 +15914,7 @@ func (x PatternFlowIpv6NextHeader_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowIpv6NextHeader_Choice_Enum.Descriptor instead. func (PatternFlowIpv6NextHeader_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{541, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{698, 0, 0} } type PatternFlowIpv6HopLimit_Choice_Enum int32 @@ -13530,11 +15956,11 @@ func (x PatternFlowIpv6HopLimit_Choice_Enum) String() string { } func (PatternFlowIpv6HopLimit_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[248].Descriptor() + return file_otg_proto_enumTypes[289].Descriptor() } func (PatternFlowIpv6HopLimit_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[248] + return &file_otg_proto_enumTypes[289] } func (x PatternFlowIpv6HopLimit_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13543,7 +15969,7 @@ func (x PatternFlowIpv6HopLimit_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIpv6HopLimit_Choice_Enum.Descriptor instead. func (PatternFlowIpv6HopLimit_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{544, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{701, 0, 0} } type PatternFlowIpv6Src_Choice_Enum int32 @@ -13554,6 +15980,7 @@ const ( PatternFlowIpv6Src_Choice_values PatternFlowIpv6Src_Choice_Enum = 3 PatternFlowIpv6Src_Choice_increment PatternFlowIpv6Src_Choice_Enum = 4 PatternFlowIpv6Src_Choice_decrement PatternFlowIpv6Src_Choice_Enum = 5 + PatternFlowIpv6Src_Choice_auto PatternFlowIpv6Src_Choice_Enum = 1 ) // Enum value maps for PatternFlowIpv6Src_Choice_Enum. @@ -13564,6 +15991,7 @@ var ( 3: "values", 4: "increment", 5: "decrement", + 1: "auto", } PatternFlowIpv6Src_Choice_Enum_value = map[string]int32{ "unspecified": 0, @@ -13571,6 +15999,7 @@ var ( "values": 3, "increment": 4, "decrement": 5, + "auto": 1, } ) @@ -13585,11 +16014,11 @@ func (x PatternFlowIpv6Src_Choice_Enum) String() string { } func (PatternFlowIpv6Src_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[249].Descriptor() + return file_otg_proto_enumTypes[290].Descriptor() } func (PatternFlowIpv6Src_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[249] + return &file_otg_proto_enumTypes[290] } func (x PatternFlowIpv6Src_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13598,7 +16027,7 @@ func (x PatternFlowIpv6Src_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIpv6Src_Choice_Enum.Descriptor instead. func (PatternFlowIpv6Src_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{547, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{704, 0, 0} } type PatternFlowIpv6Dst_Choice_Enum int32 @@ -13609,6 +16038,7 @@ const ( PatternFlowIpv6Dst_Choice_values PatternFlowIpv6Dst_Choice_Enum = 3 PatternFlowIpv6Dst_Choice_increment PatternFlowIpv6Dst_Choice_Enum = 4 PatternFlowIpv6Dst_Choice_decrement PatternFlowIpv6Dst_Choice_Enum = 5 + PatternFlowIpv6Dst_Choice_auto PatternFlowIpv6Dst_Choice_Enum = 1 ) // Enum value maps for PatternFlowIpv6Dst_Choice_Enum. @@ -13619,6 +16049,7 @@ var ( 3: "values", 4: "increment", 5: "decrement", + 1: "auto", } PatternFlowIpv6Dst_Choice_Enum_value = map[string]int32{ "unspecified": 0, @@ -13626,6 +16057,7 @@ var ( "values": 3, "increment": 4, "decrement": 5, + "auto": 1, } ) @@ -13640,11 +16072,11 @@ func (x PatternFlowIpv6Dst_Choice_Enum) String() string { } func (PatternFlowIpv6Dst_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[250].Descriptor() + return file_otg_proto_enumTypes[291].Descriptor() } func (PatternFlowIpv6Dst_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[250] + return &file_otg_proto_enumTypes[291] } func (x PatternFlowIpv6Dst_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13653,7 +16085,7 @@ func (x PatternFlowIpv6Dst_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIpv6Dst_Choice_Enum.Descriptor instead. func (PatternFlowIpv6Dst_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{550, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{707, 0, 0} } type PatternFlowPfcPauseDst_Choice_Enum int32 @@ -13695,11 +16127,11 @@ func (x PatternFlowPfcPauseDst_Choice_Enum) String() string { } func (PatternFlowPfcPauseDst_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[251].Descriptor() + return file_otg_proto_enumTypes[292].Descriptor() } func (PatternFlowPfcPauseDst_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[251] + return &file_otg_proto_enumTypes[292] } func (x PatternFlowPfcPauseDst_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13708,7 +16140,7 @@ func (x PatternFlowPfcPauseDst_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowPfcPauseDst_Choice_Enum.Descriptor instead. func (PatternFlowPfcPauseDst_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{553, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{710, 0, 0} } type PatternFlowPfcPauseSrc_Choice_Enum int32 @@ -13750,11 +16182,11 @@ func (x PatternFlowPfcPauseSrc_Choice_Enum) String() string { } func (PatternFlowPfcPauseSrc_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[252].Descriptor() + return file_otg_proto_enumTypes[293].Descriptor() } func (PatternFlowPfcPauseSrc_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[252] + return &file_otg_proto_enumTypes[293] } func (x PatternFlowPfcPauseSrc_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13763,7 +16195,7 @@ func (x PatternFlowPfcPauseSrc_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowPfcPauseSrc_Choice_Enum.Descriptor instead. func (PatternFlowPfcPauseSrc_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{556, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{713, 0, 0} } type PatternFlowPfcPauseEtherType_Choice_Enum int32 @@ -13805,11 +16237,11 @@ func (x PatternFlowPfcPauseEtherType_Choice_Enum) String() string { } func (PatternFlowPfcPauseEtherType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[253].Descriptor() + return file_otg_proto_enumTypes[294].Descriptor() } func (PatternFlowPfcPauseEtherType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[253] + return &file_otg_proto_enumTypes[294] } func (x PatternFlowPfcPauseEtherType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13818,7 +16250,7 @@ func (x PatternFlowPfcPauseEtherType_Choice_Enum) Number() protoreflect.EnumNumb // Deprecated: Use PatternFlowPfcPauseEtherType_Choice_Enum.Descriptor instead. func (PatternFlowPfcPauseEtherType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{559, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{716, 0, 0} } type PatternFlowPfcPauseControlOpCode_Choice_Enum int32 @@ -13860,11 +16292,11 @@ func (x PatternFlowPfcPauseControlOpCode_Choice_Enum) String() string { } func (PatternFlowPfcPauseControlOpCode_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[254].Descriptor() + return file_otg_proto_enumTypes[295].Descriptor() } func (PatternFlowPfcPauseControlOpCode_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[254] + return &file_otg_proto_enumTypes[295] } func (x PatternFlowPfcPauseControlOpCode_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13873,7 +16305,7 @@ func (x PatternFlowPfcPauseControlOpCode_Choice_Enum) Number() protoreflect.Enum // Deprecated: Use PatternFlowPfcPauseControlOpCode_Choice_Enum.Descriptor instead. func (PatternFlowPfcPauseControlOpCode_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{562, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{719, 0, 0} } type PatternFlowPfcPauseClassEnableVector_Choice_Enum int32 @@ -13915,11 +16347,11 @@ func (x PatternFlowPfcPauseClassEnableVector_Choice_Enum) String() string { } func (PatternFlowPfcPauseClassEnableVector_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[255].Descriptor() + return file_otg_proto_enumTypes[296].Descriptor() } func (PatternFlowPfcPauseClassEnableVector_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[255] + return &file_otg_proto_enumTypes[296] } func (x PatternFlowPfcPauseClassEnableVector_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13928,7 +16360,7 @@ func (x PatternFlowPfcPauseClassEnableVector_Choice_Enum) Number() protoreflect. // Deprecated: Use PatternFlowPfcPauseClassEnableVector_Choice_Enum.Descriptor instead. func (PatternFlowPfcPauseClassEnableVector_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{565, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{722, 0, 0} } type PatternFlowPfcPausePauseClass0_Choice_Enum int32 @@ -13970,11 +16402,11 @@ func (x PatternFlowPfcPausePauseClass0_Choice_Enum) String() string { } func (PatternFlowPfcPausePauseClass0_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[256].Descriptor() + return file_otg_proto_enumTypes[297].Descriptor() } func (PatternFlowPfcPausePauseClass0_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[256] + return &file_otg_proto_enumTypes[297] } func (x PatternFlowPfcPausePauseClass0_Choice_Enum) Number() protoreflect.EnumNumber { @@ -13983,7 +16415,7 @@ func (x PatternFlowPfcPausePauseClass0_Choice_Enum) Number() protoreflect.EnumNu // Deprecated: Use PatternFlowPfcPausePauseClass0_Choice_Enum.Descriptor instead. func (PatternFlowPfcPausePauseClass0_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{568, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{725, 0, 0} } type PatternFlowPfcPausePauseClass1_Choice_Enum int32 @@ -14025,11 +16457,11 @@ func (x PatternFlowPfcPausePauseClass1_Choice_Enum) String() string { } func (PatternFlowPfcPausePauseClass1_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[257].Descriptor() + return file_otg_proto_enumTypes[298].Descriptor() } func (PatternFlowPfcPausePauseClass1_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[257] + return &file_otg_proto_enumTypes[298] } func (x PatternFlowPfcPausePauseClass1_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14038,7 +16470,7 @@ func (x PatternFlowPfcPausePauseClass1_Choice_Enum) Number() protoreflect.EnumNu // Deprecated: Use PatternFlowPfcPausePauseClass1_Choice_Enum.Descriptor instead. func (PatternFlowPfcPausePauseClass1_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{571, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{728, 0, 0} } type PatternFlowPfcPausePauseClass2_Choice_Enum int32 @@ -14080,11 +16512,11 @@ func (x PatternFlowPfcPausePauseClass2_Choice_Enum) String() string { } func (PatternFlowPfcPausePauseClass2_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[258].Descriptor() + return file_otg_proto_enumTypes[299].Descriptor() } func (PatternFlowPfcPausePauseClass2_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[258] + return &file_otg_proto_enumTypes[299] } func (x PatternFlowPfcPausePauseClass2_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14093,7 +16525,7 @@ func (x PatternFlowPfcPausePauseClass2_Choice_Enum) Number() protoreflect.EnumNu // Deprecated: Use PatternFlowPfcPausePauseClass2_Choice_Enum.Descriptor instead. func (PatternFlowPfcPausePauseClass2_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{574, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{731, 0, 0} } type PatternFlowPfcPausePauseClass3_Choice_Enum int32 @@ -14135,11 +16567,11 @@ func (x PatternFlowPfcPausePauseClass3_Choice_Enum) String() string { } func (PatternFlowPfcPausePauseClass3_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[259].Descriptor() + return file_otg_proto_enumTypes[300].Descriptor() } func (PatternFlowPfcPausePauseClass3_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[259] + return &file_otg_proto_enumTypes[300] } func (x PatternFlowPfcPausePauseClass3_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14148,7 +16580,7 @@ func (x PatternFlowPfcPausePauseClass3_Choice_Enum) Number() protoreflect.EnumNu // Deprecated: Use PatternFlowPfcPausePauseClass3_Choice_Enum.Descriptor instead. func (PatternFlowPfcPausePauseClass3_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{577, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{734, 0, 0} } type PatternFlowPfcPausePauseClass4_Choice_Enum int32 @@ -14190,11 +16622,11 @@ func (x PatternFlowPfcPausePauseClass4_Choice_Enum) String() string { } func (PatternFlowPfcPausePauseClass4_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[260].Descriptor() + return file_otg_proto_enumTypes[301].Descriptor() } func (PatternFlowPfcPausePauseClass4_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[260] + return &file_otg_proto_enumTypes[301] } func (x PatternFlowPfcPausePauseClass4_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14203,7 +16635,7 @@ func (x PatternFlowPfcPausePauseClass4_Choice_Enum) Number() protoreflect.EnumNu // Deprecated: Use PatternFlowPfcPausePauseClass4_Choice_Enum.Descriptor instead. func (PatternFlowPfcPausePauseClass4_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{580, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{737, 0, 0} } type PatternFlowPfcPausePauseClass5_Choice_Enum int32 @@ -14245,11 +16677,11 @@ func (x PatternFlowPfcPausePauseClass5_Choice_Enum) String() string { } func (PatternFlowPfcPausePauseClass5_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[261].Descriptor() + return file_otg_proto_enumTypes[302].Descriptor() } func (PatternFlowPfcPausePauseClass5_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[261] + return &file_otg_proto_enumTypes[302] } func (x PatternFlowPfcPausePauseClass5_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14258,7 +16690,7 @@ func (x PatternFlowPfcPausePauseClass5_Choice_Enum) Number() protoreflect.EnumNu // Deprecated: Use PatternFlowPfcPausePauseClass5_Choice_Enum.Descriptor instead. func (PatternFlowPfcPausePauseClass5_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{583, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{740, 0, 0} } type PatternFlowPfcPausePauseClass6_Choice_Enum int32 @@ -14300,11 +16732,11 @@ func (x PatternFlowPfcPausePauseClass6_Choice_Enum) String() string { } func (PatternFlowPfcPausePauseClass6_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[262].Descriptor() + return file_otg_proto_enumTypes[303].Descriptor() } func (PatternFlowPfcPausePauseClass6_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[262] + return &file_otg_proto_enumTypes[303] } func (x PatternFlowPfcPausePauseClass6_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14313,7 +16745,7 @@ func (x PatternFlowPfcPausePauseClass6_Choice_Enum) Number() protoreflect.EnumNu // Deprecated: Use PatternFlowPfcPausePauseClass6_Choice_Enum.Descriptor instead. func (PatternFlowPfcPausePauseClass6_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{586, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{743, 0, 0} } type PatternFlowPfcPausePauseClass7_Choice_Enum int32 @@ -14355,11 +16787,11 @@ func (x PatternFlowPfcPausePauseClass7_Choice_Enum) String() string { } func (PatternFlowPfcPausePauseClass7_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[263].Descriptor() + return file_otg_proto_enumTypes[304].Descriptor() } func (PatternFlowPfcPausePauseClass7_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[263] + return &file_otg_proto_enumTypes[304] } func (x PatternFlowPfcPausePauseClass7_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14368,7 +16800,7 @@ func (x PatternFlowPfcPausePauseClass7_Choice_Enum) Number() protoreflect.EnumNu // Deprecated: Use PatternFlowPfcPausePauseClass7_Choice_Enum.Descriptor instead. func (PatternFlowPfcPausePauseClass7_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{589, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{746, 0, 0} } type PatternFlowEthernetPauseDst_Choice_Enum int32 @@ -14410,11 +16842,11 @@ func (x PatternFlowEthernetPauseDst_Choice_Enum) String() string { } func (PatternFlowEthernetPauseDst_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[264].Descriptor() + return file_otg_proto_enumTypes[305].Descriptor() } func (PatternFlowEthernetPauseDst_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[264] + return &file_otg_proto_enumTypes[305] } func (x PatternFlowEthernetPauseDst_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14423,7 +16855,7 @@ func (x PatternFlowEthernetPauseDst_Choice_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use PatternFlowEthernetPauseDst_Choice_Enum.Descriptor instead. func (PatternFlowEthernetPauseDst_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{592, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{749, 0, 0} } type PatternFlowEthernetPauseSrc_Choice_Enum int32 @@ -14465,11 +16897,11 @@ func (x PatternFlowEthernetPauseSrc_Choice_Enum) String() string { } func (PatternFlowEthernetPauseSrc_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[265].Descriptor() + return file_otg_proto_enumTypes[306].Descriptor() } func (PatternFlowEthernetPauseSrc_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[265] + return &file_otg_proto_enumTypes[306] } func (x PatternFlowEthernetPauseSrc_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14478,7 +16910,7 @@ func (x PatternFlowEthernetPauseSrc_Choice_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use PatternFlowEthernetPauseSrc_Choice_Enum.Descriptor instead. func (PatternFlowEthernetPauseSrc_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{595, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{752, 0, 0} } type PatternFlowEthernetPauseEtherType_Choice_Enum int32 @@ -14520,11 +16952,11 @@ func (x PatternFlowEthernetPauseEtherType_Choice_Enum) String() string { } func (PatternFlowEthernetPauseEtherType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[266].Descriptor() + return file_otg_proto_enumTypes[307].Descriptor() } func (PatternFlowEthernetPauseEtherType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[266] + return &file_otg_proto_enumTypes[307] } func (x PatternFlowEthernetPauseEtherType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14533,7 +16965,7 @@ func (x PatternFlowEthernetPauseEtherType_Choice_Enum) Number() protoreflect.Enu // Deprecated: Use PatternFlowEthernetPauseEtherType_Choice_Enum.Descriptor instead. func (PatternFlowEthernetPauseEtherType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{598, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{755, 0, 0} } type PatternFlowEthernetPauseControlOpCode_Choice_Enum int32 @@ -14575,11 +17007,11 @@ func (x PatternFlowEthernetPauseControlOpCode_Choice_Enum) String() string { } func (PatternFlowEthernetPauseControlOpCode_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[267].Descriptor() + return file_otg_proto_enumTypes[308].Descriptor() } func (PatternFlowEthernetPauseControlOpCode_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[267] + return &file_otg_proto_enumTypes[308] } func (x PatternFlowEthernetPauseControlOpCode_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14588,7 +17020,7 @@ func (x PatternFlowEthernetPauseControlOpCode_Choice_Enum) Number() protoreflect // Deprecated: Use PatternFlowEthernetPauseControlOpCode_Choice_Enum.Descriptor instead. func (PatternFlowEthernetPauseControlOpCode_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{601, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{758, 0, 0} } type PatternFlowEthernetPauseTime_Choice_Enum int32 @@ -14630,11 +17062,11 @@ func (x PatternFlowEthernetPauseTime_Choice_Enum) String() string { } func (PatternFlowEthernetPauseTime_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[268].Descriptor() + return file_otg_proto_enumTypes[309].Descriptor() } func (PatternFlowEthernetPauseTime_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[268] + return &file_otg_proto_enumTypes[309] } func (x PatternFlowEthernetPauseTime_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14643,7 +17075,7 @@ func (x PatternFlowEthernetPauseTime_Choice_Enum) Number() protoreflect.EnumNumb // Deprecated: Use PatternFlowEthernetPauseTime_Choice_Enum.Descriptor instead. func (PatternFlowEthernetPauseTime_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{604, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{761, 0, 0} } type PatternFlowTcpSrcPort_Choice_Enum int32 @@ -14654,6 +17086,7 @@ const ( PatternFlowTcpSrcPort_Choice_values PatternFlowTcpSrcPort_Choice_Enum = 3 PatternFlowTcpSrcPort_Choice_increment PatternFlowTcpSrcPort_Choice_Enum = 4 PatternFlowTcpSrcPort_Choice_decrement PatternFlowTcpSrcPort_Choice_Enum = 5 + PatternFlowTcpSrcPort_Choice_random PatternFlowTcpSrcPort_Choice_Enum = 6 ) // Enum value maps for PatternFlowTcpSrcPort_Choice_Enum. @@ -14664,6 +17097,7 @@ var ( 3: "values", 4: "increment", 5: "decrement", + 6: "random", } PatternFlowTcpSrcPort_Choice_Enum_value = map[string]int32{ "unspecified": 0, @@ -14671,6 +17105,7 @@ var ( "values": 3, "increment": 4, "decrement": 5, + "random": 6, } ) @@ -14685,11 +17120,11 @@ func (x PatternFlowTcpSrcPort_Choice_Enum) String() string { } func (PatternFlowTcpSrcPort_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[269].Descriptor() + return file_otg_proto_enumTypes[310].Descriptor() } func (PatternFlowTcpSrcPort_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[269] + return &file_otg_proto_enumTypes[310] } func (x PatternFlowTcpSrcPort_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14698,7 +17133,7 @@ func (x PatternFlowTcpSrcPort_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpSrcPort_Choice_Enum.Descriptor instead. func (PatternFlowTcpSrcPort_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{607, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{765, 0, 0} } type PatternFlowTcpDstPort_Choice_Enum int32 @@ -14709,6 +17144,7 @@ const ( PatternFlowTcpDstPort_Choice_values PatternFlowTcpDstPort_Choice_Enum = 3 PatternFlowTcpDstPort_Choice_increment PatternFlowTcpDstPort_Choice_Enum = 4 PatternFlowTcpDstPort_Choice_decrement PatternFlowTcpDstPort_Choice_Enum = 5 + PatternFlowTcpDstPort_Choice_random PatternFlowTcpDstPort_Choice_Enum = 6 ) // Enum value maps for PatternFlowTcpDstPort_Choice_Enum. @@ -14719,6 +17155,7 @@ var ( 3: "values", 4: "increment", 5: "decrement", + 6: "random", } PatternFlowTcpDstPort_Choice_Enum_value = map[string]int32{ "unspecified": 0, @@ -14726,6 +17163,7 @@ var ( "values": 3, "increment": 4, "decrement": 5, + "random": 6, } ) @@ -14740,11 +17178,11 @@ func (x PatternFlowTcpDstPort_Choice_Enum) String() string { } func (PatternFlowTcpDstPort_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[270].Descriptor() + return file_otg_proto_enumTypes[311].Descriptor() } func (PatternFlowTcpDstPort_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[270] + return &file_otg_proto_enumTypes[311] } func (x PatternFlowTcpDstPort_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14753,7 +17191,7 @@ func (x PatternFlowTcpDstPort_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpDstPort_Choice_Enum.Descriptor instead. func (PatternFlowTcpDstPort_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{610, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{769, 0, 0} } type PatternFlowTcpSeqNum_Choice_Enum int32 @@ -14795,11 +17233,11 @@ func (x PatternFlowTcpSeqNum_Choice_Enum) String() string { } func (PatternFlowTcpSeqNum_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[271].Descriptor() + return file_otg_proto_enumTypes[312].Descriptor() } func (PatternFlowTcpSeqNum_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[271] + return &file_otg_proto_enumTypes[312] } func (x PatternFlowTcpSeqNum_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14808,7 +17246,7 @@ func (x PatternFlowTcpSeqNum_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpSeqNum_Choice_Enum.Descriptor instead. func (PatternFlowTcpSeqNum_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{613, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{772, 0, 0} } type PatternFlowTcpAckNum_Choice_Enum int32 @@ -14850,11 +17288,11 @@ func (x PatternFlowTcpAckNum_Choice_Enum) String() string { } func (PatternFlowTcpAckNum_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[272].Descriptor() + return file_otg_proto_enumTypes[313].Descriptor() } func (PatternFlowTcpAckNum_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[272] + return &file_otg_proto_enumTypes[313] } func (x PatternFlowTcpAckNum_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14863,7 +17301,7 @@ func (x PatternFlowTcpAckNum_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpAckNum_Choice_Enum.Descriptor instead. func (PatternFlowTcpAckNum_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{616, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{775, 0, 0} } type PatternFlowTcpDataOffset_Choice_Enum int32 @@ -14905,11 +17343,11 @@ func (x PatternFlowTcpDataOffset_Choice_Enum) String() string { } func (PatternFlowTcpDataOffset_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[273].Descriptor() + return file_otg_proto_enumTypes[314].Descriptor() } func (PatternFlowTcpDataOffset_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[273] + return &file_otg_proto_enumTypes[314] } func (x PatternFlowTcpDataOffset_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14918,7 +17356,7 @@ func (x PatternFlowTcpDataOffset_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpDataOffset_Choice_Enum.Descriptor instead. func (PatternFlowTcpDataOffset_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{619, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{778, 0, 0} } type PatternFlowTcpEcnNs_Choice_Enum int32 @@ -14960,11 +17398,11 @@ func (x PatternFlowTcpEcnNs_Choice_Enum) String() string { } func (PatternFlowTcpEcnNs_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[274].Descriptor() + return file_otg_proto_enumTypes[315].Descriptor() } func (PatternFlowTcpEcnNs_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[274] + return &file_otg_proto_enumTypes[315] } func (x PatternFlowTcpEcnNs_Choice_Enum) Number() protoreflect.EnumNumber { @@ -14973,7 +17411,7 @@ func (x PatternFlowTcpEcnNs_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpEcnNs_Choice_Enum.Descriptor instead. func (PatternFlowTcpEcnNs_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{622, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{781, 0, 0} } type PatternFlowTcpEcnCwr_Choice_Enum int32 @@ -15015,11 +17453,11 @@ func (x PatternFlowTcpEcnCwr_Choice_Enum) String() string { } func (PatternFlowTcpEcnCwr_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[275].Descriptor() + return file_otg_proto_enumTypes[316].Descriptor() } func (PatternFlowTcpEcnCwr_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[275] + return &file_otg_proto_enumTypes[316] } func (x PatternFlowTcpEcnCwr_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15028,7 +17466,7 @@ func (x PatternFlowTcpEcnCwr_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpEcnCwr_Choice_Enum.Descriptor instead. func (PatternFlowTcpEcnCwr_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{625, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{784, 0, 0} } type PatternFlowTcpEcnEcho_Choice_Enum int32 @@ -15070,11 +17508,11 @@ func (x PatternFlowTcpEcnEcho_Choice_Enum) String() string { } func (PatternFlowTcpEcnEcho_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[276].Descriptor() + return file_otg_proto_enumTypes[317].Descriptor() } func (PatternFlowTcpEcnEcho_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[276] + return &file_otg_proto_enumTypes[317] } func (x PatternFlowTcpEcnEcho_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15083,7 +17521,7 @@ func (x PatternFlowTcpEcnEcho_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpEcnEcho_Choice_Enum.Descriptor instead. func (PatternFlowTcpEcnEcho_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{628, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{787, 0, 0} } type PatternFlowTcpCtlUrg_Choice_Enum int32 @@ -15125,11 +17563,11 @@ func (x PatternFlowTcpCtlUrg_Choice_Enum) String() string { } func (PatternFlowTcpCtlUrg_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[277].Descriptor() + return file_otg_proto_enumTypes[318].Descriptor() } func (PatternFlowTcpCtlUrg_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[277] + return &file_otg_proto_enumTypes[318] } func (x PatternFlowTcpCtlUrg_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15138,7 +17576,7 @@ func (x PatternFlowTcpCtlUrg_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpCtlUrg_Choice_Enum.Descriptor instead. func (PatternFlowTcpCtlUrg_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{631, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{790, 0, 0} } type PatternFlowTcpCtlAck_Choice_Enum int32 @@ -15180,11 +17618,11 @@ func (x PatternFlowTcpCtlAck_Choice_Enum) String() string { } func (PatternFlowTcpCtlAck_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[278].Descriptor() + return file_otg_proto_enumTypes[319].Descriptor() } func (PatternFlowTcpCtlAck_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[278] + return &file_otg_proto_enumTypes[319] } func (x PatternFlowTcpCtlAck_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15193,7 +17631,7 @@ func (x PatternFlowTcpCtlAck_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpCtlAck_Choice_Enum.Descriptor instead. func (PatternFlowTcpCtlAck_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{634, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{793, 0, 0} } type PatternFlowTcpCtlPsh_Choice_Enum int32 @@ -15235,11 +17673,11 @@ func (x PatternFlowTcpCtlPsh_Choice_Enum) String() string { } func (PatternFlowTcpCtlPsh_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[279].Descriptor() + return file_otg_proto_enumTypes[320].Descriptor() } func (PatternFlowTcpCtlPsh_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[279] + return &file_otg_proto_enumTypes[320] } func (x PatternFlowTcpCtlPsh_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15248,7 +17686,7 @@ func (x PatternFlowTcpCtlPsh_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpCtlPsh_Choice_Enum.Descriptor instead. func (PatternFlowTcpCtlPsh_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{637, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{796, 0, 0} } type PatternFlowTcpCtlRst_Choice_Enum int32 @@ -15290,11 +17728,11 @@ func (x PatternFlowTcpCtlRst_Choice_Enum) String() string { } func (PatternFlowTcpCtlRst_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[280].Descriptor() + return file_otg_proto_enumTypes[321].Descriptor() } func (PatternFlowTcpCtlRst_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[280] + return &file_otg_proto_enumTypes[321] } func (x PatternFlowTcpCtlRst_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15303,7 +17741,7 @@ func (x PatternFlowTcpCtlRst_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpCtlRst_Choice_Enum.Descriptor instead. func (PatternFlowTcpCtlRst_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{640, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{799, 0, 0} } type PatternFlowTcpCtlSyn_Choice_Enum int32 @@ -15345,11 +17783,11 @@ func (x PatternFlowTcpCtlSyn_Choice_Enum) String() string { } func (PatternFlowTcpCtlSyn_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[281].Descriptor() + return file_otg_proto_enumTypes[322].Descriptor() } func (PatternFlowTcpCtlSyn_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[281] + return &file_otg_proto_enumTypes[322] } func (x PatternFlowTcpCtlSyn_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15358,7 +17796,7 @@ func (x PatternFlowTcpCtlSyn_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpCtlSyn_Choice_Enum.Descriptor instead. func (PatternFlowTcpCtlSyn_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{643, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{802, 0, 0} } type PatternFlowTcpCtlFin_Choice_Enum int32 @@ -15400,11 +17838,11 @@ func (x PatternFlowTcpCtlFin_Choice_Enum) String() string { } func (PatternFlowTcpCtlFin_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[282].Descriptor() + return file_otg_proto_enumTypes[323].Descriptor() } func (PatternFlowTcpCtlFin_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[282] + return &file_otg_proto_enumTypes[323] } func (x PatternFlowTcpCtlFin_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15413,7 +17851,7 @@ func (x PatternFlowTcpCtlFin_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpCtlFin_Choice_Enum.Descriptor instead. func (PatternFlowTcpCtlFin_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{646, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{805, 0, 0} } type PatternFlowTcpWindow_Choice_Enum int32 @@ -15455,11 +17893,11 @@ func (x PatternFlowTcpWindow_Choice_Enum) String() string { } func (PatternFlowTcpWindow_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[283].Descriptor() + return file_otg_proto_enumTypes[324].Descriptor() } func (PatternFlowTcpWindow_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[283] + return &file_otg_proto_enumTypes[324] } func (x PatternFlowTcpWindow_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15468,7 +17906,105 @@ func (x PatternFlowTcpWindow_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowTcpWindow_Choice_Enum.Descriptor instead. func (PatternFlowTcpWindow_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{649, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{808, 0, 0} +} + +type PatternFlowTcpChecksum_Choice_Enum int32 + +const ( + PatternFlowTcpChecksum_Choice_unspecified PatternFlowTcpChecksum_Choice_Enum = 0 + PatternFlowTcpChecksum_Choice_generated PatternFlowTcpChecksum_Choice_Enum = 1 + PatternFlowTcpChecksum_Choice_custom PatternFlowTcpChecksum_Choice_Enum = 2 +) + +// Enum value maps for PatternFlowTcpChecksum_Choice_Enum. +var ( + PatternFlowTcpChecksum_Choice_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "generated", + 2: "custom", + } + PatternFlowTcpChecksum_Choice_Enum_value = map[string]int32{ + "unspecified": 0, + "generated": 1, + "custom": 2, + } +) + +func (x PatternFlowTcpChecksum_Choice_Enum) Enum() *PatternFlowTcpChecksum_Choice_Enum { + p := new(PatternFlowTcpChecksum_Choice_Enum) + *p = x + return p +} + +func (x PatternFlowTcpChecksum_Choice_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PatternFlowTcpChecksum_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[325].Descriptor() +} + +func (PatternFlowTcpChecksum_Choice_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[325] +} + +func (x PatternFlowTcpChecksum_Choice_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PatternFlowTcpChecksum_Choice_Enum.Descriptor instead. +func (PatternFlowTcpChecksum_Choice_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{809, 0, 0} +} + +type PatternFlowTcpChecksum_Generated_Enum int32 + +const ( + PatternFlowTcpChecksum_Generated_unspecified PatternFlowTcpChecksum_Generated_Enum = 0 + PatternFlowTcpChecksum_Generated_good PatternFlowTcpChecksum_Generated_Enum = 1 + PatternFlowTcpChecksum_Generated_bad PatternFlowTcpChecksum_Generated_Enum = 2 +) + +// Enum value maps for PatternFlowTcpChecksum_Generated_Enum. +var ( + PatternFlowTcpChecksum_Generated_Enum_name = map[int32]string{ + 0: "unspecified", + 1: "good", + 2: "bad", + } + PatternFlowTcpChecksum_Generated_Enum_value = map[string]int32{ + "unspecified": 0, + "good": 1, + "bad": 2, + } +) + +func (x PatternFlowTcpChecksum_Generated_Enum) Enum() *PatternFlowTcpChecksum_Generated_Enum { + p := new(PatternFlowTcpChecksum_Generated_Enum) + *p = x + return p +} + +func (x PatternFlowTcpChecksum_Generated_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PatternFlowTcpChecksum_Generated_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_otg_proto_enumTypes[326].Descriptor() +} + +func (PatternFlowTcpChecksum_Generated_Enum) Type() protoreflect.EnumType { + return &file_otg_proto_enumTypes[326] +} + +func (x PatternFlowTcpChecksum_Generated_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PatternFlowTcpChecksum_Generated_Enum.Descriptor instead. +func (PatternFlowTcpChecksum_Generated_Enum) EnumDescriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{809, 1, 0} } type PatternFlowUdpSrcPort_Choice_Enum int32 @@ -15479,6 +18015,7 @@ const ( PatternFlowUdpSrcPort_Choice_values PatternFlowUdpSrcPort_Choice_Enum = 3 PatternFlowUdpSrcPort_Choice_increment PatternFlowUdpSrcPort_Choice_Enum = 4 PatternFlowUdpSrcPort_Choice_decrement PatternFlowUdpSrcPort_Choice_Enum = 5 + PatternFlowUdpSrcPort_Choice_random PatternFlowUdpSrcPort_Choice_Enum = 6 ) // Enum value maps for PatternFlowUdpSrcPort_Choice_Enum. @@ -15489,6 +18026,7 @@ var ( 3: "values", 4: "increment", 5: "decrement", + 6: "random", } PatternFlowUdpSrcPort_Choice_Enum_value = map[string]int32{ "unspecified": 0, @@ -15496,6 +18034,7 @@ var ( "values": 3, "increment": 4, "decrement": 5, + "random": 6, } ) @@ -15510,11 +18049,11 @@ func (x PatternFlowUdpSrcPort_Choice_Enum) String() string { } func (PatternFlowUdpSrcPort_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[284].Descriptor() + return file_otg_proto_enumTypes[327].Descriptor() } func (PatternFlowUdpSrcPort_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[284] + return &file_otg_proto_enumTypes[327] } func (x PatternFlowUdpSrcPort_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15523,7 +18062,7 @@ func (x PatternFlowUdpSrcPort_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowUdpSrcPort_Choice_Enum.Descriptor instead. func (PatternFlowUdpSrcPort_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{652, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{813, 0, 0} } type PatternFlowUdpDstPort_Choice_Enum int32 @@ -15534,6 +18073,7 @@ const ( PatternFlowUdpDstPort_Choice_values PatternFlowUdpDstPort_Choice_Enum = 3 PatternFlowUdpDstPort_Choice_increment PatternFlowUdpDstPort_Choice_Enum = 4 PatternFlowUdpDstPort_Choice_decrement PatternFlowUdpDstPort_Choice_Enum = 5 + PatternFlowUdpDstPort_Choice_random PatternFlowUdpDstPort_Choice_Enum = 6 ) // Enum value maps for PatternFlowUdpDstPort_Choice_Enum. @@ -15544,6 +18084,7 @@ var ( 3: "values", 4: "increment", 5: "decrement", + 6: "random", } PatternFlowUdpDstPort_Choice_Enum_value = map[string]int32{ "unspecified": 0, @@ -15551,6 +18092,7 @@ var ( "values": 3, "increment": 4, "decrement": 5, + "random": 6, } ) @@ -15565,11 +18107,11 @@ func (x PatternFlowUdpDstPort_Choice_Enum) String() string { } func (PatternFlowUdpDstPort_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[285].Descriptor() + return file_otg_proto_enumTypes[328].Descriptor() } func (PatternFlowUdpDstPort_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[285] + return &file_otg_proto_enumTypes[328] } func (x PatternFlowUdpDstPort_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15578,7 +18120,7 @@ func (x PatternFlowUdpDstPort_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowUdpDstPort_Choice_Enum.Descriptor instead. func (PatternFlowUdpDstPort_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{655, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{817, 0, 0} } type PatternFlowUdpLength_Choice_Enum int32 @@ -15620,11 +18162,11 @@ func (x PatternFlowUdpLength_Choice_Enum) String() string { } func (PatternFlowUdpLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[286].Descriptor() + return file_otg_proto_enumTypes[329].Descriptor() } func (PatternFlowUdpLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[286] + return &file_otg_proto_enumTypes[329] } func (x PatternFlowUdpLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15633,7 +18175,7 @@ func (x PatternFlowUdpLength_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowUdpLength_Choice_Enum.Descriptor instead. func (PatternFlowUdpLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{658, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{820, 0, 0} } type PatternFlowUdpChecksum_Choice_Enum int32 @@ -15669,11 +18211,11 @@ func (x PatternFlowUdpChecksum_Choice_Enum) String() string { } func (PatternFlowUdpChecksum_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[287].Descriptor() + return file_otg_proto_enumTypes[330].Descriptor() } func (PatternFlowUdpChecksum_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[287] + return &file_otg_proto_enumTypes[330] } func (x PatternFlowUdpChecksum_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15682,7 +18224,7 @@ func (x PatternFlowUdpChecksum_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowUdpChecksum_Choice_Enum.Descriptor instead. func (PatternFlowUdpChecksum_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{659, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{821, 0, 0} } type PatternFlowUdpChecksum_Generated_Enum int32 @@ -15718,11 +18260,11 @@ func (x PatternFlowUdpChecksum_Generated_Enum) String() string { } func (PatternFlowUdpChecksum_Generated_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[288].Descriptor() + return file_otg_proto_enumTypes[331].Descriptor() } func (PatternFlowUdpChecksum_Generated_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[288] + return &file_otg_proto_enumTypes[331] } func (x PatternFlowUdpChecksum_Generated_Enum) Number() protoreflect.EnumNumber { @@ -15731,7 +18273,7 @@ func (x PatternFlowUdpChecksum_Generated_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowUdpChecksum_Generated_Enum.Descriptor instead. func (PatternFlowUdpChecksum_Generated_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{659, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{821, 1, 0} } type PatternFlowGreChecksumPresent_Choice_Enum int32 @@ -15773,11 +18315,11 @@ func (x PatternFlowGreChecksumPresent_Choice_Enum) String() string { } func (PatternFlowGreChecksumPresent_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[289].Descriptor() + return file_otg_proto_enumTypes[332].Descriptor() } func (PatternFlowGreChecksumPresent_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[289] + return &file_otg_proto_enumTypes[332] } func (x PatternFlowGreChecksumPresent_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15786,7 +18328,7 @@ func (x PatternFlowGreChecksumPresent_Choice_Enum) Number() protoreflect.EnumNum // Deprecated: Use PatternFlowGreChecksumPresent_Choice_Enum.Descriptor instead. func (PatternFlowGreChecksumPresent_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{662, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{824, 0, 0} } type PatternFlowGreReserved0_Choice_Enum int32 @@ -15828,11 +18370,11 @@ func (x PatternFlowGreReserved0_Choice_Enum) String() string { } func (PatternFlowGreReserved0_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[290].Descriptor() + return file_otg_proto_enumTypes[333].Descriptor() } func (PatternFlowGreReserved0_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[290] + return &file_otg_proto_enumTypes[333] } func (x PatternFlowGreReserved0_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15841,7 +18383,7 @@ func (x PatternFlowGreReserved0_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGreReserved0_Choice_Enum.Descriptor instead. func (PatternFlowGreReserved0_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{665, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{827, 0, 0} } type PatternFlowGreVersion_Choice_Enum int32 @@ -15883,11 +18425,11 @@ func (x PatternFlowGreVersion_Choice_Enum) String() string { } func (PatternFlowGreVersion_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[291].Descriptor() + return file_otg_proto_enumTypes[334].Descriptor() } func (PatternFlowGreVersion_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[291] + return &file_otg_proto_enumTypes[334] } func (x PatternFlowGreVersion_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15896,7 +18438,7 @@ func (x PatternFlowGreVersion_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGreVersion_Choice_Enum.Descriptor instead. func (PatternFlowGreVersion_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{668, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{830, 0, 0} } type PatternFlowGreProtocol_Choice_Enum int32 @@ -15907,6 +18449,7 @@ const ( PatternFlowGreProtocol_Choice_values PatternFlowGreProtocol_Choice_Enum = 3 PatternFlowGreProtocol_Choice_increment PatternFlowGreProtocol_Choice_Enum = 4 PatternFlowGreProtocol_Choice_decrement PatternFlowGreProtocol_Choice_Enum = 5 + PatternFlowGreProtocol_Choice_auto PatternFlowGreProtocol_Choice_Enum = 1 ) // Enum value maps for PatternFlowGreProtocol_Choice_Enum. @@ -15917,6 +18460,7 @@ var ( 3: "values", 4: "increment", 5: "decrement", + 1: "auto", } PatternFlowGreProtocol_Choice_Enum_value = map[string]int32{ "unspecified": 0, @@ -15924,6 +18468,7 @@ var ( "values": 3, "increment": 4, "decrement": 5, + "auto": 1, } ) @@ -15938,11 +18483,11 @@ func (x PatternFlowGreProtocol_Choice_Enum) String() string { } func (PatternFlowGreProtocol_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[292].Descriptor() + return file_otg_proto_enumTypes[335].Descriptor() } func (PatternFlowGreProtocol_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[292] + return &file_otg_proto_enumTypes[335] } func (x PatternFlowGreProtocol_Choice_Enum) Number() protoreflect.EnumNumber { @@ -15951,7 +18496,7 @@ func (x PatternFlowGreProtocol_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGreProtocol_Choice_Enum.Descriptor instead. func (PatternFlowGreProtocol_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{671, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{833, 0, 0} } type PatternFlowGreChecksum_Choice_Enum int32 @@ -15987,11 +18532,11 @@ func (x PatternFlowGreChecksum_Choice_Enum) String() string { } func (PatternFlowGreChecksum_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[293].Descriptor() + return file_otg_proto_enumTypes[336].Descriptor() } func (PatternFlowGreChecksum_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[293] + return &file_otg_proto_enumTypes[336] } func (x PatternFlowGreChecksum_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16000,7 +18545,7 @@ func (x PatternFlowGreChecksum_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGreChecksum_Choice_Enum.Descriptor instead. func (PatternFlowGreChecksum_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{672, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{834, 0, 0} } type PatternFlowGreChecksum_Generated_Enum int32 @@ -16036,11 +18581,11 @@ func (x PatternFlowGreChecksum_Generated_Enum) String() string { } func (PatternFlowGreChecksum_Generated_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[294].Descriptor() + return file_otg_proto_enumTypes[337].Descriptor() } func (PatternFlowGreChecksum_Generated_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[294] + return &file_otg_proto_enumTypes[337] } func (x PatternFlowGreChecksum_Generated_Enum) Number() protoreflect.EnumNumber { @@ -16049,7 +18594,7 @@ func (x PatternFlowGreChecksum_Generated_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowGreChecksum_Generated_Enum.Descriptor instead. func (PatternFlowGreChecksum_Generated_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{672, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{834, 1, 0} } type PatternFlowGreReserved1_Choice_Enum int32 @@ -16091,11 +18636,11 @@ func (x PatternFlowGreReserved1_Choice_Enum) String() string { } func (PatternFlowGreReserved1_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[295].Descriptor() + return file_otg_proto_enumTypes[338].Descriptor() } func (PatternFlowGreReserved1_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[295] + return &file_otg_proto_enumTypes[338] } func (x PatternFlowGreReserved1_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16104,7 +18649,7 @@ func (x PatternFlowGreReserved1_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGreReserved1_Choice_Enum.Descriptor instead. func (PatternFlowGreReserved1_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{675, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{837, 0, 0} } type PatternFlowGtpv1Version_Choice_Enum int32 @@ -16146,11 +18691,11 @@ func (x PatternFlowGtpv1Version_Choice_Enum) String() string { } func (PatternFlowGtpv1Version_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[296].Descriptor() + return file_otg_proto_enumTypes[339].Descriptor() } func (PatternFlowGtpv1Version_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[296] + return &file_otg_proto_enumTypes[339] } func (x PatternFlowGtpv1Version_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16159,7 +18704,7 @@ func (x PatternFlowGtpv1Version_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGtpv1Version_Choice_Enum.Descriptor instead. func (PatternFlowGtpv1Version_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{678, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{840, 0, 0} } type PatternFlowGtpv1ProtocolType_Choice_Enum int32 @@ -16201,11 +18746,11 @@ func (x PatternFlowGtpv1ProtocolType_Choice_Enum) String() string { } func (PatternFlowGtpv1ProtocolType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[297].Descriptor() + return file_otg_proto_enumTypes[340].Descriptor() } func (PatternFlowGtpv1ProtocolType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[297] + return &file_otg_proto_enumTypes[340] } func (x PatternFlowGtpv1ProtocolType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16214,7 +18759,7 @@ func (x PatternFlowGtpv1ProtocolType_Choice_Enum) Number() protoreflect.EnumNumb // Deprecated: Use PatternFlowGtpv1ProtocolType_Choice_Enum.Descriptor instead. func (PatternFlowGtpv1ProtocolType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{681, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{843, 0, 0} } type PatternFlowGtpv1Reserved_Choice_Enum int32 @@ -16256,11 +18801,11 @@ func (x PatternFlowGtpv1Reserved_Choice_Enum) String() string { } func (PatternFlowGtpv1Reserved_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[298].Descriptor() + return file_otg_proto_enumTypes[341].Descriptor() } func (PatternFlowGtpv1Reserved_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[298] + return &file_otg_proto_enumTypes[341] } func (x PatternFlowGtpv1Reserved_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16269,7 +18814,7 @@ func (x PatternFlowGtpv1Reserved_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGtpv1Reserved_Choice_Enum.Descriptor instead. func (PatternFlowGtpv1Reserved_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{684, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{846, 0, 0} } type PatternFlowGtpv1EFlag_Choice_Enum int32 @@ -16311,11 +18856,11 @@ func (x PatternFlowGtpv1EFlag_Choice_Enum) String() string { } func (PatternFlowGtpv1EFlag_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[299].Descriptor() + return file_otg_proto_enumTypes[342].Descriptor() } func (PatternFlowGtpv1EFlag_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[299] + return &file_otg_proto_enumTypes[342] } func (x PatternFlowGtpv1EFlag_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16324,7 +18869,7 @@ func (x PatternFlowGtpv1EFlag_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGtpv1EFlag_Choice_Enum.Descriptor instead. func (PatternFlowGtpv1EFlag_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{687, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{849, 0, 0} } type PatternFlowGtpv1SFlag_Choice_Enum int32 @@ -16366,11 +18911,11 @@ func (x PatternFlowGtpv1SFlag_Choice_Enum) String() string { } func (PatternFlowGtpv1SFlag_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[300].Descriptor() + return file_otg_proto_enumTypes[343].Descriptor() } func (PatternFlowGtpv1SFlag_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[300] + return &file_otg_proto_enumTypes[343] } func (x PatternFlowGtpv1SFlag_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16379,7 +18924,7 @@ func (x PatternFlowGtpv1SFlag_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGtpv1SFlag_Choice_Enum.Descriptor instead. func (PatternFlowGtpv1SFlag_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{690, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{852, 0, 0} } type PatternFlowGtpv1PnFlag_Choice_Enum int32 @@ -16421,11 +18966,11 @@ func (x PatternFlowGtpv1PnFlag_Choice_Enum) String() string { } func (PatternFlowGtpv1PnFlag_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[301].Descriptor() + return file_otg_proto_enumTypes[344].Descriptor() } func (PatternFlowGtpv1PnFlag_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[301] + return &file_otg_proto_enumTypes[344] } func (x PatternFlowGtpv1PnFlag_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16434,7 +18979,7 @@ func (x PatternFlowGtpv1PnFlag_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGtpv1PnFlag_Choice_Enum.Descriptor instead. func (PatternFlowGtpv1PnFlag_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{693, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{855, 0, 0} } type PatternFlowGtpv1MessageType_Choice_Enum int32 @@ -16476,11 +19021,11 @@ func (x PatternFlowGtpv1MessageType_Choice_Enum) String() string { } func (PatternFlowGtpv1MessageType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[302].Descriptor() + return file_otg_proto_enumTypes[345].Descriptor() } func (PatternFlowGtpv1MessageType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[302] + return &file_otg_proto_enumTypes[345] } func (x PatternFlowGtpv1MessageType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16489,7 +19034,7 @@ func (x PatternFlowGtpv1MessageType_Choice_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use PatternFlowGtpv1MessageType_Choice_Enum.Descriptor instead. func (PatternFlowGtpv1MessageType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{696, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{858, 0, 0} } type PatternFlowGtpv1MessageLength_Choice_Enum int32 @@ -16531,11 +19076,11 @@ func (x PatternFlowGtpv1MessageLength_Choice_Enum) String() string { } func (PatternFlowGtpv1MessageLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[303].Descriptor() + return file_otg_proto_enumTypes[346].Descriptor() } func (PatternFlowGtpv1MessageLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[303] + return &file_otg_proto_enumTypes[346] } func (x PatternFlowGtpv1MessageLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16544,7 +19089,7 @@ func (x PatternFlowGtpv1MessageLength_Choice_Enum) Number() protoreflect.EnumNum // Deprecated: Use PatternFlowGtpv1MessageLength_Choice_Enum.Descriptor instead. func (PatternFlowGtpv1MessageLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{699, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{861, 0, 0} } type PatternFlowGtpv1Teid_Choice_Enum int32 @@ -16586,11 +19131,11 @@ func (x PatternFlowGtpv1Teid_Choice_Enum) String() string { } func (PatternFlowGtpv1Teid_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[304].Descriptor() + return file_otg_proto_enumTypes[347].Descriptor() } func (PatternFlowGtpv1Teid_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[304] + return &file_otg_proto_enumTypes[347] } func (x PatternFlowGtpv1Teid_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16599,7 +19144,7 @@ func (x PatternFlowGtpv1Teid_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGtpv1Teid_Choice_Enum.Descriptor instead. func (PatternFlowGtpv1Teid_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{702, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{864, 0, 0} } type PatternFlowGtpv1SquenceNumber_Choice_Enum int32 @@ -16641,11 +19186,11 @@ func (x PatternFlowGtpv1SquenceNumber_Choice_Enum) String() string { } func (PatternFlowGtpv1SquenceNumber_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[305].Descriptor() + return file_otg_proto_enumTypes[348].Descriptor() } func (PatternFlowGtpv1SquenceNumber_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[305] + return &file_otg_proto_enumTypes[348] } func (x PatternFlowGtpv1SquenceNumber_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16654,7 +19199,7 @@ func (x PatternFlowGtpv1SquenceNumber_Choice_Enum) Number() protoreflect.EnumNum // Deprecated: Use PatternFlowGtpv1SquenceNumber_Choice_Enum.Descriptor instead. func (PatternFlowGtpv1SquenceNumber_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{705, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{867, 0, 0} } type PatternFlowGtpv1NPduNumber_Choice_Enum int32 @@ -16696,11 +19241,11 @@ func (x PatternFlowGtpv1NPduNumber_Choice_Enum) String() string { } func (PatternFlowGtpv1NPduNumber_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[306].Descriptor() + return file_otg_proto_enumTypes[349].Descriptor() } func (PatternFlowGtpv1NPduNumber_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[306] + return &file_otg_proto_enumTypes[349] } func (x PatternFlowGtpv1NPduNumber_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16709,7 +19254,7 @@ func (x PatternFlowGtpv1NPduNumber_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowGtpv1NPduNumber_Choice_Enum.Descriptor instead. func (PatternFlowGtpv1NPduNumber_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{708, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{870, 0, 0} } type PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum int32 @@ -16751,11 +19296,11 @@ func (x PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum) String() string { } func (PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[307].Descriptor() + return file_otg_proto_enumTypes[350].Descriptor() } func (PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[307] + return &file_otg_proto_enumTypes[350] } func (x PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16764,7 +19309,7 @@ func (x PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum) Number() protorefle // Deprecated: Use PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum.Descriptor instead. func (PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{711, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{873, 0, 0} } type PatternFlowGtpExtensionExtensionLength_Choice_Enum int32 @@ -16806,11 +19351,11 @@ func (x PatternFlowGtpExtensionExtensionLength_Choice_Enum) String() string { } func (PatternFlowGtpExtensionExtensionLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[308].Descriptor() + return file_otg_proto_enumTypes[351].Descriptor() } func (PatternFlowGtpExtensionExtensionLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[308] + return &file_otg_proto_enumTypes[351] } func (x PatternFlowGtpExtensionExtensionLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16819,7 +19364,7 @@ func (x PatternFlowGtpExtensionExtensionLength_Choice_Enum) Number() protoreflec // Deprecated: Use PatternFlowGtpExtensionExtensionLength_Choice_Enum.Descriptor instead. func (PatternFlowGtpExtensionExtensionLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{714, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{876, 0, 0} } type PatternFlowGtpExtensionContents_Choice_Enum int32 @@ -16861,11 +19406,11 @@ func (x PatternFlowGtpExtensionContents_Choice_Enum) String() string { } func (PatternFlowGtpExtensionContents_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[309].Descriptor() + return file_otg_proto_enumTypes[352].Descriptor() } func (PatternFlowGtpExtensionContents_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[309] + return &file_otg_proto_enumTypes[352] } func (x PatternFlowGtpExtensionContents_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16874,7 +19419,7 @@ func (x PatternFlowGtpExtensionContents_Choice_Enum) Number() protoreflect.EnumN // Deprecated: Use PatternFlowGtpExtensionContents_Choice_Enum.Descriptor instead. func (PatternFlowGtpExtensionContents_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{717, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{879, 0, 0} } type PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum int32 @@ -16916,11 +19461,11 @@ func (x PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum) String() string } func (PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[310].Descriptor() + return file_otg_proto_enumTypes[353].Descriptor() } func (PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[310] + return &file_otg_proto_enumTypes[353] } func (x PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16929,7 +19474,7 @@ func (x PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum) Number() protore // Deprecated: Use PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum.Descriptor instead. func (PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{720, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{882, 0, 0} } type PatternFlowGtpv2Version_Choice_Enum int32 @@ -16971,11 +19516,11 @@ func (x PatternFlowGtpv2Version_Choice_Enum) String() string { } func (PatternFlowGtpv2Version_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[311].Descriptor() + return file_otg_proto_enumTypes[354].Descriptor() } func (PatternFlowGtpv2Version_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[311] + return &file_otg_proto_enumTypes[354] } func (x PatternFlowGtpv2Version_Choice_Enum) Number() protoreflect.EnumNumber { @@ -16984,7 +19529,7 @@ func (x PatternFlowGtpv2Version_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGtpv2Version_Choice_Enum.Descriptor instead. func (PatternFlowGtpv2Version_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{723, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{885, 0, 0} } type PatternFlowGtpv2PiggybackingFlag_Choice_Enum int32 @@ -17026,11 +19571,11 @@ func (x PatternFlowGtpv2PiggybackingFlag_Choice_Enum) String() string { } func (PatternFlowGtpv2PiggybackingFlag_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[312].Descriptor() + return file_otg_proto_enumTypes[355].Descriptor() } func (PatternFlowGtpv2PiggybackingFlag_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[312] + return &file_otg_proto_enumTypes[355] } func (x PatternFlowGtpv2PiggybackingFlag_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17039,7 +19584,7 @@ func (x PatternFlowGtpv2PiggybackingFlag_Choice_Enum) Number() protoreflect.Enum // Deprecated: Use PatternFlowGtpv2PiggybackingFlag_Choice_Enum.Descriptor instead. func (PatternFlowGtpv2PiggybackingFlag_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{726, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{888, 0, 0} } type PatternFlowGtpv2TeidFlag_Choice_Enum int32 @@ -17081,11 +19626,11 @@ func (x PatternFlowGtpv2TeidFlag_Choice_Enum) String() string { } func (PatternFlowGtpv2TeidFlag_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[313].Descriptor() + return file_otg_proto_enumTypes[356].Descriptor() } func (PatternFlowGtpv2TeidFlag_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[313] + return &file_otg_proto_enumTypes[356] } func (x PatternFlowGtpv2TeidFlag_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17094,7 +19639,7 @@ func (x PatternFlowGtpv2TeidFlag_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGtpv2TeidFlag_Choice_Enum.Descriptor instead. func (PatternFlowGtpv2TeidFlag_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{729, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{891, 0, 0} } type PatternFlowGtpv2Spare1_Choice_Enum int32 @@ -17136,11 +19681,11 @@ func (x PatternFlowGtpv2Spare1_Choice_Enum) String() string { } func (PatternFlowGtpv2Spare1_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[314].Descriptor() + return file_otg_proto_enumTypes[357].Descriptor() } func (PatternFlowGtpv2Spare1_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[314] + return &file_otg_proto_enumTypes[357] } func (x PatternFlowGtpv2Spare1_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17149,7 +19694,7 @@ func (x PatternFlowGtpv2Spare1_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGtpv2Spare1_Choice_Enum.Descriptor instead. func (PatternFlowGtpv2Spare1_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{732, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{894, 0, 0} } type PatternFlowGtpv2MessageType_Choice_Enum int32 @@ -17191,11 +19736,11 @@ func (x PatternFlowGtpv2MessageType_Choice_Enum) String() string { } func (PatternFlowGtpv2MessageType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[315].Descriptor() + return file_otg_proto_enumTypes[358].Descriptor() } func (PatternFlowGtpv2MessageType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[315] + return &file_otg_proto_enumTypes[358] } func (x PatternFlowGtpv2MessageType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17204,7 +19749,7 @@ func (x PatternFlowGtpv2MessageType_Choice_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use PatternFlowGtpv2MessageType_Choice_Enum.Descriptor instead. func (PatternFlowGtpv2MessageType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{735, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{897, 0, 0} } type PatternFlowGtpv2MessageLength_Choice_Enum int32 @@ -17246,11 +19791,11 @@ func (x PatternFlowGtpv2MessageLength_Choice_Enum) String() string { } func (PatternFlowGtpv2MessageLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[316].Descriptor() + return file_otg_proto_enumTypes[359].Descriptor() } func (PatternFlowGtpv2MessageLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[316] + return &file_otg_proto_enumTypes[359] } func (x PatternFlowGtpv2MessageLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17259,7 +19804,7 @@ func (x PatternFlowGtpv2MessageLength_Choice_Enum) Number() protoreflect.EnumNum // Deprecated: Use PatternFlowGtpv2MessageLength_Choice_Enum.Descriptor instead. func (PatternFlowGtpv2MessageLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{738, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{900, 0, 0} } type PatternFlowGtpv2Teid_Choice_Enum int32 @@ -17301,11 +19846,11 @@ func (x PatternFlowGtpv2Teid_Choice_Enum) String() string { } func (PatternFlowGtpv2Teid_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[317].Descriptor() + return file_otg_proto_enumTypes[360].Descriptor() } func (PatternFlowGtpv2Teid_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[317] + return &file_otg_proto_enumTypes[360] } func (x PatternFlowGtpv2Teid_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17314,7 +19859,7 @@ func (x PatternFlowGtpv2Teid_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGtpv2Teid_Choice_Enum.Descriptor instead. func (PatternFlowGtpv2Teid_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{741, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{903, 0, 0} } type PatternFlowGtpv2SequenceNumber_Choice_Enum int32 @@ -17356,11 +19901,11 @@ func (x PatternFlowGtpv2SequenceNumber_Choice_Enum) String() string { } func (PatternFlowGtpv2SequenceNumber_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[318].Descriptor() + return file_otg_proto_enumTypes[361].Descriptor() } func (PatternFlowGtpv2SequenceNumber_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[318] + return &file_otg_proto_enumTypes[361] } func (x PatternFlowGtpv2SequenceNumber_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17369,7 +19914,7 @@ func (x PatternFlowGtpv2SequenceNumber_Choice_Enum) Number() protoreflect.EnumNu // Deprecated: Use PatternFlowGtpv2SequenceNumber_Choice_Enum.Descriptor instead. func (PatternFlowGtpv2SequenceNumber_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{744, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{906, 0, 0} } type PatternFlowGtpv2Spare2_Choice_Enum int32 @@ -17411,11 +19956,11 @@ func (x PatternFlowGtpv2Spare2_Choice_Enum) String() string { } func (PatternFlowGtpv2Spare2_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[319].Descriptor() + return file_otg_proto_enumTypes[362].Descriptor() } func (PatternFlowGtpv2Spare2_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[319] + return &file_otg_proto_enumTypes[362] } func (x PatternFlowGtpv2Spare2_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17424,7 +19969,7 @@ func (x PatternFlowGtpv2Spare2_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowGtpv2Spare2_Choice_Enum.Descriptor instead. func (PatternFlowGtpv2Spare2_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{747, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{909, 0, 0} } type PatternFlowArpHardwareType_Choice_Enum int32 @@ -17466,11 +20011,11 @@ func (x PatternFlowArpHardwareType_Choice_Enum) String() string { } func (PatternFlowArpHardwareType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[320].Descriptor() + return file_otg_proto_enumTypes[363].Descriptor() } func (PatternFlowArpHardwareType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[320] + return &file_otg_proto_enumTypes[363] } func (x PatternFlowArpHardwareType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17479,7 +20024,7 @@ func (x PatternFlowArpHardwareType_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowArpHardwareType_Choice_Enum.Descriptor instead. func (PatternFlowArpHardwareType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{750, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{912, 0, 0} } type PatternFlowArpProtocolType_Choice_Enum int32 @@ -17521,11 +20066,11 @@ func (x PatternFlowArpProtocolType_Choice_Enum) String() string { } func (PatternFlowArpProtocolType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[321].Descriptor() + return file_otg_proto_enumTypes[364].Descriptor() } func (PatternFlowArpProtocolType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[321] + return &file_otg_proto_enumTypes[364] } func (x PatternFlowArpProtocolType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17534,7 +20079,7 @@ func (x PatternFlowArpProtocolType_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowArpProtocolType_Choice_Enum.Descriptor instead. func (PatternFlowArpProtocolType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{753, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{915, 0, 0} } type PatternFlowArpHardwareLength_Choice_Enum int32 @@ -17576,11 +20121,11 @@ func (x PatternFlowArpHardwareLength_Choice_Enum) String() string { } func (PatternFlowArpHardwareLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[322].Descriptor() + return file_otg_proto_enumTypes[365].Descriptor() } func (PatternFlowArpHardwareLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[322] + return &file_otg_proto_enumTypes[365] } func (x PatternFlowArpHardwareLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17589,7 +20134,7 @@ func (x PatternFlowArpHardwareLength_Choice_Enum) Number() protoreflect.EnumNumb // Deprecated: Use PatternFlowArpHardwareLength_Choice_Enum.Descriptor instead. func (PatternFlowArpHardwareLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{756, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{918, 0, 0} } type PatternFlowArpProtocolLength_Choice_Enum int32 @@ -17631,11 +20176,11 @@ func (x PatternFlowArpProtocolLength_Choice_Enum) String() string { } func (PatternFlowArpProtocolLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[323].Descriptor() + return file_otg_proto_enumTypes[366].Descriptor() } func (PatternFlowArpProtocolLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[323] + return &file_otg_proto_enumTypes[366] } func (x PatternFlowArpProtocolLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17644,7 +20189,7 @@ func (x PatternFlowArpProtocolLength_Choice_Enum) Number() protoreflect.EnumNumb // Deprecated: Use PatternFlowArpProtocolLength_Choice_Enum.Descriptor instead. func (PatternFlowArpProtocolLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{759, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{921, 0, 0} } type PatternFlowArpOperation_Choice_Enum int32 @@ -17686,11 +20231,11 @@ func (x PatternFlowArpOperation_Choice_Enum) String() string { } func (PatternFlowArpOperation_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[324].Descriptor() + return file_otg_proto_enumTypes[367].Descriptor() } func (PatternFlowArpOperation_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[324] + return &file_otg_proto_enumTypes[367] } func (x PatternFlowArpOperation_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17699,7 +20244,7 @@ func (x PatternFlowArpOperation_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowArpOperation_Choice_Enum.Descriptor instead. func (PatternFlowArpOperation_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{762, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{924, 0, 0} } type PatternFlowArpSenderHardwareAddr_Choice_Enum int32 @@ -17741,11 +20286,11 @@ func (x PatternFlowArpSenderHardwareAddr_Choice_Enum) String() string { } func (PatternFlowArpSenderHardwareAddr_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[325].Descriptor() + return file_otg_proto_enumTypes[368].Descriptor() } func (PatternFlowArpSenderHardwareAddr_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[325] + return &file_otg_proto_enumTypes[368] } func (x PatternFlowArpSenderHardwareAddr_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17754,7 +20299,7 @@ func (x PatternFlowArpSenderHardwareAddr_Choice_Enum) Number() protoreflect.Enum // Deprecated: Use PatternFlowArpSenderHardwareAddr_Choice_Enum.Descriptor instead. func (PatternFlowArpSenderHardwareAddr_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{765, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{927, 0, 0} } type PatternFlowArpSenderProtocolAddr_Choice_Enum int32 @@ -17796,11 +20341,11 @@ func (x PatternFlowArpSenderProtocolAddr_Choice_Enum) String() string { } func (PatternFlowArpSenderProtocolAddr_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[326].Descriptor() + return file_otg_proto_enumTypes[369].Descriptor() } func (PatternFlowArpSenderProtocolAddr_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[326] + return &file_otg_proto_enumTypes[369] } func (x PatternFlowArpSenderProtocolAddr_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17809,7 +20354,7 @@ func (x PatternFlowArpSenderProtocolAddr_Choice_Enum) Number() protoreflect.Enum // Deprecated: Use PatternFlowArpSenderProtocolAddr_Choice_Enum.Descriptor instead. func (PatternFlowArpSenderProtocolAddr_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{768, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{930, 0, 0} } type PatternFlowArpTargetHardwareAddr_Choice_Enum int32 @@ -17851,11 +20396,11 @@ func (x PatternFlowArpTargetHardwareAddr_Choice_Enum) String() string { } func (PatternFlowArpTargetHardwareAddr_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[327].Descriptor() + return file_otg_proto_enumTypes[370].Descriptor() } func (PatternFlowArpTargetHardwareAddr_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[327] + return &file_otg_proto_enumTypes[370] } func (x PatternFlowArpTargetHardwareAddr_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17864,7 +20409,7 @@ func (x PatternFlowArpTargetHardwareAddr_Choice_Enum) Number() protoreflect.Enum // Deprecated: Use PatternFlowArpTargetHardwareAddr_Choice_Enum.Descriptor instead. func (PatternFlowArpTargetHardwareAddr_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{771, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{933, 0, 0} } type PatternFlowArpTargetProtocolAddr_Choice_Enum int32 @@ -17906,11 +20451,11 @@ func (x PatternFlowArpTargetProtocolAddr_Choice_Enum) String() string { } func (PatternFlowArpTargetProtocolAddr_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[328].Descriptor() + return file_otg_proto_enumTypes[371].Descriptor() } func (PatternFlowArpTargetProtocolAddr_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[328] + return &file_otg_proto_enumTypes[371] } func (x PatternFlowArpTargetProtocolAddr_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17919,7 +20464,7 @@ func (x PatternFlowArpTargetProtocolAddr_Choice_Enum) Number() protoreflect.Enum // Deprecated: Use PatternFlowArpTargetProtocolAddr_Choice_Enum.Descriptor instead. func (PatternFlowArpTargetProtocolAddr_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{774, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{936, 0, 0} } type PatternFlowIcmpEchoType_Choice_Enum int32 @@ -17961,11 +20506,11 @@ func (x PatternFlowIcmpEchoType_Choice_Enum) String() string { } func (PatternFlowIcmpEchoType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[329].Descriptor() + return file_otg_proto_enumTypes[372].Descriptor() } func (PatternFlowIcmpEchoType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[329] + return &file_otg_proto_enumTypes[372] } func (x PatternFlowIcmpEchoType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -17974,7 +20519,7 @@ func (x PatternFlowIcmpEchoType_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIcmpEchoType_Choice_Enum.Descriptor instead. func (PatternFlowIcmpEchoType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{777, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{939, 0, 0} } type PatternFlowIcmpEchoCode_Choice_Enum int32 @@ -18016,11 +20561,11 @@ func (x PatternFlowIcmpEchoCode_Choice_Enum) String() string { } func (PatternFlowIcmpEchoCode_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[330].Descriptor() + return file_otg_proto_enumTypes[373].Descriptor() } func (PatternFlowIcmpEchoCode_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[330] + return &file_otg_proto_enumTypes[373] } func (x PatternFlowIcmpEchoCode_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18029,7 +20574,7 @@ func (x PatternFlowIcmpEchoCode_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIcmpEchoCode_Choice_Enum.Descriptor instead. func (PatternFlowIcmpEchoCode_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{780, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{942, 0, 0} } type PatternFlowIcmpEchoChecksum_Choice_Enum int32 @@ -18065,11 +20610,11 @@ func (x PatternFlowIcmpEchoChecksum_Choice_Enum) String() string { } func (PatternFlowIcmpEchoChecksum_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[331].Descriptor() + return file_otg_proto_enumTypes[374].Descriptor() } func (PatternFlowIcmpEchoChecksum_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[331] + return &file_otg_proto_enumTypes[374] } func (x PatternFlowIcmpEchoChecksum_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18078,7 +20623,7 @@ func (x PatternFlowIcmpEchoChecksum_Choice_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use PatternFlowIcmpEchoChecksum_Choice_Enum.Descriptor instead. func (PatternFlowIcmpEchoChecksum_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{781, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{943, 0, 0} } type PatternFlowIcmpEchoChecksum_Generated_Enum int32 @@ -18114,11 +20659,11 @@ func (x PatternFlowIcmpEchoChecksum_Generated_Enum) String() string { } func (PatternFlowIcmpEchoChecksum_Generated_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[332].Descriptor() + return file_otg_proto_enumTypes[375].Descriptor() } func (PatternFlowIcmpEchoChecksum_Generated_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[332] + return &file_otg_proto_enumTypes[375] } func (x PatternFlowIcmpEchoChecksum_Generated_Enum) Number() protoreflect.EnumNumber { @@ -18127,7 +20672,7 @@ func (x PatternFlowIcmpEchoChecksum_Generated_Enum) Number() protoreflect.EnumNu // Deprecated: Use PatternFlowIcmpEchoChecksum_Generated_Enum.Descriptor instead. func (PatternFlowIcmpEchoChecksum_Generated_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{781, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{943, 1, 0} } type PatternFlowIcmpEchoIdentifier_Choice_Enum int32 @@ -18169,11 +20714,11 @@ func (x PatternFlowIcmpEchoIdentifier_Choice_Enum) String() string { } func (PatternFlowIcmpEchoIdentifier_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[333].Descriptor() + return file_otg_proto_enumTypes[376].Descriptor() } func (PatternFlowIcmpEchoIdentifier_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[333] + return &file_otg_proto_enumTypes[376] } func (x PatternFlowIcmpEchoIdentifier_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18182,7 +20727,7 @@ func (x PatternFlowIcmpEchoIdentifier_Choice_Enum) Number() protoreflect.EnumNum // Deprecated: Use PatternFlowIcmpEchoIdentifier_Choice_Enum.Descriptor instead. func (PatternFlowIcmpEchoIdentifier_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{784, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{946, 0, 0} } type PatternFlowIcmpEchoSequenceNumber_Choice_Enum int32 @@ -18224,11 +20769,11 @@ func (x PatternFlowIcmpEchoSequenceNumber_Choice_Enum) String() string { } func (PatternFlowIcmpEchoSequenceNumber_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[334].Descriptor() + return file_otg_proto_enumTypes[377].Descriptor() } func (PatternFlowIcmpEchoSequenceNumber_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[334] + return &file_otg_proto_enumTypes[377] } func (x PatternFlowIcmpEchoSequenceNumber_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18237,7 +20782,7 @@ func (x PatternFlowIcmpEchoSequenceNumber_Choice_Enum) Number() protoreflect.Enu // Deprecated: Use PatternFlowIcmpEchoSequenceNumber_Choice_Enum.Descriptor instead. func (PatternFlowIcmpEchoSequenceNumber_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{787, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{949, 0, 0} } type PatternFlowIcmpCommonChecksum_Choice_Enum int32 @@ -18273,11 +20818,11 @@ func (x PatternFlowIcmpCommonChecksum_Choice_Enum) String() string { } func (PatternFlowIcmpCommonChecksum_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[335].Descriptor() + return file_otg_proto_enumTypes[378].Descriptor() } func (PatternFlowIcmpCommonChecksum_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[335] + return &file_otg_proto_enumTypes[378] } func (x PatternFlowIcmpCommonChecksum_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18286,7 +20831,7 @@ func (x PatternFlowIcmpCommonChecksum_Choice_Enum) Number() protoreflect.EnumNum // Deprecated: Use PatternFlowIcmpCommonChecksum_Choice_Enum.Descriptor instead. func (PatternFlowIcmpCommonChecksum_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{788, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{950, 0, 0} } type PatternFlowIcmpCommonChecksum_Generated_Enum int32 @@ -18322,11 +20867,11 @@ func (x PatternFlowIcmpCommonChecksum_Generated_Enum) String() string { } func (PatternFlowIcmpCommonChecksum_Generated_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[336].Descriptor() + return file_otg_proto_enumTypes[379].Descriptor() } func (PatternFlowIcmpCommonChecksum_Generated_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[336] + return &file_otg_proto_enumTypes[379] } func (x PatternFlowIcmpCommonChecksum_Generated_Enum) Number() protoreflect.EnumNumber { @@ -18335,7 +20880,7 @@ func (x PatternFlowIcmpCommonChecksum_Generated_Enum) Number() protoreflect.Enum // Deprecated: Use PatternFlowIcmpCommonChecksum_Generated_Enum.Descriptor instead. func (PatternFlowIcmpCommonChecksum_Generated_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{788, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{950, 1, 0} } type PatternFlowIcmpNextFieldsIdentifier_Choice_Enum int32 @@ -18377,11 +20922,11 @@ func (x PatternFlowIcmpNextFieldsIdentifier_Choice_Enum) String() string { } func (PatternFlowIcmpNextFieldsIdentifier_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[337].Descriptor() + return file_otg_proto_enumTypes[380].Descriptor() } func (PatternFlowIcmpNextFieldsIdentifier_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[337] + return &file_otg_proto_enumTypes[380] } func (x PatternFlowIcmpNextFieldsIdentifier_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18390,7 +20935,7 @@ func (x PatternFlowIcmpNextFieldsIdentifier_Choice_Enum) Number() protoreflect.E // Deprecated: Use PatternFlowIcmpNextFieldsIdentifier_Choice_Enum.Descriptor instead. func (PatternFlowIcmpNextFieldsIdentifier_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{791, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{953, 0, 0} } type PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum int32 @@ -18432,11 +20977,11 @@ func (x PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum) String() string { } func (PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[338].Descriptor() + return file_otg_proto_enumTypes[381].Descriptor() } func (PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[338] + return &file_otg_proto_enumTypes[381] } func (x PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18445,7 +20990,7 @@ func (x PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum) Number() protorefle // Deprecated: Use PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum.Descriptor instead. func (PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{794, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{956, 0, 0} } type PatternFlowIcmpv6EchoType_Choice_Enum int32 @@ -18487,11 +21032,11 @@ func (x PatternFlowIcmpv6EchoType_Choice_Enum) String() string { } func (PatternFlowIcmpv6EchoType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[339].Descriptor() + return file_otg_proto_enumTypes[382].Descriptor() } func (PatternFlowIcmpv6EchoType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[339] + return &file_otg_proto_enumTypes[382] } func (x PatternFlowIcmpv6EchoType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18500,7 +21045,7 @@ func (x PatternFlowIcmpv6EchoType_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowIcmpv6EchoType_Choice_Enum.Descriptor instead. func (PatternFlowIcmpv6EchoType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{797, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{959, 0, 0} } type PatternFlowIcmpv6EchoCode_Choice_Enum int32 @@ -18542,11 +21087,11 @@ func (x PatternFlowIcmpv6EchoCode_Choice_Enum) String() string { } func (PatternFlowIcmpv6EchoCode_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[340].Descriptor() + return file_otg_proto_enumTypes[383].Descriptor() } func (PatternFlowIcmpv6EchoCode_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[340] + return &file_otg_proto_enumTypes[383] } func (x PatternFlowIcmpv6EchoCode_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18555,7 +21100,7 @@ func (x PatternFlowIcmpv6EchoCode_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowIcmpv6EchoCode_Choice_Enum.Descriptor instead. func (PatternFlowIcmpv6EchoCode_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{800, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{962, 0, 0} } type PatternFlowIcmpv6EchoIdentifier_Choice_Enum int32 @@ -18597,11 +21142,11 @@ func (x PatternFlowIcmpv6EchoIdentifier_Choice_Enum) String() string { } func (PatternFlowIcmpv6EchoIdentifier_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[341].Descriptor() + return file_otg_proto_enumTypes[384].Descriptor() } func (PatternFlowIcmpv6EchoIdentifier_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[341] + return &file_otg_proto_enumTypes[384] } func (x PatternFlowIcmpv6EchoIdentifier_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18610,7 +21155,7 @@ func (x PatternFlowIcmpv6EchoIdentifier_Choice_Enum) Number() protoreflect.EnumN // Deprecated: Use PatternFlowIcmpv6EchoIdentifier_Choice_Enum.Descriptor instead. func (PatternFlowIcmpv6EchoIdentifier_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{803, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{965, 0, 0} } type PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum int32 @@ -18652,11 +21197,11 @@ func (x PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum) String() string { } func (PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[342].Descriptor() + return file_otg_proto_enumTypes[385].Descriptor() } func (PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[342] + return &file_otg_proto_enumTypes[385] } func (x PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18665,7 +21210,7 @@ func (x PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum) Number() protoreflect.E // Deprecated: Use PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum.Descriptor instead. func (PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{806, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{968, 0, 0} } type PatternFlowIcmpv6EchoChecksum_Choice_Enum int32 @@ -18701,11 +21246,11 @@ func (x PatternFlowIcmpv6EchoChecksum_Choice_Enum) String() string { } func (PatternFlowIcmpv6EchoChecksum_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[343].Descriptor() + return file_otg_proto_enumTypes[386].Descriptor() } func (PatternFlowIcmpv6EchoChecksum_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[343] + return &file_otg_proto_enumTypes[386] } func (x PatternFlowIcmpv6EchoChecksum_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18714,7 +21259,7 @@ func (x PatternFlowIcmpv6EchoChecksum_Choice_Enum) Number() protoreflect.EnumNum // Deprecated: Use PatternFlowIcmpv6EchoChecksum_Choice_Enum.Descriptor instead. func (PatternFlowIcmpv6EchoChecksum_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{807, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{969, 0, 0} } type PatternFlowIcmpv6EchoChecksum_Generated_Enum int32 @@ -18750,11 +21295,11 @@ func (x PatternFlowIcmpv6EchoChecksum_Generated_Enum) String() string { } func (PatternFlowIcmpv6EchoChecksum_Generated_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[344].Descriptor() + return file_otg_proto_enumTypes[387].Descriptor() } func (PatternFlowIcmpv6EchoChecksum_Generated_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[344] + return &file_otg_proto_enumTypes[387] } func (x PatternFlowIcmpv6EchoChecksum_Generated_Enum) Number() protoreflect.EnumNumber { @@ -18763,7 +21308,7 @@ func (x PatternFlowIcmpv6EchoChecksum_Generated_Enum) Number() protoreflect.Enum // Deprecated: Use PatternFlowIcmpv6EchoChecksum_Generated_Enum.Descriptor instead. func (PatternFlowIcmpv6EchoChecksum_Generated_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{807, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{969, 1, 0} } type PatternFlowIcmpv6CommonChecksum_Choice_Enum int32 @@ -18799,11 +21344,11 @@ func (x PatternFlowIcmpv6CommonChecksum_Choice_Enum) String() string { } func (PatternFlowIcmpv6CommonChecksum_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[345].Descriptor() + return file_otg_proto_enumTypes[388].Descriptor() } func (PatternFlowIcmpv6CommonChecksum_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[345] + return &file_otg_proto_enumTypes[388] } func (x PatternFlowIcmpv6CommonChecksum_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18812,7 +21357,7 @@ func (x PatternFlowIcmpv6CommonChecksum_Choice_Enum) Number() protoreflect.EnumN // Deprecated: Use PatternFlowIcmpv6CommonChecksum_Choice_Enum.Descriptor instead. func (PatternFlowIcmpv6CommonChecksum_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{808, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{970, 0, 0} } type PatternFlowIcmpv6CommonChecksum_Generated_Enum int32 @@ -18848,11 +21393,11 @@ func (x PatternFlowIcmpv6CommonChecksum_Generated_Enum) String() string { } func (PatternFlowIcmpv6CommonChecksum_Generated_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[346].Descriptor() + return file_otg_proto_enumTypes[389].Descriptor() } func (PatternFlowIcmpv6CommonChecksum_Generated_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[346] + return &file_otg_proto_enumTypes[389] } func (x PatternFlowIcmpv6CommonChecksum_Generated_Enum) Number() protoreflect.EnumNumber { @@ -18861,7 +21406,7 @@ func (x PatternFlowIcmpv6CommonChecksum_Generated_Enum) Number() protoreflect.En // Deprecated: Use PatternFlowIcmpv6CommonChecksum_Generated_Enum.Descriptor instead. func (PatternFlowIcmpv6CommonChecksum_Generated_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{808, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{970, 1, 0} } type PatternFlowPppAddress_Choice_Enum int32 @@ -18903,11 +21448,11 @@ func (x PatternFlowPppAddress_Choice_Enum) String() string { } func (PatternFlowPppAddress_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[347].Descriptor() + return file_otg_proto_enumTypes[390].Descriptor() } func (PatternFlowPppAddress_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[347] + return &file_otg_proto_enumTypes[390] } func (x PatternFlowPppAddress_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18916,7 +21461,7 @@ func (x PatternFlowPppAddress_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowPppAddress_Choice_Enum.Descriptor instead. func (PatternFlowPppAddress_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{811, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{973, 0, 0} } type PatternFlowPppControl_Choice_Enum int32 @@ -18958,11 +21503,11 @@ func (x PatternFlowPppControl_Choice_Enum) String() string { } func (PatternFlowPppControl_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[348].Descriptor() + return file_otg_proto_enumTypes[391].Descriptor() } func (PatternFlowPppControl_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[348] + return &file_otg_proto_enumTypes[391] } func (x PatternFlowPppControl_Choice_Enum) Number() protoreflect.EnumNumber { @@ -18971,7 +21516,7 @@ func (x PatternFlowPppControl_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowPppControl_Choice_Enum.Descriptor instead. func (PatternFlowPppControl_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{814, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{976, 0, 0} } type PatternFlowPppProtocolType_Choice_Enum int32 @@ -19016,11 +21561,11 @@ func (x PatternFlowPppProtocolType_Choice_Enum) String() string { } func (PatternFlowPppProtocolType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[349].Descriptor() + return file_otg_proto_enumTypes[392].Descriptor() } func (PatternFlowPppProtocolType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[349] + return &file_otg_proto_enumTypes[392] } func (x PatternFlowPppProtocolType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19029,7 +21574,7 @@ func (x PatternFlowPppProtocolType_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowPppProtocolType_Choice_Enum.Descriptor instead. func (PatternFlowPppProtocolType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{817, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{979, 0, 0} } type PatternFlowIgmpv1Version_Choice_Enum int32 @@ -19071,11 +21616,11 @@ func (x PatternFlowIgmpv1Version_Choice_Enum) String() string { } func (PatternFlowIgmpv1Version_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[350].Descriptor() + return file_otg_proto_enumTypes[393].Descriptor() } func (PatternFlowIgmpv1Version_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[350] + return &file_otg_proto_enumTypes[393] } func (x PatternFlowIgmpv1Version_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19084,7 +21629,7 @@ func (x PatternFlowIgmpv1Version_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIgmpv1Version_Choice_Enum.Descriptor instead. func (PatternFlowIgmpv1Version_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{820, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{982, 0, 0} } type PatternFlowIgmpv1Type_Choice_Enum int32 @@ -19126,11 +21671,11 @@ func (x PatternFlowIgmpv1Type_Choice_Enum) String() string { } func (PatternFlowIgmpv1Type_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[351].Descriptor() + return file_otg_proto_enumTypes[394].Descriptor() } func (PatternFlowIgmpv1Type_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[351] + return &file_otg_proto_enumTypes[394] } func (x PatternFlowIgmpv1Type_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19139,7 +21684,7 @@ func (x PatternFlowIgmpv1Type_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIgmpv1Type_Choice_Enum.Descriptor instead. func (PatternFlowIgmpv1Type_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{823, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{985, 0, 0} } type PatternFlowIgmpv1Unused_Choice_Enum int32 @@ -19181,11 +21726,11 @@ func (x PatternFlowIgmpv1Unused_Choice_Enum) String() string { } func (PatternFlowIgmpv1Unused_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[352].Descriptor() + return file_otg_proto_enumTypes[395].Descriptor() } func (PatternFlowIgmpv1Unused_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[352] + return &file_otg_proto_enumTypes[395] } func (x PatternFlowIgmpv1Unused_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19194,7 +21739,7 @@ func (x PatternFlowIgmpv1Unused_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowIgmpv1Unused_Choice_Enum.Descriptor instead. func (PatternFlowIgmpv1Unused_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{826, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{988, 0, 0} } type PatternFlowIgmpv1Checksum_Choice_Enum int32 @@ -19230,11 +21775,11 @@ func (x PatternFlowIgmpv1Checksum_Choice_Enum) String() string { } func (PatternFlowIgmpv1Checksum_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[353].Descriptor() + return file_otg_proto_enumTypes[396].Descriptor() } func (PatternFlowIgmpv1Checksum_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[353] + return &file_otg_proto_enumTypes[396] } func (x PatternFlowIgmpv1Checksum_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19243,7 +21788,7 @@ func (x PatternFlowIgmpv1Checksum_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowIgmpv1Checksum_Choice_Enum.Descriptor instead. func (PatternFlowIgmpv1Checksum_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{827, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{989, 0, 0} } type PatternFlowIgmpv1Checksum_Generated_Enum int32 @@ -19279,11 +21824,11 @@ func (x PatternFlowIgmpv1Checksum_Generated_Enum) String() string { } func (PatternFlowIgmpv1Checksum_Generated_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[354].Descriptor() + return file_otg_proto_enumTypes[397].Descriptor() } func (PatternFlowIgmpv1Checksum_Generated_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[354] + return &file_otg_proto_enumTypes[397] } func (x PatternFlowIgmpv1Checksum_Generated_Enum) Number() protoreflect.EnumNumber { @@ -19292,7 +21837,7 @@ func (x PatternFlowIgmpv1Checksum_Generated_Enum) Number() protoreflect.EnumNumb // Deprecated: Use PatternFlowIgmpv1Checksum_Generated_Enum.Descriptor instead. func (PatternFlowIgmpv1Checksum_Generated_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{827, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{989, 1, 0} } type PatternFlowIgmpv1GroupAddress_Choice_Enum int32 @@ -19334,11 +21879,11 @@ func (x PatternFlowIgmpv1GroupAddress_Choice_Enum) String() string { } func (PatternFlowIgmpv1GroupAddress_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[355].Descriptor() + return file_otg_proto_enumTypes[398].Descriptor() } func (PatternFlowIgmpv1GroupAddress_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[355] + return &file_otg_proto_enumTypes[398] } func (x PatternFlowIgmpv1GroupAddress_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19347,7 +21892,7 @@ func (x PatternFlowIgmpv1GroupAddress_Choice_Enum) Number() protoreflect.EnumNum // Deprecated: Use PatternFlowIgmpv1GroupAddress_Choice_Enum.Descriptor instead. func (PatternFlowIgmpv1GroupAddress_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{830, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{992, 0, 0} } type PatternFlowMplsLabel_Choice_Enum int32 @@ -19392,11 +21937,11 @@ func (x PatternFlowMplsLabel_Choice_Enum) String() string { } func (PatternFlowMplsLabel_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[356].Descriptor() + return file_otg_proto_enumTypes[399].Descriptor() } func (PatternFlowMplsLabel_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[356] + return &file_otg_proto_enumTypes[399] } func (x PatternFlowMplsLabel_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19405,7 +21950,7 @@ func (x PatternFlowMplsLabel_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowMplsLabel_Choice_Enum.Descriptor instead. func (PatternFlowMplsLabel_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{833, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{995, 0, 0} } type PatternFlowMplsTrafficClass_Choice_Enum int32 @@ -19447,11 +21992,11 @@ func (x PatternFlowMplsTrafficClass_Choice_Enum) String() string { } func (PatternFlowMplsTrafficClass_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[357].Descriptor() + return file_otg_proto_enumTypes[400].Descriptor() } func (PatternFlowMplsTrafficClass_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[357] + return &file_otg_proto_enumTypes[400] } func (x PatternFlowMplsTrafficClass_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19460,7 +22005,7 @@ func (x PatternFlowMplsTrafficClass_Choice_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use PatternFlowMplsTrafficClass_Choice_Enum.Descriptor instead. func (PatternFlowMplsTrafficClass_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{836, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{998, 0, 0} } type PatternFlowMplsBottomOfStack_Choice_Enum int32 @@ -19505,11 +22050,11 @@ func (x PatternFlowMplsBottomOfStack_Choice_Enum) String() string { } func (PatternFlowMplsBottomOfStack_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[358].Descriptor() + return file_otg_proto_enumTypes[401].Descriptor() } func (PatternFlowMplsBottomOfStack_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[358] + return &file_otg_proto_enumTypes[401] } func (x PatternFlowMplsBottomOfStack_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19518,7 +22063,7 @@ func (x PatternFlowMplsBottomOfStack_Choice_Enum) Number() protoreflect.EnumNumb // Deprecated: Use PatternFlowMplsBottomOfStack_Choice_Enum.Descriptor instead. func (PatternFlowMplsBottomOfStack_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{839, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1001, 0, 0} } type PatternFlowMplsTimeToLive_Choice_Enum int32 @@ -19560,11 +22105,11 @@ func (x PatternFlowMplsTimeToLive_Choice_Enum) String() string { } func (PatternFlowMplsTimeToLive_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[359].Descriptor() + return file_otg_proto_enumTypes[402].Descriptor() } func (PatternFlowMplsTimeToLive_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[359] + return &file_otg_proto_enumTypes[402] } func (x PatternFlowMplsTimeToLive_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19573,7 +22118,7 @@ func (x PatternFlowMplsTimeToLive_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowMplsTimeToLive_Choice_Enum.Descriptor instead. func (PatternFlowMplsTimeToLive_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{842, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1004, 0, 0} } type PatternFlowSnmpv2CVersion_Choice_Enum int32 @@ -19615,11 +22160,11 @@ func (x PatternFlowSnmpv2CVersion_Choice_Enum) String() string { } func (PatternFlowSnmpv2CVersion_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[360].Descriptor() + return file_otg_proto_enumTypes[403].Descriptor() } func (PatternFlowSnmpv2CVersion_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[360] + return &file_otg_proto_enumTypes[403] } func (x PatternFlowSnmpv2CVersion_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19628,7 +22173,7 @@ func (x PatternFlowSnmpv2CVersion_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowSnmpv2CVersion_Choice_Enum.Descriptor instead. func (PatternFlowSnmpv2CVersion_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{844, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1006, 0, 0} } type PatternFlowSnmpv2CPDURequestId_Choice_Enum int32 @@ -19670,11 +22215,11 @@ func (x PatternFlowSnmpv2CPDURequestId_Choice_Enum) String() string { } func (PatternFlowSnmpv2CPDURequestId_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[361].Descriptor() + return file_otg_proto_enumTypes[404].Descriptor() } func (PatternFlowSnmpv2CPDURequestId_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[361] + return &file_otg_proto_enumTypes[404] } func (x PatternFlowSnmpv2CPDURequestId_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19683,7 +22228,7 @@ func (x PatternFlowSnmpv2CPDURequestId_Choice_Enum) Number() protoreflect.EnumNu // Deprecated: Use PatternFlowSnmpv2CPDURequestId_Choice_Enum.Descriptor instead. func (PatternFlowSnmpv2CPDURequestId_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{846, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1008, 0, 0} } type PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum int32 @@ -19725,11 +22270,11 @@ func (x PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum) String() string { } func (PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[362].Descriptor() + return file_otg_proto_enumTypes[405].Descriptor() } func (PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[362] + return &file_otg_proto_enumTypes[405] } func (x PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19738,7 +22283,7 @@ func (x PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum) Number() protoreflect.EnumN // Deprecated: Use PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum.Descriptor instead. func (PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{848, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1010, 0, 0} } type PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum int32 @@ -19780,11 +22325,11 @@ func (x PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum) String() string { } func (PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[363].Descriptor() + return file_otg_proto_enumTypes[406].Descriptor() } func (PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[363] + return &file_otg_proto_enumTypes[406] } func (x PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19793,7 +22338,7 @@ func (x PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum) Number() protoreflect.En // Deprecated: Use PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum.Descriptor instead. func (PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{850, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1012, 0, 0} } type PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum int32 @@ -19829,11 +22374,11 @@ func (x PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum) String() string { } func (PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[364].Descriptor() + return file_otg_proto_enumTypes[407].Descriptor() } func (PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[364] + return &file_otg_proto_enumTypes[407] } func (x PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19842,7 +22387,7 @@ func (x PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum) Number() protoreflect // Deprecated: Use PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum.Descriptor instead. func (PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{851, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1013, 0, 0} } type PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum int32 @@ -19884,11 +22429,11 @@ func (x PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum) String() string { } func (PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[365].Descriptor() + return file_otg_proto_enumTypes[408].Descriptor() } func (PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[365] + return &file_otg_proto_enumTypes[408] } func (x PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19897,7 +22442,7 @@ func (x PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum) Number() protorefle // Deprecated: Use PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum.Descriptor instead. func (PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{853, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1015, 0, 0} } type PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum int32 @@ -19939,11 +22484,11 @@ func (x PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum) String() } func (PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[366].Descriptor() + return file_otg_proto_enumTypes[409].Descriptor() } func (PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[366] + return &file_otg_proto_enumTypes[409] } func (x PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum) Number() protoreflect.EnumNumber { @@ -19952,7 +22497,7 @@ func (x PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum) Number() // Deprecated: Use PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum.Descriptor instead. func (PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{855, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1017, 0, 0} } type PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum int32 @@ -19994,11 +22539,11 @@ func (x PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum) String } func (PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[367].Descriptor() + return file_otg_proto_enumTypes[410].Descriptor() } func (PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[367] + return &file_otg_proto_enumTypes[410] } func (x PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20007,7 +22552,7 @@ func (x PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum) Number // Deprecated: Use PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum.Descriptor instead. func (PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{857, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1019, 0, 0} } type PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum int32 @@ -20049,11 +22594,11 @@ func (x PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum) String() } func (PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[368].Descriptor() + return file_otg_proto_enumTypes[411].Descriptor() } func (PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[368] + return &file_otg_proto_enumTypes[411] } func (x PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20062,7 +22607,7 @@ func (x PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum) Number() // Deprecated: Use PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum.Descriptor instead. func (PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{859, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1021, 0, 0} } type PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum int32 @@ -20104,11 +22649,11 @@ func (x PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum) String } func (PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[369].Descriptor() + return file_otg_proto_enumTypes[412].Descriptor() } func (PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[369] + return &file_otg_proto_enumTypes[412] } func (x PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20117,7 +22662,7 @@ func (x PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum) Number // Deprecated: Use PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum.Descriptor instead. func (PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{861, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1023, 0, 0} } type PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum int32 @@ -20159,11 +22704,11 @@ func (x PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum) Strin } func (PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[370].Descriptor() + return file_otg_proto_enumTypes[413].Descriptor() } func (PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[370] + return &file_otg_proto_enumTypes[413] } func (x PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20172,7 +22717,7 @@ func (x PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum) Numbe // Deprecated: Use PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum.Descriptor instead. func (PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{863, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1025, 0, 0} } type PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum int32 @@ -20214,11 +22759,11 @@ func (x PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum) } func (PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[371].Descriptor() + return file_otg_proto_enumTypes[414].Descriptor() } func (PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[371] + return &file_otg_proto_enumTypes[414] } func (x PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20227,7 +22772,7 @@ func (x PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum) // Deprecated: Use PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum.Descriptor instead. func (PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{865, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1027, 0, 0} } type PatternFlowSnmpv2CCommonRequestId_Choice_Enum int32 @@ -20269,11 +22814,11 @@ func (x PatternFlowSnmpv2CCommonRequestId_Choice_Enum) String() string { } func (PatternFlowSnmpv2CCommonRequestId_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[372].Descriptor() + return file_otg_proto_enumTypes[415].Descriptor() } func (PatternFlowSnmpv2CCommonRequestId_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[372] + return &file_otg_proto_enumTypes[415] } func (x PatternFlowSnmpv2CCommonRequestId_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20282,7 +22827,7 @@ func (x PatternFlowSnmpv2CCommonRequestId_Choice_Enum) Number() protoreflect.Enu // Deprecated: Use PatternFlowSnmpv2CCommonRequestId_Choice_Enum.Descriptor instead. func (PatternFlowSnmpv2CCommonRequestId_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{867, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1029, 0, 0} } type PatternFlowRsvpRsvpChecksum_Choice_Enum int32 @@ -20318,11 +22863,11 @@ func (x PatternFlowRsvpRsvpChecksum_Choice_Enum) String() string { } func (PatternFlowRsvpRsvpChecksum_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[373].Descriptor() + return file_otg_proto_enumTypes[416].Descriptor() } func (PatternFlowRsvpRsvpChecksum_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[373] + return &file_otg_proto_enumTypes[416] } func (x PatternFlowRsvpRsvpChecksum_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20331,7 +22876,7 @@ func (x PatternFlowRsvpRsvpChecksum_Choice_Enum) Number() protoreflect.EnumNumbe // Deprecated: Use PatternFlowRsvpRsvpChecksum_Choice_Enum.Descriptor instead. func (PatternFlowRsvpRsvpChecksum_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{868, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1030, 0, 0} } type PatternFlowRsvpRsvpChecksum_Generated_Enum int32 @@ -20367,11 +22912,11 @@ func (x PatternFlowRsvpRsvpChecksum_Generated_Enum) String() string { } func (PatternFlowRsvpRsvpChecksum_Generated_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[374].Descriptor() + return file_otg_proto_enumTypes[417].Descriptor() } func (PatternFlowRsvpRsvpChecksum_Generated_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[374] + return &file_otg_proto_enumTypes[417] } func (x PatternFlowRsvpRsvpChecksum_Generated_Enum) Number() protoreflect.EnumNumber { @@ -20380,7 +22925,7 @@ func (x PatternFlowRsvpRsvpChecksum_Generated_Enum) Number() protoreflect.EnumNu // Deprecated: Use PatternFlowRsvpRsvpChecksum_Generated_Enum.Descriptor instead. func (PatternFlowRsvpRsvpChecksum_Generated_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{868, 1, 0} + return file_otg_proto_rawDescGZIP(), []int{1030, 1, 0} } type PatternFlowRsvpTimeToLive_Choice_Enum int32 @@ -20422,11 +22967,11 @@ func (x PatternFlowRsvpTimeToLive_Choice_Enum) String() string { } func (PatternFlowRsvpTimeToLive_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[375].Descriptor() + return file_otg_proto_enumTypes[418].Descriptor() } func (PatternFlowRsvpTimeToLive_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[375] + return &file_otg_proto_enumTypes[418] } func (x PatternFlowRsvpTimeToLive_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20435,7 +22980,7 @@ func (x PatternFlowRsvpTimeToLive_Choice_Enum) Number() protoreflect.EnumNumber // Deprecated: Use PatternFlowRsvpTimeToLive_Choice_Enum.Descriptor instead. func (PatternFlowRsvpTimeToLive_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{870, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1032, 0, 0} } type PatternFlowRsvpReserved_Choice_Enum int32 @@ -20477,11 +23022,11 @@ func (x PatternFlowRsvpReserved_Choice_Enum) String() string { } func (PatternFlowRsvpReserved_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[376].Descriptor() + return file_otg_proto_enumTypes[419].Descriptor() } func (PatternFlowRsvpReserved_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[376] + return &file_otg_proto_enumTypes[419] } func (x PatternFlowRsvpReserved_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20490,7 +23035,7 @@ func (x PatternFlowRsvpReserved_Choice_Enum) Number() protoreflect.EnumNumber { // Deprecated: Use PatternFlowRsvpReserved_Choice_Enum.Descriptor instead. func (PatternFlowRsvpReserved_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{872, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1034, 0, 0} } type PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum int32 @@ -20532,11 +23077,11 @@ func (x PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_ } func (PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[377].Descriptor() + return file_otg_proto_enumTypes[420].Descriptor() } func (PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[377] + return &file_otg_proto_enumTypes[420] } func (x PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20545,7 +23090,7 @@ func (x PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_ // Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{874, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1036, 0, 0} } type PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum int32 @@ -20587,11 +23132,11 @@ func (x PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum) String() st } func (PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[378].Descriptor() + return file_otg_proto_enumTypes[421].Descriptor() } func (PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[378] + return &file_otg_proto_enumTypes[421] } func (x PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20600,7 +23145,7 @@ func (x PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum) Number() pr // Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{876, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1038, 0, 0} } type PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum int32 @@ -20642,11 +23187,11 @@ func (x PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum) String() st } func (PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[379].Descriptor() + return file_otg_proto_enumTypes[422].Descriptor() } func (PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[379] + return &file_otg_proto_enumTypes[422] } func (x PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20655,7 +23200,7 @@ func (x PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum) Number() pr // Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{878, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1040, 0, 0} } type PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum int32 @@ -20697,11 +23242,11 @@ func (x PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum) String() str } func (PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[380].Descriptor() + return file_otg_proto_enumTypes[423].Descriptor() } func (PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[380] + return &file_otg_proto_enumTypes[423] } func (x PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20710,7 +23255,7 @@ func (x PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum) Number() pro // Deprecated: Use PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{880, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1042, 0, 0} } type PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum int32 @@ -20752,11 +23297,11 @@ func (x PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum) String() string } func (PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[381].Descriptor() + return file_otg_proto_enumTypes[424].Descriptor() } func (PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[381] + return &file_otg_proto_enumTypes[424] } func (x PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20765,7 +23310,7 @@ func (x PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum) Number() protor // Deprecated: Use PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{882, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1044, 0, 0} } type PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum int32 @@ -20807,11 +23352,11 @@ func (x PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum) String() string { } func (PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[382].Descriptor() + return file_otg_proto_enumTypes[425].Descriptor() } func (PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[382] + return &file_otg_proto_enumTypes[425] } func (x PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20820,7 +23365,7 @@ func (x PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum) Number() protoref // Deprecated: Use PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{884, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1046, 0, 0} } type PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum int32 @@ -20862,11 +23407,11 @@ func (x PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum) String } func (PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[383].Descriptor() + return file_otg_proto_enumTypes[426].Descriptor() } func (PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[383] + return &file_otg_proto_enumTypes[426] } func (x PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20875,7 +23420,7 @@ func (x PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum) Number // Deprecated: Use PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{886, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1048, 0, 0} } type PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum int32 @@ -20917,11 +23462,11 @@ func (x PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum) String() s } func (PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[384].Descriptor() + return file_otg_proto_enumTypes[427].Descriptor() } func (PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[384] + return &file_otg_proto_enumTypes[427] } func (x PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20930,7 +23475,7 @@ func (x PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum) Number() p // Deprecated: Use PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{888, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1050, 0, 0} } type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum int32 @@ -20972,11 +23517,11 @@ func (x PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum) String( } func (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[385].Descriptor() + return file_otg_proto_enumTypes[428].Descriptor() } func (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[385] + return &file_otg_proto_enumTypes[428] } func (x PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum) Number() protoreflect.EnumNumber { @@ -20985,7 +23530,7 @@ func (x PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum) Number( // Deprecated: Use PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{890, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1052, 0, 0} } type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum int32 @@ -21027,11 +23572,11 @@ func (x PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum) } func (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[386].Descriptor() + return file_otg_proto_enumTypes[429].Descriptor() } func (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[386] + return &file_otg_proto_enumTypes[429] } func (x PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21040,7 +23585,7 @@ func (x PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum) // Deprecated: Use PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{892, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1054, 0, 0} } type PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum int32 @@ -21082,11 +23627,11 @@ func (x PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum) String() } func (PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[387].Descriptor() + return file_otg_proto_enumTypes[430].Descriptor() } func (PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[387] + return &file_otg_proto_enumTypes[430] } func (x PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21095,7 +23640,7 @@ func (x PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum) Number() // Deprecated: Use PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{894, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1056, 0, 0} } type PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum int32 @@ -21137,11 +23682,11 @@ func (x PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum) St } func (PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[388].Descriptor() + return file_otg_proto_enumTypes[431].Descriptor() } func (PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[388] + return &file_otg_proto_enumTypes[431] } func (x PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21150,7 +23695,7 @@ func (x PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum) Nu // Deprecated: Use PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{896, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1058, 0, 0} } type PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum int32 @@ -21192,11 +23737,11 @@ func (x PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum) Strin } func (PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[389].Descriptor() + return file_otg_proto_enumTypes[432].Descriptor() } func (PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[389] + return &file_otg_proto_enumTypes[432] } func (x PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21205,7 +23750,7 @@ func (x PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum) Numbe // Deprecated: Use PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{898, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1060, 0, 0} } type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum int32 @@ -21247,11 +23792,11 @@ func (x PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Ch } func (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[390].Descriptor() + return file_otg_proto_enumTypes[433].Descriptor() } func (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[390] + return &file_otg_proto_enumTypes[433] } func (x PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21260,7 +23805,7 @@ func (x PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Ch // Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{900, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1062, 0, 0} } type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum int32 @@ -21302,11 +23847,11 @@ func (x PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum) Stri } func (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[391].Descriptor() + return file_otg_proto_enumTypes[434].Descriptor() } func (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[391] + return &file_otg_proto_enumTypes[434] } func (x PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21315,7 +23860,7 @@ func (x PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum) Numb // Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{902, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1064, 0, 0} } type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum int32 @@ -21357,11 +23902,11 @@ func (x PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum) String( } func (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[392].Descriptor() + return file_otg_proto_enumTypes[435].Descriptor() } func (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[392] + return &file_otg_proto_enumTypes[435] } func (x PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21370,7 +23915,7 @@ func (x PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum) Number( // Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{904, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1066, 0, 0} } type PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum int32 @@ -21412,11 +23957,11 @@ func (x PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum) String() strin } func (PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[393].Descriptor() + return file_otg_proto_enumTypes[436].Descriptor() } func (PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[393] + return &file_otg_proto_enumTypes[436] } func (x PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21425,7 +23970,7 @@ func (x PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum) Number() proto // Deprecated: Use PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{906, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1068, 0, 0} } type PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum int32 @@ -21467,11 +24012,11 @@ func (x PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum) String() str } func (PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[394].Descriptor() + return file_otg_proto_enumTypes[437].Descriptor() } func (PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[394] + return &file_otg_proto_enumTypes[437] } func (x PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21480,7 +24025,7 @@ func (x PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum) Number() pro // Deprecated: Use PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{908, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1070, 0, 0} } type PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum int32 @@ -21522,11 +24067,11 @@ func (x PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum) String() } func (PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[395].Descriptor() + return file_otg_proto_enumTypes[438].Descriptor() } func (PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[395] + return &file_otg_proto_enumTypes[438] } func (x PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21535,7 +24080,7 @@ func (x PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum) Number() // Deprecated: Use PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{910, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1072, 0, 0} } type PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum int32 @@ -21577,11 +24122,11 @@ func (x PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum) String() } func (PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[396].Descriptor() + return file_otg_proto_enumTypes[439].Descriptor() } func (PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[396] + return &file_otg_proto_enumTypes[439] } func (x PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21590,7 +24135,7 @@ func (x PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum) Number() // Deprecated: Use PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{912, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1074, 0, 0} } type PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum int32 @@ -21632,11 +24177,11 @@ func (x PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum) String() strin } func (PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[397].Descriptor() + return file_otg_proto_enumTypes[440].Descriptor() } func (PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[397] + return &file_otg_proto_enumTypes[440] } func (x PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21645,7 +24190,7 @@ func (x PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum) Number() proto // Deprecated: Use PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{914, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1076, 0, 0} } type PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum int32 @@ -21687,11 +24232,11 @@ func (x PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum) String() str } func (PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[398].Descriptor() + return file_otg_proto_enumTypes[441].Descriptor() } func (PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[398] + return &file_otg_proto_enumTypes[441] } func (x PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21700,7 +24245,7 @@ func (x PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum) Number() pro // Deprecated: Use PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{916, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1078, 0, 0} } type PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum int32 @@ -21742,11 +24287,11 @@ func (x PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum) St } func (PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[399].Descriptor() + return file_otg_proto_enumTypes[442].Descriptor() } func (PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[399] + return &file_otg_proto_enumTypes[442] } func (x PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21755,7 +24300,7 @@ func (x PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum) Nu // Deprecated: Use PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{918, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1080, 0, 0} } type PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum int32 @@ -21797,11 +24342,11 @@ func (x PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_ } func (PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[400].Descriptor() + return file_otg_proto_enumTypes[443].Descriptor() } func (PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[400] + return &file_otg_proto_enumTypes[443] } func (x PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21810,7 +24355,7 @@ func (x PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_ // Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{920, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1082, 0, 0} } type PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum int32 @@ -21852,11 +24397,11 @@ func (x PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum) Strin } func (PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[401].Descriptor() + return file_otg_proto_enumTypes[444].Descriptor() } func (PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[401] + return &file_otg_proto_enumTypes[444] } func (x PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21865,7 +24410,7 @@ func (x PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum) Numbe // Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{922, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1084, 0, 0} } type PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum int32 @@ -21907,11 +24452,11 @@ func (x PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum) Str } func (PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[402].Descriptor() + return file_otg_proto_enumTypes[445].Descriptor() } func (PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[402] + return &file_otg_proto_enumTypes[445] } func (x PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21920,7 +24465,7 @@ func (x PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum) Num // Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{924, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1086, 0, 0} } type PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum int32 @@ -21962,11 +24507,11 @@ func (x PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum) Str } func (PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[403].Descriptor() + return file_otg_proto_enumTypes[446].Descriptor() } func (PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[403] + return &file_otg_proto_enumTypes[446] } func (x PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum) Number() protoreflect.EnumNumber { @@ -21975,7 +24520,7 @@ func (x PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum) Num // Deprecated: Use PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{926, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1088, 0, 0} } type PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum int32 @@ -22017,11 +24562,11 @@ func (x PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum) Stri } func (PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[404].Descriptor() + return file_otg_proto_enumTypes[447].Descriptor() } func (PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[404] + return &file_otg_proto_enumTypes[447] } func (x PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum) Number() protoreflect.EnumNumber { @@ -22030,7 +24575,7 @@ func (x PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum) Numb // Deprecated: Use PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{928, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1090, 0, 0} } type PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum int32 @@ -22072,11 +24617,11 @@ func (x PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum) S } func (PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[405].Descriptor() + return file_otg_proto_enumTypes[448].Descriptor() } func (PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[405] + return &file_otg_proto_enumTypes[448] } func (x PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum) Number() protoreflect.EnumNumber { @@ -22085,7 +24630,7 @@ func (x PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum) N // Deprecated: Use PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{930, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1092, 0, 0} } type PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum int32 @@ -22127,11 +24672,11 @@ func (x PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum) } func (PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[406].Descriptor() + return file_otg_proto_enumTypes[449].Descriptor() } func (PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[406] + return &file_otg_proto_enumTypes[449] } func (x PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum) Number() protoreflect.EnumNumber { @@ -22140,7 +24685,7 @@ func (x PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum) // Deprecated: Use PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{932, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1094, 0, 0} } type PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum int32 @@ -22176,11 +24721,11 @@ func (x PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum) String() stri } func (PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[407].Descriptor() + return file_otg_proto_enumTypes[450].Descriptor() } func (PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[407] + return &file_otg_proto_enumTypes[450] } func (x PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum) Number() protoreflect.EnumNumber { @@ -22189,7 +24734,7 @@ func (x PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum) Number() prot // Deprecated: Use PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{933, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1095, 0, 0} } type PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum int32 @@ -22225,11 +24770,11 @@ func (x PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum) String() stri } func (PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[408].Descriptor() + return file_otg_proto_enumTypes[451].Descriptor() } func (PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[408] + return &file_otg_proto_enumTypes[451] } func (x PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -22238,7 +24783,7 @@ func (x PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum) Number() prot // Deprecated: Use PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{934, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1096, 0, 0} } type PatternFlowRSVPPathObjectsCustomType_Choice_Enum int32 @@ -22280,11 +24825,11 @@ func (x PatternFlowRSVPPathObjectsCustomType_Choice_Enum) String() string { } func (PatternFlowRSVPPathObjectsCustomType_Choice_Enum) Descriptor() protoreflect.EnumDescriptor { - return file_otg_proto_enumTypes[409].Descriptor() + return file_otg_proto_enumTypes[452].Descriptor() } func (PatternFlowRSVPPathObjectsCustomType_Choice_Enum) Type() protoreflect.EnumType { - return &file_otg_proto_enumTypes[409] + return &file_otg_proto_enumTypes[452] } func (x PatternFlowRSVPPathObjectsCustomType_Choice_Enum) Number() protoreflect.EnumNumber { @@ -22293,7 +24838,7 @@ func (x PatternFlowRSVPPathObjectsCustomType_Choice_Enum) Number() protoreflect. // Deprecated: Use PatternFlowRSVPPathObjectsCustomType_Choice_Enum.Descriptor instead. func (PatternFlowRSVPPathObjectsCustomType_Choice_Enum) EnumDescriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{936, 0, 0} + return file_otg_proto_rawDescGZIP(), []int{1098, 0, 0} } // A container for all models that are part of the configuration. @@ -23047,8 +25592,9 @@ type DeviceEthernetBase struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Media Access Control address. - // required = true + // Media Access Control address.The implementation should ensure that the 'mac' field + // is explicitly configured by the user for all types of interfaces as denoted by 'connection' + // attribute except 'simulated_link' where 'mac' is not mandatory. Mac *string `protobuf:"bytes,1,opt,name=mac,proto3,oneof" json:"mac,omitempty"` // Maximum Transmission Unit. // default = 1500 @@ -23121,7 +25667,9 @@ func (x *DeviceEthernetBase) GetName() string { return "" } -// An Ethernet interface with IPv4 and IPv6 addresses. +// An Ethernet interface with IPv4 and IPv6 addresses. The implementation should ensure +// that the 'mac' field is explicitly configured by the user for all types of interfaces +// as denoted by 'connection' attribute except 'simulated_link' where MAC is not mandatory. type DeviceEthernet struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -23134,8 +25682,9 @@ type DeviceEthernet struct { // List of global IPv6 addresses and their gateways. // The Link Local IPv6 address will be automatically generated. Ipv6Addresses []*DeviceIpv6 `protobuf:"bytes,4,rep,name=ipv6_addresses,json=ipv6Addresses,proto3" json:"ipv6_addresses,omitempty"` - // Media Access Control address. - // required = true + // Media Access Control address.The implementation should ensure that the 'mac' field + // is explicitly configured by the user for all types of interfaces as denoted by 'connection' + // attribute except 'simulated_link' where 'mac' is not mandatory. Mac *string `protobuf:"bytes,5,opt,name=mac,proto3,oneof" json:"mac,omitempty"` // Maximum Transmission Unit. // default = 1500 @@ -23146,6 +25695,10 @@ type DeviceEthernet struct { // objects. // required = true Name *string `protobuf:"bytes,8,opt,name=name,proto3,oneof" json:"name,omitempty"` + // List of DHCPv4 Clients Configuration. + Dhcpv4Interfaces []*DeviceDhcpv4Client `protobuf:"bytes,9,rep,name=dhcpv4_interfaces,json=dhcpv4Interfaces,proto3" json:"dhcpv4_interfaces,omitempty"` + // List of DHCPv6 Clients Configuration. + Dhcpv6Interfaces []*DeviceDhcpv6Client `protobuf:"bytes,10,rep,name=dhcpv6_interfaces,json=dhcpv6Interfaces,proto3" json:"dhcpv6_interfaces,omitempty"` } func (x *DeviceEthernet) Reset() { @@ -23229,13 +25782,28 @@ func (x *DeviceEthernet) GetName() string { return "" } -// Ethernet interface connection to a port, LAG or VXLAN tunnel. +func (x *DeviceEthernet) GetDhcpv4Interfaces() []*DeviceDhcpv4Client { + if x != nil { + return x.Dhcpv4Interfaces + } + return nil +} + +func (x *DeviceEthernet) GetDhcpv6Interfaces() []*DeviceDhcpv6Client { + if x != nil { + return x.Dhcpv6Interfaces + } + return nil +} + +// Ethernet interface connection to a port, LAG, VXLAN tunnel or a Simulated Internal +// Link used to create simulated topologies behind an emulated router. type EthernetConnection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // port_name, lag_name or vxlan_name + // port_name, lag_name, vxlan_name or simulated_link Choice *EthernetConnection_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.EthernetConnection_Choice_Enum,oneof" json:"choice,omitempty"` // Name of the port that the Ethernet interface is configured on. // @@ -23264,6 +25832,8 @@ type EthernetConnection struct { // - #/components/schemas/Vxlan.V4Tunnel/properties/name // - #/components/schemas/Vxlan.V6Tunnel/properties/name VxlanName *string `protobuf:"bytes,4,opt,name=vxlan_name,json=vxlanName,proto3,oneof" json:"vxlan_name,omitempty"` + // Description missing in models + SimulatedLink *EthernetSimulatedLink `protobuf:"bytes,5,opt,name=simulated_link,json=simulatedLink,proto3" json:"simulated_link,omitempty"` } func (x *EthernetConnection) Reset() { @@ -23326,6 +25896,110 @@ func (x *EthernetConnection) GetVxlanName() string { return "" } +func (x *EthernetConnection) GetSimulatedLink() *EthernetSimulatedLink { + if x != nil { + return x.SimulatedLink + } + return nil +} + +// Details of the internal link which can be used to create simulated device topologies +// behind an emulated router. MAC, VLAN and MTU information for the internal links are +// not used for purposes of emulating Simulated Topologies ( e.g. by ISIS Emulated Router +// behind which this is configured ) +type EthernetSimulatedLink struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the remote end of the simulated interface which also must be a simulated_link + // on a device which might be acting either as an unconnected device in a simulated + // topology + // ( all ethernet links of type simulated_link ) or an emulated device connected to + // the Device Under Test (has at atleast one ethernet interface with connection to the + // port or + // lag connected to the DUT) + // + // x-constraint: + // - #/components/schemas/Device.Ethernet/properties/name + // + // x-constraint: + // - #/components/schemas/Device.Ethernet/properties/name + RemoteSimulatedLink *string `protobuf:"bytes,1,opt,name=remote_simulated_link,json=remoteSimulatedLink,proto3,oneof" json:"remote_simulated_link,omitempty"` + // By default, simulated links are treated as Primary links , which means that the intention + // is for connected device to advertise this and full topology of devices connected + // to it. + // e.g. when advertised as ISIS Simulated Topology. + // + // All simulated links inside one topology subset would normally can point to only other + // unconnected devices in the same topology or to the 'root' emulated device. + // If a link is designated as secondary , only that link information will be advertised + // by the IGP e.g. ISIS , and not the entire topology behind it. + // The optional secondary option allows emulation of external link scenarios where a + // simulated device (e.g. part of a ISIS simulated topology ) is advertised as reachable + // part of the topology + // by the emulated router behind which this is configured , as well as the other end + // of the secondary link which could be + // - 1) either a simulated device behind a different emulated router. + // - 2) or an emulated router on same or different port. + // This allows emulation of scenarios where one device/router is emulated to be reachable + // from different Emulated Routers connected to the Device Under Test. (e.g. for FRR + // scenarios) + // + // If an implementation does not support multiple primary links from same simulated + // topology i.e. full topology advertised via multiple emulated routers, it should return + // an error + // during set_config operation with such a topology. + // default = LinkType.Enum.primary + LinkType *EthernetSimulatedLink_LinkType_Enum `protobuf:"varint,2,opt,name=link_type,json=linkType,proto3,enum=otg.EthernetSimulatedLink_LinkType_Enum,oneof" json:"link_type,omitempty"` +} + +func (x *EthernetSimulatedLink) Reset() { + *x = EthernetSimulatedLink{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EthernetSimulatedLink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthernetSimulatedLink) ProtoMessage() {} + +func (x *EthernetSimulatedLink) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthernetSimulatedLink.ProtoReflect.Descriptor instead. +func (*EthernetSimulatedLink) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{13} +} + +func (x *EthernetSimulatedLink) GetRemoteSimulatedLink() string { + if x != nil && x.RemoteSimulatedLink != nil { + return *x.RemoteSimulatedLink + } + return "" +} + +func (x *EthernetSimulatedLink) GetLinkType() EthernetSimulatedLink_LinkType_Enum { + if x != nil && x.LinkType != nil { + return *x.LinkType + } + return EthernetSimulatedLink_LinkType_unspecified +} + // Emulated VLAN protocol. type DeviceVlan struct { state protoimpl.MessageState @@ -23350,7 +26024,7 @@ type DeviceVlan struct { func (x *DeviceVlan) Reset() { *x = DeviceVlan{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[13] + mi := &file_otg_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23363,7 +26037,7 @@ func (x *DeviceVlan) String() string { func (*DeviceVlan) ProtoMessage() {} func (x *DeviceVlan) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[13] + mi := &file_otg_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23376,7 +26050,7 @@ func (x *DeviceVlan) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceVlan.ProtoReflect.Descriptor instead. func (*DeviceVlan) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{13} + return file_otg_proto_rawDescGZIP(), []int{14} } func (x *DeviceVlan) GetTpid() DeviceVlan_Tpid_Enum { @@ -23433,7 +26107,7 @@ type DeviceIpv4 struct { func (x *DeviceIpv4) Reset() { *x = DeviceIpv4{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[14] + mi := &file_otg_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23446,7 +26120,7 @@ func (x *DeviceIpv4) String() string { func (*DeviceIpv4) ProtoMessage() {} func (x *DeviceIpv4) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[14] + mi := &file_otg_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23459,7 +26133,7 @@ func (x *DeviceIpv4) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceIpv4.ProtoReflect.Descriptor instead. func (*DeviceIpv4) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{14} + return file_otg_proto_rawDescGZIP(), []int{15} } func (x *DeviceIpv4) GetGateway() string { @@ -23526,7 +26200,7 @@ type DeviceIpv4Loopback struct { func (x *DeviceIpv4Loopback) Reset() { *x = DeviceIpv4Loopback{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[15] + mi := &file_otg_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23539,7 +26213,7 @@ func (x *DeviceIpv4Loopback) String() string { func (*DeviceIpv4Loopback) ProtoMessage() {} func (x *DeviceIpv4Loopback) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[15] + mi := &file_otg_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23552,7 +26226,7 @@ func (x *DeviceIpv4Loopback) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceIpv4Loopback.ProtoReflect.Descriptor instead. func (*DeviceIpv4Loopback) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{15} + return file_otg_proto_rawDescGZIP(), []int{16} } func (x *DeviceIpv4Loopback) GetEthName() string { @@ -23601,7 +26275,7 @@ type DeviceIpv4GatewayMAC struct { func (x *DeviceIpv4GatewayMAC) Reset() { *x = DeviceIpv4GatewayMAC{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[16] + mi := &file_otg_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23614,7 +26288,7 @@ func (x *DeviceIpv4GatewayMAC) String() string { func (*DeviceIpv4GatewayMAC) ProtoMessage() {} func (x *DeviceIpv4GatewayMAC) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[16] + mi := &file_otg_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23627,7 +26301,7 @@ func (x *DeviceIpv4GatewayMAC) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceIpv4GatewayMAC.ProtoReflect.Descriptor instead. func (*DeviceIpv4GatewayMAC) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{16} + return file_otg_proto_rawDescGZIP(), []int{17} } func (x *DeviceIpv4GatewayMAC) GetChoice() DeviceIpv4GatewayMAC_Choice_Enum { @@ -23677,7 +26351,7 @@ type DeviceIpv6 struct { func (x *DeviceIpv6) Reset() { *x = DeviceIpv6{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[17] + mi := &file_otg_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23690,7 +26364,7 @@ func (x *DeviceIpv6) String() string { func (*DeviceIpv6) ProtoMessage() {} func (x *DeviceIpv6) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[17] + mi := &file_otg_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23703,7 +26377,7 @@ func (x *DeviceIpv6) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceIpv6.ProtoReflect.Descriptor instead. func (*DeviceIpv6) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{17} + return file_otg_proto_rawDescGZIP(), []int{18} } func (x *DeviceIpv6) GetGateway() string { @@ -23770,7 +26444,7 @@ type DeviceIpv6Loopback struct { func (x *DeviceIpv6Loopback) Reset() { *x = DeviceIpv6Loopback{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[18] + mi := &file_otg_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23783,7 +26457,7 @@ func (x *DeviceIpv6Loopback) String() string { func (*DeviceIpv6Loopback) ProtoMessage() {} func (x *DeviceIpv6Loopback) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[18] + mi := &file_otg_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23796,7 +26470,7 @@ func (x *DeviceIpv6Loopback) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceIpv6Loopback.ProtoReflect.Descriptor instead. func (*DeviceIpv6Loopback) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{18} + return file_otg_proto_rawDescGZIP(), []int{19} } func (x *DeviceIpv6Loopback) GetEthName() string { @@ -23845,7 +26519,7 @@ type DeviceIpv6GatewayMAC struct { func (x *DeviceIpv6GatewayMAC) Reset() { *x = DeviceIpv6GatewayMAC{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[19] + mi := &file_otg_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -23858,7 +26532,7 @@ func (x *DeviceIpv6GatewayMAC) String() string { func (*DeviceIpv6GatewayMAC) ProtoMessage() {} func (x *DeviceIpv6GatewayMAC) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[19] + mi := &file_otg_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23871,7 +26545,7 @@ func (x *DeviceIpv6GatewayMAC) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceIpv6GatewayMAC.ProtoReflect.Descriptor instead. func (*DeviceIpv6GatewayMAC) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{19} + return file_otg_proto_rawDescGZIP(), []int{20} } func (x *DeviceIpv6GatewayMAC) GetChoice() DeviceIpv6GatewayMAC_Choice_Enum { @@ -23895,81 +26569,53 @@ func (x *DeviceIpv6GatewayMAC) GetValue() string { return "" } -// A container for layer1 settings. -type Layer1 struct { +// Configuration for emulated DHCPv4 Client on a single Interface. https://www.rfc-editor.org/rfc/rfc2131.html +type DeviceDhcpv4Client struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A list of unique names of port objects that will share the - // choice settings. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // x-constraint: - // - /components/schemas/Port/properties/name - PortNames []string `protobuf:"bytes,1,rep,name=port_names,json=portNames,proto3" json:"port_names,omitempty"` - // Set the speed if supported. When no speed is explicitly set, the current - // speed of underlying test interface shall be assumed. - Speed *Layer1_Speed_Enum `protobuf:"varint,2,opt,name=speed,proto3,enum=otg.Layer1_Speed_Enum,oneof" json:"speed,omitempty"` - // Set the type of media for test interface if supported. When no media - // type is explicitly set, the current media type of underlying test - // interface shall be assumed. - Media *Layer1_Media_Enum `protobuf:"varint,3,opt,name=media,proto3,enum=otg.Layer1_Media_Enum,oneof" json:"media,omitempty"` - // Enable promiscuous mode on test interface. A warning shall be raised if - // this field is set to `true`, even when it's not supported, ignoring - // the setting altogether. - // default = True - Promiscuous *bool `protobuf:"varint,4,opt,name=promiscuous,proto3,oneof" json:"promiscuous,omitempty"` - // Set the maximum transmission unit size. A warning shall be raised if - // the specified value is valid but not supported, ignoring the setting altogether. - // default = 1500 - Mtu *uint32 `protobuf:"varint,5,opt,name=mtu,proto3,oneof" json:"mtu,omitempty"` - // Under Review: This field is currently under review for pending exploration on use - // cases - // - // Under Review: This field is currently under review for pending exploration on use - // cases - // - // Set to true to override the auto_negotiate, link_training - // and rs_fec settings for gigabit ethernet interfaces. - IeeeMediaDefaults *bool `protobuf:"varint,6,opt,name=ieee_media_defaults,json=ieeeMediaDefaults,proto3,oneof" json:"ieee_media_defaults,omitempty"` - // Under Review: This field is currently under review for pending exploration on use - // cases, given that a separate configuration called `AutoNegotiation` already exists. - // - // Under Review: This field is currently under review for pending exploration on use - // cases, given that a separate configuration called `AutoNegotiation` already exists. - // - // Enable/disable auto negotiation. - AutoNegotiate *bool `protobuf:"varint,7,opt,name=auto_negotiate,json=autoNegotiate,proto3,oneof" json:"auto_negotiate,omitempty"` - // Description missing in models - AutoNegotiation *Layer1AutoNegotiation `protobuf:"bytes,8,opt,name=auto_negotiation,json=autoNegotiation,proto3" json:"auto_negotiation,omitempty"` - // Description missing in models - FlowControl *Layer1FlowControl `protobuf:"bytes,9,opt,name=flow_control,json=flowControl,proto3" json:"flow_control,omitempty"` // Globally unique name of an object. It also serves as the primary key for arrays of // objects. // required = true - Name *string `protobuf:"bytes,10,opt,name=name,proto3,oneof" json:"name,omitempty"` + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // The client receives one or more DHCPOFFER messages from one or more servers and client + // may choose to wait for multiple responses. + // The client chooses one server from which to request configuration + // parameters, based on the configuration parameters offered in the DHCPOFFER messages. + // - first_server: if selected, the subnet accepts the IP addresses offered by the first + // server to respond with an offer of IP addresses. + // - server_address: The address of the DHCP server from which the subnet will accept + // IP addresses. + // default = Choice.Enum.first_server + Choice *DeviceDhcpv4Client_Choice_Enum `protobuf:"varint,2,opt,name=choice,proto3,enum=otg.DeviceDhcpv4Client_Choice_Enum,oneof" json:"choice,omitempty"` + // The address of the DHCP server. + ServerAddress *string `protobuf:"bytes,4,opt,name=server_address,json=serverAddress,proto3,oneof" json:"server_address,omitempty"` + // If the broadcast bit is set, then the server and relay agent broadcast DHCPOFFER + // and DHCPACK messages. + // default = False + Broadcast *bool `protobuf:"varint,5,opt,name=broadcast,proto3,oneof" json:"broadcast,omitempty"` + // Optional parameters field request list of DHCPv4 Client. + ParametersRequestList *Dhcpv4ClientParams `protobuf:"bytes,6,opt,name=parameters_request_list,json=parametersRequestList,proto3" json:"parameters_request_list,omitempty"` } -func (x *Layer1) Reset() { - *x = Layer1{} +func (x *DeviceDhcpv4Client) Reset() { + *x = DeviceDhcpv4Client{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[20] + mi := &file_otg_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Layer1) String() string { +func (x *DeviceDhcpv4Client) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Layer1) ProtoMessage() {} +func (*DeviceDhcpv4Client) ProtoMessage() {} -func (x *Layer1) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[20] +func (x *DeviceDhcpv4Client) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -23980,132 +26626,87 @@ func (x *Layer1) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Layer1.ProtoReflect.Descriptor instead. -func (*Layer1) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{20} -} - -func (x *Layer1) GetPortNames() []string { - if x != nil { - return x.PortNames - } - return nil -} - -func (x *Layer1) GetSpeed() Layer1_Speed_Enum { - if x != nil && x.Speed != nil { - return *x.Speed - } - return Layer1_Speed_unspecified -} - -func (x *Layer1) GetMedia() Layer1_Media_Enum { - if x != nil && x.Media != nil { - return *x.Media - } - return Layer1_Media_unspecified +// Deprecated: Use DeviceDhcpv4Client.ProtoReflect.Descriptor instead. +func (*DeviceDhcpv4Client) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{21} } -func (x *Layer1) GetPromiscuous() bool { - if x != nil && x.Promiscuous != nil { - return *x.Promiscuous +func (x *DeviceDhcpv4Client) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return false + return "" } -func (x *Layer1) GetMtu() uint32 { - if x != nil && x.Mtu != nil { - return *x.Mtu +func (x *DeviceDhcpv4Client) GetChoice() DeviceDhcpv4Client_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return DeviceDhcpv4Client_Choice_unspecified } -func (x *Layer1) GetIeeeMediaDefaults() bool { - if x != nil && x.IeeeMediaDefaults != nil { - return *x.IeeeMediaDefaults +func (x *DeviceDhcpv4Client) GetServerAddress() string { + if x != nil && x.ServerAddress != nil { + return *x.ServerAddress } - return false + return "" } -func (x *Layer1) GetAutoNegotiate() bool { - if x != nil && x.AutoNegotiate != nil { - return *x.AutoNegotiate +func (x *DeviceDhcpv4Client) GetBroadcast() bool { + if x != nil && x.Broadcast != nil { + return *x.Broadcast } return false } -func (x *Layer1) GetAutoNegotiation() *Layer1AutoNegotiation { - if x != nil { - return x.AutoNegotiation - } - return nil -} - -func (x *Layer1) GetFlowControl() *Layer1FlowControl { +func (x *DeviceDhcpv4Client) GetParametersRequestList() *Dhcpv4ClientParams { if x != nil { - return x.FlowControl + return x.ParametersRequestList } return nil } -func (x *Layer1) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -// Configuration for auto negotiation settings -type Layer1AutoNegotiation struct { +// Configuration Parameter request list by emulated DHCPv4 Client. +type Dhcpv4ClientParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // If auto_negotiate is true and the interface supports this option - // then this speed will be advertised. - // default = True - Advertise_1000Mbps *bool `protobuf:"varint,1,opt,name=advertise_1000_mbps,json=advertise1000Mbps,proto3,oneof" json:"advertise_1000_mbps,omitempty"` - // If auto_negotiate is true and the interface supports this option - // then this speed will be advertised. - // default = True - Advertise_100FdMbps *bool `protobuf:"varint,2,opt,name=advertise_100_fd_mbps,json=advertise100FdMbps,proto3,oneof" json:"advertise_100_fd_mbps,omitempty"` - // If auto_negotiate is true and the interface supports this option - // then this speed will be advertised. - // default = True - Advertise_100HdMbps *bool `protobuf:"varint,3,opt,name=advertise_100_hd_mbps,json=advertise100HdMbps,proto3,oneof" json:"advertise_100_hd_mbps,omitempty"` - // If auto_negotiate is true and the interface supports this option - // then this speed will be advertised. + // Request for the subnet mask option specifies the client's subnet mask as per RFC950. + // // default = True - Advertise_10FdMbps *bool `protobuf:"varint,4,opt,name=advertise_10_fd_mbps,json=advertise10FdMbps,proto3,oneof" json:"advertise_10_fd_mbps,omitempty"` - // If auto_negotiate is true and the interface supports this option - // then this speed will be advertised. + SubnetMask *bool `protobuf:"varint,1,opt,name=subnet_mask,json=subnetMask,proto3,oneof" json:"subnet_mask,omitempty"` + // Request for the router option that specifies a list of IP addresses for routers on + // the client's subnet. // default = True - Advertise_10HdMbps *bool `protobuf:"varint,5,opt,name=advertise_10_hd_mbps,json=advertise10HdMbps,proto3,oneof" json:"advertise_10_hd_mbps,omitempty"` - // Enable/disable gigabit ethernet link training. + Router *bool `protobuf:"varint,2,opt,name=router,proto3,oneof" json:"router,omitempty"` + // Request for the renewal timer, T1. When the timer expires, the client transitions + // from the BOUND state to the RENEWING state. // default = False - LinkTraining *bool `protobuf:"varint,6,opt,name=link_training,json=linkTraining,proto3,oneof" json:"link_training,omitempty"` - // Enable/disable gigabit ethernet reed solomon forward error correction (RS FEC). + RenewalTimer *bool `protobuf:"varint,3,opt,name=renewal_timer,json=renewalTimer,proto3,oneof" json:"renewal_timer,omitempty"` + // Request for the rebinding timer (T2). When expires, the client transitions to the + // REBINDING state. // default = False - RsFec *bool `protobuf:"varint,7,opt,name=rs_fec,json=rsFec,proto3,oneof" json:"rs_fec,omitempty"` + RebindingTimer *bool `protobuf:"varint,4,opt,name=rebinding_timer,json=rebindingTimer,proto3,oneof" json:"rebinding_timer,omitempty"` } -func (x *Layer1AutoNegotiation) Reset() { - *x = Layer1AutoNegotiation{} +func (x *Dhcpv4ClientParams) Reset() { + *x = Dhcpv4ClientParams{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[21] + mi := &file_otg_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Layer1AutoNegotiation) String() string { +func (x *Dhcpv4ClientParams) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Layer1AutoNegotiation) ProtoMessage() {} +func (*Dhcpv4ClientParams) ProtoMessage() {} -func (x *Layer1AutoNegotiation) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[21] +func (x *Dhcpv4ClientParams) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24116,98 +26717,87 @@ func (x *Layer1AutoNegotiation) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Layer1AutoNegotiation.ProtoReflect.Descriptor instead. -func (*Layer1AutoNegotiation) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{21} -} - -func (x *Layer1AutoNegotiation) GetAdvertise_1000Mbps() bool { - if x != nil && x.Advertise_1000Mbps != nil { - return *x.Advertise_1000Mbps - } - return false -} - -func (x *Layer1AutoNegotiation) GetAdvertise_100FdMbps() bool { - if x != nil && x.Advertise_100FdMbps != nil { - return *x.Advertise_100FdMbps - } - return false -} - -func (x *Layer1AutoNegotiation) GetAdvertise_100HdMbps() bool { - if x != nil && x.Advertise_100HdMbps != nil { - return *x.Advertise_100HdMbps - } - return false +// Deprecated: Use Dhcpv4ClientParams.ProtoReflect.Descriptor instead. +func (*Dhcpv4ClientParams) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{22} } -func (x *Layer1AutoNegotiation) GetAdvertise_10FdMbps() bool { - if x != nil && x.Advertise_10FdMbps != nil { - return *x.Advertise_10FdMbps +func (x *Dhcpv4ClientParams) GetSubnetMask() bool { + if x != nil && x.SubnetMask != nil { + return *x.SubnetMask } return false } -func (x *Layer1AutoNegotiation) GetAdvertise_10HdMbps() bool { - if x != nil && x.Advertise_10HdMbps != nil { - return *x.Advertise_10HdMbps +func (x *Dhcpv4ClientParams) GetRouter() bool { + if x != nil && x.Router != nil { + return *x.Router } return false } -func (x *Layer1AutoNegotiation) GetLinkTraining() bool { - if x != nil && x.LinkTraining != nil { - return *x.LinkTraining +func (x *Dhcpv4ClientParams) GetRenewalTimer() bool { + if x != nil && x.RenewalTimer != nil { + return *x.RenewalTimer } return false } -func (x *Layer1AutoNegotiation) GetRsFec() bool { - if x != nil && x.RsFec != nil { - return *x.RsFec +func (x *Dhcpv4ClientParams) GetRebindingTimer() bool { + if x != nil && x.RebindingTimer != nil { + return *x.RebindingTimer } return false } -// A container for layer1 receive flow control settings. -// To enable flow control settings on ports this object must be a valid -// object not a null value. -type Layer1FlowControl struct { +// Configuration for emulated DHCPv6 Client on a single Interface. If the DHCPv6 Client +// receives one or more DHCPv6 ADVERTISE messages from one or more servers then the +// client chooses one server from which to request configuration parameters, based +// on the configuration parameters offered by the server in the DHCPv6 ADVERTISE messages. +// If all configuration parameters match then the first server will be chosen. https://www.rfc-editor.org/rfc/rfc8415.html +type DeviceDhcpv6Client struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The 48bit mac address that the layer1 port names will listen on - // for a directed pause. - // default = 01:80:C2:00:00:01 - DirectedAddress *string `protobuf:"bytes,1,opt,name=directed_address,json=directedAddress,proto3,oneof" json:"directed_address,omitempty"` - // The type of priority flow control. - // default = Choice.Enum.ieee_802_1qbb - Choice *Layer1FlowControl_Choice_Enum `protobuf:"varint,2,opt,name=choice,proto3,enum=otg.Layer1FlowControl_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Ieee_802_1Qbb *Layer1Ieee8021Qbb `protobuf:"bytes,3,opt,name=ieee_802_1qbb,json=ieee8021qbb,proto3" json:"ieee_802_1qbb,omitempty"` - // Description missing in models - Ieee_802_3X *Layer1Ieee8023X `protobuf:"bytes,4,opt,name=ieee_802_3x,json=ieee8023x,proto3" json:"ieee_802_3x,omitempty"` -} - -func (x *Layer1FlowControl) Reset() { - *x = Layer1FlowControl{} + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // If Rapid Commit is set, client initiates Rapid Commit two-message exchange by including + // Rapid Commit option in Solicit message. + // default = False + RapidCommit *bool `protobuf:"varint,2,opt,name=rapid_commit,json=rapidCommit,proto3,oneof" json:"rapid_commit,omitempty"` + // Each IA has an associated IAID. Differnet IA options represent different types of + // IPv6 addresses and parameters + // accepted by DHCPv6 clients each used in different context by an IPv6 node. + IaType *DeviceDhcpv6ClientIaType `protobuf:"bytes,3,opt,name=ia_type,json=iaType,proto3" json:"ia_type,omitempty"` + // Each DHCP client and server has a DUID. DHCP clients and servers use DUIDs to identify + // each other. + DuidType *DeviceDhcpv6ClientDuidType `protobuf:"bytes,4,opt,name=duid_type,json=duidType,proto3" json:"duid_type,omitempty"` + // The options requested by a client from a server in the options request option. + OptionsRequest *DeviceDhcpv6ClientOptionsRequest `protobuf:"bytes,5,opt,name=options_request,json=optionsRequest,proto3" json:"options_request,omitempty"` + // Optional DHCPv4 Client options that are sent in Dhcp client messages. + Options *DeviceDhcpv6ClientOptions `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"` +} + +func (x *DeviceDhcpv6Client) Reset() { + *x = DeviceDhcpv6Client{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[22] + mi := &file_otg_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Layer1FlowControl) String() string { +func (x *DeviceDhcpv6Client) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Layer1FlowControl) ProtoMessage() {} +func (*DeviceDhcpv6Client) ProtoMessage() {} -func (x *Layer1FlowControl) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[22] +func (x *DeviceDhcpv6Client) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -24218,126 +26808,68 @@ func (x *Layer1FlowControl) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Layer1FlowControl.ProtoReflect.Descriptor instead. -func (*Layer1FlowControl) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{22} +// Deprecated: Use DeviceDhcpv6Client.ProtoReflect.Descriptor instead. +func (*DeviceDhcpv6Client) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{23} } -func (x *Layer1FlowControl) GetDirectedAddress() string { - if x != nil && x.DirectedAddress != nil { - return *x.DirectedAddress +func (x *DeviceDhcpv6Client) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } return "" } -func (x *Layer1FlowControl) GetChoice() Layer1FlowControl_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *DeviceDhcpv6Client) GetRapidCommit() bool { + if x != nil && x.RapidCommit != nil { + return *x.RapidCommit } - return Layer1FlowControl_Choice_unspecified + return false } -func (x *Layer1FlowControl) GetIeee_802_1Qbb() *Layer1Ieee8021Qbb { +func (x *DeviceDhcpv6Client) GetIaType() *DeviceDhcpv6ClientIaType { if x != nil { - return x.Ieee_802_1Qbb + return x.IaType } return nil } -func (x *Layer1FlowControl) GetIeee_802_3X() *Layer1Ieee8023X { +func (x *DeviceDhcpv6Client) GetDuidType() *DeviceDhcpv6ClientDuidType { if x != nil { - return x.Ieee_802_3X + return x.DuidType } return nil } -// A container for ieee 802.3x rx pause settings -type Layer1Ieee8023X struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Layer1Ieee8023X) Reset() { - *x = Layer1Ieee8023X{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *DeviceDhcpv6Client) GetOptionsRequest() *DeviceDhcpv6ClientOptionsRequest { + if x != nil { + return x.OptionsRequest } + return nil } -func (x *Layer1Ieee8023X) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Layer1Ieee8023X) ProtoMessage() {} - -func (x *Layer1Ieee8023X) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *DeviceDhcpv6Client) GetOptions() *DeviceDhcpv6ClientOptions { + if x != nil { + return x.Options } - return mi.MessageOf(x) -} - -// Deprecated: Use Layer1Ieee8023X.ProtoReflect.Descriptor instead. -func (*Layer1Ieee8023X) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{23} + return nil } -// These settings enhance the existing 802.3x pause priority capabilities -// to enable flow control based on 802.1p priorities (classes of service). -type Layer1Ieee8021Qbb struct { +// DHCP client options, these configured options are sent in Dhcp client messages. +type DeviceDhcpv6ClientOptionsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The upper limit on the transmit time of a queue after receiving a - // message to pause a specified priority. - // A value of 0 or null indicates that pfc delay will not be enabled. - // default = 0 - PfcDelay *uint32 `protobuf:"varint,1,opt,name=pfc_delay,json=pfcDelay,proto3,oneof" json:"pfc_delay,omitempty"` - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 0 - PfcClass_0 *uint32 `protobuf:"varint,2,opt,name=pfc_class_0,json=pfcClass0,proto3,oneof" json:"pfc_class_0,omitempty"` - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 1 - PfcClass_1 *uint32 `protobuf:"varint,3,opt,name=pfc_class_1,json=pfcClass1,proto3,oneof" json:"pfc_class_1,omitempty"` - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 2 - PfcClass_2 *uint32 `protobuf:"varint,4,opt,name=pfc_class_2,json=pfcClass2,proto3,oneof" json:"pfc_class_2,omitempty"` - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 3 - PfcClass_3 *uint32 `protobuf:"varint,5,opt,name=pfc_class_3,json=pfcClass3,proto3,oneof" json:"pfc_class_3,omitempty"` - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 4 - PfcClass_4 *uint32 `protobuf:"varint,6,opt,name=pfc_class_4,json=pfcClass4,proto3,oneof" json:"pfc_class_4,omitempty"` - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 5 - PfcClass_5 *uint32 `protobuf:"varint,7,opt,name=pfc_class_5,json=pfcClass5,proto3,oneof" json:"pfc_class_5,omitempty"` - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 6 - PfcClass_6 *uint32 `protobuf:"varint,8,opt,name=pfc_class_6,json=pfcClass6,proto3,oneof" json:"pfc_class_6,omitempty"` - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 7 - PfcClass_7 *uint32 `protobuf:"varint,9,opt,name=pfc_class_7,json=pfcClass7,proto3,oneof" json:"pfc_class_7,omitempty"` + // List of options requested by a client from a server. + Request []*Dhcpv6ClientOptionsOptionsRequest `protobuf:"bytes,1,rep,name=request,proto3" json:"request,omitempty"` + // The list of dhcpv6 client messages where this option is included. + // required = true + AssociatedDhcpMessages *Dhcpv6ClientOptionsIncludedMessages `protobuf:"bytes,2,opt,name=associated_dhcp_messages,json=associatedDhcpMessages,proto3" json:"associated_dhcp_messages,omitempty"` } -func (x *Layer1Ieee8021Qbb) Reset() { - *x = Layer1Ieee8021Qbb{} +func (x *DeviceDhcpv6ClientOptionsRequest) Reset() { + *x = DeviceDhcpv6ClientOptionsRequest{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24345,13 +26877,13 @@ func (x *Layer1Ieee8021Qbb) Reset() { } } -func (x *Layer1Ieee8021Qbb) String() string { +func (x *DeviceDhcpv6ClientOptionsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Layer1Ieee8021Qbb) ProtoMessage() {} +func (*DeviceDhcpv6ClientOptionsRequest) ProtoMessage() {} -func (x *Layer1Ieee8021Qbb) ProtoReflect() protoreflect.Message { +func (x *DeviceDhcpv6ClientOptionsRequest) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24363,117 +26895,57 @@ func (x *Layer1Ieee8021Qbb) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Layer1Ieee8021Qbb.ProtoReflect.Descriptor instead. -func (*Layer1Ieee8021Qbb) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceDhcpv6ClientOptionsRequest.ProtoReflect.Descriptor instead. +func (*DeviceDhcpv6ClientOptionsRequest) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{24} } -func (x *Layer1Ieee8021Qbb) GetPfcDelay() uint32 { - if x != nil && x.PfcDelay != nil { - return *x.PfcDelay - } - return 0 -} - -func (x *Layer1Ieee8021Qbb) GetPfcClass_0() uint32 { - if x != nil && x.PfcClass_0 != nil { - return *x.PfcClass_0 - } - return 0 -} - -func (x *Layer1Ieee8021Qbb) GetPfcClass_1() uint32 { - if x != nil && x.PfcClass_1 != nil { - return *x.PfcClass_1 - } - return 0 -} - -func (x *Layer1Ieee8021Qbb) GetPfcClass_2() uint32 { - if x != nil && x.PfcClass_2 != nil { - return *x.PfcClass_2 - } - return 0 -} - -func (x *Layer1Ieee8021Qbb) GetPfcClass_3() uint32 { - if x != nil && x.PfcClass_3 != nil { - return *x.PfcClass_3 - } - return 0 -} - -func (x *Layer1Ieee8021Qbb) GetPfcClass_4() uint32 { - if x != nil && x.PfcClass_4 != nil { - return *x.PfcClass_4 - } - return 0 -} - -func (x *Layer1Ieee8021Qbb) GetPfcClass_5() uint32 { - if x != nil && x.PfcClass_5 != nil { - return *x.PfcClass_5 - } - return 0 -} - -func (x *Layer1Ieee8021Qbb) GetPfcClass_6() uint32 { - if x != nil && x.PfcClass_6 != nil { - return *x.PfcClass_6 +func (x *DeviceDhcpv6ClientOptionsRequest) GetRequest() []*Dhcpv6ClientOptionsOptionsRequest { + if x != nil { + return x.Request } - return 0 + return nil } -func (x *Layer1Ieee8021Qbb) GetPfcClass_7() uint32 { - if x != nil && x.PfcClass_7 != nil { - return *x.PfcClass_7 +func (x *DeviceDhcpv6ClientOptionsRequest) GetAssociatedDhcpMessages() *Dhcpv6ClientOptionsIncludedMessages { + if x != nil { + return x.AssociatedDhcpMessages } - return 0 + return nil } -// Under Review: There may be changes in filter configuration -// -// Under Review: There may be changes in filter configuration -// -// Configuration for capture settings. -type Capture struct { +// DHCP client options, these configured options are sent in Dhcp client messages. +type DeviceDhcpv6ClientOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The unique names of ports that the capture settings will apply to. Port_names cannot - // be duplicated between capture objects. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // x-constraint: - // - /components/schemas/Port/properties/name - PortNames []string `protobuf:"bytes,1,rep,name=port_names,json=portNames,proto3" json:"port_names,omitempty"` - // A list of filters to apply to the capturing ports. If no filters are specified then - // all packets will be captured. A capture can have multiple filters. The number of - // filters supported is determined by the implementation which can be retrieved using - // the capabilities API. - // When multiple filters are specified the capture implementation must && (and) all - // the filters. - Filters []*CaptureFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` - // Overwrite the capture buffer. - // default = True - Overwrite *bool `protobuf:"varint,3,opt,name=overwrite,proto3,oneof" json:"overwrite,omitempty"` - // The maximum size of each captured packet. If no value is specified or it is null - // then the entire packet will be captured. - PacketSize *uint32 `protobuf:"varint,4,opt,name=packet_size,json=packetSize,proto3,oneof" json:"packet_size,omitempty"` - // The format of the capture file. - // default = Format.Enum.pcap - Format *Capture_Format_Enum `protobuf:"varint,5,opt,name=format,proto3,enum=otg.Capture_Format_Enum,oneof" json:"format,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,6,opt,name=name,proto3,oneof" json:"name,omitempty"` + // A client uses multicast to reach all servers or an individual server. An individual + // server is indicated by + // specifying that server's DUID in a Server Identifier option in the client's message + // (all servers will receive + // this message but only the indicated server will respond). All servers are indicated + // by not supplying this option. + ServerIdentifier *Dhcpv6ClientOptionsServerIdentifier `protobuf:"bytes,1,opt,name=server_identifier,json=serverIdentifier,proto3" json:"server_identifier,omitempty"` + // The vendor class option is used by a client to identify the vendor that manufactured + // the hardware on which + // the client is running. The information contained in the data area of this option + // is contained in one or more + // opaque fields that identify details of the hardware configuration. + VendorClass *Dhcpv6ClientOptionsVendorClass `protobuf:"bytes,2,opt,name=vendor_class,json=vendorClass,proto3" json:"vendor_class,omitempty"` + // This option is used by clients to exchange vendor-specific information with servers. + VendorInfo *Dhcpv6ClientOptionsVendorInfo `protobuf:"bytes,3,opt,name=vendor_info,json=vendorInfo,proto3" json:"vendor_info,omitempty"` + // DHCPv6 server needs to know the FQDN of the client for the addresses for the client's + // IA_NA bindings in order to + // update the IPv6-address-to-FQDN mapping. This option allows the client to convey + // its FQDN to the server. The Client + // FQDN option also contains Flags that DHCPv6 clients and servers use to negotiate + // who does which update. + Fqdn *Dhcpv6ClientOptionsFqdn `protobuf:"bytes,4,opt,name=fqdn,proto3" json:"fqdn,omitempty"` } -func (x *Capture) Reset() { - *x = Capture{} +func (x *DeviceDhcpv6ClientOptions) Reset() { + *x = DeviceDhcpv6ClientOptions{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24481,13 +26953,13 @@ func (x *Capture) Reset() { } } -func (x *Capture) String() string { +func (x *DeviceDhcpv6ClientOptions) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Capture) ProtoMessage() {} +func (*DeviceDhcpv6ClientOptions) ProtoMessage() {} -func (x *Capture) ProtoReflect() protoreflect.Message { +func (x *DeviceDhcpv6ClientOptions) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24499,78 +26971,64 @@ func (x *Capture) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Capture.ProtoReflect.Descriptor instead. -func (*Capture) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceDhcpv6ClientOptions.ProtoReflect.Descriptor instead. +func (*DeviceDhcpv6ClientOptions) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{25} } -func (x *Capture) GetPortNames() []string { +func (x *DeviceDhcpv6ClientOptions) GetServerIdentifier() *Dhcpv6ClientOptionsServerIdentifier { if x != nil { - return x.PortNames + return x.ServerIdentifier } return nil } -func (x *Capture) GetFilters() []*CaptureFilter { +func (x *DeviceDhcpv6ClientOptions) GetVendorClass() *Dhcpv6ClientOptionsVendorClass { if x != nil { - return x.Filters + return x.VendorClass } return nil } -func (x *Capture) GetOverwrite() bool { - if x != nil && x.Overwrite != nil { - return *x.Overwrite - } - return false -} - -func (x *Capture) GetPacketSize() uint32 { - if x != nil && x.PacketSize != nil { - return *x.PacketSize - } - return 0 -} - -func (x *Capture) GetFormat() Capture_Format_Enum { - if x != nil && x.Format != nil { - return *x.Format +func (x *DeviceDhcpv6ClientOptions) GetVendorInfo() *Dhcpv6ClientOptionsVendorInfo { + if x != nil { + return x.VendorInfo } - return Capture_Format_unspecified + return nil } -func (x *Capture) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *DeviceDhcpv6ClientOptions) GetFqdn() *Dhcpv6ClientOptionsFqdn { + if x != nil { + return x.Fqdn } - return "" + return nil } -// Configuration for capture filters -type CaptureFilter struct { +// Description missing in models +type DeviceDhcpv6ClientIaType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The type of capture filter. - // default = Choice.Enum.custom - Choice *CaptureFilter_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.CaptureFilter_Choice_Enum,oneof" json:"choice,omitempty"` - // Offset from last filter in the list. If no filters are present it is offset from - // position 0. Multiple custom filters can be present, the length of each custom filter - // is the length of the value being filtered. - Custom *CaptureCustom `protobuf:"bytes,2,opt,name=custom,proto3" json:"custom,omitempty"` - // Description missing in models - Ethernet *CaptureEthernet `protobuf:"bytes,3,opt,name=ethernet,proto3" json:"ethernet,omitempty"` + // Identity Association: Each IA has an associated IAID. IA_NA and IA_TA options represent + // different types of IPv6 addresses and parameters accepted by DHCPv6 clients each + // used in different context by an IPv6 node. IA_NA is the Identity Association for + // Non-temporary Addresses option. IA_TA is the Identity Association for Temporary + // Addresses option. IA_PD and IA_NAPD options represent one or more IPv6 prefix and + // parameters. IA_PD is the Identity Association for Prefix Delegation and IA_NAPD + // s the Identity Association for Temporary Prefix Delegation. + // default = Choice.Enum.iana + Choice *DeviceDhcpv6ClientIaType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.DeviceDhcpv6ClientIaType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Vlan *CaptureVlan `protobuf:"bytes,4,opt,name=vlan,proto3" json:"vlan,omitempty"` + Iana *DeviceDhcpv6ClientIaTimeValue `protobuf:"bytes,2,opt,name=iana,proto3" json:"iana,omitempty"` // Description missing in models - Ipv4 *CaptureIpv4 `protobuf:"bytes,5,opt,name=ipv4,proto3" json:"ipv4,omitempty"` + Iapd *DeviceDhcpv6ClientIaTimeValue `protobuf:"bytes,3,opt,name=iapd,proto3" json:"iapd,omitempty"` // Description missing in models - Ipv6 *CaptureIpv6 `protobuf:"bytes,6,opt,name=ipv6,proto3" json:"ipv6,omitempty"` + Ianapd *DeviceDhcpv6ClientIaTimeValue `protobuf:"bytes,4,opt,name=ianapd,proto3" json:"ianapd,omitempty"` } -func (x *CaptureFilter) Reset() { - *x = CaptureFilter{} +func (x *DeviceDhcpv6ClientIaType) Reset() { + *x = DeviceDhcpv6ClientIaType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24578,13 +27036,13 @@ func (x *CaptureFilter) Reset() { } } -func (x *CaptureFilter) String() string { +func (x *DeviceDhcpv6ClientIaType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CaptureFilter) ProtoMessage() {} +func (*DeviceDhcpv6ClientIaType) ProtoMessage() {} -func (x *CaptureFilter) ProtoReflect() protoreflect.Message { +func (x *DeviceDhcpv6ClientIaType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24596,77 +27054,62 @@ func (x *CaptureFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CaptureFilter.ProtoReflect.Descriptor instead. -func (*CaptureFilter) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceDhcpv6ClientIaType.ProtoReflect.Descriptor instead. +func (*DeviceDhcpv6ClientIaType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{26} } -func (x *CaptureFilter) GetChoice() CaptureFilter_Choice_Enum { +func (x *DeviceDhcpv6ClientIaType) GetChoice() DeviceDhcpv6ClientIaType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return CaptureFilter_Choice_unspecified -} - -func (x *CaptureFilter) GetCustom() *CaptureCustom { - if x != nil { - return x.Custom - } - return nil -} - -func (x *CaptureFilter) GetEthernet() *CaptureEthernet { - if x != nil { - return x.Ethernet - } - return nil + return DeviceDhcpv6ClientIaType_Choice_unspecified } -func (x *CaptureFilter) GetVlan() *CaptureVlan { +func (x *DeviceDhcpv6ClientIaType) GetIana() *DeviceDhcpv6ClientIaTimeValue { if x != nil { - return x.Vlan + return x.Iana } return nil } -func (x *CaptureFilter) GetIpv4() *CaptureIpv4 { +func (x *DeviceDhcpv6ClientIaType) GetIapd() *DeviceDhcpv6ClientIaTimeValue { if x != nil { - return x.Ipv4 + return x.Iapd } return nil } -func (x *CaptureFilter) GetIpv6() *CaptureIpv6 { +func (x *DeviceDhcpv6ClientIaType) GetIanapd() *DeviceDhcpv6ClientIaTimeValue { if x != nil { - return x.Ipv6 + return x.Ianapd } return nil } -// Description missing in models -type CaptureCustom struct { +// The container for the suggested times at which the client contacts the server or +// any available server. +type DeviceDhcpv6ClientIaTimeValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The bit offset of field to filter on - Offset *uint32 `protobuf:"varint,1,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // The bit length of field to filter on - // default = 8 - BitLength *uint32 `protobuf:"varint,2,opt,name=bit_length,json=bitLength,proto3,oneof" json:"bit_length,omitempty"` - // Description missing in models - // default = 00 - Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = 00 - Mask *string `protobuf:"bytes,4,opt,name=mask,proto3,oneof" json:"mask,omitempty"` - // Description missing in models - // default = False - Negate *bool `protobuf:"varint,5,opt,name=negate,proto3,oneof" json:"negate,omitempty"` + // The suggested time at which the client contacts the server from which the addresses + // were obtained to extend the lifetimes of the addresses assigned. T1 is a time duration + // relative to the current time expressed in units of seconds. If set to 0 server will + // ignore it. If the maximum value is specified it means infinite time. + // default = 302400 + T1 *uint32 `protobuf:"varint,1,opt,name=t1,proto3,oneof" json:"t1,omitempty"` + // The suggested time at which the client contacts any available server to extend the + // lifetimes of the addresses assigned. T2 is a time duration relative to the current + // time expressed in units of seconds. If set to 0 server will ignore it. If the maximum + // value is specified it means infinite time + // default = 483840 + T2 *uint32 `protobuf:"varint,2,opt,name=t2,proto3,oneof" json:"t2,omitempty"` } -func (x *CaptureCustom) Reset() { - *x = CaptureCustom{} +func (x *DeviceDhcpv6ClientIaTimeValue) Reset() { + *x = DeviceDhcpv6ClientIaTimeValue{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24674,13 +27117,13 @@ func (x *CaptureCustom) Reset() { } } -func (x *CaptureCustom) String() string { +func (x *DeviceDhcpv6ClientIaTimeValue) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CaptureCustom) ProtoMessage() {} +func (*DeviceDhcpv6ClientIaTimeValue) ProtoMessage() {} -func (x *CaptureCustom) ProtoReflect() protoreflect.Message { +func (x *DeviceDhcpv6ClientIaTimeValue) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24692,65 +27135,45 @@ func (x *CaptureCustom) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CaptureCustom.ProtoReflect.Descriptor instead. -func (*CaptureCustom) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceDhcpv6ClientIaTimeValue.ProtoReflect.Descriptor instead. +func (*DeviceDhcpv6ClientIaTimeValue) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{27} } -func (x *CaptureCustom) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *DeviceDhcpv6ClientIaTimeValue) GetT1() uint32 { + if x != nil && x.T1 != nil { + return *x.T1 } return 0 } -func (x *CaptureCustom) GetBitLength() uint32 { - if x != nil && x.BitLength != nil { - return *x.BitLength +func (x *DeviceDhcpv6ClientIaTimeValue) GetT2() uint32 { + if x != nil && x.T2 != nil { + return *x.T2 } return 0 } -func (x *CaptureCustom) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value - } - return "" -} - -func (x *CaptureCustom) GetMask() string { - if x != nil && x.Mask != nil { - return *x.Mask - } - return "" -} - -func (x *CaptureCustom) GetNegate() bool { - if x != nil && x.Negate != nil { - return *x.Negate - } - return false -} - // Description missing in models -type CaptureField struct { +type DeviceDhcpv6ClientDuidType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Each DHCP client and server has a DUID. DHCP clients use DUIDs to identify a server + // in messages where a server needs to be identified. + // default = Choice.Enum.llt + Choice *DeviceDhcpv6ClientDuidType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.DeviceDhcpv6ClientDuidType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 00 - Value *string `protobuf:"bytes,1,opt,name=value,proto3,oneof" json:"value,omitempty"` + Llt *DeviceDhcpv6ClientNoDuid `protobuf:"bytes,2,opt,name=llt,proto3" json:"llt,omitempty"` // Description missing in models - // default = 00 - Mask *string `protobuf:"bytes,2,opt,name=mask,proto3,oneof" json:"mask,omitempty"` + En *DeviceDhcpv6ClientDuidValue `protobuf:"bytes,3,opt,name=en,proto3" json:"en,omitempty"` // Description missing in models - // default = False - Negate *bool `protobuf:"varint,3,opt,name=negate,proto3,oneof" json:"negate,omitempty"` + Ll *DeviceDhcpv6ClientNoDuid `protobuf:"bytes,4,opt,name=ll,proto3" json:"ll,omitempty"` } -func (x *CaptureField) Reset() { - *x = CaptureField{} +func (x *DeviceDhcpv6ClientDuidType) Reset() { + *x = DeviceDhcpv6ClientDuidType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24758,13 +27181,13 @@ func (x *CaptureField) Reset() { } } -func (x *CaptureField) String() string { +func (x *DeviceDhcpv6ClientDuidType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CaptureField) ProtoMessage() {} +func (*DeviceDhcpv6ClientDuidType) ProtoMessage() {} -func (x *CaptureField) ProtoReflect() protoreflect.Message { +func (x *DeviceDhcpv6ClientDuidType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24776,50 +27199,57 @@ func (x *CaptureField) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CaptureField.ProtoReflect.Descriptor instead. -func (*CaptureField) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceDhcpv6ClientDuidType.ProtoReflect.Descriptor instead. +func (*DeviceDhcpv6ClientDuidType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{28} } -func (x *CaptureField) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value +func (x *DeviceDhcpv6ClientDuidType) GetChoice() DeviceDhcpv6ClientDuidType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return DeviceDhcpv6ClientDuidType_Choice_unspecified } -func (x *CaptureField) GetMask() string { - if x != nil && x.Mask != nil { - return *x.Mask +func (x *DeviceDhcpv6ClientDuidType) GetLlt() *DeviceDhcpv6ClientNoDuid { + if x != nil { + return x.Llt } - return "" + return nil } -func (x *CaptureField) GetNegate() bool { - if x != nil && x.Negate != nil { - return *x.Negate +func (x *DeviceDhcpv6ClientDuidType) GetEn() *DeviceDhcpv6ClientDuidValue { + if x != nil { + return x.En } - return false + return nil } -// Description missing in models -type CaptureEthernet struct { +func (x *DeviceDhcpv6ClientDuidType) GetLl() *DeviceDhcpv6ClientNoDuid { + if x != nil { + return x.Ll + } + return nil +} + +// The container for the DUID-EN. This consists of the 4-octet vendor's registered Private +// Enterprise Number as maintained by IANA [IANA-PEN] followed by a unique identifier +// assigned by the vendor. +type DeviceDhcpv6ClientDuidValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Src *CaptureField `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"` - // Description missing in models - Dst *CaptureField `protobuf:"bytes,2,opt,name=dst,proto3" json:"dst,omitempty"` - // Description missing in models - EtherType *CaptureField `protobuf:"bytes,3,opt,name=ether_type,json=etherType,proto3" json:"ether_type,omitempty"` - // Description missing in models - PfcQueue *CaptureField `protobuf:"bytes,4,opt,name=pfc_queue,json=pfcQueue,proto3" json:"pfc_queue,omitempty"` + // 4-octet vendor's registered Private Enterprise Number as maintained by IANA [IANA-PEN]. + // default = 10 + EnterpriseId *uint32 `protobuf:"varint,1,opt,name=enterprise_id,json=enterpriseId,proto3,oneof" json:"enterprise_id,omitempty"` + // Unique identifier assigned by the vendor. + // default = 10 + VendorId *uint32 `protobuf:"varint,2,opt,name=vendor_id,json=vendorId,proto3,oneof" json:"vendor_id,omitempty"` } -func (x *CaptureEthernet) Reset() { - *x = CaptureEthernet{} +func (x *DeviceDhcpv6ClientDuidValue) Reset() { + *x = DeviceDhcpv6ClientDuidValue{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24827,13 +27257,13 @@ func (x *CaptureEthernet) Reset() { } } -func (x *CaptureEthernet) String() string { +func (x *DeviceDhcpv6ClientDuidValue) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CaptureEthernet) ProtoMessage() {} +func (*DeviceDhcpv6ClientDuidValue) ProtoMessage() {} -func (x *CaptureEthernet) ProtoReflect() protoreflect.Message { +func (x *DeviceDhcpv6ClientDuidValue) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24845,57 +27275,34 @@ func (x *CaptureEthernet) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CaptureEthernet.ProtoReflect.Descriptor instead. -func (*CaptureEthernet) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceDhcpv6ClientDuidValue.ProtoReflect.Descriptor instead. +func (*DeviceDhcpv6ClientDuidValue) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{29} } -func (x *CaptureEthernet) GetSrc() *CaptureField { - if x != nil { - return x.Src - } - return nil -} - -func (x *CaptureEthernet) GetDst() *CaptureField { - if x != nil { - return x.Dst - } - return nil -} - -func (x *CaptureEthernet) GetEtherType() *CaptureField { - if x != nil { - return x.EtherType +func (x *DeviceDhcpv6ClientDuidValue) GetEnterpriseId() uint32 { + if x != nil && x.EnterpriseId != nil { + return *x.EnterpriseId } - return nil + return 0 } -func (x *CaptureEthernet) GetPfcQueue() *CaptureField { - if x != nil { - return x.PfcQueue +func (x *DeviceDhcpv6ClientDuidValue) GetVendorId() uint32 { + if x != nil && x.VendorId != nil { + return *x.VendorId } - return nil + return 0 } -// Description missing in models -type CaptureVlan struct { +// The container for DUID-LL and DUID-LLT. +type DeviceDhcpv6ClientNoDuid struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // Description missing in models - Priority *CaptureField `protobuf:"bytes,1,opt,name=priority,proto3" json:"priority,omitempty"` - // Description missing in models - Cfi *CaptureField `protobuf:"bytes,2,opt,name=cfi,proto3" json:"cfi,omitempty"` - // Description missing in models - Id *CaptureField `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` - // Description missing in models - Protocol *CaptureField `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"` } -func (x *CaptureVlan) Reset() { - *x = CaptureVlan{} +func (x *DeviceDhcpv6ClientNoDuid) Reset() { + *x = DeviceDhcpv6ClientNoDuid{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24903,13 +27310,13 @@ func (x *CaptureVlan) Reset() { } } -func (x *CaptureVlan) String() string { +func (x *DeviceDhcpv6ClientNoDuid) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CaptureVlan) ProtoMessage() {} +func (*DeviceDhcpv6ClientNoDuid) ProtoMessage() {} -func (x *CaptureVlan) ProtoReflect() protoreflect.Message { +func (x *DeviceDhcpv6ClientNoDuid) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24921,77 +27328,34 @@ func (x *CaptureVlan) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CaptureVlan.ProtoReflect.Descriptor instead. -func (*CaptureVlan) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceDhcpv6ClientNoDuid.ProtoReflect.Descriptor instead. +func (*DeviceDhcpv6ClientNoDuid) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{30} } -func (x *CaptureVlan) GetPriority() *CaptureField { - if x != nil { - return x.Priority - } - return nil -} - -func (x *CaptureVlan) GetCfi() *CaptureField { - if x != nil { - return x.Cfi - } - return nil -} - -func (x *CaptureVlan) GetId() *CaptureField { - if x != nil { - return x.Id - } - return nil -} - -func (x *CaptureVlan) GetProtocol() *CaptureField { - if x != nil { - return x.Protocol - } - return nil -} - // Description missing in models -type CaptureIpv4 struct { +type Dhcpv6ClientOptionsServerIdentifier struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The Identifier option is used to carry a DUID. The option code is 2. The server identifier + // identifies a server. This option is used when client wants to contact a particular + // server. + // default = Choice.Enum.duid_ll + Choice *Dhcpv6ClientOptionsServerIdentifier_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.Dhcpv6ClientOptionsServerIdentifier_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Version *CaptureField `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // Description missing in models - HeaderLength *CaptureField `protobuf:"bytes,2,opt,name=header_length,json=headerLength,proto3" json:"header_length,omitempty"` - // Description missing in models - Priority *CaptureField `protobuf:"bytes,3,opt,name=priority,proto3" json:"priority,omitempty"` - // Description missing in models - TotalLength *CaptureField `protobuf:"bytes,4,opt,name=total_length,json=totalLength,proto3" json:"total_length,omitempty"` - // Description missing in models - Identification *CaptureField `protobuf:"bytes,5,opt,name=identification,proto3" json:"identification,omitempty"` - // Description missing in models - Reserved *CaptureField `protobuf:"bytes,6,opt,name=reserved,proto3" json:"reserved,omitempty"` - // Description missing in models - DontFragment *CaptureField `protobuf:"bytes,7,opt,name=dont_fragment,json=dontFragment,proto3" json:"dont_fragment,omitempty"` - // Description missing in models - MoreFragments *CaptureField `protobuf:"bytes,8,opt,name=more_fragments,json=moreFragments,proto3" json:"more_fragments,omitempty"` - // Description missing in models - FragmentOffset *CaptureField `protobuf:"bytes,9,opt,name=fragment_offset,json=fragmentOffset,proto3" json:"fragment_offset,omitempty"` - // Description missing in models - TimeToLive *CaptureField `protobuf:"bytes,10,opt,name=time_to_live,json=timeToLive,proto3" json:"time_to_live,omitempty"` - // Description missing in models - Protocol *CaptureField `protobuf:"bytes,11,opt,name=protocol,proto3" json:"protocol,omitempty"` + DuidLlt *Dhcpv6ClientOptionsDuidLlt `protobuf:"bytes,2,opt,name=duid_llt,json=duidLlt,proto3" json:"duid_llt,omitempty"` // Description missing in models - HeaderChecksum *CaptureField `protobuf:"bytes,12,opt,name=header_checksum,json=headerChecksum,proto3" json:"header_checksum,omitempty"` + DuidEn *Dhcpv6ClientOptionsDuidEn `protobuf:"bytes,3,opt,name=duid_en,json=duidEn,proto3" json:"duid_en,omitempty"` // Description missing in models - Src *CaptureField `protobuf:"bytes,13,opt,name=src,proto3" json:"src,omitempty"` + DuidLl *Dhcpv6ClientOptionsDuidLl `protobuf:"bytes,4,opt,name=duid_ll,json=duidLl,proto3" json:"duid_ll,omitempty"` // Description missing in models - Dst *CaptureField `protobuf:"bytes,14,opt,name=dst,proto3" json:"dst,omitempty"` + DuidUuid *Dhcpv6ClientOptionsDuidUuid `protobuf:"bytes,5,opt,name=duid_uuid,json=duidUuid,proto3" json:"duid_uuid,omitempty"` } -func (x *CaptureIpv4) Reset() { - *x = CaptureIpv4{} +func (x *Dhcpv6ClientOptionsServerIdentifier) Reset() { + *x = Dhcpv6ClientOptionsServerIdentifier{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -24999,13 +27363,13 @@ func (x *CaptureIpv4) Reset() { } } -func (x *CaptureIpv4) String() string { +func (x *Dhcpv6ClientOptionsServerIdentifier) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CaptureIpv4) ProtoMessage() {} +func (*Dhcpv6ClientOptionsServerIdentifier) ProtoMessage() {} -func (x *CaptureIpv4) ProtoReflect() protoreflect.Message { +func (x *Dhcpv6ClientOptionsServerIdentifier) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -25017,150 +27381,142 @@ func (x *CaptureIpv4) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CaptureIpv4.ProtoReflect.Descriptor instead. -func (*CaptureIpv4) Descriptor() ([]byte, []int) { +// Deprecated: Use Dhcpv6ClientOptionsServerIdentifier.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsServerIdentifier) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{31} } -func (x *CaptureIpv4) GetVersion() *CaptureField { - if x != nil { - return x.Version +func (x *Dhcpv6ClientOptionsServerIdentifier) GetChoice() Dhcpv6ClientOptionsServerIdentifier_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return Dhcpv6ClientOptionsServerIdentifier_Choice_unspecified } -func (x *CaptureIpv4) GetHeaderLength() *CaptureField { +func (x *Dhcpv6ClientOptionsServerIdentifier) GetDuidLlt() *Dhcpv6ClientOptionsDuidLlt { if x != nil { - return x.HeaderLength + return x.DuidLlt } return nil } -func (x *CaptureIpv4) GetPriority() *CaptureField { +func (x *Dhcpv6ClientOptionsServerIdentifier) GetDuidEn() *Dhcpv6ClientOptionsDuidEn { if x != nil { - return x.Priority + return x.DuidEn } return nil } -func (x *CaptureIpv4) GetTotalLength() *CaptureField { +func (x *Dhcpv6ClientOptionsServerIdentifier) GetDuidLl() *Dhcpv6ClientOptionsDuidLl { if x != nil { - return x.TotalLength + return x.DuidLl } return nil } -func (x *CaptureIpv4) GetIdentification() *CaptureField { +func (x *Dhcpv6ClientOptionsServerIdentifier) GetDuidUuid() *Dhcpv6ClientOptionsDuidUuid { if x != nil { - return x.Identification + return x.DuidUuid } return nil } -func (x *CaptureIpv4) GetReserved() *CaptureField { - if x != nil { - return x.Reserved - } - return nil -} +// DUID based on Link Layer address plus time. Hardware Type will be auto assigned to +// ethernet type. +type Dhcpv6ClientOptionsDuidLlt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *CaptureIpv4) GetDontFragment() *CaptureField { - if x != nil { - return x.DontFragment - } - return nil + // The time value is the time that the DUID is generated represented in seconds since + // midnight (UTC), January 1, + // 2000, modulo 2^32. The DUID generatation time will the current time when dhcpv6 client + // contacts the server. + // required = true + Time *uint32 `protobuf:"varint,1,opt,name=time,proto3,oneof" json:"time,omitempty"` + // The link-layer address is stored in canonical form, as described in RFC 2464. + // + // required = true + LinkLayerAddress *Dhcpv6ClientOptionsLinkLayerAddress `protobuf:"bytes,2,opt,name=link_layer_address,json=linkLayerAddress,proto3" json:"link_layer_address,omitempty"` } -func (x *CaptureIpv4) GetMoreFragments() *CaptureField { - if x != nil { - return x.MoreFragments +func (x *Dhcpv6ClientOptionsDuidLlt) Reset() { + *x = Dhcpv6ClientOptionsDuidLlt{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *CaptureIpv4) GetFragmentOffset() *CaptureField { - if x != nil { - return x.FragmentOffset - } - return nil +func (x *Dhcpv6ClientOptionsDuidLlt) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *CaptureIpv4) GetTimeToLive() *CaptureField { - if x != nil { - return x.TimeToLive - } - return nil -} +func (*Dhcpv6ClientOptionsDuidLlt) ProtoMessage() {} -func (x *CaptureIpv4) GetProtocol() *CaptureField { - if x != nil { - return x.Protocol +func (x *Dhcpv6ClientOptionsDuidLlt) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *CaptureIpv4) GetHeaderChecksum() *CaptureField { - if x != nil { - return x.HeaderChecksum - } - return nil +// Deprecated: Use Dhcpv6ClientOptionsDuidLlt.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsDuidLlt) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{32} } -func (x *CaptureIpv4) GetSrc() *CaptureField { - if x != nil { - return x.Src +func (x *Dhcpv6ClientOptionsDuidLlt) GetTime() uint32 { + if x != nil && x.Time != nil { + return *x.Time } - return nil + return 0 } -func (x *CaptureIpv4) GetDst() *CaptureField { +func (x *Dhcpv6ClientOptionsDuidLlt) GetLinkLayerAddress() *Dhcpv6ClientOptionsLinkLayerAddress { if x != nil { - return x.Dst + return x.LinkLayerAddress } return nil } -// Description missing in models -type CaptureIpv6 struct { +// DUID assigned by vendor based on enterprise number. +type Dhcpv6ClientOptionsDuidEn struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Version *CaptureField `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // Description missing in models - TrafficClass *CaptureField `protobuf:"bytes,2,opt,name=traffic_class,json=trafficClass,proto3" json:"traffic_class,omitempty"` - // Description missing in models - FlowLabel *CaptureField `protobuf:"bytes,3,opt,name=flow_label,json=flowLabel,proto3" json:"flow_label,omitempty"` - // Description missing in models - PayloadLength *CaptureField `protobuf:"bytes,4,opt,name=payload_length,json=payloadLength,proto3" json:"payload_length,omitempty"` - // Description missing in models - NextHeader *CaptureField `protobuf:"bytes,5,opt,name=next_header,json=nextHeader,proto3" json:"next_header,omitempty"` - // Description missing in models - HopLimit *CaptureField `protobuf:"bytes,6,opt,name=hop_limit,json=hopLimit,proto3" json:"hop_limit,omitempty"` - // Description missing in models - Src *CaptureField `protobuf:"bytes,7,opt,name=src,proto3" json:"src,omitempty"` - // Description missing in models - Dst *CaptureField `protobuf:"bytes,8,opt,name=dst,proto3" json:"dst,omitempty"` + // Vendor's registered private enterprise number as maintained by IANA. + // required = true + EnterpriseNumber *uint32 `protobuf:"varint,1,opt,name=enterprise_number,json=enterpriseNumber,proto3,oneof" json:"enterprise_number,omitempty"` + // The unique identifier assigned by the vendor. + // required = true + Identifier *string `protobuf:"bytes,2,opt,name=identifier,proto3,oneof" json:"identifier,omitempty"` } -func (x *CaptureIpv6) Reset() { - *x = CaptureIpv6{} +func (x *Dhcpv6ClientOptionsDuidEn) Reset() { + *x = Dhcpv6ClientOptionsDuidEn{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[32] + mi := &file_otg_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *CaptureIpv6) String() string { +func (x *Dhcpv6ClientOptionsDuidEn) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CaptureIpv6) ProtoMessage() {} +func (*Dhcpv6ClientOptionsDuidEn) ProtoMessage() {} -func (x *CaptureIpv6) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[32] +func (x *Dhcpv6ClientOptionsDuidEn) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25171,114 +27527,126 @@ func (x *CaptureIpv6) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CaptureIpv6.ProtoReflect.Descriptor instead. -func (*CaptureIpv6) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{32} +// Deprecated: Use Dhcpv6ClientOptionsDuidEn.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsDuidEn) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{33} } -func (x *CaptureIpv6) GetVersion() *CaptureField { - if x != nil { - return x.Version +func (x *Dhcpv6ClientOptionsDuidEn) GetEnterpriseNumber() uint32 { + if x != nil && x.EnterpriseNumber != nil { + return *x.EnterpriseNumber } - return nil + return 0 } -func (x *CaptureIpv6) GetTrafficClass() *CaptureField { - if x != nil { - return x.TrafficClass +func (x *Dhcpv6ClientOptionsDuidEn) GetIdentifier() string { + if x != nil && x.Identifier != nil { + return *x.Identifier } - return nil + return "" } -func (x *CaptureIpv6) GetFlowLabel() *CaptureField { - if x != nil { - return x.FlowLabel - } - return nil +// DUID based on Link Layer address. Hardware Type will be auto assigned to ethernet +// type. +type Dhcpv6ClientOptionsDuidLl struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The link-layer address is stored in canonical form, as described in RFC 2464. + // + // required = true + LinkLayerAddress *Dhcpv6ClientOptionsLinkLayerAddress `protobuf:"bytes,1,opt,name=link_layer_address,json=linkLayerAddress,proto3" json:"link_layer_address,omitempty"` } -func (x *CaptureIpv6) GetPayloadLength() *CaptureField { - if x != nil { - return x.PayloadLength +func (x *Dhcpv6ClientOptionsDuidLl) Reset() { + *x = Dhcpv6ClientOptionsDuidLl{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *CaptureIpv6) GetNextHeader() *CaptureField { - if x != nil { - return x.NextHeader - } - return nil +func (x *Dhcpv6ClientOptionsDuidLl) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *CaptureIpv6) GetHopLimit() *CaptureField { - if x != nil { - return x.HopLimit +func (*Dhcpv6ClientOptionsDuidLl) ProtoMessage() {} + +func (x *Dhcpv6ClientOptionsDuidLl) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *CaptureIpv6) GetSrc() *CaptureField { - if x != nil { - return x.Src - } - return nil +// Deprecated: Use Dhcpv6ClientOptionsDuidLl.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsDuidLl) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{34} } -func (x *CaptureIpv6) GetDst() *CaptureField { +func (x *Dhcpv6ClientOptionsDuidLl) GetLinkLayerAddress() *Dhcpv6ClientOptionsLinkLayerAddress { if x != nil { - return x.Dst + return x.LinkLayerAddress } return nil } -// A container for emulated interfaces, loopback interfaces and protocol configurations. -type Device struct { +// DUID embedded a Universally Unique IDentifier (UUID). A UUID is an identifier that +// is unique across both space and time, with respect to the space of all UUIDs. +type Dhcpv6ClientOptionsDuidUuid struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Ethernet configuration for one or more emulated network interfaces. - Ethernets []*DeviceEthernet `protobuf:"bytes,1,rep,name=ethernets,proto3" json:"ethernets,omitempty"` - // IPv4 Loopback interface that can be attached to an Ethernet in the same device or - // to an Ethernet in another device. - Ipv4Loopbacks []*DeviceIpv4Loopback `protobuf:"bytes,2,rep,name=ipv4_loopbacks,json=ipv4Loopbacks,proto3" json:"ipv4_loopbacks,omitempty"` - // IPv6 Loopback interface that can be attached to an Ethernet in the same device or - // to an Ethernet in another device. - Ipv6Loopbacks []*DeviceIpv6Loopback `protobuf:"bytes,3,rep,name=ipv6_loopbacks,json=ipv6Loopbacks,proto3" json:"ipv6_loopbacks,omitempty"` - // The properties of an IS-IS router and its children, such as IS-IS interfaces and - // route ranges. - Isis *DeviceIsisRouter `protobuf:"bytes,4,opt,name=isis,proto3" json:"isis,omitempty"` - // The properties of BGP router and its children, such as BGPv4, BGPv6 peers and their - // route ranges. - Bgp *DeviceBgpRouter `protobuf:"bytes,5,opt,name=bgp,proto3" json:"bgp,omitempty"` - // Configuration of VXLAN tunnel interfaces RFC Ref: https://datatracker.ietf.org/doc/html/rfc7348 - Vxlan *DeviceVxlan `protobuf:"bytes,6,opt,name=vxlan,proto3" json:"vxlan,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,7,opt,name=name,proto3,oneof" json:"name,omitempty"` - // The properties of an RSVP router and its children. - Rsvp *DeviceRsvp `protobuf:"bytes,8,opt,name=rsvp,proto3" json:"rsvp,omitempty"` + // The version number is in the most significant 4 bits of the timestamp (bits 4 through + // 7 of the time_hi_and_version field). + Version *Dhcpv6ClientOptionsDuidUuidVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // The variant field determines the layout of the UUID. It is multiplexed with clock_seq_hi_and_reserved. + Variant *Dhcpv6ClientOptionsDuidUuidVariant `protobuf:"bytes,2,opt,name=variant,proto3" json:"variant,omitempty"` + // The low field of the timestamp. + // default = 0 + TimeLow *uint32 `protobuf:"varint,3,opt,name=time_low,json=timeLow,proto3,oneof" json:"time_low,omitempty"` + // The middle field of the timestamp. + // default = 0 + TimeMid *uint32 `protobuf:"varint,4,opt,name=time_mid,json=timeMid,proto3,oneof" json:"time_mid,omitempty"` + // The high field of the timestamp multiplexed with the version number. + // default = 0 + TimeHiAndVersion *uint32 `protobuf:"varint,5,opt,name=time_hi_and_version,json=timeHiAndVersion,proto3,oneof" json:"time_hi_and_version,omitempty"` + // The high field of the clock sequence multiplexed with the variant. + // default = 0 + ClockSeqHiAndReserved *uint32 `protobuf:"varint,6,opt,name=clock_seq_hi_and_reserved,json=clockSeqHiAndReserved,proto3,oneof" json:"clock_seq_hi_and_reserved,omitempty"` + // The low field of the clock sequence. + // default = 0 + ClockSeqLow *uint32 `protobuf:"varint,7,opt,name=clock_seq_low,json=clockSeqLow,proto3,oneof" json:"clock_seq_low,omitempty"` + // The spatially unique node identifier. + // default = 00:00:00:00:00:00 + Node *string `protobuf:"bytes,8,opt,name=node,proto3,oneof" json:"node,omitempty"` } -func (x *Device) Reset() { - *x = Device{} +func (x *Dhcpv6ClientOptionsDuidUuid) Reset() { + *x = Dhcpv6ClientOptionsDuidUuid{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[33] + mi := &file_otg_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Device) String() string { +func (x *Dhcpv6ClientOptionsDuidUuid) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Device) ProtoMessage() {} +func (*Dhcpv6ClientOptionsDuidUuid) ProtoMessage() {} -func (x *Device) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[33] +func (x *Dhcpv6ClientOptionsDuidUuid) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25289,98 +27657,97 @@ func (x *Device) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Device.ProtoReflect.Descriptor instead. -func (*Device) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{33} +// Deprecated: Use Dhcpv6ClientOptionsDuidUuid.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsDuidUuid) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{35} } -func (x *Device) GetEthernets() []*DeviceEthernet { +func (x *Dhcpv6ClientOptionsDuidUuid) GetVersion() *Dhcpv6ClientOptionsDuidUuidVersion { if x != nil { - return x.Ethernets + return x.Version } return nil } -func (x *Device) GetIpv4Loopbacks() []*DeviceIpv4Loopback { +func (x *Dhcpv6ClientOptionsDuidUuid) GetVariant() *Dhcpv6ClientOptionsDuidUuidVariant { if x != nil { - return x.Ipv4Loopbacks + return x.Variant } return nil } -func (x *Device) GetIpv6Loopbacks() []*DeviceIpv6Loopback { - if x != nil { - return x.Ipv6Loopbacks +func (x *Dhcpv6ClientOptionsDuidUuid) GetTimeLow() uint32 { + if x != nil && x.TimeLow != nil { + return *x.TimeLow } - return nil + return 0 } -func (x *Device) GetIsis() *DeviceIsisRouter { - if x != nil { - return x.Isis +func (x *Dhcpv6ClientOptionsDuidUuid) GetTimeMid() uint32 { + if x != nil && x.TimeMid != nil { + return *x.TimeMid } - return nil + return 0 } -func (x *Device) GetBgp() *DeviceBgpRouter { - if x != nil { - return x.Bgp +func (x *Dhcpv6ClientOptionsDuidUuid) GetTimeHiAndVersion() uint32 { + if x != nil && x.TimeHiAndVersion != nil { + return *x.TimeHiAndVersion } - return nil + return 0 } -func (x *Device) GetVxlan() *DeviceVxlan { - if x != nil { - return x.Vxlan +func (x *Dhcpv6ClientOptionsDuidUuid) GetClockSeqHiAndReserved() uint32 { + if x != nil && x.ClockSeqHiAndReserved != nil { + return *x.ClockSeqHiAndReserved } - return nil + return 0 } -func (x *Device) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *Dhcpv6ClientOptionsDuidUuid) GetClockSeqLow() uint32 { + if x != nil && x.ClockSeqLow != nil { + return *x.ClockSeqLow } - return "" + return 0 } -func (x *Device) GetRsvp() *DeviceRsvp { - if x != nil { - return x.Rsvp +func (x *Dhcpv6ClientOptionsDuidUuid) GetNode() string { + if x != nil && x.Node != nil { + return *x.Node } - return nil + return "" } -// Common options that apply to all configured protocols and interfaces. -type ProtocolOptions struct { +// The version number is in the most significant 4 bits of the timestamp (bits 4 through +// 7 of the time_hi_and_version field). +type Dhcpv6ClientOptionsDuidUuidVersion struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // When set to true, all underlying resources for configured protocols and interfaces - // shall be created and corresponding protocol session negotiation shall be initiated. - // Otherwise, when set to false, corresponding protocol session negotiation will need - // to be initiated using a separate set_protocol_state API call. - // default = True - AutoStartAll *bool `protobuf:"varint,1,opt,name=auto_start_all,json=autoStartAll,proto3,oneof" json:"auto_start_all,omitempty"` + // The version values are from 1 to 5 in the most significant 4 bits of the timestamp + // (bits 4 through 7 of the time_hi_and_version field). + // default = Choice.Enum.v_1 + Choice *Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum,oneof" json:"choice,omitempty"` } -func (x *ProtocolOptions) Reset() { - *x = ProtocolOptions{} +func (x *Dhcpv6ClientOptionsDuidUuidVersion) Reset() { + *x = Dhcpv6ClientOptionsDuidUuidVersion{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[34] + mi := &file_otg_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ProtocolOptions) String() string { +func (x *Dhcpv6ClientOptionsDuidUuidVersion) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ProtocolOptions) ProtoMessage() {} +func (*Dhcpv6ClientOptionsDuidUuidVersion) ProtoMessage() {} -func (x *ProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[34] +func (x *Dhcpv6ClientOptionsDuidUuidVersion) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25391,65 +27758,48 @@ func (x *ProtocolOptions) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ProtocolOptions.ProtoReflect.Descriptor instead. -func (*ProtocolOptions) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{34} +// Deprecated: Use Dhcpv6ClientOptionsDuidUuidVersion.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsDuidUuidVersion) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{36} } -func (x *ProtocolOptions) GetAutoStartAll() bool { - if x != nil && x.AutoStartAll != nil { - return *x.AutoStartAll +func (x *Dhcpv6ClientOptionsDuidUuidVersion) GetChoice() Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return false + return Dhcpv6ClientOptionsDuidUuidVersion_Choice_unspecified } -// A container of properties for an ISIS router and its interfaces. -type DeviceIsisRouter struct { +// The variant field determines the layout of the UUID. That is, the interpretation +// of all other bits in the UUID depends on the setting of the bits in the variant +// field). +type Dhcpv6ClientOptionsDuidUuidVariant struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // This contains the properties of a Multi-Instance-capable routers or MI-RTR. Each - // router can emulate one ISIS instance at a time. - Instance *DeviceIsisMultiInstance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - // The System ID for this emulated ISIS router, e.g. 640100010000. - // required = true - SystemId *string `protobuf:"bytes,2,opt,name=system_id,json=systemId,proto3,oneof" json:"system_id,omitempty"` - // List of ISIS interfaces for this router. - Interfaces []*IsisInterface `protobuf:"bytes,3,rep,name=interfaces,proto3" json:"interfaces,omitempty"` - // Contains basic properties of an ISIS Router. - Basic *IsisBasic `protobuf:"bytes,4,opt,name=basic,proto3" json:"basic,omitempty"` - // Contains advance properties of an ISIS Router.. - Advanced *IsisAdvanced `protobuf:"bytes,5,opt,name=advanced,proto3" json:"advanced,omitempty"` - // ISIS Router authentication properties. - RouterAuth *IsisAuthentication `protobuf:"bytes,6,opt,name=router_auth,json=routerAuth,proto3" json:"router_auth,omitempty"` - // Emulated ISIS IPv4 routes. - V4Routes []*IsisV4RouteRange `protobuf:"bytes,7,rep,name=v4_routes,json=v4Routes,proto3" json:"v4_routes,omitempty"` - // Emulated ISIS IPv6 routes. - V6Routes []*IsisV6RouteRange `protobuf:"bytes,8,rep,name=v6_routes,json=v6Routes,proto3" json:"v6_routes,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,9,opt,name=name,proto3,oneof" json:"name,omitempty"` + // The current variants are ncs, dce,microsoft guid and reserved. + // default = Choice.Enum.ncs + Choice *Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum,oneof" json:"choice,omitempty"` } -func (x *DeviceIsisRouter) Reset() { - *x = DeviceIsisRouter{} +func (x *Dhcpv6ClientOptionsDuidUuidVariant) Reset() { + *x = Dhcpv6ClientOptionsDuidUuidVariant{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[35] + mi := &file_otg_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeviceIsisRouter) String() string { +func (x *Dhcpv6ClientOptionsDuidUuidVariant) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeviceIsisRouter) ProtoMessage() {} +func (*Dhcpv6ClientOptionsDuidUuidVariant) ProtoMessage() {} -func (x *DeviceIsisRouter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[35] +func (x *Dhcpv6ClientOptionsDuidUuidVariant) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25460,106 +27810,113 @@ func (x *DeviceIsisRouter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeviceIsisRouter.ProtoReflect.Descriptor instead. -func (*DeviceIsisRouter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{35} +// Deprecated: Use Dhcpv6ClientOptionsDuidUuidVariant.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsDuidUuidVariant) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{37} } -func (x *DeviceIsisRouter) GetInstance() *DeviceIsisMultiInstance { - if x != nil { - return x.Instance +func (x *Dhcpv6ClientOptionsDuidUuidVariant) GetChoice() Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return Dhcpv6ClientOptionsDuidUuidVariant_Choice_unspecified } -func (x *DeviceIsisRouter) GetSystemId() string { - if x != nil && x.SystemId != nil { - return *x.SystemId - } - return "" -} +// The link-layer address configured in DUID llt or DUID ll. +type Dhcpv6ClientOptionsLinkLayerAddress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *DeviceIsisRouter) GetInterfaces() []*IsisInterface { - if x != nil { - return x.Interfaces - } - return nil + // The MAC address that becomes part of DUID llt or DUID ll. + // required = true + Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *DeviceIsisRouter) GetBasic() *IsisBasic { - if x != nil { - return x.Basic +func (x *Dhcpv6ClientOptionsLinkLayerAddress) Reset() { + *x = Dhcpv6ClientOptionsLinkLayerAddress{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *DeviceIsisRouter) GetAdvanced() *IsisAdvanced { - if x != nil { - return x.Advanced - } - return nil +func (x *Dhcpv6ClientOptionsLinkLayerAddress) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *DeviceIsisRouter) GetRouterAuth() *IsisAuthentication { - if x != nil { - return x.RouterAuth - } - return nil -} +func (*Dhcpv6ClientOptionsLinkLayerAddress) ProtoMessage() {} -func (x *DeviceIsisRouter) GetV4Routes() []*IsisV4RouteRange { - if x != nil { - return x.V4Routes +func (x *Dhcpv6ClientOptionsLinkLayerAddress) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *DeviceIsisRouter) GetV6Routes() []*IsisV6RouteRange { - if x != nil { - return x.V6Routes - } - return nil +// Deprecated: Use Dhcpv6ClientOptionsLinkLayerAddress.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsLinkLayerAddress) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{38} } -func (x *DeviceIsisRouter) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *Dhcpv6ClientOptionsLinkLayerAddress) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } return "" } -// This container properties of an Multi-Instance-capable router (MI-RTR). -type DeviceIsisMultiInstance struct { +// Description missing in models +type Dhcpv6ClientOptionsOptionsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Instance Identifier (IID) TLV will associate a PDU with an ISIS instance by using - // a unique 16-bit number and including one or more Instance-Specific Topology Identifiers - // (ITIDs). - // default = 1 - Iid *uint32 `protobuf:"varint,1,opt,name=iid,proto3,oneof" json:"iid,omitempty"` - // This contains one or more ITIDs that will be advertised in IID TLV. - Itids []uint32 `protobuf:"varint,2,rep,packed,name=itids,proto3" json:"itids,omitempty"` + // The Option Request option is used to identify a list of options in a message between + // a client and a server. The option code is 6. - Vendor_specific information option, + // requested by clients for vendor-specific informations from servers. - DNS Recursive + // Name Server Option, requested by clients to get the list ofIPv6 addresses of DNS + // recursive name + // servers to which DNS queries may be sent by the client resolver in order of preference. + // - Client FQDN option - indicates whether the client or the DHCP server should update + // DNS with the AAAA record + // corresponding to the assigned IPv6 address and the FQDN provided in this option. + // The DHCP server always updates + // the PTR record. + // - bootfile_url, if client is configured for network booting then the client must + // use this option to obtain the boot + // file url from the server. + // - sztp. Securely provision a networking device when it is booting in a factory-default + // state. + // default = Choice.Enum.vendor_information + Choice *Dhcpv6ClientOptionsOptionsRequest_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.Dhcpv6ClientOptionsOptionsRequest_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Custom *Dhcpv6ClientOptionsCustom `protobuf:"bytes,2,opt,name=custom,proto3" json:"custom,omitempty"` } -func (x *DeviceIsisMultiInstance) Reset() { - *x = DeviceIsisMultiInstance{} +func (x *Dhcpv6ClientOptionsOptionsRequest) Reset() { + *x = Dhcpv6ClientOptionsOptionsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[36] + mi := &file_otg_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeviceIsisMultiInstance) String() string { +func (x *Dhcpv6ClientOptionsOptionsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeviceIsisMultiInstance) ProtoMessage() {} +func (*Dhcpv6ClientOptionsOptionsRequest) ProtoMessage() {} -func (x *DeviceIsisMultiInstance) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[36] +func (x *Dhcpv6ClientOptionsOptionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25570,92 +27927,54 @@ func (x *DeviceIsisMultiInstance) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeviceIsisMultiInstance.ProtoReflect.Descriptor instead. -func (*DeviceIsisMultiInstance) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{36} +// Deprecated: Use Dhcpv6ClientOptionsOptionsRequest.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsOptionsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{39} } -func (x *DeviceIsisMultiInstance) GetIid() uint32 { - if x != nil && x.Iid != nil { - return *x.Iid +func (x *Dhcpv6ClientOptionsOptionsRequest) GetChoice() Dhcpv6ClientOptionsOptionsRequest_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return Dhcpv6ClientOptionsOptionsRequest_Choice_unspecified } -func (x *DeviceIsisMultiInstance) GetItids() []uint32 { +func (x *Dhcpv6ClientOptionsOptionsRequest) GetCustom() *Dhcpv6ClientOptionsCustom { if x != nil { - return x.Itids + return x.Custom } return nil } -// Configuration for single ISIS interface. -type IsisInterface struct { +// The Custom option is used to provide a not so well known option in the message between +// a client and a server. +type Dhcpv6ClientOptionsCustom struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The unique name of the Ethernet interface on which ISIS is running. Two ISIS interfaces - // cannot share the same Ethernet. - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - // required = true - EthName *string `protobuf:"bytes,1,opt,name=eth_name,json=ethName,proto3,oneof" json:"eth_name,omitempty"` - // The default metric cost for the interface. - // default = 10 - Metric *uint32 `protobuf:"varint,2,opt,name=metric,proto3,oneof" json:"metric,omitempty"` - // The type of network link. - // default = NetworkType.Enum.broadcast - NetworkType *IsisInterface_NetworkType_Enum `protobuf:"varint,3,opt,name=network_type,json=networkType,proto3,enum=otg.IsisInterface_NetworkType_Enum,oneof" json:"network_type,omitempty"` - // This indicates whether this router is participating in Level-1 (L1), - // Level-2 (L2) or both L1 and L2 domains on this interface. - // default = LevelType.Enum.level_2 - LevelType *IsisInterface_LevelType_Enum `protobuf:"varint,4,opt,name=level_type,json=levelType,proto3,enum=otg.IsisInterface_LevelType_Enum,oneof" json:"level_type,omitempty"` - // Settings of Level 1 Hello. - L1Settings *IsisInterfaceLevel `protobuf:"bytes,5,opt,name=l1_settings,json=l1Settings,proto3" json:"l1_settings,omitempty"` - // Settings of Level 2 Hello. - L2Settings *IsisInterfaceLevel `protobuf:"bytes,6,opt,name=l2_settings,json=l2Settings,proto3" json:"l2_settings,omitempty"` - // Contains the properties of multiple topologies. - MultiTopologyIds []*IsisMT `protobuf:"bytes,7,rep,name=multi_topology_ids,json=multiTopologyIds,proto3" json:"multi_topology_ids,omitempty"` - // Contains a list of Traffic Engineering attributes. - TrafficEngineering []*LinkStateTE `protobuf:"bytes,8,rep,name=traffic_engineering,json=trafficEngineering,proto3" json:"traffic_engineering,omitempty"` - // The Circuit authentication method used for the interfaces on this emulated ISIS v4/v6 - // router. - Authentication *IsisInterfaceAuthentication `protobuf:"bytes,9,opt,name=authentication,proto3" json:"authentication,omitempty"` - // Optional container for advanced interface properties. - Advanced *IsisInterfaceAdvanced `protobuf:"bytes,10,opt,name=advanced,proto3" json:"advanced,omitempty"` - // Link protection on the ISIS link between two interfaces. - LinkProtection *IsisInterfaceLinkProtection `protobuf:"bytes,11,opt,name=link_protection,json=linkProtection,proto3" json:"link_protection,omitempty"` - // This contains list of SRLG values for the link between two interfaces. - SrlgValues []uint32 `protobuf:"varint,12,rep,packed,name=srlg_values,json=srlgValues,proto3" json:"srlg_values,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. + // The type of the Custom option TLV. // required = true - Name *string `protobuf:"bytes,13,opt,name=name,proto3,oneof" json:"name,omitempty"` + Type *uint32 `protobuf:"varint,1,opt,name=type,proto3,oneof" json:"type,omitempty"` } -func (x *IsisInterface) Reset() { - *x = IsisInterface{} +func (x *Dhcpv6ClientOptionsCustom) Reset() { + *x = Dhcpv6ClientOptionsCustom{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[37] + mi := &file_otg_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisInterface) String() string { +func (x *Dhcpv6ClientOptionsCustom) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisInterface) ProtoMessage() {} +func (*Dhcpv6ClientOptionsCustom) ProtoMessage() {} -func (x *IsisInterface) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[37] +func (x *Dhcpv6ClientOptionsCustom) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25666,136 +27985,180 @@ func (x *IsisInterface) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisInterface.ProtoReflect.Descriptor instead. -func (*IsisInterface) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{37} +// Deprecated: Use Dhcpv6ClientOptionsCustom.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsCustom) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{40} } -func (x *IsisInterface) GetEthName() string { - if x != nil && x.EthName != nil { - return *x.EthName +func (x *Dhcpv6ClientOptionsCustom) GetType() uint32 { + if x != nil && x.Type != nil { + return *x.Type } - return "" + return 0 } -func (x *IsisInterface) GetMetric() uint32 { - if x != nil && x.Metric != nil { - return *x.Metric - } - return 0 +// This option is used by a client to identify the vendor that manufactured the hardware +// on which the client is running. The option code is 16. +type Dhcpv6ClientOptionsVendorClass struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The vendor's registered Enterprise Number as registered with IANA. + // required = true + EnterpriseNumber *uint32 `protobuf:"varint,1,opt,name=enterprise_number,json=enterpriseNumber,proto3,oneof" json:"enterprise_number,omitempty"` + // The opaque data representing the hardware configuration of the host on which the + // client is running. Examples of class data instances might include the version of + // the operating system the client is running or the amount of memory installed on + // the client. + ClassData []string `protobuf:"bytes,2,rep,name=class_data,json=classData,proto3" json:"class_data,omitempty"` + // The dhcpv6 client messages where this option is included. + // required = true + AssociatedDhcpMessages *Dhcpv6ClientOptionsIncludedMessages `protobuf:"bytes,3,opt,name=associated_dhcp_messages,json=associatedDhcpMessages,proto3" json:"associated_dhcp_messages,omitempty"` } -func (x *IsisInterface) GetNetworkType() IsisInterface_NetworkType_Enum { - if x != nil && x.NetworkType != nil { - return *x.NetworkType +func (x *Dhcpv6ClientOptionsVendorClass) Reset() { + *x = Dhcpv6ClientOptionsVendorClass{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return IsisInterface_NetworkType_unspecified } -func (x *IsisInterface) GetLevelType() IsisInterface_LevelType_Enum { - if x != nil && x.LevelType != nil { - return *x.LevelType - } - return IsisInterface_LevelType_unspecified +func (x *Dhcpv6ClientOptionsVendorClass) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *IsisInterface) GetL1Settings() *IsisInterfaceLevel { - if x != nil { - return x.L1Settings +func (*Dhcpv6ClientOptionsVendorClass) ProtoMessage() {} + +func (x *Dhcpv6ClientOptionsVendorClass) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *IsisInterface) GetL2Settings() *IsisInterfaceLevel { - if x != nil { - return x.L2Settings - } - return nil +// Deprecated: Use Dhcpv6ClientOptionsVendorClass.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsVendorClass) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{41} } -func (x *IsisInterface) GetMultiTopologyIds() []*IsisMT { - if x != nil { - return x.MultiTopologyIds +func (x *Dhcpv6ClientOptionsVendorClass) GetEnterpriseNumber() uint32 { + if x != nil && x.EnterpriseNumber != nil { + return *x.EnterpriseNumber } - return nil + return 0 } -func (x *IsisInterface) GetTrafficEngineering() []*LinkStateTE { +func (x *Dhcpv6ClientOptionsVendorClass) GetClassData() []string { if x != nil { - return x.TrafficEngineering + return x.ClassData } return nil } -func (x *IsisInterface) GetAuthentication() *IsisInterfaceAuthentication { +func (x *Dhcpv6ClientOptionsVendorClass) GetAssociatedDhcpMessages() *Dhcpv6ClientOptionsIncludedMessages { if x != nil { - return x.Authentication + return x.AssociatedDhcpMessages } return nil } -func (x *IsisInterface) GetAdvanced() *IsisInterfaceAdvanced { - if x != nil { - return x.Advanced +// The dhcpv6 client messages where the option will be included. If all is selected +// the selected option will be added in the all the Dhcpv6 client messages, else based +// on the selection in particular Dhcpv6 client messages the option will be included. +type Dhcpv6ClientOptionsIncludedMessages struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The client message name where the option is included, by default it is all. + // default = Choice.Enum.all + Choice *Dhcpv6ClientOptionsIncludedMessages_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.Dhcpv6ClientOptionsIncludedMessages_Choice_Enum,oneof" json:"choice,omitempty"` + // User must specify the Dhcpv6 message type. + MsgTypes []*Dhcpv6ClientOptionsMessageType `protobuf:"bytes,2,rep,name=msg_types,json=msgTypes,proto3" json:"msg_types,omitempty"` +} + +func (x *Dhcpv6ClientOptionsIncludedMessages) Reset() { + *x = Dhcpv6ClientOptionsIncludedMessages{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *IsisInterface) GetLinkProtection() *IsisInterfaceLinkProtection { - if x != nil { - return x.LinkProtection +func (x *Dhcpv6ClientOptionsIncludedMessages) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Dhcpv6ClientOptionsIncludedMessages) ProtoMessage() {} + +func (x *Dhcpv6ClientOptionsIncludedMessages) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *IsisInterface) GetSrlgValues() []uint32 { - if x != nil { - return x.SrlgValues +// Deprecated: Use Dhcpv6ClientOptionsIncludedMessages.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsIncludedMessages) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{42} +} + +func (x *Dhcpv6ClientOptionsIncludedMessages) GetChoice() Dhcpv6ClientOptionsIncludedMessages_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return Dhcpv6ClientOptionsIncludedMessages_Choice_unspecified } -func (x *IsisInterface) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *Dhcpv6ClientOptionsIncludedMessages) GetMsgTypes() []*Dhcpv6ClientOptionsMessageType { + if x != nil { + return x.MsgTypes } - return "" + return nil } -// Configuration for the properties of Level 1 Hello. -type IsisInterfaceLevel struct { +// The dhcpv6 client messages where the option will be included. +type Dhcpv6ClientOptionsMessageType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The Priority setting in Level 1 LAN Hellos for Designated Router election. - // default = 0 - Priority *uint32 `protobuf:"varint,1,opt,name=priority,proto3,oneof" json:"priority,omitempty"` - // The Hello interval for Level 1 Hello messages, in seconds. - // default = 10 - HelloInterval *uint32 `protobuf:"varint,2,opt,name=hello_interval,json=helloInterval,proto3,oneof" json:"hello_interval,omitempty"` - // The Dead (Holding Time) interval for Level 1 Hello messages, in seconds. - // default = 30 - DeadInterval *uint32 `protobuf:"varint,3,opt,name=dead_interval,json=deadInterval,proto3,oneof" json:"dead_interval,omitempty"` + // The client message name where the option is included, by default it is all. + // default = Choice.Enum.solicit + Choice *Dhcpv6ClientOptionsMessageType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.Dhcpv6ClientOptionsMessageType_Choice_Enum,oneof" json:"choice,omitempty"` } -func (x *IsisInterfaceLevel) Reset() { - *x = IsisInterfaceLevel{} +func (x *Dhcpv6ClientOptionsMessageType) Reset() { + *x = Dhcpv6ClientOptionsMessageType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[38] + mi := &file_otg_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisInterfaceLevel) String() string { +func (x *Dhcpv6ClientOptionsMessageType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisInterfaceLevel) ProtoMessage() {} +func (*Dhcpv6ClientOptionsMessageType) ProtoMessage() {} -func (x *IsisInterfaceLevel) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[38] +func (x *Dhcpv6ClientOptionsMessageType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25806,65 +28169,53 @@ func (x *IsisInterfaceLevel) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisInterfaceLevel.ProtoReflect.Descriptor instead. -func (*IsisInterfaceLevel) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{38} -} - -func (x *IsisInterfaceLevel) GetPriority() uint32 { - if x != nil && x.Priority != nil { - return *x.Priority - } - return 0 -} - -func (x *IsisInterfaceLevel) GetHelloInterval() uint32 { - if x != nil && x.HelloInterval != nil { - return *x.HelloInterval - } - return 0 +// Deprecated: Use Dhcpv6ClientOptionsMessageType.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsMessageType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{43} } -func (x *IsisInterfaceLevel) GetDeadInterval() uint32 { - if x != nil && x.DeadInterval != nil { - return *x.DeadInterval +func (x *Dhcpv6ClientOptionsMessageType) GetChoice() Dhcpv6ClientOptionsMessageType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return Dhcpv6ClientOptionsMessageType_Choice_unspecified } -// Configuration of properties per interface per topology when multiple topologies are -// configured in an ISIS router. -// in a ISIS router. -type IsisMT struct { +// This option is used by clients to exchange vendor-specific information. The option +// code is 17. +type Dhcpv6ClientOptionsVendorInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The Multi Topology ID for one of the topologies supported on the ISIS interface. - // default = 0 - MtId *uint32 `protobuf:"varint,1,opt,name=mt_id,json=mtId,proto3,oneof" json:"mt_id,omitempty"` - // Specifies the link metric for this topology on the ISIS interface. - // default = 10 - LinkMetric *uint32 `protobuf:"varint,2,opt,name=link_metric,json=linkMetric,proto3,oneof" json:"link_metric,omitempty"` + // The vendor's registered Enterprise Number as registered with IANA. + // required = true + EnterpriseNumber *uint32 `protobuf:"varint,1,opt,name=enterprise_number,json=enterpriseNumber,proto3,oneof" json:"enterprise_number,omitempty"` + // An opaque object of octets,interpreted by vendor-specific code on the clients and + // servers. + OptionData []*Dhcpv6OptionsVendorSpecificOptions `protobuf:"bytes,2,rep,name=option_data,json=optionData,proto3" json:"option_data,omitempty"` + // The list of dhcpv6 client messages where this option is included. + // required = true + AssociatedDhcpMessages *Dhcpv6ClientOptionsIncludedMessages `protobuf:"bytes,3,opt,name=associated_dhcp_messages,json=associatedDhcpMessages,proto3" json:"associated_dhcp_messages,omitempty"` } -func (x *IsisMT) Reset() { - *x = IsisMT{} +func (x *Dhcpv6ClientOptionsVendorInfo) Reset() { + *x = Dhcpv6ClientOptionsVendorInfo{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[39] + mi := &file_otg_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisMT) String() string { +func (x *Dhcpv6ClientOptionsVendorInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisMT) ProtoMessage() {} +func (*Dhcpv6ClientOptionsVendorInfo) ProtoMessage() {} -func (x *IsisMT) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[39] +func (x *Dhcpv6ClientOptionsVendorInfo) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25875,71 +28226,67 @@ func (x *IsisMT) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisMT.ProtoReflect.Descriptor instead. -func (*IsisMT) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{39} +// Deprecated: Use Dhcpv6ClientOptionsVendorInfo.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsVendorInfo) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{44} } -func (x *IsisMT) GetMtId() uint32 { - if x != nil && x.MtId != nil { - return *x.MtId +func (x *Dhcpv6ClientOptionsVendorInfo) GetEnterpriseNumber() uint32 { + if x != nil && x.EnterpriseNumber != nil { + return *x.EnterpriseNumber } return 0 } -func (x *IsisMT) GetLinkMetric() uint32 { - if x != nil && x.LinkMetric != nil { - return *x.LinkMetric +func (x *Dhcpv6ClientOptionsVendorInfo) GetOptionData() []*Dhcpv6OptionsVendorSpecificOptions { + if x != nil { + return x.OptionData } - return 0 + return nil } -// A container for Traffic Engineering properties on a interface. -type LinkStateTE struct { +func (x *Dhcpv6ClientOptionsVendorInfo) GetAssociatedDhcpMessages() *Dhcpv6ClientOptionsIncludedMessages { + if x != nil { + return x.AssociatedDhcpMessages + } + return nil +} + +// This option is used by servers to exchange vendor-specific information. The option +// code is 17. +type Dhcpv6ServerOptionsVendorInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The Administrative group sub-TLV (sub-TLV 3). It is a 4-octet - // user-defined bit mask used to assign administrative group numbers - // to the interface, for use in assigning colors and resource classes. - // Each set bit corresponds to a single administrative group for this - // interface. The settings translate into Group numbers, which range - // from 0 to 31 (integers). - // default = 00000000 - AdministrativeGroup *string `protobuf:"bytes,1,opt,name=administrative_group,json=administrativeGroup,proto3,oneof" json:"administrative_group,omitempty"` - // The user-assigned link metric for Traffic Engineering. - // default = 0 - MetricLevel *uint32 `protobuf:"varint,2,opt,name=metric_level,json=metricLevel,proto3,oneof" json:"metric_level,omitempty"` - // The maximum link bandwidth (sub-TLV 9) in bytes/sec allowed for this - // link for a direction. - // default = 125000000 - MaxBandwith *uint32 `protobuf:"varint,3,opt,name=max_bandwith,json=maxBandwith,proto3,oneof" json:"max_bandwith,omitempty"` - // The maximum link bandwidth (sub-TLV 10) in bytes/sec allowed for this - // link in a direction. - // default = 125000000 - MaxReservableBandwidth *uint32 `protobuf:"varint,4,opt,name=max_reservable_bandwidth,json=maxReservableBandwidth,proto3,oneof" json:"max_reservable_bandwidth,omitempty"` - // Configuration of bandwidths of priority 0 through priority 7. - PriorityBandwidths *LinkStatepriorityBandwidths `protobuf:"bytes,5,opt,name=priority_bandwidths,json=priorityBandwidths,proto3" json:"priority_bandwidths,omitempty"` + // The vendor's registered Enterprise Number as registered with IANA. + // required = true + EnterpriseNumber *uint32 `protobuf:"varint,1,opt,name=enterprise_number,json=enterpriseNumber,proto3,oneof" json:"enterprise_number,omitempty"` + // An opaque object of octets,interpreted by vendor-specific code on the clients and + // servers. + OptionData []*Dhcpv6OptionsVendorSpecificOptions `protobuf:"bytes,2,rep,name=option_data,json=optionData,proto3" json:"option_data,omitempty"` + // The list of dhcpv6 client messages where this option is included. + // required = true + AssociatedDhcpMessages *Dhcpv6ServerOptionsIncludedMessages `protobuf:"bytes,3,opt,name=associated_dhcp_messages,json=associatedDhcpMessages,proto3" json:"associated_dhcp_messages,omitempty"` } -func (x *LinkStateTE) Reset() { - *x = LinkStateTE{} +func (x *Dhcpv6ServerOptionsVendorInfo) Reset() { + *x = Dhcpv6ServerOptionsVendorInfo{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[40] + mi := &file_otg_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LinkStateTE) String() string { +func (x *Dhcpv6ServerOptionsVendorInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LinkStateTE) ProtoMessage() {} +func (*Dhcpv6ServerOptionsVendorInfo) ProtoMessage() {} -func (x *LinkStateTE) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[40] +func (x *Dhcpv6ServerOptionsVendorInfo) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -25950,99 +28297,64 @@ func (x *LinkStateTE) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LinkStateTE.ProtoReflect.Descriptor instead. -func (*LinkStateTE) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{40} -} - -func (x *LinkStateTE) GetAdministrativeGroup() string { - if x != nil && x.AdministrativeGroup != nil { - return *x.AdministrativeGroup - } - return "" -} - -func (x *LinkStateTE) GetMetricLevel() uint32 { - if x != nil && x.MetricLevel != nil { - return *x.MetricLevel - } - return 0 +// Deprecated: Use Dhcpv6ServerOptionsVendorInfo.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerOptionsVendorInfo) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{45} } -func (x *LinkStateTE) GetMaxBandwith() uint32 { - if x != nil && x.MaxBandwith != nil { - return *x.MaxBandwith +func (x *Dhcpv6ServerOptionsVendorInfo) GetEnterpriseNumber() uint32 { + if x != nil && x.EnterpriseNumber != nil { + return *x.EnterpriseNumber } return 0 } -func (x *LinkStateTE) GetMaxReservableBandwidth() uint32 { - if x != nil && x.MaxReservableBandwidth != nil { - return *x.MaxReservableBandwidth +func (x *Dhcpv6ServerOptionsVendorInfo) GetOptionData() []*Dhcpv6OptionsVendorSpecificOptions { + if x != nil { + return x.OptionData } - return 0 + return nil } -func (x *LinkStateTE) GetPriorityBandwidths() *LinkStatepriorityBandwidths { +func (x *Dhcpv6ServerOptionsVendorInfo) GetAssociatedDhcpMessages() *Dhcpv6ServerOptionsIncludedMessages { if x != nil { - return x.PriorityBandwidths + return x.AssociatedDhcpMessages } return nil } -// Specifies the amount of bandwidth that can be reserved with a setup priority of 0 -// -// through 7, arranged in increasing order with priority 0 having highest priority. -// -// In ISIS, this is sent in sub-TLV (11) of Extended IS Reachability TLV. -type LinkStatepriorityBandwidths struct { +// The dhcpv6 server messages where the option will be included. If all is selected +// the selected option will be added in the all the Dhcpv6 server messages, else based +// on the selection in particular Dhcpv6 server messages the option will be included. +type Dhcpv6ServerOptionsIncludedMessages struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Specifies the amount of bandwidth that can be reserved for the Priority 0. - // default = 125000000 - Pb0 *uint32 `protobuf:"varint,1,opt,name=pb0,proto3,oneof" json:"pb0,omitempty"` - // Specifies the amount of bandwidth that can be reserved for the Priority 1. - // default = 125000000 - Pb1 *uint32 `protobuf:"varint,2,opt,name=pb1,proto3,oneof" json:"pb1,omitempty"` - // Specify the amount of bandwidth that can be reserved for the Priority 2. - // default = 125000000 - Pb2 *uint32 `protobuf:"varint,3,opt,name=pb2,proto3,oneof" json:"pb2,omitempty"` - // Specifies the amount of bandwidth that can be reserved for the Priority 3. - // default = 125000000 - Pb3 *uint32 `protobuf:"varint,4,opt,name=pb3,proto3,oneof" json:"pb3,omitempty"` - // Specifies the amount of bandwidth that can be reserved for the Priority 4. - // default = 125000000 - Pb4 *uint32 `protobuf:"varint,5,opt,name=pb4,proto3,oneof" json:"pb4,omitempty"` - // Specifies the amount of bandwidth that can be reserved for the Priority 5. - // default = 125000000 - Pb5 *uint32 `protobuf:"varint,6,opt,name=pb5,proto3,oneof" json:"pb5,omitempty"` - // Specifies the amount of bandwidth that can be reserved for the Priority 6. - // default = 125000000 - Pb6 *uint32 `protobuf:"varint,7,opt,name=pb6,proto3,oneof" json:"pb6,omitempty"` - // Specifies the amount of bandwidth that can be reserved for the Priority 7. - // default = 125000000 - Pb7 *uint32 `protobuf:"varint,8,opt,name=pb7,proto3,oneof" json:"pb7,omitempty"` + // The server message name where the option is included, by default it is all. + // default = Choice.Enum.all + Choice *Dhcpv6ServerOptionsIncludedMessages_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.Dhcpv6ServerOptionsIncludedMessages_Choice_Enum,oneof" json:"choice,omitempty"` + // User must specify the Dhcpv6 message type. + MsgTypes []*Dhcpv6ServerOptionsMessageType `protobuf:"bytes,2,rep,name=msg_types,json=msgTypes,proto3" json:"msg_types,omitempty"` } -func (x *LinkStatepriorityBandwidths) Reset() { - *x = LinkStatepriorityBandwidths{} +func (x *Dhcpv6ServerOptionsIncludedMessages) Reset() { + *x = Dhcpv6ServerOptionsIncludedMessages{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[41] + mi := &file_otg_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LinkStatepriorityBandwidths) String() string { +func (x *Dhcpv6ServerOptionsIncludedMessages) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LinkStatepriorityBandwidths) ProtoMessage() {} +func (*Dhcpv6ServerOptionsIncludedMessages) ProtoMessage() {} -func (x *LinkStatepriorityBandwidths) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[41] +func (x *Dhcpv6ServerOptionsIncludedMessages) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26053,99 +28365,108 @@ func (x *LinkStatepriorityBandwidths) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LinkStatepriorityBandwidths.ProtoReflect.Descriptor instead. -func (*LinkStatepriorityBandwidths) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{41} +// Deprecated: Use Dhcpv6ServerOptionsIncludedMessages.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerOptionsIncludedMessages) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{46} } -func (x *LinkStatepriorityBandwidths) GetPb0() uint32 { - if x != nil && x.Pb0 != nil { - return *x.Pb0 +func (x *Dhcpv6ServerOptionsIncludedMessages) GetChoice() Dhcpv6ServerOptionsIncludedMessages_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return Dhcpv6ServerOptionsIncludedMessages_Choice_unspecified } -func (x *LinkStatepriorityBandwidths) GetPb1() uint32 { - if x != nil && x.Pb1 != nil { - return *x.Pb1 +func (x *Dhcpv6ServerOptionsIncludedMessages) GetMsgTypes() []*Dhcpv6ServerOptionsMessageType { + if x != nil { + return x.MsgTypes } - return 0 + return nil } -func (x *LinkStatepriorityBandwidths) GetPb2() uint32 { - if x != nil && x.Pb2 != nil { - return *x.Pb2 - } - return 0 +// The dhcpv6 server messages where the option will be included. +type Dhcpv6ServerOptionsMessageType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The server message name where the option is included, by default it is all. + // default = Choice.Enum.advertise + Choice *Dhcpv6ServerOptionsMessageType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.Dhcpv6ServerOptionsMessageType_Choice_Enum,oneof" json:"choice,omitempty"` } -func (x *LinkStatepriorityBandwidths) GetPb3() uint32 { - if x != nil && x.Pb3 != nil { - return *x.Pb3 +func (x *Dhcpv6ServerOptionsMessageType) Reset() { + *x = Dhcpv6ServerOptionsMessageType{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *LinkStatepriorityBandwidths) GetPb4() uint32 { - if x != nil && x.Pb4 != nil { - return *x.Pb4 - } - return 0 +func (x *Dhcpv6ServerOptionsMessageType) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *LinkStatepriorityBandwidths) GetPb5() uint32 { - if x != nil && x.Pb5 != nil { - return *x.Pb5 +func (*Dhcpv6ServerOptionsMessageType) ProtoMessage() {} + +func (x *Dhcpv6ServerOptionsMessageType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[47] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *LinkStatepriorityBandwidths) GetPb6() uint32 { - if x != nil && x.Pb6 != nil { - return *x.Pb6 - } - return 0 +// Deprecated: Use Dhcpv6ServerOptionsMessageType.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerOptionsMessageType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{47} } -func (x *LinkStatepriorityBandwidths) GetPb7() uint32 { - if x != nil && x.Pb7 != nil { - return *x.Pb7 +func (x *Dhcpv6ServerOptionsMessageType) GetChoice() Dhcpv6ServerOptionsMessageType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return Dhcpv6ServerOptionsMessageType_Choice_unspecified } -// Optional container for circuit authentication properties. -type IsisInterfaceAuthentication struct { +// The encapsulated vendor-specific options field is encoded as a sequence of code/length/value +// fields of identical format to the DHCP options field. The option codes are defined +// by the vendor identified in the enterprise-number field and are not managed by IANA. +type Dhcpv6OptionsVendorSpecificOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The circuit authentication method. + // The code for the encapsulated option. // required = true - AuthType *IsisInterfaceAuthentication_AuthType_Enum `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=otg.IsisInterfaceAuthentication_AuthType_Enum,oneof" json:"auth_type,omitempty"` - // MD5 key to be used for authentication. - Md5 *string `protobuf:"bytes,2,opt,name=md5,proto3,oneof" json:"md5,omitempty"` - // The password, in clear text, to be used for Authentication. - Password *string `protobuf:"bytes,3,opt,name=password,proto3,oneof" json:"password,omitempty"` + Code *uint32 `protobuf:"varint,1,opt,name=code,proto3,oneof" json:"code,omitempty"` + // The data for the encapsulated option. + // required = true + Data *string `protobuf:"bytes,2,opt,name=data,proto3,oneof" json:"data,omitempty"` } -func (x *IsisInterfaceAuthentication) Reset() { - *x = IsisInterfaceAuthentication{} +func (x *Dhcpv6OptionsVendorSpecificOptions) Reset() { + *x = Dhcpv6OptionsVendorSpecificOptions{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[42] + mi := &file_otg_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisInterfaceAuthentication) String() string { +func (x *Dhcpv6OptionsVendorSpecificOptions) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisInterfaceAuthentication) ProtoMessage() {} +func (*Dhcpv6OptionsVendorSpecificOptions) ProtoMessage() {} -func (x *IsisInterfaceAuthentication) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[42] +func (x *Dhcpv6OptionsVendorSpecificOptions) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26156,81 +28477,90 @@ func (x *IsisInterfaceAuthentication) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisInterfaceAuthentication.ProtoReflect.Descriptor instead. -func (*IsisInterfaceAuthentication) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{42} -} - -func (x *IsisInterfaceAuthentication) GetAuthType() IsisInterfaceAuthentication_AuthType_Enum { - if x != nil && x.AuthType != nil { - return *x.AuthType - } - return IsisInterfaceAuthentication_AuthType_unspecified +// Deprecated: Use Dhcpv6OptionsVendorSpecificOptions.ProtoReflect.Descriptor instead. +func (*Dhcpv6OptionsVendorSpecificOptions) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{48} } -func (x *IsisInterfaceAuthentication) GetMd5() string { - if x != nil && x.Md5 != nil { - return *x.Md5 +func (x *Dhcpv6OptionsVendorSpecificOptions) GetCode() uint32 { + if x != nil && x.Code != nil { + return *x.Code } - return "" + return 0 } -func (x *IsisInterfaceAuthentication) GetPassword() string { - if x != nil && x.Password != nil { - return *x.Password +func (x *Dhcpv6OptionsVendorSpecificOptions) GetData() string { + if x != nil && x.Data != nil { + return *x.Data } return "" } -// Optional container for advanced interface properties. -type IsisInterfaceAdvanced struct { +// DHCPv6 server needs to know the FQDN of the client for the addresses for the client's +// IA_NA bindings in order to update the IPv6-address-to-FQDN mapping. This option allows +// the client to convey its FQDN to the server. The Client FQDN option also contains +// Flags that DHCPv6 clients and servers use to negotiate who does which updates. The +// option code is 39. +type Dhcpv6ClientOptionsFqdn struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // If a padded Hello message is received on the interface, the length of - // the Hello packets sent out on that interface is adjusted to match. - // default = True - AutoAdjustMtu *bool `protobuf:"varint,1,opt,name=auto_adjust_mtu,json=autoAdjustMtu,proto3,oneof" json:"auto_adjust_mtu,omitempty"` - // If a Level 1 Hello is received on this emulated router for an area - // not currently in its area list, an area from the received Hello is - // added to that list. This ensures an area match for all future - // Level 1 Hellos from the source L1 router. + // The S bit indicates whether the server should or should not perform the AAAA RR (FQDN-to-address) + // DNS updates. A client sets the bit to 0 to indicate that the server should not perform + // the updates and 1 to indicate that the server should perform the updates. The state + // of the bit in the reply from the server indicates the action to be taken by the + // server. If it is 1, the server has taken responsibility for AAAA RR updates for the + // FQDN. // default = True - AutoAdjustArea *bool `protobuf:"varint,2,opt,name=auto_adjust_area,json=autoAdjustArea,proto3,oneof" json:"auto_adjust_area,omitempty"` - // If a Hello message listing supported protocols is received on this - // emulated router, the supported protocols advertised by this router - // are changed to match exactly. + FlagS *bool `protobuf:"varint,1,opt,name=flag_s,json=flagS,proto3,oneof" json:"flag_s,omitempty"` + // The O bit indicates whether the server has overridden the client's preference for + // the S bit. A client must set this bit to 0. A server must set this bit to 1 if the + // S bit in its reply to the client does not match the S bit received from the client. // default = False - AutoAdjustSupportedProtocols *bool `protobuf:"varint,3,opt,name=auto_adjust_supported_protocols,json=autoAdjustSupportedProtocols,proto3,oneof" json:"auto_adjust_supported_protocols,omitempty"` - // If it is true, the Point-to-Point circuit will include 3-way TLV in its Point-to-Point - // IIH and attempt to establish the adjacency as specified in RFC 5303. This field - // is not applicable if network_type is set to 'broadcast' type in ISIS interface. - // default = True - Enable_3WayHandshake *bool `protobuf:"varint,4,opt,name=enable_3way_handshake,json=enable3wayHandshake,proto3,oneof" json:"enable_3way_handshake,omitempty"` - // If it is true, the Point-to-Point Hello messages will be sent to the unicast MAC - // address. + FlagO *bool `protobuf:"varint,2,opt,name=flag_o,json=flagO,proto3,oneof" json:"flag_o,omitempty"` + // The N bit indicates whether the server should not perform any DNS updates. A client + // sets this bit to 0 to request that the server should perform updates (the PTR RR + // and possibly the AAAA RR based on the S bit) or to 1 to request that the server + // should not perform any DNS updates. A server sets the N bit to indicate whether the + // server shall (0) or shall not (1) perform DNS updates. If the N bit is 1, the S + // bit MUST be 0. // default = False - P2PHellosToUnicastMac *bool `protobuf:"varint,5,opt,name=p2p_hellos_to_unicast_mac,json=p2pHellosToUnicastMac,proto3,oneof" json:"p2p_hellos_to_unicast_mac,omitempty"` + FlagN *bool `protobuf:"varint,3,opt,name=flag_n,json=flagN,proto3,oneof" json:"flag_n,omitempty"` + // The Domain Name part of the option carries all or part of the FQDN of a DHCPv6 client. + // A client MAY also leave the Domain Name field empty if it desires the server to + // provide a name. A fully qualified domain name (FQDN) is the complete address of + // an internet host or computer. It provides its exact location within the domain name + // system (DNS) by specifying the hostname, domain name and top-level domain (TLD). + // An FQDN isn't the same as a URL but rather is a part of it that fully identifies + // the server to which the request is addressed. An FQDN doesn't carry the TCP/IP protocol + // information, such as Hypertext Transfer Protocol (HTTP) or Hypertext Transfer Protocol + // Secure (HTTPS), which is always used at the beginning of a URL. Therefore, adding + // the prefix http:// or https:// to the FQDN turns it into a full URL. One example + // can be microsoft.com. + // required = true + DomainName *string `protobuf:"bytes,4,opt,name=domain_name,json=domainName,proto3,oneof" json:"domain_name,omitempty"` + // The list of dhcpv6 client messages where this option is included. + AssociatedDhcpMessages *Dhcpv6ClientOptionsIncludedMessages `protobuf:"bytes,5,opt,name=associated_dhcp_messages,json=associatedDhcpMessages,proto3" json:"associated_dhcp_messages,omitempty"` } -func (x *IsisInterfaceAdvanced) Reset() { - *x = IsisInterfaceAdvanced{} +func (x *Dhcpv6ClientOptionsFqdn) Reset() { + *x = Dhcpv6ClientOptionsFqdn{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[43] + mi := &file_otg_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisInterfaceAdvanced) String() string { +func (x *Dhcpv6ClientOptionsFqdn) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisInterfaceAdvanced) ProtoMessage() {} +func (*Dhcpv6ClientOptionsFqdn) ProtoMessage() {} -func (x *IsisInterfaceAdvanced) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[43] +func (x *Dhcpv6ClientOptionsFqdn) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26241,104 +28571,89 @@ func (x *IsisInterfaceAdvanced) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisInterfaceAdvanced.ProtoReflect.Descriptor instead. -func (*IsisInterfaceAdvanced) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{43} +// Deprecated: Use Dhcpv6ClientOptionsFqdn.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsFqdn) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{49} } -func (x *IsisInterfaceAdvanced) GetAutoAdjustMtu() bool { - if x != nil && x.AutoAdjustMtu != nil { - return *x.AutoAdjustMtu +func (x *Dhcpv6ClientOptionsFqdn) GetFlagS() bool { + if x != nil && x.FlagS != nil { + return *x.FlagS } return false } -func (x *IsisInterfaceAdvanced) GetAutoAdjustArea() bool { - if x != nil && x.AutoAdjustArea != nil { - return *x.AutoAdjustArea +func (x *Dhcpv6ClientOptionsFqdn) GetFlagO() bool { + if x != nil && x.FlagO != nil { + return *x.FlagO } return false } -func (x *IsisInterfaceAdvanced) GetAutoAdjustSupportedProtocols() bool { - if x != nil && x.AutoAdjustSupportedProtocols != nil { - return *x.AutoAdjustSupportedProtocols +func (x *Dhcpv6ClientOptionsFqdn) GetFlagN() bool { + if x != nil && x.FlagN != nil { + return *x.FlagN } return false } -func (x *IsisInterfaceAdvanced) GetEnable_3WayHandshake() bool { - if x != nil && x.Enable_3WayHandshake != nil { - return *x.Enable_3WayHandshake +func (x *Dhcpv6ClientOptionsFqdn) GetDomainName() string { + if x != nil && x.DomainName != nil { + return *x.DomainName } - return false + return "" } -func (x *IsisInterfaceAdvanced) GetP2PHellosToUnicastMac() bool { - if x != nil && x.P2PHellosToUnicastMac != nil { - return *x.P2PHellosToUnicastMac +func (x *Dhcpv6ClientOptionsFqdn) GetAssociatedDhcpMessages() *Dhcpv6ClientOptionsIncludedMessages { + if x != nil { + return x.AssociatedDhcpMessages } - return false + return nil } -// Optional container for the link protection sub TLV (type 20). -type IsisInterfaceLinkProtection struct { +// The server sends this option to inform the client about a URL to a boot file. This +// information is required for booting over the network includes the details about +// the server on which the boot files can be found, the protocol to be used for the +// download (for example,HTTP or TFTP, and the path and name of the boot file on the +// server. The option code is 59. The URL will contain the network communication protocol, +// a subdomain, a domain name, and its extension. If the host in the URL is expressed +// using an IPv6 address rather than a domain name, the address in the URL then must +// be enclosed in [ and ] characters, conforming to [RFC3986]. Eg of a boot file url +// can be tftp://[xxxx:xxxx:xxxx:xxxx::xxxx]/mboot.efi. +type Dhcpv6ServerOptionsBootfileUrl struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Enable this to protect other link or links. LSPs on a link of this type are lost - // if any of the links fail. - // default = False - ExtraTraffic *bool `protobuf:"varint,1,opt,name=extra_traffic,json=extraTraffic,proto3,oneof" json:"extra_traffic,omitempty"` - // Enabling this signifies that there is no other link protecting this - // link. LSPs on a link of this type are lost if the link fails. - // default = False - Unprotected *bool `protobuf:"varint,2,opt,name=unprotected,proto3,oneof" json:"unprotected,omitempty"` - // Enable this to share the Extra Traffic links between one or more - // links of type Shared.There are one or more disjoint links of type - // Extra Traffic that are protecting this link. - // default = False - Shared *bool `protobuf:"varint,3,opt,name=shared,proto3,oneof" json:"shared,omitempty"` - // Enabling this signifies that there is one dedicated disjoint link - // of type Extra Traffic that is protecting this link. - // default = False - Dedicated_1To_1 *bool `protobuf:"varint,4,opt,name=dedicated_1_to_1,json=dedicated1To1,proto3,oneof" json:"dedicated_1_to_1,omitempty"` - // Enabling this signifies that a dedicated disjoint link is protecting - // this link. However, the protecting link is not advertised in the - // link state database and is therefore not available for the routing - // of LSPs. - // default = False - Dedicated_1Plus_1 *bool `protobuf:"varint,5,opt,name=dedicated_1_plus_1,json=dedicated1Plus1,proto3,oneof" json:"dedicated_1_plus_1,omitempty"` - // Enabling this signifies that a protection scheme that is more - // reliable than Dedicated 1+1. - // default = False - Enhanced *bool `protobuf:"varint,6,opt,name=enhanced,proto3,oneof" json:"enhanced,omitempty"` - // This is a Protection Scheme with value 0x40. - // default = False - Reserved_40 *bool `protobuf:"varint,7,opt,name=reserved_40,json=reserved40,proto3,oneof" json:"reserved_40,omitempty"` - // This is a Protection Scheme with value 0x80. - // default = False - Reserved_80 *bool `protobuf:"varint,8,opt,name=reserved_80,json=reserved80,proto3,oneof" json:"reserved_80,omitempty"` + // The URL for the boot file. It must comply with STD 66 format. + // required = true + Url *string `protobuf:"bytes,1,opt,name=url,proto3,oneof" json:"url,omitempty"` + // They are used to specify parameters for the boot file (similar to the command line + // arguments in most modern operating systems). For example, these parameters could + // be used to specify the root file system of the OS kernel, or the location from which + // a second-stage boot-loader program can download its configuration file. + BootfileParams []*Dhcpv6ServerOptionsBootFileParams `protobuf:"bytes,2,rep,name=bootfile_params,json=bootfileParams,proto3" json:"bootfile_params,omitempty"` + // The list of dhcpv6 client messages where this option is included. + AssociatedDhcpMessages *Dhcpv6ServerOptionsIncludedMessages `protobuf:"bytes,3,opt,name=associated_dhcp_messages,json=associatedDhcpMessages,proto3" json:"associated_dhcp_messages,omitempty"` } -func (x *IsisInterfaceLinkProtection) Reset() { - *x = IsisInterfaceLinkProtection{} +func (x *Dhcpv6ServerOptionsBootfileUrl) Reset() { + *x = Dhcpv6ServerOptionsBootfileUrl{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[44] + mi := &file_otg_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisInterfaceLinkProtection) String() string { +func (x *Dhcpv6ServerOptionsBootfileUrl) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisInterfaceLinkProtection) ProtoMessage() {} +func (*Dhcpv6ServerOptionsBootfileUrl) ProtoMessage() {} -func (x *IsisInterfaceLinkProtection) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[44] +func (x *Dhcpv6ServerOptionsBootfileUrl) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26349,108 +28664,64 @@ func (x *IsisInterfaceLinkProtection) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisInterfaceLinkProtection.ProtoReflect.Descriptor instead. -func (*IsisInterfaceLinkProtection) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{44} -} - -func (x *IsisInterfaceLinkProtection) GetExtraTraffic() bool { - if x != nil && x.ExtraTraffic != nil { - return *x.ExtraTraffic - } - return false -} - -func (x *IsisInterfaceLinkProtection) GetUnprotected() bool { - if x != nil && x.Unprotected != nil { - return *x.Unprotected - } - return false -} - -func (x *IsisInterfaceLinkProtection) GetShared() bool { - if x != nil && x.Shared != nil { - return *x.Shared - } - return false -} - -func (x *IsisInterfaceLinkProtection) GetDedicated_1To_1() bool { - if x != nil && x.Dedicated_1To_1 != nil { - return *x.Dedicated_1To_1 - } - return false -} - -func (x *IsisInterfaceLinkProtection) GetDedicated_1Plus_1() bool { - if x != nil && x.Dedicated_1Plus_1 != nil { - return *x.Dedicated_1Plus_1 - } - return false +// Deprecated: Use Dhcpv6ServerOptionsBootfileUrl.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerOptionsBootfileUrl) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{50} } -func (x *IsisInterfaceLinkProtection) GetEnhanced() bool { - if x != nil && x.Enhanced != nil { - return *x.Enhanced +func (x *Dhcpv6ServerOptionsBootfileUrl) GetUrl() string { + if x != nil && x.Url != nil { + return *x.Url } - return false + return "" } -func (x *IsisInterfaceLinkProtection) GetReserved_40() bool { - if x != nil && x.Reserved_40 != nil { - return *x.Reserved_40 +func (x *Dhcpv6ServerOptionsBootfileUrl) GetBootfileParams() []*Dhcpv6ServerOptionsBootFileParams { + if x != nil { + return x.BootfileParams } - return false + return nil } -func (x *IsisInterfaceLinkProtection) GetReserved_80() bool { - if x != nil && x.Reserved_80 != nil { - return *x.Reserved_80 +func (x *Dhcpv6ServerOptionsBootfileUrl) GetAssociatedDhcpMessages() *Dhcpv6ServerOptionsIncludedMessages { + if x != nil { + return x.AssociatedDhcpMessages } - return false + return nil } -// This contains ISIS router basic properties. -type IsisBasic struct { +// The option code is 60. They are used to specify parameters for the boot file (similar +// to the command line arguments in most modern operating systems). For example, these +// parameters could be used to specify the root file system of the OS kernel, or the +// location from which a second-stage boot-loader program can download its configuration +// file. +type Dhcpv6ServerOptionsBootFileParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // IPv4 Traffic Engineering(TE) router id. This address should be configured as an IPv4 - // Loopback address in 'ipv4_loopbacks' in the Device. - Ipv4TeRouterId *string `protobuf:"bytes,1,opt,name=ipv4_te_router_id,json=ipv4TeRouterId,proto3,oneof" json:"ipv4_te_router_id,omitempty"` - // Host name for the router. The host name is transmitted in all the packets sent from - // the router. - Hostname *string `protobuf:"bytes,2,opt,name=hostname,proto3,oneof" json:"hostname,omitempty"` - // When set to true, it allows sending of more detailed metric information for the - // routes using 32-bit wide values using TLV 135 IP reachability and more detailed - // reachability information for IS reachability by using TLV 22. The detailed usage - // is described in RFC3784. - // default = True - EnableWideMetric *bool `protobuf:"varint,3,opt,name=enable_wide_metric,json=enableWideMetric,proto3,oneof" json:"enable_wide_metric,omitempty"` - // Configuration for controlling storage of ISIS learned LSPs are received from the - // neighbors. - // default = False - LearnedLspFilter *bool `protobuf:"varint,4,opt,name=learned_lsp_filter,json=learnedLspFilter,proto3,oneof" json:"learned_lsp_filter,omitempty"` + // UTF-8 strings are parameters needed for booting, e.g., kernel parameters. + // required = true + Parameter *string `protobuf:"bytes,1,opt,name=parameter,proto3,oneof" json:"parameter,omitempty"` } -func (x *IsisBasic) Reset() { - *x = IsisBasic{} +func (x *Dhcpv6ServerOptionsBootFileParams) Reset() { + *x = Dhcpv6ServerOptionsBootFileParams{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[45] + mi := &file_otg_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisBasic) String() string { +func (x *Dhcpv6ServerOptionsBootFileParams) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisBasic) ProtoMessage() {} +func (*Dhcpv6ServerOptionsBootFileParams) ProtoMessage() {} -func (x *IsisBasic) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[45] +func (x *Dhcpv6ServerOptionsBootFileParams) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26461,101 +28732,93 @@ func (x *IsisBasic) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisBasic.ProtoReflect.Descriptor instead. -func (*IsisBasic) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{45} -} - -func (x *IsisBasic) GetIpv4TeRouterId() string { - if x != nil && x.Ipv4TeRouterId != nil { - return *x.Ipv4TeRouterId - } - return "" +// Deprecated: Use Dhcpv6ServerOptionsBootFileParams.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerOptionsBootFileParams) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{51} } -func (x *IsisBasic) GetHostname() string { - if x != nil && x.Hostname != nil { - return *x.Hostname +func (x *Dhcpv6ServerOptionsBootFileParams) GetParameter() string { + if x != nil && x.Parameter != nil { + return *x.Parameter } return "" } -func (x *IsisBasic) GetEnableWideMetric() bool { - if x != nil && x.EnableWideMetric != nil { - return *x.EnableWideMetric - } - return false -} - -func (x *IsisBasic) GetLearnedLspFilter() bool { - if x != nil && x.LearnedLspFilter != nil { - return *x.LearnedLspFilter - } - return false -} - -// Contains ISIS router advanced properties. -type IsisAdvanced struct { +// A container for layer1 settings. +type Layer1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // It enables padding of Hello message to MTU size. - // default = True - EnableHelloPadding *bool `protobuf:"varint,1,opt,name=enable_hello_padding,json=enableHelloPadding,proto3,oneof" json:"enable_hello_padding,omitempty"` - // The Number of Area Addresses permitted, with a valid range from 0 to 254. A zero - // indicates a maximum of 3 addresses. - // default = 3 - MaxAreaAddresses *uint32 `protobuf:"varint,2,opt,name=max_area_addresses,json=maxAreaAddresses,proto3,oneof" json:"max_area_addresses,omitempty"` - // Its combination of the ISP and HO-DSP.Usually all nodes within an area have the - // same area address. If no area addresses are configured, a default area of 490001 - // will be advertised. - AreaAddresses []string `protobuf:"bytes,3,rep,name=area_addresses,json=areaAddresses,proto3" json:"area_addresses,omitempty"` - // The rate at which LSPs are re-sent in seconds. - // default = 600 - LspRefreshRate *uint32 `protobuf:"varint,4,opt,name=lsp_refresh_rate,json=lspRefreshRate,proto3,oneof" json:"lsp_refresh_rate,omitempty"` - // The MaxAge for retaining a learned LSP on this router in seconds. - // default = 1200 - LspLifetime *uint32 `protobuf:"varint,5,opt,name=lsp_lifetime,json=lspLifetime,proto3,oneof" json:"lsp_lifetime,omitempty"` - // The number of milliseconds between transmissions of Partial Sequence Number PDU. - // default = 2000 - PsnpInterval *uint32 `protobuf:"varint,6,opt,name=psnp_interval,json=psnpInterval,proto3,oneof" json:"psnp_interval,omitempty"` - // The number of milliseconds between transmissions of Partial Sequence Number PDU. - // default = 10000 - CsnpInterval *uint32 `protobuf:"varint,7,opt,name=csnp_interval,json=csnpInterval,proto3,oneof" json:"csnp_interval,omitempty"` - // The maximum size in bytes of any LSP that can be transmitted over a link of equal - // or less than maximum MTU size. - // default = 1492 - MaxLspSize *uint32 `protobuf:"varint,8,opt,name=max_lsp_size,json=maxLspSize,proto3,oneof" json:"max_lsp_size,omitempty"` - // The number of seconds between transmissions of LSPs/MGROUP-PDUs. - // default = 5000 - LspMgroupMinTransInterval *uint32 `protobuf:"varint,9,opt,name=lsp_mgroup_min_trans_interval,json=lspMgroupMinTransInterval,proto3,oneof" json:"lsp_mgroup_min_trans_interval,omitempty"` - // If the Attached bit is enabled, it indicates that the ISIS router is attached to - // another area or the Level 2 backbone. The purpose of an Attached-Bit is to accomplish - // Inter-Area Routing. When an L1/L2 router is connected to more than one area, it - // sets the Attached-bit on its L1 LSP. This can cause a default route ( 0.0.0.0/0 ) - // to be installed by the receiving router. + // A list of unique names of port objects that will share the + // choice settings. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // x-constraint: + // - /components/schemas/Port/properties/name + PortNames []string `protobuf:"bytes,1,rep,name=port_names,json=portNames,proto3" json:"port_names,omitempty"` + // Set the speed if supported. When no speed is explicitly set, the current + // speed of underlying test interface shall be assumed. + Speed *Layer1_Speed_Enum `protobuf:"varint,2,opt,name=speed,proto3,enum=otg.Layer1_Speed_Enum,oneof" json:"speed,omitempty"` + // Set the type of media for test interface if supported. When no media + // type is explicitly set, the current media type of underlying test + // interface shall be assumed. + Media *Layer1_Media_Enum `protobuf:"varint,3,opt,name=media,proto3,enum=otg.Layer1_Media_Enum,oneof" json:"media,omitempty"` + // Enable promiscuous mode on test interface. A warning shall be raised if + // this field is set to `true`, even when it's not supported, ignoring + // the setting altogether. // default = True - EnableAttachedBit *bool `protobuf:"varint,10,opt,name=enable_attached_bit,json=enableAttachedBit,proto3,oneof" json:"enable_attached_bit,omitempty"` + Promiscuous *bool `protobuf:"varint,4,opt,name=promiscuous,proto3,oneof" json:"promiscuous,omitempty"` + // Set the maximum transmission unit size. A warning shall be raised if + // the specified value is valid but not supported, ignoring the setting altogether. + // default = 1500 + Mtu *uint32 `protobuf:"varint,5,opt,name=mtu,proto3,oneof" json:"mtu,omitempty"` + // Under Review: This field is currently under review for pending exploration on use + // cases + // + // Under Review: This field is currently under review for pending exploration on use + // cases + // + // Set to true to override the auto_negotiate, link_training + // and rs_fec settings for gigabit ethernet interfaces. + IeeeMediaDefaults *bool `protobuf:"varint,6,opt,name=ieee_media_defaults,json=ieeeMediaDefaults,proto3,oneof" json:"ieee_media_defaults,omitempty"` + // Under Review: This field is currently under review for pending exploration on use + // cases, given that a separate configuration called `AutoNegotiation` already exists. + // + // Under Review: This field is currently under review for pending exploration on use + // cases, given that a separate configuration called `AutoNegotiation` already exists. + // + // Enable/disable auto negotiation. + AutoNegotiate *bool `protobuf:"varint,7,opt,name=auto_negotiate,json=autoNegotiate,proto3,oneof" json:"auto_negotiate,omitempty"` + // Description missing in models + AutoNegotiation *Layer1AutoNegotiation `protobuf:"bytes,8,opt,name=auto_negotiation,json=autoNegotiation,proto3" json:"auto_negotiation,omitempty"` + // Description missing in models + FlowControl *Layer1FlowControl `protobuf:"bytes,9,opt,name=flow_control,json=flowControl,proto3" json:"flow_control,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,10,opt,name=name,proto3,oneof" json:"name,omitempty"` } -func (x *IsisAdvanced) Reset() { - *x = IsisAdvanced{} +func (x *Layer1) Reset() { + *x = Layer1{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[46] + mi := &file_otg_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisAdvanced) String() string { +func (x *Layer1) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisAdvanced) ProtoMessage() {} +func (*Layer1) ProtoMessage() {} -func (x *IsisAdvanced) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[46] +func (x *Layer1) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26566,115 +28829,132 @@ func (x *IsisAdvanced) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisAdvanced.ProtoReflect.Descriptor instead. -func (*IsisAdvanced) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{46} +// Deprecated: Use Layer1.ProtoReflect.Descriptor instead. +func (*Layer1) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{52} } -func (x *IsisAdvanced) GetEnableHelloPadding() bool { - if x != nil && x.EnableHelloPadding != nil { - return *x.EnableHelloPadding +func (x *Layer1) GetPortNames() []string { + if x != nil { + return x.PortNames } - return false + return nil } -func (x *IsisAdvanced) GetMaxAreaAddresses() uint32 { - if x != nil && x.MaxAreaAddresses != nil { - return *x.MaxAreaAddresses +func (x *Layer1) GetSpeed() Layer1_Speed_Enum { + if x != nil && x.Speed != nil { + return *x.Speed } - return 0 + return Layer1_Speed_unspecified } -func (x *IsisAdvanced) GetAreaAddresses() []string { - if x != nil { - return x.AreaAddresses +func (x *Layer1) GetMedia() Layer1_Media_Enum { + if x != nil && x.Media != nil { + return *x.Media } - return nil + return Layer1_Media_unspecified } -func (x *IsisAdvanced) GetLspRefreshRate() uint32 { - if x != nil && x.LspRefreshRate != nil { - return *x.LspRefreshRate +func (x *Layer1) GetPromiscuous() bool { + if x != nil && x.Promiscuous != nil { + return *x.Promiscuous } - return 0 + return false } -func (x *IsisAdvanced) GetLspLifetime() uint32 { - if x != nil && x.LspLifetime != nil { - return *x.LspLifetime +func (x *Layer1) GetMtu() uint32 { + if x != nil && x.Mtu != nil { + return *x.Mtu } return 0 } -func (x *IsisAdvanced) GetPsnpInterval() uint32 { - if x != nil && x.PsnpInterval != nil { - return *x.PsnpInterval +func (x *Layer1) GetIeeeMediaDefaults() bool { + if x != nil && x.IeeeMediaDefaults != nil { + return *x.IeeeMediaDefaults } - return 0 + return false } -func (x *IsisAdvanced) GetCsnpInterval() uint32 { - if x != nil && x.CsnpInterval != nil { - return *x.CsnpInterval +func (x *Layer1) GetAutoNegotiate() bool { + if x != nil && x.AutoNegotiate != nil { + return *x.AutoNegotiate } - return 0 + return false } -func (x *IsisAdvanced) GetMaxLspSize() uint32 { - if x != nil && x.MaxLspSize != nil { - return *x.MaxLspSize +func (x *Layer1) GetAutoNegotiation() *Layer1AutoNegotiation { + if x != nil { + return x.AutoNegotiation } - return 0 + return nil } -func (x *IsisAdvanced) GetLspMgroupMinTransInterval() uint32 { - if x != nil && x.LspMgroupMinTransInterval != nil { - return *x.LspMgroupMinTransInterval +func (x *Layer1) GetFlowControl() *Layer1FlowControl { + if x != nil { + return x.FlowControl } - return 0 + return nil } -func (x *IsisAdvanced) GetEnableAttachedBit() bool { - if x != nil && x.EnableAttachedBit != nil { - return *x.EnableAttachedBit +func (x *Layer1) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return false + return "" } -// This contains ISIS Area/Domain authentication properties. -type IsisAuthentication struct { +// Configuration for auto negotiation settings +type Layer1AutoNegotiation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Do not verify MD5 checksum in received LSPs. + // If auto_negotiate is true and the interface supports this option + // then this speed will be advertised. // default = True - IgnoreReceiveMd5 *bool `protobuf:"varint,1,opt,name=ignore_receive_md5,json=ignoreReceiveMd5,proto3,oneof" json:"ignore_receive_md5,omitempty"` - // The Area authentication method used for the emulated ISIS router. - // This is used for L1 LSPs. - AreaAuth *IsisAuthenticationBase `protobuf:"bytes,2,opt,name=area_auth,json=areaAuth,proto3" json:"area_auth,omitempty"` - // The Domain authentication method used for the emulated ISIS router. - // This is used for L2 LSPs. - DomainAuth *IsisAuthenticationBase `protobuf:"bytes,3,opt,name=domain_auth,json=domainAuth,proto3" json:"domain_auth,omitempty"` + Advertise_1000Mbps *bool `protobuf:"varint,1,opt,name=advertise_1000_mbps,json=advertise1000Mbps,proto3,oneof" json:"advertise_1000_mbps,omitempty"` + // If auto_negotiate is true and the interface supports this option + // then this speed will be advertised. + // default = True + Advertise_100FdMbps *bool `protobuf:"varint,2,opt,name=advertise_100_fd_mbps,json=advertise100FdMbps,proto3,oneof" json:"advertise_100_fd_mbps,omitempty"` + // If auto_negotiate is true and the interface supports this option + // then this speed will be advertised. + // default = True + Advertise_100HdMbps *bool `protobuf:"varint,3,opt,name=advertise_100_hd_mbps,json=advertise100HdMbps,proto3,oneof" json:"advertise_100_hd_mbps,omitempty"` + // If auto_negotiate is true and the interface supports this option + // then this speed will be advertised. + // default = True + Advertise_10FdMbps *bool `protobuf:"varint,4,opt,name=advertise_10_fd_mbps,json=advertise10FdMbps,proto3,oneof" json:"advertise_10_fd_mbps,omitempty"` + // If auto_negotiate is true and the interface supports this option + // then this speed will be advertised. + // default = True + Advertise_10HdMbps *bool `protobuf:"varint,5,opt,name=advertise_10_hd_mbps,json=advertise10HdMbps,proto3,oneof" json:"advertise_10_hd_mbps,omitempty"` + // Enable/disable gigabit ethernet link training. + // default = False + LinkTraining *bool `protobuf:"varint,6,opt,name=link_training,json=linkTraining,proto3,oneof" json:"link_training,omitempty"` + // Enable/disable gigabit ethernet reed solomon forward error correction (RS FEC). + // default = False + RsFec *bool `protobuf:"varint,7,opt,name=rs_fec,json=rsFec,proto3,oneof" json:"rs_fec,omitempty"` } -func (x *IsisAuthentication) Reset() { - *x = IsisAuthentication{} +func (x *Layer1AutoNegotiation) Reset() { + *x = Layer1AutoNegotiation{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[47] + mi := &file_otg_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisAuthentication) String() string { +func (x *Layer1AutoNegotiation) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisAuthentication) ProtoMessage() {} +func (*Layer1AutoNegotiation) ProtoMessage() {} -func (x *IsisAuthentication) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[47] +func (x *Layer1AutoNegotiation) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26685,166 +28965,98 @@ func (x *IsisAuthentication) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisAuthentication.ProtoReflect.Descriptor instead. -func (*IsisAuthentication) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{47} +// Deprecated: Use Layer1AutoNegotiation.ProtoReflect.Descriptor instead. +func (*Layer1AutoNegotiation) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{53} } -func (x *IsisAuthentication) GetIgnoreReceiveMd5() bool { - if x != nil && x.IgnoreReceiveMd5 != nil { - return *x.IgnoreReceiveMd5 +func (x *Layer1AutoNegotiation) GetAdvertise_1000Mbps() bool { + if x != nil && x.Advertise_1000Mbps != nil { + return *x.Advertise_1000Mbps } return false } -func (x *IsisAuthentication) GetAreaAuth() *IsisAuthenticationBase { - if x != nil { - return x.AreaAuth - } - return nil -} - -func (x *IsisAuthentication) GetDomainAuth() *IsisAuthenticationBase { - if x != nil { - return x.DomainAuth +func (x *Layer1AutoNegotiation) GetAdvertise_100FdMbps() bool { + if x != nil && x.Advertise_100FdMbps != nil { + return *x.Advertise_100FdMbps } - return nil -} - -// Optional container for ISIS authentication properties. -type IsisAuthenticationBase struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The authentication method. - // required = true - AuthType *IsisAuthenticationBase_AuthType_Enum `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=otg.IsisAuthenticationBase_AuthType_Enum,oneof" json:"auth_type,omitempty"` - // Authentication as an MD5 key. - Md5 *string `protobuf:"bytes,2,opt,name=md5,proto3,oneof" json:"md5,omitempty"` - // Authentication as a clear text password. - Password *string `protobuf:"bytes,3,opt,name=password,proto3,oneof" json:"password,omitempty"` + return false } -func (x *IsisAuthenticationBase) Reset() { - *x = IsisAuthenticationBase{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *Layer1AutoNegotiation) GetAdvertise_100HdMbps() bool { + if x != nil && x.Advertise_100HdMbps != nil { + return *x.Advertise_100HdMbps } + return false } -func (x *IsisAuthenticationBase) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IsisAuthenticationBase) ProtoMessage() {} - -func (x *IsisAuthenticationBase) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *Layer1AutoNegotiation) GetAdvertise_10FdMbps() bool { + if x != nil && x.Advertise_10FdMbps != nil { + return *x.Advertise_10FdMbps } - return mi.MessageOf(x) -} - -// Deprecated: Use IsisAuthenticationBase.ProtoReflect.Descriptor instead. -func (*IsisAuthenticationBase) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{48} + return false } -func (x *IsisAuthenticationBase) GetAuthType() IsisAuthenticationBase_AuthType_Enum { - if x != nil && x.AuthType != nil { - return *x.AuthType +func (x *Layer1AutoNegotiation) GetAdvertise_10HdMbps() bool { + if x != nil && x.Advertise_10HdMbps != nil { + return *x.Advertise_10HdMbps } - return IsisAuthenticationBase_AuthType_unspecified + return false } -func (x *IsisAuthenticationBase) GetMd5() string { - if x != nil && x.Md5 != nil { - return *x.Md5 +func (x *Layer1AutoNegotiation) GetLinkTraining() bool { + if x != nil && x.LinkTraining != nil { + return *x.LinkTraining } - return "" + return false } -func (x *IsisAuthenticationBase) GetPassword() string { - if x != nil && x.Password != nil { - return *x.Password +func (x *Layer1AutoNegotiation) GetRsFec() bool { + if x != nil && x.RsFec != nil { + return *x.RsFec } - return "" + return false } -// Emulated ISIS IPv4 routes. -type IsisV4RouteRange struct { +// A container for layer1 receive flow control settings. +// To enable flow control settings on ports this object must be a valid +// object not a null value. +type Layer1FlowControl struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A list of group of IPv4 route addresses. - Addresses []*V4RouteAddress `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` - // The user-defined metric associated with this route range. - // default = 0 - LinkMetric *uint32 `protobuf:"varint,2,opt,name=link_metric,json=linkMetric,proto3,oneof" json:"link_metric,omitempty"` - // The origin of the advertised route-internal or external to the ISIS area. Options - // include the following: - // Internal-for intra-area routes, through Level 1 LSPs. - // External-for inter-area routes redistributed within L1, through Level - // 1 LSPs. - // default = OriginType.Enum.internal - OriginType *IsisV4RouteRange_OriginType_Enum `protobuf:"varint,3,opt,name=origin_type,json=originType,proto3,enum=otg.IsisV4RouteRange_OriginType_Enum,oneof" json:"origin_type,omitempty"` - // Defines the Up/Down (Redistribution) bit defined for TLVs 128 and 130 by RFC 2966. - // It is used for domain-wide advertisement of prefix information. - // - // Up (0)-used when a prefix is initially advertised within the ISIS L3 - // hierarchy, - // and for all other prefixes in L1 and L2 LSPs. (default) - // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. - // - // The prefixes are being advertised from a higher level (L2) down to a lower level - // (L1). - // default = RedistributionType.Enum.up - RedistributionType *IsisV4RouteRange_RedistributionType_Enum `protobuf:"varint,4,opt,name=redistribution_type,json=redistributionType,proto3,enum=otg.IsisV4RouteRange_RedistributionType_Enum,oneof" json:"redistribution_type,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,5,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability Attribute Flags - // will be advertised or not. - // default = False - PrefixAttrEnabled *bool `protobuf:"varint,6,opt,name=prefix_attr_enabled,json=prefixAttrEnabled,proto3,oneof" json:"prefix_attr_enabled,omitempty"` - // External Prefix Flag (Bit 0) - // default = False - XFlag *bool `protobuf:"varint,7,opt,name=x_flag,json=xFlag,proto3,oneof" json:"x_flag,omitempty"` - // Re-advertisement Flag (Bit 1) - // default = False - RFlag *bool `protobuf:"varint,8,opt,name=r_flag,json=rFlag,proto3,oneof" json:"r_flag,omitempty"` - // Node Flag (Bit 2) - // default = False - NFlag *bool `protobuf:"varint,9,opt,name=n_flag,json=nFlag,proto3,oneof" json:"n_flag,omitempty"` + // The 48bit mac address that the layer1 port names will listen on + // for a directed pause. + // default = 01:80:C2:00:00:01 + DirectedAddress *string `protobuf:"bytes,1,opt,name=directed_address,json=directedAddress,proto3,oneof" json:"directed_address,omitempty"` + // The type of priority flow control. + // default = Choice.Enum.ieee_802_1qbb + Choice *Layer1FlowControl_Choice_Enum `protobuf:"varint,2,opt,name=choice,proto3,enum=otg.Layer1FlowControl_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Ieee_802_1Qbb *Layer1Ieee8021Qbb `protobuf:"bytes,3,opt,name=ieee_802_1qbb,json=ieee8021qbb,proto3" json:"ieee_802_1qbb,omitempty"` + // Description missing in models + Ieee_802_3X *Layer1Ieee8023X `protobuf:"bytes,4,opt,name=ieee_802_3x,json=ieee8023x,proto3" json:"ieee_802_3x,omitempty"` } -func (x *IsisV4RouteRange) Reset() { - *x = IsisV4RouteRange{} +func (x *Layer1FlowControl) Reset() { + *x = Layer1FlowControl{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[49] + mi := &file_otg_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisV4RouteRange) String() string { +func (x *Layer1FlowControl) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisV4RouteRange) ProtoMessage() {} +func (*Layer1FlowControl) ProtoMessage() {} -func (x *IsisV4RouteRange) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[49] +func (x *Layer1FlowControl) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26855,112 +29067,63 @@ func (x *IsisV4RouteRange) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisV4RouteRange.ProtoReflect.Descriptor instead. -func (*IsisV4RouteRange) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{49} -} - -func (x *IsisV4RouteRange) GetAddresses() []*V4RouteAddress { - if x != nil { - return x.Addresses - } - return nil -} - -func (x *IsisV4RouteRange) GetLinkMetric() uint32 { - if x != nil && x.LinkMetric != nil { - return *x.LinkMetric - } - return 0 -} - -func (x *IsisV4RouteRange) GetOriginType() IsisV4RouteRange_OriginType_Enum { - if x != nil && x.OriginType != nil { - return *x.OriginType - } - return IsisV4RouteRange_OriginType_unspecified -} - -func (x *IsisV4RouteRange) GetRedistributionType() IsisV4RouteRange_RedistributionType_Enum { - if x != nil && x.RedistributionType != nil { - return *x.RedistributionType - } - return IsisV4RouteRange_RedistributionType_unspecified +// Deprecated: Use Layer1FlowControl.ProtoReflect.Descriptor instead. +func (*Layer1FlowControl) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{54} } -func (x *IsisV4RouteRange) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *Layer1FlowControl) GetDirectedAddress() string { + if x != nil && x.DirectedAddress != nil { + return *x.DirectedAddress } return "" } -func (x *IsisV4RouteRange) GetPrefixAttrEnabled() bool { - if x != nil && x.PrefixAttrEnabled != nil { - return *x.PrefixAttrEnabled - } - return false -} - -func (x *IsisV4RouteRange) GetXFlag() bool { - if x != nil && x.XFlag != nil { - return *x.XFlag +func (x *Layer1FlowControl) GetChoice() Layer1FlowControl_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return false + return Layer1FlowControl_Choice_unspecified } -func (x *IsisV4RouteRange) GetRFlag() bool { - if x != nil && x.RFlag != nil { - return *x.RFlag +func (x *Layer1FlowControl) GetIeee_802_1Qbb() *Layer1Ieee8021Qbb { + if x != nil { + return x.Ieee_802_1Qbb } - return false + return nil } -func (x *IsisV4RouteRange) GetNFlag() bool { - if x != nil && x.NFlag != nil { - return *x.NFlag +func (x *Layer1FlowControl) GetIeee_802_3X() *Layer1Ieee8023X { + if x != nil { + return x.Ieee_802_3X } - return false + return nil } -// A container for IPv4 route addresses. -type V4RouteAddress struct { +// A container for ieee 802.3x rx pause settings +type Layer1Ieee8023X struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // The starting address of the network. - // required = true - Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` - // The IPv4 network prefix length to be applied to the address. - // default = 24 - Prefix *uint32 `protobuf:"varint,2,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` - // The total number of addresses in the range. - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` - // Increments the network address prefixes within a route range where multiple routes - // are present. The value is incremented according to the Prefix Length and Step. - // default = 1 - Step *uint32 `protobuf:"varint,4,opt,name=step,proto3,oneof" json:"step,omitempty"` } -func (x *V4RouteAddress) Reset() { - *x = V4RouteAddress{} +func (x *Layer1Ieee8023X) Reset() { + *x = Layer1Ieee8023X{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[50] + mi := &file_otg_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *V4RouteAddress) String() string { +func (x *Layer1Ieee8023X) String() string { return protoimpl.X.MessageStringOf(x) } -func (*V4RouteAddress) ProtoMessage() {} +func (*Layer1Ieee8023X) ProtoMessage() {} -func (x *V4RouteAddress) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[50] +func (x *Layer1Ieee8023X) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -26971,77 +29134,74 @@ func (x *V4RouteAddress) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use V4RouteAddress.ProtoReflect.Descriptor instead. -func (*V4RouteAddress) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{50} -} - -func (x *V4RouteAddress) GetAddress() string { - if x != nil && x.Address != nil { - return *x.Address - } - return "" -} - -func (x *V4RouteAddress) GetPrefix() uint32 { - if x != nil && x.Prefix != nil { - return *x.Prefix - } - return 0 -} - -func (x *V4RouteAddress) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count - } - return 0 -} - -func (x *V4RouteAddress) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step - } - return 0 +// Deprecated: Use Layer1Ieee8023X.ProtoReflect.Descriptor instead. +func (*Layer1Ieee8023X) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{55} } -// A container for IPv6 route addresses. -type V6RouteAddress struct { +// These settings enhance the existing 802.3x pause priority capabilities +// to enable flow control based on 802.1p priorities (classes of service). +type Layer1Ieee8021Qbb struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The starting address of the network. - // required = true - Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` - // The IPv6 network prefix length to be applied to the address. - // default = 64 - Prefix *uint32 `protobuf:"varint,2,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` - // The total number of addresses in the range. - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` - // Increments the network address prefixes within a route range where multiple routes - // are present. The value is incremented according to the Prefix Length and Step. + // The upper limit on the transmit time of a queue after receiving a + // message to pause a specified priority. + // A value of 0 or null indicates that pfc delay will not be enabled. + // default = 0 + PfcDelay *uint32 `protobuf:"varint,1,opt,name=pfc_delay,json=pfcDelay,proto3,oneof" json:"pfc_delay,omitempty"` + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 0 + PfcClass_0 *uint32 `protobuf:"varint,2,opt,name=pfc_class_0,json=pfcClass0,proto3,oneof" json:"pfc_class_0,omitempty"` + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. // default = 1 - Step *uint32 `protobuf:"varint,4,opt,name=step,proto3,oneof" json:"step,omitempty"` + PfcClass_1 *uint32 `protobuf:"varint,3,opt,name=pfc_class_1,json=pfcClass1,proto3,oneof" json:"pfc_class_1,omitempty"` + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 2 + PfcClass_2 *uint32 `protobuf:"varint,4,opt,name=pfc_class_2,json=pfcClass2,proto3,oneof" json:"pfc_class_2,omitempty"` + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 3 + PfcClass_3 *uint32 `protobuf:"varint,5,opt,name=pfc_class_3,json=pfcClass3,proto3,oneof" json:"pfc_class_3,omitempty"` + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 4 + PfcClass_4 *uint32 `protobuf:"varint,6,opt,name=pfc_class_4,json=pfcClass4,proto3,oneof" json:"pfc_class_4,omitempty"` + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 5 + PfcClass_5 *uint32 `protobuf:"varint,7,opt,name=pfc_class_5,json=pfcClass5,proto3,oneof" json:"pfc_class_5,omitempty"` + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 6 + PfcClass_6 *uint32 `protobuf:"varint,8,opt,name=pfc_class_6,json=pfcClass6,proto3,oneof" json:"pfc_class_6,omitempty"` + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 7 + PfcClass_7 *uint32 `protobuf:"varint,9,opt,name=pfc_class_7,json=pfcClass7,proto3,oneof" json:"pfc_class_7,omitempty"` } -func (x *V6RouteAddress) Reset() { - *x = V6RouteAddress{} +func (x *Layer1Ieee8021Qbb) Reset() { + *x = Layer1Ieee8021Qbb{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[51] + mi := &file_otg_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *V6RouteAddress) String() string { +func (x *Layer1Ieee8021Qbb) String() string { return protoimpl.X.MessageStringOf(x) } -func (*V6RouteAddress) ProtoMessage() {} +func (*Layer1Ieee8021Qbb) ProtoMessage() {} -func (x *V6RouteAddress) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[51] +func (x *Layer1Ieee8021Qbb) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27052,186 +29212,132 @@ func (x *V6RouteAddress) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use V6RouteAddress.ProtoReflect.Descriptor instead. -func (*V6RouteAddress) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{51} -} - -func (x *V6RouteAddress) GetAddress() string { - if x != nil && x.Address != nil { - return *x.Address - } - return "" +// Deprecated: Use Layer1Ieee8021Qbb.ProtoReflect.Descriptor instead. +func (*Layer1Ieee8021Qbb) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{56} } -func (x *V6RouteAddress) GetPrefix() uint32 { - if x != nil && x.Prefix != nil { - return *x.Prefix +func (x *Layer1Ieee8021Qbb) GetPfcDelay() uint32 { + if x != nil && x.PfcDelay != nil { + return *x.PfcDelay } return 0 } -func (x *V6RouteAddress) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Layer1Ieee8021Qbb) GetPfcClass_0() uint32 { + if x != nil && x.PfcClass_0 != nil { + return *x.PfcClass_0 } return 0 } -func (x *V6RouteAddress) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Layer1Ieee8021Qbb) GetPfcClass_1() uint32 { + if x != nil && x.PfcClass_1 != nil { + return *x.PfcClass_1 } return 0 } -// A container for MAC route addresses. -type MACRouteAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The starting address of the MAC Range. - // required = true - Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` - // The MAC prefix length to be applied to the address. - // default = 48 - Prefix *uint32 `protobuf:"varint,2,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` - // The total number of mac addresses in the range. - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` - // Increments the mac address prefixes within a mac range where multiple routes are - // present. The value is incremented according to the mac prefix Length and Step. - // default = 1 - Step *uint32 `protobuf:"varint,4,opt,name=step,proto3,oneof" json:"step,omitempty"` -} - -func (x *MACRouteAddress) Reset() { - *x = MACRouteAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *Layer1Ieee8021Qbb) GetPfcClass_2() uint32 { + if x != nil && x.PfcClass_2 != nil { + return *x.PfcClass_2 } + return 0 } -func (x *MACRouteAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MACRouteAddress) ProtoMessage() {} - -func (x *MACRouteAddress) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *Layer1Ieee8021Qbb) GetPfcClass_3() uint32 { + if x != nil && x.PfcClass_3 != nil { + return *x.PfcClass_3 } - return mi.MessageOf(x) -} - -// Deprecated: Use MACRouteAddress.ProtoReflect.Descriptor instead. -func (*MACRouteAddress) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{52} + return 0 } -func (x *MACRouteAddress) GetAddress() string { - if x != nil && x.Address != nil { - return *x.Address +func (x *Layer1Ieee8021Qbb) GetPfcClass_4() uint32 { + if x != nil && x.PfcClass_4 != nil { + return *x.PfcClass_4 } - return "" + return 0 } -func (x *MACRouteAddress) GetPrefix() uint32 { - if x != nil && x.Prefix != nil { - return *x.Prefix +func (x *Layer1Ieee8021Qbb) GetPfcClass_5() uint32 { + if x != nil && x.PfcClass_5 != nil { + return *x.PfcClass_5 } return 0 } -func (x *MACRouteAddress) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Layer1Ieee8021Qbb) GetPfcClass_6() uint32 { + if x != nil && x.PfcClass_6 != nil { + return *x.PfcClass_6 } return 0 } -func (x *MACRouteAddress) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Layer1Ieee8021Qbb) GetPfcClass_7() uint32 { + if x != nil && x.PfcClass_7 != nil { + return *x.PfcClass_7 } return 0 } -// Emulated ISIS IPv6 routes. -type IsisV6RouteRange struct { +// Under Review: There may be changes in filter configuration +// +// Under Review: There may be changes in filter configuration +// +// Configuration for capture settings. +type Capture struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A list of group of IPv6 route addresses. - Addresses []*V6RouteAddress `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` - // The user-defined metric associated with this route range. - // default = 0 - LinkMetric *uint32 `protobuf:"varint,2,opt,name=link_metric,json=linkMetric,proto3,oneof" json:"link_metric,omitempty"` - // The origin of the advertised route-internal or external to the ISIS area. Options - // include the following: - // Internal-for intra-area routes, through Level 1 LSPs. - // External-for inter-area routes redistributed within L1, through Level - // 1 LSPs. - // default = OriginType.Enum.internal - OriginType *IsisV6RouteRange_OriginType_Enum `protobuf:"varint,3,opt,name=origin_type,json=originType,proto3,enum=otg.IsisV6RouteRange_OriginType_Enum,oneof" json:"origin_type,omitempty"` - // Defines the Up/Down (Redistribution) bit defined for TLVs 128 and 130 by RFC 2966. - // It is used for domain-wide advertisement of prefix information. + // The unique names of ports that the capture settings will apply to. Port_names cannot + // be duplicated between capture objects. // - // Up (0)-used when a prefix is initially advertised within the ISIS L3 - // hierarchy, - // and for all other prefixes in L1 and L2 LSPs. (default) - // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. + // x-constraint: + // - /components/schemas/Port/properties/name // - // The prefixes are being advertised from a higher level (L2) down to a lower level - // (L1). - // default = RedistributionType.Enum.up - RedistributionType *IsisV6RouteRange_RedistributionType_Enum `protobuf:"varint,4,opt,name=redistribution_type,json=redistributionType,proto3,enum=otg.IsisV6RouteRange_RedistributionType_Enum,oneof" json:"redistribution_type,omitempty"` + // x-constraint: + // - /components/schemas/Port/properties/name + PortNames []string `protobuf:"bytes,1,rep,name=port_names,json=portNames,proto3" json:"port_names,omitempty"` + // A list of filters to apply to the capturing ports. If no filters are specified then + // all packets will be captured. A capture can have multiple filters. The number of + // filters supported is determined by the implementation which can be retrieved using + // the capabilities API. + // When multiple filters are specified the capture implementation must && (and) all + // the filters. + Filters []*CaptureFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` + // Overwrite the capture buffer. + // default = True + Overwrite *bool `protobuf:"varint,3,opt,name=overwrite,proto3,oneof" json:"overwrite,omitempty"` + // The maximum size of each captured packet. If no value is specified or it is null + // then the entire packet will be captured. + PacketSize *uint32 `protobuf:"varint,4,opt,name=packet_size,json=packetSize,proto3,oneof" json:"packet_size,omitempty"` + // The format of the capture file. + // default = Format.Enum.pcap + Format *Capture_Format_Enum `protobuf:"varint,5,opt,name=format,proto3,enum=otg.Capture_Format_Enum,oneof" json:"format,omitempty"` // Globally unique name of an object. It also serves as the primary key for arrays of // objects. // required = true - Name *string `protobuf:"bytes,5,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability Attribute Flags - // will be advertised or not. - // default = False - PrefixAttrEnabled *bool `protobuf:"varint,6,opt,name=prefix_attr_enabled,json=prefixAttrEnabled,proto3,oneof" json:"prefix_attr_enabled,omitempty"` - // External Prefix Flag (Bit 0) - // default = False - XFlag *bool `protobuf:"varint,7,opt,name=x_flag,json=xFlag,proto3,oneof" json:"x_flag,omitempty"` - // Re-advertisement Flag (Bit 1) - // default = False - RFlag *bool `protobuf:"varint,8,opt,name=r_flag,json=rFlag,proto3,oneof" json:"r_flag,omitempty"` - // Node Flag (Bit 2) - // default = False - NFlag *bool `protobuf:"varint,9,opt,name=n_flag,json=nFlag,proto3,oneof" json:"n_flag,omitempty"` + Name *string `protobuf:"bytes,6,opt,name=name,proto3,oneof" json:"name,omitempty"` } -func (x *IsisV6RouteRange) Reset() { - *x = IsisV6RouteRange{} +func (x *Capture) Reset() { + *x = Capture{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[53] + mi := &file_otg_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisV6RouteRange) String() string { +func (x *Capture) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisV6RouteRange) ProtoMessage() {} +func (*Capture) ProtoMessage() {} -func (x *IsisV6RouteRange) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[53] +func (x *Capture) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27242,109 +29348,93 @@ func (x *IsisV6RouteRange) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisV6RouteRange.ProtoReflect.Descriptor instead. -func (*IsisV6RouteRange) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{53} +// Deprecated: Use Capture.ProtoReflect.Descriptor instead. +func (*Capture) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{57} } -func (x *IsisV6RouteRange) GetAddresses() []*V6RouteAddress { +func (x *Capture) GetPortNames() []string { if x != nil { - return x.Addresses + return x.PortNames } return nil } -func (x *IsisV6RouteRange) GetLinkMetric() uint32 { - if x != nil && x.LinkMetric != nil { - return *x.LinkMetric - } - return 0 -} - -func (x *IsisV6RouteRange) GetOriginType() IsisV6RouteRange_OriginType_Enum { - if x != nil && x.OriginType != nil { - return *x.OriginType - } - return IsisV6RouteRange_OriginType_unspecified -} - -func (x *IsisV6RouteRange) GetRedistributionType() IsisV6RouteRange_RedistributionType_Enum { - if x != nil && x.RedistributionType != nil { - return *x.RedistributionType - } - return IsisV6RouteRange_RedistributionType_unspecified -} - -func (x *IsisV6RouteRange) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *Capture) GetFilters() []*CaptureFilter { + if x != nil { + return x.Filters } - return "" + return nil } -func (x *IsisV6RouteRange) GetPrefixAttrEnabled() bool { - if x != nil && x.PrefixAttrEnabled != nil { - return *x.PrefixAttrEnabled +func (x *Capture) GetOverwrite() bool { + if x != nil && x.Overwrite != nil { + return *x.Overwrite } return false } -func (x *IsisV6RouteRange) GetXFlag() bool { - if x != nil && x.XFlag != nil { - return *x.XFlag +func (x *Capture) GetPacketSize() uint32 { + if x != nil && x.PacketSize != nil { + return *x.PacketSize } - return false + return 0 } -func (x *IsisV6RouteRange) GetRFlag() bool { - if x != nil && x.RFlag != nil { - return *x.RFlag +func (x *Capture) GetFormat() Capture_Format_Enum { + if x != nil && x.Format != nil { + return *x.Format } - return false + return Capture_Format_unspecified } -func (x *IsisV6RouteRange) GetNFlag() bool { - if x != nil && x.NFlag != nil { - return *x.NFlag +func (x *Capture) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return false + return "" } -// Configuration for one or more IPv4 or IPv6 BGP peers. -type DeviceBgpRouter struct { +// Configuration for capture filters +type CaptureFilter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The BGP router ID is a unique identifier used by BGP. It is a 32-bit value that is - // often represented by an IPv4 address. - // required = true - RouterId *string `protobuf:"bytes,1,opt,name=router_id,json=routerId,proto3,oneof" json:"router_id,omitempty"` - // This contains an array of references to IPv4 interfaces, each of which will have - // list of peers to different destinations. - Ipv4Interfaces []*BgpV4Interface `protobuf:"bytes,2,rep,name=ipv4_interfaces,json=ipv4Interfaces,proto3" json:"ipv4_interfaces,omitempty"` - // This contains an array of references to IPv6 interfaces, each of which will have - // list of peers to different destinations. - Ipv6Interfaces []*BgpV6Interface `protobuf:"bytes,3,rep,name=ipv6_interfaces,json=ipv6Interfaces,proto3" json:"ipv6_interfaces,omitempty"` + // The type of capture filter. + // default = Choice.Enum.custom + Choice *CaptureFilter_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.CaptureFilter_Choice_Enum,oneof" json:"choice,omitempty"` + // Offset from last filter in the list. If no filters are present it is offset from + // position 0. Multiple custom filters can be present, the length of each custom filter + // is the length of the value being filtered. + Custom *CaptureCustom `protobuf:"bytes,2,opt,name=custom,proto3" json:"custom,omitempty"` + // Description missing in models + Ethernet *CaptureEthernet `protobuf:"bytes,3,opt,name=ethernet,proto3" json:"ethernet,omitempty"` + // Description missing in models + Vlan *CaptureVlan `protobuf:"bytes,4,opt,name=vlan,proto3" json:"vlan,omitempty"` + // Description missing in models + Ipv4 *CaptureIpv4 `protobuf:"bytes,5,opt,name=ipv4,proto3" json:"ipv4,omitempty"` + // Description missing in models + Ipv6 *CaptureIpv6 `protobuf:"bytes,6,opt,name=ipv6,proto3" json:"ipv6,omitempty"` } -func (x *DeviceBgpRouter) Reset() { - *x = DeviceBgpRouter{} +func (x *CaptureFilter) Reset() { + *x = CaptureFilter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[54] + mi := &file_otg_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeviceBgpRouter) String() string { +func (x *CaptureFilter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeviceBgpRouter) ProtoMessage() {} +func (*CaptureFilter) ProtoMessage() {} -func (x *DeviceBgpRouter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[54] +func (x *CaptureFilter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27355,63 +29445,92 @@ func (x *DeviceBgpRouter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeviceBgpRouter.ProtoReflect.Descriptor instead. -func (*DeviceBgpRouter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{54} +// Deprecated: Use CaptureFilter.ProtoReflect.Descriptor instead. +func (*CaptureFilter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{58} } -func (x *DeviceBgpRouter) GetRouterId() string { - if x != nil && x.RouterId != nil { - return *x.RouterId +func (x *CaptureFilter) GetChoice() CaptureFilter_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return CaptureFilter_Choice_unspecified } -func (x *DeviceBgpRouter) GetIpv4Interfaces() []*BgpV4Interface { +func (x *CaptureFilter) GetCustom() *CaptureCustom { if x != nil { - return x.Ipv4Interfaces + return x.Custom } return nil } -func (x *DeviceBgpRouter) GetIpv6Interfaces() []*BgpV6Interface { +func (x *CaptureFilter) GetEthernet() *CaptureEthernet { if x != nil { - return x.Ipv6Interfaces + return x.Ethernet } return nil } -// All errors detected while processing the Message Header are indicated by sending -// the NOTIFICATION message with the Error Code-Message Header Error. The Error Subcode -// elaborates on the specific nature of the error. -type DeviceBgpMessageHeaderError struct { +func (x *CaptureFilter) GetVlan() *CaptureVlan { + if x != nil { + return x.Vlan + } + return nil +} + +func (x *CaptureFilter) GetIpv4() *CaptureIpv4 { + if x != nil { + return x.Ipv4 + } + return nil +} + +func (x *CaptureFilter) GetIpv6() *CaptureIpv6 { + if x != nil { + return x.Ipv6 + } + return nil +} + +// Description missing in models +type CaptureCustom struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The Error Subcode indicates the specific type of error encountered during Message - // Header processing. - // default = Subcode.Enum.connection_not_synchronized_code1_subcode1 - Subcode *DeviceBgpMessageHeaderError_Subcode_Enum `protobuf:"varint,1,opt,name=subcode,proto3,enum=otg.DeviceBgpMessageHeaderError_Subcode_Enum,oneof" json:"subcode,omitempty"` + // The bit offset of field to filter on + Offset *uint32 `protobuf:"varint,1,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // The bit length of field to filter on + // default = 8 + BitLength *uint32 `protobuf:"varint,2,opt,name=bit_length,json=bitLength,proto3,oneof" json:"bit_length,omitempty"` + // Description missing in models + // default = 00 + Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = 00 + Mask *string `protobuf:"bytes,4,opt,name=mask,proto3,oneof" json:"mask,omitempty"` + // Description missing in models + // default = False + Negate *bool `protobuf:"varint,5,opt,name=negate,proto3,oneof" json:"negate,omitempty"` } -func (x *DeviceBgpMessageHeaderError) Reset() { - *x = DeviceBgpMessageHeaderError{} +func (x *CaptureCustom) Reset() { + *x = CaptureCustom{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[55] + mi := &file_otg_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeviceBgpMessageHeaderError) String() string { +func (x *CaptureCustom) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeviceBgpMessageHeaderError) ProtoMessage() {} +func (*CaptureCustom) ProtoMessage() {} -func (x *DeviceBgpMessageHeaderError) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[55] +func (x *CaptureCustom) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27422,101 +29541,80 @@ func (x *DeviceBgpMessageHeaderError) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeviceBgpMessageHeaderError.ProtoReflect.Descriptor instead. -func (*DeviceBgpMessageHeaderError) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{55} +// Deprecated: Use CaptureCustom.ProtoReflect.Descriptor instead. +func (*CaptureCustom) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{59} } -func (x *DeviceBgpMessageHeaderError) GetSubcode() DeviceBgpMessageHeaderError_Subcode_Enum { - if x != nil && x.Subcode != nil { - return *x.Subcode +func (x *CaptureCustom) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } - return DeviceBgpMessageHeaderError_Subcode_unspecified -} - -// All errors detected while processing the OPEN message are indicated by sending the -// NOTIFICATION message with the Error Code-Open Message Error. The Error Subcode elaborates -// on the specific nature of the error. -type DeviceBgpOpenMessageError struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The Error Subcode indicates the specific type of error encountered during OPEN message - // processing. - // default = Subcode.Enum.unsupported_version_number_code2_subcode1 - Subcode *DeviceBgpOpenMessageError_Subcode_Enum `protobuf:"varint,1,opt,name=subcode,proto3,enum=otg.DeviceBgpOpenMessageError_Subcode_Enum,oneof" json:"subcode,omitempty"` + return 0 } -func (x *DeviceBgpOpenMessageError) Reset() { - *x = DeviceBgpOpenMessageError{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *CaptureCustom) GetBitLength() uint32 { + if x != nil && x.BitLength != nil { + return *x.BitLength } + return 0 } -func (x *DeviceBgpOpenMessageError) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeviceBgpOpenMessageError) ProtoMessage() {} - -func (x *DeviceBgpOpenMessageError) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *CaptureCustom) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } - return mi.MessageOf(x) + return "" } -// Deprecated: Use DeviceBgpOpenMessageError.ProtoReflect.Descriptor instead. -func (*DeviceBgpOpenMessageError) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{56} +func (x *CaptureCustom) GetMask() string { + if x != nil && x.Mask != nil { + return *x.Mask + } + return "" } -func (x *DeviceBgpOpenMessageError) GetSubcode() DeviceBgpOpenMessageError_Subcode_Enum { - if x != nil && x.Subcode != nil { - return *x.Subcode +func (x *CaptureCustom) GetNegate() bool { + if x != nil && x.Negate != nil { + return *x.Negate } - return DeviceBgpOpenMessageError_Subcode_unspecified + return false } -// All errors detected while processing the UPDATE message are indicated by sending -// the NOTIFICATION message with the Error Code-Update Message Error. The Error Subcode -// elaborates on the specific nature of the error. -type DeviceBgpUpdateMessageError struct { +// Description missing in models +type CaptureField struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The Error Subcode, the specific type of error encountered during UPDATE processing. - // default = Subcode.Enum.malformed_attrib_list_code3_subcode1 - Subcode *DeviceBgpUpdateMessageError_Subcode_Enum `protobuf:"varint,1,opt,name=subcode,proto3,enum=otg.DeviceBgpUpdateMessageError_Subcode_Enum,oneof" json:"subcode,omitempty"` + // Description missing in models + // default = 00 + Value *string `protobuf:"bytes,1,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = 00 + Mask *string `protobuf:"bytes,2,opt,name=mask,proto3,oneof" json:"mask,omitempty"` + // Description missing in models + // default = False + Negate *bool `protobuf:"varint,3,opt,name=negate,proto3,oneof" json:"negate,omitempty"` } -func (x *DeviceBgpUpdateMessageError) Reset() { - *x = DeviceBgpUpdateMessageError{} +func (x *CaptureField) Reset() { + *x = CaptureField{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[57] + mi := &file_otg_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeviceBgpUpdateMessageError) String() string { +func (x *CaptureField) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeviceBgpUpdateMessageError) ProtoMessage() {} +func (*CaptureField) ProtoMessage() {} -func (x *DeviceBgpUpdateMessageError) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[57] +func (x *CaptureField) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[60] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27527,46 +29625,65 @@ func (x *DeviceBgpUpdateMessageError) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeviceBgpUpdateMessageError.ProtoReflect.Descriptor instead. -func (*DeviceBgpUpdateMessageError) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{57} +// Deprecated: Use CaptureField.ProtoReflect.Descriptor instead. +func (*CaptureField) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{60} } -func (x *DeviceBgpUpdateMessageError) GetSubcode() DeviceBgpUpdateMessageError_Subcode_Enum { - if x != nil && x.Subcode != nil { - return *x.Subcode +func (x *CaptureField) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } - return DeviceBgpUpdateMessageError_Subcode_unspecified + return "" } -// If a system does not receive successive KEEPALIVE, UPDATE, and/or NOTIFICATION messages -// within the period specified in the Hold Time field of the OPEN message, then the -// NOTIFICATION message with the Hold Timer Expired Error Code(Error Code 4) is sent -// and the BGP connection is closed. The Sub Code used is 0. If a user wants to use -// non zero Sub Code then CustomError can be used. -type DeviceBgpHoldTimerExpired struct { +func (x *CaptureField) GetMask() string { + if x != nil && x.Mask != nil { + return *x.Mask + } + return "" +} + +func (x *CaptureField) GetNegate() bool { + if x != nil && x.Negate != nil { + return *x.Negate + } + return false +} + +// Description missing in models +type CaptureEthernet struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + Src *CaptureField `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"` + // Description missing in models + Dst *CaptureField `protobuf:"bytes,2,opt,name=dst,proto3" json:"dst,omitempty"` + // Description missing in models + EtherType *CaptureField `protobuf:"bytes,3,opt,name=ether_type,json=etherType,proto3" json:"ether_type,omitempty"` + // Description missing in models + PfcQueue *CaptureField `protobuf:"bytes,4,opt,name=pfc_queue,json=pfcQueue,proto3" json:"pfc_queue,omitempty"` } -func (x *DeviceBgpHoldTimerExpired) Reset() { - *x = DeviceBgpHoldTimerExpired{} +func (x *CaptureEthernet) Reset() { + *x = CaptureEthernet{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[58] + mi := &file_otg_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeviceBgpHoldTimerExpired) String() string { +func (x *CaptureEthernet) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeviceBgpHoldTimerExpired) ProtoMessage() {} +func (*CaptureEthernet) ProtoMessage() {} -func (x *DeviceBgpHoldTimerExpired) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[58] +func (x *CaptureEthernet) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[61] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27577,82 +29694,72 @@ func (x *DeviceBgpHoldTimerExpired) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeviceBgpHoldTimerExpired.ProtoReflect.Descriptor instead. -func (*DeviceBgpHoldTimerExpired) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{58} -} - -// Any error detected by the BGP Finite State Machine (e.g., receipt of an unexpected -// event) is indicated by sending the NOTIFICATION message with the Error Code-Finite -// State Machine Error(Error Code 5). The Sub Code used is 0. If a user wants to use -// non zero Sub Code then CustomError can be used. -type DeviceBgpFiniteStateMachineError struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +// Deprecated: Use CaptureEthernet.ProtoReflect.Descriptor instead. +func (*CaptureEthernet) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{61} } -func (x *DeviceBgpFiniteStateMachineError) Reset() { - *x = DeviceBgpFiniteStateMachineError{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *CaptureEthernet) GetSrc() *CaptureField { + if x != nil { + return x.Src } + return nil } -func (x *DeviceBgpFiniteStateMachineError) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *CaptureEthernet) GetDst() *CaptureField { + if x != nil { + return x.Dst + } + return nil } -func (*DeviceBgpFiniteStateMachineError) ProtoMessage() {} - -func (x *DeviceBgpFiniteStateMachineError) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *CaptureEthernet) GetEtherType() *CaptureField { + if x != nil { + return x.EtherType } - return mi.MessageOf(x) + return nil } -// Deprecated: Use DeviceBgpFiniteStateMachineError.ProtoReflect.Descriptor instead. -func (*DeviceBgpFiniteStateMachineError) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{59} +func (x *CaptureEthernet) GetPfcQueue() *CaptureField { + if x != nil { + return x.PfcQueue + } + return nil } -// In the absence of any fatal errors, a BGP peer can close its BGP connection by sending -// the NOTIFICATION message with the Error Code Cease. -type DeviceBgpCeaseError struct { +// Description missing in models +type CaptureVlan struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The Error Subcode to be sent to the peer in the Cease NOTIFICATION. - // default = Subcode.Enum.admin_shutdown_code6_subcode2 - Subcode *DeviceBgpCeaseError_Subcode_Enum `protobuf:"varint,1,opt,name=subcode,proto3,enum=otg.DeviceBgpCeaseError_Subcode_Enum,oneof" json:"subcode,omitempty"` + // Description missing in models + Priority *CaptureField `protobuf:"bytes,1,opt,name=priority,proto3" json:"priority,omitempty"` + // Description missing in models + Cfi *CaptureField `protobuf:"bytes,2,opt,name=cfi,proto3" json:"cfi,omitempty"` + // Description missing in models + Id *CaptureField `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + // Description missing in models + Protocol *CaptureField `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"` } -func (x *DeviceBgpCeaseError) Reset() { - *x = DeviceBgpCeaseError{} +func (x *CaptureVlan) Reset() { + *x = CaptureVlan{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[60] + mi := &file_otg_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeviceBgpCeaseError) String() string { +func (x *CaptureVlan) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeviceBgpCeaseError) ProtoMessage() {} +func (*CaptureVlan) ProtoMessage() {} -func (x *DeviceBgpCeaseError) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[60] +func (x *CaptureVlan) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27663,167 +29770,92 @@ func (x *DeviceBgpCeaseError) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeviceBgpCeaseError.ProtoReflect.Descriptor instead. -func (*DeviceBgpCeaseError) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{60} -} - -func (x *DeviceBgpCeaseError) GetSubcode() DeviceBgpCeaseError_Subcode_Enum { - if x != nil && x.Subcode != nil { - return *x.Subcode - } - return DeviceBgpCeaseError_Subcode_unspecified -} - -// A BGP peer can send NOTIFICATION message with user defined Error Code and Error Subcode. -type DeviceBgpCustomError struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The Error code to be sent in the NOTIFICATION message to peer. - Code *uint32 `protobuf:"varint,1,opt,name=code,proto3,oneof" json:"code,omitempty"` - // The Error Subcode to be sent in the NOTIFICATION message to peer. - Subcode *uint32 `protobuf:"varint,2,opt,name=subcode,proto3,oneof" json:"subcode,omitempty"` +// Deprecated: Use CaptureVlan.ProtoReflect.Descriptor instead. +func (*CaptureVlan) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{62} } -func (x *DeviceBgpCustomError) Reset() { - *x = DeviceBgpCustomError{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *CaptureVlan) GetPriority() *CaptureField { + if x != nil { + return x.Priority } + return nil } -func (x *DeviceBgpCustomError) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeviceBgpCustomError) ProtoMessage() {} - -func (x *DeviceBgpCustomError) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *CaptureVlan) GetCfi() *CaptureField { + if x != nil { + return x.Cfi } - return mi.MessageOf(x) -} - -// Deprecated: Use DeviceBgpCustomError.ProtoReflect.Descriptor instead. -func (*DeviceBgpCustomError) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{61} + return nil } -func (x *DeviceBgpCustomError) GetCode() uint32 { - if x != nil && x.Code != nil { - return *x.Code +func (x *CaptureVlan) GetId() *CaptureField { + if x != nil { + return x.Id } - return 0 + return nil } -func (x *DeviceBgpCustomError) GetSubcode() uint32 { - if x != nil && x.Subcode != nil { - return *x.Subcode +func (x *CaptureVlan) GetProtocol() *CaptureField { + if x != nil { + return x.Protocol } - return 0 + return nil } -// Configuration for emulated BGPv4 peers and routes. -type BgpV4Peer struct { +// Description missing in models +type CaptureIpv4 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // IPv4 address of the BGP peer for the session. - // required = true - PeerAddress *string `protobuf:"bytes,1,opt,name=peer_address,json=peerAddress,proto3,oneof" json:"peer_address,omitempty"` - // This contains the list of Ethernet Virtual Private Network (EVPN) Ethernet Segments - // (ES) Per BGP Peer for IPv4 Address Family Identifier (AFI). - // - // Each Ethernet Segment contains a list of EVPN Instances (EVIs) . - // Each EVI contains a list of Broadcast Domains. - // Each Broadcast Domain contains a list of MAC/IP Ranges. - // - // is responsible for advertising Ethernet - // Auto-discovery Route Per EVI (Type 1). - // - // is responsible for advertising Ethernet Auto-discovery Route - // Per Ethernet Segment (Type 1). - // - // is responsible for advertising - // MAC/IP Advertisement Route (Type 2). - // - // is responsible for advertising Inclusive - // Multicast Ethernet Tag Route (Type 3). - // - // Ethernet Segment is responsible for advertising Ethernet Segment Route (Type 4). - EvpnEthernetSegments []*BgpV4EthernetSegment `protobuf:"bytes,2,rep,name=evpn_ethernet_segments,json=evpnEthernetSegments,proto3" json:"evpn_ethernet_segments,omitempty"` - // The type of BGP autonomous system. External BGP is used for BGP links between two - // or more autonomous systems (ebgp). Internal BGP is used within a single autonomous - // system (ibgp). BGP property defaults are aligned with this object defined as an internal - // BGP peer. If the as_type is specified as 'ebgp' then other properties will need to - // be specified as per an external BGP peer. Specifically, for 'ebgp', 'as_set_mode' - // attribute in 'as_path' field in any Route Range should be changed from default value - // 'do_not_include_local_as' to any other value. - // required = true - AsType *BgpV4Peer_AsType_Enum `protobuf:"varint,3,opt,name=as_type,json=asType,proto3,enum=otg.BgpV4Peer_AsType_Enum,oneof" json:"as_type,omitempty"` - // Autonomous System Number (AS number or ASN) - // required = true - AsNumber *uint32 `protobuf:"varint,4,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` - // The width in bytes of the as_number values. Any as_number values that exceeds the - // width MUST result in an error. - // default = AsNumberWidth.Enum.four - AsNumberWidth *BgpV4Peer_AsNumberWidth_Enum `protobuf:"varint,5,opt,name=as_number_width,json=asNumberWidth,proto3,enum=otg.BgpV4Peer_AsNumberWidth_Enum,oneof" json:"as_number_width,omitempty"` // Description missing in models - Advanced *BgpAdvanced `protobuf:"bytes,6,opt,name=advanced,proto3" json:"advanced,omitempty"` + Version *CaptureField `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // Description missing in models - Capability *BgpCapability `protobuf:"bytes,7,opt,name=capability,proto3" json:"capability,omitempty"` + HeaderLength *CaptureField `protobuf:"bytes,2,opt,name=header_length,json=headerLength,proto3" json:"header_length,omitempty"` // Description missing in models - LearnedInformationFilter *BgpLearnedInformationFilter `protobuf:"bytes,8,opt,name=learned_information_filter,json=learnedInformationFilter,proto3" json:"learned_information_filter,omitempty"` - // Emulated BGPv4 route ranges. - V4Routes []*BgpV4RouteRange `protobuf:"bytes,9,rep,name=v4_routes,json=v4Routes,proto3" json:"v4_routes,omitempty"` - // Emulated BGPv6 route ranges. - V6Routes []*BgpV6RouteRange `protobuf:"bytes,10,rep,name=v6_routes,json=v6Routes,proto3" json:"v6_routes,omitempty"` - // Segment Routing Traffic Engineering (SR TE) Policies for IPv4 Address Family Identifier - // (AFI). - V4SrtePolicies []*BgpSrteV4Policy `protobuf:"bytes,11,rep,name=v4_srte_policies,json=v4SrtePolicies,proto3" json:"v4_srte_policies,omitempty"` - // Segment Routing Traffic Engineering (SR TE) Policies for IPv6 Address Family Identifier - // (AFI). - V6SrtePolicies []*BgpSrteV6Policy `protobuf:"bytes,12,rep,name=v6_srte_policies,json=v6SrtePolicies,proto3" json:"v6_srte_policies,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,13,opt,name=name,proto3,oneof" json:"name,omitempty"` + Priority *CaptureField `protobuf:"bytes,3,opt,name=priority,proto3" json:"priority,omitempty"` // Description missing in models - GracefulRestart *BgpGracefulRestart `protobuf:"bytes,14,opt,name=graceful_restart,json=gracefulRestart,proto3" json:"graceful_restart,omitempty"` - // BGP Updates to be sent to the peer as specified after the session is established. - ReplayUpdates *BgpUpdateReplay `protobuf:"bytes,15,opt,name=replay_updates,json=replayUpdates,proto3" json:"replay_updates,omitempty"` + TotalLength *CaptureField `protobuf:"bytes,4,opt,name=total_length,json=totalLength,proto3" json:"total_length,omitempty"` + // Description missing in models + Identification *CaptureField `protobuf:"bytes,5,opt,name=identification,proto3" json:"identification,omitempty"` + // Description missing in models + Reserved *CaptureField `protobuf:"bytes,6,opt,name=reserved,proto3" json:"reserved,omitempty"` + // Description missing in models + DontFragment *CaptureField `protobuf:"bytes,7,opt,name=dont_fragment,json=dontFragment,proto3" json:"dont_fragment,omitempty"` + // Description missing in models + MoreFragments *CaptureField `protobuf:"bytes,8,opt,name=more_fragments,json=moreFragments,proto3" json:"more_fragments,omitempty"` + // Description missing in models + FragmentOffset *CaptureField `protobuf:"bytes,9,opt,name=fragment_offset,json=fragmentOffset,proto3" json:"fragment_offset,omitempty"` + // Description missing in models + TimeToLive *CaptureField `protobuf:"bytes,10,opt,name=time_to_live,json=timeToLive,proto3" json:"time_to_live,omitempty"` + // Description missing in models + Protocol *CaptureField `protobuf:"bytes,11,opt,name=protocol,proto3" json:"protocol,omitempty"` + // Description missing in models + HeaderChecksum *CaptureField `protobuf:"bytes,12,opt,name=header_checksum,json=headerChecksum,proto3" json:"header_checksum,omitempty"` + // Description missing in models + Src *CaptureField `protobuf:"bytes,13,opt,name=src,proto3" json:"src,omitempty"` + // Description missing in models + Dst *CaptureField `protobuf:"bytes,14,opt,name=dst,proto3" json:"dst,omitempty"` } -func (x *BgpV4Peer) Reset() { - *x = BgpV4Peer{} +func (x *CaptureIpv4) Reset() { + *x = CaptureIpv4{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[62] + mi := &file_otg_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV4Peer) String() string { +func (x *CaptureIpv4) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV4Peer) ProtoMessage() {} +func (*CaptureIpv4) ProtoMessage() {} -func (x *BgpV4Peer) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[62] +func (x *CaptureIpv4) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[63] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27834,156 +29866,150 @@ func (x *BgpV4Peer) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV4Peer.ProtoReflect.Descriptor instead. -func (*BgpV4Peer) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{62} -} - -func (x *BgpV4Peer) GetPeerAddress() string { - if x != nil && x.PeerAddress != nil { - return *x.PeerAddress - } - return "" +// Deprecated: Use CaptureIpv4.ProtoReflect.Descriptor instead. +func (*CaptureIpv4) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{63} } -func (x *BgpV4Peer) GetEvpnEthernetSegments() []*BgpV4EthernetSegment { +func (x *CaptureIpv4) GetVersion() *CaptureField { if x != nil { - return x.EvpnEthernetSegments + return x.Version } return nil } -func (x *BgpV4Peer) GetAsType() BgpV4Peer_AsType_Enum { - if x != nil && x.AsType != nil { - return *x.AsType +func (x *CaptureIpv4) GetHeaderLength() *CaptureField { + if x != nil { + return x.HeaderLength } - return BgpV4Peer_AsType_unspecified + return nil } -func (x *BgpV4Peer) GetAsNumber() uint32 { - if x != nil && x.AsNumber != nil { - return *x.AsNumber +func (x *CaptureIpv4) GetPriority() *CaptureField { + if x != nil { + return x.Priority } - return 0 + return nil } -func (x *BgpV4Peer) GetAsNumberWidth() BgpV4Peer_AsNumberWidth_Enum { - if x != nil && x.AsNumberWidth != nil { - return *x.AsNumberWidth +func (x *CaptureIpv4) GetTotalLength() *CaptureField { + if x != nil { + return x.TotalLength } - return BgpV4Peer_AsNumberWidth_unspecified + return nil } -func (x *BgpV4Peer) GetAdvanced() *BgpAdvanced { +func (x *CaptureIpv4) GetIdentification() *CaptureField { if x != nil { - return x.Advanced + return x.Identification } return nil } -func (x *BgpV4Peer) GetCapability() *BgpCapability { +func (x *CaptureIpv4) GetReserved() *CaptureField { if x != nil { - return x.Capability + return x.Reserved } return nil } -func (x *BgpV4Peer) GetLearnedInformationFilter() *BgpLearnedInformationFilter { +func (x *CaptureIpv4) GetDontFragment() *CaptureField { if x != nil { - return x.LearnedInformationFilter + return x.DontFragment } return nil } -func (x *BgpV4Peer) GetV4Routes() []*BgpV4RouteRange { +func (x *CaptureIpv4) GetMoreFragments() *CaptureField { if x != nil { - return x.V4Routes + return x.MoreFragments } return nil } -func (x *BgpV4Peer) GetV6Routes() []*BgpV6RouteRange { +func (x *CaptureIpv4) GetFragmentOffset() *CaptureField { if x != nil { - return x.V6Routes + return x.FragmentOffset } return nil } -func (x *BgpV4Peer) GetV4SrtePolicies() []*BgpSrteV4Policy { +func (x *CaptureIpv4) GetTimeToLive() *CaptureField { if x != nil { - return x.V4SrtePolicies + return x.TimeToLive } return nil } -func (x *BgpV4Peer) GetV6SrtePolicies() []*BgpSrteV6Policy { +func (x *CaptureIpv4) GetProtocol() *CaptureField { if x != nil { - return x.V6SrtePolicies + return x.Protocol } return nil } -func (x *BgpV4Peer) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *CaptureIpv4) GetHeaderChecksum() *CaptureField { + if x != nil { + return x.HeaderChecksum } - return "" + return nil } -func (x *BgpV4Peer) GetGracefulRestart() *BgpGracefulRestart { +func (x *CaptureIpv4) GetSrc() *CaptureField { if x != nil { - return x.GracefulRestart + return x.Src } return nil } -func (x *BgpV4Peer) GetReplayUpdates() *BgpUpdateReplay { +func (x *CaptureIpv4) GetDst() *CaptureField { if x != nil { - return x.ReplayUpdates + return x.Dst } return nil } -// Configuration for emulated BGPv4 peers and routes on a single IPv4 interface. -type BgpV4Interface struct { +// Description missing in models +type CaptureIpv6 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The unique name of the IPv4 or Loopback IPv4 interface used as the source IP for - // this list of BGP peers. - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv4Loopback/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv4Loopback/properties/name - // - // required = true - Ipv4Name *string `protobuf:"bytes,1,opt,name=ipv4_name,json=ipv4Name,proto3,oneof" json:"ipv4_name,omitempty"` - // This contains the list of BGPv4 peers configured on this interface. - Peers []*BgpV4Peer `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` + // Description missing in models + Version *CaptureField `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Description missing in models + TrafficClass *CaptureField `protobuf:"bytes,2,opt,name=traffic_class,json=trafficClass,proto3" json:"traffic_class,omitempty"` + // Description missing in models + FlowLabel *CaptureField `protobuf:"bytes,3,opt,name=flow_label,json=flowLabel,proto3" json:"flow_label,omitempty"` + // Description missing in models + PayloadLength *CaptureField `protobuf:"bytes,4,opt,name=payload_length,json=payloadLength,proto3" json:"payload_length,omitempty"` + // Description missing in models + NextHeader *CaptureField `protobuf:"bytes,5,opt,name=next_header,json=nextHeader,proto3" json:"next_header,omitempty"` + // Description missing in models + HopLimit *CaptureField `protobuf:"bytes,6,opt,name=hop_limit,json=hopLimit,proto3" json:"hop_limit,omitempty"` + // Description missing in models + Src *CaptureField `protobuf:"bytes,7,opt,name=src,proto3" json:"src,omitempty"` + // Description missing in models + Dst *CaptureField `protobuf:"bytes,8,opt,name=dst,proto3" json:"dst,omitempty"` } -func (x *BgpV4Interface) Reset() { - *x = BgpV4Interface{} +func (x *CaptureIpv6) Reset() { + *x = CaptureIpv6{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[63] + mi := &file_otg_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV4Interface) String() string { +func (x *CaptureIpv6) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV4Interface) ProtoMessage() {} +func (*CaptureIpv6) ProtoMessage() {} -func (x *BgpV4Interface) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[63] +func (x *CaptureIpv6) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[64] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -27994,101 +30020,119 @@ func (x *BgpV4Interface) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV4Interface.ProtoReflect.Descriptor instead. -func (*BgpV4Interface) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{63} +// Deprecated: Use CaptureIpv6.ProtoReflect.Descriptor instead. +func (*CaptureIpv6) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{64} } -func (x *BgpV4Interface) GetIpv4Name() string { - if x != nil && x.Ipv4Name != nil { - return *x.Ipv4Name +func (x *CaptureIpv6) GetVersion() *CaptureField { + if x != nil { + return x.Version } - return "" + return nil } -func (x *BgpV4Interface) GetPeers() []*BgpV4Peer { +func (x *CaptureIpv6) GetTrafficClass() *CaptureField { if x != nil { - return x.Peers + return x.TrafficClass } return nil } -// Configuration for BGP Ethernet Segment ranges. Advertises following routes - -// -// Type 4 - Ethernet Segment Route -type BgpV4EthernetSegment struct { +func (x *CaptureIpv6) GetFlowLabel() *CaptureField { + if x != nil { + return x.FlowLabel + } + return nil +} + +func (x *CaptureIpv6) GetPayloadLength() *CaptureField { + if x != nil { + return x.PayloadLength + } + return nil +} + +func (x *CaptureIpv6) GetNextHeader() *CaptureField { + if x != nil { + return x.NextHeader + } + return nil +} + +func (x *CaptureIpv6) GetHopLimit() *CaptureField { + if x != nil { + return x.HopLimit + } + return nil +} + +func (x *CaptureIpv6) GetSrc() *CaptureField { + if x != nil { + return x.Src + } + return nil +} + +func (x *CaptureIpv6) GetDst() *CaptureField { + if x != nil { + return x.Dst + } + return nil +} + +// A container for emulated or simulated interfaces, loopback interfaces and protocol +// configurations. +type Device struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Designated Forwarder (DF) election configuration. - DfElection *BgpEthernetSegmentDfElection `protobuf:"bytes,1,opt,name=df_election,json=dfElection,proto3" json:"df_election,omitempty"` - // This contains the list of EVIs. - Evis []*BgpV4EvpnEvis `protobuf:"bytes,2,rep,name=evis,proto3" json:"evis,omitempty"` - // 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero - // ESI is '10000000000000000000' . - // default = 00000000000000000000 - Esi *string `protobuf:"bytes,3,opt,name=esi,proto3,oneof" json:"esi,omitempty"` - // Single Active or All Active mode Redundancy mode selection for Multi-home. - // default = ActiveMode.Enum.all_active - ActiveMode *BgpV4EthernetSegment_ActiveMode_Enum `protobuf:"varint,4,opt,name=active_mode,json=activeMode,proto3,enum=otg.BgpV4EthernetSegment_ActiveMode_Enum,oneof" json:"active_mode,omitempty"` - // The label value to be advertised as ESI Label in ESI Label Extended Community. This - // is included in Ethernet Auto-discovery per ES Routes advertised by a router. - // default = 0 - EsiLabel *uint32 `protobuf:"varint,5,opt,name=esi_label,json=esiLabel,proto3,oneof" json:"esi_label,omitempty"` - // Description missing in models - Advanced *BgpRouteAdvanced `protobuf:"bytes,6,opt,name=advanced,proto3" json:"advanced,omitempty"` - // Optional community settings. - Communities []*BgpCommunity `protobuf:"bytes,7,rep,name=communities,proto3" json:"communities,omitempty"` - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. - ExtCommunities []*BgpExtCommunity `protobuf:"bytes,8,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` - // Optional AS PATH settings. - AsPath *BgpAsPath `protobuf:"bytes,9,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` + // Ethernet configuration for one or more emulated or simulated network interfaces. + Ethernets []*DeviceEthernet `protobuf:"bytes,1,rep,name=ethernets,proto3" json:"ethernets,omitempty"` + // IPv4 Loopback interface that can be attached to an Ethernet in the same device or + // to an Ethernet in another device. + Ipv4Loopbacks []*DeviceIpv4Loopback `protobuf:"bytes,2,rep,name=ipv4_loopbacks,json=ipv4Loopbacks,proto3" json:"ipv4_loopbacks,omitempty"` + // IPv6 Loopback interface that can be attached to an Ethernet in the same device or + // to an Ethernet in another device. + Ipv6Loopbacks []*DeviceIpv6Loopback `protobuf:"bytes,3,rep,name=ipv6_loopbacks,json=ipv6Loopbacks,proto3" json:"ipv6_loopbacks,omitempty"` + // The properties of an IS-IS router and its children, such as IS-IS interfaces and + // route ranges. + Isis *DeviceIsisRouter `protobuf:"bytes,4,opt,name=isis,proto3" json:"isis,omitempty"` + // The properties of BGP router and its children, such as BGPv4, BGPv6 peers and their + // route ranges. + Bgp *DeviceBgpRouter `protobuf:"bytes,5,opt,name=bgp,proto3" json:"bgp,omitempty"` + // Configuration of VXLAN tunnel interfaces RFC Ref: https://datatracker.ietf.org/doc/html/rfc7348 + Vxlan *DeviceVxlan `protobuf:"bytes,6,opt,name=vxlan,proto3" json:"vxlan,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,7,opt,name=name,proto3,oneof" json:"name,omitempty"` + // The properties of an RSVP router and its children. + Rsvp *DeviceRsvp `protobuf:"bytes,8,opt,name=rsvp,proto3" json:"rsvp,omitempty"` + // The properties of DHCP Server and its children, such as DHCPv4, DHCPv6 servers. + DhcpServer *DeviceDhcpServer `protobuf:"bytes,9,opt,name=dhcp_server,json=dhcpServer,proto3" json:"dhcp_server,omitempty"` + // Configuration for OSPFv2 router. + Ospfv2 *DeviceOspfv2Router `protobuf:"bytes,10,opt,name=ospfv2,proto3" json:"ospfv2,omitempty"` } -func (x *BgpV4EthernetSegment) Reset() { - *x = BgpV4EthernetSegment{} +func (x *Device) Reset() { + *x = Device{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[64] + mi := &file_otg_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV4EthernetSegment) String() string { +func (x *Device) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV4EthernetSegment) ProtoMessage() {} +func (*Device) ProtoMessage() {} -func (x *BgpV4EthernetSegment) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[64] +func (x *Device) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[65] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -28099,103 +30143,112 @@ func (x *BgpV4EthernetSegment) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV4EthernetSegment.ProtoReflect.Descriptor instead. -func (*BgpV4EthernetSegment) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{64} +// Deprecated: Use Device.ProtoReflect.Descriptor instead. +func (*Device) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{65} } -func (x *BgpV4EthernetSegment) GetDfElection() *BgpEthernetSegmentDfElection { +func (x *Device) GetEthernets() []*DeviceEthernet { if x != nil { - return x.DfElection + return x.Ethernets } return nil } -func (x *BgpV4EthernetSegment) GetEvis() []*BgpV4EvpnEvis { +func (x *Device) GetIpv4Loopbacks() []*DeviceIpv4Loopback { if x != nil { - return x.Evis + return x.Ipv4Loopbacks } return nil } -func (x *BgpV4EthernetSegment) GetEsi() string { - if x != nil && x.Esi != nil { - return *x.Esi +func (x *Device) GetIpv6Loopbacks() []*DeviceIpv6Loopback { + if x != nil { + return x.Ipv6Loopbacks } - return "" + return nil } -func (x *BgpV4EthernetSegment) GetActiveMode() BgpV4EthernetSegment_ActiveMode_Enum { - if x != nil && x.ActiveMode != nil { - return *x.ActiveMode +func (x *Device) GetIsis() *DeviceIsisRouter { + if x != nil { + return x.Isis } - return BgpV4EthernetSegment_ActiveMode_unspecified + return nil } -func (x *BgpV4EthernetSegment) GetEsiLabel() uint32 { - if x != nil && x.EsiLabel != nil { - return *x.EsiLabel +func (x *Device) GetBgp() *DeviceBgpRouter { + if x != nil { + return x.Bgp } - return 0 + return nil } -func (x *BgpV4EthernetSegment) GetAdvanced() *BgpRouteAdvanced { +func (x *Device) GetVxlan() *DeviceVxlan { if x != nil { - return x.Advanced + return x.Vxlan } return nil } -func (x *BgpV4EthernetSegment) GetCommunities() []*BgpCommunity { +func (x *Device) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *Device) GetRsvp() *DeviceRsvp { if x != nil { - return x.Communities + return x.Rsvp } return nil } -func (x *BgpV4EthernetSegment) GetExtCommunities() []*BgpExtCommunity { +func (x *Device) GetDhcpServer() *DeviceDhcpServer { if x != nil { - return x.ExtCommunities + return x.DhcpServer } return nil } -func (x *BgpV4EthernetSegment) GetAsPath() *BgpAsPath { +func (x *Device) GetOspfv2() *DeviceOspfv2Router { if x != nil { - return x.AsPath + return x.Ospfv2 } return nil } -// Configuration for Designated Forwarder (DF) election among the Provider Edge (PE) -// routers on the same Ethernet Segment. -type BgpEthernetSegmentDfElection struct { +// Common options that apply to all configured protocols and interfaces. +type ProtocolOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The DF election timer in seconds. - // default = 3 - ElectionTimer *uint32 `protobuf:"varint,1,opt,name=election_timer,json=electionTimer,proto3,oneof" json:"election_timer,omitempty"` + // When set to true, all underlying resources for configured protocols and interfaces + // shall be created and corresponding protocol session negotiation shall be initiated. + // Otherwise, when set to false, corresponding protocol session negotiation will need + // to be initiated using a separate set_protocol_state API call. + // default = True + AutoStartAll *bool `protobuf:"varint,1,opt,name=auto_start_all,json=autoStartAll,proto3,oneof" json:"auto_start_all,omitempty"` } -func (x *BgpEthernetSegmentDfElection) Reset() { - *x = BgpEthernetSegmentDfElection{} +func (x *ProtocolOptions) Reset() { + *x = ProtocolOptions{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[65] + mi := &file_otg_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpEthernetSegmentDfElection) String() string { +func (x *ProtocolOptions) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpEthernetSegmentDfElection) ProtoMessage() {} +func (*ProtocolOptions) ProtoMessage() {} -func (x *BgpEthernetSegmentDfElection) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[65] +func (x *ProtocolOptions) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[66] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -28206,69 +30259,65 @@ func (x *BgpEthernetSegmentDfElection) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpEthernetSegmentDfElection.ProtoReflect.Descriptor instead. -func (*BgpEthernetSegmentDfElection) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{65} +// Deprecated: Use ProtocolOptions.ProtoReflect.Descriptor instead. +func (*ProtocolOptions) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{66} } -func (x *BgpEthernetSegmentDfElection) GetElectionTimer() uint32 { - if x != nil && x.ElectionTimer != nil { - return *x.ElectionTimer +func (x *ProtocolOptions) GetAutoStartAll() bool { + if x != nil && x.AutoStartAll != nil { + return *x.AutoStartAll } - return 0 + return false } -// Configuration for advanced BGP route range settings. -type BgpRouteAdvanced struct { +// A container of properties for an ISIS router and its interfaces. +type DeviceIsisRouter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // BGP Multi Exit Discriminator attribute sent to the peer to help in the route selection - // process. If set to true, the Multi Exit Discriminator attribute will be included - // in the route advertisement. - // default = True - IncludeMultiExitDiscriminator *bool `protobuf:"varint,3,opt,name=include_multi_exit_discriminator,json=includeMultiExitDiscriminator,proto3,oneof" json:"include_multi_exit_discriminator,omitempty"` - // The multi exit discriminator (MED) value used for route selection sent to the peer. - MultiExitDiscriminator *uint32 `protobuf:"varint,1,opt,name=multi_exit_discriminator,json=multiExitDiscriminator,proto3,oneof" json:"multi_exit_discriminator,omitempty"` - // If set to true, the Origin attribute will be included in the route advertisement. - // default = True - IncludeOrigin *bool `protobuf:"varint,4,opt,name=include_origin,json=includeOrigin,proto3,oneof" json:"include_origin,omitempty"` - // The origin attribute of a prefix can take three values: the prefix originates from - // an interior routing protocol 'igp', it originates from 'egp' or the origin is 'incomplete', - // if the prefix is learned through other means. - // default = Origin.Enum.igp - Origin *BgpRouteAdvanced_Origin_Enum `protobuf:"varint,2,opt,name=origin,proto3,enum=otg.BgpRouteAdvanced_Origin_Enum,oneof" json:"origin,omitempty"` - // BGP Local Preference attribute sent to the peer to indicate the degree of preference - // for externally learned routes. If set to true, the Local Preference attribute will - // be included in the route advertisement. This should be included only for internal - // peers. - // default = True - IncludeLocalPreference *bool `protobuf:"varint,5,opt,name=include_local_preference,json=includeLocalPreference,proto3,oneof" json:"include_local_preference,omitempty"` - // Value to be set in Local Preference attribute if include_local_preference is set - // to true. It is used for the selection of the path for the traffic leaving the AS. - // The route with the highest local preference value is preferred. - // default = 100 - LocalPreference *uint32 `protobuf:"varint,6,opt,name=local_preference,json=localPreference,proto3,oneof" json:"local_preference,omitempty"` + // This contains the properties of a Multi-Instance-capable routers or MI-RTR. Each + // router can emulate one ISIS instance at a time. + Instance *DeviceIsisMultiInstance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + // The System ID for this emulated ISIS router, e.g. 640100010000. + // required = true + SystemId *string `protobuf:"bytes,2,opt,name=system_id,json=systemId,proto3,oneof" json:"system_id,omitempty"` + // List of ISIS interfaces for this router. + Interfaces []*IsisInterface `protobuf:"bytes,3,rep,name=interfaces,proto3" json:"interfaces,omitempty"` + // Contains basic properties of an ISIS Router. + Basic *IsisBasic `protobuf:"bytes,4,opt,name=basic,proto3" json:"basic,omitempty"` + // Contains advance properties of an ISIS Router.. + Advanced *IsisAdvanced `protobuf:"bytes,5,opt,name=advanced,proto3" json:"advanced,omitempty"` + // ISIS Router authentication properties. + RouterAuth *IsisAuthentication `protobuf:"bytes,6,opt,name=router_auth,json=routerAuth,proto3" json:"router_auth,omitempty"` + // Emulated ISIS IPv4 routes. + V4Routes []*IsisV4RouteRange `protobuf:"bytes,7,rep,name=v4_routes,json=v4Routes,proto3" json:"v4_routes,omitempty"` + // Emulated ISIS IPv6 routes. + V6Routes []*IsisV6RouteRange `protobuf:"bytes,8,rep,name=v6_routes,json=v6Routes,proto3" json:"v6_routes,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,9,opt,name=name,proto3,oneof" json:"name,omitempty"` } -func (x *BgpRouteAdvanced) Reset() { - *x = BgpRouteAdvanced{} +func (x *DeviceIsisRouter) Reset() { + *x = DeviceIsisRouter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[66] + mi := &file_otg_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpRouteAdvanced) String() string { +func (x *DeviceIsisRouter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpRouteAdvanced) ProtoMessage() {} +func (*DeviceIsisRouter) ProtoMessage() {} -func (x *BgpRouteAdvanced) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[66] +func (x *DeviceIsisRouter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[67] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -28279,88 +30328,106 @@ func (x *BgpRouteAdvanced) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpRouteAdvanced.ProtoReflect.Descriptor instead. -func (*BgpRouteAdvanced) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{66} +// Deprecated: Use DeviceIsisRouter.ProtoReflect.Descriptor instead. +func (*DeviceIsisRouter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{67} } -func (x *BgpRouteAdvanced) GetIncludeMultiExitDiscriminator() bool { - if x != nil && x.IncludeMultiExitDiscriminator != nil { - return *x.IncludeMultiExitDiscriminator +func (x *DeviceIsisRouter) GetInstance() *DeviceIsisMultiInstance { + if x != nil { + return x.Instance } - return false + return nil } -func (x *BgpRouteAdvanced) GetMultiExitDiscriminator() uint32 { - if x != nil && x.MultiExitDiscriminator != nil { - return *x.MultiExitDiscriminator +func (x *DeviceIsisRouter) GetSystemId() string { + if x != nil && x.SystemId != nil { + return *x.SystemId } - return 0 + return "" } -func (x *BgpRouteAdvanced) GetIncludeOrigin() bool { - if x != nil && x.IncludeOrigin != nil { - return *x.IncludeOrigin +func (x *DeviceIsisRouter) GetInterfaces() []*IsisInterface { + if x != nil { + return x.Interfaces } - return false + return nil } -func (x *BgpRouteAdvanced) GetOrigin() BgpRouteAdvanced_Origin_Enum { - if x != nil && x.Origin != nil { - return *x.Origin +func (x *DeviceIsisRouter) GetBasic() *IsisBasic { + if x != nil { + return x.Basic } - return BgpRouteAdvanced_Origin_unspecified + return nil } -func (x *BgpRouteAdvanced) GetIncludeLocalPreference() bool { - if x != nil && x.IncludeLocalPreference != nil { - return *x.IncludeLocalPreference +func (x *DeviceIsisRouter) GetAdvanced() *IsisAdvanced { + if x != nil { + return x.Advanced } - return false + return nil } -func (x *BgpRouteAdvanced) GetLocalPreference() uint32 { - if x != nil && x.LocalPreference != nil { - return *x.LocalPreference +func (x *DeviceIsisRouter) GetRouterAuth() *IsisAuthentication { + if x != nil { + return x.RouterAuth } - return 0 + return nil } -// BGP communities provide additional capability for tagging routes and for modifying -// BGP routing policy on upstream and downstream routers. BGP community is a 32-bit -// number which is broken into 16-bit AS number and a 16-bit custom value. -type BgpCommunity struct { +func (x *DeviceIsisRouter) GetV4Routes() []*IsisV4RouteRange { + if x != nil { + return x.V4Routes + } + return nil +} + +func (x *DeviceIsisRouter) GetV6Routes() []*IsisV6RouteRange { + if x != nil { + return x.V6Routes + } + return nil +} + +func (x *DeviceIsisRouter) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +// This container properties of an Multi-Instance-capable router (MI-RTR). +type DeviceIsisMultiInstance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The type of community AS number. - Type *BgpCommunity_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.BgpCommunity_Type_Enum,oneof" json:"type,omitempty"` - // First two octets of 32 bit community AS number. - // default = 0 - AsNumber *uint32 `protobuf:"varint,2,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` - // Last two octets of the community value. - // default = 0 - AsCustom *uint32 `protobuf:"varint,3,opt,name=as_custom,json=asCustom,proto3,oneof" json:"as_custom,omitempty"` + // Instance Identifier (IID) TLV will associate a PDU with an ISIS instance by using + // a unique 16-bit number and including one or more Instance-Specific Topology Identifiers + // (ITIDs). + // default = 1 + Iid *uint32 `protobuf:"varint,1,opt,name=iid,proto3,oneof" json:"iid,omitempty"` + // This contains one or more ITIDs that will be advertised in IID TLV. + Itids []uint32 `protobuf:"varint,2,rep,packed,name=itids,proto3" json:"itids,omitempty"` } -func (x *BgpCommunity) Reset() { - *x = BgpCommunity{} +func (x *DeviceIsisMultiInstance) Reset() { + *x = DeviceIsisMultiInstance{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[67] + mi := &file_otg_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpCommunity) String() string { +func (x *DeviceIsisMultiInstance) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpCommunity) ProtoMessage() {} +func (*DeviceIsisMultiInstance) ProtoMessage() {} -func (x *BgpCommunity) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[67] +func (x *DeviceIsisMultiInstance) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[68] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -28371,83 +30438,95 @@ func (x *BgpCommunity) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpCommunity.ProtoReflect.Descriptor instead. -func (*BgpCommunity) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{67} -} - -func (x *BgpCommunity) GetType() BgpCommunity_Type_Enum { - if x != nil && x.Type != nil { - return *x.Type - } - return BgpCommunity_Type_unspecified +// Deprecated: Use DeviceIsisMultiInstance.ProtoReflect.Descriptor instead. +func (*DeviceIsisMultiInstance) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{68} } -func (x *BgpCommunity) GetAsNumber() uint32 { - if x != nil && x.AsNumber != nil { - return *x.AsNumber +func (x *DeviceIsisMultiInstance) GetIid() uint32 { + if x != nil && x.Iid != nil { + return *x.Iid } return 0 } -func (x *BgpCommunity) GetAsCustom() uint32 { - if x != nil && x.AsCustom != nil { - return *x.AsCustom +func (x *DeviceIsisMultiInstance) GetItids() []uint32 { + if x != nil { + return x.Itids } - return 0 + return nil } -// The Extended Communities Attribute is a transitive optional BGP attribute, with the -// Type Code 16. Community and Extended Communities attributes are utilized to trigger -// routing decisions, such as acceptance, rejection, preference, or redistribution. -// An extended community is an 8-Bytes value. It is divided into two main parts. The -// first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes -// carry a unique set of data in a format defined by the type and sub-type field. Extended -// communities provide a larger range for grouping or categorizing communities. -type BgpExtCommunity struct { +// Configuration for single ISIS interface. +type IsisInterface struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Extended Community Type field of 1 Byte. - // - administrator_as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). - // - administrator_ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). - // - administrator_as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). - // - opaque: Opaque Extended Community (RFC 7432). - // - evpn: EVPN Extended Community (RFC 7153). - // - administrator_as_2octet_link_bandwidth : Link Bandwidth Extended Community (RFC - // 7153). - Type *BgpExtCommunity_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.BgpExtCommunity_Type_Enum,oneof" json:"type,omitempty"` - // Extended Community Sub Type field of 1 Byte. - // - route_target: Route Target. - // - origin: Origin. - // - extended_bandwidth: Specifies the link bandwidth. - // - color: Specifies the color value. - // - encapsulation: Specifies the Encapsulation Extended Community. - // - mac_address: Specifies the Extended community MAC address. - Subtype *BgpExtCommunity_Subtype_Enum `protobuf:"varint,2,opt,name=subtype,proto3,enum=otg.BgpExtCommunity_Subtype_Enum,oneof" json:"subtype,omitempty"` - // Extended Community value of 6 Bytes. Example - for the Opaque type and Color subtype - // value can be '0000000000c8' for the color value 200. - Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` + // The unique name of the Ethernet interface on which ISIS is running. Two ISIS interfaces + // cannot share the same Ethernet. The underlying Ethernet Interface can an emulated + // or simulated interface. A simulated ethernet interface can be assumed to be connected + // by a primary (internal to a simulated topology) or a secondary link (connected + // to a device behind a different simulated topology). + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // + // required = true + EthName *string `protobuf:"bytes,1,opt,name=eth_name,json=ethName,proto3,oneof" json:"eth_name,omitempty"` + // The default metric cost for the interface. + // default = 10 + Metric *uint32 `protobuf:"varint,2,opt,name=metric,proto3,oneof" json:"metric,omitempty"` + // The type of network link. + // default = NetworkType.Enum.broadcast + NetworkType *IsisInterface_NetworkType_Enum `protobuf:"varint,3,opt,name=network_type,json=networkType,proto3,enum=otg.IsisInterface_NetworkType_Enum,oneof" json:"network_type,omitempty"` + // This indicates whether this router is participating in Level-1 (L1), + // Level-2 (L2) or both L1 and L2 domains on this interface. + // default = LevelType.Enum.level_2 + LevelType *IsisInterface_LevelType_Enum `protobuf:"varint,4,opt,name=level_type,json=levelType,proto3,enum=otg.IsisInterface_LevelType_Enum,oneof" json:"level_type,omitempty"` + // Settings of Level 1 Hello. + L1Settings *IsisInterfaceLevel `protobuf:"bytes,5,opt,name=l1_settings,json=l1Settings,proto3" json:"l1_settings,omitempty"` + // Settings of Level 2 Hello. + L2Settings *IsisInterfaceLevel `protobuf:"bytes,6,opt,name=l2_settings,json=l2Settings,proto3" json:"l2_settings,omitempty"` + // Contains the properties of multiple topologies. + MultiTopologyIds []*IsisMT `protobuf:"bytes,7,rep,name=multi_topology_ids,json=multiTopologyIds,proto3" json:"multi_topology_ids,omitempty"` + // Contains a list of Traffic Engineering attributes. + TrafficEngineering []*LinkStateTE `protobuf:"bytes,8,rep,name=traffic_engineering,json=trafficEngineering,proto3" json:"traffic_engineering,omitempty"` + // The Circuit authentication method used for the interfaces on this emulated ISIS v4/v6 + // router. + Authentication *IsisInterfaceAuthentication `protobuf:"bytes,9,opt,name=authentication,proto3" json:"authentication,omitempty"` + // Optional container for advanced interface properties. + Advanced *IsisInterfaceAdvanced `protobuf:"bytes,10,opt,name=advanced,proto3" json:"advanced,omitempty"` + // Link protection on the ISIS link between two interfaces. + LinkProtection *IsisInterfaceLinkProtection `protobuf:"bytes,11,opt,name=link_protection,json=linkProtection,proto3" json:"link_protection,omitempty"` + // This contains list of SRLG values for the link between two interfaces. + SrlgValues []uint32 `protobuf:"varint,12,rep,packed,name=srlg_values,json=srlgValues,proto3" json:"srlg_values,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,13,opt,name=name,proto3,oneof" json:"name,omitempty"` } -func (x *BgpExtCommunity) Reset() { - *x = BgpExtCommunity{} +func (x *IsisInterface) Reset() { + *x = IsisInterface{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[68] + mi := &file_otg_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpExtCommunity) String() string { +func (x *IsisInterface) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtCommunity) ProtoMessage() {} +func (*IsisInterface) ProtoMessage() {} -func (x *BgpExtCommunity) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[68] +func (x *IsisInterface) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[69] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -28458,122 +30537,121 @@ func (x *BgpExtCommunity) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpExtCommunity.ProtoReflect.Descriptor instead. -func (*BgpExtCommunity) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{68} +// Deprecated: Use IsisInterface.ProtoReflect.Descriptor instead. +func (*IsisInterface) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{69} } -func (x *BgpExtCommunity) GetType() BgpExtCommunity_Type_Enum { - if x != nil && x.Type != nil { - return *x.Type +func (x *IsisInterface) GetEthName() string { + if x != nil && x.EthName != nil { + return *x.EthName } - return BgpExtCommunity_Type_unspecified + return "" } -func (x *BgpExtCommunity) GetSubtype() BgpExtCommunity_Subtype_Enum { - if x != nil && x.Subtype != nil { - return *x.Subtype +func (x *IsisInterface) GetMetric() uint32 { + if x != nil && x.Metric != nil { + return *x.Metric } - return BgpExtCommunity_Subtype_unspecified + return 0 } -func (x *BgpExtCommunity) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value +func (x *IsisInterface) GetNetworkType() IsisInterface_NetworkType_Enum { + if x != nil && x.NetworkType != nil { + return *x.NetworkType } - return "" + return IsisInterface_NetworkType_unspecified } -// This attribute identifies the autonomous systems through which routing information -// carried in this UPDATE message has passed. This contains the configuration of how -// to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains -// optional configuration of additional AS Path Segments that can be included in the -// AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems -// (AS) numbers that a routing information passes through to reach the destination. -type BgpAsPath struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *IsisInterface) GetLevelType() IsisInterface_LevelType_Enum { + if x != nil && x.LevelType != nil { + return *x.LevelType + } + return IsisInterface_LevelType_unspecified +} - // Defines how the Local AS should be included in the MP REACH NLRI. For iBGP sessions, - // Do Not Include Local AS must be chosen. For eBGP sessions, any choice other than - // Do Not Include Local AS can be chosen. - // default = AsSetMode.Enum.do_not_include_local_as - AsSetMode *BgpAsPath_AsSetMode_Enum `protobuf:"varint,1,opt,name=as_set_mode,json=asSetMode,proto3,enum=otg.BgpAsPath_AsSetMode_Enum,oneof" json:"as_set_mode,omitempty"` - // The additional AS path segments to be added in the NLRI. By default, an empty AS - // path is always included and the local AS is added to it as per the value of 'as_set_mode' - // attribute. - Segments []*BgpAsPathSegment `protobuf:"bytes,2,rep,name=segments,proto3" json:"segments,omitempty"` +func (x *IsisInterface) GetL1Settings() *IsisInterfaceLevel { + if x != nil { + return x.L1Settings + } + return nil } -func (x *BgpAsPath) Reset() { - *x = BgpAsPath{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *IsisInterface) GetL2Settings() *IsisInterfaceLevel { + if x != nil { + return x.L2Settings } + return nil } -func (x *BgpAsPath) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *IsisInterface) GetMultiTopologyIds() []*IsisMT { + if x != nil { + return x.MultiTopologyIds + } + return nil } -func (*BgpAsPath) ProtoMessage() {} +func (x *IsisInterface) GetTrafficEngineering() []*LinkStateTE { + if x != nil { + return x.TrafficEngineering + } + return nil +} -func (x *BgpAsPath) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *IsisInterface) GetAuthentication() *IsisInterfaceAuthentication { + if x != nil { + return x.Authentication } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpAsPath.ProtoReflect.Descriptor instead. -func (*BgpAsPath) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{69} +func (x *IsisInterface) GetAdvanced() *IsisInterfaceAdvanced { + if x != nil { + return x.Advanced + } + return nil } -func (x *BgpAsPath) GetAsSetMode() BgpAsPath_AsSetMode_Enum { - if x != nil && x.AsSetMode != nil { - return *x.AsSetMode +func (x *IsisInterface) GetLinkProtection() *IsisInterfaceLinkProtection { + if x != nil { + return x.LinkProtection } - return BgpAsPath_AsSetMode_unspecified + return nil } -func (x *BgpAsPath) GetSegments() []*BgpAsPathSegment { +func (x *IsisInterface) GetSrlgValues() []uint32 { if x != nil { - return x.Segments + return x.SrlgValues } return nil } -// Configuration for a single BGP AS path segment -type BgpAsPathSegment struct { +func (x *IsisInterface) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +// Configuration for the properties of Level 1 Hello. +type IsisInterfaceLevel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // AS sequence is the most common type of AS_PATH, it contains the list of ASNs starting - // with the most recent ASN being added read from left to right. - // The other three AS_PATH types are used for Confederations - AS_SET is the type of - // AS_PATH attribute that summarizes routes using using the aggregate-address command, - // allowing AS_PATHs to be summarized in the update as well. - AS_CONFED_SEQ gives - // the list of ASNs in the path starting with the most recent ASN to be added reading - // left to right - AS_CONFED_SET will allow summarization of multiple AS PATHs to be - // sent in BGP Updates. - // default = Type.Enum.as_seq - Type *BgpAsPathSegment_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.BgpAsPathSegment_Type_Enum,oneof" json:"type,omitempty"` - // The AS numbers in this AS path segment. - AsNumbers []uint32 `protobuf:"varint,2,rep,packed,name=as_numbers,json=asNumbers,proto3" json:"as_numbers,omitempty"` + // The Priority setting in Level 1 LAN Hellos for Designated Router election. + // default = 0 + Priority *uint32 `protobuf:"varint,1,opt,name=priority,proto3,oneof" json:"priority,omitempty"` + // The Hello interval for Level 1 Hello messages, in seconds. + // default = 10 + HelloInterval *uint32 `protobuf:"varint,2,opt,name=hello_interval,json=helloInterval,proto3,oneof" json:"hello_interval,omitempty"` + // The Dead (Holding Time) interval for Level 1 Hello messages, in seconds. + // default = 30 + DeadInterval *uint32 `protobuf:"varint,3,opt,name=dead_interval,json=deadInterval,proto3,oneof" json:"dead_interval,omitempty"` } -func (x *BgpAsPathSegment) Reset() { - *x = BgpAsPathSegment{} +func (x *IsisInterfaceLevel) Reset() { + *x = IsisInterfaceLevel{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -28581,13 +30659,13 @@ func (x *BgpAsPathSegment) Reset() { } } -func (x *BgpAsPathSegment) String() string { +func (x *IsisInterfaceLevel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAsPathSegment) ProtoMessage() {} +func (*IsisInterfaceLevel) ProtoMessage() {} -func (x *BgpAsPathSegment) ProtoReflect() protoreflect.Message { +func (x *IsisInterfaceLevel) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[70] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -28599,43 +30677,50 @@ func (x *BgpAsPathSegment) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAsPathSegment.ProtoReflect.Descriptor instead. -func (*BgpAsPathSegment) Descriptor() ([]byte, []int) { +// Deprecated: Use IsisInterfaceLevel.ProtoReflect.Descriptor instead. +func (*IsisInterfaceLevel) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{70} } -func (x *BgpAsPathSegment) GetType() BgpAsPathSegment_Type_Enum { - if x != nil && x.Type != nil { - return *x.Type +func (x *IsisInterfaceLevel) GetPriority() uint32 { + if x != nil && x.Priority != nil { + return *x.Priority } - return BgpAsPathSegment_Type_unspecified + return 0 } -func (x *BgpAsPathSegment) GetAsNumbers() []uint32 { - if x != nil { - return x.AsNumbers +func (x *IsisInterfaceLevel) GetHelloInterval() uint32 { + if x != nil && x.HelloInterval != nil { + return *x.HelloInterval } - return nil + return 0 } -// This contains a list of different flavors of EVPN. -// For example EVPN over VXLAN or EVPN over MPLS etc to be configured per Ethernet segment. -// -// Need to instantiate correct type of EVPN instance as per requirement. -type BgpV4EvpnEvis struct { +func (x *IsisInterfaceLevel) GetDeadInterval() uint32 { + if x != nil && x.DeadInterval != nil { + return *x.DeadInterval + } + return 0 +} + +// Configuration of properties per interface per topology when multiple topologies are +// configured in an ISIS router. +// in a ISIS router. +type IsisMT struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.evi_vxlan - Choice *BgpV4EvpnEvis_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpV4EvpnEvis_Choice_Enum,oneof" json:"choice,omitempty"` - // EVPN VXLAN instance to be configured per Ethernet Segment. - EviVxlan *BgpV4EviVxlan `protobuf:"bytes,2,opt,name=evi_vxlan,json=eviVxlan,proto3" json:"evi_vxlan,omitempty"` + // The Multi Topology ID for one of the topologies supported on the ISIS interface. + // default = 0 + MtId *uint32 `protobuf:"varint,1,opt,name=mt_id,json=mtId,proto3,oneof" json:"mt_id,omitempty"` + // Specifies the link metric for this topology on the ISIS interface. + // default = 10 + LinkMetric *uint32 `protobuf:"varint,2,opt,name=link_metric,json=linkMetric,proto3,oneof" json:"link_metric,omitempty"` } -func (x *BgpV4EvpnEvis) Reset() { - *x = BgpV4EvpnEvis{} +func (x *IsisMT) Reset() { + *x = IsisMT{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -28643,13 +30728,13 @@ func (x *BgpV4EvpnEvis) Reset() { } } -func (x *BgpV4EvpnEvis) String() string { +func (x *IsisMT) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV4EvpnEvis) ProtoMessage() {} +func (*IsisMT) ProtoMessage() {} -func (x *BgpV4EvpnEvis) ProtoReflect() protoreflect.Message { +func (x *IsisMT) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[71] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -28661,100 +30746,56 @@ func (x *BgpV4EvpnEvis) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV4EvpnEvis.ProtoReflect.Descriptor instead. -func (*BgpV4EvpnEvis) Descriptor() ([]byte, []int) { +// Deprecated: Use IsisMT.ProtoReflect.Descriptor instead. +func (*IsisMT) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{71} } -func (x *BgpV4EvpnEvis) GetChoice() BgpV4EvpnEvis_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *IsisMT) GetMtId() uint32 { + if x != nil && x.MtId != nil { + return *x.MtId } - return BgpV4EvpnEvis_Choice_unspecified + return 0 } -func (x *BgpV4EvpnEvis) GetEviVxlan() *BgpV4EviVxlan { - if x != nil { - return x.EviVxlan +func (x *IsisMT) GetLinkMetric() uint32 { + if x != nil && x.LinkMetric != nil { + return *x.LinkMetric } - return nil + return 0 } -// Configuration for BGP EVPN EVI. Advertises following routes - -// -// # Type 3 - Inclusive Multicast Ethernet Tag Route -// -// Type 1 - Ethernet Auto-discovery Route (Per EVI) -// -// Type 1 - Ethernet Auto-discovery Route (Per ES) -type BgpV4EviVxlan struct { +// A container for Traffic Engineering properties on a interface. +type LinkStateTE struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // This contains the list of Broadcast Domains to be configured per EVI. - BroadcastDomains []*BgpV4EviVxlanBroadcastDomain `protobuf:"bytes,1,rep,name=broadcast_domains,json=broadcastDomains,proto3" json:"broadcast_domains,omitempty"` - // This model only supports Ingress Replication - // default = ReplicationType.Enum.ingress_replication - ReplicationType *BgpV4EviVxlan_ReplicationType_Enum `protobuf:"varint,2,opt,name=replication_type,json=replicationType,proto3,enum=otg.BgpV4EviVxlan_ReplicationType_Enum,oneof" json:"replication_type,omitempty"` - // Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel - // attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. - // default = 16 - PmsiLabel *uint32 `protobuf:"varint,3,opt,name=pmsi_label,json=pmsiLabel,proto3,oneof" json:"pmsi_label,omitempty"` - // The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet - // Auto-discovery Route per + // The Administrative group sub-TLV (sub-TLV 3). It is a 4-octet + // user-defined bit mask used to assign administrative group numbers + // to the interface, for use in assigning colors and resource classes. + // Each set bit corresponds to a single administrative group for this + // interface. The settings translate into Group numbers, which range + // from 0 to 31 (integers). + // default = 00000000 + AdministrativeGroup *string `protobuf:"bytes,1,opt,name=administrative_group,json=administrativeGroup,proto3,oneof" json:"administrative_group,omitempty"` + // The user-assigned link metric for Traffic Engineering. // default = 0 - AdLabel *uint32 `protobuf:"varint,4,opt,name=ad_label,json=adLabel,proto3,oneof" json:"ad_label,omitempty"` - // Colon separated Extended Community value of 6 Bytes - AS number: Value identifying - // an EVI. Example - for the as_2octet 60005:100. - RouteDistinguisher *BgpRouteDistinguisher `protobuf:"bytes,5,opt,name=route_distinguisher,json=routeDistinguisher,proto3" json:"route_distinguisher,omitempty"` - // List of Layer 2 Virtual Network Identifier (L2VNI) export targets associated with - // this EVI. - RouteTargetExport []*BgpRouteTarget `protobuf:"bytes,6,rep,name=route_target_export,json=routeTargetExport,proto3" json:"route_target_export,omitempty"` - // List of L2VNI import targets associated with this EVI. - RouteTargetImport []*BgpRouteTarget `protobuf:"bytes,7,rep,name=route_target_import,json=routeTargetImport,proto3" json:"route_target_import,omitempty"` - // List of Layer 3 Virtual Network Identifier (L3VNI) Export Route Targets. - L3RouteTargetExport []*BgpRouteTarget `protobuf:"bytes,8,rep,name=l3_route_target_export,json=l3RouteTargetExport,proto3" json:"l3_route_target_export,omitempty"` - // List of L3VNI Import Route Targets. - L3RouteTargetImport []*BgpRouteTarget `protobuf:"bytes,9,rep,name=l3_route_target_import,json=l3RouteTargetImport,proto3" json:"l3_route_target_import,omitempty"` - // Description missing in models - Advanced *BgpRouteAdvanced `protobuf:"bytes,10,opt,name=advanced,proto3" json:"advanced,omitempty"` - // Optional community settings. - Communities []*BgpCommunity `protobuf:"bytes,11,rep,name=communities,proto3" json:"communities,omitempty"` - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. - ExtCommunities []*BgpExtCommunity `protobuf:"bytes,12,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` - // Optional AS PATH settings. - AsPath *BgpAsPath `protobuf:"bytes,13,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` + MetricLevel *uint32 `protobuf:"varint,2,opt,name=metric_level,json=metricLevel,proto3,oneof" json:"metric_level,omitempty"` + // The maximum link bandwidth (sub-TLV 9) in bytes/sec allowed for this + // link for a direction. + // default = 125000000 + MaxBandwith *uint32 `protobuf:"varint,3,opt,name=max_bandwith,json=maxBandwith,proto3,oneof" json:"max_bandwith,omitempty"` + // The maximum link bandwidth (sub-TLV 10) in bytes/sec allowed for this + // link in a direction. + // default = 125000000 + MaxReservableBandwidth *uint32 `protobuf:"varint,4,opt,name=max_reservable_bandwidth,json=maxReservableBandwidth,proto3,oneof" json:"max_reservable_bandwidth,omitempty"` + // Configuration of bandwidths of priority 0 through priority 7. + PriorityBandwidths *LinkStatepriorityBandwidths `protobuf:"bytes,5,opt,name=priority_bandwidths,json=priorityBandwidths,proto3" json:"priority_bandwidths,omitempty"` } -func (x *BgpV4EviVxlan) Reset() { - *x = BgpV4EviVxlan{} +func (x *LinkStateTE) Reset() { + *x = LinkStateTE{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -28762,13 +30803,13 @@ func (x *BgpV4EviVxlan) Reset() { } } -func (x *BgpV4EviVxlan) String() string { +func (x *LinkStateTE) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV4EviVxlan) ProtoMessage() {} +func (*LinkStateTE) ProtoMessage() {} -func (x *BgpV4EviVxlan) ProtoReflect() protoreflect.Message { +func (x *LinkStateTE) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[72] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -28780,123 +30821,84 @@ func (x *BgpV4EviVxlan) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV4EviVxlan.ProtoReflect.Descriptor instead. -func (*BgpV4EviVxlan) Descriptor() ([]byte, []int) { +// Deprecated: Use LinkStateTE.ProtoReflect.Descriptor instead. +func (*LinkStateTE) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{72} } -func (x *BgpV4EviVxlan) GetBroadcastDomains() []*BgpV4EviVxlanBroadcastDomain { - if x != nil { - return x.BroadcastDomains - } - return nil -} - -func (x *BgpV4EviVxlan) GetReplicationType() BgpV4EviVxlan_ReplicationType_Enum { - if x != nil && x.ReplicationType != nil { - return *x.ReplicationType +func (x *LinkStateTE) GetAdministrativeGroup() string { + if x != nil && x.AdministrativeGroup != nil { + return *x.AdministrativeGroup } - return BgpV4EviVxlan_ReplicationType_unspecified + return "" } -func (x *BgpV4EviVxlan) GetPmsiLabel() uint32 { - if x != nil && x.PmsiLabel != nil { - return *x.PmsiLabel +func (x *LinkStateTE) GetMetricLevel() uint32 { + if x != nil && x.MetricLevel != nil { + return *x.MetricLevel } return 0 } -func (x *BgpV4EviVxlan) GetAdLabel() uint32 { - if x != nil && x.AdLabel != nil { - return *x.AdLabel +func (x *LinkStateTE) GetMaxBandwith() uint32 { + if x != nil && x.MaxBandwith != nil { + return *x.MaxBandwith } return 0 } -func (x *BgpV4EviVxlan) GetRouteDistinguisher() *BgpRouteDistinguisher { - if x != nil { - return x.RouteDistinguisher - } - return nil -} - -func (x *BgpV4EviVxlan) GetRouteTargetExport() []*BgpRouteTarget { - if x != nil { - return x.RouteTargetExport - } - return nil -} - -func (x *BgpV4EviVxlan) GetRouteTargetImport() []*BgpRouteTarget { - if x != nil { - return x.RouteTargetImport - } - return nil -} - -func (x *BgpV4EviVxlan) GetL3RouteTargetExport() []*BgpRouteTarget { - if x != nil { - return x.L3RouteTargetExport - } - return nil -} - -func (x *BgpV4EviVxlan) GetL3RouteTargetImport() []*BgpRouteTarget { - if x != nil { - return x.L3RouteTargetImport - } - return nil -} - -func (x *BgpV4EviVxlan) GetAdvanced() *BgpRouteAdvanced { - if x != nil { - return x.Advanced - } - return nil -} - -func (x *BgpV4EviVxlan) GetCommunities() []*BgpCommunity { - if x != nil { - return x.Communities - } - return nil -} - -func (x *BgpV4EviVxlan) GetExtCommunities() []*BgpExtCommunity { - if x != nil { - return x.ExtCommunities +func (x *LinkStateTE) GetMaxReservableBandwidth() uint32 { + if x != nil && x.MaxReservableBandwidth != nil { + return *x.MaxReservableBandwidth } - return nil + return 0 } -func (x *BgpV4EviVxlan) GetAsPath() *BgpAsPath { +func (x *LinkStateTE) GetPriorityBandwidths() *LinkStatepriorityBandwidths { if x != nil { - return x.AsPath + return x.PriorityBandwidths } return nil } -// Configuration for Broadcast Domains per EVI. -type BgpV4EviVxlanBroadcastDomain struct { +// Specifies the amount of bandwidth that can be reserved with a setup priority of 0 +// +// through 7, arranged in increasing order with priority 0 having highest priority. +// +// In ISIS, this is sent in sub-TLV (11) of Extended IS Reachability TLV. +type LinkStatepriorityBandwidths struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // This contains the list of Customer MAC/IP Ranges to be configured per Broadcast Domain. - // - // Advertises following route - - // Type 2 - MAC/IP Advertisement Route. - CmacIpRange []*BgpCMacIpRange `protobuf:"bytes,1,rep,name=cmac_ip_range,json=cmacIpRange,proto3" json:"cmac_ip_range,omitempty"` - // The Ethernet Tag ID of the Broadcast Domain. - // default = 0 - EthernetTagId *uint32 `protobuf:"varint,2,opt,name=ethernet_tag_id,json=ethernetTagId,proto3,oneof" json:"ethernet_tag_id,omitempty"` - // VLAN-Aware service to be enabled or disabled. - // default = False - VlanAwareService *bool `protobuf:"varint,3,opt,name=vlan_aware_service,json=vlanAwareService,proto3,oneof" json:"vlan_aware_service,omitempty"` + // Specifies the amount of bandwidth that can be reserved for the Priority 0. + // default = 125000000 + Pb0 *uint32 `protobuf:"varint,1,opt,name=pb0,proto3,oneof" json:"pb0,omitempty"` + // Specifies the amount of bandwidth that can be reserved for the Priority 1. + // default = 125000000 + Pb1 *uint32 `protobuf:"varint,2,opt,name=pb1,proto3,oneof" json:"pb1,omitempty"` + // Specify the amount of bandwidth that can be reserved for the Priority 2. + // default = 125000000 + Pb2 *uint32 `protobuf:"varint,3,opt,name=pb2,proto3,oneof" json:"pb2,omitempty"` + // Specifies the amount of bandwidth that can be reserved for the Priority 3. + // default = 125000000 + Pb3 *uint32 `protobuf:"varint,4,opt,name=pb3,proto3,oneof" json:"pb3,omitempty"` + // Specifies the amount of bandwidth that can be reserved for the Priority 4. + // default = 125000000 + Pb4 *uint32 `protobuf:"varint,5,opt,name=pb4,proto3,oneof" json:"pb4,omitempty"` + // Specifies the amount of bandwidth that can be reserved for the Priority 5. + // default = 125000000 + Pb5 *uint32 `protobuf:"varint,6,opt,name=pb5,proto3,oneof" json:"pb5,omitempty"` + // Specifies the amount of bandwidth that can be reserved for the Priority 6. + // default = 125000000 + Pb6 *uint32 `protobuf:"varint,7,opt,name=pb6,proto3,oneof" json:"pb6,omitempty"` + // Specifies the amount of bandwidth that can be reserved for the Priority 7. + // default = 125000000 + Pb7 *uint32 `protobuf:"varint,8,opt,name=pb7,proto3,oneof" json:"pb7,omitempty"` } -func (x *BgpV4EviVxlanBroadcastDomain) Reset() { - *x = BgpV4EviVxlanBroadcastDomain{} +func (x *LinkStatepriorityBandwidths) Reset() { + *x = LinkStatepriorityBandwidths{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -28904,13 +30906,13 @@ func (x *BgpV4EviVxlanBroadcastDomain) Reset() { } } -func (x *BgpV4EviVxlanBroadcastDomain) String() string { +func (x *LinkStatepriorityBandwidths) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV4EviVxlanBroadcastDomain) ProtoMessage() {} +func (*LinkStatepriorityBandwidths) ProtoMessage() {} -func (x *BgpV4EviVxlanBroadcastDomain) ProtoReflect() protoreflect.Message { +func (x *LinkStatepriorityBandwidths) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[73] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -28922,101 +30924,84 @@ func (x *BgpV4EviVxlanBroadcastDomain) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV4EviVxlanBroadcastDomain.ProtoReflect.Descriptor instead. -func (*BgpV4EviVxlanBroadcastDomain) Descriptor() ([]byte, []int) { +// Deprecated: Use LinkStatepriorityBandwidths.ProtoReflect.Descriptor instead. +func (*LinkStatepriorityBandwidths) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{73} } -func (x *BgpV4EviVxlanBroadcastDomain) GetCmacIpRange() []*BgpCMacIpRange { - if x != nil { - return x.CmacIpRange +func (x *LinkStatepriorityBandwidths) GetPb0() uint32 { + if x != nil && x.Pb0 != nil { + return *x.Pb0 } - return nil + return 0 } -func (x *BgpV4EviVxlanBroadcastDomain) GetEthernetTagId() uint32 { - if x != nil && x.EthernetTagId != nil { - return *x.EthernetTagId +func (x *LinkStatepriorityBandwidths) GetPb1() uint32 { + if x != nil && x.Pb1 != nil { + return *x.Pb1 } return 0 } -func (x *BgpV4EviVxlanBroadcastDomain) GetVlanAwareService() bool { - if x != nil && x.VlanAwareService != nil { - return *x.VlanAwareService +func (x *LinkStatepriorityBandwidths) GetPb2() uint32 { + if x != nil && x.Pb2 != nil { + return *x.Pb2 } - return false + return 0 } -// Configuration for MAC/IP Ranges per Broadcast Domain. -// -// Advertises following route - -// -// Type 2 - MAC/IP Advertisement Route. -type BgpCMacIpRange struct { +func (x *LinkStatepriorityBandwidths) GetPb3() uint32 { + if x != nil && x.Pb3 != nil { + return *x.Pb3 + } + return 0 +} + +func (x *LinkStatepriorityBandwidths) GetPb4() uint32 { + if x != nil && x.Pb4 != nil { + return *x.Pb4 + } + return 0 +} + +func (x *LinkStatepriorityBandwidths) GetPb5() uint32 { + if x != nil && x.Pb5 != nil { + return *x.Pb5 + } + return 0 +} + +func (x *LinkStatepriorityBandwidths) GetPb6() uint32 { + if x != nil && x.Pb6 != nil { + return *x.Pb6 + } + return 0 +} + +func (x *LinkStatepriorityBandwidths) GetPb7() uint32 { + if x != nil && x.Pb7 != nil { + return *x.Pb7 + } + return 0 +} + +// Optional container for circuit authentication properties. +type IsisInterfaceAuthentication struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Host MAC address range per Broadcast Domain. - MacAddresses *MACRouteAddress `protobuf:"bytes,1,opt,name=mac_addresses,json=macAddresses,proto3" json:"mac_addresses,omitempty"` - // Layer 2 Virtual Network Identifier (L2VNI) to be advertised with MAC/IP Advertisement - // Route (Type 2) - // default = 0 - L2Vni *uint32 `protobuf:"varint,2,opt,name=l2vni,proto3,oneof" json:"l2vni,omitempty"` - // Host IPv4 address range per Broadcast Domain. - Ipv4Addresses *V4RouteAddress `protobuf:"bytes,3,opt,name=ipv4_addresses,json=ipv4Addresses,proto3" json:"ipv4_addresses,omitempty"` - // Host IPv6 address range per Broadcast Domain. - Ipv6Addresses *V6RouteAddress `protobuf:"bytes,4,opt,name=ipv6_addresses,json=ipv6Addresses,proto3" json:"ipv6_addresses,omitempty"` - // Layer 3 Virtual Network Identifier (L3VNI) to be advertised with MAC/IP Advertisement - // Route (Type 2). - // default = 0 - L3Vni *uint32 `protobuf:"varint,5,opt,name=l3vni,proto3,oneof" json:"l3vni,omitempty"` - // Include default Gateway Extended Community in MAC/IP Advertisement Route (Type 2). - // default = False - IncludeDefaultGateway *bool `protobuf:"varint,6,opt,name=include_default_gateway,json=includeDefaultGateway,proto3,oneof" json:"include_default_gateway,omitempty"` - // Description missing in models - Advanced *BgpRouteAdvanced `protobuf:"bytes,7,opt,name=advanced,proto3" json:"advanced,omitempty"` - // Optional community settings. - Communities []*BgpCommunity `protobuf:"bytes,8,rep,name=communities,proto3" json:"communities,omitempty"` - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. - ExtCommunities []*BgpExtCommunity `protobuf:"bytes,9,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` - // Optional AS PATH settings. - AsPath *BgpAsPath `protobuf:"bytes,10,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. + // The circuit authentication method. // required = true - Name *string `protobuf:"bytes,11,opt,name=name,proto3,oneof" json:"name,omitempty"` + AuthType *IsisInterfaceAuthentication_AuthType_Enum `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=otg.IsisInterfaceAuthentication_AuthType_Enum,oneof" json:"auth_type,omitempty"` + // MD5 key to be used for authentication. + Md5 *string `protobuf:"bytes,2,opt,name=md5,proto3,oneof" json:"md5,omitempty"` + // The password, in clear text, to be used for Authentication. + Password *string `protobuf:"bytes,3,opt,name=password,proto3,oneof" json:"password,omitempty"` } -func (x *BgpCMacIpRange) Reset() { - *x = BgpCMacIpRange{} +func (x *IsisInterfaceAuthentication) Reset() { + *x = IsisInterfaceAuthentication{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -29024,13 +31009,13 @@ func (x *BgpCMacIpRange) Reset() { } } -func (x *BgpCMacIpRange) String() string { +func (x *IsisInterfaceAuthentication) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpCMacIpRange) ProtoMessage() {} +func (*IsisInterfaceAuthentication) ProtoMessage() {} -func (x *BgpCMacIpRange) ProtoReflect() protoreflect.Message { +func (x *IsisInterfaceAuthentication) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[74] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -29042,110 +31027,66 @@ func (x *BgpCMacIpRange) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpCMacIpRange.ProtoReflect.Descriptor instead. -func (*BgpCMacIpRange) Descriptor() ([]byte, []int) { +// Deprecated: Use IsisInterfaceAuthentication.ProtoReflect.Descriptor instead. +func (*IsisInterfaceAuthentication) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{74} } -func (x *BgpCMacIpRange) GetMacAddresses() *MACRouteAddress { - if x != nil { - return x.MacAddresses - } - return nil -} - -func (x *BgpCMacIpRange) GetL2Vni() uint32 { - if x != nil && x.L2Vni != nil { - return *x.L2Vni - } - return 0 -} - -func (x *BgpCMacIpRange) GetIpv4Addresses() *V4RouteAddress { - if x != nil { - return x.Ipv4Addresses - } - return nil -} - -func (x *BgpCMacIpRange) GetIpv6Addresses() *V6RouteAddress { - if x != nil { - return x.Ipv6Addresses - } - return nil -} - -func (x *BgpCMacIpRange) GetL3Vni() uint32 { - if x != nil && x.L3Vni != nil { - return *x.L3Vni - } - return 0 -} - -func (x *BgpCMacIpRange) GetIncludeDefaultGateway() bool { - if x != nil && x.IncludeDefaultGateway != nil { - return *x.IncludeDefaultGateway - } - return false -} - -func (x *BgpCMacIpRange) GetAdvanced() *BgpRouteAdvanced { - if x != nil { - return x.Advanced - } - return nil -} - -func (x *BgpCMacIpRange) GetCommunities() []*BgpCommunity { - if x != nil { - return x.Communities - } - return nil -} - -func (x *BgpCMacIpRange) GetExtCommunities() []*BgpExtCommunity { - if x != nil { - return x.ExtCommunities +func (x *IsisInterfaceAuthentication) GetAuthType() IsisInterfaceAuthentication_AuthType_Enum { + if x != nil && x.AuthType != nil { + return *x.AuthType } - return nil + return IsisInterfaceAuthentication_AuthType_unspecified } -func (x *BgpCMacIpRange) GetAsPath() *BgpAsPath { - if x != nil { - return x.AsPath +func (x *IsisInterfaceAuthentication) GetMd5() string { + if x != nil && x.Md5 != nil { + return *x.Md5 } - return nil + return "" } -func (x *BgpCMacIpRange) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *IsisInterfaceAuthentication) GetPassword() string { + if x != nil && x.Password != nil { + return *x.Password } return "" } -// BGP Route Distinguisher. -type BgpRouteDistinguisher struct { +// Optional container for advanced interface properties. +type IsisInterfaceAdvanced struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Route Distinguisher Type field of 2 Byte. - // - as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). - // - ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). - // - as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). - // default = RdType.Enum.as_2octet - RdType *BgpRouteDistinguisher_RdType_Enum `protobuf:"varint,1,opt,name=rd_type,json=rdType,proto3,enum=otg.BgpRouteDistinguisher_RdType_Enum,oneof" json:"rd_type,omitempty"` - // Allow to automatically configure RD IP address from local ip. + // If a padded Hello message is received on the interface, the length of + // the Hello packets sent out on that interface is adjusted to match. + // default = True + AutoAdjustMtu *bool `protobuf:"varint,1,opt,name=auto_adjust_mtu,json=autoAdjustMtu,proto3,oneof" json:"auto_adjust_mtu,omitempty"` + // If a Level 1 Hello is received on this emulated router for an area + // not currently in its area list, an area from the received Hello is + // added to that list. This ensures an area match for all future + // Level 1 Hellos from the source L1 router. + // default = True + AutoAdjustArea *bool `protobuf:"varint,2,opt,name=auto_adjust_area,json=autoAdjustArea,proto3,oneof" json:"auto_adjust_area,omitempty"` + // If a Hello message listing supported protocols is received on this + // emulated router, the supported protocols advertised by this router + // are changed to match exactly. // default = False - AutoConfigRdIpAddr *bool `protobuf:"varint,2,opt,name=auto_config_rd_ip_addr,json=autoConfigRdIpAddr,proto3,oneof" json:"auto_config_rd_ip_addr,omitempty"` - // Colon separated Extended Community value of 6 Bytes - AS number: Value. Example - // - for the as_2octet or as_4octet 60005:100, for ipv4_address 1.1.1.1:100 - RdValue *string `protobuf:"bytes,3,opt,name=rd_value,json=rdValue,proto3,oneof" json:"rd_value,omitempty"` + AutoAdjustSupportedProtocols *bool `protobuf:"varint,3,opt,name=auto_adjust_supported_protocols,json=autoAdjustSupportedProtocols,proto3,oneof" json:"auto_adjust_supported_protocols,omitempty"` + // If it is true, the Point-to-Point circuit will include 3-way TLV in its Point-to-Point + // IIH and attempt to establish the adjacency as specified in RFC 5303. This field + // is not applicable if network_type is set to 'broadcast' type in ISIS interface. + // default = True + Enable_3WayHandshake *bool `protobuf:"varint,4,opt,name=enable_3way_handshake,json=enable3wayHandshake,proto3,oneof" json:"enable_3way_handshake,omitempty"` + // If it is true, the Point-to-Point Hello messages will be sent to the unicast MAC + // address. + // default = False + P2PHellosToUnicastMac *bool `protobuf:"varint,5,opt,name=p2p_hellos_to_unicast_mac,json=p2pHellosToUnicastMac,proto3,oneof" json:"p2p_hellos_to_unicast_mac,omitempty"` } -func (x *BgpRouteDistinguisher) Reset() { - *x = BgpRouteDistinguisher{} +func (x *IsisInterfaceAdvanced) Reset() { + *x = IsisInterfaceAdvanced{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -29153,13 +31094,13 @@ func (x *BgpRouteDistinguisher) Reset() { } } -func (x *BgpRouteDistinguisher) String() string { +func (x *IsisInterfaceAdvanced) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpRouteDistinguisher) ProtoMessage() {} +func (*IsisInterfaceAdvanced) ProtoMessage() {} -func (x *BgpRouteDistinguisher) ProtoReflect() protoreflect.Message { +func (x *IsisInterfaceAdvanced) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[75] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -29171,50 +31112,89 @@ func (x *BgpRouteDistinguisher) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpRouteDistinguisher.ProtoReflect.Descriptor instead. -func (*BgpRouteDistinguisher) Descriptor() ([]byte, []int) { +// Deprecated: Use IsisInterfaceAdvanced.ProtoReflect.Descriptor instead. +func (*IsisInterfaceAdvanced) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{75} } -func (x *BgpRouteDistinguisher) GetRdType() BgpRouteDistinguisher_RdType_Enum { - if x != nil && x.RdType != nil { - return *x.RdType +func (x *IsisInterfaceAdvanced) GetAutoAdjustMtu() bool { + if x != nil && x.AutoAdjustMtu != nil { + return *x.AutoAdjustMtu } - return BgpRouteDistinguisher_RdType_unspecified + return false } -func (x *BgpRouteDistinguisher) GetAutoConfigRdIpAddr() bool { - if x != nil && x.AutoConfigRdIpAddr != nil { - return *x.AutoConfigRdIpAddr +func (x *IsisInterfaceAdvanced) GetAutoAdjustArea() bool { + if x != nil && x.AutoAdjustArea != nil { + return *x.AutoAdjustArea } return false } -func (x *BgpRouteDistinguisher) GetRdValue() string { - if x != nil && x.RdValue != nil { - return *x.RdValue +func (x *IsisInterfaceAdvanced) GetAutoAdjustSupportedProtocols() bool { + if x != nil && x.AutoAdjustSupportedProtocols != nil { + return *x.AutoAdjustSupportedProtocols } - return "" + return false } -// BGP Route Target. -type BgpRouteTarget struct { +func (x *IsisInterfaceAdvanced) GetEnable_3WayHandshake() bool { + if x != nil && x.Enable_3WayHandshake != nil { + return *x.Enable_3WayHandshake + } + return false +} + +func (x *IsisInterfaceAdvanced) GetP2PHellosToUnicastMac() bool { + if x != nil && x.P2PHellosToUnicastMac != nil { + return *x.P2PHellosToUnicastMac + } + return false +} + +// Optional container for the link protection sub TLV (type 20). +type IsisInterfaceLinkProtection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Extended Community Type field of 2 Byte. - // - as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). - // - ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). - // - as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). - RtType *BgpRouteTarget_RtType_Enum `protobuf:"varint,1,opt,name=rt_type,json=rtType,proto3,enum=otg.BgpRouteTarget_RtType_Enum,oneof" json:"rt_type,omitempty"` - // Colon separated Extended Community value of 6 Bytes - AS number: Assigned Number. - // Example - for the as_2octet or as_4octet 60005:100, for ipv4_address 1.1.1.1:100 - RtValue *string `protobuf:"bytes,2,opt,name=rt_value,json=rtValue,proto3,oneof" json:"rt_value,omitempty"` + // Enable this to protect other link or links. LSPs on a link of this type are lost + // if any of the links fail. + // default = False + ExtraTraffic *bool `protobuf:"varint,1,opt,name=extra_traffic,json=extraTraffic,proto3,oneof" json:"extra_traffic,omitempty"` + // Enabling this signifies that there is no other link protecting this + // link. LSPs on a link of this type are lost if the link fails. + // default = False + Unprotected *bool `protobuf:"varint,2,opt,name=unprotected,proto3,oneof" json:"unprotected,omitempty"` + // Enable this to share the Extra Traffic links between one or more + // links of type Shared.There are one or more disjoint links of type + // Extra Traffic that are protecting this link. + // default = False + Shared *bool `protobuf:"varint,3,opt,name=shared,proto3,oneof" json:"shared,omitempty"` + // Enabling this signifies that there is one dedicated disjoint link + // of type Extra Traffic that is protecting this link. + // default = False + Dedicated_1To_1 *bool `protobuf:"varint,4,opt,name=dedicated_1_to_1,json=dedicated1To1,proto3,oneof" json:"dedicated_1_to_1,omitempty"` + // Enabling this signifies that a dedicated disjoint link is protecting + // this link. However, the protecting link is not advertised in the + // link state database and is therefore not available for the routing + // of LSPs. + // default = False + Dedicated_1Plus_1 *bool `protobuf:"varint,5,opt,name=dedicated_1_plus_1,json=dedicated1Plus1,proto3,oneof" json:"dedicated_1_plus_1,omitempty"` + // Enabling this signifies that a protection scheme that is more + // reliable than Dedicated 1+1. + // default = False + Enhanced *bool `protobuf:"varint,6,opt,name=enhanced,proto3,oneof" json:"enhanced,omitempty"` + // This is a Protection Scheme with value 0x40. + // default = False + Reserved_40 *bool `protobuf:"varint,7,opt,name=reserved_40,json=reserved40,proto3,oneof" json:"reserved_40,omitempty"` + // This is a Protection Scheme with value 0x80. + // default = False + Reserved_80 *bool `protobuf:"varint,8,opt,name=reserved_80,json=reserved80,proto3,oneof" json:"reserved_80,omitempty"` } -func (x *BgpRouteTarget) Reset() { - *x = BgpRouteTarget{} +func (x *IsisInterfaceLinkProtection) Reset() { + *x = IsisInterfaceLinkProtection{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -29222,13 +31202,13 @@ func (x *BgpRouteTarget) Reset() { } } -func (x *BgpRouteTarget) String() string { +func (x *IsisInterfaceLinkProtection) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpRouteTarget) ProtoMessage() {} +func (*IsisInterfaceLinkProtection) ProtoMessage() {} -func (x *BgpRouteTarget) ProtoReflect() protoreflect.Message { +func (x *IsisInterfaceLinkProtection) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[76] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -29240,67 +31220,93 @@ func (x *BgpRouteTarget) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpRouteTarget.ProtoReflect.Descriptor instead. -func (*BgpRouteTarget) Descriptor() ([]byte, []int) { +// Deprecated: Use IsisInterfaceLinkProtection.ProtoReflect.Descriptor instead. +func (*IsisInterfaceLinkProtection) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{76} } -func (x *BgpRouteTarget) GetRtType() BgpRouteTarget_RtType_Enum { - if x != nil && x.RtType != nil { - return *x.RtType +func (x *IsisInterfaceLinkProtection) GetExtraTraffic() bool { + if x != nil && x.ExtraTraffic != nil { + return *x.ExtraTraffic } - return BgpRouteTarget_RtType_unspecified + return false } -func (x *BgpRouteTarget) GetRtValue() string { - if x != nil && x.RtValue != nil { - return *x.RtValue +func (x *IsisInterfaceLinkProtection) GetUnprotected() bool { + if x != nil && x.Unprotected != nil { + return *x.Unprotected } - return "" + return false } -// Configuration for BGP advanced settings. -type BgpAdvanced struct { +func (x *IsisInterfaceLinkProtection) GetShared() bool { + if x != nil && x.Shared != nil { + return *x.Shared + } + return false +} + +func (x *IsisInterfaceLinkProtection) GetDedicated_1To_1() bool { + if x != nil && x.Dedicated_1To_1 != nil { + return *x.Dedicated_1To_1 + } + return false +} + +func (x *IsisInterfaceLinkProtection) GetDedicated_1Plus_1() bool { + if x != nil && x.Dedicated_1Plus_1 != nil { + return *x.Dedicated_1Plus_1 + } + return false +} + +func (x *IsisInterfaceLinkProtection) GetEnhanced() bool { + if x != nil && x.Enhanced != nil { + return *x.Enhanced + } + return false +} + +func (x *IsisInterfaceLinkProtection) GetReserved_40() bool { + if x != nil && x.Reserved_40 != nil { + return *x.Reserved_40 + } + return false +} + +func (x *IsisInterfaceLinkProtection) GetReserved_80() bool { + if x != nil && x.Reserved_80 != nil { + return *x.Reserved_80 + } + return false +} + +// This contains ISIS router basic properties. +type IsisBasic struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Number of seconds the sender proposes for the value of the Hold Timer. - // default = 90 - HoldTimeInterval *uint32 `protobuf:"varint,1,opt,name=hold_time_interval,json=holdTimeInterval,proto3,oneof" json:"hold_time_interval,omitempty"` - // Number of seconds between transmissions of Keepalive messages by this peer. - // default = 30 - KeepAliveInterval *uint32 `protobuf:"varint,2,opt,name=keep_alive_interval,json=keepAliveInterval,proto3,oneof" json:"keep_alive_interval,omitempty"` - // The time interval at which Update messages are sent to the DUT, expressed as the - // number of milliseconds between Update messages. The update interval 0 implies to - // send all the updates as fast as possible. - // default = 0 - UpdateInterval *uint32 `protobuf:"varint,3,opt,name=update_interval,json=updateInterval,proto3,oneof" json:"update_interval,omitempty"` - // The limited number of iterations that a unit of data can experience before the data - // is discarded. This is placed in the TTL field in the IP header of the transmitted - // packets. - // default = 64 - TimeToLive *uint32 `protobuf:"varint,4,opt,name=time_to_live,json=timeToLive,proto3,oneof" json:"time_to_live,omitempty"` - // The value to be used as a secret MD5 key for authentication. If not configured, MD5 - // authentication will not be enabled. - Md5Key *string `protobuf:"bytes,5,opt,name=md5_key,json=md5Key,proto3,oneof" json:"md5_key,omitempty"` - // If set to true, the local BGP peer will wait for the remote peer to initiate the - // BGP session - // by establishing the TCP connection, rather than initiating sessions from the local - // peer. + // IPv4 Traffic Engineering(TE) router id. This address should be configured as an IPv4 + // Loopback address in 'ipv4_loopbacks' in the Device. + Ipv4TeRouterId *string `protobuf:"bytes,1,opt,name=ipv4_te_router_id,json=ipv4TeRouterId,proto3,oneof" json:"ipv4_te_router_id,omitempty"` + // Host name for the router. The host name is transmitted in all the packets sent from + // the router. + Hostname *string `protobuf:"bytes,2,opt,name=hostname,proto3,oneof" json:"hostname,omitempty"` + // When set to true, it allows sending of more detailed metric information for the + // routes using 32-bit wide values using TLV 135 IP reachability and more detailed + // reachability information for IS reachability by using TLV 22. The detailed usage + // is described in RFC3784. + // default = True + EnableWideMetric *bool `protobuf:"varint,3,opt,name=enable_wide_metric,json=enableWideMetric,proto3,oneof" json:"enable_wide_metric,omitempty"` + // Configuration for controlling storage of ISIS learned LSPs are received from the + // neighbors. // default = False - PassiveMode *bool `protobuf:"varint,6,opt,name=passive_mode,json=passiveMode,proto3,oneof" json:"passive_mode,omitempty"` - // The TCP port number on which to accept BGP connections from the remote peer. - // default = 179 - ListenPort *uint32 `protobuf:"varint,7,opt,name=listen_port,json=listenPort,proto3,oneof" json:"listen_port,omitempty"` - // Destination TCP port number of the BGP peer when initiating a - // session from the local BGP peer. - // default = 179 - NeighborPort *uint32 `protobuf:"varint,8,opt,name=neighbor_port,json=neighborPort,proto3,oneof" json:"neighbor_port,omitempty"` + LearnedLspFilter *bool `protobuf:"varint,4,opt,name=learned_lsp_filter,json=learnedLspFilter,proto3,oneof" json:"learned_lsp_filter,omitempty"` } -func (x *BgpAdvanced) Reset() { - *x = BgpAdvanced{} +func (x *IsisBasic) Reset() { + *x = IsisBasic{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -29308,13 +31314,13 @@ func (x *BgpAdvanced) Reset() { } } -func (x *BgpAdvanced) String() string { +func (x *IsisBasic) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAdvanced) ProtoMessage() {} +func (*IsisBasic) ProtoMessage() {} -func (x *BgpAdvanced) ProtoReflect() protoreflect.Message { +func (x *IsisBasic) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[77] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -29326,164 +31332,86 @@ func (x *BgpAdvanced) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAdvanced.ProtoReflect.Descriptor instead. -func (*BgpAdvanced) Descriptor() ([]byte, []int) { +// Deprecated: Use IsisBasic.ProtoReflect.Descriptor instead. +func (*IsisBasic) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{77} } -func (x *BgpAdvanced) GetHoldTimeInterval() uint32 { - if x != nil && x.HoldTimeInterval != nil { - return *x.HoldTimeInterval - } - return 0 -} - -func (x *BgpAdvanced) GetKeepAliveInterval() uint32 { - if x != nil && x.KeepAliveInterval != nil { - return *x.KeepAliveInterval - } - return 0 -} - -func (x *BgpAdvanced) GetUpdateInterval() uint32 { - if x != nil && x.UpdateInterval != nil { - return *x.UpdateInterval - } - return 0 -} - -func (x *BgpAdvanced) GetTimeToLive() uint32 { - if x != nil && x.TimeToLive != nil { - return *x.TimeToLive +func (x *IsisBasic) GetIpv4TeRouterId() string { + if x != nil && x.Ipv4TeRouterId != nil { + return *x.Ipv4TeRouterId } - return 0 + return "" } -func (x *BgpAdvanced) GetMd5Key() string { - if x != nil && x.Md5Key != nil { - return *x.Md5Key +func (x *IsisBasic) GetHostname() string { + if x != nil && x.Hostname != nil { + return *x.Hostname } return "" } -func (x *BgpAdvanced) GetPassiveMode() bool { - if x != nil && x.PassiveMode != nil { - return *x.PassiveMode +func (x *IsisBasic) GetEnableWideMetric() bool { + if x != nil && x.EnableWideMetric != nil { + return *x.EnableWideMetric } return false } -func (x *BgpAdvanced) GetListenPort() uint32 { - if x != nil && x.ListenPort != nil { - return *x.ListenPort - } - return 0 -} - -func (x *BgpAdvanced) GetNeighborPort() uint32 { - if x != nil && x.NeighborPort != nil { - return *x.NeighborPort +func (x *IsisBasic) GetLearnedLspFilter() bool { + if x != nil && x.LearnedLspFilter != nil { + return *x.LearnedLspFilter } - return 0 + return false } -// Configuration for BGP capability settings. -type BgpCapability struct { +// Contains ISIS router advanced properties. +type IsisAdvanced struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Support for the IPv4 Unicast address family. - // default = True - Ipv4Unicast *bool `protobuf:"varint,1,opt,name=ipv4_unicast,json=ipv4Unicast,proto3,oneof" json:"ipv4_unicast,omitempty"` - // Support for the IPv4 Multicast address family. - // default = False - Ipv4Multicast *bool `protobuf:"varint,2,opt,name=ipv4_multicast,json=ipv4Multicast,proto3,oneof" json:"ipv4_multicast,omitempty"` - // Support for the IPv4 Unicast address family. + // It enables padding of Hello message to MTU size. // default = True - Ipv6Unicast *bool `protobuf:"varint,3,opt,name=ipv6_unicast,json=ipv6Unicast,proto3,oneof" json:"ipv6_unicast,omitempty"` - // Support for the IPv6 Multicast address family. - // default = False - Ipv6Multicast *bool `protobuf:"varint,4,opt,name=ipv6_multicast,json=ipv6Multicast,proto3,oneof" json:"ipv6_multicast,omitempty"` - // Support for VPLS as below. - // RFC4761 - Virtual Private LAN Service (VPLS) using BGP for Auto-Discovery - // and Signaling. - // RFC6624 - Layer 2 Virtual Private Networks using BGP for Auto-Discovery - // and Signaling. - // default = False - Vpls *bool `protobuf:"varint,5,opt,name=vpls,proto3,oneof" json:"vpls,omitempty"` - // Support for the route refresh capabilities. Route Refresh allows the dynamic exchange - // of route refresh requests and routing information between BGP peers and the subsequent - // re-advertisement of the outbound or inbound routing table. + EnableHelloPadding *bool `protobuf:"varint,1,opt,name=enable_hello_padding,json=enableHelloPadding,proto3,oneof" json:"enable_hello_padding,omitempty"` + // The Number of Area Addresses permitted, with a valid range from 0 to 254. A zero + // indicates a maximum of 3 addresses. + // default = 3 + MaxAreaAddresses *uint32 `protobuf:"varint,2,opt,name=max_area_addresses,json=maxAreaAddresses,proto3,oneof" json:"max_area_addresses,omitempty"` + // Its combination of the ISP and HO-DSP.Usually all nodes within an area have the + // same area address. If no area addresses are configured, a default area of 490001 + // will be advertised. + AreaAddresses []string `protobuf:"bytes,3,rep,name=area_addresses,json=areaAddresses,proto3" json:"area_addresses,omitempty"` + // The rate at which LSPs are re-sent in seconds. + // default = 600 + LspRefreshRate *uint32 `protobuf:"varint,4,opt,name=lsp_refresh_rate,json=lspRefreshRate,proto3,oneof" json:"lsp_refresh_rate,omitempty"` + // The MaxAge for retaining a learned LSP on this router in seconds. + // default = 1200 + LspLifetime *uint32 `protobuf:"varint,5,opt,name=lsp_lifetime,json=lspLifetime,proto3,oneof" json:"lsp_lifetime,omitempty"` + // The number of milliseconds between transmissions of Partial Sequence Number PDU. + // default = 2000 + PsnpInterval *uint32 `protobuf:"varint,6,opt,name=psnp_interval,json=psnpInterval,proto3,oneof" json:"psnp_interval,omitempty"` + // The number of milliseconds between transmissions of Partial Sequence Number PDU. + // default = 10000 + CsnpInterval *uint32 `protobuf:"varint,7,opt,name=csnp_interval,json=csnpInterval,proto3,oneof" json:"csnp_interval,omitempty"` + // The maximum size in bytes of any LSP that can be transmitted over a link of equal + // or less than maximum MTU size. + // default = 1492 + MaxLspSize *uint32 `protobuf:"varint,8,opt,name=max_lsp_size,json=maxLspSize,proto3,oneof" json:"max_lsp_size,omitempty"` + // The number of seconds between transmissions of LSPs/MGROUP-PDUs. + // default = 5000 + LspMgroupMinTransInterval *uint32 `protobuf:"varint,9,opt,name=lsp_mgroup_min_trans_interval,json=lspMgroupMinTransInterval,proto3,oneof" json:"lsp_mgroup_min_trans_interval,omitempty"` + // If the Attached bit is enabled, it indicates that the ISIS router is attached to + // another area or the Level 2 backbone. The purpose of an Attached-Bit is to accomplish + // Inter-Area Routing. When an L1/L2 router is connected to more than one area, it + // sets the Attached-bit on its L1 LSP. This can cause a default route ( 0.0.0.0/0 ) + // to be installed by the receiving router. // default = True - RouteRefresh *bool `protobuf:"varint,6,opt,name=route_refresh,json=routeRefresh,proto3,oneof" json:"route_refresh,omitempty"` - // Supports for the route constraint capabilities. Route Constraint allows the advertisement - // of Route Target Membership information. The BGP peers exchange Route Target Reachability - // Information, which is used to build a route distribution graph. This limits the - // propagation of VPN Network Layer Reachability Information (NLRI) between different - // autonomous systems or distinct clusters of the same autonomous system. This is supported - // for Layer 3 Virtual Private Network scenario. - // default = False - RouteConstraint *bool `protobuf:"varint,7,opt,name=route_constraint,json=routeConstraint,proto3,oneof" json:"route_constraint,omitempty"` - // Support for BGP Link State for ISIS and OSPF. - // default = False - LinkStateNonVpn *bool `protobuf:"varint,8,opt,name=link_state_non_vpn,json=linkStateNonVpn,proto3,oneof" json:"link_state_non_vpn,omitempty"` - // Capability advertisement of BGP Link State for VPNs. - // default = False - LinkStateVpn *bool `protobuf:"varint,9,opt,name=link_state_vpn,json=linkStateVpn,proto3,oneof" json:"link_state_vpn,omitempty"` - // Support for the EVPN address family. - // default = False - Evpn *bool `protobuf:"varint,10,opt,name=evpn,proto3,oneof" json:"evpn,omitempty"` - // Support for extended Next Hop Encoding for Nexthop field in IPv4 routes advertisement. - // This allows IPv4 routes being advertised by IPv6 peers to include an IPv6 Nexthop. - // default = False - ExtendedNextHopEncoding *bool `protobuf:"varint,11,opt,name=extended_next_hop_encoding,json=extendedNextHopEncoding,proto3,oneof" json:"extended_next_hop_encoding,omitempty"` - // Support for the IPv4 Multicast VPN address family. - // default = False - Ipv4MulticastVpn *bool `protobuf:"varint,12,opt,name=ipv4_multicast_vpn,json=ipv4MulticastVpn,proto3,oneof" json:"ipv4_multicast_vpn,omitempty"` - // Support for the IPv4 MPLS L3VPN address family. - // default = False - Ipv4MplsVpn *bool `protobuf:"varint,13,opt,name=ipv4_mpls_vpn,json=ipv4MplsVpn,proto3,oneof" json:"ipv4_mpls_vpn,omitempty"` - // Supports for IPv4 MDT address family messages. - // default = False - Ipv4Mdt *bool `protobuf:"varint,14,opt,name=ipv4_mdt,json=ipv4Mdt,proto3,oneof" json:"ipv4_mdt,omitempty"` - // Support for the IPv4 Multicast VPN address family. - // default = False - Ipv4MulticastMplsVpn *bool `protobuf:"varint,15,opt,name=ipv4_multicast_mpls_vpn,json=ipv4MulticastMplsVpn,proto3,oneof" json:"ipv4_multicast_mpls_vpn,omitempty"` - // Support for propagation of IPv4 unicast flow specification rules. - // default = False - Ipv4UnicastFlowSpec *bool `protobuf:"varint,16,opt,name=ipv4_unicast_flow_spec,json=ipv4UnicastFlowSpec,proto3,oneof" json:"ipv4_unicast_flow_spec,omitempty"` - // Support for IPv4 SRTE policy. - // default = False - Ipv4SrTePolicy *bool `protobuf:"varint,17,opt,name=ipv4_sr_te_policy,json=ipv4SrTePolicy,proto3,oneof" json:"ipv4_sr_te_policy,omitempty"` - // Support for IPv4 Unicast Add Path Capability. - // default = False - Ipv4UnicastAddPath *bool `protobuf:"varint,18,opt,name=ipv4_unicast_add_path,json=ipv4UnicastAddPath,proto3,oneof" json:"ipv4_unicast_add_path,omitempty"` - // Support for the IPv6 Multicast VPN address family. - // default = False - Ipv6MulticastVpn *bool `protobuf:"varint,19,opt,name=ipv6_multicast_vpn,json=ipv6MulticastVpn,proto3,oneof" json:"ipv6_multicast_vpn,omitempty"` - // Support for the IPv6 MPLS L3VPN address family. - // default = False - Ipv6MplsVpn *bool `protobuf:"varint,20,opt,name=ipv6_mpls_vpn,json=ipv6MplsVpn,proto3,oneof" json:"ipv6_mpls_vpn,omitempty"` - // Support for IPv6 MDT address family messages. - // default = False - Ipv6Mdt *bool `protobuf:"varint,21,opt,name=ipv6_mdt,json=ipv6Mdt,proto3,oneof" json:"ipv6_mdt,omitempty"` - // Support for the IPv6 Multicast VPN address family. - // default = False - Ipv6MulticastMplsVpn *bool `protobuf:"varint,22,opt,name=ipv6_multicast_mpls_vpn,json=ipv6MulticastMplsVpn,proto3,oneof" json:"ipv6_multicast_mpls_vpn,omitempty"` - // Support for propagation of IPv6 unicast flow specification rules. - // default = False - Ipv6UnicastFlowSpec *bool `protobuf:"varint,23,opt,name=ipv6_unicast_flow_spec,json=ipv6UnicastFlowSpec,proto3,oneof" json:"ipv6_unicast_flow_spec,omitempty"` - // Support for IPv6 SRTE policy. - // default = False - Ipv6SrTePolicy *bool `protobuf:"varint,24,opt,name=ipv6_sr_te_policy,json=ipv6SrTePolicy,proto3,oneof" json:"ipv6_sr_te_policy,omitempty"` - // Support for IPv6 Unicast Add Path Capability. - // default = False - Ipv6UnicastAddPath *bool `protobuf:"varint,25,opt,name=ipv6_unicast_add_path,json=ipv6UnicastAddPath,proto3,oneof" json:"ipv6_unicast_add_path,omitempty"` + EnableAttachedBit *bool `protobuf:"varint,10,opt,name=enable_attached_bit,json=enableAttachedBit,proto3,oneof" json:"enable_attached_bit,omitempty"` } -func (x *BgpCapability) Reset() { - *x = BgpCapability{} +func (x *IsisAdvanced) Reset() { + *x = IsisAdvanced{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -29491,13 +31419,13 @@ func (x *BgpCapability) Reset() { } } -func (x *BgpCapability) String() string { +func (x *IsisAdvanced) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpCapability) ProtoMessage() {} +func (*IsisAdvanced) ProtoMessage() {} -func (x *BgpCapability) ProtoReflect() protoreflect.Message { +func (x *IsisAdvanced) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[78] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -29509,220 +31437,183 @@ func (x *BgpCapability) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpCapability.ProtoReflect.Descriptor instead. -func (*BgpCapability) Descriptor() ([]byte, []int) { +// Deprecated: Use IsisAdvanced.ProtoReflect.Descriptor instead. +func (*IsisAdvanced) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{78} } -func (x *BgpCapability) GetIpv4Unicast() bool { - if x != nil && x.Ipv4Unicast != nil { - return *x.Ipv4Unicast +func (x *IsisAdvanced) GetEnableHelloPadding() bool { + if x != nil && x.EnableHelloPadding != nil { + return *x.EnableHelloPadding } return false } -func (x *BgpCapability) GetIpv4Multicast() bool { - if x != nil && x.Ipv4Multicast != nil { - return *x.Ipv4Multicast +func (x *IsisAdvanced) GetMaxAreaAddresses() uint32 { + if x != nil && x.MaxAreaAddresses != nil { + return *x.MaxAreaAddresses } - return false + return 0 } -func (x *BgpCapability) GetIpv6Unicast() bool { - if x != nil && x.Ipv6Unicast != nil { - return *x.Ipv6Unicast +func (x *IsisAdvanced) GetAreaAddresses() []string { + if x != nil { + return x.AreaAddresses } - return false + return nil } -func (x *BgpCapability) GetIpv6Multicast() bool { - if x != nil && x.Ipv6Multicast != nil { - return *x.Ipv6Multicast +func (x *IsisAdvanced) GetLspRefreshRate() uint32 { + if x != nil && x.LspRefreshRate != nil { + return *x.LspRefreshRate } - return false + return 0 } -func (x *BgpCapability) GetVpls() bool { - if x != nil && x.Vpls != nil { - return *x.Vpls +func (x *IsisAdvanced) GetLspLifetime() uint32 { + if x != nil && x.LspLifetime != nil { + return *x.LspLifetime } - return false + return 0 } -func (x *BgpCapability) GetRouteRefresh() bool { - if x != nil && x.RouteRefresh != nil { - return *x.RouteRefresh - } - return false -} - -func (x *BgpCapability) GetRouteConstraint() bool { - if x != nil && x.RouteConstraint != nil { - return *x.RouteConstraint - } - return false -} - -func (x *BgpCapability) GetLinkStateNonVpn() bool { - if x != nil && x.LinkStateNonVpn != nil { - return *x.LinkStateNonVpn - } - return false -} - -func (x *BgpCapability) GetLinkStateVpn() bool { - if x != nil && x.LinkStateVpn != nil { - return *x.LinkStateVpn - } - return false -} - -func (x *BgpCapability) GetEvpn() bool { - if x != nil && x.Evpn != nil { - return *x.Evpn - } - return false -} - -func (x *BgpCapability) GetExtendedNextHopEncoding() bool { - if x != nil && x.ExtendedNextHopEncoding != nil { - return *x.ExtendedNextHopEncoding +func (x *IsisAdvanced) GetPsnpInterval() uint32 { + if x != nil && x.PsnpInterval != nil { + return *x.PsnpInterval } - return false + return 0 } -func (x *BgpCapability) GetIpv4MulticastVpn() bool { - if x != nil && x.Ipv4MulticastVpn != nil { - return *x.Ipv4MulticastVpn +func (x *IsisAdvanced) GetCsnpInterval() uint32 { + if x != nil && x.CsnpInterval != nil { + return *x.CsnpInterval } - return false + return 0 } -func (x *BgpCapability) GetIpv4MplsVpn() bool { - if x != nil && x.Ipv4MplsVpn != nil { - return *x.Ipv4MplsVpn +func (x *IsisAdvanced) GetMaxLspSize() uint32 { + if x != nil && x.MaxLspSize != nil { + return *x.MaxLspSize } - return false + return 0 } -func (x *BgpCapability) GetIpv4Mdt() bool { - if x != nil && x.Ipv4Mdt != nil { - return *x.Ipv4Mdt +func (x *IsisAdvanced) GetLspMgroupMinTransInterval() uint32 { + if x != nil && x.LspMgroupMinTransInterval != nil { + return *x.LspMgroupMinTransInterval } - return false + return 0 } -func (x *BgpCapability) GetIpv4MulticastMplsVpn() bool { - if x != nil && x.Ipv4MulticastMplsVpn != nil { - return *x.Ipv4MulticastMplsVpn +func (x *IsisAdvanced) GetEnableAttachedBit() bool { + if x != nil && x.EnableAttachedBit != nil { + return *x.EnableAttachedBit } return false } -func (x *BgpCapability) GetIpv4UnicastFlowSpec() bool { - if x != nil && x.Ipv4UnicastFlowSpec != nil { - return *x.Ipv4UnicastFlowSpec - } - return false -} +// This contains ISIS Area/Domain authentication properties. +type IsisAuthentication struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *BgpCapability) GetIpv4SrTePolicy() bool { - if x != nil && x.Ipv4SrTePolicy != nil { - return *x.Ipv4SrTePolicy - } - return false + // Do not verify MD5 checksum in received LSPs. + // default = True + IgnoreReceiveMd5 *bool `protobuf:"varint,1,opt,name=ignore_receive_md5,json=ignoreReceiveMd5,proto3,oneof" json:"ignore_receive_md5,omitempty"` + // The Area authentication method used for the emulated ISIS router. + // This is used for L1 LSPs. + AreaAuth *IsisAuthenticationBase `protobuf:"bytes,2,opt,name=area_auth,json=areaAuth,proto3" json:"area_auth,omitempty"` + // The Domain authentication method used for the emulated ISIS router. + // This is used for L2 LSPs. + DomainAuth *IsisAuthenticationBase `protobuf:"bytes,3,opt,name=domain_auth,json=domainAuth,proto3" json:"domain_auth,omitempty"` } -func (x *BgpCapability) GetIpv4UnicastAddPath() bool { - if x != nil && x.Ipv4UnicastAddPath != nil { - return *x.Ipv4UnicastAddPath +func (x *IsisAuthentication) Reset() { + *x = IsisAuthentication{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return false } -func (x *BgpCapability) GetIpv6MulticastVpn() bool { - if x != nil && x.Ipv6MulticastVpn != nil { - return *x.Ipv6MulticastVpn - } - return false +func (x *IsisAuthentication) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *BgpCapability) GetIpv6MplsVpn() bool { - if x != nil && x.Ipv6MplsVpn != nil { - return *x.Ipv6MplsVpn - } - return false -} +func (*IsisAuthentication) ProtoMessage() {} -func (x *BgpCapability) GetIpv6Mdt() bool { - if x != nil && x.Ipv6Mdt != nil { - return *x.Ipv6Mdt +func (x *IsisAuthentication) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[79] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return false + return mi.MessageOf(x) } -func (x *BgpCapability) GetIpv6MulticastMplsVpn() bool { - if x != nil && x.Ipv6MulticastMplsVpn != nil { - return *x.Ipv6MulticastMplsVpn - } - return false +// Deprecated: Use IsisAuthentication.ProtoReflect.Descriptor instead. +func (*IsisAuthentication) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{79} } -func (x *BgpCapability) GetIpv6UnicastFlowSpec() bool { - if x != nil && x.Ipv6UnicastFlowSpec != nil { - return *x.Ipv6UnicastFlowSpec +func (x *IsisAuthentication) GetIgnoreReceiveMd5() bool { + if x != nil && x.IgnoreReceiveMd5 != nil { + return *x.IgnoreReceiveMd5 } return false } -func (x *BgpCapability) GetIpv6SrTePolicy() bool { - if x != nil && x.Ipv6SrTePolicy != nil { - return *x.Ipv6SrTePolicy +func (x *IsisAuthentication) GetAreaAuth() *IsisAuthenticationBase { + if x != nil { + return x.AreaAuth } - return false + return nil } -func (x *BgpCapability) GetIpv6UnicastAddPath() bool { - if x != nil && x.Ipv6UnicastAddPath != nil { - return *x.Ipv6UnicastAddPath +func (x *IsisAuthentication) GetDomainAuth() *IsisAuthenticationBase { + if x != nil { + return x.DomainAuth } - return false + return nil } -// Configuration for controlling storage of BGP learned information recieved from the -// peer. -type BgpLearnedInformationFilter struct { +// Optional container for ISIS authentication properties. +type IsisAuthenticationBase struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // If enabled, will store the information related to Unicast IPv4 Prefixes recieved - // from the peer. - // default = False - UnicastIpv4Prefix *bool `protobuf:"varint,1,opt,name=unicast_ipv4_prefix,json=unicastIpv4Prefix,proto3,oneof" json:"unicast_ipv4_prefix,omitempty"` - // If enabled, will store the information related to Unicast IPv6 Prefixes recieved - // from the peer. - // default = False - UnicastIpv6Prefix *bool `protobuf:"varint,2,opt,name=unicast_ipv6_prefix,json=unicastIpv6Prefix,proto3,oneof" json:"unicast_ipv6_prefix,omitempty"` + // The authentication method. + // required = true + AuthType *IsisAuthenticationBase_AuthType_Enum `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=otg.IsisAuthenticationBase_AuthType_Enum,oneof" json:"auth_type,omitempty"` + // Authentication as an MD5 key. + Md5 *string `protobuf:"bytes,2,opt,name=md5,proto3,oneof" json:"md5,omitempty"` + // Authentication as a clear text password. + Password *string `protobuf:"bytes,3,opt,name=password,proto3,oneof" json:"password,omitempty"` } -func (x *BgpLearnedInformationFilter) Reset() { - *x = BgpLearnedInformationFilter{} +func (x *IsisAuthenticationBase) Reset() { + *x = IsisAuthenticationBase{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[79] + mi := &file_otg_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpLearnedInformationFilter) String() string { +func (x *IsisAuthenticationBase) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpLearnedInformationFilter) ProtoMessage() {} +func (*IsisAuthenticationBase) ProtoMessage() {} -func (x *BgpLearnedInformationFilter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[79] +func (x *IsisAuthenticationBase) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[80] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -29733,125 +31624,98 @@ func (x *BgpLearnedInformationFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpLearnedInformationFilter.ProtoReflect.Descriptor instead. -func (*BgpLearnedInformationFilter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{79} +// Deprecated: Use IsisAuthenticationBase.ProtoReflect.Descriptor instead. +func (*IsisAuthenticationBase) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{80} } -func (x *BgpLearnedInformationFilter) GetUnicastIpv4Prefix() bool { - if x != nil && x.UnicastIpv4Prefix != nil { - return *x.UnicastIpv4Prefix +func (x *IsisAuthenticationBase) GetAuthType() IsisAuthenticationBase_AuthType_Enum { + if x != nil && x.AuthType != nil { + return *x.AuthType } - return false + return IsisAuthenticationBase_AuthType_unspecified } -func (x *BgpLearnedInformationFilter) GetUnicastIpv6Prefix() bool { - if x != nil && x.UnicastIpv6Prefix != nil { - return *x.UnicastIpv6Prefix +func (x *IsisAuthenticationBase) GetMd5() string { + if x != nil && x.Md5 != nil { + return *x.Md5 } - return false + return "" } -// Emulated BGPv4 route range. -type BgpV4RouteRange struct { +func (x *IsisAuthenticationBase) GetPassword() string { + if x != nil && x.Password != nil { + return *x.Password + } + return "" +} + +// Emulated ISIS IPv4 routes. +type IsisV4RouteRange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // A list of group of IPv4 route addresses. Addresses []*V4RouteAddress `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` - // Specify the NextHop in MP REACH NLRI. The mode for setting the IP address of the - // NextHop in the MP REACH NLRI can be one of the following: - // Local IP: Automatically fills the Nexthop with the Local IP of the BGP - // peer. - // If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. - // Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. - // default = NextHopMode.Enum.local_ip - NextHopMode *BgpV4RouteRange_NextHopMode_Enum `protobuf:"varint,2,opt,name=next_hop_mode,json=nextHopMode,proto3,enum=otg.BgpV4RouteRange_NextHopMode_Enum,oneof" json:"next_hop_mode,omitempty"` - // If the Nexthop Mode is Manual, it sets the type of the NextHop IP address. - // default = NextHopAddressType.Enum.ipv4 - NextHopAddressType *BgpV4RouteRange_NextHopAddressType_Enum `protobuf:"varint,3,opt,name=next_hop_address_type,json=nextHopAddressType,proto3,enum=otg.BgpV4RouteRange_NextHopAddressType_Enum,oneof" json:"next_hop_address_type,omitempty"` - // The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type - // is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. - // default = 0.0.0.0 - NextHopIpv4Address *string `protobuf:"bytes,4,opt,name=next_hop_ipv4_address,json=nextHopIpv4Address,proto3,oneof" json:"next_hop_ipv4_address,omitempty"` - // The IPv6 address of the next hop if the Nexthop Mode is manual and the Nexthop type - // is IPv6. - // default = ::0 - NextHopIpv6Address *string `protobuf:"bytes,5,opt,name=next_hop_ipv6_address,json=nextHopIpv6Address,proto3,oneof" json:"next_hop_ipv6_address,omitempty"` - // Description missing in models - Advanced *BgpRouteAdvanced `protobuf:"bytes,6,opt,name=advanced,proto3" json:"advanced,omitempty"` - // Optional community settings. - Communities []*BgpCommunity `protobuf:"bytes,7,rep,name=communities,proto3" json:"communities,omitempty"` - // Description missing in models - AsPath *BgpAsPath `protobuf:"bytes,8,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` - // Description missing in models - AddPath *BgpAddPath `protobuf:"bytes,9,opt,name=add_path,json=addPath,proto3" json:"add_path,omitempty"` + // The user-defined metric associated with this route range. + // default = 0 + LinkMetric *uint32 `protobuf:"varint,2,opt,name=link_metric,json=linkMetric,proto3,oneof" json:"link_metric,omitempty"` + // The origin of the advertised route-internal or external to the ISIS area. Options + // include the following: + // Internal-for intra-area routes, through Level 1 LSPs. + // External-for inter-area routes redistributed within L1, through Level + // 1 LSPs. + // default = OriginType.Enum.internal + OriginType *IsisV4RouteRange_OriginType_Enum `protobuf:"varint,3,opt,name=origin_type,json=originType,proto3,enum=otg.IsisV4RouteRange_OriginType_Enum,oneof" json:"origin_type,omitempty"` + // Defines the Up/Down (Redistribution) bit defined for TLVs 128 and 130 by RFC 2966. + // It is used for domain-wide advertisement of prefix information. + // + // Up (0)-used when a prefix is initially advertised within the ISIS L3 + // hierarchy, + // and for all other prefixes in L1 and L2 LSPs. (default) + // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. + // + // The prefixes are being advertised from a higher level (L2) down to a lower level + // (L1). + // default = RedistributionType.Enum.up + RedistributionType *IsisV4RouteRange_RedistributionType_Enum `protobuf:"varint,4,opt,name=redistribution_type,json=redistributionType,proto3,enum=otg.IsisV4RouteRange_RedistributionType_Enum,oneof" json:"redistribution_type,omitempty"` // Globally unique name of an object. It also serves as the primary key for arrays of // objects. // required = true - Name *string `protobuf:"bytes,10,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Deprecated: This property is deprecated in favor of property extended_communities - // - // Deprecated: This property is deprecated in favor of property extended_communities - // - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. Note evpn type is defined mainly for use with evpn - // route updates and not for IPv4 and IPv6 route updates. - ExtCommunities []*BgpExtCommunity `protobuf:"bytes,11,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an eight byte value. It - // is divided into two main parts. The first two bytes of the community encode a type - // and sub-type fields and the last six bytes carry a unique set of data in a format - // defined by the type and sub-type field. Extended communities provide a larger range - // for grouping or categorizing communities. - ExtendedCommunities []*BgpExtendedCommunity `protobuf:"bytes,12,rep,name=extended_communities,json=extendedCommunities,proto3" json:"extended_communities,omitempty"` + Name *string `protobuf:"bytes,5,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability Attribute Flags + // will be advertised or not. + // default = False + PrefixAttrEnabled *bool `protobuf:"varint,6,opt,name=prefix_attr_enabled,json=prefixAttrEnabled,proto3,oneof" json:"prefix_attr_enabled,omitempty"` + // External Prefix Flag (Bit 0) + // default = False + XFlag *bool `protobuf:"varint,7,opt,name=x_flag,json=xFlag,proto3,oneof" json:"x_flag,omitempty"` + // Re-advertisement Flag (Bit 1) + // default = False + RFlag *bool `protobuf:"varint,8,opt,name=r_flag,json=rFlag,proto3,oneof" json:"r_flag,omitempty"` + // Node Flag (Bit 2) + // default = False + NFlag *bool `protobuf:"varint,9,opt,name=n_flag,json=nFlag,proto3,oneof" json:"n_flag,omitempty"` } -func (x *BgpV4RouteRange) Reset() { - *x = BgpV4RouteRange{} +func (x *IsisV4RouteRange) Reset() { + *x = IsisV4RouteRange{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[80] + mi := &file_otg_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV4RouteRange) String() string { +func (x *IsisV4RouteRange) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV4RouteRange) ProtoMessage() {} +func (*IsisV4RouteRange) ProtoMessage() {} -func (x *BgpV4RouteRange) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[80] +func (x *IsisV4RouteRange) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[81] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -29862,181 +31726,97 @@ func (x *BgpV4RouteRange) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV4RouteRange.ProtoReflect.Descriptor instead. -func (*BgpV4RouteRange) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{80} +// Deprecated: Use IsisV4RouteRange.ProtoReflect.Descriptor instead. +func (*IsisV4RouteRange) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{81} } -func (x *BgpV4RouteRange) GetAddresses() []*V4RouteAddress { +func (x *IsisV4RouteRange) GetAddresses() []*V4RouteAddress { if x != nil { return x.Addresses } return nil } -func (x *BgpV4RouteRange) GetNextHopMode() BgpV4RouteRange_NextHopMode_Enum { - if x != nil && x.NextHopMode != nil { - return *x.NextHopMode - } - return BgpV4RouteRange_NextHopMode_unspecified -} - -func (x *BgpV4RouteRange) GetNextHopAddressType() BgpV4RouteRange_NextHopAddressType_Enum { - if x != nil && x.NextHopAddressType != nil { - return *x.NextHopAddressType - } - return BgpV4RouteRange_NextHopAddressType_unspecified -} - -func (x *BgpV4RouteRange) GetNextHopIpv4Address() string { - if x != nil && x.NextHopIpv4Address != nil { - return *x.NextHopIpv4Address - } - return "" -} - -func (x *BgpV4RouteRange) GetNextHopIpv6Address() string { - if x != nil && x.NextHopIpv6Address != nil { - return *x.NextHopIpv6Address - } - return "" -} - -func (x *BgpV4RouteRange) GetAdvanced() *BgpRouteAdvanced { - if x != nil { - return x.Advanced - } - return nil -} - -func (x *BgpV4RouteRange) GetCommunities() []*BgpCommunity { - if x != nil { - return x.Communities +func (x *IsisV4RouteRange) GetLinkMetric() uint32 { + if x != nil && x.LinkMetric != nil { + return *x.LinkMetric } - return nil + return 0 } -func (x *BgpV4RouteRange) GetAsPath() *BgpAsPath { - if x != nil { - return x.AsPath +func (x *IsisV4RouteRange) GetOriginType() IsisV4RouteRange_OriginType_Enum { + if x != nil && x.OriginType != nil { + return *x.OriginType } - return nil + return IsisV4RouteRange_OriginType_unspecified } -func (x *BgpV4RouteRange) GetAddPath() *BgpAddPath { - if x != nil { - return x.AddPath +func (x *IsisV4RouteRange) GetRedistributionType() IsisV4RouteRange_RedistributionType_Enum { + if x != nil && x.RedistributionType != nil { + return *x.RedistributionType } - return nil + return IsisV4RouteRange_RedistributionType_unspecified } -func (x *BgpV4RouteRange) GetName() string { +func (x *IsisV4RouteRange) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *BgpV4RouteRange) GetExtCommunities() []*BgpExtCommunity { - if x != nil { - return x.ExtCommunities - } - return nil -} - -func (x *BgpV4RouteRange) GetExtendedCommunities() []*BgpExtendedCommunity { - if x != nil { - return x.ExtendedCommunities +func (x *IsisV4RouteRange) GetPrefixAttrEnabled() bool { + if x != nil && x.PrefixAttrEnabled != nil { + return *x.PrefixAttrEnabled } - return nil -} - -// The BGP Additional Paths feature is a BGP extension that allows the advertisement -// of multiple paths for the same prefix without the new paths implicitly replacing -// any previous paths. -type BgpAddPath struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The id of the additional path. - // default = 1 - PathId *uint32 `protobuf:"varint,1,opt,name=path_id,json=pathId,proto3,oneof" json:"path_id,omitempty"` + return false } -func (x *BgpAddPath) Reset() { - *x = BgpAddPath{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *IsisV4RouteRange) GetXFlag() bool { + if x != nil && x.XFlag != nil { + return *x.XFlag } + return false } -func (x *BgpAddPath) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BgpAddPath) ProtoMessage() {} - -func (x *BgpAddPath) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *IsisV4RouteRange) GetRFlag() bool { + if x != nil && x.RFlag != nil { + return *x.RFlag } - return mi.MessageOf(x) -} - -// Deprecated: Use BgpAddPath.ProtoReflect.Descriptor instead. -func (*BgpAddPath) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{81} + return false } -func (x *BgpAddPath) GetPathId() uint32 { - if x != nil && x.PathId != nil { - return *x.PathId +func (x *IsisV4RouteRange) GetNFlag() bool { + if x != nil && x.NFlag != nil { + return *x.NFlag } - return 0 + return false } -// The Extended Communities Attribute is a optional BGP attribute,defined in RFC4360 -// with the Type Code 16. Community and Extended Communities attributes are utilized -// to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. -// An extended community is an 8-Bytes value.It is divided into two main parts. The -// first 2 Bytes of the community encode a type and optonal sub-type field. The last -// 6 bytes (or 7 bytes for types without a sub-type) carry a unique set of data in a -// format defined by the type and optional sub-type field. Extended communities provide -// a larger range for grouping or categorizing communities. -type BgpExtendedCommunity struct { +// A container for IPv4 route addresses. +type V4RouteAddress struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.transitive_2octet_as_type - Choice *BgpExtendedCommunity_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpExtendedCommunity_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Transitive_2OctetAsType *BgpExtendedCommunityTransitive2OctetAsType `protobuf:"bytes,2,opt,name=transitive_2octet_as_type,json=transitive2octetAsType,proto3" json:"transitive_2octet_as_type,omitempty"` - // Description missing in models - TransitiveIpv4AddressType *BgpExtendedCommunityTransitiveIpv4AddressType `protobuf:"bytes,3,opt,name=transitive_ipv4_address_type,json=transitiveIpv4AddressType,proto3" json:"transitive_ipv4_address_type,omitempty"` - // Description missing in models - Transitive_4OctetAsType *BgpExtendedCommunityTransitive4OctetAsType `protobuf:"bytes,4,opt,name=transitive_4octet_as_type,json=transitive4octetAsType,proto3" json:"transitive_4octet_as_type,omitempty"` - // Description missing in models - TransitiveOpaqueType *BgpExtendedCommunityTransitiveOpaqueType `protobuf:"bytes,5,opt,name=transitive_opaque_type,json=transitiveOpaqueType,proto3" json:"transitive_opaque_type,omitempty"` - // Description missing in models - TransitiveEvpnType *BgpExtendedCommunityTransitiveEvpnType `protobuf:"bytes,6,opt,name=transitive_evpn_type,json=transitiveEvpnType,proto3" json:"transitive_evpn_type,omitempty"` - // Description missing in models - NonTransitive_2OctetAsType *BgpExtendedCommunityNonTransitive2OctetAsType `protobuf:"bytes,7,opt,name=non_transitive_2octet_as_type,json=nonTransitive2octetAsType,proto3" json:"non_transitive_2octet_as_type,omitempty"` - // Description missing in models - Custom *BgpExtendedCommunityCustomType `protobuf:"bytes,8,opt,name=custom,proto3" json:"custom,omitempty"` + // The starting address of the network. + // required = true + Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` + // The IPv4 network prefix length to be applied to the address. + // default = 24 + Prefix *uint32 `protobuf:"varint,2,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` + // The total number of addresses in the range. + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Increments the network address prefixes within a route range where multiple routes + // are present. The value is incremented according to the Prefix Length and Step. + // default = 1 + Step *uint32 `protobuf:"varint,4,opt,name=step,proto3,oneof" json:"step,omitempty"` } -func (x *BgpExtendedCommunity) Reset() { - *x = BgpExtendedCommunity{} +func (x *V4RouteAddress) Reset() { + *x = V4RouteAddress{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30044,13 +31824,13 @@ func (x *BgpExtendedCommunity) Reset() { } } -func (x *BgpExtendedCommunity) String() string { +func (x *V4RouteAddress) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunity) ProtoMessage() {} +func (*V4RouteAddress) ProtoMessage() {} -func (x *BgpExtendedCommunity) ProtoReflect() protoreflect.Message { +func (x *V4RouteAddress) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[82] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30062,87 +31842,62 @@ func (x *BgpExtendedCommunity) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunity.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunity) Descriptor() ([]byte, []int) { +// Deprecated: Use V4RouteAddress.ProtoReflect.Descriptor instead. +func (*V4RouteAddress) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{82} } -func (x *BgpExtendedCommunity) GetChoice() BgpExtendedCommunity_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return BgpExtendedCommunity_Choice_unspecified -} - -func (x *BgpExtendedCommunity) GetTransitive_2OctetAsType() *BgpExtendedCommunityTransitive2OctetAsType { - if x != nil { - return x.Transitive_2OctetAsType - } - return nil -} - -func (x *BgpExtendedCommunity) GetTransitiveIpv4AddressType() *BgpExtendedCommunityTransitiveIpv4AddressType { - if x != nil { - return x.TransitiveIpv4AddressType - } - return nil -} - -func (x *BgpExtendedCommunity) GetTransitive_4OctetAsType() *BgpExtendedCommunityTransitive4OctetAsType { - if x != nil { - return x.Transitive_4OctetAsType - } - return nil -} - -func (x *BgpExtendedCommunity) GetTransitiveOpaqueType() *BgpExtendedCommunityTransitiveOpaqueType { - if x != nil { - return x.TransitiveOpaqueType +func (x *V4RouteAddress) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address } - return nil + return "" } -func (x *BgpExtendedCommunity) GetTransitiveEvpnType() *BgpExtendedCommunityTransitiveEvpnType { - if x != nil { - return x.TransitiveEvpnType +func (x *V4RouteAddress) GetPrefix() uint32 { + if x != nil && x.Prefix != nil { + return *x.Prefix } - return nil + return 0 } -func (x *BgpExtendedCommunity) GetNonTransitive_2OctetAsType() *BgpExtendedCommunityNonTransitive2OctetAsType { - if x != nil { - return x.NonTransitive_2OctetAsType +func (x *V4RouteAddress) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count } - return nil + return 0 } -func (x *BgpExtendedCommunity) GetCustom() *BgpExtendedCommunityCustomType { - if x != nil { - return x.Custom +func (x *V4RouteAddress) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step } - return nil + return 0 } -// The Route Target Community identifies one or more routers that may receive a set -// of routes (that carry this Community) carried by BGP. It is sent with sub-type as -// 0x02. -type BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget struct { +// A container for IPv6 route addresses. +type V6RouteAddress struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The two octet IANA assigned AS value assigned to the Autonomous System. - // default = 100 - Global_2ByteAs *uint32 `protobuf:"varint,1,opt,name=global_2byte_as,json=global2byteAs,proto3,oneof" json:"global_2byte_as,omitempty"` - // The Local Administrator sub-field contains a number from a numbering space that is - // administered by the organization to which the Autonomous System number carried in - // the Global Administrator sub-field has been assigned by an appropriate authority. + // The starting address of the network. + // required = true + Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` + // The IPv6 network prefix length to be applied to the address. + // default = 64 + Prefix *uint32 `protobuf:"varint,2,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` + // The total number of addresses in the range. // default = 1 - Local_4ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_4byte_admin,json=local4byteAdmin,proto3,oneof" json:"local_4byte_admin,omitempty"` + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Increments the network address prefixes within a route range where multiple routes + // are present. The value is incremented according to the Prefix Length and Step. + // default = 1 + Step *uint32 `protobuf:"varint,4,opt,name=step,proto3,oneof" json:"step,omitempty"` } -func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) Reset() { - *x = BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget{} +func (x *V6RouteAddress) Reset() { + *x = V6RouteAddress{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30150,13 +31905,13 @@ func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) Reset() { } } -func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) String() string { +func (x *V6RouteAddress) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) ProtoMessage() {} +func (*V6RouteAddress) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) ProtoReflect() protoreflect.Message { +func (x *V6RouteAddress) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[83] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30168,44 +31923,62 @@ func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) Descriptor() ([]byte, []int) { +// Deprecated: Use V6RouteAddress.ProtoReflect.Descriptor instead. +func (*V6RouteAddress) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{83} } -func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) GetGlobal_2ByteAs() uint32 { - if x != nil && x.Global_2ByteAs != nil { - return *x.Global_2ByteAs +func (x *V6RouteAddress) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address + } + return "" +} + +func (x *V6RouteAddress) GetPrefix() uint32 { + if x != nil && x.Prefix != nil { + return *x.Prefix } return 0 } -func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) GetLocal_4ByteAdmin() uint32 { - if x != nil && x.Local_4ByteAdmin != nil { - return *x.Local_4ByteAdmin +func (x *V6RouteAddress) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count } return 0 } -// The Route Origin Community identifies one or more routers that inject a set of routes -// (that carry this Community) into BGP. It is sent with sub-type as 0x03 . -type BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin struct { +func (x *V6RouteAddress) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +// A container for MAC route addresses. +type MACRouteAddress struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The two octet IANA assigned AS value assigned to the Autonomous System. - // default = 100 - Global_2ByteAs *uint32 `protobuf:"varint,1,opt,name=global_2byte_as,json=global2byteAs,proto3,oneof" json:"global_2byte_as,omitempty"` - // The Local Administrator sub-field contains a number from a numbering space that is - // administered by the organization to which the Autonomous System number carried in - // the Global Administrator sub-field has been assigned by an appropriate authority. + // The starting address of the MAC Range. + // required = true + Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` + // The MAC prefix length to be applied to the address. + // default = 48 + Prefix *uint32 `protobuf:"varint,2,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` + // The total number of mac addresses in the range. // default = 1 - Local_4ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_4byte_admin,json=local4byteAdmin,proto3,oneof" json:"local_4byte_admin,omitempty"` + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Increments the mac address prefixes within a mac range where multiple routes are + // present. The value is incremented according to the mac prefix Length and Step. + // default = 1 + Step *uint32 `protobuf:"varint,4,opt,name=step,proto3,oneof" json:"step,omitempty"` } -func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Reset() { - *x = BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin{} +func (x *MACRouteAddress) Reset() { + *x = MACRouteAddress{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30213,13 +31986,13 @@ func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Reset() { } } -func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) String() string { +func (x *MACRouteAddress) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ProtoMessage() {} +func (*MACRouteAddress) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ProtoReflect() protoreflect.Message { +func (x *MACRouteAddress) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[84] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30231,42 +32004,90 @@ func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Descriptor() ([]byte, []int) { +// Deprecated: Use MACRouteAddress.ProtoReflect.Descriptor instead. +func (*MACRouteAddress) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{84} } -func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) GetGlobal_2ByteAs() uint32 { - if x != nil && x.Global_2ByteAs != nil { - return *x.Global_2ByteAs +func (x *MACRouteAddress) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address + } + return "" +} + +func (x *MACRouteAddress) GetPrefix() uint32 { + if x != nil && x.Prefix != nil { + return *x.Prefix } return 0 } -func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) GetLocal_4ByteAdmin() uint32 { - if x != nil && x.Local_4ByteAdmin != nil { - return *x.Local_4ByteAdmin +func (x *MACRouteAddress) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count } return 0 } -// The Transitive Two-Octet AS-Specific Extended Community is sent as type 0x00 . -type BgpExtendedCommunityTransitive2OctetAsType struct { +func (x *MACRouteAddress) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +// Emulated ISIS IPv6 routes. +type IsisV6RouteRange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.route_target_subtype - Choice *BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - RouteTargetSubtype *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget `protobuf:"bytes,2,opt,name=route_target_subtype,json=routeTargetSubtype,proto3" json:"route_target_subtype,omitempty"` - // Description missing in models - RouteOriginSubtype *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin `protobuf:"bytes,3,opt,name=route_origin_subtype,json=routeOriginSubtype,proto3" json:"route_origin_subtype,omitempty"` + // A list of group of IPv6 route addresses. + Addresses []*V6RouteAddress `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` + // The user-defined metric associated with this route range. + // default = 0 + LinkMetric *uint32 `protobuf:"varint,2,opt,name=link_metric,json=linkMetric,proto3,oneof" json:"link_metric,omitempty"` + // The origin of the advertised route-internal or external to the ISIS area. Options + // include the following: + // Internal-for intra-area routes, through Level 1 LSPs. + // External-for inter-area routes redistributed within L1, through Level + // 1 LSPs. + // default = OriginType.Enum.internal + OriginType *IsisV6RouteRange_OriginType_Enum `protobuf:"varint,3,opt,name=origin_type,json=originType,proto3,enum=otg.IsisV6RouteRange_OriginType_Enum,oneof" json:"origin_type,omitempty"` + // Defines the Up/Down (Redistribution) bit defined for TLVs 128 and 130 by RFC 2966. + // It is used for domain-wide advertisement of prefix information. + // + // Up (0)-used when a prefix is initially advertised within the ISIS L3 + // hierarchy, + // and for all other prefixes in L1 and L2 LSPs. (default) + // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. + // + // The prefixes are being advertised from a higher level (L2) down to a lower level + // (L1). + // default = RedistributionType.Enum.up + RedistributionType *IsisV6RouteRange_RedistributionType_Enum `protobuf:"varint,4,opt,name=redistribution_type,json=redistributionType,proto3,enum=otg.IsisV6RouteRange_RedistributionType_Enum,oneof" json:"redistribution_type,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,5,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability Attribute Flags + // will be advertised or not. + // default = False + PrefixAttrEnabled *bool `protobuf:"varint,6,opt,name=prefix_attr_enabled,json=prefixAttrEnabled,proto3,oneof" json:"prefix_attr_enabled,omitempty"` + // External Prefix Flag (Bit 0) + // default = False + XFlag *bool `protobuf:"varint,7,opt,name=x_flag,json=xFlag,proto3,oneof" json:"x_flag,omitempty"` + // Re-advertisement Flag (Bit 1) + // default = False + RFlag *bool `protobuf:"varint,8,opt,name=r_flag,json=rFlag,proto3,oneof" json:"r_flag,omitempty"` + // Node Flag (Bit 2) + // default = False + NFlag *bool `protobuf:"varint,9,opt,name=n_flag,json=nFlag,proto3,oneof" json:"n_flag,omitempty"` } -func (x *BgpExtendedCommunityTransitive2OctetAsType) Reset() { - *x = BgpExtendedCommunityTransitive2OctetAsType{} +func (x *IsisV6RouteRange) Reset() { + *x = IsisV6RouteRange{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30274,13 +32095,13 @@ func (x *BgpExtendedCommunityTransitive2OctetAsType) Reset() { } } -func (x *BgpExtendedCommunityTransitive2OctetAsType) String() string { +func (x *IsisV6RouteRange) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitive2OctetAsType) ProtoMessage() {} +func (*IsisV6RouteRange) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitive2OctetAsType) ProtoReflect() protoreflect.Message { +func (x *IsisV6RouteRange) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[85] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30292,51 +32113,94 @@ func (x *BgpExtendedCommunityTransitive2OctetAsType) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitive2OctetAsType.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitive2OctetAsType) Descriptor() ([]byte, []int) { +// Deprecated: Use IsisV6RouteRange.ProtoReflect.Descriptor instead. +func (*IsisV6RouteRange) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{85} } -func (x *BgpExtendedCommunityTransitive2OctetAsType) GetChoice() BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *IsisV6RouteRange) GetAddresses() []*V6RouteAddress { + if x != nil { + return x.Addresses } - return BgpExtendedCommunityTransitive2OctetAsType_Choice_unspecified + return nil } -func (x *BgpExtendedCommunityTransitive2OctetAsType) GetRouteTargetSubtype() *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget { - if x != nil { - return x.RouteTargetSubtype +func (x *IsisV6RouteRange) GetLinkMetric() uint32 { + if x != nil && x.LinkMetric != nil { + return *x.LinkMetric } - return nil + return 0 } -func (x *BgpExtendedCommunityTransitive2OctetAsType) GetRouteOriginSubtype() *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin { - if x != nil { - return x.RouteOriginSubtype +func (x *IsisV6RouteRange) GetOriginType() IsisV6RouteRange_OriginType_Enum { + if x != nil && x.OriginType != nil { + return *x.OriginType } - return nil + return IsisV6RouteRange_OriginType_unspecified } -// The Route Origin Community identifies one or more routers that inject a set of routes -// (that carry this Community) into BGP It is sent with sub-type as 0x03. -type BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin struct { +func (x *IsisV6RouteRange) GetRedistributionType() IsisV6RouteRange_RedistributionType_Enum { + if x != nil && x.RedistributionType != nil { + return *x.RedistributionType + } + return IsisV6RouteRange_RedistributionType_unspecified +} + +func (x *IsisV6RouteRange) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *IsisV6RouteRange) GetPrefixAttrEnabled() bool { + if x != nil && x.PrefixAttrEnabled != nil { + return *x.PrefixAttrEnabled + } + return false +} + +func (x *IsisV6RouteRange) GetXFlag() bool { + if x != nil && x.XFlag != nil { + return *x.XFlag + } + return false +} + +func (x *IsisV6RouteRange) GetRFlag() bool { + if x != nil && x.RFlag != nil { + return *x.RFlag + } + return false +} + +func (x *IsisV6RouteRange) GetNFlag() bool { + if x != nil && x.NFlag != nil { + return *x.NFlag + } + return false +} + +// Configuration for one or more IPv4 or IPv6 BGP peers. +type DeviceBgpRouter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // An IPv4 unicast address assigned by one of the Internet registries. - // default = 0.0.0.0 - GlobalIpv4Admin *string `protobuf:"bytes,1,opt,name=global_ipv4_admin,json=globalIpv4Admin,proto3,oneof" json:"global_ipv4_admin,omitempty"` - // The Local Administrator sub-field contains a number from a numbering space that is - // administered by the organization to which the IP address carried in the Global Administrator - // sub-field has been assigned by an appropriate authority. - // default = 1 - Local_2ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_2byte_admin,json=local2byteAdmin,proto3,oneof" json:"local_2byte_admin,omitempty"` + // The BGP router ID is a unique identifier used by BGP. It is a 32-bit value that is + // often represented by an IPv4 address. + // required = true + RouterId *string `protobuf:"bytes,1,opt,name=router_id,json=routerId,proto3,oneof" json:"router_id,omitempty"` + // This contains an array of references to IPv4 interfaces, each of which will have + // list of peers to different destinations. + Ipv4Interfaces []*BgpV4Interface `protobuf:"bytes,2,rep,name=ipv4_interfaces,json=ipv4Interfaces,proto3" json:"ipv4_interfaces,omitempty"` + // This contains an array of references to IPv6 interfaces, each of which will have + // list of peers to different destinations. + Ipv6Interfaces []*BgpV6Interface `protobuf:"bytes,3,rep,name=ipv6_interfaces,json=ipv6Interfaces,proto3" json:"ipv6_interfaces,omitempty"` } -func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Reset() { - *x = BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin{} +func (x *DeviceBgpRouter) Reset() { + *x = DeviceBgpRouter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30344,13 +32208,13 @@ func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Reset() { } } -func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) String() string { +func (x *DeviceBgpRouter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ProtoMessage() {} +func (*DeviceBgpRouter) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ProtoReflect() protoreflect.Message { +func (x *DeviceBgpRouter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[86] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30362,45 +32226,48 @@ func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ProtoReflect( return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceBgpRouter.ProtoReflect.Descriptor instead. +func (*DeviceBgpRouter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{86} } -func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) GetGlobalIpv4Admin() string { - if x != nil && x.GlobalIpv4Admin != nil { - return *x.GlobalIpv4Admin +func (x *DeviceBgpRouter) GetRouterId() string { + if x != nil && x.RouterId != nil { + return *x.RouterId } return "" } -func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) GetLocal_2ByteAdmin() uint32 { - if x != nil && x.Local_2ByteAdmin != nil { - return *x.Local_2ByteAdmin +func (x *DeviceBgpRouter) GetIpv4Interfaces() []*BgpV4Interface { + if x != nil { + return x.Ipv4Interfaces } - return 0 + return nil } -// The Route Target Community identifies one or more routers that may receive a set -// of routes (that carry this Community) carried by BGP. It is sent with sub-type as -// 0x02. -type BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget struct { +func (x *DeviceBgpRouter) GetIpv6Interfaces() []*BgpV6Interface { + if x != nil { + return x.Ipv6Interfaces + } + return nil +} + +// All errors detected while processing the Message Header are indicated by sending +// the NOTIFICATION message with the Error Code-Message Header Error. The Error Subcode +// elaborates on the specific nature of the error. +type DeviceBgpMessageHeaderError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // An IPv4 unicast address assigned by one of the Internet registries. - // default = 0.0.0.0 - GlobalIpv4Admin *string `protobuf:"bytes,1,opt,name=global_ipv4_admin,json=globalIpv4Admin,proto3,oneof" json:"global_ipv4_admin,omitempty"` - // The Local Administrator sub-field contains a number from a numbering space that is - // administered by the organization to which the IP address carried in the Global Administrator - // sub-field has been assigned by an appropriate authority. - // default = 1 - Local_2ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_2byte_admin,json=local2byteAdmin,proto3,oneof" json:"local_2byte_admin,omitempty"` + // The Error Subcode indicates the specific type of error encountered during Message + // Header processing. + // default = Subcode.Enum.connection_not_synchronized_code1_subcode1 + Subcode *DeviceBgpMessageHeaderError_Subcode_Enum `protobuf:"varint,1,opt,name=subcode,proto3,enum=otg.DeviceBgpMessageHeaderError_Subcode_Enum,oneof" json:"subcode,omitempty"` } -func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Reset() { - *x = BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget{} +func (x *DeviceBgpMessageHeaderError) Reset() { + *x = DeviceBgpMessageHeaderError{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30408,13 +32275,13 @@ func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Reset() { } } -func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) String() string { +func (x *DeviceBgpMessageHeaderError) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ProtoMessage() {} +func (*DeviceBgpMessageHeaderError) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ProtoReflect() protoreflect.Message { +func (x *DeviceBgpMessageHeaderError) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[87] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30426,42 +32293,34 @@ func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ProtoReflect( return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceBgpMessageHeaderError.ProtoReflect.Descriptor instead. +func (*DeviceBgpMessageHeaderError) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{87} } -func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) GetGlobalIpv4Admin() string { - if x != nil && x.GlobalIpv4Admin != nil { - return *x.GlobalIpv4Admin - } - return "" -} - -func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) GetLocal_2ByteAdmin() uint32 { - if x != nil && x.Local_2ByteAdmin != nil { - return *x.Local_2ByteAdmin +func (x *DeviceBgpMessageHeaderError) GetSubcode() DeviceBgpMessageHeaderError_Subcode_Enum { + if x != nil && x.Subcode != nil { + return *x.Subcode } - return 0 + return DeviceBgpMessageHeaderError_Subcode_unspecified } -// The Transitive IPv4 Address Specific Extended Community is sent as type 0x01. -type BgpExtendedCommunityTransitiveIpv4AddressType struct { +// All errors detected while processing the OPEN message are indicated by sending the +// NOTIFICATION message with the Error Code-Open Message Error. The Error Subcode elaborates +// on the specific nature of the error. +type DeviceBgpOpenMessageError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.route_target_subtype - Choice *BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - RouteTargetSubtype *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget `protobuf:"bytes,2,opt,name=route_target_subtype,json=routeTargetSubtype,proto3" json:"route_target_subtype,omitempty"` - // Description missing in models - RouteOriginSubtype *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin `protobuf:"bytes,3,opt,name=route_origin_subtype,json=routeOriginSubtype,proto3" json:"route_origin_subtype,omitempty"` + // The Error Subcode indicates the specific type of error encountered during OPEN message + // processing. + // default = Subcode.Enum.unsupported_version_number_code2_subcode1 + Subcode *DeviceBgpOpenMessageError_Subcode_Enum `protobuf:"varint,1,opt,name=subcode,proto3,enum=otg.DeviceBgpOpenMessageError_Subcode_Enum,oneof" json:"subcode,omitempty"` } -func (x *BgpExtendedCommunityTransitiveIpv4AddressType) Reset() { - *x = BgpExtendedCommunityTransitiveIpv4AddressType{} +func (x *DeviceBgpOpenMessageError) Reset() { + *x = DeviceBgpOpenMessageError{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[88] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30469,13 +32328,13 @@ func (x *BgpExtendedCommunityTransitiveIpv4AddressType) Reset() { } } -func (x *BgpExtendedCommunityTransitiveIpv4AddressType) String() string { +func (x *DeviceBgpOpenMessageError) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitiveIpv4AddressType) ProtoMessage() {} +func (*DeviceBgpOpenMessageError) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitiveIpv4AddressType) ProtoReflect() protoreflect.Message { +func (x *DeviceBgpOpenMessageError) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[88] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30487,52 +32346,33 @@ func (x *BgpExtendedCommunityTransitiveIpv4AddressType) ProtoReflect() protorefl return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitiveIpv4AddressType.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitiveIpv4AddressType) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceBgpOpenMessageError.ProtoReflect.Descriptor instead. +func (*DeviceBgpOpenMessageError) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{88} } -func (x *BgpExtendedCommunityTransitiveIpv4AddressType) GetChoice() BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return BgpExtendedCommunityTransitiveIpv4AddressType_Choice_unspecified -} - -func (x *BgpExtendedCommunityTransitiveIpv4AddressType) GetRouteTargetSubtype() *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { - if x != nil { - return x.RouteTargetSubtype +func (x *DeviceBgpOpenMessageError) GetSubcode() DeviceBgpOpenMessageError_Subcode_Enum { + if x != nil && x.Subcode != nil { + return *x.Subcode } - return nil + return DeviceBgpOpenMessageError_Subcode_unspecified } -func (x *BgpExtendedCommunityTransitiveIpv4AddressType) GetRouteOriginSubtype() *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { - if x != nil { - return x.RouteOriginSubtype - } - return nil -} - -// The Route Target Community identifies one or more routers that may receive a set -// of routes (that carry this Community) carried by BGP. It is sent with sub-type as -// 0x02 -type BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget struct { +// All errors detected while processing the UPDATE message are indicated by sending +// the NOTIFICATION message with the Error Code-Update Message Error. The Error Subcode +// elaborates on the specific nature of the error. +type DeviceBgpUpdateMessageError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The four octet IANA assigned AS value assigned to the Autonomous System. - // default = 100 - Global_4ByteAs *uint32 `protobuf:"varint,1,opt,name=global_4byte_as,json=global4byteAs,proto3,oneof" json:"global_4byte_as,omitempty"` - // The Local Administrator sub-field contains a number from a numbering space that is - // administered by the organization to which the Autonomous System number carried in - // the Global Administrator sub-field has been assigned by an appropriate authority. - // default = 1 - Local_2ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_2byte_admin,json=local2byteAdmin,proto3,oneof" json:"local_2byte_admin,omitempty"` + // The Error Subcode, the specific type of error encountered during UPDATE processing. + // default = Subcode.Enum.malformed_attrib_list_code3_subcode1 + Subcode *DeviceBgpUpdateMessageError_Subcode_Enum `protobuf:"varint,1,opt,name=subcode,proto3,enum=otg.DeviceBgpUpdateMessageError_Subcode_Enum,oneof" json:"subcode,omitempty"` } -func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) Reset() { - *x = BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget{} +func (x *DeviceBgpUpdateMessageError) Reset() { + *x = DeviceBgpUpdateMessageError{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[89] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30540,13 +32380,13 @@ func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) Reset() { } } -func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) String() string { +func (x *DeviceBgpUpdateMessageError) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) ProtoMessage() {} +func (*DeviceBgpUpdateMessageError) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) ProtoReflect() protoreflect.Message { +func (x *DeviceBgpUpdateMessageError) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[89] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30558,44 +32398,31 @@ func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceBgpUpdateMessageError.ProtoReflect.Descriptor instead. +func (*DeviceBgpUpdateMessageError) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{89} } -func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) GetGlobal_4ByteAs() uint32 { - if x != nil && x.Global_4ByteAs != nil { - return *x.Global_4ByteAs - } - return 0 -} - -func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) GetLocal_2ByteAdmin() uint32 { - if x != nil && x.Local_2ByteAdmin != nil { - return *x.Local_2ByteAdmin +func (x *DeviceBgpUpdateMessageError) GetSubcode() DeviceBgpUpdateMessageError_Subcode_Enum { + if x != nil && x.Subcode != nil { + return *x.Subcode } - return 0 + return DeviceBgpUpdateMessageError_Subcode_unspecified } -// The Route Origin Community identifies one or more routers that inject a set of routes -// (that carry this Community) into BGP. It is sent with sub-type as 0x03. -type BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin struct { +// If a system does not receive successive KEEPALIVE, UPDATE, and/or NOTIFICATION messages +// within the period specified in the Hold Time field of the OPEN message, then the +// NOTIFICATION message with the Hold Timer Expired Error Code(Error Code 4) is sent +// and the BGP connection is closed. The Sub Code used is 0. If a user wants to use +// non zero Sub Code then CustomError can be used. +type DeviceBgpHoldTimerExpired struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // The four octet IANA assigned AS value assigned to the Autonomous System. - // default = 100 - Global_4ByteAs *uint32 `protobuf:"varint,1,opt,name=global_4byte_as,json=global4byteAs,proto3,oneof" json:"global_4byte_as,omitempty"` - // The Local Administrator sub-field contains a number from a numbering space that is - // administered by the organization to which the Autonomous System number carried in - // the Global Administrator sub-field has been assigned by an appropriate authority. - // default = 1 - Local_2ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_2byte_admin,json=local2byteAdmin,proto3,oneof" json:"local_2byte_admin,omitempty"` } -func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Reset() { - *x = BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin{} +func (x *DeviceBgpHoldTimerExpired) Reset() { + *x = DeviceBgpHoldTimerExpired{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[90] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30603,13 +32430,13 @@ func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Reset() { } } -func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) String() string { +func (x *DeviceBgpHoldTimerExpired) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ProtoMessage() {} +func (*DeviceBgpHoldTimerExpired) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ProtoReflect() protoreflect.Message { +func (x *DeviceBgpHoldTimerExpired) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[90] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30621,43 +32448,23 @@ func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceBgpHoldTimerExpired.ProtoReflect.Descriptor instead. +func (*DeviceBgpHoldTimerExpired) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{90} } -func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) GetGlobal_4ByteAs() uint32 { - if x != nil && x.Global_4ByteAs != nil { - return *x.Global_4ByteAs - } - return 0 -} - -func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) GetLocal_2ByteAdmin() uint32 { - if x != nil && x.Local_2ByteAdmin != nil { - return *x.Local_2ByteAdmin - } - return 0 -} - -// The Transitive Four-Octet AS-Specific Extended Community is sent as type 0x02. It -// is defined in RFC 5668. -type BgpExtendedCommunityTransitive4OctetAsType struct { +// Any error detected by the BGP Finite State Machine (e.g., receipt of an unexpected +// event) is indicated by sending the NOTIFICATION message with the Error Code-Finite +// State Machine Error(Error Code 5). The Sub Code used is 0. If a user wants to use +// non zero Sub Code then CustomError can be used. +type DeviceBgpFiniteStateMachineError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = Choice.Enum.route_target_subtype - Choice *BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - RouteTargetSubtype *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget `protobuf:"bytes,2,opt,name=route_target_subtype,json=routeTargetSubtype,proto3" json:"route_target_subtype,omitempty"` - // Description missing in models - RouteOriginSubtype *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin `protobuf:"bytes,3,opt,name=route_origin_subtype,json=routeOriginSubtype,proto3" json:"route_origin_subtype,omitempty"` } -func (x *BgpExtendedCommunityTransitive4OctetAsType) Reset() { - *x = BgpExtendedCommunityTransitive4OctetAsType{} +func (x *DeviceBgpFiniteStateMachineError) Reset() { + *x = DeviceBgpFiniteStateMachineError{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[91] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30665,13 +32472,13 @@ func (x *BgpExtendedCommunityTransitive4OctetAsType) Reset() { } } -func (x *BgpExtendedCommunityTransitive4OctetAsType) String() string { +func (x *DeviceBgpFiniteStateMachineError) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitive4OctetAsType) ProtoMessage() {} +func (*DeviceBgpFiniteStateMachineError) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitive4OctetAsType) ProtoReflect() protoreflect.Message { +func (x *DeviceBgpFiniteStateMachineError) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[91] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30683,53 +32490,28 @@ func (x *BgpExtendedCommunityTransitive4OctetAsType) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitive4OctetAsType.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitive4OctetAsType) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceBgpFiniteStateMachineError.ProtoReflect.Descriptor instead. +func (*DeviceBgpFiniteStateMachineError) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{91} } -func (x *BgpExtendedCommunityTransitive4OctetAsType) GetChoice() BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return BgpExtendedCommunityTransitive4OctetAsType_Choice_unspecified -} - -func (x *BgpExtendedCommunityTransitive4OctetAsType) GetRouteTargetSubtype() *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget { - if x != nil { - return x.RouteTargetSubtype - } - return nil -} - -func (x *BgpExtendedCommunityTransitive4OctetAsType) GetRouteOriginSubtype() *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin { - if x != nil { - return x.RouteOriginSubtype - } - return nil -} - -// The Color Community contains locally administrator defined 'color' value which is -// used in conjunction with Encapsulation attribute to decide whether a data packet -// can be transmitted on a certain tunnel or not. It is defined in RFC9012 and sent -// with sub-type as 0x0b. -type BgpExtendedCommunityTransitiveOpaqueTypeColor struct { +// In the absence of any fatal errors, a BGP peer can close its BGP connection by sending +// the NOTIFICATION message with the Error Code Cease. The 'hard_reset_code6_subcode9' +// subcode for Cease Notification can be used to signal a hard reset that will indicate +// that Graceful Restart cannot be performed, even when Notification extensions to +// Graceful Restart procedure is supported. +type DeviceBgpCeaseError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Two octet flag values. - // default = 0 - Flags *uint32 `protobuf:"varint,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` - // The color value is user defined and configured locally and used to determine whether - // a data packet can be transmitted on a certain tunnel or not in conjunction with the - // Encapsulation attribute. It is defined in RFC9012. - // default = 0 - Color *uint32 `protobuf:"varint,2,opt,name=color,proto3,oneof" json:"color,omitempty"` + // The Error Subcode to be sent to the peer in the Cease NOTIFICATION. + // default = Subcode.Enum.admin_shutdown_code6_subcode2 + Subcode *DeviceBgpCeaseError_Subcode_Enum `protobuf:"varint,1,opt,name=subcode,proto3,enum=otg.DeviceBgpCeaseError_Subcode_Enum,oneof" json:"subcode,omitempty"` } -func (x *BgpExtendedCommunityTransitiveOpaqueTypeColor) Reset() { - *x = BgpExtendedCommunityTransitiveOpaqueTypeColor{} +func (x *DeviceBgpCeaseError) Reset() { + *x = DeviceBgpCeaseError{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[92] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30737,13 +32519,13 @@ func (x *BgpExtendedCommunityTransitiveOpaqueTypeColor) Reset() { } } -func (x *BgpExtendedCommunityTransitiveOpaqueTypeColor) String() string { +func (x *DeviceBgpCeaseError) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitiveOpaqueTypeColor) ProtoMessage() {} +func (*DeviceBgpCeaseError) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitiveOpaqueTypeColor) ProtoReflect() protoreflect.Message { +func (x *DeviceBgpCeaseError) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[92] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30755,52 +32537,32 @@ func (x *BgpExtendedCommunityTransitiveOpaqueTypeColor) ProtoReflect() protorefl return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitiveOpaqueTypeColor.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitiveOpaqueTypeColor) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceBgpCeaseError.ProtoReflect.Descriptor instead. +func (*DeviceBgpCeaseError) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{92} } -func (x *BgpExtendedCommunityTransitiveOpaqueTypeColor) GetFlags() uint32 { - if x != nil && x.Flags != nil { - return *x.Flags - } - return 0 -} - -func (x *BgpExtendedCommunityTransitiveOpaqueTypeColor) GetColor() uint32 { - if x != nil && x.Color != nil { - return *x.Color +func (x *DeviceBgpCeaseError) GetSubcode() DeviceBgpCeaseError_Subcode_Enum { + if x != nil && x.Subcode != nil { + return *x.Subcode } - return 0 + return DeviceBgpCeaseError_Subcode_unspecified } -// This identifies the type of tunneling technology being signalled. It is defined in -// RFC9012 and sent with sub-type as 0x0c. -type BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation struct { +// A BGP peer can send NOTIFICATION message with user defined Error Code and Error Subcode. +type DeviceBgpCustomError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Four bytes of reserved values. Normally set to 0 on transmit and ignored on receive. - // - // default = 0 - Reserved *uint32 `protobuf:"varint,1,opt,name=reserved,proto3,oneof" json:"reserved,omitempty"` - // Identifies the type of tunneling technology being signalled. Initially defined in - // RFC5512 and extended in RFC9012. Some of the important tunnel types include 1 L2TPv3 - // over IP [RFC9012], - // 2 GRE [RFC9012] - // 7 IP in IP [RFC9012] - // 8 VXLAN Encapsulation [RFC8365] - // 9 NVGRE Encapsulation [RFC8365] - // 10 MPLS Encapsulation [RFC8365] - // 15 SR TE Policy Type [draft-ietf-idr-segment-routing-te-policy] - // 19 Geneve Encapsulation [RFC8926] - // default = 1 - TunnelType *uint32 `protobuf:"varint,2,opt,name=tunnel_type,json=tunnelType,proto3,oneof" json:"tunnel_type,omitempty"` + // The Error code to be sent in the NOTIFICATION message to peer. + Code *uint32 `protobuf:"varint,1,opt,name=code,proto3,oneof" json:"code,omitempty"` + // The Error Subcode to be sent in the NOTIFICATION message to peer. + Subcode *uint32 `protobuf:"varint,2,opt,name=subcode,proto3,oneof" json:"subcode,omitempty"` } -func (x *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) Reset() { - *x = BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation{} +func (x *DeviceBgpCustomError) Reset() { + *x = DeviceBgpCustomError{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[93] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30808,13 +32570,13 @@ func (x *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) Reset() { } } -func (x *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) String() string { +func (x *DeviceBgpCustomError) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) ProtoMessage() {} +func (*DeviceBgpCustomError) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) ProtoReflect() protoreflect.Message { +func (x *DeviceBgpCustomError) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[93] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30826,42 +32588,101 @@ func (x *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceBgpCustomError.ProtoReflect.Descriptor instead. +func (*DeviceBgpCustomError) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{93} } -func (x *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) GetReserved() uint32 { - if x != nil && x.Reserved != nil { - return *x.Reserved +func (x *DeviceBgpCustomError) GetCode() uint32 { + if x != nil && x.Code != nil { + return *x.Code } return 0 } -func (x *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) GetTunnelType() uint32 { - if x != nil && x.TunnelType != nil { - return *x.TunnelType +func (x *DeviceBgpCustomError) GetSubcode() uint32 { + if x != nil && x.Subcode != nil { + return *x.Subcode } return 0 } -// The Transitive Opaque Extended Community is sent as type 0x03. -type BgpExtendedCommunityTransitiveOpaqueType struct { +// Configuration for emulated BGPv4 peers and routes. +type BgpV4Peer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // IPv4 address of the BGP peer for the session. + // required = true + PeerAddress *string `protobuf:"bytes,1,opt,name=peer_address,json=peerAddress,proto3,oneof" json:"peer_address,omitempty"` + // This contains the list of Ethernet Virtual Private Network (EVPN) Ethernet Segments + // (ES) Per BGP Peer for IPv4 Address Family Identifier (AFI). + // + // Each Ethernet Segment contains a list of EVPN Instances (EVIs) . + // Each EVI contains a list of Broadcast Domains. + // Each Broadcast Domain contains a list of MAC/IP Ranges. + // + // is responsible for advertising Ethernet + // Auto-discovery Route Per EVI (Type 1). + // + // is responsible for advertising Ethernet Auto-discovery Route + // Per Ethernet Segment (Type 1). + // + // is responsible for advertising + // MAC/IP Advertisement Route (Type 2). + // + // is responsible for advertising Inclusive + // Multicast Ethernet Tag Route (Type 3). + // + // Ethernet Segment is responsible for advertising Ethernet Segment Route (Type 4). + EvpnEthernetSegments []*BgpV4EthernetSegment `protobuf:"bytes,2,rep,name=evpn_ethernet_segments,json=evpnEthernetSegments,proto3" json:"evpn_ethernet_segments,omitempty"` + // The type of BGP autonomous system. External BGP is used for BGP links between two + // or more autonomous systems (ebgp). Internal BGP is used within a single autonomous + // system (ibgp). BGP property defaults are aligned with this object defined as an internal + // BGP peer. If the as_type is specified as 'ebgp' then other properties will need to + // be specified as per an external BGP peer. Specifically, for 'ebgp', 'as_set_mode' + // attribute in 'as_path' field in any Route Range should be changed from default value + // 'do_not_include_local_as' to any other value. + // required = true + AsType *BgpV4Peer_AsType_Enum `protobuf:"varint,3,opt,name=as_type,json=asType,proto3,enum=otg.BgpV4Peer_AsType_Enum,oneof" json:"as_type,omitempty"` + // Autonomous System Number (AS number or ASN) + // required = true + AsNumber *uint32 `protobuf:"varint,4,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` + // The width in bytes of the as_number values. Any as_number values that exceeds the + // width MUST result in an error. + // default = AsNumberWidth.Enum.four + AsNumberWidth *BgpV4Peer_AsNumberWidth_Enum `protobuf:"varint,5,opt,name=as_number_width,json=asNumberWidth,proto3,enum=otg.BgpV4Peer_AsNumberWidth_Enum,oneof" json:"as_number_width,omitempty"` // Description missing in models - // default = Choice.Enum.color_subtype - Choice *BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum,oneof" json:"choice,omitempty"` + Advanced *BgpAdvanced `protobuf:"bytes,6,opt,name=advanced,proto3" json:"advanced,omitempty"` // Description missing in models - ColorSubtype *BgpExtendedCommunityTransitiveOpaqueTypeColor `protobuf:"bytes,2,opt,name=color_subtype,json=colorSubtype,proto3" json:"color_subtype,omitempty"` + Capability *BgpCapability `protobuf:"bytes,7,opt,name=capability,proto3" json:"capability,omitempty"` // Description missing in models - EncapsulationSubtype *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation `protobuf:"bytes,3,opt,name=encapsulation_subtype,json=encapsulationSubtype,proto3" json:"encapsulation_subtype,omitempty"` + LearnedInformationFilter *BgpLearnedInformationFilter `protobuf:"bytes,8,opt,name=learned_information_filter,json=learnedInformationFilter,proto3" json:"learned_information_filter,omitempty"` + // Emulated BGPv4 route ranges. + V4Routes []*BgpV4RouteRange `protobuf:"bytes,9,rep,name=v4_routes,json=v4Routes,proto3" json:"v4_routes,omitempty"` + // Emulated BGPv6 route ranges. + V6Routes []*BgpV6RouteRange `protobuf:"bytes,10,rep,name=v6_routes,json=v6Routes,proto3" json:"v6_routes,omitempty"` + // Segment Routing Traffic Engineering (SR TE) Policies for IPv4 Address Family Identifier + // (AFI). + V4SrtePolicies []*BgpSrteV4Policy `protobuf:"bytes,11,rep,name=v4_srte_policies,json=v4SrtePolicies,proto3" json:"v4_srte_policies,omitempty"` + // Segment Routing Traffic Engineering (SR TE) Policies for IPv6 Address Family Identifier + // (AFI). + V6SrtePolicies []*BgpSrteV6Policy `protobuf:"bytes,12,rep,name=v6_srte_policies,json=v6SrtePolicies,proto3" json:"v6_srte_policies,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,13,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Description missing in models + GracefulRestart *BgpGracefulRestart `protobuf:"bytes,14,opt,name=graceful_restart,json=gracefulRestart,proto3" json:"graceful_restart,omitempty"` + // BGP Updates to be sent to the peer as specified after the session is established. + ReplayUpdates *BgpUpdateReplay `protobuf:"bytes,15,opt,name=replay_updates,json=replayUpdates,proto3" json:"replay_updates,omitempty"` } -func (x *BgpExtendedCommunityTransitiveOpaqueType) Reset() { - *x = BgpExtendedCommunityTransitiveOpaqueType{} +func (x *BgpV4Peer) Reset() { + *x = BgpV4Peer{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[94] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30869,13 +32690,13 @@ func (x *BgpExtendedCommunityTransitiveOpaqueType) Reset() { } } -func (x *BgpExtendedCommunityTransitiveOpaqueType) String() string { +func (x *BgpV4Peer) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitiveOpaqueType) ProtoMessage() {} +func (*BgpV4Peer) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitiveOpaqueType) ProtoReflect() protoreflect.Message { +func (x *BgpV4Peer) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[94] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30887,46 +32708,143 @@ func (x *BgpExtendedCommunityTransitiveOpaqueType) ProtoReflect() protoreflect.M return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitiveOpaqueType.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitiveOpaqueType) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpV4Peer.ProtoReflect.Descriptor instead. +func (*BgpV4Peer) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{94} } -func (x *BgpExtendedCommunityTransitiveOpaqueType) GetChoice() BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *BgpV4Peer) GetPeerAddress() string { + if x != nil && x.PeerAddress != nil { + return *x.PeerAddress } - return BgpExtendedCommunityTransitiveOpaqueType_Choice_unspecified + return "" } -func (x *BgpExtendedCommunityTransitiveOpaqueType) GetColorSubtype() *BgpExtendedCommunityTransitiveOpaqueTypeColor { +func (x *BgpV4Peer) GetEvpnEthernetSegments() []*BgpV4EthernetSegment { if x != nil { - return x.ColorSubtype + return x.EvpnEthernetSegments } return nil } -func (x *BgpExtendedCommunityTransitiveOpaqueType) GetEncapsulationSubtype() *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation { +func (x *BgpV4Peer) GetAsType() BgpV4Peer_AsType_Enum { + if x != nil && x.AsType != nil { + return *x.AsType + } + return BgpV4Peer_AsType_unspecified +} + +func (x *BgpV4Peer) GetAsNumber() uint32 { + if x != nil && x.AsNumber != nil { + return *x.AsNumber + } + return 0 +} + +func (x *BgpV4Peer) GetAsNumberWidth() BgpV4Peer_AsNumberWidth_Enum { + if x != nil && x.AsNumberWidth != nil { + return *x.AsNumberWidth + } + return BgpV4Peer_AsNumberWidth_unspecified +} + +func (x *BgpV4Peer) GetAdvanced() *BgpAdvanced { if x != nil { - return x.EncapsulationSubtype + return x.Advanced } return nil } -// The Router MAC EVPN Community is defined in RFC9135 and normally sent only for EVPN -// Type-2 Routes . It is sent with sub-type 0x03. -type BgpExtendedCommunityTransitiveEvpnTypeRouterMac struct { +func (x *BgpV4Peer) GetCapability() *BgpCapability { + if x != nil { + return x.Capability + } + return nil +} + +func (x *BgpV4Peer) GetLearnedInformationFilter() *BgpLearnedInformationFilter { + if x != nil { + return x.LearnedInformationFilter + } + return nil +} + +func (x *BgpV4Peer) GetV4Routes() []*BgpV4RouteRange { + if x != nil { + return x.V4Routes + } + return nil +} + +func (x *BgpV4Peer) GetV6Routes() []*BgpV6RouteRange { + if x != nil { + return x.V6Routes + } + return nil +} + +func (x *BgpV4Peer) GetV4SrtePolicies() []*BgpSrteV4Policy { + if x != nil { + return x.V4SrtePolicies + } + return nil +} + +func (x *BgpV4Peer) GetV6SrtePolicies() []*BgpSrteV6Policy { + if x != nil { + return x.V6SrtePolicies + } + return nil +} + +func (x *BgpV4Peer) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *BgpV4Peer) GetGracefulRestart() *BgpGracefulRestart { + if x != nil { + return x.GracefulRestart + } + return nil +} + +func (x *BgpV4Peer) GetReplayUpdates() *BgpUpdateReplay { + if x != nil { + return x.ReplayUpdates + } + return nil +} + +// Configuration for emulated BGPv4 peers and routes on a single IPv4 interface. +type BgpV4Interface struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // MAC Address of the PE Router. - // default = 0:0:0:0:0:0 - RouterMac *string `protobuf:"bytes,1,opt,name=router_mac,json=routerMac,proto3,oneof" json:"router_mac,omitempty"` + // The unique name of the IPv4, Loopback IPv4 interface or DHCPv4 client used as the + // source IP for this list of BGP peers. + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv4Loopback/properties/name + // - /components/schemas/Device.Dhcpv4client/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv4Loopback/properties/name + // - /components/schemas/Device.Dhcpv4client/properties/name + // + // required = true + Ipv4Name *string `protobuf:"bytes,1,opt,name=ipv4_name,json=ipv4Name,proto3,oneof" json:"ipv4_name,omitempty"` + // This contains the list of BGPv4 peers configured on this interface. + Peers []*BgpV4Peer `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` } -func (x *BgpExtendedCommunityTransitiveEvpnTypeRouterMac) Reset() { - *x = BgpExtendedCommunityTransitiveEvpnTypeRouterMac{} +func (x *BgpV4Interface) Reset() { + *x = BgpV4Interface{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[95] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30934,13 +32852,13 @@ func (x *BgpExtendedCommunityTransitiveEvpnTypeRouterMac) Reset() { } } -func (x *BgpExtendedCommunityTransitiveEvpnTypeRouterMac) String() string { +func (x *BgpV4Interface) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitiveEvpnTypeRouterMac) ProtoMessage() {} +func (*BgpV4Interface) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitiveEvpnTypeRouterMac) ProtoReflect() protoreflect.Message { +func (x *BgpV4Interface) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[95] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30952,33 +32870,86 @@ func (x *BgpExtendedCommunityTransitiveEvpnTypeRouterMac) ProtoReflect() protore return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitiveEvpnTypeRouterMac.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitiveEvpnTypeRouterMac) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpV4Interface.ProtoReflect.Descriptor instead. +func (*BgpV4Interface) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{95} } -func (x *BgpExtendedCommunityTransitiveEvpnTypeRouterMac) GetRouterMac() string { - if x != nil && x.RouterMac != nil { - return *x.RouterMac +func (x *BgpV4Interface) GetIpv4Name() string { + if x != nil && x.Ipv4Name != nil { + return *x.Ipv4Name } return "" } -// The Transitive EVPN Extended Community is sent as type 0x06 . -type BgpExtendedCommunityTransitiveEvpnType struct { +func (x *BgpV4Interface) GetPeers() []*BgpV4Peer { + if x != nil { + return x.Peers + } + return nil +} + +// Configuration for BGP Ethernet Segment ranges. Advertises following routes - +// +// Type 4 - Ethernet Segment Route +type BgpV4EthernetSegment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Designated Forwarder (DF) election configuration. + DfElection *BgpEthernetSegmentDfElection `protobuf:"bytes,1,opt,name=df_election,json=dfElection,proto3" json:"df_election,omitempty"` + // This contains the list of EVIs. + Evis []*BgpV4EvpnEvis `protobuf:"bytes,2,rep,name=evis,proto3" json:"evis,omitempty"` + // 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero + // ESI is '10000000000000000000' . + // default = 00000000000000000000 + Esi *string `protobuf:"bytes,3,opt,name=esi,proto3,oneof" json:"esi,omitempty"` + // Single Active or All Active mode Redundancy mode selection for Multi-home. + // default = ActiveMode.Enum.all_active + ActiveMode *BgpV4EthernetSegment_ActiveMode_Enum `protobuf:"varint,4,opt,name=active_mode,json=activeMode,proto3,enum=otg.BgpV4EthernetSegment_ActiveMode_Enum,oneof" json:"active_mode,omitempty"` + // The label value to be advertised as ESI Label in ESI Label Extended Community. This + // is included in Ethernet Auto-discovery per ES Routes advertised by a router. + // default = 0 + EsiLabel *uint32 `protobuf:"varint,5,opt,name=esi_label,json=esiLabel,proto3,oneof" json:"esi_label,omitempty"` // Description missing in models - // default = Choice.Enum.router_mac_subtype - Choice *BgpExtendedCommunityTransitiveEvpnType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpExtendedCommunityTransitiveEvpnType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - RouterMacSubtype *BgpExtendedCommunityTransitiveEvpnTypeRouterMac `protobuf:"bytes,2,opt,name=router_mac_subtype,json=routerMacSubtype,proto3" json:"router_mac_subtype,omitempty"` + Advanced *BgpRouteAdvanced `protobuf:"bytes,6,opt,name=advanced,proto3" json:"advanced,omitempty"` + // Optional community settings. + Communities []*BgpCommunity `protobuf:"bytes,7,rep,name=communities,proto3" json:"communities,omitempty"` + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. + ExtCommunities []*BgpExtCommunity `protobuf:"bytes,8,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` + // Optional AS PATH settings. + AsPath *BgpAsPath `protobuf:"bytes,9,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` } -func (x *BgpExtendedCommunityTransitiveEvpnType) Reset() { - *x = BgpExtendedCommunityTransitiveEvpnType{} +func (x *BgpV4EthernetSegment) Reset() { + *x = BgpV4EthernetSegment{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[96] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -30986,13 +32957,13 @@ func (x *BgpExtendedCommunityTransitiveEvpnType) Reset() { } } -func (x *BgpExtendedCommunityTransitiveEvpnType) String() string { +func (x *BgpV4EthernetSegment) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitiveEvpnType) ProtoMessage() {} +func (*BgpV4EthernetSegment) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitiveEvpnType) ProtoReflect() protoreflect.Message { +func (x *BgpV4EthernetSegment) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[96] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -31004,45 +32975,88 @@ func (x *BgpExtendedCommunityTransitiveEvpnType) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitiveEvpnType.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitiveEvpnType) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpV4EthernetSegment.ProtoReflect.Descriptor instead. +func (*BgpV4EthernetSegment) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{96} } -func (x *BgpExtendedCommunityTransitiveEvpnType) GetChoice() BgpExtendedCommunityTransitiveEvpnType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *BgpV4EthernetSegment) GetDfElection() *BgpEthernetSegmentDfElection { + if x != nil { + return x.DfElection } - return BgpExtendedCommunityTransitiveEvpnType_Choice_unspecified + return nil } -func (x *BgpExtendedCommunityTransitiveEvpnType) GetRouterMacSubtype() *BgpExtendedCommunityTransitiveEvpnTypeRouterMac { +func (x *BgpV4EthernetSegment) GetEvis() []*BgpV4EvpnEvis { if x != nil { - return x.RouterMacSubtype + return x.Evis } return nil } -// The Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. -// It is sent with sub-type as 0x04. -type BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth struct { +func (x *BgpV4EthernetSegment) GetEsi() string { + if x != nil && x.Esi != nil { + return *x.Esi + } + return "" +} + +func (x *BgpV4EthernetSegment) GetActiveMode() BgpV4EthernetSegment_ActiveMode_Enum { + if x != nil && x.ActiveMode != nil { + return *x.ActiveMode + } + return BgpV4EthernetSegment_ActiveMode_unspecified +} + +func (x *BgpV4EthernetSegment) GetEsiLabel() uint32 { + if x != nil && x.EsiLabel != nil { + return *x.EsiLabel + } + return 0 +} + +func (x *BgpV4EthernetSegment) GetAdvanced() *BgpRouteAdvanced { + if x != nil { + return x.Advanced + } + return nil +} + +func (x *BgpV4EthernetSegment) GetCommunities() []*BgpCommunity { + if x != nil { + return x.Communities + } + return nil +} + +func (x *BgpV4EthernetSegment) GetExtCommunities() []*BgpExtCommunity { + if x != nil { + return x.ExtCommunities + } + return nil +} + +func (x *BgpV4EthernetSegment) GetAsPath() *BgpAsPath { + if x != nil { + return x.AsPath + } + return nil +} + +// Configuration for Designated Forwarder (DF) election among the Provider Edge (PE) +// routers on the same Ethernet Segment. +type BgpEthernetSegmentDfElection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The value of the Global Administrator subfield should represent the Autonomous System - // of the router that attaches the Link Bandwidth Community. If four octet AS numbering - // scheme is used, AS_TRANS (23456) should be used. - // default = 100 - Global_2ByteAs *uint32 `protobuf:"varint,1,opt,name=global_2byte_as,json=global2byteAs,proto3,oneof" json:"global_2byte_as,omitempty"` - // Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and - // 1 Mbps is 1000 Kbps per second ) - // default = 0 - Bandwidth *float32 `protobuf:"fixed32,2,opt,name=bandwidth,proto3,oneof" json:"bandwidth,omitempty"` + // The DF election timer in seconds. + // default = 3 + ElectionTimer *uint32 `protobuf:"varint,1,opt,name=election_timer,json=electionTimer,proto3,oneof" json:"election_timer,omitempty"` } -func (x *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Reset() { - *x = BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth{} +func (x *BgpEthernetSegmentDfElection) Reset() { + *x = BgpEthernetSegmentDfElection{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[97] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -31050,13 +33064,13 @@ func (x *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Reset() { } } -func (x *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) String() string { +func (x *BgpEthernetSegmentDfElection) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ProtoMessage() {} +func (*BgpEthernetSegmentDfElection) ProtoMessage() {} -func (x *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ProtoReflect() protoreflect.Message { +func (x *BgpEthernetSegmentDfElection) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[97] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -31068,40 +33082,54 @@ func (x *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ProtoReflec return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpEthernetSegmentDfElection.ProtoReflect.Descriptor instead. +func (*BgpEthernetSegmentDfElection) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{97} } -func (x *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) GetGlobal_2ByteAs() uint32 { - if x != nil && x.Global_2ByteAs != nil { - return *x.Global_2ByteAs - } - return 0 -} - -func (x *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) GetBandwidth() float32 { - if x != nil && x.Bandwidth != nil { - return *x.Bandwidth +func (x *BgpEthernetSegmentDfElection) GetElectionTimer() uint32 { + if x != nil && x.ElectionTimer != nil { + return *x.ElectionTimer } return 0 } -// The Non-Transitive Two-Octet AS-Specific Extended Community is sent as type 0x40. -type BgpExtendedCommunityNonTransitive2OctetAsType struct { +// Configuration for advanced BGP route range settings. +type BgpRouteAdvanced struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.link_bandwidth_subtype - Choice *BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - LinkBandwidthSubtype *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth `protobuf:"bytes,2,opt,name=link_bandwidth_subtype,json=linkBandwidthSubtype,proto3" json:"link_bandwidth_subtype,omitempty"` + // BGP Multi Exit Discriminator attribute sent to the peer to help in the route selection + // process. If set to true, the Multi Exit Discriminator attribute will be included + // in the route advertisement. + // default = True + IncludeMultiExitDiscriminator *bool `protobuf:"varint,3,opt,name=include_multi_exit_discriminator,json=includeMultiExitDiscriminator,proto3,oneof" json:"include_multi_exit_discriminator,omitempty"` + // The multi exit discriminator (MED) value used for route selection sent to the peer. + MultiExitDiscriminator *uint32 `protobuf:"varint,1,opt,name=multi_exit_discriminator,json=multiExitDiscriminator,proto3,oneof" json:"multi_exit_discriminator,omitempty"` + // If set to true, the Origin attribute will be included in the route advertisement. + // default = True + IncludeOrigin *bool `protobuf:"varint,4,opt,name=include_origin,json=includeOrigin,proto3,oneof" json:"include_origin,omitempty"` + // The origin attribute of a prefix can take three values: the prefix originates from + // an interior routing protocol 'igp', it originates from 'egp' or the origin is 'incomplete', + // if the prefix is learned through other means. + // default = Origin.Enum.igp + Origin *BgpRouteAdvanced_Origin_Enum `protobuf:"varint,2,opt,name=origin,proto3,enum=otg.BgpRouteAdvanced_Origin_Enum,oneof" json:"origin,omitempty"` + // BGP Local Preference attribute sent to the peer to indicate the degree of preference + // for externally learned routes. If set to true, the Local Preference attribute will + // be included in the route advertisement. This should be included only for internal + // peers. + // default = True + IncludeLocalPreference *bool `protobuf:"varint,5,opt,name=include_local_preference,json=includeLocalPreference,proto3,oneof" json:"include_local_preference,omitempty"` + // Value to be set in Local Preference attribute if include_local_preference is set + // to true. It is used for the selection of the path for the traffic leaving the AS. + // The route with the highest local preference value is preferred. + // default = 100 + LocalPreference *uint32 `protobuf:"varint,6,opt,name=local_preference,json=localPreference,proto3,oneof" json:"local_preference,omitempty"` } -func (x *BgpExtendedCommunityNonTransitive2OctetAsType) Reset() { - *x = BgpExtendedCommunityNonTransitive2OctetAsType{} +func (x *BgpRouteAdvanced) Reset() { + *x = BgpRouteAdvanced{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[98] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -31109,13 +33137,13 @@ func (x *BgpExtendedCommunityNonTransitive2OctetAsType) Reset() { } } -func (x *BgpExtendedCommunityNonTransitive2OctetAsType) String() string { +func (x *BgpRouteAdvanced) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityNonTransitive2OctetAsType) ProtoMessage() {} +func (*BgpRouteAdvanced) ProtoMessage() {} -func (x *BgpExtendedCommunityNonTransitive2OctetAsType) ProtoReflect() protoreflect.Message { +func (x *BgpRouteAdvanced) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[98] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -31127,49 +33155,73 @@ func (x *BgpExtendedCommunityNonTransitive2OctetAsType) ProtoReflect() protorefl return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityNonTransitive2OctetAsType.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityNonTransitive2OctetAsType) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpRouteAdvanced.ProtoReflect.Descriptor instead. +func (*BgpRouteAdvanced) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{98} } -func (x *BgpExtendedCommunityNonTransitive2OctetAsType) GetChoice() BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *BgpRouteAdvanced) GetIncludeMultiExitDiscriminator() bool { + if x != nil && x.IncludeMultiExitDiscriminator != nil { + return *x.IncludeMultiExitDiscriminator } - return BgpExtendedCommunityNonTransitive2OctetAsType_Choice_unspecified + return false } -func (x *BgpExtendedCommunityNonTransitive2OctetAsType) GetLinkBandwidthSubtype() *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { - if x != nil { - return x.LinkBandwidthSubtype +func (x *BgpRouteAdvanced) GetMultiExitDiscriminator() uint32 { + if x != nil && x.MultiExitDiscriminator != nil { + return *x.MultiExitDiscriminator } - return nil + return 0 } -// Add a custom Extended Community with a combination of types , sub-types and values -// not explicitly specified above or not defined yet. -type BgpExtendedCommunityCustomType struct { +func (x *BgpRouteAdvanced) GetIncludeOrigin() bool { + if x != nil && x.IncludeOrigin != nil { + return *x.IncludeOrigin + } + return false +} + +func (x *BgpRouteAdvanced) GetOrigin() BgpRouteAdvanced_Origin_Enum { + if x != nil && x.Origin != nil { + return *x.Origin + } + return BgpRouteAdvanced_Origin_unspecified +} + +func (x *BgpRouteAdvanced) GetIncludeLocalPreference() bool { + if x != nil && x.IncludeLocalPreference != nil { + return *x.IncludeLocalPreference + } + return false +} + +func (x *BgpRouteAdvanced) GetLocalPreference() uint32 { + if x != nil && x.LocalPreference != nil { + return *x.LocalPreference + } + return 0 +} + +// BGP communities provide additional capability for tagging routes and for modifying +// BGP routing policy on upstream and downstream routers. BGP community is a 32-bit +// number which is broken into 16-bit AS number and a 16-bit custom value. +type BgpCommunity struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The type to be set in the Extended Community attribute. Accepts hexadecimal input - // upto ff . - // default = 00 - CommunityType *string `protobuf:"bytes,1,opt,name=community_type,json=communityType,proto3,oneof" json:"community_type,omitempty"` - // The sub-type to be set in the Extended Community attribute. For certain types with - // no sub-type this byte can also be used as part of an extended value field. Accepts - // hexadecimal input upto ff. - // default = 00 - CommunitySubtype *string `protobuf:"bytes,2,opt,name=community_subtype,json=communitySubtype,proto3,oneof" json:"community_subtype,omitempty"` - // 6 byte hex value to be carried in the last 6 bytes of the Extended Community. Accepts - // hexadecimal input upto ffffffffffff. - // default = 000000000000 - Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` + // The type of community AS number. + Type *BgpCommunity_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.BgpCommunity_Type_Enum,oneof" json:"type,omitempty"` + // First two octets of 32 bit community AS number. + // default = 0 + AsNumber *uint32 `protobuf:"varint,2,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` + // Last two octets of the community value. + // default = 0 + AsCustom *uint32 `protobuf:"varint,3,opt,name=as_custom,json=asCustom,proto3,oneof" json:"as_custom,omitempty"` } -func (x *BgpExtendedCommunityCustomType) Reset() { - *x = BgpExtendedCommunityCustomType{} +func (x *BgpCommunity) Reset() { + *x = BgpCommunity{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[99] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -31177,13 +33229,13 @@ func (x *BgpExtendedCommunityCustomType) Reset() { } } -func (x *BgpExtendedCommunityCustomType) String() string { +func (x *BgpCommunity) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityCustomType) ProtoMessage() {} +func (*BgpCommunity) ProtoMessage() {} -func (x *BgpExtendedCommunityCustomType) ProtoReflect() protoreflect.Message { +func (x *BgpCommunity) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[99] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -31195,117 +33247,68 @@ func (x *BgpExtendedCommunityCustomType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityCustomType.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityCustomType) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpCommunity.ProtoReflect.Descriptor instead. +func (*BgpCommunity) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{99} } -func (x *BgpExtendedCommunityCustomType) GetCommunityType() string { - if x != nil && x.CommunityType != nil { - return *x.CommunityType +func (x *BgpCommunity) GetType() BgpCommunity_Type_Enum { + if x != nil && x.Type != nil { + return *x.Type } - return "" + return BgpCommunity_Type_unspecified } -func (x *BgpExtendedCommunityCustomType) GetCommunitySubtype() string { - if x != nil && x.CommunitySubtype != nil { - return *x.CommunitySubtype +func (x *BgpCommunity) GetAsNumber() uint32 { + if x != nil && x.AsNumber != nil { + return *x.AsNumber } - return "" + return 0 } -func (x *BgpExtendedCommunityCustomType) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value +func (x *BgpCommunity) GetAsCustom() uint32 { + if x != nil && x.AsCustom != nil { + return *x.AsCustom } - return "" + return 0 } -// Emulated BGPv6 route range. -type BgpV6RouteRange struct { +// The Extended Communities Attribute is a transitive optional BGP attribute, with the +// Type Code 16. Community and Extended Communities attributes are utilized to trigger +// routing decisions, such as acceptance, rejection, preference, or redistribution. +// An extended community is an 8-Bytes value. It is divided into two main parts. The +// first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes +// carry a unique set of data in a format defined by the type and sub-type field. Extended +// communities provide a larger range for grouping or categorizing communities. +type BgpExtCommunity struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A list of group of IPv6 route addresses. - Addresses []*V6RouteAddress `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` - // Specify the NextHop in MP REACH NLRI. The mode for setting the IP address of the - // NextHop in the MP REACH NLRI can be one of the following: - // Local IP: Automatically fills the Nexthop with the Local IP of the BGP - // peer. - // If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. - // Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. - // default = NextHopMode.Enum.local_ip - NextHopMode *BgpV6RouteRange_NextHopMode_Enum `protobuf:"varint,2,opt,name=next_hop_mode,json=nextHopMode,proto3,enum=otg.BgpV6RouteRange_NextHopMode_Enum,oneof" json:"next_hop_mode,omitempty"` - // If the Nexthop Mode is Manual, it sets the type of the NextHop IP address. - // default = NextHopAddressType.Enum.ipv6 - NextHopAddressType *BgpV6RouteRange_NextHopAddressType_Enum `protobuf:"varint,3,opt,name=next_hop_address_type,json=nextHopAddressType,proto3,enum=otg.BgpV6RouteRange_NextHopAddressType_Enum,oneof" json:"next_hop_address_type,omitempty"` - // The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type - // is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. - // default = 0.0.0.0 - NextHopIpv4Address *string `protobuf:"bytes,4,opt,name=next_hop_ipv4_address,json=nextHopIpv4Address,proto3,oneof" json:"next_hop_ipv4_address,omitempty"` - // The IPv6 address of the next hop if the Nexthop Mode is manual and the Nexthop type - // is IPv6. - // default = ::0 - NextHopIpv6Address *string `protobuf:"bytes,5,opt,name=next_hop_ipv6_address,json=nextHopIpv6Address,proto3,oneof" json:"next_hop_ipv6_address,omitempty"` - // Description missing in models - Advanced *BgpRouteAdvanced `protobuf:"bytes,6,opt,name=advanced,proto3" json:"advanced,omitempty"` - // Optional community settings. - Communities []*BgpCommunity `protobuf:"bytes,7,rep,name=communities,proto3" json:"communities,omitempty"` - // Description missing in models - AsPath *BgpAsPath `protobuf:"bytes,8,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` - // Description missing in models - AddPath *BgpAddPath `protobuf:"bytes,9,opt,name=add_path,json=addPath,proto3" json:"add_path,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,10,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Deprecated: This property is deprecated in favor of property extended_communities - // - // Deprecated: This property is deprecated in favor of property extended_communities - // - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. Note evpn type is defined mainly for use with evpn - // route updates and not for IPv4 and IPv6 route updates. - ExtCommunities []*BgpExtCommunity `protobuf:"bytes,11,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an eight byte value. It - // is divided into two main parts. The first two bytes of the community encode a type - // and sub-type fields and the last six bytes carry a unique set of data in a format - // defined by the type and sub-type field. Extended communities provide a larger range - // for grouping or categorizing communities. - ExtendedCommunities []*BgpExtendedCommunity `protobuf:"bytes,12,rep,name=extended_communities,json=extendedCommunities,proto3" json:"extended_communities,omitempty"` + // Extended Community Type field of 1 Byte. + // - administrator_as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). + // - administrator_ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). + // - administrator_as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). + // - opaque: Opaque Extended Community (RFC 7432). + // - evpn: EVPN Extended Community (RFC 7153). + // - administrator_as_2octet_link_bandwidth : Link Bandwidth Extended Community (RFC + // 7153). + Type *BgpExtCommunity_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.BgpExtCommunity_Type_Enum,oneof" json:"type,omitempty"` + // Extended Community Sub Type field of 1 Byte. + // - route_target: Route Target. + // - origin: Origin. + // - extended_bandwidth: Specifies the link bandwidth. + // - color: Specifies the color value. + // - encapsulation: Specifies the Encapsulation Extended Community. + // - mac_address: Specifies the Extended community MAC address. + Subtype *BgpExtCommunity_Subtype_Enum `protobuf:"varint,2,opt,name=subtype,proto3,enum=otg.BgpExtCommunity_Subtype_Enum,oneof" json:"subtype,omitempty"` + // Extended Community value of 6 Bytes. Example - for the Opaque type and Color subtype + // value can be '0000000000c8' for the color value 200. + Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *BgpV6RouteRange) Reset() { - *x = BgpV6RouteRange{} +func (x *BgpExtCommunity) Reset() { + *x = BgpExtCommunity{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -31313,13 +33316,13 @@ func (x *BgpV6RouteRange) Reset() { } } -func (x *BgpV6RouteRange) String() string { +func (x *BgpExtCommunity) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV6RouteRange) ProtoMessage() {} +func (*BgpExtCommunity) ProtoMessage() {} -func (x *BgpV6RouteRange) ProtoReflect() protoreflect.Message { +func (x *BgpExtCommunity) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[100] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -31331,140 +33334,268 @@ func (x *BgpV6RouteRange) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV6RouteRange.ProtoReflect.Descriptor instead. -func (*BgpV6RouteRange) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtCommunity.ProtoReflect.Descriptor instead. +func (*BgpExtCommunity) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{100} } -func (x *BgpV6RouteRange) GetAddresses() []*V6RouteAddress { - if x != nil { - return x.Addresses +func (x *BgpExtCommunity) GetType() BgpExtCommunity_Type_Enum { + if x != nil && x.Type != nil { + return *x.Type } - return nil + return BgpExtCommunity_Type_unspecified } -func (x *BgpV6RouteRange) GetNextHopMode() BgpV6RouteRange_NextHopMode_Enum { - if x != nil && x.NextHopMode != nil { - return *x.NextHopMode +func (x *BgpExtCommunity) GetSubtype() BgpExtCommunity_Subtype_Enum { + if x != nil && x.Subtype != nil { + return *x.Subtype } - return BgpV6RouteRange_NextHopMode_unspecified + return BgpExtCommunity_Subtype_unspecified } -func (x *BgpV6RouteRange) GetNextHopAddressType() BgpV6RouteRange_NextHopAddressType_Enum { - if x != nil && x.NextHopAddressType != nil { - return *x.NextHopAddressType +func (x *BgpExtCommunity) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } - return BgpV6RouteRange_NextHopAddressType_unspecified + return "" } -func (x *BgpV6RouteRange) GetNextHopIpv4Address() string { - if x != nil && x.NextHopIpv4Address != nil { - return *x.NextHopIpv4Address - } - return "" +// This attribute identifies the autonomous systems through which routing information +// carried in this UPDATE message has passed. This contains the configuration of how +// to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains +// optional configuration of additional AS Path Segments that can be included in the +// AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems +// (AS) numbers that a routing information passes through to reach the destination. +type BgpAsPath struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Defines how the Local AS should be included in the MP REACH NLRI. For iBGP sessions, + // Do Not Include Local AS must be chosen. For eBGP sessions, any choice other than + // Do Not Include Local AS can be chosen. + // default = AsSetMode.Enum.do_not_include_local_as + AsSetMode *BgpAsPath_AsSetMode_Enum `protobuf:"varint,1,opt,name=as_set_mode,json=asSetMode,proto3,enum=otg.BgpAsPath_AsSetMode_Enum,oneof" json:"as_set_mode,omitempty"` + // The additional AS path segments to be added in the NLRI. By default, an empty AS + // path is always included and the local AS is added to it as per the value of 'as_set_mode' + // attribute. + Segments []*BgpAsPathSegment `protobuf:"bytes,2,rep,name=segments,proto3" json:"segments,omitempty"` } -func (x *BgpV6RouteRange) GetNextHopIpv6Address() string { - if x != nil && x.NextHopIpv6Address != nil { - return *x.NextHopIpv6Address +func (x *BgpAsPath) Reset() { + *x = BgpAsPath{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -func (x *BgpV6RouteRange) GetAdvanced() *BgpRouteAdvanced { - if x != nil { - return x.Advanced - } - return nil +func (x *BgpAsPath) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *BgpV6RouteRange) GetCommunities() []*BgpCommunity { - if x != nil { - return x.Communities +func (*BgpAsPath) ProtoMessage() {} + +func (x *BgpAsPath) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[101] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *BgpV6RouteRange) GetAsPath() *BgpAsPath { - if x != nil { - return x.AsPath - } - return nil +// Deprecated: Use BgpAsPath.ProtoReflect.Descriptor instead. +func (*BgpAsPath) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{101} } -func (x *BgpV6RouteRange) GetAddPath() *BgpAddPath { +func (x *BgpAsPath) GetAsSetMode() BgpAsPath_AsSetMode_Enum { + if x != nil && x.AsSetMode != nil { + return *x.AsSetMode + } + return BgpAsPath_AsSetMode_unspecified +} + +func (x *BgpAsPath) GetSegments() []*BgpAsPathSegment { if x != nil { - return x.AddPath + return x.Segments } return nil } -func (x *BgpV6RouteRange) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +// Configuration for a single BGP AS path segment +type BgpAsPathSegment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // AS sequence is the most common type of AS_PATH, it contains the list of ASNs starting + // with the most recent ASN being added read from left to right. + // The other three AS_PATH types are used for Confederations - AS_SET is the type of + // AS_PATH attribute that summarizes routes using using the aggregate-address command, + // allowing AS_PATHs to be summarized in the update as well. - AS_CONFED_SEQ gives + // the list of ASNs in the path starting with the most recent ASN to be added reading + // left to right - AS_CONFED_SET will allow summarization of multiple AS PATHs to be + // sent in BGP Updates. + // default = Type.Enum.as_seq + Type *BgpAsPathSegment_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.BgpAsPathSegment_Type_Enum,oneof" json:"type,omitempty"` + // The AS numbers in this AS path segment. + AsNumbers []uint32 `protobuf:"varint,2,rep,packed,name=as_numbers,json=asNumbers,proto3" json:"as_numbers,omitempty"` +} + +func (x *BgpAsPathSegment) Reset() { + *x = BgpAsPathSegment{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -func (x *BgpV6RouteRange) GetExtCommunities() []*BgpExtCommunity { +func (x *BgpAsPathSegment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpAsPathSegment) ProtoMessage() {} + +func (x *BgpAsPathSegment) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[102] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpAsPathSegment.ProtoReflect.Descriptor instead. +func (*BgpAsPathSegment) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{102} +} + +func (x *BgpAsPathSegment) GetType() BgpAsPathSegment_Type_Enum { + if x != nil && x.Type != nil { + return *x.Type + } + return BgpAsPathSegment_Type_unspecified +} + +func (x *BgpAsPathSegment) GetAsNumbers() []uint32 { if x != nil { - return x.ExtCommunities + return x.AsNumbers } return nil } -func (x *BgpV6RouteRange) GetExtendedCommunities() []*BgpExtendedCommunity { +// This contains a list of different flavors of EVPN. +// For example EVPN over VXLAN or EVPN over MPLS etc to be configured per Ethernet segment. +// +// Need to instantiate correct type of EVPN instance as per requirement. +type BgpV4EvpnEvis struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.evi_vxlan + Choice *BgpV4EvpnEvis_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpV4EvpnEvis_Choice_Enum,oneof" json:"choice,omitempty"` + // EVPN VXLAN instance to be configured per Ethernet Segment. + EviVxlan *BgpV4EviVxlan `protobuf:"bytes,2,opt,name=evi_vxlan,json=eviVxlan,proto3" json:"evi_vxlan,omitempty"` +} + +func (x *BgpV4EvpnEvis) Reset() { + *x = BgpV4EvpnEvis{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BgpV4EvpnEvis) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpV4EvpnEvis) ProtoMessage() {} + +func (x *BgpV4EvpnEvis) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[103] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpV4EvpnEvis.ProtoReflect.Descriptor instead. +func (*BgpV4EvpnEvis) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{103} +} + +func (x *BgpV4EvpnEvis) GetChoice() BgpV4EvpnEvis_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return BgpV4EvpnEvis_Choice_unspecified +} + +func (x *BgpV4EvpnEvis) GetEviVxlan() *BgpV4EviVxlan { if x != nil { - return x.ExtendedCommunities + return x.EviVxlan } return nil } -// Configuration for BGP Segment Routing Traffic Engineering(SRTE) -// policy. -type BgpSrteV4Policy struct { +// Configuration for BGP EVPN EVI. Advertises following routes - +// +// # Type 3 - Inclusive Multicast Ethernet Tag Route +// +// Type 1 - Ethernet Auto-discovery Route (Per EVI) +// +// Type 1 - Ethernet Auto-discovery Route (Per ES) +type BgpV4EviVxlan struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // 4-octet value uniquely identifying the policy in the context of (color, endpoint) - // tuple. It is used by the SR Policy originator to make unique (from an NLRI perspective) - // both for multiple candidate paths of the same SR Policy as well as candidate paths - // of different SR Policies (i.e. with different segment list) with the same Color - // and Endpoint but meant for different head-ends. - // default = 1 - Distinguisher *uint32 `protobuf:"varint,1,opt,name=distinguisher,proto3,oneof" json:"distinguisher,omitempty"` - // Policy color is used to match the color of the destination prefixes to steer traffic - // into the SR Policy. - // default = 100 - Color *uint32 `protobuf:"varint,2,opt,name=color,proto3,oneof" json:"color,omitempty"` - // Specifies a single node or a set of nodes (e.g. an anycast address). It is selected - // on the basis of the SR Policy type (AFI). - // required = true - Ipv4Endpoint *string `protobuf:"bytes,3,opt,name=ipv4_endpoint,json=ipv4Endpoint,proto3,oneof" json:"ipv4_endpoint,omitempty"` - // Mode for choosing the NextHop in MP REACH NLRI. Available modes are : Local IP: Automatically - // fills the Nexthop with the Local IP of the BGP peer. For IPv6 BGP peer the Nexthop - // Encoding capability should be enabled. Manual: Override the Nexthop with any arbitrary - // IPv4/IPv6 address. - // default = NextHopMode.Enum.local_ip - NextHopMode *BgpSrteV4Policy_NextHopMode_Enum `protobuf:"varint,4,opt,name=next_hop_mode,json=nextHopMode,proto3,enum=otg.BgpSrteV4Policy_NextHopMode_Enum,oneof" json:"next_hop_mode,omitempty"` - // Type of next hop IP address to be used when 'next_hop_mode' is set to 'manual'. - // default = NextHopAddressType.Enum.ipv4 - NextHopAddressType *BgpSrteV4Policy_NextHopAddressType_Enum `protobuf:"varint,5,opt,name=next_hop_address_type,json=nextHopAddressType,proto3,enum=otg.BgpSrteV4Policy_NextHopAddressType_Enum,oneof" json:"next_hop_address_type,omitempty"` - // The IPv4 address of the next hop if the Nexthop type 'next_hop_mode' is 'manual' - // and the Nexthop type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, - // Nexthop Encoding capability extended_next_hop_encoding should be enabled. - NextHopIpv4Address *string `protobuf:"bytes,6,opt,name=next_hop_ipv4_address,json=nextHopIpv4Address,proto3,oneof" json:"next_hop_ipv4_address,omitempty"` - // The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type' is 'manual' - // and the Nexthop type 'next_hop_address_type' is IPv6. - NextHopIpv6Address *string `protobuf:"bytes,7,opt,name=next_hop_ipv6_address,json=nextHopIpv6Address,proto3,oneof" json:"next_hop_ipv6_address,omitempty"` - // Description missing in models - Advanced *BgpRouteAdvanced `protobuf:"bytes,8,opt,name=advanced,proto3" json:"advanced,omitempty"` - // Description missing in models - AddPath *BgpAddPath `protobuf:"bytes,9,opt,name=add_path,json=addPath,proto3" json:"add_path,omitempty"` + // This contains the list of Broadcast Domains to be configured per EVI. + BroadcastDomains []*BgpV4EviVxlanBroadcastDomain `protobuf:"bytes,1,rep,name=broadcast_domains,json=broadcastDomains,proto3" json:"broadcast_domains,omitempty"` + // This model only supports Ingress Replication + // default = ReplicationType.Enum.ingress_replication + ReplicationType *BgpV4EviVxlan_ReplicationType_Enum `protobuf:"varint,2,opt,name=replication_type,json=replicationType,proto3,enum=otg.BgpV4EviVxlan_ReplicationType_Enum,oneof" json:"replication_type,omitempty"` + // Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel + // attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. + // default = 16 + PmsiLabel *uint32 `protobuf:"varint,3,opt,name=pmsi_label,json=pmsiLabel,proto3,oneof" json:"pmsi_label,omitempty"` + // The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet + // Auto-discovery Route per + // default = 0 + AdLabel *uint32 `protobuf:"varint,4,opt,name=ad_label,json=adLabel,proto3,oneof" json:"ad_label,omitempty"` + // Colon separated Extended Community value of 6 Bytes - AS number: Value identifying + // an EVI. Example - for the as_2octet 60005:100. + RouteDistinguisher *BgpRouteDistinguisher `protobuf:"bytes,5,opt,name=route_distinguisher,json=routeDistinguisher,proto3" json:"route_distinguisher,omitempty"` + // List of Layer 2 Virtual Network Identifier (L2VNI) export targets associated with + // this EVI. + RouteTargetExport []*BgpRouteTarget `protobuf:"bytes,6,rep,name=route_target_export,json=routeTargetExport,proto3" json:"route_target_export,omitempty"` + // List of L2VNI import targets associated with this EVI. + RouteTargetImport []*BgpRouteTarget `protobuf:"bytes,7,rep,name=route_target_import,json=routeTargetImport,proto3" json:"route_target_import,omitempty"` + // List of Layer 3 Virtual Network Identifier (L3VNI) Export Route Targets. + L3RouteTargetExport []*BgpRouteTarget `protobuf:"bytes,8,rep,name=l3_route_target_export,json=l3RouteTargetExport,proto3" json:"l3_route_target_export,omitempty"` + // List of L3VNI Import Route Targets. + L3RouteTargetImport []*BgpRouteTarget `protobuf:"bytes,9,rep,name=l3_route_target_import,json=l3RouteTargetImport,proto3" json:"l3_route_target_import,omitempty"` // Description missing in models - AsPath *BgpAsPath `protobuf:"bytes,10,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` - // Optional Community settings. + Advanced *BgpRouteAdvanced `protobuf:"bytes,10,opt,name=advanced,proto3" json:"advanced,omitempty"` + // Optional community settings. Communities []*BgpCommunity `protobuf:"bytes,11,rep,name=communities,proto3" json:"communities,omitempty"` // Optional Extended Community settings. The Extended Communities Attribute is a transitive // optional BGP attribute, with the Type Code 16. Community and Extended Communities @@ -31494,37 +33625,27 @@ type BgpSrteV4Policy struct { // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates // occur for the same MAC address. ExtCommunities []*BgpExtCommunity `protobuf:"bytes,12,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` - // List Tunnel Encapsulation Attributes. - TunnelTlvs []*BgpSrteV4TunnelTlv `protobuf:"bytes,13,rep,name=tunnel_tlvs,json=tunnelTlvs,proto3" json:"tunnel_tlvs,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,14,opt,name=name,proto3,oneof" json:"name,omitempty"` - // If enabled means that this part of the configuration including any active 'children' - // nodes will be advertised to peer. If disabled, this means that though config is - // present, it is not taking any part of the test but can be activated at run-time to - // advertise just this part of the configuration to the peer. - // default = True - Active *bool `protobuf:"varint,15,opt,name=active,proto3,oneof" json:"active,omitempty"` + // Optional AS PATH settings. + AsPath *BgpAsPath `protobuf:"bytes,13,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` } -func (x *BgpSrteV4Policy) Reset() { - *x = BgpSrteV4Policy{} +func (x *BgpV4EviVxlan) Reset() { + *x = BgpV4EviVxlan{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[101] + mi := &file_otg_proto_msgTypes[104] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpSrteV4Policy) String() string { +func (x *BgpV4EviVxlan) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteV4Policy) ProtoMessage() {} +func (*BgpV4EviVxlan) ProtoMessage() {} -func (x *BgpSrteV4Policy) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[101] +func (x *BgpV4EviVxlan) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[104] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -31535,167 +33656,258 @@ func (x *BgpSrteV4Policy) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteV4Policy.ProtoReflect.Descriptor instead. -func (*BgpSrteV4Policy) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{101} +// Deprecated: Use BgpV4EviVxlan.ProtoReflect.Descriptor instead. +func (*BgpV4EviVxlan) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{104} } -func (x *BgpSrteV4Policy) GetDistinguisher() uint32 { - if x != nil && x.Distinguisher != nil { - return *x.Distinguisher +func (x *BgpV4EviVxlan) GetBroadcastDomains() []*BgpV4EviVxlanBroadcastDomain { + if x != nil { + return x.BroadcastDomains } - return 0 + return nil } -func (x *BgpSrteV4Policy) GetColor() uint32 { - if x != nil && x.Color != nil { - return *x.Color +func (x *BgpV4EviVxlan) GetReplicationType() BgpV4EviVxlan_ReplicationType_Enum { + if x != nil && x.ReplicationType != nil { + return *x.ReplicationType } - return 0 + return BgpV4EviVxlan_ReplicationType_unspecified } -func (x *BgpSrteV4Policy) GetIpv4Endpoint() string { - if x != nil && x.Ipv4Endpoint != nil { - return *x.Ipv4Endpoint +func (x *BgpV4EviVxlan) GetPmsiLabel() uint32 { + if x != nil && x.PmsiLabel != nil { + return *x.PmsiLabel } - return "" + return 0 } -func (x *BgpSrteV4Policy) GetNextHopMode() BgpSrteV4Policy_NextHopMode_Enum { - if x != nil && x.NextHopMode != nil { - return *x.NextHopMode +func (x *BgpV4EviVxlan) GetAdLabel() uint32 { + if x != nil && x.AdLabel != nil { + return *x.AdLabel } - return BgpSrteV4Policy_NextHopMode_unspecified + return 0 } -func (x *BgpSrteV4Policy) GetNextHopAddressType() BgpSrteV4Policy_NextHopAddressType_Enum { - if x != nil && x.NextHopAddressType != nil { - return *x.NextHopAddressType +func (x *BgpV4EviVxlan) GetRouteDistinguisher() *BgpRouteDistinguisher { + if x != nil { + return x.RouteDistinguisher } - return BgpSrteV4Policy_NextHopAddressType_unspecified + return nil } -func (x *BgpSrteV4Policy) GetNextHopIpv4Address() string { - if x != nil && x.NextHopIpv4Address != nil { - return *x.NextHopIpv4Address +func (x *BgpV4EviVxlan) GetRouteTargetExport() []*BgpRouteTarget { + if x != nil { + return x.RouteTargetExport } - return "" + return nil } -func (x *BgpSrteV4Policy) GetNextHopIpv6Address() string { - if x != nil && x.NextHopIpv6Address != nil { - return *x.NextHopIpv6Address +func (x *BgpV4EviVxlan) GetRouteTargetImport() []*BgpRouteTarget { + if x != nil { + return x.RouteTargetImport } - return "" + return nil } -func (x *BgpSrteV4Policy) GetAdvanced() *BgpRouteAdvanced { +func (x *BgpV4EviVxlan) GetL3RouteTargetExport() []*BgpRouteTarget { if x != nil { - return x.Advanced + return x.L3RouteTargetExport } return nil } -func (x *BgpSrteV4Policy) GetAddPath() *BgpAddPath { +func (x *BgpV4EviVxlan) GetL3RouteTargetImport() []*BgpRouteTarget { if x != nil { - return x.AddPath + return x.L3RouteTargetImport } return nil } -func (x *BgpSrteV4Policy) GetAsPath() *BgpAsPath { +func (x *BgpV4EviVxlan) GetAdvanced() *BgpRouteAdvanced { if x != nil { - return x.AsPath + return x.Advanced } return nil } -func (x *BgpSrteV4Policy) GetCommunities() []*BgpCommunity { +func (x *BgpV4EviVxlan) GetCommunities() []*BgpCommunity { if x != nil { return x.Communities } return nil } -func (x *BgpSrteV4Policy) GetExtCommunities() []*BgpExtCommunity { +func (x *BgpV4EviVxlan) GetExtCommunities() []*BgpExtCommunity { if x != nil { return x.ExtCommunities } return nil } -func (x *BgpSrteV4Policy) GetTunnelTlvs() []*BgpSrteV4TunnelTlv { +func (x *BgpV4EviVxlan) GetAsPath() *BgpAsPath { if x != nil { - return x.TunnelTlvs + return x.AsPath } return nil } -func (x *BgpSrteV4Policy) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +// Configuration for Broadcast Domains per EVI. +type BgpV4EviVxlanBroadcastDomain struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This contains the list of Customer MAC/IP Ranges to be configured per Broadcast Domain. + // + // Advertises following route - + // Type 2 - MAC/IP Advertisement Route. + CmacIpRange []*BgpCMacIpRange `protobuf:"bytes,1,rep,name=cmac_ip_range,json=cmacIpRange,proto3" json:"cmac_ip_range,omitempty"` + // The Ethernet Tag ID of the Broadcast Domain. + // default = 0 + EthernetTagId *uint32 `protobuf:"varint,2,opt,name=ethernet_tag_id,json=ethernetTagId,proto3,oneof" json:"ethernet_tag_id,omitempty"` + // VLAN-Aware service to be enabled or disabled. + // default = False + VlanAwareService *bool `protobuf:"varint,3,opt,name=vlan_aware_service,json=vlanAwareService,proto3,oneof" json:"vlan_aware_service,omitempty"` +} + +func (x *BgpV4EviVxlanBroadcastDomain) Reset() { + *x = BgpV4EviVxlanBroadcastDomain{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -func (x *BgpSrteV4Policy) GetActive() bool { - if x != nil && x.Active != nil { - return *x.Active +func (x *BgpV4EviVxlanBroadcastDomain) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpV4EviVxlanBroadcastDomain) ProtoMessage() {} + +func (x *BgpV4EviVxlanBroadcastDomain) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[105] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpV4EviVxlanBroadcastDomain.ProtoReflect.Descriptor instead. +func (*BgpV4EviVxlanBroadcastDomain) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{105} +} + +func (x *BgpV4EviVxlanBroadcastDomain) GetCmacIpRange() []*BgpCMacIpRange { + if x != nil { + return x.CmacIpRange + } + return nil +} + +func (x *BgpV4EviVxlanBroadcastDomain) GetEthernetTagId() uint32 { + if x != nil && x.EthernetTagId != nil { + return *x.EthernetTagId + } + return 0 +} + +func (x *BgpV4EviVxlanBroadcastDomain) GetVlanAwareService() bool { + if x != nil && x.VlanAwareService != nil { + return *x.VlanAwareService } return false } -// Configuration for BGP SRTE Tunnel TLV. -type BgpSrteV4TunnelTlv struct { +// Configuration for MAC/IP Ranges per Broadcast Domain. +// +// Advertises following route - +// +// Type 2 - MAC/IP Advertisement Route. +type BgpCMacIpRange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Host MAC address range per Broadcast Domain. + MacAddresses *MACRouteAddress `protobuf:"bytes,1,opt,name=mac_addresses,json=macAddresses,proto3" json:"mac_addresses,omitempty"` + // Layer 2 Virtual Network Identifier (L2VNI) to be advertised with MAC/IP Advertisement + // Route (Type 2) + // default = 0 + L2Vni *uint32 `protobuf:"varint,2,opt,name=l2vni,proto3,oneof" json:"l2vni,omitempty"` + // Host IPv4 address range per Broadcast Domain. + Ipv4Addresses *V4RouteAddress `protobuf:"bytes,3,opt,name=ipv4_addresses,json=ipv4Addresses,proto3" json:"ipv4_addresses,omitempty"` + // Host IPv6 address range per Broadcast Domain. + Ipv6Addresses *V6RouteAddress `protobuf:"bytes,4,opt,name=ipv6_addresses,json=ipv6Addresses,proto3" json:"ipv6_addresses,omitempty"` + // Layer 3 Virtual Network Identifier (L3VNI) to be advertised with MAC/IP Advertisement + // Route (Type 2). + // default = 0 + L3Vni *uint32 `protobuf:"varint,5,opt,name=l3vni,proto3,oneof" json:"l3vni,omitempty"` + // Include default Gateway Extended Community in MAC/IP Advertisement Route (Type 2). + // default = False + IncludeDefaultGateway *bool `protobuf:"varint,6,opt,name=include_default_gateway,json=includeDefaultGateway,proto3,oneof" json:"include_default_gateway,omitempty"` // Description missing in models - RemoteEndpointSubTlv *BgpSrteRemoteEndpointSubTlv `protobuf:"bytes,1,opt,name=remote_endpoint_sub_tlv,json=remoteEndpointSubTlv,proto3" json:"remote_endpoint_sub_tlv,omitempty"` - // Description missing in models - ColorSubTlv *BgpSrteColorSubTlv `protobuf:"bytes,2,opt,name=color_sub_tlv,json=colorSubTlv,proto3" json:"color_sub_tlv,omitempty"` - // Description missing in models - BindingSubTlv *BgpSrteBindingSubTlv `protobuf:"bytes,3,opt,name=binding_sub_tlv,json=bindingSubTlv,proto3" json:"binding_sub_tlv,omitempty"` - // Description missing in models - PreferenceSubTlv *BgpSrtePreferenceSubTlv `protobuf:"bytes,4,opt,name=preference_sub_tlv,json=preferenceSubTlv,proto3" json:"preference_sub_tlv,omitempty"` - // Description missing in models - PolicyPrioritySubTlv *BgpSrtePolicyPrioritySubTlv `protobuf:"bytes,5,opt,name=policy_priority_sub_tlv,json=policyPrioritySubTlv,proto3" json:"policy_priority_sub_tlv,omitempty"` - // Description missing in models - PolicyNameSubTlv *BgpSrtePolicyNameSubTlv `protobuf:"bytes,6,opt,name=policy_name_sub_tlv,json=policyNameSubTlv,proto3" json:"policy_name_sub_tlv,omitempty"` - // Description missing in models - ExplicitNullLabelPolicySubTlv *BgpSrteExplicitNullLabelPolicySubTlv `protobuf:"bytes,7,opt,name=explicit_null_label_policy_sub_tlv,json=explicitNullLabelPolicySubTlv,proto3" json:"explicit_null_label_policy_sub_tlv,omitempty"` - // Description missing in models - SegmentLists []*BgpSrteSegmentList `protobuf:"bytes,8,rep,name=segment_lists,json=segmentLists,proto3" json:"segment_lists,omitempty"` + Advanced *BgpRouteAdvanced `protobuf:"bytes,7,opt,name=advanced,proto3" json:"advanced,omitempty"` + // Optional community settings. + Communities []*BgpCommunity `protobuf:"bytes,8,rep,name=communities,proto3" json:"communities,omitempty"` + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. + ExtCommunities []*BgpExtCommunity `protobuf:"bytes,9,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` + // Optional AS PATH settings. + AsPath *BgpAsPath `protobuf:"bytes,10,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` // Globally unique name of an object. It also serves as the primary key for arrays of // objects. // required = true - Name *string `protobuf:"bytes,9,opt,name=name,proto3,oneof" json:"name,omitempty"` - // If enabled means that this part of the configuration including any active 'children' - // nodes will be advertised to peer. If disabled, this means that though config is - // present, it is not taking any part of the test but can be activated at run-time to - // advertise just this part of the configuration to the peer. - // default = True - Active *bool `protobuf:"varint,10,opt,name=active,proto3,oneof" json:"active,omitempty"` + Name *string `protobuf:"bytes,11,opt,name=name,proto3,oneof" json:"name,omitempty"` } -func (x *BgpSrteV4TunnelTlv) Reset() { - *x = BgpSrteV4TunnelTlv{} +func (x *BgpCMacIpRange) Reset() { + *x = BgpCMacIpRange{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[102] + mi := &file_otg_proto_msgTypes[106] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpSrteV4TunnelTlv) String() string { +func (x *BgpCMacIpRange) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteV4TunnelTlv) ProtoMessage() {} +func (*BgpCMacIpRange) ProtoMessage() {} -func (x *BgpSrteV4TunnelTlv) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[102] +func (x *BgpCMacIpRange) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[106] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -31706,118 +33918,125 @@ func (x *BgpSrteV4TunnelTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteV4TunnelTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteV4TunnelTlv) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{102} +// Deprecated: Use BgpCMacIpRange.ProtoReflect.Descriptor instead. +func (*BgpCMacIpRange) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{106} } -func (x *BgpSrteV4TunnelTlv) GetRemoteEndpointSubTlv() *BgpSrteRemoteEndpointSubTlv { +func (x *BgpCMacIpRange) GetMacAddresses() *MACRouteAddress { if x != nil { - return x.RemoteEndpointSubTlv + return x.MacAddresses } return nil } -func (x *BgpSrteV4TunnelTlv) GetColorSubTlv() *BgpSrteColorSubTlv { - if x != nil { - return x.ColorSubTlv +func (x *BgpCMacIpRange) GetL2Vni() uint32 { + if x != nil && x.L2Vni != nil { + return *x.L2Vni } - return nil + return 0 } -func (x *BgpSrteV4TunnelTlv) GetBindingSubTlv() *BgpSrteBindingSubTlv { +func (x *BgpCMacIpRange) GetIpv4Addresses() *V4RouteAddress { if x != nil { - return x.BindingSubTlv + return x.Ipv4Addresses } return nil } -func (x *BgpSrteV4TunnelTlv) GetPreferenceSubTlv() *BgpSrtePreferenceSubTlv { +func (x *BgpCMacIpRange) GetIpv6Addresses() *V6RouteAddress { if x != nil { - return x.PreferenceSubTlv + return x.Ipv6Addresses } return nil } -func (x *BgpSrteV4TunnelTlv) GetPolicyPrioritySubTlv() *BgpSrtePolicyPrioritySubTlv { +func (x *BgpCMacIpRange) GetL3Vni() uint32 { + if x != nil && x.L3Vni != nil { + return *x.L3Vni + } + return 0 +} + +func (x *BgpCMacIpRange) GetIncludeDefaultGateway() bool { + if x != nil && x.IncludeDefaultGateway != nil { + return *x.IncludeDefaultGateway + } + return false +} + +func (x *BgpCMacIpRange) GetAdvanced() *BgpRouteAdvanced { if x != nil { - return x.PolicyPrioritySubTlv + return x.Advanced } return nil } -func (x *BgpSrteV4TunnelTlv) GetPolicyNameSubTlv() *BgpSrtePolicyNameSubTlv { +func (x *BgpCMacIpRange) GetCommunities() []*BgpCommunity { if x != nil { - return x.PolicyNameSubTlv + return x.Communities } return nil } -func (x *BgpSrteV4TunnelTlv) GetExplicitNullLabelPolicySubTlv() *BgpSrteExplicitNullLabelPolicySubTlv { +func (x *BgpCMacIpRange) GetExtCommunities() []*BgpExtCommunity { if x != nil { - return x.ExplicitNullLabelPolicySubTlv + return x.ExtCommunities } return nil } -func (x *BgpSrteV4TunnelTlv) GetSegmentLists() []*BgpSrteSegmentList { +func (x *BgpCMacIpRange) GetAsPath() *BgpAsPath { if x != nil { - return x.SegmentLists + return x.AsPath } return nil } -func (x *BgpSrteV4TunnelTlv) GetName() string { +func (x *BgpCMacIpRange) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *BgpSrteV4TunnelTlv) GetActive() bool { - if x != nil && x.Active != nil { - return *x.Active - } - return false -} - -// Configuration for the BGP remote endpoint sub TLV. -type BgpSrteRemoteEndpointSubTlv struct { +// BGP Route Distinguisher. +type BgpRouteDistinguisher struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Autonomous system (AS) number - // default = 0 - AsNumber *uint32 `protobuf:"varint,1,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` - // Determines the address type - // default = AddressFamily.Enum.ipv4 - AddressFamily *BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum `protobuf:"varint,2,opt,name=address_family,json=addressFamily,proto3,enum=otg.BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum,oneof" json:"address_family,omitempty"` - // The IPv4 address of the Remote Endpoint. - // default = 0.0.0.0 - Ipv4Address *string `protobuf:"bytes,3,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` - // The IPv6 address of the Remote Endpoint. - // default = ::0 - Ipv6Address *string `protobuf:"bytes,4,opt,name=ipv6_address,json=ipv6Address,proto3,oneof" json:"ipv6_address,omitempty"` + // Route Distinguisher Type field of 2 Byte. + // - as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). + // - ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). + // - as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). + // default = RdType.Enum.as_2octet + RdType *BgpRouteDistinguisher_RdType_Enum `protobuf:"varint,1,opt,name=rd_type,json=rdType,proto3,enum=otg.BgpRouteDistinguisher_RdType_Enum,oneof" json:"rd_type,omitempty"` + // Allow to automatically configure RD IP address from local ip. + // default = False + AutoConfigRdIpAddr *bool `protobuf:"varint,2,opt,name=auto_config_rd_ip_addr,json=autoConfigRdIpAddr,proto3,oneof" json:"auto_config_rd_ip_addr,omitempty"` + // Colon separated Extended Community value of 6 Bytes - AS number: Value. Example + // - for the as_2octet or as_4octet 60005:100, for ipv4_address 1.1.1.1:100 + RdValue *string `protobuf:"bytes,3,opt,name=rd_value,json=rdValue,proto3,oneof" json:"rd_value,omitempty"` } -func (x *BgpSrteRemoteEndpointSubTlv) Reset() { - *x = BgpSrteRemoteEndpointSubTlv{} +func (x *BgpRouteDistinguisher) Reset() { + *x = BgpRouteDistinguisher{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[103] + mi := &file_otg_proto_msgTypes[107] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpSrteRemoteEndpointSubTlv) String() string { +func (x *BgpRouteDistinguisher) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteRemoteEndpointSubTlv) ProtoMessage() {} +func (*BgpRouteDistinguisher) ProtoMessage() {} -func (x *BgpSrteRemoteEndpointSubTlv) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[103] +func (x *BgpRouteDistinguisher) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[107] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -31828,70 +34047,65 @@ func (x *BgpSrteRemoteEndpointSubTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteRemoteEndpointSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteRemoteEndpointSubTlv) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{103} -} - -func (x *BgpSrteRemoteEndpointSubTlv) GetAsNumber() uint32 { - if x != nil && x.AsNumber != nil { - return *x.AsNumber - } - return 0 +// Deprecated: Use BgpRouteDistinguisher.ProtoReflect.Descriptor instead. +func (*BgpRouteDistinguisher) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{107} } -func (x *BgpSrteRemoteEndpointSubTlv) GetAddressFamily() BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum { - if x != nil && x.AddressFamily != nil { - return *x.AddressFamily +func (x *BgpRouteDistinguisher) GetRdType() BgpRouteDistinguisher_RdType_Enum { + if x != nil && x.RdType != nil { + return *x.RdType } - return BgpSrteRemoteEndpointSubTlv_AddressFamily_unspecified + return BgpRouteDistinguisher_RdType_unspecified } -func (x *BgpSrteRemoteEndpointSubTlv) GetIpv4Address() string { - if x != nil && x.Ipv4Address != nil { - return *x.Ipv4Address +func (x *BgpRouteDistinguisher) GetAutoConfigRdIpAddr() bool { + if x != nil && x.AutoConfigRdIpAddr != nil { + return *x.AutoConfigRdIpAddr } - return "" + return false } -func (x *BgpSrteRemoteEndpointSubTlv) GetIpv6Address() string { - if x != nil && x.Ipv6Address != nil { - return *x.Ipv6Address +func (x *BgpRouteDistinguisher) GetRdValue() string { + if x != nil && x.RdValue != nil { + return *x.RdValue } return "" } -// Configuration for the Policy Color attribute sub-TLV. The Color sub-TLV MAY be used -// as a way to color the corresponding Tunnel TLV. The Value field of the sub-TLV is -// eight octets long and consists of a Color Extended Community. First two octets of -// its Value field are 0x030b as type and subtype of extended community. Remaining -// six octets are are exposed to configure. -type BgpSrteColorSubTlv struct { +// BGP Route Target. +type BgpRouteTarget struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Six octet values. Example: 000000000064 for color value 100. - Color *string `protobuf:"bytes,1,opt,name=color,proto3,oneof" json:"color,omitempty"` + // Extended Community Type field of 2 Byte. + // - as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). + // - ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). + // - as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). + RtType *BgpRouteTarget_RtType_Enum `protobuf:"varint,1,opt,name=rt_type,json=rtType,proto3,enum=otg.BgpRouteTarget_RtType_Enum,oneof" json:"rt_type,omitempty"` + // Colon separated Extended Community value of 6 Bytes - AS number: Assigned Number. + // Example - for the as_2octet or as_4octet 60005:100, for ipv4_address 1.1.1.1:100 + RtValue *string `protobuf:"bytes,2,opt,name=rt_value,json=rtValue,proto3,oneof" json:"rt_value,omitempty"` } -func (x *BgpSrteColorSubTlv) Reset() { - *x = BgpSrteColorSubTlv{} +func (x *BgpRouteTarget) Reset() { + *x = BgpRouteTarget{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[104] + mi := &file_otg_proto_msgTypes[108] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpSrteColorSubTlv) String() string { +func (x *BgpRouteTarget) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteColorSubTlv) ProtoMessage() {} +func (*BgpRouteTarget) ProtoMessage() {} -func (x *BgpSrteColorSubTlv) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[104] +func (x *BgpRouteTarget) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[108] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -31902,58 +34116,82 @@ func (x *BgpSrteColorSubTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteColorSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteColorSubTlv) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{104} +// Deprecated: Use BgpRouteTarget.ProtoReflect.Descriptor instead. +func (*BgpRouteTarget) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{108} } -func (x *BgpSrteColorSubTlv) GetColor() string { - if x != nil && x.Color != nil { - return *x.Color +func (x *BgpRouteTarget) GetRtType() BgpRouteTarget_RtType_Enum { + if x != nil && x.RtType != nil { + return *x.RtType + } + return BgpRouteTarget_RtType_unspecified +} + +func (x *BgpRouteTarget) GetRtValue() string { + if x != nil && x.RtValue != nil { + return *x.RtValue } return "" } -// Configuration for the binding SID sub-TLV. This is used to signal the binding SID -// related information of the SR Policy candidate path. -type BgpSrteBindingSubTlv struct { +// Configuration for BGP advanced settings. +type BgpAdvanced struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Type of the binding SID. Supported types are No Binding SID or Four Octets Sid or - // IPv6 SID. - // default = BindingSidType.Enum.no_binding - BindingSidType *BgpSrteBindingSubTlv_BindingSidType_Enum `protobuf:"varint,1,opt,name=binding_sid_type,json=bindingSidType,proto3,enum=otg.BgpSrteBindingSubTlv_BindingSidType_Enum,oneof" json:"binding_sid_type,omitempty"` - // Binding SID is encoded in 4 octets. - FourOctetSid *uint32 `protobuf:"varint,2,opt,name=four_octet_sid,json=fourOctetSid,proto3,oneof" json:"four_octet_sid,omitempty"` - // IPv6 SID value. - Ipv6Sid *string `protobuf:"bytes,3,opt,name=ipv6_sid,json=ipv6Sid,proto3,oneof" json:"ipv6_sid,omitempty"` - // S-Flag encodes the Specified-BSID-only behavior. - // default = False - SFlag *bool `protobuf:"varint,4,opt,name=s_flag,json=sFlag,proto3,oneof" json:"s_flag,omitempty"` - // I-Flag encodes the Drop Upon Invalid behavior. + // Number of seconds the sender proposes for the value of the Hold Timer. + // default = 90 + HoldTimeInterval *uint32 `protobuf:"varint,1,opt,name=hold_time_interval,json=holdTimeInterval,proto3,oneof" json:"hold_time_interval,omitempty"` + // Number of seconds between transmissions of Keepalive messages by this peer. + // default = 30 + KeepAliveInterval *uint32 `protobuf:"varint,2,opt,name=keep_alive_interval,json=keepAliveInterval,proto3,oneof" json:"keep_alive_interval,omitempty"` + // The time interval at which Update messages are sent to the DUT, expressed as the + // number of milliseconds between Update messages. The update interval 0 implies to + // send all the updates as fast as possible. + // default = 0 + UpdateInterval *uint32 `protobuf:"varint,3,opt,name=update_interval,json=updateInterval,proto3,oneof" json:"update_interval,omitempty"` + // The limited number of iterations that a unit of data can experience before the data + // is discarded. This is placed in the TTL field in the IP header of the transmitted + // packets. + // default = 64 + TimeToLive *uint32 `protobuf:"varint,4,opt,name=time_to_live,json=timeToLive,proto3,oneof" json:"time_to_live,omitempty"` + // The value to be used as a secret MD5 key for authentication. If not configured, MD5 + // authentication will not be enabled. + Md5Key *string `protobuf:"bytes,5,opt,name=md5_key,json=md5Key,proto3,oneof" json:"md5_key,omitempty"` + // If set to true, the local BGP peer will wait for the remote peer to initiate the + // BGP session + // by establishing the TCP connection, rather than initiating sessions from the local + // peer. // default = False - IFlag *bool `protobuf:"varint,5,opt,name=i_flag,json=iFlag,proto3,oneof" json:"i_flag,omitempty"` + PassiveMode *bool `protobuf:"varint,6,opt,name=passive_mode,json=passiveMode,proto3,oneof" json:"passive_mode,omitempty"` + // The TCP port number on which to accept BGP connections from the remote peer. + // default = 179 + ListenPort *uint32 `protobuf:"varint,7,opt,name=listen_port,json=listenPort,proto3,oneof" json:"listen_port,omitempty"` + // Destination TCP port number of the BGP peer when initiating a + // session from the local BGP peer. + // default = 179 + NeighborPort *uint32 `protobuf:"varint,8,opt,name=neighbor_port,json=neighborPort,proto3,oneof" json:"neighbor_port,omitempty"` } -func (x *BgpSrteBindingSubTlv) Reset() { - *x = BgpSrteBindingSubTlv{} +func (x *BgpAdvanced) Reset() { + *x = BgpAdvanced{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[105] + mi := &file_otg_proto_msgTypes[109] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpSrteBindingSubTlv) String() string { +func (x *BgpAdvanced) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteBindingSubTlv) ProtoMessage() {} +func (*BgpAdvanced) ProtoMessage() {} -func (x *BgpSrteBindingSubTlv) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[105] +func (x *BgpAdvanced) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[109] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -31964,124 +34202,179 @@ func (x *BgpSrteBindingSubTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteBindingSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteBindingSubTlv) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{105} +// Deprecated: Use BgpAdvanced.ProtoReflect.Descriptor instead. +func (*BgpAdvanced) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{109} } -func (x *BgpSrteBindingSubTlv) GetBindingSidType() BgpSrteBindingSubTlv_BindingSidType_Enum { - if x != nil && x.BindingSidType != nil { - return *x.BindingSidType +func (x *BgpAdvanced) GetHoldTimeInterval() uint32 { + if x != nil && x.HoldTimeInterval != nil { + return *x.HoldTimeInterval } - return BgpSrteBindingSubTlv_BindingSidType_unspecified + return 0 } -func (x *BgpSrteBindingSubTlv) GetFourOctetSid() uint32 { - if x != nil && x.FourOctetSid != nil { - return *x.FourOctetSid +func (x *BgpAdvanced) GetKeepAliveInterval() uint32 { + if x != nil && x.KeepAliveInterval != nil { + return *x.KeepAliveInterval } return 0 } -func (x *BgpSrteBindingSubTlv) GetIpv6Sid() string { - if x != nil && x.Ipv6Sid != nil { - return *x.Ipv6Sid +func (x *BgpAdvanced) GetUpdateInterval() uint32 { + if x != nil && x.UpdateInterval != nil { + return *x.UpdateInterval } - return "" + return 0 } -func (x *BgpSrteBindingSubTlv) GetSFlag() bool { - if x != nil && x.SFlag != nil { - return *x.SFlag +func (x *BgpAdvanced) GetTimeToLive() uint32 { + if x != nil && x.TimeToLive != nil { + return *x.TimeToLive } - return false + return 0 } -func (x *BgpSrteBindingSubTlv) GetIFlag() bool { - if x != nil && x.IFlag != nil { - return *x.IFlag +func (x *BgpAdvanced) GetMd5Key() string { + if x != nil && x.Md5Key != nil { + return *x.Md5Key } - return false -} - -// Configuration for BGP preference sub TLV of the SR Policy candidate path. -type BgpSrtePreferenceSubTlv struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The preference value of the SR Policy candidate path. - // default = 0 - Preference *uint32 `protobuf:"varint,1,opt,name=preference,proto3,oneof" json:"preference,omitempty"` + return "" } -func (x *BgpSrtePreferenceSubTlv) Reset() { - *x = BgpSrtePreferenceSubTlv{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *BgpAdvanced) GetPassiveMode() bool { + if x != nil && x.PassiveMode != nil { + return *x.PassiveMode } + return false } -func (x *BgpSrtePreferenceSubTlv) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BgpSrtePreferenceSubTlv) ProtoMessage() {} - -func (x *BgpSrtePreferenceSubTlv) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[106] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *BgpAdvanced) GetListenPort() uint32 { + if x != nil && x.ListenPort != nil { + return *x.ListenPort } - return mi.MessageOf(x) -} - -// Deprecated: Use BgpSrtePreferenceSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrtePreferenceSubTlv) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{106} + return 0 } -func (x *BgpSrtePreferenceSubTlv) GetPreference() uint32 { - if x != nil && x.Preference != nil { - return *x.Preference +func (x *BgpAdvanced) GetNeighborPort() uint32 { + if x != nil && x.NeighborPort != nil { + return *x.NeighborPort } return 0 } -// Configuration for the Policy Priority sub-TLV. The Policy Priority to indicate the -// order in which the SR policies are re-computed upon topological change. -type BgpSrtePolicyPrioritySubTlv struct { +// Configuration for BGP capability settings. +type BgpCapability struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // One-octet Priority value. - PolicyPriority *uint32 `protobuf:"varint,1,opt,name=policy_priority,json=policyPriority,proto3,oneof" json:"policy_priority,omitempty"` + // Support for the IPv4 Unicast address family. + // default = True + Ipv4Unicast *bool `protobuf:"varint,1,opt,name=ipv4_unicast,json=ipv4Unicast,proto3,oneof" json:"ipv4_unicast,omitempty"` + // Support for the IPv4 Multicast address family. + // default = False + Ipv4Multicast *bool `protobuf:"varint,2,opt,name=ipv4_multicast,json=ipv4Multicast,proto3,oneof" json:"ipv4_multicast,omitempty"` + // Support for the IPv4 Unicast address family. + // default = True + Ipv6Unicast *bool `protobuf:"varint,3,opt,name=ipv6_unicast,json=ipv6Unicast,proto3,oneof" json:"ipv6_unicast,omitempty"` + // Support for the IPv6 Multicast address family. + // default = False + Ipv6Multicast *bool `protobuf:"varint,4,opt,name=ipv6_multicast,json=ipv6Multicast,proto3,oneof" json:"ipv6_multicast,omitempty"` + // Support for VPLS as below. + // RFC4761 - Virtual Private LAN Service (VPLS) using BGP for Auto-Discovery + // and Signaling. + // RFC6624 - Layer 2 Virtual Private Networks using BGP for Auto-Discovery + // and Signaling. + // default = False + Vpls *bool `protobuf:"varint,5,opt,name=vpls,proto3,oneof" json:"vpls,omitempty"` + // Support for the route refresh capabilities. Route Refresh allows the dynamic exchange + // of route refresh requests and routing information between BGP peers and the subsequent + // re-advertisement of the outbound or inbound routing table. + // default = True + RouteRefresh *bool `protobuf:"varint,6,opt,name=route_refresh,json=routeRefresh,proto3,oneof" json:"route_refresh,omitempty"` + // Supports for the route constraint capabilities. Route Constraint allows the advertisement + // of Route Target Membership information. The BGP peers exchange Route Target Reachability + // Information, which is used to build a route distribution graph. This limits the + // propagation of VPN Network Layer Reachability Information (NLRI) between different + // autonomous systems or distinct clusters of the same autonomous system. This is supported + // for Layer 3 Virtual Private Network scenario. + // default = False + RouteConstraint *bool `protobuf:"varint,7,opt,name=route_constraint,json=routeConstraint,proto3,oneof" json:"route_constraint,omitempty"` + // Support for BGP Link State for ISIS and OSPF. + // default = False + LinkStateNonVpn *bool `protobuf:"varint,8,opt,name=link_state_non_vpn,json=linkStateNonVpn,proto3,oneof" json:"link_state_non_vpn,omitempty"` + // Capability advertisement of BGP Link State for VPNs. + // default = False + LinkStateVpn *bool `protobuf:"varint,9,opt,name=link_state_vpn,json=linkStateVpn,proto3,oneof" json:"link_state_vpn,omitempty"` + // Support for the EVPN address family. + // default = False + Evpn *bool `protobuf:"varint,10,opt,name=evpn,proto3,oneof" json:"evpn,omitempty"` + // Support for extended Next Hop Encoding for Nexthop field in IPv4 routes advertisement. + // This allows IPv4 routes being advertised by IPv6 peers to include an IPv6 Nexthop. + // default = False + ExtendedNextHopEncoding *bool `protobuf:"varint,11,opt,name=extended_next_hop_encoding,json=extendedNextHopEncoding,proto3,oneof" json:"extended_next_hop_encoding,omitempty"` + // Support for the IPv4 Multicast VPN address family. + // default = False + Ipv4MulticastVpn *bool `protobuf:"varint,12,opt,name=ipv4_multicast_vpn,json=ipv4MulticastVpn,proto3,oneof" json:"ipv4_multicast_vpn,omitempty"` + // Support for the IPv4 MPLS L3VPN address family. + // default = False + Ipv4MplsVpn *bool `protobuf:"varint,13,opt,name=ipv4_mpls_vpn,json=ipv4MplsVpn,proto3,oneof" json:"ipv4_mpls_vpn,omitempty"` + // Supports for IPv4 MDT address family messages. + // default = False + Ipv4Mdt *bool `protobuf:"varint,14,opt,name=ipv4_mdt,json=ipv4Mdt,proto3,oneof" json:"ipv4_mdt,omitempty"` + // Support for the IPv4 Multicast VPN address family. + // default = False + Ipv4MulticastMplsVpn *bool `protobuf:"varint,15,opt,name=ipv4_multicast_mpls_vpn,json=ipv4MulticastMplsVpn,proto3,oneof" json:"ipv4_multicast_mpls_vpn,omitempty"` + // Support for propagation of IPv4 unicast flow specification rules. + // default = False + Ipv4UnicastFlowSpec *bool `protobuf:"varint,16,opt,name=ipv4_unicast_flow_spec,json=ipv4UnicastFlowSpec,proto3,oneof" json:"ipv4_unicast_flow_spec,omitempty"` + // Support for IPv4 SRTE policy. + // default = False + Ipv4SrTePolicy *bool `protobuf:"varint,17,opt,name=ipv4_sr_te_policy,json=ipv4SrTePolicy,proto3,oneof" json:"ipv4_sr_te_policy,omitempty"` + // Support for IPv4 Unicast Add Path Capability. + // default = False + Ipv4UnicastAddPath *bool `protobuf:"varint,18,opt,name=ipv4_unicast_add_path,json=ipv4UnicastAddPath,proto3,oneof" json:"ipv4_unicast_add_path,omitempty"` + // Support for the IPv6 Multicast VPN address family. + // default = False + Ipv6MulticastVpn *bool `protobuf:"varint,19,opt,name=ipv6_multicast_vpn,json=ipv6MulticastVpn,proto3,oneof" json:"ipv6_multicast_vpn,omitempty"` + // Support for the IPv6 MPLS L3VPN address family. + // default = False + Ipv6MplsVpn *bool `protobuf:"varint,20,opt,name=ipv6_mpls_vpn,json=ipv6MplsVpn,proto3,oneof" json:"ipv6_mpls_vpn,omitempty"` + // Support for IPv6 MDT address family messages. + // default = False + Ipv6Mdt *bool `protobuf:"varint,21,opt,name=ipv6_mdt,json=ipv6Mdt,proto3,oneof" json:"ipv6_mdt,omitempty"` + // Support for the IPv6 Multicast VPN address family. + // default = False + Ipv6MulticastMplsVpn *bool `protobuf:"varint,22,opt,name=ipv6_multicast_mpls_vpn,json=ipv6MulticastMplsVpn,proto3,oneof" json:"ipv6_multicast_mpls_vpn,omitempty"` + // Support for propagation of IPv6 unicast flow specification rules. + // default = False + Ipv6UnicastFlowSpec *bool `protobuf:"varint,23,opt,name=ipv6_unicast_flow_spec,json=ipv6UnicastFlowSpec,proto3,oneof" json:"ipv6_unicast_flow_spec,omitempty"` + // Support for IPv6 SRTE policy. + // default = False + Ipv6SrTePolicy *bool `protobuf:"varint,24,opt,name=ipv6_sr_te_policy,json=ipv6SrTePolicy,proto3,oneof" json:"ipv6_sr_te_policy,omitempty"` + // Support for IPv6 Unicast Add Path Capability. + // default = False + Ipv6UnicastAddPath *bool `protobuf:"varint,25,opt,name=ipv6_unicast_add_path,json=ipv6UnicastAddPath,proto3,oneof" json:"ipv6_unicast_add_path,omitempty"` } -func (x *BgpSrtePolicyPrioritySubTlv) Reset() { - *x = BgpSrtePolicyPrioritySubTlv{} +func (x *BgpCapability) Reset() { + *x = BgpCapability{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[107] + mi := &file_otg_proto_msgTypes[110] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpSrtePolicyPrioritySubTlv) String() string { +func (x *BgpCapability) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrtePolicyPrioritySubTlv) ProtoMessage() {} +func (*BgpCapability) ProtoMessage() {} -func (x *BgpSrtePolicyPrioritySubTlv) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[107] +func (x *BgpCapability) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[110] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -32092,160 +34385,220 @@ func (x *BgpSrtePolicyPrioritySubTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrtePolicyPrioritySubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrtePolicyPrioritySubTlv) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{107} +// Deprecated: Use BgpCapability.ProtoReflect.Descriptor instead. +func (*BgpCapability) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{110} } -func (x *BgpSrtePolicyPrioritySubTlv) GetPolicyPriority() uint32 { - if x != nil && x.PolicyPriority != nil { - return *x.PolicyPriority +func (x *BgpCapability) GetIpv4Unicast() bool { + if x != nil && x.Ipv4Unicast != nil { + return *x.Ipv4Unicast } - return 0 + return false } -// Configuration for the Policy Name sub-TLV. The Policy Name sub-TLV is used to attach -// a symbolic name to the SR Policy candidate path. -type BgpSrtePolicyNameSubTlv struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Symbolic name for the policy that should be a string of printable ASCII characters, - // without a NULL terminator. - PolicyName *string `protobuf:"bytes,1,opt,name=policy_name,json=policyName,proto3,oneof" json:"policy_name,omitempty"` +func (x *BgpCapability) GetIpv4Multicast() bool { + if x != nil && x.Ipv4Multicast != nil { + return *x.Ipv4Multicast + } + return false } -func (x *BgpSrtePolicyNameSubTlv) Reset() { - *x = BgpSrtePolicyNameSubTlv{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *BgpCapability) GetIpv6Unicast() bool { + if x != nil && x.Ipv6Unicast != nil { + return *x.Ipv6Unicast } + return false } -func (x *BgpSrtePolicyNameSubTlv) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *BgpCapability) GetIpv6Multicast() bool { + if x != nil && x.Ipv6Multicast != nil { + return *x.Ipv6Multicast + } + return false } -func (*BgpSrtePolicyNameSubTlv) ProtoMessage() {} - -func (x *BgpSrtePolicyNameSubTlv) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[108] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *BgpCapability) GetVpls() bool { + if x != nil && x.Vpls != nil { + return *x.Vpls } - return mi.MessageOf(x) + return false } -// Deprecated: Use BgpSrtePolicyNameSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrtePolicyNameSubTlv) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{108} +func (x *BgpCapability) GetRouteRefresh() bool { + if x != nil && x.RouteRefresh != nil { + return *x.RouteRefresh + } + return false } -func (x *BgpSrtePolicyNameSubTlv) GetPolicyName() string { - if x != nil && x.PolicyName != nil { - return *x.PolicyName +func (x *BgpCapability) GetRouteConstraint() bool { + if x != nil && x.RouteConstraint != nil { + return *x.RouteConstraint } - return "" + return false } -// Configuration for BGP explicit null label policy sub TLV settings. -type BgpSrteExplicitNullLabelPolicySubTlv struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *BgpCapability) GetLinkStateNonVpn() bool { + if x != nil && x.LinkStateNonVpn != nil { + return *x.LinkStateNonVpn + } + return false +} - // The value of the explicit null label policy - // default = ExplicitNullLabelPolicy.Enum.do_not_push_enlp - ExplicitNullLabelPolicy *BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum `protobuf:"varint,1,opt,name=explicit_null_label_policy,json=explicitNullLabelPolicy,proto3,enum=otg.BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum,oneof" json:"explicit_null_label_policy,omitempty"` +func (x *BgpCapability) GetLinkStateVpn() bool { + if x != nil && x.LinkStateVpn != nil { + return *x.LinkStateVpn + } + return false } -func (x *BgpSrteExplicitNullLabelPolicySubTlv) Reset() { - *x = BgpSrteExplicitNullLabelPolicySubTlv{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *BgpCapability) GetEvpn() bool { + if x != nil && x.Evpn != nil { + return *x.Evpn } + return false } -func (x *BgpSrteExplicitNullLabelPolicySubTlv) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *BgpCapability) GetExtendedNextHopEncoding() bool { + if x != nil && x.ExtendedNextHopEncoding != nil { + return *x.ExtendedNextHopEncoding + } + return false } -func (*BgpSrteExplicitNullLabelPolicySubTlv) ProtoMessage() {} +func (x *BgpCapability) GetIpv4MulticastVpn() bool { + if x != nil && x.Ipv4MulticastVpn != nil { + return *x.Ipv4MulticastVpn + } + return false +} -func (x *BgpSrteExplicitNullLabelPolicySubTlv) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[109] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *BgpCapability) GetIpv4MplsVpn() bool { + if x != nil && x.Ipv4MplsVpn != nil { + return *x.Ipv4MplsVpn } - return mi.MessageOf(x) + return false } -// Deprecated: Use BgpSrteExplicitNullLabelPolicySubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteExplicitNullLabelPolicySubTlv) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{109} +func (x *BgpCapability) GetIpv4Mdt() bool { + if x != nil && x.Ipv4Mdt != nil { + return *x.Ipv4Mdt + } + return false } -func (x *BgpSrteExplicitNullLabelPolicySubTlv) GetExplicitNullLabelPolicy() BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum { - if x != nil && x.ExplicitNullLabelPolicy != nil { - return *x.ExplicitNullLabelPolicy +func (x *BgpCapability) GetIpv4MulticastMplsVpn() bool { + if x != nil && x.Ipv4MulticastMplsVpn != nil { + return *x.Ipv4MulticastMplsVpn } - return BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_unspecified + return false } -// Optional configuration for BGP SR TE Policy segment list. The Segment List sub-TLV -// encodes a single explicit path towards the Endpoint. -type BgpSrteSegmentList struct { +func (x *BgpCapability) GetIpv4UnicastFlowSpec() bool { + if x != nil && x.Ipv4UnicastFlowSpec != nil { + return *x.Ipv4UnicastFlowSpec + } + return false +} + +func (x *BgpCapability) GetIpv4SrTePolicy() bool { + if x != nil && x.Ipv4SrTePolicy != nil { + return *x.Ipv4SrTePolicy + } + return false +} + +func (x *BgpCapability) GetIpv4UnicastAddPath() bool { + if x != nil && x.Ipv4UnicastAddPath != nil { + return *x.Ipv4UnicastAddPath + } + return false +} + +func (x *BgpCapability) GetIpv6MulticastVpn() bool { + if x != nil && x.Ipv6MulticastVpn != nil { + return *x.Ipv6MulticastVpn + } + return false +} + +func (x *BgpCapability) GetIpv6MplsVpn() bool { + if x != nil && x.Ipv6MplsVpn != nil { + return *x.Ipv6MplsVpn + } + return false +} + +func (x *BgpCapability) GetIpv6Mdt() bool { + if x != nil && x.Ipv6Mdt != nil { + return *x.Ipv6Mdt + } + return false +} + +func (x *BgpCapability) GetIpv6MulticastMplsVpn() bool { + if x != nil && x.Ipv6MulticastMplsVpn != nil { + return *x.Ipv6MulticastMplsVpn + } + return false +} + +func (x *BgpCapability) GetIpv6UnicastFlowSpec() bool { + if x != nil && x.Ipv6UnicastFlowSpec != nil { + return *x.Ipv6UnicastFlowSpec + } + return false +} + +func (x *BgpCapability) GetIpv6SrTePolicy() bool { + if x != nil && x.Ipv6SrTePolicy != nil { + return *x.Ipv6SrTePolicy + } + return false +} + +func (x *BgpCapability) GetIpv6UnicastAddPath() bool { + if x != nil && x.Ipv6UnicastAddPath != nil { + return *x.Ipv6UnicastAddPath + } + return false +} + +// Configuration for controlling storage of BGP learned information recieved from the +// peer. +type BgpLearnedInformationFilter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The Weight associated with a given path and the sub-TLV is optional. - // default = 0 - Weight *uint32 `protobuf:"varint,1,opt,name=weight,proto3,oneof" json:"weight,omitempty"` - // Description missing in models - Segments []*BgpSrteSegment `protobuf:"bytes,2,rep,name=segments,proto3" json:"segments,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"` - // If enabled means that this part of the configuration including any active 'children' - // nodes will be advertised to peer. If disabled, this means that though config is - // present, it is not taking any part of the test but can be activated at run-time to - // advertise just this part of the configuration to the peer. - // default = True - Active *bool `protobuf:"varint,4,opt,name=active,proto3,oneof" json:"active,omitempty"` + // If enabled, will store the information related to Unicast IPv4 Prefixes recieved + // from the peer. + // default = False + UnicastIpv4Prefix *bool `protobuf:"varint,1,opt,name=unicast_ipv4_prefix,json=unicastIpv4Prefix,proto3,oneof" json:"unicast_ipv4_prefix,omitempty"` + // If enabled, will store the information related to Unicast IPv6 Prefixes recieved + // from the peer. + // default = False + UnicastIpv6Prefix *bool `protobuf:"varint,2,opt,name=unicast_ipv6_prefix,json=unicastIpv6Prefix,proto3,oneof" json:"unicast_ipv6_prefix,omitempty"` } -func (x *BgpSrteSegmentList) Reset() { - *x = BgpSrteSegmentList{} +func (x *BgpLearnedInformationFilter) Reset() { + *x = BgpLearnedInformationFilter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[110] + mi := &file_otg_proto_msgTypes[111] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpSrteSegmentList) String() string { +func (x *BgpLearnedInformationFilter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSegmentList) ProtoMessage() {} +func (*BgpLearnedInformationFilter) ProtoMessage() {} -func (x *BgpSrteSegmentList) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[110] +func (x *BgpLearnedInformationFilter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[111] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -32256,114 +34609,125 @@ func (x *BgpSrteSegmentList) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSegmentList.ProtoReflect.Descriptor instead. -func (*BgpSrteSegmentList) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{110} -} - -func (x *BgpSrteSegmentList) GetWeight() uint32 { - if x != nil && x.Weight != nil { - return *x.Weight - } - return 0 -} - -func (x *BgpSrteSegmentList) GetSegments() []*BgpSrteSegment { - if x != nil { - return x.Segments - } - return nil +// Deprecated: Use BgpLearnedInformationFilter.ProtoReflect.Descriptor instead. +func (*BgpLearnedInformationFilter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{111} } -func (x *BgpSrteSegmentList) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *BgpLearnedInformationFilter) GetUnicastIpv4Prefix() bool { + if x != nil && x.UnicastIpv4Prefix != nil { + return *x.UnicastIpv4Prefix } - return "" + return false } -func (x *BgpSrteSegmentList) GetActive() bool { - if x != nil && x.Active != nil { - return *x.Active +func (x *BgpLearnedInformationFilter) GetUnicastIpv6Prefix() bool { + if x != nil && x.UnicastIpv6Prefix != nil { + return *x.UnicastIpv6Prefix } return false } -// A Segment sub-TLV describes a single segment in a segment list i.e., a single element -// of the explicit path. The Segment sub-TLVs are optional. -type BgpSrteSegment struct { +// Emulated BGPv4 route range. +type BgpV4RouteRange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Specify one of the segment type. - // https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13 - // Type A: SID only, in the form of MPLS Label. - // Type B: SID only, in the form of IPv6 Address. - // Type C: IPv4 Node Address with optional SID. - // Type D: IPv6 Node Address with optional SID for SR MPLS. - // Type E: IPv4 Address and index with optional SID. - // Type F: IPv4 Local and Remote addresses with optional SID. - // Type G: IPv6 Address and index for local and remote pair with optional - // SID for SR MPLS. - // Type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. - // Type I: IPv6 Node Address with optional SID for SRv6. - // Type J: IPv6 Address and index for local and remote pair with optional - // SID for SRv6. - // Type K: IPv6 Local and Remote addresses for SRv6. - // required = true - SegmentType *BgpSrteSegment_SegmentType_Enum `protobuf:"varint,1,opt,name=segment_type,json=segmentType,proto3,enum=otg.BgpSrteSegment_SegmentType_Enum,oneof" json:"segment_type,omitempty"` - // Description missing in models - TypeA *BgpSrteSegmentATypeSubTlv `protobuf:"bytes,2,opt,name=type_a,json=typeA,proto3" json:"type_a,omitempty"` - // Description missing in models - TypeB *BgpSrteSegmentBTypeSubTlv `protobuf:"bytes,3,opt,name=type_b,json=typeB,proto3" json:"type_b,omitempty"` - // Description missing in models - TypeC *BgpSrteSegmentCTypeSubTlv `protobuf:"bytes,4,opt,name=type_c,json=typeC,proto3" json:"type_c,omitempty"` - // Description missing in models - TypeD *BgpSrteSegmentDTypeSubTlv `protobuf:"bytes,5,opt,name=type_d,json=typeD,proto3" json:"type_d,omitempty"` - // Description missing in models - TypeE *BgpSrteSegmentETypeSubTlv `protobuf:"bytes,6,opt,name=type_e,json=typeE,proto3" json:"type_e,omitempty"` - // Description missing in models - TypeF *BgpSrteSegmentFTypeSubTlv `protobuf:"bytes,7,opt,name=type_f,json=typeF,proto3" json:"type_f,omitempty"` - // Description missing in models - TypeG *BgpSrteSegmentGTypeSubTlv `protobuf:"bytes,8,opt,name=type_g,json=typeG,proto3" json:"type_g,omitempty"` - // Description missing in models - TypeH *BgpSrteSegmentHTypeSubTlv `protobuf:"bytes,9,opt,name=type_h,json=typeH,proto3" json:"type_h,omitempty"` + // A list of group of IPv4 route addresses. + Addresses []*V4RouteAddress `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` + // Specify the NextHop in MP REACH NLRI. The mode for setting the IP address of the + // NextHop in the MP REACH NLRI can be one of the following: + // Local IP: Automatically fills the Nexthop with the Local IP of the BGP + // peer. + // If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. + // Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. + // default = NextHopMode.Enum.local_ip + NextHopMode *BgpV4RouteRange_NextHopMode_Enum `protobuf:"varint,2,opt,name=next_hop_mode,json=nextHopMode,proto3,enum=otg.BgpV4RouteRange_NextHopMode_Enum,oneof" json:"next_hop_mode,omitempty"` + // If the Nexthop Mode is Manual, it sets the type of the NextHop IP address. + // default = NextHopAddressType.Enum.ipv4 + NextHopAddressType *BgpV4RouteRange_NextHopAddressType_Enum `protobuf:"varint,3,opt,name=next_hop_address_type,json=nextHopAddressType,proto3,enum=otg.BgpV4RouteRange_NextHopAddressType_Enum,oneof" json:"next_hop_address_type,omitempty"` + // The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type + // is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. + // default = 0.0.0.0 + NextHopIpv4Address *string `protobuf:"bytes,4,opt,name=next_hop_ipv4_address,json=nextHopIpv4Address,proto3,oneof" json:"next_hop_ipv4_address,omitempty"` + // The IPv6 address of the next hop if the Nexthop Mode is manual and the Nexthop type + // is IPv6. + // default = ::0 + NextHopIpv6Address *string `protobuf:"bytes,5,opt,name=next_hop_ipv6_address,json=nextHopIpv6Address,proto3,oneof" json:"next_hop_ipv6_address,omitempty"` // Description missing in models - TypeI *BgpSrteSegmentITypeSubTlv `protobuf:"bytes,10,opt,name=type_i,json=typeI,proto3" json:"type_i,omitempty"` + Advanced *BgpRouteAdvanced `protobuf:"bytes,6,opt,name=advanced,proto3" json:"advanced,omitempty"` + // Optional community settings. + Communities []*BgpCommunity `protobuf:"bytes,7,rep,name=communities,proto3" json:"communities,omitempty"` // Description missing in models - TypeJ *BgpSrteSegmentJTypeSubTlv `protobuf:"bytes,11,opt,name=type_j,json=typeJ,proto3" json:"type_j,omitempty"` + AsPath *BgpAsPath `protobuf:"bytes,8,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` // Description missing in models - TypeK *BgpSrteSegmentKTypeSubTlv `protobuf:"bytes,12,opt,name=type_k,json=typeK,proto3" json:"type_k,omitempty"` + AddPath *BgpAddPath `protobuf:"bytes,9,opt,name=add_path,json=addPath,proto3" json:"add_path,omitempty"` // Globally unique name of an object. It also serves as the primary key for arrays of // objects. // required = true - Name *string `protobuf:"bytes,13,opt,name=name,proto3,oneof" json:"name,omitempty"` - // If enabled means that this part of the configuration including any active 'children' - // nodes will be advertised to peer. If disabled, this means that though config is - // present, it is not taking any part of the test but can be activated at run-time to - // advertise just this part of the configuration to the peer. - // default = True - Active *bool `protobuf:"varint,14,opt,name=active,proto3,oneof" json:"active,omitempty"` + Name *string `protobuf:"bytes,10,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Deprecated: This property is deprecated in favor of property extended_communities + // + // Deprecated: This property is deprecated in favor of property extended_communities + // + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. Note evpn type is defined mainly for use with evpn + // route updates and not for IPv4 and IPv6 route updates. + ExtCommunities []*BgpExtCommunity `protobuf:"bytes,11,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an eight byte value. It + // is divided into two main parts. The first two bytes of the community encode a type + // and sub-type fields and the last six bytes carry a unique set of data in a format + // defined by the type and sub-type field. Extended communities provide a larger range + // for grouping or categorizing communities. + ExtendedCommunities []*BgpExtendedCommunity `protobuf:"bytes,12,rep,name=extended_communities,json=extendedCommunities,proto3" json:"extended_communities,omitempty"` } -func (x *BgpSrteSegment) Reset() { - *x = BgpSrteSegment{} +func (x *BgpV4RouteRange) Reset() { + *x = BgpV4RouteRange{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[111] + mi := &file_otg_proto_msgTypes[112] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpSrteSegment) String() string { +func (x *BgpV4RouteRange) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSegment) ProtoMessage() {} +func (*BgpV4RouteRange) ProtoMessage() {} -func (x *BgpSrteSegment) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[111] +func (x *BgpV4RouteRange) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[112] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -32374,142 +34738,125 @@ func (x *BgpSrteSegment) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSegment.ProtoReflect.Descriptor instead. -func (*BgpSrteSegment) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{111} -} - -func (x *BgpSrteSegment) GetSegmentType() BgpSrteSegment_SegmentType_Enum { - if x != nil && x.SegmentType != nil { - return *x.SegmentType - } - return BgpSrteSegment_SegmentType_unspecified +// Deprecated: Use BgpV4RouteRange.ProtoReflect.Descriptor instead. +func (*BgpV4RouteRange) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{112} } -func (x *BgpSrteSegment) GetTypeA() *BgpSrteSegmentATypeSubTlv { +func (x *BgpV4RouteRange) GetAddresses() []*V4RouteAddress { if x != nil { - return x.TypeA + return x.Addresses } return nil } -func (x *BgpSrteSegment) GetTypeB() *BgpSrteSegmentBTypeSubTlv { - if x != nil { - return x.TypeB +func (x *BgpV4RouteRange) GetNextHopMode() BgpV4RouteRange_NextHopMode_Enum { + if x != nil && x.NextHopMode != nil { + return *x.NextHopMode } - return nil + return BgpV4RouteRange_NextHopMode_unspecified } -func (x *BgpSrteSegment) GetTypeC() *BgpSrteSegmentCTypeSubTlv { - if x != nil { - return x.TypeC +func (x *BgpV4RouteRange) GetNextHopAddressType() BgpV4RouteRange_NextHopAddressType_Enum { + if x != nil && x.NextHopAddressType != nil { + return *x.NextHopAddressType } - return nil + return BgpV4RouteRange_NextHopAddressType_unspecified } -func (x *BgpSrteSegment) GetTypeD() *BgpSrteSegmentDTypeSubTlv { - if x != nil { - return x.TypeD +func (x *BgpV4RouteRange) GetNextHopIpv4Address() string { + if x != nil && x.NextHopIpv4Address != nil { + return *x.NextHopIpv4Address } - return nil + return "" } -func (x *BgpSrteSegment) GetTypeE() *BgpSrteSegmentETypeSubTlv { - if x != nil { - return x.TypeE +func (x *BgpV4RouteRange) GetNextHopIpv6Address() string { + if x != nil && x.NextHopIpv6Address != nil { + return *x.NextHopIpv6Address } - return nil + return "" } -func (x *BgpSrteSegment) GetTypeF() *BgpSrteSegmentFTypeSubTlv { +func (x *BgpV4RouteRange) GetAdvanced() *BgpRouteAdvanced { if x != nil { - return x.TypeF + return x.Advanced } return nil } -func (x *BgpSrteSegment) GetTypeG() *BgpSrteSegmentGTypeSubTlv { +func (x *BgpV4RouteRange) GetCommunities() []*BgpCommunity { if x != nil { - return x.TypeG + return x.Communities } return nil } -func (x *BgpSrteSegment) GetTypeH() *BgpSrteSegmentHTypeSubTlv { +func (x *BgpV4RouteRange) GetAsPath() *BgpAsPath { if x != nil { - return x.TypeH + return x.AsPath } return nil } -func (x *BgpSrteSegment) GetTypeI() *BgpSrteSegmentITypeSubTlv { +func (x *BgpV4RouteRange) GetAddPath() *BgpAddPath { if x != nil { - return x.TypeI + return x.AddPath } return nil } -func (x *BgpSrteSegment) GetTypeJ() *BgpSrteSegmentJTypeSubTlv { - if x != nil { - return x.TypeJ +func (x *BgpV4RouteRange) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return nil + return "" } -func (x *BgpSrteSegment) GetTypeK() *BgpSrteSegmentKTypeSubTlv { +func (x *BgpV4RouteRange) GetExtCommunities() []*BgpExtCommunity { if x != nil { - return x.TypeK + return x.ExtCommunities } return nil } -func (x *BgpSrteSegment) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *BgpSrteSegment) GetActive() bool { - if x != nil && x.Active != nil { - return *x.Active +func (x *BgpV4RouteRange) GetExtendedCommunities() []*BgpExtendedCommunity { + if x != nil { + return x.ExtendedCommunities } - return false + return nil } -// Configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. -type BgpSrteSrMplsSid struct { +// The BGP Additional Paths feature is a BGP extension that allows the advertisement +// of multiple paths for the same prefix without the new paths implicitly replacing +// any previous paths. +type BgpAddPath struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Label value in [0, 2^20 -1]. - Label *uint32 `protobuf:"varint,1,opt,name=label,proto3,oneof" json:"label,omitempty"` - // Traffic class in bits. - Tc *uint32 `protobuf:"varint,2,opt,name=tc,proto3,oneof" json:"tc,omitempty"` - // Bottom-of-Stack bit. - SBit *bool `protobuf:"varint,3,opt,name=s_bit,json=sBit,proto3,oneof" json:"s_bit,omitempty"` - // Time To Live. - Ttl *uint32 `protobuf:"varint,4,opt,name=ttl,proto3,oneof" json:"ttl,omitempty"` + // The id of the additional path. + // default = 1 + PathId *uint32 `protobuf:"varint,1,opt,name=path_id,json=pathId,proto3,oneof" json:"path_id,omitempty"` } -func (x *BgpSrteSrMplsSid) Reset() { - *x = BgpSrteSrMplsSid{} +func (x *BgpAddPath) Reset() { + *x = BgpAddPath{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[112] + mi := &file_otg_proto_msgTypes[113] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpSrteSrMplsSid) String() string { +func (x *BgpAddPath) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSrMplsSid) ProtoMessage() {} +func (*BgpAddPath) ProtoMessage() {} -func (x *BgpSrteSrMplsSid) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[112] +func (x *BgpAddPath) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[113] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -32520,78 +34867,67 @@ func (x *BgpSrteSrMplsSid) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSrMplsSid.ProtoReflect.Descriptor instead. -func (*BgpSrteSrMplsSid) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{112} -} - -func (x *BgpSrteSrMplsSid) GetLabel() uint32 { - if x != nil && x.Label != nil { - return *x.Label - } - return 0 -} - -func (x *BgpSrteSrMplsSid) GetTc() uint32 { - if x != nil && x.Tc != nil { - return *x.Tc - } - return 0 -} - -func (x *BgpSrteSrMplsSid) GetSBit() bool { - if x != nil && x.SBit != nil { - return *x.SBit - } - return false +// Deprecated: Use BgpAddPath.ProtoReflect.Descriptor instead. +func (*BgpAddPath) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{113} } -func (x *BgpSrteSrMplsSid) GetTtl() uint32 { - if x != nil && x.Ttl != nil { - return *x.Ttl +func (x *BgpAddPath) GetPathId() uint32 { + if x != nil && x.PathId != nil { + return *x.PathId } return 0 } -// Configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation -// of lengths for Locator Block, Locator Node, Function, and Argument MUST be less -// than or equal to 128. -type BgpSrteSRv6SIDEndpointBehaviorAndStructure struct { +// The Extended Communities Attribute is a optional BGP attribute,defined in RFC4360 +// with the Type Code 16. Community and Extended Communities attributes are utilized +// to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. +// An extended community is an 8-Bytes value.It is divided into two main parts. The +// first 2 Bytes of the community encode a type and optonal sub-type field. The last +// 6 bytes (or 7 bytes for types without a sub-type) carry a unique set of data in a +// format defined by the type and optional sub-type field. Extended communities provide +// a larger range for grouping or categorizing communities. +type BgpExtendedCommunity struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // SRv6 SID Locator Block length in bits. - // default = 0 - LbLength *uint32 `protobuf:"varint,1,opt,name=lb_length,json=lbLength,proto3,oneof" json:"lb_length,omitempty"` - // SRv6 SID Locator Node length in bits. - // default = 0 - LnLength *uint32 `protobuf:"varint,2,opt,name=ln_length,json=lnLength,proto3,oneof" json:"ln_length,omitempty"` - // SRv6 SID Function length in bits. - // default = 0 - FuncLength *uint32 `protobuf:"varint,3,opt,name=func_length,json=funcLength,proto3,oneof" json:"func_length,omitempty"` - // SRv6 SID Arguments length in bits. - // default = 0 - ArgLength *uint32 `protobuf:"varint,4,opt,name=arg_length,json=argLength,proto3,oneof" json:"arg_length,omitempty"` + // Description missing in models + // default = Choice.Enum.transitive_2octet_as_type + Choice *BgpExtendedCommunity_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpExtendedCommunity_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Transitive_2OctetAsType *BgpExtendedCommunityTransitive2OctetAsType `protobuf:"bytes,2,opt,name=transitive_2octet_as_type,json=transitive2octetAsType,proto3" json:"transitive_2octet_as_type,omitempty"` + // Description missing in models + TransitiveIpv4AddressType *BgpExtendedCommunityTransitiveIpv4AddressType `protobuf:"bytes,3,opt,name=transitive_ipv4_address_type,json=transitiveIpv4AddressType,proto3" json:"transitive_ipv4_address_type,omitempty"` + // Description missing in models + Transitive_4OctetAsType *BgpExtendedCommunityTransitive4OctetAsType `protobuf:"bytes,4,opt,name=transitive_4octet_as_type,json=transitive4octetAsType,proto3" json:"transitive_4octet_as_type,omitempty"` + // Description missing in models + TransitiveOpaqueType *BgpExtendedCommunityTransitiveOpaqueType `protobuf:"bytes,5,opt,name=transitive_opaque_type,json=transitiveOpaqueType,proto3" json:"transitive_opaque_type,omitempty"` + // Description missing in models + TransitiveEvpnType *BgpExtendedCommunityTransitiveEvpnType `protobuf:"bytes,6,opt,name=transitive_evpn_type,json=transitiveEvpnType,proto3" json:"transitive_evpn_type,omitempty"` + // Description missing in models + NonTransitive_2OctetAsType *BgpExtendedCommunityNonTransitive2OctetAsType `protobuf:"bytes,7,opt,name=non_transitive_2octet_as_type,json=nonTransitive2octetAsType,proto3" json:"non_transitive_2octet_as_type,omitempty"` + // Description missing in models + Custom *BgpExtendedCommunityCustomType `protobuf:"bytes,8,opt,name=custom,proto3" json:"custom,omitempty"` } -func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) Reset() { - *x = BgpSrteSRv6SIDEndpointBehaviorAndStructure{} +func (x *BgpExtendedCommunity) Reset() { + *x = BgpExtendedCommunity{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[113] + mi := &file_otg_proto_msgTypes[114] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) String() string { +func (x *BgpExtendedCommunity) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSRv6SIDEndpointBehaviorAndStructure) ProtoMessage() {} +func (*BgpExtendedCommunity) ProtoMessage() {} -func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[113] +func (x *BgpExtendedCommunity) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[114] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -32602,143 +34938,87 @@ func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSRv6SIDEndpointBehaviorAndStructure.ProtoReflect.Descriptor instead. -func (*BgpSrteSRv6SIDEndpointBehaviorAndStructure) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{113} -} - -func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) GetLbLength() uint32 { - if x != nil && x.LbLength != nil { - return *x.LbLength - } - return 0 -} - -func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) GetLnLength() uint32 { - if x != nil && x.LnLength != nil { - return *x.LnLength - } - return 0 -} - -func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) GetFuncLength() uint32 { - if x != nil && x.FuncLength != nil { - return *x.FuncLength - } - return 0 +// Deprecated: Use BgpExtendedCommunity.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunity) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{114} } -func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) GetArgLength() uint32 { - if x != nil && x.ArgLength != nil { - return *x.ArgLength +func (x *BgpExtendedCommunity) GetChoice() BgpExtendedCommunity_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 -} - -// Type A: SID only, in the form of MPLS Label. -type BgpSrteSegmentATypeSubTlv struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` - // Label value in [0, 2^20 -1]. - Label *uint32 `protobuf:"varint,2,opt,name=label,proto3,oneof" json:"label,omitempty"` - // Traffic class in bits. - Tc *uint32 `protobuf:"varint,3,opt,name=tc,proto3,oneof" json:"tc,omitempty"` - // Bottom-of-Stack bit. - SBit *bool `protobuf:"varint,4,opt,name=s_bit,json=sBit,proto3,oneof" json:"s_bit,omitempty"` - // Time To Live. - Ttl *uint32 `protobuf:"varint,5,opt,name=ttl,proto3,oneof" json:"ttl,omitempty"` + return BgpExtendedCommunity_Choice_unspecified } -func (x *BgpSrteSegmentATypeSubTlv) Reset() { - *x = BgpSrteSegmentATypeSubTlv{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[114] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *BgpExtendedCommunity) GetTransitive_2OctetAsType() *BgpExtendedCommunityTransitive2OctetAsType { + if x != nil { + return x.Transitive_2OctetAsType } + return nil } -func (x *BgpSrteSegmentATypeSubTlv) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BgpSrteSegmentATypeSubTlv) ProtoMessage() {} - -func (x *BgpSrteSegmentATypeSubTlv) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[114] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *BgpExtendedCommunity) GetTransitiveIpv4AddressType() *BgpExtendedCommunityTransitiveIpv4AddressType { + if x != nil { + return x.TransitiveIpv4AddressType } - return mi.MessageOf(x) -} - -// Deprecated: Use BgpSrteSegmentATypeSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteSegmentATypeSubTlv) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{114} + return nil } -func (x *BgpSrteSegmentATypeSubTlv) GetFlags() string { - if x != nil && x.Flags != nil { - return *x.Flags +func (x *BgpExtendedCommunity) GetTransitive_4OctetAsType() *BgpExtendedCommunityTransitive4OctetAsType { + if x != nil { + return x.Transitive_4OctetAsType } - return "" + return nil } -func (x *BgpSrteSegmentATypeSubTlv) GetLabel() uint32 { - if x != nil && x.Label != nil { - return *x.Label +func (x *BgpExtendedCommunity) GetTransitiveOpaqueType() *BgpExtendedCommunityTransitiveOpaqueType { + if x != nil { + return x.TransitiveOpaqueType } - return 0 + return nil } -func (x *BgpSrteSegmentATypeSubTlv) GetTc() uint32 { - if x != nil && x.Tc != nil { - return *x.Tc +func (x *BgpExtendedCommunity) GetTransitiveEvpnType() *BgpExtendedCommunityTransitiveEvpnType { + if x != nil { + return x.TransitiveEvpnType } - return 0 + return nil } -func (x *BgpSrteSegmentATypeSubTlv) GetSBit() bool { - if x != nil && x.SBit != nil { - return *x.SBit +func (x *BgpExtendedCommunity) GetNonTransitive_2OctetAsType() *BgpExtendedCommunityNonTransitive2OctetAsType { + if x != nil { + return x.NonTransitive_2OctetAsType } - return false + return nil } -func (x *BgpSrteSegmentATypeSubTlv) GetTtl() uint32 { - if x != nil && x.Ttl != nil { - return *x.Ttl +func (x *BgpExtendedCommunity) GetCustom() *BgpExtendedCommunityCustomType { + if x != nil { + return x.Custom } - return 0 + return nil } -// Type B: SID only, in the form of IPv6 address. -type BgpSrteSegmentBTypeSubTlv struct { +// The Route Target Community identifies one or more routers that may receive a set +// of routes (that carry this Community) carried by BGP. It is sent with sub-type as +// 0x02. +type BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` - // SRv6 SID. - // required = true - Srv6Sid *string `protobuf:"bytes,2,opt,name=srv6_sid,json=srv6Sid,proto3,oneof" json:"srv6_sid,omitempty"` - // Optional SRv6 Endpoint Behavior and SID Structure. - Srv6SidEndpointBehavior *BgpSrteSRv6SIDEndpointBehaviorAndStructure `protobuf:"bytes,3,opt,name=srv6_sid_endpoint_behavior,json=srv6SidEndpointBehavior,proto3" json:"srv6_sid_endpoint_behavior,omitempty"` + // The two octet IANA assigned AS value assigned to the Autonomous System. + // default = 100 + Global_2ByteAs *uint32 `protobuf:"varint,1,opt,name=global_2byte_as,json=global2byteAs,proto3,oneof" json:"global_2byte_as,omitempty"` + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + // default = 1 + Local_4ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_4byte_admin,json=local4byteAdmin,proto3,oneof" json:"local_4byte_admin,omitempty"` } -func (x *BgpSrteSegmentBTypeSubTlv) Reset() { - *x = BgpSrteSegmentBTypeSubTlv{} +func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) Reset() { + *x = BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[115] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -32746,13 +35026,13 @@ func (x *BgpSrteSegmentBTypeSubTlv) Reset() { } } -func (x *BgpSrteSegmentBTypeSubTlv) String() string { +func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSegmentBTypeSubTlv) ProtoMessage() {} +func (*BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) ProtoMessage() {} -func (x *BgpSrteSegmentBTypeSubTlv) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[115] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -32764,53 +35044,44 @@ func (x *BgpSrteSegmentBTypeSubTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSegmentBTypeSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteSegmentBTypeSubTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{115} } -func (x *BgpSrteSegmentBTypeSubTlv) GetFlags() string { - if x != nil && x.Flags != nil { - return *x.Flags - } - return "" -} - -func (x *BgpSrteSegmentBTypeSubTlv) GetSrv6Sid() string { - if x != nil && x.Srv6Sid != nil { - return *x.Srv6Sid +func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) GetGlobal_2ByteAs() uint32 { + if x != nil && x.Global_2ByteAs != nil { + return *x.Global_2ByteAs } - return "" + return 0 } -func (x *BgpSrteSegmentBTypeSubTlv) GetSrv6SidEndpointBehavior() *BgpSrteSRv6SIDEndpointBehaviorAndStructure { - if x != nil { - return x.Srv6SidEndpointBehavior +func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget) GetLocal_4ByteAdmin() uint32 { + if x != nil && x.Local_4ByteAdmin != nil { + return *x.Local_4ByteAdmin } - return nil + return 0 } -// Type C: IPv4 Node Address with optional SID. -type BgpSrteSegmentCTypeSubTlv struct { +// The Route Origin Community identifies one or more routers that inject a set of routes +// (that carry this Community) into BGP. It is sent with sub-type as 0x03 . +type BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` - // SR Algorithm identifier when A-Flag in on. - // default = 0 - SrAlgorithm *uint32 `protobuf:"varint,2,opt,name=sr_algorithm,json=srAlgorithm,proto3,oneof" json:"sr_algorithm,omitempty"` - // IPv4 address representing a node. - // required = true - Ipv4NodeAddress *string `protobuf:"bytes,3,opt,name=ipv4_node_address,json=ipv4NodeAddress,proto3,oneof" json:"ipv4_node_address,omitempty"` - // Optional SR-MPLS SID. - SrMplsSid *BgpSrteSrMplsSid `protobuf:"bytes,4,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` + // The two octet IANA assigned AS value assigned to the Autonomous System. + // default = 100 + Global_2ByteAs *uint32 `protobuf:"varint,1,opt,name=global_2byte_as,json=global2byteAs,proto3,oneof" json:"global_2byte_as,omitempty"` + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + // default = 1 + Local_4ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_4byte_admin,json=local4byteAdmin,proto3,oneof" json:"local_4byte_admin,omitempty"` } -func (x *BgpSrteSegmentCTypeSubTlv) Reset() { - *x = BgpSrteSegmentCTypeSubTlv{} +func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Reset() { + *x = BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[116] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -32818,13 +35089,13 @@ func (x *BgpSrteSegmentCTypeSubTlv) Reset() { } } -func (x *BgpSrteSegmentCTypeSubTlv) String() string { +func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSegmentCTypeSubTlv) ProtoMessage() {} +func (*BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ProtoMessage() {} -func (x *BgpSrteSegmentCTypeSubTlv) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[116] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -32836,60 +35107,42 @@ func (x *BgpSrteSegmentCTypeSubTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSegmentCTypeSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteSegmentCTypeSubTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{116} } -func (x *BgpSrteSegmentCTypeSubTlv) GetFlags() string { - if x != nil && x.Flags != nil { - return *x.Flags - } - return "" -} - -func (x *BgpSrteSegmentCTypeSubTlv) GetSrAlgorithm() uint32 { - if x != nil && x.SrAlgorithm != nil { - return *x.SrAlgorithm +func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) GetGlobal_2ByteAs() uint32 { + if x != nil && x.Global_2ByteAs != nil { + return *x.Global_2ByteAs } return 0 } -func (x *BgpSrteSegmentCTypeSubTlv) GetIpv4NodeAddress() string { - if x != nil && x.Ipv4NodeAddress != nil { - return *x.Ipv4NodeAddress - } - return "" -} - -func (x *BgpSrteSegmentCTypeSubTlv) GetSrMplsSid() *BgpSrteSrMplsSid { - if x != nil { - return x.SrMplsSid +func (x *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin) GetLocal_4ByteAdmin() uint32 { + if x != nil && x.Local_4ByteAdmin != nil { + return *x.Local_4ByteAdmin } - return nil + return 0 } -// Type D: IPv6 Node Address with optional SID for SR MPLS. -type BgpSrteSegmentDTypeSubTlv struct { +// The Transitive Two-Octet AS-Specific Extended Community is sent as type 0x00 . +type BgpExtendedCommunityTransitive2OctetAsType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` - // specifying SR Algorithm when when A-Flag as defined in above flags. - // default = 0 - SrAlgorithm *uint32 `protobuf:"varint,2,opt,name=sr_algorithm,json=srAlgorithm,proto3,oneof" json:"sr_algorithm,omitempty"` - // IPv6 address representing a node. - // required = true - Ipv6NodeAddress *string `protobuf:"bytes,3,opt,name=ipv6_node_address,json=ipv6NodeAddress,proto3,oneof" json:"ipv6_node_address,omitempty"` - // Optional SR-MPLS SID. - SrMplsSid *BgpSrteSrMplsSid `protobuf:"bytes,4,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` + // Description missing in models + // default = Choice.Enum.route_target_subtype + Choice *BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + RouteTargetSubtype *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget `protobuf:"bytes,2,opt,name=route_target_subtype,json=routeTargetSubtype,proto3" json:"route_target_subtype,omitempty"` + // Description missing in models + RouteOriginSubtype *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin `protobuf:"bytes,3,opt,name=route_origin_subtype,json=routeOriginSubtype,proto3" json:"route_origin_subtype,omitempty"` } -func (x *BgpSrteSegmentDTypeSubTlv) Reset() { - *x = BgpSrteSegmentDTypeSubTlv{} +func (x *BgpExtendedCommunityTransitive2OctetAsType) Reset() { + *x = BgpExtendedCommunityTransitive2OctetAsType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[117] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -32897,13 +35150,13 @@ func (x *BgpSrteSegmentDTypeSubTlv) Reset() { } } -func (x *BgpSrteSegmentDTypeSubTlv) String() string { +func (x *BgpExtendedCommunityTransitive2OctetAsType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSegmentDTypeSubTlv) ProtoMessage() {} +func (*BgpExtendedCommunityTransitive2OctetAsType) ProtoMessage() {} -func (x *BgpSrteSegmentDTypeSubTlv) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityTransitive2OctetAsType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[117] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -32915,60 +35168,51 @@ func (x *BgpSrteSegmentDTypeSubTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSegmentDTypeSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteSegmentDTypeSubTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityTransitive2OctetAsType.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitive2OctetAsType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{117} } -func (x *BgpSrteSegmentDTypeSubTlv) GetFlags() string { - if x != nil && x.Flags != nil { - return *x.Flags - } - return "" -} - -func (x *BgpSrteSegmentDTypeSubTlv) GetSrAlgorithm() uint32 { - if x != nil && x.SrAlgorithm != nil { - return *x.SrAlgorithm +func (x *BgpExtendedCommunityTransitive2OctetAsType) GetChoice() BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return BgpExtendedCommunityTransitive2OctetAsType_Choice_unspecified } -func (x *BgpSrteSegmentDTypeSubTlv) GetIpv6NodeAddress() string { - if x != nil && x.Ipv6NodeAddress != nil { - return *x.Ipv6NodeAddress +func (x *BgpExtendedCommunityTransitive2OctetAsType) GetRouteTargetSubtype() *BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget { + if x != nil { + return x.RouteTargetSubtype } - return "" + return nil } -func (x *BgpSrteSegmentDTypeSubTlv) GetSrMplsSid() *BgpSrteSrMplsSid { +func (x *BgpExtendedCommunityTransitive2OctetAsType) GetRouteOriginSubtype() *BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin { if x != nil { - return x.SrMplsSid + return x.RouteOriginSubtype } return nil } -// Type E: IPv4 Address and Local Interface ID with optional SID -type BgpSrteSegmentETypeSubTlv struct { +// The Route Origin Community identifies one or more routers that inject a set of routes +// (that carry this Community) into BGP It is sent with sub-type as 0x03. +type BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` - // Local Interface ID: The Interface Index as defined in [RFC8664]. - // default = 0 - LocalInterfaceId *uint32 `protobuf:"varint,2,opt,name=local_interface_id,json=localInterfaceId,proto3,oneof" json:"local_interface_id,omitempty"` - // IPv4 address representing a node. - // required = true - Ipv4NodeAddress *string `protobuf:"bytes,3,opt,name=ipv4_node_address,json=ipv4NodeAddress,proto3,oneof" json:"ipv4_node_address,omitempty"` - // Optional SR-MPLS SID. - SrMplsSid *BgpSrteSrMplsSid `protobuf:"bytes,4,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` + // An IPv4 unicast address assigned by one of the Internet registries. + // default = 0.0.0.0 + GlobalIpv4Admin *string `protobuf:"bytes,1,opt,name=global_ipv4_admin,json=globalIpv4Admin,proto3,oneof" json:"global_ipv4_admin,omitempty"` + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the IP address carried in the Global Administrator + // sub-field has been assigned by an appropriate authority. + // default = 1 + Local_2ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_2byte_admin,json=local2byteAdmin,proto3,oneof" json:"local_2byte_admin,omitempty"` } -func (x *BgpSrteSegmentETypeSubTlv) Reset() { - *x = BgpSrteSegmentETypeSubTlv{} +func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Reset() { + *x = BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[118] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -32976,13 +35220,13 @@ func (x *BgpSrteSegmentETypeSubTlv) Reset() { } } -func (x *BgpSrteSegmentETypeSubTlv) String() string { +func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSegmentETypeSubTlv) ProtoMessage() {} +func (*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ProtoMessage() {} -func (x *BgpSrteSegmentETypeSubTlv) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[118] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -32994,60 +35238,45 @@ func (x *BgpSrteSegmentETypeSubTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSegmentETypeSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteSegmentETypeSubTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{118} } -func (x *BgpSrteSegmentETypeSubTlv) GetFlags() string { - if x != nil && x.Flags != nil { - return *x.Flags +func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) GetGlobalIpv4Admin() string { + if x != nil && x.GlobalIpv4Admin != nil { + return *x.GlobalIpv4Admin } return "" } -func (x *BgpSrteSegmentETypeSubTlv) GetLocalInterfaceId() uint32 { - if x != nil && x.LocalInterfaceId != nil { - return *x.LocalInterfaceId +func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) GetLocal_2ByteAdmin() uint32 { + if x != nil && x.Local_2ByteAdmin != nil { + return *x.Local_2ByteAdmin } return 0 } -func (x *BgpSrteSegmentETypeSubTlv) GetIpv4NodeAddress() string { - if x != nil && x.Ipv4NodeAddress != nil { - return *x.Ipv4NodeAddress - } - return "" -} - -func (x *BgpSrteSegmentETypeSubTlv) GetSrMplsSid() *BgpSrteSrMplsSid { - if x != nil { - return x.SrMplsSid - } - return nil -} - -// Type F: IPv4 Local and Remote addresses with optional SID. -type BgpSrteSegmentFTypeSubTlv struct { +// The Route Target Community identifies one or more routers that may receive a set +// of routes (that carry this Community) carried by BGP. It is sent with sub-type as +// 0x02. +type BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` - // Local IPv4 Address. - // required = true - LocalIpv4Address *string `protobuf:"bytes,2,opt,name=local_ipv4_address,json=localIpv4Address,proto3,oneof" json:"local_ipv4_address,omitempty"` - // Remote IPv4 Address. - // required = true - RemoteIpv4Address *string `protobuf:"bytes,3,opt,name=remote_ipv4_address,json=remoteIpv4Address,proto3,oneof" json:"remote_ipv4_address,omitempty"` - // Optional SR-MPLS SID. - SrMplsSid *BgpSrteSrMplsSid `protobuf:"bytes,4,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` + // An IPv4 unicast address assigned by one of the Internet registries. + // default = 0.0.0.0 + GlobalIpv4Admin *string `protobuf:"bytes,1,opt,name=global_ipv4_admin,json=globalIpv4Admin,proto3,oneof" json:"global_ipv4_admin,omitempty"` + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the IP address carried in the Global Administrator + // sub-field has been assigned by an appropriate authority. + // default = 1 + Local_2ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_2byte_admin,json=local2byteAdmin,proto3,oneof" json:"local_2byte_admin,omitempty"` } -func (x *BgpSrteSegmentFTypeSubTlv) Reset() { - *x = BgpSrteSegmentFTypeSubTlv{} +func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Reset() { + *x = BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[119] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33055,13 +35284,13 @@ func (x *BgpSrteSegmentFTypeSubTlv) Reset() { } } -func (x *BgpSrteSegmentFTypeSubTlv) String() string { +func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSegmentFTypeSubTlv) ProtoMessage() {} +func (*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ProtoMessage() {} -func (x *BgpSrteSegmentFTypeSubTlv) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[119] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33073,81 +35302,56 @@ func (x *BgpSrteSegmentFTypeSubTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSegmentFTypeSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteSegmentFTypeSubTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{119} } -func (x *BgpSrteSegmentFTypeSubTlv) GetFlags() string { - if x != nil && x.Flags != nil { - return *x.Flags +func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) GetGlobalIpv4Admin() string { + if x != nil && x.GlobalIpv4Admin != nil { + return *x.GlobalIpv4Admin } return "" } -func (x *BgpSrteSegmentFTypeSubTlv) GetLocalIpv4Address() string { - if x != nil && x.LocalIpv4Address != nil { - return *x.LocalIpv4Address +func (x *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) GetLocal_2ByteAdmin() uint32 { + if x != nil && x.Local_2ByteAdmin != nil { + return *x.Local_2ByteAdmin } - return "" + return 0 } -func (x *BgpSrteSegmentFTypeSubTlv) GetRemoteIpv4Address() string { - if x != nil && x.RemoteIpv4Address != nil { - return *x.RemoteIpv4Address - } - return "" +// The Transitive IPv4 Address Specific Extended Community is sent as type 0x01. +type BgpExtendedCommunityTransitiveIpv4AddressType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.route_target_subtype + Choice *BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + RouteTargetSubtype *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget `protobuf:"bytes,2,opt,name=route_target_subtype,json=routeTargetSubtype,proto3" json:"route_target_subtype,omitempty"` + // Description missing in models + RouteOriginSubtype *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin `protobuf:"bytes,3,opt,name=route_origin_subtype,json=routeOriginSubtype,proto3" json:"route_origin_subtype,omitempty"` } -func (x *BgpSrteSegmentFTypeSubTlv) GetSrMplsSid() *BgpSrteSrMplsSid { - if x != nil { - return x.SrMplsSid +func (x *BgpExtendedCommunityTransitiveIpv4AddressType) Reset() { + *x = BgpExtendedCommunityTransitiveIpv4AddressType{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[120] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -// Type G: IPv6 Address, Interface ID for local and remote pair with optional SID for -// SR MPLS. -type BgpSrteSegmentGTypeSubTlv struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` - // Local Interface ID: The Interface Index as defined in [RFC8664]. - // default = 0 - LocalInterfaceId *uint32 `protobuf:"varint,2,opt,name=local_interface_id,json=localInterfaceId,proto3,oneof" json:"local_interface_id,omitempty"` - // IPv6 address representing a node. - // required = true - LocalIpv6NodeAddress *string `protobuf:"bytes,3,opt,name=local_ipv6_node_address,json=localIpv6NodeAddress,proto3,oneof" json:"local_ipv6_node_address,omitempty"` - // Local Interface ID: The Interface Index as defined in [RFC8664]. - // default = 0 - RemoteInterfaceId *uint32 `protobuf:"varint,4,opt,name=remote_interface_id,json=remoteInterfaceId,proto3,oneof" json:"remote_interface_id,omitempty"` - // IPv6 address representing a node. - // required = true - RemoteIpv6NodeAddress *string `protobuf:"bytes,5,opt,name=remote_ipv6_node_address,json=remoteIpv6NodeAddress,proto3,oneof" json:"remote_ipv6_node_address,omitempty"` - // Optional SR-MPLS SID. - SrMplsSid *BgpSrteSrMplsSid `protobuf:"bytes,6,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` -} - -func (x *BgpSrteSegmentGTypeSubTlv) Reset() { - *x = BgpSrteSegmentGTypeSubTlv{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[120] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BgpSrteSegmentGTypeSubTlv) String() string { +func (x *BgpExtendedCommunityTransitiveIpv4AddressType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSegmentGTypeSubTlv) ProtoMessage() {} +func (*BgpExtendedCommunityTransitiveIpv4AddressType) ProtoMessage() {} -func (x *BgpSrteSegmentGTypeSubTlv) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityTransitiveIpv4AddressType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[120] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33159,74 +35363,52 @@ func (x *BgpSrteSegmentGTypeSubTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSegmentGTypeSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteSegmentGTypeSubTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityTransitiveIpv4AddressType.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitiveIpv4AddressType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{120} } -func (x *BgpSrteSegmentGTypeSubTlv) GetFlags() string { - if x != nil && x.Flags != nil { - return *x.Flags - } - return "" -} - -func (x *BgpSrteSegmentGTypeSubTlv) GetLocalInterfaceId() uint32 { - if x != nil && x.LocalInterfaceId != nil { - return *x.LocalInterfaceId - } - return 0 -} - -func (x *BgpSrteSegmentGTypeSubTlv) GetLocalIpv6NodeAddress() string { - if x != nil && x.LocalIpv6NodeAddress != nil { - return *x.LocalIpv6NodeAddress - } - return "" -} - -func (x *BgpSrteSegmentGTypeSubTlv) GetRemoteInterfaceId() uint32 { - if x != nil && x.RemoteInterfaceId != nil { - return *x.RemoteInterfaceId +func (x *BgpExtendedCommunityTransitiveIpv4AddressType) GetChoice() BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return BgpExtendedCommunityTransitiveIpv4AddressType_Choice_unspecified } -func (x *BgpSrteSegmentGTypeSubTlv) GetRemoteIpv6NodeAddress() string { - if x != nil && x.RemoteIpv6NodeAddress != nil { - return *x.RemoteIpv6NodeAddress +func (x *BgpExtendedCommunityTransitiveIpv4AddressType) GetRouteTargetSubtype() *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + if x != nil { + return x.RouteTargetSubtype } - return "" + return nil } -func (x *BgpSrteSegmentGTypeSubTlv) GetSrMplsSid() *BgpSrteSrMplsSid { +func (x *BgpExtendedCommunityTransitiveIpv4AddressType) GetRouteOriginSubtype() *BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { if x != nil { - return x.SrMplsSid + return x.RouteOriginSubtype } return nil } -// Type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. -type BgpSrteSegmentHTypeSubTlv struct { +// The Route Target Community identifies one or more routers that may receive a set +// of routes (that carry this Community) carried by BGP. It is sent with sub-type as +// 0x02 +type BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` - // Local IPv6 Address. - // required = true - LocalIpv6Address *string `protobuf:"bytes,2,opt,name=local_ipv6_address,json=localIpv6Address,proto3,oneof" json:"local_ipv6_address,omitempty"` - // Remote IPv6 Address. - // required = true - RemoteIpv6Address *string `protobuf:"bytes,3,opt,name=remote_ipv6_address,json=remoteIpv6Address,proto3,oneof" json:"remote_ipv6_address,omitempty"` - // Optional SR-MPLS SID. - SrMplsSid *BgpSrteSrMplsSid `protobuf:"bytes,4,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` + // The four octet IANA assigned AS value assigned to the Autonomous System. + // default = 100 + Global_4ByteAs *uint32 `protobuf:"varint,1,opt,name=global_4byte_as,json=global4byteAs,proto3,oneof" json:"global_4byte_as,omitempty"` + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + // default = 1 + Local_2ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_2byte_admin,json=local2byteAdmin,proto3,oneof" json:"local_2byte_admin,omitempty"` } -func (x *BgpSrteSegmentHTypeSubTlv) Reset() { - *x = BgpSrteSegmentHTypeSubTlv{} +func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) Reset() { + *x = BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[121] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33234,13 +35416,13 @@ func (x *BgpSrteSegmentHTypeSubTlv) Reset() { } } -func (x *BgpSrteSegmentHTypeSubTlv) String() string { +func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSegmentHTypeSubTlv) ProtoMessage() {} +func (*BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) ProtoMessage() {} -func (x *BgpSrteSegmentHTypeSubTlv) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[121] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33252,59 +35434,44 @@ func (x *BgpSrteSegmentHTypeSubTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSegmentHTypeSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteSegmentHTypeSubTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{121} } -func (x *BgpSrteSegmentHTypeSubTlv) GetFlags() string { - if x != nil && x.Flags != nil { - return *x.Flags - } - return "" -} - -func (x *BgpSrteSegmentHTypeSubTlv) GetLocalIpv6Address() string { - if x != nil && x.LocalIpv6Address != nil { - return *x.LocalIpv6Address - } - return "" -} - -func (x *BgpSrteSegmentHTypeSubTlv) GetRemoteIpv6Address() string { - if x != nil && x.RemoteIpv6Address != nil { - return *x.RemoteIpv6Address +func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) GetGlobal_4ByteAs() uint32 { + if x != nil && x.Global_4ByteAs != nil { + return *x.Global_4ByteAs } - return "" + return 0 } -func (x *BgpSrteSegmentHTypeSubTlv) GetSrMplsSid() *BgpSrteSrMplsSid { - if x != nil { - return x.SrMplsSid +func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget) GetLocal_2ByteAdmin() uint32 { + if x != nil && x.Local_2ByteAdmin != nil { + return *x.Local_2ByteAdmin } - return nil + return 0 } -// Type I: IPv6 Node Address with optional SRv6 SID. -type BgpSrteSegmentITypeSubTlv struct { +// The Route Origin Community identifies one or more routers that inject a set of routes +// (that carry this Community) into BGP. It is sent with sub-type as 0x03. +type BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` - // IPv6 address representing a node. - // required = true - Ipv6NodeAddress *string `protobuf:"bytes,2,opt,name=ipv6_node_address,json=ipv6NodeAddress,proto3,oneof" json:"ipv6_node_address,omitempty"` - // Optional SRv6 SID. - Srv6Sid *string `protobuf:"bytes,3,opt,name=srv6_sid,json=srv6Sid,proto3,oneof" json:"srv6_sid,omitempty"` - // Optional SRv6 Endpoint Behavior and SID Structure. - Srv6SidEndpointBehavior *BgpSrteSRv6SIDEndpointBehaviorAndStructure `protobuf:"bytes,4,opt,name=srv6_sid_endpoint_behavior,json=srv6SidEndpointBehavior,proto3" json:"srv6_sid_endpoint_behavior,omitempty"` + // The four octet IANA assigned AS value assigned to the Autonomous System. + // default = 100 + Global_4ByteAs *uint32 `protobuf:"varint,1,opt,name=global_4byte_as,json=global4byteAs,proto3,oneof" json:"global_4byte_as,omitempty"` + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + // default = 1 + Local_2ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_2byte_admin,json=local2byteAdmin,proto3,oneof" json:"local_2byte_admin,omitempty"` } -func (x *BgpSrteSegmentITypeSubTlv) Reset() { - *x = BgpSrteSegmentITypeSubTlv{} +func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Reset() { + *x = BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[122] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33312,13 +35479,13 @@ func (x *BgpSrteSegmentITypeSubTlv) Reset() { } } -func (x *BgpSrteSegmentITypeSubTlv) String() string { +func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSegmentITypeSubTlv) ProtoMessage() {} +func (*BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ProtoMessage() {} -func (x *BgpSrteSegmentITypeSubTlv) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[122] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33330,72 +35497,43 @@ func (x *BgpSrteSegmentITypeSubTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSegmentITypeSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteSegmentITypeSubTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{122} } -func (x *BgpSrteSegmentITypeSubTlv) GetFlags() string { - if x != nil && x.Flags != nil { - return *x.Flags - } - return "" -} - -func (x *BgpSrteSegmentITypeSubTlv) GetIpv6NodeAddress() string { - if x != nil && x.Ipv6NodeAddress != nil { - return *x.Ipv6NodeAddress - } - return "" -} - -func (x *BgpSrteSegmentITypeSubTlv) GetSrv6Sid() string { - if x != nil && x.Srv6Sid != nil { - return *x.Srv6Sid +func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) GetGlobal_4ByteAs() uint32 { + if x != nil && x.Global_4ByteAs != nil { + return *x.Global_4ByteAs } - return "" + return 0 } -func (x *BgpSrteSegmentITypeSubTlv) GetSrv6SidEndpointBehavior() *BgpSrteSRv6SIDEndpointBehaviorAndStructure { - if x != nil { - return x.Srv6SidEndpointBehavior +func (x *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin) GetLocal_2ByteAdmin() uint32 { + if x != nil && x.Local_2ByteAdmin != nil { + return *x.Local_2ByteAdmin } - return nil + return 0 } -// Type J: IPv6 Address, Interface ID for local and remote pair for SRv6 with optional -// SID. -type BgpSrteSegmentJTypeSubTlv struct { +// The Transitive Four-Octet AS-Specific Extended Community is sent as type 0x02. It +// is defined in RFC 5668. +type BgpExtendedCommunityTransitive4OctetAsType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` - // SR Algorithm identifier when A-Flag in on. - // default = 0 - SrAlgorithm *uint32 `protobuf:"varint,2,opt,name=sr_algorithm,json=srAlgorithm,proto3,oneof" json:"sr_algorithm,omitempty"` - // Local Interface ID: The Interface Index as defined in [RFC8664]. - // default = 0 - LocalInterfaceId *uint32 `protobuf:"varint,3,opt,name=local_interface_id,json=localInterfaceId,proto3,oneof" json:"local_interface_id,omitempty"` - // IPv6 address representing a node. - // required = true - LocalIpv6NodeAddress *string `protobuf:"bytes,4,opt,name=local_ipv6_node_address,json=localIpv6NodeAddress,proto3,oneof" json:"local_ipv6_node_address,omitempty"` - // Local Interface ID: The Interface Index as defined in [RFC8664]. - // default = 0 - RemoteInterfaceId *uint32 `protobuf:"varint,5,opt,name=remote_interface_id,json=remoteInterfaceId,proto3,oneof" json:"remote_interface_id,omitempty"` - // IPv6 address representing a node. - // required = true - RemoteIpv6NodeAddress *string `protobuf:"bytes,6,opt,name=remote_ipv6_node_address,json=remoteIpv6NodeAddress,proto3,oneof" json:"remote_ipv6_node_address,omitempty"` - // Optional SRv6 SID. - Srv6Sid *string `protobuf:"bytes,7,opt,name=srv6_sid,json=srv6Sid,proto3,oneof" json:"srv6_sid,omitempty"` - // Optional SRv6 Endpoint Behavior and SID Structure. - Srv6SidEndpointBehavior *BgpSrteSRv6SIDEndpointBehaviorAndStructure `protobuf:"bytes,8,opt,name=srv6_sid_endpoint_behavior,json=srv6SidEndpointBehavior,proto3" json:"srv6_sid_endpoint_behavior,omitempty"` + // Description missing in models + // default = Choice.Enum.route_target_subtype + Choice *BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + RouteTargetSubtype *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget `protobuf:"bytes,2,opt,name=route_target_subtype,json=routeTargetSubtype,proto3" json:"route_target_subtype,omitempty"` + // Description missing in models + RouteOriginSubtype *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin `protobuf:"bytes,3,opt,name=route_origin_subtype,json=routeOriginSubtype,proto3" json:"route_origin_subtype,omitempty"` } -func (x *BgpSrteSegmentJTypeSubTlv) Reset() { - *x = BgpSrteSegmentJTypeSubTlv{} +func (x *BgpExtendedCommunityTransitive4OctetAsType) Reset() { + *x = BgpExtendedCommunityTransitive4OctetAsType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[123] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33403,13 +35541,13 @@ func (x *BgpSrteSegmentJTypeSubTlv) Reset() { } } -func (x *BgpSrteSegmentJTypeSubTlv) String() string { +func (x *BgpExtendedCommunityTransitive4OctetAsType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSegmentJTypeSubTlv) ProtoMessage() {} +func (*BgpExtendedCommunityTransitive4OctetAsType) ProtoMessage() {} -func (x *BgpSrteSegmentJTypeSubTlv) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityTransitive4OctetAsType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[123] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33421,93 +35559,53 @@ func (x *BgpSrteSegmentJTypeSubTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSegmentJTypeSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteSegmentJTypeSubTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityTransitive4OctetAsType.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitive4OctetAsType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{123} } -func (x *BgpSrteSegmentJTypeSubTlv) GetFlags() string { - if x != nil && x.Flags != nil { - return *x.Flags - } - return "" -} - -func (x *BgpSrteSegmentJTypeSubTlv) GetSrAlgorithm() uint32 { - if x != nil && x.SrAlgorithm != nil { - return *x.SrAlgorithm - } - return 0 -} - -func (x *BgpSrteSegmentJTypeSubTlv) GetLocalInterfaceId() uint32 { - if x != nil && x.LocalInterfaceId != nil { - return *x.LocalInterfaceId - } - return 0 -} - -func (x *BgpSrteSegmentJTypeSubTlv) GetLocalIpv6NodeAddress() string { - if x != nil && x.LocalIpv6NodeAddress != nil { - return *x.LocalIpv6NodeAddress - } - return "" -} - -func (x *BgpSrteSegmentJTypeSubTlv) GetRemoteInterfaceId() uint32 { - if x != nil && x.RemoteInterfaceId != nil { - return *x.RemoteInterfaceId - } - return 0 -} - -func (x *BgpSrteSegmentJTypeSubTlv) GetRemoteIpv6NodeAddress() string { - if x != nil && x.RemoteIpv6NodeAddress != nil { - return *x.RemoteIpv6NodeAddress +func (x *BgpExtendedCommunityTransitive4OctetAsType) GetChoice() BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return BgpExtendedCommunityTransitive4OctetAsType_Choice_unspecified } -func (x *BgpSrteSegmentJTypeSubTlv) GetSrv6Sid() string { - if x != nil && x.Srv6Sid != nil { - return *x.Srv6Sid +func (x *BgpExtendedCommunityTransitive4OctetAsType) GetRouteTargetSubtype() *BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget { + if x != nil { + return x.RouteTargetSubtype } - return "" + return nil } -func (x *BgpSrteSegmentJTypeSubTlv) GetSrv6SidEndpointBehavior() *BgpSrteSRv6SIDEndpointBehaviorAndStructure { +func (x *BgpExtendedCommunityTransitive4OctetAsType) GetRouteOriginSubtype() *BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin { if x != nil { - return x.Srv6SidEndpointBehavior + return x.RouteOriginSubtype } return nil } -// Type K: IPv6 Local and Remote addresses for SRv6 with optional SID. -type BgpSrteSegmentKTypeSubTlv struct { +// The Color Community contains locally administrator defined 'color' value which is +// used in conjunction with Encapsulation attribute to decide whether a data packet +// can be transmitted on a certain tunnel or not. It is defined in RFC9012 and sent +// with sub-type as 0x0b. +type BgpExtendedCommunityTransitiveOpaqueTypeColor struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` - // SR Algorithm identifier when A-Flag in on. + // Two octet flag values. // default = 0 - SrAlgorithm *uint32 `protobuf:"varint,2,opt,name=sr_algorithm,json=srAlgorithm,proto3,oneof" json:"sr_algorithm,omitempty"` - // IPv6 address representing a node. - // required = true - LocalIpv6Address *string `protobuf:"bytes,3,opt,name=local_ipv6_address,json=localIpv6Address,proto3,oneof" json:"local_ipv6_address,omitempty"` - // IPv6 address representing a node. - // required = true - RemoteIpv6Address *string `protobuf:"bytes,4,opt,name=remote_ipv6_address,json=remoteIpv6Address,proto3,oneof" json:"remote_ipv6_address,omitempty"` - // Optional SRv6 SID. - Srv6Sid *string `protobuf:"bytes,5,opt,name=srv6_sid,json=srv6Sid,proto3,oneof" json:"srv6_sid,omitempty"` - // Optional SRv6 Endpoint Behavior and SID Structure. - Srv6SidEndpointBehavior *BgpSrteSRv6SIDEndpointBehaviorAndStructure `protobuf:"bytes,6,opt,name=srv6_sid_endpoint_behavior,json=srv6SidEndpointBehavior,proto3" json:"srv6_sid_endpoint_behavior,omitempty"` + Flags *uint32 `protobuf:"varint,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` + // The color value is user defined and configured locally and used to determine whether + // a data packet can be transmitted on a certain tunnel or not in conjunction with the + // Encapsulation attribute. It is defined in RFC9012. + // default = 0 + Color *uint32 `protobuf:"varint,2,opt,name=color,proto3,oneof" json:"color,omitempty"` } -func (x *BgpSrteSegmentKTypeSubTlv) Reset() { - *x = BgpSrteSegmentKTypeSubTlv{} +func (x *BgpExtendedCommunityTransitiveOpaqueTypeColor) Reset() { + *x = BgpExtendedCommunityTransitiveOpaqueTypeColor{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[124] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33515,13 +35613,13 @@ func (x *BgpSrteSegmentKTypeSubTlv) Reset() { } } -func (x *BgpSrteSegmentKTypeSubTlv) String() string { +func (x *BgpExtendedCommunityTransitiveOpaqueTypeColor) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSegmentKTypeSubTlv) ProtoMessage() {} +func (*BgpExtendedCommunityTransitiveOpaqueTypeColor) ProtoMessage() {} -func (x *BgpSrteSegmentKTypeSubTlv) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityTransitiveOpaqueTypeColor) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[124] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33533,141 +35631,52 @@ func (x *BgpSrteSegmentKTypeSubTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSegmentKTypeSubTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteSegmentKTypeSubTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityTransitiveOpaqueTypeColor.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitiveOpaqueTypeColor) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{124} } -func (x *BgpSrteSegmentKTypeSubTlv) GetFlags() string { +func (x *BgpExtendedCommunityTransitiveOpaqueTypeColor) GetFlags() uint32 { if x != nil && x.Flags != nil { return *x.Flags } - return "" -} - -func (x *BgpSrteSegmentKTypeSubTlv) GetSrAlgorithm() uint32 { - if x != nil && x.SrAlgorithm != nil { - return *x.SrAlgorithm - } return 0 } -func (x *BgpSrteSegmentKTypeSubTlv) GetLocalIpv6Address() string { - if x != nil && x.LocalIpv6Address != nil { - return *x.LocalIpv6Address - } - return "" -} - -func (x *BgpSrteSegmentKTypeSubTlv) GetRemoteIpv6Address() string { - if x != nil && x.RemoteIpv6Address != nil { - return *x.RemoteIpv6Address - } - return "" -} - -func (x *BgpSrteSegmentKTypeSubTlv) GetSrv6Sid() string { - if x != nil && x.Srv6Sid != nil { - return *x.Srv6Sid - } - return "" -} - -func (x *BgpSrteSegmentKTypeSubTlv) GetSrv6SidEndpointBehavior() *BgpSrteSRv6SIDEndpointBehaviorAndStructure { - if x != nil { - return x.Srv6SidEndpointBehavior +func (x *BgpExtendedCommunityTransitiveOpaqueTypeColor) GetColor() uint32 { + if x != nil && x.Color != nil { + return *x.Color } - return nil + return 0 } -// Configuration for BGP Segment Routing Traffic Engineering policy. -type BgpSrteV6Policy struct { +// This identifies the type of tunneling technology being signalled. It is defined in +// RFC9012 and sent with sub-type as 0x0c. +type BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Identifies the policy in the context of (color and endpoint) tuple. It is used by - // the SR Policy originator to make unique multiple occurrences of the same SR Policy. + // Four bytes of reserved values. Normally set to 0 on transmit and ignored on receive. + // + // default = 0 + Reserved *uint32 `protobuf:"varint,1,opt,name=reserved,proto3,oneof" json:"reserved,omitempty"` + // Identifies the type of tunneling technology being signalled. Initially defined in + // RFC5512 and extended in RFC9012. Some of the important tunnel types include 1 L2TPv3 + // over IP [RFC9012], + // 2 GRE [RFC9012] + // 7 IP in IP [RFC9012] + // 8 VXLAN Encapsulation [RFC8365] + // 9 NVGRE Encapsulation [RFC8365] + // 10 MPLS Encapsulation [RFC8365] + // 15 SR TE Policy Type [draft-ietf-idr-segment-routing-te-policy] + // 19 Geneve Encapsulation [RFC8926] // default = 1 - Distinguisher *uint32 `protobuf:"varint,1,opt,name=distinguisher,proto3,oneof" json:"distinguisher,omitempty"` - // Identifies the policy. It is used to match the color of the destination prefixes - // to steer traffic into the SR Policy. - // default = 100 - Color *uint32 `protobuf:"varint,2,opt,name=color,proto3,oneof" json:"color,omitempty"` - // Specifies a single node or a set of nodes (e.g., an anycast address). It is selected - // on the basis of the SR Policy type (AFI). - // required = true - Ipv6Endpoint *string `protobuf:"bytes,3,opt,name=ipv6_endpoint,json=ipv6Endpoint,proto3,oneof" json:"ipv6_endpoint,omitempty"` - // Mode for choosing the NextHop in MP REACH NLRI. Available modes are : Local IP: Automatically - // fills the Nexthop with the Local IP of the BGP peer. For IPv6 BGP peer the Nexthop - // Encoding capability should be enabled. Manual: Override the Nexthop with any arbitrary - // IPv4/IPv6 address. - // default = NextHopMode.Enum.local_ip - NextHopMode *BgpSrteV6Policy_NextHopMode_Enum `protobuf:"varint,4,opt,name=next_hop_mode,json=nextHopMode,proto3,enum=otg.BgpSrteV6Policy_NextHopMode_Enum,oneof" json:"next_hop_mode,omitempty"` - // Type of next hop IP address to be used when 'next_hop_mode' is set to 'manual'. - // default = NextHopAddressType.Enum.ipv6 - NextHopAddressType *BgpSrteV6Policy_NextHopAddressType_Enum `protobuf:"varint,5,opt,name=next_hop_address_type,json=nextHopAddressType,proto3,enum=otg.BgpSrteV6Policy_NextHopAddressType_Enum,oneof" json:"next_hop_address_type,omitempty"` - // The IPv4 address of the Nexthop if the 'next_hop_mode' is 'manual' and the Nexthop - // type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, Nexthop Encoding - // capability extended_next_hop_encoding should be enabled. - // default = 0.0.0.0 - NextHopIpv4Address *string `protobuf:"bytes,6,opt,name=next_hop_ipv4_address,json=nextHopIpv4Address,proto3,oneof" json:"next_hop_ipv4_address,omitempty"` - // The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type' is 'manual' - // and the Nexthop type 'next_hop_address_type' is IPv6. - // default = ::0 - NextHopIpv6Address *string `protobuf:"bytes,7,opt,name=next_hop_ipv6_address,json=nextHopIpv6Address,proto3,oneof" json:"next_hop_ipv6_address,omitempty"` - // Description missing in models - Advanced *BgpRouteAdvanced `protobuf:"bytes,8,opt,name=advanced,proto3" json:"advanced,omitempty"` - // Description missing in models - AddPath *BgpAddPath `protobuf:"bytes,9,opt,name=add_path,json=addPath,proto3" json:"add_path,omitempty"` - // Description missing in models - AsPath *BgpAsPath `protobuf:"bytes,10,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` - // Optional community settings. - Communities []*BgpCommunity `protobuf:"bytes,11,rep,name=communities,proto3" json:"communities,omitempty"` - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. - Extcommunities []*BgpExtCommunity `protobuf:"bytes,12,rep,name=extcommunities,proto3" json:"extcommunities,omitempty"` - // List of optional tunnel TLV settings. - TunnelTlvs []*BgpSrteV6TunnelTlv `protobuf:"bytes,13,rep,name=tunnel_tlvs,json=tunnelTlvs,proto3" json:"tunnel_tlvs,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,14,opt,name=name,proto3,oneof" json:"name,omitempty"` - // If enabled means that this part of the configuration including any active 'children' - // nodes will be advertised to peer. If disabled, this means that though config is - // present, it is not taking any part of the test but can be activated at run-time to - // advertise just this part of the configuration to the peer. - // default = True - Active *bool `protobuf:"varint,15,opt,name=active,proto3,oneof" json:"active,omitempty"` + TunnelType *uint32 `protobuf:"varint,2,opt,name=tunnel_type,json=tunnelType,proto3,oneof" json:"tunnel_type,omitempty"` } -func (x *BgpSrteV6Policy) Reset() { - *x = BgpSrteV6Policy{} +func (x *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) Reset() { + *x = BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[125] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33675,13 +35684,13 @@ func (x *BgpSrteV6Policy) Reset() { } } -func (x *BgpSrteV6Policy) String() string { +func (x *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteV6Policy) ProtoMessage() {} +func (*BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) ProtoMessage() {} -func (x *BgpSrteV6Policy) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[125] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33693,152 +35702,42 @@ func (x *BgpSrteV6Policy) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteV6Policy.ProtoReflect.Descriptor instead. -func (*BgpSrteV6Policy) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{125} } -func (x *BgpSrteV6Policy) GetDistinguisher() uint32 { - if x != nil && x.Distinguisher != nil { - return *x.Distinguisher +func (x *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) GetReserved() uint32 { + if x != nil && x.Reserved != nil { + return *x.Reserved } return 0 } -func (x *BgpSrteV6Policy) GetColor() uint32 { - if x != nil && x.Color != nil { - return *x.Color +func (x *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation) GetTunnelType() uint32 { + if x != nil && x.TunnelType != nil { + return *x.TunnelType } return 0 } -func (x *BgpSrteV6Policy) GetIpv6Endpoint() string { - if x != nil && x.Ipv6Endpoint != nil { - return *x.Ipv6Endpoint - } - return "" -} - -func (x *BgpSrteV6Policy) GetNextHopMode() BgpSrteV6Policy_NextHopMode_Enum { - if x != nil && x.NextHopMode != nil { - return *x.NextHopMode - } - return BgpSrteV6Policy_NextHopMode_unspecified -} - -func (x *BgpSrteV6Policy) GetNextHopAddressType() BgpSrteV6Policy_NextHopAddressType_Enum { - if x != nil && x.NextHopAddressType != nil { - return *x.NextHopAddressType - } - return BgpSrteV6Policy_NextHopAddressType_unspecified -} - -func (x *BgpSrteV6Policy) GetNextHopIpv4Address() string { - if x != nil && x.NextHopIpv4Address != nil { - return *x.NextHopIpv4Address - } - return "" -} - -func (x *BgpSrteV6Policy) GetNextHopIpv6Address() string { - if x != nil && x.NextHopIpv6Address != nil { - return *x.NextHopIpv6Address - } - return "" -} - -func (x *BgpSrteV6Policy) GetAdvanced() *BgpRouteAdvanced { - if x != nil { - return x.Advanced - } - return nil -} - -func (x *BgpSrteV6Policy) GetAddPath() *BgpAddPath { - if x != nil { - return x.AddPath - } - return nil -} - -func (x *BgpSrteV6Policy) GetAsPath() *BgpAsPath { - if x != nil { - return x.AsPath - } - return nil -} - -func (x *BgpSrteV6Policy) GetCommunities() []*BgpCommunity { - if x != nil { - return x.Communities - } - return nil -} - -func (x *BgpSrteV6Policy) GetExtcommunities() []*BgpExtCommunity { - if x != nil { - return x.Extcommunities - } - return nil -} - -func (x *BgpSrteV6Policy) GetTunnelTlvs() []*BgpSrteV6TunnelTlv { - if x != nil { - return x.TunnelTlvs - } - return nil -} - -func (x *BgpSrteV6Policy) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *BgpSrteV6Policy) GetActive() bool { - if x != nil && x.Active != nil { - return *x.Active - } - return false -} - -// Configuration for BGP SRTE Tunnel TLV. -type BgpSrteV6TunnelTlv struct { +// The Transitive Opaque Extended Community is sent as type 0x03. +type BgpExtendedCommunityTransitiveOpaqueType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - RemoteEndpointSubTlv *BgpSrteRemoteEndpointSubTlv `protobuf:"bytes,1,opt,name=remote_endpoint_sub_tlv,json=remoteEndpointSubTlv,proto3" json:"remote_endpoint_sub_tlv,omitempty"` - // Description missing in models - ColorSubTlv *BgpSrteColorSubTlv `protobuf:"bytes,2,opt,name=color_sub_tlv,json=colorSubTlv,proto3" json:"color_sub_tlv,omitempty"` - // Description missing in models - BindingSubTlv *BgpSrteBindingSubTlv `protobuf:"bytes,3,opt,name=binding_sub_tlv,json=bindingSubTlv,proto3" json:"binding_sub_tlv,omitempty"` - // Description missing in models - PreferenceSubTlv *BgpSrtePreferenceSubTlv `protobuf:"bytes,4,opt,name=preference_sub_tlv,json=preferenceSubTlv,proto3" json:"preference_sub_tlv,omitempty"` - // Description missing in models - PolicyPrioritySubTlv *BgpSrtePolicyPrioritySubTlv `protobuf:"bytes,5,opt,name=policy_priority_sub_tlv,json=policyPrioritySubTlv,proto3" json:"policy_priority_sub_tlv,omitempty"` - // Description missing in models - PolicyNameSubTlv *BgpSrtePolicyNameSubTlv `protobuf:"bytes,6,opt,name=policy_name_sub_tlv,json=policyNameSubTlv,proto3" json:"policy_name_sub_tlv,omitempty"` + // default = Choice.Enum.color_subtype + Choice *BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - ExplicitNullLabelPolicySubTlv *BgpSrteExplicitNullLabelPolicySubTlv `protobuf:"bytes,7,opt,name=explicit_null_label_policy_sub_tlv,json=explicitNullLabelPolicySubTlv,proto3" json:"explicit_null_label_policy_sub_tlv,omitempty"` + ColorSubtype *BgpExtendedCommunityTransitiveOpaqueTypeColor `protobuf:"bytes,2,opt,name=color_subtype,json=colorSubtype,proto3" json:"color_subtype,omitempty"` // Description missing in models - SegmentLists []*BgpSrteSegmentList `protobuf:"bytes,8,rep,name=segment_lists,json=segmentLists,proto3" json:"segment_lists,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,9,opt,name=name,proto3,oneof" json:"name,omitempty"` - // If enabled means that this part of the configuration including any active 'children' - // nodes will be advertised to peer. If disabled, this means that though config is - // present, it is not taking any part of the test but can be activated at run-time to - // advertise just this part of the configuration to the peer. - // default = True - Active *bool `protobuf:"varint,10,opt,name=active,proto3,oneof" json:"active,omitempty"` + EncapsulationSubtype *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation `protobuf:"bytes,3,opt,name=encapsulation_subtype,json=encapsulationSubtype,proto3" json:"encapsulation_subtype,omitempty"` } -func (x *BgpSrteV6TunnelTlv) Reset() { - *x = BgpSrteV6TunnelTlv{} +func (x *BgpExtendedCommunityTransitiveOpaqueType) Reset() { + *x = BgpExtendedCommunityTransitiveOpaqueType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[126] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33846,13 +35745,13 @@ func (x *BgpSrteV6TunnelTlv) Reset() { } } -func (x *BgpSrteV6TunnelTlv) String() string { +func (x *BgpExtendedCommunityTransitiveOpaqueType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteV6TunnelTlv) ProtoMessage() {} +func (*BgpExtendedCommunityTransitiveOpaqueType) ProtoMessage() {} -func (x *BgpSrteV6TunnelTlv) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityTransitiveOpaqueType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[126] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33864,115 +35763,46 @@ func (x *BgpSrteV6TunnelTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteV6TunnelTlv.ProtoReflect.Descriptor instead. -func (*BgpSrteV6TunnelTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityTransitiveOpaqueType.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitiveOpaqueType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{126} } -func (x *BgpSrteV6TunnelTlv) GetRemoteEndpointSubTlv() *BgpSrteRemoteEndpointSubTlv { - if x != nil { - return x.RemoteEndpointSubTlv - } - return nil -} - -func (x *BgpSrteV6TunnelTlv) GetColorSubTlv() *BgpSrteColorSubTlv { - if x != nil { - return x.ColorSubTlv - } - return nil -} - -func (x *BgpSrteV6TunnelTlv) GetBindingSubTlv() *BgpSrteBindingSubTlv { - if x != nil { - return x.BindingSubTlv - } - return nil -} - -func (x *BgpSrteV6TunnelTlv) GetPreferenceSubTlv() *BgpSrtePreferenceSubTlv { - if x != nil { - return x.PreferenceSubTlv - } - return nil -} - -func (x *BgpSrteV6TunnelTlv) GetPolicyPrioritySubTlv() *BgpSrtePolicyPrioritySubTlv { - if x != nil { - return x.PolicyPrioritySubTlv - } - return nil -} - -func (x *BgpSrteV6TunnelTlv) GetPolicyNameSubTlv() *BgpSrtePolicyNameSubTlv { - if x != nil { - return x.PolicyNameSubTlv +func (x *BgpExtendedCommunityTransitiveOpaqueType) GetChoice() BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return BgpExtendedCommunityTransitiveOpaqueType_Choice_unspecified } -func (x *BgpSrteV6TunnelTlv) GetExplicitNullLabelPolicySubTlv() *BgpSrteExplicitNullLabelPolicySubTlv { +func (x *BgpExtendedCommunityTransitiveOpaqueType) GetColorSubtype() *BgpExtendedCommunityTransitiveOpaqueTypeColor { if x != nil { - return x.ExplicitNullLabelPolicySubTlv + return x.ColorSubtype } return nil } -func (x *BgpSrteV6TunnelTlv) GetSegmentLists() []*BgpSrteSegmentList { +func (x *BgpExtendedCommunityTransitiveOpaqueType) GetEncapsulationSubtype() *BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation { if x != nil { - return x.SegmentLists + return x.EncapsulationSubtype } return nil } -func (x *BgpSrteV6TunnelTlv) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *BgpSrteV6TunnelTlv) GetActive() bool { - if x != nil && x.Active != nil { - return *x.Active - } - return false -} - -// The Graceful Restart Capability (RFC 4724) is a BGP capability that can be used by -// a BGP speaker to indicate its ability to preserve its forwarding state during BGP -// restart. The Graceful Restart (GR) capability is advertised in OPEN messages sent -// between BGP peers. After a BGP session has been established, and the initial routing -// update has been completed, an End-of-RIB (Routing Information Base) marker is sent -// in an UPDATE message to convey information about routing convergence. -type BgpGracefulRestart struct { +// The Router MAC EVPN Community is defined in RFC9135 and normally sent only for EVPN +// Type-2 Routes . It is sent with sub-type 0x03. +type BgpExtendedCommunityTransitiveEvpnTypeRouterMac struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // If enabled, Graceful Restart capability is advertised in BGP OPEN messages. - // default = False - EnableGr *bool `protobuf:"varint,1,opt,name=enable_gr,json=enableGr,proto3,oneof" json:"enable_gr,omitempty"` - // This is the estimated duration (in seconds) it will take for the BGP session to be - // re-established after a restart. This can be used to speed up routing convergence - // by its peer in case the BGP speaker does not come back after a restart. - // default = 45 - RestartTime *uint32 `protobuf:"varint,2,opt,name=restart_time,json=restartTime,proto3,oneof" json:"restart_time,omitempty"` - // If enabled, the Long-lived Graceful Restart Capability, or LLGR Capability - // will be advertised. - // This capability MUST be advertised in conjunction with the Graceful Restart - // capability. - // default = False - EnableLlgr *bool `protobuf:"varint,3,opt,name=enable_llgr,json=enableLlgr,proto3,oneof" json:"enable_llgr,omitempty"` - // Duration (in seconds) specifying how long stale information (for the AFI/SAFI) - // may be retained. This is a three byte field and is applicable - // only if 'enable_llgr' is set to 'true'. - // default = 10 - StaleTime *uint32 `protobuf:"varint,4,opt,name=stale_time,json=staleTime,proto3,oneof" json:"stale_time,omitempty"` + // MAC Address of the PE Router. + // default = 0:0:0:0:0:0 + RouterMac *string `protobuf:"bytes,1,opt,name=router_mac,json=routerMac,proto3,oneof" json:"router_mac,omitempty"` } -func (x *BgpGracefulRestart) Reset() { - *x = BgpGracefulRestart{} +func (x *BgpExtendedCommunityTransitiveEvpnTypeRouterMac) Reset() { + *x = BgpExtendedCommunityTransitiveEvpnTypeRouterMac{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[127] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33980,13 +35810,13 @@ func (x *BgpGracefulRestart) Reset() { } } -func (x *BgpGracefulRestart) String() string { +func (x *BgpExtendedCommunityTransitiveEvpnTypeRouterMac) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpGracefulRestart) ProtoMessage() {} +func (*BgpExtendedCommunityTransitiveEvpnTypeRouterMac) ProtoMessage() {} -func (x *BgpGracefulRestart) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityTransitiveEvpnTypeRouterMac) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[127] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -33998,57 +35828,33 @@ func (x *BgpGracefulRestart) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpGracefulRestart.ProtoReflect.Descriptor instead. -func (*BgpGracefulRestart) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityTransitiveEvpnTypeRouterMac.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitiveEvpnTypeRouterMac) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{127} } -func (x *BgpGracefulRestart) GetEnableGr() bool { - if x != nil && x.EnableGr != nil { - return *x.EnableGr - } - return false -} - -func (x *BgpGracefulRestart) GetRestartTime() uint32 { - if x != nil && x.RestartTime != nil { - return *x.RestartTime - } - return 0 -} - -func (x *BgpGracefulRestart) GetEnableLlgr() bool { - if x != nil && x.EnableLlgr != nil { - return *x.EnableLlgr - } - return false -} - -func (x *BgpGracefulRestart) GetStaleTime() uint32 { - if x != nil && x.StaleTime != nil { - return *x.StaleTime +func (x *BgpExtendedCommunityTransitiveEvpnTypeRouterMac) GetRouterMac() string { + if x != nil && x.RouterMac != nil { + return *x.RouterMac } - return 0 + return "" } -// Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the -// order given in the input to the peer after the BGP session is established. -type BgpUpdateReplay struct { +// The Transitive EVPN Extended Community is sent as type 0x06 . +type BgpExtendedCommunityTransitiveEvpnType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.structured_pdus - Choice *BgpUpdateReplay_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpUpdateReplay_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - StructuredPdus *BgpStructuredPdus `protobuf:"bytes,2,opt,name=structured_pdus,json=structuredPdus,proto3" json:"structured_pdus,omitempty"` + // default = Choice.Enum.router_mac_subtype + Choice *BgpExtendedCommunityTransitiveEvpnType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpExtendedCommunityTransitiveEvpnType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - RawBytes *BgpRawBytes `protobuf:"bytes,3,opt,name=raw_bytes,json=rawBytes,proto3" json:"raw_bytes,omitempty"` + RouterMacSubtype *BgpExtendedCommunityTransitiveEvpnTypeRouterMac `protobuf:"bytes,2,opt,name=router_mac_subtype,json=routerMacSubtype,proto3" json:"router_mac_subtype,omitempty"` } -func (x *BgpUpdateReplay) Reset() { - *x = BgpUpdateReplay{} +func (x *BgpExtendedCommunityTransitiveEvpnType) Reset() { + *x = BgpExtendedCommunityTransitiveEvpnType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[128] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -34056,13 +35862,13 @@ func (x *BgpUpdateReplay) Reset() { } } -func (x *BgpUpdateReplay) String() string { +func (x *BgpExtendedCommunityTransitiveEvpnType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpUpdateReplay) ProtoMessage() {} +func (*BgpExtendedCommunityTransitiveEvpnType) ProtoMessage() {} -func (x *BgpUpdateReplay) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityTransitiveEvpnType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[128] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -34074,46 +35880,45 @@ func (x *BgpUpdateReplay) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpUpdateReplay.ProtoReflect.Descriptor instead. -func (*BgpUpdateReplay) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityTransitiveEvpnType.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitiveEvpnType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{128} } -func (x *BgpUpdateReplay) GetChoice() BgpUpdateReplay_Choice_Enum { +func (x *BgpExtendedCommunityTransitiveEvpnType) GetChoice() BgpExtendedCommunityTransitiveEvpnType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return BgpUpdateReplay_Choice_unspecified -} - -func (x *BgpUpdateReplay) GetStructuredPdus() *BgpStructuredPdus { - if x != nil { - return x.StructuredPdus - } - return nil + return BgpExtendedCommunityTransitiveEvpnType_Choice_unspecified } -func (x *BgpUpdateReplay) GetRawBytes() *BgpRawBytes { +func (x *BgpExtendedCommunityTransitiveEvpnType) GetRouterMacSubtype() *BgpExtendedCommunityTransitiveEvpnTypeRouterMac { if x != nil { - return x.RawBytes + return x.RouterMacSubtype } return nil } -// Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the -// order given in the input to the peer after the BGP session is established. -type BgpRawBytes struct { +// The Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. +// It is sent with sub-type as 0x04. +type BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Array of ordered BGP Updates ( including both Advertise and Withdraws ) to be sent - // in the order given in the input to the peer after the BGP session is established. - Updates []*BgpOneUpdateReplay `protobuf:"bytes,1,rep,name=updates,proto3" json:"updates,omitempty"` + // The value of the Global Administrator subfield should represent the Autonomous System + // of the router that attaches the Link Bandwidth Community. If four octet AS numbering + // scheme is used, AS_TRANS (23456) should be used. + // default = 100 + Global_2ByteAs *uint32 `protobuf:"varint,1,opt,name=global_2byte_as,json=global2byteAs,proto3,oneof" json:"global_2byte_as,omitempty"` + // Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and + // 1 Mbps is 1000 Kbps per second ) + // default = 0 + Bandwidth *float32 `protobuf:"fixed32,2,opt,name=bandwidth,proto3,oneof" json:"bandwidth,omitempty"` } -func (x *BgpRawBytes) Reset() { - *x = BgpRawBytes{} +func (x *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Reset() { + *x = BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[129] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -34121,13 +35926,13 @@ func (x *BgpRawBytes) Reset() { } } -func (x *BgpRawBytes) String() string { +func (x *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpRawBytes) ProtoMessage() {} +func (*BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ProtoMessage() {} -func (x *BgpRawBytes) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[129] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -34139,45 +35944,40 @@ func (x *BgpRawBytes) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpRawBytes.ProtoReflect.Descriptor instead. -func (*BgpRawBytes) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{129} } -func (x *BgpRawBytes) GetUpdates() []*BgpOneUpdateReplay { - if x != nil { - return x.Updates +func (x *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) GetGlobal_2ByteAs() uint32 { + if x != nil && x.Global_2ByteAs != nil { + return *x.Global_2ByteAs } - return nil + return 0 } -// Specification of one BGP Update to be sent to the BGP peer. -type BgpOneUpdateReplay struct { +func (x *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) GetBandwidth() float32 { + if x != nil && x.Bandwidth != nil { + return *x.Bandwidth + } + return 0 +} + +// The Non-Transitive Two-Octet AS-Specific Extended Community is sent as type 0x40. +type BgpExtendedCommunityNonTransitive2OctetAsType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Minimum time interval in milliseconds from previous Update from the sequence of BGP - // Updates to be replayed. - // default = 0 - TimeGap *uint32 `protobuf:"varint,1,opt,name=time_gap,json=timeGap,proto3,oneof" json:"time_gap,omitempty"` - // Bytes specified in hex format to be sent to peer after the BGP Update Header. The - // Update Header will always have the initial 16 bytes containing Marker bytes, 2 bytes - // containing the Length and 1 byte containing the Type.The string MUST contain sequence - // of valid hex bytes. The bytes specified in hex format should be appended to the Update - // message to be sent to the peer after the fixed 19 bytes described above. This byte - // stream can be of any length from 1 to 4077 bytes.The value 4077 is derived from - // the maximum length allowed for a BGP message in RFC4271 which is 4096 minus mandatory - // 19 bytes described above. In the imported byte stream, one byte is represented as - // string of 2 characters, for example 2 character string (0x)AB represents value of - // a single byte. So the maximum length of this attribute is 8154 (4077 * 2 hex characters - // per byte). - // required = true - UpdateBytes *string `protobuf:"bytes,2,opt,name=update_bytes,json=updateBytes,proto3,oneof" json:"update_bytes,omitempty"` + // Description missing in models + // default = Choice.Enum.link_bandwidth_subtype + Choice *BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + LinkBandwidthSubtype *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth `protobuf:"bytes,2,opt,name=link_bandwidth_subtype,json=linkBandwidthSubtype,proto3" json:"link_bandwidth_subtype,omitempty"` } -func (x *BgpOneUpdateReplay) Reset() { - *x = BgpOneUpdateReplay{} +func (x *BgpExtendedCommunityNonTransitive2OctetAsType) Reset() { + *x = BgpExtendedCommunityNonTransitive2OctetAsType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[130] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -34185,13 +35985,13 @@ func (x *BgpOneUpdateReplay) Reset() { } } -func (x *BgpOneUpdateReplay) String() string { +func (x *BgpExtendedCommunityNonTransitive2OctetAsType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpOneUpdateReplay) ProtoMessage() {} +func (*BgpExtendedCommunityNonTransitive2OctetAsType) ProtoMessage() {} -func (x *BgpOneUpdateReplay) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityNonTransitive2OctetAsType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[130] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -34203,39 +36003,49 @@ func (x *BgpOneUpdateReplay) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpOneUpdateReplay.ProtoReflect.Descriptor instead. -func (*BgpOneUpdateReplay) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityNonTransitive2OctetAsType.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityNonTransitive2OctetAsType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{130} } -func (x *BgpOneUpdateReplay) GetTimeGap() uint32 { - if x != nil && x.TimeGap != nil { - return *x.TimeGap +func (x *BgpExtendedCommunityNonTransitive2OctetAsType) GetChoice() BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return BgpExtendedCommunityNonTransitive2OctetAsType_Choice_unspecified } -func (x *BgpOneUpdateReplay) GetUpdateBytes() string { - if x != nil && x.UpdateBytes != nil { - return *x.UpdateBytes +func (x *BgpExtendedCommunityNonTransitive2OctetAsType) GetLinkBandwidthSubtype() *BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + if x != nil { + return x.LinkBandwidthSubtype } - return "" + return nil } -// Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the -// order given in the input to the peer after the BGP session is established. -type BgpStructuredPdus struct { +// Add a custom Extended Community with a combination of types , sub-types and values +// not explicitly specified above or not defined yet. +type BgpExtendedCommunityCustomType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Array of ordered BGP Updates ( including both Advertise and Withdraws ) to be sent - // in the order given in the input to the peer after the BGP session is established. - Updates []*BgpOneStructuredUpdateReplay `protobuf:"bytes,1,rep,name=updates,proto3" json:"updates,omitempty"` + // The type to be set in the Extended Community attribute. Accepts hexadecimal input + // upto ff . + // default = 00 + CommunityType *string `protobuf:"bytes,1,opt,name=community_type,json=communityType,proto3,oneof" json:"community_type,omitempty"` + // The sub-type to be set in the Extended Community attribute. For certain types with + // no sub-type this byte can also be used as part of an extended value field. Accepts + // hexadecimal input upto ff. + // default = 00 + CommunitySubtype *string `protobuf:"bytes,2,opt,name=community_subtype,json=communitySubtype,proto3,oneof" json:"community_subtype,omitempty"` + // 6 byte hex value to be carried in the last 6 bytes of the Extended Community. Accepts + // hexadecimal input upto ffffffffffff. + // default = 000000000000 + Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *BgpStructuredPdus) Reset() { - *x = BgpStructuredPdus{} +func (x *BgpExtendedCommunityCustomType) Reset() { + *x = BgpExtendedCommunityCustomType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[131] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -34243,13 +36053,13 @@ func (x *BgpStructuredPdus) Reset() { } } -func (x *BgpStructuredPdus) String() string { +func (x *BgpExtendedCommunityCustomType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpStructuredPdus) ProtoMessage() {} +func (*BgpExtendedCommunityCustomType) ProtoMessage() {} -func (x *BgpStructuredPdus) ProtoReflect() protoreflect.Message { +func (x *BgpExtendedCommunityCustomType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[131] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -34261,52 +36071,131 @@ func (x *BgpStructuredPdus) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpStructuredPdus.ProtoReflect.Descriptor instead. -func (*BgpStructuredPdus) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpExtendedCommunityCustomType.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityCustomType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{131} } -func (x *BgpStructuredPdus) GetUpdates() []*BgpOneStructuredUpdateReplay { - if x != nil { - return x.Updates +func (x *BgpExtendedCommunityCustomType) GetCommunityType() string { + if x != nil && x.CommunityType != nil { + return *x.CommunityType } - return nil + return "" } -// One structured BGP Update. -type BgpOneStructuredUpdateReplay struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Minimum time interval in milliseconds from previous Update from the sequence of BGP - // Updates to be replayed. - // default = 0 - TimeGap *uint32 `protobuf:"varint,1,opt,name=time_gap,json=timeGap,proto3,oneof" json:"time_gap,omitempty"` - // Attributes carried in the Update packet alongwith the reach/unreach prefixes. - PathAttributes *BgpAttributes `protobuf:"bytes,2,opt,name=path_attributes,json=pathAttributes,proto3" json:"path_attributes,omitempty"` - // The IPv4 prefixes to be included in the traditional UNREACH_NLRI. - TraditionalUnreachNlris []*BgpOneTraditionalNlriPrefix `protobuf:"bytes,3,rep,name=traditional_unreach_nlris,json=traditionalUnreachNlris,proto3" json:"traditional_unreach_nlris,omitempty"` - // The IPv4 prefixes to be included in the traditional REACH_NLRI. - TraditionalReachNlris []*BgpOneTraditionalNlriPrefix `protobuf:"bytes,4,rep,name=traditional_reach_nlris,json=traditionalReachNlris,proto3" json:"traditional_reach_nlris,omitempty"` +func (x *BgpExtendedCommunityCustomType) GetCommunitySubtype() string { + if x != nil && x.CommunitySubtype != nil { + return *x.CommunitySubtype + } + return "" } -func (x *BgpOneStructuredUpdateReplay) Reset() { - *x = BgpOneStructuredUpdateReplay{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[132] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *BgpExtendedCommunityCustomType) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } + return "" } -func (x *BgpOneStructuredUpdateReplay) String() string { +// Emulated BGPv6 route range. +type BgpV6RouteRange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of group of IPv6 route addresses. + Addresses []*V6RouteAddress `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` + // Specify the NextHop in MP REACH NLRI. The mode for setting the IP address of the + // NextHop in the MP REACH NLRI can be one of the following: + // Local IP: Automatically fills the Nexthop with the Local IP of the BGP + // peer. + // If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. + // Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. + // default = NextHopMode.Enum.local_ip + NextHopMode *BgpV6RouteRange_NextHopMode_Enum `protobuf:"varint,2,opt,name=next_hop_mode,json=nextHopMode,proto3,enum=otg.BgpV6RouteRange_NextHopMode_Enum,oneof" json:"next_hop_mode,omitempty"` + // If the Nexthop Mode is Manual, it sets the type of the NextHop IP address. + // default = NextHopAddressType.Enum.ipv6 + NextHopAddressType *BgpV6RouteRange_NextHopAddressType_Enum `protobuf:"varint,3,opt,name=next_hop_address_type,json=nextHopAddressType,proto3,enum=otg.BgpV6RouteRange_NextHopAddressType_Enum,oneof" json:"next_hop_address_type,omitempty"` + // The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type + // is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. + // default = 0.0.0.0 + NextHopIpv4Address *string `protobuf:"bytes,4,opt,name=next_hop_ipv4_address,json=nextHopIpv4Address,proto3,oneof" json:"next_hop_ipv4_address,omitempty"` + // The IPv6 address of the next hop if the Nexthop Mode is manual and the Nexthop type + // is IPv6. + // default = ::0 + NextHopIpv6Address *string `protobuf:"bytes,5,opt,name=next_hop_ipv6_address,json=nextHopIpv6Address,proto3,oneof" json:"next_hop_ipv6_address,omitempty"` + // Description missing in models + Advanced *BgpRouteAdvanced `protobuf:"bytes,6,opt,name=advanced,proto3" json:"advanced,omitempty"` + // Optional community settings. + Communities []*BgpCommunity `protobuf:"bytes,7,rep,name=communities,proto3" json:"communities,omitempty"` + // Description missing in models + AsPath *BgpAsPath `protobuf:"bytes,8,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` + // Description missing in models + AddPath *BgpAddPath `protobuf:"bytes,9,opt,name=add_path,json=addPath,proto3" json:"add_path,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,10,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Deprecated: This property is deprecated in favor of property extended_communities + // + // Deprecated: This property is deprecated in favor of property extended_communities + // + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. Note evpn type is defined mainly for use with evpn + // route updates and not for IPv4 and IPv6 route updates. + ExtCommunities []*BgpExtCommunity `protobuf:"bytes,11,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an eight byte value. It + // is divided into two main parts. The first two bytes of the community encode a type + // and sub-type fields and the last six bytes carry a unique set of data in a format + // defined by the type and sub-type field. Extended communities provide a larger range + // for grouping or categorizing communities. + ExtendedCommunities []*BgpExtendedCommunity `protobuf:"bytes,12,rep,name=extended_communities,json=extendedCommunities,proto3" json:"extended_communities,omitempty"` +} + +func (x *BgpV6RouteRange) Reset() { + *x = BgpV6RouteRange{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[132] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BgpV6RouteRange) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpOneStructuredUpdateReplay) ProtoMessage() {} +func (*BgpV6RouteRange) ProtoMessage() {} -func (x *BgpOneStructuredUpdateReplay) ProtoReflect() protoreflect.Message { +func (x *BgpV6RouteRange) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[132] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -34318,145 +36207,200 @@ func (x *BgpOneStructuredUpdateReplay) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpOneStructuredUpdateReplay.ProtoReflect.Descriptor instead. -func (*BgpOneStructuredUpdateReplay) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpV6RouteRange.ProtoReflect.Descriptor instead. +func (*BgpV6RouteRange) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{132} } -func (x *BgpOneStructuredUpdateReplay) GetTimeGap() uint32 { - if x != nil && x.TimeGap != nil { - return *x.TimeGap - } - return 0 -} - -func (x *BgpOneStructuredUpdateReplay) GetPathAttributes() *BgpAttributes { +func (x *BgpV6RouteRange) GetAddresses() []*V6RouteAddress { if x != nil { - return x.PathAttributes + return x.Addresses } return nil } -func (x *BgpOneStructuredUpdateReplay) GetTraditionalUnreachNlris() []*BgpOneTraditionalNlriPrefix { - if x != nil { - return x.TraditionalUnreachNlris +func (x *BgpV6RouteRange) GetNextHopMode() BgpV6RouteRange_NextHopMode_Enum { + if x != nil && x.NextHopMode != nil { + return *x.NextHopMode } - return nil + return BgpV6RouteRange_NextHopMode_unspecified } -func (x *BgpOneStructuredUpdateReplay) GetTraditionalReachNlris() []*BgpOneTraditionalNlriPrefix { - if x != nil { - return x.TraditionalReachNlris +func (x *BgpV6RouteRange) GetNextHopAddressType() BgpV6RouteRange_NextHopAddressType_Enum { + if x != nil && x.NextHopAddressType != nil { + return *x.NextHopAddressType } - return nil + return BgpV6RouteRange_NextHopAddressType_unspecified } -// TRADITIONAL_NLRI is an optional part of the the BGP Update which can carry only IPv4 -// prefix information as defined in https://www.rfc-editor.org/rfc/rfc4271.html#section-4.3 -// -// and extended by https://datatracker.ietf.org/doc/html/rfc7911#section-3 to carry -// additional Path Id information per prefix. -type BgpOneTraditionalNlriPrefix struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The IPv4 address of the network. - // default = 0.0.0.0 - Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` - // The IPv4 network prefix length to be applied to the address. - // default = 24 - Prefix *uint32 `protobuf:"varint,2,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` - // Description missing in models - PathId *BgpNLRIPrefixPathId `protobuf:"bytes,3,opt,name=path_id,json=pathId,proto3" json:"path_id,omitempty"` +func (x *BgpV6RouteRange) GetNextHopIpv4Address() string { + if x != nil && x.NextHopIpv4Address != nil { + return *x.NextHopIpv4Address + } + return "" } -func (x *BgpOneTraditionalNlriPrefix) Reset() { - *x = BgpOneTraditionalNlriPrefix{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[133] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *BgpV6RouteRange) GetNextHopIpv6Address() string { + if x != nil && x.NextHopIpv6Address != nil { + return *x.NextHopIpv6Address } + return "" } -func (x *BgpOneTraditionalNlriPrefix) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *BgpV6RouteRange) GetAdvanced() *BgpRouteAdvanced { + if x != nil { + return x.Advanced + } + return nil } -func (*BgpOneTraditionalNlriPrefix) ProtoMessage() {} +func (x *BgpV6RouteRange) GetCommunities() []*BgpCommunity { + if x != nil { + return x.Communities + } + return nil +} -func (x *BgpOneTraditionalNlriPrefix) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[133] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *BgpV6RouteRange) GetAsPath() *BgpAsPath { + if x != nil { + return x.AsPath } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpOneTraditionalNlriPrefix.ProtoReflect.Descriptor instead. -func (*BgpOneTraditionalNlriPrefix) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{133} +func (x *BgpV6RouteRange) GetAddPath() *BgpAddPath { + if x != nil { + return x.AddPath + } + return nil } -func (x *BgpOneTraditionalNlriPrefix) GetAddress() string { - if x != nil && x.Address != nil { - return *x.Address +func (x *BgpV6RouteRange) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } return "" } -func (x *BgpOneTraditionalNlriPrefix) GetPrefix() uint32 { - if x != nil && x.Prefix != nil { - return *x.Prefix +func (x *BgpV6RouteRange) GetExtCommunities() []*BgpExtCommunity { + if x != nil { + return x.ExtCommunities } - return 0 + return nil } -func (x *BgpOneTraditionalNlriPrefix) GetPathId() *BgpNLRIPrefixPathId { +func (x *BgpV6RouteRange) GetExtendedCommunities() []*BgpExtendedCommunity { if x != nil { - return x.PathId + return x.ExtendedCommunities } return nil } -// One IPv4 NLRI Prefix. -type BgpOneIpv4NLRIPrefix struct { +// Configuration for BGP Segment Routing Traffic Engineering(SRTE) +// policy. +type BgpSrteV4Policy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The IPv4 address of the network. - // default = 0.0.0.0 - Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` - // The IPv4 network prefix length to be applied to the address. - // default = 24 - Prefix *uint32 `protobuf:"varint,2,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` + // 4-octet value uniquely identifying the policy in the context of (color, endpoint) + // tuple. It is used by the SR Policy originator to make unique (from an NLRI perspective) + // both for multiple candidate paths of the same SR Policy as well as candidate paths + // of different SR Policies (i.e. with different segment list) with the same Color + // and Endpoint but meant for different head-ends. + // default = 1 + Distinguisher *uint32 `protobuf:"varint,1,opt,name=distinguisher,proto3,oneof" json:"distinguisher,omitempty"` + // Policy color is used to match the color of the destination prefixes to steer traffic + // into the SR Policy. + // default = 100 + Color *uint32 `protobuf:"varint,2,opt,name=color,proto3,oneof" json:"color,omitempty"` + // Specifies a single node or a set of nodes (e.g. an anycast address). It is selected + // on the basis of the SR Policy type (AFI). + // required = true + Ipv4Endpoint *string `protobuf:"bytes,3,opt,name=ipv4_endpoint,json=ipv4Endpoint,proto3,oneof" json:"ipv4_endpoint,omitempty"` + // Mode for choosing the NextHop in MP REACH NLRI. Available modes are : Local IP: Automatically + // fills the Nexthop with the Local IP of the BGP peer. For IPv6 BGP peer the Nexthop + // Encoding capability should be enabled. Manual: Override the Nexthop with any arbitrary + // IPv4/IPv6 address. + // default = NextHopMode.Enum.local_ip + NextHopMode *BgpSrteV4Policy_NextHopMode_Enum `protobuf:"varint,4,opt,name=next_hop_mode,json=nextHopMode,proto3,enum=otg.BgpSrteV4Policy_NextHopMode_Enum,oneof" json:"next_hop_mode,omitempty"` + // Type of next hop IP address to be used when 'next_hop_mode' is set to 'manual'. + // default = NextHopAddressType.Enum.ipv4 + NextHopAddressType *BgpSrteV4Policy_NextHopAddressType_Enum `protobuf:"varint,5,opt,name=next_hop_address_type,json=nextHopAddressType,proto3,enum=otg.BgpSrteV4Policy_NextHopAddressType_Enum,oneof" json:"next_hop_address_type,omitempty"` + // The IPv4 address of the next hop if the Nexthop type 'next_hop_mode' is 'manual' + // and the Nexthop type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, + // Nexthop Encoding capability extended_next_hop_encoding should be enabled. + NextHopIpv4Address *string `protobuf:"bytes,6,opt,name=next_hop_ipv4_address,json=nextHopIpv4Address,proto3,oneof" json:"next_hop_ipv4_address,omitempty"` + // The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type' is 'manual' + // and the Nexthop type 'next_hop_address_type' is IPv6. + NextHopIpv6Address *string `protobuf:"bytes,7,opt,name=next_hop_ipv6_address,json=nextHopIpv6Address,proto3,oneof" json:"next_hop_ipv6_address,omitempty"` // Description missing in models - PathId *BgpNLRIPrefixPathId `protobuf:"bytes,3,opt,name=path_id,json=pathId,proto3" json:"path_id,omitempty"` + Advanced *BgpRouteAdvanced `protobuf:"bytes,8,opt,name=advanced,proto3" json:"advanced,omitempty"` + // Description missing in models + AddPath *BgpAddPath `protobuf:"bytes,9,opt,name=add_path,json=addPath,proto3" json:"add_path,omitempty"` + // Description missing in models + AsPath *BgpAsPath `protobuf:"bytes,10,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` + // Optional Community settings. + Communities []*BgpCommunity `protobuf:"bytes,11,rep,name=communities,proto3" json:"communities,omitempty"` + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. + ExtCommunities []*BgpExtCommunity `protobuf:"bytes,12,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` + // List Tunnel Encapsulation Attributes. + TunnelTlvs []*BgpSrteV4TunnelTlv `protobuf:"bytes,13,rep,name=tunnel_tlvs,json=tunnelTlvs,proto3" json:"tunnel_tlvs,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,14,opt,name=name,proto3,oneof" json:"name,omitempty"` + // If enabled means that this part of the configuration including any active 'children' + // nodes will be advertised to peer. If disabled, this means that though config is + // present, it is not taking any part of the test but can be activated at run-time to + // advertise just this part of the configuration to the peer. + // default = True + Active *bool `protobuf:"varint,15,opt,name=active,proto3,oneof" json:"active,omitempty"` } -func (x *BgpOneIpv4NLRIPrefix) Reset() { - *x = BgpOneIpv4NLRIPrefix{} +func (x *BgpSrteV4Policy) Reset() { + *x = BgpSrteV4Policy{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[134] + mi := &file_otg_proto_msgTypes[133] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpOneIpv4NLRIPrefix) String() string { +func (x *BgpSrteV4Policy) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpOneIpv4NLRIPrefix) ProtoMessage() {} +func (*BgpSrteV4Policy) ProtoMessage() {} -func (x *BgpOneIpv4NLRIPrefix) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[134] +func (x *BgpSrteV4Policy) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[133] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -34467,229 +36411,167 @@ func (x *BgpOneIpv4NLRIPrefix) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpOneIpv4NLRIPrefix.ProtoReflect.Descriptor instead. -func (*BgpOneIpv4NLRIPrefix) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{134} +// Deprecated: Use BgpSrteV4Policy.ProtoReflect.Descriptor instead. +func (*BgpSrteV4Policy) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{133} } -func (x *BgpOneIpv4NLRIPrefix) GetAddress() string { - if x != nil && x.Address != nil { - return *x.Address +func (x *BgpSrteV4Policy) GetDistinguisher() uint32 { + if x != nil && x.Distinguisher != nil { + return *x.Distinguisher } - return "" + return 0 } -func (x *BgpOneIpv4NLRIPrefix) GetPrefix() uint32 { - if x != nil && x.Prefix != nil { - return *x.Prefix +func (x *BgpSrteV4Policy) GetColor() uint32 { + if x != nil && x.Color != nil { + return *x.Color } return 0 } -func (x *BgpOneIpv4NLRIPrefix) GetPathId() *BgpNLRIPrefixPathId { - if x != nil { - return x.PathId +func (x *BgpSrteV4Policy) GetIpv4Endpoint() string { + if x != nil && x.Ipv4Endpoint != nil { + return *x.Ipv4Endpoint } - return nil -} - -// One IPv6 NLRI Prefix. -type BgpOneIpv6NLRIPrefix struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The IPv6 address of the network. - // default = 0::0 - Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` - // The IPv6 network prefix length to be applied to the address. - // default = 64 - Prefix *uint32 `protobuf:"varint,2,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` - // Description missing in models - PathId *BgpNLRIPrefixPathId `protobuf:"bytes,3,opt,name=path_id,json=pathId,proto3" json:"path_id,omitempty"` + return "" } -func (x *BgpOneIpv6NLRIPrefix) Reset() { - *x = BgpOneIpv6NLRIPrefix{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[135] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *BgpSrteV4Policy) GetNextHopMode() BgpSrteV4Policy_NextHopMode_Enum { + if x != nil && x.NextHopMode != nil { + return *x.NextHopMode } + return BgpSrteV4Policy_NextHopMode_unspecified } -func (x *BgpOneIpv6NLRIPrefix) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BgpOneIpv6NLRIPrefix) ProtoMessage() {} - -func (x *BgpOneIpv6NLRIPrefix) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[135] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *BgpSrteV4Policy) GetNextHopAddressType() BgpSrteV4Policy_NextHopAddressType_Enum { + if x != nil && x.NextHopAddressType != nil { + return *x.NextHopAddressType } - return mi.MessageOf(x) + return BgpSrteV4Policy_NextHopAddressType_unspecified } -// Deprecated: Use BgpOneIpv6NLRIPrefix.ProtoReflect.Descriptor instead. -func (*BgpOneIpv6NLRIPrefix) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{135} +func (x *BgpSrteV4Policy) GetNextHopIpv4Address() string { + if x != nil && x.NextHopIpv4Address != nil { + return *x.NextHopIpv4Address + } + return "" } -func (x *BgpOneIpv6NLRIPrefix) GetAddress() string { - if x != nil && x.Address != nil { - return *x.Address +func (x *BgpSrteV4Policy) GetNextHopIpv6Address() string { + if x != nil && x.NextHopIpv6Address != nil { + return *x.NextHopIpv6Address } return "" } -func (x *BgpOneIpv6NLRIPrefix) GetPrefix() uint32 { - if x != nil && x.Prefix != nil { - return *x.Prefix +func (x *BgpSrteV4Policy) GetAdvanced() *BgpRouteAdvanced { + if x != nil { + return x.Advanced } - return 0 + return nil } -func (x *BgpOneIpv6NLRIPrefix) GetPathId() *BgpNLRIPrefixPathId { +func (x *BgpSrteV4Policy) GetAddPath() *BgpAddPath { if x != nil { - return x.PathId + return x.AddPath } return nil } -// Optional field in the NLRI carrying Path Id of the prefix. -type BgpNLRIPrefixPathId struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The value of the optional Path ID of the prefix. - // default = 1 - Value *uint32 `protobuf:"varint,1,opt,name=value,proto3,oneof" json:"value,omitempty"` +func (x *BgpSrteV4Policy) GetAsPath() *BgpAsPath { + if x != nil { + return x.AsPath + } + return nil } -func (x *BgpNLRIPrefixPathId) Reset() { - *x = BgpNLRIPrefixPathId{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[136] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *BgpSrteV4Policy) GetCommunities() []*BgpCommunity { + if x != nil { + return x.Communities } + return nil } -func (x *BgpNLRIPrefixPathId) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *BgpSrteV4Policy) GetExtCommunities() []*BgpExtCommunity { + if x != nil { + return x.ExtCommunities + } + return nil } -func (*BgpNLRIPrefixPathId) ProtoMessage() {} - -func (x *BgpNLRIPrefixPathId) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[136] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *BgpSrteV4Policy) GetTunnelTlvs() []*BgpSrteV4TunnelTlv { + if x != nil { + return x.TunnelTlvs } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpNLRIPrefixPathId.ProtoReflect.Descriptor instead. -func (*BgpNLRIPrefixPathId) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{136} +func (x *BgpSrteV4Policy) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" } -func (x *BgpNLRIPrefixPathId) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *BgpSrteV4Policy) GetActive() bool { + if x != nil && x.Active != nil { + return *x.Active } - return 0 + return false } -// Attributes carried in the Update packet alongwith the reach/unreach prefixes. -type BgpAttributes struct { +// Configuration for BGP SRTE Tunnel TLV. +type BgpSrteV4TunnelTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Any attributes not present in the list of configurable attributes should be added - // to the list of unknown attributes. - OtherAttributes []*BgpAttributesOtherAttribute `protobuf:"bytes,1,rep,name=other_attributes,json=otherAttributes,proto3" json:"other_attributes,omitempty"` - // The ORIGIN attribute is a mandatory attribute which can take three values: - // the prefix originates from an interior routing protocol 'igp', it originates from - // 'egp' - // or the origin is 'incomplete',if the prefix is learned through other means. - // - // default = Origin.Enum.incomplete - Origin *BgpAttributes_Origin_Enum `protobuf:"varint,2,opt,name=origin,proto3,enum=otg.BgpAttributes_Origin_Enum,oneof" json:"origin,omitempty"` - // AS_PATH attribute to be included in the Update. - AsPath *BgpAttributesAsPath `protobuf:"bytes,3,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` - // AS4_PATH attribute to be included in the Update. - As4Path *BgpAttributesAs4Path `protobuf:"bytes,4,opt,name=as4_path,json=as4Path,proto3" json:"as4_path,omitempty"` - // Description missing in models - NextHop *BgpAttributesNextHop `protobuf:"bytes,5,opt,name=next_hop,json=nextHop,proto3" json:"next_hop,omitempty"` // Description missing in models - MultiExitDiscriminator *BgpAttributesMultiExitDiscriminator `protobuf:"bytes,6,opt,name=multi_exit_discriminator,json=multiExitDiscriminator,proto3" json:"multi_exit_discriminator,omitempty"` + RemoteEndpointSubTlv *BgpSrteRemoteEndpointSubTlv `protobuf:"bytes,1,opt,name=remote_endpoint_sub_tlv,json=remoteEndpointSubTlv,proto3" json:"remote_endpoint_sub_tlv,omitempty"` // Description missing in models - LocalPreference *BgpAttributesLocalPreference `protobuf:"bytes,7,opt,name=local_preference,json=localPreference,proto3" json:"local_preference,omitempty"` - // If enabled, it indicates that the ATOMIC_AGGREGATOR attribute should be included - // in the Update. - // Presence of this attribute Indicates that this route might not be getting sent on - // a fully optimized path - // since some intermediate BGP speaker has aggregated the route. - // - // default = False - IncludeAtomicAggregator *bool `protobuf:"varint,8,opt,name=include_atomic_aggregator,json=includeAtomicAggregator,proto3,oneof" json:"include_atomic_aggregator,omitempty"` + ColorSubTlv *BgpSrteColorSubTlv `protobuf:"bytes,2,opt,name=color_sub_tlv,json=colorSubTlv,proto3" json:"color_sub_tlv,omitempty"` // Description missing in models - Aggregator *BgpAttributesAggregator `protobuf:"bytes,9,opt,name=aggregator,proto3" json:"aggregator,omitempty"` + BindingSubTlv *BgpSrteBindingSubTlv `protobuf:"bytes,3,opt,name=binding_sub_tlv,json=bindingSubTlv,proto3" json:"binding_sub_tlv,omitempty"` // Description missing in models - As4Aggregator *BgpAttributesAs4Aggregator `protobuf:"bytes,10,opt,name=as4_aggregator,json=as4Aggregator,proto3" json:"as4_aggregator,omitempty"` + PreferenceSubTlv *BgpSrtePreferenceSubTlv `protobuf:"bytes,4,opt,name=preference_sub_tlv,json=preferenceSubTlv,proto3" json:"preference_sub_tlv,omitempty"` // Description missing in models - Community []*BgpAttributesCommunity `protobuf:"bytes,11,rep,name=community,proto3" json:"community,omitempty"` + PolicyPrioritySubTlv *BgpSrtePolicyPrioritySubTlv `protobuf:"bytes,5,opt,name=policy_priority_sub_tlv,json=policyPrioritySubTlv,proto3" json:"policy_priority_sub_tlv,omitempty"` // Description missing in models - OriginatorId *BgpAttributesOriginatorId `protobuf:"bytes,12,opt,name=originator_id,json=originatorId,proto3" json:"originator_id,omitempty"` - // When a Route Reflector reflects a route, it prepends the local CLUSTER_ID to the - // CLUSTER_LIST as defined in RFC4456. - ClusterIds []string `protobuf:"bytes,13,rep,name=cluster_ids,json=clusterIds,proto3" json:"cluster_ids,omitempty"` - // Optional EXTENDED_COMMUNITY attribute settings. - // The EXTENDED_COMMUNITY Attribute is a transitive optional BGP attribute, with the - // Type Code 16. Community and Extended Communities attributes - // are utilized to trigger routing decisions, such as acceptance, rejection, preference, - // or redistribution. An extended community is an eight byte value. - // It is divided into two main parts. The first two bytes of the community encode a - // type and sub-type fields and the last six bytes carry a unique set - // of data in a format defined by the type and sub-type field. Extended communities - // provide a larger range for grouping or categorizing communities. - ExtendedCommunities []*BgpExtendedCommunity `protobuf:"bytes,14,rep,name=extended_communities,json=extendedCommunities,proto3" json:"extended_communities,omitempty"` + PolicyNameSubTlv *BgpSrtePolicyNameSubTlv `protobuf:"bytes,6,opt,name=policy_name_sub_tlv,json=policyNameSubTlv,proto3" json:"policy_name_sub_tlv,omitempty"` // Description missing in models - MpReach *BgpAttributesMpReachNlri `protobuf:"bytes,16,opt,name=mp_reach,json=mpReach,proto3" json:"mp_reach,omitempty"` + ExplicitNullLabelPolicySubTlv *BgpSrteExplicitNullLabelPolicySubTlv `protobuf:"bytes,7,opt,name=explicit_null_label_policy_sub_tlv,json=explicitNullLabelPolicySubTlv,proto3" json:"explicit_null_label_policy_sub_tlv,omitempty"` // Description missing in models - MpUnreach *BgpAttributesMpUnreachNlri `protobuf:"bytes,17,opt,name=mp_unreach,json=mpUnreach,proto3" json:"mp_unreach,omitempty"` + SegmentLists []*BgpSrteSegmentList `protobuf:"bytes,8,rep,name=segment_lists,json=segmentLists,proto3" json:"segment_lists,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,9,opt,name=name,proto3,oneof" json:"name,omitempty"` + // If enabled means that this part of the configuration including any active 'children' + // nodes will be advertised to peer. If disabled, this means that though config is + // present, it is not taking any part of the test but can be activated at run-time to + // advertise just this part of the configuration to the peer. + // default = True + Active *bool `protobuf:"varint,10,opt,name=active,proto3,oneof" json:"active,omitempty"` } -func (x *BgpAttributes) Reset() { - *x = BgpAttributes{} +func (x *BgpSrteV4TunnelTlv) Reset() { + *x = BgpSrteV4TunnelTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[137] + mi := &file_otg_proto_msgTypes[134] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributes) String() string { +func (x *BgpSrteV4TunnelTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributes) ProtoMessage() {} +func (*BgpSrteV4TunnelTlv) ProtoMessage() {} -func (x *BgpAttributes) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[137] +func (x *BgpSrteV4TunnelTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[134] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -34700,168 +36582,118 @@ func (x *BgpAttributes) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributes.ProtoReflect.Descriptor instead. -func (*BgpAttributes) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{137} -} - -func (x *BgpAttributes) GetOtherAttributes() []*BgpAttributesOtherAttribute { - if x != nil { - return x.OtherAttributes - } - return nil -} - -func (x *BgpAttributes) GetOrigin() BgpAttributes_Origin_Enum { - if x != nil && x.Origin != nil { - return *x.Origin - } - return BgpAttributes_Origin_unspecified -} - -func (x *BgpAttributes) GetAsPath() *BgpAttributesAsPath { - if x != nil { - return x.AsPath - } - return nil -} - -func (x *BgpAttributes) GetAs4Path() *BgpAttributesAs4Path { - if x != nil { - return x.As4Path - } - return nil -} - -func (x *BgpAttributes) GetNextHop() *BgpAttributesNextHop { - if x != nil { - return x.NextHop - } - return nil +// Deprecated: Use BgpSrteV4TunnelTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteV4TunnelTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{134} } -func (x *BgpAttributes) GetMultiExitDiscriminator() *BgpAttributesMultiExitDiscriminator { +func (x *BgpSrteV4TunnelTlv) GetRemoteEndpointSubTlv() *BgpSrteRemoteEndpointSubTlv { if x != nil { - return x.MultiExitDiscriminator + return x.RemoteEndpointSubTlv } return nil } -func (x *BgpAttributes) GetLocalPreference() *BgpAttributesLocalPreference { +func (x *BgpSrteV4TunnelTlv) GetColorSubTlv() *BgpSrteColorSubTlv { if x != nil { - return x.LocalPreference + return x.ColorSubTlv } return nil } -func (x *BgpAttributes) GetIncludeAtomicAggregator() bool { - if x != nil && x.IncludeAtomicAggregator != nil { - return *x.IncludeAtomicAggregator - } - return false -} - -func (x *BgpAttributes) GetAggregator() *BgpAttributesAggregator { +func (x *BgpSrteV4TunnelTlv) GetBindingSubTlv() *BgpSrteBindingSubTlv { if x != nil { - return x.Aggregator + return x.BindingSubTlv } return nil } -func (x *BgpAttributes) GetAs4Aggregator() *BgpAttributesAs4Aggregator { +func (x *BgpSrteV4TunnelTlv) GetPreferenceSubTlv() *BgpSrtePreferenceSubTlv { if x != nil { - return x.As4Aggregator + return x.PreferenceSubTlv } return nil } -func (x *BgpAttributes) GetCommunity() []*BgpAttributesCommunity { +func (x *BgpSrteV4TunnelTlv) GetPolicyPrioritySubTlv() *BgpSrtePolicyPrioritySubTlv { if x != nil { - return x.Community + return x.PolicyPrioritySubTlv } return nil } -func (x *BgpAttributes) GetOriginatorId() *BgpAttributesOriginatorId { +func (x *BgpSrteV4TunnelTlv) GetPolicyNameSubTlv() *BgpSrtePolicyNameSubTlv { if x != nil { - return x.OriginatorId + return x.PolicyNameSubTlv } return nil } -func (x *BgpAttributes) GetClusterIds() []string { +func (x *BgpSrteV4TunnelTlv) GetExplicitNullLabelPolicySubTlv() *BgpSrteExplicitNullLabelPolicySubTlv { if x != nil { - return x.ClusterIds + return x.ExplicitNullLabelPolicySubTlv } return nil } -func (x *BgpAttributes) GetExtendedCommunities() []*BgpExtendedCommunity { +func (x *BgpSrteV4TunnelTlv) GetSegmentLists() []*BgpSrteSegmentList { if x != nil { - return x.ExtendedCommunities + return x.SegmentLists } return nil } -func (x *BgpAttributes) GetMpReach() *BgpAttributesMpReachNlri { - if x != nil { - return x.MpReach +func (x *BgpSrteV4TunnelTlv) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return nil + return "" } -func (x *BgpAttributes) GetMpUnreach() *BgpAttributesMpUnreachNlri { - if x != nil { - return x.MpUnreach +func (x *BgpSrteV4TunnelTlv) GetActive() bool { + if x != nil && x.Active != nil { + return *x.Active } - return nil + return false } -// One unknown attribute stored as hex bytes. -type BgpAttributesOtherAttribute struct { +// Configuration for the BGP remote endpoint sub TLV. +type BgpSrteRemoteEndpointSubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Optional flag in the BGP attribute. - // default = False - FlagOptional *bool `protobuf:"varint,1,opt,name=flag_optional,json=flagOptional,proto3,oneof" json:"flag_optional,omitempty"` - // Transitive flag in the BGP attribute. - // default = False - FlagTransitive *bool `protobuf:"varint,2,opt,name=flag_transitive,json=flagTransitive,proto3,oneof" json:"flag_transitive,omitempty"` - // Partial flag in the BGP attribute. - // default = False - FlagPartial *bool `protobuf:"varint,3,opt,name=flag_partial,json=flagPartial,proto3,oneof" json:"flag_partial,omitempty"` - // Extended length flag in the BGP attribute. - // default = False - FlagExtendedLength *bool `protobuf:"varint,4,opt,name=flag_extended_length,json=flagExtendedLength,proto3,oneof" json:"flag_extended_length,omitempty"` - // The value of the Type field in the attribute. - // required = true - Type *uint32 `protobuf:"varint,5,opt,name=type,proto3,oneof" json:"type,omitempty"` - // Contents of the value field ( the contents after the initial two bytes containing - // the Flags and Type field ) of the attribute in hex bytes. - // It includes the contents of length of the extended length field if included. - // required = true - RawValue *string `protobuf:"bytes,6,opt,name=raw_value,json=rawValue,proto3,oneof" json:"raw_value,omitempty"` + // Autonomous system (AS) number + // default = 0 + AsNumber *uint32 `protobuf:"varint,1,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` + // Determines the address type + // default = AddressFamily.Enum.ipv4 + AddressFamily *BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum `protobuf:"varint,2,opt,name=address_family,json=addressFamily,proto3,enum=otg.BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum,oneof" json:"address_family,omitempty"` + // The IPv4 address of the Remote Endpoint. + // default = 0.0.0.0 + Ipv4Address *string `protobuf:"bytes,3,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` + // The IPv6 address of the Remote Endpoint. + // default = ::0 + Ipv6Address *string `protobuf:"bytes,4,opt,name=ipv6_address,json=ipv6Address,proto3,oneof" json:"ipv6_address,omitempty"` } -func (x *BgpAttributesOtherAttribute) Reset() { - *x = BgpAttributesOtherAttribute{} +func (x *BgpSrteRemoteEndpointSubTlv) Reset() { + *x = BgpSrteRemoteEndpointSubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[138] + mi := &file_otg_proto_msgTypes[135] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesOtherAttribute) String() string { +func (x *BgpSrteRemoteEndpointSubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesOtherAttribute) ProtoMessage() {} +func (*BgpSrteRemoteEndpointSubTlv) ProtoMessage() {} -func (x *BgpAttributesOtherAttribute) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[138] +func (x *BgpSrteRemoteEndpointSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[135] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -34872,96 +36704,132 @@ func (x *BgpAttributesOtherAttribute) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesOtherAttribute.ProtoReflect.Descriptor instead. -func (*BgpAttributesOtherAttribute) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{138} +// Deprecated: Use BgpSrteRemoteEndpointSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteRemoteEndpointSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{135} } -func (x *BgpAttributesOtherAttribute) GetFlagOptional() bool { - if x != nil && x.FlagOptional != nil { - return *x.FlagOptional +func (x *BgpSrteRemoteEndpointSubTlv) GetAsNumber() uint32 { + if x != nil && x.AsNumber != nil { + return *x.AsNumber } - return false + return 0 } -func (x *BgpAttributesOtherAttribute) GetFlagTransitive() bool { - if x != nil && x.FlagTransitive != nil { - return *x.FlagTransitive +func (x *BgpSrteRemoteEndpointSubTlv) GetAddressFamily() BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum { + if x != nil && x.AddressFamily != nil { + return *x.AddressFamily } - return false + return BgpSrteRemoteEndpointSubTlv_AddressFamily_unspecified } -func (x *BgpAttributesOtherAttribute) GetFlagPartial() bool { - if x != nil && x.FlagPartial != nil { - return *x.FlagPartial +func (x *BgpSrteRemoteEndpointSubTlv) GetIpv4Address() string { + if x != nil && x.Ipv4Address != nil { + return *x.Ipv4Address } - return false + return "" } -func (x *BgpAttributesOtherAttribute) GetFlagExtendedLength() bool { - if x != nil && x.FlagExtendedLength != nil { - return *x.FlagExtendedLength +func (x *BgpSrteRemoteEndpointSubTlv) GetIpv6Address() string { + if x != nil && x.Ipv6Address != nil { + return *x.Ipv6Address } - return false + return "" } -func (x *BgpAttributesOtherAttribute) GetType() uint32 { - if x != nil && x.Type != nil { - return *x.Type +// Configuration for the Policy Color attribute sub-TLV. The Color sub-TLV MAY be used +// as a way to color the corresponding Tunnel TLV. The Value field of the sub-TLV is +// eight octets long and consists of a Color Extended Community. First two octets of +// its Value field are 0x030b as type and subtype of extended community. Remaining +// six octets are are exposed to configure. +type BgpSrteColorSubTlv struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Six octet values. Example: 000000000064 for color value 100. + Color *string `protobuf:"bytes,1,opt,name=color,proto3,oneof" json:"color,omitempty"` +} + +func (x *BgpSrteColorSubTlv) Reset() { + *x = BgpSrteColorSubTlv{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[136] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *BgpAttributesOtherAttribute) GetRawValue() string { - if x != nil && x.RawValue != nil { - return *x.RawValue +func (x *BgpSrteColorSubTlv) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpSrteColorSubTlv) ProtoMessage() {} + +func (x *BgpSrteColorSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[136] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpSrteColorSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteColorSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{136} +} + +func (x *BgpSrteColorSubTlv) GetColor() string { + if x != nil && x.Color != nil { + return *x.Color } return "" } -// The AS_PATH attribute identifies the autonomous systems through which routing information -// carried in this UPDATE message has passed. -// This contains the configuration of how to include the Local AS in the AS path -// attribute of the MP REACH NLRI. It also contains optional configuration of -// additional AS Path Segments that can be included in the AS Path attribute. -// The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that -// a routing information passes through to reach the destination. -// There are two modes in which AS numbers can be encoded in the AS Path Segments -// - When the AS Path is being exchanged between old and new BGP speakers or between -// two old BGP speakers , the AS numbers are encoded as 2 byte values. -// - When the AS Path is being exchanged between two new BGP speakers supporting 4 byte -// AS , the AS numbers are encoded as 4 byte values. -type BgpAttributesAsPath struct { +// Configuration for the binding SID sub-TLV. This is used to signal the binding SID +// related information of the SR Policy candidate path. +type BgpSrteBindingSubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.four_byte_as_path - Choice *BgpAttributesAsPath_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpAttributesAsPath_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - FourByteAsPath *BgpAttributesAsPathFourByteAsPath `protobuf:"bytes,2,opt,name=four_byte_as_path,json=fourByteAsPath,proto3" json:"four_byte_as_path,omitempty"` - // Description missing in models - TwoByteAsPath *BgpAttributesAsPathTwoByteAsPath `protobuf:"bytes,3,opt,name=two_byte_as_path,json=twoByteAsPath,proto3" json:"two_byte_as_path,omitempty"` + // Type of the binding SID. Supported types are No Binding SID or Four Octets Sid or + // IPv6 SID. + // default = BindingSidType.Enum.no_binding + BindingSidType *BgpSrteBindingSubTlv_BindingSidType_Enum `protobuf:"varint,1,opt,name=binding_sid_type,json=bindingSidType,proto3,enum=otg.BgpSrteBindingSubTlv_BindingSidType_Enum,oneof" json:"binding_sid_type,omitempty"` + // Binding SID is encoded in 4 octets. + FourOctetSid *uint32 `protobuf:"varint,2,opt,name=four_octet_sid,json=fourOctetSid,proto3,oneof" json:"four_octet_sid,omitempty"` + // IPv6 SID value. + Ipv6Sid *string `protobuf:"bytes,3,opt,name=ipv6_sid,json=ipv6Sid,proto3,oneof" json:"ipv6_sid,omitempty"` + // S-Flag encodes the Specified-BSID-only behavior. + // default = False + SFlag *bool `protobuf:"varint,4,opt,name=s_flag,json=sFlag,proto3,oneof" json:"s_flag,omitempty"` + // I-Flag encodes the Drop Upon Invalid behavior. + // default = False + IFlag *bool `protobuf:"varint,5,opt,name=i_flag,json=iFlag,proto3,oneof" json:"i_flag,omitempty"` } -func (x *BgpAttributesAsPath) Reset() { - *x = BgpAttributesAsPath{} +func (x *BgpSrteBindingSubTlv) Reset() { + *x = BgpSrteBindingSubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[139] + mi := &file_otg_proto_msgTypes[137] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesAsPath) String() string { +func (x *BgpSrteBindingSubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesAsPath) ProtoMessage() {} +func (*BgpSrteBindingSubTlv) ProtoMessage() {} -func (x *BgpAttributesAsPath) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[139] +func (x *BgpSrteBindingSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[137] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -34972,62 +36840,74 @@ func (x *BgpAttributesAsPath) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesAsPath.ProtoReflect.Descriptor instead. -func (*BgpAttributesAsPath) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{139} +// Deprecated: Use BgpSrteBindingSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteBindingSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{137} } -func (x *BgpAttributesAsPath) GetChoice() BgpAttributesAsPath_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *BgpSrteBindingSubTlv) GetBindingSidType() BgpSrteBindingSubTlv_BindingSidType_Enum { + if x != nil && x.BindingSidType != nil { + return *x.BindingSidType } - return BgpAttributesAsPath_Choice_unspecified + return BgpSrteBindingSubTlv_BindingSidType_unspecified } -func (x *BgpAttributesAsPath) GetFourByteAsPath() *BgpAttributesAsPathFourByteAsPath { - if x != nil { - return x.FourByteAsPath +func (x *BgpSrteBindingSubTlv) GetFourOctetSid() uint32 { + if x != nil && x.FourOctetSid != nil { + return *x.FourOctetSid } - return nil + return 0 } -func (x *BgpAttributesAsPath) GetTwoByteAsPath() *BgpAttributesAsPathTwoByteAsPath { - if x != nil { - return x.TwoByteAsPath +func (x *BgpSrteBindingSubTlv) GetIpv6Sid() string { + if x != nil && x.Ipv6Sid != nil { + return *x.Ipv6Sid } - return nil + return "" } -// AS Paths with 4 byte AS numbers can be exchanged only if both BGP speakers support -// 4 byte AS number extensions. -type BgpAttributesAsPathFourByteAsPath struct { +func (x *BgpSrteBindingSubTlv) GetSFlag() bool { + if x != nil && x.SFlag != nil { + return *x.SFlag + } + return false +} + +func (x *BgpSrteBindingSubTlv) GetIFlag() bool { + if x != nil && x.IFlag != nil { + return *x.IFlag + } + return false +} + +// Configuration for BGP preference sub TLV of the SR Policy candidate path. +type BgpSrtePreferenceSubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The AS path segments containing 4 byte AS numbers to be added in the AS Path attribute. - // By default, an empty AS path should always be included and for EBGP at minimum the - // local AS number should be present in the AS Path. - Segments []*BgpAttributesFourByteAsPathSegment `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"` + // The preference value of the SR Policy candidate path. + // default = 0 + Preference *uint32 `protobuf:"varint,1,opt,name=preference,proto3,oneof" json:"preference,omitempty"` } -func (x *BgpAttributesAsPathFourByteAsPath) Reset() { - *x = BgpAttributesAsPathFourByteAsPath{} +func (x *BgpSrtePreferenceSubTlv) Reset() { + *x = BgpSrtePreferenceSubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[140] + mi := &file_otg_proto_msgTypes[138] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesAsPathFourByteAsPath) String() string { +func (x *BgpSrtePreferenceSubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesAsPathFourByteAsPath) ProtoMessage() {} +func (*BgpSrtePreferenceSubTlv) ProtoMessage() {} -func (x *BgpAttributesAsPathFourByteAsPath) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[140] +func (x *BgpSrtePreferenceSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[138] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -35038,58 +36918,46 @@ func (x *BgpAttributesAsPathFourByteAsPath) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesAsPathFourByteAsPath.ProtoReflect.Descriptor instead. -func (*BgpAttributesAsPathFourByteAsPath) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{140} +// Deprecated: Use BgpSrtePreferenceSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrtePreferenceSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{138} } -func (x *BgpAttributesAsPathFourByteAsPath) GetSegments() []*BgpAttributesFourByteAsPathSegment { - if x != nil { - return x.Segments +func (x *BgpSrtePreferenceSubTlv) GetPreference() uint32 { + if x != nil && x.Preference != nil { + return *x.Preference } - return nil + return 0 } -// Configuration for a single BGP AS path segment containing 4 byte AS numbers. -type BgpAttributesFourByteAsPathSegment struct { +// Configuration for the Policy Priority sub-TLV. The Policy Priority to indicate the +// order in which the SR policies are re-computed upon topological change. +type BgpSrtePolicyPrioritySubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // AS sequence is the most common type of AS_PATH, it contains the list - // of ASNs starting with the most recent ASN being added read from left - // to right. - // The other three AS_PATH types are used for Confederations - // - AS_SET is the type of AS_PATH attribute that summarizes routes using - // using the aggregate-address command, allowing AS_PATHs to be summarized - // in the update as well. - // - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most - // recent ASN to be added reading left to right - // - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent - // in BGP Updates. - // default = Type.Enum.as_seq - Type *BgpAttributesFourByteAsPathSegment_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.BgpAttributesFourByteAsPathSegment_Type_Enum,oneof" json:"type,omitempty"` - // The 4 byte AS numbers in this AS path segment. - AsNumbers []uint32 `protobuf:"varint,2,rep,packed,name=as_numbers,json=asNumbers,proto3" json:"as_numbers,omitempty"` + // One-octet Priority value. + PolicyPriority *uint32 `protobuf:"varint,1,opt,name=policy_priority,json=policyPriority,proto3,oneof" json:"policy_priority,omitempty"` } -func (x *BgpAttributesFourByteAsPathSegment) Reset() { - *x = BgpAttributesFourByteAsPathSegment{} +func (x *BgpSrtePolicyPrioritySubTlv) Reset() { + *x = BgpSrtePolicyPrioritySubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[141] + mi := &file_otg_proto_msgTypes[139] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesFourByteAsPathSegment) String() string { +func (x *BgpSrtePolicyPrioritySubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesFourByteAsPathSegment) ProtoMessage() {} +func (*BgpSrtePolicyPrioritySubTlv) ProtoMessage() {} -func (x *BgpAttributesFourByteAsPathSegment) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[141] +func (x *BgpSrtePolicyPrioritySubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[139] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -35100,56 +36968,47 @@ func (x *BgpAttributesFourByteAsPathSegment) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesFourByteAsPathSegment.ProtoReflect.Descriptor instead. -func (*BgpAttributesFourByteAsPathSegment) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{141} -} - -func (x *BgpAttributesFourByteAsPathSegment) GetType() BgpAttributesFourByteAsPathSegment_Type_Enum { - if x != nil && x.Type != nil { - return *x.Type - } - return BgpAttributesFourByteAsPathSegment_Type_unspecified +// Deprecated: Use BgpSrtePolicyPrioritySubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrtePolicyPrioritySubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{139} } -func (x *BgpAttributesFourByteAsPathSegment) GetAsNumbers() []uint32 { - if x != nil { - return x.AsNumbers +func (x *BgpSrtePolicyPrioritySubTlv) GetPolicyPriority() uint32 { + if x != nil && x.PolicyPriority != nil { + return *x.PolicyPriority } - return nil + return 0 } -// AS Paths with 2 byte AS numbers is used when any of the two scenarios occur : -// - An old BGP speaker and new BGP speaker are sending BGP Updates to one another. -// - Two old BGP speakers are sending BGP Updates to one another. -type BgpAttributesAsPathTwoByteAsPath struct { +// Configuration for the Policy Name sub-TLV. The Policy Name sub-TLV is used to attach +// a symbolic name to the SR Policy candidate path. +type BgpSrtePolicyNameSubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The AS path segments containing 2 byte AS numbers to be added in the AS Path attribute. - // By default, an empty AS path should always be included and for EBGP the sender's - // AS number should be prepended to the AS Path. - Segments []*BgpAttributesTwoByteAsPathSegment `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"` + // Symbolic name for the policy that should be a string of printable ASCII characters, + // without a NULL terminator. + PolicyName *string `protobuf:"bytes,1,opt,name=policy_name,json=policyName,proto3,oneof" json:"policy_name,omitempty"` } -func (x *BgpAttributesAsPathTwoByteAsPath) Reset() { - *x = BgpAttributesAsPathTwoByteAsPath{} +func (x *BgpSrtePolicyNameSubTlv) Reset() { + *x = BgpSrtePolicyNameSubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[142] + mi := &file_otg_proto_msgTypes[140] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesAsPathTwoByteAsPath) String() string { +func (x *BgpSrtePolicyNameSubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesAsPathTwoByteAsPath) ProtoMessage() {} +func (*BgpSrtePolicyNameSubTlv) ProtoMessage() {} -func (x *BgpAttributesAsPathTwoByteAsPath) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[142] +func (x *BgpSrtePolicyNameSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[140] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -35160,58 +37019,46 @@ func (x *BgpAttributesAsPathTwoByteAsPath) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesAsPathTwoByteAsPath.ProtoReflect.Descriptor instead. -func (*BgpAttributesAsPathTwoByteAsPath) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{142} +// Deprecated: Use BgpSrtePolicyNameSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrtePolicyNameSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{140} } -func (x *BgpAttributesAsPathTwoByteAsPath) GetSegments() []*BgpAttributesTwoByteAsPathSegment { - if x != nil { - return x.Segments +func (x *BgpSrtePolicyNameSubTlv) GetPolicyName() string { + if x != nil && x.PolicyName != nil { + return *x.PolicyName } - return nil + return "" } -// Configuration for a single BGP AS path segment containing 2 byte AS numbers. -type BgpAttributesTwoByteAsPathSegment struct { +// Configuration for BGP explicit null label policy sub TLV settings. +type BgpSrteExplicitNullLabelPolicySubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // AS sequence is the most common type of AS_PATH, it contains the list - // of ASNs starting with the most recent ASN being added read from left - // to right. - // The other three AS_PATH types are used for Confederations - // - AS_SET is the type of AS_PATH attribute that summarizes routes using - // using the aggregate-address command, allowing AS_PATHs to be summarized - // in the update as well. - // - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most - // recent ASN to be added reading left to right - // - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent - // in BGP Updates. - // default = Type.Enum.as_seq - Type *BgpAttributesTwoByteAsPathSegment_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.BgpAttributesTwoByteAsPathSegment_Type_Enum,oneof" json:"type,omitempty"` - // The 2 byte AS numbers in this AS path segment. - AsNumbers []uint32 `protobuf:"varint,2,rep,packed,name=as_numbers,json=asNumbers,proto3" json:"as_numbers,omitempty"` + // The value of the explicit null label policy + // default = ExplicitNullLabelPolicy.Enum.do_not_push_enlp + ExplicitNullLabelPolicy *BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum `protobuf:"varint,1,opt,name=explicit_null_label_policy,json=explicitNullLabelPolicy,proto3,enum=otg.BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum,oneof" json:"explicit_null_label_policy,omitempty"` } -func (x *BgpAttributesTwoByteAsPathSegment) Reset() { - *x = BgpAttributesTwoByteAsPathSegment{} +func (x *BgpSrteExplicitNullLabelPolicySubTlv) Reset() { + *x = BgpSrteExplicitNullLabelPolicySubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[143] + mi := &file_otg_proto_msgTypes[141] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesTwoByteAsPathSegment) String() string { +func (x *BgpSrteExplicitNullLabelPolicySubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesTwoByteAsPathSegment) ProtoMessage() {} +func (*BgpSrteExplicitNullLabelPolicySubTlv) ProtoMessage() {} -func (x *BgpAttributesTwoByteAsPathSegment) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[143] +func (x *BgpSrteExplicitNullLabelPolicySubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[141] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -35222,64 +37069,59 @@ func (x *BgpAttributesTwoByteAsPathSegment) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesTwoByteAsPathSegment.ProtoReflect.Descriptor instead. -func (*BgpAttributesTwoByteAsPathSegment) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{143} -} - -func (x *BgpAttributesTwoByteAsPathSegment) GetType() BgpAttributesTwoByteAsPathSegment_Type_Enum { - if x != nil && x.Type != nil { - return *x.Type - } - return BgpAttributesTwoByteAsPathSegment_Type_unspecified +// Deprecated: Use BgpSrteExplicitNullLabelPolicySubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteExplicitNullLabelPolicySubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{141} } -func (x *BgpAttributesTwoByteAsPathSegment) GetAsNumbers() []uint32 { - if x != nil { - return x.AsNumbers +func (x *BgpSrteExplicitNullLabelPolicySubTlv) GetExplicitNullLabelPolicy() BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum { + if x != nil && x.ExplicitNullLabelPolicy != nil { + return *x.ExplicitNullLabelPolicy } - return nil + return BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_unspecified } -// The AS4_PATH attribute identifies the autonomous systems through which routing information -// carried in this UPDATE message has passed. -// This contains the configuration of how to include the Local AS in the AS path -// attribute of the MP REACH NLRI. It also contains optional configuration of -// additional AS Path Segments that can be included in the AS Path attribute. -// The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that -// a routing information passes through to reach the destination. -// AS4_PATH is only exchanged in two scenarios: -// - When an old BGP speaker has to forward a received AS4_PATH containing 4 byte AS -// numbers to new BGP speaker. -// - When a new BGP speaker is connected to an old BGP speaker and has to propagate -// 4 byte AS numbers via the old BGP speaker. -// Its usage is described in RFC4893. -type BgpAttributesAs4Path struct { +// Optional configuration for BGP SR TE Policy segment list. The Segment List sub-TLV +// encodes a single explicit path towards the Endpoint. +type BgpSrteSegmentList struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The AS path segments containing 4 byte AS numbers to be added in the AS4_PATH attribute. - Segments []*BgpAttributesFourByteAsPathSegment `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"` + // The Weight associated with a given path and the sub-TLV is optional. + // default = 0 + Weight *uint32 `protobuf:"varint,1,opt,name=weight,proto3,oneof" json:"weight,omitempty"` + // Description missing in models + Segments []*BgpSrteSegment `protobuf:"bytes,2,rep,name=segments,proto3" json:"segments,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"` + // If enabled means that this part of the configuration including any active 'children' + // nodes will be advertised to peer. If disabled, this means that though config is + // present, it is not taking any part of the test but can be activated at run-time to + // advertise just this part of the configuration to the peer. + // default = True + Active *bool `protobuf:"varint,4,opt,name=active,proto3,oneof" json:"active,omitempty"` } -func (x *BgpAttributesAs4Path) Reset() { - *x = BgpAttributesAs4Path{} +func (x *BgpSrteSegmentList) Reset() { + *x = BgpSrteSegmentList{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[144] + mi := &file_otg_proto_msgTypes[142] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesAs4Path) String() string { +func (x *BgpSrteSegmentList) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesAs4Path) ProtoMessage() {} +func (*BgpSrteSegmentList) ProtoMessage() {} -func (x *BgpAttributesAs4Path) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[144] +func (x *BgpSrteSegmentList) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[142] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -35290,65 +37132,114 @@ func (x *BgpAttributesAs4Path) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesAs4Path.ProtoReflect.Descriptor instead. -func (*BgpAttributesAs4Path) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{144} +// Deprecated: Use BgpSrteSegmentList.ProtoReflect.Descriptor instead. +func (*BgpSrteSegmentList) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{142} } -func (x *BgpAttributesAs4Path) GetSegments() []*BgpAttributesFourByteAsPathSegment { +func (x *BgpSrteSegmentList) GetWeight() uint32 { + if x != nil && x.Weight != nil { + return *x.Weight + } + return 0 +} + +func (x *BgpSrteSegmentList) GetSegments() []*BgpSrteSegment { if x != nil { return x.Segments } return nil } -// Optional AGGREGATOR attribute which maybe be added by a BGP speaker which performs -// route aggregation. -// When AGGREGATOR attribute is being sent to a new BGP speaker , the AS number is encoded -// as a 4 byte value. -// When AGGREGATOR attribute is being exchanged between a new and an old BGP speaker -// or between two old BGP speakers, -// the AS number is encoded as a 2 byte value. -// It contain the AS number and IP address of the speaker performing the aggregation. -type BgpAttributesAggregator struct { +func (x *BgpSrteSegmentList) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *BgpSrteSegmentList) GetActive() bool { + if x != nil && x.Active != nil { + return *x.Active + } + return false +} + +// A Segment sub-TLV describes a single segment in a segment list i.e., a single element +// of the explicit path. The Segment sub-TLVs are optional. +type BgpSrteSegment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Specify one of the segment type. + // https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13 + // Type A: SID only, in the form of MPLS Label. + // Type B: SID only, in the form of IPv6 Address. + // Type C: IPv4 Node Address with optional SID. + // Type D: IPv6 Node Address with optional SID for SR MPLS. + // Type E: IPv4 Address and index with optional SID. + // Type F: IPv4 Local and Remote addresses with optional SID. + // Type G: IPv6 Address and index for local and remote pair with optional + // SID for SR MPLS. + // Type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. + // Type I: IPv6 Node Address with optional SID for SRv6. + // Type J: IPv6 Address and index for local and remote pair with optional + // SID for SRv6. + // Type K: IPv6 Local and Remote addresses for SRv6. + // required = true + SegmentType *BgpSrteSegment_SegmentType_Enum `protobuf:"varint,1,opt,name=segment_type,json=segmentType,proto3,enum=otg.BgpSrteSegment_SegmentType_Enum,oneof" json:"segment_type,omitempty"` // Description missing in models - // default = Choice.Enum.four_byte_as - Choice *BgpAttributesAggregator_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpAttributesAggregator_Choice_Enum,oneof" json:"choice,omitempty"` - // The value of the 4 byte AS number of the BGP speaker which aggregated the route. - // If the value of the AS number is less than 2 octets ( 65535 or less), the AS4_AGGREGATOR - // object should not be sent. - // default = 65536 - FourByteAs *uint32 `protobuf:"varint,2,opt,name=four_byte_as,json=fourByteAs,proto3,oneof" json:"four_byte_as,omitempty"` - // The value of the 2 byte AS number of the BGP speaker which aggregated the route. - // - // default = 1 - TwoByteAs *uint32 `protobuf:"varint,3,opt,name=two_byte_as,json=twoByteAs,proto3,oneof" json:"two_byte_as,omitempty"` - // The IPv4 address of the BGP speaker which aggregated the route. - // default = 0.0.0.0 - Ipv4Address *string `protobuf:"bytes,4,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` + TypeA *BgpSrteSegmentATypeSubTlv `protobuf:"bytes,2,opt,name=type_a,json=typeA,proto3" json:"type_a,omitempty"` + // Description missing in models + TypeB *BgpSrteSegmentBTypeSubTlv `protobuf:"bytes,3,opt,name=type_b,json=typeB,proto3" json:"type_b,omitempty"` + // Description missing in models + TypeC *BgpSrteSegmentCTypeSubTlv `protobuf:"bytes,4,opt,name=type_c,json=typeC,proto3" json:"type_c,omitempty"` + // Description missing in models + TypeD *BgpSrteSegmentDTypeSubTlv `protobuf:"bytes,5,opt,name=type_d,json=typeD,proto3" json:"type_d,omitempty"` + // Description missing in models + TypeE *BgpSrteSegmentETypeSubTlv `protobuf:"bytes,6,opt,name=type_e,json=typeE,proto3" json:"type_e,omitempty"` + // Description missing in models + TypeF *BgpSrteSegmentFTypeSubTlv `protobuf:"bytes,7,opt,name=type_f,json=typeF,proto3" json:"type_f,omitempty"` + // Description missing in models + TypeG *BgpSrteSegmentGTypeSubTlv `protobuf:"bytes,8,opt,name=type_g,json=typeG,proto3" json:"type_g,omitempty"` + // Description missing in models + TypeH *BgpSrteSegmentHTypeSubTlv `protobuf:"bytes,9,opt,name=type_h,json=typeH,proto3" json:"type_h,omitempty"` + // Description missing in models + TypeI *BgpSrteSegmentITypeSubTlv `protobuf:"bytes,10,opt,name=type_i,json=typeI,proto3" json:"type_i,omitempty"` + // Description missing in models + TypeJ *BgpSrteSegmentJTypeSubTlv `protobuf:"bytes,11,opt,name=type_j,json=typeJ,proto3" json:"type_j,omitempty"` + // Description missing in models + TypeK *BgpSrteSegmentKTypeSubTlv `protobuf:"bytes,12,opt,name=type_k,json=typeK,proto3" json:"type_k,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,13,opt,name=name,proto3,oneof" json:"name,omitempty"` + // If enabled means that this part of the configuration including any active 'children' + // nodes will be advertised to peer. If disabled, this means that though config is + // present, it is not taking any part of the test but can be activated at run-time to + // advertise just this part of the configuration to the peer. + // default = True + Active *bool `protobuf:"varint,14,opt,name=active,proto3,oneof" json:"active,omitempty"` } -func (x *BgpAttributesAggregator) Reset() { - *x = BgpAttributesAggregator{} +func (x *BgpSrteSegment) Reset() { + *x = BgpSrteSegment{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[145] + mi := &file_otg_proto_msgTypes[143] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesAggregator) String() string { +func (x *BgpSrteSegment) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesAggregator) ProtoMessage() {} +func (*BgpSrteSegment) ProtoMessage() {} -func (x *BgpAttributesAggregator) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[145] +func (x *BgpSrteSegment) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[143] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -35359,138 +37250,142 @@ func (x *BgpAttributesAggregator) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesAggregator.ProtoReflect.Descriptor instead. -func (*BgpAttributesAggregator) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{145} +// Deprecated: Use BgpSrteSegment.ProtoReflect.Descriptor instead. +func (*BgpSrteSegment) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{143} } -func (x *BgpAttributesAggregator) GetChoice() BgpAttributesAggregator_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *BgpSrteSegment) GetSegmentType() BgpSrteSegment_SegmentType_Enum { + if x != nil && x.SegmentType != nil { + return *x.SegmentType } - return BgpAttributesAggregator_Choice_unspecified + return BgpSrteSegment_SegmentType_unspecified } -func (x *BgpAttributesAggregator) GetFourByteAs() uint32 { - if x != nil && x.FourByteAs != nil { - return *x.FourByteAs +func (x *BgpSrteSegment) GetTypeA() *BgpSrteSegmentATypeSubTlv { + if x != nil { + return x.TypeA } - return 0 + return nil } -func (x *BgpAttributesAggregator) GetTwoByteAs() uint32 { - if x != nil && x.TwoByteAs != nil { - return *x.TwoByteAs +func (x *BgpSrteSegment) GetTypeB() *BgpSrteSegmentBTypeSubTlv { + if x != nil { + return x.TypeB } - return 0 + return nil } -func (x *BgpAttributesAggregator) GetIpv4Address() string { - if x != nil && x.Ipv4Address != nil { - return *x.Ipv4Address +func (x *BgpSrteSegment) GetTypeC() *BgpSrteSegmentCTypeSubTlv { + if x != nil { + return x.TypeC } - return "" + return nil } -// Optional AS4_AGGREGATOR attribute which maybe be added by a BGP speaker in one of -// two cases: -// - If it is a new BGP speaker speaking to an old BGP speaker and needs to send a 4 -// byte value for the AS number of the BGP route aggregator. -// - If it is a old BGP speaker speaking to a new BGP speaker and has to transparently -// forward a received AS4_AGGREGATOR from some other peer. -// Its usage is described in RFC4893. -type BgpAttributesAs4Aggregator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *BgpSrteSegment) GetTypeD() *BgpSrteSegmentDTypeSubTlv { + if x != nil { + return x.TypeD + } + return nil +} - // The value of the 4 byte AS number of the BGP speaker which aggregated the route. - AsNum *uint32 `protobuf:"varint,1,opt,name=as_num,json=asNum,proto3,oneof" json:"as_num,omitempty"` - // The IPv4 address of the BGP speaker which aggregated the route. - // default = 0.0.0.0 - Ipv4Address *string `protobuf:"bytes,2,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` +func (x *BgpSrteSegment) GetTypeE() *BgpSrteSegmentETypeSubTlv { + if x != nil { + return x.TypeE + } + return nil } -func (x *BgpAttributesAs4Aggregator) Reset() { - *x = BgpAttributesAs4Aggregator{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[146] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *BgpSrteSegment) GetTypeF() *BgpSrteSegmentFTypeSubTlv { + if x != nil { + return x.TypeF } + return nil } -func (x *BgpAttributesAs4Aggregator) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *BgpSrteSegment) GetTypeG() *BgpSrteSegmentGTypeSubTlv { + if x != nil { + return x.TypeG + } + return nil } -func (*BgpAttributesAs4Aggregator) ProtoMessage() {} +func (x *BgpSrteSegment) GetTypeH() *BgpSrteSegmentHTypeSubTlv { + if x != nil { + return x.TypeH + } + return nil +} -func (x *BgpAttributesAs4Aggregator) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[146] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *BgpSrteSegment) GetTypeI() *BgpSrteSegmentITypeSubTlv { + if x != nil { + return x.TypeI } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpAttributesAs4Aggregator.ProtoReflect.Descriptor instead. -func (*BgpAttributesAs4Aggregator) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{146} +func (x *BgpSrteSegment) GetTypeJ() *BgpSrteSegmentJTypeSubTlv { + if x != nil { + return x.TypeJ + } + return nil } -func (x *BgpAttributesAs4Aggregator) GetAsNum() uint32 { - if x != nil && x.AsNum != nil { - return *x.AsNum +func (x *BgpSrteSegment) GetTypeK() *BgpSrteSegmentKTypeSubTlv { + if x != nil { + return x.TypeK } - return 0 + return nil } -func (x *BgpAttributesAs4Aggregator) GetIpv4Address() string { - if x != nil && x.Ipv4Address != nil { - return *x.Ipv4Address +func (x *BgpSrteSegment) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } return "" } -// The COMMUNITY attribute provide additional capability for tagging routes and for -// modifying BGP routing policy on -// upstream and downstream routers. BGP community is a 32-bit number which is broken -// into 16-bit AS number and a -// 16-bit custom value or it contains some pre-defined well known values. -type BgpAttributesCommunity struct { +func (x *BgpSrteSegment) GetActive() bool { + if x != nil && x.Active != nil { + return *x.Active + } + return false +} + +// Configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. +type BgpSrteSrMplsSid struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The type of community AS number. - // required = true - Choice *BgpAttributesCommunity_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpAttributesCommunity_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - CustomCommunity *BgpAttributesCustomCommunity `protobuf:"bytes,2,opt,name=custom_community,json=customCommunity,proto3" json:"custom_community,omitempty"` + // Label value in [0, 2^20 -1]. + Label *uint32 `protobuf:"varint,1,opt,name=label,proto3,oneof" json:"label,omitempty"` + // Traffic class in bits. + Tc *uint32 `protobuf:"varint,2,opt,name=tc,proto3,oneof" json:"tc,omitempty"` + // Bottom-of-Stack bit. + SBit *bool `protobuf:"varint,3,opt,name=s_bit,json=sBit,proto3,oneof" json:"s_bit,omitempty"` + // Time To Live. + Ttl *uint32 `protobuf:"varint,4,opt,name=ttl,proto3,oneof" json:"ttl,omitempty"` } -func (x *BgpAttributesCommunity) Reset() { - *x = BgpAttributesCommunity{} +func (x *BgpSrteSrMplsSid) Reset() { + *x = BgpSrteSrMplsSid{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[147] + mi := &file_otg_proto_msgTypes[144] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesCommunity) String() string { +func (x *BgpSrteSrMplsSid) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesCommunity) ProtoMessage() {} +func (*BgpSrteSrMplsSid) ProtoMessage() {} -func (x *BgpAttributesCommunity) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[147] +func (x *BgpSrteSrMplsSid) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[144] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -35501,58 +37396,78 @@ func (x *BgpAttributesCommunity) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesCommunity.ProtoReflect.Descriptor instead. -func (*BgpAttributesCommunity) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{147} +// Deprecated: Use BgpSrteSrMplsSid.ProtoReflect.Descriptor instead. +func (*BgpSrteSrMplsSid) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{144} } -func (x *BgpAttributesCommunity) GetChoice() BgpAttributesCommunity_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *BgpSrteSrMplsSid) GetLabel() uint32 { + if x != nil && x.Label != nil { + return *x.Label } - return BgpAttributesCommunity_Choice_unspecified + return 0 } -func (x *BgpAttributesCommunity) GetCustomCommunity() *BgpAttributesCustomCommunity { - if x != nil { - return x.CustomCommunity +func (x *BgpSrteSrMplsSid) GetTc() uint32 { + if x != nil && x.Tc != nil { + return *x.Tc } - return nil + return 0 } -// User defined COMMUNITY attribute containing 2 byte AS and custom 2 byte value defined -// by the administrator of the domain. -type BgpAttributesCustomCommunity struct { +func (x *BgpSrteSrMplsSid) GetSBit() bool { + if x != nil && x.SBit != nil { + return *x.SBit + } + return false +} + +func (x *BgpSrteSrMplsSid) GetTtl() uint32 { + if x != nil && x.Ttl != nil { + return *x.Ttl + } + return 0 +} + +// Configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation +// of lengths for Locator Block, Locator Node, Function, and Argument MUST be less +// than or equal to 128. +type BgpSrteSRv6SIDEndpointBehaviorAndStructure struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // First two octets of the community value containing a 2 byte AS number. + // SRv6 SID Locator Block length in bits. // default = 0 - AsNumber *uint32 `protobuf:"varint,1,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` - // Last two octets of the community value in hex. If user provides less than 4 hex - // bytes, it should be left-padded with 0s. - // default = 0000 - Custom *string `protobuf:"bytes,2,opt,name=custom,proto3,oneof" json:"custom,omitempty"` + LbLength *uint32 `protobuf:"varint,1,opt,name=lb_length,json=lbLength,proto3,oneof" json:"lb_length,omitempty"` + // SRv6 SID Locator Node length in bits. + // default = 0 + LnLength *uint32 `protobuf:"varint,2,opt,name=ln_length,json=lnLength,proto3,oneof" json:"ln_length,omitempty"` + // SRv6 SID Function length in bits. + // default = 0 + FuncLength *uint32 `protobuf:"varint,3,opt,name=func_length,json=funcLength,proto3,oneof" json:"func_length,omitempty"` + // SRv6 SID Arguments length in bits. + // default = 0 + ArgLength *uint32 `protobuf:"varint,4,opt,name=arg_length,json=argLength,proto3,oneof" json:"arg_length,omitempty"` } -func (x *BgpAttributesCustomCommunity) Reset() { - *x = BgpAttributesCustomCommunity{} +func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) Reset() { + *x = BgpSrteSRv6SIDEndpointBehaviorAndStructure{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[148] + mi := &file_otg_proto_msgTypes[145] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesCustomCommunity) String() string { +func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesCustomCommunity) ProtoMessage() {} +func (*BgpSrteSRv6SIDEndpointBehaviorAndStructure) ProtoMessage() {} -func (x *BgpAttributesCustomCommunity) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[148] +func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[145] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -35563,62 +37478,75 @@ func (x *BgpAttributesCustomCommunity) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesCustomCommunity.ProtoReflect.Descriptor instead. -func (*BgpAttributesCustomCommunity) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{148} +// Deprecated: Use BgpSrteSRv6SIDEndpointBehaviorAndStructure.ProtoReflect.Descriptor instead. +func (*BgpSrteSRv6SIDEndpointBehaviorAndStructure) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{145} } -func (x *BgpAttributesCustomCommunity) GetAsNumber() uint32 { - if x != nil && x.AsNumber != nil { - return *x.AsNumber +func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) GetLbLength() uint32 { + if x != nil && x.LbLength != nil { + return *x.LbLength } return 0 } -func (x *BgpAttributesCustomCommunity) GetCustom() string { - if x != nil && x.Custom != nil { - return *x.Custom +func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) GetLnLength() uint32 { + if x != nil && x.LnLength != nil { + return *x.LnLength } - return "" + return 0 } -// Next hop to be sent inside MP_REACH NLRI or as the NEXT_HOP attribute if advertised -// as traditional NLRI. -type BgpAttributesNextHop struct { +func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) GetFuncLength() uint32 { + if x != nil && x.FuncLength != nil { + return *x.FuncLength + } + return 0 +} + +func (x *BgpSrteSRv6SIDEndpointBehaviorAndStructure) GetArgLength() uint32 { + if x != nil && x.ArgLength != nil { + return *x.ArgLength + } + return 0 +} + +// Type A: SID only, in the form of MPLS Label. +type BgpSrteSegmentATypeSubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The type of the next HOP. - // required = true - Choice *BgpAttributesNextHop_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpAttributesNextHop_Choice_Enum,oneof" json:"choice,omitempty"` - // The 4 byte IPv4 address of the next-hop from which the route was received. - // default = 0.0.0.0 - Ipv4 *string `protobuf:"bytes,2,opt,name=ipv4,proto3,oneof" json:"ipv4,omitempty"` - // The 16 byte IPv6 address of the next-hop from which the route was received. - // default = 0::0 - Ipv6 *string `protobuf:"bytes,3,opt,name=ipv6,proto3,oneof" json:"ipv6,omitempty"` - // Description missing in models - Ipv6TwoAddresses *BgpAttributesNextHopIpv6TwoAddresses `protobuf:"bytes,4,opt,name=ipv6_two_addresses,json=ipv6TwoAddresses,proto3" json:"ipv6_two_addresses,omitempty"` + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` + // Label value in [0, 2^20 -1]. + Label *uint32 `protobuf:"varint,2,opt,name=label,proto3,oneof" json:"label,omitempty"` + // Traffic class in bits. + Tc *uint32 `protobuf:"varint,3,opt,name=tc,proto3,oneof" json:"tc,omitempty"` + // Bottom-of-Stack bit. + SBit *bool `protobuf:"varint,4,opt,name=s_bit,json=sBit,proto3,oneof" json:"s_bit,omitempty"` + // Time To Live. + Ttl *uint32 `protobuf:"varint,5,opt,name=ttl,proto3,oneof" json:"ttl,omitempty"` } -func (x *BgpAttributesNextHop) Reset() { - *x = BgpAttributesNextHop{} +func (x *BgpSrteSegmentATypeSubTlv) Reset() { + *x = BgpSrteSegmentATypeSubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[149] + mi := &file_otg_proto_msgTypes[146] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesNextHop) String() string { +func (x *BgpSrteSegmentATypeSubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesNextHop) ProtoMessage() {} +func (*BgpSrteSegmentATypeSubTlv) ProtoMessage() {} -func (x *BgpAttributesNextHop) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[149] +func (x *BgpSrteSegmentATypeSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[146] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -35629,72 +37557,79 @@ func (x *BgpAttributesNextHop) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesNextHop.ProtoReflect.Descriptor instead. -func (*BgpAttributesNextHop) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{149} +// Deprecated: Use BgpSrteSegmentATypeSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteSegmentATypeSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{146} } -func (x *BgpAttributesNextHop) GetChoice() BgpAttributesNextHop_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *BgpSrteSegmentATypeSubTlv) GetFlags() string { + if x != nil && x.Flags != nil { + return *x.Flags } - return BgpAttributesNextHop_Choice_unspecified + return "" } -func (x *BgpAttributesNextHop) GetIpv4() string { - if x != nil && x.Ipv4 != nil { - return *x.Ipv4 +func (x *BgpSrteSegmentATypeSubTlv) GetLabel() uint32 { + if x != nil && x.Label != nil { + return *x.Label } - return "" + return 0 } -func (x *BgpAttributesNextHop) GetIpv6() string { - if x != nil && x.Ipv6 != nil { - return *x.Ipv6 +func (x *BgpSrteSegmentATypeSubTlv) GetTc() uint32 { + if x != nil && x.Tc != nil { + return *x.Tc } - return "" + return 0 } -func (x *BgpAttributesNextHop) GetIpv6TwoAddresses() *BgpAttributesNextHopIpv6TwoAddresses { - if x != nil { - return x.Ipv6TwoAddresses +func (x *BgpSrteSegmentATypeSubTlv) GetSBit() bool { + if x != nil && x.SBit != nil { + return *x.SBit } - return nil + return false } -// There is a specific scenario in which it is possible to receive a Global and Link -// Local address in the Next Hop -// field in a MP_REACH attribute or in the NEXT_HOP attribute(RFC2545: Section 3). -type BgpAttributesNextHopIpv6TwoAddresses struct { +func (x *BgpSrteSegmentATypeSubTlv) GetTtl() uint32 { + if x != nil && x.Ttl != nil { + return *x.Ttl + } + return 0 +} + +// Type B: SID only, in the form of IPv6 address. +type BgpSrteSegmentBTypeSubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The first IPv6 next hop in the 32 byte IPv6 Next Hop. - // default = 0::0 - First *string `protobuf:"bytes,1,opt,name=first,proto3,oneof" json:"first,omitempty"` - // The second IPv6 next hop in the 32 byte IPv6 Next Hop. - // default = 0::0 - Second *string `protobuf:"bytes,2,opt,name=second,proto3,oneof" json:"second,omitempty"` + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` + // SRv6 SID. + // required = true + Srv6Sid *string `protobuf:"bytes,2,opt,name=srv6_sid,json=srv6Sid,proto3,oneof" json:"srv6_sid,omitempty"` + // Optional SRv6 Endpoint Behavior and SID Structure. + Srv6SidEndpointBehavior *BgpSrteSRv6SIDEndpointBehaviorAndStructure `protobuf:"bytes,3,opt,name=srv6_sid_endpoint_behavior,json=srv6SidEndpointBehavior,proto3" json:"srv6_sid_endpoint_behavior,omitempty"` } -func (x *BgpAttributesNextHopIpv6TwoAddresses) Reset() { - *x = BgpAttributesNextHopIpv6TwoAddresses{} +func (x *BgpSrteSegmentBTypeSubTlv) Reset() { + *x = BgpSrteSegmentBTypeSubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[150] + mi := &file_otg_proto_msgTypes[147] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesNextHopIpv6TwoAddresses) String() string { +func (x *BgpSrteSegmentBTypeSubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesNextHopIpv6TwoAddresses) ProtoMessage() {} +func (*BgpSrteSegmentBTypeSubTlv) ProtoMessage() {} -func (x *BgpAttributesNextHopIpv6TwoAddresses) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[150] +func (x *BgpSrteSegmentBTypeSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[147] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -35705,65 +37640,68 @@ func (x *BgpAttributesNextHopIpv6TwoAddresses) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesNextHopIpv6TwoAddresses.ProtoReflect.Descriptor instead. -func (*BgpAttributesNextHopIpv6TwoAddresses) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{150} +// Deprecated: Use BgpSrteSegmentBTypeSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteSegmentBTypeSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{147} } -func (x *BgpAttributesNextHopIpv6TwoAddresses) GetFirst() string { - if x != nil && x.First != nil { - return *x.First +func (x *BgpSrteSegmentBTypeSubTlv) GetFlags() string { + if x != nil && x.Flags != nil { + return *x.Flags } return "" } -func (x *BgpAttributesNextHopIpv6TwoAddresses) GetSecond() string { - if x != nil && x.Second != nil { - return *x.Second +func (x *BgpSrteSegmentBTypeSubTlv) GetSrv6Sid() string { + if x != nil && x.Srv6Sid != nil { + return *x.Srv6Sid } return "" } -// The MP_REACH attribute is an optional attribute which can be included in the attributes -// of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3. -// The following AFI / SAFI combinations are supported: -// - IPv4 Unicast with AFI as 1 and SAFI as 1 -// - IPv6 Unicast with AFI as 2 and SAFI as 1 -type BgpAttributesMpReachNlri struct { +func (x *BgpSrteSegmentBTypeSubTlv) GetSrv6SidEndpointBehavior() *BgpSrteSRv6SIDEndpointBehaviorAndStructure { + if x != nil { + return x.Srv6SidEndpointBehavior + } + return nil +} + +// Type C: IPv4 Node Address with optional SID. +type BgpSrteSegmentCTypeSubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - NextHop *BgpAttributesNextHop `protobuf:"bytes,1,opt,name=next_hop,json=nextHop,proto3" json:"next_hop,omitempty"` - // The AFI and SAFI to be sent in the MPREACH_NLRI in the Update. + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` + // SR Algorithm identifier when A-Flag in on. + // default = 0 + SrAlgorithm *uint32 `protobuf:"varint,2,opt,name=sr_algorithm,json=srAlgorithm,proto3,oneof" json:"sr_algorithm,omitempty"` + // IPv4 address representing a node. // required = true - Choice *BgpAttributesMpReachNlri_Choice_Enum `protobuf:"varint,2,opt,name=choice,proto3,enum=otg.BgpAttributesMpReachNlri_Choice_Enum,oneof" json:"choice,omitempty"` - // List of IPv4 prefixes being sent in the IPv4 Unicast MPREACH_NLRI . - Ipv4Unicast []*BgpOneIpv4NLRIPrefix `protobuf:"bytes,3,rep,name=ipv4_unicast,json=ipv4Unicast,proto3" json:"ipv4_unicast,omitempty"` - // SAFI of the NLRI being sent in the Update. - // description: >- - // List of IPv6 prefixes being sent in the IPv6 Unicast MPREACH_NLRI . - Ipv6Unicast []*BgpOneIpv6NLRIPrefix `protobuf:"bytes,4,rep,name=ipv6_unicast,json=ipv6Unicast,proto3" json:"ipv6_unicast,omitempty"` + Ipv4NodeAddress *string `protobuf:"bytes,3,opt,name=ipv4_node_address,json=ipv4NodeAddress,proto3,oneof" json:"ipv4_node_address,omitempty"` + // Optional SR-MPLS SID. + SrMplsSid *BgpSrteSrMplsSid `protobuf:"bytes,4,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` } -func (x *BgpAttributesMpReachNlri) Reset() { - *x = BgpAttributesMpReachNlri{} +func (x *BgpSrteSegmentCTypeSubTlv) Reset() { + *x = BgpSrteSegmentCTypeSubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[151] + mi := &file_otg_proto_msgTypes[148] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesMpReachNlri) String() string { +func (x *BgpSrteSegmentCTypeSubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesMpReachNlri) ProtoMessage() {} +func (*BgpSrteSegmentCTypeSubTlv) ProtoMessage() {} -func (x *BgpAttributesMpReachNlri) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[151] +func (x *BgpSrteSegmentCTypeSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[148] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -35774,76 +37712,75 @@ func (x *BgpAttributesMpReachNlri) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesMpReachNlri.ProtoReflect.Descriptor instead. -func (*BgpAttributesMpReachNlri) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{151} +// Deprecated: Use BgpSrteSegmentCTypeSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteSegmentCTypeSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{148} } -func (x *BgpAttributesMpReachNlri) GetNextHop() *BgpAttributesNextHop { - if x != nil { - return x.NextHop +func (x *BgpSrteSegmentCTypeSubTlv) GetFlags() string { + if x != nil && x.Flags != nil { + return *x.Flags } - return nil + return "" } -func (x *BgpAttributesMpReachNlri) GetChoice() BgpAttributesMpReachNlri_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *BgpSrteSegmentCTypeSubTlv) GetSrAlgorithm() uint32 { + if x != nil && x.SrAlgorithm != nil { + return *x.SrAlgorithm } - return BgpAttributesMpReachNlri_Choice_unspecified + return 0 } -func (x *BgpAttributesMpReachNlri) GetIpv4Unicast() []*BgpOneIpv4NLRIPrefix { - if x != nil { - return x.Ipv4Unicast +func (x *BgpSrteSegmentCTypeSubTlv) GetIpv4NodeAddress() string { + if x != nil && x.Ipv4NodeAddress != nil { + return *x.Ipv4NodeAddress } - return nil + return "" } -func (x *BgpAttributesMpReachNlri) GetIpv6Unicast() []*BgpOneIpv6NLRIPrefix { +func (x *BgpSrteSegmentCTypeSubTlv) GetSrMplsSid() *BgpSrteSrMplsSid { if x != nil { - return x.Ipv6Unicast + return x.SrMplsSid } return nil } -// The MP_UNREACH attribute is an optional attribute which can be included in the attributes -// of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3. -// The following AFI / SAFI combinations are supported: -// - IPv4 Unicast with AFI as 1 and SAFI as 1 -// - IPv6 Unicast with AFI as 2 and SAFI as 1 -type BgpAttributesMpUnreachNlri struct { +// Type D: IPv6 Node Address with optional SID for SR MPLS. +type BgpSrteSegmentDTypeSubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The AFI and SAFI to be sent in the MPUNREACH_NLRI in the Update. - Choice *BgpAttributesMpUnreachNlri_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpAttributesMpUnreachNlri_Choice_Enum,oneof" json:"choice,omitempty"` - // List of IPv4 prefixes being sent in the IPv4 Unicast MPUNREACH_NLRI . - Ipv4Unicast []*BgpOneIpv4NLRIPrefix `protobuf:"bytes,2,rep,name=ipv4_unicast,json=ipv4Unicast,proto3" json:"ipv4_unicast,omitempty"` - // SAFI of the NLRI being sent in the Update. - // description: >- - // List of IPv6 prefixes being sent in the IPv6 Unicast MPUNREACH_NLRI . - Ipv6Unicast []*BgpOneIpv6NLRIPrefix `protobuf:"bytes,3,rep,name=ipv6_unicast,json=ipv6Unicast,proto3" json:"ipv6_unicast,omitempty"` + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` + // specifying SR Algorithm when when A-Flag as defined in above flags. + // default = 0 + SrAlgorithm *uint32 `protobuf:"varint,2,opt,name=sr_algorithm,json=srAlgorithm,proto3,oneof" json:"sr_algorithm,omitempty"` + // IPv6 address representing a node. + // required = true + Ipv6NodeAddress *string `protobuf:"bytes,3,opt,name=ipv6_node_address,json=ipv6NodeAddress,proto3,oneof" json:"ipv6_node_address,omitempty"` + // Optional SR-MPLS SID. + SrMplsSid *BgpSrteSrMplsSid `protobuf:"bytes,4,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` } -func (x *BgpAttributesMpUnreachNlri) Reset() { - *x = BgpAttributesMpUnreachNlri{} +func (x *BgpSrteSegmentDTypeSubTlv) Reset() { + *x = BgpSrteSegmentDTypeSubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[152] + mi := &file_otg_proto_msgTypes[149] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesMpUnreachNlri) String() string { +func (x *BgpSrteSegmentDTypeSubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesMpUnreachNlri) ProtoMessage() {} +func (*BgpSrteSegmentDTypeSubTlv) ProtoMessage() {} -func (x *BgpAttributesMpUnreachNlri) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[152] +func (x *BgpSrteSegmentDTypeSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[149] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -35854,62 +37791,75 @@ func (x *BgpAttributesMpUnreachNlri) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesMpUnreachNlri.ProtoReflect.Descriptor instead. -func (*BgpAttributesMpUnreachNlri) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{152} +// Deprecated: Use BgpSrteSegmentDTypeSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteSegmentDTypeSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{149} } -func (x *BgpAttributesMpUnreachNlri) GetChoice() BgpAttributesMpUnreachNlri_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *BgpSrteSegmentDTypeSubTlv) GetFlags() string { + if x != nil && x.Flags != nil { + return *x.Flags } - return BgpAttributesMpUnreachNlri_Choice_unspecified + return "" } -func (x *BgpAttributesMpUnreachNlri) GetIpv4Unicast() []*BgpOneIpv4NLRIPrefix { - if x != nil { - return x.Ipv4Unicast +func (x *BgpSrteSegmentDTypeSubTlv) GetSrAlgorithm() uint32 { + if x != nil && x.SrAlgorithm != nil { + return *x.SrAlgorithm } - return nil + return 0 } -func (x *BgpAttributesMpUnreachNlri) GetIpv6Unicast() []*BgpOneIpv6NLRIPrefix { +func (x *BgpSrteSegmentDTypeSubTlv) GetIpv6NodeAddress() string { + if x != nil && x.Ipv6NodeAddress != nil { + return *x.Ipv6NodeAddress + } + return "" +} + +func (x *BgpSrteSegmentDTypeSubTlv) GetSrMplsSid() *BgpSrteSrMplsSid { if x != nil { - return x.Ipv6Unicast + return x.SrMplsSid } return nil } -// Optional MULTI_EXIT_DISCRIMINATOR attribute sent to the peer to help in the route -// selection process. -type BgpAttributesMultiExitDiscriminator struct { +// Type E: IPv4 Address and Local Interface ID with optional SID +type BgpSrteSegmentETypeSubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The multi exit discriminator (MED) value used for route selection sent to the peer. - // + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` + // Local Interface ID: The Interface Index as defined in [RFC8664]. // default = 0 - Value *uint32 `protobuf:"varint,1,opt,name=value,proto3,oneof" json:"value,omitempty"` + LocalInterfaceId *uint32 `protobuf:"varint,2,opt,name=local_interface_id,json=localInterfaceId,proto3,oneof" json:"local_interface_id,omitempty"` + // IPv4 address representing a node. + // required = true + Ipv4NodeAddress *string `protobuf:"bytes,3,opt,name=ipv4_node_address,json=ipv4NodeAddress,proto3,oneof" json:"ipv4_node_address,omitempty"` + // Optional SR-MPLS SID. + SrMplsSid *BgpSrteSrMplsSid `protobuf:"bytes,4,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` } -func (x *BgpAttributesMultiExitDiscriminator) Reset() { - *x = BgpAttributesMultiExitDiscriminator{} +func (x *BgpSrteSegmentETypeSubTlv) Reset() { + *x = BgpSrteSegmentETypeSubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[153] + mi := &file_otg_proto_msgTypes[150] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesMultiExitDiscriminator) String() string { +func (x *BgpSrteSegmentETypeSubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesMultiExitDiscriminator) ProtoMessage() {} +func (*BgpSrteSegmentETypeSubTlv) ProtoMessage() {} -func (x *BgpAttributesMultiExitDiscriminator) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[153] +func (x *BgpSrteSegmentETypeSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[150] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -35920,53 +37870,75 @@ func (x *BgpAttributesMultiExitDiscriminator) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesMultiExitDiscriminator.ProtoReflect.Descriptor instead. -func (*BgpAttributesMultiExitDiscriminator) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{153} +// Deprecated: Use BgpSrteSegmentETypeSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteSegmentETypeSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{150} } -func (x *BgpAttributesMultiExitDiscriminator) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *BgpSrteSegmentETypeSubTlv) GetFlags() string { + if x != nil && x.Flags != nil { + return *x.Flags + } + return "" +} + +func (x *BgpSrteSegmentETypeSubTlv) GetLocalInterfaceId() uint32 { + if x != nil && x.LocalInterfaceId != nil { + return *x.LocalInterfaceId } return 0 } -// Optional LOCAL_PREFERENCE attribute sent to the peer to indicate the degree of preference -// -// for externally learned routes.This should be included only for internal peers.It -// is -// used for the selection of the path for the traffic leaving the AS.The route with -// the -// highest local preference value is preferred. -type BgpAttributesLocalPreference struct { +func (x *BgpSrteSegmentETypeSubTlv) GetIpv4NodeAddress() string { + if x != nil && x.Ipv4NodeAddress != nil { + return *x.Ipv4NodeAddress + } + return "" +} + +func (x *BgpSrteSegmentETypeSubTlv) GetSrMplsSid() *BgpSrteSrMplsSid { + if x != nil { + return x.SrMplsSid + } + return nil +} + +// Type F: IPv4 Local and Remote addresses with optional SID. +type BgpSrteSegmentFTypeSubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Value to be set in the LOCAL_PREFERENCE attribute The multi exit discriminator (MED) - // value used for route selection sent to the peer. - // default = 100 - Value *uint32 `protobuf:"varint,1,opt,name=value,proto3,oneof" json:"value,omitempty"` + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` + // Local IPv4 Address. + // required = true + LocalIpv4Address *string `protobuf:"bytes,2,opt,name=local_ipv4_address,json=localIpv4Address,proto3,oneof" json:"local_ipv4_address,omitempty"` + // Remote IPv4 Address. + // required = true + RemoteIpv4Address *string `protobuf:"bytes,3,opt,name=remote_ipv4_address,json=remoteIpv4Address,proto3,oneof" json:"remote_ipv4_address,omitempty"` + // Optional SR-MPLS SID. + SrMplsSid *BgpSrteSrMplsSid `protobuf:"bytes,4,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` } -func (x *BgpAttributesLocalPreference) Reset() { - *x = BgpAttributesLocalPreference{} +func (x *BgpSrteSegmentFTypeSubTlv) Reset() { + *x = BgpSrteSegmentFTypeSubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[154] + mi := &file_otg_proto_msgTypes[151] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesLocalPreference) String() string { +func (x *BgpSrteSegmentFTypeSubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesLocalPreference) ProtoMessage() {} +func (*BgpSrteSegmentFTypeSubTlv) ProtoMessage() {} -func (x *BgpAttributesLocalPreference) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[154] +func (x *BgpSrteSegmentFTypeSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[151] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -35977,47 +37949,82 @@ func (x *BgpAttributesLocalPreference) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesLocalPreference.ProtoReflect.Descriptor instead. -func (*BgpAttributesLocalPreference) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{154} +// Deprecated: Use BgpSrteSegmentFTypeSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteSegmentFTypeSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{151} } -func (x *BgpAttributesLocalPreference) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *BgpSrteSegmentFTypeSubTlv) GetFlags() string { + if x != nil && x.Flags != nil { + return *x.Flags } - return 0 + return "" } -// Optional ORIGINATOR_ID attribute (type code 9) carries the Router Id of the route's -// originator in the local AS. -type BgpAttributesOriginatorId struct { +func (x *BgpSrteSegmentFTypeSubTlv) GetLocalIpv4Address() string { + if x != nil && x.LocalIpv4Address != nil { + return *x.LocalIpv4Address + } + return "" +} + +func (x *BgpSrteSegmentFTypeSubTlv) GetRemoteIpv4Address() string { + if x != nil && x.RemoteIpv4Address != nil { + return *x.RemoteIpv4Address + } + return "" +} + +func (x *BgpSrteSegmentFTypeSubTlv) GetSrMplsSid() *BgpSrteSrMplsSid { + if x != nil { + return x.SrMplsSid + } + return nil +} + +// Type G: IPv6 Address, Interface ID for local and remote pair with optional SID for +// SR MPLS. +type BgpSrteSegmentGTypeSubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The value of the originator's Router Id. - // default = 0.0.0.0 - Value *string `protobuf:"bytes,1,opt,name=value,proto3,oneof" json:"value,omitempty"` + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` + // Local Interface ID: The Interface Index as defined in [RFC8664]. + // default = 0 + LocalInterfaceId *uint32 `protobuf:"varint,2,opt,name=local_interface_id,json=localInterfaceId,proto3,oneof" json:"local_interface_id,omitempty"` + // IPv6 address representing a node. + // required = true + LocalIpv6NodeAddress *string `protobuf:"bytes,3,opt,name=local_ipv6_node_address,json=localIpv6NodeAddress,proto3,oneof" json:"local_ipv6_node_address,omitempty"` + // Local Interface ID: The Interface Index as defined in [RFC8664]. + // default = 0 + RemoteInterfaceId *uint32 `protobuf:"varint,4,opt,name=remote_interface_id,json=remoteInterfaceId,proto3,oneof" json:"remote_interface_id,omitempty"` + // IPv6 address representing a node. + // required = true + RemoteIpv6NodeAddress *string `protobuf:"bytes,5,opt,name=remote_ipv6_node_address,json=remoteIpv6NodeAddress,proto3,oneof" json:"remote_ipv6_node_address,omitempty"` + // Optional SR-MPLS SID. + SrMplsSid *BgpSrteSrMplsSid `protobuf:"bytes,6,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` } -func (x *BgpAttributesOriginatorId) Reset() { - *x = BgpAttributesOriginatorId{} +func (x *BgpSrteSegmentGTypeSubTlv) Reset() { + *x = BgpSrteSegmentGTypeSubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[155] + mi := &file_otg_proto_msgTypes[152] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesOriginatorId) String() string { +func (x *BgpSrteSegmentGTypeSubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesOriginatorId) ProtoMessage() {} +func (*BgpSrteSegmentGTypeSubTlv) ProtoMessage() {} -func (x *BgpAttributesOriginatorId) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[155] +func (x *BgpSrteSegmentGTypeSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[152] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -36028,111 +38035,89 @@ func (x *BgpAttributesOriginatorId) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesOriginatorId.ProtoReflect.Descriptor instead. -func (*BgpAttributesOriginatorId) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{155} +// Deprecated: Use BgpSrteSegmentGTypeSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteSegmentGTypeSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{152} } -func (x *BgpAttributesOriginatorId) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value +func (x *BgpSrteSegmentGTypeSubTlv) GetFlags() string { + if x != nil && x.Flags != nil { + return *x.Flags } return "" } -// Configuration for BGPv6 peer settings and routes. -type BgpV6Peer struct { +func (x *BgpSrteSegmentGTypeSubTlv) GetLocalInterfaceId() uint32 { + if x != nil && x.LocalInterfaceId != nil { + return *x.LocalInterfaceId + } + return 0 +} + +func (x *BgpSrteSegmentGTypeSubTlv) GetLocalIpv6NodeAddress() string { + if x != nil && x.LocalIpv6NodeAddress != nil { + return *x.LocalIpv6NodeAddress + } + return "" +} + +func (x *BgpSrteSegmentGTypeSubTlv) GetRemoteInterfaceId() uint32 { + if x != nil && x.RemoteInterfaceId != nil { + return *x.RemoteInterfaceId + } + return 0 +} + +func (x *BgpSrteSegmentGTypeSubTlv) GetRemoteIpv6NodeAddress() string { + if x != nil && x.RemoteIpv6NodeAddress != nil { + return *x.RemoteIpv6NodeAddress + } + return "" +} + +func (x *BgpSrteSegmentGTypeSubTlv) GetSrMplsSid() *BgpSrteSrMplsSid { + if x != nil { + return x.SrMplsSid + } + return nil +} + +// Type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. +type BgpSrteSegmentHTypeSubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // IPv6 address of the BGP peer for the session - // required = true - PeerAddress *string `protobuf:"bytes,1,opt,name=peer_address,json=peerAddress,proto3,oneof" json:"peer_address,omitempty"` - // Description missing in models - SegmentRouting *BgpV6SegmentRouting `protobuf:"bytes,2,opt,name=segment_routing,json=segmentRouting,proto3" json:"segment_routing,omitempty"` - // This contains the list of Ethernet Virtual Private Network (EVPN) Ethernet Segments - // (ES) Per BGP Peer for IPv6 Address Family Identifier (AFI). - // - // Each Ethernet Segment contains a list of EVPN Instances (EVIs) . - // Each EVI contains a list of Broadcast Domains. - // Each Broadcast Domain contains a list of MAC/IP Ranges. - // - // is responsible for advertising Ethernet - // Auto-discovery Route Per EVI (Type 1). - // - // is responsible for advertising Ethernet Auto-discovery Route - // Per Ethernet Segment (Type 1). - // - // is responsible for advertising - // MAC/IP Advertisement Route (Type 2). - // - // is responsible for advertising Inclusive - // Multicast Ethernet Tag Route (Type 3). - // - // Ethernet Segment is responsible for advertising Ethernet Segment Route (Type 4). - EvpnEthernetSegments []*BgpV6EthernetSegment `protobuf:"bytes,3,rep,name=evpn_ethernet_segments,json=evpnEthernetSegments,proto3" json:"evpn_ethernet_segments,omitempty"` - // The type of BGP autonomous system. External BGP is used for BGP links between two - // or more autonomous systems (ebgp). Internal BGP is used within a single autonomous - // system (ibgp). BGP property defaults are aligned with this object defined as an internal - // BGP peer. If the as_type is specified as 'ebgp' then other properties will need to - // be specified as per an external BGP peer. Specifically, for 'ebgp', 'as_set_mode' - // attribute in 'as_path' field in any Route Range should be changed from default value - // 'do_not_include_local_as' to any other value. - // required = true - AsType *BgpV6Peer_AsType_Enum `protobuf:"varint,4,opt,name=as_type,json=asType,proto3,enum=otg.BgpV6Peer_AsType_Enum,oneof" json:"as_type,omitempty"` - // Autonomous System Number (AS number or ASN) + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` + // Local IPv6 Address. // required = true - AsNumber *uint32 `protobuf:"varint,5,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` - // The width in bytes of the as_number values. Any as_number values that exceeds the - // width MUST result in an error. - // default = AsNumberWidth.Enum.four - AsNumberWidth *BgpV6Peer_AsNumberWidth_Enum `protobuf:"varint,6,opt,name=as_number_width,json=asNumberWidth,proto3,enum=otg.BgpV6Peer_AsNumberWidth_Enum,oneof" json:"as_number_width,omitempty"` - // Description missing in models - Advanced *BgpAdvanced `protobuf:"bytes,7,opt,name=advanced,proto3" json:"advanced,omitempty"` - // Description missing in models - Capability *BgpCapability `protobuf:"bytes,8,opt,name=capability,proto3" json:"capability,omitempty"` - // Description missing in models - LearnedInformationFilter *BgpLearnedInformationFilter `protobuf:"bytes,9,opt,name=learned_information_filter,json=learnedInformationFilter,proto3" json:"learned_information_filter,omitempty"` - // Emulated BGPv4 route ranges. - V4Routes []*BgpV4RouteRange `protobuf:"bytes,10,rep,name=v4_routes,json=v4Routes,proto3" json:"v4_routes,omitempty"` - // Emulated BGPv6 route ranges. - V6Routes []*BgpV6RouteRange `protobuf:"bytes,11,rep,name=v6_routes,json=v6Routes,proto3" json:"v6_routes,omitempty"` - // Segment Routing Traffic Engineering (SR TE) Policies for IPv4 Address Family Identifier - // (AFI). - V4SrtePolicies []*BgpSrteV4Policy `protobuf:"bytes,12,rep,name=v4_srte_policies,json=v4SrtePolicies,proto3" json:"v4_srte_policies,omitempty"` - // Segment Routing Traffic Engineering (SR TE) Policies for IPv6 Address Family Identifier - // (AFI). - V6SrtePolicies []*BgpSrteV6Policy `protobuf:"bytes,13,rep,name=v6_srte_policies,json=v6SrtePolicies,proto3" json:"v6_srte_policies,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. + LocalIpv6Address *string `protobuf:"bytes,2,opt,name=local_ipv6_address,json=localIpv6Address,proto3,oneof" json:"local_ipv6_address,omitempty"` + // Remote IPv6 Address. // required = true - Name *string `protobuf:"bytes,14,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Description missing in models - GracefulRestart *BgpGracefulRestart `protobuf:"bytes,15,opt,name=graceful_restart,json=gracefulRestart,proto3" json:"graceful_restart,omitempty"` - // BGP Updates to be sent to the peer as specified after the session is established. - ReplayUpdates *BgpUpdateReplay `protobuf:"bytes,16,opt,name=replay_updates,json=replayUpdates,proto3" json:"replay_updates,omitempty"` + RemoteIpv6Address *string `protobuf:"bytes,3,opt,name=remote_ipv6_address,json=remoteIpv6Address,proto3,oneof" json:"remote_ipv6_address,omitempty"` + // Optional SR-MPLS SID. + SrMplsSid *BgpSrteSrMplsSid `protobuf:"bytes,4,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` } -func (x *BgpV6Peer) Reset() { - *x = BgpV6Peer{} +func (x *BgpSrteSegmentHTypeSubTlv) Reset() { + *x = BgpSrteSegmentHTypeSubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[156] + mi := &file_otg_proto_msgTypes[153] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV6Peer) String() string { +func (x *BgpSrteSegmentHTypeSubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV6Peer) ProtoMessage() {} +func (*BgpSrteSegmentHTypeSubTlv) ProtoMessage() {} -func (x *BgpV6Peer) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[156] +func (x *BgpSrteSegmentHTypeSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[153] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -36143,163 +38128,165 @@ func (x *BgpV6Peer) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV6Peer.ProtoReflect.Descriptor instead. -func (*BgpV6Peer) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{156} +// Deprecated: Use BgpSrteSegmentHTypeSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteSegmentHTypeSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{153} } -func (x *BgpV6Peer) GetPeerAddress() string { - if x != nil && x.PeerAddress != nil { - return *x.PeerAddress +func (x *BgpSrteSegmentHTypeSubTlv) GetFlags() string { + if x != nil && x.Flags != nil { + return *x.Flags } return "" } -func (x *BgpV6Peer) GetSegmentRouting() *BgpV6SegmentRouting { - if x != nil { - return x.SegmentRouting - } - return nil -} - -func (x *BgpV6Peer) GetEvpnEthernetSegments() []*BgpV6EthernetSegment { - if x != nil { - return x.EvpnEthernetSegments - } - return nil -} - -func (x *BgpV6Peer) GetAsType() BgpV6Peer_AsType_Enum { - if x != nil && x.AsType != nil { - return *x.AsType - } - return BgpV6Peer_AsType_unspecified -} - -func (x *BgpV6Peer) GetAsNumber() uint32 { - if x != nil && x.AsNumber != nil { - return *x.AsNumber +func (x *BgpSrteSegmentHTypeSubTlv) GetLocalIpv6Address() string { + if x != nil && x.LocalIpv6Address != nil { + return *x.LocalIpv6Address } - return 0 + return "" } -func (x *BgpV6Peer) GetAsNumberWidth() BgpV6Peer_AsNumberWidth_Enum { - if x != nil && x.AsNumberWidth != nil { - return *x.AsNumberWidth +func (x *BgpSrteSegmentHTypeSubTlv) GetRemoteIpv6Address() string { + if x != nil && x.RemoteIpv6Address != nil { + return *x.RemoteIpv6Address } - return BgpV6Peer_AsNumberWidth_unspecified + return "" } -func (x *BgpV6Peer) GetAdvanced() *BgpAdvanced { +func (x *BgpSrteSegmentHTypeSubTlv) GetSrMplsSid() *BgpSrteSrMplsSid { if x != nil { - return x.Advanced + return x.SrMplsSid } return nil } -func (x *BgpV6Peer) GetCapability() *BgpCapability { - if x != nil { - return x.Capability - } - return nil +// Type I: IPv6 Node Address with optional SRv6 SID. +type BgpSrteSegmentITypeSubTlv struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` + // IPv6 address representing a node. + // required = true + Ipv6NodeAddress *string `protobuf:"bytes,2,opt,name=ipv6_node_address,json=ipv6NodeAddress,proto3,oneof" json:"ipv6_node_address,omitempty"` + // Optional SRv6 SID. + Srv6Sid *string `protobuf:"bytes,3,opt,name=srv6_sid,json=srv6Sid,proto3,oneof" json:"srv6_sid,omitempty"` + // Optional SRv6 Endpoint Behavior and SID Structure. + Srv6SidEndpointBehavior *BgpSrteSRv6SIDEndpointBehaviorAndStructure `protobuf:"bytes,4,opt,name=srv6_sid_endpoint_behavior,json=srv6SidEndpointBehavior,proto3" json:"srv6_sid_endpoint_behavior,omitempty"` } -func (x *BgpV6Peer) GetLearnedInformationFilter() *BgpLearnedInformationFilter { - if x != nil { - return x.LearnedInformationFilter +func (x *BgpSrteSegmentITypeSubTlv) Reset() { + *x = BgpSrteSegmentITypeSubTlv{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[154] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *BgpV6Peer) GetV4Routes() []*BgpV4RouteRange { - if x != nil { - return x.V4Routes - } - return nil +func (x *BgpSrteSegmentITypeSubTlv) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *BgpV6Peer) GetV6Routes() []*BgpV6RouteRange { - if x != nil { - return x.V6Routes +func (*BgpSrteSegmentITypeSubTlv) ProtoMessage() {} + +func (x *BgpSrteSegmentITypeSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[154] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *BgpV6Peer) GetV4SrtePolicies() []*BgpSrteV4Policy { - if x != nil { - return x.V4SrtePolicies - } - return nil +// Deprecated: Use BgpSrteSegmentITypeSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteSegmentITypeSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{154} } -func (x *BgpV6Peer) GetV6SrtePolicies() []*BgpSrteV6Policy { - if x != nil { - return x.V6SrtePolicies +func (x *BgpSrteSegmentITypeSubTlv) GetFlags() string { + if x != nil && x.Flags != nil { + return *x.Flags } - return nil + return "" } -func (x *BgpV6Peer) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *BgpSrteSegmentITypeSubTlv) GetIpv6NodeAddress() string { + if x != nil && x.Ipv6NodeAddress != nil { + return *x.Ipv6NodeAddress } return "" } -func (x *BgpV6Peer) GetGracefulRestart() *BgpGracefulRestart { - if x != nil { - return x.GracefulRestart +func (x *BgpSrteSegmentITypeSubTlv) GetSrv6Sid() string { + if x != nil && x.Srv6Sid != nil { + return *x.Srv6Sid } - return nil + return "" } -func (x *BgpV6Peer) GetReplayUpdates() *BgpUpdateReplay { +func (x *BgpSrteSegmentITypeSubTlv) GetSrv6SidEndpointBehavior() *BgpSrteSRv6SIDEndpointBehaviorAndStructure { if x != nil { - return x.ReplayUpdates + return x.Srv6SidEndpointBehavior } return nil } -// Configuration for emulated BGPv6 peers and routes on a single IPv6 interface. -type BgpV6Interface struct { +// Type J: IPv6 Address, Interface ID for local and remote pair for SRv6 with optional +// SID. +type BgpSrteSegmentJTypeSubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The unique name of IPv6 or Loopback IPv6 interface used as the source IP for this - // list of BGP peers. - // - // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Device.Ipv6Loopback/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Device.Ipv6Loopback/properties/name - // + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` + // SR Algorithm identifier when A-Flag in on. + // default = 0 + SrAlgorithm *uint32 `protobuf:"varint,2,opt,name=sr_algorithm,json=srAlgorithm,proto3,oneof" json:"sr_algorithm,omitempty"` + // Local Interface ID: The Interface Index as defined in [RFC8664]. + // default = 0 + LocalInterfaceId *uint32 `protobuf:"varint,3,opt,name=local_interface_id,json=localInterfaceId,proto3,oneof" json:"local_interface_id,omitempty"` + // IPv6 address representing a node. // required = true - Ipv6Name *string `protobuf:"bytes,1,opt,name=ipv6_name,json=ipv6Name,proto3,oneof" json:"ipv6_name,omitempty"` - // This contains the list of BGPv6 peers configured on this interface. - Peers []*BgpV6Peer `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` + LocalIpv6NodeAddress *string `protobuf:"bytes,4,opt,name=local_ipv6_node_address,json=localIpv6NodeAddress,proto3,oneof" json:"local_ipv6_node_address,omitempty"` + // Local Interface ID: The Interface Index as defined in [RFC8664]. + // default = 0 + RemoteInterfaceId *uint32 `protobuf:"varint,5,opt,name=remote_interface_id,json=remoteInterfaceId,proto3,oneof" json:"remote_interface_id,omitempty"` + // IPv6 address representing a node. + // required = true + RemoteIpv6NodeAddress *string `protobuf:"bytes,6,opt,name=remote_ipv6_node_address,json=remoteIpv6NodeAddress,proto3,oneof" json:"remote_ipv6_node_address,omitempty"` + // Optional SRv6 SID. + Srv6Sid *string `protobuf:"bytes,7,opt,name=srv6_sid,json=srv6Sid,proto3,oneof" json:"srv6_sid,omitempty"` + // Optional SRv6 Endpoint Behavior and SID Structure. + Srv6SidEndpointBehavior *BgpSrteSRv6SIDEndpointBehaviorAndStructure `protobuf:"bytes,8,opt,name=srv6_sid_endpoint_behavior,json=srv6SidEndpointBehavior,proto3" json:"srv6_sid_endpoint_behavior,omitempty"` } -func (x *BgpV6Interface) Reset() { - *x = BgpV6Interface{} +func (x *BgpSrteSegmentJTypeSubTlv) Reset() { + *x = BgpSrteSegmentJTypeSubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[157] + mi := &file_otg_proto_msgTypes[155] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV6Interface) String() string { +func (x *BgpSrteSegmentJTypeSubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV6Interface) ProtoMessage() {} +func (*BgpSrteSegmentJTypeSubTlv) ProtoMessage() {} -func (x *BgpV6Interface) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[157] +func (x *BgpSrteSegmentJTypeSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[155] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -36310,74 +38297,108 @@ func (x *BgpV6Interface) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV6Interface.ProtoReflect.Descriptor instead. -func (*BgpV6Interface) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{157} +// Deprecated: Use BgpSrteSegmentJTypeSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteSegmentJTypeSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{155} } -func (x *BgpV6Interface) GetIpv6Name() string { - if x != nil && x.Ipv6Name != nil { - return *x.Ipv6Name +func (x *BgpSrteSegmentJTypeSubTlv) GetFlags() string { + if x != nil && x.Flags != nil { + return *x.Flags } return "" } -func (x *BgpV6Interface) GetPeers() []*BgpV6Peer { +func (x *BgpSrteSegmentJTypeSubTlv) GetSrAlgorithm() uint32 { + if x != nil && x.SrAlgorithm != nil { + return *x.SrAlgorithm + } + return 0 +} + +func (x *BgpSrteSegmentJTypeSubTlv) GetLocalInterfaceId() uint32 { + if x != nil && x.LocalInterfaceId != nil { + return *x.LocalInterfaceId + } + return 0 +} + +func (x *BgpSrteSegmentJTypeSubTlv) GetLocalIpv6NodeAddress() string { + if x != nil && x.LocalIpv6NodeAddress != nil { + return *x.LocalIpv6NodeAddress + } + return "" +} + +func (x *BgpSrteSegmentJTypeSubTlv) GetRemoteInterfaceId() uint32 { + if x != nil && x.RemoteInterfaceId != nil { + return *x.RemoteInterfaceId + } + return 0 +} + +func (x *BgpSrteSegmentJTypeSubTlv) GetRemoteIpv6NodeAddress() string { + if x != nil && x.RemoteIpv6NodeAddress != nil { + return *x.RemoteIpv6NodeAddress + } + return "" +} + +func (x *BgpSrteSegmentJTypeSubTlv) GetSrv6Sid() string { + if x != nil && x.Srv6Sid != nil { + return *x.Srv6Sid + } + return "" +} + +func (x *BgpSrteSegmentJTypeSubTlv) GetSrv6SidEndpointBehavior() *BgpSrteSRv6SIDEndpointBehaviorAndStructure { if x != nil { - return x.Peers + return x.Srv6SidEndpointBehavior } return nil } -// Configuration for BGPv6 segment routing settings. -type BgpV6SegmentRouting struct { +// Type K: IPv6 Local and Remote addresses for SRv6 with optional SID. +type BgpSrteSegmentKTypeSubTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // TBD - // default = False - IngressSupportsVpn *bool `protobuf:"varint,1,opt,name=ingress_supports_vpn,json=ingressSupportsVpn,proto3,oneof" json:"ingress_supports_vpn,omitempty"` - // TBD - // default = False - ReducedEncapsulation *bool `protobuf:"varint,2,opt,name=reduced_encapsulation,json=reducedEncapsulation,proto3,oneof" json:"reduced_encapsulation,omitempty"` - // TBD - // default = False - CopyTimeToLive *bool `protobuf:"varint,3,opt,name=copy_time_to_live,json=copyTimeToLive,proto3,oneof" json:"copy_time_to_live,omitempty"` - // TBD - // default = 0 - TimeToLive *uint32 `protobuf:"varint,4,opt,name=time_to_live,json=timeToLive,proto3,oneof" json:"time_to_live,omitempty"` - // TBD - // default = 0 - MaxSidsPerSrh *uint32 `protobuf:"varint,5,opt,name=max_sids_per_srh,json=maxSidsPerSrh,proto3,oneof" json:"max_sids_per_srh,omitempty"` - // TBD - // default = False - AutoGenerateSegmentLeftValue *bool `protobuf:"varint,6,opt,name=auto_generate_segment_left_value,json=autoGenerateSegmentLeftValue,proto3,oneof" json:"auto_generate_segment_left_value,omitempty"` - // TBD + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + Flags *string `protobuf:"bytes,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` + // SR Algorithm identifier when A-Flag in on. // default = 0 - SegmentLeftValue *uint32 `protobuf:"varint,7,opt,name=segment_left_value,json=segmentLeftValue,proto3,oneof" json:"segment_left_value,omitempty"` - // TBD - // default = False - AdvertiseSrTePolicy *bool `protobuf:"varint,8,opt,name=advertise_sr_te_policy,json=advertiseSrTePolicy,proto3,oneof" json:"advertise_sr_te_policy,omitempty"` + SrAlgorithm *uint32 `protobuf:"varint,2,opt,name=sr_algorithm,json=srAlgorithm,proto3,oneof" json:"sr_algorithm,omitempty"` + // IPv6 address representing a node. + // required = true + LocalIpv6Address *string `protobuf:"bytes,3,opt,name=local_ipv6_address,json=localIpv6Address,proto3,oneof" json:"local_ipv6_address,omitempty"` + // IPv6 address representing a node. + // required = true + RemoteIpv6Address *string `protobuf:"bytes,4,opt,name=remote_ipv6_address,json=remoteIpv6Address,proto3,oneof" json:"remote_ipv6_address,omitempty"` + // Optional SRv6 SID. + Srv6Sid *string `protobuf:"bytes,5,opt,name=srv6_sid,json=srv6Sid,proto3,oneof" json:"srv6_sid,omitempty"` + // Optional SRv6 Endpoint Behavior and SID Structure. + Srv6SidEndpointBehavior *BgpSrteSRv6SIDEndpointBehaviorAndStructure `protobuf:"bytes,6,opt,name=srv6_sid_endpoint_behavior,json=srv6SidEndpointBehavior,proto3" json:"srv6_sid_endpoint_behavior,omitempty"` } -func (x *BgpV6SegmentRouting) Reset() { - *x = BgpV6SegmentRouting{} +func (x *BgpSrteSegmentKTypeSubTlv) Reset() { + *x = BgpSrteSegmentKTypeSubTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[158] + mi := &file_otg_proto_msgTypes[156] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV6SegmentRouting) String() string { +func (x *BgpSrteSegmentKTypeSubTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV6SegmentRouting) ProtoMessage() {} +func (*BgpSrteSegmentKTypeSubTlv) ProtoMessage() {} -func (x *BgpV6SegmentRouting) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[158] +func (x *BgpSrteSegmentKTypeSubTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[156] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -36388,94 +38409,97 @@ func (x *BgpV6SegmentRouting) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV6SegmentRouting.ProtoReflect.Descriptor instead. -func (*BgpV6SegmentRouting) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{158} -} - -func (x *BgpV6SegmentRouting) GetIngressSupportsVpn() bool { - if x != nil && x.IngressSupportsVpn != nil { - return *x.IngressSupportsVpn - } - return false -} - -func (x *BgpV6SegmentRouting) GetReducedEncapsulation() bool { - if x != nil && x.ReducedEncapsulation != nil { - return *x.ReducedEncapsulation - } - return false +// Deprecated: Use BgpSrteSegmentKTypeSubTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteSegmentKTypeSubTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{156} } -func (x *BgpV6SegmentRouting) GetCopyTimeToLive() bool { - if x != nil && x.CopyTimeToLive != nil { - return *x.CopyTimeToLive +func (x *BgpSrteSegmentKTypeSubTlv) GetFlags() string { + if x != nil && x.Flags != nil { + return *x.Flags } - return false + return "" } -func (x *BgpV6SegmentRouting) GetTimeToLive() uint32 { - if x != nil && x.TimeToLive != nil { - return *x.TimeToLive +func (x *BgpSrteSegmentKTypeSubTlv) GetSrAlgorithm() uint32 { + if x != nil && x.SrAlgorithm != nil { + return *x.SrAlgorithm } return 0 } -func (x *BgpV6SegmentRouting) GetMaxSidsPerSrh() uint32 { - if x != nil && x.MaxSidsPerSrh != nil { - return *x.MaxSidsPerSrh +func (x *BgpSrteSegmentKTypeSubTlv) GetLocalIpv6Address() string { + if x != nil && x.LocalIpv6Address != nil { + return *x.LocalIpv6Address } - return 0 + return "" } -func (x *BgpV6SegmentRouting) GetAutoGenerateSegmentLeftValue() bool { - if x != nil && x.AutoGenerateSegmentLeftValue != nil { - return *x.AutoGenerateSegmentLeftValue +func (x *BgpSrteSegmentKTypeSubTlv) GetRemoteIpv6Address() string { + if x != nil && x.RemoteIpv6Address != nil { + return *x.RemoteIpv6Address } - return false + return "" } -func (x *BgpV6SegmentRouting) GetSegmentLeftValue() uint32 { - if x != nil && x.SegmentLeftValue != nil { - return *x.SegmentLeftValue +func (x *BgpSrteSegmentKTypeSubTlv) GetSrv6Sid() string { + if x != nil && x.Srv6Sid != nil { + return *x.Srv6Sid } - return 0 + return "" } -func (x *BgpV6SegmentRouting) GetAdvertiseSrTePolicy() bool { - if x != nil && x.AdvertiseSrTePolicy != nil { - return *x.AdvertiseSrTePolicy +func (x *BgpSrteSegmentKTypeSubTlv) GetSrv6SidEndpointBehavior() *BgpSrteSRv6SIDEndpointBehaviorAndStructure { + if x != nil { + return x.Srv6SidEndpointBehavior } - return false + return nil } -// Configuration for BGP Ethernet Segment ranges. Advertises following routes - -// -// Type 4 - Ethernet Segment Route -type BgpV6EthernetSegment struct { +// Configuration for BGP Segment Routing Traffic Engineering policy. +type BgpSrteV6Policy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Designated Forwarder (DF) election configuration. - DfElection *BgpEthernetSegmentDfElection `protobuf:"bytes,1,opt,name=df_election,json=dfElection,proto3" json:"df_election,omitempty"` - // This contains the list of EVIs. - Evis []*BgpV6EvpnEvis `protobuf:"bytes,2,rep,name=evis,proto3" json:"evis,omitempty"` - // 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero - // ESI is '10000000000000000000' . - // default = 00000000000000000000 - Esi *string `protobuf:"bytes,3,opt,name=esi,proto3,oneof" json:"esi,omitempty"` - // Single Active or All Active mode Redundancy mode selection for Multi-home. - // default = ActiveMode.Enum.all_active - ActiveMode *BgpV6EthernetSegment_ActiveMode_Enum `protobuf:"varint,4,opt,name=active_mode,json=activeMode,proto3,enum=otg.BgpV6EthernetSegment_ActiveMode_Enum,oneof" json:"active_mode,omitempty"` - // The label value to be advertised as ESI Label in ESI Label Extended Community. This - // is included in Ethernet Auto-discovery per ES Routes advertised by a router. - // default = 0 - EsiLabel *uint32 `protobuf:"varint,5,opt,name=esi_label,json=esiLabel,proto3,oneof" json:"esi_label,omitempty"` + // Identifies the policy in the context of (color and endpoint) tuple. It is used by + // the SR Policy originator to make unique multiple occurrences of the same SR Policy. + // default = 1 + Distinguisher *uint32 `protobuf:"varint,1,opt,name=distinguisher,proto3,oneof" json:"distinguisher,omitempty"` + // Identifies the policy. It is used to match the color of the destination prefixes + // to steer traffic into the SR Policy. + // default = 100 + Color *uint32 `protobuf:"varint,2,opt,name=color,proto3,oneof" json:"color,omitempty"` + // Specifies a single node or a set of nodes (e.g., an anycast address). It is selected + // on the basis of the SR Policy type (AFI). + // required = true + Ipv6Endpoint *string `protobuf:"bytes,3,opt,name=ipv6_endpoint,json=ipv6Endpoint,proto3,oneof" json:"ipv6_endpoint,omitempty"` + // Mode for choosing the NextHop in MP REACH NLRI. Available modes are : Local IP: Automatically + // fills the Nexthop with the Local IP of the BGP peer. For IPv6 BGP peer the Nexthop + // Encoding capability should be enabled. Manual: Override the Nexthop with any arbitrary + // IPv4/IPv6 address. + // default = NextHopMode.Enum.local_ip + NextHopMode *BgpSrteV6Policy_NextHopMode_Enum `protobuf:"varint,4,opt,name=next_hop_mode,json=nextHopMode,proto3,enum=otg.BgpSrteV6Policy_NextHopMode_Enum,oneof" json:"next_hop_mode,omitempty"` + // Type of next hop IP address to be used when 'next_hop_mode' is set to 'manual'. + // default = NextHopAddressType.Enum.ipv6 + NextHopAddressType *BgpSrteV6Policy_NextHopAddressType_Enum `protobuf:"varint,5,opt,name=next_hop_address_type,json=nextHopAddressType,proto3,enum=otg.BgpSrteV6Policy_NextHopAddressType_Enum,oneof" json:"next_hop_address_type,omitempty"` + // The IPv4 address of the Nexthop if the 'next_hop_mode' is 'manual' and the Nexthop + // type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, Nexthop Encoding + // capability extended_next_hop_encoding should be enabled. + // default = 0.0.0.0 + NextHopIpv4Address *string `protobuf:"bytes,6,opt,name=next_hop_ipv4_address,json=nextHopIpv4Address,proto3,oneof" json:"next_hop_ipv4_address,omitempty"` + // The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type' is 'manual' + // and the Nexthop type 'next_hop_address_type' is IPv6. + // default = ::0 + NextHopIpv6Address *string `protobuf:"bytes,7,opt,name=next_hop_ipv6_address,json=nextHopIpv6Address,proto3,oneof" json:"next_hop_ipv6_address,omitempty"` // Description missing in models - Advanced *BgpRouteAdvanced `protobuf:"bytes,6,opt,name=advanced,proto3" json:"advanced,omitempty"` + Advanced *BgpRouteAdvanced `protobuf:"bytes,8,opt,name=advanced,proto3" json:"advanced,omitempty"` + // Description missing in models + AddPath *BgpAddPath `protobuf:"bytes,9,opt,name=add_path,json=addPath,proto3" json:"add_path,omitempty"` + // Description missing in models + AsPath *BgpAsPath `protobuf:"bytes,10,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` // Optional community settings. - Communities []*BgpCommunity `protobuf:"bytes,7,rep,name=communities,proto3" json:"communities,omitempty"` + Communities []*BgpCommunity `protobuf:"bytes,11,rep,name=communities,proto3" json:"communities,omitempty"` // Optional Extended Community settings. The Extended Communities Attribute is a transitive // optional BGP attribute, with the Type Code 16. Community and Extended Communities // attributes are utilized to trigger routing decisions, such as acceptance, rejection, @@ -36503,28 +38527,38 @@ type BgpV6EthernetSegment struct { // byte is reserved and the last four bytes contain the sequence number which is used // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates // occur for the same MAC address. - ExtCommunities []*BgpExtCommunity `protobuf:"bytes,8,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` - // Optional AS PATH settings. - AsPath *BgpAsPath `protobuf:"bytes,9,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` + Extcommunities []*BgpExtCommunity `protobuf:"bytes,12,rep,name=extcommunities,proto3" json:"extcommunities,omitempty"` + // List of optional tunnel TLV settings. + TunnelTlvs []*BgpSrteV6TunnelTlv `protobuf:"bytes,13,rep,name=tunnel_tlvs,json=tunnelTlvs,proto3" json:"tunnel_tlvs,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,14,opt,name=name,proto3,oneof" json:"name,omitempty"` + // If enabled means that this part of the configuration including any active 'children' + // nodes will be advertised to peer. If disabled, this means that though config is + // present, it is not taking any part of the test but can be activated at run-time to + // advertise just this part of the configuration to the peer. + // default = True + Active *bool `protobuf:"varint,15,opt,name=active,proto3,oneof" json:"active,omitempty"` } -func (x *BgpV6EthernetSegment) Reset() { - *x = BgpV6EthernetSegment{} +func (x *BgpSrteV6Policy) Reset() { + *x = BgpSrteV6Policy{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[159] + mi := &file_otg_proto_msgTypes[157] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV6EthernetSegment) String() string { +func (x *BgpSrteV6Policy) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV6EthernetSegment) ProtoMessage() {} +func (*BgpSrteV6Policy) ProtoMessage() {} -func (x *BgpV6EthernetSegment) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[159] +func (x *BgpSrteV6Policy) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[157] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -36535,226 +38569,167 @@ func (x *BgpV6EthernetSegment) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV6EthernetSegment.ProtoReflect.Descriptor instead. -func (*BgpV6EthernetSegment) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{159} +// Deprecated: Use BgpSrteV6Policy.ProtoReflect.Descriptor instead. +func (*BgpSrteV6Policy) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{157} } -func (x *BgpV6EthernetSegment) GetDfElection() *BgpEthernetSegmentDfElection { - if x != nil { - return x.DfElection +func (x *BgpSrteV6Policy) GetDistinguisher() uint32 { + if x != nil && x.Distinguisher != nil { + return *x.Distinguisher } - return nil + return 0 } -func (x *BgpV6EthernetSegment) GetEvis() []*BgpV6EvpnEvis { - if x != nil { - return x.Evis +func (x *BgpSrteV6Policy) GetColor() uint32 { + if x != nil && x.Color != nil { + return *x.Color } - return nil + return 0 } -func (x *BgpV6EthernetSegment) GetEsi() string { - if x != nil && x.Esi != nil { - return *x.Esi +func (x *BgpSrteV6Policy) GetIpv6Endpoint() string { + if x != nil && x.Ipv6Endpoint != nil { + return *x.Ipv6Endpoint } return "" } -func (x *BgpV6EthernetSegment) GetActiveMode() BgpV6EthernetSegment_ActiveMode_Enum { - if x != nil && x.ActiveMode != nil { - return *x.ActiveMode +func (x *BgpSrteV6Policy) GetNextHopMode() BgpSrteV6Policy_NextHopMode_Enum { + if x != nil && x.NextHopMode != nil { + return *x.NextHopMode } - return BgpV6EthernetSegment_ActiveMode_unspecified + return BgpSrteV6Policy_NextHopMode_unspecified } -func (x *BgpV6EthernetSegment) GetEsiLabel() uint32 { - if x != nil && x.EsiLabel != nil { - return *x.EsiLabel +func (x *BgpSrteV6Policy) GetNextHopAddressType() BgpSrteV6Policy_NextHopAddressType_Enum { + if x != nil && x.NextHopAddressType != nil { + return *x.NextHopAddressType } - return 0 + return BgpSrteV6Policy_NextHopAddressType_unspecified } -func (x *BgpV6EthernetSegment) GetAdvanced() *BgpRouteAdvanced { - if x != nil { - return x.Advanced +func (x *BgpSrteV6Policy) GetNextHopIpv4Address() string { + if x != nil && x.NextHopIpv4Address != nil { + return *x.NextHopIpv4Address } - return nil + return "" } -func (x *BgpV6EthernetSegment) GetCommunities() []*BgpCommunity { +func (x *BgpSrteV6Policy) GetNextHopIpv6Address() string { + if x != nil && x.NextHopIpv6Address != nil { + return *x.NextHopIpv6Address + } + return "" +} + +func (x *BgpSrteV6Policy) GetAdvanced() *BgpRouteAdvanced { if x != nil { - return x.Communities + return x.Advanced } return nil } -func (x *BgpV6EthernetSegment) GetExtCommunities() []*BgpExtCommunity { +func (x *BgpSrteV6Policy) GetAddPath() *BgpAddPath { if x != nil { - return x.ExtCommunities + return x.AddPath } return nil } -func (x *BgpV6EthernetSegment) GetAsPath() *BgpAsPath { +func (x *BgpSrteV6Policy) GetAsPath() *BgpAsPath { if x != nil { return x.AsPath } return nil } -// This contains a list of different flavors of EVPN. -// For example EVPN over VXLAN or EVPN over MPLS etc to be configured per Ethernet segment. -// -// Need to instantiate correct type of EVPN instance as per requirement. -type BgpV6EvpnEvis struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = Choice.Enum.evi_vxlan - Choice *BgpV6EvpnEvis_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpV6EvpnEvis_Choice_Enum,oneof" json:"choice,omitempty"` - // EVPN VXLAN instance to be configured per Ethernet Segment. - EviVxlan *BgpV6EviVxlan `protobuf:"bytes,2,opt,name=evi_vxlan,json=eviVxlan,proto3" json:"evi_vxlan,omitempty"` -} - -func (x *BgpV6EvpnEvis) Reset() { - *x = BgpV6EvpnEvis{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[160] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *BgpSrteV6Policy) GetCommunities() []*BgpCommunity { + if x != nil { + return x.Communities } + return nil } -func (x *BgpV6EvpnEvis) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BgpV6EvpnEvis) ProtoMessage() {} - -func (x *BgpV6EvpnEvis) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[160] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *BgpSrteV6Policy) GetExtcommunities() []*BgpExtCommunity { + if x != nil { + return x.Extcommunities } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpV6EvpnEvis.ProtoReflect.Descriptor instead. -func (*BgpV6EvpnEvis) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{160} +func (x *BgpSrteV6Policy) GetTunnelTlvs() []*BgpSrteV6TunnelTlv { + if x != nil { + return x.TunnelTlvs + } + return nil } -func (x *BgpV6EvpnEvis) GetChoice() BgpV6EvpnEvis_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *BgpSrteV6Policy) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return BgpV6EvpnEvis_Choice_unspecified + return "" } -func (x *BgpV6EvpnEvis) GetEviVxlan() *BgpV6EviVxlan { - if x != nil { - return x.EviVxlan +func (x *BgpSrteV6Policy) GetActive() bool { + if x != nil && x.Active != nil { + return *x.Active } - return nil + return false } -// Configuration for BGP EVPN EVI. Advertises following routes - -// -// # Type 3 - Inclusive Multicast Ethernet Tag Route -// -// Type 1 - Ethernet Auto-discovery Route (Per EVI) -// -// Type 1 - Ethernet Auto-discovery Route (Per ES) -type BgpV6EviVxlan struct { +// Configuration for BGP SRTE Tunnel TLV. +type BgpSrteV6TunnelTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // This contains the list of Broadcast Domains to be configured per EVI. - BroadcastDomains []*BgpV6EviVxlanBroadcastDomain `protobuf:"bytes,1,rep,name=broadcast_domains,json=broadcastDomains,proto3" json:"broadcast_domains,omitempty"` - // This model only supports Ingress Replication - // default = ReplicationType.Enum.ingress_replication - ReplicationType *BgpV6EviVxlan_ReplicationType_Enum `protobuf:"varint,2,opt,name=replication_type,json=replicationType,proto3,enum=otg.BgpV6EviVxlan_ReplicationType_Enum,oneof" json:"replication_type,omitempty"` - // Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel - // attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. - // default = 16 - PmsiLabel *uint32 `protobuf:"varint,3,opt,name=pmsi_label,json=pmsiLabel,proto3,oneof" json:"pmsi_label,omitempty"` - // The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet - // Auto-discovery Route per - // default = 0 - AdLabel *uint32 `protobuf:"varint,4,opt,name=ad_label,json=adLabel,proto3,oneof" json:"ad_label,omitempty"` - // Colon separated Extended Community value of 6 Bytes - AS number: Value identifying - // an EVI. Example - for the as_2octet 60005:100. - RouteDistinguisher *BgpRouteDistinguisher `protobuf:"bytes,5,opt,name=route_distinguisher,json=routeDistinguisher,proto3" json:"route_distinguisher,omitempty"` - // List of Layer 2 Virtual Network Identifier (L2VNI) export targets associated with - // this EVI. - RouteTargetExport []*BgpRouteTarget `protobuf:"bytes,6,rep,name=route_target_export,json=routeTargetExport,proto3" json:"route_target_export,omitempty"` - // List of L2VNI import targets associated with this EVI. - RouteTargetImport []*BgpRouteTarget `protobuf:"bytes,7,rep,name=route_target_import,json=routeTargetImport,proto3" json:"route_target_import,omitempty"` - // List of Layer 3 Virtual Network Identifier (L3VNI) Export Route Targets. - L3RouteTargetExport []*BgpRouteTarget `protobuf:"bytes,8,rep,name=l3_route_target_export,json=l3RouteTargetExport,proto3" json:"l3_route_target_export,omitempty"` - // List of L3VNI Import Route Targets. - L3RouteTargetImport []*BgpRouteTarget `protobuf:"bytes,9,rep,name=l3_route_target_import,json=l3RouteTargetImport,proto3" json:"l3_route_target_import,omitempty"` // Description missing in models - Advanced *BgpRouteAdvanced `protobuf:"bytes,10,opt,name=advanced,proto3" json:"advanced,omitempty"` - // Optional community settings. - Communities []*BgpCommunity `protobuf:"bytes,11,rep,name=communities,proto3" json:"communities,omitempty"` - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. - ExtCommunities []*BgpExtCommunity `protobuf:"bytes,12,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` - // Optional AS PATH settings. - AsPath *BgpAsPath `protobuf:"bytes,13,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` + RemoteEndpointSubTlv *BgpSrteRemoteEndpointSubTlv `protobuf:"bytes,1,opt,name=remote_endpoint_sub_tlv,json=remoteEndpointSubTlv,proto3" json:"remote_endpoint_sub_tlv,omitempty"` + // Description missing in models + ColorSubTlv *BgpSrteColorSubTlv `protobuf:"bytes,2,opt,name=color_sub_tlv,json=colorSubTlv,proto3" json:"color_sub_tlv,omitempty"` + // Description missing in models + BindingSubTlv *BgpSrteBindingSubTlv `protobuf:"bytes,3,opt,name=binding_sub_tlv,json=bindingSubTlv,proto3" json:"binding_sub_tlv,omitempty"` + // Description missing in models + PreferenceSubTlv *BgpSrtePreferenceSubTlv `protobuf:"bytes,4,opt,name=preference_sub_tlv,json=preferenceSubTlv,proto3" json:"preference_sub_tlv,omitempty"` + // Description missing in models + PolicyPrioritySubTlv *BgpSrtePolicyPrioritySubTlv `protobuf:"bytes,5,opt,name=policy_priority_sub_tlv,json=policyPrioritySubTlv,proto3" json:"policy_priority_sub_tlv,omitempty"` + // Description missing in models + PolicyNameSubTlv *BgpSrtePolicyNameSubTlv `protobuf:"bytes,6,opt,name=policy_name_sub_tlv,json=policyNameSubTlv,proto3" json:"policy_name_sub_tlv,omitempty"` + // Description missing in models + ExplicitNullLabelPolicySubTlv *BgpSrteExplicitNullLabelPolicySubTlv `protobuf:"bytes,7,opt,name=explicit_null_label_policy_sub_tlv,json=explicitNullLabelPolicySubTlv,proto3" json:"explicit_null_label_policy_sub_tlv,omitempty"` + // Description missing in models + SegmentLists []*BgpSrteSegmentList `protobuf:"bytes,8,rep,name=segment_lists,json=segmentLists,proto3" json:"segment_lists,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,9,opt,name=name,proto3,oneof" json:"name,omitempty"` + // If enabled means that this part of the configuration including any active 'children' + // nodes will be advertised to peer. If disabled, this means that though config is + // present, it is not taking any part of the test but can be activated at run-time to + // advertise just this part of the configuration to the peer. + // default = True + Active *bool `protobuf:"varint,10,opt,name=active,proto3,oneof" json:"active,omitempty"` } -func (x *BgpV6EviVxlan) Reset() { - *x = BgpV6EviVxlan{} +func (x *BgpSrteV6TunnelTlv) Reset() { + *x = BgpSrteV6TunnelTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[161] + mi := &file_otg_proto_msgTypes[158] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV6EviVxlan) String() string { +func (x *BgpSrteV6TunnelTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV6EviVxlan) ProtoMessage() {} +func (*BgpSrteV6TunnelTlv) ProtoMessage() {} -func (x *BgpV6EviVxlan) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[161] +func (x *BgpSrteV6TunnelTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[158] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -36765,138 +38740,137 @@ func (x *BgpV6EviVxlan) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV6EviVxlan.ProtoReflect.Descriptor instead. -func (*BgpV6EviVxlan) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{161} +// Deprecated: Use BgpSrteV6TunnelTlv.ProtoReflect.Descriptor instead. +func (*BgpSrteV6TunnelTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{158} } -func (x *BgpV6EviVxlan) GetBroadcastDomains() []*BgpV6EviVxlanBroadcastDomain { +func (x *BgpSrteV6TunnelTlv) GetRemoteEndpointSubTlv() *BgpSrteRemoteEndpointSubTlv { if x != nil { - return x.BroadcastDomains + return x.RemoteEndpointSubTlv } return nil } -func (x *BgpV6EviVxlan) GetReplicationType() BgpV6EviVxlan_ReplicationType_Enum { - if x != nil && x.ReplicationType != nil { - return *x.ReplicationType - } - return BgpV6EviVxlan_ReplicationType_unspecified -} - -func (x *BgpV6EviVxlan) GetPmsiLabel() uint32 { - if x != nil && x.PmsiLabel != nil { - return *x.PmsiLabel - } - return 0 -} - -func (x *BgpV6EviVxlan) GetAdLabel() uint32 { - if x != nil && x.AdLabel != nil { - return *x.AdLabel - } - return 0 -} - -func (x *BgpV6EviVxlan) GetRouteDistinguisher() *BgpRouteDistinguisher { +func (x *BgpSrteV6TunnelTlv) GetColorSubTlv() *BgpSrteColorSubTlv { if x != nil { - return x.RouteDistinguisher + return x.ColorSubTlv } return nil } -func (x *BgpV6EviVxlan) GetRouteTargetExport() []*BgpRouteTarget { +func (x *BgpSrteV6TunnelTlv) GetBindingSubTlv() *BgpSrteBindingSubTlv { if x != nil { - return x.RouteTargetExport + return x.BindingSubTlv } return nil } -func (x *BgpV6EviVxlan) GetRouteTargetImport() []*BgpRouteTarget { +func (x *BgpSrteV6TunnelTlv) GetPreferenceSubTlv() *BgpSrtePreferenceSubTlv { if x != nil { - return x.RouteTargetImport + return x.PreferenceSubTlv } return nil } -func (x *BgpV6EviVxlan) GetL3RouteTargetExport() []*BgpRouteTarget { +func (x *BgpSrteV6TunnelTlv) GetPolicyPrioritySubTlv() *BgpSrtePolicyPrioritySubTlv { if x != nil { - return x.L3RouteTargetExport + return x.PolicyPrioritySubTlv } return nil } -func (x *BgpV6EviVxlan) GetL3RouteTargetImport() []*BgpRouteTarget { +func (x *BgpSrteV6TunnelTlv) GetPolicyNameSubTlv() *BgpSrtePolicyNameSubTlv { if x != nil { - return x.L3RouteTargetImport + return x.PolicyNameSubTlv } return nil } -func (x *BgpV6EviVxlan) GetAdvanced() *BgpRouteAdvanced { +func (x *BgpSrteV6TunnelTlv) GetExplicitNullLabelPolicySubTlv() *BgpSrteExplicitNullLabelPolicySubTlv { if x != nil { - return x.Advanced + return x.ExplicitNullLabelPolicySubTlv } return nil } -func (x *BgpV6EviVxlan) GetCommunities() []*BgpCommunity { +func (x *BgpSrteV6TunnelTlv) GetSegmentLists() []*BgpSrteSegmentList { if x != nil { - return x.Communities + return x.SegmentLists } return nil } -func (x *BgpV6EviVxlan) GetExtCommunities() []*BgpExtCommunity { - if x != nil { - return x.ExtCommunities +func (x *BgpSrteV6TunnelTlv) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return nil + return "" } -func (x *BgpV6EviVxlan) GetAsPath() *BgpAsPath { - if x != nil { - return x.AsPath +func (x *BgpSrteV6TunnelTlv) GetActive() bool { + if x != nil && x.Active != nil { + return *x.Active } - return nil + return false } -// Configuration for Broadcast Domains per EVI. -type BgpV6EviVxlanBroadcastDomain struct { +// The Graceful Restart Capability (RFC 4724) is a BGP capability that can be used by +// a BGP speaker to indicate its ability to preserve its forwarding state during BGP +// restart. The Graceful Restart (GR) capability is advertised in OPEN messages sent +// between BGP peers. After a BGP session has been established, and the initial routing +// update has been completed, an End-of-RIB (Routing Information Base) marker is sent +// in an UPDATE message to convey information about routing convergence. +type BgpGracefulRestart struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // This contains the list of Customer MAC/IP Ranges to be configured per Broadcast Domain. - // - // Advertises following route - - // Type 2 - MAC/IP Advertisement Route. - CmacIpRange []*BgpCMacIpRange `protobuf:"bytes,1,rep,name=cmac_ip_range,json=cmacIpRange,proto3" json:"cmac_ip_range,omitempty"` - // The Ethernet Tag ID of the Broadcast Domain. - // default = 0 - EthernetTagId *uint32 `protobuf:"varint,2,opt,name=ethernet_tag_id,json=ethernetTagId,proto3,oneof" json:"ethernet_tag_id,omitempty"` - // VLAN-Aware service to be enabled or disabled. + // If enabled, Graceful Restart capability is advertised in BGP OPEN messages. // default = False - VlanAwareService *bool `protobuf:"varint,3,opt,name=vlan_aware_service,json=vlanAwareService,proto3,oneof" json:"vlan_aware_service,omitempty"` + EnableGr *bool `protobuf:"varint,1,opt,name=enable_gr,json=enableGr,proto3,oneof" json:"enable_gr,omitempty"` + // This is the estimated duration (in seconds) it will take for the BGP session to be + // re-established after a restart. This can be used to speed up routing convergence + // by its peer in case the BGP speaker does not come back after a restart. + // default = 45 + RestartTime *uint32 `protobuf:"varint,2,opt,name=restart_time,json=restartTime,proto3,oneof" json:"restart_time,omitempty"` + // If enabled, the Long-lived Graceful Restart Capability, or LLGR Capability + // will be advertised. + // This capability MUST be advertised in conjunction with the Graceful Restart + // capability. + // default = False + EnableLlgr *bool `protobuf:"varint,3,opt,name=enable_llgr,json=enableLlgr,proto3,oneof" json:"enable_llgr,omitempty"` + // Duration (in seconds) specifying how long stale information (for the AFI/SAFI) + // may be retained. This is a three byte field and is applicable + // only if 'enable_llgr' is set to 'true'. + // default = 10 + StaleTime *uint32 `protobuf:"varint,4,opt,name=stale_time,json=staleTime,proto3,oneof" json:"stale_time,omitempty"` + // If enabled, the N flag will be set in the Graceful Restart capability in the Open + // message. + // If both peers in a BGP connection has this enabled, Graceful Restart procedures are + // performed + // even if the peer goes down due to sending of a Notification Message as per RFC8538. + // default = True + EnableNotification *bool `protobuf:"varint,5,opt,name=enable_notification,json=enableNotification,proto3,oneof" json:"enable_notification,omitempty"` } -func (x *BgpV6EviVxlanBroadcastDomain) Reset() { - *x = BgpV6EviVxlanBroadcastDomain{} +func (x *BgpGracefulRestart) Reset() { + *x = BgpGracefulRestart{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[162] + mi := &file_otg_proto_msgTypes[159] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV6EviVxlanBroadcastDomain) String() string { +func (x *BgpGracefulRestart) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV6EviVxlanBroadcastDomain) ProtoMessage() {} +func (*BgpGracefulRestart) ProtoMessage() {} -func (x *BgpV6EviVxlanBroadcastDomain) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[162] +func (x *BgpGracefulRestart) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[159] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -36907,61 +38881,79 @@ func (x *BgpV6EviVxlanBroadcastDomain) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV6EviVxlanBroadcastDomain.ProtoReflect.Descriptor instead. -func (*BgpV6EviVxlanBroadcastDomain) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{162} +// Deprecated: Use BgpGracefulRestart.ProtoReflect.Descriptor instead. +func (*BgpGracefulRestart) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{159} } -func (x *BgpV6EviVxlanBroadcastDomain) GetCmacIpRange() []*BgpCMacIpRange { - if x != nil { - return x.CmacIpRange +func (x *BgpGracefulRestart) GetEnableGr() bool { + if x != nil && x.EnableGr != nil { + return *x.EnableGr } - return nil + return false } -func (x *BgpV6EviVxlanBroadcastDomain) GetEthernetTagId() uint32 { - if x != nil && x.EthernetTagId != nil { - return *x.EthernetTagId +func (x *BgpGracefulRestart) GetRestartTime() uint32 { + if x != nil && x.RestartTime != nil { + return *x.RestartTime } return 0 } -func (x *BgpV6EviVxlanBroadcastDomain) GetVlanAwareService() bool { - if x != nil && x.VlanAwareService != nil { - return *x.VlanAwareService +func (x *BgpGracefulRestart) GetEnableLlgr() bool { + if x != nil && x.EnableLlgr != nil { + return *x.EnableLlgr } return false } -// Description missing in models -type DeviceVxlan struct { +func (x *BgpGracefulRestart) GetStaleTime() uint32 { + if x != nil && x.StaleTime != nil { + return *x.StaleTime + } + return 0 +} + +func (x *BgpGracefulRestart) GetEnableNotification() bool { + if x != nil && x.EnableNotification != nil { + return *x.EnableNotification + } + return false +} + +// Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the +// order given in the input to the peer after the BGP session is established. +type BgpUpdateReplay struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // IPv4 VXLAN Tunnels - V4Tunnels []*VxlanV4Tunnel `protobuf:"bytes,1,rep,name=v4_tunnels,json=v4Tunnels,proto3" json:"v4_tunnels,omitempty"` - // IPv6 VXLAN Tunnels - V6Tunnels []*VxlanV6Tunnel `protobuf:"bytes,2,rep,name=v6_tunnels,json=v6Tunnels,proto3" json:"v6_tunnels,omitempty"` + // Description missing in models + // default = Choice.Enum.structured_pdus + Choice *BgpUpdateReplay_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpUpdateReplay_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + StructuredPdus *BgpStructuredPdus `protobuf:"bytes,2,opt,name=structured_pdus,json=structuredPdus,proto3" json:"structured_pdus,omitempty"` + // Description missing in models + RawBytes *BgpRawBytes `protobuf:"bytes,3,opt,name=raw_bytes,json=rawBytes,proto3" json:"raw_bytes,omitempty"` } -func (x *DeviceVxlan) Reset() { - *x = DeviceVxlan{} +func (x *BgpUpdateReplay) Reset() { + *x = BgpUpdateReplay{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[163] + mi := &file_otg_proto_msgTypes[160] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeviceVxlan) String() string { +func (x *BgpUpdateReplay) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeviceVxlan) ProtoMessage() {} +func (*BgpUpdateReplay) ProtoMessage() {} -func (x *DeviceVxlan) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[163] +func (x *BgpUpdateReplay) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[160] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -36972,74 +38964,61 @@ func (x *DeviceVxlan) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeviceVxlan.ProtoReflect.Descriptor instead. -func (*DeviceVxlan) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{163} +// Deprecated: Use BgpUpdateReplay.ProtoReflect.Descriptor instead. +func (*BgpUpdateReplay) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{160} } -func (x *DeviceVxlan) GetV4Tunnels() []*VxlanV4Tunnel { +func (x *BgpUpdateReplay) GetChoice() BgpUpdateReplay_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return BgpUpdateReplay_Choice_unspecified +} + +func (x *BgpUpdateReplay) GetStructuredPdus() *BgpStructuredPdus { if x != nil { - return x.V4Tunnels + return x.StructuredPdus } return nil } -func (x *DeviceVxlan) GetV6Tunnels() []*VxlanV6Tunnel { +func (x *BgpUpdateReplay) GetRawBytes() *BgpRawBytes { if x != nil { - return x.V6Tunnels + return x.RawBytes } return nil } -// Configuration and operational state parameters relating to IPv4 VXLAN tunnel end-point -// interface. -type VxlanV4Tunnel struct { +// Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the +// order given in the input to the peer after the BGP session is established. +type BgpRawBytes struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Determines the source interface. - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv4Loopback/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv4Loopback/properties/name - // - // required = true - SourceInterface *string `protobuf:"bytes,1,opt,name=source_interface,json=sourceInterface,proto3,oneof" json:"source_interface,omitempty"` - // Description missing in models - DestinationIpMode *VxlanV4TunnelDestinationIPMode `protobuf:"bytes,2,opt,name=destination_ip_mode,json=destinationIpMode,proto3" json:"destination_ip_mode,omitempty"` - // VXLAN Network Identifier (VNI) to distinguish network instances on the wire - // required = true - Vni *uint32 `protobuf:"varint,3,opt,name=vni,proto3,oneof" json:"vni,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,4,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Array of ordered BGP Updates ( including both Advertise and Withdraws ) to be sent + // in the order given in the input to the peer after the BGP session is established. + Updates []*BgpOneUpdateReplay `protobuf:"bytes,1,rep,name=updates,proto3" json:"updates,omitempty"` } -func (x *VxlanV4Tunnel) Reset() { - *x = VxlanV4Tunnel{} +func (x *BgpRawBytes) Reset() { + *x = BgpRawBytes{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[164] + mi := &file_otg_proto_msgTypes[161] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VxlanV4Tunnel) String() string { +func (x *BgpRawBytes) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VxlanV4Tunnel) ProtoMessage() {} +func (*BgpRawBytes) ProtoMessage() {} -func (x *VxlanV4Tunnel) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[164] +func (x *BgpRawBytes) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[161] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -37050,88 +39029,60 @@ func (x *VxlanV4Tunnel) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use VxlanV4Tunnel.ProtoReflect.Descriptor instead. -func (*VxlanV4Tunnel) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{164} -} - -func (x *VxlanV4Tunnel) GetSourceInterface() string { - if x != nil && x.SourceInterface != nil { - return *x.SourceInterface - } - return "" +// Deprecated: Use BgpRawBytes.ProtoReflect.Descriptor instead. +func (*BgpRawBytes) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{161} } -func (x *VxlanV4Tunnel) GetDestinationIpMode() *VxlanV4TunnelDestinationIPMode { +func (x *BgpRawBytes) GetUpdates() []*BgpOneUpdateReplay { if x != nil { - return x.DestinationIpMode + return x.Updates } return nil } -func (x *VxlanV4Tunnel) GetVni() uint32 { - if x != nil && x.Vni != nil { - return *x.Vni - } - return 0 -} - -func (x *VxlanV4Tunnel) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -// Configuration and operational state parameters relating to IPv6 VXLAN tunnel end-point -// interface. -type VxlanV6Tunnel struct { +// Specification of one BGP Update to be sent to the BGP peer. +type BgpOneUpdateReplay struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Determines the source interface. - // - // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Device.Ipv6Loopback/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Device.Ipv6Loopback/properties/name - // - // required = true - SourceInterface *string `protobuf:"bytes,1,opt,name=source_interface,json=sourceInterface,proto3,oneof" json:"source_interface,omitempty"` - // Description missing in models - DestinationIpMode *VxlanV6TunnelDestinationIPMode `protobuf:"bytes,2,opt,name=destination_ip_mode,json=destinationIpMode,proto3" json:"destination_ip_mode,omitempty"` - // VXLAN Network Identifier (VNI) to distinguish network instances on the wire - // required = true - Vni *uint32 `protobuf:"varint,3,opt,name=vni,proto3,oneof" json:"vni,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. + // Minimum time interval in milliseconds from previous Update from the sequence of BGP + // Updates to be replayed. + // default = 0 + TimeGap *uint32 `protobuf:"varint,1,opt,name=time_gap,json=timeGap,proto3,oneof" json:"time_gap,omitempty"` + // Bytes specified in hex format to be sent to peer after the BGP Update Header. The + // Update Header will always have the initial 16 bytes containing Marker bytes, 2 bytes + // containing the Length and 1 byte containing the Type.The string MUST contain sequence + // of valid hex bytes. The bytes specified in hex format should be appended to the Update + // message to be sent to the peer after the fixed 19 bytes described above. This byte + // stream can be of any length from 1 to 4077 bytes.The value 4077 is derived from + // the maximum length allowed for a BGP message in RFC4271 which is 4096 minus mandatory + // 19 bytes described above. In the imported byte stream, one byte is represented as + // string of 2 characters, for example 2 character string (0x)AB represents value of + // a single byte. So the maximum length of this attribute is 8154 (4077 * 2 hex characters + // per byte). // required = true - Name *string `protobuf:"bytes,4,opt,name=name,proto3,oneof" json:"name,omitempty"` + UpdateBytes *string `protobuf:"bytes,2,opt,name=update_bytes,json=updateBytes,proto3,oneof" json:"update_bytes,omitempty"` } -func (x *VxlanV6Tunnel) Reset() { - *x = VxlanV6Tunnel{} +func (x *BgpOneUpdateReplay) Reset() { + *x = BgpOneUpdateReplay{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[165] + mi := &file_otg_proto_msgTypes[162] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VxlanV6Tunnel) String() string { +func (x *BgpOneUpdateReplay) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VxlanV6Tunnel) ProtoMessage() {} +func (*BgpOneUpdateReplay) ProtoMessage() {} -func (x *VxlanV6Tunnel) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[165] +func (x *BgpOneUpdateReplay) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[162] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -37142,71 +39093,54 @@ func (x *VxlanV6Tunnel) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use VxlanV6Tunnel.ProtoReflect.Descriptor instead. -func (*VxlanV6Tunnel) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{165} -} - -func (x *VxlanV6Tunnel) GetSourceInterface() string { - if x != nil && x.SourceInterface != nil { - return *x.SourceInterface - } - return "" -} - -func (x *VxlanV6Tunnel) GetDestinationIpMode() *VxlanV6TunnelDestinationIPMode { - if x != nil { - return x.DestinationIpMode - } - return nil +// Deprecated: Use BgpOneUpdateReplay.ProtoReflect.Descriptor instead. +func (*BgpOneUpdateReplay) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{162} } -func (x *VxlanV6Tunnel) GetVni() uint32 { - if x != nil && x.Vni != nil { - return *x.Vni +func (x *BgpOneUpdateReplay) GetTimeGap() uint32 { + if x != nil && x.TimeGap != nil { + return *x.TimeGap } return 0 } -func (x *VxlanV6Tunnel) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *BgpOneUpdateReplay) GetUpdateBytes() string { + if x != nil && x.UpdateBytes != nil { + return *x.UpdateBytes } return "" } -// Communication mode between the VTEPs, either unicast or multicast. -type VxlanV4TunnelDestinationIPMode struct { +// Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the +// order given in the input to the peer after the BGP session is established. +type BgpStructuredPdus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // unicast or multicast - // default = Choice.Enum.multicast - Choice *VxlanV4TunnelDestinationIPMode_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.VxlanV4TunnelDestinationIPMode_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Unicast *VxlanV4TunnelDestinationIPModeUnicast `protobuf:"bytes,2,opt,name=unicast,proto3" json:"unicast,omitempty"` - // Description missing in models - Multicast *VxlanV4TunnelDestinationIPModeMulticast `protobuf:"bytes,3,opt,name=multicast,proto3" json:"multicast,omitempty"` + // Array of ordered BGP Updates ( including both Advertise and Withdraws ) to be sent + // in the order given in the input to the peer after the BGP session is established. + Updates []*BgpOneStructuredUpdateReplay `protobuf:"bytes,1,rep,name=updates,proto3" json:"updates,omitempty"` } -func (x *VxlanV4TunnelDestinationIPMode) Reset() { - *x = VxlanV4TunnelDestinationIPMode{} +func (x *BgpStructuredPdus) Reset() { + *x = BgpStructuredPdus{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[166] + mi := &file_otg_proto_msgTypes[163] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VxlanV4TunnelDestinationIPMode) String() string { +func (x *BgpStructuredPdus) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VxlanV4TunnelDestinationIPMode) ProtoMessage() {} +func (*BgpStructuredPdus) ProtoMessage() {} -func (x *VxlanV4TunnelDestinationIPMode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[166] +func (x *BgpStructuredPdus) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[163] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -37217,64 +39151,53 @@ func (x *VxlanV4TunnelDestinationIPMode) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use VxlanV4TunnelDestinationIPMode.ProtoReflect.Descriptor instead. -func (*VxlanV4TunnelDestinationIPMode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{166} -} - -func (x *VxlanV4TunnelDestinationIPMode) GetChoice() VxlanV4TunnelDestinationIPMode_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return VxlanV4TunnelDestinationIPMode_Choice_unspecified -} - -func (x *VxlanV4TunnelDestinationIPMode) GetUnicast() *VxlanV4TunnelDestinationIPModeUnicast { - if x != nil { - return x.Unicast - } - return nil +// Deprecated: Use BgpStructuredPdus.ProtoReflect.Descriptor instead. +func (*BgpStructuredPdus) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{163} } -func (x *VxlanV4TunnelDestinationIPMode) GetMulticast() *VxlanV4TunnelDestinationIPModeMulticast { +func (x *BgpStructuredPdus) GetUpdates() []*BgpOneStructuredUpdateReplay { if x != nil { - return x.Multicast + return x.Updates } return nil } -// Communication mode between the VTEPs, either unicast or multicast. -type VxlanV6TunnelDestinationIPMode struct { +// One structured BGP Update. +type BgpOneStructuredUpdateReplay struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // unicast or multicast - // default = Choice.Enum.multicast - Choice *VxlanV6TunnelDestinationIPMode_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.VxlanV6TunnelDestinationIPMode_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Unicast *VxlanV6TunnelDestinationIPModeUnicast `protobuf:"bytes,2,opt,name=unicast,proto3" json:"unicast,omitempty"` - // Description missing in models - Multicast *VxlanV6TunnelDestinationIPModeMulticast `protobuf:"bytes,3,opt,name=multicast,proto3" json:"multicast,omitempty"` + // Minimum time interval in milliseconds from previous Update from the sequence of BGP + // Updates to be replayed. + // default = 0 + TimeGap *uint32 `protobuf:"varint,1,opt,name=time_gap,json=timeGap,proto3,oneof" json:"time_gap,omitempty"` + // Attributes carried in the Update packet alongwith the reach/unreach prefixes. + PathAttributes *BgpAttributes `protobuf:"bytes,2,opt,name=path_attributes,json=pathAttributes,proto3" json:"path_attributes,omitempty"` + // The IPv4 prefixes to be included in the traditional UNREACH_NLRI. + TraditionalUnreachNlris []*BgpOneTraditionalNlriPrefix `protobuf:"bytes,3,rep,name=traditional_unreach_nlris,json=traditionalUnreachNlris,proto3" json:"traditional_unreach_nlris,omitempty"` + // The IPv4 prefixes to be included in the traditional REACH_NLRI. + TraditionalReachNlris []*BgpOneTraditionalNlriPrefix `protobuf:"bytes,4,rep,name=traditional_reach_nlris,json=traditionalReachNlris,proto3" json:"traditional_reach_nlris,omitempty"` } -func (x *VxlanV6TunnelDestinationIPMode) Reset() { - *x = VxlanV6TunnelDestinationIPMode{} +func (x *BgpOneStructuredUpdateReplay) Reset() { + *x = BgpOneStructuredUpdateReplay{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[167] + mi := &file_otg_proto_msgTypes[164] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VxlanV6TunnelDestinationIPMode) String() string { +func (x *BgpOneStructuredUpdateReplay) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VxlanV6TunnelDestinationIPMode) ProtoMessage() {} +func (*BgpOneStructuredUpdateReplay) ProtoMessage() {} -func (x *VxlanV6TunnelDestinationIPMode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[167] +func (x *BgpOneStructuredUpdateReplay) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[164] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -37285,59 +39208,76 @@ func (x *VxlanV6TunnelDestinationIPMode) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use VxlanV6TunnelDestinationIPMode.ProtoReflect.Descriptor instead. -func (*VxlanV6TunnelDestinationIPMode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{167} +// Deprecated: Use BgpOneStructuredUpdateReplay.ProtoReflect.Descriptor instead. +func (*BgpOneStructuredUpdateReplay) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{164} } -func (x *VxlanV6TunnelDestinationIPMode) GetChoice() VxlanV6TunnelDestinationIPMode_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *BgpOneStructuredUpdateReplay) GetTimeGap() uint32 { + if x != nil && x.TimeGap != nil { + return *x.TimeGap } - return VxlanV6TunnelDestinationIPMode_Choice_unspecified + return 0 } -func (x *VxlanV6TunnelDestinationIPMode) GetUnicast() *VxlanV6TunnelDestinationIPModeUnicast { +func (x *BgpOneStructuredUpdateReplay) GetPathAttributes() *BgpAttributes { if x != nil { - return x.Unicast + return x.PathAttributes } return nil } -func (x *VxlanV6TunnelDestinationIPMode) GetMulticast() *VxlanV6TunnelDestinationIPModeMulticast { +func (x *BgpOneStructuredUpdateReplay) GetTraditionalUnreachNlris() []*BgpOneTraditionalNlriPrefix { if x != nil { - return x.Multicast + return x.TraditionalUnreachNlris } return nil } -// Description missing in models -type VxlanV4TunnelDestinationIPModeUnicast struct { +func (x *BgpOneStructuredUpdateReplay) GetTraditionalReachNlris() []*BgpOneTraditionalNlriPrefix { + if x != nil { + return x.TraditionalReachNlris + } + return nil +} + +// TRADITIONAL_NLRI is an optional part of the the BGP Update which can carry only IPv4 +// prefix information as defined in https://www.rfc-editor.org/rfc/rfc4271.html#section-4.3 +// +// and extended by https://datatracker.ietf.org/doc/html/rfc7911#section-3 to carry +// additional Path Id information per prefix. +type BgpOneTraditionalNlriPrefix struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // List of VTEPs for member VNI(VXLAN Network Identifier) - Vteps []*VxlanV4TunnelDestinationIPModeUnicastVtep `protobuf:"bytes,1,rep,name=vteps,proto3" json:"vteps,omitempty"` + // The IPv4 address of the network. + // default = 0.0.0.0 + Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` + // The IPv4 network prefix length to be applied to the address. + // default = 24 + Prefix *uint32 `protobuf:"varint,2,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` + // Description missing in models + PathId *BgpNLRIPrefixPathId `protobuf:"bytes,3,opt,name=path_id,json=pathId,proto3" json:"path_id,omitempty"` } -func (x *VxlanV4TunnelDestinationIPModeUnicast) Reset() { - *x = VxlanV4TunnelDestinationIPModeUnicast{} +func (x *BgpOneTraditionalNlriPrefix) Reset() { + *x = BgpOneTraditionalNlriPrefix{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[168] + mi := &file_otg_proto_msgTypes[165] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VxlanV4TunnelDestinationIPModeUnicast) String() string { +func (x *BgpOneTraditionalNlriPrefix) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VxlanV4TunnelDestinationIPModeUnicast) ProtoMessage() {} +func (*BgpOneTraditionalNlriPrefix) ProtoMessage() {} -func (x *VxlanV4TunnelDestinationIPModeUnicast) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[168] +func (x *BgpOneTraditionalNlriPrefix) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[165] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -37348,45 +39288,65 @@ func (x *VxlanV4TunnelDestinationIPModeUnicast) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use VxlanV4TunnelDestinationIPModeUnicast.ProtoReflect.Descriptor instead. -func (*VxlanV4TunnelDestinationIPModeUnicast) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{168} +// Deprecated: Use BgpOneTraditionalNlriPrefix.ProtoReflect.Descriptor instead. +func (*BgpOneTraditionalNlriPrefix) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{165} } -func (x *VxlanV4TunnelDestinationIPModeUnicast) GetVteps() []*VxlanV4TunnelDestinationIPModeUnicastVtep { +func (x *BgpOneTraditionalNlriPrefix) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address + } + return "" +} + +func (x *BgpOneTraditionalNlriPrefix) GetPrefix() uint32 { + if x != nil && x.Prefix != nil { + return *x.Prefix + } + return 0 +} + +func (x *BgpOneTraditionalNlriPrefix) GetPathId() *BgpNLRIPrefixPathId { if x != nil { - return x.Vteps + return x.PathId } return nil } -// Description missing in models -type VxlanV6TunnelDestinationIPModeUnicast struct { +// One IPv4 NLRI Prefix. +type BgpOneIpv4NLRIPrefix struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // List of VTEPs for member VNI(VXLAN Network Identifier) - Vteps []*VxlanV6TunnelDestinationIPModeUnicastVtep `protobuf:"bytes,1,rep,name=vteps,proto3" json:"vteps,omitempty"` + // The IPv4 address of the network. + // default = 0.0.0.0 + Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` + // The IPv4 network prefix length to be applied to the address. + // default = 24 + Prefix *uint32 `protobuf:"varint,2,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` + // Description missing in models + PathId *BgpNLRIPrefixPathId `protobuf:"bytes,3,opt,name=path_id,json=pathId,proto3" json:"path_id,omitempty"` } -func (x *VxlanV6TunnelDestinationIPModeUnicast) Reset() { - *x = VxlanV6TunnelDestinationIPModeUnicast{} +func (x *BgpOneIpv4NLRIPrefix) Reset() { + *x = BgpOneIpv4NLRIPrefix{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[169] + mi := &file_otg_proto_msgTypes[166] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VxlanV6TunnelDestinationIPModeUnicast) String() string { +func (x *BgpOneIpv4NLRIPrefix) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VxlanV6TunnelDestinationIPModeUnicast) ProtoMessage() {} +func (*BgpOneIpv4NLRIPrefix) ProtoMessage() {} -func (x *VxlanV6TunnelDestinationIPModeUnicast) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[169] +func (x *BgpOneIpv4NLRIPrefix) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[166] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -37397,51 +39357,65 @@ func (x *VxlanV6TunnelDestinationIPModeUnicast) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use VxlanV6TunnelDestinationIPModeUnicast.ProtoReflect.Descriptor instead. -func (*VxlanV6TunnelDestinationIPModeUnicast) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{169} +// Deprecated: Use BgpOneIpv4NLRIPrefix.ProtoReflect.Descriptor instead. +func (*BgpOneIpv4NLRIPrefix) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{166} } -func (x *VxlanV6TunnelDestinationIPModeUnicast) GetVteps() []*VxlanV6TunnelDestinationIPModeUnicastVtep { +func (x *BgpOneIpv4NLRIPrefix) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address + } + return "" +} + +func (x *BgpOneIpv4NLRIPrefix) GetPrefix() uint32 { + if x != nil && x.Prefix != nil { + return *x.Prefix + } + return 0 +} + +func (x *BgpOneIpv4NLRIPrefix) GetPathId() *BgpNLRIPrefixPathId { if x != nil { - return x.Vteps + return x.PathId } return nil } -// Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated -// MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request -// for another end-host IP address, its local VTEP intercepts the ARP request and checks -// for the ARP-resolved IP address in its ARP suppression cache table. If it finds -// a match, the local VTEP sends an ARP response on behalf of the remote end host. -type VxlanTunnelDestinationIPModeUnicastArpSuppressionCache struct { +// One IPv6 NLRI Prefix. +type BgpOneIpv6NLRIPrefix struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Remote VM MAC address bound to Remote VM IPv4 address - RemoteVmMac *string `protobuf:"bytes,1,opt,name=remote_vm_mac,json=remoteVmMac,proto3,oneof" json:"remote_vm_mac,omitempty"` - // Remote VM IPv4 address - RemoteVmIpv4 *string `protobuf:"bytes,2,opt,name=remote_vm_ipv4,json=remoteVmIpv4,proto3,oneof" json:"remote_vm_ipv4,omitempty"` + // The IPv6 address of the network. + // default = 0::0 + Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` + // The IPv6 network prefix length to be applied to the address. + // default = 64 + Prefix *uint32 `protobuf:"varint,2,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` + // Description missing in models + PathId *BgpNLRIPrefixPathId `protobuf:"bytes,3,opt,name=path_id,json=pathId,proto3" json:"path_id,omitempty"` } -func (x *VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) Reset() { - *x = VxlanTunnelDestinationIPModeUnicastArpSuppressionCache{} +func (x *BgpOneIpv6NLRIPrefix) Reset() { + *x = BgpOneIpv6NLRIPrefix{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[170] + mi := &file_otg_proto_msgTypes[167] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) String() string { +func (x *BgpOneIpv6NLRIPrefix) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) ProtoMessage() {} +func (*BgpOneIpv6NLRIPrefix) ProtoMessage() {} -func (x *VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[170] +func (x *BgpOneIpv6NLRIPrefix) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[167] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -37452,58 +39426,60 @@ func (x *VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) ProtoReflect() return mi.MessageOf(x) } -// Deprecated: Use VxlanTunnelDestinationIPModeUnicastArpSuppressionCache.ProtoReflect.Descriptor instead. -func (*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{170} +// Deprecated: Use BgpOneIpv6NLRIPrefix.ProtoReflect.Descriptor instead. +func (*BgpOneIpv6NLRIPrefix) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{167} } -func (x *VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) GetRemoteVmMac() string { - if x != nil && x.RemoteVmMac != nil { - return *x.RemoteVmMac +func (x *BgpOneIpv6NLRIPrefix) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address } return "" } -func (x *VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) GetRemoteVmIpv4() string { - if x != nil && x.RemoteVmIpv4 != nil { - return *x.RemoteVmIpv4 +func (x *BgpOneIpv6NLRIPrefix) GetPrefix() uint32 { + if x != nil && x.Prefix != nil { + return *x.Prefix } - return "" + return 0 } -// VTEP (VXLAN Tunnel End Point (VTEP)) parameters -type VxlanV4TunnelDestinationIPModeUnicastVtep struct { +func (x *BgpOneIpv6NLRIPrefix) GetPathId() *BgpNLRIPrefixPathId { + if x != nil { + return x.PathId + } + return nil +} + +// Optional field in the NLRI carrying Path Id of the prefix. +type BgpNLRIPrefixPathId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Remote VXLAN Tunnel End Point address - RemoteVtepAddress *string `protobuf:"bytes,1,opt,name=remote_vtep_address,json=remoteVtepAddress,proto3,oneof" json:"remote_vtep_address,omitempty"` - // Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated - // MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request - // for another end-host IP address, its local VTEP intercepts the ARP request and checks - // for the ARP-resolved IP address in its ARP suppression cache table. If it finds - // a match, the local VTEP sends an ARP response on behalf of the remote end host. - ArpSuppressionCache []*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache `protobuf:"bytes,2,rep,name=arp_suppression_cache,json=arpSuppressionCache,proto3" json:"arp_suppression_cache,omitempty"` + // The value of the optional Path ID of the prefix. + // default = 1 + Value *uint32 `protobuf:"varint,1,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *VxlanV4TunnelDestinationIPModeUnicastVtep) Reset() { - *x = VxlanV4TunnelDestinationIPModeUnicastVtep{} +func (x *BgpNLRIPrefixPathId) Reset() { + *x = BgpNLRIPrefixPathId{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[171] + mi := &file_otg_proto_msgTypes[168] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VxlanV4TunnelDestinationIPModeUnicastVtep) String() string { +func (x *BgpNLRIPrefixPathId) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VxlanV4TunnelDestinationIPModeUnicastVtep) ProtoMessage() {} +func (*BgpNLRIPrefixPathId) ProtoMessage() {} -func (x *VxlanV4TunnelDestinationIPModeUnicastVtep) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[171] +func (x *BgpNLRIPrefixPathId) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[168] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -37514,58 +39490,61 @@ func (x *VxlanV4TunnelDestinationIPModeUnicastVtep) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use VxlanV4TunnelDestinationIPModeUnicastVtep.ProtoReflect.Descriptor instead. -func (*VxlanV4TunnelDestinationIPModeUnicastVtep) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{171} -} - -func (x *VxlanV4TunnelDestinationIPModeUnicastVtep) GetRemoteVtepAddress() string { - if x != nil && x.RemoteVtepAddress != nil { - return *x.RemoteVtepAddress - } - return "" +// Deprecated: Use BgpNLRIPrefixPathId.ProtoReflect.Descriptor instead. +func (*BgpNLRIPrefixPathId) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{168} } -func (x *VxlanV4TunnelDestinationIPModeUnicastVtep) GetArpSuppressionCache() []*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { - if x != nil { - return x.ArpSuppressionCache +func (x *BgpNLRIPrefixPathId) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } - return nil + return 0 } -// VTEP (VXLAN Tunnel End Point (VTEP)) parameters -type VxlanV6TunnelDestinationIPModeUnicastVtep struct { +// IPv4 Segment Routing Policy NLRI Prefix. +type BgpIpv4SrPolicyNLRIPrefix struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Remote VXLAN Tunnel End Point address - RemoteVtepAddress *string `protobuf:"bytes,1,opt,name=remote_vtep_address,json=remoteVtepAddress,proto3,oneof" json:"remote_vtep_address,omitempty"` - // Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated - // MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request - // for another end-host IP address, its local VTEP intercepts the ARP request and checks - // for the ARP-resolved IP address in its ARP suppression cache table. If it finds - // a match, the local VTEP sends an ARP response on behalf of the remote end host. - ArpSuppressionCache []*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache `protobuf:"bytes,2,rep,name=arp_suppression_cache,json=arpSuppressionCache,proto3" json:"arp_suppression_cache,omitempty"` + // The 4-octet value uniquely identifying the policy in the context of + // tuple. The distinguisher has no semantic value and is solely used by the SR Policy + // originator to make unique (from an NLRI perspective) both for multiple candidate + // paths of the same SR Policy as well as candidate paths of different SR Policies + // (i.e. with different segment lists) with the same Color and Endpoint but meant for + // different headends. + // default = 1 + Distinguisher *uint32 `protobuf:"varint,1,opt,name=distinguisher,proto3,oneof" json:"distinguisher,omitempty"` + // 4-octet value identifying (with the endpoint) the policy. The color is used to match + // the color of the destination prefixes to steer traffic into the SR Policy as specified + // in section 8 of RFC9256. + // default = 1 + Color *uint32 `protobuf:"varint,2,opt,name=color,proto3,oneof" json:"color,omitempty"` + // Identifies the endpoint of a policy. The Endpoint is an IPv4 address and can be + // either a unicast or an unspecified address (0.0.0.0) as specified in section 2.1 + // of RFC9256. + // default = 0.0.0.0 + Endpoint *string `protobuf:"bytes,3,opt,name=endpoint,proto3,oneof" json:"endpoint,omitempty"` } -func (x *VxlanV6TunnelDestinationIPModeUnicastVtep) Reset() { - *x = VxlanV6TunnelDestinationIPModeUnicastVtep{} +func (x *BgpIpv4SrPolicyNLRIPrefix) Reset() { + *x = BgpIpv4SrPolicyNLRIPrefix{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[172] + mi := &file_otg_proto_msgTypes[169] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VxlanV6TunnelDestinationIPModeUnicastVtep) String() string { +func (x *BgpIpv4SrPolicyNLRIPrefix) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VxlanV6TunnelDestinationIPModeUnicastVtep) ProtoMessage() {} +func (*BgpIpv4SrPolicyNLRIPrefix) ProtoMessage() {} -func (x *VxlanV6TunnelDestinationIPModeUnicastVtep) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[172] +func (x *BgpIpv4SrPolicyNLRIPrefix) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[169] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -37576,52 +39555,76 @@ func (x *VxlanV6TunnelDestinationIPModeUnicastVtep) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use VxlanV6TunnelDestinationIPModeUnicastVtep.ProtoReflect.Descriptor instead. -func (*VxlanV6TunnelDestinationIPModeUnicastVtep) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{172} +// Deprecated: Use BgpIpv4SrPolicyNLRIPrefix.ProtoReflect.Descriptor instead. +func (*BgpIpv4SrPolicyNLRIPrefix) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{169} } -func (x *VxlanV6TunnelDestinationIPModeUnicastVtep) GetRemoteVtepAddress() string { - if x != nil && x.RemoteVtepAddress != nil { - return *x.RemoteVtepAddress +func (x *BgpIpv4SrPolicyNLRIPrefix) GetDistinguisher() uint32 { + if x != nil && x.Distinguisher != nil { + return *x.Distinguisher } - return "" + return 0 } -func (x *VxlanV6TunnelDestinationIPModeUnicastVtep) GetArpSuppressionCache() []*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { - if x != nil { - return x.ArpSuppressionCache +func (x *BgpIpv4SrPolicyNLRIPrefix) GetColor() uint32 { + if x != nil && x.Color != nil { + return *x.Color } - return nil + return 0 } -// Multicast Group address for member VNI(VXLAN Network Identifier) -type VxlanV4TunnelDestinationIPModeMulticast struct { +func (x *BgpIpv4SrPolicyNLRIPrefix) GetEndpoint() string { + if x != nil && x.Endpoint != nil { + return *x.Endpoint + } + return "" +} + +// One IPv6 Segment Routing Policy NLRI Prefix. +type BgpIpv6SrPolicyNLRIPrefix struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // IPv4 Multicast address - Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` + // The 4-octet value uniquely identifying the policy in the context of + // tuple. The distinguisher has no semantic value and is solely used by the SR Policy + // originator to make unique (from an NLRI perspective) both for multiple candidate + // paths of the same SR Policy as well as candidate paths of different SR Policies + // (i.e. with different segment lists) with the same Color and Endpoint but meant for + // different headends. + // default = 1 + Distinguisher *uint32 `protobuf:"varint,1,opt,name=distinguisher,proto3,oneof" json:"distinguisher,omitempty"` + // 4-octet value identifying (with the endpoint) the policy. The color is used to match + // the color of the destination prefixes to steer traffic into the SR Policy as specified + // in section 8 of RFC9256. + // default = 1 + Color *uint32 `protobuf:"varint,2,opt,name=color,proto3,oneof" json:"color,omitempty"` + // Identifies the endpoint of a policy. The Endpoint may represent a single node or + // a set of nodes (e.g., an anycast address). The Endpoint is an IPv6 address and can + // be either a unicast or an unspecified address (0::0) as specified in section 2.1 + // of RFC9256. + // default = 0::0 + Endpoint *string `protobuf:"bytes,3,opt,name=endpoint,proto3,oneof" json:"endpoint,omitempty"` } -func (x *VxlanV4TunnelDestinationIPModeMulticast) Reset() { - *x = VxlanV4TunnelDestinationIPModeMulticast{} +func (x *BgpIpv6SrPolicyNLRIPrefix) Reset() { + *x = BgpIpv6SrPolicyNLRIPrefix{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[173] + mi := &file_otg_proto_msgTypes[170] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VxlanV4TunnelDestinationIPModeMulticast) String() string { +func (x *BgpIpv6SrPolicyNLRIPrefix) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VxlanV4TunnelDestinationIPModeMulticast) ProtoMessage() {} +func (*BgpIpv6SrPolicyNLRIPrefix) ProtoMessage() {} -func (x *VxlanV4TunnelDestinationIPModeMulticast) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[173] +func (x *BgpIpv6SrPolicyNLRIPrefix) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[170] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -37632,45 +39635,112 @@ func (x *VxlanV4TunnelDestinationIPModeMulticast) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use VxlanV4TunnelDestinationIPModeMulticast.ProtoReflect.Descriptor instead. -func (*VxlanV4TunnelDestinationIPModeMulticast) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{173} +// Deprecated: Use BgpIpv6SrPolicyNLRIPrefix.ProtoReflect.Descriptor instead. +func (*BgpIpv6SrPolicyNLRIPrefix) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{170} } -func (x *VxlanV4TunnelDestinationIPModeMulticast) GetAddress() string { - if x != nil && x.Address != nil { - return *x.Address +func (x *BgpIpv6SrPolicyNLRIPrefix) GetDistinguisher() uint32 { + if x != nil && x.Distinguisher != nil { + return *x.Distinguisher + } + return 0 +} + +func (x *BgpIpv6SrPolicyNLRIPrefix) GetColor() uint32 { + if x != nil && x.Color != nil { + return *x.Color + } + return 0 +} + +func (x *BgpIpv6SrPolicyNLRIPrefix) GetEndpoint() string { + if x != nil && x.Endpoint != nil { + return *x.Endpoint } return "" } -// Multicast Group address for member VNI(VXLAN Network Identifier) -type VxlanV6TunnelDestinationIPModeMulticast struct { +// Attributes carried in the Update packet alongwith the reach/unreach prefixes. +type BgpAttributes struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // IPv6 Multicast address - Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` + // Any attributes not present in the list of configurable attributes should be added + // to the list of unknown attributes. + OtherAttributes []*BgpAttributesOtherAttribute `protobuf:"bytes,1,rep,name=other_attributes,json=otherAttributes,proto3" json:"other_attributes,omitempty"` + // The ORIGIN attribute is a mandatory attribute which can take three values: + // the prefix originates from an interior routing protocol 'igp', it originates from + // 'egp' + // or the origin is 'incomplete',if the prefix is learned through other means. + // + // default = Origin.Enum.incomplete + Origin *BgpAttributes_Origin_Enum `protobuf:"varint,2,opt,name=origin,proto3,enum=otg.BgpAttributes_Origin_Enum,oneof" json:"origin,omitempty"` + // AS_PATH attribute to be included in the Update. + AsPath *BgpAttributesAsPath `protobuf:"bytes,3,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` + // AS4_PATH attribute to be included in the Update. + As4Path *BgpAttributesAs4Path `protobuf:"bytes,4,opt,name=as4_path,json=as4Path,proto3" json:"as4_path,omitempty"` + // Description missing in models + NextHop *BgpAttributesNextHop `protobuf:"bytes,5,opt,name=next_hop,json=nextHop,proto3" json:"next_hop,omitempty"` + // Description missing in models + MultiExitDiscriminator *BgpAttributesMultiExitDiscriminator `protobuf:"bytes,6,opt,name=multi_exit_discriminator,json=multiExitDiscriminator,proto3" json:"multi_exit_discriminator,omitempty"` + // Description missing in models + LocalPreference *BgpAttributesLocalPreference `protobuf:"bytes,7,opt,name=local_preference,json=localPreference,proto3" json:"local_preference,omitempty"` + // If enabled, it indicates that the ATOMIC_AGGREGATOR attribute should be included + // in the Update. + // Presence of this attribute Indicates that this route might not be getting sent on + // a fully optimized path + // since some intermediate BGP speaker has aggregated the route. + // + // default = False + IncludeAtomicAggregator *bool `protobuf:"varint,8,opt,name=include_atomic_aggregator,json=includeAtomicAggregator,proto3,oneof" json:"include_atomic_aggregator,omitempty"` + // Description missing in models + Aggregator *BgpAttributesAggregator `protobuf:"bytes,9,opt,name=aggregator,proto3" json:"aggregator,omitempty"` + // Description missing in models + As4Aggregator *BgpAttributesAs4Aggregator `protobuf:"bytes,10,opt,name=as4_aggregator,json=as4Aggregator,proto3" json:"as4_aggregator,omitempty"` + // Description missing in models + Community []*BgpAttributesCommunity `protobuf:"bytes,11,rep,name=community,proto3" json:"community,omitempty"` + // Description missing in models + OriginatorId *BgpAttributesOriginatorId `protobuf:"bytes,12,opt,name=originator_id,json=originatorId,proto3" json:"originator_id,omitempty"` + // When a Route Reflector reflects a route, it prepends the local CLUSTER_ID to the + // CLUSTER_LIST as defined in RFC4456. + ClusterIds []string `protobuf:"bytes,13,rep,name=cluster_ids,json=clusterIds,proto3" json:"cluster_ids,omitempty"` + // Optional EXTENDED_COMMUNITY attribute settings. + // The EXTENDED_COMMUNITY Attribute is a transitive optional BGP attribute, with the + // Type Code 16. Community and Extended Communities attributes + // are utilized to trigger routing decisions, such as acceptance, rejection, preference, + // or redistribution. An extended community is an eight byte value. + // It is divided into two main parts. The first two bytes of the community encode a + // type and sub-type fields and the last six bytes carry a unique set + // of data in a format defined by the type and sub-type field. Extended communities + // provide a larger range for grouping or categorizing communities. + ExtendedCommunities []*BgpExtendedCommunity `protobuf:"bytes,14,rep,name=extended_communities,json=extendedCommunities,proto3" json:"extended_communities,omitempty"` + // Description missing in models + TunnelEncapsulation *BgpAttributesTunnelEncapsulation `protobuf:"bytes,15,opt,name=tunnel_encapsulation,json=tunnelEncapsulation,proto3" json:"tunnel_encapsulation,omitempty"` + // Description missing in models + MpReach *BgpAttributesMpReachNlri `protobuf:"bytes,16,opt,name=mp_reach,json=mpReach,proto3" json:"mp_reach,omitempty"` + // Description missing in models + MpUnreach *BgpAttributesMpUnreachNlri `protobuf:"bytes,17,opt,name=mp_unreach,json=mpUnreach,proto3" json:"mp_unreach,omitempty"` } -func (x *VxlanV6TunnelDestinationIPModeMulticast) Reset() { - *x = VxlanV6TunnelDestinationIPModeMulticast{} +func (x *BgpAttributes) Reset() { + *x = BgpAttributes{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[174] + mi := &file_otg_proto_msgTypes[171] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VxlanV6TunnelDestinationIPModeMulticast) String() string { +func (x *BgpAttributes) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VxlanV6TunnelDestinationIPModeMulticast) ProtoMessage() {} +func (*BgpAttributes) ProtoMessage() {} -func (x *VxlanV6TunnelDestinationIPModeMulticast) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[174] +func (x *BgpAttributes) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[171] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -37681,166 +39751,175 @@ func (x *VxlanV6TunnelDestinationIPModeMulticast) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use VxlanV6TunnelDestinationIPModeMulticast.ProtoReflect.Descriptor instead. -func (*VxlanV6TunnelDestinationIPModeMulticast) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{174} +// Deprecated: Use BgpAttributes.ProtoReflect.Descriptor instead. +func (*BgpAttributes) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{171} } -func (x *VxlanV6TunnelDestinationIPModeMulticast) GetAddress() string { - if x != nil && x.Address != nil { - return *x.Address +func (x *BgpAttributes) GetOtherAttributes() []*BgpAttributesOtherAttribute { + if x != nil { + return x.OtherAttributes } - return "" + return nil } -// Configuration for one or more RSVP interfaces, ingress and egress LSPs. In this model, -// currently IPv4 RSVP and point-to-point LSPs are supported as per RFC3209 and related -// specifications. -type DeviceRsvp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *BgpAttributes) GetOrigin() BgpAttributes_Origin_Enum { + if x != nil && x.Origin != nil { + return *x.Origin + } + return BgpAttributes_Origin_unspecified +} - // List of IPv4 RSVP connected interfaces. At least one interface should be present - // for device connected to the DUT. For unconnected devices, this array must be empty. - Ipv4Interfaces []*RsvpIpv4Interface `protobuf:"bytes,1,rep,name=ipv4_interfaces,json=ipv4Interfaces,proto3" json:"ipv4_interfaces,omitempty"` - // List of IPv4 Loopback or IPv4 connected interfaces acting as RSVP ingress and egress - // endpoints. - LspIpv4Interfaces []*RsvpLspIpv4Interface `protobuf:"bytes,2,rep,name=lsp_ipv4_interfaces,json=lspIpv4Interfaces,proto3" json:"lsp_ipv4_interfaces,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - Name *string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"` +func (x *BgpAttributes) GetAsPath() *BgpAttributesAsPath { + if x != nil { + return x.AsPath + } + return nil } -func (x *DeviceRsvp) Reset() { - *x = DeviceRsvp{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[175] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *BgpAttributes) GetAs4Path() *BgpAttributesAs4Path { + if x != nil { + return x.As4Path } + return nil } -func (x *DeviceRsvp) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *BgpAttributes) GetNextHop() *BgpAttributesNextHop { + if x != nil { + return x.NextHop + } + return nil } -func (*DeviceRsvp) ProtoMessage() {} +func (x *BgpAttributes) GetMultiExitDiscriminator() *BgpAttributesMultiExitDiscriminator { + if x != nil { + return x.MultiExitDiscriminator + } + return nil +} -func (x *DeviceRsvp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[175] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *BgpAttributes) GetLocalPreference() *BgpAttributesLocalPreference { + if x != nil { + return x.LocalPreference } - return mi.MessageOf(x) + return nil } -// Deprecated: Use DeviceRsvp.ProtoReflect.Descriptor instead. -func (*DeviceRsvp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{175} +func (x *BgpAttributes) GetIncludeAtomicAggregator() bool { + if x != nil && x.IncludeAtomicAggregator != nil { + return *x.IncludeAtomicAggregator + } + return false } -func (x *DeviceRsvp) GetIpv4Interfaces() []*RsvpIpv4Interface { +func (x *BgpAttributes) GetAggregator() *BgpAttributesAggregator { if x != nil { - return x.Ipv4Interfaces + return x.Aggregator } return nil } -func (x *DeviceRsvp) GetLspIpv4Interfaces() []*RsvpLspIpv4Interface { +func (x *BgpAttributes) GetAs4Aggregator() *BgpAttributesAs4Aggregator { if x != nil { - return x.LspIpv4Interfaces + return x.As4Aggregator } return nil } -func (x *DeviceRsvp) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *BgpAttributes) GetCommunity() []*BgpAttributesCommunity { + if x != nil { + return x.Community } - return "" + return nil } -// Configuration for RSVP Interface. -type RsvpIpv4Interface struct { +func (x *BgpAttributes) GetOriginatorId() *BgpAttributesOriginatorId { + if x != nil { + return x.OriginatorId + } + return nil +} + +func (x *BgpAttributes) GetClusterIds() []string { + if x != nil { + return x.ClusterIds + } + return nil +} + +func (x *BgpAttributes) GetExtendedCommunities() []*BgpExtendedCommunity { + if x != nil { + return x.ExtendedCommunities + } + return nil +} + +func (x *BgpAttributes) GetTunnelEncapsulation() *BgpAttributesTunnelEncapsulation { + if x != nil { + return x.TunnelEncapsulation + } + return nil +} + +func (x *BgpAttributes) GetMpReach() *BgpAttributesMpReachNlri { + if x != nil { + return x.MpReach + } + return nil +} + +func (x *BgpAttributes) GetMpUnreach() *BgpAttributesMpUnreachNlri { + if x != nil { + return x.MpUnreach + } + return nil +} + +// One unknown attribute stored as hex bytes. +type BgpAttributesOtherAttribute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The globally unique name of the IPv4 interface connected to the DUT. This name must - // match the name field of the ipv4_addresses on top which this RSVP interface is configured. - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - // required = true - Ipv4Name *string `protobuf:"bytes,1,opt,name=ipv4_name,json=ipv4Name,proto3,oneof" json:"ipv4_name,omitempty"` - // IPv4 address of the RSVP neighbor on this interface. - // required = true - NeighborIp *string `protobuf:"bytes,2,opt,name=neighbor_ip,json=neighborIp,proto3,oneof" json:"neighbor_ip,omitempty"` - // The user-defined label space start value. The LSPs for which this router acts as - // a egress are assigned labels from this label pool.Thelabel_space_start and label_space_end - // together defines this label-pool. - // default = 1000 - LabelSpaceStart *uint32 `protobuf:"varint,3,opt,name=label_space_start,json=labelSpaceStart,proto3,oneof" json:"label_space_start,omitempty"` - // The user-defined label space end value.The last label value that can be assigned - // to the LSPs for which this router acts as egress. - // default = 100000 - LabelSpaceEnd *uint32 `protobuf:"varint,4,opt,name=label_space_end,json=labelSpaceEnd,proto3,oneof" json:"label_space_end,omitempty"` - // Enables sending of Refresh Reduction as described in RFC2961. + // Optional flag in the BGP attribute. // default = False - EnableRefreshReduction *bool `protobuf:"varint,5,opt,name=enable_refresh_reduction,json=enableRefreshReduction,proto3,oneof" json:"enable_refresh_reduction,omitempty"` - // The number of seconds between transmissions of successive Summary Refreshes. There - // is no specification specified maximum value. For clarity, setting the maximum to - // 1 hour. - // default = 30 - SummaryRefreshInterval *uint32 `protobuf:"varint,6,opt,name=summary_refresh_interval,json=summaryRefreshInterval,proto3,oneof" json:"summary_refresh_interval,omitempty"` - // Enables aggregration of different RSVP messages within a single PDU. + FlagOptional *bool `protobuf:"varint,1,opt,name=flag_optional,json=flagOptional,proto3,oneof" json:"flag_optional,omitempty"` + // Transitive flag in the BGP attribute. // default = False - SendBundle *bool `protobuf:"varint,7,opt,name=send_bundle,json=sendBundle,proto3,oneof" json:"send_bundle,omitempty"` - // The number of milliseconds to wait after which RSVP will bundle different RSVP messages - // and transmit Bundle messages. - // default = 50 - BundleThreshold *uint32 `protobuf:"varint,8,opt,name=bundle_threshold,json=bundleThreshold,proto3,oneof" json:"bundle_threshold,omitempty"` - // Enables sending of Hello Messages as per RFC3209. + FlagTransitive *bool `protobuf:"varint,2,opt,name=flag_transitive,json=flagTransitive,proto3,oneof" json:"flag_transitive,omitempty"` + // Partial flag in the BGP attribute. // default = False - EnableHello *bool `protobuf:"varint,9,opt,name=enable_hello,json=enableHello,proto3,oneof" json:"enable_hello,omitempty"` - // If enable_hello is set to 'true', this specifies the minimum hello interval in seconds - // at which successive Hello Messages are sent as per RFC3209. There is no specification - // specified maximum value. For clarity, setting the maximum to 1 hour. - // default = 9 - HelloInterval *uint32 `protobuf:"varint,10,opt,name=hello_interval,json=helloInterval,proto3,oneof" json:"hello_interval,omitempty"` - // The number of missed hellos after which the node should consider RSVP Neighbor to - // have timed out. There is no specification specified maximum value. Setting the maximum - // allowed value to 10. - // default = 3 - TimeoutMultiplier *uint32 `protobuf:"varint,11,opt,name=timeout_multiplier,json=timeoutMultiplier,proto3,oneof" json:"timeout_multiplier,omitempty"` + FlagPartial *bool `protobuf:"varint,3,opt,name=flag_partial,json=flagPartial,proto3,oneof" json:"flag_partial,omitempty"` + // Extended length flag in the BGP attribute. + // default = False + FlagExtendedLength *bool `protobuf:"varint,4,opt,name=flag_extended_length,json=flagExtendedLength,proto3,oneof" json:"flag_extended_length,omitempty"` + // The value of the Type field in the attribute. + // required = true + Type *uint32 `protobuf:"varint,5,opt,name=type,proto3,oneof" json:"type,omitempty"` + // Contents of the value field ( the contents after the initial two bytes containing + // the Flags and Type field ) of the attribute in hex bytes. + // It includes the contents of length of the extended length field if included. + // required = true + RawValue *string `protobuf:"bytes,6,opt,name=raw_value,json=rawValue,proto3,oneof" json:"raw_value,omitempty"` } -func (x *RsvpIpv4Interface) Reset() { - *x = RsvpIpv4Interface{} +func (x *BgpAttributesOtherAttribute) Reset() { + *x = BgpAttributesOtherAttribute{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[176] + mi := &file_otg_proto_msgTypes[172] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RsvpIpv4Interface) String() string { +func (x *BgpAttributesOtherAttribute) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpIpv4Interface) ProtoMessage() {} +func (*BgpAttributesOtherAttribute) ProtoMessage() {} -func (x *RsvpIpv4Interface) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[176] +func (x *BgpAttributesOtherAttribute) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[172] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -37851,132 +39930,96 @@ func (x *RsvpIpv4Interface) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpIpv4Interface.ProtoReflect.Descriptor instead. -func (*RsvpIpv4Interface) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{176} -} - -func (x *RsvpIpv4Interface) GetIpv4Name() string { - if x != nil && x.Ipv4Name != nil { - return *x.Ipv4Name - } - return "" -} - -func (x *RsvpIpv4Interface) GetNeighborIp() string { - if x != nil && x.NeighborIp != nil { - return *x.NeighborIp - } - return "" -} - -func (x *RsvpIpv4Interface) GetLabelSpaceStart() uint32 { - if x != nil && x.LabelSpaceStart != nil { - return *x.LabelSpaceStart - } - return 0 -} - -func (x *RsvpIpv4Interface) GetLabelSpaceEnd() uint32 { - if x != nil && x.LabelSpaceEnd != nil { - return *x.LabelSpaceEnd - } - return 0 +// Deprecated: Use BgpAttributesOtherAttribute.ProtoReflect.Descriptor instead. +func (*BgpAttributesOtherAttribute) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{172} } -func (x *RsvpIpv4Interface) GetEnableRefreshReduction() bool { - if x != nil && x.EnableRefreshReduction != nil { - return *x.EnableRefreshReduction +func (x *BgpAttributesOtherAttribute) GetFlagOptional() bool { + if x != nil && x.FlagOptional != nil { + return *x.FlagOptional } return false } -func (x *RsvpIpv4Interface) GetSummaryRefreshInterval() uint32 { - if x != nil && x.SummaryRefreshInterval != nil { - return *x.SummaryRefreshInterval - } - return 0 -} - -func (x *RsvpIpv4Interface) GetSendBundle() bool { - if x != nil && x.SendBundle != nil { - return *x.SendBundle +func (x *BgpAttributesOtherAttribute) GetFlagTransitive() bool { + if x != nil && x.FlagTransitive != nil { + return *x.FlagTransitive } return false } -func (x *RsvpIpv4Interface) GetBundleThreshold() uint32 { - if x != nil && x.BundleThreshold != nil { - return *x.BundleThreshold +func (x *BgpAttributesOtherAttribute) GetFlagPartial() bool { + if x != nil && x.FlagPartial != nil { + return *x.FlagPartial } - return 0 + return false } -func (x *RsvpIpv4Interface) GetEnableHello() bool { - if x != nil && x.EnableHello != nil { - return *x.EnableHello +func (x *BgpAttributesOtherAttribute) GetFlagExtendedLength() bool { + if x != nil && x.FlagExtendedLength != nil { + return *x.FlagExtendedLength } return false } -func (x *RsvpIpv4Interface) GetHelloInterval() uint32 { - if x != nil && x.HelloInterval != nil { - return *x.HelloInterval +func (x *BgpAttributesOtherAttribute) GetType() uint32 { + if x != nil && x.Type != nil { + return *x.Type } return 0 } -func (x *RsvpIpv4Interface) GetTimeoutMultiplier() uint32 { - if x != nil && x.TimeoutMultiplier != nil { - return *x.TimeoutMultiplier +func (x *BgpAttributesOtherAttribute) GetRawValue() string { + if x != nil && x.RawValue != nil { + return *x.RawValue } - return 0 + return "" } -// Configuration for RSVP LSP IPv4 Interface. -type RsvpLspIpv4Interface struct { +// The AS_PATH attribute identifies the autonomous systems through which routing information +// carried in this UPDATE message has passed. +// This contains the configuration of how to include the Local AS in the AS path +// attribute of the MP REACH NLRI. It also contains optional configuration of +// additional AS Path Segments that can be included in the AS Path attribute. +// The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that +// a routing information passes through to reach the destination. +// There are two modes in which AS numbers can be encoded in the AS Path Segments +// - When the AS Path is being exchanged between old and new BGP speakers or between +// two old BGP speakers , the AS numbers are encoded as 2 byte values. +// - When the AS Path is being exchanged between two new BGP speakers supporting 4 byte +// AS , the AS numbers are encoded as 4 byte values. +type BgpAttributesAsPath struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The globally unique name of the IPv4 or Loopback IPv4 interface acting as the RSVP - // ingress and egress endpoint for the LSPs configured on this interface. This must - // match the name field of either ipv4_addresses or ipv4_loopbacks on which this LSP - // interface is configured. - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv4Loopback/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv4Loopback/properties/name - // - // required = true - Ipv4Name *string `protobuf:"bytes,1,opt,name=ipv4_name,json=ipv4Name,proto3,oneof" json:"ipv4_name,omitempty"` - // Contains properties of Tail(Egress) LSPs. - P2PEgressIpv4Lsps *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp `protobuf:"bytes,2,opt,name=p2p_egress_ipv4_lsps,json=p2pEgressIpv4Lsps,proto3" json:"p2p_egress_ipv4_lsps,omitempty"` - // Array of point-to-point RSVP-TE P2P LSPs originating from this interface. - P2PIngressIpv4Lsps []*RsvpLspIpv4InterfaceP2PIngressIpv4Lsp `protobuf:"bytes,3,rep,name=p2p_ingress_ipv4_lsps,json=p2pIngressIpv4Lsps,proto3" json:"p2p_ingress_ipv4_lsps,omitempty"` + // Description missing in models + // default = Choice.Enum.four_byte_as_path + Choice *BgpAttributesAsPath_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpAttributesAsPath_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + FourByteAsPath *BgpAttributesAsPathFourByteAsPath `protobuf:"bytes,2,opt,name=four_byte_as_path,json=fourByteAsPath,proto3" json:"four_byte_as_path,omitempty"` + // Description missing in models + TwoByteAsPath *BgpAttributesAsPathTwoByteAsPath `protobuf:"bytes,3,opt,name=two_byte_as_path,json=twoByteAsPath,proto3" json:"two_byte_as_path,omitempty"` } -func (x *RsvpLspIpv4Interface) Reset() { - *x = RsvpLspIpv4Interface{} +func (x *BgpAttributesAsPath) Reset() { + *x = BgpAttributesAsPath{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[177] + mi := &file_otg_proto_msgTypes[173] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RsvpLspIpv4Interface) String() string { +func (x *BgpAttributesAsPath) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpLspIpv4Interface) ProtoMessage() {} +func (*BgpAttributesAsPath) ProtoMessage() {} -func (x *RsvpLspIpv4Interface) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[177] +func (x *BgpAttributesAsPath) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[173] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -37987,88 +40030,62 @@ func (x *RsvpLspIpv4Interface) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpLspIpv4Interface.ProtoReflect.Descriptor instead. -func (*RsvpLspIpv4Interface) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{177} +// Deprecated: Use BgpAttributesAsPath.ProtoReflect.Descriptor instead. +func (*BgpAttributesAsPath) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{173} } -func (x *RsvpLspIpv4Interface) GetIpv4Name() string { - if x != nil && x.Ipv4Name != nil { - return *x.Ipv4Name +func (x *BgpAttributesAsPath) GetChoice() BgpAttributesAsPath_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return BgpAttributesAsPath_Choice_unspecified } -func (x *RsvpLspIpv4Interface) GetP2PEgressIpv4Lsps() *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp { +func (x *BgpAttributesAsPath) GetFourByteAsPath() *BgpAttributesAsPathFourByteAsPath { if x != nil { - return x.P2PEgressIpv4Lsps + return x.FourByteAsPath } return nil } -func (x *RsvpLspIpv4Interface) GetP2PIngressIpv4Lsps() []*RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { +func (x *BgpAttributesAsPath) GetTwoByteAsPath() *BgpAttributesAsPathTwoByteAsPath { if x != nil { - return x.P2PIngressIpv4Lsps + return x.TwoByteAsPath } return nil } -// Configuration for RSVP Egress Point-to-Point(P2P) IPv4 LSPs. -type RsvpLspIpv4InterfaceP2PEgressIpv4Lsp struct { +// AS Paths with 4 byte AS numbers can be exchanged only if both BGP speakers support +// 4 byte AS number extensions. +type BgpAttributesAsPathFourByteAsPath struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // The time in seconds between successive transmissions of RESV Refreshes. The actual - // refresh interval is jittered by upto 50%. There is no specification specified maximum - // value. For clarity, setting the maximum to 1 hour. - // default = 30 - RefreshInterval *uint32 `protobuf:"varint,2,opt,name=refresh_interval,json=refreshInterval,proto3,oneof" json:"refresh_interval,omitempty"` - // The number of missed PATH refreshes after which a recieving node should consider - // the LSP state to have timed out. There is no specification specified maximum value. - // Setting the maximum allowed value to 10. - // default = 3 - TimeoutMultiplier *uint32 `protobuf:"varint,3,opt,name=timeout_multiplier,json=timeoutMultiplier,proto3,oneof" json:"timeout_multiplier,omitempty"` - // It determines how RSVP-TE enabled network devices set up reservations along the path - // between an end-to-end QOS-enabled connection. If 'auto' is enabled, the style is - // chosen based on whether the incoming Path has 'SE Desired' flag set. Otherwise, the - // style is chosen based on the value selected for this attribute. - // default = ReservationStyle.Enum.shared_explicit - ReservationStyle *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum `protobuf:"varint,4,opt,name=reservation_style,json=reservationStyle,proto3,enum=otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum,oneof" json:"reservation_style,omitempty"` - // If enabled, a specific fixed label will be advertised by the egress or tail end for - // all Path messages received by this egress. This can be leveraged to advertise Explicit - // or Implicit null labels. - // default = False - EnableFixedLabel *bool `protobuf:"varint,5,opt,name=enable_fixed_label,json=enableFixedLabel,proto3,oneof" json:"enable_fixed_label,omitempty"` - // The fixed label value as advertised by egress in RESV message. Applicable only if - // 'fixed_label' is set to 'true'. Special values are '0 - IPv4 Explicit NULL', '2 - - // IPv6 Explicit NULL' and '3 - Implicit NULL'. Outside of this, labels are expected - // to have a minimum value of 16. - // default = 0 - FixedLabelValue *uint32 `protobuf:"varint,6,opt,name=fixed_label_value,json=fixedLabelValue,proto3,oneof" json:"fixed_label_value,omitempty"` + // The AS path segments containing 4 byte AS numbers to be added in the AS Path attribute. + // By default, an empty AS path should always be included and for EBGP at minimum the + // local AS number should be present in the AS Path. + Segments []*BgpAttributesFourByteAsPathSegment `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"` } -func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) Reset() { - *x = RsvpLspIpv4InterfaceP2PEgressIpv4Lsp{} +func (x *BgpAttributesAsPathFourByteAsPath) Reset() { + *x = BgpAttributesAsPathFourByteAsPath{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[178] + mi := &file_otg_proto_msgTypes[174] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) String() string { +func (x *BgpAttributesAsPathFourByteAsPath) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) ProtoMessage() {} +func (*BgpAttributesAsPathFourByteAsPath) ProtoMessage() {} -func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[178] +func (x *BgpAttributesAsPathFourByteAsPath) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[174] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -38079,134 +40096,118 @@ func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.ProtoReflect.Descriptor instead. -func (*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{178} +// Deprecated: Use BgpAttributesAsPathFourByteAsPath.ProtoReflect.Descriptor instead. +func (*BgpAttributesAsPathFourByteAsPath) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{174} } -func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *BgpAttributesAsPathFourByteAsPath) GetSegments() []*BgpAttributesFourByteAsPathSegment { + if x != nil { + return x.Segments } - return "" + return nil } -func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) GetRefreshInterval() uint32 { - if x != nil && x.RefreshInterval != nil { - return *x.RefreshInterval - } - return 0 +// Configuration for a single BGP AS path segment containing 4 byte AS numbers. +type BgpAttributesFourByteAsPathSegment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // AS sequence is the most common type of AS_PATH, it contains the list + // of ASNs starting with the most recent ASN being added read from left + // to right. + // The other three AS_PATH types are used for Confederations + // - AS_SET is the type of AS_PATH attribute that summarizes routes using + // using the aggregate-address command, allowing AS_PATHs to be summarized + // in the update as well. + // - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most + // recent ASN to be added reading left to right + // - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent + // in BGP Updates. + // default = Type.Enum.as_seq + Type *BgpAttributesFourByteAsPathSegment_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.BgpAttributesFourByteAsPathSegment_Type_Enum,oneof" json:"type,omitempty"` + // The 4 byte AS numbers in this AS path segment. + AsNumbers []uint32 `protobuf:"varint,2,rep,packed,name=as_numbers,json=asNumbers,proto3" json:"as_numbers,omitempty"` } -func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) GetTimeoutMultiplier() uint32 { - if x != nil && x.TimeoutMultiplier != nil { - return *x.TimeoutMultiplier +func (x *BgpAttributesFourByteAsPathSegment) Reset() { + *x = BgpAttributesFourByteAsPathSegment{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[175] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) GetReservationStyle() RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum { - if x != nil && x.ReservationStyle != nil { - return *x.ReservationStyle +func (x *BgpAttributesFourByteAsPathSegment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpAttributesFourByteAsPathSegment) ProtoMessage() {} + +func (x *BgpAttributesFourByteAsPathSegment) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[175] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_unspecified + return mi.MessageOf(x) } -func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) GetEnableFixedLabel() bool { - if x != nil && x.EnableFixedLabel != nil { - return *x.EnableFixedLabel +// Deprecated: Use BgpAttributesFourByteAsPathSegment.ProtoReflect.Descriptor instead. +func (*BgpAttributesFourByteAsPathSegment) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{175} +} + +func (x *BgpAttributesFourByteAsPathSegment) GetType() BgpAttributesFourByteAsPathSegment_Type_Enum { + if x != nil && x.Type != nil { + return *x.Type } - return false + return BgpAttributesFourByteAsPathSegment_Type_unspecified } -func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) GetFixedLabelValue() uint32 { - if x != nil && x.FixedLabelValue != nil { - return *x.FixedLabelValue +func (x *BgpAttributesFourByteAsPathSegment) GetAsNumbers() []uint32 { + if x != nil { + return x.AsNumbers } - return 0 + return nil } -// Configuration for an RSVP Ingress point-to-point LSP. -type RsvpLspIpv4InterfaceP2PIngressIpv4Lsp struct { +// AS Paths with 2 byte AS numbers is used when any of the two scenarios occur : +// - An old BGP speaker and new BGP speaker are sending BGP Updates to one another. +// - Two old BGP speakers are sending BGP Updates to one another. +type BgpAttributesAsPathTwoByteAsPath struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // IPv4 address of the remote endpoint of the LSP. - // required = true - RemoteAddress *string `protobuf:"bytes,2,opt,name=remote_address,json=remoteAddress,proto3,oneof" json:"remote_address,omitempty"` - // The Tunnel ID of the RSVP LSP. Carried in the SESSION object in Path Messages. - // default = 1 - TunnelId *uint32 `protobuf:"varint,3,opt,name=tunnel_id,json=tunnelId,proto3,oneof" json:"tunnel_id,omitempty"` - // The LSP ID of the RSVP LSP. Carried in the SENDER_TEMPLATE object in Path Messages. - // default = 1 - LspId *uint32 `protobuf:"varint,4,opt,name=lsp_id,json=lspId,proto3,oneof" json:"lsp_id,omitempty"` - // The time in seconds between successive transmissions of PATH Refreshes. The actual - // refresh interval is jittered by upto 50%. There is no specification specified maximum - // value. For clarity, setting the maximum to 1 hour. - // default = 30 - RefreshInterval *uint32 `protobuf:"varint,5,opt,name=refresh_interval,json=refreshInterval,proto3,oneof" json:"refresh_interval,omitempty"` - // The number of missed RESV refreshes after which a recieving node should consider - // the LSP state to have timed out. There is no specification specified maximum value. - // Setting the maximum allowed value to 10. - // default = 3 - TimeoutMultiplier *uint32 `protobuf:"varint,6,opt,name=timeout_multiplier,json=timeoutMultiplier,proto3,oneof" json:"timeout_multiplier,omitempty"` - // The LSP id that will be used when creating a Make-Before-Break LSP when the active - // LSP is using lsp_id. If the active LSP on which Make-Before-Break is being done is - // using the backup_lsp_id, the new LSP created will toggle to use the lsp_id instead. - // default = 2 - BackupLspId *uint32 `protobuf:"varint,7,opt,name=backup_lsp_id,json=backupLspId,proto3,oneof" json:"backup_lsp_id,omitempty"` - // The amount of delay in milliseconds that an implementation should wait for before - // switching traffic to the new LSP created after a Make-Before-Break is done on an - // LSP. The default value is 0 which means to switch immediately. An implementation - // should support a minimum delay value of at least 50ms . There is no specification - // specified maximum value. Setting maximum allowed value to 1 minute. If a delay value - // is supplied which is lesser than the minimum delay value supported, a warning should - // be provided indicating that the minimum value of LSP switchover delay is automatically - // increased to the supported minimum value. This warning should be included in the - // list of warnings in the 'Response.Warning' attribute sent in the SetConfig 'Success' - // Response. - // default = 0 - LspSwitchoverDelay *uint32 `protobuf:"varint,8,opt,name=lsp_switchover_delay,json=lspSwitchoverDelay,proto3,oneof" json:"lsp_switchover_delay,omitempty"` - // This contains the values of the fields to be included in the SESSION_ATTRIBUTE object - // in the Path Message sent for the LSP. - SessionAttribute *RsvpSessionAttribute `protobuf:"bytes,9,opt,name=session_attribute,json=sessionAttribute,proto3" json:"session_attribute,omitempty"` - // This contains the values of the fields to be included in the TSPEC object in the - // Path Message sent for the LSP. - Tspec *RsvpTspec `protobuf:"bytes,10,opt,name=tspec,proto3" json:"tspec,omitempty"` - // This contains the values of the fields to be included in the FAST_REROUTE object - // in the Path Message sent for the LSP. - // This is an optional object . If this attribute is not included , the FAST_REROUTE - // object will not be included. - FastReroute *RsvpFastReroute `protobuf:"bytes,11,opt,name=fast_reroute,json=fastReroute,proto3" json:"fast_reroute,omitempty"` - // This contains the values of the fields to be included in the ERO object in the Path - // Message sent for the LSP. - // This is an optional object . If this attribute is not included , the ERO object will - // not be included. - Ero *RsvpEro `protobuf:"bytes,12,opt,name=ero,proto3" json:"ero,omitempty"` + // The AS path segments containing 2 byte AS numbers to be added in the AS Path attribute. + // By default, an empty AS path should always be included and for EBGP the sender's + // AS number should be prepended to the AS Path. + Segments []*BgpAttributesTwoByteAsPathSegment `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"` } -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) Reset() { - *x = RsvpLspIpv4InterfaceP2PIngressIpv4Lsp{} +func (x *BgpAttributesAsPathTwoByteAsPath) Reset() { + *x = BgpAttributesAsPathTwoByteAsPath{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[179] + mi := &file_otg_proto_msgTypes[176] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) String() string { +func (x *BgpAttributesAsPathTwoByteAsPath) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) ProtoMessage() {} +func (*BgpAttributesAsPathTwoByteAsPath) ProtoMessage() {} -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[179] +func (x *BgpAttributesAsPathTwoByteAsPath) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[176] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -38217,177 +40218,195 @@ func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.ProtoReflect.Descriptor instead. -func (*RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{179} +// Deprecated: Use BgpAttributesAsPathTwoByteAsPath.ProtoReflect.Descriptor instead. +func (*BgpAttributesAsPathTwoByteAsPath) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{176} } -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *BgpAttributesAsPathTwoByteAsPath) GetSegments() []*BgpAttributesTwoByteAsPathSegment { + if x != nil { + return x.Segments } - return "" + return nil } -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetRemoteAddress() string { - if x != nil && x.RemoteAddress != nil { - return *x.RemoteAddress - } - return "" -} +// Configuration for a single BGP AS path segment containing 2 byte AS numbers. +type BgpAttributesTwoByteAsPathSegment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetTunnelId() uint32 { - if x != nil && x.TunnelId != nil { - return *x.TunnelId - } - return 0 + // AS sequence is the most common type of AS_PATH, it contains the list + // of ASNs starting with the most recent ASN being added read from left + // to right. + // The other three AS_PATH types are used for Confederations + // - AS_SET is the type of AS_PATH attribute that summarizes routes using + // using the aggregate-address command, allowing AS_PATHs to be summarized + // in the update as well. + // - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most + // recent ASN to be added reading left to right + // - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent + // in BGP Updates. + // default = Type.Enum.as_seq + Type *BgpAttributesTwoByteAsPathSegment_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.BgpAttributesTwoByteAsPathSegment_Type_Enum,oneof" json:"type,omitempty"` + // The 2 byte AS numbers in this AS path segment. + AsNumbers []uint32 `protobuf:"varint,2,rep,packed,name=as_numbers,json=asNumbers,proto3" json:"as_numbers,omitempty"` } -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetLspId() uint32 { - if x != nil && x.LspId != nil { - return *x.LspId +func (x *BgpAttributesTwoByteAsPathSegment) Reset() { + *x = BgpAttributesTwoByteAsPathSegment{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[177] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetRefreshInterval() uint32 { - if x != nil && x.RefreshInterval != nil { - return *x.RefreshInterval - } - return 0 +func (x *BgpAttributesTwoByteAsPathSegment) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetTimeoutMultiplier() uint32 { - if x != nil && x.TimeoutMultiplier != nil { - return *x.TimeoutMultiplier +func (*BgpAttributesTwoByteAsPathSegment) ProtoMessage() {} + +func (x *BgpAttributesTwoByteAsPathSegment) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[177] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetBackupLspId() uint32 { - if x != nil && x.BackupLspId != nil { - return *x.BackupLspId - } - return 0 +// Deprecated: Use BgpAttributesTwoByteAsPathSegment.ProtoReflect.Descriptor instead. +func (*BgpAttributesTwoByteAsPathSegment) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{177} } -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetLspSwitchoverDelay() uint32 { - if x != nil && x.LspSwitchoverDelay != nil { - return *x.LspSwitchoverDelay +func (x *BgpAttributesTwoByteAsPathSegment) GetType() BgpAttributesTwoByteAsPathSegment_Type_Enum { + if x != nil && x.Type != nil { + return *x.Type } - return 0 + return BgpAttributesTwoByteAsPathSegment_Type_unspecified } -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetSessionAttribute() *RsvpSessionAttribute { +func (x *BgpAttributesTwoByteAsPathSegment) GetAsNumbers() []uint32 { if x != nil { - return x.SessionAttribute + return x.AsNumbers } return nil } -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetTspec() *RsvpTspec { - if x != nil { - return x.Tspec +// The AS4_PATH attribute identifies the autonomous systems through which routing information +// carried in this UPDATE message has passed. +// This contains the configuration of how to include the Local AS in the AS path +// attribute of the MP REACH NLRI. It also contains optional configuration of +// additional AS Path Segments that can be included in the AS Path attribute. +// The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that +// a routing information passes through to reach the destination. +// AS4_PATH is only exchanged in two scenarios: +// - When an old BGP speaker has to forward a received AS4_PATH containing 4 byte AS +// numbers to new BGP speaker. +// - When a new BGP speaker is connected to an old BGP speaker and has to propagate +// 4 byte AS numbers via the old BGP speaker. +// Its usage is described in RFC4893. +type BgpAttributesAs4Path struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The AS path segments containing 4 byte AS numbers to be added in the AS4_PATH attribute. + Segments []*BgpAttributesFourByteAsPathSegment `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"` +} + +func (x *BgpAttributesAs4Path) Reset() { + *x = BgpAttributesAs4Path{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[178] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetFastReroute() *RsvpFastReroute { - if x != nil { - return x.FastReroute +func (x *BgpAttributesAs4Path) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpAttributesAs4Path) ProtoMessage() {} + +func (x *BgpAttributesAs4Path) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[178] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetEro() *RsvpEro { +// Deprecated: Use BgpAttributesAs4Path.ProtoReflect.Descriptor instead. +func (*BgpAttributesAs4Path) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{178} +} + +func (x *BgpAttributesAs4Path) GetSegments() []*BgpAttributesFourByteAsPathSegment { if x != nil { - return x.Ero + return x.Segments } return nil } -// Configuration for RSVP-TE SESSION_ATTRIBUTE object included in Path Messages as defined -// in RFC3209. The bandwidth_protection_desired and node_protection_desired flags are -// defined in RFC4090 (Fast Reroute). -type RsvpSessionAttribute struct { +// Optional AGGREGATOR attribute which maybe be added by a BGP speaker which performs +// route aggregation. +// When AGGREGATOR attribute is being sent to a new BGP speaker , the AS number is encoded +// as a 4 byte value. +// When AGGREGATOR attribute is being exchanged between a new and an old BGP speaker +// or between two old BGP speakers, +// the AS number is encoded as a 2 byte value. +// It contain the AS number and IP address of the speaker performing the aggregation. +type BgpAttributesAggregator struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // If this is enabled, an auto-generated Session Name is included in the SESSION_ATTRIBUTE - // object in the Path Message for this LSP. - // default = True - AutoGenerateSessionName *bool `protobuf:"varint,1,opt,name=auto_generate_session_name,json=autoGenerateSessionName,proto3,oneof" json:"auto_generate_session_name,omitempty"` - // If auto_generate_session_name is set to 'false', then the value of this field is - // used to fill the Session Name field of the SESSION_ATTRIBUTE object in the Path Message - // for this LSP. It is suggested to include the Local IP, Remote IP, Tunnel ID and LSP - // ID in the auto-generated Session Name to ensure uniqueness of the name in the test. - // The maximum length of session name is 254 bytes. - SessionName *string `protobuf:"bytes,2,opt,name=session_name,json=sessionName,proto3,oneof" json:"session_name,omitempty"` - // Specifies the value of the Setup Priority field. This controls whether the LSP should - // pre-empt existing LSP setup with certain Holding Priority if resource limitation - // is encountered when setting up the LSP. (e.g. bandwidth availability). The value - // 0 is the highest priority while 7 is the lowest. - // default = 7 - SetupPriority *uint32 `protobuf:"varint,3,opt,name=setup_priority,json=setupPriority,proto3,oneof" json:"setup_priority,omitempty"` - // Specifies the value of the Holding Priority field. This controls whether a new LSP - // being created with certain Setup Priority should pre-empt this LSP if resource limitation - // is encountered when setting up the LSP. (e.g. bandwidth availability). The value - // 0 is the highest priority while 7 is the lowest. - // default = 7 - HoldingPriority *uint32 `protobuf:"varint,4,opt,name=holding_priority,json=holdingPriority,proto3,oneof" json:"holding_priority,omitempty"` - // This flag permits transit routers to use a local repair mechanism which may result - // in violation of the explicit route object. When a fault is detected on an adjacent - // downstream link or node, a transit router can reroute traffic for fast service restoration. - // default = False - LocalProtectionDesired *bool `protobuf:"varint,5,opt,name=local_protection_desired,json=localProtectionDesired,proto3,oneof" json:"local_protection_desired,omitempty"` - // This flag indicates that label information should be included when doing a route - // record. - // default = False - LabelRecordingDesired *bool `protobuf:"varint,6,opt,name=label_recording_desired,json=labelRecordingDesired,proto3,oneof" json:"label_recording_desired,omitempty"` - // This flag indicates that the tunnel ingress node may choose to reroute this tunnel - // without tearing it down. A tunnel egress node SHOULD use the Shared Explicit(SE) - // Style when responding with a Resv message. - // default = False - SeStyleDesired *bool `protobuf:"varint,7,opt,name=se_style_desired,json=seStyleDesired,proto3,oneof" json:"se_style_desired,omitempty"` - // This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs - // along the protected LSP path that a backup path with a bandwidth guarantee is desired. - // This bandwidth has to be guaranteed for the protected LSP, if no FAST_REROUTE object - // is included in the PATH message. If a FAST_REROUTE object is present in the Path - // message, then the bandwidth specified therein is to be guaranteed. - // default = False - BandwidthProtectionDesired *bool `protobuf:"varint,8,opt,name=bandwidth_protection_desired,json=bandwidthProtectionDesired,proto3,oneof" json:"bandwidth_protection_desired,omitempty"` - // This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs - // along a protected LSP path that it is desired to have a backup path that bypasses - // at least the next node of the protected LSP. - // default = False - NodeProtectionDesired *bool `protobuf:"varint,9,opt,name=node_protection_desired,json=nodeProtectionDesired,proto3,oneof" json:"node_protection_desired,omitempty"` - // This is an optional object. If included the extended SESSION_ATTRIBUTE object is - // sent in the Path message containing - // the additional fields included in this object. This contains a set of three bitmaps - // using which further constraints can be - // set on the path calculated for the LSP based on the Admin Group settings in the IGP - // (e.g ISIS or OSPF interface). - ResourceAffinities *RsvpResourceAffinities `protobuf:"bytes,10,opt,name=resource_affinities,json=resourceAffinities,proto3" json:"resource_affinities,omitempty"` + // Description missing in models + // default = Choice.Enum.four_byte_as + Choice *BgpAttributesAggregator_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpAttributesAggregator_Choice_Enum,oneof" json:"choice,omitempty"` + // The value of the 4 byte AS number of the BGP speaker which aggregated the route. + // If the value of the AS number is less than 2 octets ( 65535 or less), the AS4_AGGREGATOR + // object should not be sent. + // default = 65536 + FourByteAs *uint32 `protobuf:"varint,2,opt,name=four_byte_as,json=fourByteAs,proto3,oneof" json:"four_byte_as,omitempty"` + // The value of the 2 byte AS number of the BGP speaker which aggregated the route. + // + // default = 1 + TwoByteAs *uint32 `protobuf:"varint,3,opt,name=two_byte_as,json=twoByteAs,proto3,oneof" json:"two_byte_as,omitempty"` + // The IPv4 address of the BGP speaker which aggregated the route. + // default = 0.0.0.0 + Ipv4Address *string `protobuf:"bytes,4,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` } -func (x *RsvpSessionAttribute) Reset() { - *x = RsvpSessionAttribute{} +func (x *BgpAttributesAggregator) Reset() { + *x = BgpAttributesAggregator{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[180] + mi := &file_otg_proto_msgTypes[179] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RsvpSessionAttribute) String() string { +func (x *BgpAttributesAggregator) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpSessionAttribute) ProtoMessage() {} +func (*BgpAttributesAggregator) ProtoMessage() {} -func (x *RsvpSessionAttribute) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[180] +func (x *BgpAttributesAggregator) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[179] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -38398,117 +40417,123 @@ func (x *RsvpSessionAttribute) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpSessionAttribute.ProtoReflect.Descriptor instead. -func (*RsvpSessionAttribute) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{180} +// Deprecated: Use BgpAttributesAggregator.ProtoReflect.Descriptor instead. +func (*BgpAttributesAggregator) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{179} } -func (x *RsvpSessionAttribute) GetAutoGenerateSessionName() bool { - if x != nil && x.AutoGenerateSessionName != nil { - return *x.AutoGenerateSessionName +func (x *BgpAttributesAggregator) GetChoice() BgpAttributesAggregator_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return false + return BgpAttributesAggregator_Choice_unspecified } -func (x *RsvpSessionAttribute) GetSessionName() string { - if x != nil && x.SessionName != nil { - return *x.SessionName +func (x *BgpAttributesAggregator) GetFourByteAs() uint32 { + if x != nil && x.FourByteAs != nil { + return *x.FourByteAs } - return "" + return 0 } -func (x *RsvpSessionAttribute) GetSetupPriority() uint32 { - if x != nil && x.SetupPriority != nil { - return *x.SetupPriority +func (x *BgpAttributesAggregator) GetTwoByteAs() uint32 { + if x != nil && x.TwoByteAs != nil { + return *x.TwoByteAs } return 0 } -func (x *RsvpSessionAttribute) GetHoldingPriority() uint32 { - if x != nil && x.HoldingPriority != nil { - return *x.HoldingPriority +func (x *BgpAttributesAggregator) GetIpv4Address() string { + if x != nil && x.Ipv4Address != nil { + return *x.Ipv4Address } - return 0 + return "" } -func (x *RsvpSessionAttribute) GetLocalProtectionDesired() bool { - if x != nil && x.LocalProtectionDesired != nil { - return *x.LocalProtectionDesired - } - return false +// Optional AS4_AGGREGATOR attribute which maybe be added by a BGP speaker in one of +// two cases: +// - If it is a new BGP speaker speaking to an old BGP speaker and needs to send a 4 +// byte value for the AS number of the BGP route aggregator. +// - If it is a old BGP speaker speaking to a new BGP speaker and has to transparently +// forward a received AS4_AGGREGATOR from some other peer. +// Its usage is described in RFC4893. +type BgpAttributesAs4Aggregator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The value of the 4 byte AS number of the BGP speaker which aggregated the route. + AsNum *uint32 `protobuf:"varint,1,opt,name=as_num,json=asNum,proto3,oneof" json:"as_num,omitempty"` + // The IPv4 address of the BGP speaker which aggregated the route. + // default = 0.0.0.0 + Ipv4Address *string `protobuf:"bytes,2,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` } -func (x *RsvpSessionAttribute) GetLabelRecordingDesired() bool { - if x != nil && x.LabelRecordingDesired != nil { - return *x.LabelRecordingDesired +func (x *BgpAttributesAs4Aggregator) Reset() { + *x = BgpAttributesAs4Aggregator{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[180] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return false } -func (x *RsvpSessionAttribute) GetSeStyleDesired() bool { - if x != nil && x.SeStyleDesired != nil { - return *x.SeStyleDesired - } - return false +func (x *BgpAttributesAs4Aggregator) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *RsvpSessionAttribute) GetBandwidthProtectionDesired() bool { - if x != nil && x.BandwidthProtectionDesired != nil { - return *x.BandwidthProtectionDesired +func (*BgpAttributesAs4Aggregator) ProtoMessage() {} + +func (x *BgpAttributesAs4Aggregator) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[180] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return false + return mi.MessageOf(x) } -func (x *RsvpSessionAttribute) GetNodeProtectionDesired() bool { - if x != nil && x.NodeProtectionDesired != nil { - return *x.NodeProtectionDesired +// Deprecated: Use BgpAttributesAs4Aggregator.ProtoReflect.Descriptor instead. +func (*BgpAttributesAs4Aggregator) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{180} +} + +func (x *BgpAttributesAs4Aggregator) GetAsNum() uint32 { + if x != nil && x.AsNum != nil { + return *x.AsNum } - return false + return 0 } -func (x *RsvpSessionAttribute) GetResourceAffinities() *RsvpResourceAffinities { - if x != nil { - return x.ResourceAffinities +func (x *BgpAttributesAs4Aggregator) GetIpv4Address() string { + if x != nil && x.Ipv4Address != nil { + return *x.Ipv4Address } - return nil + return "" } -// This is an optional object. If included, the extended SESSION_ATTRIBUTE object is -// sent in the Path message containing -// the additional fields included in this object. This contains a set of three bitmaps -// using which further constraints can be -// set on the path calculated for the LSP based on the Admin Group settings in the IGP -// (e.g ISIS or OSPF interface). -type RsvpResourceAffinities struct { +// The COMMUNITY attribute provide additional capability for tagging routes and for +// modifying BGP routing policy on +// upstream and downstream routers. BGP community is a 32-bit number which is broken +// into 16-bit AS number and a +// 16-bit custom value or it contains some pre-defined well known values. +type BgpAttributesCommunity struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // any of which renders a link unacceptable. A null set (all bits set to zero) doesn't - // render the link unacceptable. The most significant byte in the hex-string is the - // farthest to the left in the byte sequence. Leading zero bytes in the configured - // value may be omitted for brevity. - // default = 0 - ExcludeAny *string `protobuf:"bytes,1,opt,name=exclude_any,json=excludeAny,proto3,oneof" json:"exclude_any,omitempty"` - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // any of which renders a link acceptable. A null set (all bits set to zero) automatically - // passes. The most significant byte in the hex-string is the farthest to the left - // in the byte sequence. Leading zero bytes in the configured value may be omitted - // for brevity. - // default = 0 - IncludeAny *string `protobuf:"bytes,2,opt,name=include_any,json=includeAny,proto3,oneof" json:"include_any,omitempty"` - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // all of which must be present for a link to be acceptable. A null set (all bits set - // to zero) automatically passes. The most significant byte in the hex-string is the - // farthest to the left in the byte sequence. Leading zero bytes in the configured - // value may be omitted for brevity. - // default = 0 - IncludeAll *string `protobuf:"bytes,3,opt,name=include_all,json=includeAll,proto3,oneof" json:"include_all,omitempty"` + // The type of community AS number. + // required = true + Choice *BgpAttributesCommunity_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpAttributesCommunity_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + CustomCommunity *BgpAttributesCustomCommunity `protobuf:"bytes,2,opt,name=custom_community,json=customCommunity,proto3" json:"custom_community,omitempty"` } -func (x *RsvpResourceAffinities) Reset() { - *x = RsvpResourceAffinities{} +func (x *BgpAttributesCommunity) Reset() { + *x = BgpAttributesCommunity{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[181] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -38516,13 +40541,13 @@ func (x *RsvpResourceAffinities) Reset() { } } -func (x *RsvpResourceAffinities) String() string { +func (x *BgpAttributesCommunity) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpResourceAffinities) ProtoMessage() {} +func (*BgpAttributesCommunity) ProtoMessage() {} -func (x *RsvpResourceAffinities) ProtoReflect() protoreflect.Message { +func (x *BgpAttributesCommunity) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[181] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -38534,63 +40559,43 @@ func (x *RsvpResourceAffinities) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpResourceAffinities.ProtoReflect.Descriptor instead. -func (*RsvpResourceAffinities) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpAttributesCommunity.ProtoReflect.Descriptor instead. +func (*BgpAttributesCommunity) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{181} } -func (x *RsvpResourceAffinities) GetExcludeAny() string { - if x != nil && x.ExcludeAny != nil { - return *x.ExcludeAny - } - return "" -} - -func (x *RsvpResourceAffinities) GetIncludeAny() string { - if x != nil && x.IncludeAny != nil { - return *x.IncludeAny +func (x *BgpAttributesCommunity) GetChoice() BgpAttributesCommunity_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return BgpAttributesCommunity_Choice_unspecified } -func (x *RsvpResourceAffinities) GetIncludeAll() string { - if x != nil && x.IncludeAll != nil { - return *x.IncludeAll +func (x *BgpAttributesCommunity) GetCustomCommunity() *BgpAttributesCustomCommunity { + if x != nil { + return x.CustomCommunity } - return "" + return nil } -// Configuration for RSVP-TE TSPEC object included in Path Messages. The usage of these -// parameters is defined in RFC2215. -type RsvpTspec struct { +// User defined COMMUNITY attribute containing 2 byte AS and custom 2 byte value defined +// by the administrator of the domain. +type BgpAttributesCustomCommunity struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The rate of the traffic to be carried in this LSP in bytes per second. This is part - // of the Token Bucket specification defined for a traffic flow defined in RFC2215. - // default = 0 - TokenBucketRate *float32 `protobuf:"fixed32,1,opt,name=token_bucket_rate,json=tokenBucketRate,proto3,oneof" json:"token_bucket_rate,omitempty"` - // The depth of the token bucket in bytes used to specify the Token Bucket characteristics - // of the traffic to be carried in the LSP. This is part of the Token Bucket specification - // defined for a traffic flow defined in RFC2215. - // default = 0 - TokenBucketSize *float32 `protobuf:"fixed32,2,opt,name=token_bucket_size,json=tokenBucketSize,proto3,oneof" json:"token_bucket_size,omitempty"` - // The peak data rate of the traffic in bytes per second used to specify the Token Bucket - // characteristics of the traffic to be carried in the LSP. This is part of the Token - // Bucket specification defined for a traffic flow defined in RFC2215. - // default = 0 - PeakDataRate *float32 `protobuf:"fixed32,3,opt,name=peak_data_rate,json=peakDataRate,proto3,oneof" json:"peak_data_rate,omitempty"` - // Specifies the minium length of packet frames that will be policed. - // default = 0 - MinimumPolicedUnit *uint32 `protobuf:"varint,4,opt,name=minimum_policed_unit,json=minimumPolicedUnit,proto3,oneof" json:"minimum_policed_unit,omitempty"` - // Specifies the maximum length of packet frames that will be policed. + // First two octets of the community value containing a 2 byte AS number. // default = 0 - MaximumPolicedUnit *uint32 `protobuf:"varint,5,opt,name=maximum_policed_unit,json=maximumPolicedUnit,proto3,oneof" json:"maximum_policed_unit,omitempty"` + AsNumber *uint32 `protobuf:"varint,1,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` + // Last two octets of the community value in hex. If user provides less than 4 hex + // bytes, it should be left-padded with 0s. + // default = 0000 + Custom *string `protobuf:"bytes,2,opt,name=custom,proto3,oneof" json:"custom,omitempty"` } -func (x *RsvpTspec) Reset() { - *x = RsvpTspec{} +func (x *BgpAttributesCustomCommunity) Reset() { + *x = BgpAttributesCustomCommunity{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[182] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -38598,13 +40603,13 @@ func (x *RsvpTspec) Reset() { } } -func (x *RsvpTspec) String() string { +func (x *BgpAttributesCustomCommunity) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpTspec) ProtoMessage() {} +func (*BgpAttributesCustomCommunity) ProtoMessage() {} -func (x *RsvpTspec) ProtoReflect() protoreflect.Message { +func (x *BgpAttributesCustomCommunity) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[182] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -38616,104 +40621,47 @@ func (x *RsvpTspec) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpTspec.ProtoReflect.Descriptor instead. -func (*RsvpTspec) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpAttributesCustomCommunity.ProtoReflect.Descriptor instead. +func (*BgpAttributesCustomCommunity) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{182} } -func (x *RsvpTspec) GetTokenBucketRate() float32 { - if x != nil && x.TokenBucketRate != nil { - return *x.TokenBucketRate - } - return 0 -} - -func (x *RsvpTspec) GetTokenBucketSize() float32 { - if x != nil && x.TokenBucketSize != nil { - return *x.TokenBucketSize - } - return 0 -} - -func (x *RsvpTspec) GetPeakDataRate() float32 { - if x != nil && x.PeakDataRate != nil { - return *x.PeakDataRate - } - return 0 -} - -func (x *RsvpTspec) GetMinimumPolicedUnit() uint32 { - if x != nil && x.MinimumPolicedUnit != nil { - return *x.MinimumPolicedUnit +func (x *BgpAttributesCustomCommunity) GetAsNumber() uint32 { + if x != nil && x.AsNumber != nil { + return *x.AsNumber } return 0 } -func (x *RsvpTspec) GetMaximumPolicedUnit() uint32 { - if x != nil && x.MaximumPolicedUnit != nil { - return *x.MaximumPolicedUnit +func (x *BgpAttributesCustomCommunity) GetCustom() string { + if x != nil && x.Custom != nil { + return *x.Custom } - return 0 + return "" } -// Configuration for the optional RSVP-TE FAST_REROUTE object included in Path Messages -// as defined in RFC4090. -type RsvpFastReroute struct { +// Next hop to be sent inside MP_REACH NLRI or as the NEXT_HOP attribute if advertised +// as traditional NLRI. +type BgpAttributesNextHop struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Specifies the value of the Setup Priority field. This controls whether the backup - // LSP should pre-empt existing LSP that is setup with certain Holding Priority. While - // setting up a backup LSP, preemption of existing LSP can happen if resource limitation - // is encountered (e.g bandwidth availability). - // default = 7 - SetupPriority *uint32 `protobuf:"varint,1,opt,name=setup_priority,json=setupPriority,proto3,oneof" json:"setup_priority,omitempty"` - // Specifies the value of the Holding Priority field. This controls whether a new LSP - // being created with certain Setup Priority should pre-empt this LSP set up with this - // Holding Priority. While setting up a new LSP, preemption of existing LSP can happen - // if resource limitation is encountered (e.g bandwidth availability). - // default = 7 - HoldingPriority *uint32 `protobuf:"varint,2,opt,name=holding_priority,json=holdingPriority,proto3,oneof" json:"holding_priority,omitempty"` - // Specifies the value of the Hop Limit field. This controls the maximum number of hops - // the LSP should traverse to reach the LSP end-point. - // default = 3 - HopLimit *uint32 `protobuf:"varint,3,opt,name=hop_limit,json=hopLimit,proto3,oneof" json:"hop_limit,omitempty"` - // Specifies the value of the Bandwidth field as a 32-bit IEEE floating point integer, - // in bytes per second, as desired for the LSP. - // default = 0 - Bandwidth *float32 `protobuf:"fixed32,4,opt,name=bandwidth,proto3,oneof" json:"bandwidth,omitempty"` - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // any of which renders a link unacceptable. A null set (all bits set to zero) doesn't - // render the link unacceptable. The most significant byte in the hex-string is the - // farthest to the left in the byte sequence. Leading zero bytes in the configured - // value may be omitted for brevity. - // default = 0 - ExcludeAny *string `protobuf:"bytes,5,opt,name=exclude_any,json=excludeAny,proto3,oneof" json:"exclude_any,omitempty"` - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // any of which renders a link acceptable. A null set (all bits set to zero) automatically - // passes. The most significant byte in the hex-string is the farthest to the left - // in the byte sequence. Leading zero bytes in the configured value may be omitted - // for brevity. - // default = 0 - IncludeAny *string `protobuf:"bytes,6,opt,name=include_any,json=includeAny,proto3,oneof" json:"include_any,omitempty"` - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // all of which must be present for a link to be acceptable. A null set (all bits set - // to zero) automatically passes. The most significant byte in the hex-string is the - // farthest to the left in the byte sequence. Leading zero bytes in the configured - // value may be omitted for brevity. - // default = 0 - IncludeAll *string `protobuf:"bytes,7,opt,name=include_all,json=includeAll,proto3,oneof" json:"include_all,omitempty"` - // Requests protection via the one-to-one backup method. - // default = False - OneToOneBackupDesired *bool `protobuf:"varint,8,opt,name=one_to_one_backup_desired,json=oneToOneBackupDesired,proto3,oneof" json:"one_to_one_backup_desired,omitempty"` - // Requests protection via the facility backup method. - // default = False - FacilityBackupDesired *bool `protobuf:"varint,9,opt,name=facility_backup_desired,json=facilityBackupDesired,proto3,oneof" json:"facility_backup_desired,omitempty"` + // The type of the next HOP. + // required = true + Choice *BgpAttributesNextHop_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpAttributesNextHop_Choice_Enum,oneof" json:"choice,omitempty"` + // The 4 byte IPv4 address of the next-hop from which the route was received. + // default = 0.0.0.0 + Ipv4 *string `protobuf:"bytes,2,opt,name=ipv4,proto3,oneof" json:"ipv4,omitempty"` + // The 16 byte IPv6 address of the next-hop from which the route was received. + // default = 0::0 + Ipv6 *string `protobuf:"bytes,3,opt,name=ipv6,proto3,oneof" json:"ipv6,omitempty"` + // Description missing in models + Ipv6TwoAddresses *BgpAttributesNextHopIpv6TwoAddresses `protobuf:"bytes,4,opt,name=ipv6_two_addresses,json=ipv6TwoAddresses,proto3" json:"ipv6_two_addresses,omitempty"` } -func (x *RsvpFastReroute) Reset() { - *x = RsvpFastReroute{} +func (x *BgpAttributesNextHop) Reset() { + *x = BgpAttributesNextHop{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[183] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -38721,13 +40669,13 @@ func (x *RsvpFastReroute) Reset() { } } -func (x *RsvpFastReroute) String() string { +func (x *BgpAttributesNextHop) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpFastReroute) ProtoMessage() {} +func (*BgpAttributesNextHop) ProtoMessage() {} -func (x *RsvpFastReroute) ProtoReflect() protoreflect.Message { +func (x *BgpAttributesNextHop) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[183] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -38739,100 +40687,57 @@ func (x *RsvpFastReroute) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpFastReroute.ProtoReflect.Descriptor instead. -func (*RsvpFastReroute) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpAttributesNextHop.ProtoReflect.Descriptor instead. +func (*BgpAttributesNextHop) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{183} } -func (x *RsvpFastReroute) GetSetupPriority() uint32 { - if x != nil && x.SetupPriority != nil { - return *x.SetupPriority - } - return 0 -} - -func (x *RsvpFastReroute) GetHoldingPriority() uint32 { - if x != nil && x.HoldingPriority != nil { - return *x.HoldingPriority - } - return 0 -} - -func (x *RsvpFastReroute) GetHopLimit() uint32 { - if x != nil && x.HopLimit != nil { - return *x.HopLimit - } - return 0 -} - -func (x *RsvpFastReroute) GetBandwidth() float32 { - if x != nil && x.Bandwidth != nil { - return *x.Bandwidth - } - return 0 -} - -func (x *RsvpFastReroute) GetExcludeAny() string { - if x != nil && x.ExcludeAny != nil { - return *x.ExcludeAny +func (x *BgpAttributesNextHop) GetChoice() BgpAttributesNextHop_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return BgpAttributesNextHop_Choice_unspecified } -func (x *RsvpFastReroute) GetIncludeAny() string { - if x != nil && x.IncludeAny != nil { - return *x.IncludeAny +func (x *BgpAttributesNextHop) GetIpv4() string { + if x != nil && x.Ipv4 != nil { + return *x.Ipv4 } return "" } -func (x *RsvpFastReroute) GetIncludeAll() string { - if x != nil && x.IncludeAll != nil { - return *x.IncludeAll +func (x *BgpAttributesNextHop) GetIpv6() string { + if x != nil && x.Ipv6 != nil { + return *x.Ipv6 } return "" } -func (x *RsvpFastReroute) GetOneToOneBackupDesired() bool { - if x != nil && x.OneToOneBackupDesired != nil { - return *x.OneToOneBackupDesired - } - return false -} - -func (x *RsvpFastReroute) GetFacilityBackupDesired() bool { - if x != nil && x.FacilityBackupDesired != nil { - return *x.FacilityBackupDesired +func (x *BgpAttributesNextHop) GetIpv6TwoAddresses() *BgpAttributesNextHopIpv6TwoAddresses { + if x != nil { + return x.Ipv6TwoAddresses } - return false + return nil } -// Configuration for the optional RSVP-TE explicit route object(ERO) object included -// in Path Messages. -type RsvpEro struct { +// There is a specific scenario in which it is possible to receive a Global and Link +// Local address in the Next Hop +// field in a MP_REACH attribute or in the NEXT_HOP attribute(RFC2545: Section 3). +type BgpAttributesNextHopIpv6TwoAddresses struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Determines whether the IP address of the RSVP neighbor should be added as an ERO - // sub-object. If it is to be included, it can be included as a Loose hop or as a Strict - // hop. - // default = PrependNeighborIp.Enum.prepend_loose - PrependNeighborIp *RsvpEro_PrependNeighborIp_Enum `protobuf:"varint,1,opt,name=prepend_neighbor_ip,json=prependNeighborIp,proto3,enum=otg.RsvpEro_PrependNeighborIp_Enum,oneof" json:"prepend_neighbor_ip,omitempty"` - // If prepend_egress_ip is set to one of 'prepend_loose' or 'prepend_strict', then set - // this value as the prefix length of the ERO sub-object containing egress IP address. - // - // default = 32 - PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` - // Array of sub-objects to be included in the ERO. These sub-objects contain the intermediate - // hops to be traversed by the LSP while being forwarded towards the egress endpoint. - // These sub-objects are included after the optional sub-object containing IP address - // of egress endpoint of the LSP (when present). - Subobjects []*RsvpEroSubobject `protobuf:"bytes,3,rep,name=subobjects,proto3" json:"subobjects,omitempty"` + // The first IPv6 next hop in the 32 byte IPv6 Next Hop. + // default = 0::0 + First *string `protobuf:"bytes,1,opt,name=first,proto3,oneof" json:"first,omitempty"` + // The second IPv6 next hop in the 32 byte IPv6 Next Hop. + // default = 0::0 + Second *string `protobuf:"bytes,2,opt,name=second,proto3,oneof" json:"second,omitempty"` } -func (x *RsvpEro) Reset() { - *x = RsvpEro{} +func (x *BgpAttributesNextHopIpv6TwoAddresses) Reset() { + *x = BgpAttributesNextHopIpv6TwoAddresses{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[184] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -38840,13 +40745,13 @@ func (x *RsvpEro) Reset() { } } -func (x *RsvpEro) String() string { +func (x *BgpAttributesNextHopIpv6TwoAddresses) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpEro) ProtoMessage() {} +func (*BgpAttributesNextHopIpv6TwoAddresses) ProtoMessage() {} -func (x *RsvpEro) ProtoReflect() protoreflect.Message { +func (x *BgpAttributesNextHopIpv6TwoAddresses) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[184] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -38858,61 +40763,55 @@ func (x *RsvpEro) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpEro.ProtoReflect.Descriptor instead. -func (*RsvpEro) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpAttributesNextHopIpv6TwoAddresses.ProtoReflect.Descriptor instead. +func (*BgpAttributesNextHopIpv6TwoAddresses) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{184} } -func (x *RsvpEro) GetPrependNeighborIp() RsvpEro_PrependNeighborIp_Enum { - if x != nil && x.PrependNeighborIp != nil { - return *x.PrependNeighborIp - } - return RsvpEro_PrependNeighborIp_unspecified -} - -func (x *RsvpEro) GetPrefixLength() uint32 { - if x != nil && x.PrefixLength != nil { - return *x.PrefixLength +func (x *BgpAttributesNextHopIpv6TwoAddresses) GetFirst() string { + if x != nil && x.First != nil { + return *x.First } - return 0 + return "" } -func (x *RsvpEro) GetSubobjects() []*RsvpEroSubobject { - if x != nil { - return x.Subobjects +func (x *BgpAttributesNextHopIpv6TwoAddresses) GetSecond() string { + if x != nil && x.Second != nil { + return *x.Second } - return nil + return "" } -// Configuration for the ERO sub-object. -type RsvpEroSubobject struct { +// The MP_REACH attribute is an optional attribute which can be included in the attributes +// of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3. +// The following AFI / SAFI combinations are supported: +// - IPv4 Unicast with AFI as 1 and SAFI as 1 +// - IPv6 Unicast with AFI as 2 and SAFI as 1 +// - Segment Routing Policy for IPv4 Unicast with AFI as 1 and SAFI as 73 ( draft-ietf-idr-sr-policy-safi-02 +// Section 2.1 ) +// - Segment Routing Policy for IPv6 Unicast with AFI as 2 and SAFI as 73 +type BgpAttributesMpReachNlri struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The type of the ERO sub-object, one of IPv4 Address or AS Number. - // default = Type.Enum.ipv4 - Type *RsvpEroSubobject_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.RsvpEroSubobject_Type_Enum,oneof" json:"type,omitempty"` - // IPv4 address that this LSP should traverse through. This field is applicable only - // if the value of 'type' is set to 'ipv4'. - // default = 0.0.0.0 - Ipv4Address *string `protobuf:"bytes,2,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` - // Prefix length for the IPv4 address in the ERO sub-object. This field is applicable - // only if the value of 'type' is set to 'ipv4'. - // default = 32 - PrefixLength *uint32 `protobuf:"varint,3,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` - // Autonomous System number to be set in the ERO sub-object that this LSP should traverse - // through. This field is applicable only if the value of 'type' is set to 'as_number'. - // Note that as per RFC3209, 4-byte AS encoding is not supported. - // default = 0 - AsNumber *uint32 `protobuf:"varint,4,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` - // The hop type of the ERO sub-object, one of Strict or Loose. - // default = HopType.Enum.loose - HopType *RsvpEroSubobject_HopType_Enum `protobuf:"varint,5,opt,name=hop_type,json=hopType,proto3,enum=otg.RsvpEroSubobject_HopType_Enum,oneof" json:"hop_type,omitempty"` + // Description missing in models + NextHop *BgpAttributesNextHop `protobuf:"bytes,1,opt,name=next_hop,json=nextHop,proto3" json:"next_hop,omitempty"` + // The AFI and SAFI to be sent in the MPREACH_NLRI in the Update. + // required = true + Choice *BgpAttributesMpReachNlri_Choice_Enum `protobuf:"varint,2,opt,name=choice,proto3,enum=otg.BgpAttributesMpReachNlri_Choice_Enum,oneof" json:"choice,omitempty"` + // List of IPv4 prefixes being sent in the IPv4 Unicast MPREACH_NLRI . + Ipv4Unicast []*BgpOneIpv4NLRIPrefix `protobuf:"bytes,3,rep,name=ipv4_unicast,json=ipv4Unicast,proto3" json:"ipv4_unicast,omitempty"` + // List of IPv6 prefixes being sent in the IPv6 Unicast MPREACH_NLRI . + Ipv6Unicast []*BgpOneIpv6NLRIPrefix `protobuf:"bytes,4,rep,name=ipv6_unicast,json=ipv6Unicast,proto3" json:"ipv6_unicast,omitempty"` + // IPv4 endpoint with Segment Routing Policy being sent in the IPv4 MPREACH_NLRI . + Ipv4Srpolicy *BgpIpv4SrPolicyNLRIPrefix `protobuf:"bytes,5,opt,name=ipv4_srpolicy,json=ipv4Srpolicy,proto3" json:"ipv4_srpolicy,omitempty"` + // IPv6 endpoint with Segment Routing Policy being sent in the IPv6 MPREACH_NLRI . + Ipv6Srpolicy *BgpIpv6SrPolicyNLRIPrefix `protobuf:"bytes,6,opt,name=ipv6_srpolicy,json=ipv6Srpolicy,proto3" json:"ipv6_srpolicy,omitempty"` } -func (x *RsvpEroSubobject) Reset() { - *x = RsvpEroSubobject{} +func (x *BgpAttributesMpReachNlri) Reset() { + *x = BgpAttributesMpReachNlri{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[185] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -38920,13 +40819,13 @@ func (x *RsvpEroSubobject) Reset() { } } -func (x *RsvpEroSubobject) String() string { +func (x *BgpAttributesMpReachNlri) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpEroSubobject) ProtoMessage() {} +func (*BgpAttributesMpReachNlri) ProtoMessage() {} -func (x *RsvpEroSubobject) ProtoReflect() protoreflect.Message { +func (x *BgpAttributesMpReachNlri) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[185] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -38938,100 +40837,80 @@ func (x *RsvpEroSubobject) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpEroSubobject.ProtoReflect.Descriptor instead. -func (*RsvpEroSubobject) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpAttributesMpReachNlri.ProtoReflect.Descriptor instead. +func (*BgpAttributesMpReachNlri) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{185} } -func (x *RsvpEroSubobject) GetType() RsvpEroSubobject_Type_Enum { - if x != nil && x.Type != nil { - return *x.Type +func (x *BgpAttributesMpReachNlri) GetNextHop() *BgpAttributesNextHop { + if x != nil { + return x.NextHop } - return RsvpEroSubobject_Type_unspecified + return nil } -func (x *RsvpEroSubobject) GetIpv4Address() string { - if x != nil && x.Ipv4Address != nil { - return *x.Ipv4Address +func (x *BgpAttributesMpReachNlri) GetChoice() BgpAttributesMpReachNlri_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return BgpAttributesMpReachNlri_Choice_unspecified } -func (x *RsvpEroSubobject) GetPrefixLength() uint32 { - if x != nil && x.PrefixLength != nil { - return *x.PrefixLength +func (x *BgpAttributesMpReachNlri) GetIpv4Unicast() []*BgpOneIpv4NLRIPrefix { + if x != nil { + return x.Ipv4Unicast } - return 0 + return nil } -func (x *RsvpEroSubobject) GetAsNumber() uint32 { - if x != nil && x.AsNumber != nil { - return *x.AsNumber +func (x *BgpAttributesMpReachNlri) GetIpv6Unicast() []*BgpOneIpv6NLRIPrefix { + if x != nil { + return x.Ipv6Unicast } - return 0 + return nil } -func (x *RsvpEroSubobject) GetHopType() RsvpEroSubobject_HopType_Enum { - if x != nil && x.HopType != nil { - return *x.HopType +func (x *BgpAttributesMpReachNlri) GetIpv4Srpolicy() *BgpIpv4SrPolicyNLRIPrefix { + if x != nil { + return x.Ipv4Srpolicy } - return RsvpEroSubobject_HopType_unspecified + return nil } -// A high level data plane traffic flow. -type Flow struct { +func (x *BgpAttributesMpReachNlri) GetIpv6Srpolicy() *BgpIpv6SrPolicyNLRIPrefix { + if x != nil { + return x.Ipv6Srpolicy + } + return nil +} + +// The MP_UNREACH attribute is an optional attribute which can be included in the attributes +// of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3. +// The following AFI / SAFI combinations are supported: +// - IPv4 Unicast with AFI as 1 and SAFI as 1 +// - IPv6 Unicast with AFI as 2 and SAFI as 1 +// - Segment Routing Policy for IPv4 Unicast with AFI as 1 and SAFI as 73 (draft-ietf-idr-sr-policy-safi-02 +// Section 2.1) +// - Segment Routing Policy for IPv6 Unicast with AFI as 2 and SAFI as 73 +type BgpAttributesMpUnreachNlri struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The transmit and receive endpoints. - // required = true - TxRx *FlowTxRx `protobuf:"bytes,1,opt,name=tx_rx,json=txRx,proto3" json:"tx_rx,omitempty"` - // The list of protocol headers defining the shape of all - // intended packets in corresponding flow as it is transmitted - // by traffic-generator port. - // - // The order of protocol headers assigned to the list is the - // order they will appear on the wire. - // - // In the case of an empty list the keyword/value of minItems: 1 - // indicates that an implementation MUST provide at least one - // Flow.Header object. - // - // The default value for the Flow.Header choice property is ethernet - // which will result in an implementation by default providing at least - // one ethernet packet header. - Packet []*FlowHeader `protobuf:"bytes,2,rep,name=packet,proto3" json:"packet,omitempty"` - // Under Review: The packet header schema for egress tracking currently exposes unwanted - // fields. The query structure for tagged metrics inside flows metrics requires documenting - // expected response format. - // - // Under Review: The packet header schema for egress tracking currently exposes unwanted - // fields. The query structure for tagged metrics inside flows metrics requires documenting - // expected response format. - // - // The list of protocol headers defining the shape of all - // intended packets in corresponding flow as it is received - // by traffic-generator port. - // - // For all protocol headers, only the `metric_tags` property is configurable. - EgressPacket []*FlowHeader `protobuf:"bytes,9,rep,name=egress_packet,json=egressPacket,proto3" json:"egress_packet,omitempty"` - // The size of the packets. - Size *FlowSize `protobuf:"bytes,3,opt,name=size,proto3" json:"size,omitempty"` - // The transmit rate of the packets. - Rate *FlowRate `protobuf:"bytes,4,opt,name=rate,proto3" json:"rate,omitempty"` - // The transmit duration of the packets. - Duration *FlowDuration `protobuf:"bytes,5,opt,name=duration,proto3" json:"duration,omitempty"` - // Flow metrics. - Metrics *FlowMetrics `protobuf:"bytes,6,opt,name=metrics,proto3" json:"metrics,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,7,opt,name=name,proto3,oneof" json:"name,omitempty"` + // The AFI and SAFI to be sent in the MPUNREACH_NLRI in the Update. + Choice *BgpAttributesMpUnreachNlri_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpAttributesMpUnreachNlri_Choice_Enum,oneof" json:"choice,omitempty"` + // List of IPv4 prefixes being sent in the IPv4 Unicast MPUNREACH_NLRI . + Ipv4Unicast []*BgpOneIpv4NLRIPrefix `protobuf:"bytes,2,rep,name=ipv4_unicast,json=ipv4Unicast,proto3" json:"ipv4_unicast,omitempty"` + // List of IPv6 prefixes being sent in the IPv6 Unicast MPUNREACH_NLRI . + Ipv6Unicast []*BgpOneIpv6NLRIPrefix `protobuf:"bytes,3,rep,name=ipv6_unicast,json=ipv6Unicast,proto3" json:"ipv6_unicast,omitempty"` + // IPv4 endpoint with Segment Routing Policy being sent in the IPv4 MPUNREACH_NLRI . + Ipv4Srpolicy *BgpIpv4SrPolicyNLRIPrefix `protobuf:"bytes,4,opt,name=ipv4_srpolicy,json=ipv4Srpolicy,proto3" json:"ipv4_srpolicy,omitempty"` + // IPv6 endpoint with Segment Routing Policy being sent in the IPv4 MPUNREACH_NLRI . + Ipv6Srpolicy *BgpIpv6SrPolicyNLRIPrefix `protobuf:"bytes,5,opt,name=ipv6_srpolicy,json=ipv6Srpolicy,proto3" json:"ipv6_srpolicy,omitempty"` } -func (x *Flow) Reset() { - *x = Flow{} +func (x *BgpAttributesMpUnreachNlri) Reset() { + *x = BgpAttributesMpUnreachNlri{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[186] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -39039,13 +40918,13 @@ func (x *Flow) Reset() { } } -func (x *Flow) String() string { +func (x *BgpAttributesMpUnreachNlri) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Flow) ProtoMessage() {} +func (*BgpAttributesMpUnreachNlri) ProtoMessage() {} -func (x *Flow) ProtoReflect() protoreflect.Message { +func (x *BgpAttributesMpUnreachNlri) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[186] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -39057,85 +40936,61 @@ func (x *Flow) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Flow.ProtoReflect.Descriptor instead. -func (*Flow) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpAttributesMpUnreachNlri.ProtoReflect.Descriptor instead. +func (*BgpAttributesMpUnreachNlri) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{186} } -func (x *Flow) GetTxRx() *FlowTxRx { - if x != nil { - return x.TxRx - } - return nil -} - -func (x *Flow) GetPacket() []*FlowHeader { - if x != nil { - return x.Packet - } - return nil -} - -func (x *Flow) GetEgressPacket() []*FlowHeader { - if x != nil { - return x.EgressPacket +func (x *BgpAttributesMpUnreachNlri) GetChoice() BgpAttributesMpUnreachNlri_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return BgpAttributesMpUnreachNlri_Choice_unspecified } -func (x *Flow) GetSize() *FlowSize { +func (x *BgpAttributesMpUnreachNlri) GetIpv4Unicast() []*BgpOneIpv4NLRIPrefix { if x != nil { - return x.Size + return x.Ipv4Unicast } return nil } -func (x *Flow) GetRate() *FlowRate { +func (x *BgpAttributesMpUnreachNlri) GetIpv6Unicast() []*BgpOneIpv6NLRIPrefix { if x != nil { - return x.Rate + return x.Ipv6Unicast } return nil } -func (x *Flow) GetDuration() *FlowDuration { +func (x *BgpAttributesMpUnreachNlri) GetIpv4Srpolicy() *BgpIpv4SrPolicyNLRIPrefix { if x != nil { - return x.Duration + return x.Ipv4Srpolicy } return nil } -func (x *Flow) GetMetrics() *FlowMetrics { +func (x *BgpAttributesMpUnreachNlri) GetIpv6Srpolicy() *BgpIpv6SrPolicyNLRIPrefix { if x != nil { - return x.Metrics + return x.Ipv6Srpolicy } return nil } -func (x *Flow) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -// A container for different types of transmit and receive -// endpoint containers. -type FlowTxRx struct { +// Optional MULTI_EXIT_DISCRIMINATOR attribute sent to the peer to help in the route +// selection process. +type BgpAttributesMultiExitDiscriminator struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The type of transmit and receive container used by the flow. - // default = Choice.Enum.port - Choice *FlowTxRx_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowTxRx_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Port *FlowPort `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` - // Description missing in models - Device *FlowRouter `protobuf:"bytes,3,opt,name=device,proto3" json:"device,omitempty"` + // The multi exit discriminator (MED) value used for route selection sent to the peer. + // + // default = 0 + Value *uint32 `protobuf:"varint,1,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *FlowTxRx) Reset() { - *x = FlowTxRx{} +func (x *BgpAttributesMultiExitDiscriminator) Reset() { + *x = BgpAttributesMultiExitDiscriminator{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[187] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -39143,13 +40998,13 @@ func (x *FlowTxRx) Reset() { } } -func (x *FlowTxRx) String() string { +func (x *BgpAttributesMultiExitDiscriminator) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowTxRx) ProtoMessage() {} +func (*BgpAttributesMultiExitDiscriminator) ProtoMessage() {} -func (x *FlowTxRx) ProtoReflect() protoreflect.Message { +func (x *BgpAttributesMultiExitDiscriminator) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[187] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -39161,84 +41016,38 @@ func (x *FlowTxRx) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowTxRx.ProtoReflect.Descriptor instead. -func (*FlowTxRx) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpAttributesMultiExitDiscriminator.ProtoReflect.Descriptor instead. +func (*BgpAttributesMultiExitDiscriminator) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{187} } -func (x *FlowTxRx) GetChoice() FlowTxRx_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowTxRx_Choice_unspecified -} - -func (x *FlowTxRx) GetPort() *FlowPort { - if x != nil { - return x.Port - } - return nil -} - -func (x *FlowTxRx) GetDevice() *FlowRouter { - if x != nil { - return x.Device +func (x *BgpAttributesMultiExitDiscriminator) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } - return nil + return 0 } -// A container for a transmit port and 0..n intended receive ports. -// When assigning this container to a flow the flows's -// packet headers will not be populated with any address resolution -// information such as source and/or destination addresses. -// For example Flow.Ethernet dst mac address values will be defaulted to 0. -// For full control over the Flow.properties.packet header contents use this -// container. -type FlowPort struct { +// Optional LOCAL_PREFERENCE attribute sent to the peer to indicate the degree of preference +// +// for externally learned routes.This should be included only for internal peers.It +// is +// used for the selection of the path for the traffic leaving the AS.The route with +// the +// highest local preference value is preferred. +type BgpAttributesLocalPreference struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The unique name of a port that is the transmit port. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Lag/properties/name - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Lag/properties/name - // - // required = true - TxName *string `protobuf:"bytes,1,opt,name=tx_name,json=txName,proto3,oneof" json:"tx_name,omitempty"` - // Deprecated: This property is deprecated in favor of property rx_names - // - // Deprecated: This property is deprecated in favor of property rx_names - // - // The unique name of a port that is the intended receive port. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Lag/properties/name - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Lag/properties/name - RxName *string `protobuf:"bytes,2,opt,name=rx_name,json=rxName,proto3,oneof" json:"rx_name,omitempty"` - // Unique name of ports or lags that are intended receive endpoints. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Lag/properties/name - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Lag/properties/name - RxNames []string `protobuf:"bytes,3,rep,name=rx_names,json=rxNames,proto3" json:"rx_names,omitempty"` + // Value to be set in the LOCAL_PREFERENCE attribute The multi exit discriminator (MED) + // value used for route selection sent to the peer. + // default = 100 + Value *uint32 `protobuf:"varint,1,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *FlowPort) Reset() { - *x = FlowPort{} +func (x *BgpAttributesLocalPreference) Reset() { + *x = BgpAttributesLocalPreference{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[188] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -39246,13 +41055,13 @@ func (x *FlowPort) Reset() { } } -func (x *FlowPort) String() string { +func (x *BgpAttributesLocalPreference) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowPort) ProtoMessage() {} +func (*BgpAttributesLocalPreference) ProtoMessage() {} -func (x *FlowPort) ProtoReflect() protoreflect.Message { +func (x *BgpAttributesLocalPreference) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[188] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -39264,134 +41073,32 @@ func (x *FlowPort) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowPort.ProtoReflect.Descriptor instead. -func (*FlowPort) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpAttributesLocalPreference.ProtoReflect.Descriptor instead. +func (*BgpAttributesLocalPreference) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{188} } -func (x *FlowPort) GetTxName() string { - if x != nil && x.TxName != nil { - return *x.TxName - } - return "" -} - -func (x *FlowPort) GetRxName() string { - if x != nil && x.RxName != nil { - return *x.RxName - } - return "" -} - -func (x *FlowPort) GetRxNames() []string { - if x != nil { - return x.RxNames +func (x *BgpAttributesLocalPreference) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } - return nil + return 0 } -// A container for declaring a map of 1..n transmit devices to 1..n receive devices. -// This allows for a single flow to have different tx to rx device flows such as a -// single one to one map or a many to many map. -type FlowRouter struct { +// Optional ORIGINATOR_ID attribute (type code 9) carries the Router Id of the route's +// originator in the local AS. +type BgpAttributesOriginatorId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Determines the intent of creating traffic sub-flow(s) between the device - // endpoints, from the entities of tx_names to the entities of rx_names - // - // to derive how auto packet fields can be populated with - // the actual value(s) by the implementation. - // - // The one_to_one mode creates traffic sub-flow(s) between each device endpoint - // pair in - // tx_names to rx_names by index. - // The length of tx_names and rx_names MUST be the same. - // The same device name can be repeated multiple times in tx_names or rx_names, in any - // order to create desired meshing between device(s). - // For 2 values in tx_names and 2 values in rx_names, 2 device endpoint pairs would - // be generated (each pair representing a traffic sub-flow). - // - // The mesh mode creates traffic sub-flow(s) between each value in tx_names to - // every value in rx_names, forming the device endpoint pair(s). - // For 2 values in tx_names and 3 values in rx_names, generated device endpoint pairs - // would be 2x3=6. - // - // A generated device endpoint pair with same device endpoint name for both transmit - // & receive device endpoint MUST raise an error. - // - // Packet fields of type auto would be populated with one value for each device - // endpoint pair (representing the traffic sub-flow). - // The value would be determined considering transmit & receive device of the sub-flow. - // And the sequence of the populated value(s) - // would be in the order of generated device endpoint pair(s). - // If 2 device endpoint pairs are generated (based on mode, tx_names and rx_names), - // say (d1 to d3) and (d2 to d3), and ethernet.dst is set as auto, then - // the auto field would be replaced by the implementation with a sequence of - // 2 values, [v1,v2] where - // v1 is determined using context (d1,d3) and v2 using context (d2,d3). - // The final outcome is that packets generated on the wire will contain the values v1,v2,v1,... - // for ethernet.dst field. Any non-auto packet fields - // should be configured accordingly. For example, non-auto packet field ethernet.src - // can be configured with values [u1, u2], where - // u1 & u2 are source MAC of the connected interface of device d1 and d2 respectively. - // Then packets on the wire will contain correct value pairs - // (u1,v1),(u2,v2),(u1,v1),... for (ethernet.src,ethernet.dst) fields. - // default = Mode.Enum.mesh - Mode *FlowRouter_Mode_Enum `protobuf:"varint,1,opt,name=mode,proto3,enum=otg.FlowRouter_Mode_Enum,oneof" json:"mode,omitempty"` - // TBD - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Bgp.V4RouteRange/properties/name - // - /components/schemas/Bgp.V6RouteRange/properties/name - // - /components/schemas/Bgp.CMacIpRange/properties/name - // - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name - // - /components/schemas/Isis.V4RouteRange/properties/name - // - /components/schemas/Isis.V6RouteRange/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Bgp.V4RouteRange/properties/name - // - /components/schemas/Bgp.V6RouteRange/properties/name - // - /components/schemas/Bgp.CMacIpRange/properties/name - // - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name - // - /components/schemas/Isis.V4RouteRange/properties/name - // - /components/schemas/Isis.V6RouteRange/properties/name - TxNames []string `protobuf:"bytes,2,rep,name=tx_names,json=txNames,proto3" json:"tx_names,omitempty"` - // TBD - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Bgp.V4RouteRange/properties/name - // - /components/schemas/Bgp.V6RouteRange/properties/name - // - /components/schemas/Bgp.CMacIpRange/properties/name - // - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name - // - /components/schemas/Isis.V4RouteRange/properties/name - // - /components/schemas/Isis.V6RouteRange/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Bgp.V4RouteRange/properties/name - // - /components/schemas/Bgp.V6RouteRange/properties/name - // - /components/schemas/Bgp.CMacIpRange/properties/name - // - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name - // - /components/schemas/Isis.V4RouteRange/properties/name - // - /components/schemas/Isis.V6RouteRange/properties/name - RxNames []string `protobuf:"bytes,3,rep,name=rx_names,json=rxNames,proto3" json:"rx_names,omitempty"` + // The value of the originator's Router Id. + // default = 0.0.0.0 + Value *string `protobuf:"bytes,1,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *FlowRouter) Reset() { - *x = FlowRouter{} +func (x *BgpAttributesOriginatorId) Reset() { + *x = BgpAttributesOriginatorId{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[189] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -39399,13 +41106,13 @@ func (x *FlowRouter) Reset() { } } -func (x *FlowRouter) String() string { +func (x *BgpAttributesOriginatorId) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRouter) ProtoMessage() {} +func (*BgpAttributesOriginatorId) ProtoMessage() {} -func (x *FlowRouter) ProtoReflect() protoreflect.Message { +func (x *BgpAttributesOriginatorId) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[189] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -39417,88 +41124,36 @@ func (x *FlowRouter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRouter.ProtoReflect.Descriptor instead. -func (*FlowRouter) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpAttributesOriginatorId.ProtoReflect.Descriptor instead. +func (*BgpAttributesOriginatorId) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{189} } -func (x *FlowRouter) GetMode() FlowRouter_Mode_Enum { - if x != nil && x.Mode != nil { - return *x.Mode - } - return FlowRouter_Mode_unspecified -} - -func (x *FlowRouter) GetTxNames() []string { - if x != nil { - return x.TxNames - } - return nil -} - -func (x *FlowRouter) GetRxNames() []string { - if x != nil { - return x.RxNames +func (x *BgpAttributesOriginatorId) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } - return nil + return "" } -// Configuration for all traffic packet headers -type FlowHeader struct { +// The TUNNEL_ENCAPSULATION attribute is used by a BGP speaker to inform other BGP +// speakers how to encapsulate packets that need to be sent to it. +// It is defined in RFC9012 and is assigned a Type code of 23. +type BgpAttributesTunnelEncapsulation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The available types of flow headers. If one is not provided the - // default ethernet packet header MUST be provided. - // default = Choice.Enum.ethernet - Choice *FlowHeader_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowHeader_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Custom *FlowCustom `protobuf:"bytes,2,opt,name=custom,proto3" json:"custom,omitempty"` - // Description missing in models - Ethernet *FlowEthernet `protobuf:"bytes,3,opt,name=ethernet,proto3" json:"ethernet,omitempty"` - // Description missing in models - Vlan *FlowVlan `protobuf:"bytes,4,opt,name=vlan,proto3" json:"vlan,omitempty"` - // Description missing in models - Vxlan *FlowVxlan `protobuf:"bytes,5,opt,name=vxlan,proto3" json:"vxlan,omitempty"` - // Description missing in models - Ipv4 *FlowIpv4 `protobuf:"bytes,6,opt,name=ipv4,proto3" json:"ipv4,omitempty"` - // Description missing in models - Ipv6 *FlowIpv6 `protobuf:"bytes,7,opt,name=ipv6,proto3" json:"ipv6,omitempty"` - // Description missing in models - Pfcpause *FlowPfcPause `protobuf:"bytes,8,opt,name=pfcpause,proto3" json:"pfcpause,omitempty"` - // Description missing in models - Ethernetpause *FlowEthernetPause `protobuf:"bytes,9,opt,name=ethernetpause,proto3" json:"ethernetpause,omitempty"` - // Description missing in models - Tcp *FlowTcp `protobuf:"bytes,10,opt,name=tcp,proto3" json:"tcp,omitempty"` - // Description missing in models - Udp *FlowUdp `protobuf:"bytes,11,opt,name=udp,proto3" json:"udp,omitempty"` - // Description missing in models - Gre *FlowGre `protobuf:"bytes,12,opt,name=gre,proto3" json:"gre,omitempty"` - // Description missing in models - Gtpv1 *FlowGtpv1 `protobuf:"bytes,13,opt,name=gtpv1,proto3" json:"gtpv1,omitempty"` + // Identifies a type of tunnel. The field contains values from the IANA registry BGP + // Tunnel Encapsulation Attribute Tunnel Types. + // default = Choice.Enum.sr_policy + Choice *BgpAttributesTunnelEncapsulation_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpAttributesTunnelEncapsulation_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Gtpv2 *FlowGtpv2 `protobuf:"bytes,14,opt,name=gtpv2,proto3" json:"gtpv2,omitempty"` - // Description missing in models - Arp *FlowArp `protobuf:"bytes,15,opt,name=arp,proto3" json:"arp,omitempty"` - // Description missing in models - Icmp *FlowIcmp `protobuf:"bytes,16,opt,name=icmp,proto3" json:"icmp,omitempty"` - // Description missing in models - Icmpv6 *FlowIcmpv6 `protobuf:"bytes,17,opt,name=icmpv6,proto3" json:"icmpv6,omitempty"` - // Description missing in models - Ppp *FlowPpp `protobuf:"bytes,18,opt,name=ppp,proto3" json:"ppp,omitempty"` - // Description missing in models - Igmpv1 *FlowIgmpv1 `protobuf:"bytes,19,opt,name=igmpv1,proto3" json:"igmpv1,omitempty"` - // Description missing in models - Mpls *FlowMpls `protobuf:"bytes,20,opt,name=mpls,proto3" json:"mpls,omitempty"` - // Description missing in models - Snmpv2C *FlowSnmpv2C `protobuf:"bytes,21,opt,name=snmpv2c,proto3" json:"snmpv2c,omitempty"` - // Description missing in models - Rsvp *FlowRsvp `protobuf:"bytes,22,opt,name=rsvp,proto3" json:"rsvp,omitempty"` + SrPolicy *BgpAttributesSegmentRoutingPolicy `protobuf:"bytes,2,opt,name=sr_policy,json=srPolicy,proto3" json:"sr_policy,omitempty"` } -func (x *FlowHeader) Reset() { - *x = FlowHeader{} +func (x *BgpAttributesTunnelEncapsulation) Reset() { + *x = BgpAttributesTunnelEncapsulation{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[190] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -39506,13 +41161,13 @@ func (x *FlowHeader) Reset() { } } -func (x *FlowHeader) String() string { +func (x *BgpAttributesTunnelEncapsulation) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowHeader) ProtoMessage() {} +func (*BgpAttributesTunnelEncapsulation) ProtoMessage() {} -func (x *FlowHeader) ProtoReflect() protoreflect.Message { +func (x *BgpAttributesTunnelEncapsulation) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[190] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -39524,199 +41179,263 @@ func (x *FlowHeader) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowHeader.ProtoReflect.Descriptor instead. -func (*FlowHeader) Descriptor() ([]byte, []int) { +// Deprecated: Use BgpAttributesTunnelEncapsulation.ProtoReflect.Descriptor instead. +func (*BgpAttributesTunnelEncapsulation) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{190} } -func (x *FlowHeader) GetChoice() FlowHeader_Choice_Enum { +func (x *BgpAttributesTunnelEncapsulation) GetChoice() BgpAttributesTunnelEncapsulation_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return FlowHeader_Choice_unspecified + return BgpAttributesTunnelEncapsulation_Choice_unspecified } -func (x *FlowHeader) GetCustom() *FlowCustom { +func (x *BgpAttributesTunnelEncapsulation) GetSrPolicy() *BgpAttributesSegmentRoutingPolicy { if x != nil { - return x.Custom + return x.SrPolicy } return nil } -func (x *FlowHeader) GetEthernet() *FlowEthernet { - if x != nil { - return x.Ethernet - } - return nil +// Optional Segment Routing Policy information as defined in draft-ietf-idr-sr-policy-safi-02. +// This information is carried in TUNNEL_ENCAPSULATION attribute with type set to SR +// Policy (15). +type BgpAttributesSegmentRoutingPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description missing in models + BindingSegmentIdentifier *BgpAttributesBsid `protobuf:"bytes,1,opt,name=binding_segment_identifier,json=bindingSegmentIdentifier,proto3" json:"binding_segment_identifier,omitempty"` + // The SRv6 Binding SID sub-TLV is an optional sub-TLV of type 20 that is used to signal + // the SRv6 Binding SID + // related information of an SR Policy candidate path. + // - More than one SRv6 Binding SID sub-TLVs MAY be signaled in the same SR Policy + // encoding to indicate one + // or more SRv6 SIDs, each with potentially different SRv6 Endpoint Behaviors to + // be instantiated. + // - The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section + // 2.4.3 . + Srv6BindingSegmentIdentifier []*BgpAttributesSrv6Bsid `protobuf:"bytes,2,rep,name=srv6_binding_segment_identifier,json=srv6BindingSegmentIdentifier,proto3" json:"srv6_binding_segment_identifier,omitempty"` + // Description missing in models + Preference *BgpAttributesSrPolicyPreference `protobuf:"bytes,3,opt,name=preference,proto3" json:"preference,omitempty"` + // Description missing in models + Priority *BgpAttributesSrPolicyPriority `protobuf:"bytes,4,opt,name=priority,proto3" json:"priority,omitempty"` + // Description missing in models + PolicyName *BgpAttributesSrPolicyPolicyName `protobuf:"bytes,5,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` + // Description missing in models + PolicyCandidateName *BgpAttributesSrPolicyPolicyCandidateName `protobuf:"bytes,6,opt,name=policy_candidate_name,json=policyCandidateName,proto3" json:"policy_candidate_name,omitempty"` + // Description missing in models + ExplicitNullLabelPolicy *BgpAttributesSrPolicyExplicitNullPolicy `protobuf:"bytes,7,opt,name=explicit_null_label_policy,json=explicitNullLabelPolicy,proto3" json:"explicit_null_label_policy,omitempty"` + // Description missing in models + SegmentList []*BgpAttributesSrPolicySegmentList `protobuf:"bytes,8,rep,name=segment_list,json=segmentList,proto3" json:"segment_list,omitempty"` } -func (x *FlowHeader) GetVlan() *FlowVlan { - if x != nil { - return x.Vlan +func (x *BgpAttributesSegmentRoutingPolicy) Reset() { + *x = BgpAttributesSegmentRoutingPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[191] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *FlowHeader) GetVxlan() *FlowVxlan { - if x != nil { - return x.Vxlan - } - return nil +func (x *BgpAttributesSegmentRoutingPolicy) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *FlowHeader) GetIpv4() *FlowIpv4 { - if x != nil { - return x.Ipv4 +func (*BgpAttributesSegmentRoutingPolicy) ProtoMessage() {} + +func (x *BgpAttributesSegmentRoutingPolicy) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[191] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *FlowHeader) GetIpv6() *FlowIpv6 { - if x != nil { - return x.Ipv6 - } - return nil +// Deprecated: Use BgpAttributesSegmentRoutingPolicy.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicy) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{191} } -func (x *FlowHeader) GetPfcpause() *FlowPfcPause { +func (x *BgpAttributesSegmentRoutingPolicy) GetBindingSegmentIdentifier() *BgpAttributesBsid { if x != nil { - return x.Pfcpause + return x.BindingSegmentIdentifier } return nil } -func (x *FlowHeader) GetEthernetpause() *FlowEthernetPause { +func (x *BgpAttributesSegmentRoutingPolicy) GetSrv6BindingSegmentIdentifier() []*BgpAttributesSrv6Bsid { if x != nil { - return x.Ethernetpause + return x.Srv6BindingSegmentIdentifier } return nil } -func (x *FlowHeader) GetTcp() *FlowTcp { +func (x *BgpAttributesSegmentRoutingPolicy) GetPreference() *BgpAttributesSrPolicyPreference { if x != nil { - return x.Tcp + return x.Preference } return nil } -func (x *FlowHeader) GetUdp() *FlowUdp { +func (x *BgpAttributesSegmentRoutingPolicy) GetPriority() *BgpAttributesSrPolicyPriority { if x != nil { - return x.Udp + return x.Priority } return nil } -func (x *FlowHeader) GetGre() *FlowGre { +func (x *BgpAttributesSegmentRoutingPolicy) GetPolicyName() *BgpAttributesSrPolicyPolicyName { if x != nil { - return x.Gre + return x.PolicyName } return nil } -func (x *FlowHeader) GetGtpv1() *FlowGtpv1 { +func (x *BgpAttributesSegmentRoutingPolicy) GetPolicyCandidateName() *BgpAttributesSrPolicyPolicyCandidateName { if x != nil { - return x.Gtpv1 + return x.PolicyCandidateName } return nil } -func (x *FlowHeader) GetGtpv2() *FlowGtpv2 { +func (x *BgpAttributesSegmentRoutingPolicy) GetExplicitNullLabelPolicy() *BgpAttributesSrPolicyExplicitNullPolicy { if x != nil { - return x.Gtpv2 + return x.ExplicitNullLabelPolicy } return nil } -func (x *FlowHeader) GetArp() *FlowArp { +func (x *BgpAttributesSegmentRoutingPolicy) GetSegmentList() []*BgpAttributesSrPolicySegmentList { if x != nil { - return x.Arp + return x.SegmentList } return nil } -func (x *FlowHeader) GetIcmp() *FlowIcmp { - if x != nil { - return x.Icmp - } - return nil +// The Binding Segment Identifier is an optional sub-tlv of type 13 that can be sent +// with a SR Policy +// Tunnel Encapsulation attribute. +// When the active candidate path has a specified Binding Segment Identifier, the SR +// Policy uses that +// BSID if this value (label in MPLS, IPv6 address in SRv6) is available. +// - The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section +// 2.4.2 . +// - It is recommended that if SRv6 Binding SID is desired to be signalled, the SRv6 +// Binding SID sub-TLV that enables +// the specification of the SRv6 Endpoint Behavior should be used. +type BgpAttributesBsid struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The type of Segment Identifier. + // required = true + Choice *BgpAttributesBsid_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpAttributesBsid_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Mpls *BgpAttributesBsidMpls `protobuf:"bytes,2,opt,name=mpls,proto3" json:"mpls,omitempty"` + // Description missing in models + Srv6 *BgpAttributesBsidSrv6 `protobuf:"bytes,3,opt,name=srv6,proto3" json:"srv6,omitempty"` } -func (x *FlowHeader) GetIcmpv6() *FlowIcmpv6 { - if x != nil { - return x.Icmpv6 +func (x *BgpAttributesBsid) Reset() { + *x = BgpAttributesBsid{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[192] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *FlowHeader) GetPpp() *FlowPpp { - if x != nil { - return x.Ppp - } - return nil +func (x *BgpAttributesBsid) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *FlowHeader) GetIgmpv1() *FlowIgmpv1 { - if x != nil { - return x.Igmpv1 +func (*BgpAttributesBsid) ProtoMessage() {} + +func (x *BgpAttributesBsid) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[192] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *FlowHeader) GetMpls() *FlowMpls { - if x != nil { - return x.Mpls +// Deprecated: Use BgpAttributesBsid.ProtoReflect.Descriptor instead. +func (*BgpAttributesBsid) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{192} +} + +func (x *BgpAttributesBsid) GetChoice() BgpAttributesBsid_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return BgpAttributesBsid_Choice_unspecified } -func (x *FlowHeader) GetSnmpv2C() *FlowSnmpv2C { +func (x *BgpAttributesBsid) GetMpls() *BgpAttributesBsidMpls { if x != nil { - return x.Snmpv2C + return x.Mpls } return nil } -func (x *FlowHeader) GetRsvp() *FlowRsvp { +func (x *BgpAttributesBsid) GetSrv6() *BgpAttributesBsidSrv6 { if x != nil { - return x.Rsvp + return x.Srv6 } return nil } -// Custom packet header -type FlowCustom struct { +// When the active candidate path has a specified Binding Segment Identifier, the SR +// Policy uses that BSID defined +// as a MPLS label.The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 +// Section 2.4.2 . +type BgpAttributesBsidMpls struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A custom packet header defined as a string of hex bytes. The string MUST contain - // sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be - // discarded. This packet header can be used in multiple places in the packet. - // required = true - Bytes *string `protobuf:"bytes,1,opt,name=bytes,proto3,oneof" json:"bytes,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits - // in a corresponding header field for metrics per each applicable value. - // These would appear as tagged metrics in corresponding flow metrics. - MetricTags []*FlowCustomMetricTag `protobuf:"bytes,2,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // S-Flag: This flag encodes the Specified-BSID-only behavior. It's usage is + // described in section 6.2.3 in [RFC9256]. + // default = False + FlagSpecifiedBsidOnly *bool `protobuf:"varint,1,opt,name=flag_specified_bsid_only,json=flagSpecifiedBsidOnly,proto3,oneof" json:"flag_specified_bsid_only,omitempty"` + // I-Flag: This flag encodes the Drop Upon Invalid behavior. + // It's usage is described in section 8.2 in [RFC9256]. + // default = False + FlagDropUponInvalid *bool `protobuf:"varint,2,opt,name=flag_drop_upon_invalid,json=flagDropUponInvalid,proto3,oneof" json:"flag_drop_upon_invalid,omitempty"` + // Description missing in models + MplsSid *BgpAttributesSidMpls `protobuf:"bytes,3,opt,name=mpls_sid,json=mplsSid,proto3" json:"mpls_sid,omitempty"` } -func (x *FlowCustom) Reset() { - *x = FlowCustom{} +func (x *BgpAttributesBsidMpls) Reset() { + *x = BgpAttributesBsidMpls{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[191] + mi := &file_otg_proto_msgTypes[193] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowCustom) String() string { +func (x *BgpAttributesBsidMpls) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowCustom) ProtoMessage() {} +func (*BgpAttributesBsidMpls) ProtoMessage() {} -func (x *FlowCustom) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[191] +func (x *BgpAttributesBsidMpls) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[193] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -39727,63 +41446,71 @@ func (x *FlowCustom) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowCustom.ProtoReflect.Descriptor instead. -func (*FlowCustom) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{191} +// Deprecated: Use BgpAttributesBsidMpls.ProtoReflect.Descriptor instead. +func (*BgpAttributesBsidMpls) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{193} } -func (x *FlowCustom) GetBytes() string { - if x != nil && x.Bytes != nil { - return *x.Bytes +func (x *BgpAttributesBsidMpls) GetFlagSpecifiedBsidOnly() bool { + if x != nil && x.FlagSpecifiedBsidOnly != nil { + return *x.FlagSpecifiedBsidOnly } - return "" + return false } -func (x *FlowCustom) GetMetricTags() []*FlowCustomMetricTag { +func (x *BgpAttributesBsidMpls) GetFlagDropUponInvalid() bool { + if x != nil && x.FlagDropUponInvalid != nil { + return *x.FlagDropUponInvalid + } + return false +} + +func (x *BgpAttributesBsidMpls) GetMplsSid() *BgpAttributesSidMpls { if x != nil { - return x.MetricTags + return x.MplsSid } return nil } -// Metric Tag can be used to enable tracking portion of or all bits -// in a corresponding header field for metrics per each applicable value. -// These would appear as tagged metrics in corresponding flow metrics. -type FlowCustomMetricTag struct { +// When the active candidate path has a specified Binding Segment Identifier, the SR +// Policy uses that BSID defined +// as an IPv6 Address.The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 +// Section 2.4.2 . +type BgpAttributesBsidSrv6 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable - // for configured offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset - // of corresponding header field - // default = 1 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // S-Flag: This flag encodes the Specified-BSID-only behavior. It's usage is + // described in section 6.2.3 in [RFC9256]. + // default = False + FlagSpecifiedBsidOnly *bool `protobuf:"varint,1,opt,name=flag_specified_bsid_only,json=flagSpecifiedBsidOnly,proto3,oneof" json:"flag_specified_bsid_only,omitempty"` + // I-Flag: This flag encodes the Drop Upon Invalid behavior. + // It's usage is described in section 8.2 in [RFC9256]. + // default = False + FlagDropUponInvalid *bool `protobuf:"varint,2,opt,name=flag_drop_upon_invalid,json=flagDropUponInvalid,proto3,oneof" json:"flag_drop_upon_invalid,omitempty"` + // IPv6 address denoting the SRv6 SID. + // default = 0::0 + Ipv6Addr *string `protobuf:"bytes,3,opt,name=ipv6_addr,json=ipv6Addr,proto3,oneof" json:"ipv6_addr,omitempty"` } -func (x *FlowCustomMetricTag) Reset() { - *x = FlowCustomMetricTag{} +func (x *BgpAttributesBsidSrv6) Reset() { + *x = BgpAttributesBsidSrv6{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[192] + mi := &file_otg_proto_msgTypes[194] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowCustomMetricTag) String() string { +func (x *BgpAttributesBsidSrv6) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowCustomMetricTag) ProtoMessage() {} +func (*BgpAttributesBsidSrv6) ProtoMessage() {} -func (x *FlowCustomMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[192] +func (x *BgpAttributesBsidSrv6) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[194] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -39794,65 +41521,83 @@ func (x *FlowCustomMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowCustomMetricTag.ProtoReflect.Descriptor instead. -func (*FlowCustomMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{192} +// Deprecated: Use BgpAttributesBsidSrv6.ProtoReflect.Descriptor instead. +func (*BgpAttributesBsidSrv6) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{194} } -func (x *FlowCustomMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *BgpAttributesBsidSrv6) GetFlagSpecifiedBsidOnly() bool { + if x != nil && x.FlagSpecifiedBsidOnly != nil { + return *x.FlagSpecifiedBsidOnly } - return "" + return false } -func (x *FlowCustomMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *BgpAttributesBsidSrv6) GetFlagDropUponInvalid() bool { + if x != nil && x.FlagDropUponInvalid != nil { + return *x.FlagDropUponInvalid } - return 0 + return false } -func (x *FlowCustomMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *BgpAttributesBsidSrv6) GetIpv6Addr() string { + if x != nil && x.Ipv6Addr != nil { + return *x.Ipv6Addr } - return 0 + return "" } -// Ethernet packet header -type FlowEthernet struct { +// The SRv6 Binding SID sub-TLV is an optional sub-TLV of type 20 that is used to signal +// the SRv6 Binding SID +// related information of an SR Policy candidate path. +// - More than one SRv6 Binding SID sub-TLVs MAY be signaled in the same SR Policy +// encoding to indicate one or +// more SRv6 SIDs, each with potentially different SRv6 Endpoint Behaviors to be +// instantiated. +// - The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section +// 2.4.3 . +type BgpAttributesSrv6Bsid struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // S-Flag: This flag encodes the Specified-BSID-only behavior. It's usage is + // described in section 6.2.3 in [RFC9256]. + // default = False + FlagSpecifiedBsidOnly *bool `protobuf:"varint,1,opt,name=flag_specified_bsid_only,json=flagSpecifiedBsidOnly,proto3,oneof" json:"flag_specified_bsid_only,omitempty"` + // I-Flag: This flag encodes the Drop Upon Invalid behavior. + // It's usage is described in section 8.2 in [RFC9256]. + // default = False + FlagDropUponInvalid *bool `protobuf:"varint,2,opt,name=flag_drop_upon_invalid,json=flagDropUponInvalid,proto3,oneof" json:"flag_drop_upon_invalid,omitempty"` + // B-Flag: This flag, when set, indicates the presence of the SRv6 Endpoint Behavior + // + // and SID Structure encoding specified in Section 2.4.4.2.4 of draft-ietf-idr-sr-policy-safi-02. + // default = False + FlagSrv6EndpointBehavior *bool `protobuf:"varint,3,opt,name=flag_srv6_endpoint_behavior,json=flagSrv6EndpointBehavior,proto3,oneof" json:"flag_srv6_endpoint_behavior,omitempty"` + // IPv6 address denoting the SRv6 SID. + // default = 0::0 + Ipv6Addr *string `protobuf:"bytes,4,opt,name=ipv6_addr,json=ipv6Addr,proto3,oneof" json:"ipv6_addr,omitempty"` // Description missing in models - Dst *PatternFlowEthernetDst `protobuf:"bytes,1,opt,name=dst,proto3" json:"dst,omitempty"` - // Description missing in models - Src *PatternFlowEthernetSrc `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"` - // Description missing in models - EtherType *PatternFlowEthernetEtherType `protobuf:"bytes,3,opt,name=ether_type,json=etherType,proto3" json:"ether_type,omitempty"` - // Description missing in models - PfcQueue *PatternFlowEthernetPfcQueue `protobuf:"bytes,4,opt,name=pfc_queue,json=pfcQueue,proto3" json:"pfc_queue,omitempty"` + Srv6EndpointBehavior *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure `protobuf:"bytes,5,opt,name=srv6_endpoint_behavior,json=srv6EndpointBehavior,proto3" json:"srv6_endpoint_behavior,omitempty"` } -func (x *FlowEthernet) Reset() { - *x = FlowEthernet{} +func (x *BgpAttributesSrv6Bsid) Reset() { + *x = BgpAttributesSrv6Bsid{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[193] + mi := &file_otg_proto_msgTypes[195] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowEthernet) String() string { +func (x *BgpAttributesSrv6Bsid) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowEthernet) ProtoMessage() {} +func (*BgpAttributesSrv6Bsid) ProtoMessage() {} -func (x *FlowEthernet) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[193] +func (x *BgpAttributesSrv6Bsid) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[195] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -39863,72 +41608,85 @@ func (x *FlowEthernet) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowEthernet.ProtoReflect.Descriptor instead. -func (*FlowEthernet) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{193} +// Deprecated: Use BgpAttributesSrv6Bsid.ProtoReflect.Descriptor instead. +func (*BgpAttributesSrv6Bsid) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{195} } -func (x *FlowEthernet) GetDst() *PatternFlowEthernetDst { - if x != nil { - return x.Dst +func (x *BgpAttributesSrv6Bsid) GetFlagSpecifiedBsidOnly() bool { + if x != nil && x.FlagSpecifiedBsidOnly != nil { + return *x.FlagSpecifiedBsidOnly } - return nil + return false } -func (x *FlowEthernet) GetSrc() *PatternFlowEthernetSrc { - if x != nil { - return x.Src +func (x *BgpAttributesSrv6Bsid) GetFlagDropUponInvalid() bool { + if x != nil && x.FlagDropUponInvalid != nil { + return *x.FlagDropUponInvalid } - return nil + return false } -func (x *FlowEthernet) GetEtherType() *PatternFlowEthernetEtherType { - if x != nil { - return x.EtherType +func (x *BgpAttributesSrv6Bsid) GetFlagSrv6EndpointBehavior() bool { + if x != nil && x.FlagSrv6EndpointBehavior != nil { + return *x.FlagSrv6EndpointBehavior } - return nil + return false } -func (x *FlowEthernet) GetPfcQueue() *PatternFlowEthernetPfcQueue { +func (x *BgpAttributesSrv6Bsid) GetIpv6Addr() string { + if x != nil && x.Ipv6Addr != nil { + return *x.Ipv6Addr + } + return "" +} + +func (x *BgpAttributesSrv6Bsid) GetSrv6EndpointBehavior() *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { if x != nil { - return x.PfcQueue + return x.Srv6EndpointBehavior } return nil } -// VLAN packet header -type FlowVlan struct { +// This carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, +// 1 bit indicating presence +// or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. +type BgpAttributesSidMpls struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Priority *PatternFlowVlanPriority `protobuf:"bytes,1,opt,name=priority,proto3" json:"priority,omitempty"` - // Description missing in models - Cfi *PatternFlowVlanCfi `protobuf:"bytes,2,opt,name=cfi,proto3" json:"cfi,omitempty"` - // Description missing in models - Id *PatternFlowVlanId `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` - // Description missing in models - Tpid *PatternFlowVlanTpid `protobuf:"bytes,4,opt,name=tpid,proto3" json:"tpid,omitempty"` + // 20 bit MPLS Label value. + // default = 16 + Label *uint32 `protobuf:"varint,1,opt,name=label,proto3,oneof" json:"label,omitempty"` + // 3 bits of Traffic Class. + // default = 0 + TrafficClass *uint32 `protobuf:"varint,2,opt,name=traffic_class,json=trafficClass,proto3,oneof" json:"traffic_class,omitempty"` + // Bottom of Stack + // default = True + FlagBos *bool `protobuf:"varint,3,opt,name=flag_bos,json=flagBos,proto3,oneof" json:"flag_bos,omitempty"` + // 8 bits Time to Live + // default = 63 + Ttl *uint32 `protobuf:"varint,4,opt,name=ttl,proto3,oneof" json:"ttl,omitempty"` } -func (x *FlowVlan) Reset() { - *x = FlowVlan{} +func (x *BgpAttributesSidMpls) Reset() { + *x = BgpAttributesSidMpls{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[194] + mi := &file_otg_proto_msgTypes[196] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowVlan) String() string { +func (x *BgpAttributesSidMpls) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowVlan) ProtoMessage() {} +func (*BgpAttributesSidMpls) ProtoMessage() {} -func (x *FlowVlan) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[194] +func (x *BgpAttributesSidMpls) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[196] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -39939,72 +41697,67 @@ func (x *FlowVlan) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowVlan.ProtoReflect.Descriptor instead. -func (*FlowVlan) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{194} +// Deprecated: Use BgpAttributesSidMpls.ProtoReflect.Descriptor instead. +func (*BgpAttributesSidMpls) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{196} } -func (x *FlowVlan) GetPriority() *PatternFlowVlanPriority { - if x != nil { - return x.Priority +func (x *BgpAttributesSidMpls) GetLabel() uint32 { + if x != nil && x.Label != nil { + return *x.Label } - return nil + return 0 } -func (x *FlowVlan) GetCfi() *PatternFlowVlanCfi { - if x != nil { - return x.Cfi +func (x *BgpAttributesSidMpls) GetTrafficClass() uint32 { + if x != nil && x.TrafficClass != nil { + return *x.TrafficClass } - return nil + return 0 } -func (x *FlowVlan) GetId() *PatternFlowVlanId { - if x != nil { - return x.Id +func (x *BgpAttributesSidMpls) GetFlagBos() bool { + if x != nil && x.FlagBos != nil { + return *x.FlagBos } - return nil + return false } -func (x *FlowVlan) GetTpid() *PatternFlowVlanTpid { - if x != nil { - return x.Tpid +func (x *BgpAttributesSidMpls) GetTtl() uint32 { + if x != nil && x.Ttl != nil { + return *x.Ttl } - return nil + return 0 } -// VXLAN packet header -type FlowVxlan struct { +// An IPv6 address denoting a SRv6 SID. +type BgpAttributesSidSrv6 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - Flags *PatternFlowVxlanFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` - // Description missing in models - Reserved0 *PatternFlowVxlanReserved0 `protobuf:"bytes,2,opt,name=reserved0,proto3" json:"reserved0,omitempty"` - // Description missing in models - Vni *PatternFlowVxlanVni `protobuf:"bytes,3,opt,name=vni,proto3" json:"vni,omitempty"` - // Description missing in models - Reserved1 *PatternFlowVxlanReserved1 `protobuf:"bytes,4,opt,name=reserved1,proto3" json:"reserved1,omitempty"` + // default = 0::0 + Ip *string `protobuf:"bytes,1,opt,name=ip,proto3,oneof" json:"ip,omitempty"` } -func (x *FlowVxlan) Reset() { - *x = FlowVxlan{} +func (x *BgpAttributesSidSrv6) Reset() { + *x = BgpAttributesSidSrv6{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[195] + mi := &file_otg_proto_msgTypes[197] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowVxlan) String() string { +func (x *BgpAttributesSidSrv6) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowVxlan) ProtoMessage() {} +func (*BgpAttributesSidSrv6) ProtoMessage() {} -func (x *FlowVxlan) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[195] +func (x *BgpAttributesSidSrv6) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[197] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -40015,94 +41768,48 @@ func (x *FlowVxlan) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowVxlan.ProtoReflect.Descriptor instead. -func (*FlowVxlan) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{195} -} - -func (x *FlowVxlan) GetFlags() *PatternFlowVxlanFlags { - if x != nil { - return x.Flags - } - return nil -} - -func (x *FlowVxlan) GetReserved0() *PatternFlowVxlanReserved0 { - if x != nil { - return x.Reserved0 - } - return nil -} - -func (x *FlowVxlan) GetVni() *PatternFlowVxlanVni { - if x != nil { - return x.Vni - } - return nil +// Deprecated: Use BgpAttributesSidSrv6.ProtoReflect.Descriptor instead. +func (*BgpAttributesSidSrv6) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{197} } -func (x *FlowVxlan) GetReserved1() *PatternFlowVxlanReserved1 { - if x != nil { - return x.Reserved1 +func (x *BgpAttributesSidSrv6) GetIp() string { + if x != nil && x.Ip != nil { + return *x.Ip } - return nil + return "" } -// IPv4 packet header -type FlowIpv4 struct { +// Optional Preference sub-tlv (Type 12) is used to select the best candidate path for +// an SR Policy. +// It is defined in Section 2.4.1 of draft-ietf-idr-sr-policy-safi-02 . +type BgpAttributesSrPolicyPreference struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Version *PatternFlowIpv4Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // Description missing in models - HeaderLength *PatternFlowIpv4HeaderLength `protobuf:"bytes,2,opt,name=header_length,json=headerLength,proto3" json:"header_length,omitempty"` - // Description missing in models - Priority *FlowIpv4Priority `protobuf:"bytes,3,opt,name=priority,proto3" json:"priority,omitempty"` - // Description missing in models - TotalLength *PatternFlowIpv4TotalLength `protobuf:"bytes,4,opt,name=total_length,json=totalLength,proto3" json:"total_length,omitempty"` - // Description missing in models - Identification *PatternFlowIpv4Identification `protobuf:"bytes,5,opt,name=identification,proto3" json:"identification,omitempty"` - // Description missing in models - Reserved *PatternFlowIpv4Reserved `protobuf:"bytes,6,opt,name=reserved,proto3" json:"reserved,omitempty"` - // Description missing in models - DontFragment *PatternFlowIpv4DontFragment `protobuf:"bytes,7,opt,name=dont_fragment,json=dontFragment,proto3" json:"dont_fragment,omitempty"` - // Description missing in models - MoreFragments *PatternFlowIpv4MoreFragments `protobuf:"bytes,8,opt,name=more_fragments,json=moreFragments,proto3" json:"more_fragments,omitempty"` - // Description missing in models - FragmentOffset *PatternFlowIpv4FragmentOffset `protobuf:"bytes,9,opt,name=fragment_offset,json=fragmentOffset,proto3" json:"fragment_offset,omitempty"` - // Description missing in models - TimeToLive *PatternFlowIpv4TimeToLive `protobuf:"bytes,10,opt,name=time_to_live,json=timeToLive,proto3" json:"time_to_live,omitempty"` - // Description missing in models - Protocol *PatternFlowIpv4Protocol `protobuf:"bytes,11,opt,name=protocol,proto3" json:"protocol,omitempty"` - // Description missing in models - HeaderChecksum *PatternFlowIpv4HeaderChecksum `protobuf:"bytes,12,opt,name=header_checksum,json=headerChecksum,proto3" json:"header_checksum,omitempty"` - // Description missing in models - Src *PatternFlowIpv4Src `protobuf:"bytes,13,opt,name=src,proto3" json:"src,omitempty"` - // Description missing in models - Dst *PatternFlowIpv4Dst `protobuf:"bytes,14,opt,name=dst,proto3" json:"dst,omitempty"` - // Description missing in models - Options []*FlowIpv4Options `protobuf:"bytes,15,rep,name=options,proto3" json:"options,omitempty"` + // Value to be carried in the Preference sub-tlv. + // default = 0 + Value *uint32 `protobuf:"varint,1,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *FlowIpv4) Reset() { - *x = FlowIpv4{} +func (x *BgpAttributesSrPolicyPreference) Reset() { + *x = BgpAttributesSrPolicyPreference{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[196] + mi := &file_otg_proto_msgTypes[198] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIpv4) String() string { +func (x *BgpAttributesSrPolicyPreference) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIpv4) ProtoMessage() {} +func (*BgpAttributesSrPolicyPreference) ProtoMessage() {} -func (x *FlowIpv4) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[196] +func (x *BgpAttributesSrPolicyPreference) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[198] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -40113,156 +41820,157 @@ func (x *FlowIpv4) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIpv4.ProtoReflect.Descriptor instead. -func (*FlowIpv4) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{196} +// Deprecated: Use BgpAttributesSrPolicyPreference.ProtoReflect.Descriptor instead. +func (*BgpAttributesSrPolicyPreference) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{198} } -func (x *FlowIpv4) GetVersion() *PatternFlowIpv4Version { - if x != nil { - return x.Version +func (x *BgpAttributesSrPolicyPreference) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } - return nil + return 0 } -func (x *FlowIpv4) GetHeaderLength() *PatternFlowIpv4HeaderLength { - if x != nil { - return x.HeaderLength - } - return nil -} +// Optional Priority sub-tlv (Type 15) used to select the order in which policies should +// be re-computed. +// - It is defined in Section 2.4.6 of draft-ietf-idr-sr-policy-safi-02 . +type BgpAttributesSrPolicyPriority struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *FlowIpv4) GetPriority() *FlowIpv4Priority { - if x != nil { - return x.Priority - } - return nil + // Value to be carried in the Priority sub-tlv. + // default = 0 + Value *uint32 `protobuf:"varint,1,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *FlowIpv4) GetTotalLength() *PatternFlowIpv4TotalLength { - if x != nil { - return x.TotalLength +func (x *BgpAttributesSrPolicyPriority) Reset() { + *x = BgpAttributesSrPolicyPriority{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[199] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *FlowIpv4) GetIdentification() *PatternFlowIpv4Identification { - if x != nil { - return x.Identification - } - return nil +func (x *BgpAttributesSrPolicyPriority) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *FlowIpv4) GetReserved() *PatternFlowIpv4Reserved { - if x != nil { - return x.Reserved - } - return nil -} +func (*BgpAttributesSrPolicyPriority) ProtoMessage() {} -func (x *FlowIpv4) GetDontFragment() *PatternFlowIpv4DontFragment { - if x != nil { - return x.DontFragment +func (x *BgpAttributesSrPolicyPriority) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[199] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *FlowIpv4) GetMoreFragments() *PatternFlowIpv4MoreFragments { - if x != nil { - return x.MoreFragments - } - return nil +// Deprecated: Use BgpAttributesSrPolicyPriority.ProtoReflect.Descriptor instead. +func (*BgpAttributesSrPolicyPriority) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{199} } -func (x *FlowIpv4) GetFragmentOffset() *PatternFlowIpv4FragmentOffset { - if x != nil { - return x.FragmentOffset +func (x *BgpAttributesSrPolicyPriority) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } - return nil + return 0 } -func (x *FlowIpv4) GetTimeToLive() *PatternFlowIpv4TimeToLive { - if x != nil { - return x.TimeToLive - } - return nil +// Optional Policy Candidate Path Name sub-tlv (Type 129) which carries the symbolic +// name for the SR Policy candidate path +// for debugging. +// - It is defined in Section 2.4.7 of draft-ietf-idr-sr-policy-safi-02 . +type BgpAttributesSrPolicyPolicyCandidateName struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Value of the symbolic Policy Candidate Path Name carried in the Policy Candidate + // Path Name sub-tlv. + // It is recommended that the size of the name is limited to 255 bytes. + // required = true + Value *string `protobuf:"bytes,1,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *FlowIpv4) GetProtocol() *PatternFlowIpv4Protocol { - if x != nil { - return x.Protocol +func (x *BgpAttributesSrPolicyPolicyCandidateName) Reset() { + *x = BgpAttributesSrPolicyPolicyCandidateName{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[200] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *FlowIpv4) GetHeaderChecksum() *PatternFlowIpv4HeaderChecksum { - if x != nil { - return x.HeaderChecksum - } - return nil +func (x *BgpAttributesSrPolicyPolicyCandidateName) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *FlowIpv4) GetSrc() *PatternFlowIpv4Src { - if x != nil { - return x.Src +func (*BgpAttributesSrPolicyPolicyCandidateName) ProtoMessage() {} + +func (x *BgpAttributesSrPolicyPolicyCandidateName) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[200] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *FlowIpv4) GetDst() *PatternFlowIpv4Dst { - if x != nil { - return x.Dst - } - return nil +// Deprecated: Use BgpAttributesSrPolicyPolicyCandidateName.ProtoReflect.Descriptor instead. +func (*BgpAttributesSrPolicyPolicyCandidateName) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{200} } -func (x *FlowIpv4) GetOptions() []*FlowIpv4Options { - if x != nil { - return x.Options +func (x *BgpAttributesSrPolicyPolicyCandidateName) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } - return nil + return "" } -// IPv4 options are optional extensions for the IPv4 header that can be utilised to -// provide additional information about the IPv4 datagram. It is encoded as a series -// of type, length and value attributes. The IP header length MUST be increased to -// accommodate the extra bytes needed to encode the IP options. The length of the all -// options included to a IPv4 header should not exceed 40 bytes since IPv4 Header length -// (4 bits) can at max specify 15 4-word octets for a total of 60 bytes which includes -// 20 bytes needed for mandatory attributes of the IPv4 header. If the user adds multiples -// IPv4 options that exceeds 40 bytes and specify header length as auto, implementation -// should throw error. Currently IP options supported are: 1. router_alert option allows -// devices to intercept packets not addressed to them directly as defined in RFC2113. -// 2. custom option is provided to configure user defined IP options as needed. -type FlowIpv4Options struct { +// Optional Policy Name sub-tlv (Type 130) which carries the symbolic name for the SR +// Policy for which the +// candidate path is being advertised for debugging. +// - It is defined in Section 2.4.8 of draft-ietf-idr-sr-policy-safi-02 . +type BgpAttributesSrPolicyPolicyName struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.router_alert - Choice *FlowIpv4Options_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowIpv4Options_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Custom *FlowIpv4OptionsCustom `protobuf:"bytes,2,opt,name=custom,proto3" json:"custom,omitempty"` + // Value of the symbolic policy name carried in the Policy Name sub-tlv. + // It is recommended that the size of the name is limited to 255 bytes. + // required = true + Value *string `protobuf:"bytes,1,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *FlowIpv4Options) Reset() { - *x = FlowIpv4Options{} +func (x *BgpAttributesSrPolicyPolicyName) Reset() { + *x = BgpAttributesSrPolicyPolicyName{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[197] + mi := &file_otg_proto_msgTypes[201] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIpv4Options) String() string { +func (x *BgpAttributesSrPolicyPolicyName) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIpv4Options) ProtoMessage() {} +func (*BgpAttributesSrPolicyPolicyName) ProtoMessage() {} -func (x *FlowIpv4Options) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[197] +func (x *BgpAttributesSrPolicyPolicyName) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[201] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -40273,60 +41981,49 @@ func (x *FlowIpv4Options) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIpv4Options.ProtoReflect.Descriptor instead. -func (*FlowIpv4Options) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{197} -} - -func (x *FlowIpv4Options) GetChoice() FlowIpv4Options_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowIpv4Options_Choice_unspecified +// Deprecated: Use BgpAttributesSrPolicyPolicyName.ProtoReflect.Descriptor instead. +func (*BgpAttributesSrPolicyPolicyName) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{201} } -func (x *FlowIpv4Options) GetCustom() *FlowIpv4OptionsCustom { - if x != nil { - return x.Custom +func (x *BgpAttributesSrPolicyPolicyName) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } - return nil + return "" } -// User defined IP options to be appended to the IPv4 header. -type FlowIpv4OptionsCustom struct { +// This is an optional sub-tlv (Type 14) which indicates whether an Explicit NULL Label +// must be pushed on an unlabeled IP +// packet before other labels for IPv4 or IPv6 flows. +// - It is defined in Section 2.4.5 of draft-ietf-idr-sr-policy-safi-02. +type BgpAttributesSrPolicyExplicitNullPolicy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Type *FlowIpv4OptionsCustomType `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // Description missing in models - Length *FlowIpv4OptionsCustomLength `protobuf:"bytes,2,opt,name=length,proto3" json:"length,omitempty"` - // Value of the option field should not excced 38 bytes since maximum 40 bytes can be - // added as options in IPv4 header. For type and length requires 2 bytes, hence maximum - // of 38 bytes are expected. Maximum length of this attribute is 76 (38 * 2 hex character - // per byte). - // default = 0000 - Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` + // The Explicit NULL Label policy. + // default = Choice.Enum.push_ipv4_and_ipv6 + Choice *BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum,oneof" json:"choice,omitempty"` } -func (x *FlowIpv4OptionsCustom) Reset() { - *x = FlowIpv4OptionsCustom{} +func (x *BgpAttributesSrPolicyExplicitNullPolicy) Reset() { + *x = BgpAttributesSrPolicyExplicitNullPolicy{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[198] + mi := &file_otg_proto_msgTypes[202] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIpv4OptionsCustom) String() string { +func (x *BgpAttributesSrPolicyExplicitNullPolicy) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIpv4OptionsCustom) ProtoMessage() {} +func (*BgpAttributesSrPolicyExplicitNullPolicy) ProtoMessage() {} -func (x *FlowIpv4OptionsCustom) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[198] +func (x *BgpAttributesSrPolicyExplicitNullPolicy) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[202] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -40337,63 +42034,53 @@ func (x *FlowIpv4OptionsCustom) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIpv4OptionsCustom.ProtoReflect.Descriptor instead. -func (*FlowIpv4OptionsCustom) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{198} -} - -func (x *FlowIpv4OptionsCustom) GetType() *FlowIpv4OptionsCustomType { - if x != nil { - return x.Type - } - return nil -} - -func (x *FlowIpv4OptionsCustom) GetLength() *FlowIpv4OptionsCustomLength { - if x != nil { - return x.Length - } - return nil +// Deprecated: Use BgpAttributesSrPolicyExplicitNullPolicy.ProtoReflect.Descriptor instead. +func (*BgpAttributesSrPolicyExplicitNullPolicy) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{202} } -func (x *FlowIpv4OptionsCustom) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value +func (x *BgpAttributesSrPolicyExplicitNullPolicy) GetChoice() BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return BgpAttributesSrPolicyExplicitNullPolicy_Choice_unspecified } -// Type options for custom options. -type FlowIpv4OptionsCustomType struct { +// One optional SEGMENT_LIST sub-tlv encoded with type of 128. +// One sub-tlv (Type 128) encodes a single explicit path towards the endpoint as described +// in +// section 5.1 of [RFC9256]. +// The Segment List sub-TLV includes the elements of the paths (i.e., segments) as well +// +// as an optional Weight sub-TLV. +type BgpAttributesSrPolicySegmentList struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - CopiedFlag *PatternFlowIpv4OptionsCustomTypeCopiedFlag `protobuf:"bytes,1,opt,name=copied_flag,json=copiedFlag,proto3" json:"copied_flag,omitempty"` - // Description missing in models - OptionClass *PatternFlowIpv4OptionsCustomTypeOptionClass `protobuf:"bytes,2,opt,name=option_class,json=optionClass,proto3" json:"option_class,omitempty"` + Weight *BgpAttributesSegmentRoutingPolicySegmentListWeight `protobuf:"bytes,1,opt,name=weight,proto3" json:"weight,omitempty"` // Description missing in models - OptionNumber *PatternFlowIpv4OptionsCustomTypeOptionNumber `protobuf:"bytes,3,opt,name=option_number,json=optionNumber,proto3" json:"option_number,omitempty"` + Segments []*BgpAttributesSegmentRoutingPolicySegmentListSegment `protobuf:"bytes,2,rep,name=segments,proto3" json:"segments,omitempty"` } -func (x *FlowIpv4OptionsCustomType) Reset() { - *x = FlowIpv4OptionsCustomType{} +func (x *BgpAttributesSrPolicySegmentList) Reset() { + *x = BgpAttributesSrPolicySegmentList{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[199] + mi := &file_otg_proto_msgTypes[203] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIpv4OptionsCustomType) String() string { +func (x *BgpAttributesSrPolicySegmentList) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIpv4OptionsCustomType) ProtoMessage() {} +func (*BgpAttributesSrPolicySegmentList) ProtoMessage() {} -func (x *FlowIpv4OptionsCustomType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[199] +func (x *BgpAttributesSrPolicySegmentList) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[203] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -40404,67 +42091,54 @@ func (x *FlowIpv4OptionsCustomType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIpv4OptionsCustomType.ProtoReflect.Descriptor instead. -func (*FlowIpv4OptionsCustomType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{199} -} - -func (x *FlowIpv4OptionsCustomType) GetCopiedFlag() *PatternFlowIpv4OptionsCustomTypeCopiedFlag { - if x != nil { - return x.CopiedFlag - } - return nil +// Deprecated: Use BgpAttributesSrPolicySegmentList.ProtoReflect.Descriptor instead. +func (*BgpAttributesSrPolicySegmentList) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{203} } -func (x *FlowIpv4OptionsCustomType) GetOptionClass() *PatternFlowIpv4OptionsCustomTypeOptionClass { +func (x *BgpAttributesSrPolicySegmentList) GetWeight() *BgpAttributesSegmentRoutingPolicySegmentListWeight { if x != nil { - return x.OptionClass + return x.Weight } return nil } -func (x *FlowIpv4OptionsCustomType) GetOptionNumber() *PatternFlowIpv4OptionsCustomTypeOptionNumber { +func (x *BgpAttributesSrPolicySegmentList) GetSegments() []*BgpAttributesSegmentRoutingPolicySegmentListSegment { if x != nil { - return x.OptionNumber + return x.Segments } return nil } -// Length for custom options. -type FlowIpv4OptionsCustomLength struct { +// The optional Weight sub-TLV (Type 9) specifies the weight associated with a given +// segment list. The weight is used for weighted multipath. +type BgpAttributesSegmentRoutingPolicySegmentListWeight struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // auto or configured value. - // default = Choice.Enum.auto - Choice *FlowIpv4OptionsCustomLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowIpv4OptionsCustomLength_Choice_Enum,oneof" json:"choice,omitempty"` - // The OTG implementation can provide a system generated value for this property. If - // the OTG is unable to generate a value the default value must be used. + // Value of the weight. // default = 0 - Auto *uint32 `protobuf:"varint,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,3,opt,name=value,proto3,oneof" json:"value,omitempty"` + Value *uint32 `protobuf:"varint,1,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *FlowIpv4OptionsCustomLength) Reset() { - *x = FlowIpv4OptionsCustomLength{} +func (x *BgpAttributesSegmentRoutingPolicySegmentListWeight) Reset() { + *x = BgpAttributesSegmentRoutingPolicySegmentListWeight{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[200] + mi := &file_otg_proto_msgTypes[204] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIpv4OptionsCustomLength) String() string { +func (x *BgpAttributesSegmentRoutingPolicySegmentListWeight) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIpv4OptionsCustomLength) ProtoMessage() {} +func (*BgpAttributesSegmentRoutingPolicySegmentListWeight) ProtoMessage() {} -func (x *FlowIpv4OptionsCustomLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[200] +func (x *BgpAttributesSegmentRoutingPolicySegmentListWeight) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[204] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -40475,66 +42149,85 @@ func (x *FlowIpv4OptionsCustomLength) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIpv4OptionsCustomLength.ProtoReflect.Descriptor instead. -func (*FlowIpv4OptionsCustomLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{200} -} - -func (x *FlowIpv4OptionsCustomLength) GetChoice() FlowIpv4OptionsCustomLength_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowIpv4OptionsCustomLength_Choice_unspecified -} - -func (x *FlowIpv4OptionsCustomLength) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto - } - return 0 +// Deprecated: Use BgpAttributesSegmentRoutingPolicySegmentListWeight.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicySegmentListWeight) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{204} } -func (x *FlowIpv4OptionsCustomLength) GetValue() uint32 { +func (x *BgpAttributesSegmentRoutingPolicySegmentListWeight) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -// A container for ipv4 raw, tos, dscp ip priorities. -type FlowIpv4Priority struct { +// A Segment sub-TLV describes a single segment in a segment list i.e., a single +// element of the explicit path. The Segment sub-TLVs are optional. +// Segment Types A and B are defined as described in 2.4.4.2. +// Segment Types C upto K are defined as described in in draft-ietf-idr-bgp-sr-segtypes-ext-03 +// . +type BgpAttributesSegmentRoutingPolicySegmentListSegment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Specify one of the segment types as defined in ietf-idr-segment-routing-te-policy + // - Type A: SID only, in the form of MPLS Label. + // - Type B: SID only, in the form of IPv6 Address. + // - Type C: IPv4 Prefix with optional SR Algorithm. + // - Type D: IPv6 Global Prefix with optional SR Algorithm for SR-MPLS. + // - Type E: IPv4 Prefix with Local Interface ID. + // - Type F: IPv4 Addresses for link endpoints as Local, Remote pair. + // - Type G: IPv6 Prefix and Interface ID for link endpoints as Local, Remote pair + // for SR-MPLS. + // - Type H: IPv6 Addresses for link endpoints as Local, Remote pair for SR-MPLS. + // - Type I: IPv6 Global Prefix with optional SR Algorithm for SRv6. + // - Type J: IPv6 Prefix and Interface ID for link endpoints as Local, Remote pair + // for SRv6. + // - Type K: IPv6 Addresses for link endpoints as Local, Remote pair for SRv6. + // required = true + Choice *BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = Choice.Enum.dscp - Choice *FlowIpv4Priority_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowIpv4Priority_Choice_Enum,oneof" json:"choice,omitempty"` + TypeA *BgpAttributesSegmentRoutingPolicyTypeA `protobuf:"bytes,2,opt,name=type_a,json=typeA,proto3" json:"type_a,omitempty"` // Description missing in models - Raw *PatternFlowIpv4PriorityRaw `protobuf:"bytes,2,opt,name=raw,proto3" json:"raw,omitempty"` + TypeB *BgpAttributesSegmentRoutingPolicyTypeB `protobuf:"bytes,3,opt,name=type_b,json=typeB,proto3" json:"type_b,omitempty"` // Description missing in models - Tos *FlowIpv4Tos `protobuf:"bytes,3,opt,name=tos,proto3" json:"tos,omitempty"` + TypeC *BgpAttributesSegmentRoutingPolicyTypeC `protobuf:"bytes,4,opt,name=type_c,json=typeC,proto3" json:"type_c,omitempty"` // Description missing in models - Dscp *FlowIpv4Dscp `protobuf:"bytes,4,opt,name=dscp,proto3" json:"dscp,omitempty"` + TypeD *BgpAttributesSegmentRoutingPolicyTypeD `protobuf:"bytes,5,opt,name=type_d,json=typeD,proto3" json:"type_d,omitempty"` + // Description missing in models + TypeE *BgpAttributesSegmentRoutingPolicyTypeE `protobuf:"bytes,6,opt,name=type_e,json=typeE,proto3" json:"type_e,omitempty"` + // Description missing in models + TypeF *BgpAttributesSegmentRoutingPolicyTypeF `protobuf:"bytes,7,opt,name=type_f,json=typeF,proto3" json:"type_f,omitempty"` + // Description missing in models + TypeG *BgpAttributesSegmentRoutingPolicyTypeG `protobuf:"bytes,8,opt,name=type_g,json=typeG,proto3" json:"type_g,omitempty"` + // Description missing in models + TypeH *BgpAttributesSegmentRoutingPolicyTypeH `protobuf:"bytes,9,opt,name=type_h,json=typeH,proto3" json:"type_h,omitempty"` + // Description missing in models + TypeI *BgpAttributesSegmentRoutingPolicyTypeI `protobuf:"bytes,10,opt,name=type_i,json=typeI,proto3" json:"type_i,omitempty"` + // Description missing in models + TypeJ *BgpAttributesSegmentRoutingPolicyTypeJ `protobuf:"bytes,11,opt,name=type_j,json=typeJ,proto3" json:"type_j,omitempty"` + // Description missing in models + TypeK *BgpAttributesSegmentRoutingPolicyTypeK `protobuf:"bytes,12,opt,name=type_k,json=typeK,proto3" json:"type_k,omitempty"` } -func (x *FlowIpv4Priority) Reset() { - *x = FlowIpv4Priority{} +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) Reset() { + *x = BgpAttributesSegmentRoutingPolicySegmentListSegment{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[201] + mi := &file_otg_proto_msgTypes[205] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIpv4Priority) String() string { +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIpv4Priority) ProtoMessage() {} +func (*BgpAttributesSegmentRoutingPolicySegmentListSegment) ProtoMessage() {} -func (x *FlowIpv4Priority) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[201] +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[205] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -40545,68 +42238,125 @@ func (x *FlowIpv4Priority) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIpv4Priority.ProtoReflect.Descriptor instead. -func (*FlowIpv4Priority) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{201} +// Deprecated: Use BgpAttributesSegmentRoutingPolicySegmentListSegment.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicySegmentListSegment) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{205} } -func (x *FlowIpv4Priority) GetChoice() FlowIpv4Priority_Choice_Enum { +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) GetChoice() BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return FlowIpv4Priority_Choice_unspecified + return BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_unspecified } -func (x *FlowIpv4Priority) GetRaw() *PatternFlowIpv4PriorityRaw { +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) GetTypeA() *BgpAttributesSegmentRoutingPolicyTypeA { if x != nil { - return x.Raw + return x.TypeA } return nil } -func (x *FlowIpv4Priority) GetTos() *FlowIpv4Tos { +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) GetTypeB() *BgpAttributesSegmentRoutingPolicyTypeB { if x != nil { - return x.Tos + return x.TypeB } return nil } -func (x *FlowIpv4Priority) GetDscp() *FlowIpv4Dscp { +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) GetTypeC() *BgpAttributesSegmentRoutingPolicyTypeC { if x != nil { - return x.Dscp + return x.TypeC } return nil } -// Differentiated services code point (DSCP) packet field. -type FlowIpv4Dscp struct { +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) GetTypeD() *BgpAttributesSegmentRoutingPolicyTypeD { + if x != nil { + return x.TypeD + } + return nil +} + +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) GetTypeE() *BgpAttributesSegmentRoutingPolicyTypeE { + if x != nil { + return x.TypeE + } + return nil +} + +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) GetTypeF() *BgpAttributesSegmentRoutingPolicyTypeF { + if x != nil { + return x.TypeF + } + return nil +} + +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) GetTypeG() *BgpAttributesSegmentRoutingPolicyTypeG { + if x != nil { + return x.TypeG + } + return nil +} + +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) GetTypeH() *BgpAttributesSegmentRoutingPolicyTypeH { + if x != nil { + return x.TypeH + } + return nil +} + +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) GetTypeI() *BgpAttributesSegmentRoutingPolicyTypeI { + if x != nil { + return x.TypeI + } + return nil +} + +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) GetTypeJ() *BgpAttributesSegmentRoutingPolicyTypeJ { + if x != nil { + return x.TypeJ + } + return nil +} + +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment) GetTypeK() *BgpAttributesSegmentRoutingPolicyTypeK { + if x != nil { + return x.TypeK + } + return nil +} + +// Type A: SID only, in the form of MPLS Label. +// It is encoded as a Segment of Type 1 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeA struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - Phb *PatternFlowIpv4DscpPhb `protobuf:"bytes,1,opt,name=phb,proto3" json:"phb,omitempty"` + Flags *BgpAttributesSegmentRoutingPolicyTypeFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` // Description missing in models - Ecn *PatternFlowIpv4DscpEcn `protobuf:"bytes,2,opt,name=ecn,proto3" json:"ecn,omitempty"` + MplsSid *BgpAttributesSidMpls `protobuf:"bytes,2,opt,name=mpls_sid,json=mplsSid,proto3" json:"mpls_sid,omitempty"` } -func (x *FlowIpv4Dscp) Reset() { - *x = FlowIpv4Dscp{} +func (x *BgpAttributesSegmentRoutingPolicyTypeA) Reset() { + *x = BgpAttributesSegmentRoutingPolicyTypeA{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[202] + mi := &file_otg_proto_msgTypes[206] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIpv4Dscp) String() string { +func (x *BgpAttributesSegmentRoutingPolicyTypeA) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIpv4Dscp) ProtoMessage() {} +func (*BgpAttributesSegmentRoutingPolicyTypeA) ProtoMessage() {} -func (x *FlowIpv4Dscp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[202] +func (x *BgpAttributesSegmentRoutingPolicyTypeA) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[206] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -40617,62 +42367,58 @@ func (x *FlowIpv4Dscp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIpv4Dscp.ProtoReflect.Descriptor instead. -func (*FlowIpv4Dscp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{202} +// Deprecated: Use BgpAttributesSegmentRoutingPolicyTypeA.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicyTypeA) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{206} } -func (x *FlowIpv4Dscp) GetPhb() *PatternFlowIpv4DscpPhb { +func (x *BgpAttributesSegmentRoutingPolicyTypeA) GetFlags() *BgpAttributesSegmentRoutingPolicyTypeFlags { if x != nil { - return x.Phb + return x.Flags } return nil } -func (x *FlowIpv4Dscp) GetEcn() *PatternFlowIpv4DscpEcn { +func (x *BgpAttributesSegmentRoutingPolicyTypeA) GetMplsSid() *BgpAttributesSidMpls { if x != nil { - return x.Ecn + return x.MplsSid } return nil } -// Type of service (TOS) packet field. -type FlowIpv4Tos struct { +// Type B: SID only, in the form of IPv6 address. +// It is encoded as a Segment of Type 13 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeB struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - Precedence *PatternFlowIpv4TosPrecedence `protobuf:"bytes,1,opt,name=precedence,proto3" json:"precedence,omitempty"` - // Description missing in models - Delay *PatternFlowIpv4TosDelay `protobuf:"bytes,2,opt,name=delay,proto3" json:"delay,omitempty"` - // Description missing in models - Throughput *PatternFlowIpv4TosThroughput `protobuf:"bytes,3,opt,name=throughput,proto3" json:"throughput,omitempty"` - // Description missing in models - Reliability *PatternFlowIpv4TosReliability `protobuf:"bytes,4,opt,name=reliability,proto3" json:"reliability,omitempty"` - // Description missing in models - Monetary *PatternFlowIpv4TosMonetary `protobuf:"bytes,5,opt,name=monetary,proto3" json:"monetary,omitempty"` + Flags *BgpAttributesSegmentRoutingPolicyTypeFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + // SRv6 SID. + // default = 0::0 + Srv6Sid *string `protobuf:"bytes,2,opt,name=srv6_sid,json=srv6Sid,proto3,oneof" json:"srv6_sid,omitempty"` // Description missing in models - Unused *PatternFlowIpv4TosUnused `protobuf:"bytes,6,opt,name=unused,proto3" json:"unused,omitempty"` + Srv6EndpointBehavior *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure `protobuf:"bytes,3,opt,name=srv6_endpoint_behavior,json=srv6EndpointBehavior,proto3" json:"srv6_endpoint_behavior,omitempty"` } -func (x *FlowIpv4Tos) Reset() { - *x = FlowIpv4Tos{} +func (x *BgpAttributesSegmentRoutingPolicyTypeB) Reset() { + *x = BgpAttributesSegmentRoutingPolicyTypeB{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[203] + mi := &file_otg_proto_msgTypes[207] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIpv4Tos) String() string { +func (x *BgpAttributesSegmentRoutingPolicyTypeB) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIpv4Tos) ProtoMessage() {} +func (*BgpAttributesSegmentRoutingPolicyTypeB) ProtoMessage() {} -func (x *FlowIpv4Tos) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[203] +func (x *BgpAttributesSegmentRoutingPolicyTypeB) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[207] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -40683,94 +42429,69 @@ func (x *FlowIpv4Tos) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIpv4Tos.ProtoReflect.Descriptor instead. -func (*FlowIpv4Tos) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{203} -} - -func (x *FlowIpv4Tos) GetPrecedence() *PatternFlowIpv4TosPrecedence { - if x != nil { - return x.Precedence - } - return nil -} - -func (x *FlowIpv4Tos) GetDelay() *PatternFlowIpv4TosDelay { - if x != nil { - return x.Delay - } - return nil -} - -func (x *FlowIpv4Tos) GetThroughput() *PatternFlowIpv4TosThroughput { - if x != nil { - return x.Throughput - } - return nil +// Deprecated: Use BgpAttributesSegmentRoutingPolicyTypeB.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicyTypeB) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{207} } -func (x *FlowIpv4Tos) GetReliability() *PatternFlowIpv4TosReliability { +func (x *BgpAttributesSegmentRoutingPolicyTypeB) GetFlags() *BgpAttributesSegmentRoutingPolicyTypeFlags { if x != nil { - return x.Reliability + return x.Flags } return nil } -func (x *FlowIpv4Tos) GetMonetary() *PatternFlowIpv4TosMonetary { - if x != nil { - return x.Monetary +func (x *BgpAttributesSegmentRoutingPolicyTypeB) GetSrv6Sid() string { + if x != nil && x.Srv6Sid != nil { + return *x.Srv6Sid } - return nil + return "" } -func (x *FlowIpv4Tos) GetUnused() *PatternFlowIpv4TosUnused { +func (x *BgpAttributesSegmentRoutingPolicyTypeB) GetSrv6EndpointBehavior() *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { if x != nil { - return x.Unused + return x.Srv6EndpointBehavior } return nil } -// IPv6 packet header -type FlowIpv6 struct { +// Type C: IPv4 Node Address with optional SID. +// It is encoded as a Segment of Type 3 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeC struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - Version *PatternFlowIpv6Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // Description missing in models - TrafficClass *PatternFlowIpv6TrafficClass `protobuf:"bytes,2,opt,name=traffic_class,json=trafficClass,proto3" json:"traffic_class,omitempty"` - // Description missing in models - FlowLabel *PatternFlowIpv6FlowLabel `protobuf:"bytes,3,opt,name=flow_label,json=flowLabel,proto3" json:"flow_label,omitempty"` - // Description missing in models - PayloadLength *PatternFlowIpv6PayloadLength `protobuf:"bytes,4,opt,name=payload_length,json=payloadLength,proto3" json:"payload_length,omitempty"` - // Description missing in models - NextHeader *PatternFlowIpv6NextHeader `protobuf:"bytes,5,opt,name=next_header,json=nextHeader,proto3" json:"next_header,omitempty"` - // Description missing in models - HopLimit *PatternFlowIpv6HopLimit `protobuf:"bytes,6,opt,name=hop_limit,json=hopLimit,proto3" json:"hop_limit,omitempty"` - // Description missing in models - Src *PatternFlowIpv6Src `protobuf:"bytes,7,opt,name=src,proto3" json:"src,omitempty"` - // Description missing in models - Dst *PatternFlowIpv6Dst `protobuf:"bytes,8,opt,name=dst,proto3" json:"dst,omitempty"` + Flags *BgpAttributesSegmentRoutingPolicyTypeFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + // SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be + // set to 0 on transmission and ignored on receipt. + // default = 0 + SrAlgorithm *uint32 `protobuf:"varint,2,opt,name=sr_algorithm,json=srAlgorithm,proto3,oneof" json:"sr_algorithm,omitempty"` + // IPv4 address representing a node. + // default = 0.0.0.0 + Ipv4NodeAddress *string `protobuf:"bytes,3,opt,name=ipv4_node_address,json=ipv4NodeAddress,proto3,oneof" json:"ipv4_node_address,omitempty"` + // Optional SR-MPLS SID. + SrMplsSid *BgpAttributesSidMpls `protobuf:"bytes,4,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` } -func (x *FlowIpv6) Reset() { - *x = FlowIpv6{} +func (x *BgpAttributesSegmentRoutingPolicyTypeC) Reset() { + *x = BgpAttributesSegmentRoutingPolicyTypeC{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[204] + mi := &file_otg_proto_msgTypes[208] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIpv6) String() string { +func (x *BgpAttributesSegmentRoutingPolicyTypeC) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIpv6) ProtoMessage() {} +func (*BgpAttributesSegmentRoutingPolicyTypeC) ProtoMessage() {} -func (x *FlowIpv6) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[204] +func (x *BgpAttributesSegmentRoutingPolicyTypeC) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[208] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -40781,118 +42502,76 @@ func (x *FlowIpv6) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIpv6.ProtoReflect.Descriptor instead. -func (*FlowIpv6) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{204} -} - -func (x *FlowIpv6) GetVersion() *PatternFlowIpv6Version { - if x != nil { - return x.Version - } - return nil -} - -func (x *FlowIpv6) GetTrafficClass() *PatternFlowIpv6TrafficClass { - if x != nil { - return x.TrafficClass - } - return nil -} - -func (x *FlowIpv6) GetFlowLabel() *PatternFlowIpv6FlowLabel { - if x != nil { - return x.FlowLabel - } - return nil -} - -func (x *FlowIpv6) GetPayloadLength() *PatternFlowIpv6PayloadLength { - if x != nil { - return x.PayloadLength - } - return nil +// Deprecated: Use BgpAttributesSegmentRoutingPolicyTypeC.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicyTypeC) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{208} } -func (x *FlowIpv6) GetNextHeader() *PatternFlowIpv6NextHeader { +func (x *BgpAttributesSegmentRoutingPolicyTypeC) GetFlags() *BgpAttributesSegmentRoutingPolicyTypeFlags { if x != nil { - return x.NextHeader + return x.Flags } return nil } -func (x *FlowIpv6) GetHopLimit() *PatternFlowIpv6HopLimit { - if x != nil { - return x.HopLimit +func (x *BgpAttributesSegmentRoutingPolicyTypeC) GetSrAlgorithm() uint32 { + if x != nil && x.SrAlgorithm != nil { + return *x.SrAlgorithm } - return nil + return 0 } -func (x *FlowIpv6) GetSrc() *PatternFlowIpv6Src { - if x != nil { - return x.Src +func (x *BgpAttributesSegmentRoutingPolicyTypeC) GetIpv4NodeAddress() string { + if x != nil && x.Ipv4NodeAddress != nil { + return *x.Ipv4NodeAddress } - return nil + return "" } -func (x *FlowIpv6) GetDst() *PatternFlowIpv6Dst { +func (x *BgpAttributesSegmentRoutingPolicyTypeC) GetSrMplsSid() *BgpAttributesSidMpls { if x != nil { - return x.Dst + return x.SrMplsSid } return nil } -// IEEE 802.1Qbb PFC Pause packet header. -type FlowPfcPause struct { +// Type D: IPv6 Node Address with optional SID for SR MPLS. +// It is encoded as a Segment of Type 4 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeD struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - Dst *PatternFlowPfcPauseDst `protobuf:"bytes,1,opt,name=dst,proto3" json:"dst,omitempty"` - // Description missing in models - Src *PatternFlowPfcPauseSrc `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"` - // Description missing in models - EtherType *PatternFlowPfcPauseEtherType `protobuf:"bytes,3,opt,name=ether_type,json=etherType,proto3" json:"ether_type,omitempty"` - // Description missing in models - ControlOpCode *PatternFlowPfcPauseControlOpCode `protobuf:"bytes,4,opt,name=control_op_code,json=controlOpCode,proto3" json:"control_op_code,omitempty"` - // Description missing in models - ClassEnableVector *PatternFlowPfcPauseClassEnableVector `protobuf:"bytes,5,opt,name=class_enable_vector,json=classEnableVector,proto3" json:"class_enable_vector,omitempty"` - // Description missing in models - PauseClass_0 *PatternFlowPfcPausePauseClass0 `protobuf:"bytes,6,opt,name=pause_class_0,json=pauseClass0,proto3" json:"pause_class_0,omitempty"` - // Description missing in models - PauseClass_1 *PatternFlowPfcPausePauseClass1 `protobuf:"bytes,7,opt,name=pause_class_1,json=pauseClass1,proto3" json:"pause_class_1,omitempty"` - // Description missing in models - PauseClass_2 *PatternFlowPfcPausePauseClass2 `protobuf:"bytes,8,opt,name=pause_class_2,json=pauseClass2,proto3" json:"pause_class_2,omitempty"` - // Description missing in models - PauseClass_3 *PatternFlowPfcPausePauseClass3 `protobuf:"bytes,9,opt,name=pause_class_3,json=pauseClass3,proto3" json:"pause_class_3,omitempty"` - // Description missing in models - PauseClass_4 *PatternFlowPfcPausePauseClass4 `protobuf:"bytes,10,opt,name=pause_class_4,json=pauseClass4,proto3" json:"pause_class_4,omitempty"` - // Description missing in models - PauseClass_5 *PatternFlowPfcPausePauseClass5 `protobuf:"bytes,11,opt,name=pause_class_5,json=pauseClass5,proto3" json:"pause_class_5,omitempty"` - // Description missing in models - PauseClass_6 *PatternFlowPfcPausePauseClass6 `protobuf:"bytes,12,opt,name=pause_class_6,json=pauseClass6,proto3" json:"pause_class_6,omitempty"` - // Description missing in models - PauseClass_7 *PatternFlowPfcPausePauseClass7 `protobuf:"bytes,13,opt,name=pause_class_7,json=pauseClass7,proto3" json:"pause_class_7,omitempty"` + Flags *BgpAttributesSegmentRoutingPolicyTypeFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + // SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be + // set to 0 on transmission and ignored on receipt. + // default = 0 + SrAlgorithm *uint32 `protobuf:"varint,2,opt,name=sr_algorithm,json=srAlgorithm,proto3,oneof" json:"sr_algorithm,omitempty"` + // IPv6 address representing a node. + // default = 0::0 + Ipv6NodeAddress *string `protobuf:"bytes,3,opt,name=ipv6_node_address,json=ipv6NodeAddress,proto3,oneof" json:"ipv6_node_address,omitempty"` + // Optional SR-MPLS SID. + SrMplsSid *BgpAttributesSidMpls `protobuf:"bytes,4,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` } -func (x *FlowPfcPause) Reset() { - *x = FlowPfcPause{} +func (x *BgpAttributesSegmentRoutingPolicyTypeD) Reset() { + *x = BgpAttributesSegmentRoutingPolicyTypeD{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[205] + mi := &file_otg_proto_msgTypes[209] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowPfcPause) String() string { +func (x *BgpAttributesSegmentRoutingPolicyTypeD) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowPfcPause) ProtoMessage() {} +func (*BgpAttributesSegmentRoutingPolicyTypeD) ProtoMessage() {} -func (x *FlowPfcPause) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[205] +func (x *BgpAttributesSegmentRoutingPolicyTypeD) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[209] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -40903,137 +42582,154 @@ func (x *FlowPfcPause) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowPfcPause.ProtoReflect.Descriptor instead. -func (*FlowPfcPause) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{205} +// Deprecated: Use BgpAttributesSegmentRoutingPolicyTypeD.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicyTypeD) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{209} } -func (x *FlowPfcPause) GetDst() *PatternFlowPfcPauseDst { +func (x *BgpAttributesSegmentRoutingPolicyTypeD) GetFlags() *BgpAttributesSegmentRoutingPolicyTypeFlags { if x != nil { - return x.Dst + return x.Flags } return nil } -func (x *FlowPfcPause) GetSrc() *PatternFlowPfcPauseSrc { - if x != nil { - return x.Src +func (x *BgpAttributesSegmentRoutingPolicyTypeD) GetSrAlgorithm() uint32 { + if x != nil && x.SrAlgorithm != nil { + return *x.SrAlgorithm } - return nil + return 0 } -func (x *FlowPfcPause) GetEtherType() *PatternFlowPfcPauseEtherType { - if x != nil { - return x.EtherType +func (x *BgpAttributesSegmentRoutingPolicyTypeD) GetIpv6NodeAddress() string { + if x != nil && x.Ipv6NodeAddress != nil { + return *x.Ipv6NodeAddress } - return nil + return "" } -func (x *FlowPfcPause) GetControlOpCode() *PatternFlowPfcPauseControlOpCode { +func (x *BgpAttributesSegmentRoutingPolicyTypeD) GetSrMplsSid() *BgpAttributesSidMpls { if x != nil { - return x.ControlOpCode + return x.SrMplsSid } return nil } -func (x *FlowPfcPause) GetClassEnableVector() *PatternFlowPfcPauseClassEnableVector { - if x != nil { - return x.ClassEnableVector - } - return nil +// Type E: IPv4 Address and Local Interface ID with optional SID +// It is encoded as a Segment of Type 5 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeE struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description missing in models + Flags *BgpAttributesSegmentRoutingPolicyTypeFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + // The Interface Index as defined in [RFC8664]. + // default = 0 + LocalInterfaceId *uint32 `protobuf:"varint,2,opt,name=local_interface_id,json=localInterfaceId,proto3,oneof" json:"local_interface_id,omitempty"` + // IPv4 address representing a node. + // default = 0.0.0.0 + Ipv4NodeAddress *string `protobuf:"bytes,3,opt,name=ipv4_node_address,json=ipv4NodeAddress,proto3,oneof" json:"ipv4_node_address,omitempty"` + // Optional SR-MPLS SID. + SrMplsSid *BgpAttributesSidMpls `protobuf:"bytes,4,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` } -func (x *FlowPfcPause) GetPauseClass_0() *PatternFlowPfcPausePauseClass0 { - if x != nil { - return x.PauseClass_0 +func (x *BgpAttributesSegmentRoutingPolicyTypeE) Reset() { + *x = BgpAttributesSegmentRoutingPolicyTypeE{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[210] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *FlowPfcPause) GetPauseClass_1() *PatternFlowPfcPausePauseClass1 { - if x != nil { - return x.PauseClass_1 - } - return nil +func (x *BgpAttributesSegmentRoutingPolicyTypeE) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *FlowPfcPause) GetPauseClass_2() *PatternFlowPfcPausePauseClass2 { - if x != nil { - return x.PauseClass_2 +func (*BgpAttributesSegmentRoutingPolicyTypeE) ProtoMessage() {} + +func (x *BgpAttributesSegmentRoutingPolicyTypeE) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[210] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *FlowPfcPause) GetPauseClass_3() *PatternFlowPfcPausePauseClass3 { - if x != nil { - return x.PauseClass_3 - } - return nil +// Deprecated: Use BgpAttributesSegmentRoutingPolicyTypeE.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicyTypeE) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{210} } -func (x *FlowPfcPause) GetPauseClass_4() *PatternFlowPfcPausePauseClass4 { +func (x *BgpAttributesSegmentRoutingPolicyTypeE) GetFlags() *BgpAttributesSegmentRoutingPolicyTypeFlags { if x != nil { - return x.PauseClass_4 + return x.Flags } return nil } -func (x *FlowPfcPause) GetPauseClass_5() *PatternFlowPfcPausePauseClass5 { - if x != nil { - return x.PauseClass_5 +func (x *BgpAttributesSegmentRoutingPolicyTypeE) GetLocalInterfaceId() uint32 { + if x != nil && x.LocalInterfaceId != nil { + return *x.LocalInterfaceId } - return nil + return 0 } -func (x *FlowPfcPause) GetPauseClass_6() *PatternFlowPfcPausePauseClass6 { - if x != nil { - return x.PauseClass_6 +func (x *BgpAttributesSegmentRoutingPolicyTypeE) GetIpv4NodeAddress() string { + if x != nil && x.Ipv4NodeAddress != nil { + return *x.Ipv4NodeAddress } - return nil + return "" } -func (x *FlowPfcPause) GetPauseClass_7() *PatternFlowPfcPausePauseClass7 { +func (x *BgpAttributesSegmentRoutingPolicyTypeE) GetSrMplsSid() *BgpAttributesSidMpls { if x != nil { - return x.PauseClass_7 + return x.SrMplsSid } return nil } -// IEEE 802.3x global ethernet pause packet header -type FlowEthernetPause struct { +// Type F: IPv4 Local and Remote addresses with optional SR-MPLS SID. +// It is encoded as a Segment of Type 6 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeF struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - Dst *PatternFlowEthernetPauseDst `protobuf:"bytes,1,opt,name=dst,proto3" json:"dst,omitempty"` - // Description missing in models - Src *PatternFlowEthernetPauseSrc `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"` - // Description missing in models - EtherType *PatternFlowEthernetPauseEtherType `protobuf:"bytes,3,opt,name=ether_type,json=etherType,proto3" json:"ether_type,omitempty"` - // Description missing in models - ControlOpCode *PatternFlowEthernetPauseControlOpCode `protobuf:"bytes,4,opt,name=control_op_code,json=controlOpCode,proto3" json:"control_op_code,omitempty"` - // Description missing in models - Time *PatternFlowEthernetPauseTime `protobuf:"bytes,5,opt,name=time,proto3" json:"time,omitempty"` + Flags *BgpAttributesSegmentRoutingPolicyTypeFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + // Local IPv4 Address. + // default = 0.0.0.0 + LocalIpv4Address *string `protobuf:"bytes,2,opt,name=local_ipv4_address,json=localIpv4Address,proto3,oneof" json:"local_ipv4_address,omitempty"` + // Remote IPv4 Address. + // default = 0.0.0.0 + RemoteIpv4Address *string `protobuf:"bytes,3,opt,name=remote_ipv4_address,json=remoteIpv4Address,proto3,oneof" json:"remote_ipv4_address,omitempty"` + // Optional SR-MPLS SID. + SrMplsSid *BgpAttributesSidMpls `protobuf:"bytes,4,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` } -func (x *FlowEthernetPause) Reset() { - *x = FlowEthernetPause{} +func (x *BgpAttributesSegmentRoutingPolicyTypeF) Reset() { + *x = BgpAttributesSegmentRoutingPolicyTypeF{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[206] + mi := &file_otg_proto_msgTypes[211] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowEthernetPause) String() string { +func (x *BgpAttributesSegmentRoutingPolicyTypeF) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowEthernetPause) ProtoMessage() {} +func (*BgpAttributesSegmentRoutingPolicyTypeF) ProtoMessage() {} -func (x *FlowEthernetPause) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[206] +func (x *BgpAttributesSegmentRoutingPolicyTypeF) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[211] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -41044,101 +42740,85 @@ func (x *FlowEthernetPause) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowEthernetPause.ProtoReflect.Descriptor instead. -func (*FlowEthernetPause) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{206} -} - -func (x *FlowEthernetPause) GetDst() *PatternFlowEthernetPauseDst { - if x != nil { - return x.Dst - } - return nil +// Deprecated: Use BgpAttributesSegmentRoutingPolicyTypeF.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicyTypeF) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{211} } -func (x *FlowEthernetPause) GetSrc() *PatternFlowEthernetPauseSrc { +func (x *BgpAttributesSegmentRoutingPolicyTypeF) GetFlags() *BgpAttributesSegmentRoutingPolicyTypeFlags { if x != nil { - return x.Src + return x.Flags } return nil } -func (x *FlowEthernetPause) GetEtherType() *PatternFlowEthernetPauseEtherType { - if x != nil { - return x.EtherType +func (x *BgpAttributesSegmentRoutingPolicyTypeF) GetLocalIpv4Address() string { + if x != nil && x.LocalIpv4Address != nil { + return *x.LocalIpv4Address } - return nil + return "" } -func (x *FlowEthernetPause) GetControlOpCode() *PatternFlowEthernetPauseControlOpCode { - if x != nil { - return x.ControlOpCode +func (x *BgpAttributesSegmentRoutingPolicyTypeF) GetRemoteIpv4Address() string { + if x != nil && x.RemoteIpv4Address != nil { + return *x.RemoteIpv4Address } - return nil + return "" } -func (x *FlowEthernetPause) GetTime() *PatternFlowEthernetPauseTime { +func (x *BgpAttributesSegmentRoutingPolicyTypeF) GetSrMplsSid() *BgpAttributesSidMpls { if x != nil { - return x.Time + return x.SrMplsSid } return nil } -// TCP packet header -type FlowTcp struct { +// Type G: IPv6 Address, Interface ID for local and remote pair with optional SID for +// SR MPLS. +// It is encoded as a Segment of Type 7 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeG struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - SrcPort *PatternFlowTcpSrcPort `protobuf:"bytes,1,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` - // Description missing in models - DstPort *PatternFlowTcpDstPort `protobuf:"bytes,2,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` - // Description missing in models - SeqNum *PatternFlowTcpSeqNum `protobuf:"bytes,3,opt,name=seq_num,json=seqNum,proto3" json:"seq_num,omitempty"` - // Description missing in models - AckNum *PatternFlowTcpAckNum `protobuf:"bytes,4,opt,name=ack_num,json=ackNum,proto3" json:"ack_num,omitempty"` - // Description missing in models - DataOffset *PatternFlowTcpDataOffset `protobuf:"bytes,5,opt,name=data_offset,json=dataOffset,proto3" json:"data_offset,omitempty"` - // Description missing in models - EcnNs *PatternFlowTcpEcnNs `protobuf:"bytes,6,opt,name=ecn_ns,json=ecnNs,proto3" json:"ecn_ns,omitempty"` - // Description missing in models - EcnCwr *PatternFlowTcpEcnCwr `protobuf:"bytes,7,opt,name=ecn_cwr,json=ecnCwr,proto3" json:"ecn_cwr,omitempty"` - // Description missing in models - EcnEcho *PatternFlowTcpEcnEcho `protobuf:"bytes,8,opt,name=ecn_echo,json=ecnEcho,proto3" json:"ecn_echo,omitempty"` - // Description missing in models - CtlUrg *PatternFlowTcpCtlUrg `protobuf:"bytes,9,opt,name=ctl_urg,json=ctlUrg,proto3" json:"ctl_urg,omitempty"` - // Description missing in models - CtlAck *PatternFlowTcpCtlAck `protobuf:"bytes,10,opt,name=ctl_ack,json=ctlAck,proto3" json:"ctl_ack,omitempty"` - // Description missing in models - CtlPsh *PatternFlowTcpCtlPsh `protobuf:"bytes,11,opt,name=ctl_psh,json=ctlPsh,proto3" json:"ctl_psh,omitempty"` - // Description missing in models - CtlRst *PatternFlowTcpCtlRst `protobuf:"bytes,12,opt,name=ctl_rst,json=ctlRst,proto3" json:"ctl_rst,omitempty"` - // Description missing in models - CtlSyn *PatternFlowTcpCtlSyn `protobuf:"bytes,13,opt,name=ctl_syn,json=ctlSyn,proto3" json:"ctl_syn,omitempty"` - // Description missing in models - CtlFin *PatternFlowTcpCtlFin `protobuf:"bytes,14,opt,name=ctl_fin,json=ctlFin,proto3" json:"ctl_fin,omitempty"` - // Description missing in models - Window *PatternFlowTcpWindow `protobuf:"bytes,15,opt,name=window,proto3" json:"window,omitempty"` + Flags *BgpAttributesSegmentRoutingPolicyTypeFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + // The local Interface Index as defined in [RFC8664]. + // default = 0 + LocalInterfaceId *uint32 `protobuf:"varint,2,opt,name=local_interface_id,json=localInterfaceId,proto3,oneof" json:"local_interface_id,omitempty"` + // The IPv6 address representing the local node. + // default = 0::0 + LocalIpv6NodeAddress *string `protobuf:"bytes,3,opt,name=local_ipv6_node_address,json=localIpv6NodeAddress,proto3,oneof" json:"local_ipv6_node_address,omitempty"` + // The remote Interface Index as defined in [RFC8664]. The value MAY be set to zero + // when the local node address and interface identifiers are sufficient to describe + // the link. + // default = 0 + RemoteInterfaceId *uint32 `protobuf:"varint,4,opt,name=remote_interface_id,json=remoteInterfaceId,proto3,oneof" json:"remote_interface_id,omitempty"` + // IPv6 address representing the remote node. The value MAY be set to zero when the + // local node address and interface identifiers are sufficient to describe the link. + // default = 0::0 + RemoteIpv6NodeAddress *string `protobuf:"bytes,5,opt,name=remote_ipv6_node_address,json=remoteIpv6NodeAddress,proto3,oneof" json:"remote_ipv6_node_address,omitempty"` + // Optional SR-MPLS SID. + SrMplsSid *BgpAttributesSidMpls `protobuf:"bytes,6,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` } -func (x *FlowTcp) Reset() { - *x = FlowTcp{} +func (x *BgpAttributesSegmentRoutingPolicyTypeG) Reset() { + *x = BgpAttributesSegmentRoutingPolicyTypeG{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[207] + mi := &file_otg_proto_msgTypes[212] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowTcp) String() string { +func (x *BgpAttributesSegmentRoutingPolicyTypeG) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowTcp) ProtoMessage() {} +func (*BgpAttributesSegmentRoutingPolicyTypeG) ProtoMessage() {} -func (x *FlowTcp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[207] +func (x *BgpAttributesSegmentRoutingPolicyTypeG) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[212] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -41149,149 +42829,171 @@ func (x *FlowTcp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowTcp.ProtoReflect.Descriptor instead. -func (*FlowTcp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{207} +// Deprecated: Use BgpAttributesSegmentRoutingPolicyTypeG.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicyTypeG) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{212} } -func (x *FlowTcp) GetSrcPort() *PatternFlowTcpSrcPort { +func (x *BgpAttributesSegmentRoutingPolicyTypeG) GetFlags() *BgpAttributesSegmentRoutingPolicyTypeFlags { if x != nil { - return x.SrcPort + return x.Flags } return nil } -func (x *FlowTcp) GetDstPort() *PatternFlowTcpDstPort { - if x != nil { - return x.DstPort +func (x *BgpAttributesSegmentRoutingPolicyTypeG) GetLocalInterfaceId() uint32 { + if x != nil && x.LocalInterfaceId != nil { + return *x.LocalInterfaceId } - return nil + return 0 } -func (x *FlowTcp) GetSeqNum() *PatternFlowTcpSeqNum { - if x != nil { - return x.SeqNum +func (x *BgpAttributesSegmentRoutingPolicyTypeG) GetLocalIpv6NodeAddress() string { + if x != nil && x.LocalIpv6NodeAddress != nil { + return *x.LocalIpv6NodeAddress } - return nil + return "" } -func (x *FlowTcp) GetAckNum() *PatternFlowTcpAckNum { - if x != nil { - return x.AckNum +func (x *BgpAttributesSegmentRoutingPolicyTypeG) GetRemoteInterfaceId() uint32 { + if x != nil && x.RemoteInterfaceId != nil { + return *x.RemoteInterfaceId } - return nil + return 0 } -func (x *FlowTcp) GetDataOffset() *PatternFlowTcpDataOffset { - if x != nil { - return x.DataOffset +func (x *BgpAttributesSegmentRoutingPolicyTypeG) GetRemoteIpv6NodeAddress() string { + if x != nil && x.RemoteIpv6NodeAddress != nil { + return *x.RemoteIpv6NodeAddress } - return nil + return "" } -func (x *FlowTcp) GetEcnNs() *PatternFlowTcpEcnNs { +func (x *BgpAttributesSegmentRoutingPolicyTypeG) GetSrMplsSid() *BgpAttributesSidMpls { if x != nil { - return x.EcnNs + return x.SrMplsSid } return nil } -func (x *FlowTcp) GetEcnCwr() *PatternFlowTcpEcnCwr { - if x != nil { - return x.EcnCwr - } - return nil +// Type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. +// It is encoded as a Segment of Type 8 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeH struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description missing in models + Flags *BgpAttributesSegmentRoutingPolicyTypeFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + // Local IPv6 Address. + // default = 0::0 + LocalIpv6Address *string `protobuf:"bytes,2,opt,name=local_ipv6_address,json=localIpv6Address,proto3,oneof" json:"local_ipv6_address,omitempty"` + // Remote IPv6 Address. + // default = 0::0 + RemoteIpv6Address *string `protobuf:"bytes,3,opt,name=remote_ipv6_address,json=remoteIpv6Address,proto3,oneof" json:"remote_ipv6_address,omitempty"` + // Optional SR-MPLS SID. + SrMplsSid *BgpAttributesSidMpls `protobuf:"bytes,6,opt,name=sr_mpls_sid,json=srMplsSid,proto3" json:"sr_mpls_sid,omitempty"` } -func (x *FlowTcp) GetEcnEcho() *PatternFlowTcpEcnEcho { - if x != nil { - return x.EcnEcho +func (x *BgpAttributesSegmentRoutingPolicyTypeH) Reset() { + *x = BgpAttributesSegmentRoutingPolicyTypeH{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[213] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *FlowTcp) GetCtlUrg() *PatternFlowTcpCtlUrg { - if x != nil { - return x.CtlUrg - } - return nil +func (x *BgpAttributesSegmentRoutingPolicyTypeH) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *FlowTcp) GetCtlAck() *PatternFlowTcpCtlAck { - if x != nil { - return x.CtlAck +func (*BgpAttributesSegmentRoutingPolicyTypeH) ProtoMessage() {} + +func (x *BgpAttributesSegmentRoutingPolicyTypeH) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[213] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *FlowTcp) GetCtlPsh() *PatternFlowTcpCtlPsh { - if x != nil { - return x.CtlPsh - } - return nil +// Deprecated: Use BgpAttributesSegmentRoutingPolicyTypeH.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicyTypeH) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{213} } -func (x *FlowTcp) GetCtlRst() *PatternFlowTcpCtlRst { +func (x *BgpAttributesSegmentRoutingPolicyTypeH) GetFlags() *BgpAttributesSegmentRoutingPolicyTypeFlags { if x != nil { - return x.CtlRst + return x.Flags } return nil } -func (x *FlowTcp) GetCtlSyn() *PatternFlowTcpCtlSyn { - if x != nil { - return x.CtlSyn +func (x *BgpAttributesSegmentRoutingPolicyTypeH) GetLocalIpv6Address() string { + if x != nil && x.LocalIpv6Address != nil { + return *x.LocalIpv6Address } - return nil + return "" } -func (x *FlowTcp) GetCtlFin() *PatternFlowTcpCtlFin { - if x != nil { - return x.CtlFin +func (x *BgpAttributesSegmentRoutingPolicyTypeH) GetRemoteIpv6Address() string { + if x != nil && x.RemoteIpv6Address != nil { + return *x.RemoteIpv6Address } - return nil + return "" } -func (x *FlowTcp) GetWindow() *PatternFlowTcpWindow { +func (x *BgpAttributesSegmentRoutingPolicyTypeH) GetSrMplsSid() *BgpAttributesSidMpls { if x != nil { - return x.Window + return x.SrMplsSid } return nil } -// UDP packet header -type FlowUdp struct { +// Type I: IPv6 Node Address with optional SR Algorithm and optional SRv6 SID. +// It is encoded as a Segment of Type 14 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeI struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - SrcPort *PatternFlowUdpSrcPort `protobuf:"bytes,1,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` - // Description missing in models - DstPort *PatternFlowUdpDstPort `protobuf:"bytes,2,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` + Flags *BgpAttributesSegmentRoutingPolicyTypeFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + // SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be + // set to 0 on transmission and ignored on receipt. + // default = 0 + SrAlgorithm *uint32 `protobuf:"varint,2,opt,name=sr_algorithm,json=srAlgorithm,proto3,oneof" json:"sr_algorithm,omitempty"` + // IPv6 address representing a node. + // default = 0::0 + Ipv6NodeAddress *string `protobuf:"bytes,3,opt,name=ipv6_node_address,json=ipv6NodeAddress,proto3,oneof" json:"ipv6_node_address,omitempty"` // Description missing in models - Length *PatternFlowUdpLength `protobuf:"bytes,3,opt,name=length,proto3" json:"length,omitempty"` + Srv6Sid *BgpAttributesSidSrv6 `protobuf:"bytes,4,opt,name=srv6_sid,json=srv6Sid,proto3" json:"srv6_sid,omitempty"` // Description missing in models - Checksum *PatternFlowUdpChecksum `protobuf:"bytes,4,opt,name=checksum,proto3" json:"checksum,omitempty"` + Srv6EndpointBehavior *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure `protobuf:"bytes,5,opt,name=srv6_endpoint_behavior,json=srv6EndpointBehavior,proto3" json:"srv6_endpoint_behavior,omitempty"` } -func (x *FlowUdp) Reset() { - *x = FlowUdp{} +func (x *BgpAttributesSegmentRoutingPolicyTypeI) Reset() { + *x = BgpAttributesSegmentRoutingPolicyTypeI{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[208] + mi := &file_otg_proto_msgTypes[214] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowUdp) String() string { +func (x *BgpAttributesSegmentRoutingPolicyTypeI) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowUdp) ProtoMessage() {} +func (*BgpAttributesSegmentRoutingPolicyTypeI) ProtoMessage() {} -func (x *FlowUdp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[208] +func (x *BgpAttributesSegmentRoutingPolicyTypeI) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[214] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -41302,76 +43004,98 @@ func (x *FlowUdp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowUdp.ProtoReflect.Descriptor instead. -func (*FlowUdp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{208} +// Deprecated: Use BgpAttributesSegmentRoutingPolicyTypeI.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicyTypeI) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{214} } -func (x *FlowUdp) GetSrcPort() *PatternFlowUdpSrcPort { +func (x *BgpAttributesSegmentRoutingPolicyTypeI) GetFlags() *BgpAttributesSegmentRoutingPolicyTypeFlags { if x != nil { - return x.SrcPort + return x.Flags } return nil } -func (x *FlowUdp) GetDstPort() *PatternFlowUdpDstPort { - if x != nil { - return x.DstPort +func (x *BgpAttributesSegmentRoutingPolicyTypeI) GetSrAlgorithm() uint32 { + if x != nil && x.SrAlgorithm != nil { + return *x.SrAlgorithm } - return nil + return 0 } -func (x *FlowUdp) GetLength() *PatternFlowUdpLength { +func (x *BgpAttributesSegmentRoutingPolicyTypeI) GetIpv6NodeAddress() string { + if x != nil && x.Ipv6NodeAddress != nil { + return *x.Ipv6NodeAddress + } + return "" +} + +func (x *BgpAttributesSegmentRoutingPolicyTypeI) GetSrv6Sid() *BgpAttributesSidSrv6 { if x != nil { - return x.Length + return x.Srv6Sid } return nil } -func (x *FlowUdp) GetChecksum() *PatternFlowUdpChecksum { +func (x *BgpAttributesSegmentRoutingPolicyTypeI) GetSrv6EndpointBehavior() *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { if x != nil { - return x.Checksum + return x.Srv6EndpointBehavior } return nil } -// Standard GRE packet header (RFC2784) -type FlowGre struct { +// Type J: IPv6 Address, Interface ID for local and remote pair for SRv6 with optional +// SID. +// It is encoded as a Segment of Type 15 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeJ struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - ChecksumPresent *PatternFlowGreChecksumPresent `protobuf:"bytes,1,opt,name=checksum_present,json=checksumPresent,proto3" json:"checksum_present,omitempty"` - // Description missing in models - Reserved0 *PatternFlowGreReserved0 `protobuf:"bytes,2,opt,name=reserved0,proto3" json:"reserved0,omitempty"` - // Description missing in models - Version *PatternFlowGreVersion `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - // Description missing in models - Protocol *PatternFlowGreProtocol `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"` + Flags *BgpAttributesSegmentRoutingPolicyTypeFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + // SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be + // set to 0 on transmission and ignored on receipt. + // default = 0 + SrAlgorithm *uint32 `protobuf:"varint,2,opt,name=sr_algorithm,json=srAlgorithm,proto3,oneof" json:"sr_algorithm,omitempty"` + // The local Interface Index as defined in [RFC8664]. + // default = 0 + LocalInterfaceId *uint32 `protobuf:"varint,3,opt,name=local_interface_id,json=localInterfaceId,proto3,oneof" json:"local_interface_id,omitempty"` + // The IPv6 address representing the local node. + // default = 0::0 + LocalIpv6NodeAddress *string `protobuf:"bytes,4,opt,name=local_ipv6_node_address,json=localIpv6NodeAddress,proto3,oneof" json:"local_ipv6_node_address,omitempty"` + // The remote Interface Index as defined in [RFC8664]. The value MAY be set to zero + // when the local node address and interface identifiers are sufficient to describe + // the link. + // default = 0 + RemoteInterfaceId *uint32 `protobuf:"varint,5,opt,name=remote_interface_id,json=remoteInterfaceId,proto3,oneof" json:"remote_interface_id,omitempty"` + // IPv6 address representing the remote node. The value MAY be set to zero when the + // local node address and interface identifiers are sufficient to describe the link. + // default = 0::0 + RemoteIpv6NodeAddress *string `protobuf:"bytes,6,opt,name=remote_ipv6_node_address,json=remoteIpv6NodeAddress,proto3,oneof" json:"remote_ipv6_node_address,omitempty"` // Description missing in models - Checksum *PatternFlowGreChecksum `protobuf:"bytes,5,opt,name=checksum,proto3" json:"checksum,omitempty"` + Srv6Sid *BgpAttributesSidSrv6 `protobuf:"bytes,7,opt,name=srv6_sid,json=srv6Sid,proto3" json:"srv6_sid,omitempty"` // Description missing in models - Reserved1 *PatternFlowGreReserved1 `protobuf:"bytes,6,opt,name=reserved1,proto3" json:"reserved1,omitempty"` + Srv6EndpointBehavior *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure `protobuf:"bytes,8,opt,name=srv6_endpoint_behavior,json=srv6EndpointBehavior,proto3" json:"srv6_endpoint_behavior,omitempty"` } -func (x *FlowGre) Reset() { - *x = FlowGre{} +func (x *BgpAttributesSegmentRoutingPolicyTypeJ) Reset() { + *x = BgpAttributesSegmentRoutingPolicyTypeJ{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[209] + mi := &file_otg_proto_msgTypes[215] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowGre) String() string { +func (x *BgpAttributesSegmentRoutingPolicyTypeJ) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowGre) ProtoMessage() {} +func (*BgpAttributesSegmentRoutingPolicyTypeJ) ProtoMessage() {} -func (x *FlowGre) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[209] +func (x *BgpAttributesSegmentRoutingPolicyTypeJ) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[215] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -41382,104 +43106,109 @@ func (x *FlowGre) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowGre.ProtoReflect.Descriptor instead. -func (*FlowGre) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{209} +// Deprecated: Use BgpAttributesSegmentRoutingPolicyTypeJ.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicyTypeJ) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{215} } -func (x *FlowGre) GetChecksumPresent() *PatternFlowGreChecksumPresent { +func (x *BgpAttributesSegmentRoutingPolicyTypeJ) GetFlags() *BgpAttributesSegmentRoutingPolicyTypeFlags { if x != nil { - return x.ChecksumPresent + return x.Flags } return nil } -func (x *FlowGre) GetReserved0() *PatternFlowGreReserved0 { - if x != nil { - return x.Reserved0 +func (x *BgpAttributesSegmentRoutingPolicyTypeJ) GetSrAlgorithm() uint32 { + if x != nil && x.SrAlgorithm != nil { + return *x.SrAlgorithm } - return nil + return 0 } -func (x *FlowGre) GetVersion() *PatternFlowGreVersion { - if x != nil { - return x.Version +func (x *BgpAttributesSegmentRoutingPolicyTypeJ) GetLocalInterfaceId() uint32 { + if x != nil && x.LocalInterfaceId != nil { + return *x.LocalInterfaceId } - return nil + return 0 } -func (x *FlowGre) GetProtocol() *PatternFlowGreProtocol { - if x != nil { - return x.Protocol +func (x *BgpAttributesSegmentRoutingPolicyTypeJ) GetLocalIpv6NodeAddress() string { + if x != nil && x.LocalIpv6NodeAddress != nil { + return *x.LocalIpv6NodeAddress } - return nil + return "" } -func (x *FlowGre) GetChecksum() *PatternFlowGreChecksum { +func (x *BgpAttributesSegmentRoutingPolicyTypeJ) GetRemoteInterfaceId() uint32 { + if x != nil && x.RemoteInterfaceId != nil { + return *x.RemoteInterfaceId + } + return 0 +} + +func (x *BgpAttributesSegmentRoutingPolicyTypeJ) GetRemoteIpv6NodeAddress() string { + if x != nil && x.RemoteIpv6NodeAddress != nil { + return *x.RemoteIpv6NodeAddress + } + return "" +} + +func (x *BgpAttributesSegmentRoutingPolicyTypeJ) GetSrv6Sid() *BgpAttributesSidSrv6 { if x != nil { - return x.Checksum + return x.Srv6Sid } return nil } -func (x *FlowGre) GetReserved1() *PatternFlowGreReserved1 { +func (x *BgpAttributesSegmentRoutingPolicyTypeJ) GetSrv6EndpointBehavior() *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { if x != nil { - return x.Reserved1 + return x.Srv6EndpointBehavior } return nil } -// GTPv1 packet header -type FlowGtpv1 struct { +// Type K: IPv6 Local and Remote addresses for SRv6 with optional SID. +// It is encoded as a Segment of Type 16 in the SEGMENT_LIST sub-tlv. +type BgpAttributesSegmentRoutingPolicyTypeK struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - Version *PatternFlowGtpv1Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // Description missing in models - ProtocolType *PatternFlowGtpv1ProtocolType `protobuf:"bytes,2,opt,name=protocol_type,json=protocolType,proto3" json:"protocol_type,omitempty"` - // Description missing in models - Reserved *PatternFlowGtpv1Reserved `protobuf:"bytes,3,opt,name=reserved,proto3" json:"reserved,omitempty"` - // Description missing in models - EFlag *PatternFlowGtpv1EFlag `protobuf:"bytes,4,opt,name=e_flag,json=eFlag,proto3" json:"e_flag,omitempty"` - // Description missing in models - SFlag *PatternFlowGtpv1SFlag `protobuf:"bytes,5,opt,name=s_flag,json=sFlag,proto3" json:"s_flag,omitempty"` - // Description missing in models - PnFlag *PatternFlowGtpv1PnFlag `protobuf:"bytes,6,opt,name=pn_flag,json=pnFlag,proto3" json:"pn_flag,omitempty"` - // Description missing in models - MessageType *PatternFlowGtpv1MessageType `protobuf:"bytes,7,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"` - // Description missing in models - MessageLength *PatternFlowGtpv1MessageLength `protobuf:"bytes,8,opt,name=message_length,json=messageLength,proto3" json:"message_length,omitempty"` - // Description missing in models - Teid *PatternFlowGtpv1Teid `protobuf:"bytes,9,opt,name=teid,proto3" json:"teid,omitempty"` - // Description missing in models - SquenceNumber *PatternFlowGtpv1SquenceNumber `protobuf:"bytes,10,opt,name=squence_number,json=squenceNumber,proto3" json:"squence_number,omitempty"` + Flags *BgpAttributesSegmentRoutingPolicyTypeFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + // SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be + // set to 0 on transmission and ignored on receipt. + // default = 0 + SrAlgorithm *uint32 `protobuf:"varint,2,opt,name=sr_algorithm,json=srAlgorithm,proto3,oneof" json:"sr_algorithm,omitempty"` + // Local IPv6 Address. + // default = 0::0 + LocalIpv6Address *string `protobuf:"bytes,3,opt,name=local_ipv6_address,json=localIpv6Address,proto3,oneof" json:"local_ipv6_address,omitempty"` + // Remote IPv6 Address. + // default = 0::0 + RemoteIpv6Address *string `protobuf:"bytes,4,opt,name=remote_ipv6_address,json=remoteIpv6Address,proto3,oneof" json:"remote_ipv6_address,omitempty"` // Description missing in models - NPduNumber *PatternFlowGtpv1NPduNumber `protobuf:"bytes,11,opt,name=n_pdu_number,json=nPduNumber,proto3" json:"n_pdu_number,omitempty"` + Srv6Sid *BgpAttributesSidSrv6 `protobuf:"bytes,5,opt,name=srv6_sid,json=srv6Sid,proto3" json:"srv6_sid,omitempty"` // Description missing in models - NextExtensionHeaderType *PatternFlowGtpv1NextExtensionHeaderType `protobuf:"bytes,12,opt,name=next_extension_header_type,json=nextExtensionHeaderType,proto3" json:"next_extension_header_type,omitempty"` - // A list of optional extension headers. - ExtensionHeaders []*FlowGtpExtension `protobuf:"bytes,13,rep,name=extension_headers,json=extensionHeaders,proto3" json:"extension_headers,omitempty"` + Srv6EndpointBehavior *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure `protobuf:"bytes,6,opt,name=srv6_endpoint_behavior,json=srv6EndpointBehavior,proto3" json:"srv6_endpoint_behavior,omitempty"` } -func (x *FlowGtpv1) Reset() { - *x = FlowGtpv1{} +func (x *BgpAttributesSegmentRoutingPolicyTypeK) Reset() { + *x = BgpAttributesSegmentRoutingPolicyTypeK{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[210] + mi := &file_otg_proto_msgTypes[216] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowGtpv1) String() string { +func (x *BgpAttributesSegmentRoutingPolicyTypeK) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowGtpv1) ProtoMessage() {} +func (*BgpAttributesSegmentRoutingPolicyTypeK) ProtoMessage() {} -func (x *FlowGtpv1) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[210] +func (x *BgpAttributesSegmentRoutingPolicyTypeK) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[216] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -41490,133 +43219,193 @@ func (x *FlowGtpv1) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowGtpv1.ProtoReflect.Descriptor instead. -func (*FlowGtpv1) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{210} +// Deprecated: Use BgpAttributesSegmentRoutingPolicyTypeK.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicyTypeK) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{216} } -func (x *FlowGtpv1) GetVersion() *PatternFlowGtpv1Version { +func (x *BgpAttributesSegmentRoutingPolicyTypeK) GetFlags() *BgpAttributesSegmentRoutingPolicyTypeFlags { if x != nil { - return x.Version + return x.Flags } return nil } -func (x *FlowGtpv1) GetProtocolType() *PatternFlowGtpv1ProtocolType { - if x != nil { - return x.ProtocolType +func (x *BgpAttributesSegmentRoutingPolicyTypeK) GetSrAlgorithm() uint32 { + if x != nil && x.SrAlgorithm != nil { + return *x.SrAlgorithm } - return nil + return 0 } -func (x *FlowGtpv1) GetReserved() *PatternFlowGtpv1Reserved { - if x != nil { - return x.Reserved +func (x *BgpAttributesSegmentRoutingPolicyTypeK) GetLocalIpv6Address() string { + if x != nil && x.LocalIpv6Address != nil { + return *x.LocalIpv6Address } - return nil + return "" } -func (x *FlowGtpv1) GetEFlag() *PatternFlowGtpv1EFlag { - if x != nil { - return x.EFlag +func (x *BgpAttributesSegmentRoutingPolicyTypeK) GetRemoteIpv6Address() string { + if x != nil && x.RemoteIpv6Address != nil { + return *x.RemoteIpv6Address } - return nil + return "" } -func (x *FlowGtpv1) GetSFlag() *PatternFlowGtpv1SFlag { +func (x *BgpAttributesSegmentRoutingPolicyTypeK) GetSrv6Sid() *BgpAttributesSidSrv6 { if x != nil { - return x.SFlag + return x.Srv6Sid } return nil } -func (x *FlowGtpv1) GetPnFlag() *PatternFlowGtpv1PnFlag { +func (x *BgpAttributesSegmentRoutingPolicyTypeK) GetSrv6EndpointBehavior() *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { if x != nil { - return x.PnFlag + return x.Srv6EndpointBehavior } return nil } -func (x *FlowGtpv1) GetMessageType() *PatternFlowGtpv1MessageType { - if x != nil { - return x.MessageType - } - return nil +// Flags for each Segment in SEGMENT_LIST sub-tlv. +// - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 +// - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, +// D , I , J and K . +// - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding +// applicable to Segment Types B , I , J and K . +// - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID +// depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). +// This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. +type BgpAttributesSegmentRoutingPolicyTypeFlags struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates verification of segment data in is enabled. + // default = False + VFlag *bool `protobuf:"varint,1,opt,name=v_flag,json=vFlag,proto3,oneof" json:"v_flag,omitempty"` + // Indicates presence of SR Algorithm field applicable to Segment Types 3, 4, and 9. + // + // default = False + AFlag *bool `protobuf:"varint,2,opt,name=a_flag,json=aFlag,proto3,oneof" json:"a_flag,omitempty"` + // This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending + // on the segment type. + // default = False + SFlag *bool `protobuf:"varint,3,opt,name=s_flag,json=sFlag,proto3,oneof" json:"s_flag,omitempty"` + // Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding specified + // in Section 2.4.4.2.4 + // of draft-ietf-idr-sr-policy-safi-02. + // default = False + BFlag *bool `protobuf:"varint,4,opt,name=b_flag,json=bFlag,proto3,oneof" json:"b_flag,omitempty"` } -func (x *FlowGtpv1) GetMessageLength() *PatternFlowGtpv1MessageLength { - if x != nil { - return x.MessageLength +func (x *BgpAttributesSegmentRoutingPolicyTypeFlags) Reset() { + *x = BgpAttributesSegmentRoutingPolicyTypeFlags{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[217] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *FlowGtpv1) GetTeid() *PatternFlowGtpv1Teid { - if x != nil { - return x.Teid +func (x *BgpAttributesSegmentRoutingPolicyTypeFlags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpAttributesSegmentRoutingPolicyTypeFlags) ProtoMessage() {} + +func (x *BgpAttributesSegmentRoutingPolicyTypeFlags) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[217] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *FlowGtpv1) GetSquenceNumber() *PatternFlowGtpv1SquenceNumber { - if x != nil { - return x.SquenceNumber +// Deprecated: Use BgpAttributesSegmentRoutingPolicyTypeFlags.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicyTypeFlags) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{217} +} + +func (x *BgpAttributesSegmentRoutingPolicyTypeFlags) GetVFlag() bool { + if x != nil && x.VFlag != nil { + return *x.VFlag } - return nil + return false } -func (x *FlowGtpv1) GetNPduNumber() *PatternFlowGtpv1NPduNumber { - if x != nil { - return x.NPduNumber +func (x *BgpAttributesSegmentRoutingPolicyTypeFlags) GetAFlag() bool { + if x != nil && x.AFlag != nil { + return *x.AFlag } - return nil + return false } -func (x *FlowGtpv1) GetNextExtensionHeaderType() *PatternFlowGtpv1NextExtensionHeaderType { - if x != nil { - return x.NextExtensionHeaderType +func (x *BgpAttributesSegmentRoutingPolicyTypeFlags) GetSFlag() bool { + if x != nil && x.SFlag != nil { + return *x.SFlag } - return nil + return false } -func (x *FlowGtpv1) GetExtensionHeaders() []*FlowGtpExtension { - if x != nil { - return x.ExtensionHeaders +func (x *BgpAttributesSegmentRoutingPolicyTypeFlags) GetBFlag() bool { + if x != nil && x.BFlag != nil { + return *x.BFlag } - return nil + return false } -// Description missing in models -type FlowGtpExtension struct { +// Configuration for optional SRv6 Endpoint Behavior and SID Structure. Summation of +// lengths for Locator Block, Locator Node, Function, and Argument MUST be less than +// or equal to 128. - This is specified in draft-ietf-idr-sr-policy-safi-02 Section +// 2.4.4.2.4 +type BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - ExtensionLength *PatternFlowGtpExtensionExtensionLength `protobuf:"bytes,1,opt,name=extension_length,json=extensionLength,proto3" json:"extension_length,omitempty"` - // Description missing in models - Contents *PatternFlowGtpExtensionContents `protobuf:"bytes,2,opt,name=contents,proto3" json:"contents,omitempty"` - // Description missing in models - NextExtensionHeader *PatternFlowGtpExtensionNextExtensionHeader `protobuf:"bytes,3,opt,name=next_extension_header,json=nextExtensionHeader,proto3" json:"next_extension_header,omitempty"` + // This is a 2-octet field that is used to specify the SRv6 Endpoint Behavior code point + // for the SRv6 SID as defined + // in section 9.2 of [RFC8986]. When set with the value 0xFFFF (i.e., Opaque), the choice + // of SRv6 Endpoint Behavior is + // left to the headend. Well known 16-bit values for this field are available at + // https://www.iana.org/assignments/segment-routing/segment-routing.xhtml . + // default = ffff + EndpointBehaviour *string `protobuf:"bytes,1,opt,name=endpoint_behaviour,json=endpointBehaviour,proto3,oneof" json:"endpoint_behaviour,omitempty"` + // SRv6 SID Locator Block length in bits. + // default = 0 + LbLength *uint32 `protobuf:"varint,2,opt,name=lb_length,json=lbLength,proto3,oneof" json:"lb_length,omitempty"` + // SRv6 SID Locator Node length in bits. + // default = 0 + LnLength *uint32 `protobuf:"varint,3,opt,name=ln_length,json=lnLength,proto3,oneof" json:"ln_length,omitempty"` + // SRv6 SID Function length in bits. + // default = 0 + FuncLength *uint32 `protobuf:"varint,4,opt,name=func_length,json=funcLength,proto3,oneof" json:"func_length,omitempty"` + // SRv6 SID Arguments length in bits. + // default = 0 + ArgLength *uint32 `protobuf:"varint,5,opt,name=arg_length,json=argLength,proto3,oneof" json:"arg_length,omitempty"` } -func (x *FlowGtpExtension) Reset() { - *x = FlowGtpExtension{} +func (x *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) Reset() { + *x = BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[211] + mi := &file_otg_proto_msgTypes[218] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowGtpExtension) String() string { +func (x *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowGtpExtension) ProtoMessage() {} +func (*BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) ProtoMessage() {} -func (x *FlowGtpExtension) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[211] +func (x *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[218] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -41627,75 +43416,75 @@ func (x *FlowGtpExtension) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowGtpExtension.ProtoReflect.Descriptor instead. -func (*FlowGtpExtension) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{211} +// Deprecated: Use BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{218} } -func (x *FlowGtpExtension) GetExtensionLength() *PatternFlowGtpExtensionExtensionLength { - if x != nil { - return x.ExtensionLength +func (x *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) GetEndpointBehaviour() string { + if x != nil && x.EndpointBehaviour != nil { + return *x.EndpointBehaviour } - return nil + return "" } -func (x *FlowGtpExtension) GetContents() *PatternFlowGtpExtensionContents { - if x != nil { - return x.Contents +func (x *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) GetLbLength() uint32 { + if x != nil && x.LbLength != nil { + return *x.LbLength } - return nil + return 0 } -func (x *FlowGtpExtension) GetNextExtensionHeader() *PatternFlowGtpExtensionNextExtensionHeader { - if x != nil { - return x.NextExtensionHeader +func (x *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) GetLnLength() uint32 { + if x != nil && x.LnLength != nil { + return *x.LnLength } - return nil + return 0 } -// GTPv2 packet header -type FlowGtpv2 struct { +func (x *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) GetFuncLength() uint32 { + if x != nil && x.FuncLength != nil { + return *x.FuncLength + } + return 0 +} + +func (x *BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure) GetArgLength() uint32 { + if x != nil && x.ArgLength != nil { + return *x.ArgLength + } + return 0 +} + +// Optional field in the NLRI carrying the distinguisher for Segment Routing Policy +// NLRI with SAFI 73. +type BgpNLRIPrefixSegmentRoutingDistinguisher struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Version *PatternFlowGtpv2Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // Description missing in models - PiggybackingFlag *PatternFlowGtpv2PiggybackingFlag `protobuf:"bytes,2,opt,name=piggybacking_flag,json=piggybackingFlag,proto3" json:"piggybacking_flag,omitempty"` - // Description missing in models - TeidFlag *PatternFlowGtpv2TeidFlag `protobuf:"bytes,3,opt,name=teid_flag,json=teidFlag,proto3" json:"teid_flag,omitempty"` - // Description missing in models - Spare1 *PatternFlowGtpv2Spare1 `protobuf:"bytes,4,opt,name=spare1,proto3" json:"spare1,omitempty"` - // Description missing in models - MessageType *PatternFlowGtpv2MessageType `protobuf:"bytes,5,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"` - // Description missing in models - MessageLength *PatternFlowGtpv2MessageLength `protobuf:"bytes,6,opt,name=message_length,json=messageLength,proto3" json:"message_length,omitempty"` - // Description missing in models - Teid *PatternFlowGtpv2Teid `protobuf:"bytes,7,opt,name=teid,proto3" json:"teid,omitempty"` - // Description missing in models - SequenceNumber *PatternFlowGtpv2SequenceNumber `protobuf:"bytes,8,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"` - // Description missing in models - Spare2 *PatternFlowGtpv2Spare2 `protobuf:"bytes,9,opt,name=spare2,proto3" json:"spare2,omitempty"` + // The value of the optional Segment Routing distinguisher of the prefix. + // default = 1 + Value *uint32 `protobuf:"varint,1,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *FlowGtpv2) Reset() { - *x = FlowGtpv2{} +func (x *BgpNLRIPrefixSegmentRoutingDistinguisher) Reset() { + *x = BgpNLRIPrefixSegmentRoutingDistinguisher{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[212] + mi := &file_otg_proto_msgTypes[219] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowGtpv2) String() string { +func (x *BgpNLRIPrefixSegmentRoutingDistinguisher) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowGtpv2) ProtoMessage() {} +func (*BgpNLRIPrefixSegmentRoutingDistinguisher) ProtoMessage() {} -func (x *FlowGtpv2) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[212] +func (x *BgpNLRIPrefixSegmentRoutingDistinguisher) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[219] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -41706,117 +43495,111 @@ func (x *FlowGtpv2) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowGtpv2.ProtoReflect.Descriptor instead. -func (*FlowGtpv2) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{212} -} - -func (x *FlowGtpv2) GetVersion() *PatternFlowGtpv2Version { - if x != nil { - return x.Version - } - return nil -} - -func (x *FlowGtpv2) GetPiggybackingFlag() *PatternFlowGtpv2PiggybackingFlag { - if x != nil { - return x.PiggybackingFlag - } - return nil -} - -func (x *FlowGtpv2) GetTeidFlag() *PatternFlowGtpv2TeidFlag { - if x != nil { - return x.TeidFlag - } - return nil -} - -func (x *FlowGtpv2) GetSpare1() *PatternFlowGtpv2Spare1 { - if x != nil { - return x.Spare1 - } - return nil -} - -func (x *FlowGtpv2) GetMessageType() *PatternFlowGtpv2MessageType { - if x != nil { - return x.MessageType - } - return nil -} - -func (x *FlowGtpv2) GetMessageLength() *PatternFlowGtpv2MessageLength { - if x != nil { - return x.MessageLength - } - return nil -} - -func (x *FlowGtpv2) GetTeid() *PatternFlowGtpv2Teid { - if x != nil { - return x.Teid - } - return nil -} - -func (x *FlowGtpv2) GetSequenceNumber() *PatternFlowGtpv2SequenceNumber { - if x != nil { - return x.SequenceNumber - } - return nil +// Deprecated: Use BgpNLRIPrefixSegmentRoutingDistinguisher.ProtoReflect.Descriptor instead. +func (*BgpNLRIPrefixSegmentRoutingDistinguisher) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{219} } -func (x *FlowGtpv2) GetSpare2() *PatternFlowGtpv2Spare2 { - if x != nil { - return x.Spare2 +func (x *BgpNLRIPrefixSegmentRoutingDistinguisher) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } - return nil + return 0 } -// ARP packet header -type FlowArp struct { +// Configuration for BGPv6 peer settings and routes. +type BgpV6Peer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // IPv6 address of the BGP peer for the session + // required = true + PeerAddress *string `protobuf:"bytes,1,opt,name=peer_address,json=peerAddress,proto3,oneof" json:"peer_address,omitempty"` // Description missing in models - HardwareType *PatternFlowArpHardwareType `protobuf:"bytes,1,opt,name=hardware_type,json=hardwareType,proto3" json:"hardware_type,omitempty"` - // Description missing in models - ProtocolType *PatternFlowArpProtocolType `protobuf:"bytes,2,opt,name=protocol_type,json=protocolType,proto3" json:"protocol_type,omitempty"` - // Description missing in models - HardwareLength *PatternFlowArpHardwareLength `protobuf:"bytes,3,opt,name=hardware_length,json=hardwareLength,proto3" json:"hardware_length,omitempty"` - // Description missing in models - ProtocolLength *PatternFlowArpProtocolLength `protobuf:"bytes,4,opt,name=protocol_length,json=protocolLength,proto3" json:"protocol_length,omitempty"` - // Description missing in models - Operation *PatternFlowArpOperation `protobuf:"bytes,5,opt,name=operation,proto3" json:"operation,omitempty"` + SegmentRouting *BgpV6SegmentRouting `protobuf:"bytes,2,opt,name=segment_routing,json=segmentRouting,proto3" json:"segment_routing,omitempty"` + // This contains the list of Ethernet Virtual Private Network (EVPN) Ethernet Segments + // (ES) Per BGP Peer for IPv6 Address Family Identifier (AFI). + // + // Each Ethernet Segment contains a list of EVPN Instances (EVIs) . + // Each EVI contains a list of Broadcast Domains. + // Each Broadcast Domain contains a list of MAC/IP Ranges. + // + // is responsible for advertising Ethernet + // Auto-discovery Route Per EVI (Type 1). + // + // is responsible for advertising Ethernet Auto-discovery Route + // Per Ethernet Segment (Type 1). + // + // is responsible for advertising + // MAC/IP Advertisement Route (Type 2). + // + // is responsible for advertising Inclusive + // Multicast Ethernet Tag Route (Type 3). + // + // Ethernet Segment is responsible for advertising Ethernet Segment Route (Type 4). + EvpnEthernetSegments []*BgpV6EthernetSegment `protobuf:"bytes,3,rep,name=evpn_ethernet_segments,json=evpnEthernetSegments,proto3" json:"evpn_ethernet_segments,omitempty"` + // The type of BGP autonomous system. External BGP is used for BGP links between two + // or more autonomous systems (ebgp). Internal BGP is used within a single autonomous + // system (ibgp). BGP property defaults are aligned with this object defined as an internal + // BGP peer. If the as_type is specified as 'ebgp' then other properties will need to + // be specified as per an external BGP peer. Specifically, for 'ebgp', 'as_set_mode' + // attribute in 'as_path' field in any Route Range should be changed from default value + // 'do_not_include_local_as' to any other value. + // required = true + AsType *BgpV6Peer_AsType_Enum `protobuf:"varint,4,opt,name=as_type,json=asType,proto3,enum=otg.BgpV6Peer_AsType_Enum,oneof" json:"as_type,omitempty"` + // Autonomous System Number (AS number or ASN) + // required = true + AsNumber *uint32 `protobuf:"varint,5,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` + // The width in bytes of the as_number values. Any as_number values that exceeds the + // width MUST result in an error. + // default = AsNumberWidth.Enum.four + AsNumberWidth *BgpV6Peer_AsNumberWidth_Enum `protobuf:"varint,6,opt,name=as_number_width,json=asNumberWidth,proto3,enum=otg.BgpV6Peer_AsNumberWidth_Enum,oneof" json:"as_number_width,omitempty"` // Description missing in models - SenderHardwareAddr *PatternFlowArpSenderHardwareAddr `protobuf:"bytes,6,opt,name=sender_hardware_addr,json=senderHardwareAddr,proto3" json:"sender_hardware_addr,omitempty"` + Advanced *BgpAdvanced `protobuf:"bytes,7,opt,name=advanced,proto3" json:"advanced,omitempty"` // Description missing in models - SenderProtocolAddr *PatternFlowArpSenderProtocolAddr `protobuf:"bytes,7,opt,name=sender_protocol_addr,json=senderProtocolAddr,proto3" json:"sender_protocol_addr,omitempty"` + Capability *BgpCapability `protobuf:"bytes,8,opt,name=capability,proto3" json:"capability,omitempty"` // Description missing in models - TargetHardwareAddr *PatternFlowArpTargetHardwareAddr `protobuf:"bytes,8,opt,name=target_hardware_addr,json=targetHardwareAddr,proto3" json:"target_hardware_addr,omitempty"` + LearnedInformationFilter *BgpLearnedInformationFilter `protobuf:"bytes,9,opt,name=learned_information_filter,json=learnedInformationFilter,proto3" json:"learned_information_filter,omitempty"` + // Emulated BGPv4 route ranges. + V4Routes []*BgpV4RouteRange `protobuf:"bytes,10,rep,name=v4_routes,json=v4Routes,proto3" json:"v4_routes,omitempty"` + // Emulated BGPv6 route ranges. + V6Routes []*BgpV6RouteRange `protobuf:"bytes,11,rep,name=v6_routes,json=v6Routes,proto3" json:"v6_routes,omitempty"` + // Segment Routing Traffic Engineering (SR TE) Policies for IPv4 Address Family Identifier + // (AFI). + V4SrtePolicies []*BgpSrteV4Policy `protobuf:"bytes,12,rep,name=v4_srte_policies,json=v4SrtePolicies,proto3" json:"v4_srte_policies,omitempty"` + // Segment Routing Traffic Engineering (SR TE) Policies for IPv6 Address Family Identifier + // (AFI). + V6SrtePolicies []*BgpSrteV6Policy `protobuf:"bytes,13,rep,name=v6_srte_policies,json=v6SrtePolicies,proto3" json:"v6_srte_policies,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,14,opt,name=name,proto3,oneof" json:"name,omitempty"` // Description missing in models - TargetProtocolAddr *PatternFlowArpTargetProtocolAddr `protobuf:"bytes,9,opt,name=target_protocol_addr,json=targetProtocolAddr,proto3" json:"target_protocol_addr,omitempty"` + GracefulRestart *BgpGracefulRestart `protobuf:"bytes,15,opt,name=graceful_restart,json=gracefulRestart,proto3" json:"graceful_restart,omitempty"` + // BGP Updates to be sent to the peer as specified after the session is established. + ReplayUpdates *BgpUpdateReplay `protobuf:"bytes,16,opt,name=replay_updates,json=replayUpdates,proto3" json:"replay_updates,omitempty"` } -func (x *FlowArp) Reset() { - *x = FlowArp{} +func (x *BgpV6Peer) Reset() { + *x = BgpV6Peer{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[213] + mi := &file_otg_proto_msgTypes[220] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowArp) String() string { +func (x *BgpV6Peer) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowArp) ProtoMessage() {} +func (*BgpV6Peer) ProtoMessage() {} -func (x *FlowArp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[213] +func (x *BgpV6Peer) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[220] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -41827,104 +43610,165 @@ func (x *FlowArp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowArp.ProtoReflect.Descriptor instead. -func (*FlowArp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{213} +// Deprecated: Use BgpV6Peer.ProtoReflect.Descriptor instead. +func (*BgpV6Peer) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{220} } -func (x *FlowArp) GetHardwareType() *PatternFlowArpHardwareType { +func (x *BgpV6Peer) GetPeerAddress() string { + if x != nil && x.PeerAddress != nil { + return *x.PeerAddress + } + return "" +} + +func (x *BgpV6Peer) GetSegmentRouting() *BgpV6SegmentRouting { if x != nil { - return x.HardwareType + return x.SegmentRouting } return nil } -func (x *FlowArp) GetProtocolType() *PatternFlowArpProtocolType { +func (x *BgpV6Peer) GetEvpnEthernetSegments() []*BgpV6EthernetSegment { if x != nil { - return x.ProtocolType + return x.EvpnEthernetSegments } return nil } -func (x *FlowArp) GetHardwareLength() *PatternFlowArpHardwareLength { +func (x *BgpV6Peer) GetAsType() BgpV6Peer_AsType_Enum { + if x != nil && x.AsType != nil { + return *x.AsType + } + return BgpV6Peer_AsType_unspecified +} + +func (x *BgpV6Peer) GetAsNumber() uint32 { + if x != nil && x.AsNumber != nil { + return *x.AsNumber + } + return 0 +} + +func (x *BgpV6Peer) GetAsNumberWidth() BgpV6Peer_AsNumberWidth_Enum { + if x != nil && x.AsNumberWidth != nil { + return *x.AsNumberWidth + } + return BgpV6Peer_AsNumberWidth_unspecified +} + +func (x *BgpV6Peer) GetAdvanced() *BgpAdvanced { if x != nil { - return x.HardwareLength + return x.Advanced } return nil } -func (x *FlowArp) GetProtocolLength() *PatternFlowArpProtocolLength { +func (x *BgpV6Peer) GetCapability() *BgpCapability { if x != nil { - return x.ProtocolLength + return x.Capability } return nil } -func (x *FlowArp) GetOperation() *PatternFlowArpOperation { +func (x *BgpV6Peer) GetLearnedInformationFilter() *BgpLearnedInformationFilter { if x != nil { - return x.Operation + return x.LearnedInformationFilter } return nil } -func (x *FlowArp) GetSenderHardwareAddr() *PatternFlowArpSenderHardwareAddr { +func (x *BgpV6Peer) GetV4Routes() []*BgpV4RouteRange { if x != nil { - return x.SenderHardwareAddr + return x.V4Routes } return nil } -func (x *FlowArp) GetSenderProtocolAddr() *PatternFlowArpSenderProtocolAddr { +func (x *BgpV6Peer) GetV6Routes() []*BgpV6RouteRange { if x != nil { - return x.SenderProtocolAddr + return x.V6Routes } return nil } -func (x *FlowArp) GetTargetHardwareAddr() *PatternFlowArpTargetHardwareAddr { +func (x *BgpV6Peer) GetV4SrtePolicies() []*BgpSrteV4Policy { if x != nil { - return x.TargetHardwareAddr + return x.V4SrtePolicies } return nil } -func (x *FlowArp) GetTargetProtocolAddr() *PatternFlowArpTargetProtocolAddr { +func (x *BgpV6Peer) GetV6SrtePolicies() []*BgpSrteV6Policy { if x != nil { - return x.TargetProtocolAddr + return x.V6SrtePolicies } return nil } -// ICMP packet header -type FlowIcmp struct { +func (x *BgpV6Peer) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *BgpV6Peer) GetGracefulRestart() *BgpGracefulRestart { + if x != nil { + return x.GracefulRestart + } + return nil +} + +func (x *BgpV6Peer) GetReplayUpdates() *BgpUpdateReplay { + if x != nil { + return x.ReplayUpdates + } + return nil +} + +// Configuration for emulated BGPv6 peers and routes on a single IPv6 interface. +type BgpV6Interface struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.echo - Choice *FlowIcmp_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowIcmp_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Echo *FlowIcmpEcho `protobuf:"bytes,2,opt,name=echo,proto3" json:"echo,omitempty"` + // The unique name of IPv6 Loopback IPv6 interface or DHCPv4 client used as the source + // IP for this list of BGP peers. + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Device.Ipv6Loopback/properties/name + // - /components/schemas/Device.Dhcpv6client/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Device.Ipv6Loopback/properties/name + // - /components/schemas/Device.Dhcpv6client/properties/name + // + // required = true + Ipv6Name *string `protobuf:"bytes,1,opt,name=ipv6_name,json=ipv6Name,proto3,oneof" json:"ipv6_name,omitempty"` + // This contains the list of BGPv6 peers configured on this interface. + Peers []*BgpV6Peer `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` } -func (x *FlowIcmp) Reset() { - *x = FlowIcmp{} +func (x *BgpV6Interface) Reset() { + *x = BgpV6Interface{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[214] + mi := &file_otg_proto_msgTypes[221] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIcmp) String() string { +func (x *BgpV6Interface) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIcmp) ProtoMessage() {} +func (*BgpV6Interface) ProtoMessage() {} -func (x *FlowIcmp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[214] +func (x *BgpV6Interface) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[221] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -41935,60 +43779,74 @@ func (x *FlowIcmp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIcmp.ProtoReflect.Descriptor instead. -func (*FlowIcmp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{214} +// Deprecated: Use BgpV6Interface.ProtoReflect.Descriptor instead. +func (*BgpV6Interface) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{221} } -func (x *FlowIcmp) GetChoice() FlowIcmp_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *BgpV6Interface) GetIpv6Name() string { + if x != nil && x.Ipv6Name != nil { + return *x.Ipv6Name } - return FlowIcmp_Choice_unspecified + return "" } -func (x *FlowIcmp) GetEcho() *FlowIcmpEcho { +func (x *BgpV6Interface) GetPeers() []*BgpV6Peer { if x != nil { - return x.Echo + return x.Peers } return nil } -// Packet Header for ICMP echo request -type FlowIcmpEcho struct { +// Configuration for BGPv6 segment routing settings. +type BgpV6SegmentRouting struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Type *PatternFlowIcmpEchoType `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // Description missing in models - Code *PatternFlowIcmpEchoCode `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` - // Description missing in models - Checksum *PatternFlowIcmpEchoChecksum `protobuf:"bytes,3,opt,name=checksum,proto3" json:"checksum,omitempty"` - // Description missing in models - Identifier *PatternFlowIcmpEchoIdentifier `protobuf:"bytes,4,opt,name=identifier,proto3" json:"identifier,omitempty"` - // Description missing in models - SequenceNumber *PatternFlowIcmpEchoSequenceNumber `protobuf:"bytes,5,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"` + // TBD + // default = False + IngressSupportsVpn *bool `protobuf:"varint,1,opt,name=ingress_supports_vpn,json=ingressSupportsVpn,proto3,oneof" json:"ingress_supports_vpn,omitempty"` + // TBD + // default = False + ReducedEncapsulation *bool `protobuf:"varint,2,opt,name=reduced_encapsulation,json=reducedEncapsulation,proto3,oneof" json:"reduced_encapsulation,omitempty"` + // TBD + // default = False + CopyTimeToLive *bool `protobuf:"varint,3,opt,name=copy_time_to_live,json=copyTimeToLive,proto3,oneof" json:"copy_time_to_live,omitempty"` + // TBD + // default = 0 + TimeToLive *uint32 `protobuf:"varint,4,opt,name=time_to_live,json=timeToLive,proto3,oneof" json:"time_to_live,omitempty"` + // TBD + // default = 0 + MaxSidsPerSrh *uint32 `protobuf:"varint,5,opt,name=max_sids_per_srh,json=maxSidsPerSrh,proto3,oneof" json:"max_sids_per_srh,omitempty"` + // TBD + // default = False + AutoGenerateSegmentLeftValue *bool `protobuf:"varint,6,opt,name=auto_generate_segment_left_value,json=autoGenerateSegmentLeftValue,proto3,oneof" json:"auto_generate_segment_left_value,omitempty"` + // TBD + // default = 0 + SegmentLeftValue *uint32 `protobuf:"varint,7,opt,name=segment_left_value,json=segmentLeftValue,proto3,oneof" json:"segment_left_value,omitempty"` + // TBD + // default = False + AdvertiseSrTePolicy *bool `protobuf:"varint,8,opt,name=advertise_sr_te_policy,json=advertiseSrTePolicy,proto3,oneof" json:"advertise_sr_te_policy,omitempty"` } -func (x *FlowIcmpEcho) Reset() { - *x = FlowIcmpEcho{} +func (x *BgpV6SegmentRouting) Reset() { + *x = BgpV6SegmentRouting{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[215] + mi := &file_otg_proto_msgTypes[222] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIcmpEcho) String() string { +func (x *BgpV6SegmentRouting) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIcmpEcho) ProtoMessage() {} +func (*BgpV6SegmentRouting) ProtoMessage() {} -func (x *FlowIcmpEcho) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[215] +func (x *BgpV6SegmentRouting) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[222] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -41999,76 +43857,143 @@ func (x *FlowIcmpEcho) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIcmpEcho.ProtoReflect.Descriptor instead. -func (*FlowIcmpEcho) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{215} +// Deprecated: Use BgpV6SegmentRouting.ProtoReflect.Descriptor instead. +func (*BgpV6SegmentRouting) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{222} } -func (x *FlowIcmpEcho) GetType() *PatternFlowIcmpEchoType { - if x != nil { - return x.Type +func (x *BgpV6SegmentRouting) GetIngressSupportsVpn() bool { + if x != nil && x.IngressSupportsVpn != nil { + return *x.IngressSupportsVpn } - return nil + return false } -func (x *FlowIcmpEcho) GetCode() *PatternFlowIcmpEchoCode { - if x != nil { - return x.Code +func (x *BgpV6SegmentRouting) GetReducedEncapsulation() bool { + if x != nil && x.ReducedEncapsulation != nil { + return *x.ReducedEncapsulation } - return nil + return false } -func (x *FlowIcmpEcho) GetChecksum() *PatternFlowIcmpEchoChecksum { - if x != nil { - return x.Checksum +func (x *BgpV6SegmentRouting) GetCopyTimeToLive() bool { + if x != nil && x.CopyTimeToLive != nil { + return *x.CopyTimeToLive } - return nil + return false } -func (x *FlowIcmpEcho) GetIdentifier() *PatternFlowIcmpEchoIdentifier { - if x != nil { - return x.Identifier +func (x *BgpV6SegmentRouting) GetTimeToLive() uint32 { + if x != nil && x.TimeToLive != nil { + return *x.TimeToLive } - return nil + return 0 } -func (x *FlowIcmpEcho) GetSequenceNumber() *PatternFlowIcmpEchoSequenceNumber { - if x != nil { - return x.SequenceNumber +func (x *BgpV6SegmentRouting) GetMaxSidsPerSrh() uint32 { + if x != nil && x.MaxSidsPerSrh != nil { + return *x.MaxSidsPerSrh } - return nil + return 0 } -// ICMPv6 packet header -type FlowIcmpv6 struct { +func (x *BgpV6SegmentRouting) GetAutoGenerateSegmentLeftValue() bool { + if x != nil && x.AutoGenerateSegmentLeftValue != nil { + return *x.AutoGenerateSegmentLeftValue + } + return false +} + +func (x *BgpV6SegmentRouting) GetSegmentLeftValue() uint32 { + if x != nil && x.SegmentLeftValue != nil { + return *x.SegmentLeftValue + } + return 0 +} + +func (x *BgpV6SegmentRouting) GetAdvertiseSrTePolicy() bool { + if x != nil && x.AdvertiseSrTePolicy != nil { + return *x.AdvertiseSrTePolicy + } + return false +} + +// Configuration for BGP Ethernet Segment ranges. Advertises following routes - +// +// Type 4 - Ethernet Segment Route +type BgpV6EthernetSegment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Designated Forwarder (DF) election configuration. + DfElection *BgpEthernetSegmentDfElection `protobuf:"bytes,1,opt,name=df_election,json=dfElection,proto3" json:"df_election,omitempty"` + // This contains the list of EVIs. + Evis []*BgpV6EvpnEvis `protobuf:"bytes,2,rep,name=evis,proto3" json:"evis,omitempty"` + // 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero + // ESI is '10000000000000000000' . + // default = 00000000000000000000 + Esi *string `protobuf:"bytes,3,opt,name=esi,proto3,oneof" json:"esi,omitempty"` + // Single Active or All Active mode Redundancy mode selection for Multi-home. + // default = ActiveMode.Enum.all_active + ActiveMode *BgpV6EthernetSegment_ActiveMode_Enum `protobuf:"varint,4,opt,name=active_mode,json=activeMode,proto3,enum=otg.BgpV6EthernetSegment_ActiveMode_Enum,oneof" json:"active_mode,omitempty"` + // The label value to be advertised as ESI Label in ESI Label Extended Community. This + // is included in Ethernet Auto-discovery per ES Routes advertised by a router. + // default = 0 + EsiLabel *uint32 `protobuf:"varint,5,opt,name=esi_label,json=esiLabel,proto3,oneof" json:"esi_label,omitempty"` // Description missing in models - // default = Choice.Enum.echo - Choice *FlowIcmpv6_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowIcmpv6_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Echo *FlowIcmpv6Echo `protobuf:"bytes,2,opt,name=echo,proto3" json:"echo,omitempty"` + Advanced *BgpRouteAdvanced `protobuf:"bytes,6,opt,name=advanced,proto3" json:"advanced,omitempty"` + // Optional community settings. + Communities []*BgpCommunity `protobuf:"bytes,7,rep,name=communities,proto3" json:"communities,omitempty"` + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. + ExtCommunities []*BgpExtCommunity `protobuf:"bytes,8,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` + // Optional AS PATH settings. + AsPath *BgpAsPath `protobuf:"bytes,9,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` } -func (x *FlowIcmpv6) Reset() { - *x = FlowIcmpv6{} +func (x *BgpV6EthernetSegment) Reset() { + *x = BgpV6EthernetSegment{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[216] + mi := &file_otg_proto_msgTypes[223] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIcmpv6) String() string { +func (x *BgpV6EthernetSegment) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIcmpv6) ProtoMessage() {} +func (*BgpV6EthernetSegment) ProtoMessage() {} -func (x *FlowIcmpv6) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[216] +func (x *BgpV6EthernetSegment) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[223] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -42079,141 +44004,107 @@ func (x *FlowIcmpv6) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIcmpv6.ProtoReflect.Descriptor instead. -func (*FlowIcmpv6) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{216} +// Deprecated: Use BgpV6EthernetSegment.ProtoReflect.Descriptor instead. +func (*BgpV6EthernetSegment) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{223} } -func (x *FlowIcmpv6) GetChoice() FlowIcmpv6_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *BgpV6EthernetSegment) GetDfElection() *BgpEthernetSegmentDfElection { + if x != nil { + return x.DfElection } - return FlowIcmpv6_Choice_unspecified + return nil } -func (x *FlowIcmpv6) GetEcho() *FlowIcmpv6Echo { +func (x *BgpV6EthernetSegment) GetEvis() []*BgpV6EvpnEvis { if x != nil { - return x.Echo + return x.Evis } return nil } -// Packet Header for ICMPv6 Echo -type FlowIcmpv6Echo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - Type *PatternFlowIcmpv6EchoType `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // Description missing in models - Code *PatternFlowIcmpv6EchoCode `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` - // Description missing in models - Identifier *PatternFlowIcmpv6EchoIdentifier `protobuf:"bytes,3,opt,name=identifier,proto3" json:"identifier,omitempty"` - // Description missing in models - SequenceNumber *PatternFlowIcmpv6EchoSequenceNumber `protobuf:"bytes,4,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"` - // Description missing in models - Checksum *PatternFlowIcmpv6EchoChecksum `protobuf:"bytes,5,opt,name=checksum,proto3" json:"checksum,omitempty"` -} - -func (x *FlowIcmpv6Echo) Reset() { - *x = FlowIcmpv6Echo{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[217] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *BgpV6EthernetSegment) GetEsi() string { + if x != nil && x.Esi != nil { + return *x.Esi } + return "" } -func (x *FlowIcmpv6Echo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FlowIcmpv6Echo) ProtoMessage() {} - -func (x *FlowIcmpv6Echo) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[217] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *BgpV6EthernetSegment) GetActiveMode() BgpV6EthernetSegment_ActiveMode_Enum { + if x != nil && x.ActiveMode != nil { + return *x.ActiveMode } - return mi.MessageOf(x) -} - -// Deprecated: Use FlowIcmpv6Echo.ProtoReflect.Descriptor instead. -func (*FlowIcmpv6Echo) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{217} + return BgpV6EthernetSegment_ActiveMode_unspecified } -func (x *FlowIcmpv6Echo) GetType() *PatternFlowIcmpv6EchoType { - if x != nil { - return x.Type +func (x *BgpV6EthernetSegment) GetEsiLabel() uint32 { + if x != nil && x.EsiLabel != nil { + return *x.EsiLabel } - return nil + return 0 } -func (x *FlowIcmpv6Echo) GetCode() *PatternFlowIcmpv6EchoCode { +func (x *BgpV6EthernetSegment) GetAdvanced() *BgpRouteAdvanced { if x != nil { - return x.Code + return x.Advanced } return nil } -func (x *FlowIcmpv6Echo) GetIdentifier() *PatternFlowIcmpv6EchoIdentifier { +func (x *BgpV6EthernetSegment) GetCommunities() []*BgpCommunity { if x != nil { - return x.Identifier + return x.Communities } return nil } -func (x *FlowIcmpv6Echo) GetSequenceNumber() *PatternFlowIcmpv6EchoSequenceNumber { +func (x *BgpV6EthernetSegment) GetExtCommunities() []*BgpExtCommunity { if x != nil { - return x.SequenceNumber + return x.ExtCommunities } return nil } -func (x *FlowIcmpv6Echo) GetChecksum() *PatternFlowIcmpv6EchoChecksum { +func (x *BgpV6EthernetSegment) GetAsPath() *BgpAsPath { if x != nil { - return x.Checksum + return x.AsPath } return nil } -// PPP packet header -type FlowPpp struct { +// This contains a list of different flavors of EVPN. +// For example EVPN over VXLAN or EVPN over MPLS etc to be configured per Ethernet segment. +// +// Need to instantiate correct type of EVPN instance as per requirement. +type BgpV6EvpnEvis struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - Address *PatternFlowPppAddress `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // Description missing in models - Control *PatternFlowPppControl `protobuf:"bytes,2,opt,name=control,proto3" json:"control,omitempty"` - // Description missing in models - ProtocolType *PatternFlowPppProtocolType `protobuf:"bytes,3,opt,name=protocol_type,json=protocolType,proto3" json:"protocol_type,omitempty"` + // default = Choice.Enum.evi_vxlan + Choice *BgpV6EvpnEvis_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.BgpV6EvpnEvis_Choice_Enum,oneof" json:"choice,omitempty"` + // EVPN VXLAN instance to be configured per Ethernet Segment. + EviVxlan *BgpV6EviVxlan `protobuf:"bytes,2,opt,name=evi_vxlan,json=eviVxlan,proto3" json:"evi_vxlan,omitempty"` } -func (x *FlowPpp) Reset() { - *x = FlowPpp{} +func (x *BgpV6EvpnEvis) Reset() { + *x = BgpV6EvpnEvis{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[218] + mi := &file_otg_proto_msgTypes[224] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowPpp) String() string { +func (x *BgpV6EvpnEvis) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowPpp) ProtoMessage() {} +func (*BgpV6EvpnEvis) ProtoMessage() {} -func (x *FlowPpp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[218] +func (x *BgpV6EvpnEvis) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[224] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -42224,67 +44115,115 @@ func (x *FlowPpp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowPpp.ProtoReflect.Descriptor instead. -func (*FlowPpp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{218} -} - -func (x *FlowPpp) GetAddress() *PatternFlowPppAddress { - if x != nil { - return x.Address - } - return nil +// Deprecated: Use BgpV6EvpnEvis.ProtoReflect.Descriptor instead. +func (*BgpV6EvpnEvis) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{224} } -func (x *FlowPpp) GetControl() *PatternFlowPppControl { - if x != nil { - return x.Control +func (x *BgpV6EvpnEvis) GetChoice() BgpV6EvpnEvis_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return BgpV6EvpnEvis_Choice_unspecified } -func (x *FlowPpp) GetProtocolType() *PatternFlowPppProtocolType { +func (x *BgpV6EvpnEvis) GetEviVxlan() *BgpV6EviVxlan { if x != nil { - return x.ProtocolType + return x.EviVxlan } return nil } -// IGMPv1 packet header -type FlowIgmpv1 struct { +// Configuration for BGP EVPN EVI. Advertises following routes - +// +// # Type 3 - Inclusive Multicast Ethernet Tag Route +// +// Type 1 - Ethernet Auto-discovery Route (Per EVI) +// +// Type 1 - Ethernet Auto-discovery Route (Per ES) +type BgpV6EviVxlan struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // This contains the list of Broadcast Domains to be configured per EVI. + BroadcastDomains []*BgpV6EviVxlanBroadcastDomain `protobuf:"bytes,1,rep,name=broadcast_domains,json=broadcastDomains,proto3" json:"broadcast_domains,omitempty"` + // This model only supports Ingress Replication + // default = ReplicationType.Enum.ingress_replication + ReplicationType *BgpV6EviVxlan_ReplicationType_Enum `protobuf:"varint,2,opt,name=replication_type,json=replicationType,proto3,enum=otg.BgpV6EviVxlan_ReplicationType_Enum,oneof" json:"replication_type,omitempty"` + // Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel + // attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. + // default = 16 + PmsiLabel *uint32 `protobuf:"varint,3,opt,name=pmsi_label,json=pmsiLabel,proto3,oneof" json:"pmsi_label,omitempty"` + // The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet + // Auto-discovery Route per + // default = 0 + AdLabel *uint32 `protobuf:"varint,4,opt,name=ad_label,json=adLabel,proto3,oneof" json:"ad_label,omitempty"` + // Colon separated Extended Community value of 6 Bytes - AS number: Value identifying + // an EVI. Example - for the as_2octet 60005:100. + RouteDistinguisher *BgpRouteDistinguisher `protobuf:"bytes,5,opt,name=route_distinguisher,json=routeDistinguisher,proto3" json:"route_distinguisher,omitempty"` + // List of Layer 2 Virtual Network Identifier (L2VNI) export targets associated with + // this EVI. + RouteTargetExport []*BgpRouteTarget `protobuf:"bytes,6,rep,name=route_target_export,json=routeTargetExport,proto3" json:"route_target_export,omitempty"` + // List of L2VNI import targets associated with this EVI. + RouteTargetImport []*BgpRouteTarget `protobuf:"bytes,7,rep,name=route_target_import,json=routeTargetImport,proto3" json:"route_target_import,omitempty"` + // List of Layer 3 Virtual Network Identifier (L3VNI) Export Route Targets. + L3RouteTargetExport []*BgpRouteTarget `protobuf:"bytes,8,rep,name=l3_route_target_export,json=l3RouteTargetExport,proto3" json:"l3_route_target_export,omitempty"` + // List of L3VNI Import Route Targets. + L3RouteTargetImport []*BgpRouteTarget `protobuf:"bytes,9,rep,name=l3_route_target_import,json=l3RouteTargetImport,proto3" json:"l3_route_target_import,omitempty"` // Description missing in models - Version *PatternFlowIgmpv1Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // Description missing in models - Type *PatternFlowIgmpv1Type `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - // Description missing in models - Unused *PatternFlowIgmpv1Unused `protobuf:"bytes,3,opt,name=unused,proto3" json:"unused,omitempty"` - // Description missing in models - Checksum *PatternFlowIgmpv1Checksum `protobuf:"bytes,4,opt,name=checksum,proto3" json:"checksum,omitempty"` - // Description missing in models - GroupAddress *PatternFlowIgmpv1GroupAddress `protobuf:"bytes,5,opt,name=group_address,json=groupAddress,proto3" json:"group_address,omitempty"` + Advanced *BgpRouteAdvanced `protobuf:"bytes,10,opt,name=advanced,proto3" json:"advanced,omitempty"` + // Optional community settings. + Communities []*BgpCommunity `protobuf:"bytes,11,rep,name=communities,proto3" json:"communities,omitempty"` + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. + ExtCommunities []*BgpExtCommunity `protobuf:"bytes,12,rep,name=ext_communities,json=extCommunities,proto3" json:"ext_communities,omitempty"` + // Optional AS PATH settings. + AsPath *BgpAsPath `protobuf:"bytes,13,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` } -func (x *FlowIgmpv1) Reset() { - *x = FlowIgmpv1{} +func (x *BgpV6EviVxlan) Reset() { + *x = BgpV6EviVxlan{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[219] + mi := &file_otg_proto_msgTypes[225] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIgmpv1) String() string { +func (x *BgpV6EviVxlan) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIgmpv1) ProtoMessage() {} +func (*BgpV6EviVxlan) ProtoMessage() {} -func (x *FlowIgmpv1) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[219] +func (x *BgpV6EviVxlan) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[225] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -42295,80 +44234,138 @@ func (x *FlowIgmpv1) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIgmpv1.ProtoReflect.Descriptor instead. -func (*FlowIgmpv1) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{219} +// Deprecated: Use BgpV6EviVxlan.ProtoReflect.Descriptor instead. +func (*BgpV6EviVxlan) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{225} } -func (x *FlowIgmpv1) GetVersion() *PatternFlowIgmpv1Version { +func (x *BgpV6EviVxlan) GetBroadcastDomains() []*BgpV6EviVxlanBroadcastDomain { if x != nil { - return x.Version + return x.BroadcastDomains } return nil } -func (x *FlowIgmpv1) GetType() *PatternFlowIgmpv1Type { +func (x *BgpV6EviVxlan) GetReplicationType() BgpV6EviVxlan_ReplicationType_Enum { + if x != nil && x.ReplicationType != nil { + return *x.ReplicationType + } + return BgpV6EviVxlan_ReplicationType_unspecified +} + +func (x *BgpV6EviVxlan) GetPmsiLabel() uint32 { + if x != nil && x.PmsiLabel != nil { + return *x.PmsiLabel + } + return 0 +} + +func (x *BgpV6EviVxlan) GetAdLabel() uint32 { + if x != nil && x.AdLabel != nil { + return *x.AdLabel + } + return 0 +} + +func (x *BgpV6EviVxlan) GetRouteDistinguisher() *BgpRouteDistinguisher { if x != nil { - return x.Type + return x.RouteDistinguisher } return nil } -func (x *FlowIgmpv1) GetUnused() *PatternFlowIgmpv1Unused { +func (x *BgpV6EviVxlan) GetRouteTargetExport() []*BgpRouteTarget { if x != nil { - return x.Unused + return x.RouteTargetExport } return nil } -func (x *FlowIgmpv1) GetChecksum() *PatternFlowIgmpv1Checksum { +func (x *BgpV6EviVxlan) GetRouteTargetImport() []*BgpRouteTarget { if x != nil { - return x.Checksum + return x.RouteTargetImport } return nil } -func (x *FlowIgmpv1) GetGroupAddress() *PatternFlowIgmpv1GroupAddress { +func (x *BgpV6EviVxlan) GetL3RouteTargetExport() []*BgpRouteTarget { if x != nil { - return x.GroupAddress + return x.L3RouteTargetExport } return nil } -// MPLS packet header; When configuring multiple such headers, the count shall not exceed -// 20. -type FlowMpls struct { +func (x *BgpV6EviVxlan) GetL3RouteTargetImport() []*BgpRouteTarget { + if x != nil { + return x.L3RouteTargetImport + } + return nil +} + +func (x *BgpV6EviVxlan) GetAdvanced() *BgpRouteAdvanced { + if x != nil { + return x.Advanced + } + return nil +} + +func (x *BgpV6EviVxlan) GetCommunities() []*BgpCommunity { + if x != nil { + return x.Communities + } + return nil +} + +func (x *BgpV6EviVxlan) GetExtCommunities() []*BgpExtCommunity { + if x != nil { + return x.ExtCommunities + } + return nil +} + +func (x *BgpV6EviVxlan) GetAsPath() *BgpAsPath { + if x != nil { + return x.AsPath + } + return nil +} + +// Configuration for Broadcast Domains per EVI. +type BgpV6EviVxlanBroadcastDomain struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Label *PatternFlowMplsLabel `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` - // Description missing in models - TrafficClass *PatternFlowMplsTrafficClass `protobuf:"bytes,2,opt,name=traffic_class,json=trafficClass,proto3" json:"traffic_class,omitempty"` - // Description missing in models - BottomOfStack *PatternFlowMplsBottomOfStack `protobuf:"bytes,3,opt,name=bottom_of_stack,json=bottomOfStack,proto3" json:"bottom_of_stack,omitempty"` - // Description missing in models - TimeToLive *PatternFlowMplsTimeToLive `protobuf:"bytes,4,opt,name=time_to_live,json=timeToLive,proto3" json:"time_to_live,omitempty"` + // This contains the list of Customer MAC/IP Ranges to be configured per Broadcast Domain. + // + // Advertises following route - + // Type 2 - MAC/IP Advertisement Route. + CmacIpRange []*BgpCMacIpRange `protobuf:"bytes,1,rep,name=cmac_ip_range,json=cmacIpRange,proto3" json:"cmac_ip_range,omitempty"` + // The Ethernet Tag ID of the Broadcast Domain. + // default = 0 + EthernetTagId *uint32 `protobuf:"varint,2,opt,name=ethernet_tag_id,json=ethernetTagId,proto3,oneof" json:"ethernet_tag_id,omitempty"` + // VLAN-Aware service to be enabled or disabled. + // default = False + VlanAwareService *bool `protobuf:"varint,3,opt,name=vlan_aware_service,json=vlanAwareService,proto3,oneof" json:"vlan_aware_service,omitempty"` } -func (x *FlowMpls) Reset() { - *x = FlowMpls{} +func (x *BgpV6EviVxlanBroadcastDomain) Reset() { + *x = BgpV6EviVxlanBroadcastDomain{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[220] + mi := &file_otg_proto_msgTypes[226] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowMpls) String() string { +func (x *BgpV6EviVxlanBroadcastDomain) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowMpls) ProtoMessage() {} +func (*BgpV6EviVxlanBroadcastDomain) ProtoMessage() {} -func (x *FlowMpls) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[220] +func (x *BgpV6EviVxlanBroadcastDomain) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[226] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -42379,74 +44376,61 @@ func (x *FlowMpls) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowMpls.ProtoReflect.Descriptor instead. -func (*FlowMpls) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{220} -} - -func (x *FlowMpls) GetLabel() *PatternFlowMplsLabel { - if x != nil { - return x.Label - } - return nil +// Deprecated: Use BgpV6EviVxlanBroadcastDomain.ProtoReflect.Descriptor instead. +func (*BgpV6EviVxlanBroadcastDomain) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{226} } -func (x *FlowMpls) GetTrafficClass() *PatternFlowMplsTrafficClass { +func (x *BgpV6EviVxlanBroadcastDomain) GetCmacIpRange() []*BgpCMacIpRange { if x != nil { - return x.TrafficClass + return x.CmacIpRange } return nil } -func (x *FlowMpls) GetBottomOfStack() *PatternFlowMplsBottomOfStack { - if x != nil { - return x.BottomOfStack +func (x *BgpV6EviVxlanBroadcastDomain) GetEthernetTagId() uint32 { + if x != nil && x.EthernetTagId != nil { + return *x.EthernetTagId } - return nil + return 0 } -func (x *FlowMpls) GetTimeToLive() *PatternFlowMplsTimeToLive { - if x != nil { - return x.TimeToLive +func (x *BgpV6EviVxlanBroadcastDomain) GetVlanAwareService() bool { + if x != nil && x.VlanAwareService != nil { + return *x.VlanAwareService } - return nil + return false } -// SNMPv2C packet header as defined in RFC1901 and RFC3416. -type FlowSnmpv2C struct { +// Description missing in models +type DeviceVxlan struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Version *PatternFlowSnmpv2CVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // It is an ASCII based octet string which identifies the SNMP community in which the - // sender and recipient of this message are located. It should match the read-only or - // read-write community string configured on the recipient for the PDU to be accepted. - // default = community - Community *string `protobuf:"bytes,2,opt,name=community,proto3,oneof" json:"community,omitempty"` - // Description missing in models - // required = true - Data *FlowSnmpv2CData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + // IPv4 VXLAN Tunnels + V4Tunnels []*VxlanV4Tunnel `protobuf:"bytes,1,rep,name=v4_tunnels,json=v4Tunnels,proto3" json:"v4_tunnels,omitempty"` + // IPv6 VXLAN Tunnels + V6Tunnels []*VxlanV6Tunnel `protobuf:"bytes,2,rep,name=v6_tunnels,json=v6Tunnels,proto3" json:"v6_tunnels,omitempty"` } -func (x *FlowSnmpv2C) Reset() { - *x = FlowSnmpv2C{} +func (x *DeviceVxlan) Reset() { + *x = DeviceVxlan{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[221] + mi := &file_otg_proto_msgTypes[227] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowSnmpv2C) String() string { +func (x *DeviceVxlan) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSnmpv2C) ProtoMessage() {} +func (*DeviceVxlan) ProtoMessage() {} -func (x *FlowSnmpv2C) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[221] +func (x *DeviceVxlan) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[227] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -42457,79 +44441,74 @@ func (x *FlowSnmpv2C) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSnmpv2C.ProtoReflect.Descriptor instead. -func (*FlowSnmpv2C) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{221} +// Deprecated: Use DeviceVxlan.ProtoReflect.Descriptor instead. +func (*DeviceVxlan) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{227} } -func (x *FlowSnmpv2C) GetVersion() *PatternFlowSnmpv2CVersion { +func (x *DeviceVxlan) GetV4Tunnels() []*VxlanV4Tunnel { if x != nil { - return x.Version + return x.V4Tunnels } return nil } -func (x *FlowSnmpv2C) GetCommunity() string { - if x != nil && x.Community != nil { - return *x.Community - } - return "" -} - -func (x *FlowSnmpv2C) GetData() *FlowSnmpv2CData { +func (x *DeviceVxlan) GetV6Tunnels() []*VxlanV6Tunnel { if x != nil { - return x.Data + return x.V6Tunnels } return nil } -// This contains the body of the SNMPv2C message. -// -// - Encoding of subsequent fields follow ASN.1 specification. -// Refer: http://www.itu.int/ITU-T/asn1/ -type FlowSnmpv2CData struct { +// Configuration and operational state parameters relating to IPv4 VXLAN tunnel end-point +// interface. +type VxlanV4Tunnel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Determines the source interface. + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv4Loopback/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv4Loopback/properties/name + // + // required = true + SourceInterface *string `protobuf:"bytes,1,opt,name=source_interface,json=sourceInterface,proto3,oneof" json:"source_interface,omitempty"` // Description missing in models - // required = true - Choice *FlowSnmpv2CData_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowSnmpv2CData_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - GetRequest *FlowSnmpv2CPDU `protobuf:"bytes,2,opt,name=get_request,json=getRequest,proto3" json:"get_request,omitempty"` - // Description missing in models - GetNextRequest *FlowSnmpv2CPDU `protobuf:"bytes,3,opt,name=get_next_request,json=getNextRequest,proto3" json:"get_next_request,omitempty"` - // Description missing in models - Response *FlowSnmpv2CPDU `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"` - // Description missing in models - SetRequest *FlowSnmpv2CPDU `protobuf:"bytes,5,opt,name=set_request,json=setRequest,proto3" json:"set_request,omitempty"` - // Description missing in models - GetBulkRequest *FlowSnmpv2CBulkPDU `protobuf:"bytes,6,opt,name=get_bulk_request,json=getBulkRequest,proto3" json:"get_bulk_request,omitempty"` - // Description missing in models - InformRequest *FlowSnmpv2CPDU `protobuf:"bytes,7,opt,name=inform_request,json=informRequest,proto3" json:"inform_request,omitempty"` - // Description missing in models - Snmpv2Trap *FlowSnmpv2CPDU `protobuf:"bytes,8,opt,name=snmpv2_trap,json=snmpv2Trap,proto3" json:"snmpv2_trap,omitempty"` - // Description missing in models - Report *FlowSnmpv2CPDU `protobuf:"bytes,9,opt,name=report,proto3" json:"report,omitempty"` + DestinationIpMode *VxlanV4TunnelDestinationIPMode `protobuf:"bytes,2,opt,name=destination_ip_mode,json=destinationIpMode,proto3" json:"destination_ip_mode,omitempty"` + // VXLAN Network Identifier (VNI) to distinguish network instances on the wire + // required = true + Vni *uint32 `protobuf:"varint,3,opt,name=vni,proto3,oneof" json:"vni,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,4,opt,name=name,proto3,oneof" json:"name,omitempty"` } -func (x *FlowSnmpv2CData) Reset() { - *x = FlowSnmpv2CData{} +func (x *VxlanV4Tunnel) Reset() { + *x = VxlanV4Tunnel{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[222] + mi := &file_otg_proto_msgTypes[228] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowSnmpv2CData) String() string { +func (x *VxlanV4Tunnel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSnmpv2CData) ProtoMessage() {} +func (*VxlanV4Tunnel) ProtoMessage() {} -func (x *FlowSnmpv2CData) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[222] +func (x *VxlanV4Tunnel) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[228] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -42540,109 +44519,88 @@ func (x *FlowSnmpv2CData) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSnmpv2CData.ProtoReflect.Descriptor instead. -func (*FlowSnmpv2CData) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{222} -} - -func (x *FlowSnmpv2CData) GetChoice() FlowSnmpv2CData_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowSnmpv2CData_Choice_unspecified -} - -func (x *FlowSnmpv2CData) GetGetRequest() *FlowSnmpv2CPDU { - if x != nil { - return x.GetRequest - } - return nil -} - -func (x *FlowSnmpv2CData) GetGetNextRequest() *FlowSnmpv2CPDU { - if x != nil { - return x.GetNextRequest - } - return nil -} - -func (x *FlowSnmpv2CData) GetResponse() *FlowSnmpv2CPDU { - if x != nil { - return x.Response - } - return nil -} - -func (x *FlowSnmpv2CData) GetSetRequest() *FlowSnmpv2CPDU { - if x != nil { - return x.SetRequest - } - return nil +// Deprecated: Use VxlanV4Tunnel.ProtoReflect.Descriptor instead. +func (*VxlanV4Tunnel) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{228} } -func (x *FlowSnmpv2CData) GetGetBulkRequest() *FlowSnmpv2CBulkPDU { - if x != nil { - return x.GetBulkRequest +func (x *VxlanV4Tunnel) GetSourceInterface() string { + if x != nil && x.SourceInterface != nil { + return *x.SourceInterface } - return nil + return "" } -func (x *FlowSnmpv2CData) GetInformRequest() *FlowSnmpv2CPDU { +func (x *VxlanV4Tunnel) GetDestinationIpMode() *VxlanV4TunnelDestinationIPMode { if x != nil { - return x.InformRequest + return x.DestinationIpMode } return nil } -func (x *FlowSnmpv2CData) GetSnmpv2Trap() *FlowSnmpv2CPDU { - if x != nil { - return x.Snmpv2Trap +func (x *VxlanV4Tunnel) GetVni() uint32 { + if x != nil && x.Vni != nil { + return *x.Vni } - return nil + return 0 } -func (x *FlowSnmpv2CData) GetReport() *FlowSnmpv2CPDU { - if x != nil { - return x.Report +func (x *VxlanV4Tunnel) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return nil + return "" } -// This contains the body of the SNMPv2C PDU. -type FlowSnmpv2CPDU struct { +// Configuration and operational state parameters relating to IPv6 VXLAN tunnel end-point +// interface. +type VxlanV6Tunnel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Determines the source interface. + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Device.Ipv6Loopback/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Device.Ipv6Loopback/properties/name + // + // required = true + SourceInterface *string `protobuf:"bytes,1,opt,name=source_interface,json=sourceInterface,proto3,oneof" json:"source_interface,omitempty"` // Description missing in models - RequestId *PatternFlowSnmpv2CPDURequestId `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // The SNMP agent places an error code in this field in the response message if an error - // occurred processing the request. - // default = ErrorStatus.Enum.no_error - ErrorStatus *FlowSnmpv2CPDU_ErrorStatus_Enum `protobuf:"varint,2,opt,name=error_status,json=errorStatus,proto3,enum=otg.FlowSnmpv2CPDU_ErrorStatus_Enum,oneof" json:"error_status,omitempty"` - // Description missing in models - ErrorIndex *PatternFlowSnmpv2CPDUErrorIndex `protobuf:"bytes,3,opt,name=error_index,json=errorIndex,proto3" json:"error_index,omitempty"` - // A Sequence of variable_bindings. - VariableBindings []*FlowSnmpv2CVariableBinding `protobuf:"bytes,4,rep,name=variable_bindings,json=variableBindings,proto3" json:"variable_bindings,omitempty"` + DestinationIpMode *VxlanV6TunnelDestinationIPMode `protobuf:"bytes,2,opt,name=destination_ip_mode,json=destinationIpMode,proto3" json:"destination_ip_mode,omitempty"` + // VXLAN Network Identifier (VNI) to distinguish network instances on the wire + // required = true + Vni *uint32 `protobuf:"varint,3,opt,name=vni,proto3,oneof" json:"vni,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,4,opt,name=name,proto3,oneof" json:"name,omitempty"` } -func (x *FlowSnmpv2CPDU) Reset() { - *x = FlowSnmpv2CPDU{} +func (x *VxlanV6Tunnel) Reset() { + *x = VxlanV6Tunnel{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[223] + mi := &file_otg_proto_msgTypes[229] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowSnmpv2CPDU) String() string { +func (x *VxlanV6Tunnel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSnmpv2CPDU) ProtoMessage() {} +func (*VxlanV6Tunnel) ProtoMessage() {} -func (x *FlowSnmpv2CPDU) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[223] +func (x *VxlanV6Tunnel) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[229] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -42653,74 +44611,71 @@ func (x *FlowSnmpv2CPDU) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSnmpv2CPDU.ProtoReflect.Descriptor instead. -func (*FlowSnmpv2CPDU) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{223} +// Deprecated: Use VxlanV6Tunnel.ProtoReflect.Descriptor instead. +func (*VxlanV6Tunnel) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{229} } -func (x *FlowSnmpv2CPDU) GetRequestId() *PatternFlowSnmpv2CPDURequestId { - if x != nil { - return x.RequestId +func (x *VxlanV6Tunnel) GetSourceInterface() string { + if x != nil && x.SourceInterface != nil { + return *x.SourceInterface } - return nil + return "" } -func (x *FlowSnmpv2CPDU) GetErrorStatus() FlowSnmpv2CPDU_ErrorStatus_Enum { - if x != nil && x.ErrorStatus != nil { - return *x.ErrorStatus +func (x *VxlanV6Tunnel) GetDestinationIpMode() *VxlanV6TunnelDestinationIPMode { + if x != nil { + return x.DestinationIpMode } - return FlowSnmpv2CPDU_ErrorStatus_unspecified + return nil } -func (x *FlowSnmpv2CPDU) GetErrorIndex() *PatternFlowSnmpv2CPDUErrorIndex { - if x != nil { - return x.ErrorIndex +func (x *VxlanV6Tunnel) GetVni() uint32 { + if x != nil && x.Vni != nil { + return *x.Vni } - return nil + return 0 } -func (x *FlowSnmpv2CPDU) GetVariableBindings() []*FlowSnmpv2CVariableBinding { - if x != nil { - return x.VariableBindings +func (x *VxlanV6Tunnel) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return nil + return "" } -// The purpose of the GetBulkRequest-PDU is to request the transfer of a potentially -// large amount of data, including, but not limited to, the efficient and rapid retrieval -// of large tables. -type FlowSnmpv2CBulkPDU struct { +// Communication mode between the VTEPs, either unicast or multicast. +type VxlanV4TunnelDestinationIPMode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // unicast or multicast + // default = Choice.Enum.multicast + Choice *VxlanV4TunnelDestinationIPMode_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.VxlanV4TunnelDestinationIPMode_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - RequestId *PatternFlowSnmpv2CBulkPDURequestId `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // Description missing in models - NonRepeaters *PatternFlowSnmpv2CBulkPDUNonRepeaters `protobuf:"bytes,2,opt,name=non_repeaters,json=nonRepeaters,proto3" json:"non_repeaters,omitempty"` + Unicast *VxlanV4TunnelDestinationIPModeUnicast `protobuf:"bytes,2,opt,name=unicast,proto3" json:"unicast,omitempty"` // Description missing in models - MaxRepetitions *PatternFlowSnmpv2CBulkPDUMaxRepetitions `protobuf:"bytes,3,opt,name=max_repetitions,json=maxRepetitions,proto3" json:"max_repetitions,omitempty"` - // A Sequence of variable_bindings. - VariableBindings []*FlowSnmpv2CVariableBinding `protobuf:"bytes,4,rep,name=variable_bindings,json=variableBindings,proto3" json:"variable_bindings,omitempty"` + Multicast *VxlanV4TunnelDestinationIPModeMulticast `protobuf:"bytes,3,opt,name=multicast,proto3" json:"multicast,omitempty"` } -func (x *FlowSnmpv2CBulkPDU) Reset() { - *x = FlowSnmpv2CBulkPDU{} +func (x *VxlanV4TunnelDestinationIPMode) Reset() { + *x = VxlanV4TunnelDestinationIPMode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[224] + mi := &file_otg_proto_msgTypes[230] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowSnmpv2CBulkPDU) String() string { +func (x *VxlanV4TunnelDestinationIPMode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSnmpv2CBulkPDU) ProtoMessage() {} +func (*VxlanV4TunnelDestinationIPMode) ProtoMessage() {} -func (x *FlowSnmpv2CBulkPDU) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[224] +func (x *VxlanV4TunnelDestinationIPMode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[230] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -42731,94 +44686,64 @@ func (x *FlowSnmpv2CBulkPDU) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSnmpv2CBulkPDU.ProtoReflect.Descriptor instead. -func (*FlowSnmpv2CBulkPDU) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{224} -} - -func (x *FlowSnmpv2CBulkPDU) GetRequestId() *PatternFlowSnmpv2CBulkPDURequestId { - if x != nil { - return x.RequestId - } - return nil +// Deprecated: Use VxlanV4TunnelDestinationIPMode.ProtoReflect.Descriptor instead. +func (*VxlanV4TunnelDestinationIPMode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{230} } -func (x *FlowSnmpv2CBulkPDU) GetNonRepeaters() *PatternFlowSnmpv2CBulkPDUNonRepeaters { - if x != nil { - return x.NonRepeaters +func (x *VxlanV4TunnelDestinationIPMode) GetChoice() VxlanV4TunnelDestinationIPMode_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return VxlanV4TunnelDestinationIPMode_Choice_unspecified } -func (x *FlowSnmpv2CBulkPDU) GetMaxRepetitions() *PatternFlowSnmpv2CBulkPDUMaxRepetitions { +func (x *VxlanV4TunnelDestinationIPMode) GetUnicast() *VxlanV4TunnelDestinationIPModeUnicast { if x != nil { - return x.MaxRepetitions + return x.Unicast } return nil } -func (x *FlowSnmpv2CBulkPDU) GetVariableBindings() []*FlowSnmpv2CVariableBinding { +func (x *VxlanV4TunnelDestinationIPMode) GetMulticast() *VxlanV4TunnelDestinationIPModeMulticast { if x != nil { - return x.VariableBindings + return x.Multicast } return nil } -// A Sequence of two fields, an object_identifier and the value for/from that object_identifier. -type FlowSnmpv2CVariableBinding struct { +// Communication mode between the VTEPs, either unicast or multicast. +type VxlanV6TunnelDestinationIPMode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The Object Identifier points to a particular parameter in the SNMP agent. - // - Encoding of this field follows RFC2578(section 3.5) and ASN.1 X.690(section 8.1.3.6) - // specification. - // Refer: http://www.itu.int/ITU-T/asn1/ - // - According to BER, the first two numbers of any OID (x.y) are encoded as one value - // using the formula (40*x)+y. - // Example, the first two numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, - // because (40*1)+3 = 43. - // - After the first two numbers are encoded, the subsequent numbers in the OID are - // each encoded as a byte. - // - However, a special rule is required for large numbers because one byte can only - // represent a number from 0-127. - // - The rule for large numbers states that only the lower 7 bits in the byte are used - // for holding the value (0-127). - // - The highest order bit(8th) is used as a flag to indicate that this number spans - // more than one byte. Therefore, any number over 127 must be encoded using more than - // one byte. - // - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0' cannot be - // encoded using a single byte. - // According to this rule, the number 2680 must be encoded as 0x94 0x78. - // Since the most significant bit is set in the first byte (0x94), it indicates - // that number spans to the next byte. - // Since the most significant bit is not set in the next byte (0x78), it indicates - // that the number ends at the second byte. - // The value is derived by appending 7 bits from each of the concatenated bytes - // i.e (0x14 *128^1) + (0x78 * 128^0) = 2680. - // default = 0.1 - ObjectIdentifier *string `protobuf:"bytes,1,opt,name=object_identifier,json=objectIdentifier,proto3,oneof" json:"object_identifier,omitempty"` + // unicast or multicast + // default = Choice.Enum.multicast + Choice *VxlanV6TunnelDestinationIPMode_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.VxlanV6TunnelDestinationIPMode_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Value *FlowSnmpv2CVariableBindingValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Unicast *VxlanV6TunnelDestinationIPModeUnicast `protobuf:"bytes,2,opt,name=unicast,proto3" json:"unicast,omitempty"` + // Description missing in models + Multicast *VxlanV6TunnelDestinationIPModeMulticast `protobuf:"bytes,3,opt,name=multicast,proto3" json:"multicast,omitempty"` } -func (x *FlowSnmpv2CVariableBinding) Reset() { - *x = FlowSnmpv2CVariableBinding{} +func (x *VxlanV6TunnelDestinationIPMode) Reset() { + *x = VxlanV6TunnelDestinationIPMode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[225] + mi := &file_otg_proto_msgTypes[231] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowSnmpv2CVariableBinding) String() string { +func (x *VxlanV6TunnelDestinationIPMode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSnmpv2CVariableBinding) ProtoMessage() {} +func (*VxlanV6TunnelDestinationIPMode) ProtoMessage() {} -func (x *FlowSnmpv2CVariableBinding) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[225] +func (x *VxlanV6TunnelDestinationIPMode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[231] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -42829,99 +44754,59 @@ func (x *FlowSnmpv2CVariableBinding) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSnmpv2CVariableBinding.ProtoReflect.Descriptor instead. -func (*FlowSnmpv2CVariableBinding) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{225} +// Deprecated: Use VxlanV6TunnelDestinationIPMode.ProtoReflect.Descriptor instead. +func (*VxlanV6TunnelDestinationIPMode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{231} } -func (x *FlowSnmpv2CVariableBinding) GetObjectIdentifier() string { - if x != nil && x.ObjectIdentifier != nil { - return *x.ObjectIdentifier +func (x *VxlanV6TunnelDestinationIPMode) GetChoice() VxlanV6TunnelDestinationIPMode_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return VxlanV6TunnelDestinationIPMode_Choice_unspecified } -func (x *FlowSnmpv2CVariableBinding) GetValue() *FlowSnmpv2CVariableBindingValue { +func (x *VxlanV6TunnelDestinationIPMode) GetUnicast() *VxlanV6TunnelDestinationIPModeUnicast { if x != nil { - return x.Value + return x.Unicast } return nil } -// The value for the object_identifier as per RFC2578. -type FlowSnmpv2CVariableBindingValue struct { +func (x *VxlanV6TunnelDestinationIPMode) GetMulticast() *VxlanV6TunnelDestinationIPModeMulticast { + if x != nil { + return x.Multicast + } + return nil +} + +// Description missing in models +type VxlanV4TunnelDestinationIPModeUnicast struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.no_value - Choice *FlowSnmpv2CVariableBindingValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowSnmpv2CVariableBindingValue_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - IntegerValue *PatternFlowSnmpv2CVariableBindingValueIntegerValue `protobuf:"bytes,2,opt,name=integer_value,json=integerValue,proto3" json:"integer_value,omitempty"` - // Description missing in models - StringValue *FlowSnmpv2CVariableBindingStringValue `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` - // The Object Identifier points to a particular parameter in the SNMP agent. - // - Encoding of this field follows RFC2578(section 3.5) and ASN.1 X.690(section 8.1.3.6) - // specification. - // Refer: http://www.itu.int/ITU-T/asn1/ - // - According to BER, the first two numbers of any OID (x.y) are encoded as one value - // using the formula (40*x)+y. - // Example, the first two numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, - // because (40*1)+3 = 43. - // - After the first two numbers are encoded, the subsequent numbers in the OID are - // each encoded as a byte. - // - However, a special rule is required for large numbers because one byte can only - // represent a number from 0-127. - // - The rule for large numbers states that only the lower 7 bits in the byte are used - // for holding the value (0-127). - // - The highest order bit(8th) is used as a flag to indicate that this number spans - // more than one byte. Therefore, any number over 127 must be encoded using more than - // one byte. - // - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0' cannot be - // encoded using a single byte. - // According to this rule, the number 2680 must be encoded as 0x94 0x78. - // Since the most significant bit is set in the first byte (0x94), it indicates - // that number spans to the next byte. - // Since the most significant bit is not set in the next byte (0x78), it indicates - // that the number ends at the second byte. - // The value is derived by appending 7 bits from each of the concatenated bytes - // i.e (0x14 *128^1) + (0x78 * 128^0) = 2680. - // default = 0.1 - ObjectIdentifierValue *string `protobuf:"bytes,4,opt,name=object_identifier_value,json=objectIdentifierValue,proto3,oneof" json:"object_identifier_value,omitempty"` - // Description missing in models - IpAddressValue *PatternFlowSnmpv2CVariableBindingValueIpAddressValue `protobuf:"bytes,5,opt,name=ip_address_value,json=ipAddressValue,proto3" json:"ip_address_value,omitempty"` - // Description missing in models - CounterValue *PatternFlowSnmpv2CVariableBindingValueCounterValue `protobuf:"bytes,6,opt,name=counter_value,json=counterValue,proto3" json:"counter_value,omitempty"` - // Description missing in models - TimeticksValue *PatternFlowSnmpv2CVariableBindingValueTimeticksValue `protobuf:"bytes,7,opt,name=timeticks_value,json=timeticksValue,proto3" json:"timeticks_value,omitempty"` - // It contains the hex bytes of the value to be sent. As of now it is restricted to - // 10000 bytes. - // default = 00 - ArbitraryValue *string `protobuf:"bytes,8,opt,name=arbitrary_value,json=arbitraryValue,proto3,oneof" json:"arbitrary_value,omitempty"` - // Description missing in models - BigCounterValue *PatternFlowSnmpv2CVariableBindingValueBigCounterValue `protobuf:"bytes,9,opt,name=big_counter_value,json=bigCounterValue,proto3" json:"big_counter_value,omitempty"` - // Description missing in models - UnsignedIntegerValue *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue `protobuf:"bytes,10,opt,name=unsigned_integer_value,json=unsignedIntegerValue,proto3" json:"unsigned_integer_value,omitempty"` + // List of VTEPs for member VNI(VXLAN Network Identifier) + Vteps []*VxlanV4TunnelDestinationIPModeUnicastVtep `protobuf:"bytes,1,rep,name=vteps,proto3" json:"vteps,omitempty"` } -func (x *FlowSnmpv2CVariableBindingValue) Reset() { - *x = FlowSnmpv2CVariableBindingValue{} +func (x *VxlanV4TunnelDestinationIPModeUnicast) Reset() { + *x = VxlanV4TunnelDestinationIPModeUnicast{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[226] + mi := &file_otg_proto_msgTypes[232] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowSnmpv2CVariableBindingValue) String() string { +func (x *VxlanV4TunnelDestinationIPModeUnicast) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSnmpv2CVariableBindingValue) ProtoMessage() {} +func (*VxlanV4TunnelDestinationIPModeUnicast) ProtoMessage() {} -func (x *FlowSnmpv2CVariableBindingValue) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[226] +func (x *VxlanV4TunnelDestinationIPModeUnicast) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[232] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -42932,115 +44817,45 @@ func (x *FlowSnmpv2CVariableBindingValue) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSnmpv2CVariableBindingValue.ProtoReflect.Descriptor instead. -func (*FlowSnmpv2CVariableBindingValue) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{226} -} - -func (x *FlowSnmpv2CVariableBindingValue) GetChoice() FlowSnmpv2CVariableBindingValue_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowSnmpv2CVariableBindingValue_Choice_unspecified -} - -func (x *FlowSnmpv2CVariableBindingValue) GetIntegerValue() *PatternFlowSnmpv2CVariableBindingValueIntegerValue { - if x != nil { - return x.IntegerValue - } - return nil -} - -func (x *FlowSnmpv2CVariableBindingValue) GetStringValue() *FlowSnmpv2CVariableBindingStringValue { - if x != nil { - return x.StringValue - } - return nil -} - -func (x *FlowSnmpv2CVariableBindingValue) GetObjectIdentifierValue() string { - if x != nil && x.ObjectIdentifierValue != nil { - return *x.ObjectIdentifierValue - } - return "" -} - -func (x *FlowSnmpv2CVariableBindingValue) GetIpAddressValue() *PatternFlowSnmpv2CVariableBindingValueIpAddressValue { - if x != nil { - return x.IpAddressValue - } - return nil -} - -func (x *FlowSnmpv2CVariableBindingValue) GetCounterValue() *PatternFlowSnmpv2CVariableBindingValueCounterValue { - if x != nil { - return x.CounterValue - } - return nil -} - -func (x *FlowSnmpv2CVariableBindingValue) GetTimeticksValue() *PatternFlowSnmpv2CVariableBindingValueTimeticksValue { - if x != nil { - return x.TimeticksValue - } - return nil -} - -func (x *FlowSnmpv2CVariableBindingValue) GetArbitraryValue() string { - if x != nil && x.ArbitraryValue != nil { - return *x.ArbitraryValue - } - return "" -} - -func (x *FlowSnmpv2CVariableBindingValue) GetBigCounterValue() *PatternFlowSnmpv2CVariableBindingValueBigCounterValue { - if x != nil { - return x.BigCounterValue - } - return nil +// Deprecated: Use VxlanV4TunnelDestinationIPModeUnicast.ProtoReflect.Descriptor instead. +func (*VxlanV4TunnelDestinationIPModeUnicast) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{232} } -func (x *FlowSnmpv2CVariableBindingValue) GetUnsignedIntegerValue() *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue { +func (x *VxlanV4TunnelDestinationIPModeUnicast) GetVteps() []*VxlanV4TunnelDestinationIPModeUnicastVtep { if x != nil { - return x.UnsignedIntegerValue + return x.Vteps } return nil } -// It contains the raw/ascii string value to be sent. -type FlowSnmpv2CVariableBindingStringValue struct { +// Description missing in models +type VxlanV6TunnelDestinationIPModeUnicast struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.ascii - Choice *FlowSnmpv2CVariableBindingStringValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowSnmpv2CVariableBindingStringValue_Choice_Enum,oneof" json:"choice,omitempty"` - // It contains the ASCII string to be sent. As of now it is restricted to 10000 bytes. - // default = ascii - Ascii *string `protobuf:"bytes,2,opt,name=ascii,proto3,oneof" json:"ascii,omitempty"` - // It contains the hex string to be sent. As of now it is restricted to 10000 bytes. - // default = 00 - Raw *string `protobuf:"bytes,3,opt,name=raw,proto3,oneof" json:"raw,omitempty"` + // List of VTEPs for member VNI(VXLAN Network Identifier) + Vteps []*VxlanV6TunnelDestinationIPModeUnicastVtep `protobuf:"bytes,1,rep,name=vteps,proto3" json:"vteps,omitempty"` } -func (x *FlowSnmpv2CVariableBindingStringValue) Reset() { - *x = FlowSnmpv2CVariableBindingStringValue{} +func (x *VxlanV6TunnelDestinationIPModeUnicast) Reset() { + *x = VxlanV6TunnelDestinationIPModeUnicast{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[227] + mi := &file_otg_proto_msgTypes[233] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowSnmpv2CVariableBindingStringValue) String() string { +func (x *VxlanV6TunnelDestinationIPModeUnicast) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSnmpv2CVariableBindingStringValue) ProtoMessage() {} +func (*VxlanV6TunnelDestinationIPModeUnicast) ProtoMessage() {} -func (x *FlowSnmpv2CVariableBindingStringValue) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[227] +func (x *VxlanV6TunnelDestinationIPModeUnicast) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[233] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -43051,76 +44866,51 @@ func (x *FlowSnmpv2CVariableBindingStringValue) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use FlowSnmpv2CVariableBindingStringValue.ProtoReflect.Descriptor instead. -func (*FlowSnmpv2CVariableBindingStringValue) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{227} -} - -func (x *FlowSnmpv2CVariableBindingStringValue) GetChoice() FlowSnmpv2CVariableBindingStringValue_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowSnmpv2CVariableBindingStringValue_Choice_unspecified -} - -func (x *FlowSnmpv2CVariableBindingStringValue) GetAscii() string { - if x != nil && x.Ascii != nil { - return *x.Ascii - } - return "" +// Deprecated: Use VxlanV6TunnelDestinationIPModeUnicast.ProtoReflect.Descriptor instead. +func (*VxlanV6TunnelDestinationIPModeUnicast) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{233} } -func (x *FlowSnmpv2CVariableBindingStringValue) GetRaw() string { - if x != nil && x.Raw != nil { - return *x.Raw +func (x *VxlanV6TunnelDestinationIPModeUnicast) GetVteps() []*VxlanV6TunnelDestinationIPModeUnicastVtep { + if x != nil { + return x.Vteps } - return "" + return nil } -// RSVP packet header as defined in RFC2205 and RFC3209. Currently only supported message -// type is Path with mandatory objects and sub-objects. -type FlowRsvp struct { +// Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated +// MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request +// for another end-host IP address, its local VTEP intercepts the ARP request and checks +// for the ARP-resolved IP address in its ARP suppression cache table. If it finds +// a match, the local VTEP sends an ARP response on behalf of the remote end host. +type VxlanTunnelDestinationIPModeUnicastArpSuppressionCache struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // RSVP Protocol Version. - // default = 1 - Version *uint32 `protobuf:"varint,1,opt,name=version,proto3,oneof" json:"version,omitempty"` - // Flag, 0x01-0x08: Reserved. - // default = Flag.Enum.not_refresh_reduction_capable - Flag *FlowRsvp_Flag_Enum `protobuf:"varint,2,opt,name=flag,proto3,enum=otg.FlowRsvp_Flag_Enum,oneof" json:"flag,omitempty"` - // Description missing in models - RsvpChecksum *PatternFlowRsvpRsvpChecksum `protobuf:"bytes,3,opt,name=rsvp_checksum,json=rsvpChecksum,proto3" json:"rsvp_checksum,omitempty"` - // Description missing in models - TimeToLive *PatternFlowRsvpTimeToLive `protobuf:"bytes,4,opt,name=time_to_live,json=timeToLive,proto3" json:"time_to_live,omitempty"` - // Description missing in models - Reserved *PatternFlowRsvpReserved `protobuf:"bytes,5,opt,name=reserved,proto3" json:"reserved,omitempty"` - // The sum of the lengths of the common header and all objects included in the message. - RsvpLength *FlowRSVPLength `protobuf:"bytes,6,opt,name=rsvp_length,json=rsvpLength,proto3" json:"rsvp_length,omitempty"` - // An 8-bit number that identifies the function of the RSVP message. There are aound - // 20 message types defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-2 - // . Among these presently supported is Path(value: 1) message type. - MessageType *FlowRSVPMessage `protobuf:"bytes,7,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"` + // Remote VM MAC address bound to Remote VM IPv4 address + RemoteVmMac *string `protobuf:"bytes,1,opt,name=remote_vm_mac,json=remoteVmMac,proto3,oneof" json:"remote_vm_mac,omitempty"` + // Remote VM IPv4 address + RemoteVmIpv4 *string `protobuf:"bytes,2,opt,name=remote_vm_ipv4,json=remoteVmIpv4,proto3,oneof" json:"remote_vm_ipv4,omitempty"` } -func (x *FlowRsvp) Reset() { - *x = FlowRsvp{} +func (x *VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) Reset() { + *x = VxlanTunnelDestinationIPModeUnicastArpSuppressionCache{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[228] + mi := &file_otg_proto_msgTypes[234] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRsvp) String() string { +func (x *VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRsvp) ProtoMessage() {} +func (*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) ProtoMessage() {} -func (x *FlowRsvp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[228] +func (x *VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[234] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -43131,96 +44921,58 @@ func (x *FlowRsvp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRsvp.ProtoReflect.Descriptor instead. -func (*FlowRsvp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{228} -} - -func (x *FlowRsvp) GetVersion() uint32 { - if x != nil && x.Version != nil { - return *x.Version - } - return 0 -} - -func (x *FlowRsvp) GetFlag() FlowRsvp_Flag_Enum { - if x != nil && x.Flag != nil { - return *x.Flag - } - return FlowRsvp_Flag_unspecified -} - -func (x *FlowRsvp) GetRsvpChecksum() *PatternFlowRsvpRsvpChecksum { - if x != nil { - return x.RsvpChecksum - } - return nil -} - -func (x *FlowRsvp) GetTimeToLive() *PatternFlowRsvpTimeToLive { - if x != nil { - return x.TimeToLive - } - return nil -} - -func (x *FlowRsvp) GetReserved() *PatternFlowRsvpReserved { - if x != nil { - return x.Reserved - } - return nil +// Deprecated: Use VxlanTunnelDestinationIPModeUnicastArpSuppressionCache.ProtoReflect.Descriptor instead. +func (*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{234} } -func (x *FlowRsvp) GetRsvpLength() *FlowRSVPLength { - if x != nil { - return x.RsvpLength +func (x *VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) GetRemoteVmMac() string { + if x != nil && x.RemoteVmMac != nil { + return *x.RemoteVmMac } - return nil + return "" } -func (x *FlowRsvp) GetMessageType() *FlowRSVPMessage { - if x != nil { - return x.MessageType +func (x *VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) GetRemoteVmIpv4() string { + if x != nil && x.RemoteVmIpv4 != nil { + return *x.RemoteVmIpv4 } - return nil + return "" } -// Description missing in models -type FlowRSVPLength struct { +// VTEP (VXLAN Tunnel End Point (VTEP)) parameters +type VxlanV4TunnelDestinationIPModeUnicastVtep struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // auto or configured value. - // default = Choice.Enum.auto - Choice *FlowRSVPLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPLength_Choice_Enum,oneof" json:"choice,omitempty"` - // The OTG implementation will provide a system generated value for this property. - // If the OTG implementation is unable to generate a value the default value must be - // used. - // default = 0 - Auto *uint32 `protobuf:"varint,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,3,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Remote VXLAN Tunnel End Point address + RemoteVtepAddress *string `protobuf:"bytes,1,opt,name=remote_vtep_address,json=remoteVtepAddress,proto3,oneof" json:"remote_vtep_address,omitempty"` + // Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated + // MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request + // for another end-host IP address, its local VTEP intercepts the ARP request and checks + // for the ARP-resolved IP address in its ARP suppression cache table. If it finds + // a match, the local VTEP sends an ARP response on behalf of the remote end host. + ArpSuppressionCache []*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache `protobuf:"bytes,2,rep,name=arp_suppression_cache,json=arpSuppressionCache,proto3" json:"arp_suppression_cache,omitempty"` } -func (x *FlowRSVPLength) Reset() { - *x = FlowRSVPLength{} +func (x *VxlanV4TunnelDestinationIPModeUnicastVtep) Reset() { + *x = VxlanV4TunnelDestinationIPModeUnicastVtep{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[229] + mi := &file_otg_proto_msgTypes[235] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPLength) String() string { +func (x *VxlanV4TunnelDestinationIPModeUnicastVtep) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPLength) ProtoMessage() {} +func (*VxlanV4TunnelDestinationIPModeUnicastVtep) ProtoMessage() {} -func (x *FlowRSVPLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[229] +func (x *VxlanV4TunnelDestinationIPModeUnicastVtep) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[235] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -43231,62 +44983,58 @@ func (x *FlowRSVPLength) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPLength.ProtoReflect.Descriptor instead. -func (*FlowRSVPLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{229} -} - -func (x *FlowRSVPLength) GetChoice() FlowRSVPLength_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowRSVPLength_Choice_unspecified +// Deprecated: Use VxlanV4TunnelDestinationIPModeUnicastVtep.ProtoReflect.Descriptor instead. +func (*VxlanV4TunnelDestinationIPModeUnicastVtep) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{235} } -func (x *FlowRSVPLength) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto +func (x *VxlanV4TunnelDestinationIPModeUnicastVtep) GetRemoteVtepAddress() string { + if x != nil && x.RemoteVtepAddress != nil { + return *x.RemoteVtepAddress } - return 0 + return "" } -func (x *FlowRSVPLength) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *VxlanV4TunnelDestinationIPModeUnicastVtep) GetArpSuppressionCache() []*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { + if x != nil { + return x.ArpSuppressionCache } - return 0 + return nil } -// Description missing in models -type FlowRSVPMessage struct { +// VTEP (VXLAN Tunnel End Point (VTEP)) parameters +type VxlanV6TunnelDestinationIPModeUnicastVtep struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.path - Choice *FlowRSVPMessage_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPMessage_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Path *FlowRSVPPathMessage `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // Remote VXLAN Tunnel End Point address + RemoteVtepAddress *string `protobuf:"bytes,1,opt,name=remote_vtep_address,json=remoteVtepAddress,proto3,oneof" json:"remote_vtep_address,omitempty"` + // Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated + // MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request + // for another end-host IP address, its local VTEP intercepts the ARP request and checks + // for the ARP-resolved IP address in its ARP suppression cache table. If it finds + // a match, the local VTEP sends an ARP response on behalf of the remote end host. + ArpSuppressionCache []*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache `protobuf:"bytes,2,rep,name=arp_suppression_cache,json=arpSuppressionCache,proto3" json:"arp_suppression_cache,omitempty"` } -func (x *FlowRSVPMessage) Reset() { - *x = FlowRSVPMessage{} +func (x *VxlanV6TunnelDestinationIPModeUnicastVtep) Reset() { + *x = VxlanV6TunnelDestinationIPModeUnicastVtep{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[230] + mi := &file_otg_proto_msgTypes[236] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPMessage) String() string { +func (x *VxlanV6TunnelDestinationIPModeUnicastVtep) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPMessage) ProtoMessage() {} +func (*VxlanV6TunnelDestinationIPModeUnicastVtep) ProtoMessage() {} -func (x *FlowRSVPMessage) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[230] +func (x *VxlanV6TunnelDestinationIPModeUnicastVtep) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[236] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -43297,56 +45045,52 @@ func (x *FlowRSVPMessage) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPMessage.ProtoReflect.Descriptor instead. -func (*FlowRSVPMessage) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{230} +// Deprecated: Use VxlanV6TunnelDestinationIPModeUnicastVtep.ProtoReflect.Descriptor instead. +func (*VxlanV6TunnelDestinationIPModeUnicastVtep) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{236} } -func (x *FlowRSVPMessage) GetChoice() FlowRSVPMessage_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *VxlanV6TunnelDestinationIPModeUnicastVtep) GetRemoteVtepAddress() string { + if x != nil && x.RemoteVtepAddress != nil { + return *x.RemoteVtepAddress } - return FlowRSVPMessage_Choice_unspecified + return "" } -func (x *FlowRSVPMessage) GetPath() *FlowRSVPPathMessage { +func (x *VxlanV6TunnelDestinationIPModeUnicastVtep) GetArpSuppressionCache() []*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { if x != nil { - return x.Path + return x.ArpSuppressionCache } return nil } -// Path message requires the following list of objects in order as defined in https://www.rfc-editor.org/rfc/rfc3209.html#page-15: -// 1. SESSION 2. RSVP_HOP 3. TIME_VALUES 4. EXPLICIT_ROUTE [optional] 5. LABEL_REQUEST -// 6. SESSION_ATTRIBUTE [optional] 7. SENDER_TEMPLATE 8. SENDER_TSPEC 9. RECORD_ROUTE -// [optional] -type FlowRSVPPathMessage struct { +// Multicast Group address for member VNI(VXLAN Network Identifier) +type VxlanV4TunnelDestinationIPModeMulticast struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Path message requires atleast SESSION, RSVP_HOP, TIME_VALUES, LABEL_REQUEST, SENDER_TEMPLATE - // and SENDER_TSPEC objects in order. - Objects []*FlowRSVPPathObjects `protobuf:"bytes,1,rep,name=objects,proto3" json:"objects,omitempty"` + // IPv4 Multicast address + Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` } -func (x *FlowRSVPPathMessage) Reset() { - *x = FlowRSVPPathMessage{} +func (x *VxlanV4TunnelDestinationIPModeMulticast) Reset() { + *x = VxlanV4TunnelDestinationIPModeMulticast{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[231] + mi := &file_otg_proto_msgTypes[237] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathMessage) String() string { +func (x *VxlanV4TunnelDestinationIPModeMulticast) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathMessage) ProtoMessage() {} +func (*VxlanV4TunnelDestinationIPModeMulticast) ProtoMessage() {} -func (x *FlowRSVPPathMessage) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[231] +func (x *VxlanV4TunnelDestinationIPModeMulticast) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[237] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -43357,46 +45101,45 @@ func (x *FlowRSVPPathMessage) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathMessage.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathMessage) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{231} +// Deprecated: Use VxlanV4TunnelDestinationIPModeMulticast.ProtoReflect.Descriptor instead. +func (*VxlanV4TunnelDestinationIPModeMulticast) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{237} } -func (x *FlowRSVPPathMessage) GetObjects() []*FlowRSVPPathObjects { - if x != nil { - return x.Objects +func (x *VxlanV4TunnelDestinationIPModeMulticast) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address } - return nil + return "" } -// Every RSVP object encapsulated in an RSVP message consists of a 32-bit word header -// and the object's contents. -type FlowRSVPPathObjects struct { +// Multicast Group address for member VNI(VXLAN Network Identifier) +type VxlanV6TunnelDestinationIPModeMulticast struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - ClassNum *FlowRSVPPathObjectsClass `protobuf:"bytes,1,opt,name=class_num,json=classNum,proto3" json:"class_num,omitempty"` + // IPv6 Multicast address + Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` } -func (x *FlowRSVPPathObjects) Reset() { - *x = FlowRSVPPathObjects{} +func (x *VxlanV6TunnelDestinationIPModeMulticast) Reset() { + *x = VxlanV6TunnelDestinationIPModeMulticast{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[232] + mi := &file_otg_proto_msgTypes[238] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathObjects) String() string { +func (x *VxlanV6TunnelDestinationIPModeMulticast) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjects) ProtoMessage() {} +func (*VxlanV6TunnelDestinationIPModeMulticast) ProtoMessage() {} -func (x *FlowRSVPPathObjects) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[232] +func (x *VxlanV6TunnelDestinationIPModeMulticast) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[238] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -43407,54 +45150,54 @@ func (x *FlowRSVPPathObjects) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjects.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjects) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{232} +// Deprecated: Use VxlanV6TunnelDestinationIPModeMulticast.ProtoReflect.Descriptor instead. +func (*VxlanV6TunnelDestinationIPModeMulticast) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{238} } -func (x *FlowRSVPPathObjects) GetClassNum() *FlowRSVPPathObjectsClass { - if x != nil { - return x.ClassNum +func (x *VxlanV6TunnelDestinationIPModeMulticast) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address } - return nil + return "" } -// Description missing in models -type FlowRSVPObjectLength struct { +// Configuration for one or more RSVP interfaces, ingress and egress LSPs. In this model, +// currently IPv4 RSVP and point-to-point LSPs are supported as per RFC3209 and related +// specifications. +type DeviceRsvp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // auto or configured value. - // default = Choice.Enum.auto - Choice *FlowRSVPObjectLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPObjectLength_Choice_Enum,oneof" json:"choice,omitempty"` - // The OTG implementation will provide a system generated value for this property. - // If the OTG implementation is unable to generate a value the default value must be - // used. - // default = 4 - Auto *uint32 `protobuf:"varint,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // Description missing in models - // default = 4 - Value *uint32 `protobuf:"varint,3,opt,name=value,proto3,oneof" json:"value,omitempty"` + // List of IPv4 RSVP connected interfaces. At least one interface should be present + // for device connected to the DUT. For unconnected devices, this array must be empty. + Ipv4Interfaces []*RsvpIpv4Interface `protobuf:"bytes,1,rep,name=ipv4_interfaces,json=ipv4Interfaces,proto3" json:"ipv4_interfaces,omitempty"` + // List of IPv4 Loopback or IPv4 connected interfaces acting as RSVP ingress and egress + // endpoints. + LspIpv4Interfaces []*RsvpLspIpv4Interface `protobuf:"bytes,2,rep,name=lsp_ipv4_interfaces,json=lspIpv4Interfaces,proto3" json:"lsp_ipv4_interfaces,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + Name *string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"` } -func (x *FlowRSVPObjectLength) Reset() { - *x = FlowRSVPObjectLength{} +func (x *DeviceRsvp) Reset() { + *x = DeviceRsvp{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[233] + mi := &file_otg_proto_msgTypes[239] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPObjectLength) String() string { +func (x *DeviceRsvp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPObjectLength) ProtoMessage() {} +func (*DeviceRsvp) ProtoMessage() {} -func (x *FlowRSVPObjectLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[233] +func (x *DeviceRsvp) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[239] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -43465,85 +45208,108 @@ func (x *FlowRSVPObjectLength) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPObjectLength.ProtoReflect.Descriptor instead. -func (*FlowRSVPObjectLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{233} +// Deprecated: Use DeviceRsvp.ProtoReflect.Descriptor instead. +func (*DeviceRsvp) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{239} } -func (x *FlowRSVPObjectLength) GetChoice() FlowRSVPObjectLength_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *DeviceRsvp) GetIpv4Interfaces() []*RsvpIpv4Interface { + if x != nil { + return x.Ipv4Interfaces } - return FlowRSVPObjectLength_Choice_unspecified + return nil } -func (x *FlowRSVPObjectLength) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto +func (x *DeviceRsvp) GetLspIpv4Interfaces() []*RsvpLspIpv4Interface { + if x != nil { + return x.LspIpv4Interfaces } - return 0 + return nil } -func (x *FlowRSVPObjectLength) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *DeviceRsvp) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return 0 + return "" } -// The class number is used to identify the class of an object. Defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-4 -// . Curently supported class numbers are for Path message type. Path message: Supported -// Class numbers and it's value: SESSION: 1, RSVP_HOP: 3, TIME_VALUES: 5, EXPLICIT_ROUTE: -// 20, LABEL_REQUEST: 19, SESSION_ATTRIBUTE: 207, SENDER_TEMPLATE: 11, SENDER_TSPEC: -// 12, RECORD_ROUTE: 21, Custom: User defined bytes based on class and c-types not supported -// in above options. -type FlowRSVPPathObjectsClass struct { +// Configuration for RSVP Interface. +type RsvpIpv4Interface struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models + // The globally unique name of the IPv4 interface connected to the DUT. This name must + // match the name field of the ipv4_addresses on top which this RSVP interface is configured. + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // // required = true - Choice *FlowRSVPPathObjectsClass_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsClass_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Session *FlowRSVPPathObjectsClassSession `protobuf:"bytes,2,opt,name=session,proto3" json:"session,omitempty"` - // Description missing in models - RsvpHop *FlowRSVPPathObjectsClassRsvpHop `protobuf:"bytes,3,opt,name=rsvp_hop,json=rsvpHop,proto3" json:"rsvp_hop,omitempty"` - // Description missing in models - TimeValues *FlowRSVPPathObjectsClassTimeValues `protobuf:"bytes,4,opt,name=time_values,json=timeValues,proto3" json:"time_values,omitempty"` - // Description missing in models - ExplicitRoute *FlowRSVPPathObjectsClassExplicitRoute `protobuf:"bytes,5,opt,name=explicit_route,json=explicitRoute,proto3" json:"explicit_route,omitempty"` - // Description missing in models - LabelRequest *FlowRSVPPathObjectsClassLabelRequest `protobuf:"bytes,6,opt,name=label_request,json=labelRequest,proto3" json:"label_request,omitempty"` - // Description missing in models - SessionAttribute *FlowRSVPPathObjectsClassSessionAttribute `protobuf:"bytes,7,opt,name=session_attribute,json=sessionAttribute,proto3" json:"session_attribute,omitempty"` - // Description missing in models - SenderTemplate *FlowRSVPPathObjectsClassSenderTemplate `protobuf:"bytes,8,opt,name=sender_template,json=senderTemplate,proto3" json:"sender_template,omitempty"` - // Description missing in models - SenderTspec *FlowRSVPPathObjectsClassSenderTspec `protobuf:"bytes,9,opt,name=sender_tspec,json=senderTspec,proto3" json:"sender_tspec,omitempty"` - // Description missing in models - RecordRoute *FlowRSVPPathObjectsClassRecordRoute `protobuf:"bytes,10,opt,name=record_route,json=recordRoute,proto3" json:"record_route,omitempty"` - // Description missing in models - Custom *FlowRSVPPathObjectsCustom `protobuf:"bytes,11,opt,name=custom,proto3" json:"custom,omitempty"` + Ipv4Name *string `protobuf:"bytes,1,opt,name=ipv4_name,json=ipv4Name,proto3,oneof" json:"ipv4_name,omitempty"` + // IPv4 address of the RSVP neighbor on this interface. + // required = true + NeighborIp *string `protobuf:"bytes,2,opt,name=neighbor_ip,json=neighborIp,proto3,oneof" json:"neighbor_ip,omitempty"` + // The user-defined label space start value. The LSPs for which this router acts as + // a egress are assigned labels from this label pool.Thelabel_space_start and label_space_end + // together defines this label-pool. + // default = 1000 + LabelSpaceStart *uint32 `protobuf:"varint,3,opt,name=label_space_start,json=labelSpaceStart,proto3,oneof" json:"label_space_start,omitempty"` + // The user-defined label space end value.The last label value that can be assigned + // to the LSPs for which this router acts as egress. + // default = 100000 + LabelSpaceEnd *uint32 `protobuf:"varint,4,opt,name=label_space_end,json=labelSpaceEnd,proto3,oneof" json:"label_space_end,omitempty"` + // Enables sending of Refresh Reduction as described in RFC2961. + // default = False + EnableRefreshReduction *bool `protobuf:"varint,5,opt,name=enable_refresh_reduction,json=enableRefreshReduction,proto3,oneof" json:"enable_refresh_reduction,omitempty"` + // The number of seconds between transmissions of successive Summary Refreshes. There + // is no specification specified maximum value. For clarity, setting the maximum to + // 1 hour. + // default = 30 + SummaryRefreshInterval *uint32 `protobuf:"varint,6,opt,name=summary_refresh_interval,json=summaryRefreshInterval,proto3,oneof" json:"summary_refresh_interval,omitempty"` + // Enables aggregration of different RSVP messages within a single PDU. + // default = False + SendBundle *bool `protobuf:"varint,7,opt,name=send_bundle,json=sendBundle,proto3,oneof" json:"send_bundle,omitempty"` + // The number of milliseconds to wait after which RSVP will bundle different RSVP messages + // and transmit Bundle messages. + // default = 50 + BundleThreshold *uint32 `protobuf:"varint,8,opt,name=bundle_threshold,json=bundleThreshold,proto3,oneof" json:"bundle_threshold,omitempty"` + // Enables sending of Hello Messages as per RFC3209. + // default = False + EnableHello *bool `protobuf:"varint,9,opt,name=enable_hello,json=enableHello,proto3,oneof" json:"enable_hello,omitempty"` + // If enable_hello is set to 'true', this specifies the minimum hello interval in seconds + // at which successive Hello Messages are sent as per RFC3209. There is no specification + // specified maximum value. For clarity, setting the maximum to 1 hour. + // default = 9 + HelloInterval *uint32 `protobuf:"varint,10,opt,name=hello_interval,json=helloInterval,proto3,oneof" json:"hello_interval,omitempty"` + // The number of missed hellos after which the node should consider RSVP Neighbor to + // have timed out. There is no specification specified maximum value. Setting the maximum + // allowed value to 10. + // default = 3 + TimeoutMultiplier *uint32 `protobuf:"varint,11,opt,name=timeout_multiplier,json=timeoutMultiplier,proto3,oneof" json:"timeout_multiplier,omitempty"` } -func (x *FlowRSVPPathObjectsClass) Reset() { - *x = FlowRSVPPathObjectsClass{} +func (x *RsvpIpv4Interface) Reset() { + *x = RsvpIpv4Interface{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[234] + mi := &file_otg_proto_msgTypes[240] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathObjectsClass) String() string { +func (x *RsvpIpv4Interface) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsClass) ProtoMessage() {} +func (*RsvpIpv4Interface) ProtoMessage() {} -func (x *FlowRSVPPathObjectsClass) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[234] +func (x *RsvpIpv4Interface) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[240] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -43554,118 +45320,132 @@ func (x *FlowRSVPPathObjectsClass) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsClass.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsClass) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{234} +// Deprecated: Use RsvpIpv4Interface.ProtoReflect.Descriptor instead. +func (*RsvpIpv4Interface) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{240} } -func (x *FlowRSVPPathObjectsClass) GetChoice() FlowRSVPPathObjectsClass_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *RsvpIpv4Interface) GetIpv4Name() string { + if x != nil && x.Ipv4Name != nil { + return *x.Ipv4Name } - return FlowRSVPPathObjectsClass_Choice_unspecified + return "" } -func (x *FlowRSVPPathObjectsClass) GetSession() *FlowRSVPPathObjectsClassSession { - if x != nil { - return x.Session +func (x *RsvpIpv4Interface) GetNeighborIp() string { + if x != nil && x.NeighborIp != nil { + return *x.NeighborIp } - return nil + return "" } -func (x *FlowRSVPPathObjectsClass) GetRsvpHop() *FlowRSVPPathObjectsClassRsvpHop { - if x != nil { - return x.RsvpHop +func (x *RsvpIpv4Interface) GetLabelSpaceStart() uint32 { + if x != nil && x.LabelSpaceStart != nil { + return *x.LabelSpaceStart } - return nil + return 0 } -func (x *FlowRSVPPathObjectsClass) GetTimeValues() *FlowRSVPPathObjectsClassTimeValues { - if x != nil { - return x.TimeValues +func (x *RsvpIpv4Interface) GetLabelSpaceEnd() uint32 { + if x != nil && x.LabelSpaceEnd != nil { + return *x.LabelSpaceEnd } - return nil + return 0 } -func (x *FlowRSVPPathObjectsClass) GetExplicitRoute() *FlowRSVPPathObjectsClassExplicitRoute { - if x != nil { - return x.ExplicitRoute +func (x *RsvpIpv4Interface) GetEnableRefreshReduction() bool { + if x != nil && x.EnableRefreshReduction != nil { + return *x.EnableRefreshReduction } - return nil + return false } -func (x *FlowRSVPPathObjectsClass) GetLabelRequest() *FlowRSVPPathObjectsClassLabelRequest { - if x != nil { - return x.LabelRequest +func (x *RsvpIpv4Interface) GetSummaryRefreshInterval() uint32 { + if x != nil && x.SummaryRefreshInterval != nil { + return *x.SummaryRefreshInterval } - return nil + return 0 } -func (x *FlowRSVPPathObjectsClass) GetSessionAttribute() *FlowRSVPPathObjectsClassSessionAttribute { - if x != nil { - return x.SessionAttribute +func (x *RsvpIpv4Interface) GetSendBundle() bool { + if x != nil && x.SendBundle != nil { + return *x.SendBundle } - return nil + return false } -func (x *FlowRSVPPathObjectsClass) GetSenderTemplate() *FlowRSVPPathObjectsClassSenderTemplate { - if x != nil { - return x.SenderTemplate +func (x *RsvpIpv4Interface) GetBundleThreshold() uint32 { + if x != nil && x.BundleThreshold != nil { + return *x.BundleThreshold } - return nil + return 0 } -func (x *FlowRSVPPathObjectsClass) GetSenderTspec() *FlowRSVPPathObjectsClassSenderTspec { - if x != nil { - return x.SenderTspec +func (x *RsvpIpv4Interface) GetEnableHello() bool { + if x != nil && x.EnableHello != nil { + return *x.EnableHello } - return nil + return false } -func (x *FlowRSVPPathObjectsClass) GetRecordRoute() *FlowRSVPPathObjectsClassRecordRoute { - if x != nil { - return x.RecordRoute +func (x *RsvpIpv4Interface) GetHelloInterval() uint32 { + if x != nil && x.HelloInterval != nil { + return *x.HelloInterval } - return nil + return 0 } -func (x *FlowRSVPPathObjectsClass) GetCustom() *FlowRSVPPathObjectsCustom { - if x != nil { - return x.Custom +func (x *RsvpIpv4Interface) GetTimeoutMultiplier() uint32 { + if x != nil && x.TimeoutMultiplier != nil { + return *x.TimeoutMultiplier } - return nil + return 0 } -// C-Type is specific to a class num. -type FlowRSVPPathObjectsClassSession struct { +// Configuration for RSVP LSP IPv4 Interface. +type RsvpLspIpv4Interface struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` - // Description missing in models - CType *FlowRSVPPathObjectsSessionCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` + // The globally unique name of the IPv4 or Loopback IPv4 interface acting as the RSVP + // ingress and egress endpoint for the LSPs configured on this interface. This must + // match the name field of either ipv4_addresses or ipv4_loopbacks on which this LSP + // interface is configured. + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv4Loopback/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv4Loopback/properties/name + // + // required = true + Ipv4Name *string `protobuf:"bytes,1,opt,name=ipv4_name,json=ipv4Name,proto3,oneof" json:"ipv4_name,omitempty"` + // Contains properties of Tail(Egress) LSPs. + P2PEgressIpv4Lsps *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp `protobuf:"bytes,2,opt,name=p2p_egress_ipv4_lsps,json=p2pEgressIpv4Lsps,proto3" json:"p2p_egress_ipv4_lsps,omitempty"` + // Array of point-to-point RSVP-TE P2P LSPs originating from this interface. + P2PIngressIpv4Lsps []*RsvpLspIpv4InterfaceP2PIngressIpv4Lsp `protobuf:"bytes,3,rep,name=p2p_ingress_ipv4_lsps,json=p2pIngressIpv4Lsps,proto3" json:"p2p_ingress_ipv4_lsps,omitempty"` } -func (x *FlowRSVPPathObjectsClassSession) Reset() { - *x = FlowRSVPPathObjectsClassSession{} +func (x *RsvpLspIpv4Interface) Reset() { + *x = RsvpLspIpv4Interface{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[235] + mi := &file_otg_proto_msgTypes[241] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathObjectsClassSession) String() string { +func (x *RsvpLspIpv4Interface) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsClassSession) ProtoMessage() {} +func (*RsvpLspIpv4Interface) ProtoMessage() {} -func (x *FlowRSVPPathObjectsClassSession) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[235] +func (x *RsvpLspIpv4Interface) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[241] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -43676,56 +45456,88 @@ func (x *FlowRSVPPathObjectsClassSession) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsClassSession.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsClassSession) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{235} +// Deprecated: Use RsvpLspIpv4Interface.ProtoReflect.Descriptor instead. +func (*RsvpLspIpv4Interface) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{241} } -func (x *FlowRSVPPathObjectsClassSession) GetLength() *FlowRSVPObjectLength { +func (x *RsvpLspIpv4Interface) GetIpv4Name() string { + if x != nil && x.Ipv4Name != nil { + return *x.Ipv4Name + } + return "" +} + +func (x *RsvpLspIpv4Interface) GetP2PEgressIpv4Lsps() *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp { if x != nil { - return x.Length + return x.P2PEgressIpv4Lsps } return nil } -func (x *FlowRSVPPathObjectsClassSession) GetCType() *FlowRSVPPathObjectsSessionCType { +func (x *RsvpLspIpv4Interface) GetP2PIngressIpv4Lsps() []*RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { if x != nil { - return x.CType + return x.P2PIngressIpv4Lsps } return nil } -// The body of an object corresponding to the class number and c-type. Currently supported -// c-type for SESSION object is LSP Tunnel IPv4 (7). -type FlowRSVPPathObjectsSessionCType struct { +// Configuration for RSVP Egress Point-to-Point(P2P) IPv4 LSPs. +type RsvpLspIpv4InterfaceP2PEgressIpv4Lsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.lsp_tunnel_ipv4 - Choice *FlowRSVPPathObjectsSessionCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsSessionCType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - LspTunnelIpv4 *FlowRSVPPathSessionLspTunnelIpv4 `protobuf:"bytes,2,opt,name=lsp_tunnel_ipv4,json=lspTunnelIpv4,proto3" json:"lsp_tunnel_ipv4,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // The time in seconds between successive transmissions of RESV Refreshes. The actual + // refresh interval is jittered by upto 50%. There is no specification specified maximum + // value. For clarity, setting the maximum to 1 hour. + // default = 30 + RefreshInterval *uint32 `protobuf:"varint,2,opt,name=refresh_interval,json=refreshInterval,proto3,oneof" json:"refresh_interval,omitempty"` + // The number of missed PATH refreshes after which a recieving node should consider + // the LSP state to have timed out. There is no specification specified maximum value. + // Setting the maximum allowed value to 10. + // default = 3 + TimeoutMultiplier *uint32 `protobuf:"varint,3,opt,name=timeout_multiplier,json=timeoutMultiplier,proto3,oneof" json:"timeout_multiplier,omitempty"` + // It determines how RSVP-TE enabled network devices set up reservations along the path + // between an end-to-end QOS-enabled connection. If 'auto' is enabled, the style is + // chosen based on whether the incoming Path has 'SE Desired' flag set. Otherwise, the + // style is chosen based on the value selected for this attribute. + // default = ReservationStyle.Enum.shared_explicit + ReservationStyle *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum `protobuf:"varint,4,opt,name=reservation_style,json=reservationStyle,proto3,enum=otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum,oneof" json:"reservation_style,omitempty"` + // If enabled, a specific fixed label will be advertised by the egress or tail end for + // all Path messages received by this egress. This can be leveraged to advertise Explicit + // or Implicit null labels. + // default = False + EnableFixedLabel *bool `protobuf:"varint,5,opt,name=enable_fixed_label,json=enableFixedLabel,proto3,oneof" json:"enable_fixed_label,omitempty"` + // The fixed label value as advertised by egress in RESV message. Applicable only if + // 'fixed_label' is set to 'true'. Special values are '0 - IPv4 Explicit NULL', '2 - + // IPv6 Explicit NULL' and '3 - Implicit NULL'. Outside of this, labels are expected + // to have a minimum value of 16. + // default = 0 + FixedLabelValue *uint32 `protobuf:"varint,6,opt,name=fixed_label_value,json=fixedLabelValue,proto3,oneof" json:"fixed_label_value,omitempty"` } -func (x *FlowRSVPPathObjectsSessionCType) Reset() { - *x = FlowRSVPPathObjectsSessionCType{} +func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) Reset() { + *x = RsvpLspIpv4InterfaceP2PEgressIpv4Lsp{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[236] + mi := &file_otg_proto_msgTypes[242] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathObjectsSessionCType) String() string { +func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsSessionCType) ProtoMessage() {} +func (*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) ProtoMessage() {} -func (x *FlowRSVPPathObjectsSessionCType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[236] +func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[242] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -43736,61 +45548,134 @@ func (x *FlowRSVPPathObjectsSessionCType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsSessionCType.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsSessionCType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{236} +// Deprecated: Use RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.ProtoReflect.Descriptor instead. +func (*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{242} } -func (x *FlowRSVPPathObjectsSessionCType) GetChoice() FlowRSVPPathObjectsSessionCType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return FlowRSVPPathObjectsSessionCType_Choice_unspecified + return "" } -func (x *FlowRSVPPathObjectsSessionCType) GetLspTunnelIpv4() *FlowRSVPPathSessionLspTunnelIpv4 { - if x != nil { - return x.LspTunnelIpv4 +func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) GetRefreshInterval() uint32 { + if x != nil && x.RefreshInterval != nil { + return *x.RefreshInterval } - return nil + return 0 } -// Class = SESSION, LSP_TUNNEL_IPv4 C-Type = 7. -type FlowRSVPPathSessionLspTunnelIpv4 struct { +func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) GetTimeoutMultiplier() uint32 { + if x != nil && x.TimeoutMultiplier != nil { + return *x.TimeoutMultiplier + } + return 0 +} + +func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) GetReservationStyle() RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum { + if x != nil && x.ReservationStyle != nil { + return *x.ReservationStyle + } + return RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_unspecified +} + +func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) GetEnableFixedLabel() bool { + if x != nil && x.EnableFixedLabel != nil { + return *x.EnableFixedLabel + } + return false +} + +func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) GetFixedLabelValue() uint32 { + if x != nil && x.FixedLabelValue != nil { + return *x.FixedLabelValue + } + return 0 +} + +// Configuration for an RSVP Ingress point-to-point LSP. +type RsvpLspIpv4InterfaceP2PIngressIpv4Lsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Ipv4TunnelEndPointAddress *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress `protobuf:"bytes,1,opt,name=ipv4_tunnel_end_point_address,json=ipv4TunnelEndPointAddress,proto3" json:"ipv4_tunnel_end_point_address,omitempty"` - // Description missing in models - Reserved *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved `protobuf:"bytes,2,opt,name=reserved,proto3" json:"reserved,omitempty"` - // Description missing in models - TunnelId *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId `protobuf:"bytes,3,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - // A 32-bit identifier used in the SESSION that remains constant over the life of the - // tunnel. Normally set to all zeros. Ingress nodes that wish to narrow the scope of - // a SESSION to the ingress-egress pair may place their IPv4 address here as a globally - // unique identifier. - ExtendedTunnelId *FlowRSVPPathSessionExtTunnelId `protobuf:"bytes,4,opt,name=extended_tunnel_id,json=extendedTunnelId,proto3" json:"extended_tunnel_id,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // IPv4 address of the remote endpoint of the LSP. + // required = true + RemoteAddress *string `protobuf:"bytes,2,opt,name=remote_address,json=remoteAddress,proto3,oneof" json:"remote_address,omitempty"` + // The Tunnel ID of the RSVP LSP. Carried in the SESSION object in Path Messages. + // default = 1 + TunnelId *uint32 `protobuf:"varint,3,opt,name=tunnel_id,json=tunnelId,proto3,oneof" json:"tunnel_id,omitempty"` + // The LSP ID of the RSVP LSP. Carried in the SENDER_TEMPLATE object in Path Messages. + // default = 1 + LspId *uint32 `protobuf:"varint,4,opt,name=lsp_id,json=lspId,proto3,oneof" json:"lsp_id,omitempty"` + // The time in seconds between successive transmissions of PATH Refreshes. The actual + // refresh interval is jittered by upto 50%. There is no specification specified maximum + // value. For clarity, setting the maximum to 1 hour. + // default = 30 + RefreshInterval *uint32 `protobuf:"varint,5,opt,name=refresh_interval,json=refreshInterval,proto3,oneof" json:"refresh_interval,omitempty"` + // The number of missed RESV refreshes after which a recieving node should consider + // the LSP state to have timed out. There is no specification specified maximum value. + // Setting the maximum allowed value to 10. + // default = 3 + TimeoutMultiplier *uint32 `protobuf:"varint,6,opt,name=timeout_multiplier,json=timeoutMultiplier,proto3,oneof" json:"timeout_multiplier,omitempty"` + // The LSP id that will be used when creating a Make-Before-Break LSP when the active + // LSP is using lsp_id. If the active LSP on which Make-Before-Break is being done is + // using the backup_lsp_id, the new LSP created will toggle to use the lsp_id instead. + // default = 2 + BackupLspId *uint32 `protobuf:"varint,7,opt,name=backup_lsp_id,json=backupLspId,proto3,oneof" json:"backup_lsp_id,omitempty"` + // The amount of delay in milliseconds that an implementation should wait for before + // switching traffic to the new LSP created after a Make-Before-Break is done on an + // LSP. The default value is 0 which means to switch immediately. An implementation + // should support a minimum delay value of at least 50ms . There is no specification + // specified maximum value. Setting maximum allowed value to 1 minute. If a delay value + // is supplied which is lesser than the minimum delay value supported, a warning should + // be provided indicating that the minimum value of LSP switchover delay is automatically + // increased to the supported minimum value. This warning should be included in the + // list of warnings in the 'Response.Warning' attribute sent in the SetConfig 'Success' + // Response. + // default = 0 + LspSwitchoverDelay *uint32 `protobuf:"varint,8,opt,name=lsp_switchover_delay,json=lspSwitchoverDelay,proto3,oneof" json:"lsp_switchover_delay,omitempty"` + // This contains the values of the fields to be included in the SESSION_ATTRIBUTE object + // in the Path Message sent for the LSP. + SessionAttribute *RsvpSessionAttribute `protobuf:"bytes,9,opt,name=session_attribute,json=sessionAttribute,proto3" json:"session_attribute,omitempty"` + // This contains the values of the fields to be included in the TSPEC object in the + // Path Message sent for the LSP. + Tspec *RsvpTspec `protobuf:"bytes,10,opt,name=tspec,proto3" json:"tspec,omitempty"` + // This contains the values of the fields to be included in the FAST_REROUTE object + // in the Path Message sent for the LSP. + // This is an optional object . If this attribute is not included , the FAST_REROUTE + // object will not be included. + FastReroute *RsvpFastReroute `protobuf:"bytes,11,opt,name=fast_reroute,json=fastReroute,proto3" json:"fast_reroute,omitempty"` + // This contains the values of the fields to be included in the ERO object in the Path + // Message sent for the LSP. + // This is an optional object . If this attribute is not included , the ERO object will + // not be included. + Ero *RsvpEro `protobuf:"bytes,12,opt,name=ero,proto3" json:"ero,omitempty"` } -func (x *FlowRSVPPathSessionLspTunnelIpv4) Reset() { - *x = FlowRSVPPathSessionLspTunnelIpv4{} +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) Reset() { + *x = RsvpLspIpv4InterfaceP2PIngressIpv4Lsp{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[237] + mi := &file_otg_proto_msgTypes[243] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathSessionLspTunnelIpv4) String() string { +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathSessionLspTunnelIpv4) ProtoMessage() {} +func (*RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) ProtoMessage() {} -func (x *FlowRSVPPathSessionLspTunnelIpv4) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[237] +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[243] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -43801,71 +45686,177 @@ func (x *FlowRSVPPathSessionLspTunnelIpv4) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathSessionLspTunnelIpv4.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathSessionLspTunnelIpv4) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{237} +// Deprecated: Use RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.ProtoReflect.Descriptor instead. +func (*RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{243} } -func (x *FlowRSVPPathSessionLspTunnelIpv4) GetIpv4TunnelEndPointAddress() *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress { +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetRemoteAddress() string { + if x != nil && x.RemoteAddress != nil { + return *x.RemoteAddress + } + return "" +} + +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetTunnelId() uint32 { + if x != nil && x.TunnelId != nil { + return *x.TunnelId + } + return 0 +} + +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetLspId() uint32 { + if x != nil && x.LspId != nil { + return *x.LspId + } + return 0 +} + +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetRefreshInterval() uint32 { + if x != nil && x.RefreshInterval != nil { + return *x.RefreshInterval + } + return 0 +} + +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetTimeoutMultiplier() uint32 { + if x != nil && x.TimeoutMultiplier != nil { + return *x.TimeoutMultiplier + } + return 0 +} + +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetBackupLspId() uint32 { + if x != nil && x.BackupLspId != nil { + return *x.BackupLspId + } + return 0 +} + +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetLspSwitchoverDelay() uint32 { + if x != nil && x.LspSwitchoverDelay != nil { + return *x.LspSwitchoverDelay + } + return 0 +} + +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetSessionAttribute() *RsvpSessionAttribute { if x != nil { - return x.Ipv4TunnelEndPointAddress + return x.SessionAttribute } return nil } -func (x *FlowRSVPPathSessionLspTunnelIpv4) GetReserved() *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved { +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetTspec() *RsvpTspec { if x != nil { - return x.Reserved + return x.Tspec } return nil } -func (x *FlowRSVPPathSessionLspTunnelIpv4) GetTunnelId() *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId { +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetFastReroute() *RsvpFastReroute { if x != nil { - return x.TunnelId + return x.FastReroute } return nil } -func (x *FlowRSVPPathSessionLspTunnelIpv4) GetExtendedTunnelId() *FlowRSVPPathSessionExtTunnelId { +func (x *RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) GetEro() *RsvpEro { if x != nil { - return x.ExtendedTunnelId + return x.Ero } return nil } -// Description missing in models -type FlowRSVPPathSessionExtTunnelId struct { +// Configuration for RSVP-TE SESSION_ATTRIBUTE object included in Path Messages as defined +// in RFC3209. The bandwidth_protection_desired and node_protection_desired flags are +// defined in RFC4090 (Fast Reroute). +type RsvpSessionAttribute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // 32 bit integer or IPv4 address. - // default = Choice.Enum.as_integer - Choice *FlowRSVPPathSessionExtTunnelId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathSessionExtTunnelId_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - AsInteger *PatternFlowRSVPPathSessionExtTunnelIdAsInteger `protobuf:"bytes,2,opt,name=as_integer,json=asInteger,proto3" json:"as_integer,omitempty"` - // Description missing in models - AsIpv4 *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 `protobuf:"bytes,3,opt,name=as_ipv4,json=asIpv4,proto3" json:"as_ipv4,omitempty"` + // If this is enabled, an auto-generated Session Name is included in the SESSION_ATTRIBUTE + // object in the Path Message for this LSP. + // default = True + AutoGenerateSessionName *bool `protobuf:"varint,1,opt,name=auto_generate_session_name,json=autoGenerateSessionName,proto3,oneof" json:"auto_generate_session_name,omitempty"` + // If auto_generate_session_name is set to 'false', then the value of this field is + // used to fill the Session Name field of the SESSION_ATTRIBUTE object in the Path Message + // for this LSP. It is suggested to include the Local IP, Remote IP, Tunnel ID and LSP + // ID in the auto-generated Session Name to ensure uniqueness of the name in the test. + // The maximum length of session name is 254 bytes. + SessionName *string `protobuf:"bytes,2,opt,name=session_name,json=sessionName,proto3,oneof" json:"session_name,omitempty"` + // Specifies the value of the Setup Priority field. This controls whether the LSP should + // pre-empt existing LSP setup with certain Holding Priority if resource limitation + // is encountered when setting up the LSP. (e.g. bandwidth availability). The value + // 0 is the highest priority while 7 is the lowest. + // default = 7 + SetupPriority *uint32 `protobuf:"varint,3,opt,name=setup_priority,json=setupPriority,proto3,oneof" json:"setup_priority,omitempty"` + // Specifies the value of the Holding Priority field. This controls whether a new LSP + // being created with certain Setup Priority should pre-empt this LSP if resource limitation + // is encountered when setting up the LSP. (e.g. bandwidth availability). The value + // 0 is the highest priority while 7 is the lowest. + // default = 7 + HoldingPriority *uint32 `protobuf:"varint,4,opt,name=holding_priority,json=holdingPriority,proto3,oneof" json:"holding_priority,omitempty"` + // This flag permits transit routers to use a local repair mechanism which may result + // in violation of the explicit route object. When a fault is detected on an adjacent + // downstream link or node, a transit router can reroute traffic for fast service restoration. + // default = False + LocalProtectionDesired *bool `protobuf:"varint,5,opt,name=local_protection_desired,json=localProtectionDesired,proto3,oneof" json:"local_protection_desired,omitempty"` + // This flag indicates that label information should be included when doing a route + // record. + // default = False + LabelRecordingDesired *bool `protobuf:"varint,6,opt,name=label_recording_desired,json=labelRecordingDesired,proto3,oneof" json:"label_recording_desired,omitempty"` + // This flag indicates that the tunnel ingress node may choose to reroute this tunnel + // without tearing it down. A tunnel egress node SHOULD use the Shared Explicit(SE) + // Style when responding with a Resv message. + // default = False + SeStyleDesired *bool `protobuf:"varint,7,opt,name=se_style_desired,json=seStyleDesired,proto3,oneof" json:"se_style_desired,omitempty"` + // This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs + // along the protected LSP path that a backup path with a bandwidth guarantee is desired. + // This bandwidth has to be guaranteed for the protected LSP, if no FAST_REROUTE object + // is included in the PATH message. If a FAST_REROUTE object is present in the Path + // message, then the bandwidth specified therein is to be guaranteed. + // default = False + BandwidthProtectionDesired *bool `protobuf:"varint,8,opt,name=bandwidth_protection_desired,json=bandwidthProtectionDesired,proto3,oneof" json:"bandwidth_protection_desired,omitempty"` + // This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs + // along a protected LSP path that it is desired to have a backup path that bypasses + // at least the next node of the protected LSP. + // default = False + NodeProtectionDesired *bool `protobuf:"varint,9,opt,name=node_protection_desired,json=nodeProtectionDesired,proto3,oneof" json:"node_protection_desired,omitempty"` + // This is an optional object. If included the extended SESSION_ATTRIBUTE object is + // sent in the Path message containing + // the additional fields included in this object. This contains a set of three bitmaps + // using which further constraints can be + // set on the path calculated for the LSP based on the Admin Group settings in the IGP + // (e.g ISIS or OSPF interface). + ResourceAffinities *RsvpResourceAffinities `protobuf:"bytes,10,opt,name=resource_affinities,json=resourceAffinities,proto3" json:"resource_affinities,omitempty"` } -func (x *FlowRSVPPathSessionExtTunnelId) Reset() { - *x = FlowRSVPPathSessionExtTunnelId{} +func (x *RsvpSessionAttribute) Reset() { + *x = RsvpSessionAttribute{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[238] + mi := &file_otg_proto_msgTypes[244] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathSessionExtTunnelId) String() string { +func (x *RsvpSessionAttribute) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathSessionExtTunnelId) ProtoMessage() {} +func (*RsvpSessionAttribute) ProtoMessage() {} -func (x *FlowRSVPPathSessionExtTunnelId) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[238] +func (x *RsvpSessionAttribute) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[244] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -43876,121 +45867,132 @@ func (x *FlowRSVPPathSessionExtTunnelId) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathSessionExtTunnelId.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathSessionExtTunnelId) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{238} +// Deprecated: Use RsvpSessionAttribute.ProtoReflect.Descriptor instead. +func (*RsvpSessionAttribute) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{244} } -func (x *FlowRSVPPathSessionExtTunnelId) GetChoice() FlowRSVPPathSessionExtTunnelId_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *RsvpSessionAttribute) GetAutoGenerateSessionName() bool { + if x != nil && x.AutoGenerateSessionName != nil { + return *x.AutoGenerateSessionName } - return FlowRSVPPathSessionExtTunnelId_Choice_unspecified + return false } -func (x *FlowRSVPPathSessionExtTunnelId) GetAsInteger() *PatternFlowRSVPPathSessionExtTunnelIdAsInteger { - if x != nil { - return x.AsInteger +func (x *RsvpSessionAttribute) GetSessionName() string { + if x != nil && x.SessionName != nil { + return *x.SessionName } - return nil + return "" } -func (x *FlowRSVPPathSessionExtTunnelId) GetAsIpv4() *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 { - if x != nil { - return x.AsIpv4 +func (x *RsvpSessionAttribute) GetSetupPriority() uint32 { + if x != nil && x.SetupPriority != nil { + return *x.SetupPriority } - return nil + return 0 } -// C-Type is specific to a class num. -type FlowRSVPPathObjectsClassRsvpHop struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` - // Description missing in models - CType *FlowRSVPPathObjectsRsvpHopCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` +func (x *RsvpSessionAttribute) GetHoldingPriority() uint32 { + if x != nil && x.HoldingPriority != nil { + return *x.HoldingPriority + } + return 0 } -func (x *FlowRSVPPathObjectsClassRsvpHop) Reset() { - *x = FlowRSVPPathObjectsClassRsvpHop{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[239] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *RsvpSessionAttribute) GetLocalProtectionDesired() bool { + if x != nil && x.LocalProtectionDesired != nil { + return *x.LocalProtectionDesired } + return false } -func (x *FlowRSVPPathObjectsClassRsvpHop) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *RsvpSessionAttribute) GetLabelRecordingDesired() bool { + if x != nil && x.LabelRecordingDesired != nil { + return *x.LabelRecordingDesired + } + return false } -func (*FlowRSVPPathObjectsClassRsvpHop) ProtoMessage() {} - -func (x *FlowRSVPPathObjectsClassRsvpHop) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[239] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *RsvpSessionAttribute) GetSeStyleDesired() bool { + if x != nil && x.SeStyleDesired != nil { + return *x.SeStyleDesired } - return mi.MessageOf(x) + return false } -// Deprecated: Use FlowRSVPPathObjectsClassRsvpHop.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsClassRsvpHop) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{239} +func (x *RsvpSessionAttribute) GetBandwidthProtectionDesired() bool { + if x != nil && x.BandwidthProtectionDesired != nil { + return *x.BandwidthProtectionDesired + } + return false } -func (x *FlowRSVPPathObjectsClassRsvpHop) GetLength() *FlowRSVPObjectLength { - if x != nil { - return x.Length +func (x *RsvpSessionAttribute) GetNodeProtectionDesired() bool { + if x != nil && x.NodeProtectionDesired != nil { + return *x.NodeProtectionDesired } - return nil + return false } -func (x *FlowRSVPPathObjectsClassRsvpHop) GetCType() *FlowRSVPPathObjectsRsvpHopCType { +func (x *RsvpSessionAttribute) GetResourceAffinities() *RsvpResourceAffinities { if x != nil { - return x.CType + return x.ResourceAffinities } return nil } -// Object for RSVP_HOP class. Currently supported c-type is IPv4 (1). -type FlowRSVPPathObjectsRsvpHopCType struct { +// This is an optional object. If included, the extended SESSION_ATTRIBUTE object is +// sent in the Path message containing +// the additional fields included in this object. This contains a set of three bitmaps +// using which further constraints can be +// set on the path calculated for the LSP based on the Admin Group settings in the IGP +// (e.g ISIS or OSPF interface). +type RsvpResourceAffinities struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.ipv4 - Choice *FlowRSVPPathObjectsRsvpHopCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsRsvpHopCType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Ipv4 *FlowRSVPPathRsvpHopIpv4 `protobuf:"bytes,2,opt,name=ipv4,proto3" json:"ipv4,omitempty"` + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // any of which renders a link unacceptable. A null set (all bits set to zero) doesn't + // render the link unacceptable. The most significant byte in the hex-string is the + // farthest to the left in the byte sequence. Leading zero bytes in the configured + // value may be omitted for brevity. + // default = 0 + ExcludeAny *string `protobuf:"bytes,1,opt,name=exclude_any,json=excludeAny,proto3,oneof" json:"exclude_any,omitempty"` + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // any of which renders a link acceptable. A null set (all bits set to zero) automatically + // passes. The most significant byte in the hex-string is the farthest to the left + // in the byte sequence. Leading zero bytes in the configured value may be omitted + // for brevity. + // default = 0 + IncludeAny *string `protobuf:"bytes,2,opt,name=include_any,json=includeAny,proto3,oneof" json:"include_any,omitempty"` + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // all of which must be present for a link to be acceptable. A null set (all bits set + // to zero) automatically passes. The most significant byte in the hex-string is the + // farthest to the left in the byte sequence. Leading zero bytes in the configured + // value may be omitted for brevity. + // default = 0 + IncludeAll *string `protobuf:"bytes,3,opt,name=include_all,json=includeAll,proto3,oneof" json:"include_all,omitempty"` } -func (x *FlowRSVPPathObjectsRsvpHopCType) Reset() { - *x = FlowRSVPPathObjectsRsvpHopCType{} +func (x *RsvpResourceAffinities) Reset() { + *x = RsvpResourceAffinities{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[240] + mi := &file_otg_proto_msgTypes[245] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathObjectsRsvpHopCType) String() string { +func (x *RsvpResourceAffinities) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsRsvpHopCType) ProtoMessage() {} +func (*RsvpResourceAffinities) ProtoMessage() {} -func (x *FlowRSVPPathObjectsRsvpHopCType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[240] +func (x *RsvpResourceAffinities) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[245] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -44001,54 +46003,78 @@ func (x *FlowRSVPPathObjectsRsvpHopCType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsRsvpHopCType.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsRsvpHopCType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{240} +// Deprecated: Use RsvpResourceAffinities.ProtoReflect.Descriptor instead. +func (*RsvpResourceAffinities) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{245} } -func (x *FlowRSVPPathObjectsRsvpHopCType) GetChoice() FlowRSVPPathObjectsRsvpHopCType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *RsvpResourceAffinities) GetExcludeAny() string { + if x != nil && x.ExcludeAny != nil { + return *x.ExcludeAny } - return FlowRSVPPathObjectsRsvpHopCType_Choice_unspecified + return "" } -func (x *FlowRSVPPathObjectsRsvpHopCType) GetIpv4() *FlowRSVPPathRsvpHopIpv4 { - if x != nil { - return x.Ipv4 +func (x *RsvpResourceAffinities) GetIncludeAny() string { + if x != nil && x.IncludeAny != nil { + return *x.IncludeAny } - return nil + return "" } -// IPv4 RSVP_HOP object: Class = 3, C-Type = 1 -type FlowRSVPPathRsvpHopIpv4 struct { +func (x *RsvpResourceAffinities) GetIncludeAll() string { + if x != nil && x.IncludeAll != nil { + return *x.IncludeAll + } + return "" +} + +// Configuration for RSVP-TE TSPEC object included in Path Messages. The usage of these +// parameters is defined in RFC2215. +type RsvpTspec struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Ipv4Address *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address `protobuf:"bytes,1,opt,name=ipv4_address,json=ipv4Address,proto3" json:"ipv4_address,omitempty"` - // Description missing in models - LogicalInterfaceHandle *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle `protobuf:"bytes,2,opt,name=logical_interface_handle,json=logicalInterfaceHandle,proto3" json:"logical_interface_handle,omitempty"` + // The rate of the traffic to be carried in this LSP in bytes per second. This is part + // of the Token Bucket specification defined for a traffic flow defined in RFC2215. + // default = 0 + TokenBucketRate *float32 `protobuf:"fixed32,1,opt,name=token_bucket_rate,json=tokenBucketRate,proto3,oneof" json:"token_bucket_rate,omitempty"` + // The depth of the token bucket in bytes used to specify the Token Bucket characteristics + // of the traffic to be carried in the LSP. This is part of the Token Bucket specification + // defined for a traffic flow defined in RFC2215. + // default = 0 + TokenBucketSize *float32 `protobuf:"fixed32,2,opt,name=token_bucket_size,json=tokenBucketSize,proto3,oneof" json:"token_bucket_size,omitempty"` + // The peak data rate of the traffic in bytes per second used to specify the Token Bucket + // characteristics of the traffic to be carried in the LSP. This is part of the Token + // Bucket specification defined for a traffic flow defined in RFC2215. + // default = 0 + PeakDataRate *float32 `protobuf:"fixed32,3,opt,name=peak_data_rate,json=peakDataRate,proto3,oneof" json:"peak_data_rate,omitempty"` + // Specifies the minium length of packet frames that will be policed. + // default = 0 + MinimumPolicedUnit *uint32 `protobuf:"varint,4,opt,name=minimum_policed_unit,json=minimumPolicedUnit,proto3,oneof" json:"minimum_policed_unit,omitempty"` + // Specifies the maximum length of packet frames that will be policed. + // default = 0 + MaximumPolicedUnit *uint32 `protobuf:"varint,5,opt,name=maximum_policed_unit,json=maximumPolicedUnit,proto3,oneof" json:"maximum_policed_unit,omitempty"` } -func (x *FlowRSVPPathRsvpHopIpv4) Reset() { - *x = FlowRSVPPathRsvpHopIpv4{} +func (x *RsvpTspec) Reset() { + *x = RsvpTspec{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[241] + mi := &file_otg_proto_msgTypes[246] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathRsvpHopIpv4) String() string { +func (x *RsvpTspec) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathRsvpHopIpv4) ProtoMessage() {} +func (*RsvpTspec) ProtoMessage() {} -func (x *FlowRSVPPathRsvpHopIpv4) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[241] +func (x *RsvpTspec) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[246] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -44059,55 +46085,119 @@ func (x *FlowRSVPPathRsvpHopIpv4) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathRsvpHopIpv4.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathRsvpHopIpv4) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{241} +// Deprecated: Use RsvpTspec.ProtoReflect.Descriptor instead. +func (*RsvpTspec) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{246} } -func (x *FlowRSVPPathRsvpHopIpv4) GetIpv4Address() *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address { - if x != nil { - return x.Ipv4Address +func (x *RsvpTspec) GetTokenBucketRate() float32 { + if x != nil && x.TokenBucketRate != nil { + return *x.TokenBucketRate } - return nil + return 0 } -func (x *FlowRSVPPathRsvpHopIpv4) GetLogicalInterfaceHandle() *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle { - if x != nil { - return x.LogicalInterfaceHandle +func (x *RsvpTspec) GetTokenBucketSize() float32 { + if x != nil && x.TokenBucketSize != nil { + return *x.TokenBucketSize } - return nil + return 0 } -// C-Type is specific to a class num. -type FlowRSVPPathObjectsClassTimeValues struct { +func (x *RsvpTspec) GetPeakDataRate() float32 { + if x != nil && x.PeakDataRate != nil { + return *x.PeakDataRate + } + return 0 +} + +func (x *RsvpTspec) GetMinimumPolicedUnit() uint32 { + if x != nil && x.MinimumPolicedUnit != nil { + return *x.MinimumPolicedUnit + } + return 0 +} + +func (x *RsvpTspec) GetMaximumPolicedUnit() uint32 { + if x != nil && x.MaximumPolicedUnit != nil { + return *x.MaximumPolicedUnit + } + return 0 +} + +// Configuration for the optional RSVP-TE FAST_REROUTE object included in Path Messages +// as defined in RFC4090. +type RsvpFastReroute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` - // Description missing in models - CType *FlowRSVPPathObjectsTimeValuesCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` + // Specifies the value of the Setup Priority field. This controls whether the backup + // LSP should pre-empt existing LSP that is setup with certain Holding Priority. While + // setting up a backup LSP, preemption of existing LSP can happen if resource limitation + // is encountered (e.g bandwidth availability). + // default = 7 + SetupPriority *uint32 `protobuf:"varint,1,opt,name=setup_priority,json=setupPriority,proto3,oneof" json:"setup_priority,omitempty"` + // Specifies the value of the Holding Priority field. This controls whether a new LSP + // being created with certain Setup Priority should pre-empt this LSP set up with this + // Holding Priority. While setting up a new LSP, preemption of existing LSP can happen + // if resource limitation is encountered (e.g bandwidth availability). + // default = 7 + HoldingPriority *uint32 `protobuf:"varint,2,opt,name=holding_priority,json=holdingPriority,proto3,oneof" json:"holding_priority,omitempty"` + // Specifies the value of the Hop Limit field. This controls the maximum number of hops + // the LSP should traverse to reach the LSP end-point. + // default = 3 + HopLimit *uint32 `protobuf:"varint,3,opt,name=hop_limit,json=hopLimit,proto3,oneof" json:"hop_limit,omitempty"` + // Specifies the value of the Bandwidth field as a 32-bit IEEE floating point integer, + // in bytes per second, as desired for the LSP. + // default = 0 + Bandwidth *float32 `protobuf:"fixed32,4,opt,name=bandwidth,proto3,oneof" json:"bandwidth,omitempty"` + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // any of which renders a link unacceptable. A null set (all bits set to zero) doesn't + // render the link unacceptable. The most significant byte in the hex-string is the + // farthest to the left in the byte sequence. Leading zero bytes in the configured + // value may be omitted for brevity. + // default = 0 + ExcludeAny *string `protobuf:"bytes,5,opt,name=exclude_any,json=excludeAny,proto3,oneof" json:"exclude_any,omitempty"` + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // any of which renders a link acceptable. A null set (all bits set to zero) automatically + // passes. The most significant byte in the hex-string is the farthest to the left + // in the byte sequence. Leading zero bytes in the configured value may be omitted + // for brevity. + // default = 0 + IncludeAny *string `protobuf:"bytes,6,opt,name=include_any,json=includeAny,proto3,oneof" json:"include_any,omitempty"` + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // all of which must be present for a link to be acceptable. A null set (all bits set + // to zero) automatically passes. The most significant byte in the hex-string is the + // farthest to the left in the byte sequence. Leading zero bytes in the configured + // value may be omitted for brevity. + // default = 0 + IncludeAll *string `protobuf:"bytes,7,opt,name=include_all,json=includeAll,proto3,oneof" json:"include_all,omitempty"` + // Requests protection via the one-to-one backup method. + // default = False + OneToOneBackupDesired *bool `protobuf:"varint,8,opt,name=one_to_one_backup_desired,json=oneToOneBackupDesired,proto3,oneof" json:"one_to_one_backup_desired,omitempty"` + // Requests protection via the facility backup method. + // default = False + FacilityBackupDesired *bool `protobuf:"varint,9,opt,name=facility_backup_desired,json=facilityBackupDesired,proto3,oneof" json:"facility_backup_desired,omitempty"` } -func (x *FlowRSVPPathObjectsClassTimeValues) Reset() { - *x = FlowRSVPPathObjectsClassTimeValues{} +func (x *RsvpFastReroute) Reset() { + *x = RsvpFastReroute{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[242] + mi := &file_otg_proto_msgTypes[247] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathObjectsClassTimeValues) String() string { +func (x *RsvpFastReroute) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsClassTimeValues) ProtoMessage() {} +func (*RsvpFastReroute) ProtoMessage() {} -func (x *FlowRSVPPathObjectsClassTimeValues) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[242] +func (x *RsvpFastReroute) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[247] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -44118,111 +46208,115 @@ func (x *FlowRSVPPathObjectsClassTimeValues) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsClassTimeValues.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsClassTimeValues) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{242} +// Deprecated: Use RsvpFastReroute.ProtoReflect.Descriptor instead. +func (*RsvpFastReroute) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{247} } -func (x *FlowRSVPPathObjectsClassTimeValues) GetLength() *FlowRSVPObjectLength { - if x != nil { - return x.Length +func (x *RsvpFastReroute) GetSetupPriority() uint32 { + if x != nil && x.SetupPriority != nil { + return *x.SetupPriority } - return nil + return 0 } -func (x *FlowRSVPPathObjectsClassTimeValues) GetCType() *FlowRSVPPathObjectsTimeValuesCType { - if x != nil { - return x.CType +func (x *RsvpFastReroute) GetHoldingPriority() uint32 { + if x != nil && x.HoldingPriority != nil { + return *x.HoldingPriority } - return nil + return 0 } -// Object for TIME_VALUES class. Currently supported c-type is Type 1 Time Value (1). -type FlowRSVPPathObjectsTimeValuesCType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = Choice.Enum.type_1 - Choice *FlowRSVPPathObjectsTimeValuesCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsTimeValuesCType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Type_1 *FlowRSVPPathTimeValuesType1 `protobuf:"bytes,2,opt,name=type_1,json=type1,proto3" json:"type_1,omitempty"` +func (x *RsvpFastReroute) GetHopLimit() uint32 { + if x != nil && x.HopLimit != nil { + return *x.HopLimit + } + return 0 } -func (x *FlowRSVPPathObjectsTimeValuesCType) Reset() { - *x = FlowRSVPPathObjectsTimeValuesCType{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[243] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *RsvpFastReroute) GetBandwidth() float32 { + if x != nil && x.Bandwidth != nil { + return *x.Bandwidth } + return 0 } -func (x *FlowRSVPPathObjectsTimeValuesCType) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *RsvpFastReroute) GetExcludeAny() string { + if x != nil && x.ExcludeAny != nil { + return *x.ExcludeAny + } + return "" } -func (*FlowRSVPPathObjectsTimeValuesCType) ProtoMessage() {} - -func (x *FlowRSVPPathObjectsTimeValuesCType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[243] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *RsvpFastReroute) GetIncludeAny() string { + if x != nil && x.IncludeAny != nil { + return *x.IncludeAny } - return mi.MessageOf(x) + return "" } -// Deprecated: Use FlowRSVPPathObjectsTimeValuesCType.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsTimeValuesCType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{243} +func (x *RsvpFastReroute) GetIncludeAll() string { + if x != nil && x.IncludeAll != nil { + return *x.IncludeAll + } + return "" } -func (x *FlowRSVPPathObjectsTimeValuesCType) GetChoice() FlowRSVPPathObjectsTimeValuesCType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *RsvpFastReroute) GetOneToOneBackupDesired() bool { + if x != nil && x.OneToOneBackupDesired != nil { + return *x.OneToOneBackupDesired } - return FlowRSVPPathObjectsTimeValuesCType_Choice_unspecified + return false } -func (x *FlowRSVPPathObjectsTimeValuesCType) GetType_1() *FlowRSVPPathTimeValuesType1 { - if x != nil { - return x.Type_1 +func (x *RsvpFastReroute) GetFacilityBackupDesired() bool { + if x != nil && x.FacilityBackupDesired != nil { + return *x.FacilityBackupDesired } - return nil + return false } -// TIME_VALUES Object: Class = 5, C-Type = 1 -type FlowRSVPPathTimeValuesType1 struct { +// Configuration for the optional RSVP-TE explicit route object(ERO) object included +// in Path Messages. +type RsvpEro struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - RefreshPeriodR *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR `protobuf:"bytes,1,opt,name=refresh_period_r,json=refreshPeriodR,proto3" json:"refresh_period_r,omitempty"` + // Determines whether the IP address of the RSVP neighbor should be added as an ERO + // sub-object. If it is to be included, it can be included as a Loose hop or as a Strict + // hop. + // default = PrependNeighborIp.Enum.prepend_loose + PrependNeighborIp *RsvpEro_PrependNeighborIp_Enum `protobuf:"varint,1,opt,name=prepend_neighbor_ip,json=prependNeighborIp,proto3,enum=otg.RsvpEro_PrependNeighborIp_Enum,oneof" json:"prepend_neighbor_ip,omitempty"` + // If prepend_egress_ip is set to one of 'prepend_loose' or 'prepend_strict', then set + // this value as the prefix length of the ERO sub-object containing egress IP address. + // + // default = 32 + PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` + // Array of sub-objects to be included in the ERO. These sub-objects contain the intermediate + // hops to be traversed by the LSP while being forwarded towards the egress endpoint. + // These sub-objects are included after the optional sub-object containing IP address + // of egress endpoint of the LSP (when present). + Subobjects []*RsvpEroSubobject `protobuf:"bytes,3,rep,name=subobjects,proto3" json:"subobjects,omitempty"` } -func (x *FlowRSVPPathTimeValuesType1) Reset() { - *x = FlowRSVPPathTimeValuesType1{} +func (x *RsvpEro) Reset() { + *x = RsvpEro{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[244] + mi := &file_otg_proto_msgTypes[248] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathTimeValuesType1) String() string { +func (x *RsvpEro) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathTimeValuesType1) ProtoMessage() {} +func (*RsvpEro) ProtoMessage() {} -func (x *FlowRSVPPathTimeValuesType1) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[244] +func (x *RsvpEro) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[248] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -44233,48 +46327,76 @@ func (x *FlowRSVPPathTimeValuesType1) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathTimeValuesType1.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathTimeValuesType1) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{244} +// Deprecated: Use RsvpEro.ProtoReflect.Descriptor instead. +func (*RsvpEro) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{248} } -func (x *FlowRSVPPathTimeValuesType1) GetRefreshPeriodR() *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR { +func (x *RsvpEro) GetPrependNeighborIp() RsvpEro_PrependNeighborIp_Enum { + if x != nil && x.PrependNeighborIp != nil { + return *x.PrependNeighborIp + } + return RsvpEro_PrependNeighborIp_unspecified +} + +func (x *RsvpEro) GetPrefixLength() uint32 { + if x != nil && x.PrefixLength != nil { + return *x.PrefixLength + } + return 0 +} + +func (x *RsvpEro) GetSubobjects() []*RsvpEroSubobject { if x != nil { - return x.RefreshPeriodR + return x.Subobjects } return nil } -// C-Type is specific to a class num. -type FlowRSVPPathObjectsClassExplicitRoute struct { +// Configuration for the ERO sub-object. +type RsvpEroSubobject struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` - // Description missing in models - CType *FlowRSVPPathObjectsClassExplicitRouteCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` + // The type of the ERO sub-object, one of IPv4 Address or AS Number. + // default = Type.Enum.ipv4 + Type *RsvpEroSubobject_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.RsvpEroSubobject_Type_Enum,oneof" json:"type,omitempty"` + // IPv4 address that this LSP should traverse through. This field is applicable only + // if the value of 'type' is set to 'ipv4'. + // default = 0.0.0.0 + Ipv4Address *string `protobuf:"bytes,2,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` + // Prefix length for the IPv4 address in the ERO sub-object. This field is applicable + // only if the value of 'type' is set to 'ipv4'. + // default = 32 + PrefixLength *uint32 `protobuf:"varint,3,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` + // Autonomous System number to be set in the ERO sub-object that this LSP should traverse + // through. This field is applicable only if the value of 'type' is set to 'as_number'. + // Note that as per RFC3209, 4-byte AS encoding is not supported. + // default = 0 + AsNumber *uint32 `protobuf:"varint,4,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` + // The hop type of the ERO sub-object, one of Strict or Loose. + // default = HopType.Enum.loose + HopType *RsvpEroSubobject_HopType_Enum `protobuf:"varint,5,opt,name=hop_type,json=hopType,proto3,enum=otg.RsvpEroSubobject_HopType_Enum,oneof" json:"hop_type,omitempty"` } -func (x *FlowRSVPPathObjectsClassExplicitRoute) Reset() { - *x = FlowRSVPPathObjectsClassExplicitRoute{} +func (x *RsvpEroSubobject) Reset() { + *x = RsvpEroSubobject{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[245] + mi := &file_otg_proto_msgTypes[249] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathObjectsClassExplicitRoute) String() string { +func (x *RsvpEroSubobject) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsClassExplicitRoute) ProtoMessage() {} +func (*RsvpEroSubobject) ProtoMessage() {} -func (x *FlowRSVPPathObjectsClassExplicitRoute) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[245] +func (x *RsvpEroSubobject) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[249] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -44285,112 +46407,77 @@ func (x *FlowRSVPPathObjectsClassExplicitRoute) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsClassExplicitRoute.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsClassExplicitRoute) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{245} +// Deprecated: Use RsvpEroSubobject.ProtoReflect.Descriptor instead. +func (*RsvpEroSubobject) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{249} } -func (x *FlowRSVPPathObjectsClassExplicitRoute) GetLength() *FlowRSVPObjectLength { - if x != nil { - return x.Length - } - return nil -} - -func (x *FlowRSVPPathObjectsClassExplicitRoute) GetCType() *FlowRSVPPathObjectsClassExplicitRouteCType { - if x != nil { - return x.CType +func (x *RsvpEroSubobject) GetType() RsvpEroSubobject_Type_Enum { + if x != nil && x.Type != nil { + return *x.Type } - return nil -} - -// Object for EXPLICIT_ROUTE class and c-type is Type 1 Explicit Route (1). -type FlowRSVPPathObjectsClassExplicitRouteCType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = Choice.Enum.type_1 - Choice *FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Type_1 *FlowRSVPPathExplicitRouteType1 `protobuf:"bytes,2,opt,name=type_1,json=type1,proto3" json:"type_1,omitempty"` + return RsvpEroSubobject_Type_unspecified } -func (x *FlowRSVPPathObjectsClassExplicitRouteCType) Reset() { - *x = FlowRSVPPathObjectsClassExplicitRouteCType{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[246] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *RsvpEroSubobject) GetIpv4Address() string { + if x != nil && x.Ipv4Address != nil { + return *x.Ipv4Address } + return "" } -func (x *FlowRSVPPathObjectsClassExplicitRouteCType) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FlowRSVPPathObjectsClassExplicitRouteCType) ProtoMessage() {} - -func (x *FlowRSVPPathObjectsClassExplicitRouteCType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[246] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *RsvpEroSubobject) GetPrefixLength() uint32 { + if x != nil && x.PrefixLength != nil { + return *x.PrefixLength } - return mi.MessageOf(x) -} - -// Deprecated: Use FlowRSVPPathObjectsClassExplicitRouteCType.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsClassExplicitRouteCType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{246} + return 0 } -func (x *FlowRSVPPathObjectsClassExplicitRouteCType) GetChoice() FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *RsvpEroSubobject) GetAsNumber() uint32 { + if x != nil && x.AsNumber != nil { + return *x.AsNumber } - return FlowRSVPPathObjectsClassExplicitRouteCType_Choice_unspecified + return 0 } -func (x *FlowRSVPPathObjectsClassExplicitRouteCType) GetType_1() *FlowRSVPPathExplicitRouteType1 { - if x != nil { - return x.Type_1 +func (x *RsvpEroSubobject) GetHopType() RsvpEroSubobject_HopType_Enum { + if x != nil && x.HopType != nil { + return *x.HopType } - return nil + return RsvpEroSubobject_HopType_unspecified } -// Type1 Explicit Route has subobjects. Currently supported subobjects are IPv4 prefix -// and Autonomous system number. -type FlowRSVPPathExplicitRouteType1 struct { +// Configuration for one or more IPv4 or IPv6 DHCP servers. +type DeviceDhcpServer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Subobjects []*FlowRSVPType1ExplicitRouteSubobjects `protobuf:"bytes,1,rep,name=subobjects,proto3" json:"subobjects,omitempty"` + // This contains an array of references to IPv4 interfaces, each of which will contain + // one DHCPv4 server. + Ipv4Interfaces []*DhcpServerV4 `protobuf:"bytes,2,rep,name=ipv4_interfaces,json=ipv4Interfaces,proto3" json:"ipv4_interfaces,omitempty"` + // This contains an array of references to IPv6 interfaces, each of which will contain + // one DHCPv6 server. + Ipv6Interfaces []*DhcpServerV6 `protobuf:"bytes,3,rep,name=ipv6_interfaces,json=ipv6Interfaces,proto3" json:"ipv6_interfaces,omitempty"` } -func (x *FlowRSVPPathExplicitRouteType1) Reset() { - *x = FlowRSVPPathExplicitRouteType1{} +func (x *DeviceDhcpServer) Reset() { + *x = DeviceDhcpServer{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[247] + mi := &file_otg_proto_msgTypes[250] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathExplicitRouteType1) String() string { +func (x *DeviceDhcpServer) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathExplicitRouteType1) ProtoMessage() {} +func (*DeviceDhcpServer) ProtoMessage() {} -func (x *FlowRSVPPathExplicitRouteType1) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[247] +func (x *DeviceDhcpServer) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[250] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -44401,99 +46488,66 @@ func (x *FlowRSVPPathExplicitRouteType1) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathExplicitRouteType1.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathExplicitRouteType1) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{247} +// Deprecated: Use DeviceDhcpServer.ProtoReflect.Descriptor instead. +func (*DeviceDhcpServer) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{250} } -func (x *FlowRSVPPathExplicitRouteType1) GetSubobjects() []*FlowRSVPType1ExplicitRouteSubobjects { +func (x *DeviceDhcpServer) GetIpv4Interfaces() []*DhcpServerV4 { if x != nil { - return x.Subobjects + return x.Ipv4Interfaces } return nil } -// Type is specific to a subobject. -type FlowRSVPType1ExplicitRouteSubobjects struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - Type *FlowRSVPType1ExplicitRouteSubobjectsType `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` -} - -func (x *FlowRSVPType1ExplicitRouteSubobjects) Reset() { - *x = FlowRSVPType1ExplicitRouteSubobjects{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[248] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FlowRSVPType1ExplicitRouteSubobjects) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FlowRSVPType1ExplicitRouteSubobjects) ProtoMessage() {} - -func (x *FlowRSVPType1ExplicitRouteSubobjects) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[248] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FlowRSVPType1ExplicitRouteSubobjects.ProtoReflect.Descriptor instead. -func (*FlowRSVPType1ExplicitRouteSubobjects) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{248} -} - -func (x *FlowRSVPType1ExplicitRouteSubobjects) GetType() *FlowRSVPType1ExplicitRouteSubobjectsType { +func (x *DeviceDhcpServer) GetIpv6Interfaces() []*DhcpServerV6 { if x != nil { - return x.Type + return x.Ipv6Interfaces } return nil } -// Currently supported subobjects are IPv4 address(1) and Autonomous system number(32). -type FlowRSVPType1ExplicitRouteSubobjectsType struct { +// Configuration for emulated DHCPv4 Server. +type DhcpServerV4 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.ipv4_prefix - Choice *FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Ipv4Prefix *FlowRSVPPathExplicitRouteType1Ipv4Prefix `protobuf:"bytes,2,opt,name=ipv4_prefix,json=ipv4Prefix,proto3" json:"ipv4_prefix,omitempty"` - // Description missing in models - AsNumber *FlowRSVPPathExplicitRouteType1ASNumber `protobuf:"bytes,3,opt,name=as_number,json=asNumber,proto3" json:"as_number,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // The unique name of the IPv4 on which DHCPv4 server will run. + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // required = true + Ipv4Name *string `protobuf:"bytes,2,opt,name=ipv4_name,json=ipv4Name,proto3,oneof" json:"ipv4_name,omitempty"` + // List of DHCPv4 Server Lease parameters + AddressPools []*DhcpServerV4Pool `protobuf:"bytes,3,rep,name=address_pools,json=addressPools,proto3" json:"address_pools,omitempty"` } -func (x *FlowRSVPType1ExplicitRouteSubobjectsType) Reset() { - *x = FlowRSVPType1ExplicitRouteSubobjectsType{} +func (x *DhcpServerV4) Reset() { + *x = DhcpServerV4{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[249] + mi := &file_otg_proto_msgTypes[251] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPType1ExplicitRouteSubobjectsType) String() string { +func (x *DhcpServerV4) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPType1ExplicitRouteSubobjectsType) ProtoMessage() {} +func (*DhcpServerV4) ProtoMessage() {} -func (x *FlowRSVPType1ExplicitRouteSubobjectsType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[249] +func (x *DhcpServerV4) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[251] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -44504,68 +46558,78 @@ func (x *FlowRSVPType1ExplicitRouteSubobjectsType) ProtoReflect() protoreflect.M return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPType1ExplicitRouteSubobjectsType.ProtoReflect.Descriptor instead. -func (*FlowRSVPType1ExplicitRouteSubobjectsType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{249} +// Deprecated: Use DhcpServerV4.ProtoReflect.Descriptor instead. +func (*DhcpServerV4) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{251} } -func (x *FlowRSVPType1ExplicitRouteSubobjectsType) GetChoice() FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *DhcpServerV4) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return FlowRSVPType1ExplicitRouteSubobjectsType_Choice_unspecified + return "" } -func (x *FlowRSVPType1ExplicitRouteSubobjectsType) GetIpv4Prefix() *FlowRSVPPathExplicitRouteType1Ipv4Prefix { - if x != nil { - return x.Ipv4Prefix +func (x *DhcpServerV4) GetIpv4Name() string { + if x != nil && x.Ipv4Name != nil { + return *x.Ipv4Name } - return nil + return "" } -func (x *FlowRSVPType1ExplicitRouteSubobjectsType) GetAsNumber() *FlowRSVPPathExplicitRouteType1ASNumber { +func (x *DhcpServerV4) GetAddressPools() []*DhcpServerV4Pool { if x != nil { - return x.AsNumber + return x.AddressPools } return nil } -// Class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Prefix, C-Type: -// 1 -type FlowRSVPPathExplicitRouteType1Ipv4Prefix struct { +// Configuration for DHCPv4 address pool for a lease. +type DhcpServerV4Pool struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - LBit *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit `protobuf:"bytes,1,opt,name=l_bit,json=lBit,proto3" json:"l_bit,omitempty"` - // The Length contains the total length of the subobject in bytes,including L,Type and - // Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. - Length *FlowRSVPExplicitRouteLength `protobuf:"bytes,2,opt,name=length,proto3" json:"length,omitempty"` - // Description missing in models - Ipv4Address *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address `protobuf:"bytes,3,opt,name=ipv4_address,json=ipv4Address,proto3" json:"ipv4_address,omitempty"` - // The prefix length of the IPv4 address. - // default = 32 - Prefix *uint32 `protobuf:"varint,4,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // The duration of time in seconds that is assigned to a lease. + // default = 86400 + LeaseTime *uint32 `protobuf:"varint,2,opt,name=lease_time,json=leaseTime,proto3,oneof" json:"lease_time,omitempty"` + // The IPv4 address of the first lease pool. + // required = true + StartAddress *string `protobuf:"bytes,3,opt,name=start_address,json=startAddress,proto3,oneof" json:"start_address,omitempty"` + // The IPv4 network prefix length to be applied to the address. + // default = 24 + PrefixLength *uint32 `protobuf:"varint,4,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` + // The total number of addresses in the pool. + // default = 1 + Count *uint32 `protobuf:"varint,5,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The increment value for the lease address within the lease pool. The value is incremented + // according to the prefix_length and step. + // default = 1 + Step *uint32 `protobuf:"varint,6,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Optional configuration for DHCPv4 address pool for the lease. + Options *DhcpServerV4PoolOption `protobuf:"bytes,7,opt,name=options,proto3" json:"options,omitempty"` } -func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) Reset() { - *x = FlowRSVPPathExplicitRouteType1Ipv4Prefix{} +func (x *DhcpServerV4Pool) Reset() { + *x = DhcpServerV4Pool{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[250] + mi := &file_otg_proto_msgTypes[252] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) String() string { +func (x *DhcpServerV4Pool) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathExplicitRouteType1Ipv4Prefix) ProtoMessage() {} +func (*DhcpServerV4Pool) ProtoMessage() {} -func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[250] +func (x *DhcpServerV4Pool) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[252] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -44576,146 +46640,101 @@ func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) ProtoReflect() protoreflect.M return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathExplicitRouteType1Ipv4Prefix.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathExplicitRouteType1Ipv4Prefix) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{250} +// Deprecated: Use DhcpServerV4Pool.ProtoReflect.Descriptor instead. +func (*DhcpServerV4Pool) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{252} } -func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) GetLBit() *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit { - if x != nil { - return x.LBit +func (x *DhcpServerV4Pool) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return nil + return "" } -func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) GetLength() *FlowRSVPExplicitRouteLength { - if x != nil { - return x.Length +func (x *DhcpServerV4Pool) GetLeaseTime() uint32 { + if x != nil && x.LeaseTime != nil { + return *x.LeaseTime } - return nil + return 0 } -func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) GetIpv4Address() *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address { - if x != nil { - return x.Ipv4Address +func (x *DhcpServerV4Pool) GetStartAddress() string { + if x != nil && x.StartAddress != nil { + return *x.StartAddress } - return nil + return "" } -func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) GetPrefix() uint32 { - if x != nil && x.Prefix != nil { - return *x.Prefix +func (x *DhcpServerV4Pool) GetPrefixLength() uint32 { + if x != nil && x.PrefixLength != nil { + return *x.PrefixLength } return 0 } -// Class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Autonomous system -// number, C-Type: 32 -type FlowRSVPPathExplicitRouteType1ASNumber struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - LBit *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit `protobuf:"bytes,1,opt,name=l_bit,json=lBit,proto3" json:"l_bit,omitempty"` - // The Length contains the total length of the subobject in bytes,including L, Type - // and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. - Length *FlowRSVPExplicitRouteASNumberLength `protobuf:"bytes,2,opt,name=length,proto3" json:"length,omitempty"` - // Autonomous System number to be set in the ERO sub-object that this LSP should traverse - // through. This field is applicable only if the value of 'type' is set to 'as_number'. - // default = 0 - AsNumber *uint32 `protobuf:"varint,3,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` -} - -func (x *FlowRSVPPathExplicitRouteType1ASNumber) Reset() { - *x = FlowRSVPPathExplicitRouteType1ASNumber{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[251] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FlowRSVPPathExplicitRouteType1ASNumber) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FlowRSVPPathExplicitRouteType1ASNumber) ProtoMessage() {} - -func (x *FlowRSVPPathExplicitRouteType1ASNumber) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[251] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *DhcpServerV4Pool) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count } - return mi.MessageOf(x) -} - -// Deprecated: Use FlowRSVPPathExplicitRouteType1ASNumber.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathExplicitRouteType1ASNumber) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{251} + return 0 } -func (x *FlowRSVPPathExplicitRouteType1ASNumber) GetLBit() *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit { - if x != nil { - return x.LBit +func (x *DhcpServerV4Pool) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step } - return nil + return 0 } -func (x *FlowRSVPPathExplicitRouteType1ASNumber) GetLength() *FlowRSVPExplicitRouteASNumberLength { +func (x *DhcpServerV4Pool) GetOptions() *DhcpServerV4PoolOption { if x != nil { - return x.Length + return x.Options } return nil } -func (x *FlowRSVPPathExplicitRouteType1ASNumber) GetAsNumber() uint32 { - if x != nil && x.AsNumber != nil { - return *x.AsNumber - } - return 0 -} - -// Description missing in models -type FlowRSVPExplicitRouteLength struct { +// Optional configuration for DHCPv4 address pool for the lease. +type DhcpServerV4PoolOption struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // auto or configured value. - // default = Choice.Enum.auto - Choice *FlowRSVPExplicitRouteLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPExplicitRouteLength_Choice_Enum,oneof" json:"choice,omitempty"` - // The OTG implementation will provide a system generated value for this property. - // If the OTG implementation is unable to generate a value the default value must be - // used. - // default = 8 - Auto *uint32 `protobuf:"varint,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // Description missing in models - // default = 8 - Value *uint32 `protobuf:"varint,3,opt,name=value,proto3,oneof" json:"value,omitempty"` + // The Router address advertised by the DHCPv4 server in Offer and Ack messages. + // default = 0.0.0.0 + RouterAddress *string `protobuf:"bytes,1,opt,name=router_address,json=routerAddress,proto3,oneof" json:"router_address,omitempty"` + // The primary DNS server address that is offered to DHCP clients that request this + // information through a TLV option. + // default = 0.0.0.0 + PrimaryDnsServer *string `protobuf:"bytes,2,opt,name=primary_dns_server,json=primaryDnsServer,proto3,oneof" json:"primary_dns_server,omitempty"` + // The primary DNS server address that is offered to DHCP clients that request this + // information through a TLV option. + // default = 0.0.0.0 + SecondaryDnsServer *string `protobuf:"bytes,3,opt,name=secondary_dns_server,json=secondaryDnsServer,proto3,oneof" json:"secondary_dns_server,omitempty"` + // If selected, the DHCP server includes in its replies the TLV information for the + // DHCPv4 Relay Agent Option 82 and the corresponding sub-TLVs that it receives from + // a DHCP relay agent, otherwise it replies without including this TLV. + // default = True + EchoRelayWithTlv_82 *bool `protobuf:"varint,4,opt,name=echo_relay_with_tlv_82,json=echoRelayWithTlv82,proto3,oneof" json:"echo_relay_with_tlv_82,omitempty"` } -func (x *FlowRSVPExplicitRouteLength) Reset() { - *x = FlowRSVPExplicitRouteLength{} +func (x *DhcpServerV4PoolOption) Reset() { + *x = DhcpServerV4PoolOption{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[252] + mi := &file_otg_proto_msgTypes[253] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPExplicitRouteLength) String() string { +func (x *DhcpServerV4PoolOption) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPExplicitRouteLength) ProtoMessage() {} +func (*DhcpServerV4PoolOption) ProtoMessage() {} -func (x *FlowRSVPExplicitRouteLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[252] +func (x *DhcpServerV4PoolOption) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[253] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -44726,68 +46745,91 @@ func (x *FlowRSVPExplicitRouteLength) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPExplicitRouteLength.ProtoReflect.Descriptor instead. -func (*FlowRSVPExplicitRouteLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{252} +// Deprecated: Use DhcpServerV4PoolOption.ProtoReflect.Descriptor instead. +func (*DhcpServerV4PoolOption) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{253} } -func (x *FlowRSVPExplicitRouteLength) GetChoice() FlowRSVPExplicitRouteLength_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *DhcpServerV4PoolOption) GetRouterAddress() string { + if x != nil && x.RouterAddress != nil { + return *x.RouterAddress } - return FlowRSVPExplicitRouteLength_Choice_unspecified + return "" } -func (x *FlowRSVPExplicitRouteLength) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto +func (x *DhcpServerV4PoolOption) GetPrimaryDnsServer() string { + if x != nil && x.PrimaryDnsServer != nil { + return *x.PrimaryDnsServer } - return 0 + return "" } -func (x *FlowRSVPExplicitRouteLength) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *DhcpServerV4PoolOption) GetSecondaryDnsServer() string { + if x != nil && x.SecondaryDnsServer != nil { + return *x.SecondaryDnsServer } - return 0 + return "" } -// Description missing in models -type FlowRSVPExplicitRouteASNumberLength struct { +func (x *DhcpServerV4PoolOption) GetEchoRelayWithTlv_82() bool { + if x != nil && x.EchoRelayWithTlv_82 != nil { + return *x.EchoRelayWithTlv_82 + } + return false +} + +// Configuration for emulated DHCPv6 Server. +type DhcpServerV6 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // auto or configured value. - // default = Choice.Enum.auto - Choice *FlowRSVPExplicitRouteASNumberLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPExplicitRouteASNumberLength_Choice_Enum,oneof" json:"choice,omitempty"` - // The OTG implementation will provide a system generated value for this property. - // If the OTG implementation is unable to generate a value the default value must be - // used. - // default = 4 - Auto *uint32 `protobuf:"varint,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // Description missing in models - // default = 4 - Value *uint32 `protobuf:"varint,3,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // The unique name of the IPv6 on which DHCPv6 server will run. + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // + // required = true + Ipv6Name *string `protobuf:"bytes,2,opt,name=ipv6_name,json=ipv6Name,proto3,oneof" json:"ipv6_name,omitempty"` + // If Rapid Commit is set, server responds to client initiated Rapid Commit two-message + // exchanges. + // default = False + RapidCommit *bool `protobuf:"varint,3,opt,name=rapid_commit,json=rapidCommit,proto3,oneof" json:"rapid_commit,omitempty"` + // If the server does not have an address to which it can send the Reconfigure message + // directly to the client, the server uses a Relay-reply message to send the Reconfigure + // message to a relay agent that will relay the message to the client. + // default = False + ReconfigureViaRelayAgent *bool `protobuf:"varint,4,opt,name=reconfigure_via_relay_agent,json=reconfigureViaRelayAgent,proto3,oneof" json:"reconfigure_via_relay_agent,omitempty"` + // Array of DHCP pools configured on a server. + Leases []*DhcpV6ServerLease `protobuf:"bytes,5,rep,name=leases,proto3" json:"leases,omitempty"` + // Optional DHCPv4 Server options that are sent in Dhcp server messages. + Options *Dhcpv6ServerOptions `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"` } -func (x *FlowRSVPExplicitRouteASNumberLength) Reset() { - *x = FlowRSVPExplicitRouteASNumberLength{} +func (x *DhcpServerV6) Reset() { + *x = DhcpServerV6{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[253] + mi := &file_otg_proto_msgTypes[254] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPExplicitRouteASNumberLength) String() string { +func (x *DhcpServerV6) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPExplicitRouteASNumberLength) ProtoMessage() {} +func (*DhcpServerV6) ProtoMessage() {} -func (x *FlowRSVPExplicitRouteASNumberLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[253] +func (x *DhcpServerV6) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[254] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -44798,107 +46840,71 @@ func (x *FlowRSVPExplicitRouteASNumberLength) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPExplicitRouteASNumberLength.ProtoReflect.Descriptor instead. -func (*FlowRSVPExplicitRouteASNumberLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{253} -} - -func (x *FlowRSVPExplicitRouteASNumberLength) GetChoice() FlowRSVPExplicitRouteASNumberLength_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowRSVPExplicitRouteASNumberLength_Choice_unspecified +// Deprecated: Use DhcpServerV6.ProtoReflect.Descriptor instead. +func (*DhcpServerV6) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{254} } -func (x *FlowRSVPExplicitRouteASNumberLength) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto +func (x *DhcpServerV6) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return 0 + return "" } -func (x *FlowRSVPExplicitRouteASNumberLength) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *DhcpServerV6) GetIpv6Name() string { + if x != nil && x.Ipv6Name != nil { + return *x.Ipv6Name } - return 0 -} - -// C-Type is specific to a class num. -type FlowRSVPPathObjectsClassLabelRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` - // Description missing in models - CType *FlowRSVPPathObjectsLabelRequestCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` + return "" } -func (x *FlowRSVPPathObjectsClassLabelRequest) Reset() { - *x = FlowRSVPPathObjectsClassLabelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[254] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *DhcpServerV6) GetRapidCommit() bool { + if x != nil && x.RapidCommit != nil { + return *x.RapidCommit } + return false } -func (x *FlowRSVPPathObjectsClassLabelRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FlowRSVPPathObjectsClassLabelRequest) ProtoMessage() {} - -func (x *FlowRSVPPathObjectsClassLabelRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[254] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *DhcpServerV6) GetReconfigureViaRelayAgent() bool { + if x != nil && x.ReconfigureViaRelayAgent != nil { + return *x.ReconfigureViaRelayAgent } - return mi.MessageOf(x) -} - -// Deprecated: Use FlowRSVPPathObjectsClassLabelRequest.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsClassLabelRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{254} + return false } -func (x *FlowRSVPPathObjectsClassLabelRequest) GetLength() *FlowRSVPObjectLength { +func (x *DhcpServerV6) GetLeases() []*DhcpV6ServerLease { if x != nil { - return x.Length + return x.Leases } return nil } -func (x *FlowRSVPPathObjectsClassLabelRequest) GetCType() *FlowRSVPPathObjectsLabelRequestCType { +func (x *DhcpServerV6) GetOptions() *Dhcpv6ServerOptions { if x != nil { - return x.CType + return x.Options } return nil } -// Object for LABEL_REQUEST class. Currently supported c-type is Without Label Range -// (1). -type FlowRSVPPathObjectsLabelRequestCType struct { +// DHCP server options, these configured options are sent in Dhcp server messages. +type Dhcpv6ServerOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.without_label_range - Choice *FlowRSVPPathObjectsLabelRequestCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsLabelRequestCType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - WithoutLabelRange *FlowRSVPPathLabelRequestWithoutLabelRange `protobuf:"bytes,2,opt,name=without_label_range,json=withoutLabelRange,proto3" json:"without_label_range,omitempty"` + // Additional DHCP server primary dns and other configuration options. + Dns *DhcpV6ServerDns `protobuf:"bytes,1,opt,name=dns,proto3" json:"dns,omitempty"` + // This option is used by servers to exchange vendor-specific information with clients. + VendorInfo *Dhcpv6ServerOptionsVendorInfo `protobuf:"bytes,2,opt,name=vendor_info,json=vendorInfo,proto3" json:"vendor_info,omitempty"` + // The server sends this option to inform the client about a URL to a boot file which + // client will use for + // network boots. + BootfileUrl *Dhcpv6ServerOptionsBootfileUrl `protobuf:"bytes,3,opt,name=bootfile_url,json=bootfileUrl,proto3" json:"bootfile_url,omitempty"` } -func (x *FlowRSVPPathObjectsLabelRequestCType) Reset() { - *x = FlowRSVPPathObjectsLabelRequestCType{} +func (x *Dhcpv6ServerOptions) Reset() { + *x = Dhcpv6ServerOptions{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[255] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -44906,13 +46912,13 @@ func (x *FlowRSVPPathObjectsLabelRequestCType) Reset() { } } -func (x *FlowRSVPPathObjectsLabelRequestCType) String() string { +func (x *Dhcpv6ServerOptions) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsLabelRequestCType) ProtoMessage() {} +func (*Dhcpv6ServerOptions) ProtoMessage() {} -func (x *FlowRSVPPathObjectsLabelRequestCType) ProtoReflect() protoreflect.Message { +func (x *Dhcpv6ServerOptions) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[255] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -44924,39 +46930,49 @@ func (x *FlowRSVPPathObjectsLabelRequestCType) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsLabelRequestCType.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsLabelRequestCType) Descriptor() ([]byte, []int) { +// Deprecated: Use Dhcpv6ServerOptions.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerOptions) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{255} } -func (x *FlowRSVPPathObjectsLabelRequestCType) GetChoice() FlowRSVPPathObjectsLabelRequestCType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *Dhcpv6ServerOptions) GetDns() *DhcpV6ServerDns { + if x != nil { + return x.Dns } - return FlowRSVPPathObjectsLabelRequestCType_Choice_unspecified + return nil } -func (x *FlowRSVPPathObjectsLabelRequestCType) GetWithoutLabelRange() *FlowRSVPPathLabelRequestWithoutLabelRange { +func (x *Dhcpv6ServerOptions) GetVendorInfo() *Dhcpv6ServerOptionsVendorInfo { if x != nil { - return x.WithoutLabelRange + return x.VendorInfo } return nil } -// Class = LABEL_REQUEST, Without Label Range C-Type = 1 -type FlowRSVPPathLabelRequestWithoutLabelRange struct { +func (x *Dhcpv6ServerOptions) GetBootfileUrl() *Dhcpv6ServerOptionsBootfileUrl { + if x != nil { + return x.BootfileUrl + } + return nil +} + +// One DHCP pool configuration on a server. +type DhcpV6ServerLease struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The Life Time length in seconds that is assigned to a lease if the requesting DHCP + // client does not specify a specific expiration time. + // default = 86400 + LeaseTime *uint32 `protobuf:"varint,1,opt,name=lease_time,json=leaseTime,proto3,oneof" json:"lease_time,omitempty"` // Description missing in models - Reserved *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved `protobuf:"bytes,1,opt,name=reserved,proto3" json:"reserved,omitempty"` - // Description missing in models - L3Pid *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid `protobuf:"bytes,2,opt,name=l3pid,proto3" json:"l3pid,omitempty"` + // required = true + IaType *Dhcpv6ServerIaType `protobuf:"bytes,5,opt,name=ia_type,json=iaType,proto3" json:"ia_type,omitempty"` } -func (x *FlowRSVPPathLabelRequestWithoutLabelRange) Reset() { - *x = FlowRSVPPathLabelRequestWithoutLabelRange{} +func (x *DhcpV6ServerLease) Reset() { + *x = DhcpV6ServerLease{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[256] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -44964,13 +46980,13 @@ func (x *FlowRSVPPathLabelRequestWithoutLabelRange) Reset() { } } -func (x *FlowRSVPPathLabelRequestWithoutLabelRange) String() string { +func (x *DhcpV6ServerLease) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathLabelRequestWithoutLabelRange) ProtoMessage() {} +func (*DhcpV6ServerLease) ProtoMessage() {} -func (x *FlowRSVPPathLabelRequestWithoutLabelRange) ProtoReflect() protoreflect.Message { +func (x *DhcpV6ServerLease) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[256] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -44982,40 +46998,49 @@ func (x *FlowRSVPPathLabelRequestWithoutLabelRange) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathLabelRequestWithoutLabelRange.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathLabelRequestWithoutLabelRange) Descriptor() ([]byte, []int) { +// Deprecated: Use DhcpV6ServerLease.ProtoReflect.Descriptor instead. +func (*DhcpV6ServerLease) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{256} } -func (x *FlowRSVPPathLabelRequestWithoutLabelRange) GetReserved() *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved { - if x != nil { - return x.Reserved +func (x *DhcpV6ServerLease) GetLeaseTime() uint32 { + if x != nil && x.LeaseTime != nil { + return *x.LeaseTime } - return nil + return 0 } -func (x *FlowRSVPPathLabelRequestWithoutLabelRange) GetL3Pid() *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid { +func (x *DhcpV6ServerLease) GetIaType() *Dhcpv6ServerIaType { if x != nil { - return x.L3Pid + return x.IaType } return nil } -// C-Type is specific to a class num. -type FlowRSVPPathObjectsClassSessionAttribute struct { +// Description missing in models +type Dhcpv6ServerIaType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` + // Identity Association: a collection of leases assigned to a client. Each IA has an + // associated IAID. Each IA holds one type of lease, like an identity association for + // temporary addresses (IA_TA) holds temporary addresses, and an identity association + // for prefix delegation (IA_PD). + // default = Choice.Enum.iana + Choice *Dhcpv6ServerIaType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.Dhcpv6ServerIaType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - CType *FlowRSVPPathObjectsSessionAttributeCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` + Iana *Dhcpv6ServerPoolInfo `protobuf:"bytes,2,opt,name=iana,proto3" json:"iana,omitempty"` + // Description missing in models + Iata *Dhcpv6ServerPoolInfo `protobuf:"bytes,3,opt,name=iata,proto3" json:"iata,omitempty"` + // Description missing in models + Iapd *Dhcpv6ServerIapdPoolInfo `protobuf:"bytes,4,opt,name=iapd,proto3" json:"iapd,omitempty"` + // Description missing in models + Ianapd *Dhcpv6ServerIanapdPoolInfo `protobuf:"bytes,5,opt,name=ianapd,proto3" json:"ianapd,omitempty"` } -func (x *FlowRSVPPathObjectsClassSessionAttribute) Reset() { - *x = FlowRSVPPathObjectsClassSessionAttribute{} +func (x *Dhcpv6ServerIaType) Reset() { + *x = Dhcpv6ServerIaType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[257] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45023,13 +47048,13 @@ func (x *FlowRSVPPathObjectsClassSessionAttribute) Reset() { } } -func (x *FlowRSVPPathObjectsClassSessionAttribute) String() string { +func (x *Dhcpv6ServerIaType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsClassSessionAttribute) ProtoMessage() {} +func (*Dhcpv6ServerIaType) ProtoMessage() {} -func (x *FlowRSVPPathObjectsClassSessionAttribute) ProtoReflect() protoreflect.Message { +func (x *Dhcpv6ServerIaType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[257] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45041,43 +47066,71 @@ func (x *FlowRSVPPathObjectsClassSessionAttribute) ProtoReflect() protoreflect.M return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsClassSessionAttribute.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsClassSessionAttribute) Descriptor() ([]byte, []int) { +// Deprecated: Use Dhcpv6ServerIaType.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerIaType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{257} } -func (x *FlowRSVPPathObjectsClassSessionAttribute) GetLength() *FlowRSVPObjectLength { +func (x *Dhcpv6ServerIaType) GetChoice() Dhcpv6ServerIaType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return Dhcpv6ServerIaType_Choice_unspecified +} + +func (x *Dhcpv6ServerIaType) GetIana() *Dhcpv6ServerPoolInfo { if x != nil { - return x.Length + return x.Iana } return nil } -func (x *FlowRSVPPathObjectsClassSessionAttribute) GetCType() *FlowRSVPPathObjectsSessionAttributeCType { +func (x *Dhcpv6ServerIaType) GetIata() *Dhcpv6ServerPoolInfo { if x != nil { - return x.CType + return x.Iata } return nil } -// Object for SESSION_ATTRIBUTE class. Currently supported c-type is LSP_Tunnel_RA (1) -// and LSP_Tunnel (7). -type FlowRSVPPathObjectsSessionAttributeCType struct { +func (x *Dhcpv6ServerIaType) GetIapd() *Dhcpv6ServerIapdPoolInfo { + if x != nil { + return x.Iapd + } + return nil +} + +func (x *Dhcpv6ServerIaType) GetIanapd() *Dhcpv6ServerIanapdPoolInfo { + if x != nil { + return x.Ianapd + } + return nil +} + +// The container for pool configurations for IA types iana and iata. +type Dhcpv6ServerPoolInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.lsp_tunnel - Choice *FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - LspTunnel *FlowRSVPPathSessionAttributeLspTunnel `protobuf:"bytes,2,opt,name=lsp_tunnel,json=lspTunnel,proto3" json:"lsp_tunnel,omitempty"` - // Description missing in models - LspTunnelRa *FlowRSVPPathSessionAttributeLspTunnelRa `protobuf:"bytes,3,opt,name=lsp_tunnel_ra,json=lspTunnelRa,proto3" json:"lsp_tunnel_ra,omitempty"` + // The first IP address of the lease pool. + StartAddress *string `protobuf:"bytes,1,opt,name=start_address,json=startAddress,proto3,oneof" json:"start_address,omitempty"` + // The IPv6 network prefix length is used for incrementing the lease address within + // the lease pool where multiple addresses are configured by using the size field. The + // address is incremented using the configured Prefix Length and Step. + // default = 64 + PrefixLen *uint32 `protobuf:"varint,2,opt,name=prefix_len,json=prefixLen,proto3,oneof" json:"prefix_len,omitempty"` + // The total number of addresses in the pool. + // default = 1 + Size *uint32 `protobuf:"varint,3,opt,name=size,proto3,oneof" json:"size,omitempty"` + // The increment value for the lease address within the lease pool where multiple addresses + // are present. The value is incremented according to the configured Prefix Length and + // Step. + // default = 1 + Step *uint32 `protobuf:"varint,4,opt,name=step,proto3,oneof" json:"step,omitempty"` } -func (x *FlowRSVPPathObjectsSessionAttributeCType) Reset() { - *x = FlowRSVPPathObjectsSessionAttributeCType{} +func (x *Dhcpv6ServerPoolInfo) Reset() { + *x = Dhcpv6ServerPoolInfo{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[258] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45085,13 +47138,13 @@ func (x *FlowRSVPPathObjectsSessionAttributeCType) Reset() { } } -func (x *FlowRSVPPathObjectsSessionAttributeCType) String() string { +func (x *Dhcpv6ServerPoolInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsSessionAttributeCType) ProtoMessage() {} +func (*Dhcpv6ServerPoolInfo) ProtoMessage() {} -func (x *FlowRSVPPathObjectsSessionAttributeCType) ProtoReflect() protoreflect.Message { +func (x *Dhcpv6ServerPoolInfo) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[258] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45103,59 +47156,67 @@ func (x *FlowRSVPPathObjectsSessionAttributeCType) ProtoReflect() protoreflect.M return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsSessionAttributeCType.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsSessionAttributeCType) Descriptor() ([]byte, []int) { +// Deprecated: Use Dhcpv6ServerPoolInfo.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerPoolInfo) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{258} } -func (x *FlowRSVPPathObjectsSessionAttributeCType) GetChoice() FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *Dhcpv6ServerPoolInfo) GetStartAddress() string { + if x != nil && x.StartAddress != nil { + return *x.StartAddress } - return FlowRSVPPathObjectsSessionAttributeCType_Choice_unspecified + return "" } -func (x *FlowRSVPPathObjectsSessionAttributeCType) GetLspTunnel() *FlowRSVPPathSessionAttributeLspTunnel { - if x != nil { - return x.LspTunnel +func (x *Dhcpv6ServerPoolInfo) GetPrefixLen() uint32 { + if x != nil && x.PrefixLen != nil { + return *x.PrefixLen } - return nil + return 0 } -func (x *FlowRSVPPathObjectsSessionAttributeCType) GetLspTunnelRa() *FlowRSVPPathSessionAttributeLspTunnelRa { - if x != nil { - return x.LspTunnelRa +func (x *Dhcpv6ServerPoolInfo) GetSize() uint32 { + if x != nil && x.Size != nil { + return *x.Size } - return nil + return 0 } -// SESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 7, resource affinity information. -type FlowRSVPPathSessionAttributeLspTunnel struct { +func (x *Dhcpv6ServerPoolInfo) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +// The container for prefix pool configurations for IA type iapd. +type Dhcpv6ServerIapdPoolInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The priority of the session with respect to taking resources,in the range of 0 to - // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether - // this session can preempt another session. - // default = 7 - SetupPriority *uint32 `protobuf:"varint,1,opt,name=setup_priority,json=setupPriority,proto3,oneof" json:"setup_priority,omitempty"` - // The priority of the session with respect to holding resources,in the range of 0 to - // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether - // this session can preempt another session. - // default = 7 - HoldingPriority *uint32 `protobuf:"varint,2,opt,name=holding_priority,json=holdingPriority,proto3,oneof" json:"holding_priority,omitempty"` - // 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired - Flags *FlowRSVPLspTunnelFlag `protobuf:"bytes,3,opt,name=flags,proto3" json:"flags,omitempty"` - // The length of the display string before padding, in bytes. - NameLength *FlowRSVPSessionAttributeNameLength `protobuf:"bytes,4,opt,name=name_length,json=nameLength,proto3" json:"name_length,omitempty"` - // A null padded string of characters. - // default = - SessionName *string `protobuf:"bytes,5,opt,name=session_name,json=sessionName,proto3,oneof" json:"session_name,omitempty"` + // The first IP address of the prefix pool. + StartPrefixAddress *string `protobuf:"bytes,1,opt,name=start_prefix_address,json=startPrefixAddress,proto3,oneof" json:"start_prefix_address,omitempty"` + // The IPv6 network prefix length is used for incrementing the lease address within + // the lease pool where multiple addresses are configured by using the size field. The + // address is incremented using the configured Prefix Length and Step. + // default = 64 + ConfiguredPrefixLen *uint32 `protobuf:"varint,2,opt,name=configured_prefix_len,json=configuredPrefixLen,proto3,oneof" json:"configured_prefix_len,omitempty"` + // The total number of addresses in the pool. + // default = 10 + PrefixSize *uint32 `protobuf:"varint,3,opt,name=prefix_size,json=prefixSize,proto3,oneof" json:"prefix_size,omitempty"` + // The increment value for the lease address within the lease pool where multiple addresses + // are present. The value is incremented according to the Prefix Length and Step. + // default = 1 + PrefixStep *uint32 `protobuf:"varint,4,opt,name=prefix_step,json=prefixStep,proto3,oneof" json:"prefix_step,omitempty"` + // The prefix length of the IPv6 prefix that the Dhcpv6 server offers to the Dhcpv6 + // client. + // default = 64 + AdvertisedPrefixLen *uint32 `protobuf:"varint,5,opt,name=advertised_prefix_len,json=advertisedPrefixLen,proto3,oneof" json:"advertised_prefix_len,omitempty"` } -func (x *FlowRSVPPathSessionAttributeLspTunnel) Reset() { - *x = FlowRSVPPathSessionAttributeLspTunnel{} +func (x *Dhcpv6ServerIapdPoolInfo) Reset() { + *x = Dhcpv6ServerIapdPoolInfo{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[259] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45163,13 +47224,13 @@ func (x *FlowRSVPPathSessionAttributeLspTunnel) Reset() { } } -func (x *FlowRSVPPathSessionAttributeLspTunnel) String() string { +func (x *Dhcpv6ServerIapdPoolInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathSessionAttributeLspTunnel) ProtoMessage() {} +func (*Dhcpv6ServerIapdPoolInfo) ProtoMessage() {} -func (x *FlowRSVPPathSessionAttributeLspTunnel) ProtoReflect() protoreflect.Message { +func (x *Dhcpv6ServerIapdPoolInfo) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[259] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45181,95 +47242,60 @@ func (x *FlowRSVPPathSessionAttributeLspTunnel) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathSessionAttributeLspTunnel.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathSessionAttributeLspTunnel) Descriptor() ([]byte, []int) { +// Deprecated: Use Dhcpv6ServerIapdPoolInfo.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerIapdPoolInfo) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{259} } -func (x *FlowRSVPPathSessionAttributeLspTunnel) GetSetupPriority() uint32 { - if x != nil && x.SetupPriority != nil { - return *x.SetupPriority +func (x *Dhcpv6ServerIapdPoolInfo) GetStartPrefixAddress() string { + if x != nil && x.StartPrefixAddress != nil { + return *x.StartPrefixAddress } - return 0 + return "" } -func (x *FlowRSVPPathSessionAttributeLspTunnel) GetHoldingPriority() uint32 { - if x != nil && x.HoldingPriority != nil { - return *x.HoldingPriority +func (x *Dhcpv6ServerIapdPoolInfo) GetConfiguredPrefixLen() uint32 { + if x != nil && x.ConfiguredPrefixLen != nil { + return *x.ConfiguredPrefixLen } return 0 } -func (x *FlowRSVPPathSessionAttributeLspTunnel) GetFlags() *FlowRSVPLspTunnelFlag { - if x != nil { - return x.Flags +func (x *Dhcpv6ServerIapdPoolInfo) GetPrefixSize() uint32 { + if x != nil && x.PrefixSize != nil { + return *x.PrefixSize } - return nil + return 0 } -func (x *FlowRSVPPathSessionAttributeLspTunnel) GetNameLength() *FlowRSVPSessionAttributeNameLength { - if x != nil { - return x.NameLength +func (x *Dhcpv6ServerIapdPoolInfo) GetPrefixStep() uint32 { + if x != nil && x.PrefixStep != nil { + return *x.PrefixStep } - return nil + return 0 } -func (x *FlowRSVPPathSessionAttributeLspTunnel) GetSessionName() string { - if x != nil && x.SessionName != nil { - return *x.SessionName +func (x *Dhcpv6ServerIapdPoolInfo) GetAdvertisedPrefixLen() uint32 { + if x != nil && x.AdvertisedPrefixLen != nil { + return *x.AdvertisedPrefixLen } - return "" + return 0 } -// SESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 1, it carries resource affinity -// information. -type FlowRSVPPathSessionAttributeLspTunnelRa struct { +// The container for pool configurations for IA type ianapd. +type Dhcpv6ServerIanapdPoolInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // any of which renders a link unacceptable. A null set (all bits set to zero) doesn't - // render the link unacceptable. The most significant byte in the hex-string is the - // farthest to the left in the byte sequence. Leading zero bytes in the configured - // value may be omitted for brevity. - // default = 00 - ExcludeAny *string `protobuf:"bytes,1,opt,name=exclude_any,json=excludeAny,proto3,oneof" json:"exclude_any,omitempty"` - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // any of which renders a link acceptable. A null set (all bits set to zero) automatically - // passes. The most significant byte in the hex-string is the farthest to the left - // in the byte sequence. Leading zero bytes in the configured value may be omitted - // for brevity. - // default = 00 - IncludeAny *string `protobuf:"bytes,2,opt,name=include_any,json=includeAny,proto3,oneof" json:"include_any,omitempty"` - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // all of which must be present for a link to be acceptable. A null set (all bits set - // to zero) automatically passes. The most significant byte in the hex-string is the - // farthest to the left in the byte sequence. Leading zero bytes in the configured - // value may be omitted for brevity. - // default = 00 - IncludeAll *string `protobuf:"bytes,3,opt,name=include_all,json=includeAll,proto3,oneof" json:"include_all,omitempty"` - // The priority of the session with respect to taking resources,in the range of 0 to - // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether - // this session can preempt another session. - // default = 7 - SetupPriority *uint32 `protobuf:"varint,4,opt,name=setup_priority,json=setupPriority,proto3,oneof" json:"setup_priority,omitempty"` - // The priority of the session with respect to holding resources,in the range of 0 to - // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether - // this session can preempt another session. - // default = 7 - HoldingPriority *uint32 `protobuf:"varint,5,opt,name=holding_priority,json=holdingPriority,proto3,oneof" json:"holding_priority,omitempty"` - // 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired - Flags *FlowRSVPLspTunnelFlag `protobuf:"bytes,6,opt,name=flags,proto3" json:"flags,omitempty"` - // The length of the display string before padding, in bytes. - NameLength *FlowRSVPSessionAttributeNameLength `protobuf:"bytes,7,opt,name=name_length,json=nameLength,proto3" json:"name_length,omitempty"` - // A null padded string of characters. - // default = - SessionName *string `protobuf:"bytes,8,opt,name=session_name,json=sessionName,proto3,oneof" json:"session_name,omitempty"` + // The pool configurations for IA types iana in ianapd. + Iana *Dhcpv6ServerPoolInfo `protobuf:"bytes,1,opt,name=iana,proto3" json:"iana,omitempty"` + // The pool configurations for IA types iapd in ianapd. + Iapd *Dhcpv6ServerIapdPoolInfo `protobuf:"bytes,2,opt,name=iapd,proto3" json:"iapd,omitempty"` } -func (x *FlowRSVPPathSessionAttributeLspTunnelRa) Reset() { - *x = FlowRSVPPathSessionAttributeLspTunnelRa{} +func (x *Dhcpv6ServerIanapdPoolInfo) Reset() { + *x = Dhcpv6ServerIanapdPoolInfo{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[260] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45277,13 +47303,13 @@ func (x *FlowRSVPPathSessionAttributeLspTunnelRa) Reset() { } } -func (x *FlowRSVPPathSessionAttributeLspTunnelRa) String() string { +func (x *Dhcpv6ServerIanapdPoolInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathSessionAttributeLspTunnelRa) ProtoMessage() {} +func (*Dhcpv6ServerIanapdPoolInfo) ProtoMessage() {} -func (x *FlowRSVPPathSessionAttributeLspTunnelRa) ProtoReflect() protoreflect.Message { +func (x *Dhcpv6ServerIanapdPoolInfo) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[260] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45295,80 +47321,43 @@ func (x *FlowRSVPPathSessionAttributeLspTunnelRa) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathSessionAttributeLspTunnelRa.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathSessionAttributeLspTunnelRa) Descriptor() ([]byte, []int) { +// Deprecated: Use Dhcpv6ServerIanapdPoolInfo.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerIanapdPoolInfo) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{260} } -func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetExcludeAny() string { - if x != nil && x.ExcludeAny != nil { - return *x.ExcludeAny - } - return "" -} - -func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetIncludeAny() string { - if x != nil && x.IncludeAny != nil { - return *x.IncludeAny - } - return "" -} - -func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetIncludeAll() string { - if x != nil && x.IncludeAll != nil { - return *x.IncludeAll - } - return "" -} - -func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetSetupPriority() uint32 { - if x != nil && x.SetupPriority != nil { - return *x.SetupPriority - } - return 0 -} - -func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetHoldingPriority() uint32 { - if x != nil && x.HoldingPriority != nil { - return *x.HoldingPriority - } - return 0 -} - -func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetFlags() *FlowRSVPLspTunnelFlag { +func (x *Dhcpv6ServerIanapdPoolInfo) GetIana() *Dhcpv6ServerPoolInfo { if x != nil { - return x.Flags + return x.Iana } return nil } -func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetNameLength() *FlowRSVPSessionAttributeNameLength { +func (x *Dhcpv6ServerIanapdPoolInfo) GetIapd() *Dhcpv6ServerIapdPoolInfo { if x != nil { - return x.NameLength + return x.Iapd } return nil } -func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetSessionName() string { - if x != nil && x.SessionName != nil { - return *x.SessionName - } - return "" -} - -// Description missing in models -type FlowRSVPLspTunnelFlag struct { +// Optional Dns configuration for DHCPv6 server. +type DhcpV6ServerDns struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.local_protection_desired - Choice *FlowRSVPLspTunnelFlag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPLspTunnelFlag_Choice_Enum,oneof" json:"choice,omitempty"` + // The primary DNS server address that is offered to DHCP clients that request this + // information through a TLV option. + // required = true + Primary *string `protobuf:"bytes,1,opt,name=primary,proto3,oneof" json:"primary,omitempty"` + // DHCP server secondary dns configuration options. If included secondary DNS server + // address will be offered to + // DHCP clients that request this information through a TLV option. + SecondaryDns []*DhcpV6ServerSecondaryDns `protobuf:"bytes,2,rep,name=secondary_dns,json=secondaryDns,proto3" json:"secondary_dns,omitempty"` } -func (x *FlowRSVPLspTunnelFlag) Reset() { - *x = FlowRSVPLspTunnelFlag{} +func (x *DhcpV6ServerDns) Reset() { + *x = DhcpV6ServerDns{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[261] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45376,13 +47365,13 @@ func (x *FlowRSVPLspTunnelFlag) Reset() { } } -func (x *FlowRSVPLspTunnelFlag) String() string { +func (x *DhcpV6ServerDns) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPLspTunnelFlag) ProtoMessage() {} +func (*DhcpV6ServerDns) ProtoMessage() {} -func (x *FlowRSVPLspTunnelFlag) ProtoReflect() protoreflect.Message { +func (x *DhcpV6ServerDns) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[261] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45394,39 +47383,38 @@ func (x *FlowRSVPLspTunnelFlag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPLspTunnelFlag.ProtoReflect.Descriptor instead. -func (*FlowRSVPLspTunnelFlag) Descriptor() ([]byte, []int) { +// Deprecated: Use DhcpV6ServerDns.ProtoReflect.Descriptor instead. +func (*DhcpV6ServerDns) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{261} } -func (x *FlowRSVPLspTunnelFlag) GetChoice() FlowRSVPLspTunnelFlag_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *DhcpV6ServerDns) GetPrimary() string { + if x != nil && x.Primary != nil { + return *x.Primary } - return FlowRSVPLspTunnelFlag_Choice_unspecified + return "" } -// Description missing in models -type FlowRSVPSessionAttributeNameLength struct { +func (x *DhcpV6ServerDns) GetSecondaryDns() []*DhcpV6ServerSecondaryDns { + if x != nil { + return x.SecondaryDns + } + return nil +} + +// Advanced Dns configuration for DHCPv6 server. +type DhcpV6ServerSecondaryDns struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // auto or configured value. - // default = Choice.Enum.auto - Choice *FlowRSVPSessionAttributeNameLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPSessionAttributeNameLength_Choice_Enum,oneof" json:"choice,omitempty"` - // The OTG implementation will provide a system generated value for this property. - // If the OTG implementation is unable to generate a value the default value must be - // used. - // default = 0 - Auto *uint32 `protobuf:"varint,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,3,opt,name=value,proto3,oneof" json:"value,omitempty"` + // The secondary DNS server address that is offered to DHCP clients that request this + // information through a TLV option. + Ip *string `protobuf:"bytes,1,opt,name=ip,proto3,oneof" json:"ip,omitempty"` } -func (x *FlowRSVPSessionAttributeNameLength) Reset() { - *x = FlowRSVPSessionAttributeNameLength{} +func (x *DhcpV6ServerSecondaryDns) Reset() { + *x = DhcpV6ServerSecondaryDns{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[262] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45434,13 +47422,13 @@ func (x *FlowRSVPSessionAttributeNameLength) Reset() { } } -func (x *FlowRSVPSessionAttributeNameLength) String() string { +func (x *DhcpV6ServerSecondaryDns) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPSessionAttributeNameLength) ProtoMessage() {} +func (*DhcpV6ServerSecondaryDns) ProtoMessage() {} -func (x *FlowRSVPSessionAttributeNameLength) ProtoReflect() protoreflect.Message { +func (x *DhcpV6ServerSecondaryDns) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[262] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45452,47 +47440,62 @@ func (x *FlowRSVPSessionAttributeNameLength) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPSessionAttributeNameLength.ProtoReflect.Descriptor instead. -func (*FlowRSVPSessionAttributeNameLength) Descriptor() ([]byte, []int) { +// Deprecated: Use DhcpV6ServerSecondaryDns.ProtoReflect.Descriptor instead. +func (*DhcpV6ServerSecondaryDns) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{262} } -func (x *FlowRSVPSessionAttributeNameLength) GetChoice() FlowRSVPSessionAttributeNameLength_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowRSVPSessionAttributeNameLength_Choice_unspecified -} - -func (x *FlowRSVPSessionAttributeNameLength) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto - } - return 0 -} - -func (x *FlowRSVPSessionAttributeNameLength) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *DhcpV6ServerSecondaryDns) GetIp() string { + if x != nil && x.Ip != nil { + return *x.Ip } - return 0 + return "" } -// C-Type is specific to a class num. -type FlowRSVPPathObjectsClassSenderTemplate struct { +// Under Review: OSPFv2 is currently under review for pending exploration on use cases. +// +// Under Review: OSPFv2 is currently under review for pending exploration on use cases. +// +// A container of properties for an OSPFv2 router and its interfaces & Route Ranges. +type DeviceOspfv2Router struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // OSPFv2 Router Id. + RouterId *Ospfv2RouterId `protobuf:"bytes,2,opt,name=router_id,json=routerId,proto3" json:"router_id,omitempty"` + // The time in seconds for LSA retransmission. + // default = 5 + LsaRetransmitTime *uint32 `protobuf:"varint,3,opt,name=lsa_retransmit_time,json=lsaRetransmitTime,proto3,oneof" json:"lsa_retransmit_time,omitempty"` + // The time in seconds required for LSA refresh. + // default = 1800 + LsaRefreshTime *uint32 `protobuf:"varint,4,opt,name=lsa_refresh_time,json=lsaRefreshTime,proto3,oneof" json:"lsa_refresh_time,omitempty"` + // The gap in miliseconds between each Flood Link State Update Burst + // default = 33 + InterBurstLsuInterval *uint32 `protobuf:"varint,5,opt,name=inter_burst_lsu_interval,json=interBurstLsuInterval,proto3,oneof" json:"inter_burst_lsu_interval,omitempty"` + // The maximum number of Flood LSUpdates for each burst + // default = 1 + MaxFloodLsuPerBurst *uint32 `protobuf:"varint,6,opt,name=max_flood_lsu_per_burst,json=maxFloodLsuPerBurst,proto3,oneof" json:"max_flood_lsu_per_burst,omitempty"` // Description missing in models - CType *FlowRSVPPathObjectsSenderTemplateCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` + GracefulRestart *Ospfv2GracefulRestart `protobuf:"bytes,7,opt,name=graceful_restart,json=gracefulRestart,proto3" json:"graceful_restart,omitempty"` + // Configuration for controlling storage of OSPFv2 learned LSAs received from the neighbors. + // default = False + StoreLsa *bool `protobuf:"varint,8,opt,name=store_lsa,json=storeLsa,proto3,oneof" json:"store_lsa,omitempty"` + // A router indicates the optional capabilities that it supports in its OSPF Hello packets, + // Database Description packets and in its LSAs. + Capabilities *Ospfv2Options `protobuf:"bytes,9,opt,name=capabilities,proto3" json:"capabilities,omitempty"` + // List of OSPFv2 interfaces for this router. + Interfaces []*Ospfv2Interface `protobuf:"bytes,10,rep,name=interfaces,proto3" json:"interfaces,omitempty"` + // Emulated OSPFv4 IPv4 routes. + V4Routes []*Ospfv2V4RouteRange `protobuf:"bytes,11,rep,name=v4_routes,json=v4Routes,proto3" json:"v4_routes,omitempty"` } -func (x *FlowRSVPPathObjectsClassSenderTemplate) Reset() { - *x = FlowRSVPPathObjectsClassSenderTemplate{} +func (x *DeviceOspfv2Router) Reset() { + *x = DeviceOspfv2Router{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[263] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45500,13 +47503,13 @@ func (x *FlowRSVPPathObjectsClassSenderTemplate) Reset() { } } -func (x *FlowRSVPPathObjectsClassSenderTemplate) String() string { +func (x *DeviceOspfv2Router) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsClassSenderTemplate) ProtoMessage() {} +func (*DeviceOspfv2Router) ProtoMessage() {} -func (x *FlowRSVPPathObjectsClassSenderTemplate) ProtoReflect() protoreflect.Message { +func (x *DeviceOspfv2Router) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[263] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45518,40 +47521,105 @@ func (x *FlowRSVPPathObjectsClassSenderTemplate) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsClassSenderTemplate.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsClassSenderTemplate) Descriptor() ([]byte, []int) { +// Deprecated: Use DeviceOspfv2Router.ProtoReflect.Descriptor instead. +func (*DeviceOspfv2Router) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{263} } -func (x *FlowRSVPPathObjectsClassSenderTemplate) GetLength() *FlowRSVPObjectLength { +func (x *DeviceOspfv2Router) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *DeviceOspfv2Router) GetRouterId() *Ospfv2RouterId { if x != nil { - return x.Length + return x.RouterId } return nil } -func (x *FlowRSVPPathObjectsClassSenderTemplate) GetCType() *FlowRSVPPathObjectsSenderTemplateCType { +func (x *DeviceOspfv2Router) GetLsaRetransmitTime() uint32 { + if x != nil && x.LsaRetransmitTime != nil { + return *x.LsaRetransmitTime + } + return 0 +} + +func (x *DeviceOspfv2Router) GetLsaRefreshTime() uint32 { + if x != nil && x.LsaRefreshTime != nil { + return *x.LsaRefreshTime + } + return 0 +} + +func (x *DeviceOspfv2Router) GetInterBurstLsuInterval() uint32 { + if x != nil && x.InterBurstLsuInterval != nil { + return *x.InterBurstLsuInterval + } + return 0 +} + +func (x *DeviceOspfv2Router) GetMaxFloodLsuPerBurst() uint32 { + if x != nil && x.MaxFloodLsuPerBurst != nil { + return *x.MaxFloodLsuPerBurst + } + return 0 +} + +func (x *DeviceOspfv2Router) GetGracefulRestart() *Ospfv2GracefulRestart { if x != nil { - return x.CType + return x.GracefulRestart } return nil } -// Object for SENDER_TEMPLATE class. Currently supported c-type is LSP Tunnel IPv4 (7). -type FlowRSVPPathObjectsSenderTemplateCType struct { +func (x *DeviceOspfv2Router) GetStoreLsa() bool { + if x != nil && x.StoreLsa != nil { + return *x.StoreLsa + } + return false +} + +func (x *DeviceOspfv2Router) GetCapabilities() *Ospfv2Options { + if x != nil { + return x.Capabilities + } + return nil +} + +func (x *DeviceOspfv2Router) GetInterfaces() []*Ospfv2Interface { + if x != nil { + return x.Interfaces + } + return nil +} + +func (x *DeviceOspfv2Router) GetV4Routes() []*Ospfv2V4RouteRange { + if x != nil { + return x.V4Routes + } + return nil +} + +// Container for OSPFv2 Router ID configuration. +type Ospfv2RouterId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.lsp_tunnel_ipv4 - Choice *FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - LspTunnelIpv4 *FlowRSVPPathSenderTemplateLspTunnelIpv4 `protobuf:"bytes,2,opt,name=lsp_tunnel_ipv4,json=lspTunnelIpv4,proto3" json:"lsp_tunnel_ipv4,omitempty"` + // IP address of Router ID for this emulated OSPFv2 router. + // - interface_ip: When IPv4 interface address to be assigned as Router ID. + // - custom: When, Router ID needs to be configured different from Interface IPv4 address. + // default = Choice.Enum.interface_ip + Choice *Ospfv2RouterId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.Ospfv2RouterId_Choice_Enum,oneof" json:"choice,omitempty"` + // Router ID in IPv4 address format. + Custom *string `protobuf:"bytes,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` } -func (x *FlowRSVPPathObjectsSenderTemplateCType) Reset() { - *x = FlowRSVPPathObjectsSenderTemplateCType{} +func (x *Ospfv2RouterId) Reset() { + *x = Ospfv2RouterId{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[264] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45559,13 +47627,13 @@ func (x *FlowRSVPPathObjectsSenderTemplateCType) Reset() { } } -func (x *FlowRSVPPathObjectsSenderTemplateCType) String() string { +func (x *Ospfv2RouterId) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsSenderTemplateCType) ProtoMessage() {} +func (*Ospfv2RouterId) ProtoMessage() {} -func (x *FlowRSVPPathObjectsSenderTemplateCType) ProtoReflect() protoreflect.Message { +func (x *Ospfv2RouterId) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[264] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45577,41 +47645,76 @@ func (x *FlowRSVPPathObjectsSenderTemplateCType) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsSenderTemplateCType.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsSenderTemplateCType) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2RouterId.ProtoReflect.Descriptor instead. +func (*Ospfv2RouterId) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{264} } -func (x *FlowRSVPPathObjectsSenderTemplateCType) GetChoice() FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum { +func (x *Ospfv2RouterId) GetChoice() Ospfv2RouterId_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return FlowRSVPPathObjectsSenderTemplateCType_Choice_unspecified + return Ospfv2RouterId_Choice_unspecified } -func (x *FlowRSVPPathObjectsSenderTemplateCType) GetLspTunnelIpv4() *FlowRSVPPathSenderTemplateLspTunnelIpv4 { - if x != nil { - return x.LspTunnelIpv4 +func (x *Ospfv2RouterId) GetCustom() string { + if x != nil && x.Custom != nil { + return *x.Custom } - return nil + return "" } -// Class = SENDER_TEMPLATE, LSP_TUNNEL_IPv4 C-Type = 7 -type FlowRSVPPathSenderTemplateLspTunnelIpv4 struct { +// The OSPFv2 Options field is present Database Description packets and all LSAs. +// This enables OSPF routers to support (or not support) optional capabilities, +// and to communicate their capability level to other OSPF routers. +// When capabilities are exchanged in Database Description packets a +// router can choose not to forward certain LSAs to a neighbor because +// of its reduced functionality. +// Reference: A.2 The Options field: https://www.rfc-editor.org/rfc/rfc2328#page-46. +type Ospfv2Options struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Ipv4TunnelSenderAddress *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress `protobuf:"bytes,1,opt,name=ipv4_tunnel_sender_address,json=ipv4TunnelSenderAddress,proto3" json:"ipv4_tunnel_sender_address,omitempty"` - // Description missing in models - Reserved *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved `protobuf:"bytes,2,opt,name=reserved,proto3" json:"reserved,omitempty"` - // Description missing in models - LspId *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId `protobuf:"bytes,3,opt,name=lsp_id,json=lspId,proto3" json:"lsp_id,omitempty"` + // Type of Service: 0th-bit: describes OSPFv2's TOS capability. + // default = False + TBit *bool `protobuf:"varint,1,opt,name=t_bit,json=tBit,proto3,oneof" json:"t_bit,omitempty"` + // External Capability: 1st-bit: describes the way AS-external-LSAs are flooded. + // default = False + EBit *bool `protobuf:"varint,2,opt,name=e_bit,json=eBit,proto3,oneof" json:"e_bit,omitempty"` + // Multicast Capability: 2nd-bit: describes whether IP multicast datagrams are forwarded + // according to the specifications in [Ref18], rfc2328. + // default = False + McBit *bool `protobuf:"varint,3,opt,name=mc_bit,json=mcBit,proto3,oneof" json:"mc_bit,omitempty"` + // NSSA Capability: 3rd-bit: describes the handling of Type-7 LSAs, as specified in + // [Ref19], rfc2328. + // default = False + NpBit *bool `protobuf:"varint,4,opt,name=np_bit,json=npBit,proto3,oneof" json:"np_bit,omitempty"` + // External Attribute: 4th-bit: describes the router's willingness to receive and forward + // External-Attributes-LSAs, as specified in [Ref20], rfc2328. + // default = False + EaBit *bool `protobuf:"varint,5,opt,name=ea_bit,json=eaBit,proto3,oneof" json:"ea_bit,omitempty"` + // Demand Circuit: 5th-bit: describes the router's handling of demand circuits, as specified + // in [Ref21], rfc2328. + // default = False + DcBit *bool `protobuf:"varint,6,opt,name=dc_bit,json=dcBit,proto3,oneof" json:"dc_bit,omitempty"` + // Opaque LSA's Forwarded: 6th-bit: describes the router's willingness to receive and + // forward Opaque-LSAs, rfc2370. + // default = False + OBit *bool `protobuf:"varint,7,opt,name=o_bit,json=oBit,proto3,oneof" json:"o_bit,omitempty"` + // Opaque LSA's Forwarded: 7th-bit: unused bit. + // default = False + UnusedBit *bool `protobuf:"varint,8,opt,name=unused_bit,json=unusedBit,proto3,oneof" json:"unused_bit,omitempty"` + // Set to indicate that the router acts as an Area Border Router. + // default = False + LsaBBit *bool `protobuf:"varint,9,opt,name=lsa_b_bit,json=lsaBBit,proto3,oneof" json:"lsa_b_bit,omitempty"` + // Set to indicate that the router acts as an AS Boundary Router. + // default = False + LsaEBit *bool `protobuf:"varint,10,opt,name=lsa_e_bit,json=lsaEBit,proto3,oneof" json:"lsa_e_bit,omitempty"` } -func (x *FlowRSVPPathSenderTemplateLspTunnelIpv4) Reset() { - *x = FlowRSVPPathSenderTemplateLspTunnelIpv4{} +func (x *Ospfv2Options) Reset() { + *x = Ospfv2Options{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[265] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45619,13 +47722,13 @@ func (x *FlowRSVPPathSenderTemplateLspTunnelIpv4) Reset() { } } -func (x *FlowRSVPPathSenderTemplateLspTunnelIpv4) String() string { +func (x *Ospfv2Options) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathSenderTemplateLspTunnelIpv4) ProtoMessage() {} +func (*Ospfv2Options) ProtoMessage() {} -func (x *FlowRSVPPathSenderTemplateLspTunnelIpv4) ProtoReflect() protoreflect.Message { +func (x *Ospfv2Options) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[265] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45637,47 +47740,94 @@ func (x *FlowRSVPPathSenderTemplateLspTunnelIpv4) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathSenderTemplateLspTunnelIpv4.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathSenderTemplateLspTunnelIpv4) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2Options.ProtoReflect.Descriptor instead. +func (*Ospfv2Options) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{265} } -func (x *FlowRSVPPathSenderTemplateLspTunnelIpv4) GetIpv4TunnelSenderAddress() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress { - if x != nil { - return x.Ipv4TunnelSenderAddress +func (x *Ospfv2Options) GetTBit() bool { + if x != nil && x.TBit != nil { + return *x.TBit } - return nil + return false } -func (x *FlowRSVPPathSenderTemplateLspTunnelIpv4) GetReserved() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved { - if x != nil { - return x.Reserved +func (x *Ospfv2Options) GetEBit() bool { + if x != nil && x.EBit != nil { + return *x.EBit } - return nil + return false } -func (x *FlowRSVPPathSenderTemplateLspTunnelIpv4) GetLspId() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId { - if x != nil { - return x.LspId +func (x *Ospfv2Options) GetMcBit() bool { + if x != nil && x.McBit != nil { + return *x.McBit } - return nil + return false } -// C-Type is specific to a class num. -type FlowRSVPPathObjectsClassSenderTspec struct { +func (x *Ospfv2Options) GetNpBit() bool { + if x != nil && x.NpBit != nil { + return *x.NpBit + } + return false +} + +func (x *Ospfv2Options) GetEaBit() bool { + if x != nil && x.EaBit != nil { + return *x.EaBit + } + return false +} + +func (x *Ospfv2Options) GetDcBit() bool { + if x != nil && x.DcBit != nil { + return *x.DcBit + } + return false +} + +func (x *Ospfv2Options) GetOBit() bool { + if x != nil && x.OBit != nil { + return *x.OBit + } + return false +} + +func (x *Ospfv2Options) GetUnusedBit() bool { + if x != nil && x.UnusedBit != nil { + return *x.UnusedBit + } + return false +} + +func (x *Ospfv2Options) GetLsaBBit() bool { + if x != nil && x.LsaBBit != nil { + return *x.LsaBBit + } + return false +} + +func (x *Ospfv2Options) GetLsaEBit() bool { + if x != nil && x.LsaEBit != nil { + return *x.LsaEBit + } + return false +} + +// Container of properties of OSPFv2 Graceful Retstart. +type Ospfv2GracefulRestart struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` - // Description missing in models - CType *FlowRSVPPathObjectsSenderTspecCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` + // Support of Graceful Restart in Helper Mode. + // default = False + HelperMode *bool `protobuf:"varint,1,opt,name=helper_mode,json=helperMode,proto3,oneof" json:"helper_mode,omitempty"` } -func (x *FlowRSVPPathObjectsClassSenderTspec) Reset() { - *x = FlowRSVPPathObjectsClassSenderTspec{} +func (x *Ospfv2GracefulRestart) Reset() { + *x = Ospfv2GracefulRestart{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[266] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45685,13 +47835,13 @@ func (x *FlowRSVPPathObjectsClassSenderTspec) Reset() { } } -func (x *FlowRSVPPathObjectsClassSenderTspec) String() string { +func (x *Ospfv2GracefulRestart) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsClassSenderTspec) ProtoMessage() {} +func (*Ospfv2GracefulRestart) ProtoMessage() {} -func (x *FlowRSVPPathObjectsClassSenderTspec) ProtoReflect() protoreflect.Message { +func (x *Ospfv2GracefulRestart) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[266] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45703,40 +47853,64 @@ func (x *FlowRSVPPathObjectsClassSenderTspec) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsClassSenderTspec.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsClassSenderTspec) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2GracefulRestart.ProtoReflect.Descriptor instead. +func (*Ospfv2GracefulRestart) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{266} } -func (x *FlowRSVPPathObjectsClassSenderTspec) GetLength() *FlowRSVPObjectLength { - if x != nil { - return x.Length - } - return nil -} - -func (x *FlowRSVPPathObjectsClassSenderTspec) GetCType() *FlowRSVPPathObjectsSenderTspecCType { - if x != nil { - return x.CType +func (x *Ospfv2GracefulRestart) GetHelperMode() bool { + if x != nil && x.HelperMode != nil { + return *x.HelperMode } - return nil + return false } -// Object for SENDER_TSPEC class. Currently supported c-type is int-serv (2). -type FlowRSVPPathObjectsSenderTspecCType struct { +// Configuration for single OSPFv2 interface. +type Ospfv2Interface struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.int_serv - Choice *FlowRSVPPathObjectsSenderTspecCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsSenderTspecCType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - IntServ *FlowRSVPPathSenderTspecIntServ `protobuf:"bytes,2,opt,name=int_serv,json=intServ,proto3" json:"int_serv,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // The globally unique name of the IPv4 interface connected to the DUT. + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // required = true + Ipv4Name *string `protobuf:"bytes,2,opt,name=ipv4_name,json=ipv4Name,proto3,oneof" json:"ipv4_name,omitempty"` + // The Area ID of the area to which the attached network belongs. + // All routing protocol packets originating from the interface are + // labelled with this Area ID. + Area *Ospfv2InterfaceArea `protobuf:"bytes,3,opt,name=area,proto3" json:"area,omitempty"` + // The OSPF network link type. + NetworkType *Ospfv2InterfaceNetworkType `protobuf:"bytes,4,opt,name=network_type,json=networkType,proto3" json:"network_type,omitempty"` + // Contains a list of Traffic Engineering attributes. + TrafficEngineering []*LinkStateTE `protobuf:"bytes,5,rep,name=traffic_engineering,json=trafficEngineering,proto3" json:"traffic_engineering,omitempty"` + // OSPFv2 authentication properties. + // If the authentication is not configured, none OSPF packet exchange is authenticated. + Authentication *Ospfv2InterfaceAuthentication `protobuf:"bytes,6,opt,name=authentication,proto3" json:"authentication,omitempty"` + // Optional container for advanced interface properties. + Advanced *Ospfv2InterfaceAdvanced `protobuf:"bytes,7,opt,name=advanced,proto3" json:"advanced,omitempty"` + // Link protection on the OSPFv2 link between two interfaces. + LinkProtection *Ospfv2InterfaceLinkProtection `protobuf:"bytes,8,opt,name=link_protection,json=linkProtection,proto3" json:"link_protection,omitempty"` + // A Shared Risk Link Group (SRLG) is represented by a 32-bit number unique within an + // IGP (OSPFv2 and IS-IS) domain. + // An SRLG is a set of links sharing a common resource, which affects all links in the + // set if the common resource fails. + // Links share the same risk of failure and are therefore considered to belong to the + // same SRLG. + SrlgValues []uint32 `protobuf:"varint,9,rep,packed,name=srlg_values,json=srlgValues,proto3" json:"srlg_values,omitempty"` } -func (x *FlowRSVPPathObjectsSenderTspecCType) Reset() { - *x = FlowRSVPPathObjectsSenderTspecCType{} +func (x *Ospfv2Interface) Reset() { + *x = Ospfv2Interface{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[267] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45744,13 +47918,13 @@ func (x *FlowRSVPPathObjectsSenderTspecCType) Reset() { } } -func (x *FlowRSVPPathObjectsSenderTspecCType) String() string { +func (x *Ospfv2Interface) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsSenderTspecCType) ProtoMessage() {} +func (*Ospfv2Interface) ProtoMessage() {} -func (x *FlowRSVPPathObjectsSenderTspecCType) ProtoReflect() protoreflect.Message { +func (x *Ospfv2Interface) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[267] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45762,220 +47936,164 @@ func (x *FlowRSVPPathObjectsSenderTspecCType) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsSenderTspecCType.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsSenderTspecCType) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2Interface.ProtoReflect.Descriptor instead. +func (*Ospfv2Interface) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{267} } -func (x *FlowRSVPPathObjectsSenderTspecCType) GetChoice() FlowRSVPPathObjectsSenderTspecCType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowRSVPPathObjectsSenderTspecCType_Choice_unspecified -} - -func (x *FlowRSVPPathObjectsSenderTspecCType) GetIntServ() *FlowRSVPPathSenderTspecIntServ { - if x != nil { - return x.IntServ - } - return nil -} - -// int-serv SENDER_TSPEC object: Class = 12, C-Type = 2 -type FlowRSVPPathSenderTspecIntServ struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - Version *PatternFlowRSVPPathSenderTspecIntServVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // Description missing in models - Reserved1 *PatternFlowRSVPPathSenderTspecIntServReserved1 `protobuf:"bytes,2,opt,name=reserved1,proto3" json:"reserved1,omitempty"` - // Description missing in models - OverallLength *PatternFlowRSVPPathSenderTspecIntServOverallLength `protobuf:"bytes,3,opt,name=overall_length,json=overallLength,proto3" json:"overall_length,omitempty"` - // Description missing in models - ServiceHeader *PatternFlowRSVPPathSenderTspecIntServServiceHeader `protobuf:"bytes,4,opt,name=service_header,json=serviceHeader,proto3" json:"service_header,omitempty"` - // Description missing in models - ZeroBit *PatternFlowRSVPPathSenderTspecIntServZeroBit `protobuf:"bytes,5,opt,name=zero_bit,json=zeroBit,proto3" json:"zero_bit,omitempty"` - // Description missing in models - Reserved2 *PatternFlowRSVPPathSenderTspecIntServReserved2 `protobuf:"bytes,6,opt,name=reserved2,proto3" json:"reserved2,omitempty"` - // Description missing in models - LengthOfServiceData *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData `protobuf:"bytes,7,opt,name=length_of_service_data,json=lengthOfServiceData,proto3" json:"length_of_service_data,omitempty"` - // Description missing in models - ParameterIdTokenBucketTspec *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec `protobuf:"bytes,8,opt,name=parameter_id_token_bucket_tspec,json=parameterIdTokenBucketTspec,proto3" json:"parameter_id_token_bucket_tspec,omitempty"` - // Description missing in models - Parameter_127Flag *PatternFlowRSVPPathSenderTspecIntServParameter127Flag `protobuf:"bytes,9,opt,name=parameter_127_flag,json=parameter127Flag,proto3" json:"parameter_127_flag,omitempty"` - // Description missing in models - Parameter_127Length *PatternFlowRSVPPathSenderTspecIntServParameter127Length `protobuf:"bytes,10,opt,name=parameter_127_length,json=parameter127Length,proto3" json:"parameter_127_length,omitempty"` - // Token bucket rate is set to sender's view of its generated traffic. - // default = 0 - TokenBucketRate *float32 `protobuf:"fixed32,11,opt,name=token_bucket_rate,json=tokenBucketRate,proto3,oneof" json:"token_bucket_rate,omitempty"` - // Token bucket size is set to sender's view of its generated traffic. - // default = 0 - TokenBucketSize *float32 `protobuf:"fixed32,12,opt,name=token_bucket_size,json=tokenBucketSize,proto3,oneof" json:"token_bucket_size,omitempty"` - // The peak rate may be set to the sender's peak traffic generation rate (if known and - // controlled), the physical interface line rate (if known), or positive infinity (if - // no better value is available). - // default = 0 - PeakDataRate *float32 `protobuf:"fixed32,13,opt,name=peak_data_rate,json=peakDataRate,proto3,oneof" json:"peak_data_rate,omitempty"` - // Description missing in models - MinimumPolicedUnit *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit `protobuf:"bytes,14,opt,name=minimum_policed_unit,json=minimumPolicedUnit,proto3" json:"minimum_policed_unit,omitempty"` - // Description missing in models - MaximumPacketSize *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize `protobuf:"bytes,15,opt,name=maximum_packet_size,json=maximumPacketSize,proto3" json:"maximum_packet_size,omitempty"` -} - -func (x *FlowRSVPPathSenderTspecIntServ) Reset() { - *x = FlowRSVPPathSenderTspecIntServ{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[268] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *Ospfv2Interface) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } + return "" } -func (x *FlowRSVPPathSenderTspecIntServ) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FlowRSVPPathSenderTspecIntServ) ProtoMessage() {} - -func (x *FlowRSVPPathSenderTspecIntServ) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[268] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *Ospfv2Interface) GetIpv4Name() string { + if x != nil && x.Ipv4Name != nil { + return *x.Ipv4Name } - return mi.MessageOf(x) -} - -// Deprecated: Use FlowRSVPPathSenderTspecIntServ.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathSenderTspecIntServ) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{268} + return "" } -func (x *FlowRSVPPathSenderTspecIntServ) GetVersion() *PatternFlowRSVPPathSenderTspecIntServVersion { +func (x *Ospfv2Interface) GetArea() *Ospfv2InterfaceArea { if x != nil { - return x.Version + return x.Area } return nil } -func (x *FlowRSVPPathSenderTspecIntServ) GetReserved1() *PatternFlowRSVPPathSenderTspecIntServReserved1 { +func (x *Ospfv2Interface) GetNetworkType() *Ospfv2InterfaceNetworkType { if x != nil { - return x.Reserved1 + return x.NetworkType } return nil } -func (x *FlowRSVPPathSenderTspecIntServ) GetOverallLength() *PatternFlowRSVPPathSenderTspecIntServOverallLength { +func (x *Ospfv2Interface) GetTrafficEngineering() []*LinkStateTE { if x != nil { - return x.OverallLength + return x.TrafficEngineering } return nil } -func (x *FlowRSVPPathSenderTspecIntServ) GetServiceHeader() *PatternFlowRSVPPathSenderTspecIntServServiceHeader { +func (x *Ospfv2Interface) GetAuthentication() *Ospfv2InterfaceAuthentication { if x != nil { - return x.ServiceHeader + return x.Authentication } return nil } -func (x *FlowRSVPPathSenderTspecIntServ) GetZeroBit() *PatternFlowRSVPPathSenderTspecIntServZeroBit { +func (x *Ospfv2Interface) GetAdvanced() *Ospfv2InterfaceAdvanced { if x != nil { - return x.ZeroBit + return x.Advanced } return nil } -func (x *FlowRSVPPathSenderTspecIntServ) GetReserved2() *PatternFlowRSVPPathSenderTspecIntServReserved2 { +func (x *Ospfv2Interface) GetLinkProtection() *Ospfv2InterfaceLinkProtection { if x != nil { - return x.Reserved2 + return x.LinkProtection } return nil } -func (x *FlowRSVPPathSenderTspecIntServ) GetLengthOfServiceData() *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData { +func (x *Ospfv2Interface) GetSrlgValues() []uint32 { if x != nil { - return x.LengthOfServiceData + return x.SrlgValues } return nil } -func (x *FlowRSVPPathSenderTspecIntServ) GetParameterIdTokenBucketTspec() *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec { - if x != nil { - return x.ParameterIdTokenBucketTspec - } - return nil +// Container for OSPF Area ID identifies the routing area to which the host belongs.. +type Ospfv2InterfaceArea struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The OSPF Area ID identifies the routing area to which the host belongs. Area ID type + // can be following format. + // - id: A 32-bit number identifying the area. + // - ip: The Area ID in IPv4 address format. + // default = Choice.Enum.id + Choice *Ospfv2InterfaceArea_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.Ospfv2InterfaceArea_Choice_Enum,oneof" json:"choice,omitempty"` + // The Area ID. + // default = 0 + Id *uint32 `protobuf:"varint,2,opt,name=id,proto3,oneof" json:"id,omitempty"` + // The Area ID in IPv4 address format. + Ip *string `protobuf:"bytes,3,opt,name=ip,proto3,oneof" json:"ip,omitempty"` } -func (x *FlowRSVPPathSenderTspecIntServ) GetParameter_127Flag() *PatternFlowRSVPPathSenderTspecIntServParameter127Flag { - if x != nil { - return x.Parameter_127Flag +func (x *Ospfv2InterfaceArea) Reset() { + *x = Ospfv2InterfaceArea{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[268] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *FlowRSVPPathSenderTspecIntServ) GetParameter_127Length() *PatternFlowRSVPPathSenderTspecIntServParameter127Length { - if x != nil { - return x.Parameter_127Length - } - return nil +func (x *Ospfv2InterfaceArea) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *FlowRSVPPathSenderTspecIntServ) GetTokenBucketRate() float32 { - if x != nil && x.TokenBucketRate != nil { - return *x.TokenBucketRate +func (*Ospfv2InterfaceArea) ProtoMessage() {} + +func (x *Ospfv2InterfaceArea) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[268] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *FlowRSVPPathSenderTspecIntServ) GetTokenBucketSize() float32 { - if x != nil && x.TokenBucketSize != nil { - return *x.TokenBucketSize - } - return 0 +// Deprecated: Use Ospfv2InterfaceArea.ProtoReflect.Descriptor instead. +func (*Ospfv2InterfaceArea) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{268} } -func (x *FlowRSVPPathSenderTspecIntServ) GetPeakDataRate() float32 { - if x != nil && x.PeakDataRate != nil { - return *x.PeakDataRate +func (x *Ospfv2InterfaceArea) GetChoice() Ospfv2InterfaceArea_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return Ospfv2InterfaceArea_Choice_unspecified } -func (x *FlowRSVPPathSenderTspecIntServ) GetMinimumPolicedUnit() *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit { - if x != nil { - return x.MinimumPolicedUnit +func (x *Ospfv2InterfaceArea) GetId() uint32 { + if x != nil && x.Id != nil { + return *x.Id } - return nil + return 0 } -func (x *FlowRSVPPathSenderTspecIntServ) GetMaximumPacketSize() *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize { - if x != nil { - return x.MaximumPacketSize +func (x *Ospfv2InterfaceArea) GetIp() string { + if x != nil && x.Ip != nil { + return *x.Ip } - return nil + return "" } -// C-Type is specific to a class num. -type FlowRSVPPathObjectsClassRecordRoute struct { +// The OSPF network link type options. +// - Point to Point: +// - Broadcast: +// - Point to Multipoint: In this case, at least a neigbor to be configured. +type Ospfv2InterfaceNetworkType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` // Description missing in models - CType *FlowRSVPPathObjectsRecordRouteCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` + // default = Choice.Enum.broadcast + Choice *Ospfv2InterfaceNetworkType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.Ospfv2InterfaceNetworkType_Choice_Enum,oneof" json:"choice,omitempty"` + // List of Neigbhors. + PointToMultipoint []*Ospfv2InterfaceNeighbor `protobuf:"bytes,2,rep,name=point_to_multipoint,json=pointToMultipoint,proto3" json:"point_to_multipoint,omitempty"` } -func (x *FlowRSVPPathObjectsClassRecordRoute) Reset() { - *x = FlowRSVPPathObjectsClassRecordRoute{} +func (x *Ospfv2InterfaceNetworkType) Reset() { + *x = Ospfv2InterfaceNetworkType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[269] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45983,13 +48101,13 @@ func (x *FlowRSVPPathObjectsClassRecordRoute) Reset() { } } -func (x *FlowRSVPPathObjectsClassRecordRoute) String() string { +func (x *Ospfv2InterfaceNetworkType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsClassRecordRoute) ProtoMessage() {} +func (*Ospfv2InterfaceNetworkType) ProtoMessage() {} -func (x *FlowRSVPPathObjectsClassRecordRoute) ProtoReflect() protoreflect.Message { +func (x *Ospfv2InterfaceNetworkType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[269] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46001,40 +48119,37 @@ func (x *FlowRSVPPathObjectsClassRecordRoute) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsClassRecordRoute.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsClassRecordRoute) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2InterfaceNetworkType.ProtoReflect.Descriptor instead. +func (*Ospfv2InterfaceNetworkType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{269} } -func (x *FlowRSVPPathObjectsClassRecordRoute) GetLength() *FlowRSVPObjectLength { - if x != nil { - return x.Length +func (x *Ospfv2InterfaceNetworkType) GetChoice() Ospfv2InterfaceNetworkType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return Ospfv2InterfaceNetworkType_Choice_unspecified } -func (x *FlowRSVPPathObjectsClassRecordRoute) GetCType() *FlowRSVPPathObjectsRecordRouteCType { +func (x *Ospfv2InterfaceNetworkType) GetPointToMultipoint() []*Ospfv2InterfaceNeighbor { if x != nil { - return x.CType + return x.PointToMultipoint } return nil } -// Object for RECORD_ROUTE class. c-type is Type 1 Route Record (1). -type FlowRSVPPathObjectsRecordRouteCType struct { +// Configuration of a neighbor. +type Ospfv2InterfaceNeighbor struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.type_1 - Choice *FlowRSVPPathObjectsRecordRouteCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsRecordRouteCType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Type_1 *FlowRSVPPathRecordRouteType1 `protobuf:"bytes,2,opt,name=type_1,json=type1,proto3" json:"type_1,omitempty"` + NeighborIp *string `protobuf:"bytes,1,opt,name=neighbor_ip,json=neighborIp,proto3,oneof" json:"neighbor_ip,omitempty"` } -func (x *FlowRSVPPathObjectsRecordRouteCType) Reset() { - *x = FlowRSVPPathObjectsRecordRouteCType{} +func (x *Ospfv2InterfaceNeighbor) Reset() { + *x = Ospfv2InterfaceNeighbor{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[270] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46042,13 +48157,13 @@ func (x *FlowRSVPPathObjectsRecordRouteCType) Reset() { } } -func (x *FlowRSVPPathObjectsRecordRouteCType) String() string { +func (x *Ospfv2InterfaceNeighbor) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsRecordRouteCType) ProtoMessage() {} +func (*Ospfv2InterfaceNeighbor) ProtoMessage() {} -func (x *FlowRSVPPathObjectsRecordRouteCType) ProtoReflect() protoreflect.Message { +func (x *Ospfv2InterfaceNeighbor) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[270] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46060,38 +48175,53 @@ func (x *FlowRSVPPathObjectsRecordRouteCType) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsRecordRouteCType.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsRecordRouteCType) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2InterfaceNeighbor.ProtoReflect.Descriptor instead. +func (*Ospfv2InterfaceNeighbor) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{270} } -func (x *FlowRSVPPathObjectsRecordRouteCType) GetChoice() FlowRSVPPathObjectsRecordRouteCType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowRSVPPathObjectsRecordRouteCType_Choice_unspecified -} - -func (x *FlowRSVPPathObjectsRecordRouteCType) GetType_1() *FlowRSVPPathRecordRouteType1 { - if x != nil { - return x.Type_1 +func (x *Ospfv2InterfaceNeighbor) GetNeighborIp() string { + if x != nil && x.NeighborIp != nil { + return *x.NeighborIp } - return nil + return "" } -// Type1 record route has list of subobjects. Currently supported subobjects are IPv4 -// address(1) and Label(3). -type FlowRSVPPathRecordRouteType1 struct { +// Contains OSPFv2 advanced properties. +type Ospfv2InterfaceAdvanced struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Subobjects []*FlowRSVPType1RecordRouteSubobjects `protobuf:"bytes,1,rep,name=subobjects,proto3" json:"subobjects,omitempty"` + // The time interval, in seconds, between the Hello packets that + // the router sends on the interface. Advertised in Hello packets + // sent out this interface. + // default = 10 + HelloInterval *uint32 `protobuf:"varint,1,opt,name=hello_interval,json=helloInterval,proto3,oneof" json:"hello_interval,omitempty"` + // The time interval in seconds before the router's neighbors will declare + // it down, when they stop hearing the router's Hello Packets. + // Advertised in Hello packets sent out this interface. + // default = 40 + DeadInterval *uint32 `protobuf:"varint,2,opt,name=dead_interval,json=deadInterval,proto3,oneof" json:"dead_interval,omitempty"` + // Routing metric associated with the interface.. + // default = 0 + RoutingMetric *uint32 `protobuf:"varint,3,opt,name=routing_metric,json=routingMetric,proto3,oneof" json:"routing_metric,omitempty"` + // The Priority for (Backup) Designated Router election. + // This value is used in Hello packets for the Designated Router (DR) election process. + // The default is 0, which indicates that the router will not participate in the DR + // election process. + // default = 0 + Priority *uint32 `protobuf:"varint,4,opt,name=priority,proto3,oneof" json:"priority,omitempty"` + // If this is set to true, then the MTU received from the neighbor during Database (DB) + // Exchange + // will be validated, otherwise it will be ignored. + // + // default = True + ValidateReceivedMtu *bool `protobuf:"varint,5,opt,name=validate_received_mtu,json=validateReceivedMtu,proto3,oneof" json:"validate_received_mtu,omitempty"` } -func (x *FlowRSVPPathRecordRouteType1) Reset() { - *x = FlowRSVPPathRecordRouteType1{} +func (x *Ospfv2InterfaceAdvanced) Reset() { + *x = Ospfv2InterfaceAdvanced{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[271] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46099,13 +48229,13 @@ func (x *FlowRSVPPathRecordRouteType1) Reset() { } } -func (x *FlowRSVPPathRecordRouteType1) String() string { +func (x *Ospfv2InterfaceAdvanced) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathRecordRouteType1) ProtoMessage() {} +func (*Ospfv2InterfaceAdvanced) ProtoMessage() {} -func (x *FlowRSVPPathRecordRouteType1) ProtoReflect() protoreflect.Message { +func (x *Ospfv2InterfaceAdvanced) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[271] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46117,30 +48247,91 @@ func (x *FlowRSVPPathRecordRouteType1) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathRecordRouteType1.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathRecordRouteType1) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2InterfaceAdvanced.ProtoReflect.Descriptor instead. +func (*Ospfv2InterfaceAdvanced) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{271} } -func (x *FlowRSVPPathRecordRouteType1) GetSubobjects() []*FlowRSVPType1RecordRouteSubobjects { - if x != nil { - return x.Subobjects +func (x *Ospfv2InterfaceAdvanced) GetHelloInterval() uint32 { + if x != nil && x.HelloInterval != nil { + return *x.HelloInterval } - return nil + return 0 } -// Type is specific to a subobject. -type FlowRSVPType1RecordRouteSubobjects struct { +func (x *Ospfv2InterfaceAdvanced) GetDeadInterval() uint32 { + if x != nil && x.DeadInterval != nil { + return *x.DeadInterval + } + return 0 +} + +func (x *Ospfv2InterfaceAdvanced) GetRoutingMetric() uint32 { + if x != nil && x.RoutingMetric != nil { + return *x.RoutingMetric + } + return 0 +} + +func (x *Ospfv2InterfaceAdvanced) GetPriority() uint32 { + if x != nil && x.Priority != nil { + return *x.Priority + } + return 0 +} + +func (x *Ospfv2InterfaceAdvanced) GetValidateReceivedMtu() bool { + if x != nil && x.ValidateReceivedMtu != nil { + return *x.ValidateReceivedMtu + } + return false +} + +// The OSPF Options field is present in OSPF Hello packets, Database Description packets +// and all LSAs. +// The Options field enables OSPF routers to support (or not support) optional capabilities, +// and to +// communicate their capability level to other OSPF routers https://datatracker.ietf.org/doc/html/rfc2328#page-46. +// When used in Hello packets, the Options field allows a router to reject a neighbor +// because of a capability mismatch. +type Ospfv2InterfaceOptions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Type *FlowRSVPPathObjectsRecordRouteSubObjectType `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // Type of Service: 0th-bit: describes OSPFv2's TOS capability. + // default = False + TBit *bool `protobuf:"varint,1,opt,name=t_bit,json=tBit,proto3,oneof" json:"t_bit,omitempty"` + // External Capability: This bit describes the way AS-external-LSAs are flooded. + // default = False + EBit *bool `protobuf:"varint,2,opt,name=e_bit,json=eBit,proto3,oneof" json:"e_bit,omitempty"` + // Multicast Capability: This bit describes whether IP multicast datagrams are forwarded + // according to the specifications in [Ref18], rfc2328. + // default = False + McBit *bool `protobuf:"varint,3,opt,name=mc_bit,json=mcBit,proto3,oneof" json:"mc_bit,omitempty"` + // NSSA Capability: This bit describes the handling of Type-7 LSAs, as specified in + // [Ref19], rfc2328. + // default = False + NpBit *bool `protobuf:"varint,4,opt,name=np_bit,json=npBit,proto3,oneof" json:"np_bit,omitempty"` + // External Attribute: This bit describes the router's willingness to receive and forward + // External-Attributes-LSAs, as specified in [Ref20], rfc2328. + // default = False + EaBit *bool `protobuf:"varint,5,opt,name=ea_bit,json=eaBit,proto3,oneof" json:"ea_bit,omitempty"` + // Demand Circuit: This bit describes the router's handling of demand circuits, as specified + // in [Ref21], rfc2328. + // default = False + DcBit *bool `protobuf:"varint,6,opt,name=dc_bit,json=dcBit,proto3,oneof" json:"dc_bit,omitempty"` + // Opaque LSA's Forwarded: This bit describes the router's willingness to receive and + // forward Opaque-LSAs, rfc2370. + // default = False + OBit *bool `protobuf:"varint,7,opt,name=o_bit,json=oBit,proto3,oneof" json:"o_bit,omitempty"` + // Opaque LSA's Forwarded: 7th-bit: unused bit. + // default = False + UnusedBit *bool `protobuf:"varint,8,opt,name=unused_bit,json=unusedBit,proto3,oneof" json:"unused_bit,omitempty"` } -func (x *FlowRSVPType1RecordRouteSubobjects) Reset() { - *x = FlowRSVPType1RecordRouteSubobjects{} +func (x *Ospfv2InterfaceOptions) Reset() { + *x = Ospfv2InterfaceOptions{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[272] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46148,13 +48339,13 @@ func (x *FlowRSVPType1RecordRouteSubobjects) Reset() { } } -func (x *FlowRSVPType1RecordRouteSubobjects) String() string { +func (x *Ospfv2InterfaceOptions) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPType1RecordRouteSubobjects) ProtoMessage() {} +func (*Ospfv2InterfaceOptions) ProtoMessage() {} -func (x *FlowRSVPType1RecordRouteSubobjects) ProtoReflect() protoreflect.Message { +func (x *Ospfv2InterfaceOptions) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[272] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46166,35 +48357,92 @@ func (x *FlowRSVPType1RecordRouteSubobjects) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPType1RecordRouteSubobjects.ProtoReflect.Descriptor instead. -func (*FlowRSVPType1RecordRouteSubobjects) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2InterfaceOptions.ProtoReflect.Descriptor instead. +func (*Ospfv2InterfaceOptions) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{272} } -func (x *FlowRSVPType1RecordRouteSubobjects) GetType() *FlowRSVPPathObjectsRecordRouteSubObjectType { - if x != nil { - return x.Type +func (x *Ospfv2InterfaceOptions) GetTBit() bool { + if x != nil && x.TBit != nil { + return *x.TBit } - return nil + return false } -// Currently supported subobjects are IPv4 address(1) and Label(3). -type FlowRSVPPathObjectsRecordRouteSubObjectType struct { +func (x *Ospfv2InterfaceOptions) GetEBit() bool { + if x != nil && x.EBit != nil { + return *x.EBit + } + return false +} + +func (x *Ospfv2InterfaceOptions) GetMcBit() bool { + if x != nil && x.McBit != nil { + return *x.McBit + } + return false +} + +func (x *Ospfv2InterfaceOptions) GetNpBit() bool { + if x != nil && x.NpBit != nil { + return *x.NpBit + } + return false +} + +func (x *Ospfv2InterfaceOptions) GetEaBit() bool { + if x != nil && x.EaBit != nil { + return *x.EaBit + } + return false +} + +func (x *Ospfv2InterfaceOptions) GetDcBit() bool { + if x != nil && x.DcBit != nil { + return *x.DcBit + } + return false +} + +func (x *Ospfv2InterfaceOptions) GetOBit() bool { + if x != nil && x.OBit != nil { + return *x.OBit + } + return false +} + +func (x *Ospfv2InterfaceOptions) GetUnusedBit() bool { + if x != nil && x.UnusedBit != nil { + return *x.UnusedBit + } + return false +} + +// This contains OSPFv2 authentication properties. +// Reference: https://www.rfc-editor.org/rfc/rfc2328#appendix-D +type Ospfv2InterfaceAuthentication struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.ipv4_address - Choice *FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Ipv4Address *FlowRSVPPathRecordRouteType1Ipv4Address `protobuf:"bytes,2,opt,name=ipv4_address,json=ipv4Address,proto3" json:"ipv4_address,omitempty"` - // Description missing in models - Label *FlowRSVPPathRecordRouteType1Label `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"` -} - -func (x *FlowRSVPPathObjectsRecordRouteSubObjectType) Reset() { - *x = FlowRSVPPathObjectsRecordRouteSubObjectType{} + // The authentication method. + // - md5 - Cryptographic authentication. + // - clear_text - Simple password authentication. A 64-bit field is configured on a + // per-network basis. + // All packets sent on a particular network must have this configured value (in clear + // text) + // in their OSPF header 64-bit authentication field. + // default = Choice.Enum.clear_text + Choice *Ospfv2InterfaceAuthentication_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.Ospfv2InterfaceAuthentication_Choice_Enum,oneof" json:"choice,omitempty"` + // List of MD5 Key IDs and MD5 Keys. + Md5S []*Ospfv2AuthenticationMd5 `protobuf:"bytes,2,rep,name=md5s,proto3" json:"md5s,omitempty"` + // The 8 Byte authentication field in the OSPF packet. + // default = otg + ClearText *string `protobuf:"bytes,4,opt,name=clear_text,json=clearText,proto3,oneof" json:"clear_text,omitempty"` +} + +func (x *Ospfv2InterfaceAuthentication) Reset() { + *x = Ospfv2InterfaceAuthentication{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[273] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46202,13 +48450,13 @@ func (x *FlowRSVPPathObjectsRecordRouteSubObjectType) Reset() { } } -func (x *FlowRSVPPathObjectsRecordRouteSubObjectType) String() string { +func (x *Ospfv2InterfaceAuthentication) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsRecordRouteSubObjectType) ProtoMessage() {} +func (*Ospfv2InterfaceAuthentication) ProtoMessage() {} -func (x *FlowRSVPPathObjectsRecordRouteSubObjectType) ProtoReflect() protoreflect.Message { +func (x *Ospfv2InterfaceAuthentication) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[273] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46220,52 +48468,53 @@ func (x *FlowRSVPPathObjectsRecordRouteSubObjectType) ProtoReflect() protoreflec return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsRecordRouteSubObjectType.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsRecordRouteSubObjectType) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2InterfaceAuthentication.ProtoReflect.Descriptor instead. +func (*Ospfv2InterfaceAuthentication) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{273} } -func (x *FlowRSVPPathObjectsRecordRouteSubObjectType) GetChoice() FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum { +func (x *Ospfv2InterfaceAuthentication) GetChoice() Ospfv2InterfaceAuthentication_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_unspecified + return Ospfv2InterfaceAuthentication_Choice_unspecified } -func (x *FlowRSVPPathObjectsRecordRouteSubObjectType) GetIpv4Address() *FlowRSVPPathRecordRouteType1Ipv4Address { +func (x *Ospfv2InterfaceAuthentication) GetMd5S() []*Ospfv2AuthenticationMd5 { if x != nil { - return x.Ipv4Address + return x.Md5S } return nil } -func (x *FlowRSVPPathObjectsRecordRouteSubObjectType) GetLabel() *FlowRSVPPathRecordRouteType1Label { - if x != nil { - return x.Label +func (x *Ospfv2InterfaceAuthentication) GetClearText() string { + if x != nil && x.ClearText != nil { + return *x.ClearText } - return nil + return "" } -// Class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Address, C-Type: -// 1 -type FlowRSVPPathRecordRouteType1Ipv4Address struct { +// Container of Cryptographic authentication. +// If the authentication type is of 'md5' then 'md5_key_id' and 'md5_key' +// both are to be configured. A shared secret key is configured in all routers attached +// to a common network/subnet. +// For each OSPF protocol packet, the key is used to generate/verify a message digest +// that is appended to the end +// of the OSPF packet. +type Ospfv2AuthenticationMd5 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The Length contains the total length of the subobject in bytes, including the Type - // and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. - Length *FlowRSVPRouteRecordLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` - // Description missing in models - Ipv4Address *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address `protobuf:"bytes,2,opt,name=ipv4_address,json=ipv4Address,proto3" json:"ipv4_address,omitempty"` - // Description missing in models - PrefixLength *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength `protobuf:"bytes,3,opt,name=prefix_length,json=prefixLength,proto3" json:"prefix_length,omitempty"` - // 0x01 local_protection_available, 0x02 local_protection_in_use - Flags *FlowRSVPRecordRouteIPv4Flag `protobuf:"bytes,4,opt,name=flags,proto3" json:"flags,omitempty"` + // The unique MD5 Key Identifier per-interface. + KeyId *uint32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3,oneof" json:"key_id,omitempty"` + // An alphanumeric secret used to generate the 16 byte MD5 hash value added + // to the OSPFv2 PDU in the Authentication TLV. + Key *string `protobuf:"bytes,2,opt,name=key,proto3,oneof" json:"key,omitempty"` } -func (x *FlowRSVPPathRecordRouteType1Ipv4Address) Reset() { - *x = FlowRSVPPathRecordRouteType1Ipv4Address{} +func (x *Ospfv2AuthenticationMd5) Reset() { + *x = Ospfv2AuthenticationMd5{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[274] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46273,13 +48522,13 @@ func (x *FlowRSVPPathRecordRouteType1Ipv4Address) Reset() { } } -func (x *FlowRSVPPathRecordRouteType1Ipv4Address) String() string { +func (x *Ospfv2AuthenticationMd5) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathRecordRouteType1Ipv4Address) ProtoMessage() {} +func (*Ospfv2AuthenticationMd5) ProtoMessage() {} -func (x *FlowRSVPPathRecordRouteType1Ipv4Address) ProtoReflect() protoreflect.Message { +func (x *Ospfv2AuthenticationMd5) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[274] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46291,52 +48540,68 @@ func (x *FlowRSVPPathRecordRouteType1Ipv4Address) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathRecordRouteType1Ipv4Address.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathRecordRouteType1Ipv4Address) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2AuthenticationMd5.ProtoReflect.Descriptor instead. +func (*Ospfv2AuthenticationMd5) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{274} } -func (x *FlowRSVPPathRecordRouteType1Ipv4Address) GetLength() *FlowRSVPRouteRecordLength { - if x != nil { - return x.Length - } - return nil -} - -func (x *FlowRSVPPathRecordRouteType1Ipv4Address) GetIpv4Address() *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address { - if x != nil { - return x.Ipv4Address - } - return nil -} - -func (x *FlowRSVPPathRecordRouteType1Ipv4Address) GetPrefixLength() *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength { - if x != nil { - return x.PrefixLength +func (x *Ospfv2AuthenticationMd5) GetKeyId() uint32 { + if x != nil && x.KeyId != nil { + return *x.KeyId } - return nil + return 0 } -func (x *FlowRSVPPathRecordRouteType1Ipv4Address) GetFlags() *FlowRSVPRecordRouteIPv4Flag { - if x != nil { - return x.Flags +func (x *Ospfv2AuthenticationMd5) GetKey() string { + if x != nil && x.Key != nil { + return *x.Key } - return nil + return "" } -// Description missing in models -type FlowRSVPRecordRouteIPv4Flag struct { +// Optional container for the link protection sub TLV (type 20). +type Ospfv2InterfaceLinkProtection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.local_protection_available - Choice *FlowRSVPRecordRouteIPv4Flag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPRecordRouteIPv4Flag_Choice_Enum,oneof" json:"choice,omitempty"` + // Enable this to protect other link or links. LSAs on a link of this type are lost + // if any of the links fail. + // default = False + ExtraTraffic *bool `protobuf:"varint,1,opt,name=extra_traffic,json=extraTraffic,proto3,oneof" json:"extra_traffic,omitempty"` + // Enabling this signifies that there is no other link protecting this + // link. LSAs on a link of this type are lost if the link fails. + // default = False + Unprotected *bool `protobuf:"varint,2,opt,name=unprotected,proto3,oneof" json:"unprotected,omitempty"` + // Enable this to share the Extra Traffic links between one or more + // links of type Shared.There are one or more disjoint links of type + // Extra Traffic that are protecting this link. + // default = False + Shared *bool `protobuf:"varint,3,opt,name=shared,proto3,oneof" json:"shared,omitempty"` + // Enabling this signifies that there is one dedicated disjoint link + // of type Extra Traffic that is protecting this link. + // default = False + Dedicated_1To_1 *bool `protobuf:"varint,4,opt,name=dedicated_1_to_1,json=dedicated1To1,proto3,oneof" json:"dedicated_1_to_1,omitempty"` + // Enabling this signifies that a dedicated disjoint link is protecting + // this link. However, the protecting link is not advertised in the + // link state database and is therefore not available for the routing + // of LSAs. + // default = False + Dedicated_1Plus_1 *bool `protobuf:"varint,5,opt,name=dedicated_1_plus_1,json=dedicated1Plus1,proto3,oneof" json:"dedicated_1_plus_1,omitempty"` + // Enabling this signifies that a protection scheme that is more + // reliable than Dedicated 1+1. + // default = False + Enhanced *bool `protobuf:"varint,6,opt,name=enhanced,proto3,oneof" json:"enhanced,omitempty"` + // This is a Protection Scheme with value 0x40. + // default = False + Reserved_40 *bool `protobuf:"varint,7,opt,name=reserved_40,json=reserved40,proto3,oneof" json:"reserved_40,omitempty"` + // This is a Protection Scheme with value 0x80. + // default = False + Reserved_80 *bool `protobuf:"varint,8,opt,name=reserved_80,json=reserved80,proto3,oneof" json:"reserved_80,omitempty"` } -func (x *FlowRSVPRecordRouteIPv4Flag) Reset() { - *x = FlowRSVPRecordRouteIPv4Flag{} +func (x *Ospfv2InterfaceLinkProtection) Reset() { + *x = Ospfv2InterfaceLinkProtection{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[275] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46344,13 +48609,13 @@ func (x *FlowRSVPRecordRouteIPv4Flag) Reset() { } } -func (x *FlowRSVPRecordRouteIPv4Flag) String() string { +func (x *Ospfv2InterfaceLinkProtection) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPRecordRouteIPv4Flag) ProtoMessage() {} +func (*Ospfv2InterfaceLinkProtection) ProtoMessage() {} -func (x *FlowRSVPRecordRouteIPv4Flag) ProtoReflect() protoreflect.Message { +func (x *Ospfv2InterfaceLinkProtection) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[275] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46362,37 +48627,88 @@ func (x *FlowRSVPRecordRouteIPv4Flag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPRecordRouteIPv4Flag.ProtoReflect.Descriptor instead. -func (*FlowRSVPRecordRouteIPv4Flag) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2InterfaceLinkProtection.ProtoReflect.Descriptor instead. +func (*Ospfv2InterfaceLinkProtection) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{275} } -func (x *FlowRSVPRecordRouteIPv4Flag) GetChoice() FlowRSVPRecordRouteIPv4Flag_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *Ospfv2InterfaceLinkProtection) GetExtraTraffic() bool { + if x != nil && x.ExtraTraffic != nil { + return *x.ExtraTraffic } - return FlowRSVPRecordRouteIPv4Flag_Choice_unspecified + return false } -// Class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Label, C-Type: 3 -type FlowRSVPPathRecordRouteType1Label struct { +func (x *Ospfv2InterfaceLinkProtection) GetUnprotected() bool { + if x != nil && x.Unprotected != nil { + return *x.Unprotected + } + return false +} + +func (x *Ospfv2InterfaceLinkProtection) GetShared() bool { + if x != nil && x.Shared != nil { + return *x.Shared + } + return false +} + +func (x *Ospfv2InterfaceLinkProtection) GetDedicated_1To_1() bool { + if x != nil && x.Dedicated_1To_1 != nil { + return *x.Dedicated_1To_1 + } + return false +} + +func (x *Ospfv2InterfaceLinkProtection) GetDedicated_1Plus_1() bool { + if x != nil && x.Dedicated_1Plus_1 != nil { + return *x.Dedicated_1Plus_1 + } + return false +} + +func (x *Ospfv2InterfaceLinkProtection) GetEnhanced() bool { + if x != nil && x.Enhanced != nil { + return *x.Enhanced + } + return false +} + +func (x *Ospfv2InterfaceLinkProtection) GetReserved_40() bool { + if x != nil && x.Reserved_40 != nil { + return *x.Reserved_40 + } + return false +} + +func (x *Ospfv2InterfaceLinkProtection) GetReserved_80() bool { + if x != nil && x.Reserved_80 != nil { + return *x.Reserved_80 + } + return false +} + +// Emulated OSPFv2 IPv4 routes. +type Ospfv2V4RouteRange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The Length contains the total length of the subobject in bytes, including the Type - // and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. - Length *FlowRSVPRouteRecordLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` - // Description missing in models - Flags *PatternFlowRSVPPathRecordRouteType1LabelFlags `protobuf:"bytes,2,opt,name=flags,proto3" json:"flags,omitempty"` - // Description missing in models - CType *PatternFlowRSVPPathRecordRouteType1LabelCType `protobuf:"bytes,3,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` - // The contents of the Label Object. Copied from the Label Object. - Label *FlowRSVPPathRecordRouteLabel `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // A list of group of IPv4 route addresses. + Addresses []*V4RouteAddress `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"` + // The user-defined metric associated with this route range. + // default = 0 + Metric *uint32 `protobuf:"varint,3,opt,name=metric,proto3,oneof" json:"metric,omitempty"` + // The type of the OSPFv2 routes. + RouteOrigin *Ospfv2V4RRRouteOrigin `protobuf:"bytes,4,opt,name=route_origin,json=routeOrigin,proto3" json:"route_origin,omitempty"` } -func (x *FlowRSVPPathRecordRouteType1Label) Reset() { - *x = FlowRSVPPathRecordRouteType1Label{} +func (x *Ospfv2V4RouteRange) Reset() { + *x = Ospfv2V4RouteRange{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[276] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46400,13 +48716,13 @@ func (x *FlowRSVPPathRecordRouteType1Label) Reset() { } } -func (x *FlowRSVPPathRecordRouteType1Label) String() string { +func (x *Ospfv2V4RouteRange) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathRecordRouteType1Label) ProtoMessage() {} +func (*Ospfv2V4RouteRange) ProtoMessage() {} -func (x *FlowRSVPPathRecordRouteType1Label) ProtoReflect() protoreflect.Message { +func (x *Ospfv2V4RouteRange) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[276] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46418,59 +48734,67 @@ func (x *FlowRSVPPathRecordRouteType1Label) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathRecordRouteType1Label.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathRecordRouteType1Label) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2V4RouteRange.ProtoReflect.Descriptor instead. +func (*Ospfv2V4RouteRange) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{276} } -func (x *FlowRSVPPathRecordRouteType1Label) GetLength() *FlowRSVPRouteRecordLength { - if x != nil { - return x.Length +func (x *Ospfv2V4RouteRange) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return nil + return "" } -func (x *FlowRSVPPathRecordRouteType1Label) GetFlags() *PatternFlowRSVPPathRecordRouteType1LabelFlags { +func (x *Ospfv2V4RouteRange) GetAddresses() []*V4RouteAddress { if x != nil { - return x.Flags + return x.Addresses } return nil } -func (x *FlowRSVPPathRecordRouteType1Label) GetCType() *PatternFlowRSVPPathRecordRouteType1LabelCType { - if x != nil { - return x.CType +func (x *Ospfv2V4RouteRange) GetMetric() uint32 { + if x != nil && x.Metric != nil { + return *x.Metric } - return nil + return 0 } -func (x *FlowRSVPPathRecordRouteType1Label) GetLabel() *FlowRSVPPathRecordRouteLabel { +func (x *Ospfv2V4RouteRange) GetRouteOrigin() *Ospfv2V4RRRouteOrigin { if x != nil { - return x.Label + return x.RouteOrigin } return nil } -// Description missing in models -type FlowRSVPPathRecordRouteLabel struct { +// Container of type of the OSPFv2 types correspond directly to the OSPFv2 LSAs types +// as +// defined in the OSPFv2 Link State (LS) Type - http://www.iana.org/assignments/ospfv2-parameters. +type Ospfv2V4RRRouteOrigin struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // 32 bit integer or hex value. - // default = Choice.Enum.as_integer - Choice *FlowRSVPPathRecordRouteLabel_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathRecordRouteLabel_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 16 - AsInteger *uint32 `protobuf:"varint,2,opt,name=as_integer,json=asInteger,proto3,oneof" json:"as_integer,omitempty"` - // Value of the this field should not excced 4 bytes. Maximum length of this attribute - // is 8 (4 * 2 hex character per byte). - // default = 10 - AsHex *string `protobuf:"bytes,3,opt,name=as_hex,json=asHex,proto3,oneof" json:"as_hex,omitempty"` + // Supported types are: - intra_area: for Intra-Area. - inter_area: for Inter Area. + // - external_type_1: for Autonomous System (AS) External with internal AS meteric. + // - external_type_2: for Autonomous System (AS) External with internal and external + // AS meteric. - nssa_external: for 7 Not-So-Stubby Area (NSSA) External. + // default = Choice.Enum.inter_area + Choice *Ospfv2V4RRRouteOrigin_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.Ospfv2V4RRRouteOrigin_Choice_Enum,oneof" json:"choice,omitempty"` + // Configuration for the Intra-Area. + IntraArea *Ospfv2V4RRIntraArea `protobuf:"bytes,2,opt,name=intra_area,json=intraArea,proto3" json:"intra_area,omitempty"` + // Configuration for the Intra-Area. + InterArea *Ospfv2V4RRInterArea `protobuf:"bytes,3,opt,name=inter_area,json=interArea,proto3" json:"inter_area,omitempty"` + // Configuration for the External Type 1. + ExternalType_1 *Ospfv2V4RRExternalType1 `protobuf:"bytes,4,opt,name=external_type_1,json=externalType1,proto3" json:"external_type_1,omitempty"` + // Configuration for the External Type 2. + ExternalType_2 *Ospfv2V4RRExternalType2 `protobuf:"bytes,5,opt,name=external_type_2,json=externalType2,proto3" json:"external_type_2,omitempty"` + // Configuration for the External Type 2. + NssaExternal *Ospfv2V4RRNssaExternal `protobuf:"bytes,6,opt,name=nssa_external,json=nssaExternal,proto3" json:"nssa_external,omitempty"` } -func (x *FlowRSVPPathRecordRouteLabel) Reset() { - *x = FlowRSVPPathRecordRouteLabel{} +func (x *Ospfv2V4RRRouteOrigin) Reset() { + *x = Ospfv2V4RRRouteOrigin{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[277] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46478,13 +48802,13 @@ func (x *FlowRSVPPathRecordRouteLabel) Reset() { } } -func (x *FlowRSVPPathRecordRouteLabel) String() string { +func (x *Ospfv2V4RRRouteOrigin) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathRecordRouteLabel) ProtoMessage() {} +func (*Ospfv2V4RRRouteOrigin) ProtoMessage() {} -func (x *FlowRSVPPathRecordRouteLabel) ProtoReflect() protoreflect.Message { +func (x *Ospfv2V4RRRouteOrigin) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[277] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46496,53 +48820,65 @@ func (x *FlowRSVPPathRecordRouteLabel) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathRecordRouteLabel.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathRecordRouteLabel) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2V4RRRouteOrigin.ProtoReflect.Descriptor instead. +func (*Ospfv2V4RRRouteOrigin) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{277} } -func (x *FlowRSVPPathRecordRouteLabel) GetChoice() FlowRSVPPathRecordRouteLabel_Choice_Enum { +func (x *Ospfv2V4RRRouteOrigin) GetChoice() Ospfv2V4RRRouteOrigin_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return FlowRSVPPathRecordRouteLabel_Choice_unspecified + return Ospfv2V4RRRouteOrigin_Choice_unspecified } -func (x *FlowRSVPPathRecordRouteLabel) GetAsInteger() uint32 { - if x != nil && x.AsInteger != nil { - return *x.AsInteger +func (x *Ospfv2V4RRRouteOrigin) GetIntraArea() *Ospfv2V4RRIntraArea { + if x != nil { + return x.IntraArea } - return 0 + return nil } -func (x *FlowRSVPPathRecordRouteLabel) GetAsHex() string { - if x != nil && x.AsHex != nil { - return *x.AsHex +func (x *Ospfv2V4RRRouteOrigin) GetInterArea() *Ospfv2V4RRInterArea { + if x != nil { + return x.InterArea } - return "" + return nil } -// Description missing in models -type FlowRSVPRouteRecordLength struct { +func (x *Ospfv2V4RRRouteOrigin) GetExternalType_1() *Ospfv2V4RRExternalType1 { + if x != nil { + return x.ExternalType_1 + } + return nil +} + +func (x *Ospfv2V4RRRouteOrigin) GetExternalType_2() *Ospfv2V4RRExternalType2 { + if x != nil { + return x.ExternalType_2 + } + return nil +} + +func (x *Ospfv2V4RRRouteOrigin) GetNssaExternal() *Ospfv2V4RRNssaExternal { + if x != nil { + return x.NssaExternal + } + return nil +} + +// Container for Intra-Area. +type Ospfv2V4RRIntraArea struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // auto or configured value. - // default = Choice.Enum.auto - Choice *FlowRSVPRouteRecordLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPRouteRecordLength_Choice_Enum,oneof" json:"choice,omitempty"` - // The OTG implementation will provide a system generated value for this property. - // If the OTG implementation is unable to generate a value the default value must be - // used. - // default = 8 - Auto *uint32 `protobuf:"varint,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // Description missing in models - // default = 8 - Value *uint32 `protobuf:"varint,3,opt,name=value,proto3,oneof" json:"value,omitempty"` + // One-octet field contains flags applicable to the prefix. + Flags *Ospfv2V4RRExtdPrefixFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` } -func (x *FlowRSVPRouteRecordLength) Reset() { - *x = FlowRSVPRouteRecordLength{} +func (x *Ospfv2V4RRIntraArea) Reset() { + *x = Ospfv2V4RRIntraArea{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[278] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46550,13 +48886,13 @@ func (x *FlowRSVPRouteRecordLength) Reset() { } } -func (x *FlowRSVPRouteRecordLength) String() string { +func (x *Ospfv2V4RRIntraArea) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPRouteRecordLength) ProtoMessage() {} +func (*Ospfv2V4RRIntraArea) ProtoMessage() {} -func (x *FlowRSVPRouteRecordLength) ProtoReflect() protoreflect.Message { +func (x *Ospfv2V4RRIntraArea) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[278] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46568,54 +48904,30 @@ func (x *FlowRSVPRouteRecordLength) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPRouteRecordLength.ProtoReflect.Descriptor instead. -func (*FlowRSVPRouteRecordLength) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2V4RRIntraArea.ProtoReflect.Descriptor instead. +func (*Ospfv2V4RRIntraArea) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{278} } -func (x *FlowRSVPRouteRecordLength) GetChoice() FlowRSVPRouteRecordLength_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowRSVPRouteRecordLength_Choice_unspecified -} - -func (x *FlowRSVPRouteRecordLength) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto - } - return 0 -} - -func (x *FlowRSVPRouteRecordLength) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *Ospfv2V4RRIntraArea) GetFlags() *Ospfv2V4RRExtdPrefixFlags { + if x != nil { + return x.Flags } - return 0 + return nil } -// Custom packet header -type FlowRSVPPathObjectsCustom struct { +// Container for Intra-Area. +type Ospfv2V4RRInterArea struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - Type *PatternFlowRSVPPathObjectsCustomType `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // Description missing in models - Length *FlowRSVPObjectLength `protobuf:"bytes,2,opt,name=length,proto3" json:"length,omitempty"` - // A custom packet header defined as a string of hex bytes. The string MUST contain - // sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be - // discarded. Value of the this field should not excced 65525 bytes since maximum 65528 - // bytes can be added as object-contents in RSVP header. For type and length requires - // 3 bytes, hence maximum of 65524 bytes are expected. Maximum length of this attribute - // is 131050 (65525 * 2 hex character per byte). - // default = 0000 - Bytes *string `protobuf:"bytes,3,opt,name=bytes,proto3,oneof" json:"bytes,omitempty"` + // One-octet field contains flags applicable to the prefix. + Flags *Ospfv2V4RRExtdPrefixFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` } -func (x *FlowRSVPPathObjectsCustom) Reset() { - *x = FlowRSVPPathObjectsCustom{} +func (x *Ospfv2V4RRInterArea) Reset() { + *x = Ospfv2V4RRInterArea{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[279] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46623,13 +48935,13 @@ func (x *FlowRSVPPathObjectsCustom) Reset() { } } -func (x *FlowRSVPPathObjectsCustom) String() string { +func (x *Ospfv2V4RRInterArea) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsCustom) ProtoMessage() {} +func (*Ospfv2V4RRInterArea) ProtoMessage() {} -func (x *FlowRSVPPathObjectsCustom) ProtoReflect() protoreflect.Message { +func (x *Ospfv2V4RRInterArea) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[279] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46641,54 +48953,30 @@ func (x *FlowRSVPPathObjectsCustom) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsCustom.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsCustom) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2V4RRInterArea.ProtoReflect.Descriptor instead. +func (*Ospfv2V4RRInterArea) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{279} } -func (x *FlowRSVPPathObjectsCustom) GetType() *PatternFlowRSVPPathObjectsCustomType { - if x != nil { - return x.Type - } - return nil -} - -func (x *FlowRSVPPathObjectsCustom) GetLength() *FlowRSVPObjectLength { +func (x *Ospfv2V4RRInterArea) GetFlags() *Ospfv2V4RRExtdPrefixFlags { if x != nil { - return x.Length + return x.Flags } return nil } -func (x *FlowRSVPPathObjectsCustom) GetBytes() string { - if x != nil && x.Bytes != nil { - return *x.Bytes - } - return "" -} - -// The frame size which overrides the total length of the packet -type FlowSize struct { +// Container for Intra-Area. +type Ospfv2V4RRExternalType1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.fixed - Choice *FlowSize_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowSize_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 64 - Fixed *uint32 `protobuf:"varint,2,opt,name=fixed,proto3,oneof" json:"fixed,omitempty"` - // Description missing in models - Increment *FlowSizeIncrement `protobuf:"bytes,3,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Random *FlowSizeRandom `protobuf:"bytes,4,opt,name=random,proto3" json:"random,omitempty"` - // Description missing in models - WeightPairs *FlowSizeWeightPairs `protobuf:"bytes,5,opt,name=weight_pairs,json=weightPairs,proto3" json:"weight_pairs,omitempty"` + // One-octet field contains flags applicable to the prefix. + Flags *Ospfv2V4RRExtdPrefixFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` } -func (x *FlowSize) Reset() { - *x = FlowSize{} +func (x *Ospfv2V4RRExternalType1) Reset() { + *x = Ospfv2V4RRExternalType1{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[280] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46696,13 +48984,13 @@ func (x *FlowSize) Reset() { } } -func (x *FlowSize) String() string { +func (x *Ospfv2V4RRExternalType1) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSize) ProtoMessage() {} +func (*Ospfv2V4RRExternalType1) ProtoMessage() {} -func (x *FlowSize) ProtoReflect() protoreflect.Message { +func (x *Ospfv2V4RRExternalType1) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[280] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46714,66 +49002,30 @@ func (x *FlowSize) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSize.ProtoReflect.Descriptor instead. -func (*FlowSize) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2V4RRExternalType1.ProtoReflect.Descriptor instead. +func (*Ospfv2V4RRExternalType1) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{280} } -func (x *FlowSize) GetChoice() FlowSize_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowSize_Choice_unspecified -} - -func (x *FlowSize) GetFixed() uint32 { - if x != nil && x.Fixed != nil { - return *x.Fixed - } - return 0 -} - -func (x *FlowSize) GetIncrement() *FlowSizeIncrement { - if x != nil { - return x.Increment - } - return nil -} - -func (x *FlowSize) GetRandom() *FlowSizeRandom { - if x != nil { - return x.Random - } - return nil -} - -func (x *FlowSize) GetWeightPairs() *FlowSizeWeightPairs { +func (x *Ospfv2V4RRExternalType1) GetFlags() *Ospfv2V4RRExtdPrefixFlags { if x != nil { - return x.WeightPairs + return x.Flags } return nil } -// Frame size that increments from a starting size to -// an ending size incrementing by a step size. -type FlowSizeIncrement struct { +// Container for Intra-Area. +type Ospfv2V4RRExternalType2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Starting frame size in bytes - // default = 64 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Ending frame size in bytes - // default = 1518 - End *uint32 `protobuf:"varint,2,opt,name=end,proto3,oneof" json:"end,omitempty"` - // Step frame size in bytes - // default = 1 - Step *uint32 `protobuf:"varint,3,opt,name=step,proto3,oneof" json:"step,omitempty"` + // One-octet field contains flags applicable to the prefix. + Flags *Ospfv2V4RRExtdPrefixFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` } -func (x *FlowSizeIncrement) Reset() { - *x = FlowSizeIncrement{} +func (x *Ospfv2V4RRExternalType2) Reset() { + *x = Ospfv2V4RRExternalType2{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[281] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46781,13 +49033,13 @@ func (x *FlowSizeIncrement) Reset() { } } -func (x *FlowSizeIncrement) String() string { +func (x *Ospfv2V4RRExternalType2) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSizeIncrement) ProtoMessage() {} +func (*Ospfv2V4RRExternalType2) ProtoMessage() {} -func (x *FlowSizeIncrement) ProtoReflect() protoreflect.Message { +func (x *Ospfv2V4RRExternalType2) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[281] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46799,48 +49051,33 @@ func (x *FlowSizeIncrement) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSizeIncrement.ProtoReflect.Descriptor instead. -func (*FlowSizeIncrement) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2V4RRExternalType2.ProtoReflect.Descriptor instead. +func (*Ospfv2V4RRExternalType2) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{281} } -func (x *FlowSizeIncrement) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 -} - -func (x *FlowSizeIncrement) GetEnd() uint32 { - if x != nil && x.End != nil { - return *x.End - } - return 0 -} - -func (x *FlowSizeIncrement) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Ospfv2V4RRExternalType2) GetFlags() *Ospfv2V4RRExtdPrefixFlags { + if x != nil { + return x.Flags } - return 0 + return nil } -// Random frame size from a min value to a max value. -type FlowSizeRandom struct { +// Container for Intra-Area. +type Ospfv2V4RRNssaExternal struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 64 - Min *uint32 `protobuf:"varint,1,opt,name=min,proto3,oneof" json:"min,omitempty"` - // Description missing in models - // default = 1518 - Max *uint32 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` + // One-octet field contains flags applicable to the prefix. + Flags *Ospfv2V4RRExtdPrefixFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + // The flag is set True if LSA will be propagated between Areas. + // default = False + Propagation *bool `protobuf:"varint,2,opt,name=propagation,proto3,oneof" json:"propagation,omitempty"` } -func (x *FlowSizeRandom) Reset() { - *x = FlowSizeRandom{} +func (x *Ospfv2V4RRNssaExternal) Reset() { + *x = Ospfv2V4RRNssaExternal{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[282] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46848,13 +49085,13 @@ func (x *FlowSizeRandom) Reset() { } } -func (x *FlowSizeRandom) String() string { +func (x *Ospfv2V4RRNssaExternal) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSizeRandom) ProtoMessage() {} +func (*Ospfv2V4RRNssaExternal) ProtoMessage() {} -func (x *FlowSizeRandom) ProtoReflect() protoreflect.Message { +func (x *Ospfv2V4RRNssaExternal) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[282] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46866,58 +49103,47 @@ func (x *FlowSizeRandom) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSizeRandom.ProtoReflect.Descriptor instead. -func (*FlowSizeRandom) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2V4RRNssaExternal.ProtoReflect.Descriptor instead. +func (*Ospfv2V4RRNssaExternal) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{282} } -func (x *FlowSizeRandom) GetMin() uint32 { - if x != nil && x.Min != nil { - return *x.Min +func (x *Ospfv2V4RRNssaExternal) GetFlags() *Ospfv2V4RRExtdPrefixFlags { + if x != nil { + return x.Flags } - return 0 + return nil } -func (x *FlowSizeRandom) GetMax() uint32 { - if x != nil && x.Max != nil { - return *x.Max +func (x *Ospfv2V4RRNssaExternal) GetPropagation() bool { + if x != nil && x.Propagation != nil { + return *x.Propagation } - return 0 + return false } -// Frame size distribution, defined as pairs (including IMIX distribution). -// Frames are randomly generated such that the proportion of each frame size out of -// the total number of frames -// are matching with the weight value of the pair. However, as with any -// other probability -// distribution, the sample distribution is close to theoretical value only if the size -// of the sample is reasonably large. -// When the number of frames is very low the transmitted frames may not come close to -// the ratio described in the weight. -type FlowSizeWeightPairs struct { +// One-octet field contains flags applicable to the prefix. https://datatracker.ietf.org/doc/html/rfc7684. +type Ospfv2V4RRExtdPrefixFlags struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.predefined - Choice *FlowSizeWeightPairs_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowSizeWeightPairs_Choice_Enum,oneof" json:"choice,omitempty"` - // Specify predefined frame size distribution pairs (including IMIX distribution). - // - // The available predefined distribution pairs are: - // - IMIX (64:7, 570:4, and 1518:1) - // - IPSec IMIX (90:58.67, 92:2, 594:23.66 and 1418:15.67) - // - IPv6 IMIX (60:58.67, 496:2, 594:23.66 and 1518:15.67) - // - Standard IMIX (58:58.67, 62:2, 594:23.66 and 1518:15.67) - // - TCP IMIX (90:58.67, 92:2, 594:23.66 and 1518:15.67) - // default = Predefined.Enum.imix - Predefined *FlowSizeWeightPairs_Predefined_Enum `protobuf:"varint,2,opt,name=predefined,proto3,enum=otg.FlowSizeWeightPairs_Predefined_Enum,oneof" json:"predefined,omitempty"` - // Description missing in models - Custom []*FlowSizeWeightPairsCustom `protobuf:"bytes,3,rep,name=custom,proto3" json:"custom,omitempty"` + // 0x80 - (Attach Flag): An Area Border Router (ABR) + // generating an OSPFv2 Extended Prefix TLV for an inter-area + // prefix that is locally connected or attached in another + // connected area SHOULD set this flag. + // default = False + AFlag *bool `protobuf:"varint,1,opt,name=a_flag,json=aFlag,proto3,oneof" json:"a_flag,omitempty"` + // N-Flag (Node Flag): Set when the prefix identifies the + // advertising router, i.e., the prefix is a host prefix + // advertising a globally reachable address typically associated + // with a loopback address. + // default = False + NFlag *bool `protobuf:"varint,2,opt,name=n_flag,json=nFlag,proto3,oneof" json:"n_flag,omitempty"` } -func (x *FlowSizeWeightPairs) Reset() { - *x = FlowSizeWeightPairs{} +func (x *Ospfv2V4RRExtdPrefixFlags) Reset() { + *x = Ospfv2V4RRExtdPrefixFlags{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[283] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46925,13 +49151,13 @@ func (x *FlowSizeWeightPairs) Reset() { } } -func (x *FlowSizeWeightPairs) String() string { +func (x *Ospfv2V4RRExtdPrefixFlags) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSizeWeightPairs) ProtoMessage() {} +func (*Ospfv2V4RRExtdPrefixFlags) ProtoMessage() {} -func (x *FlowSizeWeightPairs) ProtoReflect() protoreflect.Message { +func (x *Ospfv2V4RRExtdPrefixFlags) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[283] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46943,49 +49169,79 @@ func (x *FlowSizeWeightPairs) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSizeWeightPairs.ProtoReflect.Descriptor instead. -func (*FlowSizeWeightPairs) Descriptor() ([]byte, []int) { +// Deprecated: Use Ospfv2V4RRExtdPrefixFlags.ProtoReflect.Descriptor instead. +func (*Ospfv2V4RRExtdPrefixFlags) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{283} } -func (x *FlowSizeWeightPairs) GetChoice() FlowSizeWeightPairs_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowSizeWeightPairs_Choice_unspecified -} - -func (x *FlowSizeWeightPairs) GetPredefined() FlowSizeWeightPairs_Predefined_Enum { - if x != nil && x.Predefined != nil { - return *x.Predefined +func (x *Ospfv2V4RRExtdPrefixFlags) GetAFlag() bool { + if x != nil && x.AFlag != nil { + return *x.AFlag } - return FlowSizeWeightPairs_Predefined_unspecified + return false } -func (x *FlowSizeWeightPairs) GetCustom() []*FlowSizeWeightPairsCustom { - if x != nil { - return x.Custom +func (x *Ospfv2V4RRExtdPrefixFlags) GetNFlag() bool { + if x != nil && x.NFlag != nil { + return *x.NFlag } - return nil + return false } -// Custom frame size distribution pair. -type FlowSizeWeightPairsCustom struct { +// A high level data plane traffic flow. +type Flow struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The size of the frame (in bytes) for this weight pair. - // default = 64 - Size *uint32 `protobuf:"varint,1,opt,name=size,proto3,oneof" json:"size,omitempty"` - // Weight assigned to the corresponding frame size in this weight pair. - // Higher weight means more packets. - // default = 1 - Weight *float32 `protobuf:"fixed32,2,opt,name=weight,proto3,oneof" json:"weight,omitempty"` + // The transmit and receive endpoints. + // required = true + TxRx *FlowTxRx `protobuf:"bytes,1,opt,name=tx_rx,json=txRx,proto3" json:"tx_rx,omitempty"` + // The list of protocol headers defining the shape of all + // intended packets in corresponding flow as it is transmitted + // by traffic-generator port. + // + // The order of protocol headers assigned to the list is the + // order they will appear on the wire. + // + // In the case of an empty list the keyword/value of minItems: 1 + // indicates that an implementation MUST provide at least one + // Flow.Header object. + // + // The default value for the Flow.Header choice property is ethernet + // which will result in an implementation by default providing at least + // one ethernet packet header. + Packet []*FlowHeader `protobuf:"bytes,2,rep,name=packet,proto3" json:"packet,omitempty"` + // Under Review: The packet header schema for egress tracking currently exposes unwanted + // fields. The query structure for tagged metrics inside flows metrics requires documenting + // expected response format. + // + // Under Review: The packet header schema for egress tracking currently exposes unwanted + // fields. The query structure for tagged metrics inside flows metrics requires documenting + // expected response format. + // + // The list of protocol headers defining the shape of all + // intended packets in corresponding flow as it is received + // by traffic-generator port. + // + // For all protocol headers, only the `metric_tags` property is configurable. + EgressPacket []*FlowHeader `protobuf:"bytes,9,rep,name=egress_packet,json=egressPacket,proto3" json:"egress_packet,omitempty"` + // The size of the packets. + Size *FlowSize `protobuf:"bytes,3,opt,name=size,proto3" json:"size,omitempty"` + // The transmit rate of the packets. + Rate *FlowRate `protobuf:"bytes,4,opt,name=rate,proto3" json:"rate,omitempty"` + // The transmit duration of the packets. + Duration *FlowDuration `protobuf:"bytes,5,opt,name=duration,proto3" json:"duration,omitempty"` + // Flow metrics. + Metrics *FlowMetrics `protobuf:"bytes,6,opt,name=metrics,proto3" json:"metrics,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,7,opt,name=name,proto3,oneof" json:"name,omitempty"` } -func (x *FlowSizeWeightPairsCustom) Reset() { - *x = FlowSizeWeightPairsCustom{} +func (x *Flow) Reset() { + *x = Flow{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[284] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46993,13 +49249,13 @@ func (x *FlowSizeWeightPairsCustom) Reset() { } } -func (x *FlowSizeWeightPairsCustom) String() string { +func (x *Flow) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSizeWeightPairsCustom) ProtoMessage() {} +func (*Flow) ProtoMessage() {} -func (x *FlowSizeWeightPairsCustom) ProtoReflect() protoreflect.Message { +func (x *Flow) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[284] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47011,56 +49267,85 @@ func (x *FlowSizeWeightPairsCustom) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSizeWeightPairsCustom.ProtoReflect.Descriptor instead. -func (*FlowSizeWeightPairsCustom) Descriptor() ([]byte, []int) { +// Deprecated: Use Flow.ProtoReflect.Descriptor instead. +func (*Flow) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{284} } -func (x *FlowSizeWeightPairsCustom) GetSize() uint32 { - if x != nil && x.Size != nil { - return *x.Size +func (x *Flow) GetTxRx() *FlowTxRx { + if x != nil { + return x.TxRx } - return 0 + return nil } -func (x *FlowSizeWeightPairsCustom) GetWeight() float32 { - if x != nil && x.Weight != nil { - return *x.Weight +func (x *Flow) GetPacket() []*FlowHeader { + if x != nil { + return x.Packet } - return 0 + return nil } -// The rate of packet transmission -type FlowRate struct { +func (x *Flow) GetEgressPacket() []*FlowHeader { + if x != nil { + return x.EgressPacket + } + return nil +} + +func (x *Flow) GetSize() *FlowSize { + if x != nil { + return x.Size + } + return nil +} + +func (x *Flow) GetRate() *FlowRate { + if x != nil { + return x.Rate + } + return nil +} + +func (x *Flow) GetDuration() *FlowDuration { + if x != nil { + return x.Duration + } + return nil +} + +func (x *Flow) GetMetrics() *FlowMetrics { + if x != nil { + return x.Metrics + } + return nil +} + +func (x *Flow) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +// A container for different types of transmit and receive +// endpoint containers. +type FlowTxRx struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The available types of flow rate. - // default = Choice.Enum.pps - Choice *FlowRate_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRate_Choice_Enum,oneof" json:"choice,omitempty"` - // Packets per second. - // default = 1000 - Pps *uint64 `protobuf:"varint,2,opt,name=pps,proto3,oneof" json:"pps,omitempty"` - // Bits per second. - // default = 1000000000 - Bps *uint64 `protobuf:"varint,3,opt,name=bps,proto3,oneof" json:"bps,omitempty"` - // Kilobits per second. - // default = 1000000 - Kbps *uint64 `protobuf:"varint,4,opt,name=kbps,proto3,oneof" json:"kbps,omitempty"` - // Megabits per second. - // default = 1000 - Mbps *uint64 `protobuf:"varint,5,opt,name=mbps,proto3,oneof" json:"mbps,omitempty"` - // Gigabits per second. - // default = 1 - Gbps *uint32 `protobuf:"varint,6,opt,name=gbps,proto3,oneof" json:"gbps,omitempty"` - // The percentage of a port location's available bandwidth. - // default = 100 - Percentage *float32 `protobuf:"fixed32,7,opt,name=percentage,proto3,oneof" json:"percentage,omitempty"` + // The type of transmit and receive container used by the flow. + // default = Choice.Enum.port + Choice *FlowTxRx_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowTxRx_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Port *FlowPort `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` + // Description missing in models + Device *FlowRouter `protobuf:"bytes,3,opt,name=device,proto3" json:"device,omitempty"` } -func (x *FlowRate) Reset() { - *x = FlowRate{} +func (x *FlowTxRx) Reset() { + *x = FlowTxRx{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[285] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47068,13 +49353,13 @@ func (x *FlowRate) Reset() { } } -func (x *FlowRate) String() string { +func (x *FlowTxRx) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRate) ProtoMessage() {} +func (*FlowTxRx) ProtoMessage() {} -func (x *FlowRate) ProtoReflect() protoreflect.Message { +func (x *FlowTxRx) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[285] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47086,81 +49371,84 @@ func (x *FlowRate) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRate.ProtoReflect.Descriptor instead. -func (*FlowRate) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowTxRx.ProtoReflect.Descriptor instead. +func (*FlowTxRx) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{285} } -func (x *FlowRate) GetChoice() FlowRate_Choice_Enum { +func (x *FlowTxRx) GetChoice() FlowTxRx_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return FlowRate_Choice_unspecified -} - -func (x *FlowRate) GetPps() uint64 { - if x != nil && x.Pps != nil { - return *x.Pps - } - return 0 + return FlowTxRx_Choice_unspecified } -func (x *FlowRate) GetBps() uint64 { - if x != nil && x.Bps != nil { - return *x.Bps +func (x *FlowTxRx) GetPort() *FlowPort { + if x != nil { + return x.Port } - return 0 + return nil } -func (x *FlowRate) GetKbps() uint64 { - if x != nil && x.Kbps != nil { - return *x.Kbps +func (x *FlowTxRx) GetDevice() *FlowRouter { + if x != nil { + return x.Device } - return 0 + return nil } -func (x *FlowRate) GetMbps() uint64 { - if x != nil && x.Mbps != nil { - return *x.Mbps - } - return 0 -} - -func (x *FlowRate) GetGbps() uint32 { - if x != nil && x.Gbps != nil { - return *x.Gbps - } - return 0 -} - -func (x *FlowRate) GetPercentage() float32 { - if x != nil && x.Percentage != nil { - return *x.Percentage - } - return 0 -} - -// A container for different transmit durations. -type FlowDuration struct { +// A container for a transmit port and 0..n intended receive ports. +// When assigning this container to a flow the flows's +// packet headers will not be populated with any address resolution +// information such as source and/or destination addresses. +// For example Flow.Ethernet dst mac address values will be defaulted to 0. +// For full control over the Flow.properties.packet header contents use this +// container. +type FlowPort struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A choice used to determine the type of duration. - // default = Choice.Enum.continuous - Choice *FlowDuration_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowDuration_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - FixedPackets *FlowFixedPackets `protobuf:"bytes,2,opt,name=fixed_packets,json=fixedPackets,proto3" json:"fixed_packets,omitempty"` - // Description missing in models - FixedSeconds *FlowFixedSeconds `protobuf:"bytes,3,opt,name=fixed_seconds,json=fixedSeconds,proto3" json:"fixed_seconds,omitempty"` - // Description missing in models - Burst *FlowBurst `protobuf:"bytes,4,opt,name=burst,proto3" json:"burst,omitempty"` - // Description missing in models - Continuous *FlowContinuous `protobuf:"bytes,5,opt,name=continuous,proto3" json:"continuous,omitempty"` + // The unique name of a port that is the transmit port. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Lag/properties/name + // + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Lag/properties/name + // + // required = true + TxName *string `protobuf:"bytes,1,opt,name=tx_name,json=txName,proto3,oneof" json:"tx_name,omitempty"` + // Deprecated: This property is deprecated in favor of property rx_names + // + // Deprecated: This property is deprecated in favor of property rx_names + // + // The unique name of a port that is the intended receive port. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Lag/properties/name + // + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Lag/properties/name + RxName *string `protobuf:"bytes,2,opt,name=rx_name,json=rxName,proto3,oneof" json:"rx_name,omitempty"` + // Unique name of ports or lags that are intended receive endpoints. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Lag/properties/name + // + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Lag/properties/name + RxNames []string `protobuf:"bytes,3,rep,name=rx_names,json=rxNames,proto3" json:"rx_names,omitempty"` } -func (x *FlowDuration) Reset() { - *x = FlowDuration{} +func (x *FlowPort) Reset() { + *x = FlowPort{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[286] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47168,13 +49456,13 @@ func (x *FlowDuration) Reset() { } } -func (x *FlowDuration) String() string { +func (x *FlowPort) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowDuration) ProtoMessage() {} +func (*FlowPort) ProtoMessage() {} -func (x *FlowDuration) ProtoReflect() protoreflect.Message { +func (x *FlowPort) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[286] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47186,61 +49474,146 @@ func (x *FlowDuration) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowDuration.ProtoReflect.Descriptor instead. -func (*FlowDuration) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowPort.ProtoReflect.Descriptor instead. +func (*FlowPort) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{286} } -func (x *FlowDuration) GetChoice() FlowDuration_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return FlowDuration_Choice_unspecified -} - -func (x *FlowDuration) GetFixedPackets() *FlowFixedPackets { - if x != nil { - return x.FixedPackets - } - return nil -} - -func (x *FlowDuration) GetFixedSeconds() *FlowFixedSeconds { - if x != nil { - return x.FixedSeconds +func (x *FlowPort) GetTxName() string { + if x != nil && x.TxName != nil { + return *x.TxName } - return nil + return "" } -func (x *FlowDuration) GetBurst() *FlowBurst { - if x != nil { - return x.Burst +func (x *FlowPort) GetRxName() string { + if x != nil && x.RxName != nil { + return *x.RxName } - return nil + return "" } -func (x *FlowDuration) GetContinuous() *FlowContinuous { +func (x *FlowPort) GetRxNames() []string { if x != nil { - return x.Continuous + return x.RxNames } return nil } -// Transmit will be continuous and will not stop automatically. -type FlowContinuous struct { +// A container for declaring a map of 1..n transmit devices to 1..n receive devices. +// This allows for a single flow to have different tx to rx device flows such as a +// single one to one map or a many to many map. +type FlowRouter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The minimum gap between packets expressed as bytes. - // default = 12 - Gap *uint32 `protobuf:"varint,1,opt,name=gap,proto3,oneof" json:"gap,omitempty"` - // Description missing in models - Delay *FlowDelay `protobuf:"bytes,2,opt,name=delay,proto3" json:"delay,omitempty"` + // Determines the intent of creating traffic sub-flow(s) between the device + // endpoints, from the entities of tx_names to the entities of rx_names + // + // to derive how auto packet fields can be populated with + // the actual value(s) by the implementation. + // + // The one_to_one mode creates traffic sub-flow(s) between each device endpoint + // pair in + // tx_names to rx_names by index. + // The length of tx_names and rx_names MUST be the same. + // The same device name can be repeated multiple times in tx_names or rx_names, in any + // order to create desired meshing between device(s). + // For 2 values in tx_names and 2 values in rx_names, 2 device endpoint pairs would + // be generated (each pair representing a traffic sub-flow). + // + // The mesh mode creates traffic sub-flow(s) between each value in tx_names to + // every value in rx_names, forming the device endpoint pair(s). + // For 2 values in tx_names and 3 values in rx_names, generated device endpoint pairs + // would be 2x3=6. + // + // A generated device endpoint pair with same device endpoint name for both transmit + // & receive device endpoint MUST raise an error. + // + // Packet fields of type auto would be populated with one value for each device + // endpoint pair (representing the traffic sub-flow). + // The value would be determined considering transmit & receive device of the sub-flow. + // And the sequence of the populated value(s) + // would be in the order of generated device endpoint pair(s). + // If 2 device endpoint pairs are generated (based on mode, tx_names and rx_names), + // say (d1 to d3) and (d2 to d3), and ethernet.dst is set as auto, then + // the auto field would be replaced by the implementation with a sequence of + // 2 values, [v1,v2] where + // v1 is determined using context (d1,d3) and v2 using context (d2,d3). + // The final outcome is that packets generated on the wire will contain the values v1,v2,v1,... + // for ethernet.dst field. Any non-auto packet fields + // should be configured accordingly. For example, non-auto packet field ethernet.src + // can be configured with values [u1, u2], where + // u1 & u2 are source MAC of the connected interface of device d1 and d2 respectively. + // Then packets on the wire will contain correct value pairs + // (u1,v1),(u2,v2),(u1,v1),... for (ethernet.src,ethernet.dst) fields. + // default = Mode.Enum.mesh + Mode *FlowRouter_Mode_Enum `protobuf:"varint,1,opt,name=mode,proto3,enum=otg.FlowRouter_Mode_Enum,oneof" json:"mode,omitempty"` + // TBD + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Bgp.V4RouteRange/properties/name + // - /components/schemas/Bgp.V6RouteRange/properties/name + // - /components/schemas/Bgp.CMacIpRange/properties/name + // - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name + // - /components/schemas/Isis.V4RouteRange/properties/name + // - /components/schemas/Isis.V6RouteRange/properties/name + // - /components/schemas/Ospfv2.V4RouteRange/properties/name + // - /components/schemas/Device.Dhcpv4client/properties/name + // - /components/schemas/Device.Dhcpv6client/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Bgp.V4RouteRange/properties/name + // - /components/schemas/Bgp.V6RouteRange/properties/name + // - /components/schemas/Bgp.CMacIpRange/properties/name + // - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name + // - /components/schemas/Isis.V4RouteRange/properties/name + // - /components/schemas/Isis.V6RouteRange/properties/name + // - /components/schemas/Ospfv2.V4RouteRange/properties/name + // - /components/schemas/Device.Dhcpv4client/properties/name + // - /components/schemas/Device.Dhcpv6client/properties/name + TxNames []string `protobuf:"bytes,2,rep,name=tx_names,json=txNames,proto3" json:"tx_names,omitempty"` + // TBD + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Bgp.V4RouteRange/properties/name + // - /components/schemas/Bgp.V6RouteRange/properties/name + // - /components/schemas/Bgp.CMacIpRange/properties/name + // - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name + // - /components/schemas/Isis.V4RouteRange/properties/name + // - /components/schemas/Isis.V6RouteRange/properties/name + // - /components/schemas/Device.Dhcpv4client/properties/name + // - /components/schemas/Ospfv2.V4RouteRange/properties/name + // - /components/schemas/Device.Dhcpv6client/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Bgp.V4RouteRange/properties/name + // - /components/schemas/Bgp.V6RouteRange/properties/name + // - /components/schemas/Bgp.CMacIpRange/properties/name + // - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name + // - /components/schemas/Isis.V4RouteRange/properties/name + // - /components/schemas/Isis.V6RouteRange/properties/name + // - /components/schemas/Device.Dhcpv4client/properties/name + // - /components/schemas/Ospfv2.V4RouteRange/properties/name + // - /components/schemas/Device.Dhcpv6client/properties/name + RxNames []string `protobuf:"bytes,3,rep,name=rx_names,json=rxNames,proto3" json:"rx_names,omitempty"` } -func (x *FlowContinuous) Reset() { - *x = FlowContinuous{} +func (x *FlowRouter) Reset() { + *x = FlowRouter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[287] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47248,13 +49621,13 @@ func (x *FlowContinuous) Reset() { } } -func (x *FlowContinuous) String() string { +func (x *FlowRouter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowContinuous) ProtoMessage() {} +func (*FlowRouter) ProtoMessage() {} -func (x *FlowContinuous) ProtoReflect() protoreflect.Message { +func (x *FlowRouter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[287] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47266,51 +49639,88 @@ func (x *FlowContinuous) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowContinuous.ProtoReflect.Descriptor instead. -func (*FlowContinuous) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowRouter.ProtoReflect.Descriptor instead. +func (*FlowRouter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{287} } -func (x *FlowContinuous) GetGap() uint32 { - if x != nil && x.Gap != nil { - return *x.Gap +func (x *FlowRouter) GetMode() FlowRouter_Mode_Enum { + if x != nil && x.Mode != nil { + return *x.Mode } - return 0 + return FlowRouter_Mode_unspecified } -func (x *FlowContinuous) GetDelay() *FlowDelay { +func (x *FlowRouter) GetTxNames() []string { if x != nil { - return x.Delay + return x.TxNames } return nil } -// The optional container to specify the delay before starting -// transmission of packets. -type FlowDelay struct { +func (x *FlowRouter) GetRxNames() []string { + if x != nil { + return x.RxNames + } + return nil +} + +// Configuration for all traffic packet headers +type FlowHeader struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The available types of flow headers. If one is not provided the + // default ethernet packet header MUST be provided. + // default = Choice.Enum.ethernet + Choice *FlowHeader_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowHeader_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = Choice.Enum.bytes - Choice *FlowDelay_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowDelay_Choice_Enum,oneof" json:"choice,omitempty"` - // The delay before starting transmission of packets. - // A value of 0 indicates no delay. - // default = 0 - Bytes *float32 `protobuf:"fixed32,2,opt,name=bytes,proto3,oneof" json:"bytes,omitempty"` - // The delay before starting transmission of packets. - // A value of 0 indicates no delay. - // default = 0 - Nanoseconds *float32 `protobuf:"fixed32,3,opt,name=nanoseconds,proto3,oneof" json:"nanoseconds,omitempty"` - // The delay before starting transmission of packets. - // A value of 0 indicates no delay. - // default = 0 - Microseconds *float32 `protobuf:"fixed32,4,opt,name=microseconds,proto3,oneof" json:"microseconds,omitempty"` + Custom *FlowCustom `protobuf:"bytes,2,opt,name=custom,proto3" json:"custom,omitempty"` + // Description missing in models + Ethernet *FlowEthernet `protobuf:"bytes,3,opt,name=ethernet,proto3" json:"ethernet,omitempty"` + // Description missing in models + Vlan *FlowVlan `protobuf:"bytes,4,opt,name=vlan,proto3" json:"vlan,omitempty"` + // Description missing in models + Vxlan *FlowVxlan `protobuf:"bytes,5,opt,name=vxlan,proto3" json:"vxlan,omitempty"` + // Description missing in models + Ipv4 *FlowIpv4 `protobuf:"bytes,6,opt,name=ipv4,proto3" json:"ipv4,omitempty"` + // Description missing in models + Ipv6 *FlowIpv6 `protobuf:"bytes,7,opt,name=ipv6,proto3" json:"ipv6,omitempty"` + // Description missing in models + Pfcpause *FlowPfcPause `protobuf:"bytes,8,opt,name=pfcpause,proto3" json:"pfcpause,omitempty"` + // Description missing in models + Ethernetpause *FlowEthernetPause `protobuf:"bytes,9,opt,name=ethernetpause,proto3" json:"ethernetpause,omitempty"` + // Description missing in models + Tcp *FlowTcp `protobuf:"bytes,10,opt,name=tcp,proto3" json:"tcp,omitempty"` + // Description missing in models + Udp *FlowUdp `protobuf:"bytes,11,opt,name=udp,proto3" json:"udp,omitempty"` + // Description missing in models + Gre *FlowGre `protobuf:"bytes,12,opt,name=gre,proto3" json:"gre,omitempty"` + // Description missing in models + Gtpv1 *FlowGtpv1 `protobuf:"bytes,13,opt,name=gtpv1,proto3" json:"gtpv1,omitempty"` + // Description missing in models + Gtpv2 *FlowGtpv2 `protobuf:"bytes,14,opt,name=gtpv2,proto3" json:"gtpv2,omitempty"` + // Description missing in models + Arp *FlowArp `protobuf:"bytes,15,opt,name=arp,proto3" json:"arp,omitempty"` + // Description missing in models + Icmp *FlowIcmp `protobuf:"bytes,16,opt,name=icmp,proto3" json:"icmp,omitempty"` + // Description missing in models + Icmpv6 *FlowIcmpv6 `protobuf:"bytes,17,opt,name=icmpv6,proto3" json:"icmpv6,omitempty"` + // Description missing in models + Ppp *FlowPpp `protobuf:"bytes,18,opt,name=ppp,proto3" json:"ppp,omitempty"` + // Description missing in models + Igmpv1 *FlowIgmpv1 `protobuf:"bytes,19,opt,name=igmpv1,proto3" json:"igmpv1,omitempty"` + // Description missing in models + Mpls *FlowMpls `protobuf:"bytes,20,opt,name=mpls,proto3" json:"mpls,omitempty"` + // Description missing in models + Snmpv2C *FlowSnmpv2C `protobuf:"bytes,21,opt,name=snmpv2c,proto3" json:"snmpv2c,omitempty"` + // Description missing in models + Rsvp *FlowRsvp `protobuf:"bytes,22,opt,name=rsvp,proto3" json:"rsvp,omitempty"` } -func (x *FlowDelay) Reset() { - *x = FlowDelay{} +func (x *FlowHeader) Reset() { + *x = FlowHeader{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[288] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47318,13 +49728,13 @@ func (x *FlowDelay) Reset() { } } -func (x *FlowDelay) String() string { +func (x *FlowHeader) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowDelay) ProtoMessage() {} +func (*FlowHeader) ProtoMessage() {} -func (x *FlowDelay) ProtoReflect() protoreflect.Message { +func (x *FlowHeader) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[288] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47336,57 +49746,184 @@ func (x *FlowDelay) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowDelay.ProtoReflect.Descriptor instead. -func (*FlowDelay) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowHeader.ProtoReflect.Descriptor instead. +func (*FlowHeader) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{288} } -func (x *FlowDelay) GetChoice() FlowDelay_Choice_Enum { +func (x *FlowHeader) GetChoice() FlowHeader_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return FlowDelay_Choice_unspecified + return FlowHeader_Choice_unspecified } -func (x *FlowDelay) GetBytes() float32 { - if x != nil && x.Bytes != nil { - return *x.Bytes +func (x *FlowHeader) GetCustom() *FlowCustom { + if x != nil { + return x.Custom } - return 0 + return nil } -func (x *FlowDelay) GetNanoseconds() float32 { - if x != nil && x.Nanoseconds != nil { - return *x.Nanoseconds +func (x *FlowHeader) GetEthernet() *FlowEthernet { + if x != nil { + return x.Ethernet } - return 0 + return nil } -func (x *FlowDelay) GetMicroseconds() float32 { - if x != nil && x.Microseconds != nil { - return *x.Microseconds +func (x *FlowHeader) GetVlan() *FlowVlan { + if x != nil { + return x.Vlan } - return 0 + return nil } -// Transmit a fixed number of packets after which the flow will stop. -type FlowFixedPackets struct { +func (x *FlowHeader) GetVxlan() *FlowVxlan { + if x != nil { + return x.Vxlan + } + return nil +} + +func (x *FlowHeader) GetIpv4() *FlowIpv4 { + if x != nil { + return x.Ipv4 + } + return nil +} + +func (x *FlowHeader) GetIpv6() *FlowIpv6 { + if x != nil { + return x.Ipv6 + } + return nil +} + +func (x *FlowHeader) GetPfcpause() *FlowPfcPause { + if x != nil { + return x.Pfcpause + } + return nil +} + +func (x *FlowHeader) GetEthernetpause() *FlowEthernetPause { + if x != nil { + return x.Ethernetpause + } + return nil +} + +func (x *FlowHeader) GetTcp() *FlowTcp { + if x != nil { + return x.Tcp + } + return nil +} + +func (x *FlowHeader) GetUdp() *FlowUdp { + if x != nil { + return x.Udp + } + return nil +} + +func (x *FlowHeader) GetGre() *FlowGre { + if x != nil { + return x.Gre + } + return nil +} + +func (x *FlowHeader) GetGtpv1() *FlowGtpv1 { + if x != nil { + return x.Gtpv1 + } + return nil +} + +func (x *FlowHeader) GetGtpv2() *FlowGtpv2 { + if x != nil { + return x.Gtpv2 + } + return nil +} + +func (x *FlowHeader) GetArp() *FlowArp { + if x != nil { + return x.Arp + } + return nil +} + +func (x *FlowHeader) GetIcmp() *FlowIcmp { + if x != nil { + return x.Icmp + } + return nil +} + +func (x *FlowHeader) GetIcmpv6() *FlowIcmpv6 { + if x != nil { + return x.Icmpv6 + } + return nil +} + +func (x *FlowHeader) GetPpp() *FlowPpp { + if x != nil { + return x.Ppp + } + return nil +} + +func (x *FlowHeader) GetIgmpv1() *FlowIgmpv1 { + if x != nil { + return x.Igmpv1 + } + return nil +} + +func (x *FlowHeader) GetMpls() *FlowMpls { + if x != nil { + return x.Mpls + } + return nil +} + +func (x *FlowHeader) GetSnmpv2C() *FlowSnmpv2C { + if x != nil { + return x.Snmpv2C + } + return nil +} + +func (x *FlowHeader) GetRsvp() *FlowRsvp { + if x != nil { + return x.Rsvp + } + return nil +} + +// Custom packet header +type FlowCustom struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Stop transmit of the flow after this number of packets. - // default = 1 - Packets *uint32 `protobuf:"varint,1,opt,name=packets,proto3,oneof" json:"packets,omitempty"` - // The minimum gap between packets expressed as bytes. - // default = 12 - Gap *uint32 `protobuf:"varint,2,opt,name=gap,proto3,oneof" json:"gap,omitempty"` - // Description missing in models - Delay *FlowDelay `protobuf:"bytes,3,opt,name=delay,proto3" json:"delay,omitempty"` + // A custom packet header defined as a string of hex bytes. The string MUST contain + // sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be + // discarded. This packet header can be used in multiple places in the packet. + // required = true + Bytes *string `protobuf:"bytes,1,opt,name=bytes,proto3,oneof" json:"bytes,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits + // in a corresponding header field for metrics per each applicable value. + // These would appear as tagged metrics in corresponding flow metrics. + MetricTags []*FlowCustomMetricTag `protobuf:"bytes,2,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *FlowFixedPackets) Reset() { - *x = FlowFixedPackets{} +func (x *FlowCustom) Reset() { + *x = FlowCustom{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[289] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47394,13 +49931,13 @@ func (x *FlowFixedPackets) Reset() { } } -func (x *FlowFixedPackets) String() string { +func (x *FlowCustom) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowFixedPackets) ProtoMessage() {} +func (*FlowCustom) ProtoMessage() {} -func (x *FlowFixedPackets) ProtoReflect() protoreflect.Message { +func (x *FlowCustom) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[289] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47412,50 +49949,48 @@ func (x *FlowFixedPackets) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowFixedPackets.ProtoReflect.Descriptor instead. -func (*FlowFixedPackets) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowCustom.ProtoReflect.Descriptor instead. +func (*FlowCustom) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{289} } -func (x *FlowFixedPackets) GetPackets() uint32 { - if x != nil && x.Packets != nil { - return *x.Packets - } - return 0 -} - -func (x *FlowFixedPackets) GetGap() uint32 { - if x != nil && x.Gap != nil { - return *x.Gap +func (x *FlowCustom) GetBytes() string { + if x != nil && x.Bytes != nil { + return *x.Bytes } - return 0 + return "" } -func (x *FlowFixedPackets) GetDelay() *FlowDelay { +func (x *FlowCustom) GetMetricTags() []*FlowCustomMetricTag { if x != nil { - return x.Delay + return x.MetricTags } return nil } -// Transmit for a fixed number of seconds after which the flow will stop. -type FlowFixedSeconds struct { +// Metric Tag can be used to enable tracking portion of or all bits +// in a corresponding header field for metrics per each applicable value. +// These would appear as tagged metrics in corresponding flow metrics. +type FlowCustomMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Stop transmit of the flow after this number of seconds. + // Name used to identify the metrics associated with the values applicable + // for configured offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset + // of corresponding header field // default = 1 - Seconds *float32 `protobuf:"fixed32,1,opt,name=seconds,proto3,oneof" json:"seconds,omitempty"` - // The minimum gap between packets expressed as bytes. - // default = 12 - Gap *uint32 `protobuf:"varint,2,opt,name=gap,proto3,oneof" json:"gap,omitempty"` - // Description missing in models - Delay *FlowDelay `protobuf:"bytes,3,opt,name=delay,proto3" json:"delay,omitempty"` + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *FlowFixedSeconds) Reset() { - *x = FlowFixedSeconds{} +func (x *FlowCustomMetricTag) Reset() { + *x = FlowCustomMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[290] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47463,13 +49998,13 @@ func (x *FlowFixedSeconds) Reset() { } } -func (x *FlowFixedSeconds) String() string { +func (x *FlowCustomMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowFixedSeconds) ProtoMessage() {} +func (*FlowCustomMetricTag) ProtoMessage() {} -func (x *FlowFixedSeconds) ProtoReflect() protoreflect.Message { +func (x *FlowCustomMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[290] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47481,56 +50016,50 @@ func (x *FlowFixedSeconds) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowFixedSeconds.ProtoReflect.Descriptor instead. -func (*FlowFixedSeconds) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowCustomMetricTag.ProtoReflect.Descriptor instead. +func (*FlowCustomMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{290} } -func (x *FlowFixedSeconds) GetSeconds() float32 { - if x != nil && x.Seconds != nil { - return *x.Seconds +func (x *FlowCustomMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return 0 + return "" } -func (x *FlowFixedSeconds) GetGap() uint32 { - if x != nil && x.Gap != nil { - return *x.Gap +func (x *FlowCustomMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *FlowFixedSeconds) GetDelay() *FlowDelay { - if x != nil { - return x.Delay +func (x *FlowCustomMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } - return nil + return 0 } -// Transmits continuous or fixed burst of packets. -// For continuous burst of packets, it will not automatically stop. -// For fixed burst of packets, it will stop after transmitting fixed number of bursts. -type FlowBurst struct { +// Ethernet packet header +type FlowEthernet struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The number of packet bursts transmitted per flow. - // A value of 0 implies continuous burst of packets. - // default = 0 - Bursts *uint32 `protobuf:"varint,1,opt,name=bursts,proto3,oneof" json:"bursts,omitempty"` - // The number of packets transmitted per burst. - // default = 1 - Packets *uint32 `protobuf:"varint,2,opt,name=packets,proto3,oneof" json:"packets,omitempty"` - // The minimum gap between packets expressed as bytes. - // default = 12 - Gap *uint32 `protobuf:"varint,3,opt,name=gap,proto3,oneof" json:"gap,omitempty"` // Description missing in models - InterBurstGap *FlowDurationInterBurstGap `protobuf:"bytes,4,opt,name=inter_burst_gap,json=interBurstGap,proto3" json:"inter_burst_gap,omitempty"` + Dst *PatternFlowEthernetDst `protobuf:"bytes,1,opt,name=dst,proto3" json:"dst,omitempty"` + // Description missing in models + Src *PatternFlowEthernetSrc `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"` + // Description missing in models + EtherType *PatternFlowEthernetEtherType `protobuf:"bytes,3,opt,name=ether_type,json=etherType,proto3" json:"ether_type,omitempty"` + // Description missing in models + PfcQueue *PatternFlowEthernetPfcQueue `protobuf:"bytes,4,opt,name=pfc_queue,json=pfcQueue,proto3" json:"pfc_queue,omitempty"` } -func (x *FlowBurst) Reset() { - *x = FlowBurst{} +func (x *FlowEthernet) Reset() { + *x = FlowEthernet{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[291] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47538,13 +50067,13 @@ func (x *FlowBurst) Reset() { } } -func (x *FlowBurst) String() string { +func (x *FlowEthernet) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowBurst) ProtoMessage() {} +func (*FlowEthernet) ProtoMessage() {} -func (x *FlowBurst) ProtoReflect() protoreflect.Message { +func (x *FlowEthernet) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[291] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47556,64 +50085,57 @@ func (x *FlowBurst) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowBurst.ProtoReflect.Descriptor instead. -func (*FlowBurst) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowEthernet.ProtoReflect.Descriptor instead. +func (*FlowEthernet) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{291} } -func (x *FlowBurst) GetBursts() uint32 { - if x != nil && x.Bursts != nil { - return *x.Bursts +func (x *FlowEthernet) GetDst() *PatternFlowEthernetDst { + if x != nil { + return x.Dst } - return 0 + return nil } -func (x *FlowBurst) GetPackets() uint32 { - if x != nil && x.Packets != nil { - return *x.Packets +func (x *FlowEthernet) GetSrc() *PatternFlowEthernetSrc { + if x != nil { + return x.Src } - return 0 + return nil } -func (x *FlowBurst) GetGap() uint32 { - if x != nil && x.Gap != nil { - return *x.Gap +func (x *FlowEthernet) GetEtherType() *PatternFlowEthernetEtherType { + if x != nil { + return x.EtherType } - return 0 + return nil } -func (x *FlowBurst) GetInterBurstGap() *FlowDurationInterBurstGap { +func (x *FlowEthernet) GetPfcQueue() *PatternFlowEthernetPfcQueue { if x != nil { - return x.InterBurstGap + return x.PfcQueue } return nil } -// The optional container for specifying a gap between bursts. -type FlowDurationInterBurstGap struct { +// VLAN packet header +type FlowVlan struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The type of inter burst gap units. - // default = Choice.Enum.bytes - Choice *FlowDurationInterBurstGap_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowDurationInterBurstGap_Choice_Enum,oneof" json:"choice,omitempty"` - // The amount of time between bursts expressed in bytes. - // A value of 0 indicates no gap between bursts. - // default = 12 - Bytes *float64 `protobuf:"fixed64,2,opt,name=bytes,proto3,oneof" json:"bytes,omitempty"` - // The amount of time between bursts expressed in nanoseconds. - // A value of 0 indicates no gap between bursts. - // default = 96 - Nanoseconds *float64 `protobuf:"fixed64,3,opt,name=nanoseconds,proto3,oneof" json:"nanoseconds,omitempty"` - // The amount of time between bursts expressed in microseconds. - // A value of 0 indicates no gap between bursts. - // default = 0.096 - Microseconds *float64 `protobuf:"fixed64,4,opt,name=microseconds,proto3,oneof" json:"microseconds,omitempty"` + // Description missing in models + Priority *PatternFlowVlanPriority `protobuf:"bytes,1,opt,name=priority,proto3" json:"priority,omitempty"` + // Description missing in models + Cfi *PatternFlowVlanCfi `protobuf:"bytes,2,opt,name=cfi,proto3" json:"cfi,omitempty"` + // Description missing in models + Id *PatternFlowVlanId `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + // Description missing in models + Tpid *PatternFlowVlanTpid `protobuf:"bytes,4,opt,name=tpid,proto3" json:"tpid,omitempty"` } -func (x *FlowDurationInterBurstGap) Reset() { - *x = FlowDurationInterBurstGap{} +func (x *FlowVlan) Reset() { + *x = FlowVlan{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[292] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47621,13 +50143,13 @@ func (x *FlowDurationInterBurstGap) Reset() { } } -func (x *FlowDurationInterBurstGap) String() string { +func (x *FlowVlan) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowDurationInterBurstGap) ProtoMessage() {} +func (*FlowVlan) ProtoMessage() {} -func (x *FlowDurationInterBurstGap) ProtoReflect() protoreflect.Message { +func (x *FlowVlan) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[292] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47639,66 +50161,57 @@ func (x *FlowDurationInterBurstGap) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowDurationInterBurstGap.ProtoReflect.Descriptor instead. -func (*FlowDurationInterBurstGap) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowVlan.ProtoReflect.Descriptor instead. +func (*FlowVlan) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{292} } -func (x *FlowDurationInterBurstGap) GetChoice() FlowDurationInterBurstGap_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowVlan) GetPriority() *PatternFlowVlanPriority { + if x != nil { + return x.Priority } - return FlowDurationInterBurstGap_Choice_unspecified + return nil } -func (x *FlowDurationInterBurstGap) GetBytes() float64 { - if x != nil && x.Bytes != nil { - return *x.Bytes +func (x *FlowVlan) GetCfi() *PatternFlowVlanCfi { + if x != nil { + return x.Cfi } - return 0 + return nil } -func (x *FlowDurationInterBurstGap) GetNanoseconds() float64 { - if x != nil && x.Nanoseconds != nil { - return *x.Nanoseconds +func (x *FlowVlan) GetId() *PatternFlowVlanId { + if x != nil { + return x.Id } - return 0 + return nil } -func (x *FlowDurationInterBurstGap) GetMicroseconds() float64 { - if x != nil && x.Microseconds != nil { - return *x.Microseconds +func (x *FlowVlan) GetTpid() *PatternFlowVlanTpid { + if x != nil { + return x.Tpid } - return 0 + return nil } -// The optional container for configuring flow metrics. -type FlowMetrics struct { +// VXLAN packet header +type FlowVxlan struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Enables flow metrics. - // Enabling this option may affect the resultant packet payload due to - // additional instrumentation data. - // default = False - Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"` - // Enables additional flow metric loss calculation. - // default = False - Loss *bool `protobuf:"varint,2,opt,name=loss,proto3,oneof" json:"loss,omitempty"` - // Rx Tx ratio. - RxTxRatio *FlowRxTxRatio `protobuf:"bytes,6,opt,name=rx_tx_ratio,json=rxTxRatio,proto3" json:"rx_tx_ratio,omitempty"` - // Enables additional flow metric first and last timestamps. - // default = False - Timestamps *bool `protobuf:"varint,3,opt,name=timestamps,proto3,oneof" json:"timestamps,omitempty"` - // Latency metrics. - Latency *FlowLatencyMetrics `protobuf:"bytes,4,opt,name=latency,proto3" json:"latency,omitempty"` - // Predefined metric tags - PredefinedMetricTags *FlowPredefinedTags `protobuf:"bytes,5,opt,name=predefined_metric_tags,json=predefinedMetricTags,proto3" json:"predefined_metric_tags,omitempty"` + // Description missing in models + Flags *PatternFlowVxlanFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + // Description missing in models + Reserved0 *PatternFlowVxlanReserved0 `protobuf:"bytes,2,opt,name=reserved0,proto3" json:"reserved0,omitempty"` + // Description missing in models + Vni *PatternFlowVxlanVni `protobuf:"bytes,3,opt,name=vni,proto3" json:"vni,omitempty"` + // Description missing in models + Reserved1 *PatternFlowVxlanReserved1 `protobuf:"bytes,4,opt,name=reserved1,proto3" json:"reserved1,omitempty"` } -func (x *FlowMetrics) Reset() { - *x = FlowMetrics{} +func (x *FlowVxlan) Reset() { + *x = FlowVxlan{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[293] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47706,13 +50219,13 @@ func (x *FlowMetrics) Reset() { } } -func (x *FlowMetrics) String() string { +func (x *FlowVxlan) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowMetrics) ProtoMessage() {} +func (*FlowVxlan) ProtoMessage() {} -func (x *FlowMetrics) ProtoReflect() protoreflect.Message { +func (x *FlowVxlan) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[293] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47724,84 +50237,79 @@ func (x *FlowMetrics) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowMetrics.ProtoReflect.Descriptor instead. -func (*FlowMetrics) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowVxlan.ProtoReflect.Descriptor instead. +func (*FlowVxlan) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{293} } -func (x *FlowMetrics) GetEnable() bool { - if x != nil && x.Enable != nil { - return *x.Enable - } - return false -} - -func (x *FlowMetrics) GetLoss() bool { - if x != nil && x.Loss != nil { - return *x.Loss - } - return false -} - -func (x *FlowMetrics) GetRxTxRatio() *FlowRxTxRatio { +func (x *FlowVxlan) GetFlags() *PatternFlowVxlanFlags { if x != nil { - return x.RxTxRatio + return x.Flags } return nil } -func (x *FlowMetrics) GetTimestamps() bool { - if x != nil && x.Timestamps != nil { - return *x.Timestamps +func (x *FlowVxlan) GetReserved0() *PatternFlowVxlanReserved0 { + if x != nil { + return x.Reserved0 } - return false + return nil } -func (x *FlowMetrics) GetLatency() *FlowLatencyMetrics { +func (x *FlowVxlan) GetVni() *PatternFlowVxlanVni { if x != nil { - return x.Latency + return x.Vni } return nil } -func (x *FlowMetrics) GetPredefinedMetricTags() *FlowPredefinedTags { +func (x *FlowVxlan) GetReserved1() *PatternFlowVxlanReserved1 { if x != nil { - return x.PredefinedMetricTags + return x.Reserved1 } return nil } -// The optional container for per flow latency metric configuration. -type FlowLatencyMetrics struct { +// IPv4 packet header +type FlowIpv4 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // True to enable latency metrics using timestamps. - // - // Enabling this option may affect the resultant packet payload due to - // additional instrumentation data. - // default = False - Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"` - // Select the type of latency measurement. The different types of - // latency measurements are: - // - // store_forward: - // The time interval starting when the last bit of the frame leaves the - // sending port and ending when the first bit of the frame is seen on - // the receiving port (LIFO). This is based on the RFC 1242 standard. - // - // cut_through: - // The time interval starting when the first bit of the frame leaves - // the sending port and ending when the first bit of the frame is seen - // on the receiving port (FIFO). This is based on the RFC 1242 - // standard. - // default = Mode.Enum.store_forward - Mode *FlowLatencyMetrics_Mode_Enum `protobuf:"varint,2,opt,name=mode,proto3,enum=otg.FlowLatencyMetrics_Mode_Enum,oneof" json:"mode,omitempty"` + // Description missing in models + Version *PatternFlowIpv4Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Description missing in models + HeaderLength *PatternFlowIpv4HeaderLength `protobuf:"bytes,2,opt,name=header_length,json=headerLength,proto3" json:"header_length,omitempty"` + // Description missing in models + Priority *FlowIpv4Priority `protobuf:"bytes,3,opt,name=priority,proto3" json:"priority,omitempty"` + // Description missing in models + TotalLength *PatternFlowIpv4TotalLength `protobuf:"bytes,4,opt,name=total_length,json=totalLength,proto3" json:"total_length,omitempty"` + // Description missing in models + Identification *PatternFlowIpv4Identification `protobuf:"bytes,5,opt,name=identification,proto3" json:"identification,omitempty"` + // Description missing in models + Reserved *PatternFlowIpv4Reserved `protobuf:"bytes,6,opt,name=reserved,proto3" json:"reserved,omitempty"` + // Description missing in models + DontFragment *PatternFlowIpv4DontFragment `protobuf:"bytes,7,opt,name=dont_fragment,json=dontFragment,proto3" json:"dont_fragment,omitempty"` + // Description missing in models + MoreFragments *PatternFlowIpv4MoreFragments `protobuf:"bytes,8,opt,name=more_fragments,json=moreFragments,proto3" json:"more_fragments,omitempty"` + // Description missing in models + FragmentOffset *PatternFlowIpv4FragmentOffset `protobuf:"bytes,9,opt,name=fragment_offset,json=fragmentOffset,proto3" json:"fragment_offset,omitempty"` + // Description missing in models + TimeToLive *PatternFlowIpv4TimeToLive `protobuf:"bytes,10,opt,name=time_to_live,json=timeToLive,proto3" json:"time_to_live,omitempty"` + // Description missing in models + Protocol *PatternFlowIpv4Protocol `protobuf:"bytes,11,opt,name=protocol,proto3" json:"protocol,omitempty"` + // Description missing in models + HeaderChecksum *PatternFlowIpv4HeaderChecksum `protobuf:"bytes,12,opt,name=header_checksum,json=headerChecksum,proto3" json:"header_checksum,omitempty"` + // Description missing in models + Src *PatternFlowIpv4Src `protobuf:"bytes,13,opt,name=src,proto3" json:"src,omitempty"` + // Description missing in models + Dst *PatternFlowIpv4Dst `protobuf:"bytes,14,opt,name=dst,proto3" json:"dst,omitempty"` + // Description missing in models + Options []*FlowIpv4Options `protobuf:"bytes,15,rep,name=options,proto3" json:"options,omitempty"` } -func (x *FlowLatencyMetrics) Reset() { - *x = FlowLatencyMetrics{} +func (x *FlowIpv4) Reset() { + *x = FlowIpv4{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[294] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47809,13 +50317,13 @@ func (x *FlowLatencyMetrics) Reset() { } } -func (x *FlowLatencyMetrics) String() string { +func (x *FlowIpv4) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowLatencyMetrics) ProtoMessage() {} +func (*FlowIpv4) ProtoMessage() {} -func (x *FlowLatencyMetrics) ProtoReflect() protoreflect.Message { +func (x *FlowIpv4) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[294] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47827,189 +50335,156 @@ func (x *FlowLatencyMetrics) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowLatencyMetrics.ProtoReflect.Descriptor instead. -func (*FlowLatencyMetrics) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowIpv4.ProtoReflect.Descriptor instead. +func (*FlowIpv4) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{294} } -func (x *FlowLatencyMetrics) GetEnable() bool { - if x != nil && x.Enable != nil { - return *x.Enable +func (x *FlowIpv4) GetVersion() *PatternFlowIpv4Version { + if x != nil { + return x.Version } - return false + return nil } -func (x *FlowLatencyMetrics) GetMode() FlowLatencyMetrics_Mode_Enum { - if x != nil && x.Mode != nil { - return *x.Mode +func (x *FlowIpv4) GetHeaderLength() *PatternFlowIpv4HeaderLength { + if x != nil { + return x.HeaderLength } - return FlowLatencyMetrics_Mode_unspecified + return nil } -// List of predefined flow tracking options, outside packet fields, that can be enabled. -type FlowPredefinedTags struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Enables Rx port or lag level disaggregation with predefined metrics tag name set - // as rx_name. - // The Rx port / lag names can be found under tagged_metrics tag names in flow metrics - // response. - // default = False - RxName *bool `protobuf:"varint,1,opt,name=rx_name,json=rxName,proto3,oneof" json:"rx_name,omitempty"` +func (x *FlowIpv4) GetPriority() *FlowIpv4Priority { + if x != nil { + return x.Priority + } + return nil } -func (x *FlowPredefinedTags) Reset() { - *x = FlowPredefinedTags{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[295] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowIpv4) GetTotalLength() *PatternFlowIpv4TotalLength { + if x != nil { + return x.TotalLength } + return nil } -func (x *FlowPredefinedTags) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *FlowIpv4) GetIdentification() *PatternFlowIpv4Identification { + if x != nil { + return x.Identification + } + return nil } -func (*FlowPredefinedTags) ProtoMessage() {} - -func (x *FlowPredefinedTags) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[295] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *FlowIpv4) GetReserved() *PatternFlowIpv4Reserved { + if x != nil { + return x.Reserved } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowPredefinedTags.ProtoReflect.Descriptor instead. -func (*FlowPredefinedTags) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{295} +func (x *FlowIpv4) GetDontFragment() *PatternFlowIpv4DontFragment { + if x != nil { + return x.DontFragment + } + return nil } -func (x *FlowPredefinedTags) GetRxName() bool { - if x != nil && x.RxName != nil { - return *x.RxName +func (x *FlowIpv4) GetMoreFragments() *PatternFlowIpv4MoreFragments { + if x != nil { + return x.MoreFragments } - return false + return nil } -// Rx Tx ratio is the ratio of expected number of Rx packets across all Rx ports to -// the Tx packets -// for the configured flow. It is a factor by which the Tx packet count is multiplied -// to calculate -// the sum of expected Rx packet count, across all Rx ports. This will be used to calculate -// loss -// percentage of flow at aggregate level. -type FlowRxTxRatio struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = Choice.Enum.value - Choice *FlowRxTxRatio_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRxTxRatio_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - RxCount *FlowRxTxRatioRxCount `protobuf:"bytes,2,opt,name=rx_count,json=rxCount,proto3" json:"rx_count,omitempty"` - // Should be a positive, non-zero value. The default value of 1, is when the Rx packet - // count across - // all ports is expected to match the Tx packet count. A custom integer value (>1) can - // be specified for - // loss calculation for cases when there are multiple destination addresses configured - // within one flow, - // but DUT is configured to replicate only to a subset of Rx ports. For cases when Tx - // side generates two - // packets from each source in 1:1 protection mode but only one of the two packets are - // received by the - // Rx port, we may need to specify a fractional value instead. - // default = 1.0 - Value *float32 `protobuf:"fixed32,3,opt,name=value,proto3,oneof" json:"value,omitempty"` +func (x *FlowIpv4) GetFragmentOffset() *PatternFlowIpv4FragmentOffset { + if x != nil { + return x.FragmentOffset + } + return nil } -func (x *FlowRxTxRatio) Reset() { - *x = FlowRxTxRatio{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[296] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowIpv4) GetTimeToLive() *PatternFlowIpv4TimeToLive { + if x != nil { + return x.TimeToLive } + return nil } -func (x *FlowRxTxRatio) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *FlowIpv4) GetProtocol() *PatternFlowIpv4Protocol { + if x != nil { + return x.Protocol + } + return nil } -func (*FlowRxTxRatio) ProtoMessage() {} - -func (x *FlowRxTxRatio) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[296] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *FlowIpv4) GetHeaderChecksum() *PatternFlowIpv4HeaderChecksum { + if x != nil { + return x.HeaderChecksum } - return mi.MessageOf(x) -} - -// Deprecated: Use FlowRxTxRatio.ProtoReflect.Descriptor instead. -func (*FlowRxTxRatio) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{296} + return nil } -func (x *FlowRxTxRatio) GetChoice() FlowRxTxRatio_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowIpv4) GetSrc() *PatternFlowIpv4Src { + if x != nil { + return x.Src } - return FlowRxTxRatio_Choice_unspecified + return nil } -func (x *FlowRxTxRatio) GetRxCount() *FlowRxTxRatioRxCount { +func (x *FlowIpv4) GetDst() *PatternFlowIpv4Dst { if x != nil { - return x.RxCount + return x.Dst } return nil } -func (x *FlowRxTxRatio) GetValue() float32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *FlowIpv4) GetOptions() []*FlowIpv4Options { + if x != nil { + return x.Options } - return 0 + return nil } -// This is for cases where one copy of Tx packet is received on all Rx ports and so -// the sum total of Rx packets -// received across all Rx ports is a multiple of Rx port count and Tx packets. -type FlowRxTxRatioRxCount struct { +// IPv4 options are optional extensions for the IPv4 header that can be utilised to +// provide additional information about the IPv4 datagram. It is encoded as a series +// of type, length and value attributes. The IP header length MUST be increased to +// accommodate the extra bytes needed to encode the IP options. The length of the all +// options included to a IPv4 header should not exceed 40 bytes since IPv4 Header length +// (4 bits) can at max specify 15 4-word octets for a total of 60 bytes which includes +// 20 bytes needed for mandatory attributes of the IPv4 header. If the user adds multiples +// IPv4 options that exceeds 40 bytes and specify header length as auto, implementation +// should throw error. Currently IP options supported are: 1. router_alert option allows +// devices to intercept packets not addressed to them directly as defined in RFC2113. +// 2. custom option is provided to configure user defined IP options as needed. +type FlowIpv4Options struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.router_alert + Choice *FlowIpv4Options_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowIpv4Options_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Custom *FlowIpv4OptionsCustom `protobuf:"bytes,2,opt,name=custom,proto3" json:"custom,omitempty"` } -func (x *FlowRxTxRatioRxCount) Reset() { - *x = FlowRxTxRatioRxCount{} +func (x *FlowIpv4Options) Reset() { + *x = FlowIpv4Options{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[297] + mi := &file_otg_proto_msgTypes[295] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRxTxRatioRxCount) String() string { +func (x *FlowIpv4Options) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRxTxRatioRxCount) ProtoMessage() {} +func (*FlowIpv4Options) ProtoMessage() {} -func (x *FlowRxTxRatioRxCount) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[297] +func (x *FlowIpv4Options) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[295] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -48020,47 +50495,60 @@ func (x *FlowRxTxRatioRxCount) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRxTxRatioRxCount.ProtoReflect.Descriptor instead. -func (*FlowRxTxRatioRxCount) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{297} +// Deprecated: Use FlowIpv4Options.ProtoReflect.Descriptor instead. +func (*FlowIpv4Options) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{295} } -// The optional container for event configuration. -type Event struct { +func (x *FlowIpv4Options) GetChoice() FlowIpv4Options_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return FlowIpv4Options_Choice_unspecified +} + +func (x *FlowIpv4Options) GetCustom() *FlowIpv4OptionsCustom { + if x != nil { + return x.Custom + } + return nil +} + +// User defined IP options to be appended to the IPv4 header. +type FlowIpv4OptionsCustom struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // True to enable all events. - // Enabling this option may affect the resultant packet payload due to - // additional instrumentation data. - // default = False - Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"` - // Description missing in models - Link *EventLink `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` // Description missing in models - RxRateThreshold *EventRxRateThreshold `protobuf:"bytes,3,opt,name=rx_rate_threshold,json=rxRateThreshold,proto3" json:"rx_rate_threshold,omitempty"` + Type *FlowIpv4OptionsCustomType `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Description missing in models - RouteAdvertiseWithdraw *EventRouteAdvertiseWithdraw `protobuf:"bytes,4,opt,name=route_advertise_withdraw,json=routeAdvertiseWithdraw,proto3" json:"route_advertise_withdraw,omitempty"` + Length *FlowIpv4OptionsCustomLength `protobuf:"bytes,2,opt,name=length,proto3" json:"length,omitempty"` + // Value of the option field should not excced 38 bytes since maximum 40 bytes can be + // added as options in IPv4 header. For type and length requires 2 bytes, hence maximum + // of 38 bytes are expected. Maximum length of this attribute is 76 (38 * 2 hex character + // per byte). + // default = 0000 + Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *Event) Reset() { - *x = Event{} +func (x *FlowIpv4OptionsCustom) Reset() { + *x = FlowIpv4OptionsCustom{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[298] + mi := &file_otg_proto_msgTypes[296] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Event) String() string { +func (x *FlowIpv4OptionsCustom) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Event) ProtoMessage() {} +func (*FlowIpv4OptionsCustom) ProtoMessage() {} -func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[298] +func (x *FlowIpv4OptionsCustom) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[296] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -48071,73 +50559,63 @@ func (x *Event) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Event.ProtoReflect.Descriptor instead. -func (*Event) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{298} -} - -func (x *Event) GetEnable() bool { - if x != nil && x.Enable != nil { - return *x.Enable - } - return false +// Deprecated: Use FlowIpv4OptionsCustom.ProtoReflect.Descriptor instead. +func (*FlowIpv4OptionsCustom) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{296} } -func (x *Event) GetLink() *EventLink { +func (x *FlowIpv4OptionsCustom) GetType() *FlowIpv4OptionsCustomType { if x != nil { - return x.Link + return x.Type } return nil } -func (x *Event) GetRxRateThreshold() *EventRxRateThreshold { +func (x *FlowIpv4OptionsCustom) GetLength() *FlowIpv4OptionsCustomLength { if x != nil { - return x.RxRateThreshold + return x.Length } return nil } -func (x *Event) GetRouteAdvertiseWithdraw() *EventRouteAdvertiseWithdraw { - if x != nil { - return x.RouteAdvertiseWithdraw +func (x *FlowIpv4OptionsCustom) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } - return nil + return "" } -// The optional container for rx rate threshold event configuration. -type EventRxRateThreshold struct { +// Type options for custom options. +type FlowIpv4OptionsCustomType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // True to enable the rx_rate_threshold event. - // Enabling this option may affect the resultant packet payload due to - // additional instrumentation data. - // default = False - Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"` - // True to enable notifications when the rx rate of a flow passes above - // or below the threshold value. - // default = 95 - Threshold *float32 `protobuf:"fixed32,2,opt,name=threshold,proto3,oneof" json:"threshold,omitempty"` + // Description missing in models + CopiedFlag *PatternFlowIpv4OptionsCustomTypeCopiedFlag `protobuf:"bytes,1,opt,name=copied_flag,json=copiedFlag,proto3" json:"copied_flag,omitempty"` + // Description missing in models + OptionClass *PatternFlowIpv4OptionsCustomTypeOptionClass `protobuf:"bytes,2,opt,name=option_class,json=optionClass,proto3" json:"option_class,omitempty"` + // Description missing in models + OptionNumber *PatternFlowIpv4OptionsCustomTypeOptionNumber `protobuf:"bytes,3,opt,name=option_number,json=optionNumber,proto3" json:"option_number,omitempty"` } -func (x *EventRxRateThreshold) Reset() { - *x = EventRxRateThreshold{} +func (x *FlowIpv4OptionsCustomType) Reset() { + *x = FlowIpv4OptionsCustomType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[299] + mi := &file_otg_proto_msgTypes[297] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EventRxRateThreshold) String() string { +func (x *FlowIpv4OptionsCustomType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EventRxRateThreshold) ProtoMessage() {} +func (*FlowIpv4OptionsCustomType) ProtoMessage() {} -func (x *EventRxRateThreshold) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[299] +func (x *FlowIpv4OptionsCustomType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[297] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -48148,53 +50626,67 @@ func (x *EventRxRateThreshold) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EventRxRateThreshold.ProtoReflect.Descriptor instead. -func (*EventRxRateThreshold) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{299} +// Deprecated: Use FlowIpv4OptionsCustomType.ProtoReflect.Descriptor instead. +func (*FlowIpv4OptionsCustomType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{297} } -func (x *EventRxRateThreshold) GetEnable() bool { - if x != nil && x.Enable != nil { - return *x.Enable +func (x *FlowIpv4OptionsCustomType) GetCopiedFlag() *PatternFlowIpv4OptionsCustomTypeCopiedFlag { + if x != nil { + return x.CopiedFlag } - return false + return nil } -func (x *EventRxRateThreshold) GetThreshold() float32 { - if x != nil && x.Threshold != nil { - return *x.Threshold +func (x *FlowIpv4OptionsCustomType) GetOptionClass() *PatternFlowIpv4OptionsCustomTypeOptionClass { + if x != nil { + return x.OptionClass } - return 0 + return nil } -// The optional container for link up/down event configuration. -type EventLink struct { +func (x *FlowIpv4OptionsCustomType) GetOptionNumber() *PatternFlowIpv4OptionsCustomTypeOptionNumber { + if x != nil { + return x.OptionNumber + } + return nil +} + +// Length for custom options. +type FlowIpv4OptionsCustomLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // True to enable notifications when a link up/down event occurs. - // default = False - Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"` + // auto or configured value. + // default = Choice.Enum.auto + Choice *FlowIpv4OptionsCustomLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowIpv4OptionsCustomLength_Choice_Enum,oneof" json:"choice,omitempty"` + // The OTG implementation can provide a system generated value for this property. If + // the OTG is unable to generate a value the default value must be used. + // default = 0 + Auto *uint32 `protobuf:"varint,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *EventLink) Reset() { - *x = EventLink{} +func (x *FlowIpv4OptionsCustomLength) Reset() { + *x = FlowIpv4OptionsCustomLength{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[300] + mi := &file_otg_proto_msgTypes[298] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EventLink) String() string { +func (x *FlowIpv4OptionsCustomLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EventLink) ProtoMessage() {} +func (*FlowIpv4OptionsCustomLength) ProtoMessage() {} -func (x *EventLink) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[300] +func (x *FlowIpv4OptionsCustomLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[298] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -48205,110 +50697,66 @@ func (x *EventLink) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EventLink.ProtoReflect.Descriptor instead. -func (*EventLink) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{300} -} - -func (x *EventLink) GetEnable() bool { - if x != nil && x.Enable != nil { - return *x.Enable - } - return false -} - -// The optional container for route advertise/withdraw event configuration. -type EventRouteAdvertiseWithdraw struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // True to enable notifications when a route advertise/withdraw - // event occurs. - // default = False - Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"` +// Deprecated: Use FlowIpv4OptionsCustomLength.ProtoReflect.Descriptor instead. +func (*FlowIpv4OptionsCustomLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{298} } -func (x *EventRouteAdvertiseWithdraw) Reset() { - *x = EventRouteAdvertiseWithdraw{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[301] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowIpv4OptionsCustomLength) GetChoice() FlowIpv4OptionsCustomLength_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } + return FlowIpv4OptionsCustomLength_Choice_unspecified } -func (x *EventRouteAdvertiseWithdraw) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventRouteAdvertiseWithdraw) ProtoMessage() {} - -func (x *EventRouteAdvertiseWithdraw) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[301] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *FlowIpv4OptionsCustomLength) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto } - return mi.MessageOf(x) -} - -// Deprecated: Use EventRouteAdvertiseWithdraw.ProtoReflect.Descriptor instead. -func (*EventRouteAdvertiseWithdraw) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{301} + return 0 } -func (x *EventRouteAdvertiseWithdraw) GetEnable() bool { - if x != nil && x.Enable != nil { - return *x.Enable +func (x *FlowIpv4OptionsCustomLength) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } - return false + return 0 } -// Description missing in models -type EventRequest struct { +// A container for ipv4 raw, tos, dscp ip priorities. +type FlowIpv4Priority struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Constrain the events being returned by specifying event types. - // If the list is empty then all event types will be returned. - Type []EventRequest_Type_Enum `protobuf:"varint,1,rep,packed,name=type,proto3,enum=otg.EventRequest_Type_Enum" json:"type,omitempty"` - // Constrain the events being returned by specifying event sources. - // If the list is empty then all event sources will be returned. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Bgp.V4RouteRange/name - // - /components/schemas/Bgp.V6RouteRange/name - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Bgp.V4RouteRange/name - // - /components/schemas/Bgp.V6RouteRange/name - Source []string `protobuf:"bytes,2,rep,name=source,proto3" json:"source,omitempty"` + // Description missing in models + // default = Choice.Enum.dscp + Choice *FlowIpv4Priority_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowIpv4Priority_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Raw *PatternFlowIpv4PriorityRaw `protobuf:"bytes,2,opt,name=raw,proto3" json:"raw,omitempty"` + // Description missing in models + Tos *FlowIpv4Tos `protobuf:"bytes,3,opt,name=tos,proto3" json:"tos,omitempty"` + // Description missing in models + Dscp *FlowIpv4Dscp `protobuf:"bytes,4,opt,name=dscp,proto3" json:"dscp,omitempty"` } -func (x *EventRequest) Reset() { - *x = EventRequest{} +func (x *FlowIpv4Priority) Reset() { + *x = FlowIpv4Priority{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[302] + mi := &file_otg_proto_msgTypes[299] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EventRequest) String() string { +func (x *FlowIpv4Priority) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EventRequest) ProtoMessage() {} +func (*FlowIpv4Priority) ProtoMessage() {} -func (x *EventRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[302] +func (x *FlowIpv4Priority) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[299] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -48319,58 +50767,68 @@ func (x *EventRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EventRequest.ProtoReflect.Descriptor instead. -func (*EventRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{302} +// Deprecated: Use FlowIpv4Priority.ProtoReflect.Descriptor instead. +func (*FlowIpv4Priority) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{299} } -func (x *EventRequest) GetType() []EventRequest_Type_Enum { +func (x *FlowIpv4Priority) GetChoice() FlowIpv4Priority_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return FlowIpv4Priority_Choice_unspecified +} + +func (x *FlowIpv4Priority) GetRaw() *PatternFlowIpv4PriorityRaw { if x != nil { - return x.Type + return x.Raw } return nil } -func (x *EventRequest) GetSource() []string { +func (x *FlowIpv4Priority) GetTos() *FlowIpv4Tos { if x != nil { - return x.Source + return x.Tos } return nil } -// A container that describes what events a system should provide and -// optionally where to publish them. -type EventSubscription struct { +func (x *FlowIpv4Priority) GetDscp() *FlowIpv4Dscp { + if x != nil { + return x.Dscp + } + return nil +} + +// Differentiated services code point (DSCP) packet field. +type FlowIpv4Dscp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - Events *EventRequest `protobuf:"bytes,1,opt,name=events,proto3" json:"events,omitempty"` - // Indicates where a client wants to be notified of the events set in - // the events property. - // If this property is empty or null then no event notifications will - // be forwarded. - CallbackUrl *string `protobuf:"bytes,2,opt,name=callback_url,json=callbackUrl,proto3,oneof" json:"callback_url,omitempty"` + Phb *PatternFlowIpv4DscpPhb `protobuf:"bytes,1,opt,name=phb,proto3" json:"phb,omitempty"` + // Description missing in models + Ecn *PatternFlowIpv4DscpEcn `protobuf:"bytes,2,opt,name=ecn,proto3" json:"ecn,omitempty"` } -func (x *EventSubscription) Reset() { - *x = EventSubscription{} +func (x *FlowIpv4Dscp) Reset() { + *x = FlowIpv4Dscp{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[303] + mi := &file_otg_proto_msgTypes[300] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EventSubscription) String() string { +func (x *FlowIpv4Dscp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EventSubscription) ProtoMessage() {} +func (*FlowIpv4Dscp) ProtoMessage() {} -func (x *EventSubscription) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[303] +func (x *FlowIpv4Dscp) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[300] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -48381,77 +50839,62 @@ func (x *EventSubscription) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EventSubscription.ProtoReflect.Descriptor instead. -func (*EventSubscription) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{303} +// Deprecated: Use FlowIpv4Dscp.ProtoReflect.Descriptor instead. +func (*FlowIpv4Dscp) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{300} } -func (x *EventSubscription) GetEvents() *EventRequest { +func (x *FlowIpv4Dscp) GetPhb() *PatternFlowIpv4DscpPhb { if x != nil { - return x.Events + return x.Phb } return nil } -func (x *EventSubscription) GetCallbackUrl() string { - if x != nil && x.CallbackUrl != nil { - return *x.CallbackUrl +func (x *FlowIpv4Dscp) GetEcn() *PatternFlowIpv4DscpEcn { + if x != nil { + return x.Ecn } - return "" + return nil } -// Configuration of LLDP protocol IEEE Ref: https://www.ieee802.org/1/files/public/docs2002/lldp-protocol-00.pdf -type Lldp struct { +// Type of service (TOS) packet field. +type FlowIpv4Tos struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The unique name of the object on which LLDP is running. - // required = true - Connection *LldpConnection `protobuf:"bytes,1,opt,name=connection,proto3" json:"connection,omitempty"` - // The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint - // identifier associated with the transmitting LLDP agent. If mac address is specified - // it should be in colon seperated mac address format. - ChassisId *LldpChassisId `protobuf:"bytes,2,opt,name=chassis_id,json=chassisId,proto3" json:"chassis_id,omitempty"` - // The Port ID is a mandatory TLV which identifies the port component of the endpoint - // identifier associated with the transmitting LLDP agent. If the specified port is - // an IEEE 802.3 Repeater port, then this TLV is optional. - PortId *LldpPortId `protobuf:"bytes,3,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - // The system name field shall contain an alpha-numeric string that indicates the system's - // administratively assigned name. The system name should be the system's fully qualified - // domain name. If implementations support IETF RFC 3418, the sysName object should - // be used for this field. - SystemName *LldpSystemName `protobuf:"bytes,4,opt,name=system_name,json=systemName,proto3" json:"system_name,omitempty"` - // Specifies the amount of time in seconds a receiving device should maintain LLDP information - // sent by the device before discarding it. - // default = 120 - HoldTime *uint32 `protobuf:"varint,5,opt,name=hold_time,json=holdTime,proto3,oneof" json:"hold_time,omitempty"` - // Set the transmission frequency of LLDP updates in seconds. - // default = 30 - AdvertisementInterval *uint32 `protobuf:"varint,6,opt,name=advertisement_interval,json=advertisementInterval,proto3,oneof" json:"advertisement_interval,omitempty"` - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - Name *string `protobuf:"bytes,7,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Description missing in models + Precedence *PatternFlowIpv4TosPrecedence `protobuf:"bytes,1,opt,name=precedence,proto3" json:"precedence,omitempty"` + // Description missing in models + Delay *PatternFlowIpv4TosDelay `protobuf:"bytes,2,opt,name=delay,proto3" json:"delay,omitempty"` + // Description missing in models + Throughput *PatternFlowIpv4TosThroughput `protobuf:"bytes,3,opt,name=throughput,proto3" json:"throughput,omitempty"` + // Description missing in models + Reliability *PatternFlowIpv4TosReliability `protobuf:"bytes,4,opt,name=reliability,proto3" json:"reliability,omitempty"` + // Description missing in models + Monetary *PatternFlowIpv4TosMonetary `protobuf:"bytes,5,opt,name=monetary,proto3" json:"monetary,omitempty"` + // Description missing in models + Unused *PatternFlowIpv4TosUnused `protobuf:"bytes,6,opt,name=unused,proto3" json:"unused,omitempty"` } -func (x *Lldp) Reset() { - *x = Lldp{} +func (x *FlowIpv4Tos) Reset() { + *x = FlowIpv4Tos{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[304] + mi := &file_otg_proto_msgTypes[301] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Lldp) String() string { +func (x *FlowIpv4Tos) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Lldp) ProtoMessage() {} +func (*FlowIpv4Tos) ProtoMessage() {} -func (x *Lldp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[304] +func (x *FlowIpv4Tos) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[301] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -48462,96 +50905,84 @@ func (x *Lldp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Lldp.ProtoReflect.Descriptor instead. -func (*Lldp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{304} +// Deprecated: Use FlowIpv4Tos.ProtoReflect.Descriptor instead. +func (*FlowIpv4Tos) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{301} } -func (x *Lldp) GetConnection() *LldpConnection { +func (x *FlowIpv4Tos) GetPrecedence() *PatternFlowIpv4TosPrecedence { if x != nil { - return x.Connection + return x.Precedence } return nil } -func (x *Lldp) GetChassisId() *LldpChassisId { +func (x *FlowIpv4Tos) GetDelay() *PatternFlowIpv4TosDelay { if x != nil { - return x.ChassisId + return x.Delay } return nil } -func (x *Lldp) GetPortId() *LldpPortId { +func (x *FlowIpv4Tos) GetThroughput() *PatternFlowIpv4TosThroughput { if x != nil { - return x.PortId + return x.Throughput } return nil } -func (x *Lldp) GetSystemName() *LldpSystemName { +func (x *FlowIpv4Tos) GetReliability() *PatternFlowIpv4TosReliability { if x != nil { - return x.SystemName + return x.Reliability } return nil } -func (x *Lldp) GetHoldTime() uint32 { - if x != nil && x.HoldTime != nil { - return *x.HoldTime - } - return 0 -} - -func (x *Lldp) GetAdvertisementInterval() uint32 { - if x != nil && x.AdvertisementInterval != nil { - return *x.AdvertisementInterval +func (x *FlowIpv4Tos) GetMonetary() *PatternFlowIpv4TosMonetary { + if x != nil { + return x.Monetary } - return 0 + return nil } -func (x *Lldp) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *FlowIpv4Tos) GetUnused() *PatternFlowIpv4TosUnused { + if x != nil { + return x.Unused } - return "" + return nil } -// LLDP connection to a test port. In future if more connection options arise LLDP -// connection object will be enhanced. -type LldpConnection struct { +// The OTG implementation can provide a system generated, value for this property. +type FlowIpv4Auto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the test port or other connection objects on which LLDP is configured. - Choice *LldpConnection_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.LldpConnection_Choice_Enum,oneof" json:"choice,omitempty"` - // Name of the test port on which LLDP is configured on. - // - // x-constraint: - // - /components/schemas/Port/properties/name + // The method to be used to provide the system generated value. // - // x-constraint: - // - /components/schemas/Port/properties/name - PortName *string `protobuf:"bytes,2,opt,name=port_name,json=portName,proto3,oneof" json:"port_name,omitempty"` + // The dhcp option populates the field based on the dynamic IPv4 address that has been + // assigned to the DHCPv4 client by a DHCPv4 server. + // required = true + Choice *FlowIpv4Auto_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowIpv4Auto_Choice_Enum,oneof" json:"choice,omitempty"` } -func (x *LldpConnection) Reset() { - *x = LldpConnection{} +func (x *FlowIpv4Auto) Reset() { + *x = FlowIpv4Auto{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[305] + mi := &file_otg_proto_msgTypes[302] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LldpConnection) String() string { +func (x *FlowIpv4Auto) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpConnection) ProtoMessage() {} +func (*FlowIpv4Auto) ProtoMessage() {} -func (x *LldpConnection) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[305] +func (x *FlowIpv4Auto) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[302] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -48562,62 +50993,59 @@ func (x *LldpConnection) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpConnection.ProtoReflect.Descriptor instead. -func (*LldpConnection) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{305} +// Deprecated: Use FlowIpv4Auto.ProtoReflect.Descriptor instead. +func (*FlowIpv4Auto) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{302} } -func (x *LldpConnection) GetChoice() LldpConnection_Choice_Enum { +func (x *FlowIpv4Auto) GetChoice() FlowIpv4Auto_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return LldpConnection_Choice_unspecified -} - -func (x *LldpConnection) GetPortName() string { - if x != nil && x.PortName != nil { - return *x.PortName - } - return "" + return FlowIpv4Auto_Choice_unspecified } -// The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint -// identifier associated with the transmitting LLDP agent. This field identifies the -// format and source of the chassis identifier string. It is based on the enumerator -// defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. -type LldpChassisId struct { +// IPv6 packet header +type FlowIpv6 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Chassis ID subtype to be used in Chassis ID TLV. - // default = Choice.Enum.mac_address_subtype - Choice *LldpChassisId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.LldpChassisId_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - MacAddressSubtype *LldpChassisMacSubType `protobuf:"bytes,2,opt,name=mac_address_subtype,json=macAddressSubtype,proto3" json:"mac_address_subtype,omitempty"` - // Name of an interface of the chassis that uniquely identifies the chassis. - InterfaceNameSubtype *string `protobuf:"bytes,3,opt,name=interface_name_subtype,json=interfaceNameSubtype,proto3,oneof" json:"interface_name_subtype,omitempty"` - // Locally assigned name of the chassis. - LocalSubtype *string `protobuf:"bytes,4,opt,name=local_subtype,json=localSubtype,proto3,oneof" json:"local_subtype,omitempty"` + Version *PatternFlowIpv6Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Description missing in models + TrafficClass *PatternFlowIpv6TrafficClass `protobuf:"bytes,2,opt,name=traffic_class,json=trafficClass,proto3" json:"traffic_class,omitempty"` + // Description missing in models + FlowLabel *PatternFlowIpv6FlowLabel `protobuf:"bytes,3,opt,name=flow_label,json=flowLabel,proto3" json:"flow_label,omitempty"` + // Description missing in models + PayloadLength *PatternFlowIpv6PayloadLength `protobuf:"bytes,4,opt,name=payload_length,json=payloadLength,proto3" json:"payload_length,omitempty"` + // Description missing in models + NextHeader *PatternFlowIpv6NextHeader `protobuf:"bytes,5,opt,name=next_header,json=nextHeader,proto3" json:"next_header,omitempty"` + // Description missing in models + HopLimit *PatternFlowIpv6HopLimit `protobuf:"bytes,6,opt,name=hop_limit,json=hopLimit,proto3" json:"hop_limit,omitempty"` + // Description missing in models + Src *PatternFlowIpv6Src `protobuf:"bytes,7,opt,name=src,proto3" json:"src,omitempty"` + // Description missing in models + Dst *PatternFlowIpv6Dst `protobuf:"bytes,8,opt,name=dst,proto3" json:"dst,omitempty"` } -func (x *LldpChassisId) Reset() { - *x = LldpChassisId{} +func (x *FlowIpv6) Reset() { + *x = FlowIpv6{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[306] + mi := &file_otg_proto_msgTypes[303] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LldpChassisId) String() string { +func (x *FlowIpv6) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpChassisId) ProtoMessage() {} +func (*FlowIpv6) ProtoMessage() {} -func (x *LldpChassisId) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[306] +func (x *FlowIpv6) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[303] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -48628,152 +51056,98 @@ func (x *LldpChassisId) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpChassisId.ProtoReflect.Descriptor instead. -func (*LldpChassisId) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{306} -} - -func (x *LldpChassisId) GetChoice() LldpChassisId_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return LldpChassisId_Choice_unspecified +// Deprecated: Use FlowIpv6.ProtoReflect.Descriptor instead. +func (*FlowIpv6) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{303} } -func (x *LldpChassisId) GetMacAddressSubtype() *LldpChassisMacSubType { +func (x *FlowIpv6) GetVersion() *PatternFlowIpv6Version { if x != nil { - return x.MacAddressSubtype + return x.Version } return nil } -func (x *LldpChassisId) GetInterfaceNameSubtype() string { - if x != nil && x.InterfaceNameSubtype != nil { - return *x.InterfaceNameSubtype - } - return "" -} - -func (x *LldpChassisId) GetLocalSubtype() string { - if x != nil && x.LocalSubtype != nil { - return *x.LocalSubtype +func (x *FlowIpv6) GetTrafficClass() *PatternFlowIpv6TrafficClass { + if x != nil { + return x.TrafficClass } - return "" -} - -// The Port ID is a mandatory TLV which identifies the port component of the endpoint -// identifier associated with the transmitting LLDP agent.This field identifies the -// format and source of the port identifier string. It is based on the enumerator defined -// by the PtopoPortIdType object from RFC2922. -type LldpPortId struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Port ID subtype to be used in Port ID TLV. - // default = Choice.Enum.interface_name_subtype - Choice *LldpPortId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.LldpPortId_Choice_Enum,oneof" json:"choice,omitempty"` - // The MAC Address configured in the Port ID TLV. - MacAddressSubtype *string `protobuf:"bytes,2,opt,name=mac_address_subtype,json=macAddressSubtype,proto3,oneof" json:"mac_address_subtype,omitempty"` - // Description missing in models - InterfaceNameSubtype *LldpPortInterfaceNameSubType `protobuf:"bytes,3,opt,name=interface_name_subtype,json=interfaceNameSubtype,proto3" json:"interface_name_subtype,omitempty"` - // The Locally assigned name configured in the Port ID TLV. - LocalSubtype *string `protobuf:"bytes,4,opt,name=local_subtype,json=localSubtype,proto3,oneof" json:"local_subtype,omitempty"` + return nil } -func (x *LldpPortId) Reset() { - *x = LldpPortId{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[307] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowIpv6) GetFlowLabel() *PatternFlowIpv6FlowLabel { + if x != nil { + return x.FlowLabel } + return nil } -func (x *LldpPortId) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LldpPortId) ProtoMessage() {} - -func (x *LldpPortId) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[307] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *FlowIpv6) GetPayloadLength() *PatternFlowIpv6PayloadLength { + if x != nil { + return x.PayloadLength } - return mi.MessageOf(x) -} - -// Deprecated: Use LldpPortId.ProtoReflect.Descriptor instead. -func (*LldpPortId) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{307} + return nil } -func (x *LldpPortId) GetChoice() LldpPortId_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowIpv6) GetNextHeader() *PatternFlowIpv6NextHeader { + if x != nil { + return x.NextHeader } - return LldpPortId_Choice_unspecified + return nil } -func (x *LldpPortId) GetMacAddressSubtype() string { - if x != nil && x.MacAddressSubtype != nil { - return *x.MacAddressSubtype +func (x *FlowIpv6) GetHopLimit() *PatternFlowIpv6HopLimit { + if x != nil { + return x.HopLimit } - return "" + return nil } -func (x *LldpPortId) GetInterfaceNameSubtype() *LldpPortInterfaceNameSubType { +func (x *FlowIpv6) GetSrc() *PatternFlowIpv6Src { if x != nil { - return x.InterfaceNameSubtype + return x.Src } return nil } -func (x *LldpPortId) GetLocalSubtype() string { - if x != nil && x.LocalSubtype != nil { - return *x.LocalSubtype +func (x *FlowIpv6) GetDst() *PatternFlowIpv6Dst { + if x != nil { + return x.Dst } - return "" + return nil } -// The MAC address configured in the Chassis ID TLV. -type LldpChassisMacSubType struct { +// The OTG implementation can provide a system generated, value for this property. +type FlowIpv6Auto struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // In auto mode the system generated value is set for this property, while if the choice - // is selected as value, a user configured value will be used for this property. - // default = Choice.Enum.auto - Choice *LldpChassisMacSubType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.LldpChassisMacSubType_Choice_Enum,oneof" json:"choice,omitempty"` - // The OTG implementation must provide a system generated value for this property. - Auto *string `protobuf:"bytes,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // User must specify a value if mode is not auto. - Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` + // The method to be used to provide the system generated value. + // The dhcp option populates the field based on the dynamic IPv6 address that has been + // assigned to the DHCPv6 client + // by a DHCPv6 server. + // required = true + Choice *FlowIpv6Auto_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowIpv6Auto_Choice_Enum,oneof" json:"choice,omitempty"` } -func (x *LldpChassisMacSubType) Reset() { - *x = LldpChassisMacSubType{} +func (x *FlowIpv6Auto) Reset() { + *x = FlowIpv6Auto{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[308] + mi := &file_otg_proto_msgTypes[304] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LldpChassisMacSubType) String() string { +func (x *FlowIpv6Auto) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpChassisMacSubType) ProtoMessage() {} +func (*FlowIpv6Auto) ProtoMessage() {} -func (x *LldpChassisMacSubType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[308] +func (x *FlowIpv6Auto) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[304] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -48784,65 +51158,69 @@ func (x *LldpChassisMacSubType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpChassisMacSubType.ProtoReflect.Descriptor instead. -func (*LldpChassisMacSubType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{308} +// Deprecated: Use FlowIpv6Auto.ProtoReflect.Descriptor instead. +func (*FlowIpv6Auto) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{304} } -func (x *LldpChassisMacSubType) GetChoice() LldpChassisMacSubType_Choice_Enum { +func (x *FlowIpv6Auto) GetChoice() FlowIpv6Auto_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return LldpChassisMacSubType_Choice_unspecified -} - -func (x *LldpChassisMacSubType) GetAuto() string { - if x != nil && x.Auto != nil { - return *x.Auto - } - return "" -} - -func (x *LldpChassisMacSubType) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value - } - return "" + return FlowIpv6Auto_Choice_unspecified } -// The interface name configured in the Port ID TLV. -type LldpPortInterfaceNameSubType struct { +// IEEE 802.1Qbb PFC Pause packet header. +type FlowPfcPause struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // In auto mode the system generated value is set for this property, while if the choice - // is selected as value, a user configured value will be used for this property. - // default = Choice.Enum.auto - Choice *LldpPortInterfaceNameSubType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.LldpPortInterfaceNameSubType_Choice_Enum,oneof" json:"choice,omitempty"` - // The OTG implementation must provide a system generated value for this property. - Auto *string `protobuf:"bytes,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // User must specify a value if mode is not auto. - Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + Dst *PatternFlowPfcPauseDst `protobuf:"bytes,1,opt,name=dst,proto3" json:"dst,omitempty"` + // Description missing in models + Src *PatternFlowPfcPauseSrc `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"` + // Description missing in models + EtherType *PatternFlowPfcPauseEtherType `protobuf:"bytes,3,opt,name=ether_type,json=etherType,proto3" json:"ether_type,omitempty"` + // Description missing in models + ControlOpCode *PatternFlowPfcPauseControlOpCode `protobuf:"bytes,4,opt,name=control_op_code,json=controlOpCode,proto3" json:"control_op_code,omitempty"` + // Description missing in models + ClassEnableVector *PatternFlowPfcPauseClassEnableVector `protobuf:"bytes,5,opt,name=class_enable_vector,json=classEnableVector,proto3" json:"class_enable_vector,omitempty"` + // Description missing in models + PauseClass_0 *PatternFlowPfcPausePauseClass0 `protobuf:"bytes,6,opt,name=pause_class_0,json=pauseClass0,proto3" json:"pause_class_0,omitempty"` + // Description missing in models + PauseClass_1 *PatternFlowPfcPausePauseClass1 `protobuf:"bytes,7,opt,name=pause_class_1,json=pauseClass1,proto3" json:"pause_class_1,omitempty"` + // Description missing in models + PauseClass_2 *PatternFlowPfcPausePauseClass2 `protobuf:"bytes,8,opt,name=pause_class_2,json=pauseClass2,proto3" json:"pause_class_2,omitempty"` + // Description missing in models + PauseClass_3 *PatternFlowPfcPausePauseClass3 `protobuf:"bytes,9,opt,name=pause_class_3,json=pauseClass3,proto3" json:"pause_class_3,omitempty"` + // Description missing in models + PauseClass_4 *PatternFlowPfcPausePauseClass4 `protobuf:"bytes,10,opt,name=pause_class_4,json=pauseClass4,proto3" json:"pause_class_4,omitempty"` + // Description missing in models + PauseClass_5 *PatternFlowPfcPausePauseClass5 `protobuf:"bytes,11,opt,name=pause_class_5,json=pauseClass5,proto3" json:"pause_class_5,omitempty"` + // Description missing in models + PauseClass_6 *PatternFlowPfcPausePauseClass6 `protobuf:"bytes,12,opt,name=pause_class_6,json=pauseClass6,proto3" json:"pause_class_6,omitempty"` + // Description missing in models + PauseClass_7 *PatternFlowPfcPausePauseClass7 `protobuf:"bytes,13,opt,name=pause_class_7,json=pauseClass7,proto3" json:"pause_class_7,omitempty"` } -func (x *LldpPortInterfaceNameSubType) Reset() { - *x = LldpPortInterfaceNameSubType{} +func (x *FlowPfcPause) Reset() { + *x = FlowPfcPause{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[309] + mi := &file_otg_proto_msgTypes[305] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LldpPortInterfaceNameSubType) String() string { +func (x *FlowPfcPause) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpPortInterfaceNameSubType) ProtoMessage() {} +func (*FlowPfcPause) ProtoMessage() {} -func (x *LldpPortInterfaceNameSubType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[309] +func (x *FlowPfcPause) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[305] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -48853,140 +51231,137 @@ func (x *LldpPortInterfaceNameSubType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpPortInterfaceNameSubType.ProtoReflect.Descriptor instead. -func (*LldpPortInterfaceNameSubType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{309} +// Deprecated: Use FlowPfcPause.ProtoReflect.Descriptor instead. +func (*FlowPfcPause) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{305} } -func (x *LldpPortInterfaceNameSubType) GetChoice() LldpPortInterfaceNameSubType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowPfcPause) GetDst() *PatternFlowPfcPauseDst { + if x != nil { + return x.Dst } - return LldpPortInterfaceNameSubType_Choice_unspecified + return nil } -func (x *LldpPortInterfaceNameSubType) GetAuto() string { - if x != nil && x.Auto != nil { - return *x.Auto +func (x *FlowPfcPause) GetSrc() *PatternFlowPfcPauseSrc { + if x != nil { + return x.Src } - return "" + return nil } -func (x *LldpPortInterfaceNameSubType) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value +func (x *FlowPfcPause) GetEtherType() *PatternFlowPfcPauseEtherType { + if x != nil { + return x.EtherType } - return "" + return nil } -// The system Name configured in the System Name TLV. -type LldpSystemName struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *FlowPfcPause) GetControlOpCode() *PatternFlowPfcPauseControlOpCode { + if x != nil { + return x.ControlOpCode + } + return nil +} - // In auto mode the system generated value is set for this property, while if the choice - // is selected as value, a user configured value will be used for this property. - // default = Choice.Enum.auto - Choice *LldpSystemName_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.LldpSystemName_Choice_Enum,oneof" json:"choice,omitempty"` - // The OTG implementation must provide a system generated value for this property. - Auto *string `protobuf:"bytes,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // User must specify a value if mode is not auto. - Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` +func (x *FlowPfcPause) GetClassEnableVector() *PatternFlowPfcPauseClassEnableVector { + if x != nil { + return x.ClassEnableVector + } + return nil } -func (x *LldpSystemName) Reset() { - *x = LldpSystemName{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[310] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowPfcPause) GetPauseClass_0() *PatternFlowPfcPausePauseClass0 { + if x != nil { + return x.PauseClass_0 } + return nil } -func (x *LldpSystemName) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *FlowPfcPause) GetPauseClass_1() *PatternFlowPfcPausePauseClass1 { + if x != nil { + return x.PauseClass_1 + } + return nil } -func (*LldpSystemName) ProtoMessage() {} +func (x *FlowPfcPause) GetPauseClass_2() *PatternFlowPfcPausePauseClass2 { + if x != nil { + return x.PauseClass_2 + } + return nil +} -func (x *LldpSystemName) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[310] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *FlowPfcPause) GetPauseClass_3() *PatternFlowPfcPausePauseClass3 { + if x != nil { + return x.PauseClass_3 } - return mi.MessageOf(x) + return nil } -// Deprecated: Use LldpSystemName.ProtoReflect.Descriptor instead. -func (*LldpSystemName) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{310} +func (x *FlowPfcPause) GetPauseClass_4() *PatternFlowPfcPausePauseClass4 { + if x != nil { + return x.PauseClass_4 + } + return nil } -func (x *LldpSystemName) GetChoice() LldpSystemName_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowPfcPause) GetPauseClass_5() *PatternFlowPfcPausePauseClass5 { + if x != nil { + return x.PauseClass_5 } - return LldpSystemName_Choice_unspecified + return nil } -func (x *LldpSystemName) GetAuto() string { - if x != nil && x.Auto != nil { - return *x.Auto +func (x *FlowPfcPause) GetPauseClass_6() *PatternFlowPfcPausePauseClass6 { + if x != nil { + return x.PauseClass_6 } - return "" + return nil } -func (x *LldpSystemName) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value +func (x *FlowPfcPause) GetPauseClass_7() *PatternFlowPfcPausePauseClass7 { + if x != nil { + return x.PauseClass_7 } - return "" + return nil } -// Error response generated while serving API request. -type Error struct { +// IEEE 802.3x global ethernet pause packet header +type FlowEthernetPause struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Numeric status code based on the underlying transport being used. - // The API server MUST set this code explicitly based on following references: - // - HTTP 4xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.5 - // - HTTP 5xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.6 - // - gRPC errors: https://grpc.github.io/grpc/core/md_doc_statuscodes.html - // required = true - Code *int32 `protobuf:"varint,1,opt,name=code,proto3,oneof" json:"code,omitempty"` - // Classification of error originating from within API server that may not be mapped - // to the value in `code`. - // Absence of this field may indicate that the error did not originate from within API - // server. - Kind *Error_Kind_Enum `protobuf:"varint,2,opt,name=kind,proto3,enum=otg.Error_Kind_Enum,oneof" json:"kind,omitempty"` - // List of error messages generated while executing the request. - Errors []string `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"` + // Description missing in models + Dst *PatternFlowEthernetPauseDst `protobuf:"bytes,1,opt,name=dst,proto3" json:"dst,omitempty"` + // Description missing in models + Src *PatternFlowEthernetPauseSrc `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"` + // Description missing in models + EtherType *PatternFlowEthernetPauseEtherType `protobuf:"bytes,3,opt,name=ether_type,json=etherType,proto3" json:"ether_type,omitempty"` + // Description missing in models + ControlOpCode *PatternFlowEthernetPauseControlOpCode `protobuf:"bytes,4,opt,name=control_op_code,json=controlOpCode,proto3" json:"control_op_code,omitempty"` + // Description missing in models + Time *PatternFlowEthernetPauseTime `protobuf:"bytes,5,opt,name=time,proto3" json:"time,omitempty"` } -func (x *Error) Reset() { - *x = Error{} +func (x *FlowEthernetPause) Reset() { + *x = FlowEthernetPause{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[311] + mi := &file_otg_proto_msgTypes[306] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Error) String() string { +func (x *FlowEthernetPause) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Error) ProtoMessage() {} +func (*FlowEthernetPause) ProtoMessage() {} -func (x *Error) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[311] +func (x *FlowEthernetPause) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[306] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -48997,60 +51372,103 @@ func (x *Error) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Error.ProtoReflect.Descriptor instead. -func (*Error) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{311} +// Deprecated: Use FlowEthernetPause.ProtoReflect.Descriptor instead. +func (*FlowEthernetPause) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{306} } -func (x *Error) GetCode() int32 { - if x != nil && x.Code != nil { - return *x.Code +func (x *FlowEthernetPause) GetDst() *PatternFlowEthernetPauseDst { + if x != nil { + return x.Dst } - return 0 + return nil } -func (x *Error) GetKind() Error_Kind_Enum { - if x != nil && x.Kind != nil { - return *x.Kind +func (x *FlowEthernetPause) GetSrc() *PatternFlowEthernetPauseSrc { + if x != nil { + return x.Src } - return Error_Kind_unspecified + return nil } -func (x *Error) GetErrors() []string { +func (x *FlowEthernetPause) GetEtherType() *PatternFlowEthernetPauseEtherType { if x != nil { - return x.Errors + return x.EtherType } return nil } -// A list of warnings that have occurred while executing the request. -type Warning struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *FlowEthernetPause) GetControlOpCode() *PatternFlowEthernetPauseControlOpCode { + if x != nil { + return x.ControlOpCode + } + return nil +} - // A list of any system specific warnings that have occurred while - // executing the request. - Warnings []string `protobuf:"bytes,1,rep,name=warnings,proto3" json:"warnings,omitempty"` +func (x *FlowEthernetPause) GetTime() *PatternFlowEthernetPauseTime { + if x != nil { + return x.Time + } + return nil } -func (x *Warning) Reset() { - *x = Warning{} +// TCP packet header +type FlowTcp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description missing in models + SrcPort *PatternFlowTcpSrcPort `protobuf:"bytes,1,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` + // Description missing in models + DstPort *PatternFlowTcpDstPort `protobuf:"bytes,2,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` + // Description missing in models + SeqNum *PatternFlowTcpSeqNum `protobuf:"bytes,3,opt,name=seq_num,json=seqNum,proto3" json:"seq_num,omitempty"` + // Description missing in models + AckNum *PatternFlowTcpAckNum `protobuf:"bytes,4,opt,name=ack_num,json=ackNum,proto3" json:"ack_num,omitempty"` + // Description missing in models + DataOffset *PatternFlowTcpDataOffset `protobuf:"bytes,5,opt,name=data_offset,json=dataOffset,proto3" json:"data_offset,omitempty"` + // Description missing in models + EcnNs *PatternFlowTcpEcnNs `protobuf:"bytes,6,opt,name=ecn_ns,json=ecnNs,proto3" json:"ecn_ns,omitempty"` + // Description missing in models + EcnCwr *PatternFlowTcpEcnCwr `protobuf:"bytes,7,opt,name=ecn_cwr,json=ecnCwr,proto3" json:"ecn_cwr,omitempty"` + // Description missing in models + EcnEcho *PatternFlowTcpEcnEcho `protobuf:"bytes,8,opt,name=ecn_echo,json=ecnEcho,proto3" json:"ecn_echo,omitempty"` + // Description missing in models + CtlUrg *PatternFlowTcpCtlUrg `protobuf:"bytes,9,opt,name=ctl_urg,json=ctlUrg,proto3" json:"ctl_urg,omitempty"` + // Description missing in models + CtlAck *PatternFlowTcpCtlAck `protobuf:"bytes,10,opt,name=ctl_ack,json=ctlAck,proto3" json:"ctl_ack,omitempty"` + // Description missing in models + CtlPsh *PatternFlowTcpCtlPsh `protobuf:"bytes,11,opt,name=ctl_psh,json=ctlPsh,proto3" json:"ctl_psh,omitempty"` + // Description missing in models + CtlRst *PatternFlowTcpCtlRst `protobuf:"bytes,12,opt,name=ctl_rst,json=ctlRst,proto3" json:"ctl_rst,omitempty"` + // Description missing in models + CtlSyn *PatternFlowTcpCtlSyn `protobuf:"bytes,13,opt,name=ctl_syn,json=ctlSyn,proto3" json:"ctl_syn,omitempty"` + // Description missing in models + CtlFin *PatternFlowTcpCtlFin `protobuf:"bytes,14,opt,name=ctl_fin,json=ctlFin,proto3" json:"ctl_fin,omitempty"` + // Description missing in models + Window *PatternFlowTcpWindow `protobuf:"bytes,15,opt,name=window,proto3" json:"window,omitempty"` + // Description missing in models + Checksum *PatternFlowTcpChecksum `protobuf:"bytes,16,opt,name=checksum,proto3" json:"checksum,omitempty"` +} + +func (x *FlowTcp) Reset() { + *x = FlowTcp{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[312] + mi := &file_otg_proto_msgTypes[307] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Warning) String() string { +func (x *FlowTcp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Warning) ProtoMessage() {} +func (*FlowTcp) ProtoMessage() {} -func (x *Warning) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[312] +func (x *FlowTcp) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[307] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -49061,169 +51479,156 @@ func (x *Warning) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Warning.ProtoReflect.Descriptor instead. -func (*Warning) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{312} +// Deprecated: Use FlowTcp.ProtoReflect.Descriptor instead. +func (*FlowTcp) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{307} } -func (x *Warning) GetWarnings() []string { +func (x *FlowTcp) GetSrcPort() *PatternFlowTcpSrcPort { if x != nil { - return x.Warnings + return x.SrcPort } return nil } -// Request for updating specific attributes of resources in traffic generator -type ConfigUpdate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - Choice *ConfigUpdate_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ConfigUpdate_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Flows *FlowsUpdate `protobuf:"bytes,2,opt,name=flows,proto3" json:"flows,omitempty"` +func (x *FlowTcp) GetDstPort() *PatternFlowTcpDstPort { + if x != nil { + return x.DstPort + } + return nil } -func (x *ConfigUpdate) Reset() { - *x = ConfigUpdate{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[313] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowTcp) GetSeqNum() *PatternFlowTcpSeqNum { + if x != nil { + return x.SeqNum } + return nil } -func (x *ConfigUpdate) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *FlowTcp) GetAckNum() *PatternFlowTcpAckNum { + if x != nil { + return x.AckNum + } + return nil } -func (*ConfigUpdate) ProtoMessage() {} - -func (x *ConfigUpdate) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[313] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *FlowTcp) GetDataOffset() *PatternFlowTcpDataOffset { + if x != nil { + return x.DataOffset } - return mi.MessageOf(x) + return nil } -// Deprecated: Use ConfigUpdate.ProtoReflect.Descriptor instead. -func (*ConfigUpdate) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{313} +func (x *FlowTcp) GetEcnNs() *PatternFlowTcpEcnNs { + if x != nil { + return x.EcnNs + } + return nil } -func (x *ConfigUpdate) GetChoice() ConfigUpdate_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowTcp) GetEcnCwr() *PatternFlowTcpEcnCwr { + if x != nil { + return x.EcnCwr } - return ConfigUpdate_Choice_unspecified + return nil } -func (x *ConfigUpdate) GetFlows() *FlowsUpdate { +func (x *FlowTcp) GetEcnEcho() *PatternFlowTcpEcnEcho { if x != nil { - return x.Flows + return x.EcnEcho } return nil } -// A container of flows with associated properties to be updated without affecting the -// flows current transmit state. -type FlowsUpdate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Flow properties to be updated without affecting the transmit state. - PropertyNames []FlowsUpdate_PropertyNames_Enum `protobuf:"varint,1,rep,packed,name=property_names,json=propertyNames,proto3,enum=otg.FlowsUpdate_PropertyNames_Enum" json:"property_names,omitempty"` - // The list of configured flows for which given property will be updated. - Flows []*Flow `protobuf:"bytes,2,rep,name=flows,proto3" json:"flows,omitempty"` +func (x *FlowTcp) GetCtlUrg() *PatternFlowTcpCtlUrg { + if x != nil { + return x.CtlUrg + } + return nil } -func (x *FlowsUpdate) Reset() { - *x = FlowsUpdate{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[314] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowTcp) GetCtlAck() *PatternFlowTcpCtlAck { + if x != nil { + return x.CtlAck } + return nil } -func (x *FlowsUpdate) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *FlowTcp) GetCtlPsh() *PatternFlowTcpCtlPsh { + if x != nil { + return x.CtlPsh + } + return nil } -func (*FlowsUpdate) ProtoMessage() {} +func (x *FlowTcp) GetCtlRst() *PatternFlowTcpCtlRst { + if x != nil { + return x.CtlRst + } + return nil +} -func (x *FlowsUpdate) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[314] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *FlowTcp) GetCtlSyn() *PatternFlowTcpCtlSyn { + if x != nil { + return x.CtlSyn } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowsUpdate.ProtoReflect.Descriptor instead. -func (*FlowsUpdate) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{314} +func (x *FlowTcp) GetCtlFin() *PatternFlowTcpCtlFin { + if x != nil { + return x.CtlFin + } + return nil } -func (x *FlowsUpdate) GetPropertyNames() []FlowsUpdate_PropertyNames_Enum { +func (x *FlowTcp) GetWindow() *PatternFlowTcpWindow { if x != nil { - return x.PropertyNames + return x.Window } return nil } -func (x *FlowsUpdate) GetFlows() []*Flow { +func (x *FlowTcp) GetChecksum() *PatternFlowTcpChecksum { if x != nil { - return x.Flows + return x.Checksum } return nil } -// Request for setting operational state of configured resources. -type ControlState struct { +// UDP packet header +type FlowUdp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // required = true - Choice *ControlState_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ControlState_Choice_Enum,oneof" json:"choice,omitempty"` + SrcPort *PatternFlowUdpSrcPort `protobuf:"bytes,1,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"` // Description missing in models - Port *StatePort `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` + DstPort *PatternFlowUdpDstPort `protobuf:"bytes,2,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` // Description missing in models - Protocol *StateProtocol `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"` + Length *PatternFlowUdpLength `protobuf:"bytes,3,opt,name=length,proto3" json:"length,omitempty"` // Description missing in models - Traffic *StateTraffic `protobuf:"bytes,4,opt,name=traffic,proto3" json:"traffic,omitempty"` + Checksum *PatternFlowUdpChecksum `protobuf:"bytes,4,opt,name=checksum,proto3" json:"checksum,omitempty"` } -func (x *ControlState) Reset() { - *x = ControlState{} +func (x *FlowUdp) Reset() { + *x = FlowUdp{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[315] + mi := &file_otg_proto_msgTypes[308] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ControlState) String() string { +func (x *FlowUdp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ControlState) ProtoMessage() {} +func (*FlowUdp) ProtoMessage() {} -func (x *ControlState) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[315] +func (x *FlowUdp) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[308] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -49234,71 +51639,76 @@ func (x *ControlState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ControlState.ProtoReflect.Descriptor instead. -func (*ControlState) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{315} +// Deprecated: Use FlowUdp.ProtoReflect.Descriptor instead. +func (*FlowUdp) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{308} } -func (x *ControlState) GetChoice() ControlState_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowUdp) GetSrcPort() *PatternFlowUdpSrcPort { + if x != nil { + return x.SrcPort } - return ControlState_Choice_unspecified + return nil } -func (x *ControlState) GetPort() *StatePort { +func (x *FlowUdp) GetDstPort() *PatternFlowUdpDstPort { if x != nil { - return x.Port + return x.DstPort } return nil } -func (x *ControlState) GetProtocol() *StateProtocol { +func (x *FlowUdp) GetLength() *PatternFlowUdpLength { if x != nil { - return x.Protocol + return x.Length } return nil } -func (x *ControlState) GetTraffic() *StateTraffic { +func (x *FlowUdp) GetChecksum() *PatternFlowUdpChecksum { if x != nil { - return x.Traffic + return x.Checksum } return nil } -// States associated with configured ports. -type StatePort struct { +// Standard GRE packet header (RFC2784) +type FlowGre struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // required = true - Choice *StatePort_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StatePort_Choice_Enum,oneof" json:"choice,omitempty"` + ChecksumPresent *PatternFlowGreChecksumPresent `protobuf:"bytes,1,opt,name=checksum_present,json=checksumPresent,proto3" json:"checksum_present,omitempty"` // Description missing in models - Link *StatePortLink `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` + Reserved0 *PatternFlowGreReserved0 `protobuf:"bytes,2,opt,name=reserved0,proto3" json:"reserved0,omitempty"` // Description missing in models - Capture *StatePortCapture `protobuf:"bytes,3,opt,name=capture,proto3" json:"capture,omitempty"` + Version *PatternFlowGreVersion `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + // Description missing in models + Protocol *PatternFlowGreProtocol `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"` + // Description missing in models + Checksum *PatternFlowGreChecksum `protobuf:"bytes,5,opt,name=checksum,proto3" json:"checksum,omitempty"` + // Description missing in models + Reserved1 *PatternFlowGreReserved1 `protobuf:"bytes,6,opt,name=reserved1,proto3" json:"reserved1,omitempty"` } -func (x *StatePort) Reset() { - *x = StatePort{} +func (x *FlowGre) Reset() { + *x = FlowGre{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[316] + mi := &file_otg_proto_msgTypes[309] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StatePort) String() string { +func (x *FlowGre) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatePort) ProtoMessage() {} +func (*FlowGre) ProtoMessage() {} -func (x *StatePort) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[316] +func (x *FlowGre) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[309] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -49309,62 +51719,104 @@ func (x *StatePort) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StatePort.ProtoReflect.Descriptor instead. -func (*StatePort) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{316} +// Deprecated: Use FlowGre.ProtoReflect.Descriptor instead. +func (*FlowGre) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{309} } -func (x *StatePort) GetChoice() StatePort_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowGre) GetChecksumPresent() *PatternFlowGreChecksumPresent { + if x != nil { + return x.ChecksumPresent } - return StatePort_Choice_unspecified + return nil } -func (x *StatePort) GetLink() *StatePortLink { +func (x *FlowGre) GetReserved0() *PatternFlowGreReserved0 { if x != nil { - return x.Link + return x.Reserved0 } return nil } -func (x *StatePort) GetCapture() *StatePortCapture { +func (x *FlowGre) GetVersion() *PatternFlowGreVersion { if x != nil { - return x.Capture + return x.Version } return nil } -// States associated with configured flows -type StateTraffic struct { +func (x *FlowGre) GetProtocol() *PatternFlowGreProtocol { + if x != nil { + return x.Protocol + } + return nil +} + +func (x *FlowGre) GetChecksum() *PatternFlowGreChecksum { + if x != nil { + return x.Checksum + } + return nil +} + +func (x *FlowGre) GetReserved1() *PatternFlowGreReserved1 { + if x != nil { + return x.Reserved1 + } + return nil +} + +// GTPv1 packet header +type FlowGtpv1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // required = true - Choice *StateTraffic_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StateTraffic_Choice_Enum,oneof" json:"choice,omitempty"` + Version *PatternFlowGtpv1Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // Description missing in models - FlowTransmit *StateTrafficFlowTransmit `protobuf:"bytes,2,opt,name=flow_transmit,json=flowTransmit,proto3" json:"flow_transmit,omitempty"` + ProtocolType *PatternFlowGtpv1ProtocolType `protobuf:"bytes,2,opt,name=protocol_type,json=protocolType,proto3" json:"protocol_type,omitempty"` + // Description missing in models + Reserved *PatternFlowGtpv1Reserved `protobuf:"bytes,3,opt,name=reserved,proto3" json:"reserved,omitempty"` + // Description missing in models + EFlag *PatternFlowGtpv1EFlag `protobuf:"bytes,4,opt,name=e_flag,json=eFlag,proto3" json:"e_flag,omitempty"` + // Description missing in models + SFlag *PatternFlowGtpv1SFlag `protobuf:"bytes,5,opt,name=s_flag,json=sFlag,proto3" json:"s_flag,omitempty"` + // Description missing in models + PnFlag *PatternFlowGtpv1PnFlag `protobuf:"bytes,6,opt,name=pn_flag,json=pnFlag,proto3" json:"pn_flag,omitempty"` + // Description missing in models + MessageType *PatternFlowGtpv1MessageType `protobuf:"bytes,7,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"` + // Description missing in models + MessageLength *PatternFlowGtpv1MessageLength `protobuf:"bytes,8,opt,name=message_length,json=messageLength,proto3" json:"message_length,omitempty"` + // Description missing in models + Teid *PatternFlowGtpv1Teid `protobuf:"bytes,9,opt,name=teid,proto3" json:"teid,omitempty"` + // Description missing in models + SquenceNumber *PatternFlowGtpv1SquenceNumber `protobuf:"bytes,10,opt,name=squence_number,json=squenceNumber,proto3" json:"squence_number,omitempty"` + // Description missing in models + NPduNumber *PatternFlowGtpv1NPduNumber `protobuf:"bytes,11,opt,name=n_pdu_number,json=nPduNumber,proto3" json:"n_pdu_number,omitempty"` + // Description missing in models + NextExtensionHeaderType *PatternFlowGtpv1NextExtensionHeaderType `protobuf:"bytes,12,opt,name=next_extension_header_type,json=nextExtensionHeaderType,proto3" json:"next_extension_header_type,omitempty"` + // A list of optional extension headers. + ExtensionHeaders []*FlowGtpExtension `protobuf:"bytes,13,rep,name=extension_headers,json=extensionHeaders,proto3" json:"extension_headers,omitempty"` } -func (x *StateTraffic) Reset() { - *x = StateTraffic{} +func (x *FlowGtpv1) Reset() { + *x = FlowGtpv1{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[317] + mi := &file_otg_proto_msgTypes[310] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateTraffic) String() string { +func (x *FlowGtpv1) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateTraffic) ProtoMessage() {} +func (*FlowGtpv1) ProtoMessage() {} -func (x *StateTraffic) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[317] +func (x *FlowGtpv1) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[310] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -49375,156 +51827,133 @@ func (x *StateTraffic) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateTraffic.ProtoReflect.Descriptor instead. -func (*StateTraffic) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{317} +// Deprecated: Use FlowGtpv1.ProtoReflect.Descriptor instead. +func (*FlowGtpv1) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{310} } -func (x *StateTraffic) GetChoice() StateTraffic_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowGtpv1) GetVersion() *PatternFlowGtpv1Version { + if x != nil { + return x.Version } - return StateTraffic_Choice_unspecified + return nil } -func (x *StateTraffic) GetFlowTransmit() *StateTrafficFlowTransmit { +func (x *FlowGtpv1) GetProtocolType() *PatternFlowGtpv1ProtocolType { if x != nil { - return x.FlowTransmit + return x.ProtocolType } return nil } -// States associated with protocols on configured resources. -type StateProtocol struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // required = true - Choice *StateProtocol_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StateProtocol_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - All *StateProtocolAll `protobuf:"bytes,2,opt,name=all,proto3" json:"all,omitempty"` - // Description missing in models - Route *StateProtocolRoute `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` - // Description missing in models - Lacp *StateProtocolLacp `protobuf:"bytes,4,opt,name=lacp,proto3" json:"lacp,omitempty"` - // Description missing in models - Bgp *StateProtocolBgp `protobuf:"bytes,5,opt,name=bgp,proto3" json:"bgp,omitempty"` - // Description missing in models - Isis *StateProtocolIsis `protobuf:"bytes,6,opt,name=isis,proto3" json:"isis,omitempty"` +func (x *FlowGtpv1) GetReserved() *PatternFlowGtpv1Reserved { + if x != nil { + return x.Reserved + } + return nil } -func (x *StateProtocol) Reset() { - *x = StateProtocol{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[318] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowGtpv1) GetEFlag() *PatternFlowGtpv1EFlag { + if x != nil { + return x.EFlag } + return nil } -func (x *StateProtocol) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *FlowGtpv1) GetSFlag() *PatternFlowGtpv1SFlag { + if x != nil { + return x.SFlag + } + return nil } -func (*StateProtocol) ProtoMessage() {} - -func (x *StateProtocol) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[318] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *FlowGtpv1) GetPnFlag() *PatternFlowGtpv1PnFlag { + if x != nil { + return x.PnFlag } - return mi.MessageOf(x) + return nil } -// Deprecated: Use StateProtocol.ProtoReflect.Descriptor instead. -func (*StateProtocol) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{318} +func (x *FlowGtpv1) GetMessageType() *PatternFlowGtpv1MessageType { + if x != nil { + return x.MessageType + } + return nil } -func (x *StateProtocol) GetChoice() StateProtocol_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowGtpv1) GetMessageLength() *PatternFlowGtpv1MessageLength { + if x != nil { + return x.MessageLength } - return StateProtocol_Choice_unspecified + return nil } -func (x *StateProtocol) GetAll() *StateProtocolAll { +func (x *FlowGtpv1) GetTeid() *PatternFlowGtpv1Teid { if x != nil { - return x.All + return x.Teid } return nil } -func (x *StateProtocol) GetRoute() *StateProtocolRoute { +func (x *FlowGtpv1) GetSquenceNumber() *PatternFlowGtpv1SquenceNumber { if x != nil { - return x.Route + return x.SquenceNumber } return nil } -func (x *StateProtocol) GetLacp() *StateProtocolLacp { +func (x *FlowGtpv1) GetNPduNumber() *PatternFlowGtpv1NPduNumber { if x != nil { - return x.Lacp + return x.NPduNumber } return nil } -func (x *StateProtocol) GetBgp() *StateProtocolBgp { +func (x *FlowGtpv1) GetNextExtensionHeaderType() *PatternFlowGtpv1NextExtensionHeaderType { if x != nil { - return x.Bgp + return x.NextExtensionHeaderType } return nil } -func (x *StateProtocol) GetIsis() *StateProtocolIsis { +func (x *FlowGtpv1) GetExtensionHeaders() []*FlowGtpExtension { if x != nil { - return x.Isis + return x.ExtensionHeaders } return nil } -// Sets the link of configured ports. -type StatePortLink struct { +// Description missing in models +type FlowGtpExtension struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of target ports. An empty or null list will target all ports. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // x-constraint: - // - /components/schemas/Port/properties/name - PortNames []string `protobuf:"bytes,1,rep,name=port_names,json=portNames,proto3" json:"port_names,omitempty"` - // The link state. - // required = true - State *StatePortLink_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StatePortLink_State_Enum,oneof" json:"state,omitempty"` + // Description missing in models + ExtensionLength *PatternFlowGtpExtensionExtensionLength `protobuf:"bytes,1,opt,name=extension_length,json=extensionLength,proto3" json:"extension_length,omitempty"` + // Description missing in models + Contents *PatternFlowGtpExtensionContents `protobuf:"bytes,2,opt,name=contents,proto3" json:"contents,omitempty"` + // Description missing in models + NextExtensionHeader *PatternFlowGtpExtensionNextExtensionHeader `protobuf:"bytes,3,opt,name=next_extension_header,json=nextExtensionHeader,proto3" json:"next_extension_header,omitempty"` } -func (x *StatePortLink) Reset() { - *x = StatePortLink{} +func (x *FlowGtpExtension) Reset() { + *x = FlowGtpExtension{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[319] + mi := &file_otg_proto_msgTypes[311] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StatePortLink) String() string { +func (x *FlowGtpExtension) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatePortLink) ProtoMessage() {} +func (*FlowGtpExtension) ProtoMessage() {} -func (x *StatePortLink) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[319] +func (x *FlowGtpExtension) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[311] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -49535,64 +51964,75 @@ func (x *StatePortLink) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StatePortLink.ProtoReflect.Descriptor instead. -func (*StatePortLink) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{319} +// Deprecated: Use FlowGtpExtension.ProtoReflect.Descriptor instead. +func (*FlowGtpExtension) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{311} } -func (x *StatePortLink) GetPortNames() []string { +func (x *FlowGtpExtension) GetExtensionLength() *PatternFlowGtpExtensionExtensionLength { if x != nil { - return x.PortNames + return x.ExtensionLength } return nil } -func (x *StatePortLink) GetState() StatePortLink_State_Enum { - if x != nil && x.State != nil { - return *x.State +func (x *FlowGtpExtension) GetContents() *PatternFlowGtpExtensionContents { + if x != nil { + return x.Contents } - return StatePortLink_State_unspecified + return nil } -// Sets the capture state of configured ports -type StatePortCapture struct { +func (x *FlowGtpExtension) GetNextExtensionHeader() *PatternFlowGtpExtensionNextExtensionHeader { + if x != nil { + return x.NextExtensionHeader + } + return nil +} + +// GTPv2 packet header +type FlowGtpv2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of ports to which the capture state will be applied to. If the list of - // port_names is empty or null the state will be applied to all configured ports. - // If the list is not empty any port that is not included in the list of port_names - // MUST be ignored and not included in the state change. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // x-constraint: - // - /components/schemas/Port/properties/name - PortNames []string `protobuf:"bytes,1,rep,name=port_names,json=portNames,proto3" json:"port_names,omitempty"` - // The capture state. - // required = true - State *StatePortCapture_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StatePortCapture_State_Enum,oneof" json:"state,omitempty"` + // Description missing in models + Version *PatternFlowGtpv2Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Description missing in models + PiggybackingFlag *PatternFlowGtpv2PiggybackingFlag `protobuf:"bytes,2,opt,name=piggybacking_flag,json=piggybackingFlag,proto3" json:"piggybacking_flag,omitempty"` + // Description missing in models + TeidFlag *PatternFlowGtpv2TeidFlag `protobuf:"bytes,3,opt,name=teid_flag,json=teidFlag,proto3" json:"teid_flag,omitempty"` + // Description missing in models + Spare1 *PatternFlowGtpv2Spare1 `protobuf:"bytes,4,opt,name=spare1,proto3" json:"spare1,omitempty"` + // Description missing in models + MessageType *PatternFlowGtpv2MessageType `protobuf:"bytes,5,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"` + // Description missing in models + MessageLength *PatternFlowGtpv2MessageLength `protobuf:"bytes,6,opt,name=message_length,json=messageLength,proto3" json:"message_length,omitempty"` + // Description missing in models + Teid *PatternFlowGtpv2Teid `protobuf:"bytes,7,opt,name=teid,proto3" json:"teid,omitempty"` + // Description missing in models + SequenceNumber *PatternFlowGtpv2SequenceNumber `protobuf:"bytes,8,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"` + // Description missing in models + Spare2 *PatternFlowGtpv2Spare2 `protobuf:"bytes,9,opt,name=spare2,proto3" json:"spare2,omitempty"` } -func (x *StatePortCapture) Reset() { - *x = StatePortCapture{} +func (x *FlowGtpv2) Reset() { + *x = FlowGtpv2{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[320] + mi := &file_otg_proto_msgTypes[312] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StatePortCapture) String() string { +func (x *FlowGtpv2) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatePortCapture) ProtoMessage() {} +func (*FlowGtpv2) ProtoMessage() {} -func (x *StatePortCapture) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[320] +func (x *FlowGtpv2) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[312] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -49603,135 +52043,117 @@ func (x *StatePortCapture) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StatePortCapture.ProtoReflect.Descriptor instead. -func (*StatePortCapture) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{320} +// Deprecated: Use FlowGtpv2.ProtoReflect.Descriptor instead. +func (*FlowGtpv2) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{312} } -func (x *StatePortCapture) GetPortNames() []string { +func (x *FlowGtpv2) GetVersion() *PatternFlowGtpv2Version { if x != nil { - return x.PortNames + return x.Version } return nil } -func (x *StatePortCapture) GetState() StatePortCapture_State_Enum { - if x != nil && x.State != nil { - return *x.State +func (x *FlowGtpv2) GetPiggybackingFlag() *PatternFlowGtpv2PiggybackingFlag { + if x != nil { + return x.PiggybackingFlag } - return StatePortCapture_State_unspecified + return nil } -// Provides state control of flow transmission. -type StateTrafficFlowTransmit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The names of flows to which the transmit state will be applied to. If the list of - // flow_names is empty or null the state will be applied to all configured flows. - // If the list is not empty any flow that is not included in the list of flow_names - // MUST be ignored and not included in the state change. - // - // x-constraint: - // - /components/schemas/Flow/properties/name - // - // x-constraint: - // - /components/schemas/Flow/properties/name - FlowNames []string `protobuf:"bytes,1,rep,name=flow_names,json=flowNames,proto3" json:"flow_names,omitempty"` - // The transmit state. - // If the value of the state property is 'start' then all flows defined by the 'flow_names' - // property will be started and the metric counters MUST be cleared prior to starting - // the flow(s). - // If the value of the state property is 'stop' then all flows defined by the 'flow_names' - // property will be stopped and the metric counters MUST NOT be cleared. - // If the value of the state property is 'pause' then all flows defined by the 'flow_names' - // property will be paused and the metric counters MUST NOT be cleared. - // If the value of the state property is 'resume' then any paused flows defined by the - // 'flow_names' property will start transmit at the point at which they were paused. - // Any flow that is stopped will start transmit at the beginning of the flow. The flow(s) - // MUST NOT have their metric counters cleared. - // required = true - State *StateTrafficFlowTransmit_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StateTrafficFlowTransmit_State_Enum,oneof" json:"state,omitempty"` +func (x *FlowGtpv2) GetTeidFlag() *PatternFlowGtpv2TeidFlag { + if x != nil { + return x.TeidFlag + } + return nil } -func (x *StateTrafficFlowTransmit) Reset() { - *x = StateTrafficFlowTransmit{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[321] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowGtpv2) GetSpare1() *PatternFlowGtpv2Spare1 { + if x != nil { + return x.Spare1 } + return nil } -func (x *StateTrafficFlowTransmit) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *FlowGtpv2) GetMessageType() *PatternFlowGtpv2MessageType { + if x != nil { + return x.MessageType + } + return nil } -func (*StateTrafficFlowTransmit) ProtoMessage() {} - -func (x *StateTrafficFlowTransmit) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[321] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *FlowGtpv2) GetMessageLength() *PatternFlowGtpv2MessageLength { + if x != nil { + return x.MessageLength } - return mi.MessageOf(x) + return nil } -// Deprecated: Use StateTrafficFlowTransmit.ProtoReflect.Descriptor instead. -func (*StateTrafficFlowTransmit) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{321} +func (x *FlowGtpv2) GetTeid() *PatternFlowGtpv2Teid { + if x != nil { + return x.Teid + } + return nil } -func (x *StateTrafficFlowTransmit) GetFlowNames() []string { +func (x *FlowGtpv2) GetSequenceNumber() *PatternFlowGtpv2SequenceNumber { if x != nil { - return x.FlowNames + return x.SequenceNumber } return nil } -func (x *StateTrafficFlowTransmit) GetState() StateTrafficFlowTransmit_State_Enum { - if x != nil && x.State != nil { - return *x.State +func (x *FlowGtpv2) GetSpare2() *PatternFlowGtpv2Spare2 { + if x != nil { + return x.Spare2 } - return StateTrafficFlowTransmit_State_unspecified + return nil } -// Sets all configured protocols to `start` or `stop` state. -// Setting protocol state to `start` shall be a no-op if preceding `set_config` API -// call was made with `config.options.protocol_options.auto_start_all` set to `true` -// or if all the configured protocols are already started. -type StateProtocolAll struct { +// ARP packet header +type FlowArp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Protocol states - // required = true - State *StateProtocolAll_State_Enum `protobuf:"varint,1,opt,name=state,proto3,enum=otg.StateProtocolAll_State_Enum,oneof" json:"state,omitempty"` + // Description missing in models + HardwareType *PatternFlowArpHardwareType `protobuf:"bytes,1,opt,name=hardware_type,json=hardwareType,proto3" json:"hardware_type,omitempty"` + // Description missing in models + ProtocolType *PatternFlowArpProtocolType `protobuf:"bytes,2,opt,name=protocol_type,json=protocolType,proto3" json:"protocol_type,omitempty"` + // Description missing in models + HardwareLength *PatternFlowArpHardwareLength `protobuf:"bytes,3,opt,name=hardware_length,json=hardwareLength,proto3" json:"hardware_length,omitempty"` + // Description missing in models + ProtocolLength *PatternFlowArpProtocolLength `protobuf:"bytes,4,opt,name=protocol_length,json=protocolLength,proto3" json:"protocol_length,omitempty"` + // Description missing in models + Operation *PatternFlowArpOperation `protobuf:"bytes,5,opt,name=operation,proto3" json:"operation,omitempty"` + // Description missing in models + SenderHardwareAddr *PatternFlowArpSenderHardwareAddr `protobuf:"bytes,6,opt,name=sender_hardware_addr,json=senderHardwareAddr,proto3" json:"sender_hardware_addr,omitempty"` + // Description missing in models + SenderProtocolAddr *PatternFlowArpSenderProtocolAddr `protobuf:"bytes,7,opt,name=sender_protocol_addr,json=senderProtocolAddr,proto3" json:"sender_protocol_addr,omitempty"` + // Description missing in models + TargetHardwareAddr *PatternFlowArpTargetHardwareAddr `protobuf:"bytes,8,opt,name=target_hardware_addr,json=targetHardwareAddr,proto3" json:"target_hardware_addr,omitempty"` + // Description missing in models + TargetProtocolAddr *PatternFlowArpTargetProtocolAddr `protobuf:"bytes,9,opt,name=target_protocol_addr,json=targetProtocolAddr,proto3" json:"target_protocol_addr,omitempty"` } -func (x *StateProtocolAll) Reset() { - *x = StateProtocolAll{} +func (x *FlowArp) Reset() { + *x = FlowArp{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[322] + mi := &file_otg_proto_msgTypes[313] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocolAll) String() string { +func (x *FlowArp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocolAll) ProtoMessage() {} +func (*FlowArp) ProtoMessage() {} -func (x *StateProtocolAll) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[322] +func (x *FlowArp) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[313] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -49742,122 +52164,104 @@ func (x *StateProtocolAll) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocolAll.ProtoReflect.Descriptor instead. -func (*StateProtocolAll) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{322} +// Deprecated: Use FlowArp.ProtoReflect.Descriptor instead. +func (*FlowArp) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{313} } -func (x *StateProtocolAll) GetState() StateProtocolAll_State_Enum { - if x != nil && x.State != nil { - return *x.State +func (x *FlowArp) GetHardwareType() *PatternFlowArpHardwareType { + if x != nil { + return x.HardwareType } - return StateProtocolAll_State_unspecified + return nil } -// Sets the state of configured routes -type StateProtocolRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The names of device route objects to control. If no names are specified then all - // route objects that match the x-constraint will be affected. - // - // x-constraint: - // - /components/schemas/Bgp.V4RouteRange/properties/name - // - /components/schemas/Bgp.V6RouteRange/properties/name - // - /components/schemas/Isis.V4RouteRange/properties/name - // - /components/schemas/Isis.V6RouteRange/properties/name - // - // x-constraint: - // - /components/schemas/Bgp.V4RouteRange/properties/name - // - /components/schemas/Bgp.V6RouteRange/properties/name - // - /components/schemas/Isis.V4RouteRange/properties/name - // - /components/schemas/Isis.V6RouteRange/properties/name - Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` - // Route states - // required = true - State *StateProtocolRoute_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StateProtocolRoute_State_Enum,oneof" json:"state,omitempty"` +func (x *FlowArp) GetProtocolType() *PatternFlowArpProtocolType { + if x != nil { + return x.ProtocolType + } + return nil } -func (x *StateProtocolRoute) Reset() { - *x = StateProtocolRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[323] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowArp) GetHardwareLength() *PatternFlowArpHardwareLength { + if x != nil { + return x.HardwareLength } + return nil } -func (x *StateProtocolRoute) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *FlowArp) GetProtocolLength() *PatternFlowArpProtocolLength { + if x != nil { + return x.ProtocolLength + } + return nil } -func (*StateProtocolRoute) ProtoMessage() {} +func (x *FlowArp) GetOperation() *PatternFlowArpOperation { + if x != nil { + return x.Operation + } + return nil +} -func (x *StateProtocolRoute) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[323] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *FlowArp) GetSenderHardwareAddr() *PatternFlowArpSenderHardwareAddr { + if x != nil { + return x.SenderHardwareAddr } - return mi.MessageOf(x) + return nil } -// Deprecated: Use StateProtocolRoute.ProtoReflect.Descriptor instead. -func (*StateProtocolRoute) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{323} +func (x *FlowArp) GetSenderProtocolAddr() *PatternFlowArpSenderProtocolAddr { + if x != nil { + return x.SenderProtocolAddr + } + return nil } -func (x *StateProtocolRoute) GetNames() []string { +func (x *FlowArp) GetTargetHardwareAddr() *PatternFlowArpTargetHardwareAddr { if x != nil { - return x.Names + return x.TargetHardwareAddr } return nil } -func (x *StateProtocolRoute) GetState() StateProtocolRoute_State_Enum { - if x != nil && x.State != nil { - return *x.State +func (x *FlowArp) GetTargetProtocolAddr() *PatternFlowArpTargetProtocolAddr { + if x != nil { + return x.TargetProtocolAddr } - return StateProtocolRoute_State_unspecified + return nil } -// Sets state of configured LACP -type StateProtocolLacp struct { +// ICMP packet header +type FlowIcmp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // required = true - Choice *StateProtocolLacp_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StateProtocolLacp_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Admin *StateProtocolLacpAdmin `protobuf:"bytes,2,opt,name=admin,proto3" json:"admin,omitempty"` + // default = Choice.Enum.echo + Choice *FlowIcmp_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowIcmp_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - MemberPorts *StateProtocolLacpMemberPorts `protobuf:"bytes,3,opt,name=member_ports,json=memberPorts,proto3" json:"member_ports,omitempty"` + Echo *FlowIcmpEcho `protobuf:"bytes,2,opt,name=echo,proto3" json:"echo,omitempty"` } -func (x *StateProtocolLacp) Reset() { - *x = StateProtocolLacp{} +func (x *FlowIcmp) Reset() { + *x = FlowIcmp{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[324] + mi := &file_otg_proto_msgTypes[314] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocolLacp) String() string { +func (x *FlowIcmp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocolLacp) ProtoMessage() {} +func (*FlowIcmp) ProtoMessage() {} -func (x *StateProtocolLacp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[324] +func (x *FlowIcmp) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[314] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -49868,71 +52272,60 @@ func (x *StateProtocolLacp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocolLacp.ProtoReflect.Descriptor instead. -func (*StateProtocolLacp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{324} +// Deprecated: Use FlowIcmp.ProtoReflect.Descriptor instead. +func (*FlowIcmp) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{314} } -func (x *StateProtocolLacp) GetChoice() StateProtocolLacp_Choice_Enum { +func (x *FlowIcmp) GetChoice() FlowIcmp_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return StateProtocolLacp_Choice_unspecified -} - -func (x *StateProtocolLacp) GetAdmin() *StateProtocolLacpAdmin { - if x != nil { - return x.Admin - } - return nil + return FlowIcmp_Choice_unspecified } -func (x *StateProtocolLacp) GetMemberPorts() *StateProtocolLacpMemberPorts { +func (x *FlowIcmp) GetEcho() *FlowIcmpEcho { if x != nil { - return x.MemberPorts + return x.Echo } return nil } -// Sets admin state of LACP configured on LAG members -type StateProtocolLacpAdmin struct { +// Packet Header for ICMP echo request +type FlowIcmpEcho struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of LAG members (ports) for which the state has to be applied. An empty - // or null list will control all LAG members. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // x-constraint: - // - /components/schemas/Port/properties/name - LagMemberNames []string `protobuf:"bytes,1,rep,name=lag_member_names,json=lagMemberNames,proto3" json:"lag_member_names,omitempty"` - // The LACP Member admin state. 'up' will send LACPDUs with 'sync' flag set on selected - // member ports. 'down' will send LACPDUs with 'sync' flag unset on selected member - // ports. - // required = true - State *StateProtocolLacpAdmin_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StateProtocolLacpAdmin_State_Enum,oneof" json:"state,omitempty"` + // Description missing in models + Type *PatternFlowIcmpEchoType `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // Description missing in models + Code *PatternFlowIcmpEchoCode `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // Description missing in models + Checksum *PatternFlowIcmpEchoChecksum `protobuf:"bytes,3,opt,name=checksum,proto3" json:"checksum,omitempty"` + // Description missing in models + Identifier *PatternFlowIcmpEchoIdentifier `protobuf:"bytes,4,opt,name=identifier,proto3" json:"identifier,omitempty"` + // Description missing in models + SequenceNumber *PatternFlowIcmpEchoSequenceNumber `protobuf:"bytes,5,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"` } -func (x *StateProtocolLacpAdmin) Reset() { - *x = StateProtocolLacpAdmin{} +func (x *FlowIcmpEcho) Reset() { + *x = FlowIcmpEcho{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[325] + mi := &file_otg_proto_msgTypes[315] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocolLacpAdmin) String() string { +func (x *FlowIcmpEcho) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocolLacpAdmin) ProtoMessage() {} +func (*FlowIcmpEcho) ProtoMessage() {} -func (x *StateProtocolLacpAdmin) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[325] +func (x *FlowIcmpEcho) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[315] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -49943,62 +52336,76 @@ func (x *StateProtocolLacpAdmin) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocolLacpAdmin.ProtoReflect.Descriptor instead. -func (*StateProtocolLacpAdmin) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{325} +// Deprecated: Use FlowIcmpEcho.ProtoReflect.Descriptor instead. +func (*FlowIcmpEcho) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{315} } -func (x *StateProtocolLacpAdmin) GetLagMemberNames() []string { +func (x *FlowIcmpEcho) GetType() *PatternFlowIcmpEchoType { if x != nil { - return x.LagMemberNames + return x.Type } return nil } -func (x *StateProtocolLacpAdmin) GetState() StateProtocolLacpAdmin_State_Enum { - if x != nil && x.State != nil { - return *x.State +func (x *FlowIcmpEcho) GetCode() *PatternFlowIcmpEchoCode { + if x != nil { + return x.Code } - return StateProtocolLacpAdmin_State_unspecified + return nil } -// Sets state of LACP member ports configured on LAG. -type StateProtocolLacpMemberPorts struct { +func (x *FlowIcmpEcho) GetChecksum() *PatternFlowIcmpEchoChecksum { + if x != nil { + return x.Checksum + } + return nil +} + +func (x *FlowIcmpEcho) GetIdentifier() *PatternFlowIcmpEchoIdentifier { + if x != nil { + return x.Identifier + } + return nil +} + +func (x *FlowIcmpEcho) GetSequenceNumber() *PatternFlowIcmpEchoSequenceNumber { + if x != nil { + return x.SequenceNumber + } + return nil +} + +// ICMPv6 packet header +type FlowIcmpv6 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of LAG members (ports) for which the state has to be applied. An empty - // or null list will control all LAG members. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // x-constraint: - // - /components/schemas/Port/properties/name - LagMemberNames []string `protobuf:"bytes,1,rep,name=lag_member_names,json=lagMemberNames,proto3" json:"lag_member_names,omitempty"` - // The desired LACP member port state. - // required = true - State *StateProtocolLacpMemberPorts_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StateProtocolLacpMemberPorts_State_Enum,oneof" json:"state,omitempty"` + // Description missing in models + // default = Choice.Enum.echo + Choice *FlowIcmpv6_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowIcmpv6_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Echo *FlowIcmpv6Echo `protobuf:"bytes,2,opt,name=echo,proto3" json:"echo,omitempty"` } -func (x *StateProtocolLacpMemberPorts) Reset() { - *x = StateProtocolLacpMemberPorts{} +func (x *FlowIcmpv6) Reset() { + *x = FlowIcmpv6{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[326] + mi := &file_otg_proto_msgTypes[316] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocolLacpMemberPorts) String() string { +func (x *FlowIcmpv6) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocolLacpMemberPorts) ProtoMessage() {} +func (*FlowIcmpv6) ProtoMessage() {} -func (x *StateProtocolLacpMemberPorts) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[326] +func (x *FlowIcmpv6) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[316] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -50009,55 +52416,60 @@ func (x *StateProtocolLacpMemberPorts) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocolLacpMemberPorts.ProtoReflect.Descriptor instead. -func (*StateProtocolLacpMemberPorts) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{326} +// Deprecated: Use FlowIcmpv6.ProtoReflect.Descriptor instead. +func (*FlowIcmpv6) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{316} } -func (x *StateProtocolLacpMemberPorts) GetLagMemberNames() []string { - if x != nil { - return x.LagMemberNames +func (x *FlowIcmpv6) GetChoice() FlowIcmpv6_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return FlowIcmpv6_Choice_unspecified } -func (x *StateProtocolLacpMemberPorts) GetState() StateProtocolLacpMemberPorts_State_Enum { - if x != nil && x.State != nil { - return *x.State +func (x *FlowIcmpv6) GetEcho() *FlowIcmpv6Echo { + if x != nil { + return x.Echo } - return StateProtocolLacpMemberPorts_State_unspecified + return nil } -// Sets state of configured BGP peers. -type StateProtocolBgp struct { +// Packet Header for ICMPv6 Echo +type FlowIcmpv6Echo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // required = true - Choice *StateProtocolBgp_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StateProtocolBgp_Choice_Enum,oneof" json:"choice,omitempty"` + Type *PatternFlowIcmpv6EchoType `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Description missing in models - Peers *StateProtocolBgpPeers `protobuf:"bytes,2,opt,name=peers,proto3" json:"peers,omitempty"` + Code *PatternFlowIcmpv6EchoCode `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // Description missing in models + Identifier *PatternFlowIcmpv6EchoIdentifier `protobuf:"bytes,3,opt,name=identifier,proto3" json:"identifier,omitempty"` + // Description missing in models + SequenceNumber *PatternFlowIcmpv6EchoSequenceNumber `protobuf:"bytes,4,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"` + // Description missing in models + Checksum *PatternFlowIcmpv6EchoChecksum `protobuf:"bytes,5,opt,name=checksum,proto3" json:"checksum,omitempty"` } -func (x *StateProtocolBgp) Reset() { - *x = StateProtocolBgp{} +func (x *FlowIcmpv6Echo) Reset() { + *x = FlowIcmpv6Echo{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[327] + mi := &file_otg_proto_msgTypes[317] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocolBgp) String() string { +func (x *FlowIcmpv6Echo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocolBgp) ProtoMessage() {} +func (*FlowIcmpv6Echo) ProtoMessage() {} -func (x *StateProtocolBgp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[327] +func (x *FlowIcmpv6Echo) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[317] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -50068,67 +52480,77 @@ func (x *StateProtocolBgp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocolBgp.ProtoReflect.Descriptor instead. -func (*StateProtocolBgp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{327} +// Deprecated: Use FlowIcmpv6Echo.ProtoReflect.Descriptor instead. +func (*FlowIcmpv6Echo) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{317} } -func (x *StateProtocolBgp) GetChoice() StateProtocolBgp_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowIcmpv6Echo) GetType() *PatternFlowIcmpv6EchoType { + if x != nil { + return x.Type } - return StateProtocolBgp_Choice_unspecified + return nil } -func (x *StateProtocolBgp) GetPeers() *StateProtocolBgpPeers { +func (x *FlowIcmpv6Echo) GetCode() *PatternFlowIcmpv6EchoCode { if x != nil { - return x.Peers + return x.Code } return nil } -// Sets state of configured BGP peers. -type StateProtocolBgpPeers struct { +func (x *FlowIcmpv6Echo) GetIdentifier() *PatternFlowIcmpv6EchoIdentifier { + if x != nil { + return x.Identifier + } + return nil +} + +func (x *FlowIcmpv6Echo) GetSequenceNumber() *PatternFlowIcmpv6EchoSequenceNumber { + if x != nil { + return x.SequenceNumber + } + return nil +} + +func (x *FlowIcmpv6Echo) GetChecksum() *PatternFlowIcmpv6EchoChecksum { + if x != nil { + return x.Checksum + } + return nil +} + +// PPP packet header +type FlowPpp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of BGP peers for which the state has to be applied. An empty or null list - // will control all BGP peers. - // - // x-constraint: - // - /components/schemas/Bgp.V4Peer/properties/name - // - /components/schemas/Bgp.V6Peer/properties/name - // - // x-constraint: - // - /components/schemas/Bgp.V4Peer/properties/name - // - /components/schemas/Bgp.V6Peer/properties/name - PeerNames []string `protobuf:"bytes,1,rep,name=peer_names,json=peerNames,proto3" json:"peer_names,omitempty"` - // The desired state of BGP peer. If the desired state is 'up', underlying IP interface(s) - // would be brought up automatically (if not already up), would attempt to bring up - // the BGP session(s) and advertise route(s), if configured. If the desired state is - // 'down', BGP session(s) would be brought down. - // required = true - State *StateProtocolBgpPeers_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StateProtocolBgpPeers_State_Enum,oneof" json:"state,omitempty"` + // Description missing in models + Address *PatternFlowPppAddress `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Description missing in models + Control *PatternFlowPppControl `protobuf:"bytes,2,opt,name=control,proto3" json:"control,omitempty"` + // Description missing in models + ProtocolType *PatternFlowPppProtocolType `protobuf:"bytes,3,opt,name=protocol_type,json=protocolType,proto3" json:"protocol_type,omitempty"` } -func (x *StateProtocolBgpPeers) Reset() { - *x = StateProtocolBgpPeers{} +func (x *FlowPpp) Reset() { + *x = FlowPpp{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[328] + mi := &file_otg_proto_msgTypes[318] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocolBgpPeers) String() string { +func (x *FlowPpp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocolBgpPeers) ProtoMessage() {} +func (*FlowPpp) ProtoMessage() {} -func (x *StateProtocolBgpPeers) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[328] +func (x *FlowPpp) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[318] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -50139,55 +52561,67 @@ func (x *StateProtocolBgpPeers) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocolBgpPeers.ProtoReflect.Descriptor instead. -func (*StateProtocolBgpPeers) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{328} +// Deprecated: Use FlowPpp.ProtoReflect.Descriptor instead. +func (*FlowPpp) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{318} } -func (x *StateProtocolBgpPeers) GetPeerNames() []string { +func (x *FlowPpp) GetAddress() *PatternFlowPppAddress { if x != nil { - return x.PeerNames + return x.Address } return nil } -func (x *StateProtocolBgpPeers) GetState() StateProtocolBgpPeers_State_Enum { - if x != nil && x.State != nil { - return *x.State +func (x *FlowPpp) GetControl() *PatternFlowPppControl { + if x != nil { + return x.Control } - return StateProtocolBgpPeers_State_unspecified + return nil } -// Sets state of configured ISIS routers. -type StateProtocolIsis struct { +func (x *FlowPpp) GetProtocolType() *PatternFlowPppProtocolType { + if x != nil { + return x.ProtocolType + } + return nil +} + +// IGMPv1 packet header +type FlowIgmpv1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // required = true - Choice *StateProtocolIsis_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StateProtocolIsis_Choice_Enum,oneof" json:"choice,omitempty"` + Version *PatternFlowIgmpv1Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // Description missing in models - Routers *StateProtocolIsisRouters `protobuf:"bytes,2,opt,name=routers,proto3" json:"routers,omitempty"` + Type *PatternFlowIgmpv1Type `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + // Description missing in models + Unused *PatternFlowIgmpv1Unused `protobuf:"bytes,3,opt,name=unused,proto3" json:"unused,omitempty"` + // Description missing in models + Checksum *PatternFlowIgmpv1Checksum `protobuf:"bytes,4,opt,name=checksum,proto3" json:"checksum,omitempty"` + // Description missing in models + GroupAddress *PatternFlowIgmpv1GroupAddress `protobuf:"bytes,5,opt,name=group_address,json=groupAddress,proto3" json:"group_address,omitempty"` } -func (x *StateProtocolIsis) Reset() { - *x = StateProtocolIsis{} +func (x *FlowIgmpv1) Reset() { + *x = FlowIgmpv1{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[329] + mi := &file_otg_proto_msgTypes[319] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocolIsis) String() string { +func (x *FlowIgmpv1) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocolIsis) ProtoMessage() {} +func (*FlowIgmpv1) ProtoMessage() {} -func (x *StateProtocolIsis) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[329] +func (x *FlowIgmpv1) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[319] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -50198,65 +52632,80 @@ func (x *StateProtocolIsis) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocolIsis.ProtoReflect.Descriptor instead. -func (*StateProtocolIsis) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{329} +// Deprecated: Use FlowIgmpv1.ProtoReflect.Descriptor instead. +func (*FlowIgmpv1) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{319} } -func (x *StateProtocolIsis) GetChoice() StateProtocolIsis_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowIgmpv1) GetVersion() *PatternFlowIgmpv1Version { + if x != nil { + return x.Version } - return StateProtocolIsis_Choice_unspecified + return nil } -func (x *StateProtocolIsis) GetRouters() *StateProtocolIsisRouters { +func (x *FlowIgmpv1) GetType() *PatternFlowIgmpv1Type { if x != nil { - return x.Routers + return x.Type } return nil } -// Sets state of configured ISIS routers. -type StateProtocolIsisRouters struct { +func (x *FlowIgmpv1) GetUnused() *PatternFlowIgmpv1Unused { + if x != nil { + return x.Unused + } + return nil +} + +func (x *FlowIgmpv1) GetChecksum() *PatternFlowIgmpv1Checksum { + if x != nil { + return x.Checksum + } + return nil +} + +func (x *FlowIgmpv1) GetGroupAddress() *PatternFlowIgmpv1GroupAddress { + if x != nil { + return x.GroupAddress + } + return nil +} + +// MPLS packet header; When configuring multiple such headers, the count shall not exceed +// 20. +type FlowMpls struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of ISIS routers for which the state has to be applied. An empty or null - // list will control all ISIS routers. - // - // x-constraint: - // - /components/schemas/Device.IsisRouter/properties/name - // - // x-constraint: - // - /components/schemas/Device.IsisRouter/properties/name - RouterNames []string `protobuf:"bytes,1,rep,name=router_names,json=routerNames,proto3" json:"router_names,omitempty"` - // The desired state of ISIS router. If the desired state is 'up', would attempt to - // bring up the ISIS session(s) with respective peer(s) and advertise route(s), if configured. - // If the desired state is 'down', would bring down ISIS session(s) with respective - // peer(s). - // required = true - State *StateProtocolIsisRouters_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StateProtocolIsisRouters_State_Enum,oneof" json:"state,omitempty"` + // Description missing in models + Label *PatternFlowMplsLabel `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` + // Description missing in models + TrafficClass *PatternFlowMplsTrafficClass `protobuf:"bytes,2,opt,name=traffic_class,json=trafficClass,proto3" json:"traffic_class,omitempty"` + // Description missing in models + BottomOfStack *PatternFlowMplsBottomOfStack `protobuf:"bytes,3,opt,name=bottom_of_stack,json=bottomOfStack,proto3" json:"bottom_of_stack,omitempty"` + // Description missing in models + TimeToLive *PatternFlowMplsTimeToLive `protobuf:"bytes,4,opt,name=time_to_live,json=timeToLive,proto3" json:"time_to_live,omitempty"` } -func (x *StateProtocolIsisRouters) Reset() { - *x = StateProtocolIsisRouters{} +func (x *FlowMpls) Reset() { + *x = FlowMpls{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[330] + mi := &file_otg_proto_msgTypes[320] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocolIsisRouters) String() string { +func (x *FlowMpls) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocolIsisRouters) ProtoMessage() {} +func (*FlowMpls) ProtoMessage() {} -func (x *StateProtocolIsisRouters) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[330] +func (x *FlowMpls) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[320] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -50267,55 +52716,74 @@ func (x *StateProtocolIsisRouters) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocolIsisRouters.ProtoReflect.Descriptor instead. -func (*StateProtocolIsisRouters) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{330} +// Deprecated: Use FlowMpls.ProtoReflect.Descriptor instead. +func (*FlowMpls) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{320} } -func (x *StateProtocolIsisRouters) GetRouterNames() []string { +func (x *FlowMpls) GetLabel() *PatternFlowMplsLabel { if x != nil { - return x.RouterNames + return x.Label } return nil } -func (x *StateProtocolIsisRouters) GetState() StateProtocolIsisRouters_State_Enum { - if x != nil && x.State != nil { - return *x.State +func (x *FlowMpls) GetTrafficClass() *PatternFlowMplsTrafficClass { + if x != nil { + return x.TrafficClass } - return StateProtocolIsisRouters_State_unspecified + return nil } -// Request for triggering action against configured resources. -type ControlAction struct { +func (x *FlowMpls) GetBottomOfStack() *PatternFlowMplsBottomOfStack { + if x != nil { + return x.BottomOfStack + } + return nil +} + +func (x *FlowMpls) GetTimeToLive() *PatternFlowMplsTimeToLive { + if x != nil { + return x.TimeToLive + } + return nil +} + +// SNMPv2C packet header as defined in RFC1901 and RFC3416. +type FlowSnmpv2C struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // required = true - Choice *ControlAction_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ControlAction_Choice_Enum,oneof" json:"choice,omitempty"` + Version *PatternFlowSnmpv2CVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // It is an ASCII based octet string which identifies the SNMP community in which the + // sender and recipient of this message are located. It should match the read-only or + // read-write community string configured on the recipient for the PDU to be accepted. + // default = community + Community *string `protobuf:"bytes,2,opt,name=community,proto3,oneof" json:"community,omitempty"` // Description missing in models - Protocol *ActionProtocol `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` + // required = true + Data *FlowSnmpv2CData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` } -func (x *ControlAction) Reset() { - *x = ControlAction{} +func (x *FlowSnmpv2C) Reset() { + *x = FlowSnmpv2C{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[331] + mi := &file_otg_proto_msgTypes[321] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ControlAction) String() string { +func (x *FlowSnmpv2C) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ControlAction) ProtoMessage() {} +func (*FlowSnmpv2C) ProtoMessage() {} -func (x *ControlAction) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[331] +func (x *FlowSnmpv2C) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[321] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -50326,54 +52794,79 @@ func (x *ControlAction) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ControlAction.ProtoReflect.Descriptor instead. -func (*ControlAction) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{331} +// Deprecated: Use FlowSnmpv2C.ProtoReflect.Descriptor instead. +func (*FlowSnmpv2C) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{321} } -func (x *ControlAction) GetChoice() ControlAction_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowSnmpv2C) GetVersion() *PatternFlowSnmpv2CVersion { + if x != nil { + return x.Version } - return ControlAction_Choice_unspecified + return nil } -func (x *ControlAction) GetProtocol() *ActionProtocol { +func (x *FlowSnmpv2C) GetCommunity() string { + if x != nil && x.Community != nil { + return *x.Community + } + return "" +} + +func (x *FlowSnmpv2C) GetData() *FlowSnmpv2CData { if x != nil { - return x.Protocol + return x.Data } return nil } -// Response for action triggered against configured resources along with warnings. -type ControlActionResponse struct { +// This contains the body of the SNMPv2C message. +// +// - Encoding of subsequent fields follow ASN.1 specification. +// Refer: http://www.itu.int/ITU-T/asn1/ +type FlowSnmpv2CData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // List of warnings generated while triggering specified action - Warnings []string `protobuf:"bytes,1,rep,name=warnings,proto3" json:"warnings,omitempty"` // Description missing in models - Response *ActionResponse `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` + // required = true + Choice *FlowSnmpv2CData_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowSnmpv2CData_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + GetRequest *FlowSnmpv2CPDU `protobuf:"bytes,2,opt,name=get_request,json=getRequest,proto3" json:"get_request,omitempty"` + // Description missing in models + GetNextRequest *FlowSnmpv2CPDU `protobuf:"bytes,3,opt,name=get_next_request,json=getNextRequest,proto3" json:"get_next_request,omitempty"` + // Description missing in models + Response *FlowSnmpv2CPDU `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"` + // Description missing in models + SetRequest *FlowSnmpv2CPDU `protobuf:"bytes,5,opt,name=set_request,json=setRequest,proto3" json:"set_request,omitempty"` + // Description missing in models + GetBulkRequest *FlowSnmpv2CBulkPDU `protobuf:"bytes,6,opt,name=get_bulk_request,json=getBulkRequest,proto3" json:"get_bulk_request,omitempty"` + // Description missing in models + InformRequest *FlowSnmpv2CPDU `protobuf:"bytes,7,opt,name=inform_request,json=informRequest,proto3" json:"inform_request,omitempty"` + // Description missing in models + Snmpv2Trap *FlowSnmpv2CPDU `protobuf:"bytes,8,opt,name=snmpv2_trap,json=snmpv2Trap,proto3" json:"snmpv2_trap,omitempty"` + // Description missing in models + Report *FlowSnmpv2CPDU `protobuf:"bytes,9,opt,name=report,proto3" json:"report,omitempty"` } -func (x *ControlActionResponse) Reset() { - *x = ControlActionResponse{} +func (x *FlowSnmpv2CData) Reset() { + *x = FlowSnmpv2CData{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[332] + mi := &file_otg_proto_msgTypes[322] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ControlActionResponse) String() string { +func (x *FlowSnmpv2CData) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ControlActionResponse) ProtoMessage() {} +func (*FlowSnmpv2CData) ProtoMessage() {} -func (x *ControlActionResponse) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[332] +func (x *FlowSnmpv2CData) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[322] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -50384,118 +52877,109 @@ func (x *ControlActionResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ControlActionResponse.ProtoReflect.Descriptor instead. -func (*ControlActionResponse) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{332} +// Deprecated: Use FlowSnmpv2CData.ProtoReflect.Descriptor instead. +func (*FlowSnmpv2CData) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{322} } -func (x *ControlActionResponse) GetWarnings() []string { - if x != nil { - return x.Warnings +func (x *FlowSnmpv2CData) GetChoice() FlowSnmpv2CData_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return FlowSnmpv2CData_Choice_unspecified } -func (x *ControlActionResponse) GetResponse() *ActionResponse { +func (x *FlowSnmpv2CData) GetGetRequest() *FlowSnmpv2CPDU { if x != nil { - return x.Response + return x.GetRequest } return nil } -// Response for action triggered against configured resources. -type ActionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // required = true - Choice *ActionResponse_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionResponse_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Protocol *ActionResponseProtocol `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` +func (x *FlowSnmpv2CData) GetGetNextRequest() *FlowSnmpv2CPDU { + if x != nil { + return x.GetNextRequest + } + return nil } -func (x *ActionResponse) Reset() { - *x = ActionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[333] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowSnmpv2CData) GetResponse() *FlowSnmpv2CPDU { + if x != nil { + return x.Response } + return nil } -func (x *ActionResponse) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *FlowSnmpv2CData) GetSetRequest() *FlowSnmpv2CPDU { + if x != nil { + return x.SetRequest + } + return nil } -func (*ActionResponse) ProtoMessage() {} - -func (x *ActionResponse) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[333] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *FlowSnmpv2CData) GetGetBulkRequest() *FlowSnmpv2CBulkPDU { + if x != nil { + return x.GetBulkRequest } - return mi.MessageOf(x) + return nil } -// Deprecated: Use ActionResponse.ProtoReflect.Descriptor instead. -func (*ActionResponse) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{333} +func (x *FlowSnmpv2CData) GetInformRequest() *FlowSnmpv2CPDU { + if x != nil { + return x.InformRequest + } + return nil } -func (x *ActionResponse) GetChoice() ActionResponse_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowSnmpv2CData) GetSnmpv2Trap() *FlowSnmpv2CPDU { + if x != nil { + return x.Snmpv2Trap } - return ActionResponse_Choice_unspecified + return nil } -func (x *ActionResponse) GetProtocol() *ActionResponseProtocol { +func (x *FlowSnmpv2CData) GetReport() *FlowSnmpv2CPDU { if x != nil { - return x.Protocol + return x.Report } return nil } -// Actions associated with protocols on configured resources. -type ActionProtocol struct { +// This contains the body of the SNMPv2C PDU. +type FlowSnmpv2CPDU struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // required = true - Choice *ActionProtocol_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionProtocol_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Ipv4 *ActionProtocolIpv4 `protobuf:"bytes,2,opt,name=ipv4,proto3" json:"ipv4,omitempty"` - // Description missing in models - Ipv6 *ActionProtocolIpv6 `protobuf:"bytes,3,opt,name=ipv6,proto3" json:"ipv6,omitempty"` + RequestId *PatternFlowSnmpv2CPDURequestId `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // The SNMP agent places an error code in this field in the response message if an error + // occurred processing the request. + // default = ErrorStatus.Enum.no_error + ErrorStatus *FlowSnmpv2CPDU_ErrorStatus_Enum `protobuf:"varint,2,opt,name=error_status,json=errorStatus,proto3,enum=otg.FlowSnmpv2CPDU_ErrorStatus_Enum,oneof" json:"error_status,omitempty"` // Description missing in models - Bgp *ActionProtocolBgp `protobuf:"bytes,4,opt,name=bgp,proto3" json:"bgp,omitempty"` + ErrorIndex *PatternFlowSnmpv2CPDUErrorIndex `protobuf:"bytes,3,opt,name=error_index,json=errorIndex,proto3" json:"error_index,omitempty"` + // A Sequence of variable_bindings. + VariableBindings []*FlowSnmpv2CVariableBinding `protobuf:"bytes,4,rep,name=variable_bindings,json=variableBindings,proto3" json:"variable_bindings,omitempty"` } -func (x *ActionProtocol) Reset() { - *x = ActionProtocol{} +func (x *FlowSnmpv2CPDU) Reset() { + *x = FlowSnmpv2CPDU{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[334] + mi := &file_otg_proto_msgTypes[323] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionProtocol) String() string { +func (x *FlowSnmpv2CPDU) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionProtocol) ProtoMessage() {} +func (*FlowSnmpv2CPDU) ProtoMessage() {} -func (x *ActionProtocol) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[334] +func (x *FlowSnmpv2CPDU) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[323] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -50506,71 +52990,74 @@ func (x *ActionProtocol) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionProtocol.ProtoReflect.Descriptor instead. -func (*ActionProtocol) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{334} +// Deprecated: Use FlowSnmpv2CPDU.ProtoReflect.Descriptor instead. +func (*FlowSnmpv2CPDU) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{323} } -func (x *ActionProtocol) GetChoice() ActionProtocol_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowSnmpv2CPDU) GetRequestId() *PatternFlowSnmpv2CPDURequestId { + if x != nil { + return x.RequestId } - return ActionProtocol_Choice_unspecified + return nil } -func (x *ActionProtocol) GetIpv4() *ActionProtocolIpv4 { - if x != nil { - return x.Ipv4 +func (x *FlowSnmpv2CPDU) GetErrorStatus() FlowSnmpv2CPDU_ErrorStatus_Enum { + if x != nil && x.ErrorStatus != nil { + return *x.ErrorStatus } - return nil + return FlowSnmpv2CPDU_ErrorStatus_unspecified } -func (x *ActionProtocol) GetIpv6() *ActionProtocolIpv6 { +func (x *FlowSnmpv2CPDU) GetErrorIndex() *PatternFlowSnmpv2CPDUErrorIndex { if x != nil { - return x.Ipv6 + return x.ErrorIndex } return nil } -func (x *ActionProtocol) GetBgp() *ActionProtocolBgp { +func (x *FlowSnmpv2CPDU) GetVariableBindings() []*FlowSnmpv2CVariableBinding { if x != nil { - return x.Bgp + return x.VariableBindings } return nil } -// Response for actions associated with protocols on configured resources. -type ActionResponseProtocol struct { +// The purpose of the GetBulkRequest-PDU is to request the transfer of a potentially +// large amount of data, including, but not limited to, the efficient and rapid retrieval +// of large tables. +type FlowSnmpv2CBulkPDU struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // required = true - Choice *ActionResponseProtocol_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionResponseProtocol_Choice_Enum,oneof" json:"choice,omitempty"` + RequestId *PatternFlowSnmpv2CBulkPDURequestId `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // Description missing in models - Ipv4 *ActionResponseProtocolIpv4 `protobuf:"bytes,2,opt,name=ipv4,proto3" json:"ipv4,omitempty"` + NonRepeaters *PatternFlowSnmpv2CBulkPDUNonRepeaters `protobuf:"bytes,2,opt,name=non_repeaters,json=nonRepeaters,proto3" json:"non_repeaters,omitempty"` // Description missing in models - Ipv6 *ActionResponseProtocolIpv6 `protobuf:"bytes,3,opt,name=ipv6,proto3" json:"ipv6,omitempty"` + MaxRepetitions *PatternFlowSnmpv2CBulkPDUMaxRepetitions `protobuf:"bytes,3,opt,name=max_repetitions,json=maxRepetitions,proto3" json:"max_repetitions,omitempty"` + // A Sequence of variable_bindings. + VariableBindings []*FlowSnmpv2CVariableBinding `protobuf:"bytes,4,rep,name=variable_bindings,json=variableBindings,proto3" json:"variable_bindings,omitempty"` } -func (x *ActionResponseProtocol) Reset() { - *x = ActionResponseProtocol{} +func (x *FlowSnmpv2CBulkPDU) Reset() { + *x = FlowSnmpv2CBulkPDU{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[335] + mi := &file_otg_proto_msgTypes[324] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionResponseProtocol) String() string { +func (x *FlowSnmpv2CBulkPDU) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionResponseProtocol) ProtoMessage() {} +func (*FlowSnmpv2CBulkPDU) ProtoMessage() {} -func (x *ActionResponseProtocol) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[335] +func (x *FlowSnmpv2CBulkPDU) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[324] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -50581,62 +53068,94 @@ func (x *ActionResponseProtocol) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionResponseProtocol.ProtoReflect.Descriptor instead. -func (*ActionResponseProtocol) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{335} +// Deprecated: Use FlowSnmpv2CBulkPDU.ProtoReflect.Descriptor instead. +func (*FlowSnmpv2CBulkPDU) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{324} } -func (x *ActionResponseProtocol) GetChoice() ActionResponseProtocol_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowSnmpv2CBulkPDU) GetRequestId() *PatternFlowSnmpv2CBulkPDURequestId { + if x != nil { + return x.RequestId } - return ActionResponseProtocol_Choice_unspecified + return nil } -func (x *ActionResponseProtocol) GetIpv4() *ActionResponseProtocolIpv4 { +func (x *FlowSnmpv2CBulkPDU) GetNonRepeaters() *PatternFlowSnmpv2CBulkPDUNonRepeaters { if x != nil { - return x.Ipv4 + return x.NonRepeaters } return nil } -func (x *ActionResponseProtocol) GetIpv6() *ActionResponseProtocolIpv6 { +func (x *FlowSnmpv2CBulkPDU) GetMaxRepetitions() *PatternFlowSnmpv2CBulkPDUMaxRepetitions { if x != nil { - return x.Ipv6 + return x.MaxRepetitions } return nil } -// Actions associated with IPv4 on configured resources. -type ActionProtocolIpv4 struct { +func (x *FlowSnmpv2CBulkPDU) GetVariableBindings() []*FlowSnmpv2CVariableBinding { + if x != nil { + return x.VariableBindings + } + return nil +} + +// A Sequence of two fields, an object_identifier and the value for/from that object_identifier. +type FlowSnmpv2CVariableBinding struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The Object Identifier points to a particular parameter in the SNMP agent. + // - Encoding of this field follows RFC2578(section 3.5) and ASN.1 X.690(section 8.1.3.6) + // specification. + // Refer: http://www.itu.int/ITU-T/asn1/ + // - According to BER, the first two numbers of any OID (x.y) are encoded as one value + // using the formula (40*x)+y. + // Example, the first two numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, + // because (40*1)+3 = 43. + // - After the first two numbers are encoded, the subsequent numbers in the OID are + // each encoded as a byte. + // - However, a special rule is required for large numbers because one byte can only + // represent a number from 0-127. + // - The rule for large numbers states that only the lower 7 bits in the byte are used + // for holding the value (0-127). + // - The highest order bit(8th) is used as a flag to indicate that this number spans + // more than one byte. Therefore, any number over 127 must be encoded using more than + // one byte. + // - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0' cannot be + // encoded using a single byte. + // According to this rule, the number 2680 must be encoded as 0x94 0x78. + // Since the most significant bit is set in the first byte (0x94), it indicates + // that number spans to the next byte. + // Since the most significant bit is not set in the next byte (0x78), it indicates + // that the number ends at the second byte. + // The value is derived by appending 7 bits from each of the concatenated bytes + // i.e (0x14 *128^1) + (0x78 * 128^0) = 2680. + // default = 0.1 + ObjectIdentifier *string `protobuf:"bytes,1,opt,name=object_identifier,json=objectIdentifier,proto3,oneof" json:"object_identifier,omitempty"` // Description missing in models - // required = true - Choice *ActionProtocolIpv4_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionProtocolIpv4_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Ping *ActionProtocolIpv4Ping `protobuf:"bytes,2,opt,name=ping,proto3" json:"ping,omitempty"` + Value *FlowSnmpv2CVariableBindingValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (x *ActionProtocolIpv4) Reset() { - *x = ActionProtocolIpv4{} +func (x *FlowSnmpv2CVariableBinding) Reset() { + *x = FlowSnmpv2CVariableBinding{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[336] + mi := &file_otg_proto_msgTypes[325] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionProtocolIpv4) String() string { +func (x *FlowSnmpv2CVariableBinding) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionProtocolIpv4) ProtoMessage() {} +func (*FlowSnmpv2CVariableBinding) ProtoMessage() {} -func (x *ActionProtocolIpv4) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[336] +func (x *FlowSnmpv2CVariableBinding) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[325] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -50647,55 +53166,99 @@ func (x *ActionProtocolIpv4) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionProtocolIpv4.ProtoReflect.Descriptor instead. -func (*ActionProtocolIpv4) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{336} +// Deprecated: Use FlowSnmpv2CVariableBinding.ProtoReflect.Descriptor instead. +func (*FlowSnmpv2CVariableBinding) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{325} } -func (x *ActionProtocolIpv4) GetChoice() ActionProtocolIpv4_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowSnmpv2CVariableBinding) GetObjectIdentifier() string { + if x != nil && x.ObjectIdentifier != nil { + return *x.ObjectIdentifier } - return ActionProtocolIpv4_Choice_unspecified + return "" } -func (x *ActionProtocolIpv4) GetPing() *ActionProtocolIpv4Ping { +func (x *FlowSnmpv2CVariableBinding) GetValue() *FlowSnmpv2CVariableBindingValue { if x != nil { - return x.Ping + return x.Value } return nil } -// Response for actions associated with IPv4 on configured resources. -type ActionResponseProtocolIpv4 struct { +// The value for the object_identifier as per RFC2578. +type FlowSnmpv2CVariableBindingValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // required = true - Choice *ActionResponseProtocolIpv4_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionResponseProtocolIpv4_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.no_value + Choice *FlowSnmpv2CVariableBindingValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowSnmpv2CVariableBindingValue_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Ping *ActionResponseProtocolIpv4Ping `protobuf:"bytes,2,opt,name=ping,proto3" json:"ping,omitempty"` + IntegerValue *PatternFlowSnmpv2CVariableBindingValueIntegerValue `protobuf:"bytes,2,opt,name=integer_value,json=integerValue,proto3" json:"integer_value,omitempty"` + // Description missing in models + StringValue *FlowSnmpv2CVariableBindingStringValue `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` + // The Object Identifier points to a particular parameter in the SNMP agent. + // - Encoding of this field follows RFC2578(section 3.5) and ASN.1 X.690(section 8.1.3.6) + // specification. + // Refer: http://www.itu.int/ITU-T/asn1/ + // - According to BER, the first two numbers of any OID (x.y) are encoded as one value + // using the formula (40*x)+y. + // Example, the first two numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, + // because (40*1)+3 = 43. + // - After the first two numbers are encoded, the subsequent numbers in the OID are + // each encoded as a byte. + // - However, a special rule is required for large numbers because one byte can only + // represent a number from 0-127. + // - The rule for large numbers states that only the lower 7 bits in the byte are used + // for holding the value (0-127). + // - The highest order bit(8th) is used as a flag to indicate that this number spans + // more than one byte. Therefore, any number over 127 must be encoded using more than + // one byte. + // - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0' cannot be + // encoded using a single byte. + // According to this rule, the number 2680 must be encoded as 0x94 0x78. + // Since the most significant bit is set in the first byte (0x94), it indicates + // that number spans to the next byte. + // Since the most significant bit is not set in the next byte (0x78), it indicates + // that the number ends at the second byte. + // The value is derived by appending 7 bits from each of the concatenated bytes + // i.e (0x14 *128^1) + (0x78 * 128^0) = 2680. + // default = 0.1 + ObjectIdentifierValue *string `protobuf:"bytes,4,opt,name=object_identifier_value,json=objectIdentifierValue,proto3,oneof" json:"object_identifier_value,omitempty"` + // Description missing in models + IpAddressValue *PatternFlowSnmpv2CVariableBindingValueIpAddressValue `protobuf:"bytes,5,opt,name=ip_address_value,json=ipAddressValue,proto3" json:"ip_address_value,omitempty"` + // Description missing in models + CounterValue *PatternFlowSnmpv2CVariableBindingValueCounterValue `protobuf:"bytes,6,opt,name=counter_value,json=counterValue,proto3" json:"counter_value,omitempty"` + // Description missing in models + TimeticksValue *PatternFlowSnmpv2CVariableBindingValueTimeticksValue `protobuf:"bytes,7,opt,name=timeticks_value,json=timeticksValue,proto3" json:"timeticks_value,omitempty"` + // It contains the hex bytes of the value to be sent. As of now it is restricted to + // 10000 bytes. + // default = 00 + ArbitraryValue *string `protobuf:"bytes,8,opt,name=arbitrary_value,json=arbitraryValue,proto3,oneof" json:"arbitrary_value,omitempty"` + // Description missing in models + BigCounterValue *PatternFlowSnmpv2CVariableBindingValueBigCounterValue `protobuf:"bytes,9,opt,name=big_counter_value,json=bigCounterValue,proto3" json:"big_counter_value,omitempty"` + // Description missing in models + UnsignedIntegerValue *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue `protobuf:"bytes,10,opt,name=unsigned_integer_value,json=unsignedIntegerValue,proto3" json:"unsigned_integer_value,omitempty"` } -func (x *ActionResponseProtocolIpv4) Reset() { - *x = ActionResponseProtocolIpv4{} +func (x *FlowSnmpv2CVariableBindingValue) Reset() { + *x = FlowSnmpv2CVariableBindingValue{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[337] + mi := &file_otg_proto_msgTypes[326] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionResponseProtocolIpv4) String() string { +func (x *FlowSnmpv2CVariableBindingValue) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionResponseProtocolIpv4) ProtoMessage() {} +func (*FlowSnmpv2CVariableBindingValue) ProtoMessage() {} -func (x *ActionResponseProtocolIpv4) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[337] +func (x *FlowSnmpv2CVariableBindingValue) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[326] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -50706,115 +53269,115 @@ func (x *ActionResponseProtocolIpv4) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionResponseProtocolIpv4.ProtoReflect.Descriptor instead. -func (*ActionResponseProtocolIpv4) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{337} +// Deprecated: Use FlowSnmpv2CVariableBindingValue.ProtoReflect.Descriptor instead. +func (*FlowSnmpv2CVariableBindingValue) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{326} } -func (x *ActionResponseProtocolIpv4) GetChoice() ActionResponseProtocolIpv4_Choice_Enum { +func (x *FlowSnmpv2CVariableBindingValue) GetChoice() FlowSnmpv2CVariableBindingValue_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return ActionResponseProtocolIpv4_Choice_unspecified + return FlowSnmpv2CVariableBindingValue_Choice_unspecified } -func (x *ActionResponseProtocolIpv4) GetPing() *ActionResponseProtocolIpv4Ping { +func (x *FlowSnmpv2CVariableBindingValue) GetIntegerValue() *PatternFlowSnmpv2CVariableBindingValueIntegerValue { if x != nil { - return x.Ping + return x.IntegerValue } return nil } -// Request for initiating ping between multiple source and destination pairs. -type ActionProtocolIpv4Ping struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *FlowSnmpv2CVariableBindingValue) GetStringValue() *FlowSnmpv2CVariableBindingStringValue { + if x != nil { + return x.StringValue + } + return nil +} - // List of IPv4 ping requests. - Requests []*ActionProtocolIpv4PingRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` +func (x *FlowSnmpv2CVariableBindingValue) GetObjectIdentifierValue() string { + if x != nil && x.ObjectIdentifierValue != nil { + return *x.ObjectIdentifierValue + } + return "" } -func (x *ActionProtocolIpv4Ping) Reset() { - *x = ActionProtocolIpv4Ping{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[338] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowSnmpv2CVariableBindingValue) GetIpAddressValue() *PatternFlowSnmpv2CVariableBindingValueIpAddressValue { + if x != nil { + return x.IpAddressValue } + return nil } -func (x *ActionProtocolIpv4Ping) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *FlowSnmpv2CVariableBindingValue) GetCounterValue() *PatternFlowSnmpv2CVariableBindingValueCounterValue { + if x != nil { + return x.CounterValue + } + return nil } -func (*ActionProtocolIpv4Ping) ProtoMessage() {} +func (x *FlowSnmpv2CVariableBindingValue) GetTimeticksValue() *PatternFlowSnmpv2CVariableBindingValueTimeticksValue { + if x != nil { + return x.TimeticksValue + } + return nil +} -func (x *ActionProtocolIpv4Ping) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[338] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *FlowSnmpv2CVariableBindingValue) GetArbitraryValue() string { + if x != nil && x.ArbitraryValue != nil { + return *x.ArbitraryValue } - return mi.MessageOf(x) + return "" } -// Deprecated: Use ActionProtocolIpv4Ping.ProtoReflect.Descriptor instead. -func (*ActionProtocolIpv4Ping) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{338} +func (x *FlowSnmpv2CVariableBindingValue) GetBigCounterValue() *PatternFlowSnmpv2CVariableBindingValueBigCounterValue { + if x != nil { + return x.BigCounterValue + } + return nil } -func (x *ActionProtocolIpv4Ping) GetRequests() []*ActionProtocolIpv4PingRequest { +func (x *FlowSnmpv2CVariableBindingValue) GetUnsignedIntegerValue() *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue { if x != nil { - return x.Requests + return x.UnsignedIntegerValue } return nil } -// Under Review: Most ping request parameters are still TBD. -// -// Under Review: Most ping request parameters are still TBD. -// -// Request for initiating ping between a single source and destination pair. -// For ping request, 1 IPv4 ICMP Echo Request shall be sent and wait for ping response -// to either succeed or time out. The API wait timeout for each request shall be 300ms. -type ActionProtocolIpv4PingRequest struct { +// It contains the raw/ascii string value to be sent. +type FlowSnmpv2CVariableBindingStringValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name of source IPv4 interface to be used. - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - SrcName *string `protobuf:"bytes,1,opt,name=src_name,json=srcName,proto3,oneof" json:"src_name,omitempty"` - // Destination IPv4 address to ping. - DstIp *string `protobuf:"bytes,2,opt,name=dst_ip,json=dstIp,proto3,oneof" json:"dst_ip,omitempty"` + // Description missing in models + // default = Choice.Enum.ascii + Choice *FlowSnmpv2CVariableBindingStringValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowSnmpv2CVariableBindingStringValue_Choice_Enum,oneof" json:"choice,omitempty"` + // It contains the ASCII string to be sent. As of now it is restricted to 10000 bytes. + // default = ascii + Ascii *string `protobuf:"bytes,2,opt,name=ascii,proto3,oneof" json:"ascii,omitempty"` + // It contains the hex string to be sent. As of now it is restricted to 10000 bytes. + // default = 00 + Raw *string `protobuf:"bytes,3,opt,name=raw,proto3,oneof" json:"raw,omitempty"` } -func (x *ActionProtocolIpv4PingRequest) Reset() { - *x = ActionProtocolIpv4PingRequest{} +func (x *FlowSnmpv2CVariableBindingStringValue) Reset() { + *x = FlowSnmpv2CVariableBindingStringValue{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[339] + mi := &file_otg_proto_msgTypes[327] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionProtocolIpv4PingRequest) String() string { +func (x *FlowSnmpv2CVariableBindingStringValue) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionProtocolIpv4PingRequest) ProtoMessage() {} +func (*FlowSnmpv2CVariableBindingStringValue) ProtoMessage() {} -func (x *ActionProtocolIpv4PingRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[339] +func (x *FlowSnmpv2CVariableBindingStringValue) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[327] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -50825,52 +53388,76 @@ func (x *ActionProtocolIpv4PingRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionProtocolIpv4PingRequest.ProtoReflect.Descriptor instead. -func (*ActionProtocolIpv4PingRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{339} +// Deprecated: Use FlowSnmpv2CVariableBindingStringValue.ProtoReflect.Descriptor instead. +func (*FlowSnmpv2CVariableBindingStringValue) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{327} } -func (x *ActionProtocolIpv4PingRequest) GetSrcName() string { - if x != nil && x.SrcName != nil { - return *x.SrcName +func (x *FlowSnmpv2CVariableBindingStringValue) GetChoice() FlowSnmpv2CVariableBindingStringValue_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return FlowSnmpv2CVariableBindingStringValue_Choice_unspecified +} + +func (x *FlowSnmpv2CVariableBindingStringValue) GetAscii() string { + if x != nil && x.Ascii != nil { + return *x.Ascii } return "" } -func (x *ActionProtocolIpv4PingRequest) GetDstIp() string { - if x != nil && x.DstIp != nil { - return *x.DstIp +func (x *FlowSnmpv2CVariableBindingStringValue) GetRaw() string { + if x != nil && x.Raw != nil { + return *x.Raw } return "" } -// Response for ping initiated between multiple source and destination pairs. -type ActionResponseProtocolIpv4Ping struct { +// RSVP packet header as defined in RFC2205 and RFC3209. Currently only supported message +// type is Path with mandatory objects and sub-objects. +type FlowRsvp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // List of responses for IPv4 ping responses. - Responses []*ActionResponseProtocolIpv4PingResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` + // RSVP Protocol Version. + // default = 1 + Version *uint32 `protobuf:"varint,1,opt,name=version,proto3,oneof" json:"version,omitempty"` + // Flag, 0x01-0x08: Reserved. + // default = Flag.Enum.not_refresh_reduction_capable + Flag *FlowRsvp_Flag_Enum `protobuf:"varint,2,opt,name=flag,proto3,enum=otg.FlowRsvp_Flag_Enum,oneof" json:"flag,omitempty"` + // Description missing in models + RsvpChecksum *PatternFlowRsvpRsvpChecksum `protobuf:"bytes,3,opt,name=rsvp_checksum,json=rsvpChecksum,proto3" json:"rsvp_checksum,omitempty"` + // Description missing in models + TimeToLive *PatternFlowRsvpTimeToLive `protobuf:"bytes,4,opt,name=time_to_live,json=timeToLive,proto3" json:"time_to_live,omitempty"` + // Description missing in models + Reserved *PatternFlowRsvpReserved `protobuf:"bytes,5,opt,name=reserved,proto3" json:"reserved,omitempty"` + // The sum of the lengths of the common header and all objects included in the message. + RsvpLength *FlowRSVPLength `protobuf:"bytes,6,opt,name=rsvp_length,json=rsvpLength,proto3" json:"rsvp_length,omitempty"` + // An 8-bit number that identifies the function of the RSVP message. There are aound + // 20 message types defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-2 + // . Among these presently supported is Path(value: 1) message type. + MessageType *FlowRSVPMessage `protobuf:"bytes,7,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"` } -func (x *ActionResponseProtocolIpv4Ping) Reset() { - *x = ActionResponseProtocolIpv4Ping{} +func (x *FlowRsvp) Reset() { + *x = FlowRsvp{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[340] + mi := &file_otg_proto_msgTypes[328] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionResponseProtocolIpv4Ping) String() string { +func (x *FlowRsvp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionResponseProtocolIpv4Ping) ProtoMessage() {} +func (*FlowRsvp) ProtoMessage() {} -func (x *ActionResponseProtocolIpv4Ping) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[340] +func (x *FlowRsvp) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[328] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -50881,59 +53468,96 @@ func (x *ActionResponseProtocolIpv4Ping) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionResponseProtocolIpv4Ping.ProtoReflect.Descriptor instead. -func (*ActionResponseProtocolIpv4Ping) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{340} +// Deprecated: Use FlowRsvp.ProtoReflect.Descriptor instead. +func (*FlowRsvp) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{328} } -func (x *ActionResponseProtocolIpv4Ping) GetResponses() []*ActionResponseProtocolIpv4PingResponse { +func (x *FlowRsvp) GetVersion() uint32 { + if x != nil && x.Version != nil { + return *x.Version + } + return 0 +} + +func (x *FlowRsvp) GetFlag() FlowRsvp_Flag_Enum { + if x != nil && x.Flag != nil { + return *x.Flag + } + return FlowRsvp_Flag_unspecified +} + +func (x *FlowRsvp) GetRsvpChecksum() *PatternFlowRsvpRsvpChecksum { if x != nil { - return x.Responses + return x.RsvpChecksum } return nil } -// Response for ping initiated between a single source and destination pair. -type ActionResponseProtocolIpv4PingResponse struct { +func (x *FlowRsvp) GetTimeToLive() *PatternFlowRsvpTimeToLive { + if x != nil { + return x.TimeToLive + } + return nil +} + +func (x *FlowRsvp) GetReserved() *PatternFlowRsvpReserved { + if x != nil { + return x.Reserved + } + return nil +} + +func (x *FlowRsvp) GetRsvpLength() *FlowRSVPLength { + if x != nil { + return x.RsvpLength + } + return nil +} + +func (x *FlowRsvp) GetMessageType() *FlowRSVPMessage { + if x != nil { + return x.MessageType + } + return nil +} + +// Description missing in models +type FlowRSVPLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name of source IPv4 interface used for ping. - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - // required = true - SrcName *string `protobuf:"bytes,1,opt,name=src_name,json=srcName,proto3,oneof" json:"src_name,omitempty"` - // Destination IPv4 address used for ping. - // required = true - DstIp *string `protobuf:"bytes,2,opt,name=dst_ip,json=dstIp,proto3,oneof" json:"dst_ip,omitempty"` - // Result of the ping request. - // required = true - Result *ActionResponseProtocolIpv4PingResponse_Result_Enum `protobuf:"varint,3,opt,name=result,proto3,enum=otg.ActionResponseProtocolIpv4PingResponse_Result_Enum,oneof" json:"result,omitempty"` + // auto or configured value. + // default = Choice.Enum.auto + Choice *FlowRSVPLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPLength_Choice_Enum,oneof" json:"choice,omitempty"` + // The OTG implementation will provide a system generated value for this property. + // If the OTG implementation is unable to generate a value the default value must be + // used. + // default = 0 + Auto *uint32 `protobuf:"varint,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *ActionResponseProtocolIpv4PingResponse) Reset() { - *x = ActionResponseProtocolIpv4PingResponse{} +func (x *FlowRSVPLength) Reset() { + *x = FlowRSVPLength{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[341] + mi := &file_otg_proto_msgTypes[329] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionResponseProtocolIpv4PingResponse) String() string { +func (x *FlowRSVPLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionResponseProtocolIpv4PingResponse) ProtoMessage() {} +func (*FlowRSVPLength) ProtoMessage() {} -func (x *ActionResponseProtocolIpv4PingResponse) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[341] +func (x *FlowRSVPLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[329] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -50944,62 +53568,62 @@ func (x *ActionResponseProtocolIpv4PingResponse) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use ActionResponseProtocolIpv4PingResponse.ProtoReflect.Descriptor instead. -func (*ActionResponseProtocolIpv4PingResponse) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{341} +// Deprecated: Use FlowRSVPLength.ProtoReflect.Descriptor instead. +func (*FlowRSVPLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{329} } -func (x *ActionResponseProtocolIpv4PingResponse) GetSrcName() string { - if x != nil && x.SrcName != nil { - return *x.SrcName +func (x *FlowRSVPLength) GetChoice() FlowRSVPLength_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return FlowRSVPLength_Choice_unspecified } -func (x *ActionResponseProtocolIpv4PingResponse) GetDstIp() string { - if x != nil && x.DstIp != nil { - return *x.DstIp +func (x *FlowRSVPLength) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto } - return "" + return 0 } -func (x *ActionResponseProtocolIpv4PingResponse) GetResult() ActionResponseProtocolIpv4PingResponse_Result_Enum { - if x != nil && x.Result != nil { - return *x.Result +func (x *FlowRSVPLength) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } - return ActionResponseProtocolIpv4PingResponse_Result_unspecified + return 0 } -// Actions associated with IPv6 on configured resources. -type ActionProtocolIpv6 struct { +// Description missing in models +type FlowRSVPMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // required = true - Choice *ActionProtocolIpv6_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionProtocolIpv6_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.path + Choice *FlowRSVPMessage_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPMessage_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Ping *ActionProtocolIpv6Ping `protobuf:"bytes,2,opt,name=ping,proto3" json:"ping,omitempty"` + Path *FlowRSVPPathMessage `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` } -func (x *ActionProtocolIpv6) Reset() { - *x = ActionProtocolIpv6{} +func (x *FlowRSVPMessage) Reset() { + *x = FlowRSVPMessage{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[342] + mi := &file_otg_proto_msgTypes[330] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionProtocolIpv6) String() string { +func (x *FlowRSVPMessage) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionProtocolIpv6) ProtoMessage() {} +func (*FlowRSVPMessage) ProtoMessage() {} -func (x *ActionProtocolIpv6) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[342] +func (x *FlowRSVPMessage) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[330] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -51010,55 +53634,56 @@ func (x *ActionProtocolIpv6) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionProtocolIpv6.ProtoReflect.Descriptor instead. -func (*ActionProtocolIpv6) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{342} +// Deprecated: Use FlowRSVPMessage.ProtoReflect.Descriptor instead. +func (*FlowRSVPMessage) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{330} } -func (x *ActionProtocolIpv6) GetChoice() ActionProtocolIpv6_Choice_Enum { +func (x *FlowRSVPMessage) GetChoice() FlowRSVPMessage_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return ActionProtocolIpv6_Choice_unspecified + return FlowRSVPMessage_Choice_unspecified } -func (x *ActionProtocolIpv6) GetPing() *ActionProtocolIpv6Ping { +func (x *FlowRSVPMessage) GetPath() *FlowRSVPPathMessage { if x != nil { - return x.Ping + return x.Path } return nil } -// Response for actions associated with IPv6 on configured resources. -type ActionResponseProtocolIpv6 struct { +// Path message requires the following list of objects in order as defined in https://www.rfc-editor.org/rfc/rfc3209.html#page-15: +// 1. SESSION 2. RSVP_HOP 3. TIME_VALUES 4. EXPLICIT_ROUTE [optional] 5. LABEL_REQUEST +// 6. SESSION_ATTRIBUTE [optional] 7. SENDER_TEMPLATE 8. SENDER_TSPEC 9. RECORD_ROUTE +// [optional] +type FlowRSVPPathMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // required = true - Choice *ActionResponseProtocolIpv6_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionResponseProtocolIpv6_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Ping *ActionResponseProtocolIpv6Ping `protobuf:"bytes,2,opt,name=ping,proto3" json:"ping,omitempty"` + // Path message requires atleast SESSION, RSVP_HOP, TIME_VALUES, LABEL_REQUEST, SENDER_TEMPLATE + // and SENDER_TSPEC objects in order. + Objects []*FlowRSVPPathObjects `protobuf:"bytes,1,rep,name=objects,proto3" json:"objects,omitempty"` } -func (x *ActionResponseProtocolIpv6) Reset() { - *x = ActionResponseProtocolIpv6{} +func (x *FlowRSVPPathMessage) Reset() { + *x = FlowRSVPPathMessage{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[343] + mi := &file_otg_proto_msgTypes[331] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionResponseProtocolIpv6) String() string { +func (x *FlowRSVPPathMessage) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionResponseProtocolIpv6) ProtoMessage() {} +func (*FlowRSVPPathMessage) ProtoMessage() {} -func (x *ActionResponseProtocolIpv6) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[343] +func (x *FlowRSVPPathMessage) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[331] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -51069,52 +53694,46 @@ func (x *ActionResponseProtocolIpv6) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionResponseProtocolIpv6.ProtoReflect.Descriptor instead. -func (*ActionResponseProtocolIpv6) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{343} -} - -func (x *ActionResponseProtocolIpv6) GetChoice() ActionResponseProtocolIpv6_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return ActionResponseProtocolIpv6_Choice_unspecified +// Deprecated: Use FlowRSVPPathMessage.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathMessage) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{331} } -func (x *ActionResponseProtocolIpv6) GetPing() *ActionResponseProtocolIpv6Ping { +func (x *FlowRSVPPathMessage) GetObjects() []*FlowRSVPPathObjects { if x != nil { - return x.Ping + return x.Objects } return nil } -// Request for initiating ping between multiple source and destination pairs. -type ActionProtocolIpv6Ping struct { +// Every RSVP object encapsulated in an RSVP message consists of a 32-bit word header +// and the object's contents. +type FlowRSVPPathObjects struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // List of IPv6 ping requests. - Requests []*ActionProtocolIpv6PingRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` + // Description missing in models + ClassNum *FlowRSVPPathObjectsClass `protobuf:"bytes,1,opt,name=class_num,json=classNum,proto3" json:"class_num,omitempty"` } -func (x *ActionProtocolIpv6Ping) Reset() { - *x = ActionProtocolIpv6Ping{} +func (x *FlowRSVPPathObjects) Reset() { + *x = FlowRSVPPathObjects{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[344] + mi := &file_otg_proto_msgTypes[332] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionProtocolIpv6Ping) String() string { +func (x *FlowRSVPPathObjects) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionProtocolIpv6Ping) ProtoMessage() {} +func (*FlowRSVPPathObjects) ProtoMessage() {} -func (x *ActionProtocolIpv6Ping) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[344] +func (x *FlowRSVPPathObjects) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[332] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -51125,59 +53744,54 @@ func (x *ActionProtocolIpv6Ping) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionProtocolIpv6Ping.ProtoReflect.Descriptor instead. -func (*ActionProtocolIpv6Ping) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{344} +// Deprecated: Use FlowRSVPPathObjects.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjects) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{332} } -func (x *ActionProtocolIpv6Ping) GetRequests() []*ActionProtocolIpv6PingRequest { +func (x *FlowRSVPPathObjects) GetClassNum() *FlowRSVPPathObjectsClass { if x != nil { - return x.Requests + return x.ClassNum } return nil } -// Under Review: Most ping request parameters are still TBD. -// -// Under Review: Most ping request parameters are still TBD. -// -// Request for initiating ping between a single source and destination pair. -// For ping request, 1 IPv6 ICMP Echo Request shall be sent and wait for ping response -// to either succeed or time out. The API wait timeout for each request shall be 300ms. -type ActionProtocolIpv6PingRequest struct { +// Description missing in models +type FlowRSVPObjectLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name of source IPv6 interface to be used. - // - // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name - SrcName *string `protobuf:"bytes,1,opt,name=src_name,json=srcName,proto3,oneof" json:"src_name,omitempty"` - // Destination IPv6 address to ping. - DstIp *string `protobuf:"bytes,2,opt,name=dst_ip,json=dstIp,proto3,oneof" json:"dst_ip,omitempty"` + // auto or configured value. + // default = Choice.Enum.auto + Choice *FlowRSVPObjectLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPObjectLength_Choice_Enum,oneof" json:"choice,omitempty"` + // The OTG implementation will provide a system generated value for this property. + // If the OTG implementation is unable to generate a value the default value must be + // used. + // default = 4 + Auto *uint32 `protobuf:"varint,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` + // Description missing in models + // default = 4 + Value *uint32 `protobuf:"varint,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *ActionProtocolIpv6PingRequest) Reset() { - *x = ActionProtocolIpv6PingRequest{} +func (x *FlowRSVPObjectLength) Reset() { + *x = FlowRSVPObjectLength{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[345] + mi := &file_otg_proto_msgTypes[333] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionProtocolIpv6PingRequest) String() string { +func (x *FlowRSVPObjectLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionProtocolIpv6PingRequest) ProtoMessage() {} +func (*FlowRSVPObjectLength) ProtoMessage() {} -func (x *ActionProtocolIpv6PingRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[345] +func (x *FlowRSVPObjectLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[333] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -51188,52 +53802,85 @@ func (x *ActionProtocolIpv6PingRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionProtocolIpv6PingRequest.ProtoReflect.Descriptor instead. -func (*ActionProtocolIpv6PingRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{345} +// Deprecated: Use FlowRSVPObjectLength.ProtoReflect.Descriptor instead. +func (*FlowRSVPObjectLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{333} } -func (x *ActionProtocolIpv6PingRequest) GetSrcName() string { - if x != nil && x.SrcName != nil { - return *x.SrcName +func (x *FlowRSVPObjectLength) GetChoice() FlowRSVPObjectLength_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return FlowRSVPObjectLength_Choice_unspecified } -func (x *ActionProtocolIpv6PingRequest) GetDstIp() string { - if x != nil && x.DstIp != nil { - return *x.DstIp +func (x *FlowRSVPObjectLength) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto } - return "" + return 0 } -// Response for ping initiated between multiple source and destination pairs. -type ActionResponseProtocolIpv6Ping struct { +func (x *FlowRSVPObjectLength) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value + } + return 0 +} + +// The class number is used to identify the class of an object. Defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-4 +// . Curently supported class numbers are for Path message type. Path message: Supported +// Class numbers and it's value: SESSION: 1, RSVP_HOP: 3, TIME_VALUES: 5, EXPLICIT_ROUTE: +// 20, LABEL_REQUEST: 19, SESSION_ATTRIBUTE: 207, SENDER_TEMPLATE: 11, SENDER_TSPEC: +// 12, RECORD_ROUTE: 21, Custom: User defined bytes based on class and c-types not supported +// in above options. +type FlowRSVPPathObjectsClass struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // List of responses for IPv6 ping responses. - Responses []*ActionResponseProtocolIpv6PingResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` + // Description missing in models + // required = true + Choice *FlowRSVPPathObjectsClass_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsClass_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Session *FlowRSVPPathObjectsClassSession `protobuf:"bytes,2,opt,name=session,proto3" json:"session,omitempty"` + // Description missing in models + RsvpHop *FlowRSVPPathObjectsClassRsvpHop `protobuf:"bytes,3,opt,name=rsvp_hop,json=rsvpHop,proto3" json:"rsvp_hop,omitempty"` + // Description missing in models + TimeValues *FlowRSVPPathObjectsClassTimeValues `protobuf:"bytes,4,opt,name=time_values,json=timeValues,proto3" json:"time_values,omitempty"` + // Description missing in models + ExplicitRoute *FlowRSVPPathObjectsClassExplicitRoute `protobuf:"bytes,5,opt,name=explicit_route,json=explicitRoute,proto3" json:"explicit_route,omitempty"` + // Description missing in models + LabelRequest *FlowRSVPPathObjectsClassLabelRequest `protobuf:"bytes,6,opt,name=label_request,json=labelRequest,proto3" json:"label_request,omitempty"` + // Description missing in models + SessionAttribute *FlowRSVPPathObjectsClassSessionAttribute `protobuf:"bytes,7,opt,name=session_attribute,json=sessionAttribute,proto3" json:"session_attribute,omitempty"` + // Description missing in models + SenderTemplate *FlowRSVPPathObjectsClassSenderTemplate `protobuf:"bytes,8,opt,name=sender_template,json=senderTemplate,proto3" json:"sender_template,omitempty"` + // Description missing in models + SenderTspec *FlowRSVPPathObjectsClassSenderTspec `protobuf:"bytes,9,opt,name=sender_tspec,json=senderTspec,proto3" json:"sender_tspec,omitempty"` + // Description missing in models + RecordRoute *FlowRSVPPathObjectsClassRecordRoute `protobuf:"bytes,10,opt,name=record_route,json=recordRoute,proto3" json:"record_route,omitempty"` + // Description missing in models + Custom *FlowRSVPPathObjectsCustom `protobuf:"bytes,11,opt,name=custom,proto3" json:"custom,omitempty"` } -func (x *ActionResponseProtocolIpv6Ping) Reset() { - *x = ActionResponseProtocolIpv6Ping{} +func (x *FlowRSVPPathObjectsClass) Reset() { + *x = FlowRSVPPathObjectsClass{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[346] + mi := &file_otg_proto_msgTypes[334] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionResponseProtocolIpv6Ping) String() string { +func (x *FlowRSVPPathObjectsClass) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionResponseProtocolIpv6Ping) ProtoMessage() {} +func (*FlowRSVPPathObjectsClass) ProtoMessage() {} -func (x *ActionResponseProtocolIpv6Ping) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[346] +func (x *FlowRSVPPathObjectsClass) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[334] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -51244,59 +53891,118 @@ func (x *ActionResponseProtocolIpv6Ping) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionResponseProtocolIpv6Ping.ProtoReflect.Descriptor instead. -func (*ActionResponseProtocolIpv6Ping) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{346} +// Deprecated: Use FlowRSVPPathObjectsClass.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsClass) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{334} } -func (x *ActionResponseProtocolIpv6Ping) GetResponses() []*ActionResponseProtocolIpv6PingResponse { +func (x *FlowRSVPPathObjectsClass) GetChoice() FlowRSVPPathObjectsClass_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return FlowRSVPPathObjectsClass_Choice_unspecified +} + +func (x *FlowRSVPPathObjectsClass) GetSession() *FlowRSVPPathObjectsClassSession { if x != nil { - return x.Responses + return x.Session } return nil } -// Response for ping initiated between a single source and destination pair. -type ActionResponseProtocolIpv6PingResponse struct { +func (x *FlowRSVPPathObjectsClass) GetRsvpHop() *FlowRSVPPathObjectsClassRsvpHop { + if x != nil { + return x.RsvpHop + } + return nil +} + +func (x *FlowRSVPPathObjectsClass) GetTimeValues() *FlowRSVPPathObjectsClassTimeValues { + if x != nil { + return x.TimeValues + } + return nil +} + +func (x *FlowRSVPPathObjectsClass) GetExplicitRoute() *FlowRSVPPathObjectsClassExplicitRoute { + if x != nil { + return x.ExplicitRoute + } + return nil +} + +func (x *FlowRSVPPathObjectsClass) GetLabelRequest() *FlowRSVPPathObjectsClassLabelRequest { + if x != nil { + return x.LabelRequest + } + return nil +} + +func (x *FlowRSVPPathObjectsClass) GetSessionAttribute() *FlowRSVPPathObjectsClassSessionAttribute { + if x != nil { + return x.SessionAttribute + } + return nil +} + +func (x *FlowRSVPPathObjectsClass) GetSenderTemplate() *FlowRSVPPathObjectsClassSenderTemplate { + if x != nil { + return x.SenderTemplate + } + return nil +} + +func (x *FlowRSVPPathObjectsClass) GetSenderTspec() *FlowRSVPPathObjectsClassSenderTspec { + if x != nil { + return x.SenderTspec + } + return nil +} + +func (x *FlowRSVPPathObjectsClass) GetRecordRoute() *FlowRSVPPathObjectsClassRecordRoute { + if x != nil { + return x.RecordRoute + } + return nil +} + +func (x *FlowRSVPPathObjectsClass) GetCustom() *FlowRSVPPathObjectsCustom { + if x != nil { + return x.Custom + } + return nil +} + +// C-Type is specific to a class num. +type FlowRSVPPathObjectsClassSession struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name of source IPv6 interface used for ping. - // - // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name - // - // required = true - SrcName *string `protobuf:"bytes,1,opt,name=src_name,json=srcName,proto3,oneof" json:"src_name,omitempty"` - // Destination IPv6 address used for ping. - // required = true - DstIp *string `protobuf:"bytes,2,opt,name=dst_ip,json=dstIp,proto3,oneof" json:"dst_ip,omitempty"` - // Result of the ping request. - // required = true - Result *ActionResponseProtocolIpv6PingResponse_Result_Enum `protobuf:"varint,3,opt,name=result,proto3,enum=otg.ActionResponseProtocolIpv6PingResponse_Result_Enum,oneof" json:"result,omitempty"` + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` + // Description missing in models + CType *FlowRSVPPathObjectsSessionCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` } -func (x *ActionResponseProtocolIpv6PingResponse) Reset() { - *x = ActionResponseProtocolIpv6PingResponse{} +func (x *FlowRSVPPathObjectsClassSession) Reset() { + *x = FlowRSVPPathObjectsClassSession{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[347] + mi := &file_otg_proto_msgTypes[335] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionResponseProtocolIpv6PingResponse) String() string { +func (x *FlowRSVPPathObjectsClassSession) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionResponseProtocolIpv6PingResponse) ProtoMessage() {} +func (*FlowRSVPPathObjectsClassSession) ProtoMessage() {} -func (x *ActionResponseProtocolIpv6PingResponse) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[347] +func (x *FlowRSVPPathObjectsClassSession) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[335] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -51307,64 +54013,56 @@ func (x *ActionResponseProtocolIpv6PingResponse) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use ActionResponseProtocolIpv6PingResponse.ProtoReflect.Descriptor instead. -func (*ActionResponseProtocolIpv6PingResponse) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{347} -} - -func (x *ActionResponseProtocolIpv6PingResponse) GetSrcName() string { - if x != nil && x.SrcName != nil { - return *x.SrcName - } - return "" +// Deprecated: Use FlowRSVPPathObjectsClassSession.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsClassSession) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{335} } -func (x *ActionResponseProtocolIpv6PingResponse) GetDstIp() string { - if x != nil && x.DstIp != nil { - return *x.DstIp +func (x *FlowRSVPPathObjectsClassSession) GetLength() *FlowRSVPObjectLength { + if x != nil { + return x.Length } - return "" + return nil } -func (x *ActionResponseProtocolIpv6PingResponse) GetResult() ActionResponseProtocolIpv6PingResponse_Result_Enum { - if x != nil && x.Result != nil { - return *x.Result +func (x *FlowRSVPPathObjectsClassSession) GetCType() *FlowRSVPPathObjectsSessionCType { + if x != nil { + return x.CType } - return ActionResponseProtocolIpv6PingResponse_Result_unspecified + return nil } -// Actions associated with BGP on configured resources. -type ActionProtocolBgp struct { +// The body of an object corresponding to the class number and c-type. Currently supported +// c-type for SESSION object is LSP Tunnel IPv4 (7). +type FlowRSVPPathObjectsSessionCType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // required = true - Choice *ActionProtocolBgp_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionProtocolBgp_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Notification *ActionProtocolBgpNotification `protobuf:"bytes,2,opt,name=notification,proto3" json:"notification,omitempty"` + // default = Choice.Enum.lsp_tunnel_ipv4 + Choice *FlowRSVPPathObjectsSessionCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsSessionCType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - InitiateGracefulRestart *ActionProtocolBgpInitiateGracefulRestart `protobuf:"bytes,3,opt,name=initiate_graceful_restart,json=initiateGracefulRestart,proto3" json:"initiate_graceful_restart,omitempty"` + LspTunnelIpv4 *FlowRSVPPathSessionLspTunnelIpv4 `protobuf:"bytes,2,opt,name=lsp_tunnel_ipv4,json=lspTunnelIpv4,proto3" json:"lsp_tunnel_ipv4,omitempty"` } -func (x *ActionProtocolBgp) Reset() { - *x = ActionProtocolBgp{} +func (x *FlowRSVPPathObjectsSessionCType) Reset() { + *x = FlowRSVPPathObjectsSessionCType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[348] + mi := &file_otg_proto_msgTypes[336] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionProtocolBgp) String() string { +func (x *FlowRSVPPathObjectsSessionCType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionProtocolBgp) ProtoMessage() {} +func (*FlowRSVPPathObjectsSessionCType) ProtoMessage() {} -func (x *ActionProtocolBgp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[348] +func (x *FlowRSVPPathObjectsSessionCType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[336] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -51375,94 +54073,61 @@ func (x *ActionProtocolBgp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionProtocolBgp.ProtoReflect.Descriptor instead. -func (*ActionProtocolBgp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{348} +// Deprecated: Use FlowRSVPPathObjectsSessionCType.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsSessionCType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{336} } -func (x *ActionProtocolBgp) GetChoice() ActionProtocolBgp_Choice_Enum { +func (x *FlowRSVPPathObjectsSessionCType) GetChoice() FlowRSVPPathObjectsSessionCType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return ActionProtocolBgp_Choice_unspecified -} - -func (x *ActionProtocolBgp) GetNotification() *ActionProtocolBgpNotification { - if x != nil { - return x.Notification - } - return nil + return FlowRSVPPathObjectsSessionCType_Choice_unspecified } -func (x *ActionProtocolBgp) GetInitiateGracefulRestart() *ActionProtocolBgpInitiateGracefulRestart { +func (x *FlowRSVPPathObjectsSessionCType) GetLspTunnelIpv4() *FlowRSVPPathSessionLspTunnelIpv4 { if x != nil { - return x.InitiateGracefulRestart + return x.LspTunnelIpv4 } return nil } -// A NOTIFICATION message is sent when an error is detected with the BGP session, such -// as hold timer expiring, misconfigured AS number or a BGP session reset is requested. -// This causes the BGP connection to close. Send explicit NOTIFICATIONs for list of -// specified BGP peers. If a user wants to send custom Error Code and Error Subcode -// the custom object should be configured. A user can send IANA defined BGP NOTIFICATIONs -// according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. -type ActionProtocolBgpNotification struct { +// Class = SESSION, LSP_TUNNEL_IPv4 C-Type = 7. +type FlowRSVPPathSessionLspTunnelIpv4 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of BGP Peers to send NOTIFICATION to. If no name is specified then NOTIFICATION - // will be sent to all configured BGP peers. - // - // x-constraint: - // - /components/schemas/Device.Bgp/properties/name - // - // x-constraint: - // - /components/schemas/Device.Bgp/properties/name - Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` - // Each BGP NOTIFICATION message includes an Error Code field indicating what type of - // problem occurred. For certain Error Codes, an Error Subcode field provides additional - // details about the specific nature of the problem. The choice value will provide - // the Error Code used in NOTIFICATION message. The Subcode can be set for each of - // the corresponding errors except for Hold Timer Expired error and BGP Finite State - // Machine error. In both of these cases Subcode 0 will be sent. If a user wants to - // use non zero Sub Code then custom choice can be used. - // default = Choice.Enum.cease - Choice *ActionProtocolBgpNotification_Choice_Enum `protobuf:"varint,2,opt,name=choice,proto3,enum=otg.ActionProtocolBgpNotification_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Cease *DeviceBgpCeaseError `protobuf:"bytes,3,opt,name=cease,proto3" json:"cease,omitempty"` - // Description missing in models - MessageHeaderError *DeviceBgpMessageHeaderError `protobuf:"bytes,4,opt,name=message_header_error,json=messageHeaderError,proto3" json:"message_header_error,omitempty"` - // Description missing in models - OpenMessageError *DeviceBgpOpenMessageError `protobuf:"bytes,5,opt,name=open_message_error,json=openMessageError,proto3" json:"open_message_error,omitempty"` // Description missing in models - UpdateMessageError *DeviceBgpUpdateMessageError `protobuf:"bytes,6,opt,name=update_message_error,json=updateMessageError,proto3" json:"update_message_error,omitempty"` - // Description missing in models - HoldTimerExpired *DeviceBgpHoldTimerExpired `protobuf:"bytes,7,opt,name=hold_timer_expired,json=holdTimerExpired,proto3" json:"hold_timer_expired,omitempty"` + Ipv4TunnelEndPointAddress *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress `protobuf:"bytes,1,opt,name=ipv4_tunnel_end_point_address,json=ipv4TunnelEndPointAddress,proto3" json:"ipv4_tunnel_end_point_address,omitempty"` // Description missing in models - FiniteStateMachineError *DeviceBgpFiniteStateMachineError `protobuf:"bytes,8,opt,name=finite_state_machine_error,json=finiteStateMachineError,proto3" json:"finite_state_machine_error,omitempty"` + Reserved *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved `protobuf:"bytes,2,opt,name=reserved,proto3" json:"reserved,omitempty"` // Description missing in models - Custom *DeviceBgpCustomError `protobuf:"bytes,9,opt,name=custom,proto3" json:"custom,omitempty"` + TunnelId *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId `protobuf:"bytes,3,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // A 32-bit identifier used in the SESSION that remains constant over the life of the + // tunnel. Normally set to all zeros. Ingress nodes that wish to narrow the scope of + // a SESSION to the ingress-egress pair may place their IPv4 address here as a globally + // unique identifier. + ExtendedTunnelId *FlowRSVPPathSessionExtTunnelId `protobuf:"bytes,4,opt,name=extended_tunnel_id,json=extendedTunnelId,proto3" json:"extended_tunnel_id,omitempty"` } -func (x *ActionProtocolBgpNotification) Reset() { - *x = ActionProtocolBgpNotification{} +func (x *FlowRSVPPathSessionLspTunnelIpv4) Reset() { + *x = FlowRSVPPathSessionLspTunnelIpv4{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[349] + mi := &file_otg_proto_msgTypes[337] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionProtocolBgpNotification) String() string { +func (x *FlowRSVPPathSessionLspTunnelIpv4) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionProtocolBgpNotification) ProtoMessage() {} +func (*FlowRSVPPathSessionLspTunnelIpv4) ProtoMessage() {} -func (x *ActionProtocolBgpNotification) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[349] +func (x *FlowRSVPPathSessionLspTunnelIpv4) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[337] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -51473,113 +54138,137 @@ func (x *ActionProtocolBgpNotification) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionProtocolBgpNotification.ProtoReflect.Descriptor instead. -func (*ActionProtocolBgpNotification) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{349} +// Deprecated: Use FlowRSVPPathSessionLspTunnelIpv4.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathSessionLspTunnelIpv4) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{337} } -func (x *ActionProtocolBgpNotification) GetNames() []string { +func (x *FlowRSVPPathSessionLspTunnelIpv4) GetIpv4TunnelEndPointAddress() *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress { if x != nil { - return x.Names + return x.Ipv4TunnelEndPointAddress } return nil } -func (x *ActionProtocolBgpNotification) GetChoice() ActionProtocolBgpNotification_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowRSVPPathSessionLspTunnelIpv4) GetReserved() *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved { + if x != nil { + return x.Reserved } - return ActionProtocolBgpNotification_Choice_unspecified + return nil } -func (x *ActionProtocolBgpNotification) GetCease() *DeviceBgpCeaseError { +func (x *FlowRSVPPathSessionLspTunnelIpv4) GetTunnelId() *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId { if x != nil { - return x.Cease + return x.TunnelId } return nil } -func (x *ActionProtocolBgpNotification) GetMessageHeaderError() *DeviceBgpMessageHeaderError { +func (x *FlowRSVPPathSessionLspTunnelIpv4) GetExtendedTunnelId() *FlowRSVPPathSessionExtTunnelId { if x != nil { - return x.MessageHeaderError + return x.ExtendedTunnelId } return nil } -func (x *ActionProtocolBgpNotification) GetOpenMessageError() *DeviceBgpOpenMessageError { - if x != nil { - return x.OpenMessageError +// Description missing in models +type FlowRSVPPathSessionExtTunnelId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 32 bit integer or IPv4 address. + // default = Choice.Enum.as_integer + Choice *FlowRSVPPathSessionExtTunnelId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathSessionExtTunnelId_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + AsInteger *PatternFlowRSVPPathSessionExtTunnelIdAsInteger `protobuf:"bytes,2,opt,name=as_integer,json=asInteger,proto3" json:"as_integer,omitempty"` + // Description missing in models + AsIpv4 *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 `protobuf:"bytes,3,opt,name=as_ipv4,json=asIpv4,proto3" json:"as_ipv4,omitempty"` +} + +func (x *FlowRSVPPathSessionExtTunnelId) Reset() { + *x = FlowRSVPPathSessionExtTunnelId{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[338] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *ActionProtocolBgpNotification) GetUpdateMessageError() *DeviceBgpUpdateMessageError { - if x != nil { - return x.UpdateMessageError +func (x *FlowRSVPPathSessionExtTunnelId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlowRSVPPathSessionExtTunnelId) ProtoMessage() {} + +func (x *FlowRSVPPathSessionExtTunnelId) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[338] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *ActionProtocolBgpNotification) GetHoldTimerExpired() *DeviceBgpHoldTimerExpired { - if x != nil { - return x.HoldTimerExpired +// Deprecated: Use FlowRSVPPathSessionExtTunnelId.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathSessionExtTunnelId) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{338} +} + +func (x *FlowRSVPPathSessionExtTunnelId) GetChoice() FlowRSVPPathSessionExtTunnelId_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return FlowRSVPPathSessionExtTunnelId_Choice_unspecified } -func (x *ActionProtocolBgpNotification) GetFiniteStateMachineError() *DeviceBgpFiniteStateMachineError { +func (x *FlowRSVPPathSessionExtTunnelId) GetAsInteger() *PatternFlowRSVPPathSessionExtTunnelIdAsInteger { if x != nil { - return x.FiniteStateMachineError + return x.AsInteger } return nil } -func (x *ActionProtocolBgpNotification) GetCustom() *DeviceBgpCustomError { +func (x *FlowRSVPPathSessionExtTunnelId) GetAsIpv4() *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 { if x != nil { - return x.Custom + return x.AsIpv4 } return nil } -// Initiates BGP Graceful Restart process for the selected BGP peers. If no name is -// specified then Graceful Restart will be sent to all configured BGP peers. -type ActionProtocolBgpInitiateGracefulRestart struct { +// C-Type is specific to a class num. +type FlowRSVPPathObjectsClassRsvpHop struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of device BGP peers objects to control. - // - // x-constraint: - // - /components/schemas/Device.Bgp/properties/name - // - // x-constraint: - // - /components/schemas/Device.Bgp/properties/name - PeerNames []string `protobuf:"bytes,1,rep,name=peer_names,json=peerNames,proto3" json:"peer_names,omitempty"` - // Duration (in seconds) after which selected BGP peers will initiate - // Graceful restart by sending the Open Message with Restart State bit set in the Graceful - // Restart capability. - // default = 30 - RestartDelay *uint32 `protobuf:"varint,2,opt,name=restart_delay,json=restartDelay,proto3,oneof" json:"restart_delay,omitempty"` + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` + // Description missing in models + CType *FlowRSVPPathObjectsRsvpHopCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` } -func (x *ActionProtocolBgpInitiateGracefulRestart) Reset() { - *x = ActionProtocolBgpInitiateGracefulRestart{} +func (x *FlowRSVPPathObjectsClassRsvpHop) Reset() { + *x = FlowRSVPPathObjectsClassRsvpHop{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[350] + mi := &file_otg_proto_msgTypes[339] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionProtocolBgpInitiateGracefulRestart) String() string { +func (x *FlowRSVPPathObjectsClassRsvpHop) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionProtocolBgpInitiateGracefulRestart) ProtoMessage() {} +func (*FlowRSVPPathObjectsClassRsvpHop) ProtoMessage() {} -func (x *ActionProtocolBgpInitiateGracefulRestart) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[350] +func (x *FlowRSVPPathObjectsClassRsvpHop) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[339] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -51590,71 +54279,55 @@ func (x *ActionProtocolBgpInitiateGracefulRestart) ProtoReflect() protoreflect.M return mi.MessageOf(x) } -// Deprecated: Use ActionProtocolBgpInitiateGracefulRestart.ProtoReflect.Descriptor instead. -func (*ActionProtocolBgpInitiateGracefulRestart) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{350} +// Deprecated: Use FlowRSVPPathObjectsClassRsvpHop.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsClassRsvpHop) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{339} } -func (x *ActionProtocolBgpInitiateGracefulRestart) GetPeerNames() []string { +func (x *FlowRSVPPathObjectsClassRsvpHop) GetLength() *FlowRSVPObjectLength { if x != nil { - return x.PeerNames + return x.Length } return nil } -func (x *ActionProtocolBgpInitiateGracefulRestart) GetRestartDelay() uint32 { - if x != nil && x.RestartDelay != nil { - return *x.RestartDelay +func (x *FlowRSVPPathObjectsClassRsvpHop) GetCType() *FlowRSVPPathObjectsRsvpHopCType { + if x != nil { + return x.CType } - return 0 + return nil } -// Request to traffic generator for metrics of choice. -type MetricsRequest struct { +// Object for RSVP_HOP class. Currently supported c-type is IPv4 (1). +type FlowRSVPPathObjectsRsvpHopCType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.port - Choice *MetricsRequest_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.MetricsRequest_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Port *PortMetricsRequest `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` - // Description missing in models - Flow *FlowMetricsRequest `protobuf:"bytes,3,opt,name=flow,proto3" json:"flow,omitempty"` - // Description missing in models - Bgpv4 *Bgpv4MetricsRequest `protobuf:"bytes,4,opt,name=bgpv4,proto3" json:"bgpv4,omitempty"` - // Description missing in models - Bgpv6 *Bgpv6MetricsRequest `protobuf:"bytes,5,opt,name=bgpv6,proto3" json:"bgpv6,omitempty"` - // Description missing in models - Isis *IsisMetricsRequest `protobuf:"bytes,6,opt,name=isis,proto3" json:"isis,omitempty"` - // Description missing in models - Lag *LagMetricsRequest `protobuf:"bytes,7,opt,name=lag,proto3" json:"lag,omitempty"` - // Description missing in models - Lacp *LacpMetricsRequest `protobuf:"bytes,8,opt,name=lacp,proto3" json:"lacp,omitempty"` - // Description missing in models - Lldp *LldpMetricsRequest `protobuf:"bytes,9,opt,name=lldp,proto3" json:"lldp,omitempty"` + // default = Choice.Enum.ipv4 + Choice *FlowRSVPPathObjectsRsvpHopCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsRsvpHopCType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Rsvp *RsvpMetricsRequest `protobuf:"bytes,10,opt,name=rsvp,proto3" json:"rsvp,omitempty"` + Ipv4 *FlowRSVPPathRsvpHopIpv4 `protobuf:"bytes,2,opt,name=ipv4,proto3" json:"ipv4,omitempty"` } -func (x *MetricsRequest) Reset() { - *x = MetricsRequest{} +func (x *FlowRSVPPathObjectsRsvpHopCType) Reset() { + *x = FlowRSVPPathObjectsRsvpHopCType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[351] + mi := &file_otg_proto_msgTypes[340] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MetricsRequest) String() string { +func (x *FlowRSVPPathObjectsRsvpHopCType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MetricsRequest) ProtoMessage() {} +func (*FlowRSVPPathObjectsRsvpHopCType) ProtoMessage() {} -func (x *MetricsRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[351] +func (x *FlowRSVPPathObjectsRsvpHopCType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[340] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -51665,127 +54338,113 @@ func (x *MetricsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MetricsRequest.ProtoReflect.Descriptor instead. -func (*MetricsRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{351} +// Deprecated: Use FlowRSVPPathObjectsRsvpHopCType.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsRsvpHopCType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{340} } -func (x *MetricsRequest) GetChoice() MetricsRequest_Choice_Enum { +func (x *FlowRSVPPathObjectsRsvpHopCType) GetChoice() FlowRSVPPathObjectsRsvpHopCType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return MetricsRequest_Choice_unspecified + return FlowRSVPPathObjectsRsvpHopCType_Choice_unspecified } -func (x *MetricsRequest) GetPort() *PortMetricsRequest { +func (x *FlowRSVPPathObjectsRsvpHopCType) GetIpv4() *FlowRSVPPathRsvpHopIpv4 { if x != nil { - return x.Port + return x.Ipv4 } return nil } -func (x *MetricsRequest) GetFlow() *FlowMetricsRequest { - if x != nil { - return x.Flow - } - return nil -} +// IPv4 RSVP_HOP object: Class = 3, C-Type = 1 +type FlowRSVPPathRsvpHopIpv4 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *MetricsRequest) GetBgpv4() *Bgpv4MetricsRequest { - if x != nil { - return x.Bgpv4 - } - return nil + // Description missing in models + Ipv4Address *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address `protobuf:"bytes,1,opt,name=ipv4_address,json=ipv4Address,proto3" json:"ipv4_address,omitempty"` + // Description missing in models + LogicalInterfaceHandle *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle `protobuf:"bytes,2,opt,name=logical_interface_handle,json=logicalInterfaceHandle,proto3" json:"logical_interface_handle,omitempty"` } -func (x *MetricsRequest) GetBgpv6() *Bgpv6MetricsRequest { - if x != nil { - return x.Bgpv6 +func (x *FlowRSVPPathRsvpHopIpv4) Reset() { + *x = FlowRSVPPathRsvpHopIpv4{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[341] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *MetricsRequest) GetIsis() *IsisMetricsRequest { - if x != nil { - return x.Isis - } - return nil +func (x *FlowRSVPPathRsvpHopIpv4) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *MetricsRequest) GetLag() *LagMetricsRequest { - if x != nil { - return x.Lag +func (*FlowRSVPPathRsvpHopIpv4) ProtoMessage() {} + +func (x *FlowRSVPPathRsvpHopIpv4) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[341] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *MetricsRequest) GetLacp() *LacpMetricsRequest { - if x != nil { - return x.Lacp - } - return nil +// Deprecated: Use FlowRSVPPathRsvpHopIpv4.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathRsvpHopIpv4) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{341} } -func (x *MetricsRequest) GetLldp() *LldpMetricsRequest { +func (x *FlowRSVPPathRsvpHopIpv4) GetIpv4Address() *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address { if x != nil { - return x.Lldp + return x.Ipv4Address } return nil } -func (x *MetricsRequest) GetRsvp() *RsvpMetricsRequest { +func (x *FlowRSVPPathRsvpHopIpv4) GetLogicalInterfaceHandle() *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle { if x != nil { - return x.Rsvp + return x.LogicalInterfaceHandle } return nil } -// Response containing chosen traffic generator metrics. -type MetricsResponse struct { +// C-Type is specific to a class num. +type FlowRSVPPathObjectsClassTimeValues struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` // Description missing in models - // default = Choice.Enum.port_metrics - Choice *MetricsResponse_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.MetricsResponse_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - PortMetrics []*PortMetric `protobuf:"bytes,2,rep,name=port_metrics,json=portMetrics,proto3" json:"port_metrics,omitempty"` - // Description missing in models - FlowMetrics []*FlowMetric `protobuf:"bytes,3,rep,name=flow_metrics,json=flowMetrics,proto3" json:"flow_metrics,omitempty"` - // Description missing in models - Bgpv4Metrics []*Bgpv4Metric `protobuf:"bytes,4,rep,name=bgpv4_metrics,json=bgpv4Metrics,proto3" json:"bgpv4_metrics,omitempty"` - // Description missing in models - Bgpv6Metrics []*Bgpv6Metric `protobuf:"bytes,5,rep,name=bgpv6_metrics,json=bgpv6Metrics,proto3" json:"bgpv6_metrics,omitempty"` - // Description missing in models - IsisMetrics []*IsisMetric `protobuf:"bytes,6,rep,name=isis_metrics,json=isisMetrics,proto3" json:"isis_metrics,omitempty"` - // Description missing in models - LagMetrics []*LagMetric `protobuf:"bytes,7,rep,name=lag_metrics,json=lagMetrics,proto3" json:"lag_metrics,omitempty"` - // Description missing in models - LacpMetrics []*LacpMetric `protobuf:"bytes,8,rep,name=lacp_metrics,json=lacpMetrics,proto3" json:"lacp_metrics,omitempty"` - // Description missing in models - LldpMetrics []*LldpMetric `protobuf:"bytes,9,rep,name=lldp_metrics,json=lldpMetrics,proto3" json:"lldp_metrics,omitempty"` - // Description missing in models - RsvpMetrics []*RsvpMetric `protobuf:"bytes,10,rep,name=rsvp_metrics,json=rsvpMetrics,proto3" json:"rsvp_metrics,omitempty"` + CType *FlowRSVPPathObjectsTimeValuesCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` } -func (x *MetricsResponse) Reset() { - *x = MetricsResponse{} +func (x *FlowRSVPPathObjectsClassTimeValues) Reset() { + *x = FlowRSVPPathObjectsClassTimeValues{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[352] + mi := &file_otg_proto_msgTypes[342] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MetricsResponse) String() string { +func (x *FlowRSVPPathObjectsClassTimeValues) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MetricsResponse) ProtoMessage() {} +func (*FlowRSVPPathObjectsClassTimeValues) ProtoMessage() {} -func (x *MetricsResponse) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[352] +func (x *FlowRSVPPathObjectsClassTimeValues) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[342] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -51796,118 +54455,111 @@ func (x *MetricsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MetricsResponse.ProtoReflect.Descriptor instead. -func (*MetricsResponse) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{352} -} - -func (x *MetricsResponse) GetChoice() MetricsResponse_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return MetricsResponse_Choice_unspecified +// Deprecated: Use FlowRSVPPathObjectsClassTimeValues.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsClassTimeValues) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{342} } -func (x *MetricsResponse) GetPortMetrics() []*PortMetric { +func (x *FlowRSVPPathObjectsClassTimeValues) GetLength() *FlowRSVPObjectLength { if x != nil { - return x.PortMetrics + return x.Length } return nil } -func (x *MetricsResponse) GetFlowMetrics() []*FlowMetric { +func (x *FlowRSVPPathObjectsClassTimeValues) GetCType() *FlowRSVPPathObjectsTimeValuesCType { if x != nil { - return x.FlowMetrics + return x.CType } return nil } -func (x *MetricsResponse) GetBgpv4Metrics() []*Bgpv4Metric { - if x != nil { - return x.Bgpv4Metrics - } - return nil +// Object for TIME_VALUES class. Currently supported c-type is Type 1 Time Value (1). +type FlowRSVPPathObjectsTimeValuesCType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.type_1 + Choice *FlowRSVPPathObjectsTimeValuesCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsTimeValuesCType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Type_1 *FlowRSVPPathTimeValuesType1 `protobuf:"bytes,2,opt,name=type_1,json=type1,proto3" json:"type_1,omitempty"` } -func (x *MetricsResponse) GetBgpv6Metrics() []*Bgpv6Metric { - if x != nil { - return x.Bgpv6Metrics +func (x *FlowRSVPPathObjectsTimeValuesCType) Reset() { + *x = FlowRSVPPathObjectsTimeValuesCType{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[343] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *MetricsResponse) GetIsisMetrics() []*IsisMetric { - if x != nil { - return x.IsisMetrics - } - return nil +func (x *FlowRSVPPathObjectsTimeValuesCType) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *MetricsResponse) GetLagMetrics() []*LagMetric { - if x != nil { - return x.LagMetrics +func (*FlowRSVPPathObjectsTimeValuesCType) ProtoMessage() {} + +func (x *FlowRSVPPathObjectsTimeValuesCType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[343] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *MetricsResponse) GetLacpMetrics() []*LacpMetric { - if x != nil { - return x.LacpMetrics - } - return nil +// Deprecated: Use FlowRSVPPathObjectsTimeValuesCType.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsTimeValuesCType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{343} } -func (x *MetricsResponse) GetLldpMetrics() []*LldpMetric { - if x != nil { - return x.LldpMetrics +func (x *FlowRSVPPathObjectsTimeValuesCType) GetChoice() FlowRSVPPathObjectsTimeValuesCType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return FlowRSVPPathObjectsTimeValuesCType_Choice_unspecified } -func (x *MetricsResponse) GetRsvpMetrics() []*RsvpMetric { +func (x *FlowRSVPPathObjectsTimeValuesCType) GetType_1() *FlowRSVPPathTimeValuesType1 { if x != nil { - return x.RsvpMetrics + return x.Type_1 } return nil } -// The port result request to the traffic generator -type PortMetricsRequest struct { +// TIME_VALUES Object: Class = 5, C-Type = 1 +type FlowRSVPPathTimeValuesType1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of objects to return results for. An empty list will return all port row - // results. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // x-constraint: - // - /components/schemas/Port/properties/name - PortNames []string `protobuf:"bytes,1,rep,name=port_names,json=portNames,proto3" json:"port_names,omitempty"` - // The list of column names that the returned result set will contain. If the list is - // empty then all columns will be returned. The name of the port cannot be excluded. - ColumnNames []PortMetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.PortMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` + // Description missing in models + RefreshPeriodR *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR `protobuf:"bytes,1,opt,name=refresh_period_r,json=refreshPeriodR,proto3" json:"refresh_period_r,omitempty"` } -func (x *PortMetricsRequest) Reset() { - *x = PortMetricsRequest{} +func (x *FlowRSVPPathTimeValuesType1) Reset() { + *x = FlowRSVPPathTimeValuesType1{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[353] + mi := &file_otg_proto_msgTypes[344] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PortMetricsRequest) String() string { +func (x *FlowRSVPPathTimeValuesType1) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PortMetricsRequest) ProtoMessage() {} +func (*FlowRSVPPathTimeValuesType1) ProtoMessage() {} -func (x *PortMetricsRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[353] +func (x *FlowRSVPPathTimeValuesType1) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[344] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -51918,84 +54570,48 @@ func (x *PortMetricsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PortMetricsRequest.ProtoReflect.Descriptor instead. -func (*PortMetricsRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{353} -} - -func (x *PortMetricsRequest) GetPortNames() []string { - if x != nil { - return x.PortNames - } - return nil +// Deprecated: Use FlowRSVPPathTimeValuesType1.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathTimeValuesType1) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{344} } -func (x *PortMetricsRequest) GetColumnNames() []PortMetricsRequest_ColumnNames_Enum { +func (x *FlowRSVPPathTimeValuesType1) GetRefreshPeriodR() *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR { if x != nil { - return x.ColumnNames + return x.RefreshPeriodR } return nil } -// Description missing in models -type PortMetric struct { +// C-Type is specific to a class num. +type FlowRSVPPathObjectsClassExplicitRoute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of a configured port - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // x-constraint: - // - /components/schemas/Port/properties/name - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // The state of the connection to the test port location. The format should be the configured - // port location along with any custom connection state message. - Location *string `protobuf:"bytes,2,opt,name=location,proto3,oneof" json:"location,omitempty"` - // The state of the test port link The string can be up, down or a custom error message. - Link *PortMetric_Link_Enum `protobuf:"varint,3,opt,name=link,proto3,enum=otg.PortMetric_Link_Enum,oneof" json:"link,omitempty"` - // The state of the test port capture infrastructure. The string can be started, stopped - // or a custom error message. - Capture *PortMetric_Capture_Enum `protobuf:"varint,4,opt,name=capture,proto3,enum=otg.PortMetric_Capture_Enum,oneof" json:"capture,omitempty"` - // The current total number of frames transmitted - FramesTx *uint64 `protobuf:"varint,5,opt,name=frames_tx,json=framesTx,proto3,oneof" json:"frames_tx,omitempty"` - // The current total number of valid frames received - FramesRx *uint64 `protobuf:"varint,6,opt,name=frames_rx,json=framesRx,proto3,oneof" json:"frames_rx,omitempty"` - // The current total number of bytes transmitted - BytesTx *uint64 `protobuf:"varint,7,opt,name=bytes_tx,json=bytesTx,proto3,oneof" json:"bytes_tx,omitempty"` - // The current total number of valid bytes received - BytesRx *uint64 `protobuf:"varint,8,opt,name=bytes_rx,json=bytesRx,proto3,oneof" json:"bytes_rx,omitempty"` - // The current rate of frames transmitted - FramesTxRate *float32 `protobuf:"fixed32,9,opt,name=frames_tx_rate,json=framesTxRate,proto3,oneof" json:"frames_tx_rate,omitempty"` - // The current rate of valid frames received - FramesRxRate *float32 `protobuf:"fixed32,10,opt,name=frames_rx_rate,json=framesRxRate,proto3,oneof" json:"frames_rx_rate,omitempty"` - // The current rate of bytes transmitted - BytesTxRate *float32 `protobuf:"fixed32,11,opt,name=bytes_tx_rate,json=bytesTxRate,proto3,oneof" json:"bytes_tx_rate,omitempty"` - // The current rate of bytes received - BytesRxRate *float32 `protobuf:"fixed32,12,opt,name=bytes_rx_rate,json=bytesRxRate,proto3,oneof" json:"bytes_rx_rate,omitempty"` - // The transmit state of the flow. - Transmit *PortMetric_Transmit_Enum `protobuf:"varint,13,opt,name=transmit,proto3,enum=otg.PortMetric_Transmit_Enum,oneof" json:"transmit,omitempty"` + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` + // Description missing in models + CType *FlowRSVPPathObjectsClassExplicitRouteCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` } -func (x *PortMetric) Reset() { - *x = PortMetric{} +func (x *FlowRSVPPathObjectsClassExplicitRoute) Reset() { + *x = FlowRSVPPathObjectsClassExplicitRoute{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[354] + mi := &file_otg_proto_msgTypes[345] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PortMetric) String() string { +func (x *FlowRSVPPathObjectsClassExplicitRoute) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PortMetric) ProtoMessage() {} +func (*FlowRSVPPathObjectsClassExplicitRoute) ProtoMessage() {} -func (x *PortMetric) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[354] +func (x *FlowRSVPPathObjectsClassExplicitRoute) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[345] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -52006,141 +54622,112 @@ func (x *PortMetric) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PortMetric.ProtoReflect.Descriptor instead. -func (*PortMetric) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{354} +// Deprecated: Use FlowRSVPPathObjectsClassExplicitRoute.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsClassExplicitRoute) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{345} } -func (x *PortMetric) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *FlowRSVPPathObjectsClassExplicitRoute) GetLength() *FlowRSVPObjectLength { + if x != nil { + return x.Length } - return "" + return nil } -func (x *PortMetric) GetLocation() string { - if x != nil && x.Location != nil { - return *x.Location - } - return "" -} - -func (x *PortMetric) GetLink() PortMetric_Link_Enum { - if x != nil && x.Link != nil { - return *x.Link - } - return PortMetric_Link_unspecified -} - -func (x *PortMetric) GetCapture() PortMetric_Capture_Enum { - if x != nil && x.Capture != nil { - return *x.Capture +func (x *FlowRSVPPathObjectsClassExplicitRoute) GetCType() *FlowRSVPPathObjectsClassExplicitRouteCType { + if x != nil { + return x.CType } - return PortMetric_Capture_unspecified + return nil } -func (x *PortMetric) GetFramesTx() uint64 { - if x != nil && x.FramesTx != nil { - return *x.FramesTx - } - return 0 -} +// Object for EXPLICIT_ROUTE class and c-type is Type 1 Explicit Route (1). +type FlowRSVPPathObjectsClassExplicitRouteCType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *PortMetric) GetFramesRx() uint64 { - if x != nil && x.FramesRx != nil { - return *x.FramesRx - } - return 0 + // Description missing in models + // default = Choice.Enum.type_1 + Choice *FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Type_1 *FlowRSVPPathExplicitRouteType1 `protobuf:"bytes,2,opt,name=type_1,json=type1,proto3" json:"type_1,omitempty"` } -func (x *PortMetric) GetBytesTx() uint64 { - if x != nil && x.BytesTx != nil { - return *x.BytesTx +func (x *FlowRSVPPathObjectsClassExplicitRouteCType) Reset() { + *x = FlowRSVPPathObjectsClassExplicitRouteCType{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[346] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *PortMetric) GetBytesRx() uint64 { - if x != nil && x.BytesRx != nil { - return *x.BytesRx - } - return 0 +func (x *FlowRSVPPathObjectsClassExplicitRouteCType) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *PortMetric) GetFramesTxRate() float32 { - if x != nil && x.FramesTxRate != nil { - return *x.FramesTxRate - } - return 0 -} +func (*FlowRSVPPathObjectsClassExplicitRouteCType) ProtoMessage() {} -func (x *PortMetric) GetFramesRxRate() float32 { - if x != nil && x.FramesRxRate != nil { - return *x.FramesRxRate +func (x *FlowRSVPPathObjectsClassExplicitRouteCType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[346] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *PortMetric) GetBytesTxRate() float32 { - if x != nil && x.BytesTxRate != nil { - return *x.BytesTxRate - } - return 0 +// Deprecated: Use FlowRSVPPathObjectsClassExplicitRouteCType.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsClassExplicitRouteCType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{346} } -func (x *PortMetric) GetBytesRxRate() float32 { - if x != nil && x.BytesRxRate != nil { - return *x.BytesRxRate +func (x *FlowRSVPPathObjectsClassExplicitRouteCType) GetChoice() FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return FlowRSVPPathObjectsClassExplicitRouteCType_Choice_unspecified } -func (x *PortMetric) GetTransmit() PortMetric_Transmit_Enum { - if x != nil && x.Transmit != nil { - return *x.Transmit +func (x *FlowRSVPPathObjectsClassExplicitRouteCType) GetType_1() *FlowRSVPPathExplicitRouteType1 { + if x != nil { + return x.Type_1 } - return PortMetric_Transmit_unspecified + return nil } -// The container for a flow metric request. -type FlowMetricsRequest struct { +// Type1 Explicit Route has subobjects. Currently supported subobjects are IPv4 prefix +// and Autonomous system number. +type FlowRSVPPathExplicitRouteType1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Flow metrics will be retrieved for these flow names. - // If no flow names are specified then all flows will be returned. - // - // x-constraint: - // - /components/schemas/Flow/properties/name - // - // x-constraint: - // - /components/schemas/Flow/properties/name - FlowNames []string `protobuf:"bytes,1,rep,name=flow_names,json=flowNames,proto3" json:"flow_names,omitempty"` - // The list of metric names that the returned result set will contain. If the list is - // empty then all metrics will be returned. - MetricNames []FlowMetricsRequest_MetricNames_Enum `protobuf:"varint,3,rep,packed,name=metric_names,json=metricNames,proto3,enum=otg.FlowMetricsRequest_MetricNames_Enum" json:"metric_names,omitempty"` // Description missing in models - TaggedMetrics *FlowTaggedMetricsFilter `protobuf:"bytes,4,opt,name=tagged_metrics,json=taggedMetrics,proto3" json:"tagged_metrics,omitempty"` + Subobjects []*FlowRSVPType1ExplicitRouteSubobjects `protobuf:"bytes,1,rep,name=subobjects,proto3" json:"subobjects,omitempty"` } -func (x *FlowMetricsRequest) Reset() { - *x = FlowMetricsRequest{} +func (x *FlowRSVPPathExplicitRouteType1) Reset() { + *x = FlowRSVPPathExplicitRouteType1{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[355] + mi := &file_otg_proto_msgTypes[347] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowMetricsRequest) String() string { +func (x *FlowRSVPPathExplicitRouteType1) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowMetricsRequest) ProtoMessage() {} +func (*FlowRSVPPathExplicitRouteType1) ProtoMessage() {} -func (x *FlowMetricsRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[355] +func (x *FlowRSVPPathExplicitRouteType1) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[347] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -52151,70 +54738,45 @@ func (x *FlowMetricsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowMetricsRequest.ProtoReflect.Descriptor instead. -func (*FlowMetricsRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{355} -} - -func (x *FlowMetricsRequest) GetFlowNames() []string { - if x != nil { - return x.FlowNames - } - return nil -} - -func (x *FlowMetricsRequest) GetMetricNames() []FlowMetricsRequest_MetricNames_Enum { - if x != nil { - return x.MetricNames - } - return nil +// Deprecated: Use FlowRSVPPathExplicitRouteType1.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathExplicitRouteType1) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{347} } -func (x *FlowMetricsRequest) GetTaggedMetrics() *FlowTaggedMetricsFilter { +func (x *FlowRSVPPathExplicitRouteType1) GetSubobjects() []*FlowRSVPType1ExplicitRouteSubobjects { if x != nil { - return x.TaggedMetrics + return x.Subobjects } return nil } -// Filter for tagged metrics -type FlowTaggedMetricsFilter struct { +// Type is specific to a subobject. +type FlowRSVPType1ExplicitRouteSubobjects struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Controls inclusion/exclusion of tagged metrics when fetching flow metrics. - // default = True - Include *bool `protobuf:"varint,1,opt,name=include,proto3,oneof" json:"include,omitempty"` - // Controls inclusion/exclusion of tagged metrics where each underlying attributes has - // zero value or absent value. - // default = False - IncludeEmptyMetrics *bool `protobuf:"varint,2,opt,name=include_empty_metrics,json=includeEmptyMetrics,proto3,oneof" json:"include_empty_metrics,omitempty"` - // The list of metric names that the returned result set will contain. If the list is - // empty then all metrics will be returned. - MetricNames []FlowTaggedMetricsFilter_MetricNames_Enum `protobuf:"varint,3,rep,packed,name=metric_names,json=metricNames,proto3,enum=otg.FlowTaggedMetricsFilter_MetricNames_Enum" json:"metric_names,omitempty"` - // List of filters to selectively fetch tagged metrics with certain tag and corresponding - // value. - Filters []*FlowMetricTagFilter `protobuf:"bytes,4,rep,name=filters,proto3" json:"filters,omitempty"` + // Description missing in models + Type *FlowRSVPType1ExplicitRouteSubobjectsType `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` } -func (x *FlowTaggedMetricsFilter) Reset() { - *x = FlowTaggedMetricsFilter{} +func (x *FlowRSVPType1ExplicitRouteSubobjects) Reset() { + *x = FlowRSVPType1ExplicitRouteSubobjects{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[356] + mi := &file_otg_proto_msgTypes[348] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowTaggedMetricsFilter) String() string { +func (x *FlowRSVPType1ExplicitRouteSubobjects) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowTaggedMetricsFilter) ProtoMessage() {} +func (*FlowRSVPType1ExplicitRouteSubobjects) ProtoMessage() {} -func (x *FlowTaggedMetricsFilter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[356] +func (x *FlowRSVPType1ExplicitRouteSubobjects) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[348] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -52225,71 +54787,50 @@ func (x *FlowTaggedMetricsFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowTaggedMetricsFilter.ProtoReflect.Descriptor instead. -func (*FlowTaggedMetricsFilter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{356} -} - -func (x *FlowTaggedMetricsFilter) GetInclude() bool { - if x != nil && x.Include != nil { - return *x.Include - } - return false -} - -func (x *FlowTaggedMetricsFilter) GetIncludeEmptyMetrics() bool { - if x != nil && x.IncludeEmptyMetrics != nil { - return *x.IncludeEmptyMetrics - } - return false -} - -func (x *FlowTaggedMetricsFilter) GetMetricNames() []FlowTaggedMetricsFilter_MetricNames_Enum { - if x != nil { - return x.MetricNames - } - return nil +// Deprecated: Use FlowRSVPType1ExplicitRouteSubobjects.ProtoReflect.Descriptor instead. +func (*FlowRSVPType1ExplicitRouteSubobjects) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{348} } -func (x *FlowTaggedMetricsFilter) GetFilters() []*FlowMetricTagFilter { +func (x *FlowRSVPType1ExplicitRouteSubobjects) GetType() *FlowRSVPType1ExplicitRouteSubobjectsType { if x != nil { - return x.Filters + return x.Type } return nil } -// A container for filtering ingress and/or egress metric tags. -// The Tx stats may not be applicable in both the request and response filter. -type FlowMetricTagFilter struct { +// Currently supported subobjects are IPv4 address(1) and Autonomous system number(32). +type FlowRSVPType1ExplicitRouteSubobjectsType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A metric tag name that MUST exist in a flow packet or - // flow egress_packet configuration - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // A list of filters that can be applied to the metric tag name. - // By default all values will be included in the flow metric results. - Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` + // Description missing in models + // default = Choice.Enum.ipv4_prefix + Choice *FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Ipv4Prefix *FlowRSVPPathExplicitRouteType1Ipv4Prefix `protobuf:"bytes,2,opt,name=ipv4_prefix,json=ipv4Prefix,proto3" json:"ipv4_prefix,omitempty"` + // Description missing in models + AsNumber *FlowRSVPPathExplicitRouteType1ASNumber `protobuf:"bytes,3,opt,name=as_number,json=asNumber,proto3" json:"as_number,omitempty"` } -func (x *FlowMetricTagFilter) Reset() { - *x = FlowMetricTagFilter{} +func (x *FlowRSVPType1ExplicitRouteSubobjectsType) Reset() { + *x = FlowRSVPType1ExplicitRouteSubobjectsType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[357] + mi := &file_otg_proto_msgTypes[349] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowMetricTagFilter) String() string { +func (x *FlowRSVPType1ExplicitRouteSubobjectsType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowMetricTagFilter) ProtoMessage() {} +func (*FlowRSVPType1ExplicitRouteSubobjectsType) ProtoMessage() {} -func (x *FlowMetricTagFilter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[357] +func (x *FlowRSVPType1ExplicitRouteSubobjectsType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[349] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -52300,82 +54841,68 @@ func (x *FlowMetricTagFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowMetricTagFilter.ProtoReflect.Descriptor instead. -func (*FlowMetricTagFilter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{357} +// Deprecated: Use FlowRSVPType1ExplicitRouteSubobjectsType.ProtoReflect.Descriptor instead. +func (*FlowRSVPType1ExplicitRouteSubobjectsType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{349} } -func (x *FlowMetricTagFilter) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *FlowRSVPType1ExplicitRouteSubobjectsType) GetChoice() FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return FlowRSVPType1ExplicitRouteSubobjectsType_Choice_unspecified } -func (x *FlowMetricTagFilter) GetValues() []string { +func (x *FlowRSVPType1ExplicitRouteSubobjectsType) GetIpv4Prefix() *FlowRSVPPathExplicitRouteType1Ipv4Prefix { if x != nil { - return x.Values + return x.Ipv4Prefix } return nil } -// A container for flow metrics. -// The container is keyed by the name, port_tx and port_rx. -type FlowMetric struct { +func (x *FlowRSVPType1ExplicitRouteSubobjectsType) GetAsNumber() *FlowRSVPPathExplicitRouteType1ASNumber { + if x != nil { + return x.AsNumber + } + return nil +} + +// Class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Prefix, C-Type: +// 1 +type FlowRSVPPathExplicitRouteType1Ipv4Prefix struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the flow - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // The name of the transmit port - PortTx *string `protobuf:"bytes,2,opt,name=port_tx,json=portTx,proto3,oneof" json:"port_tx,omitempty"` - // The name of the receive port - PortRx *string `protobuf:"bytes,3,opt,name=port_rx,json=portRx,proto3,oneof" json:"port_rx,omitempty"` - // The transmit state of the flow. - Transmit *FlowMetric_Transmit_Enum `protobuf:"varint,5,opt,name=transmit,proto3,enum=otg.FlowMetric_Transmit_Enum,oneof" json:"transmit,omitempty"` - // The current total number of frames transmitted - FramesTx *uint64 `protobuf:"varint,6,opt,name=frames_tx,json=framesTx,proto3,oneof" json:"frames_tx,omitempty"` - // The current total number of valid frames received - FramesRx *uint64 `protobuf:"varint,7,opt,name=frames_rx,json=framesRx,proto3,oneof" json:"frames_rx,omitempty"` - // The current total number of bytes transmitted - BytesTx *uint64 `protobuf:"varint,8,opt,name=bytes_tx,json=bytesTx,proto3,oneof" json:"bytes_tx,omitempty"` - // The current total number of bytes received - BytesRx *uint64 `protobuf:"varint,9,opt,name=bytes_rx,json=bytesRx,proto3,oneof" json:"bytes_rx,omitempty"` - // The current rate of frames transmitted - FramesTxRate *float32 `protobuf:"fixed32,10,opt,name=frames_tx_rate,json=framesTxRate,proto3,oneof" json:"frames_tx_rate,omitempty"` - // The current rate of valid frames received - FramesRxRate *float32 `protobuf:"fixed32,11,opt,name=frames_rx_rate,json=framesRxRate,proto3,oneof" json:"frames_rx_rate,omitempty"` - // The percentage of lost frames - Loss *float32 `protobuf:"fixed32,12,opt,name=loss,proto3,oneof" json:"loss,omitempty"` // Description missing in models - Timestamps *MetricTimestamp `protobuf:"bytes,13,opt,name=timestamps,proto3" json:"timestamps,omitempty"` + LBit *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit `protobuf:"bytes,1,opt,name=l_bit,json=lBit,proto3" json:"l_bit,omitempty"` + // The Length contains the total length of the subobject in bytes,including L,Type and + // Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. + Length *FlowRSVPExplicitRouteLength `protobuf:"bytes,2,opt,name=length,proto3" json:"length,omitempty"` // Description missing in models - Latency *MetricLatency `protobuf:"bytes,14,opt,name=latency,proto3" json:"latency,omitempty"` - // List of metrics corresponding to a set of values applicable - // for configured metric tags in ingress or egress packet header fields of corresponding - // flow. - // The container is keyed by list of tag-value pairs. - TaggedMetrics []*FlowTaggedMetric `protobuf:"bytes,15,rep,name=tagged_metrics,json=taggedMetrics,proto3" json:"tagged_metrics,omitempty"` + Ipv4Address *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address `protobuf:"bytes,3,opt,name=ipv4_address,json=ipv4Address,proto3" json:"ipv4_address,omitempty"` + // The prefix length of the IPv4 address. + // default = 32 + Prefix *uint32 `protobuf:"varint,4,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` } -func (x *FlowMetric) Reset() { - *x = FlowMetric{} +func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) Reset() { + *x = FlowRSVPPathExplicitRouteType1Ipv4Prefix{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[358] + mi := &file_otg_proto_msgTypes[350] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowMetric) String() string { +func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowMetric) ProtoMessage() {} +func (*FlowRSVPPathExplicitRouteType1Ipv4Prefix) ProtoMessage() {} -func (x *FlowMetric) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[358] +func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[350] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -52386,156 +54913,146 @@ func (x *FlowMetric) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowMetric.ProtoReflect.Descriptor instead. -func (*FlowMetric) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{358} -} - -func (x *FlowMetric) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" +// Deprecated: Use FlowRSVPPathExplicitRouteType1Ipv4Prefix.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathExplicitRouteType1Ipv4Prefix) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{350} } -func (x *FlowMetric) GetPortTx() string { - if x != nil && x.PortTx != nil { - return *x.PortTx +func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) GetLBit() *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit { + if x != nil { + return x.LBit } - return "" + return nil } -func (x *FlowMetric) GetPortRx() string { - if x != nil && x.PortRx != nil { - return *x.PortRx +func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) GetLength() *FlowRSVPExplicitRouteLength { + if x != nil { + return x.Length } - return "" + return nil } -func (x *FlowMetric) GetTransmit() FlowMetric_Transmit_Enum { - if x != nil && x.Transmit != nil { - return *x.Transmit +func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) GetIpv4Address() *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address { + if x != nil { + return x.Ipv4Address } - return FlowMetric_Transmit_unspecified + return nil } -func (x *FlowMetric) GetFramesTx() uint64 { - if x != nil && x.FramesTx != nil { - return *x.FramesTx +func (x *FlowRSVPPathExplicitRouteType1Ipv4Prefix) GetPrefix() uint32 { + if x != nil && x.Prefix != nil { + return *x.Prefix } return 0 } -func (x *FlowMetric) GetFramesRx() uint64 { - if x != nil && x.FramesRx != nil { - return *x.FramesRx - } - return 0 -} +// Class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Autonomous system +// number, C-Type: 32 +type FlowRSVPPathExplicitRouteType1ASNumber struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *FlowMetric) GetBytesTx() uint64 { - if x != nil && x.BytesTx != nil { - return *x.BytesTx - } - return 0 + // Description missing in models + LBit *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit `protobuf:"bytes,1,opt,name=l_bit,json=lBit,proto3" json:"l_bit,omitempty"` + // The Length contains the total length of the subobject in bytes,including L, Type + // and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. + Length *FlowRSVPExplicitRouteASNumberLength `protobuf:"bytes,2,opt,name=length,proto3" json:"length,omitempty"` + // Autonomous System number to be set in the ERO sub-object that this LSP should traverse + // through. This field is applicable only if the value of 'type' is set to 'as_number'. + // default = 0 + AsNumber *uint32 `protobuf:"varint,3,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` } -func (x *FlowMetric) GetBytesRx() uint64 { - if x != nil && x.BytesRx != nil { - return *x.BytesRx +func (x *FlowRSVPPathExplicitRouteType1ASNumber) Reset() { + *x = FlowRSVPPathExplicitRouteType1ASNumber{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[351] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *FlowMetric) GetFramesTxRate() float32 { - if x != nil && x.FramesTxRate != nil { - return *x.FramesTxRate - } - return 0 +func (x *FlowRSVPPathExplicitRouteType1ASNumber) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *FlowMetric) GetFramesRxRate() float32 { - if x != nil && x.FramesRxRate != nil { - return *x.FramesRxRate +func (*FlowRSVPPathExplicitRouteType1ASNumber) ProtoMessage() {} + +func (x *FlowRSVPPathExplicitRouteType1ASNumber) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[351] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *FlowMetric) GetLoss() float32 { - if x != nil && x.Loss != nil { - return *x.Loss - } - return 0 +// Deprecated: Use FlowRSVPPathExplicitRouteType1ASNumber.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathExplicitRouteType1ASNumber) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{351} } -func (x *FlowMetric) GetTimestamps() *MetricTimestamp { +func (x *FlowRSVPPathExplicitRouteType1ASNumber) GetLBit() *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit { if x != nil { - return x.Timestamps + return x.LBit } return nil } -func (x *FlowMetric) GetLatency() *MetricLatency { +func (x *FlowRSVPPathExplicitRouteType1ASNumber) GetLength() *FlowRSVPExplicitRouteASNumberLength { if x != nil { - return x.Latency + return x.Length } return nil } -func (x *FlowMetric) GetTaggedMetrics() []*FlowTaggedMetric { - if x != nil { - return x.TaggedMetrics +func (x *FlowRSVPPathExplicitRouteType1ASNumber) GetAsNumber() uint32 { + if x != nil && x.AsNumber != nil { + return *x.AsNumber } - return nil + return 0 } -// Metrics for each set of values applicable for configured -// metric tags in ingress or egress packet header fields of corresponding flow. -// The container is keyed by list of tag-value pairs. -type FlowTaggedMetric struct { +// Description missing in models +type FlowRSVPExplicitRouteLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // List of tag and value pairs - Tags []*FlowMetricTag `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` - // The current total number of frames transmitted - FramesTx *uint64 `protobuf:"varint,2,opt,name=frames_tx,json=framesTx,proto3,oneof" json:"frames_tx,omitempty"` - // The current total number of valid frames received - FramesRx *uint64 `protobuf:"varint,3,opt,name=frames_rx,json=framesRx,proto3,oneof" json:"frames_rx,omitempty"` - // The current total number of bytes transmitted - BytesTx *uint64 `protobuf:"varint,4,opt,name=bytes_tx,json=bytesTx,proto3,oneof" json:"bytes_tx,omitempty"` - // The current total number of bytes received - BytesRx *uint64 `protobuf:"varint,5,opt,name=bytes_rx,json=bytesRx,proto3,oneof" json:"bytes_rx,omitempty"` - // The current rate of frames transmitted - FramesTxRate *float32 `protobuf:"fixed32,6,opt,name=frames_tx_rate,json=framesTxRate,proto3,oneof" json:"frames_tx_rate,omitempty"` - // The current rate of valid frames received - FramesRxRate *float32 `protobuf:"fixed32,7,opt,name=frames_rx_rate,json=framesRxRate,proto3,oneof" json:"frames_rx_rate,omitempty"` - // The percentage of lost frames - Loss *float32 `protobuf:"fixed32,8,opt,name=loss,proto3,oneof" json:"loss,omitempty"` - // Description missing in models - Timestamps *MetricTimestamp `protobuf:"bytes,9,opt,name=timestamps,proto3" json:"timestamps,omitempty"` + // auto or configured value. + // default = Choice.Enum.auto + Choice *FlowRSVPExplicitRouteLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPExplicitRouteLength_Choice_Enum,oneof" json:"choice,omitempty"` + // The OTG implementation will provide a system generated value for this property. + // If the OTG implementation is unable to generate a value the default value must be + // used. + // default = 8 + Auto *uint32 `protobuf:"varint,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` // Description missing in models - Latency *MetricLatency `protobuf:"bytes,10,opt,name=latency,proto3" json:"latency,omitempty"` + // default = 8 + Value *uint32 `protobuf:"varint,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *FlowTaggedMetric) Reset() { - *x = FlowTaggedMetric{} +func (x *FlowRSVPExplicitRouteLength) Reset() { + *x = FlowRSVPExplicitRouteLength{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[359] + mi := &file_otg_proto_msgTypes[352] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowTaggedMetric) String() string { +func (x *FlowRSVPExplicitRouteLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowTaggedMetric) ProtoMessage() {} +func (*FlowRSVPExplicitRouteLength) ProtoMessage() {} -func (x *FlowTaggedMetric) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[359] +func (x *FlowRSVPExplicitRouteLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[352] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -52546,110 +55063,134 @@ func (x *FlowTaggedMetric) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowTaggedMetric.ProtoReflect.Descriptor instead. -func (*FlowTaggedMetric) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{359} +// Deprecated: Use FlowRSVPExplicitRouteLength.ProtoReflect.Descriptor instead. +func (*FlowRSVPExplicitRouteLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{352} } -func (x *FlowTaggedMetric) GetTags() []*FlowMetricTag { - if x != nil { - return x.Tags +func (x *FlowRSVPExplicitRouteLength) GetChoice() FlowRSVPExplicitRouteLength_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return FlowRSVPExplicitRouteLength_Choice_unspecified } -func (x *FlowTaggedMetric) GetFramesTx() uint64 { - if x != nil && x.FramesTx != nil { - return *x.FramesTx +func (x *FlowRSVPExplicitRouteLength) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto } return 0 } -func (x *FlowTaggedMetric) GetFramesRx() uint64 { - if x != nil && x.FramesRx != nil { - return *x.FramesRx +func (x *FlowRSVPExplicitRouteLength) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } return 0 } -func (x *FlowTaggedMetric) GetBytesTx() uint64 { - if x != nil && x.BytesTx != nil { - return *x.BytesTx - } - return 0 +// Description missing in models +type FlowRSVPExplicitRouteASNumberLength struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // auto or configured value. + // default = Choice.Enum.auto + Choice *FlowRSVPExplicitRouteASNumberLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPExplicitRouteASNumberLength_Choice_Enum,oneof" json:"choice,omitempty"` + // The OTG implementation will provide a system generated value for this property. + // If the OTG implementation is unable to generate a value the default value must be + // used. + // default = 4 + Auto *uint32 `protobuf:"varint,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` + // Description missing in models + // default = 4 + Value *uint32 `protobuf:"varint,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *FlowTaggedMetric) GetBytesRx() uint64 { - if x != nil && x.BytesRx != nil { - return *x.BytesRx +func (x *FlowRSVPExplicitRouteASNumberLength) Reset() { + *x = FlowRSVPExplicitRouteASNumberLength{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[353] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *FlowTaggedMetric) GetFramesTxRate() float32 { - if x != nil && x.FramesTxRate != nil { - return *x.FramesTxRate - } - return 0 +func (x *FlowRSVPExplicitRouteASNumberLength) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *FlowTaggedMetric) GetFramesRxRate() float32 { - if x != nil && x.FramesRxRate != nil { - return *x.FramesRxRate +func (*FlowRSVPExplicitRouteASNumberLength) ProtoMessage() {} + +func (x *FlowRSVPExplicitRouteASNumberLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[353] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *FlowTaggedMetric) GetLoss() float32 { - if x != nil && x.Loss != nil { - return *x.Loss +// Deprecated: Use FlowRSVPExplicitRouteASNumberLength.ProtoReflect.Descriptor instead. +func (*FlowRSVPExplicitRouteASNumberLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{353} +} + +func (x *FlowRSVPExplicitRouteASNumberLength) GetChoice() FlowRSVPExplicitRouteASNumberLength_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return FlowRSVPExplicitRouteASNumberLength_Choice_unspecified } -func (x *FlowTaggedMetric) GetTimestamps() *MetricTimestamp { - if x != nil { - return x.Timestamps +func (x *FlowRSVPExplicitRouteASNumberLength) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto } - return nil + return 0 } -func (x *FlowTaggedMetric) GetLatency() *MetricLatency { - if x != nil { - return x.Latency +func (x *FlowRSVPExplicitRouteASNumberLength) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } - return nil + return 0 } -// Description missing in models -type FlowMetricTag struct { +// C-Type is specific to a class num. +type FlowRSVPPathObjectsClassLabelRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name of packet field metric tag - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` // Description missing in models - Value *FlowMetricTagValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + CType *FlowRSVPPathObjectsLabelRequestCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` } -func (x *FlowMetricTag) Reset() { - *x = FlowMetricTag{} +func (x *FlowRSVPPathObjectsClassLabelRequest) Reset() { + *x = FlowRSVPPathObjectsClassLabelRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[360] + mi := &file_otg_proto_msgTypes[354] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowMetricTag) String() string { +func (x *FlowRSVPPathObjectsClassLabelRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowMetricTag) ProtoMessage() {} +func (*FlowRSVPPathObjectsClassLabelRequest) ProtoMessage() {} -func (x *FlowMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[360] +func (x *FlowRSVPPathObjectsClassLabelRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[354] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -52660,57 +55201,56 @@ func (x *FlowMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowMetricTag.ProtoReflect.Descriptor instead. -func (*FlowMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{360} +// Deprecated: Use FlowRSVPPathObjectsClassLabelRequest.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsClassLabelRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{354} } -func (x *FlowMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *FlowRSVPPathObjectsClassLabelRequest) GetLength() *FlowRSVPObjectLength { + if x != nil { + return x.Length } - return "" + return nil } -func (x *FlowMetricTag) GetValue() *FlowMetricTagValue { +func (x *FlowRSVPPathObjectsClassLabelRequest) GetCType() *FlowRSVPPathObjectsLabelRequestCType { if x != nil { - return x.Value + return x.CType } return nil } -// A container for metric tag value -type FlowMetricTagValue struct { +// Object for LABEL_REQUEST class. Currently supported c-type is Without Label Range +// (1). +type FlowRSVPPathObjectsLabelRequestCType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Available formats for metric tag value - // default = Choice.Enum.hex - Choice *FlowMetricTagValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowMetricTagValue_Choice_Enum,oneof" json:"choice,omitempty"` - // Value represented in hexadecimal format - Hex *string `protobuf:"bytes,2,opt,name=hex,proto3,oneof" json:"hex,omitempty"` - // Value represented in string format - Str *string `protobuf:"bytes,3,opt,name=str,proto3,oneof" json:"str,omitempty"` + // Description missing in models + // default = Choice.Enum.without_label_range + Choice *FlowRSVPPathObjectsLabelRequestCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsLabelRequestCType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + WithoutLabelRange *FlowRSVPPathLabelRequestWithoutLabelRange `protobuf:"bytes,2,opt,name=without_label_range,json=withoutLabelRange,proto3" json:"without_label_range,omitempty"` } -func (x *FlowMetricTagValue) Reset() { - *x = FlowMetricTagValue{} +func (x *FlowRSVPPathObjectsLabelRequestCType) Reset() { + *x = FlowRSVPPathObjectsLabelRequestCType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[361] + mi := &file_otg_proto_msgTypes[355] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowMetricTagValue) String() string { +func (x *FlowRSVPPathObjectsLabelRequestCType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowMetricTagValue) ProtoMessage() {} +func (*FlowRSVPPathObjectsLabelRequestCType) ProtoMessage() {} -func (x *FlowMetricTagValue) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[361] +func (x *FlowRSVPPathObjectsLabelRequestCType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[355] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -52721,63 +55261,54 @@ func (x *FlowMetricTagValue) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowMetricTagValue.ProtoReflect.Descriptor instead. -func (*FlowMetricTagValue) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{361} +// Deprecated: Use FlowRSVPPathObjectsLabelRequestCType.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsLabelRequestCType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{355} } -func (x *FlowMetricTagValue) GetChoice() FlowMetricTagValue_Choice_Enum { +func (x *FlowRSVPPathObjectsLabelRequestCType) GetChoice() FlowRSVPPathObjectsLabelRequestCType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return FlowMetricTagValue_Choice_unspecified -} - -func (x *FlowMetricTagValue) GetHex() string { - if x != nil && x.Hex != nil { - return *x.Hex - } - return "" + return FlowRSVPPathObjectsLabelRequestCType_Choice_unspecified } -func (x *FlowMetricTagValue) GetStr() string { - if x != nil && x.Str != nil { - return *x.Str +func (x *FlowRSVPPathObjectsLabelRequestCType) GetWithoutLabelRange() *FlowRSVPPathLabelRequestWithoutLabelRange { + if x != nil { + return x.WithoutLabelRange } - return "" + return nil } -// The container for timestamp metrics. -// The container will be empty if the timestamp has not been configured for -// the flow. -type MetricTimestamp struct { +// Class = LABEL_REQUEST, Without Label Range C-Type = 1 +type FlowRSVPPathLabelRequestWithoutLabelRange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // First timestamp in nanoseconds - FirstTimestampNs *float64 `protobuf:"fixed64,1,opt,name=first_timestamp_ns,json=firstTimestampNs,proto3,oneof" json:"first_timestamp_ns,omitempty"` - // Last timestamp in nanoseconds - LastTimestampNs *float64 `protobuf:"fixed64,2,opt,name=last_timestamp_ns,json=lastTimestampNs,proto3,oneof" json:"last_timestamp_ns,omitempty"` + // Description missing in models + Reserved *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved `protobuf:"bytes,1,opt,name=reserved,proto3" json:"reserved,omitempty"` + // Description missing in models + L3Pid *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid `protobuf:"bytes,2,opt,name=l3pid,proto3" json:"l3pid,omitempty"` } -func (x *MetricTimestamp) Reset() { - *x = MetricTimestamp{} +func (x *FlowRSVPPathLabelRequestWithoutLabelRange) Reset() { + *x = FlowRSVPPathLabelRequestWithoutLabelRange{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[362] + mi := &file_otg_proto_msgTypes[356] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MetricTimestamp) String() string { +func (x *FlowRSVPPathLabelRequestWithoutLabelRange) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MetricTimestamp) ProtoMessage() {} +func (*FlowRSVPPathLabelRequestWithoutLabelRange) ProtoMessage() {} -func (x *MetricTimestamp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[362] +func (x *FlowRSVPPathLabelRequestWithoutLabelRange) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[356] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -52788,60 +55319,55 @@ func (x *MetricTimestamp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MetricTimestamp.ProtoReflect.Descriptor instead. -func (*MetricTimestamp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{362} +// Deprecated: Use FlowRSVPPathLabelRequestWithoutLabelRange.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathLabelRequestWithoutLabelRange) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{356} } -func (x *MetricTimestamp) GetFirstTimestampNs() float64 { - if x != nil && x.FirstTimestampNs != nil { - return *x.FirstTimestampNs +func (x *FlowRSVPPathLabelRequestWithoutLabelRange) GetReserved() *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved { + if x != nil { + return x.Reserved } - return 0 + return nil } -func (x *MetricTimestamp) GetLastTimestampNs() float64 { - if x != nil && x.LastTimestampNs != nil { - return *x.LastTimestampNs +func (x *FlowRSVPPathLabelRequestWithoutLabelRange) GetL3Pid() *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid { + if x != nil { + return x.L3Pid } - return 0 + return nil } -// The container for latency metrics. -// The min/max/avg values are dependent on the type of latency measurement -// mode that is configured. -// The container will be empty if the latency has not been configured for -// the flow. -type MetricLatency struct { +// C-Type is specific to a class num. +type FlowRSVPPathObjectsClassSessionAttribute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Minimum latency in nanoseconds - MinimumNs *float64 `protobuf:"fixed64,1,opt,name=minimum_ns,json=minimumNs,proto3,oneof" json:"minimum_ns,omitempty"` - // Maximum latency in nanoseconds - MaximumNs *float64 `protobuf:"fixed64,2,opt,name=maximum_ns,json=maximumNs,proto3,oneof" json:"maximum_ns,omitempty"` - // Average latency in nanoseconds - AverageNs *float64 `protobuf:"fixed64,3,opt,name=average_ns,json=averageNs,proto3,oneof" json:"average_ns,omitempty"` + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` + // Description missing in models + CType *FlowRSVPPathObjectsSessionAttributeCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` } -func (x *MetricLatency) Reset() { - *x = MetricLatency{} +func (x *FlowRSVPPathObjectsClassSessionAttribute) Reset() { + *x = FlowRSVPPathObjectsClassSessionAttribute{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[363] + mi := &file_otg_proto_msgTypes[357] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MetricLatency) String() string { +func (x *FlowRSVPPathObjectsClassSessionAttribute) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MetricLatency) ProtoMessage() {} +func (*FlowRSVPPathObjectsClassSessionAttribute) ProtoMessage() {} -func (x *MetricLatency) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[363] +func (x *FlowRSVPPathObjectsClassSessionAttribute) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[357] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -52852,70 +55378,58 @@ func (x *MetricLatency) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MetricLatency.ProtoReflect.Descriptor instead. -func (*MetricLatency) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{363} -} - -func (x *MetricLatency) GetMinimumNs() float64 { - if x != nil && x.MinimumNs != nil { - return *x.MinimumNs - } - return 0 +// Deprecated: Use FlowRSVPPathObjectsClassSessionAttribute.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsClassSessionAttribute) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{357} } -func (x *MetricLatency) GetMaximumNs() float64 { - if x != nil && x.MaximumNs != nil { - return *x.MaximumNs +func (x *FlowRSVPPathObjectsClassSessionAttribute) GetLength() *FlowRSVPObjectLength { + if x != nil { + return x.Length } - return 0 + return nil } -func (x *MetricLatency) GetAverageNs() float64 { - if x != nil && x.AverageNs != nil { - return *x.AverageNs +func (x *FlowRSVPPathObjectsClassSessionAttribute) GetCType() *FlowRSVPPathObjectsSessionAttributeCType { + if x != nil { + return x.CType } - return 0 + return nil } -// The request to retrieve BGPv4 per peer metrics/statistics. -type Bgpv4MetricsRequest struct { +// Object for SESSION_ATTRIBUTE class. Currently supported c-type is LSP_Tunnel_RA (1) +// and LSP_Tunnel (7). +type FlowRSVPPathObjectsSessionAttributeCType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of BGPv4 peers to return results for. An empty list will return results - // for all BGPv4 peers. - // - // x-constraint: - // - /components/schemas/Bgp.V4peer/properties/name - // - // x-constraint: - // - /components/schemas/Bgp.V4peer/properties/name - PeerNames []string `protobuf:"bytes,1,rep,name=peer_names,json=peerNames,proto3" json:"peer_names,omitempty"` - // The list of column names that the returned result set will contain. If the list is - // empty then all columns will be returned except for any result_groups. The name of - // the BGPv4 peer cannot be excluded. - ColumnNames []Bgpv4MetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.Bgpv4MetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` + // Description missing in models + // default = Choice.Enum.lsp_tunnel + Choice *FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + LspTunnel *FlowRSVPPathSessionAttributeLspTunnel `protobuf:"bytes,2,opt,name=lsp_tunnel,json=lspTunnel,proto3" json:"lsp_tunnel,omitempty"` + // Description missing in models + LspTunnelRa *FlowRSVPPathSessionAttributeLspTunnelRa `protobuf:"bytes,3,opt,name=lsp_tunnel_ra,json=lspTunnelRa,proto3" json:"lsp_tunnel_ra,omitempty"` } -func (x *Bgpv4MetricsRequest) Reset() { - *x = Bgpv4MetricsRequest{} +func (x *FlowRSVPPathObjectsSessionAttributeCType) Reset() { + *x = FlowRSVPPathObjectsSessionAttributeCType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[364] + mi := &file_otg_proto_msgTypes[358] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Bgpv4MetricsRequest) String() string { +func (x *FlowRSVPPathObjectsSessionAttributeCType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Bgpv4MetricsRequest) ProtoMessage() {} +func (*FlowRSVPPathObjectsSessionAttributeCType) ProtoMessage() {} -func (x *Bgpv4MetricsRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[364] +func (x *FlowRSVPPathObjectsSessionAttributeCType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[358] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -52926,99 +55440,74 @@ func (x *Bgpv4MetricsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Bgpv4MetricsRequest.ProtoReflect.Descriptor instead. -func (*Bgpv4MetricsRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{364} +// Deprecated: Use FlowRSVPPathObjectsSessionAttributeCType.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsSessionAttributeCType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{358} } -func (x *Bgpv4MetricsRequest) GetPeerNames() []string { +func (x *FlowRSVPPathObjectsSessionAttributeCType) GetChoice() FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return FlowRSVPPathObjectsSessionAttributeCType_Choice_unspecified +} + +func (x *FlowRSVPPathObjectsSessionAttributeCType) GetLspTunnel() *FlowRSVPPathSessionAttributeLspTunnel { if x != nil { - return x.PeerNames + return x.LspTunnel } return nil } -func (x *Bgpv4MetricsRequest) GetColumnNames() []Bgpv4MetricsRequest_ColumnNames_Enum { +func (x *FlowRSVPPathObjectsSessionAttributeCType) GetLspTunnelRa() *FlowRSVPPathSessionAttributeLspTunnelRa { if x != nil { - return x.ColumnNames + return x.LspTunnelRa } return nil } -// BGPv4 per peer statistics information. -type Bgpv4Metric struct { +// SESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 7, resource affinity information. +type FlowRSVPPathSessionAttributeLspTunnel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of a configured BGPv4 peer. - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Session state as up or down. Up refers to an Established state and Down refers to - // any other state. - SessionState *Bgpv4Metric_SessionState_Enum `protobuf:"varint,2,opt,name=session_state,json=sessionState,proto3,enum=otg.Bgpv4Metric_SessionState_Enum,oneof" json:"session_state,omitempty"` - // Number of times the session went from Up to Down state. - SessionFlapCount *uint64 `protobuf:"varint,3,opt,name=session_flap_count,json=sessionFlapCount,proto3,oneof" json:"session_flap_count,omitempty"` - // Number of routes advertised. - RoutesAdvertised *uint64 `protobuf:"varint,4,opt,name=routes_advertised,json=routesAdvertised,proto3,oneof" json:"routes_advertised,omitempty"` - // Number of routes received. - RoutesReceived *uint64 `protobuf:"varint,5,opt,name=routes_received,json=routesReceived,proto3,oneof" json:"routes_received,omitempty"` - // Number of route withdraws sent. - RouteWithdrawsSent *uint64 `protobuf:"varint,6,opt,name=route_withdraws_sent,json=routeWithdrawsSent,proto3,oneof" json:"route_withdraws_sent,omitempty"` - // Number of route withdraws received. - RouteWithdrawsReceived *uint64 `protobuf:"varint,7,opt,name=route_withdraws_received,json=routeWithdrawsReceived,proto3,oneof" json:"route_withdraws_received,omitempty"` - // Number of Update messages sent. - UpdatesSent *uint64 `protobuf:"varint,8,opt,name=updates_sent,json=updatesSent,proto3,oneof" json:"updates_sent,omitempty"` - // Number of Update messages received. - UpdatesReceived *uint64 `protobuf:"varint,9,opt,name=updates_received,json=updatesReceived,proto3,oneof" json:"updates_received,omitempty"` - // Number of Open messages sent. - OpensSent *uint64 `protobuf:"varint,10,opt,name=opens_sent,json=opensSent,proto3,oneof" json:"opens_sent,omitempty"` - // Number of Open messages received. - OpensReceived *uint64 `protobuf:"varint,11,opt,name=opens_received,json=opensReceived,proto3,oneof" json:"opens_received,omitempty"` - // Number of Keepalive messages sent. - KeepalivesSent *uint64 `protobuf:"varint,12,opt,name=keepalives_sent,json=keepalivesSent,proto3,oneof" json:"keepalives_sent,omitempty"` - // Number of Keepalive messages received. - KeepalivesReceived *uint64 `protobuf:"varint,13,opt,name=keepalives_received,json=keepalivesReceived,proto3,oneof" json:"keepalives_received,omitempty"` - // Number of Notification messages sent. - NotificationsSent *uint64 `protobuf:"varint,14,opt,name=notifications_sent,json=notificationsSent,proto3,oneof" json:"notifications_sent,omitempty"` - // Number of Notification messages received. - NotificationsReceived *uint64 `protobuf:"varint,15,opt,name=notifications_received,json=notificationsReceived,proto3,oneof" json:"notifications_received,omitempty"` - // BGP peer FSM (Finite State Machine) state as Idle, Connect, Active, OpenSent, OpenConfirm - // and Established. In all the states except Established the BGP session is down. Idle - // refers to the Idle state of the FSM. Connect refers to the state where the session - // is waiting for the underlying transport session to be established. Active refers - // to the state where the session is awaiting for a connection from the remote peer. - // OpenSent refers to the state where the session is in the process of being established. - // The local system has sent an OPEN message. OpenConfirm refers to the state where - // the session is in the process of being established. The local system has sent and - // received an OPEN message and is awaiting a NOTIFICATION or KEEPALIVE message from - // remote peer. Established refers to the state where the BGP session with the peer - // is established. - FsmState *Bgpv4Metric_FsmState_Enum `protobuf:"varint,16,opt,name=fsm_state,json=fsmState,proto3,enum=otg.Bgpv4Metric_FsmState_Enum,oneof" json:"fsm_state,omitempty"` - // Number of End-of-RIB markers received indicating the completion of the initial routing - // update for a particular address family after the session is established. - // For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with - // the minimum length. For any other address family, it is an UPDATE message that contains - // only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . - EndOfRibReceived *uint64 `protobuf:"varint,17,opt,name=end_of_rib_received,json=endOfRibReceived,proto3,oneof" json:"end_of_rib_received,omitempty"` + // The priority of the session with respect to taking resources,in the range of 0 to + // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether + // this session can preempt another session. + // default = 7 + SetupPriority *uint32 `protobuf:"varint,1,opt,name=setup_priority,json=setupPriority,proto3,oneof" json:"setup_priority,omitempty"` + // The priority of the session with respect to holding resources,in the range of 0 to + // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether + // this session can preempt another session. + // default = 7 + HoldingPriority *uint32 `protobuf:"varint,2,opt,name=holding_priority,json=holdingPriority,proto3,oneof" json:"holding_priority,omitempty"` + // 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired + Flags *FlowRSVPLspTunnelFlag `protobuf:"bytes,3,opt,name=flags,proto3" json:"flags,omitempty"` + // The length of the display string before padding, in bytes. + NameLength *FlowRSVPSessionAttributeNameLength `protobuf:"bytes,4,opt,name=name_length,json=nameLength,proto3" json:"name_length,omitempty"` + // A null padded string of characters. + // default = + SessionName *string `protobuf:"bytes,5,opt,name=session_name,json=sessionName,proto3,oneof" json:"session_name,omitempty"` } -func (x *Bgpv4Metric) Reset() { - *x = Bgpv4Metric{} +func (x *FlowRSVPPathSessionAttributeLspTunnel) Reset() { + *x = FlowRSVPPathSessionAttributeLspTunnel{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[365] + mi := &file_otg_proto_msgTypes[359] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Bgpv4Metric) String() string { +func (x *FlowRSVPPathSessionAttributeLspTunnel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Bgpv4Metric) ProtoMessage() {} +func (*FlowRSVPPathSessionAttributeLspTunnel) ProtoMessage() {} -func (x *Bgpv4Metric) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[365] +func (x *FlowRSVPPathSessionAttributeLspTunnel) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[359] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -53029,168 +55518,209 @@ func (x *Bgpv4Metric) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Bgpv4Metric.ProtoReflect.Descriptor instead. -func (*Bgpv4Metric) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{365} +// Deprecated: Use FlowRSVPPathSessionAttributeLspTunnel.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathSessionAttributeLspTunnel) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{359} } -func (x *Bgpv4Metric) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *FlowRSVPPathSessionAttributeLspTunnel) GetSetupPriority() uint32 { + if x != nil && x.SetupPriority != nil { + return *x.SetupPriority } - return "" + return 0 } -func (x *Bgpv4Metric) GetSessionState() Bgpv4Metric_SessionState_Enum { - if x != nil && x.SessionState != nil { - return *x.SessionState +func (x *FlowRSVPPathSessionAttributeLspTunnel) GetHoldingPriority() uint32 { + if x != nil && x.HoldingPriority != nil { + return *x.HoldingPriority } - return Bgpv4Metric_SessionState_unspecified + return 0 } -func (x *Bgpv4Metric) GetSessionFlapCount() uint64 { - if x != nil && x.SessionFlapCount != nil { - return *x.SessionFlapCount +func (x *FlowRSVPPathSessionAttributeLspTunnel) GetFlags() *FlowRSVPLspTunnelFlag { + if x != nil { + return x.Flags } - return 0 + return nil } -func (x *Bgpv4Metric) GetRoutesAdvertised() uint64 { - if x != nil && x.RoutesAdvertised != nil { - return *x.RoutesAdvertised +func (x *FlowRSVPPathSessionAttributeLspTunnel) GetNameLength() *FlowRSVPSessionAttributeNameLength { + if x != nil { + return x.NameLength } - return 0 + return nil } -func (x *Bgpv4Metric) GetRoutesReceived() uint64 { - if x != nil && x.RoutesReceived != nil { - return *x.RoutesReceived +func (x *FlowRSVPPathSessionAttributeLspTunnel) GetSessionName() string { + if x != nil && x.SessionName != nil { + return *x.SessionName } - return 0 + return "" } -func (x *Bgpv4Metric) GetRouteWithdrawsSent() uint64 { - if x != nil && x.RouteWithdrawsSent != nil { - return *x.RouteWithdrawsSent - } - return 0 +// SESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 1, it carries resource affinity +// information. +type FlowRSVPPathSessionAttributeLspTunnelRa struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // any of which renders a link unacceptable. A null set (all bits set to zero) doesn't + // render the link unacceptable. The most significant byte in the hex-string is the + // farthest to the left in the byte sequence. Leading zero bytes in the configured + // value may be omitted for brevity. + // default = 00 + ExcludeAny *string `protobuf:"bytes,1,opt,name=exclude_any,json=excludeAny,proto3,oneof" json:"exclude_any,omitempty"` + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // any of which renders a link acceptable. A null set (all bits set to zero) automatically + // passes. The most significant byte in the hex-string is the farthest to the left + // in the byte sequence. Leading zero bytes in the configured value may be omitted + // for brevity. + // default = 00 + IncludeAny *string `protobuf:"bytes,2,opt,name=include_any,json=includeAny,proto3,oneof" json:"include_any,omitempty"` + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // all of which must be present for a link to be acceptable. A null set (all bits set + // to zero) automatically passes. The most significant byte in the hex-string is the + // farthest to the left in the byte sequence. Leading zero bytes in the configured + // value may be omitted for brevity. + // default = 00 + IncludeAll *string `protobuf:"bytes,3,opt,name=include_all,json=includeAll,proto3,oneof" json:"include_all,omitempty"` + // The priority of the session with respect to taking resources,in the range of 0 to + // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether + // this session can preempt another session. + // default = 7 + SetupPriority *uint32 `protobuf:"varint,4,opt,name=setup_priority,json=setupPriority,proto3,oneof" json:"setup_priority,omitempty"` + // The priority of the session with respect to holding resources,in the range of 0 to + // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether + // this session can preempt another session. + // default = 7 + HoldingPriority *uint32 `protobuf:"varint,5,opt,name=holding_priority,json=holdingPriority,proto3,oneof" json:"holding_priority,omitempty"` + // 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired + Flags *FlowRSVPLspTunnelFlag `protobuf:"bytes,6,opt,name=flags,proto3" json:"flags,omitempty"` + // The length of the display string before padding, in bytes. + NameLength *FlowRSVPSessionAttributeNameLength `protobuf:"bytes,7,opt,name=name_length,json=nameLength,proto3" json:"name_length,omitempty"` + // A null padded string of characters. + // default = + SessionName *string `protobuf:"bytes,8,opt,name=session_name,json=sessionName,proto3,oneof" json:"session_name,omitempty"` } -func (x *Bgpv4Metric) GetRouteWithdrawsReceived() uint64 { - if x != nil && x.RouteWithdrawsReceived != nil { - return *x.RouteWithdrawsReceived +func (x *FlowRSVPPathSessionAttributeLspTunnelRa) Reset() { + *x = FlowRSVPPathSessionAttributeLspTunnelRa{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[360] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *Bgpv4Metric) GetUpdatesSent() uint64 { - if x != nil && x.UpdatesSent != nil { - return *x.UpdatesSent - } - return 0 +func (x *FlowRSVPPathSessionAttributeLspTunnelRa) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *Bgpv4Metric) GetUpdatesReceived() uint64 { - if x != nil && x.UpdatesReceived != nil { - return *x.UpdatesReceived +func (*FlowRSVPPathSessionAttributeLspTunnelRa) ProtoMessage() {} + +func (x *FlowRSVPPathSessionAttributeLspTunnelRa) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[360] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *Bgpv4Metric) GetOpensSent() uint64 { - if x != nil && x.OpensSent != nil { - return *x.OpensSent +// Deprecated: Use FlowRSVPPathSessionAttributeLspTunnelRa.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathSessionAttributeLspTunnelRa) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{360} +} + +func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetExcludeAny() string { + if x != nil && x.ExcludeAny != nil { + return *x.ExcludeAny } - return 0 + return "" } -func (x *Bgpv4Metric) GetOpensReceived() uint64 { - if x != nil && x.OpensReceived != nil { - return *x.OpensReceived +func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetIncludeAny() string { + if x != nil && x.IncludeAny != nil { + return *x.IncludeAny } - return 0 + return "" } -func (x *Bgpv4Metric) GetKeepalivesSent() uint64 { - if x != nil && x.KeepalivesSent != nil { - return *x.KeepalivesSent +func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetIncludeAll() string { + if x != nil && x.IncludeAll != nil { + return *x.IncludeAll } - return 0 + return "" } -func (x *Bgpv4Metric) GetKeepalivesReceived() uint64 { - if x != nil && x.KeepalivesReceived != nil { - return *x.KeepalivesReceived +func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetSetupPriority() uint32 { + if x != nil && x.SetupPriority != nil { + return *x.SetupPriority } return 0 } -func (x *Bgpv4Metric) GetNotificationsSent() uint64 { - if x != nil && x.NotificationsSent != nil { - return *x.NotificationsSent +func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetHoldingPriority() uint32 { + if x != nil && x.HoldingPriority != nil { + return *x.HoldingPriority } return 0 } -func (x *Bgpv4Metric) GetNotificationsReceived() uint64 { - if x != nil && x.NotificationsReceived != nil { - return *x.NotificationsReceived +func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetFlags() *FlowRSVPLspTunnelFlag { + if x != nil { + return x.Flags } - return 0 + return nil } -func (x *Bgpv4Metric) GetFsmState() Bgpv4Metric_FsmState_Enum { - if x != nil && x.FsmState != nil { - return *x.FsmState +func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetNameLength() *FlowRSVPSessionAttributeNameLength { + if x != nil { + return x.NameLength } - return Bgpv4Metric_FsmState_unspecified + return nil } -func (x *Bgpv4Metric) GetEndOfRibReceived() uint64 { - if x != nil && x.EndOfRibReceived != nil { - return *x.EndOfRibReceived +func (x *FlowRSVPPathSessionAttributeLspTunnelRa) GetSessionName() string { + if x != nil && x.SessionName != nil { + return *x.SessionName } - return 0 + return "" } -// The request to retrieve BGPv6 per peer metrics/statistics. -type Bgpv6MetricsRequest struct { +// Description missing in models +type FlowRSVPLspTunnelFlag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of BGPv6 peers to return results for. An empty list will return results - // for all BGPv6 peers. - // - // x-constraint: - // - /components/schemas/Bgp.V6peer/properties/name - // - // x-constraint: - // - /components/schemas/Bgp.V6peer/properties/name - PeerNames []string `protobuf:"bytes,1,rep,name=peer_names,json=peerNames,proto3" json:"peer_names,omitempty"` - // The list of column names that the returned result set will contain. If the list is - // empty then all columns will be returned except for any result_groups. The name of - // the BGPv6 peer cannot be excluded. - ColumnNames []Bgpv6MetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.Bgpv6MetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` + // Description missing in models + // default = Choice.Enum.local_protection_desired + Choice *FlowRSVPLspTunnelFlag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPLspTunnelFlag_Choice_Enum,oneof" json:"choice,omitempty"` } -func (x *Bgpv6MetricsRequest) Reset() { - *x = Bgpv6MetricsRequest{} +func (x *FlowRSVPLspTunnelFlag) Reset() { + *x = FlowRSVPLspTunnelFlag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[366] + mi := &file_otg_proto_msgTypes[361] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Bgpv6MetricsRequest) String() string { +func (x *FlowRSVPLspTunnelFlag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Bgpv6MetricsRequest) ProtoMessage() {} +func (*FlowRSVPLspTunnelFlag) ProtoMessage() {} -func (x *Bgpv6MetricsRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[366] +func (x *FlowRSVPLspTunnelFlag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[361] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -53201,99 +55731,54 @@ func (x *Bgpv6MetricsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Bgpv6MetricsRequest.ProtoReflect.Descriptor instead. -func (*Bgpv6MetricsRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{366} -} - -func (x *Bgpv6MetricsRequest) GetPeerNames() []string { - if x != nil { - return x.PeerNames - } - return nil +// Deprecated: Use FlowRSVPLspTunnelFlag.ProtoReflect.Descriptor instead. +func (*FlowRSVPLspTunnelFlag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{361} } -func (x *Bgpv6MetricsRequest) GetColumnNames() []Bgpv6MetricsRequest_ColumnNames_Enum { - if x != nil { - return x.ColumnNames +func (x *FlowRSVPLspTunnelFlag) GetChoice() FlowRSVPLspTunnelFlag_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return FlowRSVPLspTunnelFlag_Choice_unspecified } -// BGPv6 per peer statistics information. -type Bgpv6Metric struct { +// Description missing in models +type FlowRSVPSessionAttributeNameLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of a configured BGPv6 peer. - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Session state as up or down. Up refers to an Established state and Down refers to - // any other state. - SessionState *Bgpv6Metric_SessionState_Enum `protobuf:"varint,2,opt,name=session_state,json=sessionState,proto3,enum=otg.Bgpv6Metric_SessionState_Enum,oneof" json:"session_state,omitempty"` - // Number of times the session went from Up to Down state. - SessionFlapCount *uint64 `protobuf:"varint,3,opt,name=session_flap_count,json=sessionFlapCount,proto3,oneof" json:"session_flap_count,omitempty"` - // Number of routes advertised. - RoutesAdvertised *uint64 `protobuf:"varint,4,opt,name=routes_advertised,json=routesAdvertised,proto3,oneof" json:"routes_advertised,omitempty"` - // Number of routes received. - RoutesReceived *uint64 `protobuf:"varint,5,opt,name=routes_received,json=routesReceived,proto3,oneof" json:"routes_received,omitempty"` - // Number of route withdraws sent. - RouteWithdrawsSent *uint64 `protobuf:"varint,6,opt,name=route_withdraws_sent,json=routeWithdrawsSent,proto3,oneof" json:"route_withdraws_sent,omitempty"` - // Number of route withdraws received. - RouteWithdrawsReceived *uint64 `protobuf:"varint,7,opt,name=route_withdraws_received,json=routeWithdrawsReceived,proto3,oneof" json:"route_withdraws_received,omitempty"` - // Number of Update messages sent. - UpdatesSent *uint64 `protobuf:"varint,8,opt,name=updates_sent,json=updatesSent,proto3,oneof" json:"updates_sent,omitempty"` - // Number of Update messages received. - UpdatesReceived *uint64 `protobuf:"varint,9,opt,name=updates_received,json=updatesReceived,proto3,oneof" json:"updates_received,omitempty"` - // Number of Open messages sent. - OpensSent *uint64 `protobuf:"varint,10,opt,name=opens_sent,json=opensSent,proto3,oneof" json:"opens_sent,omitempty"` - // Number of Open messages received. - OpensReceived *uint64 `protobuf:"varint,11,opt,name=opens_received,json=opensReceived,proto3,oneof" json:"opens_received,omitempty"` - // Number of Keepalive messages sent. - KeepalivesSent *uint64 `protobuf:"varint,12,opt,name=keepalives_sent,json=keepalivesSent,proto3,oneof" json:"keepalives_sent,omitempty"` - // Number of Keepalive messages received. - KeepalivesReceived *uint64 `protobuf:"varint,13,opt,name=keepalives_received,json=keepalivesReceived,proto3,oneof" json:"keepalives_received,omitempty"` - // Number of Notification messages sent. - NotificationsSent *uint64 `protobuf:"varint,14,opt,name=notifications_sent,json=notificationsSent,proto3,oneof" json:"notifications_sent,omitempty"` - // Number of Notification messages received. - NotificationsReceived *uint64 `protobuf:"varint,15,opt,name=notifications_received,json=notificationsReceived,proto3,oneof" json:"notifications_received,omitempty"` - // BGP peer FSM (Finite State Machine) state as Idle, Connect, Active, OpenSent, OpenConfirm - // and Established. In all the states except Established the BGP session is down. Idle - // refers to the Idle state of the FSM. Connect refers to the state where the session - // is waiting for the underlying transport session to be established. Active refers - // to the state where the session is awaiting for a connection from the remote peer. - // OpenSent refers to the state where the session is in the process of being established. - // The local system has sent an OPEN message. OpenConfirm refers to the state where - // the session is in the process of being established. The local system has sent and - // received an OPEN message and is awaiting a NOTIFICATION or KEEPALIVE message from - // remote peer. Established refers to the state where the BGP session with the peer - // is established. - FsmState *Bgpv6Metric_FsmState_Enum `protobuf:"varint,16,opt,name=fsm_state,json=fsmState,proto3,enum=otg.Bgpv6Metric_FsmState_Enum,oneof" json:"fsm_state,omitempty"` - // Number of End-of-RIB markers received indicating the completion of the initial routing - // update for a particular address family after the session is established. - // For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with - // the minimum length. For any other address family, it is an UPDATE message that contains - // only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . - EndOfRibReceived *uint64 `protobuf:"varint,17,opt,name=end_of_rib_received,json=endOfRibReceived,proto3,oneof" json:"end_of_rib_received,omitempty"` + // auto or configured value. + // default = Choice.Enum.auto + Choice *FlowRSVPSessionAttributeNameLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPSessionAttributeNameLength_Choice_Enum,oneof" json:"choice,omitempty"` + // The OTG implementation will provide a system generated value for this property. + // If the OTG implementation is unable to generate a value the default value must be + // used. + // default = 0 + Auto *uint32 `protobuf:"varint,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *Bgpv6Metric) Reset() { - *x = Bgpv6Metric{} +func (x *FlowRSVPSessionAttributeNameLength) Reset() { + *x = FlowRSVPSessionAttributeNameLength{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[367] + mi := &file_otg_proto_msgTypes[362] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Bgpv6Metric) String() string { +func (x *FlowRSVPSessionAttributeNameLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Bgpv6Metric) ProtoMessage() {} +func (*FlowRSVPSessionAttributeNameLength) ProtoMessage() {} -func (x *Bgpv6Metric) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[367] +func (x *FlowRSVPSessionAttributeNameLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[362] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -53304,168 +55789,181 @@ func (x *Bgpv6Metric) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Bgpv6Metric.ProtoReflect.Descriptor instead. -func (*Bgpv6Metric) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{367} +// Deprecated: Use FlowRSVPSessionAttributeNameLength.ProtoReflect.Descriptor instead. +func (*FlowRSVPSessionAttributeNameLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{362} } -func (x *Bgpv6Metric) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *FlowRSVPSessionAttributeNameLength) GetChoice() FlowRSVPSessionAttributeNameLength_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return FlowRSVPSessionAttributeNameLength_Choice_unspecified } -func (x *Bgpv6Metric) GetSessionState() Bgpv6Metric_SessionState_Enum { - if x != nil && x.SessionState != nil { - return *x.SessionState +func (x *FlowRSVPSessionAttributeNameLength) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto } - return Bgpv6Metric_SessionState_unspecified + return 0 } -func (x *Bgpv6Metric) GetSessionFlapCount() uint64 { - if x != nil && x.SessionFlapCount != nil { - return *x.SessionFlapCount +func (x *FlowRSVPSessionAttributeNameLength) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } return 0 } -func (x *Bgpv6Metric) GetRoutesAdvertised() uint64 { - if x != nil && x.RoutesAdvertised != nil { - return *x.RoutesAdvertised - } - return 0 +// C-Type is specific to a class num. +type FlowRSVPPathObjectsClassSenderTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` + // Description missing in models + CType *FlowRSVPPathObjectsSenderTemplateCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` } -func (x *Bgpv6Metric) GetRoutesReceived() uint64 { - if x != nil && x.RoutesReceived != nil { - return *x.RoutesReceived +func (x *FlowRSVPPathObjectsClassSenderTemplate) Reset() { + *x = FlowRSVPPathObjectsClassSenderTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[363] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *Bgpv6Metric) GetRouteWithdrawsSent() uint64 { - if x != nil && x.RouteWithdrawsSent != nil { - return *x.RouteWithdrawsSent - } - return 0 +func (x *FlowRSVPPathObjectsClassSenderTemplate) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *Bgpv6Metric) GetRouteWithdrawsReceived() uint64 { - if x != nil && x.RouteWithdrawsReceived != nil { - return *x.RouteWithdrawsReceived +func (*FlowRSVPPathObjectsClassSenderTemplate) ProtoMessage() {} + +func (x *FlowRSVPPathObjectsClassSenderTemplate) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[363] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *Bgpv6Metric) GetUpdatesSent() uint64 { - if x != nil && x.UpdatesSent != nil { - return *x.UpdatesSent - } - return 0 +// Deprecated: Use FlowRSVPPathObjectsClassSenderTemplate.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsClassSenderTemplate) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{363} } -func (x *Bgpv6Metric) GetUpdatesReceived() uint64 { - if x != nil && x.UpdatesReceived != nil { - return *x.UpdatesReceived +func (x *FlowRSVPPathObjectsClassSenderTemplate) GetLength() *FlowRSVPObjectLength { + if x != nil { + return x.Length } - return 0 + return nil } -func (x *Bgpv6Metric) GetOpensSent() uint64 { - if x != nil && x.OpensSent != nil { - return *x.OpensSent +func (x *FlowRSVPPathObjectsClassSenderTemplate) GetCType() *FlowRSVPPathObjectsSenderTemplateCType { + if x != nil { + return x.CType } - return 0 + return nil } -func (x *Bgpv6Metric) GetOpensReceived() uint64 { - if x != nil && x.OpensReceived != nil { - return *x.OpensReceived - } - return 0 +// Object for SENDER_TEMPLATE class. Currently supported c-type is LSP Tunnel IPv4 (7). +type FlowRSVPPathObjectsSenderTemplateCType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.lsp_tunnel_ipv4 + Choice *FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + LspTunnelIpv4 *FlowRSVPPathSenderTemplateLspTunnelIpv4 `protobuf:"bytes,2,opt,name=lsp_tunnel_ipv4,json=lspTunnelIpv4,proto3" json:"lsp_tunnel_ipv4,omitempty"` } -func (x *Bgpv6Metric) GetKeepalivesSent() uint64 { - if x != nil && x.KeepalivesSent != nil { - return *x.KeepalivesSent +func (x *FlowRSVPPathObjectsSenderTemplateCType) Reset() { + *x = FlowRSVPPathObjectsSenderTemplateCType{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[364] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *Bgpv6Metric) GetKeepalivesReceived() uint64 { - if x != nil && x.KeepalivesReceived != nil { - return *x.KeepalivesReceived - } - return 0 +func (x *FlowRSVPPathObjectsSenderTemplateCType) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *Bgpv6Metric) GetNotificationsSent() uint64 { - if x != nil && x.NotificationsSent != nil { - return *x.NotificationsSent +func (*FlowRSVPPathObjectsSenderTemplateCType) ProtoMessage() {} + +func (x *FlowRSVPPathObjectsSenderTemplateCType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[364] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *Bgpv6Metric) GetNotificationsReceived() uint64 { - if x != nil && x.NotificationsReceived != nil { - return *x.NotificationsReceived - } - return 0 +// Deprecated: Use FlowRSVPPathObjectsSenderTemplateCType.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsSenderTemplateCType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{364} } -func (x *Bgpv6Metric) GetFsmState() Bgpv6Metric_FsmState_Enum { - if x != nil && x.FsmState != nil { - return *x.FsmState +func (x *FlowRSVPPathObjectsSenderTemplateCType) GetChoice() FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return Bgpv6Metric_FsmState_unspecified + return FlowRSVPPathObjectsSenderTemplateCType_Choice_unspecified } -func (x *Bgpv6Metric) GetEndOfRibReceived() uint64 { - if x != nil && x.EndOfRibReceived != nil { - return *x.EndOfRibReceived +func (x *FlowRSVPPathObjectsSenderTemplateCType) GetLspTunnelIpv4() *FlowRSVPPathSenderTemplateLspTunnelIpv4 { + if x != nil { + return x.LspTunnelIpv4 } - return 0 + return nil } -// The request to retrieve ISIS per Router metrics/statistics. -type IsisMetricsRequest struct { +// Class = SENDER_TEMPLATE, LSP_TUNNEL_IPv4 C-Type = 7 +type FlowRSVPPathSenderTemplateLspTunnelIpv4 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of ISIS Routers to return results for. An empty list will return results - // for all ISIS router. - // - // x-constraint: - // - /components/schemas/Device.IsisRouter/properties/name - // - // x-constraint: - // - /components/schemas/Device.IsisRouter/properties/name - RouterNames []string `protobuf:"bytes,1,rep,name=router_names,json=routerNames,proto3" json:"router_names,omitempty"` - // The list of column names that the returned result set will contain. If the list is - // empty then all columns will be returned except for any result_groups. The name of - // the ISIS Router cannot be excluded. - ColumnNames []IsisMetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.IsisMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` + // Description missing in models + Ipv4TunnelSenderAddress *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress `protobuf:"bytes,1,opt,name=ipv4_tunnel_sender_address,json=ipv4TunnelSenderAddress,proto3" json:"ipv4_tunnel_sender_address,omitempty"` + // Description missing in models + Reserved *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved `protobuf:"bytes,2,opt,name=reserved,proto3" json:"reserved,omitempty"` + // Description missing in models + LspId *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId `protobuf:"bytes,3,opt,name=lsp_id,json=lspId,proto3" json:"lsp_id,omitempty"` } -func (x *IsisMetricsRequest) Reset() { - *x = IsisMetricsRequest{} +func (x *FlowRSVPPathSenderTemplateLspTunnelIpv4) Reset() { + *x = FlowRSVPPathSenderTemplateLspTunnelIpv4{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[368] + mi := &file_otg_proto_msgTypes[365] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisMetricsRequest) String() string { +func (x *FlowRSVPPathSenderTemplateLspTunnelIpv4) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisMetricsRequest) ProtoMessage() {} +func (*FlowRSVPPathSenderTemplateLspTunnelIpv4) ProtoMessage() {} -func (x *IsisMetricsRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[368] +func (x *FlowRSVPPathSenderTemplateLspTunnelIpv4) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[365] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -53476,104 +55974,62 @@ func (x *IsisMetricsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisMetricsRequest.ProtoReflect.Descriptor instead. -func (*IsisMetricsRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{368} +// Deprecated: Use FlowRSVPPathSenderTemplateLspTunnelIpv4.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathSenderTemplateLspTunnelIpv4) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{365} } -func (x *IsisMetricsRequest) GetRouterNames() []string { +func (x *FlowRSVPPathSenderTemplateLspTunnelIpv4) GetIpv4TunnelSenderAddress() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress { if x != nil { - return x.RouterNames + return x.Ipv4TunnelSenderAddress } return nil } -func (x *IsisMetricsRequest) GetColumnNames() []IsisMetricsRequest_ColumnNames_Enum { +func (x *FlowRSVPPathSenderTemplateLspTunnelIpv4) GetReserved() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved { if x != nil { - return x.ColumnNames + return x.Reserved } return nil } -// ISIS per router statistics information. -type IsisMetric struct { +func (x *FlowRSVPPathSenderTemplateLspTunnelIpv4) GetLspId() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId { + if x != nil { + return x.LspId + } + return nil +} + +// C-Type is specific to a class num. +type FlowRSVPPathObjectsClassSenderTspec struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of a configured ISIS router. - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // The number of Level 1 (L1) sessions that are fully up. - L1SessionsUp *uint32 `protobuf:"varint,2,opt,name=l1_sessions_up,json=l1SessionsUp,proto3,oneof" json:"l1_sessions_up,omitempty"` - // The number of Level 1 Sessions Flap. - L1SessionFlap *uint64 `protobuf:"varint,3,opt,name=l1_session_flap,json=l1SessionFlap,proto3,oneof" json:"l1_session_flap,omitempty"` - // Number of Level 1 Hello messages sent. - L1BroadcastHellosSent *uint64 `protobuf:"varint,4,opt,name=l1_broadcast_hellos_sent,json=l1BroadcastHellosSent,proto3,oneof" json:"l1_broadcast_hellos_sent,omitempty"` - // Number of Level 1 Hello messages received. - L1BroadcastHellosReceived *uint64 `protobuf:"varint,5,opt,name=l1_broadcast_hellos_received,json=l1BroadcastHellosReceived,proto3,oneof" json:"l1_broadcast_hellos_received,omitempty"` - // Number of Level 1 Point-to-Point(P2P) Hello messages sent. - L1PointToPointHellosSent *uint64 `protobuf:"varint,6,opt,name=l1_point_to_point_hellos_sent,json=l1PointToPointHellosSent,proto3,oneof" json:"l1_point_to_point_hellos_sent,omitempty"` - // Number of Level 1 Point-to-Point(P2P) Hello messages received. - L1PointToPointHellosReceived *uint64 `protobuf:"varint,7,opt,name=l1_point_to_point_hellos_received,json=l1PointToPointHellosReceived,proto3,oneof" json:"l1_point_to_point_hellos_received,omitempty"` - // Number of Link State Updates (LSPs) in the Level 1 LSP Databases. - L1DatabaseSize *uint64 `protobuf:"varint,8,opt,name=l1_database_size,json=l1DatabaseSize,proto3,oneof" json:"l1_database_size,omitempty"` - // Number of Level 1 (L1) Partial Sequence Number Packet (PSNPs) sent. - L1PsnpSent *uint64 `protobuf:"varint,9,opt,name=l1_psnp_sent,json=l1PsnpSent,proto3,oneof" json:"l1_psnp_sent,omitempty"` - // Number of Level 1 (L1) Complete Sequence Number Packet (PSNPs) received. - L1PsnpReceived *uint64 `protobuf:"varint,10,opt,name=l1_psnp_received,json=l1PsnpReceived,proto3,oneof" json:"l1_psnp_received,omitempty"` - // Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) sent. - L1CsnpSent *uint64 `protobuf:"varint,11,opt,name=l1_csnp_sent,json=l1CsnpSent,proto3,oneof" json:"l1_csnp_sent,omitempty"` - // Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) received. - L1CsnpReceived *uint64 `protobuf:"varint,12,opt,name=l1_csnp_received,json=l1CsnpReceived,proto3,oneof" json:"l1_csnp_received,omitempty"` - // Number of Level 1 (L1) Link State Protocol Data Units (LSPs) sent. - L1LspSent *uint64 `protobuf:"varint,13,opt,name=l1_lsp_sent,json=l1LspSent,proto3,oneof" json:"l1_lsp_sent,omitempty"` - // Number of Level 1 (L1) Link State Protocol Data Units (LSPs) received. - L1LspReceived *uint64 `protobuf:"varint,14,opt,name=l1_lsp_received,json=l1LspReceived,proto3,oneof" json:"l1_lsp_received,omitempty"` - // The number of Level 2 (L2) sessions that are fully up. - L2SessionsUp *uint32 `protobuf:"varint,15,opt,name=l2_sessions_up,json=l2SessionsUp,proto3,oneof" json:"l2_sessions_up,omitempty"` - // The number of Level 2 Sessions Flap. - L2SessionFlap *uint64 `protobuf:"varint,16,opt,name=l2_session_flap,json=l2SessionFlap,proto3,oneof" json:"l2_session_flap,omitempty"` - // Number of Level 2 Hello messages sent. - L2BroadcastHellosSent *uint64 `protobuf:"varint,17,opt,name=l2_broadcast_hellos_sent,json=l2BroadcastHellosSent,proto3,oneof" json:"l2_broadcast_hellos_sent,omitempty"` - // Number of Level 2 Hello messages received. - L2BroadcastHellosReceived *uint64 `protobuf:"varint,18,opt,name=l2_broadcast_hellos_received,json=l2BroadcastHellosReceived,proto3,oneof" json:"l2_broadcast_hellos_received,omitempty"` - // Number of Level 2 Point-to-Point(P2P) Hello messages sent. - L2PointToPointHellosSent *uint64 `protobuf:"varint,19,opt,name=l2_point_to_point_hellos_sent,json=l2PointToPointHellosSent,proto3,oneof" json:"l2_point_to_point_hellos_sent,omitempty"` - // Number of Level 2 Point-to-Point(P2P) Hello messages received. - L2PointToPointHellosReceived *uint64 `protobuf:"varint,20,opt,name=l2_point_to_point_hellos_received,json=l2PointToPointHellosReceived,proto3,oneof" json:"l2_point_to_point_hellos_received,omitempty"` - // Number of Link State Updates (LSPs) in the Level 2 LSP Databases. - L2DatabaseSize *uint64 `protobuf:"varint,21,opt,name=l2_database_size,json=l2DatabaseSize,proto3,oneof" json:"l2_database_size,omitempty"` - // Number of Level 2 (L2) Partial Sequence Number Packet (PSNPs) sent. - L2PsnpSent *uint64 `protobuf:"varint,22,opt,name=l2_psnp_sent,json=l2PsnpSent,proto3,oneof" json:"l2_psnp_sent,omitempty"` - // Number of Level 2 (L2) Complete Sequence Number Packet (PSNPs) received. - L2PsnpReceived *uint64 `protobuf:"varint,23,opt,name=l2_psnp_received,json=l2PsnpReceived,proto3,oneof" json:"l2_psnp_received,omitempty"` - // Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) sent. - L2CsnpSent *uint64 `protobuf:"varint,24,opt,name=l2_csnp_sent,json=l2CsnpSent,proto3,oneof" json:"l2_csnp_sent,omitempty"` - // Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) received. - L2CsnpReceived *uint64 `protobuf:"varint,25,opt,name=l2_csnp_received,json=l2CsnpReceived,proto3,oneof" json:"l2_csnp_received,omitempty"` - // Number of Level 2 (L2) Link State Protocol Data Units (LSPs) sent. - L2LspSent *uint64 `protobuf:"varint,26,opt,name=l2_lsp_sent,json=l2LspSent,proto3,oneof" json:"l2_lsp_sent,omitempty"` - // Number of Level 2 (L2) Link State Protocol Data Units (LSPs) received. - L2LspReceived *uint64 `protobuf:"varint,27,opt,name=l2_lsp_received,json=l2LspReceived,proto3,oneof" json:"l2_lsp_received,omitempty"` + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` + // Description missing in models + CType *FlowRSVPPathObjectsSenderTspecCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` } -func (x *IsisMetric) Reset() { - *x = IsisMetric{} +func (x *FlowRSVPPathObjectsClassSenderTspec) Reset() { + *x = FlowRSVPPathObjectsClassSenderTspec{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[369] + mi := &file_otg_proto_msgTypes[366] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisMetric) String() string { +func (x *FlowRSVPPathObjectsClassSenderTspec) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisMetric) ProtoMessage() {} +func (*FlowRSVPPathObjectsClassSenderTspec) ProtoMessage() {} -func (x *IsisMetric) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[369] +func (x *FlowRSVPPathObjectsClassSenderTspec) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[366] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -53584,237 +56040,294 @@ func (x *IsisMetric) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisMetric.ProtoReflect.Descriptor instead. -func (*IsisMetric) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{369} +// Deprecated: Use FlowRSVPPathObjectsClassSenderTspec.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsClassSenderTspec) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{366} } -func (x *IsisMetric) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *FlowRSVPPathObjectsClassSenderTspec) GetLength() *FlowRSVPObjectLength { + if x != nil { + return x.Length } - return "" + return nil } -func (x *IsisMetric) GetL1SessionsUp() uint32 { - if x != nil && x.L1SessionsUp != nil { - return *x.L1SessionsUp +func (x *FlowRSVPPathObjectsClassSenderTspec) GetCType() *FlowRSVPPathObjectsSenderTspecCType { + if x != nil { + return x.CType } - return 0 + return nil } -func (x *IsisMetric) GetL1SessionFlap() uint64 { - if x != nil && x.L1SessionFlap != nil { - return *x.L1SessionFlap - } - return 0 +// Object for SENDER_TSPEC class. Currently supported c-type is int-serv (2). +type FlowRSVPPathObjectsSenderTspecCType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.int_serv + Choice *FlowRSVPPathObjectsSenderTspecCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsSenderTspecCType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + IntServ *FlowRSVPPathSenderTspecIntServ `protobuf:"bytes,2,opt,name=int_serv,json=intServ,proto3" json:"int_serv,omitempty"` } -func (x *IsisMetric) GetL1BroadcastHellosSent() uint64 { - if x != nil && x.L1BroadcastHellosSent != nil { - return *x.L1BroadcastHellosSent +func (x *FlowRSVPPathObjectsSenderTspecCType) Reset() { + *x = FlowRSVPPathObjectsSenderTspecCType{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[367] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *IsisMetric) GetL1BroadcastHellosReceived() uint64 { - if x != nil && x.L1BroadcastHellosReceived != nil { - return *x.L1BroadcastHellosReceived - } - return 0 +func (x *FlowRSVPPathObjectsSenderTspecCType) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *IsisMetric) GetL1PointToPointHellosSent() uint64 { - if x != nil && x.L1PointToPointHellosSent != nil { - return *x.L1PointToPointHellosSent +func (*FlowRSVPPathObjectsSenderTspecCType) ProtoMessage() {} + +func (x *FlowRSVPPathObjectsSenderTspecCType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[367] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *IsisMetric) GetL1PointToPointHellosReceived() uint64 { - if x != nil && x.L1PointToPointHellosReceived != nil { - return *x.L1PointToPointHellosReceived - } - return 0 +// Deprecated: Use FlowRSVPPathObjectsSenderTspecCType.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsSenderTspecCType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{367} } -func (x *IsisMetric) GetL1DatabaseSize() uint64 { - if x != nil && x.L1DatabaseSize != nil { - return *x.L1DatabaseSize +func (x *FlowRSVPPathObjectsSenderTspecCType) GetChoice() FlowRSVPPathObjectsSenderTspecCType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return FlowRSVPPathObjectsSenderTspecCType_Choice_unspecified } -func (x *IsisMetric) GetL1PsnpSent() uint64 { - if x != nil && x.L1PsnpSent != nil { - return *x.L1PsnpSent +func (x *FlowRSVPPathObjectsSenderTspecCType) GetIntServ() *FlowRSVPPathSenderTspecIntServ { + if x != nil { + return x.IntServ } - return 0 + return nil } -func (x *IsisMetric) GetL1PsnpReceived() uint64 { - if x != nil && x.L1PsnpReceived != nil { - return *x.L1PsnpReceived - } - return 0 +// int-serv SENDER_TSPEC object: Class = 12, C-Type = 2 +type FlowRSVPPathSenderTspecIntServ struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description missing in models + Version *PatternFlowRSVPPathSenderTspecIntServVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Description missing in models + Reserved1 *PatternFlowRSVPPathSenderTspecIntServReserved1 `protobuf:"bytes,2,opt,name=reserved1,proto3" json:"reserved1,omitempty"` + // Description missing in models + OverallLength *PatternFlowRSVPPathSenderTspecIntServOverallLength `protobuf:"bytes,3,opt,name=overall_length,json=overallLength,proto3" json:"overall_length,omitempty"` + // Description missing in models + ServiceHeader *PatternFlowRSVPPathSenderTspecIntServServiceHeader `protobuf:"bytes,4,opt,name=service_header,json=serviceHeader,proto3" json:"service_header,omitempty"` + // Description missing in models + ZeroBit *PatternFlowRSVPPathSenderTspecIntServZeroBit `protobuf:"bytes,5,opt,name=zero_bit,json=zeroBit,proto3" json:"zero_bit,omitempty"` + // Description missing in models + Reserved2 *PatternFlowRSVPPathSenderTspecIntServReserved2 `protobuf:"bytes,6,opt,name=reserved2,proto3" json:"reserved2,omitempty"` + // Description missing in models + LengthOfServiceData *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData `protobuf:"bytes,7,opt,name=length_of_service_data,json=lengthOfServiceData,proto3" json:"length_of_service_data,omitempty"` + // Description missing in models + ParameterIdTokenBucketTspec *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec `protobuf:"bytes,8,opt,name=parameter_id_token_bucket_tspec,json=parameterIdTokenBucketTspec,proto3" json:"parameter_id_token_bucket_tspec,omitempty"` + // Description missing in models + Parameter_127Flag *PatternFlowRSVPPathSenderTspecIntServParameter127Flag `protobuf:"bytes,9,opt,name=parameter_127_flag,json=parameter127Flag,proto3" json:"parameter_127_flag,omitempty"` + // Description missing in models + Parameter_127Length *PatternFlowRSVPPathSenderTspecIntServParameter127Length `protobuf:"bytes,10,opt,name=parameter_127_length,json=parameter127Length,proto3" json:"parameter_127_length,omitempty"` + // Token bucket rate is set to sender's view of its generated traffic. + // default = 0 + TokenBucketRate *float32 `protobuf:"fixed32,11,opt,name=token_bucket_rate,json=tokenBucketRate,proto3,oneof" json:"token_bucket_rate,omitempty"` + // Token bucket size is set to sender's view of its generated traffic. + // default = 0 + TokenBucketSize *float32 `protobuf:"fixed32,12,opt,name=token_bucket_size,json=tokenBucketSize,proto3,oneof" json:"token_bucket_size,omitempty"` + // The peak rate may be set to the sender's peak traffic generation rate (if known and + // controlled), the physical interface line rate (if known), or positive infinity (if + // no better value is available). + // default = 0 + PeakDataRate *float32 `protobuf:"fixed32,13,opt,name=peak_data_rate,json=peakDataRate,proto3,oneof" json:"peak_data_rate,omitempty"` + // Description missing in models + MinimumPolicedUnit *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit `protobuf:"bytes,14,opt,name=minimum_policed_unit,json=minimumPolicedUnit,proto3" json:"minimum_policed_unit,omitempty"` + // Description missing in models + MaximumPacketSize *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize `protobuf:"bytes,15,opt,name=maximum_packet_size,json=maximumPacketSize,proto3" json:"maximum_packet_size,omitempty"` } -func (x *IsisMetric) GetL1CsnpSent() uint64 { - if x != nil && x.L1CsnpSent != nil { - return *x.L1CsnpSent +func (x *FlowRSVPPathSenderTspecIntServ) Reset() { + *x = FlowRSVPPathSenderTspecIntServ{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[368] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *IsisMetric) GetL1CsnpReceived() uint64 { - if x != nil && x.L1CsnpReceived != nil { - return *x.L1CsnpReceived +func (x *FlowRSVPPathSenderTspecIntServ) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlowRSVPPathSenderTspecIntServ) ProtoMessage() {} + +func (x *FlowRSVPPathSenderTspecIntServ) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[368] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *IsisMetric) GetL1LspSent() uint64 { - if x != nil && x.L1LspSent != nil { - return *x.L1LspSent +// Deprecated: Use FlowRSVPPathSenderTspecIntServ.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathSenderTspecIntServ) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{368} +} + +func (x *FlowRSVPPathSenderTspecIntServ) GetVersion() *PatternFlowRSVPPathSenderTspecIntServVersion { + if x != nil { + return x.Version } - return 0 + return nil } -func (x *IsisMetric) GetL1LspReceived() uint64 { - if x != nil && x.L1LspReceived != nil { - return *x.L1LspReceived +func (x *FlowRSVPPathSenderTspecIntServ) GetReserved1() *PatternFlowRSVPPathSenderTspecIntServReserved1 { + if x != nil { + return x.Reserved1 } - return 0 + return nil } -func (x *IsisMetric) GetL2SessionsUp() uint32 { - if x != nil && x.L2SessionsUp != nil { - return *x.L2SessionsUp +func (x *FlowRSVPPathSenderTspecIntServ) GetOverallLength() *PatternFlowRSVPPathSenderTspecIntServOverallLength { + if x != nil { + return x.OverallLength } - return 0 + return nil } -func (x *IsisMetric) GetL2SessionFlap() uint64 { - if x != nil && x.L2SessionFlap != nil { - return *x.L2SessionFlap +func (x *FlowRSVPPathSenderTspecIntServ) GetServiceHeader() *PatternFlowRSVPPathSenderTspecIntServServiceHeader { + if x != nil { + return x.ServiceHeader } - return 0 + return nil } -func (x *IsisMetric) GetL2BroadcastHellosSent() uint64 { - if x != nil && x.L2BroadcastHellosSent != nil { - return *x.L2BroadcastHellosSent +func (x *FlowRSVPPathSenderTspecIntServ) GetZeroBit() *PatternFlowRSVPPathSenderTspecIntServZeroBit { + if x != nil { + return x.ZeroBit } - return 0 + return nil } -func (x *IsisMetric) GetL2BroadcastHellosReceived() uint64 { - if x != nil && x.L2BroadcastHellosReceived != nil { - return *x.L2BroadcastHellosReceived +func (x *FlowRSVPPathSenderTspecIntServ) GetReserved2() *PatternFlowRSVPPathSenderTspecIntServReserved2 { + if x != nil { + return x.Reserved2 } - return 0 + return nil } -func (x *IsisMetric) GetL2PointToPointHellosSent() uint64 { - if x != nil && x.L2PointToPointHellosSent != nil { - return *x.L2PointToPointHellosSent +func (x *FlowRSVPPathSenderTspecIntServ) GetLengthOfServiceData() *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData { + if x != nil { + return x.LengthOfServiceData } - return 0 + return nil } -func (x *IsisMetric) GetL2PointToPointHellosReceived() uint64 { - if x != nil && x.L2PointToPointHellosReceived != nil { - return *x.L2PointToPointHellosReceived +func (x *FlowRSVPPathSenderTspecIntServ) GetParameterIdTokenBucketTspec() *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec { + if x != nil { + return x.ParameterIdTokenBucketTspec } - return 0 + return nil } -func (x *IsisMetric) GetL2DatabaseSize() uint64 { - if x != nil && x.L2DatabaseSize != nil { - return *x.L2DatabaseSize +func (x *FlowRSVPPathSenderTspecIntServ) GetParameter_127Flag() *PatternFlowRSVPPathSenderTspecIntServParameter127Flag { + if x != nil { + return x.Parameter_127Flag } - return 0 + return nil } -func (x *IsisMetric) GetL2PsnpSent() uint64 { - if x != nil && x.L2PsnpSent != nil { - return *x.L2PsnpSent +func (x *FlowRSVPPathSenderTspecIntServ) GetParameter_127Length() *PatternFlowRSVPPathSenderTspecIntServParameter127Length { + if x != nil { + return x.Parameter_127Length } - return 0 + return nil } -func (x *IsisMetric) GetL2PsnpReceived() uint64 { - if x != nil && x.L2PsnpReceived != nil { - return *x.L2PsnpReceived +func (x *FlowRSVPPathSenderTspecIntServ) GetTokenBucketRate() float32 { + if x != nil && x.TokenBucketRate != nil { + return *x.TokenBucketRate } return 0 } -func (x *IsisMetric) GetL2CsnpSent() uint64 { - if x != nil && x.L2CsnpSent != nil { - return *x.L2CsnpSent +func (x *FlowRSVPPathSenderTspecIntServ) GetTokenBucketSize() float32 { + if x != nil && x.TokenBucketSize != nil { + return *x.TokenBucketSize } return 0 } -func (x *IsisMetric) GetL2CsnpReceived() uint64 { - if x != nil && x.L2CsnpReceived != nil { - return *x.L2CsnpReceived +func (x *FlowRSVPPathSenderTspecIntServ) GetPeakDataRate() float32 { + if x != nil && x.PeakDataRate != nil { + return *x.PeakDataRate } return 0 } -func (x *IsisMetric) GetL2LspSent() uint64 { - if x != nil && x.L2LspSent != nil { - return *x.L2LspSent +func (x *FlowRSVPPathSenderTspecIntServ) GetMinimumPolicedUnit() *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit { + if x != nil { + return x.MinimumPolicedUnit } - return 0 + return nil } -func (x *IsisMetric) GetL2LspReceived() uint64 { - if x != nil && x.L2LspReceived != nil { - return *x.L2LspReceived +func (x *FlowRSVPPathSenderTspecIntServ) GetMaximumPacketSize() *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize { + if x != nil { + return x.MaximumPacketSize } - return 0 + return nil } -// The request to retrieve per LAG metrics/statistics. -type LagMetricsRequest struct { +// C-Type is specific to a class num. +type FlowRSVPPathObjectsClassRecordRoute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of LAGs to return results for. An empty list will return results for all - // LAGs. - // - // x-constraint: - // - /components/schemas/Lag/properties/name - // - // x-constraint: - // - /components/schemas/Lag/properties/name - LagNames []string `protobuf:"bytes,1,rep,name=lag_names,json=lagNames,proto3" json:"lag_names,omitempty"` - // The list of column names that the returned result set will contain. If the list is - // empty then all columns will be returned. The name of the LAG cannot be excluded. - ColumnNames []LagMetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.LagMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + Length *FlowRSVPObjectLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` + // Description missing in models + CType *FlowRSVPPathObjectsRecordRouteCType `protobuf:"bytes,2,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` } -func (x *LagMetricsRequest) Reset() { - *x = LagMetricsRequest{} +func (x *FlowRSVPPathObjectsClassRecordRoute) Reset() { + *x = FlowRSVPPathObjectsClassRecordRoute{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[370] + mi := &file_otg_proto_msgTypes[369] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LagMetricsRequest) String() string { +func (x *FlowRSVPPathObjectsClassRecordRoute) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LagMetricsRequest) ProtoMessage() {} +func (*FlowRSVPPathObjectsClassRecordRoute) ProtoMessage() {} -func (x *LagMetricsRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[370] +func (x *FlowRSVPPathObjectsClassRecordRoute) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[369] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -53825,79 +56338,55 @@ func (x *LagMetricsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LagMetricsRequest.ProtoReflect.Descriptor instead. -func (*LagMetricsRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{370} +// Deprecated: Use FlowRSVPPathObjectsClassRecordRoute.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsClassRecordRoute) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{369} } -func (x *LagMetricsRequest) GetLagNames() []string { +func (x *FlowRSVPPathObjectsClassRecordRoute) GetLength() *FlowRSVPObjectLength { if x != nil { - return x.LagNames + return x.Length } return nil } -func (x *LagMetricsRequest) GetColumnNames() []LagMetricsRequest_ColumnNames_Enum { +func (x *FlowRSVPPathObjectsClassRecordRoute) GetCType() *FlowRSVPPathObjectsRecordRouteCType { if x != nil { - return x.ColumnNames + return x.CType } return nil } -// Description missing in models -type LagMetric struct { +// Object for RECORD_ROUTE class. c-type is Type 1 Route Record (1). +type FlowRSVPPathObjectsRecordRouteCType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of a configured LAG - // - // x-constraint: - // - /components/schemas/Lag/properties/name - // - // x-constraint: - // - /components/schemas/Lag/properties/name - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // The current operational state of the LAG. The state can be up or down. State 'up' - // indicates member_ports_up >= min_links. - OperStatus *LagMetric_OperStatus_Enum `protobuf:"varint,2,opt,name=oper_status,json=operStatus,proto3,enum=otg.LagMetric_OperStatus_Enum,oneof" json:"oper_status,omitempty"` - // The number of LAG member ports up. - MemberPortsUp *uint32 `protobuf:"varint,3,opt,name=member_ports_up,json=memberPortsUp,proto3,oneof" json:"member_ports_up,omitempty"` - // The current total number of frames transmitted. - FramesTx *uint64 `protobuf:"varint,4,opt,name=frames_tx,json=framesTx,proto3,oneof" json:"frames_tx,omitempty"` - // The current total number of valid frames received. - FramesRx *uint64 `protobuf:"varint,5,opt,name=frames_rx,json=framesRx,proto3,oneof" json:"frames_rx,omitempty"` - // The current total number of bytes transmitted. - BytesTx *uint64 `protobuf:"varint,6,opt,name=bytes_tx,json=bytesTx,proto3,oneof" json:"bytes_tx,omitempty"` - // The current total number of valid bytes received. - BytesRx *uint64 `protobuf:"varint,7,opt,name=bytes_rx,json=bytesRx,proto3,oneof" json:"bytes_rx,omitempty"` - // The current rate of frames transmitted. - FramesTxRate *float32 `protobuf:"fixed32,8,opt,name=frames_tx_rate,json=framesTxRate,proto3,oneof" json:"frames_tx_rate,omitempty"` - // The current rate of valid frames received. - FramesRxRate *float32 `protobuf:"fixed32,9,opt,name=frames_rx_rate,json=framesRxRate,proto3,oneof" json:"frames_rx_rate,omitempty"` - // The current rate of bytes transmitted. - BytesTxRate *float32 `protobuf:"fixed32,10,opt,name=bytes_tx_rate,json=bytesTxRate,proto3,oneof" json:"bytes_tx_rate,omitempty"` - // The current rate of bytes received. - BytesRxRate *float32 `protobuf:"fixed32,11,opt,name=bytes_rx_rate,json=bytesRxRate,proto3,oneof" json:"bytes_rx_rate,omitempty"` + // Description missing in models + // default = Choice.Enum.type_1 + Choice *FlowRSVPPathObjectsRecordRouteCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsRecordRouteCType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Type_1 *FlowRSVPPathRecordRouteType1 `protobuf:"bytes,2,opt,name=type_1,json=type1,proto3" json:"type_1,omitempty"` } -func (x *LagMetric) Reset() { - *x = LagMetric{} +func (x *FlowRSVPPathObjectsRecordRouteCType) Reset() { + *x = FlowRSVPPathObjectsRecordRouteCType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[371] + mi := &file_otg_proto_msgTypes[370] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LagMetric) String() string { +func (x *FlowRSVPPathObjectsRecordRouteCType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LagMetric) ProtoMessage() {} +func (*FlowRSVPPathObjectsRecordRouteCType) ProtoMessage() {} -func (x *LagMetric) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[371] +func (x *FlowRSVPPathObjectsRecordRouteCType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[370] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -53908,120 +56397,87 @@ func (x *LagMetric) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LagMetric.ProtoReflect.Descriptor instead. -func (*LagMetric) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{371} +// Deprecated: Use FlowRSVPPathObjectsRecordRouteCType.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsRecordRouteCType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{370} } -func (x *LagMetric) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *FlowRSVPPathObjectsRecordRouteCType) GetChoice() FlowRSVPPathObjectsRecordRouteCType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return FlowRSVPPathObjectsRecordRouteCType_Choice_unspecified } -func (x *LagMetric) GetOperStatus() LagMetric_OperStatus_Enum { - if x != nil && x.OperStatus != nil { - return *x.OperStatus +func (x *FlowRSVPPathObjectsRecordRouteCType) GetType_1() *FlowRSVPPathRecordRouteType1 { + if x != nil { + return x.Type_1 } - return LagMetric_OperStatus_unspecified + return nil } -func (x *LagMetric) GetMemberPortsUp() uint32 { - if x != nil && x.MemberPortsUp != nil { - return *x.MemberPortsUp - } - return 0 +// Type1 record route has list of subobjects. Currently supported subobjects are IPv4 +// address(1) and Label(3). +type FlowRSVPPathRecordRouteType1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description missing in models + Subobjects []*FlowRSVPType1RecordRouteSubobjects `protobuf:"bytes,1,rep,name=subobjects,proto3" json:"subobjects,omitempty"` } -func (x *LagMetric) GetFramesTx() uint64 { - if x != nil && x.FramesTx != nil { - return *x.FramesTx +func (x *FlowRSVPPathRecordRouteType1) Reset() { + *x = FlowRSVPPathRecordRouteType1{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[371] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *LagMetric) GetFramesRx() uint64 { - if x != nil && x.FramesRx != nil { - return *x.FramesRx - } - return 0 -} - -func (x *LagMetric) GetBytesTx() uint64 { - if x != nil && x.BytesTx != nil { - return *x.BytesTx - } - return 0 -} - -func (x *LagMetric) GetBytesRx() uint64 { - if x != nil && x.BytesRx != nil { - return *x.BytesRx - } - return 0 +func (x *FlowRSVPPathRecordRouteType1) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *LagMetric) GetFramesTxRate() float32 { - if x != nil && x.FramesTxRate != nil { - return *x.FramesTxRate - } - return 0 -} +func (*FlowRSVPPathRecordRouteType1) ProtoMessage() {} -func (x *LagMetric) GetFramesRxRate() float32 { - if x != nil && x.FramesRxRate != nil { - return *x.FramesRxRate +func (x *FlowRSVPPathRecordRouteType1) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[371] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *LagMetric) GetBytesTxRate() float32 { - if x != nil && x.BytesTxRate != nil { - return *x.BytesTxRate - } - return 0 +// Deprecated: Use FlowRSVPPathRecordRouteType1.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathRecordRouteType1) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{371} } -func (x *LagMetric) GetBytesRxRate() float32 { - if x != nil && x.BytesRxRate != nil { - return *x.BytesRxRate +func (x *FlowRSVPPathRecordRouteType1) GetSubobjects() []*FlowRSVPType1RecordRouteSubobjects { + if x != nil { + return x.Subobjects } - return 0 + return nil } -// The request to retrieve LACP per LAG member metrics/statistics. -type LacpMetricsRequest struct { +// Type is specific to a subobject. +type FlowRSVPType1RecordRouteSubobjects struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of LAG (ports group) for which LACP metrics to be returned. An empty list - // will return metrics for all LAGs. - // - // x-constraint: - // - /components/schemas/Lag/properties/name - // - // x-constraint: - // - /components/schemas/Lag/properties/name - LagNames []string `protobuf:"bytes,1,rep,name=lag_names,json=lagNames,proto3" json:"lag_names,omitempty"` - // The names of LAG members (ports) for which LACP metrics to be returned. An empty - // list will return metrics for all LAG members. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // x-constraint: - // - /components/schemas/Port/properties/name - LagMemberPortNames []string `protobuf:"bytes,2,rep,name=lag_member_port_names,json=lagMemberPortNames,proto3" json:"lag_member_port_names,omitempty"` - // The list of column names that the returned result set will contain. If the list is - // empty then all columns will be returned. The name of LAG and LAG member can not be - // excluded. - ColumnNames []LacpMetricsRequest_ColumnNames_Enum `protobuf:"varint,3,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.LacpMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` + // Description missing in models + Type *FlowRSVPPathObjectsRecordRouteSubObjectType `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` } -func (x *LacpMetricsRequest) Reset() { - *x = LacpMetricsRequest{} +func (x *FlowRSVPType1RecordRouteSubobjects) Reset() { + *x = FlowRSVPType1RecordRouteSubobjects{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[372] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54029,13 +56485,13 @@ func (x *LacpMetricsRequest) Reset() { } } -func (x *LacpMetricsRequest) String() string { +func (x *FlowRSVPType1RecordRouteSubobjects) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LacpMetricsRequest) ProtoMessage() {} +func (*FlowRSVPType1RecordRouteSubobjects) ProtoMessage() {} -func (x *LacpMetricsRequest) ProtoReflect() protoreflect.Message { +func (x *FlowRSVPType1RecordRouteSubobjects) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[372] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54047,79 +56503,35 @@ func (x *LacpMetricsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LacpMetricsRequest.ProtoReflect.Descriptor instead. -func (*LacpMetricsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowRSVPType1RecordRouteSubobjects.ProtoReflect.Descriptor instead. +func (*FlowRSVPType1RecordRouteSubobjects) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{372} } -func (x *LacpMetricsRequest) GetLagNames() []string { - if x != nil { - return x.LagNames - } - return nil -} - -func (x *LacpMetricsRequest) GetLagMemberPortNames() []string { - if x != nil { - return x.LagMemberPortNames - } - return nil -} - -func (x *LacpMetricsRequest) GetColumnNames() []LacpMetricsRequest_ColumnNames_Enum { +func (x *FlowRSVPType1RecordRouteSubobjects) GetType() *FlowRSVPPathObjectsRecordRouteSubObjectType { if x != nil { - return x.ColumnNames + return x.Type } return nil } -// LACP metrics (statistics) per LAG member. -type LacpMetric struct { +// Currently supported subobjects are IPv4 address(1) and Label(3). +type FlowRSVPPathObjectsRecordRouteSubObjectType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of a LAG (ports group) configured with LACP. - LagName *string `protobuf:"bytes,1,opt,name=lag_name,json=lagName,proto3,oneof" json:"lag_name,omitempty"` - // The name of a LAG member (port) configured with LACP. - LagMemberPortName *string `protobuf:"bytes,2,opt,name=lag_member_port_name,json=lagMemberPortName,proto3,oneof" json:"lag_member_port_name,omitempty"` - // Number of LACPDUs received. - LacpPacketsRx *uint64 `protobuf:"varint,3,opt,name=lacp_packets_rx,json=lacpPacketsRx,proto3,oneof" json:"lacp_packets_rx,omitempty"` - // Number of LACPDUs transmitted. - LacpPacketsTx *uint64 `protobuf:"varint,4,opt,name=lacp_packets_tx,json=lacpPacketsTx,proto3,oneof" json:"lacp_packets_tx,omitempty"` - // Number of LACPDUs receive packet errors. - LacpRxErrors *uint64 `protobuf:"varint,5,opt,name=lacp_rx_errors,json=lacpRxErrors,proto3,oneof" json:"lacp_rx_errors,omitempty"` - // Indicates participant is active or passive. - Activity *LacpMetric_Activity_Enum `protobuf:"varint,6,opt,name=activity,proto3,enum=otg.LacpMetric_Activity_Enum,oneof" json:"activity,omitempty"` - // The timeout type (short or long) used by the participant. - Timeout *LacpMetric_Timeout_Enum `protobuf:"varint,7,opt,name=timeout,proto3,enum=otg.LacpMetric_Timeout_Enum,oneof" json:"timeout,omitempty"` - // Indicates whether the participant is in-sync or out-of-sync. - Synchronization *LacpMetric_Synchronization_Enum `protobuf:"varint,8,opt,name=synchronization,proto3,enum=otg.LacpMetric_Synchronization_Enum,oneof" json:"synchronization,omitempty"` - // A true value indicates that the participant will allow the link to be used as part - // of the aggregate. A false value indicates the link should be used as an individual - // link. - Aggregatable *bool `protobuf:"varint,9,opt,name=aggregatable,proto3,oneof" json:"aggregatable,omitempty"` - // If true, the participant is collecting incoming frames on the link, otherwise false. - Collecting *bool `protobuf:"varint,10,opt,name=collecting,proto3,oneof" json:"collecting,omitempty"` - // When true, the participant is distributing outgoing frames; when false, distribution - // is disabled. - Distributing *bool `protobuf:"varint,11,opt,name=distributing,proto3,oneof" json:"distributing,omitempty"` - // MAC address that defines the local system ID for the aggregate interface. - SystemId *string `protobuf:"bytes,12,opt,name=system_id,json=systemId,proto3,oneof" json:"system_id,omitempty"` - // Current operational value of the key for the aggregate interface. - OperKey *uint32 `protobuf:"varint,13,opt,name=oper_key,json=operKey,proto3,oneof" json:"oper_key,omitempty"` - // MAC address representing the protocol partner's interface system ID. - PartnerId *string `protobuf:"bytes,14,opt,name=partner_id,json=partnerId,proto3,oneof" json:"partner_id,omitempty"` - // Operational value of the protocol partner's key. - PartnerKey *uint32 `protobuf:"varint,15,opt,name=partner_key,json=partnerKey,proto3,oneof" json:"partner_key,omitempty"` - // Port number of the local (actor) aggregation member. - PortNum *uint32 `protobuf:"varint,16,opt,name=port_num,json=portNum,proto3,oneof" json:"port_num,omitempty"` - // Port number of the partner (remote) port for this member port. - PartnerPortNum *uint32 `protobuf:"varint,17,opt,name=partner_port_num,json=partnerPortNum,proto3,oneof" json:"partner_port_num,omitempty"` + // Description missing in models + // default = Choice.Enum.ipv4_address + Choice *FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Ipv4Address *FlowRSVPPathRecordRouteType1Ipv4Address `protobuf:"bytes,2,opt,name=ipv4_address,json=ipv4Address,proto3" json:"ipv4_address,omitempty"` + // Description missing in models + Label *FlowRSVPPathRecordRouteType1Label `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"` } -func (x *LacpMetric) Reset() { - *x = LacpMetric{} +func (x *FlowRSVPPathObjectsRecordRouteSubObjectType) Reset() { + *x = FlowRSVPPathObjectsRecordRouteSubObjectType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[373] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54127,13 +56539,13 @@ func (x *LacpMetric) Reset() { } } -func (x *LacpMetric) String() string { +func (x *FlowRSVPPathObjectsRecordRouteSubObjectType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LacpMetric) ProtoMessage() {} +func (*FlowRSVPPathObjectsRecordRouteSubObjectType) ProtoMessage() {} -func (x *LacpMetric) ProtoReflect() protoreflect.Message { +func (x *FlowRSVPPathObjectsRecordRouteSubObjectType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[373] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54145,152 +56557,52 @@ func (x *LacpMetric) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LacpMetric.ProtoReflect.Descriptor instead. -func (*LacpMetric) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowRSVPPathObjectsRecordRouteSubObjectType.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsRecordRouteSubObjectType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{373} } -func (x *LacpMetric) GetLagName() string { - if x != nil && x.LagName != nil { - return *x.LagName - } - return "" -} - -func (x *LacpMetric) GetLagMemberPortName() string { - if x != nil && x.LagMemberPortName != nil { - return *x.LagMemberPortName - } - return "" -} - -func (x *LacpMetric) GetLacpPacketsRx() uint64 { - if x != nil && x.LacpPacketsRx != nil { - return *x.LacpPacketsRx - } - return 0 -} - -func (x *LacpMetric) GetLacpPacketsTx() uint64 { - if x != nil && x.LacpPacketsTx != nil { - return *x.LacpPacketsTx - } - return 0 -} - -func (x *LacpMetric) GetLacpRxErrors() uint64 { - if x != nil && x.LacpRxErrors != nil { - return *x.LacpRxErrors - } - return 0 -} - -func (x *LacpMetric) GetActivity() LacpMetric_Activity_Enum { - if x != nil && x.Activity != nil { - return *x.Activity - } - return LacpMetric_Activity_unspecified -} - -func (x *LacpMetric) GetTimeout() LacpMetric_Timeout_Enum { - if x != nil && x.Timeout != nil { - return *x.Timeout - } - return LacpMetric_Timeout_unspecified -} - -func (x *LacpMetric) GetSynchronization() LacpMetric_Synchronization_Enum { - if x != nil && x.Synchronization != nil { - return *x.Synchronization - } - return LacpMetric_Synchronization_unspecified -} - -func (x *LacpMetric) GetAggregatable() bool { - if x != nil && x.Aggregatable != nil { - return *x.Aggregatable - } - return false -} - -func (x *LacpMetric) GetCollecting() bool { - if x != nil && x.Collecting != nil { - return *x.Collecting - } - return false -} - -func (x *LacpMetric) GetDistributing() bool { - if x != nil && x.Distributing != nil { - return *x.Distributing - } - return false -} - -func (x *LacpMetric) GetSystemId() string { - if x != nil && x.SystemId != nil { - return *x.SystemId - } - return "" -} - -func (x *LacpMetric) GetOperKey() uint32 { - if x != nil && x.OperKey != nil { - return *x.OperKey - } - return 0 -} - -func (x *LacpMetric) GetPartnerId() string { - if x != nil && x.PartnerId != nil { - return *x.PartnerId - } - return "" -} - -func (x *LacpMetric) GetPartnerKey() uint32 { - if x != nil && x.PartnerKey != nil { - return *x.PartnerKey +func (x *FlowRSVPPathObjectsRecordRouteSubObjectType) GetChoice() FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_unspecified } -func (x *LacpMetric) GetPortNum() uint32 { - if x != nil && x.PortNum != nil { - return *x.PortNum +func (x *FlowRSVPPathObjectsRecordRouteSubObjectType) GetIpv4Address() *FlowRSVPPathRecordRouteType1Ipv4Address { + if x != nil { + return x.Ipv4Address } - return 0 + return nil } -func (x *LacpMetric) GetPartnerPortNum() uint32 { - if x != nil && x.PartnerPortNum != nil { - return *x.PartnerPortNum +func (x *FlowRSVPPathObjectsRecordRouteSubObjectType) GetLabel() *FlowRSVPPathRecordRouteType1Label { + if x != nil { + return x.Label } - return 0 + return nil } -// The request to retrieve LLDP per instance metrics/statistics. -type LldpMetricsRequest struct { +// Class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Address, C-Type: +// 1 +type FlowRSVPPathRecordRouteType1Ipv4Address struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of LLDP instances to return results for. An empty list will return results - // for all LLDP instances. - // - // x-constraint: - // - /components/schemas/Lldp/properties/name - // - // x-constraint: - // - /components/schemas/Lldp/properties/name - LldpNames []string `protobuf:"bytes,1,rep,name=lldp_names,json=lldpNames,proto3" json:"lldp_names,omitempty"` - // The requested list of column names for the result set. If the list is empty then - // metrics for all columns will be returned. The name of LLDP instance can not be excluded. - ColumnNames []LldpMetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.LldpMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` + // The Length contains the total length of the subobject in bytes, including the Type + // and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. + Length *FlowRSVPRouteRecordLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` + // Description missing in models + Ipv4Address *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address `protobuf:"bytes,2,opt,name=ipv4_address,json=ipv4Address,proto3" json:"ipv4_address,omitempty"` + // Description missing in models + PrefixLength *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength `protobuf:"bytes,3,opt,name=prefix_length,json=prefixLength,proto3" json:"prefix_length,omitempty"` + // 0x01 local_protection_available, 0x02 local_protection_in_use + Flags *FlowRSVPRecordRouteIPv4Flag `protobuf:"bytes,4,opt,name=flags,proto3" json:"flags,omitempty"` } -func (x *LldpMetricsRequest) Reset() { - *x = LldpMetricsRequest{} +func (x *FlowRSVPPathRecordRouteType1Ipv4Address) Reset() { + *x = FlowRSVPPathRecordRouteType1Ipv4Address{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[374] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54298,13 +56610,13 @@ func (x *LldpMetricsRequest) Reset() { } } -func (x *LldpMetricsRequest) String() string { +func (x *FlowRSVPPathRecordRouteType1Ipv4Address) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpMetricsRequest) ProtoMessage() {} +func (*FlowRSVPPathRecordRouteType1Ipv4Address) ProtoMessage() {} -func (x *LldpMetricsRequest) ProtoReflect() protoreflect.Message { +func (x *FlowRSVPPathRecordRouteType1Ipv4Address) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[374] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54316,59 +56628,52 @@ func (x *LldpMetricsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpMetricsRequest.ProtoReflect.Descriptor instead. -func (*LldpMetricsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowRSVPPathRecordRouteType1Ipv4Address.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathRecordRouteType1Ipv4Address) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{374} } -func (x *LldpMetricsRequest) GetLldpNames() []string { +func (x *FlowRSVPPathRecordRouteType1Ipv4Address) GetLength() *FlowRSVPRouteRecordLength { if x != nil { - return x.LldpNames + return x.Length } return nil } -func (x *LldpMetricsRequest) GetColumnNames() []LldpMetricsRequest_ColumnNames_Enum { +func (x *FlowRSVPPathRecordRouteType1Ipv4Address) GetIpv4Address() *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address { if x != nil { - return x.ColumnNames + return x.Ipv4Address } return nil } -// LLDP per instance statistics information. -type LldpMetric struct { +func (x *FlowRSVPPathRecordRouteType1Ipv4Address) GetPrefixLength() *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength { + if x != nil { + return x.PrefixLength + } + return nil +} + +func (x *FlowRSVPPathRecordRouteType1Ipv4Address) GetFlags() *FlowRSVPRecordRouteIPv4Flag { + if x != nil { + return x.Flags + } + return nil +} + +// Description missing in models +type FlowRSVPRecordRouteIPv4Flag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the configured LLDP instance. - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Number of LLDP frames received. - FramesRx *uint64 `protobuf:"varint,2,opt,name=frames_rx,json=framesRx,proto3,oneof" json:"frames_rx,omitempty"` - // Number of LLDP frames transmitted. - FramesTx *uint64 `protobuf:"varint,3,opt,name=frames_tx,json=framesTx,proto3,oneof" json:"frames_tx,omitempty"` - // Number of LLDP frames received with packet errors. This stat should be incremented - // based on statsFramesInErrorsTotal increment rule in section 10.3.2 of IEEE Std 802.1 - // AB-2005. - FramesErrorRx *uint64 `protobuf:"varint,4,opt,name=frames_error_rx,json=framesErrorRx,proto3,oneof" json:"frames_error_rx,omitempty"` - // Number of LLDP frames received that are discarded. This stat should be incremented - // when one or more of the three mandatory TLVs at the beginning of the LLDPDU is missing, - // out of order or contains an out of range information string length. This stat should - // follow the validation rules in section 10.3.2 of IEEE Std 802.1 AB-2005. - FramesDiscard *uint64 `protobuf:"varint,5,opt,name=frames_discard,json=framesDiscard,proto3,oneof" json:"frames_discard,omitempty"` - // Number of LLDP tlvs received that are discarded. If any TLV contains an error condition - // specific for that particular TLV or if any TLV extends past the physical end of - // the frame then these TLVs will be discarded. - TlvsDiscard *uint64 `protobuf:"varint,6,opt,name=tlvs_discard,json=tlvsDiscard,proto3,oneof" json:"tlvs_discard,omitempty"` - // Number of LLDP unknown tlvs received. If the OUI of the organizationlly specific - // TLV and/or organizationally defined subtype are not recognized,or if TLV type value - // is in the range of reserved TLV types then these TLVs will be considered as unknown - // TLVs. - TlvsUnknown *uint64 `protobuf:"varint,7,opt,name=tlvs_unknown,json=tlvsUnknown,proto3,oneof" json:"tlvs_unknown,omitempty"` + // Description missing in models + // default = Choice.Enum.local_protection_available + Choice *FlowRSVPRecordRouteIPv4Flag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPRecordRouteIPv4Flag_Choice_Enum,oneof" json:"choice,omitempty"` } -func (x *LldpMetric) Reset() { - *x = LldpMetric{} +func (x *FlowRSVPRecordRouteIPv4Flag) Reset() { + *x = FlowRSVPRecordRouteIPv4Flag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[375] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54376,13 +56681,13 @@ func (x *LldpMetric) Reset() { } } -func (x *LldpMetric) String() string { +func (x *FlowRSVPRecordRouteIPv4Flag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpMetric) ProtoMessage() {} +func (*FlowRSVPRecordRouteIPv4Flag) ProtoMessage() {} -func (x *LldpMetric) ProtoReflect() protoreflect.Message { +func (x *FlowRSVPRecordRouteIPv4Flag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[375] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54394,82 +56699,37 @@ func (x *LldpMetric) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpMetric.ProtoReflect.Descriptor instead. -func (*LldpMetric) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowRSVPRecordRouteIPv4Flag.ProtoReflect.Descriptor instead. +func (*FlowRSVPRecordRouteIPv4Flag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{375} } -func (x *LldpMetric) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *LldpMetric) GetFramesRx() uint64 { - if x != nil && x.FramesRx != nil { - return *x.FramesRx - } - return 0 -} - -func (x *LldpMetric) GetFramesTx() uint64 { - if x != nil && x.FramesTx != nil { - return *x.FramesTx - } - return 0 -} - -func (x *LldpMetric) GetFramesErrorRx() uint64 { - if x != nil && x.FramesErrorRx != nil { - return *x.FramesErrorRx - } - return 0 -} - -func (x *LldpMetric) GetFramesDiscard() uint64 { - if x != nil && x.FramesDiscard != nil { - return *x.FramesDiscard - } - return 0 -} - -func (x *LldpMetric) GetTlvsDiscard() uint64 { - if x != nil && x.TlvsDiscard != nil { - return *x.TlvsDiscard - } - return 0 -} - -func (x *LldpMetric) GetTlvsUnknown() uint64 { - if x != nil && x.TlvsUnknown != nil { - return *x.TlvsUnknown +func (x *FlowRSVPRecordRouteIPv4Flag) GetChoice() FlowRSVPRecordRouteIPv4Flag_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return FlowRSVPRecordRouteIPv4Flag_Choice_unspecified } -// The request to retrieve RSVP-TE per Router metrics/statistics. -type RsvpMetricsRequest struct { +// Class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Label, C-Type: 3 +type FlowRSVPPathRecordRouteType1Label struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of RSVP-TE Routers to return results for. An empty list as input will return - // results for all RSVP-TE routers. - // - // x-constraint: - // - /components/schemas/Device.Rsvp/properties/name - // - // x-constraint: - // - /components/schemas/Device.Rsvp/properties/name - RouterNames []string `protobuf:"bytes,1,rep,name=router_names,json=routerNames,proto3" json:"router_names,omitempty"` - // The list of column names that the returned result set will contain. If the input - // list is empty then all columns will be returned except for any result_groups. - ColumnNames []RsvpMetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.RsvpMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` + // The Length contains the total length of the subobject in bytes, including the Type + // and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. + Length *FlowRSVPRouteRecordLength `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` + // Description missing in models + Flags *PatternFlowRSVPPathRecordRouteType1LabelFlags `protobuf:"bytes,2,opt,name=flags,proto3" json:"flags,omitempty"` + // Description missing in models + CType *PatternFlowRSVPPathRecordRouteType1LabelCType `protobuf:"bytes,3,opt,name=c_type,json=cType,proto3" json:"c_type,omitempty"` + // The contents of the Label Object. Copied from the Label Object. + Label *FlowRSVPPathRecordRouteLabel `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"` } -func (x *RsvpMetricsRequest) Reset() { - *x = RsvpMetricsRequest{} +func (x *FlowRSVPPathRecordRouteType1Label) Reset() { + *x = FlowRSVPPathRecordRouteType1Label{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[376] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54477,13 +56737,13 @@ func (x *RsvpMetricsRequest) Reset() { } } -func (x *RsvpMetricsRequest) String() string { +func (x *FlowRSVPPathRecordRouteType1Label) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpMetricsRequest) ProtoMessage() {} +func (*FlowRSVPPathRecordRouteType1Label) ProtoMessage() {} -func (x *RsvpMetricsRequest) ProtoReflect() protoreflect.Message { +func (x *FlowRSVPPathRecordRouteType1Label) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[376] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54495,104 +56755,59 @@ func (x *RsvpMetricsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpMetricsRequest.ProtoReflect.Descriptor instead. -func (*RsvpMetricsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowRSVPPathRecordRouteType1Label.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathRecordRouteType1Label) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{376} } -func (x *RsvpMetricsRequest) GetRouterNames() []string { +func (x *FlowRSVPPathRecordRouteType1Label) GetLength() *FlowRSVPRouteRecordLength { if x != nil { - return x.RouterNames + return x.Length } return nil } -func (x *RsvpMetricsRequest) GetColumnNames() []RsvpMetricsRequest_ColumnNames_Enum { +func (x *FlowRSVPPathRecordRouteType1Label) GetFlags() *PatternFlowRSVPPathRecordRouteType1LabelFlags { if x != nil { - return x.ColumnNames + return x.Flags } return nil } -// RSVP-TE per router statistics information. -type RsvpMetric struct { +func (x *FlowRSVPPathRecordRouteType1Label) GetCType() *PatternFlowRSVPPathRecordRouteType1LabelCType { + if x != nil { + return x.CType + } + return nil +} + +func (x *FlowRSVPPathRecordRouteType1Label) GetLabel() *FlowRSVPPathRecordRouteLabel { + if x != nil { + return x.Label + } + return nil +} + +// Description missing in models +type FlowRSVPPathRecordRouteLabel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of a configured RSVP router. - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // The number of ingress point-to-point LSPs configured or transiting through the RSVP - // router which have been initated from the test port. - IngressP2PLspsConfigured *uint32 `protobuf:"varint,2,opt,name=ingress_p2p_lsps_configured,json=ingressP2pLspsConfigured,proto3,oneof" json:"ingress_p2p_lsps_configured,omitempty"` - // The number of ingress point-to-point LSPs for which Resv has been received and is - // currently up. - IngressP2PLspsUp *uint32 `protobuf:"varint,3,opt,name=ingress_p2p_lsps_up,json=ingressP2pLspsUp,proto3,oneof" json:"ingress_p2p_lsps_up,omitempty"` - // The number of egress point-to-point LSPs for which Path requests were successfully - // processed and is currently up. - EgressP2PLspsUp *uint32 `protobuf:"varint,4,opt,name=egress_p2p_lsps_up,json=egressP2pLspsUp,proto3,oneof" json:"egress_p2p_lsps_up,omitempty"` - // The number of times an LSP went from up to down state either because it timed out - // while waiting for Refreshes or a PathTear or ResvTear message was received which - // caused the LSP to flap. - LspFlapCount *uint64 `protobuf:"varint,5,opt,name=lsp_flap_count,json=lspFlapCount,proto3,oneof" json:"lsp_flap_count,omitempty"` - // The number of Path messages sent by this RSVP router. - PathsTx *uint64 `protobuf:"varint,6,opt,name=paths_tx,json=pathsTx,proto3,oneof" json:"paths_tx,omitempty"` - // The number of Path messages received by this RSVP router. - PathsRx *uint64 `protobuf:"varint,7,opt,name=paths_rx,json=pathsRx,proto3,oneof" json:"paths_rx,omitempty"` - // The number of Resv messages sent by this RSVP router. - ResvsTx *uint64 `protobuf:"varint,8,opt,name=resvs_tx,json=resvsTx,proto3,oneof" json:"resvs_tx,omitempty"` - // The number of Resv messages received by this RSVP router. - ResvsRx *uint64 `protobuf:"varint,9,opt,name=resvs_rx,json=resvsRx,proto3,oneof" json:"resvs_rx,omitempty"` - // The number of Path Tear messages sent by this RSVP router. - PathTearsTx *uint64 `protobuf:"varint,10,opt,name=path_tears_tx,json=pathTearsTx,proto3,oneof" json:"path_tears_tx,omitempty"` - // The number of Path Tear messages received by this RSVP router. - PathTearsRx *uint64 `protobuf:"varint,11,opt,name=path_tears_rx,json=pathTearsRx,proto3,oneof" json:"path_tears_rx,omitempty"` - // The number of Resv Tear messages sent by this RSVP router. - ResvTearsTx *uint64 `protobuf:"varint,12,opt,name=resv_tears_tx,json=resvTearsTx,proto3,oneof" json:"resv_tears_tx,omitempty"` - // The number of Resv Tear messages received by this RSVP router. - ResvTearsRx *uint64 `protobuf:"varint,13,opt,name=resv_tears_rx,json=resvTearsRx,proto3,oneof" json:"resv_tears_rx,omitempty"` - // The number of Path Error messages sent by this RSVP router. - PathErrorsTx *uint64 `protobuf:"varint,14,opt,name=path_errors_tx,json=pathErrorsTx,proto3,oneof" json:"path_errors_tx,omitempty"` - // The number of Path Error messages received by this RSVP router. - PathErrorsRx *uint64 `protobuf:"varint,15,opt,name=path_errors_rx,json=pathErrorsRx,proto3,oneof" json:"path_errors_rx,omitempty"` - // The number of Resv Error messages sent by this RSVP router. - ResvErrorsTx *uint64 `protobuf:"varint,16,opt,name=resv_errors_tx,json=resvErrorsTx,proto3,oneof" json:"resv_errors_tx,omitempty"` - // The number of Resv Error messages received by this RSVP router. - ResvErrorsRx *uint64 `protobuf:"varint,17,opt,name=resv_errors_rx,json=resvErrorsRx,proto3,oneof" json:"resv_errors_rx,omitempty"` - // The number of ResvConf messages sent by this RSVP router. - ResvConfTx *uint64 `protobuf:"varint,18,opt,name=resv_conf_tx,json=resvConfTx,proto3,oneof" json:"resv_conf_tx,omitempty"` - // The number of ResvConf messages received by this RSVP router. - ResvConfRx *uint64 `protobuf:"varint,19,opt,name=resv_conf_rx,json=resvConfRx,proto3,oneof" json:"resv_conf_rx,omitempty"` - // The number of Hello messages sent by this RSVP router. - HellosTx *uint64 `protobuf:"varint,20,opt,name=hellos_tx,json=hellosTx,proto3,oneof" json:"hellos_tx,omitempty"` - // The number of Hello messages received by this RSVP router. - HellosRx *uint64 `protobuf:"varint,21,opt,name=hellos_rx,json=hellosRx,proto3,oneof" json:"hellos_rx,omitempty"` - // The number of Ack messages sent by this RSVP router. - AcksTx *uint64 `protobuf:"varint,22,opt,name=acks_tx,json=acksTx,proto3,oneof" json:"acks_tx,omitempty"` - // The number of Ack messages received by this RSVP router. - AcksRx *uint64 `protobuf:"varint,23,opt,name=acks_rx,json=acksRx,proto3,oneof" json:"acks_rx,omitempty"` - // The number of Nack messages sent by this RSVP router. - NacksTx *uint64 `protobuf:"varint,24,opt,name=nacks_tx,json=nacksTx,proto3,oneof" json:"nacks_tx,omitempty"` - // The number of Nack messages received by this RSVP router. - NacksRx *uint64 `protobuf:"varint,25,opt,name=nacks_rx,json=nacksRx,proto3,oneof" json:"nacks_rx,omitempty"` - // The number of SRefresh messages sent by this RSVP router. - SrefreshTx *uint64 `protobuf:"varint,26,opt,name=srefresh_tx,json=srefreshTx,proto3,oneof" json:"srefresh_tx,omitempty"` - // The number of SRefresh messages received by this RSVP router. - SrefreshRx *uint64 `protobuf:"varint,27,opt,name=srefresh_rx,json=srefreshRx,proto3,oneof" json:"srefresh_rx,omitempty"` - // The number of Bundle messages sent by this RSVP router. - BundleTx *uint64 `protobuf:"varint,28,opt,name=bundle_tx,json=bundleTx,proto3,oneof" json:"bundle_tx,omitempty"` - // The number of Bundle messages received by this RSVP router. - BundleRx *uint64 `protobuf:"varint,29,opt,name=bundle_rx,json=bundleRx,proto3,oneof" json:"bundle_rx,omitempty"` - // The number of Path messages with Path Re-evaluation Request enabled sent by this - // RSVP router. - PathReevaluationRequestTx *uint64 `protobuf:"varint,30,opt,name=path_reevaluation_request_tx,json=pathReevaluationRequestTx,proto3,oneof" json:"path_reevaluation_request_tx,omitempty"` - // The number of successfully completed Make-Before-Break operations on LSPs on this - // RSVP router. - PathReoptimizations *uint64 `protobuf:"varint,31,opt,name=path_reoptimizations,json=pathReoptimizations,proto3,oneof" json:"path_reoptimizations,omitempty"` + // 32 bit integer or hex value. + // default = Choice.Enum.as_integer + Choice *FlowRSVPPathRecordRouteLabel_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPPathRecordRouteLabel_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 16 + AsInteger *uint32 `protobuf:"varint,2,opt,name=as_integer,json=asInteger,proto3,oneof" json:"as_integer,omitempty"` + // Value of the this field should not excced 4 bytes. Maximum length of this attribute + // is 8 (4 * 2 hex character per byte). + // default = 10 + AsHex *string `protobuf:"bytes,3,opt,name=as_hex,json=asHex,proto3,oneof" json:"as_hex,omitempty"` } -func (x *RsvpMetric) Reset() { - *x = RsvpMetric{} +func (x *FlowRSVPPathRecordRouteLabel) Reset() { + *x = FlowRSVPPathRecordRouteLabel{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[377] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54600,13 +56815,13 @@ func (x *RsvpMetric) Reset() { } } -func (x *RsvpMetric) String() string { +func (x *FlowRSVPPathRecordRouteLabel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpMetric) ProtoMessage() {} +func (*FlowRSVPPathRecordRouteLabel) ProtoMessage() {} -func (x *RsvpMetric) ProtoReflect() protoreflect.Message { +func (x *FlowRSVPPathRecordRouteLabel) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[377] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54618,268 +56833,214 @@ func (x *RsvpMetric) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpMetric.ProtoReflect.Descriptor instead. -func (*RsvpMetric) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowRSVPPathRecordRouteLabel.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathRecordRouteLabel) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{377} } -func (x *RsvpMetric) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *RsvpMetric) GetIngressP2PLspsConfigured() uint32 { - if x != nil && x.IngressP2PLspsConfigured != nil { - return *x.IngressP2PLspsConfigured - } - return 0 -} - -func (x *RsvpMetric) GetIngressP2PLspsUp() uint32 { - if x != nil && x.IngressP2PLspsUp != nil { - return *x.IngressP2PLspsUp - } - return 0 -} - -func (x *RsvpMetric) GetEgressP2PLspsUp() uint32 { - if x != nil && x.EgressP2PLspsUp != nil { - return *x.EgressP2PLspsUp - } - return 0 -} - -func (x *RsvpMetric) GetLspFlapCount() uint64 { - if x != nil && x.LspFlapCount != nil { - return *x.LspFlapCount - } - return 0 -} - -func (x *RsvpMetric) GetPathsTx() uint64 { - if x != nil && x.PathsTx != nil { - return *x.PathsTx - } - return 0 -} - -func (x *RsvpMetric) GetPathsRx() uint64 { - if x != nil && x.PathsRx != nil { - return *x.PathsRx - } - return 0 -} - -func (x *RsvpMetric) GetResvsTx() uint64 { - if x != nil && x.ResvsTx != nil { - return *x.ResvsTx - } - return 0 -} - -func (x *RsvpMetric) GetResvsRx() uint64 { - if x != nil && x.ResvsRx != nil { - return *x.ResvsRx +func (x *FlowRSVPPathRecordRouteLabel) GetChoice() FlowRSVPPathRecordRouteLabel_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return FlowRSVPPathRecordRouteLabel_Choice_unspecified } -func (x *RsvpMetric) GetPathTearsTx() uint64 { - if x != nil && x.PathTearsTx != nil { - return *x.PathTearsTx +func (x *FlowRSVPPathRecordRouteLabel) GetAsInteger() uint32 { + if x != nil && x.AsInteger != nil { + return *x.AsInteger } return 0 } -func (x *RsvpMetric) GetPathTearsRx() uint64 { - if x != nil && x.PathTearsRx != nil { - return *x.PathTearsRx +func (x *FlowRSVPPathRecordRouteLabel) GetAsHex() string { + if x != nil && x.AsHex != nil { + return *x.AsHex } - return 0 + return "" } -func (x *RsvpMetric) GetResvTearsTx() uint64 { - if x != nil && x.ResvTearsTx != nil { - return *x.ResvTearsTx - } - return 0 -} +// Description missing in models +type FlowRSVPRouteRecordLength struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *RsvpMetric) GetResvTearsRx() uint64 { - if x != nil && x.ResvTearsRx != nil { - return *x.ResvTearsRx - } - return 0 + // auto or configured value. + // default = Choice.Enum.auto + Choice *FlowRSVPRouteRecordLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRSVPRouteRecordLength_Choice_Enum,oneof" json:"choice,omitempty"` + // The OTG implementation will provide a system generated value for this property. + // If the OTG implementation is unable to generate a value the default value must be + // used. + // default = 8 + Auto *uint32 `protobuf:"varint,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` + // Description missing in models + // default = 8 + Value *uint32 `protobuf:"varint,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *RsvpMetric) GetPathErrorsTx() uint64 { - if x != nil && x.PathErrorsTx != nil { - return *x.PathErrorsTx +func (x *FlowRSVPRouteRecordLength) Reset() { + *x = FlowRSVPRouteRecordLength{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[378] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *RsvpMetric) GetPathErrorsRx() uint64 { - if x != nil && x.PathErrorsRx != nil { - return *x.PathErrorsRx - } - return 0 +func (x *FlowRSVPRouteRecordLength) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *RsvpMetric) GetResvErrorsTx() uint64 { - if x != nil && x.ResvErrorsTx != nil { - return *x.ResvErrorsTx - } - return 0 -} +func (*FlowRSVPRouteRecordLength) ProtoMessage() {} -func (x *RsvpMetric) GetResvErrorsRx() uint64 { - if x != nil && x.ResvErrorsRx != nil { - return *x.ResvErrorsRx +func (x *FlowRSVPRouteRecordLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[378] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *RsvpMetric) GetResvConfTx() uint64 { - if x != nil && x.ResvConfTx != nil { - return *x.ResvConfTx - } - return 0 +// Deprecated: Use FlowRSVPRouteRecordLength.ProtoReflect.Descriptor instead. +func (*FlowRSVPRouteRecordLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{378} } -func (x *RsvpMetric) GetResvConfRx() uint64 { - if x != nil && x.ResvConfRx != nil { - return *x.ResvConfRx +func (x *FlowRSVPRouteRecordLength) GetChoice() FlowRSVPRouteRecordLength_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return FlowRSVPRouteRecordLength_Choice_unspecified } -func (x *RsvpMetric) GetHellosTx() uint64 { - if x != nil && x.HellosTx != nil { - return *x.HellosTx +func (x *FlowRSVPRouteRecordLength) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto } return 0 } -func (x *RsvpMetric) GetHellosRx() uint64 { - if x != nil && x.HellosRx != nil { - return *x.HellosRx +func (x *FlowRSVPRouteRecordLength) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } return 0 } -func (x *RsvpMetric) GetAcksTx() uint64 { - if x != nil && x.AcksTx != nil { - return *x.AcksTx - } - return 0 -} +// Custom packet header +type FlowRSVPPathObjectsCustom struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *RsvpMetric) GetAcksRx() uint64 { - if x != nil && x.AcksRx != nil { - return *x.AcksRx - } - return 0 + // Description missing in models + Type *PatternFlowRSVPPathObjectsCustomType `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // Description missing in models + Length *FlowRSVPObjectLength `protobuf:"bytes,2,opt,name=length,proto3" json:"length,omitempty"` + // A custom packet header defined as a string of hex bytes. The string MUST contain + // sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be + // discarded. Value of the this field should not excced 65525 bytes since maximum 65528 + // bytes can be added as object-contents in RSVP header. For type and length requires + // 3 bytes, hence maximum of 65524 bytes are expected. Maximum length of this attribute + // is 131050 (65525 * 2 hex character per byte). + // default = 0000 + Bytes *string `protobuf:"bytes,3,opt,name=bytes,proto3,oneof" json:"bytes,omitempty"` } -func (x *RsvpMetric) GetNacksTx() uint64 { - if x != nil && x.NacksTx != nil { - return *x.NacksTx +func (x *FlowRSVPPathObjectsCustom) Reset() { + *x = FlowRSVPPathObjectsCustom{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[379] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *RsvpMetric) GetNacksRx() uint64 { - if x != nil && x.NacksRx != nil { - return *x.NacksRx - } - return 0 +func (x *FlowRSVPPathObjectsCustom) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *RsvpMetric) GetSrefreshTx() uint64 { - if x != nil && x.SrefreshTx != nil { - return *x.SrefreshTx - } - return 0 -} +func (*FlowRSVPPathObjectsCustom) ProtoMessage() {} -func (x *RsvpMetric) GetSrefreshRx() uint64 { - if x != nil && x.SrefreshRx != nil { - return *x.SrefreshRx +func (x *FlowRSVPPathObjectsCustom) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[379] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *RsvpMetric) GetBundleTx() uint64 { - if x != nil && x.BundleTx != nil { - return *x.BundleTx - } - return 0 +// Deprecated: Use FlowRSVPPathObjectsCustom.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsCustom) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{379} } -func (x *RsvpMetric) GetBundleRx() uint64 { - if x != nil && x.BundleRx != nil { - return *x.BundleRx +func (x *FlowRSVPPathObjectsCustom) GetType() *PatternFlowRSVPPathObjectsCustomType { + if x != nil { + return x.Type } - return 0 + return nil } -func (x *RsvpMetric) GetPathReevaluationRequestTx() uint64 { - if x != nil && x.PathReevaluationRequestTx != nil { - return *x.PathReevaluationRequestTx +func (x *FlowRSVPPathObjectsCustom) GetLength() *FlowRSVPObjectLength { + if x != nil { + return x.Length } - return 0 + return nil } -func (x *RsvpMetric) GetPathReoptimizations() uint64 { - if x != nil && x.PathReoptimizations != nil { - return *x.PathReoptimizations +func (x *FlowRSVPPathObjectsCustom) GetBytes() string { + if x != nil && x.Bytes != nil { + return *x.Bytes } - return 0 + return "" } -// Request to traffic generator for states of choice -type StatesRequest struct { +// The frame size which overrides the total length of the packet +type FlowSize struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.ipv4_neighbors - Choice *StatesRequest_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StatesRequest_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Ipv4Neighbors *Neighborsv4StatesRequest `protobuf:"bytes,2,opt,name=ipv4_neighbors,json=ipv4Neighbors,proto3" json:"ipv4_neighbors,omitempty"` - // Description missing in models - Ipv6Neighbors *Neighborsv6StatesRequest `protobuf:"bytes,3,opt,name=ipv6_neighbors,json=ipv6Neighbors,proto3" json:"ipv6_neighbors,omitempty"` + // default = Choice.Enum.fixed + Choice *FlowSize_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowSize_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - BgpPrefixes *BgpPrefixStateRequest `protobuf:"bytes,4,opt,name=bgp_prefixes,json=bgpPrefixes,proto3" json:"bgp_prefixes,omitempty"` + // default = 64 + Fixed *uint32 `protobuf:"varint,2,opt,name=fixed,proto3,oneof" json:"fixed,omitempty"` // Description missing in models - IsisLsps *IsisLspsStateRequest `protobuf:"bytes,5,opt,name=isis_lsps,json=isisLsps,proto3" json:"isis_lsps,omitempty"` + Increment *FlowSizeIncrement `protobuf:"bytes,3,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - LldpNeighbors *LldpNeighborsStateRequest `protobuf:"bytes,6,opt,name=lldp_neighbors,json=lldpNeighbors,proto3" json:"lldp_neighbors,omitempty"` + Random *FlowSizeRandom `protobuf:"bytes,4,opt,name=random,proto3" json:"random,omitempty"` // Description missing in models - RsvpLsps *RsvpLspsStateRequest `protobuf:"bytes,7,opt,name=rsvp_lsps,json=rsvpLsps,proto3" json:"rsvp_lsps,omitempty"` + WeightPairs *FlowSizeWeightPairs `protobuf:"bytes,5,opt,name=weight_pairs,json=weightPairs,proto3" json:"weight_pairs,omitempty"` } -func (x *StatesRequest) Reset() { - *x = StatesRequest{} +func (x *FlowSize) Reset() { + *x = FlowSize{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[378] + mi := &file_otg_proto_msgTypes[380] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StatesRequest) String() string { +func (x *FlowSize) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatesRequest) ProtoMessage() {} +func (*FlowSize) ProtoMessage() {} -func (x *StatesRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[378] +func (x *FlowSize) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[380] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -54890,100 +57051,81 @@ func (x *StatesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StatesRequest.ProtoReflect.Descriptor instead. -func (*StatesRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{378} +// Deprecated: Use FlowSize.ProtoReflect.Descriptor instead. +func (*FlowSize) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{380} } -func (x *StatesRequest) GetChoice() StatesRequest_Choice_Enum { +func (x *FlowSize) GetChoice() FlowSize_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return StatesRequest_Choice_unspecified -} - -func (x *StatesRequest) GetIpv4Neighbors() *Neighborsv4StatesRequest { - if x != nil { - return x.Ipv4Neighbors - } - return nil -} - -func (x *StatesRequest) GetIpv6Neighbors() *Neighborsv6StatesRequest { - if x != nil { - return x.Ipv6Neighbors - } - return nil + return FlowSize_Choice_unspecified } -func (x *StatesRequest) GetBgpPrefixes() *BgpPrefixStateRequest { - if x != nil { - return x.BgpPrefixes +func (x *FlowSize) GetFixed() uint32 { + if x != nil && x.Fixed != nil { + return *x.Fixed } - return nil + return 0 } -func (x *StatesRequest) GetIsisLsps() *IsisLspsStateRequest { +func (x *FlowSize) GetIncrement() *FlowSizeIncrement { if x != nil { - return x.IsisLsps + return x.Increment } return nil } -func (x *StatesRequest) GetLldpNeighbors() *LldpNeighborsStateRequest { +func (x *FlowSize) GetRandom() *FlowSizeRandom { if x != nil { - return x.LldpNeighbors + return x.Random } return nil } -func (x *StatesRequest) GetRsvpLsps() *RsvpLspsStateRequest { +func (x *FlowSize) GetWeightPairs() *FlowSizeWeightPairs { if x != nil { - return x.RsvpLsps + return x.WeightPairs } return nil } -// Response containing chosen traffic generator states -type StatesResponse struct { +// Frame size that increments from a starting size to +// an ending size incrementing by a step size. +type FlowSizeIncrement struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.ipv4_neighbors - Choice *StatesResponse_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StatesResponse_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - Ipv4Neighbors []*Neighborsv4State `protobuf:"bytes,2,rep,name=ipv4_neighbors,json=ipv4Neighbors,proto3" json:"ipv4_neighbors,omitempty"` - // Description missing in models - Ipv6Neighbors []*Neighborsv6State `protobuf:"bytes,3,rep,name=ipv6_neighbors,json=ipv6Neighbors,proto3" json:"ipv6_neighbors,omitempty"` - // Description missing in models - BgpPrefixes []*BgpPrefixesState `protobuf:"bytes,4,rep,name=bgp_prefixes,json=bgpPrefixes,proto3" json:"bgp_prefixes,omitempty"` - // Description missing in models - IsisLsps []*IsisLspsState `protobuf:"bytes,5,rep,name=isis_lsps,json=isisLsps,proto3" json:"isis_lsps,omitempty"` - // Description missing in models - LldpNeighbors []*LldpNeighborsState `protobuf:"bytes,6,rep,name=lldp_neighbors,json=lldpNeighbors,proto3" json:"lldp_neighbors,omitempty"` - // Description missing in models - RsvpLsps []*RsvpLspsState `protobuf:"bytes,7,rep,name=rsvp_lsps,json=rsvpLsps,proto3" json:"rsvp_lsps,omitempty"` + // Starting frame size in bytes + // default = 64 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Ending frame size in bytes + // default = 1518 + End *uint32 `protobuf:"varint,2,opt,name=end,proto3,oneof" json:"end,omitempty"` + // Step frame size in bytes + // default = 1 + Step *uint32 `protobuf:"varint,3,opt,name=step,proto3,oneof" json:"step,omitempty"` } -func (x *StatesResponse) Reset() { - *x = StatesResponse{} +func (x *FlowSizeIncrement) Reset() { + *x = FlowSizeIncrement{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[379] + mi := &file_otg_proto_msgTypes[381] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StatesResponse) String() string { +func (x *FlowSizeIncrement) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatesResponse) ProtoMessage() {} +func (*FlowSizeIncrement) ProtoMessage() {} -func (x *StatesResponse) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[379] +func (x *FlowSizeIncrement) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[381] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -54994,95 +57136,63 @@ func (x *StatesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StatesResponse.ProtoReflect.Descriptor instead. -func (*StatesResponse) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{379} +// Deprecated: Use FlowSizeIncrement.ProtoReflect.Descriptor instead. +func (*FlowSizeIncrement) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{381} } -func (x *StatesResponse) GetChoice() StatesResponse_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *FlowSizeIncrement) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } - return StatesResponse_Choice_unspecified + return 0 } -func (x *StatesResponse) GetIpv4Neighbors() []*Neighborsv4State { - if x != nil { - return x.Ipv4Neighbors +func (x *FlowSizeIncrement) GetEnd() uint32 { + if x != nil && x.End != nil { + return *x.End } - return nil + return 0 } -func (x *StatesResponse) GetIpv6Neighbors() []*Neighborsv6State { - if x != nil { - return x.Ipv6Neighbors - } - return nil -} - -func (x *StatesResponse) GetBgpPrefixes() []*BgpPrefixesState { - if x != nil { - return x.BgpPrefixes - } - return nil -} - -func (x *StatesResponse) GetIsisLsps() []*IsisLspsState { - if x != nil { - return x.IsisLsps - } - return nil -} - -func (x *StatesResponse) GetLldpNeighbors() []*LldpNeighborsState { - if x != nil { - return x.LldpNeighbors - } - return nil -} - -func (x *StatesResponse) GetRsvpLsps() []*RsvpLspsState { - if x != nil { - return x.RsvpLsps +func (x *FlowSizeIncrement) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step } - return nil + return 0 } -// The request to retrieve IPv4 Neighbor state (ARP cache entries) of a network interface(s). -type Neighborsv4StatesRequest struct { +// Random frame size from a min value to a max value. +type FlowSizeRandom struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of Ethernet interfaces for which Neighbor state (ARP cache entries) will - // be retrieved. If no names are specified then the results will contain Neighbor state - // (ARP cache entries) for all available Ethernet interfaces. - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - EthernetNames []string `protobuf:"bytes,1,rep,name=ethernet_names,json=ethernetNames,proto3" json:"ethernet_names,omitempty"` + // Description missing in models + // default = 64 + Min *uint32 `protobuf:"varint,1,opt,name=min,proto3,oneof" json:"min,omitempty"` + // Description missing in models + // default = 1518 + Max *uint32 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` } -func (x *Neighborsv4StatesRequest) Reset() { - *x = Neighborsv4StatesRequest{} +func (x *FlowSizeRandom) Reset() { + *x = FlowSizeRandom{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[380] + mi := &file_otg_proto_msgTypes[382] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Neighborsv4StatesRequest) String() string { +func (x *FlowSizeRandom) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Neighborsv4StatesRequest) ProtoMessage() {} +func (*FlowSizeRandom) ProtoMessage() {} -func (x *Neighborsv4StatesRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[380] +func (x *FlowSizeRandom) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[382] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55093,52 +57203,73 @@ func (x *Neighborsv4StatesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Neighborsv4StatesRequest.ProtoReflect.Descriptor instead. -func (*Neighborsv4StatesRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{380} +// Deprecated: Use FlowSizeRandom.ProtoReflect.Descriptor instead. +func (*FlowSizeRandom) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{382} } -func (x *Neighborsv4StatesRequest) GetEthernetNames() []string { - if x != nil { - return x.EthernetNames +func (x *FlowSizeRandom) GetMin() uint32 { + if x != nil && x.Min != nil { + return *x.Min } - return nil + return 0 } -// IPv4 Neighbor state (ARP cache entry). -type Neighborsv4State struct { +func (x *FlowSizeRandom) GetMax() uint32 { + if x != nil && x.Max != nil { + return *x.Max + } + return 0 +} + +// Frame size distribution, defined as pairs (including IMIX distribution). +// Frames are randomly generated such that the proportion of each frame size out of +// the total number of frames +// are matching with the weight value of the pair. However, as with any +// other probability +// distribution, the sample distribution is close to theoretical value only if the size +// of the sample is reasonably large. +// When the number of frames is very low the transmitted frames may not come close to +// the ratio described in the weight. +type FlowSizeWeightPairs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the Ethernet interface associated with the Neighbor state (ARP cache - // entry). - // required = true - EthernetName *string `protobuf:"bytes,1,opt,name=ethernet_name,json=ethernetName,proto3,oneof" json:"ethernet_name,omitempty"` - // The IPv4 address of the neighbor. - // required = true - Ipv4Address *string `protobuf:"bytes,2,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` - // The link-layer address (MAC) of the neighbor. - LinkLayerAddress *string `protobuf:"bytes,3,opt,name=link_layer_address,json=linkLayerAddress,proto3,oneof" json:"link_layer_address,omitempty"` + // Description missing in models + // default = Choice.Enum.predefined + Choice *FlowSizeWeightPairs_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowSizeWeightPairs_Choice_Enum,oneof" json:"choice,omitempty"` + // Specify predefined frame size distribution pairs (including IMIX distribution). + // + // The available predefined distribution pairs are: + // - IMIX (64:7, 570:4, and 1518:1) + // - IPSec IMIX (90:58.67, 92:2, 594:23.66 and 1418:15.67) + // - IPv6 IMIX (60:58.67, 496:2, 594:23.66 and 1518:15.67) + // - Standard IMIX (58:58.67, 62:2, 594:23.66 and 1518:15.67) + // - TCP IMIX (90:58.67, 92:2, 594:23.66 and 1518:15.67) + // default = Predefined.Enum.imix + Predefined *FlowSizeWeightPairs_Predefined_Enum `protobuf:"varint,2,opt,name=predefined,proto3,enum=otg.FlowSizeWeightPairs_Predefined_Enum,oneof" json:"predefined,omitempty"` + // Description missing in models + Custom []*FlowSizeWeightPairsCustom `protobuf:"bytes,3,rep,name=custom,proto3" json:"custom,omitempty"` } -func (x *Neighborsv4State) Reset() { - *x = Neighborsv4State{} +func (x *FlowSizeWeightPairs) Reset() { + *x = FlowSizeWeightPairs{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[381] + mi := &file_otg_proto_msgTypes[383] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Neighborsv4State) String() string { +func (x *FlowSizeWeightPairs) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Neighborsv4State) ProtoMessage() {} +func (*FlowSizeWeightPairs) ProtoMessage() {} -func (x *Neighborsv4State) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[381] +func (x *FlowSizeWeightPairs) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[383] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55149,67 +57280,64 @@ func (x *Neighborsv4State) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Neighborsv4State.ProtoReflect.Descriptor instead. -func (*Neighborsv4State) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{381} +// Deprecated: Use FlowSizeWeightPairs.ProtoReflect.Descriptor instead. +func (*FlowSizeWeightPairs) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{383} } -func (x *Neighborsv4State) GetEthernetName() string { - if x != nil && x.EthernetName != nil { - return *x.EthernetName +func (x *FlowSizeWeightPairs) GetChoice() FlowSizeWeightPairs_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return FlowSizeWeightPairs_Choice_unspecified } -func (x *Neighborsv4State) GetIpv4Address() string { - if x != nil && x.Ipv4Address != nil { - return *x.Ipv4Address +func (x *FlowSizeWeightPairs) GetPredefined() FlowSizeWeightPairs_Predefined_Enum { + if x != nil && x.Predefined != nil { + return *x.Predefined } - return "" + return FlowSizeWeightPairs_Predefined_unspecified } -func (x *Neighborsv4State) GetLinkLayerAddress() string { - if x != nil && x.LinkLayerAddress != nil { - return *x.LinkLayerAddress +func (x *FlowSizeWeightPairs) GetCustom() []*FlowSizeWeightPairsCustom { + if x != nil { + return x.Custom } - return "" + return nil } -// The request to retrieve IPv6 Neighbor state (NDISC cache entries) of a network interface(s). -type Neighborsv6StatesRequest struct { +// Custom frame size distribution pair. +type FlowSizeWeightPairsCustom struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of Ethernet interfaces for which Neighbor state (NDISC cache entries) will - // be retrieved. If no names are specified then the results will contain Neighbor state - // (NDISC cache entries) for all available Ethernet interfaces. - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - EthernetNames []string `protobuf:"bytes,1,rep,name=ethernet_names,json=ethernetNames,proto3" json:"ethernet_names,omitempty"` + // The size of the frame (in bytes) for this weight pair. + // default = 64 + Size *uint32 `protobuf:"varint,1,opt,name=size,proto3,oneof" json:"size,omitempty"` + // Weight assigned to the corresponding frame size in this weight pair. + // Higher weight means more packets. + // default = 1 + Weight *float32 `protobuf:"fixed32,2,opt,name=weight,proto3,oneof" json:"weight,omitempty"` } -func (x *Neighborsv6StatesRequest) Reset() { - *x = Neighborsv6StatesRequest{} +func (x *FlowSizeWeightPairsCustom) Reset() { + *x = FlowSizeWeightPairsCustom{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[382] + mi := &file_otg_proto_msgTypes[384] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Neighborsv6StatesRequest) String() string { +func (x *FlowSizeWeightPairsCustom) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Neighborsv6StatesRequest) ProtoMessage() {} +func (*FlowSizeWeightPairsCustom) ProtoMessage() {} -func (x *Neighborsv6StatesRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[382] +func (x *FlowSizeWeightPairsCustom) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[384] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55220,52 +57348,71 @@ func (x *Neighborsv6StatesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Neighborsv6StatesRequest.ProtoReflect.Descriptor instead. -func (*Neighborsv6StatesRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{382} +// Deprecated: Use FlowSizeWeightPairsCustom.ProtoReflect.Descriptor instead. +func (*FlowSizeWeightPairsCustom) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{384} } -func (x *Neighborsv6StatesRequest) GetEthernetNames() []string { - if x != nil { - return x.EthernetNames +func (x *FlowSizeWeightPairsCustom) GetSize() uint32 { + if x != nil && x.Size != nil { + return *x.Size } - return nil + return 0 } -// IPv6 Neighbor state (NDISC cache entry). -type Neighborsv6State struct { +func (x *FlowSizeWeightPairsCustom) GetWeight() float32 { + if x != nil && x.Weight != nil { + return *x.Weight + } + return 0 +} + +// The rate of packet transmission +type FlowRate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the Ethernet interface associated with the Neighbor state (NDISC cache - // entry). - // required = true - EthernetName *string `protobuf:"bytes,1,opt,name=ethernet_name,json=ethernetName,proto3,oneof" json:"ethernet_name,omitempty"` - // The IPv6 address of the neighbor. - // required = true - Ipv6Address *string `protobuf:"bytes,2,opt,name=ipv6_address,json=ipv6Address,proto3,oneof" json:"ipv6_address,omitempty"` - // The link-layer address (MAC) of the neighbor. - LinkLayerAddress *string `protobuf:"bytes,3,opt,name=link_layer_address,json=linkLayerAddress,proto3,oneof" json:"link_layer_address,omitempty"` + // The available types of flow rate. + // default = Choice.Enum.pps + Choice *FlowRate_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRate_Choice_Enum,oneof" json:"choice,omitempty"` + // Packets per second. + // default = 1000 + Pps *uint64 `protobuf:"varint,2,opt,name=pps,proto3,oneof" json:"pps,omitempty"` + // Bits per second. + // default = 1000000000 + Bps *uint64 `protobuf:"varint,3,opt,name=bps,proto3,oneof" json:"bps,omitempty"` + // Kilobits per second. + // default = 1000000 + Kbps *uint64 `protobuf:"varint,4,opt,name=kbps,proto3,oneof" json:"kbps,omitempty"` + // Megabits per second. + // default = 1000 + Mbps *uint64 `protobuf:"varint,5,opt,name=mbps,proto3,oneof" json:"mbps,omitempty"` + // Gigabits per second. + // default = 1 + Gbps *uint32 `protobuf:"varint,6,opt,name=gbps,proto3,oneof" json:"gbps,omitempty"` + // The percentage of a port location's available bandwidth. + // default = 100 + Percentage *float32 `protobuf:"fixed32,7,opt,name=percentage,proto3,oneof" json:"percentage,omitempty"` } -func (x *Neighborsv6State) Reset() { - *x = Neighborsv6State{} +func (x *FlowRate) Reset() { + *x = FlowRate{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[383] + mi := &file_otg_proto_msgTypes[385] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Neighborsv6State) String() string { +func (x *FlowRate) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Neighborsv6State) ProtoMessage() {} +func (*FlowRate) ProtoMessage() {} -func (x *Neighborsv6State) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[383] +func (x *FlowRate) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[385] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55276,80 +57423,96 @@ func (x *Neighborsv6State) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Neighborsv6State.ProtoReflect.Descriptor instead. -func (*Neighborsv6State) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{383} +// Deprecated: Use FlowRate.ProtoReflect.Descriptor instead. +func (*FlowRate) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{385} } -func (x *Neighborsv6State) GetEthernetName() string { - if x != nil && x.EthernetName != nil { - return *x.EthernetName +func (x *FlowRate) GetChoice() FlowRate_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return FlowRate_Choice_unspecified } -func (x *Neighborsv6State) GetIpv6Address() string { - if x != nil && x.Ipv6Address != nil { - return *x.Ipv6Address +func (x *FlowRate) GetPps() uint64 { + if x != nil && x.Pps != nil { + return *x.Pps } - return "" + return 0 } -func (x *Neighborsv6State) GetLinkLayerAddress() string { - if x != nil && x.LinkLayerAddress != nil { - return *x.LinkLayerAddress +func (x *FlowRate) GetBps() uint64 { + if x != nil && x.Bps != nil { + return *x.Bps } - return "" + return 0 } -// The request to retrieve BGP peer prefix information. -type BgpPrefixStateRequest struct { +func (x *FlowRate) GetKbps() uint64 { + if x != nil && x.Kbps != nil { + return *x.Kbps + } + return 0 +} + +func (x *FlowRate) GetMbps() uint64 { + if x != nil && x.Mbps != nil { + return *x.Mbps + } + return 0 +} + +func (x *FlowRate) GetGbps() uint32 { + if x != nil && x.Gbps != nil { + return *x.Gbps + } + return 0 +} + +func (x *FlowRate) GetPercentage() float32 { + if x != nil && x.Percentage != nil { + return *x.Percentage + } + return 0 +} + +// A container for different transmit durations. +type FlowDuration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of BGP peers for which prefix information will be retrieved. If no names - // are specified then the results will contain prefix information for all configured - // BGP peers. - // - // x-constraint: - // - /components/schemas/Bgp.V4Peer/properties/name - // - /components/schemas/Bgp.V6Peer/properties/name - // - // x-constraint: - // - /components/schemas/Bgp.V4Peer/properties/name - // - /components/schemas/Bgp.V6Peer/properties/name - BgpPeerNames []string `protobuf:"bytes,1,rep,name=bgp_peer_names,json=bgpPeerNames,proto3" json:"bgp_peer_names,omitempty"` - // Specify which prefixes to return. If the list is empty or missing then all prefixes - // will be returned. - PrefixFilters []BgpPrefixStateRequest_PrefixFilters_Enum `protobuf:"varint,2,rep,packed,name=prefix_filters,json=prefixFilters,proto3,enum=otg.BgpPrefixStateRequest_PrefixFilters_Enum" json:"prefix_filters,omitempty"` - // The IPv4 unicast results can be filtered by specifying additional prefix search criteria. - // If the ipv4_unicast_filters property is missing or empty then all IPv4 prefixes will - // be returned. - Ipv4UnicastFilters []*BgpPrefixIpv4UnicastFilter `protobuf:"bytes,3,rep,name=ipv4_unicast_filters,json=ipv4UnicastFilters,proto3" json:"ipv4_unicast_filters,omitempty"` - // The IPv6 unicast results can be filtered by specifying additional prefix search criteria. - // If the ipv6_unicast_filters property is missing or empty then all IPv6 prefixes will - // be returned. - Ipv6UnicastFilters []*BgpPrefixIpv6UnicastFilter `protobuf:"bytes,4,rep,name=ipv6_unicast_filters,json=ipv6UnicastFilters,proto3" json:"ipv6_unicast_filters,omitempty"` + // A choice used to determine the type of duration. + // default = Choice.Enum.continuous + Choice *FlowDuration_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowDuration_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + FixedPackets *FlowFixedPackets `protobuf:"bytes,2,opt,name=fixed_packets,json=fixedPackets,proto3" json:"fixed_packets,omitempty"` + // Description missing in models + FixedSeconds *FlowFixedSeconds `protobuf:"bytes,3,opt,name=fixed_seconds,json=fixedSeconds,proto3" json:"fixed_seconds,omitempty"` + // Description missing in models + Burst *FlowBurst `protobuf:"bytes,4,opt,name=burst,proto3" json:"burst,omitempty"` + // Description missing in models + Continuous *FlowContinuous `protobuf:"bytes,5,opt,name=continuous,proto3" json:"continuous,omitempty"` } -func (x *BgpPrefixStateRequest) Reset() { - *x = BgpPrefixStateRequest{} +func (x *FlowDuration) Reset() { + *x = FlowDuration{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[384] + mi := &file_otg_proto_msgTypes[386] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpPrefixStateRequest) String() string { +func (x *FlowDuration) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpPrefixStateRequest) ProtoMessage() {} +func (*FlowDuration) ProtoMessage() {} -func (x *BgpPrefixStateRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[384] +func (x *FlowDuration) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[386] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55360,74 +57523,76 @@ func (x *BgpPrefixStateRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpPrefixStateRequest.ProtoReflect.Descriptor instead. -func (*BgpPrefixStateRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{384} +// Deprecated: Use FlowDuration.ProtoReflect.Descriptor instead. +func (*FlowDuration) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{386} } -func (x *BgpPrefixStateRequest) GetBgpPeerNames() []string { +func (x *FlowDuration) GetChoice() FlowDuration_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return FlowDuration_Choice_unspecified +} + +func (x *FlowDuration) GetFixedPackets() *FlowFixedPackets { if x != nil { - return x.BgpPeerNames + return x.FixedPackets } return nil } -func (x *BgpPrefixStateRequest) GetPrefixFilters() []BgpPrefixStateRequest_PrefixFilters_Enum { +func (x *FlowDuration) GetFixedSeconds() *FlowFixedSeconds { if x != nil { - return x.PrefixFilters + return x.FixedSeconds } return nil } -func (x *BgpPrefixStateRequest) GetIpv4UnicastFilters() []*BgpPrefixIpv4UnicastFilter { +func (x *FlowDuration) GetBurst() *FlowBurst { if x != nil { - return x.Ipv4UnicastFilters + return x.Burst } return nil } -func (x *BgpPrefixStateRequest) GetIpv6UnicastFilters() []*BgpPrefixIpv6UnicastFilter { +func (x *FlowDuration) GetContinuous() *FlowContinuous { if x != nil { - return x.Ipv6UnicastFilters + return x.Continuous } return nil } -// Description missing in models -type BgpPrefixIpv4UnicastFilter struct { +// Transmit will be continuous and will not stop automatically. +type FlowContinuous struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The addresses to match. If the addresses property is missing or empty then all addresses - // will match. - Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` - // The prefix length to match. If the prefix length is missing then all prefix lengths - // will match. - PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` - // The origin to match. If the origin is missing then all origins will match. - Origin *BgpPrefixIpv4UnicastFilter_Origin_Enum `protobuf:"varint,3,opt,name=origin,proto3,enum=otg.BgpPrefixIpv4UnicastFilter_Origin_Enum,oneof" json:"origin,omitempty"` - // The path id to match. If the path id is missing then all path ids will match. - PathId *uint32 `protobuf:"varint,4,opt,name=path_id,json=pathId,proto3,oneof" json:"path_id,omitempty"` + // The minimum gap between packets expressed as bytes. + // default = 12 + Gap *uint32 `protobuf:"varint,1,opt,name=gap,proto3,oneof" json:"gap,omitempty"` + // Description missing in models + Delay *FlowDelay `protobuf:"bytes,2,opt,name=delay,proto3" json:"delay,omitempty"` } -func (x *BgpPrefixIpv4UnicastFilter) Reset() { - *x = BgpPrefixIpv4UnicastFilter{} +func (x *FlowContinuous) Reset() { + *x = FlowContinuous{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[385] + mi := &file_otg_proto_msgTypes[387] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpPrefixIpv4UnicastFilter) String() string { +func (x *FlowContinuous) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpPrefixIpv4UnicastFilter) ProtoMessage() {} +func (*FlowContinuous) ProtoMessage() {} -func (x *BgpPrefixIpv4UnicastFilter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[385] +func (x *FlowContinuous) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[387] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55438,74 +57603,66 @@ func (x *BgpPrefixIpv4UnicastFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpPrefixIpv4UnicastFilter.ProtoReflect.Descriptor instead. -func (*BgpPrefixIpv4UnicastFilter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{385} -} - -func (x *BgpPrefixIpv4UnicastFilter) GetAddresses() []string { - if x != nil { - return x.Addresses - } - return nil +// Deprecated: Use FlowContinuous.ProtoReflect.Descriptor instead. +func (*FlowContinuous) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{387} } -func (x *BgpPrefixIpv4UnicastFilter) GetPrefixLength() uint32 { - if x != nil && x.PrefixLength != nil { - return *x.PrefixLength +func (x *FlowContinuous) GetGap() uint32 { + if x != nil && x.Gap != nil { + return *x.Gap } return 0 } -func (x *BgpPrefixIpv4UnicastFilter) GetOrigin() BgpPrefixIpv4UnicastFilter_Origin_Enum { - if x != nil && x.Origin != nil { - return *x.Origin - } - return BgpPrefixIpv4UnicastFilter_Origin_unspecified -} - -func (x *BgpPrefixIpv4UnicastFilter) GetPathId() uint32 { - if x != nil && x.PathId != nil { - return *x.PathId +func (x *FlowContinuous) GetDelay() *FlowDelay { + if x != nil { + return x.Delay } - return 0 + return nil } -// Description missing in models -type BgpPrefixIpv6UnicastFilter struct { +// The optional container to specify the delay before starting +// transmission of packets. +type FlowDelay struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The addresses to match. If the addresses property is missing or empty then all addresses - // will match. - Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` - // The prefix length to match. If the prefix length is missing then all prefix lengths - // will match. - PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` - // The origin to match. If the origin is missing then all origins will match. - Origin *BgpPrefixIpv6UnicastFilter_Origin_Enum `protobuf:"varint,3,opt,name=origin,proto3,enum=otg.BgpPrefixIpv6UnicastFilter_Origin_Enum,oneof" json:"origin,omitempty"` - // The path id to match. If the path id is missing then all path ids will match. - PathId *uint32 `protobuf:"varint,4,opt,name=path_id,json=pathId,proto3,oneof" json:"path_id,omitempty"` + // Description missing in models + // default = Choice.Enum.bytes + Choice *FlowDelay_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowDelay_Choice_Enum,oneof" json:"choice,omitempty"` + // The delay before starting transmission of packets. + // A value of 0 indicates no delay. + // default = 0 + Bytes *float32 `protobuf:"fixed32,2,opt,name=bytes,proto3,oneof" json:"bytes,omitempty"` + // The delay before starting transmission of packets. + // A value of 0 indicates no delay. + // default = 0 + Nanoseconds *float32 `protobuf:"fixed32,3,opt,name=nanoseconds,proto3,oneof" json:"nanoseconds,omitempty"` + // The delay before starting transmission of packets. + // A value of 0 indicates no delay. + // default = 0 + Microseconds *float32 `protobuf:"fixed32,4,opt,name=microseconds,proto3,oneof" json:"microseconds,omitempty"` } -func (x *BgpPrefixIpv6UnicastFilter) Reset() { - *x = BgpPrefixIpv6UnicastFilter{} +func (x *FlowDelay) Reset() { + *x = FlowDelay{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[386] + mi := &file_otg_proto_msgTypes[388] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpPrefixIpv6UnicastFilter) String() string { +func (x *FlowDelay) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpPrefixIpv6UnicastFilter) ProtoMessage() {} +func (*FlowDelay) ProtoMessage() {} -func (x *BgpPrefixIpv6UnicastFilter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[386] +func (x *FlowDelay) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[388] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55516,70 +57673,72 @@ func (x *BgpPrefixIpv6UnicastFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpPrefixIpv6UnicastFilter.ProtoReflect.Descriptor instead. -func (*BgpPrefixIpv6UnicastFilter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{386} +// Deprecated: Use FlowDelay.ProtoReflect.Descriptor instead. +func (*FlowDelay) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{388} } -func (x *BgpPrefixIpv6UnicastFilter) GetAddresses() []string { - if x != nil { - return x.Addresses +func (x *FlowDelay) GetChoice() FlowDelay_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return FlowDelay_Choice_unspecified } -func (x *BgpPrefixIpv6UnicastFilter) GetPrefixLength() uint32 { - if x != nil && x.PrefixLength != nil { - return *x.PrefixLength +func (x *FlowDelay) GetBytes() float32 { + if x != nil && x.Bytes != nil { + return *x.Bytes } return 0 } -func (x *BgpPrefixIpv6UnicastFilter) GetOrigin() BgpPrefixIpv6UnicastFilter_Origin_Enum { - if x != nil && x.Origin != nil { - return *x.Origin +func (x *FlowDelay) GetNanoseconds() float32 { + if x != nil && x.Nanoseconds != nil { + return *x.Nanoseconds } - return BgpPrefixIpv6UnicastFilter_Origin_unspecified + return 0 } -func (x *BgpPrefixIpv6UnicastFilter) GetPathId() uint32 { - if x != nil && x.PathId != nil { - return *x.PathId +func (x *FlowDelay) GetMicroseconds() float32 { + if x != nil && x.Microseconds != nil { + return *x.Microseconds } return 0 } -// BGP peer prefixes. -type BgpPrefixesState struct { +// Transmit a fixed number of packets after which the flow will stop. +type FlowFixedPackets struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of a BGP peer. - BgpPeerName *string `protobuf:"bytes,1,opt,name=bgp_peer_name,json=bgpPeerName,proto3,oneof" json:"bgp_peer_name,omitempty"` - // Description missing in models - Ipv4UnicastPrefixes []*BgpPrefixIpv4UnicastState `protobuf:"bytes,2,rep,name=ipv4_unicast_prefixes,json=ipv4UnicastPrefixes,proto3" json:"ipv4_unicast_prefixes,omitempty"` + // Stop transmit of the flow after this number of packets. + // default = 1 + Packets *uint32 `protobuf:"varint,1,opt,name=packets,proto3,oneof" json:"packets,omitempty"` + // The minimum gap between packets expressed as bytes. + // default = 12 + Gap *uint32 `protobuf:"varint,2,opt,name=gap,proto3,oneof" json:"gap,omitempty"` // Description missing in models - Ipv6UnicastPrefixes []*BgpPrefixIpv6UnicastState `protobuf:"bytes,3,rep,name=ipv6_unicast_prefixes,json=ipv6UnicastPrefixes,proto3" json:"ipv6_unicast_prefixes,omitempty"` + Delay *FlowDelay `protobuf:"bytes,3,opt,name=delay,proto3" json:"delay,omitempty"` } -func (x *BgpPrefixesState) Reset() { - *x = BgpPrefixesState{} +func (x *FlowFixedPackets) Reset() { + *x = FlowFixedPackets{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[387] + mi := &file_otg_proto_msgTypes[389] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpPrefixesState) String() string { +func (x *FlowFixedPackets) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpPrefixesState) ProtoMessage() {} +func (*FlowFixedPackets) ProtoMessage() {} -func (x *BgpPrefixesState) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[387] +func (x *FlowFixedPackets) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[389] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55590,79 +57749,65 @@ func (x *BgpPrefixesState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpPrefixesState.ProtoReflect.Descriptor instead. -func (*BgpPrefixesState) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{387} +// Deprecated: Use FlowFixedPackets.ProtoReflect.Descriptor instead. +func (*FlowFixedPackets) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{389} } -func (x *BgpPrefixesState) GetBgpPeerName() string { - if x != nil && x.BgpPeerName != nil { - return *x.BgpPeerName +func (x *FlowFixedPackets) GetPackets() uint32 { + if x != nil && x.Packets != nil { + return *x.Packets } - return "" + return 0 } -func (x *BgpPrefixesState) GetIpv4UnicastPrefixes() []*BgpPrefixIpv4UnicastState { - if x != nil { - return x.Ipv4UnicastPrefixes +func (x *FlowFixedPackets) GetGap() uint32 { + if x != nil && x.Gap != nil { + return *x.Gap } - return nil + return 0 } -func (x *BgpPrefixesState) GetIpv6UnicastPrefixes() []*BgpPrefixIpv6UnicastState { +func (x *FlowFixedPackets) GetDelay() *FlowDelay { if x != nil { - return x.Ipv6UnicastPrefixes + return x.Delay } return nil } -// IPv4 unicast prefix. -type BgpPrefixIpv4UnicastState struct { +// Transmit for a fixed number of seconds after which the flow will stop. +type FlowFixedSeconds struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // An IPv4 unicast address - Ipv4Address *string `protobuf:"bytes,1,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` - // The length of the prefix. - PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` - // The origin of the prefix. - Origin *BgpPrefixIpv4UnicastState_Origin_Enum `protobuf:"varint,3,opt,name=origin,proto3,enum=otg.BgpPrefixIpv4UnicastState_Origin_Enum,oneof" json:"origin,omitempty"` - // The path id. - PathId *uint32 `protobuf:"varint,4,opt,name=path_id,json=pathId,proto3,oneof" json:"path_id,omitempty"` - // The IPv4 address of the egress interface. - Ipv4NextHop *string `protobuf:"bytes,5,opt,name=ipv4_next_hop,json=ipv4NextHop,proto3,oneof" json:"ipv4_next_hop,omitempty"` - // The IPv6 address of the egress interface. - Ipv6NextHop *string `protobuf:"bytes,6,opt,name=ipv6_next_hop,json=ipv6NextHop,proto3,oneof" json:"ipv6_next_hop,omitempty"` - // Optional community attributes. - Communities []*ResultBgpCommunity `protobuf:"bytes,7,rep,name=communities,proto3" json:"communities,omitempty"` + // Stop transmit of the flow after this number of seconds. + // default = 1 + Seconds *float32 `protobuf:"fixed32,1,opt,name=seconds,proto3,oneof" json:"seconds,omitempty"` + // The minimum gap between packets expressed as bytes. + // default = 12 + Gap *uint32 `protobuf:"varint,2,opt,name=gap,proto3,oneof" json:"gap,omitempty"` // Description missing in models - AsPath *ResultBgpAsPath `protobuf:"bytes,8,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` - // The local preference is a well-known attribute and the value is used for route selection. - // The route with the highest local preference value is preferred. - LocalPreference *uint32 `protobuf:"varint,9,opt,name=local_preference,json=localPreference,proto3,oneof" json:"local_preference,omitempty"` - // The multi exit discriminator (MED) is an optional non-transitive attribute and the - // value is used for route selection. The route with the lowest MED value is preferred. - MultiExitDiscriminator *uint32 `protobuf:"varint,10,opt,name=multi_exit_discriminator,json=multiExitDiscriminator,proto3,oneof" json:"multi_exit_discriminator,omitempty"` + Delay *FlowDelay `protobuf:"bytes,3,opt,name=delay,proto3" json:"delay,omitempty"` } -func (x *BgpPrefixIpv4UnicastState) Reset() { - *x = BgpPrefixIpv4UnicastState{} +func (x *FlowFixedSeconds) Reset() { + *x = FlowFixedSeconds{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[388] + mi := &file_otg_proto_msgTypes[390] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpPrefixIpv4UnicastState) String() string { +func (x *FlowFixedSeconds) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpPrefixIpv4UnicastState) ProtoMessage() {} +func (*FlowFixedSeconds) ProtoMessage() {} -func (x *BgpPrefixIpv4UnicastState) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[388] +func (x *FlowFixedSeconds) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[390] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55673,128 +57818,71 @@ func (x *BgpPrefixIpv4UnicastState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpPrefixIpv4UnicastState.ProtoReflect.Descriptor instead. -func (*BgpPrefixIpv4UnicastState) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{388} -} - -func (x *BgpPrefixIpv4UnicastState) GetIpv4Address() string { - if x != nil && x.Ipv4Address != nil { - return *x.Ipv4Address - } - return "" +// Deprecated: Use FlowFixedSeconds.ProtoReflect.Descriptor instead. +func (*FlowFixedSeconds) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{390} } -func (x *BgpPrefixIpv4UnicastState) GetPrefixLength() uint32 { - if x != nil && x.PrefixLength != nil { - return *x.PrefixLength +func (x *FlowFixedSeconds) GetSeconds() float32 { + if x != nil && x.Seconds != nil { + return *x.Seconds } return 0 } -func (x *BgpPrefixIpv4UnicastState) GetOrigin() BgpPrefixIpv4UnicastState_Origin_Enum { - if x != nil && x.Origin != nil { - return *x.Origin - } - return BgpPrefixIpv4UnicastState_Origin_unspecified -} - -func (x *BgpPrefixIpv4UnicastState) GetPathId() uint32 { - if x != nil && x.PathId != nil { - return *x.PathId +func (x *FlowFixedSeconds) GetGap() uint32 { + if x != nil && x.Gap != nil { + return *x.Gap } return 0 } -func (x *BgpPrefixIpv4UnicastState) GetIpv4NextHop() string { - if x != nil && x.Ipv4NextHop != nil { - return *x.Ipv4NextHop - } - return "" -} - -func (x *BgpPrefixIpv4UnicastState) GetIpv6NextHop() string { - if x != nil && x.Ipv6NextHop != nil { - return *x.Ipv6NextHop - } - return "" -} - -func (x *BgpPrefixIpv4UnicastState) GetCommunities() []*ResultBgpCommunity { - if x != nil { - return x.Communities - } - return nil -} - -func (x *BgpPrefixIpv4UnicastState) GetAsPath() *ResultBgpAsPath { +func (x *FlowFixedSeconds) GetDelay() *FlowDelay { if x != nil { - return x.AsPath + return x.Delay } return nil } -func (x *BgpPrefixIpv4UnicastState) GetLocalPreference() uint32 { - if x != nil && x.LocalPreference != nil { - return *x.LocalPreference - } - return 0 -} - -func (x *BgpPrefixIpv4UnicastState) GetMultiExitDiscriminator() uint32 { - if x != nil && x.MultiExitDiscriminator != nil { - return *x.MultiExitDiscriminator - } - return 0 -} - -// IPv6 unicast prefix. -type BgpPrefixIpv6UnicastState struct { +// Transmits continuous or fixed burst of packets. +// For continuous burst of packets, it will not automatically stop. +// For fixed burst of packets, it will stop after transmitting fixed number of bursts. +type FlowBurst struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // An IPv6 unicast address - Ipv6Address *string `protobuf:"bytes,1,opt,name=ipv6_address,json=ipv6Address,proto3,oneof" json:"ipv6_address,omitempty"` - // The length of the prefix. - PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` - // The origin of the prefix. - Origin *BgpPrefixIpv6UnicastState_Origin_Enum `protobuf:"varint,3,opt,name=origin,proto3,enum=otg.BgpPrefixIpv6UnicastState_Origin_Enum,oneof" json:"origin,omitempty"` - // The path id. - PathId *uint32 `protobuf:"varint,4,opt,name=path_id,json=pathId,proto3,oneof" json:"path_id,omitempty"` - // The IPv4 address of the egress interface. - Ipv4NextHop *string `protobuf:"bytes,5,opt,name=ipv4_next_hop,json=ipv4NextHop,proto3,oneof" json:"ipv4_next_hop,omitempty"` - // The IPv6 address of the egress interface. - Ipv6NextHop *string `protobuf:"bytes,6,opt,name=ipv6_next_hop,json=ipv6NextHop,proto3,oneof" json:"ipv6_next_hop,omitempty"` - // Optional community attributes. - Communities []*ResultBgpCommunity `protobuf:"bytes,7,rep,name=communities,proto3" json:"communities,omitempty"` + // The number of packet bursts transmitted per flow. + // A value of 0 implies continuous burst of packets. + // default = 0 + Bursts *uint32 `protobuf:"varint,1,opt,name=bursts,proto3,oneof" json:"bursts,omitempty"` + // The number of packets transmitted per burst. + // default = 1 + Packets *uint32 `protobuf:"varint,2,opt,name=packets,proto3,oneof" json:"packets,omitempty"` + // The minimum gap between packets expressed as bytes. + // default = 12 + Gap *uint32 `protobuf:"varint,3,opt,name=gap,proto3,oneof" json:"gap,omitempty"` // Description missing in models - AsPath *ResultBgpAsPath `protobuf:"bytes,8,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` - // The local preference is a well-known attribute and the value is used for route selection. - // The route with the highest local preference value is preferred. - LocalPreference *uint32 `protobuf:"varint,9,opt,name=local_preference,json=localPreference,proto3,oneof" json:"local_preference,omitempty"` - // The multi exit discriminator (MED) is an optional non-transitive attribute and the - // value is used for route selection. The route with the lowest MED value is preferred. - MultiExitDiscriminator *uint32 `protobuf:"varint,10,opt,name=multi_exit_discriminator,json=multiExitDiscriminator,proto3,oneof" json:"multi_exit_discriminator,omitempty"` + InterBurstGap *FlowDurationInterBurstGap `protobuf:"bytes,4,opt,name=inter_burst_gap,json=interBurstGap,proto3" json:"inter_burst_gap,omitempty"` } -func (x *BgpPrefixIpv6UnicastState) Reset() { - *x = BgpPrefixIpv6UnicastState{} +func (x *FlowBurst) Reset() { + *x = FlowBurst{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[389] + mi := &file_otg_proto_msgTypes[391] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpPrefixIpv6UnicastState) String() string { +func (x *FlowBurst) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpPrefixIpv6UnicastState) ProtoMessage() {} +func (*FlowBurst) ProtoMessage() {} -func (x *BgpPrefixIpv6UnicastState) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[389] +func (x *FlowBurst) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[391] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55805,115 +57893,79 @@ func (x *BgpPrefixIpv6UnicastState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpPrefixIpv6UnicastState.ProtoReflect.Descriptor instead. -func (*BgpPrefixIpv6UnicastState) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{389} -} - -func (x *BgpPrefixIpv6UnicastState) GetIpv6Address() string { - if x != nil && x.Ipv6Address != nil { - return *x.Ipv6Address - } - return "" +// Deprecated: Use FlowBurst.ProtoReflect.Descriptor instead. +func (*FlowBurst) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{391} } -func (x *BgpPrefixIpv6UnicastState) GetPrefixLength() uint32 { - if x != nil && x.PrefixLength != nil { - return *x.PrefixLength +func (x *FlowBurst) GetBursts() uint32 { + if x != nil && x.Bursts != nil { + return *x.Bursts } return 0 } -func (x *BgpPrefixIpv6UnicastState) GetOrigin() BgpPrefixIpv6UnicastState_Origin_Enum { - if x != nil && x.Origin != nil { - return *x.Origin - } - return BgpPrefixIpv6UnicastState_Origin_unspecified -} - -func (x *BgpPrefixIpv6UnicastState) GetPathId() uint32 { - if x != nil && x.PathId != nil { - return *x.PathId +func (x *FlowBurst) GetPackets() uint32 { + if x != nil && x.Packets != nil { + return *x.Packets } return 0 } -func (x *BgpPrefixIpv6UnicastState) GetIpv4NextHop() string { - if x != nil && x.Ipv4NextHop != nil { - return *x.Ipv4NextHop - } - return "" -} - -func (x *BgpPrefixIpv6UnicastState) GetIpv6NextHop() string { - if x != nil && x.Ipv6NextHop != nil { - return *x.Ipv6NextHop - } - return "" -} - -func (x *BgpPrefixIpv6UnicastState) GetCommunities() []*ResultBgpCommunity { - if x != nil { - return x.Communities +func (x *FlowBurst) GetGap() uint32 { + if x != nil && x.Gap != nil { + return *x.Gap } - return nil + return 0 } -func (x *BgpPrefixIpv6UnicastState) GetAsPath() *ResultBgpAsPath { +func (x *FlowBurst) GetInterBurstGap() *FlowDurationInterBurstGap { if x != nil { - return x.AsPath + return x.InterBurstGap } return nil } -func (x *BgpPrefixIpv6UnicastState) GetLocalPreference() uint32 { - if x != nil && x.LocalPreference != nil { - return *x.LocalPreference - } - return 0 -} - -func (x *BgpPrefixIpv6UnicastState) GetMultiExitDiscriminator() uint32 { - if x != nil && x.MultiExitDiscriminator != nil { - return *x.MultiExitDiscriminator - } - return 0 -} - -// BGP communities provide additional capability for tagging routes and for modifying -// BGP routing policy on upstream and downstream routers. BGP community is a 32-bit -// number which is broken into 16-bit AS number and a 16-bit custom value. -type ResultBgpCommunity struct { +// The optional container for specifying a gap between bursts. +type FlowDurationInterBurstGap struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The type of community AS number. If community type is manual_as_number then as_number - // and as_custom will be available. - Type *ResultBgpCommunity_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.ResultBgpCommunity_Type_Enum,oneof" json:"type,omitempty"` - // First two octets of 32 bit community AS number. - AsNumber *uint32 `protobuf:"varint,2,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` - // Last two octets of the community value. - AsCustom *uint32 `protobuf:"varint,3,opt,name=as_custom,json=asCustom,proto3,oneof" json:"as_custom,omitempty"` + // The type of inter burst gap units. + // default = Choice.Enum.bytes + Choice *FlowDurationInterBurstGap_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowDurationInterBurstGap_Choice_Enum,oneof" json:"choice,omitempty"` + // The amount of time between bursts expressed in bytes. + // A value of 0 indicates no gap between bursts. + // default = 12 + Bytes *float64 `protobuf:"fixed64,2,opt,name=bytes,proto3,oneof" json:"bytes,omitempty"` + // The amount of time between bursts expressed in nanoseconds. + // A value of 0 indicates no gap between bursts. + // default = 96 + Nanoseconds *float64 `protobuf:"fixed64,3,opt,name=nanoseconds,proto3,oneof" json:"nanoseconds,omitempty"` + // The amount of time between bursts expressed in microseconds. + // A value of 0 indicates no gap between bursts. + // default = 0.096 + Microseconds *float64 `protobuf:"fixed64,4,opt,name=microseconds,proto3,oneof" json:"microseconds,omitempty"` } -func (x *ResultBgpCommunity) Reset() { - *x = ResultBgpCommunity{} +func (x *FlowDurationInterBurstGap) Reset() { + *x = FlowDurationInterBurstGap{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[390] + mi := &file_otg_proto_msgTypes[392] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ResultBgpCommunity) String() string { +func (x *FlowDurationInterBurstGap) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ResultBgpCommunity) ProtoMessage() {} +func (*FlowDurationInterBurstGap) ProtoMessage() {} -func (x *ResultBgpCommunity) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[390] +func (x *FlowDurationInterBurstGap) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[392] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55924,60 +57976,81 @@ func (x *ResultBgpCommunity) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ResultBgpCommunity.ProtoReflect.Descriptor instead. -func (*ResultBgpCommunity) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{390} +// Deprecated: Use FlowDurationInterBurstGap.ProtoReflect.Descriptor instead. +func (*FlowDurationInterBurstGap) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{392} } -func (x *ResultBgpCommunity) GetType() ResultBgpCommunity_Type_Enum { - if x != nil && x.Type != nil { - return *x.Type +func (x *FlowDurationInterBurstGap) GetChoice() FlowDurationInterBurstGap_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return ResultBgpCommunity_Type_unspecified + return FlowDurationInterBurstGap_Choice_unspecified } -func (x *ResultBgpCommunity) GetAsNumber() uint32 { - if x != nil && x.AsNumber != nil { - return *x.AsNumber +func (x *FlowDurationInterBurstGap) GetBytes() float64 { + if x != nil && x.Bytes != nil { + return *x.Bytes } return 0 } -func (x *ResultBgpCommunity) GetAsCustom() uint32 { - if x != nil && x.AsCustom != nil { - return *x.AsCustom +func (x *FlowDurationInterBurstGap) GetNanoseconds() float64 { + if x != nil && x.Nanoseconds != nil { + return *x.Nanoseconds } return 0 } -// This attribute identifies the autonomous systems through which routing information -// carried in this UPDATE message has passed. -type ResultBgpAsPath struct { +func (x *FlowDurationInterBurstGap) GetMicroseconds() float64 { + if x != nil && x.Microseconds != nil { + return *x.Microseconds + } + return 0 +} + +// The optional container for configuring flow metrics. +type FlowMetrics struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // AS Path segments present in the received AS Path attribute. - Segments []*ResultBgpAsPathSegment `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"` + // Enables flow metrics. + // Enabling this option may affect the resultant packet payload due to + // additional instrumentation data. + // default = False + Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"` + // Enables additional flow metric loss calculation. + // default = False + Loss *bool `protobuf:"varint,2,opt,name=loss,proto3,oneof" json:"loss,omitempty"` + // Rx Tx ratio. + RxTxRatio *FlowRxTxRatio `protobuf:"bytes,6,opt,name=rx_tx_ratio,json=rxTxRatio,proto3" json:"rx_tx_ratio,omitempty"` + // Enables additional flow metric first and last timestamps. + // default = False + Timestamps *bool `protobuf:"varint,3,opt,name=timestamps,proto3,oneof" json:"timestamps,omitempty"` + // Latency metrics. + Latency *FlowLatencyMetrics `protobuf:"bytes,4,opt,name=latency,proto3" json:"latency,omitempty"` + // Predefined metric tags + PredefinedMetricTags *FlowPredefinedTags `protobuf:"bytes,5,opt,name=predefined_metric_tags,json=predefinedMetricTags,proto3" json:"predefined_metric_tags,omitempty"` } -func (x *ResultBgpAsPath) Reset() { - *x = ResultBgpAsPath{} +func (x *FlowMetrics) Reset() { + *x = FlowMetrics{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[391] + mi := &file_otg_proto_msgTypes[393] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ResultBgpAsPath) String() string { +func (x *FlowMetrics) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ResultBgpAsPath) ProtoMessage() {} +func (*FlowMetrics) ProtoMessage() {} -func (x *ResultBgpAsPath) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[391] +func (x *FlowMetrics) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[393] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55988,153 +58061,84 @@ func (x *ResultBgpAsPath) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ResultBgpAsPath.ProtoReflect.Descriptor instead. -func (*ResultBgpAsPath) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{391} +// Deprecated: Use FlowMetrics.ProtoReflect.Descriptor instead. +func (*FlowMetrics) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{393} } -func (x *ResultBgpAsPath) GetSegments() []*ResultBgpAsPathSegment { - if x != nil { - return x.Segments +func (x *FlowMetrics) GetEnable() bool { + if x != nil && x.Enable != nil { + return *x.Enable } - return nil + return false } -// Configuration for a single BGP AS path segment -type ResultBgpAsPathSegment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // AS sequence is the most common type of AS_PATH, it contains the list of ASNs starting - // with the most recent ASN being added read from left to right. - // The other three AS_PATH types are used for Confederations - AS_SET is the type of - // AS_PATH attribute that summarizes routes using using the aggregate-address command, - // allowing AS_PATHs to be summarized in the update as well. - AS_CONFED_SEQ gives - // the list of ASNs in the path starting with the most recent ASN to be added reading - // left to right - AS_CONFED_SET will allow summarization of multiple AS PATHs to be - // sent in BGP Updates. - Type *ResultBgpAsPathSegment_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.ResultBgpAsPathSegment_Type_Enum,oneof" json:"type,omitempty"` - // The AS numbers in this AS path segment. - AsNumbers []uint32 `protobuf:"varint,2,rep,packed,name=as_numbers,json=asNumbers,proto3" json:"as_numbers,omitempty"` +func (x *FlowMetrics) GetLoss() bool { + if x != nil && x.Loss != nil { + return *x.Loss + } + return false } -func (x *ResultBgpAsPathSegment) Reset() { - *x = ResultBgpAsPathSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[392] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowMetrics) GetRxTxRatio() *FlowRxTxRatio { + if x != nil { + return x.RxTxRatio } + return nil } -func (x *ResultBgpAsPathSegment) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *FlowMetrics) GetTimestamps() bool { + if x != nil && x.Timestamps != nil { + return *x.Timestamps + } + return false } -func (*ResultBgpAsPathSegment) ProtoMessage() {} - -func (x *ResultBgpAsPathSegment) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[392] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResultBgpAsPathSegment.ProtoReflect.Descriptor instead. -func (*ResultBgpAsPathSegment) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{392} -} - -func (x *ResultBgpAsPathSegment) GetType() ResultBgpAsPathSegment_Type_Enum { - if x != nil && x.Type != nil { - return *x.Type - } - return ResultBgpAsPathSegment_Type_unspecified -} - -func (x *ResultBgpAsPathSegment) GetAsNumbers() []uint32 { +func (x *FlowMetrics) GetLatency() *FlowLatencyMetrics { if x != nil { - return x.AsNumbers + return x.Latency } return nil } -// The request to retrieve ISIS Link State PDU (LSP) information learned by the router. -type IsisLspsStateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The names of ISIS routers for which learned information is requested. An empty list - // will return results for all ISIS routers. - // - // x-constraint: - // - /components/schemas/Device.IsisRouter/properties/name - // - // x-constraint: - // - /components/schemas/Device.IsisRouter/properties/name - IsisRouterNames []string `protobuf:"bytes,1,rep,name=isis_router_names,json=isisRouterNames,proto3" json:"isis_router_names,omitempty"` -} - -func (x *IsisLspsStateRequest) Reset() { - *x = IsisLspsStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[393] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IsisLspsStateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IsisLspsStateRequest) ProtoMessage() {} - -func (x *IsisLspsStateRequest) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[393] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IsisLspsStateRequest.ProtoReflect.Descriptor instead. -func (*IsisLspsStateRequest) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{393} -} - -func (x *IsisLspsStateRequest) GetIsisRouterNames() []string { +func (x *FlowMetrics) GetPredefinedMetricTags() *FlowPredefinedTags { if x != nil { - return x.IsisRouterNames + return x.PredefinedMetricTags } return nil } -// The result of ISIS LSP information that are retrieved. -type IsisLspsState struct { +// The optional container for per flow latency metric configuration. +type FlowLatencyMetrics struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the ISIS Router. - IsisRouterName *string `protobuf:"bytes,1,opt,name=isis_router_name,json=isisRouterName,proto3,oneof" json:"isis_router_name,omitempty"` - // One or more LSPs that are learned by this ISIS router. - Lsps []*IsisLspState `protobuf:"bytes,2,rep,name=lsps,proto3" json:"lsps,omitempty"` + // True to enable latency metrics using timestamps. + // + // Enabling this option may affect the resultant packet payload due to + // additional instrumentation data. + // default = False + Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"` + // Select the type of latency measurement. The different types of + // latency measurements are: + // + // store_forward: + // The time interval starting when the last bit of the frame leaves the + // sending port and ending when the first bit of the frame is seen on + // the receiving port (LIFO). This is based on the RFC 1242 standard. + // + // cut_through: + // The time interval starting when the first bit of the frame leaves + // the sending port and ending when the first bit of the frame is seen + // on the receiving port (FIFO). This is based on the RFC 1242 + // standard. + // default = Mode.Enum.store_forward + Mode *FlowLatencyMetrics_Mode_Enum `protobuf:"varint,2,opt,name=mode,proto3,enum=otg.FlowLatencyMetrics_Mode_Enum,oneof" json:"mode,omitempty"` } -func (x *IsisLspsState) Reset() { - *x = IsisLspsState{} +func (x *FlowLatencyMetrics) Reset() { + *x = FlowLatencyMetrics{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[394] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56142,13 +58146,13 @@ func (x *IsisLspsState) Reset() { } } -func (x *IsisLspsState) String() string { +func (x *FlowLatencyMetrics) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspsState) ProtoMessage() {} +func (*FlowLatencyMetrics) ProtoMessage() {} -func (x *IsisLspsState) ProtoReflect() protoreflect.Message { +func (x *FlowLatencyMetrics) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[394] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56160,61 +58164,41 @@ func (x *IsisLspsState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspsState.ProtoReflect.Descriptor instead. -func (*IsisLspsState) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowLatencyMetrics.ProtoReflect.Descriptor instead. +func (*FlowLatencyMetrics) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{394} } -func (x *IsisLspsState) GetIsisRouterName() string { - if x != nil && x.IsisRouterName != nil { - return *x.IsisRouterName +func (x *FlowLatencyMetrics) GetEnable() bool { + if x != nil && x.Enable != nil { + return *x.Enable } - return "" + return false } -func (x *IsisLspsState) GetLsps() []*IsisLspState { - if x != nil { - return x.Lsps +func (x *FlowLatencyMetrics) GetMode() FlowLatencyMetrics_Mode_Enum { + if x != nil && x.Mode != nil { + return *x.Mode } - return nil + return FlowLatencyMetrics_Mode_unspecified } -// ISIS LSP. -type IsisLspState struct { +// List of predefined flow tracking options, outside packet fields, that can be enabled. +type FlowPredefinedTags struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // LSP ID in the format, e.g. '640000000001-00-00'. LSP ID consists of the System ID - // of a neighbor, the Pseudonode ID, and the LSP number. The last two bytes represent - // Pseudonode ID and LSP number respectively. A pseudonode is a logical representation - // of the LAN which is generated by a Designated Intermediate System (DIS) on a LAN - // segment. If one LSP exceeds the maximum LSP size then it is sent in another LSP with - // the LSP number incremented by one. A router's learned LSP gets refreshed by 'remaining_lifetime'. - // Then the sequence number is incremented by 1. - // required = true - LspId *string `protobuf:"bytes,1,opt,name=lsp_id,json=lspId,proto3,oneof" json:"lsp_id,omitempty"` - // Link State PDU type. - PduType *IsisLspState_PduType_Enum `protobuf:"varint,2,opt,name=pdu_type,json=pduType,proto3,enum=otg.IsisLspState_PduType_Enum,oneof" json:"pdu_type,omitempty"` - // Remaining lifetime in seconds before LSP expires. - RemainingLifetime *uint32 `protobuf:"varint,3,opt,name=remaining_lifetime,json=remainingLifetime,proto3,oneof" json:"remaining_lifetime,omitempty"` - // Sequence number of the LSP. - SequenceNumber *uint64 `protobuf:"varint,4,opt,name=sequence_number,json=sequenceNumber,proto3,oneof" json:"sequence_number,omitempty"` - // Total length of the LSP. - PduLength *uint32 `protobuf:"varint,5,opt,name=pdu_length,json=pduLength,proto3,oneof" json:"pdu_length,omitempty"` - // LSP Type-Block flags. - Flags *IsisLspFlags `protobuf:"bytes,6,opt,name=flags,proto3" json:"flags,omitempty"` - // IS Type - bits 1 and 2 indicate the type of Intermediate System. - // 1 - ( i.e. bit 1 set) Level 1 Intermediate system. - // 2 - Unused value. - // 3 - (i.e. bits 1 and 2 set) Level 2 Intermediate system. - IsType *uint32 `protobuf:"varint,7,opt,name=is_type,json=isType,proto3,oneof" json:"is_type,omitempty"` - // It refers to Link State PDU State TLVs container. - Tlvs *IsisLspTlvs `protobuf:"bytes,8,opt,name=tlvs,proto3" json:"tlvs,omitempty"` + // Enables Rx port or lag level disaggregation with predefined metrics tag name set + // as rx_name. + // The Rx port / lag names can be found under tagged_metrics tag names in flow metrics + // response. + // default = False + RxName *bool `protobuf:"varint,1,opt,name=rx_name,json=rxName,proto3,oneof" json:"rx_name,omitempty"` } -func (x *IsisLspState) Reset() { - *x = IsisLspState{} +func (x *FlowPredefinedTags) Reset() { + *x = FlowPredefinedTags{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[395] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56222,13 +58206,13 @@ func (x *IsisLspState) Reset() { } } -func (x *IsisLspState) String() string { +func (x *FlowPredefinedTags) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspState) ProtoMessage() {} +func (*FlowPredefinedTags) ProtoMessage() {} -func (x *IsisLspState) ProtoReflect() protoreflect.Message { +func (x *FlowPredefinedTags) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[395] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56240,91 +58224,52 @@ func (x *IsisLspState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspState.ProtoReflect.Descriptor instead. -func (*IsisLspState) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowPredefinedTags.ProtoReflect.Descriptor instead. +func (*FlowPredefinedTags) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{395} } -func (x *IsisLspState) GetLspId() string { - if x != nil && x.LspId != nil { - return *x.LspId - } - return "" -} - -func (x *IsisLspState) GetPduType() IsisLspState_PduType_Enum { - if x != nil && x.PduType != nil { - return *x.PduType - } - return IsisLspState_PduType_unspecified -} - -func (x *IsisLspState) GetRemainingLifetime() uint32 { - if x != nil && x.RemainingLifetime != nil { - return *x.RemainingLifetime - } - return 0 -} - -func (x *IsisLspState) GetSequenceNumber() uint64 { - if x != nil && x.SequenceNumber != nil { - return *x.SequenceNumber - } - return 0 -} - -func (x *IsisLspState) GetPduLength() uint32 { - if x != nil && x.PduLength != nil { - return *x.PduLength - } - return 0 -} - -func (x *IsisLspState) GetFlags() *IsisLspFlags { - if x != nil { - return x.Flags - } - return nil -} - -func (x *IsisLspState) GetIsType() uint32 { - if x != nil && x.IsType != nil { - return *x.IsType - } - return 0 -} - -func (x *IsisLspState) GetTlvs() *IsisLspTlvs { - if x != nil { - return x.Tlvs +func (x *FlowPredefinedTags) GetRxName() bool { + if x != nil && x.RxName != nil { + return *x.RxName } - return nil + return false } -// This contains the list of TLVs present in one LSP. -type IsisLspTlvs struct { +// Rx Tx ratio is the ratio of expected number of Rx packets across all Rx ports to +// the Tx packets +// for the configured flow. It is a factor by which the Tx packet count is multiplied +// to calculate +// the sum of expected Rx packet count, across all Rx ports. This will be used to calculate +// loss +// percentage of flow at aggregate level. +type FlowRxTxRatio struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Array of Hostname TLVs ( type 137) present in this LSP. - HostnameTlvs []*IsisLspHostname `protobuf:"bytes,1,rep,name=hostname_tlvs,json=hostnameTlvs,proto3" json:"hostname_tlvs,omitempty"` - // Array of IS-Reachability TLVs (type 2) present in this LSP. - IsReachabilityTlvs []*IsisLspIsReachabilityTlv `protobuf:"bytes,2,rep,name=is_reachability_tlvs,json=isReachabilityTlvs,proto3" json:"is_reachability_tlvs,omitempty"` - // Array of Extended IS-Reachability TLVs (type 22) present in this LSP. - ExtendedIsReachabilityTlvs []*IsisLspExtendedIsReachabilityTlv `protobuf:"bytes,3,rep,name=extended_is_reachability_tlvs,json=extendedIsReachabilityTlvs,proto3" json:"extended_is_reachability_tlvs,omitempty"` - // Array of IPv4 Internal Reachability TLVs (type 128) present in this LSP. - Ipv4InternalReachabilityTlvs []*IsisLspIpv4InternalReachabilityTlv `protobuf:"bytes,4,rep,name=ipv4_internal_reachability_tlvs,json=ipv4InternalReachabilityTlvs,proto3" json:"ipv4_internal_reachability_tlvs,omitempty"` - // Array of IPv4 External Reachability TLVs (type 130) present in this LSP. - Ipv4ExternalReachabilityTlvs []*IsisLspIpv4ExternalReachabilityTlv `protobuf:"bytes,5,rep,name=ipv4_external_reachability_tlvs,json=ipv4ExternalReachabilityTlvs,proto3" json:"ipv4_external_reachability_tlvs,omitempty"` - // Array of IPv4 Extended Reachability TLVs (type 135) present in this LSP. - ExtendedIpv4ReachabilityTlvs []*IsisLspExtendedIpv4ReachabilityTlv `protobuf:"bytes,6,rep,name=extended_ipv4_reachability_tlvs,json=extendedIpv4ReachabilityTlvs,proto3" json:"extended_ipv4_reachability_tlvs,omitempty"` - // Array of IPv6 Reachability TLVs (type 236) present in this LSP. - Ipv6ReachabilityTlvs []*IsisLspIpv6ReachabilityTlv `protobuf:"bytes,7,rep,name=ipv6_reachability_tlvs,json=ipv6ReachabilityTlvs,proto3" json:"ipv6_reachability_tlvs,omitempty"` + // Description missing in models + // default = Choice.Enum.value + Choice *FlowRxTxRatio_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowRxTxRatio_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + RxCount *FlowRxTxRatioRxCount `protobuf:"bytes,2,opt,name=rx_count,json=rxCount,proto3" json:"rx_count,omitempty"` + // Should be a positive, non-zero value. The default value of 1, is when the Rx packet + // count across + // all ports is expected to match the Tx packet count. A custom integer value (>1) can + // be specified for + // loss calculation for cases when there are multiple destination addresses configured + // within one flow, + // but DUT is configured to replicate only to a subset of Rx ports. For cases when Tx + // side generates two + // packets from each source in 1:1 protection mode but only one of the two packets are + // received by the + // Rx port, we may need to specify a fractional value instead. + // default = 1.0 + Value *float32 `protobuf:"fixed32,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *IsisLspTlvs) Reset() { - *x = IsisLspTlvs{} +func (x *FlowRxTxRatio) Reset() { + *x = FlowRxTxRatio{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[396] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56332,13 +58277,13 @@ func (x *IsisLspTlvs) Reset() { } } -func (x *IsisLspTlvs) String() string { +func (x *FlowRxTxRatio) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspTlvs) ProtoMessage() {} +func (*FlowRxTxRatio) ProtoMessage() {} -func (x *IsisLspTlvs) ProtoReflect() protoreflect.Message { +func (x *FlowRxTxRatio) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[396] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56350,72 +58295,43 @@ func (x *IsisLspTlvs) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspTlvs.ProtoReflect.Descriptor instead. -func (*IsisLspTlvs) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowRxTxRatio.ProtoReflect.Descriptor instead. +func (*FlowRxTxRatio) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{396} } -func (x *IsisLspTlvs) GetHostnameTlvs() []*IsisLspHostname { - if x != nil { - return x.HostnameTlvs - } - return nil -} - -func (x *IsisLspTlvs) GetIsReachabilityTlvs() []*IsisLspIsReachabilityTlv { - if x != nil { - return x.IsReachabilityTlvs - } - return nil -} - -func (x *IsisLspTlvs) GetExtendedIsReachabilityTlvs() []*IsisLspExtendedIsReachabilityTlv { - if x != nil { - return x.ExtendedIsReachabilityTlvs - } - return nil -} - -func (x *IsisLspTlvs) GetIpv4InternalReachabilityTlvs() []*IsisLspIpv4InternalReachabilityTlv { - if x != nil { - return x.Ipv4InternalReachabilityTlvs - } - return nil -} - -func (x *IsisLspTlvs) GetIpv4ExternalReachabilityTlvs() []*IsisLspIpv4ExternalReachabilityTlv { - if x != nil { - return x.Ipv4ExternalReachabilityTlvs +func (x *FlowRxTxRatio) GetChoice() FlowRxTxRatio_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return FlowRxTxRatio_Choice_unspecified } -func (x *IsisLspTlvs) GetExtendedIpv4ReachabilityTlvs() []*IsisLspExtendedIpv4ReachabilityTlv { +func (x *FlowRxTxRatio) GetRxCount() *FlowRxTxRatioRxCount { if x != nil { - return x.ExtendedIpv4ReachabilityTlvs + return x.RxCount } return nil } -func (x *IsisLspTlvs) GetIpv6ReachabilityTlvs() []*IsisLspIpv6ReachabilityTlv { - if x != nil { - return x.Ipv6ReachabilityTlvs +func (x *FlowRxTxRatio) GetValue() float32 { + if x != nil && x.Value != nil { + return *x.Value } - return nil + return 0 } -// It contains Hostname for the TLV 137. -type IsisLspHostname struct { +// This is for cases where one copy of Tx packet is received on all Rx ports and so +// the sum total of Rx packets +// received across all Rx ports is a multiple of Rx port count and Tx packets. +type FlowRxTxRatioRxCount struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // Hostname for an ISIS router. - Hostname *string `protobuf:"bytes,1,opt,name=hostname,proto3,oneof" json:"hostname,omitempty"` } -func (x *IsisLspHostname) Reset() { - *x = IsisLspHostname{} +func (x *FlowRxTxRatioRxCount) Reset() { + *x = FlowRxTxRatioRxCount{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[397] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56423,13 +58339,13 @@ func (x *IsisLspHostname) Reset() { } } -func (x *IsisLspHostname) String() string { +func (x *FlowRxTxRatioRxCount) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspHostname) ProtoMessage() {} +func (*FlowRxTxRatioRxCount) ProtoMessage() {} -func (x *IsisLspHostname) ProtoReflect() protoreflect.Message { +func (x *FlowRxTxRatioRxCount) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[397] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56441,44 +58357,32 @@ func (x *IsisLspHostname) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspHostname.ProtoReflect.Descriptor instead. -func (*IsisLspHostname) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowRxTxRatioRxCount.ProtoReflect.Descriptor instead. +func (*FlowRxTxRatioRxCount) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{397} } -func (x *IsisLspHostname) GetHostname() string { - if x != nil && x.Hostname != nil { - return *x.Hostname - } - return "" -} - -// LSP Type flags. -type IsisLspFlags struct { +// The optional container for event configuration. +type Event struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // When set, the originator supports partition repair. - PartitionRepair *bool `protobuf:"varint,1,opt,name=partition_repair,json=partitionRepair,proto3,oneof" json:"partition_repair,omitempty"` - // When set, the originator is attached to another area using the referred metric. - AttachedError *bool `protobuf:"varint,2,opt,name=attached_error,json=attachedError,proto3,oneof" json:"attached_error,omitempty"` - // When set, the originator is attached to another - // area using the referred metric. - AttachedExpense *bool `protobuf:"varint,3,opt,name=attached_expense,json=attachedExpense,proto3,oneof" json:"attached_expense,omitempty"` - // Delay Metric - when set, the originator is attached to another - // area using the referred metric. - AttachedDelay *bool `protobuf:"varint,4,opt,name=attached_delay,json=attachedDelay,proto3,oneof" json:"attached_delay,omitempty"` - // Default Metric - when set, the originator is attached to another - // area using the referred metric. - AttachedDefault *bool `protobuf:"varint,5,opt,name=attached_default,json=attachedDefault,proto3,oneof" json:"attached_default,omitempty"` - // Overload bit - when set, the originator is overloaded, and must - // be avoided in path calculation. - Overload *bool `protobuf:"varint,6,opt,name=overload,proto3,oneof" json:"overload,omitempty"` + // True to enable all events. + // Enabling this option may affect the resultant packet payload due to + // additional instrumentation data. + // default = False + Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"` + // Description missing in models + Link *EventLink `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` + // Description missing in models + RxRateThreshold *EventRxRateThreshold `protobuf:"bytes,3,opt,name=rx_rate_threshold,json=rxRateThreshold,proto3" json:"rx_rate_threshold,omitempty"` + // Description missing in models + RouteAdvertiseWithdraw *EventRouteAdvertiseWithdraw `protobuf:"bytes,4,opt,name=route_advertise_withdraw,json=routeAdvertiseWithdraw,proto3" json:"route_advertise_withdraw,omitempty"` } -func (x *IsisLspFlags) Reset() { - *x = IsisLspFlags{} +func (x *Event) Reset() { + *x = Event{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[398] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56486,13 +58390,13 @@ func (x *IsisLspFlags) Reset() { } } -func (x *IsisLspFlags) String() string { +func (x *Event) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspFlags) ProtoMessage() {} +func (*Event) ProtoMessage() {} -func (x *IsisLspFlags) ProtoReflect() protoreflect.Message { +func (x *Event) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[398] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56504,66 +58408,58 @@ func (x *IsisLspFlags) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspFlags.ProtoReflect.Descriptor instead. -func (*IsisLspFlags) Descriptor() ([]byte, []int) { +// Deprecated: Use Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{398} } -func (x *IsisLspFlags) GetPartitionRepair() bool { - if x != nil && x.PartitionRepair != nil { - return *x.PartitionRepair - } - return false -} - -func (x *IsisLspFlags) GetAttachedError() bool { - if x != nil && x.AttachedError != nil { - return *x.AttachedError - } - return false -} - -func (x *IsisLspFlags) GetAttachedExpense() bool { - if x != nil && x.AttachedExpense != nil { - return *x.AttachedExpense +func (x *Event) GetEnable() bool { + if x != nil && x.Enable != nil { + return *x.Enable } return false } -func (x *IsisLspFlags) GetAttachedDelay() bool { - if x != nil && x.AttachedDelay != nil { - return *x.AttachedDelay +func (x *Event) GetLink() *EventLink { + if x != nil { + return x.Link } - return false + return nil } -func (x *IsisLspFlags) GetAttachedDefault() bool { - if x != nil && x.AttachedDefault != nil { - return *x.AttachedDefault +func (x *Event) GetRxRateThreshold() *EventRxRateThreshold { + if x != nil { + return x.RxRateThreshold } - return false + return nil } -func (x *IsisLspFlags) GetOverload() bool { - if x != nil && x.Overload != nil { - return *x.Overload +func (x *Event) GetRouteAdvertiseWithdraw() *EventRouteAdvertiseWithdraw { + if x != nil { + return x.RouteAdvertiseWithdraw } - return false + return nil } -// This container describes list of ISIS neighbors and attributes in IS-Reachability -// TLV (type 2). -type IsisLspIsReachabilityTlv struct { +// The optional container for rx rate threshold event configuration. +type EventRxRateThreshold struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // This container describes Intermediate System (IS) neighbors. - Neighbors []*IsisLspneighbor `protobuf:"bytes,1,rep,name=neighbors,proto3" json:"neighbors,omitempty"` + // True to enable the rx_rate_threshold event. + // Enabling this option may affect the resultant packet payload due to + // additional instrumentation data. + // default = False + Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"` + // True to enable notifications when the rx rate of a flow passes above + // or below the threshold value. + // default = 95 + Threshold *float32 `protobuf:"fixed32,2,opt,name=threshold,proto3,oneof" json:"threshold,omitempty"` } -func (x *IsisLspIsReachabilityTlv) Reset() { - *x = IsisLspIsReachabilityTlv{} +func (x *EventRxRateThreshold) Reset() { + *x = EventRxRateThreshold{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[399] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56571,13 +58467,13 @@ func (x *IsisLspIsReachabilityTlv) Reset() { } } -func (x *IsisLspIsReachabilityTlv) String() string { +func (x *EventRxRateThreshold) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspIsReachabilityTlv) ProtoMessage() {} +func (*EventRxRateThreshold) ProtoMessage() {} -func (x *IsisLspIsReachabilityTlv) ProtoReflect() protoreflect.Message { +func (x *EventRxRateThreshold) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[399] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56589,31 +58485,38 @@ func (x *IsisLspIsReachabilityTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspIsReachabilityTlv.ProtoReflect.Descriptor instead. -func (*IsisLspIsReachabilityTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use EventRxRateThreshold.ProtoReflect.Descriptor instead. +func (*EventRxRateThreshold) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{399} } -func (x *IsisLspIsReachabilityTlv) GetNeighbors() []*IsisLspneighbor { - if x != nil { - return x.Neighbors +func (x *EventRxRateThreshold) GetEnable() bool { + if x != nil && x.Enable != nil { + return *x.Enable } - return nil + return false } -// This is list of ISIS neighbors and attributes in Extended-IS-Reachability TLV (type -// 22). -type IsisLspExtendedIsReachabilityTlv struct { +func (x *EventRxRateThreshold) GetThreshold() float32 { + if x != nil && x.Threshold != nil { + return *x.Threshold + } + return 0 +} + +// The optional container for link up/down event configuration. +type EventLink struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // This container describes IS neighbors. - Neighbors []*IsisLspneighbor `protobuf:"bytes,1,rep,name=neighbors,proto3" json:"neighbors,omitempty"` + // True to enable notifications when a link up/down event occurs. + // default = False + Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"` } -func (x *IsisLspExtendedIsReachabilityTlv) Reset() { - *x = IsisLspExtendedIsReachabilityTlv{} +func (x *EventLink) Reset() { + *x = EventLink{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[400] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56621,13 +58524,13 @@ func (x *IsisLspExtendedIsReachabilityTlv) Reset() { } } -func (x *IsisLspExtendedIsReachabilityTlv) String() string { +func (x *EventLink) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspExtendedIsReachabilityTlv) ProtoMessage() {} +func (*EventLink) ProtoMessage() {} -func (x *IsisLspExtendedIsReachabilityTlv) ProtoReflect() protoreflect.Message { +func (x *EventLink) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[400] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56639,30 +58542,32 @@ func (x *IsisLspExtendedIsReachabilityTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspExtendedIsReachabilityTlv.ProtoReflect.Descriptor instead. -func (*IsisLspExtendedIsReachabilityTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use EventLink.ProtoReflect.Descriptor instead. +func (*EventLink) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{400} } -func (x *IsisLspExtendedIsReachabilityTlv) GetNeighbors() []*IsisLspneighbor { - if x != nil { - return x.Neighbors +func (x *EventLink) GetEnable() bool { + if x != nil && x.Enable != nil { + return *x.Enable } - return nil + return false } -// This contains IS neighbors. -type IsisLspneighbor struct { +// The optional container for route advertise/withdraw event configuration. +type EventRouteAdvertiseWithdraw struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The System ID for this emulated ISIS router, e.g. 640100010000. - SystemId *string `protobuf:"bytes,1,opt,name=system_id,json=systemId,proto3,oneof" json:"system_id,omitempty"` + // True to enable notifications when a route advertise/withdraw + // event occurs. + // default = False + Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"` } -func (x *IsisLspneighbor) Reset() { - *x = IsisLspneighbor{} +func (x *EventRouteAdvertiseWithdraw) Reset() { + *x = EventRouteAdvertiseWithdraw{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[401] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56670,13 +58575,13 @@ func (x *IsisLspneighbor) Reset() { } } -func (x *IsisLspneighbor) String() string { +func (x *EventRouteAdvertiseWithdraw) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspneighbor) ProtoMessage() {} +func (*EventRouteAdvertiseWithdraw) ProtoMessage() {} -func (x *IsisLspneighbor) ProtoReflect() protoreflect.Message { +func (x *EventRouteAdvertiseWithdraw) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[401] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56688,32 +58593,44 @@ func (x *IsisLspneighbor) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspneighbor.ProtoReflect.Descriptor instead. -func (*IsisLspneighbor) Descriptor() ([]byte, []int) { +// Deprecated: Use EventRouteAdvertiseWithdraw.ProtoReflect.Descriptor instead. +func (*EventRouteAdvertiseWithdraw) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{401} } -func (x *IsisLspneighbor) GetSystemId() string { - if x != nil && x.SystemId != nil { - return *x.SystemId +func (x *EventRouteAdvertiseWithdraw) GetEnable() bool { + if x != nil && x.Enable != nil { + return *x.Enable } - return "" + return false } -// This container defines list of IPv4 internal reachability information in one IPv4 -// internal reachability TLV. -// This is advertised when the origin-type is set 'internal' in route range configurations. -type IsisLspIpv4InternalReachabilityTlv struct { +// Description missing in models +type EventRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Describes list of IPv4 prefixes in this TLV. - Prefixes []*IsisLspV4Prefix `protobuf:"bytes,1,rep,name=prefixes,proto3" json:"prefixes,omitempty"` + // Constrain the events being returned by specifying event types. + // If the list is empty then all event types will be returned. + Type []EventRequest_Type_Enum `protobuf:"varint,1,rep,packed,name=type,proto3,enum=otg.EventRequest_Type_Enum" json:"type,omitempty"` + // Constrain the events being returned by specifying event sources. + // If the list is empty then all event sources will be returned. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Bgp.V4RouteRange/name + // - /components/schemas/Bgp.V6RouteRange/name + // + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Bgp.V4RouteRange/name + // - /components/schemas/Bgp.V6RouteRange/name + Source []string `protobuf:"bytes,2,rep,name=source,proto3" json:"source,omitempty"` } -func (x *IsisLspIpv4InternalReachabilityTlv) Reset() { - *x = IsisLspIpv4InternalReachabilityTlv{} +func (x *EventRequest) Reset() { + *x = EventRequest{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[402] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56721,13 +58638,13 @@ func (x *IsisLspIpv4InternalReachabilityTlv) Reset() { } } -func (x *IsisLspIpv4InternalReachabilityTlv) String() string { +func (x *EventRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspIpv4InternalReachabilityTlv) ProtoMessage() {} +func (*EventRequest) ProtoMessage() {} -func (x *IsisLspIpv4InternalReachabilityTlv) ProtoReflect() protoreflect.Message { +func (x *EventRequest) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[402] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56739,32 +58656,43 @@ func (x *IsisLspIpv4InternalReachabilityTlv) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use IsisLspIpv4InternalReachabilityTlv.ProtoReflect.Descriptor instead. -func (*IsisLspIpv4InternalReachabilityTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use EventRequest.ProtoReflect.Descriptor instead. +func (*EventRequest) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{402} } -func (x *IsisLspIpv4InternalReachabilityTlv) GetPrefixes() []*IsisLspV4Prefix { +func (x *EventRequest) GetType() []EventRequest_Type_Enum { if x != nil { - return x.Prefixes + return x.Type } return nil } -// This container defines list of IPv4 external reachability information in one IPv4 -// external reachability TLV. -// This is advertised when the origin-type is set 'external' in route range configurations. -type IsisLspIpv4ExternalReachabilityTlv struct { +func (x *EventRequest) GetSource() []string { + if x != nil { + return x.Source + } + return nil +} + +// A container that describes what events a system should provide and +// optionally where to publish them. +type EventSubscription struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Describes list of IPv4 prefixes in this TLV.. - Prefixes []*IsisLspV4Prefix `protobuf:"bytes,1,rep,name=prefixes,proto3" json:"prefixes,omitempty"` + // Description missing in models + Events *EventRequest `protobuf:"bytes,1,opt,name=events,proto3" json:"events,omitempty"` + // Indicates where a client wants to be notified of the events set in + // the events property. + // If this property is empty or null then no event notifications will + // be forwarded. + CallbackUrl *string `protobuf:"bytes,2,opt,name=callback_url,json=callbackUrl,proto3,oneof" json:"callback_url,omitempty"` } -func (x *IsisLspIpv4ExternalReachabilityTlv) Reset() { - *x = IsisLspIpv4ExternalReachabilityTlv{} +func (x *EventSubscription) Reset() { + *x = EventSubscription{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[403] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56772,13 +58700,13 @@ func (x *IsisLspIpv4ExternalReachabilityTlv) Reset() { } } -func (x *IsisLspIpv4ExternalReachabilityTlv) String() string { +func (x *EventSubscription) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspIpv4ExternalReachabilityTlv) ProtoMessage() {} +func (*EventSubscription) ProtoMessage() {} -func (x *IsisLspIpv4ExternalReachabilityTlv) ProtoReflect() protoreflect.Message { +func (x *EventSubscription) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[403] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56790,46 +58718,68 @@ func (x *IsisLspIpv4ExternalReachabilityTlv) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use IsisLspIpv4ExternalReachabilityTlv.ProtoReflect.Descriptor instead. -func (*IsisLspIpv4ExternalReachabilityTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use EventSubscription.ProtoReflect.Descriptor instead. +func (*EventSubscription) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{403} } -func (x *IsisLspIpv4ExternalReachabilityTlv) GetPrefixes() []*IsisLspV4Prefix { +func (x *EventSubscription) GetEvents() *EventRequest { if x != nil { - return x.Prefixes + return x.Events } return nil } -// This group defines attributes of an IPv4 standard prefix. -type IsisLspV4Prefix struct { +func (x *EventSubscription) GetCallbackUrl() string { + if x != nil && x.CallbackUrl != nil { + return *x.CallbackUrl + } + return "" +} + +// Configuration of LLDP protocol IEEE Ref: https://www.ieee802.org/1/files/public/docs2002/lldp-protocol-00.pdf +type Lldp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // An IPv4 unicast prefix reachable via the originator of this LSP. - Ipv4Address *string `protobuf:"bytes,1,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` - // The length of the IPv4 prefix. - PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` - // Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, - // and for all other prefixes in L1 and L2 LSPs. (default) - // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. - // The prefixes are being advertised from a higher level (L2) down to a lower level - // (L1). - RedistributionType *IsisLspV4Prefix_RedistributionType_Enum `protobuf:"varint,3,opt,name=redistribution_type,json=redistributionType,proto3,enum=otg.IsisLspV4Prefix_RedistributionType_Enum,oneof" json:"redistribution_type,omitempty"` - // ISIS default metric value. - DefaultMetric *uint32 `protobuf:"varint,4,opt,name=default_metric,json=defaultMetric,proto3,oneof" json:"default_metric,omitempty"` - // The origin of the advertised route-internal or external to the ISIS area. Options - // include the following: - // Internal-for intra-area routes, through Level 1 LSPs. - // External-for inter-area routes redistributed within L1, through Level - // 1 LSPs. - OriginType *IsisLspV4Prefix_OriginType_Enum `protobuf:"varint,5,opt,name=origin_type,json=originType,proto3,enum=otg.IsisLspV4Prefix_OriginType_Enum,oneof" json:"origin_type,omitempty"` + // The unique name of the object on which LLDP is running. + // required = true + Connection *LldpConnection `protobuf:"bytes,1,opt,name=connection,proto3" json:"connection,omitempty"` + // The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint + // identifier associated with the transmitting LLDP agent. If mac address is specified + // it should be in colon seperated mac address format. + ChassisId *LldpChassisId `protobuf:"bytes,2,opt,name=chassis_id,json=chassisId,proto3" json:"chassis_id,omitempty"` + // The Port ID is a mandatory TLV which identifies the port component of the endpoint + // identifier associated with the transmitting LLDP agent. If the specified port is + // an IEEE 802.3 Repeater port, then this TLV is optional. + PortId *LldpPortId `protobuf:"bytes,3,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + // The system name field shall contain an alpha-numeric string that indicates the system's + // administratively assigned name. The system name should be the system's fully qualified + // domain name. If implementations support IETF RFC 3418, the sysName object should + // be used for this field. + SystemName *LldpSystemName `protobuf:"bytes,4,opt,name=system_name,json=systemName,proto3" json:"system_name,omitempty"` + // Specifies the amount of time in seconds a receiving device should maintain LLDP information + // sent by the device before discarding it. + // default = 120 + HoldTime *uint32 `protobuf:"varint,5,opt,name=hold_time,json=holdTime,proto3,oneof" json:"hold_time,omitempty"` + // Set the transmission frequency of LLDP updates in seconds. + // default = 30 + AdvertisementInterval *uint32 `protobuf:"varint,6,opt,name=advertisement_interval,json=advertisementInterval,proto3,oneof" json:"advertisement_interval,omitempty"` + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + Name *string `protobuf:"bytes,7,opt,name=name,proto3,oneof" json:"name,omitempty"` + // The Organization Information is used to define the organization specific TLVs. The + // organization specific TLV is defined in IEEE 802.1AB-2016 specification. This category + // is provided to allow different organizations, such as IEEE 802.1, IEEE 802.3, IETF, + // as well as individual software and equipment vendors, to define TLVs that advertise + // information to remote entities attached to the same media. + OrgInfos []*LldpOrgInfo `protobuf:"bytes,8,rep,name=org_infos,json=orgInfos,proto3" json:"org_infos,omitempty"` } -func (x *IsisLspV4Prefix) Reset() { - *x = IsisLspV4Prefix{} +func (x *Lldp) Reset() { + *x = Lldp{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[404] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56837,13 +58787,13 @@ func (x *IsisLspV4Prefix) Reset() { } } -func (x *IsisLspV4Prefix) String() string { +func (x *Lldp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspV4Prefix) ProtoMessage() {} +func (*Lldp) ProtoMessage() {} -func (x *IsisLspV4Prefix) ProtoReflect() protoreflect.Message { +func (x *Lldp) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[404] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56855,60 +58805,88 @@ func (x *IsisLspV4Prefix) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspV4Prefix.ProtoReflect.Descriptor instead. -func (*IsisLspV4Prefix) Descriptor() ([]byte, []int) { +// Deprecated: Use Lldp.ProtoReflect.Descriptor instead. +func (*Lldp) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{404} } -func (x *IsisLspV4Prefix) GetIpv4Address() string { - if x != nil && x.Ipv4Address != nil { - return *x.Ipv4Address +func (x *Lldp) GetConnection() *LldpConnection { + if x != nil { + return x.Connection } - return "" + return nil } -func (x *IsisLspV4Prefix) GetPrefixLength() uint32 { - if x != nil && x.PrefixLength != nil { - return *x.PrefixLength +func (x *Lldp) GetChassisId() *LldpChassisId { + if x != nil { + return x.ChassisId } - return 0 + return nil } -func (x *IsisLspV4Prefix) GetRedistributionType() IsisLspV4Prefix_RedistributionType_Enum { - if x != nil && x.RedistributionType != nil { - return *x.RedistributionType +func (x *Lldp) GetPortId() *LldpPortId { + if x != nil { + return x.PortId } - return IsisLspV4Prefix_RedistributionType_unspecified + return nil } -func (x *IsisLspV4Prefix) GetDefaultMetric() uint32 { - if x != nil && x.DefaultMetric != nil { - return *x.DefaultMetric +func (x *Lldp) GetSystemName() *LldpSystemName { + if x != nil { + return x.SystemName + } + return nil +} + +func (x *Lldp) GetHoldTime() uint32 { + if x != nil && x.HoldTime != nil { + return *x.HoldTime } return 0 } -func (x *IsisLspV4Prefix) GetOriginType() IsisLspV4Prefix_OriginType_Enum { - if x != nil && x.OriginType != nil { - return *x.OriginType +func (x *Lldp) GetAdvertisementInterval() uint32 { + if x != nil && x.AdvertisementInterval != nil { + return *x.AdvertisementInterval } - return IsisLspV4Prefix_OriginType_unspecified + return 0 } -// This container defines list of IPv4 extended reachability information in one Extended -// IPv4 External Reachability TLV. -// It is advertised when the 'wide metric' is enabled. -type IsisLspExtendedIpv4ReachabilityTlv struct { +func (x *Lldp) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *Lldp) GetOrgInfos() []*LldpOrgInfo { + if x != nil { + return x.OrgInfos + } + return nil +} + +// LLDP connection to a test port. In future if more connection options arise LLDP +// connection object will be enhanced. +type LldpConnection struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // IPv4 prefix contained within extended reachability TLVs. - Prefixes []*IsisLspExtendedV4Prefix `protobuf:"bytes,1,rep,name=prefixes,proto3" json:"prefixes,omitempty"` + // The name of the test port or other connection objects on which LLDP is configured. + Choice *LldpConnection_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.LldpConnection_Choice_Enum,oneof" json:"choice,omitempty"` + // Name of the test port on which LLDP is configured on. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // x-constraint: + // - /components/schemas/Port/properties/name + PortName *string `protobuf:"bytes,2,opt,name=port_name,json=portName,proto3,oneof" json:"port_name,omitempty"` } -func (x *IsisLspExtendedIpv4ReachabilityTlv) Reset() { - *x = IsisLspExtendedIpv4ReachabilityTlv{} +func (x *LldpConnection) Reset() { + *x = LldpConnection{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[405] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56916,13 +58894,13 @@ func (x *IsisLspExtendedIpv4ReachabilityTlv) Reset() { } } -func (x *IsisLspExtendedIpv4ReachabilityTlv) String() string { +func (x *LldpConnection) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspExtendedIpv4ReachabilityTlv) ProtoMessage() {} +func (*LldpConnection) ProtoMessage() {} -func (x *IsisLspExtendedIpv4ReachabilityTlv) ProtoReflect() protoreflect.Message { +func (x *LldpConnection) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[405] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56934,42 +58912,47 @@ func (x *IsisLspExtendedIpv4ReachabilityTlv) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use IsisLspExtendedIpv4ReachabilityTlv.ProtoReflect.Descriptor instead. -func (*IsisLspExtendedIpv4ReachabilityTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use LldpConnection.ProtoReflect.Descriptor instead. +func (*LldpConnection) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{405} } -func (x *IsisLspExtendedIpv4ReachabilityTlv) GetPrefixes() []*IsisLspExtendedV4Prefix { - if x != nil { - return x.Prefixes +func (x *LldpConnection) GetChoice() LldpConnection_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return LldpConnection_Choice_unspecified } -// This group defines attributes of an IPv4 standard prefix. -type IsisLspExtendedV4Prefix struct { +func (x *LldpConnection) GetPortName() string { + if x != nil && x.PortName != nil { + return *x.PortName + } + return "" +} + +// The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint +// identifier associated with the transmitting LLDP agent. This field identifies the +// format and source of the chassis identifier string. It is based on the enumerator +// defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. +type LldpChassisId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // An IPv4 unicast prefix reachable via the originator of this LSP. - Ipv4Address *string `protobuf:"bytes,1,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` - // The length of the IPv4 prefix. - PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` - // ISIS wide metric. - Metric *uint32 `protobuf:"varint,3,opt,name=metric,proto3,oneof" json:"metric,omitempty"` - // Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, - // and for all other prefixes in L1 and L2 LSPs. (default) - // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. - // The prefixes are being advertised from a higher level (L2) down to a lower level - // (L1). - RedistributionType *IsisLspExtendedV4Prefix_RedistributionType_Enum `protobuf:"varint,4,opt,name=redistribution_type,json=redistributionType,proto3,enum=otg.IsisLspExtendedV4Prefix_RedistributionType_Enum,oneof" json:"redistribution_type,omitempty"` + // Chassis ID subtype to be used in Chassis ID TLV. + // default = Choice.Enum.mac_address_subtype + Choice *LldpChassisId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.LldpChassisId_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - PrefixAttributes *IsisLspPrefixAttributes `protobuf:"bytes,5,opt,name=prefix_attributes,json=prefixAttributes,proto3" json:"prefix_attributes,omitempty"` + MacAddressSubtype *LldpChassisMacSubType `protobuf:"bytes,2,opt,name=mac_address_subtype,json=macAddressSubtype,proto3" json:"mac_address_subtype,omitempty"` + // Name of an interface of the chassis that uniquely identifies the chassis. + InterfaceNameSubtype *string `protobuf:"bytes,3,opt,name=interface_name_subtype,json=interfaceNameSubtype,proto3,oneof" json:"interface_name_subtype,omitempty"` + // Locally assigned name of the chassis. + LocalSubtype *string `protobuf:"bytes,4,opt,name=local_subtype,json=localSubtype,proto3,oneof" json:"local_subtype,omitempty"` } -func (x *IsisLspExtendedV4Prefix) Reset() { - *x = IsisLspExtendedV4Prefix{} +func (x *LldpChassisId) Reset() { + *x = LldpChassisId{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[406] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56977,13 +58960,13 @@ func (x *IsisLspExtendedV4Prefix) Reset() { } } -func (x *IsisLspExtendedV4Prefix) String() string { +func (x *LldpChassisId) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspExtendedV4Prefix) ProtoMessage() {} +func (*LldpChassisId) ProtoMessage() {} -func (x *IsisLspExtendedV4Prefix) ProtoReflect() protoreflect.Message { +func (x *LldpChassisId) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[406] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56995,59 +58978,61 @@ func (x *IsisLspExtendedV4Prefix) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspExtendedV4Prefix.ProtoReflect.Descriptor instead. -func (*IsisLspExtendedV4Prefix) Descriptor() ([]byte, []int) { +// Deprecated: Use LldpChassisId.ProtoReflect.Descriptor instead. +func (*LldpChassisId) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{406} } -func (x *IsisLspExtendedV4Prefix) GetIpv4Address() string { - if x != nil && x.Ipv4Address != nil { - return *x.Ipv4Address - } - return "" -} - -func (x *IsisLspExtendedV4Prefix) GetPrefixLength() uint32 { - if x != nil && x.PrefixLength != nil { - return *x.PrefixLength +func (x *LldpChassisId) GetChoice() LldpChassisId_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return LldpChassisId_Choice_unspecified } -func (x *IsisLspExtendedV4Prefix) GetMetric() uint32 { - if x != nil && x.Metric != nil { - return *x.Metric +func (x *LldpChassisId) GetMacAddressSubtype() *LldpChassisMacSubType { + if x != nil { + return x.MacAddressSubtype } - return 0 + return nil } -func (x *IsisLspExtendedV4Prefix) GetRedistributionType() IsisLspExtendedV4Prefix_RedistributionType_Enum { - if x != nil && x.RedistributionType != nil { - return *x.RedistributionType +func (x *LldpChassisId) GetInterfaceNameSubtype() string { + if x != nil && x.InterfaceNameSubtype != nil { + return *x.InterfaceNameSubtype } - return IsisLspExtendedV4Prefix_RedistributionType_unspecified + return "" } -func (x *IsisLspExtendedV4Prefix) GetPrefixAttributes() *IsisLspPrefixAttributes { - if x != nil { - return x.PrefixAttributes +func (x *LldpChassisId) GetLocalSubtype() string { + if x != nil && x.LocalSubtype != nil { + return *x.LocalSubtype } - return nil + return "" } -// It defines list of IPv6 extended reachability information in one IPv6 Reachability -// TLV. -type IsisLspIpv6ReachabilityTlv struct { +// The Port ID is a mandatory TLV which identifies the port component of the endpoint +// identifier associated with the transmitting LLDP agent.This field identifies the +// format and source of the port identifier string. It is based on the enumerator defined +// by the PtopoPortIdType object from RFC2922. +type LldpPortId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // IPv6 prefix contained within reachability TLVs. - Prefixes []*IsisLspV6Prefix `protobuf:"bytes,1,rep,name=prefixes,proto3" json:"prefixes,omitempty"` + // Port ID subtype to be used in Port ID TLV. + // default = Choice.Enum.interface_name_subtype + Choice *LldpPortId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.LldpPortId_Choice_Enum,oneof" json:"choice,omitempty"` + // The MAC Address configured in the Port ID TLV. + MacAddressSubtype *string `protobuf:"bytes,2,opt,name=mac_address_subtype,json=macAddressSubtype,proto3,oneof" json:"mac_address_subtype,omitempty"` + // Description missing in models + InterfaceNameSubtype *LldpPortInterfaceNameSubType `protobuf:"bytes,3,opt,name=interface_name_subtype,json=interfaceNameSubtype,proto3" json:"interface_name_subtype,omitempty"` + // The Locally assigned name configured in the Port ID TLV. + LocalSubtype *string `protobuf:"bytes,4,opt,name=local_subtype,json=localSubtype,proto3,oneof" json:"local_subtype,omitempty"` } -func (x *IsisLspIpv6ReachabilityTlv) Reset() { - *x = IsisLspIpv6ReachabilityTlv{} +func (x *LldpPortId) Reset() { + *x = LldpPortId{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[407] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57055,13 +59040,13 @@ func (x *IsisLspIpv6ReachabilityTlv) Reset() { } } -func (x *IsisLspIpv6ReachabilityTlv) String() string { +func (x *LldpPortId) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspIpv6ReachabilityTlv) ProtoMessage() {} +func (*LldpPortId) ProtoMessage() {} -func (x *IsisLspIpv6ReachabilityTlv) ProtoReflect() protoreflect.Message { +func (x *LldpPortId) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[407] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57073,48 +59058,57 @@ func (x *IsisLspIpv6ReachabilityTlv) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspIpv6ReachabilityTlv.ProtoReflect.Descriptor instead. -func (*IsisLspIpv6ReachabilityTlv) Descriptor() ([]byte, []int) { +// Deprecated: Use LldpPortId.ProtoReflect.Descriptor instead. +func (*LldpPortId) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{407} } -func (x *IsisLspIpv6ReachabilityTlv) GetPrefixes() []*IsisLspV6Prefix { +func (x *LldpPortId) GetChoice() LldpPortId_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return LldpPortId_Choice_unspecified +} + +func (x *LldpPortId) GetMacAddressSubtype() string { + if x != nil && x.MacAddressSubtype != nil { + return *x.MacAddressSubtype + } + return "" +} + +func (x *LldpPortId) GetInterfaceNameSubtype() *LldpPortInterfaceNameSubType { if x != nil { - return x.Prefixes + return x.InterfaceNameSubtype } return nil } -// It defines attributes of an IPv6 standard prefix. -type IsisLspV6Prefix struct { +func (x *LldpPortId) GetLocalSubtype() string { + if x != nil && x.LocalSubtype != nil { + return *x.LocalSubtype + } + return "" +} + +// The MAC address configured in the Chassis ID TLV. +type LldpChassisMacSubType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // An IPv6 unicast prefix reachable via the originator of this LSP. - Ipv6Address *string `protobuf:"bytes,1,opt,name=ipv6_address,json=ipv6Address,proto3,oneof" json:"ipv6_address,omitempty"` - // The length of the IPv6 prefix. - PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` - // ISIS wide metric. - Metric *uint32 `protobuf:"varint,3,opt,name=metric,proto3,oneof" json:"metric,omitempty"` - // Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, - // and for all other prefixes in L1 and L2 LSPs. (default) - // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. - // The prefixes are being advertised from a higher level (L2) down to a lower level - // (L1). - RedistributionType *IsisLspV6Prefix_RedistributionType_Enum `protobuf:"varint,4,opt,name=redistribution_type,json=redistributionType,proto3,enum=otg.IsisLspV6Prefix_RedistributionType_Enum,oneof" json:"redistribution_type,omitempty"` - // The origin of the advertised route-internal or external to the ISIS area. Options - // include the following: - // Internal-for intra-area routes, through Level 1 LSPs. - // External-for inter-area routes redistributed within L1, through Level - // 1 LSPs. - OriginType *IsisLspV6Prefix_OriginType_Enum `protobuf:"varint,5,opt,name=origin_type,json=originType,proto3,enum=otg.IsisLspV6Prefix_OriginType_Enum,oneof" json:"origin_type,omitempty"` - // Description missing in models - PrefixAttributes *IsisLspPrefixAttributes `protobuf:"bytes,6,opt,name=prefix_attributes,json=prefixAttributes,proto3" json:"prefix_attributes,omitempty"` + // In auto mode the system generated value is set for this property, while if the choice + // is selected as value, a user configured value will be used for this property. + // default = Choice.Enum.auto + Choice *LldpChassisMacSubType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.LldpChassisMacSubType_Choice_Enum,oneof" json:"choice,omitempty"` + // The OTG implementation must provide a system generated value for this property. + Auto *string `protobuf:"bytes,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` + // User must specify a value if mode is not auto. + Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *IsisLspV6Prefix) Reset() { - *x = IsisLspV6Prefix{} +func (x *LldpChassisMacSubType) Reset() { + *x = LldpChassisMacSubType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[408] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57122,13 +59116,13 @@ func (x *IsisLspV6Prefix) Reset() { } } -func (x *IsisLspV6Prefix) String() string { +func (x *LldpChassisMacSubType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspV6Prefix) ProtoMessage() {} +func (*LldpChassisMacSubType) ProtoMessage() {} -func (x *IsisLspV6Prefix) ProtoReflect() protoreflect.Message { +func (x *LldpChassisMacSubType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[408] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57140,70 +59134,50 @@ func (x *IsisLspV6Prefix) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspV6Prefix.ProtoReflect.Descriptor instead. -func (*IsisLspV6Prefix) Descriptor() ([]byte, []int) { +// Deprecated: Use LldpChassisMacSubType.ProtoReflect.Descriptor instead. +func (*LldpChassisMacSubType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{408} } -func (x *IsisLspV6Prefix) GetIpv6Address() string { - if x != nil && x.Ipv6Address != nil { - return *x.Ipv6Address - } - return "" -} - -func (x *IsisLspV6Prefix) GetPrefixLength() uint32 { - if x != nil && x.PrefixLength != nil { - return *x.PrefixLength - } - return 0 -} - -func (x *IsisLspV6Prefix) GetMetric() uint32 { - if x != nil && x.Metric != nil { - return *x.Metric - } - return 0 -} - -func (x *IsisLspV6Prefix) GetRedistributionType() IsisLspV6Prefix_RedistributionType_Enum { - if x != nil && x.RedistributionType != nil { - return *x.RedistributionType +func (x *LldpChassisMacSubType) GetChoice() LldpChassisMacSubType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return IsisLspV6Prefix_RedistributionType_unspecified + return LldpChassisMacSubType_Choice_unspecified } -func (x *IsisLspV6Prefix) GetOriginType() IsisLspV6Prefix_OriginType_Enum { - if x != nil && x.OriginType != nil { - return *x.OriginType +func (x *LldpChassisMacSubType) GetAuto() string { + if x != nil && x.Auto != nil { + return *x.Auto } - return IsisLspV6Prefix_OriginType_unspecified + return "" } -func (x *IsisLspV6Prefix) GetPrefixAttributes() *IsisLspPrefixAttributes { - if x != nil { - return x.PrefixAttributes +func (x *LldpChassisMacSubType) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } - return nil + return "" } -// This contains the properties of ISIS Prefix attributes for the extended IPv4 and -// IPv6 reachability. https://www.rfc-editor.org/rfc/rfc7794.html -type IsisLspPrefixAttributes struct { +// The interface name configured in the Port ID TLV. +type LldpPortInterfaceNameSubType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // External Prefix Flag (Bit 0) - XFlag *bool `protobuf:"varint,1,opt,name=x_flag,json=xFlag,proto3,oneof" json:"x_flag,omitempty"` - // Re-advertisement Flag (Bit 1) - RFlag *bool `protobuf:"varint,2,opt,name=r_flag,json=rFlag,proto3,oneof" json:"r_flag,omitempty"` - // Node Flag (Bit 2) - NFlag *bool `protobuf:"varint,3,opt,name=n_flag,json=nFlag,proto3,oneof" json:"n_flag,omitempty"` + // In auto mode the system generated value is set for this property, while if the choice + // is selected as value, a user configured value will be used for this property. + // default = Choice.Enum.auto + Choice *LldpPortInterfaceNameSubType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.LldpPortInterfaceNameSubType_Choice_Enum,oneof" json:"choice,omitempty"` + // The OTG implementation must provide a system generated value for this property. + Auto *string `protobuf:"bytes,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` + // User must specify a value if mode is not auto. + Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *IsisLspPrefixAttributes) Reset() { - *x = IsisLspPrefixAttributes{} +func (x *LldpPortInterfaceNameSubType) Reset() { + *x = LldpPortInterfaceNameSubType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[409] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57211,13 +59185,13 @@ func (x *IsisLspPrefixAttributes) Reset() { } } -func (x *IsisLspPrefixAttributes) String() string { +func (x *LldpPortInterfaceNameSubType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspPrefixAttributes) ProtoMessage() {} +func (*LldpPortInterfaceNameSubType) ProtoMessage() {} -func (x *IsisLspPrefixAttributes) ProtoReflect() protoreflect.Message { +func (x *LldpPortInterfaceNameSubType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[409] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57229,55 +59203,50 @@ func (x *IsisLspPrefixAttributes) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspPrefixAttributes.ProtoReflect.Descriptor instead. -func (*IsisLspPrefixAttributes) Descriptor() ([]byte, []int) { +// Deprecated: Use LldpPortInterfaceNameSubType.ProtoReflect.Descriptor instead. +func (*LldpPortInterfaceNameSubType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{409} } -func (x *IsisLspPrefixAttributes) GetXFlag() bool { - if x != nil && x.XFlag != nil { - return *x.XFlag +func (x *LldpPortInterfaceNameSubType) GetChoice() LldpPortInterfaceNameSubType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return false + return LldpPortInterfaceNameSubType_Choice_unspecified } -func (x *IsisLspPrefixAttributes) GetRFlag() bool { - if x != nil && x.RFlag != nil { - return *x.RFlag +func (x *LldpPortInterfaceNameSubType) GetAuto() string { + if x != nil && x.Auto != nil { + return *x.Auto } - return false + return "" } -func (x *IsisLspPrefixAttributes) GetNFlag() bool { - if x != nil && x.NFlag != nil { - return *x.NFlag +func (x *LldpPortInterfaceNameSubType) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } - return false + return "" } -// The request to retrieve LLDP neighbor information for a given instance. -type LldpNeighborsStateRequest struct { +// The system Name configured in the System Name TLV. +type LldpSystemName struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of LLDP instances for which neighbor information will be retrieved. If - // no names are specified then the results will contain neighbor information for all - // configured LLDP instances. - // - // x-constraint: - // - /components/schemas/Lldp/properties/name - // - // x-constraint: - // - /components/schemas/Lldp/properties/name - LldpNames []string `protobuf:"bytes,1,rep,name=lldp_names,json=lldpNames,proto3" json:"lldp_names,omitempty"` - // Specify the neighbors for which information will be returned. If empty or missing - // then information for all neighbors will be returned. - NeighborIdFilters []string `protobuf:"bytes,2,rep,name=neighbor_id_filters,json=neighborIdFilters,proto3" json:"neighbor_id_filters,omitempty"` + // In auto mode the system generated value is set for this property, while if the choice + // is selected as value, a user configured value will be used for this property. + // default = Choice.Enum.auto + Choice *LldpSystemName_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.LldpSystemName_Choice_Enum,oneof" json:"choice,omitempty"` + // The OTG implementation must provide a system generated value for this property. + Auto *string `protobuf:"bytes,2,opt,name=auto,proto3,oneof" json:"auto,omitempty"` + // User must specify a value if mode is not auto. + Value *string `protobuf:"bytes,3,opt,name=value,proto3,oneof" json:"value,omitempty"` } -func (x *LldpNeighborsStateRequest) Reset() { - *x = LldpNeighborsStateRequest{} +func (x *LldpSystemName) Reset() { + *x = LldpSystemName{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[410] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57285,13 +59254,13 @@ func (x *LldpNeighborsStateRequest) Reset() { } } -func (x *LldpNeighborsStateRequest) String() string { +func (x *LldpSystemName) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpNeighborsStateRequest) ProtoMessage() {} +func (*LldpSystemName) ProtoMessage() {} -func (x *LldpNeighborsStateRequest) ProtoReflect() protoreflect.Message { +func (x *LldpSystemName) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[410] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57303,86 +59272,58 @@ func (x *LldpNeighborsStateRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpNeighborsStateRequest.ProtoReflect.Descriptor instead. -func (*LldpNeighborsStateRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use LldpSystemName.ProtoReflect.Descriptor instead. +func (*LldpSystemName) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{410} } -func (x *LldpNeighborsStateRequest) GetLldpNames() []string { - if x != nil { - return x.LldpNames +func (x *LldpSystemName) GetChoice() LldpSystemName_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return LldpSystemName_Choice_unspecified } -func (x *LldpNeighborsStateRequest) GetNeighborIdFilters() []string { - if x != nil { - return x.NeighborIdFilters +func (x *LldpSystemName) GetAuto() string { + if x != nil && x.Auto != nil { + return *x.Auto } - return nil + return "" } -// LLDP neighbor information. -type LldpNeighborsState struct { +func (x *LldpSystemName) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value + } + return "" +} + +// The organization specific information configured in the Organization Specific TLV. +type LldpOrgInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the LLDP instance. - LldpName *string `protobuf:"bytes,1,opt,name=lldp_name,json=lldpName,proto3,oneof" json:"lldp_name,omitempty"` - // The system name field shall contain an alpha-numeric string that indicates the system's - // administratively assigned name. The system name should be the system's fully qualified - // domain name. If implementations support IETF RFC 3418, the sysName object should - // be used for this field. - SystemName *string `protobuf:"bytes,2,opt,name=system_name,json=systemName,proto3,oneof" json:"system_name,omitempty"` - // The system description field shall contain an alpha-numeric string that is the textual - // description of the network entity. The system description should include the full - // name and version identification of the system's hardware type, software operating - // system, and networking software. If implementations support IETF RFC 3418, the sysDescr - // object should be used for this field. - SystemDescription *string `protobuf:"bytes,3,opt,name=system_description,json=systemDescription,proto3,oneof" json:"system_description,omitempty"` - // The Chassis ID is a mandatory TLV which identifies the chassis component of the - // endpoint identifier associated with the transmitting LLDP agent. - ChassisId *string `protobuf:"bytes,4,opt,name=chassis_id,json=chassisId,proto3,oneof" json:"chassis_id,omitempty"` - // This field identifies the format and source of the chassis identifier string. It - // is an enumerator defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. - ChassisIdType *LldpNeighborsState_ChassisIdType_Enum `protobuf:"varint,5,opt,name=chassis_id_type,json=chassisIdType,proto3,enum=otg.LldpNeighborsState_ChassisIdType_Enum,oneof" json:"chassis_id_type,omitempty"` - // System generated identifier for the neighbor on the LLDP instance. - NeighborId *string `protobuf:"bytes,6,opt,name=neighbor_id,json=neighborId,proto3,oneof" json:"neighbor_id,omitempty"` - // Age since discovery in seconds. - Age *uint32 `protobuf:"varint,7,opt,name=age,proto3,oneof" json:"age,omitempty"` - // Seconds since last update received. - LastUpdate *uint32 `protobuf:"varint,8,opt,name=last_update,json=lastUpdate,proto3,oneof" json:"last_update,omitempty"` - // The time-to-live (TTL) in seconds is a mandatory TLV which indicates how long information - // from the neighbor should be considered valid. - Ttl *uint32 `protobuf:"varint,9,opt,name=ttl,proto3,oneof" json:"ttl,omitempty"` - // The Port ID is a mandatory TLV which identifies the port component of the endpoint - // identifier associated with the transmitting LLDP agent. If the specified port is - // an IEEE 802.3 Repeater port, then this TLV is optional. - PortId *string `protobuf:"bytes,10,opt,name=port_id,json=portId,proto3,oneof" json:"port_id,omitempty"` - // This field identifies the format and source of the port identifier string. It is - // an enumerator defined by the PtopoPortIdType object from RFC2922. - PortIdType *LldpNeighborsState_PortIdType_Enum `protobuf:"varint,11,opt,name=port_id_type,json=portIdType,proto3,enum=otg.LldpNeighborsState_PortIdType_Enum,oneof" json:"port_id_type,omitempty"` - // The binary string containing the actual port identifier for the port which this LLDP - // PDU was transmitted. The source and format of this field is defined by PtopoPortId - // from RFC2922. - PortDescription *string `protobuf:"bytes,12,opt,name=port_description,json=portDescription,proto3,oneof" json:"port_description,omitempty"` - // The Management Address is a mandatory TLV which identifies a network address associated - // with the local LLDP agent, which can be used to reach the agent on the port identified - // in the Port ID TLV. - ManagementAddress *string `protobuf:"bytes,13,opt,name=management_address,json=managementAddress,proto3,oneof" json:"management_address,omitempty"` - // The enumerated value for the network address type identified in this TLV. This enumeration - // is defined in the 'Assigned Numbers' RFC [RFC3232] and the ianaAddressFamilyNumbers - // object. - ManagementAddressType *string `protobuf:"bytes,14,opt,name=management_address_type,json=managementAddressType,proto3,oneof" json:"management_address_type,omitempty"` - // Description missing in models - CustomTlvs []*LldpCustomTLVState `protobuf:"bytes,15,rep,name=custom_tlvs,json=customTlvs,proto3" json:"custom_tlvs,omitempty"` - // Description missing in models - Capabilities []*LldpCapabilityState `protobuf:"bytes,16,rep,name=capabilities,proto3" json:"capabilities,omitempty"` + // The organizationally unique identifier field shall contain the organization's OUI + // as defined in Clause 9 of IEEE Std 802. It is a 24 bit number that uniquely identifies + // a vendor, manufacturer, or other organizations. + // default = 0080C2 + Oui *string `protobuf:"bytes,1,opt,name=oui,proto3,oneof" json:"oui,omitempty"` + // The organizationally defined subtype field shall contain a unique subtype value assigned + // by the defining organization. + // default = 1 + Subtype *uint32 `protobuf:"varint,2,opt,name=subtype,proto3,oneof" json:"subtype,omitempty"` + // Contains the organizationally defined information. The actual format of the organizationally + // defined information string field is organizationally specific and can contain either + // binary or alpha-numeric information that is instance specific for the particular + // TLV type and subtype. Alpha-numeric information are encoded in UTF-8 (as specified + // in IETF RFC 3629). Or include one or more information fields with their associated + // field-type identifiers, designators similar to those in the Management Address TLV. + Information *LldpOrgInfoType `protobuf:"bytes,3,opt,name=information,proto3" json:"information,omitempty"` } -func (x *LldpNeighborsState) Reset() { - *x = LldpNeighborsState{} +func (x *LldpOrgInfo) Reset() { + *x = LldpOrgInfo{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[411] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57390,13 +59331,13 @@ func (x *LldpNeighborsState) Reset() { } } -func (x *LldpNeighborsState) String() string { +func (x *LldpOrgInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpNeighborsState) ProtoMessage() {} +func (*LldpOrgInfo) ProtoMessage() {} -func (x *LldpNeighborsState) ProtoReflect() protoreflect.Message { +func (x *LldpOrgInfo) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[411] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57408,144 +59349,56 @@ func (x *LldpNeighborsState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpNeighborsState.ProtoReflect.Descriptor instead. -func (*LldpNeighborsState) Descriptor() ([]byte, []int) { +// Deprecated: Use LldpOrgInfo.ProtoReflect.Descriptor instead. +func (*LldpOrgInfo) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{411} } -func (x *LldpNeighborsState) GetLldpName() string { - if x != nil && x.LldpName != nil { - return *x.LldpName - } - return "" -} - -func (x *LldpNeighborsState) GetSystemName() string { - if x != nil && x.SystemName != nil { - return *x.SystemName - } - return "" -} - -func (x *LldpNeighborsState) GetSystemDescription() string { - if x != nil && x.SystemDescription != nil { - return *x.SystemDescription - } - return "" -} - -func (x *LldpNeighborsState) GetChassisId() string { - if x != nil && x.ChassisId != nil { - return *x.ChassisId - } - return "" -} - -func (x *LldpNeighborsState) GetChassisIdType() LldpNeighborsState_ChassisIdType_Enum { - if x != nil && x.ChassisIdType != nil { - return *x.ChassisIdType - } - return LldpNeighborsState_ChassisIdType_unspecified -} - -func (x *LldpNeighborsState) GetNeighborId() string { - if x != nil && x.NeighborId != nil { - return *x.NeighborId +func (x *LldpOrgInfo) GetOui() string { + if x != nil && x.Oui != nil { + return *x.Oui } return "" } -func (x *LldpNeighborsState) GetAge() uint32 { - if x != nil && x.Age != nil { - return *x.Age - } - return 0 -} - -func (x *LldpNeighborsState) GetLastUpdate() uint32 { - if x != nil && x.LastUpdate != nil { - return *x.LastUpdate - } - return 0 -} - -func (x *LldpNeighborsState) GetTtl() uint32 { - if x != nil && x.Ttl != nil { - return *x.Ttl +func (x *LldpOrgInfo) GetSubtype() uint32 { + if x != nil && x.Subtype != nil { + return *x.Subtype } return 0 } -func (x *LldpNeighborsState) GetPortId() string { - if x != nil && x.PortId != nil { - return *x.PortId - } - return "" -} - -func (x *LldpNeighborsState) GetPortIdType() LldpNeighborsState_PortIdType_Enum { - if x != nil && x.PortIdType != nil { - return *x.PortIdType - } - return LldpNeighborsState_PortIdType_unspecified -} - -func (x *LldpNeighborsState) GetPortDescription() string { - if x != nil && x.PortDescription != nil { - return *x.PortDescription - } - return "" -} - -func (x *LldpNeighborsState) GetManagementAddress() string { - if x != nil && x.ManagementAddress != nil { - return *x.ManagementAddress - } - return "" -} - -func (x *LldpNeighborsState) GetManagementAddressType() string { - if x != nil && x.ManagementAddressType != nil { - return *x.ManagementAddressType - } - return "" -} - -func (x *LldpNeighborsState) GetCustomTlvs() []*LldpCustomTLVState { - if x != nil { - return x.CustomTlvs - } - return nil -} - -func (x *LldpNeighborsState) GetCapabilities() []*LldpCapabilityState { +func (x *LldpOrgInfo) GetInformation() *LldpOrgInfoType { if x != nil { - return x.Capabilities + return x.Information } return nil } -// Custom TLV received from a neighbor.Custom TLVs are organization specific TLVs advertised -// with TLV type 127. -type LldpCustomTLVState struct { +// Contains either the Alpha-numeric information encoded in UTF-8 (as specified in IETF +// RFC 3629) or include one or more information fields with their associated field-type +// identifiers designators, similar to those in the Management Address TLV. Currently +// only one choice as info is given in future if required it can be extended to define +// sub tlvs. +type LldpOrgInfoType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The integer value identifying the type of information contained in the value field. - CustomType *uint32 `protobuf:"varint,1,opt,name=custom_type,json=customType,proto3,oneof" json:"custom_type,omitempty"` - // The organizationally unique identifier field shall contain the organization's OUI - // as defined in Clause 9 of IEEE Std 802. The high-order octet is 0 and the low-order - // 3 octets are the SMI Network Management Private Enterprise Code of the Vendor in - // network byte order, as defined in the 'Assigned Numbers' RFC [RFC3232]. - Oui *string `protobuf:"bytes,2,opt,name=oui,proto3,oneof" json:"oui,omitempty"` - // The organizationally defined subtype field shall contain a unique subtype value assigned - // by the defining organization. - OuiSubtype *string `protobuf:"bytes,3,opt,name=oui_subtype,json=ouiSubtype,proto3,oneof" json:"oui_subtype,omitempty"` + // In info mode the organizationally defined information contain either binary or alpha-numeric + // information encoded in UTF-8 (as specified in IETF RFC 3629). + // default = Choice.Enum.info + Choice *LldpOrgInfoType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.LldpOrgInfoType_Choice_Enum,oneof" json:"choice,omitempty"` + // The organizationally defined information encoded in UTF-8 (as specified in IETF RFC + // 3629). This byte stream can be of any length from 1 to 507 bytes. In the info byte + // stream, one byte is represented as string of 2 characters, for example 2 character + // string (0x)AB represents value of a single byte. So the maximum length of this attribute + // is 1014 (507 * 2 hex characters per byte). + Info *string `protobuf:"bytes,2,opt,name=info,proto3,oneof" json:"info,omitempty"` } -func (x *LldpCustomTLVState) Reset() { - *x = LldpCustomTLVState{} +func (x *LldpOrgInfoType) Reset() { + *x = LldpOrgInfoType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[412] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57553,13 +59406,13 @@ func (x *LldpCustomTLVState) Reset() { } } -func (x *LldpCustomTLVState) String() string { +func (x *LldpOrgInfoType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpCustomTLVState) ProtoMessage() {} +func (*LldpOrgInfoType) ProtoMessage() {} -func (x *LldpCustomTLVState) ProtoReflect() protoreflect.Message { +func (x *LldpOrgInfoType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[412] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57571,48 +59424,49 @@ func (x *LldpCustomTLVState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpCustomTLVState.ProtoReflect.Descriptor instead. -func (*LldpCustomTLVState) Descriptor() ([]byte, []int) { +// Deprecated: Use LldpOrgInfoType.ProtoReflect.Descriptor instead. +func (*LldpOrgInfoType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{412} } -func (x *LldpCustomTLVState) GetCustomType() uint32 { - if x != nil && x.CustomType != nil { - return *x.CustomType - } - return 0 -} - -func (x *LldpCustomTLVState) GetOui() string { - if x != nil && x.Oui != nil { - return *x.Oui +func (x *LldpOrgInfoType) GetChoice() LldpOrgInfoType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return LldpOrgInfoType_Choice_unspecified } -func (x *LldpCustomTLVState) GetOuiSubtype() string { - if x != nil && x.OuiSubtype != nil { - return *x.OuiSubtype +func (x *LldpOrgInfoType) GetInfo() string { + if x != nil && x.Info != nil { + return *x.Info } return "" } -// LLDP system capability advertised by the neighbor -type LldpCapabilityState struct { +// Error response generated while serving API request. +type Error struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name of the system capability advertised by the neighbor. Capabilities are represented - // in a bitmap that defines the primary functions of the system. The capabilities are - // defined in IEEE 802.1AB. - CapabilityName *LldpCapabilityState_CapabilityName_Enum `protobuf:"varint,1,opt,name=capability_name,json=capabilityName,proto3,enum=otg.LldpCapabilityState_CapabilityName_Enum,oneof" json:"capability_name,omitempty"` - // Indicates whether the corresponding system capability is enabled on the neighbor. - CapabilityEnabled *bool `protobuf:"varint,2,opt,name=capability_enabled,json=capabilityEnabled,proto3,oneof" json:"capability_enabled,omitempty"` + // Numeric status code based on the underlying transport being used. + // The API server MUST set this code explicitly based on following references: + // - HTTP 4xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.5 + // - HTTP 5xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.6 + // - gRPC errors: https://grpc.github.io/grpc/core/md_doc_statuscodes.html + // required = true + Code *int32 `protobuf:"varint,1,opt,name=code,proto3,oneof" json:"code,omitempty"` + // Classification of error originating from within API server that may not be mapped + // to the value in `code`. + // Absence of this field may indicate that the error did not originate from within API + // server. + Kind *Error_Kind_Enum `protobuf:"varint,2,opt,name=kind,proto3,enum=otg.Error_Kind_Enum,oneof" json:"kind,omitempty"` + // List of error messages generated while executing the request. + Errors []string `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"` } -func (x *LldpCapabilityState) Reset() { - *x = LldpCapabilityState{} +func (x *Error) Reset() { + *x = Error{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[413] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57620,13 +59474,13 @@ func (x *LldpCapabilityState) Reset() { } } -func (x *LldpCapabilityState) String() string { +func (x *Error) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpCapabilityState) ProtoMessage() {} +func (*Error) ProtoMessage() {} -func (x *LldpCapabilityState) ProtoReflect() protoreflect.Message { +func (x *Error) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[413] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57638,45 +59492,45 @@ func (x *LldpCapabilityState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpCapabilityState.ProtoReflect.Descriptor instead. -func (*LldpCapabilityState) Descriptor() ([]byte, []int) { +// Deprecated: Use Error.ProtoReflect.Descriptor instead. +func (*Error) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{413} } -func (x *LldpCapabilityState) GetCapabilityName() LldpCapabilityState_CapabilityName_Enum { - if x != nil && x.CapabilityName != nil { - return *x.CapabilityName +func (x *Error) GetCode() int32 { + if x != nil && x.Code != nil { + return *x.Code } - return LldpCapabilityState_CapabilityName_unspecified + return 0 } -func (x *LldpCapabilityState) GetCapabilityEnabled() bool { - if x != nil && x.CapabilityEnabled != nil { - return *x.CapabilityEnabled +func (x *Error) GetKind() Error_Kind_Enum { + if x != nil && x.Kind != nil { + return *x.Kind } - return false + return Error_Kind_unspecified } -// The request to retrieve RSVP Label Switched Path (LSP) information learned by the -// router. -type RsvpLspsStateRequest struct { +func (x *Error) GetErrors() []string { + if x != nil { + return x.Errors + } + return nil +} + +// A list of warnings that have occurred while executing the request. +type Warning struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The names of RSVP-TE routers for which learned information is requested. An empty - // list will return results for all RSVP=TE routers. - // - // x-constraint: - // - /components/schemas/Device.Rsvp/properties/name - // - // x-constraint: - // - /components/schemas/Device.Rsvp/properties/name - RsvpRouterNames []string `protobuf:"bytes,1,rep,name=rsvp_router_names,json=rsvpRouterNames,proto3" json:"rsvp_router_names,omitempty"` + // A list of any system specific warnings that have occurred while + // executing the request. + Warnings []string `protobuf:"bytes,1,rep,name=warnings,proto3" json:"warnings,omitempty"` } -func (x *RsvpLspsStateRequest) Reset() { - *x = RsvpLspsStateRequest{} +func (x *Warning) Reset() { + *x = Warning{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[414] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57684,13 +59538,13 @@ func (x *RsvpLspsStateRequest) Reset() { } } -func (x *RsvpLspsStateRequest) String() string { +func (x *Warning) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpLspsStateRequest) ProtoMessage() {} +func (*Warning) ProtoMessage() {} -func (x *RsvpLspsStateRequest) ProtoReflect() protoreflect.Message { +func (x *Warning) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[414] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57702,32 +59556,32 @@ func (x *RsvpLspsStateRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpLspsStateRequest.ProtoReflect.Descriptor instead. -func (*RsvpLspsStateRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use Warning.ProtoReflect.Descriptor instead. +func (*Warning) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{414} } -func (x *RsvpLspsStateRequest) GetRsvpRouterNames() []string { +func (x *Warning) GetWarnings() []string { if x != nil { - return x.RsvpRouterNames + return x.Warnings } return nil } -// Discovered IPv4 Point-to-Point LSPs of a RSVP-TE router. -type RsvpLspsState struct { +// Request for updating specific attributes of resources in traffic generator +type ConfigUpdate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of the RSVP-TE Router. - RsvpRouterName *string `protobuf:"bytes,1,opt,name=rsvp_router_name,json=rsvpRouterName,proto3,oneof" json:"rsvp_router_name,omitempty"` - // IPv4 Point-to-Point RSVP-TE Discovered LSPs. - Ipv4Lsps []*RsvpIPv4LspState `protobuf:"bytes,2,rep,name=ipv4_lsps,json=ipv4Lsps,proto3" json:"ipv4_lsps,omitempty"` + // Description missing in models + Choice *ConfigUpdate_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ConfigUpdate_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Flows *FlowsUpdate `protobuf:"bytes,2,opt,name=flows,proto3" json:"flows,omitempty"` } -func (x *RsvpLspsState) Reset() { - *x = RsvpLspsState{} +func (x *ConfigUpdate) Reset() { + *x = ConfigUpdate{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[415] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57735,13 +59589,13 @@ func (x *RsvpLspsState) Reset() { } } -func (x *RsvpLspsState) String() string { +func (x *ConfigUpdate) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpLspsState) ProtoMessage() {} +func (*ConfigUpdate) ProtoMessage() {} -func (x *RsvpLspsState) ProtoReflect() protoreflect.Message { +func (x *ConfigUpdate) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[415] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57753,45 +59607,40 @@ func (x *RsvpLspsState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpLspsState.ProtoReflect.Descriptor instead. -func (*RsvpLspsState) Descriptor() ([]byte, []int) { +// Deprecated: Use ConfigUpdate.ProtoReflect.Descriptor instead. +func (*ConfigUpdate) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{415} } -func (x *RsvpLspsState) GetRsvpRouterName() string { - if x != nil && x.RsvpRouterName != nil { - return *x.RsvpRouterName +func (x *ConfigUpdate) GetChoice() ConfigUpdate_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return ConfigUpdate_Choice_unspecified } -func (x *RsvpLspsState) GetIpv4Lsps() []*RsvpIPv4LspState { +func (x *ConfigUpdate) GetFlows() *FlowsUpdate { if x != nil { - return x.Ipv4Lsps + return x.Flows } return nil } -// IPv4 RSVP-TE Discovered LSPs. -type RsvpIPv4LspState struct { +// A container of flows with associated properties to be updated without affecting the +// flows current transmit state. +type FlowsUpdate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The origin IPv4 address of RSVP session. - SourceAddress *string `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3,oneof" json:"source_address,omitempty"` - // The IPv4 destination address of RSVP session. - DestinationAddress *string `protobuf:"bytes,2,opt,name=destination_address,json=destinationAddress,proto3,oneof" json:"destination_address,omitempty"` - // It refers to the RSVP LSP properties. - Lsp *RsvpLspState `protobuf:"bytes,3,opt,name=lsp,proto3" json:"lsp,omitempty"` - // It refers to RSVP RRO objects container. - Rros []*RsvpLspIpv4Rro `protobuf:"bytes,4,rep,name=rros,proto3" json:"rros,omitempty"` - // It refers to RSVP ERO objects container. - Eros []*RsvpLspIpv4Ero `protobuf:"bytes,5,rep,name=eros,proto3" json:"eros,omitempty"` + // Flow properties to be updated without affecting the transmit state. + PropertyNames []FlowsUpdate_PropertyNames_Enum `protobuf:"varint,1,rep,packed,name=property_names,json=propertyNames,proto3,enum=otg.FlowsUpdate_PropertyNames_Enum" json:"property_names,omitempty"` + // The list of configured flows for which given property will be updated. + Flows []*Flow `protobuf:"bytes,2,rep,name=flows,proto3" json:"flows,omitempty"` } -func (x *RsvpIPv4LspState) Reset() { - *x = RsvpIPv4LspState{} +func (x *FlowsUpdate) Reset() { + *x = FlowsUpdate{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[416] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57799,13 +59648,13 @@ func (x *RsvpIPv4LspState) Reset() { } } -func (x *RsvpIPv4LspState) String() string { +func (x *FlowsUpdate) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpIPv4LspState) ProtoMessage() {} +func (*FlowsUpdate) ProtoMessage() {} -func (x *RsvpIPv4LspState) ProtoReflect() protoreflect.Message { +func (x *FlowsUpdate) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[416] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57817,75 +59666,44 @@ func (x *RsvpIPv4LspState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpIPv4LspState.ProtoReflect.Descriptor instead. -func (*RsvpIPv4LspState) Descriptor() ([]byte, []int) { +// Deprecated: Use FlowsUpdate.ProtoReflect.Descriptor instead. +func (*FlowsUpdate) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{416} } -func (x *RsvpIPv4LspState) GetSourceAddress() string { - if x != nil && x.SourceAddress != nil { - return *x.SourceAddress - } - return "" -} - -func (x *RsvpIPv4LspState) GetDestinationAddress() string { - if x != nil && x.DestinationAddress != nil { - return *x.DestinationAddress - } - return "" -} - -func (x *RsvpIPv4LspState) GetLsp() *RsvpLspState { - if x != nil { - return x.Lsp - } - return nil -} - -func (x *RsvpIPv4LspState) GetRros() []*RsvpLspIpv4Rro { +func (x *FlowsUpdate) GetPropertyNames() []FlowsUpdate_PropertyNames_Enum { if x != nil { - return x.Rros + return x.PropertyNames } return nil } -func (x *RsvpIPv4LspState) GetEros() []*RsvpLspIpv4Ero { +func (x *FlowsUpdate) GetFlows() []*Flow { if x != nil { - return x.Eros + return x.Flows } return nil } -// IPv4 RSVP-TE Discovered LSPs. -type RsvpLspState struct { +// Request for setting operational state of configured resources. +type ControlState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The tunnel id of RSVP session which acts as an identifier that remains constant over - // the life of the tunnel. - TunnelId *uint32 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3,oneof" json:"tunnel_id,omitempty"` - // The lsp-id of RSVP session which acts as a differentiator for two lsps originating - // from the same headend, commonly used to distinguish RSVP sessions during make before - // break operations. - LspId *uint32 `protobuf:"varint,2,opt,name=lsp_id,json=lspId,proto3,oneof" json:"lsp_id,omitempty"` - // The value of RSVP-TE Session Name field of the Session Attribute object. - SessionName *string `protobuf:"bytes,3,opt,name=session_name,json=sessionName,proto3,oneof" json:"session_name,omitempty"` - // The label received by RSVP-TE ingress. - LabelIn *uint32 `protobuf:"varint,4,opt,name=label_in,json=labelIn,proto3,oneof" json:"label_in,omitempty"` - // The label assigned by RSVP-TE egress. - LabelOut *uint32 `protobuf:"varint,5,opt,name=label_out,json=labelOut,proto3,oneof" json:"label_out,omitempty"` - // Operational state of the RSVP LSP. - SessionStatus *RsvpLspState_SessionStatus_Enum `protobuf:"varint,6,opt,name=session_status,json=sessionStatus,proto3,enum=otg.RsvpLspState_SessionStatus_Enum,oneof" json:"session_status,omitempty"` - // The reason for the last flap of this RSVP session. - LastFlapReason *RsvpLspState_LastFlapReason_Enum `protobuf:"varint,7,opt,name=last_flap_reason,json=lastFlapReason,proto3,enum=otg.RsvpLspState_LastFlapReason_Enum,oneof" json:"last_flap_reason,omitempty"` - // The tunnel UP time in milli seconds. If the tunnel is DOWN the UP time will be zero. - UpTime *uint64 `protobuf:"varint,8,opt,name=up_time,json=upTime,proto3,oneof" json:"up_time,omitempty"` + // Description missing in models + // required = true + Choice *ControlState_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ControlState_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Port *StatePort `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` + // Description missing in models + Protocol *StateProtocol `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"` + // Description missing in models + Traffic *StateTraffic `protobuf:"bytes,4,opt,name=traffic,proto3" json:"traffic,omitempty"` } -func (x *RsvpLspState) Reset() { - *x = RsvpLspState{} +func (x *ControlState) Reset() { + *x = ControlState{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[417] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57893,13 +59711,13 @@ func (x *RsvpLspState) Reset() { } } -func (x *RsvpLspState) String() string { +func (x *ControlState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpLspState) ProtoMessage() {} +func (*ControlState) ProtoMessage() {} -func (x *RsvpLspState) ProtoReflect() protoreflect.Message { +func (x *ControlState) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[417] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57911,89 +59729,56 @@ func (x *RsvpLspState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpLspState.ProtoReflect.Descriptor instead. -func (*RsvpLspState) Descriptor() ([]byte, []int) { +// Deprecated: Use ControlState.ProtoReflect.Descriptor instead. +func (*ControlState) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{417} } -func (x *RsvpLspState) GetTunnelId() uint32 { - if x != nil && x.TunnelId != nil { - return *x.TunnelId - } - return 0 -} - -func (x *RsvpLspState) GetLspId() uint32 { - if x != nil && x.LspId != nil { - return *x.LspId - } - return 0 -} - -func (x *RsvpLspState) GetSessionName() string { - if x != nil && x.SessionName != nil { - return *x.SessionName - } - return "" -} - -func (x *RsvpLspState) GetLabelIn() uint32 { - if x != nil && x.LabelIn != nil { - return *x.LabelIn - } - return 0 -} - -func (x *RsvpLspState) GetLabelOut() uint32 { - if x != nil && x.LabelOut != nil { - return *x.LabelOut +func (x *ControlState) GetChoice() ControlState_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return ControlState_Choice_unspecified } -func (x *RsvpLspState) GetSessionStatus() RsvpLspState_SessionStatus_Enum { - if x != nil && x.SessionStatus != nil { - return *x.SessionStatus +func (x *ControlState) GetPort() *StatePort { + if x != nil { + return x.Port } - return RsvpLspState_SessionStatus_unspecified + return nil } -func (x *RsvpLspState) GetLastFlapReason() RsvpLspState_LastFlapReason_Enum { - if x != nil && x.LastFlapReason != nil { - return *x.LastFlapReason +func (x *ControlState) GetProtocol() *StateProtocol { + if x != nil { + return x.Protocol } - return RsvpLspState_LastFlapReason_unspecified + return nil } -func (x *RsvpLspState) GetUpTime() uint64 { - if x != nil && x.UpTime != nil { - return *x.UpTime +func (x *ControlState) GetTraffic() *StateTraffic { + if x != nil { + return x.Traffic } - return 0 + return nil } -// This contains the list of Record Route Object(RRO) objects associated with the traffic -// engineering tunnel. The Record Route Object(RRO) is used in RSVP-TE to record the -// route traversed by the LSP. The RRO might be present in both Path message and Resv -// message, the RRO stores the IP addresses of the routers that the traffic engineering -// tunnel traversed and also the label generated and distributed by the routers. The -// RROs in the Resv message mirrors that of the Path message, the only difference is -// that the RRO in a Resv message records the path information in the reverse direction. -type RsvpLspIpv4Rro struct { +// States associated with configured ports. +type StatePort struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The IPv4 addresses of the routers that the traffic engineering tunnel traversed. - Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` - // Label reported for RRO hop. When the Label_Recording flag is set in the Session Attribute - // object, nodes doing route recording should include the Label Record subobject containing - // the reported label. - ReportedLabel *uint32 `protobuf:"varint,2,opt,name=reported_label,json=reportedLabel,proto3,oneof" json:"reported_label,omitempty"` + // Description missing in models + // required = true + Choice *StatePort_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StatePort_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Link *StatePortLink `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` + // Description missing in models + Capture *StatePortCapture `protobuf:"bytes,3,opt,name=capture,proto3" json:"capture,omitempty"` } -func (x *RsvpLspIpv4Rro) Reset() { - *x = RsvpLspIpv4Rro{} +func (x *StatePort) Reset() { + *x = StatePort{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[418] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58001,13 +59786,13 @@ func (x *RsvpLspIpv4Rro) Reset() { } } -func (x *RsvpLspIpv4Rro) String() string { +func (x *StatePort) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpLspIpv4Rro) ProtoMessage() {} +func (*StatePort) ProtoMessage() {} -func (x *RsvpLspIpv4Rro) ProtoReflect() protoreflect.Message { +func (x *StatePort) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[418] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58019,45 +59804,47 @@ func (x *RsvpLspIpv4Rro) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpLspIpv4Rro.ProtoReflect.Descriptor instead. -func (*RsvpLspIpv4Rro) Descriptor() ([]byte, []int) { +// Deprecated: Use StatePort.ProtoReflect.Descriptor instead. +func (*StatePort) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{418} } -func (x *RsvpLspIpv4Rro) GetAddress() string { - if x != nil && x.Address != nil { - return *x.Address +func (x *StatePort) GetChoice() StatePort_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return StatePort_Choice_unspecified } -func (x *RsvpLspIpv4Rro) GetReportedLabel() uint32 { - if x != nil && x.ReportedLabel != nil { - return *x.ReportedLabel +func (x *StatePort) GetLink() *StatePortLink { + if x != nil { + return x.Link } - return 0 + return nil } -// This contains the list of sub-objects included in the Explicit Route Object(ERO) -// object send in the PATH message from the ingress. These sub-objects contain the intermediate -// hops to be traversed by the LSP while being forwarded towards the egress endpoint. -type RsvpLspIpv4Ero struct { +func (x *StatePort) GetCapture() *StatePortCapture { + if x != nil { + return x.Capture + } + return nil +} + +// States associated with configured flows +type StateTraffic struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The IPv4 prefix indicated by the ERO. Specified only when the ERO hop is an IPv4 - // prefix. - Prefix *string `protobuf:"bytes,1,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` - // The autonomous system number indicated by the ERO. Specified only when the ERO hop - // is an 2 or 4-byte AS number. - Asn *uint32 `protobuf:"varint,2,opt,name=asn,proto3,oneof" json:"asn,omitempty"` - // The type indicated by the ERO. - Type *RsvpLspIpv4Ero_Type_Enum `protobuf:"varint,3,opt,name=type,proto3,enum=otg.RsvpLspIpv4Ero_Type_Enum,oneof" json:"type,omitempty"` + // Description missing in models + // required = true + Choice *StateTraffic_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StateTraffic_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + FlowTransmit *StateTrafficFlowTransmit `protobuf:"bytes,2,opt,name=flow_transmit,json=flowTransmit,proto3" json:"flow_transmit,omitempty"` } -func (x *RsvpLspIpv4Ero) Reset() { - *x = RsvpLspIpv4Ero{} +func (x *StateTraffic) Reset() { + *x = StateTraffic{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[419] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58065,13 +59852,13 @@ func (x *RsvpLspIpv4Ero) Reset() { } } -func (x *RsvpLspIpv4Ero) String() string { +func (x *StateTraffic) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpLspIpv4Ero) ProtoMessage() {} +func (*StateTraffic) ProtoMessage() {} -func (x *RsvpLspIpv4Ero) ProtoReflect() protoreflect.Message { +func (x *StateTraffic) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[419] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58083,53 +59870,50 @@ func (x *RsvpLspIpv4Ero) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpLspIpv4Ero.ProtoReflect.Descriptor instead. -func (*RsvpLspIpv4Ero) Descriptor() ([]byte, []int) { +// Deprecated: Use StateTraffic.ProtoReflect.Descriptor instead. +func (*StateTraffic) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{419} } -func (x *RsvpLspIpv4Ero) GetPrefix() string { - if x != nil && x.Prefix != nil { - return *x.Prefix - } - return "" -} - -func (x *RsvpLspIpv4Ero) GetAsn() uint32 { - if x != nil && x.Asn != nil { - return *x.Asn +func (x *StateTraffic) GetChoice() StateTraffic_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return StateTraffic_Choice_unspecified } -func (x *RsvpLspIpv4Ero) GetType() RsvpLspIpv4Ero_Type_Enum { - if x != nil && x.Type != nil { - return *x.Type +func (x *StateTraffic) GetFlowTransmit() *StateTrafficFlowTransmit { + if x != nil { + return x.FlowTransmit } - return RsvpLspIpv4Ero_Type_unspecified + return nil } -// The capture result request to the traffic generator. Stops the port capture on the -// port_name and returns the capture. -type CaptureRequest struct { +// States associated with protocols on configured resources. +type StateProtocol struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The name of a port a capture is started on. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // x-constraint: - // - /components/schemas/Port/properties/name - // + // Description missing in models // required = true - PortName *string `protobuf:"bytes,1,opt,name=port_name,json=portName,proto3,oneof" json:"port_name,omitempty"` + Choice *StateProtocol_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StateProtocol_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + All *StateProtocolAll `protobuf:"bytes,2,opt,name=all,proto3" json:"all,omitempty"` + // Description missing in models + Route *StateProtocolRoute `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` + // Description missing in models + Lacp *StateProtocolLacp `protobuf:"bytes,4,opt,name=lacp,proto3" json:"lacp,omitempty"` + // Description missing in models + Bgp *StateProtocolBgp `protobuf:"bytes,5,opt,name=bgp,proto3" json:"bgp,omitempty"` + // Description missing in models + Isis *StateProtocolIsis `protobuf:"bytes,6,opt,name=isis,proto3" json:"isis,omitempty"` + // Description missing in models + Ospfv2 *StateProtocolOspfv2 `protobuf:"bytes,7,opt,name=ospfv2,proto3" json:"ospfv2,omitempty"` } -func (x *CaptureRequest) Reset() { - *x = CaptureRequest{} +func (x *StateProtocol) Reset() { + *x = StateProtocol{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[420] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58137,13 +59921,13 @@ func (x *CaptureRequest) Reset() { } } -func (x *CaptureRequest) String() string { +func (x *StateProtocol) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CaptureRequest) ProtoMessage() {} +func (*StateProtocol) ProtoMessage() {} -func (x *CaptureRequest) ProtoReflect() protoreflect.Message { +func (x *StateProtocol) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[420] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58155,37 +59939,81 @@ func (x *CaptureRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CaptureRequest.ProtoReflect.Descriptor instead. -func (*CaptureRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use StateProtocol.ProtoReflect.Descriptor instead. +func (*StateProtocol) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{420} } -func (x *CaptureRequest) GetPortName() string { - if x != nil && x.PortName != nil { - return *x.PortName +func (x *StateProtocol) GetChoice() StateProtocol_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return StateProtocol_Choice_unspecified } -// mac counter pattern -type PatternFlowEthernetDstCounter struct { +func (x *StateProtocol) GetAll() *StateProtocolAll { + if x != nil { + return x.All + } + return nil +} + +func (x *StateProtocol) GetRoute() *StateProtocolRoute { + if x != nil { + return x.Route + } + return nil +} + +func (x *StateProtocol) GetLacp() *StateProtocolLacp { + if x != nil { + return x.Lacp + } + return nil +} + +func (x *StateProtocol) GetBgp() *StateProtocolBgp { + if x != nil { + return x.Bgp + } + return nil +} + +func (x *StateProtocol) GetIsis() *StateProtocolIsis { + if x != nil { + return x.Isis + } + return nil +} + +func (x *StateProtocol) GetOspfv2() *StateProtocolOspfv2 { + if x != nil { + return x.Ospfv2 + } + return nil +} + +// Sets the link of configured ports. +type StatePortLink struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 00:00:00:00:00:00 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 00:00:00:00:00:01 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The names of target ports. An empty or null list will target all ports. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // x-constraint: + // - /components/schemas/Port/properties/name + PortNames []string `protobuf:"bytes,1,rep,name=port_names,json=portNames,proto3" json:"port_names,omitempty"` + // The link state. + // required = true + State *StatePortLink_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StatePortLink_State_Enum,oneof" json:"state,omitempty"` } -func (x *PatternFlowEthernetDstCounter) Reset() { - *x = PatternFlowEthernetDstCounter{} +func (x *StatePortLink) Reset() { + *x = StatePortLink{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[421] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58193,13 +60021,13 @@ func (x *PatternFlowEthernetDstCounter) Reset() { } } -func (x *PatternFlowEthernetDstCounter) String() string { +func (x *StatePortLink) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetDstCounter) ProtoMessage() {} +func (*StatePortLink) ProtoMessage() {} -func (x *PatternFlowEthernetDstCounter) ProtoReflect() protoreflect.Message { +func (x *StatePortLink) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[421] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58211,55 +60039,49 @@ func (x *PatternFlowEthernetDstCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetDstCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetDstCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use StatePortLink.ProtoReflect.Descriptor instead. +func (*StatePortLink) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{421} } -func (x *PatternFlowEthernetDstCounter) GetStart() string { - if x != nil && x.Start != nil { - return *x.Start - } - return "" -} - -func (x *PatternFlowEthernetDstCounter) GetStep() string { - if x != nil && x.Step != nil { - return *x.Step +func (x *StatePortLink) GetPortNames() []string { + if x != nil { + return x.PortNames } - return "" + return nil } -func (x *PatternFlowEthernetDstCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *StatePortLink) GetState() StatePortLink_State_Enum { + if x != nil && x.State != nil { + return *x.State } - return 0 + return StatePortLink_State_unspecified } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowEthernetDstMetricTag struct { +// Sets the capture state of configured ports +type StatePortCapture struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field + // The names of ports to which the capture state will be applied to. If the list of + // port_names is empty or null the state will be applied to all configured ports. + // If the list is not empty any port that is not included in the list of port_names + // MUST be ignored and not included in the state change. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // x-constraint: + // - /components/schemas/Port/properties/name + PortNames []string `protobuf:"bytes,1,rep,name=port_names,json=portNames,proto3" json:"port_names,omitempty"` + // The capture state. // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 48 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + State *StatePortCapture_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StatePortCapture_State_Enum,oneof" json:"state,omitempty"` } -func (x *PatternFlowEthernetDstMetricTag) Reset() { - *x = PatternFlowEthernetDstMetricTag{} +func (x *StatePortCapture) Reset() { + *x = StatePortCapture{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[422] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58267,13 +60089,13 @@ func (x *PatternFlowEthernetDstMetricTag) Reset() { } } -func (x *PatternFlowEthernetDstMetricTag) String() string { +func (x *StatePortCapture) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetDstMetricTag) ProtoMessage() {} +func (*StatePortCapture) ProtoMessage() {} -func (x *PatternFlowEthernetDstMetricTag) ProtoReflect() protoreflect.Message { +func (x *StatePortCapture) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[422] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58285,64 +60107,60 @@ func (x *PatternFlowEthernetDstMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetDstMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetDstMetricTag) Descriptor() ([]byte, []int) { +// Deprecated: Use StatePortCapture.ProtoReflect.Descriptor instead. +func (*StatePortCapture) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{422} } -func (x *PatternFlowEthernetDstMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatternFlowEthernetDstMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *StatePortCapture) GetPortNames() []string { + if x != nil { + return x.PortNames } - return 0 + return nil } -func (x *PatternFlowEthernetDstMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *StatePortCapture) GetState() StatePortCapture_State_Enum { + if x != nil && x.State != nil { + return *x.State } - return 0 + return StatePortCapture_State_unspecified } -// Destination MAC address -type PatternFlowEthernetDst struct { +// Provides state control of flow transmission. +type StateTrafficFlowTransmit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.auto - Choice *PatternFlowEthernetDst_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetDst_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 00:00:00:00:00:00 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = ['00:00:00:00:00:00'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` - // The OTG implementation can provide a system generated - // value for this property. If the OTG is unable to generate a value - // the default value must be used. - // default = 00:00:00:00:00:00 - Auto *string `protobuf:"bytes,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // Description missing in models - Increment *PatternFlowEthernetDstCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowEthernetDstCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowEthernetDstMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` -} - -func (x *PatternFlowEthernetDst) Reset() { - *x = PatternFlowEthernetDst{} + // The names of flows to which the transmit state will be applied to. If the list of + // flow_names is empty or null the state will be applied to all configured flows. + // If the list is not empty any flow that is not included in the list of flow_names + // MUST be ignored and not included in the state change. + // + // x-constraint: + // - /components/schemas/Flow/properties/name + // + // x-constraint: + // - /components/schemas/Flow/properties/name + FlowNames []string `protobuf:"bytes,1,rep,name=flow_names,json=flowNames,proto3" json:"flow_names,omitempty"` + // The transmit state. + // If the value of the state property is 'start' then all flows defined by the 'flow_names' + // property will be started and the metric counters MUST be cleared prior to starting + // the flow(s). + // If the value of the state property is 'stop' then all flows defined by the 'flow_names' + // property will be stopped and the metric counters MUST NOT be cleared. + // If the value of the state property is 'pause' then all flows defined by the 'flow_names' + // property will be paused and the metric counters MUST NOT be cleared. + // If the value of the state property is 'resume' then any paused flows defined by the + // 'flow_names' property will start transmit at the point at which they were paused. + // Any flow that is stopped will start transmit at the beginning of the flow. The flow(s) + // MUST NOT have their metric counters cleared. + // required = true + State *StateTrafficFlowTransmit_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StateTrafficFlowTransmit_State_Enum,oneof" json:"state,omitempty"` +} + +func (x *StateTrafficFlowTransmit) Reset() { + *x = StateTrafficFlowTransmit{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[423] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58350,13 +60168,13 @@ func (x *PatternFlowEthernetDst) Reset() { } } -func (x *PatternFlowEthernetDst) String() string { +func (x *StateTrafficFlowTransmit) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetDst) ProtoMessage() {} +func (*StateTrafficFlowTransmit) ProtoMessage() {} -func (x *PatternFlowEthernetDst) ProtoReflect() protoreflect.Message { +func (x *StateTrafficFlowTransmit) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[423] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58368,79 +60186,41 @@ func (x *PatternFlowEthernetDst) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetDst.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetDst) Descriptor() ([]byte, []int) { +// Deprecated: Use StateTrafficFlowTransmit.ProtoReflect.Descriptor instead. +func (*StateTrafficFlowTransmit) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{423} } -func (x *PatternFlowEthernetDst) GetChoice() PatternFlowEthernetDst_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowEthernetDst_Choice_unspecified -} - -func (x *PatternFlowEthernetDst) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value - } - return "" -} - -func (x *PatternFlowEthernetDst) GetValues() []string { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowEthernetDst) GetAuto() string { - if x != nil && x.Auto != nil { - return *x.Auto - } - return "" -} - -func (x *PatternFlowEthernetDst) GetIncrement() *PatternFlowEthernetDstCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowEthernetDst) GetDecrement() *PatternFlowEthernetDstCounter { +func (x *StateTrafficFlowTransmit) GetFlowNames() []string { if x != nil { - return x.Decrement + return x.FlowNames } return nil } -func (x *PatternFlowEthernetDst) GetMetricTags() []*PatternFlowEthernetDstMetricTag { - if x != nil { - return x.MetricTags +func (x *StateTrafficFlowTransmit) GetState() StateTrafficFlowTransmit_State_Enum { + if x != nil && x.State != nil { + return *x.State } - return nil + return StateTrafficFlowTransmit_State_unspecified } -// mac counter pattern -type PatternFlowEthernetSrcCounter struct { +// Sets all configured protocols to `start` or `stop` state. +// Setting protocol state to `start` shall be a no-op if preceding `set_config` API +// call was made with `config.options.protocol_options.auto_start_all` set to `true` +// or if all the configured protocols are already started. +type StateProtocolAll struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 00:00:00:00:00:00 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 00:00:00:00:00:01 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Protocol states + // required = true + State *StateProtocolAll_State_Enum `protobuf:"varint,1,opt,name=state,proto3,enum=otg.StateProtocolAll_State_Enum,oneof" json:"state,omitempty"` } -func (x *PatternFlowEthernetSrcCounter) Reset() { - *x = PatternFlowEthernetSrcCounter{} +func (x *StateProtocolAll) Reset() { + *x = StateProtocolAll{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[424] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58448,13 +60228,13 @@ func (x *PatternFlowEthernetSrcCounter) Reset() { } } -func (x *PatternFlowEthernetSrcCounter) String() string { +func (x *StateProtocolAll) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetSrcCounter) ProtoMessage() {} +func (*StateProtocolAll) ProtoMessage() {} -func (x *PatternFlowEthernetSrcCounter) ProtoReflect() protoreflect.Message { +func (x *StateProtocolAll) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[424] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58466,55 +60246,48 @@ func (x *PatternFlowEthernetSrcCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetSrcCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetSrcCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use StateProtocolAll.ProtoReflect.Descriptor instead. +func (*StateProtocolAll) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{424} } -func (x *PatternFlowEthernetSrcCounter) GetStart() string { - if x != nil && x.Start != nil { - return *x.Start - } - return "" -} - -func (x *PatternFlowEthernetSrcCounter) GetStep() string { - if x != nil && x.Step != nil { - return *x.Step - } - return "" -} - -func (x *PatternFlowEthernetSrcCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *StateProtocolAll) GetState() StateProtocolAll_State_Enum { + if x != nil && x.State != nil { + return *x.State } - return 0 + return StateProtocolAll_State_unspecified } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowEthernetSrcMetricTag struct { +// Sets the state of configured routes +type StateProtocolRoute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field + // The names of device route objects to control. If no names are specified then all + // route objects that match the x-constraint will be affected. + // + // x-constraint: + // - /components/schemas/Bgp.V4RouteRange/properties/name + // - /components/schemas/Bgp.V6RouteRange/properties/name + // - /components/schemas/Isis.V4RouteRange/properties/name + // - /components/schemas/Isis.V6RouteRange/properties/name + // - /components/schemas/Ospfv2.V4RouteRange/properties/name + // + // x-constraint: + // - /components/schemas/Bgp.V4RouteRange/properties/name + // - /components/schemas/Bgp.V6RouteRange/properties/name + // - /components/schemas/Isis.V4RouteRange/properties/name + // - /components/schemas/Isis.V6RouteRange/properties/name + // - /components/schemas/Ospfv2.V4RouteRange/properties/name + Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` + // Route states // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 48 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + State *StateProtocolRoute_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StateProtocolRoute_State_Enum,oneof" json:"state,omitempty"` } -func (x *PatternFlowEthernetSrcMetricTag) Reset() { - *x = PatternFlowEthernetSrcMetricTag{} +func (x *StateProtocolRoute) Reset() { + *x = StateProtocolRoute{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[425] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58522,13 +60295,13 @@ func (x *PatternFlowEthernetSrcMetricTag) Reset() { } } -func (x *PatternFlowEthernetSrcMetricTag) String() string { +func (x *StateProtocolRoute) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetSrcMetricTag) ProtoMessage() {} +func (*StateProtocolRoute) ProtoMessage() {} -func (x *PatternFlowEthernetSrcMetricTag) ProtoReflect() protoreflect.Message { +func (x *StateProtocolRoute) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[425] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58540,59 +60313,42 @@ func (x *PatternFlowEthernetSrcMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetSrcMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetSrcMetricTag) Descriptor() ([]byte, []int) { +// Deprecated: Use StateProtocolRoute.ProtoReflect.Descriptor instead. +func (*StateProtocolRoute) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{425} } -func (x *PatternFlowEthernetSrcMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatternFlowEthernetSrcMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *StateProtocolRoute) GetNames() []string { + if x != nil { + return x.Names } - return 0 + return nil } -func (x *PatternFlowEthernetSrcMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *StateProtocolRoute) GetState() StateProtocolRoute_State_Enum { + if x != nil && x.State != nil { + return *x.State } - return 0 + return StateProtocolRoute_State_unspecified } -// Source MAC address -type PatternFlowEthernetSrc struct { +// Sets state of configured LACP +type StateProtocolLacp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowEthernetSrc_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetSrc_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 00:00:00:00:00:00 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = ['00:00:00:00:00:00'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // required = true + Choice *StateProtocolLacp_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StateProtocolLacp_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Increment *PatternFlowEthernetSrcCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Admin *StateProtocolLacpAdmin `protobuf:"bytes,2,opt,name=admin,proto3" json:"admin,omitempty"` // Description missing in models - Decrement *PatternFlowEthernetSrcCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowEthernetSrcMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MemberPorts *StateProtocolLacpMemberPorts `protobuf:"bytes,3,opt,name=member_ports,json=memberPorts,proto3" json:"member_ports,omitempty"` } -func (x *PatternFlowEthernetSrc) Reset() { - *x = PatternFlowEthernetSrc{} +func (x *StateProtocolLacp) Reset() { + *x = StateProtocolLacp{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[426] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58600,13 +60356,13 @@ func (x *PatternFlowEthernetSrc) Reset() { } } -func (x *PatternFlowEthernetSrc) String() string { +func (x *StateProtocolLacp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetSrc) ProtoMessage() {} +func (*StateProtocolLacp) ProtoMessage() {} -func (x *PatternFlowEthernetSrc) ProtoReflect() protoreflect.Message { +func (x *StateProtocolLacp) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[426] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58618,72 +60374,56 @@ func (x *PatternFlowEthernetSrc) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetSrc.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetSrc) Descriptor() ([]byte, []int) { +// Deprecated: Use StateProtocolLacp.ProtoReflect.Descriptor instead. +func (*StateProtocolLacp) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{426} } -func (x *PatternFlowEthernetSrc) GetChoice() PatternFlowEthernetSrc_Choice_Enum { +func (x *StateProtocolLacp) GetChoice() StateProtocolLacp_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowEthernetSrc_Choice_unspecified -} - -func (x *PatternFlowEthernetSrc) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value - } - return "" -} - -func (x *PatternFlowEthernetSrc) GetValues() []string { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowEthernetSrc) GetIncrement() *PatternFlowEthernetSrcCounter { - if x != nil { - return x.Increment - } - return nil + return StateProtocolLacp_Choice_unspecified } -func (x *PatternFlowEthernetSrc) GetDecrement() *PatternFlowEthernetSrcCounter { +func (x *StateProtocolLacp) GetAdmin() *StateProtocolLacpAdmin { if x != nil { - return x.Decrement + return x.Admin } return nil } -func (x *PatternFlowEthernetSrc) GetMetricTags() []*PatternFlowEthernetSrcMetricTag { +func (x *StateProtocolLacp) GetMemberPorts() *StateProtocolLacpMemberPorts { if x != nil { - return x.MetricTags + return x.MemberPorts } return nil } -// integer counter pattern -type PatternFlowEthernetEtherTypeCounter struct { +// Sets admin state of LACP configured on LAG members +type StateProtocolLacpAdmin struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 65535 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The names of LAG members (ports) for which the state has to be applied. An empty + // or null list will control all LAG members. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // x-constraint: + // - /components/schemas/Port/properties/name + LagMemberNames []string `protobuf:"bytes,1,rep,name=lag_member_names,json=lagMemberNames,proto3" json:"lag_member_names,omitempty"` + // The LACP Member admin state. 'up' will send LACPDUs with 'sync' flag set on selected + // member ports. 'down' will send LACPDUs with 'sync' flag unset on selected member + // ports. + // required = true + State *StateProtocolLacpAdmin_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StateProtocolLacpAdmin_State_Enum,oneof" json:"state,omitempty"` } -func (x *PatternFlowEthernetEtherTypeCounter) Reset() { - *x = PatternFlowEthernetEtherTypeCounter{} +func (x *StateProtocolLacpAdmin) Reset() { + *x = StateProtocolLacpAdmin{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[427] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58691,13 +60431,13 @@ func (x *PatternFlowEthernetEtherTypeCounter) Reset() { } } -func (x *PatternFlowEthernetEtherTypeCounter) String() string { +func (x *StateProtocolLacpAdmin) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetEtherTypeCounter) ProtoMessage() {} +func (*StateProtocolLacpAdmin) ProtoMessage() {} -func (x *PatternFlowEthernetEtherTypeCounter) ProtoReflect() protoreflect.Message { +func (x *StateProtocolLacpAdmin) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[427] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58709,55 +60449,47 @@ func (x *PatternFlowEthernetEtherTypeCounter) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetEtherTypeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetEtherTypeCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use StateProtocolLacpAdmin.ProtoReflect.Descriptor instead. +func (*StateProtocolLacpAdmin) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{427} } -func (x *PatternFlowEthernetEtherTypeCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 -} - -func (x *PatternFlowEthernetEtherTypeCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *StateProtocolLacpAdmin) GetLagMemberNames() []string { + if x != nil { + return x.LagMemberNames } - return 0 + return nil } -func (x *PatternFlowEthernetEtherTypeCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *StateProtocolLacpAdmin) GetState() StateProtocolLacpAdmin_State_Enum { + if x != nil && x.State != nil { + return *x.State } - return 0 + return StateProtocolLacpAdmin_State_unspecified } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowEthernetEtherTypeMetricTag struct { +// Sets state of LACP member ports configured on LAG. +type StateProtocolLacpMemberPorts struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field + // The names of LAG members (ports) for which the state has to be applied. An empty + // or null list will control all LAG members. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // x-constraint: + // - /components/schemas/Port/properties/name + LagMemberNames []string `protobuf:"bytes,1,rep,name=lag_member_names,json=lagMemberNames,proto3" json:"lag_member_names,omitempty"` + // The desired LACP member port state. // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + State *StateProtocolLacpMemberPorts_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StateProtocolLacpMemberPorts_State_Enum,oneof" json:"state,omitempty"` } -func (x *PatternFlowEthernetEtherTypeMetricTag) Reset() { - *x = PatternFlowEthernetEtherTypeMetricTag{} +func (x *StateProtocolLacpMemberPorts) Reset() { + *x = StateProtocolLacpMemberPorts{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[428] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58765,13 +60497,13 @@ func (x *PatternFlowEthernetEtherTypeMetricTag) Reset() { } } -func (x *PatternFlowEthernetEtherTypeMetricTag) String() string { +func (x *StateProtocolLacpMemberPorts) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetEtherTypeMetricTag) ProtoMessage() {} +func (*StateProtocolLacpMemberPorts) ProtoMessage() {} -func (x *PatternFlowEthernetEtherTypeMetricTag) ProtoReflect() protoreflect.Message { +func (x *StateProtocolLacpMemberPorts) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[428] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58783,64 +60515,40 @@ func (x *PatternFlowEthernetEtherTypeMetricTag) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetEtherTypeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetEtherTypeMetricTag) Descriptor() ([]byte, []int) { +// Deprecated: Use StateProtocolLacpMemberPorts.ProtoReflect.Descriptor instead. +func (*StateProtocolLacpMemberPorts) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{428} } -func (x *PatternFlowEthernetEtherTypeMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatternFlowEthernetEtherTypeMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *StateProtocolLacpMemberPorts) GetLagMemberNames() []string { + if x != nil { + return x.LagMemberNames } - return 0 + return nil } -func (x *PatternFlowEthernetEtherTypeMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *StateProtocolLacpMemberPorts) GetState() StateProtocolLacpMemberPorts_State_Enum { + if x != nil && x.State != nil { + return *x.State } - return 0 + return StateProtocolLacpMemberPorts_State_unspecified } -// Ethernet type -type PatternFlowEthernetEtherType struct { +// Sets state of configured BGP peers. +type StateProtocolBgp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.auto - Choice *PatternFlowEthernetEtherType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetEtherType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 65535 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [65535] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // The OTG implementation can provide a system generated - // value for this property. If the OTG is unable to generate a value - // the default value must be used. - // default = 65535 - Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // Description missing in models - Increment *PatternFlowEthernetEtherTypeCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` + // required = true + Choice *StateProtocolBgp_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StateProtocolBgp_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Decrement *PatternFlowEthernetEtherTypeCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowEthernetEtherTypeMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + Peers *StateProtocolBgpPeers `protobuf:"bytes,2,opt,name=peers,proto3" json:"peers,omitempty"` } -func (x *PatternFlowEthernetEtherType) Reset() { - *x = PatternFlowEthernetEtherType{} +func (x *StateProtocolBgp) Reset() { + *x = StateProtocolBgp{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[429] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58848,13 +60556,13 @@ func (x *PatternFlowEthernetEtherType) Reset() { } } -func (x *PatternFlowEthernetEtherType) String() string { +func (x *StateProtocolBgp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetEtherType) ProtoMessage() {} +func (*StateProtocolBgp) ProtoMessage() {} -func (x *PatternFlowEthernetEtherType) ProtoReflect() protoreflect.Message { +func (x *StateProtocolBgp) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[429] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58866,79 +60574,52 @@ func (x *PatternFlowEthernetEtherType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetEtherType.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetEtherType) Descriptor() ([]byte, []int) { +// Deprecated: Use StateProtocolBgp.ProtoReflect.Descriptor instead. +func (*StateProtocolBgp) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{429} } -func (x *PatternFlowEthernetEtherType) GetChoice() PatternFlowEthernetEtherType_Choice_Enum { +func (x *StateProtocolBgp) GetChoice() StateProtocolBgp_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowEthernetEtherType_Choice_unspecified -} - -func (x *PatternFlowEthernetEtherType) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowEthernetEtherType) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowEthernetEtherType) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto - } - return 0 -} - -func (x *PatternFlowEthernetEtherType) GetIncrement() *PatternFlowEthernetEtherTypeCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowEthernetEtherType) GetDecrement() *PatternFlowEthernetEtherTypeCounter { - if x != nil { - return x.Decrement - } - return nil + return StateProtocolBgp_Choice_unspecified } -func (x *PatternFlowEthernetEtherType) GetMetricTags() []*PatternFlowEthernetEtherTypeMetricTag { +func (x *StateProtocolBgp) GetPeers() *StateProtocolBgpPeers { if x != nil { - return x.MetricTags + return x.Peers } return nil } -// integer counter pattern -type PatternFlowEthernetPfcQueueCounter struct { +// Sets state of configured BGP peers. +type StateProtocolBgpPeers struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The names of BGP peers for which the state has to be applied. An empty or null list + // will control all BGP peers. + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + PeerNames []string `protobuf:"bytes,1,rep,name=peer_names,json=peerNames,proto3" json:"peer_names,omitempty"` + // The desired state of BGP peer. If the desired state is 'up', underlying IP interface(s) + // would be brought up automatically (if not already up), would attempt to bring up + // the BGP session(s) and advertise route(s), if configured. If the desired state is + // 'down', BGP session(s) would be brought down. + // required = true + State *StateProtocolBgpPeers_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StateProtocolBgpPeers_State_Enum,oneof" json:"state,omitempty"` } -func (x *PatternFlowEthernetPfcQueueCounter) Reset() { - *x = PatternFlowEthernetPfcQueueCounter{} +func (x *StateProtocolBgpPeers) Reset() { + *x = StateProtocolBgpPeers{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[430] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58946,13 +60627,13 @@ func (x *PatternFlowEthernetPfcQueueCounter) Reset() { } } -func (x *PatternFlowEthernetPfcQueueCounter) String() string { +func (x *StateProtocolBgpPeers) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPfcQueueCounter) ProtoMessage() {} +func (*StateProtocolBgpPeers) ProtoMessage() {} -func (x *PatternFlowEthernetPfcQueueCounter) ProtoReflect() protoreflect.Message { +func (x *StateProtocolBgpPeers) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[430] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58964,55 +60645,40 @@ func (x *PatternFlowEthernetPfcQueueCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPfcQueueCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPfcQueueCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use StateProtocolBgpPeers.ProtoReflect.Descriptor instead. +func (*StateProtocolBgpPeers) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{430} } -func (x *PatternFlowEthernetPfcQueueCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 -} - -func (x *PatternFlowEthernetPfcQueueCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *StateProtocolBgpPeers) GetPeerNames() []string { + if x != nil { + return x.PeerNames } - return 0 + return nil } -func (x *PatternFlowEthernetPfcQueueCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *StateProtocolBgpPeers) GetState() StateProtocolBgpPeers_State_Enum { + if x != nil && x.State != nil { + return *x.State } - return 0 + return StateProtocolBgpPeers_State_unspecified } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowEthernetPfcQueueMetricTag struct { +// Sets state of configured ISIS routers. +type StateProtocolIsis struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field + // Description missing in models // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 3 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + Choice *StateProtocolIsis_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StateProtocolIsis_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Routers *StateProtocolIsisRouters `protobuf:"bytes,2,opt,name=routers,proto3" json:"routers,omitempty"` } -func (x *PatternFlowEthernetPfcQueueMetricTag) Reset() { - *x = PatternFlowEthernetPfcQueueMetricTag{} +func (x *StateProtocolIsis) Reset() { + *x = StateProtocolIsis{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[431] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59020,13 +60686,13 @@ func (x *PatternFlowEthernetPfcQueueMetricTag) Reset() { } } -func (x *PatternFlowEthernetPfcQueueMetricTag) String() string { +func (x *StateProtocolIsis) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPfcQueueMetricTag) ProtoMessage() {} +func (*StateProtocolIsis) ProtoMessage() {} -func (x *PatternFlowEthernetPfcQueueMetricTag) ProtoReflect() protoreflect.Message { +func (x *StateProtocolIsis) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[431] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59038,59 +60704,50 @@ func (x *PatternFlowEthernetPfcQueueMetricTag) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPfcQueueMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPfcQueueMetricTag) Descriptor() ([]byte, []int) { +// Deprecated: Use StateProtocolIsis.ProtoReflect.Descriptor instead. +func (*StateProtocolIsis) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{431} } -func (x *PatternFlowEthernetPfcQueueMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatternFlowEthernetPfcQueueMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *StateProtocolIsis) GetChoice() StateProtocolIsis_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return StateProtocolIsis_Choice_unspecified } -func (x *PatternFlowEthernetPfcQueueMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *StateProtocolIsis) GetRouters() *StateProtocolIsisRouters { + if x != nil { + return x.Routers } - return 0 + return nil } -// Priority flow control queue -type PatternFlowEthernetPfcQueue struct { +// Sets state of configured ISIS routers. +type StateProtocolIsisRouters struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowEthernetPfcQueue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetPfcQueue_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowEthernetPfcQueueCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowEthernetPfcQueueCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowEthernetPfcQueueMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The names of ISIS routers for which the state has to be applied. An empty or null + // list will control all ISIS routers. + // + // x-constraint: + // - /components/schemas/Device.IsisRouter/properties/name + // + // x-constraint: + // - /components/schemas/Device.IsisRouter/properties/name + RouterNames []string `protobuf:"bytes,1,rep,name=router_names,json=routerNames,proto3" json:"router_names,omitempty"` + // The desired state of ISIS router. If the desired state is 'up', would attempt to + // bring up the ISIS session(s) with respective peer(s) and advertise route(s), if configured. + // If the desired state is 'down', would bring down ISIS session(s) with respective + // peer(s). + // required = true + State *StateProtocolIsisRouters_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StateProtocolIsisRouters_State_Enum,oneof" json:"state,omitempty"` } -func (x *PatternFlowEthernetPfcQueue) Reset() { - *x = PatternFlowEthernetPfcQueue{} +func (x *StateProtocolIsisRouters) Reset() { + *x = StateProtocolIsisRouters{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[432] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59098,13 +60755,13 @@ func (x *PatternFlowEthernetPfcQueue) Reset() { } } -func (x *PatternFlowEthernetPfcQueue) String() string { +func (x *StateProtocolIsisRouters) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPfcQueue) ProtoMessage() {} +func (*StateProtocolIsisRouters) ProtoMessage() {} -func (x *PatternFlowEthernetPfcQueue) ProtoReflect() protoreflect.Message { +func (x *StateProtocolIsisRouters) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[432] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59116,72 +60773,40 @@ func (x *PatternFlowEthernetPfcQueue) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPfcQueue.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPfcQueue) Descriptor() ([]byte, []int) { +// Deprecated: Use StateProtocolIsisRouters.ProtoReflect.Descriptor instead. +func (*StateProtocolIsisRouters) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{432} } -func (x *PatternFlowEthernetPfcQueue) GetChoice() PatternFlowEthernetPfcQueue_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowEthernetPfcQueue_Choice_unspecified -} - -func (x *PatternFlowEthernetPfcQueue) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowEthernetPfcQueue) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowEthernetPfcQueue) GetIncrement() *PatternFlowEthernetPfcQueueCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowEthernetPfcQueue) GetDecrement() *PatternFlowEthernetPfcQueueCounter { +func (x *StateProtocolIsisRouters) GetRouterNames() []string { if x != nil { - return x.Decrement + return x.RouterNames } return nil } -func (x *PatternFlowEthernetPfcQueue) GetMetricTags() []*PatternFlowEthernetPfcQueueMetricTag { - if x != nil { - return x.MetricTags +func (x *StateProtocolIsisRouters) GetState() StateProtocolIsisRouters_State_Enum { + if x != nil && x.State != nil { + return *x.State } - return nil + return StateProtocolIsisRouters_State_unspecified } -// integer counter pattern -type PatternFlowVlanPriorityCounter struct { +// Sets state of configured OSPFv2 routers. +type StateProtocolOspfv2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // required = true + Choice *StateProtocolOspfv2_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StateProtocolOspfv2_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + Routers *StateProtocolOspfv2Routers `protobuf:"bytes,2,opt,name=routers,proto3" json:"routers,omitempty"` } -func (x *PatternFlowVlanPriorityCounter) Reset() { - *x = PatternFlowVlanPriorityCounter{} +func (x *StateProtocolOspfv2) Reset() { + *x = StateProtocolOspfv2{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[433] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59189,13 +60814,13 @@ func (x *PatternFlowVlanPriorityCounter) Reset() { } } -func (x *PatternFlowVlanPriorityCounter) String() string { +func (x *StateProtocolOspfv2) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanPriorityCounter) ProtoMessage() {} +func (*StateProtocolOspfv2) ProtoMessage() {} -func (x *PatternFlowVlanPriorityCounter) ProtoReflect() protoreflect.Message { +func (x *StateProtocolOspfv2) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[433] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59207,55 +60832,50 @@ func (x *PatternFlowVlanPriorityCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanPriorityCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanPriorityCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use StateProtocolOspfv2.ProtoReflect.Descriptor instead. +func (*StateProtocolOspfv2) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{433} } -func (x *PatternFlowVlanPriorityCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 -} - -func (x *PatternFlowVlanPriorityCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *StateProtocolOspfv2) GetChoice() StateProtocolOspfv2_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return StateProtocolOspfv2_Choice_unspecified } -func (x *PatternFlowVlanPriorityCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *StateProtocolOspfv2) GetRouters() *StateProtocolOspfv2Routers { + if x != nil { + return x.Routers } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowVlanPriorityMetricTag struct { +// Sets state of configured OSPFv2 routers. +type StateProtocolOspfv2Routers struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field + // The names of OSPFv2 routers for which the state has to be applied. An empty or null + // list will control all OSPFv2 routers. + // + // x-constraint: + // - /components/schemas/Device.Ospfv2/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ospfv2/properties/name + RouterNames []string `protobuf:"bytes,1,rep,name=router_names,json=routerNames,proto3" json:"router_names,omitempty"` + // The desired state of OSPFv2 router. If the desired state is 'up', would attempt to + // bring up the OSPFv2 session(s) with respective peer(s) and advertise route(s), if + // configured. If the desired state is 'down', would bring down OSPFv2 session(s) with + // respective peer(s). // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 3 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + State *StateProtocolOspfv2Routers_State_Enum `protobuf:"varint,2,opt,name=state,proto3,enum=otg.StateProtocolOspfv2Routers_State_Enum,oneof" json:"state,omitempty"` } -func (x *PatternFlowVlanPriorityMetricTag) Reset() { - *x = PatternFlowVlanPriorityMetricTag{} +func (x *StateProtocolOspfv2Routers) Reset() { + *x = StateProtocolOspfv2Routers{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[434] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59263,13 +60883,13 @@ func (x *PatternFlowVlanPriorityMetricTag) Reset() { } } -func (x *PatternFlowVlanPriorityMetricTag) String() string { +func (x *StateProtocolOspfv2Routers) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanPriorityMetricTag) ProtoMessage() {} +func (*StateProtocolOspfv2Routers) ProtoMessage() {} -func (x *PatternFlowVlanPriorityMetricTag) ProtoReflect() protoreflect.Message { +func (x *StateProtocolOspfv2Routers) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[434] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59281,59 +60901,40 @@ func (x *PatternFlowVlanPriorityMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanPriorityMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanPriorityMetricTag) Descriptor() ([]byte, []int) { +// Deprecated: Use StateProtocolOspfv2Routers.ProtoReflect.Descriptor instead. +func (*StateProtocolOspfv2Routers) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{434} } -func (x *PatternFlowVlanPriorityMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatternFlowVlanPriorityMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *StateProtocolOspfv2Routers) GetRouterNames() []string { + if x != nil { + return x.RouterNames } - return 0 + return nil } -func (x *PatternFlowVlanPriorityMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *StateProtocolOspfv2Routers) GetState() StateProtocolOspfv2Routers_State_Enum { + if x != nil && x.State != nil { + return *x.State } - return 0 + return StateProtocolOspfv2Routers_State_unspecified } -// Priority code point -type PatternFlowVlanPriority struct { +// Request for triggering action against configured resources. +type ControlAction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowVlanPriority_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVlanPriority_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowVlanPriorityCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // required = true + Choice *ControlAction_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ControlAction_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Decrement *PatternFlowVlanPriorityCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowVlanPriorityMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + Protocol *ActionProtocol `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` } -func (x *PatternFlowVlanPriority) Reset() { - *x = PatternFlowVlanPriority{} +func (x *ControlAction) Reset() { + *x = ControlAction{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[435] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59341,13 +60942,13 @@ func (x *PatternFlowVlanPriority) Reset() { } } -func (x *PatternFlowVlanPriority) String() string { +func (x *ControlAction) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanPriority) ProtoMessage() {} +func (*ControlAction) ProtoMessage() {} -func (x *PatternFlowVlanPriority) ProtoReflect() protoreflect.Message { +func (x *ControlAction) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[435] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59359,72 +60960,39 @@ func (x *PatternFlowVlanPriority) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanPriority.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanPriority) Descriptor() ([]byte, []int) { +// Deprecated: Use ControlAction.ProtoReflect.Descriptor instead. +func (*ControlAction) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{435} } -func (x *PatternFlowVlanPriority) GetChoice() PatternFlowVlanPriority_Choice_Enum { +func (x *ControlAction) GetChoice() ControlAction_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowVlanPriority_Choice_unspecified -} - -func (x *PatternFlowVlanPriority) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowVlanPriority) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowVlanPriority) GetIncrement() *PatternFlowVlanPriorityCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowVlanPriority) GetDecrement() *PatternFlowVlanPriorityCounter { - if x != nil { - return x.Decrement - } - return nil + return ControlAction_Choice_unspecified } -func (x *PatternFlowVlanPriority) GetMetricTags() []*PatternFlowVlanPriorityMetricTag { +func (x *ControlAction) GetProtocol() *ActionProtocol { if x != nil { - return x.MetricTags + return x.Protocol } return nil } -// integer counter pattern -type PatternFlowVlanCfiCounter struct { +// Response for action triggered against configured resources along with warnings. +type ControlActionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // List of warnings generated while triggering specified action + Warnings []string `protobuf:"bytes,1,rep,name=warnings,proto3" json:"warnings,omitempty"` // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + Response *ActionResponse `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` } -func (x *PatternFlowVlanCfiCounter) Reset() { - *x = PatternFlowVlanCfiCounter{} +func (x *ControlActionResponse) Reset() { + *x = ControlActionResponse{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[436] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59432,13 +61000,13 @@ func (x *PatternFlowVlanCfiCounter) Reset() { } } -func (x *PatternFlowVlanCfiCounter) String() string { +func (x *ControlActionResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanCfiCounter) ProtoMessage() {} +func (*ControlActionResponse) ProtoMessage() {} -func (x *PatternFlowVlanCfiCounter) ProtoReflect() protoreflect.Message { +func (x *ControlActionResponse) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[436] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59450,55 +61018,40 @@ func (x *PatternFlowVlanCfiCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanCfiCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanCfiCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use ControlActionResponse.ProtoReflect.Descriptor instead. +func (*ControlActionResponse) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{436} } -func (x *PatternFlowVlanCfiCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 -} - -func (x *PatternFlowVlanCfiCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *ControlActionResponse) GetWarnings() []string { + if x != nil { + return x.Warnings } - return 0 + return nil } -func (x *PatternFlowVlanCfiCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *ControlActionResponse) GetResponse() *ActionResponse { + if x != nil { + return x.Response } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowVlanCfiMetricTag struct { +// Response for action triggered against configured resources. +type ActionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field + // Description missing in models // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 1 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + Choice *ActionResponse_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionResponse_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Protocol *ActionResponseProtocol `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` } -func (x *PatternFlowVlanCfiMetricTag) Reset() { - *x = PatternFlowVlanCfiMetricTag{} +func (x *ActionResponse) Reset() { + *x = ActionResponse{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[437] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59506,13 +61059,13 @@ func (x *PatternFlowVlanCfiMetricTag) Reset() { } } -func (x *PatternFlowVlanCfiMetricTag) String() string { +func (x *ActionResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanCfiMetricTag) ProtoMessage() {} +func (*ActionResponse) ProtoMessage() {} -func (x *PatternFlowVlanCfiMetricTag) ProtoReflect() protoreflect.Message { +func (x *ActionResponse) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[437] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59524,59 +61077,44 @@ func (x *PatternFlowVlanCfiMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanCfiMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanCfiMetricTag) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionResponse.ProtoReflect.Descriptor instead. +func (*ActionResponse) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{437} } -func (x *PatternFlowVlanCfiMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatternFlowVlanCfiMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *ActionResponse) GetChoice() ActionResponse_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return ActionResponse_Choice_unspecified } -func (x *PatternFlowVlanCfiMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *ActionResponse) GetProtocol() *ActionResponseProtocol { + if x != nil { + return x.Protocol } - return 0 + return nil } -// Canonical format indicator or drop elegible indicator -type PatternFlowVlanCfi struct { +// Actions associated with protocols on configured resources. +type ActionProtocol struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowVlanCfi_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVlanCfi_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // required = true + Choice *ActionProtocol_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionProtocol_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + Ipv4 *ActionProtocolIpv4 `protobuf:"bytes,2,opt,name=ipv4,proto3" json:"ipv4,omitempty"` // Description missing in models - Increment *PatternFlowVlanCfiCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Ipv6 *ActionProtocolIpv6 `protobuf:"bytes,3,opt,name=ipv6,proto3" json:"ipv6,omitempty"` // Description missing in models - Decrement *PatternFlowVlanCfiCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowVlanCfiMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + Bgp *ActionProtocolBgp `protobuf:"bytes,4,opt,name=bgp,proto3" json:"bgp,omitempty"` } -func (x *PatternFlowVlanCfi) Reset() { - *x = PatternFlowVlanCfi{} +func (x *ActionProtocol) Reset() { + *x = ActionProtocol{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[438] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59584,13 +61122,13 @@ func (x *PatternFlowVlanCfi) Reset() { } } -func (x *PatternFlowVlanCfi) String() string { +func (x *ActionProtocol) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanCfi) ProtoMessage() {} +func (*ActionProtocol) ProtoMessage() {} -func (x *PatternFlowVlanCfi) ProtoReflect() protoreflect.Message { +func (x *ActionProtocol) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[438] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59602,72 +61140,56 @@ func (x *PatternFlowVlanCfi) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanCfi.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanCfi) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionProtocol.ProtoReflect.Descriptor instead. +func (*ActionProtocol) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{438} } -func (x *PatternFlowVlanCfi) GetChoice() PatternFlowVlanCfi_Choice_Enum { +func (x *ActionProtocol) GetChoice() ActionProtocol_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowVlanCfi_Choice_unspecified + return ActionProtocol_Choice_unspecified } -func (x *PatternFlowVlanCfi) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *ActionProtocol) GetIpv4() *ActionProtocolIpv4 { + if x != nil { + return x.Ipv4 } - return 0 + return nil } -func (x *PatternFlowVlanCfi) GetValues() []uint32 { +func (x *ActionProtocol) GetIpv6() *ActionProtocolIpv6 { if x != nil { - return x.Values + return x.Ipv6 } return nil } -func (x *PatternFlowVlanCfi) GetIncrement() *PatternFlowVlanCfiCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowVlanCfi) GetDecrement() *PatternFlowVlanCfiCounter { - if x != nil { - return x.Decrement - } - return nil -} - -func (x *PatternFlowVlanCfi) GetMetricTags() []*PatternFlowVlanCfiMetricTag { +func (x *ActionProtocol) GetBgp() *ActionProtocolBgp { if x != nil { - return x.MetricTags + return x.Bgp } return nil } -// integer counter pattern -type PatternFlowVlanIdCounter struct { +// Response for actions associated with protocols on configured resources. +type ActionResponseProtocol struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // required = true + Choice *ActionResponseProtocol_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionResponseProtocol_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + Ipv4 *ActionResponseProtocolIpv4 `protobuf:"bytes,2,opt,name=ipv4,proto3" json:"ipv4,omitempty"` // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + Ipv6 *ActionResponseProtocolIpv6 `protobuf:"bytes,3,opt,name=ipv6,proto3" json:"ipv6,omitempty"` } -func (x *PatternFlowVlanIdCounter) Reset() { - *x = PatternFlowVlanIdCounter{} +func (x *ActionResponseProtocol) Reset() { + *x = ActionResponseProtocol{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[439] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59675,13 +61197,13 @@ func (x *PatternFlowVlanIdCounter) Reset() { } } -func (x *PatternFlowVlanIdCounter) String() string { +func (x *ActionResponseProtocol) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanIdCounter) ProtoMessage() {} +func (*ActionResponseProtocol) ProtoMessage() {} -func (x *PatternFlowVlanIdCounter) ProtoReflect() protoreflect.Message { +func (x *ActionResponseProtocol) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[439] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59693,55 +61215,47 @@ func (x *PatternFlowVlanIdCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanIdCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanIdCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionResponseProtocol.ProtoReflect.Descriptor instead. +func (*ActionResponseProtocol) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{439} } -func (x *PatternFlowVlanIdCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *ActionResponseProtocol) GetChoice() ActionResponseProtocol_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return ActionResponseProtocol_Choice_unspecified } -func (x *PatternFlowVlanIdCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *ActionResponseProtocol) GetIpv4() *ActionResponseProtocolIpv4 { + if x != nil { + return x.Ipv4 } - return 0 + return nil } -func (x *PatternFlowVlanIdCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *ActionResponseProtocol) GetIpv6() *ActionResponseProtocolIpv6 { + if x != nil { + return x.Ipv6 } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowVlanIdMetricTag struct { +// Actions associated with IPv4 on configured resources. +type ActionProtocolIpv4 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field + // Description missing in models // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 12 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + Choice *ActionProtocolIpv4_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionProtocolIpv4_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Ping *ActionProtocolIpv4Ping `protobuf:"bytes,2,opt,name=ping,proto3" json:"ping,omitempty"` } -func (x *PatternFlowVlanIdMetricTag) Reset() { - *x = PatternFlowVlanIdMetricTag{} +func (x *ActionProtocolIpv4) Reset() { + *x = ActionProtocolIpv4{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[440] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59749,13 +61263,13 @@ func (x *PatternFlowVlanIdMetricTag) Reset() { } } -func (x *PatternFlowVlanIdMetricTag) String() string { +func (x *ActionProtocolIpv4) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanIdMetricTag) ProtoMessage() {} +func (*ActionProtocolIpv4) ProtoMessage() {} -func (x *PatternFlowVlanIdMetricTag) ProtoReflect() protoreflect.Message { +func (x *ActionProtocolIpv4) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[440] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59767,59 +61281,40 @@ func (x *PatternFlowVlanIdMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanIdMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanIdMetricTag) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionProtocolIpv4.ProtoReflect.Descriptor instead. +func (*ActionProtocolIpv4) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{440} } -func (x *PatternFlowVlanIdMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatternFlowVlanIdMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *ActionProtocolIpv4) GetChoice() ActionProtocolIpv4_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return ActionProtocolIpv4_Choice_unspecified } -func (x *PatternFlowVlanIdMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *ActionProtocolIpv4) GetPing() *ActionProtocolIpv4Ping { + if x != nil { + return x.Ping } - return 0 + return nil } -// Vlan identifier -type PatternFlowVlanId struct { +// Response for actions associated with IPv4 on configured resources. +type ActionResponseProtocolIpv4 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowVlanId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVlanId_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowVlanIdCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // required = true + Choice *ActionResponseProtocolIpv4_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionResponseProtocolIpv4_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Decrement *PatternFlowVlanIdCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowVlanIdMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + Ping *ActionResponseProtocolIpv4Ping `protobuf:"bytes,2,opt,name=ping,proto3" json:"ping,omitempty"` } -func (x *PatternFlowVlanId) Reset() { - *x = PatternFlowVlanId{} +func (x *ActionResponseProtocolIpv4) Reset() { + *x = ActionResponseProtocolIpv4{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[441] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59827,13 +61322,13 @@ func (x *PatternFlowVlanId) Reset() { } } -func (x *PatternFlowVlanId) String() string { +func (x *ActionResponseProtocolIpv4) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanId) ProtoMessage() {} +func (*ActionResponseProtocolIpv4) ProtoMessage() {} -func (x *PatternFlowVlanId) ProtoReflect() protoreflect.Message { +func (x *ActionResponseProtocolIpv4) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[441] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59845,72 +61340,37 @@ func (x *PatternFlowVlanId) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanId.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanId) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionResponseProtocolIpv4.ProtoReflect.Descriptor instead. +func (*ActionResponseProtocolIpv4) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{441} } -func (x *PatternFlowVlanId) GetChoice() PatternFlowVlanId_Choice_Enum { +func (x *ActionResponseProtocolIpv4) GetChoice() ActionResponseProtocolIpv4_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowVlanId_Choice_unspecified -} - -func (x *PatternFlowVlanId) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowVlanId) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowVlanId) GetIncrement() *PatternFlowVlanIdCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowVlanId) GetDecrement() *PatternFlowVlanIdCounter { - if x != nil { - return x.Decrement - } - return nil + return ActionResponseProtocolIpv4_Choice_unspecified } -func (x *PatternFlowVlanId) GetMetricTags() []*PatternFlowVlanIdMetricTag { +func (x *ActionResponseProtocolIpv4) GetPing() *ActionResponseProtocolIpv4Ping { if x != nil { - return x.MetricTags + return x.Ping } return nil } -// integer counter pattern -type PatternFlowVlanTpidCounter struct { +// Request for initiating ping between multiple source and destination pairs. +type ActionProtocolIpv4Ping struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 65535 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // List of IPv4 ping requests. + Requests []*ActionProtocolIpv4PingRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` } -func (x *PatternFlowVlanTpidCounter) Reset() { - *x = PatternFlowVlanTpidCounter{} +func (x *ActionProtocolIpv4Ping) Reset() { + *x = ActionProtocolIpv4Ping{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[442] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59918,13 +61378,13 @@ func (x *PatternFlowVlanTpidCounter) Reset() { } } -func (x *PatternFlowVlanTpidCounter) String() string { +func (x *ActionProtocolIpv4Ping) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanTpidCounter) ProtoMessage() {} +func (*ActionProtocolIpv4Ping) ProtoMessage() {} -func (x *PatternFlowVlanTpidCounter) ProtoReflect() protoreflect.Message { +func (x *ActionProtocolIpv4Ping) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[442] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59936,55 +61396,44 @@ func (x *PatternFlowVlanTpidCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanTpidCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanTpidCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionProtocolIpv4Ping.ProtoReflect.Descriptor instead. +func (*ActionProtocolIpv4Ping) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{442} } -func (x *PatternFlowVlanTpidCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 -} - -func (x *PatternFlowVlanTpidCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step - } - return 0 -} - -func (x *PatternFlowVlanTpidCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *ActionProtocolIpv4Ping) GetRequests() []*ActionProtocolIpv4PingRequest { + if x != nil { + return x.Requests } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowVlanTpidMetricTag struct { +// Under Review: Most ping request parameters are still TBD. +// +// Under Review: Most ping request parameters are still TBD. +// +// Request for initiating ping between a single source and destination pair. +// For ping request, 1 IPv4 ICMP Echo Request shall be sent and wait for ping response +// to either succeed or time out. The API wait timeout for each request shall be 300ms. +type ActionProtocolIpv4PingRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // Name of source IPv4 interface to be used. + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + SrcName *string `protobuf:"bytes,1,opt,name=src_name,json=srcName,proto3,oneof" json:"src_name,omitempty"` + // Destination IPv4 address to ping. + DstIp *string `protobuf:"bytes,2,opt,name=dst_ip,json=dstIp,proto3,oneof" json:"dst_ip,omitempty"` } -func (x *PatternFlowVlanTpidMetricTag) Reset() { - *x = PatternFlowVlanTpidMetricTag{} +func (x *ActionProtocolIpv4PingRequest) Reset() { + *x = ActionProtocolIpv4PingRequest{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[443] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59992,13 +61441,13 @@ func (x *PatternFlowVlanTpidMetricTag) Reset() { } } -func (x *PatternFlowVlanTpidMetricTag) String() string { +func (x *ActionProtocolIpv4PingRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanTpidMetricTag) ProtoMessage() {} +func (*ActionProtocolIpv4PingRequest) ProtoMessage() {} -func (x *PatternFlowVlanTpidMetricTag) ProtoReflect() protoreflect.Message { +func (x *ActionProtocolIpv4PingRequest) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[443] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60010,59 +61459,37 @@ func (x *PatternFlowVlanTpidMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanTpidMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanTpidMetricTag) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionProtocolIpv4PingRequest.ProtoReflect.Descriptor instead. +func (*ActionProtocolIpv4PingRequest) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{443} } -func (x *PatternFlowVlanTpidMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *ActionProtocolIpv4PingRequest) GetSrcName() string { + if x != nil && x.SrcName != nil { + return *x.SrcName } return "" } -func (x *PatternFlowVlanTpidMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset - } - return 0 -} - -func (x *PatternFlowVlanTpidMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *ActionProtocolIpv4PingRequest) GetDstIp() string { + if x != nil && x.DstIp != nil { + return *x.DstIp } - return 0 + return "" } -// Protocol identifier -type PatternFlowVlanTpid struct { +// Response for ping initiated between multiple source and destination pairs. +type ActionResponseProtocolIpv4Ping struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowVlanTpid_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVlanTpid_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 65535 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [65535] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowVlanTpidCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowVlanTpidCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowVlanTpidMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // List of responses for IPv4 ping responses. + Responses []*ActionResponseProtocolIpv4PingResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` } -func (x *PatternFlowVlanTpid) Reset() { - *x = PatternFlowVlanTpid{} +func (x *ActionResponseProtocolIpv4Ping) Reset() { + *x = ActionResponseProtocolIpv4Ping{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[444] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60070,13 +61497,13 @@ func (x *PatternFlowVlanTpid) Reset() { } } -func (x *PatternFlowVlanTpid) String() string { +func (x *ActionResponseProtocolIpv4Ping) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanTpid) ProtoMessage() {} +func (*ActionResponseProtocolIpv4Ping) ProtoMessage() {} -func (x *PatternFlowVlanTpid) ProtoReflect() protoreflect.Message { +func (x *ActionResponseProtocolIpv4Ping) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[444] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60088,72 +61515,44 @@ func (x *PatternFlowVlanTpid) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanTpid.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanTpid) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionResponseProtocolIpv4Ping.ProtoReflect.Descriptor instead. +func (*ActionResponseProtocolIpv4Ping) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{444} } -func (x *PatternFlowVlanTpid) GetChoice() PatternFlowVlanTpid_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowVlanTpid_Choice_unspecified -} - -func (x *PatternFlowVlanTpid) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowVlanTpid) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowVlanTpid) GetIncrement() *PatternFlowVlanTpidCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowVlanTpid) GetDecrement() *PatternFlowVlanTpidCounter { - if x != nil { - return x.Decrement - } - return nil -} - -func (x *PatternFlowVlanTpid) GetMetricTags() []*PatternFlowVlanTpidMetricTag { +func (x *ActionResponseProtocolIpv4Ping) GetResponses() []*ActionResponseProtocolIpv4PingResponse { if x != nil { - return x.MetricTags + return x.Responses } return nil } -// integer counter pattern -type PatternFlowVxlanFlagsCounter struct { +// Response for ping initiated between a single source and destination pair. +type ActionResponseProtocolIpv4PingResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 8 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Name of source IPv4 interface used for ping. + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // required = true + SrcName *string `protobuf:"bytes,1,opt,name=src_name,json=srcName,proto3,oneof" json:"src_name,omitempty"` + // Destination IPv4 address used for ping. + // required = true + DstIp *string `protobuf:"bytes,2,opt,name=dst_ip,json=dstIp,proto3,oneof" json:"dst_ip,omitempty"` + // Result of the ping request. + // required = true + Result *ActionResponseProtocolIpv4PingResponse_Result_Enum `protobuf:"varint,3,opt,name=result,proto3,enum=otg.ActionResponseProtocolIpv4PingResponse_Result_Enum,oneof" json:"result,omitempty"` } -func (x *PatternFlowVxlanFlagsCounter) Reset() { - *x = PatternFlowVxlanFlagsCounter{} +func (x *ActionResponseProtocolIpv4PingResponse) Reset() { + *x = ActionResponseProtocolIpv4PingResponse{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[445] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60161,13 +61560,13 @@ func (x *PatternFlowVxlanFlagsCounter) Reset() { } } -func (x *PatternFlowVxlanFlagsCounter) String() string { +func (x *ActionResponseProtocolIpv4PingResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanFlagsCounter) ProtoMessage() {} +func (*ActionResponseProtocolIpv4PingResponse) ProtoMessage() {} -func (x *PatternFlowVxlanFlagsCounter) ProtoReflect() protoreflect.Message { +func (x *ActionResponseProtocolIpv4PingResponse) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[445] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60179,55 +61578,47 @@ func (x *PatternFlowVxlanFlagsCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanFlagsCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanFlagsCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionResponseProtocolIpv4PingResponse.ProtoReflect.Descriptor instead. +func (*ActionResponseProtocolIpv4PingResponse) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{445} } -func (x *PatternFlowVxlanFlagsCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *ActionResponseProtocolIpv4PingResponse) GetSrcName() string { + if x != nil && x.SrcName != nil { + return *x.SrcName } - return 0 + return "" } -func (x *PatternFlowVxlanFlagsCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *ActionResponseProtocolIpv4PingResponse) GetDstIp() string { + if x != nil && x.DstIp != nil { + return *x.DstIp } - return 0 + return "" } -func (x *PatternFlowVxlanFlagsCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *ActionResponseProtocolIpv4PingResponse) GetResult() ActionResponseProtocolIpv4PingResponse_Result_Enum { + if x != nil && x.Result != nil { + return *x.Result } - return 0 + return ActionResponseProtocolIpv4PingResponse_Result_unspecified } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowVxlanFlagsMetricTag struct { +// Actions associated with IPv6 on configured resources. +type ActionProtocolIpv6 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field + // Description missing in models // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 8 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + Choice *ActionProtocolIpv6_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionProtocolIpv6_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Ping *ActionProtocolIpv6Ping `protobuf:"bytes,2,opt,name=ping,proto3" json:"ping,omitempty"` } -func (x *PatternFlowVxlanFlagsMetricTag) Reset() { - *x = PatternFlowVxlanFlagsMetricTag{} +func (x *ActionProtocolIpv6) Reset() { + *x = ActionProtocolIpv6{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[446] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60235,13 +61626,13 @@ func (x *PatternFlowVxlanFlagsMetricTag) Reset() { } } -func (x *PatternFlowVxlanFlagsMetricTag) String() string { +func (x *ActionProtocolIpv6) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanFlagsMetricTag) ProtoMessage() {} +func (*ActionProtocolIpv6) ProtoMessage() {} -func (x *PatternFlowVxlanFlagsMetricTag) ProtoReflect() protoreflect.Message { +func (x *ActionProtocolIpv6) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[446] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60253,61 +61644,40 @@ func (x *PatternFlowVxlanFlagsMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanFlagsMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanFlagsMetricTag) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionProtocolIpv6.ProtoReflect.Descriptor instead. +func (*ActionProtocolIpv6) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{446} } -func (x *PatternFlowVxlanFlagsMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatternFlowVxlanFlagsMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *ActionProtocolIpv6) GetChoice() ActionProtocolIpv6_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return ActionProtocolIpv6_Choice_unspecified } -func (x *PatternFlowVxlanFlagsMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *ActionProtocolIpv6) GetPing() *ActionProtocolIpv6Ping { + if x != nil { + return x.Ping } - return 0 + return nil } -// Flags field with a bit format of RRRRIRRR. The I flag MUST be set to 1 for a valid -// vxlan network id (VNI). The other 7 bits (designated R) are reserved fields and -// MUST be set to zero on transmission and ignored on receipt. -type PatternFlowVxlanFlags struct { +// Response for actions associated with IPv6 on configured resources. +type ActionResponseProtocolIpv6 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowVxlanFlags_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVxlanFlags_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 8 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [8] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowVxlanFlagsCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // required = true + Choice *ActionResponseProtocolIpv6_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionResponseProtocolIpv6_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Decrement *PatternFlowVxlanFlagsCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowVxlanFlagsMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + Ping *ActionResponseProtocolIpv6Ping `protobuf:"bytes,2,opt,name=ping,proto3" json:"ping,omitempty"` } -func (x *PatternFlowVxlanFlags) Reset() { - *x = PatternFlowVxlanFlags{} +func (x *ActionResponseProtocolIpv6) Reset() { + *x = ActionResponseProtocolIpv6{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[447] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60315,13 +61685,13 @@ func (x *PatternFlowVxlanFlags) Reset() { } } -func (x *PatternFlowVxlanFlags) String() string { +func (x *ActionResponseProtocolIpv6) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanFlags) ProtoMessage() {} +func (*ActionResponseProtocolIpv6) ProtoMessage() {} -func (x *PatternFlowVxlanFlags) ProtoReflect() protoreflect.Message { +func (x *ActionResponseProtocolIpv6) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[447] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60333,72 +61703,37 @@ func (x *PatternFlowVxlanFlags) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanFlags.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanFlags) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionResponseProtocolIpv6.ProtoReflect.Descriptor instead. +func (*ActionResponseProtocolIpv6) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{447} } -func (x *PatternFlowVxlanFlags) GetChoice() PatternFlowVxlanFlags_Choice_Enum { +func (x *ActionResponseProtocolIpv6) GetChoice() ActionResponseProtocolIpv6_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowVxlanFlags_Choice_unspecified -} - -func (x *PatternFlowVxlanFlags) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowVxlanFlags) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowVxlanFlags) GetIncrement() *PatternFlowVxlanFlagsCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowVxlanFlags) GetDecrement() *PatternFlowVxlanFlagsCounter { - if x != nil { - return x.Decrement - } - return nil + return ActionResponseProtocolIpv6_Choice_unspecified } -func (x *PatternFlowVxlanFlags) GetMetricTags() []*PatternFlowVxlanFlagsMetricTag { +func (x *ActionResponseProtocolIpv6) GetPing() *ActionResponseProtocolIpv6Ping { if x != nil { - return x.MetricTags + return x.Ping } return nil } -// integer counter pattern -type PatternFlowVxlanReserved0Counter struct { +// Request for initiating ping between multiple source and destination pairs. +type ActionProtocolIpv6Ping struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // List of IPv6 ping requests. + Requests []*ActionProtocolIpv6PingRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` } -func (x *PatternFlowVxlanReserved0Counter) Reset() { - *x = PatternFlowVxlanReserved0Counter{} +func (x *ActionProtocolIpv6Ping) Reset() { + *x = ActionProtocolIpv6Ping{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[448] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60406,13 +61741,13 @@ func (x *PatternFlowVxlanReserved0Counter) Reset() { } } -func (x *PatternFlowVxlanReserved0Counter) String() string { +func (x *ActionProtocolIpv6Ping) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanReserved0Counter) ProtoMessage() {} +func (*ActionProtocolIpv6Ping) ProtoMessage() {} -func (x *PatternFlowVxlanReserved0Counter) ProtoReflect() protoreflect.Message { +func (x *ActionProtocolIpv6Ping) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[448] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60424,55 +61759,44 @@ func (x *PatternFlowVxlanReserved0Counter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanReserved0Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanReserved0Counter) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionProtocolIpv6Ping.ProtoReflect.Descriptor instead. +func (*ActionProtocolIpv6Ping) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{448} } -func (x *PatternFlowVxlanReserved0Counter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 -} - -func (x *PatternFlowVxlanReserved0Counter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step - } - return 0 -} - -func (x *PatternFlowVxlanReserved0Counter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *ActionProtocolIpv6Ping) GetRequests() []*ActionProtocolIpv6PingRequest { + if x != nil { + return x.Requests } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowVxlanReserved0MetricTag struct { +// Under Review: Most ping request parameters are still TBD. +// +// Under Review: Most ping request parameters are still TBD. +// +// Request for initiating ping between a single source and destination pair. +// For ping request, 1 IPv6 ICMP Echo Request shall be sent and wait for ping response +// to either succeed or time out. The API wait timeout for each request shall be 300ms. +type ActionProtocolIpv6PingRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 24 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // Name of source IPv6 interface to be used. + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + SrcName *string `protobuf:"bytes,1,opt,name=src_name,json=srcName,proto3,oneof" json:"src_name,omitempty"` + // Destination IPv6 address to ping. + DstIp *string `protobuf:"bytes,2,opt,name=dst_ip,json=dstIp,proto3,oneof" json:"dst_ip,omitempty"` } -func (x *PatternFlowVxlanReserved0MetricTag) Reset() { - *x = PatternFlowVxlanReserved0MetricTag{} +func (x *ActionProtocolIpv6PingRequest) Reset() { + *x = ActionProtocolIpv6PingRequest{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[449] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60480,13 +61804,13 @@ func (x *PatternFlowVxlanReserved0MetricTag) Reset() { } } -func (x *PatternFlowVxlanReserved0MetricTag) String() string { +func (x *ActionProtocolIpv6PingRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanReserved0MetricTag) ProtoMessage() {} +func (*ActionProtocolIpv6PingRequest) ProtoMessage() {} -func (x *PatternFlowVxlanReserved0MetricTag) ProtoReflect() protoreflect.Message { +func (x *ActionProtocolIpv6PingRequest) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[449] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60498,59 +61822,37 @@ func (x *PatternFlowVxlanReserved0MetricTag) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanReserved0MetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanReserved0MetricTag) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionProtocolIpv6PingRequest.ProtoReflect.Descriptor instead. +func (*ActionProtocolIpv6PingRequest) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{449} } -func (x *PatternFlowVxlanReserved0MetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *ActionProtocolIpv6PingRequest) GetSrcName() string { + if x != nil && x.SrcName != nil { + return *x.SrcName } return "" } -func (x *PatternFlowVxlanReserved0MetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset - } - return 0 -} - -func (x *PatternFlowVxlanReserved0MetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *ActionProtocolIpv6PingRequest) GetDstIp() string { + if x != nil && x.DstIp != nil { + return *x.DstIp } - return 0 + return "" } -// Reserved field -type PatternFlowVxlanReserved0 struct { +// Response for ping initiated between multiple source and destination pairs. +type ActionResponseProtocolIpv6Ping struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowVxlanReserved0_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVxlanReserved0_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowVxlanReserved0Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowVxlanReserved0Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowVxlanReserved0MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // List of responses for IPv6 ping responses. + Responses []*ActionResponseProtocolIpv6PingResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` } -func (x *PatternFlowVxlanReserved0) Reset() { - *x = PatternFlowVxlanReserved0{} +func (x *ActionResponseProtocolIpv6Ping) Reset() { + *x = ActionResponseProtocolIpv6Ping{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[450] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60558,13 +61860,13 @@ func (x *PatternFlowVxlanReserved0) Reset() { } } -func (x *PatternFlowVxlanReserved0) String() string { +func (x *ActionResponseProtocolIpv6Ping) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanReserved0) ProtoMessage() {} +func (*ActionResponseProtocolIpv6Ping) ProtoMessage() {} -func (x *PatternFlowVxlanReserved0) ProtoReflect() protoreflect.Message { +func (x *ActionResponseProtocolIpv6Ping) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[450] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60576,72 +61878,44 @@ func (x *PatternFlowVxlanReserved0) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanReserved0.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanReserved0) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionResponseProtocolIpv6Ping.ProtoReflect.Descriptor instead. +func (*ActionResponseProtocolIpv6Ping) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{450} } -func (x *PatternFlowVxlanReserved0) GetChoice() PatternFlowVxlanReserved0_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowVxlanReserved0_Choice_unspecified -} - -func (x *PatternFlowVxlanReserved0) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowVxlanReserved0) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowVxlanReserved0) GetIncrement() *PatternFlowVxlanReserved0Counter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowVxlanReserved0) GetDecrement() *PatternFlowVxlanReserved0Counter { - if x != nil { - return x.Decrement - } - return nil -} - -func (x *PatternFlowVxlanReserved0) GetMetricTags() []*PatternFlowVxlanReserved0MetricTag { +func (x *ActionResponseProtocolIpv6Ping) GetResponses() []*ActionResponseProtocolIpv6PingResponse { if x != nil { - return x.MetricTags + return x.Responses } return nil } -// integer counter pattern -type PatternFlowVxlanVniCounter struct { +// Response for ping initiated between a single source and destination pair. +type ActionResponseProtocolIpv6PingResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Name of source IPv6 interface used for ping. + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // + // required = true + SrcName *string `protobuf:"bytes,1,opt,name=src_name,json=srcName,proto3,oneof" json:"src_name,omitempty"` + // Destination IPv6 address used for ping. + // required = true + DstIp *string `protobuf:"bytes,2,opt,name=dst_ip,json=dstIp,proto3,oneof" json:"dst_ip,omitempty"` + // Result of the ping request. + // required = true + Result *ActionResponseProtocolIpv6PingResponse_Result_Enum `protobuf:"varint,3,opt,name=result,proto3,enum=otg.ActionResponseProtocolIpv6PingResponse_Result_Enum,oneof" json:"result,omitempty"` } -func (x *PatternFlowVxlanVniCounter) Reset() { - *x = PatternFlowVxlanVniCounter{} +func (x *ActionResponseProtocolIpv6PingResponse) Reset() { + *x = ActionResponseProtocolIpv6PingResponse{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[451] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60649,13 +61923,13 @@ func (x *PatternFlowVxlanVniCounter) Reset() { } } -func (x *PatternFlowVxlanVniCounter) String() string { +func (x *ActionResponseProtocolIpv6PingResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanVniCounter) ProtoMessage() {} +func (*ActionResponseProtocolIpv6PingResponse) ProtoMessage() {} -func (x *PatternFlowVxlanVniCounter) ProtoReflect() protoreflect.Message { +func (x *ActionResponseProtocolIpv6PingResponse) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[451] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60667,55 +61941,49 @@ func (x *PatternFlowVxlanVniCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanVniCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanVniCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionResponseProtocolIpv6PingResponse.ProtoReflect.Descriptor instead. +func (*ActionResponseProtocolIpv6PingResponse) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{451} } -func (x *PatternFlowVxlanVniCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *ActionResponseProtocolIpv6PingResponse) GetSrcName() string { + if x != nil && x.SrcName != nil { + return *x.SrcName } - return 0 + return "" } -func (x *PatternFlowVxlanVniCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *ActionResponseProtocolIpv6PingResponse) GetDstIp() string { + if x != nil && x.DstIp != nil { + return *x.DstIp } - return 0 + return "" } -func (x *PatternFlowVxlanVniCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *ActionResponseProtocolIpv6PingResponse) GetResult() ActionResponseProtocolIpv6PingResponse_Result_Enum { + if x != nil && x.Result != nil { + return *x.Result } - return 0 + return ActionResponseProtocolIpv6PingResponse_Result_unspecified } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowVxlanVniMetricTag struct { +// Actions associated with BGP on configured resources. +type ActionProtocolBgp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field + // Description missing in models // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 24 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + Choice *ActionProtocolBgp_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ActionProtocolBgp_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Notification *ActionProtocolBgpNotification `protobuf:"bytes,2,opt,name=notification,proto3" json:"notification,omitempty"` + // Description missing in models + InitiateGracefulRestart *ActionProtocolBgpInitiateGracefulRestart `protobuf:"bytes,3,opt,name=initiate_graceful_restart,json=initiateGracefulRestart,proto3" json:"initiate_graceful_restart,omitempty"` } -func (x *PatternFlowVxlanVniMetricTag) Reset() { - *x = PatternFlowVxlanVniMetricTag{} +func (x *ActionProtocolBgp) Reset() { + *x = ActionProtocolBgp{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[452] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60723,13 +61991,13 @@ func (x *PatternFlowVxlanVniMetricTag) Reset() { } } -func (x *PatternFlowVxlanVniMetricTag) String() string { +func (x *ActionProtocolBgp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanVniMetricTag) ProtoMessage() {} +func (*ActionProtocolBgp) ProtoMessage() {} -func (x *PatternFlowVxlanVniMetricTag) ProtoReflect() protoreflect.Message { +func (x *ActionProtocolBgp) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[452] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60741,64 +62009,81 @@ func (x *PatternFlowVxlanVniMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanVniMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanVniMetricTag) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionProtocolBgp.ProtoReflect.Descriptor instead. +func (*ActionProtocolBgp) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{452} } -func (x *PatternFlowVxlanVniMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *ActionProtocolBgp) GetChoice() ActionProtocolBgp_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return ActionProtocolBgp_Choice_unspecified } -func (x *PatternFlowVxlanVniMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *ActionProtocolBgp) GetNotification() *ActionProtocolBgpNotification { + if x != nil { + return x.Notification } - return 0 + return nil } -func (x *PatternFlowVxlanVniMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *ActionProtocolBgp) GetInitiateGracefulRestart() *ActionProtocolBgpInitiateGracefulRestart { + if x != nil { + return x.InitiateGracefulRestart } - return 0 + return nil } -// VXLAN network id -type PatternFlowVxlanVni struct { +// A NOTIFICATION message is sent when an error is detected with the BGP session, such +// as hold timer expiring, misconfigured AS number or a BGP session reset is requested. +// This causes the BGP connection to close. Send explicit NOTIFICATIONs for list of +// specified BGP peers. If a user wants to send custom Error Code and Error Subcode +// the custom object should be configured. A user can send IANA defined BGP NOTIFICATIONs +// according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. +type ActionProtocolBgpNotification struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The names of BGP Peers to send NOTIFICATION to. If no name is specified then NOTIFICATION + // will be sent to all configured BGP peers. + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` + // Each BGP NOTIFICATION message includes an Error Code field indicating what type of + // problem occurred. For certain Error Codes, an Error Subcode field provides additional + // details about the specific nature of the problem. The choice value will provide + // the Error Code used in NOTIFICATION message. The Subcode can be set for each of + // the corresponding errors except for Hold Timer Expired error and BGP Finite State + // Machine error. In both of these cases Subcode 0 will be sent. If a user wants to + // use non zero Sub Code then custom choice can be used. + // default = Choice.Enum.cease + Choice *ActionProtocolBgpNotification_Choice_Enum `protobuf:"varint,2,opt,name=choice,proto3,enum=otg.ActionProtocolBgpNotification_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = Choice.Enum.auto - Choice *PatternFlowVxlanVni_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVxlanVni_Choice_Enum,oneof" json:"choice,omitempty"` + Cease *DeviceBgpCeaseError `protobuf:"bytes,3,opt,name=cease,proto3" json:"cease,omitempty"` // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + MessageHeaderError *DeviceBgpMessageHeaderError `protobuf:"bytes,4,opt,name=message_header_error,json=messageHeaderError,proto3" json:"message_header_error,omitempty"` // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // The OTG implementation can provide a system generated - // value for this property. If the OTG is unable to generate a value - // the default value must be used. - // default = 0 - Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` + OpenMessageError *DeviceBgpOpenMessageError `protobuf:"bytes,5,opt,name=open_message_error,json=openMessageError,proto3" json:"open_message_error,omitempty"` // Description missing in models - Increment *PatternFlowVxlanVniCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` + UpdateMessageError *DeviceBgpUpdateMessageError `protobuf:"bytes,6,opt,name=update_message_error,json=updateMessageError,proto3" json:"update_message_error,omitempty"` // Description missing in models - Decrement *PatternFlowVxlanVniCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowVxlanVniMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + HoldTimerExpired *DeviceBgpHoldTimerExpired `protobuf:"bytes,7,opt,name=hold_timer_expired,json=holdTimerExpired,proto3" json:"hold_timer_expired,omitempty"` + // Description missing in models + FiniteStateMachineError *DeviceBgpFiniteStateMachineError `protobuf:"bytes,8,opt,name=finite_state_machine_error,json=finiteStateMachineError,proto3" json:"finite_state_machine_error,omitempty"` + // Description missing in models + Custom *DeviceBgpCustomError `protobuf:"bytes,9,opt,name=custom,proto3" json:"custom,omitempty"` } -func (x *PatternFlowVxlanVni) Reset() { - *x = PatternFlowVxlanVni{} +func (x *ActionProtocolBgpNotification) Reset() { + *x = ActionProtocolBgpNotification{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[453] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60806,13 +62091,13 @@ func (x *PatternFlowVxlanVni) Reset() { } } -func (x *PatternFlowVxlanVni) String() string { +func (x *ActionProtocolBgpNotification) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanVni) ProtoMessage() {} +func (*ActionProtocolBgpNotification) ProtoMessage() {} -func (x *PatternFlowVxlanVni) ProtoReflect() protoreflect.Message { +func (x *ActionProtocolBgpNotification) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[453] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60824,79 +62109,108 @@ func (x *PatternFlowVxlanVni) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanVni.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanVni) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionProtocolBgpNotification.ProtoReflect.Descriptor instead. +func (*ActionProtocolBgpNotification) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{453} } -func (x *PatternFlowVxlanVni) GetChoice() PatternFlowVxlanVni_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *ActionProtocolBgpNotification) GetNames() []string { + if x != nil { + return x.Names } - return PatternFlowVxlanVni_Choice_unspecified + return nil } -func (x *PatternFlowVxlanVni) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *ActionProtocolBgpNotification) GetChoice() ActionProtocolBgpNotification_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return ActionProtocolBgpNotification_Choice_unspecified } -func (x *PatternFlowVxlanVni) GetValues() []uint32 { +func (x *ActionProtocolBgpNotification) GetCease() *DeviceBgpCeaseError { if x != nil { - return x.Values + return x.Cease } return nil } -func (x *PatternFlowVxlanVni) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto +func (x *ActionProtocolBgpNotification) GetMessageHeaderError() *DeviceBgpMessageHeaderError { + if x != nil { + return x.MessageHeaderError } - return 0 + return nil } -func (x *PatternFlowVxlanVni) GetIncrement() *PatternFlowVxlanVniCounter { +func (x *ActionProtocolBgpNotification) GetOpenMessageError() *DeviceBgpOpenMessageError { if x != nil { - return x.Increment + return x.OpenMessageError } return nil } -func (x *PatternFlowVxlanVni) GetDecrement() *PatternFlowVxlanVniCounter { +func (x *ActionProtocolBgpNotification) GetUpdateMessageError() *DeviceBgpUpdateMessageError { if x != nil { - return x.Decrement + return x.UpdateMessageError } return nil } -func (x *PatternFlowVxlanVni) GetMetricTags() []*PatternFlowVxlanVniMetricTag { +func (x *ActionProtocolBgpNotification) GetHoldTimerExpired() *DeviceBgpHoldTimerExpired { if x != nil { - return x.MetricTags + return x.HoldTimerExpired } return nil } -// integer counter pattern -type PatternFlowVxlanReserved1Counter struct { +func (x *ActionProtocolBgpNotification) GetFiniteStateMachineError() *DeviceBgpFiniteStateMachineError { + if x != nil { + return x.FiniteStateMachineError + } + return nil +} + +func (x *ActionProtocolBgpNotification) GetCustom() *DeviceBgpCustomError { + if x != nil { + return x.Custom + } + return nil +} + +// Initiates BGP Graceful Restart process for the selected BGP peers. If no name is +// specified then Graceful Restart will be sent to all configured BGP peers. To emulate +// scenarios where a peer sends a Notification and stops the session, an optional Notification +// object is included. If the remote peer and the local peer are both configured to +// perform Graceful Restart for Notification triggered session , this will result in +// Graceful Restart scenario to be triggered as per RFC8538. +type ActionProtocolBgpInitiateGracefulRestart struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The names of device BGP peers objects to control. + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + PeerNames []string `protobuf:"bytes,1,rep,name=peer_names,json=peerNames,proto3" json:"peer_names,omitempty"` + // Duration (in seconds) after which selected BGP peers will initiate + // Graceful restart by sending the Open Message with Restart State bit set in the Graceful + // Restart capability. + // default = 30 + RestartDelay *uint32 `protobuf:"varint,2,opt,name=restart_delay,json=restartDelay,proto3,oneof" json:"restart_delay,omitempty"` + // Send a Notification to the peer as per configured parameters when initially bringing + // down a session as per + // configured parameters. + Notification *ActionProtocolBgpGracefulRestartNotification `protobuf:"bytes,3,opt,name=notification,proto3" json:"notification,omitempty"` } -func (x *PatternFlowVxlanReserved1Counter) Reset() { - *x = PatternFlowVxlanReserved1Counter{} +func (x *ActionProtocolBgpInitiateGracefulRestart) Reset() { + *x = ActionProtocolBgpInitiateGracefulRestart{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[454] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60904,13 +62218,13 @@ func (x *PatternFlowVxlanReserved1Counter) Reset() { } } -func (x *PatternFlowVxlanReserved1Counter) String() string { +func (x *ActionProtocolBgpInitiateGracefulRestart) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanReserved1Counter) ProtoMessage() {} +func (*ActionProtocolBgpInitiateGracefulRestart) ProtoMessage() {} -func (x *PatternFlowVxlanReserved1Counter) ProtoReflect() protoreflect.Message { +func (x *ActionProtocolBgpInitiateGracefulRestart) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[454] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60922,55 +62236,68 @@ func (x *PatternFlowVxlanReserved1Counter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanReserved1Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanReserved1Counter) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionProtocolBgpInitiateGracefulRestart.ProtoReflect.Descriptor instead. +func (*ActionProtocolBgpInitiateGracefulRestart) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{454} } -func (x *PatternFlowVxlanReserved1Counter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *ActionProtocolBgpInitiateGracefulRestart) GetPeerNames() []string { + if x != nil { + return x.PeerNames } - return 0 + return nil } -func (x *PatternFlowVxlanReserved1Counter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *ActionProtocolBgpInitiateGracefulRestart) GetRestartDelay() uint32 { + if x != nil && x.RestartDelay != nil { + return *x.RestartDelay } return 0 } -func (x *PatternFlowVxlanReserved1Counter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *ActionProtocolBgpInitiateGracefulRestart) GetNotification() *ActionProtocolBgpGracefulRestartNotification { + if x != nil { + return x.Notification } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowVxlanReserved1MetricTag struct { +// Defines the explicit contents of the NOTIFICATION message to be sent when executing +// InitiateGracefulRestart trigger. This causes the BGP connection to close.If a user +// wants to send custom Error Code and Error Subcode the custom object should be configured. +// A user can send IANA defined BGP NOTIFICATIONs according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. +type ActionProtocolBgpGracefulRestartNotification struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 8 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // Each BGP NOTIFICATION message includes an Error Code field indicating what type of + // problem occurred. For certain Error Codes, an Error Subcode field provides additional + // details about the specific nature of the problem. The choice value will provide + // the Error Code used in NOTIFICATION message. The Subcode can be set for each of + // the corresponding errors except for Hold Timer Expired error and BGP Finite State + // Machine error. In both of these cases Subcode 0 will be sent. If a user wants to + // use non zero Sub Code then custom choice can be used. + // default = Choice.Enum.cease + Choice *ActionProtocolBgpGracefulRestartNotification_Choice_Enum `protobuf:"varint,2,opt,name=choice,proto3,enum=otg.ActionProtocolBgpGracefulRestartNotification_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Cease *DeviceBgpCeaseError `protobuf:"bytes,3,opt,name=cease,proto3" json:"cease,omitempty"` + // Description missing in models + MessageHeaderError *DeviceBgpMessageHeaderError `protobuf:"bytes,4,opt,name=message_header_error,json=messageHeaderError,proto3" json:"message_header_error,omitempty"` + // Description missing in models + OpenMessageError *DeviceBgpOpenMessageError `protobuf:"bytes,5,opt,name=open_message_error,json=openMessageError,proto3" json:"open_message_error,omitempty"` + // Description missing in models + UpdateMessageError *DeviceBgpUpdateMessageError `protobuf:"bytes,6,opt,name=update_message_error,json=updateMessageError,proto3" json:"update_message_error,omitempty"` + // Description missing in models + HoldTimerExpired *DeviceBgpHoldTimerExpired `protobuf:"bytes,7,opt,name=hold_timer_expired,json=holdTimerExpired,proto3" json:"hold_timer_expired,omitempty"` + // Description missing in models + FiniteStateMachineError *DeviceBgpFiniteStateMachineError `protobuf:"bytes,8,opt,name=finite_state_machine_error,json=finiteStateMachineError,proto3" json:"finite_state_machine_error,omitempty"` + // Description missing in models + Custom *DeviceBgpCustomError `protobuf:"bytes,9,opt,name=custom,proto3" json:"custom,omitempty"` } -func (x *PatternFlowVxlanReserved1MetricTag) Reset() { - *x = PatternFlowVxlanReserved1MetricTag{} +func (x *ActionProtocolBgpGracefulRestartNotification) Reset() { + *x = ActionProtocolBgpGracefulRestartNotification{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[455] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60978,13 +62305,13 @@ func (x *PatternFlowVxlanReserved1MetricTag) Reset() { } } -func (x *PatternFlowVxlanReserved1MetricTag) String() string { +func (x *ActionProtocolBgpGracefulRestartNotification) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanReserved1MetricTag) ProtoMessage() {} +func (*ActionProtocolBgpGracefulRestartNotification) ProtoMessage() {} -func (x *PatternFlowVxlanReserved1MetricTag) ProtoReflect() protoreflect.Message { +func (x *ActionProtocolBgpGracefulRestartNotification) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[455] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60996,59 +62323,108 @@ func (x *PatternFlowVxlanReserved1MetricTag) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanReserved1MetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanReserved1MetricTag) Descriptor() ([]byte, []int) { +// Deprecated: Use ActionProtocolBgpGracefulRestartNotification.ProtoReflect.Descriptor instead. +func (*ActionProtocolBgpGracefulRestartNotification) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{455} } -func (x *PatternFlowVxlanReserved1MetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *ActionProtocolBgpGracefulRestartNotification) GetChoice() ActionProtocolBgpGracefulRestartNotification_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return ActionProtocolBgpGracefulRestartNotification_Choice_unspecified } -func (x *PatternFlowVxlanReserved1MetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *ActionProtocolBgpGracefulRestartNotification) GetCease() *DeviceBgpCeaseError { + if x != nil { + return x.Cease } - return 0 + return nil } -func (x *PatternFlowVxlanReserved1MetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *ActionProtocolBgpGracefulRestartNotification) GetMessageHeaderError() *DeviceBgpMessageHeaderError { + if x != nil { + return x.MessageHeaderError } - return 0 + return nil } -// Reserved field -type PatternFlowVxlanReserved1 struct { +func (x *ActionProtocolBgpGracefulRestartNotification) GetOpenMessageError() *DeviceBgpOpenMessageError { + if x != nil { + return x.OpenMessageError + } + return nil +} + +func (x *ActionProtocolBgpGracefulRestartNotification) GetUpdateMessageError() *DeviceBgpUpdateMessageError { + if x != nil { + return x.UpdateMessageError + } + return nil +} + +func (x *ActionProtocolBgpGracefulRestartNotification) GetHoldTimerExpired() *DeviceBgpHoldTimerExpired { + if x != nil { + return x.HoldTimerExpired + } + return nil +} + +func (x *ActionProtocolBgpGracefulRestartNotification) GetFiniteStateMachineError() *DeviceBgpFiniteStateMachineError { + if x != nil { + return x.FiniteStateMachineError + } + return nil +} + +func (x *ActionProtocolBgpGracefulRestartNotification) GetCustom() *DeviceBgpCustomError { + if x != nil { + return x.Custom + } + return nil +} + +// Request to traffic generator for metrics of choice. +type MetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowVxlanReserved1_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVxlanReserved1_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.port + Choice *MetricsRequest_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.MetricsRequest_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + Port *PortMetricsRequest `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + Flow *FlowMetricsRequest `protobuf:"bytes,3,opt,name=flow,proto3" json:"flow,omitempty"` // Description missing in models - Increment *PatternFlowVxlanReserved1Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Bgpv4 *Bgpv4MetricsRequest `protobuf:"bytes,4,opt,name=bgpv4,proto3" json:"bgpv4,omitempty"` // Description missing in models - Decrement *PatternFlowVxlanReserved1Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowVxlanReserved1MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + Bgpv6 *Bgpv6MetricsRequest `protobuf:"bytes,5,opt,name=bgpv6,proto3" json:"bgpv6,omitempty"` + // Description missing in models + Isis *IsisMetricsRequest `protobuf:"bytes,6,opt,name=isis,proto3" json:"isis,omitempty"` + // Description missing in models + Lag *LagMetricsRequest `protobuf:"bytes,7,opt,name=lag,proto3" json:"lag,omitempty"` + // Description missing in models + Lacp *LacpMetricsRequest `protobuf:"bytes,8,opt,name=lacp,proto3" json:"lacp,omitempty"` + // Description missing in models + Lldp *LldpMetricsRequest `protobuf:"bytes,9,opt,name=lldp,proto3" json:"lldp,omitempty"` + // Description missing in models + Rsvp *RsvpMetricsRequest `protobuf:"bytes,10,opt,name=rsvp,proto3" json:"rsvp,omitempty"` + // Description missing in models + Dhcpv4Client *Dhcpv4ClientMetricsRequest `protobuf:"bytes,11,opt,name=dhcpv4_client,json=dhcpv4Client,proto3" json:"dhcpv4_client,omitempty"` + // Description missing in models + Dhcpv4Server *Dhcpv4ServerMetricsRequest `protobuf:"bytes,12,opt,name=dhcpv4_server,json=dhcpv4Server,proto3" json:"dhcpv4_server,omitempty"` + // Description missing in models + Dhcpv6Client *Dhcpv6ClientMetricsRequest `protobuf:"bytes,13,opt,name=dhcpv6_client,json=dhcpv6Client,proto3" json:"dhcpv6_client,omitempty"` + // Description missing in models + Dhcpv6Server *Dhcpv6ServerMetricsRequest `protobuf:"bytes,14,opt,name=dhcpv6_server,json=dhcpv6Server,proto3" json:"dhcpv6_server,omitempty"` + // Description missing in models + Ospfv2 *Ospfv2MetricsRequest `protobuf:"bytes,15,opt,name=ospfv2,proto3" json:"ospfv2,omitempty"` } -func (x *PatternFlowVxlanReserved1) Reset() { - *x = PatternFlowVxlanReserved1{} +func (x *MetricsRequest) Reset() { + *x = MetricsRequest{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[456] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -61056,13 +62432,13 @@ func (x *PatternFlowVxlanReserved1) Reset() { } } -func (x *PatternFlowVxlanReserved1) String() string { +func (x *MetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanReserved1) ProtoMessage() {} +func (*MetricsRequest) ProtoMessage() {} -func (x *PatternFlowVxlanReserved1) ProtoReflect() protoreflect.Message { +func (x *MetricsRequest) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[456] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -61074,161 +62450,172 @@ func (x *PatternFlowVxlanReserved1) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanReserved1.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanReserved1) Descriptor() ([]byte, []int) { +// Deprecated: Use MetricsRequest.ProtoReflect.Descriptor instead. +func (*MetricsRequest) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{456} } -func (x *PatternFlowVxlanReserved1) GetChoice() PatternFlowVxlanReserved1_Choice_Enum { +func (x *MetricsRequest) GetChoice() MetricsRequest_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowVxlanReserved1_Choice_unspecified + return MetricsRequest_Choice_unspecified } -func (x *PatternFlowVxlanReserved1) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *MetricsRequest) GetPort() *PortMetricsRequest { + if x != nil { + return x.Port } - return 0 + return nil } -func (x *PatternFlowVxlanReserved1) GetValues() []uint32 { +func (x *MetricsRequest) GetFlow() *FlowMetricsRequest { if x != nil { - return x.Values + return x.Flow } return nil } -func (x *PatternFlowVxlanReserved1) GetIncrement() *PatternFlowVxlanReserved1Counter { +func (x *MetricsRequest) GetBgpv4() *Bgpv4MetricsRequest { if x != nil { - return x.Increment + return x.Bgpv4 } return nil } -func (x *PatternFlowVxlanReserved1) GetDecrement() *PatternFlowVxlanReserved1Counter { +func (x *MetricsRequest) GetBgpv6() *Bgpv6MetricsRequest { if x != nil { - return x.Decrement + return x.Bgpv6 } return nil } -func (x *PatternFlowVxlanReserved1) GetMetricTags() []*PatternFlowVxlanReserved1MetricTag { +func (x *MetricsRequest) GetIsis() *IsisMetricsRequest { if x != nil { - return x.MetricTags + return x.Isis } return nil } -// integer counter pattern -type PatternFlowIpv4VersionCounter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = 4 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` +func (x *MetricsRequest) GetLag() *LagMetricsRequest { + if x != nil { + return x.Lag + } + return nil } -func (x *PatternFlowIpv4VersionCounter) Reset() { - *x = PatternFlowIpv4VersionCounter{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[457] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *MetricsRequest) GetLacp() *LacpMetricsRequest { + if x != nil { + return x.Lacp } + return nil } -func (x *PatternFlowIpv4VersionCounter) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *MetricsRequest) GetLldp() *LldpMetricsRequest { + if x != nil { + return x.Lldp + } + return nil } -func (*PatternFlowIpv4VersionCounter) ProtoMessage() {} +func (x *MetricsRequest) GetRsvp() *RsvpMetricsRequest { + if x != nil { + return x.Rsvp + } + return nil +} -func (x *PatternFlowIpv4VersionCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[457] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *MetricsRequest) GetDhcpv4Client() *Dhcpv4ClientMetricsRequest { + if x != nil { + return x.Dhcpv4Client } - return mi.MessageOf(x) + return nil } -// Deprecated: Use PatternFlowIpv4VersionCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4VersionCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{457} +func (x *MetricsRequest) GetDhcpv4Server() *Dhcpv4ServerMetricsRequest { + if x != nil { + return x.Dhcpv4Server + } + return nil } -func (x *PatternFlowIpv4VersionCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *MetricsRequest) GetDhcpv6Client() *Dhcpv6ClientMetricsRequest { + if x != nil { + return x.Dhcpv6Client } - return 0 + return nil } -func (x *PatternFlowIpv4VersionCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *MetricsRequest) GetDhcpv6Server() *Dhcpv6ServerMetricsRequest { + if x != nil { + return x.Dhcpv6Server } - return 0 + return nil } -func (x *PatternFlowIpv4VersionCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *MetricsRequest) GetOspfv2() *Ospfv2MetricsRequest { + if x != nil { + return x.Ospfv2 } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4VersionMetricTag struct { +// Response containing chosen traffic generator metrics. +type MetricsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 4 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // Description missing in models + // default = Choice.Enum.port_metrics + Choice *MetricsResponse_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.MetricsResponse_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + PortMetrics []*PortMetric `protobuf:"bytes,2,rep,name=port_metrics,json=portMetrics,proto3" json:"port_metrics,omitempty"` + // Description missing in models + FlowMetrics []*FlowMetric `protobuf:"bytes,3,rep,name=flow_metrics,json=flowMetrics,proto3" json:"flow_metrics,omitempty"` + // Description missing in models + Bgpv4Metrics []*Bgpv4Metric `protobuf:"bytes,4,rep,name=bgpv4_metrics,json=bgpv4Metrics,proto3" json:"bgpv4_metrics,omitempty"` + // Description missing in models + Bgpv6Metrics []*Bgpv6Metric `protobuf:"bytes,5,rep,name=bgpv6_metrics,json=bgpv6Metrics,proto3" json:"bgpv6_metrics,omitempty"` + // Description missing in models + IsisMetrics []*IsisMetric `protobuf:"bytes,6,rep,name=isis_metrics,json=isisMetrics,proto3" json:"isis_metrics,omitempty"` + // Description missing in models + LagMetrics []*LagMetric `protobuf:"bytes,7,rep,name=lag_metrics,json=lagMetrics,proto3" json:"lag_metrics,omitempty"` + // Description missing in models + LacpMetrics []*LacpMetric `protobuf:"bytes,8,rep,name=lacp_metrics,json=lacpMetrics,proto3" json:"lacp_metrics,omitempty"` + // Description missing in models + LldpMetrics []*LldpMetric `protobuf:"bytes,9,rep,name=lldp_metrics,json=lldpMetrics,proto3" json:"lldp_metrics,omitempty"` + // Description missing in models + RsvpMetrics []*RsvpMetric `protobuf:"bytes,10,rep,name=rsvp_metrics,json=rsvpMetrics,proto3" json:"rsvp_metrics,omitempty"` + // Description missing in models + Dhcpv4ClientMetrics []*Dhcpv4ClientMetric `protobuf:"bytes,11,rep,name=dhcpv4client_metrics,json=dhcpv4clientMetrics,proto3" json:"dhcpv4client_metrics,omitempty"` + // Description missing in models + Dhcpv4ServerMetrics []*Dhcpv4ServerMetric `protobuf:"bytes,12,rep,name=dhcpv4server_metrics,json=dhcpv4serverMetrics,proto3" json:"dhcpv4server_metrics,omitempty"` + // Description missing in models + Dhcpv6ClientMetrics []*Dhcpv6ClientMetric `protobuf:"bytes,13,rep,name=dhcpv6client_metrics,json=dhcpv6clientMetrics,proto3" json:"dhcpv6client_metrics,omitempty"` + // Description missing in models + Dhcpv6ServerMetrics []*Dhcpv6ServerMetric `protobuf:"bytes,14,rep,name=dhcpv6server_metrics,json=dhcpv6serverMetrics,proto3" json:"dhcpv6server_metrics,omitempty"` + // Description missing in models + Ospfv2Metrics []*Ospfv2Metric `protobuf:"bytes,15,rep,name=ospfv2_metrics,json=ospfv2Metrics,proto3" json:"ospfv2_metrics,omitempty"` } -func (x *PatternFlowIpv4VersionMetricTag) Reset() { - *x = PatternFlowIpv4VersionMetricTag{} +func (x *MetricsResponse) Reset() { + *x = MetricsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[458] + mi := &file_otg_proto_msgTypes[457] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4VersionMetricTag) String() string { +func (x *MetricsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4VersionMetricTag) ProtoMessage() {} +func (*MetricsResponse) ProtoMessage() {} -func (x *PatternFlowIpv4VersionMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[458] +func (x *MetricsResponse) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[457] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61239,165 +62626,153 @@ func (x *PatternFlowIpv4VersionMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4VersionMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4VersionMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{458} +// Deprecated: Use MetricsResponse.ProtoReflect.Descriptor instead. +func (*MetricsResponse) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{457} } -func (x *PatternFlowIpv4VersionMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *MetricsResponse) GetChoice() MetricsResponse_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return MetricsResponse_Choice_unspecified } -func (x *PatternFlowIpv4VersionMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *MetricsResponse) GetPortMetrics() []*PortMetric { + if x != nil { + return x.PortMetrics } - return 0 + return nil } -func (x *PatternFlowIpv4VersionMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *MetricsResponse) GetFlowMetrics() []*FlowMetric { + if x != nil { + return x.FlowMetrics } - return 0 + return nil } -// Version -type PatternFlowIpv4Version struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4Version_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4Version_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 4 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [4] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4VersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4VersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4VersionMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` +func (x *MetricsResponse) GetBgpv4Metrics() []*Bgpv4Metric { + if x != nil { + return x.Bgpv4Metrics + } + return nil } -func (x *PatternFlowIpv4Version) Reset() { - *x = PatternFlowIpv4Version{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[459] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *MetricsResponse) GetBgpv6Metrics() []*Bgpv6Metric { + if x != nil { + return x.Bgpv6Metrics } + return nil } -func (x *PatternFlowIpv4Version) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *MetricsResponse) GetIsisMetrics() []*IsisMetric { + if x != nil { + return x.IsisMetrics + } + return nil } -func (*PatternFlowIpv4Version) ProtoMessage() {} +func (x *MetricsResponse) GetLagMetrics() []*LagMetric { + if x != nil { + return x.LagMetrics + } + return nil +} -func (x *PatternFlowIpv4Version) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[459] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *MetricsResponse) GetLacpMetrics() []*LacpMetric { + if x != nil { + return x.LacpMetrics } - return mi.MessageOf(x) + return nil } -// Deprecated: Use PatternFlowIpv4Version.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4Version) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{459} +func (x *MetricsResponse) GetLldpMetrics() []*LldpMetric { + if x != nil { + return x.LldpMetrics + } + return nil } -func (x *PatternFlowIpv4Version) GetChoice() PatternFlowIpv4Version_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *MetricsResponse) GetRsvpMetrics() []*RsvpMetric { + if x != nil { + return x.RsvpMetrics } - return PatternFlowIpv4Version_Choice_unspecified + return nil } -func (x *PatternFlowIpv4Version) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *MetricsResponse) GetDhcpv4ClientMetrics() []*Dhcpv4ClientMetric { + if x != nil { + return x.Dhcpv4ClientMetrics } - return 0 + return nil } -func (x *PatternFlowIpv4Version) GetValues() []uint32 { +func (x *MetricsResponse) GetDhcpv4ServerMetrics() []*Dhcpv4ServerMetric { if x != nil { - return x.Values + return x.Dhcpv4ServerMetrics } return nil } -func (x *PatternFlowIpv4Version) GetIncrement() *PatternFlowIpv4VersionCounter { +func (x *MetricsResponse) GetDhcpv6ClientMetrics() []*Dhcpv6ClientMetric { if x != nil { - return x.Increment + return x.Dhcpv6ClientMetrics } return nil } -func (x *PatternFlowIpv4Version) GetDecrement() *PatternFlowIpv4VersionCounter { +func (x *MetricsResponse) GetDhcpv6ServerMetrics() []*Dhcpv6ServerMetric { if x != nil { - return x.Decrement + return x.Dhcpv6ServerMetrics } return nil } -func (x *PatternFlowIpv4Version) GetMetricTags() []*PatternFlowIpv4VersionMetricTag { +func (x *MetricsResponse) GetOspfv2Metrics() []*Ospfv2Metric { if x != nil { - return x.MetricTags + return x.Ospfv2Metrics } return nil } -// integer counter pattern -type PatternFlowIpv4HeaderLengthCounter struct { +// The port result request to the traffic generator +type PortMetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 5 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The names of objects to return results for. An empty list will return all port row + // results. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // x-constraint: + // - /components/schemas/Port/properties/name + PortNames []string `protobuf:"bytes,1,rep,name=port_names,json=portNames,proto3" json:"port_names,omitempty"` + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned. The name of the port cannot be excluded. + ColumnNames []PortMetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.PortMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` } -func (x *PatternFlowIpv4HeaderLengthCounter) Reset() { - *x = PatternFlowIpv4HeaderLengthCounter{} +func (x *PortMetricsRequest) Reset() { + *x = PortMetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[460] + mi := &file_otg_proto_msgTypes[458] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4HeaderLengthCounter) String() string { +func (x *PortMetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4HeaderLengthCounter) ProtoMessage() {} +func (*PortMetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4HeaderLengthCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[460] +func (x *PortMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[458] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61408,70 +62783,84 @@ func (x *PatternFlowIpv4HeaderLengthCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4HeaderLengthCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4HeaderLengthCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{460} -} - -func (x *PatternFlowIpv4HeaderLengthCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use PortMetricsRequest.ProtoReflect.Descriptor instead. +func (*PortMetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{458} } -func (x *PatternFlowIpv4HeaderLengthCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *PortMetricsRequest) GetPortNames() []string { + if x != nil { + return x.PortNames } - return 0 + return nil } -func (x *PatternFlowIpv4HeaderLengthCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PortMetricsRequest) GetColumnNames() []PortMetricsRequest_ColumnNames_Enum { + if x != nil { + return x.ColumnNames } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4HeaderLengthMetricTag struct { +// Description missing in models +type PortMetric struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true + // The name of a configured port + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // x-constraint: + // - /components/schemas/Port/properties/name Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 4 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The state of the connection to the test port location. The format should be the configured + // port location along with any custom connection state message. + Location *string `protobuf:"bytes,2,opt,name=location,proto3,oneof" json:"location,omitempty"` + // The state of the test port link The string can be up, down or a custom error message. + Link *PortMetric_Link_Enum `protobuf:"varint,3,opt,name=link,proto3,enum=otg.PortMetric_Link_Enum,oneof" json:"link,omitempty"` + // The state of the test port capture infrastructure. The string can be started, stopped + // or a custom error message. + Capture *PortMetric_Capture_Enum `protobuf:"varint,4,opt,name=capture,proto3,enum=otg.PortMetric_Capture_Enum,oneof" json:"capture,omitempty"` + // The current total number of frames transmitted + FramesTx *uint64 `protobuf:"varint,5,opt,name=frames_tx,json=framesTx,proto3,oneof" json:"frames_tx,omitempty"` + // The current total number of valid frames received + FramesRx *uint64 `protobuf:"varint,6,opt,name=frames_rx,json=framesRx,proto3,oneof" json:"frames_rx,omitempty"` + // The current total number of bytes transmitted + BytesTx *uint64 `protobuf:"varint,7,opt,name=bytes_tx,json=bytesTx,proto3,oneof" json:"bytes_tx,omitempty"` + // The current total number of valid bytes received + BytesRx *uint64 `protobuf:"varint,8,opt,name=bytes_rx,json=bytesRx,proto3,oneof" json:"bytes_rx,omitempty"` + // The current rate of frames transmitted + FramesTxRate *float32 `protobuf:"fixed32,9,opt,name=frames_tx_rate,json=framesTxRate,proto3,oneof" json:"frames_tx_rate,omitempty"` + // The current rate of valid frames received + FramesRxRate *float32 `protobuf:"fixed32,10,opt,name=frames_rx_rate,json=framesRxRate,proto3,oneof" json:"frames_rx_rate,omitempty"` + // The current rate of bytes transmitted + BytesTxRate *float32 `protobuf:"fixed32,11,opt,name=bytes_tx_rate,json=bytesTxRate,proto3,oneof" json:"bytes_tx_rate,omitempty"` + // The current rate of bytes received + BytesRxRate *float32 `protobuf:"fixed32,12,opt,name=bytes_rx_rate,json=bytesRxRate,proto3,oneof" json:"bytes_rx_rate,omitempty"` + // The transmit state of the flow. + Transmit *PortMetric_Transmit_Enum `protobuf:"varint,13,opt,name=transmit,proto3,enum=otg.PortMetric_Transmit_Enum,oneof" json:"transmit,omitempty"` } -func (x *PatternFlowIpv4HeaderLengthMetricTag) Reset() { - *x = PatternFlowIpv4HeaderLengthMetricTag{} +func (x *PortMetric) Reset() { + *x = PortMetric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[461] + mi := &file_otg_proto_msgTypes[459] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4HeaderLengthMetricTag) String() string { +func (x *PortMetric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4HeaderLengthMetricTag) ProtoMessage() {} +func (*PortMetric) ProtoMessage() {} -func (x *PatternFlowIpv4HeaderLengthMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[461] +func (x *PortMetric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[459] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61482,177 +62871,141 @@ func (x *PatternFlowIpv4HeaderLengthMetricTag) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4HeaderLengthMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4HeaderLengthMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{461} +// Deprecated: Use PortMetric.ProtoReflect.Descriptor instead. +func (*PortMetric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{459} } -func (x *PatternFlowIpv4HeaderLengthMetricTag) GetName() string { +func (x *PortMetric) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIpv4HeaderLengthMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *PortMetric) GetLocation() string { + if x != nil && x.Location != nil { + return *x.Location } - return 0 + return "" } -func (x *PatternFlowIpv4HeaderLengthMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *PortMetric) GetLink() PortMetric_Link_Enum { + if x != nil && x.Link != nil { + return *x.Link } - return 0 -} - -// Header length -type PatternFlowIpv4HeaderLength struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = Choice.Enum.auto - Choice *PatternFlowIpv4HeaderLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4HeaderLength_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 5 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [5] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // The OTG implementation can provide a system generated - // value for this property. If the OTG is unable to generate a value - // the default value must be used. - // default = 5 - Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4HeaderLengthCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4HeaderLengthCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4HeaderLengthMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + return PortMetric_Link_unspecified } -func (x *PatternFlowIpv4HeaderLength) Reset() { - *x = PatternFlowIpv4HeaderLength{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[462] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PortMetric) GetCapture() PortMetric_Capture_Enum { + if x != nil && x.Capture != nil { + return *x.Capture } + return PortMetric_Capture_unspecified } -func (x *PatternFlowIpv4HeaderLength) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatternFlowIpv4HeaderLength) ProtoMessage() {} - -func (x *PatternFlowIpv4HeaderLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[462] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PortMetric) GetFramesTx() uint64 { + if x != nil && x.FramesTx != nil { + return *x.FramesTx } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowIpv4HeaderLength.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4HeaderLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{462} +func (x *PortMetric) GetFramesRx() uint64 { + if x != nil && x.FramesRx != nil { + return *x.FramesRx + } + return 0 } -func (x *PatternFlowIpv4HeaderLength) GetChoice() PatternFlowIpv4HeaderLength_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *PortMetric) GetBytesTx() uint64 { + if x != nil && x.BytesTx != nil { + return *x.BytesTx } - return PatternFlowIpv4HeaderLength_Choice_unspecified + return 0 } -func (x *PatternFlowIpv4HeaderLength) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PortMetric) GetBytesRx() uint64 { + if x != nil && x.BytesRx != nil { + return *x.BytesRx } return 0 } -func (x *PatternFlowIpv4HeaderLength) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *PortMetric) GetFramesTxRate() float32 { + if x != nil && x.FramesTxRate != nil { + return *x.FramesTxRate } - return nil + return 0 } -func (x *PatternFlowIpv4HeaderLength) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto +func (x *PortMetric) GetFramesRxRate() float32 { + if x != nil && x.FramesRxRate != nil { + return *x.FramesRxRate } return 0 } -func (x *PatternFlowIpv4HeaderLength) GetIncrement() *PatternFlowIpv4HeaderLengthCounter { - if x != nil { - return x.Increment +func (x *PortMetric) GetBytesTxRate() float32 { + if x != nil && x.BytesTxRate != nil { + return *x.BytesTxRate } - return nil + return 0 } -func (x *PatternFlowIpv4HeaderLength) GetDecrement() *PatternFlowIpv4HeaderLengthCounter { - if x != nil { - return x.Decrement +func (x *PortMetric) GetBytesRxRate() float32 { + if x != nil && x.BytesRxRate != nil { + return *x.BytesRxRate } - return nil + return 0 } -func (x *PatternFlowIpv4HeaderLength) GetMetricTags() []*PatternFlowIpv4HeaderLengthMetricTag { - if x != nil { - return x.MetricTags +func (x *PortMetric) GetTransmit() PortMetric_Transmit_Enum { + if x != nil && x.Transmit != nil { + return *x.Transmit } - return nil + return PortMetric_Transmit_unspecified } -// integer counter pattern -type PatternFlowIpv4TotalLengthCounter struct { +// The container for a flow metric request. +type FlowMetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Flow metrics will be retrieved for these flow names. + // If no flow names are specified then all flows will be returned. + // + // x-constraint: + // - /components/schemas/Flow/properties/name + // + // x-constraint: + // - /components/schemas/Flow/properties/name + FlowNames []string `protobuf:"bytes,1,rep,name=flow_names,json=flowNames,proto3" json:"flow_names,omitempty"` + // The list of metric names that the returned result set will contain. If the list is + // empty then all metrics will be returned. + MetricNames []FlowMetricsRequest_MetricNames_Enum `protobuf:"varint,3,rep,packed,name=metric_names,json=metricNames,proto3,enum=otg.FlowMetricsRequest_MetricNames_Enum" json:"metric_names,omitempty"` // Description missing in models - // default = 46 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + TaggedMetrics *FlowTaggedMetricsFilter `protobuf:"bytes,4,opt,name=tagged_metrics,json=taggedMetrics,proto3" json:"tagged_metrics,omitempty"` } -func (x *PatternFlowIpv4TotalLengthCounter) Reset() { - *x = PatternFlowIpv4TotalLengthCounter{} +func (x *FlowMetricsRequest) Reset() { + *x = FlowMetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[463] + mi := &file_otg_proto_msgTypes[460] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TotalLengthCounter) String() string { +func (x *FlowMetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TotalLengthCounter) ProtoMessage() {} +func (*FlowMetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4TotalLengthCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[463] +func (x *FlowMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[460] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61663,70 +63016,70 @@ func (x *PatternFlowIpv4TotalLengthCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TotalLengthCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TotalLengthCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{463} +// Deprecated: Use FlowMetricsRequest.ProtoReflect.Descriptor instead. +func (*FlowMetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{460} } -func (x *PatternFlowIpv4TotalLengthCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *FlowMetricsRequest) GetFlowNames() []string { + if x != nil { + return x.FlowNames } - return 0 + return nil } -func (x *PatternFlowIpv4TotalLengthCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *FlowMetricsRequest) GetMetricNames() []FlowMetricsRequest_MetricNames_Enum { + if x != nil { + return x.MetricNames } - return 0 + return nil } -func (x *PatternFlowIpv4TotalLengthCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *FlowMetricsRequest) GetTaggedMetrics() *FlowTaggedMetricsFilter { + if x != nil { + return x.TaggedMetrics } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4TotalLengthMetricTag struct { +// Filter for tagged metrics +type FlowTaggedMetricsFilter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // Controls inclusion/exclusion of tagged metrics when fetching flow metrics. + // default = True + Include *bool `protobuf:"varint,1,opt,name=include,proto3,oneof" json:"include,omitempty"` + // Controls inclusion/exclusion of tagged metrics where each underlying attributes has + // zero value or absent value. + // default = False + IncludeEmptyMetrics *bool `protobuf:"varint,2,opt,name=include_empty_metrics,json=includeEmptyMetrics,proto3,oneof" json:"include_empty_metrics,omitempty"` + // The list of metric names that the returned result set will contain. If the list is + // empty then all metrics will be returned. + MetricNames []FlowTaggedMetricsFilter_MetricNames_Enum `protobuf:"varint,3,rep,packed,name=metric_names,json=metricNames,proto3,enum=otg.FlowTaggedMetricsFilter_MetricNames_Enum" json:"metric_names,omitempty"` + // List of filters to selectively fetch tagged metrics with certain tag and corresponding + // value. + Filters []*FlowMetricTagFilter `protobuf:"bytes,4,rep,name=filters,proto3" json:"filters,omitempty"` } -func (x *PatternFlowIpv4TotalLengthMetricTag) Reset() { - *x = PatternFlowIpv4TotalLengthMetricTag{} +func (x *FlowTaggedMetricsFilter) Reset() { + *x = FlowTaggedMetricsFilter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[464] + mi := &file_otg_proto_msgTypes[461] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TotalLengthMetricTag) String() string { +func (x *FlowTaggedMetricsFilter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TotalLengthMetricTag) ProtoMessage() {} +func (*FlowTaggedMetricsFilter) ProtoMessage() {} -func (x *PatternFlowIpv4TotalLengthMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[464] +func (x *FlowTaggedMetricsFilter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[461] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61737,79 +63090,71 @@ func (x *PatternFlowIpv4TotalLengthMetricTag) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TotalLengthMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TotalLengthMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{464} +// Deprecated: Use FlowTaggedMetricsFilter.ProtoReflect.Descriptor instead. +func (*FlowTaggedMetricsFilter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{461} } -func (x *PatternFlowIpv4TotalLengthMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *FlowTaggedMetricsFilter) GetInclude() bool { + if x != nil && x.Include != nil { + return *x.Include } - return "" + return false } -func (x *PatternFlowIpv4TotalLengthMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *FlowTaggedMetricsFilter) GetIncludeEmptyMetrics() bool { + if x != nil && x.IncludeEmptyMetrics != nil { + return *x.IncludeEmptyMetrics } - return 0 + return false } -func (x *PatternFlowIpv4TotalLengthMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *FlowTaggedMetricsFilter) GetMetricNames() []FlowTaggedMetricsFilter_MetricNames_Enum { + if x != nil { + return x.MetricNames } - return 0 + return nil } -// Total length -type PatternFlowIpv4TotalLength struct { +func (x *FlowTaggedMetricsFilter) GetFilters() []*FlowMetricTagFilter { + if x != nil { + return x.Filters + } + return nil +} + +// A container for filtering ingress and/or egress metric tags. +// The Tx stats may not be applicable in both the request and response filter. +type FlowMetricTagFilter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.auto - Choice *PatternFlowIpv4TotalLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TotalLength_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 46 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [46] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // The OTG implementation can provide a system generated - // value for this property. If the OTG is unable to generate a value - // the default value must be used. - // default = 46 - Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4TotalLengthCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4TotalLengthCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4TotalLengthMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // A metric tag name that MUST exist in a flow packet or + // flow egress_packet configuration + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // A list of filters that can be applied to the metric tag name. + // By default all values will be included in the flow metric results. + Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` } -func (x *PatternFlowIpv4TotalLength) Reset() { - *x = PatternFlowIpv4TotalLength{} +func (x *FlowMetricTagFilter) Reset() { + *x = FlowMetricTagFilter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[465] + mi := &file_otg_proto_msgTypes[462] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TotalLength) String() string { +func (x *FlowMetricTagFilter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TotalLength) ProtoMessage() {} +func (*FlowMetricTagFilter) ProtoMessage() {} -func (x *PatternFlowIpv4TotalLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[465] +func (x *FlowMetricTagFilter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[462] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61820,94 +63165,82 @@ func (x *PatternFlowIpv4TotalLength) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TotalLength.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TotalLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{465} -} - -func (x *PatternFlowIpv4TotalLength) GetChoice() PatternFlowIpv4TotalLength_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIpv4TotalLength_Choice_unspecified +// Deprecated: Use FlowMetricTagFilter.ProtoReflect.Descriptor instead. +func (*FlowMetricTagFilter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{462} } -func (x *PatternFlowIpv4TotalLength) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *FlowMetricTagFilter) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return 0 + return "" } -func (x *PatternFlowIpv4TotalLength) GetValues() []uint32 { +func (x *FlowMetricTagFilter) GetValues() []string { if x != nil { return x.Values } return nil } -func (x *PatternFlowIpv4TotalLength) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto - } - return 0 -} - -func (x *PatternFlowIpv4TotalLength) GetIncrement() *PatternFlowIpv4TotalLengthCounter { - if x != nil { - return x.Increment - } - return nil -} +// A container for flow metrics. +// The container is keyed by the name, port_tx and port_rx. +type FlowMetric struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *PatternFlowIpv4TotalLength) GetDecrement() *PatternFlowIpv4TotalLengthCounter { - if x != nil { - return x.Decrement - } - return nil -} - -func (x *PatternFlowIpv4TotalLength) GetMetricTags() []*PatternFlowIpv4TotalLengthMetricTag { - if x != nil { - return x.MetricTags - } - return nil -} - -// integer counter pattern -type PatternFlowIpv4IdentificationCounter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // The name of the flow + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // The name of the transmit port + PortTx *string `protobuf:"bytes,2,opt,name=port_tx,json=portTx,proto3,oneof" json:"port_tx,omitempty"` + // The name of the receive port + PortRx *string `protobuf:"bytes,3,opt,name=port_rx,json=portRx,proto3,oneof" json:"port_rx,omitempty"` + // The transmit state of the flow. + Transmit *FlowMetric_Transmit_Enum `protobuf:"varint,5,opt,name=transmit,proto3,enum=otg.FlowMetric_Transmit_Enum,oneof" json:"transmit,omitempty"` + // The current total number of frames transmitted + FramesTx *uint64 `protobuf:"varint,6,opt,name=frames_tx,json=framesTx,proto3,oneof" json:"frames_tx,omitempty"` + // The current total number of valid frames received + FramesRx *uint64 `protobuf:"varint,7,opt,name=frames_rx,json=framesRx,proto3,oneof" json:"frames_rx,omitempty"` + // The current total number of bytes transmitted + BytesTx *uint64 `protobuf:"varint,8,opt,name=bytes_tx,json=bytesTx,proto3,oneof" json:"bytes_tx,omitempty"` + // The current total number of bytes received + BytesRx *uint64 `protobuf:"varint,9,opt,name=bytes_rx,json=bytesRx,proto3,oneof" json:"bytes_rx,omitempty"` + // The current rate of frames transmitted + FramesTxRate *float32 `protobuf:"fixed32,10,opt,name=frames_tx_rate,json=framesTxRate,proto3,oneof" json:"frames_tx_rate,omitempty"` + // The current rate of valid frames received + FramesRxRate *float32 `protobuf:"fixed32,11,opt,name=frames_rx_rate,json=framesRxRate,proto3,oneof" json:"frames_rx_rate,omitempty"` + // The percentage of lost frames + Loss *float32 `protobuf:"fixed32,12,opt,name=loss,proto3,oneof" json:"loss,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + Timestamps *MetricTimestamp `protobuf:"bytes,13,opt,name=timestamps,proto3" json:"timestamps,omitempty"` // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + Latency *MetricLatency `protobuf:"bytes,14,opt,name=latency,proto3" json:"latency,omitempty"` + // List of metrics corresponding to a set of values applicable + // for configured metric tags in ingress or egress packet header fields of corresponding + // flow. + // The container is keyed by list of tag-value pairs. + TaggedMetrics []*FlowTaggedMetric `protobuf:"bytes,15,rep,name=tagged_metrics,json=taggedMetrics,proto3" json:"tagged_metrics,omitempty"` } -func (x *PatternFlowIpv4IdentificationCounter) Reset() { - *x = PatternFlowIpv4IdentificationCounter{} +func (x *FlowMetric) Reset() { + *x = FlowMetric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[466] + mi := &file_otg_proto_msgTypes[463] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4IdentificationCounter) String() string { +func (x *FlowMetric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4IdentificationCounter) ProtoMessage() {} +func (*FlowMetric) ProtoMessage() {} -func (x *PatternFlowIpv4IdentificationCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[466] +func (x *FlowMetric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[463] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61918,148 +63251,156 @@ func (x *PatternFlowIpv4IdentificationCounter) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4IdentificationCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4IdentificationCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{466} +// Deprecated: Use FlowMetric.ProtoReflect.Descriptor instead. +func (*FlowMetric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{463} } -func (x *PatternFlowIpv4IdentificationCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *FlowMetric) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return 0 + return "" } -func (x *PatternFlowIpv4IdentificationCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *FlowMetric) GetPortTx() string { + if x != nil && x.PortTx != nil { + return *x.PortTx } - return 0 + return "" } -func (x *PatternFlowIpv4IdentificationCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *FlowMetric) GetPortRx() string { + if x != nil && x.PortRx != nil { + return *x.PortRx } - return 0 + return "" } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4IdentificationMetricTag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +func (x *FlowMetric) GetTransmit() FlowMetric_Transmit_Enum { + if x != nil && x.Transmit != nil { + return *x.Transmit + } + return FlowMetric_Transmit_unspecified } -func (x *PatternFlowIpv4IdentificationMetricTag) Reset() { - *x = PatternFlowIpv4IdentificationMetricTag{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[467] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowMetric) GetFramesTx() uint64 { + if x != nil && x.FramesTx != nil { + return *x.FramesTx } + return 0 } -func (x *PatternFlowIpv4IdentificationMetricTag) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *FlowMetric) GetFramesRx() uint64 { + if x != nil && x.FramesRx != nil { + return *x.FramesRx + } + return 0 } -func (*PatternFlowIpv4IdentificationMetricTag) ProtoMessage() {} - -func (x *PatternFlowIpv4IdentificationMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[467] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *FlowMetric) GetBytesTx() uint64 { + if x != nil && x.BytesTx != nil { + return *x.BytesTx } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowIpv4IdentificationMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4IdentificationMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{467} +func (x *FlowMetric) GetBytesRx() uint64 { + if x != nil && x.BytesRx != nil { + return *x.BytesRx + } + return 0 } -func (x *PatternFlowIpv4IdentificationMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *FlowMetric) GetFramesTxRate() float32 { + if x != nil && x.FramesTxRate != nil { + return *x.FramesTxRate } - return "" + return 0 } -func (x *PatternFlowIpv4IdentificationMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *FlowMetric) GetFramesRxRate() float32 { + if x != nil && x.FramesRxRate != nil { + return *x.FramesRxRate } return 0 } -func (x *PatternFlowIpv4IdentificationMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *FlowMetric) GetLoss() float32 { + if x != nil && x.Loss != nil { + return *x.Loss } return 0 } -// Identification -type PatternFlowIpv4Identification struct { +func (x *FlowMetric) GetTimestamps() *MetricTimestamp { + if x != nil { + return x.Timestamps + } + return nil +} + +func (x *FlowMetric) GetLatency() *MetricLatency { + if x != nil { + return x.Latency + } + return nil +} + +func (x *FlowMetric) GetTaggedMetrics() []*FlowTaggedMetric { + if x != nil { + return x.TaggedMetrics + } + return nil +} + +// Metrics for each set of values applicable for configured +// metric tags in ingress or egress packet header fields of corresponding flow. +// The container is keyed by list of tag-value pairs. +type FlowTaggedMetric struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // List of tag and value pairs + Tags []*FlowMetricTag `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` + // The current total number of frames transmitted + FramesTx *uint64 `protobuf:"varint,2,opt,name=frames_tx,json=framesTx,proto3,oneof" json:"frames_tx,omitempty"` + // The current total number of valid frames received + FramesRx *uint64 `protobuf:"varint,3,opt,name=frames_rx,json=framesRx,proto3,oneof" json:"frames_rx,omitempty"` + // The current total number of bytes transmitted + BytesTx *uint64 `protobuf:"varint,4,opt,name=bytes_tx,json=bytesTx,proto3,oneof" json:"bytes_tx,omitempty"` + // The current total number of bytes received + BytesRx *uint64 `protobuf:"varint,5,opt,name=bytes_rx,json=bytesRx,proto3,oneof" json:"bytes_rx,omitempty"` + // The current rate of frames transmitted + FramesTxRate *float32 `protobuf:"fixed32,6,opt,name=frames_tx_rate,json=framesTxRate,proto3,oneof" json:"frames_tx_rate,omitempty"` + // The current rate of valid frames received + FramesRxRate *float32 `protobuf:"fixed32,7,opt,name=frames_rx_rate,json=framesRxRate,proto3,oneof" json:"frames_rx_rate,omitempty"` + // The percentage of lost frames + Loss *float32 `protobuf:"fixed32,8,opt,name=loss,proto3,oneof" json:"loss,omitempty"` // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4Identification_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4Identification_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4IdentificationCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Timestamps *MetricTimestamp `protobuf:"bytes,9,opt,name=timestamps,proto3" json:"timestamps,omitempty"` // Description missing in models - Decrement *PatternFlowIpv4IdentificationCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4IdentificationMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + Latency *MetricLatency `protobuf:"bytes,10,opt,name=latency,proto3" json:"latency,omitempty"` } -func (x *PatternFlowIpv4Identification) Reset() { - *x = PatternFlowIpv4Identification{} +func (x *FlowTaggedMetric) Reset() { + *x = FlowTaggedMetric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[468] + mi := &file_otg_proto_msgTypes[464] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4Identification) String() string { +func (x *FlowTaggedMetric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4Identification) ProtoMessage() {} +func (*FlowTaggedMetric) ProtoMessage() {} -func (x *PatternFlowIpv4Identification) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[468] +func (x *FlowTaggedMetric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[464] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62070,161 +63411,110 @@ func (x *PatternFlowIpv4Identification) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4Identification.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4Identification) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{468} -} - -func (x *PatternFlowIpv4Identification) GetChoice() PatternFlowIpv4Identification_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIpv4Identification_Choice_unspecified -} - -func (x *PatternFlowIpv4Identification) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 +// Deprecated: Use FlowTaggedMetric.ProtoReflect.Descriptor instead. +func (*FlowTaggedMetric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{464} } -func (x *PatternFlowIpv4Identification) GetValues() []uint32 { +func (x *FlowTaggedMetric) GetTags() []*FlowMetricTag { if x != nil { - return x.Values + return x.Tags } return nil } -func (x *PatternFlowIpv4Identification) GetIncrement() *PatternFlowIpv4IdentificationCounter { - if x != nil { - return x.Increment +func (x *FlowTaggedMetric) GetFramesTx() uint64 { + if x != nil && x.FramesTx != nil { + return *x.FramesTx } - return nil + return 0 } -func (x *PatternFlowIpv4Identification) GetDecrement() *PatternFlowIpv4IdentificationCounter { - if x != nil { - return x.Decrement +func (x *FlowTaggedMetric) GetFramesRx() uint64 { + if x != nil && x.FramesRx != nil { + return *x.FramesRx } - return nil + return 0 } -func (x *PatternFlowIpv4Identification) GetMetricTags() []*PatternFlowIpv4IdentificationMetricTag { - if x != nil { - return x.MetricTags +func (x *FlowTaggedMetric) GetBytesTx() uint64 { + if x != nil && x.BytesTx != nil { + return *x.BytesTx } - return nil -} - -// integer counter pattern -type PatternFlowIpv4ReservedCounter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + return 0 } -func (x *PatternFlowIpv4ReservedCounter) Reset() { - *x = PatternFlowIpv4ReservedCounter{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[469] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *FlowTaggedMetric) GetBytesRx() uint64 { + if x != nil && x.BytesRx != nil { + return *x.BytesRx } + return 0 } -func (x *PatternFlowIpv4ReservedCounter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatternFlowIpv4ReservedCounter) ProtoMessage() {} - -func (x *PatternFlowIpv4ReservedCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[469] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *FlowTaggedMetric) GetFramesTxRate() float32 { + if x != nil && x.FramesTxRate != nil { + return *x.FramesTxRate } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowIpv4ReservedCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4ReservedCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{469} +func (x *FlowTaggedMetric) GetFramesRxRate() float32 { + if x != nil && x.FramesRxRate != nil { + return *x.FramesRxRate + } + return 0 } -func (x *PatternFlowIpv4ReservedCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *FlowTaggedMetric) GetLoss() float32 { + if x != nil && x.Loss != nil { + return *x.Loss } return 0 } -func (x *PatternFlowIpv4ReservedCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *FlowTaggedMetric) GetTimestamps() *MetricTimestamp { + if x != nil { + return x.Timestamps } - return 0 + return nil } -func (x *PatternFlowIpv4ReservedCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *FlowTaggedMetric) GetLatency() *MetricLatency { + if x != nil { + return x.Latency } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4ReservedMetricTag struct { +// Description missing in models +type FlowMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true + // Name of packet field metric tag Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 1 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // Description missing in models + Value *FlowMetricTagValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (x *PatternFlowIpv4ReservedMetricTag) Reset() { - *x = PatternFlowIpv4ReservedMetricTag{} +func (x *FlowMetricTag) Reset() { + *x = FlowMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[470] + mi := &file_otg_proto_msgTypes[465] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4ReservedMetricTag) String() string { +func (x *FlowMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4ReservedMetricTag) ProtoMessage() {} +func (*FlowMetricTag) ProtoMessage() {} -func (x *PatternFlowIpv4ReservedMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[470] +func (x *FlowMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[465] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62235,74 +63525,57 @@ func (x *PatternFlowIpv4ReservedMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4ReservedMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4ReservedMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{470} +// Deprecated: Use FlowMetricTag.ProtoReflect.Descriptor instead. +func (*FlowMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{465} } -func (x *PatternFlowIpv4ReservedMetricTag) GetName() string { +func (x *FlowMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIpv4ReservedMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset - } - return 0 -} - -func (x *PatternFlowIpv4ReservedMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *FlowMetricTag) GetValue() *FlowMetricTagValue { + if x != nil { + return x.Value } - return 0 + return nil } -// Reserved flag. -type PatternFlowIpv4Reserved struct { +// A container for metric tag value +type FlowMetricTagValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4Reserved_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4Reserved_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4ReservedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4ReservedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4ReservedMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // Available formats for metric tag value + // default = Choice.Enum.hex + Choice *FlowMetricTagValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.FlowMetricTagValue_Choice_Enum,oneof" json:"choice,omitempty"` + // Value represented in hexadecimal format + Hex *string `protobuf:"bytes,2,opt,name=hex,proto3,oneof" json:"hex,omitempty"` + // Value represented in string format + Str *string `protobuf:"bytes,3,opt,name=str,proto3,oneof" json:"str,omitempty"` } -func (x *PatternFlowIpv4Reserved) Reset() { - *x = PatternFlowIpv4Reserved{} +func (x *FlowMetricTagValue) Reset() { + *x = FlowMetricTagValue{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[471] + mi := &file_otg_proto_msgTypes[466] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4Reserved) String() string { +func (x *FlowMetricTagValue) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4Reserved) ProtoMessage() {} +func (*FlowMetricTagValue) ProtoMessage() {} -func (x *PatternFlowIpv4Reserved) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[471] +func (x *FlowMetricTagValue) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[466] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62313,87 +63586,63 @@ func (x *PatternFlowIpv4Reserved) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4Reserved.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4Reserved) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{471} +// Deprecated: Use FlowMetricTagValue.ProtoReflect.Descriptor instead. +func (*FlowMetricTagValue) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{466} } -func (x *PatternFlowIpv4Reserved) GetChoice() PatternFlowIpv4Reserved_Choice_Enum { +func (x *FlowMetricTagValue) GetChoice() FlowMetricTagValue_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIpv4Reserved_Choice_unspecified -} - -func (x *PatternFlowIpv4Reserved) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowIpv4Reserved) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowIpv4Reserved) GetIncrement() *PatternFlowIpv4ReservedCounter { - if x != nil { - return x.Increment - } - return nil + return FlowMetricTagValue_Choice_unspecified } -func (x *PatternFlowIpv4Reserved) GetDecrement() *PatternFlowIpv4ReservedCounter { - if x != nil { - return x.Decrement +func (x *FlowMetricTagValue) GetHex() string { + if x != nil && x.Hex != nil { + return *x.Hex } - return nil + return "" } -func (x *PatternFlowIpv4Reserved) GetMetricTags() []*PatternFlowIpv4ReservedMetricTag { - if x != nil { - return x.MetricTags +func (x *FlowMetricTagValue) GetStr() string { + if x != nil && x.Str != nil { + return *x.Str } - return nil + return "" } -// integer counter pattern -type PatternFlowIpv4DontFragmentCounter struct { +// The container for timestamp metrics. +// The container will be empty if the timestamp has not been configured for +// the flow. +type MetricTimestamp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // First timestamp in nanoseconds + FirstTimestampNs *float64 `protobuf:"fixed64,1,opt,name=first_timestamp_ns,json=firstTimestampNs,proto3,oneof" json:"first_timestamp_ns,omitempty"` + // Last timestamp in nanoseconds + LastTimestampNs *float64 `protobuf:"fixed64,2,opt,name=last_timestamp_ns,json=lastTimestampNs,proto3,oneof" json:"last_timestamp_ns,omitempty"` } -func (x *PatternFlowIpv4DontFragmentCounter) Reset() { - *x = PatternFlowIpv4DontFragmentCounter{} +func (x *MetricTimestamp) Reset() { + *x = MetricTimestamp{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[472] + mi := &file_otg_proto_msgTypes[467] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4DontFragmentCounter) String() string { +func (x *MetricTimestamp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4DontFragmentCounter) ProtoMessage() {} +func (*MetricTimestamp) ProtoMessage() {} -func (x *PatternFlowIpv4DontFragmentCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[472] +func (x *MetricTimestamp) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[467] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62404,70 +63653,60 @@ func (x *PatternFlowIpv4DontFragmentCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4DontFragmentCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4DontFragmentCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{472} -} - -func (x *PatternFlowIpv4DontFragmentCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use MetricTimestamp.ProtoReflect.Descriptor instead. +func (*MetricTimestamp) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{467} } -func (x *PatternFlowIpv4DontFragmentCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *MetricTimestamp) GetFirstTimestampNs() float64 { + if x != nil && x.FirstTimestampNs != nil { + return *x.FirstTimestampNs } return 0 } -func (x *PatternFlowIpv4DontFragmentCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *MetricTimestamp) GetLastTimestampNs() float64 { + if x != nil && x.LastTimestampNs != nil { + return *x.LastTimestampNs } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4DontFragmentMetricTag struct { +// The container for latency metrics. +// The min/max/avg values are dependent on the type of latency measurement +// mode that is configured. +// The container will be empty if the latency has not been configured for +// the flow. +type MetricLatency struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 1 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // Minimum latency in nanoseconds + MinimumNs *float64 `protobuf:"fixed64,1,opt,name=minimum_ns,json=minimumNs,proto3,oneof" json:"minimum_ns,omitempty"` + // Maximum latency in nanoseconds + MaximumNs *float64 `protobuf:"fixed64,2,opt,name=maximum_ns,json=maximumNs,proto3,oneof" json:"maximum_ns,omitempty"` + // Average latency in nanoseconds + AverageNs *float64 `protobuf:"fixed64,3,opt,name=average_ns,json=averageNs,proto3,oneof" json:"average_ns,omitempty"` } -func (x *PatternFlowIpv4DontFragmentMetricTag) Reset() { - *x = PatternFlowIpv4DontFragmentMetricTag{} +func (x *MetricLatency) Reset() { + *x = MetricLatency{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[473] + mi := &file_otg_proto_msgTypes[468] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4DontFragmentMetricTag) String() string { +func (x *MetricLatency) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4DontFragmentMetricTag) ProtoMessage() {} +func (*MetricLatency) ProtoMessage() {} -func (x *PatternFlowIpv4DontFragmentMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[473] +func (x *MetricLatency) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[468] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62478,75 +63717,70 @@ func (x *PatternFlowIpv4DontFragmentMetricTag) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4DontFragmentMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4DontFragmentMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{473} +// Deprecated: Use MetricLatency.ProtoReflect.Descriptor instead. +func (*MetricLatency) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{468} } -func (x *PatternFlowIpv4DontFragmentMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *MetricLatency) GetMinimumNs() float64 { + if x != nil && x.MinimumNs != nil { + return *x.MinimumNs } - return "" + return 0 } -func (x *PatternFlowIpv4DontFragmentMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *MetricLatency) GetMaximumNs() float64 { + if x != nil && x.MaximumNs != nil { + return *x.MaximumNs } return 0 } -func (x *PatternFlowIpv4DontFragmentMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *MetricLatency) GetAverageNs() float64 { + if x != nil && x.AverageNs != nil { + return *x.AverageNs } return 0 } -// Dont fragment flag If the dont_fragment flag is set and fragmentation is required -// to route the packet then the packet is dropped. -type PatternFlowIpv4DontFragment struct { +// The request to retrieve BGPv4 per peer metrics/statistics. +type Bgpv4MetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4DontFragment_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4DontFragment_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4DontFragmentCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4DontFragmentCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4DontFragmentMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The names of BGPv4 peers to return results for. An empty list will return results + // for all BGPv4 peers. + // + // x-constraint: + // - /components/schemas/Bgp.V4peer/properties/name + // + // x-constraint: + // - /components/schemas/Bgp.V4peer/properties/name + PeerNames []string `protobuf:"bytes,1,rep,name=peer_names,json=peerNames,proto3" json:"peer_names,omitempty"` + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned except for any result_groups. The name of + // the BGPv4 peer cannot be excluded. + ColumnNames []Bgpv4MetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.Bgpv4MetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` } -func (x *PatternFlowIpv4DontFragment) Reset() { - *x = PatternFlowIpv4DontFragment{} +func (x *Bgpv4MetricsRequest) Reset() { + *x = Bgpv4MetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[474] + mi := &file_otg_proto_msgTypes[469] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4DontFragment) String() string { +func (x *Bgpv4MetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4DontFragment) ProtoMessage() {} +func (*Bgpv4MetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4DontFragment) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[474] +func (x *Bgpv4MetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[469] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62557,87 +63791,99 @@ func (x *PatternFlowIpv4DontFragment) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4DontFragment.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4DontFragment) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{474} -} - -func (x *PatternFlowIpv4DontFragment) GetChoice() PatternFlowIpv4DontFragment_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIpv4DontFragment_Choice_unspecified -} - -func (x *PatternFlowIpv4DontFragment) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowIpv4DontFragment) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowIpv4DontFragment) GetIncrement() *PatternFlowIpv4DontFragmentCounter { - if x != nil { - return x.Increment - } - return nil +// Deprecated: Use Bgpv4MetricsRequest.ProtoReflect.Descriptor instead. +func (*Bgpv4MetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{469} } -func (x *PatternFlowIpv4DontFragment) GetDecrement() *PatternFlowIpv4DontFragmentCounter { +func (x *Bgpv4MetricsRequest) GetPeerNames() []string { if x != nil { - return x.Decrement + return x.PeerNames } return nil } -func (x *PatternFlowIpv4DontFragment) GetMetricTags() []*PatternFlowIpv4DontFragmentMetricTag { +func (x *Bgpv4MetricsRequest) GetColumnNames() []Bgpv4MetricsRequest_ColumnNames_Enum { if x != nil { - return x.MetricTags + return x.ColumnNames } return nil } -// integer counter pattern -type PatternFlowIpv4MoreFragmentsCounter struct { +// BGPv4 per peer statistics information. +type Bgpv4Metric struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The name of a configured BGPv4 peer. + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Session state as up or down. Up refers to an Established state and Down refers to + // any other state. + SessionState *Bgpv4Metric_SessionState_Enum `protobuf:"varint,2,opt,name=session_state,json=sessionState,proto3,enum=otg.Bgpv4Metric_SessionState_Enum,oneof" json:"session_state,omitempty"` + // Number of times the session went from Up to Down state. + SessionFlapCount *uint64 `protobuf:"varint,3,opt,name=session_flap_count,json=sessionFlapCount,proto3,oneof" json:"session_flap_count,omitempty"` + // Number of routes advertised. + RoutesAdvertised *uint64 `protobuf:"varint,4,opt,name=routes_advertised,json=routesAdvertised,proto3,oneof" json:"routes_advertised,omitempty"` + // Number of routes received. + RoutesReceived *uint64 `protobuf:"varint,5,opt,name=routes_received,json=routesReceived,proto3,oneof" json:"routes_received,omitempty"` + // Number of route withdraws sent. + RouteWithdrawsSent *uint64 `protobuf:"varint,6,opt,name=route_withdraws_sent,json=routeWithdrawsSent,proto3,oneof" json:"route_withdraws_sent,omitempty"` + // Number of route withdraws received. + RouteWithdrawsReceived *uint64 `protobuf:"varint,7,opt,name=route_withdraws_received,json=routeWithdrawsReceived,proto3,oneof" json:"route_withdraws_received,omitempty"` + // Number of Update messages sent. + UpdatesSent *uint64 `protobuf:"varint,8,opt,name=updates_sent,json=updatesSent,proto3,oneof" json:"updates_sent,omitempty"` + // Number of Update messages received. + UpdatesReceived *uint64 `protobuf:"varint,9,opt,name=updates_received,json=updatesReceived,proto3,oneof" json:"updates_received,omitempty"` + // Number of Open messages sent. + OpensSent *uint64 `protobuf:"varint,10,opt,name=opens_sent,json=opensSent,proto3,oneof" json:"opens_sent,omitempty"` + // Number of Open messages received. + OpensReceived *uint64 `protobuf:"varint,11,opt,name=opens_received,json=opensReceived,proto3,oneof" json:"opens_received,omitempty"` + // Number of Keepalive messages sent. + KeepalivesSent *uint64 `protobuf:"varint,12,opt,name=keepalives_sent,json=keepalivesSent,proto3,oneof" json:"keepalives_sent,omitempty"` + // Number of Keepalive messages received. + KeepalivesReceived *uint64 `protobuf:"varint,13,opt,name=keepalives_received,json=keepalivesReceived,proto3,oneof" json:"keepalives_received,omitempty"` + // Number of Notification messages sent. + NotificationsSent *uint64 `protobuf:"varint,14,opt,name=notifications_sent,json=notificationsSent,proto3,oneof" json:"notifications_sent,omitempty"` + // Number of Notification messages received. + NotificationsReceived *uint64 `protobuf:"varint,15,opt,name=notifications_received,json=notificationsReceived,proto3,oneof" json:"notifications_received,omitempty"` + // BGP peer FSM (Finite State Machine) state as Idle, Connect, Active, OpenSent, OpenConfirm + // and Established. In all the states except Established the BGP session is down. Idle + // refers to the Idle state of the FSM. Connect refers to the state where the session + // is waiting for the underlying transport session to be established. Active refers + // to the state where the session is awaiting for a connection from the remote peer. + // OpenSent refers to the state where the session is in the process of being established. + // The local system has sent an OPEN message. OpenConfirm refers to the state where + // the session is in the process of being established. The local system has sent and + // received an OPEN message and is awaiting a NOTIFICATION or KEEPALIVE message from + // remote peer. Established refers to the state where the BGP session with the peer + // is established. + FsmState *Bgpv4Metric_FsmState_Enum `protobuf:"varint,16,opt,name=fsm_state,json=fsmState,proto3,enum=otg.Bgpv4Metric_FsmState_Enum,oneof" json:"fsm_state,omitempty"` + // Number of End-of-RIB markers received indicating the completion of the initial routing + // update for a particular address family after the session is established. + // For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with + // the minimum length. For any other address family, it is an UPDATE message that contains + // only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . + EndOfRibReceived *uint64 `protobuf:"varint,17,opt,name=end_of_rib_received,json=endOfRibReceived,proto3,oneof" json:"end_of_rib_received,omitempty"` } -func (x *PatternFlowIpv4MoreFragmentsCounter) Reset() { - *x = PatternFlowIpv4MoreFragmentsCounter{} +func (x *Bgpv4Metric) Reset() { + *x = Bgpv4Metric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[475] + mi := &file_otg_proto_msgTypes[470] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4MoreFragmentsCounter) String() string { +func (x *Bgpv4Metric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4MoreFragmentsCounter) ProtoMessage() {} +func (*Bgpv4Metric) ProtoMessage() {} -func (x *PatternFlowIpv4MoreFragmentsCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[475] +func (x *Bgpv4Metric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[470] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62648,148 +63894,168 @@ func (x *PatternFlowIpv4MoreFragmentsCounter) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4MoreFragmentsCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4MoreFragmentsCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{475} +// Deprecated: Use Bgpv4Metric.ProtoReflect.Descriptor instead. +func (*Bgpv4Metric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{470} } -func (x *PatternFlowIpv4MoreFragmentsCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *Bgpv4Metric) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *Bgpv4Metric) GetSessionState() Bgpv4Metric_SessionState_Enum { + if x != nil && x.SessionState != nil { + return *x.SessionState + } + return Bgpv4Metric_SessionState_unspecified +} + +func (x *Bgpv4Metric) GetSessionFlapCount() uint64 { + if x != nil && x.SessionFlapCount != nil { + return *x.SessionFlapCount } return 0 } -func (x *PatternFlowIpv4MoreFragmentsCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Bgpv4Metric) GetRoutesAdvertised() uint64 { + if x != nil && x.RoutesAdvertised != nil { + return *x.RoutesAdvertised } return 0 } -func (x *PatternFlowIpv4MoreFragmentsCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Bgpv4Metric) GetRoutesReceived() uint64 { + if x != nil && x.RoutesReceived != nil { + return *x.RoutesReceived } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4MoreFragmentsMetricTag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *Bgpv4Metric) GetRouteWithdrawsSent() uint64 { + if x != nil && x.RouteWithdrawsSent != nil { + return *x.RouteWithdrawsSent + } + return 0 +} - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 1 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +func (x *Bgpv4Metric) GetRouteWithdrawsReceived() uint64 { + if x != nil && x.RouteWithdrawsReceived != nil { + return *x.RouteWithdrawsReceived + } + return 0 } -func (x *PatternFlowIpv4MoreFragmentsMetricTag) Reset() { - *x = PatternFlowIpv4MoreFragmentsMetricTag{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[476] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *Bgpv4Metric) GetUpdatesSent() uint64 { + if x != nil && x.UpdatesSent != nil { + return *x.UpdatesSent } + return 0 } -func (x *PatternFlowIpv4MoreFragmentsMetricTag) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *Bgpv4Metric) GetUpdatesReceived() uint64 { + if x != nil && x.UpdatesReceived != nil { + return *x.UpdatesReceived + } + return 0 } -func (*PatternFlowIpv4MoreFragmentsMetricTag) ProtoMessage() {} +func (x *Bgpv4Metric) GetOpensSent() uint64 { + if x != nil && x.OpensSent != nil { + return *x.OpensSent + } + return 0 +} -func (x *PatternFlowIpv4MoreFragmentsMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[476] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *Bgpv4Metric) GetOpensReceived() uint64 { + if x != nil && x.OpensReceived != nil { + return *x.OpensReceived } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowIpv4MoreFragmentsMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4MoreFragmentsMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{476} +func (x *Bgpv4Metric) GetKeepalivesSent() uint64 { + if x != nil && x.KeepalivesSent != nil { + return *x.KeepalivesSent + } + return 0 } -func (x *PatternFlowIpv4MoreFragmentsMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *Bgpv4Metric) GetKeepalivesReceived() uint64 { + if x != nil && x.KeepalivesReceived != nil { + return *x.KeepalivesReceived } - return "" + return 0 } -func (x *PatternFlowIpv4MoreFragmentsMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *Bgpv4Metric) GetNotificationsSent() uint64 { + if x != nil && x.NotificationsSent != nil { + return *x.NotificationsSent } return 0 } -func (x *PatternFlowIpv4MoreFragmentsMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *Bgpv4Metric) GetNotificationsReceived() uint64 { + if x != nil && x.NotificationsReceived != nil { + return *x.NotificationsReceived } return 0 } -// More fragments flag -type PatternFlowIpv4MoreFragments struct { +func (x *Bgpv4Metric) GetFsmState() Bgpv4Metric_FsmState_Enum { + if x != nil && x.FsmState != nil { + return *x.FsmState + } + return Bgpv4Metric_FsmState_unspecified +} + +func (x *Bgpv4Metric) GetEndOfRibReceived() uint64 { + if x != nil && x.EndOfRibReceived != nil { + return *x.EndOfRibReceived + } + return 0 +} + +// The request to retrieve BGPv6 per peer metrics/statistics. +type Bgpv6MetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4MoreFragments_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4MoreFragments_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4MoreFragmentsCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4MoreFragmentsCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4MoreFragmentsMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The names of BGPv6 peers to return results for. An empty list will return results + // for all BGPv6 peers. + // + // x-constraint: + // - /components/schemas/Bgp.V6peer/properties/name + // + // x-constraint: + // - /components/schemas/Bgp.V6peer/properties/name + PeerNames []string `protobuf:"bytes,1,rep,name=peer_names,json=peerNames,proto3" json:"peer_names,omitempty"` + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned except for any result_groups. The name of + // the BGPv6 peer cannot be excluded. + ColumnNames []Bgpv6MetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.Bgpv6MetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` } -func (x *PatternFlowIpv4MoreFragments) Reset() { - *x = PatternFlowIpv4MoreFragments{} +func (x *Bgpv6MetricsRequest) Reset() { + *x = Bgpv6MetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[477] + mi := &file_otg_proto_msgTypes[471] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4MoreFragments) String() string { +func (x *Bgpv6MetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4MoreFragments) ProtoMessage() {} +func (*Bgpv6MetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4MoreFragments) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[477] +func (x *Bgpv6MetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[471] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62800,87 +64066,99 @@ func (x *PatternFlowIpv4MoreFragments) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4MoreFragments.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4MoreFragments) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{477} +// Deprecated: Use Bgpv6MetricsRequest.ProtoReflect.Descriptor instead. +func (*Bgpv6MetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{471} } -func (x *PatternFlowIpv4MoreFragments) GetChoice() PatternFlowIpv4MoreFragments_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIpv4MoreFragments_Choice_unspecified -} - -func (x *PatternFlowIpv4MoreFragments) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowIpv4MoreFragments) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowIpv4MoreFragments) GetIncrement() *PatternFlowIpv4MoreFragmentsCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowIpv4MoreFragments) GetDecrement() *PatternFlowIpv4MoreFragmentsCounter { - if x != nil { - return x.Decrement +func (x *Bgpv6MetricsRequest) GetPeerNames() []string { + if x != nil { + return x.PeerNames } return nil } -func (x *PatternFlowIpv4MoreFragments) GetMetricTags() []*PatternFlowIpv4MoreFragmentsMetricTag { +func (x *Bgpv6MetricsRequest) GetColumnNames() []Bgpv6MetricsRequest_ColumnNames_Enum { if x != nil { - return x.MetricTags + return x.ColumnNames } return nil } -// integer counter pattern -type PatternFlowIpv4FragmentOffsetCounter struct { +// BGPv6 per peer statistics information. +type Bgpv6Metric struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The name of a configured BGPv6 peer. + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Session state as up or down. Up refers to an Established state and Down refers to + // any other state. + SessionState *Bgpv6Metric_SessionState_Enum `protobuf:"varint,2,opt,name=session_state,json=sessionState,proto3,enum=otg.Bgpv6Metric_SessionState_Enum,oneof" json:"session_state,omitempty"` + // Number of times the session went from Up to Down state. + SessionFlapCount *uint64 `protobuf:"varint,3,opt,name=session_flap_count,json=sessionFlapCount,proto3,oneof" json:"session_flap_count,omitempty"` + // Number of routes advertised. + RoutesAdvertised *uint64 `protobuf:"varint,4,opt,name=routes_advertised,json=routesAdvertised,proto3,oneof" json:"routes_advertised,omitempty"` + // Number of routes received. + RoutesReceived *uint64 `protobuf:"varint,5,opt,name=routes_received,json=routesReceived,proto3,oneof" json:"routes_received,omitempty"` + // Number of route withdraws sent. + RouteWithdrawsSent *uint64 `protobuf:"varint,6,opt,name=route_withdraws_sent,json=routeWithdrawsSent,proto3,oneof" json:"route_withdraws_sent,omitempty"` + // Number of route withdraws received. + RouteWithdrawsReceived *uint64 `protobuf:"varint,7,opt,name=route_withdraws_received,json=routeWithdrawsReceived,proto3,oneof" json:"route_withdraws_received,omitempty"` + // Number of Update messages sent. + UpdatesSent *uint64 `protobuf:"varint,8,opt,name=updates_sent,json=updatesSent,proto3,oneof" json:"updates_sent,omitempty"` + // Number of Update messages received. + UpdatesReceived *uint64 `protobuf:"varint,9,opt,name=updates_received,json=updatesReceived,proto3,oneof" json:"updates_received,omitempty"` + // Number of Open messages sent. + OpensSent *uint64 `protobuf:"varint,10,opt,name=opens_sent,json=opensSent,proto3,oneof" json:"opens_sent,omitempty"` + // Number of Open messages received. + OpensReceived *uint64 `protobuf:"varint,11,opt,name=opens_received,json=opensReceived,proto3,oneof" json:"opens_received,omitempty"` + // Number of Keepalive messages sent. + KeepalivesSent *uint64 `protobuf:"varint,12,opt,name=keepalives_sent,json=keepalivesSent,proto3,oneof" json:"keepalives_sent,omitempty"` + // Number of Keepalive messages received. + KeepalivesReceived *uint64 `protobuf:"varint,13,opt,name=keepalives_received,json=keepalivesReceived,proto3,oneof" json:"keepalives_received,omitempty"` + // Number of Notification messages sent. + NotificationsSent *uint64 `protobuf:"varint,14,opt,name=notifications_sent,json=notificationsSent,proto3,oneof" json:"notifications_sent,omitempty"` + // Number of Notification messages received. + NotificationsReceived *uint64 `protobuf:"varint,15,opt,name=notifications_received,json=notificationsReceived,proto3,oneof" json:"notifications_received,omitempty"` + // BGP peer FSM (Finite State Machine) state as Idle, Connect, Active, OpenSent, OpenConfirm + // and Established. In all the states except Established the BGP session is down. Idle + // refers to the Idle state of the FSM. Connect refers to the state where the session + // is waiting for the underlying transport session to be established. Active refers + // to the state where the session is awaiting for a connection from the remote peer. + // OpenSent refers to the state where the session is in the process of being established. + // The local system has sent an OPEN message. OpenConfirm refers to the state where + // the session is in the process of being established. The local system has sent and + // received an OPEN message and is awaiting a NOTIFICATION or KEEPALIVE message from + // remote peer. Established refers to the state where the BGP session with the peer + // is established. + FsmState *Bgpv6Metric_FsmState_Enum `protobuf:"varint,16,opt,name=fsm_state,json=fsmState,proto3,enum=otg.Bgpv6Metric_FsmState_Enum,oneof" json:"fsm_state,omitempty"` + // Number of End-of-RIB markers received indicating the completion of the initial routing + // update for a particular address family after the session is established. + // For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with + // the minimum length. For any other address family, it is an UPDATE message that contains + // only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . + EndOfRibReceived *uint64 `protobuf:"varint,17,opt,name=end_of_rib_received,json=endOfRibReceived,proto3,oneof" json:"end_of_rib_received,omitempty"` } -func (x *PatternFlowIpv4FragmentOffsetCounter) Reset() { - *x = PatternFlowIpv4FragmentOffsetCounter{} +func (x *Bgpv6Metric) Reset() { + *x = Bgpv6Metric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[478] + mi := &file_otg_proto_msgTypes[472] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4FragmentOffsetCounter) String() string { +func (x *Bgpv6Metric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4FragmentOffsetCounter) ProtoMessage() {} +func (*Bgpv6Metric) ProtoMessage() {} -func (x *PatternFlowIpv4FragmentOffsetCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[478] +func (x *Bgpv6Metric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[472] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62891,239 +64169,168 @@ func (x *PatternFlowIpv4FragmentOffsetCounter) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4FragmentOffsetCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4FragmentOffsetCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{478} +// Deprecated: Use Bgpv6Metric.ProtoReflect.Descriptor instead. +func (*Bgpv6Metric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{472} } -func (x *PatternFlowIpv4FragmentOffsetCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *Bgpv6Metric) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return 0 + return "" } -func (x *PatternFlowIpv4FragmentOffsetCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Bgpv6Metric) GetSessionState() Bgpv6Metric_SessionState_Enum { + if x != nil && x.SessionState != nil { + return *x.SessionState } - return 0 + return Bgpv6Metric_SessionState_unspecified } -func (x *PatternFlowIpv4FragmentOffsetCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Bgpv6Metric) GetSessionFlapCount() uint64 { + if x != nil && x.SessionFlapCount != nil { + return *x.SessionFlapCount } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4FragmentOffsetMetricTag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 5 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` -} - -func (x *PatternFlowIpv4FragmentOffsetMetricTag) Reset() { - *x = PatternFlowIpv4FragmentOffsetMetricTag{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[479] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *Bgpv6Metric) GetRoutesAdvertised() uint64 { + if x != nil && x.RoutesAdvertised != nil { + return *x.RoutesAdvertised } + return 0 } -func (x *PatternFlowIpv4FragmentOffsetMetricTag) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatternFlowIpv4FragmentOffsetMetricTag) ProtoMessage() {} - -func (x *PatternFlowIpv4FragmentOffsetMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[479] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *Bgpv6Metric) GetRoutesReceived() uint64 { + if x != nil && x.RoutesReceived != nil { + return *x.RoutesReceived } - return mi.MessageOf(x) -} - -// Deprecated: Use PatternFlowIpv4FragmentOffsetMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4FragmentOffsetMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{479} + return 0 } -func (x *PatternFlowIpv4FragmentOffsetMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *Bgpv6Metric) GetRouteWithdrawsSent() uint64 { + if x != nil && x.RouteWithdrawsSent != nil { + return *x.RouteWithdrawsSent } - return "" + return 0 } -func (x *PatternFlowIpv4FragmentOffsetMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *Bgpv6Metric) GetRouteWithdrawsReceived() uint64 { + if x != nil && x.RouteWithdrawsReceived != nil { + return *x.RouteWithdrawsReceived } return 0 } -func (x *PatternFlowIpv4FragmentOffsetMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *Bgpv6Metric) GetUpdatesSent() uint64 { + if x != nil && x.UpdatesSent != nil { + return *x.UpdatesSent } return 0 } -// Fragment offset -type PatternFlowIpv4FragmentOffset struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4FragmentOffset_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4FragmentOffset_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4FragmentOffsetCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4FragmentOffsetCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4FragmentOffsetMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` -} - -func (x *PatternFlowIpv4FragmentOffset) Reset() { - *x = PatternFlowIpv4FragmentOffset{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[480] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *Bgpv6Metric) GetUpdatesReceived() uint64 { + if x != nil && x.UpdatesReceived != nil { + return *x.UpdatesReceived } + return 0 } -func (x *PatternFlowIpv4FragmentOffset) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatternFlowIpv4FragmentOffset) ProtoMessage() {} - -func (x *PatternFlowIpv4FragmentOffset) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[480] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *Bgpv6Metric) GetOpensSent() uint64 { + if x != nil && x.OpensSent != nil { + return *x.OpensSent } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowIpv4FragmentOffset.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4FragmentOffset) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{480} +func (x *Bgpv6Metric) GetOpensReceived() uint64 { + if x != nil && x.OpensReceived != nil { + return *x.OpensReceived + } + return 0 } -func (x *PatternFlowIpv4FragmentOffset) GetChoice() PatternFlowIpv4FragmentOffset_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *Bgpv6Metric) GetKeepalivesSent() uint64 { + if x != nil && x.KeepalivesSent != nil { + return *x.KeepalivesSent } - return PatternFlowIpv4FragmentOffset_Choice_unspecified + return 0 } -func (x *PatternFlowIpv4FragmentOffset) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *Bgpv6Metric) GetKeepalivesReceived() uint64 { + if x != nil && x.KeepalivesReceived != nil { + return *x.KeepalivesReceived } return 0 } -func (x *PatternFlowIpv4FragmentOffset) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *Bgpv6Metric) GetNotificationsSent() uint64 { + if x != nil && x.NotificationsSent != nil { + return *x.NotificationsSent } - return nil + return 0 } -func (x *PatternFlowIpv4FragmentOffset) GetIncrement() *PatternFlowIpv4FragmentOffsetCounter { - if x != nil { - return x.Increment +func (x *Bgpv6Metric) GetNotificationsReceived() uint64 { + if x != nil && x.NotificationsReceived != nil { + return *x.NotificationsReceived } - return nil + return 0 } -func (x *PatternFlowIpv4FragmentOffset) GetDecrement() *PatternFlowIpv4FragmentOffsetCounter { - if x != nil { - return x.Decrement +func (x *Bgpv6Metric) GetFsmState() Bgpv6Metric_FsmState_Enum { + if x != nil && x.FsmState != nil { + return *x.FsmState } - return nil + return Bgpv6Metric_FsmState_unspecified } -func (x *PatternFlowIpv4FragmentOffset) GetMetricTags() []*PatternFlowIpv4FragmentOffsetMetricTag { - if x != nil { - return x.MetricTags +func (x *Bgpv6Metric) GetEndOfRibReceived() uint64 { + if x != nil && x.EndOfRibReceived != nil { + return *x.EndOfRibReceived } - return nil + return 0 } -// integer counter pattern -type PatternFlowIpv4TimeToLiveCounter struct { +// The request to retrieve ISIS per Router metrics/statistics. +type IsisMetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 64 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The names of ISIS Routers to return results for. An empty list will return results + // for all ISIS router. + // + // x-constraint: + // - /components/schemas/Device.IsisRouter/properties/name + // + // x-constraint: + // - /components/schemas/Device.IsisRouter/properties/name + RouterNames []string `protobuf:"bytes,1,rep,name=router_names,json=routerNames,proto3" json:"router_names,omitempty"` + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned except for any result_groups. The name of + // the ISIS Router cannot be excluded. + ColumnNames []IsisMetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.IsisMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` } -func (x *PatternFlowIpv4TimeToLiveCounter) Reset() { - *x = PatternFlowIpv4TimeToLiveCounter{} +func (x *IsisMetricsRequest) Reset() { + *x = IsisMetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[481] + mi := &file_otg_proto_msgTypes[473] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TimeToLiveCounter) String() string { +func (x *IsisMetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TimeToLiveCounter) ProtoMessage() {} +func (*IsisMetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4TimeToLiveCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[481] +func (x *IsisMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[473] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63134,70 +64341,104 @@ func (x *PatternFlowIpv4TimeToLiveCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TimeToLiveCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TimeToLiveCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{481} -} - -func (x *PatternFlowIpv4TimeToLiveCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use IsisMetricsRequest.ProtoReflect.Descriptor instead. +func (*IsisMetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{473} } -func (x *PatternFlowIpv4TimeToLiveCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *IsisMetricsRequest) GetRouterNames() []string { + if x != nil { + return x.RouterNames } - return 0 + return nil } -func (x *PatternFlowIpv4TimeToLiveCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *IsisMetricsRequest) GetColumnNames() []IsisMetricsRequest_ColumnNames_Enum { + if x != nil { + return x.ColumnNames } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4TimeToLiveMetricTag struct { +// ISIS per router statistics information. +type IsisMetric struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true + // The name of a configured ISIS router. Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 8 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The number of Level 1 (L1) sessions that are fully up. + L1SessionsUp *uint32 `protobuf:"varint,2,opt,name=l1_sessions_up,json=l1SessionsUp,proto3,oneof" json:"l1_sessions_up,omitempty"` + // The number of Level 1 Sessions Flap. + L1SessionFlap *uint64 `protobuf:"varint,3,opt,name=l1_session_flap,json=l1SessionFlap,proto3,oneof" json:"l1_session_flap,omitempty"` + // Number of Level 1 Hello messages sent. + L1BroadcastHellosSent *uint64 `protobuf:"varint,4,opt,name=l1_broadcast_hellos_sent,json=l1BroadcastHellosSent,proto3,oneof" json:"l1_broadcast_hellos_sent,omitempty"` + // Number of Level 1 Hello messages received. + L1BroadcastHellosReceived *uint64 `protobuf:"varint,5,opt,name=l1_broadcast_hellos_received,json=l1BroadcastHellosReceived,proto3,oneof" json:"l1_broadcast_hellos_received,omitempty"` + // Number of Level 1 Point-to-Point(P2P) Hello messages sent. + L1PointToPointHellosSent *uint64 `protobuf:"varint,6,opt,name=l1_point_to_point_hellos_sent,json=l1PointToPointHellosSent,proto3,oneof" json:"l1_point_to_point_hellos_sent,omitempty"` + // Number of Level 1 Point-to-Point(P2P) Hello messages received. + L1PointToPointHellosReceived *uint64 `protobuf:"varint,7,opt,name=l1_point_to_point_hellos_received,json=l1PointToPointHellosReceived,proto3,oneof" json:"l1_point_to_point_hellos_received,omitempty"` + // Number of Link State Updates (LSPs) in the Level 1 LSP Databases. + L1DatabaseSize *uint64 `protobuf:"varint,8,opt,name=l1_database_size,json=l1DatabaseSize,proto3,oneof" json:"l1_database_size,omitempty"` + // Number of Level 1 (L1) Partial Sequence Number Packet (PSNPs) sent. + L1PsnpSent *uint64 `protobuf:"varint,9,opt,name=l1_psnp_sent,json=l1PsnpSent,proto3,oneof" json:"l1_psnp_sent,omitempty"` + // Number of Level 1 (L1) Complete Sequence Number Packet (PSNPs) received. + L1PsnpReceived *uint64 `protobuf:"varint,10,opt,name=l1_psnp_received,json=l1PsnpReceived,proto3,oneof" json:"l1_psnp_received,omitempty"` + // Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) sent. + L1CsnpSent *uint64 `protobuf:"varint,11,opt,name=l1_csnp_sent,json=l1CsnpSent,proto3,oneof" json:"l1_csnp_sent,omitempty"` + // Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) received. + L1CsnpReceived *uint64 `protobuf:"varint,12,opt,name=l1_csnp_received,json=l1CsnpReceived,proto3,oneof" json:"l1_csnp_received,omitempty"` + // Number of Level 1 (L1) Link State Protocol Data Units (LSPs) sent. + L1LspSent *uint64 `protobuf:"varint,13,opt,name=l1_lsp_sent,json=l1LspSent,proto3,oneof" json:"l1_lsp_sent,omitempty"` + // Number of Level 1 (L1) Link State Protocol Data Units (LSPs) received. + L1LspReceived *uint64 `protobuf:"varint,14,opt,name=l1_lsp_received,json=l1LspReceived,proto3,oneof" json:"l1_lsp_received,omitempty"` + // The number of Level 2 (L2) sessions that are fully up. + L2SessionsUp *uint32 `protobuf:"varint,15,opt,name=l2_sessions_up,json=l2SessionsUp,proto3,oneof" json:"l2_sessions_up,omitempty"` + // The number of Level 2 Sessions Flap. + L2SessionFlap *uint64 `protobuf:"varint,16,opt,name=l2_session_flap,json=l2SessionFlap,proto3,oneof" json:"l2_session_flap,omitempty"` + // Number of Level 2 Hello messages sent. + L2BroadcastHellosSent *uint64 `protobuf:"varint,17,opt,name=l2_broadcast_hellos_sent,json=l2BroadcastHellosSent,proto3,oneof" json:"l2_broadcast_hellos_sent,omitempty"` + // Number of Level 2 Hello messages received. + L2BroadcastHellosReceived *uint64 `protobuf:"varint,18,opt,name=l2_broadcast_hellos_received,json=l2BroadcastHellosReceived,proto3,oneof" json:"l2_broadcast_hellos_received,omitempty"` + // Number of Level 2 Point-to-Point(P2P) Hello messages sent. + L2PointToPointHellosSent *uint64 `protobuf:"varint,19,opt,name=l2_point_to_point_hellos_sent,json=l2PointToPointHellosSent,proto3,oneof" json:"l2_point_to_point_hellos_sent,omitempty"` + // Number of Level 2 Point-to-Point(P2P) Hello messages received. + L2PointToPointHellosReceived *uint64 `protobuf:"varint,20,opt,name=l2_point_to_point_hellos_received,json=l2PointToPointHellosReceived,proto3,oneof" json:"l2_point_to_point_hellos_received,omitempty"` + // Number of Link State Updates (LSPs) in the Level 2 LSP Databases. + L2DatabaseSize *uint64 `protobuf:"varint,21,opt,name=l2_database_size,json=l2DatabaseSize,proto3,oneof" json:"l2_database_size,omitempty"` + // Number of Level 2 (L2) Partial Sequence Number Packet (PSNPs) sent. + L2PsnpSent *uint64 `protobuf:"varint,22,opt,name=l2_psnp_sent,json=l2PsnpSent,proto3,oneof" json:"l2_psnp_sent,omitempty"` + // Number of Level 2 (L2) Complete Sequence Number Packet (PSNPs) received. + L2PsnpReceived *uint64 `protobuf:"varint,23,opt,name=l2_psnp_received,json=l2PsnpReceived,proto3,oneof" json:"l2_psnp_received,omitempty"` + // Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) sent. + L2CsnpSent *uint64 `protobuf:"varint,24,opt,name=l2_csnp_sent,json=l2CsnpSent,proto3,oneof" json:"l2_csnp_sent,omitempty"` + // Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) received. + L2CsnpReceived *uint64 `protobuf:"varint,25,opt,name=l2_csnp_received,json=l2CsnpReceived,proto3,oneof" json:"l2_csnp_received,omitempty"` + // Number of Level 2 (L2) Link State Protocol Data Units (LSPs) sent. + L2LspSent *uint64 `protobuf:"varint,26,opt,name=l2_lsp_sent,json=l2LspSent,proto3,oneof" json:"l2_lsp_sent,omitempty"` + // Number of Level 2 (L2) Link State Protocol Data Units (LSPs) received. + L2LspReceived *uint64 `protobuf:"varint,27,opt,name=l2_lsp_received,json=l2LspReceived,proto3,oneof" json:"l2_lsp_received,omitempty"` } -func (x *PatternFlowIpv4TimeToLiveMetricTag) Reset() { - *x = PatternFlowIpv4TimeToLiveMetricTag{} +func (x *IsisMetric) Reset() { + *x = IsisMetric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[482] + mi := &file_otg_proto_msgTypes[474] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TimeToLiveMetricTag) String() string { +func (x *IsisMetric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TimeToLiveMetricTag) ProtoMessage() {} +func (*IsisMetric) ProtoMessage() {} -func (x *PatternFlowIpv4TimeToLiveMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[482] +func (x *IsisMetric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[474] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63208,239 +64449,237 @@ func (x *PatternFlowIpv4TimeToLiveMetricTag) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TimeToLiveMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TimeToLiveMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{482} +// Deprecated: Use IsisMetric.ProtoReflect.Descriptor instead. +func (*IsisMetric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{474} } -func (x *PatternFlowIpv4TimeToLiveMetricTag) GetName() string { +func (x *IsisMetric) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIpv4TimeToLiveMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *IsisMetric) GetL1SessionsUp() uint32 { + if x != nil && x.L1SessionsUp != nil { + return *x.L1SessionsUp } return 0 } -func (x *PatternFlowIpv4TimeToLiveMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *IsisMetric) GetL1SessionFlap() uint64 { + if x != nil && x.L1SessionFlap != nil { + return *x.L1SessionFlap } return 0 } -// Time to live -type PatternFlowIpv4TimeToLive struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *IsisMetric) GetL1BroadcastHellosSent() uint64 { + if x != nil && x.L1BroadcastHellosSent != nil { + return *x.L1BroadcastHellosSent + } + return 0 +} - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4TimeToLive_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TimeToLive_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 64 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [64] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4TimeToLiveCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4TimeToLiveCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4TimeToLiveMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` +func (x *IsisMetric) GetL1BroadcastHellosReceived() uint64 { + if x != nil && x.L1BroadcastHellosReceived != nil { + return *x.L1BroadcastHellosReceived + } + return 0 } -func (x *PatternFlowIpv4TimeToLive) Reset() { - *x = PatternFlowIpv4TimeToLive{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[483] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *IsisMetric) GetL1PointToPointHellosSent() uint64 { + if x != nil && x.L1PointToPointHellosSent != nil { + return *x.L1PointToPointHellosSent } + return 0 } -func (x *PatternFlowIpv4TimeToLive) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *IsisMetric) GetL1PointToPointHellosReceived() uint64 { + if x != nil && x.L1PointToPointHellosReceived != nil { + return *x.L1PointToPointHellosReceived + } + return 0 } -func (*PatternFlowIpv4TimeToLive) ProtoMessage() {} +func (x *IsisMetric) GetL1DatabaseSize() uint64 { + if x != nil && x.L1DatabaseSize != nil { + return *x.L1DatabaseSize + } + return 0 +} -func (x *PatternFlowIpv4TimeToLive) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[483] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *IsisMetric) GetL1PsnpSent() uint64 { + if x != nil && x.L1PsnpSent != nil { + return *x.L1PsnpSent } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowIpv4TimeToLive.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TimeToLive) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{483} +func (x *IsisMetric) GetL1PsnpReceived() uint64 { + if x != nil && x.L1PsnpReceived != nil { + return *x.L1PsnpReceived + } + return 0 } -func (x *PatternFlowIpv4TimeToLive) GetChoice() PatternFlowIpv4TimeToLive_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *IsisMetric) GetL1CsnpSent() uint64 { + if x != nil && x.L1CsnpSent != nil { + return *x.L1CsnpSent } - return PatternFlowIpv4TimeToLive_Choice_unspecified + return 0 } -func (x *PatternFlowIpv4TimeToLive) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *IsisMetric) GetL1CsnpReceived() uint64 { + if x != nil && x.L1CsnpReceived != nil { + return *x.L1CsnpReceived } return 0 } -func (x *PatternFlowIpv4TimeToLive) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *IsisMetric) GetL1LspSent() uint64 { + if x != nil && x.L1LspSent != nil { + return *x.L1LspSent } - return nil + return 0 } -func (x *PatternFlowIpv4TimeToLive) GetIncrement() *PatternFlowIpv4TimeToLiveCounter { - if x != nil { - return x.Increment +func (x *IsisMetric) GetL1LspReceived() uint64 { + if x != nil && x.L1LspReceived != nil { + return *x.L1LspReceived } - return nil + return 0 } -func (x *PatternFlowIpv4TimeToLive) GetDecrement() *PatternFlowIpv4TimeToLiveCounter { - if x != nil { - return x.Decrement +func (x *IsisMetric) GetL2SessionsUp() uint32 { + if x != nil && x.L2SessionsUp != nil { + return *x.L2SessionsUp } - return nil + return 0 } -func (x *PatternFlowIpv4TimeToLive) GetMetricTags() []*PatternFlowIpv4TimeToLiveMetricTag { - if x != nil { - return x.MetricTags +func (x *IsisMetric) GetL2SessionFlap() uint64 { + if x != nil && x.L2SessionFlap != nil { + return *x.L2SessionFlap } - return nil + return 0 } -// integer counter pattern -type PatternFlowIpv4ProtocolCounter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *IsisMetric) GetL2BroadcastHellosSent() uint64 { + if x != nil && x.L2BroadcastHellosSent != nil { + return *x.L2BroadcastHellosSent + } + return 0 +} - // Description missing in models - // default = 61 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` +func (x *IsisMetric) GetL2BroadcastHellosReceived() uint64 { + if x != nil && x.L2BroadcastHellosReceived != nil { + return *x.L2BroadcastHellosReceived + } + return 0 } -func (x *PatternFlowIpv4ProtocolCounter) Reset() { - *x = PatternFlowIpv4ProtocolCounter{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[484] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *IsisMetric) GetL2PointToPointHellosSent() uint64 { + if x != nil && x.L2PointToPointHellosSent != nil { + return *x.L2PointToPointHellosSent } + return 0 } -func (x *PatternFlowIpv4ProtocolCounter) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *IsisMetric) GetL2PointToPointHellosReceived() uint64 { + if x != nil && x.L2PointToPointHellosReceived != nil { + return *x.L2PointToPointHellosReceived + } + return 0 } -func (*PatternFlowIpv4ProtocolCounter) ProtoMessage() {} +func (x *IsisMetric) GetL2DatabaseSize() uint64 { + if x != nil && x.L2DatabaseSize != nil { + return *x.L2DatabaseSize + } + return 0 +} -func (x *PatternFlowIpv4ProtocolCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[484] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *IsisMetric) GetL2PsnpSent() uint64 { + if x != nil && x.L2PsnpSent != nil { + return *x.L2PsnpSent } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowIpv4ProtocolCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4ProtocolCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{484} +func (x *IsisMetric) GetL2PsnpReceived() uint64 { + if x != nil && x.L2PsnpReceived != nil { + return *x.L2PsnpReceived + } + return 0 } -func (x *PatternFlowIpv4ProtocolCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *IsisMetric) GetL2CsnpSent() uint64 { + if x != nil && x.L2CsnpSent != nil { + return *x.L2CsnpSent } return 0 } -func (x *PatternFlowIpv4ProtocolCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *IsisMetric) GetL2CsnpReceived() uint64 { + if x != nil && x.L2CsnpReceived != nil { + return *x.L2CsnpReceived } return 0 } -func (x *PatternFlowIpv4ProtocolCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *IsisMetric) GetL2LspSent() uint64 { + if x != nil && x.L2LspSent != nil { + return *x.L2LspSent } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4ProtocolMetricTag struct { +func (x *IsisMetric) GetL2LspReceived() uint64 { + if x != nil && x.L2LspReceived != nil { + return *x.L2LspReceived + } + return 0 +} + +// The request to retrieve per LAG metrics/statistics. +type LagMetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 8 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The names of LAGs to return results for. An empty list will return results for all + // LAGs. + // + // x-constraint: + // - /components/schemas/Lag/properties/name + // + // x-constraint: + // - /components/schemas/Lag/properties/name + LagNames []string `protobuf:"bytes,1,rep,name=lag_names,json=lagNames,proto3" json:"lag_names,omitempty"` + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned. The name of the LAG cannot be excluded. + ColumnNames []LagMetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.LagMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` } -func (x *PatternFlowIpv4ProtocolMetricTag) Reset() { - *x = PatternFlowIpv4ProtocolMetricTag{} +func (x *LagMetricsRequest) Reset() { + *x = LagMetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[485] + mi := &file_otg_proto_msgTypes[475] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4ProtocolMetricTag) String() string { +func (x *LagMetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4ProtocolMetricTag) ProtoMessage() {} +func (*LagMetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4ProtocolMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[485] +func (x *LagMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[475] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63451,79 +64690,79 @@ func (x *PatternFlowIpv4ProtocolMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4ProtocolMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4ProtocolMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{485} -} - -func (x *PatternFlowIpv4ProtocolMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" +// Deprecated: Use LagMetricsRequest.ProtoReflect.Descriptor instead. +func (*LagMetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{475} } -func (x *PatternFlowIpv4ProtocolMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *LagMetricsRequest) GetLagNames() []string { + if x != nil { + return x.LagNames } - return 0 + return nil } -func (x *PatternFlowIpv4ProtocolMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *LagMetricsRequest) GetColumnNames() []LagMetricsRequest_ColumnNames_Enum { + if x != nil { + return x.ColumnNames } - return 0 + return nil } -// Protocol, default is 61 any host internal protocol -type PatternFlowIpv4Protocol struct { +// Description missing in models +type LagMetric struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.auto - Choice *PatternFlowIpv4Protocol_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4Protocol_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 61 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [61] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // The OTG implementation can provide a system generated - // value for this property. If the OTG is unable to generate a value - // the default value must be used. - // default = 61 - Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4ProtocolCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4ProtocolCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4ProtocolMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The name of a configured LAG + // + // x-constraint: + // - /components/schemas/Lag/properties/name + // + // x-constraint: + // - /components/schemas/Lag/properties/name + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // The current operational state of the LAG. The state can be up or down. State 'up' + // indicates member_ports_up >= min_links. + OperStatus *LagMetric_OperStatus_Enum `protobuf:"varint,2,opt,name=oper_status,json=operStatus,proto3,enum=otg.LagMetric_OperStatus_Enum,oneof" json:"oper_status,omitempty"` + // The number of LAG member ports up. + MemberPortsUp *uint32 `protobuf:"varint,3,opt,name=member_ports_up,json=memberPortsUp,proto3,oneof" json:"member_ports_up,omitempty"` + // The current total number of frames transmitted. + FramesTx *uint64 `protobuf:"varint,4,opt,name=frames_tx,json=framesTx,proto3,oneof" json:"frames_tx,omitempty"` + // The current total number of valid frames received. + FramesRx *uint64 `protobuf:"varint,5,opt,name=frames_rx,json=framesRx,proto3,oneof" json:"frames_rx,omitempty"` + // The current total number of bytes transmitted. + BytesTx *uint64 `protobuf:"varint,6,opt,name=bytes_tx,json=bytesTx,proto3,oneof" json:"bytes_tx,omitempty"` + // The current total number of valid bytes received. + BytesRx *uint64 `protobuf:"varint,7,opt,name=bytes_rx,json=bytesRx,proto3,oneof" json:"bytes_rx,omitempty"` + // The current rate of frames transmitted. + FramesTxRate *float32 `protobuf:"fixed32,8,opt,name=frames_tx_rate,json=framesTxRate,proto3,oneof" json:"frames_tx_rate,omitempty"` + // The current rate of valid frames received. + FramesRxRate *float32 `protobuf:"fixed32,9,opt,name=frames_rx_rate,json=framesRxRate,proto3,oneof" json:"frames_rx_rate,omitempty"` + // The current rate of bytes transmitted. + BytesTxRate *float32 `protobuf:"fixed32,10,opt,name=bytes_tx_rate,json=bytesTxRate,proto3,oneof" json:"bytes_tx_rate,omitempty"` + // The current rate of bytes received. + BytesRxRate *float32 `protobuf:"fixed32,11,opt,name=bytes_rx_rate,json=bytesRxRate,proto3,oneof" json:"bytes_rx_rate,omitempty"` } -func (x *PatternFlowIpv4Protocol) Reset() { - *x = PatternFlowIpv4Protocol{} +func (x *LagMetric) Reset() { + *x = LagMetric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[486] + mi := &file_otg_proto_msgTypes[476] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4Protocol) String() string { +func (x *LagMetric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4Protocol) ProtoMessage() {} +func (*LagMetric) ProtoMessage() {} -func (x *PatternFlowIpv4Protocol) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[486] +func (x *LagMetric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[476] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63534,93 +64773,135 @@ func (x *PatternFlowIpv4Protocol) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4Protocol.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4Protocol) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{486} +// Deprecated: Use LagMetric.ProtoReflect.Descriptor instead. +func (*LagMetric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{476} } -func (x *PatternFlowIpv4Protocol) GetChoice() PatternFlowIpv4Protocol_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *LagMetric) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return PatternFlowIpv4Protocol_Choice_unspecified + return "" } -func (x *PatternFlowIpv4Protocol) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *LagMetric) GetOperStatus() LagMetric_OperStatus_Enum { + if x != nil && x.OperStatus != nil { + return *x.OperStatus + } + return LagMetric_OperStatus_unspecified +} + +func (x *LagMetric) GetMemberPortsUp() uint32 { + if x != nil && x.MemberPortsUp != nil { + return *x.MemberPortsUp } return 0 } -func (x *PatternFlowIpv4Protocol) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *LagMetric) GetFramesTx() uint64 { + if x != nil && x.FramesTx != nil { + return *x.FramesTx } - return nil + return 0 } -func (x *PatternFlowIpv4Protocol) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto +func (x *LagMetric) GetFramesRx() uint64 { + if x != nil && x.FramesRx != nil { + return *x.FramesRx } return 0 } -func (x *PatternFlowIpv4Protocol) GetIncrement() *PatternFlowIpv4ProtocolCounter { - if x != nil { - return x.Increment +func (x *LagMetric) GetBytesTx() uint64 { + if x != nil && x.BytesTx != nil { + return *x.BytesTx } - return nil + return 0 } -func (x *PatternFlowIpv4Protocol) GetDecrement() *PatternFlowIpv4ProtocolCounter { - if x != nil { - return x.Decrement +func (x *LagMetric) GetBytesRx() uint64 { + if x != nil && x.BytesRx != nil { + return *x.BytesRx } - return nil + return 0 } -func (x *PatternFlowIpv4Protocol) GetMetricTags() []*PatternFlowIpv4ProtocolMetricTag { - if x != nil { - return x.MetricTags +func (x *LagMetric) GetFramesTxRate() float32 { + if x != nil && x.FramesTxRate != nil { + return *x.FramesTxRate } - return nil + return 0 } -// Header checksum -type PatternFlowIpv4HeaderChecksum struct { +func (x *LagMetric) GetFramesRxRate() float32 { + if x != nil && x.FramesRxRate != nil { + return *x.FramesRxRate + } + return 0 +} + +func (x *LagMetric) GetBytesTxRate() float32 { + if x != nil && x.BytesTxRate != nil { + return *x.BytesTxRate + } + return 0 +} + +func (x *LagMetric) GetBytesRxRate() float32 { + if x != nil && x.BytesRxRate != nil { + return *x.BytesRxRate + } + return 0 +} + +// The request to retrieve LACP per LAG member metrics/statistics. +type LacpMetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The type of checksum - // default = Choice.Enum.generated - Choice *PatternFlowIpv4HeaderChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4HeaderChecksum_Choice_Enum,oneof" json:"choice,omitempty"` - // A system generated checksum value - // default = Generated.Enum.good - Generated *PatternFlowIpv4HeaderChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowIpv4HeaderChecksum_Generated_Enum,oneof" json:"generated,omitempty"` - // A custom checksum value - Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` + // The names of LAG (ports group) for which LACP metrics to be returned. An empty list + // will return metrics for all LAGs. + // + // x-constraint: + // - /components/schemas/Lag/properties/name + // + // x-constraint: + // - /components/schemas/Lag/properties/name + LagNames []string `protobuf:"bytes,1,rep,name=lag_names,json=lagNames,proto3" json:"lag_names,omitempty"` + // The names of LAG members (ports) for which LACP metrics to be returned. An empty + // list will return metrics for all LAG members. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // x-constraint: + // - /components/schemas/Port/properties/name + LagMemberPortNames []string `protobuf:"bytes,2,rep,name=lag_member_port_names,json=lagMemberPortNames,proto3" json:"lag_member_port_names,omitempty"` + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned. The name of LAG and LAG member can not be + // excluded. + ColumnNames []LacpMetricsRequest_ColumnNames_Enum `protobuf:"varint,3,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.LacpMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` } -func (x *PatternFlowIpv4HeaderChecksum) Reset() { - *x = PatternFlowIpv4HeaderChecksum{} +func (x *LacpMetricsRequest) Reset() { + *x = LacpMetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[487] + mi := &file_otg_proto_msgTypes[477] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4HeaderChecksum) String() string { +func (x *LacpMetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4HeaderChecksum) ProtoMessage() {} +func (*LacpMetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4HeaderChecksum) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[487] +func (x *LacpMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[477] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63631,66 +64912,94 @@ func (x *PatternFlowIpv4HeaderChecksum) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4HeaderChecksum.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4HeaderChecksum) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{487} +// Deprecated: Use LacpMetricsRequest.ProtoReflect.Descriptor instead. +func (*LacpMetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{477} } -func (x *PatternFlowIpv4HeaderChecksum) GetChoice() PatternFlowIpv4HeaderChecksum_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *LacpMetricsRequest) GetLagNames() []string { + if x != nil { + return x.LagNames } - return PatternFlowIpv4HeaderChecksum_Choice_unspecified + return nil } -func (x *PatternFlowIpv4HeaderChecksum) GetGenerated() PatternFlowIpv4HeaderChecksum_Generated_Enum { - if x != nil && x.Generated != nil { - return *x.Generated +func (x *LacpMetricsRequest) GetLagMemberPortNames() []string { + if x != nil { + return x.LagMemberPortNames } - return PatternFlowIpv4HeaderChecksum_Generated_unspecified + return nil } -func (x *PatternFlowIpv4HeaderChecksum) GetCustom() uint32 { - if x != nil && x.Custom != nil { - return *x.Custom +func (x *LacpMetricsRequest) GetColumnNames() []LacpMetricsRequest_ColumnNames_Enum { + if x != nil { + return x.ColumnNames } - return 0 + return nil } -// ipv4 counter pattern -type PatternFlowIpv4SrcCounter struct { +// LACP metrics (statistics) per LAG member. +type LacpMetric struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0.0.0.0 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 0.0.0.1 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The name of a LAG (ports group) configured with LACP. + LagName *string `protobuf:"bytes,1,opt,name=lag_name,json=lagName,proto3,oneof" json:"lag_name,omitempty"` + // The name of a LAG member (port) configured with LACP. + LagMemberPortName *string `protobuf:"bytes,2,opt,name=lag_member_port_name,json=lagMemberPortName,proto3,oneof" json:"lag_member_port_name,omitempty"` + // Number of LACPDUs received. + LacpPacketsRx *uint64 `protobuf:"varint,3,opt,name=lacp_packets_rx,json=lacpPacketsRx,proto3,oneof" json:"lacp_packets_rx,omitempty"` + // Number of LACPDUs transmitted. + LacpPacketsTx *uint64 `protobuf:"varint,4,opt,name=lacp_packets_tx,json=lacpPacketsTx,proto3,oneof" json:"lacp_packets_tx,omitempty"` + // Number of LACPDUs receive packet errors. + LacpRxErrors *uint64 `protobuf:"varint,5,opt,name=lacp_rx_errors,json=lacpRxErrors,proto3,oneof" json:"lacp_rx_errors,omitempty"` + // Indicates participant is active or passive. + Activity *LacpMetric_Activity_Enum `protobuf:"varint,6,opt,name=activity,proto3,enum=otg.LacpMetric_Activity_Enum,oneof" json:"activity,omitempty"` + // The timeout type (short or long) used by the participant. + Timeout *LacpMetric_Timeout_Enum `protobuf:"varint,7,opt,name=timeout,proto3,enum=otg.LacpMetric_Timeout_Enum,oneof" json:"timeout,omitempty"` + // Indicates whether the participant is in-sync or out-of-sync. + Synchronization *LacpMetric_Synchronization_Enum `protobuf:"varint,8,opt,name=synchronization,proto3,enum=otg.LacpMetric_Synchronization_Enum,oneof" json:"synchronization,omitempty"` + // A true value indicates that the participant will allow the link to be used as part + // of the aggregate. A false value indicates the link should be used as an individual + // link. + Aggregatable *bool `protobuf:"varint,9,opt,name=aggregatable,proto3,oneof" json:"aggregatable,omitempty"` + // If true, the participant is collecting incoming frames on the link, otherwise false. + Collecting *bool `protobuf:"varint,10,opt,name=collecting,proto3,oneof" json:"collecting,omitempty"` + // When true, the participant is distributing outgoing frames; when false, distribution + // is disabled. + Distributing *bool `protobuf:"varint,11,opt,name=distributing,proto3,oneof" json:"distributing,omitempty"` + // MAC address that defines the local system ID for the aggregate interface. + SystemId *string `protobuf:"bytes,12,opt,name=system_id,json=systemId,proto3,oneof" json:"system_id,omitempty"` + // Current operational value of the key for the aggregate interface. + OperKey *uint32 `protobuf:"varint,13,opt,name=oper_key,json=operKey,proto3,oneof" json:"oper_key,omitempty"` + // MAC address representing the protocol partner's interface system ID. + PartnerId *string `protobuf:"bytes,14,opt,name=partner_id,json=partnerId,proto3,oneof" json:"partner_id,omitempty"` + // Operational value of the protocol partner's key. + PartnerKey *uint32 `protobuf:"varint,15,opt,name=partner_key,json=partnerKey,proto3,oneof" json:"partner_key,omitempty"` + // Port number of the local (actor) aggregation member. + PortNum *uint32 `protobuf:"varint,16,opt,name=port_num,json=portNum,proto3,oneof" json:"port_num,omitempty"` + // Port number of the partner (remote) port for this member port. + PartnerPortNum *uint32 `protobuf:"varint,17,opt,name=partner_port_num,json=partnerPortNum,proto3,oneof" json:"partner_port_num,omitempty"` } -func (x *PatternFlowIpv4SrcCounter) Reset() { - *x = PatternFlowIpv4SrcCounter{} +func (x *LacpMetric) Reset() { + *x = LacpMetric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[488] + mi := &file_otg_proto_msgTypes[478] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4SrcCounter) String() string { +func (x *LacpMetric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4SrcCounter) ProtoMessage() {} +func (*LacpMetric) ProtoMessage() {} -func (x *PatternFlowIpv4SrcCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[488] +func (x *LacpMetric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[478] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63701,70 +65010,167 @@ func (x *PatternFlowIpv4SrcCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4SrcCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4SrcCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{488} +// Deprecated: Use LacpMetric.ProtoReflect.Descriptor instead. +func (*LacpMetric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{478} } -func (x *PatternFlowIpv4SrcCounter) GetStart() string { - if x != nil && x.Start != nil { - return *x.Start +func (x *LacpMetric) GetLagName() string { + if x != nil && x.LagName != nil { + return *x.LagName } return "" } -func (x *PatternFlowIpv4SrcCounter) GetStep() string { - if x != nil && x.Step != nil { - return *x.Step +func (x *LacpMetric) GetLagMemberPortName() string { + if x != nil && x.LagMemberPortName != nil { + return *x.LagMemberPortName } return "" } -func (x *PatternFlowIpv4SrcCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *LacpMetric) GetLacpPacketsRx() uint64 { + if x != nil && x.LacpPacketsRx != nil { + return *x.LacpPacketsRx } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4SrcMetricTag struct { +func (x *LacpMetric) GetLacpPacketsTx() uint64 { + if x != nil && x.LacpPacketsTx != nil { + return *x.LacpPacketsTx + } + return 0 +} + +func (x *LacpMetric) GetLacpRxErrors() uint64 { + if x != nil && x.LacpRxErrors != nil { + return *x.LacpRxErrors + } + return 0 +} + +func (x *LacpMetric) GetActivity() LacpMetric_Activity_Enum { + if x != nil && x.Activity != nil { + return *x.Activity + } + return LacpMetric_Activity_unspecified +} + +func (x *LacpMetric) GetTimeout() LacpMetric_Timeout_Enum { + if x != nil && x.Timeout != nil { + return *x.Timeout + } + return LacpMetric_Timeout_unspecified +} + +func (x *LacpMetric) GetSynchronization() LacpMetric_Synchronization_Enum { + if x != nil && x.Synchronization != nil { + return *x.Synchronization + } + return LacpMetric_Synchronization_unspecified +} + +func (x *LacpMetric) GetAggregatable() bool { + if x != nil && x.Aggregatable != nil { + return *x.Aggregatable + } + return false +} + +func (x *LacpMetric) GetCollecting() bool { + if x != nil && x.Collecting != nil { + return *x.Collecting + } + return false +} + +func (x *LacpMetric) GetDistributing() bool { + if x != nil && x.Distributing != nil { + return *x.Distributing + } + return false +} + +func (x *LacpMetric) GetSystemId() string { + if x != nil && x.SystemId != nil { + return *x.SystemId + } + return "" +} + +func (x *LacpMetric) GetOperKey() uint32 { + if x != nil && x.OperKey != nil { + return *x.OperKey + } + return 0 +} + +func (x *LacpMetric) GetPartnerId() string { + if x != nil && x.PartnerId != nil { + return *x.PartnerId + } + return "" +} + +func (x *LacpMetric) GetPartnerKey() uint32 { + if x != nil && x.PartnerKey != nil { + return *x.PartnerKey + } + return 0 +} + +func (x *LacpMetric) GetPortNum() uint32 { + if x != nil && x.PortNum != nil { + return *x.PortNum + } + return 0 +} + +func (x *LacpMetric) GetPartnerPortNum() uint32 { + if x != nil && x.PartnerPortNum != nil { + return *x.PartnerPortNum + } + return 0 +} + +// The request to retrieve LLDP per instance metrics/statistics. +type LldpMetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 32 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The names of LLDP instances to return results for. An empty list will return results + // for all LLDP instances. + // + // x-constraint: + // - /components/schemas/Lldp/properties/name + // + // x-constraint: + // - /components/schemas/Lldp/properties/name + LldpNames []string `protobuf:"bytes,1,rep,name=lldp_names,json=lldpNames,proto3" json:"lldp_names,omitempty"` + // The requested list of column names for the result set. If the list is empty then + // metrics for all columns will be returned. The name of LLDP instance can not be excluded. + ColumnNames []LldpMetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.LldpMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` } -func (x *PatternFlowIpv4SrcMetricTag) Reset() { - *x = PatternFlowIpv4SrcMetricTag{} +func (x *LldpMetricsRequest) Reset() { + *x = LldpMetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[489] + mi := &file_otg_proto_msgTypes[479] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4SrcMetricTag) String() string { +func (x *LldpMetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4SrcMetricTag) ProtoMessage() {} +func (*LldpMetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4SrcMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[489] +func (x *LldpMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[479] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63775,74 +65181,74 @@ func (x *PatternFlowIpv4SrcMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4SrcMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4SrcMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{489} -} - -func (x *PatternFlowIpv4SrcMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" +// Deprecated: Use LldpMetricsRequest.ProtoReflect.Descriptor instead. +func (*LldpMetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{479} } -func (x *PatternFlowIpv4SrcMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *LldpMetricsRequest) GetLldpNames() []string { + if x != nil { + return x.LldpNames } - return 0 + return nil } -func (x *PatternFlowIpv4SrcMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *LldpMetricsRequest) GetColumnNames() []LldpMetricsRequest_ColumnNames_Enum { + if x != nil { + return x.ColumnNames } - return 0 + return nil } -// Source address -type PatternFlowIpv4Src struct { +// LLDP per instance statistics information. +type LldpMetric struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4Src_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4Src_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0.0.0.0 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = ['0.0.0.0'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4SrcCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4SrcCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4SrcMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The name of the configured LLDP instance. + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Number of LLDP frames received. + FramesRx *uint64 `protobuf:"varint,2,opt,name=frames_rx,json=framesRx,proto3,oneof" json:"frames_rx,omitempty"` + // Number of LLDP frames transmitted. + FramesTx *uint64 `protobuf:"varint,3,opt,name=frames_tx,json=framesTx,proto3,oneof" json:"frames_tx,omitempty"` + // Number of LLDP frames received with packet errors. This stat should be incremented + // based on statsFramesInErrorsTotal increment rule in section 10.3.2 of IEEE Std 802.1 + // AB-2005. + FramesErrorRx *uint64 `protobuf:"varint,4,opt,name=frames_error_rx,json=framesErrorRx,proto3,oneof" json:"frames_error_rx,omitempty"` + // Number of LLDP frames received that are discarded. This stat should be incremented + // when one or more of the three mandatory TLVs at the beginning of the LLDPDU is missing, + // out of order or contains an out of range information string length. This stat should + // follow the validation rules in section 10.3.2 of IEEE Std 802.1 AB-2005. + FramesDiscard *uint64 `protobuf:"varint,5,opt,name=frames_discard,json=framesDiscard,proto3,oneof" json:"frames_discard,omitempty"` + // Number of LLDP tlvs received that are discarded. If any TLV contains an error condition + // specific for that particular TLV or if any TLV extends past the physical end of + // the frame then these TLVs will be discarded. + TlvsDiscard *uint64 `protobuf:"varint,6,opt,name=tlvs_discard,json=tlvsDiscard,proto3,oneof" json:"tlvs_discard,omitempty"` + // Number of LLDP unknown tlvs received. If the OUI of the organizationlly specific + // TLV and/or organizationally defined subtype are not recognized,or if TLV type value + // is in the range of reserved TLV types then these TLVs will be considered as unknown + // TLVs. + TlvsUnknown *uint64 `protobuf:"varint,7,opt,name=tlvs_unknown,json=tlvsUnknown,proto3,oneof" json:"tlvs_unknown,omitempty"` } -func (x *PatternFlowIpv4Src) Reset() { - *x = PatternFlowIpv4Src{} +func (x *LldpMetric) Reset() { + *x = LldpMetric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[490] + mi := &file_otg_proto_msgTypes[480] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4Src) String() string { +func (x *LldpMetric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4Src) ProtoMessage() {} +func (*LldpMetric) ProtoMessage() {} -func (x *PatternFlowIpv4Src) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[490] +func (x *LldpMetric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[480] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63853,87 +65259,97 @@ func (x *PatternFlowIpv4Src) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4Src.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4Src) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{490} +// Deprecated: Use LldpMetric.ProtoReflect.Descriptor instead. +func (*LldpMetric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{480} } -func (x *PatternFlowIpv4Src) GetChoice() PatternFlowIpv4Src_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *LldpMetric) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return PatternFlowIpv4Src_Choice_unspecified + return "" } -func (x *PatternFlowIpv4Src) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value +func (x *LldpMetric) GetFramesRx() uint64 { + if x != nil && x.FramesRx != nil { + return *x.FramesRx } - return "" + return 0 } -func (x *PatternFlowIpv4Src) GetValues() []string { - if x != nil { - return x.Values +func (x *LldpMetric) GetFramesTx() uint64 { + if x != nil && x.FramesTx != nil { + return *x.FramesTx } - return nil + return 0 } -func (x *PatternFlowIpv4Src) GetIncrement() *PatternFlowIpv4SrcCounter { - if x != nil { - return x.Increment +func (x *LldpMetric) GetFramesErrorRx() uint64 { + if x != nil && x.FramesErrorRx != nil { + return *x.FramesErrorRx } - return nil + return 0 } -func (x *PatternFlowIpv4Src) GetDecrement() *PatternFlowIpv4SrcCounter { - if x != nil { - return x.Decrement +func (x *LldpMetric) GetFramesDiscard() uint64 { + if x != nil && x.FramesDiscard != nil { + return *x.FramesDiscard } - return nil + return 0 } -func (x *PatternFlowIpv4Src) GetMetricTags() []*PatternFlowIpv4SrcMetricTag { - if x != nil { - return x.MetricTags +func (x *LldpMetric) GetTlvsDiscard() uint64 { + if x != nil && x.TlvsDiscard != nil { + return *x.TlvsDiscard } - return nil + return 0 } -// ipv4 counter pattern -type PatternFlowIpv4DstCounter struct { +func (x *LldpMetric) GetTlvsUnknown() uint64 { + if x != nil && x.TlvsUnknown != nil { + return *x.TlvsUnknown + } + return 0 +} + +// The request to retrieve RSVP-TE per Router metrics/statistics. +type RsvpMetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0.0.0.0 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 0.0.0.1 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The names of RSVP-TE Routers to return results for. An empty list as input will return + // results for all RSVP-TE routers. + // + // x-constraint: + // - /components/schemas/Device.Rsvp/properties/name + // + // x-constraint: + // - /components/schemas/Device.Rsvp/properties/name + RouterNames []string `protobuf:"bytes,1,rep,name=router_names,json=routerNames,proto3" json:"router_names,omitempty"` + // The list of column names that the returned result set will contain. If the input + // list is empty then all columns will be returned except for any result_groups. + ColumnNames []RsvpMetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.RsvpMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` } -func (x *PatternFlowIpv4DstCounter) Reset() { - *x = PatternFlowIpv4DstCounter{} +func (x *RsvpMetricsRequest) Reset() { + *x = RsvpMetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[491] + mi := &file_otg_proto_msgTypes[481] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4DstCounter) String() string { +func (x *RsvpMetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4DstCounter) ProtoMessage() {} +func (*RsvpMetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4DstCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[491] +func (x *RsvpMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[481] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63944,70 +65360,119 @@ func (x *PatternFlowIpv4DstCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4DstCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4DstCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{491} -} - -func (x *PatternFlowIpv4DstCounter) GetStart() string { - if x != nil && x.Start != nil { - return *x.Start - } - return "" +// Deprecated: Use RsvpMetricsRequest.ProtoReflect.Descriptor instead. +func (*RsvpMetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{481} } -func (x *PatternFlowIpv4DstCounter) GetStep() string { - if x != nil && x.Step != nil { - return *x.Step +func (x *RsvpMetricsRequest) GetRouterNames() []string { + if x != nil { + return x.RouterNames } - return "" + return nil } -func (x *PatternFlowIpv4DstCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *RsvpMetricsRequest) GetColumnNames() []RsvpMetricsRequest_ColumnNames_Enum { + if x != nil { + return x.ColumnNames } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4DstMetricTag struct { +// RSVP-TE per router statistics information. +type RsvpMetric struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true + // The name of a configured RSVP router. Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 32 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The number of ingress point-to-point LSPs configured or transiting through the RSVP + // router which have been initated from the test port. + IngressP2PLspsConfigured *uint32 `protobuf:"varint,2,opt,name=ingress_p2p_lsps_configured,json=ingressP2pLspsConfigured,proto3,oneof" json:"ingress_p2p_lsps_configured,omitempty"` + // The number of ingress point-to-point LSPs for which Resv has been received and is + // currently up. + IngressP2PLspsUp *uint32 `protobuf:"varint,3,opt,name=ingress_p2p_lsps_up,json=ingressP2pLspsUp,proto3,oneof" json:"ingress_p2p_lsps_up,omitempty"` + // The number of egress point-to-point LSPs for which Path requests were successfully + // processed and is currently up. + EgressP2PLspsUp *uint32 `protobuf:"varint,4,opt,name=egress_p2p_lsps_up,json=egressP2pLspsUp,proto3,oneof" json:"egress_p2p_lsps_up,omitempty"` + // The number of times an LSP went from up to down state either because it timed out + // while waiting for Refreshes or a PathTear or ResvTear message was received which + // caused the LSP to flap. + LspFlapCount *uint64 `protobuf:"varint,5,opt,name=lsp_flap_count,json=lspFlapCount,proto3,oneof" json:"lsp_flap_count,omitempty"` + // The number of Path messages sent by this RSVP router. + PathsTx *uint64 `protobuf:"varint,6,opt,name=paths_tx,json=pathsTx,proto3,oneof" json:"paths_tx,omitempty"` + // The number of Path messages received by this RSVP router. + PathsRx *uint64 `protobuf:"varint,7,opt,name=paths_rx,json=pathsRx,proto3,oneof" json:"paths_rx,omitempty"` + // The number of Resv messages sent by this RSVP router. + ResvsTx *uint64 `protobuf:"varint,8,opt,name=resvs_tx,json=resvsTx,proto3,oneof" json:"resvs_tx,omitempty"` + // The number of Resv messages received by this RSVP router. + ResvsRx *uint64 `protobuf:"varint,9,opt,name=resvs_rx,json=resvsRx,proto3,oneof" json:"resvs_rx,omitempty"` + // The number of Path Tear messages sent by this RSVP router. + PathTearsTx *uint64 `protobuf:"varint,10,opt,name=path_tears_tx,json=pathTearsTx,proto3,oneof" json:"path_tears_tx,omitempty"` + // The number of Path Tear messages received by this RSVP router. + PathTearsRx *uint64 `protobuf:"varint,11,opt,name=path_tears_rx,json=pathTearsRx,proto3,oneof" json:"path_tears_rx,omitempty"` + // The number of Resv Tear messages sent by this RSVP router. + ResvTearsTx *uint64 `protobuf:"varint,12,opt,name=resv_tears_tx,json=resvTearsTx,proto3,oneof" json:"resv_tears_tx,omitempty"` + // The number of Resv Tear messages received by this RSVP router. + ResvTearsRx *uint64 `protobuf:"varint,13,opt,name=resv_tears_rx,json=resvTearsRx,proto3,oneof" json:"resv_tears_rx,omitempty"` + // The number of Path Error messages sent by this RSVP router. + PathErrorsTx *uint64 `protobuf:"varint,14,opt,name=path_errors_tx,json=pathErrorsTx,proto3,oneof" json:"path_errors_tx,omitempty"` + // The number of Path Error messages received by this RSVP router. + PathErrorsRx *uint64 `protobuf:"varint,15,opt,name=path_errors_rx,json=pathErrorsRx,proto3,oneof" json:"path_errors_rx,omitempty"` + // The number of Resv Error messages sent by this RSVP router. + ResvErrorsTx *uint64 `protobuf:"varint,16,opt,name=resv_errors_tx,json=resvErrorsTx,proto3,oneof" json:"resv_errors_tx,omitempty"` + // The number of Resv Error messages received by this RSVP router. + ResvErrorsRx *uint64 `protobuf:"varint,17,opt,name=resv_errors_rx,json=resvErrorsRx,proto3,oneof" json:"resv_errors_rx,omitempty"` + // The number of ResvConf messages sent by this RSVP router. + ResvConfTx *uint64 `protobuf:"varint,18,opt,name=resv_conf_tx,json=resvConfTx,proto3,oneof" json:"resv_conf_tx,omitempty"` + // The number of ResvConf messages received by this RSVP router. + ResvConfRx *uint64 `protobuf:"varint,19,opt,name=resv_conf_rx,json=resvConfRx,proto3,oneof" json:"resv_conf_rx,omitempty"` + // The number of Hello messages sent by this RSVP router. + HellosTx *uint64 `protobuf:"varint,20,opt,name=hellos_tx,json=hellosTx,proto3,oneof" json:"hellos_tx,omitempty"` + // The number of Hello messages received by this RSVP router. + HellosRx *uint64 `protobuf:"varint,21,opt,name=hellos_rx,json=hellosRx,proto3,oneof" json:"hellos_rx,omitempty"` + // The number of Ack messages sent by this RSVP router. + AcksTx *uint64 `protobuf:"varint,22,opt,name=acks_tx,json=acksTx,proto3,oneof" json:"acks_tx,omitempty"` + // The number of Ack messages received by this RSVP router. + AcksRx *uint64 `protobuf:"varint,23,opt,name=acks_rx,json=acksRx,proto3,oneof" json:"acks_rx,omitempty"` + // The number of Nack messages sent by this RSVP router. + NacksTx *uint64 `protobuf:"varint,24,opt,name=nacks_tx,json=nacksTx,proto3,oneof" json:"nacks_tx,omitempty"` + // The number of Nack messages received by this RSVP router. + NacksRx *uint64 `protobuf:"varint,25,opt,name=nacks_rx,json=nacksRx,proto3,oneof" json:"nacks_rx,omitempty"` + // The number of SRefresh messages sent by this RSVP router. + SrefreshTx *uint64 `protobuf:"varint,26,opt,name=srefresh_tx,json=srefreshTx,proto3,oneof" json:"srefresh_tx,omitempty"` + // The number of SRefresh messages received by this RSVP router. + SrefreshRx *uint64 `protobuf:"varint,27,opt,name=srefresh_rx,json=srefreshRx,proto3,oneof" json:"srefresh_rx,omitempty"` + // The number of Bundle messages sent by this RSVP router. + BundleTx *uint64 `protobuf:"varint,28,opt,name=bundle_tx,json=bundleTx,proto3,oneof" json:"bundle_tx,omitempty"` + // The number of Bundle messages received by this RSVP router. + BundleRx *uint64 `protobuf:"varint,29,opt,name=bundle_rx,json=bundleRx,proto3,oneof" json:"bundle_rx,omitempty"` + // The number of Path messages with Path Re-evaluation Request enabled sent by this + // RSVP router. + PathReevaluationRequestTx *uint64 `protobuf:"varint,30,opt,name=path_reevaluation_request_tx,json=pathReevaluationRequestTx,proto3,oneof" json:"path_reevaluation_request_tx,omitempty"` + // The number of successfully completed Make-Before-Break operations on LSPs on this + // RSVP router. + PathReoptimizations *uint64 `protobuf:"varint,31,opt,name=path_reoptimizations,json=pathReoptimizations,proto3,oneof" json:"path_reoptimizations,omitempty"` } -func (x *PatternFlowIpv4DstMetricTag) Reset() { - *x = PatternFlowIpv4DstMetricTag{} +func (x *RsvpMetric) Reset() { + *x = RsvpMetric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[492] + mi := &file_otg_proto_msgTypes[482] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4DstMetricTag) String() string { +func (x *RsvpMetric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4DstMetricTag) ProtoMessage() {} +func (*RsvpMetric) ProtoMessage() {} -func (x *PatternFlowIpv4DstMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[492] +func (x *RsvpMetric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[482] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64018,239 +65483,266 @@ func (x *PatternFlowIpv4DstMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4DstMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4DstMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{492} +// Deprecated: Use RsvpMetric.ProtoReflect.Descriptor instead. +func (*RsvpMetric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{482} } -func (x *PatternFlowIpv4DstMetricTag) GetName() string { +func (x *RsvpMetric) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIpv4DstMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *RsvpMetric) GetIngressP2PLspsConfigured() uint32 { + if x != nil && x.IngressP2PLspsConfigured != nil { + return *x.IngressP2PLspsConfigured } return 0 } -func (x *PatternFlowIpv4DstMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *RsvpMetric) GetIngressP2PLspsUp() uint32 { + if x != nil && x.IngressP2PLspsUp != nil { + return *x.IngressP2PLspsUp } return 0 } -// Destination address -type PatternFlowIpv4Dst struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *RsvpMetric) GetEgressP2PLspsUp() uint32 { + if x != nil && x.EgressP2PLspsUp != nil { + return *x.EgressP2PLspsUp + } + return 0 +} - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4Dst_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4Dst_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0.0.0.0 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = ['0.0.0.0'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4DstCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4DstCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4DstMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` +func (x *RsvpMetric) GetLspFlapCount() uint64 { + if x != nil && x.LspFlapCount != nil { + return *x.LspFlapCount + } + return 0 } -func (x *PatternFlowIpv4Dst) Reset() { - *x = PatternFlowIpv4Dst{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[493] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *RsvpMetric) GetPathsTx() uint64 { + if x != nil && x.PathsTx != nil { + return *x.PathsTx } + return 0 } -func (x *PatternFlowIpv4Dst) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *RsvpMetric) GetPathsRx() uint64 { + if x != nil && x.PathsRx != nil { + return *x.PathsRx + } + return 0 } -func (*PatternFlowIpv4Dst) ProtoMessage() {} +func (x *RsvpMetric) GetResvsTx() uint64 { + if x != nil && x.ResvsTx != nil { + return *x.ResvsTx + } + return 0 +} -func (x *PatternFlowIpv4Dst) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[493] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *RsvpMetric) GetResvsRx() uint64 { + if x != nil && x.ResvsRx != nil { + return *x.ResvsRx } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowIpv4Dst.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4Dst) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{493} +func (x *RsvpMetric) GetPathTearsTx() uint64 { + if x != nil && x.PathTearsTx != nil { + return *x.PathTearsTx + } + return 0 } -func (x *PatternFlowIpv4Dst) GetChoice() PatternFlowIpv4Dst_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *RsvpMetric) GetPathTearsRx() uint64 { + if x != nil && x.PathTearsRx != nil { + return *x.PathTearsRx } - return PatternFlowIpv4Dst_Choice_unspecified + return 0 } -func (x *PatternFlowIpv4Dst) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value +func (x *RsvpMetric) GetResvTearsTx() uint64 { + if x != nil && x.ResvTearsTx != nil { + return *x.ResvTearsTx } - return "" + return 0 } -func (x *PatternFlowIpv4Dst) GetValues() []string { - if x != nil { - return x.Values +func (x *RsvpMetric) GetResvTearsRx() uint64 { + if x != nil && x.ResvTearsRx != nil { + return *x.ResvTearsRx } - return nil + return 0 } -func (x *PatternFlowIpv4Dst) GetIncrement() *PatternFlowIpv4DstCounter { - if x != nil { - return x.Increment +func (x *RsvpMetric) GetPathErrorsTx() uint64 { + if x != nil && x.PathErrorsTx != nil { + return *x.PathErrorsTx } - return nil + return 0 } -func (x *PatternFlowIpv4Dst) GetDecrement() *PatternFlowIpv4DstCounter { - if x != nil { - return x.Decrement +func (x *RsvpMetric) GetPathErrorsRx() uint64 { + if x != nil && x.PathErrorsRx != nil { + return *x.PathErrorsRx } - return nil + return 0 } -func (x *PatternFlowIpv4Dst) GetMetricTags() []*PatternFlowIpv4DstMetricTag { - if x != nil { - return x.MetricTags +func (x *RsvpMetric) GetResvErrorsTx() uint64 { + if x != nil && x.ResvErrorsTx != nil { + return *x.ResvErrorsTx } - return nil + return 0 } -// integer counter pattern -type PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *RsvpMetric) GetResvErrorsRx() uint64 { + if x != nil && x.ResvErrorsRx != nil { + return *x.ResvErrorsRx + } + return 0 +} - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` +func (x *RsvpMetric) GetResvConfTx() uint64 { + if x != nil && x.ResvConfTx != nil { + return *x.ResvConfTx + } + return 0 } -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) Reset() { - *x = PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[494] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *RsvpMetric) GetResvConfRx() uint64 { + if x != nil && x.ResvConfRx != nil { + return *x.ResvConfRx } + return 0 } -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *RsvpMetric) GetHellosTx() uint64 { + if x != nil && x.HellosTx != nil { + return *x.HellosTx + } + return 0 } -func (*PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) ProtoMessage() {} +func (x *RsvpMetric) GetHellosRx() uint64 { + if x != nil && x.HellosRx != nil { + return *x.HellosRx + } + return 0 +} -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[494] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *RsvpMetric) GetAcksTx() uint64 { + if x != nil && x.AcksTx != nil { + return *x.AcksTx } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{494} +func (x *RsvpMetric) GetAcksRx() uint64 { + if x != nil && x.AcksRx != nil { + return *x.AcksRx + } + return 0 } -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *RsvpMetric) GetNacksTx() uint64 { + if x != nil && x.NacksTx != nil { + return *x.NacksTx } return 0 } -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *RsvpMetric) GetNacksRx() uint64 { + if x != nil && x.NacksRx != nil { + return *x.NacksRx } return 0 } -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *RsvpMetric) GetSrefreshTx() uint64 { + if x != nil && x.SrefreshTx != nil { + return *x.SrefreshTx } return 0 } -// This flag indicates this option is copied to all fragments on fragmentations. -type PatternFlowIpv4OptionsCustomTypeCopiedFlag struct { +func (x *RsvpMetric) GetSrefreshRx() uint64 { + if x != nil && x.SrefreshRx != nil { + return *x.SrefreshRx + } + return 0 +} + +func (x *RsvpMetric) GetBundleTx() uint64 { + if x != nil && x.BundleTx != nil { + return *x.BundleTx + } + return 0 +} + +func (x *RsvpMetric) GetBundleRx() uint64 { + if x != nil && x.BundleRx != nil { + return *x.BundleRx + } + return 0 +} + +func (x *RsvpMetric) GetPathReevaluationRequestTx() uint64 { + if x != nil && x.PathReevaluationRequestTx != nil { + return *x.PathReevaluationRequestTx + } + return 0 +} + +func (x *RsvpMetric) GetPathReoptimizations() uint64 { + if x != nil && x.PathReoptimizations != nil { + return *x.PathReoptimizations + } + return 0 +} + +// The request to retrieve DHCPv4 per client metrics/statistics. +type Dhcpv4ClientMetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // The names of DHCPv4 clients to return results for. An empty list will return results + // for all DHCPv4 client. + // + // x-constraint: + // - /components/schemas/Device.Dhcpv4client/properties/name + // + // x-constraint: + // - /components/schemas/Device.Dhcpv4client/properties/name + ClientNames []string `protobuf:"bytes,1,rep,name=client_names,json=clientNames,proto3" json:"client_names,omitempty"` + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned. The name of the DHCPv4 client cannot be + // excluded. + ColumnNames []Dhcpv4ClientMetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.Dhcpv4ClientMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` } -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) Reset() { - *x = PatternFlowIpv4OptionsCustomTypeCopiedFlag{} +func (x *Dhcpv4ClientMetricsRequest) Reset() { + *x = Dhcpv4ClientMetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[495] + mi := &file_otg_proto_msgTypes[483] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) String() string { +func (x *Dhcpv4ClientMetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4OptionsCustomTypeCopiedFlag) ProtoMessage() {} +func (*Dhcpv4ClientMetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[495] +func (x *Dhcpv4ClientMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[483] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64261,80 +65753,66 @@ func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4OptionsCustomTypeCopiedFlag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4OptionsCustomTypeCopiedFlag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{495} -} - -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) GetChoice() PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_unspecified -} - -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil +// Deprecated: Use Dhcpv4ClientMetricsRequest.ProtoReflect.Descriptor instead. +func (*Dhcpv4ClientMetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{483} } -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) GetIncrement() *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter { +func (x *Dhcpv4ClientMetricsRequest) GetClientNames() []string { if x != nil { - return x.Increment + return x.ClientNames } return nil } -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) GetDecrement() *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter { +func (x *Dhcpv4ClientMetricsRequest) GetColumnNames() []Dhcpv4ClientMetricsRequest_ColumnNames_Enum { if x != nil { - return x.Decrement + return x.ColumnNames } return nil } -// integer counter pattern -type PatternFlowIpv4OptionsCustomTypeOptionClassCounter struct { +// DHCPv4 per peer statistics information. +type Dhcpv4ClientMetric struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` -} - -func (x *PatternFlowIpv4OptionsCustomTypeOptionClassCounter) Reset() { - *x = PatternFlowIpv4OptionsCustomTypeOptionClassCounter{} + // The name of a configured DHCPv4 client. + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Number of DHCPDISCOVER messages sent. + DiscoversSent *uint64 `protobuf:"varint,2,opt,name=discovers_sent,json=discoversSent,proto3,oneof" json:"discovers_sent,omitempty"` + // Number of DHCPOFFER messages received. + OffersReceived *uint64 `protobuf:"varint,3,opt,name=offers_received,json=offersReceived,proto3,oneof" json:"offers_received,omitempty"` + // Number of DHCPREQUEST messages sent. + RequestsSent *uint64 `protobuf:"varint,4,opt,name=requests_sent,json=requestsSent,proto3,oneof" json:"requests_sent,omitempty"` + // Number of lease DHCPACK messages received. + AcksReceived *uint64 `protobuf:"varint,5,opt,name=acks_received,json=acksReceived,proto3,oneof" json:"acks_received,omitempty"` + // Number of negative lease DHCPNACK messages received. + NacksReceived *uint64 `protobuf:"varint,6,opt,name=nacks_received,json=nacksReceived,proto3,oneof" json:"nacks_received,omitempty"` + // Number of DHCPRELEASE messages sent. + ReleasesSent *uint64 `protobuf:"varint,7,opt,name=releases_sent,json=releasesSent,proto3,oneof" json:"releases_sent,omitempty"` + // Number of DHCPDECLINE messages sent. + DeclinesSent *uint64 `protobuf:"varint,8,opt,name=declines_sent,json=declinesSent,proto3,oneof" json:"declines_sent,omitempty"` +} + +func (x *Dhcpv4ClientMetric) Reset() { + *x = Dhcpv4ClientMetric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[496] + mi := &file_otg_proto_msgTypes[484] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4OptionsCustomTypeOptionClassCounter) String() string { +func (x *Dhcpv4ClientMetric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4OptionsCustomTypeOptionClassCounter) ProtoMessage() {} +func (*Dhcpv4ClientMetric) ProtoMessage() {} -func (x *PatternFlowIpv4OptionsCustomTypeOptionClassCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[496] +func (x *Dhcpv4ClientMetric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[484] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64345,70 +65823,105 @@ func (x *PatternFlowIpv4OptionsCustomTypeOptionClassCounter) ProtoReflect() prot return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4OptionsCustomTypeOptionClassCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4OptionsCustomTypeOptionClassCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{496} +// Deprecated: Use Dhcpv4ClientMetric.ProtoReflect.Descriptor instead. +func (*Dhcpv4ClientMetric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{484} } -func (x *PatternFlowIpv4OptionsCustomTypeOptionClassCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *Dhcpv4ClientMetric) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *Dhcpv4ClientMetric) GetDiscoversSent() uint64 { + if x != nil && x.DiscoversSent != nil { + return *x.DiscoversSent } return 0 } -func (x *PatternFlowIpv4OptionsCustomTypeOptionClassCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Dhcpv4ClientMetric) GetOffersReceived() uint64 { + if x != nil && x.OffersReceived != nil { + return *x.OffersReceived } return 0 } -func (x *PatternFlowIpv4OptionsCustomTypeOptionClassCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Dhcpv4ClientMetric) GetRequestsSent() uint64 { + if x != nil && x.RequestsSent != nil { + return *x.RequestsSent } return 0 } -// Option class [Ref:https://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml#ip-parameters-1]. -type PatternFlowIpv4OptionsCustomTypeOptionClass struct { +func (x *Dhcpv4ClientMetric) GetAcksReceived() uint64 { + if x != nil && x.AcksReceived != nil { + return *x.AcksReceived + } + return 0 +} + +func (x *Dhcpv4ClientMetric) GetNacksReceived() uint64 { + if x != nil && x.NacksReceived != nil { + return *x.NacksReceived + } + return 0 +} + +func (x *Dhcpv4ClientMetric) GetReleasesSent() uint64 { + if x != nil && x.ReleasesSent != nil { + return *x.ReleasesSent + } + return 0 +} + +func (x *Dhcpv4ClientMetric) GetDeclinesSent() uint64 { + if x != nil && x.DeclinesSent != nil { + return *x.DeclinesSent + } + return 0 +} + +// The request to retrieve DHCPv4 per Server metrics/statistics. +type Dhcpv4ServerMetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4OptionsCustomTypeOptionClassCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4OptionsCustomTypeOptionClassCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // The names of DHCPv4 Servers to return results for. An empty list will return results + // for all DHCPv4 Server. + // + // x-constraint: + // - /components/schemas/Device.Dhcpv4Server/properties/name + // + // x-constraint: + // - /components/schemas/Device.Dhcpv4Server/properties/name + ServerNames []string `protobuf:"bytes,1,rep,name=server_names,json=serverNames,proto3" json:"server_names,omitempty"` + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned. The name of the DHCPv4 server cannot be + // excluded. + ColumnNames []Dhcpv4ServerMetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.Dhcpv4ServerMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` } -func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) Reset() { - *x = PatternFlowIpv4OptionsCustomTypeOptionClass{} +func (x *Dhcpv4ServerMetricsRequest) Reset() { + *x = Dhcpv4ServerMetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[497] + mi := &file_otg_proto_msgTypes[485] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) String() string { +func (x *Dhcpv4ServerMetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4OptionsCustomTypeOptionClass) ProtoMessage() {} +func (*Dhcpv4ServerMetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[497] +func (x *Dhcpv4ServerMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[485] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64419,80 +65932,66 @@ func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) ProtoReflect() protoreflec return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4OptionsCustomTypeOptionClass.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4OptionsCustomTypeOptionClass) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{497} -} - -func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) GetChoice() PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_unspecified -} - -func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil +// Deprecated: Use Dhcpv4ServerMetricsRequest.ProtoReflect.Descriptor instead. +func (*Dhcpv4ServerMetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{485} } -func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) GetIncrement() *PatternFlowIpv4OptionsCustomTypeOptionClassCounter { +func (x *Dhcpv4ServerMetricsRequest) GetServerNames() []string { if x != nil { - return x.Increment + return x.ServerNames } return nil } -func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) GetDecrement() *PatternFlowIpv4OptionsCustomTypeOptionClassCounter { +func (x *Dhcpv4ServerMetricsRequest) GetColumnNames() []Dhcpv4ServerMetricsRequest_ColumnNames_Enum { if x != nil { - return x.Decrement + return x.ColumnNames } return nil } -// integer counter pattern -type PatternFlowIpv4OptionsCustomTypeOptionNumberCounter struct { +// DHCPv4 per peer statistics information. +type Dhcpv4ServerMetric struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` -} - -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) Reset() { - *x = PatternFlowIpv4OptionsCustomTypeOptionNumberCounter{} + // The name of a configured DHCPv4 Server. + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Number of DHCPDISCOVER messages received. + DiscoversReceived *uint64 `protobuf:"varint,2,opt,name=discovers_received,json=discoversReceived,proto3,oneof" json:"discovers_received,omitempty"` + // Number of DHCPOFFER messages sent. + OffersSent *uint64 `protobuf:"varint,3,opt,name=offers_sent,json=offersSent,proto3,oneof" json:"offers_sent,omitempty"` + // Number of DHCPOFFER messages received. + RequestsReceived *uint64 `protobuf:"varint,4,opt,name=requests_received,json=requestsReceived,proto3,oneof" json:"requests_received,omitempty"` + // Number of lease DHCPACK messages sent. + AcksSent *uint64 `protobuf:"varint,5,opt,name=acks_sent,json=acksSent,proto3,oneof" json:"acks_sent,omitempty"` + // Number of negative lease DHCPNACK messages sent. + NacksSent *uint64 `protobuf:"varint,6,opt,name=nacks_sent,json=nacksSent,proto3,oneof" json:"nacks_sent,omitempty"` + // Number of DHCPRELEASE messages received. + ReleasesReceived *uint64 `protobuf:"varint,7,opt,name=releases_received,json=releasesReceived,proto3,oneof" json:"releases_received,omitempty"` + // Number of DHCPDECLINE messages received. + DeclinesReceived *uint64 `protobuf:"varint,8,opt,name=declines_received,json=declinesReceived,proto3,oneof" json:"declines_received,omitempty"` +} + +func (x *Dhcpv4ServerMetric) Reset() { + *x = Dhcpv4ServerMetric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[498] + mi := &file_otg_proto_msgTypes[486] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) String() string { +func (x *Dhcpv4ServerMetric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) ProtoMessage() {} +func (*Dhcpv4ServerMetric) ProtoMessage() {} -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[498] +func (x *Dhcpv4ServerMetric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[486] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64503,154 +66002,105 @@ func (x *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) ProtoReflect() pro return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4OptionsCustomTypeOptionNumberCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{498} +// Deprecated: Use Dhcpv4ServerMetric.ProtoReflect.Descriptor instead. +func (*Dhcpv4ServerMetric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{486} } -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *Dhcpv4ServerMetric) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *Dhcpv4ServerMetric) GetDiscoversReceived() uint64 { + if x != nil && x.DiscoversReceived != nil { + return *x.DiscoversReceived } return 0 } -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Dhcpv4ServerMetric) GetOffersSent() uint64 { + if x != nil && x.OffersSent != nil { + return *x.OffersSent } return 0 } -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Dhcpv4ServerMetric) GetRequestsReceived() uint64 { + if x != nil && x.RequestsReceived != nil { + return *x.RequestsReceived } return 0 } -// Option Number [Ref:https://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml#ip-parameters-1]. -type PatternFlowIpv4OptionsCustomTypeOptionNumber struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` -} - -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) Reset() { - *x = PatternFlowIpv4OptionsCustomTypeOptionNumber{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[499] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatternFlowIpv4OptionsCustomTypeOptionNumber) ProtoMessage() {} - -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[499] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PatternFlowIpv4OptionsCustomTypeOptionNumber.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4OptionsCustomTypeOptionNumber) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{499} -} - -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) GetChoice() PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_unspecified -} - -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *Dhcpv4ServerMetric) GetAcksSent() uint64 { + if x != nil && x.AcksSent != nil { + return *x.AcksSent } return 0 } -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *Dhcpv4ServerMetric) GetNacksSent() uint64 { + if x != nil && x.NacksSent != nil { + return *x.NacksSent } - return nil + return 0 } -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) GetIncrement() *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter { - if x != nil { - return x.Increment +func (x *Dhcpv4ServerMetric) GetReleasesReceived() uint64 { + if x != nil && x.ReleasesReceived != nil { + return *x.ReleasesReceived } - return nil + return 0 } -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) GetDecrement() *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter { - if x != nil { - return x.Decrement +func (x *Dhcpv4ServerMetric) GetDeclinesReceived() uint64 { + if x != nil && x.DeclinesReceived != nil { + return *x.DeclinesReceived } - return nil + return 0 } -// integer counter pattern -type PatternFlowIpv4PriorityRawCounter struct { +// The request to retrieve DHCPv6 per client metrics/statistics. +type Dhcpv6ClientMetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The names of DHCPv6 clients to return results for. An empty list will return results + // for all DHCPv6 client. + // + // x-constraint: + // - /components/schemas/Device.Dhcpv6client/properties/name + // + // x-constraint: + // - /components/schemas/Device.Dhcpv6client/properties/name + ClientNames []string `protobuf:"bytes,1,rep,name=client_names,json=clientNames,proto3" json:"client_names,omitempty"` + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned except for any result_groups. The name of + // the DHCPv6 client cannot be excluded. + ColumnNames []Dhcpv6ClientMetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.Dhcpv6ClientMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` } -func (x *PatternFlowIpv4PriorityRawCounter) Reset() { - *x = PatternFlowIpv4PriorityRawCounter{} +func (x *Dhcpv6ClientMetricsRequest) Reset() { + *x = Dhcpv6ClientMetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[500] + mi := &file_otg_proto_msgTypes[487] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4PriorityRawCounter) String() string { +func (x *Dhcpv6ClientMetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4PriorityRawCounter) ProtoMessage() {} +func (*Dhcpv6ClientMetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4PriorityRawCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[500] +func (x *Dhcpv6ClientMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[487] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64661,70 +66111,78 @@ func (x *PatternFlowIpv4PriorityRawCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4PriorityRawCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4PriorityRawCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{500} -} - -func (x *PatternFlowIpv4PriorityRawCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use Dhcpv6ClientMetricsRequest.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientMetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{487} } -func (x *PatternFlowIpv4PriorityRawCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Dhcpv6ClientMetricsRequest) GetClientNames() []string { + if x != nil { + return x.ClientNames } - return 0 + return nil } -func (x *PatternFlowIpv4PriorityRawCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Dhcpv6ClientMetricsRequest) GetColumnNames() []Dhcpv6ClientMetricsRequest_ColumnNames_Enum { + if x != nil { + return x.ColumnNames } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4PriorityRawMetricTag struct { +// DHCPv6 per peer statistics information. +type Dhcpv6ClientMetric struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true + // The name of a configured DHCPv6 client. Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 8 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` -} - -func (x *PatternFlowIpv4PriorityRawMetricTag) Reset() { - *x = PatternFlowIpv4PriorityRawMetricTag{} + // Number of DHCPSOLICIT messages sent. + SolicitsSent *uint64 `protobuf:"varint,2,opt,name=solicits_sent,json=solicitsSent,proto3,oneof" json:"solicits_sent,omitempty"` + // Number of DHCPADVERTISE messages received. + AdvertisementsReceived *uint64 `protobuf:"varint,3,opt,name=advertisements_received,json=advertisementsReceived,proto3,oneof" json:"advertisements_received,omitempty"` + // Number of DHCPADVERTISE messages ignored. + AdvertisementsIgnored *uint64 `protobuf:"varint,4,opt,name=advertisements_ignored,json=advertisementsIgnored,proto3,oneof" json:"advertisements_ignored,omitempty"` + // Number of DHCPREQUEST messages sent. + RequestsSent *uint64 `protobuf:"varint,5,opt,name=requests_sent,json=requestsSent,proto3,oneof" json:"requests_sent,omitempty"` + // Number of negative lease DHCPNACK messages received. + NacksReceived *uint64 `protobuf:"varint,6,opt,name=nacks_received,json=nacksReceived,proto3,oneof" json:"nacks_received,omitempty"` + // Number of DHCPOFFER messages received. + RepliesReceived *uint64 `protobuf:"varint,7,opt,name=replies_received,json=repliesReceived,proto3,oneof" json:"replies_received,omitempty"` + // Number of DHCP Inform requests sent. + InformationRequestsSent *uint64 `protobuf:"varint,8,opt,name=information_requests_sent,json=informationRequestsSent,proto3,oneof" json:"information_requests_sent,omitempty"` + // Number of DHCP renew messages sent. + RenewsSent *uint64 `protobuf:"varint,9,opt,name=renews_sent,json=renewsSent,proto3,oneof" json:"renews_sent,omitempty"` + // Number of DHCP rebind messages sent. + RebindsSent *uint64 `protobuf:"varint,10,opt,name=rebinds_sent,json=rebindsSent,proto3,oneof" json:"rebinds_sent,omitempty"` + // Number of DHCP Release messages sent. + ReleasesSent *uint64 `protobuf:"varint,11,opt,name=releases_sent,json=releasesSent,proto3,oneof" json:"releases_sent,omitempty"` + // Number of DHCP Reconfigure messages received. + ReconfiguresReceived *uint64 `protobuf:"varint,12,opt,name=reconfigures_received,json=reconfiguresReceived,proto3,oneof" json:"reconfigures_received,omitempty"` + // Number of rapid commit DHCPSOLICIT messages sent. + RapidCommitSolicitsSent *uint64 `protobuf:"varint,13,opt,name=rapid_commit_solicits_sent,json=rapidCommitSolicitsSent,proto3,oneof" json:"rapid_commit_solicits_sent,omitempty"` + // Number of rapid commit DHCP Reply messages received. + RapidCommitRepliesReceived *uint64 `protobuf:"varint,14,opt,name=rapid_commit_replies_received,json=rapidCommitRepliesReceived,proto3,oneof" json:"rapid_commit_replies_received,omitempty"` +} + +func (x *Dhcpv6ClientMetric) Reset() { + *x = Dhcpv6ClientMetric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[501] + mi := &file_otg_proto_msgTypes[488] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4PriorityRawMetricTag) String() string { +func (x *Dhcpv6ClientMetric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4PriorityRawMetricTag) ProtoMessage() {} +func (*Dhcpv6ClientMetric) ProtoMessage() {} -func (x *PatternFlowIpv4PriorityRawMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[501] +func (x *Dhcpv6ClientMetric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[488] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64735,165 +66193,147 @@ func (x *PatternFlowIpv4PriorityRawMetricTag) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4PriorityRawMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4PriorityRawMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{501} +// Deprecated: Use Dhcpv6ClientMetric.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientMetric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{488} } -func (x *PatternFlowIpv4PriorityRawMetricTag) GetName() string { +func (x *Dhcpv6ClientMetric) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIpv4PriorityRawMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *Dhcpv6ClientMetric) GetSolicitsSent() uint64 { + if x != nil && x.SolicitsSent != nil { + return *x.SolicitsSent } return 0 } -func (x *PatternFlowIpv4PriorityRawMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *Dhcpv6ClientMetric) GetAdvertisementsReceived() uint64 { + if x != nil && x.AdvertisementsReceived != nil { + return *x.AdvertisementsReceived } return 0 } -// Raw priority -type PatternFlowIpv4PriorityRaw struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4PriorityRaw_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4PriorityRaw_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4PriorityRawCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4PriorityRawCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4PriorityRawMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` +func (x *Dhcpv6ClientMetric) GetAdvertisementsIgnored() uint64 { + if x != nil && x.AdvertisementsIgnored != nil { + return *x.AdvertisementsIgnored + } + return 0 } -func (x *PatternFlowIpv4PriorityRaw) Reset() { - *x = PatternFlowIpv4PriorityRaw{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[502] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *Dhcpv6ClientMetric) GetRequestsSent() uint64 { + if x != nil && x.RequestsSent != nil { + return *x.RequestsSent } + return 0 } -func (x *PatternFlowIpv4PriorityRaw) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *Dhcpv6ClientMetric) GetNacksReceived() uint64 { + if x != nil && x.NacksReceived != nil { + return *x.NacksReceived + } + return 0 } -func (*PatternFlowIpv4PriorityRaw) ProtoMessage() {} - -func (x *PatternFlowIpv4PriorityRaw) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[502] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *Dhcpv6ClientMetric) GetRepliesReceived() uint64 { + if x != nil && x.RepliesReceived != nil { + return *x.RepliesReceived } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowIpv4PriorityRaw.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4PriorityRaw) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{502} +func (x *Dhcpv6ClientMetric) GetInformationRequestsSent() uint64 { + if x != nil && x.InformationRequestsSent != nil { + return *x.InformationRequestsSent + } + return 0 } -func (x *PatternFlowIpv4PriorityRaw) GetChoice() PatternFlowIpv4PriorityRaw_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *Dhcpv6ClientMetric) GetRenewsSent() uint64 { + if x != nil && x.RenewsSent != nil { + return *x.RenewsSent } - return PatternFlowIpv4PriorityRaw_Choice_unspecified + return 0 } -func (x *PatternFlowIpv4PriorityRaw) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *Dhcpv6ClientMetric) GetRebindsSent() uint64 { + if x != nil && x.RebindsSent != nil { + return *x.RebindsSent } return 0 } -func (x *PatternFlowIpv4PriorityRaw) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *Dhcpv6ClientMetric) GetReleasesSent() uint64 { + if x != nil && x.ReleasesSent != nil { + return *x.ReleasesSent } - return nil + return 0 } -func (x *PatternFlowIpv4PriorityRaw) GetIncrement() *PatternFlowIpv4PriorityRawCounter { - if x != nil { - return x.Increment +func (x *Dhcpv6ClientMetric) GetReconfiguresReceived() uint64 { + if x != nil && x.ReconfiguresReceived != nil { + return *x.ReconfiguresReceived } - return nil + return 0 } -func (x *PatternFlowIpv4PriorityRaw) GetDecrement() *PatternFlowIpv4PriorityRawCounter { - if x != nil { - return x.Decrement +func (x *Dhcpv6ClientMetric) GetRapidCommitSolicitsSent() uint64 { + if x != nil && x.RapidCommitSolicitsSent != nil { + return *x.RapidCommitSolicitsSent } - return nil + return 0 } -func (x *PatternFlowIpv4PriorityRaw) GetMetricTags() []*PatternFlowIpv4PriorityRawMetricTag { - if x != nil { - return x.MetricTags +func (x *Dhcpv6ClientMetric) GetRapidCommitRepliesReceived() uint64 { + if x != nil && x.RapidCommitRepliesReceived != nil { + return *x.RapidCommitRepliesReceived } - return nil + return 0 } -// integer counter pattern -type PatternFlowIpv4DscpPhbCounter struct { +// The request to retrieve DHCPv6 per Server metrics/statistics. +type Dhcpv6ServerMetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The names of DHCPv6 Servers to return results for. An empty list will return results + // for all DHCPv6 Server. + // + // x-constraint: + // - /components/schemas/Device.Dhcpv6Server/properties/name + // + // x-constraint: + // - /components/schemas/Device.Dhcpv6Server/properties/name + ServerNames []string `protobuf:"bytes,1,rep,name=server_names,json=serverNames,proto3" json:"server_names,omitempty"` + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned except for any result_groups. The name of + // the DHCPv6 server cannot be excluded. + ColumnNames []Dhcpv6ServerMetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.Dhcpv6ServerMetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` } -func (x *PatternFlowIpv4DscpPhbCounter) Reset() { - *x = PatternFlowIpv4DscpPhbCounter{} +func (x *Dhcpv6ServerMetricsRequest) Reset() { + *x = Dhcpv6ServerMetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[503] + mi := &file_otg_proto_msgTypes[489] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4DscpPhbCounter) String() string { +func (x *Dhcpv6ServerMetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4DscpPhbCounter) ProtoMessage() {} +func (*Dhcpv6ServerMetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4DscpPhbCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[503] +func (x *Dhcpv6ServerMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[489] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64904,70 +66344,82 @@ func (x *PatternFlowIpv4DscpPhbCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4DscpPhbCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4DscpPhbCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{503} -} - -func (x *PatternFlowIpv4DscpPhbCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use Dhcpv6ServerMetricsRequest.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerMetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{489} } -func (x *PatternFlowIpv4DscpPhbCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Dhcpv6ServerMetricsRequest) GetServerNames() []string { + if x != nil { + return x.ServerNames } - return 0 + return nil } -func (x *PatternFlowIpv4DscpPhbCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Dhcpv6ServerMetricsRequest) GetColumnNames() []Dhcpv6ServerMetricsRequest_ColumnNames_Enum { + if x != nil { + return x.ColumnNames } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4DscpPhbMetricTag struct { +// DHCPv6 per server statistics information. +type Dhcpv6ServerMetric struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true + // The name of a configured DHCPv6 Server. Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 6 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` -} - -func (x *PatternFlowIpv4DscpPhbMetricTag) Reset() { - *x = PatternFlowIpv4DscpPhbMetricTag{} + // Number of DHCPSOLICIT messages received. + SolicitsReceived *uint64 `protobuf:"varint,2,opt,name=solicits_received,json=solicitsReceived,proto3,oneof" json:"solicits_received,omitempty"` + // Number of DHCPSOLICIT messages ignored. + SolicitsIgnored *uint64 `protobuf:"varint,3,opt,name=solicits_ignored,json=solicitsIgnored,proto3,oneof" json:"solicits_ignored,omitempty"` + // Number of DHCP Advertise messages sent. + AdvertisementsSent *uint64 `protobuf:"varint,4,opt,name=advertisements_sent,json=advertisementsSent,proto3,oneof" json:"advertisements_sent,omitempty"` + // Number of DHCPREQUEST messages received. + RequestsReceived *uint64 `protobuf:"varint,5,opt,name=requests_received,json=requestsReceived,proto3,oneof" json:"requests_received,omitempty"` + // Number of naks sent for DHCPREQUEST messages. + NacksSent *uint64 `protobuf:"varint,6,opt,name=nacks_sent,json=nacksSent,proto3,oneof" json:"nacks_sent,omitempty"` + // Number of DHCP Confirm messages received. + ConfirmsReceived *uint64 `protobuf:"varint,7,opt,name=confirms_received,json=confirmsReceived,proto3,oneof" json:"confirms_received,omitempty"` + // Number of DHCP Renewal messages received. + RenewalsReceived *uint64 `protobuf:"varint,8,opt,name=renewals_received,json=renewalsReceived,proto3,oneof" json:"renewals_received,omitempty"` + // Number of DHCP Rebind messages received. + RebindsReceived *uint64 `protobuf:"varint,9,opt,name=rebinds_received,json=rebindsReceived,proto3,oneof" json:"rebinds_received,omitempty"` + // Number of DHCP Reply messages sent. + RepliesSent *uint64 `protobuf:"varint,10,opt,name=replies_sent,json=repliesSent,proto3,oneof" json:"replies_sent,omitempty"` + // Number of DHCP Release messages received. + ReleasesReceived *uint64 `protobuf:"varint,11,opt,name=releases_received,json=releasesReceived,proto3,oneof" json:"releases_received,omitempty"` + // Number of DHCP Decline messages received. + DeclinesReceived *uint64 `protobuf:"varint,12,opt,name=declines_received,json=declinesReceived,proto3,oneof" json:"declines_received,omitempty"` + // Number of DHCP Information Request messages received. + InformationRequestsReceived *uint64 `protobuf:"varint,13,opt,name=information_requests_received,json=informationRequestsReceived,proto3,oneof" json:"information_requests_received,omitempty"` + // Number of DHCP Relay agent forward messages received. + RelayForwardsReceived *uint64 `protobuf:"varint,14,opt,name=relay_forwards_received,json=relayForwardsReceived,proto3,oneof" json:"relay_forwards_received,omitempty"` + // Number of DHCP reply messages sent to Relay agent. + RelayRepliesSent *uint64 `protobuf:"varint,15,opt,name=relay_replies_sent,json=relayRepliesSent,proto3,oneof" json:"relay_replies_sent,omitempty"` + // Number of DHCP Reconfigure messages sent. + ReconfiguresSent *uint64 `protobuf:"varint,16,opt,name=reconfigures_sent,json=reconfiguresSent,proto3,oneof" json:"reconfigures_sent,omitempty"` +} + +func (x *Dhcpv6ServerMetric) Reset() { + *x = Dhcpv6ServerMetric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[504] + mi := &file_otg_proto_msgTypes[490] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4DscpPhbMetricTag) String() string { +func (x *Dhcpv6ServerMetric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4DscpPhbMetricTag) ProtoMessage() {} +func (*Dhcpv6ServerMetric) ProtoMessage() {} -func (x *PatternFlowIpv4DscpPhbMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[504] +func (x *Dhcpv6ServerMetric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[490] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64978,165 +66430,162 @@ func (x *PatternFlowIpv4DscpPhbMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4DscpPhbMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4DscpPhbMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{504} +// Deprecated: Use Dhcpv6ServerMetric.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerMetric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{490} } -func (x *PatternFlowIpv4DscpPhbMetricTag) GetName() string { +func (x *Dhcpv6ServerMetric) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIpv4DscpPhbMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *Dhcpv6ServerMetric) GetSolicitsReceived() uint64 { + if x != nil && x.SolicitsReceived != nil { + return *x.SolicitsReceived } return 0 } -func (x *PatternFlowIpv4DscpPhbMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *Dhcpv6ServerMetric) GetSolicitsIgnored() uint64 { + if x != nil && x.SolicitsIgnored != nil { + return *x.SolicitsIgnored } return 0 } -// Per hop behavior -type PatternFlowIpv4DscpPhb struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *Dhcpv6ServerMetric) GetAdvertisementsSent() uint64 { + if x != nil && x.AdvertisementsSent != nil { + return *x.AdvertisementsSent + } + return 0 +} - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4DscpPhb_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4DscpPhb_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4DscpPhbCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4DscpPhbCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4DscpPhbMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` +func (x *Dhcpv6ServerMetric) GetRequestsReceived() uint64 { + if x != nil && x.RequestsReceived != nil { + return *x.RequestsReceived + } + return 0 } -func (x *PatternFlowIpv4DscpPhb) Reset() { - *x = PatternFlowIpv4DscpPhb{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[505] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *Dhcpv6ServerMetric) GetNacksSent() uint64 { + if x != nil && x.NacksSent != nil { + return *x.NacksSent } + return 0 } -func (x *PatternFlowIpv4DscpPhb) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *Dhcpv6ServerMetric) GetConfirmsReceived() uint64 { + if x != nil && x.ConfirmsReceived != nil { + return *x.ConfirmsReceived + } + return 0 } -func (*PatternFlowIpv4DscpPhb) ProtoMessage() {} +func (x *Dhcpv6ServerMetric) GetRenewalsReceived() uint64 { + if x != nil && x.RenewalsReceived != nil { + return *x.RenewalsReceived + } + return 0 +} -func (x *PatternFlowIpv4DscpPhb) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[505] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *Dhcpv6ServerMetric) GetRebindsReceived() uint64 { + if x != nil && x.RebindsReceived != nil { + return *x.RebindsReceived } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowIpv4DscpPhb.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4DscpPhb) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{505} +func (x *Dhcpv6ServerMetric) GetRepliesSent() uint64 { + if x != nil && x.RepliesSent != nil { + return *x.RepliesSent + } + return 0 } -func (x *PatternFlowIpv4DscpPhb) GetChoice() PatternFlowIpv4DscpPhb_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *Dhcpv6ServerMetric) GetReleasesReceived() uint64 { + if x != nil && x.ReleasesReceived != nil { + return *x.ReleasesReceived } - return PatternFlowIpv4DscpPhb_Choice_unspecified + return 0 } -func (x *PatternFlowIpv4DscpPhb) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *Dhcpv6ServerMetric) GetDeclinesReceived() uint64 { + if x != nil && x.DeclinesReceived != nil { + return *x.DeclinesReceived } return 0 } -func (x *PatternFlowIpv4DscpPhb) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *Dhcpv6ServerMetric) GetInformationRequestsReceived() uint64 { + if x != nil && x.InformationRequestsReceived != nil { + return *x.InformationRequestsReceived } - return nil + return 0 } -func (x *PatternFlowIpv4DscpPhb) GetIncrement() *PatternFlowIpv4DscpPhbCounter { - if x != nil { - return x.Increment +func (x *Dhcpv6ServerMetric) GetRelayForwardsReceived() uint64 { + if x != nil && x.RelayForwardsReceived != nil { + return *x.RelayForwardsReceived } - return nil + return 0 } -func (x *PatternFlowIpv4DscpPhb) GetDecrement() *PatternFlowIpv4DscpPhbCounter { - if x != nil { - return x.Decrement +func (x *Dhcpv6ServerMetric) GetRelayRepliesSent() uint64 { + if x != nil && x.RelayRepliesSent != nil { + return *x.RelayRepliesSent } - return nil + return 0 } -func (x *PatternFlowIpv4DscpPhb) GetMetricTags() []*PatternFlowIpv4DscpPhbMetricTag { - if x != nil { - return x.MetricTags +func (x *Dhcpv6ServerMetric) GetReconfiguresSent() uint64 { + if x != nil && x.ReconfiguresSent != nil { + return *x.ReconfiguresSent } - return nil + return 0 } -// integer counter pattern -type PatternFlowIpv4DscpEcnCounter struct { +// The request to retrieve OSPFv2 per Router metrics/statistics. +type Ospfv2MetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The names of OSPFv2 routers to return results for. An empty list will return results + // for all OSPFv2 router. + // + // x-constraint: + // - /components/schemas/Device.Ospfv2/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ospfv2/properties/name + RouterNames []string `protobuf:"bytes,1,rep,name=router_names,json=routerNames,proto3" json:"router_names,omitempty"` + // The list of column names that the returned result set will contain. + // If the list is empty then all columns will be returned except for + // any result_groups. + // The name of the OSPFv2 Router cannot be excluded. + ColumnNames []Ospfv2MetricsRequest_ColumnNames_Enum `protobuf:"varint,2,rep,packed,name=column_names,json=columnNames,proto3,enum=otg.Ospfv2MetricsRequest_ColumnNames_Enum" json:"column_names,omitempty"` } -func (x *PatternFlowIpv4DscpEcnCounter) Reset() { - *x = PatternFlowIpv4DscpEcnCounter{} +func (x *Ospfv2MetricsRequest) Reset() { + *x = Ospfv2MetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[506] + mi := &file_otg_proto_msgTypes[491] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4DscpEcnCounter) String() string { +func (x *Ospfv2MetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4DscpEcnCounter) ProtoMessage() {} +func (*Ospfv2MetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4DscpEcnCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[506] +func (x *Ospfv2MetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[491] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -65147,70 +66596,119 @@ func (x *PatternFlowIpv4DscpEcnCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4DscpEcnCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4DscpEcnCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{506} -} - -func (x *PatternFlowIpv4DscpEcnCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use Ospfv2MetricsRequest.ProtoReflect.Descriptor instead. +func (*Ospfv2MetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{491} } -func (x *PatternFlowIpv4DscpEcnCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Ospfv2MetricsRequest) GetRouterNames() []string { + if x != nil { + return x.RouterNames } - return 0 + return nil } -func (x *PatternFlowIpv4DscpEcnCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Ospfv2MetricsRequest) GetColumnNames() []Ospfv2MetricsRequest_ColumnNames_Enum { + if x != nil { + return x.ColumnNames } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4DscpEcnMetricTag struct { +// OSPFv2 per router statistics information. +type Ospfv2Metric struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true + // The name of a configured OSPFv2 router. Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 2 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` -} - -func (x *PatternFlowIpv4DscpEcnMetricTag) Reset() { - *x = PatternFlowIpv4DscpEcnMetricTag{} + // The number of OSPFv2 sessions in up state. + FullStateCount *uint64 `protobuf:"varint,2,opt,name=full_state_count,json=fullStateCount,proto3,oneof" json:"full_state_count,omitempty"` + // The number of OSPFv2 sessions in down state. + DownStateCount *uint64 `protobuf:"varint,3,opt,name=down_state_count,json=downStateCount,proto3,oneof" json:"down_state_count,omitempty"` + // The number of change of OSPFv2 sessions from up to down state. + SessionsFlap *uint64 `protobuf:"varint,4,opt,name=sessions_flap,json=sessionsFlap,proto3,oneof" json:"sessions_flap,omitempty"` + // The number of OSPFv2 Hello messages transmitted. + HellosSent *uint64 `protobuf:"varint,5,opt,name=hellos_sent,json=hellosSent,proto3,oneof" json:"hellos_sent,omitempty"` + // The number of OSPFv2 Hello messages received. + HellosReceived *uint64 `protobuf:"varint,6,opt,name=hellos_received,json=hellosReceived,proto3,oneof" json:"hellos_received,omitempty"` + // The number of OSPFv2 Database Description (DBD) messages transmitted. + DbdSent *uint64 `protobuf:"varint,7,opt,name=dbd_sent,json=dbdSent,proto3,oneof" json:"dbd_sent,omitempty"` + // The number of OSPFv2 Database Description (DBD) messages received. + DbdReceived *uint64 `protobuf:"varint,8,opt,name=dbd_received,json=dbdReceived,proto3,oneof" json:"dbd_received,omitempty"` + // The number of OSPFv2 LinkState (LS) Request messages transmitted. + LsRequestSent *uint64 `protobuf:"varint,9,opt,name=ls_request_sent,json=lsRequestSent,proto3,oneof" json:"ls_request_sent,omitempty"` + // The number of OSPFv2 LinkState (LS) Request messages received. + LsRequestReceived *uint64 `protobuf:"varint,10,opt,name=ls_request_received,json=lsRequestReceived,proto3,oneof" json:"ls_request_received,omitempty"` + // The number of OSPFv2 LinkState (LS) Update messages transmitted. + LsUpdateSent *uint64 `protobuf:"varint,11,opt,name=ls_update_sent,json=lsUpdateSent,proto3,oneof" json:"ls_update_sent,omitempty"` + // The number of OSPFv2 LinkState (LS) Update messages received. + LsUpdateReceived *uint64 `protobuf:"varint,12,opt,name=ls_update_received,json=lsUpdateReceived,proto3,oneof" json:"ls_update_received,omitempty"` + // The number of OSPFv2 LinkState (LS) Acknowledgement messages transmitted. + LsAckSent *uint64 `protobuf:"varint,13,opt,name=ls_ack_sent,json=lsAckSent,proto3,oneof" json:"ls_ack_sent,omitempty"` + // The number of OSPFv2 LinkState (LS) Acknowledgement messages received. + LsAckReceived *uint64 `protobuf:"varint,14,opt,name=ls_ack_received,json=lsAckReceived,proto3,oneof" json:"ls_ack_received,omitempty"` + // The total number of OSPFv2 LinkState Advertisement (LSA) messages transmitted. + LsaSent *uint64 `protobuf:"varint,15,opt,name=lsa_sent,json=lsaSent,proto3,oneof" json:"lsa_sent,omitempty"` + // The total number of OSPFv2 LinkState Advertisement (LSA) messages received. + LsaReceived *uint64 `protobuf:"varint,16,opt,name=lsa_received,json=lsaReceived,proto3,oneof" json:"lsa_received,omitempty"` + // The total number of OSPFv2 LinkState Advertisement (LSA) messages acknowledged. + LsaAckSent *uint64 `protobuf:"varint,17,opt,name=lsa_ack_sent,json=lsaAckSent,proto3,oneof" json:"lsa_ack_sent,omitempty"` + // The total number of OSPFv2 LinkState Advertisement (LSA) acknowledge messages received + // . + LsaAckReceived *uint64 `protobuf:"varint,18,opt,name=lsa_ack_received,json=lsaAckReceived,proto3,oneof" json:"lsa_ack_received,omitempty"` + // The number of OSPFv2 Router (Type 1) LSAs transmitted. + RouterLsaSent *uint64 `protobuf:"varint,19,opt,name=router_lsa_sent,json=routerLsaSent,proto3,oneof" json:"router_lsa_sent,omitempty"` + // The number of OSPFv2 Router (Type 1) LSAs received. + RouterLsaReceived *uint64 `protobuf:"varint,20,opt,name=router_lsa_received,json=routerLsaReceived,proto3,oneof" json:"router_lsa_received,omitempty"` + // The number of OSPFv2 Network (Type 2) LSAs transmitted. + NetworkLsaSent *uint64 `protobuf:"varint,21,opt,name=network_lsa_sent,json=networkLsaSent,proto3,oneof" json:"network_lsa_sent,omitempty"` + // The number of OSPFv2 Network (Type 2) LSAs transmitted. + NetworkLsaReceived *uint64 `protobuf:"varint,22,opt,name=network_lsa_received,json=networkLsaReceived,proto3,oneof" json:"network_lsa_received,omitempty"` + // The number of OSPFv2 Summary IP (Type 3) LSAs transmitted. + SummaryLsaSent *uint64 `protobuf:"varint,23,opt,name=summary_lsa_sent,json=summaryLsaSent,proto3,oneof" json:"summary_lsa_sent,omitempty"` + // The number of OSPFv2 Summary IP (Type 3) LSA received. + SummaryLsaReceived *uint64 `protobuf:"varint,24,opt,name=summary_lsa_received,json=summaryLsaReceived,proto3,oneof" json:"summary_lsa_received,omitempty"` + // The number of OSPFv2 External (Type 5) LSAs transmitted. + ExternalLsaSent *uint64 `protobuf:"varint,25,opt,name=external_lsa_sent,json=externalLsaSent,proto3,oneof" json:"external_lsa_sent,omitempty"` + // The number of OSPFv2 External (Type 5) LSAs received. + ExternalLsaReceived *uint64 `protobuf:"varint,26,opt,name=external_lsa_received,json=externalLsaReceived,proto3,oneof" json:"external_lsa_received,omitempty"` + // The number of OSPFv2 NSSA (Type 7) LSAs transmitted. + NssaLsaSent *uint64 `protobuf:"varint,27,opt,name=nssa_lsa_sent,json=nssaLsaSent,proto3,oneof" json:"nssa_lsa_sent,omitempty"` + // The number of OSPFv2 NSSA (Type 7) LSAs received. + NssaLsaReceived *uint64 `protobuf:"varint,28,opt,name=nssa_lsa_received,json=nssaLsaReceived,proto3,oneof" json:"nssa_lsa_received,omitempty"` + // The number of OSPFv2 Opaque Local (Type 9) LSAs transmitted. + OpaqueLocalSent *uint64 `protobuf:"varint,29,opt,name=opaque_local_sent,json=opaqueLocalSent,proto3,oneof" json:"opaque_local_sent,omitempty"` + // The number of OSPFv2 Opaque Local (Type 9) LSAs received. + OpaqueLocalReceived *uint64 `protobuf:"varint,30,opt,name=opaque_local_received,json=opaqueLocalReceived,proto3,oneof" json:"opaque_local_received,omitempty"` + // The number of OSPF Opaque Area (Type 10) LSAs transmitted. + OpaqueAreaSent *uint64 `protobuf:"varint,31,opt,name=opaque_area_sent,json=opaqueAreaSent,proto3,oneof" json:"opaque_area_sent,omitempty"` + // The number of OSPFv2 Opaque Area (Type 10) LSAs received. + OpaqueAreaReceived *uint64 `protobuf:"varint,32,opt,name=opaque_area_received,json=opaqueAreaReceived,proto3,oneof" json:"opaque_area_received,omitempty"` + // The number of OSPFv2 Opaque Domain (Type 11) LSAs transmitted. + OpaqueDomainSent *uint64 `protobuf:"varint,33,opt,name=opaque_domain_sent,json=opaqueDomainSent,proto3,oneof" json:"opaque_domain_sent,omitempty"` + // The number of OSPFv2 Opaque Domain (Type 11) LSAs received. + OpaqueDomainReceived *uint64 `protobuf:"varint,34,opt,name=opaque_domain_received,json=opaqueDomainReceived,proto3,oneof" json:"opaque_domain_received,omitempty"` +} + +func (x *Ospfv2Metric) Reset() { + *x = Ospfv2Metric{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[507] + mi := &file_otg_proto_msgTypes[492] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4DscpEcnMetricTag) String() string { +func (x *Ospfv2Metric) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4DscpEcnMetricTag) ProtoMessage() {} +func (*Ospfv2Metric) ProtoMessage() {} -func (x *PatternFlowIpv4DscpEcnMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[507] +func (x *Ospfv2Metric) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[492] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -65221,317 +66719,299 @@ func (x *PatternFlowIpv4DscpEcnMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4DscpEcnMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4DscpEcnMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{507} +// Deprecated: Use Ospfv2Metric.ProtoReflect.Descriptor instead. +func (*Ospfv2Metric) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{492} } -func (x *PatternFlowIpv4DscpEcnMetricTag) GetName() string { +func (x *Ospfv2Metric) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIpv4DscpEcnMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *Ospfv2Metric) GetFullStateCount() uint64 { + if x != nil && x.FullStateCount != nil { + return *x.FullStateCount } return 0 } -func (x *PatternFlowIpv4DscpEcnMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *Ospfv2Metric) GetDownStateCount() uint64 { + if x != nil && x.DownStateCount != nil { + return *x.DownStateCount } return 0 } -// Explicit congestion notification -type PatternFlowIpv4DscpEcn struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4DscpEcn_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4DscpEcn_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4DscpEcnCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4DscpEcnCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4DscpEcnMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` +func (x *Ospfv2Metric) GetSessionsFlap() uint64 { + if x != nil && x.SessionsFlap != nil { + return *x.SessionsFlap + } + return 0 } -func (x *PatternFlowIpv4DscpEcn) Reset() { - *x = PatternFlowIpv4DscpEcn{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[508] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *Ospfv2Metric) GetHellosSent() uint64 { + if x != nil && x.HellosSent != nil { + return *x.HellosSent } + return 0 } -func (x *PatternFlowIpv4DscpEcn) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *Ospfv2Metric) GetHellosReceived() uint64 { + if x != nil && x.HellosReceived != nil { + return *x.HellosReceived + } + return 0 } -func (*PatternFlowIpv4DscpEcn) ProtoMessage() {} - -func (x *PatternFlowIpv4DscpEcn) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[508] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *Ospfv2Metric) GetDbdSent() uint64 { + if x != nil && x.DbdSent != nil { + return *x.DbdSent } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowIpv4DscpEcn.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4DscpEcn) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{508} +func (x *Ospfv2Metric) GetDbdReceived() uint64 { + if x != nil && x.DbdReceived != nil { + return *x.DbdReceived + } + return 0 } -func (x *PatternFlowIpv4DscpEcn) GetChoice() PatternFlowIpv4DscpEcn_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *Ospfv2Metric) GetLsRequestSent() uint64 { + if x != nil && x.LsRequestSent != nil { + return *x.LsRequestSent } - return PatternFlowIpv4DscpEcn_Choice_unspecified + return 0 } -func (x *PatternFlowIpv4DscpEcn) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *Ospfv2Metric) GetLsRequestReceived() uint64 { + if x != nil && x.LsRequestReceived != nil { + return *x.LsRequestReceived } return 0 } -func (x *PatternFlowIpv4DscpEcn) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *Ospfv2Metric) GetLsUpdateSent() uint64 { + if x != nil && x.LsUpdateSent != nil { + return *x.LsUpdateSent } - return nil + return 0 } -func (x *PatternFlowIpv4DscpEcn) GetIncrement() *PatternFlowIpv4DscpEcnCounter { - if x != nil { - return x.Increment +func (x *Ospfv2Metric) GetLsUpdateReceived() uint64 { + if x != nil && x.LsUpdateReceived != nil { + return *x.LsUpdateReceived } - return nil + return 0 } -func (x *PatternFlowIpv4DscpEcn) GetDecrement() *PatternFlowIpv4DscpEcnCounter { - if x != nil { - return x.Decrement +func (x *Ospfv2Metric) GetLsAckSent() uint64 { + if x != nil && x.LsAckSent != nil { + return *x.LsAckSent } - return nil + return 0 } -func (x *PatternFlowIpv4DscpEcn) GetMetricTags() []*PatternFlowIpv4DscpEcnMetricTag { - if x != nil { - return x.MetricTags +func (x *Ospfv2Metric) GetLsAckReceived() uint64 { + if x != nil && x.LsAckReceived != nil { + return *x.LsAckReceived } - return nil + return 0 } -// integer counter pattern -type PatternFlowIpv4TosPrecedenceCounter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *Ospfv2Metric) GetLsaSent() uint64 { + if x != nil && x.LsaSent != nil { + return *x.LsaSent + } + return 0 +} - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` +func (x *Ospfv2Metric) GetLsaReceived() uint64 { + if x != nil && x.LsaReceived != nil { + return *x.LsaReceived + } + return 0 } -func (x *PatternFlowIpv4TosPrecedenceCounter) Reset() { - *x = PatternFlowIpv4TosPrecedenceCounter{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[509] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *Ospfv2Metric) GetLsaAckSent() uint64 { + if x != nil && x.LsaAckSent != nil { + return *x.LsaAckSent } + return 0 } -func (x *PatternFlowIpv4TosPrecedenceCounter) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *Ospfv2Metric) GetLsaAckReceived() uint64 { + if x != nil && x.LsaAckReceived != nil { + return *x.LsaAckReceived + } + return 0 } -func (*PatternFlowIpv4TosPrecedenceCounter) ProtoMessage() {} +func (x *Ospfv2Metric) GetRouterLsaSent() uint64 { + if x != nil && x.RouterLsaSent != nil { + return *x.RouterLsaSent + } + return 0 +} -func (x *PatternFlowIpv4TosPrecedenceCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[509] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *Ospfv2Metric) GetRouterLsaReceived() uint64 { + if x != nil && x.RouterLsaReceived != nil { + return *x.RouterLsaReceived } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowIpv4TosPrecedenceCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosPrecedenceCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{509} +func (x *Ospfv2Metric) GetNetworkLsaSent() uint64 { + if x != nil && x.NetworkLsaSent != nil { + return *x.NetworkLsaSent + } + return 0 } -func (x *PatternFlowIpv4TosPrecedenceCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *Ospfv2Metric) GetNetworkLsaReceived() uint64 { + if x != nil && x.NetworkLsaReceived != nil { + return *x.NetworkLsaReceived } return 0 } -func (x *PatternFlowIpv4TosPrecedenceCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Ospfv2Metric) GetSummaryLsaSent() uint64 { + if x != nil && x.SummaryLsaSent != nil { + return *x.SummaryLsaSent } return 0 } -func (x *PatternFlowIpv4TosPrecedenceCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Ospfv2Metric) GetSummaryLsaReceived() uint64 { + if x != nil && x.SummaryLsaReceived != nil { + return *x.SummaryLsaReceived } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4TosPrecedenceMetricTag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *Ospfv2Metric) GetExternalLsaSent() uint64 { + if x != nil && x.ExternalLsaSent != nil { + return *x.ExternalLsaSent + } + return 0 +} - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 3 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +func (x *Ospfv2Metric) GetExternalLsaReceived() uint64 { + if x != nil && x.ExternalLsaReceived != nil { + return *x.ExternalLsaReceived + } + return 0 } -func (x *PatternFlowIpv4TosPrecedenceMetricTag) Reset() { - *x = PatternFlowIpv4TosPrecedenceMetricTag{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[510] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *Ospfv2Metric) GetNssaLsaSent() uint64 { + if x != nil && x.NssaLsaSent != nil { + return *x.NssaLsaSent } + return 0 } -func (x *PatternFlowIpv4TosPrecedenceMetricTag) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *Ospfv2Metric) GetNssaLsaReceived() uint64 { + if x != nil && x.NssaLsaReceived != nil { + return *x.NssaLsaReceived + } + return 0 } -func (*PatternFlowIpv4TosPrecedenceMetricTag) ProtoMessage() {} +func (x *Ospfv2Metric) GetOpaqueLocalSent() uint64 { + if x != nil && x.OpaqueLocalSent != nil { + return *x.OpaqueLocalSent + } + return 0 +} -func (x *PatternFlowIpv4TosPrecedenceMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[510] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *Ospfv2Metric) GetOpaqueLocalReceived() uint64 { + if x != nil && x.OpaqueLocalReceived != nil { + return *x.OpaqueLocalReceived } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowIpv4TosPrecedenceMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosPrecedenceMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{510} +func (x *Ospfv2Metric) GetOpaqueAreaSent() uint64 { + if x != nil && x.OpaqueAreaSent != nil { + return *x.OpaqueAreaSent + } + return 0 } -func (x *PatternFlowIpv4TosPrecedenceMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *Ospfv2Metric) GetOpaqueAreaReceived() uint64 { + if x != nil && x.OpaqueAreaReceived != nil { + return *x.OpaqueAreaReceived } - return "" + return 0 } -func (x *PatternFlowIpv4TosPrecedenceMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *Ospfv2Metric) GetOpaqueDomainSent() uint64 { + if x != nil && x.OpaqueDomainSent != nil { + return *x.OpaqueDomainSent } return 0 } -func (x *PatternFlowIpv4TosPrecedenceMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *Ospfv2Metric) GetOpaqueDomainReceived() uint64 { + if x != nil && x.OpaqueDomainReceived != nil { + return *x.OpaqueDomainReceived } return 0 } -// Precedence -type PatternFlowIpv4TosPrecedence struct { +// Request to traffic generator for states of choice +type StatesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4TosPrecedence_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TosPrecedence_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.ipv4_neighbors + Choice *StatesRequest_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StatesRequest_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + Ipv4Neighbors *Neighborsv4StatesRequest `protobuf:"bytes,2,opt,name=ipv4_neighbors,json=ipv4Neighbors,proto3" json:"ipv4_neighbors,omitempty"` // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + Ipv6Neighbors *Neighborsv6StatesRequest `protobuf:"bytes,3,opt,name=ipv6_neighbors,json=ipv6Neighbors,proto3" json:"ipv6_neighbors,omitempty"` // Description missing in models - Increment *PatternFlowIpv4TosPrecedenceCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + BgpPrefixes *BgpPrefixStateRequest `protobuf:"bytes,4,opt,name=bgp_prefixes,json=bgpPrefixes,proto3" json:"bgp_prefixes,omitempty"` // Description missing in models - Decrement *PatternFlowIpv4TosPrecedenceCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4TosPrecedenceMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + IsisLsps *IsisLspsStateRequest `protobuf:"bytes,5,opt,name=isis_lsps,json=isisLsps,proto3" json:"isis_lsps,omitempty"` + // Description missing in models + LldpNeighbors *LldpNeighborsStateRequest `protobuf:"bytes,6,opt,name=lldp_neighbors,json=lldpNeighbors,proto3" json:"lldp_neighbors,omitempty"` + // Description missing in models + RsvpLsps *RsvpLspsStateRequest `protobuf:"bytes,7,opt,name=rsvp_lsps,json=rsvpLsps,proto3" json:"rsvp_lsps,omitempty"` + // Description missing in models + Dhcpv4Interfaces *Dhcpv4InterfaceStateRequest `protobuf:"bytes,8,opt,name=dhcpv4_interfaces,json=dhcpv4Interfaces,proto3" json:"dhcpv4_interfaces,omitempty"` + // Description missing in models + Dhcpv4Leases *Dhcpv4LeaseStateRequest `protobuf:"bytes,9,opt,name=dhcpv4_leases,json=dhcpv4Leases,proto3" json:"dhcpv4_leases,omitempty"` + // Description missing in models + Dhcpv6Interfaces *Dhcpv6InterfaceStateRequest `protobuf:"bytes,10,opt,name=dhcpv6_interfaces,json=dhcpv6Interfaces,proto3" json:"dhcpv6_interfaces,omitempty"` + // Description missing in models + Dhcpv6Leases *Dhcpv6LeaseStateRequest `protobuf:"bytes,11,opt,name=dhcpv6_leases,json=dhcpv6Leases,proto3" json:"dhcpv6_leases,omitempty"` + // Description missing in models + Ospfv2Lsas *Ospfv2LsasStateRequest `protobuf:"bytes,12,opt,name=ospfv2_lsas,json=ospfv2Lsas,proto3" json:"ospfv2_lsas,omitempty"` } -func (x *PatternFlowIpv4TosPrecedence) Reset() { - *x = PatternFlowIpv4TosPrecedence{} +func (x *StatesRequest) Reset() { + *x = StatesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[511] + mi := &file_otg_proto_msgTypes[493] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosPrecedence) String() string { +func (x *StatesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosPrecedence) ProtoMessage() {} +func (*StatesRequest) ProtoMessage() {} -func (x *PatternFlowIpv4TosPrecedence) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[511] +func (x *StatesRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[493] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -65542,161 +67022,145 @@ func (x *PatternFlowIpv4TosPrecedence) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosPrecedence.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosPrecedence) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{511} +// Deprecated: Use StatesRequest.ProtoReflect.Descriptor instead. +func (*StatesRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{493} } -func (x *PatternFlowIpv4TosPrecedence) GetChoice() PatternFlowIpv4TosPrecedence_Choice_Enum { +func (x *StatesRequest) GetChoice() StatesRequest_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIpv4TosPrecedence_Choice_unspecified + return StatesRequest_Choice_unspecified } -func (x *PatternFlowIpv4TosPrecedence) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *StatesRequest) GetIpv4Neighbors() *Neighborsv4StatesRequest { + if x != nil { + return x.Ipv4Neighbors } - return 0 + return nil } -func (x *PatternFlowIpv4TosPrecedence) GetValues() []uint32 { +func (x *StatesRequest) GetIpv6Neighbors() *Neighborsv6StatesRequest { if x != nil { - return x.Values + return x.Ipv6Neighbors } return nil } -func (x *PatternFlowIpv4TosPrecedence) GetIncrement() *PatternFlowIpv4TosPrecedenceCounter { +func (x *StatesRequest) GetBgpPrefixes() *BgpPrefixStateRequest { if x != nil { - return x.Increment + return x.BgpPrefixes } return nil } -func (x *PatternFlowIpv4TosPrecedence) GetDecrement() *PatternFlowIpv4TosPrecedenceCounter { +func (x *StatesRequest) GetIsisLsps() *IsisLspsStateRequest { if x != nil { - return x.Decrement + return x.IsisLsps } return nil } -func (x *PatternFlowIpv4TosPrecedence) GetMetricTags() []*PatternFlowIpv4TosPrecedenceMetricTag { +func (x *StatesRequest) GetLldpNeighbors() *LldpNeighborsStateRequest { if x != nil { - return x.MetricTags + return x.LldpNeighbors } return nil } -// integer counter pattern -type PatternFlowIpv4TosDelayCounter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` -} - -func (x *PatternFlowIpv4TosDelayCounter) Reset() { - *x = PatternFlowIpv4TosDelayCounter{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[512] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *StatesRequest) GetRsvpLsps() *RsvpLspsStateRequest { + if x != nil { + return x.RsvpLsps } + return nil } -func (x *PatternFlowIpv4TosDelayCounter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatternFlowIpv4TosDelayCounter) ProtoMessage() {} - -func (x *PatternFlowIpv4TosDelayCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[512] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *StatesRequest) GetDhcpv4Interfaces() *Dhcpv4InterfaceStateRequest { + if x != nil { + return x.Dhcpv4Interfaces } - return mi.MessageOf(x) + return nil } -// Deprecated: Use PatternFlowIpv4TosDelayCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosDelayCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{512} +func (x *StatesRequest) GetDhcpv4Leases() *Dhcpv4LeaseStateRequest { + if x != nil { + return x.Dhcpv4Leases + } + return nil } -func (x *PatternFlowIpv4TosDelayCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *StatesRequest) GetDhcpv6Interfaces() *Dhcpv6InterfaceStateRequest { + if x != nil { + return x.Dhcpv6Interfaces } - return 0 + return nil } -func (x *PatternFlowIpv4TosDelayCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *StatesRequest) GetDhcpv6Leases() *Dhcpv6LeaseStateRequest { + if x != nil { + return x.Dhcpv6Leases } - return 0 + return nil } -func (x *PatternFlowIpv4TosDelayCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *StatesRequest) GetOspfv2Lsas() *Ospfv2LsasStateRequest { + if x != nil { + return x.Ospfv2Lsas } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4TosDelayMetricTag struct { +// Response containing chosen traffic generator states +type StatesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 1 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // Description missing in models + // default = Choice.Enum.ipv4_neighbors + Choice *StatesResponse_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.StatesResponse_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + Ipv4Neighbors []*Neighborsv4State `protobuf:"bytes,2,rep,name=ipv4_neighbors,json=ipv4Neighbors,proto3" json:"ipv4_neighbors,omitempty"` + // Description missing in models + Ipv6Neighbors []*Neighborsv6State `protobuf:"bytes,3,rep,name=ipv6_neighbors,json=ipv6Neighbors,proto3" json:"ipv6_neighbors,omitempty"` + // Description missing in models + BgpPrefixes []*BgpPrefixesState `protobuf:"bytes,4,rep,name=bgp_prefixes,json=bgpPrefixes,proto3" json:"bgp_prefixes,omitempty"` + // Description missing in models + IsisLsps []*IsisLspsState `protobuf:"bytes,5,rep,name=isis_lsps,json=isisLsps,proto3" json:"isis_lsps,omitempty"` + // Description missing in models + LldpNeighbors []*LldpNeighborsState `protobuf:"bytes,6,rep,name=lldp_neighbors,json=lldpNeighbors,proto3" json:"lldp_neighbors,omitempty"` + // Description missing in models + RsvpLsps []*RsvpLspsState `protobuf:"bytes,7,rep,name=rsvp_lsps,json=rsvpLsps,proto3" json:"rsvp_lsps,omitempty"` + // Description missing in models + Dhcpv4Interfaces []*Dhcpv4InterfaceState `protobuf:"bytes,8,rep,name=dhcpv4_interfaces,json=dhcpv4Interfaces,proto3" json:"dhcpv4_interfaces,omitempty"` + // Description missing in models + Dhcpv4Leases []*Dhcpv4LeasesState `protobuf:"bytes,9,rep,name=dhcpv4_leases,json=dhcpv4Leases,proto3" json:"dhcpv4_leases,omitempty"` + // Description missing in models + Dhcpv6Interfaces []*Dhcpv6InterfaceState `protobuf:"bytes,10,rep,name=dhcpv6_interfaces,json=dhcpv6Interfaces,proto3" json:"dhcpv6_interfaces,omitempty"` + // Description missing in models + Dhcpv6Leases []*Dhcpv6LeasesState `protobuf:"bytes,11,rep,name=dhcpv6_leases,json=dhcpv6Leases,proto3" json:"dhcpv6_leases,omitempty"` + // Description missing in models + Ospfv2Lsas []*Ospfv2LsaState `protobuf:"bytes,12,rep,name=ospfv2_lsas,json=ospfv2Lsas,proto3" json:"ospfv2_lsas,omitempty"` } -func (x *PatternFlowIpv4TosDelayMetricTag) Reset() { - *x = PatternFlowIpv4TosDelayMetricTag{} +func (x *StatesResponse) Reset() { + *x = StatesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[513] + mi := &file_otg_proto_msgTypes[494] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosDelayMetricTag) String() string { +func (x *StatesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosDelayMetricTag) ProtoMessage() {} +func (*StatesResponse) ProtoMessage() {} -func (x *PatternFlowIpv4TosDelayMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[513] +func (x *StatesResponse) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[494] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -65707,165 +67171,130 @@ func (x *PatternFlowIpv4TosDelayMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosDelayMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosDelayMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{513} +// Deprecated: Use StatesResponse.ProtoReflect.Descriptor instead. +func (*StatesResponse) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{494} } -func (x *PatternFlowIpv4TosDelayMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *StatesResponse) GetChoice() StatesResponse_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return StatesResponse_Choice_unspecified } -func (x *PatternFlowIpv4TosDelayMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *StatesResponse) GetIpv4Neighbors() []*Neighborsv4State { + if x != nil { + return x.Ipv4Neighbors } - return 0 + return nil } -func (x *PatternFlowIpv4TosDelayMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *StatesResponse) GetIpv6Neighbors() []*Neighborsv6State { + if x != nil { + return x.Ipv6Neighbors } - return 0 -} - -// Delay -type PatternFlowIpv4TosDelay struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4TosDelay_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TosDelay_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4TosDelayCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4TosDelayCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4TosDelayMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + return nil } -func (x *PatternFlowIpv4TosDelay) Reset() { - *x = PatternFlowIpv4TosDelay{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[514] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *StatesResponse) GetBgpPrefixes() []*BgpPrefixesState { + if x != nil { + return x.BgpPrefixes } + return nil } -func (x *PatternFlowIpv4TosDelay) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatternFlowIpv4TosDelay) ProtoMessage() {} - -func (x *PatternFlowIpv4TosDelay) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[514] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *StatesResponse) GetIsisLsps() []*IsisLspsState { + if x != nil { + return x.IsisLsps } - return mi.MessageOf(x) + return nil } -// Deprecated: Use PatternFlowIpv4TosDelay.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosDelay) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{514} +func (x *StatesResponse) GetLldpNeighbors() []*LldpNeighborsState { + if x != nil { + return x.LldpNeighbors + } + return nil } -func (x *PatternFlowIpv4TosDelay) GetChoice() PatternFlowIpv4TosDelay_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *StatesResponse) GetRsvpLsps() []*RsvpLspsState { + if x != nil { + return x.RsvpLsps } - return PatternFlowIpv4TosDelay_Choice_unspecified + return nil } -func (x *PatternFlowIpv4TosDelay) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *StatesResponse) GetDhcpv4Interfaces() []*Dhcpv4InterfaceState { + if x != nil { + return x.Dhcpv4Interfaces } - return 0 + return nil } -func (x *PatternFlowIpv4TosDelay) GetValues() []uint32 { +func (x *StatesResponse) GetDhcpv4Leases() []*Dhcpv4LeasesState { if x != nil { - return x.Values + return x.Dhcpv4Leases } return nil } -func (x *PatternFlowIpv4TosDelay) GetIncrement() *PatternFlowIpv4TosDelayCounter { +func (x *StatesResponse) GetDhcpv6Interfaces() []*Dhcpv6InterfaceState { if x != nil { - return x.Increment + return x.Dhcpv6Interfaces } return nil } -func (x *PatternFlowIpv4TosDelay) GetDecrement() *PatternFlowIpv4TosDelayCounter { +func (x *StatesResponse) GetDhcpv6Leases() []*Dhcpv6LeasesState { if x != nil { - return x.Decrement + return x.Dhcpv6Leases } return nil } -func (x *PatternFlowIpv4TosDelay) GetMetricTags() []*PatternFlowIpv4TosDelayMetricTag { +func (x *StatesResponse) GetOspfv2Lsas() []*Ospfv2LsaState { if x != nil { - return x.MetricTags + return x.Ospfv2Lsas } return nil } -// integer counter pattern -type PatternFlowIpv4TosThroughputCounter struct { +// The request to retrieve IPv4 Neighbor state (ARP cache entries) of a network interface(s). +type Neighborsv4StatesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The names of Ethernet interfaces for which Neighbor state (ARP cache entries) will + // be retrieved. If no names are specified then the results will contain Neighbor state + // (ARP cache entries) for all available Ethernet interfaces. + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + EthernetNames []string `protobuf:"bytes,1,rep,name=ethernet_names,json=ethernetNames,proto3" json:"ethernet_names,omitempty"` } -func (x *PatternFlowIpv4TosThroughputCounter) Reset() { - *x = PatternFlowIpv4TosThroughputCounter{} +func (x *Neighborsv4StatesRequest) Reset() { + *x = Neighborsv4StatesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[515] + mi := &file_otg_proto_msgTypes[495] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosThroughputCounter) String() string { +func (x *Neighborsv4StatesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosThroughputCounter) ProtoMessage() {} +func (*Neighborsv4StatesRequest) ProtoMessage() {} -func (x *PatternFlowIpv4TosThroughputCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[515] +func (x *Neighborsv4StatesRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[495] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -65876,70 +67305,52 @@ func (x *PatternFlowIpv4TosThroughputCounter) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosThroughputCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosThroughputCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{515} -} - -func (x *PatternFlowIpv4TosThroughputCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 -} - -func (x *PatternFlowIpv4TosThroughputCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step - } - return 0 +// Deprecated: Use Neighborsv4StatesRequest.ProtoReflect.Descriptor instead. +func (*Neighborsv4StatesRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{495} } -func (x *PatternFlowIpv4TosThroughputCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Neighborsv4StatesRequest) GetEthernetNames() []string { + if x != nil { + return x.EthernetNames } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4TosThroughputMetricTag struct { +// IPv4 Neighbor state (ARP cache entry). +type Neighborsv4State struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field + // The name of the Ethernet interface associated with the Neighbor state (ARP cache + // entry). // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 1 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + EthernetName *string `protobuf:"bytes,1,opt,name=ethernet_name,json=ethernetName,proto3,oneof" json:"ethernet_name,omitempty"` + // The IPv4 address of the neighbor. + // required = true + Ipv4Address *string `protobuf:"bytes,2,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` + // The link-layer address (MAC) of the neighbor. + LinkLayerAddress *string `protobuf:"bytes,3,opt,name=link_layer_address,json=linkLayerAddress,proto3,oneof" json:"link_layer_address,omitempty"` } -func (x *PatternFlowIpv4TosThroughputMetricTag) Reset() { - *x = PatternFlowIpv4TosThroughputMetricTag{} +func (x *Neighborsv4State) Reset() { + *x = Neighborsv4State{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[516] + mi := &file_otg_proto_msgTypes[496] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosThroughputMetricTag) String() string { +func (x *Neighborsv4State) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosThroughputMetricTag) ProtoMessage() {} +func (*Neighborsv4State) ProtoMessage() {} -func (x *PatternFlowIpv4TosThroughputMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[516] +func (x *Neighborsv4State) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[496] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -65950,74 +67361,67 @@ func (x *PatternFlowIpv4TosThroughputMetricTag) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosThroughputMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosThroughputMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{516} +// Deprecated: Use Neighborsv4State.ProtoReflect.Descriptor instead. +func (*Neighborsv4State) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{496} } -func (x *PatternFlowIpv4TosThroughputMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *Neighborsv4State) GetEthernetName() string { + if x != nil && x.EthernetName != nil { + return *x.EthernetName } return "" } -func (x *PatternFlowIpv4TosThroughputMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *Neighborsv4State) GetIpv4Address() string { + if x != nil && x.Ipv4Address != nil { + return *x.Ipv4Address } - return 0 + return "" } -func (x *PatternFlowIpv4TosThroughputMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *Neighborsv4State) GetLinkLayerAddress() string { + if x != nil && x.LinkLayerAddress != nil { + return *x.LinkLayerAddress } - return 0 + return "" } -// Throughput -type PatternFlowIpv4TosThroughput struct { +// The request to retrieve IPv6 Neighbor state (NDISC cache entries) of a network interface(s). +type Neighborsv6StatesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4TosThroughput_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TosThroughput_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4TosThroughputCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4TosThroughputCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4TosThroughputMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The names of Ethernet interfaces for which Neighbor state (NDISC cache entries) will + // be retrieved. If no names are specified then the results will contain Neighbor state + // (NDISC cache entries) for all available Ethernet interfaces. + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + EthernetNames []string `protobuf:"bytes,1,rep,name=ethernet_names,json=ethernetNames,proto3" json:"ethernet_names,omitempty"` } -func (x *PatternFlowIpv4TosThroughput) Reset() { - *x = PatternFlowIpv4TosThroughput{} +func (x *Neighborsv6StatesRequest) Reset() { + *x = Neighborsv6StatesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[517] + mi := &file_otg_proto_msgTypes[497] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosThroughput) String() string { +func (x *Neighborsv6StatesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosThroughput) ProtoMessage() {} +func (*Neighborsv6StatesRequest) ProtoMessage() {} -func (x *PatternFlowIpv4TosThroughput) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[517] +func (x *Neighborsv6StatesRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[497] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66028,87 +67432,52 @@ func (x *PatternFlowIpv4TosThroughput) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosThroughput.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosThroughput) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{517} -} - -func (x *PatternFlowIpv4TosThroughput) GetChoice() PatternFlowIpv4TosThroughput_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIpv4TosThroughput_Choice_unspecified -} - -func (x *PatternFlowIpv4TosThroughput) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowIpv4TosThroughput) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowIpv4TosThroughput) GetIncrement() *PatternFlowIpv4TosThroughputCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowIpv4TosThroughput) GetDecrement() *PatternFlowIpv4TosThroughputCounter { - if x != nil { - return x.Decrement - } - return nil +// Deprecated: Use Neighborsv6StatesRequest.ProtoReflect.Descriptor instead. +func (*Neighborsv6StatesRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{497} } -func (x *PatternFlowIpv4TosThroughput) GetMetricTags() []*PatternFlowIpv4TosThroughputMetricTag { +func (x *Neighborsv6StatesRequest) GetEthernetNames() []string { if x != nil { - return x.MetricTags + return x.EthernetNames } return nil } -// integer counter pattern -type PatternFlowIpv4TosReliabilityCounter struct { +// IPv6 Neighbor state (NDISC cache entry). +type Neighborsv6State struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The name of the Ethernet interface associated with the Neighbor state (NDISC cache + // entry). + // required = true + EthernetName *string `protobuf:"bytes,1,opt,name=ethernet_name,json=ethernetName,proto3,oneof" json:"ethernet_name,omitempty"` + // The IPv6 address of the neighbor. + // required = true + Ipv6Address *string `protobuf:"bytes,2,opt,name=ipv6_address,json=ipv6Address,proto3,oneof" json:"ipv6_address,omitempty"` + // The link-layer address (MAC) of the neighbor. + LinkLayerAddress *string `protobuf:"bytes,3,opt,name=link_layer_address,json=linkLayerAddress,proto3,oneof" json:"link_layer_address,omitempty"` } -func (x *PatternFlowIpv4TosReliabilityCounter) Reset() { - *x = PatternFlowIpv4TosReliabilityCounter{} +func (x *Neighborsv6State) Reset() { + *x = Neighborsv6State{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[518] + mi := &file_otg_proto_msgTypes[498] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosReliabilityCounter) String() string { +func (x *Neighborsv6State) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosReliabilityCounter) ProtoMessage() {} +func (*Neighborsv6State) ProtoMessage() {} -func (x *PatternFlowIpv4TosReliabilityCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[518] +func (x *Neighborsv6State) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[498] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66119,70 +67488,80 @@ func (x *PatternFlowIpv4TosReliabilityCounter) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosReliabilityCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosReliabilityCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{518} +// Deprecated: Use Neighborsv6State.ProtoReflect.Descriptor instead. +func (*Neighborsv6State) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{498} } -func (x *PatternFlowIpv4TosReliabilityCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *Neighborsv6State) GetEthernetName() string { + if x != nil && x.EthernetName != nil { + return *x.EthernetName } - return 0 + return "" } -func (x *PatternFlowIpv4TosReliabilityCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Neighborsv6State) GetIpv6Address() string { + if x != nil && x.Ipv6Address != nil { + return *x.Ipv6Address } - return 0 + return "" } -func (x *PatternFlowIpv4TosReliabilityCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Neighborsv6State) GetLinkLayerAddress() string { + if x != nil && x.LinkLayerAddress != nil { + return *x.LinkLayerAddress } - return 0 + return "" } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4TosReliabilityMetricTag struct { +// The request to retrieve BGP peer prefix information. +type BgpPrefixStateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 1 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The names of BGP peers for which prefix information will be retrieved. If no names + // are specified then the results will contain prefix information for all configured + // BGP peers. + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + BgpPeerNames []string `protobuf:"bytes,1,rep,name=bgp_peer_names,json=bgpPeerNames,proto3" json:"bgp_peer_names,omitempty"` + // Specify which prefixes to return. If the list is empty or missing then all prefixes + // will be returned. + PrefixFilters []BgpPrefixStateRequest_PrefixFilters_Enum `protobuf:"varint,2,rep,packed,name=prefix_filters,json=prefixFilters,proto3,enum=otg.BgpPrefixStateRequest_PrefixFilters_Enum" json:"prefix_filters,omitempty"` + // The IPv4 unicast results can be filtered by specifying additional prefix search criteria. + // If the ipv4_unicast_filters property is missing or empty then all IPv4 prefixes will + // be returned. + Ipv4UnicastFilters []*BgpPrefixIpv4UnicastFilter `protobuf:"bytes,3,rep,name=ipv4_unicast_filters,json=ipv4UnicastFilters,proto3" json:"ipv4_unicast_filters,omitempty"` + // The IPv6 unicast results can be filtered by specifying additional prefix search criteria. + // If the ipv6_unicast_filters property is missing or empty then all IPv6 prefixes will + // be returned. + Ipv6UnicastFilters []*BgpPrefixIpv6UnicastFilter `protobuf:"bytes,4,rep,name=ipv6_unicast_filters,json=ipv6UnicastFilters,proto3" json:"ipv6_unicast_filters,omitempty"` } -func (x *PatternFlowIpv4TosReliabilityMetricTag) Reset() { - *x = PatternFlowIpv4TosReliabilityMetricTag{} +func (x *BgpPrefixStateRequest) Reset() { + *x = BgpPrefixStateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[519] + mi := &file_otg_proto_msgTypes[499] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosReliabilityMetricTag) String() string { +func (x *BgpPrefixStateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosReliabilityMetricTag) ProtoMessage() {} +func (*BgpPrefixStateRequest) ProtoMessage() {} -func (x *PatternFlowIpv4TosReliabilityMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[519] +func (x *BgpPrefixStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[499] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66193,74 +67572,74 @@ func (x *PatternFlowIpv4TosReliabilityMetricTag) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosReliabilityMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosReliabilityMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{519} +// Deprecated: Use BgpPrefixStateRequest.ProtoReflect.Descriptor instead. +func (*BgpPrefixStateRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{499} } -func (x *PatternFlowIpv4TosReliabilityMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *BgpPrefixStateRequest) GetBgpPeerNames() []string { + if x != nil { + return x.BgpPeerNames } - return "" + return nil } -func (x *PatternFlowIpv4TosReliabilityMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *BgpPrefixStateRequest) GetPrefixFilters() []BgpPrefixStateRequest_PrefixFilters_Enum { + if x != nil { + return x.PrefixFilters } - return 0 + return nil } -func (x *PatternFlowIpv4TosReliabilityMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *BgpPrefixStateRequest) GetIpv4UnicastFilters() []*BgpPrefixIpv4UnicastFilter { + if x != nil { + return x.Ipv4UnicastFilters } - return 0 + return nil } -// Reliability -type PatternFlowIpv4TosReliability struct { +func (x *BgpPrefixStateRequest) GetIpv6UnicastFilters() []*BgpPrefixIpv6UnicastFilter { + if x != nil { + return x.Ipv6UnicastFilters + } + return nil +} + +// Description missing in models +type BgpPrefixIpv4UnicastFilter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4TosReliability_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TosReliability_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4TosReliabilityCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4TosReliabilityCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4TosReliabilityMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The addresses to match. If the addresses property is missing or empty then all addresses + // will match. + Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` + // The prefix length to match. If the prefix length is missing then all prefix lengths + // will match. + PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` + // The origin to match. If the origin is missing then all origins will match. + Origin *BgpPrefixIpv4UnicastFilter_Origin_Enum `protobuf:"varint,3,opt,name=origin,proto3,enum=otg.BgpPrefixIpv4UnicastFilter_Origin_Enum,oneof" json:"origin,omitempty"` + // The path id to match. If the path id is missing then all path ids will match. + PathId *uint32 `protobuf:"varint,4,opt,name=path_id,json=pathId,proto3,oneof" json:"path_id,omitempty"` } -func (x *PatternFlowIpv4TosReliability) Reset() { - *x = PatternFlowIpv4TosReliability{} +func (x *BgpPrefixIpv4UnicastFilter) Reset() { + *x = BgpPrefixIpv4UnicastFilter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[520] + mi := &file_otg_proto_msgTypes[500] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosReliability) String() string { +func (x *BgpPrefixIpv4UnicastFilter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosReliability) ProtoMessage() {} +func (*BgpPrefixIpv4UnicastFilter) ProtoMessage() {} -func (x *PatternFlowIpv4TosReliability) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[520] +func (x *BgpPrefixIpv4UnicastFilter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[500] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66271,87 +67650,74 @@ func (x *PatternFlowIpv4TosReliability) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosReliability.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosReliability) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{520} -} - -func (x *PatternFlowIpv4TosReliability) GetChoice() PatternFlowIpv4TosReliability_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIpv4TosReliability_Choice_unspecified -} - -func (x *PatternFlowIpv4TosReliability) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 +// Deprecated: Use BgpPrefixIpv4UnicastFilter.ProtoReflect.Descriptor instead. +func (*BgpPrefixIpv4UnicastFilter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{500} } -func (x *PatternFlowIpv4TosReliability) GetValues() []uint32 { +func (x *BgpPrefixIpv4UnicastFilter) GetAddresses() []string { if x != nil { - return x.Values + return x.Addresses } return nil } -func (x *PatternFlowIpv4TosReliability) GetIncrement() *PatternFlowIpv4TosReliabilityCounter { - if x != nil { - return x.Increment +func (x *BgpPrefixIpv4UnicastFilter) GetPrefixLength() uint32 { + if x != nil && x.PrefixLength != nil { + return *x.PrefixLength } - return nil + return 0 } -func (x *PatternFlowIpv4TosReliability) GetDecrement() *PatternFlowIpv4TosReliabilityCounter { - if x != nil { - return x.Decrement +func (x *BgpPrefixIpv4UnicastFilter) GetOrigin() BgpPrefixIpv4UnicastFilter_Origin_Enum { + if x != nil && x.Origin != nil { + return *x.Origin } - return nil + return BgpPrefixIpv4UnicastFilter_Origin_unspecified } -func (x *PatternFlowIpv4TosReliability) GetMetricTags() []*PatternFlowIpv4TosReliabilityMetricTag { - if x != nil { - return x.MetricTags +func (x *BgpPrefixIpv4UnicastFilter) GetPathId() uint32 { + if x != nil && x.PathId != nil { + return *x.PathId } - return nil + return 0 } -// integer counter pattern -type PatternFlowIpv4TosMonetaryCounter struct { +// Description missing in models +type BgpPrefixIpv6UnicastFilter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The addresses to match. If the addresses property is missing or empty then all addresses + // will match. + Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` + // The prefix length to match. If the prefix length is missing then all prefix lengths + // will match. + PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` + // The origin to match. If the origin is missing then all origins will match. + Origin *BgpPrefixIpv6UnicastFilter_Origin_Enum `protobuf:"varint,3,opt,name=origin,proto3,enum=otg.BgpPrefixIpv6UnicastFilter_Origin_Enum,oneof" json:"origin,omitempty"` + // The path id to match. If the path id is missing then all path ids will match. + PathId *uint32 `protobuf:"varint,4,opt,name=path_id,json=pathId,proto3,oneof" json:"path_id,omitempty"` } -func (x *PatternFlowIpv4TosMonetaryCounter) Reset() { - *x = PatternFlowIpv4TosMonetaryCounter{} +func (x *BgpPrefixIpv6UnicastFilter) Reset() { + *x = BgpPrefixIpv6UnicastFilter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[521] + mi := &file_otg_proto_msgTypes[501] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosMonetaryCounter) String() string { +func (x *BgpPrefixIpv6UnicastFilter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosMonetaryCounter) ProtoMessage() {} +func (*BgpPrefixIpv6UnicastFilter) ProtoMessage() {} -func (x *PatternFlowIpv4TosMonetaryCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[521] +func (x *BgpPrefixIpv6UnicastFilter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[501] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66362,70 +67728,70 @@ func (x *PatternFlowIpv4TosMonetaryCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosMonetaryCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosMonetaryCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{521} +// Deprecated: Use BgpPrefixIpv6UnicastFilter.ProtoReflect.Descriptor instead. +func (*BgpPrefixIpv6UnicastFilter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{501} } -func (x *PatternFlowIpv4TosMonetaryCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *BgpPrefixIpv6UnicastFilter) GetAddresses() []string { + if x != nil { + return x.Addresses } - return 0 + return nil } -func (x *PatternFlowIpv4TosMonetaryCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *BgpPrefixIpv6UnicastFilter) GetPrefixLength() uint32 { + if x != nil && x.PrefixLength != nil { + return *x.PrefixLength } return 0 } -func (x *PatternFlowIpv4TosMonetaryCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *BgpPrefixIpv6UnicastFilter) GetOrigin() BgpPrefixIpv6UnicastFilter_Origin_Enum { + if x != nil && x.Origin != nil { + return *x.Origin + } + return BgpPrefixIpv6UnicastFilter_Origin_unspecified +} + +func (x *BgpPrefixIpv6UnicastFilter) GetPathId() uint32 { + if x != nil && x.PathId != nil { + return *x.PathId } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4TosMonetaryMetricTag struct { +// BGP peer prefixes. +type BgpPrefixesState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 1 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The name of a BGP peer. + BgpPeerName *string `protobuf:"bytes,1,opt,name=bgp_peer_name,json=bgpPeerName,proto3,oneof" json:"bgp_peer_name,omitempty"` + // Description missing in models + Ipv4UnicastPrefixes []*BgpPrefixIpv4UnicastState `protobuf:"bytes,2,rep,name=ipv4_unicast_prefixes,json=ipv4UnicastPrefixes,proto3" json:"ipv4_unicast_prefixes,omitempty"` + // Description missing in models + Ipv6UnicastPrefixes []*BgpPrefixIpv6UnicastState `protobuf:"bytes,3,rep,name=ipv6_unicast_prefixes,json=ipv6UnicastPrefixes,proto3" json:"ipv6_unicast_prefixes,omitempty"` } -func (x *PatternFlowIpv4TosMonetaryMetricTag) Reset() { - *x = PatternFlowIpv4TosMonetaryMetricTag{} +func (x *BgpPrefixesState) Reset() { + *x = BgpPrefixesState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[522] + mi := &file_otg_proto_msgTypes[502] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosMonetaryMetricTag) String() string { +func (x *BgpPrefixesState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosMonetaryMetricTag) ProtoMessage() {} +func (*BgpPrefixesState) ProtoMessage() {} -func (x *PatternFlowIpv4TosMonetaryMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[522] +func (x *BgpPrefixesState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[502] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66436,74 +67802,85 @@ func (x *PatternFlowIpv4TosMonetaryMetricTag) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosMonetaryMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosMonetaryMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{522} +// Deprecated: Use BgpPrefixesState.ProtoReflect.Descriptor instead. +func (*BgpPrefixesState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{502} } -func (x *PatternFlowIpv4TosMonetaryMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *BgpPrefixesState) GetBgpPeerName() string { + if x != nil && x.BgpPeerName != nil { + return *x.BgpPeerName } return "" } -func (x *PatternFlowIpv4TosMonetaryMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *BgpPrefixesState) GetIpv4UnicastPrefixes() []*BgpPrefixIpv4UnicastState { + if x != nil { + return x.Ipv4UnicastPrefixes } - return 0 + return nil } -func (x *PatternFlowIpv4TosMonetaryMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *BgpPrefixesState) GetIpv6UnicastPrefixes() []*BgpPrefixIpv6UnicastState { + if x != nil { + return x.Ipv6UnicastPrefixes } - return 0 + return nil } -// Monetary -type PatternFlowIpv4TosMonetary struct { +// IPv4 unicast prefix. +type BgpPrefixIpv4UnicastState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // An IPv4 unicast address + Ipv4Address *string `protobuf:"bytes,1,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` + // The length of the prefix. + PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` + // The origin of the prefix. + Origin *BgpPrefixIpv4UnicastState_Origin_Enum `protobuf:"varint,3,opt,name=origin,proto3,enum=otg.BgpPrefixIpv4UnicastState_Origin_Enum,oneof" json:"origin,omitempty"` + // The path id. + PathId *uint32 `protobuf:"varint,4,opt,name=path_id,json=pathId,proto3,oneof" json:"path_id,omitempty"` + // The IPv4 address of the egress interface. + Ipv4NextHop *string `protobuf:"bytes,5,opt,name=ipv4_next_hop,json=ipv4NextHop,proto3,oneof" json:"ipv4_next_hop,omitempty"` + // The IPv6 address of the egress interface. + Ipv6NextHop *string `protobuf:"bytes,6,opt,name=ipv6_next_hop,json=ipv6NextHop,proto3,oneof" json:"ipv6_next_hop,omitempty"` + // Optional community attributes. + Communities []*ResultBgpCommunity `protobuf:"bytes,7,rep,name=communities,proto3" json:"communities,omitempty"` + // Optional received Extended Community attributes. Each received Extended Community + // attribute is available for retrieval in two forms. Support of the 'raw' format in + // which all 8 bytes (16 hex characters) is always present and available for use. In + // addition, if supported by the implementation, the Extended Community attribute may + // also be retrieved in the 'structured' format which is an optional field. + ExtendedCommunities []*ResultExtendedCommunity `protobuf:"bytes,11,rep,name=extended_communities,json=extendedCommunities,proto3" json:"extended_communities,omitempty"` // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4TosMonetary_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TosMonetary_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv4TosMonetaryCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv4TosMonetaryCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4TosMonetaryMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + AsPath *ResultBgpAsPath `protobuf:"bytes,8,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` + // The local preference is a well-known attribute and the value is used for route selection. + // The route with the highest local preference value is preferred. + LocalPreference *uint32 `protobuf:"varint,9,opt,name=local_preference,json=localPreference,proto3,oneof" json:"local_preference,omitempty"` + // The multi exit discriminator (MED) is an optional non-transitive attribute and the + // value is used for route selection. The route with the lowest MED value is preferred. + MultiExitDiscriminator *uint32 `protobuf:"varint,10,opt,name=multi_exit_discriminator,json=multiExitDiscriminator,proto3,oneof" json:"multi_exit_discriminator,omitempty"` } -func (x *PatternFlowIpv4TosMonetary) Reset() { - *x = PatternFlowIpv4TosMonetary{} +func (x *BgpPrefixIpv4UnicastState) Reset() { + *x = BgpPrefixIpv4UnicastState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[523] + mi := &file_otg_proto_msgTypes[503] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosMonetary) String() string { +func (x *BgpPrefixIpv4UnicastState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosMonetary) ProtoMessage() {} +func (*BgpPrefixIpv4UnicastState) ProtoMessage() {} -func (x *PatternFlowIpv4TosMonetary) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[523] +func (x *BgpPrefixIpv4UnicastState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[503] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66514,87 +67891,141 @@ func (x *PatternFlowIpv4TosMonetary) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosMonetary.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosMonetary) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{523} +// Deprecated: Use BgpPrefixIpv4UnicastState.ProtoReflect.Descriptor instead. +func (*BgpPrefixIpv4UnicastState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{503} } -func (x *PatternFlowIpv4TosMonetary) GetChoice() PatternFlowIpv4TosMonetary_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *BgpPrefixIpv4UnicastState) GetIpv4Address() string { + if x != nil && x.Ipv4Address != nil { + return *x.Ipv4Address } - return PatternFlowIpv4TosMonetary_Choice_unspecified + return "" } -func (x *PatternFlowIpv4TosMonetary) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *BgpPrefixIpv4UnicastState) GetPrefixLength() uint32 { + if x != nil && x.PrefixLength != nil { + return *x.PrefixLength } return 0 } -func (x *PatternFlowIpv4TosMonetary) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *BgpPrefixIpv4UnicastState) GetOrigin() BgpPrefixIpv4UnicastState_Origin_Enum { + if x != nil && x.Origin != nil { + return *x.Origin } - return nil + return BgpPrefixIpv4UnicastState_Origin_unspecified } -func (x *PatternFlowIpv4TosMonetary) GetIncrement() *PatternFlowIpv4TosMonetaryCounter { +func (x *BgpPrefixIpv4UnicastState) GetPathId() uint32 { + if x != nil && x.PathId != nil { + return *x.PathId + } + return 0 +} + +func (x *BgpPrefixIpv4UnicastState) GetIpv4NextHop() string { + if x != nil && x.Ipv4NextHop != nil { + return *x.Ipv4NextHop + } + return "" +} + +func (x *BgpPrefixIpv4UnicastState) GetIpv6NextHop() string { + if x != nil && x.Ipv6NextHop != nil { + return *x.Ipv6NextHop + } + return "" +} + +func (x *BgpPrefixIpv4UnicastState) GetCommunities() []*ResultBgpCommunity { if x != nil { - return x.Increment + return x.Communities } return nil } -func (x *PatternFlowIpv4TosMonetary) GetDecrement() *PatternFlowIpv4TosMonetaryCounter { +func (x *BgpPrefixIpv4UnicastState) GetExtendedCommunities() []*ResultExtendedCommunity { if x != nil { - return x.Decrement + return x.ExtendedCommunities } return nil } -func (x *PatternFlowIpv4TosMonetary) GetMetricTags() []*PatternFlowIpv4TosMonetaryMetricTag { +func (x *BgpPrefixIpv4UnicastState) GetAsPath() *ResultBgpAsPath { if x != nil { - return x.MetricTags + return x.AsPath } return nil } -// integer counter pattern -type PatternFlowIpv4TosUnusedCounter struct { +func (x *BgpPrefixIpv4UnicastState) GetLocalPreference() uint32 { + if x != nil && x.LocalPreference != nil { + return *x.LocalPreference + } + return 0 +} + +func (x *BgpPrefixIpv4UnicastState) GetMultiExitDiscriminator() uint32 { + if x != nil && x.MultiExitDiscriminator != nil { + return *x.MultiExitDiscriminator + } + return 0 +} + +// IPv6 unicast prefix. +type BgpPrefixIpv6UnicastState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // An IPv6 unicast address + Ipv6Address *string `protobuf:"bytes,1,opt,name=ipv6_address,json=ipv6Address,proto3,oneof" json:"ipv6_address,omitempty"` + // The length of the prefix. + PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` + // The origin of the prefix. + Origin *BgpPrefixIpv6UnicastState_Origin_Enum `protobuf:"varint,3,opt,name=origin,proto3,enum=otg.BgpPrefixIpv6UnicastState_Origin_Enum,oneof" json:"origin,omitempty"` + // The path id. + PathId *uint32 `protobuf:"varint,4,opt,name=path_id,json=pathId,proto3,oneof" json:"path_id,omitempty"` + // The IPv4 address of the egress interface. + Ipv4NextHop *string `protobuf:"bytes,5,opt,name=ipv4_next_hop,json=ipv4NextHop,proto3,oneof" json:"ipv4_next_hop,omitempty"` + // The IPv6 address of the egress interface. + Ipv6NextHop *string `protobuf:"bytes,6,opt,name=ipv6_next_hop,json=ipv6NextHop,proto3,oneof" json:"ipv6_next_hop,omitempty"` + // Optional community attributes. + Communities []*ResultBgpCommunity `protobuf:"bytes,7,rep,name=communities,proto3" json:"communities,omitempty"` + // Optional received Extended Community attributes. Each received Extended Community + // attribute is available for retrieval in two forms. Support of the 'raw' format in + // which all 8 bytes (16 hex characters) is always present and available for use. In + // addition, if supported by the implementation, the Extended Community attribute may + // also be retrieved in the 'structured' format which is an optional field. + ExtendedCommunities []*ResultExtendedCommunity `protobuf:"bytes,11,rep,name=extended_communities,json=extendedCommunities,proto3" json:"extended_communities,omitempty"` // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + AsPath *ResultBgpAsPath `protobuf:"bytes,8,opt,name=as_path,json=asPath,proto3" json:"as_path,omitempty"` + // The local preference is a well-known attribute and the value is used for route selection. + // The route with the highest local preference value is preferred. + LocalPreference *uint32 `protobuf:"varint,9,opt,name=local_preference,json=localPreference,proto3,oneof" json:"local_preference,omitempty"` + // The multi exit discriminator (MED) is an optional non-transitive attribute and the + // value is used for route selection. The route with the lowest MED value is preferred. + MultiExitDiscriminator *uint32 `protobuf:"varint,10,opt,name=multi_exit_discriminator,json=multiExitDiscriminator,proto3,oneof" json:"multi_exit_discriminator,omitempty"` } -func (x *PatternFlowIpv4TosUnusedCounter) Reset() { - *x = PatternFlowIpv4TosUnusedCounter{} +func (x *BgpPrefixIpv6UnicastState) Reset() { + *x = BgpPrefixIpv6UnicastState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[524] + mi := &file_otg_proto_msgTypes[504] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosUnusedCounter) String() string { +func (x *BgpPrefixIpv6UnicastState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosUnusedCounter) ProtoMessage() {} +func (*BgpPrefixIpv6UnicastState) ProtoMessage() {} -func (x *PatternFlowIpv4TosUnusedCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[524] +func (x *BgpPrefixIpv6UnicastState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[504] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66605,70 +68036,122 @@ func (x *PatternFlowIpv4TosUnusedCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosUnusedCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosUnusedCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{524} +// Deprecated: Use BgpPrefixIpv6UnicastState.ProtoReflect.Descriptor instead. +func (*BgpPrefixIpv6UnicastState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{504} } -func (x *PatternFlowIpv4TosUnusedCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *BgpPrefixIpv6UnicastState) GetIpv6Address() string { + if x != nil && x.Ipv6Address != nil { + return *x.Ipv6Address + } + return "" +} + +func (x *BgpPrefixIpv6UnicastState) GetPrefixLength() uint32 { + if x != nil && x.PrefixLength != nil { + return *x.PrefixLength } return 0 } -func (x *PatternFlowIpv4TosUnusedCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *BgpPrefixIpv6UnicastState) GetOrigin() BgpPrefixIpv6UnicastState_Origin_Enum { + if x != nil && x.Origin != nil { + return *x.Origin + } + return BgpPrefixIpv6UnicastState_Origin_unspecified +} + +func (x *BgpPrefixIpv6UnicastState) GetPathId() uint32 { + if x != nil && x.PathId != nil { + return *x.PathId } return 0 } -func (x *PatternFlowIpv4TosUnusedCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *BgpPrefixIpv6UnicastState) GetIpv4NextHop() string { + if x != nil && x.Ipv4NextHop != nil { + return *x.Ipv4NextHop + } + return "" +} + +func (x *BgpPrefixIpv6UnicastState) GetIpv6NextHop() string { + if x != nil && x.Ipv6NextHop != nil { + return *x.Ipv6NextHop + } + return "" +} + +func (x *BgpPrefixIpv6UnicastState) GetCommunities() []*ResultBgpCommunity { + if x != nil { + return x.Communities + } + return nil +} + +func (x *BgpPrefixIpv6UnicastState) GetExtendedCommunities() []*ResultExtendedCommunity { + if x != nil { + return x.ExtendedCommunities + } + return nil +} + +func (x *BgpPrefixIpv6UnicastState) GetAsPath() *ResultBgpAsPath { + if x != nil { + return x.AsPath + } + return nil +} + +func (x *BgpPrefixIpv6UnicastState) GetLocalPreference() uint32 { + if x != nil && x.LocalPreference != nil { + return *x.LocalPreference } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv4TosUnusedMetricTag struct { +func (x *BgpPrefixIpv6UnicastState) GetMultiExitDiscriminator() uint32 { + if x != nil && x.MultiExitDiscriminator != nil { + return *x.MultiExitDiscriminator + } + return 0 +} + +// Each received Extended Community attribute is available for retrieval in two forms. +// Support of the 'raw' format in which all 8 bytes (16 hex characters) is always present +// and available for use. In addition, if supported by the implementation, the Extended +// Community attribute may also be retrieved in the 'structured' format which is an +// optional field. +type ResultExtendedCommunity struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 1 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The raw byte contents of the 8 bytes received in the Extended Community as 16 hex + // characters. + Raw *string `protobuf:"bytes,1,opt,name=raw,proto3,oneof" json:"raw,omitempty"` + // Description missing in models + Structured *ResultExtendedCommunityStructured `protobuf:"bytes,2,opt,name=structured,proto3" json:"structured,omitempty"` } -func (x *PatternFlowIpv4TosUnusedMetricTag) Reset() { - *x = PatternFlowIpv4TosUnusedMetricTag{} +func (x *ResultExtendedCommunity) Reset() { + *x = ResultExtendedCommunity{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[525] + mi := &file_otg_proto_msgTypes[505] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosUnusedMetricTag) String() string { +func (x *ResultExtendedCommunity) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosUnusedMetricTag) ProtoMessage() {} +func (*ResultExtendedCommunity) ProtoMessage() {} -func (x *PatternFlowIpv4TosUnusedMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[525] +func (x *ResultExtendedCommunity) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[505] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66679,74 +68162,70 @@ func (x *PatternFlowIpv4TosUnusedMetricTag) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosUnusedMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosUnusedMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{525} +// Deprecated: Use ResultExtendedCommunity.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunity) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{505} } -func (x *PatternFlowIpv4TosUnusedMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *ResultExtendedCommunity) GetRaw() string { + if x != nil && x.Raw != nil { + return *x.Raw } return "" } -func (x *PatternFlowIpv4TosUnusedMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset - } - return 0 -} - -func (x *PatternFlowIpv4TosUnusedMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *ResultExtendedCommunity) GetStructured() *ResultExtendedCommunityStructured { + if x != nil { + return x.Structured } - return 0 + return nil } -// Unused -type PatternFlowIpv4TosUnused struct { +// The Extended Communities Attribute is a optional BGP attribute,defined in RFC4360 +// with the Type Code 16. +// Community and Extended Communities attributes are utilized to trigger routing decisions, +// such as acceptance, rejection, preference, or redistribution. +// An extended community is an 8-bytes value. It is divided into two main parts. The +// first 2 bytes of the community encode a type and optonal sub-type field. +// The last 6 bytes (or 7 bytes for types without a sub-type) carry a unique set of +// data in a format defined by the type and optional sub-type field. +// Extended communities provide a larger range for grouping or categorizing communities. +type ResultExtendedCommunityStructured struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv4TosUnused_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TosUnused_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *ResultExtendedCommunityStructured_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ResultExtendedCommunityStructured_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + Transitive_2OctetAsType *ResultExtendedCommunityTransitive2OctetAsType `protobuf:"bytes,2,opt,name=transitive_2octet_as_type,json=transitive2octetAsType,proto3" json:"transitive_2octet_as_type,omitempty"` // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + TransitiveIpv4AddressType *ResultExtendedCommunityTransitiveIpv4AddressType `protobuf:"bytes,3,opt,name=transitive_ipv4_address_type,json=transitiveIpv4AddressType,proto3" json:"transitive_ipv4_address_type,omitempty"` // Description missing in models - Increment *PatternFlowIpv4TosUnusedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Transitive_4OctetAsType *ResultExtendedCommunityTransitive4OctetAsType `protobuf:"bytes,4,opt,name=transitive_4octet_as_type,json=transitive4octetAsType,proto3" json:"transitive_4octet_as_type,omitempty"` // Description missing in models - Decrement *PatternFlowIpv4TosUnusedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv4TosUnusedMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + TransitiveOpaqueType *ResultExtendedCommunityTransitiveOpaqueType `protobuf:"bytes,5,opt,name=transitive_opaque_type,json=transitiveOpaqueType,proto3" json:"transitive_opaque_type,omitempty"` + // Description missing in models + NonTransitive_2OctetAsType *ResultExtendedCommunityNonTransitive2OctetAsType `protobuf:"bytes,6,opt,name=non_transitive_2octet_as_type,json=nonTransitive2octetAsType,proto3" json:"non_transitive_2octet_as_type,omitempty"` } -func (x *PatternFlowIpv4TosUnused) Reset() { - *x = PatternFlowIpv4TosUnused{} +func (x *ResultExtendedCommunityStructured) Reset() { + *x = ResultExtendedCommunityStructured{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[526] + mi := &file_otg_proto_msgTypes[506] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosUnused) String() string { +func (x *ResultExtendedCommunityStructured) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosUnused) ProtoMessage() {} +func (*ResultExtendedCommunityStructured) ProtoMessage() {} -func (x *PatternFlowIpv4TosUnused) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[526] +func (x *ResultExtendedCommunityStructured) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[506] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66757,87 +68236,86 @@ func (x *PatternFlowIpv4TosUnused) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosUnused.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosUnused) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{526} +// Deprecated: Use ResultExtendedCommunityStructured.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityStructured) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{506} } -func (x *PatternFlowIpv4TosUnused) GetChoice() PatternFlowIpv4TosUnused_Choice_Enum { +func (x *ResultExtendedCommunityStructured) GetChoice() ResultExtendedCommunityStructured_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIpv4TosUnused_Choice_unspecified + return ResultExtendedCommunityStructured_Choice_unspecified } -func (x *PatternFlowIpv4TosUnused) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *ResultExtendedCommunityStructured) GetTransitive_2OctetAsType() *ResultExtendedCommunityTransitive2OctetAsType { + if x != nil { + return x.Transitive_2OctetAsType } - return 0 + return nil } -func (x *PatternFlowIpv4TosUnused) GetValues() []uint32 { +func (x *ResultExtendedCommunityStructured) GetTransitiveIpv4AddressType() *ResultExtendedCommunityTransitiveIpv4AddressType { if x != nil { - return x.Values + return x.TransitiveIpv4AddressType } return nil } -func (x *PatternFlowIpv4TosUnused) GetIncrement() *PatternFlowIpv4TosUnusedCounter { +func (x *ResultExtendedCommunityStructured) GetTransitive_4OctetAsType() *ResultExtendedCommunityTransitive4OctetAsType { if x != nil { - return x.Increment + return x.Transitive_4OctetAsType } return nil } -func (x *PatternFlowIpv4TosUnused) GetDecrement() *PatternFlowIpv4TosUnusedCounter { +func (x *ResultExtendedCommunityStructured) GetTransitiveOpaqueType() *ResultExtendedCommunityTransitiveOpaqueType { if x != nil { - return x.Decrement + return x.TransitiveOpaqueType } return nil } -func (x *PatternFlowIpv4TosUnused) GetMetricTags() []*PatternFlowIpv4TosUnusedMetricTag { +func (x *ResultExtendedCommunityStructured) GetNonTransitive_2OctetAsType() *ResultExtendedCommunityNonTransitive2OctetAsType { if x != nil { - return x.MetricTags + return x.NonTransitive_2OctetAsType } return nil } -// integer counter pattern -type PatternFlowIpv6VersionCounter struct { +// The Route Target Community identifies one or more routers that may receive a set +// of routes (that carry this Community) carried by BGP Update message. It is sent +// with sub-type as 0x02. +type ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 6 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The two octet IANA assigned AS value assigned to the Autonomous System. + Global_2ByteAs *uint32 `protobuf:"varint,1,opt,name=global_2byte_as,json=global2byteAs,proto3,oneof" json:"global_2byte_as,omitempty"` + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + Local_4ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_4byte_admin,json=local4byteAdmin,proto3,oneof" json:"local_4byte_admin,omitempty"` } -func (x *PatternFlowIpv6VersionCounter) Reset() { - *x = PatternFlowIpv6VersionCounter{} +func (x *ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget) Reset() { + *x = ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[527] + mi := &file_otg_proto_msgTypes[507] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6VersionCounter) String() string { +func (x *ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6VersionCounter) ProtoMessage() {} +func (*ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget) ProtoMessage() {} -func (x *PatternFlowIpv6VersionCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[527] +func (x *ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[507] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66848,70 +68326,57 @@ func (x *PatternFlowIpv6VersionCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6VersionCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6VersionCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{527} -} - -func (x *PatternFlowIpv6VersionCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{507} } -func (x *PatternFlowIpv6VersionCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget) GetGlobal_2ByteAs() uint32 { + if x != nil && x.Global_2ByteAs != nil { + return *x.Global_2ByteAs } return 0 } -func (x *PatternFlowIpv6VersionCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget) GetLocal_4ByteAdmin() uint32 { + if x != nil && x.Local_4ByteAdmin != nil { + return *x.Local_4ByteAdmin } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv6VersionMetricTag struct { +// The Route Origin Community identifies one or more routers that inject a set of routes +// (that carry this Community) into BGP. It is sent with sub-type as 0x03 . +type ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 4 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The two octet IANA assigned AS value assigned to the Autonomous System. + Global_2ByteAs *uint32 `protobuf:"varint,1,opt,name=global_2byte_as,json=global2byteAs,proto3,oneof" json:"global_2byte_as,omitempty"` + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + Local_4ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_4byte_admin,json=local4byteAdmin,proto3,oneof" json:"local_4byte_admin,omitempty"` } -func (x *PatternFlowIpv6VersionMetricTag) Reset() { - *x = PatternFlowIpv6VersionMetricTag{} +func (x *ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Reset() { + *x = ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[528] + mi := &file_otg_proto_msgTypes[508] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6VersionMetricTag) String() string { +func (x *ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6VersionMetricTag) ProtoMessage() {} +func (*ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ProtoMessage() {} -func (x *PatternFlowIpv6VersionMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[528] +func (x *ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[508] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66922,74 +68387,56 @@ func (x *PatternFlowIpv6VersionMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6VersionMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6VersionMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{528} -} - -func (x *PatternFlowIpv6VersionMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" +// Deprecated: Use ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{508} } -func (x *PatternFlowIpv6VersionMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) GetGlobal_2ByteAs() uint32 { + if x != nil && x.Global_2ByteAs != nil { + return *x.Global_2ByteAs } return 0 } -func (x *PatternFlowIpv6VersionMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) GetLocal_4ByteAdmin() uint32 { + if x != nil && x.Local_4ByteAdmin != nil { + return *x.Local_4ByteAdmin } return 0 } -// Version number -type PatternFlowIpv6Version struct { +// The Transitive Two-Octet AS-Specific Extended Community is sent as type 0x00 . +type ResultExtendedCommunityTransitive2OctetAsType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv6Version_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6Version_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 6 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [6] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + Choice *ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Increment *PatternFlowIpv6VersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + RouteTargetSubtype *ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget `protobuf:"bytes,2,opt,name=route_target_subtype,json=routeTargetSubtype,proto3" json:"route_target_subtype,omitempty"` // Description missing in models - Decrement *PatternFlowIpv6VersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv6VersionMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + RouteOriginSubtype *ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin `protobuf:"bytes,3,opt,name=route_origin_subtype,json=routeOriginSubtype,proto3" json:"route_origin_subtype,omitempty"` } -func (x *PatternFlowIpv6Version) Reset() { - *x = PatternFlowIpv6Version{} +func (x *ResultExtendedCommunityTransitive2OctetAsType) Reset() { + *x = ResultExtendedCommunityTransitive2OctetAsType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[529] + mi := &file_otg_proto_msgTypes[509] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6Version) String() string { +func (x *ResultExtendedCommunityTransitive2OctetAsType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6Version) ProtoMessage() {} +func (*ResultExtendedCommunityTransitive2OctetAsType) ProtoMessage() {} -func (x *PatternFlowIpv6Version) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[529] +func (x *ResultExtendedCommunityTransitive2OctetAsType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[509] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67000,87 +68447,64 @@ func (x *PatternFlowIpv6Version) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6Version.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6Version) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{529} +// Deprecated: Use ResultExtendedCommunityTransitive2OctetAsType.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitive2OctetAsType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{509} } -func (x *PatternFlowIpv6Version) GetChoice() PatternFlowIpv6Version_Choice_Enum { +func (x *ResultExtendedCommunityTransitive2OctetAsType) GetChoice() ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIpv6Version_Choice_unspecified -} - -func (x *PatternFlowIpv6Version) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowIpv6Version) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowIpv6Version) GetIncrement() *PatternFlowIpv6VersionCounter { - if x != nil { - return x.Increment - } - return nil + return ResultExtendedCommunityTransitive2OctetAsType_Choice_unspecified } -func (x *PatternFlowIpv6Version) GetDecrement() *PatternFlowIpv6VersionCounter { +func (x *ResultExtendedCommunityTransitive2OctetAsType) GetRouteTargetSubtype() *ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget { if x != nil { - return x.Decrement + return x.RouteTargetSubtype } return nil } -func (x *PatternFlowIpv6Version) GetMetricTags() []*PatternFlowIpv6VersionMetricTag { +func (x *ResultExtendedCommunityTransitive2OctetAsType) GetRouteOriginSubtype() *ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin { if x != nil { - return x.MetricTags + return x.RouteOriginSubtype } return nil } -// integer counter pattern -type PatternFlowIpv6TrafficClassCounter struct { +// The Route Origin Community identifies one or more routers that inject a set of routes +// (that carry this Community) into BGP It is sent with sub-type as 0x03. +type ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // An IPv4 unicast address assigned by one of the Internet registries. + GlobalIpv4Admin *string `protobuf:"bytes,1,opt,name=global_ipv4_admin,json=globalIpv4Admin,proto3,oneof" json:"global_ipv4_admin,omitempty"` + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the IP address carried in the Global Administrator + // sub-field has been assigned by an appropriate authority. + Local_2ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_2byte_admin,json=local2byteAdmin,proto3,oneof" json:"local_2byte_admin,omitempty"` } -func (x *PatternFlowIpv6TrafficClassCounter) Reset() { - *x = PatternFlowIpv6TrafficClassCounter{} +func (x *ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Reset() { + *x = ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[530] + mi := &file_otg_proto_msgTypes[510] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6TrafficClassCounter) String() string { +func (x *ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6TrafficClassCounter) ProtoMessage() {} +func (*ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ProtoMessage() {} -func (x *PatternFlowIpv6TrafficClassCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[530] +func (x *ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[510] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67091,70 +68515,58 @@ func (x *PatternFlowIpv6TrafficClassCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6TrafficClassCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6TrafficClassCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{530} -} - -func (x *PatternFlowIpv6TrafficClassCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{510} } -func (x *PatternFlowIpv6TrafficClassCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) GetGlobalIpv4Admin() string { + if x != nil && x.GlobalIpv4Admin != nil { + return *x.GlobalIpv4Admin } - return 0 + return "" } -func (x *PatternFlowIpv6TrafficClassCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) GetLocal_2ByteAdmin() uint32 { + if x != nil && x.Local_2ByteAdmin != nil { + return *x.Local_2ByteAdmin } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv6TrafficClassMetricTag struct { +// The Route Target Community identifies one or more routers that may receive a set +// of routes (that carry this Community) carried by BGP. It is sent with sub-type as +// 0x02. +type ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 8 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // An IPv4 unicast address assigned by one of the Internet registries. + GlobalIpv4Admin *string `protobuf:"bytes,1,opt,name=global_ipv4_admin,json=globalIpv4Admin,proto3,oneof" json:"global_ipv4_admin,omitempty"` + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the IP address carried in the Global Administrator + // sub-field has been assigned by an appropriate authority. + Local_2ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_2byte_admin,json=local2byteAdmin,proto3,oneof" json:"local_2byte_admin,omitempty"` } -func (x *PatternFlowIpv6TrafficClassMetricTag) Reset() { - *x = PatternFlowIpv6TrafficClassMetricTag{} +func (x *ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Reset() { + *x = ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[531] + mi := &file_otg_proto_msgTypes[511] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6TrafficClassMetricTag) String() string { +func (x *ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6TrafficClassMetricTag) ProtoMessage() {} +func (*ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ProtoMessage() {} -func (x *PatternFlowIpv6TrafficClassMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[531] +func (x *ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[511] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67165,74 +68577,56 @@ func (x *PatternFlowIpv6TrafficClassMetricTag) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6TrafficClassMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6TrafficClassMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{531} +// Deprecated: Use ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{511} } -func (x *PatternFlowIpv6TrafficClassMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) GetGlobalIpv4Admin() string { + if x != nil && x.GlobalIpv4Admin != nil { + return *x.GlobalIpv4Admin } return "" } -func (x *PatternFlowIpv6TrafficClassMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset - } - return 0 -} - -func (x *PatternFlowIpv6TrafficClassMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) GetLocal_2ByteAdmin() uint32 { + if x != nil && x.Local_2ByteAdmin != nil { + return *x.Local_2ByteAdmin } return 0 } -// Traffic class -type PatternFlowIpv6TrafficClass struct { +// The Transitive IPv4 Address Specific Extended Community is sent as type 0x01. +type ResultExtendedCommunityTransitiveIpv4AddressType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv6TrafficClass_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6TrafficClass_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + Choice *ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Increment *PatternFlowIpv6TrafficClassCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + RouteTargetSubtype *ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget `protobuf:"bytes,2,opt,name=route_target_subtype,json=routeTargetSubtype,proto3" json:"route_target_subtype,omitempty"` // Description missing in models - Decrement *PatternFlowIpv6TrafficClassCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv6TrafficClassMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + RouteOriginSubtype *ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin `protobuf:"bytes,3,opt,name=route_origin_subtype,json=routeOriginSubtype,proto3" json:"route_origin_subtype,omitempty"` } -func (x *PatternFlowIpv6TrafficClass) Reset() { - *x = PatternFlowIpv6TrafficClass{} +func (x *ResultExtendedCommunityTransitiveIpv4AddressType) Reset() { + *x = ResultExtendedCommunityTransitiveIpv4AddressType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[532] + mi := &file_otg_proto_msgTypes[512] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6TrafficClass) String() string { +func (x *ResultExtendedCommunityTransitiveIpv4AddressType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6TrafficClass) ProtoMessage() {} +func (*ResultExtendedCommunityTransitiveIpv4AddressType) ProtoMessage() {} -func (x *PatternFlowIpv6TrafficClass) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[532] +func (x *ResultExtendedCommunityTransitiveIpv4AddressType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[512] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67243,87 +68637,65 @@ func (x *PatternFlowIpv6TrafficClass) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6TrafficClass.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6TrafficClass) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{532} +// Deprecated: Use ResultExtendedCommunityTransitiveIpv4AddressType.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitiveIpv4AddressType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{512} } -func (x *PatternFlowIpv6TrafficClass) GetChoice() PatternFlowIpv6TrafficClass_Choice_Enum { +func (x *ResultExtendedCommunityTransitiveIpv4AddressType) GetChoice() ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIpv6TrafficClass_Choice_unspecified -} - -func (x *PatternFlowIpv6TrafficClass) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowIpv6TrafficClass) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowIpv6TrafficClass) GetIncrement() *PatternFlowIpv6TrafficClassCounter { - if x != nil { - return x.Increment - } - return nil + return ResultExtendedCommunityTransitiveIpv4AddressType_Choice_unspecified } -func (x *PatternFlowIpv6TrafficClass) GetDecrement() *PatternFlowIpv6TrafficClassCounter { +func (x *ResultExtendedCommunityTransitiveIpv4AddressType) GetRouteTargetSubtype() *ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { if x != nil { - return x.Decrement + return x.RouteTargetSubtype } return nil } -func (x *PatternFlowIpv6TrafficClass) GetMetricTags() []*PatternFlowIpv6TrafficClassMetricTag { +func (x *ResultExtendedCommunityTransitiveIpv4AddressType) GetRouteOriginSubtype() *ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { if x != nil { - return x.MetricTags + return x.RouteOriginSubtype } return nil } -// integer counter pattern -type PatternFlowIpv6FlowLabelCounter struct { +// The Route Target Community identifies one or more routers that may receive a set +// of routes (that carry this Community) carried by BGP. It is sent with sub-type as +// 0x02 +type ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The four octet IANA assigned AS value assigned to the Autonomous System. + Global_4ByteAs *uint32 `protobuf:"varint,1,opt,name=global_4byte_as,json=global4byteAs,proto3,oneof" json:"global_4byte_as,omitempty"` + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + Local_2ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_2byte_admin,json=local2byteAdmin,proto3,oneof" json:"local_2byte_admin,omitempty"` } -func (x *PatternFlowIpv6FlowLabelCounter) Reset() { - *x = PatternFlowIpv6FlowLabelCounter{} +func (x *ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget) Reset() { + *x = ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[533] + mi := &file_otg_proto_msgTypes[513] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6FlowLabelCounter) String() string { +func (x *ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6FlowLabelCounter) ProtoMessage() {} +func (*ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget) ProtoMessage() {} -func (x *PatternFlowIpv6FlowLabelCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[533] +func (x *ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[513] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67334,70 +68706,57 @@ func (x *PatternFlowIpv6FlowLabelCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6FlowLabelCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6FlowLabelCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{533} -} - -func (x *PatternFlowIpv6FlowLabelCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{513} } -func (x *PatternFlowIpv6FlowLabelCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget) GetGlobal_4ByteAs() uint32 { + if x != nil && x.Global_4ByteAs != nil { + return *x.Global_4ByteAs } return 0 } -func (x *PatternFlowIpv6FlowLabelCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget) GetLocal_2ByteAdmin() uint32 { + if x != nil && x.Local_2ByteAdmin != nil { + return *x.Local_2ByteAdmin } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv6FlowLabelMetricTag struct { +// The Route Origin Community identifies one or more routers that inject a set of routes +// (that carry this Community) into BGP. It is sent with sub-type as 0x03. +type ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 20 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The four octet IANA assigned AS value assigned to the Autonomous System. + Global_4ByteAs *uint32 `protobuf:"varint,1,opt,name=global_4byte_as,json=global4byteAs,proto3,oneof" json:"global_4byte_as,omitempty"` + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + Local_2ByteAdmin *uint32 `protobuf:"varint,2,opt,name=local_2byte_admin,json=local2byteAdmin,proto3,oneof" json:"local_2byte_admin,omitempty"` } -func (x *PatternFlowIpv6FlowLabelMetricTag) Reset() { - *x = PatternFlowIpv6FlowLabelMetricTag{} +func (x *ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Reset() { + *x = ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[534] + mi := &file_otg_proto_msgTypes[514] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6FlowLabelMetricTag) String() string { +func (x *ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6FlowLabelMetricTag) ProtoMessage() {} +func (*ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ProtoMessage() {} -func (x *PatternFlowIpv6FlowLabelMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[534] +func (x *ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[514] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67408,74 +68767,57 @@ func (x *PatternFlowIpv6FlowLabelMetricTag) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6FlowLabelMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6FlowLabelMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{534} -} - -func (x *PatternFlowIpv6FlowLabelMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" +// Deprecated: Use ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{514} } -func (x *PatternFlowIpv6FlowLabelMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) GetGlobal_4ByteAs() uint32 { + if x != nil && x.Global_4ByteAs != nil { + return *x.Global_4ByteAs } return 0 } -func (x *PatternFlowIpv6FlowLabelMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) GetLocal_2ByteAdmin() uint32 { + if x != nil && x.Local_2ByteAdmin != nil { + return *x.Local_2ByteAdmin } return 0 } -// Flow label -type PatternFlowIpv6FlowLabel struct { +// The Transitive Four-Octet AS-Specific Extended Community is sent as type 0x02. It +// is defined in RFC 5668. +type ResultExtendedCommunityTransitive4OctetAsType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv6FlowLabel_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6FlowLabel_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + Choice *ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Increment *PatternFlowIpv6FlowLabelCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + RouteTargetSubtype *ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget `protobuf:"bytes,2,opt,name=route_target_subtype,json=routeTargetSubtype,proto3" json:"route_target_subtype,omitempty"` // Description missing in models - Decrement *PatternFlowIpv6FlowLabelCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv6FlowLabelMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + RouteOriginSubtype *ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin `protobuf:"bytes,3,opt,name=route_origin_subtype,json=routeOriginSubtype,proto3" json:"route_origin_subtype,omitempty"` } -func (x *PatternFlowIpv6FlowLabel) Reset() { - *x = PatternFlowIpv6FlowLabel{} +func (x *ResultExtendedCommunityTransitive4OctetAsType) Reset() { + *x = ResultExtendedCommunityTransitive4OctetAsType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[535] + mi := &file_otg_proto_msgTypes[515] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6FlowLabel) String() string { +func (x *ResultExtendedCommunityTransitive4OctetAsType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6FlowLabel) ProtoMessage() {} +func (*ResultExtendedCommunityTransitive4OctetAsType) ProtoMessage() {} -func (x *PatternFlowIpv6FlowLabel) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[535] +func (x *ResultExtendedCommunityTransitive4OctetAsType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[515] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67486,87 +68828,66 @@ func (x *PatternFlowIpv6FlowLabel) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6FlowLabel.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6FlowLabel) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{535} +// Deprecated: Use ResultExtendedCommunityTransitive4OctetAsType.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitive4OctetAsType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{515} } -func (x *PatternFlowIpv6FlowLabel) GetChoice() PatternFlowIpv6FlowLabel_Choice_Enum { +func (x *ResultExtendedCommunityTransitive4OctetAsType) GetChoice() ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIpv6FlowLabel_Choice_unspecified -} - -func (x *PatternFlowIpv6FlowLabel) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowIpv6FlowLabel) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowIpv6FlowLabel) GetIncrement() *PatternFlowIpv6FlowLabelCounter { - if x != nil { - return x.Increment - } - return nil + return ResultExtendedCommunityTransitive4OctetAsType_Choice_unspecified } -func (x *PatternFlowIpv6FlowLabel) GetDecrement() *PatternFlowIpv6FlowLabelCounter { +func (x *ResultExtendedCommunityTransitive4OctetAsType) GetRouteTargetSubtype() *ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget { if x != nil { - return x.Decrement + return x.RouteTargetSubtype } return nil } -func (x *PatternFlowIpv6FlowLabel) GetMetricTags() []*PatternFlowIpv6FlowLabelMetricTag { +func (x *ResultExtendedCommunityTransitive4OctetAsType) GetRouteOriginSubtype() *ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin { if x != nil { - return x.MetricTags + return x.RouteOriginSubtype } return nil } -// integer counter pattern -type PatternFlowIpv6PayloadLengthCounter struct { +// The Color Community contains locally administrator defined 'color' value which is +// used in conjunction with Encapsulation attribute to decide whether a data packet +// can be transmitted on a certain tunnel or not. It is defined in RFC9012 and sent +// with sub-type as 0x0b. +type ResultExtendedCommunityTransitiveOpaqueTypeColor struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Two octet flag values. + Flags *uint32 `protobuf:"varint,1,opt,name=flags,proto3,oneof" json:"flags,omitempty"` + // The color value is user defined and configured locally and used to determine whether + // a data packet can be transmitted on a certain tunnel or not + // in conjunction with the Encapsulation attribute. It is defined in RFC9012. + Color *uint32 `protobuf:"varint,2,opt,name=color,proto3,oneof" json:"color,omitempty"` } -func (x *PatternFlowIpv6PayloadLengthCounter) Reset() { - *x = PatternFlowIpv6PayloadLengthCounter{} +func (x *ResultExtendedCommunityTransitiveOpaqueTypeColor) Reset() { + *x = ResultExtendedCommunityTransitiveOpaqueTypeColor{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[536] + mi := &file_otg_proto_msgTypes[516] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6PayloadLengthCounter) String() string { +func (x *ResultExtendedCommunityTransitiveOpaqueTypeColor) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6PayloadLengthCounter) ProtoMessage() {} +func (*ResultExtendedCommunityTransitiveOpaqueTypeColor) ProtoMessage() {} -func (x *PatternFlowIpv6PayloadLengthCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[536] +func (x *ResultExtendedCommunityTransitiveOpaqueTypeColor) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[516] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67577,70 +68898,65 @@ func (x *PatternFlowIpv6PayloadLengthCounter) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6PayloadLengthCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6PayloadLengthCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{536} -} - -func (x *PatternFlowIpv6PayloadLengthCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use ResultExtendedCommunityTransitiveOpaqueTypeColor.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitiveOpaqueTypeColor) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{516} } -func (x *PatternFlowIpv6PayloadLengthCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *ResultExtendedCommunityTransitiveOpaqueTypeColor) GetFlags() uint32 { + if x != nil && x.Flags != nil { + return *x.Flags } return 0 } -func (x *PatternFlowIpv6PayloadLengthCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *ResultExtendedCommunityTransitiveOpaqueTypeColor) GetColor() uint32 { + if x != nil && x.Color != nil { + return *x.Color } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv6PayloadLengthMetricTag struct { +// This identifies the type of tunneling technology being signalled. It is defined in +// RFC9012 and sent with sub-type as 0x0c. +type ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // Four bytes of reserved values. Normally set to 0 on transmit and ignored on receive. + Reserved *uint32 `protobuf:"varint,1,opt,name=reserved,proto3,oneof" json:"reserved,omitempty"` + // Identifies the type of tunneling technology being signalled. Initially defined in + // RFC5512 and extended in RFC9012. + // Some of the important tunnel types include + // - 1 L2TPv3 over IP [RFC9012], + // - 2 GRE [RFC9012], + // - 7 IP in IP [RFC9012], + // - 8 VXLAN Encapsulation [RFC8365], + // - 9 NVGRE Encapsulation [RFC8365], + // - 10 MPLS Encapsulation [RFC8365], + // - 15 SR TE Policy Type [draft-ietf-idr-segment-routing-te-policy], + // - 19 Geneve Encapsulation [RFC8926] + TunnelType *uint32 `protobuf:"varint,2,opt,name=tunnel_type,json=tunnelType,proto3,oneof" json:"tunnel_type,omitempty"` } -func (x *PatternFlowIpv6PayloadLengthMetricTag) Reset() { - *x = PatternFlowIpv6PayloadLengthMetricTag{} +func (x *ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation) Reset() { + *x = ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[537] + mi := &file_otg_proto_msgTypes[517] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6PayloadLengthMetricTag) String() string { +func (x *ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6PayloadLengthMetricTag) ProtoMessage() {} +func (*ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation) ProtoMessage() {} -func (x *PatternFlowIpv6PayloadLengthMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[537] +func (x *ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[517] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67651,79 +68967,56 @@ func (x *PatternFlowIpv6PayloadLengthMetricTag) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6PayloadLengthMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6PayloadLengthMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{537} -} - -func (x *PatternFlowIpv6PayloadLengthMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" +// Deprecated: Use ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{517} } -func (x *PatternFlowIpv6PayloadLengthMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation) GetReserved() uint32 { + if x != nil && x.Reserved != nil { + return *x.Reserved } return 0 } -func (x *PatternFlowIpv6PayloadLengthMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation) GetTunnelType() uint32 { + if x != nil && x.TunnelType != nil { + return *x.TunnelType } return 0 } -// Payload length -type PatternFlowIpv6PayloadLength struct { +// The Transitive Opaque Extended Community is sent as type 0x03. +type ResultExtendedCommunityTransitiveOpaqueType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.auto - Choice *PatternFlowIpv6PayloadLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6PayloadLength_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // The OTG implementation can provide a system generated - // value for this property. If the OTG is unable to generate a value - // the default value must be used. - // default = 0 - Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` + Choice *ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - Increment *PatternFlowIpv6PayloadLengthCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` + ColorSubtype *ResultExtendedCommunityTransitiveOpaqueTypeColor `protobuf:"bytes,2,opt,name=color_subtype,json=colorSubtype,proto3" json:"color_subtype,omitempty"` // Description missing in models - Decrement *PatternFlowIpv6PayloadLengthCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv6PayloadLengthMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + EncapsulationSubtype *ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation `protobuf:"bytes,3,opt,name=encapsulation_subtype,json=encapsulationSubtype,proto3" json:"encapsulation_subtype,omitempty"` } -func (x *PatternFlowIpv6PayloadLength) Reset() { - *x = PatternFlowIpv6PayloadLength{} +func (x *ResultExtendedCommunityTransitiveOpaqueType) Reset() { + *x = ResultExtendedCommunityTransitiveOpaqueType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[538] + mi := &file_otg_proto_msgTypes[518] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6PayloadLength) String() string { +func (x *ResultExtendedCommunityTransitiveOpaqueType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6PayloadLength) ProtoMessage() {} +func (*ResultExtendedCommunityTransitiveOpaqueType) ProtoMessage() {} -func (x *PatternFlowIpv6PayloadLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[538] +func (x *ResultExtendedCommunityTransitiveOpaqueType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[518] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67734,94 +69027,65 @@ func (x *PatternFlowIpv6PayloadLength) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6PayloadLength.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6PayloadLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{538} +// Deprecated: Use ResultExtendedCommunityTransitiveOpaqueType.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitiveOpaqueType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{518} } -func (x *PatternFlowIpv6PayloadLength) GetChoice() PatternFlowIpv6PayloadLength_Choice_Enum { +func (x *ResultExtendedCommunityTransitiveOpaqueType) GetChoice() ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIpv6PayloadLength_Choice_unspecified -} - -func (x *PatternFlowIpv6PayloadLength) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowIpv6PayloadLength) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowIpv6PayloadLength) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto - } - return 0 -} - -func (x *PatternFlowIpv6PayloadLength) GetIncrement() *PatternFlowIpv6PayloadLengthCounter { - if x != nil { - return x.Increment - } - return nil + return ResultExtendedCommunityTransitiveOpaqueType_Choice_unspecified } -func (x *PatternFlowIpv6PayloadLength) GetDecrement() *PatternFlowIpv6PayloadLengthCounter { +func (x *ResultExtendedCommunityTransitiveOpaqueType) GetColorSubtype() *ResultExtendedCommunityTransitiveOpaqueTypeColor { if x != nil { - return x.Decrement + return x.ColorSubtype } return nil } -func (x *PatternFlowIpv6PayloadLength) GetMetricTags() []*PatternFlowIpv6PayloadLengthMetricTag { +func (x *ResultExtendedCommunityTransitiveOpaqueType) GetEncapsulationSubtype() *ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation { if x != nil { - return x.MetricTags + return x.EncapsulationSubtype } return nil } -// integer counter pattern -type PatternFlowIpv6NextHeaderCounter struct { +// The Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. +// It is sent with sub-type as 0x04. +type ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 59 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The value of the Global Administrator subfield should represent the Autonomous System + // of the router that attaches the Link Bandwidth Community. If four octet AS numbering + // scheme is used, AS_TRANS (23456) should be used. + Global_2ByteAs *uint32 `protobuf:"varint,1,opt,name=global_2byte_as,json=global2byteAs,proto3,oneof" json:"global_2byte_as,omitempty"` + // Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and + // 1 Mbps is 1000 Kbps per second ) + Bandwidth *float32 `protobuf:"fixed32,2,opt,name=bandwidth,proto3,oneof" json:"bandwidth,omitempty"` } -func (x *PatternFlowIpv6NextHeaderCounter) Reset() { - *x = PatternFlowIpv6NextHeaderCounter{} +func (x *ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Reset() { + *x = ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[539] + mi := &file_otg_proto_msgTypes[519] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6NextHeaderCounter) String() string { +func (x *ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6NextHeaderCounter) ProtoMessage() {} +func (*ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ProtoMessage() {} -func (x *PatternFlowIpv6NextHeaderCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[539] +func (x *ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[519] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67832,70 +69096,54 @@ func (x *PatternFlowIpv6NextHeaderCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6NextHeaderCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6NextHeaderCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{539} -} - -func (x *PatternFlowIpv6NextHeaderCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{519} } -func (x *PatternFlowIpv6NextHeaderCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) GetGlobal_2ByteAs() uint32 { + if x != nil && x.Global_2ByteAs != nil { + return *x.Global_2ByteAs } return 0 } -func (x *PatternFlowIpv6NextHeaderCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) GetBandwidth() float32 { + if x != nil && x.Bandwidth != nil { + return *x.Bandwidth } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv6NextHeaderMetricTag struct { +// The Non-Transitive Two-Octet AS-Specific Extended Community is sent as type 0x40. +type ResultExtendedCommunityNonTransitive2OctetAsType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 8 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // Description missing in models + Choice *ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + LinkBandwidthSubtype *ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth `protobuf:"bytes,2,opt,name=link_bandwidth_subtype,json=linkBandwidthSubtype,proto3" json:"link_bandwidth_subtype,omitempty"` } -func (x *PatternFlowIpv6NextHeaderMetricTag) Reset() { - *x = PatternFlowIpv6NextHeaderMetricTag{} +func (x *ResultExtendedCommunityNonTransitive2OctetAsType) Reset() { + *x = ResultExtendedCommunityNonTransitive2OctetAsType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[540] + mi := &file_otg_proto_msgTypes[520] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6NextHeaderMetricTag) String() string { +func (x *ResultExtendedCommunityNonTransitive2OctetAsType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6NextHeaderMetricTag) ProtoMessage() {} +func (*ResultExtendedCommunityNonTransitive2OctetAsType) ProtoMessage() {} -func (x *PatternFlowIpv6NextHeaderMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[540] +func (x *ResultExtendedCommunityNonTransitive2OctetAsType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[520] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67906,79 +69154,59 @@ func (x *PatternFlowIpv6NextHeaderMetricTag) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6NextHeaderMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6NextHeaderMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{540} -} - -func (x *PatternFlowIpv6NextHeaderMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" +// Deprecated: Use ResultExtendedCommunityNonTransitive2OctetAsType.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityNonTransitive2OctetAsType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{520} } -func (x *PatternFlowIpv6NextHeaderMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *ResultExtendedCommunityNonTransitive2OctetAsType) GetChoice() ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return ResultExtendedCommunityNonTransitive2OctetAsType_Choice_unspecified } -func (x *PatternFlowIpv6NextHeaderMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *ResultExtendedCommunityNonTransitive2OctetAsType) GetLinkBandwidthSubtype() *ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + if x != nil { + return x.LinkBandwidthSubtype } - return 0 + return nil } -// Next header -type PatternFlowIpv6NextHeader struct { +// BGP communities provide additional capability for tagging routes and for modifying +// BGP routing policy on upstream and downstream routers. BGP community is a 32-bit +// number which is broken into 16-bit AS number and a 16-bit custom value. +type ResultBgpCommunity struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.auto - Choice *PatternFlowIpv6NextHeader_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6NextHeader_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 59 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [59] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // The OTG implementation can provide a system generated - // value for this property. If the OTG is unable to generate a value - // the default value must be used. - // default = 59 - Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` - // Description missing in models - Increment *PatternFlowIpv6NextHeaderCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv6NextHeaderCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv6NextHeaderMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The type of community AS number. If community type is manual_as_number then as_number + // and as_custom will be available. + Type *ResultBgpCommunity_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.ResultBgpCommunity_Type_Enum,oneof" json:"type,omitempty"` + // First two octets of 32 bit community AS number. + AsNumber *uint32 `protobuf:"varint,2,opt,name=as_number,json=asNumber,proto3,oneof" json:"as_number,omitempty"` + // Last two octets of the community value. + AsCustom *uint32 `protobuf:"varint,3,opt,name=as_custom,json=asCustom,proto3,oneof" json:"as_custom,omitempty"` } -func (x *PatternFlowIpv6NextHeader) Reset() { - *x = PatternFlowIpv6NextHeader{} +func (x *ResultBgpCommunity) Reset() { + *x = ResultBgpCommunity{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[541] + mi := &file_otg_proto_msgTypes[521] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6NextHeader) String() string { +func (x *ResultBgpCommunity) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6NextHeader) ProtoMessage() {} +func (*ResultBgpCommunity) ProtoMessage() {} -func (x *PatternFlowIpv6NextHeader) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[541] +func (x *ResultBgpCommunity) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[521] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67989,94 +69217,118 @@ func (x *PatternFlowIpv6NextHeader) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6NextHeader.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6NextHeader) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{541} +// Deprecated: Use ResultBgpCommunity.ProtoReflect.Descriptor instead. +func (*ResultBgpCommunity) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{521} } -func (x *PatternFlowIpv6NextHeader) GetChoice() PatternFlowIpv6NextHeader_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *ResultBgpCommunity) GetType() ResultBgpCommunity_Type_Enum { + if x != nil && x.Type != nil { + return *x.Type } - return PatternFlowIpv6NextHeader_Choice_unspecified + return ResultBgpCommunity_Type_unspecified } -func (x *PatternFlowIpv6NextHeader) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *ResultBgpCommunity) GetAsNumber() uint32 { + if x != nil && x.AsNumber != nil { + return *x.AsNumber } return 0 } -func (x *PatternFlowIpv6NextHeader) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *ResultBgpCommunity) GetAsCustom() uint32 { + if x != nil && x.AsCustom != nil { + return *x.AsCustom } - return nil + return 0 } -func (x *PatternFlowIpv6NextHeader) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto - } - return 0 +// This attribute identifies the autonomous systems through which routing information +// carried in this UPDATE message has passed. +type ResultBgpAsPath struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // AS Path segments present in the received AS Path attribute. + Segments []*ResultBgpAsPathSegment `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"` } -func (x *PatternFlowIpv6NextHeader) GetIncrement() *PatternFlowIpv6NextHeaderCounter { - if x != nil { - return x.Increment +func (x *ResultBgpAsPath) Reset() { + *x = ResultBgpAsPath{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[522] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *PatternFlowIpv6NextHeader) GetDecrement() *PatternFlowIpv6NextHeaderCounter { - if x != nil { - return x.Decrement +func (x *ResultBgpAsPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResultBgpAsPath) ProtoMessage() {} + +func (x *ResultBgpAsPath) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[522] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *PatternFlowIpv6NextHeader) GetMetricTags() []*PatternFlowIpv6NextHeaderMetricTag { +// Deprecated: Use ResultBgpAsPath.ProtoReflect.Descriptor instead. +func (*ResultBgpAsPath) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{522} +} + +func (x *ResultBgpAsPath) GetSegments() []*ResultBgpAsPathSegment { if x != nil { - return x.MetricTags + return x.Segments } return nil } -// integer counter pattern -type PatternFlowIpv6HopLimitCounter struct { +// Configuration for a single BGP AS path segment +type ResultBgpAsPathSegment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 64 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // AS sequence is the most common type of AS_PATH, it contains the list of ASNs starting + // with the most recent ASN being added read from left to right. + // The other three AS_PATH types are used for Confederations - AS_SET is the type of + // AS_PATH attribute that summarizes routes using using the aggregate-address command, + // allowing AS_PATHs to be summarized in the update as well. - AS_CONFED_SEQ gives + // the list of ASNs in the path starting with the most recent ASN to be added reading + // left to right - AS_CONFED_SET will allow summarization of multiple AS PATHs to be + // sent in BGP Updates. + Type *ResultBgpAsPathSegment_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.ResultBgpAsPathSegment_Type_Enum,oneof" json:"type,omitempty"` + // The AS numbers in this AS path segment. + AsNumbers []uint32 `protobuf:"varint,2,rep,packed,name=as_numbers,json=asNumbers,proto3" json:"as_numbers,omitempty"` } -func (x *PatternFlowIpv6HopLimitCounter) Reset() { - *x = PatternFlowIpv6HopLimitCounter{} +func (x *ResultBgpAsPathSegment) Reset() { + *x = ResultBgpAsPathSegment{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[542] + mi := &file_otg_proto_msgTypes[523] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6HopLimitCounter) String() string { +func (x *ResultBgpAsPathSegment) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6HopLimitCounter) ProtoMessage() {} +func (*ResultBgpAsPathSegment) ProtoMessage() {} -func (x *PatternFlowIpv6HopLimitCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[542] +func (x *ResultBgpAsPathSegment) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[523] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -68087,70 +69339,59 @@ func (x *PatternFlowIpv6HopLimitCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6HopLimitCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6HopLimitCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{542} -} - -func (x *PatternFlowIpv6HopLimitCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use ResultBgpAsPathSegment.ProtoReflect.Descriptor instead. +func (*ResultBgpAsPathSegment) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{523} } -func (x *PatternFlowIpv6HopLimitCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *ResultBgpAsPathSegment) GetType() ResultBgpAsPathSegment_Type_Enum { + if x != nil && x.Type != nil { + return *x.Type } - return 0 + return ResultBgpAsPathSegment_Type_unspecified } -func (x *PatternFlowIpv6HopLimitCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *ResultBgpAsPathSegment) GetAsNumbers() []uint32 { + if x != nil { + return x.AsNumbers } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv6HopLimitMetricTag struct { +// The request to retrieve ISIS Link State PDU (LSP) information learned by the router. +type IsisLspsStateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 8 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The names of ISIS routers for which learned information is requested. An empty list + // will return results for all ISIS routers. + // + // x-constraint: + // - /components/schemas/Device.IsisRouter/properties/name + // + // x-constraint: + // - /components/schemas/Device.IsisRouter/properties/name + IsisRouterNames []string `protobuf:"bytes,1,rep,name=isis_router_names,json=isisRouterNames,proto3" json:"isis_router_names,omitempty"` } -func (x *PatternFlowIpv6HopLimitMetricTag) Reset() { - *x = PatternFlowIpv6HopLimitMetricTag{} +func (x *IsisLspsStateRequest) Reset() { + *x = IsisLspsStateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[543] + mi := &file_otg_proto_msgTypes[524] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6HopLimitMetricTag) String() string { +func (x *IsisLspsStateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6HopLimitMetricTag) ProtoMessage() {} +func (*IsisLspsStateRequest) ProtoMessage() {} -func (x *PatternFlowIpv6HopLimitMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[543] +func (x *IsisLspsStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[524] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -68161,74 +69402,47 @@ func (x *PatternFlowIpv6HopLimitMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6HopLimitMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6HopLimitMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{543} -} - -func (x *PatternFlowIpv6HopLimitMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatternFlowIpv6HopLimitMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset - } - return 0 +// Deprecated: Use IsisLspsStateRequest.ProtoReflect.Descriptor instead. +func (*IsisLspsStateRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{524} } -func (x *PatternFlowIpv6HopLimitMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *IsisLspsStateRequest) GetIsisRouterNames() []string { + if x != nil { + return x.IsisRouterNames } - return 0 + return nil } -// Hop limit -type PatternFlowIpv6HopLimit struct { +// The result of ISIS LSP information that are retrieved. +type IsisLspsState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv6HopLimit_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6HopLimit_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 64 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [64] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv6HopLimitCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv6HopLimitCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv6HopLimitMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The name of the ISIS Router. + IsisRouterName *string `protobuf:"bytes,1,opt,name=isis_router_name,json=isisRouterName,proto3,oneof" json:"isis_router_name,omitempty"` + // One or more LSPs that are learned by this ISIS router. + Lsps []*IsisLspState `protobuf:"bytes,2,rep,name=lsps,proto3" json:"lsps,omitempty"` } -func (x *PatternFlowIpv6HopLimit) Reset() { - *x = PatternFlowIpv6HopLimit{} +func (x *IsisLspsState) Reset() { + *x = IsisLspsState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[544] + mi := &file_otg_proto_msgTypes[525] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6HopLimit) String() string { +func (x *IsisLspsState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6HopLimit) ProtoMessage() {} +func (*IsisLspsState) ProtoMessage() {} -func (x *PatternFlowIpv6HopLimit) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[544] +func (x *IsisLspsState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[525] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -68239,87 +69453,76 @@ func (x *PatternFlowIpv6HopLimit) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6HopLimit.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6HopLimit) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{544} -} - -func (x *PatternFlowIpv6HopLimit) GetChoice() PatternFlowIpv6HopLimit_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIpv6HopLimit_Choice_unspecified -} - -func (x *PatternFlowIpv6HopLimit) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 +// Deprecated: Use IsisLspsState.ProtoReflect.Descriptor instead. +func (*IsisLspsState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{525} } -func (x *PatternFlowIpv6HopLimit) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *IsisLspsState) GetIsisRouterName() string { + if x != nil && x.IsisRouterName != nil { + return *x.IsisRouterName } - return nil + return "" } -func (x *PatternFlowIpv6HopLimit) GetIncrement() *PatternFlowIpv6HopLimitCounter { +func (x *IsisLspsState) GetLsps() []*IsisLspState { if x != nil { - return x.Increment + return x.Lsps } return nil } -func (x *PatternFlowIpv6HopLimit) GetDecrement() *PatternFlowIpv6HopLimitCounter { - if x != nil { - return x.Decrement - } - return nil -} - -func (x *PatternFlowIpv6HopLimit) GetMetricTags() []*PatternFlowIpv6HopLimitMetricTag { - if x != nil { - return x.MetricTags - } - return nil -} - -// ipv6 counter pattern -type PatternFlowIpv6SrcCounter struct { +// ISIS LSP. +type IsisLspState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = ::0 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = ::1 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // LSP ID in the format, e.g. '640000000001-00-00'. LSP ID consists of the System ID + // of a neighbor, the Pseudonode ID, and the LSP number. The last two bytes represent + // Pseudonode ID and LSP number respectively. A pseudonode is a logical representation + // of the LAN which is generated by a Designated Intermediate System (DIS) on a LAN + // segment. If one LSP exceeds the maximum LSP size then it is sent in another LSP with + // the LSP number incremented by one. A router's learned LSP gets refreshed by 'remaining_lifetime'. + // Then the sequence number is incremented by 1. + // required = true + LspId *string `protobuf:"bytes,1,opt,name=lsp_id,json=lspId,proto3,oneof" json:"lsp_id,omitempty"` + // Link State PDU type. + PduType *IsisLspState_PduType_Enum `protobuf:"varint,2,opt,name=pdu_type,json=pduType,proto3,enum=otg.IsisLspState_PduType_Enum,oneof" json:"pdu_type,omitempty"` + // Remaining lifetime in seconds before LSP expires. + RemainingLifetime *uint32 `protobuf:"varint,3,opt,name=remaining_lifetime,json=remainingLifetime,proto3,oneof" json:"remaining_lifetime,omitempty"` + // Sequence number of the LSP. + SequenceNumber *uint64 `protobuf:"varint,4,opt,name=sequence_number,json=sequenceNumber,proto3,oneof" json:"sequence_number,omitempty"` + // Total length of the LSP. + PduLength *uint32 `protobuf:"varint,5,opt,name=pdu_length,json=pduLength,proto3,oneof" json:"pdu_length,omitempty"` + // LSP Type-Block flags. + Flags *IsisLspFlags `protobuf:"bytes,6,opt,name=flags,proto3" json:"flags,omitempty"` + // IS Type - bits 1 and 2 indicate the type of Intermediate System. + // 1 - ( i.e. bit 1 set) Level 1 Intermediate system. + // 2 - Unused value. + // 3 - (i.e. bits 1 and 2 set) Level 2 Intermediate system. + IsType *uint32 `protobuf:"varint,7,opt,name=is_type,json=isType,proto3,oneof" json:"is_type,omitempty"` + // It refers to Link State PDU State TLVs container. + Tlvs *IsisLspTlvs `protobuf:"bytes,8,opt,name=tlvs,proto3" json:"tlvs,omitempty"` } -func (x *PatternFlowIpv6SrcCounter) Reset() { - *x = PatternFlowIpv6SrcCounter{} +func (x *IsisLspState) Reset() { + *x = IsisLspState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[545] + mi := &file_otg_proto_msgTypes[526] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6SrcCounter) String() string { +func (x *IsisLspState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6SrcCounter) ProtoMessage() {} +func (*IsisLspState) ProtoMessage() {} -func (x *PatternFlowIpv6SrcCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[545] +func (x *IsisLspState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[526] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -68330,148 +69533,106 @@ func (x *PatternFlowIpv6SrcCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6SrcCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6SrcCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{545} +// Deprecated: Use IsisLspState.ProtoReflect.Descriptor instead. +func (*IsisLspState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{526} } -func (x *PatternFlowIpv6SrcCounter) GetStart() string { - if x != nil && x.Start != nil { - return *x.Start +func (x *IsisLspState) GetLspId() string { + if x != nil && x.LspId != nil { + return *x.LspId } return "" } -func (x *PatternFlowIpv6SrcCounter) GetStep() string { - if x != nil && x.Step != nil { - return *x.Step +func (x *IsisLspState) GetPduType() IsisLspState_PduType_Enum { + if x != nil && x.PduType != nil { + return *x.PduType } - return "" + return IsisLspState_PduType_unspecified } -func (x *PatternFlowIpv6SrcCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *IsisLspState) GetRemainingLifetime() uint32 { + if x != nil && x.RemainingLifetime != nil { + return *x.RemainingLifetime } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv6SrcMetricTag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 128 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` -} - -func (x *PatternFlowIpv6SrcMetricTag) Reset() { - *x = PatternFlowIpv6SrcMetricTag{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[546] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *IsisLspState) GetSequenceNumber() uint64 { + if x != nil && x.SequenceNumber != nil { + return *x.SequenceNumber } + return 0 } -func (x *PatternFlowIpv6SrcMetricTag) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatternFlowIpv6SrcMetricTag) ProtoMessage() {} - -func (x *PatternFlowIpv6SrcMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[546] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *IsisLspState) GetPduLength() uint32 { + if x != nil && x.PduLength != nil { + return *x.PduLength } - return mi.MessageOf(x) -} - -// Deprecated: Use PatternFlowIpv6SrcMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6SrcMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{546} + return 0 } -func (x *PatternFlowIpv6SrcMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *IsisLspState) GetFlags() *IsisLspFlags { + if x != nil { + return x.Flags } - return "" + return nil } -func (x *PatternFlowIpv6SrcMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *IsisLspState) GetIsType() uint32 { + if x != nil && x.IsType != nil { + return *x.IsType } return 0 } -func (x *PatternFlowIpv6SrcMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *IsisLspState) GetTlvs() *IsisLspTlvs { + if x != nil { + return x.Tlvs } - return 0 + return nil } -// Source address -type PatternFlowIpv6Src struct { +// This contains the list of TLVs present in one LSP. +type IsisLspTlvs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv6Src_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6Src_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = ::0 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = ['::0'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv6SrcCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv6SrcCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv6SrcMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // Array of Hostname TLVs ( type 137) present in this LSP. + HostnameTlvs []*IsisLspHostname `protobuf:"bytes,1,rep,name=hostname_tlvs,json=hostnameTlvs,proto3" json:"hostname_tlvs,omitempty"` + // Array of IS-Reachability TLVs (type 2) present in this LSP. + IsReachabilityTlvs []*IsisLspIsReachabilityTlv `protobuf:"bytes,2,rep,name=is_reachability_tlvs,json=isReachabilityTlvs,proto3" json:"is_reachability_tlvs,omitempty"` + // Array of Extended IS-Reachability TLVs (type 22) present in this LSP. + ExtendedIsReachabilityTlvs []*IsisLspExtendedIsReachabilityTlv `protobuf:"bytes,3,rep,name=extended_is_reachability_tlvs,json=extendedIsReachabilityTlvs,proto3" json:"extended_is_reachability_tlvs,omitempty"` + // Array of IPv4 Internal Reachability TLVs (type 128) present in this LSP. + Ipv4InternalReachabilityTlvs []*IsisLspIpv4InternalReachabilityTlv `protobuf:"bytes,4,rep,name=ipv4_internal_reachability_tlvs,json=ipv4InternalReachabilityTlvs,proto3" json:"ipv4_internal_reachability_tlvs,omitempty"` + // Array of IPv4 External Reachability TLVs (type 130) present in this LSP. + Ipv4ExternalReachabilityTlvs []*IsisLspIpv4ExternalReachabilityTlv `protobuf:"bytes,5,rep,name=ipv4_external_reachability_tlvs,json=ipv4ExternalReachabilityTlvs,proto3" json:"ipv4_external_reachability_tlvs,omitempty"` + // Array of IPv4 Extended Reachability TLVs (type 135) present in this LSP. + ExtendedIpv4ReachabilityTlvs []*IsisLspExtendedIpv4ReachabilityTlv `protobuf:"bytes,6,rep,name=extended_ipv4_reachability_tlvs,json=extendedIpv4ReachabilityTlvs,proto3" json:"extended_ipv4_reachability_tlvs,omitempty"` + // Array of IPv6 Reachability TLVs (type 236) present in this LSP. + Ipv6ReachabilityTlvs []*IsisLspIpv6ReachabilityTlv `protobuf:"bytes,7,rep,name=ipv6_reachability_tlvs,json=ipv6ReachabilityTlvs,proto3" json:"ipv6_reachability_tlvs,omitempty"` } -func (x *PatternFlowIpv6Src) Reset() { - *x = PatternFlowIpv6Src{} +func (x *IsisLspTlvs) Reset() { + *x = IsisLspTlvs{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[547] + mi := &file_otg_proto_msgTypes[527] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6Src) String() string { +func (x *IsisLspTlvs) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6Src) ProtoMessage() {} +func (*IsisLspTlvs) ProtoMessage() {} -func (x *PatternFlowIpv6Src) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[547] +func (x *IsisLspTlvs) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[527] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -68482,87 +69643,87 @@ func (x *PatternFlowIpv6Src) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6Src.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6Src) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{547} +// Deprecated: Use IsisLspTlvs.ProtoReflect.Descriptor instead. +func (*IsisLspTlvs) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{527} } -func (x *PatternFlowIpv6Src) GetChoice() PatternFlowIpv6Src_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *IsisLspTlvs) GetHostnameTlvs() []*IsisLspHostname { + if x != nil { + return x.HostnameTlvs } - return PatternFlowIpv6Src_Choice_unspecified + return nil } -func (x *PatternFlowIpv6Src) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value +func (x *IsisLspTlvs) GetIsReachabilityTlvs() []*IsisLspIsReachabilityTlv { + if x != nil { + return x.IsReachabilityTlvs } - return "" + return nil } -func (x *PatternFlowIpv6Src) GetValues() []string { +func (x *IsisLspTlvs) GetExtendedIsReachabilityTlvs() []*IsisLspExtendedIsReachabilityTlv { if x != nil { - return x.Values + return x.ExtendedIsReachabilityTlvs } return nil } -func (x *PatternFlowIpv6Src) GetIncrement() *PatternFlowIpv6SrcCounter { +func (x *IsisLspTlvs) GetIpv4InternalReachabilityTlvs() []*IsisLspIpv4InternalReachabilityTlv { if x != nil { - return x.Increment + return x.Ipv4InternalReachabilityTlvs } return nil } -func (x *PatternFlowIpv6Src) GetDecrement() *PatternFlowIpv6SrcCounter { +func (x *IsisLspTlvs) GetIpv4ExternalReachabilityTlvs() []*IsisLspIpv4ExternalReachabilityTlv { if x != nil { - return x.Decrement + return x.Ipv4ExternalReachabilityTlvs } return nil } -func (x *PatternFlowIpv6Src) GetMetricTags() []*PatternFlowIpv6SrcMetricTag { +func (x *IsisLspTlvs) GetExtendedIpv4ReachabilityTlvs() []*IsisLspExtendedIpv4ReachabilityTlv { if x != nil { - return x.MetricTags + return x.ExtendedIpv4ReachabilityTlvs } return nil } -// ipv6 counter pattern -type PatternFlowIpv6DstCounter struct { +func (x *IsisLspTlvs) GetIpv6ReachabilityTlvs() []*IsisLspIpv6ReachabilityTlv { + if x != nil { + return x.Ipv6ReachabilityTlvs + } + return nil +} + +// It contains Hostname for the TLV 137. +type IsisLspHostname struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = ::0 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = ::1 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Hostname for an ISIS router. + Hostname *string `protobuf:"bytes,1,opt,name=hostname,proto3,oneof" json:"hostname,omitempty"` } -func (x *PatternFlowIpv6DstCounter) Reset() { - *x = PatternFlowIpv6DstCounter{} +func (x *IsisLspHostname) Reset() { + *x = IsisLspHostname{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[548] + mi := &file_otg_proto_msgTypes[528] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6DstCounter) String() string { +func (x *IsisLspHostname) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6DstCounter) ProtoMessage() {} +func (*IsisLspHostname) ProtoMessage() {} -func (x *PatternFlowIpv6DstCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[548] +func (x *IsisLspHostname) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[528] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -68573,70 +69734,59 @@ func (x *PatternFlowIpv6DstCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6DstCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6DstCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{548} -} - -func (x *PatternFlowIpv6DstCounter) GetStart() string { - if x != nil && x.Start != nil { - return *x.Start - } - return "" +// Deprecated: Use IsisLspHostname.ProtoReflect.Descriptor instead. +func (*IsisLspHostname) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{528} } -func (x *PatternFlowIpv6DstCounter) GetStep() string { - if x != nil && x.Step != nil { - return *x.Step +func (x *IsisLspHostname) GetHostname() string { + if x != nil && x.Hostname != nil { + return *x.Hostname } return "" } -func (x *PatternFlowIpv6DstCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count - } - return 0 -} - -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowIpv6DstMetricTag struct { +// LSP Type flags. +type IsisLspFlags struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 128 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // When set, the originator supports partition repair. + PartitionRepair *bool `protobuf:"varint,1,opt,name=partition_repair,json=partitionRepair,proto3,oneof" json:"partition_repair,omitempty"` + // When set, the originator is attached to another area using the referred metric. + AttachedError *bool `protobuf:"varint,2,opt,name=attached_error,json=attachedError,proto3,oneof" json:"attached_error,omitempty"` + // When set, the originator is attached to another + // area using the referred metric. + AttachedExpense *bool `protobuf:"varint,3,opt,name=attached_expense,json=attachedExpense,proto3,oneof" json:"attached_expense,omitempty"` + // Delay Metric - when set, the originator is attached to another + // area using the referred metric. + AttachedDelay *bool `protobuf:"varint,4,opt,name=attached_delay,json=attachedDelay,proto3,oneof" json:"attached_delay,omitempty"` + // Default Metric - when set, the originator is attached to another + // area using the referred metric. + AttachedDefault *bool `protobuf:"varint,5,opt,name=attached_default,json=attachedDefault,proto3,oneof" json:"attached_default,omitempty"` + // Overload bit - when set, the originator is overloaded, and must + // be avoided in path calculation. + Overload *bool `protobuf:"varint,6,opt,name=overload,proto3,oneof" json:"overload,omitempty"` } -func (x *PatternFlowIpv6DstMetricTag) Reset() { - *x = PatternFlowIpv6DstMetricTag{} +func (x *IsisLspFlags) Reset() { + *x = IsisLspFlags{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[549] + mi := &file_otg_proto_msgTypes[529] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6DstMetricTag) String() string { +func (x *IsisLspFlags) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6DstMetricTag) ProtoMessage() {} +func (*IsisLspFlags) ProtoMessage() {} -func (x *PatternFlowIpv6DstMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[549] +func (x *IsisLspFlags) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[529] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -68647,74 +69797,81 @@ func (x *PatternFlowIpv6DstMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6DstMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6DstMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{549} +// Deprecated: Use IsisLspFlags.ProtoReflect.Descriptor instead. +func (*IsisLspFlags) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{529} } -func (x *PatternFlowIpv6DstMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *IsisLspFlags) GetPartitionRepair() bool { + if x != nil && x.PartitionRepair != nil { + return *x.PartitionRepair } - return "" + return false } -func (x *PatternFlowIpv6DstMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *IsisLspFlags) GetAttachedError() bool { + if x != nil && x.AttachedError != nil { + return *x.AttachedError } - return 0 + return false } -func (x *PatternFlowIpv6DstMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *IsisLspFlags) GetAttachedExpense() bool { + if x != nil && x.AttachedExpense != nil { + return *x.AttachedExpense } - return 0 + return false } -// Destination address -type PatternFlowIpv6Dst struct { +func (x *IsisLspFlags) GetAttachedDelay() bool { + if x != nil && x.AttachedDelay != nil { + return *x.AttachedDelay + } + return false +} + +func (x *IsisLspFlags) GetAttachedDefault() bool { + if x != nil && x.AttachedDefault != nil { + return *x.AttachedDefault + } + return false +} + +func (x *IsisLspFlags) GetOverload() bool { + if x != nil && x.Overload != nil { + return *x.Overload + } + return false +} + +// This container describes list of ISIS neighbors and attributes in IS-Reachability +// TLV (type 2). +type IsisLspIsReachabilityTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIpv6Dst_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6Dst_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = ::0 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = ['::0'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIpv6DstCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIpv6DstCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIpv6DstMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // This container describes Intermediate System (IS) neighbors. + Neighbors []*IsisLspneighbor `protobuf:"bytes,1,rep,name=neighbors,proto3" json:"neighbors,omitempty"` } -func (x *PatternFlowIpv6Dst) Reset() { - *x = PatternFlowIpv6Dst{} +func (x *IsisLspIsReachabilityTlv) Reset() { + *x = IsisLspIsReachabilityTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[550] + mi := &file_otg_proto_msgTypes[530] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6Dst) String() string { +func (x *IsisLspIsReachabilityTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6Dst) ProtoMessage() {} +func (*IsisLspIsReachabilityTlv) ProtoMessage() {} -func (x *PatternFlowIpv6Dst) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[550] +func (x *IsisLspIsReachabilityTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[530] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -68725,87 +69882,46 @@ func (x *PatternFlowIpv6Dst) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6Dst.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6Dst) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{550} -} - -func (x *PatternFlowIpv6Dst) GetChoice() PatternFlowIpv6Dst_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIpv6Dst_Choice_unspecified -} - -func (x *PatternFlowIpv6Dst) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value - } - return "" -} - -func (x *PatternFlowIpv6Dst) GetValues() []string { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowIpv6Dst) GetIncrement() *PatternFlowIpv6DstCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowIpv6Dst) GetDecrement() *PatternFlowIpv6DstCounter { - if x != nil { - return x.Decrement - } - return nil +// Deprecated: Use IsisLspIsReachabilityTlv.ProtoReflect.Descriptor instead. +func (*IsisLspIsReachabilityTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{530} } -func (x *PatternFlowIpv6Dst) GetMetricTags() []*PatternFlowIpv6DstMetricTag { +func (x *IsisLspIsReachabilityTlv) GetNeighbors() []*IsisLspneighbor { if x != nil { - return x.MetricTags + return x.Neighbors } return nil } -// mac counter pattern -type PatternFlowPfcPauseDstCounter struct { +// This is list of ISIS neighbors and attributes in Extended-IS-Reachability TLV (type +// 22). +type IsisLspExtendedIsReachabilityTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 01:80:c2:00:00:01 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 00:00:00:00:00:01 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // This container describes IS neighbors. + Neighbors []*IsisLspneighbor `protobuf:"bytes,1,rep,name=neighbors,proto3" json:"neighbors,omitempty"` } -func (x *PatternFlowPfcPauseDstCounter) Reset() { - *x = PatternFlowPfcPauseDstCounter{} +func (x *IsisLspExtendedIsReachabilityTlv) Reset() { + *x = IsisLspExtendedIsReachabilityTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[551] + mi := &file_otg_proto_msgTypes[531] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseDstCounter) String() string { +func (x *IsisLspExtendedIsReachabilityTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseDstCounter) ProtoMessage() {} +func (*IsisLspExtendedIsReachabilityTlv) ProtoMessage() {} -func (x *PatternFlowPfcPauseDstCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[551] +func (x *IsisLspExtendedIsReachabilityTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[531] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -68816,70 +69932,45 @@ func (x *PatternFlowPfcPauseDstCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseDstCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseDstCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{551} -} - -func (x *PatternFlowPfcPauseDstCounter) GetStart() string { - if x != nil && x.Start != nil { - return *x.Start - } - return "" -} - -func (x *PatternFlowPfcPauseDstCounter) GetStep() string { - if x != nil && x.Step != nil { - return *x.Step - } - return "" +// Deprecated: Use IsisLspExtendedIsReachabilityTlv.ProtoReflect.Descriptor instead. +func (*IsisLspExtendedIsReachabilityTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{531} } -func (x *PatternFlowPfcPauseDstCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *IsisLspExtendedIsReachabilityTlv) GetNeighbors() []*IsisLspneighbor { + if x != nil { + return x.Neighbors } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowPfcPauseDstMetricTag struct { +// This contains IS neighbors. +type IsisLspneighbor struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 48 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The System ID for this emulated ISIS router, e.g. 640100010000. + SystemId *string `protobuf:"bytes,1,opt,name=system_id,json=systemId,proto3,oneof" json:"system_id,omitempty"` } -func (x *PatternFlowPfcPauseDstMetricTag) Reset() { - *x = PatternFlowPfcPauseDstMetricTag{} +func (x *IsisLspneighbor) Reset() { + *x = IsisLspneighbor{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[552] + mi := &file_otg_proto_msgTypes[532] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseDstMetricTag) String() string { +func (x *IsisLspneighbor) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseDstMetricTag) ProtoMessage() {} +func (*IsisLspneighbor) ProtoMessage() {} -func (x *PatternFlowPfcPauseDstMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[552] +func (x *IsisLspneighbor) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[532] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -68890,74 +69981,47 @@ func (x *PatternFlowPfcPauseDstMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseDstMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseDstMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{552} +// Deprecated: Use IsisLspneighbor.ProtoReflect.Descriptor instead. +func (*IsisLspneighbor) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{532} } -func (x *PatternFlowPfcPauseDstMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *IsisLspneighbor) GetSystemId() string { + if x != nil && x.SystemId != nil { + return *x.SystemId } return "" } -func (x *PatternFlowPfcPauseDstMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset - } - return 0 -} - -func (x *PatternFlowPfcPauseDstMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length - } - return 0 -} - -// Destination MAC address -type PatternFlowPfcPauseDst struct { +// This container defines list of IPv4 internal reachability information in one IPv4 +// internal reachability TLV. +// This is advertised when the origin-type is set 'internal' in route range configurations. +type IsisLspIpv4InternalReachabilityTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowPfcPauseDst_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPauseDst_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 01:80:c2:00:00:01 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = ['01:80:c2:00:00:01'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowPfcPauseDstCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowPfcPauseDstCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPfcPauseDstMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // Describes list of IPv4 prefixes in this TLV. + Prefixes []*IsisLspV4Prefix `protobuf:"bytes,1,rep,name=prefixes,proto3" json:"prefixes,omitempty"` } -func (x *PatternFlowPfcPauseDst) Reset() { - *x = PatternFlowPfcPauseDst{} +func (x *IsisLspIpv4InternalReachabilityTlv) Reset() { + *x = IsisLspIpv4InternalReachabilityTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[553] + mi := &file_otg_proto_msgTypes[533] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseDst) String() string { +func (x *IsisLspIpv4InternalReachabilityTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseDst) ProtoMessage() {} +func (*IsisLspIpv4InternalReachabilityTlv) ProtoMessage() {} -func (x *PatternFlowPfcPauseDst) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[553] +func (x *IsisLspIpv4InternalReachabilityTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[533] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -68968,87 +70032,112 @@ func (x *PatternFlowPfcPauseDst) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseDst.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseDst) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{553} +// Deprecated: Use IsisLspIpv4InternalReachabilityTlv.ProtoReflect.Descriptor instead. +func (*IsisLspIpv4InternalReachabilityTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{533} } -func (x *PatternFlowPfcPauseDst) GetChoice() PatternFlowPfcPauseDst_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *IsisLspIpv4InternalReachabilityTlv) GetPrefixes() []*IsisLspV4Prefix { + if x != nil { + return x.Prefixes } - return PatternFlowPfcPauseDst_Choice_unspecified + return nil } -func (x *PatternFlowPfcPauseDst) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value - } - return "" +// This container defines list of IPv4 external reachability information in one IPv4 +// external reachability TLV. +// This is advertised when the origin-type is set 'external' in route range configurations. +type IsisLspIpv4ExternalReachabilityTlv struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Describes list of IPv4 prefixes in this TLV.. + Prefixes []*IsisLspV4Prefix `protobuf:"bytes,1,rep,name=prefixes,proto3" json:"prefixes,omitempty"` } -func (x *PatternFlowPfcPauseDst) GetValues() []string { - if x != nil { - return x.Values +func (x *IsisLspIpv4ExternalReachabilityTlv) Reset() { + *x = IsisLspIpv4ExternalReachabilityTlv{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[534] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *PatternFlowPfcPauseDst) GetIncrement() *PatternFlowPfcPauseDstCounter { - if x != nil { - return x.Increment - } - return nil +func (x *IsisLspIpv4ExternalReachabilityTlv) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *PatternFlowPfcPauseDst) GetDecrement() *PatternFlowPfcPauseDstCounter { - if x != nil { - return x.Decrement +func (*IsisLspIpv4ExternalReachabilityTlv) ProtoMessage() {} + +func (x *IsisLspIpv4ExternalReachabilityTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[534] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *PatternFlowPfcPauseDst) GetMetricTags() []*PatternFlowPfcPauseDstMetricTag { +// Deprecated: Use IsisLspIpv4ExternalReachabilityTlv.ProtoReflect.Descriptor instead. +func (*IsisLspIpv4ExternalReachabilityTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{534} +} + +func (x *IsisLspIpv4ExternalReachabilityTlv) GetPrefixes() []*IsisLspV4Prefix { if x != nil { - return x.MetricTags + return x.Prefixes } return nil } -// mac counter pattern -type PatternFlowPfcPauseSrcCounter struct { +// This group defines attributes of an IPv4 standard prefix. +type IsisLspV4Prefix struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 00:00:00:00:00:00 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 00:00:00:00:00:01 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // An IPv4 unicast prefix reachable via the originator of this LSP. + Ipv4Address *string `protobuf:"bytes,1,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` + // The length of the IPv4 prefix. + PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` + // Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, + // and for all other prefixes in L1 and L2 LSPs. (default) + // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. + // The prefixes are being advertised from a higher level (L2) down to a lower level + // (L1). + RedistributionType *IsisLspV4Prefix_RedistributionType_Enum `protobuf:"varint,3,opt,name=redistribution_type,json=redistributionType,proto3,enum=otg.IsisLspV4Prefix_RedistributionType_Enum,oneof" json:"redistribution_type,omitempty"` + // ISIS default metric value. + DefaultMetric *uint32 `protobuf:"varint,4,opt,name=default_metric,json=defaultMetric,proto3,oneof" json:"default_metric,omitempty"` + // The origin of the advertised route-internal or external to the ISIS area. Options + // include the following: + // Internal-for intra-area routes, through Level 1 LSPs. + // External-for inter-area routes redistributed within L1, through Level + // 1 LSPs. + OriginType *IsisLspV4Prefix_OriginType_Enum `protobuf:"varint,5,opt,name=origin_type,json=originType,proto3,enum=otg.IsisLspV4Prefix_OriginType_Enum,oneof" json:"origin_type,omitempty"` } -func (x *PatternFlowPfcPauseSrcCounter) Reset() { - *x = PatternFlowPfcPauseSrcCounter{} +func (x *IsisLspV4Prefix) Reset() { + *x = IsisLspV4Prefix{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[554] + mi := &file_otg_proto_msgTypes[535] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseSrcCounter) String() string { +func (x *IsisLspV4Prefix) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseSrcCounter) ProtoMessage() {} +func (*IsisLspV4Prefix) ProtoMessage() {} -func (x *PatternFlowPfcPauseSrcCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[554] +func (x *IsisLspV4Prefix) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[535] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69059,70 +70148,75 @@ func (x *PatternFlowPfcPauseSrcCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseSrcCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseSrcCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{554} +// Deprecated: Use IsisLspV4Prefix.ProtoReflect.Descriptor instead. +func (*IsisLspV4Prefix) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{535} } -func (x *PatternFlowPfcPauseSrcCounter) GetStart() string { - if x != nil && x.Start != nil { - return *x.Start +func (x *IsisLspV4Prefix) GetIpv4Address() string { + if x != nil && x.Ipv4Address != nil { + return *x.Ipv4Address } return "" } -func (x *PatternFlowPfcPauseSrcCounter) GetStep() string { - if x != nil && x.Step != nil { - return *x.Step +func (x *IsisLspV4Prefix) GetPrefixLength() uint32 { + if x != nil && x.PrefixLength != nil { + return *x.PrefixLength } - return "" + return 0 } -func (x *PatternFlowPfcPauseSrcCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *IsisLspV4Prefix) GetRedistributionType() IsisLspV4Prefix_RedistributionType_Enum { + if x != nil && x.RedistributionType != nil { + return *x.RedistributionType + } + return IsisLspV4Prefix_RedistributionType_unspecified +} + +func (x *IsisLspV4Prefix) GetDefaultMetric() uint32 { + if x != nil && x.DefaultMetric != nil { + return *x.DefaultMetric } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowPfcPauseSrcMetricTag struct { +func (x *IsisLspV4Prefix) GetOriginType() IsisLspV4Prefix_OriginType_Enum { + if x != nil && x.OriginType != nil { + return *x.OriginType + } + return IsisLspV4Prefix_OriginType_unspecified +} + +// This container defines list of IPv4 extended reachability information in one Extended +// IPv4 External Reachability TLV. +// It is advertised when the 'wide metric' is enabled. +type IsisLspExtendedIpv4ReachabilityTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 48 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // IPv4 prefix contained within extended reachability TLVs. + Prefixes []*IsisLspExtendedV4Prefix `protobuf:"bytes,1,rep,name=prefixes,proto3" json:"prefixes,omitempty"` } -func (x *PatternFlowPfcPauseSrcMetricTag) Reset() { - *x = PatternFlowPfcPauseSrcMetricTag{} +func (x *IsisLspExtendedIpv4ReachabilityTlv) Reset() { + *x = IsisLspExtendedIpv4ReachabilityTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[555] + mi := &file_otg_proto_msgTypes[536] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseSrcMetricTag) String() string { +func (x *IsisLspExtendedIpv4ReachabilityTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseSrcMetricTag) ProtoMessage() {} +func (*IsisLspExtendedIpv4ReachabilityTlv) ProtoMessage() {} -func (x *PatternFlowPfcPauseSrcMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[555] +func (x *IsisLspExtendedIpv4ReachabilityTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[536] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69133,74 +70227,57 @@ func (x *PatternFlowPfcPauseSrcMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseSrcMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseSrcMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{555} -} - -func (x *PatternFlowPfcPauseSrcMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatternFlowPfcPauseSrcMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset - } - return 0 +// Deprecated: Use IsisLspExtendedIpv4ReachabilityTlv.ProtoReflect.Descriptor instead. +func (*IsisLspExtendedIpv4ReachabilityTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{536} } -func (x *PatternFlowPfcPauseSrcMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *IsisLspExtendedIpv4ReachabilityTlv) GetPrefixes() []*IsisLspExtendedV4Prefix { + if x != nil { + return x.Prefixes } - return 0 + return nil } -// Source MAC address -type PatternFlowPfcPauseSrc struct { +// This group defines attributes of an IPv4 standard prefix. +type IsisLspExtendedV4Prefix struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // An IPv4 unicast prefix reachable via the originator of this LSP. + Ipv4Address *string `protobuf:"bytes,1,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` + // The length of the IPv4 prefix. + PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` + // ISIS wide metric. + Metric *uint32 `protobuf:"varint,3,opt,name=metric,proto3,oneof" json:"metric,omitempty"` + // Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, + // and for all other prefixes in L1 and L2 LSPs. (default) + // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. + // The prefixes are being advertised from a higher level (L2) down to a lower level + // (L1). + RedistributionType *IsisLspExtendedV4Prefix_RedistributionType_Enum `protobuf:"varint,4,opt,name=redistribution_type,json=redistributionType,proto3,enum=otg.IsisLspExtendedV4Prefix_RedistributionType_Enum,oneof" json:"redistribution_type,omitempty"` // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowPfcPauseSrc_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPauseSrc_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 00:00:00:00:00:00 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = ['00:00:00:00:00:00'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowPfcPauseSrcCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowPfcPauseSrcCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPfcPauseSrcMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + PrefixAttributes *IsisLspPrefixAttributes `protobuf:"bytes,5,opt,name=prefix_attributes,json=prefixAttributes,proto3" json:"prefix_attributes,omitempty"` } -func (x *PatternFlowPfcPauseSrc) Reset() { - *x = PatternFlowPfcPauseSrc{} +func (x *IsisLspExtendedV4Prefix) Reset() { + *x = IsisLspExtendedV4Prefix{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[556] + mi := &file_otg_proto_msgTypes[537] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseSrc) String() string { +func (x *IsisLspExtendedV4Prefix) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseSrc) ProtoMessage() {} +func (*IsisLspExtendedV4Prefix) ProtoMessage() {} -func (x *PatternFlowPfcPauseSrc) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[556] +func (x *IsisLspExtendedV4Prefix) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[537] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69211,87 +70288,74 @@ func (x *PatternFlowPfcPauseSrc) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseSrc.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseSrc) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{556} -} - -func (x *PatternFlowPfcPauseSrc) GetChoice() PatternFlowPfcPauseSrc_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowPfcPauseSrc_Choice_unspecified +// Deprecated: Use IsisLspExtendedV4Prefix.ProtoReflect.Descriptor instead. +func (*IsisLspExtendedV4Prefix) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{537} } -func (x *PatternFlowPfcPauseSrc) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value +func (x *IsisLspExtendedV4Prefix) GetIpv4Address() string { + if x != nil && x.Ipv4Address != nil { + return *x.Ipv4Address } return "" } -func (x *PatternFlowPfcPauseSrc) GetValues() []string { - if x != nil { - return x.Values +func (x *IsisLspExtendedV4Prefix) GetPrefixLength() uint32 { + if x != nil && x.PrefixLength != nil { + return *x.PrefixLength } - return nil + return 0 } -func (x *PatternFlowPfcPauseSrc) GetIncrement() *PatternFlowPfcPauseSrcCounter { - if x != nil { - return x.Increment +func (x *IsisLspExtendedV4Prefix) GetMetric() uint32 { + if x != nil && x.Metric != nil { + return *x.Metric } - return nil + return 0 } -func (x *PatternFlowPfcPauseSrc) GetDecrement() *PatternFlowPfcPauseSrcCounter { - if x != nil { - return x.Decrement +func (x *IsisLspExtendedV4Prefix) GetRedistributionType() IsisLspExtendedV4Prefix_RedistributionType_Enum { + if x != nil && x.RedistributionType != nil { + return *x.RedistributionType } - return nil + return IsisLspExtendedV4Prefix_RedistributionType_unspecified } -func (x *PatternFlowPfcPauseSrc) GetMetricTags() []*PatternFlowPfcPauseSrcMetricTag { +func (x *IsisLspExtendedV4Prefix) GetPrefixAttributes() *IsisLspPrefixAttributes { if x != nil { - return x.MetricTags + return x.PrefixAttributes } return nil } -// integer counter pattern -type PatternFlowPfcPauseEtherTypeCounter struct { +// It defines list of IPv6 extended reachability information in one IPv6 Reachability +// TLV. +type IsisLspIpv6ReachabilityTlv struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 34824 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // IPv6 prefix contained within reachability TLVs. + Prefixes []*IsisLspV6Prefix `protobuf:"bytes,1,rep,name=prefixes,proto3" json:"prefixes,omitempty"` } -func (x *PatternFlowPfcPauseEtherTypeCounter) Reset() { - *x = PatternFlowPfcPauseEtherTypeCounter{} +func (x *IsisLspIpv6ReachabilityTlv) Reset() { + *x = IsisLspIpv6ReachabilityTlv{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[557] + mi := &file_otg_proto_msgTypes[538] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseEtherTypeCounter) String() string { +func (x *IsisLspIpv6ReachabilityTlv) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseEtherTypeCounter) ProtoMessage() {} +func (*IsisLspIpv6ReachabilityTlv) ProtoMessage() {} -func (x *PatternFlowPfcPauseEtherTypeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[557] +func (x *IsisLspIpv6ReachabilityTlv) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[538] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69302,70 +70366,63 @@ func (x *PatternFlowPfcPauseEtherTypeCounter) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseEtherTypeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseEtherTypeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{557} +// Deprecated: Use IsisLspIpv6ReachabilityTlv.ProtoReflect.Descriptor instead. +func (*IsisLspIpv6ReachabilityTlv) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{538} } -func (x *PatternFlowPfcPauseEtherTypeCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *IsisLspIpv6ReachabilityTlv) GetPrefixes() []*IsisLspV6Prefix { + if x != nil { + return x.Prefixes } - return 0 + return nil } -func (x *PatternFlowPfcPauseEtherTypeCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step - } - return 0 -} +// It defines attributes of an IPv6 standard prefix. +type IsisLspV6Prefix struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *PatternFlowPfcPauseEtherTypeCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count - } - return 0 -} - -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowPfcPauseEtherTypeMetricTag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // An IPv6 unicast prefix reachable via the originator of this LSP. + Ipv6Address *string `protobuf:"bytes,1,opt,name=ipv6_address,json=ipv6Address,proto3,oneof" json:"ipv6_address,omitempty"` + // The length of the IPv6 prefix. + PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` + // ISIS wide metric. + Metric *uint32 `protobuf:"varint,3,opt,name=metric,proto3,oneof" json:"metric,omitempty"` + // Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, + // and for all other prefixes in L1 and L2 LSPs. (default) + // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. + // The prefixes are being advertised from a higher level (L2) down to a lower level + // (L1). + RedistributionType *IsisLspV6Prefix_RedistributionType_Enum `protobuf:"varint,4,opt,name=redistribution_type,json=redistributionType,proto3,enum=otg.IsisLspV6Prefix_RedistributionType_Enum,oneof" json:"redistribution_type,omitempty"` + // The origin of the advertised route-internal or external to the ISIS area. Options + // include the following: + // Internal-for intra-area routes, through Level 1 LSPs. + // External-for inter-area routes redistributed within L1, through Level + // 1 LSPs. + OriginType *IsisLspV6Prefix_OriginType_Enum `protobuf:"varint,5,opt,name=origin_type,json=originType,proto3,enum=otg.IsisLspV6Prefix_OriginType_Enum,oneof" json:"origin_type,omitempty"` + // Description missing in models + PrefixAttributes *IsisLspPrefixAttributes `protobuf:"bytes,6,opt,name=prefix_attributes,json=prefixAttributes,proto3" json:"prefix_attributes,omitempty"` } -func (x *PatternFlowPfcPauseEtherTypeMetricTag) Reset() { - *x = PatternFlowPfcPauseEtherTypeMetricTag{} +func (x *IsisLspV6Prefix) Reset() { + *x = IsisLspV6Prefix{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[558] + mi := &file_otg_proto_msgTypes[539] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseEtherTypeMetricTag) String() string { +func (x *IsisLspV6Prefix) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseEtherTypeMetricTag) ProtoMessage() {} +func (*IsisLspV6Prefix) ProtoMessage() {} -func (x *PatternFlowPfcPauseEtherTypeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[558] +func (x *IsisLspV6Prefix) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[539] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69376,74 +70433,85 @@ func (x *PatternFlowPfcPauseEtherTypeMetricTag) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseEtherTypeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseEtherTypeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{558} +// Deprecated: Use IsisLspV6Prefix.ProtoReflect.Descriptor instead. +func (*IsisLspV6Prefix) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{539} } -func (x *PatternFlowPfcPauseEtherTypeMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *IsisLspV6Prefix) GetIpv6Address() string { + if x != nil && x.Ipv6Address != nil { + return *x.Ipv6Address } return "" } -func (x *PatternFlowPfcPauseEtherTypeMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *IsisLspV6Prefix) GetPrefixLength() uint32 { + if x != nil && x.PrefixLength != nil { + return *x.PrefixLength } return 0 } -func (x *PatternFlowPfcPauseEtherTypeMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *IsisLspV6Prefix) GetMetric() uint32 { + if x != nil && x.Metric != nil { + return *x.Metric } return 0 } -// Ethernet type -type PatternFlowPfcPauseEtherType struct { +func (x *IsisLspV6Prefix) GetRedistributionType() IsisLspV6Prefix_RedistributionType_Enum { + if x != nil && x.RedistributionType != nil { + return *x.RedistributionType + } + return IsisLspV6Prefix_RedistributionType_unspecified +} + +func (x *IsisLspV6Prefix) GetOriginType() IsisLspV6Prefix_OriginType_Enum { + if x != nil && x.OriginType != nil { + return *x.OriginType + } + return IsisLspV6Prefix_OriginType_unspecified +} + +func (x *IsisLspV6Prefix) GetPrefixAttributes() *IsisLspPrefixAttributes { + if x != nil { + return x.PrefixAttributes + } + return nil +} + +// This contains the properties of ISIS Prefix attributes for the extended IPv4 and +// IPv6 reachability. https://www.rfc-editor.org/rfc/rfc7794.html +type IsisLspPrefixAttributes struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowPfcPauseEtherType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPauseEtherType_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 34824 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [34824] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowPfcPauseEtherTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowPfcPauseEtherTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPfcPauseEtherTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // External Prefix Flag (Bit 0) + XFlag *bool `protobuf:"varint,1,opt,name=x_flag,json=xFlag,proto3,oneof" json:"x_flag,omitempty"` + // Re-advertisement Flag (Bit 1) + RFlag *bool `protobuf:"varint,2,opt,name=r_flag,json=rFlag,proto3,oneof" json:"r_flag,omitempty"` + // Node Flag (Bit 2) + NFlag *bool `protobuf:"varint,3,opt,name=n_flag,json=nFlag,proto3,oneof" json:"n_flag,omitempty"` } -func (x *PatternFlowPfcPauseEtherType) Reset() { - *x = PatternFlowPfcPauseEtherType{} +func (x *IsisLspPrefixAttributes) Reset() { + *x = IsisLspPrefixAttributes{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[559] + mi := &file_otg_proto_msgTypes[540] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseEtherType) String() string { +func (x *IsisLspPrefixAttributes) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseEtherType) ProtoMessage() {} +func (*IsisLspPrefixAttributes) ProtoMessage() {} -func (x *PatternFlowPfcPauseEtherType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[559] +func (x *IsisLspPrefixAttributes) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[540] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69454,87 +70522,70 @@ func (x *PatternFlowPfcPauseEtherType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseEtherType.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseEtherType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{559} -} - -func (x *PatternFlowPfcPauseEtherType) GetChoice() PatternFlowPfcPauseEtherType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowPfcPauseEtherType_Choice_unspecified -} - -func (x *PatternFlowPfcPauseEtherType) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowPfcPauseEtherType) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil +// Deprecated: Use IsisLspPrefixAttributes.ProtoReflect.Descriptor instead. +func (*IsisLspPrefixAttributes) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{540} } -func (x *PatternFlowPfcPauseEtherType) GetIncrement() *PatternFlowPfcPauseEtherTypeCounter { - if x != nil { - return x.Increment +func (x *IsisLspPrefixAttributes) GetXFlag() bool { + if x != nil && x.XFlag != nil { + return *x.XFlag } - return nil + return false } -func (x *PatternFlowPfcPauseEtherType) GetDecrement() *PatternFlowPfcPauseEtherTypeCounter { - if x != nil { - return x.Decrement +func (x *IsisLspPrefixAttributes) GetRFlag() bool { + if x != nil && x.RFlag != nil { + return *x.RFlag } - return nil + return false } -func (x *PatternFlowPfcPauseEtherType) GetMetricTags() []*PatternFlowPfcPauseEtherTypeMetricTag { - if x != nil { - return x.MetricTags +func (x *IsisLspPrefixAttributes) GetNFlag() bool { + if x != nil && x.NFlag != nil { + return *x.NFlag } - return nil + return false } -// integer counter pattern -type PatternFlowPfcPauseControlOpCodeCounter struct { +// The request to retrieve LLDP neighbor information for a given instance. +type LldpNeighborsStateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 257 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The names of LLDP instances for which neighbor information will be retrieved. If + // no names are specified then the results will contain neighbor information for all + // configured LLDP instances. + // + // x-constraint: + // - /components/schemas/Lldp/properties/name + // + // x-constraint: + // - /components/schemas/Lldp/properties/name + LldpNames []string `protobuf:"bytes,1,rep,name=lldp_names,json=lldpNames,proto3" json:"lldp_names,omitempty"` + // Specify the neighbors for which information will be returned. If empty or missing + // then information for all neighbors will be returned. + NeighborIdFilters []string `protobuf:"bytes,2,rep,name=neighbor_id_filters,json=neighborIdFilters,proto3" json:"neighbor_id_filters,omitempty"` } -func (x *PatternFlowPfcPauseControlOpCodeCounter) Reset() { - *x = PatternFlowPfcPauseControlOpCodeCounter{} +func (x *LldpNeighborsStateRequest) Reset() { + *x = LldpNeighborsStateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[560] + mi := &file_otg_proto_msgTypes[541] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseControlOpCodeCounter) String() string { +func (x *LldpNeighborsStateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseControlOpCodeCounter) ProtoMessage() {} +func (*LldpNeighborsStateRequest) ProtoMessage() {} -func (x *PatternFlowPfcPauseControlOpCodeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[560] +func (x *LldpNeighborsStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[541] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69545,70 +70596,101 @@ func (x *PatternFlowPfcPauseControlOpCodeCounter) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseControlOpCodeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseControlOpCodeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{560} -} - -func (x *PatternFlowPfcPauseControlOpCodeCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use LldpNeighborsStateRequest.ProtoReflect.Descriptor instead. +func (*LldpNeighborsStateRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{541} } -func (x *PatternFlowPfcPauseControlOpCodeCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *LldpNeighborsStateRequest) GetLldpNames() []string { + if x != nil { + return x.LldpNames } - return 0 + return nil } -func (x *PatternFlowPfcPauseControlOpCodeCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *LldpNeighborsStateRequest) GetNeighborIdFilters() []string { + if x != nil { + return x.NeighborIdFilters } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowPfcPauseControlOpCodeMetricTag struct { +// LLDP neighbor information. +type LldpNeighborsState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The name of the LLDP instance. + LldpName *string `protobuf:"bytes,1,opt,name=lldp_name,json=lldpName,proto3,oneof" json:"lldp_name,omitempty"` + // The system name field shall contain an alpha-numeric string that indicates the system's + // administratively assigned name. The system name should be the system's fully qualified + // domain name. If implementations support IETF RFC 3418, the sysName object should + // be used for this field. + SystemName *string `protobuf:"bytes,2,opt,name=system_name,json=systemName,proto3,oneof" json:"system_name,omitempty"` + // The system description field shall contain an alpha-numeric string that is the textual + // description of the network entity. The system description should include the full + // name and version identification of the system's hardware type, software operating + // system, and networking software. If implementations support IETF RFC 3418, the sysDescr + // object should be used for this field. + SystemDescription *string `protobuf:"bytes,3,opt,name=system_description,json=systemDescription,proto3,oneof" json:"system_description,omitempty"` + // The Chassis ID is a mandatory TLV which identifies the chassis component of the + // endpoint identifier associated with the transmitting LLDP agent. + ChassisId *string `protobuf:"bytes,4,opt,name=chassis_id,json=chassisId,proto3,oneof" json:"chassis_id,omitempty"` + // This field identifies the format and source of the chassis identifier string. It + // is an enumerator defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. + ChassisIdType *LldpNeighborsState_ChassisIdType_Enum `protobuf:"varint,5,opt,name=chassis_id_type,json=chassisIdType,proto3,enum=otg.LldpNeighborsState_ChassisIdType_Enum,oneof" json:"chassis_id_type,omitempty"` + // System generated identifier for the neighbor on the LLDP instance. + NeighborId *string `protobuf:"bytes,6,opt,name=neighbor_id,json=neighborId,proto3,oneof" json:"neighbor_id,omitempty"` + // Age since discovery in seconds. + Age *uint32 `protobuf:"varint,7,opt,name=age,proto3,oneof" json:"age,omitempty"` + // Seconds since last update received. + LastUpdate *uint32 `protobuf:"varint,8,opt,name=last_update,json=lastUpdate,proto3,oneof" json:"last_update,omitempty"` + // The time-to-live (TTL) in seconds is a mandatory TLV which indicates how long information + // from the neighbor should be considered valid. + Ttl *uint32 `protobuf:"varint,9,opt,name=ttl,proto3,oneof" json:"ttl,omitempty"` + // The Port ID is a mandatory TLV which identifies the port component of the endpoint + // identifier associated with the transmitting LLDP agent. If the specified port is + // an IEEE 802.3 Repeater port, then this TLV is optional. + PortId *string `protobuf:"bytes,10,opt,name=port_id,json=portId,proto3,oneof" json:"port_id,omitempty"` + // This field identifies the format and source of the port identifier string. It is + // an enumerator defined by the PtopoPortIdType object from RFC2922. + PortIdType *LldpNeighborsState_PortIdType_Enum `protobuf:"varint,11,opt,name=port_id_type,json=portIdType,proto3,enum=otg.LldpNeighborsState_PortIdType_Enum,oneof" json:"port_id_type,omitempty"` + // The binary string containing the actual port identifier for the port which this LLDP + // PDU was transmitted. The source and format of this field is defined by PtopoPortId + // from RFC2922. + PortDescription *string `protobuf:"bytes,12,opt,name=port_description,json=portDescription,proto3,oneof" json:"port_description,omitempty"` + // The Management Address is a mandatory TLV which identifies a network address associated + // with the local LLDP agent, which can be used to reach the agent on the port identified + // in the Port ID TLV. + ManagementAddress *string `protobuf:"bytes,13,opt,name=management_address,json=managementAddress,proto3,oneof" json:"management_address,omitempty"` + // The enumerated value for the network address type identified in this TLV. This enumeration + // is defined in the 'Assigned Numbers' RFC [RFC3232] and the ianaAddressFamilyNumbers + // object. + ManagementAddressType *string `protobuf:"bytes,14,opt,name=management_address_type,json=managementAddressType,proto3,oneof" json:"management_address_type,omitempty"` + // Description missing in models + CustomTlvs []*LldpCustomTLVState `protobuf:"bytes,15,rep,name=custom_tlvs,json=customTlvs,proto3" json:"custom_tlvs,omitempty"` + // Description missing in models + Capabilities []*LldpCapabilityState `protobuf:"bytes,16,rep,name=capabilities,proto3" json:"capabilities,omitempty"` } -func (x *PatternFlowPfcPauseControlOpCodeMetricTag) Reset() { - *x = PatternFlowPfcPauseControlOpCodeMetricTag{} +func (x *LldpNeighborsState) Reset() { + *x = LldpNeighborsState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[561] + mi := &file_otg_proto_msgTypes[542] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseControlOpCodeMetricTag) String() string { +func (x *LldpNeighborsState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseControlOpCodeMetricTag) ProtoMessage() {} +func (*LldpNeighborsState) ProtoMessage() {} -func (x *PatternFlowPfcPauseControlOpCodeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[561] +func (x *LldpNeighborsState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[542] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69619,165 +70701,163 @@ func (x *PatternFlowPfcPauseControlOpCodeMetricTag) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseControlOpCodeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseControlOpCodeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{561} +// Deprecated: Use LldpNeighborsState.ProtoReflect.Descriptor instead. +func (*LldpNeighborsState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{542} } -func (x *PatternFlowPfcPauseControlOpCodeMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *LldpNeighborsState) GetLldpName() string { + if x != nil && x.LldpName != nil { + return *x.LldpName } return "" } -func (x *PatternFlowPfcPauseControlOpCodeMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *LldpNeighborsState) GetSystemName() string { + if x != nil && x.SystemName != nil { + return *x.SystemName } - return 0 + return "" } -func (x *PatternFlowPfcPauseControlOpCodeMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *LldpNeighborsState) GetSystemDescription() string { + if x != nil && x.SystemDescription != nil { + return *x.SystemDescription } - return 0 + return "" } -// Control operation code -type PatternFlowPfcPauseControlOpCode struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *LldpNeighborsState) GetChassisId() string { + if x != nil && x.ChassisId != nil { + return *x.ChassisId + } + return "" +} - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowPfcPauseControlOpCode_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPauseControlOpCode_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 257 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [257] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowPfcPauseControlOpCodeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowPfcPauseControlOpCodeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPfcPauseControlOpCodeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` +func (x *LldpNeighborsState) GetChassisIdType() LldpNeighborsState_ChassisIdType_Enum { + if x != nil && x.ChassisIdType != nil { + return *x.ChassisIdType + } + return LldpNeighborsState_ChassisIdType_unspecified } -func (x *PatternFlowPfcPauseControlOpCode) Reset() { - *x = PatternFlowPfcPauseControlOpCode{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[562] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *LldpNeighborsState) GetNeighborId() string { + if x != nil && x.NeighborId != nil { + return *x.NeighborId } + return "" } -func (x *PatternFlowPfcPauseControlOpCode) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *LldpNeighborsState) GetAge() uint32 { + if x != nil && x.Age != nil { + return *x.Age + } + return 0 } -func (*PatternFlowPfcPauseControlOpCode) ProtoMessage() {} +func (x *LldpNeighborsState) GetLastUpdate() uint32 { + if x != nil && x.LastUpdate != nil { + return *x.LastUpdate + } + return 0 +} -func (x *PatternFlowPfcPauseControlOpCode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[562] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *LldpNeighborsState) GetTtl() uint32 { + if x != nil && x.Ttl != nil { + return *x.Ttl } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use PatternFlowPfcPauseControlOpCode.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseControlOpCode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{562} +func (x *LldpNeighborsState) GetPortId() string { + if x != nil && x.PortId != nil { + return *x.PortId + } + return "" } -func (x *PatternFlowPfcPauseControlOpCode) GetChoice() PatternFlowPfcPauseControlOpCode_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *LldpNeighborsState) GetPortIdType() LldpNeighborsState_PortIdType_Enum { + if x != nil && x.PortIdType != nil { + return *x.PortIdType } - return PatternFlowPfcPauseControlOpCode_Choice_unspecified + return LldpNeighborsState_PortIdType_unspecified } -func (x *PatternFlowPfcPauseControlOpCode) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *LldpNeighborsState) GetPortDescription() string { + if x != nil && x.PortDescription != nil { + return *x.PortDescription } - return 0 + return "" } -func (x *PatternFlowPfcPauseControlOpCode) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *LldpNeighborsState) GetManagementAddress() string { + if x != nil && x.ManagementAddress != nil { + return *x.ManagementAddress } - return nil + return "" } -func (x *PatternFlowPfcPauseControlOpCode) GetIncrement() *PatternFlowPfcPauseControlOpCodeCounter { - if x != nil { - return x.Increment +func (x *LldpNeighborsState) GetManagementAddressType() string { + if x != nil && x.ManagementAddressType != nil { + return *x.ManagementAddressType } - return nil + return "" } -func (x *PatternFlowPfcPauseControlOpCode) GetDecrement() *PatternFlowPfcPauseControlOpCodeCounter { +func (x *LldpNeighborsState) GetCustomTlvs() []*LldpCustomTLVState { if x != nil { - return x.Decrement + return x.CustomTlvs } return nil } -func (x *PatternFlowPfcPauseControlOpCode) GetMetricTags() []*PatternFlowPfcPauseControlOpCodeMetricTag { +func (x *LldpNeighborsState) GetCapabilities() []*LldpCapabilityState { if x != nil { - return x.MetricTags + return x.Capabilities } return nil } -// integer counter pattern -type PatternFlowPfcPauseClassEnableVectorCounter struct { +// Custom TLV received from a neighbor.Custom TLVs are organization specific TLVs advertised +// with TLV type 127. +type LldpCustomTLVState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The integer value identifying the type of information contained in the value field. + CustomType *uint32 `protobuf:"varint,1,opt,name=custom_type,json=customType,proto3,oneof" json:"custom_type,omitempty"` + // The organizationally unique identifier field shall contain the organization's OUI + // as defined in Clause 9 of IEEE Std 802. The high-order octet is 0 and the low-order + // 3 octets are the SMI Network Management Private Enterprise Code of the Vendor in + // network byte order, as defined in the 'Assigned Numbers' RFC [RFC3232]. + Oui *string `protobuf:"bytes,2,opt,name=oui,proto3,oneof" json:"oui,omitempty"` + // The organizationally defined subtype field shall contain a unique subtype value assigned + // by the defining organization. + OuiSubtype *uint32 `protobuf:"varint,3,opt,name=oui_subtype,json=ouiSubtype,proto3,oneof" json:"oui_subtype,omitempty"` + // Contains information on the remaining bytes of the received Organization-Specific + // TLV after the sub-type field. The value must be returned in lowercase hexadecimal + // format. + Information *string `protobuf:"bytes,4,opt,name=information,proto3,oneof" json:"information,omitempty"` } -func (x *PatternFlowPfcPauseClassEnableVectorCounter) Reset() { - *x = PatternFlowPfcPauseClassEnableVectorCounter{} +func (x *LldpCustomTLVState) Reset() { + *x = LldpCustomTLVState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[563] + mi := &file_otg_proto_msgTypes[543] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseClassEnableVectorCounter) String() string { +func (x *LldpCustomTLVState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseClassEnableVectorCounter) ProtoMessage() {} +func (*LldpCustomTLVState) ProtoMessage() {} -func (x *PatternFlowPfcPauseClassEnableVectorCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[563] +func (x *LldpCustomTLVState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[543] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69788,70 +70868,70 @@ func (x *PatternFlowPfcPauseClassEnableVectorCounter) ProtoReflect() protoreflec return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseClassEnableVectorCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseClassEnableVectorCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{563} +// Deprecated: Use LldpCustomTLVState.ProtoReflect.Descriptor instead. +func (*LldpCustomTLVState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{543} } -func (x *PatternFlowPfcPauseClassEnableVectorCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *LldpCustomTLVState) GetCustomType() uint32 { + if x != nil && x.CustomType != nil { + return *x.CustomType } return 0 } -func (x *PatternFlowPfcPauseClassEnableVectorCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *LldpCustomTLVState) GetOui() string { + if x != nil && x.Oui != nil { + return *x.Oui } - return 0 + return "" } -func (x *PatternFlowPfcPauseClassEnableVectorCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *LldpCustomTLVState) GetOuiSubtype() uint32 { + if x != nil && x.OuiSubtype != nil { + return *x.OuiSubtype } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowPfcPauseClassEnableVectorMetricTag struct { +func (x *LldpCustomTLVState) GetInformation() string { + if x != nil && x.Information != nil { + return *x.Information + } + return "" +} + +// LLDP system capability advertised by the neighbor +type LldpCapabilityState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // Name of the system capability advertised by the neighbor. Capabilities are represented + // in a bitmap that defines the primary functions of the system. The capabilities are + // defined in IEEE 802.1AB. + CapabilityName *LldpCapabilityState_CapabilityName_Enum `protobuf:"varint,1,opt,name=capability_name,json=capabilityName,proto3,enum=otg.LldpCapabilityState_CapabilityName_Enum,oneof" json:"capability_name,omitempty"` + // Indicates whether the corresponding system capability is enabled on the neighbor. + CapabilityEnabled *bool `protobuf:"varint,2,opt,name=capability_enabled,json=capabilityEnabled,proto3,oneof" json:"capability_enabled,omitempty"` } -func (x *PatternFlowPfcPauseClassEnableVectorMetricTag) Reset() { - *x = PatternFlowPfcPauseClassEnableVectorMetricTag{} +func (x *LldpCapabilityState) Reset() { + *x = LldpCapabilityState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[564] + mi := &file_otg_proto_msgTypes[544] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseClassEnableVectorMetricTag) String() string { +func (x *LldpCapabilityState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseClassEnableVectorMetricTag) ProtoMessage() {} +func (*LldpCapabilityState) ProtoMessage() {} -func (x *PatternFlowPfcPauseClassEnableVectorMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[564] +func (x *LldpCapabilityState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[544] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69862,74 +70942,60 @@ func (x *PatternFlowPfcPauseClassEnableVectorMetricTag) ProtoReflect() protorefl return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseClassEnableVectorMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseClassEnableVectorMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{564} -} - -func (x *PatternFlowPfcPauseClassEnableVectorMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" +// Deprecated: Use LldpCapabilityState.ProtoReflect.Descriptor instead. +func (*LldpCapabilityState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{544} } -func (x *PatternFlowPfcPauseClassEnableVectorMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *LldpCapabilityState) GetCapabilityName() LldpCapabilityState_CapabilityName_Enum { + if x != nil && x.CapabilityName != nil { + return *x.CapabilityName } - return 0 + return LldpCapabilityState_CapabilityName_unspecified } -func (x *PatternFlowPfcPauseClassEnableVectorMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *LldpCapabilityState) GetCapabilityEnabled() bool { + if x != nil && x.CapabilityEnabled != nil { + return *x.CapabilityEnabled } - return 0 + return false } -// Destination -type PatternFlowPfcPauseClassEnableVector struct { +// The request to retrieve RSVP Label Switched Path (LSP) information learned by the +// router. +type RsvpLspsStateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowPfcPauseClassEnableVector_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPauseClassEnableVector_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowPfcPauseClassEnableVectorCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowPfcPauseClassEnableVectorCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPfcPauseClassEnableVectorMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The names of RSVP-TE routers for which learned information is requested. An empty + // list will return results for all RSVP=TE routers. + // + // x-constraint: + // - /components/schemas/Device.Rsvp/properties/name + // + // x-constraint: + // - /components/schemas/Device.Rsvp/properties/name + RsvpRouterNames []string `protobuf:"bytes,1,rep,name=rsvp_router_names,json=rsvpRouterNames,proto3" json:"rsvp_router_names,omitempty"` } -func (x *PatternFlowPfcPauseClassEnableVector) Reset() { - *x = PatternFlowPfcPauseClassEnableVector{} +func (x *RsvpLspsStateRequest) Reset() { + *x = RsvpLspsStateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[565] + mi := &file_otg_proto_msgTypes[545] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseClassEnableVector) String() string { +func (x *RsvpLspsStateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseClassEnableVector) ProtoMessage() {} +func (*RsvpLspsStateRequest) ProtoMessage() {} -func (x *PatternFlowPfcPauseClassEnableVector) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[565] +func (x *RsvpLspsStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[545] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69940,87 +71006,47 @@ func (x *PatternFlowPfcPauseClassEnableVector) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseClassEnableVector.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseClassEnableVector) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{565} -} - -func (x *PatternFlowPfcPauseClassEnableVector) GetChoice() PatternFlowPfcPauseClassEnableVector_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowPfcPauseClassEnableVector_Choice_unspecified -} - -func (x *PatternFlowPfcPauseClassEnableVector) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowPfcPauseClassEnableVector) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowPfcPauseClassEnableVector) GetIncrement() *PatternFlowPfcPauseClassEnableVectorCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowPfcPauseClassEnableVector) GetDecrement() *PatternFlowPfcPauseClassEnableVectorCounter { - if x != nil { - return x.Decrement - } - return nil +// Deprecated: Use RsvpLspsStateRequest.ProtoReflect.Descriptor instead. +func (*RsvpLspsStateRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{545} } -func (x *PatternFlowPfcPauseClassEnableVector) GetMetricTags() []*PatternFlowPfcPauseClassEnableVectorMetricTag { +func (x *RsvpLspsStateRequest) GetRsvpRouterNames() []string { if x != nil { - return x.MetricTags + return x.RsvpRouterNames } return nil } -// integer counter pattern -type PatternFlowPfcPausePauseClass0Counter struct { +// Discovered IPv4 Point-to-Point LSPs of a RSVP-TE router. +type RsvpLspsState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The name of the RSVP-TE Router. + RsvpRouterName *string `protobuf:"bytes,1,opt,name=rsvp_router_name,json=rsvpRouterName,proto3,oneof" json:"rsvp_router_name,omitempty"` + // IPv4 Point-to-Point RSVP-TE Discovered LSPs. + Ipv4Lsps []*RsvpIPv4LspState `protobuf:"bytes,2,rep,name=ipv4_lsps,json=ipv4Lsps,proto3" json:"ipv4_lsps,omitempty"` } -func (x *PatternFlowPfcPausePauseClass0Counter) Reset() { - *x = PatternFlowPfcPausePauseClass0Counter{} +func (x *RsvpLspsState) Reset() { + *x = RsvpLspsState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[566] + mi := &file_otg_proto_msgTypes[546] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass0Counter) String() string { +func (x *RsvpLspsState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass0Counter) ProtoMessage() {} +func (*RsvpLspsState) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass0Counter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[566] +func (x *RsvpLspsState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[546] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -70031,70 +71057,60 @@ func (x *PatternFlowPfcPausePauseClass0Counter) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass0Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass0Counter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{566} -} - -func (x *PatternFlowPfcPausePauseClass0Counter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use RsvpLspsState.ProtoReflect.Descriptor instead. +func (*RsvpLspsState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{546} } -func (x *PatternFlowPfcPausePauseClass0Counter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *RsvpLspsState) GetRsvpRouterName() string { + if x != nil && x.RsvpRouterName != nil { + return *x.RsvpRouterName } - return 0 + return "" } -func (x *PatternFlowPfcPausePauseClass0Counter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *RsvpLspsState) GetIpv4Lsps() []*RsvpIPv4LspState { + if x != nil { + return x.Ipv4Lsps } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowPfcPausePauseClass0MetricTag struct { +// IPv4 RSVP-TE Discovered LSPs. +type RsvpIPv4LspState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The origin IPv4 address of RSVP session. + SourceAddress *string `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3,oneof" json:"source_address,omitempty"` + // The IPv4 destination address of RSVP session. + DestinationAddress *string `protobuf:"bytes,2,opt,name=destination_address,json=destinationAddress,proto3,oneof" json:"destination_address,omitempty"` + // It refers to the RSVP LSP properties. + Lsp *RsvpLspState `protobuf:"bytes,3,opt,name=lsp,proto3" json:"lsp,omitempty"` + // It refers to RSVP RRO objects container. + Rros []*RsvpLspIpv4Rro `protobuf:"bytes,4,rep,name=rros,proto3" json:"rros,omitempty"` + // It refers to RSVP ERO objects container. + Eros []*RsvpLspIpv4Ero `protobuf:"bytes,5,rep,name=eros,proto3" json:"eros,omitempty"` } -func (x *PatternFlowPfcPausePauseClass0MetricTag) Reset() { - *x = PatternFlowPfcPausePauseClass0MetricTag{} +func (x *RsvpIPv4LspState) Reset() { + *x = RsvpIPv4LspState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[567] + mi := &file_otg_proto_msgTypes[547] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass0MetricTag) String() string { +func (x *RsvpIPv4LspState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass0MetricTag) ProtoMessage() {} +func (*RsvpIPv4LspState) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass0MetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[567] +func (x *RsvpIPv4LspState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[547] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -70105,74 +71121,90 @@ func (x *PatternFlowPfcPausePauseClass0MetricTag) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass0MetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass0MetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{567} +// Deprecated: Use RsvpIPv4LspState.ProtoReflect.Descriptor instead. +func (*RsvpIPv4LspState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{547} } -func (x *PatternFlowPfcPausePauseClass0MetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *RsvpIPv4LspState) GetSourceAddress() string { + if x != nil && x.SourceAddress != nil { + return *x.SourceAddress } return "" } -func (x *PatternFlowPfcPausePauseClass0MetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *RsvpIPv4LspState) GetDestinationAddress() string { + if x != nil && x.DestinationAddress != nil { + return *x.DestinationAddress } - return 0 + return "" } -func (x *PatternFlowPfcPausePauseClass0MetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *RsvpIPv4LspState) GetLsp() *RsvpLspState { + if x != nil { + return x.Lsp } - return 0 + return nil } -// Pause class 0 -type PatternFlowPfcPausePauseClass0 struct { +func (x *RsvpIPv4LspState) GetRros() []*RsvpLspIpv4Rro { + if x != nil { + return x.Rros + } + return nil +} + +func (x *RsvpIPv4LspState) GetEros() []*RsvpLspIpv4Ero { + if x != nil { + return x.Eros + } + return nil +} + +// IPv4 RSVP-TE Discovered LSPs. +type RsvpLspState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowPfcPausePauseClass0_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass0_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowPfcPausePauseClass0Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowPfcPausePauseClass0Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPfcPausePauseClass0MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The tunnel id of RSVP session which acts as an identifier that remains constant over + // the life of the tunnel. + TunnelId *uint32 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3,oneof" json:"tunnel_id,omitempty"` + // The lsp-id of RSVP session which acts as a differentiator for two lsps originating + // from the same headend, commonly used to distinguish RSVP sessions during make before + // break operations. + LspId *uint32 `protobuf:"varint,2,opt,name=lsp_id,json=lspId,proto3,oneof" json:"lsp_id,omitempty"` + // The value of RSVP-TE Session Name field of the Session Attribute object. + SessionName *string `protobuf:"bytes,3,opt,name=session_name,json=sessionName,proto3,oneof" json:"session_name,omitempty"` + // The label received by RSVP-TE ingress. + LabelIn *uint32 `protobuf:"varint,4,opt,name=label_in,json=labelIn,proto3,oneof" json:"label_in,omitempty"` + // The label assigned by RSVP-TE egress. + LabelOut *uint32 `protobuf:"varint,5,opt,name=label_out,json=labelOut,proto3,oneof" json:"label_out,omitempty"` + // Operational state of the RSVP LSP. + SessionStatus *RsvpLspState_SessionStatus_Enum `protobuf:"varint,6,opt,name=session_status,json=sessionStatus,proto3,enum=otg.RsvpLspState_SessionStatus_Enum,oneof" json:"session_status,omitempty"` + // The reason for the last flap of this RSVP session. + LastFlapReason *RsvpLspState_LastFlapReason_Enum `protobuf:"varint,7,opt,name=last_flap_reason,json=lastFlapReason,proto3,enum=otg.RsvpLspState_LastFlapReason_Enum,oneof" json:"last_flap_reason,omitempty"` + // The tunnel UP time in milli seconds. If the tunnel is DOWN the UP time will be zero. + UpTime *uint64 `protobuf:"varint,8,opt,name=up_time,json=upTime,proto3,oneof" json:"up_time,omitempty"` } -func (x *PatternFlowPfcPausePauseClass0) Reset() { - *x = PatternFlowPfcPausePauseClass0{} +func (x *RsvpLspState) Reset() { + *x = RsvpLspState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[568] + mi := &file_otg_proto_msgTypes[548] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass0) String() string { +func (x *RsvpLspState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass0) ProtoMessage() {} +func (*RsvpLspState) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass0) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[568] +func (x *RsvpLspState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[548] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -70183,87 +71215,104 @@ func (x *PatternFlowPfcPausePauseClass0) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass0.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass0) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{568} +// Deprecated: Use RsvpLspState.ProtoReflect.Descriptor instead. +func (*RsvpLspState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{548} } -func (x *PatternFlowPfcPausePauseClass0) GetChoice() PatternFlowPfcPausePauseClass0_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *RsvpLspState) GetTunnelId() uint32 { + if x != nil && x.TunnelId != nil { + return *x.TunnelId } - return PatternFlowPfcPausePauseClass0_Choice_unspecified + return 0 } -func (x *PatternFlowPfcPausePauseClass0) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *RsvpLspState) GetLspId() uint32 { + if x != nil && x.LspId != nil { + return *x.LspId } return 0 } -func (x *PatternFlowPfcPausePauseClass0) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *RsvpLspState) GetSessionName() string { + if x != nil && x.SessionName != nil { + return *x.SessionName } - return nil + return "" } -func (x *PatternFlowPfcPausePauseClass0) GetIncrement() *PatternFlowPfcPausePauseClass0Counter { - if x != nil { - return x.Increment +func (x *RsvpLspState) GetLabelIn() uint32 { + if x != nil && x.LabelIn != nil { + return *x.LabelIn } - return nil + return 0 } -func (x *PatternFlowPfcPausePauseClass0) GetDecrement() *PatternFlowPfcPausePauseClass0Counter { - if x != nil { - return x.Decrement +func (x *RsvpLspState) GetLabelOut() uint32 { + if x != nil && x.LabelOut != nil { + return *x.LabelOut } - return nil + return 0 } -func (x *PatternFlowPfcPausePauseClass0) GetMetricTags() []*PatternFlowPfcPausePauseClass0MetricTag { - if x != nil { - return x.MetricTags +func (x *RsvpLspState) GetSessionStatus() RsvpLspState_SessionStatus_Enum { + if x != nil && x.SessionStatus != nil { + return *x.SessionStatus } - return nil + return RsvpLspState_SessionStatus_unspecified } -// integer counter pattern -type PatternFlowPfcPausePauseClass1Counter struct { +func (x *RsvpLspState) GetLastFlapReason() RsvpLspState_LastFlapReason_Enum { + if x != nil && x.LastFlapReason != nil { + return *x.LastFlapReason + } + return RsvpLspState_LastFlapReason_unspecified +} + +func (x *RsvpLspState) GetUpTime() uint64 { + if x != nil && x.UpTime != nil { + return *x.UpTime + } + return 0 +} + +// This contains the list of Record Route Object(RRO) objects associated with the traffic +// engineering tunnel. The Record Route Object(RRO) is used in RSVP-TE to record the +// route traversed by the LSP. The RRO might be present in both Path message and Resv +// message, the RRO stores the IP addresses of the routers that the traffic engineering +// tunnel traversed and also the label generated and distributed by the routers. The +// RROs in the Resv message mirrors that of the Path message, the only difference is +// that the RRO in a Resv message records the path information in the reverse direction. +type RsvpLspIpv4Rro struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The IPv4 addresses of the routers that the traffic engineering tunnel traversed. + Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` + // Label reported for RRO hop. When the Label_Recording flag is set in the Session Attribute + // object, nodes doing route recording should include the Label Record subobject containing + // the reported label. + ReportedLabel *uint32 `protobuf:"varint,2,opt,name=reported_label,json=reportedLabel,proto3,oneof" json:"reported_label,omitempty"` } -func (x *PatternFlowPfcPausePauseClass1Counter) Reset() { - *x = PatternFlowPfcPausePauseClass1Counter{} +func (x *RsvpLspIpv4Rro) Reset() { + *x = RsvpLspIpv4Rro{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[569] + mi := &file_otg_proto_msgTypes[549] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass1Counter) String() string { +func (x *RsvpLspIpv4Rro) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass1Counter) ProtoMessage() {} +func (*RsvpLspIpv4Rro) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass1Counter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[569] +func (x *RsvpLspIpv4Rro) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[549] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -70274,70 +71323,60 @@ func (x *PatternFlowPfcPausePauseClass1Counter) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass1Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass1Counter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{569} +// Deprecated: Use RsvpLspIpv4Rro.ProtoReflect.Descriptor instead. +func (*RsvpLspIpv4Rro) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{549} } -func (x *PatternFlowPfcPausePauseClass1Counter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 -} - -func (x *PatternFlowPfcPausePauseClass1Counter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *RsvpLspIpv4Rro) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address } - return 0 + return "" } -func (x *PatternFlowPfcPausePauseClass1Counter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *RsvpLspIpv4Rro) GetReportedLabel() uint32 { + if x != nil && x.ReportedLabel != nil { + return *x.ReportedLabel } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowPfcPausePauseClass1MetricTag struct { +// This contains the list of sub-objects included in the Explicit Route Object(ERO) +// object send in the PATH message from the ingress. These sub-objects contain the intermediate +// hops to be traversed by the LSP while being forwarded towards the egress endpoint. +type RsvpLspIpv4Ero struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The IPv4 prefix indicated by the ERO. Specified only when the ERO hop is an IPv4 + // prefix. + Prefix *string `protobuf:"bytes,1,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` + // The autonomous system number indicated by the ERO. Specified only when the ERO hop + // is an 2 or 4-byte AS number. + Asn *uint32 `protobuf:"varint,2,opt,name=asn,proto3,oneof" json:"asn,omitempty"` + // The type indicated by the ERO. + Type *RsvpLspIpv4Ero_Type_Enum `protobuf:"varint,3,opt,name=type,proto3,enum=otg.RsvpLspIpv4Ero_Type_Enum,oneof" json:"type,omitempty"` } -func (x *PatternFlowPfcPausePauseClass1MetricTag) Reset() { - *x = PatternFlowPfcPausePauseClass1MetricTag{} +func (x *RsvpLspIpv4Ero) Reset() { + *x = RsvpLspIpv4Ero{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[570] + mi := &file_otg_proto_msgTypes[550] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass1MetricTag) String() string { +func (x *RsvpLspIpv4Ero) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass1MetricTag) ProtoMessage() {} +func (*RsvpLspIpv4Ero) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass1MetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[570] +func (x *RsvpLspIpv4Ero) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[550] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -70348,74 +71387,66 @@ func (x *PatternFlowPfcPausePauseClass1MetricTag) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass1MetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass1MetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{570} +// Deprecated: Use RsvpLspIpv4Ero.ProtoReflect.Descriptor instead. +func (*RsvpLspIpv4Ero) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{550} } -func (x *PatternFlowPfcPausePauseClass1MetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *RsvpLspIpv4Ero) GetPrefix() string { + if x != nil && x.Prefix != nil { + return *x.Prefix } return "" } -func (x *PatternFlowPfcPausePauseClass1MetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *RsvpLspIpv4Ero) GetAsn() uint32 { + if x != nil && x.Asn != nil { + return *x.Asn } return 0 } -func (x *PatternFlowPfcPausePauseClass1MetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *RsvpLspIpv4Ero) GetType() RsvpLspIpv4Ero_Type_Enum { + if x != nil && x.Type != nil { + return *x.Type } - return 0 + return RsvpLspIpv4Ero_Type_unspecified } -// Pause class 1 -type PatternFlowPfcPausePauseClass1 struct { +// The request for assigned IPv4 address information associated with DHCP Client sessions. +type Dhcpv4InterfaceStateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowPfcPausePauseClass1_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass1_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowPfcPausePauseClass1Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowPfcPausePauseClass1Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPfcPausePauseClass1MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The names of DHCPv4 client to return results for. An empty list will return results + // for all DHCPv4 Client address information. + // + // x-constraint: + // - /components/schemas/Device.Dhcpv4client/properties/name + // + // x-constraint: + // - /components/schemas/Device.Dhcpv4client/properties/name + DhcpClientNames []string `protobuf:"bytes,1,rep,name=dhcp_client_names,json=dhcpClientNames,proto3" json:"dhcp_client_names,omitempty"` } -func (x *PatternFlowPfcPausePauseClass1) Reset() { - *x = PatternFlowPfcPausePauseClass1{} +func (x *Dhcpv4InterfaceStateRequest) Reset() { + *x = Dhcpv4InterfaceStateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[571] + mi := &file_otg_proto_msgTypes[551] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass1) String() string { +func (x *Dhcpv4InterfaceStateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass1) ProtoMessage() {} +func (*Dhcpv4InterfaceStateRequest) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass1) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[571] +func (x *Dhcpv4InterfaceStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[551] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -70426,87 +71457,57 @@ func (x *PatternFlowPfcPausePauseClass1) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass1.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass1) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{571} -} - -func (x *PatternFlowPfcPausePauseClass1) GetChoice() PatternFlowPfcPausePauseClass1_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowPfcPausePauseClass1_Choice_unspecified -} - -func (x *PatternFlowPfcPausePauseClass1) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowPfcPausePauseClass1) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowPfcPausePauseClass1) GetIncrement() *PatternFlowPfcPausePauseClass1Counter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowPfcPausePauseClass1) GetDecrement() *PatternFlowPfcPausePauseClass1Counter { - if x != nil { - return x.Decrement - } - return nil +// Deprecated: Use Dhcpv4InterfaceStateRequest.ProtoReflect.Descriptor instead. +func (*Dhcpv4InterfaceStateRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{551} } -func (x *PatternFlowPfcPausePauseClass1) GetMetricTags() []*PatternFlowPfcPausePauseClass1MetricTag { +func (x *Dhcpv4InterfaceStateRequest) GetDhcpClientNames() []string { if x != nil { - return x.MetricTags + return x.DhcpClientNames } return nil } -// integer counter pattern -type PatternFlowPfcPausePauseClass2Counter struct { +// The IPv4 address associated with this DHCP Client session. +type Dhcpv4InterfaceState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The name of a DHCPv4 Client. + DhcpClientName *string `protobuf:"bytes,1,opt,name=dhcp_client_name,json=dhcpClientName,proto3,oneof" json:"dhcp_client_name,omitempty"` + // The IPv4 address associated with this DHCP Client session. + Ipv4Address *string `protobuf:"bytes,2,opt,name=ipv4_address,json=ipv4Address,proto3,oneof" json:"ipv4_address,omitempty"` + // The length of the prefix. + PrefixLength *uint32 `protobuf:"varint,3,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` + // The Gateway Ipv4 address associated with this DHCP Client session. + GatewayAddress *string `protobuf:"bytes,4,opt,name=gateway_address,json=gatewayAddress,proto3,oneof" json:"gateway_address,omitempty"` + // The duration of the IPv4 address lease, in seconds. + LeaseTime *uint32 `protobuf:"varint,5,opt,name=lease_time,json=leaseTime,proto3,oneof" json:"lease_time,omitempty"` + // Time in seconds until the DHCPv4 client starts renewing the lease. + RenewTime *uint32 `protobuf:"varint,6,opt,name=renew_time,json=renewTime,proto3,oneof" json:"renew_time,omitempty"` + // Time in seconds until the DHCPv4 client starts rebinding. + RebindTime *uint32 `protobuf:"varint,7,opt,name=rebind_time,json=rebindTime,proto3,oneof" json:"rebind_time,omitempty"` } -func (x *PatternFlowPfcPausePauseClass2Counter) Reset() { - *x = PatternFlowPfcPausePauseClass2Counter{} +func (x *Dhcpv4InterfaceState) Reset() { + *x = Dhcpv4InterfaceState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[572] + mi := &file_otg_proto_msgTypes[552] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass2Counter) String() string { +func (x *Dhcpv4InterfaceState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass2Counter) ProtoMessage() {} +func (*Dhcpv4InterfaceState) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass2Counter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[572] +func (x *Dhcpv4InterfaceState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[552] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -70517,70 +71518,94 @@ func (x *PatternFlowPfcPausePauseClass2Counter) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass2Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass2Counter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{572} +// Deprecated: Use Dhcpv4InterfaceState.ProtoReflect.Descriptor instead. +func (*Dhcpv4InterfaceState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{552} } -func (x *PatternFlowPfcPausePauseClass2Counter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *Dhcpv4InterfaceState) GetDhcpClientName() string { + if x != nil && x.DhcpClientName != nil { + return *x.DhcpClientName + } + return "" +} + +func (x *Dhcpv4InterfaceState) GetIpv4Address() string { + if x != nil && x.Ipv4Address != nil { + return *x.Ipv4Address + } + return "" +} + +func (x *Dhcpv4InterfaceState) GetPrefixLength() uint32 { + if x != nil && x.PrefixLength != nil { + return *x.PrefixLength } return 0 } -func (x *PatternFlowPfcPausePauseClass2Counter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Dhcpv4InterfaceState) GetGatewayAddress() string { + if x != nil && x.GatewayAddress != nil { + return *x.GatewayAddress + } + return "" +} + +func (x *Dhcpv4InterfaceState) GetLeaseTime() uint32 { + if x != nil && x.LeaseTime != nil { + return *x.LeaseTime } return 0 } -func (x *PatternFlowPfcPausePauseClass2Counter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Dhcpv4InterfaceState) GetRenewTime() uint32 { + if x != nil && x.RenewTime != nil { + return *x.RenewTime } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowPfcPausePauseClass2MetricTag struct { +func (x *Dhcpv4InterfaceState) GetRebindTime() uint32 { + if x != nil && x.RebindTime != nil { + return *x.RebindTime + } + return 0 +} + +// The request to retrieve DHCP Server host allocated status. +type Dhcpv4LeaseStateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The names of DHCPv4 server to return results for. An empty list will return results + // for all DHCPv4 servers. + // + // x-constraint: + // - /components/schemas/Device.Dhcpv4server/properties/name + // + // x-constraint: + // - /components/schemas/Device.Dhcpv4server/properties/name + DhcpServerNames []string `protobuf:"bytes,1,rep,name=dhcp_server_names,json=dhcpServerNames,proto3" json:"dhcp_server_names,omitempty"` } -func (x *PatternFlowPfcPausePauseClass2MetricTag) Reset() { - *x = PatternFlowPfcPausePauseClass2MetricTag{} +func (x *Dhcpv4LeaseStateRequest) Reset() { + *x = Dhcpv4LeaseStateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[573] + mi := &file_otg_proto_msgTypes[553] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass2MetricTag) String() string { +func (x *Dhcpv4LeaseStateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass2MetricTag) ProtoMessage() {} +func (*Dhcpv4LeaseStateRequest) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass2MetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[573] +func (x *Dhcpv4LeaseStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[553] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -70591,74 +71616,47 @@ func (x *PatternFlowPfcPausePauseClass2MetricTag) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass2MetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass2MetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{573} -} - -func (x *PatternFlowPfcPausePauseClass2MetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatternFlowPfcPausePauseClass2MetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset - } - return 0 +// Deprecated: Use Dhcpv4LeaseStateRequest.ProtoReflect.Descriptor instead. +func (*Dhcpv4LeaseStateRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{553} } -func (x *PatternFlowPfcPausePauseClass2MetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *Dhcpv4LeaseStateRequest) GetDhcpServerNames() []string { + if x != nil { + return x.DhcpServerNames } - return 0 + return nil } -// Pause class 2 -type PatternFlowPfcPausePauseClass2 struct { +// Lease information of DHCP Server. +type Dhcpv4LeasesState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The name of a DHCP Server. + DhcpServerName *string `protobuf:"bytes,1,opt,name=dhcp_server_name,json=dhcpServerName,proto3,oneof" json:"dhcp_server_name,omitempty"` // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowPfcPausePauseClass2_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass2_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowPfcPausePauseClass2Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowPfcPausePauseClass2Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPfcPausePauseClass2MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + Leases []*Dhcpv4LeaseState `protobuf:"bytes,2,rep,name=leases,proto3" json:"leases,omitempty"` } -func (x *PatternFlowPfcPausePauseClass2) Reset() { - *x = PatternFlowPfcPausePauseClass2{} +func (x *Dhcpv4LeasesState) Reset() { + *x = Dhcpv4LeasesState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[574] + mi := &file_otg_proto_msgTypes[554] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass2) String() string { +func (x *Dhcpv4LeasesState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass2) ProtoMessage() {} +func (*Dhcpv4LeasesState) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass2) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[574] +func (x *Dhcpv4LeasesState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[554] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -70669,87 +71667,66 @@ func (x *PatternFlowPfcPausePauseClass2) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass2.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass2) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{574} -} - -func (x *PatternFlowPfcPausePauseClass2) GetChoice() PatternFlowPfcPausePauseClass2_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowPfcPausePauseClass2_Choice_unspecified -} - -func (x *PatternFlowPfcPausePauseClass2) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowPfcPausePauseClass2) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowPfcPausePauseClass2) GetIncrement() *PatternFlowPfcPausePauseClass2Counter { - if x != nil { - return x.Increment - } - return nil +// Deprecated: Use Dhcpv4LeasesState.ProtoReflect.Descriptor instead. +func (*Dhcpv4LeasesState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{554} } -func (x *PatternFlowPfcPausePauseClass2) GetDecrement() *PatternFlowPfcPausePauseClass2Counter { - if x != nil { - return x.Decrement +func (x *Dhcpv4LeasesState) GetDhcpServerName() string { + if x != nil && x.DhcpServerName != nil { + return *x.DhcpServerName } - return nil + return "" } -func (x *PatternFlowPfcPausePauseClass2) GetMetricTags() []*PatternFlowPfcPausePauseClass2MetricTag { +func (x *Dhcpv4LeasesState) GetLeases() []*Dhcpv4LeaseState { if x != nil { - return x.MetricTags + return x.Leases } return nil } -// integer counter pattern -type PatternFlowPfcPausePauseClass3Counter struct { +// IPv4 address lease state. +type Dhcpv4LeaseState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` -} - -func (x *PatternFlowPfcPausePauseClass3Counter) Reset() { - *x = PatternFlowPfcPausePauseClass3Counter{} + // The IPv4 address associated with this lease. + Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` + // The time in seconds after which the IPv4 address lease will expire. + ValidTime *uint32 `protobuf:"varint,2,opt,name=valid_time,json=validTime,proto3,oneof" json:"valid_time,omitempty"` + // The elapsed time in seconds since the address has been renewed. + PreferredTime *uint32 `protobuf:"varint,3,opt,name=preferred_time,json=preferredTime,proto3,oneof" json:"preferred_time,omitempty"` + // Time in seconds until the DHCPv4 client starts renewing the lease. + RenewTime *uint32 `protobuf:"varint,4,opt,name=renew_time,json=renewTime,proto3,oneof" json:"renew_time,omitempty"` + // Time in seconds until the DHCPv4 client starts rebinding. + RebindTime *uint32 `protobuf:"varint,5,opt,name=rebind_time,json=rebindTime,proto3,oneof" json:"rebind_time,omitempty"` + // The ID of the DHCPv4 client holding this lease. + ClientId *string `protobuf:"bytes,6,opt,name=client_id,json=clientId,proto3,oneof" json:"client_id,omitempty"` + // The Circuit ID option found in the last request message. + CircuitId *string `protobuf:"bytes,7,opt,name=circuit_id,json=circuitId,proto3,oneof" json:"circuit_id,omitempty"` + // The Remote ID option found in the last request message. + RemoteId *string `protobuf:"bytes,8,opt,name=remote_id,json=remoteId,proto3,oneof" json:"remote_id,omitempty"` +} + +func (x *Dhcpv4LeaseState) Reset() { + *x = Dhcpv4LeaseState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[575] + mi := &file_otg_proto_msgTypes[555] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass3Counter) String() string { +func (x *Dhcpv4LeaseState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass3Counter) ProtoMessage() {} +func (*Dhcpv4LeaseState) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass3Counter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[575] +func (x *Dhcpv4LeaseState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[555] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -70760,70 +71737,101 @@ func (x *PatternFlowPfcPausePauseClass3Counter) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass3Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass3Counter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{575} +// Deprecated: Use Dhcpv4LeaseState.ProtoReflect.Descriptor instead. +func (*Dhcpv4LeaseState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{555} } -func (x *PatternFlowPfcPausePauseClass3Counter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *Dhcpv4LeaseState) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address + } + return "" +} + +func (x *Dhcpv4LeaseState) GetValidTime() uint32 { + if x != nil && x.ValidTime != nil { + return *x.ValidTime } return 0 } -func (x *PatternFlowPfcPausePauseClass3Counter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Dhcpv4LeaseState) GetPreferredTime() uint32 { + if x != nil && x.PreferredTime != nil { + return *x.PreferredTime } return 0 } -func (x *PatternFlowPfcPausePauseClass3Counter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Dhcpv4LeaseState) GetRenewTime() uint32 { + if x != nil && x.RenewTime != nil { + return *x.RenewTime } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowPfcPausePauseClass3MetricTag struct { +func (x *Dhcpv4LeaseState) GetRebindTime() uint32 { + if x != nil && x.RebindTime != nil { + return *x.RebindTime + } + return 0 +} + +func (x *Dhcpv4LeaseState) GetClientId() string { + if x != nil && x.ClientId != nil { + return *x.ClientId + } + return "" +} + +func (x *Dhcpv4LeaseState) GetCircuitId() string { + if x != nil && x.CircuitId != nil { + return *x.CircuitId + } + return "" +} + +func (x *Dhcpv4LeaseState) GetRemoteId() string { + if x != nil && x.RemoteId != nil { + return *x.RemoteId + } + return "" +} + +// The request for assigned IPv6 address information associated with DHCP Client sessions. +type Dhcpv6InterfaceStateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The names of DHCPv6 client to return results for. An empty list will return results + // for all DHCPv6 Client address information. + // + // x-constraint: + // - /components/schemas/Device.Dhcpv6client/properties/name + // + // x-constraint: + // - /components/schemas/Device.Dhcpv6client/properties/name + DhcpClientNames []string `protobuf:"bytes,1,rep,name=dhcp_client_names,json=dhcpClientNames,proto3" json:"dhcp_client_names,omitempty"` } -func (x *PatternFlowPfcPausePauseClass3MetricTag) Reset() { - *x = PatternFlowPfcPausePauseClass3MetricTag{} +func (x *Dhcpv6InterfaceStateRequest) Reset() { + *x = Dhcpv6InterfaceStateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[576] + mi := &file_otg_proto_msgTypes[556] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass3MetricTag) String() string { +func (x *Dhcpv6InterfaceStateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass3MetricTag) ProtoMessage() {} +func (*Dhcpv6InterfaceStateRequest) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass3MetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[576] +func (x *Dhcpv6InterfaceStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[556] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -70834,74 +71842,49 @@ func (x *PatternFlowPfcPausePauseClass3MetricTag) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass3MetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass3MetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{576} -} - -func (x *PatternFlowPfcPausePauseClass3MetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatternFlowPfcPausePauseClass3MetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset - } - return 0 +// Deprecated: Use Dhcpv6InterfaceStateRequest.ProtoReflect.Descriptor instead. +func (*Dhcpv6InterfaceStateRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{556} } -func (x *PatternFlowPfcPausePauseClass3MetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *Dhcpv6InterfaceStateRequest) GetDhcpClientNames() []string { + if x != nil { + return x.DhcpClientNames } - return 0 + return nil } -// Pause class 3 -type PatternFlowPfcPausePauseClass3 struct { +// The IPv6 address associated with this DHCP Client session. +type Dhcpv6InterfaceState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowPfcPausePauseClass3_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass3_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowPfcPausePauseClass3Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowPfcPausePauseClass3Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPfcPausePauseClass3MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The name of a DHCPv6 Client. + DhcpClientName *string `protobuf:"bytes,1,opt,name=dhcp_client_name,json=dhcpClientName,proto3,oneof" json:"dhcp_client_name,omitempty"` + // The IPv6 IAPD addresses and prefixes associated with this DHCP Client session. + IapdAddresses []*Dhcpv6InterfaceIapd `protobuf:"bytes,2,rep,name=iapd_addresses,json=iapdAddresses,proto3" json:"iapd_addresses,omitempty"` + // The IPv6 IATA/IANA addresses and gateways associated with this DHCP Client session. + IaAddresses []*Dhcpv6InterfaceIa `protobuf:"bytes,3,rep,name=ia_addresses,json=iaAddresses,proto3" json:"ia_addresses,omitempty"` } -func (x *PatternFlowPfcPausePauseClass3) Reset() { - *x = PatternFlowPfcPausePauseClass3{} +func (x *Dhcpv6InterfaceState) Reset() { + *x = Dhcpv6InterfaceState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[577] + mi := &file_otg_proto_msgTypes[557] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass3) String() string { +func (x *Dhcpv6InterfaceState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass3) ProtoMessage() {} +func (*Dhcpv6InterfaceState) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass3) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[577] +func (x *Dhcpv6InterfaceState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[557] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -70912,87 +71895,63 @@ func (x *PatternFlowPfcPausePauseClass3) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass3.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass3) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{577} -} - -func (x *PatternFlowPfcPausePauseClass3) GetChoice() PatternFlowPfcPausePauseClass3_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowPfcPausePauseClass3_Choice_unspecified -} - -func (x *PatternFlowPfcPausePauseClass3) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowPfcPausePauseClass3) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil +// Deprecated: Use Dhcpv6InterfaceState.ProtoReflect.Descriptor instead. +func (*Dhcpv6InterfaceState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{557} } -func (x *PatternFlowPfcPausePauseClass3) GetIncrement() *PatternFlowPfcPausePauseClass3Counter { - if x != nil { - return x.Increment +func (x *Dhcpv6InterfaceState) GetDhcpClientName() string { + if x != nil && x.DhcpClientName != nil { + return *x.DhcpClientName } - return nil + return "" } -func (x *PatternFlowPfcPausePauseClass3) GetDecrement() *PatternFlowPfcPausePauseClass3Counter { +func (x *Dhcpv6InterfaceState) GetIapdAddresses() []*Dhcpv6InterfaceIapd { if x != nil { - return x.Decrement + return x.IapdAddresses } return nil } -func (x *PatternFlowPfcPausePauseClass3) GetMetricTags() []*PatternFlowPfcPausePauseClass3MetricTag { +func (x *Dhcpv6InterfaceState) GetIaAddresses() []*Dhcpv6InterfaceIa { if x != nil { - return x.MetricTags + return x.IaAddresses } return nil } -// integer counter pattern -type PatternFlowPfcPausePauseClass4Counter struct { +// The IPv6 IAPD address and prefix length associated with this DHCP Client session. +type Dhcpv6InterfaceIapd struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The IAPD address associated with this DHCPv6 Client session. + Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` + // The prefix length of the IAPD address associated with this DHCPv6 Client session. + PrefixLength *uint32 `protobuf:"varint,2,opt,name=prefix_length,json=prefixLength,proto3,oneof" json:"prefix_length,omitempty"` + // The duration of the IPv6 address lease, in seconds. + LeaseTime *uint32 `protobuf:"varint,3,opt,name=lease_time,json=leaseTime,proto3,oneof" json:"lease_time,omitempty"` } -func (x *PatternFlowPfcPausePauseClass4Counter) Reset() { - *x = PatternFlowPfcPausePauseClass4Counter{} +func (x *Dhcpv6InterfaceIapd) Reset() { + *x = Dhcpv6InterfaceIapd{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[578] + mi := &file_otg_proto_msgTypes[558] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass4Counter) String() string { +func (x *Dhcpv6InterfaceIapd) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass4Counter) ProtoMessage() {} +func (*Dhcpv6InterfaceIapd) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass4Counter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[578] +func (x *Dhcpv6InterfaceIapd) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[558] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -71003,70 +71962,63 @@ func (x *PatternFlowPfcPausePauseClass4Counter) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass4Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass4Counter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{578} +// Deprecated: Use Dhcpv6InterfaceIapd.ProtoReflect.Descriptor instead. +func (*Dhcpv6InterfaceIapd) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{558} } -func (x *PatternFlowPfcPausePauseClass4Counter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *Dhcpv6InterfaceIapd) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address } - return 0 + return "" } -func (x *PatternFlowPfcPausePauseClass4Counter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Dhcpv6InterfaceIapd) GetPrefixLength() uint32 { + if x != nil && x.PrefixLength != nil { + return *x.PrefixLength } return 0 } -func (x *PatternFlowPfcPausePauseClass4Counter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Dhcpv6InterfaceIapd) GetLeaseTime() uint32 { + if x != nil && x.LeaseTime != nil { + return *x.LeaseTime } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowPfcPausePauseClass4MetricTag struct { +// The IPv6 IATA/IANA address and gateway associated with this DHCP Client session. +type Dhcpv6InterfaceIa struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The address associated with this DHCPv6 Client session. + Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` + // The Gateway address associated with this DHCPv6 Client session. + Gateway *string `protobuf:"bytes,2,opt,name=gateway,proto3,oneof" json:"gateway,omitempty"` + // The duration of the IPv6 address lease, in seconds. + LeaseTime *uint32 `protobuf:"varint,3,opt,name=lease_time,json=leaseTime,proto3,oneof" json:"lease_time,omitempty"` } -func (x *PatternFlowPfcPausePauseClass4MetricTag) Reset() { - *x = PatternFlowPfcPausePauseClass4MetricTag{} +func (x *Dhcpv6InterfaceIa) Reset() { + *x = Dhcpv6InterfaceIa{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[579] + mi := &file_otg_proto_msgTypes[559] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass4MetricTag) String() string { +func (x *Dhcpv6InterfaceIa) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass4MetricTag) ProtoMessage() {} +func (*Dhcpv6InterfaceIa) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass4MetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[579] +func (x *Dhcpv6InterfaceIa) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[559] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -71077,74 +72029,66 @@ func (x *PatternFlowPfcPausePauseClass4MetricTag) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass4MetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass4MetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{579} +// Deprecated: Use Dhcpv6InterfaceIa.ProtoReflect.Descriptor instead. +func (*Dhcpv6InterfaceIa) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{559} } -func (x *PatternFlowPfcPausePauseClass4MetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *Dhcpv6InterfaceIa) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address } return "" } -func (x *PatternFlowPfcPausePauseClass4MetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *Dhcpv6InterfaceIa) GetGateway() string { + if x != nil && x.Gateway != nil { + return *x.Gateway } - return 0 + return "" } -func (x *PatternFlowPfcPausePauseClass4MetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *Dhcpv6InterfaceIa) GetLeaseTime() uint32 { + if x != nil && x.LeaseTime != nil { + return *x.LeaseTime } return 0 } -// Pause class 4 -type PatternFlowPfcPausePauseClass4 struct { +// The request to retrieve DHCP Server host allocated status. +type Dhcpv6LeaseStateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowPfcPausePauseClass4_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass4_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowPfcPausePauseClass4Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowPfcPausePauseClass4Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPfcPausePauseClass4MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The names of DHCPv6 server to return results for. An empty list will return results + // for all DHCPv6 servers. + // + // x-constraint: + // - /components/schemas/Device.Dhcpv6server/properties/name + // + // x-constraint: + // - /components/schemas/Device.Dhcpv6server/properties/name + DhcpServerNames []string `protobuf:"bytes,1,rep,name=dhcp_server_names,json=dhcpServerNames,proto3" json:"dhcp_server_names,omitempty"` } -func (x *PatternFlowPfcPausePauseClass4) Reset() { - *x = PatternFlowPfcPausePauseClass4{} +func (x *Dhcpv6LeaseStateRequest) Reset() { + *x = Dhcpv6LeaseStateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[580] + mi := &file_otg_proto_msgTypes[560] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass4) String() string { +func (x *Dhcpv6LeaseStateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass4) ProtoMessage() {} +func (*Dhcpv6LeaseStateRequest) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass4) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[580] +func (x *Dhcpv6LeaseStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[560] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -71155,87 +72099,117 @@ func (x *PatternFlowPfcPausePauseClass4) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass4.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass4) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{580} +// Deprecated: Use Dhcpv6LeaseStateRequest.ProtoReflect.Descriptor instead. +func (*Dhcpv6LeaseStateRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{560} } -func (x *PatternFlowPfcPausePauseClass4) GetChoice() PatternFlowPfcPausePauseClass4_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *Dhcpv6LeaseStateRequest) GetDhcpServerNames() []string { + if x != nil { + return x.DhcpServerNames } - return PatternFlowPfcPausePauseClass4_Choice_unspecified + return nil } -func (x *PatternFlowPfcPausePauseClass4) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 +// Lease information of DHCP Server. +type Dhcpv6LeasesState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of a DHCP Server. + DhcpServerName *string `protobuf:"bytes,1,opt,name=dhcp_server_name,json=dhcpServerName,proto3,oneof" json:"dhcp_server_name,omitempty"` + // Description missing in models + Leases []*Dhcpv6ServerLeaseState `protobuf:"bytes,2,rep,name=leases,proto3" json:"leases,omitempty"` } -func (x *PatternFlowPfcPausePauseClass4) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *Dhcpv6LeasesState) Reset() { + *x = Dhcpv6LeasesState{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[561] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *PatternFlowPfcPausePauseClass4) GetIncrement() *PatternFlowPfcPausePauseClass4Counter { - if x != nil { - return x.Increment +func (x *Dhcpv6LeasesState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Dhcpv6LeasesState) ProtoMessage() {} + +func (x *Dhcpv6LeasesState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[561] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (x *PatternFlowPfcPausePauseClass4) GetDecrement() *PatternFlowPfcPausePauseClass4Counter { - if x != nil { - return x.Decrement +// Deprecated: Use Dhcpv6LeasesState.ProtoReflect.Descriptor instead. +func (*Dhcpv6LeasesState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{561} +} + +func (x *Dhcpv6LeasesState) GetDhcpServerName() string { + if x != nil && x.DhcpServerName != nil { + return *x.DhcpServerName } - return nil + return "" } -func (x *PatternFlowPfcPausePauseClass4) GetMetricTags() []*PatternFlowPfcPausePauseClass4MetricTag { +func (x *Dhcpv6LeasesState) GetLeases() []*Dhcpv6ServerLeaseState { if x != nil { - return x.MetricTags + return x.Leases } return nil } -// integer counter pattern -type PatternFlowPfcPausePauseClass5Counter struct { +// IPv6 unicast prefix. +type Dhcpv6ServerLeaseState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` -} - -func (x *PatternFlowPfcPausePauseClass5Counter) Reset() { - *x = PatternFlowPfcPausePauseClass5Counter{} + // The IPv6 address associated with this lease. + Address *string `protobuf:"bytes,1,opt,name=address,proto3,oneof" json:"address,omitempty"` + // The time in seconds, IP address lease will expire. + ValidTime *uint32 `protobuf:"varint,2,opt,name=valid_time,json=validTime,proto3,oneof" json:"valid_time,omitempty"` + // The time in seconds, elapsed time since address has been renewed. + PreferredTime *uint32 `protobuf:"varint,3,opt,name=preferred_time,json=preferredTime,proto3,oneof" json:"preferred_time,omitempty"` + // Time in seconds until the DHCPv6 client starts renewing the lease. + RenewTime *uint32 `protobuf:"varint,4,opt,name=renew_time,json=renewTime,proto3,oneof" json:"renew_time,omitempty"` + // Time in seconds until the DHCPv6 client starts rebinding. + RebindTime *uint32 `protobuf:"varint,5,opt,name=rebind_time,json=rebindTime,proto3,oneof" json:"rebind_time,omitempty"` + // The ID of the DHCPv6 client holding this lease. + ClientId *string `protobuf:"bytes,6,opt,name=client_id,json=clientId,proto3,oneof" json:"client_id,omitempty"` + // The Remote ID option found in the last request message. + RemoteId *string `protobuf:"bytes,7,opt,name=remote_id,json=remoteId,proto3,oneof" json:"remote_id,omitempty"` + // The Interface ID option found in the last request message. + InterfaceId *string `protobuf:"bytes,8,opt,name=interface_id,json=interfaceId,proto3,oneof" json:"interface_id,omitempty"` +} + +func (x *Dhcpv6ServerLeaseState) Reset() { + *x = Dhcpv6ServerLeaseState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[581] + mi := &file_otg_proto_msgTypes[562] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass5Counter) String() string { +func (x *Dhcpv6ServerLeaseState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass5Counter) ProtoMessage() {} +func (*Dhcpv6ServerLeaseState) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass5Counter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[581] +func (x *Dhcpv6ServerLeaseState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[562] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -71246,70 +72220,102 @@ func (x *PatternFlowPfcPausePauseClass5Counter) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass5Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass5Counter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{581} +// Deprecated: Use Dhcpv6ServerLeaseState.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerLeaseState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{562} } -func (x *PatternFlowPfcPausePauseClass5Counter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *Dhcpv6ServerLeaseState) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address + } + return "" +} + +func (x *Dhcpv6ServerLeaseState) GetValidTime() uint32 { + if x != nil && x.ValidTime != nil { + return *x.ValidTime } return 0 } -func (x *PatternFlowPfcPausePauseClass5Counter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Dhcpv6ServerLeaseState) GetPreferredTime() uint32 { + if x != nil && x.PreferredTime != nil { + return *x.PreferredTime } return 0 } -func (x *PatternFlowPfcPausePauseClass5Counter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Dhcpv6ServerLeaseState) GetRenewTime() uint32 { + if x != nil && x.RenewTime != nil { + return *x.RenewTime } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowPfcPausePauseClass5MetricTag struct { +func (x *Dhcpv6ServerLeaseState) GetRebindTime() uint32 { + if x != nil && x.RebindTime != nil { + return *x.RebindTime + } + return 0 +} + +func (x *Dhcpv6ServerLeaseState) GetClientId() string { + if x != nil && x.ClientId != nil { + return *x.ClientId + } + return "" +} + +func (x *Dhcpv6ServerLeaseState) GetRemoteId() string { + if x != nil && x.RemoteId != nil { + return *x.RemoteId + } + return "" +} + +func (x *Dhcpv6ServerLeaseState) GetInterfaceId() string { + if x != nil && x.InterfaceId != nil { + return *x.InterfaceId + } + return "" +} + +// The request to retrieve OSPFv2 Link State Advertisements (LSA) information learned +// by the routers. +type Ospfv2LsasStateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // The names of OSPFv2 routers for which learned information is requested. An empty + // list will return results for all OSPFv2 routers. + // + // x-constraint: + // - /components/schemas/Device.Ospfv2Router/properties/name + // + // x-constraint: + // - /components/schemas/Device.Ospfv2Router/properties/name + RouterNames []string `protobuf:"bytes,1,rep,name=router_names,json=routerNames,proto3" json:"router_names,omitempty"` } -func (x *PatternFlowPfcPausePauseClass5MetricTag) Reset() { - *x = PatternFlowPfcPausePauseClass5MetricTag{} +func (x *Ospfv2LsasStateRequest) Reset() { + *x = Ospfv2LsasStateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[582] + mi := &file_otg_proto_msgTypes[563] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass5MetricTag) String() string { +func (x *Ospfv2LsasStateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass5MetricTag) ProtoMessage() {} +func (*Ospfv2LsasStateRequest) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass5MetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[582] +func (x *Ospfv2LsasStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[563] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -71320,74 +72326,59 @@ func (x *PatternFlowPfcPausePauseClass5MetricTag) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass5MetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass5MetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{582} -} - -func (x *PatternFlowPfcPausePauseClass5MetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatternFlowPfcPausePauseClass5MetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset - } - return 0 +// Deprecated: Use Ospfv2LsasStateRequest.ProtoReflect.Descriptor instead. +func (*Ospfv2LsasStateRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{563} } -func (x *PatternFlowPfcPausePauseClass5MetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *Ospfv2LsasStateRequest) GetRouterNames() []string { + if x != nil { + return x.RouterNames } - return 0 + return nil } -// Pause class 5 -type PatternFlowPfcPausePauseClass5 struct { +// The result of OSPFv2 LSA information that are retrieved. +type Ospfv2LsaState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowPfcPausePauseClass5_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass5_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowPfcPausePauseClass5Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowPfcPausePauseClass5Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPfcPausePauseClass5MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The name of the OSPFv2 Router that learned the LSA information. + RouterName *string `protobuf:"bytes,1,opt,name=router_name,json=routerName,proto3,oneof" json:"router_name,omitempty"` + // One or more OSPFv2 Router-LSA - Type 1. + RouterLsas []*Ospfv2RouterLsa `protobuf:"bytes,2,rep,name=router_lsas,json=routerLsas,proto3" json:"router_lsas,omitempty"` + // One or more OSPFv2 Network-LSA - Type 2. + NetworkLsas []*Ospfv2NetworkLsa `protobuf:"bytes,3,rep,name=network_lsas,json=networkLsas,proto3" json:"network_lsas,omitempty"` + // One or more OSPFv2 Network summary LSA - Type 3. + NetworkSummaryLsas []*Ospfv2NetworkSummaryLsa `protobuf:"bytes,4,rep,name=network_summary_lsas,json=networkSummaryLsas,proto3" json:"network_summary_lsas,omitempty"` + // One or more OSPFv2 Autonomous System Boundary Router (ASBR) summary LSA - Type 4. + SummaryAsLsas []*Ospfv2SummaryAsLsa `protobuf:"bytes,5,rep,name=summary_as_lsas,json=summaryAsLsas,proto3" json:"summary_as_lsas,omitempty"` + // OSPFv2 AS-External-LSA - Type 5. + ExternalAsLsas []*Ospfv2ExternalAsLsa `protobuf:"bytes,6,rep,name=external_as_lsas,json=externalAsLsas,proto3" json:"external_as_lsas,omitempty"` + // One or more OSPFv2 NSSA-LSA - Type 7. + NssaLsas []*Ospfv2NssaLsa `protobuf:"bytes,7,rep,name=nssa_lsas,json=nssaLsas,proto3" json:"nssa_lsas,omitempty"` + // One or more OSPFv2 Link-Scope Opaque-LSA - Type 9. + OpaqueLsas []*Ospfv2OpaqueLsa `protobuf:"bytes,8,rep,name=opaque_lsas,json=opaqueLsas,proto3" json:"opaque_lsas,omitempty"` } -func (x *PatternFlowPfcPausePauseClass5) Reset() { - *x = PatternFlowPfcPausePauseClass5{} +func (x *Ospfv2LsaState) Reset() { + *x = Ospfv2LsaState{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[583] + mi := &file_otg_proto_msgTypes[564] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass5) String() string { +func (x *Ospfv2LsaState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass5) ProtoMessage() {} +func (*Ospfv2LsaState) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass5) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[583] +func (x *Ospfv2LsaState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[564] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -71398,87 +72389,96 @@ func (x *PatternFlowPfcPausePauseClass5) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass5.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass5) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{583} +// Deprecated: Use Ospfv2LsaState.ProtoReflect.Descriptor instead. +func (*Ospfv2LsaState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{564} } -func (x *PatternFlowPfcPausePauseClass5) GetChoice() PatternFlowPfcPausePauseClass5_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *Ospfv2LsaState) GetRouterName() string { + if x != nil && x.RouterName != nil { + return *x.RouterName } - return PatternFlowPfcPausePauseClass5_Choice_unspecified + return "" } -func (x *PatternFlowPfcPausePauseClass5) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *Ospfv2LsaState) GetRouterLsas() []*Ospfv2RouterLsa { + if x != nil { + return x.RouterLsas } - return 0 + return nil } -func (x *PatternFlowPfcPausePauseClass5) GetValues() []uint32 { +func (x *Ospfv2LsaState) GetNetworkLsas() []*Ospfv2NetworkLsa { if x != nil { - return x.Values + return x.NetworkLsas } return nil } -func (x *PatternFlowPfcPausePauseClass5) GetIncrement() *PatternFlowPfcPausePauseClass5Counter { +func (x *Ospfv2LsaState) GetNetworkSummaryLsas() []*Ospfv2NetworkSummaryLsa { if x != nil { - return x.Increment + return x.NetworkSummaryLsas } return nil } -func (x *PatternFlowPfcPausePauseClass5) GetDecrement() *PatternFlowPfcPausePauseClass5Counter { +func (x *Ospfv2LsaState) GetSummaryAsLsas() []*Ospfv2SummaryAsLsa { if x != nil { - return x.Decrement + return x.SummaryAsLsas } return nil } -func (x *PatternFlowPfcPausePauseClass5) GetMetricTags() []*PatternFlowPfcPausePauseClass5MetricTag { +func (x *Ospfv2LsaState) GetExternalAsLsas() []*Ospfv2ExternalAsLsa { if x != nil { - return x.MetricTags + return x.ExternalAsLsas } return nil } -// integer counter pattern -type PatternFlowPfcPausePauseClass6Counter struct { +func (x *Ospfv2LsaState) GetNssaLsas() []*Ospfv2NssaLsa { + if x != nil { + return x.NssaLsas + } + return nil +} + +func (x *Ospfv2LsaState) GetOpaqueLsas() []*Ospfv2OpaqueLsa { + if x != nil { + return x.OpaqueLsas + } + return nil +} + +// Contents of the router LSA. +type Ospfv2RouterLsa struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Contents of the LSA header. + Header *Ospfv2LsaHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // Links that are described within the LSA. + Links []*Ospfv2Link `protobuf:"bytes,2,rep,name=links,proto3" json:"links,omitempty"` } -func (x *PatternFlowPfcPausePauseClass6Counter) Reset() { - *x = PatternFlowPfcPausePauseClass6Counter{} +func (x *Ospfv2RouterLsa) Reset() { + *x = Ospfv2RouterLsa{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[584] + mi := &file_otg_proto_msgTypes[565] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass6Counter) String() string { +func (x *Ospfv2RouterLsa) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass6Counter) ProtoMessage() {} +func (*Ospfv2RouterLsa) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass6Counter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[584] +func (x *Ospfv2RouterLsa) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[565] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -71489,70 +72489,56 @@ func (x *PatternFlowPfcPausePauseClass6Counter) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass6Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass6Counter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{584} -} - -func (x *PatternFlowPfcPausePauseClass6Counter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start - } - return 0 +// Deprecated: Use Ospfv2RouterLsa.ProtoReflect.Descriptor instead. +func (*Ospfv2RouterLsa) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{565} } -func (x *PatternFlowPfcPausePauseClass6Counter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Ospfv2RouterLsa) GetHeader() *Ospfv2LsaHeader { + if x != nil { + return x.Header } - return 0 + return nil } -func (x *PatternFlowPfcPausePauseClass6Counter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Ospfv2RouterLsa) GetLinks() []*Ospfv2Link { + if x != nil { + return x.Links } - return 0 + return nil } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowPfcPausePauseClass6MetricTag struct { +// Contents of the Network LSA. +type Ospfv2NetworkLsa struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // Contents of the LSA header. + Header *Ospfv2LsaHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // The IPv4 address mask for the network. + NetworkMask *string `protobuf:"bytes,2,opt,name=network_mask,json=networkMask,proto3,oneof" json:"network_mask,omitempty"` + // Neighbor router ids that are described within the LSA. + NeighborRouterIds []string `protobuf:"bytes,3,rep,name=neighbor_router_ids,json=neighborRouterIds,proto3" json:"neighbor_router_ids,omitempty"` } -func (x *PatternFlowPfcPausePauseClass6MetricTag) Reset() { - *x = PatternFlowPfcPausePauseClass6MetricTag{} +func (x *Ospfv2NetworkLsa) Reset() { + *x = Ospfv2NetworkLsa{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[585] + mi := &file_otg_proto_msgTypes[566] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass6MetricTag) String() string { +func (x *Ospfv2NetworkLsa) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass6MetricTag) ProtoMessage() {} +func (*Ospfv2NetworkLsa) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass6MetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[585] +func (x *Ospfv2NetworkLsa) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[566] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -71563,74 +72549,64 @@ func (x *PatternFlowPfcPausePauseClass6MetricTag) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass6MetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass6MetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{585} +// Deprecated: Use Ospfv2NetworkLsa.ProtoReflect.Descriptor instead. +func (*Ospfv2NetworkLsa) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{566} } -func (x *PatternFlowPfcPausePauseClass6MetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *Ospfv2NetworkLsa) GetHeader() *Ospfv2LsaHeader { + if x != nil { + return x.Header } - return "" + return nil } -func (x *PatternFlowPfcPausePauseClass6MetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *Ospfv2NetworkLsa) GetNetworkMask() string { + if x != nil && x.NetworkMask != nil { + return *x.NetworkMask } - return 0 + return "" } -func (x *PatternFlowPfcPausePauseClass6MetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *Ospfv2NetworkLsa) GetNeighborRouterIds() []string { + if x != nil { + return x.NeighborRouterIds } - return 0 + return nil } -// Pause class 6 -type PatternFlowPfcPausePauseClass6 struct { +// Contents of the Network Summary LSA - Type 3. +// The value of the IPv4 prefix that was received is present in header.lsa_id. +type Ospfv2NetworkSummaryLsa struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowPfcPausePauseClass6_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass6_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowPfcPausePauseClass6Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowPfcPausePauseClass6Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPfcPausePauseClass6MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // Contents of the LSA header. + Header *Ospfv2LsaHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // The IPv4 address mask for the network. + NetworkMask *string `protobuf:"bytes,2,opt,name=network_mask,json=networkMask,proto3,oneof" json:"network_mask,omitempty"` + // The cost of the summary route TOS level 0 and all unspecified levels. + Metric *uint32 `protobuf:"varint,3,opt,name=metric,proto3,oneof" json:"metric,omitempty"` } -func (x *PatternFlowPfcPausePauseClass6) Reset() { - *x = PatternFlowPfcPausePauseClass6{} +func (x *Ospfv2NetworkSummaryLsa) Reset() { + *x = Ospfv2NetworkSummaryLsa{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[586] + mi := &file_otg_proto_msgTypes[567] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass6) String() string { +func (x *Ospfv2NetworkSummaryLsa) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass6) ProtoMessage() {} +func (*Ospfv2NetworkSummaryLsa) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass6) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[586] +func (x *Ospfv2NetworkSummaryLsa) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[567] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -71641,87 +72617,63 @@ func (x *PatternFlowPfcPausePauseClass6) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass6.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass6) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{586} -} - -func (x *PatternFlowPfcPausePauseClass6) GetChoice() PatternFlowPfcPausePauseClass6_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowPfcPausePauseClass6_Choice_unspecified -} - -func (x *PatternFlowPfcPausePauseClass6) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowPfcPausePauseClass6) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil +// Deprecated: Use Ospfv2NetworkSummaryLsa.ProtoReflect.Descriptor instead. +func (*Ospfv2NetworkSummaryLsa) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{567} } -func (x *PatternFlowPfcPausePauseClass6) GetIncrement() *PatternFlowPfcPausePauseClass6Counter { +func (x *Ospfv2NetworkSummaryLsa) GetHeader() *Ospfv2LsaHeader { if x != nil { - return x.Increment + return x.Header } return nil } -func (x *PatternFlowPfcPausePauseClass6) GetDecrement() *PatternFlowPfcPausePauseClass6Counter { - if x != nil { - return x.Decrement +func (x *Ospfv2NetworkSummaryLsa) GetNetworkMask() string { + if x != nil && x.NetworkMask != nil { + return *x.NetworkMask } - return nil + return "" } -func (x *PatternFlowPfcPausePauseClass6) GetMetricTags() []*PatternFlowPfcPausePauseClass6MetricTag { - if x != nil { - return x.MetricTags +func (x *Ospfv2NetworkSummaryLsa) GetMetric() uint32 { + if x != nil && x.Metric != nil { + return *x.Metric } - return nil + return 0 } -// integer counter pattern -type PatternFlowPfcPausePauseClass7Counter struct { +// Contents of OSPFv2 Autonomous System Boundary Router (ASBR) summary LSA - Type 4. +type Ospfv2SummaryAsLsa struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Contents of the LSA header. + Header *Ospfv2LsaHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // The IPv4 address mask for the network. + NetworkMask *string `protobuf:"bytes,2,opt,name=network_mask,json=networkMask,proto3,oneof" json:"network_mask,omitempty"` + // The cost of the summary route TOS level 0 and all unspecified levels. + Metric *uint32 `protobuf:"varint,3,opt,name=metric,proto3,oneof" json:"metric,omitempty"` } -func (x *PatternFlowPfcPausePauseClass7Counter) Reset() { - *x = PatternFlowPfcPausePauseClass7Counter{} +func (x *Ospfv2SummaryAsLsa) Reset() { + *x = Ospfv2SummaryAsLsa{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[587] + mi := &file_otg_proto_msgTypes[568] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass7Counter) String() string { +func (x *Ospfv2SummaryAsLsa) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass7Counter) ProtoMessage() {} +func (*Ospfv2SummaryAsLsa) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass7Counter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[587] +func (x *Ospfv2SummaryAsLsa) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[568] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -71732,70 +72684,66 @@ func (x *PatternFlowPfcPausePauseClass7Counter) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass7Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass7Counter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{587} +// Deprecated: Use Ospfv2SummaryAsLsa.ProtoReflect.Descriptor instead. +func (*Ospfv2SummaryAsLsa) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{568} } -func (x *PatternFlowPfcPausePauseClass7Counter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *Ospfv2SummaryAsLsa) GetHeader() *Ospfv2LsaHeader { + if x != nil { + return x.Header } - return 0 + return nil } -func (x *PatternFlowPfcPausePauseClass7Counter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *Ospfv2SummaryAsLsa) GetNetworkMask() string { + if x != nil && x.NetworkMask != nil { + return *x.NetworkMask } - return 0 + return "" } -func (x *PatternFlowPfcPausePauseClass7Counter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Ospfv2SummaryAsLsa) GetMetric() uint32 { + if x != nil && x.Metric != nil { + return *x.Metric } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowPfcPausePauseClass7MetricTag struct { +// Contents of OSPFv2 AS-External-LSA - Type 5. +// The value of the IPv4 prefix that was received is present in header.lsa_id. +type Ospfv2ExternalAsLsa struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // Contents of the LSA header. + Header *Ospfv2LsaHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // The IPv4 address mask for the network. + NetworkMask *string `protobuf:"bytes,2,opt,name=network_mask,json=networkMask,proto3,oneof" json:"network_mask,omitempty"` + // The cost of the summary route TOS level 0 and all unspecified levels. + Metric *uint32 `protobuf:"varint,3,opt,name=metric,proto3,oneof" json:"metric,omitempty"` + // The type of metric associated with the route range. + MetricType *uint32 `protobuf:"varint,4,opt,name=metric_type,json=metricType,proto3,oneof" json:"metric_type,omitempty"` } -func (x *PatternFlowPfcPausePauseClass7MetricTag) Reset() { - *x = PatternFlowPfcPausePauseClass7MetricTag{} +func (x *Ospfv2ExternalAsLsa) Reset() { + *x = Ospfv2ExternalAsLsa{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[588] + mi := &file_otg_proto_msgTypes[569] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass7MetricTag) String() string { +func (x *Ospfv2ExternalAsLsa) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass7MetricTag) ProtoMessage() {} +func (*Ospfv2ExternalAsLsa) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass7MetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[588] +func (x *Ospfv2ExternalAsLsa) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[569] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -71806,74 +72754,75 @@ func (x *PatternFlowPfcPausePauseClass7MetricTag) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass7MetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass7MetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{588} +// Deprecated: Use Ospfv2ExternalAsLsa.ProtoReflect.Descriptor instead. +func (*Ospfv2ExternalAsLsa) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{569} } -func (x *PatternFlowPfcPausePauseClass7MetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *Ospfv2ExternalAsLsa) GetHeader() *Ospfv2LsaHeader { + if x != nil { + return x.Header + } + return nil +} + +func (x *Ospfv2ExternalAsLsa) GetNetworkMask() string { + if x != nil && x.NetworkMask != nil { + return *x.NetworkMask } return "" } -func (x *PatternFlowPfcPausePauseClass7MetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *Ospfv2ExternalAsLsa) GetMetric() uint32 { + if x != nil && x.Metric != nil { + return *x.Metric } return 0 } -func (x *PatternFlowPfcPausePauseClass7MetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *Ospfv2ExternalAsLsa) GetMetricType() uint32 { + if x != nil && x.MetricType != nil { + return *x.MetricType } return 0 } -// Pause class 7 -type PatternFlowPfcPausePauseClass7 struct { +// Contents of OSPFv2 NSSA LSA - Type 7. +// The value of the IPv4 prefix that was received is present in header.lsa_id. +type Ospfv2NssaLsa struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowPfcPausePauseClass7_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass7_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowPfcPausePauseClass7Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowPfcPausePauseClass7Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPfcPausePauseClass7MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // Contents of the LSA header. + Header *Ospfv2LsaHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // The IPv4 address mask for the network. + NetworkMask *string `protobuf:"bytes,2,opt,name=network_mask,json=networkMask,proto3,oneof" json:"network_mask,omitempty"` + // The cost of the summary route TOS level 0 and all unspecified levels. + Metric *uint32 `protobuf:"varint,3,opt,name=metric,proto3,oneof" json:"metric,omitempty"` + // The type of metric associated with the route range. + MetricType *uint32 `protobuf:"varint,4,opt,name=metric_type,json=metricType,proto3,oneof" json:"metric_type,omitempty"` + // IPv4 Forwarding address. + ForwardingAddress *string `protobuf:"bytes,5,opt,name=forwarding_address,json=forwardingAddress,proto3,oneof" json:"forwarding_address,omitempty"` } -func (x *PatternFlowPfcPausePauseClass7) Reset() { - *x = PatternFlowPfcPausePauseClass7{} +func (x *Ospfv2NssaLsa) Reset() { + *x = Ospfv2NssaLsa{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[589] + mi := &file_otg_proto_msgTypes[570] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass7) String() string { +func (x *Ospfv2NssaLsa) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass7) ProtoMessage() {} +func (*Ospfv2NssaLsa) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass7) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[589] +func (x *Ospfv2NssaLsa) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[570] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -71884,87 +72833,75 @@ func (x *PatternFlowPfcPausePauseClass7) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass7.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass7) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{589} -} - -func (x *PatternFlowPfcPausePauseClass7) GetChoice() PatternFlowPfcPausePauseClass7_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowPfcPausePauseClass7_Choice_unspecified +// Deprecated: Use Ospfv2NssaLsa.ProtoReflect.Descriptor instead. +func (*Ospfv2NssaLsa) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{570} } -func (x *PatternFlowPfcPausePauseClass7) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *Ospfv2NssaLsa) GetHeader() *Ospfv2LsaHeader { + if x != nil { + return x.Header } - return 0 + return nil } -func (x *PatternFlowPfcPausePauseClass7) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *Ospfv2NssaLsa) GetNetworkMask() string { + if x != nil && x.NetworkMask != nil { + return *x.NetworkMask } - return nil + return "" } -func (x *PatternFlowPfcPausePauseClass7) GetIncrement() *PatternFlowPfcPausePauseClass7Counter { - if x != nil { - return x.Increment +func (x *Ospfv2NssaLsa) GetMetric() uint32 { + if x != nil && x.Metric != nil { + return *x.Metric } - return nil + return 0 } -func (x *PatternFlowPfcPausePauseClass7) GetDecrement() *PatternFlowPfcPausePauseClass7Counter { - if x != nil { - return x.Decrement +func (x *Ospfv2NssaLsa) GetMetricType() uint32 { + if x != nil && x.MetricType != nil { + return *x.MetricType } - return nil + return 0 } -func (x *PatternFlowPfcPausePauseClass7) GetMetricTags() []*PatternFlowPfcPausePauseClass7MetricTag { - if x != nil { - return x.MetricTags +func (x *Ospfv2NssaLsa) GetForwardingAddress() string { + if x != nil && x.ForwardingAddress != nil { + return *x.ForwardingAddress } - return nil + return "" } -// mac counter pattern -type PatternFlowEthernetPauseDstCounter struct { +// Contents of OSPFv2 Opaque LSA - Type 7. +type Ospfv2OpaqueLsa struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 01:80:c2:00:00:01 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 00:00:00:00:00:01 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Contents of the LSA header. + Header *Ospfv2LsaHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // The type of Opaque TE LSAs. The LSA type. + Type *Ospfv2OpaqueLsa_Type_Enum `protobuf:"varint,2,opt,name=type,proto3,enum=otg.Ospfv2OpaqueLsa_Type_Enum,oneof" json:"type,omitempty"` } -func (x *PatternFlowEthernetPauseDstCounter) Reset() { - *x = PatternFlowEthernetPauseDstCounter{} +func (x *Ospfv2OpaqueLsa) Reset() { + *x = Ospfv2OpaqueLsa{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[590] + mi := &file_otg_proto_msgTypes[571] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseDstCounter) String() string { +func (x *Ospfv2OpaqueLsa) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseDstCounter) ProtoMessage() {} +func (*Ospfv2OpaqueLsa) ProtoMessage() {} -func (x *PatternFlowEthernetPauseDstCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[590] +func (x *Ospfv2OpaqueLsa) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[571] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -71975,70 +72912,61 @@ func (x *PatternFlowEthernetPauseDstCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseDstCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseDstCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{590} -} - -func (x *PatternFlowEthernetPauseDstCounter) GetStart() string { - if x != nil && x.Start != nil { - return *x.Start - } - return "" +// Deprecated: Use Ospfv2OpaqueLsa.ProtoReflect.Descriptor instead. +func (*Ospfv2OpaqueLsa) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{571} } -func (x *PatternFlowEthernetPauseDstCounter) GetStep() string { - if x != nil && x.Step != nil { - return *x.Step +func (x *Ospfv2OpaqueLsa) GetHeader() *Ospfv2LsaHeader { + if x != nil { + return x.Header } - return "" + return nil } -func (x *PatternFlowEthernetPauseDstCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *Ospfv2OpaqueLsa) GetType() Ospfv2OpaqueLsa_Type_Enum { + if x != nil && x.Type != nil { + return *x.Type } - return 0 + return Ospfv2OpaqueLsa_Type_unspecified } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowEthernetPauseDstMetricTag struct { +// Attributes in LSA Header. +type Ospfv2LsaHeader struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 48 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // LSA ID in the IPv4 format. The Link State ID for the specified LSA type. + LsaId *string `protobuf:"bytes,1,opt,name=lsa_id,json=lsaId,proto3,oneof" json:"lsa_id,omitempty"` + // The router ID (in the IPv4 format) of the router that originated the LSA. + AdvertisingRouterId *string `protobuf:"bytes,2,opt,name=advertising_router_id,json=advertisingRouterId,proto3,oneof" json:"advertising_router_id,omitempty"` + // Sequence number to detect old and duplicate LSAs. The greater the sequence number + // the more recent the LSA. + SequenceNumber *uint32 `protobuf:"varint,3,opt,name=sequence_number,json=sequenceNumber,proto3,oneof" json:"sequence_number,omitempty"` + // The time since the LSA's generation in seconds. + Age *uint32 `protobuf:"varint,4,opt,name=age,proto3,oneof" json:"age,omitempty"` + // The optional bits. + OptionBits *uint32 `protobuf:"varint,5,opt,name=option_bits,json=optionBits,proto3,oneof" json:"option_bits,omitempty"` } -func (x *PatternFlowEthernetPauseDstMetricTag) Reset() { - *x = PatternFlowEthernetPauseDstMetricTag{} +func (x *Ospfv2LsaHeader) Reset() { + *x = Ospfv2LsaHeader{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[591] + mi := &file_otg_proto_msgTypes[572] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseDstMetricTag) String() string { +func (x *Ospfv2LsaHeader) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseDstMetricTag) ProtoMessage() {} +func (*Ospfv2LsaHeader) ProtoMessage() {} -func (x *PatternFlowEthernetPauseDstMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[591] +func (x *Ospfv2LsaHeader) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[572] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72049,74 +72977,94 @@ func (x *PatternFlowEthernetPauseDstMetricTag) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseDstMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseDstMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{591} +// Deprecated: Use Ospfv2LsaHeader.ProtoReflect.Descriptor instead. +func (*Ospfv2LsaHeader) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{572} } -func (x *PatternFlowEthernetPauseDstMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *Ospfv2LsaHeader) GetLsaId() string { + if x != nil && x.LsaId != nil { + return *x.LsaId } return "" } -func (x *PatternFlowEthernetPauseDstMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *Ospfv2LsaHeader) GetAdvertisingRouterId() string { + if x != nil && x.AdvertisingRouterId != nil { + return *x.AdvertisingRouterId + } + return "" +} + +func (x *Ospfv2LsaHeader) GetSequenceNumber() uint32 { + if x != nil && x.SequenceNumber != nil { + return *x.SequenceNumber } return 0 } -func (x *PatternFlowEthernetPauseDstMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *Ospfv2LsaHeader) GetAge() uint32 { + if x != nil && x.Age != nil { + return *x.Age } return 0 } -// Destination MAC address -type PatternFlowEthernetPauseDst struct { +func (x *Ospfv2LsaHeader) GetOptionBits() uint32 { + if x != nil && x.OptionBits != nil { + return *x.OptionBits + } + return 0 +} + +// Generic attributes used to identify links within OSPFv2. +type Ospfv2Link struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowEthernetPauseDst_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetPauseDst_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 01:80:c2:00:00:01 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = ['01:80:c2:00:00:01'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowEthernetPauseDstCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowEthernetPauseDstCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowEthernetPauseDstMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The data associated with the link type. The value is dependent upon the subtype of + // the LSA. - point_to_point: The LSA represents a point-to-point connection to another + // router. - transit: The LSA represents a connection to a transit network. - stub: + // The LSA represents a connection to a stub network. - virtual: The LSA represents + // a virtual link connection. + Type *Ospfv2Link_Type_Enum `protobuf:"varint,1,opt,name=type,proto3,enum=otg.Ospfv2Link_Type_Enum,oneof" json:"type,omitempty"` + // The identifier for the link specified. The value of the link + // identifier is dependent upon the type of the LSA. + Id *string `protobuf:"bytes,2,opt,name=id,proto3,oneof" json:"id,omitempty"` + // The data associated with the link type. The value is + // dependent upon the subtype of the LSA. When the connection is + // to a stub network it represents the mask; for p2p connections + // that are unnumbered it represents the ifIndex value of the + // router's interface; for all other connections it represents + // the local system's IP address. + Data *string `protobuf:"bytes,3,opt,name=data,proto3,oneof" json:"data,omitempty"` + // The data associated with the link type. The value is + // dependent upon the subtype of the LSA. When the connection is + // to a stub network it represents the mask; for p2p connections + // that are unnumbered it represents the ifIndex value of the + // router's interface; for all other connections it represents + // the local system's IP address. + Metric *uint32 `protobuf:"varint,4,opt,name=metric,proto3,oneof" json:"metric,omitempty"` } -func (x *PatternFlowEthernetPauseDst) Reset() { - *x = PatternFlowEthernetPauseDst{} +func (x *Ospfv2Link) Reset() { + *x = Ospfv2Link{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[592] + mi := &file_otg_proto_msgTypes[573] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseDst) String() string { +func (x *Ospfv2Link) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseDst) ProtoMessage() {} +func (*Ospfv2Link) ProtoMessage() {} -func (x *PatternFlowEthernetPauseDst) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[592] +func (x *Ospfv2Link) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[573] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72127,55 +73075,99 @@ func (x *PatternFlowEthernetPauseDst) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseDst.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseDst) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{592} +// Deprecated: Use Ospfv2Link.ProtoReflect.Descriptor instead. +func (*Ospfv2Link) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{573} } -func (x *PatternFlowEthernetPauseDst) GetChoice() PatternFlowEthernetPauseDst_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *Ospfv2Link) GetType() Ospfv2Link_Type_Enum { + if x != nil && x.Type != nil { + return *x.Type } - return PatternFlowEthernetPauseDst_Choice_unspecified + return Ospfv2Link_Type_unspecified } -func (x *PatternFlowEthernetPauseDst) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value +func (x *Ospfv2Link) GetId() string { + if x != nil && x.Id != nil { + return *x.Id } return "" } -func (x *PatternFlowEthernetPauseDst) GetValues() []string { - if x != nil { - return x.Values +func (x *Ospfv2Link) GetData() string { + if x != nil && x.Data != nil { + return *x.Data } - return nil + return "" } -func (x *PatternFlowEthernetPauseDst) GetIncrement() *PatternFlowEthernetPauseDstCounter { - if x != nil { - return x.Increment +func (x *Ospfv2Link) GetMetric() uint32 { + if x != nil && x.Metric != nil { + return *x.Metric } - return nil + return 0 } -func (x *PatternFlowEthernetPauseDst) GetDecrement() *PatternFlowEthernetPauseDstCounter { - if x != nil { - return x.Decrement +// The capture result request to the traffic generator. Stops the port capture on the +// port_name and returns the capture. +type CaptureRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of a port a capture is started on. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // required = true + PortName *string `protobuf:"bytes,1,opt,name=port_name,json=portName,proto3,oneof" json:"port_name,omitempty"` +} + +func (x *CaptureRequest) Reset() { + *x = CaptureRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[574] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *PatternFlowEthernetPauseDst) GetMetricTags() []*PatternFlowEthernetPauseDstMetricTag { - if x != nil { - return x.MetricTags +func (x *CaptureRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CaptureRequest) ProtoMessage() {} + +func (x *CaptureRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[574] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) +} + +// Deprecated: Use CaptureRequest.ProtoReflect.Descriptor instead. +func (*CaptureRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{574} +} + +func (x *CaptureRequest) GetPortName() string { + if x != nil && x.PortName != nil { + return *x.PortName + } + return "" } // mac counter pattern -type PatternFlowEthernetPauseSrcCounter struct { +type PatternFlowEthernetDstCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -72191,23 +73183,23 @@ type PatternFlowEthernetPauseSrcCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowEthernetPauseSrcCounter) Reset() { - *x = PatternFlowEthernetPauseSrcCounter{} +func (x *PatternFlowEthernetDstCounter) Reset() { + *x = PatternFlowEthernetDstCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[593] + mi := &file_otg_proto_msgTypes[575] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseSrcCounter) String() string { +func (x *PatternFlowEthernetDstCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseSrcCounter) ProtoMessage() {} +func (*PatternFlowEthernetDstCounter) ProtoMessage() {} -func (x *PatternFlowEthernetPauseSrcCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[593] +func (x *PatternFlowEthernetDstCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[575] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72218,26 +73210,26 @@ func (x *PatternFlowEthernetPauseSrcCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseSrcCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseSrcCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{593} +// Deprecated: Use PatternFlowEthernetDstCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetDstCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{575} } -func (x *PatternFlowEthernetPauseSrcCounter) GetStart() string { +func (x *PatternFlowEthernetDstCounter) GetStart() string { if x != nil && x.Start != nil { return *x.Start } return "" } -func (x *PatternFlowEthernetPauseSrcCounter) GetStep() string { +func (x *PatternFlowEthernetDstCounter) GetStep() string { if x != nil && x.Step != nil { return *x.Step } return "" } -func (x *PatternFlowEthernetPauseSrcCounter) GetCount() uint32 { +func (x *PatternFlowEthernetDstCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -72247,7 +73239,7 @@ func (x *PatternFlowEthernetPauseSrcCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowEthernetPauseSrcMetricTag struct { +type PatternFlowEthernetDstMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -72265,23 +73257,23 @@ type PatternFlowEthernetPauseSrcMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowEthernetPauseSrcMetricTag) Reset() { - *x = PatternFlowEthernetPauseSrcMetricTag{} +func (x *PatternFlowEthernetDstMetricTag) Reset() { + *x = PatternFlowEthernetDstMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[594] + mi := &file_otg_proto_msgTypes[576] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseSrcMetricTag) String() string { +func (x *PatternFlowEthernetDstMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseSrcMetricTag) ProtoMessage() {} +func (*PatternFlowEthernetDstMetricTag) ProtoMessage() {} -func (x *PatternFlowEthernetPauseSrcMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[594] +func (x *PatternFlowEthernetDstMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[576] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72292,74 +73284,79 @@ func (x *PatternFlowEthernetPauseSrcMetricTag) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseSrcMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseSrcMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{594} +// Deprecated: Use PatternFlowEthernetDstMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetDstMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{576} } -func (x *PatternFlowEthernetPauseSrcMetricTag) GetName() string { +func (x *PatternFlowEthernetDstMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowEthernetPauseSrcMetricTag) GetOffset() uint32 { +func (x *PatternFlowEthernetDstMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowEthernetPauseSrcMetricTag) GetLength() uint32 { +func (x *PatternFlowEthernetDstMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Source MAC address -type PatternFlowEthernetPauseSrc struct { +// Destination MAC address +type PatternFlowEthernetDst struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowEthernetPauseSrc_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetPauseSrc_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.auto + Choice *PatternFlowEthernetDst_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetDst_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 00:00:00:00:00:00 Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models // default = ['00:00:00:00:00:00'] Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // The OTG implementation can provide a system generated + // value for this property. If the OTG is unable to generate a value + // the default value must be used. + // default = 00:00:00:00:00:00 + Auto *string `protobuf:"bytes,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` // Description missing in models - Increment *PatternFlowEthernetPauseSrcCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowEthernetDstCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowEthernetPauseSrcCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowEthernetDstCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowEthernetPauseSrcMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowEthernetDstMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowEthernetPauseSrc) Reset() { - *x = PatternFlowEthernetPauseSrc{} +func (x *PatternFlowEthernetDst) Reset() { + *x = PatternFlowEthernetDst{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[595] + mi := &file_otg_proto_msgTypes[577] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseSrc) String() string { +func (x *PatternFlowEthernetDst) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseSrc) ProtoMessage() {} +func (*PatternFlowEthernetDst) ProtoMessage() {} -func (x *PatternFlowEthernetPauseSrc) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[595] +func (x *PatternFlowEthernetDst) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[577] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72370,87 +73367,94 @@ func (x *PatternFlowEthernetPauseSrc) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseSrc.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseSrc) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{595} +// Deprecated: Use PatternFlowEthernetDst.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetDst) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{577} } -func (x *PatternFlowEthernetPauseSrc) GetChoice() PatternFlowEthernetPauseSrc_Choice_Enum { +func (x *PatternFlowEthernetDst) GetChoice() PatternFlowEthernetDst_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowEthernetPauseSrc_Choice_unspecified + return PatternFlowEthernetDst_Choice_unspecified } -func (x *PatternFlowEthernetPauseSrc) GetValue() string { +func (x *PatternFlowEthernetDst) GetValue() string { if x != nil && x.Value != nil { return *x.Value } return "" } -func (x *PatternFlowEthernetPauseSrc) GetValues() []string { +func (x *PatternFlowEthernetDst) GetValues() []string { if x != nil { return x.Values } return nil } -func (x *PatternFlowEthernetPauseSrc) GetIncrement() *PatternFlowEthernetPauseSrcCounter { +func (x *PatternFlowEthernetDst) GetAuto() string { + if x != nil && x.Auto != nil { + return *x.Auto + } + return "" +} + +func (x *PatternFlowEthernetDst) GetIncrement() *PatternFlowEthernetDstCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowEthernetPauseSrc) GetDecrement() *PatternFlowEthernetPauseSrcCounter { +func (x *PatternFlowEthernetDst) GetDecrement() *PatternFlowEthernetDstCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowEthernetPauseSrc) GetMetricTags() []*PatternFlowEthernetPauseSrcMetricTag { +func (x *PatternFlowEthernetDst) GetMetricTags() []*PatternFlowEthernetDstMetricTag { if x != nil { return x.MetricTags } return nil } -// integer counter pattern -type PatternFlowEthernetPauseEtherTypeCounter struct { +// mac counter pattern +type PatternFlowEthernetSrcCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 34824 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = 00:00:00:00:00:00 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 00:00:00:00:00:01 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowEthernetPauseEtherTypeCounter) Reset() { - *x = PatternFlowEthernetPauseEtherTypeCounter{} +func (x *PatternFlowEthernetSrcCounter) Reset() { + *x = PatternFlowEthernetSrcCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[596] + mi := &file_otg_proto_msgTypes[578] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseEtherTypeCounter) String() string { +func (x *PatternFlowEthernetSrcCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseEtherTypeCounter) ProtoMessage() {} +func (*PatternFlowEthernetSrcCounter) ProtoMessage() {} -func (x *PatternFlowEthernetPauseEtherTypeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[596] +func (x *PatternFlowEthernetSrcCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[578] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72461,26 +73465,26 @@ func (x *PatternFlowEthernetPauseEtherTypeCounter) ProtoReflect() protoreflect.M return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseEtherTypeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseEtherTypeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{596} +// Deprecated: Use PatternFlowEthernetSrcCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetSrcCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{578} } -func (x *PatternFlowEthernetPauseEtherTypeCounter) GetStart() uint32 { +func (x *PatternFlowEthernetSrcCounter) GetStart() string { if x != nil && x.Start != nil { return *x.Start } - return 0 + return "" } -func (x *PatternFlowEthernetPauseEtherTypeCounter) GetStep() uint32 { +func (x *PatternFlowEthernetSrcCounter) GetStep() string { if x != nil && x.Step != nil { return *x.Step } - return 0 + return "" } -func (x *PatternFlowEthernetPauseEtherTypeCounter) GetCount() uint32 { +func (x *PatternFlowEthernetSrcCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -72490,7 +73494,7 @@ func (x *PatternFlowEthernetPauseEtherTypeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowEthernetPauseEtherTypeMetricTag struct { +type PatternFlowEthernetSrcMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -72504,27 +73508,27 @@ type PatternFlowEthernetPauseEtherTypeMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 48 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowEthernetPauseEtherTypeMetricTag) Reset() { - *x = PatternFlowEthernetPauseEtherTypeMetricTag{} +func (x *PatternFlowEthernetSrcMetricTag) Reset() { + *x = PatternFlowEthernetSrcMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[597] + mi := &file_otg_proto_msgTypes[579] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseEtherTypeMetricTag) String() string { +func (x *PatternFlowEthernetSrcMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseEtherTypeMetricTag) ProtoMessage() {} +func (*PatternFlowEthernetSrcMetricTag) ProtoMessage() {} -func (x *PatternFlowEthernetPauseEtherTypeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[597] +func (x *PatternFlowEthernetSrcMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[579] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72535,74 +73539,74 @@ func (x *PatternFlowEthernetPauseEtherTypeMetricTag) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseEtherTypeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseEtherTypeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{597} +// Deprecated: Use PatternFlowEthernetSrcMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetSrcMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{579} } -func (x *PatternFlowEthernetPauseEtherTypeMetricTag) GetName() string { +func (x *PatternFlowEthernetSrcMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowEthernetPauseEtherTypeMetricTag) GetOffset() uint32 { +func (x *PatternFlowEthernetSrcMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowEthernetPauseEtherTypeMetricTag) GetLength() uint32 { +func (x *PatternFlowEthernetSrcMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Ethernet type -type PatternFlowEthernetPauseEtherType struct { +// Source MAC address +type PatternFlowEthernetSrc struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowEthernetPauseEtherType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetPauseEtherType_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowEthernetSrc_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetSrc_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 34824 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 00:00:00:00:00:00 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [34824] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = ['00:00:00:00:00:00'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowEthernetPauseEtherTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowEthernetSrcCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowEthernetPauseEtherTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowEthernetSrcCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowEthernetPauseEtherTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowEthernetSrcMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowEthernetPauseEtherType) Reset() { - *x = PatternFlowEthernetPauseEtherType{} +func (x *PatternFlowEthernetSrc) Reset() { + *x = PatternFlowEthernetSrc{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[598] + mi := &file_otg_proto_msgTypes[580] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseEtherType) String() string { +func (x *PatternFlowEthernetSrc) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseEtherType) ProtoMessage() {} +func (*PatternFlowEthernetSrc) ProtoMessage() {} -func (x *PatternFlowEthernetPauseEtherType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[598] +func (x *PatternFlowEthernetSrc) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[580] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72613,47 +73617,47 @@ func (x *PatternFlowEthernetPauseEtherType) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseEtherType.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseEtherType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{598} +// Deprecated: Use PatternFlowEthernetSrc.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetSrc) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{580} } -func (x *PatternFlowEthernetPauseEtherType) GetChoice() PatternFlowEthernetPauseEtherType_Choice_Enum { +func (x *PatternFlowEthernetSrc) GetChoice() PatternFlowEthernetSrc_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowEthernetPauseEtherType_Choice_unspecified + return PatternFlowEthernetSrc_Choice_unspecified } -func (x *PatternFlowEthernetPauseEtherType) GetValue() uint32 { +func (x *PatternFlowEthernetSrc) GetValue() string { if x != nil && x.Value != nil { return *x.Value } - return 0 + return "" } -func (x *PatternFlowEthernetPauseEtherType) GetValues() []uint32 { +func (x *PatternFlowEthernetSrc) GetValues() []string { if x != nil { return x.Values } return nil } -func (x *PatternFlowEthernetPauseEtherType) GetIncrement() *PatternFlowEthernetPauseEtherTypeCounter { +func (x *PatternFlowEthernetSrc) GetIncrement() *PatternFlowEthernetSrcCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowEthernetPauseEtherType) GetDecrement() *PatternFlowEthernetPauseEtherTypeCounter { +func (x *PatternFlowEthernetSrc) GetDecrement() *PatternFlowEthernetSrcCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowEthernetPauseEtherType) GetMetricTags() []*PatternFlowEthernetPauseEtherTypeMetricTag { +func (x *PatternFlowEthernetSrc) GetMetricTags() []*PatternFlowEthernetSrcMetricTag { if x != nil { return x.MetricTags } @@ -72661,13 +73665,13 @@ func (x *PatternFlowEthernetPauseEtherType) GetMetricTags() []*PatternFlowEthern } // integer counter pattern -type PatternFlowEthernetPauseControlOpCodeCounter struct { +type PatternFlowEthernetEtherTypeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 1 + // default = 65535 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -72677,23 +73681,23 @@ type PatternFlowEthernetPauseControlOpCodeCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowEthernetPauseControlOpCodeCounter) Reset() { - *x = PatternFlowEthernetPauseControlOpCodeCounter{} +func (x *PatternFlowEthernetEtherTypeCounter) Reset() { + *x = PatternFlowEthernetEtherTypeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[599] + mi := &file_otg_proto_msgTypes[581] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseControlOpCodeCounter) String() string { +func (x *PatternFlowEthernetEtherTypeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseControlOpCodeCounter) ProtoMessage() {} +func (*PatternFlowEthernetEtherTypeCounter) ProtoMessage() {} -func (x *PatternFlowEthernetPauseControlOpCodeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[599] +func (x *PatternFlowEthernetEtherTypeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[581] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72704,26 +73708,26 @@ func (x *PatternFlowEthernetPauseControlOpCodeCounter) ProtoReflect() protorefle return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseControlOpCodeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseControlOpCodeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{599} +// Deprecated: Use PatternFlowEthernetEtherTypeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetEtherTypeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{581} } -func (x *PatternFlowEthernetPauseControlOpCodeCounter) GetStart() uint32 { +func (x *PatternFlowEthernetEtherTypeCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowEthernetPauseControlOpCodeCounter) GetStep() uint32 { +func (x *PatternFlowEthernetEtherTypeCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowEthernetPauseControlOpCodeCounter) GetCount() uint32 { +func (x *PatternFlowEthernetEtherTypeCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -72733,7 +73737,7 @@ func (x *PatternFlowEthernetPauseControlOpCodeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowEthernetPauseControlOpCodeMetricTag struct { +type PatternFlowEthernetEtherTypeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -72751,23 +73755,23 @@ type PatternFlowEthernetPauseControlOpCodeMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowEthernetPauseControlOpCodeMetricTag) Reset() { - *x = PatternFlowEthernetPauseControlOpCodeMetricTag{} +func (x *PatternFlowEthernetEtherTypeMetricTag) Reset() { + *x = PatternFlowEthernetEtherTypeMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[600] + mi := &file_otg_proto_msgTypes[582] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseControlOpCodeMetricTag) String() string { +func (x *PatternFlowEthernetEtherTypeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseControlOpCodeMetricTag) ProtoMessage() {} +func (*PatternFlowEthernetEtherTypeMetricTag) ProtoMessage() {} -func (x *PatternFlowEthernetPauseControlOpCodeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[600] +func (x *PatternFlowEthernetEtherTypeMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[582] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72778,74 +73782,79 @@ func (x *PatternFlowEthernetPauseControlOpCodeMetricTag) ProtoReflect() protoref return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseControlOpCodeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseControlOpCodeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{600} +// Deprecated: Use PatternFlowEthernetEtherTypeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetEtherTypeMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{582} } -func (x *PatternFlowEthernetPauseControlOpCodeMetricTag) GetName() string { +func (x *PatternFlowEthernetEtherTypeMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowEthernetPauseControlOpCodeMetricTag) GetOffset() uint32 { +func (x *PatternFlowEthernetEtherTypeMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowEthernetPauseControlOpCodeMetricTag) GetLength() uint32 { +func (x *PatternFlowEthernetEtherTypeMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Control operation code -type PatternFlowEthernetPauseControlOpCode struct { +// Ethernet type +type PatternFlowEthernetEtherType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowEthernetPauseControlOpCode_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetPauseControlOpCode_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.auto + Choice *PatternFlowEthernetEtherType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetEtherType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 + // default = 65535 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [1] + // default = [65535] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // The OTG implementation can provide a system generated + // value for this property. If the OTG is unable to generate a value + // the default value must be used. + // default = 65535 + Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` // Description missing in models - Increment *PatternFlowEthernetPauseControlOpCodeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowEthernetEtherTypeCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowEthernetPauseControlOpCodeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowEthernetEtherTypeCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowEthernetPauseControlOpCodeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowEthernetEtherTypeMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowEthernetPauseControlOpCode) Reset() { - *x = PatternFlowEthernetPauseControlOpCode{} +func (x *PatternFlowEthernetEtherType) Reset() { + *x = PatternFlowEthernetEtherType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[601] + mi := &file_otg_proto_msgTypes[583] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseControlOpCode) String() string { +func (x *PatternFlowEthernetEtherType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseControlOpCode) ProtoMessage() {} +func (*PatternFlowEthernetEtherType) ProtoMessage() {} -func (x *PatternFlowEthernetPauseControlOpCode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[601] +func (x *PatternFlowEthernetEtherType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[583] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72856,47 +73865,54 @@ func (x *PatternFlowEthernetPauseControlOpCode) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseControlOpCode.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseControlOpCode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{601} +// Deprecated: Use PatternFlowEthernetEtherType.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetEtherType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{583} } -func (x *PatternFlowEthernetPauseControlOpCode) GetChoice() PatternFlowEthernetPauseControlOpCode_Choice_Enum { +func (x *PatternFlowEthernetEtherType) GetChoice() PatternFlowEthernetEtherType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowEthernetPauseControlOpCode_Choice_unspecified + return PatternFlowEthernetEtherType_Choice_unspecified } -func (x *PatternFlowEthernetPauseControlOpCode) GetValue() uint32 { +func (x *PatternFlowEthernetEtherType) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowEthernetPauseControlOpCode) GetValues() []uint32 { +func (x *PatternFlowEthernetEtherType) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowEthernetPauseControlOpCode) GetIncrement() *PatternFlowEthernetPauseControlOpCodeCounter { +func (x *PatternFlowEthernetEtherType) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto + } + return 0 +} + +func (x *PatternFlowEthernetEtherType) GetIncrement() *PatternFlowEthernetEtherTypeCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowEthernetPauseControlOpCode) GetDecrement() *PatternFlowEthernetPauseControlOpCodeCounter { +func (x *PatternFlowEthernetEtherType) GetDecrement() *PatternFlowEthernetEtherTypeCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowEthernetPauseControlOpCode) GetMetricTags() []*PatternFlowEthernetPauseControlOpCodeMetricTag { +func (x *PatternFlowEthernetEtherType) GetMetricTags() []*PatternFlowEthernetEtherTypeMetricTag { if x != nil { return x.MetricTags } @@ -72904,7 +73920,7 @@ func (x *PatternFlowEthernetPauseControlOpCode) GetMetricTags() []*PatternFlowEt } // integer counter pattern -type PatternFlowEthernetPauseTimeCounter struct { +type PatternFlowEthernetPfcQueueCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -72920,23 +73936,23 @@ type PatternFlowEthernetPauseTimeCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowEthernetPauseTimeCounter) Reset() { - *x = PatternFlowEthernetPauseTimeCounter{} +func (x *PatternFlowEthernetPfcQueueCounter) Reset() { + *x = PatternFlowEthernetPfcQueueCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[602] + mi := &file_otg_proto_msgTypes[584] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseTimeCounter) String() string { +func (x *PatternFlowEthernetPfcQueueCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseTimeCounter) ProtoMessage() {} +func (*PatternFlowEthernetPfcQueueCounter) ProtoMessage() {} -func (x *PatternFlowEthernetPauseTimeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[602] +func (x *PatternFlowEthernetPfcQueueCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[584] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72947,26 +73963,26 @@ func (x *PatternFlowEthernetPauseTimeCounter) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseTimeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseTimeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{602} +// Deprecated: Use PatternFlowEthernetPfcQueueCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPfcQueueCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{584} } -func (x *PatternFlowEthernetPauseTimeCounter) GetStart() uint32 { +func (x *PatternFlowEthernetPfcQueueCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowEthernetPauseTimeCounter) GetStep() uint32 { +func (x *PatternFlowEthernetPfcQueueCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowEthernetPauseTimeCounter) GetCount() uint32 { +func (x *PatternFlowEthernetPfcQueueCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -72976,7 +73992,7 @@ func (x *PatternFlowEthernetPauseTimeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowEthernetPauseTimeMetricTag struct { +type PatternFlowEthernetPfcQueueMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -72990,27 +74006,27 @@ type PatternFlowEthernetPauseTimeMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 3 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowEthernetPauseTimeMetricTag) Reset() { - *x = PatternFlowEthernetPauseTimeMetricTag{} +func (x *PatternFlowEthernetPfcQueueMetricTag) Reset() { + *x = PatternFlowEthernetPfcQueueMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[603] + mi := &file_otg_proto_msgTypes[585] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseTimeMetricTag) String() string { +func (x *PatternFlowEthernetPfcQueueMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseTimeMetricTag) ProtoMessage() {} +func (*PatternFlowEthernetPfcQueueMetricTag) ProtoMessage() {} -func (x *PatternFlowEthernetPauseTimeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[603] +func (x *PatternFlowEthernetPfcQueueMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[585] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73021,41 +74037,41 @@ func (x *PatternFlowEthernetPauseTimeMetricTag) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseTimeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseTimeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{603} +// Deprecated: Use PatternFlowEthernetPfcQueueMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPfcQueueMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{585} } -func (x *PatternFlowEthernetPauseTimeMetricTag) GetName() string { +func (x *PatternFlowEthernetPfcQueueMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowEthernetPauseTimeMetricTag) GetOffset() uint32 { +func (x *PatternFlowEthernetPfcQueueMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowEthernetPauseTimeMetricTag) GetLength() uint32 { +func (x *PatternFlowEthernetPfcQueueMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Time -type PatternFlowEthernetPauseTime struct { +// Priority flow control queue +type PatternFlowEthernetPfcQueue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowEthernetPauseTime_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetPauseTime_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowEthernetPfcQueue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetPfcQueue_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -73063,32 +74079,32 @@ type PatternFlowEthernetPauseTime struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowEthernetPauseTimeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowEthernetPfcQueueCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowEthernetPauseTimeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowEthernetPfcQueueCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowEthernetPauseTimeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowEthernetPfcQueueMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowEthernetPauseTime) Reset() { - *x = PatternFlowEthernetPauseTime{} +func (x *PatternFlowEthernetPfcQueue) Reset() { + *x = PatternFlowEthernetPfcQueue{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[604] + mi := &file_otg_proto_msgTypes[586] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseTime) String() string { +func (x *PatternFlowEthernetPfcQueue) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseTime) ProtoMessage() {} +func (*PatternFlowEthernetPfcQueue) ProtoMessage() {} -func (x *PatternFlowEthernetPauseTime) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[604] +func (x *PatternFlowEthernetPfcQueue) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[586] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73099,47 +74115,47 @@ func (x *PatternFlowEthernetPauseTime) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseTime.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseTime) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{604} +// Deprecated: Use PatternFlowEthernetPfcQueue.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPfcQueue) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{586} } -func (x *PatternFlowEthernetPauseTime) GetChoice() PatternFlowEthernetPauseTime_Choice_Enum { +func (x *PatternFlowEthernetPfcQueue) GetChoice() PatternFlowEthernetPfcQueue_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowEthernetPauseTime_Choice_unspecified + return PatternFlowEthernetPfcQueue_Choice_unspecified } -func (x *PatternFlowEthernetPauseTime) GetValue() uint32 { +func (x *PatternFlowEthernetPfcQueue) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowEthernetPauseTime) GetValues() []uint32 { +func (x *PatternFlowEthernetPfcQueue) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowEthernetPauseTime) GetIncrement() *PatternFlowEthernetPauseTimeCounter { +func (x *PatternFlowEthernetPfcQueue) GetIncrement() *PatternFlowEthernetPfcQueueCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowEthernetPauseTime) GetDecrement() *PatternFlowEthernetPauseTimeCounter { +func (x *PatternFlowEthernetPfcQueue) GetDecrement() *PatternFlowEthernetPfcQueueCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowEthernetPauseTime) GetMetricTags() []*PatternFlowEthernetPauseTimeMetricTag { +func (x *PatternFlowEthernetPfcQueue) GetMetricTags() []*PatternFlowEthernetPfcQueueMetricTag { if x != nil { return x.MetricTags } @@ -73147,7 +74163,7 @@ func (x *PatternFlowEthernetPauseTime) GetMetricTags() []*PatternFlowEthernetPau } // integer counter pattern -type PatternFlowTcpSrcPortCounter struct { +type PatternFlowVlanPriorityCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -73163,23 +74179,23 @@ type PatternFlowTcpSrcPortCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpSrcPortCounter) Reset() { - *x = PatternFlowTcpSrcPortCounter{} +func (x *PatternFlowVlanPriorityCounter) Reset() { + *x = PatternFlowVlanPriorityCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[605] + mi := &file_otg_proto_msgTypes[587] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpSrcPortCounter) String() string { +func (x *PatternFlowVlanPriorityCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpSrcPortCounter) ProtoMessage() {} +func (*PatternFlowVlanPriorityCounter) ProtoMessage() {} -func (x *PatternFlowTcpSrcPortCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[605] +func (x *PatternFlowVlanPriorityCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[587] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73190,26 +74206,26 @@ func (x *PatternFlowTcpSrcPortCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpSrcPortCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpSrcPortCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{605} +// Deprecated: Use PatternFlowVlanPriorityCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanPriorityCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{587} } -func (x *PatternFlowTcpSrcPortCounter) GetStart() uint32 { +func (x *PatternFlowVlanPriorityCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpSrcPortCounter) GetStep() uint32 { +func (x *PatternFlowVlanPriorityCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpSrcPortCounter) GetCount() uint32 { +func (x *PatternFlowVlanPriorityCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -73219,7 +74235,7 @@ func (x *PatternFlowTcpSrcPortCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpSrcPortMetricTag struct { +type PatternFlowVlanPriorityMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -73233,27 +74249,27 @@ type PatternFlowTcpSrcPortMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 3 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpSrcPortMetricTag) Reset() { - *x = PatternFlowTcpSrcPortMetricTag{} +func (x *PatternFlowVlanPriorityMetricTag) Reset() { + *x = PatternFlowVlanPriorityMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[606] + mi := &file_otg_proto_msgTypes[588] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpSrcPortMetricTag) String() string { +func (x *PatternFlowVlanPriorityMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpSrcPortMetricTag) ProtoMessage() {} +func (*PatternFlowVlanPriorityMetricTag) ProtoMessage() {} -func (x *PatternFlowTcpSrcPortMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[606] +func (x *PatternFlowVlanPriorityMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[588] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73264,41 +74280,41 @@ func (x *PatternFlowTcpSrcPortMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpSrcPortMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpSrcPortMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{606} +// Deprecated: Use PatternFlowVlanPriorityMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanPriorityMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{588} } -func (x *PatternFlowTcpSrcPortMetricTag) GetName() string { +func (x *PatternFlowVlanPriorityMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpSrcPortMetricTag) GetOffset() uint32 { +func (x *PatternFlowVlanPriorityMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpSrcPortMetricTag) GetLength() uint32 { +func (x *PatternFlowVlanPriorityMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Source port -type PatternFlowTcpSrcPort struct { +// Priority code point +type PatternFlowVlanPriority struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowTcpSrcPort_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpSrcPort_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowVlanPriority_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVlanPriority_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -73306,32 +74322,32 @@ type PatternFlowTcpSrcPort struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowTcpSrcPortCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowVlanPriorityCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpSrcPortCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowVlanPriorityCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpSrcPortMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowVlanPriorityMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpSrcPort) Reset() { - *x = PatternFlowTcpSrcPort{} +func (x *PatternFlowVlanPriority) Reset() { + *x = PatternFlowVlanPriority{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[607] + mi := &file_otg_proto_msgTypes[589] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpSrcPort) String() string { +func (x *PatternFlowVlanPriority) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpSrcPort) ProtoMessage() {} +func (*PatternFlowVlanPriority) ProtoMessage() {} -func (x *PatternFlowTcpSrcPort) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[607] +func (x *PatternFlowVlanPriority) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[589] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73342,47 +74358,47 @@ func (x *PatternFlowTcpSrcPort) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpSrcPort.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpSrcPort) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{607} +// Deprecated: Use PatternFlowVlanPriority.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanPriority) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{589} } -func (x *PatternFlowTcpSrcPort) GetChoice() PatternFlowTcpSrcPort_Choice_Enum { +func (x *PatternFlowVlanPriority) GetChoice() PatternFlowVlanPriority_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpSrcPort_Choice_unspecified + return PatternFlowVlanPriority_Choice_unspecified } -func (x *PatternFlowTcpSrcPort) GetValue() uint32 { +func (x *PatternFlowVlanPriority) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpSrcPort) GetValues() []uint32 { +func (x *PatternFlowVlanPriority) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpSrcPort) GetIncrement() *PatternFlowTcpSrcPortCounter { +func (x *PatternFlowVlanPriority) GetIncrement() *PatternFlowVlanPriorityCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpSrcPort) GetDecrement() *PatternFlowTcpSrcPortCounter { +func (x *PatternFlowVlanPriority) GetDecrement() *PatternFlowVlanPriorityCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpSrcPort) GetMetricTags() []*PatternFlowTcpSrcPortMetricTag { +func (x *PatternFlowVlanPriority) GetMetricTags() []*PatternFlowVlanPriorityMetricTag { if x != nil { return x.MetricTags } @@ -73390,7 +74406,7 @@ func (x *PatternFlowTcpSrcPort) GetMetricTags() []*PatternFlowTcpSrcPortMetricTa } // integer counter pattern -type PatternFlowTcpDstPortCounter struct { +type PatternFlowVlanCfiCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -73406,23 +74422,23 @@ type PatternFlowTcpDstPortCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpDstPortCounter) Reset() { - *x = PatternFlowTcpDstPortCounter{} +func (x *PatternFlowVlanCfiCounter) Reset() { + *x = PatternFlowVlanCfiCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[608] + mi := &file_otg_proto_msgTypes[590] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpDstPortCounter) String() string { +func (x *PatternFlowVlanCfiCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpDstPortCounter) ProtoMessage() {} +func (*PatternFlowVlanCfiCounter) ProtoMessage() {} -func (x *PatternFlowTcpDstPortCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[608] +func (x *PatternFlowVlanCfiCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[590] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73433,26 +74449,26 @@ func (x *PatternFlowTcpDstPortCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpDstPortCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpDstPortCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{608} +// Deprecated: Use PatternFlowVlanCfiCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanCfiCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{590} } -func (x *PatternFlowTcpDstPortCounter) GetStart() uint32 { +func (x *PatternFlowVlanCfiCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpDstPortCounter) GetStep() uint32 { +func (x *PatternFlowVlanCfiCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpDstPortCounter) GetCount() uint32 { +func (x *PatternFlowVlanCfiCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -73462,7 +74478,7 @@ func (x *PatternFlowTcpDstPortCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpDstPortMetricTag struct { +type PatternFlowVlanCfiMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -73476,27 +74492,27 @@ type PatternFlowTcpDstPortMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 1 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpDstPortMetricTag) Reset() { - *x = PatternFlowTcpDstPortMetricTag{} +func (x *PatternFlowVlanCfiMetricTag) Reset() { + *x = PatternFlowVlanCfiMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[609] + mi := &file_otg_proto_msgTypes[591] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpDstPortMetricTag) String() string { +func (x *PatternFlowVlanCfiMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpDstPortMetricTag) ProtoMessage() {} +func (*PatternFlowVlanCfiMetricTag) ProtoMessage() {} -func (x *PatternFlowTcpDstPortMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[609] +func (x *PatternFlowVlanCfiMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[591] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73507,41 +74523,41 @@ func (x *PatternFlowTcpDstPortMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpDstPortMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpDstPortMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{609} +// Deprecated: Use PatternFlowVlanCfiMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanCfiMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{591} } -func (x *PatternFlowTcpDstPortMetricTag) GetName() string { +func (x *PatternFlowVlanCfiMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpDstPortMetricTag) GetOffset() uint32 { +func (x *PatternFlowVlanCfiMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpDstPortMetricTag) GetLength() uint32 { +func (x *PatternFlowVlanCfiMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Destination port -type PatternFlowTcpDstPort struct { +// Canonical format indicator or drop elegible indicator +type PatternFlowVlanCfi struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowTcpDstPort_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpDstPort_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowVlanCfi_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVlanCfi_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -73549,32 +74565,32 @@ type PatternFlowTcpDstPort struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowTcpDstPortCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowVlanCfiCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpDstPortCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowVlanCfiCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpDstPortMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowVlanCfiMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpDstPort) Reset() { - *x = PatternFlowTcpDstPort{} +func (x *PatternFlowVlanCfi) Reset() { + *x = PatternFlowVlanCfi{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[610] + mi := &file_otg_proto_msgTypes[592] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpDstPort) String() string { +func (x *PatternFlowVlanCfi) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpDstPort) ProtoMessage() {} +func (*PatternFlowVlanCfi) ProtoMessage() {} -func (x *PatternFlowTcpDstPort) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[610] +func (x *PatternFlowVlanCfi) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[592] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73585,47 +74601,47 @@ func (x *PatternFlowTcpDstPort) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpDstPort.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpDstPort) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{610} +// Deprecated: Use PatternFlowVlanCfi.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanCfi) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{592} } -func (x *PatternFlowTcpDstPort) GetChoice() PatternFlowTcpDstPort_Choice_Enum { +func (x *PatternFlowVlanCfi) GetChoice() PatternFlowVlanCfi_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpDstPort_Choice_unspecified + return PatternFlowVlanCfi_Choice_unspecified } -func (x *PatternFlowTcpDstPort) GetValue() uint32 { +func (x *PatternFlowVlanCfi) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpDstPort) GetValues() []uint32 { +func (x *PatternFlowVlanCfi) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpDstPort) GetIncrement() *PatternFlowTcpDstPortCounter { +func (x *PatternFlowVlanCfi) GetIncrement() *PatternFlowVlanCfiCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpDstPort) GetDecrement() *PatternFlowTcpDstPortCounter { +func (x *PatternFlowVlanCfi) GetDecrement() *PatternFlowVlanCfiCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpDstPort) GetMetricTags() []*PatternFlowTcpDstPortMetricTag { +func (x *PatternFlowVlanCfi) GetMetricTags() []*PatternFlowVlanCfiMetricTag { if x != nil { return x.MetricTags } @@ -73633,7 +74649,7 @@ func (x *PatternFlowTcpDstPort) GetMetricTags() []*PatternFlowTcpDstPortMetricTa } // integer counter pattern -type PatternFlowTcpSeqNumCounter struct { +type PatternFlowVlanIdCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -73649,23 +74665,23 @@ type PatternFlowTcpSeqNumCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpSeqNumCounter) Reset() { - *x = PatternFlowTcpSeqNumCounter{} +func (x *PatternFlowVlanIdCounter) Reset() { + *x = PatternFlowVlanIdCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[611] + mi := &file_otg_proto_msgTypes[593] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpSeqNumCounter) String() string { +func (x *PatternFlowVlanIdCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpSeqNumCounter) ProtoMessage() {} +func (*PatternFlowVlanIdCounter) ProtoMessage() {} -func (x *PatternFlowTcpSeqNumCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[611] +func (x *PatternFlowVlanIdCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[593] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73676,26 +74692,26 @@ func (x *PatternFlowTcpSeqNumCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpSeqNumCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpSeqNumCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{611} +// Deprecated: Use PatternFlowVlanIdCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanIdCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{593} } -func (x *PatternFlowTcpSeqNumCounter) GetStart() uint32 { +func (x *PatternFlowVlanIdCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpSeqNumCounter) GetStep() uint32 { +func (x *PatternFlowVlanIdCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpSeqNumCounter) GetCount() uint32 { +func (x *PatternFlowVlanIdCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -73705,7 +74721,7 @@ func (x *PatternFlowTcpSeqNumCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpSeqNumMetricTag struct { +type PatternFlowVlanIdMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -73719,27 +74735,27 @@ type PatternFlowTcpSeqNumMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 32 + // default = 12 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpSeqNumMetricTag) Reset() { - *x = PatternFlowTcpSeqNumMetricTag{} +func (x *PatternFlowVlanIdMetricTag) Reset() { + *x = PatternFlowVlanIdMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[612] + mi := &file_otg_proto_msgTypes[594] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpSeqNumMetricTag) String() string { +func (x *PatternFlowVlanIdMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpSeqNumMetricTag) ProtoMessage() {} +func (*PatternFlowVlanIdMetricTag) ProtoMessage() {} -func (x *PatternFlowTcpSeqNumMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[612] +func (x *PatternFlowVlanIdMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[594] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73750,41 +74766,41 @@ func (x *PatternFlowTcpSeqNumMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpSeqNumMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpSeqNumMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{612} +// Deprecated: Use PatternFlowVlanIdMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanIdMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{594} } -func (x *PatternFlowTcpSeqNumMetricTag) GetName() string { +func (x *PatternFlowVlanIdMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpSeqNumMetricTag) GetOffset() uint32 { +func (x *PatternFlowVlanIdMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpSeqNumMetricTag) GetLength() uint32 { +func (x *PatternFlowVlanIdMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Sequence number -type PatternFlowTcpSeqNum struct { +// Vlan identifier +type PatternFlowVlanId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowTcpSeqNum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpSeqNum_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowVlanId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVlanId_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -73792,32 +74808,32 @@ type PatternFlowTcpSeqNum struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowTcpSeqNumCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowVlanIdCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpSeqNumCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowVlanIdCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpSeqNumMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowVlanIdMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpSeqNum) Reset() { - *x = PatternFlowTcpSeqNum{} +func (x *PatternFlowVlanId) Reset() { + *x = PatternFlowVlanId{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[613] + mi := &file_otg_proto_msgTypes[595] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpSeqNum) String() string { +func (x *PatternFlowVlanId) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpSeqNum) ProtoMessage() {} +func (*PatternFlowVlanId) ProtoMessage() {} -func (x *PatternFlowTcpSeqNum) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[613] +func (x *PatternFlowVlanId) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[595] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73828,47 +74844,47 @@ func (x *PatternFlowTcpSeqNum) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpSeqNum.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpSeqNum) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{613} +// Deprecated: Use PatternFlowVlanId.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanId) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{595} } -func (x *PatternFlowTcpSeqNum) GetChoice() PatternFlowTcpSeqNum_Choice_Enum { +func (x *PatternFlowVlanId) GetChoice() PatternFlowVlanId_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpSeqNum_Choice_unspecified + return PatternFlowVlanId_Choice_unspecified } -func (x *PatternFlowTcpSeqNum) GetValue() uint32 { +func (x *PatternFlowVlanId) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpSeqNum) GetValues() []uint32 { +func (x *PatternFlowVlanId) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpSeqNum) GetIncrement() *PatternFlowTcpSeqNumCounter { +func (x *PatternFlowVlanId) GetIncrement() *PatternFlowVlanIdCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpSeqNum) GetDecrement() *PatternFlowTcpSeqNumCounter { +func (x *PatternFlowVlanId) GetDecrement() *PatternFlowVlanIdCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpSeqNum) GetMetricTags() []*PatternFlowTcpSeqNumMetricTag { +func (x *PatternFlowVlanId) GetMetricTags() []*PatternFlowVlanIdMetricTag { if x != nil { return x.MetricTags } @@ -73876,13 +74892,13 @@ func (x *PatternFlowTcpSeqNum) GetMetricTags() []*PatternFlowTcpSeqNumMetricTag } // integer counter pattern -type PatternFlowTcpAckNumCounter struct { +type PatternFlowVlanTpidCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 + // default = 65535 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -73892,23 +74908,23 @@ type PatternFlowTcpAckNumCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpAckNumCounter) Reset() { - *x = PatternFlowTcpAckNumCounter{} +func (x *PatternFlowVlanTpidCounter) Reset() { + *x = PatternFlowVlanTpidCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[614] + mi := &file_otg_proto_msgTypes[596] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpAckNumCounter) String() string { +func (x *PatternFlowVlanTpidCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpAckNumCounter) ProtoMessage() {} +func (*PatternFlowVlanTpidCounter) ProtoMessage() {} -func (x *PatternFlowTcpAckNumCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[614] +func (x *PatternFlowVlanTpidCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[596] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73919,26 +74935,26 @@ func (x *PatternFlowTcpAckNumCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpAckNumCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpAckNumCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{614} +// Deprecated: Use PatternFlowVlanTpidCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanTpidCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{596} } -func (x *PatternFlowTcpAckNumCounter) GetStart() uint32 { +func (x *PatternFlowVlanTpidCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpAckNumCounter) GetStep() uint32 { +func (x *PatternFlowVlanTpidCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpAckNumCounter) GetCount() uint32 { +func (x *PatternFlowVlanTpidCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -73948,7 +74964,7 @@ func (x *PatternFlowTcpAckNumCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpAckNumMetricTag struct { +type PatternFlowVlanTpidMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -73962,27 +74978,27 @@ type PatternFlowTcpAckNumMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 32 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpAckNumMetricTag) Reset() { - *x = PatternFlowTcpAckNumMetricTag{} +func (x *PatternFlowVlanTpidMetricTag) Reset() { + *x = PatternFlowVlanTpidMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[615] + mi := &file_otg_proto_msgTypes[597] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpAckNumMetricTag) String() string { +func (x *PatternFlowVlanTpidMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpAckNumMetricTag) ProtoMessage() {} +func (*PatternFlowVlanTpidMetricTag) ProtoMessage() {} -func (x *PatternFlowTcpAckNumMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[615] +func (x *PatternFlowVlanTpidMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[597] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73993,74 +75009,74 @@ func (x *PatternFlowTcpAckNumMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpAckNumMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpAckNumMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{615} +// Deprecated: Use PatternFlowVlanTpidMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanTpidMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{597} } -func (x *PatternFlowTcpAckNumMetricTag) GetName() string { +func (x *PatternFlowVlanTpidMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpAckNumMetricTag) GetOffset() uint32 { +func (x *PatternFlowVlanTpidMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpAckNumMetricTag) GetLength() uint32 { +func (x *PatternFlowVlanTpidMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Acknowledgement number -type PatternFlowTcpAckNum struct { +// Protocol identifier +type PatternFlowVlanTpid struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowTcpAckNum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpAckNum_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowVlanTpid_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVlanTpid_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 + // default = 65535 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] + // default = [65535] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowTcpAckNumCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowVlanTpidCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpAckNumCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowVlanTpidCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpAckNumMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowVlanTpidMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpAckNum) Reset() { - *x = PatternFlowTcpAckNum{} +func (x *PatternFlowVlanTpid) Reset() { + *x = PatternFlowVlanTpid{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[616] + mi := &file_otg_proto_msgTypes[598] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpAckNum) String() string { +func (x *PatternFlowVlanTpid) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpAckNum) ProtoMessage() {} +func (*PatternFlowVlanTpid) ProtoMessage() {} -func (x *PatternFlowTcpAckNum) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[616] +func (x *PatternFlowVlanTpid) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[598] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -74071,47 +75087,47 @@ func (x *PatternFlowTcpAckNum) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpAckNum.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpAckNum) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{616} +// Deprecated: Use PatternFlowVlanTpid.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanTpid) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{598} } -func (x *PatternFlowTcpAckNum) GetChoice() PatternFlowTcpAckNum_Choice_Enum { +func (x *PatternFlowVlanTpid) GetChoice() PatternFlowVlanTpid_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpAckNum_Choice_unspecified + return PatternFlowVlanTpid_Choice_unspecified } -func (x *PatternFlowTcpAckNum) GetValue() uint32 { +func (x *PatternFlowVlanTpid) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpAckNum) GetValues() []uint32 { +func (x *PatternFlowVlanTpid) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpAckNum) GetIncrement() *PatternFlowTcpAckNumCounter { +func (x *PatternFlowVlanTpid) GetIncrement() *PatternFlowVlanTpidCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpAckNum) GetDecrement() *PatternFlowTcpAckNumCounter { +func (x *PatternFlowVlanTpid) GetDecrement() *PatternFlowVlanTpidCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpAckNum) GetMetricTags() []*PatternFlowTcpAckNumMetricTag { +func (x *PatternFlowVlanTpid) GetMetricTags() []*PatternFlowVlanTpidMetricTag { if x != nil { return x.MetricTags } @@ -74119,13 +75135,13 @@ func (x *PatternFlowTcpAckNum) GetMetricTags() []*PatternFlowTcpAckNumMetricTag } // integer counter pattern -type PatternFlowTcpDataOffsetCounter struct { +type PatternFlowVxlanFlagsCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 + // default = 8 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -74135,23 +75151,23 @@ type PatternFlowTcpDataOffsetCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpDataOffsetCounter) Reset() { - *x = PatternFlowTcpDataOffsetCounter{} +func (x *PatternFlowVxlanFlagsCounter) Reset() { + *x = PatternFlowVxlanFlagsCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[617] + mi := &file_otg_proto_msgTypes[599] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpDataOffsetCounter) String() string { +func (x *PatternFlowVxlanFlagsCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpDataOffsetCounter) ProtoMessage() {} +func (*PatternFlowVxlanFlagsCounter) ProtoMessage() {} -func (x *PatternFlowTcpDataOffsetCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[617] +func (x *PatternFlowVxlanFlagsCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[599] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -74162,26 +75178,26 @@ func (x *PatternFlowTcpDataOffsetCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpDataOffsetCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpDataOffsetCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{617} +// Deprecated: Use PatternFlowVxlanFlagsCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanFlagsCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{599} } -func (x *PatternFlowTcpDataOffsetCounter) GetStart() uint32 { +func (x *PatternFlowVxlanFlagsCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpDataOffsetCounter) GetStep() uint32 { +func (x *PatternFlowVxlanFlagsCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpDataOffsetCounter) GetCount() uint32 { +func (x *PatternFlowVxlanFlagsCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -74191,7 +75207,7 @@ func (x *PatternFlowTcpDataOffsetCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpDataOffsetMetricTag struct { +type PatternFlowVxlanFlagsMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -74205,27 +75221,27 @@ type PatternFlowTcpDataOffsetMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 4 + // default = 8 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpDataOffsetMetricTag) Reset() { - *x = PatternFlowTcpDataOffsetMetricTag{} +func (x *PatternFlowVxlanFlagsMetricTag) Reset() { + *x = PatternFlowVxlanFlagsMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[618] + mi := &file_otg_proto_msgTypes[600] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpDataOffsetMetricTag) String() string { +func (x *PatternFlowVxlanFlagsMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpDataOffsetMetricTag) ProtoMessage() {} +func (*PatternFlowVxlanFlagsMetricTag) ProtoMessage() {} -func (x *PatternFlowTcpDataOffsetMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[618] +func (x *PatternFlowVxlanFlagsMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[600] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -74236,74 +75252,76 @@ func (x *PatternFlowTcpDataOffsetMetricTag) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpDataOffsetMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpDataOffsetMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{618} +// Deprecated: Use PatternFlowVxlanFlagsMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanFlagsMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{600} } -func (x *PatternFlowTcpDataOffsetMetricTag) GetName() string { +func (x *PatternFlowVxlanFlagsMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpDataOffsetMetricTag) GetOffset() uint32 { +func (x *PatternFlowVxlanFlagsMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpDataOffsetMetricTag) GetLength() uint32 { +func (x *PatternFlowVxlanFlagsMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// The number of 32 bit words in the TCP header. This indicates where the data begins. -type PatternFlowTcpDataOffset struct { +// Flags field with a bit format of RRRRIRRR. The I flag MUST be set to 1 for a valid +// vxlan network id (VNI). The other 7 bits (designated R) are reserved fields and +// MUST be set to zero on transmission and ignored on receipt. +type PatternFlowVxlanFlags struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowTcpDataOffset_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpDataOffset_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowVxlanFlags_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVxlanFlags_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 + // default = 8 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] + // default = [8] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowTcpDataOffsetCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowVxlanFlagsCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpDataOffsetCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowVxlanFlagsCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpDataOffsetMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowVxlanFlagsMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpDataOffset) Reset() { - *x = PatternFlowTcpDataOffset{} +func (x *PatternFlowVxlanFlags) Reset() { + *x = PatternFlowVxlanFlags{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[619] + mi := &file_otg_proto_msgTypes[601] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpDataOffset) String() string { +func (x *PatternFlowVxlanFlags) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpDataOffset) ProtoMessage() {} +func (*PatternFlowVxlanFlags) ProtoMessage() {} -func (x *PatternFlowTcpDataOffset) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[619] +func (x *PatternFlowVxlanFlags) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[601] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -74314,47 +75332,47 @@ func (x *PatternFlowTcpDataOffset) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpDataOffset.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpDataOffset) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{619} +// Deprecated: Use PatternFlowVxlanFlags.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanFlags) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{601} } -func (x *PatternFlowTcpDataOffset) GetChoice() PatternFlowTcpDataOffset_Choice_Enum { +func (x *PatternFlowVxlanFlags) GetChoice() PatternFlowVxlanFlags_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpDataOffset_Choice_unspecified + return PatternFlowVxlanFlags_Choice_unspecified } -func (x *PatternFlowTcpDataOffset) GetValue() uint32 { +func (x *PatternFlowVxlanFlags) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpDataOffset) GetValues() []uint32 { +func (x *PatternFlowVxlanFlags) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpDataOffset) GetIncrement() *PatternFlowTcpDataOffsetCounter { +func (x *PatternFlowVxlanFlags) GetIncrement() *PatternFlowVxlanFlagsCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpDataOffset) GetDecrement() *PatternFlowTcpDataOffsetCounter { +func (x *PatternFlowVxlanFlags) GetDecrement() *PatternFlowVxlanFlagsCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpDataOffset) GetMetricTags() []*PatternFlowTcpDataOffsetMetricTag { +func (x *PatternFlowVxlanFlags) GetMetricTags() []*PatternFlowVxlanFlagsMetricTag { if x != nil { return x.MetricTags } @@ -74362,7 +75380,7 @@ func (x *PatternFlowTcpDataOffset) GetMetricTags() []*PatternFlowTcpDataOffsetMe } // integer counter pattern -type PatternFlowTcpEcnNsCounter struct { +type PatternFlowVxlanReserved0Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -74378,23 +75396,23 @@ type PatternFlowTcpEcnNsCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpEcnNsCounter) Reset() { - *x = PatternFlowTcpEcnNsCounter{} +func (x *PatternFlowVxlanReserved0Counter) Reset() { + *x = PatternFlowVxlanReserved0Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[620] + mi := &file_otg_proto_msgTypes[602] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpEcnNsCounter) String() string { +func (x *PatternFlowVxlanReserved0Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpEcnNsCounter) ProtoMessage() {} +func (*PatternFlowVxlanReserved0Counter) ProtoMessage() {} -func (x *PatternFlowTcpEcnNsCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[620] +func (x *PatternFlowVxlanReserved0Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[602] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -74405,26 +75423,26 @@ func (x *PatternFlowTcpEcnNsCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpEcnNsCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpEcnNsCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{620} +// Deprecated: Use PatternFlowVxlanReserved0Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanReserved0Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{602} } -func (x *PatternFlowTcpEcnNsCounter) GetStart() uint32 { +func (x *PatternFlowVxlanReserved0Counter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpEcnNsCounter) GetStep() uint32 { +func (x *PatternFlowVxlanReserved0Counter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpEcnNsCounter) GetCount() uint32 { +func (x *PatternFlowVxlanReserved0Counter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -74434,7 +75452,7 @@ func (x *PatternFlowTcpEcnNsCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpEcnNsMetricTag struct { +type PatternFlowVxlanReserved0MetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -74448,27 +75466,27 @@ type PatternFlowTcpEcnNsMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 1 + // default = 24 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpEcnNsMetricTag) Reset() { - *x = PatternFlowTcpEcnNsMetricTag{} +func (x *PatternFlowVxlanReserved0MetricTag) Reset() { + *x = PatternFlowVxlanReserved0MetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[621] + mi := &file_otg_proto_msgTypes[603] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpEcnNsMetricTag) String() string { +func (x *PatternFlowVxlanReserved0MetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpEcnNsMetricTag) ProtoMessage() {} +func (*PatternFlowVxlanReserved0MetricTag) ProtoMessage() {} -func (x *PatternFlowTcpEcnNsMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[621] +func (x *PatternFlowVxlanReserved0MetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[603] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -74479,41 +75497,41 @@ func (x *PatternFlowTcpEcnNsMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpEcnNsMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpEcnNsMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{621} +// Deprecated: Use PatternFlowVxlanReserved0MetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanReserved0MetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{603} } -func (x *PatternFlowTcpEcnNsMetricTag) GetName() string { +func (x *PatternFlowVxlanReserved0MetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpEcnNsMetricTag) GetOffset() uint32 { +func (x *PatternFlowVxlanReserved0MetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpEcnNsMetricTag) GetLength() uint32 { +func (x *PatternFlowVxlanReserved0MetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Explicit congestion notification, concealment protection. -type PatternFlowTcpEcnNs struct { +// Reserved field +type PatternFlowVxlanReserved0 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowTcpEcnNs_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpEcnNs_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowVxlanReserved0_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVxlanReserved0_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -74521,32 +75539,32 @@ type PatternFlowTcpEcnNs struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowTcpEcnNsCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowVxlanReserved0Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpEcnNsCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowVxlanReserved0Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpEcnNsMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowVxlanReserved0MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpEcnNs) Reset() { - *x = PatternFlowTcpEcnNs{} +func (x *PatternFlowVxlanReserved0) Reset() { + *x = PatternFlowVxlanReserved0{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[622] + mi := &file_otg_proto_msgTypes[604] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpEcnNs) String() string { +func (x *PatternFlowVxlanReserved0) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpEcnNs) ProtoMessage() {} +func (*PatternFlowVxlanReserved0) ProtoMessage() {} -func (x *PatternFlowTcpEcnNs) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[622] +func (x *PatternFlowVxlanReserved0) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[604] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -74557,47 +75575,47 @@ func (x *PatternFlowTcpEcnNs) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpEcnNs.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpEcnNs) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{622} +// Deprecated: Use PatternFlowVxlanReserved0.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanReserved0) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{604} } -func (x *PatternFlowTcpEcnNs) GetChoice() PatternFlowTcpEcnNs_Choice_Enum { +func (x *PatternFlowVxlanReserved0) GetChoice() PatternFlowVxlanReserved0_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpEcnNs_Choice_unspecified + return PatternFlowVxlanReserved0_Choice_unspecified } -func (x *PatternFlowTcpEcnNs) GetValue() uint32 { +func (x *PatternFlowVxlanReserved0) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpEcnNs) GetValues() []uint32 { +func (x *PatternFlowVxlanReserved0) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpEcnNs) GetIncrement() *PatternFlowTcpEcnNsCounter { +func (x *PatternFlowVxlanReserved0) GetIncrement() *PatternFlowVxlanReserved0Counter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpEcnNs) GetDecrement() *PatternFlowTcpEcnNsCounter { +func (x *PatternFlowVxlanReserved0) GetDecrement() *PatternFlowVxlanReserved0Counter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpEcnNs) GetMetricTags() []*PatternFlowTcpEcnNsMetricTag { +func (x *PatternFlowVxlanReserved0) GetMetricTags() []*PatternFlowVxlanReserved0MetricTag { if x != nil { return x.MetricTags } @@ -74605,7 +75623,7 @@ func (x *PatternFlowTcpEcnNs) GetMetricTags() []*PatternFlowTcpEcnNsMetricTag { } // integer counter pattern -type PatternFlowTcpEcnCwrCounter struct { +type PatternFlowVxlanVniCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -74621,23 +75639,23 @@ type PatternFlowTcpEcnCwrCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpEcnCwrCounter) Reset() { - *x = PatternFlowTcpEcnCwrCounter{} +func (x *PatternFlowVxlanVniCounter) Reset() { + *x = PatternFlowVxlanVniCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[623] + mi := &file_otg_proto_msgTypes[605] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpEcnCwrCounter) String() string { +func (x *PatternFlowVxlanVniCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpEcnCwrCounter) ProtoMessage() {} +func (*PatternFlowVxlanVniCounter) ProtoMessage() {} -func (x *PatternFlowTcpEcnCwrCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[623] +func (x *PatternFlowVxlanVniCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[605] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -74648,26 +75666,26 @@ func (x *PatternFlowTcpEcnCwrCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpEcnCwrCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpEcnCwrCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{623} +// Deprecated: Use PatternFlowVxlanVniCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanVniCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{605} } -func (x *PatternFlowTcpEcnCwrCounter) GetStart() uint32 { +func (x *PatternFlowVxlanVniCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpEcnCwrCounter) GetStep() uint32 { +func (x *PatternFlowVxlanVniCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpEcnCwrCounter) GetCount() uint32 { +func (x *PatternFlowVxlanVniCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -74677,7 +75695,7 @@ func (x *PatternFlowTcpEcnCwrCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpEcnCwrMetricTag struct { +type PatternFlowVxlanVniMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -74691,27 +75709,27 @@ type PatternFlowTcpEcnCwrMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 1 + // default = 24 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpEcnCwrMetricTag) Reset() { - *x = PatternFlowTcpEcnCwrMetricTag{} +func (x *PatternFlowVxlanVniMetricTag) Reset() { + *x = PatternFlowVxlanVniMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[624] + mi := &file_otg_proto_msgTypes[606] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpEcnCwrMetricTag) String() string { +func (x *PatternFlowVxlanVniMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpEcnCwrMetricTag) ProtoMessage() {} +func (*PatternFlowVxlanVniMetricTag) ProtoMessage() {} -func (x *PatternFlowTcpEcnCwrMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[624] +func (x *PatternFlowVxlanVniMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[606] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -74722,74 +75740,79 @@ func (x *PatternFlowTcpEcnCwrMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpEcnCwrMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpEcnCwrMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{624} +// Deprecated: Use PatternFlowVxlanVniMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanVniMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{606} } -func (x *PatternFlowTcpEcnCwrMetricTag) GetName() string { +func (x *PatternFlowVxlanVniMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpEcnCwrMetricTag) GetOffset() uint32 { +func (x *PatternFlowVxlanVniMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpEcnCwrMetricTag) GetLength() uint32 { +func (x *PatternFlowVxlanVniMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Explicit congestion notification, congestion window reduced. -type PatternFlowTcpEcnCwr struct { +// VXLAN network id +type PatternFlowVxlanVni struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowTcpEcnCwr_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpEcnCwr_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.auto + Choice *PatternFlowVxlanVni_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVxlanVni_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // The OTG implementation can provide a system generated + // value for this property. If the OTG is unable to generate a value + // the default value must be used. + // default = 0 + Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` // Description missing in models - Increment *PatternFlowTcpEcnCwrCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowVxlanVniCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpEcnCwrCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowVxlanVniCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpEcnCwrMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowVxlanVniMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpEcnCwr) Reset() { - *x = PatternFlowTcpEcnCwr{} +func (x *PatternFlowVxlanVni) Reset() { + *x = PatternFlowVxlanVni{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[625] + mi := &file_otg_proto_msgTypes[607] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpEcnCwr) String() string { +func (x *PatternFlowVxlanVni) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpEcnCwr) ProtoMessage() {} +func (*PatternFlowVxlanVni) ProtoMessage() {} -func (x *PatternFlowTcpEcnCwr) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[625] +func (x *PatternFlowVxlanVni) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[607] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -74800,47 +75823,54 @@ func (x *PatternFlowTcpEcnCwr) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpEcnCwr.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpEcnCwr) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{625} +// Deprecated: Use PatternFlowVxlanVni.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanVni) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{607} } -func (x *PatternFlowTcpEcnCwr) GetChoice() PatternFlowTcpEcnCwr_Choice_Enum { +func (x *PatternFlowVxlanVni) GetChoice() PatternFlowVxlanVni_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpEcnCwr_Choice_unspecified + return PatternFlowVxlanVni_Choice_unspecified } -func (x *PatternFlowTcpEcnCwr) GetValue() uint32 { +func (x *PatternFlowVxlanVni) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpEcnCwr) GetValues() []uint32 { +func (x *PatternFlowVxlanVni) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpEcnCwr) GetIncrement() *PatternFlowTcpEcnCwrCounter { +func (x *PatternFlowVxlanVni) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto + } + return 0 +} + +func (x *PatternFlowVxlanVni) GetIncrement() *PatternFlowVxlanVniCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpEcnCwr) GetDecrement() *PatternFlowTcpEcnCwrCounter { +func (x *PatternFlowVxlanVni) GetDecrement() *PatternFlowVxlanVniCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpEcnCwr) GetMetricTags() []*PatternFlowTcpEcnCwrMetricTag { +func (x *PatternFlowVxlanVni) GetMetricTags() []*PatternFlowVxlanVniMetricTag { if x != nil { return x.MetricTags } @@ -74848,7 +75878,7 @@ func (x *PatternFlowTcpEcnCwr) GetMetricTags() []*PatternFlowTcpEcnCwrMetricTag } // integer counter pattern -type PatternFlowTcpEcnEchoCounter struct { +type PatternFlowVxlanReserved1Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -74864,23 +75894,23 @@ type PatternFlowTcpEcnEchoCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpEcnEchoCounter) Reset() { - *x = PatternFlowTcpEcnEchoCounter{} +func (x *PatternFlowVxlanReserved1Counter) Reset() { + *x = PatternFlowVxlanReserved1Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[626] + mi := &file_otg_proto_msgTypes[608] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpEcnEchoCounter) String() string { +func (x *PatternFlowVxlanReserved1Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpEcnEchoCounter) ProtoMessage() {} +func (*PatternFlowVxlanReserved1Counter) ProtoMessage() {} -func (x *PatternFlowTcpEcnEchoCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[626] +func (x *PatternFlowVxlanReserved1Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[608] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -74891,26 +75921,26 @@ func (x *PatternFlowTcpEcnEchoCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpEcnEchoCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpEcnEchoCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{626} +// Deprecated: Use PatternFlowVxlanReserved1Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanReserved1Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{608} } -func (x *PatternFlowTcpEcnEchoCounter) GetStart() uint32 { +func (x *PatternFlowVxlanReserved1Counter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpEcnEchoCounter) GetStep() uint32 { +func (x *PatternFlowVxlanReserved1Counter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpEcnEchoCounter) GetCount() uint32 { +func (x *PatternFlowVxlanReserved1Counter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -74920,7 +75950,7 @@ func (x *PatternFlowTcpEcnEchoCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpEcnEchoMetricTag struct { +type PatternFlowVxlanReserved1MetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -74934,27 +75964,27 @@ type PatternFlowTcpEcnEchoMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 1 + // default = 8 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpEcnEchoMetricTag) Reset() { - *x = PatternFlowTcpEcnEchoMetricTag{} +func (x *PatternFlowVxlanReserved1MetricTag) Reset() { + *x = PatternFlowVxlanReserved1MetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[627] + mi := &file_otg_proto_msgTypes[609] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpEcnEchoMetricTag) String() string { +func (x *PatternFlowVxlanReserved1MetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpEcnEchoMetricTag) ProtoMessage() {} +func (*PatternFlowVxlanReserved1MetricTag) ProtoMessage() {} -func (x *PatternFlowTcpEcnEchoMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[627] +func (x *PatternFlowVxlanReserved1MetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[609] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -74965,42 +75995,41 @@ func (x *PatternFlowTcpEcnEchoMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpEcnEchoMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpEcnEchoMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{627} +// Deprecated: Use PatternFlowVxlanReserved1MetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanReserved1MetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{609} } -func (x *PatternFlowTcpEcnEchoMetricTag) GetName() string { +func (x *PatternFlowVxlanReserved1MetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpEcnEchoMetricTag) GetOffset() uint32 { +func (x *PatternFlowVxlanReserved1MetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpEcnEchoMetricTag) GetLength() uint32 { +func (x *PatternFlowVxlanReserved1MetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Explicit congestion notification, echo. 1 indicates the peer is ecn capable. 0 indicates -// that a packet with ipv4.ecn = 11 in the ip header was received during normal transmission. -type PatternFlowTcpEcnEcho struct { +// Reserved field +type PatternFlowVxlanReserved1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowTcpEcnEcho_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpEcnEcho_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowVxlanReserved1_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowVxlanReserved1_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -75008,32 +76037,32 @@ type PatternFlowTcpEcnEcho struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowTcpEcnEchoCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowVxlanReserved1Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpEcnEchoCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowVxlanReserved1Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpEcnEchoMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowVxlanReserved1MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpEcnEcho) Reset() { - *x = PatternFlowTcpEcnEcho{} +func (x *PatternFlowVxlanReserved1) Reset() { + *x = PatternFlowVxlanReserved1{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[628] + mi := &file_otg_proto_msgTypes[610] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpEcnEcho) String() string { +func (x *PatternFlowVxlanReserved1) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpEcnEcho) ProtoMessage() {} +func (*PatternFlowVxlanReserved1) ProtoMessage() {} -func (x *PatternFlowTcpEcnEcho) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[628] +func (x *PatternFlowVxlanReserved1) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[610] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -75044,47 +76073,47 @@ func (x *PatternFlowTcpEcnEcho) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpEcnEcho.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpEcnEcho) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{628} +// Deprecated: Use PatternFlowVxlanReserved1.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanReserved1) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{610} } -func (x *PatternFlowTcpEcnEcho) GetChoice() PatternFlowTcpEcnEcho_Choice_Enum { +func (x *PatternFlowVxlanReserved1) GetChoice() PatternFlowVxlanReserved1_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpEcnEcho_Choice_unspecified + return PatternFlowVxlanReserved1_Choice_unspecified } -func (x *PatternFlowTcpEcnEcho) GetValue() uint32 { +func (x *PatternFlowVxlanReserved1) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpEcnEcho) GetValues() []uint32 { +func (x *PatternFlowVxlanReserved1) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpEcnEcho) GetIncrement() *PatternFlowTcpEcnEchoCounter { +func (x *PatternFlowVxlanReserved1) GetIncrement() *PatternFlowVxlanReserved1Counter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpEcnEcho) GetDecrement() *PatternFlowTcpEcnEchoCounter { +func (x *PatternFlowVxlanReserved1) GetDecrement() *PatternFlowVxlanReserved1Counter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpEcnEcho) GetMetricTags() []*PatternFlowTcpEcnEchoMetricTag { +func (x *PatternFlowVxlanReserved1) GetMetricTags() []*PatternFlowVxlanReserved1MetricTag { if x != nil { return x.MetricTags } @@ -75092,13 +76121,13 @@ func (x *PatternFlowTcpEcnEcho) GetMetricTags() []*PatternFlowTcpEcnEchoMetricTa } // integer counter pattern -type PatternFlowTcpCtlUrgCounter struct { +type PatternFlowIpv4VersionCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 + // default = 4 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -75108,23 +76137,23 @@ type PatternFlowTcpCtlUrgCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpCtlUrgCounter) Reset() { - *x = PatternFlowTcpCtlUrgCounter{} +func (x *PatternFlowIpv4VersionCounter) Reset() { + *x = PatternFlowIpv4VersionCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[629] + mi := &file_otg_proto_msgTypes[611] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlUrgCounter) String() string { +func (x *PatternFlowIpv4VersionCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlUrgCounter) ProtoMessage() {} +func (*PatternFlowIpv4VersionCounter) ProtoMessage() {} -func (x *PatternFlowTcpCtlUrgCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[629] +func (x *PatternFlowIpv4VersionCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[611] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -75135,26 +76164,26 @@ func (x *PatternFlowTcpCtlUrgCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlUrgCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlUrgCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{629} +// Deprecated: Use PatternFlowIpv4VersionCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4VersionCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{611} } -func (x *PatternFlowTcpCtlUrgCounter) GetStart() uint32 { +func (x *PatternFlowIpv4VersionCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpCtlUrgCounter) GetStep() uint32 { +func (x *PatternFlowIpv4VersionCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpCtlUrgCounter) GetCount() uint32 { +func (x *PatternFlowIpv4VersionCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -75164,7 +76193,7 @@ func (x *PatternFlowTcpCtlUrgCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpCtlUrgMetricTag struct { +type PatternFlowIpv4VersionMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -75178,27 +76207,27 @@ type PatternFlowTcpCtlUrgMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 1 + // default = 4 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpCtlUrgMetricTag) Reset() { - *x = PatternFlowTcpCtlUrgMetricTag{} +func (x *PatternFlowIpv4VersionMetricTag) Reset() { + *x = PatternFlowIpv4VersionMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[630] + mi := &file_otg_proto_msgTypes[612] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlUrgMetricTag) String() string { +func (x *PatternFlowIpv4VersionMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlUrgMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4VersionMetricTag) ProtoMessage() {} -func (x *PatternFlowTcpCtlUrgMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[630] +func (x *PatternFlowIpv4VersionMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[612] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -75209,74 +76238,74 @@ func (x *PatternFlowTcpCtlUrgMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlUrgMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlUrgMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{630} +// Deprecated: Use PatternFlowIpv4VersionMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4VersionMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{612} } -func (x *PatternFlowTcpCtlUrgMetricTag) GetName() string { +func (x *PatternFlowIpv4VersionMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpCtlUrgMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4VersionMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpCtlUrgMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4VersionMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// A value of 1 indicates that the urgent pointer field is significant. -type PatternFlowTcpCtlUrg struct { +// Version +type PatternFlowIpv4Version struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowTcpCtlUrg_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpCtlUrg_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4Version_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4Version_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 + // default = 4 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] + // default = [4] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowTcpCtlUrgCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4VersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpCtlUrgCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4VersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpCtlUrgMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4VersionMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpCtlUrg) Reset() { - *x = PatternFlowTcpCtlUrg{} +func (x *PatternFlowIpv4Version) Reset() { + *x = PatternFlowIpv4Version{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[631] + mi := &file_otg_proto_msgTypes[613] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlUrg) String() string { +func (x *PatternFlowIpv4Version) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlUrg) ProtoMessage() {} +func (*PatternFlowIpv4Version) ProtoMessage() {} -func (x *PatternFlowTcpCtlUrg) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[631] +func (x *PatternFlowIpv4Version) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[613] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -75287,47 +76316,47 @@ func (x *PatternFlowTcpCtlUrg) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlUrg.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlUrg) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{631} +// Deprecated: Use PatternFlowIpv4Version.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4Version) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{613} } -func (x *PatternFlowTcpCtlUrg) GetChoice() PatternFlowTcpCtlUrg_Choice_Enum { +func (x *PatternFlowIpv4Version) GetChoice() PatternFlowIpv4Version_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpCtlUrg_Choice_unspecified + return PatternFlowIpv4Version_Choice_unspecified } -func (x *PatternFlowTcpCtlUrg) GetValue() uint32 { +func (x *PatternFlowIpv4Version) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpCtlUrg) GetValues() []uint32 { +func (x *PatternFlowIpv4Version) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpCtlUrg) GetIncrement() *PatternFlowTcpCtlUrgCounter { +func (x *PatternFlowIpv4Version) GetIncrement() *PatternFlowIpv4VersionCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpCtlUrg) GetDecrement() *PatternFlowTcpCtlUrgCounter { +func (x *PatternFlowIpv4Version) GetDecrement() *PatternFlowIpv4VersionCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpCtlUrg) GetMetricTags() []*PatternFlowTcpCtlUrgMetricTag { +func (x *PatternFlowIpv4Version) GetMetricTags() []*PatternFlowIpv4VersionMetricTag { if x != nil { return x.MetricTags } @@ -75335,13 +76364,13 @@ func (x *PatternFlowTcpCtlUrg) GetMetricTags() []*PatternFlowTcpCtlUrgMetricTag } // integer counter pattern -type PatternFlowTcpCtlAckCounter struct { +type PatternFlowIpv4HeaderLengthCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 + // default = 5 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -75351,23 +76380,23 @@ type PatternFlowTcpCtlAckCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpCtlAckCounter) Reset() { - *x = PatternFlowTcpCtlAckCounter{} +func (x *PatternFlowIpv4HeaderLengthCounter) Reset() { + *x = PatternFlowIpv4HeaderLengthCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[632] + mi := &file_otg_proto_msgTypes[614] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlAckCounter) String() string { +func (x *PatternFlowIpv4HeaderLengthCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlAckCounter) ProtoMessage() {} +func (*PatternFlowIpv4HeaderLengthCounter) ProtoMessage() {} -func (x *PatternFlowTcpCtlAckCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[632] +func (x *PatternFlowIpv4HeaderLengthCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[614] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -75378,26 +76407,26 @@ func (x *PatternFlowTcpCtlAckCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlAckCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlAckCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{632} +// Deprecated: Use PatternFlowIpv4HeaderLengthCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4HeaderLengthCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{614} } -func (x *PatternFlowTcpCtlAckCounter) GetStart() uint32 { +func (x *PatternFlowIpv4HeaderLengthCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpCtlAckCounter) GetStep() uint32 { +func (x *PatternFlowIpv4HeaderLengthCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpCtlAckCounter) GetCount() uint32 { +func (x *PatternFlowIpv4HeaderLengthCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -75407,7 +76436,7 @@ func (x *PatternFlowTcpCtlAckCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpCtlAckMetricTag struct { +type PatternFlowIpv4HeaderLengthMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -75421,27 +76450,27 @@ type PatternFlowTcpCtlAckMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 1 + // default = 4 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpCtlAckMetricTag) Reset() { - *x = PatternFlowTcpCtlAckMetricTag{} +func (x *PatternFlowIpv4HeaderLengthMetricTag) Reset() { + *x = PatternFlowIpv4HeaderLengthMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[633] + mi := &file_otg_proto_msgTypes[615] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlAckMetricTag) String() string { +func (x *PatternFlowIpv4HeaderLengthMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlAckMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4HeaderLengthMetricTag) ProtoMessage() {} -func (x *PatternFlowTcpCtlAckMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[633] +func (x *PatternFlowIpv4HeaderLengthMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[615] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -75452,74 +76481,79 @@ func (x *PatternFlowTcpCtlAckMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlAckMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlAckMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{633} +// Deprecated: Use PatternFlowIpv4HeaderLengthMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4HeaderLengthMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{615} } -func (x *PatternFlowTcpCtlAckMetricTag) GetName() string { +func (x *PatternFlowIpv4HeaderLengthMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpCtlAckMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4HeaderLengthMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpCtlAckMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4HeaderLengthMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// A value of 1 indicates that the ackknowledgment field is significant. -type PatternFlowTcpCtlAck struct { +// Header length +type PatternFlowIpv4HeaderLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowTcpCtlAck_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpCtlAck_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.auto + Choice *PatternFlowIpv4HeaderLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4HeaderLength_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 + // default = 5 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] + // default = [5] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // The OTG implementation can provide a system generated + // value for this property. If the OTG is unable to generate a value + // the default value must be used. + // default = 5 + Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` // Description missing in models - Increment *PatternFlowTcpCtlAckCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4HeaderLengthCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpCtlAckCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4HeaderLengthCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpCtlAckMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4HeaderLengthMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpCtlAck) Reset() { - *x = PatternFlowTcpCtlAck{} +func (x *PatternFlowIpv4HeaderLength) Reset() { + *x = PatternFlowIpv4HeaderLength{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[634] + mi := &file_otg_proto_msgTypes[616] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlAck) String() string { +func (x *PatternFlowIpv4HeaderLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlAck) ProtoMessage() {} +func (*PatternFlowIpv4HeaderLength) ProtoMessage() {} -func (x *PatternFlowTcpCtlAck) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[634] +func (x *PatternFlowIpv4HeaderLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[616] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -75530,47 +76564,54 @@ func (x *PatternFlowTcpCtlAck) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlAck.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlAck) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{634} +// Deprecated: Use PatternFlowIpv4HeaderLength.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4HeaderLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{616} } -func (x *PatternFlowTcpCtlAck) GetChoice() PatternFlowTcpCtlAck_Choice_Enum { +func (x *PatternFlowIpv4HeaderLength) GetChoice() PatternFlowIpv4HeaderLength_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpCtlAck_Choice_unspecified + return PatternFlowIpv4HeaderLength_Choice_unspecified } -func (x *PatternFlowTcpCtlAck) GetValue() uint32 { +func (x *PatternFlowIpv4HeaderLength) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpCtlAck) GetValues() []uint32 { +func (x *PatternFlowIpv4HeaderLength) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpCtlAck) GetIncrement() *PatternFlowTcpCtlAckCounter { +func (x *PatternFlowIpv4HeaderLength) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto + } + return 0 +} + +func (x *PatternFlowIpv4HeaderLength) GetIncrement() *PatternFlowIpv4HeaderLengthCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpCtlAck) GetDecrement() *PatternFlowTcpCtlAckCounter { +func (x *PatternFlowIpv4HeaderLength) GetDecrement() *PatternFlowIpv4HeaderLengthCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpCtlAck) GetMetricTags() []*PatternFlowTcpCtlAckMetricTag { +func (x *PatternFlowIpv4HeaderLength) GetMetricTags() []*PatternFlowIpv4HeaderLengthMetricTag { if x != nil { return x.MetricTags } @@ -75578,13 +76619,13 @@ func (x *PatternFlowTcpCtlAck) GetMetricTags() []*PatternFlowTcpCtlAckMetricTag } // integer counter pattern -type PatternFlowTcpCtlPshCounter struct { +type PatternFlowIpv4TotalLengthCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 + // default = 46 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -75594,23 +76635,23 @@ type PatternFlowTcpCtlPshCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpCtlPshCounter) Reset() { - *x = PatternFlowTcpCtlPshCounter{} +func (x *PatternFlowIpv4TotalLengthCounter) Reset() { + *x = PatternFlowIpv4TotalLengthCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[635] + mi := &file_otg_proto_msgTypes[617] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlPshCounter) String() string { +func (x *PatternFlowIpv4TotalLengthCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlPshCounter) ProtoMessage() {} +func (*PatternFlowIpv4TotalLengthCounter) ProtoMessage() {} -func (x *PatternFlowTcpCtlPshCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[635] +func (x *PatternFlowIpv4TotalLengthCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[617] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -75621,26 +76662,26 @@ func (x *PatternFlowTcpCtlPshCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlPshCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlPshCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{635} +// Deprecated: Use PatternFlowIpv4TotalLengthCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TotalLengthCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{617} } -func (x *PatternFlowTcpCtlPshCounter) GetStart() uint32 { +func (x *PatternFlowIpv4TotalLengthCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpCtlPshCounter) GetStep() uint32 { +func (x *PatternFlowIpv4TotalLengthCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpCtlPshCounter) GetCount() uint32 { +func (x *PatternFlowIpv4TotalLengthCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -75650,7 +76691,7 @@ func (x *PatternFlowTcpCtlPshCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpCtlPshMetricTag struct { +type PatternFlowIpv4TotalLengthMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -75664,27 +76705,27 @@ type PatternFlowTcpCtlPshMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 1 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpCtlPshMetricTag) Reset() { - *x = PatternFlowTcpCtlPshMetricTag{} +func (x *PatternFlowIpv4TotalLengthMetricTag) Reset() { + *x = PatternFlowIpv4TotalLengthMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[636] + mi := &file_otg_proto_msgTypes[618] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlPshMetricTag) String() string { +func (x *PatternFlowIpv4TotalLengthMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlPshMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4TotalLengthMetricTag) ProtoMessage() {} -func (x *PatternFlowTcpCtlPshMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[636] +func (x *PatternFlowIpv4TotalLengthMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[618] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -75695,74 +76736,79 @@ func (x *PatternFlowTcpCtlPshMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlPshMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlPshMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{636} +// Deprecated: Use PatternFlowIpv4TotalLengthMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TotalLengthMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{618} } -func (x *PatternFlowTcpCtlPshMetricTag) GetName() string { +func (x *PatternFlowIpv4TotalLengthMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpCtlPshMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4TotalLengthMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpCtlPshMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4TotalLengthMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Asks to push the buffered data to the receiving application. -type PatternFlowTcpCtlPsh struct { +// Total length +type PatternFlowIpv4TotalLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowTcpCtlPsh_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpCtlPsh_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.auto + Choice *PatternFlowIpv4TotalLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TotalLength_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 + // default = 46 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] + // default = [46] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // The OTG implementation can provide a system generated + // value for this property. If the OTG is unable to generate a value + // the default value must be used. + // default = 46 + Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` // Description missing in models - Increment *PatternFlowTcpCtlPshCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4TotalLengthCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpCtlPshCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4TotalLengthCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpCtlPshMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4TotalLengthMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpCtlPsh) Reset() { - *x = PatternFlowTcpCtlPsh{} +func (x *PatternFlowIpv4TotalLength) Reset() { + *x = PatternFlowIpv4TotalLength{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[637] + mi := &file_otg_proto_msgTypes[619] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlPsh) String() string { +func (x *PatternFlowIpv4TotalLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlPsh) ProtoMessage() {} +func (*PatternFlowIpv4TotalLength) ProtoMessage() {} -func (x *PatternFlowTcpCtlPsh) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[637] +func (x *PatternFlowIpv4TotalLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[619] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -75773,47 +76819,54 @@ func (x *PatternFlowTcpCtlPsh) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlPsh.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlPsh) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{637} +// Deprecated: Use PatternFlowIpv4TotalLength.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TotalLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{619} } -func (x *PatternFlowTcpCtlPsh) GetChoice() PatternFlowTcpCtlPsh_Choice_Enum { +func (x *PatternFlowIpv4TotalLength) GetChoice() PatternFlowIpv4TotalLength_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpCtlPsh_Choice_unspecified + return PatternFlowIpv4TotalLength_Choice_unspecified } -func (x *PatternFlowTcpCtlPsh) GetValue() uint32 { +func (x *PatternFlowIpv4TotalLength) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpCtlPsh) GetValues() []uint32 { +func (x *PatternFlowIpv4TotalLength) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpCtlPsh) GetIncrement() *PatternFlowTcpCtlPshCounter { +func (x *PatternFlowIpv4TotalLength) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto + } + return 0 +} + +func (x *PatternFlowIpv4TotalLength) GetIncrement() *PatternFlowIpv4TotalLengthCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpCtlPsh) GetDecrement() *PatternFlowTcpCtlPshCounter { +func (x *PatternFlowIpv4TotalLength) GetDecrement() *PatternFlowIpv4TotalLengthCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpCtlPsh) GetMetricTags() []*PatternFlowTcpCtlPshMetricTag { +func (x *PatternFlowIpv4TotalLength) GetMetricTags() []*PatternFlowIpv4TotalLengthMetricTag { if x != nil { return x.MetricTags } @@ -75821,7 +76874,7 @@ func (x *PatternFlowTcpCtlPsh) GetMetricTags() []*PatternFlowTcpCtlPshMetricTag } // integer counter pattern -type PatternFlowTcpCtlRstCounter struct { +type PatternFlowIpv4IdentificationCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -75837,23 +76890,23 @@ type PatternFlowTcpCtlRstCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpCtlRstCounter) Reset() { - *x = PatternFlowTcpCtlRstCounter{} +func (x *PatternFlowIpv4IdentificationCounter) Reset() { + *x = PatternFlowIpv4IdentificationCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[638] + mi := &file_otg_proto_msgTypes[620] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlRstCounter) String() string { +func (x *PatternFlowIpv4IdentificationCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlRstCounter) ProtoMessage() {} +func (*PatternFlowIpv4IdentificationCounter) ProtoMessage() {} -func (x *PatternFlowTcpCtlRstCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[638] +func (x *PatternFlowIpv4IdentificationCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[620] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -75864,26 +76917,26 @@ func (x *PatternFlowTcpCtlRstCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlRstCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlRstCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{638} +// Deprecated: Use PatternFlowIpv4IdentificationCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4IdentificationCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{620} } -func (x *PatternFlowTcpCtlRstCounter) GetStart() uint32 { +func (x *PatternFlowIpv4IdentificationCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpCtlRstCounter) GetStep() uint32 { +func (x *PatternFlowIpv4IdentificationCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpCtlRstCounter) GetCount() uint32 { +func (x *PatternFlowIpv4IdentificationCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -75893,7 +76946,7 @@ func (x *PatternFlowTcpCtlRstCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpCtlRstMetricTag struct { +type PatternFlowIpv4IdentificationMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -75907,27 +76960,27 @@ type PatternFlowTcpCtlRstMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 1 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpCtlRstMetricTag) Reset() { - *x = PatternFlowTcpCtlRstMetricTag{} +func (x *PatternFlowIpv4IdentificationMetricTag) Reset() { + *x = PatternFlowIpv4IdentificationMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[639] + mi := &file_otg_proto_msgTypes[621] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlRstMetricTag) String() string { +func (x *PatternFlowIpv4IdentificationMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlRstMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4IdentificationMetricTag) ProtoMessage() {} -func (x *PatternFlowTcpCtlRstMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[639] +func (x *PatternFlowIpv4IdentificationMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[621] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -75938,41 +76991,41 @@ func (x *PatternFlowTcpCtlRstMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlRstMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlRstMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{639} +// Deprecated: Use PatternFlowIpv4IdentificationMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4IdentificationMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{621} } -func (x *PatternFlowTcpCtlRstMetricTag) GetName() string { +func (x *PatternFlowIpv4IdentificationMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpCtlRstMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4IdentificationMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpCtlRstMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4IdentificationMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Reset the connection. -type PatternFlowTcpCtlRst struct { +// Identification +type PatternFlowIpv4Identification struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowTcpCtlRst_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpCtlRst_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4Identification_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4Identification_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -75980,32 +77033,32 @@ type PatternFlowTcpCtlRst struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowTcpCtlRstCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4IdentificationCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpCtlRstCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4IdentificationCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpCtlRstMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4IdentificationMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpCtlRst) Reset() { - *x = PatternFlowTcpCtlRst{} +func (x *PatternFlowIpv4Identification) Reset() { + *x = PatternFlowIpv4Identification{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[640] + mi := &file_otg_proto_msgTypes[622] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlRst) String() string { +func (x *PatternFlowIpv4Identification) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlRst) ProtoMessage() {} +func (*PatternFlowIpv4Identification) ProtoMessage() {} -func (x *PatternFlowTcpCtlRst) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[640] +func (x *PatternFlowIpv4Identification) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[622] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -76016,47 +77069,47 @@ func (x *PatternFlowTcpCtlRst) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlRst.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlRst) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{640} +// Deprecated: Use PatternFlowIpv4Identification.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4Identification) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{622} } -func (x *PatternFlowTcpCtlRst) GetChoice() PatternFlowTcpCtlRst_Choice_Enum { +func (x *PatternFlowIpv4Identification) GetChoice() PatternFlowIpv4Identification_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpCtlRst_Choice_unspecified + return PatternFlowIpv4Identification_Choice_unspecified } -func (x *PatternFlowTcpCtlRst) GetValue() uint32 { +func (x *PatternFlowIpv4Identification) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpCtlRst) GetValues() []uint32 { +func (x *PatternFlowIpv4Identification) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpCtlRst) GetIncrement() *PatternFlowTcpCtlRstCounter { +func (x *PatternFlowIpv4Identification) GetIncrement() *PatternFlowIpv4IdentificationCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpCtlRst) GetDecrement() *PatternFlowTcpCtlRstCounter { +func (x *PatternFlowIpv4Identification) GetDecrement() *PatternFlowIpv4IdentificationCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpCtlRst) GetMetricTags() []*PatternFlowTcpCtlRstMetricTag { +func (x *PatternFlowIpv4Identification) GetMetricTags() []*PatternFlowIpv4IdentificationMetricTag { if x != nil { return x.MetricTags } @@ -76064,7 +77117,7 @@ func (x *PatternFlowTcpCtlRst) GetMetricTags() []*PatternFlowTcpCtlRstMetricTag } // integer counter pattern -type PatternFlowTcpCtlSynCounter struct { +type PatternFlowIpv4ReservedCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -76080,23 +77133,23 @@ type PatternFlowTcpCtlSynCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpCtlSynCounter) Reset() { - *x = PatternFlowTcpCtlSynCounter{} +func (x *PatternFlowIpv4ReservedCounter) Reset() { + *x = PatternFlowIpv4ReservedCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[641] + mi := &file_otg_proto_msgTypes[623] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlSynCounter) String() string { +func (x *PatternFlowIpv4ReservedCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlSynCounter) ProtoMessage() {} +func (*PatternFlowIpv4ReservedCounter) ProtoMessage() {} -func (x *PatternFlowTcpCtlSynCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[641] +func (x *PatternFlowIpv4ReservedCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[623] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -76107,26 +77160,26 @@ func (x *PatternFlowTcpCtlSynCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlSynCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlSynCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{641} +// Deprecated: Use PatternFlowIpv4ReservedCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4ReservedCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{623} } -func (x *PatternFlowTcpCtlSynCounter) GetStart() uint32 { +func (x *PatternFlowIpv4ReservedCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpCtlSynCounter) GetStep() uint32 { +func (x *PatternFlowIpv4ReservedCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpCtlSynCounter) GetCount() uint32 { +func (x *PatternFlowIpv4ReservedCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -76136,7 +77189,7 @@ func (x *PatternFlowTcpCtlSynCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpCtlSynMetricTag struct { +type PatternFlowIpv4ReservedMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -76154,23 +77207,23 @@ type PatternFlowTcpCtlSynMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpCtlSynMetricTag) Reset() { - *x = PatternFlowTcpCtlSynMetricTag{} +func (x *PatternFlowIpv4ReservedMetricTag) Reset() { + *x = PatternFlowIpv4ReservedMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[642] + mi := &file_otg_proto_msgTypes[624] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlSynMetricTag) String() string { +func (x *PatternFlowIpv4ReservedMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlSynMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4ReservedMetricTag) ProtoMessage() {} -func (x *PatternFlowTcpCtlSynMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[642] +func (x *PatternFlowIpv4ReservedMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[624] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -76181,41 +77234,41 @@ func (x *PatternFlowTcpCtlSynMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlSynMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlSynMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{642} +// Deprecated: Use PatternFlowIpv4ReservedMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4ReservedMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{624} } -func (x *PatternFlowTcpCtlSynMetricTag) GetName() string { +func (x *PatternFlowIpv4ReservedMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpCtlSynMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4ReservedMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpCtlSynMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4ReservedMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Synchronize sequenece numbers. -type PatternFlowTcpCtlSyn struct { +// Reserved flag. +type PatternFlowIpv4Reserved struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowTcpCtlSyn_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpCtlSyn_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4Reserved_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4Reserved_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -76223,32 +77276,32 @@ type PatternFlowTcpCtlSyn struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowTcpCtlSynCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4ReservedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpCtlSynCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4ReservedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpCtlSynMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4ReservedMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpCtlSyn) Reset() { - *x = PatternFlowTcpCtlSyn{} +func (x *PatternFlowIpv4Reserved) Reset() { + *x = PatternFlowIpv4Reserved{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[643] + mi := &file_otg_proto_msgTypes[625] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlSyn) String() string { +func (x *PatternFlowIpv4Reserved) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlSyn) ProtoMessage() {} +func (*PatternFlowIpv4Reserved) ProtoMessage() {} -func (x *PatternFlowTcpCtlSyn) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[643] +func (x *PatternFlowIpv4Reserved) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[625] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -76259,47 +77312,47 @@ func (x *PatternFlowTcpCtlSyn) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlSyn.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlSyn) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{643} +// Deprecated: Use PatternFlowIpv4Reserved.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4Reserved) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{625} } -func (x *PatternFlowTcpCtlSyn) GetChoice() PatternFlowTcpCtlSyn_Choice_Enum { +func (x *PatternFlowIpv4Reserved) GetChoice() PatternFlowIpv4Reserved_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpCtlSyn_Choice_unspecified + return PatternFlowIpv4Reserved_Choice_unspecified } -func (x *PatternFlowTcpCtlSyn) GetValue() uint32 { +func (x *PatternFlowIpv4Reserved) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpCtlSyn) GetValues() []uint32 { +func (x *PatternFlowIpv4Reserved) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpCtlSyn) GetIncrement() *PatternFlowTcpCtlSynCounter { +func (x *PatternFlowIpv4Reserved) GetIncrement() *PatternFlowIpv4ReservedCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpCtlSyn) GetDecrement() *PatternFlowTcpCtlSynCounter { +func (x *PatternFlowIpv4Reserved) GetDecrement() *PatternFlowIpv4ReservedCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpCtlSyn) GetMetricTags() []*PatternFlowTcpCtlSynMetricTag { +func (x *PatternFlowIpv4Reserved) GetMetricTags() []*PatternFlowIpv4ReservedMetricTag { if x != nil { return x.MetricTags } @@ -76307,7 +77360,7 @@ func (x *PatternFlowTcpCtlSyn) GetMetricTags() []*PatternFlowTcpCtlSynMetricTag } // integer counter pattern -type PatternFlowTcpCtlFinCounter struct { +type PatternFlowIpv4DontFragmentCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -76323,23 +77376,23 @@ type PatternFlowTcpCtlFinCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpCtlFinCounter) Reset() { - *x = PatternFlowTcpCtlFinCounter{} +func (x *PatternFlowIpv4DontFragmentCounter) Reset() { + *x = PatternFlowIpv4DontFragmentCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[644] + mi := &file_otg_proto_msgTypes[626] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlFinCounter) String() string { +func (x *PatternFlowIpv4DontFragmentCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlFinCounter) ProtoMessage() {} +func (*PatternFlowIpv4DontFragmentCounter) ProtoMessage() {} -func (x *PatternFlowTcpCtlFinCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[644] +func (x *PatternFlowIpv4DontFragmentCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[626] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -76350,26 +77403,26 @@ func (x *PatternFlowTcpCtlFinCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlFinCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlFinCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{644} +// Deprecated: Use PatternFlowIpv4DontFragmentCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DontFragmentCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{626} } -func (x *PatternFlowTcpCtlFinCounter) GetStart() uint32 { +func (x *PatternFlowIpv4DontFragmentCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpCtlFinCounter) GetStep() uint32 { +func (x *PatternFlowIpv4DontFragmentCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpCtlFinCounter) GetCount() uint32 { +func (x *PatternFlowIpv4DontFragmentCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -76379,7 +77432,7 @@ func (x *PatternFlowTcpCtlFinCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpCtlFinMetricTag struct { +type PatternFlowIpv4DontFragmentMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -76397,23 +77450,23 @@ type PatternFlowTcpCtlFinMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpCtlFinMetricTag) Reset() { - *x = PatternFlowTcpCtlFinMetricTag{} +func (x *PatternFlowIpv4DontFragmentMetricTag) Reset() { + *x = PatternFlowIpv4DontFragmentMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[645] + mi := &file_otg_proto_msgTypes[627] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlFinMetricTag) String() string { +func (x *PatternFlowIpv4DontFragmentMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlFinMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4DontFragmentMetricTag) ProtoMessage() {} -func (x *PatternFlowTcpCtlFinMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[645] +func (x *PatternFlowIpv4DontFragmentMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[627] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -76424,41 +77477,42 @@ func (x *PatternFlowTcpCtlFinMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlFinMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlFinMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{645} +// Deprecated: Use PatternFlowIpv4DontFragmentMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DontFragmentMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{627} } -func (x *PatternFlowTcpCtlFinMetricTag) GetName() string { +func (x *PatternFlowIpv4DontFragmentMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpCtlFinMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4DontFragmentMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpCtlFinMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4DontFragmentMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Last packet from the sender. -type PatternFlowTcpCtlFin struct { +// Dont fragment flag If the dont_fragment flag is set and fragmentation is required +// to route the packet then the packet is dropped. +type PatternFlowIpv4DontFragment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowTcpCtlFin_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpCtlFin_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4DontFragment_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4DontFragment_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -76466,32 +77520,32 @@ type PatternFlowTcpCtlFin struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowTcpCtlFinCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4DontFragmentCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpCtlFinCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4DontFragmentCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpCtlFinMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4DontFragmentMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpCtlFin) Reset() { - *x = PatternFlowTcpCtlFin{} +func (x *PatternFlowIpv4DontFragment) Reset() { + *x = PatternFlowIpv4DontFragment{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[646] + mi := &file_otg_proto_msgTypes[628] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlFin) String() string { +func (x *PatternFlowIpv4DontFragment) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlFin) ProtoMessage() {} +func (*PatternFlowIpv4DontFragment) ProtoMessage() {} -func (x *PatternFlowTcpCtlFin) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[646] +func (x *PatternFlowIpv4DontFragment) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[628] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -76502,47 +77556,47 @@ func (x *PatternFlowTcpCtlFin) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlFin.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlFin) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{646} +// Deprecated: Use PatternFlowIpv4DontFragment.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DontFragment) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{628} } -func (x *PatternFlowTcpCtlFin) GetChoice() PatternFlowTcpCtlFin_Choice_Enum { +func (x *PatternFlowIpv4DontFragment) GetChoice() PatternFlowIpv4DontFragment_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpCtlFin_Choice_unspecified + return PatternFlowIpv4DontFragment_Choice_unspecified } -func (x *PatternFlowTcpCtlFin) GetValue() uint32 { +func (x *PatternFlowIpv4DontFragment) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpCtlFin) GetValues() []uint32 { +func (x *PatternFlowIpv4DontFragment) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpCtlFin) GetIncrement() *PatternFlowTcpCtlFinCounter { +func (x *PatternFlowIpv4DontFragment) GetIncrement() *PatternFlowIpv4DontFragmentCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpCtlFin) GetDecrement() *PatternFlowTcpCtlFinCounter { +func (x *PatternFlowIpv4DontFragment) GetDecrement() *PatternFlowIpv4DontFragmentCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpCtlFin) GetMetricTags() []*PatternFlowTcpCtlFinMetricTag { +func (x *PatternFlowIpv4DontFragment) GetMetricTags() []*PatternFlowIpv4DontFragmentMetricTag { if x != nil { return x.MetricTags } @@ -76550,7 +77604,7 @@ func (x *PatternFlowTcpCtlFin) GetMetricTags() []*PatternFlowTcpCtlFinMetricTag } // integer counter pattern -type PatternFlowTcpWindowCounter struct { +type PatternFlowIpv4MoreFragmentsCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -76566,23 +77620,23 @@ type PatternFlowTcpWindowCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowTcpWindowCounter) Reset() { - *x = PatternFlowTcpWindowCounter{} +func (x *PatternFlowIpv4MoreFragmentsCounter) Reset() { + *x = PatternFlowIpv4MoreFragmentsCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[647] + mi := &file_otg_proto_msgTypes[629] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpWindowCounter) String() string { +func (x *PatternFlowIpv4MoreFragmentsCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpWindowCounter) ProtoMessage() {} +func (*PatternFlowIpv4MoreFragmentsCounter) ProtoMessage() {} -func (x *PatternFlowTcpWindowCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[647] +func (x *PatternFlowIpv4MoreFragmentsCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[629] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -76593,26 +77647,26 @@ func (x *PatternFlowTcpWindowCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpWindowCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpWindowCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{647} +// Deprecated: Use PatternFlowIpv4MoreFragmentsCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4MoreFragmentsCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{629} } -func (x *PatternFlowTcpWindowCounter) GetStart() uint32 { +func (x *PatternFlowIpv4MoreFragmentsCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowTcpWindowCounter) GetStep() uint32 { +func (x *PatternFlowIpv4MoreFragmentsCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowTcpWindowCounter) GetCount() uint32 { +func (x *PatternFlowIpv4MoreFragmentsCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -76622,7 +77676,7 @@ func (x *PatternFlowTcpWindowCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowTcpWindowMetricTag struct { +type PatternFlowIpv4MoreFragmentsMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -76636,27 +77690,27 @@ type PatternFlowTcpWindowMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 1 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowTcpWindowMetricTag) Reset() { - *x = PatternFlowTcpWindowMetricTag{} +func (x *PatternFlowIpv4MoreFragmentsMetricTag) Reset() { + *x = PatternFlowIpv4MoreFragmentsMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[648] + mi := &file_otg_proto_msgTypes[630] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpWindowMetricTag) String() string { +func (x *PatternFlowIpv4MoreFragmentsMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpWindowMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4MoreFragmentsMetricTag) ProtoMessage() {} -func (x *PatternFlowTcpWindowMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[648] +func (x *PatternFlowIpv4MoreFragmentsMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[630] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -76667,41 +77721,41 @@ func (x *PatternFlowTcpWindowMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpWindowMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpWindowMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{648} +// Deprecated: Use PatternFlowIpv4MoreFragmentsMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4MoreFragmentsMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{630} } -func (x *PatternFlowTcpWindowMetricTag) GetName() string { +func (x *PatternFlowIpv4MoreFragmentsMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowTcpWindowMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4MoreFragmentsMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowTcpWindowMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4MoreFragmentsMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Tcp connection window. -type PatternFlowTcpWindow struct { +// More fragments flag +type PatternFlowIpv4MoreFragments struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowTcpWindow_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpWindow_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4MoreFragments_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4MoreFragments_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -76709,32 +77763,32 @@ type PatternFlowTcpWindow struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowTcpWindowCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4MoreFragmentsCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowTcpWindowCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4MoreFragmentsCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowTcpWindowMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4MoreFragmentsMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowTcpWindow) Reset() { - *x = PatternFlowTcpWindow{} +func (x *PatternFlowIpv4MoreFragments) Reset() { + *x = PatternFlowIpv4MoreFragments{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[649] + mi := &file_otg_proto_msgTypes[631] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpWindow) String() string { +func (x *PatternFlowIpv4MoreFragments) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpWindow) ProtoMessage() {} +func (*PatternFlowIpv4MoreFragments) ProtoMessage() {} -func (x *PatternFlowTcpWindow) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[649] +func (x *PatternFlowIpv4MoreFragments) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[631] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -76745,47 +77799,47 @@ func (x *PatternFlowTcpWindow) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpWindow.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpWindow) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{649} +// Deprecated: Use PatternFlowIpv4MoreFragments.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4MoreFragments) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{631} } -func (x *PatternFlowTcpWindow) GetChoice() PatternFlowTcpWindow_Choice_Enum { +func (x *PatternFlowIpv4MoreFragments) GetChoice() PatternFlowIpv4MoreFragments_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowTcpWindow_Choice_unspecified + return PatternFlowIpv4MoreFragments_Choice_unspecified } -func (x *PatternFlowTcpWindow) GetValue() uint32 { +func (x *PatternFlowIpv4MoreFragments) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowTcpWindow) GetValues() []uint32 { +func (x *PatternFlowIpv4MoreFragments) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowTcpWindow) GetIncrement() *PatternFlowTcpWindowCounter { +func (x *PatternFlowIpv4MoreFragments) GetIncrement() *PatternFlowIpv4MoreFragmentsCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowTcpWindow) GetDecrement() *PatternFlowTcpWindowCounter { +func (x *PatternFlowIpv4MoreFragments) GetDecrement() *PatternFlowIpv4MoreFragmentsCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowTcpWindow) GetMetricTags() []*PatternFlowTcpWindowMetricTag { +func (x *PatternFlowIpv4MoreFragments) GetMetricTags() []*PatternFlowIpv4MoreFragmentsMetricTag { if x != nil { return x.MetricTags } @@ -76793,7 +77847,7 @@ func (x *PatternFlowTcpWindow) GetMetricTags() []*PatternFlowTcpWindowMetricTag } // integer counter pattern -type PatternFlowUdpSrcPortCounter struct { +type PatternFlowIpv4FragmentOffsetCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -76809,23 +77863,23 @@ type PatternFlowUdpSrcPortCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowUdpSrcPortCounter) Reset() { - *x = PatternFlowUdpSrcPortCounter{} +func (x *PatternFlowIpv4FragmentOffsetCounter) Reset() { + *x = PatternFlowIpv4FragmentOffsetCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[650] + mi := &file_otg_proto_msgTypes[632] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpSrcPortCounter) String() string { +func (x *PatternFlowIpv4FragmentOffsetCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpSrcPortCounter) ProtoMessage() {} +func (*PatternFlowIpv4FragmentOffsetCounter) ProtoMessage() {} -func (x *PatternFlowUdpSrcPortCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[650] +func (x *PatternFlowIpv4FragmentOffsetCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[632] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -76836,26 +77890,26 @@ func (x *PatternFlowUdpSrcPortCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpSrcPortCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpSrcPortCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{650} +// Deprecated: Use PatternFlowIpv4FragmentOffsetCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4FragmentOffsetCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{632} } -func (x *PatternFlowUdpSrcPortCounter) GetStart() uint32 { +func (x *PatternFlowIpv4FragmentOffsetCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowUdpSrcPortCounter) GetStep() uint32 { +func (x *PatternFlowIpv4FragmentOffsetCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowUdpSrcPortCounter) GetCount() uint32 { +func (x *PatternFlowIpv4FragmentOffsetCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -76865,7 +77919,7 @@ func (x *PatternFlowUdpSrcPortCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowUdpSrcPortMetricTag struct { +type PatternFlowIpv4FragmentOffsetMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -76879,27 +77933,27 @@ type PatternFlowUdpSrcPortMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 5 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowUdpSrcPortMetricTag) Reset() { - *x = PatternFlowUdpSrcPortMetricTag{} +func (x *PatternFlowIpv4FragmentOffsetMetricTag) Reset() { + *x = PatternFlowIpv4FragmentOffsetMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[651] + mi := &file_otg_proto_msgTypes[633] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpSrcPortMetricTag) String() string { +func (x *PatternFlowIpv4FragmentOffsetMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpSrcPortMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4FragmentOffsetMetricTag) ProtoMessage() {} -func (x *PatternFlowUdpSrcPortMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[651] +func (x *PatternFlowIpv4FragmentOffsetMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[633] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -76910,41 +77964,41 @@ func (x *PatternFlowUdpSrcPortMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpSrcPortMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpSrcPortMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{651} +// Deprecated: Use PatternFlowIpv4FragmentOffsetMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4FragmentOffsetMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{633} } -func (x *PatternFlowUdpSrcPortMetricTag) GetName() string { +func (x *PatternFlowIpv4FragmentOffsetMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowUdpSrcPortMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4FragmentOffsetMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowUdpSrcPortMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4FragmentOffsetMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Source port -type PatternFlowUdpSrcPort struct { +// Fragment offset +type PatternFlowIpv4FragmentOffset struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowUdpSrcPort_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowUdpSrcPort_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4FragmentOffset_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4FragmentOffset_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -76952,32 +78006,32 @@ type PatternFlowUdpSrcPort struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowUdpSrcPortCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4FragmentOffsetCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowUdpSrcPortCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4FragmentOffsetCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowUdpSrcPortMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4FragmentOffsetMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowUdpSrcPort) Reset() { - *x = PatternFlowUdpSrcPort{} +func (x *PatternFlowIpv4FragmentOffset) Reset() { + *x = PatternFlowIpv4FragmentOffset{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[652] + mi := &file_otg_proto_msgTypes[634] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpSrcPort) String() string { +func (x *PatternFlowIpv4FragmentOffset) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpSrcPort) ProtoMessage() {} +func (*PatternFlowIpv4FragmentOffset) ProtoMessage() {} -func (x *PatternFlowUdpSrcPort) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[652] +func (x *PatternFlowIpv4FragmentOffset) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[634] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -76988,47 +78042,47 @@ func (x *PatternFlowUdpSrcPort) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpSrcPort.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpSrcPort) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{652} +// Deprecated: Use PatternFlowIpv4FragmentOffset.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4FragmentOffset) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{634} } -func (x *PatternFlowUdpSrcPort) GetChoice() PatternFlowUdpSrcPort_Choice_Enum { +func (x *PatternFlowIpv4FragmentOffset) GetChoice() PatternFlowIpv4FragmentOffset_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowUdpSrcPort_Choice_unspecified + return PatternFlowIpv4FragmentOffset_Choice_unspecified } -func (x *PatternFlowUdpSrcPort) GetValue() uint32 { +func (x *PatternFlowIpv4FragmentOffset) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowUdpSrcPort) GetValues() []uint32 { +func (x *PatternFlowIpv4FragmentOffset) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowUdpSrcPort) GetIncrement() *PatternFlowUdpSrcPortCounter { +func (x *PatternFlowIpv4FragmentOffset) GetIncrement() *PatternFlowIpv4FragmentOffsetCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowUdpSrcPort) GetDecrement() *PatternFlowUdpSrcPortCounter { +func (x *PatternFlowIpv4FragmentOffset) GetDecrement() *PatternFlowIpv4FragmentOffsetCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowUdpSrcPort) GetMetricTags() []*PatternFlowUdpSrcPortMetricTag { +func (x *PatternFlowIpv4FragmentOffset) GetMetricTags() []*PatternFlowIpv4FragmentOffsetMetricTag { if x != nil { return x.MetricTags } @@ -77036,13 +78090,13 @@ func (x *PatternFlowUdpSrcPort) GetMetricTags() []*PatternFlowUdpSrcPortMetricTa } // integer counter pattern -type PatternFlowUdpDstPortCounter struct { +type PatternFlowIpv4TimeToLiveCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 + // default = 64 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -77052,23 +78106,23 @@ type PatternFlowUdpDstPortCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowUdpDstPortCounter) Reset() { - *x = PatternFlowUdpDstPortCounter{} +func (x *PatternFlowIpv4TimeToLiveCounter) Reset() { + *x = PatternFlowIpv4TimeToLiveCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[653] + mi := &file_otg_proto_msgTypes[635] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpDstPortCounter) String() string { +func (x *PatternFlowIpv4TimeToLiveCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpDstPortCounter) ProtoMessage() {} +func (*PatternFlowIpv4TimeToLiveCounter) ProtoMessage() {} -func (x *PatternFlowUdpDstPortCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[653] +func (x *PatternFlowIpv4TimeToLiveCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[635] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -77079,26 +78133,26 @@ func (x *PatternFlowUdpDstPortCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpDstPortCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpDstPortCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{653} +// Deprecated: Use PatternFlowIpv4TimeToLiveCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TimeToLiveCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{635} } -func (x *PatternFlowUdpDstPortCounter) GetStart() uint32 { +func (x *PatternFlowIpv4TimeToLiveCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowUdpDstPortCounter) GetStep() uint32 { +func (x *PatternFlowIpv4TimeToLiveCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowUdpDstPortCounter) GetCount() uint32 { +func (x *PatternFlowIpv4TimeToLiveCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -77108,7 +78162,7 @@ func (x *PatternFlowUdpDstPortCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowUdpDstPortMetricTag struct { +type PatternFlowIpv4TimeToLiveMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -77122,27 +78176,27 @@ type PatternFlowUdpDstPortMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 8 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowUdpDstPortMetricTag) Reset() { - *x = PatternFlowUdpDstPortMetricTag{} +func (x *PatternFlowIpv4TimeToLiveMetricTag) Reset() { + *x = PatternFlowIpv4TimeToLiveMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[654] + mi := &file_otg_proto_msgTypes[636] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpDstPortMetricTag) String() string { +func (x *PatternFlowIpv4TimeToLiveMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpDstPortMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4TimeToLiveMetricTag) ProtoMessage() {} -func (x *PatternFlowUdpDstPortMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[654] +func (x *PatternFlowIpv4TimeToLiveMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[636] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -77153,74 +78207,74 @@ func (x *PatternFlowUdpDstPortMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpDstPortMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpDstPortMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{654} +// Deprecated: Use PatternFlowIpv4TimeToLiveMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TimeToLiveMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{636} } -func (x *PatternFlowUdpDstPortMetricTag) GetName() string { +func (x *PatternFlowIpv4TimeToLiveMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowUdpDstPortMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4TimeToLiveMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowUdpDstPortMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4TimeToLiveMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Destination port -type PatternFlowUdpDstPort struct { +// Time to live +type PatternFlowIpv4TimeToLive struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowUdpDstPort_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowUdpDstPort_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4TimeToLive_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TimeToLive_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 + // default = 64 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] + // default = [64] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowUdpDstPortCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4TimeToLiveCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowUdpDstPortCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4TimeToLiveCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowUdpDstPortMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4TimeToLiveMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowUdpDstPort) Reset() { - *x = PatternFlowUdpDstPort{} +func (x *PatternFlowIpv4TimeToLive) Reset() { + *x = PatternFlowIpv4TimeToLive{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[655] + mi := &file_otg_proto_msgTypes[637] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpDstPort) String() string { +func (x *PatternFlowIpv4TimeToLive) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpDstPort) ProtoMessage() {} +func (*PatternFlowIpv4TimeToLive) ProtoMessage() {} -func (x *PatternFlowUdpDstPort) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[655] +func (x *PatternFlowIpv4TimeToLive) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[637] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -77231,47 +78285,47 @@ func (x *PatternFlowUdpDstPort) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpDstPort.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpDstPort) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{655} +// Deprecated: Use PatternFlowIpv4TimeToLive.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TimeToLive) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{637} } -func (x *PatternFlowUdpDstPort) GetChoice() PatternFlowUdpDstPort_Choice_Enum { +func (x *PatternFlowIpv4TimeToLive) GetChoice() PatternFlowIpv4TimeToLive_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowUdpDstPort_Choice_unspecified + return PatternFlowIpv4TimeToLive_Choice_unspecified } -func (x *PatternFlowUdpDstPort) GetValue() uint32 { +func (x *PatternFlowIpv4TimeToLive) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowUdpDstPort) GetValues() []uint32 { +func (x *PatternFlowIpv4TimeToLive) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowUdpDstPort) GetIncrement() *PatternFlowUdpDstPortCounter { +func (x *PatternFlowIpv4TimeToLive) GetIncrement() *PatternFlowIpv4TimeToLiveCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowUdpDstPort) GetDecrement() *PatternFlowUdpDstPortCounter { +func (x *PatternFlowIpv4TimeToLive) GetDecrement() *PatternFlowIpv4TimeToLiveCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowUdpDstPort) GetMetricTags() []*PatternFlowUdpDstPortMetricTag { +func (x *PatternFlowIpv4TimeToLive) GetMetricTags() []*PatternFlowIpv4TimeToLiveMetricTag { if x != nil { return x.MetricTags } @@ -77279,13 +78333,13 @@ func (x *PatternFlowUdpDstPort) GetMetricTags() []*PatternFlowUdpDstPortMetricTa } // integer counter pattern -type PatternFlowUdpLengthCounter struct { +type PatternFlowIpv4ProtocolCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 + // default = 61 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -77295,23 +78349,23 @@ type PatternFlowUdpLengthCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowUdpLengthCounter) Reset() { - *x = PatternFlowUdpLengthCounter{} +func (x *PatternFlowIpv4ProtocolCounter) Reset() { + *x = PatternFlowIpv4ProtocolCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[656] + mi := &file_otg_proto_msgTypes[638] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpLengthCounter) String() string { +func (x *PatternFlowIpv4ProtocolCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpLengthCounter) ProtoMessage() {} +func (*PatternFlowIpv4ProtocolCounter) ProtoMessage() {} -func (x *PatternFlowUdpLengthCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[656] +func (x *PatternFlowIpv4ProtocolCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[638] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -77322,26 +78376,26 @@ func (x *PatternFlowUdpLengthCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpLengthCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpLengthCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{656} +// Deprecated: Use PatternFlowIpv4ProtocolCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4ProtocolCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{638} } -func (x *PatternFlowUdpLengthCounter) GetStart() uint32 { +func (x *PatternFlowIpv4ProtocolCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowUdpLengthCounter) GetStep() uint32 { +func (x *PatternFlowIpv4ProtocolCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowUdpLengthCounter) GetCount() uint32 { +func (x *PatternFlowIpv4ProtocolCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -77351,7 +78405,7 @@ func (x *PatternFlowUdpLengthCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowUdpLengthMetricTag struct { +type PatternFlowIpv4ProtocolMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -77365,27 +78419,27 @@ type PatternFlowUdpLengthMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 8 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowUdpLengthMetricTag) Reset() { - *x = PatternFlowUdpLengthMetricTag{} +func (x *PatternFlowIpv4ProtocolMetricTag) Reset() { + *x = PatternFlowIpv4ProtocolMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[657] + mi := &file_otg_proto_msgTypes[639] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpLengthMetricTag) String() string { +func (x *PatternFlowIpv4ProtocolMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpLengthMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4ProtocolMetricTag) ProtoMessage() {} -func (x *PatternFlowUdpLengthMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[657] +func (x *PatternFlowIpv4ProtocolMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[639] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -77396,74 +78450,79 @@ func (x *PatternFlowUdpLengthMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpLengthMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpLengthMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{657} +// Deprecated: Use PatternFlowIpv4ProtocolMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4ProtocolMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{639} } -func (x *PatternFlowUdpLengthMetricTag) GetName() string { +func (x *PatternFlowIpv4ProtocolMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowUdpLengthMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4ProtocolMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowUdpLengthMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4ProtocolMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Length -type PatternFlowUdpLength struct { +// Protocol, default is 61 any host internal protocol +type PatternFlowIpv4Protocol struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowUdpLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowUdpLength_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.auto + Choice *PatternFlowIpv4Protocol_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4Protocol_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 + // default = 61 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] + // default = [61] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // The OTG implementation can provide a system generated + // value for this property. If the OTG is unable to generate a value + // the default value must be used. + // default = 61 + Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` // Description missing in models - Increment *PatternFlowUdpLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4ProtocolCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowUdpLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4ProtocolCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowUdpLengthMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4ProtocolMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowUdpLength) Reset() { - *x = PatternFlowUdpLength{} +func (x *PatternFlowIpv4Protocol) Reset() { + *x = PatternFlowIpv4Protocol{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[658] + mi := &file_otg_proto_msgTypes[640] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpLength) String() string { +func (x *PatternFlowIpv4Protocol) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpLength) ProtoMessage() {} +func (*PatternFlowIpv4Protocol) ProtoMessage() {} -func (x *PatternFlowUdpLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[658] +func (x *PatternFlowIpv4Protocol) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[640] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -77474,86 +78533,93 @@ func (x *PatternFlowUdpLength) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpLength.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{658} +// Deprecated: Use PatternFlowIpv4Protocol.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4Protocol) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{640} } -func (x *PatternFlowUdpLength) GetChoice() PatternFlowUdpLength_Choice_Enum { +func (x *PatternFlowIpv4Protocol) GetChoice() PatternFlowIpv4Protocol_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowUdpLength_Choice_unspecified + return PatternFlowIpv4Protocol_Choice_unspecified } -func (x *PatternFlowUdpLength) GetValue() uint32 { +func (x *PatternFlowIpv4Protocol) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowUdpLength) GetValues() []uint32 { +func (x *PatternFlowIpv4Protocol) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowUdpLength) GetIncrement() *PatternFlowUdpLengthCounter { +func (x *PatternFlowIpv4Protocol) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto + } + return 0 +} + +func (x *PatternFlowIpv4Protocol) GetIncrement() *PatternFlowIpv4ProtocolCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowUdpLength) GetDecrement() *PatternFlowUdpLengthCounter { +func (x *PatternFlowIpv4Protocol) GetDecrement() *PatternFlowIpv4ProtocolCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowUdpLength) GetMetricTags() []*PatternFlowUdpLengthMetricTag { +func (x *PatternFlowIpv4Protocol) GetMetricTags() []*PatternFlowIpv4ProtocolMetricTag { if x != nil { return x.MetricTags } return nil } -// UDP checksum -type PatternFlowUdpChecksum struct { +// Header checksum +type PatternFlowIpv4HeaderChecksum struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // The type of checksum // default = Choice.Enum.generated - Choice *PatternFlowUdpChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowUdpChecksum_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4HeaderChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4HeaderChecksum_Choice_Enum,oneof" json:"choice,omitempty"` // A system generated checksum value // default = Generated.Enum.good - Generated *PatternFlowUdpChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowUdpChecksum_Generated_Enum,oneof" json:"generated,omitempty"` + Generated *PatternFlowIpv4HeaderChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowIpv4HeaderChecksum_Generated_Enum,oneof" json:"generated,omitempty"` // A custom checksum value Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` } -func (x *PatternFlowUdpChecksum) Reset() { - *x = PatternFlowUdpChecksum{} +func (x *PatternFlowIpv4HeaderChecksum) Reset() { + *x = PatternFlowIpv4HeaderChecksum{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[659] + mi := &file_otg_proto_msgTypes[641] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpChecksum) String() string { +func (x *PatternFlowIpv4HeaderChecksum) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpChecksum) ProtoMessage() {} +func (*PatternFlowIpv4HeaderChecksum) ProtoMessage() {} -func (x *PatternFlowUdpChecksum) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[659] +func (x *PatternFlowIpv4HeaderChecksum) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[641] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -77564,66 +78630,66 @@ func (x *PatternFlowUdpChecksum) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpChecksum.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpChecksum) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{659} +// Deprecated: Use PatternFlowIpv4HeaderChecksum.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4HeaderChecksum) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{641} } -func (x *PatternFlowUdpChecksum) GetChoice() PatternFlowUdpChecksum_Choice_Enum { +func (x *PatternFlowIpv4HeaderChecksum) GetChoice() PatternFlowIpv4HeaderChecksum_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowUdpChecksum_Choice_unspecified + return PatternFlowIpv4HeaderChecksum_Choice_unspecified } -func (x *PatternFlowUdpChecksum) GetGenerated() PatternFlowUdpChecksum_Generated_Enum { +func (x *PatternFlowIpv4HeaderChecksum) GetGenerated() PatternFlowIpv4HeaderChecksum_Generated_Enum { if x != nil && x.Generated != nil { return *x.Generated } - return PatternFlowUdpChecksum_Generated_unspecified + return PatternFlowIpv4HeaderChecksum_Generated_unspecified } -func (x *PatternFlowUdpChecksum) GetCustom() uint32 { +func (x *PatternFlowIpv4HeaderChecksum) GetCustom() uint32 { if x != nil && x.Custom != nil { return *x.Custom } return 0 } -// integer counter pattern -type PatternFlowGreChecksumPresentCounter struct { +// ipv4 counter pattern +type PatternFlowIpv4SrcCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = 0.0.0.0 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 0.0.0.1 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGreChecksumPresentCounter) Reset() { - *x = PatternFlowGreChecksumPresentCounter{} +func (x *PatternFlowIpv4SrcCounter) Reset() { + *x = PatternFlowIpv4SrcCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[660] + mi := &file_otg_proto_msgTypes[642] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreChecksumPresentCounter) String() string { +func (x *PatternFlowIpv4SrcCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreChecksumPresentCounter) ProtoMessage() {} +func (*PatternFlowIpv4SrcCounter) ProtoMessage() {} -func (x *PatternFlowGreChecksumPresentCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[660] +func (x *PatternFlowIpv4SrcCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[642] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -77634,26 +78700,26 @@ func (x *PatternFlowGreChecksumPresentCounter) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreChecksumPresentCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGreChecksumPresentCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{660} +// Deprecated: Use PatternFlowIpv4SrcCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4SrcCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{642} } -func (x *PatternFlowGreChecksumPresentCounter) GetStart() uint32 { +func (x *PatternFlowIpv4SrcCounter) GetStart() string { if x != nil && x.Start != nil { return *x.Start } - return 0 + return "" } -func (x *PatternFlowGreChecksumPresentCounter) GetStep() uint32 { +func (x *PatternFlowIpv4SrcCounter) GetStep() string { if x != nil && x.Step != nil { return *x.Step } - return 0 + return "" } -func (x *PatternFlowGreChecksumPresentCounter) GetCount() uint32 { +func (x *PatternFlowIpv4SrcCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -77663,7 +78729,7 @@ func (x *PatternFlowGreChecksumPresentCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGreChecksumPresentMetricTag struct { +type PatternFlowIpv4SrcMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -77677,27 +78743,27 @@ type PatternFlowGreChecksumPresentMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 1 + // default = 32 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGreChecksumPresentMetricTag) Reset() { - *x = PatternFlowGreChecksumPresentMetricTag{} +func (x *PatternFlowIpv4SrcMetricTag) Reset() { + *x = PatternFlowIpv4SrcMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[661] + mi := &file_otg_proto_msgTypes[643] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreChecksumPresentMetricTag) String() string { +func (x *PatternFlowIpv4SrcMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreChecksumPresentMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4SrcMetricTag) ProtoMessage() {} -func (x *PatternFlowGreChecksumPresentMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[661] +func (x *PatternFlowIpv4SrcMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[643] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -77708,74 +78774,161 @@ func (x *PatternFlowGreChecksumPresentMetricTag) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreChecksumPresentMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGreChecksumPresentMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{661} +// Deprecated: Use PatternFlowIpv4SrcMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4SrcMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{643} } -func (x *PatternFlowGreChecksumPresentMetricTag) GetName() string { +func (x *PatternFlowIpv4SrcMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGreChecksumPresentMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4SrcMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGreChecksumPresentMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4SrcMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Checksum present bit -type PatternFlowGreChecksumPresent struct { +// ipv4 random pattern +type PatternFlowIpv4SrcRandom struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The minimum possible value generated by the random value generator. + // default = 0.0.0.0 + Min *string `protobuf:"bytes,1,opt,name=min,proto3,oneof" json:"min,omitempty"` + // The maximum possible value generated by the random value generator. + // default = 255.255.255.255 + Max *string `protobuf:"bytes,2,opt,name=max,proto3,oneof" json:"max,omitempty"` + // The seed value is used to initialize the random number generator to a deterministic + // state. If the user provides a seed value of 0, the implementation will generate a + // sequence of non-deterministic random values. For any other seed value, the sequence + // of random numbers will be generated in a deterministic manner (specific to the implementation). + // default = 1 + Seed *uint32 `protobuf:"varint,3,opt,name=seed,proto3,oneof" json:"seed,omitempty"` + // The total number of values to be generated by the random value generator. + // default = 1 + Count *uint32 `protobuf:"varint,4,opt,name=count,proto3,oneof" json:"count,omitempty"` +} + +func (x *PatternFlowIpv4SrcRandom) Reset() { + *x = PatternFlowIpv4SrcRandom{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[644] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4SrcRandom) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4SrcRandom) ProtoMessage() {} + +func (x *PatternFlowIpv4SrcRandom) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[644] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4SrcRandom.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4SrcRandom) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{644} +} + +func (x *PatternFlowIpv4SrcRandom) GetMin() string { + if x != nil && x.Min != nil { + return *x.Min + } + return "" +} + +func (x *PatternFlowIpv4SrcRandom) GetMax() string { + if x != nil && x.Max != nil { + return *x.Max + } + return "" +} + +func (x *PatternFlowIpv4SrcRandom) GetSeed() uint32 { + if x != nil && x.Seed != nil { + return *x.Seed + } + return 0 +} + +func (x *PatternFlowIpv4SrcRandom) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Source address +type PatternFlowIpv4Src struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGreChecksumPresent_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGreChecksumPresent_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4Src_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4Src_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 0.0.0.0 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = ['0.0.0.0'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGreChecksumPresentCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4SrcCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGreChecksumPresentCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4SrcCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGreChecksumPresentMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4SrcMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // Description missing in models + Auto *FlowIpv4Auto `protobuf:"bytes,8,opt,name=auto,proto3" json:"auto,omitempty"` + // Description missing in models + Random *PatternFlowIpv4SrcRandom `protobuf:"bytes,9,opt,name=random,proto3" json:"random,omitempty"` } -func (x *PatternFlowGreChecksumPresent) Reset() { - *x = PatternFlowGreChecksumPresent{} +func (x *PatternFlowIpv4Src) Reset() { + *x = PatternFlowIpv4Src{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[662] + mi := &file_otg_proto_msgTypes[645] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreChecksumPresent) String() string { +func (x *PatternFlowIpv4Src) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreChecksumPresent) ProtoMessage() {} +func (*PatternFlowIpv4Src) ProtoMessage() {} -func (x *PatternFlowGreChecksumPresent) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[662] +func (x *PatternFlowIpv4Src) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[645] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -77786,87 +78939,101 @@ func (x *PatternFlowGreChecksumPresent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreChecksumPresent.ProtoReflect.Descriptor instead. -func (*PatternFlowGreChecksumPresent) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{662} +// Deprecated: Use PatternFlowIpv4Src.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4Src) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{645} } -func (x *PatternFlowGreChecksumPresent) GetChoice() PatternFlowGreChecksumPresent_Choice_Enum { +func (x *PatternFlowIpv4Src) GetChoice() PatternFlowIpv4Src_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGreChecksumPresent_Choice_unspecified + return PatternFlowIpv4Src_Choice_unspecified } -func (x *PatternFlowGreChecksumPresent) GetValue() uint32 { +func (x *PatternFlowIpv4Src) GetValue() string { if x != nil && x.Value != nil { return *x.Value } - return 0 + return "" } -func (x *PatternFlowGreChecksumPresent) GetValues() []uint32 { +func (x *PatternFlowIpv4Src) GetValues() []string { if x != nil { return x.Values } return nil } -func (x *PatternFlowGreChecksumPresent) GetIncrement() *PatternFlowGreChecksumPresentCounter { +func (x *PatternFlowIpv4Src) GetIncrement() *PatternFlowIpv4SrcCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGreChecksumPresent) GetDecrement() *PatternFlowGreChecksumPresentCounter { +func (x *PatternFlowIpv4Src) GetDecrement() *PatternFlowIpv4SrcCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGreChecksumPresent) GetMetricTags() []*PatternFlowGreChecksumPresentMetricTag { +func (x *PatternFlowIpv4Src) GetMetricTags() []*PatternFlowIpv4SrcMetricTag { if x != nil { return x.MetricTags } return nil } -// integer counter pattern -type PatternFlowGreReserved0Counter struct { +func (x *PatternFlowIpv4Src) GetAuto() *FlowIpv4Auto { + if x != nil { + return x.Auto + } + return nil +} + +func (x *PatternFlowIpv4Src) GetRandom() *PatternFlowIpv4SrcRandom { + if x != nil { + return x.Random + } + return nil +} + +// ipv4 counter pattern +type PatternFlowIpv4DstCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = 0.0.0.0 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 0.0.0.1 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGreReserved0Counter) Reset() { - *x = PatternFlowGreReserved0Counter{} +func (x *PatternFlowIpv4DstCounter) Reset() { + *x = PatternFlowIpv4DstCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[663] + mi := &file_otg_proto_msgTypes[646] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreReserved0Counter) String() string { +func (x *PatternFlowIpv4DstCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreReserved0Counter) ProtoMessage() {} +func (*PatternFlowIpv4DstCounter) ProtoMessage() {} -func (x *PatternFlowGreReserved0Counter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[663] +func (x *PatternFlowIpv4DstCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[646] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -77877,26 +79044,26 @@ func (x *PatternFlowGreReserved0Counter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreReserved0Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowGreReserved0Counter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{663} +// Deprecated: Use PatternFlowIpv4DstCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DstCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{646} } -func (x *PatternFlowGreReserved0Counter) GetStart() uint32 { +func (x *PatternFlowIpv4DstCounter) GetStart() string { if x != nil && x.Start != nil { return *x.Start } - return 0 + return "" } -func (x *PatternFlowGreReserved0Counter) GetStep() uint32 { +func (x *PatternFlowIpv4DstCounter) GetStep() string { if x != nil && x.Step != nil { return *x.Step } - return 0 + return "" } -func (x *PatternFlowGreReserved0Counter) GetCount() uint32 { +func (x *PatternFlowIpv4DstCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -77906,7 +79073,7 @@ func (x *PatternFlowGreReserved0Counter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGreReserved0MetricTag struct { +type PatternFlowIpv4DstMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -77920,27 +79087,27 @@ type PatternFlowGreReserved0MetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 12 + // default = 32 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGreReserved0MetricTag) Reset() { - *x = PatternFlowGreReserved0MetricTag{} +func (x *PatternFlowIpv4DstMetricTag) Reset() { + *x = PatternFlowIpv4DstMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[664] + mi := &file_otg_proto_msgTypes[647] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreReserved0MetricTag) String() string { +func (x *PatternFlowIpv4DstMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreReserved0MetricTag) ProtoMessage() {} +func (*PatternFlowIpv4DstMetricTag) ProtoMessage() {} -func (x *PatternFlowGreReserved0MetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[664] +func (x *PatternFlowIpv4DstMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[647] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -77951,74 +79118,161 @@ func (x *PatternFlowGreReserved0MetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreReserved0MetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGreReserved0MetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{664} +// Deprecated: Use PatternFlowIpv4DstMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DstMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{647} } -func (x *PatternFlowGreReserved0MetricTag) GetName() string { +func (x *PatternFlowIpv4DstMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGreReserved0MetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4DstMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGreReserved0MetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4DstMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Reserved bits -type PatternFlowGreReserved0 struct { +// ipv4 random pattern +type PatternFlowIpv4DstRandom struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The minimum possible value generated by the random value generator. + // default = 0.0.0.0 + Min *string `protobuf:"bytes,1,opt,name=min,proto3,oneof" json:"min,omitempty"` + // The maximum possible value generated by the random value generator. + // default = 255.255.255.255 + Max *string `protobuf:"bytes,2,opt,name=max,proto3,oneof" json:"max,omitempty"` + // The seed value is used to initialize the random number generator to a deterministic + // state. If the user provides a seed value of 0, the implementation will generate a + // sequence of non-deterministic random values. For any other seed value, the sequence + // of random numbers will be generated in a deterministic manner (specific to the implementation). + // default = 1 + Seed *uint32 `protobuf:"varint,3,opt,name=seed,proto3,oneof" json:"seed,omitempty"` + // The total number of values to be generated by the random value generator. + // default = 1 + Count *uint32 `protobuf:"varint,4,opt,name=count,proto3,oneof" json:"count,omitempty"` +} + +func (x *PatternFlowIpv4DstRandom) Reset() { + *x = PatternFlowIpv4DstRandom{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[648] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4DstRandom) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4DstRandom) ProtoMessage() {} + +func (x *PatternFlowIpv4DstRandom) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[648] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4DstRandom.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DstRandom) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{648} +} + +func (x *PatternFlowIpv4DstRandom) GetMin() string { + if x != nil && x.Min != nil { + return *x.Min + } + return "" +} + +func (x *PatternFlowIpv4DstRandom) GetMax() string { + if x != nil && x.Max != nil { + return *x.Max + } + return "" +} + +func (x *PatternFlowIpv4DstRandom) GetSeed() uint32 { + if x != nil && x.Seed != nil { + return *x.Seed + } + return 0 +} + +func (x *PatternFlowIpv4DstRandom) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Destination address +type PatternFlowIpv4Dst struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGreReserved0_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGreReserved0_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4Dst_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4Dst_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 0.0.0.0 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = ['0.0.0.0'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGreReserved0Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4DstCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGreReserved0Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4DstCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGreReserved0MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4DstMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // Description missing in models + Auto *FlowIpv4Auto `protobuf:"bytes,8,opt,name=auto,proto3" json:"auto,omitempty"` + // Description missing in models + Random *PatternFlowIpv4DstRandom `protobuf:"bytes,9,opt,name=random,proto3" json:"random,omitempty"` } -func (x *PatternFlowGreReserved0) Reset() { - *x = PatternFlowGreReserved0{} +func (x *PatternFlowIpv4Dst) Reset() { + *x = PatternFlowIpv4Dst{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[665] + mi := &file_otg_proto_msgTypes[649] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreReserved0) String() string { +func (x *PatternFlowIpv4Dst) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreReserved0) ProtoMessage() {} +func (*PatternFlowIpv4Dst) ProtoMessage() {} -func (x *PatternFlowGreReserved0) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[665] +func (x *PatternFlowIpv4Dst) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[649] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -78029,55 +79283,69 @@ func (x *PatternFlowGreReserved0) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreReserved0.ProtoReflect.Descriptor instead. -func (*PatternFlowGreReserved0) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{665} +// Deprecated: Use PatternFlowIpv4Dst.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4Dst) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{649} } -func (x *PatternFlowGreReserved0) GetChoice() PatternFlowGreReserved0_Choice_Enum { +func (x *PatternFlowIpv4Dst) GetChoice() PatternFlowIpv4Dst_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGreReserved0_Choice_unspecified + return PatternFlowIpv4Dst_Choice_unspecified } -func (x *PatternFlowGreReserved0) GetValue() uint32 { +func (x *PatternFlowIpv4Dst) GetValue() string { if x != nil && x.Value != nil { return *x.Value } - return 0 + return "" } -func (x *PatternFlowGreReserved0) GetValues() []uint32 { +func (x *PatternFlowIpv4Dst) GetValues() []string { if x != nil { return x.Values } return nil } -func (x *PatternFlowGreReserved0) GetIncrement() *PatternFlowGreReserved0Counter { +func (x *PatternFlowIpv4Dst) GetIncrement() *PatternFlowIpv4DstCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGreReserved0) GetDecrement() *PatternFlowGreReserved0Counter { +func (x *PatternFlowIpv4Dst) GetDecrement() *PatternFlowIpv4DstCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGreReserved0) GetMetricTags() []*PatternFlowGreReserved0MetricTag { +func (x *PatternFlowIpv4Dst) GetMetricTags() []*PatternFlowIpv4DstMetricTag { if x != nil { return x.MetricTags } return nil } +func (x *PatternFlowIpv4Dst) GetAuto() *FlowIpv4Auto { + if x != nil { + return x.Auto + } + return nil +} + +func (x *PatternFlowIpv4Dst) GetRandom() *PatternFlowIpv4DstRandom { + if x != nil { + return x.Random + } + return nil +} + // integer counter pattern -type PatternFlowGreVersionCounter struct { +type PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -78093,23 +79361,23 @@ type PatternFlowGreVersionCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGreVersionCounter) Reset() { - *x = PatternFlowGreVersionCounter{} +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) Reset() { + *x = PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[666] + mi := &file_otg_proto_msgTypes[650] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreVersionCounter) String() string { +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreVersionCounter) ProtoMessage() {} +func (*PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) ProtoMessage() {} -func (x *PatternFlowGreVersionCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[666] +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[650] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -78120,115 +79388,41 @@ func (x *PatternFlowGreVersionCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreVersionCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGreVersionCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{666} +// Deprecated: Use PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{650} } -func (x *PatternFlowGreVersionCounter) GetStart() uint32 { +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGreVersionCounter) GetStep() uint32 { +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGreVersionCounter) GetCount() uint32 { +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowGreVersionMetricTag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field - // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 3 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` -} - -func (x *PatternFlowGreVersionMetricTag) Reset() { - *x = PatternFlowGreVersionMetricTag{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[667] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PatternFlowGreVersionMetricTag) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatternFlowGreVersionMetricTag) ProtoMessage() {} - -func (x *PatternFlowGreVersionMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[667] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PatternFlowGreVersionMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGreVersionMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{667} -} - -func (x *PatternFlowGreVersionMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *PatternFlowGreVersionMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset - } - return 0 -} - -func (x *PatternFlowGreVersionMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length - } - return 0 -} - -// GRE version number -type PatternFlowGreVersion struct { +// This flag indicates this option is copied to all fragments on fragmentations. +type PatternFlowIpv4OptionsCustomTypeCopiedFlag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGreVersion_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGreVersion_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -78236,32 +79430,28 @@ type PatternFlowGreVersion struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGreVersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGreVersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGreVersionMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + Decrement *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *PatternFlowGreVersion) Reset() { - *x = PatternFlowGreVersion{} +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) Reset() { + *x = PatternFlowIpv4OptionsCustomTypeCopiedFlag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[668] + mi := &file_otg_proto_msgTypes[651] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreVersion) String() string { +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreVersion) ProtoMessage() {} +func (*PatternFlowIpv4OptionsCustomTypeCopiedFlag) ProtoMessage() {} -func (x *PatternFlowGreVersion) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[668] +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[651] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -78272,61 +79462,54 @@ func (x *PatternFlowGreVersion) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreVersion.ProtoReflect.Descriptor instead. -func (*PatternFlowGreVersion) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{668} +// Deprecated: Use PatternFlowIpv4OptionsCustomTypeCopiedFlag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4OptionsCustomTypeCopiedFlag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{651} } -func (x *PatternFlowGreVersion) GetChoice() PatternFlowGreVersion_Choice_Enum { +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) GetChoice() PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGreVersion_Choice_unspecified + return PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_unspecified } -func (x *PatternFlowGreVersion) GetValue() uint32 { +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGreVersion) GetValues() []uint32 { +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGreVersion) GetIncrement() *PatternFlowGreVersionCounter { +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) GetIncrement() *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGreVersion) GetDecrement() *PatternFlowGreVersionCounter { +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag) GetDecrement() *PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGreVersion) GetMetricTags() []*PatternFlowGreVersionMetricTag { - if x != nil { - return x.MetricTags - } - return nil -} - // integer counter pattern -type PatternFlowGreProtocolCounter struct { +type PatternFlowIpv4OptionsCustomTypeOptionClassCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 2048 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -78336,23 +79519,23 @@ type PatternFlowGreProtocolCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGreProtocolCounter) Reset() { - *x = PatternFlowGreProtocolCounter{} +func (x *PatternFlowIpv4OptionsCustomTypeOptionClassCounter) Reset() { + *x = PatternFlowIpv4OptionsCustomTypeOptionClassCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[669] + mi := &file_otg_proto_msgTypes[652] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreProtocolCounter) String() string { +func (x *PatternFlowIpv4OptionsCustomTypeOptionClassCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreProtocolCounter) ProtoMessage() {} +func (*PatternFlowIpv4OptionsCustomTypeOptionClassCounter) ProtoMessage() {} -func (x *PatternFlowGreProtocolCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[669] +func (x *PatternFlowIpv4OptionsCustomTypeOptionClassCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[652] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -78363,70 +79546,70 @@ func (x *PatternFlowGreProtocolCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreProtocolCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGreProtocolCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{669} +// Deprecated: Use PatternFlowIpv4OptionsCustomTypeOptionClassCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4OptionsCustomTypeOptionClassCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{652} } -func (x *PatternFlowGreProtocolCounter) GetStart() uint32 { +func (x *PatternFlowIpv4OptionsCustomTypeOptionClassCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGreProtocolCounter) GetStep() uint32 { +func (x *PatternFlowIpv4OptionsCustomTypeOptionClassCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGreProtocolCounter) GetCount() uint32 { +func (x *PatternFlowIpv4OptionsCustomTypeOptionClassCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Metric tag can be used to enable tracking portion of or all bits in a corresponding -// header field for metrics per each applicable value. These would appear as tagged -// metrics in corresponding flow metrics. -type PatternFlowGreProtocolMetricTag struct { +// Option class [Ref:https://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml#ip-parameters-1]. +type PatternFlowIpv4OptionsCustomTypeOptionClass struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Name used to identify the metrics associated with the values applicable for configured - // offset and length inside corresponding header field - // required = true - Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` - // Offset in bits relative to start of corresponding header field + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models // default = 0 - Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` - // Number of bits to track for metrics starting from configured offset of corresponding - // header field - // default = 16 - Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIpv4OptionsCustomTypeOptionClassCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIpv4OptionsCustomTypeOptionClassCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *PatternFlowGreProtocolMetricTag) Reset() { - *x = PatternFlowGreProtocolMetricTag{} +func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) Reset() { + *x = PatternFlowIpv4OptionsCustomTypeOptionClass{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[670] + mi := &file_otg_proto_msgTypes[653] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreProtocolMetricTag) String() string { +func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreProtocolMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4OptionsCustomTypeOptionClass) ProtoMessage() {} -func (x *PatternFlowGreProtocolMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[670] +func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[653] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -78437,74 +79620,80 @@ func (x *PatternFlowGreProtocolMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreProtocolMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGreProtocolMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{670} +// Deprecated: Use PatternFlowIpv4OptionsCustomTypeOptionClass.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4OptionsCustomTypeOptionClass) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{653} } -func (x *PatternFlowGreProtocolMetricTag) GetName() string { - if x != nil && x.Name != nil { - return *x.Name +func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) GetChoice() PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_unspecified } -func (x *PatternFlowGreProtocolMetricTag) GetOffset() uint32 { - if x != nil && x.Offset != nil { - return *x.Offset +func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } return 0 } -func (x *PatternFlowGreProtocolMetricTag) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length +func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) GetValues() []uint32 { + if x != nil { + return x.Values } - return 0 + return nil } -// Protocol type of encapsulated payload -type PatternFlowGreProtocol struct { +func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) GetIncrement() *PatternFlowIpv4OptionsCustomTypeOptionClassCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowIpv4OptionsCustomTypeOptionClass) GetDecrement() *PatternFlowIpv4OptionsCustomTypeOptionClassCounter { + if x != nil { + return x.Decrement + } + return nil +} + +// integer counter pattern +type PatternFlowIpv4OptionsCustomTypeOptionNumberCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowGreProtocol_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGreProtocol_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 2048 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [2048] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - Increment *PatternFlowGreProtocolCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models - Decrement *PatternFlowGreProtocolCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGreProtocolMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGreProtocol) Reset() { - *x = PatternFlowGreProtocol{} +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) Reset() { + *x = PatternFlowIpv4OptionsCustomTypeOptionNumberCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[671] + mi := &file_otg_proto_msgTypes[654] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreProtocol) String() string { +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreProtocol) ProtoMessage() {} +func (*PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) ProtoMessage() {} -func (x *PatternFlowGreProtocol) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[671] +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[654] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -78515,87 +79704,70 @@ func (x *PatternFlowGreProtocol) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreProtocol.ProtoReflect.Descriptor instead. -func (*PatternFlowGreProtocol) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{671} -} - -func (x *PatternFlowGreProtocol) GetChoice() PatternFlowGreProtocol_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowGreProtocol_Choice_unspecified +// Deprecated: Use PatternFlowIpv4OptionsCustomTypeOptionNumberCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{654} } -func (x *PatternFlowGreProtocol) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } return 0 } -func (x *PatternFlowGreProtocol) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowGreProtocol) GetIncrement() *PatternFlowGreProtocolCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowGreProtocol) GetDecrement() *PatternFlowGreProtocolCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step } - return nil + return 0 } -func (x *PatternFlowGreProtocol) GetMetricTags() []*PatternFlowGreProtocolMetricTag { - if x != nil { - return x.MetricTags +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count } - return nil + return 0 } -// Optional checksum of GRE header and payload. Only present if the checksum_present -// bit is set. -type PatternFlowGreChecksum struct { +// Option Number [Ref:https://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml#ip-parameters-1]. +type PatternFlowIpv4OptionsCustomTypeOptionNumber struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The type of checksum - // default = Choice.Enum.generated - Choice *PatternFlowGreChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGreChecksum_Choice_Enum,oneof" json:"choice,omitempty"` - // A system generated checksum value - // default = Generated.Enum.good - Generated *PatternFlowGreChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowGreChecksum_Generated_Enum,oneof" json:"generated,omitempty"` - // A custom checksum value - Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *PatternFlowGreChecksum) Reset() { - *x = PatternFlowGreChecksum{} +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) Reset() { + *x = PatternFlowIpv4OptionsCustomTypeOptionNumber{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[672] + mi := &file_otg_proto_msgTypes[655] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreChecksum) String() string { +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreChecksum) ProtoMessage() {} +func (*PatternFlowIpv4OptionsCustomTypeOptionNumber) ProtoMessage() {} -func (x *PatternFlowGreChecksum) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[672] +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[655] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -78606,34 +79778,48 @@ func (x *PatternFlowGreChecksum) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreChecksum.ProtoReflect.Descriptor instead. -func (*PatternFlowGreChecksum) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{672} +// Deprecated: Use PatternFlowIpv4OptionsCustomTypeOptionNumber.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4OptionsCustomTypeOptionNumber) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{655} } -func (x *PatternFlowGreChecksum) GetChoice() PatternFlowGreChecksum_Choice_Enum { +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) GetChoice() PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGreChecksum_Choice_unspecified + return PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_unspecified } -func (x *PatternFlowGreChecksum) GetGenerated() PatternFlowGreChecksum_Generated_Enum { - if x != nil && x.Generated != nil { - return *x.Generated +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } - return PatternFlowGreChecksum_Generated_unspecified + return 0 } -func (x *PatternFlowGreChecksum) GetCustom() uint32 { - if x != nil && x.Custom != nil { - return *x.Custom +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) GetValues() []uint32 { + if x != nil { + return x.Values } - return 0 + return nil +} + +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) GetIncrement() *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber) GetDecrement() *PatternFlowIpv4OptionsCustomTypeOptionNumberCounter { + if x != nil { + return x.Decrement + } + return nil } // integer counter pattern -type PatternFlowGreReserved1Counter struct { +type PatternFlowIpv4PriorityRawCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -78649,23 +79835,23 @@ type PatternFlowGreReserved1Counter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGreReserved1Counter) Reset() { - *x = PatternFlowGreReserved1Counter{} +func (x *PatternFlowIpv4PriorityRawCounter) Reset() { + *x = PatternFlowIpv4PriorityRawCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[673] + mi := &file_otg_proto_msgTypes[656] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreReserved1Counter) String() string { +func (x *PatternFlowIpv4PriorityRawCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreReserved1Counter) ProtoMessage() {} +func (*PatternFlowIpv4PriorityRawCounter) ProtoMessage() {} -func (x *PatternFlowGreReserved1Counter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[673] +func (x *PatternFlowIpv4PriorityRawCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[656] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -78676,26 +79862,26 @@ func (x *PatternFlowGreReserved1Counter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreReserved1Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowGreReserved1Counter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{673} +// Deprecated: Use PatternFlowIpv4PriorityRawCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4PriorityRawCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{656} } -func (x *PatternFlowGreReserved1Counter) GetStart() uint32 { +func (x *PatternFlowIpv4PriorityRawCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGreReserved1Counter) GetStep() uint32 { +func (x *PatternFlowIpv4PriorityRawCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGreReserved1Counter) GetCount() uint32 { +func (x *PatternFlowIpv4PriorityRawCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -78705,7 +79891,7 @@ func (x *PatternFlowGreReserved1Counter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGreReserved1MetricTag struct { +type PatternFlowIpv4PriorityRawMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -78719,27 +79905,27 @@ type PatternFlowGreReserved1MetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 8 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGreReserved1MetricTag) Reset() { - *x = PatternFlowGreReserved1MetricTag{} +func (x *PatternFlowIpv4PriorityRawMetricTag) Reset() { + *x = PatternFlowIpv4PriorityRawMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[674] + mi := &file_otg_proto_msgTypes[657] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreReserved1MetricTag) String() string { +func (x *PatternFlowIpv4PriorityRawMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreReserved1MetricTag) ProtoMessage() {} +func (*PatternFlowIpv4PriorityRawMetricTag) ProtoMessage() {} -func (x *PatternFlowGreReserved1MetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[674] +func (x *PatternFlowIpv4PriorityRawMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[657] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -78750,41 +79936,41 @@ func (x *PatternFlowGreReserved1MetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreReserved1MetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGreReserved1MetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{674} +// Deprecated: Use PatternFlowIpv4PriorityRawMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4PriorityRawMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{657} } -func (x *PatternFlowGreReserved1MetricTag) GetName() string { +func (x *PatternFlowIpv4PriorityRawMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGreReserved1MetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4PriorityRawMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGreReserved1MetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4PriorityRawMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Optional reserved field. Only present if the checksum_present bit is set. -type PatternFlowGreReserved1 struct { +// Raw priority +type PatternFlowIpv4PriorityRaw struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGreReserved1_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGreReserved1_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4PriorityRaw_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4PriorityRaw_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -78792,32 +79978,32 @@ type PatternFlowGreReserved1 struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGreReserved1Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4PriorityRawCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGreReserved1Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4PriorityRawCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGreReserved1MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4PriorityRawMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGreReserved1) Reset() { - *x = PatternFlowGreReserved1{} +func (x *PatternFlowIpv4PriorityRaw) Reset() { + *x = PatternFlowIpv4PriorityRaw{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[675] + mi := &file_otg_proto_msgTypes[658] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreReserved1) String() string { +func (x *PatternFlowIpv4PriorityRaw) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreReserved1) ProtoMessage() {} +func (*PatternFlowIpv4PriorityRaw) ProtoMessage() {} -func (x *PatternFlowGreReserved1) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[675] +func (x *PatternFlowIpv4PriorityRaw) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[658] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -78828,47 +80014,47 @@ func (x *PatternFlowGreReserved1) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreReserved1.ProtoReflect.Descriptor instead. -func (*PatternFlowGreReserved1) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{675} +// Deprecated: Use PatternFlowIpv4PriorityRaw.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4PriorityRaw) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{658} } -func (x *PatternFlowGreReserved1) GetChoice() PatternFlowGreReserved1_Choice_Enum { +func (x *PatternFlowIpv4PriorityRaw) GetChoice() PatternFlowIpv4PriorityRaw_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGreReserved1_Choice_unspecified + return PatternFlowIpv4PriorityRaw_Choice_unspecified } -func (x *PatternFlowGreReserved1) GetValue() uint32 { +func (x *PatternFlowIpv4PriorityRaw) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGreReserved1) GetValues() []uint32 { +func (x *PatternFlowIpv4PriorityRaw) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGreReserved1) GetIncrement() *PatternFlowGreReserved1Counter { +func (x *PatternFlowIpv4PriorityRaw) GetIncrement() *PatternFlowIpv4PriorityRawCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGreReserved1) GetDecrement() *PatternFlowGreReserved1Counter { +func (x *PatternFlowIpv4PriorityRaw) GetDecrement() *PatternFlowIpv4PriorityRawCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGreReserved1) GetMetricTags() []*PatternFlowGreReserved1MetricTag { +func (x *PatternFlowIpv4PriorityRaw) GetMetricTags() []*PatternFlowIpv4PriorityRawMetricTag { if x != nil { return x.MetricTags } @@ -78876,13 +80062,13 @@ func (x *PatternFlowGreReserved1) GetMetricTags() []*PatternFlowGreReserved1Metr } // integer counter pattern -type PatternFlowGtpv1VersionCounter struct { +type PatternFlowIpv4DscpPhbCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 1 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -78892,23 +80078,23 @@ type PatternFlowGtpv1VersionCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv1VersionCounter) Reset() { - *x = PatternFlowGtpv1VersionCounter{} +func (x *PatternFlowIpv4DscpPhbCounter) Reset() { + *x = PatternFlowIpv4DscpPhbCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[676] + mi := &file_otg_proto_msgTypes[659] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1VersionCounter) String() string { +func (x *PatternFlowIpv4DscpPhbCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1VersionCounter) ProtoMessage() {} +func (*PatternFlowIpv4DscpPhbCounter) ProtoMessage() {} -func (x *PatternFlowGtpv1VersionCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[676] +func (x *PatternFlowIpv4DscpPhbCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[659] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -78919,26 +80105,26 @@ func (x *PatternFlowGtpv1VersionCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1VersionCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1VersionCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{676} +// Deprecated: Use PatternFlowIpv4DscpPhbCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DscpPhbCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{659} } -func (x *PatternFlowGtpv1VersionCounter) GetStart() uint32 { +func (x *PatternFlowIpv4DscpPhbCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv1VersionCounter) GetStep() uint32 { +func (x *PatternFlowIpv4DscpPhbCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv1VersionCounter) GetCount() uint32 { +func (x *PatternFlowIpv4DscpPhbCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -78948,7 +80134,7 @@ func (x *PatternFlowGtpv1VersionCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv1VersionMetricTag struct { +type PatternFlowIpv4DscpPhbMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -78962,27 +80148,27 @@ type PatternFlowGtpv1VersionMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 3 + // default = 6 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv1VersionMetricTag) Reset() { - *x = PatternFlowGtpv1VersionMetricTag{} +func (x *PatternFlowIpv4DscpPhbMetricTag) Reset() { + *x = PatternFlowIpv4DscpPhbMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[677] + mi := &file_otg_proto_msgTypes[660] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1VersionMetricTag) String() string { +func (x *PatternFlowIpv4DscpPhbMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1VersionMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4DscpPhbMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv1VersionMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[677] +func (x *PatternFlowIpv4DscpPhbMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[660] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -78993,74 +80179,74 @@ func (x *PatternFlowGtpv1VersionMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1VersionMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1VersionMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{677} +// Deprecated: Use PatternFlowIpv4DscpPhbMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DscpPhbMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{660} } -func (x *PatternFlowGtpv1VersionMetricTag) GetName() string { +func (x *PatternFlowIpv4DscpPhbMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv1VersionMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4DscpPhbMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv1VersionMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4DscpPhbMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// GTPv1 version -type PatternFlowGtpv1Version struct { +// Per hop behavior +type PatternFlowIpv4DscpPhb struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv1Version_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1Version_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4DscpPhb_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4DscpPhb_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [1] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv1VersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4DscpPhbCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv1VersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4DscpPhbCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv1VersionMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4DscpPhbMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv1Version) Reset() { - *x = PatternFlowGtpv1Version{} +func (x *PatternFlowIpv4DscpPhb) Reset() { + *x = PatternFlowIpv4DscpPhb{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[678] + mi := &file_otg_proto_msgTypes[661] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1Version) String() string { +func (x *PatternFlowIpv4DscpPhb) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1Version) ProtoMessage() {} +func (*PatternFlowIpv4DscpPhb) ProtoMessage() {} -func (x *PatternFlowGtpv1Version) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[678] +func (x *PatternFlowIpv4DscpPhb) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[661] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79071,47 +80257,47 @@ func (x *PatternFlowGtpv1Version) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1Version.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1Version) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{678} +// Deprecated: Use PatternFlowIpv4DscpPhb.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DscpPhb) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{661} } -func (x *PatternFlowGtpv1Version) GetChoice() PatternFlowGtpv1Version_Choice_Enum { +func (x *PatternFlowIpv4DscpPhb) GetChoice() PatternFlowIpv4DscpPhb_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv1Version_Choice_unspecified + return PatternFlowIpv4DscpPhb_Choice_unspecified } -func (x *PatternFlowGtpv1Version) GetValue() uint32 { +func (x *PatternFlowIpv4DscpPhb) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv1Version) GetValues() []uint32 { +func (x *PatternFlowIpv4DscpPhb) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv1Version) GetIncrement() *PatternFlowGtpv1VersionCounter { +func (x *PatternFlowIpv4DscpPhb) GetIncrement() *PatternFlowIpv4DscpPhbCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv1Version) GetDecrement() *PatternFlowGtpv1VersionCounter { +func (x *PatternFlowIpv4DscpPhb) GetDecrement() *PatternFlowIpv4DscpPhbCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv1Version) GetMetricTags() []*PatternFlowGtpv1VersionMetricTag { +func (x *PatternFlowIpv4DscpPhb) GetMetricTags() []*PatternFlowIpv4DscpPhbMetricTag { if x != nil { return x.MetricTags } @@ -79119,13 +80305,13 @@ func (x *PatternFlowGtpv1Version) GetMetricTags() []*PatternFlowGtpv1VersionMetr } // integer counter pattern -type PatternFlowGtpv1ProtocolTypeCounter struct { +type PatternFlowIpv4DscpEcnCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 1 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -79135,23 +80321,23 @@ type PatternFlowGtpv1ProtocolTypeCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv1ProtocolTypeCounter) Reset() { - *x = PatternFlowGtpv1ProtocolTypeCounter{} +func (x *PatternFlowIpv4DscpEcnCounter) Reset() { + *x = PatternFlowIpv4DscpEcnCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[679] + mi := &file_otg_proto_msgTypes[662] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1ProtocolTypeCounter) String() string { +func (x *PatternFlowIpv4DscpEcnCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1ProtocolTypeCounter) ProtoMessage() {} +func (*PatternFlowIpv4DscpEcnCounter) ProtoMessage() {} -func (x *PatternFlowGtpv1ProtocolTypeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[679] +func (x *PatternFlowIpv4DscpEcnCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[662] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79162,26 +80348,26 @@ func (x *PatternFlowGtpv1ProtocolTypeCounter) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1ProtocolTypeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1ProtocolTypeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{679} +// Deprecated: Use PatternFlowIpv4DscpEcnCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DscpEcnCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{662} } -func (x *PatternFlowGtpv1ProtocolTypeCounter) GetStart() uint32 { +func (x *PatternFlowIpv4DscpEcnCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv1ProtocolTypeCounter) GetStep() uint32 { +func (x *PatternFlowIpv4DscpEcnCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv1ProtocolTypeCounter) GetCount() uint32 { +func (x *PatternFlowIpv4DscpEcnCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -79191,7 +80377,7 @@ func (x *PatternFlowGtpv1ProtocolTypeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv1ProtocolTypeMetricTag struct { +type PatternFlowIpv4DscpEcnMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -79205,27 +80391,27 @@ type PatternFlowGtpv1ProtocolTypeMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 1 + // default = 2 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv1ProtocolTypeMetricTag) Reset() { - *x = PatternFlowGtpv1ProtocolTypeMetricTag{} +func (x *PatternFlowIpv4DscpEcnMetricTag) Reset() { + *x = PatternFlowIpv4DscpEcnMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[680] + mi := &file_otg_proto_msgTypes[663] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1ProtocolTypeMetricTag) String() string { +func (x *PatternFlowIpv4DscpEcnMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1ProtocolTypeMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4DscpEcnMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv1ProtocolTypeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[680] +func (x *PatternFlowIpv4DscpEcnMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[663] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79236,74 +80422,74 @@ func (x *PatternFlowGtpv1ProtocolTypeMetricTag) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1ProtocolTypeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1ProtocolTypeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{680} +// Deprecated: Use PatternFlowIpv4DscpEcnMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DscpEcnMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{663} } -func (x *PatternFlowGtpv1ProtocolTypeMetricTag) GetName() string { +func (x *PatternFlowIpv4DscpEcnMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv1ProtocolTypeMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4DscpEcnMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv1ProtocolTypeMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4DscpEcnMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Protocol type, GTP is 1, GTP' is 0 -type PatternFlowGtpv1ProtocolType struct { +// Explicit congestion notification +type PatternFlowIpv4DscpEcn struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv1ProtocolType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1ProtocolType_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4DscpEcn_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4DscpEcn_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [1] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv1ProtocolTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4DscpEcnCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv1ProtocolTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4DscpEcnCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv1ProtocolTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4DscpEcnMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv1ProtocolType) Reset() { - *x = PatternFlowGtpv1ProtocolType{} +func (x *PatternFlowIpv4DscpEcn) Reset() { + *x = PatternFlowIpv4DscpEcn{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[681] + mi := &file_otg_proto_msgTypes[664] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1ProtocolType) String() string { +func (x *PatternFlowIpv4DscpEcn) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1ProtocolType) ProtoMessage() {} +func (*PatternFlowIpv4DscpEcn) ProtoMessage() {} -func (x *PatternFlowGtpv1ProtocolType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[681] +func (x *PatternFlowIpv4DscpEcn) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[664] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79314,47 +80500,47 @@ func (x *PatternFlowGtpv1ProtocolType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1ProtocolType.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1ProtocolType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{681} +// Deprecated: Use PatternFlowIpv4DscpEcn.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DscpEcn) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{664} } -func (x *PatternFlowGtpv1ProtocolType) GetChoice() PatternFlowGtpv1ProtocolType_Choice_Enum { +func (x *PatternFlowIpv4DscpEcn) GetChoice() PatternFlowIpv4DscpEcn_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv1ProtocolType_Choice_unspecified + return PatternFlowIpv4DscpEcn_Choice_unspecified } -func (x *PatternFlowGtpv1ProtocolType) GetValue() uint32 { +func (x *PatternFlowIpv4DscpEcn) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv1ProtocolType) GetValues() []uint32 { +func (x *PatternFlowIpv4DscpEcn) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv1ProtocolType) GetIncrement() *PatternFlowGtpv1ProtocolTypeCounter { +func (x *PatternFlowIpv4DscpEcn) GetIncrement() *PatternFlowIpv4DscpEcnCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv1ProtocolType) GetDecrement() *PatternFlowGtpv1ProtocolTypeCounter { +func (x *PatternFlowIpv4DscpEcn) GetDecrement() *PatternFlowIpv4DscpEcnCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv1ProtocolType) GetMetricTags() []*PatternFlowGtpv1ProtocolTypeMetricTag { +func (x *PatternFlowIpv4DscpEcn) GetMetricTags() []*PatternFlowIpv4DscpEcnMetricTag { if x != nil { return x.MetricTags } @@ -79362,7 +80548,7 @@ func (x *PatternFlowGtpv1ProtocolType) GetMetricTags() []*PatternFlowGtpv1Protoc } // integer counter pattern -type PatternFlowGtpv1ReservedCounter struct { +type PatternFlowIpv4TosPrecedenceCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -79378,23 +80564,23 @@ type PatternFlowGtpv1ReservedCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv1ReservedCounter) Reset() { - *x = PatternFlowGtpv1ReservedCounter{} +func (x *PatternFlowIpv4TosPrecedenceCounter) Reset() { + *x = PatternFlowIpv4TosPrecedenceCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[682] + mi := &file_otg_proto_msgTypes[665] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1ReservedCounter) String() string { +func (x *PatternFlowIpv4TosPrecedenceCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1ReservedCounter) ProtoMessage() {} +func (*PatternFlowIpv4TosPrecedenceCounter) ProtoMessage() {} -func (x *PatternFlowGtpv1ReservedCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[682] +func (x *PatternFlowIpv4TosPrecedenceCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[665] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79405,26 +80591,26 @@ func (x *PatternFlowGtpv1ReservedCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1ReservedCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1ReservedCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{682} +// Deprecated: Use PatternFlowIpv4TosPrecedenceCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosPrecedenceCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{665} } -func (x *PatternFlowGtpv1ReservedCounter) GetStart() uint32 { +func (x *PatternFlowIpv4TosPrecedenceCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv1ReservedCounter) GetStep() uint32 { +func (x *PatternFlowIpv4TosPrecedenceCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv1ReservedCounter) GetCount() uint32 { +func (x *PatternFlowIpv4TosPrecedenceCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -79434,7 +80620,7 @@ func (x *PatternFlowGtpv1ReservedCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv1ReservedMetricTag struct { +type PatternFlowIpv4TosPrecedenceMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -79448,27 +80634,27 @@ type PatternFlowGtpv1ReservedMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 1 + // default = 3 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv1ReservedMetricTag) Reset() { - *x = PatternFlowGtpv1ReservedMetricTag{} +func (x *PatternFlowIpv4TosPrecedenceMetricTag) Reset() { + *x = PatternFlowIpv4TosPrecedenceMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[683] + mi := &file_otg_proto_msgTypes[666] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1ReservedMetricTag) String() string { +func (x *PatternFlowIpv4TosPrecedenceMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1ReservedMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4TosPrecedenceMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv1ReservedMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[683] +func (x *PatternFlowIpv4TosPrecedenceMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[666] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79479,41 +80665,41 @@ func (x *PatternFlowGtpv1ReservedMetricTag) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1ReservedMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1ReservedMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{683} +// Deprecated: Use PatternFlowIpv4TosPrecedenceMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosPrecedenceMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{666} } -func (x *PatternFlowGtpv1ReservedMetricTag) GetName() string { +func (x *PatternFlowIpv4TosPrecedenceMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv1ReservedMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4TosPrecedenceMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv1ReservedMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4TosPrecedenceMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Reserved field -type PatternFlowGtpv1Reserved struct { +// Precedence +type PatternFlowIpv4TosPrecedence struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv1Reserved_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1Reserved_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4TosPrecedence_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TosPrecedence_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -79521,32 +80707,32 @@ type PatternFlowGtpv1Reserved struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv1ReservedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4TosPrecedenceCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv1ReservedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4TosPrecedenceCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv1ReservedMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4TosPrecedenceMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv1Reserved) Reset() { - *x = PatternFlowGtpv1Reserved{} +func (x *PatternFlowIpv4TosPrecedence) Reset() { + *x = PatternFlowIpv4TosPrecedence{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[684] + mi := &file_otg_proto_msgTypes[667] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1Reserved) String() string { +func (x *PatternFlowIpv4TosPrecedence) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1Reserved) ProtoMessage() {} +func (*PatternFlowIpv4TosPrecedence) ProtoMessage() {} -func (x *PatternFlowGtpv1Reserved) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[684] +func (x *PatternFlowIpv4TosPrecedence) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[667] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79557,47 +80743,47 @@ func (x *PatternFlowGtpv1Reserved) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1Reserved.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1Reserved) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{684} +// Deprecated: Use PatternFlowIpv4TosPrecedence.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosPrecedence) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{667} } -func (x *PatternFlowGtpv1Reserved) GetChoice() PatternFlowGtpv1Reserved_Choice_Enum { +func (x *PatternFlowIpv4TosPrecedence) GetChoice() PatternFlowIpv4TosPrecedence_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv1Reserved_Choice_unspecified + return PatternFlowIpv4TosPrecedence_Choice_unspecified } -func (x *PatternFlowGtpv1Reserved) GetValue() uint32 { +func (x *PatternFlowIpv4TosPrecedence) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv1Reserved) GetValues() []uint32 { +func (x *PatternFlowIpv4TosPrecedence) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv1Reserved) GetIncrement() *PatternFlowGtpv1ReservedCounter { +func (x *PatternFlowIpv4TosPrecedence) GetIncrement() *PatternFlowIpv4TosPrecedenceCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv1Reserved) GetDecrement() *PatternFlowGtpv1ReservedCounter { +func (x *PatternFlowIpv4TosPrecedence) GetDecrement() *PatternFlowIpv4TosPrecedenceCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv1Reserved) GetMetricTags() []*PatternFlowGtpv1ReservedMetricTag { +func (x *PatternFlowIpv4TosPrecedence) GetMetricTags() []*PatternFlowIpv4TosPrecedenceMetricTag { if x != nil { return x.MetricTags } @@ -79605,7 +80791,7 @@ func (x *PatternFlowGtpv1Reserved) GetMetricTags() []*PatternFlowGtpv1ReservedMe } // integer counter pattern -type PatternFlowGtpv1EFlagCounter struct { +type PatternFlowIpv4TosDelayCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -79621,23 +80807,23 @@ type PatternFlowGtpv1EFlagCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv1EFlagCounter) Reset() { - *x = PatternFlowGtpv1EFlagCounter{} +func (x *PatternFlowIpv4TosDelayCounter) Reset() { + *x = PatternFlowIpv4TosDelayCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[685] + mi := &file_otg_proto_msgTypes[668] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1EFlagCounter) String() string { +func (x *PatternFlowIpv4TosDelayCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1EFlagCounter) ProtoMessage() {} +func (*PatternFlowIpv4TosDelayCounter) ProtoMessage() {} -func (x *PatternFlowGtpv1EFlagCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[685] +func (x *PatternFlowIpv4TosDelayCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[668] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79648,26 +80834,26 @@ func (x *PatternFlowGtpv1EFlagCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1EFlagCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1EFlagCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{685} +// Deprecated: Use PatternFlowIpv4TosDelayCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosDelayCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{668} } -func (x *PatternFlowGtpv1EFlagCounter) GetStart() uint32 { +func (x *PatternFlowIpv4TosDelayCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv1EFlagCounter) GetStep() uint32 { +func (x *PatternFlowIpv4TosDelayCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv1EFlagCounter) GetCount() uint32 { +func (x *PatternFlowIpv4TosDelayCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -79677,7 +80863,7 @@ func (x *PatternFlowGtpv1EFlagCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv1EFlagMetricTag struct { +type PatternFlowIpv4TosDelayMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -79695,23 +80881,23 @@ type PatternFlowGtpv1EFlagMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv1EFlagMetricTag) Reset() { - *x = PatternFlowGtpv1EFlagMetricTag{} +func (x *PatternFlowIpv4TosDelayMetricTag) Reset() { + *x = PatternFlowIpv4TosDelayMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[686] + mi := &file_otg_proto_msgTypes[669] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1EFlagMetricTag) String() string { +func (x *PatternFlowIpv4TosDelayMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1EFlagMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4TosDelayMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv1EFlagMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[686] +func (x *PatternFlowIpv4TosDelayMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[669] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79722,41 +80908,41 @@ func (x *PatternFlowGtpv1EFlagMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1EFlagMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1EFlagMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{686} +// Deprecated: Use PatternFlowIpv4TosDelayMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosDelayMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{669} } -func (x *PatternFlowGtpv1EFlagMetricTag) GetName() string { +func (x *PatternFlowIpv4TosDelayMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv1EFlagMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4TosDelayMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv1EFlagMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4TosDelayMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Extension header field present -type PatternFlowGtpv1EFlag struct { +// Delay +type PatternFlowIpv4TosDelay struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv1EFlag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1EFlag_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4TosDelay_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TosDelay_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -79764,32 +80950,32 @@ type PatternFlowGtpv1EFlag struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv1EFlagCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4TosDelayCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv1EFlagCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4TosDelayCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv1EFlagMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4TosDelayMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv1EFlag) Reset() { - *x = PatternFlowGtpv1EFlag{} +func (x *PatternFlowIpv4TosDelay) Reset() { + *x = PatternFlowIpv4TosDelay{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[687] + mi := &file_otg_proto_msgTypes[670] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1EFlag) String() string { +func (x *PatternFlowIpv4TosDelay) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1EFlag) ProtoMessage() {} +func (*PatternFlowIpv4TosDelay) ProtoMessage() {} -func (x *PatternFlowGtpv1EFlag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[687] +func (x *PatternFlowIpv4TosDelay) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[670] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79800,47 +80986,47 @@ func (x *PatternFlowGtpv1EFlag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1EFlag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1EFlag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{687} +// Deprecated: Use PatternFlowIpv4TosDelay.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosDelay) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{670} } -func (x *PatternFlowGtpv1EFlag) GetChoice() PatternFlowGtpv1EFlag_Choice_Enum { +func (x *PatternFlowIpv4TosDelay) GetChoice() PatternFlowIpv4TosDelay_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv1EFlag_Choice_unspecified + return PatternFlowIpv4TosDelay_Choice_unspecified } -func (x *PatternFlowGtpv1EFlag) GetValue() uint32 { +func (x *PatternFlowIpv4TosDelay) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv1EFlag) GetValues() []uint32 { +func (x *PatternFlowIpv4TosDelay) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv1EFlag) GetIncrement() *PatternFlowGtpv1EFlagCounter { +func (x *PatternFlowIpv4TosDelay) GetIncrement() *PatternFlowIpv4TosDelayCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv1EFlag) GetDecrement() *PatternFlowGtpv1EFlagCounter { +func (x *PatternFlowIpv4TosDelay) GetDecrement() *PatternFlowIpv4TosDelayCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv1EFlag) GetMetricTags() []*PatternFlowGtpv1EFlagMetricTag { +func (x *PatternFlowIpv4TosDelay) GetMetricTags() []*PatternFlowIpv4TosDelayMetricTag { if x != nil { return x.MetricTags } @@ -79848,7 +81034,7 @@ func (x *PatternFlowGtpv1EFlag) GetMetricTags() []*PatternFlowGtpv1EFlagMetricTa } // integer counter pattern -type PatternFlowGtpv1SFlagCounter struct { +type PatternFlowIpv4TosThroughputCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -79864,23 +81050,23 @@ type PatternFlowGtpv1SFlagCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv1SFlagCounter) Reset() { - *x = PatternFlowGtpv1SFlagCounter{} +func (x *PatternFlowIpv4TosThroughputCounter) Reset() { + *x = PatternFlowIpv4TosThroughputCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[688] + mi := &file_otg_proto_msgTypes[671] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1SFlagCounter) String() string { +func (x *PatternFlowIpv4TosThroughputCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1SFlagCounter) ProtoMessage() {} +func (*PatternFlowIpv4TosThroughputCounter) ProtoMessage() {} -func (x *PatternFlowGtpv1SFlagCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[688] +func (x *PatternFlowIpv4TosThroughputCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[671] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79891,26 +81077,26 @@ func (x *PatternFlowGtpv1SFlagCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1SFlagCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1SFlagCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{688} +// Deprecated: Use PatternFlowIpv4TosThroughputCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosThroughputCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{671} } -func (x *PatternFlowGtpv1SFlagCounter) GetStart() uint32 { +func (x *PatternFlowIpv4TosThroughputCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv1SFlagCounter) GetStep() uint32 { +func (x *PatternFlowIpv4TosThroughputCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv1SFlagCounter) GetCount() uint32 { +func (x *PatternFlowIpv4TosThroughputCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -79920,7 +81106,7 @@ func (x *PatternFlowGtpv1SFlagCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv1SFlagMetricTag struct { +type PatternFlowIpv4TosThroughputMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -79938,23 +81124,23 @@ type PatternFlowGtpv1SFlagMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv1SFlagMetricTag) Reset() { - *x = PatternFlowGtpv1SFlagMetricTag{} +func (x *PatternFlowIpv4TosThroughputMetricTag) Reset() { + *x = PatternFlowIpv4TosThroughputMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[689] + mi := &file_otg_proto_msgTypes[672] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1SFlagMetricTag) String() string { +func (x *PatternFlowIpv4TosThroughputMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1SFlagMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4TosThroughputMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv1SFlagMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[689] +func (x *PatternFlowIpv4TosThroughputMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[672] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -79965,41 +81151,41 @@ func (x *PatternFlowGtpv1SFlagMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1SFlagMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1SFlagMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{689} +// Deprecated: Use PatternFlowIpv4TosThroughputMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosThroughputMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{672} } -func (x *PatternFlowGtpv1SFlagMetricTag) GetName() string { +func (x *PatternFlowIpv4TosThroughputMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv1SFlagMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4TosThroughputMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv1SFlagMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4TosThroughputMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Sequence number field present -type PatternFlowGtpv1SFlag struct { +// Throughput +type PatternFlowIpv4TosThroughput struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv1SFlag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1SFlag_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4TosThroughput_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TosThroughput_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -80007,32 +81193,32 @@ type PatternFlowGtpv1SFlag struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv1SFlagCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4TosThroughputCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv1SFlagCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4TosThroughputCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv1SFlagMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4TosThroughputMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv1SFlag) Reset() { - *x = PatternFlowGtpv1SFlag{} +func (x *PatternFlowIpv4TosThroughput) Reset() { + *x = PatternFlowIpv4TosThroughput{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[690] + mi := &file_otg_proto_msgTypes[673] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1SFlag) String() string { +func (x *PatternFlowIpv4TosThroughput) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1SFlag) ProtoMessage() {} +func (*PatternFlowIpv4TosThroughput) ProtoMessage() {} -func (x *PatternFlowGtpv1SFlag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[690] +func (x *PatternFlowIpv4TosThroughput) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[673] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -80043,47 +81229,47 @@ func (x *PatternFlowGtpv1SFlag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1SFlag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1SFlag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{690} +// Deprecated: Use PatternFlowIpv4TosThroughput.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosThroughput) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{673} } -func (x *PatternFlowGtpv1SFlag) GetChoice() PatternFlowGtpv1SFlag_Choice_Enum { +func (x *PatternFlowIpv4TosThroughput) GetChoice() PatternFlowIpv4TosThroughput_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv1SFlag_Choice_unspecified + return PatternFlowIpv4TosThroughput_Choice_unspecified } -func (x *PatternFlowGtpv1SFlag) GetValue() uint32 { +func (x *PatternFlowIpv4TosThroughput) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv1SFlag) GetValues() []uint32 { +func (x *PatternFlowIpv4TosThroughput) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv1SFlag) GetIncrement() *PatternFlowGtpv1SFlagCounter { +func (x *PatternFlowIpv4TosThroughput) GetIncrement() *PatternFlowIpv4TosThroughputCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv1SFlag) GetDecrement() *PatternFlowGtpv1SFlagCounter { +func (x *PatternFlowIpv4TosThroughput) GetDecrement() *PatternFlowIpv4TosThroughputCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv1SFlag) GetMetricTags() []*PatternFlowGtpv1SFlagMetricTag { +func (x *PatternFlowIpv4TosThroughput) GetMetricTags() []*PatternFlowIpv4TosThroughputMetricTag { if x != nil { return x.MetricTags } @@ -80091,7 +81277,7 @@ func (x *PatternFlowGtpv1SFlag) GetMetricTags() []*PatternFlowGtpv1SFlagMetricTa } // integer counter pattern -type PatternFlowGtpv1PnFlagCounter struct { +type PatternFlowIpv4TosReliabilityCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -80107,23 +81293,23 @@ type PatternFlowGtpv1PnFlagCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv1PnFlagCounter) Reset() { - *x = PatternFlowGtpv1PnFlagCounter{} +func (x *PatternFlowIpv4TosReliabilityCounter) Reset() { + *x = PatternFlowIpv4TosReliabilityCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[691] + mi := &file_otg_proto_msgTypes[674] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1PnFlagCounter) String() string { +func (x *PatternFlowIpv4TosReliabilityCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1PnFlagCounter) ProtoMessage() {} +func (*PatternFlowIpv4TosReliabilityCounter) ProtoMessage() {} -func (x *PatternFlowGtpv1PnFlagCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[691] +func (x *PatternFlowIpv4TosReliabilityCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[674] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -80134,26 +81320,26 @@ func (x *PatternFlowGtpv1PnFlagCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1PnFlagCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1PnFlagCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{691} +// Deprecated: Use PatternFlowIpv4TosReliabilityCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosReliabilityCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{674} } -func (x *PatternFlowGtpv1PnFlagCounter) GetStart() uint32 { +func (x *PatternFlowIpv4TosReliabilityCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv1PnFlagCounter) GetStep() uint32 { +func (x *PatternFlowIpv4TosReliabilityCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv1PnFlagCounter) GetCount() uint32 { +func (x *PatternFlowIpv4TosReliabilityCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -80163,7 +81349,7 @@ func (x *PatternFlowGtpv1PnFlagCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv1PnFlagMetricTag struct { +type PatternFlowIpv4TosReliabilityMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -80181,23 +81367,23 @@ type PatternFlowGtpv1PnFlagMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv1PnFlagMetricTag) Reset() { - *x = PatternFlowGtpv1PnFlagMetricTag{} +func (x *PatternFlowIpv4TosReliabilityMetricTag) Reset() { + *x = PatternFlowIpv4TosReliabilityMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[692] + mi := &file_otg_proto_msgTypes[675] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1PnFlagMetricTag) String() string { +func (x *PatternFlowIpv4TosReliabilityMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1PnFlagMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4TosReliabilityMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv1PnFlagMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[692] +func (x *PatternFlowIpv4TosReliabilityMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[675] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -80208,41 +81394,41 @@ func (x *PatternFlowGtpv1PnFlagMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1PnFlagMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1PnFlagMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{692} +// Deprecated: Use PatternFlowIpv4TosReliabilityMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosReliabilityMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{675} } -func (x *PatternFlowGtpv1PnFlagMetricTag) GetName() string { +func (x *PatternFlowIpv4TosReliabilityMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv1PnFlagMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4TosReliabilityMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv1PnFlagMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4TosReliabilityMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// N-PDU field present -type PatternFlowGtpv1PnFlag struct { +// Reliability +type PatternFlowIpv4TosReliability struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv1PnFlag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1PnFlag_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4TosReliability_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TosReliability_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -80250,32 +81436,32 @@ type PatternFlowGtpv1PnFlag struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv1PnFlagCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4TosReliabilityCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv1PnFlagCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4TosReliabilityCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv1PnFlagMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4TosReliabilityMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv1PnFlag) Reset() { - *x = PatternFlowGtpv1PnFlag{} +func (x *PatternFlowIpv4TosReliability) Reset() { + *x = PatternFlowIpv4TosReliability{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[693] + mi := &file_otg_proto_msgTypes[676] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1PnFlag) String() string { +func (x *PatternFlowIpv4TosReliability) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1PnFlag) ProtoMessage() {} +func (*PatternFlowIpv4TosReliability) ProtoMessage() {} -func (x *PatternFlowGtpv1PnFlag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[693] +func (x *PatternFlowIpv4TosReliability) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[676] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -80286,47 +81472,47 @@ func (x *PatternFlowGtpv1PnFlag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1PnFlag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1PnFlag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{693} +// Deprecated: Use PatternFlowIpv4TosReliability.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosReliability) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{676} } -func (x *PatternFlowGtpv1PnFlag) GetChoice() PatternFlowGtpv1PnFlag_Choice_Enum { +func (x *PatternFlowIpv4TosReliability) GetChoice() PatternFlowIpv4TosReliability_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv1PnFlag_Choice_unspecified + return PatternFlowIpv4TosReliability_Choice_unspecified } -func (x *PatternFlowGtpv1PnFlag) GetValue() uint32 { +func (x *PatternFlowIpv4TosReliability) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv1PnFlag) GetValues() []uint32 { +func (x *PatternFlowIpv4TosReliability) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv1PnFlag) GetIncrement() *PatternFlowGtpv1PnFlagCounter { +func (x *PatternFlowIpv4TosReliability) GetIncrement() *PatternFlowIpv4TosReliabilityCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv1PnFlag) GetDecrement() *PatternFlowGtpv1PnFlagCounter { +func (x *PatternFlowIpv4TosReliability) GetDecrement() *PatternFlowIpv4TosReliabilityCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv1PnFlag) GetMetricTags() []*PatternFlowGtpv1PnFlagMetricTag { +func (x *PatternFlowIpv4TosReliability) GetMetricTags() []*PatternFlowIpv4TosReliabilityMetricTag { if x != nil { return x.MetricTags } @@ -80334,7 +81520,7 @@ func (x *PatternFlowGtpv1PnFlag) GetMetricTags() []*PatternFlowGtpv1PnFlagMetric } // integer counter pattern -type PatternFlowGtpv1MessageTypeCounter struct { +type PatternFlowIpv4TosMonetaryCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -80350,23 +81536,23 @@ type PatternFlowGtpv1MessageTypeCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv1MessageTypeCounter) Reset() { - *x = PatternFlowGtpv1MessageTypeCounter{} +func (x *PatternFlowIpv4TosMonetaryCounter) Reset() { + *x = PatternFlowIpv4TosMonetaryCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[694] + mi := &file_otg_proto_msgTypes[677] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1MessageTypeCounter) String() string { +func (x *PatternFlowIpv4TosMonetaryCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1MessageTypeCounter) ProtoMessage() {} +func (*PatternFlowIpv4TosMonetaryCounter) ProtoMessage() {} -func (x *PatternFlowGtpv1MessageTypeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[694] +func (x *PatternFlowIpv4TosMonetaryCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[677] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -80377,26 +81563,26 @@ func (x *PatternFlowGtpv1MessageTypeCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1MessageTypeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1MessageTypeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{694} +// Deprecated: Use PatternFlowIpv4TosMonetaryCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosMonetaryCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{677} } -func (x *PatternFlowGtpv1MessageTypeCounter) GetStart() uint32 { +func (x *PatternFlowIpv4TosMonetaryCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv1MessageTypeCounter) GetStep() uint32 { +func (x *PatternFlowIpv4TosMonetaryCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv1MessageTypeCounter) GetCount() uint32 { +func (x *PatternFlowIpv4TosMonetaryCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -80406,7 +81592,7 @@ func (x *PatternFlowGtpv1MessageTypeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv1MessageTypeMetricTag struct { +type PatternFlowIpv4TosMonetaryMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -80420,27 +81606,27 @@ type PatternFlowGtpv1MessageTypeMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 1 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv1MessageTypeMetricTag) Reset() { - *x = PatternFlowGtpv1MessageTypeMetricTag{} +func (x *PatternFlowIpv4TosMonetaryMetricTag) Reset() { + *x = PatternFlowIpv4TosMonetaryMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[695] + mi := &file_otg_proto_msgTypes[678] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1MessageTypeMetricTag) String() string { +func (x *PatternFlowIpv4TosMonetaryMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1MessageTypeMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4TosMonetaryMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv1MessageTypeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[695] +func (x *PatternFlowIpv4TosMonetaryMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[678] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -80451,42 +81637,41 @@ func (x *PatternFlowGtpv1MessageTypeMetricTag) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1MessageTypeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1MessageTypeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{695} +// Deprecated: Use PatternFlowIpv4TosMonetaryMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosMonetaryMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{678} } -func (x *PatternFlowGtpv1MessageTypeMetricTag) GetName() string { +func (x *PatternFlowIpv4TosMonetaryMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv1MessageTypeMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4TosMonetaryMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv1MessageTypeMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4TosMonetaryMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// The type of GTP message Different types of messages are defined in 3GPP TS 29.060 -// section 7.1 -type PatternFlowGtpv1MessageType struct { +// Monetary +type PatternFlowIpv4TosMonetary struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv1MessageType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1MessageType_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4TosMonetary_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TosMonetary_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -80494,32 +81679,32 @@ type PatternFlowGtpv1MessageType struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv1MessageTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4TosMonetaryCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv1MessageTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4TosMonetaryCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv1MessageTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4TosMonetaryMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv1MessageType) Reset() { - *x = PatternFlowGtpv1MessageType{} +func (x *PatternFlowIpv4TosMonetary) Reset() { + *x = PatternFlowIpv4TosMonetary{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[696] + mi := &file_otg_proto_msgTypes[679] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1MessageType) String() string { +func (x *PatternFlowIpv4TosMonetary) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1MessageType) ProtoMessage() {} +func (*PatternFlowIpv4TosMonetary) ProtoMessage() {} -func (x *PatternFlowGtpv1MessageType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[696] +func (x *PatternFlowIpv4TosMonetary) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[679] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -80530,47 +81715,47 @@ func (x *PatternFlowGtpv1MessageType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1MessageType.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1MessageType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{696} +// Deprecated: Use PatternFlowIpv4TosMonetary.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosMonetary) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{679} } -func (x *PatternFlowGtpv1MessageType) GetChoice() PatternFlowGtpv1MessageType_Choice_Enum { +func (x *PatternFlowIpv4TosMonetary) GetChoice() PatternFlowIpv4TosMonetary_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv1MessageType_Choice_unspecified + return PatternFlowIpv4TosMonetary_Choice_unspecified } -func (x *PatternFlowGtpv1MessageType) GetValue() uint32 { +func (x *PatternFlowIpv4TosMonetary) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv1MessageType) GetValues() []uint32 { +func (x *PatternFlowIpv4TosMonetary) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv1MessageType) GetIncrement() *PatternFlowGtpv1MessageTypeCounter { +func (x *PatternFlowIpv4TosMonetary) GetIncrement() *PatternFlowIpv4TosMonetaryCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv1MessageType) GetDecrement() *PatternFlowGtpv1MessageTypeCounter { +func (x *PatternFlowIpv4TosMonetary) GetDecrement() *PatternFlowIpv4TosMonetaryCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv1MessageType) GetMetricTags() []*PatternFlowGtpv1MessageTypeMetricTag { +func (x *PatternFlowIpv4TosMonetary) GetMetricTags() []*PatternFlowIpv4TosMonetaryMetricTag { if x != nil { return x.MetricTags } @@ -80578,7 +81763,7 @@ func (x *PatternFlowGtpv1MessageType) GetMetricTags() []*PatternFlowGtpv1Message } // integer counter pattern -type PatternFlowGtpv1MessageLengthCounter struct { +type PatternFlowIpv4TosUnusedCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -80594,23 +81779,23 @@ type PatternFlowGtpv1MessageLengthCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv1MessageLengthCounter) Reset() { - *x = PatternFlowGtpv1MessageLengthCounter{} +func (x *PatternFlowIpv4TosUnusedCounter) Reset() { + *x = PatternFlowIpv4TosUnusedCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[697] + mi := &file_otg_proto_msgTypes[680] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1MessageLengthCounter) String() string { +func (x *PatternFlowIpv4TosUnusedCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1MessageLengthCounter) ProtoMessage() {} +func (*PatternFlowIpv4TosUnusedCounter) ProtoMessage() {} -func (x *PatternFlowGtpv1MessageLengthCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[697] +func (x *PatternFlowIpv4TosUnusedCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[680] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -80621,26 +81806,26 @@ func (x *PatternFlowGtpv1MessageLengthCounter) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1MessageLengthCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1MessageLengthCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{697} +// Deprecated: Use PatternFlowIpv4TosUnusedCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosUnusedCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{680} } -func (x *PatternFlowGtpv1MessageLengthCounter) GetStart() uint32 { +func (x *PatternFlowIpv4TosUnusedCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv1MessageLengthCounter) GetStep() uint32 { +func (x *PatternFlowIpv4TosUnusedCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv1MessageLengthCounter) GetCount() uint32 { +func (x *PatternFlowIpv4TosUnusedCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -80650,7 +81835,7 @@ func (x *PatternFlowGtpv1MessageLengthCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv1MessageLengthMetricTag struct { +type PatternFlowIpv4TosUnusedMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -80664,27 +81849,27 @@ type PatternFlowGtpv1MessageLengthMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 1 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv1MessageLengthMetricTag) Reset() { - *x = PatternFlowGtpv1MessageLengthMetricTag{} +func (x *PatternFlowIpv4TosUnusedMetricTag) Reset() { + *x = PatternFlowIpv4TosUnusedMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[698] + mi := &file_otg_proto_msgTypes[681] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1MessageLengthMetricTag) String() string { +func (x *PatternFlowIpv4TosUnusedMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1MessageLengthMetricTag) ProtoMessage() {} +func (*PatternFlowIpv4TosUnusedMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv1MessageLengthMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[698] +func (x *PatternFlowIpv4TosUnusedMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[681] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -80695,42 +81880,41 @@ func (x *PatternFlowGtpv1MessageLengthMetricTag) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1MessageLengthMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1MessageLengthMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{698} +// Deprecated: Use PatternFlowIpv4TosUnusedMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosUnusedMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{681} } -func (x *PatternFlowGtpv1MessageLengthMetricTag) GetName() string { +func (x *PatternFlowIpv4TosUnusedMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv1MessageLengthMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv4TosUnusedMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv1MessageLengthMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv4TosUnusedMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// The length of the payload (the bytes following the mandatory 8-byte GTP header) in -// bytes that includes any optional fields -type PatternFlowGtpv1MessageLength struct { +// Unused +type PatternFlowIpv4TosUnused struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv1MessageLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1MessageLength_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv4TosUnused_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv4TosUnused_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -80738,32 +81922,32 @@ type PatternFlowGtpv1MessageLength struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv1MessageLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv4TosUnusedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv1MessageLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv4TosUnusedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv1MessageLengthMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv4TosUnusedMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv1MessageLength) Reset() { - *x = PatternFlowGtpv1MessageLength{} +func (x *PatternFlowIpv4TosUnused) Reset() { + *x = PatternFlowIpv4TosUnused{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[699] + mi := &file_otg_proto_msgTypes[682] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1MessageLength) String() string { +func (x *PatternFlowIpv4TosUnused) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1MessageLength) ProtoMessage() {} +func (*PatternFlowIpv4TosUnused) ProtoMessage() {} -func (x *PatternFlowGtpv1MessageLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[699] +func (x *PatternFlowIpv4TosUnused) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[682] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -80774,47 +81958,47 @@ func (x *PatternFlowGtpv1MessageLength) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1MessageLength.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1MessageLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{699} +// Deprecated: Use PatternFlowIpv4TosUnused.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosUnused) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{682} } -func (x *PatternFlowGtpv1MessageLength) GetChoice() PatternFlowGtpv1MessageLength_Choice_Enum { +func (x *PatternFlowIpv4TosUnused) GetChoice() PatternFlowIpv4TosUnused_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv1MessageLength_Choice_unspecified + return PatternFlowIpv4TosUnused_Choice_unspecified } -func (x *PatternFlowGtpv1MessageLength) GetValue() uint32 { +func (x *PatternFlowIpv4TosUnused) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv1MessageLength) GetValues() []uint32 { +func (x *PatternFlowIpv4TosUnused) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv1MessageLength) GetIncrement() *PatternFlowGtpv1MessageLengthCounter { +func (x *PatternFlowIpv4TosUnused) GetIncrement() *PatternFlowIpv4TosUnusedCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv1MessageLength) GetDecrement() *PatternFlowGtpv1MessageLengthCounter { +func (x *PatternFlowIpv4TosUnused) GetDecrement() *PatternFlowIpv4TosUnusedCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv1MessageLength) GetMetricTags() []*PatternFlowGtpv1MessageLengthMetricTag { +func (x *PatternFlowIpv4TosUnused) GetMetricTags() []*PatternFlowIpv4TosUnusedMetricTag { if x != nil { return x.MetricTags } @@ -80822,13 +82006,13 @@ func (x *PatternFlowGtpv1MessageLength) GetMetricTags() []*PatternFlowGtpv1Messa } // integer counter pattern -type PatternFlowGtpv1TeidCounter struct { +type PatternFlowIpv6VersionCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 + // default = 6 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -80838,23 +82022,23 @@ type PatternFlowGtpv1TeidCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv1TeidCounter) Reset() { - *x = PatternFlowGtpv1TeidCounter{} +func (x *PatternFlowIpv6VersionCounter) Reset() { + *x = PatternFlowIpv6VersionCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[700] + mi := &file_otg_proto_msgTypes[683] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1TeidCounter) String() string { +func (x *PatternFlowIpv6VersionCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1TeidCounter) ProtoMessage() {} +func (*PatternFlowIpv6VersionCounter) ProtoMessage() {} -func (x *PatternFlowGtpv1TeidCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[700] +func (x *PatternFlowIpv6VersionCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[683] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -80865,26 +82049,26 @@ func (x *PatternFlowGtpv1TeidCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1TeidCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1TeidCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{700} +// Deprecated: Use PatternFlowIpv6VersionCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6VersionCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{683} } -func (x *PatternFlowGtpv1TeidCounter) GetStart() uint32 { +func (x *PatternFlowIpv6VersionCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv1TeidCounter) GetStep() uint32 { +func (x *PatternFlowIpv6VersionCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv1TeidCounter) GetCount() uint32 { +func (x *PatternFlowIpv6VersionCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -80894,7 +82078,7 @@ func (x *PatternFlowGtpv1TeidCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv1TeidMetricTag struct { +type PatternFlowIpv6VersionMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -80908,27 +82092,27 @@ type PatternFlowGtpv1TeidMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 32 + // default = 4 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv1TeidMetricTag) Reset() { - *x = PatternFlowGtpv1TeidMetricTag{} +func (x *PatternFlowIpv6VersionMetricTag) Reset() { + *x = PatternFlowIpv6VersionMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[701] + mi := &file_otg_proto_msgTypes[684] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1TeidMetricTag) String() string { +func (x *PatternFlowIpv6VersionMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1TeidMetricTag) ProtoMessage() {} +func (*PatternFlowIpv6VersionMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv1TeidMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[701] +func (x *PatternFlowIpv6VersionMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[684] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -80939,74 +82123,74 @@ func (x *PatternFlowGtpv1TeidMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1TeidMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1TeidMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{701} +// Deprecated: Use PatternFlowIpv6VersionMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6VersionMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{684} } -func (x *PatternFlowGtpv1TeidMetricTag) GetName() string { +func (x *PatternFlowIpv6VersionMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv1TeidMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv6VersionMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv1TeidMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv6VersionMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Tunnel endpoint identifier (TEID) used to multiplex connections in the same GTP tunnel -type PatternFlowGtpv1Teid struct { +// Version number +type PatternFlowIpv6Version struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv1Teid_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1Teid_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv6Version_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6Version_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 + // default = 6 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] + // default = [6] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv1TeidCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv6VersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv1TeidCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv6VersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv1TeidMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv6VersionMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv1Teid) Reset() { - *x = PatternFlowGtpv1Teid{} +func (x *PatternFlowIpv6Version) Reset() { + *x = PatternFlowIpv6Version{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[702] + mi := &file_otg_proto_msgTypes[685] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1Teid) String() string { +func (x *PatternFlowIpv6Version) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1Teid) ProtoMessage() {} +func (*PatternFlowIpv6Version) ProtoMessage() {} -func (x *PatternFlowGtpv1Teid) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[702] +func (x *PatternFlowIpv6Version) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[685] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -81017,47 +82201,47 @@ func (x *PatternFlowGtpv1Teid) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1Teid.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1Teid) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{702} +// Deprecated: Use PatternFlowIpv6Version.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6Version) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{685} } -func (x *PatternFlowGtpv1Teid) GetChoice() PatternFlowGtpv1Teid_Choice_Enum { +func (x *PatternFlowIpv6Version) GetChoice() PatternFlowIpv6Version_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv1Teid_Choice_unspecified + return PatternFlowIpv6Version_Choice_unspecified } -func (x *PatternFlowGtpv1Teid) GetValue() uint32 { +func (x *PatternFlowIpv6Version) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv1Teid) GetValues() []uint32 { +func (x *PatternFlowIpv6Version) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv1Teid) GetIncrement() *PatternFlowGtpv1TeidCounter { +func (x *PatternFlowIpv6Version) GetIncrement() *PatternFlowIpv6VersionCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv1Teid) GetDecrement() *PatternFlowGtpv1TeidCounter { +func (x *PatternFlowIpv6Version) GetDecrement() *PatternFlowIpv6VersionCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv1Teid) GetMetricTags() []*PatternFlowGtpv1TeidMetricTag { +func (x *PatternFlowIpv6Version) GetMetricTags() []*PatternFlowIpv6VersionMetricTag { if x != nil { return x.MetricTags } @@ -81065,7 +82249,7 @@ func (x *PatternFlowGtpv1Teid) GetMetricTags() []*PatternFlowGtpv1TeidMetricTag } // integer counter pattern -type PatternFlowGtpv1SquenceNumberCounter struct { +type PatternFlowIpv6TrafficClassCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -81081,23 +82265,23 @@ type PatternFlowGtpv1SquenceNumberCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv1SquenceNumberCounter) Reset() { - *x = PatternFlowGtpv1SquenceNumberCounter{} +func (x *PatternFlowIpv6TrafficClassCounter) Reset() { + *x = PatternFlowIpv6TrafficClassCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[703] + mi := &file_otg_proto_msgTypes[686] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1SquenceNumberCounter) String() string { +func (x *PatternFlowIpv6TrafficClassCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1SquenceNumberCounter) ProtoMessage() {} +func (*PatternFlowIpv6TrafficClassCounter) ProtoMessage() {} -func (x *PatternFlowGtpv1SquenceNumberCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[703] +func (x *PatternFlowIpv6TrafficClassCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[686] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -81108,26 +82292,26 @@ func (x *PatternFlowGtpv1SquenceNumberCounter) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1SquenceNumberCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1SquenceNumberCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{703} +// Deprecated: Use PatternFlowIpv6TrafficClassCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6TrafficClassCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{686} } -func (x *PatternFlowGtpv1SquenceNumberCounter) GetStart() uint32 { +func (x *PatternFlowIpv6TrafficClassCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv1SquenceNumberCounter) GetStep() uint32 { +func (x *PatternFlowIpv6TrafficClassCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv1SquenceNumberCounter) GetCount() uint32 { +func (x *PatternFlowIpv6TrafficClassCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -81137,7 +82321,7 @@ func (x *PatternFlowGtpv1SquenceNumberCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv1SquenceNumberMetricTag struct { +type PatternFlowIpv6TrafficClassMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -81151,27 +82335,27 @@ type PatternFlowGtpv1SquenceNumberMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 8 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv1SquenceNumberMetricTag) Reset() { - *x = PatternFlowGtpv1SquenceNumberMetricTag{} +func (x *PatternFlowIpv6TrafficClassMetricTag) Reset() { + *x = PatternFlowIpv6TrafficClassMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[704] + mi := &file_otg_proto_msgTypes[687] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1SquenceNumberMetricTag) String() string { +func (x *PatternFlowIpv6TrafficClassMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1SquenceNumberMetricTag) ProtoMessage() {} +func (*PatternFlowIpv6TrafficClassMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv1SquenceNumberMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[704] +func (x *PatternFlowIpv6TrafficClassMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[687] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -81182,42 +82366,41 @@ func (x *PatternFlowGtpv1SquenceNumberMetricTag) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1SquenceNumberMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1SquenceNumberMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{704} +// Deprecated: Use PatternFlowIpv6TrafficClassMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6TrafficClassMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{687} } -func (x *PatternFlowGtpv1SquenceNumberMetricTag) GetName() string { +func (x *PatternFlowIpv6TrafficClassMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv1SquenceNumberMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv6TrafficClassMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv1SquenceNumberMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv6TrafficClassMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Sequence number. Exists if any of the e_flag, s_flag, or pn_flag bits are on. Must -// be interpreted only if the s_flag bit is on. -type PatternFlowGtpv1SquenceNumber struct { +// Traffic class +type PatternFlowIpv6TrafficClass struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv1SquenceNumber_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1SquenceNumber_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv6TrafficClass_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6TrafficClass_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -81225,32 +82408,32 @@ type PatternFlowGtpv1SquenceNumber struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv1SquenceNumberCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv6TrafficClassCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv1SquenceNumberCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv6TrafficClassCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv1SquenceNumberMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv6TrafficClassMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv1SquenceNumber) Reset() { - *x = PatternFlowGtpv1SquenceNumber{} +func (x *PatternFlowIpv6TrafficClass) Reset() { + *x = PatternFlowIpv6TrafficClass{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[705] + mi := &file_otg_proto_msgTypes[688] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1SquenceNumber) String() string { +func (x *PatternFlowIpv6TrafficClass) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1SquenceNumber) ProtoMessage() {} +func (*PatternFlowIpv6TrafficClass) ProtoMessage() {} -func (x *PatternFlowGtpv1SquenceNumber) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[705] +func (x *PatternFlowIpv6TrafficClass) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[688] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -81261,47 +82444,47 @@ func (x *PatternFlowGtpv1SquenceNumber) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1SquenceNumber.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1SquenceNumber) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{705} +// Deprecated: Use PatternFlowIpv6TrafficClass.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6TrafficClass) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{688} } -func (x *PatternFlowGtpv1SquenceNumber) GetChoice() PatternFlowGtpv1SquenceNumber_Choice_Enum { +func (x *PatternFlowIpv6TrafficClass) GetChoice() PatternFlowIpv6TrafficClass_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv1SquenceNumber_Choice_unspecified + return PatternFlowIpv6TrafficClass_Choice_unspecified } -func (x *PatternFlowGtpv1SquenceNumber) GetValue() uint32 { +func (x *PatternFlowIpv6TrafficClass) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv1SquenceNumber) GetValues() []uint32 { +func (x *PatternFlowIpv6TrafficClass) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv1SquenceNumber) GetIncrement() *PatternFlowGtpv1SquenceNumberCounter { +func (x *PatternFlowIpv6TrafficClass) GetIncrement() *PatternFlowIpv6TrafficClassCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv1SquenceNumber) GetDecrement() *PatternFlowGtpv1SquenceNumberCounter { +func (x *PatternFlowIpv6TrafficClass) GetDecrement() *PatternFlowIpv6TrafficClassCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv1SquenceNumber) GetMetricTags() []*PatternFlowGtpv1SquenceNumberMetricTag { +func (x *PatternFlowIpv6TrafficClass) GetMetricTags() []*PatternFlowIpv6TrafficClassMetricTag { if x != nil { return x.MetricTags } @@ -81309,7 +82492,7 @@ func (x *PatternFlowGtpv1SquenceNumber) GetMetricTags() []*PatternFlowGtpv1Squen } // integer counter pattern -type PatternFlowGtpv1NPduNumberCounter struct { +type PatternFlowIpv6FlowLabelCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -81325,23 +82508,23 @@ type PatternFlowGtpv1NPduNumberCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv1NPduNumberCounter) Reset() { - *x = PatternFlowGtpv1NPduNumberCounter{} +func (x *PatternFlowIpv6FlowLabelCounter) Reset() { + *x = PatternFlowIpv6FlowLabelCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[706] + mi := &file_otg_proto_msgTypes[689] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1NPduNumberCounter) String() string { +func (x *PatternFlowIpv6FlowLabelCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1NPduNumberCounter) ProtoMessage() {} +func (*PatternFlowIpv6FlowLabelCounter) ProtoMessage() {} -func (x *PatternFlowGtpv1NPduNumberCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[706] +func (x *PatternFlowIpv6FlowLabelCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[689] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -81352,26 +82535,26 @@ func (x *PatternFlowGtpv1NPduNumberCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1NPduNumberCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1NPduNumberCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{706} +// Deprecated: Use PatternFlowIpv6FlowLabelCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6FlowLabelCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{689} } -func (x *PatternFlowGtpv1NPduNumberCounter) GetStart() uint32 { +func (x *PatternFlowIpv6FlowLabelCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv1NPduNumberCounter) GetStep() uint32 { +func (x *PatternFlowIpv6FlowLabelCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv1NPduNumberCounter) GetCount() uint32 { +func (x *PatternFlowIpv6FlowLabelCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -81381,7 +82564,7 @@ func (x *PatternFlowGtpv1NPduNumberCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv1NPduNumberMetricTag struct { +type PatternFlowIpv6FlowLabelMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -81395,27 +82578,27 @@ type PatternFlowGtpv1NPduNumberMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 20 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv1NPduNumberMetricTag) Reset() { - *x = PatternFlowGtpv1NPduNumberMetricTag{} +func (x *PatternFlowIpv6FlowLabelMetricTag) Reset() { + *x = PatternFlowIpv6FlowLabelMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[707] + mi := &file_otg_proto_msgTypes[690] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1NPduNumberMetricTag) String() string { +func (x *PatternFlowIpv6FlowLabelMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1NPduNumberMetricTag) ProtoMessage() {} +func (*PatternFlowIpv6FlowLabelMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv1NPduNumberMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[707] +func (x *PatternFlowIpv6FlowLabelMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[690] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -81426,42 +82609,124 @@ func (x *PatternFlowGtpv1NPduNumberMetricTag) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1NPduNumberMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1NPduNumberMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{707} +// Deprecated: Use PatternFlowIpv6FlowLabelMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6FlowLabelMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{690} } -func (x *PatternFlowGtpv1NPduNumberMetricTag) GetName() string { +func (x *PatternFlowIpv6FlowLabelMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv1NPduNumberMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv6FlowLabelMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv1NPduNumberMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv6FlowLabelMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// N-PDU number. Exists if any of the e_flag, s_flag, or pn_flag bits are on. Must -// be interpreted only if the pn_flag bit is on. -type PatternFlowGtpv1NPduNumber struct { +// integer random pattern +type PatternFlowIpv6FlowLabelRandom struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The minimum possible value generated by the random value generator. + // default = 0 + Min *uint32 `protobuf:"varint,1,opt,name=min,proto3,oneof" json:"min,omitempty"` + // The maximum possible value generated by the random value generator. + // default = 1048575 + Max *uint32 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` + // The seed value is used to initialize the random number generator to a deterministic + // state. If the user provides a seed value of 0, the implementation will generate a + // sequence of non-deterministic random values. For any other seed value, the sequence + // of random numbers will be generated in a deterministic manner (specific to the implementation). + // default = 1 + Seed *uint32 `protobuf:"varint,3,opt,name=seed,proto3,oneof" json:"seed,omitempty"` + // The total number of values to be generated by the random value generator. + // default = 1 + Count *uint32 `protobuf:"varint,4,opt,name=count,proto3,oneof" json:"count,omitempty"` +} + +func (x *PatternFlowIpv6FlowLabelRandom) Reset() { + *x = PatternFlowIpv6FlowLabelRandom{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[691] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv6FlowLabelRandom) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv6FlowLabelRandom) ProtoMessage() {} + +func (x *PatternFlowIpv6FlowLabelRandom) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[691] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv6FlowLabelRandom.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6FlowLabelRandom) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{691} +} + +func (x *PatternFlowIpv6FlowLabelRandom) GetMin() uint32 { + if x != nil && x.Min != nil { + return *x.Min + } + return 0 +} + +func (x *PatternFlowIpv6FlowLabelRandom) GetMax() uint32 { + if x != nil && x.Max != nil { + return *x.Max + } + return 0 +} + +func (x *PatternFlowIpv6FlowLabelRandom) GetSeed() uint32 { + if x != nil && x.Seed != nil { + return *x.Seed + } + return 0 +} + +func (x *PatternFlowIpv6FlowLabelRandom) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Flow label +type PatternFlowIpv6FlowLabel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv1NPduNumber_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1NPduNumber_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv6FlowLabel_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6FlowLabel_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -81469,32 +82734,34 @@ type PatternFlowGtpv1NPduNumber struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv1NPduNumberCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv6FlowLabelCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv1NPduNumberCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv6FlowLabelCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv1NPduNumberMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv6FlowLabelMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // Description missing in models + Random *PatternFlowIpv6FlowLabelRandom `protobuf:"bytes,8,opt,name=random,proto3" json:"random,omitempty"` } -func (x *PatternFlowGtpv1NPduNumber) Reset() { - *x = PatternFlowGtpv1NPduNumber{} +func (x *PatternFlowIpv6FlowLabel) Reset() { + *x = PatternFlowIpv6FlowLabel{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[708] + mi := &file_otg_proto_msgTypes[692] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1NPduNumber) String() string { +func (x *PatternFlowIpv6FlowLabel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1NPduNumber) ProtoMessage() {} +func (*PatternFlowIpv6FlowLabel) ProtoMessage() {} -func (x *PatternFlowGtpv1NPduNumber) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[708] +func (x *PatternFlowIpv6FlowLabel) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[692] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -81505,55 +82772,62 @@ func (x *PatternFlowGtpv1NPduNumber) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1NPduNumber.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1NPduNumber) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{708} +// Deprecated: Use PatternFlowIpv6FlowLabel.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6FlowLabel) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{692} } -func (x *PatternFlowGtpv1NPduNumber) GetChoice() PatternFlowGtpv1NPduNumber_Choice_Enum { +func (x *PatternFlowIpv6FlowLabel) GetChoice() PatternFlowIpv6FlowLabel_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv1NPduNumber_Choice_unspecified + return PatternFlowIpv6FlowLabel_Choice_unspecified } -func (x *PatternFlowGtpv1NPduNumber) GetValue() uint32 { +func (x *PatternFlowIpv6FlowLabel) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv1NPduNumber) GetValues() []uint32 { +func (x *PatternFlowIpv6FlowLabel) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv1NPduNumber) GetIncrement() *PatternFlowGtpv1NPduNumberCounter { +func (x *PatternFlowIpv6FlowLabel) GetIncrement() *PatternFlowIpv6FlowLabelCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv1NPduNumber) GetDecrement() *PatternFlowGtpv1NPduNumberCounter { +func (x *PatternFlowIpv6FlowLabel) GetDecrement() *PatternFlowIpv6FlowLabelCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv1NPduNumber) GetMetricTags() []*PatternFlowGtpv1NPduNumberMetricTag { +func (x *PatternFlowIpv6FlowLabel) GetMetricTags() []*PatternFlowIpv6FlowLabelMetricTag { if x != nil { return x.MetricTags } return nil } +func (x *PatternFlowIpv6FlowLabel) GetRandom() *PatternFlowIpv6FlowLabelRandom { + if x != nil { + return x.Random + } + return nil +} + // integer counter pattern -type PatternFlowGtpv1NextExtensionHeaderTypeCounter struct { +type PatternFlowIpv6PayloadLengthCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -81569,23 +82843,23 @@ type PatternFlowGtpv1NextExtensionHeaderTypeCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv1NextExtensionHeaderTypeCounter) Reset() { - *x = PatternFlowGtpv1NextExtensionHeaderTypeCounter{} +func (x *PatternFlowIpv6PayloadLengthCounter) Reset() { + *x = PatternFlowIpv6PayloadLengthCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[709] + mi := &file_otg_proto_msgTypes[693] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1NextExtensionHeaderTypeCounter) String() string { +func (x *PatternFlowIpv6PayloadLengthCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1NextExtensionHeaderTypeCounter) ProtoMessage() {} +func (*PatternFlowIpv6PayloadLengthCounter) ProtoMessage() {} -func (x *PatternFlowGtpv1NextExtensionHeaderTypeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[709] +func (x *PatternFlowIpv6PayloadLengthCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[693] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -81596,26 +82870,26 @@ func (x *PatternFlowGtpv1NextExtensionHeaderTypeCounter) ProtoReflect() protoref return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1NextExtensionHeaderTypeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1NextExtensionHeaderTypeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{709} +// Deprecated: Use PatternFlowIpv6PayloadLengthCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6PayloadLengthCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{693} } -func (x *PatternFlowGtpv1NextExtensionHeaderTypeCounter) GetStart() uint32 { +func (x *PatternFlowIpv6PayloadLengthCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv1NextExtensionHeaderTypeCounter) GetStep() uint32 { +func (x *PatternFlowIpv6PayloadLengthCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv1NextExtensionHeaderTypeCounter) GetCount() uint32 { +func (x *PatternFlowIpv6PayloadLengthCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -81625,7 +82899,7 @@ func (x *PatternFlowGtpv1NextExtensionHeaderTypeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv1NextExtensionHeaderTypeMetricTag struct { +type PatternFlowIpv6PayloadLengthMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -81639,27 +82913,27 @@ type PatternFlowGtpv1NextExtensionHeaderTypeMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) Reset() { - *x = PatternFlowGtpv1NextExtensionHeaderTypeMetricTag{} +func (x *PatternFlowIpv6PayloadLengthMetricTag) Reset() { + *x = PatternFlowIpv6PayloadLengthMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[710] + mi := &file_otg_proto_msgTypes[694] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) String() string { +func (x *PatternFlowIpv6PayloadLengthMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) ProtoMessage() {} +func (*PatternFlowIpv6PayloadLengthMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[710] +func (x *PatternFlowIpv6PayloadLengthMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[694] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -81670,75 +82944,79 @@ func (x *PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) ProtoReflect() protor return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1NextExtensionHeaderTypeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{710} +// Deprecated: Use PatternFlowIpv6PayloadLengthMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6PayloadLengthMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{694} } -func (x *PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) GetName() string { +func (x *PatternFlowIpv6PayloadLengthMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv6PayloadLengthMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv6PayloadLengthMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Next extension header. Exists if any of the e_flag, s_flag, or pn_flag bits are on. -// Must be interpreted only if the e_flag bit is on. -type PatternFlowGtpv1NextExtensionHeaderType struct { +// Payload length +type PatternFlowIpv6PayloadLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.auto + Choice *PatternFlowIpv6PayloadLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6PayloadLength_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // The OTG implementation can provide a system generated + // value for this property. If the OTG is unable to generate a value + // the default value must be used. + // default = 0 + Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` // Description missing in models - Increment *PatternFlowGtpv1NextExtensionHeaderTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv6PayloadLengthCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv1NextExtensionHeaderTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv6PayloadLengthCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv1NextExtensionHeaderTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv6PayloadLengthMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv1NextExtensionHeaderType) Reset() { - *x = PatternFlowGtpv1NextExtensionHeaderType{} +func (x *PatternFlowIpv6PayloadLength) Reset() { + *x = PatternFlowIpv6PayloadLength{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[711] + mi := &file_otg_proto_msgTypes[695] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1NextExtensionHeaderType) String() string { +func (x *PatternFlowIpv6PayloadLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1NextExtensionHeaderType) ProtoMessage() {} +func (*PatternFlowIpv6PayloadLength) ProtoMessage() {} -func (x *PatternFlowGtpv1NextExtensionHeaderType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[711] +func (x *PatternFlowIpv6PayloadLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[695] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -81749,47 +83027,54 @@ func (x *PatternFlowGtpv1NextExtensionHeaderType) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1NextExtensionHeaderType.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1NextExtensionHeaderType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{711} +// Deprecated: Use PatternFlowIpv6PayloadLength.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6PayloadLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{695} } -func (x *PatternFlowGtpv1NextExtensionHeaderType) GetChoice() PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum { +func (x *PatternFlowIpv6PayloadLength) GetChoice() PatternFlowIpv6PayloadLength_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv1NextExtensionHeaderType_Choice_unspecified + return PatternFlowIpv6PayloadLength_Choice_unspecified } -func (x *PatternFlowGtpv1NextExtensionHeaderType) GetValue() uint32 { +func (x *PatternFlowIpv6PayloadLength) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv1NextExtensionHeaderType) GetValues() []uint32 { +func (x *PatternFlowIpv6PayloadLength) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv1NextExtensionHeaderType) GetIncrement() *PatternFlowGtpv1NextExtensionHeaderTypeCounter { +func (x *PatternFlowIpv6PayloadLength) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto + } + return 0 +} + +func (x *PatternFlowIpv6PayloadLength) GetIncrement() *PatternFlowIpv6PayloadLengthCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv1NextExtensionHeaderType) GetDecrement() *PatternFlowGtpv1NextExtensionHeaderTypeCounter { +func (x *PatternFlowIpv6PayloadLength) GetDecrement() *PatternFlowIpv6PayloadLengthCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv1NextExtensionHeaderType) GetMetricTags() []*PatternFlowGtpv1NextExtensionHeaderTypeMetricTag { +func (x *PatternFlowIpv6PayloadLength) GetMetricTags() []*PatternFlowIpv6PayloadLengthMetricTag { if x != nil { return x.MetricTags } @@ -81797,13 +83082,13 @@ func (x *PatternFlowGtpv1NextExtensionHeaderType) GetMetricTags() []*PatternFlow } // integer counter pattern -type PatternFlowGtpExtensionExtensionLengthCounter struct { +type PatternFlowIpv6NextHeaderCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 + // default = 59 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -81813,23 +83098,23 @@ type PatternFlowGtpExtensionExtensionLengthCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpExtensionExtensionLengthCounter) Reset() { - *x = PatternFlowGtpExtensionExtensionLengthCounter{} +func (x *PatternFlowIpv6NextHeaderCounter) Reset() { + *x = PatternFlowIpv6NextHeaderCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[712] + mi := &file_otg_proto_msgTypes[696] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpExtensionExtensionLengthCounter) String() string { +func (x *PatternFlowIpv6NextHeaderCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpExtensionExtensionLengthCounter) ProtoMessage() {} +func (*PatternFlowIpv6NextHeaderCounter) ProtoMessage() {} -func (x *PatternFlowGtpExtensionExtensionLengthCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[712] +func (x *PatternFlowIpv6NextHeaderCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[696] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -81840,26 +83125,26 @@ func (x *PatternFlowGtpExtensionExtensionLengthCounter) ProtoReflect() protorefl return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpExtensionExtensionLengthCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpExtensionExtensionLengthCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{712} -} +// Deprecated: Use PatternFlowIpv6NextHeaderCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6NextHeaderCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{696} +} -func (x *PatternFlowGtpExtensionExtensionLengthCounter) GetStart() uint32 { +func (x *PatternFlowIpv6NextHeaderCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpExtensionExtensionLengthCounter) GetStep() uint32 { +func (x *PatternFlowIpv6NextHeaderCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpExtensionExtensionLengthCounter) GetCount() uint32 { +func (x *PatternFlowIpv6NextHeaderCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -81869,7 +83154,7 @@ func (x *PatternFlowGtpExtensionExtensionLengthCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpExtensionExtensionLengthMetricTag struct { +type PatternFlowIpv6NextHeaderMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -81887,23 +83172,23 @@ type PatternFlowGtpExtensionExtensionLengthMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpExtensionExtensionLengthMetricTag) Reset() { - *x = PatternFlowGtpExtensionExtensionLengthMetricTag{} +func (x *PatternFlowIpv6NextHeaderMetricTag) Reset() { + *x = PatternFlowIpv6NextHeaderMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[713] + mi := &file_otg_proto_msgTypes[697] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpExtensionExtensionLengthMetricTag) String() string { +func (x *PatternFlowIpv6NextHeaderMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpExtensionExtensionLengthMetricTag) ProtoMessage() {} +func (*PatternFlowIpv6NextHeaderMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpExtensionExtensionLengthMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[713] +func (x *PatternFlowIpv6NextHeaderMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[697] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -81914,76 +83199,79 @@ func (x *PatternFlowGtpExtensionExtensionLengthMetricTag) ProtoReflect() protore return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpExtensionExtensionLengthMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpExtensionExtensionLengthMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{713} +// Deprecated: Use PatternFlowIpv6NextHeaderMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6NextHeaderMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{697} } -func (x *PatternFlowGtpExtensionExtensionLengthMetricTag) GetName() string { +func (x *PatternFlowIpv6NextHeaderMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpExtensionExtensionLengthMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv6NextHeaderMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpExtensionExtensionLengthMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv6NextHeaderMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// This field states the length of this extension header, including the length, the -// contents, and the next extension header field, in 4-octet units, so the length of -// the extension must always be a multiple of 4. -type PatternFlowGtpExtensionExtensionLength struct { +// Next header +type PatternFlowIpv6NextHeader struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowGtpExtensionExtensionLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpExtensionExtensionLength_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.auto + Choice *PatternFlowIpv6NextHeader_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6NextHeader_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 + // default = 59 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] + // default = [59] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // The OTG implementation can provide a system generated + // value for this property. If the OTG is unable to generate a value + // the default value must be used. + // default = 59 + Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` // Description missing in models - Increment *PatternFlowGtpExtensionExtensionLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv6NextHeaderCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpExtensionExtensionLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv6NextHeaderCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpExtensionExtensionLengthMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv6NextHeaderMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpExtensionExtensionLength) Reset() { - *x = PatternFlowGtpExtensionExtensionLength{} +func (x *PatternFlowIpv6NextHeader) Reset() { + *x = PatternFlowIpv6NextHeader{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[714] + mi := &file_otg_proto_msgTypes[698] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpExtensionExtensionLength) String() string { +func (x *PatternFlowIpv6NextHeader) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpExtensionExtensionLength) ProtoMessage() {} +func (*PatternFlowIpv6NextHeader) ProtoMessage() {} -func (x *PatternFlowGtpExtensionExtensionLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[714] +func (x *PatternFlowIpv6NextHeader) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[698] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -81994,47 +83282,54 @@ func (x *PatternFlowGtpExtensionExtensionLength) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpExtensionExtensionLength.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpExtensionExtensionLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{714} +// Deprecated: Use PatternFlowIpv6NextHeader.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6NextHeader) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{698} } -func (x *PatternFlowGtpExtensionExtensionLength) GetChoice() PatternFlowGtpExtensionExtensionLength_Choice_Enum { +func (x *PatternFlowIpv6NextHeader) GetChoice() PatternFlowIpv6NextHeader_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpExtensionExtensionLength_Choice_unspecified + return PatternFlowIpv6NextHeader_Choice_unspecified } -func (x *PatternFlowGtpExtensionExtensionLength) GetValue() uint32 { +func (x *PatternFlowIpv6NextHeader) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpExtensionExtensionLength) GetValues() []uint32 { +func (x *PatternFlowIpv6NextHeader) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpExtensionExtensionLength) GetIncrement() *PatternFlowGtpExtensionExtensionLengthCounter { +func (x *PatternFlowIpv6NextHeader) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto + } + return 0 +} + +func (x *PatternFlowIpv6NextHeader) GetIncrement() *PatternFlowIpv6NextHeaderCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpExtensionExtensionLength) GetDecrement() *PatternFlowGtpExtensionExtensionLengthCounter { +func (x *PatternFlowIpv6NextHeader) GetDecrement() *PatternFlowIpv6NextHeaderCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpExtensionExtensionLength) GetMetricTags() []*PatternFlowGtpExtensionExtensionLengthMetricTag { +func (x *PatternFlowIpv6NextHeader) GetMetricTags() []*PatternFlowIpv6NextHeaderMetricTag { if x != nil { return x.MetricTags } @@ -82042,39 +83337,39 @@ func (x *PatternFlowGtpExtensionExtensionLength) GetMetricTags() []*PatternFlowG } // integer counter pattern -type PatternFlowGtpExtensionContentsCounter struct { +type PatternFlowIpv6HopLimitCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *uint64 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = 64 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 - Step *uint64 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 - Count *uint64 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpExtensionContentsCounter) Reset() { - *x = PatternFlowGtpExtensionContentsCounter{} +func (x *PatternFlowIpv6HopLimitCounter) Reset() { + *x = PatternFlowIpv6HopLimitCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[715] + mi := &file_otg_proto_msgTypes[699] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpExtensionContentsCounter) String() string { +func (x *PatternFlowIpv6HopLimitCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpExtensionContentsCounter) ProtoMessage() {} +func (*PatternFlowIpv6HopLimitCounter) ProtoMessage() {} -func (x *PatternFlowGtpExtensionContentsCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[715] +func (x *PatternFlowIpv6HopLimitCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[699] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -82085,26 +83380,26 @@ func (x *PatternFlowGtpExtensionContentsCounter) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpExtensionContentsCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpExtensionContentsCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{715} +// Deprecated: Use PatternFlowIpv6HopLimitCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6HopLimitCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{699} } -func (x *PatternFlowGtpExtensionContentsCounter) GetStart() uint64 { +func (x *PatternFlowIpv6HopLimitCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpExtensionContentsCounter) GetStep() uint64 { +func (x *PatternFlowIpv6HopLimitCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpExtensionContentsCounter) GetCount() uint64 { +func (x *PatternFlowIpv6HopLimitCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -82114,7 +83409,7 @@ func (x *PatternFlowGtpExtensionContentsCounter) GetCount() uint64 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpExtensionContentsMetricTag struct { +type PatternFlowIpv6HopLimitMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -82125,30 +83420,30 @@ type PatternFlowGtpExtensionContentsMetricTag struct { Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` // Offset in bits relative to start of corresponding header field // default = 0 - Offset *uint64 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 48 - Length *uint64 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpExtensionContentsMetricTag) Reset() { - *x = PatternFlowGtpExtensionContentsMetricTag{} +func (x *PatternFlowIpv6HopLimitMetricTag) Reset() { + *x = PatternFlowIpv6HopLimitMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[716] + mi := &file_otg_proto_msgTypes[700] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpExtensionContentsMetricTag) String() string { +func (x *PatternFlowIpv6HopLimitMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpExtensionContentsMetricTag) ProtoMessage() {} +func (*PatternFlowIpv6HopLimitMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpExtensionContentsMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[716] +func (x *PatternFlowIpv6HopLimitMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[700] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -82159,74 +83454,74 @@ func (x *PatternFlowGtpExtensionContentsMetricTag) ProtoReflect() protoreflect.M return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpExtensionContentsMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpExtensionContentsMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{716} +// Deprecated: Use PatternFlowIpv6HopLimitMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6HopLimitMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{700} } -func (x *PatternFlowGtpExtensionContentsMetricTag) GetName() string { +func (x *PatternFlowIpv6HopLimitMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpExtensionContentsMetricTag) GetOffset() uint64 { +func (x *PatternFlowIpv6HopLimitMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpExtensionContentsMetricTag) GetLength() uint64 { +func (x *PatternFlowIpv6HopLimitMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// The extension header contents -type PatternFlowGtpExtensionContents struct { +// Hop limit +type PatternFlowIpv6HopLimit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpExtensionContents_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpExtensionContents_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv6HopLimit_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6HopLimit_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 - Value *uint64 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 64 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] - Values []uint64 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = [64] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpExtensionContentsCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv6HopLimitCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpExtensionContentsCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv6HopLimitCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpExtensionContentsMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv6HopLimitMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpExtensionContents) Reset() { - *x = PatternFlowGtpExtensionContents{} +func (x *PatternFlowIpv6HopLimit) Reset() { + *x = PatternFlowIpv6HopLimit{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[717] + mi := &file_otg_proto_msgTypes[701] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpExtensionContents) String() string { +func (x *PatternFlowIpv6HopLimit) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpExtensionContents) ProtoMessage() {} +func (*PatternFlowIpv6HopLimit) ProtoMessage() {} -func (x *PatternFlowGtpExtensionContents) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[717] +func (x *PatternFlowIpv6HopLimit) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[701] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -82237,87 +83532,87 @@ func (x *PatternFlowGtpExtensionContents) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpExtensionContents.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpExtensionContents) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{717} +// Deprecated: Use PatternFlowIpv6HopLimit.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6HopLimit) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{701} } -func (x *PatternFlowGtpExtensionContents) GetChoice() PatternFlowGtpExtensionContents_Choice_Enum { +func (x *PatternFlowIpv6HopLimit) GetChoice() PatternFlowIpv6HopLimit_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpExtensionContents_Choice_unspecified + return PatternFlowIpv6HopLimit_Choice_unspecified } -func (x *PatternFlowGtpExtensionContents) GetValue() uint64 { +func (x *PatternFlowIpv6HopLimit) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpExtensionContents) GetValues() []uint64 { +func (x *PatternFlowIpv6HopLimit) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpExtensionContents) GetIncrement() *PatternFlowGtpExtensionContentsCounter { +func (x *PatternFlowIpv6HopLimit) GetIncrement() *PatternFlowIpv6HopLimitCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpExtensionContents) GetDecrement() *PatternFlowGtpExtensionContentsCounter { +func (x *PatternFlowIpv6HopLimit) GetDecrement() *PatternFlowIpv6HopLimitCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpExtensionContents) GetMetricTags() []*PatternFlowGtpExtensionContentsMetricTag { +func (x *PatternFlowIpv6HopLimit) GetMetricTags() []*PatternFlowIpv6HopLimitMetricTag { if x != nil { return x.MetricTags } return nil } -// integer counter pattern -type PatternFlowGtpExtensionNextExtensionHeaderCounter struct { +// ipv6 counter pattern +type PatternFlowIpv6SrcCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = ::0 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = ::1 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpExtensionNextExtensionHeaderCounter) Reset() { - *x = PatternFlowGtpExtensionNextExtensionHeaderCounter{} +func (x *PatternFlowIpv6SrcCounter) Reset() { + *x = PatternFlowIpv6SrcCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[718] + mi := &file_otg_proto_msgTypes[702] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpExtensionNextExtensionHeaderCounter) String() string { +func (x *PatternFlowIpv6SrcCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpExtensionNextExtensionHeaderCounter) ProtoMessage() {} +func (*PatternFlowIpv6SrcCounter) ProtoMessage() {} -func (x *PatternFlowGtpExtensionNextExtensionHeaderCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[718] +func (x *PatternFlowIpv6SrcCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[702] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -82328,26 +83623,26 @@ func (x *PatternFlowGtpExtensionNextExtensionHeaderCounter) ProtoReflect() proto return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpExtensionNextExtensionHeaderCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpExtensionNextExtensionHeaderCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{718} +// Deprecated: Use PatternFlowIpv6SrcCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6SrcCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{702} } -func (x *PatternFlowGtpExtensionNextExtensionHeaderCounter) GetStart() uint32 { +func (x *PatternFlowIpv6SrcCounter) GetStart() string { if x != nil && x.Start != nil { return *x.Start } - return 0 + return "" } -func (x *PatternFlowGtpExtensionNextExtensionHeaderCounter) GetStep() uint32 { +func (x *PatternFlowIpv6SrcCounter) GetStep() string { if x != nil && x.Step != nil { return *x.Step } - return 0 + return "" } -func (x *PatternFlowGtpExtensionNextExtensionHeaderCounter) GetCount() uint32 { +func (x *PatternFlowIpv6SrcCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -82357,7 +83652,7 @@ func (x *PatternFlowGtpExtensionNextExtensionHeaderCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpExtensionNextExtensionHeaderMetricTag struct { +type PatternFlowIpv6SrcMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -82371,27 +83666,27 @@ type PatternFlowGtpExtensionNextExtensionHeaderMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 128 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpExtensionNextExtensionHeaderMetricTag) Reset() { - *x = PatternFlowGtpExtensionNextExtensionHeaderMetricTag{} +func (x *PatternFlowIpv6SrcMetricTag) Reset() { + *x = PatternFlowIpv6SrcMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[719] + mi := &file_otg_proto_msgTypes[703] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpExtensionNextExtensionHeaderMetricTag) String() string { +func (x *PatternFlowIpv6SrcMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpExtensionNextExtensionHeaderMetricTag) ProtoMessage() {} +func (*PatternFlowIpv6SrcMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpExtensionNextExtensionHeaderMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[719] +func (x *PatternFlowIpv6SrcMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[703] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -82402,75 +83697,76 @@ func (x *PatternFlowGtpExtensionNextExtensionHeaderMetricTag) ProtoReflect() pro return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpExtensionNextExtensionHeaderMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpExtensionNextExtensionHeaderMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{719} +// Deprecated: Use PatternFlowIpv6SrcMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6SrcMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{703} } -func (x *PatternFlowGtpExtensionNextExtensionHeaderMetricTag) GetName() string { +func (x *PatternFlowIpv6SrcMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpExtensionNextExtensionHeaderMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv6SrcMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpExtensionNextExtensionHeaderMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv6SrcMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// It states the type of the next extension, or 0 if no next extension exists. This -// permits chaining several next extension headers. -type PatternFlowGtpExtensionNextExtensionHeader struct { +// Source address +type PatternFlowIpv6Src struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv6Src_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6Src_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = ::0 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = ['::0'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpExtensionNextExtensionHeaderCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv6SrcCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpExtensionNextExtensionHeaderCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv6SrcCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpExtensionNextExtensionHeaderMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv6SrcMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // Description missing in models + Auto *FlowIpv6Auto `protobuf:"bytes,8,opt,name=auto,proto3" json:"auto,omitempty"` } -func (x *PatternFlowGtpExtensionNextExtensionHeader) Reset() { - *x = PatternFlowGtpExtensionNextExtensionHeader{} +func (x *PatternFlowIpv6Src) Reset() { + *x = PatternFlowIpv6Src{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[720] + mi := &file_otg_proto_msgTypes[704] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpExtensionNextExtensionHeader) String() string { +func (x *PatternFlowIpv6Src) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpExtensionNextExtensionHeader) ProtoMessage() {} +func (*PatternFlowIpv6Src) ProtoMessage() {} -func (x *PatternFlowGtpExtensionNextExtensionHeader) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[720] +func (x *PatternFlowIpv6Src) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[704] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -82481,87 +83777,94 @@ func (x *PatternFlowGtpExtensionNextExtensionHeader) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpExtensionNextExtensionHeader.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpExtensionNextExtensionHeader) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{720} +// Deprecated: Use PatternFlowIpv6Src.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6Src) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{704} } -func (x *PatternFlowGtpExtensionNextExtensionHeader) GetChoice() PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum { +func (x *PatternFlowIpv6Src) GetChoice() PatternFlowIpv6Src_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpExtensionNextExtensionHeader_Choice_unspecified + return PatternFlowIpv6Src_Choice_unspecified } -func (x *PatternFlowGtpExtensionNextExtensionHeader) GetValue() uint32 { +func (x *PatternFlowIpv6Src) GetValue() string { if x != nil && x.Value != nil { return *x.Value } - return 0 + return "" } -func (x *PatternFlowGtpExtensionNextExtensionHeader) GetValues() []uint32 { +func (x *PatternFlowIpv6Src) GetValues() []string { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpExtensionNextExtensionHeader) GetIncrement() *PatternFlowGtpExtensionNextExtensionHeaderCounter { +func (x *PatternFlowIpv6Src) GetIncrement() *PatternFlowIpv6SrcCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpExtensionNextExtensionHeader) GetDecrement() *PatternFlowGtpExtensionNextExtensionHeaderCounter { +func (x *PatternFlowIpv6Src) GetDecrement() *PatternFlowIpv6SrcCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpExtensionNextExtensionHeader) GetMetricTags() []*PatternFlowGtpExtensionNextExtensionHeaderMetricTag { +func (x *PatternFlowIpv6Src) GetMetricTags() []*PatternFlowIpv6SrcMetricTag { if x != nil { return x.MetricTags } return nil } -// integer counter pattern -type PatternFlowGtpv2VersionCounter struct { +func (x *PatternFlowIpv6Src) GetAuto() *FlowIpv6Auto { + if x != nil { + return x.Auto + } + return nil +} + +// ipv6 counter pattern +type PatternFlowIpv6DstCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 2 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = ::0 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = ::1 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv2VersionCounter) Reset() { - *x = PatternFlowGtpv2VersionCounter{} +func (x *PatternFlowIpv6DstCounter) Reset() { + *x = PatternFlowIpv6DstCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[721] + mi := &file_otg_proto_msgTypes[705] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2VersionCounter) String() string { +func (x *PatternFlowIpv6DstCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2VersionCounter) ProtoMessage() {} +func (*PatternFlowIpv6DstCounter) ProtoMessage() {} -func (x *PatternFlowGtpv2VersionCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[721] +func (x *PatternFlowIpv6DstCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[705] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -82572,26 +83875,26 @@ func (x *PatternFlowGtpv2VersionCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2VersionCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2VersionCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{721} +// Deprecated: Use PatternFlowIpv6DstCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6DstCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{705} } -func (x *PatternFlowGtpv2VersionCounter) GetStart() uint32 { +func (x *PatternFlowIpv6DstCounter) GetStart() string { if x != nil && x.Start != nil { return *x.Start } - return 0 + return "" } -func (x *PatternFlowGtpv2VersionCounter) GetStep() uint32 { +func (x *PatternFlowIpv6DstCounter) GetStep() string { if x != nil && x.Step != nil { return *x.Step } - return 0 + return "" } -func (x *PatternFlowGtpv2VersionCounter) GetCount() uint32 { +func (x *PatternFlowIpv6DstCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -82601,7 +83904,7 @@ func (x *PatternFlowGtpv2VersionCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv2VersionMetricTag struct { +type PatternFlowIpv6DstMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -82615,27 +83918,27 @@ type PatternFlowGtpv2VersionMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 3 + // default = 128 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv2VersionMetricTag) Reset() { - *x = PatternFlowGtpv2VersionMetricTag{} +func (x *PatternFlowIpv6DstMetricTag) Reset() { + *x = PatternFlowIpv6DstMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[722] + mi := &file_otg_proto_msgTypes[706] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2VersionMetricTag) String() string { +func (x *PatternFlowIpv6DstMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2VersionMetricTag) ProtoMessage() {} +func (*PatternFlowIpv6DstMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv2VersionMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[722] +func (x *PatternFlowIpv6DstMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[706] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -82646,74 +83949,76 @@ func (x *PatternFlowGtpv2VersionMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2VersionMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2VersionMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{722} +// Deprecated: Use PatternFlowIpv6DstMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6DstMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{706} } -func (x *PatternFlowGtpv2VersionMetricTag) GetName() string { +func (x *PatternFlowIpv6DstMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv2VersionMetricTag) GetOffset() uint32 { +func (x *PatternFlowIpv6DstMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv2VersionMetricTag) GetLength() uint32 { +func (x *PatternFlowIpv6DstMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Version number -type PatternFlowGtpv2Version struct { +// Destination address +type PatternFlowIpv6Dst struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv2Version_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2Version_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowIpv6Dst_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIpv6Dst_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 2 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = ::0 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [2] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = ['::0'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv2VersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowIpv6DstCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv2VersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowIpv6DstCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv2VersionMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowIpv6DstMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // Description missing in models + Auto *FlowIpv6Auto `protobuf:"bytes,8,opt,name=auto,proto3" json:"auto,omitempty"` } -func (x *PatternFlowGtpv2Version) Reset() { - *x = PatternFlowGtpv2Version{} +func (x *PatternFlowIpv6Dst) Reset() { + *x = PatternFlowIpv6Dst{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[723] + mi := &file_otg_proto_msgTypes[707] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2Version) String() string { +func (x *PatternFlowIpv6Dst) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2Version) ProtoMessage() {} +func (*PatternFlowIpv6Dst) ProtoMessage() {} -func (x *PatternFlowGtpv2Version) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[723] +func (x *PatternFlowIpv6Dst) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[707] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -82724,87 +84029,94 @@ func (x *PatternFlowGtpv2Version) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2Version.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2Version) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{723} +// Deprecated: Use PatternFlowIpv6Dst.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6Dst) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{707} } -func (x *PatternFlowGtpv2Version) GetChoice() PatternFlowGtpv2Version_Choice_Enum { +func (x *PatternFlowIpv6Dst) GetChoice() PatternFlowIpv6Dst_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv2Version_Choice_unspecified + return PatternFlowIpv6Dst_Choice_unspecified } -func (x *PatternFlowGtpv2Version) GetValue() uint32 { +func (x *PatternFlowIpv6Dst) GetValue() string { if x != nil && x.Value != nil { return *x.Value } - return 0 + return "" } -func (x *PatternFlowGtpv2Version) GetValues() []uint32 { +func (x *PatternFlowIpv6Dst) GetValues() []string { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv2Version) GetIncrement() *PatternFlowGtpv2VersionCounter { +func (x *PatternFlowIpv6Dst) GetIncrement() *PatternFlowIpv6DstCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv2Version) GetDecrement() *PatternFlowGtpv2VersionCounter { +func (x *PatternFlowIpv6Dst) GetDecrement() *PatternFlowIpv6DstCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv2Version) GetMetricTags() []*PatternFlowGtpv2VersionMetricTag { +func (x *PatternFlowIpv6Dst) GetMetricTags() []*PatternFlowIpv6DstMetricTag { if x != nil { return x.MetricTags } return nil } -// integer counter pattern -type PatternFlowGtpv2PiggybackingFlagCounter struct { +func (x *PatternFlowIpv6Dst) GetAuto() *FlowIpv6Auto { + if x != nil { + return x.Auto + } + return nil +} + +// mac counter pattern +type PatternFlowPfcPauseDstCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = 01:80:c2:00:00:01 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 00:00:00:00:00:01 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv2PiggybackingFlagCounter) Reset() { - *x = PatternFlowGtpv2PiggybackingFlagCounter{} +func (x *PatternFlowPfcPauseDstCounter) Reset() { + *x = PatternFlowPfcPauseDstCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[724] + mi := &file_otg_proto_msgTypes[708] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2PiggybackingFlagCounter) String() string { +func (x *PatternFlowPfcPauseDstCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2PiggybackingFlagCounter) ProtoMessage() {} +func (*PatternFlowPfcPauseDstCounter) ProtoMessage() {} -func (x *PatternFlowGtpv2PiggybackingFlagCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[724] +func (x *PatternFlowPfcPauseDstCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[708] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -82815,26 +84127,26 @@ func (x *PatternFlowGtpv2PiggybackingFlagCounter) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2PiggybackingFlagCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2PiggybackingFlagCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{724} +// Deprecated: Use PatternFlowPfcPauseDstCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseDstCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{708} } -func (x *PatternFlowGtpv2PiggybackingFlagCounter) GetStart() uint32 { +func (x *PatternFlowPfcPauseDstCounter) GetStart() string { if x != nil && x.Start != nil { return *x.Start } - return 0 + return "" } -func (x *PatternFlowGtpv2PiggybackingFlagCounter) GetStep() uint32 { +func (x *PatternFlowPfcPauseDstCounter) GetStep() string { if x != nil && x.Step != nil { return *x.Step } - return 0 + return "" } -func (x *PatternFlowGtpv2PiggybackingFlagCounter) GetCount() uint32 { +func (x *PatternFlowPfcPauseDstCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -82844,7 +84156,7 @@ func (x *PatternFlowGtpv2PiggybackingFlagCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv2PiggybackingFlagMetricTag struct { +type PatternFlowPfcPauseDstMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -82858,27 +84170,27 @@ type PatternFlowGtpv2PiggybackingFlagMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 1 + // default = 48 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv2PiggybackingFlagMetricTag) Reset() { - *x = PatternFlowGtpv2PiggybackingFlagMetricTag{} +func (x *PatternFlowPfcPauseDstMetricTag) Reset() { + *x = PatternFlowPfcPauseDstMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[725] + mi := &file_otg_proto_msgTypes[709] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2PiggybackingFlagMetricTag) String() string { +func (x *PatternFlowPfcPauseDstMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2PiggybackingFlagMetricTag) ProtoMessage() {} +func (*PatternFlowPfcPauseDstMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv2PiggybackingFlagMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[725] +func (x *PatternFlowPfcPauseDstMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[709] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -82889,75 +84201,74 @@ func (x *PatternFlowGtpv2PiggybackingFlagMetricTag) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2PiggybackingFlagMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2PiggybackingFlagMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{725} +// Deprecated: Use PatternFlowPfcPauseDstMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseDstMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{709} } -func (x *PatternFlowGtpv2PiggybackingFlagMetricTag) GetName() string { +func (x *PatternFlowPfcPauseDstMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv2PiggybackingFlagMetricTag) GetOffset() uint32 { +func (x *PatternFlowPfcPauseDstMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv2PiggybackingFlagMetricTag) GetLength() uint32 { +func (x *PatternFlowPfcPauseDstMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// If piggybacking_flag is set to 1 then another GTP-C message with its own header shall -// be present at the end of the current message -type PatternFlowGtpv2PiggybackingFlag struct { +// Destination MAC address +type PatternFlowPfcPauseDst struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv2PiggybackingFlag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2PiggybackingFlag_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowPfcPauseDst_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPauseDst_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 01:80:c2:00:00:01 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = ['01:80:c2:00:00:01'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv2PiggybackingFlagCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowPfcPauseDstCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv2PiggybackingFlagCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowPfcPauseDstCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv2PiggybackingFlagMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowPfcPauseDstMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv2PiggybackingFlag) Reset() { - *x = PatternFlowGtpv2PiggybackingFlag{} +func (x *PatternFlowPfcPauseDst) Reset() { + *x = PatternFlowPfcPauseDst{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[726] + mi := &file_otg_proto_msgTypes[710] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2PiggybackingFlag) String() string { +func (x *PatternFlowPfcPauseDst) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2PiggybackingFlag) ProtoMessage() {} +func (*PatternFlowPfcPauseDst) ProtoMessage() {} -func (x *PatternFlowGtpv2PiggybackingFlag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[726] +func (x *PatternFlowPfcPauseDst) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[710] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -82968,87 +84279,87 @@ func (x *PatternFlowGtpv2PiggybackingFlag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2PiggybackingFlag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2PiggybackingFlag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{726} +// Deprecated: Use PatternFlowPfcPauseDst.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseDst) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{710} } -func (x *PatternFlowGtpv2PiggybackingFlag) GetChoice() PatternFlowGtpv2PiggybackingFlag_Choice_Enum { +func (x *PatternFlowPfcPauseDst) GetChoice() PatternFlowPfcPauseDst_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv2PiggybackingFlag_Choice_unspecified + return PatternFlowPfcPauseDst_Choice_unspecified } -func (x *PatternFlowGtpv2PiggybackingFlag) GetValue() uint32 { +func (x *PatternFlowPfcPauseDst) GetValue() string { if x != nil && x.Value != nil { return *x.Value } - return 0 + return "" } -func (x *PatternFlowGtpv2PiggybackingFlag) GetValues() []uint32 { +func (x *PatternFlowPfcPauseDst) GetValues() []string { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv2PiggybackingFlag) GetIncrement() *PatternFlowGtpv2PiggybackingFlagCounter { +func (x *PatternFlowPfcPauseDst) GetIncrement() *PatternFlowPfcPauseDstCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv2PiggybackingFlag) GetDecrement() *PatternFlowGtpv2PiggybackingFlagCounter { +func (x *PatternFlowPfcPauseDst) GetDecrement() *PatternFlowPfcPauseDstCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv2PiggybackingFlag) GetMetricTags() []*PatternFlowGtpv2PiggybackingFlagMetricTag { +func (x *PatternFlowPfcPauseDst) GetMetricTags() []*PatternFlowPfcPauseDstMetricTag { if x != nil { return x.MetricTags } return nil } -// integer counter pattern -type PatternFlowGtpv2TeidFlagCounter struct { +// mac counter pattern +type PatternFlowPfcPauseSrcCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = 00:00:00:00:00:00 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 00:00:00:00:00:01 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv2TeidFlagCounter) Reset() { - *x = PatternFlowGtpv2TeidFlagCounter{} +func (x *PatternFlowPfcPauseSrcCounter) Reset() { + *x = PatternFlowPfcPauseSrcCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[727] + mi := &file_otg_proto_msgTypes[711] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2TeidFlagCounter) String() string { +func (x *PatternFlowPfcPauseSrcCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2TeidFlagCounter) ProtoMessage() {} +func (*PatternFlowPfcPauseSrcCounter) ProtoMessage() {} -func (x *PatternFlowGtpv2TeidFlagCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[727] +func (x *PatternFlowPfcPauseSrcCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[711] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -83059,26 +84370,26 @@ func (x *PatternFlowGtpv2TeidFlagCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2TeidFlagCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2TeidFlagCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{727} +// Deprecated: Use PatternFlowPfcPauseSrcCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseSrcCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{711} } -func (x *PatternFlowGtpv2TeidFlagCounter) GetStart() uint32 { +func (x *PatternFlowPfcPauseSrcCounter) GetStart() string { if x != nil && x.Start != nil { return *x.Start } - return 0 + return "" } -func (x *PatternFlowGtpv2TeidFlagCounter) GetStep() uint32 { +func (x *PatternFlowPfcPauseSrcCounter) GetStep() string { if x != nil && x.Step != nil { return *x.Step } - return 0 + return "" } -func (x *PatternFlowGtpv2TeidFlagCounter) GetCount() uint32 { +func (x *PatternFlowPfcPauseSrcCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -83088,7 +84399,7 @@ func (x *PatternFlowGtpv2TeidFlagCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv2TeidFlagMetricTag struct { +type PatternFlowPfcPauseSrcMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -83102,27 +84413,27 @@ type PatternFlowGtpv2TeidFlagMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 1 + // default = 48 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv2TeidFlagMetricTag) Reset() { - *x = PatternFlowGtpv2TeidFlagMetricTag{} +func (x *PatternFlowPfcPauseSrcMetricTag) Reset() { + *x = PatternFlowPfcPauseSrcMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[728] + mi := &file_otg_proto_msgTypes[712] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2TeidFlagMetricTag) String() string { +func (x *PatternFlowPfcPauseSrcMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2TeidFlagMetricTag) ProtoMessage() {} +func (*PatternFlowPfcPauseSrcMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv2TeidFlagMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[728] +func (x *PatternFlowPfcPauseSrcMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[712] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -83133,76 +84444,74 @@ func (x *PatternFlowGtpv2TeidFlagMetricTag) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2TeidFlagMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2TeidFlagMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{728} +// Deprecated: Use PatternFlowPfcPauseSrcMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseSrcMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{712} } -func (x *PatternFlowGtpv2TeidFlagMetricTag) GetName() string { +func (x *PatternFlowPfcPauseSrcMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv2TeidFlagMetricTag) GetOffset() uint32 { +func (x *PatternFlowPfcPauseSrcMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv2TeidFlagMetricTag) GetLength() uint32 { +func (x *PatternFlowPfcPauseSrcMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// If teid_flag is set to 1 then the TEID field will be present between the message -// length and the sequence number. All messages except Echo and Echo reply require TEID -// to be present -type PatternFlowGtpv2TeidFlag struct { +// Source MAC address +type PatternFlowPfcPauseSrc struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv2TeidFlag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2TeidFlag_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowPfcPauseSrc_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPauseSrc_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 00:00:00:00:00:00 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = ['00:00:00:00:00:00'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv2TeidFlagCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowPfcPauseSrcCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv2TeidFlagCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowPfcPauseSrcCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv2TeidFlagMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowPfcPauseSrcMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv2TeidFlag) Reset() { - *x = PatternFlowGtpv2TeidFlag{} +func (x *PatternFlowPfcPauseSrc) Reset() { + *x = PatternFlowPfcPauseSrc{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[729] + mi := &file_otg_proto_msgTypes[713] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2TeidFlag) String() string { +func (x *PatternFlowPfcPauseSrc) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2TeidFlag) ProtoMessage() {} +func (*PatternFlowPfcPauseSrc) ProtoMessage() {} -func (x *PatternFlowGtpv2TeidFlag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[729] +func (x *PatternFlowPfcPauseSrc) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[713] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -83213,47 +84522,47 @@ func (x *PatternFlowGtpv2TeidFlag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2TeidFlag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2TeidFlag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{729} +// Deprecated: Use PatternFlowPfcPauseSrc.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseSrc) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{713} } -func (x *PatternFlowGtpv2TeidFlag) GetChoice() PatternFlowGtpv2TeidFlag_Choice_Enum { +func (x *PatternFlowPfcPauseSrc) GetChoice() PatternFlowPfcPauseSrc_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv2TeidFlag_Choice_unspecified + return PatternFlowPfcPauseSrc_Choice_unspecified } -func (x *PatternFlowGtpv2TeidFlag) GetValue() uint32 { +func (x *PatternFlowPfcPauseSrc) GetValue() string { if x != nil && x.Value != nil { return *x.Value } - return 0 + return "" } -func (x *PatternFlowGtpv2TeidFlag) GetValues() []uint32 { +func (x *PatternFlowPfcPauseSrc) GetValues() []string { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv2TeidFlag) GetIncrement() *PatternFlowGtpv2TeidFlagCounter { +func (x *PatternFlowPfcPauseSrc) GetIncrement() *PatternFlowPfcPauseSrcCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv2TeidFlag) GetDecrement() *PatternFlowGtpv2TeidFlagCounter { +func (x *PatternFlowPfcPauseSrc) GetDecrement() *PatternFlowPfcPauseSrcCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv2TeidFlag) GetMetricTags() []*PatternFlowGtpv2TeidFlagMetricTag { +func (x *PatternFlowPfcPauseSrc) GetMetricTags() []*PatternFlowPfcPauseSrcMetricTag { if x != nil { return x.MetricTags } @@ -83261,13 +84570,13 @@ func (x *PatternFlowGtpv2TeidFlag) GetMetricTags() []*PatternFlowGtpv2TeidFlagMe } // integer counter pattern -type PatternFlowGtpv2Spare1Counter struct { +type PatternFlowPfcPauseEtherTypeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 + // default = 34824 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -83277,23 +84586,23 @@ type PatternFlowGtpv2Spare1Counter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv2Spare1Counter) Reset() { - *x = PatternFlowGtpv2Spare1Counter{} +func (x *PatternFlowPfcPauseEtherTypeCounter) Reset() { + *x = PatternFlowPfcPauseEtherTypeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[730] + mi := &file_otg_proto_msgTypes[714] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2Spare1Counter) String() string { +func (x *PatternFlowPfcPauseEtherTypeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2Spare1Counter) ProtoMessage() {} +func (*PatternFlowPfcPauseEtherTypeCounter) ProtoMessage() {} -func (x *PatternFlowGtpv2Spare1Counter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[730] +func (x *PatternFlowPfcPauseEtherTypeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[714] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -83304,26 +84613,26 @@ func (x *PatternFlowGtpv2Spare1Counter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2Spare1Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2Spare1Counter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{730} +// Deprecated: Use PatternFlowPfcPauseEtherTypeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseEtherTypeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{714} } -func (x *PatternFlowGtpv2Spare1Counter) GetStart() uint32 { +func (x *PatternFlowPfcPauseEtherTypeCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv2Spare1Counter) GetStep() uint32 { +func (x *PatternFlowPfcPauseEtherTypeCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv2Spare1Counter) GetCount() uint32 { +func (x *PatternFlowPfcPauseEtherTypeCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -83333,7 +84642,7 @@ func (x *PatternFlowGtpv2Spare1Counter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv2Spare1MetricTag struct { +type PatternFlowPfcPauseEtherTypeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -83347,27 +84656,27 @@ type PatternFlowGtpv2Spare1MetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 3 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv2Spare1MetricTag) Reset() { - *x = PatternFlowGtpv2Spare1MetricTag{} +func (x *PatternFlowPfcPauseEtherTypeMetricTag) Reset() { + *x = PatternFlowPfcPauseEtherTypeMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[731] + mi := &file_otg_proto_msgTypes[715] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2Spare1MetricTag) String() string { +func (x *PatternFlowPfcPauseEtherTypeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2Spare1MetricTag) ProtoMessage() {} +func (*PatternFlowPfcPauseEtherTypeMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv2Spare1MetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[731] +func (x *PatternFlowPfcPauseEtherTypeMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[715] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -83378,74 +84687,74 @@ func (x *PatternFlowGtpv2Spare1MetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2Spare1MetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2Spare1MetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{731} +// Deprecated: Use PatternFlowPfcPauseEtherTypeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseEtherTypeMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{715} } -func (x *PatternFlowGtpv2Spare1MetricTag) GetName() string { +func (x *PatternFlowPfcPauseEtherTypeMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv2Spare1MetricTag) GetOffset() uint32 { +func (x *PatternFlowPfcPauseEtherTypeMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv2Spare1MetricTag) GetLength() uint32 { +func (x *PatternFlowPfcPauseEtherTypeMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// A 3-bit reserved field (must be 0). -type PatternFlowGtpv2Spare1 struct { +// Ethernet type +type PatternFlowPfcPauseEtherType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv2Spare1_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2Spare1_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowPfcPauseEtherType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPauseEtherType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 + // default = 34824 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] + // default = [34824] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv2Spare1Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowPfcPauseEtherTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv2Spare1Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowPfcPauseEtherTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv2Spare1MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowPfcPauseEtherTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv2Spare1) Reset() { - *x = PatternFlowGtpv2Spare1{} +func (x *PatternFlowPfcPauseEtherType) Reset() { + *x = PatternFlowPfcPauseEtherType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[732] + mi := &file_otg_proto_msgTypes[716] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2Spare1) String() string { +func (x *PatternFlowPfcPauseEtherType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2Spare1) ProtoMessage() {} +func (*PatternFlowPfcPauseEtherType) ProtoMessage() {} -func (x *PatternFlowGtpv2Spare1) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[732] +func (x *PatternFlowPfcPauseEtherType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[716] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -83456,47 +84765,47 @@ func (x *PatternFlowGtpv2Spare1) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2Spare1.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2Spare1) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{732} +// Deprecated: Use PatternFlowPfcPauseEtherType.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseEtherType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{716} } -func (x *PatternFlowGtpv2Spare1) GetChoice() PatternFlowGtpv2Spare1_Choice_Enum { +func (x *PatternFlowPfcPauseEtherType) GetChoice() PatternFlowPfcPauseEtherType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv2Spare1_Choice_unspecified + return PatternFlowPfcPauseEtherType_Choice_unspecified } -func (x *PatternFlowGtpv2Spare1) GetValue() uint32 { +func (x *PatternFlowPfcPauseEtherType) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv2Spare1) GetValues() []uint32 { +func (x *PatternFlowPfcPauseEtherType) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv2Spare1) GetIncrement() *PatternFlowGtpv2Spare1Counter { +func (x *PatternFlowPfcPauseEtherType) GetIncrement() *PatternFlowPfcPauseEtherTypeCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv2Spare1) GetDecrement() *PatternFlowGtpv2Spare1Counter { +func (x *PatternFlowPfcPauseEtherType) GetDecrement() *PatternFlowPfcPauseEtherTypeCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv2Spare1) GetMetricTags() []*PatternFlowGtpv2Spare1MetricTag { +func (x *PatternFlowPfcPauseEtherType) GetMetricTags() []*PatternFlowPfcPauseEtherTypeMetricTag { if x != nil { return x.MetricTags } @@ -83504,13 +84813,13 @@ func (x *PatternFlowGtpv2Spare1) GetMetricTags() []*PatternFlowGtpv2Spare1Metric } // integer counter pattern -type PatternFlowGtpv2MessageTypeCounter struct { +type PatternFlowPfcPauseControlOpCodeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 + // default = 257 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -83520,23 +84829,23 @@ type PatternFlowGtpv2MessageTypeCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv2MessageTypeCounter) Reset() { - *x = PatternFlowGtpv2MessageTypeCounter{} +func (x *PatternFlowPfcPauseControlOpCodeCounter) Reset() { + *x = PatternFlowPfcPauseControlOpCodeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[733] + mi := &file_otg_proto_msgTypes[717] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2MessageTypeCounter) String() string { +func (x *PatternFlowPfcPauseControlOpCodeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2MessageTypeCounter) ProtoMessage() {} +func (*PatternFlowPfcPauseControlOpCodeCounter) ProtoMessage() {} -func (x *PatternFlowGtpv2MessageTypeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[733] +func (x *PatternFlowPfcPauseControlOpCodeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[717] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -83547,26 +84856,26 @@ func (x *PatternFlowGtpv2MessageTypeCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2MessageTypeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2MessageTypeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{733} +// Deprecated: Use PatternFlowPfcPauseControlOpCodeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseControlOpCodeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{717} } -func (x *PatternFlowGtpv2MessageTypeCounter) GetStart() uint32 { +func (x *PatternFlowPfcPauseControlOpCodeCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv2MessageTypeCounter) GetStep() uint32 { +func (x *PatternFlowPfcPauseControlOpCodeCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv2MessageTypeCounter) GetCount() uint32 { +func (x *PatternFlowPfcPauseControlOpCodeCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -83576,7 +84885,7 @@ func (x *PatternFlowGtpv2MessageTypeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv2MessageTypeMetricTag struct { +type PatternFlowPfcPauseControlOpCodeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -83590,27 +84899,27 @@ type PatternFlowGtpv2MessageTypeMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv2MessageTypeMetricTag) Reset() { - *x = PatternFlowGtpv2MessageTypeMetricTag{} +func (x *PatternFlowPfcPauseControlOpCodeMetricTag) Reset() { + *x = PatternFlowPfcPauseControlOpCodeMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[734] + mi := &file_otg_proto_msgTypes[718] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2MessageTypeMetricTag) String() string { +func (x *PatternFlowPfcPauseControlOpCodeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2MessageTypeMetricTag) ProtoMessage() {} +func (*PatternFlowPfcPauseControlOpCodeMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv2MessageTypeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[734] +func (x *PatternFlowPfcPauseControlOpCodeMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[718] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -83621,75 +84930,74 @@ func (x *PatternFlowGtpv2MessageTypeMetricTag) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2MessageTypeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2MessageTypeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{734} +// Deprecated: Use PatternFlowPfcPauseControlOpCodeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseControlOpCodeMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{718} } -func (x *PatternFlowGtpv2MessageTypeMetricTag) GetName() string { +func (x *PatternFlowPfcPauseControlOpCodeMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv2MessageTypeMetricTag) GetOffset() uint32 { +func (x *PatternFlowPfcPauseControlOpCodeMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv2MessageTypeMetricTag) GetLength() uint32 { +func (x *PatternFlowPfcPauseControlOpCodeMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// An 8-bit field that indicates the type of GTP message. Different types of messages -// are defined in 3GPP TS 29.060 section 7.1 -type PatternFlowGtpv2MessageType struct { +// Control operation code +type PatternFlowPfcPauseControlOpCode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv2MessageType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2MessageType_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowPfcPauseControlOpCode_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPauseControlOpCode_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 + // default = 257 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] + // default = [257] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv2MessageTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowPfcPauseControlOpCodeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv2MessageTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowPfcPauseControlOpCodeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv2MessageTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowPfcPauseControlOpCodeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv2MessageType) Reset() { - *x = PatternFlowGtpv2MessageType{} +func (x *PatternFlowPfcPauseControlOpCode) Reset() { + *x = PatternFlowPfcPauseControlOpCode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[735] + mi := &file_otg_proto_msgTypes[719] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2MessageType) String() string { +func (x *PatternFlowPfcPauseControlOpCode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2MessageType) ProtoMessage() {} +func (*PatternFlowPfcPauseControlOpCode) ProtoMessage() {} -func (x *PatternFlowGtpv2MessageType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[735] +func (x *PatternFlowPfcPauseControlOpCode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[719] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -83700,47 +85008,47 @@ func (x *PatternFlowGtpv2MessageType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2MessageType.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2MessageType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{735} +// Deprecated: Use PatternFlowPfcPauseControlOpCode.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseControlOpCode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{719} } -func (x *PatternFlowGtpv2MessageType) GetChoice() PatternFlowGtpv2MessageType_Choice_Enum { +func (x *PatternFlowPfcPauseControlOpCode) GetChoice() PatternFlowPfcPauseControlOpCode_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv2MessageType_Choice_unspecified + return PatternFlowPfcPauseControlOpCode_Choice_unspecified } -func (x *PatternFlowGtpv2MessageType) GetValue() uint32 { +func (x *PatternFlowPfcPauseControlOpCode) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv2MessageType) GetValues() []uint32 { +func (x *PatternFlowPfcPauseControlOpCode) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv2MessageType) GetIncrement() *PatternFlowGtpv2MessageTypeCounter { +func (x *PatternFlowPfcPauseControlOpCode) GetIncrement() *PatternFlowPfcPauseControlOpCodeCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv2MessageType) GetDecrement() *PatternFlowGtpv2MessageTypeCounter { +func (x *PatternFlowPfcPauseControlOpCode) GetDecrement() *PatternFlowPfcPauseControlOpCodeCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv2MessageType) GetMetricTags() []*PatternFlowGtpv2MessageTypeMetricTag { +func (x *PatternFlowPfcPauseControlOpCode) GetMetricTags() []*PatternFlowPfcPauseControlOpCodeMetricTag { if x != nil { return x.MetricTags } @@ -83748,7 +85056,7 @@ func (x *PatternFlowGtpv2MessageType) GetMetricTags() []*PatternFlowGtpv2Message } // integer counter pattern -type PatternFlowGtpv2MessageLengthCounter struct { +type PatternFlowPfcPauseClassEnableVectorCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -83764,23 +85072,23 @@ type PatternFlowGtpv2MessageLengthCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv2MessageLengthCounter) Reset() { - *x = PatternFlowGtpv2MessageLengthCounter{} +func (x *PatternFlowPfcPauseClassEnableVectorCounter) Reset() { + *x = PatternFlowPfcPauseClassEnableVectorCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[736] + mi := &file_otg_proto_msgTypes[720] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2MessageLengthCounter) String() string { +func (x *PatternFlowPfcPauseClassEnableVectorCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2MessageLengthCounter) ProtoMessage() {} +func (*PatternFlowPfcPauseClassEnableVectorCounter) ProtoMessage() {} -func (x *PatternFlowGtpv2MessageLengthCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[736] +func (x *PatternFlowPfcPauseClassEnableVectorCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[720] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -83791,26 +85099,26 @@ func (x *PatternFlowGtpv2MessageLengthCounter) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2MessageLengthCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2MessageLengthCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{736} +// Deprecated: Use PatternFlowPfcPauseClassEnableVectorCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseClassEnableVectorCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{720} } -func (x *PatternFlowGtpv2MessageLengthCounter) GetStart() uint32 { +func (x *PatternFlowPfcPauseClassEnableVectorCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv2MessageLengthCounter) GetStep() uint32 { +func (x *PatternFlowPfcPauseClassEnableVectorCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv2MessageLengthCounter) GetCount() uint32 { +func (x *PatternFlowPfcPauseClassEnableVectorCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -83820,7 +85128,7 @@ func (x *PatternFlowGtpv2MessageLengthCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv2MessageLengthMetricTag struct { +type PatternFlowPfcPauseClassEnableVectorMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -83838,23 +85146,23 @@ type PatternFlowGtpv2MessageLengthMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv2MessageLengthMetricTag) Reset() { - *x = PatternFlowGtpv2MessageLengthMetricTag{} +func (x *PatternFlowPfcPauseClassEnableVectorMetricTag) Reset() { + *x = PatternFlowPfcPauseClassEnableVectorMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[737] + mi := &file_otg_proto_msgTypes[721] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2MessageLengthMetricTag) String() string { +func (x *PatternFlowPfcPauseClassEnableVectorMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2MessageLengthMetricTag) ProtoMessage() {} +func (*PatternFlowPfcPauseClassEnableVectorMetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv2MessageLengthMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[737] +func (x *PatternFlowPfcPauseClassEnableVectorMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[721] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -83865,42 +85173,41 @@ func (x *PatternFlowGtpv2MessageLengthMetricTag) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2MessageLengthMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2MessageLengthMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{737} +// Deprecated: Use PatternFlowPfcPauseClassEnableVectorMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseClassEnableVectorMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{721} } -func (x *PatternFlowGtpv2MessageLengthMetricTag) GetName() string { +func (x *PatternFlowPfcPauseClassEnableVectorMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv2MessageLengthMetricTag) GetOffset() uint32 { +func (x *PatternFlowPfcPauseClassEnableVectorMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv2MessageLengthMetricTag) GetLength() uint32 { +func (x *PatternFlowPfcPauseClassEnableVectorMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// A 16-bit field that indicates the length of the payload in bytes, excluding the mandatory -// GTP-c header (first 4 bytes). Includes the TEID and sequence_number if they are present. -type PatternFlowGtpv2MessageLength struct { +// Destination +type PatternFlowPfcPauseClassEnableVector struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv2MessageLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2MessageLength_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowPfcPauseClassEnableVector_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPauseClassEnableVector_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -83908,32 +85215,32 @@ type PatternFlowGtpv2MessageLength struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv2MessageLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowPfcPauseClassEnableVectorCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv2MessageLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowPfcPauseClassEnableVectorCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv2MessageLengthMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowPfcPauseClassEnableVectorMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv2MessageLength) Reset() { - *x = PatternFlowGtpv2MessageLength{} +func (x *PatternFlowPfcPauseClassEnableVector) Reset() { + *x = PatternFlowPfcPauseClassEnableVector{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[738] + mi := &file_otg_proto_msgTypes[722] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2MessageLength) String() string { +func (x *PatternFlowPfcPauseClassEnableVector) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2MessageLength) ProtoMessage() {} +func (*PatternFlowPfcPauseClassEnableVector) ProtoMessage() {} -func (x *PatternFlowGtpv2MessageLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[738] +func (x *PatternFlowPfcPauseClassEnableVector) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[722] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -83944,47 +85251,47 @@ func (x *PatternFlowGtpv2MessageLength) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2MessageLength.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2MessageLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{738} +// Deprecated: Use PatternFlowPfcPauseClassEnableVector.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseClassEnableVector) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{722} } -func (x *PatternFlowGtpv2MessageLength) GetChoice() PatternFlowGtpv2MessageLength_Choice_Enum { +func (x *PatternFlowPfcPauseClassEnableVector) GetChoice() PatternFlowPfcPauseClassEnableVector_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv2MessageLength_Choice_unspecified + return PatternFlowPfcPauseClassEnableVector_Choice_unspecified } -func (x *PatternFlowGtpv2MessageLength) GetValue() uint32 { +func (x *PatternFlowPfcPauseClassEnableVector) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv2MessageLength) GetValues() []uint32 { +func (x *PatternFlowPfcPauseClassEnableVector) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv2MessageLength) GetIncrement() *PatternFlowGtpv2MessageLengthCounter { +func (x *PatternFlowPfcPauseClassEnableVector) GetIncrement() *PatternFlowPfcPauseClassEnableVectorCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv2MessageLength) GetDecrement() *PatternFlowGtpv2MessageLengthCounter { +func (x *PatternFlowPfcPauseClassEnableVector) GetDecrement() *PatternFlowPfcPauseClassEnableVectorCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv2MessageLength) GetMetricTags() []*PatternFlowGtpv2MessageLengthMetricTag { +func (x *PatternFlowPfcPauseClassEnableVector) GetMetricTags() []*PatternFlowPfcPauseClassEnableVectorMetricTag { if x != nil { return x.MetricTags } @@ -83992,7 +85299,7 @@ func (x *PatternFlowGtpv2MessageLength) GetMetricTags() []*PatternFlowGtpv2Messa } // integer counter pattern -type PatternFlowGtpv2TeidCounter struct { +type PatternFlowPfcPausePauseClass0Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -84008,23 +85315,23 @@ type PatternFlowGtpv2TeidCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv2TeidCounter) Reset() { - *x = PatternFlowGtpv2TeidCounter{} +func (x *PatternFlowPfcPausePauseClass0Counter) Reset() { + *x = PatternFlowPfcPausePauseClass0Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[739] + mi := &file_otg_proto_msgTypes[723] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2TeidCounter) String() string { +func (x *PatternFlowPfcPausePauseClass0Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2TeidCounter) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass0Counter) ProtoMessage() {} -func (x *PatternFlowGtpv2TeidCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[739] +func (x *PatternFlowPfcPausePauseClass0Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[723] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -84035,26 +85342,26 @@ func (x *PatternFlowGtpv2TeidCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2TeidCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2TeidCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{739} +// Deprecated: Use PatternFlowPfcPausePauseClass0Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass0Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{723} } -func (x *PatternFlowGtpv2TeidCounter) GetStart() uint32 { +func (x *PatternFlowPfcPausePauseClass0Counter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv2TeidCounter) GetStep() uint32 { +func (x *PatternFlowPfcPausePauseClass0Counter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv2TeidCounter) GetCount() uint32 { +func (x *PatternFlowPfcPausePauseClass0Counter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -84064,7 +85371,7 @@ func (x *PatternFlowGtpv2TeidCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv2TeidMetricTag struct { +type PatternFlowPfcPausePauseClass0MetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -84078,27 +85385,27 @@ type PatternFlowGtpv2TeidMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 32 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv2TeidMetricTag) Reset() { - *x = PatternFlowGtpv2TeidMetricTag{} +func (x *PatternFlowPfcPausePauseClass0MetricTag) Reset() { + *x = PatternFlowPfcPausePauseClass0MetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[740] + mi := &file_otg_proto_msgTypes[724] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2TeidMetricTag) String() string { +func (x *PatternFlowPfcPausePauseClass0MetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2TeidMetricTag) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass0MetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv2TeidMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[740] +func (x *PatternFlowPfcPausePauseClass0MetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[724] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -84109,42 +85416,41 @@ func (x *PatternFlowGtpv2TeidMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2TeidMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2TeidMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{740} +// Deprecated: Use PatternFlowPfcPausePauseClass0MetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass0MetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{724} } -func (x *PatternFlowGtpv2TeidMetricTag) GetName() string { +func (x *PatternFlowPfcPausePauseClass0MetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv2TeidMetricTag) GetOffset() uint32 { +func (x *PatternFlowPfcPausePauseClass0MetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv2TeidMetricTag) GetLength() uint32 { +func (x *PatternFlowPfcPausePauseClass0MetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Tunnel endpoint identifier. A 32-bit (4-octet) field used to multiplex different -// connections in the same GTP tunnel. Is present only if the teid_flag is set. -type PatternFlowGtpv2Teid struct { +// Pause class 0 +type PatternFlowPfcPausePauseClass0 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv2Teid_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2Teid_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowPfcPausePauseClass0_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass0_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -84152,32 +85458,32 @@ type PatternFlowGtpv2Teid struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv2TeidCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowPfcPausePauseClass0Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv2TeidCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowPfcPausePauseClass0Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv2TeidMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowPfcPausePauseClass0MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv2Teid) Reset() { - *x = PatternFlowGtpv2Teid{} +func (x *PatternFlowPfcPausePauseClass0) Reset() { + *x = PatternFlowPfcPausePauseClass0{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[741] + mi := &file_otg_proto_msgTypes[725] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2Teid) String() string { +func (x *PatternFlowPfcPausePauseClass0) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2Teid) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass0) ProtoMessage() {} -func (x *PatternFlowGtpv2Teid) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[741] +func (x *PatternFlowPfcPausePauseClass0) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[725] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -84188,47 +85494,47 @@ func (x *PatternFlowGtpv2Teid) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2Teid.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2Teid) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{741} +// Deprecated: Use PatternFlowPfcPausePauseClass0.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass0) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{725} } -func (x *PatternFlowGtpv2Teid) GetChoice() PatternFlowGtpv2Teid_Choice_Enum { +func (x *PatternFlowPfcPausePauseClass0) GetChoice() PatternFlowPfcPausePauseClass0_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv2Teid_Choice_unspecified + return PatternFlowPfcPausePauseClass0_Choice_unspecified } -func (x *PatternFlowGtpv2Teid) GetValue() uint32 { +func (x *PatternFlowPfcPausePauseClass0) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv2Teid) GetValues() []uint32 { +func (x *PatternFlowPfcPausePauseClass0) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv2Teid) GetIncrement() *PatternFlowGtpv2TeidCounter { +func (x *PatternFlowPfcPausePauseClass0) GetIncrement() *PatternFlowPfcPausePauseClass0Counter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv2Teid) GetDecrement() *PatternFlowGtpv2TeidCounter { +func (x *PatternFlowPfcPausePauseClass0) GetDecrement() *PatternFlowPfcPausePauseClass0Counter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv2Teid) GetMetricTags() []*PatternFlowGtpv2TeidMetricTag { +func (x *PatternFlowPfcPausePauseClass0) GetMetricTags() []*PatternFlowPfcPausePauseClass0MetricTag { if x != nil { return x.MetricTags } @@ -84236,7 +85542,7 @@ func (x *PatternFlowGtpv2Teid) GetMetricTags() []*PatternFlowGtpv2TeidMetricTag } // integer counter pattern -type PatternFlowGtpv2SequenceNumberCounter struct { +type PatternFlowPfcPausePauseClass1Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -84252,23 +85558,23 @@ type PatternFlowGtpv2SequenceNumberCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv2SequenceNumberCounter) Reset() { - *x = PatternFlowGtpv2SequenceNumberCounter{} +func (x *PatternFlowPfcPausePauseClass1Counter) Reset() { + *x = PatternFlowPfcPausePauseClass1Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[742] + mi := &file_otg_proto_msgTypes[726] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2SequenceNumberCounter) String() string { +func (x *PatternFlowPfcPausePauseClass1Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2SequenceNumberCounter) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass1Counter) ProtoMessage() {} -func (x *PatternFlowGtpv2SequenceNumberCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[742] +func (x *PatternFlowPfcPausePauseClass1Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[726] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -84279,26 +85585,26 @@ func (x *PatternFlowGtpv2SequenceNumberCounter) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2SequenceNumberCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2SequenceNumberCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{742} +// Deprecated: Use PatternFlowPfcPausePauseClass1Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass1Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{726} } -func (x *PatternFlowGtpv2SequenceNumberCounter) GetStart() uint32 { +func (x *PatternFlowPfcPausePauseClass1Counter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv2SequenceNumberCounter) GetStep() uint32 { +func (x *PatternFlowPfcPausePauseClass1Counter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv2SequenceNumberCounter) GetCount() uint32 { +func (x *PatternFlowPfcPausePauseClass1Counter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -84308,7 +85614,7 @@ func (x *PatternFlowGtpv2SequenceNumberCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv2SequenceNumberMetricTag struct { +type PatternFlowPfcPausePauseClass1MetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -84322,27 +85628,27 @@ type PatternFlowGtpv2SequenceNumberMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 24 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv2SequenceNumberMetricTag) Reset() { - *x = PatternFlowGtpv2SequenceNumberMetricTag{} +func (x *PatternFlowPfcPausePauseClass1MetricTag) Reset() { + *x = PatternFlowPfcPausePauseClass1MetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[743] + mi := &file_otg_proto_msgTypes[727] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2SequenceNumberMetricTag) String() string { +func (x *PatternFlowPfcPausePauseClass1MetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2SequenceNumberMetricTag) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass1MetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv2SequenceNumberMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[743] +func (x *PatternFlowPfcPausePauseClass1MetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[727] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -84353,41 +85659,41 @@ func (x *PatternFlowGtpv2SequenceNumberMetricTag) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2SequenceNumberMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2SequenceNumberMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{743} +// Deprecated: Use PatternFlowPfcPausePauseClass1MetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass1MetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{727} } -func (x *PatternFlowGtpv2SequenceNumberMetricTag) GetName() string { +func (x *PatternFlowPfcPausePauseClass1MetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv2SequenceNumberMetricTag) GetOffset() uint32 { +func (x *PatternFlowPfcPausePauseClass1MetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv2SequenceNumberMetricTag) GetLength() uint32 { +func (x *PatternFlowPfcPausePauseClass1MetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// The sequence number -type PatternFlowGtpv2SequenceNumber struct { +// Pause class 1 +type PatternFlowPfcPausePauseClass1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv2SequenceNumber_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2SequenceNumber_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowPfcPausePauseClass1_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass1_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -84395,32 +85701,32 @@ type PatternFlowGtpv2SequenceNumber struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv2SequenceNumberCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowPfcPausePauseClass1Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv2SequenceNumberCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowPfcPausePauseClass1Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv2SequenceNumberMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowPfcPausePauseClass1MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv2SequenceNumber) Reset() { - *x = PatternFlowGtpv2SequenceNumber{} +func (x *PatternFlowPfcPausePauseClass1) Reset() { + *x = PatternFlowPfcPausePauseClass1{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[744] + mi := &file_otg_proto_msgTypes[728] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2SequenceNumber) String() string { +func (x *PatternFlowPfcPausePauseClass1) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2SequenceNumber) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass1) ProtoMessage() {} -func (x *PatternFlowGtpv2SequenceNumber) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[744] +func (x *PatternFlowPfcPausePauseClass1) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[728] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -84431,47 +85737,47 @@ func (x *PatternFlowGtpv2SequenceNumber) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2SequenceNumber.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2SequenceNumber) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{744} +// Deprecated: Use PatternFlowPfcPausePauseClass1.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass1) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{728} } -func (x *PatternFlowGtpv2SequenceNumber) GetChoice() PatternFlowGtpv2SequenceNumber_Choice_Enum { +func (x *PatternFlowPfcPausePauseClass1) GetChoice() PatternFlowPfcPausePauseClass1_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv2SequenceNumber_Choice_unspecified + return PatternFlowPfcPausePauseClass1_Choice_unspecified } -func (x *PatternFlowGtpv2SequenceNumber) GetValue() uint32 { +func (x *PatternFlowPfcPausePauseClass1) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv2SequenceNumber) GetValues() []uint32 { +func (x *PatternFlowPfcPausePauseClass1) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv2SequenceNumber) GetIncrement() *PatternFlowGtpv2SequenceNumberCounter { +func (x *PatternFlowPfcPausePauseClass1) GetIncrement() *PatternFlowPfcPausePauseClass1Counter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv2SequenceNumber) GetDecrement() *PatternFlowGtpv2SequenceNumberCounter { +func (x *PatternFlowPfcPausePauseClass1) GetDecrement() *PatternFlowPfcPausePauseClass1Counter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv2SequenceNumber) GetMetricTags() []*PatternFlowGtpv2SequenceNumberMetricTag { +func (x *PatternFlowPfcPausePauseClass1) GetMetricTags() []*PatternFlowPfcPausePauseClass1MetricTag { if x != nil { return x.MetricTags } @@ -84479,7 +85785,7 @@ func (x *PatternFlowGtpv2SequenceNumber) GetMetricTags() []*PatternFlowGtpv2Sequ } // integer counter pattern -type PatternFlowGtpv2Spare2Counter struct { +type PatternFlowPfcPausePauseClass2Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -84495,23 +85801,23 @@ type PatternFlowGtpv2Spare2Counter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowGtpv2Spare2Counter) Reset() { - *x = PatternFlowGtpv2Spare2Counter{} +func (x *PatternFlowPfcPausePauseClass2Counter) Reset() { + *x = PatternFlowPfcPausePauseClass2Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[745] + mi := &file_otg_proto_msgTypes[729] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2Spare2Counter) String() string { +func (x *PatternFlowPfcPausePauseClass2Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2Spare2Counter) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass2Counter) ProtoMessage() {} -func (x *PatternFlowGtpv2Spare2Counter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[745] +func (x *PatternFlowPfcPausePauseClass2Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[729] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -84522,26 +85828,26 @@ func (x *PatternFlowGtpv2Spare2Counter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2Spare2Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2Spare2Counter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{745} +// Deprecated: Use PatternFlowPfcPausePauseClass2Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass2Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{729} } -func (x *PatternFlowGtpv2Spare2Counter) GetStart() uint32 { +func (x *PatternFlowPfcPausePauseClass2Counter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowGtpv2Spare2Counter) GetStep() uint32 { +func (x *PatternFlowPfcPausePauseClass2Counter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowGtpv2Spare2Counter) GetCount() uint32 { +func (x *PatternFlowPfcPausePauseClass2Counter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -84551,7 +85857,7 @@ func (x *PatternFlowGtpv2Spare2Counter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowGtpv2Spare2MetricTag struct { +type PatternFlowPfcPausePauseClass2MetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -84565,27 +85871,27 @@ type PatternFlowGtpv2Spare2MetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowGtpv2Spare2MetricTag) Reset() { - *x = PatternFlowGtpv2Spare2MetricTag{} +func (x *PatternFlowPfcPausePauseClass2MetricTag) Reset() { + *x = PatternFlowPfcPausePauseClass2MetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[746] + mi := &file_otg_proto_msgTypes[730] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2Spare2MetricTag) String() string { +func (x *PatternFlowPfcPausePauseClass2MetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2Spare2MetricTag) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass2MetricTag) ProtoMessage() {} -func (x *PatternFlowGtpv2Spare2MetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[746] +func (x *PatternFlowPfcPausePauseClass2MetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[730] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -84596,41 +85902,41 @@ func (x *PatternFlowGtpv2Spare2MetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2Spare2MetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2Spare2MetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{746} +// Deprecated: Use PatternFlowPfcPausePauseClass2MetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass2MetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{730} } -func (x *PatternFlowGtpv2Spare2MetricTag) GetName() string { +func (x *PatternFlowPfcPausePauseClass2MetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowGtpv2Spare2MetricTag) GetOffset() uint32 { +func (x *PatternFlowPfcPausePauseClass2MetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowGtpv2Spare2MetricTag) GetLength() uint32 { +func (x *PatternFlowPfcPausePauseClass2MetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Reserved field -type PatternFlowGtpv2Spare2 struct { +// Pause class 2 +type PatternFlowPfcPausePauseClass2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowGtpv2Spare2_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2Spare2_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowPfcPausePauseClass2_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass2_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -84638,32 +85944,32 @@ type PatternFlowGtpv2Spare2 struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowGtpv2Spare2Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowPfcPausePauseClass2Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowGtpv2Spare2Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowPfcPausePauseClass2Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowGtpv2Spare2MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowPfcPausePauseClass2MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowGtpv2Spare2) Reset() { - *x = PatternFlowGtpv2Spare2{} +func (x *PatternFlowPfcPausePauseClass2) Reset() { + *x = PatternFlowPfcPausePauseClass2{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[747] + mi := &file_otg_proto_msgTypes[731] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2Spare2) String() string { +func (x *PatternFlowPfcPausePauseClass2) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2Spare2) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass2) ProtoMessage() {} -func (x *PatternFlowGtpv2Spare2) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[747] +func (x *PatternFlowPfcPausePauseClass2) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[731] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -84674,47 +85980,47 @@ func (x *PatternFlowGtpv2Spare2) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2Spare2.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2Spare2) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{747} +// Deprecated: Use PatternFlowPfcPausePauseClass2.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass2) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{731} } -func (x *PatternFlowGtpv2Spare2) GetChoice() PatternFlowGtpv2Spare2_Choice_Enum { +func (x *PatternFlowPfcPausePauseClass2) GetChoice() PatternFlowPfcPausePauseClass2_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowGtpv2Spare2_Choice_unspecified + return PatternFlowPfcPausePauseClass2_Choice_unspecified } -func (x *PatternFlowGtpv2Spare2) GetValue() uint32 { +func (x *PatternFlowPfcPausePauseClass2) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowGtpv2Spare2) GetValues() []uint32 { +func (x *PatternFlowPfcPausePauseClass2) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowGtpv2Spare2) GetIncrement() *PatternFlowGtpv2Spare2Counter { +func (x *PatternFlowPfcPausePauseClass2) GetIncrement() *PatternFlowPfcPausePauseClass2Counter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowGtpv2Spare2) GetDecrement() *PatternFlowGtpv2Spare2Counter { +func (x *PatternFlowPfcPausePauseClass2) GetDecrement() *PatternFlowPfcPausePauseClass2Counter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowGtpv2Spare2) GetMetricTags() []*PatternFlowGtpv2Spare2MetricTag { +func (x *PatternFlowPfcPausePauseClass2) GetMetricTags() []*PatternFlowPfcPausePauseClass2MetricTag { if x != nil { return x.MetricTags } @@ -84722,13 +86028,13 @@ func (x *PatternFlowGtpv2Spare2) GetMetricTags() []*PatternFlowGtpv2Spare2Metric } // integer counter pattern -type PatternFlowArpHardwareTypeCounter struct { +type PatternFlowPfcPausePauseClass3Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 1 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -84738,23 +86044,23 @@ type PatternFlowArpHardwareTypeCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowArpHardwareTypeCounter) Reset() { - *x = PatternFlowArpHardwareTypeCounter{} +func (x *PatternFlowPfcPausePauseClass3Counter) Reset() { + *x = PatternFlowPfcPausePauseClass3Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[748] + mi := &file_otg_proto_msgTypes[732] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpHardwareTypeCounter) String() string { +func (x *PatternFlowPfcPausePauseClass3Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpHardwareTypeCounter) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass3Counter) ProtoMessage() {} -func (x *PatternFlowArpHardwareTypeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[748] +func (x *PatternFlowPfcPausePauseClass3Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[732] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -84765,26 +86071,26 @@ func (x *PatternFlowArpHardwareTypeCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpHardwareTypeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowArpHardwareTypeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{748} +// Deprecated: Use PatternFlowPfcPausePauseClass3Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass3Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{732} } -func (x *PatternFlowArpHardwareTypeCounter) GetStart() uint32 { +func (x *PatternFlowPfcPausePauseClass3Counter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowArpHardwareTypeCounter) GetStep() uint32 { +func (x *PatternFlowPfcPausePauseClass3Counter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowArpHardwareTypeCounter) GetCount() uint32 { +func (x *PatternFlowPfcPausePauseClass3Counter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -84794,7 +86100,7 @@ func (x *PatternFlowArpHardwareTypeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowArpHardwareTypeMetricTag struct { +type PatternFlowPfcPausePauseClass3MetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -84812,23 +86118,23 @@ type PatternFlowArpHardwareTypeMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowArpHardwareTypeMetricTag) Reset() { - *x = PatternFlowArpHardwareTypeMetricTag{} +func (x *PatternFlowPfcPausePauseClass3MetricTag) Reset() { + *x = PatternFlowPfcPausePauseClass3MetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[749] + mi := &file_otg_proto_msgTypes[733] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpHardwareTypeMetricTag) String() string { +func (x *PatternFlowPfcPausePauseClass3MetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpHardwareTypeMetricTag) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass3MetricTag) ProtoMessage() {} -func (x *PatternFlowArpHardwareTypeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[749] +func (x *PatternFlowPfcPausePauseClass3MetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[733] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -84839,74 +86145,74 @@ func (x *PatternFlowArpHardwareTypeMetricTag) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpHardwareTypeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowArpHardwareTypeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{749} +// Deprecated: Use PatternFlowPfcPausePauseClass3MetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass3MetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{733} } -func (x *PatternFlowArpHardwareTypeMetricTag) GetName() string { +func (x *PatternFlowPfcPausePauseClass3MetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowArpHardwareTypeMetricTag) GetOffset() uint32 { +func (x *PatternFlowPfcPausePauseClass3MetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowArpHardwareTypeMetricTag) GetLength() uint32 { +func (x *PatternFlowPfcPausePauseClass3MetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Network link protocol type -type PatternFlowArpHardwareType struct { +// Pause class 3 +type PatternFlowPfcPausePauseClass3 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowArpHardwareType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpHardwareType_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowPfcPausePauseClass3_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass3_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [1] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowArpHardwareTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowPfcPausePauseClass3Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowArpHardwareTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowPfcPausePauseClass3Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowArpHardwareTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowPfcPausePauseClass3MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowArpHardwareType) Reset() { - *x = PatternFlowArpHardwareType{} +func (x *PatternFlowPfcPausePauseClass3) Reset() { + *x = PatternFlowPfcPausePauseClass3{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[750] + mi := &file_otg_proto_msgTypes[734] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpHardwareType) String() string { +func (x *PatternFlowPfcPausePauseClass3) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpHardwareType) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass3) ProtoMessage() {} -func (x *PatternFlowArpHardwareType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[750] +func (x *PatternFlowPfcPausePauseClass3) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[734] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -84917,47 +86223,47 @@ func (x *PatternFlowArpHardwareType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpHardwareType.ProtoReflect.Descriptor instead. -func (*PatternFlowArpHardwareType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{750} +// Deprecated: Use PatternFlowPfcPausePauseClass3.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass3) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{734} } -func (x *PatternFlowArpHardwareType) GetChoice() PatternFlowArpHardwareType_Choice_Enum { +func (x *PatternFlowPfcPausePauseClass3) GetChoice() PatternFlowPfcPausePauseClass3_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowArpHardwareType_Choice_unspecified + return PatternFlowPfcPausePauseClass3_Choice_unspecified } -func (x *PatternFlowArpHardwareType) GetValue() uint32 { +func (x *PatternFlowPfcPausePauseClass3) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowArpHardwareType) GetValues() []uint32 { +func (x *PatternFlowPfcPausePauseClass3) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowArpHardwareType) GetIncrement() *PatternFlowArpHardwareTypeCounter { +func (x *PatternFlowPfcPausePauseClass3) GetIncrement() *PatternFlowPfcPausePauseClass3Counter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowArpHardwareType) GetDecrement() *PatternFlowArpHardwareTypeCounter { +func (x *PatternFlowPfcPausePauseClass3) GetDecrement() *PatternFlowPfcPausePauseClass3Counter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowArpHardwareType) GetMetricTags() []*PatternFlowArpHardwareTypeMetricTag { +func (x *PatternFlowPfcPausePauseClass3) GetMetricTags() []*PatternFlowPfcPausePauseClass3MetricTag { if x != nil { return x.MetricTags } @@ -84965,13 +86271,13 @@ func (x *PatternFlowArpHardwareType) GetMetricTags() []*PatternFlowArpHardwareTy } // integer counter pattern -type PatternFlowArpProtocolTypeCounter struct { +type PatternFlowPfcPausePauseClass4Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 2048 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -84981,23 +86287,23 @@ type PatternFlowArpProtocolTypeCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowArpProtocolTypeCounter) Reset() { - *x = PatternFlowArpProtocolTypeCounter{} +func (x *PatternFlowPfcPausePauseClass4Counter) Reset() { + *x = PatternFlowPfcPausePauseClass4Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[751] + mi := &file_otg_proto_msgTypes[735] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpProtocolTypeCounter) String() string { +func (x *PatternFlowPfcPausePauseClass4Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpProtocolTypeCounter) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass4Counter) ProtoMessage() {} -func (x *PatternFlowArpProtocolTypeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[751] +func (x *PatternFlowPfcPausePauseClass4Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[735] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -85008,26 +86314,26 @@ func (x *PatternFlowArpProtocolTypeCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpProtocolTypeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowArpProtocolTypeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{751} +// Deprecated: Use PatternFlowPfcPausePauseClass4Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass4Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{735} } -func (x *PatternFlowArpProtocolTypeCounter) GetStart() uint32 { +func (x *PatternFlowPfcPausePauseClass4Counter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowArpProtocolTypeCounter) GetStep() uint32 { +func (x *PatternFlowPfcPausePauseClass4Counter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowArpProtocolTypeCounter) GetCount() uint32 { +func (x *PatternFlowPfcPausePauseClass4Counter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -85037,7 +86343,7 @@ func (x *PatternFlowArpProtocolTypeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowArpProtocolTypeMetricTag struct { +type PatternFlowPfcPausePauseClass4MetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -85055,23 +86361,23 @@ type PatternFlowArpProtocolTypeMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowArpProtocolTypeMetricTag) Reset() { - *x = PatternFlowArpProtocolTypeMetricTag{} +func (x *PatternFlowPfcPausePauseClass4MetricTag) Reset() { + *x = PatternFlowPfcPausePauseClass4MetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[752] + mi := &file_otg_proto_msgTypes[736] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpProtocolTypeMetricTag) String() string { +func (x *PatternFlowPfcPausePauseClass4MetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpProtocolTypeMetricTag) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass4MetricTag) ProtoMessage() {} -func (x *PatternFlowArpProtocolTypeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[752] +func (x *PatternFlowPfcPausePauseClass4MetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[736] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -85082,74 +86388,74 @@ func (x *PatternFlowArpProtocolTypeMetricTag) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpProtocolTypeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowArpProtocolTypeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{752} +// Deprecated: Use PatternFlowPfcPausePauseClass4MetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass4MetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{736} } -func (x *PatternFlowArpProtocolTypeMetricTag) GetName() string { +func (x *PatternFlowPfcPausePauseClass4MetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowArpProtocolTypeMetricTag) GetOffset() uint32 { +func (x *PatternFlowPfcPausePauseClass4MetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowArpProtocolTypeMetricTag) GetLength() uint32 { +func (x *PatternFlowPfcPausePauseClass4MetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// The internetwork protocol for which the ARP request is intended -type PatternFlowArpProtocolType struct { +// Pause class 4 +type PatternFlowPfcPausePauseClass4 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowArpProtocolType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpProtocolType_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowPfcPausePauseClass4_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass4_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 2048 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [2048] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowArpProtocolTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowPfcPausePauseClass4Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowArpProtocolTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowPfcPausePauseClass4Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowArpProtocolTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowPfcPausePauseClass4MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowArpProtocolType) Reset() { - *x = PatternFlowArpProtocolType{} +func (x *PatternFlowPfcPausePauseClass4) Reset() { + *x = PatternFlowPfcPausePauseClass4{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[753] + mi := &file_otg_proto_msgTypes[737] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpProtocolType) String() string { +func (x *PatternFlowPfcPausePauseClass4) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpProtocolType) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass4) ProtoMessage() {} -func (x *PatternFlowArpProtocolType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[753] +func (x *PatternFlowPfcPausePauseClass4) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[737] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -85160,47 +86466,47 @@ func (x *PatternFlowArpProtocolType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpProtocolType.ProtoReflect.Descriptor instead. -func (*PatternFlowArpProtocolType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{753} +// Deprecated: Use PatternFlowPfcPausePauseClass4.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass4) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{737} } -func (x *PatternFlowArpProtocolType) GetChoice() PatternFlowArpProtocolType_Choice_Enum { +func (x *PatternFlowPfcPausePauseClass4) GetChoice() PatternFlowPfcPausePauseClass4_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowArpProtocolType_Choice_unspecified + return PatternFlowPfcPausePauseClass4_Choice_unspecified } -func (x *PatternFlowArpProtocolType) GetValue() uint32 { +func (x *PatternFlowPfcPausePauseClass4) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowArpProtocolType) GetValues() []uint32 { +func (x *PatternFlowPfcPausePauseClass4) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowArpProtocolType) GetIncrement() *PatternFlowArpProtocolTypeCounter { +func (x *PatternFlowPfcPausePauseClass4) GetIncrement() *PatternFlowPfcPausePauseClass4Counter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowArpProtocolType) GetDecrement() *PatternFlowArpProtocolTypeCounter { +func (x *PatternFlowPfcPausePauseClass4) GetDecrement() *PatternFlowPfcPausePauseClass4Counter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowArpProtocolType) GetMetricTags() []*PatternFlowArpProtocolTypeMetricTag { +func (x *PatternFlowPfcPausePauseClass4) GetMetricTags() []*PatternFlowPfcPausePauseClass4MetricTag { if x != nil { return x.MetricTags } @@ -85208,13 +86514,13 @@ func (x *PatternFlowArpProtocolType) GetMetricTags() []*PatternFlowArpProtocolTy } // integer counter pattern -type PatternFlowArpHardwareLengthCounter struct { +type PatternFlowPfcPausePauseClass5Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 6 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -85224,23 +86530,23 @@ type PatternFlowArpHardwareLengthCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowArpHardwareLengthCounter) Reset() { - *x = PatternFlowArpHardwareLengthCounter{} +func (x *PatternFlowPfcPausePauseClass5Counter) Reset() { + *x = PatternFlowPfcPausePauseClass5Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[754] + mi := &file_otg_proto_msgTypes[738] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpHardwareLengthCounter) String() string { +func (x *PatternFlowPfcPausePauseClass5Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpHardwareLengthCounter) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass5Counter) ProtoMessage() {} -func (x *PatternFlowArpHardwareLengthCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[754] +func (x *PatternFlowPfcPausePauseClass5Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[738] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -85251,26 +86557,26 @@ func (x *PatternFlowArpHardwareLengthCounter) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpHardwareLengthCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowArpHardwareLengthCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{754} +// Deprecated: Use PatternFlowPfcPausePauseClass5Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass5Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{738} } -func (x *PatternFlowArpHardwareLengthCounter) GetStart() uint32 { +func (x *PatternFlowPfcPausePauseClass5Counter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowArpHardwareLengthCounter) GetStep() uint32 { +func (x *PatternFlowPfcPausePauseClass5Counter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowArpHardwareLengthCounter) GetCount() uint32 { +func (x *PatternFlowPfcPausePauseClass5Counter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -85280,7 +86586,7 @@ func (x *PatternFlowArpHardwareLengthCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowArpHardwareLengthMetricTag struct { +type PatternFlowPfcPausePauseClass5MetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -85294,27 +86600,27 @@ type PatternFlowArpHardwareLengthMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowArpHardwareLengthMetricTag) Reset() { - *x = PatternFlowArpHardwareLengthMetricTag{} +func (x *PatternFlowPfcPausePauseClass5MetricTag) Reset() { + *x = PatternFlowPfcPausePauseClass5MetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[755] + mi := &file_otg_proto_msgTypes[739] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpHardwareLengthMetricTag) String() string { +func (x *PatternFlowPfcPausePauseClass5MetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpHardwareLengthMetricTag) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass5MetricTag) ProtoMessage() {} -func (x *PatternFlowArpHardwareLengthMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[755] +func (x *PatternFlowPfcPausePauseClass5MetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[739] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -85325,74 +86631,74 @@ func (x *PatternFlowArpHardwareLengthMetricTag) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpHardwareLengthMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowArpHardwareLengthMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{755} +// Deprecated: Use PatternFlowPfcPausePauseClass5MetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass5MetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{739} } -func (x *PatternFlowArpHardwareLengthMetricTag) GetName() string { +func (x *PatternFlowPfcPausePauseClass5MetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowArpHardwareLengthMetricTag) GetOffset() uint32 { +func (x *PatternFlowPfcPausePauseClass5MetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowArpHardwareLengthMetricTag) GetLength() uint32 { +func (x *PatternFlowPfcPausePauseClass5MetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Length (in octets) of a hardware address -type PatternFlowArpHardwareLength struct { +// Pause class 5 +type PatternFlowPfcPausePauseClass5 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowArpHardwareLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpHardwareLength_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowPfcPausePauseClass5_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass5_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 6 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [6] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowArpHardwareLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowPfcPausePauseClass5Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowArpHardwareLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowPfcPausePauseClass5Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowArpHardwareLengthMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowPfcPausePauseClass5MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowArpHardwareLength) Reset() { - *x = PatternFlowArpHardwareLength{} +func (x *PatternFlowPfcPausePauseClass5) Reset() { + *x = PatternFlowPfcPausePauseClass5{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[756] + mi := &file_otg_proto_msgTypes[740] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpHardwareLength) String() string { +func (x *PatternFlowPfcPausePauseClass5) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpHardwareLength) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass5) ProtoMessage() {} -func (x *PatternFlowArpHardwareLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[756] +func (x *PatternFlowPfcPausePauseClass5) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[740] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -85403,47 +86709,47 @@ func (x *PatternFlowArpHardwareLength) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpHardwareLength.ProtoReflect.Descriptor instead. -func (*PatternFlowArpHardwareLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{756} +// Deprecated: Use PatternFlowPfcPausePauseClass5.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass5) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{740} } -func (x *PatternFlowArpHardwareLength) GetChoice() PatternFlowArpHardwareLength_Choice_Enum { +func (x *PatternFlowPfcPausePauseClass5) GetChoice() PatternFlowPfcPausePauseClass5_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowArpHardwareLength_Choice_unspecified + return PatternFlowPfcPausePauseClass5_Choice_unspecified } -func (x *PatternFlowArpHardwareLength) GetValue() uint32 { +func (x *PatternFlowPfcPausePauseClass5) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowArpHardwareLength) GetValues() []uint32 { +func (x *PatternFlowPfcPausePauseClass5) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowArpHardwareLength) GetIncrement() *PatternFlowArpHardwareLengthCounter { +func (x *PatternFlowPfcPausePauseClass5) GetIncrement() *PatternFlowPfcPausePauseClass5Counter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowArpHardwareLength) GetDecrement() *PatternFlowArpHardwareLengthCounter { +func (x *PatternFlowPfcPausePauseClass5) GetDecrement() *PatternFlowPfcPausePauseClass5Counter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowArpHardwareLength) GetMetricTags() []*PatternFlowArpHardwareLengthMetricTag { +func (x *PatternFlowPfcPausePauseClass5) GetMetricTags() []*PatternFlowPfcPausePauseClass5MetricTag { if x != nil { return x.MetricTags } @@ -85451,13 +86757,13 @@ func (x *PatternFlowArpHardwareLength) GetMetricTags() []*PatternFlowArpHardware } // integer counter pattern -type PatternFlowArpProtocolLengthCounter struct { +type PatternFlowPfcPausePauseClass6Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 4 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -85467,23 +86773,23 @@ type PatternFlowArpProtocolLengthCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowArpProtocolLengthCounter) Reset() { - *x = PatternFlowArpProtocolLengthCounter{} +func (x *PatternFlowPfcPausePauseClass6Counter) Reset() { + *x = PatternFlowPfcPausePauseClass6Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[757] + mi := &file_otg_proto_msgTypes[741] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpProtocolLengthCounter) String() string { +func (x *PatternFlowPfcPausePauseClass6Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpProtocolLengthCounter) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass6Counter) ProtoMessage() {} -func (x *PatternFlowArpProtocolLengthCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[757] +func (x *PatternFlowPfcPausePauseClass6Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[741] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -85494,26 +86800,26 @@ func (x *PatternFlowArpProtocolLengthCounter) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpProtocolLengthCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowArpProtocolLengthCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{757} +// Deprecated: Use PatternFlowPfcPausePauseClass6Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass6Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{741} } -func (x *PatternFlowArpProtocolLengthCounter) GetStart() uint32 { +func (x *PatternFlowPfcPausePauseClass6Counter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowArpProtocolLengthCounter) GetStep() uint32 { +func (x *PatternFlowPfcPausePauseClass6Counter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowArpProtocolLengthCounter) GetCount() uint32 { +func (x *PatternFlowPfcPausePauseClass6Counter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -85523,7 +86829,7 @@ func (x *PatternFlowArpProtocolLengthCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowArpProtocolLengthMetricTag struct { +type PatternFlowPfcPausePauseClass6MetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -85537,27 +86843,27 @@ type PatternFlowArpProtocolLengthMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowArpProtocolLengthMetricTag) Reset() { - *x = PatternFlowArpProtocolLengthMetricTag{} +func (x *PatternFlowPfcPausePauseClass6MetricTag) Reset() { + *x = PatternFlowPfcPausePauseClass6MetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[758] + mi := &file_otg_proto_msgTypes[742] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpProtocolLengthMetricTag) String() string { +func (x *PatternFlowPfcPausePauseClass6MetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpProtocolLengthMetricTag) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass6MetricTag) ProtoMessage() {} -func (x *PatternFlowArpProtocolLengthMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[758] +func (x *PatternFlowPfcPausePauseClass6MetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[742] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -85568,74 +86874,74 @@ func (x *PatternFlowArpProtocolLengthMetricTag) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpProtocolLengthMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowArpProtocolLengthMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{758} +// Deprecated: Use PatternFlowPfcPausePauseClass6MetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass6MetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{742} } -func (x *PatternFlowArpProtocolLengthMetricTag) GetName() string { +func (x *PatternFlowPfcPausePauseClass6MetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowArpProtocolLengthMetricTag) GetOffset() uint32 { +func (x *PatternFlowPfcPausePauseClass6MetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowArpProtocolLengthMetricTag) GetLength() uint32 { +func (x *PatternFlowPfcPausePauseClass6MetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Length (in octets) of internetwork addresses -type PatternFlowArpProtocolLength struct { +// Pause class 6 +type PatternFlowPfcPausePauseClass6 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowArpProtocolLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpProtocolLength_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowPfcPausePauseClass6_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass6_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 4 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [4] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowArpProtocolLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowPfcPausePauseClass6Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowArpProtocolLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowPfcPausePauseClass6Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowArpProtocolLengthMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowPfcPausePauseClass6MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowArpProtocolLength) Reset() { - *x = PatternFlowArpProtocolLength{} +func (x *PatternFlowPfcPausePauseClass6) Reset() { + *x = PatternFlowPfcPausePauseClass6{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[759] + mi := &file_otg_proto_msgTypes[743] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpProtocolLength) String() string { +func (x *PatternFlowPfcPausePauseClass6) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpProtocolLength) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass6) ProtoMessage() {} -func (x *PatternFlowArpProtocolLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[759] +func (x *PatternFlowPfcPausePauseClass6) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[743] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -85646,47 +86952,47 @@ func (x *PatternFlowArpProtocolLength) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpProtocolLength.ProtoReflect.Descriptor instead. -func (*PatternFlowArpProtocolLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{759} +// Deprecated: Use PatternFlowPfcPausePauseClass6.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass6) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{743} } -func (x *PatternFlowArpProtocolLength) GetChoice() PatternFlowArpProtocolLength_Choice_Enum { +func (x *PatternFlowPfcPausePauseClass6) GetChoice() PatternFlowPfcPausePauseClass6_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowArpProtocolLength_Choice_unspecified + return PatternFlowPfcPausePauseClass6_Choice_unspecified } -func (x *PatternFlowArpProtocolLength) GetValue() uint32 { +func (x *PatternFlowPfcPausePauseClass6) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowArpProtocolLength) GetValues() []uint32 { +func (x *PatternFlowPfcPausePauseClass6) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowArpProtocolLength) GetIncrement() *PatternFlowArpProtocolLengthCounter { +func (x *PatternFlowPfcPausePauseClass6) GetIncrement() *PatternFlowPfcPausePauseClass6Counter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowArpProtocolLength) GetDecrement() *PatternFlowArpProtocolLengthCounter { +func (x *PatternFlowPfcPausePauseClass6) GetDecrement() *PatternFlowPfcPausePauseClass6Counter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowArpProtocolLength) GetMetricTags() []*PatternFlowArpProtocolLengthMetricTag { +func (x *PatternFlowPfcPausePauseClass6) GetMetricTags() []*PatternFlowPfcPausePauseClass6MetricTag { if x != nil { return x.MetricTags } @@ -85694,13 +87000,13 @@ func (x *PatternFlowArpProtocolLength) GetMetricTags() []*PatternFlowArpProtocol } // integer counter pattern -type PatternFlowArpOperationCounter struct { +type PatternFlowPfcPausePauseClass7Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 1 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -85710,23 +87016,23 @@ type PatternFlowArpOperationCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowArpOperationCounter) Reset() { - *x = PatternFlowArpOperationCounter{} +func (x *PatternFlowPfcPausePauseClass7Counter) Reset() { + *x = PatternFlowPfcPausePauseClass7Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[760] + mi := &file_otg_proto_msgTypes[744] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpOperationCounter) String() string { +func (x *PatternFlowPfcPausePauseClass7Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpOperationCounter) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass7Counter) ProtoMessage() {} -func (x *PatternFlowArpOperationCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[760] +func (x *PatternFlowPfcPausePauseClass7Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[744] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -85737,26 +87043,26 @@ func (x *PatternFlowArpOperationCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpOperationCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowArpOperationCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{760} +// Deprecated: Use PatternFlowPfcPausePauseClass7Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass7Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{744} } -func (x *PatternFlowArpOperationCounter) GetStart() uint32 { +func (x *PatternFlowPfcPausePauseClass7Counter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowArpOperationCounter) GetStep() uint32 { +func (x *PatternFlowPfcPausePauseClass7Counter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowArpOperationCounter) GetCount() uint32 { +func (x *PatternFlowPfcPausePauseClass7Counter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -85766,7 +87072,7 @@ func (x *PatternFlowArpOperationCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowArpOperationMetricTag struct { +type PatternFlowPfcPausePauseClass7MetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -85784,23 +87090,23 @@ type PatternFlowArpOperationMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowArpOperationMetricTag) Reset() { - *x = PatternFlowArpOperationMetricTag{} +func (x *PatternFlowPfcPausePauseClass7MetricTag) Reset() { + *x = PatternFlowPfcPausePauseClass7MetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[761] + mi := &file_otg_proto_msgTypes[745] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpOperationMetricTag) String() string { +func (x *PatternFlowPfcPausePauseClass7MetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpOperationMetricTag) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass7MetricTag) ProtoMessage() {} -func (x *PatternFlowArpOperationMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[761] +func (x *PatternFlowPfcPausePauseClass7MetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[745] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -85811,74 +87117,74 @@ func (x *PatternFlowArpOperationMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpOperationMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowArpOperationMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{761} +// Deprecated: Use PatternFlowPfcPausePauseClass7MetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass7MetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{745} } -func (x *PatternFlowArpOperationMetricTag) GetName() string { +func (x *PatternFlowPfcPausePauseClass7MetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowArpOperationMetricTag) GetOffset() uint32 { +func (x *PatternFlowPfcPausePauseClass7MetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowArpOperationMetricTag) GetLength() uint32 { +func (x *PatternFlowPfcPausePauseClass7MetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// The operation that the sender is performing -type PatternFlowArpOperation struct { +// Pause class 7 +type PatternFlowPfcPausePauseClass7 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowArpOperation_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpOperation_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowPfcPausePauseClass7_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPfcPausePauseClass7_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [1] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowArpOperationCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowPfcPausePauseClass7Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowArpOperationCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowPfcPausePauseClass7Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowArpOperationMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowPfcPausePauseClass7MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowArpOperation) Reset() { - *x = PatternFlowArpOperation{} +func (x *PatternFlowPfcPausePauseClass7) Reset() { + *x = PatternFlowPfcPausePauseClass7{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[762] + mi := &file_otg_proto_msgTypes[746] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpOperation) String() string { +func (x *PatternFlowPfcPausePauseClass7) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpOperation) ProtoMessage() {} +func (*PatternFlowPfcPausePauseClass7) ProtoMessage() {} -func (x *PatternFlowArpOperation) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[762] +func (x *PatternFlowPfcPausePauseClass7) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[746] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -85889,47 +87195,47 @@ func (x *PatternFlowArpOperation) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpOperation.ProtoReflect.Descriptor instead. -func (*PatternFlowArpOperation) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{762} +// Deprecated: Use PatternFlowPfcPausePauseClass7.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass7) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{746} } -func (x *PatternFlowArpOperation) GetChoice() PatternFlowArpOperation_Choice_Enum { +func (x *PatternFlowPfcPausePauseClass7) GetChoice() PatternFlowPfcPausePauseClass7_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowArpOperation_Choice_unspecified + return PatternFlowPfcPausePauseClass7_Choice_unspecified } -func (x *PatternFlowArpOperation) GetValue() uint32 { +func (x *PatternFlowPfcPausePauseClass7) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowArpOperation) GetValues() []uint32 { +func (x *PatternFlowPfcPausePauseClass7) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowArpOperation) GetIncrement() *PatternFlowArpOperationCounter { +func (x *PatternFlowPfcPausePauseClass7) GetIncrement() *PatternFlowPfcPausePauseClass7Counter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowArpOperation) GetDecrement() *PatternFlowArpOperationCounter { +func (x *PatternFlowPfcPausePauseClass7) GetDecrement() *PatternFlowPfcPausePauseClass7Counter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowArpOperation) GetMetricTags() []*PatternFlowArpOperationMetricTag { +func (x *PatternFlowPfcPausePauseClass7) GetMetricTags() []*PatternFlowPfcPausePauseClass7MetricTag { if x != nil { return x.MetricTags } @@ -85937,13 +87243,13 @@ func (x *PatternFlowArpOperation) GetMetricTags() []*PatternFlowArpOperationMetr } // mac counter pattern -type PatternFlowArpSenderHardwareAddrCounter struct { +type PatternFlowEthernetPauseDstCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 00:00:00:00:00:00 + // default = 01:80:c2:00:00:01 Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 00:00:00:00:00:01 @@ -85953,23 +87259,23 @@ type PatternFlowArpSenderHardwareAddrCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowArpSenderHardwareAddrCounter) Reset() { - *x = PatternFlowArpSenderHardwareAddrCounter{} +func (x *PatternFlowEthernetPauseDstCounter) Reset() { + *x = PatternFlowEthernetPauseDstCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[763] + mi := &file_otg_proto_msgTypes[747] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpSenderHardwareAddrCounter) String() string { +func (x *PatternFlowEthernetPauseDstCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpSenderHardwareAddrCounter) ProtoMessage() {} +func (*PatternFlowEthernetPauseDstCounter) ProtoMessage() {} -func (x *PatternFlowArpSenderHardwareAddrCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[763] +func (x *PatternFlowEthernetPauseDstCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[747] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -85980,26 +87286,26 @@ func (x *PatternFlowArpSenderHardwareAddrCounter) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpSenderHardwareAddrCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowArpSenderHardwareAddrCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{763} +// Deprecated: Use PatternFlowEthernetPauseDstCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseDstCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{747} } -func (x *PatternFlowArpSenderHardwareAddrCounter) GetStart() string { +func (x *PatternFlowEthernetPauseDstCounter) GetStart() string { if x != nil && x.Start != nil { return *x.Start } return "" } -func (x *PatternFlowArpSenderHardwareAddrCounter) GetStep() string { +func (x *PatternFlowEthernetPauseDstCounter) GetStep() string { if x != nil && x.Step != nil { return *x.Step } return "" } -func (x *PatternFlowArpSenderHardwareAddrCounter) GetCount() uint32 { +func (x *PatternFlowEthernetPauseDstCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -86009,7 +87315,7 @@ func (x *PatternFlowArpSenderHardwareAddrCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowArpSenderHardwareAddrMetricTag struct { +type PatternFlowEthernetPauseDstMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -86027,23 +87333,23 @@ type PatternFlowArpSenderHardwareAddrMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowArpSenderHardwareAddrMetricTag) Reset() { - *x = PatternFlowArpSenderHardwareAddrMetricTag{} +func (x *PatternFlowEthernetPauseDstMetricTag) Reset() { + *x = PatternFlowEthernetPauseDstMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[764] + mi := &file_otg_proto_msgTypes[748] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpSenderHardwareAddrMetricTag) String() string { +func (x *PatternFlowEthernetPauseDstMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpSenderHardwareAddrMetricTag) ProtoMessage() {} +func (*PatternFlowEthernetPauseDstMetricTag) ProtoMessage() {} -func (x *PatternFlowArpSenderHardwareAddrMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[764] +func (x *PatternFlowEthernetPauseDstMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[748] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -86054,74 +87360,74 @@ func (x *PatternFlowArpSenderHardwareAddrMetricTag) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpSenderHardwareAddrMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowArpSenderHardwareAddrMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{764} +// Deprecated: Use PatternFlowEthernetPauseDstMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseDstMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{748} } -func (x *PatternFlowArpSenderHardwareAddrMetricTag) GetName() string { +func (x *PatternFlowEthernetPauseDstMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowArpSenderHardwareAddrMetricTag) GetOffset() uint32 { +func (x *PatternFlowEthernetPauseDstMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowArpSenderHardwareAddrMetricTag) GetLength() uint32 { +func (x *PatternFlowEthernetPauseDstMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Media address of the sender -type PatternFlowArpSenderHardwareAddr struct { +// Destination MAC address +type PatternFlowEthernetPauseDst struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowArpSenderHardwareAddr_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpSenderHardwareAddr_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowEthernetPauseDst_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetPauseDst_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 00:00:00:00:00:00 + // default = 01:80:c2:00:00:01 Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = ['00:00:00:00:00:00'] + // default = ['01:80:c2:00:00:01'] Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowArpSenderHardwareAddrCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowEthernetPauseDstCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowArpSenderHardwareAddrCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowEthernetPauseDstCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowArpSenderHardwareAddrMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowEthernetPauseDstMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowArpSenderHardwareAddr) Reset() { - *x = PatternFlowArpSenderHardwareAddr{} +func (x *PatternFlowEthernetPauseDst) Reset() { + *x = PatternFlowEthernetPauseDst{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[765] + mi := &file_otg_proto_msgTypes[749] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpSenderHardwareAddr) String() string { +func (x *PatternFlowEthernetPauseDst) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpSenderHardwareAddr) ProtoMessage() {} +func (*PatternFlowEthernetPauseDst) ProtoMessage() {} -func (x *PatternFlowArpSenderHardwareAddr) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[765] +func (x *PatternFlowEthernetPauseDst) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[749] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -86132,87 +87438,87 @@ func (x *PatternFlowArpSenderHardwareAddr) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpSenderHardwareAddr.ProtoReflect.Descriptor instead. -func (*PatternFlowArpSenderHardwareAddr) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{765} +// Deprecated: Use PatternFlowEthernetPauseDst.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseDst) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{749} } -func (x *PatternFlowArpSenderHardwareAddr) GetChoice() PatternFlowArpSenderHardwareAddr_Choice_Enum { +func (x *PatternFlowEthernetPauseDst) GetChoice() PatternFlowEthernetPauseDst_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowArpSenderHardwareAddr_Choice_unspecified + return PatternFlowEthernetPauseDst_Choice_unspecified } -func (x *PatternFlowArpSenderHardwareAddr) GetValue() string { +func (x *PatternFlowEthernetPauseDst) GetValue() string { if x != nil && x.Value != nil { return *x.Value } return "" } -func (x *PatternFlowArpSenderHardwareAddr) GetValues() []string { +func (x *PatternFlowEthernetPauseDst) GetValues() []string { if x != nil { return x.Values } return nil } -func (x *PatternFlowArpSenderHardwareAddr) GetIncrement() *PatternFlowArpSenderHardwareAddrCounter { +func (x *PatternFlowEthernetPauseDst) GetIncrement() *PatternFlowEthernetPauseDstCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowArpSenderHardwareAddr) GetDecrement() *PatternFlowArpSenderHardwareAddrCounter { +func (x *PatternFlowEthernetPauseDst) GetDecrement() *PatternFlowEthernetPauseDstCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowArpSenderHardwareAddr) GetMetricTags() []*PatternFlowArpSenderHardwareAddrMetricTag { +func (x *PatternFlowEthernetPauseDst) GetMetricTags() []*PatternFlowEthernetPauseDstMetricTag { if x != nil { return x.MetricTags } return nil } -// ipv4 counter pattern -type PatternFlowArpSenderProtocolAddrCounter struct { - state protoimpl.MessageState +// mac counter pattern +type PatternFlowEthernetPauseSrcCounter struct { + state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0.0.0.0 + // default = 00:00:00:00:00:00 Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 0.0.0.1 + // default = 00:00:00:00:00:01 Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowArpSenderProtocolAddrCounter) Reset() { - *x = PatternFlowArpSenderProtocolAddrCounter{} +func (x *PatternFlowEthernetPauseSrcCounter) Reset() { + *x = PatternFlowEthernetPauseSrcCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[766] + mi := &file_otg_proto_msgTypes[750] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpSenderProtocolAddrCounter) String() string { +func (x *PatternFlowEthernetPauseSrcCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpSenderProtocolAddrCounter) ProtoMessage() {} +func (*PatternFlowEthernetPauseSrcCounter) ProtoMessage() {} -func (x *PatternFlowArpSenderProtocolAddrCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[766] +func (x *PatternFlowEthernetPauseSrcCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[750] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -86223,26 +87529,26 @@ func (x *PatternFlowArpSenderProtocolAddrCounter) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpSenderProtocolAddrCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowArpSenderProtocolAddrCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{766} +// Deprecated: Use PatternFlowEthernetPauseSrcCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseSrcCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{750} } -func (x *PatternFlowArpSenderProtocolAddrCounter) GetStart() string { +func (x *PatternFlowEthernetPauseSrcCounter) GetStart() string { if x != nil && x.Start != nil { return *x.Start } return "" } -func (x *PatternFlowArpSenderProtocolAddrCounter) GetStep() string { +func (x *PatternFlowEthernetPauseSrcCounter) GetStep() string { if x != nil && x.Step != nil { return *x.Step } return "" } -func (x *PatternFlowArpSenderProtocolAddrCounter) GetCount() uint32 { +func (x *PatternFlowEthernetPauseSrcCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -86252,7 +87558,7 @@ func (x *PatternFlowArpSenderProtocolAddrCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowArpSenderProtocolAddrMetricTag struct { +type PatternFlowEthernetPauseSrcMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -86266,27 +87572,27 @@ type PatternFlowArpSenderProtocolAddrMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 32 + // default = 48 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowArpSenderProtocolAddrMetricTag) Reset() { - *x = PatternFlowArpSenderProtocolAddrMetricTag{} +func (x *PatternFlowEthernetPauseSrcMetricTag) Reset() { + *x = PatternFlowEthernetPauseSrcMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[767] + mi := &file_otg_proto_msgTypes[751] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpSenderProtocolAddrMetricTag) String() string { +func (x *PatternFlowEthernetPauseSrcMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpSenderProtocolAddrMetricTag) ProtoMessage() {} +func (*PatternFlowEthernetPauseSrcMetricTag) ProtoMessage() {} -func (x *PatternFlowArpSenderProtocolAddrMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[767] +func (x *PatternFlowEthernetPauseSrcMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[751] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -86297,74 +87603,74 @@ func (x *PatternFlowArpSenderProtocolAddrMetricTag) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpSenderProtocolAddrMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowArpSenderProtocolAddrMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{767} +// Deprecated: Use PatternFlowEthernetPauseSrcMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseSrcMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{751} } -func (x *PatternFlowArpSenderProtocolAddrMetricTag) GetName() string { +func (x *PatternFlowEthernetPauseSrcMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowArpSenderProtocolAddrMetricTag) GetOffset() uint32 { +func (x *PatternFlowEthernetPauseSrcMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowArpSenderProtocolAddrMetricTag) GetLength() uint32 { +func (x *PatternFlowEthernetPauseSrcMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Internetwork address of the sender -type PatternFlowArpSenderProtocolAddr struct { +// Source MAC address +type PatternFlowEthernetPauseSrc struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowArpSenderProtocolAddr_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpSenderProtocolAddr_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowEthernetPauseSrc_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetPauseSrc_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0.0.0.0 + // default = 00:00:00:00:00:00 Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = ['0.0.0.0'] + // default = ['00:00:00:00:00:00'] Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowArpSenderProtocolAddrCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowEthernetPauseSrcCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowArpSenderProtocolAddrCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowEthernetPauseSrcCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowArpSenderProtocolAddrMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowEthernetPauseSrcMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowArpSenderProtocolAddr) Reset() { - *x = PatternFlowArpSenderProtocolAddr{} +func (x *PatternFlowEthernetPauseSrc) Reset() { + *x = PatternFlowEthernetPauseSrc{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[768] + mi := &file_otg_proto_msgTypes[752] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpSenderProtocolAddr) String() string { +func (x *PatternFlowEthernetPauseSrc) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpSenderProtocolAddr) ProtoMessage() {} +func (*PatternFlowEthernetPauseSrc) ProtoMessage() {} -func (x *PatternFlowArpSenderProtocolAddr) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[768] +func (x *PatternFlowEthernetPauseSrc) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[752] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -86375,87 +87681,87 @@ func (x *PatternFlowArpSenderProtocolAddr) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpSenderProtocolAddr.ProtoReflect.Descriptor instead. -func (*PatternFlowArpSenderProtocolAddr) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{768} +// Deprecated: Use PatternFlowEthernetPauseSrc.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseSrc) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{752} } -func (x *PatternFlowArpSenderProtocolAddr) GetChoice() PatternFlowArpSenderProtocolAddr_Choice_Enum { +func (x *PatternFlowEthernetPauseSrc) GetChoice() PatternFlowEthernetPauseSrc_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowArpSenderProtocolAddr_Choice_unspecified + return PatternFlowEthernetPauseSrc_Choice_unspecified } -func (x *PatternFlowArpSenderProtocolAddr) GetValue() string { +func (x *PatternFlowEthernetPauseSrc) GetValue() string { if x != nil && x.Value != nil { return *x.Value } return "" } -func (x *PatternFlowArpSenderProtocolAddr) GetValues() []string { +func (x *PatternFlowEthernetPauseSrc) GetValues() []string { if x != nil { return x.Values } return nil } -func (x *PatternFlowArpSenderProtocolAddr) GetIncrement() *PatternFlowArpSenderProtocolAddrCounter { +func (x *PatternFlowEthernetPauseSrc) GetIncrement() *PatternFlowEthernetPauseSrcCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowArpSenderProtocolAddr) GetDecrement() *PatternFlowArpSenderProtocolAddrCounter { +func (x *PatternFlowEthernetPauseSrc) GetDecrement() *PatternFlowEthernetPauseSrcCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowArpSenderProtocolAddr) GetMetricTags() []*PatternFlowArpSenderProtocolAddrMetricTag { +func (x *PatternFlowEthernetPauseSrc) GetMetricTags() []*PatternFlowEthernetPauseSrcMetricTag { if x != nil { return x.MetricTags } return nil } -// mac counter pattern -type PatternFlowArpTargetHardwareAddrCounter struct { +// integer counter pattern +type PatternFlowEthernetPauseEtherTypeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 00:00:00:00:00:00 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = 34824 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 00:00:00:00:00:01 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowArpTargetHardwareAddrCounter) Reset() { - *x = PatternFlowArpTargetHardwareAddrCounter{} +func (x *PatternFlowEthernetPauseEtherTypeCounter) Reset() { + *x = PatternFlowEthernetPauseEtherTypeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[769] + mi := &file_otg_proto_msgTypes[753] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpTargetHardwareAddrCounter) String() string { +func (x *PatternFlowEthernetPauseEtherTypeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpTargetHardwareAddrCounter) ProtoMessage() {} +func (*PatternFlowEthernetPauseEtherTypeCounter) ProtoMessage() {} -func (x *PatternFlowArpTargetHardwareAddrCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[769] +func (x *PatternFlowEthernetPauseEtherTypeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[753] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -86466,26 +87772,26 @@ func (x *PatternFlowArpTargetHardwareAddrCounter) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpTargetHardwareAddrCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowArpTargetHardwareAddrCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{769} +// Deprecated: Use PatternFlowEthernetPauseEtherTypeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseEtherTypeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{753} } -func (x *PatternFlowArpTargetHardwareAddrCounter) GetStart() string { +func (x *PatternFlowEthernetPauseEtherTypeCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } - return "" + return 0 } -func (x *PatternFlowArpTargetHardwareAddrCounter) GetStep() string { +func (x *PatternFlowEthernetPauseEtherTypeCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } - return "" + return 0 } -func (x *PatternFlowArpTargetHardwareAddrCounter) GetCount() uint32 { +func (x *PatternFlowEthernetPauseEtherTypeCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -86495,7 +87801,7 @@ func (x *PatternFlowArpTargetHardwareAddrCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowArpTargetHardwareAddrMetricTag struct { +type PatternFlowEthernetPauseEtherTypeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -86509,27 +87815,27 @@ type PatternFlowArpTargetHardwareAddrMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 48 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowArpTargetHardwareAddrMetricTag) Reset() { - *x = PatternFlowArpTargetHardwareAddrMetricTag{} +func (x *PatternFlowEthernetPauseEtherTypeMetricTag) Reset() { + *x = PatternFlowEthernetPauseEtherTypeMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[770] + mi := &file_otg_proto_msgTypes[754] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpTargetHardwareAddrMetricTag) String() string { +func (x *PatternFlowEthernetPauseEtherTypeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpTargetHardwareAddrMetricTag) ProtoMessage() {} +func (*PatternFlowEthernetPauseEtherTypeMetricTag) ProtoMessage() {} -func (x *PatternFlowArpTargetHardwareAddrMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[770] +func (x *PatternFlowEthernetPauseEtherTypeMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[754] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -86540,74 +87846,74 @@ func (x *PatternFlowArpTargetHardwareAddrMetricTag) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpTargetHardwareAddrMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowArpTargetHardwareAddrMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{770} +// Deprecated: Use PatternFlowEthernetPauseEtherTypeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseEtherTypeMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{754} } -func (x *PatternFlowArpTargetHardwareAddrMetricTag) GetName() string { +func (x *PatternFlowEthernetPauseEtherTypeMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowArpTargetHardwareAddrMetricTag) GetOffset() uint32 { +func (x *PatternFlowEthernetPauseEtherTypeMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowArpTargetHardwareAddrMetricTag) GetLength() uint32 { +func (x *PatternFlowEthernetPauseEtherTypeMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Media address of the target -type PatternFlowArpTargetHardwareAddr struct { +// Ethernet type +type PatternFlowEthernetPauseEtherType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowArpTargetHardwareAddr_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpTargetHardwareAddr_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowEthernetPauseEtherType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetPauseEtherType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 00:00:00:00:00:00 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 34824 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = ['00:00:00:00:00:00'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // default = [34824] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowArpTargetHardwareAddrCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowEthernetPauseEtherTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowArpTargetHardwareAddrCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowEthernetPauseEtherTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowArpTargetHardwareAddrMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowEthernetPauseEtherTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowArpTargetHardwareAddr) Reset() { - *x = PatternFlowArpTargetHardwareAddr{} +func (x *PatternFlowEthernetPauseEtherType) Reset() { + *x = PatternFlowEthernetPauseEtherType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[771] + mi := &file_otg_proto_msgTypes[755] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpTargetHardwareAddr) String() string { +func (x *PatternFlowEthernetPauseEtherType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpTargetHardwareAddr) ProtoMessage() {} +func (*PatternFlowEthernetPauseEtherType) ProtoMessage() {} -func (x *PatternFlowArpTargetHardwareAddr) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[771] +func (x *PatternFlowEthernetPauseEtherType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[755] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -86618,87 +87924,87 @@ func (x *PatternFlowArpTargetHardwareAddr) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpTargetHardwareAddr.ProtoReflect.Descriptor instead. -func (*PatternFlowArpTargetHardwareAddr) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{771} +// Deprecated: Use PatternFlowEthernetPauseEtherType.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseEtherType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{755} } -func (x *PatternFlowArpTargetHardwareAddr) GetChoice() PatternFlowArpTargetHardwareAddr_Choice_Enum { +func (x *PatternFlowEthernetPauseEtherType) GetChoice() PatternFlowEthernetPauseEtherType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowArpTargetHardwareAddr_Choice_unspecified + return PatternFlowEthernetPauseEtherType_Choice_unspecified } -func (x *PatternFlowArpTargetHardwareAddr) GetValue() string { +func (x *PatternFlowEthernetPauseEtherType) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } - return "" + return 0 } -func (x *PatternFlowArpTargetHardwareAddr) GetValues() []string { +func (x *PatternFlowEthernetPauseEtherType) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowArpTargetHardwareAddr) GetIncrement() *PatternFlowArpTargetHardwareAddrCounter { +func (x *PatternFlowEthernetPauseEtherType) GetIncrement() *PatternFlowEthernetPauseEtherTypeCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowArpTargetHardwareAddr) GetDecrement() *PatternFlowArpTargetHardwareAddrCounter { +func (x *PatternFlowEthernetPauseEtherType) GetDecrement() *PatternFlowEthernetPauseEtherTypeCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowArpTargetHardwareAddr) GetMetricTags() []*PatternFlowArpTargetHardwareAddrMetricTag { +func (x *PatternFlowEthernetPauseEtherType) GetMetricTags() []*PatternFlowEthernetPauseEtherTypeMetricTag { if x != nil { return x.MetricTags } return nil } -// ipv4 counter pattern -type PatternFlowArpTargetProtocolAddrCounter struct { +// integer counter pattern +type PatternFlowEthernetPauseControlOpCodeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0.0.0.0 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = 1 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 0.0.0.1 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowArpTargetProtocolAddrCounter) Reset() { - *x = PatternFlowArpTargetProtocolAddrCounter{} +func (x *PatternFlowEthernetPauseControlOpCodeCounter) Reset() { + *x = PatternFlowEthernetPauseControlOpCodeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[772] + mi := &file_otg_proto_msgTypes[756] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpTargetProtocolAddrCounter) String() string { +func (x *PatternFlowEthernetPauseControlOpCodeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpTargetProtocolAddrCounter) ProtoMessage() {} +func (*PatternFlowEthernetPauseControlOpCodeCounter) ProtoMessage() {} -func (x *PatternFlowArpTargetProtocolAddrCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[772] +func (x *PatternFlowEthernetPauseControlOpCodeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[756] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -86709,26 +88015,26 @@ func (x *PatternFlowArpTargetProtocolAddrCounter) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpTargetProtocolAddrCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowArpTargetProtocolAddrCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{772} +// Deprecated: Use PatternFlowEthernetPauseControlOpCodeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseControlOpCodeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{756} } -func (x *PatternFlowArpTargetProtocolAddrCounter) GetStart() string { +func (x *PatternFlowEthernetPauseControlOpCodeCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } - return "" + return 0 } -func (x *PatternFlowArpTargetProtocolAddrCounter) GetStep() string { +func (x *PatternFlowEthernetPauseControlOpCodeCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } - return "" + return 0 } -func (x *PatternFlowArpTargetProtocolAddrCounter) GetCount() uint32 { +func (x *PatternFlowEthernetPauseControlOpCodeCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -86738,7 +88044,7 @@ func (x *PatternFlowArpTargetProtocolAddrCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowArpTargetProtocolAddrMetricTag struct { +type PatternFlowEthernetPauseControlOpCodeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -86752,27 +88058,27 @@ type PatternFlowArpTargetProtocolAddrMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 32 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowArpTargetProtocolAddrMetricTag) Reset() { - *x = PatternFlowArpTargetProtocolAddrMetricTag{} +func (x *PatternFlowEthernetPauseControlOpCodeMetricTag) Reset() { + *x = PatternFlowEthernetPauseControlOpCodeMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[773] + mi := &file_otg_proto_msgTypes[757] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpTargetProtocolAddrMetricTag) String() string { +func (x *PatternFlowEthernetPauseControlOpCodeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpTargetProtocolAddrMetricTag) ProtoMessage() {} +func (*PatternFlowEthernetPauseControlOpCodeMetricTag) ProtoMessage() {} -func (x *PatternFlowArpTargetProtocolAddrMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[773] +func (x *PatternFlowEthernetPauseControlOpCodeMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[757] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -86783,74 +88089,74 @@ func (x *PatternFlowArpTargetProtocolAddrMetricTag) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpTargetProtocolAddrMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowArpTargetProtocolAddrMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{773} +// Deprecated: Use PatternFlowEthernetPauseControlOpCodeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseControlOpCodeMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{757} } -func (x *PatternFlowArpTargetProtocolAddrMetricTag) GetName() string { +func (x *PatternFlowEthernetPauseControlOpCodeMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowArpTargetProtocolAddrMetricTag) GetOffset() uint32 { +func (x *PatternFlowEthernetPauseControlOpCodeMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowArpTargetProtocolAddrMetricTag) GetLength() uint32 { +func (x *PatternFlowEthernetPauseControlOpCodeMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Internetwork address of the target -type PatternFlowArpTargetProtocolAddr struct { +// Control operation code +type PatternFlowEthernetPauseControlOpCode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowArpTargetProtocolAddr_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpTargetProtocolAddr_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowEthernetPauseControlOpCode_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetPauseControlOpCode_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0.0.0.0 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 1 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = ['0.0.0.0'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // default = [1] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowArpTargetProtocolAddrCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowEthernetPauseControlOpCodeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowArpTargetProtocolAddrCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowEthernetPauseControlOpCodeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowArpTargetProtocolAddrMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowEthernetPauseControlOpCodeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowArpTargetProtocolAddr) Reset() { - *x = PatternFlowArpTargetProtocolAddr{} +func (x *PatternFlowEthernetPauseControlOpCode) Reset() { + *x = PatternFlowEthernetPauseControlOpCode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[774] + mi := &file_otg_proto_msgTypes[758] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpTargetProtocolAddr) String() string { +func (x *PatternFlowEthernetPauseControlOpCode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpTargetProtocolAddr) ProtoMessage() {} +func (*PatternFlowEthernetPauseControlOpCode) ProtoMessage() {} -func (x *PatternFlowArpTargetProtocolAddr) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[774] +func (x *PatternFlowEthernetPauseControlOpCode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[758] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -86861,47 +88167,47 @@ func (x *PatternFlowArpTargetProtocolAddr) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpTargetProtocolAddr.ProtoReflect.Descriptor instead. -func (*PatternFlowArpTargetProtocolAddr) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{774} +// Deprecated: Use PatternFlowEthernetPauseControlOpCode.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseControlOpCode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{758} } -func (x *PatternFlowArpTargetProtocolAddr) GetChoice() PatternFlowArpTargetProtocolAddr_Choice_Enum { +func (x *PatternFlowEthernetPauseControlOpCode) GetChoice() PatternFlowEthernetPauseControlOpCode_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowArpTargetProtocolAddr_Choice_unspecified + return PatternFlowEthernetPauseControlOpCode_Choice_unspecified } -func (x *PatternFlowArpTargetProtocolAddr) GetValue() string { +func (x *PatternFlowEthernetPauseControlOpCode) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } - return "" + return 0 } -func (x *PatternFlowArpTargetProtocolAddr) GetValues() []string { +func (x *PatternFlowEthernetPauseControlOpCode) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowArpTargetProtocolAddr) GetIncrement() *PatternFlowArpTargetProtocolAddrCounter { +func (x *PatternFlowEthernetPauseControlOpCode) GetIncrement() *PatternFlowEthernetPauseControlOpCodeCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowArpTargetProtocolAddr) GetDecrement() *PatternFlowArpTargetProtocolAddrCounter { +func (x *PatternFlowEthernetPauseControlOpCode) GetDecrement() *PatternFlowEthernetPauseControlOpCodeCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowArpTargetProtocolAddr) GetMetricTags() []*PatternFlowArpTargetProtocolAddrMetricTag { +func (x *PatternFlowEthernetPauseControlOpCode) GetMetricTags() []*PatternFlowEthernetPauseControlOpCodeMetricTag { if x != nil { return x.MetricTags } @@ -86909,13 +88215,13 @@ func (x *PatternFlowArpTargetProtocolAddr) GetMetricTags() []*PatternFlowArpTarg } // integer counter pattern -type PatternFlowIcmpEchoTypeCounter struct { +type PatternFlowEthernetPauseTimeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 8 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -86925,23 +88231,23 @@ type PatternFlowIcmpEchoTypeCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIcmpEchoTypeCounter) Reset() { - *x = PatternFlowIcmpEchoTypeCounter{} +func (x *PatternFlowEthernetPauseTimeCounter) Reset() { + *x = PatternFlowEthernetPauseTimeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[775] + mi := &file_otg_proto_msgTypes[759] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoTypeCounter) String() string { +func (x *PatternFlowEthernetPauseTimeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoTypeCounter) ProtoMessage() {} +func (*PatternFlowEthernetPauseTimeCounter) ProtoMessage() {} -func (x *PatternFlowIcmpEchoTypeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[775] +func (x *PatternFlowEthernetPauseTimeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[759] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -86952,26 +88258,26 @@ func (x *PatternFlowIcmpEchoTypeCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoTypeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoTypeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{775} +// Deprecated: Use PatternFlowEthernetPauseTimeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseTimeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{759} } -func (x *PatternFlowIcmpEchoTypeCounter) GetStart() uint32 { +func (x *PatternFlowEthernetPauseTimeCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowIcmpEchoTypeCounter) GetStep() uint32 { +func (x *PatternFlowEthernetPauseTimeCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowIcmpEchoTypeCounter) GetCount() uint32 { +func (x *PatternFlowEthernetPauseTimeCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -86981,7 +88287,7 @@ func (x *PatternFlowIcmpEchoTypeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowIcmpEchoTypeMetricTag struct { +type PatternFlowEthernetPauseTimeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -86995,27 +88301,27 @@ type PatternFlowIcmpEchoTypeMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowIcmpEchoTypeMetricTag) Reset() { - *x = PatternFlowIcmpEchoTypeMetricTag{} +func (x *PatternFlowEthernetPauseTimeMetricTag) Reset() { + *x = PatternFlowEthernetPauseTimeMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[776] + mi := &file_otg_proto_msgTypes[760] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoTypeMetricTag) String() string { +func (x *PatternFlowEthernetPauseTimeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoTypeMetricTag) ProtoMessage() {} +func (*PatternFlowEthernetPauseTimeMetricTag) ProtoMessage() {} -func (x *PatternFlowIcmpEchoTypeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[776] +func (x *PatternFlowEthernetPauseTimeMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[760] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -87026,74 +88332,74 @@ func (x *PatternFlowIcmpEchoTypeMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoTypeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoTypeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{776} +// Deprecated: Use PatternFlowEthernetPauseTimeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseTimeMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{760} } -func (x *PatternFlowIcmpEchoTypeMetricTag) GetName() string { +func (x *PatternFlowEthernetPauseTimeMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIcmpEchoTypeMetricTag) GetOffset() uint32 { +func (x *PatternFlowEthernetPauseTimeMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowIcmpEchoTypeMetricTag) GetLength() uint32 { +func (x *PatternFlowEthernetPauseTimeMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// The type of ICMP echo packet -type PatternFlowIcmpEchoType struct { +// Time +type PatternFlowEthernetPauseTime struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowIcmpEchoType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpEchoType_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowEthernetPauseTime_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowEthernetPauseTime_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 8 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [8] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowIcmpEchoTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowEthernetPauseTimeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowIcmpEchoTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowEthernetPauseTimeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIcmpEchoTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowEthernetPauseTimeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowIcmpEchoType) Reset() { - *x = PatternFlowIcmpEchoType{} +func (x *PatternFlowEthernetPauseTime) Reset() { + *x = PatternFlowEthernetPauseTime{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[777] + mi := &file_otg_proto_msgTypes[761] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoType) String() string { +func (x *PatternFlowEthernetPauseTime) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoType) ProtoMessage() {} +func (*PatternFlowEthernetPauseTime) ProtoMessage() {} -func (x *PatternFlowIcmpEchoType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[777] +func (x *PatternFlowEthernetPauseTime) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[761] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -87104,47 +88410,47 @@ func (x *PatternFlowIcmpEchoType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoType.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{777} +// Deprecated: Use PatternFlowEthernetPauseTime.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseTime) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{761} } -func (x *PatternFlowIcmpEchoType) GetChoice() PatternFlowIcmpEchoType_Choice_Enum { +func (x *PatternFlowEthernetPauseTime) GetChoice() PatternFlowEthernetPauseTime_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIcmpEchoType_Choice_unspecified + return PatternFlowEthernetPauseTime_Choice_unspecified } -func (x *PatternFlowIcmpEchoType) GetValue() uint32 { +func (x *PatternFlowEthernetPauseTime) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowIcmpEchoType) GetValues() []uint32 { +func (x *PatternFlowEthernetPauseTime) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowIcmpEchoType) GetIncrement() *PatternFlowIcmpEchoTypeCounter { +func (x *PatternFlowEthernetPauseTime) GetIncrement() *PatternFlowEthernetPauseTimeCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowIcmpEchoType) GetDecrement() *PatternFlowIcmpEchoTypeCounter { +func (x *PatternFlowEthernetPauseTime) GetDecrement() *PatternFlowEthernetPauseTimeCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowIcmpEchoType) GetMetricTags() []*PatternFlowIcmpEchoTypeMetricTag { +func (x *PatternFlowEthernetPauseTime) GetMetricTags() []*PatternFlowEthernetPauseTimeMetricTag { if x != nil { return x.MetricTags } @@ -87152,7 +88458,7 @@ func (x *PatternFlowIcmpEchoType) GetMetricTags() []*PatternFlowIcmpEchoTypeMetr } // integer counter pattern -type PatternFlowIcmpEchoCodeCounter struct { +type PatternFlowTcpSrcPortCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -87168,23 +88474,23 @@ type PatternFlowIcmpEchoCodeCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIcmpEchoCodeCounter) Reset() { - *x = PatternFlowIcmpEchoCodeCounter{} +func (x *PatternFlowTcpSrcPortCounter) Reset() { + *x = PatternFlowTcpSrcPortCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[778] + mi := &file_otg_proto_msgTypes[762] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoCodeCounter) String() string { +func (x *PatternFlowTcpSrcPortCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoCodeCounter) ProtoMessage() {} +func (*PatternFlowTcpSrcPortCounter) ProtoMessage() {} -func (x *PatternFlowIcmpEchoCodeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[778] +func (x *PatternFlowTcpSrcPortCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[762] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -87195,26 +88501,26 @@ func (x *PatternFlowIcmpEchoCodeCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoCodeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoCodeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{778} +// Deprecated: Use PatternFlowTcpSrcPortCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpSrcPortCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{762} } -func (x *PatternFlowIcmpEchoCodeCounter) GetStart() uint32 { +func (x *PatternFlowTcpSrcPortCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowIcmpEchoCodeCounter) GetStep() uint32 { +func (x *PatternFlowTcpSrcPortCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowIcmpEchoCodeCounter) GetCount() uint32 { +func (x *PatternFlowTcpSrcPortCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -87224,7 +88530,7 @@ func (x *PatternFlowIcmpEchoCodeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowIcmpEchoCodeMetricTag struct { +type PatternFlowTcpSrcPortMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -87238,27 +88544,27 @@ type PatternFlowIcmpEchoCodeMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowIcmpEchoCodeMetricTag) Reset() { - *x = PatternFlowIcmpEchoCodeMetricTag{} +func (x *PatternFlowTcpSrcPortMetricTag) Reset() { + *x = PatternFlowTcpSrcPortMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[779] + mi := &file_otg_proto_msgTypes[763] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoCodeMetricTag) String() string { +func (x *PatternFlowTcpSrcPortMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoCodeMetricTag) ProtoMessage() {} +func (*PatternFlowTcpSrcPortMetricTag) ProtoMessage() {} -func (x *PatternFlowIcmpEchoCodeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[779] +func (x *PatternFlowTcpSrcPortMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[763] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -87269,74 +88575,72 @@ func (x *PatternFlowIcmpEchoCodeMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoCodeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoCodeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{779} +// Deprecated: Use PatternFlowTcpSrcPortMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpSrcPortMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{763} } -func (x *PatternFlowIcmpEchoCodeMetricTag) GetName() string { +func (x *PatternFlowTcpSrcPortMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIcmpEchoCodeMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpSrcPortMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowIcmpEchoCodeMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpSrcPortMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// The ICMP subtype. The default code for ICMP echo request and reply is 0. -type PatternFlowIcmpEchoCode struct { +// integer random pattern +type PatternFlowTcpSrcPortRandom struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowIcmpEchoCode_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpEchoCode_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models + // The minimum possible value generated by the random value generator. // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowIcmpEchoCodeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowIcmpEchoCodeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` - // One or more metric tags can be used to enable tracking portion of or all bits in - // a corresponding header field for metrics per each applicable value. These would appear - // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIcmpEchoCodeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + Min *uint32 `protobuf:"varint,1,opt,name=min,proto3,oneof" json:"min,omitempty"` + // The maximum possible value generated by the random value generator. + // default = 65535 + Max *uint32 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` + // The seed value is used to initialize the random number generator to a deterministic + // state. If the user provides a seed value of 0, the implementation will generate a + // sequence of non-deterministic random values. For any other seed value, the sequence + // of random numbers will be generated in a deterministic manner (specific to the implementation). + // default = 1 + Seed *uint32 `protobuf:"varint,3,opt,name=seed,proto3,oneof" json:"seed,omitempty"` + // The total number of values to be generated by the random value generator. + // default = 1 + Count *uint32 `protobuf:"varint,4,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIcmpEchoCode) Reset() { - *x = PatternFlowIcmpEchoCode{} +func (x *PatternFlowTcpSrcPortRandom) Reset() { + *x = PatternFlowTcpSrcPortRandom{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[780] + mi := &file_otg_proto_msgTypes[764] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoCode) String() string { +func (x *PatternFlowTcpSrcPortRandom) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoCode) ProtoMessage() {} +func (*PatternFlowTcpSrcPortRandom) ProtoMessage() {} -func (x *PatternFlowIcmpEchoCode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[780] +func (x *PatternFlowTcpSrcPortRandom) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[764] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -87347,86 +88651,83 @@ func (x *PatternFlowIcmpEchoCode) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoCode.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoCode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{780} -} - -func (x *PatternFlowIcmpEchoCode) GetChoice() PatternFlowIcmpEchoCode_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIcmpEchoCode_Choice_unspecified +// Deprecated: Use PatternFlowTcpSrcPortRandom.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpSrcPortRandom) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{764} } -func (x *PatternFlowIcmpEchoCode) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowTcpSrcPortRandom) GetMin() uint32 { + if x != nil && x.Min != nil { + return *x.Min } return 0 } -func (x *PatternFlowIcmpEchoCode) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowIcmpEchoCode) GetIncrement() *PatternFlowIcmpEchoCodeCounter { - if x != nil { - return x.Increment +func (x *PatternFlowTcpSrcPortRandom) GetMax() uint32 { + if x != nil && x.Max != nil { + return *x.Max } - return nil + return 0 } -func (x *PatternFlowIcmpEchoCode) GetDecrement() *PatternFlowIcmpEchoCodeCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowTcpSrcPortRandom) GetSeed() uint32 { + if x != nil && x.Seed != nil { + return *x.Seed } - return nil + return 0 } -func (x *PatternFlowIcmpEchoCode) GetMetricTags() []*PatternFlowIcmpEchoCodeMetricTag { - if x != nil { - return x.MetricTags +func (x *PatternFlowTcpSrcPortRandom) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count } - return nil + return 0 } -// ICMP checksum -type PatternFlowIcmpEchoChecksum struct { +// Source port +type PatternFlowTcpSrcPort struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The type of checksum - // default = Choice.Enum.generated - Choice *PatternFlowIcmpEchoChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpEchoChecksum_Choice_Enum,oneof" json:"choice,omitempty"` - // A system generated checksum value - // default = Generated.Enum.good - Generated *PatternFlowIcmpEchoChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowIcmpEchoChecksum_Generated_Enum,oneof" json:"generated,omitempty"` - // A custom checksum value - Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowTcpSrcPort_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpSrcPort_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowTcpSrcPortCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowTcpSrcPortCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowTcpSrcPortMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // Description missing in models + Random *PatternFlowTcpSrcPortRandom `protobuf:"bytes,8,opt,name=random,proto3" json:"random,omitempty"` } -func (x *PatternFlowIcmpEchoChecksum) Reset() { - *x = PatternFlowIcmpEchoChecksum{} +func (x *PatternFlowTcpSrcPort) Reset() { + *x = PatternFlowTcpSrcPort{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[781] + mi := &file_otg_proto_msgTypes[765] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoChecksum) String() string { +func (x *PatternFlowTcpSrcPort) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoChecksum) ProtoMessage() {} +func (*PatternFlowTcpSrcPort) ProtoMessage() {} -func (x *PatternFlowIcmpEchoChecksum) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[781] +func (x *PatternFlowTcpSrcPort) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[765] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -87437,34 +88738,62 @@ func (x *PatternFlowIcmpEchoChecksum) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoChecksum.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoChecksum) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{781} +// Deprecated: Use PatternFlowTcpSrcPort.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpSrcPort) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{765} } -func (x *PatternFlowIcmpEchoChecksum) GetChoice() PatternFlowIcmpEchoChecksum_Choice_Enum { +func (x *PatternFlowTcpSrcPort) GetChoice() PatternFlowTcpSrcPort_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIcmpEchoChecksum_Choice_unspecified + return PatternFlowTcpSrcPort_Choice_unspecified } -func (x *PatternFlowIcmpEchoChecksum) GetGenerated() PatternFlowIcmpEchoChecksum_Generated_Enum { - if x != nil && x.Generated != nil { - return *x.Generated +func (x *PatternFlowTcpSrcPort) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } - return PatternFlowIcmpEchoChecksum_Generated_unspecified + return 0 } -func (x *PatternFlowIcmpEchoChecksum) GetCustom() uint32 { - if x != nil && x.Custom != nil { - return *x.Custom +func (x *PatternFlowTcpSrcPort) GetValues() []uint32 { + if x != nil { + return x.Values } - return 0 + return nil +} + +func (x *PatternFlowTcpSrcPort) GetIncrement() *PatternFlowTcpSrcPortCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowTcpSrcPort) GetDecrement() *PatternFlowTcpSrcPortCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowTcpSrcPort) GetMetricTags() []*PatternFlowTcpSrcPortMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +func (x *PatternFlowTcpSrcPort) GetRandom() *PatternFlowTcpSrcPortRandom { + if x != nil { + return x.Random + } + return nil } // integer counter pattern -type PatternFlowIcmpEchoIdentifierCounter struct { +type PatternFlowTcpDstPortCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -87480,23 +88809,23 @@ type PatternFlowIcmpEchoIdentifierCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIcmpEchoIdentifierCounter) Reset() { - *x = PatternFlowIcmpEchoIdentifierCounter{} +func (x *PatternFlowTcpDstPortCounter) Reset() { + *x = PatternFlowTcpDstPortCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[782] + mi := &file_otg_proto_msgTypes[766] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoIdentifierCounter) String() string { +func (x *PatternFlowTcpDstPortCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoIdentifierCounter) ProtoMessage() {} +func (*PatternFlowTcpDstPortCounter) ProtoMessage() {} -func (x *PatternFlowIcmpEchoIdentifierCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[782] +func (x *PatternFlowTcpDstPortCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[766] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -87507,26 +88836,26 @@ func (x *PatternFlowIcmpEchoIdentifierCounter) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoIdentifierCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoIdentifierCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{782} +// Deprecated: Use PatternFlowTcpDstPortCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpDstPortCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{766} } -func (x *PatternFlowIcmpEchoIdentifierCounter) GetStart() uint32 { +func (x *PatternFlowTcpDstPortCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowIcmpEchoIdentifierCounter) GetStep() uint32 { +func (x *PatternFlowTcpDstPortCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowIcmpEchoIdentifierCounter) GetCount() uint32 { +func (x *PatternFlowTcpDstPortCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -87536,7 +88865,7 @@ func (x *PatternFlowIcmpEchoIdentifierCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowIcmpEchoIdentifierMetricTag struct { +type PatternFlowTcpDstPortMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -87554,23 +88883,23 @@ type PatternFlowIcmpEchoIdentifierMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowIcmpEchoIdentifierMetricTag) Reset() { - *x = PatternFlowIcmpEchoIdentifierMetricTag{} +func (x *PatternFlowTcpDstPortMetricTag) Reset() { + *x = PatternFlowTcpDstPortMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[783] + mi := &file_otg_proto_msgTypes[767] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoIdentifierMetricTag) String() string { +func (x *PatternFlowTcpDstPortMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoIdentifierMetricTag) ProtoMessage() {} +func (*PatternFlowTcpDstPortMetricTag) ProtoMessage() {} -func (x *PatternFlowIcmpEchoIdentifierMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[783] +func (x *PatternFlowTcpDstPortMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[767] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -87581,41 +88910,124 @@ func (x *PatternFlowIcmpEchoIdentifierMetricTag) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoIdentifierMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoIdentifierMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{783} +// Deprecated: Use PatternFlowTcpDstPortMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpDstPortMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{767} } -func (x *PatternFlowIcmpEchoIdentifierMetricTag) GetName() string { +func (x *PatternFlowTcpDstPortMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIcmpEchoIdentifierMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpDstPortMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowIcmpEchoIdentifierMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpDstPortMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// ICMP identifier -type PatternFlowIcmpEchoIdentifier struct { +// integer random pattern +type PatternFlowTcpDstPortRandom struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The minimum possible value generated by the random value generator. + // default = 0 + Min *uint32 `protobuf:"varint,1,opt,name=min,proto3,oneof" json:"min,omitempty"` + // The maximum possible value generated by the random value generator. + // default = 65535 + Max *uint32 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` + // The seed value is used to initialize the random number generator to a deterministic + // state. If the user provides a seed value of 0, the implementation will generate a + // sequence of non-deterministic random values. For any other seed value, the sequence + // of random numbers will be generated in a deterministic manner (specific to the implementation). + // default = 1 + Seed *uint32 `protobuf:"varint,3,opt,name=seed,proto3,oneof" json:"seed,omitempty"` + // The total number of values to be generated by the random value generator. + // default = 1 + Count *uint32 `protobuf:"varint,4,opt,name=count,proto3,oneof" json:"count,omitempty"` +} + +func (x *PatternFlowTcpDstPortRandom) Reset() { + *x = PatternFlowTcpDstPortRandom{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[768] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpDstPortRandom) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpDstPortRandom) ProtoMessage() {} + +func (x *PatternFlowTcpDstPortRandom) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[768] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpDstPortRandom.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpDstPortRandom) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{768} +} + +func (x *PatternFlowTcpDstPortRandom) GetMin() uint32 { + if x != nil && x.Min != nil { + return *x.Min + } + return 0 +} + +func (x *PatternFlowTcpDstPortRandom) GetMax() uint32 { + if x != nil && x.Max != nil { + return *x.Max + } + return 0 +} + +func (x *PatternFlowTcpDstPortRandom) GetSeed() uint32 { + if x != nil && x.Seed != nil { + return *x.Seed + } + return 0 +} + +func (x *PatternFlowTcpDstPortRandom) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Destination port +type PatternFlowTcpDstPort struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowIcmpEchoIdentifier_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpEchoIdentifier_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowTcpDstPort_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpDstPort_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -87623,32 +89035,34 @@ type PatternFlowIcmpEchoIdentifier struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowIcmpEchoIdentifierCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowTcpDstPortCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowIcmpEchoIdentifierCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowTcpDstPortCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIcmpEchoIdentifierMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowTcpDstPortMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // Description missing in models + Random *PatternFlowTcpDstPortRandom `protobuf:"bytes,8,opt,name=random,proto3" json:"random,omitempty"` } -func (x *PatternFlowIcmpEchoIdentifier) Reset() { - *x = PatternFlowIcmpEchoIdentifier{} +func (x *PatternFlowTcpDstPort) Reset() { + *x = PatternFlowTcpDstPort{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[784] + mi := &file_otg_proto_msgTypes[769] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoIdentifier) String() string { +func (x *PatternFlowTcpDstPort) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoIdentifier) ProtoMessage() {} +func (*PatternFlowTcpDstPort) ProtoMessage() {} -func (x *PatternFlowIcmpEchoIdentifier) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[784] +func (x *PatternFlowTcpDstPort) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[769] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -87659,55 +89073,62 @@ func (x *PatternFlowIcmpEchoIdentifier) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoIdentifier.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoIdentifier) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{784} +// Deprecated: Use PatternFlowTcpDstPort.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpDstPort) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{769} } -func (x *PatternFlowIcmpEchoIdentifier) GetChoice() PatternFlowIcmpEchoIdentifier_Choice_Enum { +func (x *PatternFlowTcpDstPort) GetChoice() PatternFlowTcpDstPort_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIcmpEchoIdentifier_Choice_unspecified + return PatternFlowTcpDstPort_Choice_unspecified } -func (x *PatternFlowIcmpEchoIdentifier) GetValue() uint32 { +func (x *PatternFlowTcpDstPort) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowIcmpEchoIdentifier) GetValues() []uint32 { +func (x *PatternFlowTcpDstPort) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowIcmpEchoIdentifier) GetIncrement() *PatternFlowIcmpEchoIdentifierCounter { +func (x *PatternFlowTcpDstPort) GetIncrement() *PatternFlowTcpDstPortCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowIcmpEchoIdentifier) GetDecrement() *PatternFlowIcmpEchoIdentifierCounter { +func (x *PatternFlowTcpDstPort) GetDecrement() *PatternFlowTcpDstPortCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowIcmpEchoIdentifier) GetMetricTags() []*PatternFlowIcmpEchoIdentifierMetricTag { +func (x *PatternFlowTcpDstPort) GetMetricTags() []*PatternFlowTcpDstPortMetricTag { if x != nil { return x.MetricTags } return nil } +func (x *PatternFlowTcpDstPort) GetRandom() *PatternFlowTcpDstPortRandom { + if x != nil { + return x.Random + } + return nil +} + // integer counter pattern -type PatternFlowIcmpEchoSequenceNumberCounter struct { +type PatternFlowTcpSeqNumCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -87723,23 +89144,23 @@ type PatternFlowIcmpEchoSequenceNumberCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIcmpEchoSequenceNumberCounter) Reset() { - *x = PatternFlowIcmpEchoSequenceNumberCounter{} +func (x *PatternFlowTcpSeqNumCounter) Reset() { + *x = PatternFlowTcpSeqNumCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[785] + mi := &file_otg_proto_msgTypes[770] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoSequenceNumberCounter) String() string { +func (x *PatternFlowTcpSeqNumCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoSequenceNumberCounter) ProtoMessage() {} +func (*PatternFlowTcpSeqNumCounter) ProtoMessage() {} -func (x *PatternFlowIcmpEchoSequenceNumberCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[785] +func (x *PatternFlowTcpSeqNumCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[770] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -87750,26 +89171,26 @@ func (x *PatternFlowIcmpEchoSequenceNumberCounter) ProtoReflect() protoreflect.M return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoSequenceNumberCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoSequenceNumberCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{785} +// Deprecated: Use PatternFlowTcpSeqNumCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpSeqNumCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{770} } -func (x *PatternFlowIcmpEchoSequenceNumberCounter) GetStart() uint32 { +func (x *PatternFlowTcpSeqNumCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowIcmpEchoSequenceNumberCounter) GetStep() uint32 { +func (x *PatternFlowTcpSeqNumCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowIcmpEchoSequenceNumberCounter) GetCount() uint32 { +func (x *PatternFlowTcpSeqNumCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -87779,7 +89200,7 @@ func (x *PatternFlowIcmpEchoSequenceNumberCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowIcmpEchoSequenceNumberMetricTag struct { +type PatternFlowTcpSeqNumMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -87793,27 +89214,27 @@ type PatternFlowIcmpEchoSequenceNumberMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 32 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowIcmpEchoSequenceNumberMetricTag) Reset() { - *x = PatternFlowIcmpEchoSequenceNumberMetricTag{} +func (x *PatternFlowTcpSeqNumMetricTag) Reset() { + *x = PatternFlowTcpSeqNumMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[786] + mi := &file_otg_proto_msgTypes[771] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoSequenceNumberMetricTag) String() string { +func (x *PatternFlowTcpSeqNumMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoSequenceNumberMetricTag) ProtoMessage() {} +func (*PatternFlowTcpSeqNumMetricTag) ProtoMessage() {} -func (x *PatternFlowIcmpEchoSequenceNumberMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[786] +func (x *PatternFlowTcpSeqNumMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[771] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -87824,41 +89245,41 @@ func (x *PatternFlowIcmpEchoSequenceNumberMetricTag) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoSequenceNumberMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoSequenceNumberMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{786} +// Deprecated: Use PatternFlowTcpSeqNumMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpSeqNumMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{771} } -func (x *PatternFlowIcmpEchoSequenceNumberMetricTag) GetName() string { +func (x *PatternFlowTcpSeqNumMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIcmpEchoSequenceNumberMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpSeqNumMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowIcmpEchoSequenceNumberMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpSeqNumMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// ICMP sequence number -type PatternFlowIcmpEchoSequenceNumber struct { +// Sequence number +type PatternFlowTcpSeqNum struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowIcmpEchoSequenceNumber_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpEchoSequenceNumber_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowTcpSeqNum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpSeqNum_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -87866,32 +89287,32 @@ type PatternFlowIcmpEchoSequenceNumber struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowIcmpEchoSequenceNumberCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowTcpSeqNumCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowIcmpEchoSequenceNumberCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowTcpSeqNumCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIcmpEchoSequenceNumberMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowTcpSeqNumMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowIcmpEchoSequenceNumber) Reset() { - *x = PatternFlowIcmpEchoSequenceNumber{} +func (x *PatternFlowTcpSeqNum) Reset() { + *x = PatternFlowTcpSeqNum{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[787] + mi := &file_otg_proto_msgTypes[772] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoSequenceNumber) String() string { +func (x *PatternFlowTcpSeqNum) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoSequenceNumber) ProtoMessage() {} +func (*PatternFlowTcpSeqNum) ProtoMessage() {} -func (x *PatternFlowIcmpEchoSequenceNumber) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[787] +func (x *PatternFlowTcpSeqNum) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[772] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -87902,86 +89323,87 @@ func (x *PatternFlowIcmpEchoSequenceNumber) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoSequenceNumber.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoSequenceNumber) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{787} +// Deprecated: Use PatternFlowTcpSeqNum.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpSeqNum) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{772} } -func (x *PatternFlowIcmpEchoSequenceNumber) GetChoice() PatternFlowIcmpEchoSequenceNumber_Choice_Enum { +func (x *PatternFlowTcpSeqNum) GetChoice() PatternFlowTcpSeqNum_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIcmpEchoSequenceNumber_Choice_unspecified + return PatternFlowTcpSeqNum_Choice_unspecified } -func (x *PatternFlowIcmpEchoSequenceNumber) GetValue() uint32 { +func (x *PatternFlowTcpSeqNum) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowIcmpEchoSequenceNumber) GetValues() []uint32 { +func (x *PatternFlowTcpSeqNum) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowIcmpEchoSequenceNumber) GetIncrement() *PatternFlowIcmpEchoSequenceNumberCounter { +func (x *PatternFlowTcpSeqNum) GetIncrement() *PatternFlowTcpSeqNumCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowIcmpEchoSequenceNumber) GetDecrement() *PatternFlowIcmpEchoSequenceNumberCounter { +func (x *PatternFlowTcpSeqNum) GetDecrement() *PatternFlowTcpSeqNumCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowIcmpEchoSequenceNumber) GetMetricTags() []*PatternFlowIcmpEchoSequenceNumberMetricTag { +func (x *PatternFlowTcpSeqNum) GetMetricTags() []*PatternFlowTcpSeqNumMetricTag { if x != nil { return x.MetricTags } return nil } -// ICMP checksum -type PatternFlowIcmpCommonChecksum struct { +// integer counter pattern +type PatternFlowTcpAckNumCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The type of checksum - // default = Choice.Enum.generated - Choice *PatternFlowIcmpCommonChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpCommonChecksum_Choice_Enum,oneof" json:"choice,omitempty"` - // A system generated checksum value - // default = Generated.Enum.good - Generated *PatternFlowIcmpCommonChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowIcmpCommonChecksum_Generated_Enum,oneof" json:"generated,omitempty"` - // A custom checksum value - Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIcmpCommonChecksum) Reset() { - *x = PatternFlowIcmpCommonChecksum{} +func (x *PatternFlowTcpAckNumCounter) Reset() { + *x = PatternFlowTcpAckNumCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[788] + mi := &file_otg_proto_msgTypes[773] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpCommonChecksum) String() string { +func (x *PatternFlowTcpAckNumCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpCommonChecksum) ProtoMessage() {} +func (*PatternFlowTcpAckNumCounter) ProtoMessage() {} -func (x *PatternFlowIcmpCommonChecksum) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[788] +func (x *PatternFlowTcpAckNumCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[773] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -87992,96 +89414,26 @@ func (x *PatternFlowIcmpCommonChecksum) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpCommonChecksum.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpCommonChecksum) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{788} +// Deprecated: Use PatternFlowTcpAckNumCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpAckNumCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{773} } -func (x *PatternFlowIcmpCommonChecksum) GetChoice() PatternFlowIcmpCommonChecksum_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIcmpCommonChecksum_Choice_unspecified -} - -func (x *PatternFlowIcmpCommonChecksum) GetGenerated() PatternFlowIcmpCommonChecksum_Generated_Enum { - if x != nil && x.Generated != nil { - return *x.Generated - } - return PatternFlowIcmpCommonChecksum_Generated_unspecified -} - -func (x *PatternFlowIcmpCommonChecksum) GetCustom() uint32 { - if x != nil && x.Custom != nil { - return *x.Custom - } - return 0 -} - -// integer counter pattern -type PatternFlowIcmpNextFieldsIdentifierCounter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` -} - -func (x *PatternFlowIcmpNextFieldsIdentifierCounter) Reset() { - *x = PatternFlowIcmpNextFieldsIdentifierCounter{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[789] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PatternFlowIcmpNextFieldsIdentifierCounter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatternFlowIcmpNextFieldsIdentifierCounter) ProtoMessage() {} - -func (x *PatternFlowIcmpNextFieldsIdentifierCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[789] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PatternFlowIcmpNextFieldsIdentifierCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpNextFieldsIdentifierCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{789} -} - -func (x *PatternFlowIcmpNextFieldsIdentifierCounter) GetStart() uint32 { +func (x *PatternFlowTcpAckNumCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowIcmpNextFieldsIdentifierCounter) GetStep() uint32 { +func (x *PatternFlowTcpAckNumCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowIcmpNextFieldsIdentifierCounter) GetCount() uint32 { +func (x *PatternFlowTcpAckNumCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -88091,7 +89443,7 @@ func (x *PatternFlowIcmpNextFieldsIdentifierCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowIcmpNextFieldsIdentifierMetricTag struct { +type PatternFlowTcpAckNumMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -88105,27 +89457,27 @@ type PatternFlowIcmpNextFieldsIdentifierMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 32 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowIcmpNextFieldsIdentifierMetricTag) Reset() { - *x = PatternFlowIcmpNextFieldsIdentifierMetricTag{} +func (x *PatternFlowTcpAckNumMetricTag) Reset() { + *x = PatternFlowTcpAckNumMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[790] + mi := &file_otg_proto_msgTypes[774] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpNextFieldsIdentifierMetricTag) String() string { +func (x *PatternFlowTcpAckNumMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpNextFieldsIdentifierMetricTag) ProtoMessage() {} +func (*PatternFlowTcpAckNumMetricTag) ProtoMessage() {} -func (x *PatternFlowIcmpNextFieldsIdentifierMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[790] +func (x *PatternFlowTcpAckNumMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[774] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -88136,41 +89488,41 @@ func (x *PatternFlowIcmpNextFieldsIdentifierMetricTag) ProtoReflect() protorefle return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpNextFieldsIdentifierMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpNextFieldsIdentifierMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{790} +// Deprecated: Use PatternFlowTcpAckNumMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpAckNumMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{774} } -func (x *PatternFlowIcmpNextFieldsIdentifierMetricTag) GetName() string { +func (x *PatternFlowTcpAckNumMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIcmpNextFieldsIdentifierMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpAckNumMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowIcmpNextFieldsIdentifierMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpAckNumMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// ICMP identifier -type PatternFlowIcmpNextFieldsIdentifier struct { +// Acknowledgement number +type PatternFlowTcpAckNum struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowIcmpNextFieldsIdentifier_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpNextFieldsIdentifier_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowTcpAckNum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpAckNum_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -88178,32 +89530,32 @@ type PatternFlowIcmpNextFieldsIdentifier struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowIcmpNextFieldsIdentifierCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowTcpAckNumCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowIcmpNextFieldsIdentifierCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowTcpAckNumCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIcmpNextFieldsIdentifierMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowTcpAckNumMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowIcmpNextFieldsIdentifier) Reset() { - *x = PatternFlowIcmpNextFieldsIdentifier{} +func (x *PatternFlowTcpAckNum) Reset() { + *x = PatternFlowTcpAckNum{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[791] + mi := &file_otg_proto_msgTypes[775] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpNextFieldsIdentifier) String() string { +func (x *PatternFlowTcpAckNum) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpNextFieldsIdentifier) ProtoMessage() {} +func (*PatternFlowTcpAckNum) ProtoMessage() {} -func (x *PatternFlowIcmpNextFieldsIdentifier) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[791] +func (x *PatternFlowTcpAckNum) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[775] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -88214,47 +89566,47 @@ func (x *PatternFlowIcmpNextFieldsIdentifier) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpNextFieldsIdentifier.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpNextFieldsIdentifier) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{791} +// Deprecated: Use PatternFlowTcpAckNum.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpAckNum) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{775} } -func (x *PatternFlowIcmpNextFieldsIdentifier) GetChoice() PatternFlowIcmpNextFieldsIdentifier_Choice_Enum { +func (x *PatternFlowTcpAckNum) GetChoice() PatternFlowTcpAckNum_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIcmpNextFieldsIdentifier_Choice_unspecified + return PatternFlowTcpAckNum_Choice_unspecified } -func (x *PatternFlowIcmpNextFieldsIdentifier) GetValue() uint32 { +func (x *PatternFlowTcpAckNum) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowIcmpNextFieldsIdentifier) GetValues() []uint32 { +func (x *PatternFlowTcpAckNum) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowIcmpNextFieldsIdentifier) GetIncrement() *PatternFlowIcmpNextFieldsIdentifierCounter { +func (x *PatternFlowTcpAckNum) GetIncrement() *PatternFlowTcpAckNumCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowIcmpNextFieldsIdentifier) GetDecrement() *PatternFlowIcmpNextFieldsIdentifierCounter { +func (x *PatternFlowTcpAckNum) GetDecrement() *PatternFlowTcpAckNumCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowIcmpNextFieldsIdentifier) GetMetricTags() []*PatternFlowIcmpNextFieldsIdentifierMetricTag { +func (x *PatternFlowTcpAckNum) GetMetricTags() []*PatternFlowTcpAckNumMetricTag { if x != nil { return x.MetricTags } @@ -88262,7 +89614,7 @@ func (x *PatternFlowIcmpNextFieldsIdentifier) GetMetricTags() []*PatternFlowIcmp } // integer counter pattern -type PatternFlowIcmpNextFieldsSequenceNumberCounter struct { +type PatternFlowTcpDataOffsetCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -88278,23 +89630,23 @@ type PatternFlowIcmpNextFieldsSequenceNumberCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIcmpNextFieldsSequenceNumberCounter) Reset() { - *x = PatternFlowIcmpNextFieldsSequenceNumberCounter{} +func (x *PatternFlowTcpDataOffsetCounter) Reset() { + *x = PatternFlowTcpDataOffsetCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[792] + mi := &file_otg_proto_msgTypes[776] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpNextFieldsSequenceNumberCounter) String() string { +func (x *PatternFlowTcpDataOffsetCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpNextFieldsSequenceNumberCounter) ProtoMessage() {} +func (*PatternFlowTcpDataOffsetCounter) ProtoMessage() {} -func (x *PatternFlowIcmpNextFieldsSequenceNumberCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[792] +func (x *PatternFlowTcpDataOffsetCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[776] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -88305,26 +89657,26 @@ func (x *PatternFlowIcmpNextFieldsSequenceNumberCounter) ProtoReflect() protoref return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpNextFieldsSequenceNumberCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpNextFieldsSequenceNumberCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{792} +// Deprecated: Use PatternFlowTcpDataOffsetCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpDataOffsetCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{776} } -func (x *PatternFlowIcmpNextFieldsSequenceNumberCounter) GetStart() uint32 { +func (x *PatternFlowTcpDataOffsetCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowIcmpNextFieldsSequenceNumberCounter) GetStep() uint32 { +func (x *PatternFlowTcpDataOffsetCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowIcmpNextFieldsSequenceNumberCounter) GetCount() uint32 { +func (x *PatternFlowTcpDataOffsetCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -88334,7 +89686,7 @@ func (x *PatternFlowIcmpNextFieldsSequenceNumberCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowIcmpNextFieldsSequenceNumberMetricTag struct { +type PatternFlowTcpDataOffsetMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -88348,27 +89700,27 @@ type PatternFlowIcmpNextFieldsSequenceNumberMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 4 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowIcmpNextFieldsSequenceNumberMetricTag) Reset() { - *x = PatternFlowIcmpNextFieldsSequenceNumberMetricTag{} +func (x *PatternFlowTcpDataOffsetMetricTag) Reset() { + *x = PatternFlowTcpDataOffsetMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[793] + mi := &file_otg_proto_msgTypes[777] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpNextFieldsSequenceNumberMetricTag) String() string { +func (x *PatternFlowTcpDataOffsetMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpNextFieldsSequenceNumberMetricTag) ProtoMessage() {} +func (*PatternFlowTcpDataOffsetMetricTag) ProtoMessage() {} -func (x *PatternFlowIcmpNextFieldsSequenceNumberMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[793] +func (x *PatternFlowTcpDataOffsetMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[777] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -88379,41 +89731,41 @@ func (x *PatternFlowIcmpNextFieldsSequenceNumberMetricTag) ProtoReflect() protor return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpNextFieldsSequenceNumberMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpNextFieldsSequenceNumberMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{793} +// Deprecated: Use PatternFlowTcpDataOffsetMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpDataOffsetMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{777} } -func (x *PatternFlowIcmpNextFieldsSequenceNumberMetricTag) GetName() string { +func (x *PatternFlowTcpDataOffsetMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIcmpNextFieldsSequenceNumberMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpDataOffsetMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowIcmpNextFieldsSequenceNumberMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpDataOffsetMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// ICMP sequence number -type PatternFlowIcmpNextFieldsSequenceNumber struct { +// The number of 32 bit words in the TCP header. This indicates where the data begins. +type PatternFlowTcpDataOffset struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowTcpDataOffset_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpDataOffset_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -88421,32 +89773,32 @@ type PatternFlowIcmpNextFieldsSequenceNumber struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowIcmpNextFieldsSequenceNumberCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowTcpDataOffsetCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowIcmpNextFieldsSequenceNumberCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowTcpDataOffsetCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIcmpNextFieldsSequenceNumberMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowTcpDataOffsetMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowIcmpNextFieldsSequenceNumber) Reset() { - *x = PatternFlowIcmpNextFieldsSequenceNumber{} +func (x *PatternFlowTcpDataOffset) Reset() { + *x = PatternFlowTcpDataOffset{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[794] + mi := &file_otg_proto_msgTypes[778] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpNextFieldsSequenceNumber) String() string { +func (x *PatternFlowTcpDataOffset) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpNextFieldsSequenceNumber) ProtoMessage() {} +func (*PatternFlowTcpDataOffset) ProtoMessage() {} -func (x *PatternFlowIcmpNextFieldsSequenceNumber) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[794] +func (x *PatternFlowTcpDataOffset) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[778] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -88457,47 +89809,47 @@ func (x *PatternFlowIcmpNextFieldsSequenceNumber) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpNextFieldsSequenceNumber.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpNextFieldsSequenceNumber) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{794} +// Deprecated: Use PatternFlowTcpDataOffset.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpDataOffset) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{778} } -func (x *PatternFlowIcmpNextFieldsSequenceNumber) GetChoice() PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum { +func (x *PatternFlowTcpDataOffset) GetChoice() PatternFlowTcpDataOffset_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIcmpNextFieldsSequenceNumber_Choice_unspecified + return PatternFlowTcpDataOffset_Choice_unspecified } -func (x *PatternFlowIcmpNextFieldsSequenceNumber) GetValue() uint32 { +func (x *PatternFlowTcpDataOffset) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowIcmpNextFieldsSequenceNumber) GetValues() []uint32 { +func (x *PatternFlowTcpDataOffset) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowIcmpNextFieldsSequenceNumber) GetIncrement() *PatternFlowIcmpNextFieldsSequenceNumberCounter { +func (x *PatternFlowTcpDataOffset) GetIncrement() *PatternFlowTcpDataOffsetCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowIcmpNextFieldsSequenceNumber) GetDecrement() *PatternFlowIcmpNextFieldsSequenceNumberCounter { +func (x *PatternFlowTcpDataOffset) GetDecrement() *PatternFlowTcpDataOffsetCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowIcmpNextFieldsSequenceNumber) GetMetricTags() []*PatternFlowIcmpNextFieldsSequenceNumberMetricTag { +func (x *PatternFlowTcpDataOffset) GetMetricTags() []*PatternFlowTcpDataOffsetMetricTag { if x != nil { return x.MetricTags } @@ -88505,13 +89857,13 @@ func (x *PatternFlowIcmpNextFieldsSequenceNumber) GetMetricTags() []*PatternFlow } // integer counter pattern -type PatternFlowIcmpv6EchoTypeCounter struct { +type PatternFlowTcpEcnNsCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 128 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -88521,23 +89873,23 @@ type PatternFlowIcmpv6EchoTypeCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIcmpv6EchoTypeCounter) Reset() { - *x = PatternFlowIcmpv6EchoTypeCounter{} +func (x *PatternFlowTcpEcnNsCounter) Reset() { + *x = PatternFlowTcpEcnNsCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[795] + mi := &file_otg_proto_msgTypes[779] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoTypeCounter) String() string { +func (x *PatternFlowTcpEcnNsCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoTypeCounter) ProtoMessage() {} +func (*PatternFlowTcpEcnNsCounter) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoTypeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[795] +func (x *PatternFlowTcpEcnNsCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[779] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -88548,26 +89900,26 @@ func (x *PatternFlowIcmpv6EchoTypeCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoTypeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoTypeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{795} +// Deprecated: Use PatternFlowTcpEcnNsCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpEcnNsCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{779} } -func (x *PatternFlowIcmpv6EchoTypeCounter) GetStart() uint32 { +func (x *PatternFlowTcpEcnNsCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowIcmpv6EchoTypeCounter) GetStep() uint32 { +func (x *PatternFlowTcpEcnNsCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowIcmpv6EchoTypeCounter) GetCount() uint32 { +func (x *PatternFlowTcpEcnNsCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -88577,7 +89929,7 @@ func (x *PatternFlowIcmpv6EchoTypeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowIcmpv6EchoTypeMetricTag struct { +type PatternFlowTcpEcnNsMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -88591,27 +89943,27 @@ type PatternFlowIcmpv6EchoTypeMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 1 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowIcmpv6EchoTypeMetricTag) Reset() { - *x = PatternFlowIcmpv6EchoTypeMetricTag{} +func (x *PatternFlowTcpEcnNsMetricTag) Reset() { + *x = PatternFlowTcpEcnNsMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[796] + mi := &file_otg_proto_msgTypes[780] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoTypeMetricTag) String() string { +func (x *PatternFlowTcpEcnNsMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoTypeMetricTag) ProtoMessage() {} +func (*PatternFlowTcpEcnNsMetricTag) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoTypeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[796] +func (x *PatternFlowTcpEcnNsMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[780] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -88622,74 +89974,74 @@ func (x *PatternFlowIcmpv6EchoTypeMetricTag) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoTypeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoTypeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{796} +// Deprecated: Use PatternFlowTcpEcnNsMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpEcnNsMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{780} } -func (x *PatternFlowIcmpv6EchoTypeMetricTag) GetName() string { +func (x *PatternFlowTcpEcnNsMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIcmpv6EchoTypeMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpEcnNsMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowIcmpv6EchoTypeMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpEcnNsMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// ICMPv6 echo type -type PatternFlowIcmpv6EchoType struct { +// Explicit congestion notification, concealment protection. +type PatternFlowTcpEcnNs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowIcmpv6EchoType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpv6EchoType_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowTcpEcnNs_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpEcnNs_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 128 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [128] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowIcmpv6EchoTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowTcpEcnNsCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowIcmpv6EchoTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowTcpEcnNsCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIcmpv6EchoTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowTcpEcnNsMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowIcmpv6EchoType) Reset() { - *x = PatternFlowIcmpv6EchoType{} +func (x *PatternFlowTcpEcnNs) Reset() { + *x = PatternFlowTcpEcnNs{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[797] + mi := &file_otg_proto_msgTypes[781] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoType) String() string { +func (x *PatternFlowTcpEcnNs) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoType) ProtoMessage() {} +func (*PatternFlowTcpEcnNs) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[797] +func (x *PatternFlowTcpEcnNs) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[781] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -88700,47 +90052,47 @@ func (x *PatternFlowIcmpv6EchoType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoType.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{797} +// Deprecated: Use PatternFlowTcpEcnNs.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpEcnNs) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{781} } -func (x *PatternFlowIcmpv6EchoType) GetChoice() PatternFlowIcmpv6EchoType_Choice_Enum { +func (x *PatternFlowTcpEcnNs) GetChoice() PatternFlowTcpEcnNs_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIcmpv6EchoType_Choice_unspecified + return PatternFlowTcpEcnNs_Choice_unspecified } -func (x *PatternFlowIcmpv6EchoType) GetValue() uint32 { +func (x *PatternFlowTcpEcnNs) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowIcmpv6EchoType) GetValues() []uint32 { +func (x *PatternFlowTcpEcnNs) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowIcmpv6EchoType) GetIncrement() *PatternFlowIcmpv6EchoTypeCounter { +func (x *PatternFlowTcpEcnNs) GetIncrement() *PatternFlowTcpEcnNsCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowIcmpv6EchoType) GetDecrement() *PatternFlowIcmpv6EchoTypeCounter { +func (x *PatternFlowTcpEcnNs) GetDecrement() *PatternFlowTcpEcnNsCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowIcmpv6EchoType) GetMetricTags() []*PatternFlowIcmpv6EchoTypeMetricTag { +func (x *PatternFlowTcpEcnNs) GetMetricTags() []*PatternFlowTcpEcnNsMetricTag { if x != nil { return x.MetricTags } @@ -88748,7 +90100,7 @@ func (x *PatternFlowIcmpv6EchoType) GetMetricTags() []*PatternFlowIcmpv6EchoType } // integer counter pattern -type PatternFlowIcmpv6EchoCodeCounter struct { +type PatternFlowTcpEcnCwrCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -88764,23 +90116,23 @@ type PatternFlowIcmpv6EchoCodeCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIcmpv6EchoCodeCounter) Reset() { - *x = PatternFlowIcmpv6EchoCodeCounter{} +func (x *PatternFlowTcpEcnCwrCounter) Reset() { + *x = PatternFlowTcpEcnCwrCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[798] + mi := &file_otg_proto_msgTypes[782] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoCodeCounter) String() string { +func (x *PatternFlowTcpEcnCwrCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoCodeCounter) ProtoMessage() {} +func (*PatternFlowTcpEcnCwrCounter) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoCodeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[798] +func (x *PatternFlowTcpEcnCwrCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[782] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -88791,26 +90143,26 @@ func (x *PatternFlowIcmpv6EchoCodeCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoCodeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoCodeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{798} +// Deprecated: Use PatternFlowTcpEcnCwrCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpEcnCwrCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{782} } -func (x *PatternFlowIcmpv6EchoCodeCounter) GetStart() uint32 { +func (x *PatternFlowTcpEcnCwrCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowIcmpv6EchoCodeCounter) GetStep() uint32 { +func (x *PatternFlowTcpEcnCwrCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowIcmpv6EchoCodeCounter) GetCount() uint32 { +func (x *PatternFlowTcpEcnCwrCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -88820,7 +90172,7 @@ func (x *PatternFlowIcmpv6EchoCodeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowIcmpv6EchoCodeMetricTag struct { +type PatternFlowTcpEcnCwrMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -88834,27 +90186,27 @@ type PatternFlowIcmpv6EchoCodeMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 1 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowIcmpv6EchoCodeMetricTag) Reset() { - *x = PatternFlowIcmpv6EchoCodeMetricTag{} +func (x *PatternFlowTcpEcnCwrMetricTag) Reset() { + *x = PatternFlowTcpEcnCwrMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[799] + mi := &file_otg_proto_msgTypes[783] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoCodeMetricTag) String() string { +func (x *PatternFlowTcpEcnCwrMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoCodeMetricTag) ProtoMessage() {} +func (*PatternFlowTcpEcnCwrMetricTag) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoCodeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[799] +func (x *PatternFlowTcpEcnCwrMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[783] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -88865,41 +90217,41 @@ func (x *PatternFlowIcmpv6EchoCodeMetricTag) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoCodeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoCodeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{799} +// Deprecated: Use PatternFlowTcpEcnCwrMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpEcnCwrMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{783} } -func (x *PatternFlowIcmpv6EchoCodeMetricTag) GetName() string { +func (x *PatternFlowTcpEcnCwrMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIcmpv6EchoCodeMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpEcnCwrMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowIcmpv6EchoCodeMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpEcnCwrMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// ICMPv6 echo sub type -type PatternFlowIcmpv6EchoCode struct { +// Explicit congestion notification, congestion window reduced. +type PatternFlowTcpEcnCwr struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowIcmpv6EchoCode_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpv6EchoCode_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowTcpEcnCwr_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpEcnCwr_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -88907,32 +90259,32 @@ type PatternFlowIcmpv6EchoCode struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowIcmpv6EchoCodeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowTcpEcnCwrCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowIcmpv6EchoCodeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowTcpEcnCwrCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIcmpv6EchoCodeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowTcpEcnCwrMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowIcmpv6EchoCode) Reset() { - *x = PatternFlowIcmpv6EchoCode{} +func (x *PatternFlowTcpEcnCwr) Reset() { + *x = PatternFlowTcpEcnCwr{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[800] + mi := &file_otg_proto_msgTypes[784] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoCode) String() string { +func (x *PatternFlowTcpEcnCwr) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoCode) ProtoMessage() {} +func (*PatternFlowTcpEcnCwr) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoCode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[800] +func (x *PatternFlowTcpEcnCwr) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[784] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -88943,47 +90295,47 @@ func (x *PatternFlowIcmpv6EchoCode) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoCode.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoCode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{800} +// Deprecated: Use PatternFlowTcpEcnCwr.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpEcnCwr) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{784} } -func (x *PatternFlowIcmpv6EchoCode) GetChoice() PatternFlowIcmpv6EchoCode_Choice_Enum { +func (x *PatternFlowTcpEcnCwr) GetChoice() PatternFlowTcpEcnCwr_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIcmpv6EchoCode_Choice_unspecified + return PatternFlowTcpEcnCwr_Choice_unspecified } -func (x *PatternFlowIcmpv6EchoCode) GetValue() uint32 { +func (x *PatternFlowTcpEcnCwr) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowIcmpv6EchoCode) GetValues() []uint32 { +func (x *PatternFlowTcpEcnCwr) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowIcmpv6EchoCode) GetIncrement() *PatternFlowIcmpv6EchoCodeCounter { +func (x *PatternFlowTcpEcnCwr) GetIncrement() *PatternFlowTcpEcnCwrCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowIcmpv6EchoCode) GetDecrement() *PatternFlowIcmpv6EchoCodeCounter { +func (x *PatternFlowTcpEcnCwr) GetDecrement() *PatternFlowTcpEcnCwrCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowIcmpv6EchoCode) GetMetricTags() []*PatternFlowIcmpv6EchoCodeMetricTag { +func (x *PatternFlowTcpEcnCwr) GetMetricTags() []*PatternFlowTcpEcnCwrMetricTag { if x != nil { return x.MetricTags } @@ -88991,7 +90343,7 @@ func (x *PatternFlowIcmpv6EchoCode) GetMetricTags() []*PatternFlowIcmpv6EchoCode } // integer counter pattern -type PatternFlowIcmpv6EchoIdentifierCounter struct { +type PatternFlowTcpEcnEchoCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -89007,23 +90359,23 @@ type PatternFlowIcmpv6EchoIdentifierCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIcmpv6EchoIdentifierCounter) Reset() { - *x = PatternFlowIcmpv6EchoIdentifierCounter{} +func (x *PatternFlowTcpEcnEchoCounter) Reset() { + *x = PatternFlowTcpEcnEchoCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[801] + mi := &file_otg_proto_msgTypes[785] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoIdentifierCounter) String() string { +func (x *PatternFlowTcpEcnEchoCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoIdentifierCounter) ProtoMessage() {} +func (*PatternFlowTcpEcnEchoCounter) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoIdentifierCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[801] +func (x *PatternFlowTcpEcnEchoCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[785] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -89034,26 +90386,26 @@ func (x *PatternFlowIcmpv6EchoIdentifierCounter) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoIdentifierCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoIdentifierCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{801} +// Deprecated: Use PatternFlowTcpEcnEchoCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpEcnEchoCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{785} } -func (x *PatternFlowIcmpv6EchoIdentifierCounter) GetStart() uint32 { +func (x *PatternFlowTcpEcnEchoCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowIcmpv6EchoIdentifierCounter) GetStep() uint32 { +func (x *PatternFlowTcpEcnEchoCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowIcmpv6EchoIdentifierCounter) GetCount() uint32 { +func (x *PatternFlowTcpEcnEchoCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -89063,7 +90415,7 @@ func (x *PatternFlowIcmpv6EchoIdentifierCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowIcmpv6EchoIdentifierMetricTag struct { +type PatternFlowTcpEcnEchoMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -89077,27 +90429,27 @@ type PatternFlowIcmpv6EchoIdentifierMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 1 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowIcmpv6EchoIdentifierMetricTag) Reset() { - *x = PatternFlowIcmpv6EchoIdentifierMetricTag{} +func (x *PatternFlowTcpEcnEchoMetricTag) Reset() { + *x = PatternFlowTcpEcnEchoMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[802] + mi := &file_otg_proto_msgTypes[786] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoIdentifierMetricTag) String() string { +func (x *PatternFlowTcpEcnEchoMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoIdentifierMetricTag) ProtoMessage() {} +func (*PatternFlowTcpEcnEchoMetricTag) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoIdentifierMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[802] +func (x *PatternFlowTcpEcnEchoMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[786] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -89108,41 +90460,42 @@ func (x *PatternFlowIcmpv6EchoIdentifierMetricTag) ProtoReflect() protoreflect.M return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoIdentifierMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoIdentifierMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{802} +// Deprecated: Use PatternFlowTcpEcnEchoMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpEcnEchoMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{786} } -func (x *PatternFlowIcmpv6EchoIdentifierMetricTag) GetName() string { +func (x *PatternFlowTcpEcnEchoMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIcmpv6EchoIdentifierMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpEcnEchoMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowIcmpv6EchoIdentifierMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpEcnEchoMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// ICMPv6 echo identifier -type PatternFlowIcmpv6EchoIdentifier struct { +// Explicit congestion notification, echo. 1 indicates the peer is ecn capable. 0 indicates +// that a packet with ipv4.ecn = 11 in the ip header was received during normal transmission. +type PatternFlowTcpEcnEcho struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowIcmpv6EchoIdentifier_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpv6EchoIdentifier_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowTcpEcnEcho_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpEcnEcho_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -89150,32 +90503,32 @@ type PatternFlowIcmpv6EchoIdentifier struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowIcmpv6EchoIdentifierCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowTcpEcnEchoCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowIcmpv6EchoIdentifierCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowTcpEcnEchoCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIcmpv6EchoIdentifierMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowTcpEcnEchoMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowIcmpv6EchoIdentifier) Reset() { - *x = PatternFlowIcmpv6EchoIdentifier{} +func (x *PatternFlowTcpEcnEcho) Reset() { + *x = PatternFlowTcpEcnEcho{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[803] + mi := &file_otg_proto_msgTypes[787] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoIdentifier) String() string { +func (x *PatternFlowTcpEcnEcho) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoIdentifier) ProtoMessage() {} +func (*PatternFlowTcpEcnEcho) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoIdentifier) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[803] +func (x *PatternFlowTcpEcnEcho) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[787] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -89186,47 +90539,47 @@ func (x *PatternFlowIcmpv6EchoIdentifier) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoIdentifier.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoIdentifier) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{803} +// Deprecated: Use PatternFlowTcpEcnEcho.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpEcnEcho) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{787} } -func (x *PatternFlowIcmpv6EchoIdentifier) GetChoice() PatternFlowIcmpv6EchoIdentifier_Choice_Enum { +func (x *PatternFlowTcpEcnEcho) GetChoice() PatternFlowTcpEcnEcho_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIcmpv6EchoIdentifier_Choice_unspecified + return PatternFlowTcpEcnEcho_Choice_unspecified } -func (x *PatternFlowIcmpv6EchoIdentifier) GetValue() uint32 { +func (x *PatternFlowTcpEcnEcho) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowIcmpv6EchoIdentifier) GetValues() []uint32 { +func (x *PatternFlowTcpEcnEcho) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowIcmpv6EchoIdentifier) GetIncrement() *PatternFlowIcmpv6EchoIdentifierCounter { +func (x *PatternFlowTcpEcnEcho) GetIncrement() *PatternFlowTcpEcnEchoCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowIcmpv6EchoIdentifier) GetDecrement() *PatternFlowIcmpv6EchoIdentifierCounter { +func (x *PatternFlowTcpEcnEcho) GetDecrement() *PatternFlowTcpEcnEchoCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowIcmpv6EchoIdentifier) GetMetricTags() []*PatternFlowIcmpv6EchoIdentifierMetricTag { +func (x *PatternFlowTcpEcnEcho) GetMetricTags() []*PatternFlowTcpEcnEchoMetricTag { if x != nil { return x.MetricTags } @@ -89234,7 +90587,7 @@ func (x *PatternFlowIcmpv6EchoIdentifier) GetMetricTags() []*PatternFlowIcmpv6Ec } // integer counter pattern -type PatternFlowIcmpv6EchoSequenceNumberCounter struct { +type PatternFlowTcpCtlUrgCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -89250,23 +90603,23 @@ type PatternFlowIcmpv6EchoSequenceNumberCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIcmpv6EchoSequenceNumberCounter) Reset() { - *x = PatternFlowIcmpv6EchoSequenceNumberCounter{} +func (x *PatternFlowTcpCtlUrgCounter) Reset() { + *x = PatternFlowTcpCtlUrgCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[804] + mi := &file_otg_proto_msgTypes[788] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoSequenceNumberCounter) String() string { +func (x *PatternFlowTcpCtlUrgCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoSequenceNumberCounter) ProtoMessage() {} +func (*PatternFlowTcpCtlUrgCounter) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoSequenceNumberCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[804] +func (x *PatternFlowTcpCtlUrgCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[788] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -89277,26 +90630,26 @@ func (x *PatternFlowIcmpv6EchoSequenceNumberCounter) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoSequenceNumberCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoSequenceNumberCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{804} +// Deprecated: Use PatternFlowTcpCtlUrgCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlUrgCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{788} } -func (x *PatternFlowIcmpv6EchoSequenceNumberCounter) GetStart() uint32 { +func (x *PatternFlowTcpCtlUrgCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowIcmpv6EchoSequenceNumberCounter) GetStep() uint32 { +func (x *PatternFlowTcpCtlUrgCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowIcmpv6EchoSequenceNumberCounter) GetCount() uint32 { +func (x *PatternFlowTcpCtlUrgCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -89306,7 +90659,7 @@ func (x *PatternFlowIcmpv6EchoSequenceNumberCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowIcmpv6EchoSequenceNumberMetricTag struct { +type PatternFlowTcpCtlUrgMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -89320,27 +90673,27 @@ type PatternFlowIcmpv6EchoSequenceNumberMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 1 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowIcmpv6EchoSequenceNumberMetricTag) Reset() { - *x = PatternFlowIcmpv6EchoSequenceNumberMetricTag{} +func (x *PatternFlowTcpCtlUrgMetricTag) Reset() { + *x = PatternFlowTcpCtlUrgMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[805] + mi := &file_otg_proto_msgTypes[789] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoSequenceNumberMetricTag) String() string { +func (x *PatternFlowTcpCtlUrgMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoSequenceNumberMetricTag) ProtoMessage() {} +func (*PatternFlowTcpCtlUrgMetricTag) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoSequenceNumberMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[805] +func (x *PatternFlowTcpCtlUrgMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[789] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -89351,41 +90704,41 @@ func (x *PatternFlowIcmpv6EchoSequenceNumberMetricTag) ProtoReflect() protorefle return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoSequenceNumberMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoSequenceNumberMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{805} +// Deprecated: Use PatternFlowTcpCtlUrgMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlUrgMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{789} } -func (x *PatternFlowIcmpv6EchoSequenceNumberMetricTag) GetName() string { +func (x *PatternFlowTcpCtlUrgMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIcmpv6EchoSequenceNumberMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpCtlUrgMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowIcmpv6EchoSequenceNumberMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpCtlUrgMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// ICMPv6 echo sequence number -type PatternFlowIcmpv6EchoSequenceNumber struct { +// A value of 1 indicates that the urgent pointer field is significant. +type PatternFlowTcpCtlUrg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowTcpCtlUrg_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpCtlUrg_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -89393,32 +90746,32 @@ type PatternFlowIcmpv6EchoSequenceNumber struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowIcmpv6EchoSequenceNumberCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowTcpCtlUrgCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowIcmpv6EchoSequenceNumberCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowTcpCtlUrgCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIcmpv6EchoSequenceNumberMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowTcpCtlUrgMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowIcmpv6EchoSequenceNumber) Reset() { - *x = PatternFlowIcmpv6EchoSequenceNumber{} +func (x *PatternFlowTcpCtlUrg) Reset() { + *x = PatternFlowTcpCtlUrg{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[806] + mi := &file_otg_proto_msgTypes[790] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoSequenceNumber) String() string { +func (x *PatternFlowTcpCtlUrg) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoSequenceNumber) ProtoMessage() {} +func (*PatternFlowTcpCtlUrg) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoSequenceNumber) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[806] +func (x *PatternFlowTcpCtlUrg) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[790] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -89429,199 +90782,61 @@ func (x *PatternFlowIcmpv6EchoSequenceNumber) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoSequenceNumber.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoSequenceNumber) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{806} +// Deprecated: Use PatternFlowTcpCtlUrg.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlUrg) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{790} } -func (x *PatternFlowIcmpv6EchoSequenceNumber) GetChoice() PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum { +func (x *PatternFlowTcpCtlUrg) GetChoice() PatternFlowTcpCtlUrg_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIcmpv6EchoSequenceNumber_Choice_unspecified + return PatternFlowTcpCtlUrg_Choice_unspecified } -func (x *PatternFlowIcmpv6EchoSequenceNumber) GetValue() uint32 { +func (x *PatternFlowTcpCtlUrg) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowIcmpv6EchoSequenceNumber) GetValues() []uint32 { +func (x *PatternFlowTcpCtlUrg) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowIcmpv6EchoSequenceNumber) GetIncrement() *PatternFlowIcmpv6EchoSequenceNumberCounter { +func (x *PatternFlowTcpCtlUrg) GetIncrement() *PatternFlowTcpCtlUrgCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowIcmpv6EchoSequenceNumber) GetDecrement() *PatternFlowIcmpv6EchoSequenceNumberCounter { +func (x *PatternFlowTcpCtlUrg) GetDecrement() *PatternFlowTcpCtlUrgCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowIcmpv6EchoSequenceNumber) GetMetricTags() []*PatternFlowIcmpv6EchoSequenceNumberMetricTag { +func (x *PatternFlowTcpCtlUrg) GetMetricTags() []*PatternFlowTcpCtlUrgMetricTag { if x != nil { return x.MetricTags } return nil } -// ICMPv6 checksum -type PatternFlowIcmpv6EchoChecksum struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The type of checksum - // default = Choice.Enum.generated - Choice *PatternFlowIcmpv6EchoChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpv6EchoChecksum_Choice_Enum,oneof" json:"choice,omitempty"` - // A system generated checksum value - // default = Generated.Enum.good - Generated *PatternFlowIcmpv6EchoChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowIcmpv6EchoChecksum_Generated_Enum,oneof" json:"generated,omitempty"` - // A custom checksum value - Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` -} - -func (x *PatternFlowIcmpv6EchoChecksum) Reset() { - *x = PatternFlowIcmpv6EchoChecksum{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[807] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PatternFlowIcmpv6EchoChecksum) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatternFlowIcmpv6EchoChecksum) ProtoMessage() {} - -func (x *PatternFlowIcmpv6EchoChecksum) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[807] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PatternFlowIcmpv6EchoChecksum.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoChecksum) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{807} -} - -func (x *PatternFlowIcmpv6EchoChecksum) GetChoice() PatternFlowIcmpv6EchoChecksum_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIcmpv6EchoChecksum_Choice_unspecified -} - -func (x *PatternFlowIcmpv6EchoChecksum) GetGenerated() PatternFlowIcmpv6EchoChecksum_Generated_Enum { - if x != nil && x.Generated != nil { - return *x.Generated - } - return PatternFlowIcmpv6EchoChecksum_Generated_unspecified -} - -func (x *PatternFlowIcmpv6EchoChecksum) GetCustom() uint32 { - if x != nil && x.Custom != nil { - return *x.Custom - } - return 0 -} - -// ICMPv6 checksum -type PatternFlowIcmpv6CommonChecksum struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The type of checksum - // default = Choice.Enum.generated - Choice *PatternFlowIcmpv6CommonChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpv6CommonChecksum_Choice_Enum,oneof" json:"choice,omitempty"` - // A system generated checksum value - // default = Generated.Enum.good - Generated *PatternFlowIcmpv6CommonChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowIcmpv6CommonChecksum_Generated_Enum,oneof" json:"generated,omitempty"` - // A custom checksum value - Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` -} - -func (x *PatternFlowIcmpv6CommonChecksum) Reset() { - *x = PatternFlowIcmpv6CommonChecksum{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[808] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PatternFlowIcmpv6CommonChecksum) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatternFlowIcmpv6CommonChecksum) ProtoMessage() {} - -func (x *PatternFlowIcmpv6CommonChecksum) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[808] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PatternFlowIcmpv6CommonChecksum.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6CommonChecksum) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{808} -} - -func (x *PatternFlowIcmpv6CommonChecksum) GetChoice() PatternFlowIcmpv6CommonChecksum_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowIcmpv6CommonChecksum_Choice_unspecified -} - -func (x *PatternFlowIcmpv6CommonChecksum) GetGenerated() PatternFlowIcmpv6CommonChecksum_Generated_Enum { - if x != nil && x.Generated != nil { - return *x.Generated - } - return PatternFlowIcmpv6CommonChecksum_Generated_unspecified -} - -func (x *PatternFlowIcmpv6CommonChecksum) GetCustom() uint32 { - if x != nil && x.Custom != nil { - return *x.Custom - } - return 0 -} - // integer counter pattern -type PatternFlowPppAddressCounter struct { +type PatternFlowTcpCtlAckCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 255 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -89631,23 +90846,23 @@ type PatternFlowPppAddressCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowPppAddressCounter) Reset() { - *x = PatternFlowPppAddressCounter{} +func (x *PatternFlowTcpCtlAckCounter) Reset() { + *x = PatternFlowTcpCtlAckCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[809] + mi := &file_otg_proto_msgTypes[791] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPppAddressCounter) String() string { +func (x *PatternFlowTcpCtlAckCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPppAddressCounter) ProtoMessage() {} +func (*PatternFlowTcpCtlAckCounter) ProtoMessage() {} -func (x *PatternFlowPppAddressCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[809] +func (x *PatternFlowTcpCtlAckCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[791] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -89658,26 +90873,26 @@ func (x *PatternFlowPppAddressCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPppAddressCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowPppAddressCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{809} +// Deprecated: Use PatternFlowTcpCtlAckCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlAckCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{791} } -func (x *PatternFlowPppAddressCounter) GetStart() uint32 { +func (x *PatternFlowTcpCtlAckCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowPppAddressCounter) GetStep() uint32 { +func (x *PatternFlowTcpCtlAckCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowPppAddressCounter) GetCount() uint32 { +func (x *PatternFlowTcpCtlAckCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -89687,7 +90902,7 @@ func (x *PatternFlowPppAddressCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowPppAddressMetricTag struct { +type PatternFlowTcpCtlAckMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -89701,27 +90916,27 @@ type PatternFlowPppAddressMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 1 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowPppAddressMetricTag) Reset() { - *x = PatternFlowPppAddressMetricTag{} +func (x *PatternFlowTcpCtlAckMetricTag) Reset() { + *x = PatternFlowTcpCtlAckMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[810] + mi := &file_otg_proto_msgTypes[792] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPppAddressMetricTag) String() string { +func (x *PatternFlowTcpCtlAckMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPppAddressMetricTag) ProtoMessage() {} +func (*PatternFlowTcpCtlAckMetricTag) ProtoMessage() {} -func (x *PatternFlowPppAddressMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[810] +func (x *PatternFlowTcpCtlAckMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[792] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -89732,74 +90947,74 @@ func (x *PatternFlowPppAddressMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPppAddressMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPppAddressMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{810} +// Deprecated: Use PatternFlowTcpCtlAckMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlAckMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{792} } -func (x *PatternFlowPppAddressMetricTag) GetName() string { +func (x *PatternFlowTcpCtlAckMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowPppAddressMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpCtlAckMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowPppAddressMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpCtlAckMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// PPP address -type PatternFlowPppAddress struct { +// A value of 1 indicates that the ackknowledgment field is significant. +type PatternFlowTcpCtlAck struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowPppAddress_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPppAddress_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowTcpCtlAck_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpCtlAck_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 255 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [255] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowPppAddressCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowTcpCtlAckCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowPppAddressCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowTcpCtlAckCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPppAddressMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowTcpCtlAckMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowPppAddress) Reset() { - *x = PatternFlowPppAddress{} +func (x *PatternFlowTcpCtlAck) Reset() { + *x = PatternFlowTcpCtlAck{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[811] + mi := &file_otg_proto_msgTypes[793] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPppAddress) String() string { +func (x *PatternFlowTcpCtlAck) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPppAddress) ProtoMessage() {} +func (*PatternFlowTcpCtlAck) ProtoMessage() {} -func (x *PatternFlowPppAddress) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[811] +func (x *PatternFlowTcpCtlAck) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[793] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -89810,47 +91025,47 @@ func (x *PatternFlowPppAddress) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPppAddress.ProtoReflect.Descriptor instead. -func (*PatternFlowPppAddress) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{811} +// Deprecated: Use PatternFlowTcpCtlAck.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlAck) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{793} } -func (x *PatternFlowPppAddress) GetChoice() PatternFlowPppAddress_Choice_Enum { +func (x *PatternFlowTcpCtlAck) GetChoice() PatternFlowTcpCtlAck_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowPppAddress_Choice_unspecified + return PatternFlowTcpCtlAck_Choice_unspecified } -func (x *PatternFlowPppAddress) GetValue() uint32 { +func (x *PatternFlowTcpCtlAck) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowPppAddress) GetValues() []uint32 { +func (x *PatternFlowTcpCtlAck) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowPppAddress) GetIncrement() *PatternFlowPppAddressCounter { +func (x *PatternFlowTcpCtlAck) GetIncrement() *PatternFlowTcpCtlAckCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowPppAddress) GetDecrement() *PatternFlowPppAddressCounter { +func (x *PatternFlowTcpCtlAck) GetDecrement() *PatternFlowTcpCtlAckCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowPppAddress) GetMetricTags() []*PatternFlowPppAddressMetricTag { +func (x *PatternFlowTcpCtlAck) GetMetricTags() []*PatternFlowTcpCtlAckMetricTag { if x != nil { return x.MetricTags } @@ -89858,13 +91073,13 @@ func (x *PatternFlowPppAddress) GetMetricTags() []*PatternFlowPppAddressMetricTa } // integer counter pattern -type PatternFlowPppControlCounter struct { +type PatternFlowTcpCtlPshCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 3 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -89874,23 +91089,23 @@ type PatternFlowPppControlCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowPppControlCounter) Reset() { - *x = PatternFlowPppControlCounter{} +func (x *PatternFlowTcpCtlPshCounter) Reset() { + *x = PatternFlowTcpCtlPshCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[812] + mi := &file_otg_proto_msgTypes[794] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPppControlCounter) String() string { +func (x *PatternFlowTcpCtlPshCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPppControlCounter) ProtoMessage() {} +func (*PatternFlowTcpCtlPshCounter) ProtoMessage() {} -func (x *PatternFlowPppControlCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[812] +func (x *PatternFlowTcpCtlPshCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[794] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -89901,26 +91116,26 @@ func (x *PatternFlowPppControlCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPppControlCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowPppControlCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{812} +// Deprecated: Use PatternFlowTcpCtlPshCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlPshCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{794} } -func (x *PatternFlowPppControlCounter) GetStart() uint32 { +func (x *PatternFlowTcpCtlPshCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowPppControlCounter) GetStep() uint32 { +func (x *PatternFlowTcpCtlPshCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowPppControlCounter) GetCount() uint32 { +func (x *PatternFlowTcpCtlPshCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -89930,7 +91145,7 @@ func (x *PatternFlowPppControlCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowPppControlMetricTag struct { +type PatternFlowTcpCtlPshMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -89944,27 +91159,27 @@ type PatternFlowPppControlMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 1 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowPppControlMetricTag) Reset() { - *x = PatternFlowPppControlMetricTag{} +func (x *PatternFlowTcpCtlPshMetricTag) Reset() { + *x = PatternFlowTcpCtlPshMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[813] + mi := &file_otg_proto_msgTypes[795] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPppControlMetricTag) String() string { +func (x *PatternFlowTcpCtlPshMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPppControlMetricTag) ProtoMessage() {} +func (*PatternFlowTcpCtlPshMetricTag) ProtoMessage() {} -func (x *PatternFlowPppControlMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[813] +func (x *PatternFlowTcpCtlPshMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[795] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -89975,74 +91190,74 @@ func (x *PatternFlowPppControlMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPppControlMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPppControlMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{813} +// Deprecated: Use PatternFlowTcpCtlPshMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlPshMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{795} } -func (x *PatternFlowPppControlMetricTag) GetName() string { +func (x *PatternFlowTcpCtlPshMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowPppControlMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpCtlPshMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowPppControlMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpCtlPshMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// PPP control -type PatternFlowPppControl struct { +// Asks to push the buffered data to the receiving application. +type PatternFlowTcpCtlPsh struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowPppControl_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPppControl_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowTcpCtlPsh_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpCtlPsh_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 3 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [3] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowPppControlCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowTcpCtlPshCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowPppControlCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowTcpCtlPshCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPppControlMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowTcpCtlPshMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowPppControl) Reset() { - *x = PatternFlowPppControl{} +func (x *PatternFlowTcpCtlPsh) Reset() { + *x = PatternFlowTcpCtlPsh{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[814] + mi := &file_otg_proto_msgTypes[796] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPppControl) String() string { +func (x *PatternFlowTcpCtlPsh) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPppControl) ProtoMessage() {} +func (*PatternFlowTcpCtlPsh) ProtoMessage() {} -func (x *PatternFlowPppControl) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[814] +func (x *PatternFlowTcpCtlPsh) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[796] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -90053,47 +91268,47 @@ func (x *PatternFlowPppControl) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPppControl.ProtoReflect.Descriptor instead. -func (*PatternFlowPppControl) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{814} +// Deprecated: Use PatternFlowTcpCtlPsh.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlPsh) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{796} } -func (x *PatternFlowPppControl) GetChoice() PatternFlowPppControl_Choice_Enum { +func (x *PatternFlowTcpCtlPsh) GetChoice() PatternFlowTcpCtlPsh_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowPppControl_Choice_unspecified + return PatternFlowTcpCtlPsh_Choice_unspecified } -func (x *PatternFlowPppControl) GetValue() uint32 { +func (x *PatternFlowTcpCtlPsh) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowPppControl) GetValues() []uint32 { +func (x *PatternFlowTcpCtlPsh) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowPppControl) GetIncrement() *PatternFlowPppControlCounter { +func (x *PatternFlowTcpCtlPsh) GetIncrement() *PatternFlowTcpCtlPshCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowPppControl) GetDecrement() *PatternFlowPppControlCounter { +func (x *PatternFlowTcpCtlPsh) GetDecrement() *PatternFlowTcpCtlPshCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowPppControl) GetMetricTags() []*PatternFlowPppControlMetricTag { +func (x *PatternFlowTcpCtlPsh) GetMetricTags() []*PatternFlowTcpCtlPshMetricTag { if x != nil { return x.MetricTags } @@ -90101,13 +91316,13 @@ func (x *PatternFlowPppControl) GetMetricTags() []*PatternFlowPppControlMetricTa } // integer counter pattern -type PatternFlowPppProtocolTypeCounter struct { +type PatternFlowTcpCtlRstCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 33 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -90117,23 +91332,23 @@ type PatternFlowPppProtocolTypeCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowPppProtocolTypeCounter) Reset() { - *x = PatternFlowPppProtocolTypeCounter{} +func (x *PatternFlowTcpCtlRstCounter) Reset() { + *x = PatternFlowTcpCtlRstCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[815] + mi := &file_otg_proto_msgTypes[797] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPppProtocolTypeCounter) String() string { +func (x *PatternFlowTcpCtlRstCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPppProtocolTypeCounter) ProtoMessage() {} +func (*PatternFlowTcpCtlRstCounter) ProtoMessage() {} -func (x *PatternFlowPppProtocolTypeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[815] +func (x *PatternFlowTcpCtlRstCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[797] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -90144,26 +91359,26 @@ func (x *PatternFlowPppProtocolTypeCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPppProtocolTypeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowPppProtocolTypeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{815} +// Deprecated: Use PatternFlowTcpCtlRstCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlRstCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{797} } -func (x *PatternFlowPppProtocolTypeCounter) GetStart() uint32 { +func (x *PatternFlowTcpCtlRstCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowPppProtocolTypeCounter) GetStep() uint32 { +func (x *PatternFlowTcpCtlRstCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowPppProtocolTypeCounter) GetCount() uint32 { +func (x *PatternFlowTcpCtlRstCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -90173,7 +91388,7 @@ func (x *PatternFlowPppProtocolTypeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowPppProtocolTypeMetricTag struct { +type PatternFlowTcpCtlRstMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -90187,27 +91402,27 @@ type PatternFlowPppProtocolTypeMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 16 + // default = 1 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowPppProtocolTypeMetricTag) Reset() { - *x = PatternFlowPppProtocolTypeMetricTag{} +func (x *PatternFlowTcpCtlRstMetricTag) Reset() { + *x = PatternFlowTcpCtlRstMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[816] + mi := &file_otg_proto_msgTypes[798] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPppProtocolTypeMetricTag) String() string { +func (x *PatternFlowTcpCtlRstMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPppProtocolTypeMetricTag) ProtoMessage() {} +func (*PatternFlowTcpCtlRstMetricTag) ProtoMessage() {} -func (x *PatternFlowPppProtocolTypeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[816] +func (x *PatternFlowTcpCtlRstMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[798] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -90218,79 +91433,74 @@ func (x *PatternFlowPppProtocolTypeMetricTag) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPppProtocolTypeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowPppProtocolTypeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{816} +// Deprecated: Use PatternFlowTcpCtlRstMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlRstMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{798} } -func (x *PatternFlowPppProtocolTypeMetricTag) GetName() string { +func (x *PatternFlowTcpCtlRstMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowPppProtocolTypeMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpCtlRstMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowPppProtocolTypeMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpCtlRstMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// PPP protocol type -type PatternFlowPppProtocolType struct { +// Reset the connection. +type PatternFlowTcpCtlRst struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.auto - Choice *PatternFlowPppProtocolType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPppProtocolType_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.value + Choice *PatternFlowTcpCtlRst_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpCtlRst_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 33 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [33] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // The OTG implementation can provide a system generated - // value for this property. If the OTG is unable to generate a value - // the default value must be used. - // default = 33 - Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` // Description missing in models - Increment *PatternFlowPppProtocolTypeCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowTcpCtlRstCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowPppProtocolTypeCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowTcpCtlRstCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowPppProtocolTypeMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowTcpCtlRstMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowPppProtocolType) Reset() { - *x = PatternFlowPppProtocolType{} +func (x *PatternFlowTcpCtlRst) Reset() { + *x = PatternFlowTcpCtlRst{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[817] + mi := &file_otg_proto_msgTypes[799] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPppProtocolType) String() string { +func (x *PatternFlowTcpCtlRst) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPppProtocolType) ProtoMessage() {} +func (*PatternFlowTcpCtlRst) ProtoMessage() {} -func (x *PatternFlowPppProtocolType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[817] +func (x *PatternFlowTcpCtlRst) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[799] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -90301,54 +91511,47 @@ func (x *PatternFlowPppProtocolType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPppProtocolType.ProtoReflect.Descriptor instead. -func (*PatternFlowPppProtocolType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{817} +// Deprecated: Use PatternFlowTcpCtlRst.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlRst) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{799} } -func (x *PatternFlowPppProtocolType) GetChoice() PatternFlowPppProtocolType_Choice_Enum { +func (x *PatternFlowTcpCtlRst) GetChoice() PatternFlowTcpCtlRst_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowPppProtocolType_Choice_unspecified + return PatternFlowTcpCtlRst_Choice_unspecified } -func (x *PatternFlowPppProtocolType) GetValue() uint32 { +func (x *PatternFlowTcpCtlRst) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowPppProtocolType) GetValues() []uint32 { +func (x *PatternFlowTcpCtlRst) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowPppProtocolType) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto - } - return 0 -} - -func (x *PatternFlowPppProtocolType) GetIncrement() *PatternFlowPppProtocolTypeCounter { +func (x *PatternFlowTcpCtlRst) GetIncrement() *PatternFlowTcpCtlRstCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowPppProtocolType) GetDecrement() *PatternFlowPppProtocolTypeCounter { +func (x *PatternFlowTcpCtlRst) GetDecrement() *PatternFlowTcpCtlRstCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowPppProtocolType) GetMetricTags() []*PatternFlowPppProtocolTypeMetricTag { +func (x *PatternFlowTcpCtlRst) GetMetricTags() []*PatternFlowTcpCtlRstMetricTag { if x != nil { return x.MetricTags } @@ -90356,13 +91559,13 @@ func (x *PatternFlowPppProtocolType) GetMetricTags() []*PatternFlowPppProtocolTy } // integer counter pattern -type PatternFlowIgmpv1VersionCounter struct { +type PatternFlowTcpCtlSynCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 1 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -90372,23 +91575,23 @@ type PatternFlowIgmpv1VersionCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIgmpv1VersionCounter) Reset() { - *x = PatternFlowIgmpv1VersionCounter{} +func (x *PatternFlowTcpCtlSynCounter) Reset() { + *x = PatternFlowTcpCtlSynCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[818] + mi := &file_otg_proto_msgTypes[800] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1VersionCounter) String() string { +func (x *PatternFlowTcpCtlSynCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1VersionCounter) ProtoMessage() {} +func (*PatternFlowTcpCtlSynCounter) ProtoMessage() {} -func (x *PatternFlowIgmpv1VersionCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[818] +func (x *PatternFlowTcpCtlSynCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[800] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -90399,26 +91602,26 @@ func (x *PatternFlowIgmpv1VersionCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1VersionCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1VersionCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{818} +// Deprecated: Use PatternFlowTcpCtlSynCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlSynCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{800} } -func (x *PatternFlowIgmpv1VersionCounter) GetStart() uint32 { +func (x *PatternFlowTcpCtlSynCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowIgmpv1VersionCounter) GetStep() uint32 { +func (x *PatternFlowTcpCtlSynCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowIgmpv1VersionCounter) GetCount() uint32 { +func (x *PatternFlowTcpCtlSynCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -90428,7 +91631,7 @@ func (x *PatternFlowIgmpv1VersionCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowIgmpv1VersionMetricTag struct { +type PatternFlowTcpCtlSynMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -90442,27 +91645,27 @@ type PatternFlowIgmpv1VersionMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 4 + // default = 1 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowIgmpv1VersionMetricTag) Reset() { - *x = PatternFlowIgmpv1VersionMetricTag{} +func (x *PatternFlowTcpCtlSynMetricTag) Reset() { + *x = PatternFlowTcpCtlSynMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[819] + mi := &file_otg_proto_msgTypes[801] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1VersionMetricTag) String() string { +func (x *PatternFlowTcpCtlSynMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1VersionMetricTag) ProtoMessage() {} +func (*PatternFlowTcpCtlSynMetricTag) ProtoMessage() {} -func (x *PatternFlowIgmpv1VersionMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[819] +func (x *PatternFlowTcpCtlSynMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[801] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -90473,74 +91676,74 @@ func (x *PatternFlowIgmpv1VersionMetricTag) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1VersionMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1VersionMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{819} +// Deprecated: Use PatternFlowTcpCtlSynMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlSynMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{801} } -func (x *PatternFlowIgmpv1VersionMetricTag) GetName() string { +func (x *PatternFlowTcpCtlSynMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIgmpv1VersionMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpCtlSynMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowIgmpv1VersionMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpCtlSynMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Version number -type PatternFlowIgmpv1Version struct { +// Synchronize sequenece numbers. +type PatternFlowTcpCtlSyn struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowIgmpv1Version_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIgmpv1Version_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowTcpCtlSyn_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpCtlSyn_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [1] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowIgmpv1VersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowTcpCtlSynCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowIgmpv1VersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowTcpCtlSynCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIgmpv1VersionMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowTcpCtlSynMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowIgmpv1Version) Reset() { - *x = PatternFlowIgmpv1Version{} +func (x *PatternFlowTcpCtlSyn) Reset() { + *x = PatternFlowTcpCtlSyn{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[820] + mi := &file_otg_proto_msgTypes[802] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1Version) String() string { +func (x *PatternFlowTcpCtlSyn) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1Version) ProtoMessage() {} +func (*PatternFlowTcpCtlSyn) ProtoMessage() {} -func (x *PatternFlowIgmpv1Version) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[820] +func (x *PatternFlowTcpCtlSyn) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[802] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -90551,47 +91754,47 @@ func (x *PatternFlowIgmpv1Version) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1Version.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1Version) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{820} +// Deprecated: Use PatternFlowTcpCtlSyn.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlSyn) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{802} } -func (x *PatternFlowIgmpv1Version) GetChoice() PatternFlowIgmpv1Version_Choice_Enum { +func (x *PatternFlowTcpCtlSyn) GetChoice() PatternFlowTcpCtlSyn_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIgmpv1Version_Choice_unspecified + return PatternFlowTcpCtlSyn_Choice_unspecified } -func (x *PatternFlowIgmpv1Version) GetValue() uint32 { +func (x *PatternFlowTcpCtlSyn) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowIgmpv1Version) GetValues() []uint32 { +func (x *PatternFlowTcpCtlSyn) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowIgmpv1Version) GetIncrement() *PatternFlowIgmpv1VersionCounter { +func (x *PatternFlowTcpCtlSyn) GetIncrement() *PatternFlowTcpCtlSynCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowIgmpv1Version) GetDecrement() *PatternFlowIgmpv1VersionCounter { +func (x *PatternFlowTcpCtlSyn) GetDecrement() *PatternFlowTcpCtlSynCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowIgmpv1Version) GetMetricTags() []*PatternFlowIgmpv1VersionMetricTag { +func (x *PatternFlowTcpCtlSyn) GetMetricTags() []*PatternFlowTcpCtlSynMetricTag { if x != nil { return x.MetricTags } @@ -90599,13 +91802,13 @@ func (x *PatternFlowIgmpv1Version) GetMetricTags() []*PatternFlowIgmpv1VersionMe } // integer counter pattern -type PatternFlowIgmpv1TypeCounter struct { +type PatternFlowTcpCtlFinCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 1 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -90615,23 +91818,23 @@ type PatternFlowIgmpv1TypeCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIgmpv1TypeCounter) Reset() { - *x = PatternFlowIgmpv1TypeCounter{} +func (x *PatternFlowTcpCtlFinCounter) Reset() { + *x = PatternFlowTcpCtlFinCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[821] + mi := &file_otg_proto_msgTypes[803] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1TypeCounter) String() string { +func (x *PatternFlowTcpCtlFinCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1TypeCounter) ProtoMessage() {} +func (*PatternFlowTcpCtlFinCounter) ProtoMessage() {} -func (x *PatternFlowIgmpv1TypeCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[821] +func (x *PatternFlowTcpCtlFinCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[803] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -90642,26 +91845,26 @@ func (x *PatternFlowIgmpv1TypeCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1TypeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1TypeCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{821} +// Deprecated: Use PatternFlowTcpCtlFinCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlFinCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{803} } -func (x *PatternFlowIgmpv1TypeCounter) GetStart() uint32 { +func (x *PatternFlowTcpCtlFinCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowIgmpv1TypeCounter) GetStep() uint32 { +func (x *PatternFlowTcpCtlFinCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowIgmpv1TypeCounter) GetCount() uint32 { +func (x *PatternFlowTcpCtlFinCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -90671,7 +91874,7 @@ func (x *PatternFlowIgmpv1TypeCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowIgmpv1TypeMetricTag struct { +type PatternFlowTcpCtlFinMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -90685,27 +91888,27 @@ type PatternFlowIgmpv1TypeMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 4 + // default = 1 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowIgmpv1TypeMetricTag) Reset() { - *x = PatternFlowIgmpv1TypeMetricTag{} +func (x *PatternFlowTcpCtlFinMetricTag) Reset() { + *x = PatternFlowTcpCtlFinMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[822] + mi := &file_otg_proto_msgTypes[804] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1TypeMetricTag) String() string { +func (x *PatternFlowTcpCtlFinMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1TypeMetricTag) ProtoMessage() {} +func (*PatternFlowTcpCtlFinMetricTag) ProtoMessage() {} -func (x *PatternFlowIgmpv1TypeMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[822] +func (x *PatternFlowTcpCtlFinMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[804] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -90716,74 +91919,74 @@ func (x *PatternFlowIgmpv1TypeMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1TypeMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1TypeMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{822} +// Deprecated: Use PatternFlowTcpCtlFinMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlFinMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{804} } -func (x *PatternFlowIgmpv1TypeMetricTag) GetName() string { +func (x *PatternFlowTcpCtlFinMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIgmpv1TypeMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpCtlFinMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowIgmpv1TypeMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpCtlFinMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Type of message -type PatternFlowIgmpv1Type struct { +// Last packet from the sender. +type PatternFlowTcpCtlFin struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowIgmpv1Type_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIgmpv1Type_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowTcpCtlFin_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpCtlFin_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [1] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowIgmpv1TypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowTcpCtlFinCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowIgmpv1TypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowTcpCtlFinCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIgmpv1TypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowTcpCtlFinMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowIgmpv1Type) Reset() { - *x = PatternFlowIgmpv1Type{} +func (x *PatternFlowTcpCtlFin) Reset() { + *x = PatternFlowTcpCtlFin{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[823] + mi := &file_otg_proto_msgTypes[805] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1Type) String() string { +func (x *PatternFlowTcpCtlFin) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1Type) ProtoMessage() {} +func (*PatternFlowTcpCtlFin) ProtoMessage() {} -func (x *PatternFlowIgmpv1Type) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[823] +func (x *PatternFlowTcpCtlFin) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[805] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -90794,47 +91997,47 @@ func (x *PatternFlowIgmpv1Type) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1Type.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1Type) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{823} +// Deprecated: Use PatternFlowTcpCtlFin.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlFin) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{805} } -func (x *PatternFlowIgmpv1Type) GetChoice() PatternFlowIgmpv1Type_Choice_Enum { +func (x *PatternFlowTcpCtlFin) GetChoice() PatternFlowTcpCtlFin_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIgmpv1Type_Choice_unspecified + return PatternFlowTcpCtlFin_Choice_unspecified } -func (x *PatternFlowIgmpv1Type) GetValue() uint32 { +func (x *PatternFlowTcpCtlFin) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowIgmpv1Type) GetValues() []uint32 { +func (x *PatternFlowTcpCtlFin) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowIgmpv1Type) GetIncrement() *PatternFlowIgmpv1TypeCounter { +func (x *PatternFlowTcpCtlFin) GetIncrement() *PatternFlowTcpCtlFinCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowIgmpv1Type) GetDecrement() *PatternFlowIgmpv1TypeCounter { +func (x *PatternFlowTcpCtlFin) GetDecrement() *PatternFlowTcpCtlFinCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowIgmpv1Type) GetMetricTags() []*PatternFlowIgmpv1TypeMetricTag { +func (x *PatternFlowTcpCtlFin) GetMetricTags() []*PatternFlowTcpCtlFinMetricTag { if x != nil { return x.MetricTags } @@ -90842,7 +92045,7 @@ func (x *PatternFlowIgmpv1Type) GetMetricTags() []*PatternFlowIgmpv1TypeMetricTa } // integer counter pattern -type PatternFlowIgmpv1UnusedCounter struct { +type PatternFlowTcpWindowCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -90858,23 +92061,23 @@ type PatternFlowIgmpv1UnusedCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIgmpv1UnusedCounter) Reset() { - *x = PatternFlowIgmpv1UnusedCounter{} +func (x *PatternFlowTcpWindowCounter) Reset() { + *x = PatternFlowTcpWindowCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[824] + mi := &file_otg_proto_msgTypes[806] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1UnusedCounter) String() string { +func (x *PatternFlowTcpWindowCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1UnusedCounter) ProtoMessage() {} +func (*PatternFlowTcpWindowCounter) ProtoMessage() {} -func (x *PatternFlowIgmpv1UnusedCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[824] +func (x *PatternFlowTcpWindowCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[806] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -90885,26 +92088,26 @@ func (x *PatternFlowIgmpv1UnusedCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1UnusedCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1UnusedCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{824} +// Deprecated: Use PatternFlowTcpWindowCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpWindowCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{806} } -func (x *PatternFlowIgmpv1UnusedCounter) GetStart() uint32 { +func (x *PatternFlowTcpWindowCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowIgmpv1UnusedCounter) GetStep() uint32 { +func (x *PatternFlowTcpWindowCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowIgmpv1UnusedCounter) GetCount() uint32 { +func (x *PatternFlowTcpWindowCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -90914,7 +92117,7 @@ func (x *PatternFlowIgmpv1UnusedCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowIgmpv1UnusedMetricTag struct { +type PatternFlowTcpWindowMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -90928,27 +92131,27 @@ type PatternFlowIgmpv1UnusedMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowIgmpv1UnusedMetricTag) Reset() { - *x = PatternFlowIgmpv1UnusedMetricTag{} +func (x *PatternFlowTcpWindowMetricTag) Reset() { + *x = PatternFlowTcpWindowMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[825] + mi := &file_otg_proto_msgTypes[807] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1UnusedMetricTag) String() string { +func (x *PatternFlowTcpWindowMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1UnusedMetricTag) ProtoMessage() {} +func (*PatternFlowTcpWindowMetricTag) ProtoMessage() {} -func (x *PatternFlowIgmpv1UnusedMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[825] +func (x *PatternFlowTcpWindowMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[807] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -90959,41 +92162,41 @@ func (x *PatternFlowIgmpv1UnusedMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1UnusedMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1UnusedMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{825} +// Deprecated: Use PatternFlowTcpWindowMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpWindowMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{807} } -func (x *PatternFlowIgmpv1UnusedMetricTag) GetName() string { +func (x *PatternFlowTcpWindowMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIgmpv1UnusedMetricTag) GetOffset() uint32 { +func (x *PatternFlowTcpWindowMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowIgmpv1UnusedMetricTag) GetLength() uint32 { +func (x *PatternFlowTcpWindowMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Unused -type PatternFlowIgmpv1Unused struct { +// Tcp connection window. +type PatternFlowTcpWindow struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowIgmpv1Unused_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIgmpv1Unused_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowTcpWindow_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpWindow_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -91001,32 +92204,32 @@ type PatternFlowIgmpv1Unused struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowIgmpv1UnusedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowTcpWindowCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowIgmpv1UnusedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowTcpWindowCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIgmpv1UnusedMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowTcpWindowMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowIgmpv1Unused) Reset() { - *x = PatternFlowIgmpv1Unused{} +func (x *PatternFlowTcpWindow) Reset() { + *x = PatternFlowTcpWindow{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[826] + mi := &file_otg_proto_msgTypes[808] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1Unused) String() string { +func (x *PatternFlowTcpWindow) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1Unused) ProtoMessage() {} +func (*PatternFlowTcpWindow) ProtoMessage() {} -func (x *PatternFlowIgmpv1Unused) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[826] +func (x *PatternFlowTcpWindow) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[808] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -91037,86 +92240,88 @@ func (x *PatternFlowIgmpv1Unused) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1Unused.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1Unused) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{826} +// Deprecated: Use PatternFlowTcpWindow.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpWindow) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{808} } -func (x *PatternFlowIgmpv1Unused) GetChoice() PatternFlowIgmpv1Unused_Choice_Enum { +func (x *PatternFlowTcpWindow) GetChoice() PatternFlowTcpWindow_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIgmpv1Unused_Choice_unspecified + return PatternFlowTcpWindow_Choice_unspecified } -func (x *PatternFlowIgmpv1Unused) GetValue() uint32 { +func (x *PatternFlowTcpWindow) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowIgmpv1Unused) GetValues() []uint32 { +func (x *PatternFlowTcpWindow) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowIgmpv1Unused) GetIncrement() *PatternFlowIgmpv1UnusedCounter { +func (x *PatternFlowTcpWindow) GetIncrement() *PatternFlowTcpWindowCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowIgmpv1Unused) GetDecrement() *PatternFlowIgmpv1UnusedCounter { +func (x *PatternFlowTcpWindow) GetDecrement() *PatternFlowTcpWindowCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowIgmpv1Unused) GetMetricTags() []*PatternFlowIgmpv1UnusedMetricTag { +func (x *PatternFlowTcpWindow) GetMetricTags() []*PatternFlowTcpWindowMetricTag { if x != nil { return x.MetricTags } return nil } -// Checksum -type PatternFlowIgmpv1Checksum struct { +// The one's complement of the one's complement sum of all 16 bit words in header and +// text. An all-zero value means that no checksum will be transmitted. While computing +// the checksum, the checksum field itself is replaced with zeros. +type PatternFlowTcpChecksum struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // The type of checksum // default = Choice.Enum.generated - Choice *PatternFlowIgmpv1Checksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIgmpv1Checksum_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowTcpChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowTcpChecksum_Choice_Enum,oneof" json:"choice,omitempty"` // A system generated checksum value // default = Generated.Enum.good - Generated *PatternFlowIgmpv1Checksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowIgmpv1Checksum_Generated_Enum,oneof" json:"generated,omitempty"` + Generated *PatternFlowTcpChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowTcpChecksum_Generated_Enum,oneof" json:"generated,omitempty"` // A custom checksum value Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` } -func (x *PatternFlowIgmpv1Checksum) Reset() { - *x = PatternFlowIgmpv1Checksum{} +func (x *PatternFlowTcpChecksum) Reset() { + *x = PatternFlowTcpChecksum{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[827] + mi := &file_otg_proto_msgTypes[809] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1Checksum) String() string { +func (x *PatternFlowTcpChecksum) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1Checksum) ProtoMessage() {} +func (*PatternFlowTcpChecksum) ProtoMessage() {} -func (x *PatternFlowIgmpv1Checksum) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[827] +func (x *PatternFlowTcpChecksum) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[809] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -91127,66 +92332,66 @@ func (x *PatternFlowIgmpv1Checksum) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1Checksum.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1Checksum) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{827} +// Deprecated: Use PatternFlowTcpChecksum.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpChecksum) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{809} } -func (x *PatternFlowIgmpv1Checksum) GetChoice() PatternFlowIgmpv1Checksum_Choice_Enum { +func (x *PatternFlowTcpChecksum) GetChoice() PatternFlowTcpChecksum_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIgmpv1Checksum_Choice_unspecified + return PatternFlowTcpChecksum_Choice_unspecified } -func (x *PatternFlowIgmpv1Checksum) GetGenerated() PatternFlowIgmpv1Checksum_Generated_Enum { +func (x *PatternFlowTcpChecksum) GetGenerated() PatternFlowTcpChecksum_Generated_Enum { if x != nil && x.Generated != nil { return *x.Generated } - return PatternFlowIgmpv1Checksum_Generated_unspecified + return PatternFlowTcpChecksum_Generated_unspecified } -func (x *PatternFlowIgmpv1Checksum) GetCustom() uint32 { +func (x *PatternFlowTcpChecksum) GetCustom() uint32 { if x != nil && x.Custom != nil { return *x.Custom } return 0 } -// ipv4 counter pattern -type PatternFlowIgmpv1GroupAddressCounter struct { +// integer counter pattern +type PatternFlowUdpSrcPortCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0.0.0.0 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 0.0.0.1 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowIgmpv1GroupAddressCounter) Reset() { - *x = PatternFlowIgmpv1GroupAddressCounter{} +func (x *PatternFlowUdpSrcPortCounter) Reset() { + *x = PatternFlowUdpSrcPortCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[828] + mi := &file_otg_proto_msgTypes[810] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1GroupAddressCounter) String() string { +func (x *PatternFlowUdpSrcPortCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1GroupAddressCounter) ProtoMessage() {} +func (*PatternFlowUdpSrcPortCounter) ProtoMessage() {} -func (x *PatternFlowIgmpv1GroupAddressCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[828] +func (x *PatternFlowUdpSrcPortCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[810] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -91197,26 +92402,26 @@ func (x *PatternFlowIgmpv1GroupAddressCounter) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1GroupAddressCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1GroupAddressCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{828} +// Deprecated: Use PatternFlowUdpSrcPortCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpSrcPortCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{810} } -func (x *PatternFlowIgmpv1GroupAddressCounter) GetStart() string { +func (x *PatternFlowUdpSrcPortCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } - return "" + return 0 } -func (x *PatternFlowIgmpv1GroupAddressCounter) GetStep() string { +func (x *PatternFlowUdpSrcPortCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } - return "" + return 0 } -func (x *PatternFlowIgmpv1GroupAddressCounter) GetCount() uint32 { +func (x *PatternFlowUdpSrcPortCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -91226,7 +92431,7 @@ func (x *PatternFlowIgmpv1GroupAddressCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowIgmpv1GroupAddressMetricTag struct { +type PatternFlowUdpSrcPortMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -91240,27 +92445,27 @@ type PatternFlowIgmpv1GroupAddressMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 32 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowIgmpv1GroupAddressMetricTag) Reset() { - *x = PatternFlowIgmpv1GroupAddressMetricTag{} +func (x *PatternFlowUdpSrcPortMetricTag) Reset() { + *x = PatternFlowUdpSrcPortMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[829] + mi := &file_otg_proto_msgTypes[811] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1GroupAddressMetricTag) String() string { +func (x *PatternFlowUdpSrcPortMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1GroupAddressMetricTag) ProtoMessage() {} +func (*PatternFlowUdpSrcPortMetricTag) ProtoMessage() {} -func (x *PatternFlowIgmpv1GroupAddressMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[829] +func (x *PatternFlowUdpSrcPortMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[811] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -91271,74 +92476,159 @@ func (x *PatternFlowIgmpv1GroupAddressMetricTag) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1GroupAddressMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1GroupAddressMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{829} +// Deprecated: Use PatternFlowUdpSrcPortMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpSrcPortMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{811} } -func (x *PatternFlowIgmpv1GroupAddressMetricTag) GetName() string { +func (x *PatternFlowUdpSrcPortMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowIgmpv1GroupAddressMetricTag) GetOffset() uint32 { +func (x *PatternFlowUdpSrcPortMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowIgmpv1GroupAddressMetricTag) GetLength() uint32 { +func (x *PatternFlowUdpSrcPortMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Group address -type PatternFlowIgmpv1GroupAddress struct { +// integer random pattern +type PatternFlowUdpSrcPortRandom struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The minimum possible value generated by the random value generator. + // default = 0 + Min *uint32 `protobuf:"varint,1,opt,name=min,proto3,oneof" json:"min,omitempty"` + // The maximum possible value generated by the random value generator. + // default = 65535 + Max *uint32 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` + // The seed value is used to initialize the random number generator to a deterministic + // state. If the user provides a seed value of 0, the implementation will generate a + // sequence of non-deterministic random values. For any other seed value, the sequence + // of random numbers will be generated in a deterministic manner (specific to the implementation). + // default = 1 + Seed *uint32 `protobuf:"varint,3,opt,name=seed,proto3,oneof" json:"seed,omitempty"` + // The total number of values to be generated by the random value generator. + // default = 1 + Count *uint32 `protobuf:"varint,4,opt,name=count,proto3,oneof" json:"count,omitempty"` +} + +func (x *PatternFlowUdpSrcPortRandom) Reset() { + *x = PatternFlowUdpSrcPortRandom{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[812] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowUdpSrcPortRandom) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowUdpSrcPortRandom) ProtoMessage() {} + +func (x *PatternFlowUdpSrcPortRandom) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[812] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowUdpSrcPortRandom.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpSrcPortRandom) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{812} +} + +func (x *PatternFlowUdpSrcPortRandom) GetMin() uint32 { + if x != nil && x.Min != nil { + return *x.Min + } + return 0 +} + +func (x *PatternFlowUdpSrcPortRandom) GetMax() uint32 { + if x != nil && x.Max != nil { + return *x.Max + } + return 0 +} + +func (x *PatternFlowUdpSrcPortRandom) GetSeed() uint32 { + if x != nil && x.Seed != nil { + return *x.Seed + } + return 0 +} + +func (x *PatternFlowUdpSrcPortRandom) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Source port +type PatternFlowUdpSrcPort struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowIgmpv1GroupAddress_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIgmpv1GroupAddress_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowUdpSrcPort_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowUdpSrcPort_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0.0.0.0 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = ['0.0.0.0'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowIgmpv1GroupAddressCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowUdpSrcPortCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowIgmpv1GroupAddressCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowUdpSrcPortCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowIgmpv1GroupAddressMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowUdpSrcPortMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // Description missing in models + Random *PatternFlowUdpSrcPortRandom `protobuf:"bytes,8,opt,name=random,proto3" json:"random,omitempty"` } -func (x *PatternFlowIgmpv1GroupAddress) Reset() { - *x = PatternFlowIgmpv1GroupAddress{} +func (x *PatternFlowUdpSrcPort) Reset() { + *x = PatternFlowUdpSrcPort{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[830] + mi := &file_otg_proto_msgTypes[813] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1GroupAddress) String() string { +func (x *PatternFlowUdpSrcPort) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1GroupAddress) ProtoMessage() {} +func (*PatternFlowUdpSrcPort) ProtoMessage() {} -func (x *PatternFlowIgmpv1GroupAddress) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[830] +func (x *PatternFlowUdpSrcPort) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[813] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -91349,61 +92639,68 @@ func (x *PatternFlowIgmpv1GroupAddress) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1GroupAddress.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1GroupAddress) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{830} +// Deprecated: Use PatternFlowUdpSrcPort.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpSrcPort) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{813} } -func (x *PatternFlowIgmpv1GroupAddress) GetChoice() PatternFlowIgmpv1GroupAddress_Choice_Enum { +func (x *PatternFlowUdpSrcPort) GetChoice() PatternFlowUdpSrcPort_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowIgmpv1GroupAddress_Choice_unspecified + return PatternFlowUdpSrcPort_Choice_unspecified } -func (x *PatternFlowIgmpv1GroupAddress) GetValue() string { +func (x *PatternFlowUdpSrcPort) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } - return "" + return 0 } -func (x *PatternFlowIgmpv1GroupAddress) GetValues() []string { +func (x *PatternFlowUdpSrcPort) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowIgmpv1GroupAddress) GetIncrement() *PatternFlowIgmpv1GroupAddressCounter { +func (x *PatternFlowUdpSrcPort) GetIncrement() *PatternFlowUdpSrcPortCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowIgmpv1GroupAddress) GetDecrement() *PatternFlowIgmpv1GroupAddressCounter { +func (x *PatternFlowUdpSrcPort) GetDecrement() *PatternFlowUdpSrcPortCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowIgmpv1GroupAddress) GetMetricTags() []*PatternFlowIgmpv1GroupAddressMetricTag { +func (x *PatternFlowUdpSrcPort) GetMetricTags() []*PatternFlowUdpSrcPortMetricTag { if x != nil { return x.MetricTags } return nil } +func (x *PatternFlowUdpSrcPort) GetRandom() *PatternFlowUdpSrcPortRandom { + if x != nil { + return x.Random + } + return nil +} + // integer counter pattern -type PatternFlowMplsLabelCounter struct { +type PatternFlowUdpDstPortCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 16 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -91413,23 +92710,23 @@ type PatternFlowMplsLabelCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowMplsLabelCounter) Reset() { - *x = PatternFlowMplsLabelCounter{} +func (x *PatternFlowUdpDstPortCounter) Reset() { + *x = PatternFlowUdpDstPortCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[831] + mi := &file_otg_proto_msgTypes[814] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsLabelCounter) String() string { +func (x *PatternFlowUdpDstPortCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsLabelCounter) ProtoMessage() {} +func (*PatternFlowUdpDstPortCounter) ProtoMessage() {} -func (x *PatternFlowMplsLabelCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[831] +func (x *PatternFlowUdpDstPortCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[814] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -91440,26 +92737,26 @@ func (x *PatternFlowMplsLabelCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsLabelCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsLabelCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{831} +// Deprecated: Use PatternFlowUdpDstPortCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpDstPortCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{814} } -func (x *PatternFlowMplsLabelCounter) GetStart() uint32 { +func (x *PatternFlowUdpDstPortCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowMplsLabelCounter) GetStep() uint32 { +func (x *PatternFlowUdpDstPortCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowMplsLabelCounter) GetCount() uint32 { +func (x *PatternFlowUdpDstPortCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -91469,7 +92766,7 @@ func (x *PatternFlowMplsLabelCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowMplsLabelMetricTag struct { +type PatternFlowUdpDstPortMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -91483,27 +92780,27 @@ type PatternFlowMplsLabelMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 20 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowMplsLabelMetricTag) Reset() { - *x = PatternFlowMplsLabelMetricTag{} +func (x *PatternFlowUdpDstPortMetricTag) Reset() { + *x = PatternFlowUdpDstPortMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[832] + mi := &file_otg_proto_msgTypes[815] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsLabelMetricTag) String() string { +func (x *PatternFlowUdpDstPortMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsLabelMetricTag) ProtoMessage() {} +func (*PatternFlowUdpDstPortMetricTag) ProtoMessage() {} -func (x *PatternFlowMplsLabelMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[832] +func (x *PatternFlowUdpDstPortMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[815] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -91514,79 +92811,159 @@ func (x *PatternFlowMplsLabelMetricTag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsLabelMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsLabelMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{832} +// Deprecated: Use PatternFlowUdpDstPortMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpDstPortMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{815} } -func (x *PatternFlowMplsLabelMetricTag) GetName() string { +func (x *PatternFlowUdpDstPortMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowMplsLabelMetricTag) GetOffset() uint32 { +func (x *PatternFlowUdpDstPortMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowMplsLabelMetricTag) GetLength() uint32 { +func (x *PatternFlowUdpDstPortMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Label of routers -type PatternFlowMplsLabel struct { +// integer random pattern +type PatternFlowUdpDstPortRandom struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The minimum possible value generated by the random value generator. + // default = 0 + Min *uint32 `protobuf:"varint,1,opt,name=min,proto3,oneof" json:"min,omitempty"` + // The maximum possible value generated by the random value generator. + // default = 65535 + Max *uint32 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` + // The seed value is used to initialize the random number generator to a deterministic + // state. If the user provides a seed value of 0, the implementation will generate a + // sequence of non-deterministic random values. For any other seed value, the sequence + // of random numbers will be generated in a deterministic manner (specific to the implementation). + // default = 1 + Seed *uint32 `protobuf:"varint,3,opt,name=seed,proto3,oneof" json:"seed,omitempty"` + // The total number of values to be generated by the random value generator. + // default = 1 + Count *uint32 `protobuf:"varint,4,opt,name=count,proto3,oneof" json:"count,omitempty"` +} + +func (x *PatternFlowUdpDstPortRandom) Reset() { + *x = PatternFlowUdpDstPortRandom{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[816] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowUdpDstPortRandom) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowUdpDstPortRandom) ProtoMessage() {} + +func (x *PatternFlowUdpDstPortRandom) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[816] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowUdpDstPortRandom.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpDstPortRandom) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{816} +} + +func (x *PatternFlowUdpDstPortRandom) GetMin() uint32 { + if x != nil && x.Min != nil { + return *x.Min + } + return 0 +} + +func (x *PatternFlowUdpDstPortRandom) GetMax() uint32 { + if x != nil && x.Max != nil { + return *x.Max + } + return 0 +} + +func (x *PatternFlowUdpDstPortRandom) GetSeed() uint32 { + if x != nil && x.Seed != nil { + return *x.Seed + } + return 0 +} + +func (x *PatternFlowUdpDstPortRandom) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Destination port +type PatternFlowUdpDstPort struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.auto - Choice *PatternFlowMplsLabel_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowMplsLabel_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.value + Choice *PatternFlowUdpDstPort_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowUdpDstPort_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 16 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [16] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // The OTG implementation can provide a system generated - // value for this property. If the OTG is unable to generate a value - // the default value must be used. - // default = 16 - Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` // Description missing in models - Increment *PatternFlowMplsLabelCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowUdpDstPortCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowMplsLabelCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowUdpDstPortCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowMplsLabelMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowUdpDstPortMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // Description missing in models + Random *PatternFlowUdpDstPortRandom `protobuf:"bytes,8,opt,name=random,proto3" json:"random,omitempty"` } -func (x *PatternFlowMplsLabel) Reset() { - *x = PatternFlowMplsLabel{} +func (x *PatternFlowUdpDstPort) Reset() { + *x = PatternFlowUdpDstPort{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[833] + mi := &file_otg_proto_msgTypes[817] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsLabel) String() string { +func (x *PatternFlowUdpDstPort) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsLabel) ProtoMessage() {} +func (*PatternFlowUdpDstPort) ProtoMessage() {} -func (x *PatternFlowMplsLabel) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[833] +func (x *PatternFlowUdpDstPort) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[817] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -91597,62 +92974,62 @@ func (x *PatternFlowMplsLabel) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsLabel.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsLabel) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{833} +// Deprecated: Use PatternFlowUdpDstPort.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpDstPort) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{817} } -func (x *PatternFlowMplsLabel) GetChoice() PatternFlowMplsLabel_Choice_Enum { +func (x *PatternFlowUdpDstPort) GetChoice() PatternFlowUdpDstPort_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowMplsLabel_Choice_unspecified + return PatternFlowUdpDstPort_Choice_unspecified } -func (x *PatternFlowMplsLabel) GetValue() uint32 { +func (x *PatternFlowUdpDstPort) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowMplsLabel) GetValues() []uint32 { +func (x *PatternFlowUdpDstPort) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowMplsLabel) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto - } - return 0 -} - -func (x *PatternFlowMplsLabel) GetIncrement() *PatternFlowMplsLabelCounter { +func (x *PatternFlowUdpDstPort) GetIncrement() *PatternFlowUdpDstPortCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowMplsLabel) GetDecrement() *PatternFlowMplsLabelCounter { +func (x *PatternFlowUdpDstPort) GetDecrement() *PatternFlowUdpDstPortCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowMplsLabel) GetMetricTags() []*PatternFlowMplsLabelMetricTag { +func (x *PatternFlowUdpDstPort) GetMetricTags() []*PatternFlowUdpDstPortMetricTag { if x != nil { return x.MetricTags } return nil } +func (x *PatternFlowUdpDstPort) GetRandom() *PatternFlowUdpDstPortRandom { + if x != nil { + return x.Random + } + return nil +} + // integer counter pattern -type PatternFlowMplsTrafficClassCounter struct { +type PatternFlowUdpLengthCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -91668,23 +93045,23 @@ type PatternFlowMplsTrafficClassCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowMplsTrafficClassCounter) Reset() { - *x = PatternFlowMplsTrafficClassCounter{} +func (x *PatternFlowUdpLengthCounter) Reset() { + *x = PatternFlowUdpLengthCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[834] + mi := &file_otg_proto_msgTypes[818] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsTrafficClassCounter) String() string { +func (x *PatternFlowUdpLengthCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsTrafficClassCounter) ProtoMessage() {} +func (*PatternFlowUdpLengthCounter) ProtoMessage() {} -func (x *PatternFlowMplsTrafficClassCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[834] +func (x *PatternFlowUdpLengthCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[818] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -91695,26 +93072,26 @@ func (x *PatternFlowMplsTrafficClassCounter) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsTrafficClassCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsTrafficClassCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{834} +// Deprecated: Use PatternFlowUdpLengthCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpLengthCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{818} } -func (x *PatternFlowMplsTrafficClassCounter) GetStart() uint32 { +func (x *PatternFlowUdpLengthCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowMplsTrafficClassCounter) GetStep() uint32 { +func (x *PatternFlowUdpLengthCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowMplsTrafficClassCounter) GetCount() uint32 { +func (x *PatternFlowUdpLengthCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -91724,7 +93101,7 @@ func (x *PatternFlowMplsTrafficClassCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowMplsTrafficClassMetricTag struct { +type PatternFlowUdpLengthMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -91738,27 +93115,27 @@ type PatternFlowMplsTrafficClassMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 3 + // default = 16 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowMplsTrafficClassMetricTag) Reset() { - *x = PatternFlowMplsTrafficClassMetricTag{} +func (x *PatternFlowUdpLengthMetricTag) Reset() { + *x = PatternFlowUdpLengthMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[835] + mi := &file_otg_proto_msgTypes[819] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsTrafficClassMetricTag) String() string { +func (x *PatternFlowUdpLengthMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsTrafficClassMetricTag) ProtoMessage() {} +func (*PatternFlowUdpLengthMetricTag) ProtoMessage() {} -func (x *PatternFlowMplsTrafficClassMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[835] +func (x *PatternFlowUdpLengthMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[819] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -91769,41 +93146,41 @@ func (x *PatternFlowMplsTrafficClassMetricTag) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsTrafficClassMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsTrafficClassMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{835} +// Deprecated: Use PatternFlowUdpLengthMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpLengthMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{819} } -func (x *PatternFlowMplsTrafficClassMetricTag) GetName() string { +func (x *PatternFlowUdpLengthMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowMplsTrafficClassMetricTag) GetOffset() uint32 { +func (x *PatternFlowUdpLengthMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowMplsTrafficClassMetricTag) GetLength() uint32 { +func (x *PatternFlowUdpLengthMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Traffic class -type PatternFlowMplsTrafficClass struct { +// Length +type PatternFlowUdpLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowMplsTrafficClass_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowMplsTrafficClass_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowUdpLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowUdpLength_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -91811,32 +93188,32 @@ type PatternFlowMplsTrafficClass struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowMplsTrafficClassCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowUdpLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowMplsTrafficClassCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowUdpLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowMplsTrafficClassMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowUdpLengthMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowMplsTrafficClass) Reset() { - *x = PatternFlowMplsTrafficClass{} +func (x *PatternFlowUdpLength) Reset() { + *x = PatternFlowUdpLength{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[836] + mi := &file_otg_proto_msgTypes[820] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsTrafficClass) String() string { +func (x *PatternFlowUdpLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsTrafficClass) ProtoMessage() {} +func (*PatternFlowUdpLength) ProtoMessage() {} -func (x *PatternFlowMplsTrafficClass) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[836] +func (x *PatternFlowUdpLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[820] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -91847,87 +93224,86 @@ func (x *PatternFlowMplsTrafficClass) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsTrafficClass.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsTrafficClass) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{836} +// Deprecated: Use PatternFlowUdpLength.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{820} } -func (x *PatternFlowMplsTrafficClass) GetChoice() PatternFlowMplsTrafficClass_Choice_Enum { +func (x *PatternFlowUdpLength) GetChoice() PatternFlowUdpLength_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowMplsTrafficClass_Choice_unspecified + return PatternFlowUdpLength_Choice_unspecified } -func (x *PatternFlowMplsTrafficClass) GetValue() uint32 { +func (x *PatternFlowUdpLength) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowMplsTrafficClass) GetValues() []uint32 { +func (x *PatternFlowUdpLength) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowMplsTrafficClass) GetIncrement() *PatternFlowMplsTrafficClassCounter { +func (x *PatternFlowUdpLength) GetIncrement() *PatternFlowUdpLengthCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowMplsTrafficClass) GetDecrement() *PatternFlowMplsTrafficClassCounter { +func (x *PatternFlowUdpLength) GetDecrement() *PatternFlowUdpLengthCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowMplsTrafficClass) GetMetricTags() []*PatternFlowMplsTrafficClassMetricTag { +func (x *PatternFlowUdpLength) GetMetricTags() []*PatternFlowUdpLengthMetricTag { if x != nil { return x.MetricTags } return nil } -// integer counter pattern -type PatternFlowMplsBottomOfStackCounter struct { +// UDP checksum +type PatternFlowUdpChecksum struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 1 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // The type of checksum + // default = Choice.Enum.generated + Choice *PatternFlowUdpChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowUdpChecksum_Choice_Enum,oneof" json:"choice,omitempty"` + // A system generated checksum value + // default = Generated.Enum.good + Generated *PatternFlowUdpChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowUdpChecksum_Generated_Enum,oneof" json:"generated,omitempty"` + // A custom checksum value + Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` } -func (x *PatternFlowMplsBottomOfStackCounter) Reset() { - *x = PatternFlowMplsBottomOfStackCounter{} +func (x *PatternFlowUdpChecksum) Reset() { + *x = PatternFlowUdpChecksum{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[837] + mi := &file_otg_proto_msgTypes[821] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsBottomOfStackCounter) String() string { +func (x *PatternFlowUdpChecksum) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsBottomOfStackCounter) ProtoMessage() {} +func (*PatternFlowUdpChecksum) ProtoMessage() {} -func (x *PatternFlowMplsBottomOfStackCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[837] +func (x *PatternFlowUdpChecksum) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[821] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -91938,26 +93314,96 @@ func (x *PatternFlowMplsBottomOfStackCounter) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsBottomOfStackCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsBottomOfStackCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{837} +// Deprecated: Use PatternFlowUdpChecksum.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpChecksum) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{821} } -func (x *PatternFlowMplsBottomOfStackCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowUdpChecksum) GetChoice() PatternFlowUdpChecksum_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return PatternFlowUdpChecksum_Choice_unspecified } -func (x *PatternFlowMplsBottomOfStackCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowUdpChecksum) GetGenerated() PatternFlowUdpChecksum_Generated_Enum { + if x != nil && x.Generated != nil { + return *x.Generated } - return 0 + return PatternFlowUdpChecksum_Generated_unspecified } -func (x *PatternFlowMplsBottomOfStackCounter) GetCount() uint32 { +func (x *PatternFlowUdpChecksum) GetCustom() uint32 { + if x != nil && x.Custom != nil { + return *x.Custom + } + return 0 +} + +// integer counter pattern +type PatternFlowGreChecksumPresentCounter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` +} + +func (x *PatternFlowGreChecksumPresentCounter) Reset() { + *x = PatternFlowGreChecksumPresentCounter{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[822] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGreChecksumPresentCounter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGreChecksumPresentCounter) ProtoMessage() {} + +func (x *PatternFlowGreChecksumPresentCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[822] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGreChecksumPresentCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGreChecksumPresentCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{822} +} + +func (x *PatternFlowGreChecksumPresentCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowGreChecksumPresentCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowGreChecksumPresentCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -91967,7 +93413,7 @@ func (x *PatternFlowMplsBottomOfStackCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowMplsBottomOfStackMetricTag struct { +type PatternFlowGreChecksumPresentMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -91985,23 +93431,23 @@ type PatternFlowMplsBottomOfStackMetricTag struct { Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowMplsBottomOfStackMetricTag) Reset() { - *x = PatternFlowMplsBottomOfStackMetricTag{} +func (x *PatternFlowGreChecksumPresentMetricTag) Reset() { + *x = PatternFlowGreChecksumPresentMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[838] + mi := &file_otg_proto_msgTypes[823] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsBottomOfStackMetricTag) String() string { +func (x *PatternFlowGreChecksumPresentMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsBottomOfStackMetricTag) ProtoMessage() {} +func (*PatternFlowGreChecksumPresentMetricTag) ProtoMessage() {} -func (x *PatternFlowMplsBottomOfStackMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[838] +func (x *PatternFlowGreChecksumPresentMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[823] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -92012,79 +93458,74 @@ func (x *PatternFlowMplsBottomOfStackMetricTag) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsBottomOfStackMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsBottomOfStackMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{838} +// Deprecated: Use PatternFlowGreChecksumPresentMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGreChecksumPresentMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{823} } -func (x *PatternFlowMplsBottomOfStackMetricTag) GetName() string { +func (x *PatternFlowGreChecksumPresentMetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowMplsBottomOfStackMetricTag) GetOffset() uint32 { +func (x *PatternFlowGreChecksumPresentMetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowMplsBottomOfStackMetricTag) GetLength() uint32 { +func (x *PatternFlowGreChecksumPresentMetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Bottom of stack -type PatternFlowMplsBottomOfStack struct { +// Checksum present bit +type PatternFlowGreChecksumPresent struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.auto - Choice *PatternFlowMplsBottomOfStack_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowMplsBottomOfStack_Choice_Enum,oneof" json:"choice,omitempty"` + // default = Choice.Enum.value + Choice *PatternFlowGreChecksumPresent_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGreChecksumPresent_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [1] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // The OTG implementation can provide a system generated - // value for this property. If the OTG is unable to generate a value - // the default value must be used. - // default = 1 - Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` // Description missing in models - Increment *PatternFlowMplsBottomOfStackCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGreChecksumPresentCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowMplsBottomOfStackCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGreChecksumPresentCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowMplsBottomOfStackMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowGreChecksumPresentMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowMplsBottomOfStack) Reset() { - *x = PatternFlowMplsBottomOfStack{} +func (x *PatternFlowGreChecksumPresent) Reset() { + *x = PatternFlowGreChecksumPresent{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[839] + mi := &file_otg_proto_msgTypes[824] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsBottomOfStack) String() string { +func (x *PatternFlowGreChecksumPresent) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsBottomOfStack) ProtoMessage() {} +func (*PatternFlowGreChecksumPresent) ProtoMessage() {} -func (x *PatternFlowMplsBottomOfStack) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[839] +func (x *PatternFlowGreChecksumPresent) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[824] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -92095,54 +93536,47 @@ func (x *PatternFlowMplsBottomOfStack) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsBottomOfStack.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsBottomOfStack) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{839} +// Deprecated: Use PatternFlowGreChecksumPresent.ProtoReflect.Descriptor instead. +func (*PatternFlowGreChecksumPresent) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{824} } -func (x *PatternFlowMplsBottomOfStack) GetChoice() PatternFlowMplsBottomOfStack_Choice_Enum { +func (x *PatternFlowGreChecksumPresent) GetChoice() PatternFlowGreChecksumPresent_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowMplsBottomOfStack_Choice_unspecified + return PatternFlowGreChecksumPresent_Choice_unspecified } -func (x *PatternFlowMplsBottomOfStack) GetValue() uint32 { +func (x *PatternFlowGreChecksumPresent) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowMplsBottomOfStack) GetValues() []uint32 { +func (x *PatternFlowGreChecksumPresent) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowMplsBottomOfStack) GetAuto() uint32 { - if x != nil && x.Auto != nil { - return *x.Auto - } - return 0 -} - -func (x *PatternFlowMplsBottomOfStack) GetIncrement() *PatternFlowMplsBottomOfStackCounter { +func (x *PatternFlowGreChecksumPresent) GetIncrement() *PatternFlowGreChecksumPresentCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowMplsBottomOfStack) GetDecrement() *PatternFlowMplsBottomOfStackCounter { +func (x *PatternFlowGreChecksumPresent) GetDecrement() *PatternFlowGreChecksumPresentCounter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowMplsBottomOfStack) GetMetricTags() []*PatternFlowMplsBottomOfStackMetricTag { +func (x *PatternFlowGreChecksumPresent) GetMetricTags() []*PatternFlowGreChecksumPresentMetricTag { if x != nil { return x.MetricTags } @@ -92150,13 +93584,13 @@ func (x *PatternFlowMplsBottomOfStack) GetMetricTags() []*PatternFlowMplsBottomO } // integer counter pattern -type PatternFlowMplsTimeToLiveCounter struct { +type PatternFlowGreReserved0Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 64 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -92166,23 +93600,23 @@ type PatternFlowMplsTimeToLiveCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowMplsTimeToLiveCounter) Reset() { - *x = PatternFlowMplsTimeToLiveCounter{} +func (x *PatternFlowGreReserved0Counter) Reset() { + *x = PatternFlowGreReserved0Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[840] + mi := &file_otg_proto_msgTypes[825] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsTimeToLiveCounter) String() string { +func (x *PatternFlowGreReserved0Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsTimeToLiveCounter) ProtoMessage() {} +func (*PatternFlowGreReserved0Counter) ProtoMessage() {} -func (x *PatternFlowMplsTimeToLiveCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[840] +func (x *PatternFlowGreReserved0Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[825] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -92193,26 +93627,26 @@ func (x *PatternFlowMplsTimeToLiveCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsTimeToLiveCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsTimeToLiveCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{840} +// Deprecated: Use PatternFlowGreReserved0Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowGreReserved0Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{825} } -func (x *PatternFlowMplsTimeToLiveCounter) GetStart() uint32 { +func (x *PatternFlowGreReserved0Counter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowMplsTimeToLiveCounter) GetStep() uint32 { +func (x *PatternFlowGreReserved0Counter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowMplsTimeToLiveCounter) GetCount() uint32 { +func (x *PatternFlowGreReserved0Counter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } @@ -92222,7 +93656,7 @@ func (x *PatternFlowMplsTimeToLiveCounter) GetCount() uint32 { // Metric tag can be used to enable tracking portion of or all bits in a corresponding // header field for metrics per each applicable value. These would appear as tagged // metrics in corresponding flow metrics. -type PatternFlowMplsTimeToLiveMetricTag struct { +type PatternFlowGreReserved0MetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -92236,27 +93670,27 @@ type PatternFlowMplsTimeToLiveMetricTag struct { Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` // Number of bits to track for metrics starting from configured offset of corresponding // header field - // default = 8 + // default = 12 Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowMplsTimeToLiveMetricTag) Reset() { - *x = PatternFlowMplsTimeToLiveMetricTag{} +func (x *PatternFlowGreReserved0MetricTag) Reset() { + *x = PatternFlowGreReserved0MetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[841] + mi := &file_otg_proto_msgTypes[826] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsTimeToLiveMetricTag) String() string { +func (x *PatternFlowGreReserved0MetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsTimeToLiveMetricTag) ProtoMessage() {} +func (*PatternFlowGreReserved0MetricTag) ProtoMessage() {} -func (x *PatternFlowMplsTimeToLiveMetricTag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[841] +func (x *PatternFlowGreReserved0MetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[826] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -92267,74 +93701,74 @@ func (x *PatternFlowMplsTimeToLiveMetricTag) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsTimeToLiveMetricTag.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsTimeToLiveMetricTag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{841} +// Deprecated: Use PatternFlowGreReserved0MetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGreReserved0MetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{826} } -func (x *PatternFlowMplsTimeToLiveMetricTag) GetName() string { +func (x *PatternFlowGreReserved0MetricTag) GetName() string { if x != nil && x.Name != nil { return *x.Name } return "" } -func (x *PatternFlowMplsTimeToLiveMetricTag) GetOffset() uint32 { +func (x *PatternFlowGreReserved0MetricTag) GetOffset() uint32 { if x != nil && x.Offset != nil { return *x.Offset } return 0 } -func (x *PatternFlowMplsTimeToLiveMetricTag) GetLength() uint32 { +func (x *PatternFlowGreReserved0MetricTag) GetLength() uint32 { if x != nil && x.Length != nil { return *x.Length } return 0 } -// Time to live -type PatternFlowMplsTimeToLive struct { +// Reserved bits +type PatternFlowGreReserved0 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowMplsTimeToLive_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowMplsTimeToLive_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGreReserved0_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGreReserved0_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 64 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [64] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowMplsTimeToLiveCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGreReserved0Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowMplsTimeToLiveCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGreReserved0Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` // One or more metric tags can be used to enable tracking portion of or all bits in // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. - MetricTags []*PatternFlowMplsTimeToLiveMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + MetricTags []*PatternFlowGreReserved0MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowMplsTimeToLive) Reset() { - *x = PatternFlowMplsTimeToLive{} +func (x *PatternFlowGreReserved0) Reset() { + *x = PatternFlowGreReserved0{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[842] + mi := &file_otg_proto_msgTypes[827] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsTimeToLive) String() string { +func (x *PatternFlowGreReserved0) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsTimeToLive) ProtoMessage() {} +func (*PatternFlowGreReserved0) ProtoMessage() {} -func (x *PatternFlowMplsTimeToLive) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[842] +func (x *PatternFlowGreReserved0) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[827] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -92345,47 +93779,47 @@ func (x *PatternFlowMplsTimeToLive) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsTimeToLive.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsTimeToLive) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{842} +// Deprecated: Use PatternFlowGreReserved0.ProtoReflect.Descriptor instead. +func (*PatternFlowGreReserved0) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{827} } -func (x *PatternFlowMplsTimeToLive) GetChoice() PatternFlowMplsTimeToLive_Choice_Enum { +func (x *PatternFlowGreReserved0) GetChoice() PatternFlowGreReserved0_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowMplsTimeToLive_Choice_unspecified + return PatternFlowGreReserved0_Choice_unspecified } -func (x *PatternFlowMplsTimeToLive) GetValue() uint32 { +func (x *PatternFlowGreReserved0) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowMplsTimeToLive) GetValues() []uint32 { +func (x *PatternFlowGreReserved0) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowMplsTimeToLive) GetIncrement() *PatternFlowMplsTimeToLiveCounter { +func (x *PatternFlowGreReserved0) GetIncrement() *PatternFlowGreReserved0Counter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowMplsTimeToLive) GetDecrement() *PatternFlowMplsTimeToLiveCounter { +func (x *PatternFlowGreReserved0) GetDecrement() *PatternFlowGreReserved0Counter { if x != nil { return x.Decrement } return nil } -func (x *PatternFlowMplsTimeToLive) GetMetricTags() []*PatternFlowMplsTimeToLiveMetricTag { +func (x *PatternFlowGreReserved0) GetMetricTags() []*PatternFlowGreReserved0MetricTag { if x != nil { return x.MetricTags } @@ -92393,13 +93827,13 @@ func (x *PatternFlowMplsTimeToLive) GetMetricTags() []*PatternFlowMplsTimeToLive } // integer counter pattern -type PatternFlowSnmpv2CVersionCounter struct { +type PatternFlowGreVersionCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 1 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -92409,23 +93843,23 @@ type PatternFlowSnmpv2CVersionCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowSnmpv2CVersionCounter) Reset() { - *x = PatternFlowSnmpv2CVersionCounter{} +func (x *PatternFlowGreVersionCounter) Reset() { + *x = PatternFlowGreVersionCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[843] + mi := &file_otg_proto_msgTypes[828] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVersionCounter) String() string { +func (x *PatternFlowGreVersionCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVersionCounter) ProtoMessage() {} +func (*PatternFlowGreVersionCounter) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVersionCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[843] +func (x *PatternFlowGreVersionCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[828] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -92436,70 +93870,148 @@ func (x *PatternFlowSnmpv2CVersionCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVersionCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVersionCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{843} +// Deprecated: Use PatternFlowGreVersionCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGreVersionCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{828} } -func (x *PatternFlowSnmpv2CVersionCounter) GetStart() uint32 { +func (x *PatternFlowGreVersionCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowSnmpv2CVersionCounter) GetStep() uint32 { +func (x *PatternFlowGreVersionCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowSnmpv2CVersionCounter) GetCount() uint32 { +func (x *PatternFlowGreVersionCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Version -type PatternFlowSnmpv2CVersion struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGreVersionMetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 3 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGreVersionMetricTag) Reset() { + *x = PatternFlowGreVersionMetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[829] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGreVersionMetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGreVersionMetricTag) ProtoMessage() {} + +func (x *PatternFlowGreVersionMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[829] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGreVersionMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGreVersionMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{829} +} + +func (x *PatternFlowGreVersionMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGreVersionMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGreVersionMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// GRE version number +type PatternFlowGreVersion struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowSnmpv2CVersion_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CVersion_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGreVersion_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGreVersion_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [1] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowSnmpv2CVersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGreVersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowSnmpv2CVersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGreVersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGreVersionMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowSnmpv2CVersion) Reset() { - *x = PatternFlowSnmpv2CVersion{} +func (x *PatternFlowGreVersion) Reset() { + *x = PatternFlowGreVersion{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[844] + mi := &file_otg_proto_msgTypes[830] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVersion) String() string { +func (x *PatternFlowGreVersion) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVersion) ProtoMessage() {} +func (*PatternFlowGreVersion) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVersion) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[844] +func (x *PatternFlowGreVersion) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[830] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -92510,80 +94022,87 @@ func (x *PatternFlowSnmpv2CVersion) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVersion.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVersion) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{844} +// Deprecated: Use PatternFlowGreVersion.ProtoReflect.Descriptor instead. +func (*PatternFlowGreVersion) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{830} } -func (x *PatternFlowSnmpv2CVersion) GetChoice() PatternFlowSnmpv2CVersion_Choice_Enum { +func (x *PatternFlowGreVersion) GetChoice() PatternFlowGreVersion_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowSnmpv2CVersion_Choice_unspecified + return PatternFlowGreVersion_Choice_unspecified } -func (x *PatternFlowSnmpv2CVersion) GetValue() uint32 { +func (x *PatternFlowGreVersion) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowSnmpv2CVersion) GetValues() []uint32 { +func (x *PatternFlowGreVersion) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowSnmpv2CVersion) GetIncrement() *PatternFlowSnmpv2CVersionCounter { +func (x *PatternFlowGreVersion) GetIncrement() *PatternFlowGreVersionCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowSnmpv2CVersion) GetDecrement() *PatternFlowSnmpv2CVersionCounter { +func (x *PatternFlowGreVersion) GetDecrement() *PatternFlowGreVersionCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGreVersion) GetMetricTags() []*PatternFlowGreVersionMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowSnmpv2CPDURequestIdCounter struct { +type PatternFlowGreProtocolCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *int32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = 2048 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 - Step *int32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 - Count *int32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowSnmpv2CPDURequestIdCounter) Reset() { - *x = PatternFlowSnmpv2CPDURequestIdCounter{} +func (x *PatternFlowGreProtocolCounter) Reset() { + *x = PatternFlowGreProtocolCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[845] + mi := &file_otg_proto_msgTypes[831] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CPDURequestIdCounter) String() string { +func (x *PatternFlowGreProtocolCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CPDURequestIdCounter) ProtoMessage() {} +func (*PatternFlowGreProtocolCounter) ProtoMessage() {} -func (x *PatternFlowSnmpv2CPDURequestIdCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[845] +func (x *PatternFlowGreProtocolCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[831] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -92594,75 +94113,70 @@ func (x *PatternFlowSnmpv2CPDURequestIdCounter) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CPDURequestIdCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CPDURequestIdCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{845} +// Deprecated: Use PatternFlowGreProtocolCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGreProtocolCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{831} } -func (x *PatternFlowSnmpv2CPDURequestIdCounter) GetStart() int32 { +func (x *PatternFlowGreProtocolCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowSnmpv2CPDURequestIdCounter) GetStep() int32 { +func (x *PatternFlowGreProtocolCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowSnmpv2CPDURequestIdCounter) GetCount() int32 { +func (x *PatternFlowGreProtocolCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Identifies a particular SNMP request. -// This index is echoed back in the response from the SNMP agent, -// allowing the SNMP manager to match an incoming response to the appropriate request. -// -// - Encoding of this field follows ASN.1 X.690(section 8.3) specification. -// Refer: http://www.itu.int/ITU-T/asn1/ -type PatternFlowSnmpv2CPDURequestId struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGreProtocolMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowSnmpv2CPDURequestId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CPDURequestId_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field // default = 0 - Value *int32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []int32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowSnmpv2CPDURequestIdCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowSnmpv2CPDURequestIdCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowSnmpv2CPDURequestId) Reset() { - *x = PatternFlowSnmpv2CPDURequestId{} +func (x *PatternFlowGreProtocolMetricTag) Reset() { + *x = PatternFlowGreProtocolMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[846] + mi := &file_otg_proto_msgTypes[832] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CPDURequestId) String() string { +func (x *PatternFlowGreProtocolMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CPDURequestId) ProtoMessage() {} +func (*PatternFlowGreProtocolMetricTag) ProtoMessage() {} -func (x *PatternFlowSnmpv2CPDURequestId) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[846] +func (x *PatternFlowGreProtocolMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[832] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -92673,80 +94187,79 @@ func (x *PatternFlowSnmpv2CPDURequestId) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CPDURequestId.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CPDURequestId) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{846} +// Deprecated: Use PatternFlowGreProtocolMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGreProtocolMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{832} } -func (x *PatternFlowSnmpv2CPDURequestId) GetChoice() PatternFlowSnmpv2CPDURequestId_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *PatternFlowGreProtocolMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return PatternFlowSnmpv2CPDURequestId_Choice_unspecified + return "" } -func (x *PatternFlowSnmpv2CPDURequestId) GetValue() int32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowGreProtocolMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowSnmpv2CPDURequestId) GetValues() []int32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowSnmpv2CPDURequestId) GetIncrement() *PatternFlowSnmpv2CPDURequestIdCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowSnmpv2CPDURequestId) GetDecrement() *PatternFlowSnmpv2CPDURequestIdCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowGreProtocolMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } - return nil + return 0 } -// integer counter pattern -type PatternFlowSnmpv2CPDUErrorIndexCounter struct { +// Protocol type of encapsulated payload +type PatternFlowGreProtocol struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = Choice.Enum.auto + Choice *PatternFlowGreProtocol_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGreProtocol_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 2048 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // default = [2048] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowGreProtocolCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowGreProtocolCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGreProtocolMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` + // The OTG implementation can provide a system generated + // value for this property. If the OTG is unable to generate a value + // the default value must be used. + // default = 2048 + Auto *uint32 `protobuf:"varint,8,opt,name=auto,proto3,oneof" json:"auto,omitempty"` } -func (x *PatternFlowSnmpv2CPDUErrorIndexCounter) Reset() { - *x = PatternFlowSnmpv2CPDUErrorIndexCounter{} +func (x *PatternFlowGreProtocol) Reset() { + *x = PatternFlowGreProtocol{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[847] + mi := &file_otg_proto_msgTypes[833] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CPDUErrorIndexCounter) String() string { +func (x *PatternFlowGreProtocol) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CPDUErrorIndexCounter) ProtoMessage() {} +func (*PatternFlowGreProtocol) ProtoMessage() {} -func (x *PatternFlowSnmpv2CPDUErrorIndexCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[847] +func (x *PatternFlowGreProtocol) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[833] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -92757,71 +94270,94 @@ func (x *PatternFlowSnmpv2CPDUErrorIndexCounter) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CPDUErrorIndexCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CPDUErrorIndexCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{847} +// Deprecated: Use PatternFlowGreProtocol.ProtoReflect.Descriptor instead. +func (*PatternFlowGreProtocol) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{833} } -func (x *PatternFlowSnmpv2CPDUErrorIndexCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowGreProtocol) GetChoice() PatternFlowGreProtocol_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return PatternFlowGreProtocol_Choice_unspecified } -func (x *PatternFlowSnmpv2CPDUErrorIndexCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowGreProtocol) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } return 0 } -func (x *PatternFlowSnmpv2CPDUErrorIndexCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowGreProtocol) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil +} + +func (x *PatternFlowGreProtocol) GetIncrement() *PatternFlowGreProtocolCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowGreProtocol) GetDecrement() *PatternFlowGreProtocolCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowGreProtocol) GetMetricTags() []*PatternFlowGreProtocolMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +func (x *PatternFlowGreProtocol) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto } return 0 } -// When Error Status is non-zero, this field contains a pointer that specifies which -// object generated the error. Always zero in a request. -type PatternFlowSnmpv2CPDUErrorIndex struct { +// Optional checksum of GRE header and payload. Only present if the checksum_present +// bit is set. +type PatternFlowGreChecksum struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowSnmpv2CPDUErrorIndexCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowSnmpv2CPDUErrorIndexCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // The type of checksum + // default = Choice.Enum.generated + Choice *PatternFlowGreChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGreChecksum_Choice_Enum,oneof" json:"choice,omitempty"` + // A system generated checksum value + // default = Generated.Enum.good + Generated *PatternFlowGreChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowGreChecksum_Generated_Enum,oneof" json:"generated,omitempty"` + // A custom checksum value + Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` } -func (x *PatternFlowSnmpv2CPDUErrorIndex) Reset() { - *x = PatternFlowSnmpv2CPDUErrorIndex{} +func (x *PatternFlowGreChecksum) Reset() { + *x = PatternFlowGreChecksum{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[848] + mi := &file_otg_proto_msgTypes[834] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CPDUErrorIndex) String() string { +func (x *PatternFlowGreChecksum) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CPDUErrorIndex) ProtoMessage() {} +func (*PatternFlowGreChecksum) ProtoMessage() {} -func (x *PatternFlowSnmpv2CPDUErrorIndex) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[848] +func (x *PatternFlowGreChecksum) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[834] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -92832,80 +94368,66 @@ func (x *PatternFlowSnmpv2CPDUErrorIndex) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CPDUErrorIndex.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CPDUErrorIndex) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{848} +// Deprecated: Use PatternFlowGreChecksum.ProtoReflect.Descriptor instead. +func (*PatternFlowGreChecksum) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{834} } -func (x *PatternFlowSnmpv2CPDUErrorIndex) GetChoice() PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum { +func (x *PatternFlowGreChecksum) GetChoice() PatternFlowGreChecksum_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowSnmpv2CPDUErrorIndex_Choice_unspecified -} - -func (x *PatternFlowSnmpv2CPDUErrorIndex) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowSnmpv2CPDUErrorIndex) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil + return PatternFlowGreChecksum_Choice_unspecified } -func (x *PatternFlowSnmpv2CPDUErrorIndex) GetIncrement() *PatternFlowSnmpv2CPDUErrorIndexCounter { - if x != nil { - return x.Increment +func (x *PatternFlowGreChecksum) GetGenerated() PatternFlowGreChecksum_Generated_Enum { + if x != nil && x.Generated != nil { + return *x.Generated } - return nil + return PatternFlowGreChecksum_Generated_unspecified } -func (x *PatternFlowSnmpv2CPDUErrorIndex) GetDecrement() *PatternFlowSnmpv2CPDUErrorIndexCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowGreChecksum) GetCustom() uint32 { + if x != nil && x.Custom != nil { + return *x.Custom } - return nil + return 0 } // integer counter pattern -type PatternFlowSnmpv2CBulkPDURequestIdCounter struct { +type PatternFlowGreReserved1Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = 0 - Start *int32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 - Step *int32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 - Count *int32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowSnmpv2CBulkPDURequestIdCounter) Reset() { - *x = PatternFlowSnmpv2CBulkPDURequestIdCounter{} +func (x *PatternFlowGreReserved1Counter) Reset() { + *x = PatternFlowGreReserved1Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[849] + mi := &file_otg_proto_msgTypes[835] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CBulkPDURequestIdCounter) String() string { +func (x *PatternFlowGreReserved1Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CBulkPDURequestIdCounter) ProtoMessage() {} +func (*PatternFlowGreReserved1Counter) ProtoMessage() {} -func (x *PatternFlowSnmpv2CBulkPDURequestIdCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[849] +func (x *PatternFlowGreReserved1Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[835] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -92916,75 +94438,70 @@ func (x *PatternFlowSnmpv2CBulkPDURequestIdCounter) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CBulkPDURequestIdCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CBulkPDURequestIdCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{849} +// Deprecated: Use PatternFlowGreReserved1Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowGreReserved1Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{835} } -func (x *PatternFlowSnmpv2CBulkPDURequestIdCounter) GetStart() int32 { +func (x *PatternFlowGreReserved1Counter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowSnmpv2CBulkPDURequestIdCounter) GetStep() int32 { +func (x *PatternFlowGreReserved1Counter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowSnmpv2CBulkPDURequestIdCounter) GetCount() int32 { +func (x *PatternFlowGreReserved1Counter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Identifies a particular SNMP request. -// This index is echoed back in the response from the SNMP agent, -// allowing the SNMP manager to match an incoming response to the appropriate request. -// -// - Encoding of this field follows ASN.1 X.690(section 8.3) specification. -// Refer: http://www.itu.int/ITU-T/asn1/ -type PatternFlowSnmpv2CBulkPDURequestId struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGreReserved1MetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field // default = 0 - Value *int32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []int32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowSnmpv2CBulkPDURequestIdCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowSnmpv2CBulkPDURequestIdCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowSnmpv2CBulkPDURequestId) Reset() { - *x = PatternFlowSnmpv2CBulkPDURequestId{} +func (x *PatternFlowGreReserved1MetricTag) Reset() { + *x = PatternFlowGreReserved1MetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[850] + mi := &file_otg_proto_msgTypes[836] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CBulkPDURequestId) String() string { +func (x *PatternFlowGreReserved1MetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CBulkPDURequestId) ProtoMessage() {} +func (*PatternFlowGreReserved1MetricTag) ProtoMessage() {} -func (x *PatternFlowSnmpv2CBulkPDURequestId) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[850] +func (x *PatternFlowGreReserved1MetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[836] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -92995,81 +94512,74 @@ func (x *PatternFlowSnmpv2CBulkPDURequestId) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CBulkPDURequestId.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CBulkPDURequestId) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{850} +// Deprecated: Use PatternFlowGreReserved1MetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGreReserved1MetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{836} } -func (x *PatternFlowSnmpv2CBulkPDURequestId) GetChoice() PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *PatternFlowGreReserved1MetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return PatternFlowSnmpv2CBulkPDURequestId_Choice_unspecified + return "" } -func (x *PatternFlowSnmpv2CBulkPDURequestId) GetValue() int32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowGreReserved1MetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowSnmpv2CBulkPDURequestId) GetValues() []int32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowSnmpv2CBulkPDURequestId) GetIncrement() *PatternFlowSnmpv2CBulkPDURequestIdCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowSnmpv2CBulkPDURequestId) GetDecrement() *PatternFlowSnmpv2CBulkPDURequestIdCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowGreReserved1MetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } - return nil + return 0 } -// One variable binding in the Response-PDU is requested for the first non_repeaters -// variable bindings in the GetBulkRequest. -type PatternFlowSnmpv2CBulkPDUNonRepeaters struct { +// Optional reserved field. Only present if the checksum_present bit is set. +type PatternFlowGreReserved1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGreReserved1_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGreReserved1_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowGreReserved1Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowGreReserved1Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGreReserved1MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters) Reset() { - *x = PatternFlowSnmpv2CBulkPDUNonRepeaters{} +func (x *PatternFlowGreReserved1) Reset() { + *x = PatternFlowGreReserved1{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[851] + mi := &file_otg_proto_msgTypes[837] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters) String() string { +func (x *PatternFlowGreReserved1) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CBulkPDUNonRepeaters) ProtoMessage() {} +func (*PatternFlowGreReserved1) ProtoMessage() {} -func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[851] +func (x *PatternFlowGreReserved1) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[837] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -93080,40 +94590,61 @@ func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CBulkPDUNonRepeaters.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CBulkPDUNonRepeaters) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{851} +// Deprecated: Use PatternFlowGreReserved1.ProtoReflect.Descriptor instead. +func (*PatternFlowGreReserved1) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{837} } -func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters) GetChoice() PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum { +func (x *PatternFlowGreReserved1) GetChoice() PatternFlowGreReserved1_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_unspecified + return PatternFlowGreReserved1_Choice_unspecified } -func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters) GetValue() uint32 { +func (x *PatternFlowGreReserved1) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters) GetValues() []uint32 { +func (x *PatternFlowGreReserved1) GetValues() []uint32 { if x != nil { return x.Values } return nil } +func (x *PatternFlowGreReserved1) GetIncrement() *PatternFlowGreReserved1Counter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowGreReserved1) GetDecrement() *PatternFlowGreReserved1Counter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowGreReserved1) GetMetricTags() []*PatternFlowGreReserved1MetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter struct { +type PatternFlowGtpv1VersionCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 + // default = 1 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -93123,23 +94654,23 @@ type PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) Reset() { - *x = PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter{} +func (x *PatternFlowGtpv1VersionCounter) Reset() { + *x = PatternFlowGtpv1VersionCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[852] + mi := &file_otg_proto_msgTypes[838] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) String() string { +func (x *PatternFlowGtpv1VersionCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) ProtoMessage() {} +func (*PatternFlowGtpv1VersionCounter) ProtoMessage() {} -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[852] +func (x *PatternFlowGtpv1VersionCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[838] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -93150,72 +94681,70 @@ func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) ProtoReflect() protoref return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{852} +// Deprecated: Use PatternFlowGtpv1VersionCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1VersionCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{838} } -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) GetStart() uint32 { +func (x *PatternFlowGtpv1VersionCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) GetStep() uint32 { +func (x *PatternFlowGtpv1VersionCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) GetCount() uint32 { +func (x *PatternFlowGtpv1VersionCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// A maximum of max_repetitions variable bindings are requested in the Response-PDU -// for each of the remaining variable bindings in the GetBulkRequest after the non_repeaters -// variable bindings. -type PatternFlowSnmpv2CBulkPDUMaxRepetitions struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv1VersionMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 3 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) Reset() { - *x = PatternFlowSnmpv2CBulkPDUMaxRepetitions{} +func (x *PatternFlowGtpv1VersionMetricTag) Reset() { + *x = PatternFlowGtpv1VersionMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[853] + mi := &file_otg_proto_msgTypes[839] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) String() string { +func (x *PatternFlowGtpv1VersionMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CBulkPDUMaxRepetitions) ProtoMessage() {} +func (*PatternFlowGtpv1VersionMetricTag) ProtoMessage() {} -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[853] +func (x *PatternFlowGtpv1VersionMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[839] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -93226,80 +94755,74 @@ func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CBulkPDUMaxRepetitions.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CBulkPDUMaxRepetitions) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{853} +// Deprecated: Use PatternFlowGtpv1VersionMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1VersionMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{839} } -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) GetChoice() PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *PatternFlowGtpv1VersionMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_unspecified + return "" } -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowGtpv1VersionMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *PatternFlowGtpv1VersionMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } - return nil -} - -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) GetIncrement() *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) GetDecrement() *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter { - if x != nil { - return x.Decrement - } - return nil + return 0 } -// integer counter pattern -type PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter struct { +// GTPv1 version +type PatternFlowGtpv1Version struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *int32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = Choice.Enum.value + Choice *PatternFlowGtpv1Version_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1Version_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 1 - Step *int32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = 1 - Count *int32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // default = [1] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowGtpv1VersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowGtpv1VersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv1VersionMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter{} +func (x *PatternFlowGtpv1Version) Reset() { + *x = PatternFlowGtpv1Version{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[854] + mi := &file_otg_proto_msgTypes[840] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) String() string { +func (x *PatternFlowGtpv1Version) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) ProtoMessage() {} +func (*PatternFlowGtpv1Version) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[854] +func (x *PatternFlowGtpv1Version) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[840] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -93310,70 +94833,87 @@ func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) ProtoReflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{854} +// Deprecated: Use PatternFlowGtpv1Version.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1Version) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{840} } -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) GetStart() int32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowGtpv1Version) GetChoice() PatternFlowGtpv1Version_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return PatternFlowGtpv1Version_Choice_unspecified } -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) GetStep() int32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowGtpv1Version) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) GetCount() int32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowGtpv1Version) GetValues() []uint32 { + if x != nil { + return x.Values } - return 0 + return nil } -// Integer value returned for the requested OID. -type PatternFlowSnmpv2CVariableBindingValueIntegerValue struct { +func (x *PatternFlowGtpv1Version) GetIncrement() *PatternFlowGtpv1VersionCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowGtpv1Version) GetDecrement() *PatternFlowGtpv1VersionCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowGtpv1Version) GetMetricTags() []*PatternFlowGtpv1VersionMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowGtpv1ProtocolTypeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *int32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []int32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = 1 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - Increment *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models - Decrement *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueIntegerValue{} +func (x *PatternFlowGtpv1ProtocolTypeCounter) Reset() { + *x = PatternFlowGtpv1ProtocolTypeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[855] + mi := &file_otg_proto_msgTypes[841] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) String() string { +func (x *PatternFlowGtpv1ProtocolTypeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueIntegerValue) ProtoMessage() {} +func (*PatternFlowGtpv1ProtocolTypeCounter) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[855] +func (x *PatternFlowGtpv1ProtocolTypeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[841] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -93384,80 +94924,70 @@ func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) ProtoReflect() prot return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueIntegerValue.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueIntegerValue) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{855} -} - -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) GetChoice() PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_unspecified +// Deprecated: Use PatternFlowGtpv1ProtocolTypeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1ProtocolTypeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{841} } -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) GetValue() int32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowGtpv1ProtocolTypeCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) GetValues() []int32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) GetIncrement() *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter { - if x != nil { - return x.Increment +func (x *PatternFlowGtpv1ProtocolTypeCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step } - return nil + return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) GetDecrement() *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowGtpv1ProtocolTypeCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count } - return nil + return 0 } -// ipv4 counter pattern -type PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv1ProtocolTypeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0.0.0.0 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 0.0.0.1 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter{} +func (x *PatternFlowGtpv1ProtocolTypeMetricTag) Reset() { + *x = PatternFlowGtpv1ProtocolTypeMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[856] + mi := &file_otg_proto_msgTypes[842] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) String() string { +func (x *PatternFlowGtpv1ProtocolTypeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) ProtoMessage() {} +func (*PatternFlowGtpv1ProtocolTypeMetricTag) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[856] +func (x *PatternFlowGtpv1ProtocolTypeMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[842] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -93468,70 +94998,74 @@ func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) ProtoRefle return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{856} +// Deprecated: Use PatternFlowGtpv1ProtocolTypeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1ProtocolTypeMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{842} } -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) GetStart() string { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowGtpv1ProtocolTypeMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } return "" } -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) GetStep() string { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowGtpv1ProtocolTypeMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } - return "" + return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowGtpv1ProtocolTypeMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } return 0 } -// IPv4 address returned for the requested OID. -type PatternFlowSnmpv2CVariableBindingValueIpAddressValue struct { +// Protocol type, GTP is 1, GTP' is 0 +type PatternFlowGtpv1ProtocolType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv1ProtocolType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1ProtocolType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0.0.0.0 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 1 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = ['0.0.0.0'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // default = [1] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv1ProtocolTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv1ProtocolTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv1ProtocolTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueIpAddressValue{} +func (x *PatternFlowGtpv1ProtocolType) Reset() { + *x = PatternFlowGtpv1ProtocolType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[857] + mi := &file_otg_proto_msgTypes[843] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) String() string { +func (x *PatternFlowGtpv1ProtocolType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueIpAddressValue) ProtoMessage() {} +func (*PatternFlowGtpv1ProtocolType) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[857] +func (x *PatternFlowGtpv1ProtocolType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[843] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -93542,48 +95076,55 @@ func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) ProtoReflect() pr return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueIpAddressValue.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueIpAddressValue) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{857} +// Deprecated: Use PatternFlowGtpv1ProtocolType.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1ProtocolType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{843} } -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) GetChoice() PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum { +func (x *PatternFlowGtpv1ProtocolType) GetChoice() PatternFlowGtpv1ProtocolType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_unspecified + return PatternFlowGtpv1ProtocolType_Choice_unspecified } -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) GetValue() string { +func (x *PatternFlowGtpv1ProtocolType) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } - return "" + return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) GetValues() []string { +func (x *PatternFlowGtpv1ProtocolType) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) GetIncrement() *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter { +func (x *PatternFlowGtpv1ProtocolType) GetIncrement() *PatternFlowGtpv1ProtocolTypeCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) GetDecrement() *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter { +func (x *PatternFlowGtpv1ProtocolType) GetDecrement() *PatternFlowGtpv1ProtocolTypeCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv1ProtocolType) GetMetricTags() []*PatternFlowGtpv1ProtocolTypeMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowSnmpv2CVariableBindingValueCounterValueCounter struct { +type PatternFlowGtpv1ReservedCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -93599,23 +95140,23 @@ type PatternFlowSnmpv2CVariableBindingValueCounterValueCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueCounterValueCounter{} +func (x *PatternFlowGtpv1ReservedCounter) Reset() { + *x = PatternFlowGtpv1ReservedCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[858] + mi := &file_otg_proto_msgTypes[844] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) String() string { +func (x *PatternFlowGtpv1ReservedCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) ProtoMessage() {} +func (*PatternFlowGtpv1ReservedCounter) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[858] +func (x *PatternFlowGtpv1ReservedCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[844] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -93626,41 +95167,115 @@ func (x *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) ProtoReflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueCounterValueCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{858} +// Deprecated: Use PatternFlowGtpv1ReservedCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1ReservedCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{844} } -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) GetStart() uint32 { +func (x *PatternFlowGtpv1ReservedCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) GetStep() uint32 { +func (x *PatternFlowGtpv1ReservedCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) GetCount() uint32 { +func (x *PatternFlowGtpv1ReservedCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Counter returned for the requested OID. -type PatternFlowSnmpv2CVariableBindingValueCounterValue struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv1ReservedMetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 1 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpv1ReservedMetricTag) Reset() { + *x = PatternFlowGtpv1ReservedMetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[845] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1ReservedMetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1ReservedMetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpv1ReservedMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[845] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1ReservedMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1ReservedMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{845} +} + +func (x *PatternFlowGtpv1ReservedMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpv1ReservedMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpv1ReservedMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// Reserved field +type PatternFlowGtpv1Reserved struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv1Reserved_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1Reserved_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -93668,28 +95283,32 @@ type PatternFlowSnmpv2CVariableBindingValueCounterValue struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv1ReservedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv1ReservedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv1ReservedMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueCounterValue{} +func (x *PatternFlowGtpv1Reserved) Reset() { + *x = PatternFlowGtpv1Reserved{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[859] + mi := &file_otg_proto_msgTypes[846] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) String() string { +func (x *PatternFlowGtpv1Reserved) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueCounterValue) ProtoMessage() {} +func (*PatternFlowGtpv1Reserved) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[859] +func (x *PatternFlowGtpv1Reserved) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[846] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -93700,48 +95319,55 @@ func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) ProtoReflect() prot return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueCounterValue.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueCounterValue) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{859} +// Deprecated: Use PatternFlowGtpv1Reserved.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1Reserved) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{846} } -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) GetChoice() PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum { +func (x *PatternFlowGtpv1Reserved) GetChoice() PatternFlowGtpv1Reserved_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_unspecified + return PatternFlowGtpv1Reserved_Choice_unspecified } -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) GetValue() uint32 { +func (x *PatternFlowGtpv1Reserved) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) GetValues() []uint32 { +func (x *PatternFlowGtpv1Reserved) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) GetIncrement() *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter { +func (x *PatternFlowGtpv1Reserved) GetIncrement() *PatternFlowGtpv1ReservedCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) GetDecrement() *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter { +func (x *PatternFlowGtpv1Reserved) GetDecrement() *PatternFlowGtpv1ReservedCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv1Reserved) GetMetricTags() []*PatternFlowGtpv1ReservedMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter struct { +type PatternFlowGtpv1EFlagCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -93757,23 +95383,23 @@ type PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter{} +func (x *PatternFlowGtpv1EFlagCounter) Reset() { + *x = PatternFlowGtpv1EFlagCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[860] + mi := &file_otg_proto_msgTypes[847] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) String() string { +func (x *PatternFlowGtpv1EFlagCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) ProtoMessage() {} +func (*PatternFlowGtpv1EFlagCounter) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[860] +func (x *PatternFlowGtpv1EFlagCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[847] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -93784,41 +95410,115 @@ func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) ProtoRefle return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{860} +// Deprecated: Use PatternFlowGtpv1EFlagCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1EFlagCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{847} } -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) GetStart() uint32 { +func (x *PatternFlowGtpv1EFlagCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) GetStep() uint32 { +func (x *PatternFlowGtpv1EFlagCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) GetCount() uint32 { +func (x *PatternFlowGtpv1EFlagCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Timeticks returned for the requested OID. -type PatternFlowSnmpv2CVariableBindingValueTimeticksValue struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv1EFlagMetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 1 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpv1EFlagMetricTag) Reset() { + *x = PatternFlowGtpv1EFlagMetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[848] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1EFlagMetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1EFlagMetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpv1EFlagMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[848] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1EFlagMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1EFlagMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{848} +} + +func (x *PatternFlowGtpv1EFlagMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpv1EFlagMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpv1EFlagMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// Extension header field present +type PatternFlowGtpv1EFlag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv1EFlag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1EFlag_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -93826,28 +95526,32 @@ type PatternFlowSnmpv2CVariableBindingValueTimeticksValue struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv1EFlagCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv1EFlagCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv1EFlagMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueTimeticksValue{} +func (x *PatternFlowGtpv1EFlag) Reset() { + *x = PatternFlowGtpv1EFlag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[861] + mi := &file_otg_proto_msgTypes[849] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) String() string { +func (x *PatternFlowGtpv1EFlag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueTimeticksValue) ProtoMessage() {} +func (*PatternFlowGtpv1EFlag) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[861] +func (x *PatternFlowGtpv1EFlag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[849] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -93858,80 +95562,87 @@ func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) ProtoReflect() pr return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueTimeticksValue.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueTimeticksValue) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{861} +// Deprecated: Use PatternFlowGtpv1EFlag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1EFlag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{849} } -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) GetChoice() PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum { +func (x *PatternFlowGtpv1EFlag) GetChoice() PatternFlowGtpv1EFlag_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_unspecified + return PatternFlowGtpv1EFlag_Choice_unspecified } -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) GetValue() uint32 { +func (x *PatternFlowGtpv1EFlag) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) GetValues() []uint32 { +func (x *PatternFlowGtpv1EFlag) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) GetIncrement() *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter { +func (x *PatternFlowGtpv1EFlag) GetIncrement() *PatternFlowGtpv1EFlagCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) GetDecrement() *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter { +func (x *PatternFlowGtpv1EFlag) GetDecrement() *PatternFlowGtpv1EFlagCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv1EFlag) GetMetricTags() []*PatternFlowGtpv1EFlagMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter struct { +type PatternFlowGtpv1SFlagCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = 0 - Start *uint64 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 - Step *uint64 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 - Count *uint64 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter{} +func (x *PatternFlowGtpv1SFlagCounter) Reset() { + *x = PatternFlowGtpv1SFlagCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[862] + mi := &file_otg_proto_msgTypes[850] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) String() string { +func (x *PatternFlowGtpv1SFlagCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) ProtoMessage() {} +func (*PatternFlowGtpv1SFlagCounter) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[862] +func (x *PatternFlowGtpv1SFlagCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[850] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -93942,70 +95653,148 @@ func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) ProtoRefl return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{862} +// Deprecated: Use PatternFlowGtpv1SFlagCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1SFlagCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{850} } -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) GetStart() uint64 { +func (x *PatternFlowGtpv1SFlagCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) GetStep() uint64 { +func (x *PatternFlowGtpv1SFlagCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) GetCount() uint64 { +func (x *PatternFlowGtpv1SFlagCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Big counter returned for the requested OID. -type PatternFlowSnmpv2CVariableBindingValueBigCounterValue struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv1SFlagMetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 1 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpv1SFlagMetricTag) Reset() { + *x = PatternFlowGtpv1SFlagMetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[851] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1SFlagMetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1SFlagMetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpv1SFlagMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[851] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1SFlagMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1SFlagMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{851} +} + +func (x *PatternFlowGtpv1SFlagMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpv1SFlagMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpv1SFlagMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// Sequence number field present +type PatternFlowGtpv1SFlag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv1SFlag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1SFlag_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 - Value *uint64 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models // default = [0] - Values []uint64 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv1SFlagCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv1SFlagCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv1SFlagMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueBigCounterValue{} +func (x *PatternFlowGtpv1SFlag) Reset() { + *x = PatternFlowGtpv1SFlag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[863] + mi := &file_otg_proto_msgTypes[852] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) String() string { +func (x *PatternFlowGtpv1SFlag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueBigCounterValue) ProtoMessage() {} +func (*PatternFlowGtpv1SFlag) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[863] +func (x *PatternFlowGtpv1SFlag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[852] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -94016,48 +95805,55 @@ func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueBigCounterValue.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueBigCounterValue) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{863} +// Deprecated: Use PatternFlowGtpv1SFlag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1SFlag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{852} } -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) GetChoice() PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum { +func (x *PatternFlowGtpv1SFlag) GetChoice() PatternFlowGtpv1SFlag_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_unspecified + return PatternFlowGtpv1SFlag_Choice_unspecified } -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) GetValue() uint64 { +func (x *PatternFlowGtpv1SFlag) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) GetValues() []uint64 { +func (x *PatternFlowGtpv1SFlag) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) GetIncrement() *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter { +func (x *PatternFlowGtpv1SFlag) GetIncrement() *PatternFlowGtpv1SFlagCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) GetDecrement() *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter { +func (x *PatternFlowGtpv1SFlag) GetDecrement() *PatternFlowGtpv1SFlagCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv1SFlag) GetMetricTags() []*PatternFlowGtpv1SFlagMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter struct { +type PatternFlowGtpv1PnFlagCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -94073,23 +95869,23 @@ type PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter{} +func (x *PatternFlowGtpv1PnFlagCounter) Reset() { + *x = PatternFlowGtpv1PnFlagCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[864] + mi := &file_otg_proto_msgTypes[853] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) String() string { +func (x *PatternFlowGtpv1PnFlagCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) ProtoMessage() {} +func (*PatternFlowGtpv1PnFlagCounter) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[864] +func (x *PatternFlowGtpv1PnFlagCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[853] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -94100,41 +95896,115 @@ func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) Prot return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{864} +// Deprecated: Use PatternFlowGtpv1PnFlagCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1PnFlagCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{853} } -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) GetStart() uint32 { +func (x *PatternFlowGtpv1PnFlagCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) GetStep() uint32 { +func (x *PatternFlowGtpv1PnFlagCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) GetCount() uint32 { +func (x *PatternFlowGtpv1PnFlagCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Unsigned integer value returned for the requested OID. -type PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv1PnFlagMetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 1 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpv1PnFlagMetricTag) Reset() { + *x = PatternFlowGtpv1PnFlagMetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[854] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1PnFlagMetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1PnFlagMetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpv1PnFlagMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[854] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1PnFlagMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1PnFlagMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{854} +} + +func (x *PatternFlowGtpv1PnFlagMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpv1PnFlagMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpv1PnFlagMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// N-PDU field present +type PatternFlowGtpv1PnFlag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv1PnFlag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1PnFlag_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -94142,28 +96012,32 @@ type PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv1PnFlagCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv1PnFlagCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv1PnFlagMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue{} +func (x *PatternFlowGtpv1PnFlag) Reset() { + *x = PatternFlowGtpv1PnFlag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[865] + mi := &file_otg_proto_msgTypes[855] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) String() string { +func (x *PatternFlowGtpv1PnFlag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) ProtoMessage() {} +func (*PatternFlowGtpv1PnFlag) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[865] +func (x *PatternFlowGtpv1PnFlag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[855] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -94174,80 +96048,87 @@ func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) ProtoReflec return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{865} +// Deprecated: Use PatternFlowGtpv1PnFlag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1PnFlag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{855} } -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) GetChoice() PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum { +func (x *PatternFlowGtpv1PnFlag) GetChoice() PatternFlowGtpv1PnFlag_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_unspecified + return PatternFlowGtpv1PnFlag_Choice_unspecified } -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) GetValue() uint32 { +func (x *PatternFlowGtpv1PnFlag) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) GetValues() []uint32 { +func (x *PatternFlowGtpv1PnFlag) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) GetIncrement() *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter { +func (x *PatternFlowGtpv1PnFlag) GetIncrement() *PatternFlowGtpv1PnFlagCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) GetDecrement() *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter { +func (x *PatternFlowGtpv1PnFlag) GetDecrement() *PatternFlowGtpv1PnFlagCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv1PnFlag) GetMetricTags() []*PatternFlowGtpv1PnFlagMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowSnmpv2CCommonRequestIdCounter struct { +type PatternFlowGtpv1MessageTypeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = 0 - Start *int32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 - Step *int32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 - Count *int32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowSnmpv2CCommonRequestIdCounter) Reset() { - *x = PatternFlowSnmpv2CCommonRequestIdCounter{} +func (x *PatternFlowGtpv1MessageTypeCounter) Reset() { + *x = PatternFlowGtpv1MessageTypeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[866] + mi := &file_otg_proto_msgTypes[856] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CCommonRequestIdCounter) String() string { +func (x *PatternFlowGtpv1MessageTypeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CCommonRequestIdCounter) ProtoMessage() {} +func (*PatternFlowGtpv1MessageTypeCounter) ProtoMessage() {} -func (x *PatternFlowSnmpv2CCommonRequestIdCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[866] +func (x *PatternFlowGtpv1MessageTypeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[856] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -94258,75 +96139,70 @@ func (x *PatternFlowSnmpv2CCommonRequestIdCounter) ProtoReflect() protoreflect.M return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CCommonRequestIdCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CCommonRequestIdCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{866} +// Deprecated: Use PatternFlowGtpv1MessageTypeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1MessageTypeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{856} } -func (x *PatternFlowSnmpv2CCommonRequestIdCounter) GetStart() int32 { +func (x *PatternFlowGtpv1MessageTypeCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowSnmpv2CCommonRequestIdCounter) GetStep() int32 { +func (x *PatternFlowGtpv1MessageTypeCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowSnmpv2CCommonRequestIdCounter) GetCount() int32 { +func (x *PatternFlowGtpv1MessageTypeCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Identifies a particular SNMP request. -// This index is echoed back in the response from the SNMP agent, -// allowing the SNMP manager to match an incoming response to the appropriate request. -// -// - Encoding of this field follows ASN.1 X.690(section 8.3) specification. -// Refer: http://www.itu.int/ITU-T/asn1/ -type PatternFlowSnmpv2CCommonRequestId struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv1MessageTypeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowSnmpv2CCommonRequestId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CCommonRequestId_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field // default = 0 - Value *int32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []int32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowSnmpv2CCommonRequestIdCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowSnmpv2CCommonRequestIdCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowSnmpv2CCommonRequestId) Reset() { - *x = PatternFlowSnmpv2CCommonRequestId{} +func (x *PatternFlowGtpv1MessageTypeMetricTag) Reset() { + *x = PatternFlowGtpv1MessageTypeMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[867] + mi := &file_otg_proto_msgTypes[857] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CCommonRequestId) String() string { +func (x *PatternFlowGtpv1MessageTypeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CCommonRequestId) ProtoMessage() {} +func (*PatternFlowGtpv1MessageTypeMetricTag) ProtoMessage() {} -func (x *PatternFlowSnmpv2CCommonRequestId) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[867] +func (x *PatternFlowGtpv1MessageTypeMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[857] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -94337,81 +96213,75 @@ func (x *PatternFlowSnmpv2CCommonRequestId) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CCommonRequestId.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CCommonRequestId) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{867} +// Deprecated: Use PatternFlowGtpv1MessageTypeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1MessageTypeMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{857} } -func (x *PatternFlowSnmpv2CCommonRequestId) GetChoice() PatternFlowSnmpv2CCommonRequestId_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *PatternFlowGtpv1MessageTypeMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return PatternFlowSnmpv2CCommonRequestId_Choice_unspecified + return "" } -func (x *PatternFlowSnmpv2CCommonRequestId) GetValue() int32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowGtpv1MessageTypeMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowSnmpv2CCommonRequestId) GetValues() []int32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowSnmpv2CCommonRequestId) GetIncrement() *PatternFlowSnmpv2CCommonRequestIdCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowSnmpv2CCommonRequestId) GetDecrement() *PatternFlowSnmpv2CCommonRequestIdCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowGtpv1MessageTypeMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } - return nil + return 0 } -// The one's complement of the one's complement sum of the message, with the checksum -// field replaced by zero for the purpose of computing the checksum. An all-zero value -// means that no checksum was transmitted. -type PatternFlowRsvpRsvpChecksum struct { +// The type of GTP message Different types of messages are defined in 3GPP TS 29.060 +// section 7.1 +type PatternFlowGtpv1MessageType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The type of checksum - // default = Choice.Enum.generated - Choice *PatternFlowRsvpRsvpChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRsvpRsvpChecksum_Choice_Enum,oneof" json:"choice,omitempty"` - // A system generated checksum value - // default = Generated.Enum.good - Generated *PatternFlowRsvpRsvpChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowRsvpRsvpChecksum_Generated_Enum,oneof" json:"generated,omitempty"` - // A custom checksum value - Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowGtpv1MessageType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1MessageType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowGtpv1MessageTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowGtpv1MessageTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv1MessageTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRsvpRsvpChecksum) Reset() { - *x = PatternFlowRsvpRsvpChecksum{} +func (x *PatternFlowGtpv1MessageType) Reset() { + *x = PatternFlowGtpv1MessageType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[868] + mi := &file_otg_proto_msgTypes[858] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRsvpRsvpChecksum) String() string { +func (x *PatternFlowGtpv1MessageType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRsvpRsvpChecksum) ProtoMessage() {} +func (*PatternFlowGtpv1MessageType) ProtoMessage() {} -func (x *PatternFlowRsvpRsvpChecksum) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[868] +func (x *PatternFlowGtpv1MessageType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[858] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -94422,40 +96292,61 @@ func (x *PatternFlowRsvpRsvpChecksum) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRsvpRsvpChecksum.ProtoReflect.Descriptor instead. -func (*PatternFlowRsvpRsvpChecksum) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{868} +// Deprecated: Use PatternFlowGtpv1MessageType.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1MessageType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{858} } -func (x *PatternFlowRsvpRsvpChecksum) GetChoice() PatternFlowRsvpRsvpChecksum_Choice_Enum { +func (x *PatternFlowGtpv1MessageType) GetChoice() PatternFlowGtpv1MessageType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRsvpRsvpChecksum_Choice_unspecified + return PatternFlowGtpv1MessageType_Choice_unspecified } -func (x *PatternFlowRsvpRsvpChecksum) GetGenerated() PatternFlowRsvpRsvpChecksum_Generated_Enum { - if x != nil && x.Generated != nil { - return *x.Generated +func (x *PatternFlowGtpv1MessageType) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } - return PatternFlowRsvpRsvpChecksum_Generated_unspecified + return 0 } -func (x *PatternFlowRsvpRsvpChecksum) GetCustom() uint32 { - if x != nil && x.Custom != nil { - return *x.Custom +func (x *PatternFlowGtpv1MessageType) GetValues() []uint32 { + if x != nil { + return x.Values } - return 0 + return nil +} + +func (x *PatternFlowGtpv1MessageType) GetIncrement() *PatternFlowGtpv1MessageTypeCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowGtpv1MessageType) GetDecrement() *PatternFlowGtpv1MessageTypeCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowGtpv1MessageType) GetMetricTags() []*PatternFlowGtpv1MessageTypeMetricTag { + if x != nil { + return x.MetricTags + } + return nil } // integer counter pattern -type PatternFlowRsvpTimeToLiveCounter struct { +type PatternFlowGtpv1MessageLengthCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 64 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -94465,23 +96356,23 @@ type PatternFlowRsvpTimeToLiveCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRsvpTimeToLiveCounter) Reset() { - *x = PatternFlowRsvpTimeToLiveCounter{} +func (x *PatternFlowGtpv1MessageLengthCounter) Reset() { + *x = PatternFlowGtpv1MessageLengthCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[869] + mi := &file_otg_proto_msgTypes[859] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRsvpTimeToLiveCounter) String() string { +func (x *PatternFlowGtpv1MessageLengthCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRsvpTimeToLiveCounter) ProtoMessage() {} +func (*PatternFlowGtpv1MessageLengthCounter) ProtoMessage() {} -func (x *PatternFlowRsvpTimeToLiveCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[869] +func (x *PatternFlowGtpv1MessageLengthCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[859] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -94492,70 +96383,149 @@ func (x *PatternFlowRsvpTimeToLiveCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRsvpTimeToLiveCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRsvpTimeToLiveCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{869} +// Deprecated: Use PatternFlowGtpv1MessageLengthCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1MessageLengthCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{859} } -func (x *PatternFlowRsvpTimeToLiveCounter) GetStart() uint32 { +func (x *PatternFlowGtpv1MessageLengthCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRsvpTimeToLiveCounter) GetStep() uint32 { +func (x *PatternFlowGtpv1MessageLengthCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRsvpTimeToLiveCounter) GetCount() uint32 { +func (x *PatternFlowGtpv1MessageLengthCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// The IP time-to-live(TTL) value with which the message was sent. -type PatternFlowRsvpTimeToLive struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv1MessageLengthMetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpv1MessageLengthMetricTag) Reset() { + *x = PatternFlowGtpv1MessageLengthMetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[860] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1MessageLengthMetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1MessageLengthMetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpv1MessageLengthMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[860] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1MessageLengthMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1MessageLengthMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{860} +} + +func (x *PatternFlowGtpv1MessageLengthMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpv1MessageLengthMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpv1MessageLengthMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// The length of the payload (the bytes following the mandatory 8-byte GTP header) in +// bytes that includes any optional fields +type PatternFlowGtpv1MessageLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRsvpTimeToLive_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRsvpTimeToLive_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv1MessageLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1MessageLength_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 64 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [64] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRsvpTimeToLiveCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv1MessageLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRsvpTimeToLiveCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv1MessageLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv1MessageLengthMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRsvpTimeToLive) Reset() { - *x = PatternFlowRsvpTimeToLive{} +func (x *PatternFlowGtpv1MessageLength) Reset() { + *x = PatternFlowGtpv1MessageLength{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[870] + mi := &file_otg_proto_msgTypes[861] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRsvpTimeToLive) String() string { +func (x *PatternFlowGtpv1MessageLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRsvpTimeToLive) ProtoMessage() {} +func (*PatternFlowGtpv1MessageLength) ProtoMessage() {} -func (x *PatternFlowRsvpTimeToLive) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[870] +func (x *PatternFlowGtpv1MessageLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[861] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -94566,48 +96536,55 @@ func (x *PatternFlowRsvpTimeToLive) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRsvpTimeToLive.ProtoReflect.Descriptor instead. -func (*PatternFlowRsvpTimeToLive) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{870} +// Deprecated: Use PatternFlowGtpv1MessageLength.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1MessageLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{861} } -func (x *PatternFlowRsvpTimeToLive) GetChoice() PatternFlowRsvpTimeToLive_Choice_Enum { +func (x *PatternFlowGtpv1MessageLength) GetChoice() PatternFlowGtpv1MessageLength_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRsvpTimeToLive_Choice_unspecified + return PatternFlowGtpv1MessageLength_Choice_unspecified } -func (x *PatternFlowRsvpTimeToLive) GetValue() uint32 { +func (x *PatternFlowGtpv1MessageLength) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowRsvpTimeToLive) GetValues() []uint32 { +func (x *PatternFlowGtpv1MessageLength) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRsvpTimeToLive) GetIncrement() *PatternFlowRsvpTimeToLiveCounter { +func (x *PatternFlowGtpv1MessageLength) GetIncrement() *PatternFlowGtpv1MessageLengthCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRsvpTimeToLive) GetDecrement() *PatternFlowRsvpTimeToLiveCounter { +func (x *PatternFlowGtpv1MessageLength) GetDecrement() *PatternFlowGtpv1MessageLengthCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv1MessageLength) GetMetricTags() []*PatternFlowGtpv1MessageLengthMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowRsvpReservedCounter struct { +type PatternFlowGtpv1TeidCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -94623,23 +96600,23 @@ type PatternFlowRsvpReservedCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRsvpReservedCounter) Reset() { - *x = PatternFlowRsvpReservedCounter{} +func (x *PatternFlowGtpv1TeidCounter) Reset() { + *x = PatternFlowGtpv1TeidCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[871] + mi := &file_otg_proto_msgTypes[862] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRsvpReservedCounter) String() string { +func (x *PatternFlowGtpv1TeidCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRsvpReservedCounter) ProtoMessage() {} +func (*PatternFlowGtpv1TeidCounter) ProtoMessage() {} -func (x *PatternFlowRsvpReservedCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[871] +func (x *PatternFlowGtpv1TeidCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[862] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -94650,41 +96627,115 @@ func (x *PatternFlowRsvpReservedCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRsvpReservedCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRsvpReservedCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{871} +// Deprecated: Use PatternFlowGtpv1TeidCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1TeidCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{862} } -func (x *PatternFlowRsvpReservedCounter) GetStart() uint32 { +func (x *PatternFlowGtpv1TeidCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRsvpReservedCounter) GetStep() uint32 { +func (x *PatternFlowGtpv1TeidCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRsvpReservedCounter) GetCount() uint32 { +func (x *PatternFlowGtpv1TeidCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Reserved -type PatternFlowRsvpReserved struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv1TeidMetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 32 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpv1TeidMetricTag) Reset() { + *x = PatternFlowGtpv1TeidMetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[863] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1TeidMetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1TeidMetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpv1TeidMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[863] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1TeidMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1TeidMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{863} +} + +func (x *PatternFlowGtpv1TeidMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpv1TeidMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpv1TeidMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// Tunnel endpoint identifier (TEID) used to multiplex connections in the same GTP tunnel +type PatternFlowGtpv1Teid struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRsvpReserved_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRsvpReserved_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv1Teid_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1Teid_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -94692,28 +96743,32 @@ type PatternFlowRsvpReserved struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRsvpReservedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv1TeidCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRsvpReservedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv1TeidCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv1TeidMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRsvpReserved) Reset() { - *x = PatternFlowRsvpReserved{} +func (x *PatternFlowGtpv1Teid) Reset() { + *x = PatternFlowGtpv1Teid{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[872] + mi := &file_otg_proto_msgTypes[864] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRsvpReserved) String() string { +func (x *PatternFlowGtpv1Teid) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRsvpReserved) ProtoMessage() {} +func (*PatternFlowGtpv1Teid) ProtoMessage() {} -func (x *PatternFlowRsvpReserved) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[872] +func (x *PatternFlowGtpv1Teid) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[864] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -94724,80 +96779,87 @@ func (x *PatternFlowRsvpReserved) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRsvpReserved.ProtoReflect.Descriptor instead. -func (*PatternFlowRsvpReserved) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{872} +// Deprecated: Use PatternFlowGtpv1Teid.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1Teid) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{864} } -func (x *PatternFlowRsvpReserved) GetChoice() PatternFlowRsvpReserved_Choice_Enum { +func (x *PatternFlowGtpv1Teid) GetChoice() PatternFlowGtpv1Teid_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRsvpReserved_Choice_unspecified + return PatternFlowGtpv1Teid_Choice_unspecified } -func (x *PatternFlowRsvpReserved) GetValue() uint32 { +func (x *PatternFlowGtpv1Teid) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowRsvpReserved) GetValues() []uint32 { +func (x *PatternFlowGtpv1Teid) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRsvpReserved) GetIncrement() *PatternFlowRsvpReservedCounter { +func (x *PatternFlowGtpv1Teid) GetIncrement() *PatternFlowGtpv1TeidCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRsvpReserved) GetDecrement() *PatternFlowRsvpReservedCounter { +func (x *PatternFlowGtpv1Teid) GetDecrement() *PatternFlowGtpv1TeidCounter { if x != nil { return x.Decrement } return nil } -// ipv4 counter pattern -type PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter struct { +func (x *PatternFlowGtpv1Teid) GetMetricTags() []*PatternFlowGtpv1TeidMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowGtpv1SquenceNumberCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0.0.0.0 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 0.0.0.1 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) Reset() { - *x = PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter{} +func (x *PatternFlowGtpv1SquenceNumberCounter) Reset() { + *x = PatternFlowGtpv1SquenceNumberCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[873] + mi := &file_otg_proto_msgTypes[865] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) String() string { +func (x *PatternFlowGtpv1SquenceNumberCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) ProtoMessage() {} +func (*PatternFlowGtpv1SquenceNumberCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[873] +func (x *PatternFlowGtpv1SquenceNumberCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[865] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -94808,70 +96870,149 @@ func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{873} +// Deprecated: Use PatternFlowGtpv1SquenceNumberCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1SquenceNumberCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{865} } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) GetStart() string { +func (x *PatternFlowGtpv1SquenceNumberCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } - return "" + return 0 } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) GetStep() string { +func (x *PatternFlowGtpv1SquenceNumberCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } - return "" + return 0 } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) GetCount() uint32 { +func (x *PatternFlowGtpv1SquenceNumberCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// IPv4 address of the egress node for the tunnel. -type PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv1SquenceNumberMetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpv1SquenceNumberMetricTag) Reset() { + *x = PatternFlowGtpv1SquenceNumberMetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[866] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1SquenceNumberMetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1SquenceNumberMetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpv1SquenceNumberMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[866] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1SquenceNumberMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1SquenceNumberMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{866} +} + +func (x *PatternFlowGtpv1SquenceNumberMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpv1SquenceNumberMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpv1SquenceNumberMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// Sequence number. Exists if any of the e_flag, s_flag, or pn_flag bits are on. Must +// be interpreted only if the s_flag bit is on. +type PatternFlowGtpv1SquenceNumber struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv1SquenceNumber_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1SquenceNumber_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0.0.0.0 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = ['0.0.0.0'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv1SquenceNumberCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv1SquenceNumberCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv1SquenceNumberMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) Reset() { - *x = PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress{} +func (x *PatternFlowGtpv1SquenceNumber) Reset() { + *x = PatternFlowGtpv1SquenceNumber{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[874] + mi := &file_otg_proto_msgTypes[867] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) String() string { +func (x *PatternFlowGtpv1SquenceNumber) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) ProtoMessage() {} +func (*PatternFlowGtpv1SquenceNumber) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[874] +func (x *PatternFlowGtpv1SquenceNumber) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[867] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -94882,48 +97023,55 @@ func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) Proto return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{874} +// Deprecated: Use PatternFlowGtpv1SquenceNumber.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1SquenceNumber) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{867} } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) GetChoice() PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum { +func (x *PatternFlowGtpv1SquenceNumber) GetChoice() PatternFlowGtpv1SquenceNumber_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_unspecified + return PatternFlowGtpv1SquenceNumber_Choice_unspecified } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) GetValue() string { +func (x *PatternFlowGtpv1SquenceNumber) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } - return "" + return 0 } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) GetValues() []string { +func (x *PatternFlowGtpv1SquenceNumber) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) GetIncrement() *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter { +func (x *PatternFlowGtpv1SquenceNumber) GetIncrement() *PatternFlowGtpv1SquenceNumberCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) GetDecrement() *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter { +func (x *PatternFlowGtpv1SquenceNumber) GetDecrement() *PatternFlowGtpv1SquenceNumberCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv1SquenceNumber) GetMetricTags() []*PatternFlowGtpv1SquenceNumberMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter struct { +type PatternFlowGtpv1NPduNumberCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -94939,23 +97087,23 @@ type PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) Reset() { - *x = PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter{} +func (x *PatternFlowGtpv1NPduNumberCounter) Reset() { + *x = PatternFlowGtpv1NPduNumberCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[875] + mi := &file_otg_proto_msgTypes[868] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) String() string { +func (x *PatternFlowGtpv1NPduNumberCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) ProtoMessage() {} +func (*PatternFlowGtpv1NPduNumberCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[875] +func (x *PatternFlowGtpv1NPduNumberCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[868] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -94966,41 +97114,116 @@ func (x *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) ProtoReflect() return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{875} +// Deprecated: Use PatternFlowGtpv1NPduNumberCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1NPduNumberCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{868} } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) GetStart() uint32 { +func (x *PatternFlowGtpv1NPduNumberCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) GetStep() uint32 { +func (x *PatternFlowGtpv1NPduNumberCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) GetCount() uint32 { +func (x *PatternFlowGtpv1NPduNumberCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Reserved field, MUST be zero. -type PatternFlowRSVPPathSessionLspTunnelIpv4Reserved struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv1NPduNumberMetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpv1NPduNumberMetricTag) Reset() { + *x = PatternFlowGtpv1NPduNumberMetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[869] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1NPduNumberMetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1NPduNumberMetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpv1NPduNumberMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[869] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1NPduNumberMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1NPduNumberMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{869} +} + +func (x *PatternFlowGtpv1NPduNumberMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpv1NPduNumberMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpv1NPduNumberMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// N-PDU number. Exists if any of the e_flag, s_flag, or pn_flag bits are on. Must +// be interpreted only if the pn_flag bit is on. +type PatternFlowGtpv1NPduNumber struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv1NPduNumber_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1NPduNumber_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -95008,28 +97231,32 @@ type PatternFlowRSVPPathSessionLspTunnelIpv4Reserved struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv1NPduNumberCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv1NPduNumberCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv1NPduNumberMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) Reset() { - *x = PatternFlowRSVPPathSessionLspTunnelIpv4Reserved{} +func (x *PatternFlowGtpv1NPduNumber) Reset() { + *x = PatternFlowGtpv1NPduNumber{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[876] + mi := &file_otg_proto_msgTypes[870] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) String() string { +func (x *PatternFlowGtpv1NPduNumber) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) ProtoMessage() {} +func (*PatternFlowGtpv1NPduNumber) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[876] +func (x *PatternFlowGtpv1NPduNumber) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[870] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -95040,54 +97267,61 @@ func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) ProtoReflect() protore return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{876} +// Deprecated: Use PatternFlowGtpv1NPduNumber.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1NPduNumber) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{870} } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) GetChoice() PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum { +func (x *PatternFlowGtpv1NPduNumber) GetChoice() PatternFlowGtpv1NPduNumber_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_unspecified + return PatternFlowGtpv1NPduNumber_Choice_unspecified } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) GetValue() uint32 { +func (x *PatternFlowGtpv1NPduNumber) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) GetValues() []uint32 { +func (x *PatternFlowGtpv1NPduNumber) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) GetIncrement() *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter { +func (x *PatternFlowGtpv1NPduNumber) GetIncrement() *PatternFlowGtpv1NPduNumberCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) GetDecrement() *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter { +func (x *PatternFlowGtpv1NPduNumber) GetDecrement() *PatternFlowGtpv1NPduNumberCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv1NPduNumber) GetMetricTags() []*PatternFlowGtpv1NPduNumberMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter struct { +type PatternFlowGtpv1NextExtensionHeaderTypeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 1 + // default = 0 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -95097,23 +97331,23 @@ type PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) Reset() { - *x = PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter{} +func (x *PatternFlowGtpv1NextExtensionHeaderTypeCounter) Reset() { + *x = PatternFlowGtpv1NextExtensionHeaderTypeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[877] + mi := &file_otg_proto_msgTypes[871] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) String() string { +func (x *PatternFlowGtpv1NextExtensionHeaderTypeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) ProtoMessage() {} +func (*PatternFlowGtpv1NextExtensionHeaderTypeCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[877] +func (x *PatternFlowGtpv1NextExtensionHeaderTypeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[871] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -95124,71 +97358,149 @@ func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) ProtoReflect() return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{877} +// Deprecated: Use PatternFlowGtpv1NextExtensionHeaderTypeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1NextExtensionHeaderTypeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{871} } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) GetStart() uint32 { +func (x *PatternFlowGtpv1NextExtensionHeaderTypeCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) GetStep() uint32 { +func (x *PatternFlowGtpv1NextExtensionHeaderTypeCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) GetCount() uint32 { +func (x *PatternFlowGtpv1NextExtensionHeaderTypeCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// A 16-bit identifier used in the SESSION that remains constant over the life of the -// tunnel. -type PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv1NextExtensionHeaderTypeMetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) Reset() { + *x = PatternFlowGtpv1NextExtensionHeaderTypeMetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[872] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[872] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1NextExtensionHeaderTypeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{872} +} + +func (x *PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// Next extension header. Exists if any of the e_flag, s_flag, or pn_flag bits are on. +// Must be interpreted only if the e_flag bit is on. +type PatternFlowGtpv1NextExtensionHeaderType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 + // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [1] + // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv1NextExtensionHeaderTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv1NextExtensionHeaderTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv1NextExtensionHeaderTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) Reset() { - *x = PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId{} +func (x *PatternFlowGtpv1NextExtensionHeaderType) Reset() { + *x = PatternFlowGtpv1NextExtensionHeaderType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[878] + mi := &file_otg_proto_msgTypes[873] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) String() string { +func (x *PatternFlowGtpv1NextExtensionHeaderType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) ProtoMessage() {} +func (*PatternFlowGtpv1NextExtensionHeaderType) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[878] +func (x *PatternFlowGtpv1NextExtensionHeaderType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[873] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -95199,48 +97511,55 @@ func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) ProtoReflect() protore return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{878} +// Deprecated: Use PatternFlowGtpv1NextExtensionHeaderType.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1NextExtensionHeaderType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{873} } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) GetChoice() PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum { +func (x *PatternFlowGtpv1NextExtensionHeaderType) GetChoice() PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_unspecified + return PatternFlowGtpv1NextExtensionHeaderType_Choice_unspecified } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) GetValue() uint32 { +func (x *PatternFlowGtpv1NextExtensionHeaderType) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) GetValues() []uint32 { +func (x *PatternFlowGtpv1NextExtensionHeaderType) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) GetIncrement() *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter { +func (x *PatternFlowGtpv1NextExtensionHeaderType) GetIncrement() *PatternFlowGtpv1NextExtensionHeaderTypeCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) GetDecrement() *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter { +func (x *PatternFlowGtpv1NextExtensionHeaderType) GetDecrement() *PatternFlowGtpv1NextExtensionHeaderTypeCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv1NextExtensionHeaderType) GetMetricTags() []*PatternFlowGtpv1NextExtensionHeaderTypeMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter struct { +type PatternFlowGtpExtensionExtensionLengthCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -95256,23 +97575,23 @@ type PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) Reset() { - *x = PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter{} +func (x *PatternFlowGtpExtensionExtensionLengthCounter) Reset() { + *x = PatternFlowGtpExtensionExtensionLengthCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[879] + mi := &file_otg_proto_msgTypes[874] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) String() string { +func (x *PatternFlowGtpExtensionExtensionLengthCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) ProtoMessage() {} +func (*PatternFlowGtpExtensionExtensionLengthCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[879] +func (x *PatternFlowGtpExtensionExtensionLengthCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[874] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -95283,70 +97602,70 @@ func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{879} +// Deprecated: Use PatternFlowGtpExtensionExtensionLengthCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpExtensionExtensionLengthCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{874} } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) GetStart() uint32 { +func (x *PatternFlowGtpExtensionExtensionLengthCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) GetStep() uint32 { +func (x *PatternFlowGtpExtensionExtensionLengthCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) GetCount() uint32 { +func (x *PatternFlowGtpExtensionExtensionLengthCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// TBD -type PatternFlowRSVPPathSessionExtTunnelIdAsInteger struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpExtensionExtensionLengthMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) Reset() { - *x = PatternFlowRSVPPathSessionExtTunnelIdAsInteger{} +func (x *PatternFlowGtpExtensionExtensionLengthMetricTag) Reset() { + *x = PatternFlowGtpExtensionExtensionLengthMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[880] + mi := &file_otg_proto_msgTypes[875] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) String() string { +func (x *PatternFlowGtpExtensionExtensionLengthMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionExtTunnelIdAsInteger) ProtoMessage() {} +func (*PatternFlowGtpExtensionExtensionLengthMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[880] +func (x *PatternFlowGtpExtensionExtensionLengthMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[875] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -95357,80 +97676,76 @@ func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) ProtoReflect() protoref return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionExtTunnelIdAsInteger.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionExtTunnelIdAsInteger) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{880} +// Deprecated: Use PatternFlowGtpExtensionExtensionLengthMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpExtensionExtensionLengthMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{875} } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) GetChoice() PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *PatternFlowGtpExtensionExtensionLengthMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_unspecified + return "" } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowGtpExtensionExtensionLengthMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) GetIncrement() *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) GetDecrement() *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowGtpExtensionExtensionLengthMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } - return nil + return 0 } -// ipv4 counter pattern -type PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter struct { +// This field states the length of this extension header, including the length, the +// contents, and the next extension header field, in 4-octet units, so the length of +// the extension must always be a multiple of 4. +type PatternFlowGtpExtensionExtensionLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0.0.0.0 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = Choice.Enum.value + Choice *PatternFlowGtpExtensionExtensionLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpExtensionExtensionLength_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0.0.0.1 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowGtpExtensionExtensionLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowGtpExtensionExtensionLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpExtensionExtensionLengthMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) Reset() { - *x = PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter{} +func (x *PatternFlowGtpExtensionExtensionLength) Reset() { + *x = PatternFlowGtpExtensionExtensionLength{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[881] + mi := &file_otg_proto_msgTypes[876] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) String() string { +func (x *PatternFlowGtpExtensionExtensionLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) ProtoMessage() {} +func (*PatternFlowGtpExtensionExtensionLength) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[881] +func (x *PatternFlowGtpExtensionExtensionLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[876] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -95441,70 +97756,87 @@ func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) ProtoReflect() prot return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{881} +// Deprecated: Use PatternFlowGtpExtensionExtensionLength.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpExtensionExtensionLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{876} } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) GetStart() string { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowGtpExtensionExtensionLength) GetChoice() PatternFlowGtpExtensionExtensionLength_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return "" + return PatternFlowGtpExtensionExtensionLength_Choice_unspecified } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) GetStep() string { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowGtpExtensionExtensionLength) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } - return "" + return 0 } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowGtpExtensionExtensionLength) GetValues() []uint32 { + if x != nil { + return x.Values } - return 0 + return nil } -// IPv4 address of the ingress endpoint for the tunnel. -type PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 struct { +func (x *PatternFlowGtpExtensionExtensionLength) GetIncrement() *PatternFlowGtpExtensionExtensionLengthCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowGtpExtensionExtensionLength) GetDecrement() *PatternFlowGtpExtensionExtensionLengthCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowGtpExtensionExtensionLength) GetMetricTags() []*PatternFlowGtpExtensionExtensionLengthMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowGtpExtensionContentsCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0.0.0.0 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = ['0.0.0.0'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // default = 0 + Start *uint64 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // default = 1 + Step *uint64 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // default = 1 + Count *uint64 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) Reset() { - *x = PatternFlowRSVPPathSessionExtTunnelIdAsIpv4{} +func (x *PatternFlowGtpExtensionContentsCounter) Reset() { + *x = PatternFlowGtpExtensionContentsCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[882] + mi := &file_otg_proto_msgTypes[877] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) String() string { +func (x *PatternFlowGtpExtensionContentsCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) ProtoMessage() {} +func (*PatternFlowGtpExtensionContentsCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[882] +func (x *PatternFlowGtpExtensionContentsCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[877] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -95515,80 +97847,70 @@ func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) ProtoReflect() protoreflec return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{882} -} - -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) GetChoice() PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_unspecified -} - -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value - } - return "" +// Deprecated: Use PatternFlowGtpExtensionContentsCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpExtensionContentsCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{877} } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) GetValues() []string { - if x != nil { - return x.Values +func (x *PatternFlowGtpExtensionContentsCounter) GetStart() uint64 { + if x != nil && x.Start != nil { + return *x.Start } - return nil + return 0 } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) GetIncrement() *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter { - if x != nil { - return x.Increment +func (x *PatternFlowGtpExtensionContentsCounter) GetStep() uint64 { + if x != nil && x.Step != nil { + return *x.Step } - return nil + return 0 } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) GetDecrement() *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter { - if x != nil { - return x.Decrement +func (x *PatternFlowGtpExtensionContentsCounter) GetCount() uint64 { + if x != nil && x.Count != nil { + return *x.Count } - return nil + return 0 } -// ipv4 counter pattern -type PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpExtensionContentsMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0.0.0.0 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 0.0.0.1 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint64 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 48 + Length *uint64 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) Reset() { - *x = PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter{} +func (x *PatternFlowGtpExtensionContentsMetricTag) Reset() { + *x = PatternFlowGtpExtensionContentsMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[883] + mi := &file_otg_proto_msgTypes[878] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) String() string { +func (x *PatternFlowGtpExtensionContentsMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) ProtoMessage() {} +func (*PatternFlowGtpExtensionContentsMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[883] +func (x *PatternFlowGtpExtensionContentsMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[878] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -95599,71 +97921,74 @@ func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) ProtoReflect() protor return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{883} +// Deprecated: Use PatternFlowGtpExtensionContentsMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpExtensionContentsMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{878} } -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) GetStart() string { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowGtpExtensionContentsMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } return "" } -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) GetStep() string { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowGtpExtensionContentsMetricTag) GetOffset() uint64 { + if x != nil && x.Offset != nil { + return *x.Offset } - return "" + return 0 } -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowGtpExtensionContentsMetricTag) GetLength() uint64 { + if x != nil && x.Length != nil { + return *x.Length } return 0 } -// The IPv4 address of the interface through which the last RSVP-knowledgeable hop forwarded -// this message. -type PatternFlowRSVPPathRsvpHopIpv4Ipv4Address struct { +// The extension header contents +type PatternFlowGtpExtensionContents struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpExtensionContents_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpExtensionContents_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0.0.0.0 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 0 + Value *uint64 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = ['0.0.0.0'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // default = [0] + Values []uint64 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpExtensionContentsCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpExtensionContentsCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpExtensionContentsMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) Reset() { - *x = PatternFlowRSVPPathRsvpHopIpv4Ipv4Address{} +func (x *PatternFlowGtpExtensionContents) Reset() { + *x = PatternFlowGtpExtensionContents{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[884] + mi := &file_otg_proto_msgTypes[879] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) String() string { +func (x *PatternFlowGtpExtensionContents) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) ProtoMessage() {} +func (*PatternFlowGtpExtensionContents) ProtoMessage() {} -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[884] +func (x *PatternFlowGtpExtensionContents) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[879] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -95674,48 +97999,55 @@ func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{884} +// Deprecated: Use PatternFlowGtpExtensionContents.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpExtensionContents) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{879} } -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) GetChoice() PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum { +func (x *PatternFlowGtpExtensionContents) GetChoice() PatternFlowGtpExtensionContents_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_unspecified + return PatternFlowGtpExtensionContents_Choice_unspecified } -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) GetValue() string { +func (x *PatternFlowGtpExtensionContents) GetValue() uint64 { if x != nil && x.Value != nil { return *x.Value } - return "" + return 0 } -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) GetValues() []string { +func (x *PatternFlowGtpExtensionContents) GetValues() []uint64 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) GetIncrement() *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter { +func (x *PatternFlowGtpExtensionContents) GetIncrement() *PatternFlowGtpExtensionContentsCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) GetDecrement() *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter { +func (x *PatternFlowGtpExtensionContents) GetDecrement() *PatternFlowGtpExtensionContentsCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpExtensionContents) GetMetricTags() []*PatternFlowGtpExtensionContentsMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter struct { +type PatternFlowGtpExtensionNextExtensionHeaderCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -95731,23 +98063,23 @@ type PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) Reset() { - *x = PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter{} +func (x *PatternFlowGtpExtensionNextExtensionHeaderCounter) Reset() { + *x = PatternFlowGtpExtensionNextExtensionHeaderCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[885] + mi := &file_otg_proto_msgTypes[880] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) String() string { +func (x *PatternFlowGtpExtensionNextExtensionHeaderCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) ProtoMessage() {} +func (*PatternFlowGtpExtensionNextExtensionHeaderCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[885] +func (x *PatternFlowGtpExtensionNextExtensionHeaderCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[880] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -95758,44 +98090,116 @@ func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) ProtoRefle return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{885} +// Deprecated: Use PatternFlowGtpExtensionNextExtensionHeaderCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpExtensionNextExtensionHeaderCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{880} } -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) GetStart() uint32 { +func (x *PatternFlowGtpExtensionNextExtensionHeaderCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) GetStep() uint32 { +func (x *PatternFlowGtpExtensionNextExtensionHeaderCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) GetCount() uint32 { +func (x *PatternFlowGtpExtensionNextExtensionHeaderCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Logical Interface Handle (LIH) is used to distinguish logical outgoing interfaces. -// A node receiving an LIH in a Path message saves its value and returns it in the HOP -// objects of subsequent Resv messages sent to the node that originated the LIH. The -// LIH should be identically zero if there is no logical interface handle. -type PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpExtensionNextExtensionHeaderMetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpExtensionNextExtensionHeaderMetricTag) Reset() { + *x = PatternFlowGtpExtensionNextExtensionHeaderMetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[881] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpExtensionNextExtensionHeaderMetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpExtensionNextExtensionHeaderMetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpExtensionNextExtensionHeaderMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[881] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpExtensionNextExtensionHeaderMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpExtensionNextExtensionHeaderMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{881} +} + +func (x *PatternFlowGtpExtensionNextExtensionHeaderMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpExtensionNextExtensionHeaderMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpExtensionNextExtensionHeaderMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// It states the type of the next extension, or 0 if no next extension exists. This +// permits chaining several next extension headers. +type PatternFlowGtpExtensionNextExtensionHeader struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -95803,28 +98207,32 @@ type PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpExtensionNextExtensionHeaderCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpExtensionNextExtensionHeaderCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpExtensionNextExtensionHeaderMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) Reset() { - *x = PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle{} +func (x *PatternFlowGtpExtensionNextExtensionHeader) Reset() { + *x = PatternFlowGtpExtensionNextExtensionHeader{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[886] + mi := &file_otg_proto_msgTypes[882] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) String() string { +func (x *PatternFlowGtpExtensionNextExtensionHeader) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) ProtoMessage() {} +func (*PatternFlowGtpExtensionNextExtensionHeader) ProtoMessage() {} -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[886] +func (x *PatternFlowGtpExtensionNextExtensionHeader) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[882] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -95835,54 +98243,61 @@ func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) ProtoReflect() pr return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{886} +// Deprecated: Use PatternFlowGtpExtensionNextExtensionHeader.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpExtensionNextExtensionHeader) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{882} } -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) GetChoice() PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum { +func (x *PatternFlowGtpExtensionNextExtensionHeader) GetChoice() PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_unspecified + return PatternFlowGtpExtensionNextExtensionHeader_Choice_unspecified } -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) GetValue() uint32 { +func (x *PatternFlowGtpExtensionNextExtensionHeader) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) GetValues() []uint32 { +func (x *PatternFlowGtpExtensionNextExtensionHeader) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) GetIncrement() *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter { +func (x *PatternFlowGtpExtensionNextExtensionHeader) GetIncrement() *PatternFlowGtpExtensionNextExtensionHeaderCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) GetDecrement() *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter { +func (x *PatternFlowGtpExtensionNextExtensionHeader) GetDecrement() *PatternFlowGtpExtensionNextExtensionHeaderCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpExtensionNextExtensionHeader) GetMetricTags() []*PatternFlowGtpExtensionNextExtensionHeaderMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter struct { +type PatternFlowGtpv2VersionCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 30000 + // default = 2 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -95892,23 +98307,23 @@ type PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) Reset() { - *x = PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter{} +func (x *PatternFlowGtpv2VersionCounter) Reset() { + *x = PatternFlowGtpv2VersionCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[887] + mi := &file_otg_proto_msgTypes[883] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) String() string { +func (x *PatternFlowGtpv2VersionCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) ProtoMessage() {} +func (*PatternFlowGtpv2VersionCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[887] +func (x *PatternFlowGtpv2VersionCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[883] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -95919,70 +98334,148 @@ func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) ProtoReflect() return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{887} +// Deprecated: Use PatternFlowGtpv2VersionCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2VersionCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{883} } -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) GetStart() uint32 { +func (x *PatternFlowGtpv2VersionCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) GetStep() uint32 { +func (x *PatternFlowGtpv2VersionCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) GetCount() uint32 { +func (x *PatternFlowGtpv2VersionCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// The refresh timeout period R used to generate this message;in milliseconds. -type PatternFlowRSVPPathTimeValuesType1RefreshPeriodR struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv2VersionMetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 3 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpv2VersionMetricTag) Reset() { + *x = PatternFlowGtpv2VersionMetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[884] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv2VersionMetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv2VersionMetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpv2VersionMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[884] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv2VersionMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2VersionMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{884} +} + +func (x *PatternFlowGtpv2VersionMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpv2VersionMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpv2VersionMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// Version number +type PatternFlowGtpv2Version struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv2Version_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2Version_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 30000 + // default = 2 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [30000] + // default = [2] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv2VersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv2VersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv2VersionMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) Reset() { - *x = PatternFlowRSVPPathTimeValuesType1RefreshPeriodR{} +func (x *PatternFlowGtpv2Version) Reset() { + *x = PatternFlowGtpv2Version{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[888] + mi := &file_otg_proto_msgTypes[885] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) String() string { +func (x *PatternFlowGtpv2Version) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) ProtoMessage() {} +func (*PatternFlowGtpv2Version) ProtoMessage() {} -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[888] +func (x *PatternFlowGtpv2Version) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[885] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -95993,48 +98486,55 @@ func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) ProtoReflect() protor return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathTimeValuesType1RefreshPeriodR.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{888} +// Deprecated: Use PatternFlowGtpv2Version.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2Version) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{885} } -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) GetChoice() PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum { +func (x *PatternFlowGtpv2Version) GetChoice() PatternFlowGtpv2Version_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_unspecified + return PatternFlowGtpv2Version_Choice_unspecified } -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) GetValue() uint32 { +func (x *PatternFlowGtpv2Version) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) GetValues() []uint32 { +func (x *PatternFlowGtpv2Version) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) GetIncrement() *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter { +func (x *PatternFlowGtpv2Version) GetIncrement() *PatternFlowGtpv2VersionCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) GetDecrement() *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter { +func (x *PatternFlowGtpv2Version) GetDecrement() *PatternFlowGtpv2VersionCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv2Version) GetMetricTags() []*PatternFlowGtpv2VersionMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter struct { +type PatternFlowGtpv2PiggybackingFlagCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -96050,23 +98550,23 @@ type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) Reset() { - *x = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter{} +func (x *PatternFlowGtpv2PiggybackingFlagCounter) Reset() { + *x = PatternFlowGtpv2PiggybackingFlagCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[889] + mi := &file_otg_proto_msgTypes[886] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) String() string { +func (x *PatternFlowGtpv2PiggybackingFlagCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) ProtoMessage() {} +func (*PatternFlowGtpv2PiggybackingFlagCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[889] +func (x *PatternFlowGtpv2PiggybackingFlagCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[886] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -96077,43 +98577,116 @@ func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) ProtoReflec return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{889} +// Deprecated: Use PatternFlowGtpv2PiggybackingFlagCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2PiggybackingFlagCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{886} } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) GetStart() uint32 { +func (x *PatternFlowGtpv2PiggybackingFlagCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) GetStep() uint32 { +func (x *PatternFlowGtpv2PiggybackingFlagCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) GetCount() uint32 { +func (x *PatternFlowGtpv2PiggybackingFlagCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// The L bit is an attribute of the subobject. The L bit is set if the subobject represents -// a loose hop in the explicit route. If the bit is not set, the subobject represents -// a strict hop in the explicit route. -type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv2PiggybackingFlagMetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 1 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpv2PiggybackingFlagMetricTag) Reset() { + *x = PatternFlowGtpv2PiggybackingFlagMetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[887] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv2PiggybackingFlagMetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv2PiggybackingFlagMetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpv2PiggybackingFlagMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[887] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv2PiggybackingFlagMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2PiggybackingFlagMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{887} +} + +func (x *PatternFlowGtpv2PiggybackingFlagMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpv2PiggybackingFlagMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpv2PiggybackingFlagMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// If piggybacking_flag is set to 1 then another GTP-C message with its own header shall +// be present at the end of the current message +type PatternFlowGtpv2PiggybackingFlag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv2PiggybackingFlag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2PiggybackingFlag_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -96121,28 +98694,32 @@ type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv2PiggybackingFlagCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv2PiggybackingFlagCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv2PiggybackingFlagMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) Reset() { - *x = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit{} +func (x *PatternFlowGtpv2PiggybackingFlag) Reset() { + *x = PatternFlowGtpv2PiggybackingFlag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[890] + mi := &file_otg_proto_msgTypes[888] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) String() string { +func (x *PatternFlowGtpv2PiggybackingFlag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) ProtoMessage() {} +func (*PatternFlowGtpv2PiggybackingFlag) ProtoMessage() {} -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[890] +func (x *PatternFlowGtpv2PiggybackingFlag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[888] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -96153,80 +98730,87 @@ func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) ProtoReflect() pro return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{890} +// Deprecated: Use PatternFlowGtpv2PiggybackingFlag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2PiggybackingFlag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{888} } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) GetChoice() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum { +func (x *PatternFlowGtpv2PiggybackingFlag) GetChoice() PatternFlowGtpv2PiggybackingFlag_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_unspecified + return PatternFlowGtpv2PiggybackingFlag_Choice_unspecified } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) GetValue() uint32 { +func (x *PatternFlowGtpv2PiggybackingFlag) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) GetValues() []uint32 { +func (x *PatternFlowGtpv2PiggybackingFlag) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) GetIncrement() *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter { +func (x *PatternFlowGtpv2PiggybackingFlag) GetIncrement() *PatternFlowGtpv2PiggybackingFlagCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) GetDecrement() *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter { +func (x *PatternFlowGtpv2PiggybackingFlag) GetDecrement() *PatternFlowGtpv2PiggybackingFlagCounter { if x != nil { return x.Decrement } return nil } -// ipv4 counter pattern -type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter struct { +func (x *PatternFlowGtpv2PiggybackingFlag) GetMetricTags() []*PatternFlowGtpv2PiggybackingFlagMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowGtpv2TeidFlagCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0.0.0.0 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 0.0.0.1 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) Reset() { - *x = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter{} +func (x *PatternFlowGtpv2TeidFlagCounter) Reset() { + *x = PatternFlowGtpv2TeidFlagCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[891] + mi := &file_otg_proto_msgTypes[889] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) String() string { +func (x *PatternFlowGtpv2TeidFlagCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) ProtoMessage() {} +func (*PatternFlowGtpv2TeidFlagCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[891] +func (x *PatternFlowGtpv2TeidFlagCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[889] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -96237,71 +98821,150 @@ func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) Prot return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{891} +// Deprecated: Use PatternFlowGtpv2TeidFlagCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2TeidFlagCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{889} } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) GetStart() string { +func (x *PatternFlowGtpv2TeidFlagCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } - return "" + return 0 } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) GetStep() string { +func (x *PatternFlowGtpv2TeidFlagCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } - return "" + return 0 } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) GetCount() uint32 { +func (x *PatternFlowGtpv2TeidFlagCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// This IPv4 address is treated as a prefix based on the prefix length value below. -// Bits beyond the prefix are ignored on receipt and SHOULD be set to zero on transmission. -type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv2TeidFlagMetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 1 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpv2TeidFlagMetricTag) Reset() { + *x = PatternFlowGtpv2TeidFlagMetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[890] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv2TeidFlagMetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv2TeidFlagMetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpv2TeidFlagMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[890] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv2TeidFlagMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2TeidFlagMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{890} +} + +func (x *PatternFlowGtpv2TeidFlagMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpv2TeidFlagMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpv2TeidFlagMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// If teid_flag is set to 1 then the TEID field will be present between the message +// length and the sequence number. All messages except Echo and Echo reply require TEID +// to be present +type PatternFlowGtpv2TeidFlag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv2TeidFlag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2TeidFlag_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0.0.0.0 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = ['0.0.0.0'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv2TeidFlagCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv2TeidFlagCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv2TeidFlagMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) Reset() { - *x = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address{} +func (x *PatternFlowGtpv2TeidFlag) Reset() { + *x = PatternFlowGtpv2TeidFlag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[892] + mi := &file_otg_proto_msgTypes[891] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) String() string { +func (x *PatternFlowGtpv2TeidFlag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) ProtoMessage() {} +func (*PatternFlowGtpv2TeidFlag) ProtoMessage() {} -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[892] +func (x *PatternFlowGtpv2TeidFlag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[891] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -96312,48 +98975,55 @@ func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) ProtoReflec return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{892} +// Deprecated: Use PatternFlowGtpv2TeidFlag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2TeidFlag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{891} } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) GetChoice() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum { +func (x *PatternFlowGtpv2TeidFlag) GetChoice() PatternFlowGtpv2TeidFlag_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_unspecified + return PatternFlowGtpv2TeidFlag_Choice_unspecified } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) GetValue() string { +func (x *PatternFlowGtpv2TeidFlag) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } - return "" + return 0 } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) GetValues() []string { +func (x *PatternFlowGtpv2TeidFlag) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) GetIncrement() *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter { +func (x *PatternFlowGtpv2TeidFlag) GetIncrement() *PatternFlowGtpv2TeidFlagCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) GetDecrement() *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter { +func (x *PatternFlowGtpv2TeidFlag) GetDecrement() *PatternFlowGtpv2TeidFlagCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv2TeidFlag) GetMetricTags() []*PatternFlowGtpv2TeidFlagMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter struct { +type PatternFlowGtpv2Spare1Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -96369,23 +99039,23 @@ type PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) Reset() { - *x = PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter{} +func (x *PatternFlowGtpv2Spare1Counter) Reset() { + *x = PatternFlowGtpv2Spare1Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[893] + mi := &file_otg_proto_msgTypes[892] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) String() string { +func (x *PatternFlowGtpv2Spare1Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) ProtoMessage() {} +func (*PatternFlowGtpv2Spare1Counter) ProtoMessage() {} -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[893] +func (x *PatternFlowGtpv2Spare1Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[892] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -96396,43 +99066,115 @@ func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) ProtoReflect( return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{893} +// Deprecated: Use PatternFlowGtpv2Spare1Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2Spare1Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{892} } -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) GetStart() uint32 { +func (x *PatternFlowGtpv2Spare1Counter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) GetStep() uint32 { +func (x *PatternFlowGtpv2Spare1Counter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) GetCount() uint32 { +func (x *PatternFlowGtpv2Spare1Counter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// The L bit is an attribute of the subobject. The L bit is set if the subobject represents -// a loose hop in the explicit route. If the bit is not set, the subobject represents -// a strict hop in the explicit route. -type PatternFlowRSVPPathExplicitRouteType1ASNumberLBit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv2Spare1MetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 3 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpv2Spare1MetricTag) Reset() { + *x = PatternFlowGtpv2Spare1MetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[893] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv2Spare1MetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv2Spare1MetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpv2Spare1MetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[893] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv2Spare1MetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2Spare1MetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{893} +} + +func (x *PatternFlowGtpv2Spare1MetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpv2Spare1MetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpv2Spare1MetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// A 3-bit reserved field (must be 0). +type PatternFlowGtpv2Spare1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv2Spare1_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2Spare1_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -96440,13 +99182,17 @@ type PatternFlowRSVPPathExplicitRouteType1ASNumberLBit struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv2Spare1Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv2Spare1Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv2Spare1MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) Reset() { - *x = PatternFlowRSVPPathExplicitRouteType1ASNumberLBit{} +func (x *PatternFlowGtpv2Spare1) Reset() { + *x = PatternFlowGtpv2Spare1{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[894] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -96454,13 +99200,13 @@ func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) Reset() { } } -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) String() string { +func (x *PatternFlowGtpv2Spare1) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) ProtoMessage() {} +func (*PatternFlowGtpv2Spare1) ProtoMessage() {} -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) ProtoReflect() protoreflect.Message { +func (x *PatternFlowGtpv2Spare1) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[894] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -96472,48 +99218,55 @@ func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) ProtoReflect() proto return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowGtpv2Spare1.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2Spare1) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{894} } -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) GetChoice() PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum { +func (x *PatternFlowGtpv2Spare1) GetChoice() PatternFlowGtpv2Spare1_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_unspecified + return PatternFlowGtpv2Spare1_Choice_unspecified } -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) GetValue() uint32 { +func (x *PatternFlowGtpv2Spare1) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) GetValues() []uint32 { +func (x *PatternFlowGtpv2Spare1) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) GetIncrement() *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter { +func (x *PatternFlowGtpv2Spare1) GetIncrement() *PatternFlowGtpv2Spare1Counter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) GetDecrement() *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter { +func (x *PatternFlowGtpv2Spare1) GetDecrement() *PatternFlowGtpv2Spare1Counter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv2Spare1) GetMetricTags() []*PatternFlowGtpv2Spare1MetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter struct { +type PatternFlowGtpv2MessageTypeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -96529,8 +99282,8 @@ type PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) Reset() { - *x = PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter{} +func (x *PatternFlowGtpv2MessageTypeCounter) Reset() { + *x = PatternFlowGtpv2MessageTypeCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[895] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -96538,13 +99291,13 @@ func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) Reset( } } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) String() string { +func (x *PatternFlowGtpv2MessageTypeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) ProtoMessage() {} +func (*PatternFlowGtpv2MessageTypeCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowGtpv2MessageTypeCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[895] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -96556,56 +99309,55 @@ func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) ProtoR return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowGtpv2MessageTypeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2MessageTypeCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{895} } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) GetStart() uint32 { +func (x *PatternFlowGtpv2MessageTypeCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) GetStep() uint32 { +func (x *PatternFlowGtpv2MessageTypeCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) GetCount() uint32 { +func (x *PatternFlowGtpv2MessageTypeCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// This field is reserved. It MUST be set to zero on transmission and MUST be ignored -// on receipt. -type PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv2MessageTypeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) Reset() { - *x = PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved{} +func (x *PatternFlowGtpv2MessageTypeMetricTag) Reset() { + *x = PatternFlowGtpv2MessageTypeMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[896] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -96613,13 +99365,13 @@ func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) Reset() { } } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) String() string { +func (x *PatternFlowGtpv2MessageTypeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) ProtoMessage() {} +func (*PatternFlowGtpv2MessageTypeMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) ProtoReflect() protoreflect.Message { +func (x *PatternFlowGtpv2MessageTypeMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[896] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -96631,65 +99383,60 @@ func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) ProtoReflect( return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowGtpv2MessageTypeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2MessageTypeMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{896} } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) GetChoice() PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *PatternFlowGtpv2MessageTypeMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_unspecified + return "" } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowGtpv2MessageTypeMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) GetIncrement() *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) GetDecrement() *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowGtpv2MessageTypeMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } - return nil + return 0 } -// integer counter pattern -type PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter struct { +// An 8-bit field that indicates the type of GTP message. Different types of messages +// are defined in 3GPP TS 29.060 section 7.1 +type PatternFlowGtpv2MessageType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 2048 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = Choice.Enum.value + Choice *PatternFlowGtpv2MessageType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2MessageType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowGtpv2MessageTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowGtpv2MessageTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv2MessageTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) Reset() { - *x = PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter{} +func (x *PatternFlowGtpv2MessageType) Reset() { + *x = PatternFlowGtpv2MessageType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[897] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -96697,13 +99444,13 @@ func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) Reset() { } } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) String() string { +func (x *PatternFlowGtpv2MessageType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) ProtoMessage() {} +func (*PatternFlowGtpv2MessageType) ProtoMessage() {} -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowGtpv2MessageType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[897] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -96715,56 +99462,72 @@ func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) ProtoRefl return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowGtpv2MessageType.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2MessageType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{897} } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowGtpv2MessageType) GetChoice() PatternFlowGtpv2MessageType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return PatternFlowGtpv2MessageType_Choice_unspecified } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowGtpv2MessageType) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } return 0 } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowGtpv2MessageType) GetValues() []uint32 { + if x != nil { + return x.Values } - return 0 + return nil } -// An identifier of the layer 3 protocol using this path. Standard Ethertype values -// are used e.g. The default value of 2048 ( 0x0800 ) represents Ethertype for IPv4. -type PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid struct { +func (x *PatternFlowGtpv2MessageType) GetIncrement() *PatternFlowGtpv2MessageTypeCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowGtpv2MessageType) GetDecrement() *PatternFlowGtpv2MessageTypeCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowGtpv2MessageType) GetMetricTags() []*PatternFlowGtpv2MessageTypeMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowGtpv2MessageLengthCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 2048 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [2048] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) Reset() { - *x = PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid{} +func (x *PatternFlowGtpv2MessageLengthCounter) Reset() { + *x = PatternFlowGtpv2MessageLengthCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[898] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -96772,13 +99535,13 @@ func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) Reset() { } } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) String() string { +func (x *PatternFlowGtpv2MessageLengthCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) ProtoMessage() {} +func (*PatternFlowGtpv2MessageLengthCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) ProtoReflect() protoreflect.Message { +func (x *PatternFlowGtpv2MessageLengthCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[898] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -96790,65 +99553,55 @@ func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowGtpv2MessageLengthCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2MessageLengthCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{898} } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) GetChoice() PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_unspecified -} - -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowGtpv2MessageLengthCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } return 0 } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) GetIncrement() *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter { - if x != nil { - return x.Increment +func (x *PatternFlowGtpv2MessageLengthCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step } - return nil + return 0 } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) GetDecrement() *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowGtpv2MessageLengthCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count } - return nil + return 0 } -// ipv4 counter pattern -type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv2MessageLengthMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0.0.0.0 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 0.0.0.1 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) Reset() { - *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter{} +func (x *PatternFlowGtpv2MessageLengthMetricTag) Reset() { + *x = PatternFlowGtpv2MessageLengthMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[899] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -96856,13 +99609,13 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCo } } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) String() string { +func (x *PatternFlowGtpv2MessageLengthMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) ProtoMessage() {} +func (*PatternFlowGtpv2MessageLengthMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowGtpv2MessageLengthMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[899] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -96874,55 +99627,60 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCo return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowGtpv2MessageLengthMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2MessageLengthMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{899} } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) GetStart() string { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowGtpv2MessageLengthMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } return "" } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) GetStep() string { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowGtpv2MessageLengthMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } - return "" + return 0 } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowGtpv2MessageLengthMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } return 0 } -// IPv4 address for a sender node. -type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress struct { +// A 16-bit field that indicates the length of the payload in bytes, excluding the mandatory +// GTP-c header (first 4 bytes). Includes the TEID and sequence_number if they are present. +type PatternFlowGtpv2MessageLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv2MessageLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2MessageLength_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0.0.0.0 - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = ['0.0.0.0'] - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv2MessageLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv2MessageLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv2MessageLengthMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) Reset() { - *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress{} +func (x *PatternFlowGtpv2MessageLength) Reset() { + *x = PatternFlowGtpv2MessageLength{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[900] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -96930,13 +99688,13 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) } } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) String() string { +func (x *PatternFlowGtpv2MessageLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) ProtoMessage() {} +func (*PatternFlowGtpv2MessageLength) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) ProtoReflect() protoreflect.Message { +func (x *PatternFlowGtpv2MessageLength) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[900] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -96948,48 +99706,55 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowGtpv2MessageLength.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2MessageLength) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{900} } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) GetChoice() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum { +func (x *PatternFlowGtpv2MessageLength) GetChoice() PatternFlowGtpv2MessageLength_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_unspecified + return PatternFlowGtpv2MessageLength_Choice_unspecified } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) GetValue() string { +func (x *PatternFlowGtpv2MessageLength) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } - return "" + return 0 } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) GetValues() []string { +func (x *PatternFlowGtpv2MessageLength) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) GetIncrement() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter { +func (x *PatternFlowGtpv2MessageLength) GetIncrement() *PatternFlowGtpv2MessageLengthCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) GetDecrement() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter { +func (x *PatternFlowGtpv2MessageLength) GetDecrement() *PatternFlowGtpv2MessageLengthCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv2MessageLength) GetMetricTags() []*PatternFlowGtpv2MessageLengthMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter struct { +type PatternFlowGtpv2TeidCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -97005,8 +99770,8 @@ type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) Reset() { - *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter{} +func (x *PatternFlowGtpv2TeidCounter) Reset() { + *x = PatternFlowGtpv2TeidCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[901] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97014,13 +99779,13 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) Reset() } } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) String() string { +func (x *PatternFlowGtpv2TeidCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) ProtoMessage() {} +func (*PatternFlowGtpv2TeidCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowGtpv2TeidCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[901] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97032,55 +99797,55 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) ProtoRef return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowGtpv2TeidCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2TeidCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{901} } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) GetStart() uint32 { +func (x *PatternFlowGtpv2TeidCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) GetStep() uint32 { +func (x *PatternFlowGtpv2TeidCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) GetCount() uint32 { +func (x *PatternFlowGtpv2TeidCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Reserved field, MUST be zero. -type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv2TeidMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 32 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) Reset() { - *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved{} +func (x *PatternFlowGtpv2TeidMetricTag) Reset() { + *x = PatternFlowGtpv2TeidMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[902] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97088,13 +99853,13 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) Reset() { } } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) String() string { +func (x *PatternFlowGtpv2TeidMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) ProtoMessage() {} +func (*PatternFlowGtpv2TeidMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) ProtoReflect() protoreflect.Message { +func (x *PatternFlowGtpv2TeidMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[902] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97106,65 +99871,60 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) ProtoReflect() return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowGtpv2TeidMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2TeidMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{902} } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) GetChoice() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *PatternFlowGtpv2TeidMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_unspecified + return "" } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowGtpv2TeidMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) GetIncrement() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) GetDecrement() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowGtpv2TeidMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } - return nil + return 0 } -// integer counter pattern -type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter struct { +// Tunnel endpoint identifier. A 32-bit (4-octet) field used to multiplex different +// connections in the same GTP tunnel. Is present only if the teid_flag is set. +type PatternFlowGtpv2Teid struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 1 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = Choice.Enum.value + Choice *PatternFlowGtpv2Teid_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2Teid_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowGtpv2TeidCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowGtpv2TeidCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv2TeidMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) Reset() { - *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter{} +func (x *PatternFlowGtpv2Teid) Reset() { + *x = PatternFlowGtpv2Teid{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[903] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97172,13 +99932,13 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) Reset() { } } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) String() string { +func (x *PatternFlowGtpv2Teid) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) ProtoMessage() {} +func (*PatternFlowGtpv2Teid) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowGtpv2Teid) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[903] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97190,56 +99950,72 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) ProtoReflec return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowGtpv2Teid.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2Teid) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{903} } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowGtpv2Teid) GetChoice() PatternFlowGtpv2Teid_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return PatternFlowGtpv2Teid_Choice_unspecified } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowGtpv2Teid) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } return 0 } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowGtpv2Teid) GetValues() []uint32 { + if x != nil { + return x.Values } - return 0 + return nil } -// A 16-bit identifier used in the SENDER_TEMPLATE that can be changed to allow a sender -// to share resources with itself. -type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId struct { +func (x *PatternFlowGtpv2Teid) GetIncrement() *PatternFlowGtpv2TeidCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowGtpv2Teid) GetDecrement() *PatternFlowGtpv2TeidCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowGtpv2Teid) GetMetricTags() []*PatternFlowGtpv2TeidMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowGtpv2SequenceNumberCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum,oneof" json:"choice,omitempty"` + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [1] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) Reset() { - *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId{} +func (x *PatternFlowGtpv2SequenceNumberCounter) Reset() { + *x = PatternFlowGtpv2SequenceNumberCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[904] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97247,13 +100023,13 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) Reset() { } } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) String() string { +func (x *PatternFlowGtpv2SequenceNumberCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) ProtoMessage() {} +func (*PatternFlowGtpv2SequenceNumberCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) ProtoReflect() protoreflect.Message { +func (x *PatternFlowGtpv2SequenceNumberCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[904] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97265,65 +100041,55 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) ProtoReflect() pro return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowGtpv2SequenceNumberCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2SequenceNumberCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{904} } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) GetChoice() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_unspecified -} - -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowGtpv2SequenceNumberCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } return 0 } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) GetIncrement() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter { - if x != nil { - return x.Increment +func (x *PatternFlowGtpv2SequenceNumberCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step } - return nil + return 0 } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) GetDecrement() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowGtpv2SequenceNumberCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count } - return nil + return 0 } -// integer counter pattern -type PatternFlowRSVPPathSenderTspecIntServVersionCounter struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv2SequenceNumberMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 24 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServVersionCounter) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServVersionCounter{} +func (x *PatternFlowGtpv2SequenceNumberMetricTag) Reset() { + *x = PatternFlowGtpv2SequenceNumberMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[905] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97331,13 +100097,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServVersionCounter) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServVersionCounter) String() string { +func (x *PatternFlowGtpv2SequenceNumberMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServVersionCounter) ProtoMessage() {} +func (*PatternFlowGtpv2SequenceNumberMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServVersionCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowGtpv2SequenceNumberMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[905] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97349,41 +100115,41 @@ func (x *PatternFlowRSVPPathSenderTspecIntServVersionCounter) ProtoReflect() pro return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServVersionCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServVersionCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowGtpv2SequenceNumberMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2SequenceNumberMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{905} } -func (x *PatternFlowRSVPPathSenderTspecIntServVersionCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowGtpv2SequenceNumberMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return 0 + return "" } -func (x *PatternFlowRSVPPathSenderTspecIntServVersionCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowGtpv2SequenceNumberMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServVersionCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowGtpv2SequenceNumberMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } return 0 } -// Message format version number. -type PatternFlowRSVPPathSenderTspecIntServVersion struct { +// The sequence number +type PatternFlowGtpv2SequenceNumber struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv2SequenceNumber_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2SequenceNumber_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -97391,13 +100157,17 @@ type PatternFlowRSVPPathSenderTspecIntServVersion struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathSenderTspecIntServVersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv2SequenceNumberCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathSenderTspecIntServVersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv2SequenceNumberCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv2SequenceNumberMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServVersion) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServVersion{} +func (x *PatternFlowGtpv2SequenceNumber) Reset() { + *x = PatternFlowGtpv2SequenceNumber{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[906] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97405,13 +100175,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServVersion) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServVersion) String() string { +func (x *PatternFlowGtpv2SequenceNumber) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServVersion) ProtoMessage() {} +func (*PatternFlowGtpv2SequenceNumber) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServVersion) ProtoReflect() protoreflect.Message { +func (x *PatternFlowGtpv2SequenceNumber) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[906] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97423,48 +100193,55 @@ func (x *PatternFlowRSVPPathSenderTspecIntServVersion) ProtoReflect() protorefle return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServVersion.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServVersion) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowGtpv2SequenceNumber.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2SequenceNumber) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{906} } -func (x *PatternFlowRSVPPathSenderTspecIntServVersion) GetChoice() PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum { +func (x *PatternFlowGtpv2SequenceNumber) GetChoice() PatternFlowGtpv2SequenceNumber_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathSenderTspecIntServVersion_Choice_unspecified + return PatternFlowGtpv2SequenceNumber_Choice_unspecified } -func (x *PatternFlowRSVPPathSenderTspecIntServVersion) GetValue() uint32 { +func (x *PatternFlowGtpv2SequenceNumber) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServVersion) GetValues() []uint32 { +func (x *PatternFlowGtpv2SequenceNumber) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathSenderTspecIntServVersion) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServVersionCounter { +func (x *PatternFlowGtpv2SequenceNumber) GetIncrement() *PatternFlowGtpv2SequenceNumberCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathSenderTspecIntServVersion) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServVersionCounter { +func (x *PatternFlowGtpv2SequenceNumber) GetDecrement() *PatternFlowGtpv2SequenceNumberCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv2SequenceNumber) GetMetricTags() []*PatternFlowGtpv2SequenceNumberMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowRSVPPathSenderTspecIntServReserved1Counter struct { +type PatternFlowGtpv2Spare2Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -97480,8 +100257,8 @@ type PatternFlowRSVPPathSenderTspecIntServReserved1Counter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1Counter) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServReserved1Counter{} +func (x *PatternFlowGtpv2Spare2Counter) Reset() { + *x = PatternFlowGtpv2Spare2Counter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[907] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97489,13 +100266,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServReserved1Counter) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1Counter) String() string { +func (x *PatternFlowGtpv2Spare2Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServReserved1Counter) ProtoMessage() {} +func (*PatternFlowGtpv2Spare2Counter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1Counter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowGtpv2Spare2Counter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[907] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97507,41 +100284,115 @@ func (x *PatternFlowRSVPPathSenderTspecIntServReserved1Counter) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServReserved1Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServReserved1Counter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowGtpv2Spare2Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2Spare2Counter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{907} } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1Counter) GetStart() uint32 { +func (x *PatternFlowGtpv2Spare2Counter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1Counter) GetStep() uint32 { +func (x *PatternFlowGtpv2Spare2Counter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1Counter) GetCount() uint32 { +func (x *PatternFlowGtpv2Spare2Counter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Reserved. -type PatternFlowRSVPPathSenderTspecIntServReserved1 struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowGtpv2Spare2MetricTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` +} + +func (x *PatternFlowGtpv2Spare2MetricTag) Reset() { + *x = PatternFlowGtpv2Spare2MetricTag{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[908] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv2Spare2MetricTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv2Spare2MetricTag) ProtoMessage() {} + +func (x *PatternFlowGtpv2Spare2MetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[908] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv2Spare2MetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2Spare2MetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{908} +} + +func (x *PatternFlowGtpv2Spare2MetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowGtpv2Spare2MetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowGtpv2Spare2MetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// Reserved field +type PatternFlowGtpv2Spare2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowGtpv2Spare2_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowGtpv2Spare2_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -97549,28 +100400,32 @@ type PatternFlowRSVPPathSenderTspecIntServReserved1 struct { // default = [0] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathSenderTspecIntServReserved1Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowGtpv2Spare2Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathSenderTspecIntServReserved1Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowGtpv2Spare2Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowGtpv2Spare2MetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServReserved1{} +func (x *PatternFlowGtpv2Spare2) Reset() { + *x = PatternFlowGtpv2Spare2{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[908] + mi := &file_otg_proto_msgTypes[909] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) String() string { +func (x *PatternFlowGtpv2Spare2) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServReserved1) ProtoMessage() {} +func (*PatternFlowGtpv2Spare2) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[908] +func (x *PatternFlowGtpv2Spare2) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[909] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -97581,54 +100436,61 @@ func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) ProtoReflect() protoref return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServReserved1.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServReserved1) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{908} +// Deprecated: Use PatternFlowGtpv2Spare2.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2Spare2) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{909} } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) GetChoice() PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum { +func (x *PatternFlowGtpv2Spare2) GetChoice() PatternFlowGtpv2Spare2_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_unspecified + return PatternFlowGtpv2Spare2_Choice_unspecified } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) GetValue() uint32 { +func (x *PatternFlowGtpv2Spare2) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) GetValues() []uint32 { +func (x *PatternFlowGtpv2Spare2) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServReserved1Counter { +func (x *PatternFlowGtpv2Spare2) GetIncrement() *PatternFlowGtpv2Spare2Counter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServReserved1Counter { +func (x *PatternFlowGtpv2Spare2) GetDecrement() *PatternFlowGtpv2Spare2Counter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowGtpv2Spare2) GetMetricTags() []*PatternFlowGtpv2Spare2MetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter struct { +type PatternFlowArpHardwareTypeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 7 + // default = 1 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -97638,23 +100500,23 @@ type PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter{} +func (x *PatternFlowArpHardwareTypeCounter) Reset() { + *x = PatternFlowArpHardwareTypeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[909] + mi := &file_otg_proto_msgTypes[910] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) String() string { +func (x *PatternFlowArpHardwareTypeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) ProtoMessage() {} +func (*PatternFlowArpHardwareTypeCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[909] +func (x *PatternFlowArpHardwareTypeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[910] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -97665,139 +100527,55 @@ func (x *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) ProtoReflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{909} +// Deprecated: Use PatternFlowArpHardwareTypeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowArpHardwareTypeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{910} } -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) GetStart() uint32 { +func (x *PatternFlowArpHardwareTypeCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) GetStep() uint32 { +func (x *PatternFlowArpHardwareTypeCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) GetCount() uint32 { +func (x *PatternFlowArpHardwareTypeCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Overall length (7 words not including header). -type PatternFlowRSVPPathSenderTspecIntServOverallLength struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 7 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [7] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` -} - -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServOverallLength{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[910] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PatternFlowRSVPPathSenderTspecIntServOverallLength) ProtoMessage() {} - -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[910] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServOverallLength.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServOverallLength) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{910} -} - -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) GetChoice() PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_unspecified -} - -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter { - if x != nil { - return x.Decrement - } - return nil -} - -// integer counter pattern -type PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowArpHardwareTypeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 1 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter{} +func (x *PatternFlowArpHardwareTypeMetricTag) Reset() { + *x = PatternFlowArpHardwareTypeMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[911] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97805,13 +100583,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) String() string { +func (x *PatternFlowArpHardwareTypeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) ProtoMessage() {} +func (*PatternFlowArpHardwareTypeMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpHardwareTypeMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[911] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97823,41 +100601,41 @@ func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) ProtoReflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpHardwareTypeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowArpHardwareTypeMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{911} } -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowArpHardwareTypeMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return 0 + return "" } -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowArpHardwareTypeMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowArpHardwareTypeMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } return 0 } -// Service header, service number - '1' (Generic information) if in a PATH message. -type PatternFlowRSVPPathSenderTspecIntServServiceHeader struct { +// Network link protocol type +type PatternFlowArpHardwareType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowArpHardwareType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpHardwareType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 1 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -97865,13 +100643,17 @@ type PatternFlowRSVPPathSenderTspecIntServServiceHeader struct { // default = [1] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowArpHardwareTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowArpHardwareTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowArpHardwareTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServServiceHeader{} +func (x *PatternFlowArpHardwareType) Reset() { + *x = PatternFlowArpHardwareType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[912] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97879,13 +100661,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) String() string { +func (x *PatternFlowArpHardwareType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServServiceHeader) ProtoMessage() {} +func (*PatternFlowArpHardwareType) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpHardwareType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[912] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97897,54 +100679,61 @@ func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) ProtoReflect() prot return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServServiceHeader.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServServiceHeader) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpHardwareType.ProtoReflect.Descriptor instead. +func (*PatternFlowArpHardwareType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{912} } -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) GetChoice() PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum { +func (x *PatternFlowArpHardwareType) GetChoice() PatternFlowArpHardwareType_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_unspecified + return PatternFlowArpHardwareType_Choice_unspecified } -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) GetValue() uint32 { +func (x *PatternFlowArpHardwareType) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) GetValues() []uint32 { +func (x *PatternFlowArpHardwareType) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter { +func (x *PatternFlowArpHardwareType) GetIncrement() *PatternFlowArpHardwareTypeCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter { +func (x *PatternFlowArpHardwareType) GetDecrement() *PatternFlowArpHardwareTypeCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowArpHardwareType) GetMetricTags() []*PatternFlowArpHardwareTypeMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowRSVPPathSenderTspecIntServZeroBitCounter struct { +type PatternFlowArpProtocolTypeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 + // default = 2048 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -97954,8 +100743,8 @@ type PatternFlowRSVPPathSenderTspecIntServZeroBitCounter struct { Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServZeroBitCounter{} +func (x *PatternFlowArpProtocolTypeCounter) Reset() { + *x = PatternFlowArpProtocolTypeCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[913] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97963,13 +100752,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) String() string { +func (x *PatternFlowArpProtocolTypeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) ProtoMessage() {} +func (*PatternFlowArpProtocolTypeCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpProtocolTypeCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[913] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97981,55 +100770,55 @@ func (x *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) ProtoReflect() pro return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServZeroBitCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpProtocolTypeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowArpProtocolTypeCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{913} } -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) GetStart() uint32 { +func (x *PatternFlowArpProtocolTypeCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) GetStep() uint32 { +func (x *PatternFlowArpProtocolTypeCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) GetCount() uint32 { +func (x *PatternFlowArpProtocolTypeCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// MUST be 0. -type PatternFlowRSVPPathSenderTspecIntServZeroBit struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowArpProtocolTypeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServZeroBit{} +func (x *PatternFlowArpProtocolTypeMetricTag) Reset() { + *x = PatternFlowArpProtocolTypeMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[914] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98037,13 +100826,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) String() string { +func (x *PatternFlowArpProtocolTypeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServZeroBit) ProtoMessage() {} +func (*PatternFlowArpProtocolTypeMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpProtocolTypeMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[914] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98055,65 +100844,59 @@ func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) ProtoReflect() protorefle return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServZeroBit.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServZeroBit) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpProtocolTypeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowArpProtocolTypeMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{914} } -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) GetChoice() PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *PatternFlowArpProtocolTypeMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_unspecified + return "" } -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowArpProtocolTypeMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowArpProtocolTypeMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } - return nil + return 0 } -// integer counter pattern -type PatternFlowRSVPPathSenderTspecIntServReserved2Counter struct { +// The internetwork protocol for which the ARP request is intended +type PatternFlowArpProtocolType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = Choice.Enum.value + Choice *PatternFlowArpProtocolType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpProtocolType_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 2048 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // default = [2048] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowArpProtocolTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowArpProtocolTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowArpProtocolTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2Counter) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServReserved2Counter{} +func (x *PatternFlowArpProtocolType) Reset() { + *x = PatternFlowArpProtocolType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[915] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98121,13 +100904,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServReserved2Counter) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2Counter) String() string { +func (x *PatternFlowArpProtocolType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServReserved2Counter) ProtoMessage() {} +func (*PatternFlowArpProtocolType) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2Counter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpProtocolType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[915] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98139,55 +100922,72 @@ func (x *PatternFlowRSVPPathSenderTspecIntServReserved2Counter) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServReserved2Counter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServReserved2Counter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpProtocolType.ProtoReflect.Descriptor instead. +func (*PatternFlowArpProtocolType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{915} } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2Counter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowArpProtocolType) GetChoice() PatternFlowArpProtocolType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return PatternFlowArpProtocolType_Choice_unspecified } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2Counter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowArpProtocolType) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2Counter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowArpProtocolType) GetValues() []uint32 { + if x != nil { + return x.Values } - return 0 + return nil } -// Reserved. -type PatternFlowRSVPPathSenderTspecIntServReserved2 struct { +func (x *PatternFlowArpProtocolType) GetIncrement() *PatternFlowArpProtocolTypeCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowArpProtocolType) GetDecrement() *PatternFlowArpProtocolTypeCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowArpProtocolType) GetMetricTags() []*PatternFlowArpProtocolTypeMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowArpHardwareLengthCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = 6 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathSenderTspecIntServReserved2Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathSenderTspecIntServReserved2Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServReserved2{} +func (x *PatternFlowArpHardwareLengthCounter) Reset() { + *x = PatternFlowArpHardwareLengthCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[916] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98195,13 +100995,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) String() string { +func (x *PatternFlowArpHardwareLengthCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServReserved2) ProtoMessage() {} +func (*PatternFlowArpHardwareLengthCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpHardwareLengthCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[916] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98213,65 +101013,55 @@ func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) ProtoReflect() protoref return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServReserved2.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServReserved2) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpHardwareLengthCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowArpHardwareLengthCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{916} } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) GetChoice() PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_unspecified -} - -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowArpHardwareLengthCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServReserved2Counter { - if x != nil { - return x.Increment +func (x *PatternFlowArpHardwareLengthCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step } - return nil + return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServReserved2Counter { - if x != nil { - return x.Decrement +func (x *PatternFlowArpHardwareLengthCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count } - return nil + return 0 } -// integer counter pattern -type PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowArpHardwareLengthMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 6 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter{} +func (x *PatternFlowArpHardwareLengthMetricTag) Reset() { + *x = PatternFlowArpHardwareLengthMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[917] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98279,13 +101069,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) Reset( } } -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) String() string { +func (x *PatternFlowArpHardwareLengthMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) ProtoMessage() {} +func (*PatternFlowArpHardwareLengthMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpHardwareLengthMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[917] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98297,41 +101087,41 @@ func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) ProtoR return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpHardwareLengthMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowArpHardwareLengthMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{917} } -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowArpHardwareLengthMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return 0 + return "" } -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowArpHardwareLengthMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowArpHardwareLengthMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } return 0 } -// Length of service data, 6 words not including per-service header. -type PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData struct { +// Length (in octets) of a hardware address +type PatternFlowArpHardwareLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowArpHardwareLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpHardwareLength_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 6 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -98339,13 +101129,17 @@ type PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData struct { // default = [6] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowArpHardwareLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowArpHardwareLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowArpHardwareLengthMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData{} +func (x *PatternFlowArpHardwareLength) Reset() { + *x = PatternFlowArpHardwareLength{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[918] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98353,13 +101147,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) String() string { +func (x *PatternFlowArpHardwareLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) ProtoMessage() {} +func (*PatternFlowArpHardwareLength) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpHardwareLength) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[918] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98371,54 +101165,61 @@ func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) ProtoReflect( return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpHardwareLength.ProtoReflect.Descriptor instead. +func (*PatternFlowArpHardwareLength) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{918} } -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) GetChoice() PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum { +func (x *PatternFlowArpHardwareLength) GetChoice() PatternFlowArpHardwareLength_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_unspecified + return PatternFlowArpHardwareLength_Choice_unspecified } -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) GetValue() uint32 { +func (x *PatternFlowArpHardwareLength) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) GetValues() []uint32 { +func (x *PatternFlowArpHardwareLength) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter { +func (x *PatternFlowArpHardwareLength) GetIncrement() *PatternFlowArpHardwareLengthCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter { +func (x *PatternFlowArpHardwareLength) GetDecrement() *PatternFlowArpHardwareLengthCounter { if x != nil { return x.Decrement } return nil } +func (x *PatternFlowArpHardwareLength) GetMetricTags() []*PatternFlowArpHardwareLengthMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + // integer counter pattern -type PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter struct { +type PatternFlowArpProtocolLengthCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 127 + // default = 4 Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models // default = 1 @@ -98428,8 +101229,8 @@ type PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter str Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter{} +func (x *PatternFlowArpProtocolLengthCounter) Reset() { + *x = PatternFlowArpProtocolLengthCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[919] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98437,13 +101238,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter } } -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) String() string { +func (x *PatternFlowArpProtocolLengthCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) ProtoMessage() {} +func (*PatternFlowArpProtocolLengthCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpProtocolLengthCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[919] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98455,55 +101256,55 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpProtocolLengthCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowArpProtocolLengthCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{919} } -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) GetStart() uint32 { +func (x *PatternFlowArpProtocolLengthCounter) GetStart() uint32 { if x != nil && x.Start != nil { return *x.Start } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) GetStep() uint32 { +func (x *PatternFlowArpProtocolLengthCounter) GetStep() uint32 { if x != nil && x.Step != nil { return *x.Step } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) GetCount() uint32 { +func (x *PatternFlowArpProtocolLengthCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Parameter ID, parameter 127 (Token Bucket TSpec) -type PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowArpProtocolLengthMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 127 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [127] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec{} +func (x *PatternFlowArpProtocolLengthMetricTag) Reset() { + *x = PatternFlowArpProtocolLengthMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[920] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98511,13 +101312,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) Reset } } -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) String() string { +func (x *PatternFlowArpProtocolLengthMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) ProtoMessage() {} +func (*PatternFlowArpProtocolLengthMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpProtocolLengthMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[920] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98529,65 +101330,59 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) Proto return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpProtocolLengthMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowArpProtocolLengthMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{920} } -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) GetChoice() PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *PatternFlowArpProtocolLengthMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_unspecified + return "" } -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowArpProtocolLengthMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowArpProtocolLengthMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } - return nil + return 0 } -// integer counter pattern -type PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter struct { +// Length (in octets) of internetwork addresses +type PatternFlowArpProtocolLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = Choice.Enum.value + Choice *PatternFlowArpProtocolLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpProtocolLength_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 4 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // default = [4] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowArpProtocolLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowArpProtocolLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowArpProtocolLengthMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter{} +func (x *PatternFlowArpProtocolLength) Reset() { + *x = PatternFlowArpProtocolLength{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[921] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98595,13 +101390,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) String() string { +func (x *PatternFlowArpProtocolLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) ProtoMessage() {} +func (*PatternFlowArpProtocolLength) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpProtocolLength) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[921] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98613,55 +101408,72 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) ProtoRefl return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpProtocolLength.ProtoReflect.Descriptor instead. +func (*PatternFlowArpProtocolLength) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{921} } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowArpProtocolLength) GetChoice() PatternFlowArpProtocolLength_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return PatternFlowArpProtocolLength_Choice_unspecified } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowArpProtocolLength) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowArpProtocolLength) GetValues() []uint32 { + if x != nil { + return x.Values } - return 0 + return nil } -// Parameter 127 flags (none set) -type PatternFlowRSVPPathSenderTspecIntServParameter127Flag struct { +func (x *PatternFlowArpProtocolLength) GetIncrement() *PatternFlowArpProtocolLengthCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowArpProtocolLength) GetDecrement() *PatternFlowArpProtocolLengthCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowArpProtocolLength) GetMetricTags() []*PatternFlowArpProtocolLengthMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowArpOperationCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = 1 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServParameter127Flag{} +func (x *PatternFlowArpOperationCounter) Reset() { + *x = PatternFlowArpOperationCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[922] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98669,13 +101481,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) String() string { +func (x *PatternFlowArpOperationCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServParameter127Flag) ProtoMessage() {} +func (*PatternFlowArpOperationCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpOperationCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[922] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98687,65 +101499,55 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameter127Flag.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServParameter127Flag) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpOperationCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowArpOperationCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{922} } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) GetChoice() PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_unspecified -} - -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowArpOperationCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter { - if x != nil { - return x.Increment +func (x *PatternFlowArpOperationCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step } - return nil + return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowArpOperationCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count } - return nil + return 0 } -// integer counter pattern -type PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowArpOperationMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 5 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter{} +func (x *PatternFlowArpOperationMetricTag) Reset() { + *x = PatternFlowArpOperationMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[923] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98753,13 +101555,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) Reset() } } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) String() string { +func (x *PatternFlowArpOperationMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) ProtoMessage() {} +func (*PatternFlowArpOperationMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpOperationMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[923] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98771,55 +101573,59 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) ProtoRe return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpOperationMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowArpOperationMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{923} } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowArpOperationMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return 0 + return "" } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowArpOperationMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowArpOperationMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } return 0 } -// Parameter 127 length, 5 words not including per-service header -type PatternFlowRSVPPathSenderTspecIntServParameter127Length struct { +// The operation that the sender is performing +type PatternFlowArpOperation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowArpOperation_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpOperation_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 5 + // default = 1 Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [5] + // default = [1] Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowArpOperationCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowArpOperationCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowArpOperationMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServParameter127Length{} +func (x *PatternFlowArpOperation) Reset() { + *x = PatternFlowArpOperation{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[924] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98827,13 +101633,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) String() string { +func (x *PatternFlowArpOperation) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServParameter127Length) ProtoMessage() {} +func (*PatternFlowArpOperation) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpOperation) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[924] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98845,65 +101651,72 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) ProtoReflect() return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameter127Length.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServParameter127Length) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpOperation.ProtoReflect.Descriptor instead. +func (*PatternFlowArpOperation) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{924} } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) GetChoice() PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum { +func (x *PatternFlowArpOperation) GetChoice() PatternFlowArpOperation_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_unspecified + return PatternFlowArpOperation_Choice_unspecified } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) GetValue() uint32 { +func (x *PatternFlowArpOperation) GetValue() uint32 { if x != nil && x.Value != nil { return *x.Value } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) GetValues() []uint32 { +func (x *PatternFlowArpOperation) GetValues() []uint32 { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter { +func (x *PatternFlowArpOperation) GetIncrement() *PatternFlowArpOperationCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter { +func (x *PatternFlowArpOperation) GetDecrement() *PatternFlowArpOperationCounter { if x != nil { return x.Decrement } return nil } -// integer counter pattern -type PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter struct { +func (x *PatternFlowArpOperation) GetMetricTags() []*PatternFlowArpOperationMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// mac counter pattern +type PatternFlowArpSenderHardwareAddrCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = 00:00:00:00:00:00 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 00:00:00:00:00:01 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter{} +func (x *PatternFlowArpSenderHardwareAddrCounter) Reset() { + *x = PatternFlowArpSenderHardwareAddrCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[925] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98911,13 +101724,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) Reset() } } -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) String() string { +func (x *PatternFlowArpSenderHardwareAddrCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) ProtoMessage() {} +func (*PatternFlowArpSenderHardwareAddrCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpSenderHardwareAddrCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[925] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98929,56 +101742,55 @@ func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) ProtoRe return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpSenderHardwareAddrCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowArpSenderHardwareAddrCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{925} } -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) GetStart() uint32 { +func (x *PatternFlowArpSenderHardwareAddrCounter) GetStart() string { if x != nil && x.Start != nil { return *x.Start } - return 0 + return "" } -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) GetStep() uint32 { +func (x *PatternFlowArpSenderHardwareAddrCounter) GetStep() string { if x != nil && x.Step != nil { return *x.Step } - return 0 + return "" } -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) GetCount() uint32 { +func (x *PatternFlowArpSenderHardwareAddrCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// The minimum policed unit parameter should generally be set equal to the size of the -// smallest packet generated by the application. -type PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowArpSenderHardwareAddrMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 48 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit{} +func (x *PatternFlowArpSenderHardwareAddrMetricTag) Reset() { + *x = PatternFlowArpSenderHardwareAddrMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[926] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98986,13 +101798,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) String() string { +func (x *PatternFlowArpSenderHardwareAddrMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) ProtoMessage() {} +func (*PatternFlowArpSenderHardwareAddrMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpSenderHardwareAddrMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[926] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99004,65 +101816,59 @@ func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) ProtoReflect() return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpSenderHardwareAddrMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowArpSenderHardwareAddrMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{926} } -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) GetChoice() PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *PatternFlowArpSenderHardwareAddrMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_unspecified + return "" } -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowArpSenderHardwareAddrMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowArpSenderHardwareAddrMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } - return nil + return 0 } -// integer counter pattern -type PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter struct { +// Media address of the sender +type PatternFlowArpSenderHardwareAddr struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = Choice.Enum.value + Choice *PatternFlowArpSenderHardwareAddr_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpSenderHardwareAddr_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 00:00:00:00:00:00 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // default = ['00:00:00:00:00:00'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowArpSenderHardwareAddrCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowArpSenderHardwareAddrCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowArpSenderHardwareAddrMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter{} +func (x *PatternFlowArpSenderHardwareAddr) Reset() { + *x = PatternFlowArpSenderHardwareAddr{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[927] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99070,13 +101876,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) Reset() } } -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) String() string { +func (x *PatternFlowArpSenderHardwareAddr) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) ProtoMessage() {} +func (*PatternFlowArpSenderHardwareAddr) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpSenderHardwareAddr) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[927] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99088,57 +101894,72 @@ func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) ProtoRef return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpSenderHardwareAddr.ProtoReflect.Descriptor instead. +func (*PatternFlowArpSenderHardwareAddr) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{927} } -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowArpSenderHardwareAddr) GetChoice() PatternFlowArpSenderHardwareAddr_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return 0 + return PatternFlowArpSenderHardwareAddr_Choice_unspecified } -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowArpSenderHardwareAddr) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } - return 0 + return "" } -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowArpSenderHardwareAddr) GetValues() []string { + if x != nil { + return x.Values } - return 0 + return nil } -// The maximum packet size parameter should be set to the size of the largest packet -// the application might wish to generate. This value must, by definition, be equal -// to or larger than the value of The minimum policed unit. -type PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize struct { +func (x *PatternFlowArpSenderHardwareAddr) GetIncrement() *PatternFlowArpSenderHardwareAddrCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowArpSenderHardwareAddr) GetDecrement() *PatternFlowArpSenderHardwareAddrCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowArpSenderHardwareAddr) GetMetricTags() []*PatternFlowArpSenderHardwareAddrMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// ipv4 counter pattern +type PatternFlowArpSenderProtocolAddrCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = 0.0.0.0 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // default = 0.0.0.1 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize{} +func (x *PatternFlowArpSenderProtocolAddrCounter) Reset() { + *x = PatternFlowArpSenderProtocolAddrCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[928] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99146,13 +101967,13 @@ func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) Reset() { } } -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) String() string { +func (x *PatternFlowArpSenderProtocolAddrCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) ProtoMessage() {} +func (*PatternFlowArpSenderProtocolAddrCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpSenderProtocolAddrCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[928] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99164,65 +101985,55 @@ func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) ProtoReflect() return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpSenderProtocolAddrCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowArpSenderProtocolAddrCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{928} } -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) GetChoice() PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice - } - return PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_unspecified -} - -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *PatternFlowArpSenderProtocolAddrCounter) GetStart() string { + if x != nil && x.Start != nil { + return *x.Start } - return nil + return "" } -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter { - if x != nil { - return x.Increment +func (x *PatternFlowArpSenderProtocolAddrCounter) GetStep() string { + if x != nil && x.Step != nil { + return *x.Step } - return nil + return "" } -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowArpSenderProtocolAddrCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count } - return nil + return 0 } -// ipv4 counter pattern -type PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowArpSenderProtocolAddrMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = 0.0.0.0 - Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 0.0.0.1 - Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 32 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) Reset() { - *x = PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter{} +func (x *PatternFlowArpSenderProtocolAddrMetricTag) Reset() { + *x = PatternFlowArpSenderProtocolAddrMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[929] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99230,13 +102041,13 @@ func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) Reset } } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) String() string { +func (x *PatternFlowArpSenderProtocolAddrMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) ProtoMessage() {} +func (*PatternFlowArpSenderProtocolAddrMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpSenderProtocolAddrMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[929] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99248,42 +102059,41 @@ func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) Proto return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpSenderProtocolAddrMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowArpSenderProtocolAddrMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{929} } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) GetStart() string { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowArpSenderProtocolAddrMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } return "" } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) GetStep() string { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowArpSenderProtocolAddrMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } - return "" + return 0 } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowArpSenderProtocolAddrMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } return 0 } -// A 32-bit unicast, host address. Any network-reachable interface address is allowed -// here. Illegal addresses, such as certain loopback addresses, SHOULD NOT be used. -type PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address struct { +// Internetwork address of the sender +type PatternFlowArpSenderProtocolAddr struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowArpSenderProtocolAddr_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpSenderProtocolAddr_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models // default = 0.0.0.0 Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` @@ -99291,13 +102101,17 @@ type PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address struct { // default = ['0.0.0.0'] Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowArpSenderProtocolAddrCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowArpSenderProtocolAddrCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowArpSenderProtocolAddrMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) Reset() { - *x = PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address{} +func (x *PatternFlowArpSenderProtocolAddr) Reset() { + *x = PatternFlowArpSenderProtocolAddr{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[930] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99305,13 +102119,13 @@ func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) Reset() { } } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) String() string { +func (x *PatternFlowArpSenderProtocolAddr) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) ProtoMessage() {} +func (*PatternFlowArpSenderProtocolAddr) ProtoMessage() {} -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpSenderProtocolAddr) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[930] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99323,65 +102137,72 @@ func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) ProtoReflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpSenderProtocolAddr.ProtoReflect.Descriptor instead. +func (*PatternFlowArpSenderProtocolAddr) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{930} } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) GetChoice() PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum { +func (x *PatternFlowArpSenderProtocolAddr) GetChoice() PatternFlowArpSenderProtocolAddr_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_unspecified + return PatternFlowArpSenderProtocolAddr_Choice_unspecified } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) GetValue() string { +func (x *PatternFlowArpSenderProtocolAddr) GetValue() string { if x != nil && x.Value != nil { return *x.Value } return "" } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) GetValues() []string { +func (x *PatternFlowArpSenderProtocolAddr) GetValues() []string { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) GetIncrement() *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter { +func (x *PatternFlowArpSenderProtocolAddr) GetIncrement() *PatternFlowArpSenderProtocolAddrCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) GetDecrement() *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter { +func (x *PatternFlowArpSenderProtocolAddr) GetDecrement() *PatternFlowArpSenderProtocolAddrCounter { if x != nil { return x.Decrement } return nil } -// integer counter pattern -type PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter struct { +func (x *PatternFlowArpSenderProtocolAddr) GetMetricTags() []*PatternFlowArpSenderProtocolAddrMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// mac counter pattern +type PatternFlowArpTargetHardwareAddrCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = 32 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // default = 00:00:00:00:00:00 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // default = 00:00:00:00:00:01 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models // default = 1 Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) Reset() { - *x = PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter{} +func (x *PatternFlowArpTargetHardwareAddrCounter) Reset() { + *x = PatternFlowArpTargetHardwareAddrCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[931] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99389,13 +102210,13 @@ func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) Rese } } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) String() string { +func (x *PatternFlowArpTargetHardwareAddrCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) ProtoMessage() {} +func (*PatternFlowArpTargetHardwareAddrCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpTargetHardwareAddrCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[931] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99407,55 +102228,55 @@ func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) Prot return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpTargetHardwareAddrCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowArpTargetHardwareAddrCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{931} } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) GetStart() uint32 { +func (x *PatternFlowArpTargetHardwareAddrCounter) GetStart() string { if x != nil && x.Start != nil { return *x.Start } - return 0 + return "" } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) GetStep() uint32 { +func (x *PatternFlowArpTargetHardwareAddrCounter) GetStep() string { if x != nil && x.Step != nil { return *x.Step } - return 0 + return "" } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) GetCount() uint32 { +func (x *PatternFlowArpTargetHardwareAddrCounter) GetCount() uint32 { if x != nil && x.Count != nil { return *x.Count } return 0 } -// Prefix-length of IPv4 address. -type PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowArpTargetHardwareAddrMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum,oneof" json:"choice,omitempty"` - // Description missing in models - // default = 32 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` - // Description missing in models - // default = [32] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` - // Description missing in models - Increment *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` - // Description missing in models - Decrement *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 48 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) Reset() { - *x = PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength{} +func (x *PatternFlowArpTargetHardwareAddrMetricTag) Reset() { + *x = PatternFlowArpTargetHardwareAddrMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[932] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99463,13 +102284,13 @@ func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) Reset() { } } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) String() string { +func (x *PatternFlowArpTargetHardwareAddrMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) ProtoMessage() {} +func (*PatternFlowArpTargetHardwareAddrMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpTargetHardwareAddrMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[932] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99481,66 +102302,59 @@ func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) ProtoReflec return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpTargetHardwareAddrMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowArpTargetHardwareAddrMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{932} } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) GetChoice() PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *PatternFlowArpTargetHardwareAddrMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_unspecified + return "" } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowArpTargetHardwareAddrMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) GetValues() []uint32 { - if x != nil { - return x.Values - } - return nil -} - -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) GetIncrement() *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter { - if x != nil { - return x.Increment - } - return nil -} - -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) GetDecrement() *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter { - if x != nil { - return x.Decrement +func (x *PatternFlowArpTargetHardwareAddrMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } - return nil + return 0 } -// 0x01 = Global label. This flag indicates that the label will be understood if received -// on any interface. -type PatternFlowRSVPPathRecordRouteType1LabelFlags struct { +// Media address of the target +type PatternFlowArpTargetHardwareAddr struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowArpTargetHardwareAddr_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpTargetHardwareAddr_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 1 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 00:00:00:00:00:00 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [1] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = ['00:00:00:00:00:00'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowArpTargetHardwareAddrCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowArpTargetHardwareAddrCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowArpTargetHardwareAddrMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags) Reset() { - *x = PatternFlowRSVPPathRecordRouteType1LabelFlags{} +func (x *PatternFlowArpTargetHardwareAddr) Reset() { + *x = PatternFlowArpTargetHardwareAddr{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[933] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99548,13 +102362,13 @@ func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags) Reset() { } } -func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags) String() string { +func (x *PatternFlowArpTargetHardwareAddr) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRecordRouteType1LabelFlags) ProtoMessage() {} +func (*PatternFlowArpTargetHardwareAddr) ProtoMessage() {} -func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpTargetHardwareAddr) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[933] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99566,51 +102380,72 @@ func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags) ProtoReflect() protorefl return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRecordRouteType1LabelFlags.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRecordRouteType1LabelFlags) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpTargetHardwareAddr.ProtoReflect.Descriptor instead. +func (*PatternFlowArpTargetHardwareAddr) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{933} } -func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags) GetChoice() PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum { +func (x *PatternFlowArpTargetHardwareAddr) GetChoice() PatternFlowArpTargetHardwareAddr_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_unspecified + return PatternFlowArpTargetHardwareAddr_Choice_unspecified } -func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags) GetValue() uint32 { +func (x *PatternFlowArpTargetHardwareAddr) GetValue() string { if x != nil && x.Value != nil { return *x.Value } - return 0 + return "" } -func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags) GetValues() []uint32 { +func (x *PatternFlowArpTargetHardwareAddr) GetValues() []string { if x != nil { return x.Values } return nil } -// The C-Type of the included Label Object. Copied from the Label object. -type PatternFlowRSVPPathRecordRouteType1LabelCType struct { +func (x *PatternFlowArpTargetHardwareAddr) GetIncrement() *PatternFlowArpTargetHardwareAddrCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowArpTargetHardwareAddr) GetDecrement() *PatternFlowArpTargetHardwareAddrCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowArpTargetHardwareAddr) GetMetricTags() []*PatternFlowArpTargetHardwareAddrMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// ipv4 counter pattern +type PatternFlowArpTargetProtocolAddrCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models - // default = Choice.Enum.value - Choice *PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum,oneof" json:"choice,omitempty"` + // default = 0.0.0.0 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` // Description missing in models - // default = 1 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 0.0.0.1 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` // Description missing in models - // default = [1] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PatternFlowRSVPPathRecordRouteType1LabelCType) Reset() { - *x = PatternFlowRSVPPathRecordRouteType1LabelCType{} +func (x *PatternFlowArpTargetProtocolAddrCounter) Reset() { + *x = PatternFlowArpTargetProtocolAddrCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[934] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99618,13 +102453,13 @@ func (x *PatternFlowRSVPPathRecordRouteType1LabelCType) Reset() { } } -func (x *PatternFlowRSVPPathRecordRouteType1LabelCType) String() string { +func (x *PatternFlowArpTargetProtocolAddrCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRecordRouteType1LabelCType) ProtoMessage() {} +func (*PatternFlowArpTargetProtocolAddrCounter) ProtoMessage() {} -func (x *PatternFlowRSVPPathRecordRouteType1LabelCType) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpTargetProtocolAddrCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[934] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99636,51 +102471,55 @@ func (x *PatternFlowRSVPPathRecordRouteType1LabelCType) ProtoReflect() protorefl return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRecordRouteType1LabelCType.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRecordRouteType1LabelCType) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpTargetProtocolAddrCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowArpTargetProtocolAddrCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{934} } -func (x *PatternFlowRSVPPathRecordRouteType1LabelCType) GetChoice() PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum { - if x != nil && x.Choice != nil { - return *x.Choice +func (x *PatternFlowArpTargetProtocolAddrCounter) GetStart() string { + if x != nil && x.Start != nil { + return *x.Start } - return PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_unspecified + return "" } -func (x *PatternFlowRSVPPathRecordRouteType1LabelCType) GetValue() uint32 { - if x != nil && x.Value != nil { - return *x.Value +func (x *PatternFlowArpTargetProtocolAddrCounter) GetStep() string { + if x != nil && x.Step != nil { + return *x.Step } - return 0 + return "" } -func (x *PatternFlowRSVPPathRecordRouteType1LabelCType) GetValues() []uint32 { - if x != nil { - return x.Values +func (x *PatternFlowArpTargetProtocolAddrCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count } - return nil + return 0 } -// integer counter pattern -type PatternFlowRSVPPathObjectsCustomTypeCounter struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowArpTargetProtocolAddrMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Description missing in models + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field // default = 0 - Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` - // Description missing in models - // default = 1 - Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` - // Description missing in models - // default = 1 - Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 32 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *PatternFlowRSVPPathObjectsCustomTypeCounter) Reset() { - *x = PatternFlowRSVPPathObjectsCustomTypeCounter{} +func (x *PatternFlowArpTargetProtocolAddrMetricTag) Reset() { + *x = PatternFlowArpTargetProtocolAddrMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[935] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99688,13 +102527,13 @@ func (x *PatternFlowRSVPPathObjectsCustomTypeCounter) Reset() { } } -func (x *PatternFlowRSVPPathObjectsCustomTypeCounter) String() string { +func (x *PatternFlowArpTargetProtocolAddrMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathObjectsCustomTypeCounter) ProtoMessage() {} +func (*PatternFlowArpTargetProtocolAddrMetricTag) ProtoMessage() {} -func (x *PatternFlowRSVPPathObjectsCustomTypeCounter) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpTargetProtocolAddrMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[935] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99706,55 +102545,59 @@ func (x *PatternFlowRSVPPathObjectsCustomTypeCounter) ProtoReflect() protoreflec return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathObjectsCustomTypeCounter.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathObjectsCustomTypeCounter) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpTargetProtocolAddrMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowArpTargetProtocolAddrMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{935} } -func (x *PatternFlowRSVPPathObjectsCustomTypeCounter) GetStart() uint32 { - if x != nil && x.Start != nil { - return *x.Start +func (x *PatternFlowArpTargetProtocolAddrMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return 0 + return "" } -func (x *PatternFlowRSVPPathObjectsCustomTypeCounter) GetStep() uint32 { - if x != nil && x.Step != nil { - return *x.Step +func (x *PatternFlowArpTargetProtocolAddrMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (x *PatternFlowRSVPPathObjectsCustomTypeCounter) GetCount() uint32 { - if x != nil && x.Count != nil { - return *x.Count +func (x *PatternFlowArpTargetProtocolAddrMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } return 0 } -// User defined object type. -type PatternFlowRSVPPathObjectsCustomType struct { +// Internetwork address of the target +type PatternFlowArpTargetProtocolAddr struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Description missing in models // default = Choice.Enum.value - Choice *PatternFlowRSVPPathObjectsCustomType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathObjectsCustomType_Choice_Enum,oneof" json:"choice,omitempty"` + Choice *PatternFlowArpTargetProtocolAddr_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowArpTargetProtocolAddr_Choice_Enum,oneof" json:"choice,omitempty"` // Description missing in models - // default = 0 - Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // default = 0.0.0.0 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` // Description missing in models - // default = [0] - Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // default = ['0.0.0.0'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` // Description missing in models - Increment *PatternFlowRSVPPathObjectsCustomTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + Increment *PatternFlowArpTargetProtocolAddrCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` // Description missing in models - Decrement *PatternFlowRSVPPathObjectsCustomTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + Decrement *PatternFlowArpTargetProtocolAddrCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowArpTargetProtocolAddrMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *PatternFlowRSVPPathObjectsCustomType) Reset() { - *x = PatternFlowRSVPPathObjectsCustomType{} +func (x *PatternFlowArpTargetProtocolAddr) Reset() { + *x = PatternFlowArpTargetProtocolAddr{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[936] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99762,13 +102605,13 @@ func (x *PatternFlowRSVPPathObjectsCustomType) Reset() { } } -func (x *PatternFlowRSVPPathObjectsCustomType) String() string { +func (x *PatternFlowArpTargetProtocolAddr) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathObjectsCustomType) ProtoMessage() {} +func (*PatternFlowArpTargetProtocolAddr) ProtoMessage() {} -func (x *PatternFlowRSVPPathObjectsCustomType) ProtoReflect() protoreflect.Message { +func (x *PatternFlowArpTargetProtocolAddr) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[936] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99780,65 +102623,72 @@ func (x *PatternFlowRSVPPathObjectsCustomType) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathObjectsCustomType.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathObjectsCustomType) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowArpTargetProtocolAddr.ProtoReflect.Descriptor instead. +func (*PatternFlowArpTargetProtocolAddr) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{936} } -func (x *PatternFlowRSVPPathObjectsCustomType) GetChoice() PatternFlowRSVPPathObjectsCustomType_Choice_Enum { +func (x *PatternFlowArpTargetProtocolAddr) GetChoice() PatternFlowArpTargetProtocolAddr_Choice_Enum { if x != nil && x.Choice != nil { return *x.Choice } - return PatternFlowRSVPPathObjectsCustomType_Choice_unspecified + return PatternFlowArpTargetProtocolAddr_Choice_unspecified } -func (x *PatternFlowRSVPPathObjectsCustomType) GetValue() uint32 { +func (x *PatternFlowArpTargetProtocolAddr) GetValue() string { if x != nil && x.Value != nil { return *x.Value } - return 0 + return "" } -func (x *PatternFlowRSVPPathObjectsCustomType) GetValues() []uint32 { +func (x *PatternFlowArpTargetProtocolAddr) GetValues() []string { if x != nil { return x.Values } return nil } -func (x *PatternFlowRSVPPathObjectsCustomType) GetIncrement() *PatternFlowRSVPPathObjectsCustomTypeCounter { +func (x *PatternFlowArpTargetProtocolAddr) GetIncrement() *PatternFlowArpTargetProtocolAddrCounter { if x != nil { return x.Increment } return nil } -func (x *PatternFlowRSVPPathObjectsCustomType) GetDecrement() *PatternFlowRSVPPathObjectsCustomTypeCounter { +func (x *PatternFlowArpTargetProtocolAddr) GetDecrement() *PatternFlowArpTargetProtocolAddrCounter { if x != nil { return x.Decrement } return nil } -// Version details -type Version struct { +func (x *PatternFlowArpTargetProtocolAddr) GetMetricTags() []*PatternFlowArpTargetProtocolAddrMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowIcmpEchoTypeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Version of API specification - // default = - ApiSpecVersion *string `protobuf:"bytes,1,opt,name=api_spec_version,json=apiSpecVersion,proto3,oneof" json:"api_spec_version,omitempty"` - // Version of SDK generated from API specification - // default = - SdkVersion *string `protobuf:"bytes,2,opt,name=sdk_version,json=sdkVersion,proto3,oneof" json:"sdk_version,omitempty"` - // Version of application consuming or serving the API - // default = - AppVersion *string `protobuf:"bytes,3,opt,name=app_version,json=appVersion,proto3,oneof" json:"app_version,omitempty"` + // Description missing in models + // default = 8 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *Version) Reset() { - *x = Version{} +func (x *PatternFlowIcmpEchoTypeCounter) Reset() { + *x = PatternFlowIcmpEchoTypeCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[937] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99846,13 +102696,13 @@ func (x *Version) Reset() { } } -func (x *Version) String() string { +func (x *PatternFlowIcmpEchoTypeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Version) ProtoMessage() {} +func (*PatternFlowIcmpEchoTypeCounter) ProtoMessage() {} -func (x *Version) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpEchoTypeCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[937] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99864,44 +102714,55 @@ func (x *Version) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Version.ProtoReflect.Descriptor instead. -func (*Version) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpEchoTypeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoTypeCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{937} } -func (x *Version) GetApiSpecVersion() string { - if x != nil && x.ApiSpecVersion != nil { - return *x.ApiSpecVersion +func (x *PatternFlowIcmpEchoTypeCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } - return "" + return 0 } -func (x *Version) GetSdkVersion() string { - if x != nil && x.SdkVersion != nil { - return *x.SdkVersion +func (x *PatternFlowIcmpEchoTypeCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step } - return "" + return 0 } -func (x *Version) GetAppVersion() string { - if x != nil && x.AppVersion != nil { - return *x.AppVersion +func (x *PatternFlowIcmpEchoTypeCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count } - return "" + return 0 } -// The request has succeeded with no application content but the server -// may return a list of detailed warnings. -type Success struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowIcmpEchoTypeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Warning *Warning `protobuf:"bytes,1,opt,name=warning,proto3" json:"warning,omitempty"` + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *Success) Reset() { - *x = Success{} +func (x *PatternFlowIcmpEchoTypeMetricTag) Reset() { + *x = PatternFlowIcmpEchoTypeMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[938] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99909,13 +102770,13 @@ func (x *Success) Reset() { } } -func (x *Success) String() string { +func (x *PatternFlowIcmpEchoTypeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Success) ProtoMessage() {} +func (*PatternFlowIcmpEchoTypeMetricTag) ProtoMessage() {} -func (x *Success) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpEchoTypeMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[938] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99927,29 +102788,59 @@ func (x *Success) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Success.ProtoReflect.Descriptor instead. -func (*Success) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpEchoTypeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoTypeMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{938} } -func (x *Success) GetWarning() *Warning { - if x != nil { - return x.Warning +func (x *PatternFlowIcmpEchoTypeMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return nil + return "" } -// The request did not succeed and server has responded with error details. -type Failure struct { +func (x *PatternFlowIcmpEchoTypeMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowIcmpEchoTypeMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// The type of ICMP echo packet +type PatternFlowIcmpEchoType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIcmpEchoType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpEchoType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 8 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [8] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIcmpEchoTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIcmpEchoTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowIcmpEchoTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *Failure) Reset() { - *x = Failure{} +func (x *PatternFlowIcmpEchoType) Reset() { + *x = PatternFlowIcmpEchoType{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[939] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99957,13 +102848,13 @@ func (x *Failure) Reset() { } } -func (x *Failure) String() string { +func (x *PatternFlowIcmpEchoType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Failure) ProtoMessage() {} +func (*PatternFlowIcmpEchoType) ProtoMessage() {} -func (x *Failure) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpEchoType) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[939] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99975,28 +102866,72 @@ func (x *Failure) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Failure.ProtoReflect.Descriptor instead. -func (*Failure) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpEchoType.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoType) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{939} } -func (x *Failure) GetError() *Error { +func (x *PatternFlowIcmpEchoType) GetChoice() PatternFlowIcmpEchoType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIcmpEchoType_Choice_unspecified +} + +func (x *PatternFlowIcmpEchoType) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value + } + return 0 +} + +func (x *PatternFlowIcmpEchoType) GetValues() []uint32 { if x != nil { - return x.Error + return x.Values } return nil } -type SetConfigRequest struct { +func (x *PatternFlowIcmpEchoType) GetIncrement() *PatternFlowIcmpEchoTypeCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowIcmpEchoType) GetDecrement() *PatternFlowIcmpEchoTypeCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowIcmpEchoType) GetMetricTags() []*PatternFlowIcmpEchoTypeMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowIcmpEchoCodeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *SetConfigRequest) Reset() { - *x = SetConfigRequest{} +func (x *PatternFlowIcmpEchoCodeCounter) Reset() { + *x = PatternFlowIcmpEchoCodeCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[940] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100004,13 +102939,13 @@ func (x *SetConfigRequest) Reset() { } } -func (x *SetConfigRequest) String() string { +func (x *PatternFlowIcmpEchoCodeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetConfigRequest) ProtoMessage() {} +func (*PatternFlowIcmpEchoCodeCounter) ProtoMessage() {} -func (x *SetConfigRequest) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpEchoCodeCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[940] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100022,28 +102957,55 @@ func (x *SetConfigRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetConfigRequest.ProtoReflect.Descriptor instead. -func (*SetConfigRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpEchoCodeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoCodeCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{940} } -func (x *SetConfigRequest) GetConfig() *Config { - if x != nil { - return x.Config +func (x *PatternFlowIcmpEchoCodeCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } - return nil + return 0 } -type UpdateConfigRequest struct { +func (x *PatternFlowIcmpEchoCodeCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowIcmpEchoCodeCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowIcmpEchoCodeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ConfigUpdate *ConfigUpdate `protobuf:"bytes,1,opt,name=config_update,json=configUpdate,proto3" json:"config_update,omitempty"` + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *UpdateConfigRequest) Reset() { - *x = UpdateConfigRequest{} +func (x *PatternFlowIcmpEchoCodeMetricTag) Reset() { + *x = PatternFlowIcmpEchoCodeMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[941] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100051,13 +103013,13 @@ func (x *UpdateConfigRequest) Reset() { } } -func (x *UpdateConfigRequest) String() string { +func (x *PatternFlowIcmpEchoCodeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateConfigRequest) ProtoMessage() {} +func (*PatternFlowIcmpEchoCodeMetricTag) ProtoMessage() {} -func (x *UpdateConfigRequest) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpEchoCodeMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[941] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100069,28 +103031,59 @@ func (x *UpdateConfigRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateConfigRequest.ProtoReflect.Descriptor instead. -func (*UpdateConfigRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpEchoCodeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoCodeMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{941} } -func (x *UpdateConfigRequest) GetConfigUpdate() *ConfigUpdate { - if x != nil { - return x.ConfigUpdate +func (x *PatternFlowIcmpEchoCodeMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return nil + return "" } -type SetConfigResponse struct { +func (x *PatternFlowIcmpEchoCodeMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowIcmpEchoCodeMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// The ICMP subtype. The default code for ICMP echo request and reply is 0. +type PatternFlowIcmpEchoCode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Warning *Warning `protobuf:"bytes,1,opt,name=warning,proto3" json:"warning,omitempty"` + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIcmpEchoCode_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpEchoCode_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIcmpEchoCodeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIcmpEchoCodeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowIcmpEchoCodeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *SetConfigResponse) Reset() { - *x = SetConfigResponse{} +func (x *PatternFlowIcmpEchoCode) Reset() { + *x = PatternFlowIcmpEchoCode{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[942] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100098,13 +103091,13 @@ func (x *SetConfigResponse) Reset() { } } -func (x *SetConfigResponse) String() string { +func (x *PatternFlowIcmpEchoCode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetConfigResponse) ProtoMessage() {} +func (*PatternFlowIcmpEchoCode) ProtoMessage() {} -func (x *SetConfigResponse) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpEchoCode) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[942] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100116,28 +103109,71 @@ func (x *SetConfigResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetConfigResponse.ProtoReflect.Descriptor instead. -func (*SetConfigResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpEchoCode.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoCode) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{942} } -func (x *SetConfigResponse) GetWarning() *Warning { +func (x *PatternFlowIcmpEchoCode) GetChoice() PatternFlowIcmpEchoCode_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIcmpEchoCode_Choice_unspecified +} + +func (x *PatternFlowIcmpEchoCode) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value + } + return 0 +} + +func (x *PatternFlowIcmpEchoCode) GetValues() []uint32 { if x != nil { - return x.Warning + return x.Values } return nil } -type GetConfigResponse struct { +func (x *PatternFlowIcmpEchoCode) GetIncrement() *PatternFlowIcmpEchoCodeCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowIcmpEchoCode) GetDecrement() *PatternFlowIcmpEchoCodeCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowIcmpEchoCode) GetMetricTags() []*PatternFlowIcmpEchoCodeMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// ICMP checksum +type PatternFlowIcmpEchoChecksum struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + // The type of checksum + // default = Choice.Enum.generated + Choice *PatternFlowIcmpEchoChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpEchoChecksum_Choice_Enum,oneof" json:"choice,omitempty"` + // A system generated checksum value + // default = Generated.Enum.good + Generated *PatternFlowIcmpEchoChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowIcmpEchoChecksum_Generated_Enum,oneof" json:"generated,omitempty"` + // A custom checksum value + Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` } -func (x *GetConfigResponse) Reset() { - *x = GetConfigResponse{} +func (x *PatternFlowIcmpEchoChecksum) Reset() { + *x = PatternFlowIcmpEchoChecksum{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[943] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100145,13 +103181,13 @@ func (x *GetConfigResponse) Reset() { } } -func (x *GetConfigResponse) String() string { +func (x *PatternFlowIcmpEchoChecksum) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetConfigResponse) ProtoMessage() {} +func (*PatternFlowIcmpEchoChecksum) ProtoMessage() {} -func (x *GetConfigResponse) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpEchoChecksum) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[943] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100163,28 +103199,51 @@ func (x *GetConfigResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetConfigResponse.ProtoReflect.Descriptor instead. -func (*GetConfigResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpEchoChecksum.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoChecksum) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{943} } -func (x *GetConfigResponse) GetConfig() *Config { - if x != nil { - return x.Config +func (x *PatternFlowIcmpEchoChecksum) GetChoice() PatternFlowIcmpEchoChecksum_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return PatternFlowIcmpEchoChecksum_Choice_unspecified } -type UpdateConfigResponse struct { +func (x *PatternFlowIcmpEchoChecksum) GetGenerated() PatternFlowIcmpEchoChecksum_Generated_Enum { + if x != nil && x.Generated != nil { + return *x.Generated + } + return PatternFlowIcmpEchoChecksum_Generated_unspecified +} + +func (x *PatternFlowIcmpEchoChecksum) GetCustom() uint32 { + if x != nil && x.Custom != nil { + return *x.Custom + } + return 0 +} + +// integer counter pattern +type PatternFlowIcmpEchoIdentifierCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Warning *Warning `protobuf:"bytes,1,opt,name=warning,proto3" json:"warning,omitempty"` + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *UpdateConfigResponse) Reset() { - *x = UpdateConfigResponse{} +func (x *PatternFlowIcmpEchoIdentifierCounter) Reset() { + *x = PatternFlowIcmpEchoIdentifierCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[944] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100192,13 +103251,13 @@ func (x *UpdateConfigResponse) Reset() { } } -func (x *UpdateConfigResponse) String() string { +func (x *PatternFlowIcmpEchoIdentifierCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateConfigResponse) ProtoMessage() {} +func (*PatternFlowIcmpEchoIdentifierCounter) ProtoMessage() {} -func (x *UpdateConfigResponse) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpEchoIdentifierCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[944] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100210,28 +103269,55 @@ func (x *UpdateConfigResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateConfigResponse.ProtoReflect.Descriptor instead. -func (*UpdateConfigResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpEchoIdentifierCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoIdentifierCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{944} } -func (x *UpdateConfigResponse) GetWarning() *Warning { - if x != nil { - return x.Warning +func (x *PatternFlowIcmpEchoIdentifierCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } - return nil + return 0 } -type SetControlStateRequest struct { +func (x *PatternFlowIcmpEchoIdentifierCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowIcmpEchoIdentifierCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowIcmpEchoIdentifierMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ControlState *ControlState `protobuf:"bytes,1,opt,name=control_state,json=controlState,proto3" json:"control_state,omitempty"` + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *SetControlStateRequest) Reset() { - *x = SetControlStateRequest{} +func (x *PatternFlowIcmpEchoIdentifierMetricTag) Reset() { + *x = PatternFlowIcmpEchoIdentifierMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[945] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100239,13 +103325,13 @@ func (x *SetControlStateRequest) Reset() { } } -func (x *SetControlStateRequest) String() string { +func (x *PatternFlowIcmpEchoIdentifierMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetControlStateRequest) ProtoMessage() {} +func (*PatternFlowIcmpEchoIdentifierMetricTag) ProtoMessage() {} -func (x *SetControlStateRequest) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpEchoIdentifierMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[945] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100257,28 +103343,59 @@ func (x *SetControlStateRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetControlStateRequest.ProtoReflect.Descriptor instead. -func (*SetControlStateRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpEchoIdentifierMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoIdentifierMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{945} } -func (x *SetControlStateRequest) GetControlState() *ControlState { - if x != nil { - return x.ControlState +func (x *PatternFlowIcmpEchoIdentifierMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return nil + return "" } -type SetControlStateResponse struct { +func (x *PatternFlowIcmpEchoIdentifierMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowIcmpEchoIdentifierMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// ICMP identifier +type PatternFlowIcmpEchoIdentifier struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Warning *Warning `protobuf:"bytes,1,opt,name=warning,proto3" json:"warning,omitempty"` + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIcmpEchoIdentifier_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpEchoIdentifier_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIcmpEchoIdentifierCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIcmpEchoIdentifierCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowIcmpEchoIdentifierMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *SetControlStateResponse) Reset() { - *x = SetControlStateResponse{} +func (x *PatternFlowIcmpEchoIdentifier) Reset() { + *x = PatternFlowIcmpEchoIdentifier{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[946] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100286,13 +103403,13 @@ func (x *SetControlStateResponse) Reset() { } } -func (x *SetControlStateResponse) String() string { +func (x *PatternFlowIcmpEchoIdentifier) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetControlStateResponse) ProtoMessage() {} +func (*PatternFlowIcmpEchoIdentifier) ProtoMessage() {} -func (x *SetControlStateResponse) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpEchoIdentifier) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[946] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100304,28 +103421,72 @@ func (x *SetControlStateResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetControlStateResponse.ProtoReflect.Descriptor instead. -func (*SetControlStateResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpEchoIdentifier.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoIdentifier) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{946} } -func (x *SetControlStateResponse) GetWarning() *Warning { +func (x *PatternFlowIcmpEchoIdentifier) GetChoice() PatternFlowIcmpEchoIdentifier_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIcmpEchoIdentifier_Choice_unspecified +} + +func (x *PatternFlowIcmpEchoIdentifier) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value + } + return 0 +} + +func (x *PatternFlowIcmpEchoIdentifier) GetValues() []uint32 { if x != nil { - return x.Warning + return x.Values } return nil } -type SetControlActionRequest struct { +func (x *PatternFlowIcmpEchoIdentifier) GetIncrement() *PatternFlowIcmpEchoIdentifierCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowIcmpEchoIdentifier) GetDecrement() *PatternFlowIcmpEchoIdentifierCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowIcmpEchoIdentifier) GetMetricTags() []*PatternFlowIcmpEchoIdentifierMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowIcmpEchoSequenceNumberCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ControlAction *ControlAction `protobuf:"bytes,1,opt,name=control_action,json=controlAction,proto3" json:"control_action,omitempty"` + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *SetControlActionRequest) Reset() { - *x = SetControlActionRequest{} +func (x *PatternFlowIcmpEchoSequenceNumberCounter) Reset() { + *x = PatternFlowIcmpEchoSequenceNumberCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[947] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100333,13 +103494,13 @@ func (x *SetControlActionRequest) Reset() { } } -func (x *SetControlActionRequest) String() string { +func (x *PatternFlowIcmpEchoSequenceNumberCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetControlActionRequest) ProtoMessage() {} +func (*PatternFlowIcmpEchoSequenceNumberCounter) ProtoMessage() {} -func (x *SetControlActionRequest) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpEchoSequenceNumberCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[947] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100351,28 +103512,55 @@ func (x *SetControlActionRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetControlActionRequest.ProtoReflect.Descriptor instead. -func (*SetControlActionRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpEchoSequenceNumberCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoSequenceNumberCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{947} } -func (x *SetControlActionRequest) GetControlAction() *ControlAction { - if x != nil { - return x.ControlAction +func (x *PatternFlowIcmpEchoSequenceNumberCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } - return nil + return 0 } -type SetControlActionResponse struct { +func (x *PatternFlowIcmpEchoSequenceNumberCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowIcmpEchoSequenceNumberCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowIcmpEchoSequenceNumberMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ControlActionResponse *ControlActionResponse `protobuf:"bytes,1,opt,name=control_action_response,json=controlActionResponse,proto3" json:"control_action_response,omitempty"` + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *SetControlActionResponse) Reset() { - *x = SetControlActionResponse{} +func (x *PatternFlowIcmpEchoSequenceNumberMetricTag) Reset() { + *x = PatternFlowIcmpEchoSequenceNumberMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[948] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100380,13 +103568,13 @@ func (x *SetControlActionResponse) Reset() { } } -func (x *SetControlActionResponse) String() string { +func (x *PatternFlowIcmpEchoSequenceNumberMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetControlActionResponse) ProtoMessage() {} +func (*PatternFlowIcmpEchoSequenceNumberMetricTag) ProtoMessage() {} -func (x *SetControlActionResponse) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpEchoSequenceNumberMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[948] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100398,28 +103586,59 @@ func (x *SetControlActionResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetControlActionResponse.ProtoReflect.Descriptor instead. -func (*SetControlActionResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpEchoSequenceNumberMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoSequenceNumberMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{948} } -func (x *SetControlActionResponse) GetControlActionResponse() *ControlActionResponse { - if x != nil { - return x.ControlActionResponse +func (x *PatternFlowIcmpEchoSequenceNumberMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return nil + return "" } -type GetMetricsRequest struct { +func (x *PatternFlowIcmpEchoSequenceNumberMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowIcmpEchoSequenceNumberMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// ICMP sequence number +type PatternFlowIcmpEchoSequenceNumber struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MetricsRequest *MetricsRequest `protobuf:"bytes,1,opt,name=metrics_request,json=metricsRequest,proto3" json:"metrics_request,omitempty"` + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIcmpEchoSequenceNumber_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpEchoSequenceNumber_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIcmpEchoSequenceNumberCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIcmpEchoSequenceNumberCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowIcmpEchoSequenceNumberMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *GetMetricsRequest) Reset() { - *x = GetMetricsRequest{} +func (x *PatternFlowIcmpEchoSequenceNumber) Reset() { + *x = PatternFlowIcmpEchoSequenceNumber{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[949] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100427,13 +103646,13 @@ func (x *GetMetricsRequest) Reset() { } } -func (x *GetMetricsRequest) String() string { +func (x *PatternFlowIcmpEchoSequenceNumber) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetMetricsRequest) ProtoMessage() {} +func (*PatternFlowIcmpEchoSequenceNumber) ProtoMessage() {} -func (x *GetMetricsRequest) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpEchoSequenceNumber) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[949] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100445,28 +103664,71 @@ func (x *GetMetricsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetMetricsRequest.ProtoReflect.Descriptor instead. -func (*GetMetricsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpEchoSequenceNumber.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoSequenceNumber) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{949} } -func (x *GetMetricsRequest) GetMetricsRequest() *MetricsRequest { +func (x *PatternFlowIcmpEchoSequenceNumber) GetChoice() PatternFlowIcmpEchoSequenceNumber_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIcmpEchoSequenceNumber_Choice_unspecified +} + +func (x *PatternFlowIcmpEchoSequenceNumber) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value + } + return 0 +} + +func (x *PatternFlowIcmpEchoSequenceNumber) GetValues() []uint32 { if x != nil { - return x.MetricsRequest + return x.Values } return nil } -type GetMetricsResponse struct { +func (x *PatternFlowIcmpEchoSequenceNumber) GetIncrement() *PatternFlowIcmpEchoSequenceNumberCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowIcmpEchoSequenceNumber) GetDecrement() *PatternFlowIcmpEchoSequenceNumberCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowIcmpEchoSequenceNumber) GetMetricTags() []*PatternFlowIcmpEchoSequenceNumberMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// ICMP checksum +type PatternFlowIcmpCommonChecksum struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MetricsResponse *MetricsResponse `protobuf:"bytes,1,opt,name=metrics_response,json=metricsResponse,proto3" json:"metrics_response,omitempty"` + // The type of checksum + // default = Choice.Enum.generated + Choice *PatternFlowIcmpCommonChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpCommonChecksum_Choice_Enum,oneof" json:"choice,omitempty"` + // A system generated checksum value + // default = Generated.Enum.good + Generated *PatternFlowIcmpCommonChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowIcmpCommonChecksum_Generated_Enum,oneof" json:"generated,omitempty"` + // A custom checksum value + Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` } -func (x *GetMetricsResponse) Reset() { - *x = GetMetricsResponse{} +func (x *PatternFlowIcmpCommonChecksum) Reset() { + *x = PatternFlowIcmpCommonChecksum{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[950] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100474,13 +103736,13 @@ func (x *GetMetricsResponse) Reset() { } } -func (x *GetMetricsResponse) String() string { +func (x *PatternFlowIcmpCommonChecksum) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetMetricsResponse) ProtoMessage() {} +func (*PatternFlowIcmpCommonChecksum) ProtoMessage() {} -func (x *GetMetricsResponse) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpCommonChecksum) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[950] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100492,28 +103754,51 @@ func (x *GetMetricsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetMetricsResponse.ProtoReflect.Descriptor instead. -func (*GetMetricsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpCommonChecksum.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpCommonChecksum) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{950} } -func (x *GetMetricsResponse) GetMetricsResponse() *MetricsResponse { - if x != nil { - return x.MetricsResponse +func (x *PatternFlowIcmpCommonChecksum) GetChoice() PatternFlowIcmpCommonChecksum_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } - return nil + return PatternFlowIcmpCommonChecksum_Choice_unspecified } -type GetStatesRequest struct { +func (x *PatternFlowIcmpCommonChecksum) GetGenerated() PatternFlowIcmpCommonChecksum_Generated_Enum { + if x != nil && x.Generated != nil { + return *x.Generated + } + return PatternFlowIcmpCommonChecksum_Generated_unspecified +} + +func (x *PatternFlowIcmpCommonChecksum) GetCustom() uint32 { + if x != nil && x.Custom != nil { + return *x.Custom + } + return 0 +} + +// integer counter pattern +type PatternFlowIcmpNextFieldsIdentifierCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - StatesRequest *StatesRequest `protobuf:"bytes,1,opt,name=states_request,json=statesRequest,proto3" json:"states_request,omitempty"` + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *GetStatesRequest) Reset() { - *x = GetStatesRequest{} +func (x *PatternFlowIcmpNextFieldsIdentifierCounter) Reset() { + *x = PatternFlowIcmpNextFieldsIdentifierCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[951] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100521,13 +103806,13 @@ func (x *GetStatesRequest) Reset() { } } -func (x *GetStatesRequest) String() string { +func (x *PatternFlowIcmpNextFieldsIdentifierCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetStatesRequest) ProtoMessage() {} +func (*PatternFlowIcmpNextFieldsIdentifierCounter) ProtoMessage() {} -func (x *GetStatesRequest) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpNextFieldsIdentifierCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[951] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100539,28 +103824,55 @@ func (x *GetStatesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetStatesRequest.ProtoReflect.Descriptor instead. -func (*GetStatesRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpNextFieldsIdentifierCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpNextFieldsIdentifierCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{951} } -func (x *GetStatesRequest) GetStatesRequest() *StatesRequest { - if x != nil { - return x.StatesRequest +func (x *PatternFlowIcmpNextFieldsIdentifierCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } - return nil + return 0 } -type GetStatesResponse struct { +func (x *PatternFlowIcmpNextFieldsIdentifierCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowIcmpNextFieldsIdentifierCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowIcmpNextFieldsIdentifierMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - StatesResponse *StatesResponse `protobuf:"bytes,1,opt,name=states_response,json=statesResponse,proto3" json:"states_response,omitempty"` + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *GetStatesResponse) Reset() { - *x = GetStatesResponse{} +func (x *PatternFlowIcmpNextFieldsIdentifierMetricTag) Reset() { + *x = PatternFlowIcmpNextFieldsIdentifierMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[952] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100568,13 +103880,13 @@ func (x *GetStatesResponse) Reset() { } } -func (x *GetStatesResponse) String() string { +func (x *PatternFlowIcmpNextFieldsIdentifierMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetStatesResponse) ProtoMessage() {} +func (*PatternFlowIcmpNextFieldsIdentifierMetricTag) ProtoMessage() {} -func (x *GetStatesResponse) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpNextFieldsIdentifierMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[952] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100586,28 +103898,59 @@ func (x *GetStatesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetStatesResponse.ProtoReflect.Descriptor instead. -func (*GetStatesResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpNextFieldsIdentifierMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpNextFieldsIdentifierMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{952} } -func (x *GetStatesResponse) GetStatesResponse() *StatesResponse { - if x != nil { - return x.StatesResponse +func (x *PatternFlowIcmpNextFieldsIdentifierMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return nil + return "" } -type GetCaptureRequest struct { +func (x *PatternFlowIcmpNextFieldsIdentifierMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowIcmpNextFieldsIdentifierMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// ICMP identifier +type PatternFlowIcmpNextFieldsIdentifier struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - CaptureRequest *CaptureRequest `protobuf:"bytes,1,opt,name=capture_request,json=captureRequest,proto3" json:"capture_request,omitempty"` + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIcmpNextFieldsIdentifier_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpNextFieldsIdentifier_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIcmpNextFieldsIdentifierCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIcmpNextFieldsIdentifierCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowIcmpNextFieldsIdentifierMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *GetCaptureRequest) Reset() { - *x = GetCaptureRequest{} +func (x *PatternFlowIcmpNextFieldsIdentifier) Reset() { + *x = PatternFlowIcmpNextFieldsIdentifier{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[953] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100615,13 +103958,13 @@ func (x *GetCaptureRequest) Reset() { } } -func (x *GetCaptureRequest) String() string { +func (x *PatternFlowIcmpNextFieldsIdentifier) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetCaptureRequest) ProtoMessage() {} +func (*PatternFlowIcmpNextFieldsIdentifier) ProtoMessage() {} -func (x *GetCaptureRequest) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpNextFieldsIdentifier) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[953] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100633,28 +103976,72 @@ func (x *GetCaptureRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetCaptureRequest.ProtoReflect.Descriptor instead. -func (*GetCaptureRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpNextFieldsIdentifier.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpNextFieldsIdentifier) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{953} } -func (x *GetCaptureRequest) GetCaptureRequest() *CaptureRequest { +func (x *PatternFlowIcmpNextFieldsIdentifier) GetChoice() PatternFlowIcmpNextFieldsIdentifier_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIcmpNextFieldsIdentifier_Choice_unspecified +} + +func (x *PatternFlowIcmpNextFieldsIdentifier) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value + } + return 0 +} + +func (x *PatternFlowIcmpNextFieldsIdentifier) GetValues() []uint32 { if x != nil { - return x.CaptureRequest + return x.Values } return nil } -type GetCaptureResponse struct { +func (x *PatternFlowIcmpNextFieldsIdentifier) GetIncrement() *PatternFlowIcmpNextFieldsIdentifierCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowIcmpNextFieldsIdentifier) GetDecrement() *PatternFlowIcmpNextFieldsIdentifierCounter { + if x != nil { + return x.Decrement + } + return nil +} + +func (x *PatternFlowIcmpNextFieldsIdentifier) GetMetricTags() []*PatternFlowIcmpNextFieldsIdentifierMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowIcmpNextFieldsSequenceNumberCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ResponseBytes []byte `protobuf:"bytes,1,opt,name=response_bytes,json=responseBytes,proto3" json:"response_bytes,omitempty"` + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *GetCaptureResponse) Reset() { - *x = GetCaptureResponse{} +func (x *PatternFlowIcmpNextFieldsSequenceNumberCounter) Reset() { + *x = PatternFlowIcmpNextFieldsSequenceNumberCounter{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[954] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100662,13 +104049,13 @@ func (x *GetCaptureResponse) Reset() { } } -func (x *GetCaptureResponse) String() string { +func (x *PatternFlowIcmpNextFieldsSequenceNumberCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetCaptureResponse) ProtoMessage() {} +func (*PatternFlowIcmpNextFieldsSequenceNumberCounter) ProtoMessage() {} -func (x *GetCaptureResponse) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpNextFieldsSequenceNumberCounter) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[954] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100680,28 +104067,55 @@ func (x *GetCaptureResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetCaptureResponse.ProtoReflect.Descriptor instead. -func (*GetCaptureResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpNextFieldsSequenceNumberCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpNextFieldsSequenceNumberCounter) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{954} } -func (x *GetCaptureResponse) GetResponseBytes() []byte { - if x != nil { - return x.ResponseBytes +func (x *PatternFlowIcmpNextFieldsSequenceNumberCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } - return nil + return 0 } -type GetVersionResponse struct { +func (x *PatternFlowIcmpNextFieldsSequenceNumberCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowIcmpNextFieldsSequenceNumberCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowIcmpNextFieldsSequenceNumberMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Version *Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *GetVersionResponse) Reset() { - *x = GetVersionResponse{} +func (x *PatternFlowIcmpNextFieldsSequenceNumberMetricTag) Reset() { + *x = PatternFlowIcmpNextFieldsSequenceNumberMetricTag{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[955] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100709,13 +104123,13 @@ func (x *GetVersionResponse) Reset() { } } -func (x *GetVersionResponse) String() string { +func (x *PatternFlowIcmpNextFieldsSequenceNumberMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetVersionResponse) ProtoMessage() {} +func (*PatternFlowIcmpNextFieldsSequenceNumberMetricTag) ProtoMessage() {} -func (x *GetVersionResponse) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpNextFieldsSequenceNumberMetricTag) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[955] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100727,26 +104141,59 @@ func (x *GetVersionResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetVersionResponse.ProtoReflect.Descriptor instead. -func (*GetVersionResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use PatternFlowIcmpNextFieldsSequenceNumberMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpNextFieldsSequenceNumberMetricTag) Descriptor() ([]byte, []int) { return file_otg_proto_rawDescGZIP(), []int{955} } -func (x *GetVersionResponse) GetVersion() *Version { - if x != nil { - return x.Version +func (x *PatternFlowIcmpNextFieldsSequenceNumberMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } - return nil + return "" } -type LagProtocol_Choice struct { +func (x *PatternFlowIcmpNextFieldsSequenceNumberMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowIcmpNextFieldsSequenceNumberMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// ICMP sequence number +type PatternFlowIcmpNextFieldsSequenceNumber struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIcmpNextFieldsSequenceNumberCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIcmpNextFieldsSequenceNumberCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowIcmpNextFieldsSequenceNumberMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *LagProtocol_Choice) Reset() { - *x = LagProtocol_Choice{} +func (x *PatternFlowIcmpNextFieldsSequenceNumber) Reset() { + *x = PatternFlowIcmpNextFieldsSequenceNumber{} if protoimpl.UnsafeEnabled { mi := &file_otg_proto_msgTypes[956] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100754,13 +104201,13 @@ func (x *LagProtocol_Choice) Reset() { } } -func (x *LagProtocol_Choice) String() string { +func (x *PatternFlowIcmpNextFieldsSequenceNumber) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LagProtocol_Choice) ProtoMessage() {} +func (*PatternFlowIcmpNextFieldsSequenceNumber) ProtoMessage() {} -func (x *LagProtocol_Choice) ProtoReflect() protoreflect.Message { +func (x *PatternFlowIcmpNextFieldsSequenceNumber) ProtoReflect() protoreflect.Message { mi := &file_otg_proto_msgTypes[956] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100772,72 +104219,87 @@ func (x *LagProtocol_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LagProtocol_Choice.ProtoReflect.Descriptor instead. -func (*LagProtocol_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{6, 0} +// Deprecated: Use PatternFlowIcmpNextFieldsSequenceNumber.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpNextFieldsSequenceNumber) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{956} } -type LagPortLacp_ActorActivity struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowIcmpNextFieldsSequenceNumber) GetChoice() PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIcmpNextFieldsSequenceNumber_Choice_unspecified } -func (x *LagPortLacp_ActorActivity) Reset() { - *x = LagPortLacp_ActorActivity{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[957] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowIcmpNextFieldsSequenceNumber) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *LagPortLacp_ActorActivity) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowIcmpNextFieldsSequenceNumber) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*LagPortLacp_ActorActivity) ProtoMessage() {} +func (x *PatternFlowIcmpNextFieldsSequenceNumber) GetIncrement() *PatternFlowIcmpNextFieldsSequenceNumberCounter { + if x != nil { + return x.Increment + } + return nil +} -func (x *LagPortLacp_ActorActivity) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[957] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowIcmpNextFieldsSequenceNumber) GetDecrement() *PatternFlowIcmpNextFieldsSequenceNumberCounter { + if x != nil { + return x.Decrement } - return mi.MessageOf(x) + return nil } -// Deprecated: Use LagPortLacp_ActorActivity.ProtoReflect.Descriptor instead. -func (*LagPortLacp_ActorActivity) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{9, 0} +func (x *PatternFlowIcmpNextFieldsSequenceNumber) GetMetricTags() []*PatternFlowIcmpNextFieldsSequenceNumberMetricTag { + if x != nil { + return x.MetricTags + } + return nil } -type EthernetConnection_Choice struct { +// integer counter pattern +type PatternFlowIcmpv6EchoTypeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 128 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *EthernetConnection_Choice) Reset() { - *x = EthernetConnection_Choice{} +func (x *PatternFlowIcmpv6EchoTypeCounter) Reset() { + *x = PatternFlowIcmpv6EchoTypeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[958] + mi := &file_otg_proto_msgTypes[957] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EthernetConnection_Choice) String() string { +func (x *PatternFlowIcmpv6EchoTypeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EthernetConnection_Choice) ProtoMessage() {} +func (*PatternFlowIcmpv6EchoTypeCounter) ProtoMessage() {} -func (x *EthernetConnection_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[958] +func (x *PatternFlowIcmpv6EchoTypeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[957] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -100848,34 +104310,70 @@ func (x *EthernetConnection_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EthernetConnection_Choice.ProtoReflect.Descriptor instead. -func (*EthernetConnection_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{12, 0} +// Deprecated: Use PatternFlowIcmpv6EchoTypeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoTypeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{957} } -type DeviceVlan_Tpid struct { +func (x *PatternFlowIcmpv6EchoTypeCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowIcmpv6EchoTypeCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowIcmpv6EchoTypeCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowIcmpv6EchoTypeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *DeviceVlan_Tpid) Reset() { - *x = DeviceVlan_Tpid{} +func (x *PatternFlowIcmpv6EchoTypeMetricTag) Reset() { + *x = PatternFlowIcmpv6EchoTypeMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[959] + mi := &file_otg_proto_msgTypes[958] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeviceVlan_Tpid) String() string { +func (x *PatternFlowIcmpv6EchoTypeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeviceVlan_Tpid) ProtoMessage() {} +func (*PatternFlowIcmpv6EchoTypeMetricTag) ProtoMessage() {} -func (x *DeviceVlan_Tpid) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[959] +func (x *PatternFlowIcmpv6EchoTypeMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[958] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -100886,34 +104384,74 @@ func (x *DeviceVlan_Tpid) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeviceVlan_Tpid.ProtoReflect.Descriptor instead. -func (*DeviceVlan_Tpid) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{13, 0} +// Deprecated: Use PatternFlowIcmpv6EchoTypeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoTypeMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{958} } -type DeviceIpv4GatewayMAC_Choice struct { +func (x *PatternFlowIcmpv6EchoTypeMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowIcmpv6EchoTypeMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowIcmpv6EchoTypeMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// ICMPv6 echo type +type PatternFlowIcmpv6EchoType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIcmpv6EchoType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpv6EchoType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 128 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [128] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIcmpv6EchoTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIcmpv6EchoTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowIcmpv6EchoTypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *DeviceIpv4GatewayMAC_Choice) Reset() { - *x = DeviceIpv4GatewayMAC_Choice{} +func (x *PatternFlowIcmpv6EchoType) Reset() { + *x = PatternFlowIcmpv6EchoType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[960] + mi := &file_otg_proto_msgTypes[959] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeviceIpv4GatewayMAC_Choice) String() string { +func (x *PatternFlowIcmpv6EchoType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeviceIpv4GatewayMAC_Choice) ProtoMessage() {} +func (*PatternFlowIcmpv6EchoType) ProtoMessage() {} -func (x *DeviceIpv4GatewayMAC_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[960] +func (x *PatternFlowIcmpv6EchoType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[959] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -100924,72 +104462,87 @@ func (x *DeviceIpv4GatewayMAC_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeviceIpv4GatewayMAC_Choice.ProtoReflect.Descriptor instead. -func (*DeviceIpv4GatewayMAC_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{16, 0} +// Deprecated: Use PatternFlowIcmpv6EchoType.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{959} } -type DeviceIpv6GatewayMAC_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowIcmpv6EchoType) GetChoice() PatternFlowIcmpv6EchoType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIcmpv6EchoType_Choice_unspecified } -func (x *DeviceIpv6GatewayMAC_Choice) Reset() { - *x = DeviceIpv6GatewayMAC_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[961] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowIcmpv6EchoType) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *DeviceIpv6GatewayMAC_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowIcmpv6EchoType) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*DeviceIpv6GatewayMAC_Choice) ProtoMessage() {} +func (x *PatternFlowIcmpv6EchoType) GetIncrement() *PatternFlowIcmpv6EchoTypeCounter { + if x != nil { + return x.Increment + } + return nil +} -func (x *DeviceIpv6GatewayMAC_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[961] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowIcmpv6EchoType) GetDecrement() *PatternFlowIcmpv6EchoTypeCounter { + if x != nil { + return x.Decrement } - return mi.MessageOf(x) + return nil } -// Deprecated: Use DeviceIpv6GatewayMAC_Choice.ProtoReflect.Descriptor instead. -func (*DeviceIpv6GatewayMAC_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{19, 0} +func (x *PatternFlowIcmpv6EchoType) GetMetricTags() []*PatternFlowIcmpv6EchoTypeMetricTag { + if x != nil { + return x.MetricTags + } + return nil } -type Layer1_Speed struct { +// integer counter pattern +type PatternFlowIcmpv6EchoCodeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *Layer1_Speed) Reset() { - *x = Layer1_Speed{} +func (x *PatternFlowIcmpv6EchoCodeCounter) Reset() { + *x = PatternFlowIcmpv6EchoCodeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[962] + mi := &file_otg_proto_msgTypes[960] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Layer1_Speed) String() string { +func (x *PatternFlowIcmpv6EchoCodeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Layer1_Speed) ProtoMessage() {} +func (*PatternFlowIcmpv6EchoCodeCounter) ProtoMessage() {} -func (x *Layer1_Speed) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[962] +func (x *PatternFlowIcmpv6EchoCodeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[960] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101000,34 +104553,70 @@ func (x *Layer1_Speed) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Layer1_Speed.ProtoReflect.Descriptor instead. -func (*Layer1_Speed) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{20, 0} +// Deprecated: Use PatternFlowIcmpv6EchoCodeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoCodeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{960} } -type Layer1_Media struct { +func (x *PatternFlowIcmpv6EchoCodeCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowIcmpv6EchoCodeCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowIcmpv6EchoCodeCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowIcmpv6EchoCodeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *Layer1_Media) Reset() { - *x = Layer1_Media{} +func (x *PatternFlowIcmpv6EchoCodeMetricTag) Reset() { + *x = PatternFlowIcmpv6EchoCodeMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[963] + mi := &file_otg_proto_msgTypes[961] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Layer1_Media) String() string { +func (x *PatternFlowIcmpv6EchoCodeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Layer1_Media) ProtoMessage() {} +func (*PatternFlowIcmpv6EchoCodeMetricTag) ProtoMessage() {} -func (x *Layer1_Media) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[963] +func (x *PatternFlowIcmpv6EchoCodeMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[961] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101038,34 +104627,74 @@ func (x *Layer1_Media) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Layer1_Media.ProtoReflect.Descriptor instead. -func (*Layer1_Media) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{20, 1} +// Deprecated: Use PatternFlowIcmpv6EchoCodeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoCodeMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{961} } -type Layer1FlowControl_Choice struct { +func (x *PatternFlowIcmpv6EchoCodeMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowIcmpv6EchoCodeMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowIcmpv6EchoCodeMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// ICMPv6 echo sub type +type PatternFlowIcmpv6EchoCode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIcmpv6EchoCode_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpv6EchoCode_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIcmpv6EchoCodeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIcmpv6EchoCodeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowIcmpv6EchoCodeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *Layer1FlowControl_Choice) Reset() { - *x = Layer1FlowControl_Choice{} +func (x *PatternFlowIcmpv6EchoCode) Reset() { + *x = PatternFlowIcmpv6EchoCode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[964] + mi := &file_otg_proto_msgTypes[962] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Layer1FlowControl_Choice) String() string { +func (x *PatternFlowIcmpv6EchoCode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Layer1FlowControl_Choice) ProtoMessage() {} +func (*PatternFlowIcmpv6EchoCode) ProtoMessage() {} -func (x *Layer1FlowControl_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[964] +func (x *PatternFlowIcmpv6EchoCode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[962] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101076,72 +104705,87 @@ func (x *Layer1FlowControl_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Layer1FlowControl_Choice.ProtoReflect.Descriptor instead. -func (*Layer1FlowControl_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{22, 0} +// Deprecated: Use PatternFlowIcmpv6EchoCode.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoCode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{962} } -type Capture_Format struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowIcmpv6EchoCode) GetChoice() PatternFlowIcmpv6EchoCode_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIcmpv6EchoCode_Choice_unspecified } -func (x *Capture_Format) Reset() { - *x = Capture_Format{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[965] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowIcmpv6EchoCode) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *Capture_Format) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowIcmpv6EchoCode) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*Capture_Format) ProtoMessage() {} +func (x *PatternFlowIcmpv6EchoCode) GetIncrement() *PatternFlowIcmpv6EchoCodeCounter { + if x != nil { + return x.Increment + } + return nil +} -func (x *Capture_Format) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[965] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowIcmpv6EchoCode) GetDecrement() *PatternFlowIcmpv6EchoCodeCounter { + if x != nil { + return x.Decrement } - return mi.MessageOf(x) + return nil } -// Deprecated: Use Capture_Format.ProtoReflect.Descriptor instead. -func (*Capture_Format) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{25, 0} +func (x *PatternFlowIcmpv6EchoCode) GetMetricTags() []*PatternFlowIcmpv6EchoCodeMetricTag { + if x != nil { + return x.MetricTags + } + return nil } -type CaptureFilter_Choice struct { +// integer counter pattern +type PatternFlowIcmpv6EchoIdentifierCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *CaptureFilter_Choice) Reset() { - *x = CaptureFilter_Choice{} +func (x *PatternFlowIcmpv6EchoIdentifierCounter) Reset() { + *x = PatternFlowIcmpv6EchoIdentifierCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[966] + mi := &file_otg_proto_msgTypes[963] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *CaptureFilter_Choice) String() string { +func (x *PatternFlowIcmpv6EchoIdentifierCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CaptureFilter_Choice) ProtoMessage() {} +func (*PatternFlowIcmpv6EchoIdentifierCounter) ProtoMessage() {} -func (x *CaptureFilter_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[966] +func (x *PatternFlowIcmpv6EchoIdentifierCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[963] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101152,34 +104796,70 @@ func (x *CaptureFilter_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CaptureFilter_Choice.ProtoReflect.Descriptor instead. -func (*CaptureFilter_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{26, 0} +// Deprecated: Use PatternFlowIcmpv6EchoIdentifierCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoIdentifierCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{963} } -type IsisInterface_NetworkType struct { +func (x *PatternFlowIcmpv6EchoIdentifierCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowIcmpv6EchoIdentifierCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowIcmpv6EchoIdentifierCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowIcmpv6EchoIdentifierMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *IsisInterface_NetworkType) Reset() { - *x = IsisInterface_NetworkType{} +func (x *PatternFlowIcmpv6EchoIdentifierMetricTag) Reset() { + *x = PatternFlowIcmpv6EchoIdentifierMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[967] + mi := &file_otg_proto_msgTypes[964] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisInterface_NetworkType) String() string { +func (x *PatternFlowIcmpv6EchoIdentifierMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisInterface_NetworkType) ProtoMessage() {} +func (*PatternFlowIcmpv6EchoIdentifierMetricTag) ProtoMessage() {} -func (x *IsisInterface_NetworkType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[967] +func (x *PatternFlowIcmpv6EchoIdentifierMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[964] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101190,34 +104870,74 @@ func (x *IsisInterface_NetworkType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisInterface_NetworkType.ProtoReflect.Descriptor instead. -func (*IsisInterface_NetworkType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{37, 0} +// Deprecated: Use PatternFlowIcmpv6EchoIdentifierMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoIdentifierMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{964} } -type IsisInterface_LevelType struct { +func (x *PatternFlowIcmpv6EchoIdentifierMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowIcmpv6EchoIdentifierMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowIcmpv6EchoIdentifierMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// ICMPv6 echo identifier +type PatternFlowIcmpv6EchoIdentifier struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIcmpv6EchoIdentifier_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpv6EchoIdentifier_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIcmpv6EchoIdentifierCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIcmpv6EchoIdentifierCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowIcmpv6EchoIdentifierMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *IsisInterface_LevelType) Reset() { - *x = IsisInterface_LevelType{} +func (x *PatternFlowIcmpv6EchoIdentifier) Reset() { + *x = PatternFlowIcmpv6EchoIdentifier{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[968] + mi := &file_otg_proto_msgTypes[965] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisInterface_LevelType) String() string { +func (x *PatternFlowIcmpv6EchoIdentifier) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisInterface_LevelType) ProtoMessage() {} +func (*PatternFlowIcmpv6EchoIdentifier) ProtoMessage() {} -func (x *IsisInterface_LevelType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[968] +func (x *PatternFlowIcmpv6EchoIdentifier) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[965] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101228,72 +104948,87 @@ func (x *IsisInterface_LevelType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisInterface_LevelType.ProtoReflect.Descriptor instead. -func (*IsisInterface_LevelType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{37, 1} +// Deprecated: Use PatternFlowIcmpv6EchoIdentifier.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoIdentifier) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{965} } -type IsisInterfaceAuthentication_AuthType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowIcmpv6EchoIdentifier) GetChoice() PatternFlowIcmpv6EchoIdentifier_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIcmpv6EchoIdentifier_Choice_unspecified } -func (x *IsisInterfaceAuthentication_AuthType) Reset() { - *x = IsisInterfaceAuthentication_AuthType{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[969] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowIcmpv6EchoIdentifier) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *IsisInterfaceAuthentication_AuthType) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowIcmpv6EchoIdentifier) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*IsisInterfaceAuthentication_AuthType) ProtoMessage() {} +func (x *PatternFlowIcmpv6EchoIdentifier) GetIncrement() *PatternFlowIcmpv6EchoIdentifierCounter { + if x != nil { + return x.Increment + } + return nil +} -func (x *IsisInterfaceAuthentication_AuthType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[969] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowIcmpv6EchoIdentifier) GetDecrement() *PatternFlowIcmpv6EchoIdentifierCounter { + if x != nil { + return x.Decrement } - return mi.MessageOf(x) + return nil } -// Deprecated: Use IsisInterfaceAuthentication_AuthType.ProtoReflect.Descriptor instead. -func (*IsisInterfaceAuthentication_AuthType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{42, 0} +func (x *PatternFlowIcmpv6EchoIdentifier) GetMetricTags() []*PatternFlowIcmpv6EchoIdentifierMetricTag { + if x != nil { + return x.MetricTags + } + return nil } -type IsisAuthenticationBase_AuthType struct { +// integer counter pattern +type PatternFlowIcmpv6EchoSequenceNumberCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *IsisAuthenticationBase_AuthType) Reset() { - *x = IsisAuthenticationBase_AuthType{} +func (x *PatternFlowIcmpv6EchoSequenceNumberCounter) Reset() { + *x = PatternFlowIcmpv6EchoSequenceNumberCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[970] + mi := &file_otg_proto_msgTypes[966] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisAuthenticationBase_AuthType) String() string { +func (x *PatternFlowIcmpv6EchoSequenceNumberCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisAuthenticationBase_AuthType) ProtoMessage() {} +func (*PatternFlowIcmpv6EchoSequenceNumberCounter) ProtoMessage() {} -func (x *IsisAuthenticationBase_AuthType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[970] +func (x *PatternFlowIcmpv6EchoSequenceNumberCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[966] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101304,34 +105039,70 @@ func (x *IsisAuthenticationBase_AuthType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisAuthenticationBase_AuthType.ProtoReflect.Descriptor instead. -func (*IsisAuthenticationBase_AuthType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{48, 0} +// Deprecated: Use PatternFlowIcmpv6EchoSequenceNumberCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoSequenceNumberCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{966} } -type IsisV4RouteRange_OriginType struct { +func (x *PatternFlowIcmpv6EchoSequenceNumberCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowIcmpv6EchoSequenceNumberCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowIcmpv6EchoSequenceNumberCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowIcmpv6EchoSequenceNumberMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *IsisV4RouteRange_OriginType) Reset() { - *x = IsisV4RouteRange_OriginType{} +func (x *PatternFlowIcmpv6EchoSequenceNumberMetricTag) Reset() { + *x = PatternFlowIcmpv6EchoSequenceNumberMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[971] + mi := &file_otg_proto_msgTypes[967] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisV4RouteRange_OriginType) String() string { +func (x *PatternFlowIcmpv6EchoSequenceNumberMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisV4RouteRange_OriginType) ProtoMessage() {} +func (*PatternFlowIcmpv6EchoSequenceNumberMetricTag) ProtoMessage() {} -func (x *IsisV4RouteRange_OriginType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[971] +func (x *PatternFlowIcmpv6EchoSequenceNumberMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[967] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101342,34 +105113,74 @@ func (x *IsisV4RouteRange_OriginType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisV4RouteRange_OriginType.ProtoReflect.Descriptor instead. -func (*IsisV4RouteRange_OriginType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{49, 0} +// Deprecated: Use PatternFlowIcmpv6EchoSequenceNumberMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoSequenceNumberMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{967} } -type IsisV4RouteRange_RedistributionType struct { +func (x *PatternFlowIcmpv6EchoSequenceNumberMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowIcmpv6EchoSequenceNumberMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowIcmpv6EchoSequenceNumberMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// ICMPv6 echo sequence number +type PatternFlowIcmpv6EchoSequenceNumber struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIcmpv6EchoSequenceNumberCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIcmpv6EchoSequenceNumberCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowIcmpv6EchoSequenceNumberMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *IsisV4RouteRange_RedistributionType) Reset() { - *x = IsisV4RouteRange_RedistributionType{} +func (x *PatternFlowIcmpv6EchoSequenceNumber) Reset() { + *x = PatternFlowIcmpv6EchoSequenceNumber{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[972] + mi := &file_otg_proto_msgTypes[968] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisV4RouteRange_RedistributionType) String() string { +func (x *PatternFlowIcmpv6EchoSequenceNumber) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisV4RouteRange_RedistributionType) ProtoMessage() {} +func (*PatternFlowIcmpv6EchoSequenceNumber) ProtoMessage() {} -func (x *IsisV4RouteRange_RedistributionType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[972] +func (x *PatternFlowIcmpv6EchoSequenceNumber) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[968] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101380,72 +105191,86 @@ func (x *IsisV4RouteRange_RedistributionType) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use IsisV4RouteRange_RedistributionType.ProtoReflect.Descriptor instead. -func (*IsisV4RouteRange_RedistributionType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{49, 1} +// Deprecated: Use PatternFlowIcmpv6EchoSequenceNumber.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoSequenceNumber) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{968} } -type IsisV6RouteRange_OriginType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowIcmpv6EchoSequenceNumber) GetChoice() PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIcmpv6EchoSequenceNumber_Choice_unspecified } -func (x *IsisV6RouteRange_OriginType) Reset() { - *x = IsisV6RouteRange_OriginType{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[973] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowIcmpv6EchoSequenceNumber) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *IsisV6RouteRange_OriginType) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowIcmpv6EchoSequenceNumber) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*IsisV6RouteRange_OriginType) ProtoMessage() {} +func (x *PatternFlowIcmpv6EchoSequenceNumber) GetIncrement() *PatternFlowIcmpv6EchoSequenceNumberCounter { + if x != nil { + return x.Increment + } + return nil +} -func (x *IsisV6RouteRange_OriginType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[973] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowIcmpv6EchoSequenceNumber) GetDecrement() *PatternFlowIcmpv6EchoSequenceNumberCounter { + if x != nil { + return x.Decrement } - return mi.MessageOf(x) + return nil } -// Deprecated: Use IsisV6RouteRange_OriginType.ProtoReflect.Descriptor instead. -func (*IsisV6RouteRange_OriginType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{53, 0} +func (x *PatternFlowIcmpv6EchoSequenceNumber) GetMetricTags() []*PatternFlowIcmpv6EchoSequenceNumberMetricTag { + if x != nil { + return x.MetricTags + } + return nil } -type IsisV6RouteRange_RedistributionType struct { +// ICMPv6 checksum +type PatternFlowIcmpv6EchoChecksum struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // The type of checksum + // default = Choice.Enum.generated + Choice *PatternFlowIcmpv6EchoChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpv6EchoChecksum_Choice_Enum,oneof" json:"choice,omitempty"` + // A system generated checksum value + // default = Generated.Enum.good + Generated *PatternFlowIcmpv6EchoChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowIcmpv6EchoChecksum_Generated_Enum,oneof" json:"generated,omitempty"` + // A custom checksum value + Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` } -func (x *IsisV6RouteRange_RedistributionType) Reset() { - *x = IsisV6RouteRange_RedistributionType{} +func (x *PatternFlowIcmpv6EchoChecksum) Reset() { + *x = PatternFlowIcmpv6EchoChecksum{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[974] + mi := &file_otg_proto_msgTypes[969] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisV6RouteRange_RedistributionType) String() string { +func (x *PatternFlowIcmpv6EchoChecksum) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisV6RouteRange_RedistributionType) ProtoMessage() {} +func (*PatternFlowIcmpv6EchoChecksum) ProtoMessage() {} -func (x *IsisV6RouteRange_RedistributionType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[974] +func (x *PatternFlowIcmpv6EchoChecksum) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[969] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101456,34 +105281,65 @@ func (x *IsisV6RouteRange_RedistributionType) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use IsisV6RouteRange_RedistributionType.ProtoReflect.Descriptor instead. -func (*IsisV6RouteRange_RedistributionType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{53, 1} +// Deprecated: Use PatternFlowIcmpv6EchoChecksum.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoChecksum) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{969} } -type DeviceBgpMessageHeaderError_Subcode struct { +func (x *PatternFlowIcmpv6EchoChecksum) GetChoice() PatternFlowIcmpv6EchoChecksum_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIcmpv6EchoChecksum_Choice_unspecified +} + +func (x *PatternFlowIcmpv6EchoChecksum) GetGenerated() PatternFlowIcmpv6EchoChecksum_Generated_Enum { + if x != nil && x.Generated != nil { + return *x.Generated + } + return PatternFlowIcmpv6EchoChecksum_Generated_unspecified +} + +func (x *PatternFlowIcmpv6EchoChecksum) GetCustom() uint32 { + if x != nil && x.Custom != nil { + return *x.Custom + } + return 0 +} + +// ICMPv6 checksum +type PatternFlowIcmpv6CommonChecksum struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // The type of checksum + // default = Choice.Enum.generated + Choice *PatternFlowIcmpv6CommonChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIcmpv6CommonChecksum_Choice_Enum,oneof" json:"choice,omitempty"` + // A system generated checksum value + // default = Generated.Enum.good + Generated *PatternFlowIcmpv6CommonChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowIcmpv6CommonChecksum_Generated_Enum,oneof" json:"generated,omitempty"` + // A custom checksum value + Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` } -func (x *DeviceBgpMessageHeaderError_Subcode) Reset() { - *x = DeviceBgpMessageHeaderError_Subcode{} +func (x *PatternFlowIcmpv6CommonChecksum) Reset() { + *x = PatternFlowIcmpv6CommonChecksum{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[975] + mi := &file_otg_proto_msgTypes[970] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeviceBgpMessageHeaderError_Subcode) String() string { +func (x *PatternFlowIcmpv6CommonChecksum) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeviceBgpMessageHeaderError_Subcode) ProtoMessage() {} +func (*PatternFlowIcmpv6CommonChecksum) ProtoMessage() {} -func (x *DeviceBgpMessageHeaderError_Subcode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[975] +func (x *PatternFlowIcmpv6CommonChecksum) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[970] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101494,34 +105350,66 @@ func (x *DeviceBgpMessageHeaderError_Subcode) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use DeviceBgpMessageHeaderError_Subcode.ProtoReflect.Descriptor instead. -func (*DeviceBgpMessageHeaderError_Subcode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{55, 0} +// Deprecated: Use PatternFlowIcmpv6CommonChecksum.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6CommonChecksum) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{970} } -type DeviceBgpOpenMessageError_Subcode struct { +func (x *PatternFlowIcmpv6CommonChecksum) GetChoice() PatternFlowIcmpv6CommonChecksum_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIcmpv6CommonChecksum_Choice_unspecified +} + +func (x *PatternFlowIcmpv6CommonChecksum) GetGenerated() PatternFlowIcmpv6CommonChecksum_Generated_Enum { + if x != nil && x.Generated != nil { + return *x.Generated + } + return PatternFlowIcmpv6CommonChecksum_Generated_unspecified +} + +func (x *PatternFlowIcmpv6CommonChecksum) GetCustom() uint32 { + if x != nil && x.Custom != nil { + return *x.Custom + } + return 0 +} + +// integer counter pattern +type PatternFlowPppAddressCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 255 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *DeviceBgpOpenMessageError_Subcode) Reset() { - *x = DeviceBgpOpenMessageError_Subcode{} +func (x *PatternFlowPppAddressCounter) Reset() { + *x = PatternFlowPppAddressCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[976] + mi := &file_otg_proto_msgTypes[971] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeviceBgpOpenMessageError_Subcode) String() string { +func (x *PatternFlowPppAddressCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeviceBgpOpenMessageError_Subcode) ProtoMessage() {} +func (*PatternFlowPppAddressCounter) ProtoMessage() {} -func (x *DeviceBgpOpenMessageError_Subcode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[976] +func (x *PatternFlowPppAddressCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[971] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101532,34 +105420,70 @@ func (x *DeviceBgpOpenMessageError_Subcode) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use DeviceBgpOpenMessageError_Subcode.ProtoReflect.Descriptor instead. -func (*DeviceBgpOpenMessageError_Subcode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{56, 0} +// Deprecated: Use PatternFlowPppAddressCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowPppAddressCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{971} } -type DeviceBgpUpdateMessageError_Subcode struct { +func (x *PatternFlowPppAddressCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowPppAddressCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowPppAddressCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowPppAddressMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *DeviceBgpUpdateMessageError_Subcode) Reset() { - *x = DeviceBgpUpdateMessageError_Subcode{} +func (x *PatternFlowPppAddressMetricTag) Reset() { + *x = PatternFlowPppAddressMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[977] + mi := &file_otg_proto_msgTypes[972] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeviceBgpUpdateMessageError_Subcode) String() string { +func (x *PatternFlowPppAddressMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeviceBgpUpdateMessageError_Subcode) ProtoMessage() {} +func (*PatternFlowPppAddressMetricTag) ProtoMessage() {} -func (x *DeviceBgpUpdateMessageError_Subcode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[977] +func (x *PatternFlowPppAddressMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[972] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101570,34 +105494,74 @@ func (x *DeviceBgpUpdateMessageError_Subcode) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use DeviceBgpUpdateMessageError_Subcode.ProtoReflect.Descriptor instead. -func (*DeviceBgpUpdateMessageError_Subcode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{57, 0} +// Deprecated: Use PatternFlowPppAddressMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPppAddressMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{972} } -type DeviceBgpCeaseError_Subcode struct { +func (x *PatternFlowPppAddressMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowPppAddressMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowPppAddressMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// PPP address +type PatternFlowPppAddress struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowPppAddress_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPppAddress_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 255 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [255] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowPppAddressCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowPppAddressCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowPppAddressMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *DeviceBgpCeaseError_Subcode) Reset() { - *x = DeviceBgpCeaseError_Subcode{} +func (x *PatternFlowPppAddress) Reset() { + *x = PatternFlowPppAddress{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[978] + mi := &file_otg_proto_msgTypes[973] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeviceBgpCeaseError_Subcode) String() string { +func (x *PatternFlowPppAddress) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeviceBgpCeaseError_Subcode) ProtoMessage() {} +func (*PatternFlowPppAddress) ProtoMessage() {} -func (x *DeviceBgpCeaseError_Subcode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[978] +func (x *PatternFlowPppAddress) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[973] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101608,72 +105572,87 @@ func (x *DeviceBgpCeaseError_Subcode) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeviceBgpCeaseError_Subcode.ProtoReflect.Descriptor instead. -func (*DeviceBgpCeaseError_Subcode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{60, 0} +// Deprecated: Use PatternFlowPppAddress.ProtoReflect.Descriptor instead. +func (*PatternFlowPppAddress) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{973} } -type BgpV4Peer_AsType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowPppAddress) GetChoice() PatternFlowPppAddress_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowPppAddress_Choice_unspecified } -func (x *BgpV4Peer_AsType) Reset() { - *x = BgpV4Peer_AsType{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[979] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowPppAddress) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *BgpV4Peer_AsType) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowPppAddress) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*BgpV4Peer_AsType) ProtoMessage() {} +func (x *PatternFlowPppAddress) GetIncrement() *PatternFlowPppAddressCounter { + if x != nil { + return x.Increment + } + return nil +} -func (x *BgpV4Peer_AsType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[979] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowPppAddress) GetDecrement() *PatternFlowPppAddressCounter { + if x != nil { + return x.Decrement } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpV4Peer_AsType.ProtoReflect.Descriptor instead. -func (*BgpV4Peer_AsType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{62, 0} +func (x *PatternFlowPppAddress) GetMetricTags() []*PatternFlowPppAddressMetricTag { + if x != nil { + return x.MetricTags + } + return nil } -type BgpV4Peer_AsNumberWidth struct { +// integer counter pattern +type PatternFlowPppControlCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 3 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *BgpV4Peer_AsNumberWidth) Reset() { - *x = BgpV4Peer_AsNumberWidth{} +func (x *PatternFlowPppControlCounter) Reset() { + *x = PatternFlowPppControlCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[980] + mi := &file_otg_proto_msgTypes[974] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV4Peer_AsNumberWidth) String() string { +func (x *PatternFlowPppControlCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV4Peer_AsNumberWidth) ProtoMessage() {} +func (*PatternFlowPppControlCounter) ProtoMessage() {} -func (x *BgpV4Peer_AsNumberWidth) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[980] +func (x *PatternFlowPppControlCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[974] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101684,34 +105663,70 @@ func (x *BgpV4Peer_AsNumberWidth) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV4Peer_AsNumberWidth.ProtoReflect.Descriptor instead. -func (*BgpV4Peer_AsNumberWidth) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{62, 1} +// Deprecated: Use PatternFlowPppControlCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowPppControlCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{974} } -type BgpV4EthernetSegment_ActiveMode struct { +func (x *PatternFlowPppControlCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowPppControlCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowPppControlCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowPppControlMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *BgpV4EthernetSegment_ActiveMode) Reset() { - *x = BgpV4EthernetSegment_ActiveMode{} +func (x *PatternFlowPppControlMetricTag) Reset() { + *x = PatternFlowPppControlMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[981] + mi := &file_otg_proto_msgTypes[975] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV4EthernetSegment_ActiveMode) String() string { +func (x *PatternFlowPppControlMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV4EthernetSegment_ActiveMode) ProtoMessage() {} +func (*PatternFlowPppControlMetricTag) ProtoMessage() {} -func (x *BgpV4EthernetSegment_ActiveMode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[981] +func (x *PatternFlowPppControlMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[975] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101722,34 +105737,74 @@ func (x *BgpV4EthernetSegment_ActiveMode) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV4EthernetSegment_ActiveMode.ProtoReflect.Descriptor instead. -func (*BgpV4EthernetSegment_ActiveMode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{64, 0} +// Deprecated: Use PatternFlowPppControlMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPppControlMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{975} } -type BgpRouteAdvanced_Origin struct { +func (x *PatternFlowPppControlMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowPppControlMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowPppControlMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// PPP control +type PatternFlowPppControl struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowPppControl_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPppControl_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 3 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [3] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowPppControlCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowPppControlCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowPppControlMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *BgpRouteAdvanced_Origin) Reset() { - *x = BgpRouteAdvanced_Origin{} +func (x *PatternFlowPppControl) Reset() { + *x = PatternFlowPppControl{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[982] + mi := &file_otg_proto_msgTypes[976] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpRouteAdvanced_Origin) String() string { +func (x *PatternFlowPppControl) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpRouteAdvanced_Origin) ProtoMessage() {} +func (*PatternFlowPppControl) ProtoMessage() {} -func (x *BgpRouteAdvanced_Origin) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[982] +func (x *PatternFlowPppControl) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[976] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101760,72 +105815,87 @@ func (x *BgpRouteAdvanced_Origin) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpRouteAdvanced_Origin.ProtoReflect.Descriptor instead. -func (*BgpRouteAdvanced_Origin) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{66, 0} -} +// Deprecated: Use PatternFlowPppControl.ProtoReflect.Descriptor instead. +func (*PatternFlowPppControl) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{976} +} -type BgpCommunity_Type struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowPppControl) GetChoice() PatternFlowPppControl_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowPppControl_Choice_unspecified } -func (x *BgpCommunity_Type) Reset() { - *x = BgpCommunity_Type{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[983] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowPppControl) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *BgpCommunity_Type) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowPppControl) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*BgpCommunity_Type) ProtoMessage() {} +func (x *PatternFlowPppControl) GetIncrement() *PatternFlowPppControlCounter { + if x != nil { + return x.Increment + } + return nil +} -func (x *BgpCommunity_Type) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[983] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowPppControl) GetDecrement() *PatternFlowPppControlCounter { + if x != nil { + return x.Decrement } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpCommunity_Type.ProtoReflect.Descriptor instead. -func (*BgpCommunity_Type) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{67, 0} +func (x *PatternFlowPppControl) GetMetricTags() []*PatternFlowPppControlMetricTag { + if x != nil { + return x.MetricTags + } + return nil } -type BgpExtCommunity_Type struct { +// integer counter pattern +type PatternFlowPppProtocolTypeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 33 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *BgpExtCommunity_Type) Reset() { - *x = BgpExtCommunity_Type{} +func (x *PatternFlowPppProtocolTypeCounter) Reset() { + *x = PatternFlowPppProtocolTypeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[984] + mi := &file_otg_proto_msgTypes[977] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpExtCommunity_Type) String() string { +func (x *PatternFlowPppProtocolTypeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtCommunity_Type) ProtoMessage() {} +func (*PatternFlowPppProtocolTypeCounter) ProtoMessage() {} -func (x *BgpExtCommunity_Type) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[984] +func (x *PatternFlowPppProtocolTypeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[977] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101836,34 +105906,70 @@ func (x *BgpExtCommunity_Type) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpExtCommunity_Type.ProtoReflect.Descriptor instead. -func (*BgpExtCommunity_Type) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{68, 0} +// Deprecated: Use PatternFlowPppProtocolTypeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowPppProtocolTypeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{977} } -type BgpExtCommunity_Subtype struct { +func (x *PatternFlowPppProtocolTypeCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowPppProtocolTypeCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowPppProtocolTypeCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowPppProtocolTypeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 16 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *BgpExtCommunity_Subtype) Reset() { - *x = BgpExtCommunity_Subtype{} +func (x *PatternFlowPppProtocolTypeMetricTag) Reset() { + *x = PatternFlowPppProtocolTypeMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[985] + mi := &file_otg_proto_msgTypes[978] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpExtCommunity_Subtype) String() string { +func (x *PatternFlowPppProtocolTypeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtCommunity_Subtype) ProtoMessage() {} +func (*PatternFlowPppProtocolTypeMetricTag) ProtoMessage() {} -func (x *BgpExtCommunity_Subtype) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[985] +func (x *PatternFlowPppProtocolTypeMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[978] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101874,34 +105980,79 @@ func (x *BgpExtCommunity_Subtype) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpExtCommunity_Subtype.ProtoReflect.Descriptor instead. -func (*BgpExtCommunity_Subtype) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{68, 1} +// Deprecated: Use PatternFlowPppProtocolTypeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowPppProtocolTypeMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{978} } -type BgpAsPath_AsSetMode struct { +func (x *PatternFlowPppProtocolTypeMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowPppProtocolTypeMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowPppProtocolTypeMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// PPP protocol type +type PatternFlowPppProtocolType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.auto + Choice *PatternFlowPppProtocolType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowPppProtocolType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 33 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [33] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // The OTG implementation can provide a system generated + // value for this property. If the OTG is unable to generate a value + // the default value must be used. + // default = 33 + Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` + // Description missing in models + Increment *PatternFlowPppProtocolTypeCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowPppProtocolTypeCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowPppProtocolTypeMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *BgpAsPath_AsSetMode) Reset() { - *x = BgpAsPath_AsSetMode{} +func (x *PatternFlowPppProtocolType) Reset() { + *x = PatternFlowPppProtocolType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[986] + mi := &file_otg_proto_msgTypes[979] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAsPath_AsSetMode) String() string { +func (x *PatternFlowPppProtocolType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAsPath_AsSetMode) ProtoMessage() {} +func (*PatternFlowPppProtocolType) ProtoMessage() {} -func (x *BgpAsPath_AsSetMode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[986] +func (x *PatternFlowPppProtocolType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[979] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101912,72 +106063,94 @@ func (x *BgpAsPath_AsSetMode) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAsPath_AsSetMode.ProtoReflect.Descriptor instead. -func (*BgpAsPath_AsSetMode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{69, 0} +// Deprecated: Use PatternFlowPppProtocolType.ProtoReflect.Descriptor instead. +func (*PatternFlowPppProtocolType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{979} } -type BgpAsPathSegment_Type struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowPppProtocolType) GetChoice() PatternFlowPppProtocolType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowPppProtocolType_Choice_unspecified } -func (x *BgpAsPathSegment_Type) Reset() { - *x = BgpAsPathSegment_Type{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[987] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowPppProtocolType) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *BgpAsPathSegment_Type) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowPppProtocolType) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*BgpAsPathSegment_Type) ProtoMessage() {} +func (x *PatternFlowPppProtocolType) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto + } + return 0 +} -func (x *BgpAsPathSegment_Type) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[987] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowPppProtocolType) GetIncrement() *PatternFlowPppProtocolTypeCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpAsPathSegment_Type.ProtoReflect.Descriptor instead. -func (*BgpAsPathSegment_Type) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{70, 0} +func (x *PatternFlowPppProtocolType) GetDecrement() *PatternFlowPppProtocolTypeCounter { + if x != nil { + return x.Decrement + } + return nil } -type BgpV4EvpnEvis_Choice struct { +func (x *PatternFlowPppProtocolType) GetMetricTags() []*PatternFlowPppProtocolTypeMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowIgmpv1VersionCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 1 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *BgpV4EvpnEvis_Choice) Reset() { - *x = BgpV4EvpnEvis_Choice{} +func (x *PatternFlowIgmpv1VersionCounter) Reset() { + *x = PatternFlowIgmpv1VersionCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[988] + mi := &file_otg_proto_msgTypes[980] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV4EvpnEvis_Choice) String() string { +func (x *PatternFlowIgmpv1VersionCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV4EvpnEvis_Choice) ProtoMessage() {} +func (*PatternFlowIgmpv1VersionCounter) ProtoMessage() {} -func (x *BgpV4EvpnEvis_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[988] +func (x *PatternFlowIgmpv1VersionCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[980] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -101988,34 +106161,70 @@ func (x *BgpV4EvpnEvis_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV4EvpnEvis_Choice.ProtoReflect.Descriptor instead. -func (*BgpV4EvpnEvis_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{71, 0} +// Deprecated: Use PatternFlowIgmpv1VersionCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1VersionCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{980} } -type BgpV4EviVxlan_ReplicationType struct { +func (x *PatternFlowIgmpv1VersionCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowIgmpv1VersionCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowIgmpv1VersionCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowIgmpv1VersionMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 4 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *BgpV4EviVxlan_ReplicationType) Reset() { - *x = BgpV4EviVxlan_ReplicationType{} +func (x *PatternFlowIgmpv1VersionMetricTag) Reset() { + *x = PatternFlowIgmpv1VersionMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[989] + mi := &file_otg_proto_msgTypes[981] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV4EviVxlan_ReplicationType) String() string { +func (x *PatternFlowIgmpv1VersionMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV4EviVxlan_ReplicationType) ProtoMessage() {} +func (*PatternFlowIgmpv1VersionMetricTag) ProtoMessage() {} -func (x *BgpV4EviVxlan_ReplicationType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[989] +func (x *PatternFlowIgmpv1VersionMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[981] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102026,34 +106235,74 @@ func (x *BgpV4EviVxlan_ReplicationType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV4EviVxlan_ReplicationType.ProtoReflect.Descriptor instead. -func (*BgpV4EviVxlan_ReplicationType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{72, 0} +// Deprecated: Use PatternFlowIgmpv1VersionMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1VersionMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{981} } -type BgpRouteDistinguisher_RdType struct { +func (x *PatternFlowIgmpv1VersionMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowIgmpv1VersionMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowIgmpv1VersionMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// Version number +type PatternFlowIgmpv1Version struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIgmpv1Version_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIgmpv1Version_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 1 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [1] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIgmpv1VersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIgmpv1VersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowIgmpv1VersionMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *BgpRouteDistinguisher_RdType) Reset() { - *x = BgpRouteDistinguisher_RdType{} +func (x *PatternFlowIgmpv1Version) Reset() { + *x = PatternFlowIgmpv1Version{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[990] + mi := &file_otg_proto_msgTypes[982] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpRouteDistinguisher_RdType) String() string { +func (x *PatternFlowIgmpv1Version) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpRouteDistinguisher_RdType) ProtoMessage() {} +func (*PatternFlowIgmpv1Version) ProtoMessage() {} -func (x *BgpRouteDistinguisher_RdType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[990] +func (x *PatternFlowIgmpv1Version) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[982] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102064,72 +106313,87 @@ func (x *BgpRouteDistinguisher_RdType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpRouteDistinguisher_RdType.ProtoReflect.Descriptor instead. -func (*BgpRouteDistinguisher_RdType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{75, 0} +// Deprecated: Use PatternFlowIgmpv1Version.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1Version) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{982} } -type BgpRouteTarget_RtType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowIgmpv1Version) GetChoice() PatternFlowIgmpv1Version_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIgmpv1Version_Choice_unspecified } -func (x *BgpRouteTarget_RtType) Reset() { - *x = BgpRouteTarget_RtType{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[991] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowIgmpv1Version) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *BgpRouteTarget_RtType) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowIgmpv1Version) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*BgpRouteTarget_RtType) ProtoMessage() {} +func (x *PatternFlowIgmpv1Version) GetIncrement() *PatternFlowIgmpv1VersionCounter { + if x != nil { + return x.Increment + } + return nil +} -func (x *BgpRouteTarget_RtType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[991] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowIgmpv1Version) GetDecrement() *PatternFlowIgmpv1VersionCounter { + if x != nil { + return x.Decrement } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpRouteTarget_RtType.ProtoReflect.Descriptor instead. -func (*BgpRouteTarget_RtType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{76, 0} +func (x *PatternFlowIgmpv1Version) GetMetricTags() []*PatternFlowIgmpv1VersionMetricTag { + if x != nil { + return x.MetricTags + } + return nil } -type BgpV4RouteRange_NextHopMode struct { +// integer counter pattern +type PatternFlowIgmpv1TypeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 1 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *BgpV4RouteRange_NextHopMode) Reset() { - *x = BgpV4RouteRange_NextHopMode{} +func (x *PatternFlowIgmpv1TypeCounter) Reset() { + *x = PatternFlowIgmpv1TypeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[992] + mi := &file_otg_proto_msgTypes[983] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV4RouteRange_NextHopMode) String() string { +func (x *PatternFlowIgmpv1TypeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV4RouteRange_NextHopMode) ProtoMessage() {} +func (*PatternFlowIgmpv1TypeCounter) ProtoMessage() {} -func (x *BgpV4RouteRange_NextHopMode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[992] +func (x *PatternFlowIgmpv1TypeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[983] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102140,34 +106404,70 @@ func (x *BgpV4RouteRange_NextHopMode) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV4RouteRange_NextHopMode.ProtoReflect.Descriptor instead. -func (*BgpV4RouteRange_NextHopMode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{80, 0} +// Deprecated: Use PatternFlowIgmpv1TypeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1TypeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{983} } -type BgpV4RouteRange_NextHopAddressType struct { +func (x *PatternFlowIgmpv1TypeCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowIgmpv1TypeCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowIgmpv1TypeCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowIgmpv1TypeMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 4 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *BgpV4RouteRange_NextHopAddressType) Reset() { - *x = BgpV4RouteRange_NextHopAddressType{} +func (x *PatternFlowIgmpv1TypeMetricTag) Reset() { + *x = PatternFlowIgmpv1TypeMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[993] + mi := &file_otg_proto_msgTypes[984] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV4RouteRange_NextHopAddressType) String() string { +func (x *PatternFlowIgmpv1TypeMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV4RouteRange_NextHopAddressType) ProtoMessage() {} +func (*PatternFlowIgmpv1TypeMetricTag) ProtoMessage() {} -func (x *BgpV4RouteRange_NextHopAddressType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[993] +func (x *PatternFlowIgmpv1TypeMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[984] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102178,34 +106478,74 @@ func (x *BgpV4RouteRange_NextHopAddressType) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use BgpV4RouteRange_NextHopAddressType.ProtoReflect.Descriptor instead. -func (*BgpV4RouteRange_NextHopAddressType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{80, 1} +// Deprecated: Use PatternFlowIgmpv1TypeMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1TypeMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{984} } -type BgpExtendedCommunity_Choice struct { +func (x *PatternFlowIgmpv1TypeMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowIgmpv1TypeMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowIgmpv1TypeMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// Type of message +type PatternFlowIgmpv1Type struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIgmpv1Type_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIgmpv1Type_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 1 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [1] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIgmpv1TypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIgmpv1TypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowIgmpv1TypeMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *BgpExtendedCommunity_Choice) Reset() { - *x = BgpExtendedCommunity_Choice{} +func (x *PatternFlowIgmpv1Type) Reset() { + *x = PatternFlowIgmpv1Type{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[994] + mi := &file_otg_proto_msgTypes[985] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpExtendedCommunity_Choice) String() string { +func (x *PatternFlowIgmpv1Type) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunity_Choice) ProtoMessage() {} +func (*PatternFlowIgmpv1Type) ProtoMessage() {} -func (x *BgpExtendedCommunity_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[994] +func (x *PatternFlowIgmpv1Type) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[985] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102216,72 +106556,87 @@ func (x *BgpExtendedCommunity_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunity_Choice.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunity_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{82, 0} +// Deprecated: Use PatternFlowIgmpv1Type.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1Type) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{985} } -type BgpExtendedCommunityTransitive2OctetAsType_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowIgmpv1Type) GetChoice() PatternFlowIgmpv1Type_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIgmpv1Type_Choice_unspecified } -func (x *BgpExtendedCommunityTransitive2OctetAsType_Choice) Reset() { - *x = BgpExtendedCommunityTransitive2OctetAsType_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[995] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowIgmpv1Type) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *BgpExtendedCommunityTransitive2OctetAsType_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowIgmpv1Type) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*BgpExtendedCommunityTransitive2OctetAsType_Choice) ProtoMessage() {} +func (x *PatternFlowIgmpv1Type) GetIncrement() *PatternFlowIgmpv1TypeCounter { + if x != nil { + return x.Increment + } + return nil +} -func (x *BgpExtendedCommunityTransitive2OctetAsType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[995] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowIgmpv1Type) GetDecrement() *PatternFlowIgmpv1TypeCounter { + if x != nil { + return x.Decrement } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpExtendedCommunityTransitive2OctetAsType_Choice.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitive2OctetAsType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{85, 0} +func (x *PatternFlowIgmpv1Type) GetMetricTags() []*PatternFlowIgmpv1TypeMetricTag { + if x != nil { + return x.MetricTags + } + return nil } -type BgpExtendedCommunityTransitiveIpv4AddressType_Choice struct { +// integer counter pattern +type PatternFlowIgmpv1UnusedCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *BgpExtendedCommunityTransitiveIpv4AddressType_Choice) Reset() { - *x = BgpExtendedCommunityTransitiveIpv4AddressType_Choice{} +func (x *PatternFlowIgmpv1UnusedCounter) Reset() { + *x = PatternFlowIgmpv1UnusedCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[996] + mi := &file_otg_proto_msgTypes[986] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpExtendedCommunityTransitiveIpv4AddressType_Choice) String() string { +func (x *PatternFlowIgmpv1UnusedCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitiveIpv4AddressType_Choice) ProtoMessage() {} +func (*PatternFlowIgmpv1UnusedCounter) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitiveIpv4AddressType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[996] +func (x *PatternFlowIgmpv1UnusedCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[986] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102292,34 +106647,70 @@ func (x *BgpExtendedCommunityTransitiveIpv4AddressType_Choice) ProtoReflect() pr return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitiveIpv4AddressType_Choice.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitiveIpv4AddressType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{88, 0} +// Deprecated: Use PatternFlowIgmpv1UnusedCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1UnusedCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{986} } -type BgpExtendedCommunityTransitive4OctetAsType_Choice struct { +func (x *PatternFlowIgmpv1UnusedCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowIgmpv1UnusedCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowIgmpv1UnusedCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowIgmpv1UnusedMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *BgpExtendedCommunityTransitive4OctetAsType_Choice) Reset() { - *x = BgpExtendedCommunityTransitive4OctetAsType_Choice{} +func (x *PatternFlowIgmpv1UnusedMetricTag) Reset() { + *x = PatternFlowIgmpv1UnusedMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[997] + mi := &file_otg_proto_msgTypes[987] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpExtendedCommunityTransitive4OctetAsType_Choice) String() string { +func (x *PatternFlowIgmpv1UnusedMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitive4OctetAsType_Choice) ProtoMessage() {} +func (*PatternFlowIgmpv1UnusedMetricTag) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitive4OctetAsType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[997] +func (x *PatternFlowIgmpv1UnusedMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[987] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102330,34 +106721,74 @@ func (x *BgpExtendedCommunityTransitive4OctetAsType_Choice) ProtoReflect() proto return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitive4OctetAsType_Choice.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitive4OctetAsType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{91, 0} +// Deprecated: Use PatternFlowIgmpv1UnusedMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1UnusedMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{987} } -type BgpExtendedCommunityTransitiveOpaqueType_Choice struct { +func (x *PatternFlowIgmpv1UnusedMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowIgmpv1UnusedMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowIgmpv1UnusedMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// Unused +type PatternFlowIgmpv1Unused struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIgmpv1Unused_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIgmpv1Unused_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIgmpv1UnusedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIgmpv1UnusedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowIgmpv1UnusedMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *BgpExtendedCommunityTransitiveOpaqueType_Choice) Reset() { - *x = BgpExtendedCommunityTransitiveOpaqueType_Choice{} +func (x *PatternFlowIgmpv1Unused) Reset() { + *x = PatternFlowIgmpv1Unused{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[998] + mi := &file_otg_proto_msgTypes[988] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpExtendedCommunityTransitiveOpaqueType_Choice) String() string { +func (x *PatternFlowIgmpv1Unused) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityTransitiveOpaqueType_Choice) ProtoMessage() {} +func (*PatternFlowIgmpv1Unused) ProtoMessage() {} -func (x *BgpExtendedCommunityTransitiveOpaqueType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[998] +func (x *PatternFlowIgmpv1Unused) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[988] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102368,72 +106799,86 @@ func (x *BgpExtendedCommunityTransitiveOpaqueType_Choice) ProtoReflect() protore return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityTransitiveOpaqueType_Choice.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitiveOpaqueType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{94, 0} +// Deprecated: Use PatternFlowIgmpv1Unused.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1Unused) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{988} } -type BgpExtendedCommunityTransitiveEvpnType_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowIgmpv1Unused) GetChoice() PatternFlowIgmpv1Unused_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIgmpv1Unused_Choice_unspecified } -func (x *BgpExtendedCommunityTransitiveEvpnType_Choice) Reset() { - *x = BgpExtendedCommunityTransitiveEvpnType_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[999] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowIgmpv1Unused) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *BgpExtendedCommunityTransitiveEvpnType_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowIgmpv1Unused) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*BgpExtendedCommunityTransitiveEvpnType_Choice) ProtoMessage() {} +func (x *PatternFlowIgmpv1Unused) GetIncrement() *PatternFlowIgmpv1UnusedCounter { + if x != nil { + return x.Increment + } + return nil +} -func (x *BgpExtendedCommunityTransitiveEvpnType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[999] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowIgmpv1Unused) GetDecrement() *PatternFlowIgmpv1UnusedCounter { + if x != nil { + return x.Decrement } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpExtendedCommunityTransitiveEvpnType_Choice.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityTransitiveEvpnType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{96, 0} +func (x *PatternFlowIgmpv1Unused) GetMetricTags() []*PatternFlowIgmpv1UnusedMetricTag { + if x != nil { + return x.MetricTags + } + return nil } -type BgpExtendedCommunityNonTransitive2OctetAsType_Choice struct { +// Checksum +type PatternFlowIgmpv1Checksum struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // The type of checksum + // default = Choice.Enum.generated + Choice *PatternFlowIgmpv1Checksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIgmpv1Checksum_Choice_Enum,oneof" json:"choice,omitempty"` + // A system generated checksum value + // default = Generated.Enum.good + Generated *PatternFlowIgmpv1Checksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowIgmpv1Checksum_Generated_Enum,oneof" json:"generated,omitempty"` + // A custom checksum value + Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` } -func (x *BgpExtendedCommunityNonTransitive2OctetAsType_Choice) Reset() { - *x = BgpExtendedCommunityNonTransitive2OctetAsType_Choice{} +func (x *PatternFlowIgmpv1Checksum) Reset() { + *x = PatternFlowIgmpv1Checksum{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1000] + mi := &file_otg_proto_msgTypes[989] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpExtendedCommunityNonTransitive2OctetAsType_Choice) String() string { +func (x *PatternFlowIgmpv1Checksum) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpExtendedCommunityNonTransitive2OctetAsType_Choice) ProtoMessage() {} +func (*PatternFlowIgmpv1Checksum) ProtoMessage() {} -func (x *BgpExtendedCommunityNonTransitive2OctetAsType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1000] +func (x *PatternFlowIgmpv1Checksum) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[989] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102444,34 +106889,66 @@ func (x *BgpExtendedCommunityNonTransitive2OctetAsType_Choice) ProtoReflect() pr return mi.MessageOf(x) } -// Deprecated: Use BgpExtendedCommunityNonTransitive2OctetAsType_Choice.ProtoReflect.Descriptor instead. -func (*BgpExtendedCommunityNonTransitive2OctetAsType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{98, 0} +// Deprecated: Use PatternFlowIgmpv1Checksum.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1Checksum) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{989} } -type BgpV6RouteRange_NextHopMode struct { +func (x *PatternFlowIgmpv1Checksum) GetChoice() PatternFlowIgmpv1Checksum_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIgmpv1Checksum_Choice_unspecified +} + +func (x *PatternFlowIgmpv1Checksum) GetGenerated() PatternFlowIgmpv1Checksum_Generated_Enum { + if x != nil && x.Generated != nil { + return *x.Generated + } + return PatternFlowIgmpv1Checksum_Generated_unspecified +} + +func (x *PatternFlowIgmpv1Checksum) GetCustom() uint32 { + if x != nil && x.Custom != nil { + return *x.Custom + } + return 0 +} + +// ipv4 counter pattern +type PatternFlowIgmpv1GroupAddressCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0.0.0.0 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 0.0.0.1 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *BgpV6RouteRange_NextHopMode) Reset() { - *x = BgpV6RouteRange_NextHopMode{} +func (x *PatternFlowIgmpv1GroupAddressCounter) Reset() { + *x = PatternFlowIgmpv1GroupAddressCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1001] + mi := &file_otg_proto_msgTypes[990] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV6RouteRange_NextHopMode) String() string { +func (x *PatternFlowIgmpv1GroupAddressCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV6RouteRange_NextHopMode) ProtoMessage() {} +func (*PatternFlowIgmpv1GroupAddressCounter) ProtoMessage() {} -func (x *BgpV6RouteRange_NextHopMode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1001] +func (x *PatternFlowIgmpv1GroupAddressCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[990] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102482,34 +106959,70 @@ func (x *BgpV6RouteRange_NextHopMode) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV6RouteRange_NextHopMode.ProtoReflect.Descriptor instead. -func (*BgpV6RouteRange_NextHopMode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{100, 0} +// Deprecated: Use PatternFlowIgmpv1GroupAddressCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1GroupAddressCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{990} } -type BgpV6RouteRange_NextHopAddressType struct { +func (x *PatternFlowIgmpv1GroupAddressCounter) GetStart() string { + if x != nil && x.Start != nil { + return *x.Start + } + return "" +} + +func (x *PatternFlowIgmpv1GroupAddressCounter) GetStep() string { + if x != nil && x.Step != nil { + return *x.Step + } + return "" +} + +func (x *PatternFlowIgmpv1GroupAddressCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowIgmpv1GroupAddressMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 32 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *BgpV6RouteRange_NextHopAddressType) Reset() { - *x = BgpV6RouteRange_NextHopAddressType{} +func (x *PatternFlowIgmpv1GroupAddressMetricTag) Reset() { + *x = PatternFlowIgmpv1GroupAddressMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1002] + mi := &file_otg_proto_msgTypes[991] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV6RouteRange_NextHopAddressType) String() string { +func (x *PatternFlowIgmpv1GroupAddressMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV6RouteRange_NextHopAddressType) ProtoMessage() {} +func (*PatternFlowIgmpv1GroupAddressMetricTag) ProtoMessage() {} -func (x *BgpV6RouteRange_NextHopAddressType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1002] +func (x *PatternFlowIgmpv1GroupAddressMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[991] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102520,72 +107033,74 @@ func (x *BgpV6RouteRange_NextHopAddressType) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use BgpV6RouteRange_NextHopAddressType.ProtoReflect.Descriptor instead. -func (*BgpV6RouteRange_NextHopAddressType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{100, 1} +// Deprecated: Use PatternFlowIgmpv1GroupAddressMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1GroupAddressMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{991} } -type BgpSrteV4Policy_NextHopMode struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowIgmpv1GroupAddressMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" } -func (x *BgpSrteV4Policy_NextHopMode) Reset() { - *x = BgpSrteV4Policy_NextHopMode{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1003] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowIgmpv1GroupAddressMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } + return 0 } -func (x *BgpSrteV4Policy_NextHopMode) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BgpSrteV4Policy_NextHopMode) ProtoMessage() {} - -func (x *BgpSrteV4Policy_NextHopMode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1003] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowIgmpv1GroupAddressMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length } - return mi.MessageOf(x) -} - -// Deprecated: Use BgpSrteV4Policy_NextHopMode.ProtoReflect.Descriptor instead. -func (*BgpSrteV4Policy_NextHopMode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{101, 0} + return 0 } -type BgpSrteV4Policy_NextHopAddressType struct { +// Group address +type PatternFlowIgmpv1GroupAddress struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowIgmpv1GroupAddress_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowIgmpv1GroupAddress_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0.0.0.0 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = ['0.0.0.0'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowIgmpv1GroupAddressCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowIgmpv1GroupAddressCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowIgmpv1GroupAddressMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *BgpSrteV4Policy_NextHopAddressType) Reset() { - *x = BgpSrteV4Policy_NextHopAddressType{} +func (x *PatternFlowIgmpv1GroupAddress) Reset() { + *x = PatternFlowIgmpv1GroupAddress{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1004] + mi := &file_otg_proto_msgTypes[992] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpSrteV4Policy_NextHopAddressType) String() string { +func (x *PatternFlowIgmpv1GroupAddress) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteV4Policy_NextHopAddressType) ProtoMessage() {} +func (*PatternFlowIgmpv1GroupAddress) ProtoMessage() {} -func (x *BgpSrteV4Policy_NextHopAddressType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1004] +func (x *PatternFlowIgmpv1GroupAddress) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[992] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102596,72 +107111,87 @@ func (x *BgpSrteV4Policy_NextHopAddressType) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use BgpSrteV4Policy_NextHopAddressType.ProtoReflect.Descriptor instead. -func (*BgpSrteV4Policy_NextHopAddressType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{101, 1} +// Deprecated: Use PatternFlowIgmpv1GroupAddress.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1GroupAddress) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{992} } -type BgpSrteRemoteEndpointSubTlv_AddressFamily struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowIgmpv1GroupAddress) GetChoice() PatternFlowIgmpv1GroupAddress_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowIgmpv1GroupAddress_Choice_unspecified } -func (x *BgpSrteRemoteEndpointSubTlv_AddressFamily) Reset() { - *x = BgpSrteRemoteEndpointSubTlv_AddressFamily{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1005] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowIgmpv1GroupAddress) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } + return "" } -func (x *BgpSrteRemoteEndpointSubTlv_AddressFamily) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowIgmpv1GroupAddress) GetValues() []string { + if x != nil { + return x.Values + } + return nil } -func (*BgpSrteRemoteEndpointSubTlv_AddressFamily) ProtoMessage() {} +func (x *PatternFlowIgmpv1GroupAddress) GetIncrement() *PatternFlowIgmpv1GroupAddressCounter { + if x != nil { + return x.Increment + } + return nil +} -func (x *BgpSrteRemoteEndpointSubTlv_AddressFamily) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1005] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowIgmpv1GroupAddress) GetDecrement() *PatternFlowIgmpv1GroupAddressCounter { + if x != nil { + return x.Decrement } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpSrteRemoteEndpointSubTlv_AddressFamily.ProtoReflect.Descriptor instead. -func (*BgpSrteRemoteEndpointSubTlv_AddressFamily) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{103, 0} +func (x *PatternFlowIgmpv1GroupAddress) GetMetricTags() []*PatternFlowIgmpv1GroupAddressMetricTag { + if x != nil { + return x.MetricTags + } + return nil } -type BgpSrteBindingSubTlv_BindingSidType struct { +// integer counter pattern +type PatternFlowMplsLabelCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 16 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *BgpSrteBindingSubTlv_BindingSidType) Reset() { - *x = BgpSrteBindingSubTlv_BindingSidType{} +func (x *PatternFlowMplsLabelCounter) Reset() { + *x = PatternFlowMplsLabelCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1006] + mi := &file_otg_proto_msgTypes[993] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpSrteBindingSubTlv_BindingSidType) String() string { +func (x *PatternFlowMplsLabelCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteBindingSubTlv_BindingSidType) ProtoMessage() {} +func (*PatternFlowMplsLabelCounter) ProtoMessage() {} -func (x *BgpSrteBindingSubTlv_BindingSidType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1006] +func (x *PatternFlowMplsLabelCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[993] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102672,72 +107202,70 @@ func (x *BgpSrteBindingSubTlv_BindingSidType) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use BgpSrteBindingSubTlv_BindingSidType.ProtoReflect.Descriptor instead. -func (*BgpSrteBindingSubTlv_BindingSidType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{105, 0} -} - -type BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +// Deprecated: Use PatternFlowMplsLabelCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsLabelCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{993} } -func (x *BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy) Reset() { - *x = BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1007] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowMplsLabelCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } + return 0 } -func (x *BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy) ProtoMessage() {} - -func (x *BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1007] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowMplsLabelCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy.ProtoReflect.Descriptor instead. -func (*BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{109, 0} +func (x *PatternFlowMplsLabelCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 } -type BgpSrteSegment_SegmentType struct { +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowMplsLabelMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 20 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *BgpSrteSegment_SegmentType) Reset() { - *x = BgpSrteSegment_SegmentType{} +func (x *PatternFlowMplsLabelMetricTag) Reset() { + *x = PatternFlowMplsLabelMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1008] + mi := &file_otg_proto_msgTypes[994] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpSrteSegment_SegmentType) String() string { +func (x *PatternFlowMplsLabelMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteSegment_SegmentType) ProtoMessage() {} +func (*PatternFlowMplsLabelMetricTag) ProtoMessage() {} -func (x *BgpSrteSegment_SegmentType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1008] +func (x *PatternFlowMplsLabelMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[994] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102748,72 +107276,79 @@ func (x *BgpSrteSegment_SegmentType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpSrteSegment_SegmentType.ProtoReflect.Descriptor instead. -func (*BgpSrteSegment_SegmentType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{111, 0} -} - -type BgpSrteV6Policy_NextHopMode struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +// Deprecated: Use PatternFlowMplsLabelMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsLabelMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{994} } -func (x *BgpSrteV6Policy_NextHopMode) Reset() { - *x = BgpSrteV6Policy_NextHopMode{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1009] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowMplsLabelMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } + return "" } -func (x *BgpSrteV6Policy_NextHopMode) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BgpSrteV6Policy_NextHopMode) ProtoMessage() {} - -func (x *BgpSrteV6Policy_NextHopMode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1009] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowMplsLabelMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use BgpSrteV6Policy_NextHopMode.ProtoReflect.Descriptor instead. -func (*BgpSrteV6Policy_NextHopMode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{125, 0} +func (x *PatternFlowMplsLabelMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 } -type BgpSrteV6Policy_NextHopAddressType struct { +// Label of routers +type PatternFlowMplsLabel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.auto + Choice *PatternFlowMplsLabel_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowMplsLabel_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 16 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [16] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // The OTG implementation can provide a system generated + // value for this property. If the OTG is unable to generate a value + // the default value must be used. + // default = 16 + Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` + // Description missing in models + Increment *PatternFlowMplsLabelCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowMplsLabelCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowMplsLabelMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *BgpSrteV6Policy_NextHopAddressType) Reset() { - *x = BgpSrteV6Policy_NextHopAddressType{} +func (x *PatternFlowMplsLabel) Reset() { + *x = PatternFlowMplsLabel{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1010] + mi := &file_otg_proto_msgTypes[995] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpSrteV6Policy_NextHopAddressType) String() string { +func (x *PatternFlowMplsLabel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpSrteV6Policy_NextHopAddressType) ProtoMessage() {} +func (*PatternFlowMplsLabel) ProtoMessage() {} -func (x *BgpSrteV6Policy_NextHopAddressType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1010] +func (x *PatternFlowMplsLabel) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[995] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102824,72 +107359,94 @@ func (x *BgpSrteV6Policy_NextHopAddressType) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use BgpSrteV6Policy_NextHopAddressType.ProtoReflect.Descriptor instead. -func (*BgpSrteV6Policy_NextHopAddressType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{125, 1} +// Deprecated: Use PatternFlowMplsLabel.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsLabel) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{995} } -type BgpUpdateReplay_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowMplsLabel) GetChoice() PatternFlowMplsLabel_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowMplsLabel_Choice_unspecified } -func (x *BgpUpdateReplay_Choice) Reset() { - *x = BgpUpdateReplay_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1011] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowMplsLabel) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *BgpUpdateReplay_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowMplsLabel) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*BgpUpdateReplay_Choice) ProtoMessage() {} +func (x *PatternFlowMplsLabel) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto + } + return 0 +} -func (x *BgpUpdateReplay_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1011] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowMplsLabel) GetIncrement() *PatternFlowMplsLabelCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpUpdateReplay_Choice.ProtoReflect.Descriptor instead. -func (*BgpUpdateReplay_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{128, 0} +func (x *PatternFlowMplsLabel) GetDecrement() *PatternFlowMplsLabelCounter { + if x != nil { + return x.Decrement + } + return nil } -type BgpAttributes_Origin struct { +func (x *PatternFlowMplsLabel) GetMetricTags() []*PatternFlowMplsLabelMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowMplsTrafficClassCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *BgpAttributes_Origin) Reset() { - *x = BgpAttributes_Origin{} +func (x *PatternFlowMplsTrafficClassCounter) Reset() { + *x = PatternFlowMplsTrafficClassCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1012] + mi := &file_otg_proto_msgTypes[996] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributes_Origin) String() string { +func (x *PatternFlowMplsTrafficClassCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributes_Origin) ProtoMessage() {} +func (*PatternFlowMplsTrafficClassCounter) ProtoMessage() {} -func (x *BgpAttributes_Origin) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1012] +func (x *PatternFlowMplsTrafficClassCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[996] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102900,34 +107457,70 @@ func (x *BgpAttributes_Origin) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributes_Origin.ProtoReflect.Descriptor instead. -func (*BgpAttributes_Origin) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{137, 0} +// Deprecated: Use PatternFlowMplsTrafficClassCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsTrafficClassCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{996} } -type BgpAttributesAsPath_Choice struct { +func (x *PatternFlowMplsTrafficClassCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowMplsTrafficClassCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowMplsTrafficClassCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowMplsTrafficClassMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 3 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *BgpAttributesAsPath_Choice) Reset() { - *x = BgpAttributesAsPath_Choice{} +func (x *PatternFlowMplsTrafficClassMetricTag) Reset() { + *x = PatternFlowMplsTrafficClassMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1013] + mi := &file_otg_proto_msgTypes[997] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesAsPath_Choice) String() string { +func (x *PatternFlowMplsTrafficClassMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesAsPath_Choice) ProtoMessage() {} +func (*PatternFlowMplsTrafficClassMetricTag) ProtoMessage() {} -func (x *BgpAttributesAsPath_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1013] +func (x *PatternFlowMplsTrafficClassMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[997] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102938,34 +107531,74 @@ func (x *BgpAttributesAsPath_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesAsPath_Choice.ProtoReflect.Descriptor instead. -func (*BgpAttributesAsPath_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{139, 0} +// Deprecated: Use PatternFlowMplsTrafficClassMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsTrafficClassMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{997} } -type BgpAttributesFourByteAsPathSegment_Type struct { +func (x *PatternFlowMplsTrafficClassMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowMplsTrafficClassMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowMplsTrafficClassMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// Traffic class +type PatternFlowMplsTrafficClass struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowMplsTrafficClass_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowMplsTrafficClass_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowMplsTrafficClassCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowMplsTrafficClassCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowMplsTrafficClassMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *BgpAttributesFourByteAsPathSegment_Type) Reset() { - *x = BgpAttributesFourByteAsPathSegment_Type{} +func (x *PatternFlowMplsTrafficClass) Reset() { + *x = PatternFlowMplsTrafficClass{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1014] + mi := &file_otg_proto_msgTypes[998] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesFourByteAsPathSegment_Type) String() string { +func (x *PatternFlowMplsTrafficClass) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesFourByteAsPathSegment_Type) ProtoMessage() {} +func (*PatternFlowMplsTrafficClass) ProtoMessage() {} -func (x *BgpAttributesFourByteAsPathSegment_Type) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1014] +func (x *PatternFlowMplsTrafficClass) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[998] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -102976,72 +107609,87 @@ func (x *BgpAttributesFourByteAsPathSegment_Type) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesFourByteAsPathSegment_Type.ProtoReflect.Descriptor instead. -func (*BgpAttributesFourByteAsPathSegment_Type) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{141, 0} +// Deprecated: Use PatternFlowMplsTrafficClass.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsTrafficClass) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{998} } -type BgpAttributesTwoByteAsPathSegment_Type struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowMplsTrafficClass) GetChoice() PatternFlowMplsTrafficClass_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowMplsTrafficClass_Choice_unspecified } -func (x *BgpAttributesTwoByteAsPathSegment_Type) Reset() { - *x = BgpAttributesTwoByteAsPathSegment_Type{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1015] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowMplsTrafficClass) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *BgpAttributesTwoByteAsPathSegment_Type) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowMplsTrafficClass) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*BgpAttributesTwoByteAsPathSegment_Type) ProtoMessage() {} +func (x *PatternFlowMplsTrafficClass) GetIncrement() *PatternFlowMplsTrafficClassCounter { + if x != nil { + return x.Increment + } + return nil +} -func (x *BgpAttributesTwoByteAsPathSegment_Type) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1015] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowMplsTrafficClass) GetDecrement() *PatternFlowMplsTrafficClassCounter { + if x != nil { + return x.Decrement } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpAttributesTwoByteAsPathSegment_Type.ProtoReflect.Descriptor instead. -func (*BgpAttributesTwoByteAsPathSegment_Type) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{143, 0} +func (x *PatternFlowMplsTrafficClass) GetMetricTags() []*PatternFlowMplsTrafficClassMetricTag { + if x != nil { + return x.MetricTags + } + return nil } -type BgpAttributesAggregator_Choice struct { +// integer counter pattern +type PatternFlowMplsBottomOfStackCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 1 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *BgpAttributesAggregator_Choice) Reset() { - *x = BgpAttributesAggregator_Choice{} +func (x *PatternFlowMplsBottomOfStackCounter) Reset() { + *x = PatternFlowMplsBottomOfStackCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1016] + mi := &file_otg_proto_msgTypes[999] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesAggregator_Choice) String() string { +func (x *PatternFlowMplsBottomOfStackCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesAggregator_Choice) ProtoMessage() {} +func (*PatternFlowMplsBottomOfStackCounter) ProtoMessage() {} -func (x *BgpAttributesAggregator_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1016] +func (x *PatternFlowMplsBottomOfStackCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[999] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103052,34 +107700,70 @@ func (x *BgpAttributesAggregator_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesAggregator_Choice.ProtoReflect.Descriptor instead. -func (*BgpAttributesAggregator_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{145, 0} +// Deprecated: Use PatternFlowMplsBottomOfStackCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsBottomOfStackCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{999} } -type BgpAttributesCommunity_Choice struct { +func (x *PatternFlowMplsBottomOfStackCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowMplsBottomOfStackCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowMplsBottomOfStackCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowMplsBottomOfStackMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 1 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *BgpAttributesCommunity_Choice) Reset() { - *x = BgpAttributesCommunity_Choice{} +func (x *PatternFlowMplsBottomOfStackMetricTag) Reset() { + *x = PatternFlowMplsBottomOfStackMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1017] + mi := &file_otg_proto_msgTypes[1000] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesCommunity_Choice) String() string { +func (x *PatternFlowMplsBottomOfStackMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesCommunity_Choice) ProtoMessage() {} +func (*PatternFlowMplsBottomOfStackMetricTag) ProtoMessage() {} -func (x *BgpAttributesCommunity_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1017] +func (x *PatternFlowMplsBottomOfStackMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1000] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103090,34 +107774,79 @@ func (x *BgpAttributesCommunity_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesCommunity_Choice.ProtoReflect.Descriptor instead. -func (*BgpAttributesCommunity_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{147, 0} +// Deprecated: Use PatternFlowMplsBottomOfStackMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsBottomOfStackMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1000} } -type BgpAttributesNextHop_Choice struct { +func (x *PatternFlowMplsBottomOfStackMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowMplsBottomOfStackMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowMplsBottomOfStackMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// Bottom of stack +type PatternFlowMplsBottomOfStack struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.auto + Choice *PatternFlowMplsBottomOfStack_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowMplsBottomOfStack_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 1 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [1] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // The OTG implementation can provide a system generated + // value for this property. If the OTG is unable to generate a value + // the default value must be used. + // default = 1 + Auto *uint32 `protobuf:"varint,4,opt,name=auto,proto3,oneof" json:"auto,omitempty"` + // Description missing in models + Increment *PatternFlowMplsBottomOfStackCounter `protobuf:"bytes,6,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowMplsBottomOfStackCounter `protobuf:"bytes,7,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowMplsBottomOfStackMetricTag `protobuf:"bytes,8,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *BgpAttributesNextHop_Choice) Reset() { - *x = BgpAttributesNextHop_Choice{} +func (x *PatternFlowMplsBottomOfStack) Reset() { + *x = PatternFlowMplsBottomOfStack{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1018] + mi := &file_otg_proto_msgTypes[1001] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesNextHop_Choice) String() string { +func (x *PatternFlowMplsBottomOfStack) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesNextHop_Choice) ProtoMessage() {} +func (*PatternFlowMplsBottomOfStack) ProtoMessage() {} -func (x *BgpAttributesNextHop_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1018] +func (x *PatternFlowMplsBottomOfStack) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1001] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103128,72 +107857,94 @@ func (x *BgpAttributesNextHop_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesNextHop_Choice.ProtoReflect.Descriptor instead. -func (*BgpAttributesNextHop_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{149, 0} +// Deprecated: Use PatternFlowMplsBottomOfStack.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsBottomOfStack) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1001} } -type BgpAttributesMpReachNlri_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowMplsBottomOfStack) GetChoice() PatternFlowMplsBottomOfStack_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowMplsBottomOfStack_Choice_unspecified } -func (x *BgpAttributesMpReachNlri_Choice) Reset() { - *x = BgpAttributesMpReachNlri_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1019] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowMplsBottomOfStack) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *BgpAttributesMpReachNlri_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowMplsBottomOfStack) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*BgpAttributesMpReachNlri_Choice) ProtoMessage() {} +func (x *PatternFlowMplsBottomOfStack) GetAuto() uint32 { + if x != nil && x.Auto != nil { + return *x.Auto + } + return 0 +} -func (x *BgpAttributesMpReachNlri_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1019] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowMplsBottomOfStack) GetIncrement() *PatternFlowMplsBottomOfStackCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpAttributesMpReachNlri_Choice.ProtoReflect.Descriptor instead. -func (*BgpAttributesMpReachNlri_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{151, 0} +func (x *PatternFlowMplsBottomOfStack) GetDecrement() *PatternFlowMplsBottomOfStackCounter { + if x != nil { + return x.Decrement + } + return nil } -type BgpAttributesMpUnreachNlri_Choice struct { +func (x *PatternFlowMplsBottomOfStack) GetMetricTags() []*PatternFlowMplsBottomOfStackMetricTag { + if x != nil { + return x.MetricTags + } + return nil +} + +// integer counter pattern +type PatternFlowMplsTimeToLiveCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 64 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *BgpAttributesMpUnreachNlri_Choice) Reset() { - *x = BgpAttributesMpUnreachNlri_Choice{} +func (x *PatternFlowMplsTimeToLiveCounter) Reset() { + *x = PatternFlowMplsTimeToLiveCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1020] + mi := &file_otg_proto_msgTypes[1002] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpAttributesMpUnreachNlri_Choice) String() string { +func (x *PatternFlowMplsTimeToLiveCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpAttributesMpUnreachNlri_Choice) ProtoMessage() {} +func (*PatternFlowMplsTimeToLiveCounter) ProtoMessage() {} -func (x *BgpAttributesMpUnreachNlri_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1020] +func (x *PatternFlowMplsTimeToLiveCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1002] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103204,34 +107955,70 @@ func (x *BgpAttributesMpUnreachNlri_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use BgpAttributesMpUnreachNlri_Choice.ProtoReflect.Descriptor instead. -func (*BgpAttributesMpUnreachNlri_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{152, 0} +// Deprecated: Use PatternFlowMplsTimeToLiveCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsTimeToLiveCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1002} } -type BgpV6Peer_AsType struct { +func (x *PatternFlowMplsTimeToLiveCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowMplsTimeToLiveCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowMplsTimeToLiveCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Metric tag can be used to enable tracking portion of or all bits in a corresponding +// header field for metrics per each applicable value. These would appear as tagged +// metrics in corresponding flow metrics. +type PatternFlowMplsTimeToLiveMetricTag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Name used to identify the metrics associated with the values applicable for configured + // offset and length inside corresponding header field + // required = true + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + // Offset in bits relative to start of corresponding header field + // default = 0 + Offset *uint32 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Number of bits to track for metrics starting from configured offset of corresponding + // header field + // default = 8 + Length *uint32 `protobuf:"varint,3,opt,name=length,proto3,oneof" json:"length,omitempty"` } -func (x *BgpV6Peer_AsType) Reset() { - *x = BgpV6Peer_AsType{} +func (x *PatternFlowMplsTimeToLiveMetricTag) Reset() { + *x = PatternFlowMplsTimeToLiveMetricTag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1021] + mi := &file_otg_proto_msgTypes[1003] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV6Peer_AsType) String() string { +func (x *PatternFlowMplsTimeToLiveMetricTag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV6Peer_AsType) ProtoMessage() {} +func (*PatternFlowMplsTimeToLiveMetricTag) ProtoMessage() {} -func (x *BgpV6Peer_AsType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1021] +func (x *PatternFlowMplsTimeToLiveMetricTag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1003] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103242,34 +108029,74 @@ func (x *BgpV6Peer_AsType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV6Peer_AsType.ProtoReflect.Descriptor instead. -func (*BgpV6Peer_AsType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{156, 0} +// Deprecated: Use PatternFlowMplsTimeToLiveMetricTag.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsTimeToLiveMetricTag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1003} } -type BgpV6Peer_AsNumberWidth struct { +func (x *PatternFlowMplsTimeToLiveMetricTag) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *PatternFlowMplsTimeToLiveMetricTag) GetOffset() uint32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *PatternFlowMplsTimeToLiveMetricTag) GetLength() uint32 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +// Time to live +type PatternFlowMplsTimeToLive struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowMplsTimeToLive_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowMplsTimeToLive_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 64 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [64] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowMplsTimeToLiveCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowMplsTimeToLiveCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` + // One or more metric tags can be used to enable tracking portion of or all bits in + // a corresponding header field for metrics per each applicable value. These would appear + // as tagged metrics in corresponding flow metrics. + MetricTags []*PatternFlowMplsTimeToLiveMetricTag `protobuf:"bytes,7,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty"` } -func (x *BgpV6Peer_AsNumberWidth) Reset() { - *x = BgpV6Peer_AsNumberWidth{} +func (x *PatternFlowMplsTimeToLive) Reset() { + *x = PatternFlowMplsTimeToLive{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1022] + mi := &file_otg_proto_msgTypes[1004] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV6Peer_AsNumberWidth) String() string { +func (x *PatternFlowMplsTimeToLive) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV6Peer_AsNumberWidth) ProtoMessage() {} +func (*PatternFlowMplsTimeToLive) ProtoMessage() {} -func (x *BgpV6Peer_AsNumberWidth) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1022] +func (x *PatternFlowMplsTimeToLive) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1004] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103280,72 +108107,87 @@ func (x *BgpV6Peer_AsNumberWidth) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV6Peer_AsNumberWidth.ProtoReflect.Descriptor instead. -func (*BgpV6Peer_AsNumberWidth) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{156, 1} +// Deprecated: Use PatternFlowMplsTimeToLive.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsTimeToLive) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1004} } -type BgpV6EthernetSegment_ActiveMode struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowMplsTimeToLive) GetChoice() PatternFlowMplsTimeToLive_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowMplsTimeToLive_Choice_unspecified } -func (x *BgpV6EthernetSegment_ActiveMode) Reset() { - *x = BgpV6EthernetSegment_ActiveMode{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1023] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowMplsTimeToLive) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *BgpV6EthernetSegment_ActiveMode) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowMplsTimeToLive) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*BgpV6EthernetSegment_ActiveMode) ProtoMessage() {} +func (x *PatternFlowMplsTimeToLive) GetIncrement() *PatternFlowMplsTimeToLiveCounter { + if x != nil { + return x.Increment + } + return nil +} -func (x *BgpV6EthernetSegment_ActiveMode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1023] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowMplsTimeToLive) GetDecrement() *PatternFlowMplsTimeToLiveCounter { + if x != nil { + return x.Decrement } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpV6EthernetSegment_ActiveMode.ProtoReflect.Descriptor instead. -func (*BgpV6EthernetSegment_ActiveMode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{159, 0} +func (x *PatternFlowMplsTimeToLive) GetMetricTags() []*PatternFlowMplsTimeToLiveMetricTag { + if x != nil { + return x.MetricTags + } + return nil } -type BgpV6EvpnEvis_Choice struct { +// integer counter pattern +type PatternFlowSnmpv2CVersionCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 1 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *BgpV6EvpnEvis_Choice) Reset() { - *x = BgpV6EvpnEvis_Choice{} +func (x *PatternFlowSnmpv2CVersionCounter) Reset() { + *x = PatternFlowSnmpv2CVersionCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1024] + mi := &file_otg_proto_msgTypes[1005] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV6EvpnEvis_Choice) String() string { +func (x *PatternFlowSnmpv2CVersionCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV6EvpnEvis_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CVersionCounter) ProtoMessage() {} -func (x *BgpV6EvpnEvis_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1024] +func (x *PatternFlowSnmpv2CVersionCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1005] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103356,34 +108198,70 @@ func (x *BgpV6EvpnEvis_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV6EvpnEvis_Choice.ProtoReflect.Descriptor instead. -func (*BgpV6EvpnEvis_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{160, 0} +// Deprecated: Use PatternFlowSnmpv2CVersionCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVersionCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1005} } -type BgpV6EviVxlan_ReplicationType struct { +func (x *PatternFlowSnmpv2CVersionCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowSnmpv2CVersionCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowSnmpv2CVersionCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Version +type PatternFlowSnmpv2CVersion struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowSnmpv2CVersion_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CVersion_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 1 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [1] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowSnmpv2CVersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowSnmpv2CVersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *BgpV6EviVxlan_ReplicationType) Reset() { - *x = BgpV6EviVxlan_ReplicationType{} +func (x *PatternFlowSnmpv2CVersion) Reset() { + *x = PatternFlowSnmpv2CVersion{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1025] + mi := &file_otg_proto_msgTypes[1006] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpV6EviVxlan_ReplicationType) String() string { +func (x *PatternFlowSnmpv2CVersion) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpV6EviVxlan_ReplicationType) ProtoMessage() {} +func (*PatternFlowSnmpv2CVersion) ProtoMessage() {} -func (x *BgpV6EviVxlan_ReplicationType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1025] +func (x *PatternFlowSnmpv2CVersion) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1006] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103394,72 +108272,80 @@ func (x *BgpV6EviVxlan_ReplicationType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpV6EviVxlan_ReplicationType.ProtoReflect.Descriptor instead. -func (*BgpV6EviVxlan_ReplicationType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{161, 0} +// Deprecated: Use PatternFlowSnmpv2CVersion.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVersion) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1006} } -type VxlanV4TunnelDestinationIPMode_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowSnmpv2CVersion) GetChoice() PatternFlowSnmpv2CVersion_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowSnmpv2CVersion_Choice_unspecified } -func (x *VxlanV4TunnelDestinationIPMode_Choice) Reset() { - *x = VxlanV4TunnelDestinationIPMode_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1026] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowSnmpv2CVersion) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *VxlanV4TunnelDestinationIPMode_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowSnmpv2CVersion) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*VxlanV4TunnelDestinationIPMode_Choice) ProtoMessage() {} - -func (x *VxlanV4TunnelDestinationIPMode_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1026] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowSnmpv2CVersion) GetIncrement() *PatternFlowSnmpv2CVersionCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use VxlanV4TunnelDestinationIPMode_Choice.ProtoReflect.Descriptor instead. -func (*VxlanV4TunnelDestinationIPMode_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{166, 0} +func (x *PatternFlowSnmpv2CVersion) GetDecrement() *PatternFlowSnmpv2CVersionCounter { + if x != nil { + return x.Decrement + } + return nil } -type VxlanV6TunnelDestinationIPMode_Choice struct { +// integer counter pattern +type PatternFlowSnmpv2CPDURequestIdCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *int32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *int32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *int32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *VxlanV6TunnelDestinationIPMode_Choice) Reset() { - *x = VxlanV6TunnelDestinationIPMode_Choice{} +func (x *PatternFlowSnmpv2CPDURequestIdCounter) Reset() { + *x = PatternFlowSnmpv2CPDURequestIdCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1027] + mi := &file_otg_proto_msgTypes[1007] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VxlanV6TunnelDestinationIPMode_Choice) String() string { +func (x *PatternFlowSnmpv2CPDURequestIdCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VxlanV6TunnelDestinationIPMode_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CPDURequestIdCounter) ProtoMessage() {} -func (x *VxlanV6TunnelDestinationIPMode_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1027] +func (x *PatternFlowSnmpv2CPDURequestIdCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1007] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103470,34 +108356,75 @@ func (x *VxlanV6TunnelDestinationIPMode_Choice) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use VxlanV6TunnelDestinationIPMode_Choice.ProtoReflect.Descriptor instead. -func (*VxlanV6TunnelDestinationIPMode_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{167, 0} +// Deprecated: Use PatternFlowSnmpv2CPDURequestIdCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CPDURequestIdCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1007} } -type RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle struct { +func (x *PatternFlowSnmpv2CPDURequestIdCounter) GetStart() int32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowSnmpv2CPDURequestIdCounter) GetStep() int32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowSnmpv2CPDURequestIdCounter) GetCount() int32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Identifies a particular SNMP request. +// This index is echoed back in the response from the SNMP agent, +// allowing the SNMP manager to match an incoming response to the appropriate request. +// +// - Encoding of this field follows ASN.1 X.690(section 8.3) specification. +// Refer: http://www.itu.int/ITU-T/asn1/ +type PatternFlowSnmpv2CPDURequestId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowSnmpv2CPDURequestId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CPDURequestId_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *int32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []int32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowSnmpv2CPDURequestIdCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowSnmpv2CPDURequestIdCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle) Reset() { - *x = RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle{} +func (x *PatternFlowSnmpv2CPDURequestId) Reset() { + *x = PatternFlowSnmpv2CPDURequestId{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1028] + mi := &file_otg_proto_msgTypes[1008] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle) String() string { +func (x *PatternFlowSnmpv2CPDURequestId) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle) ProtoMessage() {} +func (*PatternFlowSnmpv2CPDURequestId) ProtoMessage() {} -func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1028] +func (x *PatternFlowSnmpv2CPDURequestId) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1008] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103508,72 +108435,80 @@ func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle.ProtoReflect.Descriptor instead. -func (*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{178, 0} +// Deprecated: Use PatternFlowSnmpv2CPDURequestId.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CPDURequestId) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1008} } -type RsvpEro_PrependNeighborIp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowSnmpv2CPDURequestId) GetChoice() PatternFlowSnmpv2CPDURequestId_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowSnmpv2CPDURequestId_Choice_unspecified } -func (x *RsvpEro_PrependNeighborIp) Reset() { - *x = RsvpEro_PrependNeighborIp{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1029] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowSnmpv2CPDURequestId) GetValue() int32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *RsvpEro_PrependNeighborIp) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowSnmpv2CPDURequestId) GetValues() []int32 { + if x != nil { + return x.Values + } + return nil } -func (*RsvpEro_PrependNeighborIp) ProtoMessage() {} - -func (x *RsvpEro_PrependNeighborIp) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1029] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowSnmpv2CPDURequestId) GetIncrement() *PatternFlowSnmpv2CPDURequestIdCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use RsvpEro_PrependNeighborIp.ProtoReflect.Descriptor instead. -func (*RsvpEro_PrependNeighborIp) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{184, 0} +func (x *PatternFlowSnmpv2CPDURequestId) GetDecrement() *PatternFlowSnmpv2CPDURequestIdCounter { + if x != nil { + return x.Decrement + } + return nil } -type RsvpEroSubobject_Type struct { +// integer counter pattern +type PatternFlowSnmpv2CPDUErrorIndexCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *RsvpEroSubobject_Type) Reset() { - *x = RsvpEroSubobject_Type{} +func (x *PatternFlowSnmpv2CPDUErrorIndexCounter) Reset() { + *x = PatternFlowSnmpv2CPDUErrorIndexCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1030] + mi := &file_otg_proto_msgTypes[1009] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RsvpEroSubobject_Type) String() string { +func (x *PatternFlowSnmpv2CPDUErrorIndexCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpEroSubobject_Type) ProtoMessage() {} +func (*PatternFlowSnmpv2CPDUErrorIndexCounter) ProtoMessage() {} -func (x *RsvpEroSubobject_Type) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1030] +func (x *PatternFlowSnmpv2CPDUErrorIndexCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1009] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103584,34 +108519,71 @@ func (x *RsvpEroSubobject_Type) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpEroSubobject_Type.ProtoReflect.Descriptor instead. -func (*RsvpEroSubobject_Type) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{185, 0} +// Deprecated: Use PatternFlowSnmpv2CPDUErrorIndexCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CPDUErrorIndexCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1009} } -type RsvpEroSubobject_HopType struct { +func (x *PatternFlowSnmpv2CPDUErrorIndexCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowSnmpv2CPDUErrorIndexCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowSnmpv2CPDUErrorIndexCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// When Error Status is non-zero, this field contains a pointer that specifies which +// object generated the error. Always zero in a request. +type PatternFlowSnmpv2CPDUErrorIndex struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowSnmpv2CPDUErrorIndexCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowSnmpv2CPDUErrorIndexCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *RsvpEroSubobject_HopType) Reset() { - *x = RsvpEroSubobject_HopType{} +func (x *PatternFlowSnmpv2CPDUErrorIndex) Reset() { + *x = PatternFlowSnmpv2CPDUErrorIndex{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1031] + mi := &file_otg_proto_msgTypes[1010] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RsvpEroSubobject_HopType) String() string { +func (x *PatternFlowSnmpv2CPDUErrorIndex) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpEroSubobject_HopType) ProtoMessage() {} +func (*PatternFlowSnmpv2CPDUErrorIndex) ProtoMessage() {} -func (x *RsvpEroSubobject_HopType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1031] +func (x *PatternFlowSnmpv2CPDUErrorIndex) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1010] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103622,72 +108594,80 @@ func (x *RsvpEroSubobject_HopType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpEroSubobject_HopType.ProtoReflect.Descriptor instead. -func (*RsvpEroSubobject_HopType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{185, 1} +// Deprecated: Use PatternFlowSnmpv2CPDUErrorIndex.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CPDUErrorIndex) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1010} } -type FlowTxRx_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowSnmpv2CPDUErrorIndex) GetChoice() PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowSnmpv2CPDUErrorIndex_Choice_unspecified } -func (x *FlowTxRx_Choice) Reset() { - *x = FlowTxRx_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1032] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowSnmpv2CPDUErrorIndex) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *FlowTxRx_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowSnmpv2CPDUErrorIndex) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*FlowTxRx_Choice) ProtoMessage() {} - -func (x *FlowTxRx_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1032] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowSnmpv2CPDUErrorIndex) GetIncrement() *PatternFlowSnmpv2CPDUErrorIndexCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowTxRx_Choice.ProtoReflect.Descriptor instead. -func (*FlowTxRx_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{187, 0} +func (x *PatternFlowSnmpv2CPDUErrorIndex) GetDecrement() *PatternFlowSnmpv2CPDUErrorIndexCounter { + if x != nil { + return x.Decrement + } + return nil } -type FlowRouter_Mode struct { +// integer counter pattern +type PatternFlowSnmpv2CBulkPDURequestIdCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *int32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *int32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *int32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowRouter_Mode) Reset() { - *x = FlowRouter_Mode{} +func (x *PatternFlowSnmpv2CBulkPDURequestIdCounter) Reset() { + *x = PatternFlowSnmpv2CBulkPDURequestIdCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1033] + mi := &file_otg_proto_msgTypes[1011] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRouter_Mode) String() string { +func (x *PatternFlowSnmpv2CBulkPDURequestIdCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRouter_Mode) ProtoMessage() {} +func (*PatternFlowSnmpv2CBulkPDURequestIdCounter) ProtoMessage() {} -func (x *FlowRouter_Mode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1033] +func (x *PatternFlowSnmpv2CBulkPDURequestIdCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1011] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103698,34 +108678,75 @@ func (x *FlowRouter_Mode) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRouter_Mode.ProtoReflect.Descriptor instead. -func (*FlowRouter_Mode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{189, 0} +// Deprecated: Use PatternFlowSnmpv2CBulkPDURequestIdCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CBulkPDURequestIdCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1011} } -type FlowHeader_Choice struct { +func (x *PatternFlowSnmpv2CBulkPDURequestIdCounter) GetStart() int32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowSnmpv2CBulkPDURequestIdCounter) GetStep() int32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowSnmpv2CBulkPDURequestIdCounter) GetCount() int32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Identifies a particular SNMP request. +// This index is echoed back in the response from the SNMP agent, +// allowing the SNMP manager to match an incoming response to the appropriate request. +// +// - Encoding of this field follows ASN.1 X.690(section 8.3) specification. +// Refer: http://www.itu.int/ITU-T/asn1/ +type PatternFlowSnmpv2CBulkPDURequestId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *int32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []int32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowSnmpv2CBulkPDURequestIdCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowSnmpv2CBulkPDURequestIdCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowHeader_Choice) Reset() { - *x = FlowHeader_Choice{} +func (x *PatternFlowSnmpv2CBulkPDURequestId) Reset() { + *x = PatternFlowSnmpv2CBulkPDURequestId{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1034] + mi := &file_otg_proto_msgTypes[1012] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowHeader_Choice) String() string { +func (x *PatternFlowSnmpv2CBulkPDURequestId) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowHeader_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CBulkPDURequestId) ProtoMessage() {} -func (x *FlowHeader_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1034] +func (x *PatternFlowSnmpv2CBulkPDURequestId) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1012] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103736,72 +108757,81 @@ func (x *FlowHeader_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowHeader_Choice.ProtoReflect.Descriptor instead. -func (*FlowHeader_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{190, 0} +// Deprecated: Use PatternFlowSnmpv2CBulkPDURequestId.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CBulkPDURequestId) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1012} } -type FlowIpv4Options_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowSnmpv2CBulkPDURequestId) GetChoice() PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowSnmpv2CBulkPDURequestId_Choice_unspecified } -func (x *FlowIpv4Options_Choice) Reset() { - *x = FlowIpv4Options_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1035] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowSnmpv2CBulkPDURequestId) GetValue() int32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *FlowIpv4Options_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowSnmpv2CBulkPDURequestId) GetValues() []int32 { + if x != nil { + return x.Values + } + return nil } -func (*FlowIpv4Options_Choice) ProtoMessage() {} - -func (x *FlowIpv4Options_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1035] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowSnmpv2CBulkPDURequestId) GetIncrement() *PatternFlowSnmpv2CBulkPDURequestIdCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowIpv4Options_Choice.ProtoReflect.Descriptor instead. -func (*FlowIpv4Options_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{197, 0} +func (x *PatternFlowSnmpv2CBulkPDURequestId) GetDecrement() *PatternFlowSnmpv2CBulkPDURequestIdCounter { + if x != nil { + return x.Decrement + } + return nil } -type FlowIpv4OptionsCustomLength_Choice struct { +// One variable binding in the Response-PDU is requested for the first non_repeaters +// variable bindings in the GetBulkRequest. +type PatternFlowSnmpv2CBulkPDUNonRepeaters struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` } -func (x *FlowIpv4OptionsCustomLength_Choice) Reset() { - *x = FlowIpv4OptionsCustomLength_Choice{} +func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters) Reset() { + *x = PatternFlowSnmpv2CBulkPDUNonRepeaters{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1036] + mi := &file_otg_proto_msgTypes[1013] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIpv4OptionsCustomLength_Choice) String() string { +func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIpv4OptionsCustomLength_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CBulkPDUNonRepeaters) ProtoMessage() {} -func (x *FlowIpv4OptionsCustomLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1036] +func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1013] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103812,34 +108842,66 @@ func (x *FlowIpv4OptionsCustomLength_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use FlowIpv4OptionsCustomLength_Choice.ProtoReflect.Descriptor instead. -func (*FlowIpv4OptionsCustomLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{200, 0} +// Deprecated: Use PatternFlowSnmpv2CBulkPDUNonRepeaters.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CBulkPDUNonRepeaters) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1013} } -type FlowIpv4Priority_Choice struct { +func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters) GetChoice() PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_unspecified +} + +func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value + } + return 0 +} + +func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil +} + +// integer counter pattern +type PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowIpv4Priority_Choice) Reset() { - *x = FlowIpv4Priority_Choice{} +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) Reset() { + *x = PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1037] + mi := &file_otg_proto_msgTypes[1014] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIpv4Priority_Choice) String() string { +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIpv4Priority_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) ProtoMessage() {} -func (x *FlowIpv4Priority_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1037] +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1014] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103850,34 +108912,72 @@ func (x *FlowIpv4Priority_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIpv4Priority_Choice.ProtoReflect.Descriptor instead. -func (*FlowIpv4Priority_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{201, 0} +// Deprecated: Use PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1014} } -type FlowIcmp_Choice struct { +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// A maximum of max_repetitions variable bindings are requested in the Response-PDU +// for each of the remaining variable bindings in the GetBulkRequest after the non_repeaters +// variable bindings. +type PatternFlowSnmpv2CBulkPDUMaxRepetitions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowIcmp_Choice) Reset() { - *x = FlowIcmp_Choice{} +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) Reset() { + *x = PatternFlowSnmpv2CBulkPDUMaxRepetitions{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1038] + mi := &file_otg_proto_msgTypes[1015] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowIcmp_Choice) String() string { +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowIcmp_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CBulkPDUMaxRepetitions) ProtoMessage() {} -func (x *FlowIcmp_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1038] +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1015] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103888,72 +108988,80 @@ func (x *FlowIcmp_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowIcmp_Choice.ProtoReflect.Descriptor instead. -func (*FlowIcmp_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{214, 0} +// Deprecated: Use PatternFlowSnmpv2CBulkPDUMaxRepetitions.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CBulkPDUMaxRepetitions) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1015} } -type FlowIcmpv6_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) GetChoice() PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_unspecified } -func (x *FlowIcmpv6_Choice) Reset() { - *x = FlowIcmpv6_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1039] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *FlowIcmpv6_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*FlowIcmpv6_Choice) ProtoMessage() {} - -func (x *FlowIcmpv6_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1039] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) GetIncrement() *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowIcmpv6_Choice.ProtoReflect.Descriptor instead. -func (*FlowIcmpv6_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{216, 0} +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions) GetDecrement() *PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter { + if x != nil { + return x.Decrement + } + return nil } -type FlowSnmpv2CData_Choice struct { +// integer counter pattern +type PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *int32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *int32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *int32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowSnmpv2CData_Choice) Reset() { - *x = FlowSnmpv2CData_Choice{} +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1040] + mi := &file_otg_proto_msgTypes[1016] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowSnmpv2CData_Choice) String() string { +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSnmpv2CData_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) ProtoMessage() {} -func (x *FlowSnmpv2CData_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1040] +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1016] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -103964,34 +109072,70 @@ func (x *FlowSnmpv2CData_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSnmpv2CData_Choice.ProtoReflect.Descriptor instead. -func (*FlowSnmpv2CData_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{222, 0} +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1016} } -type FlowSnmpv2CPDU_ErrorStatus struct { +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) GetStart() int32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) GetStep() int32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) GetCount() int32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Integer value returned for the requested OID. +type PatternFlowSnmpv2CVariableBindingValueIntegerValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *int32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []int32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowSnmpv2CPDU_ErrorStatus) Reset() { - *x = FlowSnmpv2CPDU_ErrorStatus{} +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueIntegerValue{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1041] + mi := &file_otg_proto_msgTypes[1017] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowSnmpv2CPDU_ErrorStatus) String() string { +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSnmpv2CPDU_ErrorStatus) ProtoMessage() {} +func (*PatternFlowSnmpv2CVariableBindingValueIntegerValue) ProtoMessage() {} -func (x *FlowSnmpv2CPDU_ErrorStatus) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1041] +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1017] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104002,72 +109146,80 @@ func (x *FlowSnmpv2CPDU_ErrorStatus) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSnmpv2CPDU_ErrorStatus.ProtoReflect.Descriptor instead. -func (*FlowSnmpv2CPDU_ErrorStatus) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{223, 0} +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueIntegerValue.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueIntegerValue) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1017} } -type FlowSnmpv2CVariableBindingValue_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) GetChoice() PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_unspecified } -func (x *FlowSnmpv2CVariableBindingValue_Choice) Reset() { - *x = FlowSnmpv2CVariableBindingValue_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1042] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) GetValue() int32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *FlowSnmpv2CVariableBindingValue_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) GetValues() []int32 { + if x != nil { + return x.Values + } + return nil } -func (*FlowSnmpv2CVariableBindingValue_Choice) ProtoMessage() {} - -func (x *FlowSnmpv2CVariableBindingValue_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1042] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) GetIncrement() *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowSnmpv2CVariableBindingValue_Choice.ProtoReflect.Descriptor instead. -func (*FlowSnmpv2CVariableBindingValue_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{226, 0} +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue) GetDecrement() *PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter { + if x != nil { + return x.Decrement + } + return nil } -type FlowSnmpv2CVariableBindingStringValue_Choice struct { +// ipv4 counter pattern +type PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0.0.0.0 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 0.0.0.1 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowSnmpv2CVariableBindingStringValue_Choice) Reset() { - *x = FlowSnmpv2CVariableBindingStringValue_Choice{} +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1043] + mi := &file_otg_proto_msgTypes[1018] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowSnmpv2CVariableBindingStringValue_Choice) String() string { +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSnmpv2CVariableBindingStringValue_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) ProtoMessage() {} -func (x *FlowSnmpv2CVariableBindingStringValue_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1043] +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1018] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104078,34 +109230,70 @@ func (x *FlowSnmpv2CVariableBindingStringValue_Choice) ProtoReflect() protorefle return mi.MessageOf(x) } -// Deprecated: Use FlowSnmpv2CVariableBindingStringValue_Choice.ProtoReflect.Descriptor instead. -func (*FlowSnmpv2CVariableBindingStringValue_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{227, 0} +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1018} } -type FlowRsvp_Flag struct { +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) GetStart() string { + if x != nil && x.Start != nil { + return *x.Start + } + return "" +} + +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) GetStep() string { + if x != nil && x.Step != nil { + return *x.Step + } + return "" +} + +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// IPv4 address returned for the requested OID. +type PatternFlowSnmpv2CVariableBindingValueIpAddressValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0.0.0.0 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = ['0.0.0.0'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowRsvp_Flag) Reset() { - *x = FlowRsvp_Flag{} +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueIpAddressValue{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1044] + mi := &file_otg_proto_msgTypes[1019] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRsvp_Flag) String() string { +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRsvp_Flag) ProtoMessage() {} +func (*PatternFlowSnmpv2CVariableBindingValueIpAddressValue) ProtoMessage() {} -func (x *FlowRsvp_Flag) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1044] +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1019] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104116,72 +109304,80 @@ func (x *FlowRsvp_Flag) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRsvp_Flag.ProtoReflect.Descriptor instead. -func (*FlowRsvp_Flag) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{228, 0} +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueIpAddressValue.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueIpAddressValue) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1019} } -type FlowRSVPLength_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) GetChoice() PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_unspecified } -func (x *FlowRSVPLength_Choice) Reset() { - *x = FlowRSVPLength_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1045] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } + return "" } -func (x *FlowRSVPLength_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) GetValues() []string { + if x != nil { + return x.Values + } + return nil } -func (*FlowRSVPLength_Choice) ProtoMessage() {} - -func (x *FlowRSVPLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1045] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) GetIncrement() *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowRSVPLength_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{229, 0} +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue) GetDecrement() *PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter { + if x != nil { + return x.Decrement + } + return nil } -type FlowRSVPMessage_Choice struct { +// integer counter pattern +type PatternFlowSnmpv2CVariableBindingValueCounterValueCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowRSVPMessage_Choice) Reset() { - *x = FlowRSVPMessage_Choice{} +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueCounterValueCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1046] + mi := &file_otg_proto_msgTypes[1020] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPMessage_Choice) String() string { +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPMessage_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) ProtoMessage() {} -func (x *FlowRSVPMessage_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1046] +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1020] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104192,72 +109388,70 @@ func (x *FlowRSVPMessage_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPMessage_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPMessage_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{230, 0} +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueCounterValueCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1020} } -type FlowRSVPObjectLength_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *FlowRSVPObjectLength_Choice) Reset() { - *x = FlowRSVPObjectLength_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1047] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start } + return 0 } -func (x *FlowRSVPObjectLength_Choice) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FlowRSVPObjectLength_Choice) ProtoMessage() {} - -func (x *FlowRSVPObjectLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1047] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use FlowRSVPObjectLength_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPObjectLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{233, 0} +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 } -type FlowRSVPPathObjectsClass_Choice struct { +// Counter returned for the requested OID. +type PatternFlowSnmpv2CVariableBindingValueCounterValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowRSVPPathObjectsClass_Choice) Reset() { - *x = FlowRSVPPathObjectsClass_Choice{} +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueCounterValue{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1048] + mi := &file_otg_proto_msgTypes[1021] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathObjectsClass_Choice) String() string { +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsClass_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CVariableBindingValueCounterValue) ProtoMessage() {} -func (x *FlowRSVPPathObjectsClass_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1048] +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1021] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104268,72 +109462,80 @@ func (x *FlowRSVPPathObjectsClass_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsClass_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsClass_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{234, 0} +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueCounterValue.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueCounterValue) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1021} } -type FlowRSVPPathObjectsSessionCType_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) GetChoice() PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_unspecified } -func (x *FlowRSVPPathObjectsSessionCType_Choice) Reset() { - *x = FlowRSVPPathObjectsSessionCType_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1049] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *FlowRSVPPathObjectsSessionCType_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*FlowRSVPPathObjectsSessionCType_Choice) ProtoMessage() {} - -func (x *FlowRSVPPathObjectsSessionCType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1049] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) GetIncrement() *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowRSVPPathObjectsSessionCType_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsSessionCType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{236, 0} +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue) GetDecrement() *PatternFlowSnmpv2CVariableBindingValueCounterValueCounter { + if x != nil { + return x.Decrement + } + return nil } -type FlowRSVPPathSessionExtTunnelId_Choice struct { +// integer counter pattern +type PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowRSVPPathSessionExtTunnelId_Choice) Reset() { - *x = FlowRSVPPathSessionExtTunnelId_Choice{} +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1050] + mi := &file_otg_proto_msgTypes[1022] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathSessionExtTunnelId_Choice) String() string { +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathSessionExtTunnelId_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) ProtoMessage() {} -func (x *FlowRSVPPathSessionExtTunnelId_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1050] +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1022] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104344,34 +109546,70 @@ func (x *FlowRSVPPathSessionExtTunnelId_Choice) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathSessionExtTunnelId_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathSessionExtTunnelId_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{238, 0} +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1022} } -type FlowRSVPPathObjectsRsvpHopCType_Choice struct { +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Timeticks returned for the requested OID. +type PatternFlowSnmpv2CVariableBindingValueTimeticksValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowRSVPPathObjectsRsvpHopCType_Choice) Reset() { - *x = FlowRSVPPathObjectsRsvpHopCType_Choice{} +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueTimeticksValue{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1051] + mi := &file_otg_proto_msgTypes[1023] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathObjectsRsvpHopCType_Choice) String() string { +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsRsvpHopCType_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CVariableBindingValueTimeticksValue) ProtoMessage() {} -func (x *FlowRSVPPathObjectsRsvpHopCType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1051] +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1023] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104382,72 +109620,80 @@ func (x *FlowRSVPPathObjectsRsvpHopCType_Choice) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsRsvpHopCType_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsRsvpHopCType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{240, 0} +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueTimeticksValue.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueTimeticksValue) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1023} } -type FlowRSVPPathObjectsTimeValuesCType_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) GetChoice() PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_unspecified } -func (x *FlowRSVPPathObjectsTimeValuesCType_Choice) Reset() { - *x = FlowRSVPPathObjectsTimeValuesCType_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1052] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *FlowRSVPPathObjectsTimeValuesCType_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*FlowRSVPPathObjectsTimeValuesCType_Choice) ProtoMessage() {} - -func (x *FlowRSVPPathObjectsTimeValuesCType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1052] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) GetIncrement() *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowRSVPPathObjectsTimeValuesCType_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsTimeValuesCType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{243, 0} +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue) GetDecrement() *PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter { + if x != nil { + return x.Decrement + } + return nil } -type FlowRSVPPathObjectsClassExplicitRouteCType_Choice struct { +// integer counter pattern +type PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint64 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint64 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint64 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowRSVPPathObjectsClassExplicitRouteCType_Choice) Reset() { - *x = FlowRSVPPathObjectsClassExplicitRouteCType_Choice{} +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1053] + mi := &file_otg_proto_msgTypes[1024] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathObjectsClassExplicitRouteCType_Choice) String() string { +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsClassExplicitRouteCType_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) ProtoMessage() {} -func (x *FlowRSVPPathObjectsClassExplicitRouteCType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1053] +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1024] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104458,34 +109704,70 @@ func (x *FlowRSVPPathObjectsClassExplicitRouteCType_Choice) ProtoReflect() proto return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsClassExplicitRouteCType_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsClassExplicitRouteCType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{246, 0} +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1024} } -type FlowRSVPType1ExplicitRouteSubobjectsType_Choice struct { +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) GetStart() uint64 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) GetStep() uint64 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) GetCount() uint64 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Big counter returned for the requested OID. +type PatternFlowSnmpv2CVariableBindingValueBigCounterValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint64 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint64 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowRSVPType1ExplicitRouteSubobjectsType_Choice) Reset() { - *x = FlowRSVPType1ExplicitRouteSubobjectsType_Choice{} +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueBigCounterValue{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1054] + mi := &file_otg_proto_msgTypes[1025] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPType1ExplicitRouteSubobjectsType_Choice) String() string { +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPType1ExplicitRouteSubobjectsType_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CVariableBindingValueBigCounterValue) ProtoMessage() {} -func (x *FlowRSVPType1ExplicitRouteSubobjectsType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1054] +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1025] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104496,72 +109778,80 @@ func (x *FlowRSVPType1ExplicitRouteSubobjectsType_Choice) ProtoReflect() protore return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPType1ExplicitRouteSubobjectsType_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPType1ExplicitRouteSubobjectsType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{249, 0} +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueBigCounterValue.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueBigCounterValue) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1025} } -type FlowRSVPExplicitRouteLength_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) GetChoice() PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_unspecified } -func (x *FlowRSVPExplicitRouteLength_Choice) Reset() { - *x = FlowRSVPExplicitRouteLength_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1055] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) GetValue() uint64 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *FlowRSVPExplicitRouteLength_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) GetValues() []uint64 { + if x != nil { + return x.Values + } + return nil } -func (*FlowRSVPExplicitRouteLength_Choice) ProtoMessage() {} - -func (x *FlowRSVPExplicitRouteLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1055] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) GetIncrement() *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowRSVPExplicitRouteLength_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPExplicitRouteLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{252, 0} +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue) GetDecrement() *PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter { + if x != nil { + return x.Decrement + } + return nil } -type FlowRSVPExplicitRouteASNumberLength_Choice struct { +// integer counter pattern +type PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowRSVPExplicitRouteASNumberLength_Choice) Reset() { - *x = FlowRSVPExplicitRouteASNumberLength_Choice{} +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1056] + mi := &file_otg_proto_msgTypes[1026] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPExplicitRouteASNumberLength_Choice) String() string { +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPExplicitRouteASNumberLength_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) ProtoMessage() {} -func (x *FlowRSVPExplicitRouteASNumberLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1056] +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1026] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104572,34 +109862,70 @@ func (x *FlowRSVPExplicitRouteASNumberLength_Choice) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPExplicitRouteASNumberLength_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPExplicitRouteASNumberLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{253, 0} +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1026} } -type FlowRSVPPathObjectsLabelRequestCType_Choice struct { +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Unsigned integer value returned for the requested OID. +type PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowRSVPPathObjectsLabelRequestCType_Choice) Reset() { - *x = FlowRSVPPathObjectsLabelRequestCType_Choice{} +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1057] + mi := &file_otg_proto_msgTypes[1027] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathObjectsLabelRequestCType_Choice) String() string { +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsLabelRequestCType_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) ProtoMessage() {} -func (x *FlowRSVPPathObjectsLabelRequestCType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1057] +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1027] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104610,72 +109936,80 @@ func (x *FlowRSVPPathObjectsLabelRequestCType_Choice) ProtoReflect() protoreflec return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsLabelRequestCType_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsLabelRequestCType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{255, 0} +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1027} } -type FlowRSVPPathObjectsSessionAttributeCType_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) GetChoice() PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_unspecified } -func (x *FlowRSVPPathObjectsSessionAttributeCType_Choice) Reset() { - *x = FlowRSVPPathObjectsSessionAttributeCType_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1058] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *FlowRSVPPathObjectsSessionAttributeCType_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*FlowRSVPPathObjectsSessionAttributeCType_Choice) ProtoMessage() {} - -func (x *FlowRSVPPathObjectsSessionAttributeCType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1058] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) GetIncrement() *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowRSVPPathObjectsSessionAttributeCType_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsSessionAttributeCType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{258, 0} +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) GetDecrement() *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter { + if x != nil { + return x.Decrement + } + return nil } -type FlowRSVPLspTunnelFlag_Choice struct { +// integer counter pattern +type PatternFlowSnmpv2CCommonRequestIdCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *int32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *int32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *int32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowRSVPLspTunnelFlag_Choice) Reset() { - *x = FlowRSVPLspTunnelFlag_Choice{} +func (x *PatternFlowSnmpv2CCommonRequestIdCounter) Reset() { + *x = PatternFlowSnmpv2CCommonRequestIdCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1059] + mi := &file_otg_proto_msgTypes[1028] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPLspTunnelFlag_Choice) String() string { +func (x *PatternFlowSnmpv2CCommonRequestIdCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPLspTunnelFlag_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CCommonRequestIdCounter) ProtoMessage() {} -func (x *FlowRSVPLspTunnelFlag_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1059] +func (x *PatternFlowSnmpv2CCommonRequestIdCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1028] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104686,34 +110020,75 @@ func (x *FlowRSVPLspTunnelFlag_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPLspTunnelFlag_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPLspTunnelFlag_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{261, 0} +// Deprecated: Use PatternFlowSnmpv2CCommonRequestIdCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CCommonRequestIdCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1028} } -type FlowRSVPSessionAttributeNameLength_Choice struct { +func (x *PatternFlowSnmpv2CCommonRequestIdCounter) GetStart() int32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowSnmpv2CCommonRequestIdCounter) GetStep() int32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowSnmpv2CCommonRequestIdCounter) GetCount() int32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Identifies a particular SNMP request. +// This index is echoed back in the response from the SNMP agent, +// allowing the SNMP manager to match an incoming response to the appropriate request. +// +// - Encoding of this field follows ASN.1 X.690(section 8.3) specification. +// Refer: http://www.itu.int/ITU-T/asn1/ +type PatternFlowSnmpv2CCommonRequestId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowSnmpv2CCommonRequestId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowSnmpv2CCommonRequestId_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *int32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []int32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowSnmpv2CCommonRequestIdCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowSnmpv2CCommonRequestIdCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowRSVPSessionAttributeNameLength_Choice) Reset() { - *x = FlowRSVPSessionAttributeNameLength_Choice{} +func (x *PatternFlowSnmpv2CCommonRequestId) Reset() { + *x = PatternFlowSnmpv2CCommonRequestId{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1060] + mi := &file_otg_proto_msgTypes[1029] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPSessionAttributeNameLength_Choice) String() string { +func (x *PatternFlowSnmpv2CCommonRequestId) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPSessionAttributeNameLength_Choice) ProtoMessage() {} +func (*PatternFlowSnmpv2CCommonRequestId) ProtoMessage() {} -func (x *FlowRSVPSessionAttributeNameLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1060] +func (x *PatternFlowSnmpv2CCommonRequestId) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1029] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104724,72 +110099,81 @@ func (x *FlowRSVPSessionAttributeNameLength_Choice) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPSessionAttributeNameLength_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPSessionAttributeNameLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{262, 0} +// Deprecated: Use PatternFlowSnmpv2CCommonRequestId.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CCommonRequestId) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1029} } -type FlowRSVPPathObjectsSenderTemplateCType_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowSnmpv2CCommonRequestId) GetChoice() PatternFlowSnmpv2CCommonRequestId_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowSnmpv2CCommonRequestId_Choice_unspecified } -func (x *FlowRSVPPathObjectsSenderTemplateCType_Choice) Reset() { - *x = FlowRSVPPathObjectsSenderTemplateCType_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1061] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowSnmpv2CCommonRequestId) GetValue() int32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *FlowRSVPPathObjectsSenderTemplateCType_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowSnmpv2CCommonRequestId) GetValues() []int32 { + if x != nil { + return x.Values + } + return nil } -func (*FlowRSVPPathObjectsSenderTemplateCType_Choice) ProtoMessage() {} - -func (x *FlowRSVPPathObjectsSenderTemplateCType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1061] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowSnmpv2CCommonRequestId) GetIncrement() *PatternFlowSnmpv2CCommonRequestIdCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowRSVPPathObjectsSenderTemplateCType_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsSenderTemplateCType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{264, 0} +func (x *PatternFlowSnmpv2CCommonRequestId) GetDecrement() *PatternFlowSnmpv2CCommonRequestIdCounter { + if x != nil { + return x.Decrement + } + return nil } -type FlowRSVPPathObjectsSenderTspecCType_Choice struct { +// The one's complement of the one's complement sum of the message, with the checksum +// field replaced by zero for the purpose of computing the checksum. An all-zero value +// means that no checksum was transmitted. +type PatternFlowRsvpRsvpChecksum struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // The type of checksum + // default = Choice.Enum.generated + Choice *PatternFlowRsvpRsvpChecksum_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRsvpRsvpChecksum_Choice_Enum,oneof" json:"choice,omitempty"` + // A system generated checksum value + // default = Generated.Enum.good + Generated *PatternFlowRsvpRsvpChecksum_Generated_Enum `protobuf:"varint,2,opt,name=generated,proto3,enum=otg.PatternFlowRsvpRsvpChecksum_Generated_Enum,oneof" json:"generated,omitempty"` + // A custom checksum value + Custom *uint32 `protobuf:"varint,3,opt,name=custom,proto3,oneof" json:"custom,omitempty"` } -func (x *FlowRSVPPathObjectsSenderTspecCType_Choice) Reset() { - *x = FlowRSVPPathObjectsSenderTspecCType_Choice{} +func (x *PatternFlowRsvpRsvpChecksum) Reset() { + *x = PatternFlowRsvpRsvpChecksum{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1062] + mi := &file_otg_proto_msgTypes[1030] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathObjectsSenderTspecCType_Choice) String() string { +func (x *PatternFlowRsvpRsvpChecksum) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsSenderTspecCType_Choice) ProtoMessage() {} +func (*PatternFlowRsvpRsvpChecksum) ProtoMessage() {} -func (x *FlowRSVPPathObjectsSenderTspecCType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1062] +func (x *PatternFlowRsvpRsvpChecksum) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1030] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104800,34 +110184,66 @@ func (x *FlowRSVPPathObjectsSenderTspecCType_Choice) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsSenderTspecCType_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsSenderTspecCType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{267, 0} +// Deprecated: Use PatternFlowRsvpRsvpChecksum.ProtoReflect.Descriptor instead. +func (*PatternFlowRsvpRsvpChecksum) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1030} } -type FlowRSVPPathObjectsRecordRouteCType_Choice struct { +func (x *PatternFlowRsvpRsvpChecksum) GetChoice() PatternFlowRsvpRsvpChecksum_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRsvpRsvpChecksum_Choice_unspecified +} + +func (x *PatternFlowRsvpRsvpChecksum) GetGenerated() PatternFlowRsvpRsvpChecksum_Generated_Enum { + if x != nil && x.Generated != nil { + return *x.Generated + } + return PatternFlowRsvpRsvpChecksum_Generated_unspecified +} + +func (x *PatternFlowRsvpRsvpChecksum) GetCustom() uint32 { + if x != nil && x.Custom != nil { + return *x.Custom + } + return 0 +} + +// integer counter pattern +type PatternFlowRsvpTimeToLiveCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 64 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowRSVPPathObjectsRecordRouteCType_Choice) Reset() { - *x = FlowRSVPPathObjectsRecordRouteCType_Choice{} +func (x *PatternFlowRsvpTimeToLiveCounter) Reset() { + *x = PatternFlowRsvpTimeToLiveCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1063] + mi := &file_otg_proto_msgTypes[1031] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathObjectsRecordRouteCType_Choice) String() string { +func (x *PatternFlowRsvpTimeToLiveCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsRecordRouteCType_Choice) ProtoMessage() {} +func (*PatternFlowRsvpTimeToLiveCounter) ProtoMessage() {} -func (x *FlowRSVPPathObjectsRecordRouteCType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1063] +func (x *PatternFlowRsvpTimeToLiveCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1031] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104838,34 +110254,70 @@ func (x *FlowRSVPPathObjectsRecordRouteCType_Choice) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsRecordRouteCType_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsRecordRouteCType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{270, 0} +// Deprecated: Use PatternFlowRsvpTimeToLiveCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRsvpTimeToLiveCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1031} } -type FlowRSVPPathObjectsRecordRouteSubObjectType_Choice struct { +func (x *PatternFlowRsvpTimeToLiveCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRsvpTimeToLiveCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRsvpTimeToLiveCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// The IP time-to-live(TTL) value with which the message was sent. +type PatternFlowRsvpTimeToLive struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRsvpTimeToLive_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRsvpTimeToLive_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 64 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [64] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRsvpTimeToLiveCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRsvpTimeToLiveCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowRSVPPathObjectsRecordRouteSubObjectType_Choice) Reset() { - *x = FlowRSVPPathObjectsRecordRouteSubObjectType_Choice{} +func (x *PatternFlowRsvpTimeToLive) Reset() { + *x = PatternFlowRsvpTimeToLive{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1064] + mi := &file_otg_proto_msgTypes[1032] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathObjectsRecordRouteSubObjectType_Choice) String() string { +func (x *PatternFlowRsvpTimeToLive) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathObjectsRecordRouteSubObjectType_Choice) ProtoMessage() {} +func (*PatternFlowRsvpTimeToLive) ProtoMessage() {} -func (x *FlowRSVPPathObjectsRecordRouteSubObjectType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1064] +func (x *PatternFlowRsvpTimeToLive) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1032] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104876,72 +110328,80 @@ func (x *FlowRSVPPathObjectsRecordRouteSubObjectType_Choice) ProtoReflect() prot return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathObjectsRecordRouteSubObjectType_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathObjectsRecordRouteSubObjectType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{273, 0} +// Deprecated: Use PatternFlowRsvpTimeToLive.ProtoReflect.Descriptor instead. +func (*PatternFlowRsvpTimeToLive) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1032} } -type FlowRSVPRecordRouteIPv4Flag_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRsvpTimeToLive) GetChoice() PatternFlowRsvpTimeToLive_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRsvpTimeToLive_Choice_unspecified } -func (x *FlowRSVPRecordRouteIPv4Flag_Choice) Reset() { - *x = FlowRSVPRecordRouteIPv4Flag_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1065] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRsvpTimeToLive) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *FlowRSVPRecordRouteIPv4Flag_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRsvpTimeToLive) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*FlowRSVPRecordRouteIPv4Flag_Choice) ProtoMessage() {} - -func (x *FlowRSVPRecordRouteIPv4Flag_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1065] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRsvpTimeToLive) GetIncrement() *PatternFlowRsvpTimeToLiveCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowRSVPRecordRouteIPv4Flag_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPRecordRouteIPv4Flag_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{275, 0} +func (x *PatternFlowRsvpTimeToLive) GetDecrement() *PatternFlowRsvpTimeToLiveCounter { + if x != nil { + return x.Decrement + } + return nil } -type FlowRSVPPathRecordRouteLabel_Choice struct { +// integer counter pattern +type PatternFlowRsvpReservedCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowRSVPPathRecordRouteLabel_Choice) Reset() { - *x = FlowRSVPPathRecordRouteLabel_Choice{} +func (x *PatternFlowRsvpReservedCounter) Reset() { + *x = PatternFlowRsvpReservedCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1066] + mi := &file_otg_proto_msgTypes[1033] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPPathRecordRouteLabel_Choice) String() string { +func (x *PatternFlowRsvpReservedCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPPathRecordRouteLabel_Choice) ProtoMessage() {} +func (*PatternFlowRsvpReservedCounter) ProtoMessage() {} -func (x *FlowRSVPPathRecordRouteLabel_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1066] +func (x *PatternFlowRsvpReservedCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1033] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104952,34 +110412,70 @@ func (x *FlowRSVPPathRecordRouteLabel_Choice) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPPathRecordRouteLabel_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPPathRecordRouteLabel_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{277, 0} +// Deprecated: Use PatternFlowRsvpReservedCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRsvpReservedCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1033} } -type FlowRSVPRouteRecordLength_Choice struct { +func (x *PatternFlowRsvpReservedCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRsvpReservedCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRsvpReservedCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Reserved +type PatternFlowRsvpReserved struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRsvpReserved_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRsvpReserved_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRsvpReservedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRsvpReservedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowRSVPRouteRecordLength_Choice) Reset() { - *x = FlowRSVPRouteRecordLength_Choice{} +func (x *PatternFlowRsvpReserved) Reset() { + *x = PatternFlowRsvpReserved{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1067] + mi := &file_otg_proto_msgTypes[1034] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRSVPRouteRecordLength_Choice) String() string { +func (x *PatternFlowRsvpReserved) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRSVPRouteRecordLength_Choice) ProtoMessage() {} +func (*PatternFlowRsvpReserved) ProtoMessage() {} -func (x *FlowRSVPRouteRecordLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1067] +func (x *PatternFlowRsvpReserved) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1034] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -104990,72 +110486,80 @@ func (x *FlowRSVPRouteRecordLength_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRSVPRouteRecordLength_Choice.ProtoReflect.Descriptor instead. -func (*FlowRSVPRouteRecordLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{278, 0} +// Deprecated: Use PatternFlowRsvpReserved.ProtoReflect.Descriptor instead. +func (*PatternFlowRsvpReserved) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1034} } -type FlowSize_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRsvpReserved) GetChoice() PatternFlowRsvpReserved_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRsvpReserved_Choice_unspecified } -func (x *FlowSize_Choice) Reset() { - *x = FlowSize_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1068] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRsvpReserved) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *FlowSize_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRsvpReserved) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*FlowSize_Choice) ProtoMessage() {} - -func (x *FlowSize_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1068] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRsvpReserved) GetIncrement() *PatternFlowRsvpReservedCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowSize_Choice.ProtoReflect.Descriptor instead. -func (*FlowSize_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{280, 0} +func (x *PatternFlowRsvpReserved) GetDecrement() *PatternFlowRsvpReservedCounter { + if x != nil { + return x.Decrement + } + return nil } -type FlowSizeWeightPairs_Choice struct { +// ipv4 counter pattern +type PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0.0.0.0 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 0.0.0.1 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowSizeWeightPairs_Choice) Reset() { - *x = FlowSizeWeightPairs_Choice{} +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) Reset() { + *x = PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1069] + mi := &file_otg_proto_msgTypes[1035] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowSizeWeightPairs_Choice) String() string { +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSizeWeightPairs_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) ProtoMessage() {} -func (x *FlowSizeWeightPairs_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1069] +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1035] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105066,34 +110570,70 @@ func (x *FlowSizeWeightPairs_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSizeWeightPairs_Choice.ProtoReflect.Descriptor instead. -func (*FlowSizeWeightPairs_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{283, 0} +// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1035} } -type FlowSizeWeightPairs_Predefined struct { +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) GetStart() string { + if x != nil && x.Start != nil { + return *x.Start + } + return "" +} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) GetStep() string { + if x != nil && x.Step != nil { + return *x.Step + } + return "" +} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// IPv4 address of the egress node for the tunnel. +type PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0.0.0.0 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = ['0.0.0.0'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowSizeWeightPairs_Predefined) Reset() { - *x = FlowSizeWeightPairs_Predefined{} +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) Reset() { + *x = PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1070] + mi := &file_otg_proto_msgTypes[1036] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowSizeWeightPairs_Predefined) String() string { +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowSizeWeightPairs_Predefined) ProtoMessage() {} +func (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) ProtoMessage() {} -func (x *FlowSizeWeightPairs_Predefined) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1070] +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1036] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105104,72 +110644,80 @@ func (x *FlowSizeWeightPairs_Predefined) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowSizeWeightPairs_Predefined.ProtoReflect.Descriptor instead. -func (*FlowSizeWeightPairs_Predefined) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{283, 1} +// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1036} } -type FlowRate_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) GetChoice() PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_unspecified } -func (x *FlowRate_Choice) Reset() { - *x = FlowRate_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1071] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } + return "" } -func (x *FlowRate_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) GetValues() []string { + if x != nil { + return x.Values + } + return nil } -func (*FlowRate_Choice) ProtoMessage() {} - -func (x *FlowRate_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1071] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) GetIncrement() *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowRate_Choice.ProtoReflect.Descriptor instead. -func (*FlowRate_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{285, 0} +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) GetDecrement() *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter { + if x != nil { + return x.Decrement + } + return nil } -type FlowDuration_Choice struct { +// integer counter pattern +type PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowDuration_Choice) Reset() { - *x = FlowDuration_Choice{} +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) Reset() { + *x = PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1072] + mi := &file_otg_proto_msgTypes[1037] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowDuration_Choice) String() string { +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowDuration_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) ProtoMessage() {} -func (x *FlowDuration_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1072] +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1037] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105180,34 +110728,70 @@ func (x *FlowDuration_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowDuration_Choice.ProtoReflect.Descriptor instead. -func (*FlowDuration_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{286, 0} +// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1037} } -type FlowDelay_Choice struct { +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Reserved field, MUST be zero. +type PatternFlowRSVPPathSessionLspTunnelIpv4Reserved struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowDelay_Choice) Reset() { - *x = FlowDelay_Choice{} +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) Reset() { + *x = PatternFlowRSVPPathSessionLspTunnelIpv4Reserved{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1073] + mi := &file_otg_proto_msgTypes[1038] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowDelay_Choice) String() string { +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowDelay_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) ProtoMessage() {} -func (x *FlowDelay_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1073] +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1038] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105218,72 +110802,80 @@ func (x *FlowDelay_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowDelay_Choice.ProtoReflect.Descriptor instead. -func (*FlowDelay_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{288, 0} +// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1038} } -type FlowDurationInterBurstGap_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) GetChoice() PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_unspecified } -func (x *FlowDurationInterBurstGap_Choice) Reset() { - *x = FlowDurationInterBurstGap_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1074] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *FlowDurationInterBurstGap_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*FlowDurationInterBurstGap_Choice) ProtoMessage() {} - -func (x *FlowDurationInterBurstGap_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1074] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) GetIncrement() *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowDurationInterBurstGap_Choice.ProtoReflect.Descriptor instead. -func (*FlowDurationInterBurstGap_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{292, 0} +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) GetDecrement() *PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter { + if x != nil { + return x.Decrement + } + return nil } -type FlowLatencyMetrics_Mode struct { +// integer counter pattern +type PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 1 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowLatencyMetrics_Mode) Reset() { - *x = FlowLatencyMetrics_Mode{} +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) Reset() { + *x = PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1075] + mi := &file_otg_proto_msgTypes[1039] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowLatencyMetrics_Mode) String() string { +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowLatencyMetrics_Mode) ProtoMessage() {} +func (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) ProtoMessage() {} -func (x *FlowLatencyMetrics_Mode) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1075] +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1039] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105294,34 +110886,71 @@ func (x *FlowLatencyMetrics_Mode) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowLatencyMetrics_Mode.ProtoReflect.Descriptor instead. -func (*FlowLatencyMetrics_Mode) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{294, 0} +// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1039} } -type FlowRxTxRatio_Choice struct { +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// A 16-bit identifier used in the SESSION that remains constant over the life of the +// tunnel. +type PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 1 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [1] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowRxTxRatio_Choice) Reset() { - *x = FlowRxTxRatio_Choice{} +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) Reset() { + *x = PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1076] + mi := &file_otg_proto_msgTypes[1040] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowRxTxRatio_Choice) String() string { +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowRxTxRatio_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) ProtoMessage() {} -func (x *FlowRxTxRatio_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1076] +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1040] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105332,72 +110961,80 @@ func (x *FlowRxTxRatio_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowRxTxRatio_Choice.ProtoReflect.Descriptor instead. -func (*FlowRxTxRatio_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{296, 0} +// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1040} } -type EventRequest_Type struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) GetChoice() PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_unspecified } -func (x *EventRequest_Type) Reset() { - *x = EventRequest_Type{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1077] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *EventRequest_Type) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*EventRequest_Type) ProtoMessage() {} - -func (x *EventRequest_Type) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1077] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) GetIncrement() *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use EventRequest_Type.ProtoReflect.Descriptor instead. -func (*EventRequest_Type) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{302, 0} +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) GetDecrement() *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter { + if x != nil { + return x.Decrement + } + return nil } -type LldpConnection_Choice struct { +// integer counter pattern +type PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *LldpConnection_Choice) Reset() { - *x = LldpConnection_Choice{} +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) Reset() { + *x = PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1078] + mi := &file_otg_proto_msgTypes[1041] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LldpConnection_Choice) String() string { +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpConnection_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) ProtoMessage() {} -func (x *LldpConnection_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1078] +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1041] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105408,34 +111045,70 @@ func (x *LldpConnection_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpConnection_Choice.ProtoReflect.Descriptor instead. -func (*LldpConnection_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{305, 0} +// Deprecated: Use PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1041} } -type LldpChassisId_Choice struct { +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// TBD +type PatternFlowRSVPPathSessionExtTunnelIdAsInteger struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *LldpChassisId_Choice) Reset() { - *x = LldpChassisId_Choice{} +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) Reset() { + *x = PatternFlowRSVPPathSessionExtTunnelIdAsInteger{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1079] + mi := &file_otg_proto_msgTypes[1042] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LldpChassisId_Choice) String() string { +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpChassisId_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathSessionExtTunnelIdAsInteger) ProtoMessage() {} -func (x *LldpChassisId_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1079] +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1042] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105446,72 +111119,80 @@ func (x *LldpChassisId_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpChassisId_Choice.ProtoReflect.Descriptor instead. -func (*LldpChassisId_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{306, 0} +// Deprecated: Use PatternFlowRSVPPathSessionExtTunnelIdAsInteger.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionExtTunnelIdAsInteger) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1042} } -type LldpPortId_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) GetChoice() PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_unspecified } -func (x *LldpPortId_Choice) Reset() { - *x = LldpPortId_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1080] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *LldpPortId_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*LldpPortId_Choice) ProtoMessage() {} - -func (x *LldpPortId_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1080] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) GetIncrement() *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use LldpPortId_Choice.ProtoReflect.Descriptor instead. -func (*LldpPortId_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{307, 0} +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger) GetDecrement() *PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter { + if x != nil { + return x.Decrement + } + return nil } -type LldpChassisMacSubType_Choice struct { +// ipv4 counter pattern +type PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0.0.0.0 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 0.0.0.1 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *LldpChassisMacSubType_Choice) Reset() { - *x = LldpChassisMacSubType_Choice{} +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) Reset() { + *x = PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1081] + mi := &file_otg_proto_msgTypes[1043] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LldpChassisMacSubType_Choice) String() string { +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpChassisMacSubType_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) ProtoMessage() {} -func (x *LldpChassisMacSubType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1081] +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1043] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105522,34 +111203,70 @@ func (x *LldpChassisMacSubType_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpChassisMacSubType_Choice.ProtoReflect.Descriptor instead. -func (*LldpChassisMacSubType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{308, 0} +// Deprecated: Use PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1043} } -type LldpPortInterfaceNameSubType_Choice struct { +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) GetStart() string { + if x != nil && x.Start != nil { + return *x.Start + } + return "" +} + +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) GetStep() string { + if x != nil && x.Step != nil { + return *x.Step + } + return "" +} + +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// IPv4 address of the ingress endpoint for the tunnel. +type PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0.0.0.0 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = ['0.0.0.0'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *LldpPortInterfaceNameSubType_Choice) Reset() { - *x = LldpPortInterfaceNameSubType_Choice{} +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) Reset() { + *x = PatternFlowRSVPPathSessionExtTunnelIdAsIpv4{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1082] + mi := &file_otg_proto_msgTypes[1044] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LldpPortInterfaceNameSubType_Choice) String() string { +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpPortInterfaceNameSubType_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) ProtoMessage() {} -func (x *LldpPortInterfaceNameSubType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1082] +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1044] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105560,72 +111277,80 @@ func (x *LldpPortInterfaceNameSubType_Choice) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use LldpPortInterfaceNameSubType_Choice.ProtoReflect.Descriptor instead. -func (*LldpPortInterfaceNameSubType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{309, 0} +// Deprecated: Use PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1044} } -type LldpSystemName_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) GetChoice() PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_unspecified } -func (x *LldpSystemName_Choice) Reset() { - *x = LldpSystemName_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1083] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } + return "" } -func (x *LldpSystemName_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) GetValues() []string { + if x != nil { + return x.Values + } + return nil } -func (*LldpSystemName_Choice) ProtoMessage() {} - -func (x *LldpSystemName_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1083] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) GetIncrement() *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use LldpSystemName_Choice.ProtoReflect.Descriptor instead. -func (*LldpSystemName_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{310, 0} +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) GetDecrement() *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter { + if x != nil { + return x.Decrement + } + return nil } -type Error_Kind struct { +// ipv4 counter pattern +type PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0.0.0.0 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 0.0.0.1 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *Error_Kind) Reset() { - *x = Error_Kind{} +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) Reset() { + *x = PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1084] + mi := &file_otg_proto_msgTypes[1045] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Error_Kind) String() string { +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Error_Kind) ProtoMessage() {} +func (*PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) ProtoMessage() {} -func (x *Error_Kind) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1084] +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1045] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105636,34 +111361,71 @@ func (x *Error_Kind) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Error_Kind.ProtoReflect.Descriptor instead. -func (*Error_Kind) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{311, 0} +// Deprecated: Use PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1045} } -type ConfigUpdate_Choice struct { +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) GetStart() string { + if x != nil && x.Start != nil { + return *x.Start + } + return "" +} + +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) GetStep() string { + if x != nil && x.Step != nil { + return *x.Step + } + return "" +} + +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// The IPv4 address of the interface through which the last RSVP-knowledgeable hop forwarded +// this message. +type PatternFlowRSVPPathRsvpHopIpv4Ipv4Address struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0.0.0.0 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = ['0.0.0.0'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *ConfigUpdate_Choice) Reset() { - *x = ConfigUpdate_Choice{} +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) Reset() { + *x = PatternFlowRSVPPathRsvpHopIpv4Ipv4Address{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1085] + mi := &file_otg_proto_msgTypes[1046] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ConfigUpdate_Choice) String() string { +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ConfigUpdate_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) ProtoMessage() {} -func (x *ConfigUpdate_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1085] +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1046] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105674,72 +111436,80 @@ func (x *ConfigUpdate_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ConfigUpdate_Choice.ProtoReflect.Descriptor instead. -func (*ConfigUpdate_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{313, 0} +// Deprecated: Use PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1046} } -type FlowsUpdate_PropertyNames struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) GetChoice() PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_unspecified } -func (x *FlowsUpdate_PropertyNames) Reset() { - *x = FlowsUpdate_PropertyNames{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1086] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } + return "" } -func (x *FlowsUpdate_PropertyNames) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) GetValues() []string { + if x != nil { + return x.Values + } + return nil } -func (*FlowsUpdate_PropertyNames) ProtoMessage() {} - -func (x *FlowsUpdate_PropertyNames) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1086] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) GetIncrement() *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowsUpdate_PropertyNames.ProtoReflect.Descriptor instead. -func (*FlowsUpdate_PropertyNames) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{314, 0} +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) GetDecrement() *PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter { + if x != nil { + return x.Decrement + } + return nil } -type ControlState_Choice struct { +// integer counter pattern +type PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *ControlState_Choice) Reset() { - *x = ControlState_Choice{} +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) Reset() { + *x = PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1087] + mi := &file_otg_proto_msgTypes[1047] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ControlState_Choice) String() string { +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ControlState_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) ProtoMessage() {} -func (x *ControlState_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1087] +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1047] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105750,34 +111520,73 @@ func (x *ControlState_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ControlState_Choice.ProtoReflect.Descriptor instead. -func (*ControlState_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{315, 0} +// Deprecated: Use PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1047} } -type StatePort_Choice struct { +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Logical Interface Handle (LIH) is used to distinguish logical outgoing interfaces. +// A node receiving an LIH in a Path message saves its value and returns it in the HOP +// objects of subsequent Resv messages sent to the node that originated the LIH. The +// LIH should be identically zero if there is no logical interface handle. +type PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *StatePort_Choice) Reset() { - *x = StatePort_Choice{} +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) Reset() { + *x = PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1088] + mi := &file_otg_proto_msgTypes[1048] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StatePort_Choice) String() string { +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatePort_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) ProtoMessage() {} -func (x *StatePort_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1088] +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1048] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105788,72 +111597,80 @@ func (x *StatePort_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StatePort_Choice.ProtoReflect.Descriptor instead. -func (*StatePort_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{316, 0} +// Deprecated: Use PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1048} } -type StateTraffic_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) GetChoice() PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_unspecified } -func (x *StateTraffic_Choice) Reset() { - *x = StateTraffic_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1089] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *StateTraffic_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*StateTraffic_Choice) ProtoMessage() {} - -func (x *StateTraffic_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1089] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) GetIncrement() *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use StateTraffic_Choice.ProtoReflect.Descriptor instead. -func (*StateTraffic_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{317, 0} +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) GetDecrement() *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter { + if x != nil { + return x.Decrement + } + return nil } -type StateProtocol_Choice struct { +// integer counter pattern +type PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 30000 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *StateProtocol_Choice) Reset() { - *x = StateProtocol_Choice{} +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) Reset() { + *x = PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1090] + mi := &file_otg_proto_msgTypes[1049] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocol_Choice) String() string { +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocol_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) ProtoMessage() {} -func (x *StateProtocol_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1090] +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1049] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105864,34 +111681,70 @@ func (x *StateProtocol_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocol_Choice.ProtoReflect.Descriptor instead. -func (*StateProtocol_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{318, 0} +// Deprecated: Use PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1049} } -type StatePortLink_State struct { +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// The refresh timeout period R used to generate this message;in milliseconds. +type PatternFlowRSVPPathTimeValuesType1RefreshPeriodR struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 30000 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [30000] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *StatePortLink_State) Reset() { - *x = StatePortLink_State{} +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) Reset() { + *x = PatternFlowRSVPPathTimeValuesType1RefreshPeriodR{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1091] + mi := &file_otg_proto_msgTypes[1050] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StatePortLink_State) String() string { +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatePortLink_State) ProtoMessage() {} +func (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) ProtoMessage() {} -func (x *StatePortLink_State) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1091] +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1050] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105902,72 +111755,80 @@ func (x *StatePortLink_State) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StatePortLink_State.ProtoReflect.Descriptor instead. -func (*StatePortLink_State) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{319, 0} +// Deprecated: Use PatternFlowRSVPPathTimeValuesType1RefreshPeriodR.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1050} } -type StatePortCapture_State struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) GetChoice() PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_unspecified } -func (x *StatePortCapture_State) Reset() { - *x = StatePortCapture_State{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1092] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *StatePortCapture_State) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*StatePortCapture_State) ProtoMessage() {} - -func (x *StatePortCapture_State) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1092] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) GetIncrement() *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use StatePortCapture_State.ProtoReflect.Descriptor instead. -func (*StatePortCapture_State) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{320, 0} +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) GetDecrement() *PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter { + if x != nil { + return x.Decrement + } + return nil } -type StateTrafficFlowTransmit_State struct { +// integer counter pattern +type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *StateTrafficFlowTransmit_State) Reset() { - *x = StateTrafficFlowTransmit_State{} +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) Reset() { + *x = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1093] + mi := &file_otg_proto_msgTypes[1051] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateTrafficFlowTransmit_State) String() string { +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateTrafficFlowTransmit_State) ProtoMessage() {} +func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) ProtoMessage() {} -func (x *StateTrafficFlowTransmit_State) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1093] +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1051] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105978,34 +111839,72 @@ func (x *StateTrafficFlowTransmit_State) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateTrafficFlowTransmit_State.ProtoReflect.Descriptor instead. -func (*StateTrafficFlowTransmit_State) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{321, 0} +// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1051} } -type StateProtocolAll_State struct { +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// The L bit is an attribute of the subobject. The L bit is set if the subobject represents +// a loose hop in the explicit route. If the bit is not set, the subobject represents +// a strict hop in the explicit route. +type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *StateProtocolAll_State) Reset() { - *x = StateProtocolAll_State{} +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) Reset() { + *x = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1094] + mi := &file_otg_proto_msgTypes[1052] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocolAll_State) String() string { +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocolAll_State) ProtoMessage() {} +func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) ProtoMessage() {} -func (x *StateProtocolAll_State) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1094] +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1052] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106016,72 +111915,80 @@ func (x *StateProtocolAll_State) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocolAll_State.ProtoReflect.Descriptor instead. -func (*StateProtocolAll_State) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{322, 0} +// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1052} } -type StateProtocolRoute_State struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) GetChoice() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_unspecified } -func (x *StateProtocolRoute_State) Reset() { - *x = StateProtocolRoute_State{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1095] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *StateProtocolRoute_State) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*StateProtocolRoute_State) ProtoMessage() {} - -func (x *StateProtocolRoute_State) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1095] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) GetIncrement() *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use StateProtocolRoute_State.ProtoReflect.Descriptor instead. -func (*StateProtocolRoute_State) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{323, 0} +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) GetDecrement() *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter { + if x != nil { + return x.Decrement + } + return nil } -type StateProtocolLacp_Choice struct { +// ipv4 counter pattern +type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0.0.0.0 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 0.0.0.1 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *StateProtocolLacp_Choice) Reset() { - *x = StateProtocolLacp_Choice{} +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) Reset() { + *x = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1096] + mi := &file_otg_proto_msgTypes[1053] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocolLacp_Choice) String() string { +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocolLacp_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) ProtoMessage() {} -func (x *StateProtocolLacp_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1096] +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1053] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106092,34 +111999,71 @@ func (x *StateProtocolLacp_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocolLacp_Choice.ProtoReflect.Descriptor instead. -func (*StateProtocolLacp_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{324, 0} +// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1053} } -type StateProtocolLacpAdmin_State struct { +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) GetStart() string { + if x != nil && x.Start != nil { + return *x.Start + } + return "" +} + +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) GetStep() string { + if x != nil && x.Step != nil { + return *x.Step + } + return "" +} + +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// This IPv4 address is treated as a prefix based on the prefix length value below. +// Bits beyond the prefix are ignored on receipt and SHOULD be set to zero on transmission. +type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0.0.0.0 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = ['0.0.0.0'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *StateProtocolLacpAdmin_State) Reset() { - *x = StateProtocolLacpAdmin_State{} +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) Reset() { + *x = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1097] + mi := &file_otg_proto_msgTypes[1054] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocolLacpAdmin_State) String() string { +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocolLacpAdmin_State) ProtoMessage() {} +func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) ProtoMessage() {} -func (x *StateProtocolLacpAdmin_State) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1097] +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1054] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106130,72 +112074,80 @@ func (x *StateProtocolLacpAdmin_State) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocolLacpAdmin_State.ProtoReflect.Descriptor instead. -func (*StateProtocolLacpAdmin_State) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{325, 0} +// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1054} } -type StateProtocolLacpMemberPorts_State struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) GetChoice() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_unspecified } -func (x *StateProtocolLacpMemberPorts_State) Reset() { - *x = StateProtocolLacpMemberPorts_State{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1098] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } + return "" } -func (x *StateProtocolLacpMemberPorts_State) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) GetValues() []string { + if x != nil { + return x.Values + } + return nil } -func (*StateProtocolLacpMemberPorts_State) ProtoMessage() {} - -func (x *StateProtocolLacpMemberPorts_State) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1098] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) GetIncrement() *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use StateProtocolLacpMemberPorts_State.ProtoReflect.Descriptor instead. -func (*StateProtocolLacpMemberPorts_State) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{326, 0} +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) GetDecrement() *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter { + if x != nil { + return x.Decrement + } + return nil } -type StateProtocolBgp_Choice struct { +// integer counter pattern +type PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *StateProtocolBgp_Choice) Reset() { - *x = StateProtocolBgp_Choice{} +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) Reset() { + *x = PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1099] + mi := &file_otg_proto_msgTypes[1055] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocolBgp_Choice) String() string { +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocolBgp_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) ProtoMessage() {} -func (x *StateProtocolBgp_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1099] +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1055] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106206,34 +112158,72 @@ func (x *StateProtocolBgp_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocolBgp_Choice.ProtoReflect.Descriptor instead. -func (*StateProtocolBgp_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{327, 0} +// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1055} } -type StateProtocolBgpPeers_State struct { +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// The L bit is an attribute of the subobject. The L bit is set if the subobject represents +// a loose hop in the explicit route. If the bit is not set, the subobject represents +// a strict hop in the explicit route. +type PatternFlowRSVPPathExplicitRouteType1ASNumberLBit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *StateProtocolBgpPeers_State) Reset() { - *x = StateProtocolBgpPeers_State{} +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) Reset() { + *x = PatternFlowRSVPPathExplicitRouteType1ASNumberLBit{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1100] + mi := &file_otg_proto_msgTypes[1056] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocolBgpPeers_State) String() string { +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocolBgpPeers_State) ProtoMessage() {} +func (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) ProtoMessage() {} -func (x *StateProtocolBgpPeers_State) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1100] +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1056] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106244,72 +112234,80 @@ func (x *StateProtocolBgpPeers_State) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocolBgpPeers_State.ProtoReflect.Descriptor instead. -func (*StateProtocolBgpPeers_State) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{328, 0} +// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1056} } -type StateProtocolIsis_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) GetChoice() PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_unspecified } -func (x *StateProtocolIsis_Choice) Reset() { - *x = StateProtocolIsis_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *StateProtocolIsis_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*StateProtocolIsis_Choice) ProtoMessage() {} - -func (x *StateProtocolIsis_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1101] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) GetIncrement() *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use StateProtocolIsis_Choice.ProtoReflect.Descriptor instead. -func (*StateProtocolIsis_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{329, 0} +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) GetDecrement() *PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter { + if x != nil { + return x.Decrement + } + return nil } -type StateProtocolIsisRouters_State struct { +// integer counter pattern +type PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *StateProtocolIsisRouters_State) Reset() { - *x = StateProtocolIsisRouters_State{} +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) Reset() { + *x = PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1102] + mi := &file_otg_proto_msgTypes[1057] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StateProtocolIsisRouters_State) String() string { +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StateProtocolIsisRouters_State) ProtoMessage() {} +func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) ProtoMessage() {} -func (x *StateProtocolIsisRouters_State) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1102] +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1057] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106320,34 +112318,71 @@ func (x *StateProtocolIsisRouters_State) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StateProtocolIsisRouters_State.ProtoReflect.Descriptor instead. -func (*StateProtocolIsisRouters_State) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{330, 0} +// Deprecated: Use PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1057} } -type ControlAction_Choice struct { +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// This field is reserved. It MUST be set to zero on transmission and MUST be ignored +// on receipt. +type PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *ControlAction_Choice) Reset() { - *x = ControlAction_Choice{} +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) Reset() { + *x = PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1103] + mi := &file_otg_proto_msgTypes[1058] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ControlAction_Choice) String() string { +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ControlAction_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) ProtoMessage() {} -func (x *ControlAction_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1103] +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1058] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106358,72 +112393,80 @@ func (x *ControlAction_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ControlAction_Choice.ProtoReflect.Descriptor instead. -func (*ControlAction_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{331, 0} +// Deprecated: Use PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1058} } -type ActionResponse_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) GetChoice() PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_unspecified } -func (x *ActionResponse_Choice) Reset() { - *x = ActionResponse_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *ActionResponse_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*ActionResponse_Choice) ProtoMessage() {} - -func (x *ActionResponse_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1104] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) GetIncrement() *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use ActionResponse_Choice.ProtoReflect.Descriptor instead. -func (*ActionResponse_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{333, 0} +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) GetDecrement() *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter { + if x != nil { + return x.Decrement + } + return nil } -type ActionProtocol_Choice struct { +// integer counter pattern +type PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 2048 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *ActionProtocol_Choice) Reset() { - *x = ActionProtocol_Choice{} +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) Reset() { + *x = PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1105] + mi := &file_otg_proto_msgTypes[1059] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionProtocol_Choice) String() string { +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionProtocol_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) ProtoMessage() {} -func (x *ActionProtocol_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1105] +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1059] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106434,34 +112477,71 @@ func (x *ActionProtocol_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionProtocol_Choice.ProtoReflect.Descriptor instead. -func (*ActionProtocol_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{334, 0} +// Deprecated: Use PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1059} } -type ActionResponseProtocol_Choice struct { +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// An identifier of the layer 3 protocol using this path. Standard Ethertype values +// are used e.g. The default value of 2048 ( 0x0800 ) represents Ethertype for IPv4. +type PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 2048 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [2048] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *ActionResponseProtocol_Choice) Reset() { - *x = ActionResponseProtocol_Choice{} +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) Reset() { + *x = PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1106] + mi := &file_otg_proto_msgTypes[1060] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionResponseProtocol_Choice) String() string { +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionResponseProtocol_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) ProtoMessage() {} -func (x *ActionResponseProtocol_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1106] +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1060] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106472,72 +112552,80 @@ func (x *ActionResponseProtocol_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActionResponseProtocol_Choice.ProtoReflect.Descriptor instead. -func (*ActionResponseProtocol_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{335, 0} +// Deprecated: Use PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1060} } -type ActionProtocolIpv4_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) GetChoice() PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_unspecified } -func (x *ActionProtocolIpv4_Choice) Reset() { - *x = ActionProtocolIpv4_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *ActionProtocolIpv4_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*ActionProtocolIpv4_Choice) ProtoMessage() {} - -func (x *ActionProtocolIpv4_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1107] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) GetIncrement() *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use ActionProtocolIpv4_Choice.ProtoReflect.Descriptor instead. -func (*ActionProtocolIpv4_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{336, 0} +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) GetDecrement() *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter { + if x != nil { + return x.Decrement + } + return nil } -type ActionResponseProtocolIpv4_Choice struct { +// ipv4 counter pattern +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0.0.0.0 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 0.0.0.1 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *ActionResponseProtocolIpv4_Choice) Reset() { - *x = ActionResponseProtocolIpv4_Choice{} +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) Reset() { + *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1108] + mi := &file_otg_proto_msgTypes[1061] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionResponseProtocolIpv4_Choice) String() string { +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionResponseProtocolIpv4_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) ProtoMessage() {} -func (x *ActionResponseProtocolIpv4_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1108] +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1061] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106548,34 +112636,70 @@ func (x *ActionResponseProtocolIpv4_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use ActionResponseProtocolIpv4_Choice.ProtoReflect.Descriptor instead. -func (*ActionResponseProtocolIpv4_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{337, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1061} } -type ActionResponseProtocolIpv4PingResponse_Result struct { +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) GetStart() string { + if x != nil && x.Start != nil { + return *x.Start + } + return "" +} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) GetStep() string { + if x != nil && x.Step != nil { + return *x.Step + } + return "" +} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// IPv4 address for a sender node. +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0.0.0.0 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = ['0.0.0.0'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *ActionResponseProtocolIpv4PingResponse_Result) Reset() { - *x = ActionResponseProtocolIpv4PingResponse_Result{} +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) Reset() { + *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1109] + mi := &file_otg_proto_msgTypes[1062] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionResponseProtocolIpv4PingResponse_Result) String() string { +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionResponseProtocolIpv4PingResponse_Result) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) ProtoMessage() {} -func (x *ActionResponseProtocolIpv4PingResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1109] +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1062] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106586,72 +112710,80 @@ func (x *ActionResponseProtocolIpv4PingResponse_Result) ProtoReflect() protorefl return mi.MessageOf(x) } -// Deprecated: Use ActionResponseProtocolIpv4PingResponse_Result.ProtoReflect.Descriptor instead. -func (*ActionResponseProtocolIpv4PingResponse_Result) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{341, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1062} } -type ActionProtocolIpv6_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) GetChoice() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_unspecified } -func (x *ActionProtocolIpv6_Choice) Reset() { - *x = ActionProtocolIpv6_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } + return "" } -func (x *ActionProtocolIpv6_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) GetValues() []string { + if x != nil { + return x.Values + } + return nil } -func (*ActionProtocolIpv6_Choice) ProtoMessage() {} - -func (x *ActionProtocolIpv6_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1110] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) GetIncrement() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use ActionProtocolIpv6_Choice.ProtoReflect.Descriptor instead. -func (*ActionProtocolIpv6_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{342, 0} +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) GetDecrement() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter { + if x != nil { + return x.Decrement + } + return nil } -type ActionResponseProtocolIpv6_Choice struct { +// integer counter pattern +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *ActionResponseProtocolIpv6_Choice) Reset() { - *x = ActionResponseProtocolIpv6_Choice{} +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) Reset() { + *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1111] + mi := &file_otg_proto_msgTypes[1063] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionResponseProtocolIpv6_Choice) String() string { +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionResponseProtocolIpv6_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) ProtoMessage() {} -func (x *ActionResponseProtocolIpv6_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1111] +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1063] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106662,34 +112794,70 @@ func (x *ActionResponseProtocolIpv6_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use ActionResponseProtocolIpv6_Choice.ProtoReflect.Descriptor instead. -func (*ActionResponseProtocolIpv6_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{343, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1063} } -type ActionResponseProtocolIpv6PingResponse_Result struct { +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Reserved field, MUST be zero. +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *ActionResponseProtocolIpv6PingResponse_Result) Reset() { - *x = ActionResponseProtocolIpv6PingResponse_Result{} +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) Reset() { + *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1112] + mi := &file_otg_proto_msgTypes[1064] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionResponseProtocolIpv6PingResponse_Result) String() string { +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionResponseProtocolIpv6PingResponse_Result) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) ProtoMessage() {} -func (x *ActionResponseProtocolIpv6PingResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1112] +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1064] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106700,73 +112868,81 @@ func (x *ActionResponseProtocolIpv6PingResponse_Result) ProtoReflect() protorefl return mi.MessageOf(x) } -// Deprecated: Use ActionResponseProtocolIpv6PingResponse_Result.ProtoReflect.Descriptor instead. -func (*ActionResponseProtocolIpv6PingResponse_Result) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{347, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1064} } -type ActionProtocolBgp_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) GetChoice() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_unspecified } -func (x *ActionProtocolBgp_Choice) Reset() { - *x = ActionProtocolBgp_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1113] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *ActionProtocolBgp_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*ActionProtocolBgp_Choice) ProtoMessage() {} - -func (x *ActionProtocolBgp_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1113] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) GetIncrement() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use ActionProtocolBgp_Choice.ProtoReflect.Descriptor instead. -func (*ActionProtocolBgp_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{348, 0} +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) GetDecrement() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter { + if x != nil { + return x.Decrement + } + return nil } -type ActionProtocolBgpNotification_Choice struct { +// integer counter pattern +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 1 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *ActionProtocolBgpNotification_Choice) Reset() { - *x = ActionProtocolBgpNotification_Choice{} +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) Reset() { + *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1114] + mi := &file_otg_proto_msgTypes[1065] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ActionProtocolBgpNotification_Choice) String() string { +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActionProtocolBgpNotification_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) ProtoMessage() {} -func (x *ActionProtocolBgpNotification_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1114] - if protoimpl.UnsafeEnabled && x != nil { +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1065] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106776,34 +112952,71 @@ func (x *ActionProtocolBgpNotification_Choice) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use ActionProtocolBgpNotification_Choice.ProtoReflect.Descriptor instead. -func (*ActionProtocolBgpNotification_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{349, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1065} } -type MetricsRequest_Choice struct { +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// A 16-bit identifier used in the SENDER_TEMPLATE that can be changed to allow a sender +// to share resources with itself. +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 1 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [1] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *MetricsRequest_Choice) Reset() { - *x = MetricsRequest_Choice{} +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) Reset() { + *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1115] + mi := &file_otg_proto_msgTypes[1066] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MetricsRequest_Choice) String() string { +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MetricsRequest_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) ProtoMessage() {} -func (x *MetricsRequest_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1115] +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1066] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106814,72 +113027,80 @@ func (x *MetricsRequest_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MetricsRequest_Choice.ProtoReflect.Descriptor instead. -func (*MetricsRequest_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{351, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1066} } -type MetricsResponse_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) GetChoice() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_unspecified } -func (x *MetricsResponse_Choice) Reset() { - *x = MetricsResponse_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1116] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *MetricsResponse_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*MetricsResponse_Choice) ProtoMessage() {} - -func (x *MetricsResponse_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1116] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) GetIncrement() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use MetricsResponse_Choice.ProtoReflect.Descriptor instead. -func (*MetricsResponse_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{352, 0} +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) GetDecrement() *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter { + if x != nil { + return x.Decrement + } + return nil } -type PortMetricsRequest_ColumnNames struct { +// integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServVersionCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PortMetricsRequest_ColumnNames) Reset() { - *x = PortMetricsRequest_ColumnNames{} +func (x *PatternFlowRSVPPathSenderTspecIntServVersionCounter) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServVersionCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1117] + mi := &file_otg_proto_msgTypes[1067] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PortMetricsRequest_ColumnNames) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServVersionCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PortMetricsRequest_ColumnNames) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServVersionCounter) ProtoMessage() {} -func (x *PortMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1117] +func (x *PatternFlowRSVPPathSenderTspecIntServVersionCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1067] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106890,34 +113111,70 @@ func (x *PortMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PortMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. -func (*PortMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{353, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServVersionCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServVersionCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1067} } -type PortMetric_Link struct { +func (x *PatternFlowRSVPPathSenderTspecIntServVersionCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServVersionCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServVersionCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Message format version number. +type PatternFlowRSVPPathSenderTspecIntServVersion struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTspecIntServVersionCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTspecIntServVersionCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *PortMetric_Link) Reset() { - *x = PortMetric_Link{} +func (x *PatternFlowRSVPPathSenderTspecIntServVersion) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServVersion{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1118] + mi := &file_otg_proto_msgTypes[1068] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PortMetric_Link) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServVersion) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PortMetric_Link) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServVersion) ProtoMessage() {} -func (x *PortMetric_Link) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1118] +func (x *PatternFlowRSVPPathSenderTspecIntServVersion) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1068] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106928,72 +113185,80 @@ func (x *PortMetric_Link) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PortMetric_Link.ProtoReflect.Descriptor instead. -func (*PortMetric_Link) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{354, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServVersion.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServVersion) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1068} } -type PortMetric_Capture struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSenderTspecIntServVersion) GetChoice() PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSenderTspecIntServVersion_Choice_unspecified } -func (x *PortMetric_Capture) Reset() { - *x = PortMetric_Capture{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1119] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTspecIntServVersion) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *PortMetric_Capture) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTspecIntServVersion) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*PortMetric_Capture) ProtoMessage() {} - -func (x *PortMetric_Capture) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1119] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTspecIntServVersion) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServVersionCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use PortMetric_Capture.ProtoReflect.Descriptor instead. -func (*PortMetric_Capture) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{354, 1} +func (x *PatternFlowRSVPPathSenderTspecIntServVersion) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServVersionCounter { + if x != nil { + return x.Decrement + } + return nil } -type PortMetric_Transmit struct { +// integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServReserved1Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *PortMetric_Transmit) Reset() { - *x = PortMetric_Transmit{} +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1Counter) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServReserved1Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1120] + mi := &file_otg_proto_msgTypes[1069] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PortMetric_Transmit) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PortMetric_Transmit) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServReserved1Counter) ProtoMessage() {} -func (x *PortMetric_Transmit) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1120] +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1069] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107004,34 +113269,70 @@ func (x *PortMetric_Transmit) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PortMetric_Transmit.ProtoReflect.Descriptor instead. -func (*PortMetric_Transmit) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{354, 2} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServReserved1Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServReserved1Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1069} } -type FlowMetricsRequest_MetricNames struct { +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1Counter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1Counter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1Counter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Reserved. +type PatternFlowRSVPPathSenderTspecIntServReserved1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTspecIntServReserved1Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTspecIntServReserved1Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowMetricsRequest_MetricNames) Reset() { - *x = FlowMetricsRequest_MetricNames{} +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServReserved1{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1121] + mi := &file_otg_proto_msgTypes[1070] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowMetricsRequest_MetricNames) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowMetricsRequest_MetricNames) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServReserved1) ProtoMessage() {} -func (x *FlowMetricsRequest_MetricNames) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1121] +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1070] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107042,72 +113343,80 @@ func (x *FlowMetricsRequest_MetricNames) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowMetricsRequest_MetricNames.ProtoReflect.Descriptor instead. -func (*FlowMetricsRequest_MetricNames) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{355, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServReserved1.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServReserved1) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1070} } -type FlowTaggedMetricsFilter_MetricNames struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) GetChoice() PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_unspecified } -func (x *FlowTaggedMetricsFilter_MetricNames) Reset() { - *x = FlowTaggedMetricsFilter_MetricNames{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1122] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *FlowTaggedMetricsFilter_MetricNames) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*FlowTaggedMetricsFilter_MetricNames) ProtoMessage() {} - -func (x *FlowTaggedMetricsFilter_MetricNames) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1122] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServReserved1Counter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FlowTaggedMetricsFilter_MetricNames.ProtoReflect.Descriptor instead. -func (*FlowTaggedMetricsFilter_MetricNames) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{356, 0} +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServReserved1Counter { + if x != nil { + return x.Decrement + } + return nil } -type FlowMetric_Transmit struct { +// integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 7 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *FlowMetric_Transmit) Reset() { - *x = FlowMetric_Transmit{} +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1123] + mi := &file_otg_proto_msgTypes[1071] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowMetric_Transmit) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowMetric_Transmit) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) ProtoMessage() {} -func (x *FlowMetric_Transmit) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1123] +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1071] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107118,34 +113427,70 @@ func (x *FlowMetric_Transmit) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowMetric_Transmit.ProtoReflect.Descriptor instead. -func (*FlowMetric_Transmit) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{358, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1071} } -type FlowMetricTagValue_Choice struct { +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Overall length (7 words not including header). +type PatternFlowRSVPPathSenderTspecIntServOverallLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 7 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [7] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *FlowMetricTagValue_Choice) Reset() { - *x = FlowMetricTagValue_Choice{} +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServOverallLength{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1124] + mi := &file_otg_proto_msgTypes[1072] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FlowMetricTagValue_Choice) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FlowMetricTagValue_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServOverallLength) ProtoMessage() {} -func (x *FlowMetricTagValue_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1124] +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1072] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107156,72 +113501,80 @@ func (x *FlowMetricTagValue_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FlowMetricTagValue_Choice.ProtoReflect.Descriptor instead. -func (*FlowMetricTagValue_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{361, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServOverallLength.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServOverallLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1072} } -type Bgpv4MetricsRequest_ColumnNames struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) GetChoice() PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_unspecified } -func (x *Bgpv4MetricsRequest_ColumnNames) Reset() { - *x = Bgpv4MetricsRequest_ColumnNames{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1125] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *Bgpv4MetricsRequest_ColumnNames) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*Bgpv4MetricsRequest_ColumnNames) ProtoMessage() {} - -func (x *Bgpv4MetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1125] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use Bgpv4MetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. -func (*Bgpv4MetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{364, 0} +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter { + if x != nil { + return x.Decrement + } + return nil } -type Bgpv4Metric_SessionState struct { +// integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 1 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *Bgpv4Metric_SessionState) Reset() { - *x = Bgpv4Metric_SessionState{} +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1126] + mi := &file_otg_proto_msgTypes[1073] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Bgpv4Metric_SessionState) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Bgpv4Metric_SessionState) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) ProtoMessage() {} -func (x *Bgpv4Metric_SessionState) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1126] +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1073] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107232,34 +113585,70 @@ func (x *Bgpv4Metric_SessionState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Bgpv4Metric_SessionState.ProtoReflect.Descriptor instead. -func (*Bgpv4Metric_SessionState) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{365, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1073} } -type Bgpv4Metric_FsmState struct { +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Service header, service number - '1' (Generic information) if in a PATH message. +type PatternFlowRSVPPathSenderTspecIntServServiceHeader struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 1 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [1] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *Bgpv4Metric_FsmState) Reset() { - *x = Bgpv4Metric_FsmState{} +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServServiceHeader{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1127] + mi := &file_otg_proto_msgTypes[1074] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Bgpv4Metric_FsmState) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Bgpv4Metric_FsmState) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServServiceHeader) ProtoMessage() {} -func (x *Bgpv4Metric_FsmState) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1127] +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1074] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107270,72 +113659,80 @@ func (x *Bgpv4Metric_FsmState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Bgpv4Metric_FsmState.ProtoReflect.Descriptor instead. -func (*Bgpv4Metric_FsmState) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{365, 1} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServServiceHeader.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServServiceHeader) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1074} } -type Bgpv6MetricsRequest_ColumnNames struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) GetChoice() PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_unspecified } -func (x *Bgpv6MetricsRequest_ColumnNames) Reset() { - *x = Bgpv6MetricsRequest_ColumnNames{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1128] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *Bgpv6MetricsRequest_ColumnNames) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*Bgpv6MetricsRequest_ColumnNames) ProtoMessage() {} - -func (x *Bgpv6MetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1128] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use Bgpv6MetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. -func (*Bgpv6MetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{366, 0} +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter { + if x != nil { + return x.Decrement + } + return nil } -type Bgpv6Metric_SessionState struct { +// integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServZeroBitCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *Bgpv6Metric_SessionState) Reset() { - *x = Bgpv6Metric_SessionState{} +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServZeroBitCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1129] + mi := &file_otg_proto_msgTypes[1075] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Bgpv6Metric_SessionState) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Bgpv6Metric_SessionState) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) ProtoMessage() {} -func (x *Bgpv6Metric_SessionState) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1129] +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1075] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107346,34 +113743,70 @@ func (x *Bgpv6Metric_SessionState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Bgpv6Metric_SessionState.ProtoReflect.Descriptor instead. -func (*Bgpv6Metric_SessionState) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{367, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServZeroBitCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1075} } -type Bgpv6Metric_FsmState struct { +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// MUST be 0. +type PatternFlowRSVPPathSenderTspecIntServZeroBit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *Bgpv6Metric_FsmState) Reset() { - *x = Bgpv6Metric_FsmState{} +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServZeroBit{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1130] + mi := &file_otg_proto_msgTypes[1076] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Bgpv6Metric_FsmState) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Bgpv6Metric_FsmState) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServZeroBit) ProtoMessage() {} -func (x *Bgpv6Metric_FsmState) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1130] +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1076] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107384,72 +113817,80 @@ func (x *Bgpv6Metric_FsmState) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Bgpv6Metric_FsmState.ProtoReflect.Descriptor instead. -func (*Bgpv6Metric_FsmState) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{367, 1} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServZeroBit.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServZeroBit) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1076} } -type IsisMetricsRequest_ColumnNames struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) GetChoice() PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_unspecified } -func (x *IsisMetricsRequest_ColumnNames) Reset() { - *x = IsisMetricsRequest_ColumnNames{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1131] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *IsisMetricsRequest_ColumnNames) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*IsisMetricsRequest_ColumnNames) ProtoMessage() {} - -func (x *IsisMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1131] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use IsisMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. -func (*IsisMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{368, 0} +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServZeroBitCounter { + if x != nil { + return x.Decrement + } + return nil } -type LagMetricsRequest_ColumnNames struct { +// integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServReserved2Counter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *LagMetricsRequest_ColumnNames) Reset() { - *x = LagMetricsRequest_ColumnNames{} +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2Counter) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServReserved2Counter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1132] + mi := &file_otg_proto_msgTypes[1077] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LagMetricsRequest_ColumnNames) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2Counter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LagMetricsRequest_ColumnNames) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServReserved2Counter) ProtoMessage() {} -func (x *LagMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1132] +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2Counter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1077] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107460,34 +113901,70 @@ func (x *LagMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LagMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. -func (*LagMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{370, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServReserved2Counter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServReserved2Counter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1077} } -type LagMetric_OperStatus struct { +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2Counter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2Counter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2Counter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Reserved. +type PatternFlowRSVPPathSenderTspecIntServReserved2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTspecIntServReserved2Counter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTspecIntServReserved2Counter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *LagMetric_OperStatus) Reset() { - *x = LagMetric_OperStatus{} +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServReserved2{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1133] + mi := &file_otg_proto_msgTypes[1078] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LagMetric_OperStatus) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LagMetric_OperStatus) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServReserved2) ProtoMessage() {} -func (x *LagMetric_OperStatus) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1133] +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1078] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107498,72 +113975,80 @@ func (x *LagMetric_OperStatus) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LagMetric_OperStatus.ProtoReflect.Descriptor instead. -func (*LagMetric_OperStatus) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{371, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServReserved2.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServReserved2) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1078} } -type LacpMetricsRequest_ColumnNames struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) GetChoice() PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_unspecified } -func (x *LacpMetricsRequest_ColumnNames) Reset() { - *x = LacpMetricsRequest_ColumnNames{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1134] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *LacpMetricsRequest_ColumnNames) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*LacpMetricsRequest_ColumnNames) ProtoMessage() {} - -func (x *LacpMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1134] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServReserved2Counter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use LacpMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. -func (*LacpMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{372, 0} +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServReserved2Counter { + if x != nil { + return x.Decrement + } + return nil } -type LacpMetric_Activity struct { +// integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 6 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *LacpMetric_Activity) Reset() { - *x = LacpMetric_Activity{} +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1135] + mi := &file_otg_proto_msgTypes[1079] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LacpMetric_Activity) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LacpMetric_Activity) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) ProtoMessage() {} -func (x *LacpMetric_Activity) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1135] +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1079] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107574,34 +114059,70 @@ func (x *LacpMetric_Activity) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LacpMetric_Activity.ProtoReflect.Descriptor instead. -func (*LacpMetric_Activity) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{373, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1079} } -type LacpMetric_Timeout struct { +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Length of service data, 6 words not including per-service header. +type PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 6 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [6] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *LacpMetric_Timeout) Reset() { - *x = LacpMetric_Timeout{} +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1136] + mi := &file_otg_proto_msgTypes[1080] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LacpMetric_Timeout) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LacpMetric_Timeout) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) ProtoMessage() {} -func (x *LacpMetric_Timeout) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1136] +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1080] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107612,72 +114133,80 @@ func (x *LacpMetric_Timeout) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LacpMetric_Timeout.ProtoReflect.Descriptor instead. -func (*LacpMetric_Timeout) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{373, 1} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1080} } -type LacpMetric_Synchronization struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *LacpMetric_Synchronization) Reset() { - *x = LacpMetric_Synchronization{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1137] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) GetChoice() PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice } + return PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_unspecified } -func (x *LacpMetric_Synchronization) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value + } + return 0 } -func (*LacpMetric_Synchronization) ProtoMessage() {} +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil +} -func (x *LacpMetric_Synchronization) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1137] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use LacpMetric_Synchronization.ProtoReflect.Descriptor instead. -func (*LacpMetric_Synchronization) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{373, 2} +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter { + if x != nil { + return x.Decrement + } + return nil } -type LldpMetricsRequest_ColumnNames struct { +// integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 127 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *LldpMetricsRequest_ColumnNames) Reset() { - *x = LldpMetricsRequest_ColumnNames{} +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1138] + mi := &file_otg_proto_msgTypes[1081] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LldpMetricsRequest_ColumnNames) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpMetricsRequest_ColumnNames) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) ProtoMessage() {} -func (x *LldpMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1138] +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1081] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107688,34 +114217,70 @@ func (x *LldpMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. -func (*LldpMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{374, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1081} } -type RsvpMetricsRequest_ColumnNames struct { +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Parameter ID, parameter 127 (Token Bucket TSpec) +type PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 127 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [127] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *RsvpMetricsRequest_ColumnNames) Reset() { - *x = RsvpMetricsRequest_ColumnNames{} +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1139] + mi := &file_otg_proto_msgTypes[1082] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RsvpMetricsRequest_ColumnNames) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpMetricsRequest_ColumnNames) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) ProtoMessage() {} -func (x *RsvpMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1139] +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1082] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107726,72 +114291,80 @@ func (x *RsvpMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. -func (*RsvpMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{376, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1082} } -type StatesRequest_Choice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) GetChoice() PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_unspecified } -func (x *StatesRequest_Choice) Reset() { - *x = StatesRequest_Choice{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1140] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *StatesRequest_Choice) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*StatesRequest_Choice) ProtoMessage() {} - -func (x *StatesRequest_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1140] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use StatesRequest_Choice.ProtoReflect.Descriptor instead. -func (*StatesRequest_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{378, 0} +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter { + if x != nil { + return x.Decrement + } + return nil } -type StatesResponse_Choice struct { +// integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *StatesResponse_Choice) Reset() { - *x = StatesResponse_Choice{} +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1141] + mi := &file_otg_proto_msgTypes[1083] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StatesResponse_Choice) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatesResponse_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) ProtoMessage() {} -func (x *StatesResponse_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1141] +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1083] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107802,34 +114375,70 @@ func (x *StatesResponse_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StatesResponse_Choice.ProtoReflect.Descriptor instead. -func (*StatesResponse_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{379, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1083} } -type BgpPrefixStateRequest_PrefixFilters struct { +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Parameter 127 flags (none set) +type PatternFlowRSVPPathSenderTspecIntServParameter127Flag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *BgpPrefixStateRequest_PrefixFilters) Reset() { - *x = BgpPrefixStateRequest_PrefixFilters{} +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServParameter127Flag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1142] + mi := &file_otg_proto_msgTypes[1084] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpPrefixStateRequest_PrefixFilters) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpPrefixStateRequest_PrefixFilters) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServParameter127Flag) ProtoMessage() {} -func (x *BgpPrefixStateRequest_PrefixFilters) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1142] +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1084] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107840,72 +114449,80 @@ func (x *BgpPrefixStateRequest_PrefixFilters) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use BgpPrefixStateRequest_PrefixFilters.ProtoReflect.Descriptor instead. -func (*BgpPrefixStateRequest_PrefixFilters) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{384, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameter127Flag.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServParameter127Flag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1084} } -type BgpPrefixIpv4UnicastFilter_Origin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) GetChoice() PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_unspecified } -func (x *BgpPrefixIpv4UnicastFilter_Origin) Reset() { - *x = BgpPrefixIpv4UnicastFilter_Origin{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1143] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *BgpPrefixIpv4UnicastFilter_Origin) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*BgpPrefixIpv4UnicastFilter_Origin) ProtoMessage() {} - -func (x *BgpPrefixIpv4UnicastFilter_Origin) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1143] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpPrefixIpv4UnicastFilter_Origin.ProtoReflect.Descriptor instead. -func (*BgpPrefixIpv4UnicastFilter_Origin) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{385, 0} +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter { + if x != nil { + return x.Decrement + } + return nil } -type BgpPrefixIpv6UnicastFilter_Origin struct { +// integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 5 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *BgpPrefixIpv6UnicastFilter_Origin) Reset() { - *x = BgpPrefixIpv6UnicastFilter_Origin{} +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1144] + mi := &file_otg_proto_msgTypes[1085] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpPrefixIpv6UnicastFilter_Origin) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpPrefixIpv6UnicastFilter_Origin) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) ProtoMessage() {} -func (x *BgpPrefixIpv6UnicastFilter_Origin) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1144] +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1085] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107916,34 +114533,70 @@ func (x *BgpPrefixIpv6UnicastFilter_Origin) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use BgpPrefixIpv6UnicastFilter_Origin.ProtoReflect.Descriptor instead. -func (*BgpPrefixIpv6UnicastFilter_Origin) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{386, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1085} } -type BgpPrefixIpv4UnicastState_Origin struct { +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Parameter 127 length, 5 words not including per-service header +type PatternFlowRSVPPathSenderTspecIntServParameter127Length struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 5 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [5] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *BgpPrefixIpv4UnicastState_Origin) Reset() { - *x = BgpPrefixIpv4UnicastState_Origin{} +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServParameter127Length{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1145] + mi := &file_otg_proto_msgTypes[1086] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BgpPrefixIpv4UnicastState_Origin) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BgpPrefixIpv4UnicastState_Origin) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServParameter127Length) ProtoMessage() {} -func (x *BgpPrefixIpv4UnicastState_Origin) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1145] +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1086] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107954,72 +114607,80 @@ func (x *BgpPrefixIpv4UnicastState_Origin) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BgpPrefixIpv4UnicastState_Origin.ProtoReflect.Descriptor instead. -func (*BgpPrefixIpv4UnicastState_Origin) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{388, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameter127Length.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServParameter127Length) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1086} } -type BgpPrefixIpv6UnicastState_Origin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) GetChoice() PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_unspecified } -func (x *BgpPrefixIpv6UnicastState_Origin) Reset() { - *x = BgpPrefixIpv6UnicastState_Origin{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1146] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *BgpPrefixIpv6UnicastState_Origin) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*BgpPrefixIpv6UnicastState_Origin) ProtoMessage() {} - -func (x *BgpPrefixIpv6UnicastState_Origin) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1146] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use BgpPrefixIpv6UnicastState_Origin.ProtoReflect.Descriptor instead. -func (*BgpPrefixIpv6UnicastState_Origin) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{389, 0} +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter { + if x != nil { + return x.Decrement + } + return nil } -type ResultBgpCommunity_Type struct { +// integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *ResultBgpCommunity_Type) Reset() { - *x = ResultBgpCommunity_Type{} +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1147] + mi := &file_otg_proto_msgTypes[1087] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ResultBgpCommunity_Type) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ResultBgpCommunity_Type) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) ProtoMessage() {} -func (x *ResultBgpCommunity_Type) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1147] +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1087] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108030,34 +114691,71 @@ func (x *ResultBgpCommunity_Type) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ResultBgpCommunity_Type.ProtoReflect.Descriptor instead. -func (*ResultBgpCommunity_Type) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{390, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1087} } -type ResultBgpAsPathSegment_Type struct { +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// The minimum policed unit parameter should generally be set equal to the size of the +// smallest packet generated by the application. +type PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *ResultBgpAsPathSegment_Type) Reset() { - *x = ResultBgpAsPathSegment_Type{} +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1148] + mi := &file_otg_proto_msgTypes[1088] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ResultBgpAsPathSegment_Type) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ResultBgpAsPathSegment_Type) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) ProtoMessage() {} -func (x *ResultBgpAsPathSegment_Type) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1148] +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1088] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108068,72 +114766,80 @@ func (x *ResultBgpAsPathSegment_Type) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ResultBgpAsPathSegment_Type.ProtoReflect.Descriptor instead. -func (*ResultBgpAsPathSegment_Type) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{392, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1088} } -type IsisLspState_PduType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) GetChoice() PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_unspecified } -func (x *IsisLspState_PduType) Reset() { - *x = IsisLspState_PduType{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1149] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *IsisLspState_PduType) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*IsisLspState_PduType) ProtoMessage() {} - -func (x *IsisLspState_PduType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1149] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use IsisLspState_PduType.ProtoReflect.Descriptor instead. -func (*IsisLspState_PduType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{395, 0} +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter { + if x != nil { + return x.Decrement + } + return nil } -type IsisLspV4Prefix_RedistributionType struct { +// integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *IsisLspV4Prefix_RedistributionType) Reset() { - *x = IsisLspV4Prefix_RedistributionType{} +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1150] + mi := &file_otg_proto_msgTypes[1089] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisLspV4Prefix_RedistributionType) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspV4Prefix_RedistributionType) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) ProtoMessage() {} -func (x *IsisLspV4Prefix_RedistributionType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1150] +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1089] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108144,34 +114850,72 @@ func (x *IsisLspV4Prefix_RedistributionType) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use IsisLspV4Prefix_RedistributionType.ProtoReflect.Descriptor instead. -func (*IsisLspV4Prefix_RedistributionType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{404, 0} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1089} } -type IsisLspV4Prefix_OriginType struct { +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// The maximum packet size parameter should be set to the size of the largest packet +// the application might wish to generate. This value must, by definition, be equal +// to or larger than the value of The minimum policed unit. +type PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *IsisLspV4Prefix_OriginType) Reset() { - *x = IsisLspV4Prefix_OriginType{} +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1151] + mi := &file_otg_proto_msgTypes[1090] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisLspV4Prefix_OriginType) String() string { +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspV4Prefix_OriginType) ProtoMessage() {} +func (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) ProtoMessage() {} -func (x *IsisLspV4Prefix_OriginType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1151] +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1090] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108182,72 +114926,80 @@ func (x *IsisLspV4Prefix_OriginType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspV4Prefix_OriginType.ProtoReflect.Descriptor instead. -func (*IsisLspV4Prefix_OriginType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{404, 1} +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1090} } -type IsisLspExtendedV4Prefix_RedistributionType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) GetChoice() PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_unspecified } -func (x *IsisLspExtendedV4Prefix_RedistributionType) Reset() { - *x = IsisLspExtendedV4Prefix_RedistributionType{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1152] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *IsisLspExtendedV4Prefix_RedistributionType) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil } -func (*IsisLspExtendedV4Prefix_RedistributionType) ProtoMessage() {} - -func (x *IsisLspExtendedV4Prefix_RedistributionType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1152] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) GetIncrement() *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use IsisLspExtendedV4Prefix_RedistributionType.ProtoReflect.Descriptor instead. -func (*IsisLspExtendedV4Prefix_RedistributionType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{406, 0} +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) GetDecrement() *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter { + if x != nil { + return x.Decrement + } + return nil } -type IsisLspV6Prefix_RedistributionType struct { +// ipv4 counter pattern +type PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0.0.0.0 + Start *string `protobuf:"bytes,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 0.0.0.1 + Step *string `protobuf:"bytes,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *IsisLspV6Prefix_RedistributionType) Reset() { - *x = IsisLspV6Prefix_RedistributionType{} +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) Reset() { + *x = PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1153] + mi := &file_otg_proto_msgTypes[1091] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisLspV6Prefix_RedistributionType) String() string { +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspV6Prefix_RedistributionType) ProtoMessage() {} +func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) ProtoMessage() {} -func (x *IsisLspV6Prefix_RedistributionType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1153] +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1091] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108258,34 +115010,71 @@ func (x *IsisLspV6Prefix_RedistributionType) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use IsisLspV6Prefix_RedistributionType.ProtoReflect.Descriptor instead. -func (*IsisLspV6Prefix_RedistributionType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{408, 0} +// Deprecated: Use PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1091} } -type IsisLspV6Prefix_OriginType struct { +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) GetStart() string { + if x != nil && x.Start != nil { + return *x.Start + } + return "" +} + +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) GetStep() string { + if x != nil && x.Step != nil { + return *x.Step + } + return "" +} + +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// A 32-bit unicast, host address. Any network-reachable interface address is allowed +// here. Illegal addresses, such as certain loopback addresses, SHOULD NOT be used. +type PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0.0.0.0 + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = ['0.0.0.0'] + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *IsisLspV6Prefix_OriginType) Reset() { - *x = IsisLspV6Prefix_OriginType{} +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) Reset() { + *x = PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1154] + mi := &file_otg_proto_msgTypes[1092] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IsisLspV6Prefix_OriginType) String() string { +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) String() string { return protoimpl.X.MessageStringOf(x) } -func (*IsisLspV6Prefix_OriginType) ProtoMessage() {} +func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) ProtoMessage() {} -func (x *IsisLspV6Prefix_OriginType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1154] +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1092] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108296,72 +115085,80 @@ func (x *IsisLspV6Prefix_OriginType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use IsisLspV6Prefix_OriginType.ProtoReflect.Descriptor instead. -func (*IsisLspV6Prefix_OriginType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{408, 1} +// Deprecated: Use PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1092} } -type LldpNeighborsState_ChassisIdType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) GetChoice() PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_unspecified } -func (x *LldpNeighborsState_ChassisIdType) Reset() { - *x = LldpNeighborsState_ChassisIdType{} - if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1155] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } + return "" } -func (x *LldpNeighborsState_ChassisIdType) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) GetValues() []string { + if x != nil { + return x.Values + } + return nil } -func (*LldpNeighborsState_ChassisIdType) ProtoMessage() {} - -func (x *LldpNeighborsState_ChassisIdType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1155] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) GetIncrement() *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter { + if x != nil { + return x.Increment } - return mi.MessageOf(x) + return nil } -// Deprecated: Use LldpNeighborsState_ChassisIdType.ProtoReflect.Descriptor instead. -func (*LldpNeighborsState_ChassisIdType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{411, 0} +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) GetDecrement() *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter { + if x != nil { + return x.Decrement + } + return nil } -type LldpNeighborsState_PortIdType struct { +// integer counter pattern +type PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 32 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *LldpNeighborsState_PortIdType) Reset() { - *x = LldpNeighborsState_PortIdType{} +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) Reset() { + *x = PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1156] + mi := &file_otg_proto_msgTypes[1093] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LldpNeighborsState_PortIdType) String() string { +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpNeighborsState_PortIdType) ProtoMessage() {} +func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) ProtoMessage() {} -func (x *LldpNeighborsState_PortIdType) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1156] +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1093] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108372,34 +115169,70 @@ func (x *LldpNeighborsState_PortIdType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LldpNeighborsState_PortIdType.ProtoReflect.Descriptor instead. -func (*LldpNeighborsState_PortIdType) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{411, 1} +// Deprecated: Use PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1093} } -type LldpCapabilityState_CapabilityName struct { +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// Prefix-length of IPv4 address. +type PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 32 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [32] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *LldpCapabilityState_CapabilityName) Reset() { - *x = LldpCapabilityState_CapabilityName{} +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) Reset() { + *x = PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1157] + mi := &file_otg_proto_msgTypes[1094] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *LldpCapabilityState_CapabilityName) String() string { +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LldpCapabilityState_CapabilityName) ProtoMessage() {} +func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) ProtoMessage() {} -func (x *LldpCapabilityState_CapabilityName) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1157] +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1094] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108410,34 +115243,81 @@ func (x *LldpCapabilityState_CapabilityName) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use LldpCapabilityState_CapabilityName.ProtoReflect.Descriptor instead. -func (*LldpCapabilityState_CapabilityName) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{413, 0} +// Deprecated: Use PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1094} } -type RsvpLspState_SessionStatus struct { +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) GetChoice() PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_unspecified +} + +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value + } + return 0 +} + +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil +} + +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) GetIncrement() *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) GetDecrement() *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter { + if x != nil { + return x.Decrement + } + return nil +} + +// 0x01 = Global label. This flag indicates that the label will be understood if received +// on any interface. +type PatternFlowRSVPPathRecordRouteType1LabelFlags struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 1 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [1] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` } -func (x *RsvpLspState_SessionStatus) Reset() { - *x = RsvpLspState_SessionStatus{} +func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags) Reset() { + *x = PatternFlowRSVPPathRecordRouteType1LabelFlags{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1158] + mi := &file_otg_proto_msgTypes[1095] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RsvpLspState_SessionStatus) String() string { +func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpLspState_SessionStatus) ProtoMessage() {} +func (*PatternFlowRSVPPathRecordRouteType1LabelFlags) ProtoMessage() {} -func (x *RsvpLspState_SessionStatus) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1158] +func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1095] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108448,34 +115328,66 @@ func (x *RsvpLspState_SessionStatus) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpLspState_SessionStatus.ProtoReflect.Descriptor instead. -func (*RsvpLspState_SessionStatus) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{417, 0} +// Deprecated: Use PatternFlowRSVPPathRecordRouteType1LabelFlags.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRecordRouteType1LabelFlags) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1095} } -type RsvpLspState_LastFlapReason struct { - state protoimpl.MessageState +func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags) GetChoice() PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_unspecified +} + +func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value + } + return 0 +} + +func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil +} + +// The C-Type of the included Label Object. Copied from the Label object. +type PatternFlowRSVPPathRecordRouteType1LabelCType struct { + state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 1 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [1] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` } -func (x *RsvpLspState_LastFlapReason) Reset() { - *x = RsvpLspState_LastFlapReason{} +func (x *PatternFlowRSVPPathRecordRouteType1LabelCType) Reset() { + *x = PatternFlowRSVPPathRecordRouteType1LabelCType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1159] + mi := &file_otg_proto_msgTypes[1096] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RsvpLspState_LastFlapReason) String() string { +func (x *PatternFlowRSVPPathRecordRouteType1LabelCType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpLspState_LastFlapReason) ProtoMessage() {} +func (*PatternFlowRSVPPathRecordRouteType1LabelCType) ProtoMessage() {} -func (x *RsvpLspState_LastFlapReason) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1159] +func (x *PatternFlowRSVPPathRecordRouteType1LabelCType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1096] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108486,34 +115398,66 @@ func (x *RsvpLspState_LastFlapReason) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpLspState_LastFlapReason.ProtoReflect.Descriptor instead. -func (*RsvpLspState_LastFlapReason) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{417, 1} +// Deprecated: Use PatternFlowRSVPPathRecordRouteType1LabelCType.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRecordRouteType1LabelCType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1096} } -type RsvpLspIpv4Ero_Type struct { +func (x *PatternFlowRSVPPathRecordRouteType1LabelCType) GetChoice() PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_unspecified +} + +func (x *PatternFlowRSVPPathRecordRouteType1LabelCType) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value + } + return 0 +} + +func (x *PatternFlowRSVPPathRecordRouteType1LabelCType) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil +} + +// integer counter pattern +type PatternFlowRSVPPathObjectsCustomTypeCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = 0 + Start *uint32 `protobuf:"varint,1,opt,name=start,proto3,oneof" json:"start,omitempty"` + // Description missing in models + // default = 1 + Step *uint32 `protobuf:"varint,2,opt,name=step,proto3,oneof" json:"step,omitempty"` + // Description missing in models + // default = 1 + Count *uint32 `protobuf:"varint,3,opt,name=count,proto3,oneof" json:"count,omitempty"` } -func (x *RsvpLspIpv4Ero_Type) Reset() { - *x = RsvpLspIpv4Ero_Type{} +func (x *PatternFlowRSVPPathObjectsCustomTypeCounter) Reset() { + *x = PatternFlowRSVPPathObjectsCustomTypeCounter{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1160] + mi := &file_otg_proto_msgTypes[1097] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RsvpLspIpv4Ero_Type) String() string { +func (x *PatternFlowRSVPPathObjectsCustomTypeCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RsvpLspIpv4Ero_Type) ProtoMessage() {} +func (*PatternFlowRSVPPathObjectsCustomTypeCounter) ProtoMessage() {} -func (x *RsvpLspIpv4Ero_Type) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1160] +func (x *PatternFlowRSVPPathObjectsCustomTypeCounter) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1097] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108524,34 +115468,70 @@ func (x *RsvpLspIpv4Ero_Type) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RsvpLspIpv4Ero_Type.ProtoReflect.Descriptor instead. -func (*RsvpLspIpv4Ero_Type) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{419, 0} +// Deprecated: Use PatternFlowRSVPPathObjectsCustomTypeCounter.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathObjectsCustomTypeCounter) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1097} } -type PatternFlowEthernetDst_Choice struct { +func (x *PatternFlowRSVPPathObjectsCustomTypeCounter) GetStart() uint32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *PatternFlowRSVPPathObjectsCustomTypeCounter) GetStep() uint32 { + if x != nil && x.Step != nil { + return *x.Step + } + return 0 +} + +func (x *PatternFlowRSVPPathObjectsCustomTypeCounter) GetCount() uint32 { + if x != nil && x.Count != nil { + return *x.Count + } + return 0 +} + +// User defined object type. +type PatternFlowRSVPPathObjectsCustomType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Description missing in models + // default = Choice.Enum.value + Choice *PatternFlowRSVPPathObjectsCustomType_Choice_Enum `protobuf:"varint,1,opt,name=choice,proto3,enum=otg.PatternFlowRSVPPathObjectsCustomType_Choice_Enum,oneof" json:"choice,omitempty"` + // Description missing in models + // default = 0 + Value *uint32 `protobuf:"varint,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + // Description missing in models + // default = [0] + Values []uint32 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + // Description missing in models + Increment *PatternFlowRSVPPathObjectsCustomTypeCounter `protobuf:"bytes,5,opt,name=increment,proto3" json:"increment,omitempty"` + // Description missing in models + Decrement *PatternFlowRSVPPathObjectsCustomTypeCounter `protobuf:"bytes,6,opt,name=decrement,proto3" json:"decrement,omitempty"` } -func (x *PatternFlowEthernetDst_Choice) Reset() { - *x = PatternFlowEthernetDst_Choice{} +func (x *PatternFlowRSVPPathObjectsCustomType) Reset() { + *x = PatternFlowRSVPPathObjectsCustomType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1161] + mi := &file_otg_proto_msgTypes[1098] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetDst_Choice) String() string { +func (x *PatternFlowRSVPPathObjectsCustomType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetDst_Choice) ProtoMessage() {} +func (*PatternFlowRSVPPathObjectsCustomType) ProtoMessage() {} -func (x *PatternFlowEthernetDst_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1161] +func (x *PatternFlowRSVPPathObjectsCustomType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1098] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108562,34 +115542,80 @@ func (x *PatternFlowEthernetDst_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetDst_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetDst_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{423, 0} +// Deprecated: Use PatternFlowRSVPPathObjectsCustomType.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathObjectsCustomType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1098} } -type PatternFlowEthernetSrc_Choice struct { +func (x *PatternFlowRSVPPathObjectsCustomType) GetChoice() PatternFlowRSVPPathObjectsCustomType_Choice_Enum { + if x != nil && x.Choice != nil { + return *x.Choice + } + return PatternFlowRSVPPathObjectsCustomType_Choice_unspecified +} + +func (x *PatternFlowRSVPPathObjectsCustomType) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value + } + return 0 +} + +func (x *PatternFlowRSVPPathObjectsCustomType) GetValues() []uint32 { + if x != nil { + return x.Values + } + return nil +} + +func (x *PatternFlowRSVPPathObjectsCustomType) GetIncrement() *PatternFlowRSVPPathObjectsCustomTypeCounter { + if x != nil { + return x.Increment + } + return nil +} + +func (x *PatternFlowRSVPPathObjectsCustomType) GetDecrement() *PatternFlowRSVPPathObjectsCustomTypeCounter { + if x != nil { + return x.Decrement + } + return nil +} + +// Version details +type Version struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Version of API specification + // default = + ApiSpecVersion *string `protobuf:"bytes,1,opt,name=api_spec_version,json=apiSpecVersion,proto3,oneof" json:"api_spec_version,omitempty"` + // Version of SDK generated from API specification + // default = + SdkVersion *string `protobuf:"bytes,2,opt,name=sdk_version,json=sdkVersion,proto3,oneof" json:"sdk_version,omitempty"` + // Version of application consuming or serving the API + // default = + AppVersion *string `protobuf:"bytes,3,opt,name=app_version,json=appVersion,proto3,oneof" json:"app_version,omitempty"` } -func (x *PatternFlowEthernetSrc_Choice) Reset() { - *x = PatternFlowEthernetSrc_Choice{} +func (x *Version) Reset() { + *x = Version{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1162] + mi := &file_otg_proto_msgTypes[1099] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetSrc_Choice) String() string { +func (x *Version) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetSrc_Choice) ProtoMessage() {} +func (*Version) ProtoMessage() {} -func (x *PatternFlowEthernetSrc_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1162] +func (x *Version) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1099] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108600,34 +115626,59 @@ func (x *PatternFlowEthernetSrc_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetSrc_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetSrc_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{426, 0} +// Deprecated: Use Version.ProtoReflect.Descriptor instead. +func (*Version) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1099} } -type PatternFlowEthernetEtherType_Choice struct { +func (x *Version) GetApiSpecVersion() string { + if x != nil && x.ApiSpecVersion != nil { + return *x.ApiSpecVersion + } + return "" +} + +func (x *Version) GetSdkVersion() string { + if x != nil && x.SdkVersion != nil { + return *x.SdkVersion + } + return "" +} + +func (x *Version) GetAppVersion() string { + if x != nil && x.AppVersion != nil { + return *x.AppVersion + } + return "" +} + +// The request has succeeded with no application content but the server +// may return a list of detailed warnings. +type Success struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Warning *Warning `protobuf:"bytes,1,opt,name=warning,proto3" json:"warning,omitempty"` } -func (x *PatternFlowEthernetEtherType_Choice) Reset() { - *x = PatternFlowEthernetEtherType_Choice{} +func (x *Success) Reset() { + *x = Success{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1163] + mi := &file_otg_proto_msgTypes[1100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetEtherType_Choice) String() string { +func (x *Success) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetEtherType_Choice) ProtoMessage() {} +func (*Success) ProtoMessage() {} -func (x *PatternFlowEthernetEtherType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1163] +func (x *Success) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1100] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108638,34 +115689,44 @@ func (x *PatternFlowEthernetEtherType_Choice) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetEtherType_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetEtherType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{429, 0} +// Deprecated: Use Success.ProtoReflect.Descriptor instead. +func (*Success) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1100} } -type PatternFlowEthernetPfcQueue_Choice struct { +func (x *Success) GetWarning() *Warning { + if x != nil { + return x.Warning + } + return nil +} + +// The request did not succeed and server has responded with error details. +type Failure struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` } -func (x *PatternFlowEthernetPfcQueue_Choice) Reset() { - *x = PatternFlowEthernetPfcQueue_Choice{} +func (x *Failure) Reset() { + *x = Failure{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1164] + mi := &file_otg_proto_msgTypes[1101] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPfcQueue_Choice) String() string { +func (x *Failure) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPfcQueue_Choice) ProtoMessage() {} +func (*Failure) ProtoMessage() {} -func (x *PatternFlowEthernetPfcQueue_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1164] +func (x *Failure) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1101] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108676,34 +115737,43 @@ func (x *PatternFlowEthernetPfcQueue_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPfcQueue_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPfcQueue_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{432, 0} +// Deprecated: Use Failure.ProtoReflect.Descriptor instead. +func (*Failure) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1101} } -type PatternFlowVlanPriority_Choice struct { +func (x *Failure) GetError() *Error { + if x != nil { + return x.Error + } + return nil +} + +type SetConfigRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` } -func (x *PatternFlowVlanPriority_Choice) Reset() { - *x = PatternFlowVlanPriority_Choice{} +func (x *SetConfigRequest) Reset() { + *x = SetConfigRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1165] + mi := &file_otg_proto_msgTypes[1102] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowVlanPriority_Choice) String() string { +func (x *SetConfigRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanPriority_Choice) ProtoMessage() {} +func (*SetConfigRequest) ProtoMessage() {} -func (x *PatternFlowVlanPriority_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1165] +func (x *SetConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1102] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108714,34 +115784,43 @@ func (x *PatternFlowVlanPriority_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanPriority_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanPriority_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{435, 0} +// Deprecated: Use SetConfigRequest.ProtoReflect.Descriptor instead. +func (*SetConfigRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1102} } -type PatternFlowVlanCfi_Choice struct { +func (x *SetConfigRequest) GetConfig() *Config { + if x != nil { + return x.Config + } + return nil +} + +type UpdateConfigRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + ConfigUpdate *ConfigUpdate `protobuf:"bytes,1,opt,name=config_update,json=configUpdate,proto3" json:"config_update,omitempty"` } -func (x *PatternFlowVlanCfi_Choice) Reset() { - *x = PatternFlowVlanCfi_Choice{} +func (x *UpdateConfigRequest) Reset() { + *x = UpdateConfigRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1166] + mi := &file_otg_proto_msgTypes[1103] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowVlanCfi_Choice) String() string { +func (x *UpdateConfigRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanCfi_Choice) ProtoMessage() {} +func (*UpdateConfigRequest) ProtoMessage() {} -func (x *PatternFlowVlanCfi_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1166] +func (x *UpdateConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1103] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108752,34 +115831,43 @@ func (x *PatternFlowVlanCfi_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanCfi_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanCfi_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{438, 0} +// Deprecated: Use UpdateConfigRequest.ProtoReflect.Descriptor instead. +func (*UpdateConfigRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1103} } -type PatternFlowVlanId_Choice struct { +func (x *UpdateConfigRequest) GetConfigUpdate() *ConfigUpdate { + if x != nil { + return x.ConfigUpdate + } + return nil +} + +type SetConfigResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Warning *Warning `protobuf:"bytes,1,opt,name=warning,proto3" json:"warning,omitempty"` } -func (x *PatternFlowVlanId_Choice) Reset() { - *x = PatternFlowVlanId_Choice{} +func (x *SetConfigResponse) Reset() { + *x = SetConfigResponse{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1167] + mi := &file_otg_proto_msgTypes[1104] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowVlanId_Choice) String() string { +func (x *SetConfigResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanId_Choice) ProtoMessage() {} +func (*SetConfigResponse) ProtoMessage() {} -func (x *PatternFlowVlanId_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1167] +func (x *SetConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1104] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108790,34 +115878,43 @@ func (x *PatternFlowVlanId_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanId_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanId_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{441, 0} +// Deprecated: Use SetConfigResponse.ProtoReflect.Descriptor instead. +func (*SetConfigResponse) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1104} } -type PatternFlowVlanTpid_Choice struct { +func (x *SetConfigResponse) GetWarning() *Warning { + if x != nil { + return x.Warning + } + return nil +} + +type GetConfigResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` } -func (x *PatternFlowVlanTpid_Choice) Reset() { - *x = PatternFlowVlanTpid_Choice{} +func (x *GetConfigResponse) Reset() { + *x = GetConfigResponse{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1168] + mi := &file_otg_proto_msgTypes[1105] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowVlanTpid_Choice) String() string { +func (x *GetConfigResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVlanTpid_Choice) ProtoMessage() {} +func (*GetConfigResponse) ProtoMessage() {} -func (x *PatternFlowVlanTpid_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1168] +func (x *GetConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1105] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108828,34 +115925,43 @@ func (x *PatternFlowVlanTpid_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVlanTpid_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowVlanTpid_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{444, 0} +// Deprecated: Use GetConfigResponse.ProtoReflect.Descriptor instead. +func (*GetConfigResponse) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1105} } -type PatternFlowVxlanFlags_Choice struct { +func (x *GetConfigResponse) GetConfig() *Config { + if x != nil { + return x.Config + } + return nil +} + +type UpdateConfigResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Warning *Warning `protobuf:"bytes,1,opt,name=warning,proto3" json:"warning,omitempty"` } -func (x *PatternFlowVxlanFlags_Choice) Reset() { - *x = PatternFlowVxlanFlags_Choice{} +func (x *UpdateConfigResponse) Reset() { + *x = UpdateConfigResponse{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1169] + mi := &file_otg_proto_msgTypes[1106] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowVxlanFlags_Choice) String() string { +func (x *UpdateConfigResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanFlags_Choice) ProtoMessage() {} +func (*UpdateConfigResponse) ProtoMessage() {} -func (x *PatternFlowVxlanFlags_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1169] +func (x *UpdateConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1106] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108866,34 +115972,43 @@ func (x *PatternFlowVxlanFlags_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanFlags_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanFlags_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{447, 0} +// Deprecated: Use UpdateConfigResponse.ProtoReflect.Descriptor instead. +func (*UpdateConfigResponse) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1106} } -type PatternFlowVxlanReserved0_Choice struct { +func (x *UpdateConfigResponse) GetWarning() *Warning { + if x != nil { + return x.Warning + } + return nil +} + +type SetControlStateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + ControlState *ControlState `protobuf:"bytes,1,opt,name=control_state,json=controlState,proto3" json:"control_state,omitempty"` } -func (x *PatternFlowVxlanReserved0_Choice) Reset() { - *x = PatternFlowVxlanReserved0_Choice{} +func (x *SetControlStateRequest) Reset() { + *x = SetControlStateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1170] + mi := &file_otg_proto_msgTypes[1107] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowVxlanReserved0_Choice) String() string { +func (x *SetControlStateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanReserved0_Choice) ProtoMessage() {} +func (*SetControlStateRequest) ProtoMessage() {} -func (x *PatternFlowVxlanReserved0_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1170] +func (x *SetControlStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1107] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108904,34 +116019,43 @@ func (x *PatternFlowVxlanReserved0_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanReserved0_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanReserved0_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{450, 0} +// Deprecated: Use SetControlStateRequest.ProtoReflect.Descriptor instead. +func (*SetControlStateRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1107} } -type PatternFlowVxlanVni_Choice struct { +func (x *SetControlStateRequest) GetControlState() *ControlState { + if x != nil { + return x.ControlState + } + return nil +} + +type SetControlStateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Warning *Warning `protobuf:"bytes,1,opt,name=warning,proto3" json:"warning,omitempty"` } -func (x *PatternFlowVxlanVni_Choice) Reset() { - *x = PatternFlowVxlanVni_Choice{} +func (x *SetControlStateResponse) Reset() { + *x = SetControlStateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1171] + mi := &file_otg_proto_msgTypes[1108] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowVxlanVni_Choice) String() string { +func (x *SetControlStateResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanVni_Choice) ProtoMessage() {} +func (*SetControlStateResponse) ProtoMessage() {} -func (x *PatternFlowVxlanVni_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1171] +func (x *SetControlStateResponse) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1108] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108942,34 +116066,43 @@ func (x *PatternFlowVxlanVni_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanVni_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanVni_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{453, 0} +// Deprecated: Use SetControlStateResponse.ProtoReflect.Descriptor instead. +func (*SetControlStateResponse) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1108} } -type PatternFlowVxlanReserved1_Choice struct { +func (x *SetControlStateResponse) GetWarning() *Warning { + if x != nil { + return x.Warning + } + return nil +} + +type SetControlActionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + ControlAction *ControlAction `protobuf:"bytes,1,opt,name=control_action,json=controlAction,proto3" json:"control_action,omitempty"` } -func (x *PatternFlowVxlanReserved1_Choice) Reset() { - *x = PatternFlowVxlanReserved1_Choice{} +func (x *SetControlActionRequest) Reset() { + *x = SetControlActionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1172] + mi := &file_otg_proto_msgTypes[1109] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowVxlanReserved1_Choice) String() string { +func (x *SetControlActionRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowVxlanReserved1_Choice) ProtoMessage() {} +func (*SetControlActionRequest) ProtoMessage() {} -func (x *PatternFlowVxlanReserved1_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1172] +func (x *SetControlActionRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1109] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108980,34 +116113,43 @@ func (x *PatternFlowVxlanReserved1_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowVxlanReserved1_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowVxlanReserved1_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{456, 0} +// Deprecated: Use SetControlActionRequest.ProtoReflect.Descriptor instead. +func (*SetControlActionRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1109} } -type PatternFlowIpv4Version_Choice struct { +func (x *SetControlActionRequest) GetControlAction() *ControlAction { + if x != nil { + return x.ControlAction + } + return nil +} + +type SetControlActionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + ControlActionResponse *ControlActionResponse `protobuf:"bytes,1,opt,name=control_action_response,json=controlActionResponse,proto3" json:"control_action_response,omitempty"` } -func (x *PatternFlowIpv4Version_Choice) Reset() { - *x = PatternFlowIpv4Version_Choice{} +func (x *SetControlActionResponse) Reset() { + *x = SetControlActionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1173] + mi := &file_otg_proto_msgTypes[1110] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4Version_Choice) String() string { +func (x *SetControlActionResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4Version_Choice) ProtoMessage() {} +func (*SetControlActionResponse) ProtoMessage() {} -func (x *PatternFlowIpv4Version_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1173] +func (x *SetControlActionResponse) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1110] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109018,34 +116160,43 @@ func (x *PatternFlowIpv4Version_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4Version_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4Version_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{459, 0} +// Deprecated: Use SetControlActionResponse.ProtoReflect.Descriptor instead. +func (*SetControlActionResponse) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1110} } -type PatternFlowIpv4HeaderLength_Choice struct { +func (x *SetControlActionResponse) GetControlActionResponse() *ControlActionResponse { + if x != nil { + return x.ControlActionResponse + } + return nil +} + +type GetMetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + MetricsRequest *MetricsRequest `protobuf:"bytes,1,opt,name=metrics_request,json=metricsRequest,proto3" json:"metrics_request,omitempty"` } -func (x *PatternFlowIpv4HeaderLength_Choice) Reset() { - *x = PatternFlowIpv4HeaderLength_Choice{} +func (x *GetMetricsRequest) Reset() { + *x = GetMetricsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1174] + mi := &file_otg_proto_msgTypes[1111] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4HeaderLength_Choice) String() string { +func (x *GetMetricsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4HeaderLength_Choice) ProtoMessage() {} +func (*GetMetricsRequest) ProtoMessage() {} -func (x *PatternFlowIpv4HeaderLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1174] +func (x *GetMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1111] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109056,34 +116207,43 @@ func (x *PatternFlowIpv4HeaderLength_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4HeaderLength_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4HeaderLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{462, 0} +// Deprecated: Use GetMetricsRequest.ProtoReflect.Descriptor instead. +func (*GetMetricsRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1111} } -type PatternFlowIpv4TotalLength_Choice struct { +func (x *GetMetricsRequest) GetMetricsRequest() *MetricsRequest { + if x != nil { + return x.MetricsRequest + } + return nil +} + +type GetMetricsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + MetricsResponse *MetricsResponse `protobuf:"bytes,1,opt,name=metrics_response,json=metricsResponse,proto3" json:"metrics_response,omitempty"` } -func (x *PatternFlowIpv4TotalLength_Choice) Reset() { - *x = PatternFlowIpv4TotalLength_Choice{} +func (x *GetMetricsResponse) Reset() { + *x = GetMetricsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1175] + mi := &file_otg_proto_msgTypes[1112] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TotalLength_Choice) String() string { +func (x *GetMetricsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TotalLength_Choice) ProtoMessage() {} +func (*GetMetricsResponse) ProtoMessage() {} -func (x *PatternFlowIpv4TotalLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1175] +func (x *GetMetricsResponse) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1112] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109094,34 +116254,43 @@ func (x *PatternFlowIpv4TotalLength_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TotalLength_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TotalLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{465, 0} +// Deprecated: Use GetMetricsResponse.ProtoReflect.Descriptor instead. +func (*GetMetricsResponse) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1112} } -type PatternFlowIpv4Identification_Choice struct { +func (x *GetMetricsResponse) GetMetricsResponse() *MetricsResponse { + if x != nil { + return x.MetricsResponse + } + return nil +} + +type GetStatesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + StatesRequest *StatesRequest `protobuf:"bytes,1,opt,name=states_request,json=statesRequest,proto3" json:"states_request,omitempty"` } -func (x *PatternFlowIpv4Identification_Choice) Reset() { - *x = PatternFlowIpv4Identification_Choice{} +func (x *GetStatesRequest) Reset() { + *x = GetStatesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1176] + mi := &file_otg_proto_msgTypes[1113] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4Identification_Choice) String() string { +func (x *GetStatesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4Identification_Choice) ProtoMessage() {} +func (*GetStatesRequest) ProtoMessage() {} -func (x *PatternFlowIpv4Identification_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1176] +func (x *GetStatesRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1113] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109132,34 +116301,43 @@ func (x *PatternFlowIpv4Identification_Choice) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4Identification_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4Identification_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{468, 0} +// Deprecated: Use GetStatesRequest.ProtoReflect.Descriptor instead. +func (*GetStatesRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1113} } -type PatternFlowIpv4Reserved_Choice struct { +func (x *GetStatesRequest) GetStatesRequest() *StatesRequest { + if x != nil { + return x.StatesRequest + } + return nil +} + +type GetStatesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + StatesResponse *StatesResponse `protobuf:"bytes,1,opt,name=states_response,json=statesResponse,proto3" json:"states_response,omitempty"` } -func (x *PatternFlowIpv4Reserved_Choice) Reset() { - *x = PatternFlowIpv4Reserved_Choice{} +func (x *GetStatesResponse) Reset() { + *x = GetStatesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1177] + mi := &file_otg_proto_msgTypes[1114] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4Reserved_Choice) String() string { +func (x *GetStatesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4Reserved_Choice) ProtoMessage() {} +func (*GetStatesResponse) ProtoMessage() {} -func (x *PatternFlowIpv4Reserved_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1177] +func (x *GetStatesResponse) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1114] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109170,34 +116348,43 @@ func (x *PatternFlowIpv4Reserved_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4Reserved_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4Reserved_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{471, 0} +// Deprecated: Use GetStatesResponse.ProtoReflect.Descriptor instead. +func (*GetStatesResponse) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1114} } -type PatternFlowIpv4DontFragment_Choice struct { +func (x *GetStatesResponse) GetStatesResponse() *StatesResponse { + if x != nil { + return x.StatesResponse + } + return nil +} + +type GetCaptureRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + CaptureRequest *CaptureRequest `protobuf:"bytes,1,opt,name=capture_request,json=captureRequest,proto3" json:"capture_request,omitempty"` } -func (x *PatternFlowIpv4DontFragment_Choice) Reset() { - *x = PatternFlowIpv4DontFragment_Choice{} +func (x *GetCaptureRequest) Reset() { + *x = GetCaptureRequest{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1178] + mi := &file_otg_proto_msgTypes[1115] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4DontFragment_Choice) String() string { +func (x *GetCaptureRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4DontFragment_Choice) ProtoMessage() {} +func (*GetCaptureRequest) ProtoMessage() {} -func (x *PatternFlowIpv4DontFragment_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1178] +func (x *GetCaptureRequest) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1115] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109208,34 +116395,43 @@ func (x *PatternFlowIpv4DontFragment_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4DontFragment_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4DontFragment_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{474, 0} +// Deprecated: Use GetCaptureRequest.ProtoReflect.Descriptor instead. +func (*GetCaptureRequest) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1115} } -type PatternFlowIpv4MoreFragments_Choice struct { +func (x *GetCaptureRequest) GetCaptureRequest() *CaptureRequest { + if x != nil { + return x.CaptureRequest + } + return nil +} + +type GetCaptureResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + ResponseBytes []byte `protobuf:"bytes,1,opt,name=response_bytes,json=responseBytes,proto3" json:"response_bytes,omitempty"` } -func (x *PatternFlowIpv4MoreFragments_Choice) Reset() { - *x = PatternFlowIpv4MoreFragments_Choice{} +func (x *GetCaptureResponse) Reset() { + *x = GetCaptureResponse{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1179] + mi := &file_otg_proto_msgTypes[1116] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4MoreFragments_Choice) String() string { +func (x *GetCaptureResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4MoreFragments_Choice) ProtoMessage() {} +func (*GetCaptureResponse) ProtoMessage() {} -func (x *PatternFlowIpv4MoreFragments_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1179] +func (x *GetCaptureResponse) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1116] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109246,34 +116442,43 @@ func (x *PatternFlowIpv4MoreFragments_Choice) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4MoreFragments_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4MoreFragments_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{477, 0} +// Deprecated: Use GetCaptureResponse.ProtoReflect.Descriptor instead. +func (*GetCaptureResponse) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1116} } -type PatternFlowIpv4FragmentOffset_Choice struct { +func (x *GetCaptureResponse) GetResponseBytes() []byte { + if x != nil { + return x.ResponseBytes + } + return nil +} + +type GetVersionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Version *Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` } -func (x *PatternFlowIpv4FragmentOffset_Choice) Reset() { - *x = PatternFlowIpv4FragmentOffset_Choice{} +func (x *GetVersionResponse) Reset() { + *x = GetVersionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1180] + mi := &file_otg_proto_msgTypes[1117] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4FragmentOffset_Choice) String() string { +func (x *GetVersionResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4FragmentOffset_Choice) ProtoMessage() {} +func (*GetVersionResponse) ProtoMessage() {} -func (x *PatternFlowIpv4FragmentOffset_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1180] +func (x *GetVersionResponse) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1117] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109284,34 +116489,41 @@ func (x *PatternFlowIpv4FragmentOffset_Choice) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4FragmentOffset_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4FragmentOffset_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{480, 0} +// Deprecated: Use GetVersionResponse.ProtoReflect.Descriptor instead. +func (*GetVersionResponse) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1117} } -type PatternFlowIpv4TimeToLive_Choice struct { +func (x *GetVersionResponse) GetVersion() *Version { + if x != nil { + return x.Version + } + return nil +} + +type LagProtocol_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4TimeToLive_Choice) Reset() { - *x = PatternFlowIpv4TimeToLive_Choice{} +func (x *LagProtocol_Choice) Reset() { + *x = LagProtocol_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1181] + mi := &file_otg_proto_msgTypes[1118] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TimeToLive_Choice) String() string { +func (x *LagProtocol_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TimeToLive_Choice) ProtoMessage() {} +func (*LagProtocol_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4TimeToLive_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1181] +func (x *LagProtocol_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1118] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109322,34 +116534,34 @@ func (x *PatternFlowIpv4TimeToLive_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TimeToLive_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TimeToLive_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{483, 0} +// Deprecated: Use LagProtocol_Choice.ProtoReflect.Descriptor instead. +func (*LagProtocol_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{6, 0} } -type PatternFlowIpv4Protocol_Choice struct { +type LagPortLacp_ActorActivity struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4Protocol_Choice) Reset() { - *x = PatternFlowIpv4Protocol_Choice{} +func (x *LagPortLacp_ActorActivity) Reset() { + *x = LagPortLacp_ActorActivity{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1182] + mi := &file_otg_proto_msgTypes[1119] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4Protocol_Choice) String() string { +func (x *LagPortLacp_ActorActivity) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4Protocol_Choice) ProtoMessage() {} +func (*LagPortLacp_ActorActivity) ProtoMessage() {} -func (x *PatternFlowIpv4Protocol_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1182] +func (x *LagPortLacp_ActorActivity) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1119] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109360,34 +116572,34 @@ func (x *PatternFlowIpv4Protocol_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4Protocol_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4Protocol_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{486, 0} +// Deprecated: Use LagPortLacp_ActorActivity.ProtoReflect.Descriptor instead. +func (*LagPortLacp_ActorActivity) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{9, 0} } -type PatternFlowIpv4HeaderChecksum_Choice struct { +type EthernetConnection_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4HeaderChecksum_Choice) Reset() { - *x = PatternFlowIpv4HeaderChecksum_Choice{} +func (x *EthernetConnection_Choice) Reset() { + *x = EthernetConnection_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1183] + mi := &file_otg_proto_msgTypes[1120] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4HeaderChecksum_Choice) String() string { +func (x *EthernetConnection_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4HeaderChecksum_Choice) ProtoMessage() {} +func (*EthernetConnection_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4HeaderChecksum_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1183] +func (x *EthernetConnection_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1120] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109398,34 +116610,34 @@ func (x *PatternFlowIpv4HeaderChecksum_Choice) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4HeaderChecksum_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4HeaderChecksum_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{487, 0} +// Deprecated: Use EthernetConnection_Choice.ProtoReflect.Descriptor instead. +func (*EthernetConnection_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{12, 0} } -type PatternFlowIpv4HeaderChecksum_Generated struct { +type EthernetSimulatedLink_LinkType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4HeaderChecksum_Generated) Reset() { - *x = PatternFlowIpv4HeaderChecksum_Generated{} +func (x *EthernetSimulatedLink_LinkType) Reset() { + *x = EthernetSimulatedLink_LinkType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1184] + mi := &file_otg_proto_msgTypes[1121] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4HeaderChecksum_Generated) String() string { +func (x *EthernetSimulatedLink_LinkType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4HeaderChecksum_Generated) ProtoMessage() {} +func (*EthernetSimulatedLink_LinkType) ProtoMessage() {} -func (x *PatternFlowIpv4HeaderChecksum_Generated) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1184] +func (x *EthernetSimulatedLink_LinkType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1121] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109436,34 +116648,34 @@ func (x *PatternFlowIpv4HeaderChecksum_Generated) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4HeaderChecksum_Generated.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4HeaderChecksum_Generated) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{487, 1} +// Deprecated: Use EthernetSimulatedLink_LinkType.ProtoReflect.Descriptor instead. +func (*EthernetSimulatedLink_LinkType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{13, 0} } -type PatternFlowIpv4Src_Choice struct { +type DeviceVlan_Tpid struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4Src_Choice) Reset() { - *x = PatternFlowIpv4Src_Choice{} +func (x *DeviceVlan_Tpid) Reset() { + *x = DeviceVlan_Tpid{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1185] + mi := &file_otg_proto_msgTypes[1122] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4Src_Choice) String() string { +func (x *DeviceVlan_Tpid) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4Src_Choice) ProtoMessage() {} +func (*DeviceVlan_Tpid) ProtoMessage() {} -func (x *PatternFlowIpv4Src_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1185] +func (x *DeviceVlan_Tpid) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1122] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109474,34 +116686,34 @@ func (x *PatternFlowIpv4Src_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4Src_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4Src_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{490, 0} +// Deprecated: Use DeviceVlan_Tpid.ProtoReflect.Descriptor instead. +func (*DeviceVlan_Tpid) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{14, 0} } -type PatternFlowIpv4Dst_Choice struct { +type DeviceIpv4GatewayMAC_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4Dst_Choice) Reset() { - *x = PatternFlowIpv4Dst_Choice{} +func (x *DeviceIpv4GatewayMAC_Choice) Reset() { + *x = DeviceIpv4GatewayMAC_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1186] + mi := &file_otg_proto_msgTypes[1123] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4Dst_Choice) String() string { +func (x *DeviceIpv4GatewayMAC_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4Dst_Choice) ProtoMessage() {} +func (*DeviceIpv4GatewayMAC_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4Dst_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1186] +func (x *DeviceIpv4GatewayMAC_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1123] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109512,34 +116724,34 @@ func (x *PatternFlowIpv4Dst_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4Dst_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4Dst_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{493, 0} +// Deprecated: Use DeviceIpv4GatewayMAC_Choice.ProtoReflect.Descriptor instead. +func (*DeviceIpv4GatewayMAC_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{17, 0} } -type PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice struct { +type DeviceIpv6GatewayMAC_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice) Reset() { - *x = PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice{} +func (x *DeviceIpv6GatewayMAC_Choice) Reset() { + *x = DeviceIpv6GatewayMAC_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1187] + mi := &file_otg_proto_msgTypes[1124] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice) String() string { +func (x *DeviceIpv6GatewayMAC_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice) ProtoMessage() {} +func (*DeviceIpv6GatewayMAC_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1187] +func (x *DeviceIpv6GatewayMAC_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1124] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109550,34 +116762,34 @@ func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice) ProtoReflect() proto return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{495, 0} +// Deprecated: Use DeviceIpv6GatewayMAC_Choice.ProtoReflect.Descriptor instead. +func (*DeviceIpv6GatewayMAC_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{20, 0} } -type PatternFlowIpv4OptionsCustomTypeOptionClass_Choice struct { +type DeviceDhcpv4Client_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4OptionsCustomTypeOptionClass_Choice) Reset() { - *x = PatternFlowIpv4OptionsCustomTypeOptionClass_Choice{} +func (x *DeviceDhcpv4Client_Choice) Reset() { + *x = DeviceDhcpv4Client_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1188] + mi := &file_otg_proto_msgTypes[1125] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4OptionsCustomTypeOptionClass_Choice) String() string { +func (x *DeviceDhcpv4Client_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4OptionsCustomTypeOptionClass_Choice) ProtoMessage() {} +func (*DeviceDhcpv4Client_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4OptionsCustomTypeOptionClass_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1188] +func (x *DeviceDhcpv4Client_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1125] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109588,34 +116800,34 @@ func (x *PatternFlowIpv4OptionsCustomTypeOptionClass_Choice) ProtoReflect() prot return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4OptionsCustomTypeOptionClass_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4OptionsCustomTypeOptionClass_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{497, 0} +// Deprecated: Use DeviceDhcpv4Client_Choice.ProtoReflect.Descriptor instead. +func (*DeviceDhcpv4Client_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{21, 0} } -type PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice struct { +type DeviceDhcpv6ClientIaType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice) Reset() { - *x = PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice{} +func (x *DeviceDhcpv6ClientIaType_Choice) Reset() { + *x = DeviceDhcpv6ClientIaType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1189] + mi := &file_otg_proto_msgTypes[1126] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice) String() string { +func (x *DeviceDhcpv6ClientIaType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice) ProtoMessage() {} +func (*DeviceDhcpv6ClientIaType_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1189] +func (x *DeviceDhcpv6ClientIaType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1126] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109626,34 +116838,34 @@ func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice) ProtoReflect() pro return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{499, 0} +// Deprecated: Use DeviceDhcpv6ClientIaType_Choice.ProtoReflect.Descriptor instead. +func (*DeviceDhcpv6ClientIaType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{26, 0} } -type PatternFlowIpv4PriorityRaw_Choice struct { +type DeviceDhcpv6ClientDuidType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4PriorityRaw_Choice) Reset() { - *x = PatternFlowIpv4PriorityRaw_Choice{} +func (x *DeviceDhcpv6ClientDuidType_Choice) Reset() { + *x = DeviceDhcpv6ClientDuidType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1190] + mi := &file_otg_proto_msgTypes[1127] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4PriorityRaw_Choice) String() string { +func (x *DeviceDhcpv6ClientDuidType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4PriorityRaw_Choice) ProtoMessage() {} +func (*DeviceDhcpv6ClientDuidType_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4PriorityRaw_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1190] +func (x *DeviceDhcpv6ClientDuidType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1127] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109664,34 +116876,34 @@ func (x *PatternFlowIpv4PriorityRaw_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4PriorityRaw_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4PriorityRaw_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{502, 0} +// Deprecated: Use DeviceDhcpv6ClientDuidType_Choice.ProtoReflect.Descriptor instead. +func (*DeviceDhcpv6ClientDuidType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{28, 0} } -type PatternFlowIpv4DscpPhb_Choice struct { +type Dhcpv6ClientOptionsServerIdentifier_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4DscpPhb_Choice) Reset() { - *x = PatternFlowIpv4DscpPhb_Choice{} +func (x *Dhcpv6ClientOptionsServerIdentifier_Choice) Reset() { + *x = Dhcpv6ClientOptionsServerIdentifier_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1191] + mi := &file_otg_proto_msgTypes[1128] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4DscpPhb_Choice) String() string { +func (x *Dhcpv6ClientOptionsServerIdentifier_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4DscpPhb_Choice) ProtoMessage() {} +func (*Dhcpv6ClientOptionsServerIdentifier_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4DscpPhb_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1191] +func (x *Dhcpv6ClientOptionsServerIdentifier_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1128] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109702,34 +116914,34 @@ func (x *PatternFlowIpv4DscpPhb_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4DscpPhb_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4DscpPhb_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{505, 0} +// Deprecated: Use Dhcpv6ClientOptionsServerIdentifier_Choice.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsServerIdentifier_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{31, 0} } -type PatternFlowIpv4DscpEcn_Choice struct { +type Dhcpv6ClientOptionsDuidUuidVersion_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4DscpEcn_Choice) Reset() { - *x = PatternFlowIpv4DscpEcn_Choice{} +func (x *Dhcpv6ClientOptionsDuidUuidVersion_Choice) Reset() { + *x = Dhcpv6ClientOptionsDuidUuidVersion_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1192] + mi := &file_otg_proto_msgTypes[1129] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4DscpEcn_Choice) String() string { +func (x *Dhcpv6ClientOptionsDuidUuidVersion_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4DscpEcn_Choice) ProtoMessage() {} +func (*Dhcpv6ClientOptionsDuidUuidVersion_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4DscpEcn_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1192] +func (x *Dhcpv6ClientOptionsDuidUuidVersion_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1129] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109740,34 +116952,34 @@ func (x *PatternFlowIpv4DscpEcn_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4DscpEcn_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4DscpEcn_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{508, 0} +// Deprecated: Use Dhcpv6ClientOptionsDuidUuidVersion_Choice.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsDuidUuidVersion_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{36, 0} } -type PatternFlowIpv4TosPrecedence_Choice struct { +type Dhcpv6ClientOptionsDuidUuidVariant_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4TosPrecedence_Choice) Reset() { - *x = PatternFlowIpv4TosPrecedence_Choice{} +func (x *Dhcpv6ClientOptionsDuidUuidVariant_Choice) Reset() { + *x = Dhcpv6ClientOptionsDuidUuidVariant_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1193] + mi := &file_otg_proto_msgTypes[1130] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosPrecedence_Choice) String() string { +func (x *Dhcpv6ClientOptionsDuidUuidVariant_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosPrecedence_Choice) ProtoMessage() {} +func (*Dhcpv6ClientOptionsDuidUuidVariant_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4TosPrecedence_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1193] +func (x *Dhcpv6ClientOptionsDuidUuidVariant_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1130] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109778,34 +116990,34 @@ func (x *PatternFlowIpv4TosPrecedence_Choice) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosPrecedence_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosPrecedence_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{511, 0} +// Deprecated: Use Dhcpv6ClientOptionsDuidUuidVariant_Choice.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsDuidUuidVariant_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{37, 0} } -type PatternFlowIpv4TosDelay_Choice struct { +type Dhcpv6ClientOptionsOptionsRequest_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4TosDelay_Choice) Reset() { - *x = PatternFlowIpv4TosDelay_Choice{} +func (x *Dhcpv6ClientOptionsOptionsRequest_Choice) Reset() { + *x = Dhcpv6ClientOptionsOptionsRequest_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1194] + mi := &file_otg_proto_msgTypes[1131] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosDelay_Choice) String() string { +func (x *Dhcpv6ClientOptionsOptionsRequest_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosDelay_Choice) ProtoMessage() {} +func (*Dhcpv6ClientOptionsOptionsRequest_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4TosDelay_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1194] +func (x *Dhcpv6ClientOptionsOptionsRequest_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1131] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109816,34 +117028,34 @@ func (x *PatternFlowIpv4TosDelay_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosDelay_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosDelay_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{514, 0} +// Deprecated: Use Dhcpv6ClientOptionsOptionsRequest_Choice.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsOptionsRequest_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{39, 0} } -type PatternFlowIpv4TosThroughput_Choice struct { +type Dhcpv6ClientOptionsIncludedMessages_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4TosThroughput_Choice) Reset() { - *x = PatternFlowIpv4TosThroughput_Choice{} +func (x *Dhcpv6ClientOptionsIncludedMessages_Choice) Reset() { + *x = Dhcpv6ClientOptionsIncludedMessages_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1195] + mi := &file_otg_proto_msgTypes[1132] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosThroughput_Choice) String() string { +func (x *Dhcpv6ClientOptionsIncludedMessages_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosThroughput_Choice) ProtoMessage() {} +func (*Dhcpv6ClientOptionsIncludedMessages_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4TosThroughput_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1195] +func (x *Dhcpv6ClientOptionsIncludedMessages_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1132] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109854,34 +117066,34 @@ func (x *PatternFlowIpv4TosThroughput_Choice) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosThroughput_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosThroughput_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{517, 0} +// Deprecated: Use Dhcpv6ClientOptionsIncludedMessages_Choice.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsIncludedMessages_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{42, 0} } -type PatternFlowIpv4TosReliability_Choice struct { +type Dhcpv6ClientOptionsMessageType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4TosReliability_Choice) Reset() { - *x = PatternFlowIpv4TosReliability_Choice{} +func (x *Dhcpv6ClientOptionsMessageType_Choice) Reset() { + *x = Dhcpv6ClientOptionsMessageType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1196] + mi := &file_otg_proto_msgTypes[1133] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosReliability_Choice) String() string { +func (x *Dhcpv6ClientOptionsMessageType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosReliability_Choice) ProtoMessage() {} +func (*Dhcpv6ClientOptionsMessageType_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4TosReliability_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1196] +func (x *Dhcpv6ClientOptionsMessageType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1133] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109892,34 +117104,34 @@ func (x *PatternFlowIpv4TosReliability_Choice) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosReliability_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosReliability_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{520, 0} +// Deprecated: Use Dhcpv6ClientOptionsMessageType_Choice.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientOptionsMessageType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{43, 0} } -type PatternFlowIpv4TosMonetary_Choice struct { +type Dhcpv6ServerOptionsIncludedMessages_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4TosMonetary_Choice) Reset() { - *x = PatternFlowIpv4TosMonetary_Choice{} +func (x *Dhcpv6ServerOptionsIncludedMessages_Choice) Reset() { + *x = Dhcpv6ServerOptionsIncludedMessages_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1197] + mi := &file_otg_proto_msgTypes[1134] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosMonetary_Choice) String() string { +func (x *Dhcpv6ServerOptionsIncludedMessages_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosMonetary_Choice) ProtoMessage() {} +func (*Dhcpv6ServerOptionsIncludedMessages_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4TosMonetary_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1197] +func (x *Dhcpv6ServerOptionsIncludedMessages_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1134] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109930,34 +117142,34 @@ func (x *PatternFlowIpv4TosMonetary_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosMonetary_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosMonetary_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{523, 0} +// Deprecated: Use Dhcpv6ServerOptionsIncludedMessages_Choice.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerOptionsIncludedMessages_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{46, 0} } -type PatternFlowIpv4TosUnused_Choice struct { +type Dhcpv6ServerOptionsMessageType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv4TosUnused_Choice) Reset() { - *x = PatternFlowIpv4TosUnused_Choice{} +func (x *Dhcpv6ServerOptionsMessageType_Choice) Reset() { + *x = Dhcpv6ServerOptionsMessageType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1198] + mi := &file_otg_proto_msgTypes[1135] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv4TosUnused_Choice) String() string { +func (x *Dhcpv6ServerOptionsMessageType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv4TosUnused_Choice) ProtoMessage() {} +func (*Dhcpv6ServerOptionsMessageType_Choice) ProtoMessage() {} -func (x *PatternFlowIpv4TosUnused_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1198] +func (x *Dhcpv6ServerOptionsMessageType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1135] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109968,34 +117180,34 @@ func (x *PatternFlowIpv4TosUnused_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv4TosUnused_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv4TosUnused_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{526, 0} +// Deprecated: Use Dhcpv6ServerOptionsMessageType_Choice.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerOptionsMessageType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{47, 0} } -type PatternFlowIpv6Version_Choice struct { +type Layer1_Speed struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv6Version_Choice) Reset() { - *x = PatternFlowIpv6Version_Choice{} +func (x *Layer1_Speed) Reset() { + *x = Layer1_Speed{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1199] + mi := &file_otg_proto_msgTypes[1136] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6Version_Choice) String() string { +func (x *Layer1_Speed) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6Version_Choice) ProtoMessage() {} +func (*Layer1_Speed) ProtoMessage() {} -func (x *PatternFlowIpv6Version_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1199] +func (x *Layer1_Speed) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1136] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110006,34 +117218,34 @@ func (x *PatternFlowIpv6Version_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6Version_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6Version_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{529, 0} +// Deprecated: Use Layer1_Speed.ProtoReflect.Descriptor instead. +func (*Layer1_Speed) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{52, 0} } -type PatternFlowIpv6TrafficClass_Choice struct { +type Layer1_Media struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv6TrafficClass_Choice) Reset() { - *x = PatternFlowIpv6TrafficClass_Choice{} +func (x *Layer1_Media) Reset() { + *x = Layer1_Media{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1200] + mi := &file_otg_proto_msgTypes[1137] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6TrafficClass_Choice) String() string { +func (x *Layer1_Media) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6TrafficClass_Choice) ProtoMessage() {} +func (*Layer1_Media) ProtoMessage() {} -func (x *PatternFlowIpv6TrafficClass_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1200] +func (x *Layer1_Media) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1137] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110044,34 +117256,34 @@ func (x *PatternFlowIpv6TrafficClass_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6TrafficClass_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6TrafficClass_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{532, 0} +// Deprecated: Use Layer1_Media.ProtoReflect.Descriptor instead. +func (*Layer1_Media) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{52, 1} } -type PatternFlowIpv6FlowLabel_Choice struct { +type Layer1FlowControl_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv6FlowLabel_Choice) Reset() { - *x = PatternFlowIpv6FlowLabel_Choice{} +func (x *Layer1FlowControl_Choice) Reset() { + *x = Layer1FlowControl_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1201] + mi := &file_otg_proto_msgTypes[1138] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6FlowLabel_Choice) String() string { +func (x *Layer1FlowControl_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6FlowLabel_Choice) ProtoMessage() {} +func (*Layer1FlowControl_Choice) ProtoMessage() {} -func (x *PatternFlowIpv6FlowLabel_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1201] +func (x *Layer1FlowControl_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1138] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110082,34 +117294,34 @@ func (x *PatternFlowIpv6FlowLabel_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6FlowLabel_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6FlowLabel_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{535, 0} +// Deprecated: Use Layer1FlowControl_Choice.ProtoReflect.Descriptor instead. +func (*Layer1FlowControl_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{54, 0} } -type PatternFlowIpv6PayloadLength_Choice struct { +type Capture_Format struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv6PayloadLength_Choice) Reset() { - *x = PatternFlowIpv6PayloadLength_Choice{} +func (x *Capture_Format) Reset() { + *x = Capture_Format{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1202] + mi := &file_otg_proto_msgTypes[1139] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6PayloadLength_Choice) String() string { +func (x *Capture_Format) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6PayloadLength_Choice) ProtoMessage() {} +func (*Capture_Format) ProtoMessage() {} -func (x *PatternFlowIpv6PayloadLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1202] +func (x *Capture_Format) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1139] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110120,34 +117332,34 @@ func (x *PatternFlowIpv6PayloadLength_Choice) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6PayloadLength_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6PayloadLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{538, 0} +// Deprecated: Use Capture_Format.ProtoReflect.Descriptor instead. +func (*Capture_Format) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{57, 0} } -type PatternFlowIpv6NextHeader_Choice struct { +type CaptureFilter_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv6NextHeader_Choice) Reset() { - *x = PatternFlowIpv6NextHeader_Choice{} +func (x *CaptureFilter_Choice) Reset() { + *x = CaptureFilter_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1203] + mi := &file_otg_proto_msgTypes[1140] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6NextHeader_Choice) String() string { +func (x *CaptureFilter_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6NextHeader_Choice) ProtoMessage() {} +func (*CaptureFilter_Choice) ProtoMessage() {} -func (x *PatternFlowIpv6NextHeader_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1203] +func (x *CaptureFilter_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1140] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110158,34 +117370,34 @@ func (x *PatternFlowIpv6NextHeader_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6NextHeader_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6NextHeader_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{541, 0} +// Deprecated: Use CaptureFilter_Choice.ProtoReflect.Descriptor instead. +func (*CaptureFilter_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{58, 0} } -type PatternFlowIpv6HopLimit_Choice struct { +type IsisInterface_NetworkType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv6HopLimit_Choice) Reset() { - *x = PatternFlowIpv6HopLimit_Choice{} +func (x *IsisInterface_NetworkType) Reset() { + *x = IsisInterface_NetworkType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1204] + mi := &file_otg_proto_msgTypes[1141] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6HopLimit_Choice) String() string { +func (x *IsisInterface_NetworkType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6HopLimit_Choice) ProtoMessage() {} +func (*IsisInterface_NetworkType) ProtoMessage() {} -func (x *PatternFlowIpv6HopLimit_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1204] +func (x *IsisInterface_NetworkType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1141] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110196,34 +117408,34 @@ func (x *PatternFlowIpv6HopLimit_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6HopLimit_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6HopLimit_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{544, 0} +// Deprecated: Use IsisInterface_NetworkType.ProtoReflect.Descriptor instead. +func (*IsisInterface_NetworkType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{69, 0} } -type PatternFlowIpv6Src_Choice struct { +type IsisInterface_LevelType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv6Src_Choice) Reset() { - *x = PatternFlowIpv6Src_Choice{} +func (x *IsisInterface_LevelType) Reset() { + *x = IsisInterface_LevelType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1205] + mi := &file_otg_proto_msgTypes[1142] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6Src_Choice) String() string { +func (x *IsisInterface_LevelType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6Src_Choice) ProtoMessage() {} +func (*IsisInterface_LevelType) ProtoMessage() {} -func (x *PatternFlowIpv6Src_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1205] +func (x *IsisInterface_LevelType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1142] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110234,34 +117446,34 @@ func (x *PatternFlowIpv6Src_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6Src_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6Src_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{547, 0} +// Deprecated: Use IsisInterface_LevelType.ProtoReflect.Descriptor instead. +func (*IsisInterface_LevelType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{69, 1} } -type PatternFlowIpv6Dst_Choice struct { +type IsisInterfaceAuthentication_AuthType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIpv6Dst_Choice) Reset() { - *x = PatternFlowIpv6Dst_Choice{} +func (x *IsisInterfaceAuthentication_AuthType) Reset() { + *x = IsisInterfaceAuthentication_AuthType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1206] + mi := &file_otg_proto_msgTypes[1143] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIpv6Dst_Choice) String() string { +func (x *IsisInterfaceAuthentication_AuthType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIpv6Dst_Choice) ProtoMessage() {} +func (*IsisInterfaceAuthentication_AuthType) ProtoMessage() {} -func (x *PatternFlowIpv6Dst_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1206] +func (x *IsisInterfaceAuthentication_AuthType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1143] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110272,34 +117484,34 @@ func (x *PatternFlowIpv6Dst_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIpv6Dst_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIpv6Dst_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{550, 0} +// Deprecated: Use IsisInterfaceAuthentication_AuthType.ProtoReflect.Descriptor instead. +func (*IsisInterfaceAuthentication_AuthType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{74, 0} } -type PatternFlowPfcPauseDst_Choice struct { +type IsisAuthenticationBase_AuthType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPfcPauseDst_Choice) Reset() { - *x = PatternFlowPfcPauseDst_Choice{} +func (x *IsisAuthenticationBase_AuthType) Reset() { + *x = IsisAuthenticationBase_AuthType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1207] + mi := &file_otg_proto_msgTypes[1144] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseDst_Choice) String() string { +func (x *IsisAuthenticationBase_AuthType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseDst_Choice) ProtoMessage() {} +func (*IsisAuthenticationBase_AuthType) ProtoMessage() {} -func (x *PatternFlowPfcPauseDst_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1207] +func (x *IsisAuthenticationBase_AuthType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1144] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110310,34 +117522,34 @@ func (x *PatternFlowPfcPauseDst_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseDst_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseDst_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{553, 0} +// Deprecated: Use IsisAuthenticationBase_AuthType.ProtoReflect.Descriptor instead. +func (*IsisAuthenticationBase_AuthType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{80, 0} } -type PatternFlowPfcPauseSrc_Choice struct { +type IsisV4RouteRange_OriginType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPfcPauseSrc_Choice) Reset() { - *x = PatternFlowPfcPauseSrc_Choice{} +func (x *IsisV4RouteRange_OriginType) Reset() { + *x = IsisV4RouteRange_OriginType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1208] + mi := &file_otg_proto_msgTypes[1145] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseSrc_Choice) String() string { +func (x *IsisV4RouteRange_OriginType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseSrc_Choice) ProtoMessage() {} +func (*IsisV4RouteRange_OriginType) ProtoMessage() {} -func (x *PatternFlowPfcPauseSrc_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1208] +func (x *IsisV4RouteRange_OriginType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1145] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110348,34 +117560,34 @@ func (x *PatternFlowPfcPauseSrc_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseSrc_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseSrc_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{556, 0} +// Deprecated: Use IsisV4RouteRange_OriginType.ProtoReflect.Descriptor instead. +func (*IsisV4RouteRange_OriginType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{81, 0} } -type PatternFlowPfcPauseEtherType_Choice struct { +type IsisV4RouteRange_RedistributionType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPfcPauseEtherType_Choice) Reset() { - *x = PatternFlowPfcPauseEtherType_Choice{} +func (x *IsisV4RouteRange_RedistributionType) Reset() { + *x = IsisV4RouteRange_RedistributionType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1209] + mi := &file_otg_proto_msgTypes[1146] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseEtherType_Choice) String() string { +func (x *IsisV4RouteRange_RedistributionType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseEtherType_Choice) ProtoMessage() {} +func (*IsisV4RouteRange_RedistributionType) ProtoMessage() {} -func (x *PatternFlowPfcPauseEtherType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1209] +func (x *IsisV4RouteRange_RedistributionType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1146] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110386,34 +117598,34 @@ func (x *PatternFlowPfcPauseEtherType_Choice) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseEtherType_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseEtherType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{559, 0} +// Deprecated: Use IsisV4RouteRange_RedistributionType.ProtoReflect.Descriptor instead. +func (*IsisV4RouteRange_RedistributionType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{81, 1} } -type PatternFlowPfcPauseControlOpCode_Choice struct { +type IsisV6RouteRange_OriginType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPfcPauseControlOpCode_Choice) Reset() { - *x = PatternFlowPfcPauseControlOpCode_Choice{} +func (x *IsisV6RouteRange_OriginType) Reset() { + *x = IsisV6RouteRange_OriginType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1210] + mi := &file_otg_proto_msgTypes[1147] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseControlOpCode_Choice) String() string { +func (x *IsisV6RouteRange_OriginType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseControlOpCode_Choice) ProtoMessage() {} +func (*IsisV6RouteRange_OriginType) ProtoMessage() {} -func (x *PatternFlowPfcPauseControlOpCode_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1210] +func (x *IsisV6RouteRange_OriginType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1147] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110424,34 +117636,34 @@ func (x *PatternFlowPfcPauseControlOpCode_Choice) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseControlOpCode_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseControlOpCode_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{562, 0} +// Deprecated: Use IsisV6RouteRange_OriginType.ProtoReflect.Descriptor instead. +func (*IsisV6RouteRange_OriginType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{85, 0} } -type PatternFlowPfcPauseClassEnableVector_Choice struct { +type IsisV6RouteRange_RedistributionType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPfcPauseClassEnableVector_Choice) Reset() { - *x = PatternFlowPfcPauseClassEnableVector_Choice{} +func (x *IsisV6RouteRange_RedistributionType) Reset() { + *x = IsisV6RouteRange_RedistributionType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1211] + mi := &file_otg_proto_msgTypes[1148] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPauseClassEnableVector_Choice) String() string { +func (x *IsisV6RouteRange_RedistributionType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPauseClassEnableVector_Choice) ProtoMessage() {} +func (*IsisV6RouteRange_RedistributionType) ProtoMessage() {} -func (x *PatternFlowPfcPauseClassEnableVector_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1211] +func (x *IsisV6RouteRange_RedistributionType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1148] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110462,34 +117674,34 @@ func (x *PatternFlowPfcPauseClassEnableVector_Choice) ProtoReflect() protoreflec return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPauseClassEnableVector_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPauseClassEnableVector_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{565, 0} +// Deprecated: Use IsisV6RouteRange_RedistributionType.ProtoReflect.Descriptor instead. +func (*IsisV6RouteRange_RedistributionType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{85, 1} } -type PatternFlowPfcPausePauseClass0_Choice struct { +type DeviceBgpMessageHeaderError_Subcode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPfcPausePauseClass0_Choice) Reset() { - *x = PatternFlowPfcPausePauseClass0_Choice{} +func (x *DeviceBgpMessageHeaderError_Subcode) Reset() { + *x = DeviceBgpMessageHeaderError_Subcode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1212] + mi := &file_otg_proto_msgTypes[1149] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass0_Choice) String() string { +func (x *DeviceBgpMessageHeaderError_Subcode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass0_Choice) ProtoMessage() {} +func (*DeviceBgpMessageHeaderError_Subcode) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass0_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1212] +func (x *DeviceBgpMessageHeaderError_Subcode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1149] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110500,34 +117712,34 @@ func (x *PatternFlowPfcPausePauseClass0_Choice) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass0_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass0_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{568, 0} +// Deprecated: Use DeviceBgpMessageHeaderError_Subcode.ProtoReflect.Descriptor instead. +func (*DeviceBgpMessageHeaderError_Subcode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{87, 0} } -type PatternFlowPfcPausePauseClass1_Choice struct { +type DeviceBgpOpenMessageError_Subcode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPfcPausePauseClass1_Choice) Reset() { - *x = PatternFlowPfcPausePauseClass1_Choice{} +func (x *DeviceBgpOpenMessageError_Subcode) Reset() { + *x = DeviceBgpOpenMessageError_Subcode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1213] + mi := &file_otg_proto_msgTypes[1150] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass1_Choice) String() string { +func (x *DeviceBgpOpenMessageError_Subcode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass1_Choice) ProtoMessage() {} +func (*DeviceBgpOpenMessageError_Subcode) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass1_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1213] +func (x *DeviceBgpOpenMessageError_Subcode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1150] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110538,34 +117750,34 @@ func (x *PatternFlowPfcPausePauseClass1_Choice) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass1_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass1_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{571, 0} +// Deprecated: Use DeviceBgpOpenMessageError_Subcode.ProtoReflect.Descriptor instead. +func (*DeviceBgpOpenMessageError_Subcode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{88, 0} } -type PatternFlowPfcPausePauseClass2_Choice struct { +type DeviceBgpUpdateMessageError_Subcode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPfcPausePauseClass2_Choice) Reset() { - *x = PatternFlowPfcPausePauseClass2_Choice{} +func (x *DeviceBgpUpdateMessageError_Subcode) Reset() { + *x = DeviceBgpUpdateMessageError_Subcode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1214] + mi := &file_otg_proto_msgTypes[1151] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass2_Choice) String() string { +func (x *DeviceBgpUpdateMessageError_Subcode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass2_Choice) ProtoMessage() {} +func (*DeviceBgpUpdateMessageError_Subcode) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass2_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1214] +func (x *DeviceBgpUpdateMessageError_Subcode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1151] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110576,34 +117788,34 @@ func (x *PatternFlowPfcPausePauseClass2_Choice) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass2_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass2_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{574, 0} +// Deprecated: Use DeviceBgpUpdateMessageError_Subcode.ProtoReflect.Descriptor instead. +func (*DeviceBgpUpdateMessageError_Subcode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{89, 0} } -type PatternFlowPfcPausePauseClass3_Choice struct { +type DeviceBgpCeaseError_Subcode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPfcPausePauseClass3_Choice) Reset() { - *x = PatternFlowPfcPausePauseClass3_Choice{} +func (x *DeviceBgpCeaseError_Subcode) Reset() { + *x = DeviceBgpCeaseError_Subcode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1215] + mi := &file_otg_proto_msgTypes[1152] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass3_Choice) String() string { +func (x *DeviceBgpCeaseError_Subcode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass3_Choice) ProtoMessage() {} +func (*DeviceBgpCeaseError_Subcode) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass3_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1215] +func (x *DeviceBgpCeaseError_Subcode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1152] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110614,34 +117826,34 @@ func (x *PatternFlowPfcPausePauseClass3_Choice) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass3_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass3_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{577, 0} +// Deprecated: Use DeviceBgpCeaseError_Subcode.ProtoReflect.Descriptor instead. +func (*DeviceBgpCeaseError_Subcode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{92, 0} } -type PatternFlowPfcPausePauseClass4_Choice struct { +type BgpV4Peer_AsType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPfcPausePauseClass4_Choice) Reset() { - *x = PatternFlowPfcPausePauseClass4_Choice{} +func (x *BgpV4Peer_AsType) Reset() { + *x = BgpV4Peer_AsType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1216] + mi := &file_otg_proto_msgTypes[1153] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass4_Choice) String() string { +func (x *BgpV4Peer_AsType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass4_Choice) ProtoMessage() {} +func (*BgpV4Peer_AsType) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass4_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1216] +func (x *BgpV4Peer_AsType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1153] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110652,34 +117864,34 @@ func (x *PatternFlowPfcPausePauseClass4_Choice) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass4_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass4_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{580, 0} +// Deprecated: Use BgpV4Peer_AsType.ProtoReflect.Descriptor instead. +func (*BgpV4Peer_AsType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{94, 0} } -type PatternFlowPfcPausePauseClass5_Choice struct { +type BgpV4Peer_AsNumberWidth struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPfcPausePauseClass5_Choice) Reset() { - *x = PatternFlowPfcPausePauseClass5_Choice{} +func (x *BgpV4Peer_AsNumberWidth) Reset() { + *x = BgpV4Peer_AsNumberWidth{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1217] + mi := &file_otg_proto_msgTypes[1154] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass5_Choice) String() string { +func (x *BgpV4Peer_AsNumberWidth) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass5_Choice) ProtoMessage() {} +func (*BgpV4Peer_AsNumberWidth) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass5_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1217] +func (x *BgpV4Peer_AsNumberWidth) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1154] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110690,34 +117902,34 @@ func (x *PatternFlowPfcPausePauseClass5_Choice) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass5_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass5_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{583, 0} +// Deprecated: Use BgpV4Peer_AsNumberWidth.ProtoReflect.Descriptor instead. +func (*BgpV4Peer_AsNumberWidth) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{94, 1} } -type PatternFlowPfcPausePauseClass6_Choice struct { +type BgpV4EthernetSegment_ActiveMode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPfcPausePauseClass6_Choice) Reset() { - *x = PatternFlowPfcPausePauseClass6_Choice{} +func (x *BgpV4EthernetSegment_ActiveMode) Reset() { + *x = BgpV4EthernetSegment_ActiveMode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1218] + mi := &file_otg_proto_msgTypes[1155] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass6_Choice) String() string { +func (x *BgpV4EthernetSegment_ActiveMode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass6_Choice) ProtoMessage() {} +func (*BgpV4EthernetSegment_ActiveMode) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass6_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1218] +func (x *BgpV4EthernetSegment_ActiveMode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1155] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110728,34 +117940,34 @@ func (x *PatternFlowPfcPausePauseClass6_Choice) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass6_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass6_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{586, 0} +// Deprecated: Use BgpV4EthernetSegment_ActiveMode.ProtoReflect.Descriptor instead. +func (*BgpV4EthernetSegment_ActiveMode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{96, 0} } -type PatternFlowPfcPausePauseClass7_Choice struct { +type BgpRouteAdvanced_Origin struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPfcPausePauseClass7_Choice) Reset() { - *x = PatternFlowPfcPausePauseClass7_Choice{} +func (x *BgpRouteAdvanced_Origin) Reset() { + *x = BgpRouteAdvanced_Origin{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1219] + mi := &file_otg_proto_msgTypes[1156] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPfcPausePauseClass7_Choice) String() string { +func (x *BgpRouteAdvanced_Origin) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPfcPausePauseClass7_Choice) ProtoMessage() {} +func (*BgpRouteAdvanced_Origin) ProtoMessage() {} -func (x *PatternFlowPfcPausePauseClass7_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1219] +func (x *BgpRouteAdvanced_Origin) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1156] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110766,34 +117978,34 @@ func (x *PatternFlowPfcPausePauseClass7_Choice) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPfcPausePauseClass7_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPfcPausePauseClass7_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{589, 0} +// Deprecated: Use BgpRouteAdvanced_Origin.ProtoReflect.Descriptor instead. +func (*BgpRouteAdvanced_Origin) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{98, 0} } -type PatternFlowEthernetPauseDst_Choice struct { +type BgpCommunity_Type struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowEthernetPauseDst_Choice) Reset() { - *x = PatternFlowEthernetPauseDst_Choice{} +func (x *BgpCommunity_Type) Reset() { + *x = BgpCommunity_Type{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1220] + mi := &file_otg_proto_msgTypes[1157] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseDst_Choice) String() string { +func (x *BgpCommunity_Type) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseDst_Choice) ProtoMessage() {} +func (*BgpCommunity_Type) ProtoMessage() {} -func (x *PatternFlowEthernetPauseDst_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1220] +func (x *BgpCommunity_Type) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1157] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110804,34 +118016,34 @@ func (x *PatternFlowEthernetPauseDst_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseDst_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseDst_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{592, 0} +// Deprecated: Use BgpCommunity_Type.ProtoReflect.Descriptor instead. +func (*BgpCommunity_Type) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{99, 0} } -type PatternFlowEthernetPauseSrc_Choice struct { +type BgpExtCommunity_Type struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowEthernetPauseSrc_Choice) Reset() { - *x = PatternFlowEthernetPauseSrc_Choice{} +func (x *BgpExtCommunity_Type) Reset() { + *x = BgpExtCommunity_Type{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1221] + mi := &file_otg_proto_msgTypes[1158] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseSrc_Choice) String() string { +func (x *BgpExtCommunity_Type) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseSrc_Choice) ProtoMessage() {} +func (*BgpExtCommunity_Type) ProtoMessage() {} -func (x *PatternFlowEthernetPauseSrc_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1221] +func (x *BgpExtCommunity_Type) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1158] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110842,34 +118054,34 @@ func (x *PatternFlowEthernetPauseSrc_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseSrc_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseSrc_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{595, 0} +// Deprecated: Use BgpExtCommunity_Type.ProtoReflect.Descriptor instead. +func (*BgpExtCommunity_Type) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{100, 0} } -type PatternFlowEthernetPauseEtherType_Choice struct { +type BgpExtCommunity_Subtype struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowEthernetPauseEtherType_Choice) Reset() { - *x = PatternFlowEthernetPauseEtherType_Choice{} +func (x *BgpExtCommunity_Subtype) Reset() { + *x = BgpExtCommunity_Subtype{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1222] + mi := &file_otg_proto_msgTypes[1159] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseEtherType_Choice) String() string { +func (x *BgpExtCommunity_Subtype) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseEtherType_Choice) ProtoMessage() {} +func (*BgpExtCommunity_Subtype) ProtoMessage() {} -func (x *PatternFlowEthernetPauseEtherType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1222] +func (x *BgpExtCommunity_Subtype) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1159] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110880,34 +118092,34 @@ func (x *PatternFlowEthernetPauseEtherType_Choice) ProtoReflect() protoreflect.M return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseEtherType_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseEtherType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{598, 0} +// Deprecated: Use BgpExtCommunity_Subtype.ProtoReflect.Descriptor instead. +func (*BgpExtCommunity_Subtype) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{100, 1} } -type PatternFlowEthernetPauseControlOpCode_Choice struct { +type BgpAsPath_AsSetMode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowEthernetPauseControlOpCode_Choice) Reset() { - *x = PatternFlowEthernetPauseControlOpCode_Choice{} +func (x *BgpAsPath_AsSetMode) Reset() { + *x = BgpAsPath_AsSetMode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1223] + mi := &file_otg_proto_msgTypes[1160] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseControlOpCode_Choice) String() string { +func (x *BgpAsPath_AsSetMode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseControlOpCode_Choice) ProtoMessage() {} +func (*BgpAsPath_AsSetMode) ProtoMessage() {} -func (x *PatternFlowEthernetPauseControlOpCode_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1223] +func (x *BgpAsPath_AsSetMode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1160] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110918,34 +118130,34 @@ func (x *PatternFlowEthernetPauseControlOpCode_Choice) ProtoReflect() protorefle return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseControlOpCode_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseControlOpCode_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{601, 0} +// Deprecated: Use BgpAsPath_AsSetMode.ProtoReflect.Descriptor instead. +func (*BgpAsPath_AsSetMode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{101, 0} } -type PatternFlowEthernetPauseTime_Choice struct { +type BgpAsPathSegment_Type struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowEthernetPauseTime_Choice) Reset() { - *x = PatternFlowEthernetPauseTime_Choice{} +func (x *BgpAsPathSegment_Type) Reset() { + *x = BgpAsPathSegment_Type{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1224] + mi := &file_otg_proto_msgTypes[1161] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowEthernetPauseTime_Choice) String() string { +func (x *BgpAsPathSegment_Type) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowEthernetPauseTime_Choice) ProtoMessage() {} +func (*BgpAsPathSegment_Type) ProtoMessage() {} -func (x *PatternFlowEthernetPauseTime_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1224] +func (x *BgpAsPathSegment_Type) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1161] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110956,34 +118168,34 @@ func (x *PatternFlowEthernetPauseTime_Choice) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowEthernetPauseTime_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowEthernetPauseTime_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{604, 0} +// Deprecated: Use BgpAsPathSegment_Type.ProtoReflect.Descriptor instead. +func (*BgpAsPathSegment_Type) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{102, 0} } -type PatternFlowTcpSrcPort_Choice struct { +type BgpV4EvpnEvis_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpSrcPort_Choice) Reset() { - *x = PatternFlowTcpSrcPort_Choice{} +func (x *BgpV4EvpnEvis_Choice) Reset() { + *x = BgpV4EvpnEvis_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1225] + mi := &file_otg_proto_msgTypes[1162] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpSrcPort_Choice) String() string { +func (x *BgpV4EvpnEvis_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpSrcPort_Choice) ProtoMessage() {} +func (*BgpV4EvpnEvis_Choice) ProtoMessage() {} -func (x *PatternFlowTcpSrcPort_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1225] +func (x *BgpV4EvpnEvis_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1162] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110994,34 +118206,34 @@ func (x *PatternFlowTcpSrcPort_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpSrcPort_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpSrcPort_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{607, 0} +// Deprecated: Use BgpV4EvpnEvis_Choice.ProtoReflect.Descriptor instead. +func (*BgpV4EvpnEvis_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{103, 0} } -type PatternFlowTcpDstPort_Choice struct { +type BgpV4EviVxlan_ReplicationType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpDstPort_Choice) Reset() { - *x = PatternFlowTcpDstPort_Choice{} +func (x *BgpV4EviVxlan_ReplicationType) Reset() { + *x = BgpV4EviVxlan_ReplicationType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1226] + mi := &file_otg_proto_msgTypes[1163] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpDstPort_Choice) String() string { +func (x *BgpV4EviVxlan_ReplicationType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpDstPort_Choice) ProtoMessage() {} +func (*BgpV4EviVxlan_ReplicationType) ProtoMessage() {} -func (x *PatternFlowTcpDstPort_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1226] +func (x *BgpV4EviVxlan_ReplicationType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1163] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111032,34 +118244,34 @@ func (x *PatternFlowTcpDstPort_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpDstPort_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpDstPort_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{610, 0} +// Deprecated: Use BgpV4EviVxlan_ReplicationType.ProtoReflect.Descriptor instead. +func (*BgpV4EviVxlan_ReplicationType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{104, 0} } -type PatternFlowTcpSeqNum_Choice struct { +type BgpRouteDistinguisher_RdType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpSeqNum_Choice) Reset() { - *x = PatternFlowTcpSeqNum_Choice{} +func (x *BgpRouteDistinguisher_RdType) Reset() { + *x = BgpRouteDistinguisher_RdType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1227] + mi := &file_otg_proto_msgTypes[1164] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpSeqNum_Choice) String() string { +func (x *BgpRouteDistinguisher_RdType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpSeqNum_Choice) ProtoMessage() {} +func (*BgpRouteDistinguisher_RdType) ProtoMessage() {} -func (x *PatternFlowTcpSeqNum_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1227] +func (x *BgpRouteDistinguisher_RdType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1164] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111070,34 +118282,34 @@ func (x *PatternFlowTcpSeqNum_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpSeqNum_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpSeqNum_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{613, 0} +// Deprecated: Use BgpRouteDistinguisher_RdType.ProtoReflect.Descriptor instead. +func (*BgpRouteDistinguisher_RdType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{107, 0} } -type PatternFlowTcpAckNum_Choice struct { +type BgpRouteTarget_RtType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpAckNum_Choice) Reset() { - *x = PatternFlowTcpAckNum_Choice{} +func (x *BgpRouteTarget_RtType) Reset() { + *x = BgpRouteTarget_RtType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1228] + mi := &file_otg_proto_msgTypes[1165] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpAckNum_Choice) String() string { +func (x *BgpRouteTarget_RtType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpAckNum_Choice) ProtoMessage() {} +func (*BgpRouteTarget_RtType) ProtoMessage() {} -func (x *PatternFlowTcpAckNum_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1228] +func (x *BgpRouteTarget_RtType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1165] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111108,34 +118320,34 @@ func (x *PatternFlowTcpAckNum_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpAckNum_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpAckNum_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{616, 0} +// Deprecated: Use BgpRouteTarget_RtType.ProtoReflect.Descriptor instead. +func (*BgpRouteTarget_RtType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{108, 0} } -type PatternFlowTcpDataOffset_Choice struct { +type BgpV4RouteRange_NextHopMode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpDataOffset_Choice) Reset() { - *x = PatternFlowTcpDataOffset_Choice{} +func (x *BgpV4RouteRange_NextHopMode) Reset() { + *x = BgpV4RouteRange_NextHopMode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1229] + mi := &file_otg_proto_msgTypes[1166] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpDataOffset_Choice) String() string { +func (x *BgpV4RouteRange_NextHopMode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpDataOffset_Choice) ProtoMessage() {} +func (*BgpV4RouteRange_NextHopMode) ProtoMessage() {} -func (x *PatternFlowTcpDataOffset_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1229] +func (x *BgpV4RouteRange_NextHopMode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1166] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111146,34 +118358,34 @@ func (x *PatternFlowTcpDataOffset_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpDataOffset_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpDataOffset_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{619, 0} +// Deprecated: Use BgpV4RouteRange_NextHopMode.ProtoReflect.Descriptor instead. +func (*BgpV4RouteRange_NextHopMode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{112, 0} } -type PatternFlowTcpEcnNs_Choice struct { +type BgpV4RouteRange_NextHopAddressType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpEcnNs_Choice) Reset() { - *x = PatternFlowTcpEcnNs_Choice{} +func (x *BgpV4RouteRange_NextHopAddressType) Reset() { + *x = BgpV4RouteRange_NextHopAddressType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1230] + mi := &file_otg_proto_msgTypes[1167] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpEcnNs_Choice) String() string { +func (x *BgpV4RouteRange_NextHopAddressType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpEcnNs_Choice) ProtoMessage() {} +func (*BgpV4RouteRange_NextHopAddressType) ProtoMessage() {} -func (x *PatternFlowTcpEcnNs_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1230] +func (x *BgpV4RouteRange_NextHopAddressType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1167] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111184,34 +118396,34 @@ func (x *PatternFlowTcpEcnNs_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpEcnNs_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpEcnNs_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{622, 0} +// Deprecated: Use BgpV4RouteRange_NextHopAddressType.ProtoReflect.Descriptor instead. +func (*BgpV4RouteRange_NextHopAddressType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{112, 1} } -type PatternFlowTcpEcnCwr_Choice struct { +type BgpExtendedCommunity_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpEcnCwr_Choice) Reset() { - *x = PatternFlowTcpEcnCwr_Choice{} +func (x *BgpExtendedCommunity_Choice) Reset() { + *x = BgpExtendedCommunity_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1231] + mi := &file_otg_proto_msgTypes[1168] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpEcnCwr_Choice) String() string { +func (x *BgpExtendedCommunity_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpEcnCwr_Choice) ProtoMessage() {} +func (*BgpExtendedCommunity_Choice) ProtoMessage() {} -func (x *PatternFlowTcpEcnCwr_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1231] +func (x *BgpExtendedCommunity_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1168] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111222,34 +118434,34 @@ func (x *PatternFlowTcpEcnCwr_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpEcnCwr_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpEcnCwr_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{625, 0} +// Deprecated: Use BgpExtendedCommunity_Choice.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunity_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{114, 0} } -type PatternFlowTcpEcnEcho_Choice struct { +type BgpExtendedCommunityTransitive2OctetAsType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpEcnEcho_Choice) Reset() { - *x = PatternFlowTcpEcnEcho_Choice{} +func (x *BgpExtendedCommunityTransitive2OctetAsType_Choice) Reset() { + *x = BgpExtendedCommunityTransitive2OctetAsType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1232] + mi := &file_otg_proto_msgTypes[1169] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpEcnEcho_Choice) String() string { +func (x *BgpExtendedCommunityTransitive2OctetAsType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpEcnEcho_Choice) ProtoMessage() {} +func (*BgpExtendedCommunityTransitive2OctetAsType_Choice) ProtoMessage() {} -func (x *PatternFlowTcpEcnEcho_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1232] +func (x *BgpExtendedCommunityTransitive2OctetAsType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1169] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111260,34 +118472,34 @@ func (x *PatternFlowTcpEcnEcho_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpEcnEcho_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpEcnEcho_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{628, 0} +// Deprecated: Use BgpExtendedCommunityTransitive2OctetAsType_Choice.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitive2OctetAsType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{117, 0} } -type PatternFlowTcpCtlUrg_Choice struct { +type BgpExtendedCommunityTransitiveIpv4AddressType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpCtlUrg_Choice) Reset() { - *x = PatternFlowTcpCtlUrg_Choice{} +func (x *BgpExtendedCommunityTransitiveIpv4AddressType_Choice) Reset() { + *x = BgpExtendedCommunityTransitiveIpv4AddressType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1233] + mi := &file_otg_proto_msgTypes[1170] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlUrg_Choice) String() string { +func (x *BgpExtendedCommunityTransitiveIpv4AddressType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlUrg_Choice) ProtoMessage() {} +func (*BgpExtendedCommunityTransitiveIpv4AddressType_Choice) ProtoMessage() {} -func (x *PatternFlowTcpCtlUrg_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1233] +func (x *BgpExtendedCommunityTransitiveIpv4AddressType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1170] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111298,34 +118510,34 @@ func (x *PatternFlowTcpCtlUrg_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlUrg_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlUrg_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{631, 0} +// Deprecated: Use BgpExtendedCommunityTransitiveIpv4AddressType_Choice.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitiveIpv4AddressType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{120, 0} } -type PatternFlowTcpCtlAck_Choice struct { +type BgpExtendedCommunityTransitive4OctetAsType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpCtlAck_Choice) Reset() { - *x = PatternFlowTcpCtlAck_Choice{} +func (x *BgpExtendedCommunityTransitive4OctetAsType_Choice) Reset() { + *x = BgpExtendedCommunityTransitive4OctetAsType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1234] + mi := &file_otg_proto_msgTypes[1171] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlAck_Choice) String() string { +func (x *BgpExtendedCommunityTransitive4OctetAsType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlAck_Choice) ProtoMessage() {} +func (*BgpExtendedCommunityTransitive4OctetAsType_Choice) ProtoMessage() {} -func (x *PatternFlowTcpCtlAck_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1234] +func (x *BgpExtendedCommunityTransitive4OctetAsType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1171] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111336,34 +118548,34 @@ func (x *PatternFlowTcpCtlAck_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlAck_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlAck_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{634, 0} +// Deprecated: Use BgpExtendedCommunityTransitive4OctetAsType_Choice.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitive4OctetAsType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{123, 0} } -type PatternFlowTcpCtlPsh_Choice struct { +type BgpExtendedCommunityTransitiveOpaqueType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpCtlPsh_Choice) Reset() { - *x = PatternFlowTcpCtlPsh_Choice{} +func (x *BgpExtendedCommunityTransitiveOpaqueType_Choice) Reset() { + *x = BgpExtendedCommunityTransitiveOpaqueType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1235] + mi := &file_otg_proto_msgTypes[1172] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlPsh_Choice) String() string { +func (x *BgpExtendedCommunityTransitiveOpaqueType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlPsh_Choice) ProtoMessage() {} +func (*BgpExtendedCommunityTransitiveOpaqueType_Choice) ProtoMessage() {} -func (x *PatternFlowTcpCtlPsh_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1235] +func (x *BgpExtendedCommunityTransitiveOpaqueType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1172] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111374,34 +118586,34 @@ func (x *PatternFlowTcpCtlPsh_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlPsh_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlPsh_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{637, 0} +// Deprecated: Use BgpExtendedCommunityTransitiveOpaqueType_Choice.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitiveOpaqueType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{126, 0} } -type PatternFlowTcpCtlRst_Choice struct { +type BgpExtendedCommunityTransitiveEvpnType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpCtlRst_Choice) Reset() { - *x = PatternFlowTcpCtlRst_Choice{} +func (x *BgpExtendedCommunityTransitiveEvpnType_Choice) Reset() { + *x = BgpExtendedCommunityTransitiveEvpnType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1236] + mi := &file_otg_proto_msgTypes[1173] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlRst_Choice) String() string { +func (x *BgpExtendedCommunityTransitiveEvpnType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlRst_Choice) ProtoMessage() {} +func (*BgpExtendedCommunityTransitiveEvpnType_Choice) ProtoMessage() {} -func (x *PatternFlowTcpCtlRst_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1236] +func (x *BgpExtendedCommunityTransitiveEvpnType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1173] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111412,34 +118624,34 @@ func (x *PatternFlowTcpCtlRst_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlRst_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlRst_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{640, 0} +// Deprecated: Use BgpExtendedCommunityTransitiveEvpnType_Choice.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityTransitiveEvpnType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{128, 0} } -type PatternFlowTcpCtlSyn_Choice struct { +type BgpExtendedCommunityNonTransitive2OctetAsType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpCtlSyn_Choice) Reset() { - *x = PatternFlowTcpCtlSyn_Choice{} +func (x *BgpExtendedCommunityNonTransitive2OctetAsType_Choice) Reset() { + *x = BgpExtendedCommunityNonTransitive2OctetAsType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1237] + mi := &file_otg_proto_msgTypes[1174] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlSyn_Choice) String() string { +func (x *BgpExtendedCommunityNonTransitive2OctetAsType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlSyn_Choice) ProtoMessage() {} +func (*BgpExtendedCommunityNonTransitive2OctetAsType_Choice) ProtoMessage() {} -func (x *PatternFlowTcpCtlSyn_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1237] +func (x *BgpExtendedCommunityNonTransitive2OctetAsType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1174] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111450,34 +118662,34 @@ func (x *PatternFlowTcpCtlSyn_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlSyn_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlSyn_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{643, 0} +// Deprecated: Use BgpExtendedCommunityNonTransitive2OctetAsType_Choice.ProtoReflect.Descriptor instead. +func (*BgpExtendedCommunityNonTransitive2OctetAsType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{130, 0} } -type PatternFlowTcpCtlFin_Choice struct { +type BgpV6RouteRange_NextHopMode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpCtlFin_Choice) Reset() { - *x = PatternFlowTcpCtlFin_Choice{} +func (x *BgpV6RouteRange_NextHopMode) Reset() { + *x = BgpV6RouteRange_NextHopMode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1238] + mi := &file_otg_proto_msgTypes[1175] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpCtlFin_Choice) String() string { +func (x *BgpV6RouteRange_NextHopMode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpCtlFin_Choice) ProtoMessage() {} +func (*BgpV6RouteRange_NextHopMode) ProtoMessage() {} -func (x *PatternFlowTcpCtlFin_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1238] +func (x *BgpV6RouteRange_NextHopMode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1175] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111488,34 +118700,34 @@ func (x *PatternFlowTcpCtlFin_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpCtlFin_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpCtlFin_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{646, 0} +// Deprecated: Use BgpV6RouteRange_NextHopMode.ProtoReflect.Descriptor instead. +func (*BgpV6RouteRange_NextHopMode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{132, 0} } -type PatternFlowTcpWindow_Choice struct { +type BgpV6RouteRange_NextHopAddressType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowTcpWindow_Choice) Reset() { - *x = PatternFlowTcpWindow_Choice{} +func (x *BgpV6RouteRange_NextHopAddressType) Reset() { + *x = BgpV6RouteRange_NextHopAddressType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1239] + mi := &file_otg_proto_msgTypes[1176] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowTcpWindow_Choice) String() string { +func (x *BgpV6RouteRange_NextHopAddressType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowTcpWindow_Choice) ProtoMessage() {} +func (*BgpV6RouteRange_NextHopAddressType) ProtoMessage() {} -func (x *PatternFlowTcpWindow_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1239] +func (x *BgpV6RouteRange_NextHopAddressType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1176] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111526,34 +118738,34 @@ func (x *PatternFlowTcpWindow_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowTcpWindow_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowTcpWindow_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{649, 0} +// Deprecated: Use BgpV6RouteRange_NextHopAddressType.ProtoReflect.Descriptor instead. +func (*BgpV6RouteRange_NextHopAddressType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{132, 1} } -type PatternFlowUdpSrcPort_Choice struct { +type BgpSrteV4Policy_NextHopMode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowUdpSrcPort_Choice) Reset() { - *x = PatternFlowUdpSrcPort_Choice{} +func (x *BgpSrteV4Policy_NextHopMode) Reset() { + *x = BgpSrteV4Policy_NextHopMode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1240] + mi := &file_otg_proto_msgTypes[1177] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpSrcPort_Choice) String() string { +func (x *BgpSrteV4Policy_NextHopMode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpSrcPort_Choice) ProtoMessage() {} +func (*BgpSrteV4Policy_NextHopMode) ProtoMessage() {} -func (x *PatternFlowUdpSrcPort_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1240] +func (x *BgpSrteV4Policy_NextHopMode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1177] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111564,34 +118776,34 @@ func (x *PatternFlowUdpSrcPort_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpSrcPort_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpSrcPort_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{652, 0} +// Deprecated: Use BgpSrteV4Policy_NextHopMode.ProtoReflect.Descriptor instead. +func (*BgpSrteV4Policy_NextHopMode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{133, 0} } -type PatternFlowUdpDstPort_Choice struct { +type BgpSrteV4Policy_NextHopAddressType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowUdpDstPort_Choice) Reset() { - *x = PatternFlowUdpDstPort_Choice{} +func (x *BgpSrteV4Policy_NextHopAddressType) Reset() { + *x = BgpSrteV4Policy_NextHopAddressType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1241] + mi := &file_otg_proto_msgTypes[1178] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpDstPort_Choice) String() string { +func (x *BgpSrteV4Policy_NextHopAddressType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpDstPort_Choice) ProtoMessage() {} +func (*BgpSrteV4Policy_NextHopAddressType) ProtoMessage() {} -func (x *PatternFlowUdpDstPort_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1241] +func (x *BgpSrteV4Policy_NextHopAddressType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1178] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111602,34 +118814,34 @@ func (x *PatternFlowUdpDstPort_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpDstPort_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpDstPort_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{655, 0} +// Deprecated: Use BgpSrteV4Policy_NextHopAddressType.ProtoReflect.Descriptor instead. +func (*BgpSrteV4Policy_NextHopAddressType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{133, 1} } -type PatternFlowUdpLength_Choice struct { +type BgpSrteRemoteEndpointSubTlv_AddressFamily struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowUdpLength_Choice) Reset() { - *x = PatternFlowUdpLength_Choice{} +func (x *BgpSrteRemoteEndpointSubTlv_AddressFamily) Reset() { + *x = BgpSrteRemoteEndpointSubTlv_AddressFamily{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1242] + mi := &file_otg_proto_msgTypes[1179] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpLength_Choice) String() string { +func (x *BgpSrteRemoteEndpointSubTlv_AddressFamily) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpLength_Choice) ProtoMessage() {} +func (*BgpSrteRemoteEndpointSubTlv_AddressFamily) ProtoMessage() {} -func (x *PatternFlowUdpLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1242] +func (x *BgpSrteRemoteEndpointSubTlv_AddressFamily) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1179] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111640,34 +118852,34 @@ func (x *PatternFlowUdpLength_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpLength_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{658, 0} +// Deprecated: Use BgpSrteRemoteEndpointSubTlv_AddressFamily.ProtoReflect.Descriptor instead. +func (*BgpSrteRemoteEndpointSubTlv_AddressFamily) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{135, 0} } -type PatternFlowUdpChecksum_Choice struct { +type BgpSrteBindingSubTlv_BindingSidType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowUdpChecksum_Choice) Reset() { - *x = PatternFlowUdpChecksum_Choice{} +func (x *BgpSrteBindingSubTlv_BindingSidType) Reset() { + *x = BgpSrteBindingSubTlv_BindingSidType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1243] + mi := &file_otg_proto_msgTypes[1180] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpChecksum_Choice) String() string { +func (x *BgpSrteBindingSubTlv_BindingSidType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpChecksum_Choice) ProtoMessage() {} +func (*BgpSrteBindingSubTlv_BindingSidType) ProtoMessage() {} -func (x *PatternFlowUdpChecksum_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1243] +func (x *BgpSrteBindingSubTlv_BindingSidType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1180] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111678,34 +118890,34 @@ func (x *PatternFlowUdpChecksum_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpChecksum_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpChecksum_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{659, 0} +// Deprecated: Use BgpSrteBindingSubTlv_BindingSidType.ProtoReflect.Descriptor instead. +func (*BgpSrteBindingSubTlv_BindingSidType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{137, 0} } -type PatternFlowUdpChecksum_Generated struct { +type BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowUdpChecksum_Generated) Reset() { - *x = PatternFlowUdpChecksum_Generated{} +func (x *BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy) Reset() { + *x = BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1244] + mi := &file_otg_proto_msgTypes[1181] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowUdpChecksum_Generated) String() string { +func (x *BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowUdpChecksum_Generated) ProtoMessage() {} +func (*BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy) ProtoMessage() {} -func (x *PatternFlowUdpChecksum_Generated) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1244] +func (x *BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1181] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111716,34 +118928,34 @@ func (x *PatternFlowUdpChecksum_Generated) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowUdpChecksum_Generated.ProtoReflect.Descriptor instead. -func (*PatternFlowUdpChecksum_Generated) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{659, 1} +// Deprecated: Use BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy.ProtoReflect.Descriptor instead. +func (*BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{141, 0} } -type PatternFlowGreChecksumPresent_Choice struct { +type BgpSrteSegment_SegmentType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGreChecksumPresent_Choice) Reset() { - *x = PatternFlowGreChecksumPresent_Choice{} +func (x *BgpSrteSegment_SegmentType) Reset() { + *x = BgpSrteSegment_SegmentType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1245] + mi := &file_otg_proto_msgTypes[1182] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreChecksumPresent_Choice) String() string { +func (x *BgpSrteSegment_SegmentType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreChecksumPresent_Choice) ProtoMessage() {} +func (*BgpSrteSegment_SegmentType) ProtoMessage() {} -func (x *PatternFlowGreChecksumPresent_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1245] +func (x *BgpSrteSegment_SegmentType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1182] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111754,34 +118966,34 @@ func (x *PatternFlowGreChecksumPresent_Choice) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreChecksumPresent_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGreChecksumPresent_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{662, 0} -} +// Deprecated: Use BgpSrteSegment_SegmentType.ProtoReflect.Descriptor instead. +func (*BgpSrteSegment_SegmentType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{143, 0} +} -type PatternFlowGreReserved0_Choice struct { +type BgpSrteV6Policy_NextHopMode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGreReserved0_Choice) Reset() { - *x = PatternFlowGreReserved0_Choice{} +func (x *BgpSrteV6Policy_NextHopMode) Reset() { + *x = BgpSrteV6Policy_NextHopMode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1246] + mi := &file_otg_proto_msgTypes[1183] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreReserved0_Choice) String() string { +func (x *BgpSrteV6Policy_NextHopMode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreReserved0_Choice) ProtoMessage() {} +func (*BgpSrteV6Policy_NextHopMode) ProtoMessage() {} -func (x *PatternFlowGreReserved0_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1246] +func (x *BgpSrteV6Policy_NextHopMode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1183] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111792,34 +119004,34 @@ func (x *PatternFlowGreReserved0_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreReserved0_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGreReserved0_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{665, 0} +// Deprecated: Use BgpSrteV6Policy_NextHopMode.ProtoReflect.Descriptor instead. +func (*BgpSrteV6Policy_NextHopMode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{157, 0} } -type PatternFlowGreVersion_Choice struct { +type BgpSrteV6Policy_NextHopAddressType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGreVersion_Choice) Reset() { - *x = PatternFlowGreVersion_Choice{} +func (x *BgpSrteV6Policy_NextHopAddressType) Reset() { + *x = BgpSrteV6Policy_NextHopAddressType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1247] + mi := &file_otg_proto_msgTypes[1184] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreVersion_Choice) String() string { +func (x *BgpSrteV6Policy_NextHopAddressType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreVersion_Choice) ProtoMessage() {} +func (*BgpSrteV6Policy_NextHopAddressType) ProtoMessage() {} -func (x *PatternFlowGreVersion_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1247] +func (x *BgpSrteV6Policy_NextHopAddressType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1184] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111830,34 +119042,34 @@ func (x *PatternFlowGreVersion_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreVersion_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGreVersion_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{668, 0} +// Deprecated: Use BgpSrteV6Policy_NextHopAddressType.ProtoReflect.Descriptor instead. +func (*BgpSrteV6Policy_NextHopAddressType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{157, 1} } -type PatternFlowGreProtocol_Choice struct { +type BgpUpdateReplay_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGreProtocol_Choice) Reset() { - *x = PatternFlowGreProtocol_Choice{} +func (x *BgpUpdateReplay_Choice) Reset() { + *x = BgpUpdateReplay_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1248] + mi := &file_otg_proto_msgTypes[1185] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreProtocol_Choice) String() string { +func (x *BgpUpdateReplay_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreProtocol_Choice) ProtoMessage() {} +func (*BgpUpdateReplay_Choice) ProtoMessage() {} -func (x *PatternFlowGreProtocol_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1248] +func (x *BgpUpdateReplay_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1185] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111868,34 +119080,34 @@ func (x *PatternFlowGreProtocol_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreProtocol_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGreProtocol_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{671, 0} +// Deprecated: Use BgpUpdateReplay_Choice.ProtoReflect.Descriptor instead. +func (*BgpUpdateReplay_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{160, 0} } -type PatternFlowGreChecksum_Choice struct { +type BgpAttributes_Origin struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGreChecksum_Choice) Reset() { - *x = PatternFlowGreChecksum_Choice{} +func (x *BgpAttributes_Origin) Reset() { + *x = BgpAttributes_Origin{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1249] + mi := &file_otg_proto_msgTypes[1186] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreChecksum_Choice) String() string { +func (x *BgpAttributes_Origin) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreChecksum_Choice) ProtoMessage() {} +func (*BgpAttributes_Origin) ProtoMessage() {} -func (x *PatternFlowGreChecksum_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1249] +func (x *BgpAttributes_Origin) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1186] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111906,34 +119118,34 @@ func (x *PatternFlowGreChecksum_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreChecksum_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGreChecksum_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{672, 0} +// Deprecated: Use BgpAttributes_Origin.ProtoReflect.Descriptor instead. +func (*BgpAttributes_Origin) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{171, 0} } -type PatternFlowGreChecksum_Generated struct { +type BgpAttributesAsPath_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGreChecksum_Generated) Reset() { - *x = PatternFlowGreChecksum_Generated{} +func (x *BgpAttributesAsPath_Choice) Reset() { + *x = BgpAttributesAsPath_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1250] + mi := &file_otg_proto_msgTypes[1187] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreChecksum_Generated) String() string { +func (x *BgpAttributesAsPath_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreChecksum_Generated) ProtoMessage() {} +func (*BgpAttributesAsPath_Choice) ProtoMessage() {} -func (x *PatternFlowGreChecksum_Generated) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1250] +func (x *BgpAttributesAsPath_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1187] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111944,34 +119156,34 @@ func (x *PatternFlowGreChecksum_Generated) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreChecksum_Generated.ProtoReflect.Descriptor instead. -func (*PatternFlowGreChecksum_Generated) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{672, 1} +// Deprecated: Use BgpAttributesAsPath_Choice.ProtoReflect.Descriptor instead. +func (*BgpAttributesAsPath_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{173, 0} } -type PatternFlowGreReserved1_Choice struct { +type BgpAttributesFourByteAsPathSegment_Type struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGreReserved1_Choice) Reset() { - *x = PatternFlowGreReserved1_Choice{} +func (x *BgpAttributesFourByteAsPathSegment_Type) Reset() { + *x = BgpAttributesFourByteAsPathSegment_Type{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1251] + mi := &file_otg_proto_msgTypes[1188] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGreReserved1_Choice) String() string { +func (x *BgpAttributesFourByteAsPathSegment_Type) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGreReserved1_Choice) ProtoMessage() {} +func (*BgpAttributesFourByteAsPathSegment_Type) ProtoMessage() {} -func (x *PatternFlowGreReserved1_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1251] +func (x *BgpAttributesFourByteAsPathSegment_Type) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1188] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111982,34 +119194,34 @@ func (x *PatternFlowGreReserved1_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGreReserved1_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGreReserved1_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{675, 0} +// Deprecated: Use BgpAttributesFourByteAsPathSegment_Type.ProtoReflect.Descriptor instead. +func (*BgpAttributesFourByteAsPathSegment_Type) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{175, 0} } -type PatternFlowGtpv1Version_Choice struct { +type BgpAttributesTwoByteAsPathSegment_Type struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv1Version_Choice) Reset() { - *x = PatternFlowGtpv1Version_Choice{} +func (x *BgpAttributesTwoByteAsPathSegment_Type) Reset() { + *x = BgpAttributesTwoByteAsPathSegment_Type{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1252] + mi := &file_otg_proto_msgTypes[1189] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1Version_Choice) String() string { +func (x *BgpAttributesTwoByteAsPathSegment_Type) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1Version_Choice) ProtoMessage() {} +func (*BgpAttributesTwoByteAsPathSegment_Type) ProtoMessage() {} -func (x *PatternFlowGtpv1Version_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1252] +func (x *BgpAttributesTwoByteAsPathSegment_Type) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1189] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112020,34 +119232,34 @@ func (x *PatternFlowGtpv1Version_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1Version_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1Version_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{678, 0} +// Deprecated: Use BgpAttributesTwoByteAsPathSegment_Type.ProtoReflect.Descriptor instead. +func (*BgpAttributesTwoByteAsPathSegment_Type) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{177, 0} } -type PatternFlowGtpv1ProtocolType_Choice struct { +type BgpAttributesAggregator_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv1ProtocolType_Choice) Reset() { - *x = PatternFlowGtpv1ProtocolType_Choice{} +func (x *BgpAttributesAggregator_Choice) Reset() { + *x = BgpAttributesAggregator_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1253] + mi := &file_otg_proto_msgTypes[1190] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1ProtocolType_Choice) String() string { +func (x *BgpAttributesAggregator_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1ProtocolType_Choice) ProtoMessage() {} +func (*BgpAttributesAggregator_Choice) ProtoMessage() {} -func (x *PatternFlowGtpv1ProtocolType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1253] +func (x *BgpAttributesAggregator_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1190] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112058,34 +119270,34 @@ func (x *PatternFlowGtpv1ProtocolType_Choice) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1ProtocolType_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1ProtocolType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{681, 0} +// Deprecated: Use BgpAttributesAggregator_Choice.ProtoReflect.Descriptor instead. +func (*BgpAttributesAggregator_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{179, 0} } -type PatternFlowGtpv1Reserved_Choice struct { +type BgpAttributesCommunity_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv1Reserved_Choice) Reset() { - *x = PatternFlowGtpv1Reserved_Choice{} +func (x *BgpAttributesCommunity_Choice) Reset() { + *x = BgpAttributesCommunity_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1254] + mi := &file_otg_proto_msgTypes[1191] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1Reserved_Choice) String() string { +func (x *BgpAttributesCommunity_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1Reserved_Choice) ProtoMessage() {} +func (*BgpAttributesCommunity_Choice) ProtoMessage() {} -func (x *PatternFlowGtpv1Reserved_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1254] +func (x *BgpAttributesCommunity_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1191] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112096,34 +119308,34 @@ func (x *PatternFlowGtpv1Reserved_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1Reserved_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1Reserved_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{684, 0} +// Deprecated: Use BgpAttributesCommunity_Choice.ProtoReflect.Descriptor instead. +func (*BgpAttributesCommunity_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{181, 0} } -type PatternFlowGtpv1EFlag_Choice struct { +type BgpAttributesNextHop_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv1EFlag_Choice) Reset() { - *x = PatternFlowGtpv1EFlag_Choice{} +func (x *BgpAttributesNextHop_Choice) Reset() { + *x = BgpAttributesNextHop_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1255] + mi := &file_otg_proto_msgTypes[1192] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1EFlag_Choice) String() string { +func (x *BgpAttributesNextHop_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1EFlag_Choice) ProtoMessage() {} +func (*BgpAttributesNextHop_Choice) ProtoMessage() {} -func (x *PatternFlowGtpv1EFlag_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1255] +func (x *BgpAttributesNextHop_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1192] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112134,34 +119346,34 @@ func (x *PatternFlowGtpv1EFlag_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1EFlag_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1EFlag_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{687, 0} +// Deprecated: Use BgpAttributesNextHop_Choice.ProtoReflect.Descriptor instead. +func (*BgpAttributesNextHop_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{183, 0} } -type PatternFlowGtpv1SFlag_Choice struct { +type BgpAttributesMpReachNlri_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv1SFlag_Choice) Reset() { - *x = PatternFlowGtpv1SFlag_Choice{} +func (x *BgpAttributesMpReachNlri_Choice) Reset() { + *x = BgpAttributesMpReachNlri_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1256] + mi := &file_otg_proto_msgTypes[1193] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1SFlag_Choice) String() string { +func (x *BgpAttributesMpReachNlri_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1SFlag_Choice) ProtoMessage() {} +func (*BgpAttributesMpReachNlri_Choice) ProtoMessage() {} -func (x *PatternFlowGtpv1SFlag_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1256] +func (x *BgpAttributesMpReachNlri_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1193] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112172,34 +119384,34 @@ func (x *PatternFlowGtpv1SFlag_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1SFlag_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1SFlag_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{690, 0} +// Deprecated: Use BgpAttributesMpReachNlri_Choice.ProtoReflect.Descriptor instead. +func (*BgpAttributesMpReachNlri_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{185, 0} } -type PatternFlowGtpv1PnFlag_Choice struct { +type BgpAttributesMpUnreachNlri_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv1PnFlag_Choice) Reset() { - *x = PatternFlowGtpv1PnFlag_Choice{} +func (x *BgpAttributesMpUnreachNlri_Choice) Reset() { + *x = BgpAttributesMpUnreachNlri_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1257] + mi := &file_otg_proto_msgTypes[1194] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1PnFlag_Choice) String() string { +func (x *BgpAttributesMpUnreachNlri_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1PnFlag_Choice) ProtoMessage() {} +func (*BgpAttributesMpUnreachNlri_Choice) ProtoMessage() {} -func (x *PatternFlowGtpv1PnFlag_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1257] +func (x *BgpAttributesMpUnreachNlri_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1194] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112210,34 +119422,34 @@ func (x *PatternFlowGtpv1PnFlag_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1PnFlag_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1PnFlag_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{693, 0} +// Deprecated: Use BgpAttributesMpUnreachNlri_Choice.ProtoReflect.Descriptor instead. +func (*BgpAttributesMpUnreachNlri_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{186, 0} } -type PatternFlowGtpv1MessageType_Choice struct { +type BgpAttributesTunnelEncapsulation_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv1MessageType_Choice) Reset() { - *x = PatternFlowGtpv1MessageType_Choice{} +func (x *BgpAttributesTunnelEncapsulation_Choice) Reset() { + *x = BgpAttributesTunnelEncapsulation_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1258] + mi := &file_otg_proto_msgTypes[1195] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1MessageType_Choice) String() string { +func (x *BgpAttributesTunnelEncapsulation_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1MessageType_Choice) ProtoMessage() {} +func (*BgpAttributesTunnelEncapsulation_Choice) ProtoMessage() {} -func (x *PatternFlowGtpv1MessageType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1258] +func (x *BgpAttributesTunnelEncapsulation_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1195] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112248,34 +119460,34 @@ func (x *PatternFlowGtpv1MessageType_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1MessageType_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1MessageType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{696, 0} +// Deprecated: Use BgpAttributesTunnelEncapsulation_Choice.ProtoReflect.Descriptor instead. +func (*BgpAttributesTunnelEncapsulation_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{190, 0} } -type PatternFlowGtpv1MessageLength_Choice struct { +type BgpAttributesBsid_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv1MessageLength_Choice) Reset() { - *x = PatternFlowGtpv1MessageLength_Choice{} +func (x *BgpAttributesBsid_Choice) Reset() { + *x = BgpAttributesBsid_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1259] + mi := &file_otg_proto_msgTypes[1196] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1MessageLength_Choice) String() string { +func (x *BgpAttributesBsid_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1MessageLength_Choice) ProtoMessage() {} +func (*BgpAttributesBsid_Choice) ProtoMessage() {} -func (x *PatternFlowGtpv1MessageLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1259] +func (x *BgpAttributesBsid_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1196] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112286,34 +119498,34 @@ func (x *PatternFlowGtpv1MessageLength_Choice) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1MessageLength_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1MessageLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{699, 0} +// Deprecated: Use BgpAttributesBsid_Choice.ProtoReflect.Descriptor instead. +func (*BgpAttributesBsid_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{192, 0} } -type PatternFlowGtpv1Teid_Choice struct { +type BgpAttributesSrPolicyExplicitNullPolicy_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv1Teid_Choice) Reset() { - *x = PatternFlowGtpv1Teid_Choice{} +func (x *BgpAttributesSrPolicyExplicitNullPolicy_Choice) Reset() { + *x = BgpAttributesSrPolicyExplicitNullPolicy_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1260] + mi := &file_otg_proto_msgTypes[1197] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1Teid_Choice) String() string { +func (x *BgpAttributesSrPolicyExplicitNullPolicy_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1Teid_Choice) ProtoMessage() {} +func (*BgpAttributesSrPolicyExplicitNullPolicy_Choice) ProtoMessage() {} -func (x *PatternFlowGtpv1Teid_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1260] +func (x *BgpAttributesSrPolicyExplicitNullPolicy_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1197] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112324,34 +119536,34 @@ func (x *PatternFlowGtpv1Teid_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1Teid_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1Teid_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{702, 0} +// Deprecated: Use BgpAttributesSrPolicyExplicitNullPolicy_Choice.ProtoReflect.Descriptor instead. +func (*BgpAttributesSrPolicyExplicitNullPolicy_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{202, 0} } -type PatternFlowGtpv1SquenceNumber_Choice struct { +type BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv1SquenceNumber_Choice) Reset() { - *x = PatternFlowGtpv1SquenceNumber_Choice{} +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice) Reset() { + *x = BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1261] + mi := &file_otg_proto_msgTypes[1198] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1SquenceNumber_Choice) String() string { +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1SquenceNumber_Choice) ProtoMessage() {} +func (*BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice) ProtoMessage() {} -func (x *PatternFlowGtpv1SquenceNumber_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1261] +func (x *BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1198] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112362,34 +119574,34 @@ func (x *PatternFlowGtpv1SquenceNumber_Choice) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1SquenceNumber_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1SquenceNumber_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{705, 0} +// Deprecated: Use BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice.ProtoReflect.Descriptor instead. +func (*BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{205, 0} } -type PatternFlowGtpv1NPduNumber_Choice struct { +type BgpV6Peer_AsType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv1NPduNumber_Choice) Reset() { - *x = PatternFlowGtpv1NPduNumber_Choice{} +func (x *BgpV6Peer_AsType) Reset() { + *x = BgpV6Peer_AsType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1262] + mi := &file_otg_proto_msgTypes[1199] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1NPduNumber_Choice) String() string { +func (x *BgpV6Peer_AsType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1NPduNumber_Choice) ProtoMessage() {} +func (*BgpV6Peer_AsType) ProtoMessage() {} -func (x *PatternFlowGtpv1NPduNumber_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1262] +func (x *BgpV6Peer_AsType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1199] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112400,34 +119612,34 @@ func (x *PatternFlowGtpv1NPduNumber_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1NPduNumber_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1NPduNumber_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{708, 0} +// Deprecated: Use BgpV6Peer_AsType.ProtoReflect.Descriptor instead. +func (*BgpV6Peer_AsType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{220, 0} } -type PatternFlowGtpv1NextExtensionHeaderType_Choice struct { +type BgpV6Peer_AsNumberWidth struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv1NextExtensionHeaderType_Choice) Reset() { - *x = PatternFlowGtpv1NextExtensionHeaderType_Choice{} +func (x *BgpV6Peer_AsNumberWidth) Reset() { + *x = BgpV6Peer_AsNumberWidth{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1263] + mi := &file_otg_proto_msgTypes[1200] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv1NextExtensionHeaderType_Choice) String() string { +func (x *BgpV6Peer_AsNumberWidth) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv1NextExtensionHeaderType_Choice) ProtoMessage() {} +func (*BgpV6Peer_AsNumberWidth) ProtoMessage() {} -func (x *PatternFlowGtpv1NextExtensionHeaderType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1263] +func (x *BgpV6Peer_AsNumberWidth) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1200] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112438,34 +119650,34 @@ func (x *PatternFlowGtpv1NextExtensionHeaderType_Choice) ProtoReflect() protoref return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv1NextExtensionHeaderType_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv1NextExtensionHeaderType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{711, 0} +// Deprecated: Use BgpV6Peer_AsNumberWidth.ProtoReflect.Descriptor instead. +func (*BgpV6Peer_AsNumberWidth) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{220, 1} } -type PatternFlowGtpExtensionExtensionLength_Choice struct { +type BgpV6EthernetSegment_ActiveMode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpExtensionExtensionLength_Choice) Reset() { - *x = PatternFlowGtpExtensionExtensionLength_Choice{} +func (x *BgpV6EthernetSegment_ActiveMode) Reset() { + *x = BgpV6EthernetSegment_ActiveMode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1264] + mi := &file_otg_proto_msgTypes[1201] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpExtensionExtensionLength_Choice) String() string { +func (x *BgpV6EthernetSegment_ActiveMode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpExtensionExtensionLength_Choice) ProtoMessage() {} +func (*BgpV6EthernetSegment_ActiveMode) ProtoMessage() {} -func (x *PatternFlowGtpExtensionExtensionLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1264] +func (x *BgpV6EthernetSegment_ActiveMode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1201] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112476,34 +119688,34 @@ func (x *PatternFlowGtpExtensionExtensionLength_Choice) ProtoReflect() protorefl return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpExtensionExtensionLength_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpExtensionExtensionLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{714, 0} +// Deprecated: Use BgpV6EthernetSegment_ActiveMode.ProtoReflect.Descriptor instead. +func (*BgpV6EthernetSegment_ActiveMode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{223, 0} } -type PatternFlowGtpExtensionContents_Choice struct { +type BgpV6EvpnEvis_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpExtensionContents_Choice) Reset() { - *x = PatternFlowGtpExtensionContents_Choice{} +func (x *BgpV6EvpnEvis_Choice) Reset() { + *x = BgpV6EvpnEvis_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1265] + mi := &file_otg_proto_msgTypes[1202] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpExtensionContents_Choice) String() string { +func (x *BgpV6EvpnEvis_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpExtensionContents_Choice) ProtoMessage() {} +func (*BgpV6EvpnEvis_Choice) ProtoMessage() {} -func (x *PatternFlowGtpExtensionContents_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1265] +func (x *BgpV6EvpnEvis_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1202] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112514,34 +119726,34 @@ func (x *PatternFlowGtpExtensionContents_Choice) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpExtensionContents_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpExtensionContents_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{717, 0} +// Deprecated: Use BgpV6EvpnEvis_Choice.ProtoReflect.Descriptor instead. +func (*BgpV6EvpnEvis_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{224, 0} } -type PatternFlowGtpExtensionNextExtensionHeader_Choice struct { +type BgpV6EviVxlan_ReplicationType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpExtensionNextExtensionHeader_Choice) Reset() { - *x = PatternFlowGtpExtensionNextExtensionHeader_Choice{} +func (x *BgpV6EviVxlan_ReplicationType) Reset() { + *x = BgpV6EviVxlan_ReplicationType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1266] + mi := &file_otg_proto_msgTypes[1203] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpExtensionNextExtensionHeader_Choice) String() string { +func (x *BgpV6EviVxlan_ReplicationType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpExtensionNextExtensionHeader_Choice) ProtoMessage() {} +func (*BgpV6EviVxlan_ReplicationType) ProtoMessage() {} -func (x *PatternFlowGtpExtensionNextExtensionHeader_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1266] +func (x *BgpV6EviVxlan_ReplicationType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1203] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112552,34 +119764,34 @@ func (x *PatternFlowGtpExtensionNextExtensionHeader_Choice) ProtoReflect() proto return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpExtensionNextExtensionHeader_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpExtensionNextExtensionHeader_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{720, 0} +// Deprecated: Use BgpV6EviVxlan_ReplicationType.ProtoReflect.Descriptor instead. +func (*BgpV6EviVxlan_ReplicationType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{225, 0} } -type PatternFlowGtpv2Version_Choice struct { +type VxlanV4TunnelDestinationIPMode_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv2Version_Choice) Reset() { - *x = PatternFlowGtpv2Version_Choice{} +func (x *VxlanV4TunnelDestinationIPMode_Choice) Reset() { + *x = VxlanV4TunnelDestinationIPMode_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1267] + mi := &file_otg_proto_msgTypes[1204] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2Version_Choice) String() string { +func (x *VxlanV4TunnelDestinationIPMode_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2Version_Choice) ProtoMessage() {} +func (*VxlanV4TunnelDestinationIPMode_Choice) ProtoMessage() {} -func (x *PatternFlowGtpv2Version_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1267] +func (x *VxlanV4TunnelDestinationIPMode_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1204] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112590,34 +119802,34 @@ func (x *PatternFlowGtpv2Version_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2Version_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2Version_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{723, 0} +// Deprecated: Use VxlanV4TunnelDestinationIPMode_Choice.ProtoReflect.Descriptor instead. +func (*VxlanV4TunnelDestinationIPMode_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{230, 0} } -type PatternFlowGtpv2PiggybackingFlag_Choice struct { +type VxlanV6TunnelDestinationIPMode_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv2PiggybackingFlag_Choice) Reset() { - *x = PatternFlowGtpv2PiggybackingFlag_Choice{} +func (x *VxlanV6TunnelDestinationIPMode_Choice) Reset() { + *x = VxlanV6TunnelDestinationIPMode_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1268] + mi := &file_otg_proto_msgTypes[1205] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2PiggybackingFlag_Choice) String() string { +func (x *VxlanV6TunnelDestinationIPMode_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2PiggybackingFlag_Choice) ProtoMessage() {} +func (*VxlanV6TunnelDestinationIPMode_Choice) ProtoMessage() {} -func (x *PatternFlowGtpv2PiggybackingFlag_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1268] +func (x *VxlanV6TunnelDestinationIPMode_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1205] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112628,34 +119840,34 @@ func (x *PatternFlowGtpv2PiggybackingFlag_Choice) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2PiggybackingFlag_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2PiggybackingFlag_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{726, 0} +// Deprecated: Use VxlanV6TunnelDestinationIPMode_Choice.ProtoReflect.Descriptor instead. +func (*VxlanV6TunnelDestinationIPMode_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{231, 0} } -type PatternFlowGtpv2TeidFlag_Choice struct { +type RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv2TeidFlag_Choice) Reset() { - *x = PatternFlowGtpv2TeidFlag_Choice{} +func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle) Reset() { + *x = RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1269] + mi := &file_otg_proto_msgTypes[1206] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2TeidFlag_Choice) String() string { +func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2TeidFlag_Choice) ProtoMessage() {} +func (*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle) ProtoMessage() {} -func (x *PatternFlowGtpv2TeidFlag_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1269] +func (x *RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1206] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112666,34 +119878,34 @@ func (x *PatternFlowGtpv2TeidFlag_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2TeidFlag_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2TeidFlag_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{729, 0} +// Deprecated: Use RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle.ProtoReflect.Descriptor instead. +func (*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{242, 0} } -type PatternFlowGtpv2Spare1_Choice struct { +type RsvpEro_PrependNeighborIp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv2Spare1_Choice) Reset() { - *x = PatternFlowGtpv2Spare1_Choice{} +func (x *RsvpEro_PrependNeighborIp) Reset() { + *x = RsvpEro_PrependNeighborIp{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1270] + mi := &file_otg_proto_msgTypes[1207] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2Spare1_Choice) String() string { +func (x *RsvpEro_PrependNeighborIp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2Spare1_Choice) ProtoMessage() {} +func (*RsvpEro_PrependNeighborIp) ProtoMessage() {} -func (x *PatternFlowGtpv2Spare1_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1270] +func (x *RsvpEro_PrependNeighborIp) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1207] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112704,34 +119916,34 @@ func (x *PatternFlowGtpv2Spare1_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2Spare1_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2Spare1_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{732, 0} +// Deprecated: Use RsvpEro_PrependNeighborIp.ProtoReflect.Descriptor instead. +func (*RsvpEro_PrependNeighborIp) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{248, 0} } -type PatternFlowGtpv2MessageType_Choice struct { +type RsvpEroSubobject_Type struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv2MessageType_Choice) Reset() { - *x = PatternFlowGtpv2MessageType_Choice{} +func (x *RsvpEroSubobject_Type) Reset() { + *x = RsvpEroSubobject_Type{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1271] + mi := &file_otg_proto_msgTypes[1208] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2MessageType_Choice) String() string { +func (x *RsvpEroSubobject_Type) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2MessageType_Choice) ProtoMessage() {} +func (*RsvpEroSubobject_Type) ProtoMessage() {} -func (x *PatternFlowGtpv2MessageType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1271] +func (x *RsvpEroSubobject_Type) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1208] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112742,34 +119954,34 @@ func (x *PatternFlowGtpv2MessageType_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2MessageType_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2MessageType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{735, 0} +// Deprecated: Use RsvpEroSubobject_Type.ProtoReflect.Descriptor instead. +func (*RsvpEroSubobject_Type) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{249, 0} } -type PatternFlowGtpv2MessageLength_Choice struct { +type RsvpEroSubobject_HopType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv2MessageLength_Choice) Reset() { - *x = PatternFlowGtpv2MessageLength_Choice{} +func (x *RsvpEroSubobject_HopType) Reset() { + *x = RsvpEroSubobject_HopType{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1272] + mi := &file_otg_proto_msgTypes[1209] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2MessageLength_Choice) String() string { +func (x *RsvpEroSubobject_HopType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2MessageLength_Choice) ProtoMessage() {} +func (*RsvpEroSubobject_HopType) ProtoMessage() {} -func (x *PatternFlowGtpv2MessageLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1272] +func (x *RsvpEroSubobject_HopType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1209] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112780,34 +119992,34 @@ func (x *PatternFlowGtpv2MessageLength_Choice) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2MessageLength_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2MessageLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{738, 0} +// Deprecated: Use RsvpEroSubobject_HopType.ProtoReflect.Descriptor instead. +func (*RsvpEroSubobject_HopType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{249, 1} } -type PatternFlowGtpv2Teid_Choice struct { +type Dhcpv6ServerIaType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv2Teid_Choice) Reset() { - *x = PatternFlowGtpv2Teid_Choice{} +func (x *Dhcpv6ServerIaType_Choice) Reset() { + *x = Dhcpv6ServerIaType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1273] + mi := &file_otg_proto_msgTypes[1210] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2Teid_Choice) String() string { +func (x *Dhcpv6ServerIaType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2Teid_Choice) ProtoMessage() {} +func (*Dhcpv6ServerIaType_Choice) ProtoMessage() {} -func (x *PatternFlowGtpv2Teid_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1273] +func (x *Dhcpv6ServerIaType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1210] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112818,34 +120030,34 @@ func (x *PatternFlowGtpv2Teid_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2Teid_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2Teid_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{741, 0} +// Deprecated: Use Dhcpv6ServerIaType_Choice.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerIaType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{257, 0} } -type PatternFlowGtpv2SequenceNumber_Choice struct { +type Ospfv2RouterId_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv2SequenceNumber_Choice) Reset() { - *x = PatternFlowGtpv2SequenceNumber_Choice{} +func (x *Ospfv2RouterId_Choice) Reset() { + *x = Ospfv2RouterId_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1274] + mi := &file_otg_proto_msgTypes[1211] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2SequenceNumber_Choice) String() string { +func (x *Ospfv2RouterId_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2SequenceNumber_Choice) ProtoMessage() {} +func (*Ospfv2RouterId_Choice) ProtoMessage() {} -func (x *PatternFlowGtpv2SequenceNumber_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1274] +func (x *Ospfv2RouterId_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1211] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112856,34 +120068,34 @@ func (x *PatternFlowGtpv2SequenceNumber_Choice) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2SequenceNumber_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2SequenceNumber_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{744, 0} +// Deprecated: Use Ospfv2RouterId_Choice.ProtoReflect.Descriptor instead. +func (*Ospfv2RouterId_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{264, 0} } -type PatternFlowGtpv2Spare2_Choice struct { +type Ospfv2InterfaceArea_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowGtpv2Spare2_Choice) Reset() { - *x = PatternFlowGtpv2Spare2_Choice{} +func (x *Ospfv2InterfaceArea_Choice) Reset() { + *x = Ospfv2InterfaceArea_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1275] + mi := &file_otg_proto_msgTypes[1212] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowGtpv2Spare2_Choice) String() string { +func (x *Ospfv2InterfaceArea_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowGtpv2Spare2_Choice) ProtoMessage() {} +func (*Ospfv2InterfaceArea_Choice) ProtoMessage() {} -func (x *PatternFlowGtpv2Spare2_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1275] +func (x *Ospfv2InterfaceArea_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1212] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112894,34 +120106,34 @@ func (x *PatternFlowGtpv2Spare2_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowGtpv2Spare2_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowGtpv2Spare2_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{747, 0} +// Deprecated: Use Ospfv2InterfaceArea_Choice.ProtoReflect.Descriptor instead. +func (*Ospfv2InterfaceArea_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{268, 0} } -type PatternFlowArpHardwareType_Choice struct { +type Ospfv2InterfaceNetworkType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowArpHardwareType_Choice) Reset() { - *x = PatternFlowArpHardwareType_Choice{} +func (x *Ospfv2InterfaceNetworkType_Choice) Reset() { + *x = Ospfv2InterfaceNetworkType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1276] + mi := &file_otg_proto_msgTypes[1213] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpHardwareType_Choice) String() string { +func (x *Ospfv2InterfaceNetworkType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpHardwareType_Choice) ProtoMessage() {} +func (*Ospfv2InterfaceNetworkType_Choice) ProtoMessage() {} -func (x *PatternFlowArpHardwareType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1276] +func (x *Ospfv2InterfaceNetworkType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1213] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112932,34 +120144,34 @@ func (x *PatternFlowArpHardwareType_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpHardwareType_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowArpHardwareType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{750, 0} +// Deprecated: Use Ospfv2InterfaceNetworkType_Choice.ProtoReflect.Descriptor instead. +func (*Ospfv2InterfaceNetworkType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{269, 0} } -type PatternFlowArpProtocolType_Choice struct { +type Ospfv2InterfaceAuthentication_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowArpProtocolType_Choice) Reset() { - *x = PatternFlowArpProtocolType_Choice{} +func (x *Ospfv2InterfaceAuthentication_Choice) Reset() { + *x = Ospfv2InterfaceAuthentication_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1277] + mi := &file_otg_proto_msgTypes[1214] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpProtocolType_Choice) String() string { +func (x *Ospfv2InterfaceAuthentication_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpProtocolType_Choice) ProtoMessage() {} +func (*Ospfv2InterfaceAuthentication_Choice) ProtoMessage() {} -func (x *PatternFlowArpProtocolType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1277] +func (x *Ospfv2InterfaceAuthentication_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1214] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -112970,34 +120182,34 @@ func (x *PatternFlowArpProtocolType_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpProtocolType_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowArpProtocolType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{753, 0} +// Deprecated: Use Ospfv2InterfaceAuthentication_Choice.ProtoReflect.Descriptor instead. +func (*Ospfv2InterfaceAuthentication_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{273, 0} } -type PatternFlowArpHardwareLength_Choice struct { +type Ospfv2V4RRRouteOrigin_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowArpHardwareLength_Choice) Reset() { - *x = PatternFlowArpHardwareLength_Choice{} +func (x *Ospfv2V4RRRouteOrigin_Choice) Reset() { + *x = Ospfv2V4RRRouteOrigin_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1278] + mi := &file_otg_proto_msgTypes[1215] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpHardwareLength_Choice) String() string { +func (x *Ospfv2V4RRRouteOrigin_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpHardwareLength_Choice) ProtoMessage() {} +func (*Ospfv2V4RRRouteOrigin_Choice) ProtoMessage() {} -func (x *PatternFlowArpHardwareLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1278] +func (x *Ospfv2V4RRRouteOrigin_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1215] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113008,34 +120220,34 @@ func (x *PatternFlowArpHardwareLength_Choice) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpHardwareLength_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowArpHardwareLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{756, 0} +// Deprecated: Use Ospfv2V4RRRouteOrigin_Choice.ProtoReflect.Descriptor instead. +func (*Ospfv2V4RRRouteOrigin_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{277, 0} } -type PatternFlowArpProtocolLength_Choice struct { +type FlowTxRx_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowArpProtocolLength_Choice) Reset() { - *x = PatternFlowArpProtocolLength_Choice{} +func (x *FlowTxRx_Choice) Reset() { + *x = FlowTxRx_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1279] + mi := &file_otg_proto_msgTypes[1216] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpProtocolLength_Choice) String() string { +func (x *FlowTxRx_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpProtocolLength_Choice) ProtoMessage() {} +func (*FlowTxRx_Choice) ProtoMessage() {} -func (x *PatternFlowArpProtocolLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1279] +func (x *FlowTxRx_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1216] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113046,34 +120258,34 @@ func (x *PatternFlowArpProtocolLength_Choice) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpProtocolLength_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowArpProtocolLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{759, 0} +// Deprecated: Use FlowTxRx_Choice.ProtoReflect.Descriptor instead. +func (*FlowTxRx_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{285, 0} } -type PatternFlowArpOperation_Choice struct { +type FlowRouter_Mode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowArpOperation_Choice) Reset() { - *x = PatternFlowArpOperation_Choice{} +func (x *FlowRouter_Mode) Reset() { + *x = FlowRouter_Mode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1280] + mi := &file_otg_proto_msgTypes[1217] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpOperation_Choice) String() string { +func (x *FlowRouter_Mode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpOperation_Choice) ProtoMessage() {} +func (*FlowRouter_Mode) ProtoMessage() {} -func (x *PatternFlowArpOperation_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1280] +func (x *FlowRouter_Mode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1217] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113084,34 +120296,34 @@ func (x *PatternFlowArpOperation_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpOperation_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowArpOperation_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{762, 0} +// Deprecated: Use FlowRouter_Mode.ProtoReflect.Descriptor instead. +func (*FlowRouter_Mode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{287, 0} } -type PatternFlowArpSenderHardwareAddr_Choice struct { +type FlowHeader_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowArpSenderHardwareAddr_Choice) Reset() { - *x = PatternFlowArpSenderHardwareAddr_Choice{} +func (x *FlowHeader_Choice) Reset() { + *x = FlowHeader_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1281] + mi := &file_otg_proto_msgTypes[1218] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpSenderHardwareAddr_Choice) String() string { +func (x *FlowHeader_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpSenderHardwareAddr_Choice) ProtoMessage() {} +func (*FlowHeader_Choice) ProtoMessage() {} -func (x *PatternFlowArpSenderHardwareAddr_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1281] +func (x *FlowHeader_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1218] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113122,34 +120334,34 @@ func (x *PatternFlowArpSenderHardwareAddr_Choice) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpSenderHardwareAddr_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowArpSenderHardwareAddr_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{765, 0} +// Deprecated: Use FlowHeader_Choice.ProtoReflect.Descriptor instead. +func (*FlowHeader_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{288, 0} } -type PatternFlowArpSenderProtocolAddr_Choice struct { +type FlowIpv4Options_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowArpSenderProtocolAddr_Choice) Reset() { - *x = PatternFlowArpSenderProtocolAddr_Choice{} +func (x *FlowIpv4Options_Choice) Reset() { + *x = FlowIpv4Options_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1282] + mi := &file_otg_proto_msgTypes[1219] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpSenderProtocolAddr_Choice) String() string { +func (x *FlowIpv4Options_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpSenderProtocolAddr_Choice) ProtoMessage() {} +func (*FlowIpv4Options_Choice) ProtoMessage() {} -func (x *PatternFlowArpSenderProtocolAddr_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1282] +func (x *FlowIpv4Options_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1219] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113160,34 +120372,34 @@ func (x *PatternFlowArpSenderProtocolAddr_Choice) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpSenderProtocolAddr_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowArpSenderProtocolAddr_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{768, 0} +// Deprecated: Use FlowIpv4Options_Choice.ProtoReflect.Descriptor instead. +func (*FlowIpv4Options_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{295, 0} } -type PatternFlowArpTargetHardwareAddr_Choice struct { +type FlowIpv4OptionsCustomLength_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowArpTargetHardwareAddr_Choice) Reset() { - *x = PatternFlowArpTargetHardwareAddr_Choice{} +func (x *FlowIpv4OptionsCustomLength_Choice) Reset() { + *x = FlowIpv4OptionsCustomLength_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1283] + mi := &file_otg_proto_msgTypes[1220] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpTargetHardwareAddr_Choice) String() string { +func (x *FlowIpv4OptionsCustomLength_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpTargetHardwareAddr_Choice) ProtoMessage() {} +func (*FlowIpv4OptionsCustomLength_Choice) ProtoMessage() {} -func (x *PatternFlowArpTargetHardwareAddr_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1283] +func (x *FlowIpv4OptionsCustomLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1220] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113198,34 +120410,34 @@ func (x *PatternFlowArpTargetHardwareAddr_Choice) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpTargetHardwareAddr_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowArpTargetHardwareAddr_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{771, 0} +// Deprecated: Use FlowIpv4OptionsCustomLength_Choice.ProtoReflect.Descriptor instead. +func (*FlowIpv4OptionsCustomLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{298, 0} } -type PatternFlowArpTargetProtocolAddr_Choice struct { +type FlowIpv4Priority_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowArpTargetProtocolAddr_Choice) Reset() { - *x = PatternFlowArpTargetProtocolAddr_Choice{} +func (x *FlowIpv4Priority_Choice) Reset() { + *x = FlowIpv4Priority_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1284] + mi := &file_otg_proto_msgTypes[1221] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowArpTargetProtocolAddr_Choice) String() string { +func (x *FlowIpv4Priority_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowArpTargetProtocolAddr_Choice) ProtoMessage() {} +func (*FlowIpv4Priority_Choice) ProtoMessage() {} -func (x *PatternFlowArpTargetProtocolAddr_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1284] +func (x *FlowIpv4Priority_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1221] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113236,34 +120448,34 @@ func (x *PatternFlowArpTargetProtocolAddr_Choice) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowArpTargetProtocolAddr_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowArpTargetProtocolAddr_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{774, 0} +// Deprecated: Use FlowIpv4Priority_Choice.ProtoReflect.Descriptor instead. +func (*FlowIpv4Priority_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{299, 0} } -type PatternFlowIcmpEchoType_Choice struct { +type FlowIpv4Auto_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpEchoType_Choice) Reset() { - *x = PatternFlowIcmpEchoType_Choice{} +func (x *FlowIpv4Auto_Choice) Reset() { + *x = FlowIpv4Auto_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1285] + mi := &file_otg_proto_msgTypes[1222] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoType_Choice) String() string { +func (x *FlowIpv4Auto_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoType_Choice) ProtoMessage() {} +func (*FlowIpv4Auto_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpEchoType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1285] +func (x *FlowIpv4Auto_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1222] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113274,34 +120486,34 @@ func (x *PatternFlowIcmpEchoType_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoType_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{777, 0} +// Deprecated: Use FlowIpv4Auto_Choice.ProtoReflect.Descriptor instead. +func (*FlowIpv4Auto_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{302, 0} } -type PatternFlowIcmpEchoCode_Choice struct { +type FlowIpv6Auto_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpEchoCode_Choice) Reset() { - *x = PatternFlowIcmpEchoCode_Choice{} +func (x *FlowIpv6Auto_Choice) Reset() { + *x = FlowIpv6Auto_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1286] + mi := &file_otg_proto_msgTypes[1223] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoCode_Choice) String() string { +func (x *FlowIpv6Auto_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoCode_Choice) ProtoMessage() {} +func (*FlowIpv6Auto_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpEchoCode_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1286] +func (x *FlowIpv6Auto_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1223] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113312,34 +120524,34 @@ func (x *PatternFlowIcmpEchoCode_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoCode_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoCode_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{780, 0} +// Deprecated: Use FlowIpv6Auto_Choice.ProtoReflect.Descriptor instead. +func (*FlowIpv6Auto_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{304, 0} } -type PatternFlowIcmpEchoChecksum_Choice struct { +type FlowIcmp_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpEchoChecksum_Choice) Reset() { - *x = PatternFlowIcmpEchoChecksum_Choice{} +func (x *FlowIcmp_Choice) Reset() { + *x = FlowIcmp_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1287] + mi := &file_otg_proto_msgTypes[1224] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoChecksum_Choice) String() string { +func (x *FlowIcmp_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoChecksum_Choice) ProtoMessage() {} +func (*FlowIcmp_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpEchoChecksum_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1287] +func (x *FlowIcmp_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1224] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113350,34 +120562,34 @@ func (x *PatternFlowIcmpEchoChecksum_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoChecksum_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoChecksum_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{781, 0} +// Deprecated: Use FlowIcmp_Choice.ProtoReflect.Descriptor instead. +func (*FlowIcmp_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{314, 0} } -type PatternFlowIcmpEchoChecksum_Generated struct { +type FlowIcmpv6_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpEchoChecksum_Generated) Reset() { - *x = PatternFlowIcmpEchoChecksum_Generated{} +func (x *FlowIcmpv6_Choice) Reset() { + *x = FlowIcmpv6_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1288] + mi := &file_otg_proto_msgTypes[1225] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoChecksum_Generated) String() string { +func (x *FlowIcmpv6_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoChecksum_Generated) ProtoMessage() {} +func (*FlowIcmpv6_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpEchoChecksum_Generated) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1288] +func (x *FlowIcmpv6_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1225] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113388,34 +120600,34 @@ func (x *PatternFlowIcmpEchoChecksum_Generated) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoChecksum_Generated.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoChecksum_Generated) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{781, 1} +// Deprecated: Use FlowIcmpv6_Choice.ProtoReflect.Descriptor instead. +func (*FlowIcmpv6_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{316, 0} } -type PatternFlowIcmpEchoIdentifier_Choice struct { +type FlowSnmpv2CData_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpEchoIdentifier_Choice) Reset() { - *x = PatternFlowIcmpEchoIdentifier_Choice{} +func (x *FlowSnmpv2CData_Choice) Reset() { + *x = FlowSnmpv2CData_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1289] + mi := &file_otg_proto_msgTypes[1226] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoIdentifier_Choice) String() string { +func (x *FlowSnmpv2CData_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoIdentifier_Choice) ProtoMessage() {} +func (*FlowSnmpv2CData_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpEchoIdentifier_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1289] +func (x *FlowSnmpv2CData_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1226] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113426,34 +120638,34 @@ func (x *PatternFlowIcmpEchoIdentifier_Choice) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoIdentifier_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoIdentifier_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{784, 0} +// Deprecated: Use FlowSnmpv2CData_Choice.ProtoReflect.Descriptor instead. +func (*FlowSnmpv2CData_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{322, 0} } -type PatternFlowIcmpEchoSequenceNumber_Choice struct { +type FlowSnmpv2CPDU_ErrorStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpEchoSequenceNumber_Choice) Reset() { - *x = PatternFlowIcmpEchoSequenceNumber_Choice{} +func (x *FlowSnmpv2CPDU_ErrorStatus) Reset() { + *x = FlowSnmpv2CPDU_ErrorStatus{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1290] + mi := &file_otg_proto_msgTypes[1227] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpEchoSequenceNumber_Choice) String() string { +func (x *FlowSnmpv2CPDU_ErrorStatus) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpEchoSequenceNumber_Choice) ProtoMessage() {} +func (*FlowSnmpv2CPDU_ErrorStatus) ProtoMessage() {} -func (x *PatternFlowIcmpEchoSequenceNumber_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1290] +func (x *FlowSnmpv2CPDU_ErrorStatus) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1227] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113464,34 +120676,34 @@ func (x *PatternFlowIcmpEchoSequenceNumber_Choice) ProtoReflect() protoreflect.M return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpEchoSequenceNumber_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpEchoSequenceNumber_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{787, 0} +// Deprecated: Use FlowSnmpv2CPDU_ErrorStatus.ProtoReflect.Descriptor instead. +func (*FlowSnmpv2CPDU_ErrorStatus) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{323, 0} } -type PatternFlowIcmpCommonChecksum_Choice struct { +type FlowSnmpv2CVariableBindingValue_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpCommonChecksum_Choice) Reset() { - *x = PatternFlowIcmpCommonChecksum_Choice{} +func (x *FlowSnmpv2CVariableBindingValue_Choice) Reset() { + *x = FlowSnmpv2CVariableBindingValue_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1291] + mi := &file_otg_proto_msgTypes[1228] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpCommonChecksum_Choice) String() string { +func (x *FlowSnmpv2CVariableBindingValue_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpCommonChecksum_Choice) ProtoMessage() {} +func (*FlowSnmpv2CVariableBindingValue_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpCommonChecksum_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1291] +func (x *FlowSnmpv2CVariableBindingValue_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1228] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113502,34 +120714,34 @@ func (x *PatternFlowIcmpCommonChecksum_Choice) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpCommonChecksum_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpCommonChecksum_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{788, 0} +// Deprecated: Use FlowSnmpv2CVariableBindingValue_Choice.ProtoReflect.Descriptor instead. +func (*FlowSnmpv2CVariableBindingValue_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{326, 0} } -type PatternFlowIcmpCommonChecksum_Generated struct { +type FlowSnmpv2CVariableBindingStringValue_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpCommonChecksum_Generated) Reset() { - *x = PatternFlowIcmpCommonChecksum_Generated{} +func (x *FlowSnmpv2CVariableBindingStringValue_Choice) Reset() { + *x = FlowSnmpv2CVariableBindingStringValue_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1292] + mi := &file_otg_proto_msgTypes[1229] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpCommonChecksum_Generated) String() string { +func (x *FlowSnmpv2CVariableBindingStringValue_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpCommonChecksum_Generated) ProtoMessage() {} +func (*FlowSnmpv2CVariableBindingStringValue_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpCommonChecksum_Generated) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1292] +func (x *FlowSnmpv2CVariableBindingStringValue_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1229] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113540,34 +120752,34 @@ func (x *PatternFlowIcmpCommonChecksum_Generated) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpCommonChecksum_Generated.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpCommonChecksum_Generated) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{788, 1} +// Deprecated: Use FlowSnmpv2CVariableBindingStringValue_Choice.ProtoReflect.Descriptor instead. +func (*FlowSnmpv2CVariableBindingStringValue_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{327, 0} } -type PatternFlowIcmpNextFieldsIdentifier_Choice struct { +type FlowRsvp_Flag struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpNextFieldsIdentifier_Choice) Reset() { - *x = PatternFlowIcmpNextFieldsIdentifier_Choice{} +func (x *FlowRsvp_Flag) Reset() { + *x = FlowRsvp_Flag{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1293] + mi := &file_otg_proto_msgTypes[1230] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpNextFieldsIdentifier_Choice) String() string { +func (x *FlowRsvp_Flag) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpNextFieldsIdentifier_Choice) ProtoMessage() {} +func (*FlowRsvp_Flag) ProtoMessage() {} -func (x *PatternFlowIcmpNextFieldsIdentifier_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1293] +func (x *FlowRsvp_Flag) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1230] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113578,34 +120790,34 @@ func (x *PatternFlowIcmpNextFieldsIdentifier_Choice) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpNextFieldsIdentifier_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpNextFieldsIdentifier_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{791, 0} +// Deprecated: Use FlowRsvp_Flag.ProtoReflect.Descriptor instead. +func (*FlowRsvp_Flag) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{328, 0} } -type PatternFlowIcmpNextFieldsSequenceNumber_Choice struct { +type FlowRSVPLength_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpNextFieldsSequenceNumber_Choice) Reset() { - *x = PatternFlowIcmpNextFieldsSequenceNumber_Choice{} +func (x *FlowRSVPLength_Choice) Reset() { + *x = FlowRSVPLength_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1294] + mi := &file_otg_proto_msgTypes[1231] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpNextFieldsSequenceNumber_Choice) String() string { +func (x *FlowRSVPLength_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpNextFieldsSequenceNumber_Choice) ProtoMessage() {} +func (*FlowRSVPLength_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpNextFieldsSequenceNumber_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1294] +func (x *FlowRSVPLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1231] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113616,34 +120828,34 @@ func (x *PatternFlowIcmpNextFieldsSequenceNumber_Choice) ProtoReflect() protoref return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpNextFieldsSequenceNumber_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpNextFieldsSequenceNumber_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{794, 0} +// Deprecated: Use FlowRSVPLength_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{329, 0} } -type PatternFlowIcmpv6EchoType_Choice struct { +type FlowRSVPMessage_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpv6EchoType_Choice) Reset() { - *x = PatternFlowIcmpv6EchoType_Choice{} +func (x *FlowRSVPMessage_Choice) Reset() { + *x = FlowRSVPMessage_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1295] + mi := &file_otg_proto_msgTypes[1232] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoType_Choice) String() string { +func (x *FlowRSVPMessage_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoType_Choice) ProtoMessage() {} +func (*FlowRSVPMessage_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1295] +func (x *FlowRSVPMessage_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1232] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113654,34 +120866,34 @@ func (x *PatternFlowIcmpv6EchoType_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoType_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{797, 0} +// Deprecated: Use FlowRSVPMessage_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPMessage_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{330, 0} } -type PatternFlowIcmpv6EchoCode_Choice struct { +type FlowRSVPObjectLength_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpv6EchoCode_Choice) Reset() { - *x = PatternFlowIcmpv6EchoCode_Choice{} +func (x *FlowRSVPObjectLength_Choice) Reset() { + *x = FlowRSVPObjectLength_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1296] + mi := &file_otg_proto_msgTypes[1233] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoCode_Choice) String() string { +func (x *FlowRSVPObjectLength_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoCode_Choice) ProtoMessage() {} +func (*FlowRSVPObjectLength_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoCode_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1296] +func (x *FlowRSVPObjectLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1233] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113692,34 +120904,34 @@ func (x *PatternFlowIcmpv6EchoCode_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoCode_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoCode_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{800, 0} +// Deprecated: Use FlowRSVPObjectLength_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPObjectLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{333, 0} } -type PatternFlowIcmpv6EchoIdentifier_Choice struct { +type FlowRSVPPathObjectsClass_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpv6EchoIdentifier_Choice) Reset() { - *x = PatternFlowIcmpv6EchoIdentifier_Choice{} +func (x *FlowRSVPPathObjectsClass_Choice) Reset() { + *x = FlowRSVPPathObjectsClass_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1297] + mi := &file_otg_proto_msgTypes[1234] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoIdentifier_Choice) String() string { +func (x *FlowRSVPPathObjectsClass_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoIdentifier_Choice) ProtoMessage() {} +func (*FlowRSVPPathObjectsClass_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoIdentifier_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1297] +func (x *FlowRSVPPathObjectsClass_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1234] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113730,34 +120942,34 @@ func (x *PatternFlowIcmpv6EchoIdentifier_Choice) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoIdentifier_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoIdentifier_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{803, 0} +// Deprecated: Use FlowRSVPPathObjectsClass_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsClass_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{334, 0} } -type PatternFlowIcmpv6EchoSequenceNumber_Choice struct { +type FlowRSVPPathObjectsSessionCType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpv6EchoSequenceNumber_Choice) Reset() { - *x = PatternFlowIcmpv6EchoSequenceNumber_Choice{} +func (x *FlowRSVPPathObjectsSessionCType_Choice) Reset() { + *x = FlowRSVPPathObjectsSessionCType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1298] + mi := &file_otg_proto_msgTypes[1235] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoSequenceNumber_Choice) String() string { +func (x *FlowRSVPPathObjectsSessionCType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoSequenceNumber_Choice) ProtoMessage() {} +func (*FlowRSVPPathObjectsSessionCType_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoSequenceNumber_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1298] +func (x *FlowRSVPPathObjectsSessionCType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1235] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113768,34 +120980,34 @@ func (x *PatternFlowIcmpv6EchoSequenceNumber_Choice) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoSequenceNumber_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoSequenceNumber_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{806, 0} +// Deprecated: Use FlowRSVPPathObjectsSessionCType_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsSessionCType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{336, 0} } -type PatternFlowIcmpv6EchoChecksum_Choice struct { +type FlowRSVPPathSessionExtTunnelId_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpv6EchoChecksum_Choice) Reset() { - *x = PatternFlowIcmpv6EchoChecksum_Choice{} +func (x *FlowRSVPPathSessionExtTunnelId_Choice) Reset() { + *x = FlowRSVPPathSessionExtTunnelId_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1299] + mi := &file_otg_proto_msgTypes[1236] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoChecksum_Choice) String() string { +func (x *FlowRSVPPathSessionExtTunnelId_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoChecksum_Choice) ProtoMessage() {} +func (*FlowRSVPPathSessionExtTunnelId_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoChecksum_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1299] +func (x *FlowRSVPPathSessionExtTunnelId_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1236] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113806,34 +121018,34 @@ func (x *PatternFlowIcmpv6EchoChecksum_Choice) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoChecksum_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoChecksum_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{807, 0} +// Deprecated: Use FlowRSVPPathSessionExtTunnelId_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathSessionExtTunnelId_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{338, 0} } -type PatternFlowIcmpv6EchoChecksum_Generated struct { +type FlowRSVPPathObjectsRsvpHopCType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpv6EchoChecksum_Generated) Reset() { - *x = PatternFlowIcmpv6EchoChecksum_Generated{} +func (x *FlowRSVPPathObjectsRsvpHopCType_Choice) Reset() { + *x = FlowRSVPPathObjectsRsvpHopCType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1300] + mi := &file_otg_proto_msgTypes[1237] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6EchoChecksum_Generated) String() string { +func (x *FlowRSVPPathObjectsRsvpHopCType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6EchoChecksum_Generated) ProtoMessage() {} +func (*FlowRSVPPathObjectsRsvpHopCType_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpv6EchoChecksum_Generated) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1300] +func (x *FlowRSVPPathObjectsRsvpHopCType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1237] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113844,34 +121056,34 @@ func (x *PatternFlowIcmpv6EchoChecksum_Generated) ProtoReflect() protoreflect.Me return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6EchoChecksum_Generated.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6EchoChecksum_Generated) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{807, 1} +// Deprecated: Use FlowRSVPPathObjectsRsvpHopCType_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsRsvpHopCType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{340, 0} } -type PatternFlowIcmpv6CommonChecksum_Choice struct { +type FlowRSVPPathObjectsTimeValuesCType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpv6CommonChecksum_Choice) Reset() { - *x = PatternFlowIcmpv6CommonChecksum_Choice{} +func (x *FlowRSVPPathObjectsTimeValuesCType_Choice) Reset() { + *x = FlowRSVPPathObjectsTimeValuesCType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1301] + mi := &file_otg_proto_msgTypes[1238] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6CommonChecksum_Choice) String() string { +func (x *FlowRSVPPathObjectsTimeValuesCType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6CommonChecksum_Choice) ProtoMessage() {} +func (*FlowRSVPPathObjectsTimeValuesCType_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpv6CommonChecksum_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1301] +func (x *FlowRSVPPathObjectsTimeValuesCType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1238] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113882,34 +121094,34 @@ func (x *PatternFlowIcmpv6CommonChecksum_Choice) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6CommonChecksum_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6CommonChecksum_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{808, 0} +// Deprecated: Use FlowRSVPPathObjectsTimeValuesCType_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsTimeValuesCType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{343, 0} } -type PatternFlowIcmpv6CommonChecksum_Generated struct { +type FlowRSVPPathObjectsClassExplicitRouteCType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIcmpv6CommonChecksum_Generated) Reset() { - *x = PatternFlowIcmpv6CommonChecksum_Generated{} +func (x *FlowRSVPPathObjectsClassExplicitRouteCType_Choice) Reset() { + *x = FlowRSVPPathObjectsClassExplicitRouteCType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1302] + mi := &file_otg_proto_msgTypes[1239] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIcmpv6CommonChecksum_Generated) String() string { +func (x *FlowRSVPPathObjectsClassExplicitRouteCType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIcmpv6CommonChecksum_Generated) ProtoMessage() {} +func (*FlowRSVPPathObjectsClassExplicitRouteCType_Choice) ProtoMessage() {} -func (x *PatternFlowIcmpv6CommonChecksum_Generated) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1302] +func (x *FlowRSVPPathObjectsClassExplicitRouteCType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1239] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113920,34 +121132,34 @@ func (x *PatternFlowIcmpv6CommonChecksum_Generated) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIcmpv6CommonChecksum_Generated.ProtoReflect.Descriptor instead. -func (*PatternFlowIcmpv6CommonChecksum_Generated) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{808, 1} +// Deprecated: Use FlowRSVPPathObjectsClassExplicitRouteCType_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsClassExplicitRouteCType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{346, 0} } -type PatternFlowPppAddress_Choice struct { +type FlowRSVPType1ExplicitRouteSubobjectsType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPppAddress_Choice) Reset() { - *x = PatternFlowPppAddress_Choice{} +func (x *FlowRSVPType1ExplicitRouteSubobjectsType_Choice) Reset() { + *x = FlowRSVPType1ExplicitRouteSubobjectsType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1303] + mi := &file_otg_proto_msgTypes[1240] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPppAddress_Choice) String() string { +func (x *FlowRSVPType1ExplicitRouteSubobjectsType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPppAddress_Choice) ProtoMessage() {} +func (*FlowRSVPType1ExplicitRouteSubobjectsType_Choice) ProtoMessage() {} -func (x *PatternFlowPppAddress_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1303] +func (x *FlowRSVPType1ExplicitRouteSubobjectsType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1240] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113958,34 +121170,34 @@ func (x *PatternFlowPppAddress_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPppAddress_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPppAddress_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{811, 0} +// Deprecated: Use FlowRSVPType1ExplicitRouteSubobjectsType_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPType1ExplicitRouteSubobjectsType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{349, 0} } -type PatternFlowPppControl_Choice struct { +type FlowRSVPExplicitRouteLength_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPppControl_Choice) Reset() { - *x = PatternFlowPppControl_Choice{} +func (x *FlowRSVPExplicitRouteLength_Choice) Reset() { + *x = FlowRSVPExplicitRouteLength_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1304] + mi := &file_otg_proto_msgTypes[1241] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPppControl_Choice) String() string { +func (x *FlowRSVPExplicitRouteLength_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPppControl_Choice) ProtoMessage() {} +func (*FlowRSVPExplicitRouteLength_Choice) ProtoMessage() {} -func (x *PatternFlowPppControl_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1304] +func (x *FlowRSVPExplicitRouteLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1241] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113996,34 +121208,34 @@ func (x *PatternFlowPppControl_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPppControl_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPppControl_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{814, 0} +// Deprecated: Use FlowRSVPExplicitRouteLength_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPExplicitRouteLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{352, 0} } -type PatternFlowPppProtocolType_Choice struct { +type FlowRSVPExplicitRouteASNumberLength_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowPppProtocolType_Choice) Reset() { - *x = PatternFlowPppProtocolType_Choice{} +func (x *FlowRSVPExplicitRouteASNumberLength_Choice) Reset() { + *x = FlowRSVPExplicitRouteASNumberLength_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1305] + mi := &file_otg_proto_msgTypes[1242] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowPppProtocolType_Choice) String() string { +func (x *FlowRSVPExplicitRouteASNumberLength_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowPppProtocolType_Choice) ProtoMessage() {} +func (*FlowRSVPExplicitRouteASNumberLength_Choice) ProtoMessage() {} -func (x *PatternFlowPppProtocolType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1305] +func (x *FlowRSVPExplicitRouteASNumberLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1242] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114034,34 +121246,34 @@ func (x *PatternFlowPppProtocolType_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowPppProtocolType_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowPppProtocolType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{817, 0} +// Deprecated: Use FlowRSVPExplicitRouteASNumberLength_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPExplicitRouteASNumberLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{353, 0} } -type PatternFlowIgmpv1Version_Choice struct { +type FlowRSVPPathObjectsLabelRequestCType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIgmpv1Version_Choice) Reset() { - *x = PatternFlowIgmpv1Version_Choice{} +func (x *FlowRSVPPathObjectsLabelRequestCType_Choice) Reset() { + *x = FlowRSVPPathObjectsLabelRequestCType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1306] + mi := &file_otg_proto_msgTypes[1243] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1Version_Choice) String() string { +func (x *FlowRSVPPathObjectsLabelRequestCType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1Version_Choice) ProtoMessage() {} +func (*FlowRSVPPathObjectsLabelRequestCType_Choice) ProtoMessage() {} -func (x *PatternFlowIgmpv1Version_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1306] +func (x *FlowRSVPPathObjectsLabelRequestCType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1243] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114072,34 +121284,34 @@ func (x *PatternFlowIgmpv1Version_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1Version_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1Version_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{820, 0} +// Deprecated: Use FlowRSVPPathObjectsLabelRequestCType_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsLabelRequestCType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{355, 0} } -type PatternFlowIgmpv1Type_Choice struct { +type FlowRSVPPathObjectsSessionAttributeCType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIgmpv1Type_Choice) Reset() { - *x = PatternFlowIgmpv1Type_Choice{} +func (x *FlowRSVPPathObjectsSessionAttributeCType_Choice) Reset() { + *x = FlowRSVPPathObjectsSessionAttributeCType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1307] + mi := &file_otg_proto_msgTypes[1244] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1Type_Choice) String() string { +func (x *FlowRSVPPathObjectsSessionAttributeCType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1Type_Choice) ProtoMessage() {} +func (*FlowRSVPPathObjectsSessionAttributeCType_Choice) ProtoMessage() {} -func (x *PatternFlowIgmpv1Type_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1307] +func (x *FlowRSVPPathObjectsSessionAttributeCType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1244] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114110,34 +121322,34 @@ func (x *PatternFlowIgmpv1Type_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1Type_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1Type_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{823, 0} +// Deprecated: Use FlowRSVPPathObjectsSessionAttributeCType_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsSessionAttributeCType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{358, 0} } -type PatternFlowIgmpv1Unused_Choice struct { +type FlowRSVPLspTunnelFlag_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIgmpv1Unused_Choice) Reset() { - *x = PatternFlowIgmpv1Unused_Choice{} +func (x *FlowRSVPLspTunnelFlag_Choice) Reset() { + *x = FlowRSVPLspTunnelFlag_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1308] + mi := &file_otg_proto_msgTypes[1245] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1Unused_Choice) String() string { +func (x *FlowRSVPLspTunnelFlag_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1Unused_Choice) ProtoMessage() {} +func (*FlowRSVPLspTunnelFlag_Choice) ProtoMessage() {} -func (x *PatternFlowIgmpv1Unused_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1308] +func (x *FlowRSVPLspTunnelFlag_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1245] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114148,34 +121360,34 @@ func (x *PatternFlowIgmpv1Unused_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1Unused_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1Unused_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{826, 0} +// Deprecated: Use FlowRSVPLspTunnelFlag_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPLspTunnelFlag_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{361, 0} } -type PatternFlowIgmpv1Checksum_Choice struct { +type FlowRSVPSessionAttributeNameLength_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIgmpv1Checksum_Choice) Reset() { - *x = PatternFlowIgmpv1Checksum_Choice{} +func (x *FlowRSVPSessionAttributeNameLength_Choice) Reset() { + *x = FlowRSVPSessionAttributeNameLength_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1309] + mi := &file_otg_proto_msgTypes[1246] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1Checksum_Choice) String() string { +func (x *FlowRSVPSessionAttributeNameLength_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1Checksum_Choice) ProtoMessage() {} +func (*FlowRSVPSessionAttributeNameLength_Choice) ProtoMessage() {} -func (x *PatternFlowIgmpv1Checksum_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1309] +func (x *FlowRSVPSessionAttributeNameLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1246] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114186,34 +121398,34 @@ func (x *PatternFlowIgmpv1Checksum_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1Checksum_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1Checksum_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{827, 0} +// Deprecated: Use FlowRSVPSessionAttributeNameLength_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPSessionAttributeNameLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{362, 0} } -type PatternFlowIgmpv1Checksum_Generated struct { +type FlowRSVPPathObjectsSenderTemplateCType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIgmpv1Checksum_Generated) Reset() { - *x = PatternFlowIgmpv1Checksum_Generated{} +func (x *FlowRSVPPathObjectsSenderTemplateCType_Choice) Reset() { + *x = FlowRSVPPathObjectsSenderTemplateCType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1310] + mi := &file_otg_proto_msgTypes[1247] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1Checksum_Generated) String() string { +func (x *FlowRSVPPathObjectsSenderTemplateCType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1Checksum_Generated) ProtoMessage() {} +func (*FlowRSVPPathObjectsSenderTemplateCType_Choice) ProtoMessage() {} -func (x *PatternFlowIgmpv1Checksum_Generated) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1310] +func (x *FlowRSVPPathObjectsSenderTemplateCType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1247] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114224,34 +121436,34 @@ func (x *PatternFlowIgmpv1Checksum_Generated) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1Checksum_Generated.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1Checksum_Generated) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{827, 1} +// Deprecated: Use FlowRSVPPathObjectsSenderTemplateCType_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsSenderTemplateCType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{364, 0} } -type PatternFlowIgmpv1GroupAddress_Choice struct { +type FlowRSVPPathObjectsSenderTspecCType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowIgmpv1GroupAddress_Choice) Reset() { - *x = PatternFlowIgmpv1GroupAddress_Choice{} +func (x *FlowRSVPPathObjectsSenderTspecCType_Choice) Reset() { + *x = FlowRSVPPathObjectsSenderTspecCType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1311] + mi := &file_otg_proto_msgTypes[1248] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowIgmpv1GroupAddress_Choice) String() string { +func (x *FlowRSVPPathObjectsSenderTspecCType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowIgmpv1GroupAddress_Choice) ProtoMessage() {} +func (*FlowRSVPPathObjectsSenderTspecCType_Choice) ProtoMessage() {} -func (x *PatternFlowIgmpv1GroupAddress_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1311] +func (x *FlowRSVPPathObjectsSenderTspecCType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1248] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114262,34 +121474,34 @@ func (x *PatternFlowIgmpv1GroupAddress_Choice) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use PatternFlowIgmpv1GroupAddress_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowIgmpv1GroupAddress_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{830, 0} +// Deprecated: Use FlowRSVPPathObjectsSenderTspecCType_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsSenderTspecCType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{367, 0} } -type PatternFlowMplsLabel_Choice struct { +type FlowRSVPPathObjectsRecordRouteCType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowMplsLabel_Choice) Reset() { - *x = PatternFlowMplsLabel_Choice{} +func (x *FlowRSVPPathObjectsRecordRouteCType_Choice) Reset() { + *x = FlowRSVPPathObjectsRecordRouteCType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1312] + mi := &file_otg_proto_msgTypes[1249] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsLabel_Choice) String() string { +func (x *FlowRSVPPathObjectsRecordRouteCType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsLabel_Choice) ProtoMessage() {} +func (*FlowRSVPPathObjectsRecordRouteCType_Choice) ProtoMessage() {} -func (x *PatternFlowMplsLabel_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1312] +func (x *FlowRSVPPathObjectsRecordRouteCType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1249] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114300,34 +121512,34 @@ func (x *PatternFlowMplsLabel_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsLabel_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsLabel_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{833, 0} +// Deprecated: Use FlowRSVPPathObjectsRecordRouteCType_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsRecordRouteCType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{370, 0} } -type PatternFlowMplsTrafficClass_Choice struct { +type FlowRSVPPathObjectsRecordRouteSubObjectType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowMplsTrafficClass_Choice) Reset() { - *x = PatternFlowMplsTrafficClass_Choice{} +func (x *FlowRSVPPathObjectsRecordRouteSubObjectType_Choice) Reset() { + *x = FlowRSVPPathObjectsRecordRouteSubObjectType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1313] + mi := &file_otg_proto_msgTypes[1250] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsTrafficClass_Choice) String() string { +func (x *FlowRSVPPathObjectsRecordRouteSubObjectType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsTrafficClass_Choice) ProtoMessage() {} +func (*FlowRSVPPathObjectsRecordRouteSubObjectType_Choice) ProtoMessage() {} -func (x *PatternFlowMplsTrafficClass_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1313] +func (x *FlowRSVPPathObjectsRecordRouteSubObjectType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1250] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114338,34 +121550,34 @@ func (x *PatternFlowMplsTrafficClass_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsTrafficClass_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsTrafficClass_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{836, 0} +// Deprecated: Use FlowRSVPPathObjectsRecordRouteSubObjectType_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathObjectsRecordRouteSubObjectType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{373, 0} } -type PatternFlowMplsBottomOfStack_Choice struct { +type FlowRSVPRecordRouteIPv4Flag_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowMplsBottomOfStack_Choice) Reset() { - *x = PatternFlowMplsBottomOfStack_Choice{} +func (x *FlowRSVPRecordRouteIPv4Flag_Choice) Reset() { + *x = FlowRSVPRecordRouteIPv4Flag_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1314] + mi := &file_otg_proto_msgTypes[1251] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsBottomOfStack_Choice) String() string { +func (x *FlowRSVPRecordRouteIPv4Flag_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsBottomOfStack_Choice) ProtoMessage() {} +func (*FlowRSVPRecordRouteIPv4Flag_Choice) ProtoMessage() {} -func (x *PatternFlowMplsBottomOfStack_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1314] +func (x *FlowRSVPRecordRouteIPv4Flag_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1251] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114376,34 +121588,34 @@ func (x *PatternFlowMplsBottomOfStack_Choice) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsBottomOfStack_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsBottomOfStack_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{839, 0} +// Deprecated: Use FlowRSVPRecordRouteIPv4Flag_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPRecordRouteIPv4Flag_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{375, 0} } -type PatternFlowMplsTimeToLive_Choice struct { +type FlowRSVPPathRecordRouteLabel_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowMplsTimeToLive_Choice) Reset() { - *x = PatternFlowMplsTimeToLive_Choice{} +func (x *FlowRSVPPathRecordRouteLabel_Choice) Reset() { + *x = FlowRSVPPathRecordRouteLabel_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1315] + mi := &file_otg_proto_msgTypes[1252] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowMplsTimeToLive_Choice) String() string { +func (x *FlowRSVPPathRecordRouteLabel_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowMplsTimeToLive_Choice) ProtoMessage() {} +func (*FlowRSVPPathRecordRouteLabel_Choice) ProtoMessage() {} -func (x *PatternFlowMplsTimeToLive_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1315] +func (x *FlowRSVPPathRecordRouteLabel_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1252] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114414,34 +121626,34 @@ func (x *PatternFlowMplsTimeToLive_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowMplsTimeToLive_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowMplsTimeToLive_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{842, 0} +// Deprecated: Use FlowRSVPPathRecordRouteLabel_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPPathRecordRouteLabel_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{377, 0} } -type PatternFlowSnmpv2CVersion_Choice struct { +type FlowRSVPRouteRecordLength_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowSnmpv2CVersion_Choice) Reset() { - *x = PatternFlowSnmpv2CVersion_Choice{} +func (x *FlowRSVPRouteRecordLength_Choice) Reset() { + *x = FlowRSVPRouteRecordLength_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1316] + mi := &file_otg_proto_msgTypes[1253] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVersion_Choice) String() string { +func (x *FlowRSVPRouteRecordLength_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVersion_Choice) ProtoMessage() {} +func (*FlowRSVPRouteRecordLength_Choice) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVersion_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1316] +func (x *FlowRSVPRouteRecordLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1253] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114452,34 +121664,34 @@ func (x *PatternFlowSnmpv2CVersion_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVersion_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVersion_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{844, 0} +// Deprecated: Use FlowRSVPRouteRecordLength_Choice.ProtoReflect.Descriptor instead. +func (*FlowRSVPRouteRecordLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{378, 0} } -type PatternFlowSnmpv2CPDURequestId_Choice struct { +type FlowSize_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowSnmpv2CPDURequestId_Choice) Reset() { - *x = PatternFlowSnmpv2CPDURequestId_Choice{} +func (x *FlowSize_Choice) Reset() { + *x = FlowSize_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1317] + mi := &file_otg_proto_msgTypes[1254] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CPDURequestId_Choice) String() string { +func (x *FlowSize_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CPDURequestId_Choice) ProtoMessage() {} +func (*FlowSize_Choice) ProtoMessage() {} -func (x *PatternFlowSnmpv2CPDURequestId_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1317] +func (x *FlowSize_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1254] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114490,34 +121702,34 @@ func (x *PatternFlowSnmpv2CPDURequestId_Choice) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CPDURequestId_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CPDURequestId_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{846, 0} +// Deprecated: Use FlowSize_Choice.ProtoReflect.Descriptor instead. +func (*FlowSize_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{380, 0} } -type PatternFlowSnmpv2CPDUErrorIndex_Choice struct { +type FlowSizeWeightPairs_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowSnmpv2CPDUErrorIndex_Choice) Reset() { - *x = PatternFlowSnmpv2CPDUErrorIndex_Choice{} +func (x *FlowSizeWeightPairs_Choice) Reset() { + *x = FlowSizeWeightPairs_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1318] + mi := &file_otg_proto_msgTypes[1255] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CPDUErrorIndex_Choice) String() string { +func (x *FlowSizeWeightPairs_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CPDUErrorIndex_Choice) ProtoMessage() {} +func (*FlowSizeWeightPairs_Choice) ProtoMessage() {} -func (x *PatternFlowSnmpv2CPDUErrorIndex_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1318] +func (x *FlowSizeWeightPairs_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1255] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114528,34 +121740,34 @@ func (x *PatternFlowSnmpv2CPDUErrorIndex_Choice) ProtoReflect() protoreflect.Mes return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CPDUErrorIndex_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CPDUErrorIndex_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{848, 0} +// Deprecated: Use FlowSizeWeightPairs_Choice.ProtoReflect.Descriptor instead. +func (*FlowSizeWeightPairs_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{383, 0} } -type PatternFlowSnmpv2CBulkPDURequestId_Choice struct { +type FlowSizeWeightPairs_Predefined struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowSnmpv2CBulkPDURequestId_Choice) Reset() { - *x = PatternFlowSnmpv2CBulkPDURequestId_Choice{} +func (x *FlowSizeWeightPairs_Predefined) Reset() { + *x = FlowSizeWeightPairs_Predefined{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1319] + mi := &file_otg_proto_msgTypes[1256] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CBulkPDURequestId_Choice) String() string { +func (x *FlowSizeWeightPairs_Predefined) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CBulkPDURequestId_Choice) ProtoMessage() {} +func (*FlowSizeWeightPairs_Predefined) ProtoMessage() {} -func (x *PatternFlowSnmpv2CBulkPDURequestId_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1319] +func (x *FlowSizeWeightPairs_Predefined) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1256] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114566,34 +121778,34 @@ func (x *PatternFlowSnmpv2CBulkPDURequestId_Choice) ProtoReflect() protoreflect. return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CBulkPDURequestId_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CBulkPDURequestId_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{850, 0} +// Deprecated: Use FlowSizeWeightPairs_Predefined.ProtoReflect.Descriptor instead. +func (*FlowSizeWeightPairs_Predefined) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{383, 1} } -type PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice struct { +type FlowRate_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice) Reset() { - *x = PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice{} +func (x *FlowRate_Choice) Reset() { + *x = FlowRate_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1320] + mi := &file_otg_proto_msgTypes[1257] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice) String() string { +func (x *FlowRate_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice) ProtoMessage() {} +func (*FlowRate_Choice) ProtoMessage() {} -func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1320] +func (x *FlowRate_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1257] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114604,34 +121816,34 @@ func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice) ProtoReflect() protorefle return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{851, 0} +// Deprecated: Use FlowRate_Choice.ProtoReflect.Descriptor instead. +func (*FlowRate_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{385, 0} } -type PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice struct { +type FlowDuration_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice) Reset() { - *x = PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice{} +func (x *FlowDuration_Choice) Reset() { + *x = FlowDuration_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1321] + mi := &file_otg_proto_msgTypes[1258] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice) String() string { +func (x *FlowDuration_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice) ProtoMessage() {} +func (*FlowDuration_Choice) ProtoMessage() {} -func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1321] +func (x *FlowDuration_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1258] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114642,34 +121854,34 @@ func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice) ProtoReflect() protoref return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{853, 0} +// Deprecated: Use FlowDuration_Choice.ProtoReflect.Descriptor instead. +func (*FlowDuration_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{386, 0} } -type PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice struct { +type FlowDelay_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice{} +func (x *FlowDelay_Choice) Reset() { + *x = FlowDelay_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1322] + mi := &file_otg_proto_msgTypes[1259] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice) String() string { +func (x *FlowDelay_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice) ProtoMessage() {} +func (*FlowDelay_Choice) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1322] +func (x *FlowDelay_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1259] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114680,34 +121892,34 @@ func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice) ProtoReflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{855, 0} +// Deprecated: Use FlowDelay_Choice.ProtoReflect.Descriptor instead. +func (*FlowDelay_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{388, 0} } -type PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice struct { +type FlowDurationInterBurstGap_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice{} +func (x *FlowDurationInterBurstGap_Choice) Reset() { + *x = FlowDurationInterBurstGap_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1323] + mi := &file_otg_proto_msgTypes[1260] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice) String() string { +func (x *FlowDurationInterBurstGap_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice) ProtoMessage() {} +func (*FlowDurationInterBurstGap_Choice) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1323] +func (x *FlowDurationInterBurstGap_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1260] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114718,34 +121930,34 @@ func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice) ProtoRefle return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{857, 0} +// Deprecated: Use FlowDurationInterBurstGap_Choice.ProtoReflect.Descriptor instead. +func (*FlowDurationInterBurstGap_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{392, 0} } -type PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice struct { +type FlowLatencyMetrics_Mode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice{} +func (x *FlowLatencyMetrics_Mode) Reset() { + *x = FlowLatencyMetrics_Mode{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1324] + mi := &file_otg_proto_msgTypes[1261] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice) String() string { +func (x *FlowLatencyMetrics_Mode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice) ProtoMessage() {} +func (*FlowLatencyMetrics_Mode) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1324] +func (x *FlowLatencyMetrics_Mode) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1261] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114756,34 +121968,34 @@ func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice) ProtoReflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{859, 0} +// Deprecated: Use FlowLatencyMetrics_Mode.ProtoReflect.Descriptor instead. +func (*FlowLatencyMetrics_Mode) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{394, 0} } -type PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice struct { +type FlowRxTxRatio_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice{} +func (x *FlowRxTxRatio_Choice) Reset() { + *x = FlowRxTxRatio_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1325] + mi := &file_otg_proto_msgTypes[1262] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice) String() string { +func (x *FlowRxTxRatio_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice) ProtoMessage() {} +func (*FlowRxTxRatio_Choice) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1325] +func (x *FlowRxTxRatio_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1262] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114794,34 +122006,34 @@ func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice) ProtoRefle return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{861, 0} +// Deprecated: Use FlowRxTxRatio_Choice.ProtoReflect.Descriptor instead. +func (*FlowRxTxRatio_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{396, 0} } -type PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice struct { +type EventRequest_Type struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice{} +func (x *EventRequest_Type) Reset() { + *x = EventRequest_Type{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1326] + mi := &file_otg_proto_msgTypes[1263] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice) String() string { +func (x *EventRequest_Type) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice) ProtoMessage() {} +func (*EventRequest_Type) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1326] +func (x *EventRequest_Type) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1263] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114832,34 +122044,34 @@ func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice) ProtoRefl return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{863, 0} +// Deprecated: Use EventRequest_Type.ProtoReflect.Descriptor instead. +func (*EventRequest_Type) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{402, 0} } -type PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice struct { +type LldpConnection_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice) Reset() { - *x = PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice{} +func (x *LldpConnection_Choice) Reset() { + *x = LldpConnection_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1327] + mi := &file_otg_proto_msgTypes[1264] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice) String() string { +func (x *LldpConnection_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice) ProtoMessage() {} +func (*LldpConnection_Choice) ProtoMessage() {} -func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1327] +func (x *LldpConnection_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1264] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114870,34 +122082,34 @@ func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice) Prot return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{865, 0} +// Deprecated: Use LldpConnection_Choice.ProtoReflect.Descriptor instead. +func (*LldpConnection_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{405, 0} } -type PatternFlowSnmpv2CCommonRequestId_Choice struct { +type LldpChassisId_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowSnmpv2CCommonRequestId_Choice) Reset() { - *x = PatternFlowSnmpv2CCommonRequestId_Choice{} +func (x *LldpChassisId_Choice) Reset() { + *x = LldpChassisId_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1328] + mi := &file_otg_proto_msgTypes[1265] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowSnmpv2CCommonRequestId_Choice) String() string { +func (x *LldpChassisId_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowSnmpv2CCommonRequestId_Choice) ProtoMessage() {} +func (*LldpChassisId_Choice) ProtoMessage() {} -func (x *PatternFlowSnmpv2CCommonRequestId_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1328] +func (x *LldpChassisId_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1265] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114908,34 +122120,34 @@ func (x *PatternFlowSnmpv2CCommonRequestId_Choice) ProtoReflect() protoreflect.M return mi.MessageOf(x) } -// Deprecated: Use PatternFlowSnmpv2CCommonRequestId_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowSnmpv2CCommonRequestId_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{867, 0} +// Deprecated: Use LldpChassisId_Choice.ProtoReflect.Descriptor instead. +func (*LldpChassisId_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{406, 0} } -type PatternFlowRsvpRsvpChecksum_Choice struct { +type LldpPortId_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRsvpRsvpChecksum_Choice) Reset() { - *x = PatternFlowRsvpRsvpChecksum_Choice{} +func (x *LldpPortId_Choice) Reset() { + *x = LldpPortId_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1329] + mi := &file_otg_proto_msgTypes[1266] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRsvpRsvpChecksum_Choice) String() string { +func (x *LldpPortId_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRsvpRsvpChecksum_Choice) ProtoMessage() {} +func (*LldpPortId_Choice) ProtoMessage() {} -func (x *PatternFlowRsvpRsvpChecksum_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1329] +func (x *LldpPortId_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1266] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114946,34 +122158,34 @@ func (x *PatternFlowRsvpRsvpChecksum_Choice) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRsvpRsvpChecksum_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRsvpRsvpChecksum_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{868, 0} +// Deprecated: Use LldpPortId_Choice.ProtoReflect.Descriptor instead. +func (*LldpPortId_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{407, 0} } -type PatternFlowRsvpRsvpChecksum_Generated struct { +type LldpChassisMacSubType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRsvpRsvpChecksum_Generated) Reset() { - *x = PatternFlowRsvpRsvpChecksum_Generated{} +func (x *LldpChassisMacSubType_Choice) Reset() { + *x = LldpChassisMacSubType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1330] + mi := &file_otg_proto_msgTypes[1267] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRsvpRsvpChecksum_Generated) String() string { +func (x *LldpChassisMacSubType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRsvpRsvpChecksum_Generated) ProtoMessage() {} +func (*LldpChassisMacSubType_Choice) ProtoMessage() {} -func (x *PatternFlowRsvpRsvpChecksum_Generated) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1330] +func (x *LldpChassisMacSubType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1267] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114984,34 +122196,34 @@ func (x *PatternFlowRsvpRsvpChecksum_Generated) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRsvpRsvpChecksum_Generated.ProtoReflect.Descriptor instead. -func (*PatternFlowRsvpRsvpChecksum_Generated) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{868, 1} +// Deprecated: Use LldpChassisMacSubType_Choice.ProtoReflect.Descriptor instead. +func (*LldpChassisMacSubType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{408, 0} } -type PatternFlowRsvpTimeToLive_Choice struct { +type LldpPortInterfaceNameSubType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRsvpTimeToLive_Choice) Reset() { - *x = PatternFlowRsvpTimeToLive_Choice{} +func (x *LldpPortInterfaceNameSubType_Choice) Reset() { + *x = LldpPortInterfaceNameSubType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1331] + mi := &file_otg_proto_msgTypes[1268] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRsvpTimeToLive_Choice) String() string { +func (x *LldpPortInterfaceNameSubType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRsvpTimeToLive_Choice) ProtoMessage() {} +func (*LldpPortInterfaceNameSubType_Choice) ProtoMessage() {} -func (x *PatternFlowRsvpTimeToLive_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1331] +func (x *LldpPortInterfaceNameSubType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1268] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115022,34 +122234,34 @@ func (x *PatternFlowRsvpTimeToLive_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRsvpTimeToLive_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRsvpTimeToLive_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{870, 0} +// Deprecated: Use LldpPortInterfaceNameSubType_Choice.ProtoReflect.Descriptor instead. +func (*LldpPortInterfaceNameSubType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{409, 0} } -type PatternFlowRsvpReserved_Choice struct { +type LldpSystemName_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRsvpReserved_Choice) Reset() { - *x = PatternFlowRsvpReserved_Choice{} +func (x *LldpSystemName_Choice) Reset() { + *x = LldpSystemName_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1332] + mi := &file_otg_proto_msgTypes[1269] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRsvpReserved_Choice) String() string { +func (x *LldpSystemName_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRsvpReserved_Choice) ProtoMessage() {} +func (*LldpSystemName_Choice) ProtoMessage() {} -func (x *PatternFlowRsvpReserved_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1332] +func (x *LldpSystemName_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1269] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115060,34 +122272,34 @@ func (x *PatternFlowRsvpReserved_Choice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRsvpReserved_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRsvpReserved_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{872, 0} +// Deprecated: Use LldpSystemName_Choice.ProtoReflect.Descriptor instead. +func (*LldpSystemName_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{410, 0} } -type PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice struct { +type LldpOrgInfoType_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice) Reset() { - *x = PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice{} +func (x *LldpOrgInfoType_Choice) Reset() { + *x = LldpOrgInfoType_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1333] + mi := &file_otg_proto_msgTypes[1270] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice) String() string { +func (x *LldpOrgInfoType_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice) ProtoMessage() {} +func (*LldpOrgInfoType_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1333] +func (x *LldpOrgInfoType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1270] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115098,34 +122310,34 @@ func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{874, 0} +// Deprecated: Use LldpOrgInfoType_Choice.ProtoReflect.Descriptor instead. +func (*LldpOrgInfoType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{412, 0} } -type PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice struct { +type Error_Kind struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice) Reset() { - *x = PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice{} +func (x *Error_Kind) Reset() { + *x = Error_Kind{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1334] + mi := &file_otg_proto_msgTypes[1271] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice) String() string { +func (x *Error_Kind) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice) ProtoMessage() {} +func (*Error_Kind) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1334] +func (x *Error_Kind) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1271] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115136,34 +122348,34 @@ func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice) ProtoReflect() return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{876, 0} +// Deprecated: Use Error_Kind.ProtoReflect.Descriptor instead. +func (*Error_Kind) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{413, 0} } -type PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice struct { +type ConfigUpdate_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice) Reset() { - *x = PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice{} +func (x *ConfigUpdate_Choice) Reset() { + *x = ConfigUpdate_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1335] + mi := &file_otg_proto_msgTypes[1272] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice) String() string { +func (x *ConfigUpdate_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice) ProtoMessage() {} +func (*ConfigUpdate_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1335] +func (x *ConfigUpdate_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1272] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115174,34 +122386,34 @@ func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice) ProtoReflect() return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{878, 0} +// Deprecated: Use ConfigUpdate_Choice.ProtoReflect.Descriptor instead. +func (*ConfigUpdate_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{415, 0} } -type PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice struct { +type FlowsUpdate_PropertyNames struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice) Reset() { - *x = PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice{} +func (x *FlowsUpdate_PropertyNames) Reset() { + *x = FlowsUpdate_PropertyNames{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1336] + mi := &file_otg_proto_msgTypes[1273] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice) String() string { +func (x *FlowsUpdate_PropertyNames) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice) ProtoMessage() {} +func (*FlowsUpdate_PropertyNames) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1336] +func (x *FlowsUpdate_PropertyNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1273] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115212,34 +122424,34 @@ func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{880, 0} +// Deprecated: Use FlowsUpdate_PropertyNames.ProtoReflect.Descriptor instead. +func (*FlowsUpdate_PropertyNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{416, 0} } -type PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice struct { +type ControlState_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice) Reset() { - *x = PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice{} +func (x *ControlState_Choice) Reset() { + *x = ControlState_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1337] + mi := &file_otg_proto_msgTypes[1274] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice) String() string { +func (x *ControlState_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice) ProtoMessage() {} +func (*ControlState_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1337] +func (x *ControlState_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1274] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115250,34 +122462,34 @@ func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice) ProtoReflect() prot return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{882, 0} +// Deprecated: Use ControlState_Choice.ProtoReflect.Descriptor instead. +func (*ControlState_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{417, 0} } -type PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice struct { +type StatePort_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice) Reset() { - *x = PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice{} +func (x *StatePort_Choice) Reset() { + *x = StatePort_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1338] + mi := &file_otg_proto_msgTypes[1275] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice) String() string { +func (x *StatePort_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice) ProtoMessage() {} +func (*StatePort_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1338] +func (x *StatePort_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1275] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115288,34 +122500,34 @@ func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice) ProtoReflect() protor return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{884, 0} +// Deprecated: Use StatePort_Choice.ProtoReflect.Descriptor instead. +func (*StatePort_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{418, 0} } -type PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice struct { +type StateTraffic_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice) Reset() { - *x = PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice{} +func (x *StateTraffic_Choice) Reset() { + *x = StateTraffic_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1339] + mi := &file_otg_proto_msgTypes[1276] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice) String() string { +func (x *StateTraffic_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice) ProtoMessage() {} +func (*StateTraffic_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1339] +func (x *StateTraffic_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1276] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115326,34 +122538,34 @@ func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice) ProtoRefle return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{886, 0} +// Deprecated: Use StateTraffic_Choice.ProtoReflect.Descriptor instead. +func (*StateTraffic_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{419, 0} } -type PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice struct { +type StateProtocol_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice) Reset() { - *x = PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice{} +func (x *StateProtocol_Choice) Reset() { + *x = StateProtocol_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1340] + mi := &file_otg_proto_msgTypes[1277] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice) String() string { +func (x *StateProtocol_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice) ProtoMessage() {} +func (*StateProtocol_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1340] +func (x *StateProtocol_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1277] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115364,34 +122576,34 @@ func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice) ProtoReflect() return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{888, 0} +// Deprecated: Use StateProtocol_Choice.ProtoReflect.Descriptor instead. +func (*StateProtocol_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{420, 0} } -type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice struct { +type StatePortLink_State struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice) Reset() { - *x = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice{} +func (x *StatePortLink_State) Reset() { + *x = StatePortLink_State{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1341] + mi := &file_otg_proto_msgTypes[1278] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice) String() string { +func (x *StatePortLink_State) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice) ProtoMessage() {} +func (*StatePortLink_State) ProtoMessage() {} -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1341] +func (x *StatePortLink_State) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1278] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115402,34 +122614,34 @@ func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice) ProtoReflec return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{890, 0} +// Deprecated: Use StatePortLink_State.ProtoReflect.Descriptor instead. +func (*StatePortLink_State) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{421, 0} } -type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice struct { +type StatePortCapture_State struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice) Reset() { - *x = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice{} +func (x *StatePortCapture_State) Reset() { + *x = StatePortCapture_State{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1342] + mi := &file_otg_proto_msgTypes[1279] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice) String() string { +func (x *StatePortCapture_State) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice) ProtoMessage() {} +func (*StatePortCapture_State) ProtoMessage() {} -func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1342] +func (x *StatePortCapture_State) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1279] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115440,34 +122652,34 @@ func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice) Prot return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{892, 0} +// Deprecated: Use StatePortCapture_State.ProtoReflect.Descriptor instead. +func (*StatePortCapture_State) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{422, 0} } -type PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice struct { +type StateTrafficFlowTransmit_State struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice) Reset() { - *x = PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice{} +func (x *StateTrafficFlowTransmit_State) Reset() { + *x = StateTrafficFlowTransmit_State{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1343] + mi := &file_otg_proto_msgTypes[1280] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice) String() string { +func (x *StateTrafficFlowTransmit_State) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice) ProtoMessage() {} +func (*StateTrafficFlowTransmit_State) ProtoMessage() {} -func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1343] +func (x *StateTrafficFlowTransmit_State) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1280] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115478,34 +122690,34 @@ func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice) ProtoReflect( return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{894, 0} +// Deprecated: Use StateTrafficFlowTransmit_State.ProtoReflect.Descriptor instead. +func (*StateTrafficFlowTransmit_State) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{423, 0} } -type PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice struct { +type StateProtocolAll_State struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice) Reset() { - *x = PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice{} +func (x *StateProtocolAll_State) Reset() { + *x = StateProtocolAll_State{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1344] + mi := &file_otg_proto_msgTypes[1281] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice) String() string { +func (x *StateProtocolAll_State) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice) ProtoMessage() {} +func (*StateProtocolAll_State) ProtoMessage() {} -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1344] +func (x *StateProtocolAll_State) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1281] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115516,34 +122728,34 @@ func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice) ProtoR return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{896, 0} +// Deprecated: Use StateProtocolAll_State.ProtoReflect.Descriptor instead. +func (*StateProtocolAll_State) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{424, 0} } -type PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice struct { +type StateProtocolRoute_State struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice) Reset() { - *x = PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice{} +func (x *StateProtocolRoute_State) Reset() { + *x = StateProtocolRoute_State{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1345] + mi := &file_otg_proto_msgTypes[1282] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice) String() string { +func (x *StateProtocolRoute_State) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice) ProtoMessage() {} +func (*StateProtocolRoute_State) ProtoMessage() {} -func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1345] +func (x *StateProtocolRoute_State) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1282] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115554,34 +122766,34 @@ func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice) ProtoRefl return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{898, 0} +// Deprecated: Use StateProtocolRoute_State.ProtoReflect.Descriptor instead. +func (*StateProtocolRoute_State) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{425, 0} } -type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice struct { +type StateProtocolLacp_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice{} +func (x *StateProtocolLacp_Choice) Reset() { + *x = StateProtocolLacp_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1346] + mi := &file_otg_proto_msgTypes[1283] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice) String() string { +func (x *StateProtocolLacp_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice) ProtoMessage() {} +func (*StateProtocolLacp_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1346] +func (x *StateProtocolLacp_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1283] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115592,34 +122804,34 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_C return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{900, 0} +// Deprecated: Use StateProtocolLacp_Choice.ProtoReflect.Descriptor instead. +func (*StateProtocolLacp_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{426, 0} } -type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice struct { +type StateProtocolLacpAdmin_State struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice{} +func (x *StateProtocolLacpAdmin_State) Reset() { + *x = StateProtocolLacpAdmin_State{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1347] + mi := &file_otg_proto_msgTypes[1284] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice) String() string { +func (x *StateProtocolLacpAdmin_State) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice) ProtoMessage() {} +func (*StateProtocolLacpAdmin_State) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1347] +func (x *StateProtocolLacpAdmin_State) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1284] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115630,34 +122842,34 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice) ProtoRef return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{902, 0} +// Deprecated: Use StateProtocolLacpAdmin_State.ProtoReflect.Descriptor instead. +func (*StateProtocolLacpAdmin_State) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{427, 0} } -type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice struct { +type StateProtocolLacpMemberPorts_State struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice{} +func (x *StateProtocolLacpMemberPorts_State) Reset() { + *x = StateProtocolLacpMemberPorts_State{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1348] + mi := &file_otg_proto_msgTypes[1285] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice) String() string { +func (x *StateProtocolLacpMemberPorts_State) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice) ProtoMessage() {} +func (*StateProtocolLacpMemberPorts_State) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1348] +func (x *StateProtocolLacpMemberPorts_State) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1285] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115668,34 +122880,34 @@ func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice) ProtoReflec return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{904, 0} +// Deprecated: Use StateProtocolLacpMemberPorts_State.ProtoReflect.Descriptor instead. +func (*StateProtocolLacpMemberPorts_State) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{428, 0} } -type PatternFlowRSVPPathSenderTspecIntServVersion_Choice struct { +type StateProtocolBgp_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTspecIntServVersion_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServVersion_Choice{} +func (x *StateProtocolBgp_Choice) Reset() { + *x = StateProtocolBgp_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1349] + mi := &file_otg_proto_msgTypes[1286] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTspecIntServVersion_Choice) String() string { +func (x *StateProtocolBgp_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServVersion_Choice) ProtoMessage() {} +func (*StateProtocolBgp_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServVersion_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1349] +func (x *StateProtocolBgp_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1286] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115706,34 +122918,34 @@ func (x *PatternFlowRSVPPathSenderTspecIntServVersion_Choice) ProtoReflect() pro return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServVersion_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServVersion_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{906, 0} -} - -type PatternFlowRSVPPathSenderTspecIntServReserved1_Choice struct { +// Deprecated: Use StateProtocolBgp_Choice.ProtoReflect.Descriptor instead. +func (*StateProtocolBgp_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{429, 0} +} + +type StateProtocolBgpPeers_State struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServReserved1_Choice{} +func (x *StateProtocolBgpPeers_State) Reset() { + *x = StateProtocolBgpPeers_State{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1350] + mi := &file_otg_proto_msgTypes[1287] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1_Choice) String() string { +func (x *StateProtocolBgpPeers_State) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServReserved1_Choice) ProtoMessage() {} +func (*StateProtocolBgpPeers_State) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServReserved1_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1350] +func (x *StateProtocolBgpPeers_State) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1287] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115744,34 +122956,34 @@ func (x *PatternFlowRSVPPathSenderTspecIntServReserved1_Choice) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServReserved1_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServReserved1_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{908, 0} +// Deprecated: Use StateProtocolBgpPeers_State.ProtoReflect.Descriptor instead. +func (*StateProtocolBgpPeers_State) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{430, 0} } -type PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice struct { +type StateProtocolIsis_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice{} +func (x *StateProtocolIsis_Choice) Reset() { + *x = StateProtocolIsis_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1351] + mi := &file_otg_proto_msgTypes[1288] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice) String() string { +func (x *StateProtocolIsis_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice) ProtoMessage() {} +func (*StateProtocolIsis_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1351] +func (x *StateProtocolIsis_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1288] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115782,34 +122994,34 @@ func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice) ProtoReflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{910, 0} +// Deprecated: Use StateProtocolIsis_Choice.ProtoReflect.Descriptor instead. +func (*StateProtocolIsis_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{431, 0} } -type PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice struct { +type StateProtocolIsisRouters_State struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice{} +func (x *StateProtocolIsisRouters_State) Reset() { + *x = StateProtocolIsisRouters_State{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1352] + mi := &file_otg_proto_msgTypes[1289] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice) String() string { +func (x *StateProtocolIsisRouters_State) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice) ProtoMessage() {} +func (*StateProtocolIsisRouters_State) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1352] +func (x *StateProtocolIsisRouters_State) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1289] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115820,34 +123032,34 @@ func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice) ProtoReflect return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{912, 0} +// Deprecated: Use StateProtocolIsisRouters_State.ProtoReflect.Descriptor instead. +func (*StateProtocolIsisRouters_State) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{432, 0} } -type PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice struct { +type StateProtocolOspfv2_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice{} +func (x *StateProtocolOspfv2_Choice) Reset() { + *x = StateProtocolOspfv2_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1353] + mi := &file_otg_proto_msgTypes[1290] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice) String() string { +func (x *StateProtocolOspfv2_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice) ProtoMessage() {} +func (*StateProtocolOspfv2_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1353] +func (x *StateProtocolOspfv2_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1290] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115858,34 +123070,34 @@ func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice) ProtoReflect() pro return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{914, 0} +// Deprecated: Use StateProtocolOspfv2_Choice.ProtoReflect.Descriptor instead. +func (*StateProtocolOspfv2_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{433, 0} } -type PatternFlowRSVPPathSenderTspecIntServReserved2_Choice struct { +type StateProtocolOspfv2Routers_State struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServReserved2_Choice{} +func (x *StateProtocolOspfv2Routers_State) Reset() { + *x = StateProtocolOspfv2Routers_State{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1354] + mi := &file_otg_proto_msgTypes[1291] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2_Choice) String() string { +func (x *StateProtocolOspfv2Routers_State) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServReserved2_Choice) ProtoMessage() {} +func (*StateProtocolOspfv2Routers_State) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServReserved2_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1354] +func (x *StateProtocolOspfv2Routers_State) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1291] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115896,34 +123108,34 @@ func (x *PatternFlowRSVPPathSenderTspecIntServReserved2_Choice) ProtoReflect() p return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServReserved2_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServReserved2_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{916, 0} +// Deprecated: Use StateProtocolOspfv2Routers_State.ProtoReflect.Descriptor instead. +func (*StateProtocolOspfv2Routers_State) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{434, 0} } -type PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice struct { +type ControlAction_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice{} +func (x *ControlAction_Choice) Reset() { + *x = ControlAction_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1355] + mi := &file_otg_proto_msgTypes[1292] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice) String() string { +func (x *ControlAction_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice) ProtoMessage() {} +func (*ControlAction_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1355] +func (x *ControlAction_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1292] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115934,34 +123146,34 @@ func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice) ProtoR return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{918, 0} +// Deprecated: Use ControlAction_Choice.ProtoReflect.Descriptor instead. +func (*ControlAction_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{435, 0} } -type PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice struct { +type ActionResponse_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice{} +func (x *ActionResponse_Choice) Reset() { + *x = ActionResponse_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1356] + mi := &file_otg_proto_msgTypes[1293] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice) String() string { +func (x *ActionResponse_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice) ProtoMessage() {} +func (*ActionResponse_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1356] +func (x *ActionResponse_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1293] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115972,34 +123184,34 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{920, 0} +// Deprecated: Use ActionResponse_Choice.ProtoReflect.Descriptor instead. +func (*ActionResponse_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{437, 0} } -type PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice struct { +type ActionProtocol_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice{} +func (x *ActionProtocol_Choice) Reset() { + *x = ActionProtocol_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1357] + mi := &file_otg_proto_msgTypes[1294] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice) String() string { +func (x *ActionProtocol_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice) ProtoMessage() {} +func (*ActionProtocol_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1357] +func (x *ActionProtocol_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1294] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -116010,34 +123222,34 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice) ProtoRefl return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{922, 0} +// Deprecated: Use ActionProtocol_Choice.ProtoReflect.Descriptor instead. +func (*ActionProtocol_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{438, 0} } -type PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice struct { +type ActionResponseProtocol_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice{} +func (x *ActionResponseProtocol_Choice) Reset() { + *x = ActionResponseProtocol_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1358] + mi := &file_otg_proto_msgTypes[1295] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice) String() string { +func (x *ActionResponseProtocol_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice) ProtoMessage() {} +func (*ActionResponseProtocol_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1358] +func (x *ActionResponseProtocol_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1295] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -116048,34 +123260,34 @@ func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice) ProtoRe return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{924, 0} +// Deprecated: Use ActionResponseProtocol_Choice.ProtoReflect.Descriptor instead. +func (*ActionResponseProtocol_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{439, 0} } -type PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice struct { +type ActionProtocolIpv4_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice{} +func (x *ActionProtocolIpv4_Choice) Reset() { + *x = ActionProtocolIpv4_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1359] + mi := &file_otg_proto_msgTypes[1296] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice) String() string { +func (x *ActionProtocolIpv4_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice) ProtoMessage() {} +func (*ActionProtocolIpv4_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1359] +func (x *ActionProtocolIpv4_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1296] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -116086,34 +123298,34 @@ func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice) ProtoRe return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{926, 0} +// Deprecated: Use ActionProtocolIpv4_Choice.ProtoReflect.Descriptor instead. +func (*ActionProtocolIpv4_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{440, 0} } -type PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice struct { +type ActionResponseProtocolIpv4_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice) Reset() { - *x = PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice{} +func (x *ActionResponseProtocolIpv4_Choice) Reset() { + *x = ActionResponseProtocolIpv4_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1360] + mi := &file_otg_proto_msgTypes[1297] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice) String() string { +func (x *ActionResponseProtocolIpv4_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice) ProtoMessage() {} +func (*ActionResponseProtocolIpv4_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1360] +func (x *ActionResponseProtocolIpv4_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1297] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -116124,34 +123336,34 @@ func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice) ProtoRef return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{928, 0} +// Deprecated: Use ActionResponseProtocolIpv4_Choice.ProtoReflect.Descriptor instead. +func (*ActionResponseProtocolIpv4_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{441, 0} } -type PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice struct { +type ActionResponseProtocolIpv4PingResponse_Result struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice) Reset() { - *x = PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice{} +func (x *ActionResponseProtocolIpv4PingResponse_Result) Reset() { + *x = ActionResponseProtocolIpv4PingResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1361] + mi := &file_otg_proto_msgTypes[1298] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice) String() string { +func (x *ActionResponseProtocolIpv4PingResponse_Result) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice) ProtoMessage() {} +func (*ActionResponseProtocolIpv4PingResponse_Result) ProtoMessage() {} -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1361] +func (x *ActionResponseProtocolIpv4PingResponse_Result) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1298] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -116162,34 +123374,34 @@ func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice) Proto return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{930, 0} +// Deprecated: Use ActionResponseProtocolIpv4PingResponse_Result.ProtoReflect.Descriptor instead. +func (*ActionResponseProtocolIpv4PingResponse_Result) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{445, 0} } -type PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice struct { +type ActionProtocolIpv6_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice) Reset() { - *x = PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice{} +func (x *ActionProtocolIpv6_Choice) Reset() { + *x = ActionProtocolIpv6_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1362] + mi := &file_otg_proto_msgTypes[1299] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice) String() string { +func (x *ActionProtocolIpv6_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice) ProtoMessage() {} +func (*ActionProtocolIpv6_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1362] +func (x *ActionProtocolIpv6_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1299] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -116200,34 +123412,34 @@ func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice) Prot return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{932, 0} +// Deprecated: Use ActionProtocolIpv6_Choice.ProtoReflect.Descriptor instead. +func (*ActionProtocolIpv6_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{446, 0} } -type PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice struct { +type ActionResponseProtocolIpv6_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice) Reset() { - *x = PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice{} +func (x *ActionResponseProtocolIpv6_Choice) Reset() { + *x = ActionResponseProtocolIpv6_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1363] + mi := &file_otg_proto_msgTypes[1300] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice) String() string { +func (x *ActionResponseProtocolIpv6_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice) ProtoMessage() {} +func (*ActionResponseProtocolIpv6_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1363] +func (x *ActionResponseProtocolIpv6_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1300] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -116238,34 +123450,34 @@ func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice) ProtoReflect() pr return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{933, 0} +// Deprecated: Use ActionResponseProtocolIpv6_Choice.ProtoReflect.Descriptor instead. +func (*ActionResponseProtocolIpv6_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{447, 0} } -type PatternFlowRSVPPathRecordRouteType1LabelCType_Choice struct { +type ActionResponseProtocolIpv6PingResponse_Result struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathRecordRouteType1LabelCType_Choice) Reset() { - *x = PatternFlowRSVPPathRecordRouteType1LabelCType_Choice{} +func (x *ActionResponseProtocolIpv6PingResponse_Result) Reset() { + *x = ActionResponseProtocolIpv6PingResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1364] + mi := &file_otg_proto_msgTypes[1301] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathRecordRouteType1LabelCType_Choice) String() string { +func (x *ActionResponseProtocolIpv6PingResponse_Result) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathRecordRouteType1LabelCType_Choice) ProtoMessage() {} +func (*ActionResponseProtocolIpv6PingResponse_Result) ProtoMessage() {} -func (x *PatternFlowRSVPPathRecordRouteType1LabelCType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1364] +func (x *ActionResponseProtocolIpv6PingResponse_Result) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1301] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -116276,34 +123488,34 @@ func (x *PatternFlowRSVPPathRecordRouteType1LabelCType_Choice) ProtoReflect() pr return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathRecordRouteType1LabelCType_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathRecordRouteType1LabelCType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{934, 0} +// Deprecated: Use ActionResponseProtocolIpv6PingResponse_Result.ProtoReflect.Descriptor instead. +func (*ActionResponseProtocolIpv6PingResponse_Result) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{451, 0} } -type PatternFlowRSVPPathObjectsCustomType_Choice struct { +type ActionProtocolBgp_Choice struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *PatternFlowRSVPPathObjectsCustomType_Choice) Reset() { - *x = PatternFlowRSVPPathObjectsCustomType_Choice{} +func (x *ActionProtocolBgp_Choice) Reset() { + *x = ActionProtocolBgp_Choice{} if protoimpl.UnsafeEnabled { - mi := &file_otg_proto_msgTypes[1365] + mi := &file_otg_proto_msgTypes[1302] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PatternFlowRSVPPathObjectsCustomType_Choice) String() string { +func (x *ActionProtocolBgp_Choice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PatternFlowRSVPPathObjectsCustomType_Choice) ProtoMessage() {} +func (*ActionProtocolBgp_Choice) ProtoMessage() {} -func (x *PatternFlowRSVPPathObjectsCustomType_Choice) ProtoReflect() protoreflect.Message { - mi := &file_otg_proto_msgTypes[1365] +func (x *ActionProtocolBgp_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1302] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -116314,5044 +123526,16923 @@ func (x *PatternFlowRSVPPathObjectsCustomType_Choice) ProtoReflect() protoreflec return mi.MessageOf(x) } -// Deprecated: Use PatternFlowRSVPPathObjectsCustomType_Choice.ProtoReflect.Descriptor instead. -func (*PatternFlowRSVPPathObjectsCustomType_Choice) Descriptor() ([]byte, []int) { - return file_otg_proto_rawDescGZIP(), []int{936, 0} +// Deprecated: Use ActionProtocolBgp_Choice.ProtoReflect.Descriptor instead. +func (*ActionProtocolBgp_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{452, 0} } -var File_otg_proto protoreflect.FileDescriptor +type ActionProtocolBgpNotification_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} -var file_otg_proto_rawDesc = []byte{ - 0x0a, 0x09, 0x6f, 0x74, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x6f, 0x74, 0x67, - 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xcf, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x6f, - 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x6c, - 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x4c, 0x61, 0x67, 0x52, 0x04, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x31, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x52, 0x06, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x12, 0x28, - 0x0a, 0x08, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x52, 0x08, - 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x07, 0x64, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, - 0x1f, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x77, 0x73, - 0x12, 0x22, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x6c, 0x64, 0x70, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x09, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x52, 0x04, 0x6c, 0x6c, 0x64, - 0x70, 0x22, 0x85, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x6f, 0x72, - 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x56, 0x0a, 0x04, 0x50, 0x6f, 0x72, - 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x5b, 0x0a, 0x0b, 0x50, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x34, 0x0a, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, - 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, - 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa9, - 0x01, 0x0a, 0x03, 0x4c, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, 0x50, - 0x6f, 0x72, 0x74, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, - 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x6d, - 0x69, 0x6e, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, - 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x07, 0x4c, - 0x61, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x70, 0x6f, 0x72, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x04, 0x6c, 0x61, 0x63, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, - 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x61, 0x63, 0x70, 0x52, 0x04, 0x6c, 0x61, 0x63, 0x70, 0x12, 0x33, - 0x0a, 0x08, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x42, 0x61, 0x73, 0x65, 0x52, 0x08, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0xe6, 0x01, 0x0a, 0x0b, 0x4c, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x12, 0x39, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x04, - 0x6c, 0x61, 0x63, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x4c, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, - 0x52, 0x04, 0x6c, 0x61, 0x63, 0x70, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x1a, 0x37, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0x2d, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x61, 0x63, - 0x70, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x10, 0x02, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x3a, 0x0a, 0x11, 0x4c, 0x61, - 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x12, - 0x1a, 0x0a, 0x06, 0x6c, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x05, 0x6c, 0x61, 0x67, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6c, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x22, 0xd5, 0x01, 0x0a, 0x0f, 0x4c, 0x61, 0x67, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, 0x12, 0x2b, 0x0a, 0x0f, 0x61, 0x63, - 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x15, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x13, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, - 0x12, 0x20, 0x0a, 0x09, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x08, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x88, - 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x22, 0xf1, - 0x03, 0x0a, 0x0b, 0x4c, 0x61, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x61, 0x63, 0x70, 0x12, 0x2f, - 0x0a, 0x11, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, - 0x33, 0x0a, 0x13, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x11, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x61, 0x63, 0x70, 0x2e, 0x41, - 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x02, 0x52, 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, - 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x1d, 0x6c, 0x61, 0x63, 0x70, 0x64, 0x75, 0x5f, - 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x1a, - 0x6c, 0x61, 0x63, 0x70, 0x64, 0x75, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x54, 0x69, - 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, - 0x0e, 0x6c, 0x61, 0x63, 0x70, 0x64, 0x75, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x0d, 0x6c, 0x61, 0x63, 0x70, 0x64, 0x75, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x1a, 0x41, 0x0a, 0x0d, 0x41, 0x63, 0x74, - 0x6f, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x22, 0x30, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x10, 0x01, - 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x02, 0x42, 0x14, 0x0a, 0x12, - 0x5f, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x61, - 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x42, 0x20, 0x0a, - 0x1e, 0x5f, 0x6c, 0x61, 0x63, 0x70, 0x64, 0x75, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, - 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, - 0x11, 0x0a, 0x0f, 0x5f, 0x6c, 0x61, 0x63, 0x70, 0x64, 0x75, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x42, 0x61, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x61, 0x63, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x88, 0x01, 0x01, - 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x03, 0x6d, 0x74, 0x75, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x6c, 0x61, 0x6e, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x56, 0x6c, 0x61, 0x6e, 0x52, 0x05, 0x76, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x63, 0x42, - 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x74, 0x75, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0xc0, 0x02, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x12, 0x37, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x45, 0x74, - 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x0e, - 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x49, 0x70, 0x76, 0x34, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x36, 0x52, 0x0d, 0x69, - 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x15, 0x0a, 0x03, - 0x6d, 0x61, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x63, - 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x03, 0x6d, 0x74, 0x75, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x6c, - 0x61, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x56, 0x6c, 0x61, 0x6e, 0x52, 0x05, 0x76, 0x6c, 0x61, 0x6e, - 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, - 0x61, 0x63, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x74, 0x75, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0xc1, 0x02, 0x0a, 0x12, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x01, 0x52, 0x08, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1e, - 0x0a, 0x08, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x02, 0x52, 0x07, 0x6c, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x22, - 0x0a, 0x0a, 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x03, 0x52, 0x09, 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x88, - 0x01, 0x01, 0x1a, 0x4e, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x44, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0c, 0x0a, - 0x0a, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, - 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x76, 0x78, 0x6c, - 0x61, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8d, 0x02, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x56, 0x6c, 0x61, 0x6e, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x70, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x56, 0x6c, 0x61, 0x6e, 0x2e, 0x54, 0x70, 0x69, 0x64, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x04, 0x74, 0x70, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x08, - 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x02, 0x69, 0x64, 0x88, 0x01, 0x01, - 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x56, 0x0a, 0x04, 0x54, 0x70, 0x69, - 0x64, 0x22, 0x4e, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x78, 0x38, - 0x31, 0x30, 0x30, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x78, 0x38, 0x38, 0x41, 0x38, 0x10, 0x02, - 0x12, 0x09, 0x0a, 0x05, 0x78, 0x39, 0x31, 0x30, 0x30, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x78, - 0x39, 0x32, 0x30, 0x30, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x78, 0x39, 0x33, 0x30, 0x30, 0x10, - 0x05, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x70, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, - 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xe8, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x49, 0x70, 0x76, 0x34, 0x12, 0x1d, 0x0a, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x0b, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x5f, 0x6d, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x34, 0x47, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x4d, 0x41, 0x43, 0x52, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x61, - 0x63, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, - 0x34, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x1e, 0x0a, 0x08, 0x65, 0x74, 0x68, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x65, - 0x74, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, - 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x74, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0a, - 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0xe4, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, - 0x76, 0x34, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x41, 0x43, 0x12, 0x42, 0x0a, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x34, 0x47, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x4d, 0x41, 0x43, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, - 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe8, 0x01, 0x0a, 0x0a, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x36, 0x12, 0x1d, 0x0a, 0x07, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x67, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x0b, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x5f, 0x6d, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x36, 0x47, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x41, 0x43, 0x52, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x4d, 0x61, 0x63, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, - 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x67, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x49, 0x70, 0x76, 0x36, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x1e, 0x0a, 0x08, - 0x65, 0x74, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x07, 0x65, 0x74, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x74, 0x68, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xe4, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x49, 0x70, 0x76, 0x36, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x41, 0x43, 0x12, - 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x36, - 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x41, 0x43, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, - 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, - 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x97, 0x07, - 0x0a, 0x06, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x6f, - 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x79, - 0x65, 0x72, 0x31, 0x2e, 0x53, 0x70, 0x65, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x05, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x01, 0x52, 0x05, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, - 0x0b, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x63, 0x75, 0x6f, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x02, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x63, 0x75, 0x6f, 0x75, - 0x73, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x03, 0x52, 0x03, 0x6d, 0x74, 0x75, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x69, - 0x65, 0x65, 0x65, 0x5f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x11, 0x69, 0x65, 0x65, 0x65, - 0x4d, 0x65, 0x64, 0x69, 0x61, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x88, 0x01, 0x01, - 0x12, 0x2a, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, - 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x6f, - 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x10, - 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x79, - 0x65, 0x72, 0x31, 0x41, 0x75, 0x74, 0x6f, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0c, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x52, 0x0b, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x1a, 0xa9, 0x02, 0x0a, 0x05, 0x53, 0x70, 0x65, 0x65, - 0x64, 0x22, 0x9f, 0x02, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x73, - 0x70, 0x65, 0x65, 0x64, 0x5f, 0x31, 0x30, 0x5f, 0x66, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x10, - 0x01, 0x12, 0x14, 0x0a, 0x10, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x31, 0x30, 0x5f, 0x68, 0x64, - 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x73, 0x70, 0x65, 0x65, 0x64, - 0x5f, 0x31, 0x30, 0x30, 0x5f, 0x66, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x10, 0x03, 0x12, 0x15, - 0x0a, 0x11, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x31, 0x30, 0x30, 0x5f, 0x68, 0x64, 0x5f, 0x6d, - 0x62, 0x70, 0x73, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x31, - 0x5f, 0x67, 0x62, 0x70, 0x73, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x70, 0x65, 0x65, 0x64, - 0x5f, 0x31, 0x30, 0x5f, 0x67, 0x62, 0x70, 0x73, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x70, - 0x65, 0x65, 0x64, 0x5f, 0x32, 0x35, 0x5f, 0x67, 0x62, 0x70, 0x73, 0x10, 0x07, 0x12, 0x11, 0x0a, - 0x0d, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x34, 0x30, 0x5f, 0x67, 0x62, 0x70, 0x73, 0x10, 0x08, - 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x35, 0x30, 0x5f, 0x67, 0x62, 0x70, - 0x73, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x31, 0x30, 0x30, - 0x5f, 0x67, 0x62, 0x70, 0x73, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x73, 0x70, 0x65, 0x65, 0x64, - 0x5f, 0x32, 0x30, 0x30, 0x5f, 0x67, 0x62, 0x70, 0x73, 0x10, 0x0b, 0x12, 0x12, 0x0a, 0x0e, 0x73, - 0x70, 0x65, 0x65, 0x64, 0x5f, 0x34, 0x30, 0x30, 0x5f, 0x67, 0x62, 0x70, 0x73, 0x10, 0x0c, 0x12, - 0x12, 0x0a, 0x0e, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x38, 0x30, 0x30, 0x5f, 0x67, 0x62, 0x70, - 0x73, 0x10, 0x0d, 0x1a, 0x42, 0x0a, 0x05, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x22, 0x39, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x6f, 0x70, 0x70, 0x65, 0x72, 0x10, - 0x01, 0x12, 0x09, 0x0a, 0x05, 0x66, 0x69, 0x62, 0x65, 0x72, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, - 0x73, 0x67, 0x6d, 0x69, 0x69, 0x10, 0x03, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x70, 0x65, 0x65, - 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, - 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x63, 0x75, 0x6f, 0x75, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, - 0x6d, 0x74, 0x75, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x65, 0x65, 0x65, 0x5f, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x5f, - 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x89, 0x04, 0x0a, 0x15, 0x4c, 0x61, 0x79, 0x65, - 0x72, 0x31, 0x41, 0x75, 0x74, 0x6f, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x31, - 0x30, 0x30, 0x30, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, - 0x52, 0x11, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x31, 0x30, 0x30, 0x30, 0x4d, - 0x62, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, - 0x69, 0x73, 0x65, 0x5f, 0x31, 0x30, 0x30, 0x5f, 0x66, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x12, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, - 0x73, 0x65, 0x31, 0x30, 0x30, 0x46, 0x64, 0x4d, 0x62, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, - 0x0a, 0x15, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x31, 0x30, 0x30, 0x5f, - 0x68, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, - 0x12, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x31, 0x30, 0x30, 0x48, 0x64, 0x4d, - 0x62, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x14, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, - 0x69, 0x73, 0x65, 0x5f, 0x31, 0x30, 0x5f, 0x66, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x11, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, - 0x65, 0x31, 0x30, 0x46, 0x64, 0x4d, 0x62, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x14, - 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x31, 0x30, 0x5f, 0x68, 0x64, 0x5f, - 0x6d, 0x62, 0x70, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x11, 0x61, 0x64, - 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x31, 0x30, 0x48, 0x64, 0x4d, 0x62, 0x70, 0x73, 0x88, - 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6e, - 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x0c, 0x6c, 0x69, 0x6e, - 0x6b, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, - 0x72, 0x73, 0x5f, 0x66, 0x65, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x06, 0x52, 0x05, - 0x72, 0x73, 0x46, 0x65, 0x63, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x61, 0x64, 0x76, - 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x31, 0x30, 0x30, 0x30, 0x5f, 0x6d, 0x62, 0x70, 0x73, - 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x31, - 0x30, 0x30, 0x5f, 0x66, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x61, - 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x31, 0x30, 0x30, 0x5f, 0x68, 0x64, 0x5f, - 0x6d, 0x62, 0x70, 0x73, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, - 0x73, 0x65, 0x5f, 0x31, 0x30, 0x5f, 0x66, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x42, 0x17, 0x0a, - 0x15, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x31, 0x30, 0x5f, 0x68, - 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, - 0x74, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x73, 0x5f, - 0x66, 0x65, 0x63, 0x22, 0xdd, 0x02, 0x0a, 0x11, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x46, 0x6c, - 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x2e, 0x0a, 0x10, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x0d, 0x69, 0x65, - 0x65, 0x65, 0x5f, 0x38, 0x30, 0x32, 0x5f, 0x31, 0x71, 0x62, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x49, 0x65, - 0x65, 0x65, 0x38, 0x30, 0x32, 0x31, 0x71, 0x62, 0x62, 0x52, 0x0b, 0x69, 0x65, 0x65, 0x65, 0x38, - 0x30, 0x32, 0x31, 0x71, 0x62, 0x62, 0x12, 0x34, 0x0a, 0x0b, 0x69, 0x65, 0x65, 0x65, 0x5f, 0x38, - 0x30, 0x32, 0x5f, 0x33, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x49, 0x65, 0x65, 0x65, 0x38, 0x30, 0x32, 0x33, - 0x78, 0x52, 0x09, 0x69, 0x65, 0x65, 0x65, 0x38, 0x30, 0x32, 0x33, 0x78, 0x1a, 0x45, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x3b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x11, 0x0a, 0x0d, 0x69, 0x65, 0x65, 0x65, 0x5f, 0x38, 0x30, 0x32, 0x5f, 0x31, 0x71, 0x62, 0x62, - 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x69, 0x65, 0x65, 0x65, 0x5f, 0x38, 0x30, 0x32, 0x5f, 0x33, - 0x78, 0x10, 0x02, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x49, 0x65, 0x65, - 0x65, 0x38, 0x30, 0x32, 0x33, 0x78, 0x22, 0xeb, 0x03, 0x0a, 0x11, 0x4c, 0x61, 0x79, 0x65, 0x72, - 0x31, 0x49, 0x65, 0x65, 0x65, 0x38, 0x30, 0x32, 0x31, 0x71, 0x62, 0x62, 0x12, 0x20, 0x0a, 0x09, - 0x70, 0x66, 0x63, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x08, 0x70, 0x66, 0x63, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x88, 0x01, 0x01, 0x12, 0x23, - 0x0a, 0x0b, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x30, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x09, 0x70, 0x66, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x30, - 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x5f, 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x09, 0x70, 0x66, 0x63, 0x43, - 0x6c, 0x61, 0x73, 0x73, 0x31, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x70, 0x66, 0x63, 0x5f, - 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, - 0x09, 0x70, 0x66, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, - 0x0b, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x33, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x04, 0x52, 0x09, 0x70, 0x66, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x33, 0x88, - 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, - 0x34, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, 0x52, 0x09, 0x70, 0x66, 0x63, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x34, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x70, 0x66, 0x63, 0x5f, 0x63, - 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x35, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x06, 0x52, 0x09, - 0x70, 0x66, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x35, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, - 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x36, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x07, 0x52, 0x09, 0x70, 0x66, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, 0x88, 0x01, - 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x37, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x08, 0x52, 0x09, 0x70, 0x66, 0x63, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x37, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x66, 0x63, 0x5f, 0x64, - 0x65, 0x6c, 0x61, 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x5f, 0x30, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x5f, 0x31, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x5f, 0x32, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x5f, 0x33, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x5f, 0x34, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x5f, 0x35, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x5f, 0x36, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x5f, 0x37, 0x22, 0xda, 0x02, 0x0a, 0x07, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, - 0x2c, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, - 0x09, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x48, 0x00, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, - 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, - 0x74, 0x75, 0x72, 0x65, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x02, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x37, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x22, 0x2d, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x70, 0x63, 0x61, - 0x70, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x70, 0x63, 0x61, 0x70, 0x6e, 0x67, 0x10, 0x02, 0x42, - 0x0c, 0x0a, 0x0a, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0x0e, 0x0a, - 0x0c, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x82, 0x03, 0x0a, 0x0d, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, - 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x2a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x30, 0x0a, 0x08, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x52, 0x08, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x12, 0x24, - 0x0a, 0x04, 0x76, 0x6c, 0x61, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x56, 0x6c, 0x61, 0x6e, 0x52, 0x04, - 0x76, 0x6c, 0x61, 0x6e, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, - 0x49, 0x70, 0x76, 0x34, 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x70, - 0x76, 0x36, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, - 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x49, 0x70, 0x76, 0x36, 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, - 0x1a, 0x59, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4f, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x01, 0x12, - 0x0c, 0x0a, 0x08, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x10, 0x02, 0x12, 0x08, 0x0a, - 0x04, 0x76, 0x6c, 0x61, 0x6e, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x10, - 0x04, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x0d, 0x43, 0x61, 0x70, 0x74, 0x75, - 0x72, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x62, 0x69, 0x74, 0x5f, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x09, 0x62, 0x69, 0x74, - 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x03, 0x52, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, - 0x06, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6e, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x22, 0x7d, 0x0a, 0x0c, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6d, - 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x06, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6e, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x23, 0x0a, 0x03, 0x64, 0x73, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, - 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x03, 0x64, 0x73, 0x74, 0x12, - 0x30, 0x0a, 0x0a, 0x65, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, - 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x09, 0x65, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x70, 0x66, 0x63, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, - 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x08, 0x70, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, - 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x0b, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x56, 0x6c, 0x61, - 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, - 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x23, 0x0a, 0x03, 0x63, 0x66, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x52, 0x03, 0x63, 0x66, 0x69, 0x12, 0x21, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0xd9, 0x05, 0x0a, 0x0b, 0x43, 0x61, 0x70, 0x74, - 0x75, 0x72, 0x65, 0x49, 0x70, 0x76, 0x34, 0x12, 0x2b, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, - 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0c, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x2d, 0x0a, 0x08, - 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x0c, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x12, 0x39, 0x0a, 0x0e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0e, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x0d, 0x64, - 0x6f, 0x6e, 0x74, 0x5f, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0c, 0x64, 0x6f, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0e, 0x6d, 0x6f, 0x72, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0d, - 0x6d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, - 0x0f, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, - 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0e, 0x66, 0x72, 0x61, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x33, 0x0a, 0x0c, 0x74, 0x69, 0x6d, - 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x12, 0x2d, - 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x3a, 0x0a, - 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, - 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x23, 0x0a, 0x03, 0x73, 0x72, 0x63, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, - 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x23, - 0x0a, 0x03, 0x64, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x03, - 0x64, 0x73, 0x74, 0x22, 0x8c, 0x03, 0x0a, 0x0b, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x49, - 0x70, 0x76, 0x36, 0x12, 0x2b, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, - 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x36, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, - 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x66, - 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x0a, 0x66, 0x6c, 0x6f, 0x77, - 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, - 0x09, 0x66, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x38, 0x0a, 0x0e, 0x70, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x12, 0x32, 0x0a, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0a, 0x6e, 0x65, - 0x78, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x09, 0x68, 0x6f, 0x70, 0x5f, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x08, - 0x68, 0x6f, 0x70, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x23, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, - 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x23, 0x0a, - 0x03, 0x64, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x03, 0x64, - 0x73, 0x74, 0x22, 0xfd, 0x02, 0x0a, 0x06, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x31, 0x0a, - 0x09, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x52, 0x09, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x73, - 0x12, 0x3e, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, - 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, - 0x6b, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x73, - 0x12, 0x3e, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, - 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x36, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, - 0x6b, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x73, - 0x12, 0x29, 0x0a, 0x04, 0x69, 0x73, 0x69, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x73, 0x69, 0x73, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x04, 0x69, 0x73, 0x69, 0x73, 0x12, 0x26, 0x0a, 0x03, 0x62, - 0x67, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x03, - 0x62, 0x67, 0x70, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x56, - 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x05, 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x04, 0x72, 0x73, 0x76, 0x70, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, - 0x73, 0x76, 0x70, 0x52, 0x04, 0x72, 0x73, 0x76, 0x70, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0x4f, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, - 0x0c, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, 0x88, 0x01, 0x01, - 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, - 0x61, 0x6c, 0x6c, 0x22, 0xc9, 0x03, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x73, - 0x69, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x73, 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, - 0x64, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, - 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x62, 0x61, 0x73, 0x69, - 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, - 0x69, 0x73, 0x42, 0x61, 0x73, 0x69, 0x63, 0x52, 0x05, 0x62, 0x61, 0x73, 0x69, 0x63, 0x12, 0x2d, - 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x41, 0x64, 0x76, 0x61, 0x6e, - 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x38, 0x0a, - 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x41, 0x75, 0x74, - 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x32, 0x0a, 0x09, 0x76, 0x34, 0x5f, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x49, 0x73, 0x69, 0x73, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x08, 0x76, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x09, 0x76, - 0x36, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x08, 0x76, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0x4e, 0x0a, 0x17, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x73, 0x69, 0x73, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x15, 0x0a, 0x03, 0x69, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x03, 0x69, 0x69, 0x64, 0x88, 0x01, - 0x01, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, - 0x52, 0x05, 0x69, 0x74, 0x69, 0x64, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x69, 0x69, 0x64, 0x22, - 0xb4, 0x07, 0x0a, 0x0d, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, - 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x65, 0x74, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x65, 0x74, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x88, 0x01, 0x01, 0x12, 0x4b, - 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, 0x0b, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x0a, 0x6c, - 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, - 0x61, 0x63, 0x65, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x03, 0x52, 0x09, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x38, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, - 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x52, 0x0a, 0x6c, 0x31, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x38, 0x0a, 0x0b, - 0x6c, 0x32, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x66, 0x61, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0a, 0x6c, 0x32, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x39, 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, - 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x4d, 0x54, 0x52, - 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x49, 0x64, - 0x73, 0x12, 0x41, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x67, - 0x69, 0x6e, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x45, - 0x52, 0x12, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x65, - 0x72, 0x69, 0x6e, 0x67, 0x12, 0x48, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, - 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, - 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x66, 0x61, 0x63, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, - 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x49, 0x0a, 0x0f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, - 0x61, 0x63, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0e, 0x6c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x72, 0x6c, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x72, 0x6c, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x04, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x49, 0x0a, 0x0b, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, - 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x10, 0x02, 0x1a, 0x4d, 0x0a, 0x09, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x54, - 0x79, 0x70, 0x65, 0x22, 0x40, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, - 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x6c, 0x65, 0x76, - 0x65, 0x6c, 0x5f, 0x32, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, - 0x31, 0x5f, 0x32, 0x10, 0x03, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x74, 0x68, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x0f, 0x0a, - 0x0d, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0d, - 0x0a, 0x0b, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x12, 0x49, 0x73, 0x69, 0x73, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1f, 0x0a, - 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x2a, - 0x0a, 0x0e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0d, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x64, 0x65, - 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x0c, 0x64, 0x65, 0x61, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x64, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x62, 0x0a, 0x06, 0x49, 0x73, 0x69, 0x73, 0x4d, 0x54, - 0x12, 0x18, 0x0a, 0x05, 0x6d, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x04, 0x6d, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6c, 0x69, - 0x6e, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x0a, 0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x88, 0x01, 0x01, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6d, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6c, - 0x69, 0x6e, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x22, 0xff, 0x02, 0x0a, 0x0b, 0x4c, - 0x69, 0x6e, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x45, 0x12, 0x36, 0x0a, 0x14, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x13, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x76, - 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x6d, 0x61, - 0x78, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x12, 0x51, 0x0a, 0x13, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x62, 0x61, - 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x70, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x73, - 0x52, 0x12, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, - 0x64, 0x74, 0x68, 0x73, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x0f, 0x0a, - 0x0d, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x0f, - 0x0a, 0x0d, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x74, 0x68, 0x42, - 0x1b, 0x0a, 0x19, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x22, 0x95, 0x02, 0x0a, - 0x1b, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x73, 0x12, 0x15, 0x0a, 0x03, - 0x70, 0x62, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x03, 0x70, 0x62, 0x30, - 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x70, 0x62, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x03, 0x70, 0x62, 0x31, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x70, 0x62, - 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x03, 0x70, 0x62, 0x32, 0x88, 0x01, - 0x01, 0x12, 0x15, 0x0a, 0x03, 0x70, 0x62, 0x33, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, - 0x52, 0x03, 0x70, 0x62, 0x33, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x70, 0x62, 0x34, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x03, 0x70, 0x62, 0x34, 0x88, 0x01, 0x01, 0x12, - 0x15, 0x0a, 0x03, 0x70, 0x62, 0x35, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, 0x52, 0x03, - 0x70, 0x62, 0x35, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x70, 0x62, 0x36, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x06, 0x52, 0x03, 0x70, 0x62, 0x36, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, - 0x03, 0x70, 0x62, 0x37, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x07, 0x52, 0x03, 0x70, 0x62, - 0x37, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x62, 0x30, 0x42, 0x06, 0x0a, 0x04, - 0x5f, 0x70, 0x62, 0x31, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x62, 0x32, 0x42, 0x06, 0x0a, 0x04, - 0x5f, 0x70, 0x62, 0x33, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x62, 0x34, 0x42, 0x06, 0x0a, 0x04, - 0x5f, 0x70, 0x62, 0x35, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x62, 0x36, 0x42, 0x06, 0x0a, 0x04, - 0x5f, 0x70, 0x62, 0x37, 0x22, 0x86, 0x02, 0x0a, 0x1b, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, - 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, - 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, - 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x54, - 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x64, 0x35, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x64, 0x35, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, - 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x02, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88, 0x01, 0x01, 0x1a, 0x3a, - 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2e, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x6d, 0x64, 0x35, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x10, 0x02, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, - 0x75, 0x74, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x64, 0x35, - 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xbc, 0x03, - 0x0a, 0x15, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x41, - 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x5f, - 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x5f, 0x6d, 0x74, 0x75, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x48, 0x00, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x41, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x4d, 0x74, - 0x75, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x6a, - 0x75, 0x73, 0x74, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, - 0x52, 0x0e, 0x61, 0x75, 0x74, 0x6f, 0x41, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x41, 0x72, 0x65, 0x61, - 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, 0x1f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x6a, 0x75, - 0x73, 0x74, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x1c, - 0x61, 0x75, 0x74, 0x6f, 0x41, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, - 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x88, 0x01, 0x01, 0x12, - 0x37, 0x0a, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x33, 0x77, 0x61, 0x79, 0x5f, 0x68, - 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, - 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x33, 0x77, 0x61, 0x79, 0x48, 0x61, 0x6e, 0x64, - 0x73, 0x68, 0x61, 0x6b, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x19, 0x70, 0x32, 0x70, 0x5f, - 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, - 0x74, 0x5f, 0x6d, 0x61, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x15, 0x70, - 0x32, 0x70, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x54, 0x6f, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, - 0x74, 0x4d, 0x61, 0x63, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x61, 0x75, 0x74, 0x6f, - 0x5f, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x5f, 0x6d, 0x74, 0x75, 0x42, 0x13, 0x0a, 0x11, 0x5f, - 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x5f, 0x61, 0x72, 0x65, 0x61, - 0x42, 0x22, 0x0a, 0x20, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, - 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x33, 0x77, 0x61, 0x79, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x42, 0x1c, - 0x0a, 0x1a, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x74, 0x6f, - 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x63, 0x22, 0xde, 0x03, 0x0a, - 0x1b, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4c, 0x69, - 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, - 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x72, 0x61, 0x54, 0x72, 0x61, 0x66, - 0x66, 0x69, 0x63, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x75, 0x6e, 0x70, 0x72, 0x6f, 0x74, - 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x0b, 0x75, - 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, - 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x10, 0x64, 0x65, - 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x31, 0x5f, 0x74, 0x6f, 0x5f, 0x31, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x0d, 0x64, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x31, 0x54, 0x6f, 0x31, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x12, 0x64, 0x65, 0x64, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x31, 0x5f, 0x70, 0x6c, 0x75, 0x73, 0x5f, 0x31, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0f, 0x64, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x31, 0x50, 0x6c, 0x75, 0x73, 0x31, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x65, 0x6e, - 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x08, - 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x72, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x34, 0x30, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, - 0x48, 0x06, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x34, 0x30, 0x88, 0x01, - 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x38, 0x30, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x38, 0x30, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x78, 0x74, 0x72, - 0x61, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x75, 0x6e, - 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x68, - 0x61, 0x72, 0x65, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x31, 0x5f, 0x74, 0x6f, 0x5f, 0x31, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x64, 0x65, - 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x31, 0x5f, 0x70, 0x6c, 0x75, 0x73, 0x5f, 0x31, - 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x42, 0x0e, 0x0a, - 0x0c, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x34, 0x30, 0x42, 0x0e, 0x0a, - 0x0c, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x38, 0x30, 0x22, 0x93, 0x02, - 0x0a, 0x09, 0x49, 0x73, 0x69, 0x73, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x2e, 0x0a, 0x11, 0x69, - 0x70, 0x76, 0x34, 0x5f, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x69, 0x70, 0x76, 0x34, 0x54, 0x65, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x68, - 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x77, 0x69, 0x64, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x10, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x57, 0x69, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x88, 0x01, 0x01, 0x12, - 0x31, 0x0a, 0x12, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x10, 0x6c, - 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x4c, 0x73, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x88, - 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x74, 0x65, 0x5f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x68, 0x6f, 0x73, - 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x77, 0x69, 0x64, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x15, 0x0a, 0x13, - 0x5f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x22, 0xb2, 0x05, 0x0a, 0x0c, 0x49, 0x73, 0x69, 0x73, 0x41, 0x64, 0x76, 0x61, - 0x6e, 0x63, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x14, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x5f, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x00, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x65, 0x6c, 0x6c, - 0x6f, 0x50, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6d, - 0x61, 0x78, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x41, 0x72, - 0x65, 0x61, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x25, - 0x0a, 0x0e, 0x61, 0x72, 0x65, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x72, 0x65, 0x61, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x10, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x0e, 0x6c, 0x73, 0x70, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x6c, 0x73, 0x70, 0x5f, 0x6c, 0x69, 0x66, 0x65, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x0b, 0x6c, 0x73, - 0x70, 0x4c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, - 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x0c, 0x70, 0x73, 0x6e, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, 0x52, - 0x0c, 0x63, 0x73, 0x6e, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, - 0x12, 0x25, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x06, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4c, 0x73, 0x70, - 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x1d, 0x6c, 0x73, 0x70, 0x5f, 0x6d, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x07, - 0x52, 0x19, 0x6c, 0x73, 0x70, 0x4d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x69, 0x6e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x33, - 0x0a, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, - 0x64, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x48, 0x08, 0x52, 0x11, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x42, 0x69, 0x74, - 0x88, 0x01, 0x01, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x5f, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x15, 0x0a, 0x13, - 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x65, 0x73, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x66, 0x72, - 0x65, 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x73, 0x70, - 0x5f, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x73, - 0x6e, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x10, 0x0a, 0x0e, 0x5f, - 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0f, 0x0a, - 0x0d, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x20, - 0x0a, 0x1e, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x6d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x69, - 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x61, - 0x63, 0x68, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x74, 0x22, 0xd6, 0x01, 0x0a, 0x12, 0x49, 0x73, 0x69, - 0x73, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x31, 0x0a, 0x12, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x5f, 0x6d, 0x64, 0x35, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x10, 0x69, - 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x64, 0x35, 0x88, - 0x01, 0x01, 0x12, 0x38, 0x0a, 0x09, 0x61, 0x72, 0x65, 0x61, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, - 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, - 0x73, 0x65, 0x52, 0x08, 0x61, 0x72, 0x65, 0x61, 0x41, 0x75, 0x74, 0x68, 0x12, 0x3c, 0x0a, 0x0b, - 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, - 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x0a, - 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x69, - 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x64, - 0x35, 0x22, 0xfc, 0x01, 0x0a, 0x16, 0x49, 0x73, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x41, 0x75, 0x74, - 0x68, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x08, 0x61, 0x75, - 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x64, 0x35, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x64, 0x35, 0x88, 0x01, 0x01, - 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x02, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88, 0x01, - 0x01, 0x1a, 0x3a, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2e, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x6d, 0x64, 0x35, 0x10, 0x01, 0x12, - 0x0c, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x10, 0x02, 0x42, 0x0c, 0x0a, - 0x0a, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, - 0x6d, 0x64, 0x35, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x22, 0xbd, 0x05, 0x0a, 0x10, 0x49, 0x73, 0x69, 0x73, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, - 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x09, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0b, 0x6c, 0x69, 0x6e, 0x6b, - 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x0a, 0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x88, 0x01, 0x01, 0x12, 0x4b, - 0x0a, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x56, 0x34, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x0a, 0x6f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x63, 0x0a, 0x13, 0x72, - 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, - 0x73, 0x69, 0x73, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x2e, - 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, 0x12, 0x72, 0x65, 0x64, 0x69, 0x73, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x11, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x41, 0x74, 0x74, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1a, - 0x0a, 0x06, 0x78, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, - 0x52, 0x05, 0x78, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x72, 0x5f, - 0x66, 0x6c, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x06, 0x52, 0x05, 0x72, 0x46, - 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x67, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x05, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x88, - 0x01, 0x01, 0x1a, 0x41, 0x0a, 0x0a, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x22, 0x33, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x10, 0x02, 0x1a, 0x3f, 0x0a, 0x12, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x29, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, - 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x73, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x78, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, - 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x67, - 0x22, 0xaa, 0x01, 0x0a, 0x0e, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, - 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x22, 0xaa, 0x01, - 0x0a, 0x0e, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, - 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, - 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x22, 0xab, 0x01, 0x0a, 0x0f, 0x4d, - 0x41, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x42, 0x0a, - 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, - 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x22, 0xbd, 0x05, 0x0a, 0x10, 0x49, 0x73, 0x69, - 0x73, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x31, 0x0a, - 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x12, 0x24, 0x0a, 0x0b, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0a, 0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x88, 0x01, 0x01, 0x12, 0x4b, 0x0a, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x01, 0x52, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x63, 0x0a, 0x13, 0x72, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x56, 0x36, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x02, 0x52, 0x12, 0x72, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x33, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x61, 0x74, 0x74, 0x72, - 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, - 0x52, 0x11, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x41, 0x74, 0x74, 0x72, 0x45, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x78, 0x5f, 0x66, 0x6c, 0x61, 0x67, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x05, 0x78, 0x46, 0x6c, 0x61, 0x67, 0x88, - 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x72, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x06, 0x52, 0x05, 0x72, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, 0x12, 0x1a, - 0x0a, 0x06, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, - 0x52, 0x05, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, 0x1a, 0x41, 0x0a, 0x0a, 0x4f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x33, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, 0x01, 0x12, - 0x0c, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, 0x02, 0x1a, 0x3f, 0x0a, - 0x12, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, - 0x75, 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x42, 0x0e, - 0x0a, 0x0c, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x0e, - 0x0a, 0x0c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x16, - 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x16, 0x0a, 0x14, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x5f, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x78, 0x5f, 0x66, 0x6c, - 0x61, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x22, 0xbd, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x09, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3c, - 0x0a, 0x0f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x56, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x0e, 0x69, 0x70, - 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0f, - 0x69, 0x70, 0x76, 0x36, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, - 0x36, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x0e, 0x69, 0x70, 0x76, 0x36, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0x99, 0x02, 0x0a, 0x1b, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4c, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x75, 0x62, 0x63, - 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x62, 0x63, - 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x9f, 0x01, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x63, 0x6f, - 0x64, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x2e, 0x0a, 0x2a, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x73, - 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, - 0x31, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x31, 0x10, 0x01, 0x12, 0x25, 0x0a, 0x21, - 0x62, 0x61, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x31, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, - 0x32, 0x10, 0x02, 0x12, 0x23, 0x0a, 0x1f, 0x62, 0x61, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x31, 0x5f, 0x73, 0x75, - 0x62, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x10, 0x03, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x75, 0x62, - 0x63, 0x6f, 0x64, 0x65, 0x22, 0xb3, 0x03, 0x0a, 0x19, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, - 0x67, 0x70, 0x4f, 0x70, 0x65, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x42, 0x67, 0x70, 0x4f, 0x70, 0x65, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x1a, 0xbd, - 0x02, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x22, 0xb1, 0x02, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x2d, 0x0a, 0x29, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, - 0x74, 0x65, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, - 0x31, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x65, 0x65, - 0x72, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, - 0x64, 0x65, 0x32, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x62, - 0x67, 0x70, 0x5f, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x5f, 0x73, 0x75, 0x62, 0x63, - 0x6f, 0x64, 0x65, 0x33, 0x10, 0x03, 0x12, 0x31, 0x0a, 0x2d, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x5f, 0x73, - 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x34, 0x10, 0x04, 0x12, 0x1e, 0x0a, 0x1a, 0x61, 0x75, 0x74, - 0x68, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x5f, 0x73, - 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x35, 0x10, 0x05, 0x12, 0x28, 0x0a, 0x24, 0x75, 0x6e, 0x73, - 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, - 0x36, 0x10, 0x06, 0x12, 0x29, 0x0a, 0x25, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x64, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, - 0x64, 0x65, 0x32, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x37, 0x10, 0x07, 0x42, 0x0a, - 0x0a, 0x08, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x22, 0xe5, 0x04, 0x0a, 0x1b, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4c, 0x0a, 0x07, 0x73, 0x75, - 0x62, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x75, - 0x62, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, - 0x62, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x1a, 0xeb, 0x03, 0x0a, 0x07, 0x53, 0x75, 0x62, - 0x63, 0x6f, 0x64, 0x65, 0x22, 0xdf, 0x03, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x28, - 0x0a, 0x24, 0x6d, 0x61, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, - 0x62, 0x63, 0x6f, 0x64, 0x65, 0x31, 0x10, 0x01, 0x12, 0x30, 0x0a, 0x2c, 0x75, 0x6e, 0x72, 0x65, - 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x77, 0x65, 0x6c, 0x6c, 0x6b, 0x6e, 0x6f, - 0x77, 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, - 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x27, 0x77, 0x65, - 0x6c, 0x6c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x5f, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, - 0x63, 0x6f, 0x64, 0x65, 0x33, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, - 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x34, 0x10, 0x04, 0x12, 0x26, - 0x0a, 0x22, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5f, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, - 0x6f, 0x64, 0x65, 0x35, 0x10, 0x05, 0x12, 0x28, 0x0a, 0x24, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x5f, - 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x10, 0x06, - 0x12, 0x22, 0x0a, 0x1e, 0x61, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6c, - 0x6f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, - 0x65, 0x37, 0x10, 0x07, 0x12, 0x26, 0x0a, 0x22, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, - 0x6e, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x5f, 0x63, 0x6f, 0x64, 0x65, - 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x38, 0x10, 0x08, 0x12, 0x28, 0x0a, 0x24, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, - 0x6f, 0x64, 0x65, 0x39, 0x10, 0x09, 0x12, 0x29, 0x0a, 0x25, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, - 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x31, 0x30, 0x10, - 0x0a, 0x12, 0x23, 0x0a, 0x1f, 0x61, 0x62, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x5f, 0x61, 0x73, - 0x70, 0x61, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, - 0x64, 0x65, 0x31, 0x31, 0x10, 0x0b, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, - 0x64, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x48, - 0x6f, 0x6c, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x22, - 0x22, 0x0a, 0x20, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x46, 0x69, 0x6e, 0x69, - 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x22, 0xec, 0x03, 0x0a, 0x13, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, - 0x70, 0x43, 0x65, 0x61, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x44, 0x0a, 0x07, 0x73, - 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x43, 0x65, 0x61, 0x73, - 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, - 0x01, 0x1a, 0x82, 0x03, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x22, 0xf6, 0x02, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x6d, 0x61, 0x78, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x65, 0x61, - 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, - 0x64, 0x65, 0x31, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x73, - 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, 0x75, - 0x62, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x70, 0x65, 0x65, 0x72, - 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, - 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x10, 0x03, 0x12, 0x1e, 0x0a, 0x1a, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, - 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x34, 0x10, 0x04, 0x12, 0x24, 0x0a, 0x20, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, - 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x35, 0x10, 0x05, 0x12, - 0x27, 0x0a, 0x23, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, 0x75, - 0x62, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x10, 0x06, 0x12, 0x32, 0x0a, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, - 0x36, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x37, 0x10, 0x07, 0x12, 0x23, 0x0a, 0x1f, - 0x6f, 0x75, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x38, 0x10, - 0x08, 0x12, 0x23, 0x0a, 0x1f, 0x62, 0x66, 0x64, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, 0x75, 0x62, 0x63, - 0x6f, 0x64, 0x65, 0x39, 0x10, 0x09, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, - 0x64, 0x65, 0x22, 0x63, 0x0a, 0x14, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x43, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x88, - 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, - 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x22, 0xae, 0x08, 0x0a, 0x09, 0x42, 0x67, 0x70, 0x56, - 0x34, 0x50, 0x65, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x70, - 0x65, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, - 0x16, 0x65, 0x76, 0x70, 0x6e, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x73, - 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x14, 0x65, 0x76, 0x70, 0x6e, 0x45, 0x74, - 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x38, - 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x50, 0x65, 0x65, 0x72, 0x2e, - 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x06, 0x61, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x08, 0x61, - 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x0f, 0x61, 0x73, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x50, - 0x65, 0x65, 0x72, 0x2e, 0x41, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x69, 0x64, 0x74, - 0x68, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x03, 0x52, 0x0d, 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x57, 0x69, 0x64, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x08, 0x61, 0x64, - 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, - 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x61, 0x70, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x5e, 0x0a, 0x1a, - 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x65, - 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x52, 0x18, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x09, - 0x76, 0x34, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x08, 0x76, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, - 0x31, 0x0a, 0x09, 0x76, 0x36, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x08, 0x76, 0x36, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x10, 0x76, 0x34, 0x5f, 0x73, 0x72, 0x74, 0x65, 0x5f, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, 0x34, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x0e, 0x76, 0x34, 0x53, 0x72, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, - 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x10, 0x76, 0x36, 0x5f, 0x73, 0x72, 0x74, 0x65, 0x5f, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, 0x36, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x0e, 0x76, 0x36, 0x53, 0x72, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, - 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x04, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x10, 0x67, - 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x47, - 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x0f, - 0x67, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, - 0x3b, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x0d, 0x72, - 0x65, 0x70, 0x6c, 0x61, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x35, 0x0a, 0x06, - 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x08, 0x0a, 0x04, 0x69, 0x62, 0x67, 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x65, 0x62, 0x67, - 0x70, 0x10, 0x02, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, - 0x69, 0x64, 0x74, 0x68, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, - 0x03, 0x74, 0x77, 0x6f, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x66, 0x6f, 0x75, 0x72, 0x10, 0x02, - 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0c, 0x0a, - 0x0a, 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x12, 0x0a, 0x10, 0x5f, - 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, - 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x66, 0x0a, 0x0e, 0x42, 0x67, 0x70, 0x56, - 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x70, - 0x76, 0x34, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x08, 0x69, 0x70, 0x76, 0x34, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x05, - 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, - 0x72, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0xcc, 0x04, 0x0a, 0x14, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0b, 0x64, 0x66, 0x5f, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x66, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0a, 0x64, 0x66, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, - 0x04, 0x65, 0x76, 0x69, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x76, 0x70, 0x6e, 0x45, 0x76, 0x69, 0x73, 0x52, - 0x04, 0x65, 0x76, 0x69, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x65, 0x73, 0x69, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x65, 0x73, 0x69, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0b, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x0a, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, - 0x09, 0x65, 0x73, 0x69, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x08, 0x65, 0x73, 0x69, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, - 0x31, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, - 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, - 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x5f, 0x63, - 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x1a, - 0x48, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x3a, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, - 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, - 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x02, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x73, - 0x69, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x6f, 0x64, - 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x73, 0x69, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, - 0x5d, 0x0a, 0x1c, 0x42, 0x67, 0x70, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x66, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x2a, 0x0a, 0x0e, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x22, 0xd1, - 0x04, 0x0a, 0x10, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, - 0x63, 0x65, 0x64, 0x12, 0x4c, 0x0a, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, - 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, - 0x1d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x45, 0x78, 0x69, - 0x74, 0x44, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x88, 0x01, - 0x01, 0x12, 0x3d, 0x0a, 0x18, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, - 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x16, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x45, 0x78, 0x69, 0x74, - 0x44, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, - 0x12, 0x2a, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x06, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, - 0x63, 0x65, 0x64, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x03, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x18, - 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, - 0x52, 0x16, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x43, 0x0a, 0x06, 0x4f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, 0x39, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, - 0x0a, 0x03, 0x69, 0x67, 0x70, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x67, 0x70, 0x10, 0x02, - 0x12, 0x0e, 0x0a, 0x0a, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x03, - 0x42, 0x23, 0x0a, 0x21, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6d, 0x75, 0x6c, - 0x74, 0x69, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, - 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, - 0x65, 0x78, 0x69, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, - 0x6f, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x13, 0x0a, - 0x11, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x22, 0xbe, 0x02, 0x0a, 0x0c, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x73, 0x5f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x08, - 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x61, - 0x73, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x08, 0x61, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x8e, 0x01, - 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x14, 0x0a, 0x10, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x6e, 0x6f, 0x5f, 0x65, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x6e, 0x6f, 0x5f, 0x61, 0x64, 0x76, 0x65, - 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x6e, 0x6f, 0x5f, 0x65, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x10, - 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x6c, 0x6c, 0x67, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x10, - 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x6e, 0x6f, 0x5f, 0x6c, 0x6c, 0x67, 0x72, 0x10, 0x06, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x73, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x22, 0x8f, 0x04, 0x0a, 0x0f, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, - 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x40, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0xbc, 0x01, - 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x1b, 0x0a, 0x17, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x73, 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x10, 0x01, 0x12, 0x1e, 0x0a, - 0x1a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, - 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x02, 0x12, 0x1b, 0x0a, - 0x17, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x73, 0x5f, 0x34, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x6f, 0x70, - 0x61, 0x71, 0x75, 0x65, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x65, 0x76, 0x70, 0x6e, 0x10, 0x05, - 0x12, 0x2a, 0x0a, 0x26, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x73, 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, - 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x10, 0x06, 0x1a, 0x87, 0x01, 0x0a, - 0x07, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x22, 0x7c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x02, 0x12, - 0x16, 0x0a, 0x12, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x6e, 0x64, - 0x77, 0x69, 0x64, 0x74, 0x68, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, - 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x6d, 0x61, 0x63, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x10, 0x06, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, - 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd3, 0x02, 0x0a, 0x09, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, - 0x61, 0x74, 0x68, 0x12, 0x42, 0x0a, 0x0b, 0x61, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x6f, - 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x2e, 0x41, 0x73, 0x53, 0x65, 0x74, 0x4d, 0x6f, - 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x09, 0x61, 0x73, 0x53, 0x65, 0x74, - 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0xbe, 0x01, 0x0a, 0x09, 0x41, - 0x73, 0x53, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, 0x73, 0x10, 0x01, 0x12, - 0x12, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x73, 0x5f, 0x73, 0x65, - 0x71, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, - 0x73, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x71, - 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x73, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x05, 0x12, 0x1c, 0x0a, - 0x18, 0x70, 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x72, 0x73, - 0x74, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x06, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, - 0x61, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x10, - 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x38, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, - 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, 0x5d, 0x0a, 0x04, 0x54, 0x79, 0x70, - 0x65, 0x22, 0x55, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x73, - 0x5f, 0x73, 0x65, 0x71, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x73, 0x65, 0x74, - 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x5f, - 0x73, 0x65, 0x71, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x65, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x04, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x22, 0xba, 0x01, 0x0a, 0x0d, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x76, 0x70, 0x6e, 0x45, - 0x76, 0x69, 0x73, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, - 0x76, 0x70, 0x6e, 0x45, 0x76, 0x69, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x2f, 0x0a, 0x09, 0x65, 0x76, 0x69, 0x5f, 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, - 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x08, 0x65, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, - 0x6e, 0x1a, 0x30, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x26, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x65, 0x76, 0x69, 0x5f, 0x76, 0x78, 0x6c, 0x61, - 0x6e, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xad, - 0x07, 0x0a, 0x0d, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, - 0x12, 0x4e, 0x0a, 0x11, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x64, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x42, - 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x10, - 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, - 0x12, 0x57, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x2e, 0x52, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x6d, 0x73, - 0x69, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x09, 0x70, 0x6d, 0x73, 0x69, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, - 0x08, 0x61, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x07, 0x61, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x4b, 0x0a, - 0x13, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, - 0x73, 0x68, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x13, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x11, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, - 0x43, 0x0a, 0x13, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, - 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x52, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x6d, - 0x70, 0x6f, 0x72, 0x74, 0x12, 0x48, 0x0a, 0x16, 0x6c, 0x33, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x13, 0x6c, 0x33, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x48, - 0x0a, 0x16, 0x6c, 0x33, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x52, 0x13, 0x6c, 0x33, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, - 0x6e, 0x63, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, - 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x63, - 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, - 0x0e, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, - 0x27, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, - 0x52, 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x43, 0x0a, 0x0f, 0x52, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x30, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x42, 0x13, 0x0a, - 0x11, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x6d, 0x73, 0x69, 0x5f, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0xe2, - 0x01, 0x0a, 0x1c, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, - 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, - 0x37, 0x0a, 0x0d, 0x63, 0x6d, 0x61, 0x63, 0x5f, 0x69, 0x70, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, - 0x43, 0x4d, 0x61, 0x63, 0x49, 0x70, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0b, 0x63, 0x6d, 0x61, - 0x63, 0x49, 0x70, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x0f, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x54, 0x61, 0x67, - 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x76, 0x6c, 0x61, 0x6e, 0x5f, 0x61, 0x77, - 0x61, 0x72, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x01, 0x52, 0x10, 0x76, 0x6c, 0x61, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x42, 0x15, 0x0a, 0x13, - 0x5f, 0x76, 0x6c, 0x61, 0x6e, 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x22, 0xd8, 0x04, 0x0a, 0x0e, 0x42, 0x67, 0x70, 0x43, 0x4d, 0x61, 0x63, 0x49, - 0x70, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x6d, 0x61, 0x63, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x4d, 0x41, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x52, 0x0c, 0x6d, 0x61, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, - 0x73, 0x12, 0x19, 0x0a, 0x05, 0x6c, 0x32, 0x76, 0x6e, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x00, 0x52, 0x05, 0x6c, 0x32, 0x76, 0x6e, 0x69, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x0e, - 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x34, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x36, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x05, 0x6c, 0x33, 0x76, 0x6e, 0x69, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x6c, 0x33, 0x76, 0x6e, 0x69, 0x88, 0x01, 0x01, 0x12, - 0x3b, 0x0a, 0x17, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x48, 0x02, 0x52, 0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x08, - 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, - 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, - 0x33, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, - 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, - 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x79, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, - 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x17, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x32, 0x76, 0x6e, 0x69, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x33, 0x76, 0x6e, 0x69, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x6e, - 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x67, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbd, - 0x02, 0x0a, 0x15, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x69, - 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x07, 0x72, 0x64, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, - 0x69, 0x73, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x64, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, - 0x0a, 0x16, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x72, 0x64, - 0x5f, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, - 0x52, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x64, 0x49, 0x70, - 0x41, 0x64, 0x64, 0x72, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x64, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x07, 0x72, 0x64, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x51, 0x0a, 0x06, 0x52, 0x64, 0x54, 0x79, 0x70, - 0x65, 0x22, 0x47, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x61, 0x73, - 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, - 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x61, - 0x73, 0x5f, 0x34, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x10, 0x03, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x72, - 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x72, 0x64, 0x5f, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xdb, - 0x01, 0x0a, 0x0e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x12, 0x3d, 0x0a, 0x07, 0x72, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x52, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x72, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, - 0x1a, 0x51, 0x0a, 0x06, 0x52, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x47, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, - 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x34, 0x6f, 0x63, 0x74, 0x65, - 0x74, 0x10, 0x03, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x72, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, - 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xf3, 0x03, 0x0a, - 0x0b, 0x42, 0x67, 0x70, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x12, - 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x10, 0x68, 0x6f, 0x6c, 0x64, - 0x54, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, - 0x33, 0x0a, 0x13, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x11, - 0x6b, 0x65, 0x65, 0x70, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, - 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, - 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, - 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x6d, 0x64, 0x35, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x06, 0x6d, 0x64, - 0x35, 0x4b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x61, 0x73, 0x73, 0x69, - 0x76, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, - 0x0b, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x24, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x06, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x50, 0x6f, - 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, - 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x07, 0x52, 0x0c, - 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x88, 0x01, 0x01, 0x42, - 0x15, 0x0a, 0x13, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x5f, - 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x12, - 0x0a, 0x10, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, - 0x69, 0x76, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x64, 0x35, 0x5f, 0x6b, 0x65, 0x79, 0x42, - 0x0f, 0x0a, 0x0d, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, - 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, - 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x5f, 0x70, 0x6f, - 0x72, 0x74, 0x22, 0x9a, 0x0d, 0x0a, 0x0d, 0x42, 0x67, 0x70, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, 0x69, - 0x63, 0x61, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x70, - 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, - 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x63, 0x61, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x36, - 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, - 0x52, 0x0b, 0x69, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x2a, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, - 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x36, - 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, - 0x76, 0x70, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x04, 0x76, 0x70, - 0x6c, 0x73, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x72, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x0c, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x88, 0x01, 0x01, 0x12, - 0x2e, 0x0a, 0x10, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, - 0x69, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x06, 0x52, 0x0f, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x30, 0x0a, 0x12, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x6f, - 0x6e, 0x5f, 0x76, 0x70, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x0f, 0x6c, - 0x69, 0x6e, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x6e, 0x56, 0x70, 0x6e, 0x88, 0x01, - 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, - 0x76, 0x70, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x08, 0x52, 0x0c, 0x6c, 0x69, 0x6e, - 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x70, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, - 0x65, 0x76, 0x70, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x48, 0x09, 0x52, 0x04, 0x65, 0x76, - 0x70, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x1a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x64, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, - 0x69, 0x6e, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x48, 0x0a, 0x52, 0x17, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x64, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x45, 0x6e, 0x63, 0x6f, - 0x64, 0x69, 0x6e, 0x67, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x69, 0x70, 0x76, 0x34, 0x5f, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x76, 0x70, 0x6e, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x08, 0x48, 0x0b, 0x52, 0x10, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x63, 0x61, 0x73, 0x74, 0x56, 0x70, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x69, 0x70, - 0x76, 0x34, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x0c, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x70, 0x6c, 0x73, 0x56, 0x70, 0x6e, - 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x64, 0x74, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x08, 0x48, 0x0d, 0x52, 0x07, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x64, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x0e, 0x52, 0x14, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x63, 0x61, 0x73, 0x74, 0x4d, 0x70, 0x6c, 0x73, 0x56, 0x70, 0x6e, 0x88, 0x01, 0x01, 0x12, - 0x38, 0x0a, 0x16, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, - 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x48, - 0x0f, 0x52, 0x13, 0x69, 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, 0x6c, - 0x6f, 0x77, 0x53, 0x70, 0x65, 0x63, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x11, 0x69, 0x70, 0x76, - 0x34, 0x5f, 0x73, 0x72, 0x5f, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x11, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x10, 0x52, 0x0e, 0x69, 0x70, 0x76, 0x34, 0x53, 0x72, 0x54, 0x65, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x69, 0x70, 0x76, - 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x48, 0x11, 0x52, 0x12, 0x69, 0x70, 0x76, 0x34, - 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x41, 0x64, 0x64, 0x50, 0x61, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x12, 0x31, 0x0a, 0x12, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, - 0x61, 0x73, 0x74, 0x5f, 0x76, 0x70, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x48, 0x12, 0x52, - 0x10, 0x69, 0x70, 0x76, 0x36, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x56, 0x70, - 0x6e, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x70, 0x6c, - 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x48, 0x13, 0x52, 0x0b, 0x69, - 0x70, 0x76, 0x36, 0x4d, 0x70, 0x6c, 0x73, 0x56, 0x70, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, - 0x08, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x64, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x48, - 0x14, 0x52, 0x07, 0x69, 0x70, 0x76, 0x36, 0x4d, 0x64, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, - 0x17, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, - 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x48, 0x15, - 0x52, 0x14, 0x69, 0x70, 0x76, 0x36, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x4d, - 0x70, 0x6c, 0x73, 0x56, 0x70, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x16, 0x69, 0x70, 0x76, - 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x48, 0x16, 0x52, 0x13, 0x69, 0x70, 0x76, - 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x70, 0x65, 0x63, - 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x11, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x73, 0x72, 0x5f, 0x74, - 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x18, 0x20, 0x01, 0x28, 0x08, 0x48, 0x17, - 0x52, 0x0e, 0x69, 0x70, 0x76, 0x36, 0x53, 0x72, 0x54, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, - 0x61, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x19, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x18, 0x52, 0x12, 0x69, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, - 0x74, 0x41, 0x64, 0x64, 0x50, 0x61, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, - 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x42, 0x11, 0x0a, 0x0f, - 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x42, - 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, - 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, - 0x61, 0x73, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x76, 0x70, 0x6c, 0x73, 0x42, 0x10, 0x0a, 0x0e, - 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x42, 0x13, - 0x0a, 0x11, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, - 0x69, 0x6e, 0x74, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6c, - 0x69, 0x6e, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x65, 0x76, 0x70, 0x6e, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x65, 0x6e, 0x63, - 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x10, 0x0a, 0x0e, - 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x0b, - 0x0a, 0x09, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x64, 0x74, 0x42, 0x1a, 0x0a, 0x18, 0x5f, - 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x6d, - 0x70, 0x6c, 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x69, 0x70, 0x76, 0x34, - 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x73, 0x72, 0x5f, 0x74, - 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x69, 0x70, 0x76, - 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x69, 0x70, - 0x76, 0x36, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, - 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x64, 0x74, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x70, 0x76, - 0x36, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x70, 0x6c, 0x73, - 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, - 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x42, - 0x14, 0x0a, 0x12, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x73, 0x72, 0x5f, 0x74, 0x65, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, - 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x22, - 0xb7, 0x01, 0x0a, 0x1b, 0x42, 0x67, 0x70, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x49, 0x6e, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, - 0x33, 0x0a, 0x13, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x11, - 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, - 0x69, 0x70, 0x76, 0x36, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x01, 0x52, 0x11, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x49, 0x70, 0x76, 0x36, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x75, 0x6e, - 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x70, - 0x76, 0x36, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0xbb, 0x07, 0x0a, 0x0f, 0x42, 0x67, - 0x70, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x31, 0x0a, - 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x12, 0x4e, 0x0a, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4e, 0x65, - 0x78, 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x64, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, - 0x12, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, - 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, - 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, - 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, - 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, - 0x12, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, - 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, - 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x27, - 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, - 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2a, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x41, 0x64, 0x64, 0x50, 0x61, 0x74, 0x68, 0x52, 0x07, 0x61, 0x64, 0x64, 0x50, - 0x61, 0x74, 0x68, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x04, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x0f, - 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, - 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, - 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x65, 0x78, 0x74, - 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x14, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x52, 0x13, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x40, 0x0a, 0x0b, 0x4e, 0x65, 0x78, - 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x31, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x10, 0x01, 0x12, - 0x0a, 0x0a, 0x06, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x10, 0x02, 0x1a, 0x41, 0x0a, 0x12, 0x4e, - 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, - 0x76, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, 0x02, 0x42, 0x10, - 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, - 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, - 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, - 0x70, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x36, 0x0a, 0x0a, 0x42, 0x67, 0x70, 0x41, 0x64, - 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, - 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x22, - 0x93, 0x08, 0x0a, 0x14, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, - 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6a, 0x0a, 0x19, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, - 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, - 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x6f, 0x63, 0x74, - 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x73, 0x0a, 0x1c, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, - 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, - 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, - 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x6a, 0x0a, - 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x34, 0x6f, 0x63, 0x74, - 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x6f, 0x63, - 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x63, 0x0a, 0x16, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, - 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, - 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5d, - 0x0a, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x76, 0x70, - 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x45, 0x76, 0x70, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x76, 0x65, 0x45, 0x76, 0x70, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x74, 0x0a, - 0x1d, 0x6e, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x4e, - 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, - 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x19, 0x6e, 0x6f, 0x6e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x1a, 0xe7, 0x01, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xdc, 0x01, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x34, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x10, - 0x04, 0x12, 0x18, 0x0a, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x65, 0x76, 0x70, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x10, 0x05, 0x12, 0x21, 0x0a, 0x1d, 0x6e, - 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x32, 0x6f, - 0x63, 0x74, 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x10, 0x06, 0x12, 0x0a, - 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x07, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x35, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, - 0x2b, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, - 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x6c, 0x6f, 0x62, - 0x61, 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x34, 0x62, 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, - 0x10, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, - 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, 0x74, - 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xbf, 0x01, 0x0a, 0x35, 0x42, 0x67, 0x70, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, - 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x12, 0x2b, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, - 0x65, 0x5f, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x6c, - 0x6f, 0x62, 0x61, 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2f, - 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x34, 0x62, 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, - 0x12, 0x0a, 0x10, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, - 0x5f, 0x61, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x34, 0x62, - 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xc4, 0x03, 0x0a, 0x2a, 0x42, 0x67, - 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, - 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, - 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, - 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x6c, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x12, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x6c, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, - 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, - 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x55, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, - 0x79, 0x70, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0xc8, 0x01, 0x0a, 0x38, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, - 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, - 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x2f, 0x0a, - 0x11, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x67, 0x6c, 0x6f, 0x62, - 0x61, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2f, - 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, - 0x14, 0x0a, 0x12, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, - 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xc8, 0x01, 0x0a, 0x38, - 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, - 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x11, 0x67, 0x6c, 0x6f, 0x62, - 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x49, 0x70, 0x76, - 0x34, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x32, 0x62, 0x79, - 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x67, - 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, - 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xd0, 0x03, 0x0a, 0x2d, 0x42, 0x67, 0x70, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, - 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6f, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, - 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x6f, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x55, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0x4b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, - 0x70, 0x65, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x35, 0x42, 0x67, - 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, - 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, - 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x34, 0x62, - 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, - 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x34, 0x62, 0x79, 0x74, 0x65, 0x41, 0x73, 0x88, 0x01, 0x01, - 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, - 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, - 0x74, 0x65, 0x5f, 0x61, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, - 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xbf, 0x01, 0x0a, 0x35, - 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, - 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x2b, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, - 0x34, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, - 0x52, 0x0d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x34, 0x62, 0x79, 0x74, 0x65, 0x41, 0x73, 0x88, - 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, - 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x34, - 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xc4, 0x03, - 0x0a, 0x2a, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, - 0x34, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x34, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6c, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x75, 0x62, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x6c, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x12, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x75, 0x62, 0x74, 0x79, - 0x70, 0x65, 0x1a, 0x55, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4b, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x01, 0x12, - 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, - 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x79, 0x0a, 0x2d, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x22, - 0x9b, 0x01, 0x0a, 0x35, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, - 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, - 0x76, 0x65, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x63, 0x61, - 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x0a, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, - 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x42, 0x0e, 0x0a, - 0x0c, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa8, 0x03, - 0x0a, 0x28, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, - 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x56, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, - 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, - 0x70, 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x57, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, - 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x0c, 0x63, - 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x6f, 0x0a, 0x15, 0x65, - 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x75, 0x62, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, - 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, - 0x70, 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x4f, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x45, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x11, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, - 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x64, 0x0a, 0x2f, 0x42, 0x67, 0x70, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x45, 0x76, 0x70, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x63, 0x12, 0x22, 0x0a, 0x0a, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x09, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x63, 0x88, 0x01, 0x01, 0x42, - 0x0d, 0x0a, 0x0b, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x63, 0x22, 0xa8, - 0x02, 0x0a, 0x26, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x45, 0x76, 0x70, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x54, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x45, 0x76, - 0x70, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x62, 0x0a, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x63, 0x5f, 0x73, 0x75, - 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, - 0x45, 0x76, 0x70, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4d, 0x61, - 0x63, 0x52, 0x10, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x63, 0x53, 0x75, 0x62, 0x74, - 0x79, 0x70, 0x65, 0x1a, 0x39, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2f, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, - 0x5f, 0x6d, 0x61, 0x63, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x01, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x3a, 0x42, 0x67, - 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, - 0x74, 0x79, 0x4e, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, - 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x42, - 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x2b, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, 0x62, - 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, - 0x41, 0x73, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, - 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x48, 0x01, 0x52, 0x09, 0x62, 0x61, 0x6e, 0x64, - 0x77, 0x69, 0x64, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x67, 0x6c, 0x6f, - 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x42, 0x0c, 0x0a, 0x0a, - 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x22, 0xcd, 0x02, 0x0a, 0x2d, 0x42, - 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x79, 0x4e, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, - 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5b, 0x0a, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x4e, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, - 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, - 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x75, 0x0a, 0x16, 0x6c, 0x69, 0x6e, - 0x6b, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x73, 0x75, 0x62, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x4e, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x6e, - 0x6b, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x52, 0x14, 0x6c, 0x69, 0x6e, 0x6b, - 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, - 0x1a, 0x3d, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x33, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x62, 0x61, 0x6e, 0x64, - 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x01, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xcc, 0x01, 0x0a, 0x1e, 0x42, - 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x79, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, - 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, - 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x63, 0x6f, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x79, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x63, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xbb, 0x07, 0x0a, 0x0f, 0x42, 0x67, - 0x70, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x31, 0x0a, - 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x12, 0x4e, 0x0a, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4e, 0x65, - 0x78, 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x64, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, - 0x12, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, - 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, - 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, - 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, - 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, - 0x12, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, - 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, - 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x27, - 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, - 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2a, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x41, 0x64, 0x64, 0x50, 0x61, 0x74, 0x68, 0x52, 0x07, 0x61, 0x64, 0x64, 0x50, - 0x61, 0x74, 0x68, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x04, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x0f, - 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, - 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, - 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x65, 0x78, 0x74, - 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x14, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x52, 0x13, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x40, 0x0a, 0x0b, 0x4e, 0x65, 0x78, - 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x31, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x10, 0x01, 0x12, - 0x0a, 0x0a, 0x06, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x10, 0x02, 0x1a, 0x41, 0x0a, 0x12, 0x4e, - 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, - 0x76, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, 0x02, 0x42, 0x10, - 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, - 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, - 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, - 0x70, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xba, 0x08, 0x0a, 0x0f, 0x42, 0x67, 0x70, 0x53, - 0x72, 0x74, 0x65, 0x56, 0x34, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x29, 0x0a, 0x0d, 0x64, - 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, - 0x68, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x88, 0x01, - 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x69, 0x70, 0x76, 0x34, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x0d, 0x6e, - 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, - 0x56, 0x34, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, - 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x03, 0x52, 0x0b, 0x6e, 0x65, 0x78, - 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x64, 0x0a, 0x15, 0x6e, - 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, 0x34, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, - 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x04, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, - 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x36, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, - 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x05, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x6e, 0x65, 0x78, - 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, - 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, - 0x01, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, - 0x6e, 0x63, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, - 0x41, 0x64, 0x64, 0x50, 0x61, 0x74, 0x68, 0x52, 0x07, 0x61, 0x64, 0x64, 0x50, 0x61, 0x74, 0x68, - 0x12, 0x27, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, - 0x68, 0x52, 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x33, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, - 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x65, - 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x38, 0x0a, - 0x0b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x74, 0x6c, 0x76, 0x73, 0x18, 0x0d, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, - 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x6c, 0x76, 0x52, 0x0a, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x54, 0x6c, 0x76, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, - 0x48, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x40, 0x0a, - 0x0b, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x31, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, - 0x70, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x10, 0x02, 0x1a, - 0x41, 0x0a, 0x12, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, - 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, - 0x10, 0x02, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, - 0x73, 0x68, 0x65, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x42, 0x10, - 0x0a, 0x0e, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, - 0x64, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x18, 0x0a, 0x16, - 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, - 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x22, 0xdd, 0x05, 0x0a, 0x12, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, - 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x6c, 0x76, 0x12, 0x57, 0x0a, 0x17, 0x72, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, - 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x14, - 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x75, - 0x62, 0x54, 0x6c, 0x76, 0x12, 0x3b, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x73, 0x75, - 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x75, - 0x62, 0x54, 0x6c, 0x76, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x75, 0x62, 0x54, 0x6c, - 0x76, 0x12, 0x41, 0x0a, 0x0f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x62, - 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, - 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x0d, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x75, - 0x62, 0x54, 0x6c, 0x76, 0x12, 0x4a, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x50, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x10, - 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, - 0x12, 0x57, 0x0a, 0x17, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x53, 0x75, 0x62, - 0x54, 0x6c, 0x76, 0x52, 0x14, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x4b, 0x0a, 0x13, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, - 0x53, 0x72, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, - 0x62, 0x54, 0x6c, 0x76, 0x52, 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x74, 0x0a, 0x22, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, - 0x69, 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, - 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x1d, 0x65, - 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x3c, 0x0a, 0x0d, - 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, - 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0c, 0x73, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x22, 0xf1, 0x02, 0x0a, 0x1b, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, - 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x75, - 0x62, 0x54, 0x6c, 0x76, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x61, 0x73, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x5f, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x46, 0x61, - 0x6d, 0x69, 0x6c, 0x79, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, - 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, - 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x22, 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, - 0x70, 0x76, 0x36, 0x10, 0x02, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x36, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x39, 0x0a, 0x12, 0x42, 0x67, 0x70, 0x53, - 0x72, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, - 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x6c, 0x6f, 0x72, 0x22, 0x9f, 0x03, 0x0a, 0x14, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x42, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x5c, 0x0a, 0x10, - 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, - 0x53, 0x72, 0x74, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, 0x54, 0x6c, - 0x76, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x53, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x6f, - 0x75, 0x72, 0x5f, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0c, 0x66, 0x6f, 0x75, 0x72, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x53, - 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x73, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x07, 0x69, 0x70, 0x76, 0x36, 0x53, - 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x73, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x05, 0x73, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, - 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x69, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x04, 0x52, 0x05, 0x69, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, 0x1a, 0x5b, 0x0a, - 0x0e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x22, - 0x49, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x6e, 0x6f, 0x5f, 0x62, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x6f, 0x75, 0x72, - 0x5f, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x64, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, - 0x69, 0x70, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x10, 0x03, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x62, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, - 0x11, 0x0a, 0x0f, 0x5f, 0x66, 0x6f, 0x75, 0x72, 0x5f, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x73, - 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, - 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x22, 0x4d, 0x0a, 0x17, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, - 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, - 0x12, 0x23, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x22, 0x5f, 0x0a, 0x1b, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x53, 0x75, 0x62, - 0x54, 0x6c, 0x76, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x70, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0e, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, - 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x70, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x4f, 0x0a, 0x17, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, - 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xf0, 0x02, 0x0a, 0x24, 0x42, 0x67, 0x70, 0x53, 0x72, - 0x74, 0x65, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, - 0x88, 0x01, 0x0a, 0x1a, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x6e, 0x75, 0x6c, - 0x6c, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, - 0x74, 0x65, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x2e, - 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x17, - 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x88, 0x01, 0x01, 0x1a, 0x9d, 0x01, 0x0a, 0x17, 0x45, - 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x81, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x11, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x6c, - 0x70, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x70, 0x76, 0x34, - 0x5f, 0x65, 0x6e, 0x6c, 0x70, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x75, 0x73, 0x68, 0x5f, - 0x69, 0x70, 0x76, 0x36, 0x5f, 0x65, 0x6e, 0x6c, 0x70, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x70, - 0x75, 0x73, 0x68, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x65, 0x6e, - 0x6c, 0x70, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x70, - 0x75, 0x73, 0x68, 0x5f, 0x65, 0x6e, 0x6c, 0x70, 0x10, 0x05, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x65, - 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xb7, 0x01, 0x0a, 0x12, 0x42, 0x67, - 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x1b, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x00, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, - 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, - 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x22, 0xc4, 0x07, 0x0a, 0x0e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, - 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0c, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x2e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, - 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, - 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x41, 0x12, 0x35, 0x0a, 0x06, 0x74, - 0x79, 0x70, 0x65, 0x5f, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x42, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, - 0x65, 0x42, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x63, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, - 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, - 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x43, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, - 0x65, 0x5f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x54, - 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x44, - 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, - 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x45, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, - 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x54, 0x79, 0x70, - 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x46, 0x12, 0x35, - 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x47, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, - 0x74, 0x79, 0x70, 0x65, 0x47, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x68, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, - 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x54, 0x79, 0x70, 0x65, 0x53, - 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x48, 0x12, 0x35, 0x0a, 0x06, - 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x49, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, - 0x70, 0x65, 0x49, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6a, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, - 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4a, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, - 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, - 0x70, 0x65, 0x5f, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4b, - 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, - 0x4b, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x06, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x1a, 0xab, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x10, 0x01, 0x12, 0x0a, 0x0a, - 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x62, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, - 0x65, 0x5f, 0x63, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x64, 0x10, - 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x65, 0x10, 0x05, 0x12, 0x0a, 0x0a, - 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x66, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, - 0x65, 0x5f, 0x67, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x68, 0x10, - 0x08, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x10, 0x09, 0x12, 0x0a, 0x0a, - 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6a, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, - 0x65, 0x5f, 0x6b, 0x10, 0x0b, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x10, 0x42, - 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x12, - 0x19, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, - 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x74, 0x63, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x02, 0x74, 0x63, 0x88, 0x01, 0x01, 0x12, - 0x18, 0x0a, 0x05, 0x73, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, - 0x52, 0x04, 0x73, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x74, 0x74, 0x6c, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x88, 0x01, 0x01, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x74, - 0x63, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x5f, 0x62, 0x69, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, - 0x74, 0x74, 0x6c, 0x22, 0xf5, 0x01, 0x0a, 0x2a, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, - 0x52, 0x76, 0x36, 0x53, 0x49, 0x44, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, - 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, - 0x72, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x6c, 0x62, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x6c, 0x62, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6c, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x08, 0x6c, 0x6e, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x66, 0x75, 0x6e, 0x63, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0a, 0x66, - 0x75, 0x6e, 0x63, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, - 0x61, 0x72, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x03, 0x52, 0x09, 0x61, 0x72, 0x67, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x62, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x0c, - 0x0a, 0x0a, 0x5f, 0x6c, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x0e, 0x0a, 0x0c, - 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x0d, 0x0a, 0x0b, - 0x5f, 0x61, 0x72, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x01, 0x0a, 0x19, - 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x54, - 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, - 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, - 0x73, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, - 0x13, 0x0a, 0x02, 0x74, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x02, 0x74, - 0x63, 0x88, 0x01, 0x01, 0x12, 0x18, 0x0a, 0x05, 0x73, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x04, 0x73, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x15, - 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x03, 0x74, - 0x74, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x74, 0x63, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x5f, 0x62, 0x69, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x74, - 0x74, 0x6c, 0x22, 0xdb, 0x01, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, - 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x73, - 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x07, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x6c, 0x0a, 0x1a, 0x73, - 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x52, 0x76, - 0x36, 0x53, 0x49, 0x44, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, - 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, - 0x52, 0x17, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, - 0x61, 0x67, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, - 0x22, 0xf7, 0x01, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x43, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, - 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x72, 0x5f, - 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x0b, 0x73, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x88, 0x01, - 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0f, - 0x69, 0x70, 0x76, 0x34, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, - 0x01, 0x01, 0x12, 0x35, 0x0a, 0x0b, 0x73, 0x72, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x52, 0x09, - 0x73, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, - 0x61, 0x67, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, - 0x69, 0x74, 0x68, 0x6d, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xf7, 0x01, 0x0a, 0x19, 0x42, - 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x54, 0x79, - 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, - 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, - 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0b, 0x73, 0x72, 0x41, - 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x69, - 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0f, 0x69, 0x70, 0x76, 0x36, 0x4e, 0x6f, - 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x0b, - 0x73, 0x72, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, - 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x52, 0x09, 0x73, 0x72, 0x4d, 0x70, 0x6c, 0x73, - 0x53, 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, 0x0f, 0x0a, - 0x0d, 0x5f, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x42, 0x14, - 0x0a, 0x12, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x22, 0x88, 0x02, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, - 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, - 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, - 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x10, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, - 0x12, 0x2f, 0x0a, 0x11, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0f, 0x69, - 0x70, 0x76, 0x34, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, - 0x01, 0x12, 0x35, 0x0a, 0x0b, 0x73, 0x72, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, - 0x53, 0x72, 0x74, 0x65, 0x53, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x52, 0x09, 0x73, - 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, - 0x67, 0x73, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x69, 0x70, - 0x76, 0x34, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, - 0x8e, 0x02, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, - 0x6e, 0x74, 0x46, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, 0x0a, - 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, - 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x70, 0x76, - 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x72, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, - 0x12, 0x35, 0x0a, 0x0b, 0x73, 0x72, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, - 0x72, 0x74, 0x65, 0x53, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x52, 0x09, 0x73, 0x72, - 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, - 0x73, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x22, 0xc1, 0x03, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x47, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, - 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, - 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, - 0x18, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x04, 0x52, 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x6f, 0x64, - 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x0b, 0x73, - 0x72, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x72, - 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x52, 0x09, 0x73, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, - 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, 0x15, 0x0a, 0x13, - 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x5f, 0x69, 0x64, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, - 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, - 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x72, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x22, 0x8e, 0x02, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, - 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, - 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, - 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x10, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, - 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, - 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x0b, 0x73, 0x72, 0x5f, 0x6d, 0x70, 0x6c, 0x73, - 0x5f, 0x73, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, - 0x64, 0x52, 0x09, 0x73, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x16, 0x0a, - 0x14, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, - 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, - 0x54, 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2f, - 0x0a, 0x11, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0f, 0x69, 0x70, 0x76, - 0x36, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, - 0x1e, 0x0a, 0x08, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x02, 0x52, 0x07, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x6c, 0x0a, 0x1a, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, - 0x65, 0x53, 0x52, 0x76, 0x36, 0x53, 0x49, 0x44, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x75, 0x72, 0x65, 0x52, 0x17, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x69, 0x70, 0x76, 0x36, - 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0b, 0x0a, - 0x09, 0x5f, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x22, 0xde, 0x04, 0x0a, 0x19, 0x42, - 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4a, 0x54, 0x79, - 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, - 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, - 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0b, 0x73, 0x72, 0x41, - 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3a, - 0x0a, 0x17, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x03, 0x52, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x6f, 0x64, 0x65, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, - 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x3c, 0x0a, 0x18, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x05, 0x52, 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x76, 0x36, 0x4e, - 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, - 0x08, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x06, 0x52, 0x07, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x6c, 0x0a, - 0x1a, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, - 0x52, 0x76, 0x36, 0x53, 0x49, 0x44, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, - 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, - 0x72, 0x65, 0x52, 0x17, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, - 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x1a, 0x0a, - 0x18, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, - 0x64, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, - 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0b, - 0x0a, 0x09, 0x5f, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x22, 0xab, 0x03, 0x0a, 0x19, - 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x54, - 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, - 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, - 0x73, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, - 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0b, 0x73, 0x72, - 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, - 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x11, - 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x07, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, - 0x64, 0x88, 0x01, 0x01, 0x12, 0x6c, 0x0a, 0x1a, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, - 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, - 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x52, 0x76, 0x36, 0x53, 0x49, 0x44, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x64, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x52, 0x17, 0x73, 0x72, 0x76, 0x36, 0x53, - 0x69, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, - 0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, 0x0f, 0x0a, 0x0d, - 0x5f, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x42, 0x15, 0x0a, - 0x13, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, - 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0b, 0x0a, 0x09, - 0x5f, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x22, 0xb9, 0x08, 0x0a, 0x0f, 0x42, 0x67, - 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, 0x36, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x29, 0x0a, - 0x0d, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, - 0x69, 0x73, 0x68, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, - 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x69, 0x70, - 0x76, 0x36, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, - 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, - 0x74, 0x65, 0x56, 0x36, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x48, - 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x03, 0x52, 0x0b, 0x6e, - 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x64, 0x0a, - 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, 0x36, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x04, 0x52, 0x12, 0x6e, 0x65, - 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, - 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x05, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, - 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x6e, - 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x12, 0x6e, 0x65, - 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, - 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x41, 0x64, 0x64, 0x50, 0x61, 0x74, 0x68, 0x52, 0x07, 0x61, 0x64, 0x64, 0x50, 0x61, - 0x74, 0x68, 0x12, 0x27, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, - 0x61, 0x74, 0x68, 0x52, 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x33, 0x0a, 0x0b, 0x63, - 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x12, 0x3c, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, - 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0e, - 0x65, 0x78, 0x74, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x38, - 0x0a, 0x0b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x74, 0x6c, 0x76, 0x73, 0x18, 0x0d, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, - 0x65, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x6c, 0x76, 0x52, 0x0a, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x6c, 0x76, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x40, - 0x0a, 0x0b, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x31, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, - 0x69, 0x70, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x10, 0x02, - 0x1a, 0x41, 0x0a, 0x12, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, - 0x36, 0x10, 0x02, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, - 0x69, 0x73, 0x68, 0x65, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x42, - 0x10, 0x0a, 0x0e, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, - 0x6f, 0x64, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x18, 0x0a, - 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, - 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0xdd, 0x05, 0x0a, 0x12, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, - 0x65, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x6c, 0x76, 0x12, 0x57, 0x0a, 0x17, - 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, - 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, - 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, - 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, - 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x3b, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x73, - 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, - 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x75, 0x62, 0x54, - 0x6c, 0x76, 0x12, 0x41, 0x0a, 0x0f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, - 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x0d, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, - 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x4a, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x50, - 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, - 0x10, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, - 0x76, 0x12, 0x57, 0x0a, 0x17, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x53, 0x75, - 0x62, 0x54, 0x6c, 0x76, 0x52, 0x14, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x69, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x4b, 0x0a, 0x13, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, - 0x76, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x53, 0x72, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x53, - 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, - 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x74, 0x0a, 0x22, 0x65, 0x78, 0x70, 0x6c, 0x69, - 0x63, 0x69, 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, - 0x65, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x1d, - 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x3c, 0x0a, - 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, - 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0c, 0x73, - 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0xe6, 0x01, 0x0a, 0x12, 0x42, 0x67, 0x70, 0x47, 0x72, 0x61, - 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x20, 0x0a, 0x09, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x67, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, - 0x00, 0x52, 0x08, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x47, 0x72, 0x88, 0x01, 0x01, 0x12, 0x26, - 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x6c, 0x6c, 0x67, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x0a, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x6c, 0x67, 0x72, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, - 0x73, 0x74, 0x61, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x67, 0x72, 0x42, 0x0f, - 0x0a, 0x0d, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, - 0x0e, 0x0a, 0x0c, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6c, 0x6c, 0x67, 0x72, 0x42, - 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x92, - 0x02, 0x0a, 0x0f, 0x42, 0x67, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, - 0x61, 0x79, 0x12, 0x3d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x3f, 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x5f, - 0x70, 0x64, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x42, 0x67, 0x70, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x50, 0x64, - 0x75, 0x73, 0x52, 0x0e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x50, 0x64, - 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x09, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, - 0x61, 0x77, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x08, 0x72, 0x61, 0x77, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x1a, 0x45, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x3b, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, - 0x65, 0x64, 0x5f, 0x70, 0x64, 0x75, 0x73, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x72, 0x61, 0x77, - 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x40, 0x0a, 0x0b, 0x42, 0x67, 0x70, 0x52, 0x61, 0x77, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x07, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x73, 0x22, 0x7a, 0x0a, 0x12, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x12, 0x1e, 0x0a, 0x08, 0x74, - 0x69, 0x6d, 0x65, 0x5f, 0x67, 0x61, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x07, 0x74, 0x69, 0x6d, 0x65, 0x47, 0x61, 0x70, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x01, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x67, 0x61, 0x70, - 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x22, 0x50, 0x0a, 0x11, 0x42, 0x67, 0x70, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, - 0x65, 0x64, 0x50, 0x64, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x4f, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x73, 0x22, 0xc0, 0x02, 0x0a, 0x1c, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x70, 0x6c, 0x61, 0x79, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x67, 0x61, 0x70, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x47, 0x61, - 0x70, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x0f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x52, 0x0e, 0x70, 0x61, 0x74, 0x68, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x12, 0x5c, 0x0a, 0x19, 0x74, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x5f, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x5f, 0x6e, 0x6c, 0x72, 0x69, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4f, 0x6e, - 0x65, 0x54, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x6c, 0x72, 0x69, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x17, 0x74, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x4e, 0x6c, 0x72, 0x69, 0x73, 0x12, - 0x58, 0x0a, 0x17, 0x74, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, - 0x65, 0x61, 0x63, 0x68, 0x5f, 0x6e, 0x6c, 0x72, 0x69, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x54, 0x72, 0x61, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x6c, 0x72, 0x69, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x52, 0x15, 0x74, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, - 0x65, 0x61, 0x63, 0x68, 0x4e, 0x6c, 0x72, 0x69, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x67, 0x61, 0x70, 0x22, 0xa3, 0x01, 0x0a, 0x1b, 0x42, 0x67, 0x70, 0x4f, 0x6e, - 0x65, 0x54, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x6c, 0x72, 0x69, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, - 0x01, 0x01, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4e, 0x4c, 0x52, - 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x50, 0x61, 0x74, 0x68, 0x49, 0x64, 0x52, 0x06, 0x70, - 0x61, 0x74, 0x68, 0x49, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x9c, 0x01, 0x0a, - 0x14, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x49, 0x70, 0x76, 0x34, 0x4e, 0x4c, 0x52, 0x49, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, - 0x01, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4e, 0x4c, 0x52, 0x49, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x50, 0x61, 0x74, 0x68, 0x49, 0x64, 0x52, 0x06, 0x70, 0x61, - 0x74, 0x68, 0x49, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x9c, 0x01, 0x0a, 0x14, - 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, - 0x12, 0x31, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4e, 0x4c, 0x52, 0x49, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x50, 0x61, 0x74, 0x68, 0x49, 0x64, 0x52, 0x06, 0x70, 0x61, 0x74, - 0x68, 0x49, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x3a, 0x0a, 0x13, 0x42, 0x67, - 0x70, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x50, 0x61, 0x74, 0x68, 0x49, - 0x64, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x88, 0x09, 0x0a, 0x0d, 0x42, 0x67, 0x70, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x10, 0x6f, 0x74, 0x68, 0x65, - 0x72, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x52, 0x0f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x88, - 0x01, 0x01, 0x12, 0x31, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x61, - 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x34, 0x0a, 0x08, 0x61, 0x73, 0x34, 0x5f, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x34, 0x50, 0x61, - 0x74, 0x68, 0x52, 0x07, 0x61, 0x73, 0x34, 0x50, 0x61, 0x74, 0x68, 0x12, 0x34, 0x0a, 0x08, 0x6e, - 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x52, 0x07, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, - 0x70, 0x12, 0x62, 0x0a, 0x18, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, - 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x45, 0x78, 0x69, 0x74, - 0x44, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x16, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x45, 0x78, 0x69, 0x74, 0x44, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, - 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4c, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, - 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x12, 0x3f, 0x0a, 0x19, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, - 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x17, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x41, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x0a, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x12, 0x46, 0x0a, 0x0e, 0x61, 0x73, 0x34, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, - 0x34, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0d, 0x61, 0x73, 0x34, - 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x39, 0x0a, 0x09, 0x63, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, - 0x75, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x52, 0x0c, 0x6f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x4c, 0x0a, 0x14, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x52, 0x13, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x08, 0x6d, 0x70, 0x5f, - 0x72, 0x65, 0x61, 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4d, - 0x70, 0x52, 0x65, 0x61, 0x63, 0x68, 0x4e, 0x6c, 0x72, 0x69, 0x52, 0x07, 0x6d, 0x70, 0x52, 0x65, - 0x61, 0x63, 0x68, 0x12, 0x3e, 0x0a, 0x0a, 0x6d, 0x70, 0x5f, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, - 0x68, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4d, 0x70, 0x55, 0x6e, 0x72, - 0x65, 0x61, 0x63, 0x68, 0x4e, 0x6c, 0x72, 0x69, 0x52, 0x09, 0x6d, 0x70, 0x55, 0x6e, 0x72, 0x65, - 0x61, 0x63, 0x68, 0x1a, 0x43, 0x0a, 0x06, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, 0x39, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x69, 0x67, 0x70, 0x10, 0x01, 0x12, - 0x07, 0x0a, 0x03, 0x65, 0x67, 0x70, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x69, 0x6e, 0x63, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x42, 0x1c, 0x0a, 0x1a, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, - 0x61, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x22, 0xf6, 0x02, 0x0a, 0x1b, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x66, 0x6c, 0x61, 0x67, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x66, - 0x6c, 0x61, 0x67, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x0e, 0x66, 0x6c, 0x61, 0x67, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x66, 0x6c, 0x61, - 0x67, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, - 0x02, 0x52, 0x0b, 0x66, 0x6c, 0x61, 0x67, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x88, 0x01, - 0x01, 0x12, 0x35, 0x0a, 0x14, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, - 0x03, 0x52, 0x12, 0x66, 0x6c, 0x61, 0x67, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x20, 0x0a, 0x09, 0x72, 0x61, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x08, 0x72, 0x61, 0x77, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x66, 0x6c, - 0x61, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x66, - 0x6c, 0x61, 0x67, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0c, 0x0a, 0x0a, - 0x5f, 0x72, 0x61, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd6, 0x02, 0x0a, 0x13, 0x42, - 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x50, 0x61, - 0x74, 0x68, 0x12, 0x41, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x51, 0x0a, 0x11, 0x66, 0x6f, 0x75, 0x72, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x5f, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x46, 0x6f, 0x75, 0x72, 0x42, 0x79, - 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x0e, 0x66, 0x6f, 0x75, 0x72, 0x42, 0x79, - 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x4e, 0x0a, 0x10, 0x74, 0x77, 0x6f, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x54, 0x77, 0x6f, 0x42, - 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x0d, 0x74, 0x77, 0x6f, 0x42, 0x79, - 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x4e, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x44, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x66, - 0x6f, 0x75, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x74, 0x77, 0x6f, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, - 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x68, 0x0a, 0x21, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x46, 0x6f, 0x75, 0x72, 0x42, 0x79, - 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x43, 0x0a, 0x08, 0x73, 0x65, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x46, 0x6f, - 0x75, 0x72, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xf7, 0x01, - 0x0a, 0x22, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x46, - 0x6f, 0x75, 0x72, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x46, 0x6f, 0x75, 0x72, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, - 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, - 0x5d, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x22, 0x55, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x73, 0x65, 0x71, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x61, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x73, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x71, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x61, - 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x04, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x66, 0x0a, 0x20, 0x42, 0x67, 0x70, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x54, 0x77, - 0x6f, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x42, 0x0a, 0x08, 0x73, - 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x54, 0x77, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, - 0xf5, 0x01, 0x0a, 0x21, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x54, 0x77, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x54, 0x77, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, - 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, - 0x5d, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x22, 0x55, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x73, 0x65, 0x71, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x61, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x73, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x71, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x61, - 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x04, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x5b, 0x0a, 0x14, 0x42, 0x67, 0x70, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x34, 0x50, 0x61, 0x74, 0x68, 0x12, - 0x43, 0x0a, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x46, 0x6f, 0x75, 0x72, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, - 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd7, 0x02, 0x0a, 0x17, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0c, 0x66, 0x6f, 0x75, 0x72, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x0a, 0x66, 0x6f, 0x75, 0x72, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x88, 0x01, 0x01, 0x12, 0x23, - 0x0a, 0x0b, 0x74, 0x77, 0x6f, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x09, 0x74, 0x77, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, - 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0b, 0x69, 0x70, 0x76, - 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x44, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x3a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, - 0x0a, 0x0c, 0x66, 0x6f, 0x75, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x10, 0x01, - 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x77, 0x6f, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x10, - 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0f, 0x0a, 0x0d, - 0x5f, 0x66, 0x6f, 0x75, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x42, 0x0e, 0x0a, - 0x0c, 0x5f, 0x74, 0x77, 0x6f, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x42, 0x0f, 0x0a, - 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x7c, - 0x0a, 0x1a, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, - 0x73, 0x34, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x06, - 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, - 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, - 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xca, 0x02, 0x0a, - 0x16, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, - 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0f, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x1a, 0x90, 0x01, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x14, 0x0a, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x6e, 0x6f, 0x5f, 0x65, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x6e, 0x6f, 0x5f, 0x61, 0x64, 0x76, 0x65, - 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x6e, 0x6f, 0x5f, 0x65, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x10, - 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x6c, 0x6c, 0x67, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x10, - 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x6e, 0x6f, 0x5f, 0x6c, 0x6c, 0x67, 0x72, 0x10, 0x06, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x76, 0x0a, 0x1c, 0x42, 0x67, 0x70, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x73, 0x5f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, - 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x73, 0x5f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x22, 0xd1, 0x02, 0x0a, 0x14, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4e, 0x65, - 0x78, 0x74, 0x48, 0x6f, 0x70, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, - 0x69, 0x70, 0x76, 0x34, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, 0x88, 0x01, 0x01, - 0x12, 0x57, 0x0a, 0x12, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x74, 0x77, 0x6f, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x36, 0x54, 0x77, 0x6f, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x10, 0x69, 0x70, 0x76, 0x36, 0x54, 0x77, 0x6f, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x1a, 0x4d, 0x0a, 0x06, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x43, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, - 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, 0x02, - 0x12, 0x16, 0x0a, 0x12, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x74, 0x77, 0x6f, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x69, 0x70, 0x76, 0x36, 0x22, 0x73, 0x0a, 0x24, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, - 0x36, 0x54, 0x77, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x19, 0x0a, - 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, - 0x66, 0x69, 0x72, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0xe6, 0x02, 0x0a, 0x18, 0x42, - 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4d, 0x70, 0x52, 0x65, - 0x61, 0x63, 0x68, 0x4e, 0x6c, 0x72, 0x69, 0x12, 0x34, 0x0a, 0x08, 0x6e, 0x65, 0x78, 0x74, 0x5f, - 0x68, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4e, 0x65, 0x78, - 0x74, 0x48, 0x6f, 0x70, 0x52, 0x07, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x12, 0x46, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x4d, 0x70, 0x52, 0x65, 0x61, 0x63, 0x68, 0x4e, 0x6c, 0x72, 0x69, 0x2e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, - 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x49, 0x70, 0x76, 0x34, 0x4e, 0x4c, 0x52, 0x49, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, - 0x61, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, - 0x61, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, - 0x74, 0x1a, 0x45, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x3b, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, 0x69, - 0x63, 0x61, 0x73, 0x74, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, - 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0xb4, 0x02, 0x0a, 0x1a, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x4d, 0x70, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x4e, 0x6c, - 0x72, 0x69, 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4d, 0x70, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x4e, - 0x6c, 0x72, 0x69, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x0c, - 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x49, - 0x70, 0x76, 0x34, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x0b, 0x69, - 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x70, - 0x76, 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x49, 0x70, 0x76, - 0x36, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x0b, 0x69, 0x70, 0x76, - 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x1a, 0x45, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x3b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x69, - 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x10, 0x01, 0x12, 0x10, 0x0a, - 0x0c, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4a, 0x0a, 0x23, 0x42, 0x67, - 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x45, 0x78, 0x69, 0x74, 0x44, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x43, 0x0a, 0x1c, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, - 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x40, 0x0a, 0x19, 0x42, - 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xf1, 0x08, - 0x0a, 0x09, 0x42, 0x67, 0x70, 0x56, 0x36, 0x50, 0x65, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0c, 0x70, - 0x65, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x88, 0x01, 0x01, 0x12, 0x41, 0x0a, 0x0f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x4f, 0x0a, 0x16, 0x65, 0x76, 0x70, 0x6e, 0x5f, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, - 0x56, 0x36, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x14, 0x65, 0x76, 0x70, 0x6e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, - 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x38, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x56, 0x36, 0x50, 0x65, 0x65, 0x72, 0x2e, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x06, 0x61, 0x73, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x08, 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x0f, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x50, 0x65, 0x65, 0x72, 0x2e, 0x41, 0x73, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x69, 0x64, 0x74, 0x68, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x03, 0x52, 0x0d, 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x69, 0x64, 0x74, 0x68, - 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, - 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, - 0x64, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x5e, 0x0a, 0x1a, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x18, 0x6c, 0x65, 0x61, - 0x72, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x09, 0x76, 0x34, 0x5f, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x08, - 0x76, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x09, 0x76, 0x36, 0x5f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x08, 0x76, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x10, 0x76, - 0x34, 0x5f, 0x73, 0x72, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, - 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, - 0x72, 0x74, 0x65, 0x56, 0x34, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x76, 0x34, 0x53, - 0x72, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x10, 0x76, - 0x36, 0x5f, 0x73, 0x72, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, - 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, - 0x72, 0x74, 0x65, 0x56, 0x36, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x76, 0x36, 0x53, - 0x72, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x10, 0x67, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, - 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x47, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, - 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x0f, 0x67, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, - 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x3b, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6c, - 0x61, 0x79, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x35, 0x0a, 0x06, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, - 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x62, 0x67, 0x70, - 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x65, 0x62, 0x67, 0x70, 0x10, 0x02, 0x1a, 0x3b, 0x0a, 0x0d, - 0x41, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x69, 0x64, 0x74, 0x68, 0x22, 0x2a, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x74, 0x77, 0x6f, 0x10, 0x01, 0x12, - 0x08, 0x0a, 0x04, 0x66, 0x6f, 0x75, 0x72, 0x10, 0x02, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x70, 0x65, - 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, - 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x66, 0x0a, 0x0e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, - 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x70, 0x76, 0x36, 0x4e, 0x61, - 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, - 0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, - 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8b, 0x05, 0x0a, 0x13, 0x42, 0x67, - 0x70, 0x56, 0x36, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, - 0x67, 0x12, 0x35, 0x0a, 0x14, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, 0x70, - 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, - 0x00, 0x52, 0x12, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, - 0x74, 0x73, 0x56, 0x70, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x15, 0x72, 0x65, 0x64, 0x75, - 0x63, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x14, 0x72, 0x65, 0x64, 0x75, 0x63, - 0x65, 0x64, 0x45, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, - 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x11, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, - 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, - 0x0e, 0x63, 0x6f, 0x70, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, - 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, - 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x10, 0x6d, 0x61, 0x78, - 0x5f, 0x73, 0x69, 0x64, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x72, 0x68, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x64, 0x73, 0x50, 0x65, - 0x72, 0x53, 0x72, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4b, 0x0a, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x05, 0x52, 0x1c, 0x61, 0x75, 0x74, 0x6f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x66, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, - 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x06, 0x52, 0x10, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x66, 0x74, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x16, 0x61, 0x64, 0x76, 0x65, 0x72, - 0x74, 0x69, 0x73, 0x65, 0x5f, 0x73, 0x72, 0x5f, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x13, 0x61, 0x64, 0x76, 0x65, 0x72, - 0x74, 0x69, 0x73, 0x65, 0x53, 0x72, 0x54, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x88, 0x01, - 0x01, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, - 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x72, - 0x65, 0x64, 0x75, 0x63, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, - 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x64, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x72, 0x68, - 0x42, 0x23, 0x0a, 0x21, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x19, 0x0a, 0x17, - 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x73, 0x72, 0x5f, 0x74, 0x65, - 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xcc, 0x04, 0x0a, 0x14, 0x42, 0x67, 0x70, 0x56, - 0x36, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x42, 0x0a, 0x0b, 0x64, 0x66, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x66, - 0x45, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x64, 0x66, 0x45, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x04, 0x65, 0x76, 0x69, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x45, 0x76, - 0x70, 0x6e, 0x45, 0x76, 0x69, 0x73, 0x52, 0x04, 0x65, 0x76, 0x69, 0x73, 0x12, 0x15, 0x0a, 0x03, - 0x65, 0x73, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x65, 0x73, 0x69, - 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x6f, - 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x56, 0x36, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x73, 0x69, 0x5f, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x08, 0x65, 0x73, 0x69, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, - 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, - 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, - 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, - 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x65, - 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x27, 0x0a, - 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, - 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x48, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x3a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x11, 0x0a, - 0x0d, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x01, - 0x12, 0x0e, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x02, - 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x73, 0x69, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x73, 0x69, - 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0xba, 0x01, 0x0a, 0x0d, 0x42, 0x67, 0x70, 0x56, 0x36, - 0x45, 0x76, 0x70, 0x6e, 0x45, 0x76, 0x69, 0x73, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x56, 0x36, 0x45, 0x76, 0x70, 0x6e, 0x45, 0x76, 0x69, 0x73, 0x2e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x09, 0x65, 0x76, 0x69, 0x5f, 0x76, 0x78, 0x6c, - 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x56, 0x36, 0x45, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x08, 0x65, 0x76, - 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x1a, 0x30, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0x26, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x65, 0x76, 0x69, - 0x5f, 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0xad, 0x07, 0x0a, 0x0d, 0x42, 0x67, 0x70, 0x56, 0x36, 0x45, 0x76, 0x69, - 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x12, 0x4e, 0x0a, 0x11, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, - 0x73, 0x74, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x45, 0x76, 0x69, 0x56, - 0x78, 0x6c, 0x61, 0x6e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x44, 0x6f, 0x6d, - 0x61, 0x69, 0x6e, 0x52, 0x10, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x44, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x45, 0x76, 0x69, 0x56, 0x78, - 0x6c, 0x61, 0x6e, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x22, - 0x0a, 0x0a, 0x70, 0x6d, 0x73, 0x69, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x09, 0x70, 0x6d, 0x73, 0x69, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, - 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x07, 0x61, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, - 0x01, 0x01, 0x12, 0x4b, 0x0a, 0x13, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x74, - 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x69, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x12, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, - 0x43, 0x0a, 0x13, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, - 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x52, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x45, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x12, 0x43, 0x0a, 0x13, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x48, 0x0a, 0x16, 0x6c, 0x33, 0x5f, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x13, - 0x6c, 0x33, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x45, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x12, 0x48, 0x0a, 0x16, 0x6c, 0x33, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x09, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x13, 0x6c, 0x33, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, - 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, - 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, - 0x12, 0x33, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, - 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, - 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, - 0x74, 0x69, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, - 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x43, 0x0a, - 0x0f, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x22, 0x30, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x69, 0x6e, 0x67, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x10, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x6d, 0x73, 0x69, - 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x64, 0x5f, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x22, 0xe2, 0x01, 0x0a, 0x1c, 0x42, 0x67, 0x70, 0x56, 0x36, 0x45, 0x76, 0x69, - 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x44, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x37, 0x0a, 0x0d, 0x63, 0x6d, 0x61, 0x63, 0x5f, 0x69, 0x70, 0x5f, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x4d, 0x61, 0x63, 0x49, 0x70, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x52, 0x0b, 0x63, 0x6d, 0x61, 0x63, 0x49, 0x70, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2b, 0x0a, - 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x54, 0x61, 0x67, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x76, 0x6c, - 0x61, 0x6e, 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x10, 0x76, 0x6c, 0x61, 0x6e, 0x41, 0x77, - 0x61, 0x72, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, - 0x10, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x69, - 0x64, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x76, 0x6c, 0x61, 0x6e, 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, - 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x73, 0x0a, 0x0b, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x12, 0x31, 0x0a, 0x0a, 0x76, 0x34, 0x5f, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, - 0x09, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x31, 0x0a, 0x0a, 0x76, 0x36, - 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x52, 0x09, 0x76, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0xea, 0x01, - 0x0a, 0x0d, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, - 0x2e, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, - 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x53, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, - 0x65, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, - 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x03, 0x76, 0x6e, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x03, 0x76, 0x6e, 0x69, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x76, 0x6e, - 0x69, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xea, 0x01, 0x0a, 0x0d, 0x56, - 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2e, 0x0a, 0x10, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x53, 0x0a, 0x13, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x70, 0x5f, 0x6d, - 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x11, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x4d, 0x6f, 0x64, - 0x65, 0x12, 0x15, 0x0a, 0x03, 0x76, 0x6e, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x03, 0x76, 0x6e, 0x69, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, - 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x76, 0x6e, 0x69, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xca, 0x02, 0x0a, 0x1e, 0x56, 0x78, 0x6c, 0x61, - 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x63, - 0x61, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, - 0x69, 0x63, 0x61, 0x73, 0x74, 0x52, 0x07, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x4a, - 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x52, - 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x1a, 0x3d, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x33, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, - 0x07, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0xca, 0x02, 0x0a, 0x1e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, - 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, - 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, 0x69, 0x63, 0x61, - 0x73, 0x74, 0x52, 0x07, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x09, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, - 0x6f, 0x64, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x52, 0x09, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x1a, 0x3d, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0x33, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x75, 0x6e, - 0x69, 0x63, 0x61, 0x73, 0x74, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, - 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0x6d, 0x0a, 0x25, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, - 0x6f, 0x64, 0x65, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x05, 0x76, 0x74, - 0x65, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, - 0x69, 0x63, 0x61, 0x73, 0x74, 0x56, 0x74, 0x65, 0x70, 0x52, 0x05, 0x76, 0x74, 0x65, 0x70, 0x73, - 0x22, 0x6d, 0x0a, 0x25, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, - 0x64, 0x65, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x05, 0x76, 0x74, 0x65, - 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, - 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, 0x69, - 0x63, 0x61, 0x73, 0x74, 0x56, 0x74, 0x65, 0x70, 0x52, 0x05, 0x76, 0x74, 0x65, 0x70, 0x73, 0x22, - 0xb1, 0x01, 0x0a, 0x36, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, - 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x41, 0x72, 0x70, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x27, 0x0a, 0x0d, 0x72, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x6d, 0x5f, 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6d, 0x4d, 0x61, 0x63, - 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x6d, - 0x5f, 0x69, 0x70, 0x76, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0c, 0x72, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6d, 0x49, 0x70, 0x76, 0x34, 0x88, 0x01, 0x01, 0x42, 0x10, - 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x6d, 0x5f, 0x6d, 0x61, 0x63, - 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x6d, 0x5f, 0x69, - 0x70, 0x76, 0x34, 0x22, 0xe9, 0x01, 0x0a, 0x29, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x56, 0x74, 0x65, - 0x70, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x74, 0x65, 0x70, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x74, 0x65, 0x70, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x6f, 0x0a, 0x15, 0x61, 0x72, 0x70, 0x5f, 0x73, 0x75, - 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, - 0x6e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x41, - 0x72, 0x70, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x63, - 0x68, 0x65, 0x52, 0x13, 0x61, 0x72, 0x70, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x5f, 0x76, 0x74, 0x65, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, - 0xe9, 0x01, 0x0a, 0x29, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, - 0x64, 0x65, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x56, 0x74, 0x65, 0x70, 0x12, 0x33, 0x0a, - 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x74, 0x65, 0x70, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x74, 0x65, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, - 0x01, 0x01, 0x12, 0x6f, 0x0a, 0x15, 0x61, 0x72, 0x70, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, - 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x41, 0x72, 0x70, 0x53, 0x75, - 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x13, - 0x61, 0x72, 0x70, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, - 0x63, 0x68, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x76, - 0x74, 0x65, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x54, 0x0a, 0x27, 0x56, - 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x54, 0x0a, 0x27, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, - 0x6f, 0x64, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xba, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x52, 0x73, 0x76, 0x70, 0x12, 0x3f, 0x0a, 0x0f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x0e, 0x69, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x13, 0x6c, 0x73, 0x70, 0x5f, 0x69, - 0x70, 0x76, 0x34, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, - 0x73, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, - 0x11, 0x6c, 0x73, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, - 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xf7, 0x05, 0x0a, 0x11, 0x52, 0x73, 0x76, 0x70, 0x49, 0x70, 0x76, - 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x70, - 0x76, 0x34, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x08, 0x69, 0x70, 0x76, 0x34, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, - 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x01, 0x52, 0x0a, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x49, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x0f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x0d, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x88, 0x01, 0x01, - 0x12, 0x3d, 0x0a, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x04, 0x52, 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x72, - 0x65, 0x73, 0x68, 0x52, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, - 0x3d, 0x0a, 0x18, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x05, 0x52, 0x16, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x66, 0x72, - 0x65, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x24, - 0x0a, 0x0b, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x48, 0x06, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x74, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x07, - 0x52, 0x0f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x08, 0x52, 0x0b, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, - 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x09, 0x52, 0x0d, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x12, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x0a, 0x52, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, - 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6e, - 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x5f, 0x69, 0x70, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x5f, 0x65, 0x6e, 0x64, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x72, 0x65, - 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, - 0x0a, 0x0c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x42, 0x13, - 0x0a, 0x11, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x22, 0x81, - 0x02, 0x0a, 0x14, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x70, 0x76, 0x34, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x70, - 0x76, 0x34, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x5a, 0x0a, 0x14, 0x70, 0x32, 0x70, - 0x5f, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6c, 0x73, 0x70, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, - 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, - 0x63, 0x65, 0x50, 0x32, 0x50, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4c, - 0x73, 0x70, 0x52, 0x11, 0x70, 0x32, 0x70, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, - 0x34, 0x4c, 0x73, 0x70, 0x73, 0x12, 0x5d, 0x0a, 0x15, 0x70, 0x32, 0x70, 0x5f, 0x69, 0x6e, 0x67, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, - 0x73, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, - 0x32, 0x50, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, - 0x52, 0x12, 0x70, 0x32, 0x70, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, - 0x4c, 0x73, 0x70, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0xd0, 0x04, 0x0a, 0x24, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, - 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, 0x32, 0x50, 0x45, 0x67, - 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x12, 0x17, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x0f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x12, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x70, 0x6c, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x71, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, - 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, 0x32, - 0x50, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x2e, 0x52, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x03, 0x52, 0x10, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x46, 0x69, 0x78, 0x65, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2f, - 0x0a, 0x11, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, 0x52, 0x0f, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, - 0x5c, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x79, 0x6c, 0x65, 0x22, 0x48, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, - 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x10, - 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x03, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x15, 0x0a, 0x13, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, - 0x65, 0x72, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x42, - 0x14, 0x0a, 0x12, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc1, 0x05, 0x0a, 0x25, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, - 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, 0x32, - 0x50, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x6c, 0x73, 0x70, 0x5f, 0x69, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x05, 0x6c, 0x73, 0x70, 0x49, 0x64, 0x88, - 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x0f, - 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, - 0x01, 0x01, 0x12, 0x32, 0x0a, 0x12, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, - 0x52, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, - 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x06, 0x52, - 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x35, 0x0a, 0x14, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x6f, 0x76, 0x65, - 0x72, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x07, 0x52, - 0x12, 0x6c, 0x73, 0x70, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x6f, 0x76, 0x65, 0x72, 0x44, 0x65, - 0x6c, 0x61, 0x79, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x11, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x10, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x24, - 0x0a, 0x05, 0x74, 0x73, 0x70, 0x65, 0x63, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x54, 0x73, 0x70, 0x65, 0x63, 0x52, 0x05, 0x74, - 0x73, 0x70, 0x65, 0x63, 0x12, 0x37, 0x0a, 0x0c, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x52, 0x73, 0x76, 0x70, 0x46, 0x61, 0x73, 0x74, 0x52, 0x65, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x52, 0x0b, 0x66, 0x61, 0x73, 0x74, 0x52, 0x65, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1e, 0x0a, - 0x03, 0x65, 0x72, 0x6f, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x52, 0x73, 0x76, 0x70, 0x45, 0x72, 0x6f, 0x52, 0x03, 0x65, 0x72, 0x6f, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, - 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x73, 0x70, 0x5f, - 0x69, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x42, 0x10, - 0x0a, 0x0e, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x69, 0x64, - 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x6f, - 0x76, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x22, 0xbc, 0x06, 0x0a, 0x14, 0x52, 0x73, - 0x76, 0x70, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x12, 0x40, 0x0a, 0x1a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x17, 0x61, 0x75, 0x74, 0x6f, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, - 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0d, 0x73, 0x65, 0x74, 0x75, 0x70, 0x50, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x68, 0x6f, 0x6c, 0x64, - 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x03, 0x52, 0x0f, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x18, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, - 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x16, 0x6c, 0x6f, - 0x63, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, - 0x69, 0x72, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, - 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x15, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x69, 0x72, 0x65, - 0x64, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, - 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x06, - 0x52, 0x0e, 0x73, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, - 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x1c, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x69, - 0x72, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x1a, 0x62, 0x61, 0x6e, - 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x44, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, - 0x73, 0x69, 0x72, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x08, 0x52, 0x15, 0x6e, - 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, - 0x69, 0x72, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x61, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x66, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x65, 0x73, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, - 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x68, 0x6f, 0x6c, - 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x1b, 0x0a, - 0x19, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, - 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, 0x65, 0x5f, 0x73, 0x74, - 0x79, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x42, 0x1f, 0x0a, 0x1d, 0x5f, - 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x42, 0x1a, 0x0a, 0x18, - 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x22, 0xba, 0x01, 0x0a, 0x16, 0x52, 0x73, 0x76, - 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0b, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, - 0x6e, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x65, 0x78, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x41, 0x6e, 0x79, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x0a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x6e, 0x79, 0x88, 0x01, 0x01, 0x12, - 0x24, 0x0a, 0x0b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, - 0x6c, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x22, 0xf7, 0x02, 0x0a, 0x09, 0x52, 0x73, 0x76, 0x70, 0x54, 0x73, - 0x70, 0x65, 0x63, 0x12, 0x2f, 0x0a, 0x11, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x48, 0x00, - 0x52, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x61, 0x74, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x48, - 0x01, 0x52, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, - 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x48, 0x02, 0x52, - 0x0c, 0x70, 0x65, 0x61, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x35, 0x0a, 0x14, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x65, 0x64, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, - 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, - 0x55, 0x6e, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x69, 0x6d, - 0x75, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x88, 0x01, 0x01, 0x42, 0x14, - 0x0a, 0x12, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, - 0x72, 0x61, 0x74, 0x65, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, - 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x17, 0x0a, - 0x15, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x65, - 0x64, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, - 0x75, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x22, - 0xce, 0x04, 0x0a, 0x0f, 0x52, 0x73, 0x76, 0x70, 0x46, 0x61, 0x73, 0x74, 0x52, 0x65, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x70, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x73, - 0x65, 0x74, 0x75, 0x70, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, - 0x2e, 0x0a, 0x10, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x68, 0x6f, 0x6c, - 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, - 0x20, 0x0a, 0x09, 0x68, 0x6f, 0x70, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x08, 0x68, 0x6f, 0x70, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x21, 0x0a, 0x09, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x02, 0x48, 0x03, 0x52, 0x09, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, - 0x68, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, - 0x61, 0x6e, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x41, 0x6e, 0x79, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e, - 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x05, 0x52, 0x0a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x6e, 0x79, 0x88, 0x01, 0x01, - 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x0a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x41, 0x6c, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x19, 0x6f, 0x6e, 0x65, 0x5f, 0x74, 0x6f, - 0x5f, 0x6f, 0x6e, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x73, 0x69, - 0x72, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x15, 0x6f, 0x6e, 0x65, - 0x54, 0x6f, 0x4f, 0x6e, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x73, 0x69, 0x72, - 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x08, 0x52, 0x15, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x88, - 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x70, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, - 0x67, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x68, - 0x6f, 0x70, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x62, 0x61, 0x6e, - 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x42, 0x1c, 0x0a, 0x1a, 0x5f, 0x6f, 0x6e, 0x65, 0x5f, 0x74, - 0x6f, 0x5f, 0x6f, 0x6e, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x73, - 0x69, 0x72, 0x65, 0x64, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, - 0x22, 0xd5, 0x02, 0x0a, 0x07, 0x52, 0x73, 0x76, 0x70, 0x45, 0x72, 0x6f, 0x12, 0x58, 0x0a, 0x13, - 0x70, 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, - 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x52, 0x73, 0x76, 0x70, 0x45, 0x72, 0x6f, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x4e, - 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x49, 0x70, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x11, 0x70, 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, - 0x72, 0x49, 0x70, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, - 0x12, 0x35, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x45, - 0x72, 0x6f, 0x53, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x0a, 0x73, 0x75, 0x62, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x1a, 0x65, 0x0a, 0x11, 0x50, 0x72, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x49, 0x70, 0x22, 0x50, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x64, 0x6f, 0x6e, 0x74, 0x5f, 0x70, 0x72, - 0x65, 0x70, 0x65, 0x6e, 0x64, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x5f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x72, - 0x65, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x10, 0x03, 0x42, 0x16, - 0x0a, 0x14, 0x5f, 0x70, 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, - 0x62, 0x6f, 0x72, 0x5f, 0x69, 0x70, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc0, 0x03, 0x0a, 0x10, 0x52, 0x73, 0x76, - 0x70, 0x45, 0x72, 0x6f, 0x53, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x38, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x45, 0x72, 0x6f, 0x53, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, - 0x28, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x73, 0x5f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x08, - 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x08, 0x68, - 0x6f, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x45, 0x72, 0x6f, 0x53, 0x75, 0x62, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x48, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x04, 0x52, 0x07, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x1a, - 0x38, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x22, 0x30, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x61, 0x73, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x02, 0x1a, 0x39, 0x0a, 0x07, 0x48, 0x6f, 0x70, - 0x54, 0x79, 0x70, 0x65, 0x22, 0x2e, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x6c, 0x6f, 0x6f, - 0x73, 0x65, 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0f, 0x0a, - 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x10, - 0x0a, 0x0e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x0b, - 0x0a, 0x09, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xcc, 0x02, 0x0a, 0x04, - 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x22, 0x0a, 0x05, 0x74, 0x78, 0x5f, 0x72, 0x78, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x78, - 0x52, 0x78, 0x52, 0x04, 0x74, 0x78, 0x52, 0x78, 0x12, 0x27, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, - 0x6c, 0x6f, 0x77, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, - 0x74, 0x12, 0x34, 0x0a, 0x0d, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x61, 0x63, 0x6b, - 0x65, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, - 0x6c, 0x6f, 0x77, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x65, 0x67, 0x72, 0x65, 0x73, - 0x73, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, - 0x53, 0x69, 0x7a, 0x65, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x72, 0x61, - 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x52, 0x04, 0x72, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, - 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x07, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, - 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xd2, 0x01, 0x0a, 0x08, 0x46, - 0x6c, 0x6f, 0x77, 0x54, 0x78, 0x52, 0x78, 0x12, 0x36, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, - 0x6f, 0x77, 0x54, 0x78, 0x52, 0x78, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x21, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x04, 0x70, 0x6f, - 0x72, 0x74, 0x12, 0x27, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x72, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x37, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2d, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, - 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x79, 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1c, 0x0a, 0x07, 0x74, - 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, - 0x74, 0x78, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x72, 0x78, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x72, 0x78, - 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x78, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x78, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0a, - 0x0a, 0x08, 0x5f, 0x72, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xba, 0x01, 0x0a, 0x0a, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x04, 0x6d, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x08, 0x74, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x07, 0x74, 0x78, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x78, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x78, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x1a, 0x39, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x31, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x10, 0x01, 0x12, 0x0e, - 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6f, 0x6e, 0x65, 0x10, 0x02, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x87, 0x09, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x77, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, - 0x77, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x27, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x2d, 0x0a, 0x08, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x52, 0x08, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x76, 0x6c, 0x61, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, - 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x52, 0x04, 0x76, 0x6c, 0x61, 0x6e, 0x12, 0x24, 0x0a, 0x05, 0x76, - 0x78, 0x6c, 0x61, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x05, 0x76, 0x78, 0x6c, 0x61, - 0x6e, 0x12, 0x21, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, 0x04, - 0x69, 0x70, 0x76, 0x34, 0x12, 0x21, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, - 0x36, 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x66, 0x63, 0x70, 0x61, - 0x75, 0x73, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x52, 0x08, 0x70, 0x66, - 0x63, 0x70, 0x61, 0x75, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x70, 0x61, 0x75, 0x73, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x70, - 0x61, 0x75, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x03, 0x74, 0x63, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x52, - 0x03, 0x74, 0x63, 0x70, 0x12, 0x1e, 0x0a, 0x03, 0x75, 0x64, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x52, - 0x03, 0x75, 0x64, 0x70, 0x12, 0x1e, 0x0a, 0x03, 0x67, 0x72, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, - 0x03, 0x67, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x74, 0x70, 0x76, 0x31, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x31, 0x52, 0x05, 0x67, 0x74, 0x70, 0x76, 0x31, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x74, - 0x70, 0x76, 0x32, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x52, 0x05, 0x67, 0x74, 0x70, 0x76, 0x32, - 0x12, 0x1e, 0x0a, 0x03, 0x61, 0x72, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x52, 0x03, 0x61, 0x72, 0x70, - 0x12, 0x21, 0x0a, 0x04, 0x69, 0x63, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x52, 0x04, 0x69, - 0x63, 0x6d, 0x70, 0x12, 0x27, 0x0a, 0x06, 0x69, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, - 0x6d, 0x70, 0x76, 0x36, 0x52, 0x06, 0x69, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x12, 0x1e, 0x0a, 0x03, - 0x70, 0x70, 0x70, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x52, 0x03, 0x70, 0x70, 0x70, 0x12, 0x27, 0x0a, 0x06, - 0x69, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x52, 0x06, 0x69, - 0x67, 0x6d, 0x70, 0x76, 0x31, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x70, 0x6c, 0x73, 0x18, 0x14, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, - 0x6c, 0x73, 0x52, 0x04, 0x6d, 0x70, 0x6c, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x6e, 0x6d, 0x70, - 0x76, 0x32, 0x63, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x52, 0x07, 0x73, 0x6e, 0x6d, - 0x70, 0x76, 0x32, 0x63, 0x12, 0x21, 0x0a, 0x04, 0x72, 0x73, 0x76, 0x70, 0x18, 0x16, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, - 0x70, 0x52, 0x04, 0x72, 0x73, 0x76, 0x70, 0x1a, 0x8c, 0x02, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x81, 0x02, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x76, 0x6c, 0x61, 0x6e, 0x10, 0x03, - 0x12, 0x09, 0x0a, 0x05, 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x69, - 0x70, 0x76, 0x34, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, 0x06, 0x12, - 0x0c, 0x0a, 0x08, 0x70, 0x66, 0x63, 0x70, 0x61, 0x75, 0x73, 0x65, 0x10, 0x07, 0x12, 0x11, 0x0a, - 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x70, 0x61, 0x75, 0x73, 0x65, 0x10, 0x08, - 0x12, 0x07, 0x0a, 0x03, 0x74, 0x63, 0x70, 0x10, 0x09, 0x12, 0x07, 0x0a, 0x03, 0x75, 0x64, 0x70, - 0x10, 0x0a, 0x12, 0x07, 0x0a, 0x03, 0x67, 0x72, 0x65, 0x10, 0x0b, 0x12, 0x09, 0x0a, 0x05, 0x67, - 0x74, 0x70, 0x76, 0x31, 0x10, 0x0c, 0x12, 0x09, 0x0a, 0x05, 0x67, 0x74, 0x70, 0x76, 0x32, 0x10, - 0x0d, 0x12, 0x07, 0x0a, 0x03, 0x61, 0x72, 0x70, 0x10, 0x0e, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x63, - 0x6d, 0x70, 0x10, 0x0f, 0x12, 0x0a, 0x0a, 0x06, 0x69, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x10, 0x10, - 0x12, 0x07, 0x0a, 0x03, 0x70, 0x70, 0x70, 0x10, 0x11, 0x12, 0x0a, 0x0a, 0x06, 0x69, 0x67, 0x6d, - 0x70, 0x76, 0x31, 0x10, 0x12, 0x12, 0x08, 0x0a, 0x04, 0x6d, 0x70, 0x6c, 0x73, 0x10, 0x13, 0x12, - 0x0b, 0x0a, 0x07, 0x73, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x10, 0x14, 0x12, 0x08, 0x0a, 0x04, - 0x72, 0x73, 0x76, 0x70, 0x10, 0x15, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0x6c, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, - 0x19, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0b, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, - 0x87, 0x01, 0x0a, 0x13, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xed, 0x01, 0x0a, 0x0c, 0x46, 0x6c, - 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x03, 0x64, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x44, 0x73, 0x74, 0x52, 0x03, 0x64, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x03, 0x73, 0x72, 0x63, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x53, 0x72, 0x63, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x40, 0x0a, 0x0a, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, - 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x09, 0x65, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x66, - 0x63, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, - 0x08, 0x70, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x22, 0xc5, 0x01, 0x0a, 0x08, 0x46, 0x6c, - 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x12, 0x38, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x50, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x29, 0x0a, 0x03, 0x63, 0x66, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, - 0x6c, 0x61, 0x6e, 0x43, 0x66, 0x69, 0x52, 0x03, 0x63, 0x66, 0x69, 0x12, 0x26, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x70, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x54, 0x70, 0x69, 0x64, 0x52, 0x04, 0x74, 0x70, 0x69, - 0x64, 0x22, 0xe5, 0x01, 0x0a, 0x09, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x12, - 0x30, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, - 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x30, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x12, - 0x2a, 0x0a, 0x03, 0x76, 0x6e, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, - 0x6c, 0x61, 0x6e, 0x56, 0x6e, 0x69, 0x52, 0x03, 0x76, 0x6e, 0x69, 0x12, 0x3c, 0x0a, 0x09, 0x72, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x52, 0x09, - 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x22, 0xb2, 0x07, 0x0a, 0x08, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x12, 0x35, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, - 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x12, 0x31, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x70, - 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x34, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0b, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x4a, 0x0a, 0x0e, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x12, 0x45, 0x0a, 0x0d, 0x64, 0x6f, 0x6e, 0x74, 0x5f, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x6f, - 0x6e, 0x74, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x64, 0x6f, 0x6e, 0x74, - 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0e, 0x6d, 0x6f, 0x72, 0x65, - 0x5f, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x52, 0x0d, 0x6d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, - 0x34, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x52, - 0x0e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, - 0x40, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x69, 0x6d, 0x65, 0x54, - 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, - 0x65, 0x12, 0x38, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x4b, 0x0a, 0x0f, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, 0x63, 0x52, 0x03, - 0x73, 0x72, 0x63, 0x12, 0x29, 0x0a, 0x03, 0x64, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, 0x52, 0x03, 0x64, 0x73, 0x74, 0x12, 0x2e, - 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd0, - 0x01, 0x0a, 0x0f, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x3d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, - 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x32, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x06, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0x3f, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x35, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x72, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x15, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x32, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x38, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9a, - 0x02, 0x0a, 0x19, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x50, 0x0a, 0x0b, - 0x63, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x46, 0x6c, - 0x61, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x53, - 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x12, 0x56, 0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x0c, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xf2, 0x01, 0x0a, 0x1b, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x49, 0x0a, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, - 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x9a, 0x02, 0x0a, 0x10, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x52, 0x61, 0x77, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x22, 0x0a, 0x03, 0x74, 0x6f, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x52, 0x03, 0x74, 0x6f, 0x73, 0x12, 0x25, 0x0a, 0x04, - 0x64, 0x73, 0x63, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x52, 0x04, 0x64, - 0x73, 0x63, 0x70, 0x1a, 0x3d, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x33, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x10, 0x01, 0x12, - 0x07, 0x0a, 0x03, 0x74, 0x6f, 0x73, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x73, 0x63, 0x70, - 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x6c, 0x0a, - 0x0c, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x12, 0x2d, 0x0a, - 0x03, 0x70, 0x68, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, - 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x52, 0x03, 0x70, 0x68, 0x62, 0x12, 0x2d, 0x0a, 0x03, - 0x65, 0x63, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, - 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x52, 0x03, 0x65, 0x63, 0x6e, 0x22, 0x81, 0x03, 0x0a, 0x0b, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x12, 0x41, 0x0a, 0x0a, 0x70, - 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x32, - 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x64, 0x65, 0x6c, - 0x61, 0x79, 0x12, 0x41, 0x0a, 0x0a, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, - 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x52, 0x0a, 0x74, 0x68, 0x72, 0x6f, 0x75, - 0x67, 0x68, 0x70, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x72, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, - 0x54, 0x6f, 0x73, 0x52, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0b, - 0x72, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x08, 0x6d, - 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x4d, 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x52, 0x08, - 0x6d, 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x12, 0x35, 0x0a, 0x06, 0x75, 0x6e, 0x75, 0x73, - 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, - 0x73, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x52, 0x06, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x22, - 0xe2, 0x03, 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x12, 0x35, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x36, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x63, - 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, - 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x0c, 0x74, 0x72, - 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x66, 0x6c, - 0x6f, 0x77, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x09, 0x66, - 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x48, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x65, 0x78, - 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x09, 0x68, 0x6f, 0x70, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x48, 0x6f, 0x70, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x52, 0x08, 0x68, 0x6f, 0x70, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x29, - 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, - 0x36, 0x53, 0x72, 0x63, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x29, 0x0a, 0x03, 0x64, 0x73, 0x74, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x44, 0x73, 0x74, 0x52, - 0x03, 0x64, 0x73, 0x74, 0x22, 0xa0, 0x07, 0x0a, 0x0c, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x64, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x52, - 0x03, 0x64, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x52, 0x03, - 0x73, 0x72, 0x63, 0x12, 0x40, 0x0a, 0x0a, 0x65, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4d, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x5f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, - 0x70, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, - 0x43, 0x6f, 0x64, 0x65, 0x12, 0x59, 0x0a, 0x13, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x11, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, - 0x47, 0x0a, 0x0d, 0x70, 0x61, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x30, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x30, 0x52, 0x0b, 0x70, 0x61, 0x75, - 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x30, 0x12, 0x47, 0x0a, 0x0d, 0x70, 0x61, 0x75, 0x73, - 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x31, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x31, 0x52, 0x0b, 0x70, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x31, 0x12, 0x47, 0x0a, 0x0d, 0x70, 0x61, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x5f, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, - 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x52, 0x0b, 0x70, - 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x12, 0x47, 0x0a, 0x0d, 0x70, 0x61, - 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x33, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x33, 0x52, 0x0b, 0x70, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x33, 0x12, 0x47, 0x0a, 0x0d, 0x70, 0x61, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x5f, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, - 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, 0x52, - 0x0b, 0x70, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, 0x12, 0x47, 0x0a, 0x0d, - 0x70, 0x61, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x35, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, - 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x35, 0x52, 0x0b, 0x70, 0x61, 0x75, 0x73, 0x65, 0x43, - 0x6c, 0x61, 0x73, 0x73, 0x35, 0x12, 0x47, 0x0a, 0x0d, 0x70, 0x61, 0x75, 0x73, 0x65, 0x5f, 0x63, - 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x36, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, - 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x36, 0x52, 0x0b, 0x70, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, 0x12, 0x47, - 0x0a, 0x0d, 0x70, 0x61, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x37, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, - 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x37, 0x52, 0x0b, 0x70, 0x61, 0x75, 0x73, - 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x37, 0x22, 0xcd, 0x02, 0x0a, 0x11, 0x46, 0x6c, 0x6f, 0x77, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x12, 0x32, 0x0a, - 0x03, 0x64, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x52, 0x03, 0x64, 0x73, - 0x74, 0x12, 0x32, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, - 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x45, 0x0a, 0x0a, 0x65, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x09, 0x65, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x52, 0x0a, 0x0f, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, - 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, - 0x65, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, - 0x12, 0x35, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, +func (x *ActionProtocolBgpNotification_Choice) Reset() { + *x = ActionProtocolBgpNotification_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1303] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionProtocolBgpNotification_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionProtocolBgpNotification_Choice) ProtoMessage() {} + +func (x *ActionProtocolBgpNotification_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1303] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionProtocolBgpNotification_Choice.ProtoReflect.Descriptor instead. +func (*ActionProtocolBgpNotification_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{453, 0} +} + +type ActionProtocolBgpGracefulRestartNotification_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ActionProtocolBgpGracefulRestartNotification_Choice) Reset() { + *x = ActionProtocolBgpGracefulRestartNotification_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1304] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActionProtocolBgpGracefulRestartNotification_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionProtocolBgpGracefulRestartNotification_Choice) ProtoMessage() {} + +func (x *ActionProtocolBgpGracefulRestartNotification_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1304] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionProtocolBgpGracefulRestartNotification_Choice.ProtoReflect.Descriptor instead. +func (*ActionProtocolBgpGracefulRestartNotification_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{455, 0} +} + +type MetricsRequest_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MetricsRequest_Choice) Reset() { + *x = MetricsRequest_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1305] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetricsRequest_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetricsRequest_Choice) ProtoMessage() {} + +func (x *MetricsRequest_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1305] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetricsRequest_Choice.ProtoReflect.Descriptor instead. +func (*MetricsRequest_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{456, 0} +} + +type MetricsResponse_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MetricsResponse_Choice) Reset() { + *x = MetricsResponse_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1306] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetricsResponse_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetricsResponse_Choice) ProtoMessage() {} + +func (x *MetricsResponse_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1306] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetricsResponse_Choice.ProtoReflect.Descriptor instead. +func (*MetricsResponse_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{457, 0} +} + +type PortMetricsRequest_ColumnNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PortMetricsRequest_ColumnNames) Reset() { + *x = PortMetricsRequest_ColumnNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1307] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PortMetricsRequest_ColumnNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PortMetricsRequest_ColumnNames) ProtoMessage() {} + +func (x *PortMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1307] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PortMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. +func (*PortMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{458, 0} +} + +type PortMetric_Link struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PortMetric_Link) Reset() { + *x = PortMetric_Link{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1308] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PortMetric_Link) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PortMetric_Link) ProtoMessage() {} + +func (x *PortMetric_Link) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1308] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PortMetric_Link.ProtoReflect.Descriptor instead. +func (*PortMetric_Link) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{459, 0} +} + +type PortMetric_Capture struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PortMetric_Capture) Reset() { + *x = PortMetric_Capture{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1309] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PortMetric_Capture) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PortMetric_Capture) ProtoMessage() {} + +func (x *PortMetric_Capture) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1309] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PortMetric_Capture.ProtoReflect.Descriptor instead. +func (*PortMetric_Capture) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{459, 1} +} + +type PortMetric_Transmit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PortMetric_Transmit) Reset() { + *x = PortMetric_Transmit{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1310] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PortMetric_Transmit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PortMetric_Transmit) ProtoMessage() {} + +func (x *PortMetric_Transmit) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1310] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PortMetric_Transmit.ProtoReflect.Descriptor instead. +func (*PortMetric_Transmit) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{459, 2} +} + +type FlowMetricsRequest_MetricNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FlowMetricsRequest_MetricNames) Reset() { + *x = FlowMetricsRequest_MetricNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1311] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlowMetricsRequest_MetricNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlowMetricsRequest_MetricNames) ProtoMessage() {} + +func (x *FlowMetricsRequest_MetricNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1311] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlowMetricsRequest_MetricNames.ProtoReflect.Descriptor instead. +func (*FlowMetricsRequest_MetricNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{460, 0} +} + +type FlowTaggedMetricsFilter_MetricNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FlowTaggedMetricsFilter_MetricNames) Reset() { + *x = FlowTaggedMetricsFilter_MetricNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1312] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlowTaggedMetricsFilter_MetricNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlowTaggedMetricsFilter_MetricNames) ProtoMessage() {} + +func (x *FlowTaggedMetricsFilter_MetricNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1312] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlowTaggedMetricsFilter_MetricNames.ProtoReflect.Descriptor instead. +func (*FlowTaggedMetricsFilter_MetricNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{461, 0} +} + +type FlowMetric_Transmit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FlowMetric_Transmit) Reset() { + *x = FlowMetric_Transmit{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1313] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlowMetric_Transmit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlowMetric_Transmit) ProtoMessage() {} + +func (x *FlowMetric_Transmit) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1313] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlowMetric_Transmit.ProtoReflect.Descriptor instead. +func (*FlowMetric_Transmit) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{463, 0} +} + +type FlowMetricTagValue_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FlowMetricTagValue_Choice) Reset() { + *x = FlowMetricTagValue_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1314] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlowMetricTagValue_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlowMetricTagValue_Choice) ProtoMessage() {} + +func (x *FlowMetricTagValue_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1314] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlowMetricTagValue_Choice.ProtoReflect.Descriptor instead. +func (*FlowMetricTagValue_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{466, 0} +} + +type Bgpv4MetricsRequest_ColumnNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Bgpv4MetricsRequest_ColumnNames) Reset() { + *x = Bgpv4MetricsRequest_ColumnNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1315] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bgpv4MetricsRequest_ColumnNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bgpv4MetricsRequest_ColumnNames) ProtoMessage() {} + +func (x *Bgpv4MetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1315] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bgpv4MetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. +func (*Bgpv4MetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{469, 0} +} + +type Bgpv4Metric_SessionState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Bgpv4Metric_SessionState) Reset() { + *x = Bgpv4Metric_SessionState{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1316] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bgpv4Metric_SessionState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bgpv4Metric_SessionState) ProtoMessage() {} + +func (x *Bgpv4Metric_SessionState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1316] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bgpv4Metric_SessionState.ProtoReflect.Descriptor instead. +func (*Bgpv4Metric_SessionState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{470, 0} +} + +type Bgpv4Metric_FsmState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Bgpv4Metric_FsmState) Reset() { + *x = Bgpv4Metric_FsmState{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1317] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bgpv4Metric_FsmState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bgpv4Metric_FsmState) ProtoMessage() {} + +func (x *Bgpv4Metric_FsmState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1317] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bgpv4Metric_FsmState.ProtoReflect.Descriptor instead. +func (*Bgpv4Metric_FsmState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{470, 1} +} + +type Bgpv6MetricsRequest_ColumnNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Bgpv6MetricsRequest_ColumnNames) Reset() { + *x = Bgpv6MetricsRequest_ColumnNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1318] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bgpv6MetricsRequest_ColumnNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bgpv6MetricsRequest_ColumnNames) ProtoMessage() {} + +func (x *Bgpv6MetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1318] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bgpv6MetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. +func (*Bgpv6MetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{471, 0} +} + +type Bgpv6Metric_SessionState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Bgpv6Metric_SessionState) Reset() { + *x = Bgpv6Metric_SessionState{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1319] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bgpv6Metric_SessionState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bgpv6Metric_SessionState) ProtoMessage() {} + +func (x *Bgpv6Metric_SessionState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1319] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bgpv6Metric_SessionState.ProtoReflect.Descriptor instead. +func (*Bgpv6Metric_SessionState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{472, 0} +} + +type Bgpv6Metric_FsmState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Bgpv6Metric_FsmState) Reset() { + *x = Bgpv6Metric_FsmState{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1320] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bgpv6Metric_FsmState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bgpv6Metric_FsmState) ProtoMessage() {} + +func (x *Bgpv6Metric_FsmState) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1320] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bgpv6Metric_FsmState.ProtoReflect.Descriptor instead. +func (*Bgpv6Metric_FsmState) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{472, 1} +} + +type IsisMetricsRequest_ColumnNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *IsisMetricsRequest_ColumnNames) Reset() { + *x = IsisMetricsRequest_ColumnNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1321] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsisMetricsRequest_ColumnNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsisMetricsRequest_ColumnNames) ProtoMessage() {} + +func (x *IsisMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1321] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsisMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. +func (*IsisMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{473, 0} +} + +type LagMetricsRequest_ColumnNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LagMetricsRequest_ColumnNames) Reset() { + *x = LagMetricsRequest_ColumnNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1322] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LagMetricsRequest_ColumnNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LagMetricsRequest_ColumnNames) ProtoMessage() {} + +func (x *LagMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1322] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LagMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. +func (*LagMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{475, 0} +} + +type LagMetric_OperStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LagMetric_OperStatus) Reset() { + *x = LagMetric_OperStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1323] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LagMetric_OperStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LagMetric_OperStatus) ProtoMessage() {} + +func (x *LagMetric_OperStatus) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1323] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LagMetric_OperStatus.ProtoReflect.Descriptor instead. +func (*LagMetric_OperStatus) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{476, 0} +} + +type LacpMetricsRequest_ColumnNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LacpMetricsRequest_ColumnNames) Reset() { + *x = LacpMetricsRequest_ColumnNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1324] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LacpMetricsRequest_ColumnNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LacpMetricsRequest_ColumnNames) ProtoMessage() {} + +func (x *LacpMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1324] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LacpMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. +func (*LacpMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{477, 0} +} + +type LacpMetric_Activity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LacpMetric_Activity) Reset() { + *x = LacpMetric_Activity{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1325] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LacpMetric_Activity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LacpMetric_Activity) ProtoMessage() {} + +func (x *LacpMetric_Activity) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1325] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LacpMetric_Activity.ProtoReflect.Descriptor instead. +func (*LacpMetric_Activity) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{478, 0} +} + +type LacpMetric_Timeout struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LacpMetric_Timeout) Reset() { + *x = LacpMetric_Timeout{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1326] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LacpMetric_Timeout) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LacpMetric_Timeout) ProtoMessage() {} + +func (x *LacpMetric_Timeout) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1326] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LacpMetric_Timeout.ProtoReflect.Descriptor instead. +func (*LacpMetric_Timeout) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{478, 1} +} + +type LacpMetric_Synchronization struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LacpMetric_Synchronization) Reset() { + *x = LacpMetric_Synchronization{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1327] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LacpMetric_Synchronization) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LacpMetric_Synchronization) ProtoMessage() {} + +func (x *LacpMetric_Synchronization) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1327] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LacpMetric_Synchronization.ProtoReflect.Descriptor instead. +func (*LacpMetric_Synchronization) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{478, 2} +} + +type LldpMetricsRequest_ColumnNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LldpMetricsRequest_ColumnNames) Reset() { + *x = LldpMetricsRequest_ColumnNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1328] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LldpMetricsRequest_ColumnNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LldpMetricsRequest_ColumnNames) ProtoMessage() {} + +func (x *LldpMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1328] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LldpMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. +func (*LldpMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{479, 0} +} + +type RsvpMetricsRequest_ColumnNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RsvpMetricsRequest_ColumnNames) Reset() { + *x = RsvpMetricsRequest_ColumnNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1329] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RsvpMetricsRequest_ColumnNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RsvpMetricsRequest_ColumnNames) ProtoMessage() {} + +func (x *RsvpMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1329] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RsvpMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. +func (*RsvpMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{481, 0} +} + +type Dhcpv4ClientMetricsRequest_ColumnNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Dhcpv4ClientMetricsRequest_ColumnNames) Reset() { + *x = Dhcpv4ClientMetricsRequest_ColumnNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1330] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Dhcpv4ClientMetricsRequest_ColumnNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Dhcpv4ClientMetricsRequest_ColumnNames) ProtoMessage() {} + +func (x *Dhcpv4ClientMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1330] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Dhcpv4ClientMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. +func (*Dhcpv4ClientMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{483, 0} +} + +type Dhcpv4ServerMetricsRequest_ColumnNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Dhcpv4ServerMetricsRequest_ColumnNames) Reset() { + *x = Dhcpv4ServerMetricsRequest_ColumnNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1331] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Dhcpv4ServerMetricsRequest_ColumnNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Dhcpv4ServerMetricsRequest_ColumnNames) ProtoMessage() {} + +func (x *Dhcpv4ServerMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1331] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Dhcpv4ServerMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. +func (*Dhcpv4ServerMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{485, 0} +} + +type Dhcpv6ClientMetricsRequest_ColumnNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Dhcpv6ClientMetricsRequest_ColumnNames) Reset() { + *x = Dhcpv6ClientMetricsRequest_ColumnNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1332] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Dhcpv6ClientMetricsRequest_ColumnNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Dhcpv6ClientMetricsRequest_ColumnNames) ProtoMessage() {} + +func (x *Dhcpv6ClientMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1332] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Dhcpv6ClientMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. +func (*Dhcpv6ClientMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{487, 0} +} + +type Dhcpv6ServerMetricsRequest_ColumnNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Dhcpv6ServerMetricsRequest_ColumnNames) Reset() { + *x = Dhcpv6ServerMetricsRequest_ColumnNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1333] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Dhcpv6ServerMetricsRequest_ColumnNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Dhcpv6ServerMetricsRequest_ColumnNames) ProtoMessage() {} + +func (x *Dhcpv6ServerMetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1333] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Dhcpv6ServerMetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. +func (*Dhcpv6ServerMetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{489, 0} +} + +type Ospfv2MetricsRequest_ColumnNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Ospfv2MetricsRequest_ColumnNames) Reset() { + *x = Ospfv2MetricsRequest_ColumnNames{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1334] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Ospfv2MetricsRequest_ColumnNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ospfv2MetricsRequest_ColumnNames) ProtoMessage() {} + +func (x *Ospfv2MetricsRequest_ColumnNames) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1334] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Ospfv2MetricsRequest_ColumnNames.ProtoReflect.Descriptor instead. +func (*Ospfv2MetricsRequest_ColumnNames) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{491, 0} +} + +type StatesRequest_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StatesRequest_Choice) Reset() { + *x = StatesRequest_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1335] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatesRequest_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatesRequest_Choice) ProtoMessage() {} + +func (x *StatesRequest_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1335] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatesRequest_Choice.ProtoReflect.Descriptor instead. +func (*StatesRequest_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{493, 0} +} + +type StatesResponse_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StatesResponse_Choice) Reset() { + *x = StatesResponse_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1336] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatesResponse_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatesResponse_Choice) ProtoMessage() {} + +func (x *StatesResponse_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1336] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatesResponse_Choice.ProtoReflect.Descriptor instead. +func (*StatesResponse_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{494, 0} +} + +type BgpPrefixStateRequest_PrefixFilters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BgpPrefixStateRequest_PrefixFilters) Reset() { + *x = BgpPrefixStateRequest_PrefixFilters{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1337] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BgpPrefixStateRequest_PrefixFilters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpPrefixStateRequest_PrefixFilters) ProtoMessage() {} + +func (x *BgpPrefixStateRequest_PrefixFilters) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1337] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpPrefixStateRequest_PrefixFilters.ProtoReflect.Descriptor instead. +func (*BgpPrefixStateRequest_PrefixFilters) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{499, 0} +} + +type BgpPrefixIpv4UnicastFilter_Origin struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BgpPrefixIpv4UnicastFilter_Origin) Reset() { + *x = BgpPrefixIpv4UnicastFilter_Origin{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1338] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BgpPrefixIpv4UnicastFilter_Origin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpPrefixIpv4UnicastFilter_Origin) ProtoMessage() {} + +func (x *BgpPrefixIpv4UnicastFilter_Origin) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1338] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpPrefixIpv4UnicastFilter_Origin.ProtoReflect.Descriptor instead. +func (*BgpPrefixIpv4UnicastFilter_Origin) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{500, 0} +} + +type BgpPrefixIpv6UnicastFilter_Origin struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BgpPrefixIpv6UnicastFilter_Origin) Reset() { + *x = BgpPrefixIpv6UnicastFilter_Origin{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1339] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BgpPrefixIpv6UnicastFilter_Origin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpPrefixIpv6UnicastFilter_Origin) ProtoMessage() {} + +func (x *BgpPrefixIpv6UnicastFilter_Origin) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1339] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpPrefixIpv6UnicastFilter_Origin.ProtoReflect.Descriptor instead. +func (*BgpPrefixIpv6UnicastFilter_Origin) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{501, 0} +} + +type BgpPrefixIpv4UnicastState_Origin struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BgpPrefixIpv4UnicastState_Origin) Reset() { + *x = BgpPrefixIpv4UnicastState_Origin{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1340] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BgpPrefixIpv4UnicastState_Origin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpPrefixIpv4UnicastState_Origin) ProtoMessage() {} + +func (x *BgpPrefixIpv4UnicastState_Origin) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1340] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpPrefixIpv4UnicastState_Origin.ProtoReflect.Descriptor instead. +func (*BgpPrefixIpv4UnicastState_Origin) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{503, 0} +} + +type BgpPrefixIpv6UnicastState_Origin struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BgpPrefixIpv6UnicastState_Origin) Reset() { + *x = BgpPrefixIpv6UnicastState_Origin{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1341] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BgpPrefixIpv6UnicastState_Origin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpPrefixIpv6UnicastState_Origin) ProtoMessage() {} + +func (x *BgpPrefixIpv6UnicastState_Origin) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1341] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpPrefixIpv6UnicastState_Origin.ProtoReflect.Descriptor instead. +func (*BgpPrefixIpv6UnicastState_Origin) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{504, 0} +} + +type ResultExtendedCommunityStructured_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResultExtendedCommunityStructured_Choice) Reset() { + *x = ResultExtendedCommunityStructured_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1342] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResultExtendedCommunityStructured_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResultExtendedCommunityStructured_Choice) ProtoMessage() {} + +func (x *ResultExtendedCommunityStructured_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1342] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResultExtendedCommunityStructured_Choice.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityStructured_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{506, 0} +} + +type ResultExtendedCommunityTransitive2OctetAsType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResultExtendedCommunityTransitive2OctetAsType_Choice) Reset() { + *x = ResultExtendedCommunityTransitive2OctetAsType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1343] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResultExtendedCommunityTransitive2OctetAsType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResultExtendedCommunityTransitive2OctetAsType_Choice) ProtoMessage() {} + +func (x *ResultExtendedCommunityTransitive2OctetAsType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1343] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResultExtendedCommunityTransitive2OctetAsType_Choice.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitive2OctetAsType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{509, 0} +} + +type ResultExtendedCommunityTransitiveIpv4AddressType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResultExtendedCommunityTransitiveIpv4AddressType_Choice) Reset() { + *x = ResultExtendedCommunityTransitiveIpv4AddressType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1344] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResultExtendedCommunityTransitiveIpv4AddressType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResultExtendedCommunityTransitiveIpv4AddressType_Choice) ProtoMessage() {} + +func (x *ResultExtendedCommunityTransitiveIpv4AddressType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1344] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResultExtendedCommunityTransitiveIpv4AddressType_Choice.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitiveIpv4AddressType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{512, 0} +} + +type ResultExtendedCommunityTransitive4OctetAsType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResultExtendedCommunityTransitive4OctetAsType_Choice) Reset() { + *x = ResultExtendedCommunityTransitive4OctetAsType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1345] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResultExtendedCommunityTransitive4OctetAsType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResultExtendedCommunityTransitive4OctetAsType_Choice) ProtoMessage() {} + +func (x *ResultExtendedCommunityTransitive4OctetAsType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1345] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResultExtendedCommunityTransitive4OctetAsType_Choice.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitive4OctetAsType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{515, 0} +} + +type ResultExtendedCommunityTransitiveOpaqueType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResultExtendedCommunityTransitiveOpaqueType_Choice) Reset() { + *x = ResultExtendedCommunityTransitiveOpaqueType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1346] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResultExtendedCommunityTransitiveOpaqueType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResultExtendedCommunityTransitiveOpaqueType_Choice) ProtoMessage() {} + +func (x *ResultExtendedCommunityTransitiveOpaqueType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1346] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResultExtendedCommunityTransitiveOpaqueType_Choice.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityTransitiveOpaqueType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{518, 0} +} + +type ResultExtendedCommunityNonTransitive2OctetAsType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResultExtendedCommunityNonTransitive2OctetAsType_Choice) Reset() { + *x = ResultExtendedCommunityNonTransitive2OctetAsType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1347] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResultExtendedCommunityNonTransitive2OctetAsType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResultExtendedCommunityNonTransitive2OctetAsType_Choice) ProtoMessage() {} + +func (x *ResultExtendedCommunityNonTransitive2OctetAsType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1347] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResultExtendedCommunityNonTransitive2OctetAsType_Choice.ProtoReflect.Descriptor instead. +func (*ResultExtendedCommunityNonTransitive2OctetAsType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{520, 0} +} + +type ResultBgpCommunity_Type struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResultBgpCommunity_Type) Reset() { + *x = ResultBgpCommunity_Type{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1348] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResultBgpCommunity_Type) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResultBgpCommunity_Type) ProtoMessage() {} + +func (x *ResultBgpCommunity_Type) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1348] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResultBgpCommunity_Type.ProtoReflect.Descriptor instead. +func (*ResultBgpCommunity_Type) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{521, 0} +} + +type ResultBgpAsPathSegment_Type struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResultBgpAsPathSegment_Type) Reset() { + *x = ResultBgpAsPathSegment_Type{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1349] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResultBgpAsPathSegment_Type) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResultBgpAsPathSegment_Type) ProtoMessage() {} + +func (x *ResultBgpAsPathSegment_Type) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1349] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResultBgpAsPathSegment_Type.ProtoReflect.Descriptor instead. +func (*ResultBgpAsPathSegment_Type) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{523, 0} +} + +type IsisLspState_PduType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *IsisLspState_PduType) Reset() { + *x = IsisLspState_PduType{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1350] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsisLspState_PduType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsisLspState_PduType) ProtoMessage() {} + +func (x *IsisLspState_PduType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1350] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsisLspState_PduType.ProtoReflect.Descriptor instead. +func (*IsisLspState_PduType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{526, 0} +} + +type IsisLspV4Prefix_RedistributionType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *IsisLspV4Prefix_RedistributionType) Reset() { + *x = IsisLspV4Prefix_RedistributionType{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1351] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsisLspV4Prefix_RedistributionType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsisLspV4Prefix_RedistributionType) ProtoMessage() {} + +func (x *IsisLspV4Prefix_RedistributionType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1351] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsisLspV4Prefix_RedistributionType.ProtoReflect.Descriptor instead. +func (*IsisLspV4Prefix_RedistributionType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{535, 0} +} + +type IsisLspV4Prefix_OriginType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *IsisLspV4Prefix_OriginType) Reset() { + *x = IsisLspV4Prefix_OriginType{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1352] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsisLspV4Prefix_OriginType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsisLspV4Prefix_OriginType) ProtoMessage() {} + +func (x *IsisLspV4Prefix_OriginType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1352] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsisLspV4Prefix_OriginType.ProtoReflect.Descriptor instead. +func (*IsisLspV4Prefix_OriginType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{535, 1} +} + +type IsisLspExtendedV4Prefix_RedistributionType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *IsisLspExtendedV4Prefix_RedistributionType) Reset() { + *x = IsisLspExtendedV4Prefix_RedistributionType{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1353] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsisLspExtendedV4Prefix_RedistributionType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsisLspExtendedV4Prefix_RedistributionType) ProtoMessage() {} + +func (x *IsisLspExtendedV4Prefix_RedistributionType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1353] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsisLspExtendedV4Prefix_RedistributionType.ProtoReflect.Descriptor instead. +func (*IsisLspExtendedV4Prefix_RedistributionType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{537, 0} +} + +type IsisLspV6Prefix_RedistributionType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *IsisLspV6Prefix_RedistributionType) Reset() { + *x = IsisLspV6Prefix_RedistributionType{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1354] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsisLspV6Prefix_RedistributionType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsisLspV6Prefix_RedistributionType) ProtoMessage() {} + +func (x *IsisLspV6Prefix_RedistributionType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1354] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsisLspV6Prefix_RedistributionType.ProtoReflect.Descriptor instead. +func (*IsisLspV6Prefix_RedistributionType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{539, 0} +} + +type IsisLspV6Prefix_OriginType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *IsisLspV6Prefix_OriginType) Reset() { + *x = IsisLspV6Prefix_OriginType{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1355] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsisLspV6Prefix_OriginType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsisLspV6Prefix_OriginType) ProtoMessage() {} + +func (x *IsisLspV6Prefix_OriginType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1355] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsisLspV6Prefix_OriginType.ProtoReflect.Descriptor instead. +func (*IsisLspV6Prefix_OriginType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{539, 1} +} + +type LldpNeighborsState_ChassisIdType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LldpNeighborsState_ChassisIdType) Reset() { + *x = LldpNeighborsState_ChassisIdType{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1356] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LldpNeighborsState_ChassisIdType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LldpNeighborsState_ChassisIdType) ProtoMessage() {} + +func (x *LldpNeighborsState_ChassisIdType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1356] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LldpNeighborsState_ChassisIdType.ProtoReflect.Descriptor instead. +func (*LldpNeighborsState_ChassisIdType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{542, 0} +} + +type LldpNeighborsState_PortIdType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LldpNeighborsState_PortIdType) Reset() { + *x = LldpNeighborsState_PortIdType{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1357] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LldpNeighborsState_PortIdType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LldpNeighborsState_PortIdType) ProtoMessage() {} + +func (x *LldpNeighborsState_PortIdType) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1357] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LldpNeighborsState_PortIdType.ProtoReflect.Descriptor instead. +func (*LldpNeighborsState_PortIdType) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{542, 1} +} + +type LldpCapabilityState_CapabilityName struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LldpCapabilityState_CapabilityName) Reset() { + *x = LldpCapabilityState_CapabilityName{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1358] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LldpCapabilityState_CapabilityName) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LldpCapabilityState_CapabilityName) ProtoMessage() {} + +func (x *LldpCapabilityState_CapabilityName) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1358] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LldpCapabilityState_CapabilityName.ProtoReflect.Descriptor instead. +func (*LldpCapabilityState_CapabilityName) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{544, 0} +} + +type RsvpLspState_SessionStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RsvpLspState_SessionStatus) Reset() { + *x = RsvpLspState_SessionStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1359] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RsvpLspState_SessionStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RsvpLspState_SessionStatus) ProtoMessage() {} + +func (x *RsvpLspState_SessionStatus) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1359] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RsvpLspState_SessionStatus.ProtoReflect.Descriptor instead. +func (*RsvpLspState_SessionStatus) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{548, 0} +} + +type RsvpLspState_LastFlapReason struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RsvpLspState_LastFlapReason) Reset() { + *x = RsvpLspState_LastFlapReason{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1360] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RsvpLspState_LastFlapReason) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RsvpLspState_LastFlapReason) ProtoMessage() {} + +func (x *RsvpLspState_LastFlapReason) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1360] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RsvpLspState_LastFlapReason.ProtoReflect.Descriptor instead. +func (*RsvpLspState_LastFlapReason) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{548, 1} +} + +type RsvpLspIpv4Ero_Type struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RsvpLspIpv4Ero_Type) Reset() { + *x = RsvpLspIpv4Ero_Type{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1361] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RsvpLspIpv4Ero_Type) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RsvpLspIpv4Ero_Type) ProtoMessage() {} + +func (x *RsvpLspIpv4Ero_Type) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1361] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RsvpLspIpv4Ero_Type.ProtoReflect.Descriptor instead. +func (*RsvpLspIpv4Ero_Type) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{550, 0} +} + +type Ospfv2OpaqueLsa_Type struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Ospfv2OpaqueLsa_Type) Reset() { + *x = Ospfv2OpaqueLsa_Type{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1362] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Ospfv2OpaqueLsa_Type) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ospfv2OpaqueLsa_Type) ProtoMessage() {} + +func (x *Ospfv2OpaqueLsa_Type) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1362] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Ospfv2OpaqueLsa_Type.ProtoReflect.Descriptor instead. +func (*Ospfv2OpaqueLsa_Type) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{571, 0} +} + +type Ospfv2Link_Type struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Ospfv2Link_Type) Reset() { + *x = Ospfv2Link_Type{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1363] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Ospfv2Link_Type) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ospfv2Link_Type) ProtoMessage() {} + +func (x *Ospfv2Link_Type) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1363] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Ospfv2Link_Type.ProtoReflect.Descriptor instead. +func (*Ospfv2Link_Type) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{573, 0} +} + +type PatternFlowEthernetDst_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowEthernetDst_Choice) Reset() { + *x = PatternFlowEthernetDst_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1364] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowEthernetDst_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowEthernetDst_Choice) ProtoMessage() {} + +func (x *PatternFlowEthernetDst_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1364] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowEthernetDst_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetDst_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{577, 0} +} + +type PatternFlowEthernetSrc_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowEthernetSrc_Choice) Reset() { + *x = PatternFlowEthernetSrc_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1365] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowEthernetSrc_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowEthernetSrc_Choice) ProtoMessage() {} + +func (x *PatternFlowEthernetSrc_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1365] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowEthernetSrc_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetSrc_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{580, 0} +} + +type PatternFlowEthernetEtherType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowEthernetEtherType_Choice) Reset() { + *x = PatternFlowEthernetEtherType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1366] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowEthernetEtherType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowEthernetEtherType_Choice) ProtoMessage() {} + +func (x *PatternFlowEthernetEtherType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1366] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowEthernetEtherType_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetEtherType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{583, 0} +} + +type PatternFlowEthernetPfcQueue_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowEthernetPfcQueue_Choice) Reset() { + *x = PatternFlowEthernetPfcQueue_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1367] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowEthernetPfcQueue_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowEthernetPfcQueue_Choice) ProtoMessage() {} + +func (x *PatternFlowEthernetPfcQueue_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1367] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowEthernetPfcQueue_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPfcQueue_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{586, 0} +} + +type PatternFlowVlanPriority_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowVlanPriority_Choice) Reset() { + *x = PatternFlowVlanPriority_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1368] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowVlanPriority_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowVlanPriority_Choice) ProtoMessage() {} + +func (x *PatternFlowVlanPriority_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1368] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowVlanPriority_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanPriority_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{589, 0} +} + +type PatternFlowVlanCfi_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowVlanCfi_Choice) Reset() { + *x = PatternFlowVlanCfi_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1369] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowVlanCfi_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowVlanCfi_Choice) ProtoMessage() {} + +func (x *PatternFlowVlanCfi_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1369] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowVlanCfi_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanCfi_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{592, 0} +} + +type PatternFlowVlanId_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowVlanId_Choice) Reset() { + *x = PatternFlowVlanId_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1370] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowVlanId_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowVlanId_Choice) ProtoMessage() {} + +func (x *PatternFlowVlanId_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1370] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowVlanId_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanId_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{595, 0} +} + +type PatternFlowVlanTpid_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowVlanTpid_Choice) Reset() { + *x = PatternFlowVlanTpid_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1371] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowVlanTpid_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowVlanTpid_Choice) ProtoMessage() {} + +func (x *PatternFlowVlanTpid_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1371] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowVlanTpid_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowVlanTpid_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{598, 0} +} + +type PatternFlowVxlanFlags_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowVxlanFlags_Choice) Reset() { + *x = PatternFlowVxlanFlags_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1372] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowVxlanFlags_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowVxlanFlags_Choice) ProtoMessage() {} + +func (x *PatternFlowVxlanFlags_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1372] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowVxlanFlags_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanFlags_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{601, 0} +} + +type PatternFlowVxlanReserved0_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowVxlanReserved0_Choice) Reset() { + *x = PatternFlowVxlanReserved0_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1373] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowVxlanReserved0_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowVxlanReserved0_Choice) ProtoMessage() {} + +func (x *PatternFlowVxlanReserved0_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1373] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowVxlanReserved0_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanReserved0_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{604, 0} +} + +type PatternFlowVxlanVni_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowVxlanVni_Choice) Reset() { + *x = PatternFlowVxlanVni_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1374] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowVxlanVni_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowVxlanVni_Choice) ProtoMessage() {} + +func (x *PatternFlowVxlanVni_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1374] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowVxlanVni_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanVni_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{607, 0} +} + +type PatternFlowVxlanReserved1_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowVxlanReserved1_Choice) Reset() { + *x = PatternFlowVxlanReserved1_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1375] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowVxlanReserved1_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowVxlanReserved1_Choice) ProtoMessage() {} + +func (x *PatternFlowVxlanReserved1_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1375] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowVxlanReserved1_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowVxlanReserved1_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{610, 0} +} + +type PatternFlowIpv4Version_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4Version_Choice) Reset() { + *x = PatternFlowIpv4Version_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1376] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4Version_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4Version_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4Version_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1376] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4Version_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4Version_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{613, 0} +} + +type PatternFlowIpv4HeaderLength_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4HeaderLength_Choice) Reset() { + *x = PatternFlowIpv4HeaderLength_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1377] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4HeaderLength_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4HeaderLength_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4HeaderLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1377] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4HeaderLength_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4HeaderLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{616, 0} +} + +type PatternFlowIpv4TotalLength_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4TotalLength_Choice) Reset() { + *x = PatternFlowIpv4TotalLength_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1378] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4TotalLength_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4TotalLength_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4TotalLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1378] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4TotalLength_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TotalLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{619, 0} +} + +type PatternFlowIpv4Identification_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4Identification_Choice) Reset() { + *x = PatternFlowIpv4Identification_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1379] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4Identification_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4Identification_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4Identification_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1379] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4Identification_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4Identification_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{622, 0} +} + +type PatternFlowIpv4Reserved_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4Reserved_Choice) Reset() { + *x = PatternFlowIpv4Reserved_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1380] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4Reserved_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4Reserved_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4Reserved_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1380] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4Reserved_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4Reserved_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{625, 0} +} + +type PatternFlowIpv4DontFragment_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4DontFragment_Choice) Reset() { + *x = PatternFlowIpv4DontFragment_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1381] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4DontFragment_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4DontFragment_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4DontFragment_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1381] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4DontFragment_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DontFragment_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{628, 0} +} + +type PatternFlowIpv4MoreFragments_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4MoreFragments_Choice) Reset() { + *x = PatternFlowIpv4MoreFragments_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1382] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4MoreFragments_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4MoreFragments_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4MoreFragments_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1382] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4MoreFragments_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4MoreFragments_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{631, 0} +} + +type PatternFlowIpv4FragmentOffset_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4FragmentOffset_Choice) Reset() { + *x = PatternFlowIpv4FragmentOffset_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1383] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4FragmentOffset_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4FragmentOffset_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4FragmentOffset_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1383] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4FragmentOffset_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4FragmentOffset_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{634, 0} +} + +type PatternFlowIpv4TimeToLive_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4TimeToLive_Choice) Reset() { + *x = PatternFlowIpv4TimeToLive_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1384] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4TimeToLive_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4TimeToLive_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4TimeToLive_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1384] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4TimeToLive_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TimeToLive_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{637, 0} +} + +type PatternFlowIpv4Protocol_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4Protocol_Choice) Reset() { + *x = PatternFlowIpv4Protocol_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1385] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4Protocol_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4Protocol_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4Protocol_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1385] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4Protocol_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4Protocol_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{640, 0} +} + +type PatternFlowIpv4HeaderChecksum_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4HeaderChecksum_Choice) Reset() { + *x = PatternFlowIpv4HeaderChecksum_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1386] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4HeaderChecksum_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4HeaderChecksum_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4HeaderChecksum_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1386] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4HeaderChecksum_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4HeaderChecksum_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{641, 0} +} + +type PatternFlowIpv4HeaderChecksum_Generated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4HeaderChecksum_Generated) Reset() { + *x = PatternFlowIpv4HeaderChecksum_Generated{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1387] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4HeaderChecksum_Generated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4HeaderChecksum_Generated) ProtoMessage() {} + +func (x *PatternFlowIpv4HeaderChecksum_Generated) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1387] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4HeaderChecksum_Generated.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4HeaderChecksum_Generated) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{641, 1} +} + +type PatternFlowIpv4Src_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4Src_Choice) Reset() { + *x = PatternFlowIpv4Src_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1388] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4Src_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4Src_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4Src_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1388] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4Src_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4Src_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{645, 0} +} + +type PatternFlowIpv4Dst_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4Dst_Choice) Reset() { + *x = PatternFlowIpv4Dst_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1389] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4Dst_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4Dst_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4Dst_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1389] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4Dst_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4Dst_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{649, 0} +} + +type PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice) Reset() { + *x = PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1390] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1390] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{651, 0} +} + +type PatternFlowIpv4OptionsCustomTypeOptionClass_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4OptionsCustomTypeOptionClass_Choice) Reset() { + *x = PatternFlowIpv4OptionsCustomTypeOptionClass_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1391] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4OptionsCustomTypeOptionClass_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4OptionsCustomTypeOptionClass_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4OptionsCustomTypeOptionClass_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1391] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4OptionsCustomTypeOptionClass_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4OptionsCustomTypeOptionClass_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{653, 0} +} + +type PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice) Reset() { + *x = PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1392] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1392] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{655, 0} +} + +type PatternFlowIpv4PriorityRaw_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4PriorityRaw_Choice) Reset() { + *x = PatternFlowIpv4PriorityRaw_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1393] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4PriorityRaw_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4PriorityRaw_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4PriorityRaw_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1393] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4PriorityRaw_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4PriorityRaw_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{658, 0} +} + +type PatternFlowIpv4DscpPhb_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4DscpPhb_Choice) Reset() { + *x = PatternFlowIpv4DscpPhb_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1394] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4DscpPhb_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4DscpPhb_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4DscpPhb_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1394] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4DscpPhb_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DscpPhb_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{661, 0} +} + +type PatternFlowIpv4DscpEcn_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4DscpEcn_Choice) Reset() { + *x = PatternFlowIpv4DscpEcn_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1395] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4DscpEcn_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4DscpEcn_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4DscpEcn_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1395] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4DscpEcn_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4DscpEcn_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{664, 0} +} + +type PatternFlowIpv4TosPrecedence_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4TosPrecedence_Choice) Reset() { + *x = PatternFlowIpv4TosPrecedence_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1396] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4TosPrecedence_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4TosPrecedence_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4TosPrecedence_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1396] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4TosPrecedence_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosPrecedence_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{667, 0} +} + +type PatternFlowIpv4TosDelay_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4TosDelay_Choice) Reset() { + *x = PatternFlowIpv4TosDelay_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1397] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4TosDelay_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4TosDelay_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4TosDelay_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1397] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4TosDelay_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosDelay_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{670, 0} +} + +type PatternFlowIpv4TosThroughput_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4TosThroughput_Choice) Reset() { + *x = PatternFlowIpv4TosThroughput_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1398] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4TosThroughput_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4TosThroughput_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4TosThroughput_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1398] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4TosThroughput_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosThroughput_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{673, 0} +} + +type PatternFlowIpv4TosReliability_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4TosReliability_Choice) Reset() { + *x = PatternFlowIpv4TosReliability_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1399] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4TosReliability_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4TosReliability_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4TosReliability_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1399] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4TosReliability_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosReliability_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{676, 0} +} + +type PatternFlowIpv4TosMonetary_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4TosMonetary_Choice) Reset() { + *x = PatternFlowIpv4TosMonetary_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1400] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4TosMonetary_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4TosMonetary_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4TosMonetary_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1400] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4TosMonetary_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosMonetary_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{679, 0} +} + +type PatternFlowIpv4TosUnused_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv4TosUnused_Choice) Reset() { + *x = PatternFlowIpv4TosUnused_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1401] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv4TosUnused_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv4TosUnused_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv4TosUnused_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1401] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv4TosUnused_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv4TosUnused_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{682, 0} +} + +type PatternFlowIpv6Version_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv6Version_Choice) Reset() { + *x = PatternFlowIpv6Version_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1402] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv6Version_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv6Version_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv6Version_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1402] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv6Version_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6Version_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{685, 0} +} + +type PatternFlowIpv6TrafficClass_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv6TrafficClass_Choice) Reset() { + *x = PatternFlowIpv6TrafficClass_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1403] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv6TrafficClass_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv6TrafficClass_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv6TrafficClass_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1403] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv6TrafficClass_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6TrafficClass_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{688, 0} +} + +type PatternFlowIpv6FlowLabel_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv6FlowLabel_Choice) Reset() { + *x = PatternFlowIpv6FlowLabel_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1404] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv6FlowLabel_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv6FlowLabel_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv6FlowLabel_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1404] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv6FlowLabel_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6FlowLabel_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{692, 0} +} + +type PatternFlowIpv6PayloadLength_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv6PayloadLength_Choice) Reset() { + *x = PatternFlowIpv6PayloadLength_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1405] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv6PayloadLength_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv6PayloadLength_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv6PayloadLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1405] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv6PayloadLength_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6PayloadLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{695, 0} +} + +type PatternFlowIpv6NextHeader_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv6NextHeader_Choice) Reset() { + *x = PatternFlowIpv6NextHeader_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1406] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv6NextHeader_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv6NextHeader_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv6NextHeader_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1406] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv6NextHeader_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6NextHeader_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{698, 0} +} + +type PatternFlowIpv6HopLimit_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv6HopLimit_Choice) Reset() { + *x = PatternFlowIpv6HopLimit_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1407] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv6HopLimit_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv6HopLimit_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv6HopLimit_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1407] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv6HopLimit_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6HopLimit_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{701, 0} +} + +type PatternFlowIpv6Src_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv6Src_Choice) Reset() { + *x = PatternFlowIpv6Src_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1408] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv6Src_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv6Src_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv6Src_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1408] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv6Src_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6Src_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{704, 0} +} + +type PatternFlowIpv6Dst_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIpv6Dst_Choice) Reset() { + *x = PatternFlowIpv6Dst_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1409] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIpv6Dst_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIpv6Dst_Choice) ProtoMessage() {} + +func (x *PatternFlowIpv6Dst_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1409] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIpv6Dst_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIpv6Dst_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{707, 0} +} + +type PatternFlowPfcPauseDst_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPfcPauseDst_Choice) Reset() { + *x = PatternFlowPfcPauseDst_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1410] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPfcPauseDst_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPfcPauseDst_Choice) ProtoMessage() {} + +func (x *PatternFlowPfcPauseDst_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1410] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPfcPauseDst_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseDst_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{710, 0} +} + +type PatternFlowPfcPauseSrc_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPfcPauseSrc_Choice) Reset() { + *x = PatternFlowPfcPauseSrc_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1411] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPfcPauseSrc_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPfcPauseSrc_Choice) ProtoMessage() {} + +func (x *PatternFlowPfcPauseSrc_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1411] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPfcPauseSrc_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseSrc_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{713, 0} +} + +type PatternFlowPfcPauseEtherType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPfcPauseEtherType_Choice) Reset() { + *x = PatternFlowPfcPauseEtherType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1412] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPfcPauseEtherType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPfcPauseEtherType_Choice) ProtoMessage() {} + +func (x *PatternFlowPfcPauseEtherType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1412] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPfcPauseEtherType_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseEtherType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{716, 0} +} + +type PatternFlowPfcPauseControlOpCode_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPfcPauseControlOpCode_Choice) Reset() { + *x = PatternFlowPfcPauseControlOpCode_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1413] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPfcPauseControlOpCode_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPfcPauseControlOpCode_Choice) ProtoMessage() {} + +func (x *PatternFlowPfcPauseControlOpCode_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1413] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPfcPauseControlOpCode_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseControlOpCode_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{719, 0} +} + +type PatternFlowPfcPauseClassEnableVector_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPfcPauseClassEnableVector_Choice) Reset() { + *x = PatternFlowPfcPauseClassEnableVector_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1414] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPfcPauseClassEnableVector_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPfcPauseClassEnableVector_Choice) ProtoMessage() {} + +func (x *PatternFlowPfcPauseClassEnableVector_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1414] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPfcPauseClassEnableVector_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPauseClassEnableVector_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{722, 0} +} + +type PatternFlowPfcPausePauseClass0_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPfcPausePauseClass0_Choice) Reset() { + *x = PatternFlowPfcPausePauseClass0_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1415] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPfcPausePauseClass0_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPfcPausePauseClass0_Choice) ProtoMessage() {} + +func (x *PatternFlowPfcPausePauseClass0_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1415] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPfcPausePauseClass0_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass0_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{725, 0} +} + +type PatternFlowPfcPausePauseClass1_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPfcPausePauseClass1_Choice) Reset() { + *x = PatternFlowPfcPausePauseClass1_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1416] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPfcPausePauseClass1_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPfcPausePauseClass1_Choice) ProtoMessage() {} + +func (x *PatternFlowPfcPausePauseClass1_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1416] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPfcPausePauseClass1_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass1_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{728, 0} +} + +type PatternFlowPfcPausePauseClass2_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPfcPausePauseClass2_Choice) Reset() { + *x = PatternFlowPfcPausePauseClass2_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1417] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPfcPausePauseClass2_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPfcPausePauseClass2_Choice) ProtoMessage() {} + +func (x *PatternFlowPfcPausePauseClass2_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1417] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPfcPausePauseClass2_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass2_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{731, 0} +} + +type PatternFlowPfcPausePauseClass3_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPfcPausePauseClass3_Choice) Reset() { + *x = PatternFlowPfcPausePauseClass3_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1418] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPfcPausePauseClass3_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPfcPausePauseClass3_Choice) ProtoMessage() {} + +func (x *PatternFlowPfcPausePauseClass3_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1418] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPfcPausePauseClass3_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass3_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{734, 0} +} + +type PatternFlowPfcPausePauseClass4_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPfcPausePauseClass4_Choice) Reset() { + *x = PatternFlowPfcPausePauseClass4_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1419] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPfcPausePauseClass4_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPfcPausePauseClass4_Choice) ProtoMessage() {} + +func (x *PatternFlowPfcPausePauseClass4_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1419] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPfcPausePauseClass4_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass4_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{737, 0} +} + +type PatternFlowPfcPausePauseClass5_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPfcPausePauseClass5_Choice) Reset() { + *x = PatternFlowPfcPausePauseClass5_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1420] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPfcPausePauseClass5_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPfcPausePauseClass5_Choice) ProtoMessage() {} + +func (x *PatternFlowPfcPausePauseClass5_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1420] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPfcPausePauseClass5_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass5_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{740, 0} +} + +type PatternFlowPfcPausePauseClass6_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPfcPausePauseClass6_Choice) Reset() { + *x = PatternFlowPfcPausePauseClass6_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1421] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPfcPausePauseClass6_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPfcPausePauseClass6_Choice) ProtoMessage() {} + +func (x *PatternFlowPfcPausePauseClass6_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1421] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPfcPausePauseClass6_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass6_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{743, 0} +} + +type PatternFlowPfcPausePauseClass7_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPfcPausePauseClass7_Choice) Reset() { + *x = PatternFlowPfcPausePauseClass7_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1422] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPfcPausePauseClass7_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPfcPausePauseClass7_Choice) ProtoMessage() {} + +func (x *PatternFlowPfcPausePauseClass7_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1422] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPfcPausePauseClass7_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPfcPausePauseClass7_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{746, 0} +} + +type PatternFlowEthernetPauseDst_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowEthernetPauseDst_Choice) Reset() { + *x = PatternFlowEthernetPauseDst_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1423] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowEthernetPauseDst_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowEthernetPauseDst_Choice) ProtoMessage() {} + +func (x *PatternFlowEthernetPauseDst_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1423] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowEthernetPauseDst_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseDst_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{749, 0} +} + +type PatternFlowEthernetPauseSrc_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowEthernetPauseSrc_Choice) Reset() { + *x = PatternFlowEthernetPauseSrc_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1424] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowEthernetPauseSrc_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowEthernetPauseSrc_Choice) ProtoMessage() {} + +func (x *PatternFlowEthernetPauseSrc_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1424] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowEthernetPauseSrc_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseSrc_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{752, 0} +} + +type PatternFlowEthernetPauseEtherType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowEthernetPauseEtherType_Choice) Reset() { + *x = PatternFlowEthernetPauseEtherType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1425] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowEthernetPauseEtherType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowEthernetPauseEtherType_Choice) ProtoMessage() {} + +func (x *PatternFlowEthernetPauseEtherType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1425] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowEthernetPauseEtherType_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseEtherType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{755, 0} +} + +type PatternFlowEthernetPauseControlOpCode_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowEthernetPauseControlOpCode_Choice) Reset() { + *x = PatternFlowEthernetPauseControlOpCode_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1426] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowEthernetPauseControlOpCode_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowEthernetPauseControlOpCode_Choice) ProtoMessage() {} + +func (x *PatternFlowEthernetPauseControlOpCode_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1426] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowEthernetPauseControlOpCode_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseControlOpCode_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{758, 0} +} + +type PatternFlowEthernetPauseTime_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowEthernetPauseTime_Choice) Reset() { + *x = PatternFlowEthernetPauseTime_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1427] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowEthernetPauseTime_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowEthernetPauseTime_Choice) ProtoMessage() {} + +func (x *PatternFlowEthernetPauseTime_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1427] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowEthernetPauseTime_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowEthernetPauseTime_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{761, 0} +} + +type PatternFlowTcpSrcPort_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpSrcPort_Choice) Reset() { + *x = PatternFlowTcpSrcPort_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1428] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpSrcPort_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpSrcPort_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpSrcPort_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1428] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpSrcPort_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpSrcPort_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{765, 0} +} + +type PatternFlowTcpDstPort_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpDstPort_Choice) Reset() { + *x = PatternFlowTcpDstPort_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1429] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpDstPort_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpDstPort_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpDstPort_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1429] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpDstPort_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpDstPort_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{769, 0} +} + +type PatternFlowTcpSeqNum_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpSeqNum_Choice) Reset() { + *x = PatternFlowTcpSeqNum_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1430] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpSeqNum_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpSeqNum_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpSeqNum_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1430] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpSeqNum_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpSeqNum_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{772, 0} +} + +type PatternFlowTcpAckNum_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpAckNum_Choice) Reset() { + *x = PatternFlowTcpAckNum_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1431] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpAckNum_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpAckNum_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpAckNum_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1431] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpAckNum_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpAckNum_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{775, 0} +} + +type PatternFlowTcpDataOffset_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpDataOffset_Choice) Reset() { + *x = PatternFlowTcpDataOffset_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1432] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpDataOffset_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpDataOffset_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpDataOffset_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1432] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpDataOffset_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpDataOffset_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{778, 0} +} + +type PatternFlowTcpEcnNs_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpEcnNs_Choice) Reset() { + *x = PatternFlowTcpEcnNs_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1433] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpEcnNs_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpEcnNs_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpEcnNs_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1433] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpEcnNs_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpEcnNs_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{781, 0} +} + +type PatternFlowTcpEcnCwr_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpEcnCwr_Choice) Reset() { + *x = PatternFlowTcpEcnCwr_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1434] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpEcnCwr_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpEcnCwr_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpEcnCwr_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1434] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpEcnCwr_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpEcnCwr_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{784, 0} +} + +type PatternFlowTcpEcnEcho_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpEcnEcho_Choice) Reset() { + *x = PatternFlowTcpEcnEcho_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1435] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpEcnEcho_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpEcnEcho_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpEcnEcho_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1435] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpEcnEcho_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpEcnEcho_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{787, 0} +} + +type PatternFlowTcpCtlUrg_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpCtlUrg_Choice) Reset() { + *x = PatternFlowTcpCtlUrg_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1436] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpCtlUrg_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpCtlUrg_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpCtlUrg_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1436] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpCtlUrg_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlUrg_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{790, 0} +} + +type PatternFlowTcpCtlAck_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpCtlAck_Choice) Reset() { + *x = PatternFlowTcpCtlAck_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1437] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpCtlAck_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpCtlAck_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpCtlAck_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1437] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpCtlAck_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlAck_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{793, 0} +} + +type PatternFlowTcpCtlPsh_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpCtlPsh_Choice) Reset() { + *x = PatternFlowTcpCtlPsh_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1438] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpCtlPsh_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpCtlPsh_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpCtlPsh_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1438] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpCtlPsh_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlPsh_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{796, 0} +} + +type PatternFlowTcpCtlRst_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpCtlRst_Choice) Reset() { + *x = PatternFlowTcpCtlRst_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1439] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpCtlRst_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpCtlRst_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpCtlRst_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1439] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpCtlRst_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlRst_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{799, 0} +} + +type PatternFlowTcpCtlSyn_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpCtlSyn_Choice) Reset() { + *x = PatternFlowTcpCtlSyn_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1440] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpCtlSyn_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpCtlSyn_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpCtlSyn_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1440] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpCtlSyn_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlSyn_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{802, 0} +} + +type PatternFlowTcpCtlFin_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpCtlFin_Choice) Reset() { + *x = PatternFlowTcpCtlFin_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1441] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpCtlFin_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpCtlFin_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpCtlFin_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1441] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpCtlFin_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpCtlFin_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{805, 0} +} + +type PatternFlowTcpWindow_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpWindow_Choice) Reset() { + *x = PatternFlowTcpWindow_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1442] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpWindow_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpWindow_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpWindow_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1442] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpWindow_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpWindow_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{808, 0} +} + +type PatternFlowTcpChecksum_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpChecksum_Choice) Reset() { + *x = PatternFlowTcpChecksum_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1443] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpChecksum_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpChecksum_Choice) ProtoMessage() {} + +func (x *PatternFlowTcpChecksum_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1443] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpChecksum_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpChecksum_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{809, 0} +} + +type PatternFlowTcpChecksum_Generated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowTcpChecksum_Generated) Reset() { + *x = PatternFlowTcpChecksum_Generated{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1444] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowTcpChecksum_Generated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowTcpChecksum_Generated) ProtoMessage() {} + +func (x *PatternFlowTcpChecksum_Generated) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1444] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowTcpChecksum_Generated.ProtoReflect.Descriptor instead. +func (*PatternFlowTcpChecksum_Generated) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{809, 1} +} + +type PatternFlowUdpSrcPort_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowUdpSrcPort_Choice) Reset() { + *x = PatternFlowUdpSrcPort_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1445] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowUdpSrcPort_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowUdpSrcPort_Choice) ProtoMessage() {} + +func (x *PatternFlowUdpSrcPort_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1445] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowUdpSrcPort_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpSrcPort_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{813, 0} +} + +type PatternFlowUdpDstPort_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowUdpDstPort_Choice) Reset() { + *x = PatternFlowUdpDstPort_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1446] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowUdpDstPort_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowUdpDstPort_Choice) ProtoMessage() {} + +func (x *PatternFlowUdpDstPort_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1446] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowUdpDstPort_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpDstPort_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{817, 0} +} + +type PatternFlowUdpLength_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowUdpLength_Choice) Reset() { + *x = PatternFlowUdpLength_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1447] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowUdpLength_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowUdpLength_Choice) ProtoMessage() {} + +func (x *PatternFlowUdpLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1447] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowUdpLength_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{820, 0} +} + +type PatternFlowUdpChecksum_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowUdpChecksum_Choice) Reset() { + *x = PatternFlowUdpChecksum_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1448] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowUdpChecksum_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowUdpChecksum_Choice) ProtoMessage() {} + +func (x *PatternFlowUdpChecksum_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1448] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowUdpChecksum_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpChecksum_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{821, 0} +} + +type PatternFlowUdpChecksum_Generated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowUdpChecksum_Generated) Reset() { + *x = PatternFlowUdpChecksum_Generated{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1449] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowUdpChecksum_Generated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowUdpChecksum_Generated) ProtoMessage() {} + +func (x *PatternFlowUdpChecksum_Generated) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1449] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowUdpChecksum_Generated.ProtoReflect.Descriptor instead. +func (*PatternFlowUdpChecksum_Generated) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{821, 1} +} + +type PatternFlowGreChecksumPresent_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGreChecksumPresent_Choice) Reset() { + *x = PatternFlowGreChecksumPresent_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1450] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGreChecksumPresent_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGreChecksumPresent_Choice) ProtoMessage() {} + +func (x *PatternFlowGreChecksumPresent_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1450] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGreChecksumPresent_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGreChecksumPresent_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{824, 0} +} + +type PatternFlowGreReserved0_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGreReserved0_Choice) Reset() { + *x = PatternFlowGreReserved0_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1451] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGreReserved0_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGreReserved0_Choice) ProtoMessage() {} + +func (x *PatternFlowGreReserved0_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1451] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGreReserved0_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGreReserved0_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{827, 0} +} + +type PatternFlowGreVersion_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGreVersion_Choice) Reset() { + *x = PatternFlowGreVersion_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1452] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGreVersion_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGreVersion_Choice) ProtoMessage() {} + +func (x *PatternFlowGreVersion_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1452] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGreVersion_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGreVersion_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{830, 0} +} + +type PatternFlowGreProtocol_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGreProtocol_Choice) Reset() { + *x = PatternFlowGreProtocol_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1453] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGreProtocol_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGreProtocol_Choice) ProtoMessage() {} + +func (x *PatternFlowGreProtocol_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1453] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGreProtocol_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGreProtocol_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{833, 0} +} + +type PatternFlowGreChecksum_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGreChecksum_Choice) Reset() { + *x = PatternFlowGreChecksum_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1454] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGreChecksum_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGreChecksum_Choice) ProtoMessage() {} + +func (x *PatternFlowGreChecksum_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1454] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGreChecksum_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGreChecksum_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{834, 0} +} + +type PatternFlowGreChecksum_Generated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGreChecksum_Generated) Reset() { + *x = PatternFlowGreChecksum_Generated{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1455] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGreChecksum_Generated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGreChecksum_Generated) ProtoMessage() {} + +func (x *PatternFlowGreChecksum_Generated) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1455] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGreChecksum_Generated.ProtoReflect.Descriptor instead. +func (*PatternFlowGreChecksum_Generated) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{834, 1} +} + +type PatternFlowGreReserved1_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGreReserved1_Choice) Reset() { + *x = PatternFlowGreReserved1_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1456] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGreReserved1_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGreReserved1_Choice) ProtoMessage() {} + +func (x *PatternFlowGreReserved1_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1456] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGreReserved1_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGreReserved1_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{837, 0} +} + +type PatternFlowGtpv1Version_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv1Version_Choice) Reset() { + *x = PatternFlowGtpv1Version_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1457] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1Version_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1Version_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv1Version_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1457] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1Version_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1Version_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{840, 0} +} + +type PatternFlowGtpv1ProtocolType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv1ProtocolType_Choice) Reset() { + *x = PatternFlowGtpv1ProtocolType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1458] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1ProtocolType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1ProtocolType_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv1ProtocolType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1458] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1ProtocolType_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1ProtocolType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{843, 0} +} + +type PatternFlowGtpv1Reserved_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv1Reserved_Choice) Reset() { + *x = PatternFlowGtpv1Reserved_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1459] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1Reserved_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1Reserved_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv1Reserved_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1459] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1Reserved_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1Reserved_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{846, 0} +} + +type PatternFlowGtpv1EFlag_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv1EFlag_Choice) Reset() { + *x = PatternFlowGtpv1EFlag_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1460] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1EFlag_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1EFlag_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv1EFlag_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1460] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1EFlag_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1EFlag_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{849, 0} +} + +type PatternFlowGtpv1SFlag_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv1SFlag_Choice) Reset() { + *x = PatternFlowGtpv1SFlag_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1461] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1SFlag_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1SFlag_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv1SFlag_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1461] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1SFlag_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1SFlag_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{852, 0} +} + +type PatternFlowGtpv1PnFlag_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv1PnFlag_Choice) Reset() { + *x = PatternFlowGtpv1PnFlag_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1462] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1PnFlag_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1PnFlag_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv1PnFlag_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1462] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1PnFlag_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1PnFlag_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{855, 0} +} + +type PatternFlowGtpv1MessageType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv1MessageType_Choice) Reset() { + *x = PatternFlowGtpv1MessageType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1463] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1MessageType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1MessageType_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv1MessageType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1463] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1MessageType_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1MessageType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{858, 0} +} + +type PatternFlowGtpv1MessageLength_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv1MessageLength_Choice) Reset() { + *x = PatternFlowGtpv1MessageLength_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1464] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1MessageLength_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1MessageLength_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv1MessageLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1464] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1MessageLength_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1MessageLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{861, 0} +} + +type PatternFlowGtpv1Teid_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv1Teid_Choice) Reset() { + *x = PatternFlowGtpv1Teid_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1465] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1Teid_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1Teid_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv1Teid_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1465] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1Teid_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1Teid_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{864, 0} +} + +type PatternFlowGtpv1SquenceNumber_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv1SquenceNumber_Choice) Reset() { + *x = PatternFlowGtpv1SquenceNumber_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1466] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1SquenceNumber_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1SquenceNumber_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv1SquenceNumber_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1466] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1SquenceNumber_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1SquenceNumber_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{867, 0} +} + +type PatternFlowGtpv1NPduNumber_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv1NPduNumber_Choice) Reset() { + *x = PatternFlowGtpv1NPduNumber_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1467] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1NPduNumber_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1NPduNumber_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv1NPduNumber_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1467] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1NPduNumber_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1NPduNumber_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{870, 0} +} + +type PatternFlowGtpv1NextExtensionHeaderType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv1NextExtensionHeaderType_Choice) Reset() { + *x = PatternFlowGtpv1NextExtensionHeaderType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1468] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv1NextExtensionHeaderType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv1NextExtensionHeaderType_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv1NextExtensionHeaderType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1468] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv1NextExtensionHeaderType_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv1NextExtensionHeaderType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{873, 0} +} + +type PatternFlowGtpExtensionExtensionLength_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpExtensionExtensionLength_Choice) Reset() { + *x = PatternFlowGtpExtensionExtensionLength_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1469] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpExtensionExtensionLength_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpExtensionExtensionLength_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpExtensionExtensionLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1469] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpExtensionExtensionLength_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpExtensionExtensionLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{876, 0} +} + +type PatternFlowGtpExtensionContents_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpExtensionContents_Choice) Reset() { + *x = PatternFlowGtpExtensionContents_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1470] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpExtensionContents_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpExtensionContents_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpExtensionContents_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1470] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpExtensionContents_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpExtensionContents_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{879, 0} +} + +type PatternFlowGtpExtensionNextExtensionHeader_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpExtensionNextExtensionHeader_Choice) Reset() { + *x = PatternFlowGtpExtensionNextExtensionHeader_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1471] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpExtensionNextExtensionHeader_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpExtensionNextExtensionHeader_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpExtensionNextExtensionHeader_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1471] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpExtensionNextExtensionHeader_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpExtensionNextExtensionHeader_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{882, 0} +} + +type PatternFlowGtpv2Version_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv2Version_Choice) Reset() { + *x = PatternFlowGtpv2Version_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1472] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv2Version_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv2Version_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv2Version_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1472] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv2Version_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2Version_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{885, 0} +} + +type PatternFlowGtpv2PiggybackingFlag_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv2PiggybackingFlag_Choice) Reset() { + *x = PatternFlowGtpv2PiggybackingFlag_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1473] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv2PiggybackingFlag_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv2PiggybackingFlag_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv2PiggybackingFlag_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1473] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv2PiggybackingFlag_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2PiggybackingFlag_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{888, 0} +} + +type PatternFlowGtpv2TeidFlag_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv2TeidFlag_Choice) Reset() { + *x = PatternFlowGtpv2TeidFlag_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1474] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv2TeidFlag_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv2TeidFlag_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv2TeidFlag_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1474] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv2TeidFlag_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2TeidFlag_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{891, 0} +} + +type PatternFlowGtpv2Spare1_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv2Spare1_Choice) Reset() { + *x = PatternFlowGtpv2Spare1_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1475] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv2Spare1_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv2Spare1_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv2Spare1_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1475] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv2Spare1_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2Spare1_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{894, 0} +} + +type PatternFlowGtpv2MessageType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv2MessageType_Choice) Reset() { + *x = PatternFlowGtpv2MessageType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1476] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv2MessageType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv2MessageType_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv2MessageType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1476] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv2MessageType_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2MessageType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{897, 0} +} + +type PatternFlowGtpv2MessageLength_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv2MessageLength_Choice) Reset() { + *x = PatternFlowGtpv2MessageLength_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1477] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv2MessageLength_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv2MessageLength_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv2MessageLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1477] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv2MessageLength_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2MessageLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{900, 0} +} + +type PatternFlowGtpv2Teid_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv2Teid_Choice) Reset() { + *x = PatternFlowGtpv2Teid_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1478] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv2Teid_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv2Teid_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv2Teid_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1478] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv2Teid_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2Teid_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{903, 0} +} + +type PatternFlowGtpv2SequenceNumber_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv2SequenceNumber_Choice) Reset() { + *x = PatternFlowGtpv2SequenceNumber_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1479] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv2SequenceNumber_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv2SequenceNumber_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv2SequenceNumber_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1479] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv2SequenceNumber_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2SequenceNumber_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{906, 0} +} + +type PatternFlowGtpv2Spare2_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowGtpv2Spare2_Choice) Reset() { + *x = PatternFlowGtpv2Spare2_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1480] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowGtpv2Spare2_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowGtpv2Spare2_Choice) ProtoMessage() {} + +func (x *PatternFlowGtpv2Spare2_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1480] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowGtpv2Spare2_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowGtpv2Spare2_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{909, 0} +} + +type PatternFlowArpHardwareType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowArpHardwareType_Choice) Reset() { + *x = PatternFlowArpHardwareType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1481] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowArpHardwareType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowArpHardwareType_Choice) ProtoMessage() {} + +func (x *PatternFlowArpHardwareType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1481] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowArpHardwareType_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowArpHardwareType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{912, 0} +} + +type PatternFlowArpProtocolType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowArpProtocolType_Choice) Reset() { + *x = PatternFlowArpProtocolType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1482] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowArpProtocolType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowArpProtocolType_Choice) ProtoMessage() {} + +func (x *PatternFlowArpProtocolType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1482] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowArpProtocolType_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowArpProtocolType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{915, 0} +} + +type PatternFlowArpHardwareLength_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowArpHardwareLength_Choice) Reset() { + *x = PatternFlowArpHardwareLength_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1483] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowArpHardwareLength_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowArpHardwareLength_Choice) ProtoMessage() {} + +func (x *PatternFlowArpHardwareLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1483] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowArpHardwareLength_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowArpHardwareLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{918, 0} +} + +type PatternFlowArpProtocolLength_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowArpProtocolLength_Choice) Reset() { + *x = PatternFlowArpProtocolLength_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1484] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowArpProtocolLength_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowArpProtocolLength_Choice) ProtoMessage() {} + +func (x *PatternFlowArpProtocolLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1484] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowArpProtocolLength_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowArpProtocolLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{921, 0} +} + +type PatternFlowArpOperation_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowArpOperation_Choice) Reset() { + *x = PatternFlowArpOperation_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1485] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowArpOperation_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowArpOperation_Choice) ProtoMessage() {} + +func (x *PatternFlowArpOperation_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1485] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowArpOperation_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowArpOperation_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{924, 0} +} + +type PatternFlowArpSenderHardwareAddr_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowArpSenderHardwareAddr_Choice) Reset() { + *x = PatternFlowArpSenderHardwareAddr_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1486] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowArpSenderHardwareAddr_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowArpSenderHardwareAddr_Choice) ProtoMessage() {} + +func (x *PatternFlowArpSenderHardwareAddr_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1486] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowArpSenderHardwareAddr_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowArpSenderHardwareAddr_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{927, 0} +} + +type PatternFlowArpSenderProtocolAddr_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowArpSenderProtocolAddr_Choice) Reset() { + *x = PatternFlowArpSenderProtocolAddr_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1487] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowArpSenderProtocolAddr_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowArpSenderProtocolAddr_Choice) ProtoMessage() {} + +func (x *PatternFlowArpSenderProtocolAddr_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1487] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowArpSenderProtocolAddr_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowArpSenderProtocolAddr_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{930, 0} +} + +type PatternFlowArpTargetHardwareAddr_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowArpTargetHardwareAddr_Choice) Reset() { + *x = PatternFlowArpTargetHardwareAddr_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1488] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowArpTargetHardwareAddr_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowArpTargetHardwareAddr_Choice) ProtoMessage() {} + +func (x *PatternFlowArpTargetHardwareAddr_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1488] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowArpTargetHardwareAddr_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowArpTargetHardwareAddr_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{933, 0} +} + +type PatternFlowArpTargetProtocolAddr_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowArpTargetProtocolAddr_Choice) Reset() { + *x = PatternFlowArpTargetProtocolAddr_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1489] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowArpTargetProtocolAddr_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowArpTargetProtocolAddr_Choice) ProtoMessage() {} + +func (x *PatternFlowArpTargetProtocolAddr_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1489] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowArpTargetProtocolAddr_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowArpTargetProtocolAddr_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{936, 0} +} + +type PatternFlowIcmpEchoType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpEchoType_Choice) Reset() { + *x = PatternFlowIcmpEchoType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1490] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpEchoType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpEchoType_Choice) ProtoMessage() {} + +func (x *PatternFlowIcmpEchoType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1490] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpEchoType_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{939, 0} +} + +type PatternFlowIcmpEchoCode_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpEchoCode_Choice) Reset() { + *x = PatternFlowIcmpEchoCode_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1491] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpEchoCode_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpEchoCode_Choice) ProtoMessage() {} + +func (x *PatternFlowIcmpEchoCode_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1491] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpEchoCode_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoCode_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{942, 0} +} + +type PatternFlowIcmpEchoChecksum_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpEchoChecksum_Choice) Reset() { + *x = PatternFlowIcmpEchoChecksum_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1492] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpEchoChecksum_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpEchoChecksum_Choice) ProtoMessage() {} + +func (x *PatternFlowIcmpEchoChecksum_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1492] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpEchoChecksum_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoChecksum_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{943, 0} +} + +type PatternFlowIcmpEchoChecksum_Generated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpEchoChecksum_Generated) Reset() { + *x = PatternFlowIcmpEchoChecksum_Generated{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1493] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpEchoChecksum_Generated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpEchoChecksum_Generated) ProtoMessage() {} + +func (x *PatternFlowIcmpEchoChecksum_Generated) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1493] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpEchoChecksum_Generated.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoChecksum_Generated) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{943, 1} +} + +type PatternFlowIcmpEchoIdentifier_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpEchoIdentifier_Choice) Reset() { + *x = PatternFlowIcmpEchoIdentifier_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1494] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpEchoIdentifier_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpEchoIdentifier_Choice) ProtoMessage() {} + +func (x *PatternFlowIcmpEchoIdentifier_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1494] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpEchoIdentifier_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoIdentifier_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{946, 0} +} + +type PatternFlowIcmpEchoSequenceNumber_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpEchoSequenceNumber_Choice) Reset() { + *x = PatternFlowIcmpEchoSequenceNumber_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1495] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpEchoSequenceNumber_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpEchoSequenceNumber_Choice) ProtoMessage() {} + +func (x *PatternFlowIcmpEchoSequenceNumber_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1495] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpEchoSequenceNumber_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpEchoSequenceNumber_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{949, 0} +} + +type PatternFlowIcmpCommonChecksum_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpCommonChecksum_Choice) Reset() { + *x = PatternFlowIcmpCommonChecksum_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1496] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpCommonChecksum_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpCommonChecksum_Choice) ProtoMessage() {} + +func (x *PatternFlowIcmpCommonChecksum_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1496] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpCommonChecksum_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpCommonChecksum_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{950, 0} +} + +type PatternFlowIcmpCommonChecksum_Generated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpCommonChecksum_Generated) Reset() { + *x = PatternFlowIcmpCommonChecksum_Generated{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1497] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpCommonChecksum_Generated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpCommonChecksum_Generated) ProtoMessage() {} + +func (x *PatternFlowIcmpCommonChecksum_Generated) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1497] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpCommonChecksum_Generated.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpCommonChecksum_Generated) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{950, 1} +} + +type PatternFlowIcmpNextFieldsIdentifier_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpNextFieldsIdentifier_Choice) Reset() { + *x = PatternFlowIcmpNextFieldsIdentifier_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1498] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpNextFieldsIdentifier_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpNextFieldsIdentifier_Choice) ProtoMessage() {} + +func (x *PatternFlowIcmpNextFieldsIdentifier_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1498] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpNextFieldsIdentifier_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpNextFieldsIdentifier_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{953, 0} +} + +type PatternFlowIcmpNextFieldsSequenceNumber_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpNextFieldsSequenceNumber_Choice) Reset() { + *x = PatternFlowIcmpNextFieldsSequenceNumber_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1499] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpNextFieldsSequenceNumber_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpNextFieldsSequenceNumber_Choice) ProtoMessage() {} + +func (x *PatternFlowIcmpNextFieldsSequenceNumber_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1499] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpNextFieldsSequenceNumber_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpNextFieldsSequenceNumber_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{956, 0} +} + +type PatternFlowIcmpv6EchoType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpv6EchoType_Choice) Reset() { + *x = PatternFlowIcmpv6EchoType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1500] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpv6EchoType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpv6EchoType_Choice) ProtoMessage() {} + +func (x *PatternFlowIcmpv6EchoType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1500] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpv6EchoType_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{959, 0} +} + +type PatternFlowIcmpv6EchoCode_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpv6EchoCode_Choice) Reset() { + *x = PatternFlowIcmpv6EchoCode_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1501] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpv6EchoCode_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpv6EchoCode_Choice) ProtoMessage() {} + +func (x *PatternFlowIcmpv6EchoCode_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1501] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpv6EchoCode_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoCode_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{962, 0} +} + +type PatternFlowIcmpv6EchoIdentifier_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpv6EchoIdentifier_Choice) Reset() { + *x = PatternFlowIcmpv6EchoIdentifier_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1502] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpv6EchoIdentifier_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpv6EchoIdentifier_Choice) ProtoMessage() {} + +func (x *PatternFlowIcmpv6EchoIdentifier_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1502] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpv6EchoIdentifier_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoIdentifier_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{965, 0} +} + +type PatternFlowIcmpv6EchoSequenceNumber_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpv6EchoSequenceNumber_Choice) Reset() { + *x = PatternFlowIcmpv6EchoSequenceNumber_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1503] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpv6EchoSequenceNumber_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpv6EchoSequenceNumber_Choice) ProtoMessage() {} + +func (x *PatternFlowIcmpv6EchoSequenceNumber_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1503] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpv6EchoSequenceNumber_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoSequenceNumber_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{968, 0} +} + +type PatternFlowIcmpv6EchoChecksum_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpv6EchoChecksum_Choice) Reset() { + *x = PatternFlowIcmpv6EchoChecksum_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1504] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpv6EchoChecksum_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpv6EchoChecksum_Choice) ProtoMessage() {} + +func (x *PatternFlowIcmpv6EchoChecksum_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1504] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpv6EchoChecksum_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoChecksum_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{969, 0} +} + +type PatternFlowIcmpv6EchoChecksum_Generated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpv6EchoChecksum_Generated) Reset() { + *x = PatternFlowIcmpv6EchoChecksum_Generated{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1505] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpv6EchoChecksum_Generated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpv6EchoChecksum_Generated) ProtoMessage() {} + +func (x *PatternFlowIcmpv6EchoChecksum_Generated) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1505] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpv6EchoChecksum_Generated.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6EchoChecksum_Generated) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{969, 1} +} + +type PatternFlowIcmpv6CommonChecksum_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpv6CommonChecksum_Choice) Reset() { + *x = PatternFlowIcmpv6CommonChecksum_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1506] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpv6CommonChecksum_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpv6CommonChecksum_Choice) ProtoMessage() {} + +func (x *PatternFlowIcmpv6CommonChecksum_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1506] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpv6CommonChecksum_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6CommonChecksum_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{970, 0} +} + +type PatternFlowIcmpv6CommonChecksum_Generated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIcmpv6CommonChecksum_Generated) Reset() { + *x = PatternFlowIcmpv6CommonChecksum_Generated{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1507] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIcmpv6CommonChecksum_Generated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIcmpv6CommonChecksum_Generated) ProtoMessage() {} + +func (x *PatternFlowIcmpv6CommonChecksum_Generated) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1507] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIcmpv6CommonChecksum_Generated.ProtoReflect.Descriptor instead. +func (*PatternFlowIcmpv6CommonChecksum_Generated) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{970, 1} +} + +type PatternFlowPppAddress_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPppAddress_Choice) Reset() { + *x = PatternFlowPppAddress_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1508] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPppAddress_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPppAddress_Choice) ProtoMessage() {} + +func (x *PatternFlowPppAddress_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1508] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPppAddress_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPppAddress_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{973, 0} +} + +type PatternFlowPppControl_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPppControl_Choice) Reset() { + *x = PatternFlowPppControl_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1509] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPppControl_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPppControl_Choice) ProtoMessage() {} + +func (x *PatternFlowPppControl_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1509] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPppControl_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPppControl_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{976, 0} +} + +type PatternFlowPppProtocolType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowPppProtocolType_Choice) Reset() { + *x = PatternFlowPppProtocolType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1510] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowPppProtocolType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowPppProtocolType_Choice) ProtoMessage() {} + +func (x *PatternFlowPppProtocolType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1510] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowPppProtocolType_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowPppProtocolType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{979, 0} +} + +type PatternFlowIgmpv1Version_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIgmpv1Version_Choice) Reset() { + *x = PatternFlowIgmpv1Version_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1511] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIgmpv1Version_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIgmpv1Version_Choice) ProtoMessage() {} + +func (x *PatternFlowIgmpv1Version_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1511] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIgmpv1Version_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1Version_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{982, 0} +} + +type PatternFlowIgmpv1Type_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIgmpv1Type_Choice) Reset() { + *x = PatternFlowIgmpv1Type_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1512] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIgmpv1Type_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIgmpv1Type_Choice) ProtoMessage() {} + +func (x *PatternFlowIgmpv1Type_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1512] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIgmpv1Type_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1Type_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{985, 0} +} + +type PatternFlowIgmpv1Unused_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIgmpv1Unused_Choice) Reset() { + *x = PatternFlowIgmpv1Unused_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1513] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIgmpv1Unused_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIgmpv1Unused_Choice) ProtoMessage() {} + +func (x *PatternFlowIgmpv1Unused_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1513] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIgmpv1Unused_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1Unused_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{988, 0} +} + +type PatternFlowIgmpv1Checksum_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIgmpv1Checksum_Choice) Reset() { + *x = PatternFlowIgmpv1Checksum_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1514] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIgmpv1Checksum_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIgmpv1Checksum_Choice) ProtoMessage() {} + +func (x *PatternFlowIgmpv1Checksum_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1514] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIgmpv1Checksum_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1Checksum_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{989, 0} +} + +type PatternFlowIgmpv1Checksum_Generated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIgmpv1Checksum_Generated) Reset() { + *x = PatternFlowIgmpv1Checksum_Generated{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1515] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIgmpv1Checksum_Generated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIgmpv1Checksum_Generated) ProtoMessage() {} + +func (x *PatternFlowIgmpv1Checksum_Generated) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1515] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIgmpv1Checksum_Generated.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1Checksum_Generated) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{989, 1} +} + +type PatternFlowIgmpv1GroupAddress_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowIgmpv1GroupAddress_Choice) Reset() { + *x = PatternFlowIgmpv1GroupAddress_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1516] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowIgmpv1GroupAddress_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowIgmpv1GroupAddress_Choice) ProtoMessage() {} + +func (x *PatternFlowIgmpv1GroupAddress_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1516] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowIgmpv1GroupAddress_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowIgmpv1GroupAddress_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{992, 0} +} + +type PatternFlowMplsLabel_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowMplsLabel_Choice) Reset() { + *x = PatternFlowMplsLabel_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1517] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowMplsLabel_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowMplsLabel_Choice) ProtoMessage() {} + +func (x *PatternFlowMplsLabel_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1517] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowMplsLabel_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsLabel_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{995, 0} +} + +type PatternFlowMplsTrafficClass_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowMplsTrafficClass_Choice) Reset() { + *x = PatternFlowMplsTrafficClass_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1518] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowMplsTrafficClass_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowMplsTrafficClass_Choice) ProtoMessage() {} + +func (x *PatternFlowMplsTrafficClass_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1518] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowMplsTrafficClass_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsTrafficClass_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{998, 0} +} + +type PatternFlowMplsBottomOfStack_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowMplsBottomOfStack_Choice) Reset() { + *x = PatternFlowMplsBottomOfStack_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1519] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowMplsBottomOfStack_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowMplsBottomOfStack_Choice) ProtoMessage() {} + +func (x *PatternFlowMplsBottomOfStack_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1519] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowMplsBottomOfStack_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsBottomOfStack_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1001, 0} +} + +type PatternFlowMplsTimeToLive_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowMplsTimeToLive_Choice) Reset() { + *x = PatternFlowMplsTimeToLive_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1520] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowMplsTimeToLive_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowMplsTimeToLive_Choice) ProtoMessage() {} + +func (x *PatternFlowMplsTimeToLive_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1520] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowMplsTimeToLive_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowMplsTimeToLive_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1004, 0} +} + +type PatternFlowSnmpv2CVersion_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowSnmpv2CVersion_Choice) Reset() { + *x = PatternFlowSnmpv2CVersion_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1521] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowSnmpv2CVersion_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowSnmpv2CVersion_Choice) ProtoMessage() {} + +func (x *PatternFlowSnmpv2CVersion_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1521] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowSnmpv2CVersion_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVersion_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1006, 0} +} + +type PatternFlowSnmpv2CPDURequestId_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowSnmpv2CPDURequestId_Choice) Reset() { + *x = PatternFlowSnmpv2CPDURequestId_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1522] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowSnmpv2CPDURequestId_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowSnmpv2CPDURequestId_Choice) ProtoMessage() {} + +func (x *PatternFlowSnmpv2CPDURequestId_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1522] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowSnmpv2CPDURequestId_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CPDURequestId_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1008, 0} +} + +type PatternFlowSnmpv2CPDUErrorIndex_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowSnmpv2CPDUErrorIndex_Choice) Reset() { + *x = PatternFlowSnmpv2CPDUErrorIndex_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1523] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowSnmpv2CPDUErrorIndex_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowSnmpv2CPDUErrorIndex_Choice) ProtoMessage() {} + +func (x *PatternFlowSnmpv2CPDUErrorIndex_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1523] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowSnmpv2CPDUErrorIndex_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CPDUErrorIndex_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1010, 0} +} + +type PatternFlowSnmpv2CBulkPDURequestId_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowSnmpv2CBulkPDURequestId_Choice) Reset() { + *x = PatternFlowSnmpv2CBulkPDURequestId_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1524] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowSnmpv2CBulkPDURequestId_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowSnmpv2CBulkPDURequestId_Choice) ProtoMessage() {} + +func (x *PatternFlowSnmpv2CBulkPDURequestId_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1524] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowSnmpv2CBulkPDURequestId_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CBulkPDURequestId_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1012, 0} +} + +type PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice) Reset() { + *x = PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1525] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice) ProtoMessage() {} + +func (x *PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1525] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1013, 0} +} + +type PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice) Reset() { + *x = PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1526] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice) ProtoMessage() {} + +func (x *PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1526] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1015, 0} +} + +type PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1527] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice) ProtoMessage() {} + +func (x *PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1527] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1017, 0} +} + +type PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1528] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice) ProtoMessage() {} + +func (x *PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1528] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1019, 0} +} + +type PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1529] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice) ProtoMessage() {} + +func (x *PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1529] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1021, 0} +} + +type PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1530] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice) ProtoMessage() {} + +func (x *PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1530] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1023, 0} +} + +type PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1531] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice) ProtoMessage() {} + +func (x *PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1531] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1025, 0} +} + +type PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice) Reset() { + *x = PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1532] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice) ProtoMessage() {} + +func (x *PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1532] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1027, 0} +} + +type PatternFlowSnmpv2CCommonRequestId_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowSnmpv2CCommonRequestId_Choice) Reset() { + *x = PatternFlowSnmpv2CCommonRequestId_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1533] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowSnmpv2CCommonRequestId_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowSnmpv2CCommonRequestId_Choice) ProtoMessage() {} + +func (x *PatternFlowSnmpv2CCommonRequestId_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1533] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowSnmpv2CCommonRequestId_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowSnmpv2CCommonRequestId_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1029, 0} +} + +type PatternFlowRsvpRsvpChecksum_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRsvpRsvpChecksum_Choice) Reset() { + *x = PatternFlowRsvpRsvpChecksum_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1534] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRsvpRsvpChecksum_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRsvpRsvpChecksum_Choice) ProtoMessage() {} + +func (x *PatternFlowRsvpRsvpChecksum_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1534] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRsvpRsvpChecksum_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRsvpRsvpChecksum_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1030, 0} +} + +type PatternFlowRsvpRsvpChecksum_Generated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRsvpRsvpChecksum_Generated) Reset() { + *x = PatternFlowRsvpRsvpChecksum_Generated{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1535] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRsvpRsvpChecksum_Generated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRsvpRsvpChecksum_Generated) ProtoMessage() {} + +func (x *PatternFlowRsvpRsvpChecksum_Generated) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1535] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRsvpRsvpChecksum_Generated.ProtoReflect.Descriptor instead. +func (*PatternFlowRsvpRsvpChecksum_Generated) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1030, 1} +} + +type PatternFlowRsvpTimeToLive_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRsvpTimeToLive_Choice) Reset() { + *x = PatternFlowRsvpTimeToLive_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1536] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRsvpTimeToLive_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRsvpTimeToLive_Choice) ProtoMessage() {} + +func (x *PatternFlowRsvpTimeToLive_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1536] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRsvpTimeToLive_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRsvpTimeToLive_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1032, 0} +} + +type PatternFlowRsvpReserved_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRsvpReserved_Choice) Reset() { + *x = PatternFlowRsvpReserved_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1537] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRsvpReserved_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRsvpReserved_Choice) ProtoMessage() {} + +func (x *PatternFlowRsvpReserved_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1537] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRsvpReserved_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRsvpReserved_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1034, 0} +} + +type PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice) Reset() { + *x = PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1538] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1538] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1036, 0} +} + +type PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice) Reset() { + *x = PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1539] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1539] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1038, 0} +} + +type PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice) Reset() { + *x = PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1540] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1540] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1040, 0} +} + +type PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice) Reset() { + *x = PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1541] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1541] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1042, 0} +} + +type PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice) Reset() { + *x = PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1542] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1542] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1044, 0} +} + +type PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice) Reset() { + *x = PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1543] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1543] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1046, 0} +} + +type PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice) Reset() { + *x = PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1544] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1544] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1048, 0} +} + +type PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice) Reset() { + *x = PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1545] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1545] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1050, 0} +} + +type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice) Reset() { + *x = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1546] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1546] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1052, 0} +} + +type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice) Reset() { + *x = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1547] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1547] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1054, 0} +} + +type PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice) Reset() { + *x = PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1548] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1548] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1056, 0} +} + +type PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice) Reset() { + *x = PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1549] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1549] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1058, 0} +} + +type PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice) Reset() { + *x = PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1550] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1550] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1060, 0} +} + +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1551] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1551] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1062, 0} +} + +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1552] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1552] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1064, 0} +} + +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1553] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1553] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1066, 0} +} + +type PatternFlowRSVPPathSenderTspecIntServVersion_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTspecIntServVersion_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServVersion_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1554] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTspecIntServVersion_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTspecIntServVersion_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTspecIntServVersion_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1554] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServVersion_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServVersion_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1068, 0} +} + +type PatternFlowRSVPPathSenderTspecIntServReserved1_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServReserved1_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1555] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTspecIntServReserved1_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTspecIntServReserved1_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1555] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServReserved1_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServReserved1_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1070, 0} +} + +type PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1556] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1556] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1072, 0} +} + +type PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1557] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1557] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1074, 0} +} + +type PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1558] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1558] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1076, 0} +} + +type PatternFlowRSVPPathSenderTspecIntServReserved2_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServReserved2_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1559] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTspecIntServReserved2_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTspecIntServReserved2_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1559] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServReserved2_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServReserved2_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1078, 0} +} + +type PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1560] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1560] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1080, 0} +} + +type PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1561] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1561] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1082, 0} +} + +type PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1562] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1562] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1084, 0} +} + +type PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1563] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1563] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1086, 0} +} + +type PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1564] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1564] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1088, 0} +} + +type PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice) Reset() { + *x = PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1565] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1565] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1090, 0} +} + +type PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice) Reset() { + *x = PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1566] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1566] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1092, 0} +} + +type PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice) Reset() { + *x = PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1567] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1567] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1094, 0} +} + +type PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice) Reset() { + *x = PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1568] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1568] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1095, 0} +} + +type PatternFlowRSVPPathRecordRouteType1LabelCType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathRecordRouteType1LabelCType_Choice) Reset() { + *x = PatternFlowRSVPPathRecordRouteType1LabelCType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1569] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathRecordRouteType1LabelCType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathRecordRouteType1LabelCType_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathRecordRouteType1LabelCType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1569] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathRecordRouteType1LabelCType_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathRecordRouteType1LabelCType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1096, 0} +} + +type PatternFlowRSVPPathObjectsCustomType_Choice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PatternFlowRSVPPathObjectsCustomType_Choice) Reset() { + *x = PatternFlowRSVPPathObjectsCustomType_Choice{} + if protoimpl.UnsafeEnabled { + mi := &file_otg_proto_msgTypes[1570] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatternFlowRSVPPathObjectsCustomType_Choice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatternFlowRSVPPathObjectsCustomType_Choice) ProtoMessage() {} + +func (x *PatternFlowRSVPPathObjectsCustomType_Choice) ProtoReflect() protoreflect.Message { + mi := &file_otg_proto_msgTypes[1570] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatternFlowRSVPPathObjectsCustomType_Choice.ProtoReflect.Descriptor instead. +func (*PatternFlowRSVPPathObjectsCustomType_Choice) Descriptor() ([]byte, []int) { + return file_otg_proto_rawDescGZIP(), []int{1098, 0} +} + +var File_otg_proto protoreflect.FileDescriptor + +var file_otg_proto_rawDesc = []byte{ + 0x0a, 0x09, 0x6f, 0x74, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x6f, 0x74, 0x67, + 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xcf, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x6f, + 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x6c, + 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x4c, 0x61, 0x67, 0x52, 0x04, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x06, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x31, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x52, 0x06, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x12, 0x28, + 0x0a, 0x08, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x52, 0x08, + 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x07, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, + 0x1f, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x77, 0x73, + 0x12, 0x22, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x6c, 0x64, 0x70, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x09, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x52, 0x04, 0x6c, 0x6c, 0x64, + 0x70, 0x22, 0x85, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x6f, 0x72, + 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x56, 0x0a, 0x04, 0x50, 0x6f, 0x72, + 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, + 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x5b, 0x0a, 0x0b, 0x50, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x34, 0x0a, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, + 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, + 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa9, + 0x01, 0x0a, 0x03, 0x4c, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, 0x50, + 0x6f, 0x72, 0x74, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, + 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x6d, + 0x69, 0x6e, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, + 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x07, 0x4c, + 0x61, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x70, 0x6f, 0x72, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x04, 0x6c, 0x61, 0x63, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, + 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x61, 0x63, 0x70, 0x52, 0x04, 0x6c, 0x61, 0x63, 0x70, 0x12, 0x33, + 0x0a, 0x08, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x42, 0x61, 0x73, 0x65, 0x52, 0x08, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0xe6, 0x01, 0x0a, 0x0b, 0x4c, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x12, 0x39, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x04, + 0x6c, 0x61, 0x63, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x4c, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, + 0x52, 0x04, 0x6c, 0x61, 0x63, 0x70, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x1a, 0x37, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x2d, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x61, 0x63, + 0x70, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x10, 0x02, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x3a, 0x0a, 0x11, 0x4c, 0x61, + 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x12, + 0x1a, 0x0a, 0x06, 0x6c, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x05, 0x6c, 0x61, 0x67, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6c, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x22, 0xd5, 0x01, 0x0a, 0x0f, 0x4c, 0x61, 0x67, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, 0x12, 0x2b, 0x0a, 0x0f, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x15, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x13, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, + 0x12, 0x20, 0x0a, 0x09, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x08, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x88, + 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x22, 0xf1, + 0x03, 0x0a, 0x0b, 0x4c, 0x61, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x61, 0x63, 0x70, 0x12, 0x2f, + 0x0a, 0x11, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, + 0x33, 0x0a, 0x13, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x72, + 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x11, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x61, 0x63, 0x70, 0x2e, 0x41, + 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x02, 0x52, 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, + 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x1d, 0x6c, 0x61, 0x63, 0x70, 0x64, 0x75, 0x5f, + 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x1a, + 0x6c, 0x61, 0x63, 0x70, 0x64, 0x75, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x54, 0x69, + 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, + 0x0e, 0x6c, 0x61, 0x63, 0x70, 0x64, 0x75, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x0d, 0x6c, 0x61, 0x63, 0x70, 0x64, 0x75, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x1a, 0x41, 0x0a, 0x0d, 0x41, 0x63, 0x74, + 0x6f, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x22, 0x30, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x10, 0x01, + 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x02, 0x42, 0x14, 0x0a, 0x12, + 0x5f, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x42, 0x20, 0x0a, + 0x1e, 0x5f, 0x6c, 0x61, 0x63, 0x70, 0x64, 0x75, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, + 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, + 0x11, 0x0a, 0x0f, 0x5f, 0x6c, 0x61, 0x63, 0x70, 0x64, 0x75, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x42, 0x61, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x61, 0x63, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x88, 0x01, 0x01, + 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x03, 0x6d, 0x74, 0x75, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x6c, 0x61, 0x6e, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x56, 0x6c, 0x61, 0x6e, 0x52, 0x05, 0x76, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x63, 0x42, + 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x74, 0x75, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0xcc, 0x03, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x12, 0x37, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x0e, + 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x49, 0x70, 0x76, 0x34, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x36, 0x52, 0x0d, 0x69, + 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x15, 0x0a, 0x03, + 0x6d, 0x61, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x63, + 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x03, 0x6d, 0x74, 0x75, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x6c, + 0x61, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x56, 0x6c, 0x61, 0x6e, 0x52, 0x05, 0x76, 0x6c, 0x61, 0x6e, + 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x11, 0x64, 0x68, + 0x63, 0x70, 0x76, 0x34, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, + 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x10, + 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, + 0x12, 0x44, 0x0a, 0x11, 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x52, 0x10, 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x63, 0x42, 0x06, + 0x0a, 0x04, 0x5f, 0x6d, 0x74, 0x75, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x98, 0x03, 0x0a, 0x12, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x70, + 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6c, 0x61, + 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x07, + 0x6c, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x76, 0x78, + 0x6c, 0x61, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, + 0x52, 0x09, 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x41, + 0x0a, 0x0e, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x69, + 0x6e, 0x6b, 0x52, 0x0d, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x69, 0x6e, + 0x6b, 0x1a, 0x62, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x58, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x10, + 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x10, + 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, + 0x69, 0x6e, 0x6b, 0x10, 0x04, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0b, + 0x0a, 0x09, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, + 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x85, 0x02, 0x0a, 0x15, 0x45, + 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, + 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x37, 0x0a, 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x73, + 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x69, 0x6d, + 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, + 0x09, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, + 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x2e, 0x4c, 0x69, 0x6e, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x08, 0x6c, 0x69, + 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x3f, 0x0a, 0x08, 0x4c, 0x69, 0x6e, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x33, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, + 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x73, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x10, 0x02, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x6c, 0x69, 0x6e, 0x6b, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x22, 0x8d, 0x02, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x56, 0x6c, 0x61, + 0x6e, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x56, 0x6c, 0x61, 0x6e, + 0x2e, 0x54, 0x70, 0x69, 0x64, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x74, 0x70, + 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x02, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x1a, 0x56, 0x0a, 0x04, 0x54, 0x70, 0x69, 0x64, 0x22, 0x4e, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x78, 0x38, 0x31, 0x30, 0x30, 0x10, 0x01, + 0x12, 0x09, 0x0a, 0x05, 0x78, 0x38, 0x38, 0x41, 0x38, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x78, + 0x39, 0x31, 0x30, 0x30, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x78, 0x39, 0x32, 0x30, 0x30, 0x10, + 0x04, 0x12, 0x09, 0x0a, 0x05, 0x78, 0x39, 0x33, 0x30, 0x30, 0x10, 0x05, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x74, 0x70, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0xe8, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, + 0x34, 0x12, 0x1d, 0x0a, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x88, 0x01, 0x01, + 0x12, 0x3a, 0x0a, 0x0b, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x6d, 0x61, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x49, 0x70, 0x76, 0x34, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x41, 0x43, + 0x52, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x61, 0x63, 0x12, 0x1d, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x42, 0x0a, 0x0a, + 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8e, 0x01, + 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x6f, 0x6f, 0x70, + 0x62, 0x61, 0x63, 0x6b, 0x12, 0x1e, 0x0a, 0x08, 0x65, 0x74, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x65, 0x74, 0x68, 0x4e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, + 0x5f, 0x65, 0x74, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xe4, + 0x01, 0x0a, 0x14, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x34, 0x47, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x4d, 0x41, 0x43, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x34, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, + 0x41, 0x43, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, + 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, + 0x6f, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, + 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe8, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x49, 0x70, 0x76, 0x36, 0x12, 0x1d, 0x0a, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x0b, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x6d, + 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x36, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x4d, 0x41, 0x43, 0x52, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x61, 0x63, 0x12, + 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, + 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x8e, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x36, 0x4c, + 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x1e, 0x0a, 0x08, 0x65, 0x74, 0x68, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x65, 0x74, 0x68, + 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, + 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x74, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0a, 0x0a, 0x08, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0xe4, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x36, + 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x41, 0x43, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x36, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x4d, 0x41, 0x43, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, + 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, + 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, + 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8d, 0x03, 0x0a, 0x12, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x02, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, + 0x61, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x09, 0x62, 0x72, 0x6f, + 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x17, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x6c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x15, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x1a, 0x47, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x3d, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x10, 0x01, 0x12, + 0x12, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x62, + 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x22, 0xf0, 0x01, 0x0a, 0x12, 0x44, 0x68, 0x63, + 0x70, 0x76, 0x34, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x24, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x4d, 0x61, + 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x88, + 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x61, 0x6c, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x0c, 0x72, 0x65, 0x6e, + 0x65, 0x77, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, + 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, + 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x61, + 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x72, 0x65, 0x62, 0x69, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x22, 0xef, 0x02, 0x0a, 0x12, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x72, + 0x61, 0x70, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x01, 0x52, 0x0b, 0x72, 0x61, 0x70, 0x69, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x07, 0x69, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x61, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x06, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x64, + 0x75, 0x69, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, + 0x36, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x75, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x08, 0x64, 0x75, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4e, 0x0a, 0x0f, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, + 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0f, 0x0a, 0x0d, + 0x5f, 0x72, 0x61, 0x70, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0xc8, 0x01, + 0x0a, 0x20, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x40, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x62, 0x0a, 0x18, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x64, 0x68, 0x63, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, + 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x52, 0x16, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x44, 0x68, 0x63, 0x70, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0xb1, 0x02, 0x0a, 0x19, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x10, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x46, 0x0a, + 0x0c, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x65, 0x6e, + 0x64, 0x6f, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x0b, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x0b, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, + 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, + 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x71, + 0x64, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, + 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x46, 0x71, 0x64, 0x6e, 0x52, 0x04, 0x66, 0x71, 0x64, 0x6e, 0x22, 0xe6, 0x02, 0x0a, + 0x18, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x49, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x49, 0x61, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x36, 0x0a, 0x04, 0x69, 0x61, 0x6e, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, + 0x76, 0x36, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x04, 0x69, 0x61, 0x6e, 0x61, 0x12, 0x36, 0x0a, 0x04, 0x69, 0x61, 0x70, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x49, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x69, 0x61, 0x70, + 0x64, 0x12, 0x3a, 0x0a, 0x06, 0x69, 0x61, 0x6e, 0x61, 0x70, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, + 0x63, 0x70, 0x76, 0x36, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x61, 0x54, 0x69, 0x6d, 0x65, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x69, 0x61, 0x6e, 0x61, 0x70, 0x64, 0x1a, 0x4b, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x41, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x08, 0x0a, 0x04, 0x69, 0x61, 0x6e, 0x61, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x61, + 0x74, 0x61, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x61, 0x70, 0x64, 0x10, 0x03, 0x12, 0x0a, + 0x0a, 0x06, 0x69, 0x61, 0x6e, 0x61, 0x70, 0x64, 0x10, 0x04, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x57, 0x0a, 0x1d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, + 0x68, 0x63, 0x70, 0x76, 0x36, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x61, 0x54, 0x69, 0x6d, + 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x74, 0x31, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x02, 0x74, 0x31, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x74, + 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x02, 0x74, 0x32, 0x88, 0x01, 0x01, + 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x74, 0x31, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x74, 0x32, 0x22, 0xbf, + 0x02, 0x0a, 0x1a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x75, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x75, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x03, 0x6c, 0x6c, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x44, + 0x75, 0x69, 0x64, 0x52, 0x03, 0x6c, 0x6c, 0x74, 0x12, 0x30, 0x0a, 0x02, 0x65, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x75, 0x69, + 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x65, 0x6e, 0x12, 0x2d, 0x0a, 0x02, 0x6c, 0x6c, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, + 0x6f, 0x44, 0x75, 0x69, 0x64, 0x52, 0x02, 0x6c, 0x6c, 0x1a, 0x3a, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x30, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, + 0x6c, 0x6c, 0x74, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x65, 0x6e, 0x10, 0x02, 0x12, 0x06, 0x0a, + 0x02, 0x6c, 0x6c, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, + 0x36, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x75, 0x69, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x69, 0x73, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x76, 0x65, + 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x08, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, + 0x5f, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x0c, + 0x0a, 0x0a, 0x5f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x22, 0x1a, 0x0a, 0x18, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x4e, 0x6f, 0x44, 0x75, 0x69, 0x64, 0x22, 0xca, 0x03, 0x0a, 0x23, 0x44, 0x68, 0x63, + 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x12, 0x51, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x08, 0x64, 0x75, 0x69, 0x64, 0x5f, 0x6c, 0x6c, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, + 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x44, + 0x75, 0x69, 0x64, 0x4c, 0x6c, 0x74, 0x52, 0x07, 0x64, 0x75, 0x69, 0x64, 0x4c, 0x6c, 0x74, 0x12, + 0x37, 0x0a, 0x07, 0x64, 0x75, 0x69, 0x64, 0x5f, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x44, 0x75, 0x69, 0x64, 0x45, 0x6e, + 0x52, 0x06, 0x64, 0x75, 0x69, 0x64, 0x45, 0x6e, 0x12, 0x37, 0x0a, 0x07, 0x64, 0x75, 0x69, 0x64, + 0x5f, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x44, 0x75, 0x69, 0x64, 0x4c, 0x6c, 0x52, 0x06, 0x64, 0x75, 0x69, 0x64, 0x4c, + 0x6c, 0x12, 0x3d, 0x0a, 0x09, 0x64, 0x75, 0x69, 0x64, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, + 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x44, 0x75, + 0x69, 0x64, 0x55, 0x75, 0x69, 0x64, 0x52, 0x08, 0x64, 0x75, 0x69, 0x64, 0x55, 0x75, 0x69, 0x64, + 0x1a, 0x58, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4e, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x64, 0x75, 0x69, 0x64, 0x5f, 0x6c, 0x6c, 0x74, 0x10, + 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x64, 0x75, 0x69, 0x64, 0x5f, 0x65, 0x6e, 0x10, 0x02, 0x12, 0x0b, + 0x0a, 0x07, 0x64, 0x75, 0x69, 0x64, 0x5f, 0x6c, 0x6c, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x64, + 0x75, 0x69, 0x64, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x10, 0x04, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x1a, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x44, 0x75, 0x69, + 0x64, 0x4c, 0x6c, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x56, 0x0a, + 0x12, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x10, 0x6c, 0x69, 0x6e, 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x97, + 0x01, 0x0a, 0x19, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x44, 0x75, 0x69, 0x64, 0x45, 0x6e, 0x12, 0x30, 0x0a, 0x11, + 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x10, 0x65, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x69, 0x73, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x23, + 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, + 0x73, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x73, 0x0a, 0x19, 0x44, 0x68, 0x63, 0x70, + 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x44, + 0x75, 0x69, 0x64, 0x4c, 0x6c, 0x12, 0x56, 0x0a, 0x12, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x4c, + 0x61, 0x79, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x10, 0x6c, 0x69, 0x6e, + 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x83, 0x04, + 0x0a, 0x1b, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x44, 0x75, 0x69, 0x64, 0x55, 0x75, 0x69, 0x64, 0x12, 0x41, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x44, 0x75, 0x69, 0x64, 0x55, 0x75, 0x69, 0x64, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x41, 0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x44, 0x75, 0x69, 0x64, 0x55, + 0x75, 0x69, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x07, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6c, 0x6f, 0x77, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x6f, 0x77, + 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x69, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x13, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x68, 0x69, 0x5f, 0x61, + 0x6e, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x69, 0x41, 0x6e, 0x64, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x19, 0x63, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x73, 0x65, 0x71, 0x5f, 0x68, 0x69, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x15, 0x63, 0x6c, + 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x71, 0x48, 0x69, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x73, 0x65, 0x71, 0x5f, 0x6c, 0x6f, 0x77, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, + 0x0b, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x71, 0x4c, 0x6f, 0x77, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, + 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x6c, 0x6f, 0x77, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, + 0x69, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x68, 0x69, 0x5f, 0x61, + 0x6e, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x1c, 0x0a, 0x1a, 0x5f, 0x63, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x71, 0x5f, 0x68, 0x69, 0x5f, 0x61, 0x6e, 0x64, 0x5f, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x63, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x71, 0x5f, 0x6c, 0x6f, 0x77, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, + 0x6f, 0x64, 0x65, 0x22, 0xd1, 0x01, 0x0a, 0x22, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x44, 0x75, 0x69, 0x64, 0x55, + 0x75, 0x69, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x44, 0x75, 0x69, 0x64, 0x55, 0x75, 0x69, 0x64, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x4e, 0x0a, 0x06, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x44, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x07, 0x0a, 0x03, 0x76, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x76, 0x5f, 0x32, 0x10, + 0x02, 0x12, 0x07, 0x0a, 0x03, 0x76, 0x5f, 0x33, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x76, 0x5f, + 0x34, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x76, 0x5f, 0x35, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xd2, 0x01, 0x0a, 0x22, 0x44, 0x68, 0x63, 0x70, + 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x44, + 0x75, 0x69, 0x64, 0x55, 0x75, 0x69, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x50, + 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x44, 0x75, 0x69, 0x64, 0x55, 0x75, 0x69, 0x64, + 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x1a, 0x4f, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x45, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x6e, 0x63, 0x73, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, + 0x64, 0x63, 0x65, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x75, 0x69, 0x64, 0x10, 0x03, 0x12, + 0x10, 0x0a, 0x0c, 0x76, 0x61, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x10, + 0x04, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4a, 0x0a, 0x23, + 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb6, 0x02, 0x0a, 0x21, 0x44, 0x68, 0x63, + 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, + 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x36, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, + 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0x7d, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x73, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x76, 0x65, + 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x73, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x66, 0x71, 0x64, 0x6e, 0x10, 0x03, 0x12, 0x10, + 0x0a, 0x0c, 0x62, 0x6f, 0x6f, 0x74, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x10, 0x04, + 0x12, 0x08, 0x0a, 0x04, 0x73, 0x7a, 0x74, 0x70, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x06, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x3d, 0x0a, 0x19, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x17, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x22, 0xeb, 0x01, 0x0a, 0x1e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x11, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, + 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, + 0x52, 0x10, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x62, 0x0a, 0x18, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x64, 0x68, 0x63, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, + 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x52, 0x16, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x44, 0x68, 0x63, 0x70, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x65, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x80, + 0x02, 0x0a, 0x23, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, + 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x09, 0x6d, 0x73, 0x67, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x39, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2f, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, + 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x6d, 0x73, 0x67, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0xee, 0x01, 0x0a, 0x1e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, + 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, + 0x01, 0x01, 0x1a, 0x73, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x69, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x74, + 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x02, 0x12, + 0x12, 0x0a, 0x0e, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x10, 0x04, + 0x12, 0x09, 0x0a, 0x05, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x72, + 0x65, 0x62, 0x69, 0x6e, 0x64, 0x10, 0x06, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x22, 0x95, 0x02, 0x0a, 0x1d, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x11, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, + 0x73, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x10, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, + 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x62, 0x0a, 0x18, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, + 0x68, 0x63, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x16, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x44, 0x68, 0x63, 0x70, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x69, 0x73, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x95, 0x02, 0x0a, 0x1d, 0x44, + 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x11, + 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x10, 0x65, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x69, 0x73, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x48, + 0x0a, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x53, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x62, 0x0a, 0x18, 0x61, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x68, 0x63, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x52, 0x16, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, + 0x44, 0x68, 0x63, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x42, 0x14, 0x0a, 0x12, + 0x5f, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x22, 0x80, 0x02, 0x0a, 0x23, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, + 0x09, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x73, 0x1a, + 0x39, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2f, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x6d, + 0x73, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x1e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, + 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x4d, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x43, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x61, 0x64, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x65, 0x70, 0x6c, + 0x79, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x65, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x68, 0x0a, 0x22, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa8, 0x02, 0x0a, 0x17, 0x44, + 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x46, 0x71, 0x64, 0x6e, 0x12, 0x1a, 0x0a, 0x06, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x53, 0x88, + 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6f, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x01, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x4f, 0x88, 0x01, 0x01, 0x12, 0x1a, + 0x0a, 0x06, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, + 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x4e, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x03, 0x52, 0x0a, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x62, 0x0a, 0x18, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, + 0x68, 0x63, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x16, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x44, 0x68, 0x63, 0x70, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6f, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x66, + 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xf4, 0x01, 0x0a, 0x1e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x6f, 0x6f, + 0x74, 0x66, 0x69, 0x6c, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x15, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, + 0x4f, 0x0a, 0x0f, 0x62, 0x6f, 0x6f, 0x74, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, + 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x0e, 0x62, 0x6f, 0x6f, 0x74, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x62, 0x0a, 0x18, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, + 0x68, 0x63, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x16, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x44, 0x68, 0x63, 0x70, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x54, 0x0a, 0x21, + 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x21, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x22, 0x97, 0x07, 0x0a, 0x06, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x05, + 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x2e, 0x53, 0x70, 0x65, 0x65, 0x64, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x31, 0x0a, 0x05, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x2e, 0x4d, 0x65, 0x64, 0x69, + 0x61, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x05, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x88, + 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x63, 0x75, 0x6f, 0x75, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6d, 0x69, + 0x73, 0x63, 0x75, 0x6f, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x74, 0x75, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x03, 0x6d, 0x74, 0x75, 0x88, 0x01, 0x01, + 0x12, 0x33, 0x0a, 0x13, 0x69, 0x65, 0x65, 0x65, 0x5f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, + 0x11, 0x69, 0x65, 0x65, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6e, 0x65, + 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, + 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x45, 0x0a, 0x10, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x41, 0x75, 0x74, 0x6f, 0x4e, 0x65, 0x67, 0x6f, + 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x4e, 0x65, 0x67, + 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0c, 0x66, 0x6c, 0x6f, 0x77, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x46, 0x6c, 0x6f, 0x77, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x0b, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x06, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x1a, 0xa9, 0x02, 0x0a, + 0x05, 0x53, 0x70, 0x65, 0x65, 0x64, 0x22, 0x9f, 0x02, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x14, 0x0a, 0x10, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x31, 0x30, 0x5f, 0x66, 0x64, 0x5f, + 0x6d, 0x62, 0x70, 0x73, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, + 0x31, 0x30, 0x5f, 0x68, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, + 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x31, 0x30, 0x30, 0x5f, 0x66, 0x64, 0x5f, 0x6d, 0x62, 0x70, + 0x73, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x31, 0x30, 0x30, + 0x5f, 0x68, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x73, 0x70, + 0x65, 0x65, 0x64, 0x5f, 0x31, 0x5f, 0x67, 0x62, 0x70, 0x73, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, + 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x31, 0x30, 0x5f, 0x67, 0x62, 0x70, 0x73, 0x10, 0x06, 0x12, + 0x11, 0x0a, 0x0d, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x32, 0x35, 0x5f, 0x67, 0x62, 0x70, 0x73, + 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x34, 0x30, 0x5f, 0x67, + 0x62, 0x70, 0x73, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x35, + 0x30, 0x5f, 0x67, 0x62, 0x70, 0x73, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x73, 0x70, 0x65, 0x65, + 0x64, 0x5f, 0x31, 0x30, 0x30, 0x5f, 0x67, 0x62, 0x70, 0x73, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, + 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x32, 0x30, 0x30, 0x5f, 0x67, 0x62, 0x70, 0x73, 0x10, 0x0b, + 0x12, 0x12, 0x0a, 0x0e, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x34, 0x30, 0x30, 0x5f, 0x67, 0x62, + 0x70, 0x73, 0x10, 0x0c, 0x12, 0x12, 0x0a, 0x0e, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x38, 0x30, + 0x30, 0x5f, 0x67, 0x62, 0x70, 0x73, 0x10, 0x0d, 0x1a, 0x42, 0x0a, 0x05, 0x4d, 0x65, 0x64, 0x69, + 0x61, 0x22, 0x39, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x6f, + 0x70, 0x70, 0x65, 0x72, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x66, 0x69, 0x62, 0x65, 0x72, 0x10, + 0x02, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x67, 0x6d, 0x69, 0x69, 0x10, 0x03, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x70, 0x65, 0x65, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x63, 0x75, 0x6f, 0x75, 0x73, + 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x74, 0x75, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x65, 0x65, + 0x65, 0x5f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, + 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, + 0x61, 0x74, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x89, 0x04, 0x0a, + 0x15, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x41, 0x75, 0x74, 0x6f, 0x4e, 0x65, 0x67, 0x6f, 0x74, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x65, 0x5f, 0x31, 0x30, 0x30, 0x30, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x11, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x31, 0x30, 0x30, 0x30, 0x4d, 0x62, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x61, + 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x31, 0x30, 0x30, 0x5f, 0x66, 0x64, 0x5f, + 0x6d, 0x62, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x12, 0x61, 0x64, + 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x31, 0x30, 0x30, 0x46, 0x64, 0x4d, 0x62, 0x70, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x5f, 0x31, 0x30, 0x30, 0x5f, 0x68, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x02, 0x52, 0x12, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x31, + 0x30, 0x30, 0x48, 0x64, 0x4d, 0x62, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x14, 0x61, + 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x31, 0x30, 0x5f, 0x66, 0x64, 0x5f, 0x6d, + 0x62, 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x11, 0x61, 0x64, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x31, 0x30, 0x46, 0x64, 0x4d, 0x62, 0x70, 0x73, 0x88, 0x01, + 0x01, 0x12, 0x34, 0x0a, 0x14, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x31, + 0x30, 0x5f, 0x68, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x04, 0x52, 0x11, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x31, 0x30, 0x48, 0x64, + 0x4d, 0x62, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, + 0x74, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, + 0x52, 0x0c, 0x6c, 0x69, 0x6e, 0x6b, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x88, 0x01, + 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x72, 0x73, 0x5f, 0x66, 0x65, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x06, 0x52, 0x05, 0x72, 0x73, 0x46, 0x65, 0x63, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, + 0x14, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x31, 0x30, 0x30, 0x30, + 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x65, 0x5f, 0x31, 0x30, 0x30, 0x5f, 0x66, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x42, + 0x18, 0x0a, 0x16, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x31, 0x30, + 0x30, 0x5f, 0x68, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x61, 0x64, + 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x31, 0x30, 0x5f, 0x66, 0x64, 0x5f, 0x6d, 0x62, + 0x70, 0x73, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x5f, 0x31, 0x30, 0x5f, 0x68, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, + 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x72, 0x73, 0x5f, 0x66, 0x65, 0x63, 0x22, 0xdd, 0x02, 0x0a, 0x11, 0x4c, 0x61, 0x79, + 0x65, 0x72, 0x31, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x2e, + 0x0a, 0x10, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x3f, + 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x46, 0x6c, 0x6f, 0x77, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x01, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x3a, 0x0a, 0x0d, 0x69, 0x65, 0x65, 0x65, 0x5f, 0x38, 0x30, 0x32, 0x5f, 0x31, 0x71, 0x62, 0x62, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x79, + 0x65, 0x72, 0x31, 0x49, 0x65, 0x65, 0x65, 0x38, 0x30, 0x32, 0x31, 0x71, 0x62, 0x62, 0x52, 0x0b, + 0x69, 0x65, 0x65, 0x65, 0x38, 0x30, 0x32, 0x31, 0x71, 0x62, 0x62, 0x12, 0x34, 0x0a, 0x0b, 0x69, + 0x65, 0x65, 0x65, 0x5f, 0x38, 0x30, 0x32, 0x5f, 0x33, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x49, 0x65, 0x65, + 0x65, 0x38, 0x30, 0x32, 0x33, 0x78, 0x52, 0x09, 0x69, 0x65, 0x65, 0x65, 0x38, 0x30, 0x32, 0x33, + 0x78, 0x1a, 0x45, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x3b, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x69, 0x65, 0x65, 0x65, 0x5f, 0x38, 0x30, 0x32, + 0x5f, 0x31, 0x71, 0x62, 0x62, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x69, 0x65, 0x65, 0x65, 0x5f, + 0x38, 0x30, 0x32, 0x5f, 0x33, 0x78, 0x10, 0x02, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x4c, 0x61, 0x79, 0x65, + 0x72, 0x31, 0x49, 0x65, 0x65, 0x65, 0x38, 0x30, 0x32, 0x33, 0x78, 0x22, 0xeb, 0x03, 0x0a, 0x11, + 0x4c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x49, 0x65, 0x65, 0x65, 0x38, 0x30, 0x32, 0x31, 0x71, 0x62, + 0x62, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x66, 0x63, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x70, 0x66, 0x63, 0x44, 0x65, 0x6c, 0x61, 0x79, + 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x5f, 0x30, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x09, 0x70, 0x66, 0x63, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x30, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x70, 0x66, 0x63, 0x5f, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x09, 0x70, 0x66, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x31, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, + 0x0b, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x32, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x03, 0x52, 0x09, 0x70, 0x66, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x88, + 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, + 0x33, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x09, 0x70, 0x66, 0x63, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x33, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x70, 0x66, 0x63, 0x5f, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x34, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, 0x52, 0x09, + 0x70, 0x66, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, + 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x35, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x06, 0x52, 0x09, 0x70, 0x66, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x35, 0x88, 0x01, + 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x36, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x07, 0x52, 0x09, 0x70, 0x66, 0x63, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x36, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x70, 0x66, 0x63, 0x5f, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x5f, 0x37, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x08, 0x52, 0x09, 0x70, + 0x66, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x37, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x70, 0x66, 0x63, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, + 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x30, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, + 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x31, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, + 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x32, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, + 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x33, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, + 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x34, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, + 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x35, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, + 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x36, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x66, + 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x37, 0x22, 0xda, 0x02, 0x0a, 0x07, 0x43, 0x61, + 0x70, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, + 0x75, 0x72, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x12, 0x21, 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x06, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x37, 0x0a, 0x06, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x2d, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, + 0x0a, 0x04, 0x70, 0x63, 0x61, 0x70, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x70, 0x63, 0x61, 0x70, + 0x6e, 0x67, 0x10, 0x02, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x82, 0x03, 0x0a, 0x0d, 0x43, 0x61, 0x70, 0x74, 0x75, + 0x72, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, + 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, + 0x75, 0x72, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x12, 0x30, 0x0a, 0x08, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, + 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x52, 0x08, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x76, 0x6c, 0x61, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x56, + 0x6c, 0x61, 0x6e, 0x52, 0x04, 0x76, 0x6c, 0x61, 0x6e, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x70, 0x76, + 0x34, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, + 0x70, 0x74, 0x75, 0x72, 0x65, 0x49, 0x70, 0x76, 0x34, 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, + 0x24, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x49, 0x70, 0x76, 0x36, 0x52, + 0x04, 0x69, 0x70, 0x76, 0x36, 0x1a, 0x59, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x4f, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x76, 0x6c, 0x61, 0x6e, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, + 0x69, 0x70, 0x76, 0x34, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, 0x05, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x0d, + 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x1b, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x62, 0x69, + 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x09, 0x62, 0x69, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6d, 0x61, 0x73, + 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x04, 0x52, 0x06, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x62, + 0x69, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x65, 0x22, 0x7d, 0x0a, 0x0c, 0x43, 0x61, 0x70, 0x74, 0x75, + 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6e, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x06, 0x6e, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6e, 0x65, 0x67, 0x61, 0x74, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x70, 0x74, 0x75, + 0x72, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x03, 0x73, 0x72, + 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, + 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, + 0x23, 0x0a, 0x03, 0x64, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, + 0x03, 0x64, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x0a, 0x65, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, + 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x09, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x70, 0x66, 0x63, 0x5f, 0x71, 0x75, + 0x65, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x08, 0x70, 0x66, + 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x0b, 0x43, 0x61, 0x70, 0x74, 0x75, + 0x72, 0x65, 0x56, 0x6c, 0x61, 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, + 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x08, 0x70, 0x72, 0x69, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x03, 0x63, 0x66, 0x69, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x03, 0x63, 0x66, 0x69, 0x12, 0x21, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, + 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2d, 0x0a, + 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0xd9, 0x05, 0x0a, + 0x0b, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x49, 0x70, 0x76, 0x34, 0x12, 0x2b, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x0d, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, + 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x34, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, + 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x39, 0x0a, 0x0e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x52, 0x0e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, + 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x12, 0x36, 0x0a, 0x0d, 0x64, 0x6f, 0x6e, 0x74, 0x5f, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, + 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0c, 0x64, 0x6f, 0x6e, 0x74, + 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0e, 0x6d, 0x6f, 0x72, 0x65, + 0x5f, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x52, 0x0d, 0x6d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x0f, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0e, + 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x33, + 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, + 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, + 0x69, 0x76, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, + 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x12, 0x3a, 0x0a, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0e, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x23, + 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x03, + 0x73, 0x72, 0x63, 0x12, 0x23, 0x0a, 0x03, 0x64, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x52, 0x03, 0x64, 0x73, 0x74, 0x22, 0x8c, 0x03, 0x0a, 0x0b, 0x43, 0x61, 0x70, + 0x74, 0x75, 0x72, 0x65, 0x49, 0x70, 0x76, 0x36, 0x12, 0x2b, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, + 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, + 0x0c, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x30, 0x0a, + 0x0a, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x52, 0x09, 0x66, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, + 0x38, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, + 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x32, 0x0a, 0x0b, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, + 0x09, 0x68, 0x6f, 0x70, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x52, 0x08, 0x68, 0x6f, 0x70, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x23, 0x0a, + 0x03, 0x73, 0x72, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x03, 0x73, + 0x72, 0x63, 0x12, 0x23, 0x0a, 0x03, 0x64, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x52, 0x03, 0x64, 0x73, 0x74, 0x22, 0xe6, 0x03, 0x0a, 0x06, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x52, 0x09, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x73, 0x12, 0x3e, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6c, 0x6f, + 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x6f, + 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x4c, 0x6f, 0x6f, 0x70, + 0x62, 0x61, 0x63, 0x6b, 0x73, 0x12, 0x3e, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6c, 0x6f, + 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x76, 0x36, 0x4c, 0x6f, + 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x4c, 0x6f, 0x6f, 0x70, + 0x62, 0x61, 0x63, 0x6b, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x69, 0x73, 0x69, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x49, 0x73, 0x69, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x04, 0x69, 0x73, 0x69, 0x73, + 0x12, 0x26, 0x0a, 0x03, 0x62, 0x67, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x52, 0x03, 0x62, 0x67, 0x70, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x78, 0x6c, 0x61, + 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x05, 0x76, 0x78, 0x6c, 0x61, 0x6e, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x04, 0x72, 0x73, 0x76, + 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x73, 0x76, 0x70, 0x52, 0x04, 0x72, 0x73, 0x76, 0x70, 0x12, 0x36, + 0x0a, 0x0b, 0x64, 0x68, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x44, 0x68, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x0a, 0x64, 0x68, 0x63, 0x70, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x73, 0x70, 0x66, 0x76, 0x32, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, + 0x06, 0x6f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x4f, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x61, + 0x75, 0x74, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x11, + 0x0a, 0x0f, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x6c, + 0x6c, 0x22, 0xc9, 0x03, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x73, 0x69, 0x73, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x73, 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x20, 0x0a, 0x09, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x32, 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, + 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x62, 0x61, 0x73, 0x69, 0x63, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, + 0x42, 0x61, 0x73, 0x69, 0x63, 0x52, 0x05, 0x62, 0x61, 0x73, 0x69, 0x63, 0x12, 0x2d, 0x0a, 0x08, + 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, + 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x0b, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x32, 0x0a, 0x09, 0x76, 0x34, 0x5f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, + 0x73, 0x69, 0x73, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x08, 0x76, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x09, 0x76, 0x36, 0x5f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x08, 0x76, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x17, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x5f, 0x69, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4e, 0x0a, + 0x17, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x73, 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x15, 0x0a, 0x03, 0x69, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x03, 0x69, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x74, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x05, + 0x69, 0x74, 0x69, 0x64, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x69, 0x69, 0x64, 0x22, 0xb4, 0x07, + 0x0a, 0x0d, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, + 0x1e, 0x0a, 0x08, 0x65, 0x74, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x07, 0x65, 0x74, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x88, 0x01, 0x01, 0x12, 0x4b, 0x0a, 0x0c, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, + 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x0a, 0x6c, 0x65, 0x76, + 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x03, 0x52, 0x09, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x38, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0a, + 0x6c, 0x31, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x6c, 0x32, + 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0a, 0x6c, 0x32, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x39, 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x74, 0x6f, + 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x4d, 0x54, 0x52, 0x10, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x49, 0x64, 0x73, 0x12, + 0x41, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, + 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x45, 0x52, 0x12, + 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x65, 0x72, 0x69, + 0x6e, 0x67, 0x12, 0x48, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x41, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x61, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x08, + 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, + 0x6e, 0x63, 0x65, 0x64, 0x12, 0x49, 0x0a, 0x0f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0e, 0x6c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1f, 0x0a, 0x0b, 0x73, 0x72, 0x6c, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x0c, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x72, 0x6c, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x49, 0x0a, 0x0b, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, + 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, 0x01, + 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x10, 0x02, 0x1a, 0x4d, 0x0a, 0x09, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x40, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x5f, 0x32, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x31, 0x5f, + 0x32, 0x10, 0x03, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x74, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0d, 0x0a, 0x0b, + 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x12, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1f, 0x0a, 0x08, 0x70, + 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, + 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, + 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0d, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x64, 0x65, 0x61, 0x64, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x0c, 0x64, 0x65, 0x61, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, + 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, + 0x11, 0x0a, 0x0f, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x64, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x22, 0x62, 0x0a, 0x06, 0x49, 0x73, 0x69, 0x73, 0x4d, 0x54, 0x12, 0x18, + 0x0a, 0x05, 0x6d, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, + 0x04, 0x6d, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6c, 0x69, 0x6e, 0x6b, + 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x0a, 0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x6d, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6c, 0x69, 0x6e, + 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x22, 0xff, 0x02, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, + 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x45, 0x12, 0x36, 0x0a, 0x14, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x13, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x26, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, + 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, + 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x74, 0x68, 0x88, 0x01, 0x01, + 0x12, 0x3d, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x03, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, + 0x62, 0x6c, 0x65, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, + 0x51, 0x0a, 0x13, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x62, 0x61, 0x6e, 0x64, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x70, 0x72, 0x69, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x73, 0x52, 0x12, + 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x73, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x0f, 0x0a, 0x0d, + 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x74, 0x68, 0x42, 0x1b, 0x0a, + 0x19, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x22, 0x95, 0x02, 0x0a, 0x1b, 0x4c, + 0x69, 0x6e, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x70, 0x62, + 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x03, 0x70, 0x62, 0x30, 0x88, 0x01, + 0x01, 0x12, 0x15, 0x0a, 0x03, 0x70, 0x62, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x03, 0x70, 0x62, 0x31, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x70, 0x62, 0x32, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x03, 0x70, 0x62, 0x32, 0x88, 0x01, 0x01, 0x12, + 0x15, 0x0a, 0x03, 0x70, 0x62, 0x33, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x03, + 0x70, 0x62, 0x33, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x70, 0x62, 0x34, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x03, 0x70, 0x62, 0x34, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, + 0x03, 0x70, 0x62, 0x35, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, 0x52, 0x03, 0x70, 0x62, + 0x35, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x70, 0x62, 0x36, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x06, 0x52, 0x03, 0x70, 0x62, 0x36, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x70, + 0x62, 0x37, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x07, 0x52, 0x03, 0x70, 0x62, 0x37, 0x88, + 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x62, 0x30, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, + 0x62, 0x31, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x62, 0x32, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, + 0x62, 0x33, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x62, 0x34, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, + 0x62, 0x35, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x62, 0x36, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, + 0x62, 0x37, 0x22, 0x86, 0x02, 0x0a, 0x1b, 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x64, 0x35, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x64, 0x35, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88, 0x01, 0x01, 0x1a, 0x3a, 0x0a, 0x08, + 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2e, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, + 0x00, 0x12, 0x07, 0x0a, 0x03, 0x6d, 0x64, 0x35, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x10, 0x02, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x75, 0x74, + 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x64, 0x35, 0x42, 0x0b, + 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xbc, 0x03, 0x0a, 0x15, + 0x49, 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x41, 0x64, 0x76, + 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x61, 0x64, + 0x6a, 0x75, 0x73, 0x74, 0x5f, 0x6d, 0x74, 0x75, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, + 0x52, 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x41, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x4d, 0x74, 0x75, 0x88, + 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x6a, 0x75, 0x73, + 0x74, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x0e, + 0x61, 0x75, 0x74, 0x6f, 0x41, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x41, 0x72, 0x65, 0x61, 0x88, 0x01, + 0x01, 0x12, 0x4a, 0x0a, 0x1f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, + 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x1c, 0x61, 0x75, + 0x74, 0x6f, 0x41, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, + 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x33, 0x77, 0x61, 0x79, 0x5f, 0x68, 0x61, 0x6e, + 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x13, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x33, 0x77, 0x61, 0x79, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, + 0x61, 0x6b, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x19, 0x70, 0x32, 0x70, 0x5f, 0x68, 0x65, + 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, + 0x6d, 0x61, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x15, 0x70, 0x32, 0x70, + 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x54, 0x6f, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x4d, + 0x61, 0x63, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x61, + 0x64, 0x6a, 0x75, 0x73, 0x74, 0x5f, 0x6d, 0x74, 0x75, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x61, 0x75, + 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x42, 0x22, + 0x0a, 0x20, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x5f, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x33, 0x77, + 0x61, 0x79, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x42, 0x1c, 0x0a, 0x1a, + 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x75, + 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x63, 0x22, 0xde, 0x03, 0x0a, 0x1b, 0x49, + 0x73, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4c, 0x69, 0x6e, 0x6b, + 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x72, 0x61, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, + 0x63, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x75, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x0b, 0x75, 0x6e, 0x70, + 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x73, + 0x68, 0x61, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x06, 0x73, + 0x68, 0x61, 0x72, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x10, 0x64, 0x65, 0x64, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x31, 0x5f, 0x74, 0x6f, 0x5f, 0x31, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x03, 0x52, 0x0d, 0x64, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x31, + 0x54, 0x6f, 0x31, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x12, 0x64, 0x65, 0x64, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x31, 0x5f, 0x70, 0x6c, 0x75, 0x73, 0x5f, 0x31, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x04, 0x52, 0x0f, 0x64, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x31, + 0x50, 0x6c, 0x75, 0x73, 0x31, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x65, 0x6e, 0x68, 0x61, + 0x6e, 0x63, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x08, 0x65, 0x6e, + 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x34, 0x30, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x06, + 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x34, 0x30, 0x88, 0x01, 0x01, 0x12, + 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x38, 0x30, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x38, 0x30, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, + 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x75, 0x6e, 0x70, 0x72, + 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x68, 0x61, 0x72, + 0x65, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x31, 0x5f, 0x74, 0x6f, 0x5f, 0x31, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x64, 0x65, 0x64, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x31, 0x5f, 0x70, 0x6c, 0x75, 0x73, 0x5f, 0x31, 0x42, 0x0b, + 0x0a, 0x09, 0x5f, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x34, 0x30, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x38, 0x30, 0x22, 0x93, 0x02, 0x0a, 0x09, + 0x49, 0x73, 0x69, 0x73, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x2e, 0x0a, 0x11, 0x69, 0x70, 0x76, + 0x34, 0x5f, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x69, 0x70, 0x76, 0x34, 0x54, 0x65, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x68, 0x6f, 0x73, + 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x68, + 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x77, 0x69, 0x64, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x57, 0x69, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, + 0x12, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x10, 0x6c, 0x65, 0x61, + 0x72, 0x6e, 0x65, 0x64, 0x4c, 0x73, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, + 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, + 0x61, 0x6d, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x77, + 0x69, 0x64, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, + 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x22, 0xb2, 0x05, 0x0a, 0x0c, 0x49, 0x73, 0x69, 0x73, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, + 0x65, 0x64, 0x12, 0x35, 0x0a, 0x14, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x65, 0x6c, + 0x6c, 0x6f, 0x5f, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x50, + 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6d, 0x61, 0x78, + 0x5f, 0x61, 0x72, 0x65, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x41, 0x72, 0x65, 0x61, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0e, + 0x61, 0x72, 0x65, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x72, 0x65, 0x61, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x10, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x0e, 0x6c, 0x73, 0x70, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x6c, 0x73, 0x70, 0x5f, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x0b, 0x6c, 0x73, 0x70, 0x4c, + 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x70, 0x73, + 0x6e, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x04, 0x52, 0x0c, 0x70, 0x73, 0x6e, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, 0x52, 0x0c, 0x63, + 0x73, 0x6e, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x25, + 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x06, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4c, 0x73, 0x70, 0x53, 0x69, + 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x1d, 0x6c, 0x73, 0x70, 0x5f, 0x6d, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x07, 0x52, 0x19, + 0x6c, 0x73, 0x70, 0x4d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x69, 0x6e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, + 0x62, 0x69, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x48, 0x08, 0x52, 0x11, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x42, 0x69, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x65, 0x6c, + 0x6c, 0x6f, 0x5f, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6d, + 0x61, 0x78, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x6c, + 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x73, 0x6e, 0x70, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x63, 0x73, + 0x6e, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, + 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x20, 0x0a, 0x1e, + 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x6d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x16, + 0x0a, 0x14, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, + 0x65, 0x64, 0x5f, 0x62, 0x69, 0x74, 0x22, 0xd6, 0x01, 0x0a, 0x12, 0x49, 0x73, 0x69, 0x73, 0x41, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, + 0x12, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x5f, + 0x6d, 0x64, 0x35, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x10, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x64, 0x35, 0x88, 0x01, 0x01, + 0x12, 0x38, 0x0a, 0x09, 0x61, 0x72, 0x65, 0x61, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x41, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x73, 0x65, + 0x52, 0x08, 0x61, 0x72, 0x65, 0x61, 0x41, 0x75, 0x74, 0x68, 0x12, 0x3c, 0x0a, 0x0b, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x64, 0x35, 0x22, + 0xfc, 0x01, 0x0a, 0x16, 0x49, 0x73, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x54, + 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, + 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x64, 0x35, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x64, 0x35, 0x88, 0x01, 0x01, 0x12, 0x1f, + 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x02, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88, 0x01, 0x01, 0x1a, + 0x3a, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2e, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x6d, 0x64, 0x35, 0x10, 0x01, 0x12, 0x0c, 0x0a, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x10, 0x02, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x64, + 0x35, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xbd, + 0x05, 0x0a, 0x10, 0x49, 0x73, 0x69, 0x73, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x34, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x09, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0b, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0a, 0x6c, + 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x88, 0x01, 0x01, 0x12, 0x4b, 0x0a, 0x0b, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x56, 0x34, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x0a, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x63, 0x0a, 0x13, 0x72, 0x65, 0x64, + 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, + 0x73, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x65, + 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, 0x12, 0x72, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x11, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x41, 0x74, + 0x74, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, + 0x78, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x05, + 0x78, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x72, 0x5f, 0x66, 0x6c, + 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x06, 0x52, 0x05, 0x72, 0x46, 0x6c, 0x61, + 0x67, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x05, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, + 0x1a, 0x41, 0x0a, 0x0a, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x33, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x10, 0x02, 0x1a, 0x3f, 0x0a, 0x12, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, + 0x77, 0x6e, 0x10, 0x02, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x5f, 0x61, 0x74, 0x74, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x78, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x5f, 0x66, + 0x6c, 0x61, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x22, 0xaa, + 0x01, 0x0a, 0x0e, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, + 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x22, 0xaa, 0x01, 0x0a, 0x0e, + 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x42, 0x0a, + 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x22, 0xab, 0x01, 0x0a, 0x0f, 0x4d, 0x41, 0x43, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x03, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x22, 0xbd, 0x05, 0x0a, 0x10, 0x49, 0x73, 0x69, 0x73, 0x56, + 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x24, + 0x0a, 0x0b, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0a, 0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x88, 0x01, 0x01, 0x12, 0x4b, 0x0a, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x49, 0x73, 0x69, 0x73, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x01, 0x52, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x63, 0x0a, 0x13, 0x72, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, + 0x12, 0x72, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x33, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x5f, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x11, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x41, 0x74, 0x74, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x78, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x05, 0x78, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, + 0x12, 0x1a, 0x0a, 0x06, 0x72, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x06, 0x52, 0x05, 0x72, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, + 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x05, + 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, 0x1a, 0x41, 0x0a, 0x0a, 0x4f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x33, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x0c, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x0c, 0x0a, + 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, 0x02, 0x1a, 0x3f, 0x0a, 0x12, 0x52, + 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, + 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x42, 0x0e, 0x0a, 0x0c, + 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x0e, 0x0a, 0x0c, + 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x16, 0x0a, 0x14, + 0x5f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x16, 0x0a, + 0x14, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x5f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x78, 0x5f, 0x66, 0x6c, 0x61, 0x67, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x22, 0xbd, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x09, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x0f, + 0x69, 0x70, 0x76, 0x34, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, + 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x0e, 0x69, 0x70, 0x76, 0x34, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0f, 0x69, 0x70, + 0x76, 0x36, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x0e, 0x69, 0x70, 0x76, 0x36, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0x99, 0x02, 0x0a, 0x1b, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x42, 0x67, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4c, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x64, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, + 0x65, 0x88, 0x01, 0x01, 0x1a, 0x9f, 0x01, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, + 0x22, 0x93, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x2e, 0x0a, 0x2a, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x73, 0x79, 0x6e, + 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x31, 0x5f, + 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x31, 0x10, 0x01, 0x12, 0x25, 0x0a, 0x21, 0x62, 0x61, + 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x31, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x10, + 0x02, 0x12, 0x23, 0x0a, 0x1f, 0x62, 0x61, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x31, 0x5f, 0x73, 0x75, 0x62, 0x63, + 0x6f, 0x64, 0x65, 0x33, 0x10, 0x03, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, + 0x64, 0x65, 0x22, 0xb3, 0x03, 0x0a, 0x19, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, + 0x4f, 0x70, 0x65, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x4a, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, + 0x70, 0x4f, 0x70, 0x65, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x2e, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x1a, 0xbd, 0x02, 0x0a, + 0x07, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x22, 0xb1, 0x02, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x2d, 0x0a, 0x29, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x31, 0x10, + 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, + 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, + 0x32, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x62, 0x67, 0x70, + 0x5f, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, + 0x65, 0x33, 0x10, 0x03, 0x12, 0x31, 0x0a, 0x2d, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x5f, 0x73, 0x75, 0x62, + 0x63, 0x6f, 0x64, 0x65, 0x34, 0x10, 0x04, 0x12, 0x1e, 0x0a, 0x1a, 0x61, 0x75, 0x74, 0x68, 0x5f, + 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x5f, 0x73, 0x75, 0x62, + 0x63, 0x6f, 0x64, 0x65, 0x35, 0x10, 0x05, 0x12, 0x28, 0x0a, 0x24, 0x75, 0x6e, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x10, + 0x06, 0x12, 0x29, 0x0a, 0x25, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, + 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, + 0x32, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x37, 0x10, 0x07, 0x42, 0x0a, 0x0a, 0x08, + 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x22, 0xe5, 0x04, 0x0a, 0x1b, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4c, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x75, 0x62, 0x63, + 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x62, 0x63, + 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x1a, 0xeb, 0x03, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x63, 0x6f, + 0x64, 0x65, 0x22, 0xdf, 0x03, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x28, 0x0a, 0x24, + 0x6d, 0x61, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, + 0x6f, 0x64, 0x65, 0x31, 0x10, 0x01, 0x12, 0x30, 0x0a, 0x2c, 0x75, 0x6e, 0x72, 0x65, 0x63, 0x6f, + 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x77, 0x65, 0x6c, 0x6c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, + 0x62, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x27, 0x77, 0x65, 0x6c, 0x6c, + 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x5f, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, + 0x64, 0x65, 0x33, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x5f, + 0x66, 0x6c, 0x61, 0x67, 0x73, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, + 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x34, 0x10, 0x04, 0x12, 0x26, 0x0a, 0x22, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5f, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, + 0x65, 0x35, 0x10, 0x05, 0x12, 0x28, 0x0a, 0x24, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x5f, 0x63, 0x6f, + 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x10, 0x06, 0x12, 0x22, + 0x0a, 0x1e, 0x61, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x6f, 0x6f, + 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x37, + 0x10, 0x07, 0x12, 0x26, 0x0a, 0x22, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x6e, 0x68, + 0x6f, 0x70, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, + 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x38, 0x10, 0x08, 0x12, 0x28, 0x0a, 0x24, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, + 0x65, 0x39, 0x10, 0x09, 0x12, 0x29, 0x0a, 0x25, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, + 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x31, 0x30, 0x10, 0x0a, 0x12, + 0x23, 0x0a, 0x1f, 0x61, 0x62, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x5f, 0x61, 0x73, 0x70, 0x61, + 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x33, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, + 0x31, 0x31, 0x10, 0x0b, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, + 0x22, 0x1b, 0x0a, 0x19, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x48, 0x6f, 0x6c, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x22, 0x22, 0x0a, + 0x20, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x46, 0x69, 0x6e, 0x69, 0x74, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x22, 0x8c, 0x04, 0x0a, 0x13, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x43, + 0x65, 0x61, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x43, 0x65, 0x61, 0x73, 0x65, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x1a, + 0xa2, 0x03, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x96, 0x03, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x65, 0x61, 0x63, 0x68, + 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, + 0x31, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x68, 0x75, + 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, 0x75, 0x62, 0x63, + 0x6f, 0x64, 0x65, 0x32, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, 0x75, 0x62, + 0x63, 0x6f, 0x64, 0x65, 0x33, 0x10, 0x03, 0x12, 0x1e, 0x0a, 0x1a, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, 0x75, 0x62, + 0x63, 0x6f, 0x64, 0x65, 0x34, 0x10, 0x04, 0x12, 0x24, 0x0a, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x36, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x35, 0x10, 0x05, 0x12, 0x27, 0x0a, + 0x23, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, 0x75, 0x62, 0x63, + 0x6f, 0x64, 0x65, 0x36, 0x10, 0x06, 0x12, 0x32, 0x0a, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, + 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, + 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x37, 0x10, 0x07, 0x12, 0x23, 0x0a, 0x1f, 0x6f, 0x75, + 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x38, 0x10, 0x08, 0x12, + 0x24, 0x0a, 0x20, 0x62, 0x66, 0x64, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x64, + 0x6f, 0x77, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, + 0x65, 0x31, 0x30, 0x10, 0x09, 0x12, 0x1d, 0x0a, 0x19, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x65, + 0x73, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x36, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, + 0x65, 0x39, 0x10, 0x0a, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, + 0x22, 0x63, 0x0a, 0x14, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x75, + 0x62, 0x63, 0x6f, 0x64, 0x65, 0x22, 0xae, 0x08, 0x0a, 0x09, 0x42, 0x67, 0x70, 0x56, 0x34, 0x50, + 0x65, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x65, 0x65, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x16, 0x65, + 0x76, 0x70, 0x6e, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x14, 0x65, 0x76, 0x70, 0x6e, 0x45, 0x74, 0x68, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x38, 0x0a, 0x07, + 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x50, 0x65, 0x65, 0x72, 0x2e, 0x41, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x06, 0x61, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x08, 0x61, 0x73, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x0f, 0x61, 0x73, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x50, 0x65, 0x65, + 0x72, 0x2e, 0x41, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x69, 0x64, 0x74, 0x68, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x03, 0x52, 0x0d, 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x57, 0x69, 0x64, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, + 0x6e, 0x63, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, + 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, + 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x5e, 0x0a, 0x1a, 0x6c, 0x65, + 0x61, 0x72, 0x6e, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x49, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x52, 0x18, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x09, 0x76, 0x34, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x08, 0x76, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x31, 0x0a, + 0x09, 0x76, 0x36, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x08, 0x76, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, + 0x12, 0x3e, 0x0a, 0x10, 0x76, 0x34, 0x5f, 0x73, 0x72, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, 0x34, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x0e, 0x76, 0x34, 0x53, 0x72, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, + 0x12, 0x3e, 0x0a, 0x10, 0x76, 0x36, 0x5f, 0x73, 0x72, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x69, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, 0x36, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x0e, 0x76, 0x36, 0x53, 0x72, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x10, 0x67, 0x72, 0x61, + 0x63, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x47, 0x72, 0x61, + 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x0f, 0x67, 0x72, + 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x3b, 0x0a, + 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x70, + 0x6c, 0x61, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x35, 0x0a, 0x06, 0x41, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, + 0x04, 0x69, 0x62, 0x67, 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x65, 0x62, 0x67, 0x70, 0x10, + 0x02, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x69, 0x64, + 0x74, 0x68, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x74, + 0x77, 0x6f, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x66, 0x6f, 0x75, 0x72, 0x10, 0x02, 0x42, 0x0f, + 0x0a, 0x0d, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, + 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x61, 0x73, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x66, 0x0a, 0x0e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x70, 0x76, 0x34, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, + 0x70, 0x76, 0x34, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x05, 0x70, 0x65, + 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x56, 0x34, 0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xcc, + 0x04, 0x0a, 0x14, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0b, 0x64, 0x66, 0x5f, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x66, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x64, 0x66, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x04, 0x65, + 0x76, 0x69, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x76, 0x70, 0x6e, 0x45, 0x76, 0x69, 0x73, 0x52, 0x04, 0x65, + 0x76, 0x69, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x65, 0x73, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x03, 0x65, 0x73, 0x69, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0b, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x0a, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x65, + 0x73, 0x69, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, + 0x52, 0x08, 0x65, 0x73, 0x69, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, + 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, + 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, + 0x12, 0x33, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, + 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, + 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x48, 0x0a, + 0x0a, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x3a, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x5f, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x02, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x73, 0x69, 0x42, + 0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x42, + 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x73, 0x69, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x5d, 0x0a, + 0x1c, 0x42, 0x67, 0x70, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x44, 0x66, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, + 0x0e, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x22, 0xd1, 0x04, 0x0a, + 0x10, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, + 0x64, 0x12, 0x4c, 0x0a, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x1d, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x45, 0x78, 0x69, 0x74, 0x44, + 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, + 0x3d, 0x0a, 0x18, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x64, 0x69, + 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x16, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x45, 0x78, 0x69, 0x74, 0x44, 0x69, + 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x2a, + 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x06, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, + 0x64, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x03, 0x52, + 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x18, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x16, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x05, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x43, 0x0a, 0x06, 0x4f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x22, 0x39, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, + 0x69, 0x67, 0x70, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x67, 0x70, 0x10, 0x02, 0x12, 0x0e, + 0x0a, 0x0a, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x03, 0x42, 0x23, + 0x0a, 0x21, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x6f, 0x72, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x65, 0x78, + 0x69, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x42, 0x1b, + 0x0a, 0x19, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x22, 0xbe, 0x02, 0x0a, 0x0c, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x74, 0x79, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x08, 0x61, 0x73, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x73, 0x5f, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x08, + 0x61, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x8e, 0x01, 0x0a, 0x04, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x14, + 0x0a, 0x10, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x6e, 0x6f, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x6e, 0x6f, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x65, 0x64, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x6e, 0x6f, 0x5f, 0x65, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x10, 0x04, 0x12, + 0x0e, 0x0a, 0x0a, 0x6c, 0x6c, 0x67, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x10, 0x05, 0x12, + 0x0b, 0x0a, 0x07, 0x6e, 0x6f, 0x5f, 0x6c, 0x6c, 0x67, 0x72, 0x10, 0x06, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x22, 0x8f, 0x04, 0x0a, 0x0f, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x40, + 0x0a, 0x07, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0xbc, 0x01, 0x0a, 0x04, + 0x54, 0x79, 0x70, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x1b, + 0x0a, 0x17, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x61, 0x73, 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x70, 0x76, + 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x73, 0x5f, + 0x34, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x6f, 0x70, 0x61, 0x71, + 0x75, 0x65, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x65, 0x76, 0x70, 0x6e, 0x10, 0x05, 0x12, 0x2a, + 0x0a, 0x26, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x61, 0x73, 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x62, + 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x10, 0x06, 0x1a, 0x87, 0x01, 0x0a, 0x07, 0x53, + 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x22, 0x7c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x10, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x10, + 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x02, 0x12, 0x16, 0x0a, + 0x12, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, + 0x64, 0x74, 0x68, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x10, 0x04, + 0x12, 0x11, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x6d, 0x61, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x10, 0x06, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0a, 0x0a, + 0x08, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0xd3, 0x02, 0x0a, 0x09, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x42, 0x0a, 0x0b, 0x61, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x2e, 0x41, 0x73, 0x53, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x09, 0x61, 0x73, 0x53, 0x65, 0x74, 0x4d, 0x6f, + 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, + 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0xbe, 0x01, 0x0a, 0x09, 0x41, 0x73, 0x53, + 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x1b, 0x0a, 0x17, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, 0x73, 0x10, 0x01, 0x12, 0x12, 0x0a, + 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x73, 0x5f, 0x73, 0x65, 0x71, 0x10, + 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x73, 0x5f, + 0x73, 0x65, 0x74, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x5f, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x71, 0x10, 0x04, + 0x12, 0x19, 0x0a, 0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x73, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x05, 0x12, 0x1c, 0x0a, 0x18, 0x70, + 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, + 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x06, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x73, + 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x10, 0x42, 0x67, + 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x38, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, 0x61, 0x73, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, 0x5d, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x55, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x73, + 0x65, 0x71, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x02, + 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x5f, 0x73, 0x65, + 0x71, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, + 0x5f, 0x73, 0x65, 0x74, 0x10, 0x04, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, + 0xba, 0x01, 0x0a, 0x0d, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x76, 0x70, 0x6e, 0x45, 0x76, 0x69, + 0x73, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x76, 0x70, + 0x6e, 0x45, 0x76, 0x69, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2f, + 0x0a, 0x09, 0x65, 0x76, 0x69, 0x5f, 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x76, 0x69, + 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x08, 0x65, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x1a, + 0x30, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x26, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x65, 0x76, 0x69, 0x5f, 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x10, + 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xad, 0x07, 0x0a, + 0x0d, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x12, 0x4e, + 0x0a, 0x11, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x64, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x42, 0x72, 0x6f, + 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x10, 0x62, 0x72, + 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x57, + 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x56, 0x34, 0x45, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x2e, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x6d, 0x73, 0x69, 0x5f, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x09, 0x70, + 0x6d, 0x73, 0x69, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x61, + 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x07, 0x61, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x4b, 0x0a, 0x13, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, + 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, + 0x73, 0x68, 0x65, 0x72, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x13, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x11, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x43, 0x0a, + 0x13, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x69, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, + 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x12, 0x48, 0x0a, 0x16, 0x6c, 0x33, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x13, 0x6c, 0x33, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x48, 0x0a, 0x16, + 0x6c, 0x33, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, + 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x52, 0x13, 0x6c, 0x33, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, + 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, + 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, + 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x65, + 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x27, 0x0a, + 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, + 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x43, 0x0a, 0x0f, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x30, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, + 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x6d, 0x73, 0x69, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x42, + 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0xe2, 0x01, 0x0a, + 0x1c, 0x42, 0x67, 0x70, 0x56, 0x34, 0x45, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x42, 0x72, + 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x37, 0x0a, + 0x0d, 0x63, 0x6d, 0x61, 0x63, 0x5f, 0x69, 0x70, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x4d, + 0x61, 0x63, 0x49, 0x70, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0b, 0x63, 0x6d, 0x61, 0x63, 0x49, + 0x70, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x54, 0x61, 0x67, 0x49, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x76, 0x6c, 0x61, 0x6e, 0x5f, 0x61, 0x77, 0x61, 0x72, + 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x01, 0x52, 0x10, 0x76, 0x6c, 0x61, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x76, + 0x6c, 0x61, 0x6e, 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x22, 0xd8, 0x04, 0x0a, 0x0e, 0x42, 0x67, 0x70, 0x43, 0x4d, 0x61, 0x63, 0x49, 0x70, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x6d, 0x61, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x4d, 0x41, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x0c, 0x6d, 0x61, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, + 0x19, 0x0a, 0x05, 0x6c, 0x32, 0x76, 0x6e, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, + 0x52, 0x05, 0x6c, 0x32, 0x76, 0x6e, 0x69, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x0e, 0x69, 0x70, + 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x65, 0x73, 0x12, 0x19, 0x0a, 0x05, 0x6c, 0x33, 0x76, 0x6e, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x05, 0x6c, 0x33, 0x76, 0x6e, 0x69, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, + 0x17, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, + 0x52, 0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x64, + 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, + 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x33, 0x0a, + 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x27, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, + 0x74, 0x68, 0x52, 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x32, 0x76, 0x6e, 0x69, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x6c, 0x33, 0x76, 0x6e, 0x69, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbd, 0x02, 0x0a, + 0x15, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x07, 0x72, 0x64, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, + 0x68, 0x65, 0x72, 0x2e, 0x52, 0x64, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x16, + 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x72, 0x64, 0x5f, 0x69, + 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x12, + 0x61, 0x75, 0x74, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x64, 0x49, 0x70, 0x41, 0x64, + 0x64, 0x72, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x07, 0x72, 0x64, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x51, 0x0a, 0x06, 0x52, 0x64, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x47, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x32, + 0x6f, 0x63, 0x74, 0x65, 0x74, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x61, 0x73, 0x5f, + 0x34, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x10, 0x03, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x72, 0x64, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x72, 0x64, 0x5f, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x42, + 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xdb, 0x01, 0x0a, + 0x0e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, + 0x3d, 0x0a, 0x07, 0x72, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x52, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1e, + 0x0a, 0x08, 0x72, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x07, 0x72, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x51, + 0x0a, 0x06, 0x52, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x47, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, + 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x10, 0x01, + 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x34, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x10, + 0x03, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x72, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0b, 0x0a, + 0x09, 0x5f, 0x72, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xf3, 0x03, 0x0a, 0x0b, 0x42, + 0x67, 0x70, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x12, 0x68, 0x6f, + 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x10, 0x68, 0x6f, 0x6c, 0x64, 0x54, 0x69, + 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, + 0x13, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x11, 0x6b, 0x65, + 0x65, 0x70, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, + 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0e, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, + 0x12, 0x25, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, + 0x4c, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x6d, 0x64, 0x35, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x06, 0x6d, 0x64, 0x35, 0x4b, + 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x0b, 0x70, + 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, + 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x06, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x5f, + 0x70, 0x6f, 0x72, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x07, 0x52, 0x0c, 0x6e, 0x65, + 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, + 0x13, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x61, 0x6c, + 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x12, 0x0a, 0x10, + 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, + 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x64, 0x35, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x0f, 0x0a, + 0x0d, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x42, 0x0e, + 0x0a, 0x0c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x10, + 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, + 0x22, 0x9a, 0x0d, 0x0a, 0x0d, 0x42, 0x67, 0x70, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, + 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x69, 0x70, + 0x76, 0x34, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x01, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, + 0x61, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, + 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x0b, + 0x69, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2a, + 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x4d, 0x75, + 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x76, 0x70, + 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x04, 0x76, 0x70, 0x6c, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x0c, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, + 0x10, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x06, 0x52, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, + 0x12, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x5f, + 0x76, 0x70, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x0f, 0x6c, 0x69, 0x6e, + 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x6e, 0x56, 0x70, 0x6e, 0x88, 0x01, 0x01, 0x12, + 0x29, 0x0a, 0x0e, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x70, + 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x08, 0x52, 0x0c, 0x6c, 0x69, 0x6e, 0x6b, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x56, 0x70, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x65, 0x76, + 0x70, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x48, 0x09, 0x52, 0x04, 0x65, 0x76, 0x70, 0x6e, + 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x1a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, + 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x48, 0x0a, 0x52, 0x17, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x76, 0x70, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x0b, 0x52, 0x10, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, + 0x73, 0x74, 0x56, 0x70, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x34, + 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x0c, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x70, 0x6c, 0x73, 0x56, 0x70, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x64, 0x74, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x0d, 0x52, 0x07, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x64, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, + 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x0e, 0x52, 0x14, 0x69, 0x70, 0x76, 0x34, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, + 0x61, 0x73, 0x74, 0x4d, 0x70, 0x6c, 0x73, 0x56, 0x70, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, + 0x16, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x6c, + 0x6f, 0x77, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x48, 0x0f, 0x52, + 0x13, 0x69, 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, 0x6c, 0x6f, 0x77, + 0x53, 0x70, 0x65, 0x63, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x11, 0x69, 0x70, 0x76, 0x34, 0x5f, + 0x73, 0x72, 0x5f, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x10, 0x52, 0x0e, 0x69, 0x70, 0x76, 0x34, 0x53, 0x72, 0x54, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x69, 0x70, 0x76, 0x34, 0x5f, + 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x48, 0x11, 0x52, 0x12, 0x69, 0x70, 0x76, 0x34, 0x55, 0x6e, + 0x69, 0x63, 0x61, 0x73, 0x74, 0x41, 0x64, 0x64, 0x50, 0x61, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, + 0x31, 0x0a, 0x12, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, + 0x74, 0x5f, 0x76, 0x70, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x48, 0x12, 0x52, 0x10, 0x69, + 0x70, 0x76, 0x36, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x56, 0x70, 0x6e, 0x88, + 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, + 0x76, 0x70, 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x48, 0x13, 0x52, 0x0b, 0x69, 0x70, 0x76, + 0x36, 0x4d, 0x70, 0x6c, 0x73, 0x56, 0x70, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x69, + 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x64, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x48, 0x14, 0x52, + 0x07, 0x69, 0x70, 0x76, 0x36, 0x4d, 0x64, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, + 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x70, + 0x6c, 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x48, 0x15, 0x52, 0x14, + 0x69, 0x70, 0x76, 0x36, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x4d, 0x70, 0x6c, + 0x73, 0x56, 0x70, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x16, 0x69, 0x70, 0x76, 0x36, 0x5f, + 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x48, 0x16, 0x52, 0x13, 0x69, 0x70, 0x76, 0x36, 0x55, + 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x70, 0x65, 0x63, 0x88, 0x01, + 0x01, 0x12, 0x2e, 0x0a, 0x11, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x73, 0x72, 0x5f, 0x74, 0x65, 0x5f, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x18, 0x20, 0x01, 0x28, 0x08, 0x48, 0x17, 0x52, 0x0e, + 0x69, 0x70, 0x76, 0x36, 0x53, 0x72, 0x54, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x88, 0x01, + 0x01, 0x12, 0x36, 0x0a, 0x15, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, + 0x74, 0x5f, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x18, 0x52, 0x12, 0x69, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x41, + 0x64, 0x64, 0x50, 0x61, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, + 0x76, 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x69, + 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x42, 0x0f, 0x0a, + 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x42, 0x11, + 0x0a, 0x0f, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, + 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x76, 0x70, 0x6c, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x42, 0x13, 0x0a, 0x11, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x74, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x5f, 0x6e, 0x6f, 0x6e, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6c, 0x69, 0x6e, + 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x65, 0x76, 0x70, 0x6e, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, + 0x64, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x69, + 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x0b, 0x0a, 0x09, + 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x64, 0x74, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x70, + 0x76, 0x34, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x70, 0x6c, + 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, + 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x70, 0x65, 0x63, + 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x73, 0x72, 0x5f, 0x74, 0x65, 0x5f, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, + 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, + 0x61, 0x73, 0x74, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x69, 0x70, 0x76, 0x36, + 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x70, + 0x76, 0x36, 0x5f, 0x6d, 0x64, 0x74, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x76, + 0x70, 0x6e, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, + 0x61, 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x42, 0x14, 0x0a, + 0x12, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x73, 0x72, 0x5f, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, 0x69, + 0x63, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x22, 0xb7, 0x01, + 0x0a, 0x1b, 0x42, 0x67, 0x70, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, + 0x13, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x11, 0x75, 0x6e, + 0x69, 0x63, 0x61, 0x73, 0x74, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, + 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x70, + 0x76, 0x36, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x01, 0x52, 0x11, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x49, 0x70, 0x76, 0x36, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x75, 0x6e, 0x69, 0x63, + 0x61, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, + 0x16, 0x0a, 0x14, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x76, 0x36, + 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0xbb, 0x07, 0x0a, 0x0f, 0x42, 0x67, 0x70, 0x56, + 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x4e, + 0x0a, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, + 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4e, 0x65, 0x78, 0x74, + 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0b, + 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x64, + 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x12, 0x6e, + 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, + 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, 0x70, + 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x12, 0x6e, + 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, + 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, + 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x07, + 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x61, + 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2a, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x41, 0x64, 0x64, 0x50, 0x61, 0x74, 0x68, 0x52, 0x07, 0x61, 0x64, 0x64, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x04, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x78, + 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x43, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x14, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x74, 0x79, 0x52, 0x13, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x40, 0x0a, 0x0b, 0x4e, 0x65, 0x78, 0x74, 0x48, + 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x31, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x0c, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x10, 0x02, 0x1a, 0x41, 0x0a, 0x12, 0x4e, 0x65, 0x78, + 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, + 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, 0x02, 0x42, 0x10, 0x0a, 0x0e, + 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x42, 0x18, + 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, + 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x36, 0x0a, 0x0a, 0x42, 0x67, 0x70, 0x41, 0x64, 0x64, 0x50, + 0x61, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, 0x88, 0x01, + 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x22, 0x93, 0x08, + 0x0a, 0x14, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6a, 0x0a, 0x19, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, + 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, + 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x16, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, + 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x73, 0x0a, 0x1c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x6a, 0x0a, 0x19, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x34, 0x6f, 0x63, 0x74, 0x65, 0x74, + 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, + 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x6f, 0x63, 0x74, 0x65, + 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x63, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, 0x61, 0x71, + 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5d, 0x0a, 0x14, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x76, 0x70, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x45, + 0x76, 0x70, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x45, 0x76, 0x70, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x6e, + 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x32, 0x6f, + 0x63, 0x74, 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x4e, 0x6f, 0x6e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, + 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x19, 0x6e, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0xe7, + 0x01, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xdc, 0x01, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x34, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x10, 0x04, 0x12, + 0x18, 0x0a, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x76, + 0x70, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x10, 0x05, 0x12, 0x21, 0x0a, 0x1d, 0x6e, 0x6f, 0x6e, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x32, 0x6f, 0x63, 0x74, + 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x07, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x35, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2b, 0x0a, + 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, + 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x34, 0x62, + 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, + 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x42, + 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, 0x74, 0x65, 0x5f, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xbf, 0x01, 0x0a, 0x35, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, + 0x2b, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, + 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x6c, 0x6f, 0x62, + 0x61, 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x34, 0x62, 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, + 0x10, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, + 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, 0x74, + 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xc4, 0x03, 0x0a, 0x2a, 0x42, 0x67, 0x70, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, + 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, + 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x6c, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, + 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x6c, + 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, + 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x4f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x55, 0x0a, 0x06, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, + 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, + 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xc8, + 0x01, 0x0a, 0x38, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x2f, 0x0a, 0x11, 0x67, + 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, + 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, + 0x12, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, + 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xc8, 0x01, 0x0a, 0x38, 0x42, 0x67, + 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x11, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, + 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x41, + 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x67, 0x6c, 0x6f, + 0x62, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x42, 0x14, + 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xd0, 0x03, 0x0a, 0x2d, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x6f, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x75, 0x62, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x6f, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x75, + 0x62, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x55, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x4b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, + 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x35, 0x42, 0x67, 0x70, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, 0x65, 0x74, + 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x12, 0x2b, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, 0x74, + 0x65, 0x5f, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x6c, + 0x6f, 0x62, 0x61, 0x6c, 0x34, 0x62, 0x79, 0x74, 0x65, 0x41, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2f, + 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, + 0x12, 0x0a, 0x10, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, 0x74, 0x65, + 0x5f, 0x61, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, + 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xbf, 0x01, 0x0a, 0x35, 0x42, 0x67, + 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, + 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x12, 0x2b, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x34, 0x62, + 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, + 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x34, 0x62, 0x79, 0x74, 0x65, 0x41, 0x73, 0x88, 0x01, 0x01, + 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, + 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, + 0x74, 0x65, 0x5f, 0x61, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, + 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xc4, 0x03, 0x0a, 0x2a, + 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, + 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, + 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x6c, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x12, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x6c, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, + 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x12, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, + 0x1a, 0x55, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4b, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x01, 0x12, 0x18, 0x0a, + 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x75, + 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x22, 0x79, 0x0a, 0x2d, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, + 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, + 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, + 0x61, 0x67, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x22, 0x9b, 0x01, + 0x0a, 0x35, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, + 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x63, 0x61, 0x70, 0x73, + 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x0a, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0b, + 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa8, 0x03, 0x0a, 0x28, + 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, + 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x56, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, + 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, 0x61, + 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x57, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, 0x61, 0x71, + 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x0c, 0x63, 0x6f, 0x6c, + 0x6f, 0x72, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x6f, 0x0a, 0x15, 0x65, 0x6e, 0x63, + 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, + 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, 0x61, + 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x4f, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x45, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x11, 0x0a, + 0x0d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x01, + 0x12, 0x19, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x64, 0x0a, 0x2f, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x45, 0x76, 0x70, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x63, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x09, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x63, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, + 0x0b, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x63, 0x22, 0xa8, 0x02, 0x0a, + 0x26, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x45, + 0x76, 0x70, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x54, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x45, 0x76, 0x70, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x62, 0x0a, + 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x63, 0x5f, 0x73, 0x75, 0x62, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x45, 0x76, + 0x70, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x63, 0x52, + 0x10, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x63, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, + 0x65, 0x1a, 0x39, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2f, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6d, + 0x61, 0x63, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x3a, 0x42, 0x67, 0x70, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, + 0x4e, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, + 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x42, 0x61, 0x6e, + 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x2b, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, + 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x0d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x48, 0x01, 0x52, 0x09, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, + 0x64, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, + 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x62, + 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x22, 0xcd, 0x02, 0x0a, 0x2d, 0x42, 0x67, 0x70, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x4e, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, + 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5b, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x4e, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x75, 0x0a, 0x16, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, + 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x74, 0x79, 0x4e, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, + 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x42, + 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x52, 0x14, 0x6c, 0x69, 0x6e, 0x6b, 0x42, 0x61, + 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x3d, + 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x33, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, + 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, + 0x64, 0x74, 0x68, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x01, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xcc, 0x01, 0x0a, 0x1e, 0x42, 0x67, 0x70, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x63, + 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x53, + 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xbb, 0x07, 0x0a, 0x0f, 0x42, 0x67, 0x70, 0x56, + 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x4e, + 0x0a, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, + 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4e, 0x65, 0x78, 0x74, + 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0b, + 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x64, + 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x12, 0x6e, + 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, + 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, 0x70, + 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x12, 0x6e, + 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, + 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, + 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x07, + 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x61, + 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2a, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x41, 0x64, 0x64, 0x50, 0x61, 0x74, 0x68, 0x52, 0x07, 0x61, 0x64, 0x64, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x04, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x78, + 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x43, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x14, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x74, 0x79, 0x52, 0x13, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x40, 0x0a, 0x0b, 0x4e, 0x65, 0x78, 0x74, 0x48, + 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x31, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x0c, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x10, 0x02, 0x1a, 0x41, 0x0a, 0x12, 0x4e, 0x65, 0x78, + 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, + 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, 0x02, 0x42, 0x10, 0x0a, 0x0e, + 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x42, 0x18, + 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, + 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xba, 0x08, 0x0a, 0x0f, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, + 0x65, 0x56, 0x34, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x29, 0x0a, 0x0d, 0x64, 0x69, 0x73, + 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x00, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, + 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, + 0x28, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x0d, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, 0x34, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, + 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x03, 0x52, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x48, + 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x64, 0x0a, 0x15, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, 0x34, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4e, + 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x04, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, + 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x36, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x34, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, + 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, + 0x70, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, + 0x31, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, + 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x64, + 0x64, 0x50, 0x61, 0x74, 0x68, 0x52, 0x07, 0x61, 0x64, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x27, + 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, + 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x33, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, + 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0f, + 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, + 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, + 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x65, 0x78, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x74, 0x6c, 0x76, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, 0x34, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x6c, 0x76, 0x52, 0x0a, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x54, 0x6c, 0x76, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x48, 0x08, + 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x40, 0x0a, 0x0b, 0x4e, + 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x31, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x10, + 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x10, 0x02, 0x1a, 0x41, 0x0a, + 0x12, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, + 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, 0x02, + 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, + 0x65, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x42, 0x10, 0x0a, 0x0e, + 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x10, + 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, + 0x70, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x22, 0xdd, 0x05, 0x0a, 0x12, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, 0x34, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x6c, 0x76, 0x12, 0x57, 0x0a, 0x17, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x75, 0x62, + 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x14, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x54, + 0x6c, 0x76, 0x12, 0x3b, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x5f, + 0x74, 0x6c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x75, 0x62, 0x54, + 0x6c, 0x76, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, + 0x41, 0x0a, 0x0f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, + 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, + 0x54, 0x6c, 0x76, 0x52, 0x0d, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, 0x54, + 0x6c, 0x76, 0x12, 0x4a, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x50, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x10, 0x70, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x57, + 0x0a, 0x17, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, + 0x76, 0x52, 0x14, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x4b, 0x0a, 0x13, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, + 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, 0x62, 0x54, + 0x6c, 0x76, 0x52, 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, + 0x62, 0x54, 0x6c, 0x76, 0x12, 0x74, 0x0a, 0x22, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, + 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x45, 0x78, + 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x1d, 0x65, 0x78, 0x70, + 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x3c, 0x0a, 0x0d, 0x73, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0c, 0x73, 0x65, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x22, 0xf1, 0x02, 0x0a, 0x1b, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x52, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x54, + 0x6c, 0x76, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x88, 0x01, 0x01, 0x12, 0x5f, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, + 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x01, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x46, 0x61, 0x6d, 0x69, + 0x6c, 0x79, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0b, 0x69, + 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, + 0x0c, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x22, 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, + 0x36, 0x10, 0x02, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x66, 0x61, + 0x6d, 0x69, 0x6c, 0x79, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x39, 0x0a, 0x12, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, + 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x63, + 0x6f, 0x6c, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, + 0x72, 0x22, 0x9f, 0x03, 0x0a, 0x14, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x42, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x5c, 0x0a, 0x10, 0x62, 0x69, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, + 0x74, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x2e, + 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, + 0x64, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x6f, 0x75, 0x72, + 0x5f, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x0c, 0x66, 0x6f, 0x75, 0x72, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x53, 0x69, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x07, 0x69, 0x70, 0x76, 0x36, 0x53, 0x69, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x73, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x05, 0x73, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, 0x12, + 0x1a, 0x0a, 0x06, 0x69, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x04, 0x52, 0x05, 0x69, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, 0x1a, 0x5b, 0x0a, 0x0e, 0x42, + 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x22, 0x49, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x6e, 0x6f, 0x5f, 0x62, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x6f, 0x75, 0x72, 0x5f, 0x6f, + 0x63, 0x74, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x64, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x69, 0x70, + 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x10, 0x03, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x62, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x11, 0x0a, + 0x0f, 0x5f, 0x66, 0x6f, 0x75, 0x72, 0x5f, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x64, + 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x73, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x69, 0x5f, 0x66, + 0x6c, 0x61, 0x67, 0x22, 0x4d, 0x0a, 0x17, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x50, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x23, + 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x22, 0x5f, 0x0a, 0x1b, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, + 0x76, 0x12, 0x2c, 0x0a, 0x0f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x42, + 0x12, 0x0a, 0x10, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x22, 0x4f, 0x0a, 0x17, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x24, + 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xf0, 0x02, 0x0a, 0x24, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, + 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x88, 0x01, + 0x0a, 0x1a, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, + 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x2e, 0x45, 0x78, + 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x17, 0x65, 0x78, + 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x88, 0x01, 0x01, 0x1a, 0x9d, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x70, + 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x22, 0x81, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x11, + 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x6c, 0x70, 0x10, + 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x65, + 0x6e, 0x6c, 0x70, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x70, + 0x76, 0x36, 0x5f, 0x65, 0x6e, 0x6c, 0x70, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x70, 0x75, 0x73, + 0x68, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x65, 0x6e, 0x6c, 0x70, + 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x70, 0x75, 0x73, + 0x68, 0x5f, 0x65, 0x6e, 0x6c, 0x70, 0x10, 0x05, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x65, 0x78, 0x70, + 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xb7, 0x01, 0x0a, 0x12, 0x42, 0x67, 0x70, 0x53, + 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1b, + 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, + 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x08, 0x73, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x88, + 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x22, 0xc4, 0x07, 0x0a, 0x0e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0c, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x0b, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, + 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, + 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x41, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, + 0x65, 0x5f, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x54, + 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x42, + 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, + 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x43, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x54, 0x79, 0x70, + 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x44, 0x12, 0x35, + 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x45, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, + 0x74, 0x79, 0x70, 0x65, 0x45, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x66, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, + 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x54, 0x79, 0x70, 0x65, 0x53, + 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x46, 0x12, 0x35, 0x0a, 0x06, + 0x74, 0x79, 0x70, 0x65, 0x5f, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x47, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, + 0x70, 0x65, 0x47, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x68, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, + 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, + 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x48, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, + 0x70, 0x65, 0x5f, 0x69, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, + 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, + 0x49, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6a, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4a, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, + 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, + 0x5f, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x54, 0x79, + 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x4b, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x88, 0x01, 0x01, 0x1a, 0xab, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x74, + 0x79, 0x70, 0x65, 0x5f, 0x62, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, + 0x63, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x64, 0x10, 0x04, 0x12, + 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x65, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x74, + 0x79, 0x70, 0x65, 0x5f, 0x66, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, + 0x67, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x68, 0x10, 0x08, 0x12, + 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x10, 0x09, 0x12, 0x0a, 0x0a, 0x06, 0x74, + 0x79, 0x70, 0x65, 0x5f, 0x6a, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, + 0x6b, 0x10, 0x0b, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x10, 0x42, 0x67, 0x70, + 0x53, 0x72, 0x74, 0x65, 0x53, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x12, 0x19, 0x0a, + 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x74, 0x63, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x02, 0x74, 0x63, 0x88, 0x01, 0x01, 0x12, 0x18, 0x0a, + 0x05, 0x73, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x04, + 0x73, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x74, 0x63, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x5f, 0x62, 0x69, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x74, 0x74, + 0x6c, 0x22, 0xf5, 0x01, 0x0a, 0x2a, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x52, 0x76, + 0x36, 0x53, 0x49, 0x44, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, + 0x12, 0x20, 0x0a, 0x09, 0x6c, 0x62, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x6c, 0x62, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, + 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6c, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x08, 0x6c, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x66, 0x75, 0x6e, 0x63, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0a, 0x66, 0x75, 0x6e, + 0x63, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x72, + 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, + 0x52, 0x09, 0x61, 0x72, 0x67, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x0c, + 0x0a, 0x0a, 0x5f, 0x6c, 0x62, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x0c, 0x0a, 0x0a, + 0x5f, 0x6c, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, + 0x75, 0x6e, 0x63, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, + 0x72, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x01, 0x0a, 0x19, 0x42, 0x67, + 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x54, 0x79, 0x70, + 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, + 0x02, 0x74, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x02, 0x74, 0x63, 0x88, + 0x01, 0x01, 0x12, 0x18, 0x0a, 0x05, 0x73, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x03, 0x52, 0x04, 0x73, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, + 0x74, 0x74, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x03, 0x74, 0x74, 0x6c, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x74, 0x63, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x73, 0x5f, 0x62, 0x69, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x74, 0x74, 0x6c, + 0x22, 0xdb, 0x01, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x42, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, + 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x73, 0x72, 0x76, + 0x36, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x73, + 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x6c, 0x0a, 0x1a, 0x73, 0x72, 0x76, + 0x36, 0x5f, 0x73, 0x69, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x62, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x52, 0x76, 0x36, 0x53, + 0x49, 0x44, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x52, 0x17, + 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, + 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x22, 0xf7, + 0x01, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x43, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, + 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x66, + 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x72, 0x5f, 0x61, 0x6c, + 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x0b, 0x73, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x88, 0x01, 0x01, 0x12, + 0x2f, 0x0a, 0x11, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0f, 0x69, 0x70, + 0x76, 0x34, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, + 0x12, 0x35, 0x0a, 0x0b, 0x73, 0x72, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, + 0x72, 0x74, 0x65, 0x53, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x52, 0x09, 0x73, 0x72, + 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, + 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, + 0x68, 0x6d, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xf7, 0x01, 0x0a, 0x19, 0x42, 0x67, 0x70, + 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x54, 0x79, 0x70, 0x65, + 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, + 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0b, 0x73, 0x72, 0x41, 0x6c, 0x67, + 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x69, 0x70, 0x76, + 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0f, 0x69, 0x70, 0x76, 0x36, 0x4e, 0x6f, 0x64, 0x65, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x0b, 0x73, 0x72, + 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x72, 0x4d, + 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x52, 0x09, 0x73, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, + 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, + 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x42, 0x14, 0x0a, 0x12, + 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x88, 0x02, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, + 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2f, + 0x0a, 0x11, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0f, 0x69, 0x70, 0x76, + 0x34, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, + 0x35, 0x0a, 0x0b, 0x73, 0x72, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, + 0x74, 0x65, 0x53, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x52, 0x09, 0x73, 0x72, 0x4d, + 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, + 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x69, 0x70, 0x76, 0x34, + 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x8e, 0x02, + 0x0a, 0x19, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x46, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, 0x66, + 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, + 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, + 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x35, + 0x0a, 0x0b, 0x73, 0x72, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, + 0x65, 0x53, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x52, 0x09, 0x73, 0x72, 0x4d, 0x70, + 0x6c, 0x73, 0x53, 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, + 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xc1, + 0x03, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x47, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, + 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x66, + 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x14, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x18, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, + 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x6f, 0x64, 0x65, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x0b, 0x73, 0x72, 0x5f, + 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x72, 0x4d, 0x70, + 0x6c, 0x73, 0x53, 0x69, 0x64, 0x52, 0x09, 0x73, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, + 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x16, 0x0a, + 0x14, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x8e, 0x02, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, + 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x33, + 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x11, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x0b, 0x73, 0x72, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x52, + 0x09, 0x73, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, + 0x6c, 0x61, 0x67, 0x73, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, + 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, + 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x54, 0x79, 0x70, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, + 0x76, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, + 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0f, 0x69, 0x70, 0x76, 0x36, 0x4e, + 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, + 0x08, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x02, 0x52, 0x07, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x6c, 0x0a, + 0x1a, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, + 0x52, 0x76, 0x36, 0x53, 0x49, 0x44, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, + 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, + 0x72, 0x65, 0x52, 0x17, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x22, 0xde, 0x04, 0x0a, 0x19, 0x42, 0x67, 0x70, + 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4a, 0x54, 0x79, 0x70, 0x65, + 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, 0x01, + 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0b, 0x73, 0x72, 0x41, 0x6c, 0x67, + 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, + 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, + 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, + 0x18, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x05, 0x52, 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x6f, 0x64, + 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x73, + 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, + 0x07, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x6c, 0x0a, 0x1a, 0x73, + 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x52, 0x76, + 0x36, 0x53, 0x49, 0x44, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, + 0x52, 0x17, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, + 0x61, 0x67, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, + 0x69, 0x74, 0x68, 0x6d, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x1a, 0x0a, 0x18, 0x5f, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6d, 0x6f, + 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, + 0x1b, 0x0a, 0x19, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0b, 0x0a, 0x09, + 0x5f, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x22, 0xab, 0x03, 0x0a, 0x19, 0x42, 0x67, + 0x70, 0x53, 0x72, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x54, 0x79, 0x70, + 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x88, + 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, + 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0b, 0x73, 0x72, 0x41, 0x6c, + 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, + 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, + 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x11, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, + 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x07, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x6c, 0x0a, 0x1a, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x5f, 0x65, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x53, 0x72, 0x74, 0x65, 0x53, 0x52, 0x76, 0x36, 0x53, 0x49, 0x44, 0x45, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x64, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x52, 0x17, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, + 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, + 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x42, 0x15, 0x0a, 0x13, 0x5f, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, + 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, + 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x22, 0xb9, 0x08, 0x0a, 0x0f, 0x42, 0x67, 0x70, 0x53, + 0x72, 0x74, 0x65, 0x56, 0x36, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x29, 0x0a, 0x0d, 0x64, + 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, + 0x68, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x88, 0x01, + 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x69, 0x70, 0x76, 0x36, + 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, + 0x56, 0x36, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, + 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x03, 0x52, 0x0b, 0x6e, 0x65, 0x78, + 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x64, 0x0a, 0x15, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, 0x36, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x04, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, + 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x36, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, + 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x05, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x15, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, + 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, + 0x01, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, + 0x6e, 0x63, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x41, 0x64, 0x64, 0x50, 0x61, 0x74, 0x68, 0x52, 0x07, 0x61, 0x64, 0x64, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x27, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, + 0x68, 0x52, 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x33, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3c, + 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x45, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x65, 0x78, + 0x74, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x0b, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x74, 0x6c, 0x76, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, + 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x6c, 0x76, 0x52, 0x0a, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x54, 0x6c, 0x76, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x40, 0x0a, 0x0b, + 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x31, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, + 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x10, 0x02, 0x1a, 0x41, + 0x0a, 0x12, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, + 0x04, 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, + 0x02, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, + 0x68, 0x65, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x42, 0x10, 0x0a, + 0x0e, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, + 0x10, 0x0a, 0x0e, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, + 0x6f, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x22, 0xdd, 0x05, 0x0a, 0x12, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, + 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x6c, 0x76, 0x12, 0x57, 0x0a, 0x17, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x75, + 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x14, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x75, 0x62, + 0x54, 0x6c, 0x76, 0x12, 0x3b, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x73, 0x75, 0x62, + 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x75, 0x62, + 0x54, 0x6c, 0x76, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, + 0x12, 0x41, 0x0a, 0x0f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x62, 0x5f, + 0x74, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x75, + 0x62, 0x54, 0x6c, 0x76, 0x52, 0x0d, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, + 0x54, 0x6c, 0x76, 0x12, 0x4a, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x50, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x10, 0x70, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, + 0x57, 0x0a, 0x17, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x53, 0x75, 0x62, 0x54, + 0x6c, 0x76, 0x52, 0x14, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x4b, 0x0a, 0x13, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, + 0x72, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, 0x62, + 0x54, 0x6c, 0x76, 0x52, 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x53, + 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x74, 0x0a, 0x22, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, + 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x45, + 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x52, 0x1d, 0x65, 0x78, + 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x75, 0x62, 0x54, 0x6c, 0x76, 0x12, 0x3c, 0x0a, 0x0d, 0x73, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, + 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0c, 0x73, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x22, 0xb4, 0x02, 0x0a, 0x12, 0x42, 0x67, 0x70, 0x47, 0x72, 0x61, 0x63, 0x65, + 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x67, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, + 0x08, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x47, 0x72, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, + 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6c, + 0x6c, 0x67, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x0a, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x4c, 0x6c, 0x67, 0x72, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x74, + 0x61, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x34, + 0x0a, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x12, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x67, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6c, + 0x6c, 0x67, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x6f, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x92, 0x02, 0x0a, 0x0f, 0x42, + 0x67, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x12, 0x3d, + 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x70, 0x6c, 0x61, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3f, 0x0a, + 0x0f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x64, 0x75, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x50, 0x64, 0x75, 0x73, 0x52, 0x0e, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x50, 0x64, 0x75, 0x73, 0x12, 0x2d, + 0x0a, 0x09, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x61, 0x77, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x52, 0x08, 0x72, 0x61, 0x77, 0x42, 0x79, 0x74, 0x65, 0x73, 0x1a, 0x45, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x3b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x13, 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x5f, 0x70, + 0x64, 0x75, 0x73, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x40, 0x0a, 0x0b, 0x42, 0x67, 0x70, 0x52, 0x61, 0x77, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x31, + 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x73, 0x22, 0x7a, 0x0a, 0x12, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x5f, + 0x67, 0x61, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, + 0x65, 0x47, 0x61, 0x70, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, + 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x67, 0x61, 0x70, 0x42, 0x0f, 0x0a, 0x0d, + 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x50, 0x0a, + 0x11, 0x42, 0x67, 0x70, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x50, 0x64, + 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x22, + 0xc0, 0x02, 0x0a, 0x1c, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x75, 0x72, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, + 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x67, 0x61, 0x70, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x47, 0x61, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x3b, 0x0a, 0x0f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x0e, 0x70, + 0x61, 0x74, 0x68, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x5c, 0x0a, + 0x19, 0x74, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x72, + 0x65, 0x61, 0x63, 0x68, 0x5f, 0x6e, 0x6c, 0x72, 0x69, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x54, 0x72, 0x61, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x6c, 0x72, 0x69, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x52, 0x17, 0x74, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, + 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x4e, 0x6c, 0x72, 0x69, 0x73, 0x12, 0x58, 0x0a, 0x17, 0x74, + 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x61, 0x63, 0x68, + 0x5f, 0x6e, 0x6c, 0x72, 0x69, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x54, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x6c, 0x72, 0x69, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x15, + 0x74, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x61, 0x63, 0x68, + 0x4e, 0x6c, 0x72, 0x69, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x67, + 0x61, 0x70, 0x22, 0xa3, 0x01, 0x0a, 0x1b, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x54, 0x72, 0x61, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x6c, 0x72, 0x69, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x31, + 0x0a, 0x07, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x50, 0x61, 0x74, 0x68, 0x49, 0x64, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, + 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x9c, 0x01, 0x0a, 0x14, 0x42, 0x67, 0x70, + 0x4f, 0x6e, 0x65, 0x49, 0x70, 0x76, 0x34, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, + 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, + 0x07, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x50, 0x61, 0x74, 0x68, 0x49, 0x64, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, + 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x9c, 0x01, 0x0a, 0x14, 0x42, 0x67, 0x70, 0x4f, + 0x6e, 0x65, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x07, + 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x50, 0x61, 0x74, 0x68, 0x49, 0x64, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, 0x42, + 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x3a, 0x0a, 0x13, 0x42, 0x67, 0x70, 0x4e, 0x4c, 0x52, + 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x50, 0x61, 0x74, 0x68, 0x49, 0x64, 0x12, 0x19, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0xab, 0x01, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x12, 0x29, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, + 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x63, 0x6f, + 0x6c, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x64, 0x69, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, + 0x6c, 0x6f, 0x72, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x22, 0xab, 0x01, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x49, 0x70, 0x76, 0x36, 0x53, 0x72, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x29, + 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x6c, + 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, + 0x72, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, + 0x72, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0xe2, + 0x09, 0x0a, 0x0d, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x12, 0x4b, 0x0a, 0x10, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4f, 0x74, + 0x68, 0x65, 0x72, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0f, 0x6f, 0x74, + 0x68, 0x65, 0x72, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x3b, 0x0a, + 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x07, 0x61, 0x73, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, + 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x34, 0x0a, + 0x08, 0x61, 0x73, 0x34, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x41, 0x73, 0x34, 0x50, 0x61, 0x74, 0x68, 0x52, 0x07, 0x61, 0x73, 0x34, 0x50, + 0x61, 0x74, 0x68, 0x12, 0x34, 0x0a, 0x08, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, + 0x52, 0x07, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x12, 0x62, 0x0a, 0x18, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x45, 0x78, 0x69, 0x74, 0x44, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x16, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x45, 0x78, 0x69, 0x74, + 0x44, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4c, 0x0a, + 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x6c, + 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3f, 0x0a, 0x19, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x5f, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, + 0x52, 0x17, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x0a, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0a, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x46, 0x0a, 0x0e, 0x61, 0x73, + 0x34, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x34, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x52, 0x0d, 0x61, 0x73, 0x34, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x39, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x18, + 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x74, 0x79, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x43, 0x0a, + 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x6f, 0x72, 0x49, 0x64, 0x52, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x49, 0x64, 0x73, 0x12, 0x4c, 0x0a, 0x14, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, + 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x13, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x58, 0x0a, 0x14, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x65, 0x6e, 0x63, 0x61, + 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, + 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x08, 0x6d, + 0x70, 0x5f, 0x72, 0x65, 0x61, 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x4d, 0x70, 0x52, 0x65, 0x61, 0x63, 0x68, 0x4e, 0x6c, 0x72, 0x69, 0x52, 0x07, 0x6d, 0x70, + 0x52, 0x65, 0x61, 0x63, 0x68, 0x12, 0x3e, 0x0a, 0x0a, 0x6d, 0x70, 0x5f, 0x75, 0x6e, 0x72, 0x65, + 0x61, 0x63, 0x68, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4d, 0x70, 0x55, + 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x4e, 0x6c, 0x72, 0x69, 0x52, 0x09, 0x6d, 0x70, 0x55, 0x6e, + 0x72, 0x65, 0x61, 0x63, 0x68, 0x1a, 0x43, 0x0a, 0x06, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, + 0x39, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x69, 0x67, 0x70, 0x10, + 0x01, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x67, 0x70, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x69, 0x6e, + 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x42, 0x1c, 0x0a, 0x1a, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x5f, 0x61, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x22, 0xf6, 0x02, 0x0a, 0x1b, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x66, 0x6c, + 0x61, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, + 0x0f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x0e, 0x66, 0x6c, 0x61, 0x67, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x66, + 0x6c, 0x61, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x02, 0x52, 0x0b, 0x66, 0x6c, 0x61, 0x67, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, + 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x14, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x03, 0x52, 0x12, 0x66, 0x6c, 0x61, 0x67, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, + 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x72, 0x61, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x08, 0x72, 0x61, 0x77, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x66, 0x6c, 0x61, 0x67, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, + 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x17, 0x0a, 0x15, + 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0c, + 0x0a, 0x0a, 0x5f, 0x72, 0x61, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd6, 0x02, 0x0a, + 0x13, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, + 0x50, 0x61, 0x74, 0x68, 0x12, 0x41, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x2e, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x51, 0x0a, 0x11, 0x66, 0x6f, 0x75, 0x72, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x46, 0x6f, 0x75, 0x72, + 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x0e, 0x66, 0x6f, 0x75, 0x72, + 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x4e, 0x0a, 0x10, 0x74, 0x77, + 0x6f, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x54, 0x77, + 0x6f, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x0d, 0x74, 0x77, 0x6f, + 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x4e, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x44, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x15, 0x0a, + 0x11, 0x66, 0x6f, 0x75, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x5f, 0x70, 0x61, + 0x74, 0x68, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x74, 0x77, 0x6f, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x5f, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x68, 0x0a, 0x21, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x46, 0x6f, 0x75, 0x72, + 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x43, 0x0a, 0x08, 0x73, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x46, 0x6f, 0x75, 0x72, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, + 0xf7, 0x01, 0x0a, 0x22, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x46, 0x6f, 0x75, 0x72, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x46, 0x6f, 0x75, 0x72, 0x42, 0x79, 0x74, 0x65, + 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x79, + 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x1a, 0x5d, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x22, 0x55, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x73, 0x65, 0x71, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x73, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x71, 0x10, 0x03, 0x12, 0x11, 0x0a, + 0x0d, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x04, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x66, 0x0a, 0x20, 0x42, 0x67, 0x70, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, + 0x54, 0x77, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x42, 0x0a, + 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x54, 0x77, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, + 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x22, 0xf5, 0x01, 0x0a, 0x21, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x54, 0x77, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, + 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x54, 0x77, 0x6f, 0x42, 0x79, 0x74, 0x65, + 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x79, + 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x1a, 0x5d, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x22, 0x55, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x73, 0x65, 0x71, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x73, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x71, 0x10, 0x03, 0x12, 0x11, 0x0a, + 0x0d, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x04, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x5b, 0x0a, 0x14, 0x42, 0x67, 0x70, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x73, 0x34, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x43, 0x0a, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x46, 0x6f, 0x75, 0x72, 0x42, 0x79, 0x74, 0x65, 0x41, + 0x73, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd7, 0x02, 0x0a, 0x17, 0x42, 0x67, 0x70, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0c, 0x66, 0x6f, 0x75, + 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x0a, 0x66, 0x6f, 0x75, 0x72, 0x42, 0x79, 0x74, 0x65, 0x41, 0x73, 0x88, 0x01, 0x01, + 0x12, 0x23, 0x0a, 0x0b, 0x74, 0x77, 0x6f, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x09, 0x74, 0x77, 0x6f, 0x42, 0x79, 0x74, 0x65, + 0x41, 0x73, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0b, 0x69, + 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x44, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x3a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x10, 0x0a, 0x0c, 0x66, 0x6f, 0x75, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, + 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x77, 0x6f, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, + 0x73, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0f, + 0x0a, 0x0d, 0x5f, 0x66, 0x6f, 0x75, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x42, + 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x77, 0x6f, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x42, + 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x22, 0x7c, 0x0a, 0x1a, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x41, 0x73, 0x34, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1a, + 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, + 0x52, 0x05, 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, + 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, + 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x42, 0x0f, 0x0a, + 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xca, + 0x02, 0x0a, 0x16, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x4c, 0x0a, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, + 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0f, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x1a, 0x90, 0x01, + 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x6e, 0x6f, 0x5f, 0x65, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x6e, 0x6f, 0x5f, 0x61, 0x64, + 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x6e, 0x6f, + 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6e, 0x66, 0x65, + 0x64, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x6c, 0x6c, 0x67, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x6c, + 0x65, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x6e, 0x6f, 0x5f, 0x6c, 0x6c, 0x67, 0x72, 0x10, 0x06, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x76, 0x0a, 0x1c, 0x42, + 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x09, 0x61, + 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, + 0x52, 0x08, 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, + 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x22, 0xd1, 0x02, 0x0a, 0x14, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x12, 0x42, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x17, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, + 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x69, 0x70, 0x76, + 0x36, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, 0x88, + 0x01, 0x01, 0x12, 0x57, 0x0a, 0x12, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x74, 0x77, 0x6f, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x36, 0x54, 0x77, 0x6f, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x10, 0x69, 0x70, 0x76, 0x36, 0x54, + 0x77, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x1a, 0x4d, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x43, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, + 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, + 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x74, 0x77, 0x6f, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x22, 0x73, 0x0a, 0x24, 0x42, 0x67, 0x70, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x49, + 0x70, 0x76, 0x36, 0x54, 0x77, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, + 0x19, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x73, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x96, 0x04, 0x0a, + 0x18, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4d, 0x70, + 0x52, 0x65, 0x61, 0x63, 0x68, 0x4e, 0x6c, 0x72, 0x69, 0x12, 0x34, 0x0a, 0x08, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4e, + 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x52, 0x07, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x12, + 0x46, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x4d, 0x70, 0x52, 0x65, 0x61, 0x63, 0x68, 0x4e, 0x6c, 0x72, 0x69, 0x2e, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, + 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x49, 0x70, 0x76, 0x34, 0x4e, 0x4c, + 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x55, 0x6e, + 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, + 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x4c, 0x52, 0x49, + 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, + 0x61, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x73, 0x72, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x0c, 0x69, 0x70, 0x76, 0x34, + 0x53, 0x72, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x43, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x36, + 0x5f, 0x73, 0x72, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x49, 0x70, 0x76, 0x36, 0x53, 0x72, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, + 0x0c, 0x69, 0x70, 0x76, 0x36, 0x53, 0x72, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x6b, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x61, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, + 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, + 0x73, 0x74, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x73, 0x72, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x5f, + 0x73, 0x72, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x10, 0x04, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xe4, 0x03, 0x0a, 0x1a, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4d, 0x70, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, + 0x4e, 0x6c, 0x72, 0x69, 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4d, 0x70, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x63, + 0x68, 0x4e, 0x6c, 0x72, 0x69, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3c, + 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4f, 0x6e, + 0x65, 0x49, 0x70, 0x76, 0x34, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, + 0x0b, 0x69, 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0c, + 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4f, 0x6e, 0x65, 0x49, + 0x70, 0x76, 0x36, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x0b, 0x69, + 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0d, 0x69, 0x70, + 0x76, 0x34, 0x5f, 0x73, 0x72, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x49, 0x70, 0x76, 0x34, 0x53, + 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x52, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x53, 0x72, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x43, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x73, 0x72, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x49, 0x70, 0x76, 0x36, 0x53, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x4c, 0x52, 0x49, + 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x0c, 0x69, 0x70, 0x76, 0x36, 0x53, 0x72, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x6b, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x61, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, + 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, + 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x69, + 0x70, 0x76, 0x34, 0x5f, 0x73, 0x72, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x10, 0x03, 0x12, 0x11, + 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x73, 0x72, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x10, + 0x04, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4a, 0x0a, 0x23, + 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x45, 0x78, 0x69, 0x74, 0x44, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x43, 0x0a, 0x1c, 0x42, 0x67, 0x70, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x40, 0x0a, + 0x19, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0xf4, 0x01, 0x0a, 0x20, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, + 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a, 0x09, 0x73, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x08, 0x73, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x30, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x26, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, + 0x73, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xc1, 0x05, 0x0a, 0x21, 0x42, 0x67, 0x70, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x54, 0x0a, 0x1a, + 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x42, 0x73, 0x69, 0x64, 0x52, 0x18, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x12, 0x61, 0x0a, 0x1f, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, + 0x72, 0x76, 0x36, 0x42, 0x73, 0x69, 0x64, 0x52, 0x1c, 0x73, 0x72, 0x76, 0x36, 0x42, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x72, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, + 0x0a, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x70, + 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x53, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x45, 0x0a, 0x0b, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x53, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x61, 0x0a, 0x15, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x63, 0x61, 0x6e, + 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x52, 0x13, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x69, 0x0a, 0x1a, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, + 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x72, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, + 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x17, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, + 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x48, 0x0a, 0x0c, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, + 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x72, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0b, 0x73, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xf6, 0x01, 0x0a, 0x11, 0x42, + 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x73, 0x69, 0x64, + 0x12, 0x3f, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x42, 0x73, 0x69, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x70, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x42, 0x73, 0x69, 0x64, 0x4d, 0x70, 0x6c, 0x73, 0x52, 0x04, 0x6d, 0x70, 0x6c, + 0x73, 0x12, 0x2e, 0x0a, 0x04, 0x73, 0x72, 0x76, 0x36, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x42, 0x73, 0x69, 0x64, 0x53, 0x72, 0x76, 0x36, 0x52, 0x04, 0x73, 0x72, 0x76, + 0x36, 0x1a, 0x35, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x6d, 0x70, 0x6c, 0x73, 0x10, 0x01, 0x12, 0x08, + 0x0a, 0x04, 0x73, 0x72, 0x76, 0x36, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0xfd, 0x01, 0x0a, 0x15, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x73, 0x69, 0x64, 0x4d, 0x70, 0x6c, 0x73, 0x12, 0x3c, 0x0a, + 0x18, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, + 0x62, 0x73, 0x69, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x00, 0x52, 0x15, 0x66, 0x6c, 0x61, 0x67, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x42, 0x73, 0x69, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x16, 0x66, + 0x6c, 0x61, 0x67, 0x5f, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x75, 0x70, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x13, 0x66, + 0x6c, 0x61, 0x67, 0x44, 0x72, 0x6f, 0x70, 0x55, 0x70, 0x6f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x08, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x69, 0x64, 0x4d, 0x70, + 0x6c, 0x73, 0x52, 0x07, 0x6d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x42, 0x1b, 0x0a, 0x19, 0x5f, + 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x62, + 0x73, 0x69, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x66, 0x6c, 0x61, + 0x67, 0x5f, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x75, 0x70, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x22, 0xf7, 0x01, 0x0a, 0x15, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x73, 0x69, 0x64, 0x53, 0x72, 0x76, 0x36, 0x12, 0x3c, 0x0a, + 0x18, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, + 0x62, 0x73, 0x69, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x00, 0x52, 0x15, 0x66, 0x6c, 0x61, 0x67, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x42, 0x73, 0x69, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x16, 0x66, + 0x6c, 0x61, 0x67, 0x5f, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x75, 0x70, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x13, 0x66, + 0x6c, 0x61, 0x67, 0x44, 0x72, 0x6f, 0x70, 0x55, 0x70, 0x6f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x08, 0x69, 0x70, 0x76, 0x36, + 0x41, 0x64, 0x64, 0x72, 0x88, 0x01, 0x01, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x66, 0x6c, 0x61, 0x67, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x62, 0x73, 0x69, 0x64, 0x5f, + 0x6f, 0x6e, 0x6c, 0x79, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x64, 0x72, + 0x6f, 0x70, 0x5f, 0x75, 0x70, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x42, + 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x22, 0xdc, 0x03, + 0x0a, 0x15, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, + 0x72, 0x76, 0x36, 0x42, 0x73, 0x69, 0x64, 0x12, 0x3c, 0x0a, 0x18, 0x66, 0x6c, 0x61, 0x67, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x62, 0x73, 0x69, 0x64, 0x5f, 0x6f, + 0x6e, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x15, 0x66, 0x6c, 0x61, + 0x67, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x42, 0x73, 0x69, 0x64, 0x4f, 0x6e, + 0x6c, 0x79, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x16, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x64, 0x72, + 0x6f, 0x70, 0x5f, 0x75, 0x70, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x13, 0x66, 0x6c, 0x61, 0x67, 0x44, 0x72, 0x6f, + 0x70, 0x55, 0x70, 0x6f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x42, 0x0a, 0x1b, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x18, 0x66, 0x6c, 0x61, 0x67, 0x53, 0x72, 0x76, 0x36, + 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x69, 0x70, 0x76, 0x36, 0x41, 0x64, + 0x64, 0x72, 0x88, 0x01, 0x01, 0x12, 0x7f, 0x0a, 0x16, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x52, 0x76, + 0x36, 0x53, 0x49, 0x44, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, + 0x52, 0x14, 0x73, 0x72, 0x76, 0x36, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, + 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x62, 0x73, 0x69, 0x64, 0x5f, 0x6f, + 0x6e, 0x6c, 0x79, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x64, 0x72, 0x6f, + 0x70, 0x5f, 0x75, 0x70, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x42, 0x1e, + 0x0a, 0x1c, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x0c, + 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x22, 0xc3, 0x01, 0x0a, + 0x14, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x69, + 0x64, 0x4d, 0x70, 0x6c, 0x73, 0x12, 0x19, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, + 0x12, 0x28, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x66, 0x6c, + 0x61, 0x67, 0x5f, 0x62, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x07, + 0x66, 0x6c, 0x61, 0x67, 0x42, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x74, 0x74, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x42, 0x10, 0x0a, 0x0e, 0x5f, + 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x0b, 0x0a, + 0x09, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x62, 0x6f, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x74, + 0x74, 0x6c, 0x22, 0x32, 0x0a, 0x14, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x53, 0x69, 0x64, 0x53, 0x72, 0x76, 0x36, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x70, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x70, 0x88, 0x01, 0x01, 0x42, + 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x70, 0x22, 0x46, 0x0a, 0x1f, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x44, + 0x0a, 0x1d, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, + 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, + 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4f, 0x0a, 0x28, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x46, 0x0a, 0x1f, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x81, 0x02, + 0x0a, 0x27, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, + 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, + 0x75, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x55, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x72, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4e, 0x75, 0x6c, + 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x1a, 0x74, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x6a, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x01, + 0x12, 0x0d, 0x0a, 0x09, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x10, 0x02, 0x12, + 0x0d, 0x0a, 0x09, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x10, 0x03, 0x12, 0x16, + 0x0a, 0x12, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x6e, 0x64, 0x5f, + 0x69, 0x70, 0x76, 0x36, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x64, 0x6f, 0x6e, 0x6f, 0x74, 0x5f, + 0x70, 0x75, 0x73, 0x68, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0xc9, 0x01, 0x0a, 0x20, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x53, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, + 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x54, 0x0a, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x59, 0x0a, + 0x32, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb8, 0x08, 0x0a, 0x33, 0x42, 0x67, 0x70, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x61, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x44, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x41, + 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x41, 0x12, 0x42, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, + 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, + 0x79, 0x70, 0x65, 0x42, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x42, 0x12, 0x42, 0x0a, 0x06, 0x74, + 0x79, 0x70, 0x65, 0x5f, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x43, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x43, 0x12, + 0x42, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x44, 0x52, 0x05, 0x74, 0x79, + 0x70, 0x65, 0x44, 0x12, 0x42, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x45, + 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x45, 0x12, 0x42, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, + 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, + 0x79, 0x70, 0x65, 0x46, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x46, 0x12, 0x42, 0x0a, 0x06, 0x74, + 0x79, 0x70, 0x65, 0x5f, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x47, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x47, 0x12, + 0x42, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x48, 0x52, 0x05, 0x74, 0x79, + 0x70, 0x65, 0x48, 0x12, 0x42, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x49, + 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x49, 0x12, 0x42, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, + 0x6a, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, + 0x79, 0x70, 0x65, 0x4a, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x12, 0x42, 0x0a, 0x06, 0x74, + 0x79, 0x70, 0x65, 0x5f, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x4b, 0x1a, + 0xa6, 0x01, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x10, 0x01, + 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x62, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, + 0x74, 0x79, 0x70, 0x65, 0x5f, 0x63, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, + 0x5f, 0x64, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x65, 0x10, 0x05, + 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x66, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, + 0x74, 0x79, 0x70, 0x65, 0x5f, 0x67, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, + 0x5f, 0x68, 0x10, 0x08, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x10, 0x09, + 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6a, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, + 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6b, 0x10, 0x0b, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0xa5, 0x01, 0x0a, 0x26, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x41, 0x12, 0x45, + 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, + 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x34, 0x0a, 0x08, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x69, 0x64, 0x4d, 0x70, + 0x6c, 0x73, 0x52, 0x07, 0x6d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x22, 0x9d, 0x02, 0x0a, 0x26, + 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x12, 0x45, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1e, 0x0a, + 0x08, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x07, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x7f, 0x0a, + 0x16, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x62, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x52, 0x76, 0x36, 0x53, 0x49, 0x44, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x64, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x52, 0x14, 0x73, 0x72, 0x76, 0x36, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x0b, + 0x0a, 0x09, 0x5f, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x22, 0xaa, 0x02, 0x0a, 0x26, + 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x43, 0x12, 0x45, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x26, 0x0a, + 0x0c, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, + 0x68, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x0f, 0x69, 0x70, 0x76, 0x34, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0b, 0x73, 0x72, 0x5f, 0x6d, 0x70, 0x6c, + 0x73, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, + 0x69, 0x64, 0x4d, 0x70, 0x6c, 0x73, 0x52, 0x09, 0x73, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, + 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, + 0x68, 0x6d, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xaa, 0x02, 0x0a, 0x26, 0x42, 0x67, 0x70, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x44, 0x12, 0x45, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x46, 0x6c, + 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x72, + 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x00, 0x52, 0x0b, 0x73, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x88, + 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x0f, 0x69, 0x70, 0x76, 0x36, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0b, 0x73, 0x72, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x69, 0x64, 0x4d, + 0x70, 0x6c, 0x73, 0x52, 0x09, 0x73, 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x42, 0x0f, + 0x0a, 0x0d, 0x5f, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x42, + 0x14, 0x0a, 0x12, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xbb, 0x02, 0x0a, 0x26, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x45, + 0x12, 0x45, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, + 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x69, 0x70, + 0x76, 0x34, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0f, 0x69, 0x70, 0x76, 0x34, 0x4e, 0x6f, 0x64, + 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0b, 0x73, + 0x72, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x53, 0x69, 0x64, 0x4d, 0x70, 0x6c, 0x73, 0x52, 0x09, 0x73, 0x72, 0x4d, + 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x14, 0x0a, + 0x12, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0xc1, 0x02, 0x0a, 0x26, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x46, 0x12, 0x45, + 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, + 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, + 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, + 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, + 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, + 0x0b, 0x73, 0x72, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x69, 0x64, 0x4d, 0x70, 0x6c, 0x73, 0x52, 0x09, 0x73, + 0x72, 0x4d, 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, + 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xf4, 0x03, 0x0a, 0x26, 0x42, 0x67, 0x70, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x47, 0x12, 0x45, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x46, 0x6c, 0x61, + 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, + 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, + 0x18, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x03, 0x52, 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x6f, 0x64, + 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0b, 0x73, + 0x72, 0x5f, 0x6d, 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x53, 0x69, 0x64, 0x4d, 0x70, 0x6c, 0x73, 0x52, 0x09, 0x73, 0x72, 0x4d, + 0x70, 0x6c, 0x73, 0x53, 0x69, 0x64, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x1a, 0x0a, + 0x18, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, + 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xc1, + 0x02, 0x0a, 0x26, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x48, 0x12, 0x45, 0x0a, 0x05, 0x66, 0x6c, 0x61, + 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, + 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x10, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, + 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0b, 0x73, 0x72, 0x5f, 0x6d, + 0x70, 0x6c, 0x73, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x53, 0x69, 0x64, 0x4d, 0x70, 0x6c, 0x73, 0x52, 0x09, 0x73, 0x72, 0x4d, 0x70, 0x6c, 0x73, + 0x53, 0x69, 0x64, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, + 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0xa6, 0x03, 0x0a, 0x26, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x49, 0x12, 0x45, 0x0a, + 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, + 0x6c, 0x61, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, + 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x72, + 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, + 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0f, 0x69, 0x70, 0x76, 0x36, 0x4e, + 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, + 0x08, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x53, 0x69, 0x64, 0x53, 0x72, 0x76, 0x36, 0x52, 0x07, 0x73, 0x72, 0x76, 0x36, + 0x53, 0x69, 0x64, 0x12, 0x7f, 0x0a, 0x16, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x52, 0x76, 0x36, 0x53, + 0x49, 0x44, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x52, 0x14, + 0x73, 0x72, 0x76, 0x36, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, + 0x72, 0x69, 0x74, 0x68, 0x6d, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xa9, 0x05, 0x0a, 0x26, + 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x4a, 0x12, 0x45, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x26, 0x0a, + 0x0c, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, + 0x68, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x14, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x03, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x18, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x15, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x76, 0x36, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x08, 0x73, 0x72, 0x76, 0x36, 0x5f, + 0x73, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x69, 0x64, + 0x53, 0x72, 0x76, 0x36, 0x52, 0x07, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x12, 0x7f, 0x0a, + 0x16, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x62, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x52, 0x76, 0x36, 0x53, 0x49, 0x44, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x64, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x52, 0x14, 0x73, 0x72, 0x76, 0x36, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x0f, + 0x0a, 0x0d, 0x5f, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x42, + 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xf6, 0x03, 0x0a, 0x26, 0x42, 0x67, 0x70, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x4b, 0x12, 0x45, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x46, 0x6c, 0x61, + 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x72, 0x5f, + 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x0b, 0x73, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x88, 0x01, + 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, + 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x02, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x76, 0x36, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x08, 0x73, 0x72, 0x76, + 0x36, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, + 0x69, 0x64, 0x53, 0x72, 0x76, 0x36, 0x52, 0x07, 0x73, 0x72, 0x76, 0x36, 0x53, 0x69, 0x64, 0x12, + 0x7f, 0x0a, 0x16, 0x73, 0x72, 0x76, 0x36, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x49, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x52, 0x76, 0x36, 0x53, 0x49, 0x44, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, + 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x52, 0x14, 0x73, 0x72, 0x76, 0x36, + 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x72, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x36, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x22, 0xc8, 0x01, 0x0a, 0x2a, 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, + 0x1a, 0x0a, 0x06, 0x76, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x00, 0x52, 0x05, 0x76, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x61, + 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x05, 0x61, + 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x73, 0x5f, 0x66, 0x6c, 0x61, + 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x05, 0x73, 0x46, 0x6c, 0x61, 0x67, + 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x62, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x05, 0x62, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x76, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, + 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x5f, 0x66, 0x6c, 0x61, 0x67, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x62, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x22, 0xda, 0x02, 0x0a, 0x44, + 0x42, 0x67, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x53, 0x52, 0x76, 0x36, 0x53, 0x49, 0x44, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x75, 0x72, 0x65, 0x12, 0x32, 0x0a, 0x12, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x75, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x11, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x75, 0x72, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6c, 0x62, 0x5f, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x08, 0x6c, + 0x62, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6c, 0x6e, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x08, 0x6c, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, + 0x66, 0x75, 0x6e, 0x63, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x03, 0x52, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, + 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x72, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x09, 0x61, 0x72, 0x67, 0x4c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x75, 0x72, 0x42, 0x0c, 0x0a, + 0x0a, 0x5f, 0x6c, 0x62, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x6c, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x75, + 0x6e, 0x63, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x72, + 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x4f, 0x0a, 0x28, 0x42, 0x67, 0x70, 0x4e, + 0x4c, 0x52, 0x49, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, + 0x73, 0x68, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xf1, 0x08, 0x0a, 0x09, 0x42, 0x67, + 0x70, 0x56, 0x36, 0x50, 0x65, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x65, 0x65, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0b, 0x70, 0x65, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, + 0x41, 0x0a, 0x0f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x56, 0x36, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x52, 0x0e, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x12, 0x4f, 0x0a, 0x16, 0x65, 0x76, 0x70, 0x6e, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x14, 0x65, + 0x76, 0x70, 0x6e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x38, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, + 0x50, 0x65, 0x65, 0x72, 0x2e, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x01, 0x52, 0x06, 0x61, 0x73, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, + 0x09, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x08, 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, + 0x4e, 0x0a, 0x0f, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x56, 0x36, 0x50, 0x65, 0x65, 0x72, 0x2e, 0x41, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x57, 0x69, 0x64, 0x74, 0x68, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x03, 0x52, 0x0d, 0x61, + 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x57, 0x69, 0x64, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, + 0x2c, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x64, 0x76, 0x61, 0x6e, + 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x32, 0x0a, + 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x61, 0x70, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x12, 0x5e, 0x0a, 0x1a, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x4c, + 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x18, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, + 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x31, 0x0a, 0x09, 0x76, 0x34, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0a, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x34, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x08, 0x76, 0x34, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x09, 0x76, 0x36, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x56, 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x08, 0x76, + 0x36, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x10, 0x76, 0x34, 0x5f, 0x73, 0x72, + 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, + 0x34, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x76, 0x34, 0x53, 0x72, 0x74, 0x65, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x10, 0x76, 0x36, 0x5f, 0x73, 0x72, + 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x53, 0x72, 0x74, 0x65, 0x56, + 0x36, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x76, 0x36, 0x53, 0x72, 0x74, 0x65, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x42, 0x0a, 0x10, 0x67, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x72, 0x65, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x47, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x52, 0x0f, 0x67, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x12, 0x3b, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, + 0x61, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x73, 0x1a, 0x35, 0x0a, 0x06, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x62, 0x67, 0x70, 0x10, 0x01, 0x12, 0x08, + 0x0a, 0x04, 0x65, 0x62, 0x67, 0x70, 0x10, 0x02, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x73, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x57, 0x69, 0x64, 0x74, 0x68, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x74, 0x77, 0x6f, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x66, + 0x6f, 0x75, 0x72, 0x10, 0x02, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x66, 0x0a, + 0x0e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, + 0x20, 0x0a, 0x09, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x70, 0x76, 0x36, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x24, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x50, 0x65, 0x65, 0x72, + 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x76, 0x36, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8b, 0x05, 0x0a, 0x13, 0x42, 0x67, 0x70, 0x56, 0x36, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x35, 0x0a, + 0x14, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x12, 0x69, + 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x56, 0x70, + 0x6e, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x15, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x64, 0x5f, + 0x65, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x14, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x64, 0x45, 0x6e, + 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2e, + 0x0a, 0x11, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, + 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x0e, 0x63, 0x6f, 0x70, + 0x79, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, + 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, + 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x64, + 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x72, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x04, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x64, 0x73, 0x50, 0x65, 0x72, 0x53, 0x72, 0x68, + 0x88, 0x01, 0x01, 0x12, 0x4b, 0x0a, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x66, + 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, + 0x1c, 0x61, 0x75, 0x74, 0x6f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x66, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x31, 0x0a, 0x12, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x66, 0x74, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x06, 0x52, 0x10, + 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x66, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x16, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x5f, 0x73, 0x72, 0x5f, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x13, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x53, 0x72, 0x54, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x88, 0x01, 0x01, 0x42, 0x17, 0x0a, + 0x15, 0x5f, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x5f, 0x76, 0x70, 0x6e, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x63, + 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, + 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, + 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6d, 0x61, 0x78, 0x5f, + 0x73, 0x69, 0x64, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x72, 0x68, 0x42, 0x23, 0x0a, 0x21, + 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, + 0x66, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x61, 0x64, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x73, 0x72, 0x5f, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x22, 0xcc, 0x04, 0x0a, 0x14, 0x42, 0x67, 0x70, 0x56, 0x36, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0b, + 0x64, 0x66, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x66, 0x45, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x64, 0x66, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x26, 0x0a, 0x04, 0x65, 0x76, 0x69, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x45, 0x76, 0x70, 0x6e, 0x45, 0x76, + 0x69, 0x73, 0x52, 0x04, 0x65, 0x76, 0x69, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x65, 0x73, 0x69, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x65, 0x73, 0x69, 0x88, 0x01, 0x01, 0x12, + 0x4f, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x01, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x20, 0x0a, 0x09, 0x65, 0x73, 0x69, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x08, 0x65, 0x73, 0x69, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, + 0x01, 0x01, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, + 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x63, + 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x78, + 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x43, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x61, 0x73, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x61, 0x73, 0x50, 0x61, + 0x74, 0x68, 0x1a, 0x48, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, + 0x22, 0x3a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, + 0x61, 0x6c, 0x6c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x02, 0x42, 0x06, 0x0a, 0x04, + 0x5f, 0x65, 0x73, 0x69, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x6d, 0x6f, 0x64, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x73, 0x69, 0x5f, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x22, 0xba, 0x01, 0x0a, 0x0d, 0x42, 0x67, 0x70, 0x56, 0x36, 0x45, 0x76, 0x70, 0x6e, + 0x45, 0x76, 0x69, 0x73, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, + 0x45, 0x76, 0x70, 0x6e, 0x45, 0x76, 0x69, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x2f, 0x0a, 0x09, 0x65, 0x76, 0x69, 0x5f, 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, + 0x45, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x08, 0x65, 0x76, 0x69, 0x56, 0x78, 0x6c, + 0x61, 0x6e, 0x1a, 0x30, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x26, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x65, 0x76, 0x69, 0x5f, 0x76, 0x78, 0x6c, + 0x61, 0x6e, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0xad, 0x07, 0x0a, 0x0d, 0x42, 0x67, 0x70, 0x56, 0x36, 0x45, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, + 0x6e, 0x12, 0x4e, 0x0a, 0x11, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x64, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x45, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, + 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, + 0x10, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x73, 0x12, 0x57, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x56, 0x36, 0x45, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x2e, + 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x6d, + 0x73, 0x69, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x09, 0x70, 0x6d, 0x73, 0x69, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x1e, + 0x0a, 0x08, 0x61, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x07, 0x61, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x4b, + 0x0a, 0x13, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, + 0x69, 0x73, 0x68, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x69, + 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x13, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x11, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x12, 0x43, 0x0a, 0x13, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x52, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x48, 0x0a, 0x16, 0x6c, 0x33, 0x5f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x13, 0x6c, 0x33, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, + 0x48, 0x0a, 0x16, 0x6c, 0x33, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x52, 0x13, 0x6c, 0x33, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x64, 0x76, + 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, + 0x65, 0x64, 0x52, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x0b, + 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x45, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, + 0x52, 0x0e, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x12, 0x27, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, + 0x68, 0x52, 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x43, 0x0a, 0x0f, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x30, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x42, 0x13, + 0x0a, 0x11, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x6d, 0x73, 0x69, 0x5f, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, + 0xe2, 0x01, 0x0a, 0x1c, 0x42, 0x67, 0x70, 0x56, 0x36, 0x45, 0x76, 0x69, 0x56, 0x78, 0x6c, 0x61, + 0x6e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x12, 0x37, 0x0a, 0x0d, 0x63, 0x6d, 0x61, 0x63, 0x5f, 0x69, 0x70, 0x5f, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x43, 0x4d, 0x61, 0x63, 0x49, 0x70, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0b, 0x63, 0x6d, + 0x61, 0x63, 0x49, 0x70, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x0f, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x54, 0x61, + 0x67, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x76, 0x6c, 0x61, 0x6e, 0x5f, 0x61, + 0x77, 0x61, 0x72, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x01, 0x52, 0x10, 0x76, 0x6c, 0x61, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x42, 0x15, 0x0a, + 0x13, 0x5f, 0x76, 0x6c, 0x61, 0x6e, 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x22, 0x73, 0x0a, 0x0b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x56, 0x78, + 0x6c, 0x61, 0x6e, 0x12, 0x31, 0x0a, 0x0a, 0x76, 0x34, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, + 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x09, 0x76, 0x34, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x31, 0x0a, 0x0a, 0x76, 0x36, 0x5f, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x09, + 0x76, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0xea, 0x01, 0x0a, 0x0d, 0x56, 0x78, + 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2e, 0x0a, 0x10, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x53, 0x0a, 0x13, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x70, 0x5f, 0x6d, 0x6f, + 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, + 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x11, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x4d, 0x6f, 0x64, 0x65, + 0x12, 0x15, 0x0a, 0x03, 0x76, 0x6e, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x03, 0x76, 0x6e, 0x69, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, + 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x76, 0x6e, 0x69, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xea, 0x01, 0x0a, 0x0d, 0x56, 0x78, 0x6c, 0x61, 0x6e, + 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2e, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x53, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, + 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, + 0x03, 0x76, 0x6e, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x03, 0x76, 0x6e, + 0x69, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, + 0x11, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x76, 0x6e, 0x69, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0xca, 0x02, 0x0a, 0x1e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, + 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, + 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, + 0x74, 0x52, 0x07, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x09, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, + 0x64, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x52, 0x09, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x1a, 0x3d, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x33, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x75, 0x6e, 0x69, + 0x63, 0x61, 0x73, 0x74, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, + 0x61, 0x73, 0x74, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0xca, 0x02, 0x0a, 0x1e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, + 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x44, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x52, 0x07, + 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x63, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x52, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, + 0x61, 0x73, 0x74, 0x1a, 0x3d, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x33, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, + 0x74, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, + 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x6d, 0x0a, + 0x25, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x55, + 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x05, 0x76, 0x74, 0x65, 0x70, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, + 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, + 0x74, 0x56, 0x74, 0x65, 0x70, 0x52, 0x05, 0x76, 0x74, 0x65, 0x70, 0x73, 0x22, 0x6d, 0x0a, 0x25, + 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, + 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x05, 0x76, 0x74, 0x65, 0x70, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, + 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, + 0x56, 0x74, 0x65, 0x70, 0x52, 0x05, 0x76, 0x74, 0x65, 0x70, 0x73, 0x22, 0xb1, 0x01, 0x0a, 0x36, + 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, 0x69, 0x63, + 0x61, 0x73, 0x74, 0x41, 0x72, 0x70, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x27, 0x0a, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x5f, 0x76, 0x6d, 0x5f, 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6d, 0x4d, 0x61, 0x63, 0x88, 0x01, 0x01, 0x12, + 0x29, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x6d, 0x5f, 0x69, 0x70, 0x76, + 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x56, 0x6d, 0x49, 0x70, 0x76, 0x34, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x6d, 0x5f, 0x6d, 0x61, 0x63, 0x42, 0x11, 0x0a, 0x0f, + 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x6d, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x22, + 0xe9, 0x01, 0x0a, 0x29, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, + 0x64, 0x65, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x56, 0x74, 0x65, 0x70, 0x12, 0x33, 0x0a, + 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x74, 0x65, 0x70, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x74, 0x65, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, + 0x01, 0x01, 0x12, 0x6f, 0x0a, 0x15, 0x61, 0x72, 0x70, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, + 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x41, 0x72, 0x70, 0x53, 0x75, + 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x13, + 0x61, 0x72, 0x70, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x76, + 0x74, 0x65, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xe9, 0x01, 0x0a, 0x29, + 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x55, 0x6e, + 0x69, 0x63, 0x61, 0x73, 0x74, 0x56, 0x74, 0x65, 0x70, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x74, 0x65, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x56, 0x74, 0x65, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x6f, + 0x0a, 0x15, 0x61, 0x72, 0x70, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, + 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x41, 0x72, 0x70, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x13, 0x61, 0x72, 0x70, 0x53, + 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x42, + 0x16, 0x0a, 0x14, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x74, 0x65, 0x70, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x54, 0x0a, 0x27, 0x56, 0x78, 0x6c, 0x61, 0x6e, + 0x56, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, + 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x54, 0x0a, + 0x27, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x36, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x4d, 0x6f, 0x64, 0x65, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0xba, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x73, + 0x76, 0x70, 0x12, 0x3f, 0x0a, 0x0f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x52, 0x0e, 0x69, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x13, 0x6c, 0x73, 0x70, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, + 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x11, 0x6c, 0x73, 0x70, + 0x49, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0xf7, 0x05, 0x0a, 0x11, 0x52, 0x73, 0x76, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x70, 0x76, + 0x34, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6e, 0x65, 0x69, 0x67, + 0x68, 0x62, 0x6f, 0x72, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x0a, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x49, 0x70, 0x88, 0x01, 0x01, 0x12, 0x2f, + 0x0a, 0x11, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0f, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x2b, 0x0a, 0x0f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x65, + 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x0d, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x18, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, + 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, + 0x52, 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, + 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x18, 0x73, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, 0x52, + 0x16, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x65, + 0x6e, 0x64, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x06, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x2e, 0x0a, 0x10, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x07, 0x52, 0x0f, 0x62, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x88, 0x01, 0x01, + 0x12, 0x26, 0x0a, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x08, 0x52, 0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x68, 0x65, 0x6c, 0x6c, + 0x6f, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x09, 0x52, 0x0d, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x12, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x0a, 0x52, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, + 0x70, 0x6c, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x76, + 0x34, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, + 0x62, 0x6f, 0x72, 0x5f, 0x69, 0x70, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x12, 0x0a, 0x10, + 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, + 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x1b, 0x0a, + 0x19, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, + 0x65, 0x6e, 0x64, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x62, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x42, + 0x0f, 0x0a, 0x0d, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, + 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x22, 0x81, 0x02, 0x0a, 0x14, 0x52, + 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x69, 0x70, 0x76, 0x34, 0x4e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x5a, 0x0a, 0x14, 0x70, 0x32, 0x70, 0x5f, 0x65, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, + 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, 0x32, + 0x50, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x52, 0x11, + 0x70, 0x32, 0x70, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, + 0x73, 0x12, 0x5d, 0x0a, 0x15, 0x70, 0x32, 0x70, 0x5f, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, + 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, 0x32, 0x50, 0x49, 0x6e, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x52, 0x12, 0x70, 0x32, + 0x70, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x73, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xd0, + 0x04, 0x0a, 0x24, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, 0x32, 0x50, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x72, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, + 0x12, 0x32, 0x0a, 0x12, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x11, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, + 0x72, 0x88, 0x01, 0x01, 0x12, 0x71, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, 0x76, + 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, 0x32, 0x50, 0x45, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x03, 0x52, 0x10, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x79, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x78, + 0x65, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, 0x52, 0x0f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x5c, 0x0a, 0x10, 0x52, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x22, + 0x48, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x73, 0x68, 0x61, 0x72, + 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x10, 0x01, 0x12, 0x10, 0x0a, + 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x10, 0x02, 0x12, + 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x03, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x42, 0x14, + 0x0a, 0x12, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x74, 0x79, 0x6c, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x42, 0x14, 0x0a, 0x12, 0x5f, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0xc1, 0x05, 0x0a, 0x25, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, 0x76, + 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, 0x32, 0x50, 0x49, 0x6e, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0d, + 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, + 0x12, 0x20, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x6c, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x03, 0x52, 0x05, 0x6c, 0x73, 0x70, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2e, + 0x0a, 0x10, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x0f, 0x72, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x32, + 0x0a, 0x12, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, + 0x6c, 0x69, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, 0x52, 0x11, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x88, + 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6c, 0x73, 0x70, + 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x06, 0x52, 0x0b, 0x62, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x14, 0x6c, + 0x73, 0x70, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x64, 0x65, + 0x6c, 0x61, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x07, 0x52, 0x12, 0x6c, 0x73, 0x70, + 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x6f, 0x76, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x88, + 0x01, 0x01, 0x12, 0x46, 0x0a, 0x11, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x10, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x05, 0x74, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x52, 0x73, 0x76, 0x70, 0x54, 0x73, 0x70, 0x65, 0x63, 0x52, 0x05, 0x74, 0x73, 0x70, 0x65, 0x63, + 0x12, 0x37, 0x0a, 0x0c, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, + 0x70, 0x46, 0x61, 0x73, 0x74, 0x52, 0x65, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0b, 0x66, 0x61, + 0x73, 0x74, 0x52, 0x65, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x03, 0x65, 0x72, 0x6f, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, + 0x70, 0x45, 0x72, 0x6f, 0x52, 0x03, 0x65, 0x72, 0x6f, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x5f, 0x69, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x42, 0x13, + 0x0a, 0x11, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x62, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x42, 0x17, 0x0a, 0x15, + 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x6f, 0x76, 0x65, 0x72, 0x5f, + 0x64, 0x65, 0x6c, 0x61, 0x79, 0x22, 0xbc, 0x06, 0x0a, 0x14, 0x52, 0x73, 0x76, 0x70, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x40, + 0x0a, 0x1a, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x00, 0x52, 0x17, 0x61, 0x75, 0x74, 0x6f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x65, 0x74, 0x75, + 0x70, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x0d, 0x73, 0x65, 0x74, 0x75, 0x70, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, + 0x52, 0x0f, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x18, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x16, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x50, + 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x15, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x88, 0x01, 0x01, + 0x12, 0x2d, 0x0a, 0x10, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, + 0x69, 0x72, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x06, 0x52, 0x0e, 0x73, 0x65, + 0x53, 0x74, 0x79, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x45, 0x0a, 0x1c, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x1a, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x69, + 0x72, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, + 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x08, 0x52, 0x15, 0x6e, 0x6f, 0x64, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x61, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x12, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, + 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, + 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, + 0x65, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, + 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x42, 0x1f, 0x0a, 0x1d, 0x5f, 0x62, 0x61, 0x6e, 0x64, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, + 0x69, 0x72, 0x65, 0x64, 0x22, 0xba, 0x01, 0x0a, 0x16, 0x52, 0x73, 0x76, 0x70, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, + 0x24, 0x0a, 0x0b, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, + 0x6e, 0x79, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0a, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x6e, 0x79, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x02, 0x52, 0x0a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x88, 0x01, + 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6e, + 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6e, + 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6c, + 0x6c, 0x22, 0xf7, 0x02, 0x0a, 0x09, 0x52, 0x73, 0x76, 0x70, 0x54, 0x73, 0x70, 0x65, 0x63, 0x12, + 0x2f, 0x0a, 0x11, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x2f, 0x0a, 0x11, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x48, 0x01, 0x52, 0x0f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x48, 0x02, 0x52, 0x0c, 0x70, 0x65, 0x61, + 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x14, + 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x5f, + 0x75, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x12, 0x6d, 0x69, + 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x04, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x65, 0x61, 0x6b, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x6d, 0x69, + 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x5f, 0x75, 0x6e, + 0x69, 0x74, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x22, 0xce, 0x04, 0x0a, 0x0f, + 0x52, 0x73, 0x76, 0x70, 0x46, 0x61, 0x73, 0x74, 0x52, 0x65, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, + 0x2a, 0x0a, 0x0e, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x65, 0x74, 0x75, 0x70, + 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x68, + 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, + 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x68, + 0x6f, 0x70, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, + 0x52, 0x08, 0x68, 0x6f, 0x70, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, + 0x09, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, + 0x48, 0x03, 0x52, 0x09, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x88, 0x01, 0x01, + 0x12, 0x24, 0x0a, 0x0b, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x41, 0x6e, 0x79, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x0a, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x6e, 0x79, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x06, 0x52, 0x0a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x88, + 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x19, 0x6f, 0x6e, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6f, 0x6e, 0x65, + 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x15, 0x6f, 0x6e, 0x65, 0x54, 0x6f, 0x4f, 0x6e, + 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x88, 0x01, + 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x08, 0x52, 0x15, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x11, + 0x0a, 0x0f, 0x5f, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, + 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, + 0x6e, 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, + 0x6e, 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, + 0x6c, 0x6c, 0x42, 0x1c, 0x0a, 0x1a, 0x5f, 0x6f, 0x6e, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6f, 0x6e, + 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, + 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x22, 0xd5, 0x02, 0x0a, + 0x07, 0x52, 0x73, 0x76, 0x70, 0x45, 0x72, 0x6f, 0x12, 0x58, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x70, + 0x65, 0x6e, 0x64, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x5f, 0x69, 0x70, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, + 0x45, 0x72, 0x6f, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x4e, 0x65, 0x69, 0x67, 0x68, + 0x62, 0x6f, 0x72, 0x49, 0x70, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x11, 0x70, 0x72, + 0x65, 0x70, 0x65, 0x6e, 0x64, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x49, 0x70, 0x88, + 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x0a, + 0x73, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x45, 0x72, 0x6f, 0x53, 0x75, + 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x1a, 0x65, 0x0a, 0x11, 0x50, 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x4e, 0x65, + 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x49, 0x70, 0x22, 0x50, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, + 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x64, 0x6f, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x70, 0x65, 0x6e, + 0x64, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6c, + 0x6f, 0x6f, 0x73, 0x65, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x70, 0x65, 0x6e, + 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x10, 0x03, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x70, + 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x5f, + 0x69, 0x70, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc0, 0x03, 0x0a, 0x10, 0x52, 0x73, 0x76, 0x70, 0x45, 0x72, 0x6f, + 0x53, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, + 0x76, 0x70, 0x45, 0x72, 0x6f, 0x53, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x69, 0x70, 0x76, + 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x08, 0x61, 0x73, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x08, 0x68, 0x6f, 0x70, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x52, 0x73, 0x76, 0x70, 0x45, 0x72, 0x6f, 0x53, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x2e, 0x48, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x04, 0x52, + 0x07, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x38, 0x0a, 0x04, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x30, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, + 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x10, 0x02, 0x1a, 0x39, 0x0a, 0x07, 0x48, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x2e, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x73, 0x74, 0x72, + 0x69, 0x63, 0x74, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x10, 0x02, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, + 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x0c, 0x0a, 0x0a, + 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x68, + 0x6f, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0f, + 0x69, 0x70, 0x76, 0x34, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x34, 0x52, 0x0e, 0x69, 0x70, 0x76, 0x34, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0f, 0x69, 0x70, 0x76, 0x36, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x56, 0x36, 0x52, 0x0e, 0x69, 0x70, 0x76, 0x36, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x0c, 0x44, 0x68, 0x63, 0x70, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x56, 0x34, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, + 0x0a, 0x09, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x01, 0x52, 0x08, 0x69, 0x70, 0x76, 0x34, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x3a, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, + 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x34, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x0c, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0xdd, 0x02, 0x0a, 0x10, 0x44, 0x68, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x56, 0x34, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x09, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, + 0x28, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x05, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, + 0x34, 0x50, 0x6f, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0d, 0x0a, + 0x0b, 0x5f, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x10, 0x0a, 0x0e, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x10, + 0x0a, 0x0e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, + 0x74, 0x65, 0x70, 0x22, 0xc5, 0x02, 0x0a, 0x16, 0x44, 0x68, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x56, 0x34, 0x50, 0x6f, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, + 0x0a, 0x0e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x70, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x10, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, + 0x14, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x12, 0x73, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x16, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x72, 0x65, 0x6c, + 0x61, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x74, 0x6c, 0x76, 0x5f, 0x38, 0x32, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x12, 0x65, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x6c, 0x61, + 0x79, 0x57, 0x69, 0x74, 0x68, 0x54, 0x6c, 0x76, 0x38, 0x32, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, + 0x0f, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x6e, 0x73, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x73, 0x65, 0x63, 0x6f, + 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, + 0x77, 0x69, 0x74, 0x68, 0x5f, 0x74, 0x6c, 0x76, 0x5f, 0x38, 0x32, 0x22, 0xe1, 0x02, 0x0a, 0x0c, + 0x44, 0x68, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x36, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x69, 0x70, 0x76, 0x36, + 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x72, 0x61, 0x70, 0x69, 0x64, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, + 0x0b, 0x72, 0x61, 0x70, 0x69, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x42, 0x0a, 0x1b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x5f, 0x76, + 0x69, 0x61, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x18, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x65, 0x56, 0x69, 0x61, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x06, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x56, 0x36, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x06, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, + 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0f, + 0x0a, 0x0d, 0x5f, 0x72, 0x61, 0x70, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x42, + 0x1e, 0x0a, 0x1c, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x5f, + 0x76, 0x69, 0x61, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x22, + 0xca, 0x01, 0x0a, 0x13, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x03, 0x64, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x56, + 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x6e, 0x73, 0x52, 0x03, 0x64, 0x6e, 0x73, 0x12, + 0x43, 0x0a, 0x0b, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, + 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x65, + 0x6e, 0x64, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x46, 0x0a, 0x0c, 0x62, 0x6f, 0x6f, 0x74, 0x66, 0x69, 0x6c, 0x65, + 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x66, 0x69, 0x6c, 0x65, 0x55, 0x72, 0x6c, 0x52, + 0x0b, 0x62, 0x6f, 0x6f, 0x74, 0x66, 0x69, 0x6c, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x78, 0x0a, 0x11, + 0x44, 0x68, 0x63, 0x70, 0x56, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x73, + 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x07, 0x69, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, + 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x06, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xf8, 0x02, 0x0a, 0x12, 0x44, 0x68, 0x63, 0x70, 0x76, + 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x49, 0x61, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x2d, 0x0a, 0x04, 0x69, 0x61, 0x6e, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x61, 0x6e, 0x61, 0x12, 0x2d, + 0x0a, 0x04, 0x69, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, + 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, + 0x04, 0x69, 0x61, 0x70, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x61, + 0x70, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x61, 0x70, 0x64, + 0x12, 0x37, 0x0a, 0x06, 0x69, 0x61, 0x6e, 0x61, 0x70, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x49, 0x61, 0x6e, 0x61, 0x70, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x06, 0x69, 0x61, 0x6e, 0x61, 0x70, 0x64, 0x1a, 0x4b, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x41, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, + 0x69, 0x61, 0x6e, 0x61, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x61, 0x74, 0x61, 0x10, 0x02, + 0x12, 0x08, 0x0a, 0x04, 0x69, 0x61, 0x70, 0x64, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x69, 0x61, + 0x6e, 0x61, 0x70, 0x64, 0x10, 0x04, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0xc9, 0x01, 0x0a, 0x14, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x09, 0x70, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x03, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0d, 0x0a, 0x0b, + 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x22, 0xfc, 0x02, + 0x0a, 0x18, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x61, + 0x70, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x35, 0x0a, 0x14, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x12, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, + 0x01, 0x12, 0x37, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x64, 0x5f, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x64, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x53, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x15, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x13, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x73, 0x65, 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, + 0x17, 0x0a, 0x15, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, + 0x65, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x73, 0x74, + 0x65, 0x70, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x64, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x22, 0x7e, 0x0a, 0x1a, + 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x61, 0x6e, 0x61, + 0x70, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x04, 0x69, 0x61, + 0x6e, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, + 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x61, 0x6e, 0x61, 0x12, 0x31, 0x0a, 0x04, 0x69, 0x61, 0x70, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, + 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x61, 0x70, 0x64, 0x50, 0x6f, + 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x61, 0x70, 0x64, 0x22, 0x80, 0x01, 0x0a, + 0x0f, 0x44, 0x68, 0x63, 0x70, 0x56, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x6e, 0x73, + 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x88, 0x01, 0x01, 0x12, + 0x42, 0x0a, 0x0d, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x6e, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, + 0x70, 0x56, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, + 0x72, 0x79, 0x44, 0x6e, 0x73, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, + 0x44, 0x6e, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, + 0x36, 0x0a, 0x18, 0x44, 0x68, 0x63, 0x70, 0x56, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x44, 0x6e, 0x73, 0x12, 0x13, 0x0a, 0x02, 0x69, + 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x70, 0x88, 0x01, 0x01, + 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x70, 0x22, 0xc6, 0x05, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x09, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x52, + 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x13, 0x6c, 0x73, 0x61, + 0x5f, 0x72, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x11, 0x6c, 0x73, 0x61, 0x52, 0x65, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2d, + 0x0a, 0x10, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0e, 0x6c, 0x73, 0x61, 0x52, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, + 0x18, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x75, 0x72, 0x73, 0x74, 0x5f, 0x6c, 0x73, 0x75, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x03, 0x52, 0x15, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x75, 0x72, 0x73, 0x74, 0x4c, 0x73, 0x75, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x17, 0x6d, + 0x61, 0x78, 0x5f, 0x66, 0x6c, 0x6f, 0x6f, 0x64, 0x5f, 0x6c, 0x73, 0x75, 0x5f, 0x70, 0x65, 0x72, + 0x5f, 0x62, 0x75, 0x72, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x13, + 0x6d, 0x61, 0x78, 0x46, 0x6c, 0x6f, 0x6f, 0x64, 0x4c, 0x73, 0x75, 0x50, 0x65, 0x72, 0x42, 0x75, + 0x72, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x10, 0x67, 0x72, 0x61, 0x63, 0x65, 0x66, + 0x75, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x47, 0x72, 0x61, + 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x0f, 0x67, 0x72, + 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x20, 0x0a, + 0x09, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6c, 0x73, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x05, 0x52, 0x08, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4c, 0x73, 0x61, 0x88, 0x01, 0x01, 0x12, + 0x36, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, + 0x76, 0x32, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x34, 0x0a, + 0x09, 0x76, 0x34, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, 0x34, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x08, 0x76, 0x34, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x16, 0x0a, 0x14, + 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x5f, 0x62, 0x75, 0x72, 0x73, 0x74, 0x5f, 0x6c, 0x73, 0x75, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x66, + 0x6c, 0x6f, 0x6f, 0x64, 0x5f, 0x6c, 0x73, 0x75, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x75, 0x72, + 0x73, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6c, 0x73, 0x61, + 0x22, 0xc2, 0x01, 0x0a, 0x0e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x01, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3f, + 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x35, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, + 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, + 0x70, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0xa8, 0x03, 0x0a, 0x0d, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x05, 0x74, 0x5f, 0x62, 0x69, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x74, 0x42, 0x69, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x18, 0x0a, 0x05, 0x65, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x01, 0x52, 0x04, 0x65, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x6d, + 0x63, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x05, 0x6d, + 0x63, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x6e, 0x70, 0x5f, 0x62, 0x69, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x05, 0x6e, 0x70, 0x42, 0x69, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x65, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x05, 0x65, 0x61, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x1a, 0x0a, 0x06, 0x64, 0x63, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x05, 0x52, 0x05, 0x64, 0x63, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x18, 0x0a, 0x05, 0x6f, + 0x5f, 0x62, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x06, 0x52, 0x04, 0x6f, 0x42, + 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x5f, + 0x62, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x09, 0x75, 0x6e, 0x75, + 0x73, 0x65, 0x64, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x09, 0x6c, 0x73, 0x61, + 0x5f, 0x62, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x08, 0x52, 0x07, + 0x6c, 0x73, 0x61, 0x42, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x09, 0x6c, 0x73, + 0x61, 0x5f, 0x65, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x48, 0x09, 0x52, + 0x07, 0x6c, 0x73, 0x61, 0x45, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x74, 0x5f, 0x62, 0x69, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x5f, 0x62, 0x69, 0x74, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x6d, 0x63, 0x5f, 0x62, 0x69, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6e, + 0x70, 0x5f, 0x62, 0x69, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x61, 0x5f, 0x62, 0x69, 0x74, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x64, 0x63, 0x5f, 0x62, 0x69, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x6f, 0x5f, 0x62, 0x69, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, + 0x5f, 0x62, 0x69, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x62, 0x5f, 0x62, + 0x69, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x65, 0x5f, 0x62, 0x69, 0x74, + 0x22, 0x4d, 0x0a, 0x15, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x47, 0x72, 0x61, 0x63, 0x65, 0x66, + 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x0b, 0x68, 0x65, 0x6c, + 0x70, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, + 0x52, 0x0a, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x42, + 0x0e, 0x0a, 0x0c, 0x5f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x22, + 0x8c, 0x04, 0x0a, 0x0f, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, + 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x01, 0x52, 0x08, 0x69, 0x70, 0x76, 0x34, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2c, + 0x0a, 0x04, 0x61, 0x72, 0x65, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x41, 0x72, 0x65, 0x61, 0x52, 0x04, 0x61, 0x72, 0x65, 0x61, 0x12, 0x42, 0x0a, 0x0c, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x41, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x67, 0x69, + 0x6e, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x45, 0x52, + 0x12, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x65, 0x72, + 0x69, 0x6e, 0x67, 0x12, 0x4a, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x38, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x52, + 0x08, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x4b, 0x0a, 0x0f, 0x6c, 0x69, 0x6e, + 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x72, 0x6c, 0x67, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x72, 0x6c, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xce, + 0x01, 0x0a, 0x13, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x41, 0x72, 0x65, 0x61, 0x12, 0x41, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, + 0x66, 0x76, 0x32, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x41, 0x72, 0x65, 0x61, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x02, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x13, + 0x0a, 0x02, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x02, 0x69, 0x70, + 0x88, 0x01, 0x01, 0x1a, 0x31, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x27, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x06, + 0x0a, 0x02, 0x69, 0x70, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x70, 0x22, + 0x9e, 0x02, 0x0a, 0x1a, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, + 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x2e, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x13, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, + 0x76, 0x32, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x65, 0x69, 0x67, 0x68, + 0x62, 0x6f, 0x72, 0x52, 0x11, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x1a, 0x5d, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x53, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x62, 0x72, 0x6f, + 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x4f, 0x0a, 0x17, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x12, 0x24, 0x0a, 0x0b, 0x6e, + 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x0a, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x49, 0x70, 0x88, 0x01, + 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x5f, 0x69, + 0x70, 0x22, 0xd4, 0x02, 0x0a, 0x17, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x2a, 0x0a, + 0x0e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x64, 0x65, 0x61, + 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x61, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0d, 0x72, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x88, 0x01, 0x01, 0x12, + 0x1f, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x03, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, + 0x12, 0x37, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x6d, 0x74, 0x75, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x04, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x4d, 0x74, 0x75, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x68, 0x65, + 0x6c, 0x6c, 0x6f, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x10, 0x0a, 0x0e, + 0x5f, 0x64, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x11, + 0x0a, 0x0f, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x18, + 0x0a, 0x16, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x5f, 0x6d, 0x74, 0x75, 0x22, 0xd3, 0x02, 0x0a, 0x16, 0x4f, 0x73, 0x70, + 0x66, 0x76, 0x32, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x05, 0x74, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x74, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x18, 0x0a, + 0x05, 0x65, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x04, + 0x65, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x6d, 0x63, 0x5f, 0x62, 0x69, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x05, 0x6d, 0x63, 0x42, 0x69, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x6e, 0x70, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x05, 0x6e, 0x70, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x1a, 0x0a, 0x06, 0x65, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x04, 0x52, 0x05, 0x65, 0x61, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x64, + 0x63, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x05, 0x64, + 0x63, 0x42, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x18, 0x0a, 0x05, 0x6f, 0x5f, 0x62, 0x69, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x06, 0x52, 0x04, 0x6f, 0x42, 0x69, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x74, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x09, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x42, + 0x69, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x74, 0x5f, 0x62, 0x69, 0x74, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x5f, 0x62, 0x69, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6d, 0x63, + 0x5f, 0x62, 0x69, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6e, 0x70, 0x5f, 0x62, 0x69, 0x74, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x64, + 0x63, 0x5f, 0x62, 0x69, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6f, 0x5f, 0x62, 0x69, 0x74, 0x42, + 0x0d, 0x0a, 0x0b, 0x5f, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x74, 0x22, 0x99, + 0x02, 0x0a, 0x1d, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, + 0x04, 0x6d, 0x64, 0x35, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x64, 0x35, 0x52, 0x04, 0x6d, 0x64, 0x35, 0x73, 0x12, + 0x22, 0x0a, 0x0a, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x65, 0x78, 0x74, + 0x88, 0x01, 0x01, 0x1a, 0x3b, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x31, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x6d, 0x64, 0x35, 0x73, 0x10, 0x01, + 0x12, 0x0e, 0x0a, 0x0a, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x10, 0x02, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x22, 0x5f, 0x0a, 0x17, 0x4f, 0x73, + 0x70, 0x66, 0x76, 0x32, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x64, 0x35, 0x12, 0x1a, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x88, 0x01, + 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x69, 0x64, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6b, 0x65, 0x79, 0x22, 0xe0, 0x03, 0x0a, 0x1d, + 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4c, + 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, + 0x0d, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x72, 0x61, 0x54, 0x72, 0x61, + 0x66, 0x66, 0x69, 0x63, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x75, 0x6e, 0x70, 0x72, 0x6f, + 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x0b, + 0x75, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, + 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x10, 0x64, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x31, 0x5f, 0x74, 0x6f, 0x5f, 0x31, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x0d, 0x64, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x31, 0x54, 0x6f, 0x31, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x12, 0x64, 0x65, 0x64, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x31, 0x5f, 0x70, 0x6c, 0x75, 0x73, 0x5f, 0x31, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0f, 0x64, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x31, 0x50, 0x6c, 0x75, 0x73, 0x31, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x65, + 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, + 0x08, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x34, 0x30, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x06, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x34, 0x30, 0x88, + 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x38, + 0x30, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x07, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x38, 0x30, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x78, 0x74, + 0x72, 0x61, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x75, + 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, + 0x68, 0x61, 0x72, 0x65, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x65, 0x64, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x31, 0x5f, 0x74, 0x6f, 0x5f, 0x31, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x64, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x31, 0x5f, 0x70, 0x6c, 0x75, 0x73, 0x5f, + 0x31, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x42, 0x0e, + 0x0a, 0x0c, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x34, 0x30, 0x42, 0x0e, + 0x0a, 0x0c, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x38, 0x30, 0x22, 0xd0, + 0x01, 0x0a, 0x12, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, + 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x34, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x88, 0x01, 0x01, 0x12, 0x3d, + 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, + 0x32, 0x56, 0x34, 0x52, 0x52, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x22, 0xa7, 0x04, 0x0a, 0x15, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, 0x34, 0x52, 0x52, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x43, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, 0x34, 0x52, 0x52, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x37, 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x72, 0x61, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, + 0x32, 0x56, 0x34, 0x52, 0x52, 0x49, 0x6e, 0x74, 0x72, 0x61, 0x41, 0x72, 0x65, 0x61, 0x52, 0x09, + 0x69, 0x6e, 0x74, 0x72, 0x61, 0x41, 0x72, 0x65, 0x61, 0x12, 0x37, 0x0a, 0x0a, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, 0x34, 0x52, 0x52, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x41, 0x72, 0x65, 0x61, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x41, 0x72, + 0x65, 0x61, 0x12, 0x44, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x5f, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, 0x34, 0x52, 0x52, 0x45, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x31, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x31, 0x12, 0x44, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, 0x34, + 0x52, 0x52, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x32, 0x52, + 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x32, 0x12, 0x40, + 0x0a, 0x0d, 0x6e, 0x73, 0x73, 0x61, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, + 0x76, 0x32, 0x56, 0x34, 0x52, 0x52, 0x4e, 0x73, 0x73, 0x61, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x52, 0x0c, 0x6e, 0x73, 0x73, 0x61, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x1a, 0x7e, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x74, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x72, 0x61, 0x5f, 0x61, 0x72, 0x65, + 0x61, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x72, 0x65, + 0x61, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x5f, 0x31, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x32, 0x10, 0x04, 0x12, 0x11, 0x0a, + 0x0d, 0x6e, 0x73, 0x73, 0x61, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, 0x05, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4b, 0x0a, 0x13, 0x4f, + 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, 0x34, 0x52, 0x52, 0x49, 0x6e, 0x74, 0x72, 0x61, 0x41, 0x72, + 0x65, 0x61, 0x12, 0x34, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, 0x34, + 0x52, 0x52, 0x45, 0x78, 0x74, 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x46, 0x6c, 0x61, 0x67, + 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x4b, 0x0a, 0x13, 0x4f, 0x73, 0x70, 0x66, + 0x76, 0x32, 0x56, 0x34, 0x52, 0x52, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x41, 0x72, 0x65, 0x61, 0x12, + 0x34, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, 0x34, 0x52, 0x52, 0x45, + 0x78, 0x74, 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, + 0x66, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x4f, 0x0a, 0x17, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, + 0x34, 0x52, 0x52, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x31, + 0x12, 0x34, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, 0x34, 0x52, 0x52, + 0x45, 0x78, 0x74, 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, + 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x4f, 0x0a, 0x17, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, + 0x56, 0x34, 0x52, 0x52, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, + 0x32, 0x12, 0x34, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, 0x34, 0x52, + 0x52, 0x45, 0x78, 0x74, 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x46, 0x6c, 0x61, 0x67, 0x73, + 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x16, 0x4f, 0x73, 0x70, 0x66, + 0x76, 0x32, 0x56, 0x34, 0x52, 0x52, 0x4e, 0x73, 0x73, 0x61, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x12, 0x34, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, 0x34, + 0x52, 0x52, 0x45, 0x78, 0x74, 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x46, 0x6c, 0x61, 0x67, + 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x25, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, + 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, + 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, + 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x69, 0x0a, 0x19, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x56, 0x34, 0x52, 0x52, 0x45, 0x78, 0x74, + 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1a, 0x0a, 0x06, + 0x61, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x05, + 0x61, 0x46, 0x6c, 0x61, 0x67, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x6e, 0x5f, 0x66, 0x6c, + 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x05, 0x6e, 0x46, 0x6c, 0x61, + 0x67, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x22, 0xcc, 0x02, 0x0a, 0x04, 0x46, + 0x6c, 0x6f, 0x77, 0x12, 0x22, 0x0a, 0x05, 0x74, 0x78, 0x5f, 0x72, 0x78, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x78, 0x52, + 0x78, 0x52, 0x04, 0x74, 0x78, 0x52, 0x78, 0x12, 0x27, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, + 0x6f, 0x77, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x12, 0x34, 0x0a, 0x0d, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, + 0x6f, 0x77, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, + 0x69, 0x7a, 0x65, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x72, 0x61, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, + 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x52, 0x04, 0x72, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x08, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x07, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x07, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xd2, 0x01, 0x0a, 0x08, 0x46, 0x6c, + 0x6f, 0x77, 0x54, 0x78, 0x52, 0x78, 0x12, 0x36, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, + 0x77, 0x54, 0x78, 0x52, 0x78, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x21, + 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x12, 0x27, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x37, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2d, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, + 0x04, 0x70, 0x6f, 0x72, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x79, + 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x78, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x74, + 0x78, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x72, 0x78, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x72, 0x78, 0x4e, + 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x78, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x78, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0a, 0x0a, + 0x08, 0x5f, 0x72, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xba, 0x01, 0x0a, 0x0a, 0x46, 0x6c, + 0x6f, 0x77, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x08, + 0x74, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x74, 0x78, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x78, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x78, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x1a, 0x39, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x31, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x10, 0x01, 0x12, 0x0e, 0x0a, + 0x0a, 0x6f, 0x6e, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6f, 0x6e, 0x65, 0x10, 0x02, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x87, 0x09, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x77, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x27, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x2d, 0x0a, 0x08, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x52, 0x08, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x76, 0x6c, 0x61, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x56, 0x6c, 0x61, 0x6e, 0x52, 0x04, 0x76, 0x6c, 0x61, 0x6e, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x78, + 0x6c, 0x61, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x05, 0x76, 0x78, 0x6c, 0x61, 0x6e, + 0x12, 0x21, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, 0x04, 0x69, + 0x70, 0x76, 0x34, 0x12, 0x21, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, + 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x66, 0x63, 0x70, 0x61, 0x75, + 0x73, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x52, 0x08, 0x70, 0x66, 0x63, + 0x70, 0x61, 0x75, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x70, 0x61, 0x75, 0x73, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, + 0x61, 0x75, 0x73, 0x65, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x70, 0x61, + 0x75, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x03, 0x74, 0x63, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x52, 0x03, + 0x74, 0x63, 0x70, 0x12, 0x1e, 0x0a, 0x03, 0x75, 0x64, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x52, 0x03, + 0x75, 0x64, 0x70, 0x12, 0x1e, 0x0a, 0x03, 0x67, 0x72, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x03, + 0x67, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x74, 0x70, 0x76, 0x31, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x31, 0x52, 0x05, 0x67, 0x74, 0x70, 0x76, 0x31, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x74, 0x70, + 0x76, 0x32, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x52, 0x05, 0x67, 0x74, 0x70, 0x76, 0x32, 0x12, + 0x1e, 0x0a, 0x03, 0x61, 0x72, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x52, 0x03, 0x61, 0x72, 0x70, 0x12, + 0x21, 0x0a, 0x04, 0x69, 0x63, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x52, 0x04, 0x69, 0x63, + 0x6d, 0x70, 0x12, 0x27, 0x0a, 0x06, 0x69, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, + 0x70, 0x76, 0x36, 0x52, 0x06, 0x69, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x12, 0x1e, 0x0a, 0x03, 0x70, + 0x70, 0x70, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x52, 0x03, 0x70, 0x70, 0x70, 0x12, 0x27, 0x0a, 0x06, 0x69, + 0x67, 0x6d, 0x70, 0x76, 0x31, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x52, 0x06, 0x69, 0x67, + 0x6d, 0x70, 0x76, 0x31, 0x12, 0x21, 0x0a, 0x04, 0x6d, 0x70, 0x6c, 0x73, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, + 0x73, 0x52, 0x04, 0x6d, 0x70, 0x6c, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x6e, 0x6d, 0x70, 0x76, + 0x32, 0x63, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x52, 0x07, 0x73, 0x6e, 0x6d, 0x70, + 0x76, 0x32, 0x63, 0x12, 0x21, 0x0a, 0x04, 0x72, 0x73, 0x76, 0x70, 0x18, 0x16, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, + 0x52, 0x04, 0x72, 0x73, 0x76, 0x70, 0x1a, 0x8c, 0x02, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x81, 0x02, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x76, 0x6c, 0x61, 0x6e, 0x10, 0x03, 0x12, + 0x09, 0x0a, 0x05, 0x76, 0x78, 0x6c, 0x61, 0x6e, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, + 0x76, 0x34, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, 0x06, 0x12, 0x0c, + 0x0a, 0x08, 0x70, 0x66, 0x63, 0x70, 0x61, 0x75, 0x73, 0x65, 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x70, 0x61, 0x75, 0x73, 0x65, 0x10, 0x08, 0x12, + 0x07, 0x0a, 0x03, 0x74, 0x63, 0x70, 0x10, 0x09, 0x12, 0x07, 0x0a, 0x03, 0x75, 0x64, 0x70, 0x10, + 0x0a, 0x12, 0x07, 0x0a, 0x03, 0x67, 0x72, 0x65, 0x10, 0x0b, 0x12, 0x09, 0x0a, 0x05, 0x67, 0x74, + 0x70, 0x76, 0x31, 0x10, 0x0c, 0x12, 0x09, 0x0a, 0x05, 0x67, 0x74, 0x70, 0x76, 0x32, 0x10, 0x0d, + 0x12, 0x07, 0x0a, 0x03, 0x61, 0x72, 0x70, 0x10, 0x0e, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x63, 0x6d, + 0x70, 0x10, 0x0f, 0x12, 0x0a, 0x0a, 0x06, 0x69, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x10, 0x10, 0x12, + 0x07, 0x0a, 0x03, 0x70, 0x70, 0x70, 0x10, 0x11, 0x12, 0x0a, 0x0a, 0x06, 0x69, 0x67, 0x6d, 0x70, + 0x76, 0x31, 0x10, 0x12, 0x12, 0x08, 0x0a, 0x04, 0x6d, 0x70, 0x6c, 0x73, 0x10, 0x13, 0x12, 0x0b, + 0x0a, 0x07, 0x73, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x10, 0x14, 0x12, 0x08, 0x0a, 0x04, 0x72, + 0x73, 0x76, 0x70, 0x10, 0x15, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x6c, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x19, + 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0b, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x87, + 0x01, 0x0a, 0x13, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xed, 0x01, 0x0a, 0x0c, 0x46, 0x6c, 0x6f, + 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x03, 0x64, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x44, 0x73, 0x74, 0x52, 0x03, 0x64, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, + 0x72, 0x63, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x40, 0x0a, 0x0a, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x66, 0x63, + 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x08, + 0x70, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x22, 0xc5, 0x01, 0x0a, 0x08, 0x46, 0x6c, 0x6f, + 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x12, 0x38, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x50, 0x72, 0x69, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, + 0x29, 0x0a, 0x03, 0x63, 0x66, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, + 0x61, 0x6e, 0x43, 0x66, 0x69, 0x52, 0x03, 0x63, 0x66, 0x69, 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x70, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x54, 0x70, 0x69, 0x64, 0x52, 0x04, 0x74, 0x70, 0x69, 0x64, + 0x22, 0xe5, 0x01, 0x0a, 0x09, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x12, 0x30, + 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, + 0x78, 0x6c, 0x61, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, + 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x30, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x12, 0x2a, + 0x0a, 0x03, 0x76, 0x6e, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, + 0x61, 0x6e, 0x56, 0x6e, 0x69, 0x52, 0x03, 0x76, 0x6e, 0x69, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, + 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x52, 0x09, 0x72, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x22, 0xb2, 0x07, 0x0a, 0x08, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x12, 0x35, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0d, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x12, 0x31, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x70, 0x72, + 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, + 0x76, 0x34, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0b, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x4a, 0x0a, 0x0e, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x12, 0x45, 0x0a, 0x0d, 0x64, 0x6f, 0x6e, 0x74, 0x5f, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x6f, 0x6e, + 0x74, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x64, 0x6f, 0x6e, 0x74, 0x46, + 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0e, 0x6d, 0x6f, 0x72, 0x65, 0x5f, + 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x4d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x0d, 0x6d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, + 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x52, 0x0e, + 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x40, + 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, + 0x4c, 0x69, 0x76, 0x65, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, + 0x12, 0x38, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x4b, 0x0a, 0x0f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, 0x63, 0x52, 0x03, 0x73, + 0x72, 0x63, 0x12, 0x29, 0x0a, 0x03, 0x64, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, 0x52, 0x03, 0x64, 0x73, 0x74, 0x12, 0x2e, 0x0a, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd0, 0x01, + 0x0a, 0x0f, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x3d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x32, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x06, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0x3f, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x35, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x72, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0xaa, 0x01, 0x0a, 0x15, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x38, + 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9a, 0x02, + 0x0a, 0x19, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x50, 0x0a, 0x0b, 0x63, + 0x6f, 0x70, 0x69, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x46, 0x6c, 0x61, + 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x53, 0x0a, + 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x12, 0x56, 0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x0c, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xf2, 0x01, 0x0a, 0x1b, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, + 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, + 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x9a, 0x02, 0x0a, 0x10, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, + 0x61, 0x77, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x22, 0x0a, 0x03, 0x74, 0x6f, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x52, 0x03, 0x74, 0x6f, 0x73, 0x12, 0x25, 0x0a, 0x04, 0x64, + 0x73, 0x63, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x52, 0x04, 0x64, 0x73, + 0x63, 0x70, 0x1a, 0x3d, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x33, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x10, 0x01, 0x12, 0x07, + 0x0a, 0x03, 0x74, 0x6f, 0x73, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x73, 0x63, 0x70, 0x10, + 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x6c, 0x0a, 0x0c, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x12, 0x2d, 0x0a, 0x03, + 0x70, 0x68, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, + 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x52, 0x03, 0x70, 0x68, 0x62, 0x12, 0x2d, 0x0a, 0x03, 0x65, + 0x63, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, + 0x63, 0x70, 0x45, 0x63, 0x6e, 0x52, 0x03, 0x65, 0x63, 0x6e, 0x22, 0x81, 0x03, 0x0a, 0x0b, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x12, 0x41, 0x0a, 0x0a, 0x70, 0x72, + 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xa6, 0x06, 0x0a, 0x07, 0x46, 0x6c, 0x6f, 0x77, - 0x54, 0x63, 0x70, 0x12, 0x35, 0x0a, 0x08, 0x73, 0x72, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, - 0x74, 0x52, 0x07, 0x73, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x73, - 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, - 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x07, 0x64, 0x73, 0x74, 0x50, 0x6f, 0x72, - 0x74, 0x12, 0x32, 0x0a, 0x07, 0x73, 0x65, 0x71, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x52, 0x06, 0x73, - 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x41, 0x63, 0x6b, 0x4e, 0x75, - 0x6d, 0x52, 0x06, 0x61, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x12, 0x3e, 0x0a, 0x0b, 0x64, 0x61, 0x74, - 0x61, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, + 0x65, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, + 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, + 0x76, 0x34, 0x54, 0x6f, 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, + 0x79, 0x12, 0x41, 0x0a, 0x0a, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, 0x68, + 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x52, 0x0a, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, + 0x68, 0x70, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x72, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, + 0x6f, 0x73, 0x52, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x72, + 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x6f, + 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, + 0x76, 0x34, 0x54, 0x6f, 0x73, 0x4d, 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x52, 0x08, 0x6d, + 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x12, 0x35, 0x0a, 0x06, 0x75, 0x6e, 0x75, 0x73, 0x65, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, + 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x52, 0x06, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x22, 0x82, + 0x01, 0x0a, 0x0c, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x41, 0x75, 0x74, 0x6f, 0x12, + 0x3a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x41, 0x75, + 0x74, 0x6f, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x2b, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, + 0x0a, 0x04, 0x64, 0x68, 0x63, 0x70, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0xe2, 0x03, 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, + 0x12, 0x35, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x54, 0x63, 0x70, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x52, 0x0a, 0x64, - 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x65, 0x63, 0x6e, - 0x5f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, - 0x6e, 0x4e, 0x73, 0x52, 0x05, 0x65, 0x63, 0x6e, 0x4e, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x63, - 0x6e, 0x5f, 0x63, 0x77, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, - 0x45, 0x63, 0x6e, 0x43, 0x77, 0x72, 0x52, 0x06, 0x65, 0x63, 0x6e, 0x43, 0x77, 0x72, 0x12, 0x35, - 0x0a, 0x08, 0x65, 0x63, 0x6e, 0x5f, 0x65, 0x63, 0x68, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x07, 0x65, 0x63, - 0x6e, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x74, 0x6c, 0x5f, 0x75, 0x72, 0x67, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x55, 0x72, - 0x67, 0x52, 0x06, 0x63, 0x74, 0x6c, 0x55, 0x72, 0x67, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x74, 0x6c, - 0x5f, 0x61, 0x63, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, - 0x74, 0x6c, 0x41, 0x63, 0x6b, 0x52, 0x06, 0x63, 0x74, 0x6c, 0x41, 0x63, 0x6b, 0x12, 0x32, 0x0a, - 0x07, 0x63, 0x74, 0x6c, 0x5f, 0x70, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x49, 0x70, 0x76, 0x36, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x52, 0x0c, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x3c, + 0x0a, 0x0a, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x52, 0x09, 0x66, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x48, 0x0a, 0x0e, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, + 0x36, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x6e, 0x65, 0x78, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x09, 0x68, 0x6f, 0x70, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, + 0x48, 0x6f, 0x70, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x08, 0x68, 0x6f, 0x70, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x12, 0x29, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x36, 0x53, 0x72, 0x63, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x29, 0x0a, + 0x03, 0x64, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, + 0x44, 0x73, 0x74, 0x52, 0x03, 0x64, 0x73, 0x74, 0x22, 0x82, 0x01, 0x0a, 0x0c, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x36, 0x41, 0x75, 0x74, 0x6f, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x41, 0x75, 0x74, 0x6f, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x2b, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x21, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x68, 0x63, 0x70, + 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xa0, 0x07, + 0x0a, 0x0c, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x12, 0x2d, + 0x0a, 0x03, 0x64, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x52, 0x03, 0x64, 0x73, 0x74, 0x12, 0x2d, 0x0a, + 0x03, 0x73, 0x72, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, + 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x40, 0x0a, 0x0a, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x09, 0x65, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4d, + 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x59, 0x0a, + 0x13, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, + 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x11, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x47, 0x0a, 0x0d, 0x70, 0x61, 0x75, 0x73, + 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x30, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x30, 0x52, 0x0b, 0x70, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x30, 0x12, 0x47, 0x0a, 0x0d, 0x70, 0x61, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x5f, 0x31, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x31, 0x52, 0x0b, 0x70, + 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x31, 0x12, 0x47, 0x0a, 0x0d, 0x70, 0x61, + 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x52, 0x0b, 0x70, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x32, 0x12, 0x47, 0x0a, 0x0d, 0x70, 0x61, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x5f, 0x33, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, + 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x33, 0x52, + 0x0b, 0x70, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x33, 0x12, 0x47, 0x0a, 0x0d, + 0x70, 0x61, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x34, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, 0x52, 0x0b, 0x70, 0x61, 0x75, 0x73, 0x65, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x34, 0x12, 0x47, 0x0a, 0x0d, 0x70, 0x61, 0x75, 0x73, 0x65, 0x5f, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x35, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, + 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x35, 0x52, 0x0b, 0x70, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x35, 0x12, 0x47, + 0x0a, 0x0d, 0x70, 0x61, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x36, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, + 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, 0x52, 0x0b, 0x70, 0x61, 0x75, 0x73, + 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, 0x12, 0x47, 0x0a, 0x0d, 0x70, 0x61, 0x75, 0x73, 0x65, + 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x37, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x50, 0x73, 0x68, 0x52, 0x06, 0x63, 0x74, 0x6c, 0x50, 0x73, - 0x68, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x74, 0x6c, 0x5f, 0x72, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x52, 0x73, 0x74, 0x52, 0x06, 0x63, - 0x74, 0x6c, 0x52, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x74, 0x6c, 0x5f, 0x73, 0x79, 0x6e, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x53, 0x79, - 0x6e, 0x52, 0x06, 0x63, 0x74, 0x6c, 0x53, 0x79, 0x6e, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x74, 0x6c, - 0x5f, 0x66, 0x69, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, - 0x74, 0x6c, 0x46, 0x69, 0x6e, 0x52, 0x06, 0x63, 0x74, 0x6c, 0x46, 0x69, 0x6e, 0x12, 0x31, 0x0a, - 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, - 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x22, 0xe3, 0x01, 0x0a, 0x07, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x12, 0x35, 0x0a, 0x08, + 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x37, 0x52, 0x0b, 0x70, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x37, + 0x22, 0xcd, 0x02, 0x0a, 0x11, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x03, 0x64, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x44, 0x73, 0x74, 0x52, 0x03, 0x64, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x03, 0x73, 0x72, + 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x45, + 0x0a, 0x0a, 0x65, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, + 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x5f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, + 0x22, 0xdf, 0x06, 0x0a, 0x07, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x12, 0x35, 0x0a, 0x08, 0x73, 0x72, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x55, 0x64, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x07, 0x73, 0x72, 0x63, 0x50, + 0x54, 0x63, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x07, 0x73, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, - 0x74, 0x52, 0x07, 0x64, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x37, 0x0a, - 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x55, 0x64, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x08, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x22, 0xf8, 0x02, 0x0a, 0x07, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x72, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x5f, 0x70, - 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, - 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, - 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, - 0x74, 0x12, 0x3a, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x30, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x12, 0x34, 0x0a, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x37, 0x0a, 0x08, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x08, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x3a, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x31, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x31, 0x22, 0xde, 0x06, 0x0a, 0x09, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x12, - 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x39, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x06, 0x65, 0x5f, - 0x66, 0x6c, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, - 0x31, 0x45, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x31, 0x0a, - 0x06, 0x73, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x73, 0x46, 0x6c, 0x61, 0x67, - 0x12, 0x34, 0x0a, 0x07, 0x70, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x06, - 0x70, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x43, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x0e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x2d, 0x0a, 0x04, 0x74, 0x65, 0x69, 0x64, 0x18, 0x09, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, + 0x74, 0x52, 0x07, 0x64, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x73, 0x65, + 0x71, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, + 0x53, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x52, 0x06, 0x73, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x12, 0x32, + 0x0a, 0x07, 0x61, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x54, 0x63, 0x70, 0x41, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x52, 0x06, 0x61, 0x63, 0x6b, 0x4e, + 0x75, 0x6d, 0x12, 0x3e, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x61, 0x74, 0x61, + 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x65, 0x63, 0x6e, 0x5f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x4e, 0x73, 0x52, 0x05, 0x65, 0x63, + 0x6e, 0x4e, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x63, 0x6e, 0x5f, 0x63, 0x77, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x54, 0x65, 0x69, 0x64, 0x52, - 0x04, 0x74, 0x65, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x0e, 0x73, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x31, 0x53, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x52, 0x0d, 0x73, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x41, 0x0a, 0x0c, 0x6e, 0x5f, 0x70, 0x64, 0x75, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x50, 0x64, - 0x75, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x0a, 0x6e, 0x50, 0x64, 0x75, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x69, 0x0a, 0x1a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x65, - 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x17, 0x6e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x42, - 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x22, 0x91, 0x02, 0x0a, 0x10, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0f, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, - 0x40, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x63, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x65, - 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x52, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xca, 0x04, 0x0a, 0x09, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x32, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x11, - 0x70, 0x69, 0x67, 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x6c, 0x61, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x50, 0x69, - 0x67, 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x10, - 0x70, 0x69, 0x67, 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x61, 0x67, - 0x12, 0x3a, 0x0a, 0x09, 0x74, 0x65, 0x69, 0x64, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x03, 0x20, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x77, 0x72, 0x52, + 0x06, 0x65, 0x63, 0x6e, 0x43, 0x77, 0x72, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x63, 0x6e, 0x5f, 0x65, + 0x63, 0x68, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, + 0x6e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x07, 0x65, 0x63, 0x6e, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x32, + 0x0a, 0x07, 0x63, 0x74, 0x6c, 0x5f, 0x75, 0x72, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x55, 0x72, 0x67, 0x52, 0x06, 0x63, 0x74, 0x6c, 0x55, + 0x72, 0x67, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x74, 0x6c, 0x5f, 0x61, 0x63, 0x6b, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x41, 0x63, 0x6b, 0x52, 0x06, + 0x63, 0x74, 0x6c, 0x41, 0x63, 0x6b, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x74, 0x6c, 0x5f, 0x70, 0x73, + 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x50, + 0x73, 0x68, 0x52, 0x06, 0x63, 0x74, 0x6c, 0x50, 0x73, 0x68, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x74, + 0x6c, 0x5f, 0x72, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, + 0x43, 0x74, 0x6c, 0x52, 0x73, 0x74, 0x52, 0x06, 0x63, 0x74, 0x6c, 0x52, 0x73, 0x74, 0x12, 0x32, + 0x0a, 0x07, 0x63, 0x74, 0x6c, 0x5f, 0x73, 0x79, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x53, 0x79, 0x6e, 0x52, 0x06, 0x63, 0x74, 0x6c, 0x53, + 0x79, 0x6e, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x74, 0x6c, 0x5f, 0x66, 0x69, 0x6e, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x46, 0x69, 0x6e, 0x52, 0x06, + 0x63, 0x74, 0x6c, 0x46, 0x69, 0x6e, 0x12, 0x31, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, + 0x77, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x37, 0x0a, 0x08, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x75, 0x6d, 0x22, 0xe3, 0x01, 0x0a, 0x07, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x12, 0x35, + 0x0a, 0x08, 0x73, 0x72, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x55, 0x64, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x07, 0x73, 0x72, + 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, + 0x6f, 0x72, 0x74, 0x52, 0x07, 0x64, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, + 0x70, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, + 0x37, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x08, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x22, 0xf8, 0x02, 0x0a, 0x07, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x72, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, + 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, + 0x6e, 0x74, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x73, + 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x30, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x12, + 0x34, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x37, + 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x08, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x3a, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x31, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x31, 0x22, 0xde, 0x06, 0x0a, 0x09, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, + 0x31, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x0d, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x39, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x46, 0x6c, - 0x61, 0x67, 0x52, 0x08, 0x74, 0x65, 0x69, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x33, 0x0a, 0x06, - 0x73, 0x70, 0x61, 0x72, 0x65, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x06, + 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x31, 0x52, 0x06, 0x73, 0x70, 0x61, 0x72, 0x65, - 0x31, 0x12, 0x43, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x70, 0x76, 0x31, 0x45, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, + 0x31, 0x0a, 0x06, 0x73, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x73, 0x46, 0x6c, + 0x61, 0x67, 0x12, 0x34, 0x0a, 0x07, 0x70, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x6e, 0x46, 0x6c, 0x61, 0x67, + 0x52, 0x06, 0x70, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x43, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x52, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x12, 0x2d, 0x0a, 0x04, 0x74, 0x65, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x52, 0x04, 0x74, 0x65, 0x69, 0x64, - 0x12, 0x4c, 0x0a, 0x0f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, + 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x2d, 0x0a, 0x04, 0x74, 0x65, 0x69, 0x64, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x54, 0x65, 0x69, + 0x64, 0x52, 0x04, 0x74, 0x65, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x0e, 0x73, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x52, 0x0d, 0x73, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x41, 0x0a, 0x0c, 0x6e, 0x5f, 0x70, 0x64, 0x75, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, + 0x50, 0x64, 0x75, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x0a, 0x6e, 0x50, 0x64, 0x75, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x69, 0x0a, 0x1a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, + 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x17, 0x6e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x42, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x22, 0x91, 0x02, 0x0a, 0x10, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x10, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x12, 0x40, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x63, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x52, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xca, 0x04, 0x0a, 0x09, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x52, + 0x0a, 0x11, 0x70, 0x69, 0x67, 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x66, + 0x6c, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, + 0x50, 0x69, 0x67, 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x61, 0x67, + 0x52, 0x10, 0x70, 0x69, 0x67, 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x6c, + 0x61, 0x67, 0x12, 0x3a, 0x0a, 0x09, 0x74, 0x65, 0x69, 0x64, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, + 0x46, 0x6c, 0x61, 0x67, 0x52, 0x08, 0x74, 0x65, 0x69, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x33, + 0x0a, 0x06, 0x73, 0x70, 0x61, 0x72, 0x65, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x31, 0x52, 0x06, 0x73, 0x70, 0x61, + 0x72, 0x65, 0x31, 0x12, 0x43, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, - 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x0e, - 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x33, - 0x0a, 0x06, 0x73, 0x70, 0x61, 0x72, 0x65, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x12, 0x2d, 0x0a, 0x04, 0x74, 0x65, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x52, 0x04, 0x74, 0x65, + 0x69, 0x64, 0x12, 0x4c, 0x0a, 0x0f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x32, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x52, 0x0e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x33, 0x0a, 0x06, 0x73, 0x70, 0x61, 0x72, 0x65, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x32, 0x52, 0x06, 0x73, + 0x70, 0x61, 0x72, 0x65, 0x32, 0x22, 0xcd, 0x05, 0x0a, 0x07, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, + 0x70, 0x12, 0x44, 0x0a, 0x0d, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, + 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x68, 0x61, 0x72, 0x64, 0x77, + 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x32, 0x52, 0x06, 0x73, 0x70, 0x61, - 0x72, 0x65, 0x32, 0x22, 0xcd, 0x05, 0x0a, 0x07, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x12, - 0x44, 0x0a, 0x0d, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4a, 0x0a, + 0x0f, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, - 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, - 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x68, - 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, - 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0e, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, - 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x4a, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x12, 0x3a, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x57, 0x0a, 0x14, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, - 0x72, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, - 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, - 0x41, 0x64, 0x64, 0x72, 0x52, 0x12, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, 0x64, - 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x57, 0x0a, 0x14, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x52, 0x12, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, - 0x72, 0x12, 0x57, 0x0a, 0x14, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x68, 0x61, 0x72, 0x64, - 0x77, 0x61, 0x72, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x61, 0x72, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0e, 0x68, 0x61, 0x72, 0x64, 0x77, + 0x61, 0x72, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x4a, 0x0a, 0x0f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3a, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x57, 0x0a, 0x14, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x72, 0x64, + 0x77, 0x61, 0x72, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, - 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x52, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x61, - 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x57, 0x0a, 0x14, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x52, - 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, - 0x64, 0x64, 0x72, 0x22, 0xa1, 0x01, 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, - 0x12, 0x36, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x04, 0x65, 0x63, 0x68, 0x6f, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x04, 0x65, 0x63, 0x68, 0x6f, 0x1a, - 0x2b, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x65, 0x63, 0x68, 0x6f, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xc5, 0x02, 0x0a, 0x0c, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, - 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x3c, 0x0a, 0x08, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, - 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x42, 0x0a, 0x0a, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x4f, - 0x0a, 0x0f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, - 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, - 0x0e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, - 0xa7, 0x01, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x12, 0x38, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x04, 0x65, 0x63, 0x68, 0x6f, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x04, 0x65, 0x63, 0x68, + 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, + 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x52, 0x12, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, + 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x57, 0x0a, 0x14, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x52, + 0x12, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, + 0x64, 0x64, 0x72, 0x12, 0x57, 0x0a, 0x14, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x68, 0x61, + 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x61, 0x72, 0x64, + 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x52, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x57, 0x0a, 0x14, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, + 0x72, 0x52, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x41, 0x64, 0x64, 0x72, 0x22, 0xa1, 0x01, 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, + 0x6d, 0x70, 0x12, 0x36, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, + 0x70, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x04, 0x65, 0x63, + 0x68, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x04, 0x65, 0x63, 0x68, 0x6f, 0x1a, 0x2b, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x65, 0x63, 0x68, 0x6f, 0x10, 0x01, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xd1, 0x02, 0x0a, 0x0e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x32, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, + 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xc5, 0x02, 0x0a, 0x0c, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, + 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, - 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x32, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, - 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x0f, 0x73, 0x65, - 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x53, - 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x0e, 0x73, - 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3e, 0x0a, - 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x75, 0x6d, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x22, 0xbb, 0x01, - 0x0a, 0x07, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x12, 0x34, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x34, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x50, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x44, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, + 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x3c, + 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x75, 0x6d, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x42, 0x0a, 0x0a, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x12, 0x4f, 0x0a, 0x0f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, + 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x0e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x22, 0xa7, 0x01, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, + 0x12, 0x38, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, + 0x36, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x04, 0x65, 0x63, + 0x68, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x04, 0x65, + 0x63, 0x68, 0x6f, 0x1a, 0x2b, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x21, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x65, 0x63, 0x68, 0x6f, 0x10, 0x01, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xd1, 0x02, 0x0a, 0x0e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x32, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, + 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, + 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x0f, + 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, + 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, + 0x0e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x3e, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x22, + 0xbb, 0x01, 0x0a, 0x07, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x12, 0x34, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, - 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb0, 0x02, 0x0a, 0x0a, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x12, 0x37, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, - 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x55, 0x6e, 0x75, 0x73, 0x65, - 0x64, 0x52, 0x06, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x08, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, - 0x70, 0x76, 0x31, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x08, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x47, 0x0a, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, - 0x6d, 0x70, 0x76, 0x31, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x52, 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x8f, - 0x02, 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x45, 0x0a, 0x0d, - 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x0f, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x5f, 0x6f, 0x66, - 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, + 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x34, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x44, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x50, 0x70, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb0, 0x02, + 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x12, 0x37, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x67, 0x6d, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x55, 0x6e, 0x75, + 0x73, 0x65, 0x64, 0x52, 0x06, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x08, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x67, 0x6d, 0x70, 0x76, 0x31, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x08, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x47, 0x0a, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x52, 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x22, 0x8f, 0x02, 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x12, 0x2f, 0x0a, + 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, - 0x6c, 0x73, 0x42, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x52, - 0x0d, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x40, - 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, - 0x4c, 0x69, 0x76, 0x65, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, - 0x22, 0xa2, 0x01, 0x0a, 0x0b, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, - 0x12, 0x38, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x09, 0x63, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, + 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x45, + 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x0f, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x5f, + 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x4d, 0x70, 0x6c, 0x73, 0x42, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x63, + 0x6b, 0x52, 0x0d, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, + 0x12, 0x40, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x69, 0x6d, 0x65, + 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, + 0x76, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x0b, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, + 0x32, 0x63, 0x12, 0x38, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x09, + 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, + 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x22, 0xcb, 0x05, 0x0a, 0x0f, 0x46, 0x6c, 0x6f, 0x77, + 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3d, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, - 0x75, 0x6e, 0x69, 0x74, 0x79, 0x22, 0xcb, 0x05, 0x0a, 0x0f, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, - 0x6d, 0x70, 0x76, 0x32, 0x63, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3d, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x0b, 0x67, 0x65, 0x74, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, - 0x44, 0x55, 0x52, 0x0a, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, - 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, - 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x0e, 0x67, - 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x61, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x0b, 0x67, 0x65, + 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, - 0x63, 0x50, 0x44, 0x55, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, - 0x0a, 0x0b, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, - 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x0a, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, 0x62, 0x75, 0x6c, 0x6b, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, - 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x52, 0x0e, 0x67, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0e, 0x69, 0x6e, 0x66, 0x6f, 0x72, - 0x6d, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, - 0x63, 0x50, 0x44, 0x55, 0x52, 0x0d, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0b, 0x73, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x5f, 0x74, 0x72, - 0x61, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, - 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x0a, 0x73, - 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x54, 0x72, 0x61, 0x70, 0x12, 0x2b, 0x0a, 0x06, 0x72, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x06, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0xaf, 0x01, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x67, - 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, - 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x10, 0x03, - 0x12, 0x0f, 0x0a, 0x0b, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, - 0x04, 0x12, 0x14, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, 0x62, 0x75, 0x6c, 0x6b, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x69, 0x6e, 0x66, 0x6f, 0x72, - 0x6d, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x73, - 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x5f, 0x74, 0x72, 0x61, 0x70, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x10, 0x08, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0xc9, 0x05, 0x0a, 0x0e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, - 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x12, 0x42, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, - 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x52, - 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x0c, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, - 0x32, 0x63, 0x50, 0x44, 0x55, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, - 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x4c, 0x0a, 0x11, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x69, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0xfe, 0x02, - 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xee, 0x02, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x74, 0x6f, 0x6f, 0x5f, 0x62, 0x69, 0x67, - 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x6e, 0x6f, 0x5f, 0x73, 0x75, 0x63, 0x68, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x62, 0x61, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, - 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x10, 0x06, 0x12, - 0x0d, 0x0a, 0x09, 0x6e, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x07, 0x12, 0x0e, - 0x0a, 0x0a, 0x77, 0x72, 0x6f, 0x6e, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x10, 0x08, 0x12, 0x10, - 0x0a, 0x0c, 0x77, 0x72, 0x6f, 0x6e, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x10, 0x09, - 0x12, 0x12, 0x0a, 0x0e, 0x77, 0x72, 0x6f, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, - 0x6e, 0x67, 0x10, 0x0a, 0x12, 0x0f, 0x0a, 0x0b, 0x77, 0x72, 0x6f, 0x6e, 0x67, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x10, 0x0b, 0x12, 0x0f, 0x0a, 0x0b, 0x6e, 0x6f, 0x5f, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x69, 0x6e, 0x63, 0x6f, 0x6e, 0x73, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x0d, 0x12, 0x18, - 0x0a, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x6e, 0x61, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x0f, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x64, 0x6f, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x10, 0x12, 0x17, 0x0a, 0x13, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x10, 0x11, 0x12, 0x10, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x5f, 0x77, 0x72, 0x69, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x12, 0x12, 0x15, 0x0a, 0x11, 0x69, 0x6e, 0x63, 0x6f, 0x6e, - 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x10, 0x13, 0x42, 0x0f, - 0x0a, 0x0d, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, - 0xd2, 0x02, 0x0a, 0x12, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, - 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x12, 0x46, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, + 0x63, 0x50, 0x44, 0x55, 0x52, 0x0a, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3d, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, + 0x0e, 0x67, 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x2f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, + 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x34, 0x0a, 0x0b, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x0a, 0x73, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, 0x62, 0x75, + 0x6c, 0x6b, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, + 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x52, 0x0e, 0x67, 0x65, 0x74, 0x42, 0x75, + 0x6c, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0e, 0x69, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, + 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x0d, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0b, 0x73, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x5f, + 0x74, 0x72, 0x61, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, + 0x0a, 0x73, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x54, 0x72, 0x61, 0x70, 0x12, 0x2b, 0x0a, 0x06, 0x72, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, + 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0xaf, 0x01, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0f, 0x0a, + 0x0b, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x01, 0x12, 0x14, + 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, 0x62, 0x75, 0x6c, 0x6b, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x69, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x06, 0x12, 0x0f, 0x0a, + 0x0b, 0x73, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x5f, 0x74, 0x72, 0x61, 0x70, 0x10, 0x07, 0x12, 0x0a, + 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x10, 0x08, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xc9, 0x05, 0x0a, 0x0e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, + 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x12, 0x42, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, + 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, + 0x64, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x0c, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, + 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x0b, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x4c, 0x0a, 0x11, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x69, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x1a, + 0xfe, 0x02, 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, + 0xee, 0x02, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x74, 0x6f, 0x6f, 0x5f, 0x62, + 0x69, 0x67, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x6e, 0x6f, 0x5f, 0x73, 0x75, 0x63, 0x68, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x62, 0x61, 0x64, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, + 0x6c, 0x79, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x10, + 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x6e, 0x6f, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x07, + 0x12, 0x0e, 0x0a, 0x0a, 0x77, 0x72, 0x6f, 0x6e, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x10, 0x08, + 0x12, 0x10, 0x0a, 0x0c, 0x77, 0x72, 0x6f, 0x6e, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x77, 0x72, 0x6f, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x10, 0x0a, 0x12, 0x0f, 0x0a, 0x0b, 0x77, 0x72, 0x6f, 0x6e, 0x67, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x0b, 0x12, 0x0f, 0x0a, 0x0b, 0x6e, 0x6f, 0x5f, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x69, 0x6e, 0x63, 0x6f, + 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x0d, + 0x12, 0x18, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x6e, 0x61, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x0f, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x64, 0x6f, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x10, 0x12, 0x17, + 0x0a, 0x13, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x11, 0x12, 0x10, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x5f, 0x77, + 0x72, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x12, 0x12, 0x15, 0x0a, 0x11, 0x69, 0x6e, 0x63, + 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x10, 0x13, + 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0xd2, 0x02, 0x0a, 0x12, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, + 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x12, 0x46, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, + 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x49, 0x64, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, + 0x12, 0x4f, 0x0a, 0x0d, 0x6e, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, + 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4e, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x65, 0x72, 0x73, 0x52, 0x0c, 0x6e, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x73, 0x12, 0x55, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x74, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, - 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x49, 0x64, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x4f, - 0x0a, 0x0d, 0x6e, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, 0x75, - 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4e, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x72, - 0x73, 0x52, 0x0c, 0x6e, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x55, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, - 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x65, 0x74, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x65, 0x74, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4c, 0x0a, 0x11, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, - 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x1a, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, - 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, + 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x70, + 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x70, + 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4c, 0x0a, 0x11, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, + 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x1a, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0xc4, 0x09, 0x0a, 0x1f, 0x46, 0x6c, 0x6f, 0x77, - 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x5c, 0x0a, 0x0d, 0x69, 0x6e, - 0x74, 0x65, 0x67, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x6e, - 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, - 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, - 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x17, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x15, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x63, 0x0a, 0x10, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x70, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x69, 0x70, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x5c, 0x0a, 0x0d, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, + 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0xc4, 0x09, 0x0a, 0x1f, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x62, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x74, - 0x69, 0x63, 0x6b, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4d, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x5c, 0x0a, 0x0d, + 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x69, 0x6e, + 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, + 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x17, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x15, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x63, 0x0a, 0x10, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x74, 0x69, 0x6d, - 0x65, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x61, - 0x72, 0x62, 0x69, 0x74, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0e, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x61, 0x72, - 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x66, 0x0a, 0x11, 0x62, 0x69, 0x67, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x69, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0f, 0x62, 0x69, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x75, 0x0a, 0x16, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x67, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x6e, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x14, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, - 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xf8, 0x01, 0x0a, 0x06, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0xed, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, - 0x08, 0x6e, 0x6f, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x69, - 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x10, - 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x03, - 0x12, 0x1b, 0x0a, 0x17, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x04, 0x12, 0x14, 0x0a, - 0x10, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x74, 0x69, - 0x63, 0x6b, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x61, - 0x72, 0x62, 0x69, 0x74, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x08, - 0x12, 0x15, 0x0a, 0x11, 0x62, 0x69, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x09, 0x12, 0x1a, 0x0a, 0x16, 0x75, 0x6e, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x10, 0x0a, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x1a, - 0x0a, 0x18, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x61, - 0x72, 0x62, 0x69, 0x74, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x82, - 0x02, 0x0a, 0x25, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x53, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, - 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x61, 0x73, 0x63, 0x69, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, - 0x61, 0x73, 0x63, 0x69, 0x69, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x03, 0x72, 0x61, 0x77, 0x88, 0x01, 0x01, 0x1a, - 0x35, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x61, 0x73, 0x63, 0x69, 0x69, 0x10, 0x01, 0x12, 0x07, 0x0a, - 0x03, 0x72, 0x61, 0x77, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x73, 0x63, 0x69, 0x69, 0x42, 0x06, 0x0a, 0x04, 0x5f, - 0x72, 0x61, 0x77, 0x22, 0x85, 0x04, 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, - 0x12, 0x1d, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, - 0x30, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x2e, 0x46, 0x6c, 0x61, - 0x67, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x88, 0x01, - 0x01, 0x12, 0x45, 0x0a, 0x0d, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x52, 0x73, - 0x76, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x0c, 0x72, 0x73, 0x76, 0x70, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x40, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, - 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x52, 0x73, 0x76, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x52, 0x0a, - 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x12, 0x38, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, - 0x76, 0x70, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x0b, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0a, - 0x72, 0x73, 0x76, 0x70, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x37, 0x0a, 0x0c, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x1a, 0x61, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x22, 0x59, 0x0a, 0x04, 0x45, + 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x70, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x69, 0x70, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x5c, 0x0a, 0x0d, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x62, 0x0a, 0x0f, 0x74, 0x69, 0x6d, + 0x65, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x74, + 0x69, 0x6d, 0x65, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, + 0x0f, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0e, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, + 0x61, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x66, 0x0a, 0x11, 0x62, + 0x69, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x42, 0x69, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x0f, 0x62, 0x69, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x75, 0x0a, 0x16, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, + 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xf8, 0x01, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xed, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x0c, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x01, 0x12, 0x11, 0x0a, + 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, + 0x12, 0x10, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x04, 0x12, + 0x14, 0x0a, 0x10, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, + 0x74, 0x69, 0x63, 0x6b, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x07, 0x12, 0x13, 0x0a, + 0x0f, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x10, 0x08, 0x12, 0x15, 0x0a, 0x11, 0x62, 0x69, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x09, 0x12, 0x1a, 0x0a, 0x16, 0x75, 0x6e, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x10, 0x0a, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x12, 0x0a, 0x10, + 0x5f, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x82, 0x02, 0x0a, 0x25, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, + 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x53, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x61, 0x73, 0x63, 0x69, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, + 0x52, 0x05, 0x61, 0x73, 0x63, 0x69, 0x69, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x72, 0x61, + 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x03, 0x72, 0x61, 0x77, 0x88, 0x01, + 0x01, 0x1a, 0x35, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x72, - 0x65, 0x73, 0x68, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x61, - 0x70, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x72, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x61, 0x70, - 0x61, 0x62, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x22, 0xd8, 0x01, 0x0a, 0x0e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3c, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4c, 0x65, 0x6e, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x61, 0x73, 0x63, 0x69, 0x69, 0x10, 0x01, 0x12, + 0x07, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x73, 0x63, 0x69, 0x69, 0x42, 0x06, 0x0a, + 0x04, 0x5f, 0x72, 0x61, 0x77, 0x22, 0x85, 0x04, 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, + 0x76, 0x70, 0x12, 0x1d, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x2e, 0x46, + 0x6c, 0x61, 0x67, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, + 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x0d, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, + 0x52, 0x73, 0x76, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x0c, 0x72, 0x73, + 0x76, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x40, 0x0a, 0x0c, 0x74, 0x69, + 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, + 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x12, 0x38, 0x0a, 0x08, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x73, 0x76, 0x70, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x0b, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x52, 0x0a, 0x72, 0x73, 0x76, 0x70, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x37, 0x0a, 0x0c, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x61, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x22, 0x59, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x63, 0x61, 0x70, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x72, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x61, 0x70, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x22, 0xd8, 0x01, + 0x0a, 0x0e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, + 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, + 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, + 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x0f, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3d, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x1a, 0x2b, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x49, 0x0a, 0x13, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x51, 0x0a, 0x13, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x75, 0x6d, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x75, 0x6d, 0x22, + 0xe4, 0x01, 0x0a, 0x14, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, @@ -121362,1299 +140453,1286 @@ var file_otg_proto_rawDesc = []byte{ 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x0f, 0x46, 0x6c, 0x6f, 0x77, 0x52, - 0x53, 0x56, 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x1a, 0x2b, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0x21, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x49, 0x0a, 0x13, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x51, 0x0a, 0x13, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x12, 0x3a, 0x0a, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb3, 0x08, 0x0a, 0x18, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x52, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x75, 0x6d, 0x22, 0xe4, 0x01, - 0x0a, 0x14, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, - 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb3, 0x08, 0x0a, 0x18, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x12, 0x46, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x07, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x73, 0x76, - 0x70, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, - 0x70, 0x52, 0x07, 0x72, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x12, 0x48, 0x0a, 0x0b, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x54, 0x69, - 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, - 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x78, 0x70, 0x6c, 0x69, - 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0d, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, - 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x0d, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, - 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5a, 0x0a, 0x11, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x52, 0x10, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x73, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x5f, 0x74, 0x73, 0x70, 0x65, 0x63, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x52, 0x0b, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x12, 0x4b, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0xd1, 0x01, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x0c, 0x0a, - 0x08, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x68, 0x6f, 0x70, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x74, - 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, - 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x10, 0x04, - 0x12, 0x11, 0x0a, 0x0d, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x10, 0x07, 0x12, - 0x10, 0x0a, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x73, 0x70, 0x65, 0x63, 0x10, - 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x10, 0x09, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x0a, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x1f, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x31, - 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0x82, - 0x02, 0x0a, 0x1f, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x4d, 0x0a, 0x0f, 0x6c, 0x73, 0x70, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, - 0x69, 0x70, 0x76, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, - 0x34, 0x52, 0x0d, 0x6c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, - 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x6c, 0x73, 0x70, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0xa4, 0x03, 0x0a, 0x20, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x12, 0x87, 0x01, 0x0a, 0x1d, 0x69, 0x70, 0x76, - 0x34, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x45, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, - 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x19, 0x69, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x50, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, - 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x12, 0x51, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, - 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x52, 0x08, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x12, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x64, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x64, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0xd8, 0x02, 0x0a, 0x1e, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x4c, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x49, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x52, 0x0a, 0x0a, 0x61, - 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, 0x6e, 0x74, - 0x65, 0x67, 0x65, 0x72, 0x52, 0x09, 0x61, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x12, - 0x49, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, 0x70, - 0x76, 0x34, 0x52, 0x06, 0x61, 0x73, 0x49, 0x70, 0x76, 0x34, 0x1a, 0x3e, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x34, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0e, 0x0a, - 0x0a, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x10, 0x01, 0x12, 0x0b, 0x0a, - 0x07, 0x61, 0x73, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x1f, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x61, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3b, 0x0a, 0x06, - 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, + 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x07, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x43, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x1f, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4d, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x43, 0x54, - 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x04, - 0x69, 0x70, 0x76, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, - 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x1a, 0x2b, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xe1, 0x01, 0x0a, 0x17, 0x46, 0x6c, 0x6f, 0x77, 0x52, - 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, - 0x76, 0x34, 0x12, 0x51, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, - 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x73, 0x0a, 0x18, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, - 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x6f, 0x67, 0x69, - 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x48, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x52, 0x16, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x66, 0x61, 0x63, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x22, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, - 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x54, 0x69, - 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x43, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, - 0x54, 0x79, 0x70, 0x65, 0x22, 0xe9, 0x01, 0x0a, 0x22, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x54, 0x69, 0x6d, 0x65, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x50, 0x0a, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x43, - 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, - 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x08, 0x72, + 0x73, 0x76, 0x70, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x31, 0x52, - 0x05, 0x74, 0x79, 0x70, 0x65, 0x31, 0x1a, 0x2d, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0x23, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, - 0x65, 0x5f, 0x31, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0x7e, 0x0a, 0x1b, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x31, 0x12, - 0x5f, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x5f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, - 0x61, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x31, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x52, - 0x52, 0x0e, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x52, - 0x22, 0xa2, 0x01, 0x0a, 0x25, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x73, 0x76, 0x70, + 0x48, 0x6f, 0x70, 0x52, 0x07, 0x72, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x12, 0x48, 0x0a, 0x0b, + 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, + 0x69, 0x74, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x78, 0x70, - 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x46, 0x0a, - 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x78, 0x70, 0x6c, - 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, - 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0xfc, 0x01, 0x0a, 0x2a, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0d, 0x65, 0x78, 0x70, 0x6c, + 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x0d, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, + 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5a, 0x0a, 0x11, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x43, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a, - 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x61, 0x73, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x52, 0x10, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, - 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x31, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x31, 0x1a, 0x2d, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x23, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x31, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x6b, 0x0a, 0x1e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x12, 0x49, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x54, 0x79, 0x70, 0x65, 0x31, 0x45, 0x78, - 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x22, 0x69, 0x0a, 0x24, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x54, 0x79, 0x70, - 0x65, 0x31, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, - 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x54, 0x79, 0x70, 0x65, 0x31, 0x45, 0x78, 0x70, 0x6c, 0x69, - 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xea, 0x02, 0x0a, - 0x28, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x54, 0x79, 0x70, 0x65, 0x31, 0x45, 0x78, - 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x56, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x73, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x73, 0x70, 0x65, 0x63, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x52, 0x0b, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x12, 0x4b, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0xd1, 0x01, + 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, + 0x0c, 0x0a, 0x08, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x68, 0x6f, 0x70, 0x10, 0x02, 0x12, 0x0f, 0x0a, + 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x12, + 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x10, + 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x73, 0x70, 0x65, + 0x63, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x10, 0x09, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, + 0x0a, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x91, 0x01, 0x0a, + 0x1f, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x82, 0x02, 0x0a, 0x1f, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x0f, 0x6c, 0x73, 0x70, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, + 0x70, 0x76, 0x34, 0x52, 0x0d, 0x6c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, + 0x76, 0x34, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x6c, 0x73, 0x70, 0x5f, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xa4, 0x03, 0x0a, 0x20, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x12, 0x87, 0x01, 0x0a, 0x1d, 0x69, + 0x70, 0x76, 0x34, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, + 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x19, 0x69, 0x70, 0x76, 0x34, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x50, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x51, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, + 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x52, + 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x12, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, + 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x64, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0xd8, 0x02, 0x0a, + 0x1e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, + 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, + 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x52, 0x0a, + 0x0a, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, + 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x52, 0x09, 0x61, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, + 0x72, 0x12, 0x49, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, + 0x49, 0x70, 0x76, 0x34, 0x52, 0x06, 0x61, 0x73, 0x49, 0x70, 0x76, 0x34, 0x1a, 0x3e, 0x0a, 0x06, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x34, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x0e, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x10, 0x01, 0x12, + 0x0b, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x1f, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x12, 0x31, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3b, + 0x0a, 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x43, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x1f, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x4d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, + 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, + 0x43, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, + 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, + 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, + 0x1a, 0x2b, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xe1, 0x01, 0x0a, 0x17, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, + 0x49, 0x70, 0x76, 0x34, 0x12, 0x51, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, + 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x73, 0x0a, 0x18, 0x6c, 0x6f, 0x67, 0x69, 0x63, + 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x68, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, + 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x6f, + 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x48, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x16, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x97, 0x01, 0x0a, + 0x22, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x43, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0xe9, 0x01, 0x0a, 0x22, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x54, 0x69, + 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x50, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x43, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x37, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, + 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x31, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x31, 0x1a, 0x2d, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x22, 0x23, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x74, + 0x79, 0x70, 0x65, 0x5f, 0x31, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x22, 0x7e, 0x0a, 0x1b, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, + 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x31, 0x12, 0x5f, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x5f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x50, 0x61, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x31, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x52, 0x52, 0x0e, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x52, 0x22, 0xa2, 0x01, 0x0a, 0x25, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, + 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, + 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, + 0x46, 0x0a, 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, + 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x78, + 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0xfc, 0x01, 0x0a, 0x2a, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x3a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, + 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x31, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x31, 0x1a, 0x2d, 0x0a, 0x06, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x23, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x31, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x6b, 0x0a, 0x1e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x12, 0x49, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x54, 0x79, 0x70, 0x65, 0x31, + 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x62, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x22, 0x69, 0x0a, 0x24, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x54, + 0x79, 0x70, 0x65, 0x31, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x53, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x54, 0x79, 0x70, 0x65, 0x31, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x4e, 0x0a, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, + 0x65, 0x63, 0x74, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xea, + 0x02, 0x0a, 0x28, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x54, 0x79, 0x70, 0x65, 0x31, + 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x62, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x56, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x54, 0x79, 0x70, 0x65, 0x31, 0x45, + 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, + 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, + 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x0a, 0x69, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x12, 0x48, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, - 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x0a, 0x69, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x12, 0x48, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, - 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x41, 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x52, 0x08, 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x1a, 0x41, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x37, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0f, - 0x0a, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x10, 0x01, 0x12, - 0x0d, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x02, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xbf, 0x02, 0x0a, 0x28, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, - 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x4d, 0x0a, 0x05, 0x6c, 0x5f, 0x62, 0x69, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, - 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x42, 0x69, 0x74, 0x52, - 0x04, 0x6c, 0x42, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, - 0x52, 0x53, 0x56, 0x50, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, - 0x62, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, - 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0xe7, 0x01, 0x0a, 0x26, + 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x41, 0x53, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x52, 0x08, 0x61, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x1a, 0x41, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x37, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x0f, 0x0a, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x10, + 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x02, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xbf, 0x02, 0x0a, 0x28, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, - 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x41, 0x53, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x05, 0x6c, 0x5f, 0x62, 0x69, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, - 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x31, 0x41, 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x42, 0x69, 0x74, 0x52, 0x04, 0x6c, - 0x42, 0x69, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, - 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x61, 0x73, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x73, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xf2, 0x01, 0x0a, 0x1b, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, + 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x4d, 0x0a, 0x05, 0x6c, 0x5f, 0x62, 0x69, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x42, 0x69, + 0x74, 0x52, 0x04, 0x6c, 0x42, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, + 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x12, 0x62, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, + 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, + 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0xe7, 0x01, + 0x0a, 0x26, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, + 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, + 0x41, 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x05, 0x6c, 0x5f, 0x62, 0x69, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x31, 0x41, 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x42, 0x69, 0x74, 0x52, + 0x04, 0x6c, 0x42, 0x69, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, - 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x82, 0x02, 0x0a, 0x23, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x41, 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x12, 0x51, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x53, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, - 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, - 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x9b, 0x01, 0x0a, 0x24, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x40, 0x0a, 0x06, 0x63, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x43, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0xa1, 0x02, - 0x0a, 0x24, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x54, 0x79, 0x70, - 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x5e, 0x0a, 0x13, 0x77, 0x69, - 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x11, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x1a, 0x3a, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x30, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x17, 0x0a, - 0x13, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0xd8, 0x01, 0x0a, 0x29, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, - 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, - 0x59, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x05, 0x6c, 0x33, - 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, - 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, - 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x4c, 0x33, 0x70, 0x69, 0x64, 0x52, 0x05, 0x6c, 0x33, 0x70, 0x69, 0x64, 0x22, 0xa3, 0x01, 0x0a, - 0x28, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x44, 0x0a, 0x06, - 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, 0x54, 0x79, - 0x70, 0x65, 0x22, 0xf0, 0x02, 0x0a, 0x28, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, - 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x56, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x39, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, + 0x65, 0x41, 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, + 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x61, 0x73, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x73, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xf2, 0x01, 0x0a, 0x1b, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, + 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, + 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, + 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x82, 0x02, 0x0a, + 0x23, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, + 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x12, 0x51, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x41, 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x49, 0x0a, 0x0a, 0x6c, 0x73, 0x70, 0x5f, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4c, 0x73, - 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x09, 0x6c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x12, 0x50, 0x0a, 0x0d, 0x6c, 0x73, 0x70, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x5f, 0x72, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x61, 0x52, 0x0b, 0x6c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x52, 0x61, 0x1a, 0x44, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x3a, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x6c, 0x73, 0x70, 0x5f, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x6c, 0x73, 0x70, 0x5f, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x72, 0x61, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xe0, 0x02, 0x0a, 0x25, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, - 0x2a, 0x0a, 0x0e, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x65, 0x74, 0x75, 0x70, - 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x68, - 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, - 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x66, - 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x48, 0x0a, - 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0a, 0x6e, 0x61, 0x6d, - 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, - 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, - 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, - 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x84, 0x04, 0x0a, 0x27, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x52, 0x61, 0x12, 0x24, 0x0a, 0x0b, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, - 0x61, 0x6e, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x65, 0x78, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x41, 0x6e, 0x79, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e, - 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x01, 0x52, 0x0a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x6e, 0x79, 0x88, 0x01, 0x01, - 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x41, 0x6c, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, - 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, - 0x52, 0x0d, 0x73, 0x65, 0x74, 0x75, 0x70, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, - 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x0f, - 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, - 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, - 0x6c, 0x61, 0x67, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x26, - 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x65, 0x74, 0x75, 0x70, - 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x68, 0x6f, - 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x0f, - 0x0a, 0x0d, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0xdb, 0x01, 0x0a, 0x15, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4c, 0x73, 0x70, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x72, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x68, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, - 0x1b, 0x0a, 0x17, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, - 0x73, 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, - 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x80, 0x02, - 0x0a, 0x22, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x12, 0x50, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, - 0x53, 0x56, 0x50, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, - 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x9f, 0x01, 0x0a, 0x26, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, - 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x6c, + 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, + 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x24, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, + 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x40, 0x0a, + 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x43, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, + 0xa1, 0x02, 0x0a, 0x24, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x54, + 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x5e, 0x0a, 0x13, + 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x11, 0x77, 0x69, 0x74, 0x68, 0x6f, + 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x1a, 0x3a, 0x0a, 0x06, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x30, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x17, 0x0a, 0x13, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0xd8, 0x01, 0x0a, 0x29, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0x59, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x05, + 0x6c, 0x33, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x4c, 0x33, 0x70, 0x69, 0x64, 0x52, 0x05, 0x6c, 0x33, 0x70, 0x69, 0x64, 0x22, 0xa3, + 0x01, 0x0a, 0x28, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x42, - 0x0a, 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x44, + 0x0a, 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, - 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, 0x54, 0x79, - 0x70, 0x65, 0x22, 0x97, 0x02, 0x0a, 0x26, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, + 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, + 0x54, 0x79, 0x70, 0x65, 0x22, 0xf0, 0x02, 0x0a, 0x28, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x56, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x39, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x49, 0x0a, 0x0a, 0x6c, 0x73, 0x70, + 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x09, 0x6c, 0x73, 0x70, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x50, 0x0a, 0x0d, 0x6c, 0x73, 0x70, 0x5f, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x5f, 0x72, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4c, 0x73, + 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x61, 0x52, 0x0b, 0x6c, 0x73, 0x70, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x61, 0x1a, 0x44, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x3a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x6c, 0x73, 0x70, + 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x6c, 0x73, 0x70, + 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x72, 0x61, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xe0, 0x02, 0x0a, 0x25, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x65, 0x74, + 0x75, 0x70, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, + 0x10, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x68, 0x6f, 0x6c, 0x64, 0x69, + 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, + 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4c, 0x73, 0x70, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, + 0x48, 0x0a, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0a, 0x6e, + 0x61, 0x6d, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x02, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, + 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x84, 0x04, 0x0a, 0x27, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x61, 0x12, 0x24, 0x0a, 0x0b, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x65, + 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x6e, 0x79, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x01, 0x52, 0x0a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x6e, 0x79, 0x88, + 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6c, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x65, 0x74, 0x75, + 0x70, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x03, 0x52, 0x0d, 0x73, 0x65, 0x74, 0x75, 0x70, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, + 0x52, 0x0f, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x52, + 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x65, 0x74, + 0x75, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x13, 0x0a, 0x11, 0x5f, + 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0xdb, 0x01, 0x0a, 0x15, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4c, 0x73, + 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x43, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x1a, 0x72, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x68, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x10, + 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x10, 0x02, 0x12, 0x14, + 0x0a, 0x10, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x72, + 0x65, 0x64, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x80, 0x02, 0x0a, 0x22, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x50, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x26, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, + 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, + 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x12, 0x42, 0x0a, 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x54, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x0f, 0x6c, 0x73, 0x70, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x97, 0x02, 0x0a, 0x26, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x54, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, + 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x0f, 0x6c, 0x73, 0x70, 0x5f, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, + 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x0d, 0x6c, 0x73, + 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x1a, 0x36, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x13, + 0x0a, 0x0f, 0x6c, 0x73, 0x70, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x70, 0x76, + 0x34, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xdd, + 0x02, 0x0a, 0x27, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x0d, 0x6c, 0x73, 0x70, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, - 0x6c, 0x73, 0x70, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x10, - 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xdd, 0x02, 0x0a, - 0x27, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x12, 0x87, 0x01, 0x0a, 0x1a, 0x69, 0x70, 0x76, - 0x34, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4a, 0x2e, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x12, 0x87, 0x01, 0x0a, 0x1a, 0x69, + 0x70, 0x76, 0x34, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x4a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x17, 0x69, 0x70, 0x76, + 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x57, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, + 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x4f, 0x0a, + 0x06, 0x6c, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, - 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x17, 0x69, 0x70, 0x76, 0x34, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x57, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x4f, 0x0a, 0x06, 0x6c, - 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, - 0x4c, 0x73, 0x70, 0x49, 0x64, 0x52, 0x05, 0x6c, 0x73, 0x70, 0x49, 0x64, 0x22, 0x99, 0x01, 0x0a, - 0x23, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, - 0x73, 0x70, 0x65, 0x63, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, - 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x43, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0xf4, 0x01, 0x0a, 0x23, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x43, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x51, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, - 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x54, 0x73, 0x70, 0x65, 0x63, 0x43, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, - 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, - 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x07, 0x69, 0x6e, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x1a, 0x2f, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x25, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x65, - 0x72, 0x76, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0xa6, 0x0b, 0x0a, 0x1e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x12, 0x4b, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x51, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x31, 0x12, 0x5e, 0x0a, 0x0e, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, - 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x52, 0x0d, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x12, 0x5e, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, - 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x08, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x62, 0x69, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x76, 0x34, 0x4c, 0x73, 0x70, 0x49, 0x64, 0x52, 0x05, 0x6c, 0x73, 0x70, 0x49, 0x64, 0x22, 0x99, + 0x01, 0x0a, 0x23, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x06, 0x63, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x43, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0xf4, 0x01, 0x0a, 0x23, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x43, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x51, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x43, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, + 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x07, 0x69, 0x6e, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x1a, 0x2f, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x25, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0xa6, 0x0b, 0x0a, 0x1e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, + 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x12, 0x4b, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x51, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x5a, 0x65, 0x72, 0x6f, 0x42, 0x69, 0x74, 0x52, 0x07, 0x7a, 0x65, 0x72, 0x6f, 0x42, 0x69, 0x74, - 0x12, 0x51, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x32, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x31, 0x12, 0x5e, 0x0a, 0x0e, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, + 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0d, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x12, 0x5e, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, + 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x08, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x62, 0x69, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x5a, 0x65, 0x72, 0x6f, 0x42, 0x69, 0x74, 0x52, 0x07, 0x7a, 0x65, 0x72, 0x6f, 0x42, + 0x69, 0x74, 0x12, 0x51, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x32, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x32, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x32, 0x12, 0x72, 0x0a, 0x16, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5f, + 0x6f, 0x66, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x13, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4f, 0x66, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x8b, 0x01, 0x0a, 0x1f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x74, 0x73, 0x70, 0x65, 0x63, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x32, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x32, 0x12, 0x72, 0x0a, 0x16, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5f, 0x6f, 0x66, - 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x73, 0x70, 0x65, 0x63, 0x52, 0x1b, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x54, 0x73, 0x70, 0x65, 0x63, 0x12, 0x68, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x5f, 0x31, 0x32, 0x37, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x13, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x8b, 0x01, 0x0a, 0x1f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x74, 0x73, 0x70, 0x65, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x45, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x54, 0x73, 0x70, 0x65, 0x63, 0x52, 0x1b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x49, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x54, 0x73, 0x70, 0x65, 0x63, 0x12, 0x68, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x5f, 0x31, 0x32, 0x37, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x10, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x46, 0x6c, 0x61, 0x67, 0x12, - 0x6e, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x31, 0x32, 0x37, - 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, - 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, - 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x31, 0x32, 0x37, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x12, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, - 0x2f, 0x0a, 0x11, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, - 0x72, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x2f, 0x0a, 0x11, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x02, 0x48, 0x01, 0x52, 0x0f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, - 0x61, 0x74, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x02, 0x48, 0x02, 0x52, 0x0c, 0x70, 0x65, 0x61, - 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6e, 0x0a, 0x14, - 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x5f, - 0x75, 0x6e, 0x69, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, - 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, - 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x6b, 0x0a, 0x13, - 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, - 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x61, 0x63, 0x6b, - 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x50, - 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, - 0x14, 0x0a, 0x12, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x65, 0x61, 0x6b, 0x5f, 0x64, - 0x61, 0x74, 0x61, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x22, 0x99, 0x01, 0x0a, 0x23, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, - 0x54, 0x79, 0x70, 0x65, 0x22, 0xec, 0x01, 0x0a, 0x23, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x51, 0x0a, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x38, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x31, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x31, 0x1a, 0x2d, 0x0a, 0x06, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x23, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, - 0x74, 0x79, 0x70, 0x65, 0x5f, 0x31, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x67, 0x0a, 0x1c, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, - 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x31, 0x12, 0x47, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x54, 0x79, 0x70, 0x65, 0x31, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x6a, 0x0a, 0x22, + 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x46, 0x6c, 0x61, 0x67, 0x52, + 0x10, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x46, 0x6c, 0x61, + 0x67, 0x12, 0x6e, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x31, + 0x32, 0x37, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, + 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x12, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x12, 0x2f, 0x0a, 0x11, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x48, 0x00, 0x52, 0x0f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x61, 0x74, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x02, 0x48, 0x01, 0x52, + 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x02, 0x48, 0x02, 0x52, 0x0c, 0x70, + 0x65, 0x61, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6e, + 0x0a, 0x14, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x65, + 0x64, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, + 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x69, + 0x6d, 0x75, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x6b, + 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, + 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, + 0x6d, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x14, 0x0a, 0x12, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x61, 0x74, + 0x65, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x65, 0x61, 0x6b, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x22, 0x99, 0x01, 0x0a, 0x23, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0xec, 0x01, 0x0a, 0x23, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x51, + 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x43, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x38, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x31, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x31, 0x1a, 0x2d, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x23, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, + 0x0a, 0x06, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x31, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x67, 0x0a, 0x1c, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x31, 0x12, 0x47, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x54, 0x79, 0x70, 0x65, 0x31, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x12, 0x44, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, - 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x62, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xe2, 0x02, 0x0a, 0x2b, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x62, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x59, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, + 0x74, 0x73, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x6a, + 0x0a, 0x22, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x54, 0x79, 0x70, 0x65, 0x31, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x12, 0x44, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x62, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xe2, 0x02, 0x0a, 0x2b, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, 0x75, 0x62, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x1a, 0x3e, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x34, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xe2, 0x02, - 0x0a, 0x27, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x59, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x53, + 0x75, 0x62, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, - 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x36, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x12, 0x61, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x1a, 0x3e, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x34, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0xe2, 0x02, 0x0a, 0x27, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, + 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x36, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x12, 0x61, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, + 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, + 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x64, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0c, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x36, 0x0a, 0x05, + 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x50, 0x76, 0x34, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, + 0x6c, 0x61, 0x67, 0x73, 0x22, 0xd3, 0x01, 0x0a, 0x1b, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x50, 0x76, 0x34, + 0x46, 0x6c, 0x61, 0x67, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x50, + 0x76, 0x34, 0x46, 0x6c, 0x61, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x1a, + 0x5e, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x54, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x75, 0x73, 0x65, 0x10, 0x02, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xa9, 0x02, 0x0a, 0x21, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x12, 0x36, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x48, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x64, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0c, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x36, 0x0a, 0x05, 0x66, 0x6c, - 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x49, 0x50, 0x76, 0x34, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, 0x6c, 0x61, - 0x67, 0x73, 0x22, 0xd3, 0x01, 0x0a, 0x1b, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x50, 0x76, 0x34, 0x46, 0x6c, - 0x61, 0x67, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x50, 0x76, 0x34, - 0x46, 0x6c, 0x61, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x5e, 0x0a, - 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x54, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x1e, 0x0a, 0x1a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x01, - 0x12, 0x1b, 0x0a, 0x17, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x75, 0x73, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xa9, 0x02, 0x0a, 0x21, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x36, - 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x48, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, - 0x12, 0x49, 0x0a, 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x31, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, + 0x67, 0x73, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x43, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x37, 0x0a, + 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, + 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x8e, 0x02, 0x0a, 0x1c, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x22, 0x8e, 0x02, 0x0a, 0x1c, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, - 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x09, 0x61, 0x73, 0x49, 0x6e, 0x74, + 0x65, 0x67, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x68, 0x65, + 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x61, 0x73, 0x48, 0x65, 0x78, + 0x88, 0x01, 0x01, 0x1a, 0x3d, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x33, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x74, + 0x65, 0x67, 0x65, 0x72, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x68, 0x65, 0x78, + 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0d, 0x0a, + 0x0b, 0x5f, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x61, 0x73, 0x5f, 0x68, 0x65, 0x78, 0x22, 0xee, 0x01, 0x0a, 0x19, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, + 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, + 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, + 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb2, 0x01, 0x0a, 0x19, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x19, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xed, 0x02, + 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x69, 0x78, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x05, 0x66, 0x69, 0x78, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x49, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, + 0x7a, 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, + 0x12, 0x3b, 0x0a, 0x0c, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, + 0x77, 0x53, 0x69, 0x7a, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x73, + 0x52, 0x0b, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x73, 0x1a, 0x59, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4f, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x66, 0x69, 0x78, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x72, 0x61, + 0x6e, 0x64, 0x6f, 0x6d, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x10, 0x04, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x22, 0x79, 0x0a, + 0x11, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, + 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x03, 0x65, 0x6e, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e, 0x64, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x22, 0x4e, 0x0a, 0x0e, 0x46, 0x6c, 0x6f, 0x77, + 0x53, 0x69, 0x7a, 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x03, 0x6d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x69, 0x6e, + 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x78, 0x22, 0xa9, 0x03, 0x0a, 0x13, 0x46, 0x6c, 0x6f, + 0x77, 0x53, 0x69, 0x7a, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x73, + 0x12, 0x41, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x57, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, + 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, + 0x73, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x36, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, + 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x73, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0x3d, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x33, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0e, 0x0a, + 0x0a, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x6f, 0x0a, 0x0a, 0x50, 0x72, 0x65, + 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x22, 0x61, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x08, 0x0a, 0x04, 0x69, 0x6d, 0x69, 0x78, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x69, 0x70, + 0x73, 0x65, 0x63, 0x5f, 0x69, 0x6d, 0x69, 0x78, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x70, + 0x76, 0x36, 0x5f, 0x69, 0x6d, 0x69, 0x78, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x74, 0x61, + 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x6d, 0x69, 0x78, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, + 0x74, 0x63, 0x70, 0x5f, 0x69, 0x6d, 0x69, 0x78, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, + 0x69, 0x6e, 0x65, 0x64, 0x22, 0x65, 0x0a, 0x19, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, + 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x77, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x48, 0x01, 0x52, 0x06, 0x77, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x88, 0x03, 0x0a, 0x08, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x15, 0x0a, 0x03, 0x70, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, + 0x03, 0x70, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x62, 0x70, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x03, 0x62, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x17, + 0x0a, 0x04, 0x6b, 0x62, 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x04, + 0x6b, 0x62, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6d, 0x62, 0x70, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x04, 0x6d, 0x62, 0x70, 0x73, 0x88, 0x01, 0x01, + 0x12, 0x17, 0x0a, 0x04, 0x67, 0x62, 0x70, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, + 0x52, 0x04, 0x67, 0x62, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x70, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x48, 0x06, 0x52, + 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x61, + 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x57, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, + 0x00, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x70, 0x73, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x62, 0x70, + 0x73, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x6b, 0x62, 0x70, 0x73, 0x10, 0x03, 0x12, 0x08, 0x0a, + 0x04, 0x6d, 0x62, 0x70, 0x73, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x62, 0x70, 0x73, 0x10, + 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x10, + 0x06, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, + 0x5f, 0x70, 0x70, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x62, 0x70, 0x73, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x6b, 0x62, 0x70, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x67, 0x62, 0x70, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x22, 0x8c, 0x03, 0x0a, 0x0c, 0x46, 0x6c, 0x6f, 0x77, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, + 0x6f, 0x77, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x46, 0x69, 0x78, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x52, 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, + 0x3a, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, + 0x77, 0x46, 0x69, 0x78, 0x65, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x52, 0x0c, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x62, + 0x75, 0x72, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x42, 0x75, 0x72, 0x73, 0x74, 0x52, 0x05, 0x62, 0x75, 0x72, 0x73, + 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x1a, 0x62, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x58, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x10, 0x02, 0x12, + 0x09, 0x0a, 0x05, 0x62, 0x75, 0x72, 0x73, 0x74, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x63, 0x6f, + 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x10, 0x04, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x55, 0x0a, 0x0e, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x67, 0x61, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x03, 0x67, 0x61, 0x70, 0x88, 0x01, 0x01, 0x12, 0x24, + 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x64, + 0x65, 0x6c, 0x61, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x67, 0x61, 0x70, 0x22, 0xb6, 0x02, 0x0a, + 0x09, 0x46, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x02, 0x48, 0x01, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x25, + 0x0a, 0x0b, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x02, 0x48, 0x02, 0x52, 0x0b, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, + 0x64, 0x73, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0c, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x48, 0x03, 0x52, 0x0c, 0x6d, + 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x4f, + 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x45, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, + 0x00, 0x12, 0x09, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, + 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x10, 0x02, 0x12, 0x10, 0x0a, + 0x0c, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x10, 0x03, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x10, 0x46, 0x6c, 0x6f, 0x77, 0x46, 0x69, + 0x78, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x07, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x67, 0x61, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x03, 0x67, 0x61, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x24, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x52, + 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x67, 0x61, 0x70, 0x22, 0x82, 0x01, 0x0a, 0x10, 0x46, + 0x6c, 0x6f, 0x77, 0x46, 0x69, 0x78, 0x65, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, + 0x1d, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, + 0x48, 0x00, 0x52, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, 0x01, 0x12, 0x15, + 0x0a, 0x03, 0x67, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x03, 0x67, + 0x61, 0x70, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x44, + 0x65, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x5f, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x67, 0x61, 0x70, 0x22, + 0xc5, 0x01, 0x0a, 0x09, 0x46, 0x6c, 0x6f, 0x77, 0x42, 0x75, 0x72, 0x73, 0x74, 0x12, 0x1b, 0x0a, + 0x06, 0x62, 0x75, 0x72, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, + 0x06, 0x62, 0x75, 0x72, 0x73, 0x74, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x07, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x67, 0x61, 0x70, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x03, 0x67, 0x61, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x46, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x75, 0x72, 0x73, 0x74, 0x5f, + 0x67, 0x61, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x46, 0x6c, 0x6f, 0x77, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x42, 0x75, 0x72, 0x73, 0x74, 0x47, 0x61, 0x70, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x42, 0x75, 0x72, 0x73, 0x74, 0x47, 0x61, 0x70, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x62, 0x75, 0x72, + 0x73, 0x74, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, + 0x06, 0x0a, 0x04, 0x5f, 0x67, 0x61, 0x70, 0x22, 0xd6, 0x02, 0x0a, 0x19, 0x46, 0x6c, 0x6f, 0x77, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x75, 0x72, + 0x73, 0x74, 0x47, 0x61, 0x70, 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x75, 0x72, + 0x73, 0x74, 0x47, 0x61, 0x70, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x01, 0x52, + 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x6e, 0x61, 0x6e, + 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, + 0x52, 0x0b, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, 0x01, + 0x12, 0x27, 0x0a, 0x0c, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x48, 0x03, 0x52, 0x0c, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x4f, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x45, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x6e, 0x61, 0x6e, 0x6f, 0x73, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x6d, 0x69, 0x63, 0x72, + 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x42, + 0x0e, 0x0a, 0x0c, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x42, + 0x0f, 0x0a, 0x0d, 0x5f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, + 0x22, 0xc1, 0x02, 0x0a, 0x0b, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x6c, 0x6f, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x04, 0x6c, + 0x6f, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x0b, 0x72, 0x78, 0x5f, 0x74, 0x78, 0x5f, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x78, 0x54, 0x78, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x52, + 0x09, 0x72, 0x78, 0x54, 0x78, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x23, 0x0a, 0x0a, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, + 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, + 0x31, 0x0a, 0x07, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x74, 0x65, 0x6e, + 0x63, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x07, 0x6c, 0x61, 0x74, 0x65, 0x6e, + 0x63, 0x79, 0x12, 0x4d, 0x0a, 0x16, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, + 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x65, + 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x61, 0x67, 0x73, 0x52, 0x14, 0x70, 0x72, 0x65, + 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x12, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x74, + 0x65, 0x6e, 0x63, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, + 0x77, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, + 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x04, 0x6d, 0x6f, 0x64, + 0x65, 0x88, 0x01, 0x01, 0x1a, 0x43, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x3b, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x66, + 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x63, 0x75, 0x74, 0x5f, + 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x3e, 0x0a, + 0x12, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, + 0x61, 0x67, 0x73, 0x12, 0x1c, 0x0a, 0x07, 0x72, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x72, 0x78, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x72, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xee, 0x01, + 0x0a, 0x0d, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x78, 0x54, 0x78, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, + 0x3b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x78, 0x54, 0x78, 0x52, 0x61, + 0x74, 0x69, 0x6f, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x08, + 0x72, 0x78, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x78, 0x54, 0x78, 0x52, 0x61, 0x74, + 0x69, 0x6f, 0x52, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x72, 0x78, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x02, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x3a, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x30, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x0c, 0x0a, 0x08, 0x72, 0x78, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x09, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x16, + 0x0a, 0x14, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x78, 0x54, 0x78, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x52, + 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf6, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, + 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x04, 0x6c, 0x69, 0x6e, + 0x6b, 0x12, 0x45, 0x0a, 0x11, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x78, 0x52, 0x61, 0x74, 0x65, 0x54, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x52, 0x0f, 0x72, 0x78, 0x52, 0x61, 0x74, 0x65, 0x54, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x5a, 0x0a, 0x18, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x65, 0x72, + 0x74, 0x69, 0x73, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x16, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, + 0x6f, 0x0a, 0x14, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x78, 0x52, 0x61, 0x74, 0x65, 0x54, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x48, 0x01, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x22, 0x33, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x1b, 0x0a, + 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, + 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x45, 0x0a, 0x1b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x88, 0x01, + 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x83, 0x02, 0x0a, + 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0xa9, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x22, + 0xa0, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x6c, 0x69, 0x6e, + 0x6b, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x6c, 0x69, 0x6e, 0x6b, + 0x5f, 0x75, 0x70, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x10, 0x04, 0x12, 0x20, + 0x0a, 0x1c, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x61, + 0x62, 0x6f, 0x76, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x10, 0x05, + 0x12, 0x20, 0x0a, 0x1c, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x5f, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x10, 0x06, 0x22, 0x77, 0x0a, 0x11, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x75, + 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x61, 0x6c, 0x6c, + 0x62, 0x61, 0x63, 0x6b, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x63, + 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0xa6, 0x03, 0x0a, 0x04, + 0x4c, 0x6c, 0x64, 0x70, 0x12, 0x33, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, + 0x6c, 0x64, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x0a, 0x63, 0x68, 0x61, + 0x73, 0x73, 0x69, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x49, + 0x64, 0x52, 0x09, 0x63, 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x07, + 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x52, 0x06, + 0x70, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65, + 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x09, + 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x08, 0x68, 0x6f, 0x6c, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a, + 0x0a, 0x16, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x15, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x09, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, + 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, + 0x70, 0x4f, 0x72, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6f, 0x72, 0x67, 0x49, 0x6e, 0x66, + 0x6f, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbb, 0x01, 0x0a, 0x0e, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, + 0x64, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x70, 0x6f, 0x72, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x30, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x26, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0xa0, 0x03, 0x0a, 0x0d, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x68, 0x61, 0x73, 0x73, + 0x69, 0x73, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x43, + 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x49, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x09, 0x61, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, - 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x68, 0x65, 0x78, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x61, 0x73, 0x48, 0x65, 0x78, 0x88, 0x01, - 0x01, 0x1a, 0x3d, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x33, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, - 0x65, 0x72, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x73, 0x5f, 0x68, 0x65, 0x78, 0x10, 0x02, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, - 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, - 0x73, 0x5f, 0x68, 0x65, 0x78, 0x22, 0xee, 0x01, 0x0a, 0x19, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x01, 0x12, 0x4a, 0x0a, 0x13, 0x6d, 0x61, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, + 0x4d, 0x61, 0x63, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x11, 0x6d, 0x61, 0x63, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, + 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, + 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x14, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, + 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x02, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, + 0x01, 0x01, 0x1a, 0x69, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x5f, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x6d, 0x61, 0x63, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x01, 0x12, 0x1a, + 0x0a, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x03, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x74, + 0x79, 0x70, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x75, + 0x62, 0x74, 0x79, 0x70, 0x65, 0x22, 0x9e, 0x03, 0x0a, 0x0a, 0x4c, 0x6c, 0x64, 0x70, 0x50, 0x6f, + 0x72, 0x74, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x50, + 0x6f, 0x72, 0x74, 0x49, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, + 0x0a, 0x13, 0x6d, 0x61, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, + 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x11, 0x6d, + 0x61, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x57, 0x0a, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x50, 0x6f, + 0x72, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x53, + 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x14, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0d, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x74, + 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x69, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x5f, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x6d, 0x61, 0x63, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, + 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x12, 0x11, + 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, + 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x16, 0x0a, 0x14, + 0x5f, 0x6d, 0x61, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, 0x62, + 0x74, 0x79, 0x70, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, + 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x22, 0xe6, 0x01, 0x0a, 0x15, 0x4c, 0x6c, 0x64, 0x70, 0x43, + 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x4d, 0x61, 0x63, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x68, 0x61, 0x73, 0x73, + 0x69, 0x73, 0x4d, 0x61, 0x63, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, + 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, + 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0xf4, 0x01, 0x0a, 0x1c, 0x4c, 0x6c, 0x64, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, 0x62, 0x54, + 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, - 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, + 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb2, 0x01, 0x0a, 0x19, 0x46, 0x6c, 0x6f, 0x77, 0x52, - 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x06, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x19, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x88, 0x01, - 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xed, 0x02, 0x0a, 0x08, - 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, - 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x66, 0x69, 0x78, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x05, 0x66, 0x69, 0x78, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x49, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x2b, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, - 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x12, 0x3b, - 0x0a, 0x0c, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, - 0x69, 0x7a, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x73, 0x52, 0x0b, - 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x73, 0x1a, 0x59, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4f, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x66, 0x69, 0x78, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, - 0x6f, 0x6d, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x70, - 0x61, 0x69, 0x72, 0x73, 0x10, 0x04, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x22, 0x79, 0x0a, 0x11, 0x46, - 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x65, - 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e, 0x64, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x22, 0x4e, 0x0a, 0x0e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, - 0x7a, 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, - 0x15, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x03, - 0x6d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, - 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x78, 0x22, 0xa9, 0x03, 0x0a, 0x13, 0x46, 0x6c, 0x6f, 0x77, 0x53, - 0x69, 0x7a, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x41, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x4d, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, - 0x53, 0x69, 0x7a, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x73, 0x2e, - 0x50, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x01, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x88, 0x01, 0x01, - 0x12, 0x36, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x57, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0x3d, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x33, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x70, - 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x6f, 0x0a, 0x0a, 0x50, 0x72, 0x65, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x65, 0x64, 0x22, 0x61, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd8, 0x01, 0x0a, 0x0e, 0x4c, 0x6c, 0x64, 0x70, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x4c, 0x6c, 0x64, 0x70, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x2e, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, - 0x0a, 0x04, 0x69, 0x6d, 0x69, 0x78, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x69, 0x70, 0x73, 0x65, - 0x63, 0x5f, 0x69, 0x6d, 0x69, 0x78, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x70, 0x76, 0x36, - 0x5f, 0x69, 0x6d, 0x69, 0x78, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x6e, 0x64, - 0x61, 0x72, 0x64, 0x5f, 0x69, 0x6d, 0x69, 0x78, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x74, 0x63, - 0x70, 0x5f, 0x69, 0x6d, 0x69, 0x78, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, - 0x65, 0x64, 0x22, 0x65, 0x0a, 0x19, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x57, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x69, 0x72, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, - 0x17, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x04, 0x73, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x48, 0x01, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x88, 0x03, 0x0a, 0x08, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x15, - 0x0a, 0x03, 0x70, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x03, 0x70, - 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x48, 0x02, 0x52, 0x03, 0x62, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, - 0x6b, 0x62, 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x04, 0x6b, 0x62, - 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6d, 0x62, 0x70, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x04, 0x6d, 0x62, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x67, 0x62, 0x70, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, 0x52, 0x04, - 0x67, 0x62, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x48, 0x06, 0x52, 0x0a, 0x70, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x61, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x57, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x07, 0x0a, 0x03, 0x70, 0x70, 0x73, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x62, 0x70, 0x73, 0x10, - 0x02, 0x12, 0x08, 0x0a, 0x04, 0x6b, 0x62, 0x70, 0x73, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x6d, - 0x62, 0x70, 0x73, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x62, 0x70, 0x73, 0x10, 0x05, 0x12, - 0x0e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x10, 0x06, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, - 0x70, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x62, 0x70, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6b, - 0x62, 0x70, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x62, 0x70, 0x73, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x67, 0x62, 0x70, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x61, 0x67, 0x65, 0x22, 0x8c, 0x03, 0x0a, 0x0c, 0x46, 0x6c, 0x6f, 0x77, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x3a, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, - 0x6c, 0x6f, 0x77, 0x46, 0x69, 0x78, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, - 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x3a, 0x0a, - 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x46, - 0x69, 0x78, 0x65, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x52, 0x0c, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x62, 0x75, 0x72, - 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, - 0x6c, 0x6f, 0x77, 0x42, 0x75, 0x72, 0x73, 0x74, 0x52, 0x05, 0x62, 0x75, 0x72, 0x73, 0x74, 0x12, - 0x33, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x6f, - 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, - 0x75, 0x6f, 0x75, 0x73, 0x1a, 0x62, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x58, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, - 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x66, 0x69, - 0x78, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x10, 0x02, 0x12, 0x09, 0x0a, - 0x05, 0x62, 0x75, 0x72, 0x73, 0x74, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, - 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x10, 0x04, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x55, 0x0a, 0x0e, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x69, - 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x67, 0x61, 0x70, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x00, 0x52, 0x03, 0x67, 0x61, 0x70, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x05, - 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x64, 0x65, 0x6c, - 0x61, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x67, 0x61, 0x70, 0x22, 0xb6, 0x02, 0x0a, 0x09, 0x46, - 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, - 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, - 0x48, 0x01, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, - 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x02, 0x48, 0x02, 0x52, 0x0b, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, - 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0c, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x48, 0x03, 0x52, 0x0c, 0x6d, 0x69, 0x63, - 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x4f, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x45, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x09, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x6e, 0x61, - 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x6d, - 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x10, 0x03, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, - 0x64, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x10, 0x46, 0x6c, 0x6f, 0x77, 0x46, 0x69, 0x78, 0x65, - 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x07, 0x70, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x67, 0x61, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x03, 0x67, 0x61, 0x70, 0x88, 0x01, 0x01, 0x12, 0x24, - 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x64, - 0x65, 0x6c, 0x61, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x67, 0x61, 0x70, 0x22, 0x82, 0x01, 0x0a, 0x10, 0x46, 0x6c, 0x6f, - 0x77, 0x46, 0x69, 0x78, 0x65, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x1d, 0x0a, - 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x48, 0x00, - 0x52, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, - 0x67, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x03, 0x67, 0x61, 0x70, - 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x44, 0x65, 0x6c, - 0x61, 0x79, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x65, - 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x67, 0x61, 0x70, 0x22, 0xc5, 0x01, - 0x0a, 0x09, 0x46, 0x6c, 0x6f, 0x77, 0x42, 0x75, 0x72, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x62, - 0x75, 0x72, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x06, 0x62, - 0x75, 0x72, 0x73, 0x74, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x07, 0x70, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x67, 0x61, 0x70, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x03, 0x67, 0x61, 0x70, 0x88, 0x01, 0x01, 0x12, 0x46, - 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x62, 0x75, 0x72, 0x73, 0x74, 0x5f, 0x67, 0x61, - 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, - 0x6f, 0x77, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x42, - 0x75, 0x72, 0x73, 0x74, 0x47, 0x61, 0x70, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x75, - 0x72, 0x73, 0x74, 0x47, 0x61, 0x70, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x62, 0x75, 0x72, 0x73, 0x74, - 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, 0x06, 0x0a, - 0x04, 0x5f, 0x67, 0x61, 0x70, 0x22, 0xd6, 0x02, 0x0a, 0x19, 0x46, 0x6c, 0x6f, 0x77, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x75, 0x72, 0x73, 0x74, - 0x47, 0x61, 0x70, 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x75, 0x72, 0x73, 0x74, - 0x47, 0x61, 0x70, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x01, 0x52, 0x05, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x6e, 0x61, 0x6e, 0x6f, 0x73, - 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52, 0x0b, - 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, 0x01, 0x12, 0x27, - 0x0a, 0x0c, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x01, 0x48, 0x03, 0x52, 0x0c, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, - 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x4f, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0x45, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, - 0x6f, 0x6e, 0x64, 0x73, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, - 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x42, 0x0e, 0x0a, - 0x0c, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x42, 0x0f, 0x0a, - 0x0d, 0x5f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0xc1, - 0x02, 0x0a, 0x0b, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1b, - 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, - 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6c, - 0x6f, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x04, 0x6c, 0x6f, 0x73, - 0x73, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x0b, 0x72, 0x78, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x78, 0x54, 0x78, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x52, 0x09, 0x72, - 0x78, 0x54, 0x78, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x23, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x0a, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, - 0x07, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x07, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, - 0x12, 0x4d, 0x0a, 0x16, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x65, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x61, 0x67, 0x73, 0x52, 0x14, 0x70, 0x72, 0x65, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6c, - 0x6f, 0x73, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x12, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x74, 0x65, 0x6e, - 0x63, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x4c, - 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x4d, 0x6f, - 0x64, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x88, - 0x01, 0x01, 0x1a, 0x43, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x3b, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, - 0x77, 0x61, 0x72, 0x64, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x63, 0x75, 0x74, 0x5f, 0x74, 0x68, - 0x72, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x3e, 0x0a, 0x12, 0x46, - 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x54, 0x61, 0x67, - 0x73, 0x12, 0x1c, 0x0a, 0x07, 0x72, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x72, 0x78, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, - 0x0a, 0x0a, 0x08, 0x5f, 0x72, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xee, 0x01, 0x0a, 0x0d, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x78, 0x54, 0x78, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x3b, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x78, 0x54, 0x78, 0x52, 0x61, 0x74, 0x69, - 0x6f, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x78, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x78, 0x54, 0x78, 0x52, 0x61, 0x74, 0x69, 0x6f, - 0x52, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x72, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x48, - 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x3a, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x30, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, - 0x0a, 0x08, 0x72, 0x78, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x16, 0x0a, 0x14, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x78, 0x54, 0x78, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x52, 0x78, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf6, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1b, - 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, - 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x04, 0x6c, - 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, - 0x45, 0x0a, 0x11, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, - 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x78, 0x52, 0x61, 0x74, 0x65, 0x54, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x52, 0x0f, 0x72, 0x78, 0x52, 0x61, 0x74, 0x65, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x5a, 0x0a, 0x18, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, - 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, - 0x73, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x16, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x6f, 0x0a, - 0x14, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x78, 0x52, 0x61, 0x74, 0x65, 0x54, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x02, 0x48, 0x01, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x33, - 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x1b, 0x0a, 0x06, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x22, 0x45, 0x0a, 0x1b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x83, 0x02, 0x0a, 0x0c, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x1a, 0xa9, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x22, 0xa0, 0x01, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, - 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x75, - 0x70, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x10, 0x04, 0x12, 0x20, 0x0a, 0x1c, - 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x62, 0x6f, - 0x76, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x10, 0x05, 0x12, 0x20, - 0x0a, 0x1c, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x62, - 0x65, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x10, 0x06, - 0x22, 0x77, 0x0a, 0x11, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x12, 0x26, 0x0a, 0x0c, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x75, 0x72, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x63, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0xf7, 0x02, 0x0a, 0x04, 0x4c, 0x6c, - 0x64, 0x70, 0x12, 0x33, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, - 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x73, 0x73, - 0x69, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x49, 0x64, 0x52, - 0x09, 0x63, 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x52, 0x06, 0x70, 0x6f, - 0x72, 0x74, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x4c, 0x6c, 0x64, 0x70, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0a, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x68, 0x6f, - 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x08, 0x68, 0x6f, 0x6c, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x16, - 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x15, - 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, - 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, - 0x19, 0x0a, 0x17, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0xbb, 0x01, 0x0a, 0x0e, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, - 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x70, 0x6f, 0x72, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x30, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0x26, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0xa0, 0x03, 0x0a, 0x0d, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x68, 0x61, 0x73, 0x73, 0x69, - 0x73, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x68, - 0x61, 0x73, 0x73, 0x69, 0x73, 0x49, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x4a, 0x0a, 0x13, 0x6d, 0x61, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x4d, - 0x61, 0x63, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x11, 0x6d, 0x61, 0x63, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x16, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, - 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x14, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, 0x62, - 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, - 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, - 0x01, 0x1a, 0x69, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x5f, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x6d, 0x61, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x01, 0x12, 0x1a, 0x0a, - 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, - 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, - 0x70, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x62, - 0x74, 0x79, 0x70, 0x65, 0x22, 0x9e, 0x03, 0x0a, 0x0a, 0x4c, 0x6c, 0x64, 0x70, 0x50, 0x6f, 0x72, - 0x74, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x50, 0x6f, - 0x72, 0x74, 0x49, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, - 0x13, 0x6d, 0x61, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, 0x62, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x11, 0x6d, 0x61, - 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x57, 0x0a, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x50, 0x6f, 0x72, - 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, - 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x14, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x74, 0x79, - 0x70, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x69, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x5f, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x6d, 0x61, 0x63, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, - 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x12, 0x11, 0x0a, - 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x03, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, - 0x6d, 0x61, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x74, - 0x79, 0x70, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x75, - 0x62, 0x74, 0x79, 0x70, 0x65, 0x22, 0xe6, 0x01, 0x0a, 0x15, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x68, - 0x61, 0x73, 0x73, 0x69, 0x73, 0x4d, 0x61, 0x63, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x68, 0x61, 0x73, 0x73, 0x69, - 0x73, 0x4d, 0x61, 0x63, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x61, - 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xf4, - 0x01, 0x0a, 0x1c, 0x4c, 0x6c, 0x64, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, 0x62, 0x54, 0x79, - 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, - 0x75, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, - 0x6f, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, - 0x36, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd8, 0x01, 0x0a, 0x0e, 0x4c, 0x6c, 0x64, 0x70, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, - 0x6c, 0x64, 0x70, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x2e, 0x43, 0x68, + 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x0b, 0x4c, 0x6c, 0x64, 0x70, 0x4f, 0x72, 0x67, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x15, 0x0a, 0x03, 0x6f, 0x75, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x03, 0x6f, 0x75, 0x69, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, + 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x0b, 0x69, 0x6e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x4f, 0x72, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0b, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x06, 0x0a, 0x04, 0x5f, 0x6f, 0x75, 0x69, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x75, 0x62, 0x74, + 0x79, 0x70, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x0f, 0x4c, 0x6c, 0x64, 0x70, 0x4f, 0x72, 0x67, 0x49, + 0x6e, 0x66, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, + 0x64, 0x70, 0x4f, 0x72, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x36, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, - 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x88, 0x01, 0x01, 0x1a, + 0x2b, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xb8, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, @@ -122737,7 +141815,7 @@ var file_otg_proto_rawDesc = []byte{ 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x84, 0x03, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0xc2, 0x03, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, @@ -122755,322 +141833,288 @@ var file_otg_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x52, 0x03, 0x62, 0x67, 0x70, 0x12, 0x2a, 0x0a, 0x04, 0x69, 0x73, 0x69, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x49, 0x73, 0x69, 0x73, 0x52, 0x04, 0x69, 0x73, 0x69, 0x73, 0x1a, 0x52, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x48, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, - 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x61, 0x63, 0x70, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, - 0x62, 0x67, 0x70, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x73, 0x69, 0x73, 0x10, 0x05, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x0d, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x1d, 0x0a, 0x0a, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x32, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x29, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, 0x01, 0x12, - 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, - 0x74, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x6f, - 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x74, + 0x6c, 0x49, 0x73, 0x69, 0x73, 0x52, 0x04, 0x69, 0x73, 0x69, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x6f, + 0x73, 0x70, 0x66, 0x76, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, + 0x73, 0x70, 0x66, 0x76, 0x32, 0x52, 0x06, 0x6f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x1a, 0x5e, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x54, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x07, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x61, 0x63, 0x70, 0x10, 0x03, 0x12, 0x07, + 0x0a, 0x03, 0x62, 0x67, 0x70, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x73, 0x69, 0x73, 0x10, + 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x6f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x10, 0x06, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x88, 0x01, 0x01, 0x1a, 0x32, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x29, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, + 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x43, + 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x50, 0x6f, 0x72, 0x74, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x88, + 0x01, 0x01, 0x1a, 0x35, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x10, 0x01, 0x12, + 0x08, 0x0a, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x22, 0xd6, 0x01, 0x0a, 0x18, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, + 0x66, 0x66, 0x69, 0x63, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x6c, 0x6f, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, + 0x43, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, + 0x63, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x88, 0x01, 0x01, 0x1a, 0x35, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x2c, 0x0a, + 0x65, 0x88, 0x01, 0x01, 0x1a, 0x4c, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x43, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x10, - 0x01, 0x12, 0x08, 0x0a, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xd6, 0x01, 0x0a, 0x18, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, - 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, - 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x6c, 0x6f, 0x77, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x12, 0x43, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x66, - 0x66, 0x69, 0x63, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x4c, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, - 0x43, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x10, 0x02, 0x12, 0x09, 0x0a, - 0x05, 0x70, 0x61, 0x75, 0x73, 0x65, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6d, 0x65, 0x10, 0x04, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x90, - 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x41, 0x6c, 0x6c, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x6c, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, - 0x1a, 0x35, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x10, 0x01, 0x12, 0x08, 0x0a, - 0x04, 0x73, 0x74, 0x6f, 0x70, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x22, 0xb2, 0x01, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x3d, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x3d, 0x0a, - 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x34, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x0c, 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x10, 0x01, 0x12, 0x0d, 0x0a, - 0x09, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x98, 0x02, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, 0x12, 0x3f, 0x0a, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x4c, 0x61, 0x63, 0x70, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, - 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x4c, 0x61, 0x63, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x12, 0x44, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x1a, 0x3e, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0x34, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, - 0x6f, 0x72, 0x74, 0x73, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0xc3, 0x01, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x28, 0x0a, 0x10, - 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, 0x41, 0x64, 0x6d, - 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x01, 0x12, 0x08, 0x0a, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x70, + 0x61, 0x75, 0x73, 0x65, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, + 0x10, 0x04, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x90, 0x01, 0x0a, + 0x10, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x6c, + 0x6c, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x6c, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x35, + 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x73, + 0x74, 0x6f, 0x70, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, + 0xb2, 0x01, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x3d, 0x0a, 0x05, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x22, 0x34, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, + 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x61, + 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x22, 0x98, 0x02, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, 0x12, 0x3f, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, + 0x63, 0x70, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x05, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, + 0x63, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x44, + 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, + 0x6f, 0x72, 0x74, 0x73, 0x1a, 0x3e, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x34, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0xc3, 0x01, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x4c, 0x61, 0x63, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x61, + 0x67, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x32, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, + 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0e, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x47, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x72, + 0x74, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x32, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x61, 0x67, 0x5f, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x12, 0x47, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x61, 0x63, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, - 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x32, 0x0a, 0x05, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, - 0x02, 0x75, 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x10, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x12, 0x3e, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, - 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x42, 0x67, 0x70, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, - 0x1a, 0x2c, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x22, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x10, 0x01, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x15, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x50, 0x65, - 0x65, 0x72, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x12, 0x40, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x50, 0x65, 0x65, 0x72, 0x73, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x88, 0x01, 0x01, 0x1a, 0x32, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x29, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, 0x01, 0x12, 0x08, - 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x73, 0x69, 0x73, 0x12, 0x3f, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x73, 0x69, 0x73, - 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x07, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x73, - 0x69, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x72, 0x73, 0x1a, 0x2e, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x24, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, - 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xc0, 0x01, - 0x0a, 0x18, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, - 0x73, 0x69, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x43, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, + 0x06, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x12, 0x3e, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x49, 0x73, 0x69, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x42, 0x67, 0x70, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x05, + 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, + 0x67, 0x70, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x1a, 0x2c, + 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x22, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, + 0x00, 0x12, 0x09, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x50, 0x65, 0x65, 0x72, + 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x40, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x50, 0x65, 0x65, 0x72, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x32, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x22, 0xb9, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x2f, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x1a, 0x2f, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x25, 0x0a, 0x04, 0x45, 0x6e, + 0x22, 0xc8, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x49, 0x73, 0x69, 0x73, 0x12, 0x3f, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x73, 0x69, 0x73, 0x2e, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x73, 0x69, 0x73, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, + 0x1a, 0x2e, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x24, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x10, - 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x64, 0x0a, 0x15, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x73, 0x12, 0x2f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x1a, 0x2f, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x25, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x0c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x10, 0x01, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x9d, 0x02, 0x0a, 0x0e, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x3c, 0x0a, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x10, 0x01, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xc0, 0x01, 0x0a, 0x18, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x73, 0x69, + 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x73, + 0x69, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, + 0x1a, 0x32, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, + 0x77, 0x6e, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xce, + 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x12, 0x41, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x04, 0x69, 0x70, 0x76, - 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, - 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, 0x2b, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x52, 0x04, 0x69, - 0x70, 0x76, 0x36, 0x12, 0x28, 0x0a, 0x03, 0x62, 0x67, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x52, 0x03, 0x62, 0x67, 0x70, 0x1a, 0x3e, 0x0a, - 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x34, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, - 0x76, 0x36, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x62, 0x67, 0x70, 0x10, 0x03, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x8a, 0x02, 0x0a, 0x16, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x07, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x73, + 0x70, 0x66, 0x76, 0x32, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x07, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x73, 0x1a, 0x2e, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x24, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x72, 0x73, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0xc4, 0x01, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x12, 0x21, + 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x12, 0x45, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x32, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, + 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x1a, 0x2f, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x25, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x22, 0x64, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x77, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x77, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc3, 0x01, 0x0a, 0x0e, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x04, 0x69, 0x70, 0x76, - 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, 0x33, - 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x52, 0x04, 0x69, - 0x70, 0x76, 0x36, 0x1a, 0x35, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2b, 0x0a, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x1a, 0x2f, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x25, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x9d, + 0x02, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x2b, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, 0x2b, 0x0a, 0x04, + 0x69, 0x70, 0x76, 0x36, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, + 0x70, 0x76, 0x36, 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, 0x12, 0x28, 0x0a, 0x03, 0x62, 0x67, 0x70, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x52, 0x03, + 0x62, 0x67, 0x70, 0x1a, 0x3e, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x34, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, - 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x12, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x12, 0x40, 0x0a, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x49, 0x70, 0x76, 0x34, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2f, - 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x1a, - 0x2b, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x1a, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x37, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, - 0x69, 0x6e, 0x67, 0x52, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x1a, 0x2b, 0x0a, 0x06, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x62, 0x67, + 0x70, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x8a, + 0x02, 0x0a, 0x16, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x33, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x04, + 0x69, 0x70, 0x76, 0x34, 0x12, 0x33, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, + 0x70, 0x76, 0x36, 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, 0x1a, 0x35, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x2b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, - 0x70, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0x58, 0x0a, 0x16, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x3e, 0x0a, 0x08, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0x73, 0x0a, 0x1d, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, - 0x34, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x08, - 0x73, 0x72, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x07, 0x73, 0x72, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, - 0x64, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, - 0x64, 0x73, 0x74, 0x49, 0x70, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x72, 0x63, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x69, 0x70, - 0x22, 0x6b, 0x0a, 0x1e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, - 0x6e, 0x67, 0x12, 0x49, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x9b, 0x02, - 0x0a, 0x26, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x73, 0x72, 0x63, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x73, 0x72, - 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x64, 0x73, 0x74, 0x5f, - 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x64, 0x73, 0x74, 0x49, - 0x70, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x06, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, - 0x09, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x72, 0x63, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x69, 0x70, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xbf, 0x01, 0x0a, 0x12, + 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, 0x02, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x12, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, - 0x76, 0x36, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x76, 0x34, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x2e, 0x43, 0x68, 0x6f, 0x69, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x50, 0x69, 0x6e, 0x67, 0x52, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x1a, 0x2b, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x1a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x12, 0x48, 0x0a, 0x06, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x2e, 0x43, 0x68, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x49, 0x70, 0x76, 0x36, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x1a, + 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x1a, 0x2b, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x58, 0x0a, 0x16, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x50, 0x69, 0x6e, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x3e, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x50, 0x69, 0x6e, 0x67, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0x73, 0x0a, 0x1d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x73, 0x72, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x73, 0x72, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x64, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, @@ -123078,21 +142122,21 @@ var file_otg_proto_rawDesc = []byte{ 0x0a, 0x09, 0x5f, 0x73, 0x72, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x22, 0x6b, 0x0a, 0x1e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x49, 0x70, 0x76, 0x36, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x49, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, + 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x49, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x50, 0x69, 0x6e, 0x67, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x9b, 0x02, 0x0a, 0x26, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, - 0x76, 0x36, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, + 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x73, 0x72, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x73, 0x72, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x64, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x64, 0x73, 0x74, 0x49, 0x70, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x50, 0x69, 0x6e, 0x67, 0x52, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, @@ -123101,91 +142145,214 @@ var file_otg_proto_rawDesc = []byte{ 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x72, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x22, 0xe6, 0x02, 0x0a, 0x11, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x12, 0x3f, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x74, 0x22, 0xbf, 0x01, 0x0a, 0x12, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, + 0x36, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x04, 0x70, 0x69, + 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, + 0x36, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x1a, 0x2b, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, + 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x1a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, + 0x76, 0x36, 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, + 0x70, 0x76, 0x36, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x04, + 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x50, 0x69, 0x6e, 0x67, 0x52, + 0x04, 0x70, 0x69, 0x6e, 0x67, 0x1a, 0x2b, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x21, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, + 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x58, 0x0a, + 0x16, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, + 0x70, 0x76, 0x36, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x3e, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, + 0x76, 0x36, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0x73, 0x0a, 0x1d, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x50, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x73, 0x72, 0x63, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x73, 0x72, + 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x64, 0x73, 0x74, 0x5f, + 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x64, 0x73, 0x74, 0x49, + 0x70, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x72, 0x63, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x22, 0x6b, 0x0a, 0x1e, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x49, + 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, + 0x76, 0x36, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x9b, 0x02, 0x0a, 0x26, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, 0x36, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x73, 0x72, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x73, 0x72, 0x63, 0x4e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x64, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x64, 0x73, 0x74, 0x49, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x54, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x70, 0x76, + 0x36, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x73, 0x75, 0x63, + 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, + 0x65, 0x64, 0x10, 0x02, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x72, 0x63, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xe6, 0x02, 0x0a, 0x11, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x12, 0x3f, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, + 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x4e, 0x6f, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x69, 0x0a, 0x19, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x74, 0x65, 0x5f, 0x67, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, + 0x70, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x47, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, + 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x17, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x74, 0x65, 0x47, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x1a, 0x52, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x48, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x74, 0x65, 0x5f, 0x67, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0xd8, 0x06, 0x0a, 0x1d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x69, 0x0a, 0x19, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x61, - 0x63, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x49, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x52, 0x17, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x47, 0x72, 0x61, 0x63, - 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x1a, 0x52, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x48, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, - 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, - 0x12, 0x1d, 0x0a, 0x19, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x61, - 0x63, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x10, 0x02, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xd8, 0x06, 0x0a, 0x1d, 0x41, + 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, - 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x2e, 0x0a, 0x05, 0x63, 0x65, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x43, 0x65, - 0x61, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x63, 0x65, 0x61, 0x73, 0x65, 0x12, - 0x52, 0x0a, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x12, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x12, 0x4c, 0x0a, 0x12, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x4f, - 0x70, 0x65, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x12, 0x52, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4c, 0x0a, 0x12, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, - 0x70, 0x48, 0x6f, 0x6c, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x64, 0x52, 0x10, 0x68, 0x6f, 0x6c, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x45, 0x78, 0x70, 0x69, - 0x72, 0x65, 0x64, 0x12, 0x62, 0x0a, 0x1a, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x46, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x17, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0xbd, 0x01, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xb2, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x09, 0x0a, 0x05, 0x63, 0x65, 0x61, 0x73, 0x65, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x10, 0x05, 0x12, 0x1e, - 0x0a, 0x1a, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x06, 0x12, 0x0a, - 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x07, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x28, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x49, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x65, 0x6c, - 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, - 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x22, 0xef, 0x04, + 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x05, 0x63, 0x65, 0x61, 0x73, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x42, 0x67, 0x70, 0x43, 0x65, 0x61, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, + 0x63, 0x65, 0x61, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x42, 0x67, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x12, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4c, 0x0a, 0x12, 0x6f, 0x70, 0x65, + 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x42, 0x67, 0x70, 0x4f, 0x70, 0x65, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x52, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x42, 0x67, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4c, 0x0a, 0x12, 0x68, + 0x6f, 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x48, 0x6f, 0x6c, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x72, + 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x52, 0x10, 0x68, 0x6f, 0x6c, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x72, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x12, 0x62, 0x0a, 0x1a, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x46, 0x69, 0x6e, + 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x17, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x31, 0x0a, + 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x1a, 0xbd, 0x01, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xb2, 0x01, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x63, 0x65, 0x61, 0x73, 0x65, 0x10, 0x01, + 0x12, 0x18, 0x0a, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x6f, 0x70, + 0x65, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, + 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x64, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x07, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xdc, 0x01, 0x0a, 0x28, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, + 0x70, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x47, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, + 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x65, 0x65, 0x72, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, + 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x88, 0x01, + 0x01, 0x12, 0x55, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, 0x47, + 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4e, 0x6f, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x22, 0xe0, 0x06, 0x0a, 0x2c, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x67, 0x70, + 0x47, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4e, + 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x42, 0x67, 0x70, 0x47, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x05, 0x63, 0x65, 0x61, 0x73, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x43, 0x65, 0x61, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x52, 0x05, 0x63, 0x65, 0x61, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x42, 0x67, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x12, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4c, 0x0a, 0x12, 0x6f, + 0x70, 0x65, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x4f, 0x70, 0x65, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x52, 0x0a, 0x14, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4c, 0x0a, + 0x12, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x48, 0x6f, 0x6c, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x72, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x52, 0x10, 0x68, 0x6f, 0x6c, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x72, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x12, 0x62, 0x0a, 0x1a, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x46, + 0x69, 0x6e, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x17, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x31, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x67, 0x70, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x1a, 0xbd, 0x01, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xb2, 0x01, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x63, 0x65, 0x61, 0x73, 0x65, + 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, + 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x04, 0x12, 0x16, + 0x0a, 0x12, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x64, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x10, 0x07, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x94, 0x08, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, @@ -123216,1366 +142383,1940 @@ var file_otg_proto_rawDesc = []byte{ 0x65, 0x73, 0x74, 0x52, 0x04, 0x6c, 0x6c, 0x64, 0x70, 0x12, 0x2b, 0x0a, 0x04, 0x72, 0x73, 0x76, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x04, 0x72, 0x73, 0x76, 0x70, 0x1a, 0x7c, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0x72, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x70, 0x6f, 0x72, - 0x74, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x10, 0x02, 0x12, 0x09, 0x0a, - 0x05, 0x62, 0x67, 0x70, 0x76, 0x34, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x62, 0x67, 0x70, 0x76, - 0x36, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x73, 0x69, 0x73, 0x10, 0x05, 0x12, 0x07, 0x0a, - 0x03, 0x6c, 0x61, 0x67, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x61, 0x63, 0x70, 0x10, 0x07, - 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x6c, 0x64, 0x70, 0x10, 0x08, 0x12, 0x08, 0x0a, 0x04, 0x72, 0x73, - 0x76, 0x70, 0x10, 0x09, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0xfa, 0x05, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x32, 0x0a, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0b, 0x70, 0x6f, 0x72, 0x74, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x32, 0x0a, 0x0c, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0b, 0x66, - 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x35, 0x0a, 0x0d, 0x62, 0x67, - 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x76, 0x34, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x52, 0x0c, 0x62, 0x67, 0x70, 0x76, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x12, 0x35, 0x0a, 0x0d, 0x62, 0x67, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, - 0x67, 0x70, 0x76, 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0c, 0x62, 0x67, 0x70, 0x76, - 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x32, 0x0a, 0x0c, 0x69, 0x73, 0x69, 0x73, - 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, - 0x0b, 0x69, 0x73, 0x69, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2f, 0x0a, 0x0b, - 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x52, 0x0a, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x32, 0x0a, - 0x0c, 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x63, 0x70, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x52, 0x0b, 0x6c, 0x61, 0x63, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x12, 0x32, 0x0a, 0x0c, 0x6c, 0x6c, 0x64, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, - 0x64, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0b, 0x6c, 0x6c, 0x64, 0x70, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x32, 0x0a, 0x0c, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0b, 0x72, 0x73, - 0x76, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0xc5, 0x01, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0xba, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, - 0x0a, 0x0c, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0x01, - 0x12, 0x10, 0x0a, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x62, 0x67, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x62, 0x67, 0x70, 0x76, 0x36, 0x5f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x73, 0x69, 0x73, - 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x6c, 0x61, - 0x67, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x6c, - 0x61, 0x63, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0x07, 0x12, 0x10, 0x0a, - 0x0c, 0x6c, 0x6c, 0x64, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0x08, 0x12, - 0x10, 0x0a, 0x0c, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, - 0x09, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xe5, 0x02, 0x0a, - 0x12, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, - 0xe2, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, - 0xd2, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x10, 0x03, 0x12, - 0x0b, 0x0a, 0x07, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x66, - 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x5f, 0x72, 0x78, 0x10, 0x08, 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, - 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x72, - 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, 0x0a, 0x12, 0x11, - 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, - 0x0b, 0x12, 0x11, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, - 0x74, 0x65, 0x10, 0x0c, 0x22, 0x8b, 0x07, 0x0a, 0x0a, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, - 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x4c, 0x69, 0x6e, - 0x6b, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x88, 0x01, - 0x01, 0x12, 0x3b, 0x0a, 0x07, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x03, 0x52, 0x07, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, - 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x04, 0x48, 0x04, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, - 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x78, 0x88, - 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x07, 0x62, 0x79, 0x74, 0x65, 0x73, 0x54, 0x78, 0x88, - 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x07, 0x62, 0x79, 0x74, 0x65, 0x73, 0x52, 0x78, 0x88, - 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, - 0x72, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x48, 0x08, 0x52, 0x0c, 0x66, 0x72, - 0x61, 0x6d, 0x65, 0x73, 0x54, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, - 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x02, 0x48, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, - 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x48, - 0x0a, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x54, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, - 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x02, 0x48, 0x0b, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x52, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x08, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x0c, 0x52, 0x08, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x1a, 0x31, 0x0a, 0x04, 0x4c, 0x69, - 0x6e, 0x6b, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, - 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x1a, 0x3c, 0x0a, - 0x07, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x22, 0x31, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0b, - 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x10, 0x02, 0x1a, 0x3d, 0x0a, 0x08, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x22, 0x31, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x52, 0x04, 0x72, 0x73, 0x76, 0x70, 0x12, 0x44, 0x0a, 0x0d, 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, + 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, + 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0d, + 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0d, 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, 0x5f, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, 0x64, 0x68, 0x63, 0x70, + 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0d, 0x64, 0x68, 0x63, 0x70, + 0x76, 0x36, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x52, 0x0c, 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x31, + 0x0a, 0x06, 0x6f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x06, 0x6f, 0x73, 0x70, 0x66, 0x76, + 0x32, 0x1a, 0xd5, 0x01, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xca, 0x01, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x10, 0x01, + 0x12, 0x08, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x62, 0x67, + 0x70, 0x76, 0x34, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x62, 0x67, 0x70, 0x76, 0x36, 0x10, 0x04, + 0x12, 0x08, 0x0a, 0x04, 0x69, 0x73, 0x69, 0x73, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x6c, 0x61, + 0x67, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x61, 0x63, 0x70, 0x10, 0x07, 0x12, 0x08, 0x0a, + 0x04, 0x6c, 0x6c, 0x64, 0x70, 0x10, 0x08, 0x12, 0x08, 0x0a, 0x04, 0x72, 0x73, 0x76, 0x70, 0x10, + 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x5f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x10, 0x0a, 0x12, 0x11, 0x0a, 0x0d, 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x10, 0x0b, 0x12, 0x11, 0x0a, 0x0d, 0x64, 0x68, 0x63, 0x70, 0x76, + 0x36, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x10, 0x0c, 0x12, 0x11, 0x0a, 0x0d, 0x64, 0x68, + 0x63, 0x70, 0x76, 0x36, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x10, 0x0d, 0x12, 0x0a, 0x0a, + 0x06, 0x6f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x10, 0x0e, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0xc4, 0x09, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x5f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0b, + 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x32, 0x0a, 0x0c, 0x66, + 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x52, 0x0b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, + 0x35, 0x0a, 0x0d, 0x62, 0x67, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x76, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0c, 0x62, 0x67, 0x70, 0x76, 0x34, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x35, 0x0a, 0x0d, 0x62, 0x67, 0x70, 0x76, 0x36, 0x5f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x76, 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, + 0x0c, 0x62, 0x67, 0x70, 0x76, 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x32, 0x0a, + 0x0c, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x52, 0x0b, 0x69, 0x73, 0x69, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x12, 0x2f, 0x0a, 0x0b, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0a, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x12, 0x32, 0x0a, 0x0c, 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, + 0x61, 0x63, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0b, 0x6c, 0x61, 0x63, 0x70, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x32, 0x0a, 0x0c, 0x6c, 0x6c, 0x64, 0x70, 0x5f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0b, 0x6c, + 0x6c, 0x64, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x32, 0x0a, 0x0c, 0x72, 0x73, + 0x76, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x52, 0x0b, 0x72, 0x73, 0x76, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x4a, + 0x0a, 0x14, 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x13, 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x4a, 0x0a, 0x14, 0x64, 0x68, + 0x63, 0x70, 0x76, 0x34, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, + 0x68, 0x63, 0x70, 0x76, 0x34, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x52, 0x13, 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x4a, 0x0a, 0x14, 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x0d, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, + 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x13, 0x64, + 0x68, 0x63, 0x70, 0x76, 0x36, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x12, 0x4a, 0x0a, 0x14, 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x13, 0x64, 0x68, 0x63, 0x70, 0x76, + 0x36, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x38, + 0x0a, 0x0e, 0x6f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, + 0x66, 0x76, 0x32, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0d, 0x6f, 0x73, 0x70, 0x66, 0x76, + 0x32, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0xa5, 0x02, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x9a, 0x02, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0x01, 0x12, + 0x10, 0x0a, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, + 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x62, 0x67, 0x70, 0x76, 0x34, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x62, 0x67, 0x70, 0x76, 0x36, 0x5f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x73, 0x69, 0x73, 0x5f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x6c, 0x61, 0x67, + 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x6c, 0x61, + 0x63, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, + 0x6c, 0x6c, 0x64, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0x08, 0x12, 0x10, + 0x0a, 0x0c, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0x09, + 0x12, 0x11, 0x0a, 0x0d, 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x10, 0x0a, 0x12, 0x11, 0x0a, 0x0d, 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x10, 0x0b, 0x12, 0x11, 0x0a, 0x0d, 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, + 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x10, 0x0c, 0x12, 0x11, 0x0a, 0x0d, 0x64, 0x68, 0x63, + 0x70, 0x76, 0x36, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x10, 0x0d, 0x12, 0x12, 0x0a, 0x0e, + 0x6f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x10, 0x0e, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xe5, 0x02, 0x0a, 0x12, + 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x6f, + 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0xe2, + 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xd2, + 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x6d, 0x69, 0x74, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x10, 0x03, 0x12, 0x0b, + 0x0a, 0x07, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x66, + 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x72, + 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x5f, 0x72, 0x78, 0x10, 0x08, 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, + 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x72, 0x61, + 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, 0x0a, 0x12, 0x11, 0x0a, + 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, 0x0b, + 0x12, 0x11, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, + 0x65, 0x10, 0x0c, 0x22, 0x8b, 0x07, 0x0a, 0x0a, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x04, + 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x88, 0x01, 0x01, + 0x12, 0x3b, 0x0a, 0x07, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x03, 0x52, 0x07, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, + 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x04, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, + 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x04, 0x48, 0x05, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x78, 0x88, 0x01, + 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x07, 0x62, 0x79, 0x74, 0x65, 0x73, 0x54, 0x78, 0x88, 0x01, + 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x07, 0x62, 0x79, 0x74, 0x65, 0x73, 0x52, 0x78, 0x88, 0x01, + 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x48, 0x08, 0x52, 0x0c, 0x66, 0x72, 0x61, + 0x6d, 0x65, 0x73, 0x54, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, + 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x02, 0x48, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x78, + 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x48, 0x0a, + 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x54, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x27, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, + 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x02, 0x48, 0x0b, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x52, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x08, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x0c, 0x52, 0x08, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x1a, 0x31, 0x0a, 0x04, 0x4c, 0x69, 0x6e, + 0x6b, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, + 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x1a, 0x3c, 0x0a, 0x07, + 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x22, 0x31, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, - 0x07, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x61, - 0x70, 0x74, 0x75, 0x72, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, - 0x5f, 0x74, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, - 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0b, - 0x0a, 0x09, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x11, 0x0a, 0x0f, 0x5f, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x11, - 0x0a, 0x0f, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, - 0x61, 0x74, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, - 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, - 0x69, 0x74, 0x22, 0xdf, 0x02, 0x0a, 0x12, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x6c, 0x6f, - 0x77, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, - 0x6c, 0x6f, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x28, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0e, 0x74, 0x61, 0x67, 0x67, 0x65, 0x64, 0x5f, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x07, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x10, 0x02, 0x1a, 0x3d, 0x0a, 0x08, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x22, 0x31, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, + 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x61, 0x70, + 0x74, 0x75, 0x72, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, + 0x74, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, + 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0b, 0x0a, + 0x09, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x66, + 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x11, 0x0a, + 0x0f, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, + 0x74, 0x22, 0xdf, 0x02, 0x0a, 0x12, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x6c, 0x6f, 0x77, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x6c, + 0x6f, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x28, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0e, 0x74, 0x61, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x61, 0x67, 0x67, 0x65, 0x64, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0d, 0x74, 0x61, 0x67, 0x67, + 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0x97, 0x01, 0x0a, 0x0b, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x10, + 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x02, + 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x03, 0x12, + 0x0c, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x04, 0x12, 0x0c, 0x0a, + 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x66, + 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, 0x06, 0x12, + 0x12, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, + 0x65, 0x10, 0x07, 0x22, 0xa8, 0x03, 0x0a, 0x17, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x61, 0x67, 0x67, + 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x1d, 0x0a, 0x07, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x07, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, + 0x0a, 0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, + 0x13, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x88, 0x01, 0x01, 0x12, 0x50, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x61, 0x67, 0x67, 0x65, 0x64, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0d, 0x74, 0x61, 0x67, - 0x67, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0x97, 0x01, 0x0a, 0x0b, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, - 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x10, - 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x03, - 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x04, 0x12, 0x0c, - 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, 0x06, - 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, - 0x74, 0x65, 0x10, 0x07, 0x22, 0xa8, 0x03, 0x0a, 0x17, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x61, 0x67, - 0x67, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x1d, 0x0a, 0x07, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x00, 0x52, 0x07, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x37, 0x0a, 0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, - 0x52, 0x13, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x88, 0x01, 0x01, 0x12, 0x50, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2d, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x61, 0x67, 0x67, 0x65, 0x64, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x88, - 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x79, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, - 0x73, 0x5f, 0x74, 0x78, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, - 0x5f, 0x72, 0x78, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, - 0x78, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x10, - 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, - 0x61, 0x74, 0x65, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, - 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, 0x06, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x69, 0x6e, - 0x63, 0x6c, 0x75, 0x64, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, - 0x4f, 0x0a, 0x13, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0x94, 0x06, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x6f, 0x72, 0x74, - 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x70, 0x6f, 0x72, - 0x74, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x72, - 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x52, - 0x78, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, - 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x03, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, - 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, - 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, - 0x5f, 0x72, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x08, 0x66, 0x72, 0x61, - 0x6d, 0x65, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x5f, 0x74, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x07, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x5f, 0x72, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x07, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, - 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, - 0x48, 0x08, 0x52, 0x0c, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x54, 0x78, 0x52, 0x61, 0x74, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, - 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x48, 0x09, 0x52, 0x0c, 0x66, - 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x6c, 0x6f, 0x73, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x02, 0x48, 0x0a, 0x52, 0x04, - 0x6c, 0x6f, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x2c, 0x0a, - 0x07, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x74, 0x65, 0x6e, - 0x63, 0x79, 0x52, 0x07, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x3c, 0x0a, 0x0e, 0x74, - 0x61, 0x67, 0x67, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x0f, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x61, - 0x67, 0x67, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0d, 0x74, 0x61, 0x67, 0x67, - 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0x49, 0x0a, 0x08, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x22, 0x3d, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, - 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x73, - 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x70, 0x61, 0x75, 0x73, - 0x65, 0x64, 0x10, 0x03, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0a, 0x0a, - 0x08, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x74, 0x78, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x72, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, - 0x69, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0b, - 0x0a, 0x09, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x66, 0x72, 0x61, - 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x22, 0xf6, 0x03, 0x0a, 0x10, 0x46, 0x6c, 0x6f, 0x77, - 0x54, 0x61, 0x67, 0x67, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x26, 0x0a, 0x04, - 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x04, - 0x74, 0x61, 0x67, 0x73, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, - 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, - 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, - 0x5f, 0x72, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x08, 0x66, 0x72, 0x61, - 0x6d, 0x65, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x07, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x5f, 0x72, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x07, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, - 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, - 0x48, 0x04, 0x52, 0x0c, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x54, 0x78, 0x52, 0x61, 0x74, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, - 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x48, 0x05, 0x52, 0x0c, 0x66, - 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x6c, 0x6f, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x48, 0x06, 0x52, 0x04, - 0x6c, 0x6f, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x2c, 0x0a, - 0x07, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x74, 0x65, 0x6e, - 0x63, 0x79, 0x52, 0x07, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, - 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, - 0x78, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, - 0x72, 0x61, 0x74, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, - 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6c, 0x6f, 0x73, 0x73, - 0x22, 0x60, 0x0a, 0x0d, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, - 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0xd4, 0x01, 0x0a, 0x12, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x68, - 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x03, 0x68, 0x65, 0x78, 0x88, - 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x02, 0x52, 0x03, 0x73, 0x74, 0x72, 0x88, 0x01, 0x01, 0x1a, 0x33, 0x0a, 0x06, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, - 0x68, 0x65, 0x78, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x10, 0x02, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x68, 0x65, - 0x78, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x73, 0x74, 0x72, 0x22, 0xa2, 0x01, 0x0a, 0x0f, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x31, 0x0a, - 0x12, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x5f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x10, 0x66, 0x69, 0x72, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x88, 0x01, + 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x79, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, + 0x5f, 0x74, 0x78, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, + 0x72, 0x78, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, + 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x04, + 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, + 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, 0x06, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x4f, + 0x0a, 0x13, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x94, 0x06, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x6f, 0x72, 0x74, 0x5f, + 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x70, 0x6f, 0x72, 0x74, + 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x72, 0x78, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x78, + 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x03, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, + 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, + 0x72, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x5f, 0x74, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x07, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x5f, 0x72, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x07, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, + 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x48, + 0x08, 0x52, 0x0c, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x54, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x48, 0x09, 0x52, 0x0c, 0x66, 0x72, + 0x61, 0x6d, 0x65, 0x73, 0x52, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x6c, 0x6f, 0x73, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x02, 0x48, 0x0a, 0x52, 0x04, 0x6c, + 0x6f, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x2c, 0x0a, 0x07, + 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, + 0x79, 0x52, 0x07, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x3c, 0x0a, 0x0e, 0x74, 0x61, + 0x67, 0x67, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x0f, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x61, 0x67, + 0x67, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0d, 0x74, 0x61, 0x67, 0x67, 0x65, + 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0x49, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x6d, 0x69, 0x74, 0x22, 0x3d, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, + 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x74, + 0x6f, 0x70, 0x70, 0x65, 0x64, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x70, 0x61, 0x75, 0x73, 0x65, + 0x64, 0x10, 0x03, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0a, 0x0a, 0x08, + 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x74, 0x78, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x72, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, + 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x42, + 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0b, 0x0a, + 0x09, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x66, + 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x22, 0xf6, 0x03, 0x0a, 0x10, 0x46, 0x6c, 0x6f, 0x77, 0x54, + 0x61, 0x67, 0x67, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x26, 0x0a, 0x04, 0x74, + 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, + 0x61, 0x67, 0x73, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, + 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, + 0x72, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x07, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x5f, 0x72, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x07, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, + 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x48, + 0x04, 0x52, 0x0c, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x54, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x48, 0x05, 0x52, 0x0c, 0x66, 0x72, + 0x61, 0x6d, 0x65, 0x73, 0x52, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x6c, 0x6f, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x48, 0x06, 0x52, 0x04, 0x6c, + 0x6f, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x2c, 0x0a, 0x07, + 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, + 0x79, 0x52, 0x07, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, + 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, + 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x5f, 0x74, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, + 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, + 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x22, + 0x60, 0x0a, 0x0d, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0xd4, 0x01, 0x0a, 0x12, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x68, 0x65, + 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x03, 0x68, 0x65, 0x78, 0x88, 0x01, + 0x01, 0x12, 0x15, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, + 0x52, 0x03, 0x73, 0x74, 0x72, 0x88, 0x01, 0x01, 0x1a, 0x33, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x68, + 0x65, 0x78, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x10, 0x02, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x68, 0x65, 0x78, + 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x73, 0x74, 0x72, 0x22, 0xa2, 0x01, 0x0a, 0x0f, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x31, 0x0a, 0x12, + 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x10, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4e, 0x73, 0x88, 0x01, 0x01, 0x12, + 0x2f, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x5f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4e, 0x73, 0x88, 0x01, 0x01, - 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x5f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x01, 0x52, 0x0f, 0x6c, - 0x61, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4e, 0x73, 0x88, 0x01, - 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6e, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x61, 0x73, - 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6e, 0x73, 0x22, 0xa8, - 0x01, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, - 0x12, 0x22, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x4e, - 0x73, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, - 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x01, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x69, - 0x6d, 0x75, 0x6d, 0x4e, 0x73, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x76, 0x65, 0x72, - 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52, 0x09, - 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x4e, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, - 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6e, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, - 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6e, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, - 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x73, 0x22, 0x91, 0x04, 0x0a, 0x13, 0x42, 0x67, - 0x70, 0x76, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x12, 0x4c, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, + 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6e, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6e, 0x73, 0x22, 0xa8, 0x01, + 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x12, + 0x22, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x4e, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x01, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x69, 0x6d, + 0x75, 0x6d, 0x4e, 0x73, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x76, 0x65, 0x72, 0x61, + 0x67, 0x65, 0x5f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52, 0x09, 0x61, + 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x4e, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, + 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6e, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6d, + 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6e, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x76, + 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x73, 0x22, 0x91, 0x04, 0x0a, 0x13, 0x42, 0x67, 0x70, 0x76, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x8c, - 0x03, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xfc, - 0x02, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x61, 0x64, - 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x04, 0x12, - 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x12, 0x1c, 0x0a, 0x18, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x08, 0x12, - 0x0e, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x09, 0x12, - 0x12, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, - 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0b, 0x12, 0x17, 0x0a, 0x13, 0x6b, 0x65, 0x65, 0x70, - 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, - 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0d, 0x12, 0x1a, 0x0a, 0x16, 0x6e, 0x6f, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x64, 0x10, 0x0e, 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x73, 0x6d, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x10, 0x0f, 0x12, 0x17, 0x0a, 0x13, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x72, - 0x69, 0x62, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x10, 0x22, 0x80, 0x0b, - 0x0a, 0x0b, 0x42, 0x67, 0x70, 0x76, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x76, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x01, 0x52, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x48, 0x02, 0x52, 0x10, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x6c, 0x61, 0x70, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x73, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x04, 0x48, 0x03, 0x52, 0x10, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x41, 0x64, 0x76, 0x65, - 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x04, 0x48, 0x04, 0x52, 0x0e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3d, - 0x0a, 0x18, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, - 0x48, 0x06, 0x52, 0x16, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, - 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x53, 0x65, - 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, - 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, - 0x08, 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x73, - 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x09, 0x52, 0x09, 0x6f, 0x70, 0x65, - 0x6e, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x6f, 0x70, 0x65, - 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x04, 0x48, 0x0a, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, - 0x76, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0b, - 0x52, 0x0e, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x13, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, - 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, - 0x48, 0x0c, 0x52, 0x12, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x52, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x12, 0x6e, 0x6f, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0d, 0x52, 0x11, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, - 0x16, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0e, 0x52, - 0x15, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x09, 0x66, 0x73, 0x6d, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x76, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x46, - 0x73, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x0f, 0x52, 0x08, - 0x66, 0x73, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x13, 0x65, - 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x69, 0x62, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x48, 0x10, 0x52, 0x10, 0x65, 0x6e, 0x64, 0x4f, - 0x66, 0x52, 0x69, 0x62, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x1a, - 0x39, 0x0a, 0x0c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, - 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, 0x01, - 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x1a, 0x76, 0x0a, 0x08, 0x46, 0x73, - 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x6a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x08, 0x0a, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x04, - 0x12, 0x0f, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x10, - 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x65, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, - 0x10, 0x06, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x15, 0x0a, - 0x13, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, - 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x17, - 0x0a, 0x15, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, - 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6f, 0x70, - 0x65, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x12, 0x0a, 0x10, - 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, - 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, - 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6e, 0x6f, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, - 0x19, 0x0a, 0x17, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, - 0x73, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x65, 0x6e, 0x64, - 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x69, 0x62, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, - 0x22, 0x91, 0x04, 0x0a, 0x13, 0x42, 0x67, 0x70, 0x76, 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x65, 0x65, 0x72, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x29, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x76, 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x8c, 0x03, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xfc, 0x02, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x11, 0x0a, 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, - 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x73, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x10, - 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x64, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, - 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x05, - 0x12, 0x1c, 0x0a, 0x18, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x06, 0x12, 0x10, - 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x07, - 0x12, 0x14, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x64, 0x10, 0x08, 0x12, 0x0e, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, - 0x73, 0x65, 0x6e, 0x74, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, - 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x6b, 0x65, - 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0b, 0x12, - 0x17, 0x0a, 0x13, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x72, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x6e, 0x6f, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0d, - 0x12, 0x1a, 0x0a, 0x16, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0e, 0x12, 0x0d, 0x0a, 0x09, - 0x66, 0x73, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x10, 0x0f, 0x12, 0x17, 0x0a, 0x13, 0x65, - 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x69, 0x62, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x64, 0x10, 0x10, 0x22, 0x80, 0x0b, 0x0a, 0x0b, 0x42, 0x67, 0x70, 0x76, 0x36, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, - 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x76, 0x36, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x0c, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x10, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x46, 0x6c, 0x61, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x30, - 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, - 0x73, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x10, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x88, 0x01, 0x01, - 0x12, 0x2c, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x35, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, + 0x4c, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x76, + 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x8c, 0x03, + 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xfc, 0x02, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x61, 0x64, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x12, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x53, 0x65, - 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x18, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x16, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, - 0x73, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x0b, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, + 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x12, 0x1c, 0x0a, 0x18, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x08, 0x12, 0x0e, + 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x09, 0x12, 0x12, + 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, + 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0b, 0x12, 0x17, 0x0a, 0x13, 0x6b, 0x65, 0x65, 0x70, 0x61, + 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0c, + 0x12, 0x16, 0x0a, 0x12, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0d, 0x12, 0x1a, 0x0a, 0x16, 0x6e, 0x6f, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x10, 0x0e, 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x73, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x10, 0x0f, 0x12, 0x17, 0x0a, 0x13, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x69, + 0x62, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x10, 0x22, 0x80, 0x0b, 0x0a, + 0x0b, 0x42, 0x67, 0x70, 0x76, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x76, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x01, 0x52, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, + 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x02, 0x52, 0x10, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x6c, 0x61, 0x70, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, + 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x03, 0x52, 0x10, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x41, 0x64, 0x76, 0x65, 0x72, + 0x74, 0x69, 0x73, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x04, 0x52, 0x0e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, + 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, + 0x18, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, + 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x06, 0x52, 0x16, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x04, 0x48, 0x07, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x53, 0x65, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, 0x08, + 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x73, 0x65, + 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x09, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x6e, + 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, + 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x0a, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, + 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0b, 0x52, + 0x0e, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x34, 0x0a, 0x13, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, + 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x0c, 0x52, 0x12, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x12, 0x6e, 0x6f, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x0d, 0x52, 0x11, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x16, + 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0e, 0x52, 0x15, + 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x09, 0x66, 0x73, 0x6d, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x76, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x46, 0x73, + 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x0f, 0x52, 0x08, 0x66, + 0x73, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x13, 0x65, 0x6e, + 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x69, 0x62, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x48, 0x10, 0x52, 0x10, 0x65, 0x6e, 0x64, 0x4f, 0x66, + 0x52, 0x69, 0x62, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x1a, 0x39, + 0x0a, 0x0c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x29, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, 0x01, 0x12, + 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x1a, 0x76, 0x0a, 0x08, 0x46, 0x73, 0x6d, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x6a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, + 0x0a, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, + 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, + 0x0f, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x10, 0x05, + 0x12, 0x0f, 0x0a, 0x0b, 0x65, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, + 0x06, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x15, 0x0a, 0x13, + 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x61, + 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x17, 0x0a, + 0x15, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, + 0x73, 0x65, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, + 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x12, 0x0a, 0x10, 0x5f, + 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, + 0x16, 0x0a, 0x14, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6e, 0x6f, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x19, + 0x0a, 0x17, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x73, + 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x65, 0x6e, 0x64, 0x5f, + 0x6f, 0x66, 0x5f, 0x72, 0x69, 0x62, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x22, + 0x91, 0x04, 0x0a, 0x13, 0x42, 0x67, 0x70, 0x76, 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x65, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x65, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x76, 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x8c, 0x03, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x22, 0xfc, 0x02, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x11, + 0x0a, 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x10, + 0x01, 0x12, 0x16, 0x0a, 0x12, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, + 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x73, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x10, 0x03, + 0x12, 0x13, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x12, + 0x1c, 0x0a, 0x18, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x06, 0x12, 0x10, 0x0a, + 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x07, 0x12, + 0x14, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x10, 0x08, 0x12, 0x0e, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x73, + 0x65, 0x6e, 0x74, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x6b, 0x65, 0x65, + 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0b, 0x12, 0x17, + 0x0a, 0x13, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x6e, 0x6f, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0d, 0x12, + 0x1a, 0x0a, 0x16, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0e, 0x12, 0x0d, 0x0a, 0x09, 0x66, + 0x73, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x10, 0x0f, 0x12, 0x17, 0x0a, 0x13, 0x65, 0x6e, + 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x69, 0x62, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x10, 0x10, 0x22, 0x80, 0x0b, 0x0a, 0x0b, 0x42, 0x67, 0x70, 0x76, 0x36, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x0d, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x76, 0x36, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x10, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x46, 0x6c, 0x61, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, + 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, + 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x10, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x73, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x2c, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0e, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, + 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, + 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x12, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x53, 0x65, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x18, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x16, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x57, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x73, + 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x0b, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, 0x08, 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x6f, + 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x09, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x2a, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0a, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x73, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x6b, + 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x0b, 0x52, 0x0e, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, + 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x13, 0x6b, 0x65, 0x65, + 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0c, 0x52, 0x12, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, + 0x69, 0x76, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x32, 0x0a, 0x12, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0d, 0x52, 0x11, 0x6e, + 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x65, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x16, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x04, 0x48, 0x0e, 0x52, 0x15, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x40, 0x0a, 0x09, 0x66, 0x73, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x76, 0x36, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x2e, 0x46, 0x73, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x0f, 0x52, 0x08, 0x66, 0x73, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x32, 0x0a, 0x13, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x69, 0x62, 0x5f, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x48, 0x10, + 0x52, 0x10, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x52, 0x69, 0x62, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x88, 0x01, 0x01, 0x1a, 0x39, 0x0a, 0x0c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, + 0x0a, 0x02, 0x75, 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, + 0x1a, 0x76, 0x0a, 0x08, 0x46, 0x73, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x6a, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x10, 0x01, 0x12, + 0x0b, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, + 0x73, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x65, 0x73, 0x74, 0x61, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0x06, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, + 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x1b, 0x0a, + 0x19, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, 0x08, 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, - 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, - 0x48, 0x09, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x2a, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0a, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x6e, - 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, - 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0b, 0x52, 0x0e, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, - 0x76, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x13, 0x6b, 0x65, - 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0c, 0x52, 0x12, 0x6b, 0x65, 0x65, 0x70, 0x61, - 0x6c, 0x69, 0x76, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, - 0x12, 0x32, 0x0a, 0x12, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0d, 0x52, 0x11, - 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x65, 0x6e, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x16, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x04, 0x48, 0x0e, 0x52, 0x15, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, - 0x12, 0x40, 0x0a, 0x09, 0x66, 0x73, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x10, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x76, 0x36, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x46, 0x73, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x0f, 0x52, 0x08, 0x66, 0x73, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x32, 0x0a, 0x13, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x69, 0x62, - 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x48, - 0x10, 0x52, 0x10, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x52, 0x69, 0x62, 0x52, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x1a, 0x39, 0x0a, 0x0c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, - 0x02, 0x1a, 0x76, 0x0a, 0x08, 0x46, 0x73, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x6a, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x10, 0x01, - 0x12, 0x0b, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x6f, 0x70, 0x65, - 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x65, 0x73, 0x74, 0x61, - 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0x06, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x14, 0x0a, 0x12, 0x5f, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, - 0x64, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, - 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x1b, - 0x0a, 0x19, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, - 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, - 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x64, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, - 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x6b, 0x65, 0x65, 0x70, - 0x61, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, - 0x15, 0x0a, 0x13, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x73, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, - 0x16, 0x0a, 0x14, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x69, 0x62, 0x5f, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x22, 0xac, 0x06, 0x0a, 0x12, 0x49, 0x73, 0x69, 0x73, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, - 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, - 0x69, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0xa5, - 0x05, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x95, - 0x05, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x6c, 0x31, 0x5f, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x75, 0x70, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, - 0x6c, 0x31, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x10, - 0x02, 0x12, 0x14, 0x0a, 0x10, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x6c, 0x31, 0x5f, 0x62, 0x72, - 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x73, - 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x20, 0x0a, 0x1c, 0x6c, 0x31, 0x5f, 0x62, 0x72, 0x6f, 0x61, - 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x05, 0x12, 0x21, 0x0a, 0x1d, 0x6c, 0x31, 0x5f, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x6c, - 0x6c, 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x06, 0x12, 0x25, 0x0a, 0x21, 0x6c, 0x31, - 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, - 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, - 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x6c, 0x31, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, - 0x74, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x6c, 0x31, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, 0x6c, 0x31, 0x5f, - 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0a, 0x12, 0x14, 0x0a, 0x10, 0x6c, - 0x31, 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, - 0x0b, 0x12, 0x0f, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, - 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0d, 0x12, 0x12, 0x0a, 0x0e, 0x6c, 0x32, 0x5f, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x75, 0x70, 0x10, 0x0e, 0x12, 0x13, 0x0a, 0x0f, 0x6c, - 0x32, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x10, 0x0f, - 0x12, 0x14, 0x0a, 0x10, 0x6c, 0x32, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, - 0x73, 0x69, 0x7a, 0x65, 0x10, 0x10, 0x12, 0x1c, 0x0a, 0x18, 0x6c, 0x32, 0x5f, 0x62, 0x72, 0x6f, + 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, + 0x11, 0x0a, 0x0f, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, + 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61, + 0x6c, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x15, + 0x0a, 0x13, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x73, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x16, + 0x0a, 0x14, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x69, 0x62, 0x5f, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x22, 0xac, 0x06, 0x0a, 0x12, 0x49, 0x73, 0x69, 0x73, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, + 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0xa5, 0x05, + 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x95, 0x05, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x6c, 0x31, 0x5f, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x75, 0x70, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x6c, + 0x31, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x10, 0x02, + 0x12, 0x14, 0x0a, 0x10, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x6c, 0x31, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x73, 0x65, - 0x6e, 0x74, 0x10, 0x11, 0x12, 0x20, 0x0a, 0x1c, 0x6c, 0x32, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, + 0x6e, 0x74, 0x10, 0x04, 0x12, 0x20, 0x0a, 0x1c, 0x6c, 0x31, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x64, 0x10, 0x12, 0x12, 0x21, 0x0a, 0x1d, 0x6c, 0x32, 0x5f, 0x70, 0x6f, 0x69, + 0x69, 0x76, 0x65, 0x64, 0x10, 0x05, 0x12, 0x21, 0x0a, 0x1d, 0x6c, 0x31, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, - 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x13, 0x12, 0x25, 0x0a, 0x21, 0x6c, 0x32, 0x5f, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x14, - 0x12, 0x10, 0x0a, 0x0c, 0x6c, 0x32, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, - 0x10, 0x15, 0x12, 0x14, 0x0a, 0x10, 0x6c, 0x32, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x16, 0x12, 0x10, 0x0a, 0x0c, 0x6c, 0x32, 0x5f, 0x63, - 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x17, 0x12, 0x14, 0x0a, 0x10, 0x6c, 0x32, - 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x18, - 0x12, 0x0f, 0x0a, 0x0b, 0x6c, 0x32, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, - 0x19, 0x12, 0x13, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x64, 0x10, 0x1a, 0x22, 0xcc, 0x0f, 0x0a, 0x0a, 0x49, 0x73, 0x69, 0x73, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x29, - 0x0a, 0x0e, 0x6c, 0x31, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x75, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0c, 0x6c, 0x31, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x55, 0x70, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x31, 0x5f, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x48, 0x02, 0x52, 0x0d, 0x6c, 0x31, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, - 0x6c, 0x61, 0x70, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x18, 0x6c, 0x31, 0x5f, 0x62, 0x72, 0x6f, - 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x73, 0x65, - 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x15, 0x6c, 0x31, 0x42, 0x72, - 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x53, 0x65, 0x6e, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x1c, 0x6c, 0x31, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, - 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x19, 0x6c, 0x31, - 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x52, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x1d, 0x6c, 0x31, - 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, - 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x04, 0x48, 0x05, 0x52, 0x18, 0x6c, 0x31, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x50, 0x6f, - 0x69, 0x6e, 0x74, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x4c, 0x0a, 0x21, 0x6c, 0x31, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x1c, 0x6c, - 0x31, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x6c, - 0x6c, 0x6f, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2d, - 0x0a, 0x10, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x0e, 0x6c, 0x31, 0x44, 0x61, - 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, - 0x0c, 0x6c, 0x31, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x04, 0x48, 0x08, 0x52, 0x0a, 0x6c, 0x31, 0x50, 0x73, 0x6e, 0x70, 0x53, 0x65, 0x6e, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x6c, 0x31, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, - 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x09, - 0x52, 0x0e, 0x6c, 0x31, 0x50, 0x73, 0x6e, 0x70, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, - 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0c, 0x6c, 0x31, 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x73, - 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0a, 0x52, 0x0a, 0x6c, 0x31, 0x43, - 0x73, 0x6e, 0x70, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x6c, 0x31, - 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x04, 0x48, 0x0b, 0x52, 0x0e, 0x6c, 0x31, 0x43, 0x73, 0x6e, 0x70, 0x52, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, - 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0c, - 0x52, 0x09, 0x6c, 0x31, 0x4c, 0x73, 0x70, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2b, - 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0d, 0x52, 0x0d, 0x6c, 0x31, 0x4c, 0x73, 0x70, - 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x6c, - 0x32, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x75, 0x70, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x0e, 0x52, 0x0c, 0x6c, 0x32, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x55, 0x70, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x48, - 0x0f, 0x52, 0x0d, 0x6c, 0x32, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x6c, 0x61, 0x70, - 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x18, 0x6c, 0x32, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, - 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x04, 0x48, 0x10, 0x52, 0x15, 0x6c, 0x32, 0x42, 0x72, 0x6f, 0x61, 0x64, - 0x63, 0x61, 0x73, 0x74, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x44, 0x0a, 0x1c, 0x6c, 0x32, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, - 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x04, 0x48, 0x11, 0x52, 0x19, 0x6c, 0x32, 0x42, 0x72, 0x6f, - 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x52, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x1d, 0x6c, 0x32, 0x5f, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x6c, - 0x6c, 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x48, 0x12, - 0x52, 0x18, 0x6c, 0x32, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x50, 0x6f, 0x69, 0x6e, 0x74, - 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, - 0x21, 0x6c, 0x32, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x48, 0x13, 0x52, 0x1c, 0x6c, 0x32, 0x50, 0x6f, - 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, - 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x6c, - 0x32, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x15, 0x20, 0x01, 0x28, 0x04, 0x48, 0x14, 0x52, 0x0e, 0x6c, 0x32, 0x44, 0x61, 0x74, 0x61, 0x62, - 0x61, 0x73, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0c, 0x6c, 0x32, - 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x04, - 0x48, 0x15, 0x52, 0x0a, 0x6c, 0x32, 0x50, 0x73, 0x6e, 0x70, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x6c, 0x32, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x04, 0x48, 0x16, 0x52, 0x0e, 0x6c, - 0x32, 0x50, 0x73, 0x6e, 0x70, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, - 0x12, 0x25, 0x0a, 0x0c, 0x6c, 0x32, 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, - 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x48, 0x17, 0x52, 0x0a, 0x6c, 0x32, 0x43, 0x73, 0x6e, 0x70, - 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x6c, 0x32, 0x5f, 0x63, 0x73, - 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, - 0x04, 0x48, 0x18, 0x52, 0x0e, 0x6c, 0x32, 0x43, 0x73, 0x6e, 0x70, 0x52, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x6c, 0x32, 0x5f, 0x6c, 0x73, 0x70, - 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x19, 0x52, 0x09, 0x6c, - 0x32, 0x4c, 0x73, 0x70, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, - 0x32, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x1b, - 0x20, 0x01, 0x28, 0x04, 0x48, 0x1a, 0x52, 0x0d, 0x6c, 0x32, 0x4c, 0x73, 0x70, 0x52, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6c, 0x31, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x5f, 0x75, 0x70, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6c, 0x31, 0x5f, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x6c, 0x31, 0x5f, - 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, - 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x1f, 0x0a, 0x1d, 0x5f, 0x6c, 0x31, 0x5f, 0x62, 0x72, 0x6f, - 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x20, 0x0a, 0x1e, 0x5f, 0x6c, 0x31, 0x5f, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x6c, - 0x6c, 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x24, 0x0a, 0x22, 0x5f, 0x6c, 0x31, 0x5f, + 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x06, 0x12, 0x25, 0x0a, 0x21, 0x6c, 0x31, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x13, - 0x0a, 0x11, 0x5f, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x31, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, - 0x73, 0x65, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6c, 0x31, 0x5f, 0x70, 0x73, 0x6e, 0x70, - 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x31, - 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6c, - 0x31, 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, - 0x0e, 0x0a, 0x0c, 0x5f, 0x6c, 0x31, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, - 0x12, 0x0a, 0x10, 0x5f, 0x6c, 0x31, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x64, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6c, 0x32, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x5f, 0x75, 0x70, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6c, 0x32, 0x5f, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x6c, - 0x32, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, - 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x1f, 0x0a, 0x1d, 0x5f, 0x6c, 0x32, 0x5f, 0x62, - 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, - 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x20, 0x0a, 0x1e, 0x5f, 0x6c, 0x32, 0x5f, + 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x07, + 0x12, 0x10, 0x0a, 0x0c, 0x6c, 0x31, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, + 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x6c, 0x31, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, 0x6c, 0x31, 0x5f, 0x63, + 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0a, 0x12, 0x14, 0x0a, 0x10, 0x6c, 0x31, + 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0b, + 0x12, 0x0f, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, + 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x10, 0x0d, 0x12, 0x12, 0x0a, 0x0e, 0x6c, 0x32, 0x5f, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x75, 0x70, 0x10, 0x0e, 0x12, 0x13, 0x0a, 0x0f, 0x6c, 0x32, + 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x10, 0x0f, 0x12, + 0x14, 0x0a, 0x10, 0x6c, 0x32, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x10, 0x10, 0x12, 0x1c, 0x0a, 0x18, 0x6c, 0x32, 0x5f, 0x62, 0x72, 0x6f, 0x61, + 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, + 0x74, 0x10, 0x11, 0x12, 0x20, 0x0a, 0x1c, 0x6c, 0x32, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, + 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x10, 0x12, 0x12, 0x21, 0x0a, 0x1d, 0x6c, 0x32, 0x5f, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, + 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x13, 0x12, 0x25, 0x0a, 0x21, 0x6c, 0x32, 0x5f, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, + 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x14, 0x12, + 0x10, 0x0a, 0x0c, 0x6c, 0x32, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, + 0x15, 0x12, 0x14, 0x0a, 0x10, 0x6c, 0x32, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x16, 0x12, 0x10, 0x0a, 0x0c, 0x6c, 0x32, 0x5f, 0x63, 0x73, + 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x17, 0x12, 0x14, 0x0a, 0x10, 0x6c, 0x32, 0x5f, + 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x18, 0x12, + 0x0f, 0x0a, 0x0b, 0x6c, 0x32, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x19, + 0x12, 0x13, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x10, 0x1a, 0x22, 0xcc, 0x0f, 0x0a, 0x0a, 0x49, 0x73, 0x69, 0x73, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, + 0x0e, 0x6c, 0x31, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x75, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0c, 0x6c, 0x31, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x55, 0x70, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x31, 0x5f, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x02, 0x52, 0x0d, 0x6c, 0x31, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x6c, + 0x61, 0x70, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x18, 0x6c, 0x31, 0x5f, 0x62, 0x72, 0x6f, 0x61, + 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x15, 0x6c, 0x31, 0x42, 0x72, 0x6f, + 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x53, 0x65, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x1c, 0x6c, 0x31, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, + 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x19, 0x6c, 0x31, 0x42, + 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x1d, 0x6c, 0x31, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x24, 0x0a, 0x22, 0x5f, 0x6c, - 0x32, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x05, 0x52, 0x18, 0x6c, 0x31, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x4c, 0x0a, 0x21, 0x6c, 0x31, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x1c, 0x6c, 0x31, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x6c, 0x6c, + 0x6f, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, + 0x10, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x0e, 0x6c, 0x31, 0x44, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0c, + 0x6c, 0x31, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x04, 0x48, 0x08, 0x52, 0x0a, 0x6c, 0x31, 0x50, 0x73, 0x6e, 0x70, 0x53, 0x65, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x6c, 0x31, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x09, 0x52, + 0x0e, 0x6c, 0x31, 0x50, 0x73, 0x6e, 0x70, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0c, 0x6c, 0x31, 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, + 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0a, 0x52, 0x0a, 0x6c, 0x31, 0x43, 0x73, + 0x6e, 0x70, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x6c, 0x31, 0x5f, + 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x04, 0x48, 0x0b, 0x52, 0x0e, 0x6c, 0x31, 0x43, 0x73, 0x6e, 0x70, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, 0x6c, + 0x73, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0c, 0x52, + 0x09, 0x6c, 0x31, 0x4c, 0x73, 0x70, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, + 0x0f, 0x6c, 0x31, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0d, 0x52, 0x0d, 0x6c, 0x31, 0x4c, 0x73, 0x70, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x6c, 0x32, + 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x75, 0x70, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x0e, 0x52, 0x0c, 0x6c, 0x32, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x55, 0x70, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0f, + 0x52, 0x0d, 0x6c, 0x32, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x6c, 0x61, 0x70, 0x88, + 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x18, 0x6c, 0x32, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, + 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x11, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x10, 0x52, 0x15, 0x6c, 0x32, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, + 0x61, 0x73, 0x74, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x44, 0x0a, 0x1c, 0x6c, 0x32, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, - 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6c, 0x32, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x32, 0x5f, 0x70, 0x73, 0x6e, - 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6c, 0x32, 0x5f, 0x70, 0x73, - 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, - 0x6c, 0x32, 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, - 0x5f, 0x6c, 0x32, 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6c, 0x32, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x65, 0x6e, - 0x74, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6c, 0x32, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x64, 0x22, 0xd4, 0x02, 0x0a, 0x11, 0x4c, 0x61, 0x67, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, - 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, - 0x6c, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x27, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x1a, 0xd5, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0f, - 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x10, 0x01, 0x12, - 0x13, 0x0a, 0x0f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, - 0x75, 0x70, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, - 0x78, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, - 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x05, - 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x06, 0x12, 0x12, - 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, - 0x10, 0x07, 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, - 0x72, 0x61, 0x74, 0x65, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, - 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, 0x0a, 0x22, 0xa9, 0x05, 0x0a, - 0x09, 0x4c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, - 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x6d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, - 0x73, 0x55, 0x70, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, - 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x08, 0x66, 0x72, 0x61, - 0x6d, 0x65, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, - 0x65, 0x73, 0x5f, 0x72, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x08, 0x66, - 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x07, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x07, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x72, - 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x02, 0x48, 0x07, 0x52, 0x0c, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x54, 0x78, 0x52, 0x61, - 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, - 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x48, 0x08, 0x52, - 0x0c, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x27, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x48, 0x09, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x54, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, - 0x48, 0x0a, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x52, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, - 0x01, 0x01, 0x1a, 0x37, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, - 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, - 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x75, 0x70, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, - 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, - 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, - 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x11, - 0x0a, 0x0f, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, - 0x72, 0x61, 0x74, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, - 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x22, 0xdf, 0x03, 0x0a, 0x12, 0x4c, 0x61, 0x63, - 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1b, 0x0a, 0x09, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x15, - 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x6c, 0x61, 0x67, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, - 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x63, 0x70, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, - 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, - 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0xab, 0x02, 0x0a, - 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x9b, 0x02, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x70, - 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x6c, - 0x61, 0x63, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x02, - 0x12, 0x12, 0x0a, 0x0e, 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x72, 0x78, 0x5f, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x73, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, - 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x10, 0x05, 0x12, - 0x13, 0x0a, 0x0f, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x10, 0x07, 0x12, 0x0e, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6e, 0x67, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, 0x0d, 0x0a, 0x09, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x10, 0x0a, 0x12, 0x0c, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x5f, - 0x6b, 0x65, 0x79, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, - 0x5f, 0x69, 0x64, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, - 0x5f, 0x6b, 0x65, 0x79, 0x10, 0x0d, 0x12, 0x0c, 0x0a, 0x08, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, - 0x75, 0x6d, 0x10, 0x0e, 0x12, 0x14, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x5f, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x10, 0x0f, 0x22, 0xe4, 0x09, 0x0a, 0x0a, 0x4c, - 0x61, 0x63, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x1e, 0x0a, 0x08, 0x6c, 0x61, 0x67, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6c, - 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x14, 0x6c, 0x61, 0x67, - 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x11, 0x6c, 0x61, 0x67, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x2b, 0x0a, 0x0f, 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, - 0x72, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x0d, 0x6c, 0x61, 0x63, 0x70, - 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, - 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x74, 0x78, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x0d, 0x6c, 0x61, 0x63, 0x70, 0x50, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x6c, 0x61, 0x63, - 0x70, 0x5f, 0x72, 0x78, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x04, 0x48, 0x04, 0x52, 0x0c, 0x6c, 0x61, 0x63, 0x70, 0x52, 0x78, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x73, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x63, - 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x05, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, - 0x79, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x63, 0x70, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x06, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x53, 0x0a, 0x0f, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x4c, 0x61, 0x63, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x53, 0x79, 0x6e, 0x63, - 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x07, 0x52, 0x0f, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0c, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x08, 0x52, 0x0c, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x23, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x08, 0x48, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6e, - 0x67, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x69, 0x6e, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x48, 0x0a, 0x52, 0x0c, 0x64, 0x69, - 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, - 0x09, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x0b, 0x52, 0x08, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x1e, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x0c, 0x52, 0x07, 0x6f, 0x70, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, - 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x0d, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x64, - 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x0e, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, - 0x6e, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x0f, 0x52, 0x07, 0x70, - 0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x70, 0x61, 0x72, - 0x74, 0x6e, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x10, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x50, 0x6f, - 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x69, 0x74, 0x79, 0x22, 0x30, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x70, 0x61, 0x73, - 0x73, 0x69, 0x76, 0x65, 0x10, 0x02, 0x1a, 0x37, 0x0a, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x68, - 0x6f, 0x72, 0x74, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x6f, 0x6e, 0x67, 0x10, 0x02, 0x1a, - 0x45, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x69, - 0x6e, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x5f, - 0x73, 0x79, 0x6e, 0x63, 0x10, 0x02, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x12, 0x0a, 0x10, - 0x5f, 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x72, 0x78, - 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x5f, 0x74, 0x78, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x72, 0x78, - 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x69, 0x74, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6e, 0x67, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, - 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x42, - 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x42, - 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x42, 0x13, 0x0a, 0x11, - 0x5f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, - 0x6d, 0x22, 0x95, 0x02, 0x0a, 0x12, 0x4c, 0x6c, 0x64, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6c, 0x64, 0x70, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6c, - 0x64, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x28, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x92, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, - 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x01, 0x12, 0x0d, 0x0a, - 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x78, 0x10, - 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x63, - 0x61, 0x72, 0x64, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x6c, 0x76, 0x73, 0x5f, 0x64, 0x69, - 0x73, 0x63, 0x61, 0x72, 0x64, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x6c, 0x76, 0x73, 0x5f, - 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x06, 0x22, 0x80, 0x03, 0x0a, 0x0a, 0x4c, 0x6c, - 0x64, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x78, - 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, - 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, - 0x52, 0x0d, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x78, 0x88, - 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, - 0x63, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0d, 0x66, 0x72, - 0x61, 0x6d, 0x65, 0x73, 0x44, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x88, 0x01, 0x01, 0x12, 0x26, - 0x0a, 0x0c, 0x74, 0x6c, 0x76, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x0b, 0x74, 0x6c, 0x76, 0x73, 0x44, 0x69, 0x73, 0x63, - 0x61, 0x72, 0x64, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x74, 0x6c, 0x76, 0x73, 0x5f, 0x75, - 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x0b, - 0x74, 0x6c, 0x76, 0x73, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, - 0x65, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, - 0x5f, 0x74, 0x78, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x78, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x66, 0x72, 0x61, 0x6d, - 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, - 0x6c, 0x76, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, - 0x74, 0x6c, 0x76, 0x73, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x22, 0xdc, 0x05, 0x0a, - 0x12, 0x52, 0x73, 0x76, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x04, 0x48, 0x11, 0x52, 0x19, 0x6c, 0x32, 0x42, 0x72, 0x6f, 0x61, + 0x64, 0x63, 0x61, 0x73, 0x74, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x1d, 0x6c, 0x32, 0x5f, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, + 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x48, 0x12, 0x52, + 0x18, 0x6c, 0x32, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, + 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x21, + 0x6c, 0x32, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x48, 0x13, 0x52, 0x1c, 0x6c, 0x32, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x54, 0x6f, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x6c, 0x32, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x15, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x14, 0x52, 0x0e, 0x6c, 0x32, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0c, 0x6c, 0x32, 0x5f, + 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x15, 0x52, 0x0a, 0x6c, 0x32, 0x50, 0x73, 0x6e, 0x70, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x2d, 0x0a, 0x10, 0x6c, 0x32, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x04, 0x48, 0x16, 0x52, 0x0e, 0x6c, 0x32, + 0x50, 0x73, 0x6e, 0x70, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x25, 0x0a, 0x0c, 0x6c, 0x32, 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, + 0x18, 0x20, 0x01, 0x28, 0x04, 0x48, 0x17, 0x52, 0x0a, 0x6c, 0x32, 0x43, 0x73, 0x6e, 0x70, 0x53, + 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x6c, 0x32, 0x5f, 0x63, 0x73, 0x6e, + 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x18, 0x52, 0x0e, 0x6c, 0x32, 0x43, 0x73, 0x6e, 0x70, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x6c, 0x32, 0x5f, 0x6c, 0x73, 0x70, 0x5f, + 0x73, 0x65, 0x6e, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x19, 0x52, 0x09, 0x6c, 0x32, + 0x4c, 0x73, 0x70, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x32, + 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x1b, 0x20, + 0x01, 0x28, 0x04, 0x48, 0x1a, 0x52, 0x0d, 0x6c, 0x32, 0x4c, 0x73, 0x70, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6c, 0x31, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x5f, 0x75, 0x70, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6c, 0x31, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x6c, 0x31, 0x5f, 0x62, + 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, + 0x73, 0x65, 0x6e, 0x74, 0x42, 0x1f, 0x0a, 0x1d, 0x5f, 0x6c, 0x31, 0x5f, 0x62, 0x72, 0x6f, 0x61, + 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x20, 0x0a, 0x1e, 0x5f, 0x6c, 0x31, 0x5f, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, + 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x24, 0x0a, 0x22, 0x5f, 0x6c, 0x31, 0x5f, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, + 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x13, 0x0a, + 0x11, 0x5f, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x31, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, 0x73, + 0x65, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6c, 0x31, 0x5f, 0x70, 0x73, 0x6e, 0x70, 0x5f, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x31, 0x5f, + 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6c, 0x31, + 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0e, + 0x0a, 0x0c, 0x5f, 0x6c, 0x31, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x12, + 0x0a, 0x10, 0x5f, 0x6c, 0x31, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6c, 0x32, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x5f, 0x75, 0x70, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6c, 0x32, 0x5f, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x6c, 0x32, + 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, + 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x1f, 0x0a, 0x1d, 0x5f, 0x6c, 0x32, 0x5f, 0x62, 0x72, + 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x20, 0x0a, 0x1e, 0x5f, 0x6c, 0x32, 0x5f, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, + 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x24, 0x0a, 0x22, 0x5f, 0x6c, 0x32, + 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, + 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, + 0x13, 0x0a, 0x11, 0x5f, 0x6c, 0x32, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x32, 0x5f, 0x70, 0x73, 0x6e, 0x70, + 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6c, 0x32, 0x5f, 0x70, 0x73, 0x6e, + 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, + 0x32, 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, + 0x6c, 0x32, 0x5f, 0x63, 0x73, 0x6e, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6c, 0x32, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x73, 0x65, 0x6e, 0x74, + 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6c, 0x32, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x22, 0xd4, 0x02, 0x0a, 0x11, 0x4c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x61, + 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6c, + 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x27, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x1a, 0xd5, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0f, 0x0a, + 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x10, 0x01, 0x12, 0x13, + 0x0a, 0x0f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x75, + 0x70, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, + 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x10, + 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x05, 0x12, + 0x0c, 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x06, 0x12, 0x12, 0x0a, + 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, + 0x07, 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, + 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x10, 0x0a, 0x22, 0xa9, 0x05, 0x0a, 0x09, + 0x4c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x44, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, + 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x73, + 0x55, 0x70, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, + 0x74, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, + 0x73, 0x5f, 0x72, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x08, 0x66, 0x72, + 0x61, 0x6d, 0x65, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x5f, 0x74, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x07, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x5f, 0x72, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x07, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x72, 0x61, + 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x02, 0x48, 0x07, 0x52, 0x0c, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x54, 0x78, 0x52, 0x61, 0x74, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, + 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x48, 0x08, 0x52, 0x0c, + 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x27, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x48, 0x09, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x54, + 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x48, + 0x0a, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x52, 0x78, 0x52, 0x61, 0x74, 0x65, 0x88, 0x01, + 0x01, 0x1a, 0x37, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, + 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, 0x01, + 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, + 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x75, 0x70, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, + 0x5f, 0x72, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, + 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x11, 0x0a, + 0x0f, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x78, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, + 0x72, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x22, 0xdf, 0x03, 0x0a, 0x12, 0x4c, 0x61, 0x63, 0x70, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x08, 0x6c, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x6c, + 0x61, 0x67, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x6c, 0x61, 0x67, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4b, + 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x63, 0x70, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, + 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0xab, 0x02, 0x0a, 0x0b, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x9b, 0x02, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x70, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x6c, 0x61, + 0x63, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x02, 0x12, + 0x12, 0x0a, 0x0e, 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x72, 0x78, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x73, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x10, + 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x10, 0x05, 0x12, 0x13, + 0x0a, 0x0f, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x10, 0x07, 0x12, 0x0e, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6e, 0x67, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, 0x0d, 0x0a, 0x09, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x5f, 0x69, 0x64, 0x10, 0x0a, 0x12, 0x0c, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x6b, + 0x65, 0x79, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x5f, + 0x6b, 0x65, 0x79, 0x10, 0x0d, 0x12, 0x0c, 0x0a, 0x08, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, + 0x6d, 0x10, 0x0e, 0x12, 0x14, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x5f, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x10, 0x0f, 0x22, 0xe4, 0x09, 0x0a, 0x0a, 0x4c, 0x61, + 0x63, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x1e, 0x0a, 0x08, 0x6c, 0x61, 0x67, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6c, 0x61, + 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x14, 0x6c, 0x61, 0x67, 0x5f, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x11, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2b, + 0x0a, 0x0f, 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x72, + 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x0d, 0x6c, 0x61, 0x63, 0x70, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, + 0x61, 0x63, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x74, 0x78, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x0d, 0x6c, 0x61, 0x63, 0x70, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x6c, 0x61, 0x63, 0x70, + 0x5f, 0x72, 0x78, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x04, 0x52, 0x0c, 0x6c, 0x61, 0x63, 0x70, 0x52, 0x78, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x63, 0x70, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x05, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, + 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x61, 0x63, 0x70, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x06, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x53, 0x0a, 0x0f, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x4c, 0x61, 0x63, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x68, + 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x07, 0x52, 0x0f, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0c, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x08, 0x52, 0x0c, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x23, + 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, + 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x48, 0x0a, 0x52, 0x0c, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x0b, 0x52, 0x08, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, + 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x0c, 0x52, 0x07, 0x6f, 0x70, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, 0x22, + 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x0d, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x0e, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x6e, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x0f, 0x52, 0x07, 0x70, 0x6f, + 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, + 0x6e, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x10, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x50, 0x6f, 0x72, + 0x74, 0x4e, 0x75, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x74, 0x79, 0x22, 0x30, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x70, 0x61, 0x73, 0x73, + 0x69, 0x76, 0x65, 0x10, 0x02, 0x1a, 0x37, 0x0a, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x22, 0x2c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x68, 0x6f, + 0x72, 0x74, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x6f, 0x6e, 0x67, 0x10, 0x02, 0x1a, 0x45, + 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x69, 0x6e, + 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x5f, 0x73, + 0x79, 0x6e, 0x63, 0x10, 0x02, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x6c, 0x61, 0x67, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x12, 0x0a, 0x10, 0x5f, + 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x72, 0x78, 0x42, + 0x12, 0x0a, 0x10, 0x5f, 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x5f, 0x74, 0x78, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6c, 0x61, 0x63, 0x70, 0x5f, 0x72, 0x78, 0x5f, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x74, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, + 0x12, 0x0a, 0x10, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6e, 0x67, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, + 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x42, + 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x42, 0x0e, + 0x0a, 0x0c, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x0b, + 0x0a, 0x09, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x42, 0x13, 0x0a, 0x11, 0x5f, + 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, + 0x22, 0x95, 0x02, 0x0a, 0x12, 0x4c, 0x6c, 0x64, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6c, 0x64, 0x70, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6c, 0x64, + 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, + 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x1a, 0xd5, 0x04, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x22, 0xc5, 0x04, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x1f, 0x0a, - 0x1b, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, 0x70, - 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, 0x17, - 0x0a, 0x13, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, - 0x70, 0x73, 0x5f, 0x75, 0x70, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x65, 0x67, 0x72, 0x65, 0x73, - 0x73, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x5f, 0x75, 0x70, 0x10, 0x03, 0x12, - 0x12, 0x0a, 0x0e, 0x6c, 0x73, 0x70, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x68, 0x73, 0x5f, 0x74, 0x78, 0x10, - 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x68, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x06, 0x12, - 0x0c, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x76, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x07, 0x12, 0x0c, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x76, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x70, - 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x09, 0x12, 0x11, - 0x0a, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x72, 0x78, 0x10, - 0x0a, 0x12, 0x11, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, - 0x74, 0x78, 0x10, 0x0b, 0x12, 0x11, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x74, 0x65, 0x61, - 0x72, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x0c, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x61, 0x74, 0x68, 0x5f, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x0d, 0x12, 0x12, 0x0a, 0x0e, 0x70, - 0x61, 0x74, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x0e, 0x12, - 0x12, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x74, - 0x78, 0x10, 0x0f, 0x12, 0x12, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x10, 0x12, 0x10, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x76, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x78, 0x10, 0x11, 0x12, 0x10, 0x0a, 0x0c, 0x72, 0x65, 0x73, - 0x76, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x72, 0x78, 0x10, 0x12, 0x12, 0x0d, 0x0a, 0x09, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x13, 0x12, 0x0d, 0x0a, 0x09, 0x68, 0x65, - 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x14, 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x63, 0x6b, - 0x73, 0x5f, 0x74, 0x78, 0x10, 0x15, 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x72, - 0x78, 0x10, 0x16, 0x12, 0x0c, 0x0a, 0x08, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x74, 0x78, 0x10, - 0x17, 0x12, 0x0c, 0x0a, 0x08, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x18, 0x12, - 0x0f, 0x0a, 0x0b, 0x73, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x78, 0x10, 0x19, - 0x12, 0x0f, 0x0a, 0x0b, 0x73, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x78, 0x10, - 0x1a, 0x12, 0x0d, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x78, 0x10, 0x1b, - 0x12, 0x0d, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x72, 0x78, 0x10, 0x1c, 0x12, - 0x20, 0x0a, 0x1c, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x78, 0x10, - 0x1d, 0x12, 0x18, 0x0a, 0x14, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x10, 0x1e, 0x22, 0xff, 0x0d, 0x0a, 0x0a, - 0x52, 0x73, 0x76, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, - 0x32, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x18, 0x69, 0x6e, 0x67, 0x72, - 0x65, 0x73, 0x73, 0x50, 0x32, 0x70, 0x4c, 0x73, 0x70, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x13, 0x69, 0x6e, 0x67, 0x72, 0x65, - 0x73, 0x73, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x5f, 0x75, 0x70, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x10, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x50, - 0x32, 0x70, 0x4c, 0x73, 0x70, 0x73, 0x55, 0x70, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x12, 0x65, - 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x5f, 0x75, - 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x0f, 0x65, 0x67, 0x72, 0x65, 0x73, - 0x73, 0x50, 0x32, 0x70, 0x4c, 0x73, 0x70, 0x73, 0x55, 0x70, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, - 0x0e, 0x6c, 0x73, 0x70, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0c, 0x6c, 0x73, 0x70, 0x46, 0x6c, 0x61, 0x70, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x68, - 0x73, 0x5f, 0x74, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x07, 0x70, 0x61, - 0x74, 0x68, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x68, - 0x73, 0x5f, 0x72, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x07, 0x70, 0x61, - 0x74, 0x68, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x76, - 0x73, 0x5f, 0x74, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x07, 0x72, 0x65, - 0x73, 0x76, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x76, - 0x73, 0x5f, 0x72, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, 0x08, 0x52, 0x07, 0x72, 0x65, - 0x73, 0x76, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x70, 0x61, 0x74, 0x68, - 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x48, - 0x09, 0x52, 0x0b, 0x70, 0x61, 0x74, 0x68, 0x54, 0x65, 0x61, 0x72, 0x73, 0x54, 0x78, 0x88, 0x01, - 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, - 0x72, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0a, 0x52, 0x0b, 0x70, 0x61, 0x74, 0x68, - 0x54, 0x65, 0x61, 0x72, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x72, 0x65, - 0x73, 0x76, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x74, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x04, 0x48, 0x0b, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x76, 0x54, 0x65, 0x61, 0x72, 0x73, 0x54, 0x78, - 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x74, 0x65, 0x61, 0x72, - 0x73, 0x5f, 0x72, 0x78, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0c, 0x52, 0x0b, 0x72, 0x65, - 0x73, 0x76, 0x54, 0x65, 0x61, 0x72, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, - 0x70, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x74, 0x78, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x04, 0x48, 0x0d, 0x52, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x61, 0x74, 0x68, 0x5f, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x78, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x48, - 0x0e, 0x52, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x52, 0x78, 0x88, - 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x73, 0x5f, 0x74, 0x78, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0f, 0x52, 0x0c, 0x72, 0x65, - 0x73, 0x76, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, - 0x0e, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x78, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x04, 0x48, 0x10, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x76, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x76, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x78, 0x18, 0x12, 0x20, 0x01, 0x28, 0x04, 0x48, 0x11, - 0x52, 0x0a, 0x72, 0x65, 0x73, 0x76, 0x43, 0x6f, 0x6e, 0x66, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, - 0x25, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x72, 0x78, 0x18, - 0x13, 0x20, 0x01, 0x28, 0x04, 0x48, 0x12, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x76, 0x43, 0x6f, 0x6e, - 0x66, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, - 0x5f, 0x74, 0x78, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x48, 0x13, 0x52, 0x08, 0x68, 0x65, 0x6c, - 0x6c, 0x6f, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x68, 0x65, 0x6c, 0x6c, - 0x6f, 0x73, 0x5f, 0x72, 0x78, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, 0x48, 0x14, 0x52, 0x08, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x61, 0x63, - 0x6b, 0x73, 0x5f, 0x74, 0x78, 0x18, 0x16, 0x20, 0x01, 0x28, 0x04, 0x48, 0x15, 0x52, 0x06, 0x61, - 0x63, 0x6b, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x61, 0x63, 0x6b, 0x73, - 0x5f, 0x72, 0x78, 0x18, 0x17, 0x20, 0x01, 0x28, 0x04, 0x48, 0x16, 0x52, 0x06, 0x61, 0x63, 0x6b, - 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, - 0x74, 0x78, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x48, 0x17, 0x52, 0x07, 0x6e, 0x61, 0x63, 0x6b, - 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, - 0x72, 0x78, 0x18, 0x19, 0x20, 0x01, 0x28, 0x04, 0x48, 0x18, 0x52, 0x07, 0x6e, 0x61, 0x63, 0x6b, - 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x72, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x5f, 0x74, 0x78, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x19, 0x52, 0x0a, 0x73, - 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, - 0x73, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x78, 0x18, 0x1b, 0x20, 0x01, 0x28, - 0x04, 0x48, 0x1a, 0x52, 0x0a, 0x73, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x78, 0x88, - 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x78, 0x18, - 0x1c, 0x20, 0x01, 0x28, 0x04, 0x48, 0x1b, 0x52, 0x08, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x54, - 0x78, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x72, - 0x78, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x04, 0x48, 0x1c, 0x52, 0x08, 0x62, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x1c, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, - 0x65, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x5f, 0x74, 0x78, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x04, 0x48, 0x1d, 0x52, 0x19, - 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x14, - 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x04, 0x48, 0x1e, 0x52, 0x13, 0x70, 0x61, - 0x74, 0x68, 0x52, 0x65, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x1e, 0x0a, - 0x1c, 0x5f, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, - 0x70, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x64, 0x42, 0x16, 0x0a, - 0x14, 0x5f, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, - 0x70, 0x73, 0x5f, 0x75, 0x70, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, - 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x5f, 0x75, 0x70, 0x42, 0x11, 0x0a, 0x0f, - 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, - 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0b, 0x0a, 0x09, - 0x5f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, - 0x73, 0x76, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x76, 0x73, - 0x5f, 0x72, 0x78, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x61, - 0x72, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, - 0x65, 0x61, 0x72, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x73, 0x76, - 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, - 0x73, 0x76, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x11, 0x0a, 0x0f, 0x5f, - 0x70, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x11, - 0x0a, 0x0f, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x72, - 0x78, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x73, 0x5f, 0x74, 0x78, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x72, 0x65, 0x73, 0x76, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x78, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x72, 0x65, 0x73, - 0x76, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x72, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x68, 0x65, - 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x68, 0x65, 0x6c, 0x6c, - 0x6f, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x74, - 0x78, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0b, 0x0a, - 0x09, 0x5f, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6e, - 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x72, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x78, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x72, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x62, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x5f, 0x74, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, - 0x5f, 0x72, 0x78, 0x42, 0x1f, 0x0a, 0x1d, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x65, - 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x74, 0x78, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xea, 0x04, - 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x3b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x0e, - 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4e, 0x65, 0x69, 0x67, 0x68, - 0x62, 0x6f, 0x72, 0x73, 0x76, 0x34, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, - 0x72, 0x73, 0x12, 0x44, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, - 0x62, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x76, 0x36, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x4e, - 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x62, 0x67, 0x70, 0x5f, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0b, 0x62, 0x67, 0x70, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x69, 0x73, 0x69, 0x73, 0x5f, - 0x6c, 0x73, 0x70, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x49, 0x73, 0x69, 0x73, 0x4c, 0x73, 0x70, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x69, 0x73, 0x69, 0x73, 0x4c, 0x73, 0x70, 0x73, 0x12, - 0x45, 0x0a, 0x0e, 0x6c, 0x6c, 0x64, 0x70, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, - 0x64, 0x70, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x6c, 0x6c, 0x64, 0x70, 0x4e, 0x65, 0x69, - 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x6c, - 0x73, 0x70, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x72, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x73, 0x1a, 0x8e, - 0x01, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x65, 0x69, 0x67, - 0x68, 0x62, 0x6f, 0x72, 0x73, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x36, 0x5f, - 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x62, - 0x67, 0x70, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, - 0x09, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, - 0x6c, 0x6c, 0x64, 0x70, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x10, 0x05, - 0x12, 0x0d, 0x0a, 0x09, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x10, 0x06, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xc2, 0x04, 0x0a, 0x0e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x0e, 0x69, - 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, - 0x6f, 0x72, 0x73, 0x76, 0x34, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x34, - 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x0e, 0x69, 0x70, 0x76, - 0x36, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, - 0x73, 0x76, 0x36, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x4e, 0x65, - 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x12, 0x38, 0x0a, 0x0c, 0x62, 0x67, 0x70, 0x5f, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x62, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, - 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x4c, - 0x73, 0x70, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x69, 0x73, 0x69, 0x73, 0x4c, 0x73, - 0x70, 0x73, 0x12, 0x3e, 0x0a, 0x0e, 0x6c, 0x6c, 0x64, 0x70, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, - 0x62, 0x6f, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x0d, 0x6c, 0x6c, 0x64, 0x70, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, - 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, - 0x4c, 0x73, 0x70, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x72, 0x73, 0x76, 0x70, 0x4c, - 0x73, 0x70, 0x73, 0x1a, 0x8e, 0x01, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x83, - 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x34, - 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, - 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x10, 0x02, - 0x12, 0x10, 0x0a, 0x0c, 0x62, 0x67, 0x70, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, - 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x10, - 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x6c, 0x6c, 0x64, 0x70, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, - 0x6f, 0x72, 0x73, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x6c, 0x73, - 0x70, 0x73, 0x10, 0x06, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x41, 0x0a, 0x18, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x76, 0x34, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x10, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, - 0x76, 0x34, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x0c, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x69, 0x6e, - 0x6b, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x10, 0x6c, 0x69, 0x6e, 0x6b, 0x4c, 0x61, 0x79, - 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, - 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0f, - 0x0a, 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, - 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x41, 0x0a, 0x18, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, - 0x6f, 0x72, 0x73, 0x76, 0x36, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x10, 0x4e, 0x65, - 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x76, 0x36, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, - 0x0a, 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x36, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x0b, 0x69, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, - 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x10, - 0x6c, 0x69, 0x6e, 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x87, 0x03, - 0x0a, 0x15, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x67, 0x70, 0x5f, 0x70, - 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0c, 0x62, 0x67, 0x70, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x54, 0x0a, - 0x0e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x14, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, - 0x61, 0x73, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x49, 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x52, 0x12, 0x69, 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x14, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, - 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x12, 0x69, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, - 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x4c, 0x0a, 0x0d, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3b, 0x0a, 0x04, 0x45, 0x6e, + 0x6d, 0x65, 0x73, 0x1a, 0x92, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, + 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, + 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x66, + 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x78, 0x10, 0x03, + 0x12, 0x12, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x61, + 0x72, 0x64, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x6c, 0x76, 0x73, 0x5f, 0x64, 0x69, 0x73, + 0x63, 0x61, 0x72, 0x64, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x6c, 0x76, 0x73, 0x5f, 0x75, + 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x06, 0x22, 0x80, 0x03, 0x0a, 0x0a, 0x4c, 0x6c, 0x64, + 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x78, 0x88, + 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x74, 0x78, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x54, + 0x78, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, + 0x0d, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x78, 0x88, 0x01, + 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x63, + 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0d, 0x66, 0x72, 0x61, + 0x6d, 0x65, 0x73, 0x44, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, + 0x0c, 0x74, 0x6c, 0x76, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x0b, 0x74, 0x6c, 0x76, 0x73, 0x44, 0x69, 0x73, 0x63, 0x61, + 0x72, 0x64, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x74, 0x6c, 0x76, 0x73, 0x5f, 0x75, 0x6e, + 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x0b, 0x74, + 0x6c, 0x76, 0x73, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, + 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, + 0x74, 0x78, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x78, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, + 0x73, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, 0x6c, + 0x76, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, + 0x6c, 0x76, 0x73, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x22, 0xdc, 0x05, 0x0a, 0x12, + 0x52, 0x73, 0x76, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x1a, 0xd5, 0x04, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x22, 0xc5, 0x04, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, + 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, 0x17, 0x0a, + 0x13, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, 0x70, + 0x73, 0x5f, 0x75, 0x70, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x5f, 0x75, 0x70, 0x10, 0x03, 0x12, 0x12, + 0x0a, 0x0e, 0x6c, 0x73, 0x70, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x68, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x05, + 0x12, 0x0c, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x68, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x06, 0x12, 0x0c, + 0x0a, 0x08, 0x72, 0x65, 0x73, 0x76, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, + 0x72, 0x65, 0x73, 0x76, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x70, 0x61, + 0x74, 0x68, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x09, 0x12, 0x11, 0x0a, + 0x0d, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x0a, + 0x12, 0x11, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x74, + 0x78, 0x10, 0x0b, 0x12, 0x11, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x74, 0x65, 0x61, 0x72, + 0x73, 0x5f, 0x72, 0x78, 0x10, 0x0c, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x0d, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x61, + 0x74, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x0e, 0x12, 0x12, + 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x74, 0x78, + 0x10, 0x0f, 0x12, 0x12, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x73, 0x5f, 0x72, 0x78, 0x10, 0x10, 0x12, 0x10, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x78, 0x10, 0x11, 0x12, 0x10, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x76, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x72, 0x78, 0x10, 0x12, 0x12, 0x0d, 0x0a, 0x09, 0x68, 0x65, + 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x13, 0x12, 0x0d, 0x0a, 0x09, 0x68, 0x65, 0x6c, + 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x14, 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x63, 0x6b, 0x73, + 0x5f, 0x74, 0x78, 0x10, 0x15, 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x78, + 0x10, 0x16, 0x12, 0x0c, 0x0a, 0x08, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x74, 0x78, 0x10, 0x17, + 0x12, 0x0c, 0x0a, 0x08, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x78, 0x10, 0x18, 0x12, 0x0f, + 0x0a, 0x0b, 0x73, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x78, 0x10, 0x19, 0x12, + 0x0f, 0x0a, 0x0b, 0x73, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x78, 0x10, 0x1a, + 0x12, 0x0d, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x78, 0x10, 0x1b, 0x12, + 0x0d, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x72, 0x78, 0x10, 0x1c, 0x12, 0x20, + 0x0a, 0x1c, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x78, 0x10, 0x1d, + 0x12, 0x18, 0x0a, 0x14, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x10, 0x1e, 0x22, 0xff, 0x0d, 0x0a, 0x0a, 0x52, + 0x73, 0x76, 0x70, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x32, + 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x18, 0x69, 0x6e, 0x67, 0x72, 0x65, + 0x73, 0x73, 0x50, 0x32, 0x70, 0x4c, 0x73, 0x70, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x13, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x5f, 0x75, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x10, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x50, 0x32, + 0x70, 0x4c, 0x73, 0x70, 0x73, 0x55, 0x70, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x12, 0x65, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x5f, 0x75, 0x70, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x0f, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x50, 0x32, 0x70, 0x4c, 0x73, 0x70, 0x73, 0x55, 0x70, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, + 0x6c, 0x73, 0x70, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0c, 0x6c, 0x73, 0x70, 0x46, 0x6c, 0x61, 0x70, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x68, 0x73, + 0x5f, 0x74, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x07, 0x70, 0x61, 0x74, + 0x68, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x68, 0x73, + 0x5f, 0x72, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x07, 0x70, 0x61, 0x74, + 0x68, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x76, 0x73, + 0x5f, 0x74, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x07, 0x72, 0x65, 0x73, + 0x76, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x76, 0x73, + 0x5f, 0x72, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, 0x08, 0x52, 0x07, 0x72, 0x65, 0x73, + 0x76, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x5f, + 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x09, + 0x52, 0x0b, 0x70, 0x61, 0x74, 0x68, 0x54, 0x65, 0x61, 0x72, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, + 0x12, 0x27, 0x0a, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x72, + 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0a, 0x52, 0x0b, 0x70, 0x61, 0x74, 0x68, 0x54, + 0x65, 0x61, 0x72, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x72, 0x65, 0x73, + 0x76, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x74, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x0b, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x76, 0x54, 0x65, 0x61, 0x72, 0x73, 0x54, 0x78, 0x88, + 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, + 0x5f, 0x72, 0x78, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0c, 0x52, 0x0b, 0x72, 0x65, 0x73, + 0x76, 0x54, 0x65, 0x61, 0x72, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x70, + 0x61, 0x74, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x74, 0x78, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x04, 0x48, 0x0d, 0x52, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x78, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0e, + 0x52, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x52, 0x78, 0x88, 0x01, + 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x5f, 0x74, 0x78, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0f, 0x52, 0x0c, 0x72, 0x65, 0x73, + 0x76, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, + 0x72, 0x65, 0x73, 0x76, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x78, 0x18, 0x11, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x10, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x76, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x76, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x78, 0x18, 0x12, 0x20, 0x01, 0x28, 0x04, 0x48, 0x11, 0x52, + 0x0a, 0x72, 0x65, 0x73, 0x76, 0x43, 0x6f, 0x6e, 0x66, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x25, + 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x72, 0x78, 0x18, 0x13, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x12, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x76, 0x43, 0x6f, 0x6e, 0x66, + 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, + 0x74, 0x78, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x48, 0x13, 0x52, 0x08, 0x68, 0x65, 0x6c, 0x6c, + 0x6f, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x68, 0x65, 0x6c, 0x6c, 0x6f, + 0x73, 0x5f, 0x72, 0x78, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, 0x48, 0x14, 0x52, 0x08, 0x68, 0x65, + 0x6c, 0x6c, 0x6f, 0x73, 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x61, 0x63, 0x6b, + 0x73, 0x5f, 0x74, 0x78, 0x18, 0x16, 0x20, 0x01, 0x28, 0x04, 0x48, 0x15, 0x52, 0x06, 0x61, 0x63, + 0x6b, 0x73, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x61, 0x63, 0x6b, 0x73, 0x5f, + 0x72, 0x78, 0x18, 0x17, 0x20, 0x01, 0x28, 0x04, 0x48, 0x16, 0x52, 0x06, 0x61, 0x63, 0x6b, 0x73, + 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x74, + 0x78, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x48, 0x17, 0x52, 0x07, 0x6e, 0x61, 0x63, 0x6b, 0x73, + 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x72, + 0x78, 0x18, 0x19, 0x20, 0x01, 0x28, 0x04, 0x48, 0x18, 0x52, 0x07, 0x6e, 0x61, 0x63, 0x6b, 0x73, + 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x5f, 0x74, 0x78, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x19, 0x52, 0x0a, 0x73, 0x72, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x73, + 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x78, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x1a, 0x52, 0x0a, 0x73, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x78, 0x88, 0x01, + 0x01, 0x12, 0x20, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x78, 0x18, 0x1c, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x1b, 0x52, 0x08, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x78, + 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x72, 0x78, + 0x18, 0x1d, 0x20, 0x01, 0x28, 0x04, 0x48, 0x1c, 0x52, 0x08, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x52, 0x78, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x1c, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, + 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x74, 0x78, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x04, 0x48, 0x1d, 0x52, 0x19, 0x70, + 0x61, 0x74, 0x68, 0x52, 0x65, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x78, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x14, 0x70, + 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x04, 0x48, 0x1e, 0x52, 0x13, 0x70, 0x61, 0x74, + 0x68, 0x52, 0x65, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x1e, 0x0a, 0x1c, + 0x5f, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, 0x70, + 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x64, 0x42, 0x16, 0x0a, 0x14, + 0x5f, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, 0x70, + 0x73, 0x5f, 0x75, 0x70, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, + 0x70, 0x32, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x5f, 0x75, 0x70, 0x42, 0x11, 0x0a, 0x0f, 0x5f, + 0x6c, 0x73, 0x70, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0b, + 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, + 0x76, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x76, 0x73, 0x5f, + 0x72, 0x78, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x61, 0x72, + 0x73, 0x5f, 0x74, 0x78, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, + 0x61, 0x72, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x73, 0x76, 0x5f, + 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x73, + 0x76, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, + 0x61, 0x74, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x11, 0x0a, + 0x0f, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x78, + 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x5f, 0x74, 0x78, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x72, 0x65, 0x73, 0x76, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x78, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x72, 0x65, 0x73, 0x76, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x72, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x68, 0x65, 0x6c, + 0x6c, 0x6f, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, + 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x74, 0x78, + 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0b, 0x0a, 0x09, + 0x5f, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x74, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6e, 0x61, + 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x78, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x72, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x5f, 0x74, 0x78, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x72, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x5f, 0x72, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, + 0x65, 0x5f, 0x74, 0x78, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, + 0x72, 0x78, 0x42, 0x1f, 0x0a, 0x1d, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x65, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x74, 0x78, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc7, 0x02, 0x0a, + 0x1a, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x53, + 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, + 0x34, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x1a, 0xb0, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x12, 0x0a, + 0x0e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, + 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x63, 0x6b, + 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, + 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x05, + 0x12, 0x11, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, + 0x74, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x5f, + 0x73, 0x65, 0x6e, 0x74, 0x10, 0x07, 0x22, 0xe6, 0x03, 0x0a, 0x12, 0x44, 0x68, 0x63, 0x70, 0x76, + 0x34, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, + 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x0e, 0x6f, + 0x66, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, + 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x61, 0x63, + 0x6b, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x04, 0x52, 0x0c, 0x61, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x0d, + 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, + 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x64, 0x65, + 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x07, 0x52, 0x0c, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x53, 0x65, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x11, 0x0a, + 0x0f, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, + 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x61, 0x63, 0x6b, 0x73, 0x5f, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6e, 0x61, 0x63, + 0x6b, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x5f, + 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x10, 0x0a, + 0x0e, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x22, + 0xcb, 0x02, 0x0a, 0x1a, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, + 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x12, 0x53, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, + 0x63, 0x70, 0x76, 0x34, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0xb4, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xa4, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x16, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x6f, 0x66, 0x66, 0x65, + 0x72, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x03, + 0x12, 0x0d, 0x0a, 0x09, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, + 0x0e, 0x0a, 0x0a, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x12, + 0x15, 0x0a, 0x11, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, + 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x07, 0x22, 0xf2, 0x03, + 0x0a, 0x12, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, + 0x12, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x11, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, + 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x0a, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x73, + 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x48, 0x03, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x63, 0x6b, + 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x08, + 0x61, 0x63, 0x6b, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x6e, + 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x05, 0x52, 0x09, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x30, 0x0a, 0x11, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x10, 0x72, 0x65, + 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, + 0x01, 0x12, 0x30, 0x0a, 0x11, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x5f, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x10, + 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x15, 0x0a, 0x13, + 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x73, 0x5f, 0x73, + 0x65, 0x6e, 0x74, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x63, + 0x6b, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6e, 0x61, 0x63, 0x6b, + 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x14, 0x0a, 0x12, + 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x22, 0xfa, 0x03, 0x0a, 0x1a, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x12, 0x53, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x63, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0xe3, 0x02, 0x0a, 0x0b, 0x43, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xd3, 0x02, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, - 0x61, 0x73, 0x74, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, - 0x69, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x22, 0xba, 0x02, 0x0a, 0x1a, 0x42, 0x67, 0x70, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0c, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x48, - 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, - 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, - 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x06, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x68, - 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x70, 0x61, 0x74, - 0x68, 0x49, 0x64, 0x88, 0x01, 0x01, 0x1a, 0x43, 0x0a, 0x06, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x22, 0x39, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x69, 0x67, 0x70, - 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x67, 0x70, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x69, - 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x03, 0x42, 0x10, 0x0a, 0x0e, 0x5f, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x61, 0x74, - 0x68, 0x5f, 0x69, 0x64, 0x22, 0xba, 0x02, 0x0a, 0x1a, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x49, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, - 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x06, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x36, 0x55, - 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, - 0x88, 0x01, 0x01, 0x1a, 0x43, 0x0a, 0x06, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, 0x39, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x69, 0x67, 0x70, 0x10, 0x01, 0x12, - 0x07, 0x0a, 0x03, 0x65, 0x67, 0x70, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x69, 0x6e, 0x63, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x03, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, - 0x64, 0x22, 0xf5, 0x01, 0x0a, 0x10, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, - 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, 0x0a, 0x0d, 0x62, 0x67, 0x70, 0x5f, 0x70, 0x65, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x0b, 0x62, 0x67, 0x70, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x52, 0x0a, 0x15, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, - 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x13, - 0x69, 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x15, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, - 0x61, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x49, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x13, 0x69, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x62, 0x67, 0x70, 0x5f, - 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xd4, 0x05, 0x0a, 0x19, 0x42, 0x67, - 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, - 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x64, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x73, 0x5f, + 0x73, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x10, 0x03, 0x12, + 0x11, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, + 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x65, + 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x06, 0x12, 0x1d, 0x0a, 0x19, + 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x07, 0x12, 0x0f, 0x0a, 0x0b, 0x72, + 0x65, 0x6e, 0x65, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, + 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x09, 0x12, 0x11, + 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, + 0x0a, 0x12, 0x19, 0x0a, 0x15, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, + 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0b, 0x12, 0x1e, 0x0a, 0x1a, + 0x72, 0x61, 0x70, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0c, 0x12, 0x21, 0x0a, 0x1d, + 0x72, 0x61, 0x70, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0d, 0x22, + 0x8c, 0x08, 0x0a, 0x12, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0c, 0x73, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x74, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x17, 0x61, 0x64, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x16, 0x61, 0x64, + 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x16, 0x61, 0x64, 0x76, 0x65, 0x72, + 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x15, 0x61, 0x64, 0x76, 0x65, 0x72, + 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, + 0x73, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0c, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, + 0x0e, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x0d, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x19, 0x69, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x17, + 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, + 0x6e, 0x65, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x08, 0x52, 0x0a, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x26, 0x0a, 0x0c, 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, + 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x65, + 0x61, 0x73, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x0a, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x38, 0x0a, 0x15, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x0b, 0x52, 0x14, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, + 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x1a, + 0x72, 0x61, 0x70, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x0c, 0x52, 0x17, 0x72, 0x61, 0x70, 0x69, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, + 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x46, + 0x0a, 0x1d, 0x72, 0x61, 0x70, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x72, + 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0d, 0x52, 0x1a, 0x72, 0x61, 0x70, 0x69, 0x64, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, + 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, + 0x74, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x19, 0x0a, + 0x17, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6e, + 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x13, 0x0a, + 0x11, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x42, 0x1c, 0x0a, 0x1a, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, + 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, + 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x6e, + 0x74, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x5f, 0x73, + 0x65, 0x6e, 0x74, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x1d, 0x0a, + 0x1b, 0x5f, 0x72, 0x61, 0x70, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x73, + 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x20, 0x0a, 0x1e, + 0x5f, 0x72, 0x61, 0x70, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x72, 0x65, + 0x70, 0x6c, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x22, 0x9e, + 0x04, 0x0a, 0x1a, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x53, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, + 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x87, 0x03, 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xf7, 0x02, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x15, 0x0a, 0x11, 0x73, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x73, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x74, 0x73, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, + 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x73, + 0x65, 0x6e, 0x74, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, + 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x61, 0x6c, 0x73, 0x5f, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, 0x72, 0x65, + 0x62, 0x69, 0x6e, 0x64, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x08, + 0x12, 0x10, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, + 0x10, 0x09, 0x12, 0x15, 0x0a, 0x11, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x5f, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0a, 0x12, 0x15, 0x0a, 0x11, 0x64, 0x65, 0x63, + 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0b, + 0x12, 0x21, 0x0a, 0x1d, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x10, 0x0c, 0x12, 0x1b, 0x0a, 0x17, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x66, 0x6f, 0x72, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0d, + 0x12, 0x16, 0x0a, 0x12, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x65, + 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0e, 0x12, 0x15, 0x0a, 0x11, 0x72, 0x65, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0f, 0x22, + 0x80, 0x09, 0x0a, 0x12, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x30, 0x0a, 0x11, 0x73, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x10, 0x73, 0x6f, + 0x6c, 0x69, 0x63, 0x69, 0x74, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, + 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x73, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x73, 0x5f, 0x69, 0x67, + 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x0f, 0x73, + 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x73, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x88, 0x01, + 0x01, 0x12, 0x34, 0x0a, 0x13, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, + 0x52, 0x12, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x48, 0x04, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x6e, 0x61, 0x63, + 0x6b, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, + 0x09, 0x6e, 0x61, 0x63, 0x6b, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, + 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x30, 0x0a, 0x11, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x61, 0x6c, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x10, 0x72, 0x65, + 0x6e, 0x65, 0x77, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, + 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x73, 0x5f, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, 0x08, 0x52, 0x0f, 0x72, + 0x65, 0x62, 0x69, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, + 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, + 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, + 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x72, 0x65, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x0a, 0x52, 0x10, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x64, + 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0b, 0x52, 0x10, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, + 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, + 0x1d, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x0c, 0x52, 0x1b, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, + 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0d, 0x52, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x79, + 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x0e, 0x52, 0x10, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x53, + 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x0f, 0x52, 0x10, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, + 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x73, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x73, 0x5f, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, 0x6f, 0x6c, 0x69, + 0x63, 0x69, 0x74, 0x73, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x42, 0x16, 0x0a, 0x14, + 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, + 0x73, 0x65, 0x6e, 0x74, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6e, + 0x61, 0x63, 0x6b, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, + 0x14, 0x0a, 0x12, 0x5f, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x61, 0x6c, 0x73, 0x5f, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, + 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x72, + 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x14, 0x0a, 0x12, 0x5f, + 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x5f, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x20, 0x0a, 0x1e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x72, 0x65, + 0x6c, 0x61, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, + 0x72, 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x14, 0x0a, 0x12, + 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x73, 0x65, + 0x6e, 0x74, 0x22, 0xff, 0x06, 0x0a, 0x14, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4d, + 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, + 0x32, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0xf4, 0x05, + 0x0a, 0x0b, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xe4, 0x05, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x66, 0x75, 0x6c, 0x6c, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x14, 0x0a, + 0x10, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, + 0x66, 0x6c, 0x61, 0x70, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, + 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, + 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, + 0x64, 0x62, 0x64, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x64, 0x62, + 0x64, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, + 0x6c, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, + 0x08, 0x12, 0x17, 0x0a, 0x13, 0x6c, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x6c, 0x73, + 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0a, 0x12, 0x16, + 0x0a, 0x12, 0x6c, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x10, 0x0b, 0x12, 0x0f, 0x0a, 0x0b, 0x6c, 0x73, 0x5f, 0x61, 0x63, 0x6b, + 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x6c, 0x73, 0x5f, 0x61, 0x63, + 0x6b, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0d, 0x12, 0x0c, 0x0a, 0x08, + 0x6c, 0x73, 0x61, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x0e, 0x12, 0x10, 0x0a, 0x0c, 0x6c, 0x73, + 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x0f, 0x12, 0x10, 0x0a, 0x0c, + 0x6c, 0x73, 0x61, 0x5f, 0x61, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x10, 0x12, 0x14, + 0x0a, 0x10, 0x6c, 0x73, 0x61, 0x5f, 0x61, 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x10, 0x11, 0x12, 0x13, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6c, + 0x73, 0x61, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x12, 0x12, 0x17, 0x0a, 0x13, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x10, 0x13, 0x12, 0x14, 0x0a, 0x10, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6c, 0x73, + 0x61, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x14, 0x12, 0x18, 0x0a, 0x14, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x10, 0x15, 0x12, 0x14, 0x0a, 0x10, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6c, 0x73, + 0x61, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x16, 0x12, 0x18, 0x0a, 0x14, 0x73, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x10, 0x17, 0x12, 0x15, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, + 0x73, 0x61, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x18, 0x12, 0x19, 0x0a, 0x15, 0x65, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x10, 0x19, 0x12, 0x11, 0x0a, 0x0d, 0x6e, 0x73, 0x73, 0x61, 0x5f, 0x6c, 0x73, 0x61, + 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x1a, 0x12, 0x15, 0x0a, 0x11, 0x6e, 0x73, 0x73, 0x61, 0x5f, + 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x1b, 0x12, 0x15, + 0x0a, 0x11, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, + 0x65, 0x6e, 0x74, 0x10, 0x1c, 0x12, 0x19, 0x0a, 0x15, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x1d, + 0x12, 0x14, 0x0a, 0x10, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x5f, + 0x73, 0x65, 0x6e, 0x74, 0x10, 0x1e, 0x12, 0x18, 0x0a, 0x14, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, + 0x5f, 0x61, 0x72, 0x65, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0x1f, + 0x12, 0x16, 0x0a, 0x12, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, + 0x6e, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x20, 0x12, 0x1a, 0x0a, 0x16, 0x6f, 0x70, 0x61, 0x71, + 0x75, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x10, 0x21, 0x22, 0xe0, 0x11, 0x0a, 0x0c, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2d, + 0x0a, 0x10, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0e, 0x66, 0x75, 0x6c, 0x6c, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, + 0x10, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x0e, 0x64, 0x6f, 0x77, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x46, + 0x6c, 0x61, 0x70, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, + 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0a, 0x68, + 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, + 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x0e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x73, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x64, 0x62, + 0x64, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x07, + 0x64, 0x62, 0x64, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x62, + 0x64, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x07, 0x52, 0x0b, 0x64, 0x62, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, 0x08, 0x52, 0x0d, 0x6c, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x33, 0x0a, 0x13, 0x6c, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x09, 0x52, 0x11, + 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x0e, 0x6c, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0a, 0x52, 0x0c, + 0x6c, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x31, 0x0a, 0x12, 0x6c, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0b, 0x52, 0x10, 0x6c, + 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0b, 0x6c, 0x73, 0x5f, 0x61, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x6e, + 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0c, 0x52, 0x09, 0x6c, 0x73, 0x41, 0x63, 0x6b, + 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x6c, 0x73, 0x5f, 0x61, 0x63, + 0x6b, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x0d, 0x52, 0x0d, 0x6c, 0x73, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6c, 0x73, 0x61, 0x5f, 0x73, 0x65, 0x6e, 0x74, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0e, 0x52, 0x07, 0x6c, 0x73, 0x61, 0x53, 0x65, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x48, 0x0f, 0x52, 0x0b, 0x6c, 0x73, + 0x61, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0c, + 0x6c, 0x73, 0x61, 0x5f, 0x61, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x04, 0x48, 0x10, 0x52, 0x0a, 0x6c, 0x73, 0x61, 0x41, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x6c, 0x73, 0x61, 0x5f, 0x61, 0x63, 0x6b, 0x5f, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x04, 0x48, 0x11, 0x52, + 0x0e, 0x6c, 0x73, 0x61, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x73, 0x61, + 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x48, 0x12, 0x52, 0x0d, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x73, 0x61, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x33, 0x0a, 0x13, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x48, 0x13, 0x52, 0x11, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x73, 0x61, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, + 0x6c, 0x73, 0x61, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, 0x48, 0x14, + 0x52, 0x0e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x73, 0x61, 0x53, 0x65, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x14, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6c, + 0x73, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x15, 0x52, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x73, 0x61, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x73, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x17, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x16, 0x52, 0x0e, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x4c, + 0x73, 0x61, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x14, 0x73, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x48, 0x17, 0x52, 0x12, 0x73, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x4c, 0x73, 0x61, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, + 0x12, 0x2f, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x73, 0x61, + 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x04, 0x48, 0x18, 0x52, 0x0f, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x73, 0x61, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x37, 0x0a, 0x15, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x73, + 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x19, 0x52, 0x13, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x73, 0x61, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x6e, 0x73, + 0x73, 0x61, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x1b, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x1a, 0x52, 0x0b, 0x6e, 0x73, 0x73, 0x61, 0x4c, 0x73, 0x61, 0x53, 0x65, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x6e, 0x73, 0x73, 0x61, 0x5f, 0x6c, 0x73, 0x61, 0x5f, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x04, 0x48, 0x1b, + 0x52, 0x0f, 0x6e, 0x73, 0x73, 0x61, 0x4c, 0x73, 0x61, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x1c, 0x52, 0x0f, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x53, 0x65, + 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x15, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x1e, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x1d, 0x52, 0x13, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x4c, 0x6f, + 0x63, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2d, + 0x0a, 0x10, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x5f, 0x73, 0x65, + 0x6e, 0x74, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x04, 0x48, 0x1e, 0x52, 0x0e, 0x6f, 0x70, 0x61, 0x71, + 0x75, 0x65, 0x41, 0x72, 0x65, 0x61, 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, + 0x14, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x5f, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x20, 0x20, 0x01, 0x28, 0x04, 0x48, 0x1f, 0x52, 0x12, 0x6f, + 0x70, 0x61, 0x71, 0x75, 0x65, 0x41, 0x72, 0x65, 0x61, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x64, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x20, 0x52, 0x10, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x53, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x16, 0x6f, 0x70, 0x61, 0x71, 0x75, + 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x18, 0x22, 0x20, 0x01, 0x28, 0x04, 0x48, 0x21, 0x52, 0x14, 0x6f, 0x70, 0x61, 0x71, 0x75, + 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, + 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, + 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x68, 0x65, 0x6c, 0x6c, + 0x6f, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x68, 0x65, 0x6c, 0x6c, + 0x6f, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x64, 0x62, 0x64, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x64, 0x62, 0x64, + 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6c, 0x73, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x16, 0x0a, + 0x14, 0x5f, 0x6c, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6c, 0x73, 0x5f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x73, 0x5f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, + 0x0e, 0x0a, 0x0c, 0x5f, 0x6c, 0x73, 0x5f, 0x61, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, + 0x12, 0x0a, 0x10, 0x5f, 0x6c, 0x73, 0x5f, 0x61, 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x73, 0x65, 0x6e, 0x74, + 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x61, 0x63, 0x6b, 0x5f, 0x73, 0x65, + 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x61, 0x63, 0x6b, 0x5f, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x16, 0x0a, 0x14, 0x5f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, + 0x6c, 0x73, 0x61, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6c, 0x73, + 0x61, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, + 0x14, 0x0a, 0x12, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x73, 0x61, + 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, + 0x10, 0x0a, 0x0e, 0x5f, 0x6e, 0x73, 0x73, 0x61, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x73, 0x65, 0x6e, + 0x74, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6e, 0x73, 0x73, 0x61, 0x5f, 0x6c, 0x73, 0x61, 0x5f, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6f, 0x70, 0x61, 0x71, + 0x75, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x18, 0x0a, + 0x16, 0x5f, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6f, 0x70, 0x61, 0x71, + 0x75, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x17, 0x0a, 0x15, + 0x5f, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x5f, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, + 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x19, 0x0a, 0x17, + 0x5f, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x22, 0xb1, 0x08, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, + 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x76, 0x34, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x69, + 0x70, 0x76, 0x34, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x12, 0x44, 0x0a, 0x0e, + 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4e, 0x65, 0x69, 0x67, 0x68, + 0x62, 0x6f, 0x72, 0x73, 0x76, 0x36, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, + 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x62, 0x67, 0x70, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x52, 0x0b, 0x62, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, + 0x73, 0x12, 0x36, 0x0a, 0x09, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, 0x4c, + 0x73, 0x70, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, + 0x08, 0x69, 0x73, 0x69, 0x73, 0x4c, 0x73, 0x70, 0x73, 0x12, 0x45, 0x0a, 0x0e, 0x6c, 0x6c, 0x64, + 0x70, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x4e, 0x65, 0x69, 0x67, + 0x68, 0x62, 0x6f, 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x52, 0x0d, 0x6c, 0x6c, 0x64, 0x70, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, + 0x12, 0x36, 0x0a, 0x09, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, + 0x70, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, + 0x72, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x73, 0x12, 0x4d, 0x0a, 0x11, 0x64, 0x68, 0x63, 0x70, + 0x76, 0x34, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x10, 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0d, 0x64, 0x68, 0x63, 0x70, 0x76, + 0x34, 0x5f, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, 0x4c, 0x65, 0x61, 0x73, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, 0x64, 0x68, + 0x63, 0x70, 0x76, 0x34, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x11, 0x64, 0x68, + 0x63, 0x70, 0x76, 0x36, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, + 0x76, 0x36, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x10, 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0d, 0x64, 0x68, 0x63, + 0x70, 0x76, 0x36, 0x5f, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x4c, 0x65, 0x61, + 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, + 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0b, + 0x6f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x5f, 0x6c, 0x73, 0x61, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4c, 0x73, + 0x61, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, + 0x6f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4c, 0x73, 0x61, 0x73, 0x1a, 0xf3, 0x01, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xe8, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x12, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, + 0x73, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x65, 0x69, 0x67, + 0x68, 0x62, 0x6f, 0x72, 0x73, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x62, 0x67, 0x70, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x73, 0x69, + 0x73, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x6c, 0x6c, 0x64, 0x70, + 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, + 0x72, 0x73, 0x76, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x64, + 0x68, 0x63, 0x70, 0x76, 0x34, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, + 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x5f, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x73, 0x10, 0x08, 0x12, 0x15, 0x0a, 0x11, 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, + 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, 0x5f, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x10, 0x0a, 0x12, + 0x0f, 0x0a, 0x0b, 0x6f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x5f, 0x6c, 0x73, 0x61, 0x73, 0x10, 0x0b, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xe7, 0x07, 0x0a, 0x0e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, + 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x0e, + 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4e, 0x65, 0x69, 0x67, 0x68, + 0x62, 0x6f, 0x72, 0x73, 0x76, 0x34, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x69, 0x70, 0x76, + 0x34, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x0e, 0x69, 0x70, + 0x76, 0x36, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, + 0x72, 0x73, 0x76, 0x36, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x4e, + 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x12, 0x38, 0x0a, 0x0c, 0x62, 0x67, 0x70, 0x5f, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x62, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x49, 0x73, 0x69, 0x73, + 0x4c, 0x73, 0x70, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x69, 0x73, 0x69, 0x73, 0x4c, + 0x73, 0x70, 0x73, 0x12, 0x3e, 0x0a, 0x0e, 0x6c, 0x6c, 0x64, 0x70, 0x5f, 0x6e, 0x65, 0x69, 0x67, + 0x68, 0x62, 0x6f, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x6c, 0x6c, 0x64, 0x70, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, + 0x6f, 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x6c, 0x73, 0x70, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, + 0x70, 0x4c, 0x73, 0x70, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x72, 0x73, 0x76, 0x70, + 0x4c, 0x73, 0x70, 0x73, 0x12, 0x46, 0x0a, 0x11, 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x10, 0x64, 0x68, 0x63, 0x70, + 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0d, + 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x5f, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, + 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x64, 0x68, 0x63, + 0x70, 0x76, 0x34, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x11, 0x64, 0x68, 0x63, + 0x70, 0x76, 0x36, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x0a, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, + 0x36, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x10, 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x73, 0x12, 0x3b, 0x0a, 0x0d, 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, 0x5f, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, + 0x68, 0x63, 0x70, 0x76, 0x36, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x0c, 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x12, 0x34, + 0x0a, 0x0b, 0x6f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x5f, 0x6c, 0x73, 0x61, 0x73, 0x18, 0x0c, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, + 0x4c, 0x73, 0x61, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x6f, 0x73, 0x70, 0x66, 0x76, 0x32, + 0x4c, 0x73, 0x61, 0x73, 0x1a, 0xf3, 0x01, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0xe8, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x69, 0x70, 0x76, + 0x34, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x10, 0x01, 0x12, 0x12, 0x0a, + 0x0e, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x10, + 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x62, 0x67, 0x70, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, + 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x73, 0x69, 0x73, 0x5f, 0x6c, 0x73, 0x70, 0x73, + 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x6c, 0x6c, 0x64, 0x70, 0x5f, 0x6e, 0x65, 0x69, 0x67, 0x68, + 0x62, 0x6f, 0x72, 0x73, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x6c, + 0x73, 0x70, 0x73, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, + 0x64, 0x68, 0x63, 0x70, 0x76, 0x34, 0x5f, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x10, 0x08, 0x12, + 0x15, 0x0a, 0x11, 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x73, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x64, 0x68, 0x63, 0x70, 0x76, 0x36, + 0x5f, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x10, 0x0a, 0x12, 0x0f, 0x0a, 0x0b, 0x6f, 0x73, 0x70, + 0x66, 0x76, 0x32, 0x5f, 0x6c, 0x73, 0x61, 0x73, 0x10, 0x0b, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x41, 0x0a, 0x18, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, + 0x72, 0x73, 0x76, 0x34, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x10, 0x4e, 0x65, 0x69, + 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x76, 0x34, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, + 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, - 0x28, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, 0x06, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, - 0x63, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x88, - 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, 0x88, 0x01, 0x01, - 0x12, 0x27, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, - 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x4e, - 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x69, 0x70, 0x76, - 0x36, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x05, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x36, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, - 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2d, 0x0a, - 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x67, 0x70, 0x41, 0x73, - 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x10, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x06, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x50, - 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x18, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x72, - 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x07, - 0x52, 0x16, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x45, 0x78, 0x69, 0x74, 0x44, 0x69, 0x73, 0x63, 0x72, - 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x1a, 0x43, 0x0a, 0x06, 0x4f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, 0x39, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, - 0x0a, 0x03, 0x69, 0x67, 0x70, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x67, 0x70, 0x10, 0x02, - 0x12, 0x0e, 0x0a, 0x0a, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x03, - 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, + 0x31, 0x0a, 0x12, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x10, 0x6c, + 0x69, 0x6e, 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, + 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x41, 0x0a, 0x18, + 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x76, 0x36, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, + 0xd1, 0x01, 0x0a, 0x10, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x76, 0x36, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, + 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x02, 0x52, 0x10, 0x6c, 0x69, 0x6e, 0x6b, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, + 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x15, 0x0a, 0x13, + 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0x87, 0x03, 0x0a, 0x15, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, + 0x0e, 0x62, 0x67, 0x70, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x67, 0x70, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x12, 0x54, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x14, 0x69, 0x70, 0x76, + 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, + 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x12, 0x69, 0x70, 0x76, 0x34, 0x55, 0x6e, + 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x14, + 0x69, 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x36, 0x55, 0x6e, + 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x12, 0x69, 0x70, 0x76, + 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x1a, + 0x4c, 0x0a, 0x0d, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x22, 0x3b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x70, 0x76, + 0x34, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x69, + 0x70, 0x76, 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x22, 0xba, 0x02, + 0x0a, 0x1a, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, 0x55, + 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1c, + 0x0a, 0x07, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, 0x88, 0x01, 0x01, 0x1a, 0x43, 0x0a, 0x06, + 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, 0x39, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x07, 0x0a, 0x03, 0x69, 0x67, 0x70, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x67, 0x70, 0x10, + 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, + 0x03, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x42, 0x0a, - 0x0a, 0x08, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x69, - 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x42, 0x10, 0x0a, 0x0e, - 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x42, 0x13, - 0x0a, 0x11, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x65, 0x78, - 0x69, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, - 0x22, 0xd4, 0x05, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, - 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, - 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, - 0x12, 0x47, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x49, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, 0x06, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x61, 0x74, - 0x68, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x06, 0x70, 0x61, - 0x74, 0x68, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x5f, - 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, - 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x88, 0x01, 0x01, - 0x12, 0x27, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, - 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x36, 0x4e, - 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x67, 0x70, 0x43, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x0a, 0x08, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x22, 0xba, 0x02, 0x0a, 0x1a, 0x42, + 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, + 0x61, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, + 0x52, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, + 0x01, 0x12, 0x48, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x49, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, + 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x70, + 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, + 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, 0x88, 0x01, 0x01, 0x1a, 0x43, 0x0a, 0x06, 0x4f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x22, 0x39, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, + 0x69, 0x67, 0x70, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x67, 0x70, 0x10, 0x02, 0x12, 0x0e, + 0x0a, 0x0a, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x03, 0x42, 0x10, + 0x0a, 0x0e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x22, 0xf5, 0x01, 0x0a, 0x10, 0x42, 0x67, 0x70, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, 0x0a, 0x0d, + 0x62, 0x67, 0x70, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x67, 0x70, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x52, 0x0a, 0x15, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x75, 0x6e, + 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x13, 0x69, 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, + 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x15, 0x69, 0x70, 0x76, + 0x36, 0x5f, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, + 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, + 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x13, 0x69, 0x70, 0x76, 0x36, 0x55, 0x6e, + 0x69, 0x63, 0x61, 0x73, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x42, 0x10, 0x0a, + 0x0e, 0x5f, 0x62, 0x67, 0x70, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0xa5, 0x06, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, + 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, + 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0c, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, + 0x47, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, + 0x70, 0x76, 0x34, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, + 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, 0x06, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x68, + 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x06, 0x70, 0x61, 0x74, + 0x68, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, + 0x0b, 0x69, 0x70, 0x76, 0x34, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x88, 0x01, 0x01, 0x12, + 0x27, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x36, 0x4e, 0x65, + 0x78, 0x74, 0x48, 0x6f, 0x70, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x14, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, + 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, + 0x13, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x61, 0x73, 0x50, @@ -124590,7 +144331,7 @@ var file_otg_proto_rawDesc = []byte{ 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x69, 0x67, 0x70, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x67, 0x70, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x69, 0x6e, 0x63, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x03, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x36, + 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x03, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, @@ -124599,7 +144340,363 @@ var file_otg_proto_rawDesc = []byte{ 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, - 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x22, 0xca, 0x02, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x75, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x22, 0xa5, 0x06, 0x0a, 0x19, 0x42, 0x67, 0x70, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x69, + 0x70, 0x76, 0x36, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, + 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x42, 0x67, + 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x36, 0x55, 0x6e, 0x69, 0x63, 0x61, + 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x88, 0x01, 0x01, + 0x12, 0x1c, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x03, 0x52, 0x06, 0x70, 0x61, 0x74, 0x68, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x27, + 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x4e, 0x65, 0x78, + 0x74, 0x48, 0x6f, 0x70, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0d, 0x69, 0x70, 0x76, 0x36, 0x5f, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, + 0x52, 0x0b, 0x69, 0x70, 0x76, 0x36, 0x4e, 0x65, 0x78, 0x74, 0x48, 0x6f, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x39, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x0b, + 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x14, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x13, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, + 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x07, + 0x61, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x67, 0x70, 0x41, 0x73, 0x50, + 0x61, 0x74, 0x68, 0x52, 0x06, 0x61, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x10, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x06, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x18, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x07, 0x52, + 0x16, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x45, 0x78, 0x69, 0x74, 0x44, 0x69, 0x73, 0x63, 0x72, 0x69, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x1a, 0x43, 0x0a, 0x06, 0x4f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x22, 0x39, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, + 0x03, 0x69, 0x67, 0x70, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x67, 0x70, 0x10, 0x02, 0x12, + 0x0e, 0x0a, 0x0a, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x03, 0x42, + 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x42, 0x0a, 0x0a, + 0x08, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x69, 0x70, + 0x76, 0x34, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x42, 0x10, 0x0a, 0x0e, 0x5f, + 0x69, 0x70, 0x76, 0x36, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x42, 0x13, 0x0a, + 0x11, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x65, 0x78, 0x69, + 0x74, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x22, + 0x80, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, + 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x15, 0x0a, 0x03, 0x72, + 0x61, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x72, 0x61, 0x77, 0x88, + 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x52, 0x0a, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x72, + 0x61, 0x77, 0x22, 0xfa, 0x06, 0x0a, 0x21, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x12, 0x4f, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6d, 0x0a, 0x19, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x61, + 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, + 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, + 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x6f, 0x63, 0x74, + 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x76, 0x0a, 0x1c, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x6d, 0x0a, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x34, + 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, 0x65, + 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x34, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x66, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x70, + 0x61, 0x71, 0x75, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, 0x61, + 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x77, 0x0a, 0x1d, 0x6e, 0x6f, 0x6e, 0x5f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, + 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x4e, 0x6f, 0x6e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x19, 0x6e, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, + 0x74, 0x69, 0x76, 0x65, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x1a, 0xc1, 0x01, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x34, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x10, + 0x04, 0x12, 0x21, 0x0a, 0x1d, 0x6e, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x32, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0xc2, 0x01, 0x0a, 0x38, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, + 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x0f, + 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x32, + 0x62, 0x79, 0x74, 0x65, 0x41, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x34, 0x62, 0x79, + 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x67, + 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x42, 0x14, + 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xc2, 0x01, 0x0a, 0x38, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, + 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x12, 0x2b, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, + 0x65, 0x5f, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x6c, + 0x6f, 0x62, 0x61, 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2f, + 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x34, 0x62, 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, + 0x12, 0x0a, 0x10, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, + 0x5f, 0x61, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x34, 0x62, + 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xd0, 0x03, 0x0a, 0x2d, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, + 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5b, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, + 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6f, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, + 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x6f, 0x0a, 0x14, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, + 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x55, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x18, 0x0a, + 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x75, + 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, + 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xcb, 0x01, 0x0a, + 0x3b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, + 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x2f, 0x0a, 0x11, + 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, + 0x6c, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, + 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x14, + 0x0a, 0x12, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, + 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xcb, 0x01, 0x0a, 0x3b, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, + 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x11, 0x67, 0x6c, + 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x49, + 0x70, 0x76, 0x34, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x32, + 0x62, 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, + 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, + 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xdc, 0x03, 0x0a, 0x30, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, + 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5e, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x41, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, + 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, + 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x75, + 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, + 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x12, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x72, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x40, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x75, + 0x62, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x55, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x4b, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, + 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xc2, 0x01, 0x0a, 0x38, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, + 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, + 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x34, + 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, + 0x0d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x34, 0x62, 0x79, 0x74, 0x65, 0x41, 0x73, 0x88, 0x01, + 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, + 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0f, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x88, + 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x34, 0x62, + 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xc2, 0x01, 0x0a, + 0x38, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, + 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x2b, 0x0a, 0x0f, 0x67, 0x6c, 0x6f, + 0x62, 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x34, 0x62, 0x79, 0x74, + 0x65, 0x41, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, + 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x32, 0x62, 0x79, 0x74, 0x65, 0x41, + 0x64, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x67, 0x6c, 0x6f, 0x62, + 0x61, 0x6c, 0x5f, 0x34, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x22, 0xd0, 0x03, 0x0a, 0x2d, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x5b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, 0x65, + 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x6f, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x12, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x6f, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x34, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x12, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x75, 0x62, 0x74, 0x79, + 0x70, 0x65, 0x1a, 0x55, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4b, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x01, 0x12, + 0x18, 0x0a, 0x14, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, + 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x7c, 0x0a, 0x30, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x6c, + 0x6f, 0x72, 0x22, 0x9e, 0x01, 0x0a, 0x38, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x45, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, + 0x12, 0x24, 0x0a, 0x0b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0a, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x54, + 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x22, 0xb4, 0x03, 0x0a, 0x2b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x59, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, 0x61, 0x71, 0x75, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x5a, + 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, + 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4f, 0x70, 0x61, + 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x0c, 0x63, 0x6f, + 0x6c, 0x6f, 0x72, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x72, 0x0a, 0x15, 0x65, 0x6e, + 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x63, 0x61, 0x70, + 0x73, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x73, + 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x4f, + 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x45, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, + 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, + 0x70, 0x65, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x02, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x3d, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, + 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x4e, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x4c, + 0x69, 0x6e, 0x6b, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x2b, 0x0a, 0x0f, + 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x32, + 0x62, 0x79, 0x74, 0x65, 0x41, 0x73, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x62, 0x61, 0x6e, + 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x48, 0x01, 0x52, 0x09, + 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, + 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x32, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x61, 0x73, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x22, 0xd6, + 0x02, 0x0a, 0x30, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, + 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x4e, 0x6f, 0x6e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x5e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x41, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x4e, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, + 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x78, 0x0a, 0x16, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x62, 0x61, 0x6e, 0x64, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x4e, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x32, 0x4f, + 0x63, 0x74, 0x65, 0x74, 0x41, 0x73, 0x54, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x42, 0x61, + 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x52, 0x14, 0x6c, 0x69, 0x6e, 0x6b, 0x42, 0x61, 0x6e, + 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x3d, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x33, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x1a, 0x0a, 0x16, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xca, 0x02, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x67, 0x70, 0x43, 0x6f, 0x6d, 0x6d, @@ -124993,334 +145090,1017 @@ var file_otg_proto_rawDesc = []byte{ 0x0a, 0x13, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x12, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x65, 0x22, 0xd6, 0x01, 0x0a, 0x12, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x4c, 0x56, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6f, 0x75, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x03, 0x6f, 0x75, 0x69, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6f, 0x75, 0x69, 0x5f, 0x73, 0x75, 0x62, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x6f, 0x75, - 0x69, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, - 0x6f, 0x75, 0x69, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x75, 0x69, 0x5f, 0x73, 0x75, 0x62, 0x74, - 0x79, 0x70, 0x65, 0x22, 0xb3, 0x03, 0x0a, 0x13, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x61, 0x70, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x5a, 0x0a, 0x0f, 0x63, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x43, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x43, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x12, 0x63, 0x61, 0x70, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x11, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x88, 0x01, 0x01, 0x1a, 0xe0, 0x01, 0x0a, 0x0e, - 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xcd, - 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x6d, 0x61, 0x63, 0x5f, - 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x77, 0x6f, 0x5f, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x63, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x10, 0x02, - 0x12, 0x0c, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x72, 0x10, 0x03, 0x12, 0x17, - 0x0a, 0x13, 0x64, 0x6f, 0x63, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x73, 0x5f, 0x76, 0x6c, 0x61, - 0x6e, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, - 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x10, 0x07, 0x12, 0x0a, 0x0a, - 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x10, 0x08, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x5f, 0x76, - 0x6c, 0x61, 0x6e, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x10, 0x0a, 0x12, 0x15, 0x0a, 0x11, 0x77, 0x6c, 0x61, 0x6e, 0x5f, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x10, 0x0b, 0x42, 0x12, - 0x0a, 0x10, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x42, 0x0a, 0x14, 0x52, 0x73, 0x76, - 0x70, 0x4c, 0x73, 0x70, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x73, - 0x76, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x87, 0x01, - 0x0a, 0x0d, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x2d, 0x0a, 0x10, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x73, 0x76, - 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x32, - 0x0a, 0x09, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6c, 0x73, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x49, 0x50, 0x76, 0x34, - 0x4c, 0x73, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x69, 0x70, 0x76, 0x34, 0x4c, 0x73, - 0x70, 0x73, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x96, 0x02, 0x0a, 0x10, 0x52, 0x73, 0x76, 0x70, - 0x49, 0x50, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x0e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x23, - 0x0a, 0x03, 0x6c, 0x73, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x03, - 0x6c, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x04, 0x72, 0x72, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0a, 0x6f, 0x75, + 0x69, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x69, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x03, 0x52, 0x0b, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, + 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6f, 0x75, 0x69, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, + 0x75, 0x69, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb3, 0x03, 0x0a, 0x13, 0x4c, + 0x6c, 0x64, 0x70, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x5a, 0x0a, 0x0f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x4c, 0x6c, 0x64, 0x70, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x61, 0x70, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x32, + 0x0a, 0x12, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x11, 0x63, 0x61, + 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x88, + 0x01, 0x01, 0x1a, 0xe0, 0x01, 0x0a, 0x0e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xcd, 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x0e, 0x0a, 0x0a, 0x6d, 0x61, 0x63, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x10, 0x01, 0x12, + 0x16, 0x0a, 0x12, 0x74, 0x77, 0x6f, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x63, 0x5f, + 0x72, 0x65, 0x6c, 0x61, 0x79, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x72, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x64, 0x6f, 0x63, 0x73, 0x69, 0x73, 0x5f, + 0x63, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x10, 0x04, 0x12, 0x0a, + 0x0a, 0x06, 0x73, 0x5f, 0x76, 0x6c, 0x61, 0x6e, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x74, 0x65, + 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x6f, 0x74, 0x68, + 0x65, 0x72, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x10, 0x08, + 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x5f, 0x76, 0x6c, 0x61, 0x6e, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x10, 0x0a, 0x12, 0x15, + 0x0a, 0x11, 0x77, 0x6c, 0x61, 0x6e, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x10, 0x0b, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x63, 0x61, + 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x22, 0x42, 0x0a, 0x14, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x73, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x73, 0x76, 0x70, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x73, 0x76, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x0d, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x10, 0x72, 0x73, 0x76, 0x70, 0x5f, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x0e, 0x72, 0x73, 0x76, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x09, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x6c, 0x73, + 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, + 0x73, 0x76, 0x70, 0x49, 0x50, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x08, 0x69, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x73, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x72, 0x73, + 0x76, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x96, + 0x02, 0x0a, 0x10, 0x52, 0x73, 0x76, 0x70, 0x49, 0x50, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, + 0x34, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x12, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x03, 0x6c, 0x73, 0x70, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x03, 0x6c, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x04, 0x72, 0x72, + 0x6f, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, + 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, 0x76, 0x34, 0x52, 0x72, 0x6f, 0x52, 0x04, 0x72, + 0x72, 0x6f, 0x73, 0x12, 0x27, 0x0a, 0x04, 0x65, 0x72, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, - 0x70, 0x76, 0x34, 0x52, 0x72, 0x6f, 0x52, 0x04, 0x72, 0x72, 0x6f, 0x73, 0x12, 0x27, 0x0a, 0x04, - 0x65, 0x72, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, 0x76, 0x34, 0x45, 0x72, 0x6f, 0x52, - 0x04, 0x65, 0x72, 0x6f, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x64, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x22, 0x8c, 0x05, 0x0a, 0x0c, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x20, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, - 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x6c, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x6c, 0x73, 0x70, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x26, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x5f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x07, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x49, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x08, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x4f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x12, 0x50, 0x0a, 0x0e, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x05, 0x52, 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x10, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, - 0x4c, 0x73, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x46, 0x6c, 0x61, - 0x70, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x06, 0x52, 0x0e, - 0x6c, 0x61, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x70, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, - 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x75, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x04, 0x48, 0x07, 0x52, 0x06, 0x75, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x1a, - 0x3a, 0x0a, 0x0d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, - 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x10, 0x02, 0x1a, 0x59, 0x0a, 0x0e, 0x4c, - 0x61, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x70, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x47, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x74, - 0x65, 0x61, 0x72, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, - 0x61, 0x72, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x10, 0x03, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x5f, 0x69, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x42, - 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x69, 0x6e, 0x42, 0x0c, 0x0a, - 0x0a, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6f, 0x75, 0x74, 0x42, 0x11, 0x0a, 0x0f, 0x5f, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x13, - 0x0a, 0x11, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, 0x72, 0x65, 0x61, - 0x73, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x75, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, - 0x7a, 0x0a, 0x0e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, 0x76, 0x34, 0x52, 0x72, - 0x6f, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, - 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x85, 0x02, 0x0a, 0x0e, - 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, 0x76, 0x34, 0x45, 0x72, 0x6f, 0x12, 0x1b, - 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x61, - 0x73, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x03, 0x61, 0x73, 0x6e, 0x88, - 0x01, 0x01, 0x12, 0x36, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, - 0x76, 0x34, 0x45, 0x72, 0x6f, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x6b, 0x0a, 0x04, 0x54, 0x79, - 0x70, 0x65, 0x22, 0x63, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, - 0x70, 0x76, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x10, 0x02, 0x12, - 0x07, 0x0a, 0x03, 0x61, 0x73, 0x6e, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x73, 0x6e, 0x34, - 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x10, 0x05, 0x12, 0x18, 0x0a, - 0x14, 0x75, 0x6e, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x66, 0x61, 0x63, 0x65, 0x10, 0x06, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x61, 0x73, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x22, 0x40, 0x0a, 0x0e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x70, 0x6f, 0x72, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x6f, 0x72, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x44, 0x73, 0x74, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x44, 0x73, 0x74, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf5, 0x03, 0x0a, 0x16, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x44, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x70, 0x76, 0x34, 0x45, 0x72, 0x6f, 0x52, 0x04, 0x65, 0x72, 0x6f, 0x73, 0x42, 0x11, 0x0a, 0x0f, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, + 0x16, 0x0a, 0x14, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x8c, 0x05, 0x0a, 0x0c, 0x52, 0x73, 0x76, 0x70, + 0x4c, 0x73, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x06, 0x6c, 0x73, + 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x6c, 0x73, + 0x70, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0b, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1e, + 0x0a, 0x08, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x03, 0x52, 0x07, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x49, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x20, + 0x0a, 0x09, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x04, 0x52, 0x08, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4f, 0x75, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x50, 0x0a, 0x0e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, + 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x05, + 0x52, 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, + 0x01, 0x01, 0x12, 0x54, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x61, 0x70, 0x5f, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, + 0x4c, 0x61, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x70, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x06, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x70, 0x52, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x75, 0x70, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x48, 0x07, 0x52, 0x06, 0x75, 0x70, 0x54, + 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x3a, 0x0a, 0x0d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x29, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x06, 0x0a, 0x02, 0x75, 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, + 0x10, 0x02, 0x1a, 0x59, 0x0a, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x70, 0x52, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x47, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, + 0x09, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, + 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x61, 0x72, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x70, + 0x61, 0x74, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x10, 0x03, 0x42, 0x0c, 0x0a, + 0x0a, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6c, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x5f, 0x69, 0x6e, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6f, + 0x75, 0x74, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x66, + 0x6c, 0x61, 0x70, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x75, + 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x7a, 0x0a, 0x0e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, + 0x70, 0x49, 0x70, 0x76, 0x34, 0x52, 0x72, 0x6f, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, + 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x22, 0x85, 0x02, 0x0a, 0x0e, 0x52, 0x73, 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, + 0x76, 0x34, 0x45, 0x72, 0x6f, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, + 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x61, 0x73, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x03, 0x61, 0x73, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x52, 0x73, + 0x76, 0x70, 0x4c, 0x73, 0x70, 0x49, 0x70, 0x76, 0x34, 0x45, 0x72, 0x6f, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, + 0x01, 0x1a, 0x6b, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x22, 0x63, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, + 0x69, 0x70, 0x76, 0x36, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x61, 0x73, 0x6e, 0x10, 0x03, 0x12, + 0x08, 0x0a, 0x04, 0x61, 0x73, 0x6e, 0x34, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x75, 0x6e, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x10, 0x06, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x61, 0x73, + 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x49, 0x0a, 0x1b, 0x44, 0x68, + 0x63, 0x70, 0x76, 0x34, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x68, 0x63, + 0x70, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x68, 0x63, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xad, 0x03, 0x0a, 0x14, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, + 0x0a, 0x10, 0x64, 0x68, 0x63, 0x70, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x68, 0x63, 0x70, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, + 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0c, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, + 0x2c, 0x0a, 0x0f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, + 0x0a, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x04, 0x52, 0x09, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x05, 0x52, 0x09, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x54, 0x69, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x06, 0x52, 0x0a, 0x72, 0x65, + 0x62, 0x69, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, + 0x64, 0x68, 0x63, 0x70, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x72, 0x65, 0x6e, 0x65, 0x77, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x45, 0x0a, 0x17, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, 0x4c, + 0x65, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x68, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x68, 0x63, + 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x86, 0x01, 0x0a, + 0x11, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x10, 0x64, 0x68, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, + 0x64, 0x68, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x2d, 0x0a, 0x06, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, 0x4c, 0x65, + 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x06, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, + 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x68, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xab, 0x03, 0x0a, 0x10, 0x44, 0x68, 0x63, 0x70, 0x76, 0x34, + 0x4c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, + 0x0e, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, + 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x6e, + 0x65, 0x77, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, + 0x09, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, + 0x0b, 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x04, 0x52, 0x0a, 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x09, 0x63, 0x69, 0x72, + 0x63, 0x75, 0x69, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x08, + 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x72, 0x65, + 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x72, 0x65, 0x62, + 0x69, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x63, 0x69, 0x72, 0x63, 0x75, + 0x69, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x5f, 0x69, 0x64, 0x22, 0x49, 0x0a, 0x1b, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x68, 0x63, 0x70, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x64, + 0x68, 0x63, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xd6, + 0x01, 0x0a, 0x14, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x10, 0x64, 0x68, 0x63, 0x70, 0x5f, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x68, 0x63, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x0e, 0x69, 0x61, 0x70, 0x64, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x49, 0x61, 0x70, 0x64, 0x52, 0x0d, 0x69, 0x61, 0x70, 0x64, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x0c, 0x69, 0x61, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x49, 0x61, 0x52, 0x0b, 0x69, 0x61, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x65, 0x73, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x68, 0x63, 0x70, 0x5f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x13, 0x44, 0x68, 0x63, 0x70, + 0x76, 0x36, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x61, 0x70, 0x64, 0x12, + 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x28, + 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x09, + 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x11, 0x44, 0x68, + 0x63, 0x70, 0x76, 0x36, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x61, 0x12, + 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1d, + 0x0a, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x01, 0x52, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, + 0x0a, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x09, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0a, 0x0a, + 0x08, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6c, 0x65, + 0x61, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x45, 0x0a, 0x17, 0x44, 0x68, 0x63, 0x70, + 0x76, 0x36, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x68, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, + 0x64, 0x68, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, + 0x8c, 0x01, 0x0a, 0x11, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x10, 0x64, 0x68, 0x63, 0x70, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0e, 0x64, 0x68, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x06, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x44, 0x68, 0x63, 0x70, 0x76, + 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x06, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x68, + 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb7, + 0x03, 0x0a, 0x16, 0x44, 0x68, 0x63, 0x70, 0x76, 0x36, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, + 0x65, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x09, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, + 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x6e, 0x65, + 0x77, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x09, + 0x72, 0x65, 0x6e, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, + 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x04, 0x52, 0x0a, 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x08, 0x72, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x0b, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0a, + 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x0d, 0x0a, 0x0b, + 0x5f, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, + 0x72, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x16, 0x4f, 0x73, 0x70, 0x66, + 0x76, 0x32, 0x4c, 0x73, 0x61, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xf4, 0x03, 0x0a, 0x0e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, + 0x4c, 0x73, 0x61, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x35, + 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x73, 0x61, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x73, 0x61, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x72, 0x4c, 0x73, 0x61, 0x73, 0x12, 0x38, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x5f, 0x6c, 0x73, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, + 0x73, 0x61, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x73, 0x61, 0x73, 0x12, + 0x4e, 0x0a, 0x14, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x5f, 0x6c, 0x73, 0x61, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x4c, 0x73, 0x61, 0x52, 0x12, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x4c, 0x73, 0x61, 0x73, 0x12, + 0x3f, 0x0a, 0x0f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x61, 0x73, 0x5f, 0x6c, 0x73, + 0x61, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, + 0x73, 0x70, 0x66, 0x76, 0x32, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x73, 0x4c, 0x73, + 0x61, 0x52, 0x0d, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x73, 0x4c, 0x73, 0x61, 0x73, + 0x12, 0x42, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x73, 0x5f, + 0x6c, 0x73, 0x61, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, + 0x73, 0x4c, 0x73, 0x61, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x73, + 0x4c, 0x73, 0x61, 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x6e, 0x73, 0x73, 0x61, 0x5f, 0x6c, 0x73, 0x61, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, + 0x70, 0x66, 0x76, 0x32, 0x4e, 0x73, 0x73, 0x61, 0x4c, 0x73, 0x61, 0x52, 0x08, 0x6e, 0x73, 0x73, + 0x61, 0x4c, 0x73, 0x61, 0x73, 0x12, 0x35, 0x0a, 0x0b, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, + 0x6c, 0x73, 0x61, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x4c, 0x73, 0x61, + 0x52, 0x0a, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x4c, 0x73, 0x61, 0x73, 0x42, 0x0e, 0x0a, 0x0c, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x66, 0x0a, 0x0f, + 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x73, 0x61, 0x12, + 0x2c, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4c, 0x73, 0x61, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x25, 0x0a, + 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x05, 0x6c, + 0x69, 0x6e, 0x6b, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x10, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x73, 0x61, 0x12, 0x2c, 0x0a, 0x06, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4c, 0x73, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, + 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, + 0x2e, 0x0a, 0x13, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x5f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x6e, 0x65, + 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x73, 0x42, + 0x0f, 0x0a, 0x0d, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x22, 0xa8, 0x01, 0x0a, 0x17, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x4c, 0x73, 0x61, 0x12, 0x2c, 0x0a, 0x06, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4c, 0x73, 0x61, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0c, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x61, 0x73, 0x6b, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x88, 0x01, 0x01, 0x42, + 0x0f, 0x0a, 0x0d, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x22, 0xa3, 0x01, 0x0a, 0x12, + 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x73, 0x4c, + 0x73, 0x61, 0x12, 0x2c, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4c, + 0x73, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x12, 0x26, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x22, 0xda, 0x01, 0x0a, 0x13, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x45, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x73, 0x4c, 0x73, 0x61, 0x12, 0x2c, 0x0a, 0x06, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4c, 0x73, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, + 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x88, + 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6d, + 0x61, 0x73, 0x6b, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x0e, + 0x0a, 0x0c, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x9f, + 0x02, 0x0a, 0x0d, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4e, 0x73, 0x73, 0x61, 0x4c, 0x73, 0x61, + 0x12, 0x2c, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4c, 0x73, 0x61, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, + 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4d, + 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x12, 0x66, 0x6f, 0x72, + 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x11, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, + 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, + 0x0d, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x66, 0x6f, + 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x22, 0xc3, 0x01, 0x0a, 0x0f, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4f, 0x70, 0x61, 0x71, 0x75, + 0x65, 0x4c, 0x73, 0x61, 0x12, 0x2c, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, + 0x32, 0x4c, 0x73, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4f, 0x70, 0x61, + 0x71, 0x75, 0x65, 0x4c, 0x73, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x40, 0x0a, 0x04, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x38, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x72, 0x65, 0x61, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x10, 0x03, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa2, 0x02, 0x0a, 0x0f, 0x4f, 0x73, 0x70, 0x66, 0x76, + 0x32, 0x4c, 0x73, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x06, 0x6c, 0x73, + 0x61, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x6c, 0x73, + 0x61, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x15, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x13, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x73, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x2c, 0x0a, 0x0f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0e, 0x73, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, + 0x03, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x03, 0x61, 0x67, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, + 0x69, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x04, 0x52, 0x0a, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, + 0x73, 0x61, 0x5f, 0x69, 0x64, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x42, + 0x12, 0x0a, 0x10, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x61, 0x67, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x22, 0x88, 0x02, 0x0a, 0x0a, + 0x4f, 0x73, 0x70, 0x66, 0x76, 0x32, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4f, + 0x73, 0x70, 0x66, 0x76, 0x32, 0x4c, 0x69, 0x6e, 0x6b, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x02, 0x69, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x02, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x06, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x88, 0x01, 0x01, 0x1a, 0x57, 0x0a, 0x04, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x4f, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x0b, + 0x0a, 0x07, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x73, + 0x74, 0x75, 0x62, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, + 0x10, 0x04, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, + 0x69, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x22, 0x40, 0x0a, 0x0e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x70, + 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x44, 0x73, - 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, 0x0a, - 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x61, - 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x44, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x73, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, - 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x61, - 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, - 0x6f, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x72, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x72, 0x63, - 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x72, 0x63, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, + 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf5, 0x03, 0x0a, + 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x44, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x44, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, + 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, - 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, + 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x72, 0x63, 0x4d, + 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x44, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, + 0x54, 0x61, 0x67, 0x73, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x08, + 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x61, 0x75, 0x74, 0x6f, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x72, 0x63, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x72, 0x63, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x53, 0x72, 0x63, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x72, 0x63, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, 0x72, 0x63, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x53, + 0x72, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, + 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, + 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x45, 0x74, 0x68, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x22, 0x93, 0x04, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x45, 0x74, 0x68, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x45, + 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, + 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, + 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x45, 0x74, 0x68, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x91, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x22, 0x93, 0x04, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x22, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x50, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, + 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, + 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, + 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, + 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe2, 0x03, 0x0a, 0x1b, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x50, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x50, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x50, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x66, 0x63, 0x51, 0x75, 0x65, + 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, + 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x50, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, + 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, + 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, + 0x6e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, + 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, + 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, + 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, + 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, + 0x61, 0x6e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, + 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, + 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x87, 0x01, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x43, 0x66, 0x69, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8f, + 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, + 0x61, 0x6e, 0x43, 0x66, 0x69, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, + 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x22, 0xb5, 0x03, 0x0a, 0x12, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x56, 0x6c, 0x61, 0x6e, 0x43, 0x66, 0x69, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x43, 0x66, 0x69, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x43, 0x66, 0x69, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, + 0x6c, 0x61, 0x6e, 0x43, 0x66, 0x69, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, + 0x6c, 0x61, 0x6e, 0x43, 0x66, 0x69, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, + 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x86, 0x01, 0x0a, 0x18, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x8e, 0x01, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0xb0, 0x03, 0x0a, 0x11, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x49, 0x64, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, + 0x61, 0x6e, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, + 0x6e, 0x49, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x54, 0x70, 0x69, 0x64, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x90, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x56, 0x6c, 0x61, 0x6e, 0x54, 0x70, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x22, 0xba, 0x03, 0x0a, 0x13, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x54, 0x70, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, + 0x6e, 0x54, 0x70, 0x69, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0x56, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, - 0x03, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, - 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, + 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x54, 0x70, 0x69, 0x64, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x3d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x54, 0x70, 0x69, 0x64, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x42, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x54, 0x70, 0x69, 0x64, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, + 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, + 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, + 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, + 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, + 0x61, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x43, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, + 0x6c, 0x61, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x46, 0x6c, + 0x61, 0x67, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x46, + 0x6c, 0x61, 0x67, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, + 0x61, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x20, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x24, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x50, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe2, 0x03, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x66, 0x63, - 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, - 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x50, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x43, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x96, 0x01, 0x0a, 0x22, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x22, 0xd8, 0x03, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x30, 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x30, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x30, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, + 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, + 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x88, + 0x01, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, + 0x6c, 0x61, 0x6e, 0x56, 0x6e, 0x69, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x1c, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x6e, + 0x69, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe6, 0x03, 0x0a, + 0x13, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, + 0x6e, 0x56, 0x6e, 0x69, 0x12, 0x41, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x6e, 0x69, 0x2e, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, + 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, + 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x6e, 0x69, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x6e, 0x69, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x4a, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x50, 0x66, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x74, 0x12, 0x42, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x6e, 0x69, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x56, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, + 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x22, 0x8e, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x96, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x31, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, + 0xd8, 0x03, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, + 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x12, 0x47, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, + 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, + 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, + 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, @@ -125328,136 +146108,199 @@ var file_otg_proto_rawDesc = []byte{ 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x50, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x50, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x56, 0x6c, 0x61, 0x6e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x45, 0x0a, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, - 0x61, 0x6e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc9, + 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, + 0x76, 0x34, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, + 0x34, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x22, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, + 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, + 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, + 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, + 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, + 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x8e, 0x04, 0x0a, 0x1b, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x50, - 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, - 0x61, 0x6e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x87, 0x01, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x43, 0x66, 0x69, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, + 0x45, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, + 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x0d, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x22, 0x8f, 0x01, 0x0a, 0x21, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x74, + 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, - 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x1b, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x43, - 0x66, 0x69, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xb5, 0x03, - 0x0a, 0x12, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, - 0x6e, 0x43, 0x66, 0x69, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x43, 0x66, 0x69, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, - 0x61, 0x6e, 0x43, 0x66, 0x69, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, - 0x43, 0x66, 0x69, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, - 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, - 0x43, 0x66, 0x69, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x86, 0x01, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, - 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8e, - 0x01, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, - 0x61, 0x6e, 0x49, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, - 0xb0, 0x03, 0x0a, 0x11, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, - 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, - 0x61, 0x6e, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x49, - 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, - 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x49, 0x64, + 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97, 0x01, 0x0a, 0x23, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, + 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x89, 0x04, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x70, 0x76, 0x34, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x44, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, + 0x34, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x73, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, + 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x61, + 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, + 0x6f, 0x22, 0x92, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x22, 0xec, 0x03, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, + 0x76, 0x34, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, @@ -125466,91 +146309,145 @@ var file_otg_proto_rawDesc = []byte{ 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x54, 0x70, 0x69, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, - 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x90, 0x01, - 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, - 0x6e, 0x54, 0x70, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xba, 0x03, 0x0a, 0x13, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x56, 0x6c, 0x61, 0x6e, 0x54, 0x70, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x54, 0x70, - 0x69, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3d, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x54, 0x70, 0x69, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3d, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x54, 0x70, 0x69, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0b, + 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, + 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x22, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x6f, 0x6e, + 0x74, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, + 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, + 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, + 0x44, 0x6f, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe2, 0x03, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x6f, 0x6e, 0x74, 0x46, + 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x6f, 0x6e, + 0x74, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x6f, + 0x6e, 0x74, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x6f, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, + 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x6f, + 0x6e, 0x74, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, + 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x91, 0x01, 0x0a, + 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, + 0x4d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x34, 0x4d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe7, 0x03, 0x0a, + 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, + 0x4d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x4a, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x70, 0x76, 0x34, 0x4d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x4d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4d, 0x6f, 0x72, + 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x56, 0x6c, 0x61, 0x6e, 0x54, 0x70, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, - 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8a, 0x01, - 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, - 0x61, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x46, - 0x6c, 0x61, 0x67, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, - 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, - 0x78, 0x6c, 0x61, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, - 0x46, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x46, 0x6c, 0x61, 0x67, - 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, - 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x46, - 0x6c, 0x61, 0x67, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, + 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, @@ -125558,191 +146455,49 @@ var file_otg_proto_rawDesc = []byte{ 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x30, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x96, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x30, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xd8, 0x03, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x12, 0x47, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x2e, 0x43, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, + 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, + 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, + 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x26, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x46, + 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xec, 0x03, 0x0a, 0x1d, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x46, 0x72, 0x61, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, + 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, - 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x43, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x30, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x1a, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, - 0x56, 0x6e, 0x69, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x6e, 0x69, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe6, 0x03, 0x0a, 0x13, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x6e, - 0x69, 0x12, 0x41, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x6e, 0x69, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, - 0x12, 0x3d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x6e, 0x69, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x3d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x6e, 0x69, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, - 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x56, 0x6e, 0x69, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, - 0x67, 0x73, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, - 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, - 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, - 0x74, 0x6f, 0x22, 0x8e, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x96, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x31, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xd8, 0x03, 0x0a, - 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, - 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, - 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x48, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x78, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x31, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, - 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, + 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x70, 0x76, 0x34, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x46, 0x72, 0x61, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, @@ -125750,70 +146505,202 @@ var file_otg_proto_rawDesc = []byte{ 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x24, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x8e, 0x04, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0b, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0x56, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, - 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x22, 0x8f, 0x01, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x69, 0x6d, 0x65, 0x54, + 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x74, 0x61, - 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x96, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x69, 0x6d, 0x65, + 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, + 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x22, 0xd8, 0x03, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x12, + 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x2e, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x34, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x43, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, + 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, + 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, + 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, + 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, + 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, + 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, + 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, + 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0xfa, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x45, + 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, + 0x01, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, + 0x76, 0x34, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, + 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, + 0x6f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x22, + 0xfa, 0x02, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, + 0x6d, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x54, + 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, + 0x01, 0x1a, 0x3c, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, + 0x37, 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, + 0x07, 0x0a, 0x03, 0x62, 0x61, 0x64, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x87, 0x01, 0x0a, + 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, + 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, 0x63, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x9f, 0x01, 0x0a, 0x18, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, 0x63, 0x52, + 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, + 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x78, + 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, + 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x78, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x65, 0x65, 0x64, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa9, 0x04, 0x0a, 0x12, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, + 0x63, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, 0x63, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, + 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, 0x63, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, 0x63, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x73, 0x12, 0x25, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, + 0x76, 0x34, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x12, 0x35, 0x0a, 0x06, + 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, + 0x76, 0x34, 0x53, 0x72, 0x63, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x52, 0x06, 0x72, 0x61, 0x6e, + 0x64, 0x6f, 0x6d, 0x1a, 0x6c, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x62, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x61, + 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x10, + 0x06, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x87, 0x01, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x8f, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, @@ -125821,51 +146708,182 @@ var file_otg_proto_rawDesc = []byte{ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x22, 0x89, 0x04, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x74, 0x68, 0x22, 0x9f, 0x01, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x12, + 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, + 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x73, + 0x65, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, + 0x78, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa9, 0x04, 0x0a, 0x12, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, + 0x34, 0x44, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x3c, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x12, + 0x25, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x41, 0x75, 0x74, 0x6f, + 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x12, 0x35, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, 0x52, + 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x1a, 0x6c, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x62, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, + 0x0a, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x10, 0x06, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x9f, 0x01, 0x0a, 0x31, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0xd2, 0x03, 0x0a, 0x2a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x46, 0x6c, 0x61, + 0x67, 0x12, 0x58, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x46, 0x6c, + 0x61, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, - 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, - 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x54, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x46, 0x6c, + 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, + 0x70, 0x69, 0x65, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x32, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xd6, 0x03, 0x0a, 0x2b, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, - 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, - 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, - 0x74, 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x60, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, - 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x22, 0x92, - 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, - 0x76, 0x34, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, + 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, + 0x70, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x55, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, + 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, + 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0xa1, 0x01, 0x0a, 0x33, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, + 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xda, 0x03, 0x0a, 0x2c, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x56, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, + 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, + 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x52, 0x61, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x52, 0x61, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, @@ -125873,96 +146891,47 @@ var file_otg_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xec, 0x03, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x34, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x34, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, - 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, - 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x8c, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0xdd, 0x03, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x61, 0x77, 0x12, + 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x61, 0x77, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x61, 0x77, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x52, 0x61, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x61, 0x77, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, - 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, - 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x6f, 0x6e, 0x74, 0x46, 0x72, - 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x24, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x6f, 0x6e, - 0x74, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, + 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, + 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, @@ -125970,603 +146939,171 @@ var file_otg_proto_rawDesc = []byte{ 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe2, 0x03, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x6f, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x6f, 0x6e, 0x74, 0x46, 0x72, - 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x6f, 0x6e, 0x74, 0x46, - 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, - 0x76, 0x34, 0x44, 0x6f, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x4a, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x6f, 0x6e, 0x74, 0x46, - 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x23, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4d, 0x6f, 0x72, - 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, - 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, 0x01, - 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, - 0x34, 0x4d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe7, 0x03, 0x0a, 0x1c, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4d, 0x6f, 0x72, - 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, - 0x4d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, - 0x76, 0x34, 0x4d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4d, 0x6f, 0x72, 0x65, 0x46, 0x72, - 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x34, 0x4d, 0x6f, 0x72, 0x65, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, - 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, - 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x46, 0x72, 0x61, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xec, 0x03, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x46, 0x72, 0x61, - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, - 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x47, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x34, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, - 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, - 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, - 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x96, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, - 0x69, 0x76, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, - 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xd8, - 0x03, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, - 0x76, 0x34, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x12, 0x47, 0x0a, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, - 0x76, 0x34, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x2e, 0x43, 0x68, 0x6f, + 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x12, + 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, - 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, - 0x34, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x69, 0x6d, - 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, - 0xfa, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x34, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x45, 0x0a, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, - 0x34, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x41, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x60, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, - 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, - 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x22, 0xfa, 0x02, 0x0a, - 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x4b, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x09, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x34, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x75, 0x6d, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x01, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x88, 0x01, - 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3c, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x10, 0x01, - 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x37, 0x0a, 0x09, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, - 0x62, 0x61, 0x64, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x87, 0x01, 0x0a, 0x19, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, 0x63, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xb5, 0x03, 0x0a, 0x12, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, 0x63, 0x12, 0x40, 0x0a, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, - 0x76, 0x34, 0x53, 0x72, 0x63, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x3c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x53, 0x72, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, - 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x87, 0x01, - 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, - 0x34, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xb5, 0x03, 0x0a, 0x12, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, - 0x12, 0x40, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, - 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x41, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x74, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x31, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x46, 0x6c, 0x61, 0x67, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0xd2, 0x03, 0x0a, 0x2a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x46, 0x6c, - 0x61, 0x67, 0x12, 0x58, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x46, - 0x6c, 0x61, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x54, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x64, 0x46, - 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, - 0x6f, 0x70, 0x69, 0x65, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x32, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, - 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, - 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xd6, 0x03, 0x0a, 0x2b, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6f, 0x74, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, - 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, - 0x70, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, - 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, - 0x79, 0x70, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x55, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, - 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, - 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa1, 0x01, 0x0a, 0x33, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xda, 0x03, 0x0a, 0x2c, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, + 0x34, 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, + 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, + 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x12, + 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, - 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6f, 0x74, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, - 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, - 0x70, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x56, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x52, 0x61, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x52, 0x61, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x22, 0xdd, 0x03, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x61, 0x77, - 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x61, - 0x77, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x44, 0x0a, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x61, - 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x52, 0x61, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0b, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x61, 0x77, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, - 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, + 0x34, 0x44, 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x91, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, + 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, 0x65, 0x63, 0x65, + 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, + 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x22, 0xe7, 0x03, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, + 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, + 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x46, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, 0x65, 0x63, + 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, + 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x4b, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, + 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, + 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, + 0x44, 0x65, 0x6c, 0x61, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, + 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x45, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, - 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x50, 0x68, 0x62, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, - 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, + 0x76, 0x34, 0x54, 0x6f, 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, + 0x6f, 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, - 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x44, 0x73, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x4d, + 0x76, 0x34, 0x54, 0x6f, 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, @@ -126576,8 +147113,8 @@ var file_otg_proto_rawDesc = []byte{ 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, + 0x75, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, @@ -126585,8 +147122,8 @@ var file_otg_proto_rawDesc = []byte{ 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, 0x65, 0x63, - 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, 0x68, 0x72, 0x6f, + 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, @@ -126595,28 +147132,28 @@ var file_otg_proto_rawDesc = []byte{ 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe7, 0x03, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, + 0x75, 0x74, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, 0x65, 0x63, 0x65, - 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, 0x68, 0x72, 0x6f, 0x75, + 0x67, 0x68, 0x70, 0x75, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, 0x65, - 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, 0x68, 0x72, + 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, - 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x43, + 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x50, - 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, + 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, @@ -126624,96 +147161,49 @@ var file_otg_proto_rawDesc = []byte{ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, + 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, - 0x6f, 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, - 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x45, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, - 0x54, 0x6f, 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x44, 0x65, 0x6c, 0x61, 0x79, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, - 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, - 0x70, 0x75, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, 0x68, 0x72, - 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x22, 0xe7, 0x03, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, - 0x70, 0x75, 0x74, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, 0x68, 0x72, 0x6f, - 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x46, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, 0x68, - 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, - 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x6f, 0x73, 0x52, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x52, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xec, 0x03, + 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, + 0x34, 0x54, 0x6f, 0x73, 0x52, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, + 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x52, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x52, 0x65, 0x6c, 0x69, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, + 0x34, 0x54, 0x6f, 0x73, 0x52, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x52, + 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, @@ -126721,98 +147211,192 @@ var file_otg_proto_rawDesc = []byte{ 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x92, 0x01, 0x0a, - 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, - 0x54, 0x6f, 0x73, 0x52, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x52, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, - 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xec, - 0x03, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, - 0x76, 0x34, 0x54, 0x6f, 0x73, 0x52, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x52, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x52, 0x65, 0x6c, 0x69, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, - 0x76, 0x34, 0x54, 0x6f, 0x73, 0x52, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8f, 0x01, 0x0a, + 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, + 0x54, 0x6f, 0x73, 0x4d, 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97, + 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, + 0x76, 0x34, 0x54, 0x6f, 0x73, 0x4d, 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xdd, 0x03, 0x0a, 0x1a, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x4d, + 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, - 0x52, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, - 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8f, 0x01, - 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, - 0x34, 0x54, 0x6f, 0x73, 0x4d, 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x97, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x4d, 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xdd, 0x03, 0x0a, 0x1a, 0x50, 0x61, + 0x4d, 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, - 0x4d, 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, - 0x73, 0x4d, 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, - 0x73, 0x4d, 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x4d, 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x49, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x4d, - 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x4d, 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x4d, 0x6f, 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x49, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x4d, 0x6f, + 0x6e, 0x65, 0x74, 0x61, 0x72, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, + 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x55, + 0x6e, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x95, 0x01, 0x0a, 0x21, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x55, + 0x6e, 0x75, 0x73, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, + 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x22, 0xd3, 0x03, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x12, 0x46, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, + 0x34, 0x54, 0x6f, 0x73, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x47, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x55, 0x6e, + 0x75, 0x73, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, + 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, + 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x24, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x54, 0x72, 0x61, + 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe2, 0x03, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, + 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x54, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, + 0x76, 0x36, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x4a, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x54, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, @@ -126821,8 +147405,8 @@ var file_otg_proto_rawDesc = []byte{ 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x1f, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, - 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, + 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, @@ -126830,8 +147414,8 @@ var file_otg_proto_rawDesc = []byte{ 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x95, 0x01, 0x0a, 0x21, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, - 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, + 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, @@ -126839,179 +147423,50 @@ var file_otg_proto_rawDesc = []byte{ 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x22, 0xd3, 0x03, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x12, 0x46, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, - 0x76, 0x34, 0x54, 0x6f, 0x73, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x34, 0x54, 0x6f, 0x73, 0x55, - 0x6e, 0x75, 0x73, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, - 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x54, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x24, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x54, 0x72, - 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe2, 0x03, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x54, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x54, 0x72, 0x61, 0x66, - 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x36, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x4a, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x54, 0x72, 0x61, 0x66, - 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, - 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, - 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x1f, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, - 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x95, 0x01, 0x0a, 0x21, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, - 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x22, 0xd3, 0x03, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, - 0x46, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x68, 0x22, 0xa5, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, + 0x6e, 0x64, 0x6f, 0x6d, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, + 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x88, + 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, + 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x78, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9c, 0x04, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, - 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, - 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, + 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x46, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, 0x77, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x42, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, + 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x73, 0x12, 0x3b, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x46, 0x6c, 0x6f, 0x77, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x1a, + 0x62, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x58, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, + 0x6d, 0x10, 0x06, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, @@ -127181,7 +147636,7 @@ var file_otg_proto_rawDesc = []byte{ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x22, 0xb5, 0x03, 0x0a, 0x12, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x74, 0x68, 0x22, 0xe6, 0x03, 0x0a, 0x12, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x53, 0x72, 0x63, 0x12, 0x40, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x53, @@ -127201,420 +147656,76 @@ var file_otg_proto_rawDesc = []byte{ 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x53, 0x72, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, - 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, - 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x87, 0x01, 0x0a, 0x19, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x44, 0x73, - 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x44, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xb5, 0x03, 0x0a, 0x12, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x44, 0x73, 0x74, 0x12, 0x40, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x70, 0x76, 0x36, 0x44, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x44, 0x73, 0x74, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x3c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, - 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x12, 0x25, 0x0a, + 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x04, + 0x61, 0x75, 0x74, 0x6f, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, + 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x87, 0x01, 0x0a, 0x19, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x44, + 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x44, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, - 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, - 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, - 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, - 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, - 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x12, 0x44, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, - 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, - 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, - 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, - 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, - 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, - 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, - 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x12, 0x44, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, - 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, - 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, - 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x91, - 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, - 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, - 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, - 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, - 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe7, - 0x03, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, - 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x46, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, - 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, - 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, - 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, - 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x9d, 0x01, 0x0a, 0x29, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, - 0x70, 0x43, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xfb, 0x03, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, - 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, - 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, - 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x4f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, - 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x99, - 0x01, 0x0a, 0x2b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, - 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa1, 0x01, 0x0a, 0x2d, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, - 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, - 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x8f, - 0x04, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, - 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x52, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4e, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4e, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x53, - 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, - 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe6, 0x03, 0x0a, 0x12, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x44, 0x73, 0x74, 0x12, 0x40, + 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x70, 0x76, 0x36, 0x44, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x44, 0x73, 0x74, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x3c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x41, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x44, 0x73, 0x74, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x73, 0x12, 0x25, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x70, 0x76, 0x36, 0x41, + 0x75, 0x74, 0x6f, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x05, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x30, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, - 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x30, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x30, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x30, 0x2e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, - 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x30, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, - 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x30, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0b, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x30, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, - 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, - 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, - 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x31, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, 0x03, 0x0a, - 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, - 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x31, 0x12, - 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x31, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, - 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, - 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, - 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x31, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, - 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, - 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, + 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, + 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, @@ -127622,80 +147733,27 @@ var file_otg_proto_rawDesc = []byte{ 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x2e, 0x43, 0x68, 0x6f, + 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x12, + 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, - 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, - 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0b, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, - 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x33, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, - 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, - 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, - 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x33, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, 0x03, 0x0a, - 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, - 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x33, 0x12, - 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x33, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, - 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x33, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, - 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x33, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, - 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x33, 0x4d, 0x65, + 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, @@ -127704,18 +147762,17 @@ var file_otg_proto_rawDesc = []byte{ 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x34, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, - 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, + 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, + 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, @@ -127723,80 +147780,27 @@ var file_otg_proto_rawDesc = []byte{ 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, 0x2e, 0x43, 0x68, 0x6f, + 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x12, + 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, - 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, - 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0b, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, - 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x35, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, - 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, - 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, - 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x35, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, 0x03, 0x0a, - 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, - 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x35, 0x12, - 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x35, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, - 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x35, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, - 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x35, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, - 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x35, 0x4d, 0x65, + 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, @@ -127805,99 +147809,99 @@ var file_otg_proto_rawDesc = []byte{ 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x36, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, - 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, 0x2e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, - 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, - 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0b, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, - 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x37, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, - 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, - 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, - 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x37, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, 0x03, 0x0a, - 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, - 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x37, 0x12, - 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x37, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x22, 0x91, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, + 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, + 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x22, 0xe7, 0x03, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, - 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x37, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x12, 0x46, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x4b, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, + 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x27, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x9d, 0x01, 0x0a, 0x29, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0xfb, 0x03, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, - 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x37, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, + 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, - 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x37, 0x4d, 0x65, + 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, @@ -127906,117 +147910,19 @@ var file_otg_proto_rawDesc = []byte{ 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x90, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x44, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, - 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe2, - 0x03, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, - 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x12, 0x49, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, - 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, - 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0b, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, - 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, - 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, - 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, - 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x22, 0xe2, 0x03, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, - 0x63, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x53, 0x72, 0x63, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x45, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, - 0x65, 0x53, 0x72, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x28, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, - 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x9e, 0x01, 0x0a, 0x2a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, + 0x22, 0x99, 0x01, 0x0a, 0x2b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, + 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa1, 0x01, 0x0a, + 0x2d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, + 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, @@ -128024,41 +147930,92 @@ var file_otg_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0x80, 0x04, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, + 0x22, 0x8f, 0x04, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x52, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, + 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x4e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x4e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x53, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, + 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x30, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x30, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, + 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x30, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, + 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x30, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, - 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, - 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, - 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x2c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, + 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, + 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x30, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, + 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x30, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, + 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x30, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, @@ -128066,52 +148023,100 @@ var file_otg_proto_rawDesc = []byte{ 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0xa2, 0x01, 0x0a, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x94, 0x04, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, - 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, - 0x53, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x0b, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, - 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x91, 0x01, 0x0a, - 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x75, + 0x22, 0x9b, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x31, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, + 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, + 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x31, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x31, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, + 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x31, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, + 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, + 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, + 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x2e, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, + 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, + 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, + 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x33, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, @@ -128119,178 +148124,90 @@ var file_otg_proto_rawDesc = []byte{ 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe7, 0x03, 0x0a, - 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, - 0x72, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x2e, 0x43, + 0x22, 0x9b, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x33, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, + 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, + 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x33, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x33, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, + 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x33, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x33, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x33, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, + 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x34, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, + 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, + 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, - 0x63, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x54, 0x63, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, - 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, - 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, - 0x63, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, - 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, - 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x54, 0x63, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, - 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, - 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x73, 0x74, 0x50, - 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, - 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, - 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, - 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x65, 0x71, 0x4e, 0x75, - 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x65, 0x71, 0x4e, 0x75, - 0x6d, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, - 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, - 0x53, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, - 0x53, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, - 0x63, 0x70, 0x53, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, + 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x34, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, + 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, + 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x34, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, @@ -128298,93 +148215,100 @@ var file_otg_proto_rawDesc = []byte{ 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x41, 0x63, 0x6b, - 0x4e, 0x75, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x41, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, - 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x41, 0x63, 0x6b, - 0x4e, 0x75, 0x6d, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x41, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x2e, 0x43, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x35, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x9b, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x35, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, + 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, + 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x35, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x35, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, + 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x35, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x35, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x35, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, + 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x36, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, + 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, + 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, - 0x63, 0x70, 0x41, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, - 0x63, 0x70, 0x41, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x54, 0x63, 0x70, 0x41, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, - 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8d, 0x01, 0x0a, - 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, - 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x95, 0x01, 0x0a, - 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, - 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0xd3, 0x03, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x12, 0x46, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x54, 0x63, 0x70, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x42, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x61, - 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, + 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x36, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, + 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, + 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x36, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, @@ -128392,45 +148316,99 @@ var file_otg_proto_rawDesc = []byte{ 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x1a, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, - 0x4e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x37, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x9b, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x37, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, + 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, + 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x37, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x37, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, + 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x37, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x50, 0x66, 0x63, 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x37, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x66, 0x63, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x37, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, + 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, + 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x4e, 0x73, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xba, 0x03, 0x0a, 0x13, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x4e, 0x73, - 0x12, 0x41, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x4e, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, - 0x6e, 0x4e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, - 0x4e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, - 0x6e, 0x4e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x44, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, + 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x22, 0xe2, 0x03, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, + 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, + 0x73, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x45, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x44, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x44, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, @@ -128438,8 +148416,58 @@ var file_otg_proto_rawDesc = []byte{ 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x77, 0x72, 0x43, 0x6f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x22, 0xe2, 0x03, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x53, 0x72, 0x63, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x53, 0x72, 0x63, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x45, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, + 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x4a, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, + 0x75, 0x73, 0x65, 0x53, 0x72, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, + 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x28, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, @@ -128447,267 +148475,545 @@ var file_otg_proto_rawDesc = []byte{ 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x77, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x77, 0x72, 0x12, 0x42, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x77, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x74, 0x22, 0x9e, 0x01, 0x0a, 0x2a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0x80, 0x04, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, + 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x54, + 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x2c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0xa2, 0x01, 0x0a, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x94, 0x04, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, + 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x53, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, + 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x0b, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, + 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x91, + 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe7, + 0x03, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x46, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, + 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, + 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, + 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, + 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xa2, 0x01, 0x0a, 0x1b, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x72, 0x63, + 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x03, 0x6d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, + 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x78, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x73, 0x65, 0x65, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x8a, 0x04, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, + 0x63, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x72, + 0x63, 0x50, 0x6f, 0x72, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, + 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, + 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x72, 0x63, + 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x12, 0x38, 0x0a, 0x06, 0x72, 0x61, 0x6e, + 0x64, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x72, + 0x63, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x52, 0x06, 0x72, 0x61, 0x6e, + 0x64, 0x6f, 0x6d, 0x1a, 0x62, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x58, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x72, + 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x10, 0x06, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, + 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, + 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x73, 0x74, 0x50, + 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xa2, + 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, + 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x12, 0x15, + 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x03, 0x6d, + 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, + 0x73, 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x73, 0x65, + 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x78, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x8a, 0x04, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x43, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, + 0x63, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, - 0x43, 0x77, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, - 0x43, 0x77, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, - 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, - 0x63, 0x6e, 0x43, 0x77, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x45, 0x63, 0x68, - 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x73, 0x74, + 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x73, + 0x74, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, + 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x12, 0x38, 0x0a, + 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, + 0x63, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x52, + 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x1a, 0x62, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x58, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, + 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, + 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x12, + 0x0a, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x10, 0x06, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x54, 0x63, 0x70, 0x53, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, + 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, + 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, + 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, + 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x54, 0x63, 0x70, 0x53, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x65, + 0x71, 0x4e, 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x53, 0x65, 0x71, 0x4e, 0x75, 0x6d, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, + 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x54, 0x63, 0x70, 0x41, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, + 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, + 0x70, 0x41, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x54, 0x63, 0x70, 0x41, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x12, 0x42, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, + 0x41, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x41, 0x63, 0x6b, 0x4e, 0x75, 0x6d, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x41, 0x63, 0x6b, 0x4e, 0x75, 0x6d, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x41, 0x63, 0x6b, 0x4e, + 0x75, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, + 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, + 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x45, 0x63, 0x68, 0x6f, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x45, - 0x63, 0x68, 0x6f, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x45, 0x63, 0x68, 0x6f, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x45, 0x63, 0x68, 0x6f, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, - 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x55, 0x72, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x95, 0x01, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xd3, 0x03, 0x0a, + 0x18, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, + 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x61, + 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x61, 0x74, 0x61, + 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, + 0x44, 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, + 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x4e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, + 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, + 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, + 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x90, 0x01, + 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, + 0x45, 0x63, 0x6e, 0x4e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, + 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x22, 0xba, 0x03, 0x0a, 0x13, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x4e, 0x73, 0x12, 0x41, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, + 0x4e, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3d, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x4e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3d, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x4e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x4e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, + 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, + 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, + 0x45, 0x63, 0x6e, 0x43, 0x77, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, + 0x77, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xbf, 0x03, + 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, + 0x45, 0x63, 0x6e, 0x43, 0x77, 0x72, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x77, + 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3e, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x77, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x77, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, + 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x43, 0x77, 0x72, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, + 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, + 0x63, 0x70, 0x45, 0x63, 0x6e, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, - 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, - 0x74, 0x6c, 0x55, 0x72, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x55, 0x72, 0x67, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, - 0x6c, 0x55, 0x72, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x55, 0x72, 0x67, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x55, 0x72, 0x67, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x55, 0x72, 0x67, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, - 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x41, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, - 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, - 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, - 0x70, 0x43, 0x74, 0x6c, 0x41, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x41, 0x63, 0x6b, 0x12, 0x42, 0x0a, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, - 0x43, 0x74, 0x6c, 0x41, 0x63, 0x6b, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x41, 0x63, 0x6b, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x41, 0x63, 0x6b, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x41, - 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, - 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, - 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x50, 0x73, 0x68, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x50, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x50, 0x73, 0x68, 0x12, 0x42, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, - 0x63, 0x70, 0x43, 0x74, 0x6c, 0x50, 0x73, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x50, - 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x50, - 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, - 0x6c, 0x50, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x52, 0x73, 0x74, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, - 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x52, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x52, 0x73, 0x74, 0x12, - 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x52, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, - 0x6c, 0x52, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, - 0x6c, 0x52, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, + 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, + 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, + 0x63, 0x6e, 0x45, 0x63, 0x68, 0x6f, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, + 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x43, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, - 0x43, 0x74, 0x6c, 0x52, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, + 0x45, 0x63, 0x6e, 0x45, 0x63, 0x68, 0x6f, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x45, 0x63, + 0x68, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, 0x63, 0x6e, 0x45, + 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, + 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x45, + 0x63, 0x6e, 0x45, 0x63, 0x68, 0x6f, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, @@ -128716,8 +149022,8 @@ var file_otg_proto_rawDesc = []byte{ 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x53, 0x79, - 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x55, 0x72, + 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, @@ -128725,7 +149031,7 @@ var file_otg_proto_rawDesc = []byte{ 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x53, 0x79, 0x6e, 0x4d, 0x65, 0x74, + 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x55, 0x72, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, @@ -128734,10 +149040,10 @@ var file_otg_proto_rawDesc = []byte{ 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x53, 0x79, - 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x55, 0x72, + 0x67, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x53, 0x79, 0x6e, 0x2e, 0x43, 0x68, 0x6f, + 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x55, 0x72, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, @@ -128745,15 +149051,15 @@ var file_otg_proto_rawDesc = []byte{ 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, - 0x43, 0x74, 0x6c, 0x53, 0x79, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, + 0x43, 0x74, 0x6c, 0x55, 0x72, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, - 0x43, 0x74, 0x6c, 0x53, 0x79, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, + 0x43, 0x74, 0x6c, 0x55, 0x72, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, - 0x63, 0x70, 0x43, 0x74, 0x6c, 0x53, 0x79, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x63, 0x70, 0x43, 0x74, 0x6c, 0x55, 0x72, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, @@ -128763,7 +149069,7 @@ var file_otg_proto_rawDesc = []byte{ 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, - 0x46, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, + 0x41, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, @@ -128771,7 +149077,7 @@ var file_otg_proto_rawDesc = []byte{ 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x46, 0x69, 0x6e, 0x4d, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x41, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, @@ -128781,9 +149087,9 @@ var file_otg_proto_rawDesc = []byte{ 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, - 0x46, 0x69, 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x41, 0x63, 0x6b, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x46, 0x69, 0x6e, 0x2e, 0x43, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x41, 0x63, 0x6b, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, @@ -128791,15 +149097,15 @@ var file_otg_proto_rawDesc = []byte{ 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, - 0x63, 0x70, 0x43, 0x74, 0x6c, 0x46, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x63, 0x70, 0x43, 0x74, 0x6c, 0x41, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, - 0x63, 0x70, 0x43, 0x74, 0x6c, 0x46, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x63, 0x70, 0x43, 0x74, 0x6c, 0x41, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x46, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x41, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, @@ -128808,8 +149114,8 @@ var file_otg_proto_rawDesc = []byte{ 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, - 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x57, - 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, + 0x74, 0x6c, 0x50, 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, @@ -128817,8 +149123,8 @@ var file_otg_proto_rawDesc = []byte{ 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, - 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x50, 0x73, + 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, @@ -128826,10 +149132,10 @@ var file_otg_proto_rawDesc = []byte{ 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xbf, 0x03, 0x0a, - 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x57, - 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, + 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, + 0x74, 0x6c, 0x50, 0x73, 0x68, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x50, 0x73, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, @@ -128837,15 +149143,15 @@ var file_otg_proto_rawDesc = []byte{ 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x54, 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x50, 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x54, 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x50, 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, + 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x50, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, @@ -128853,92 +149159,45 @@ var file_otg_proto_rawDesc = []byte{ 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8a, - 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, - 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, - 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, - 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x53, 0x72, - 0x63, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x55, 0x64, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x53, - 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, - 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, - 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x53, 0x72, - 0x63, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, - 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, - 0x6f, 0x72, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, + 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, + 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, + 0x70, 0x43, 0x74, 0x6c, 0x52, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, + 0x52, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xbf, + 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, + 0x70, 0x43, 0x74, 0x6c, 0x52, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x52, + 0x73, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3e, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x52, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x52, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, + 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x52, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, @@ -128948,7 +149207,7 @@ var file_otg_proto_rawDesc = []byte{ 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x55, 0x64, 0x70, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x53, 0x79, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, @@ -128956,8 +149215,8 @@ var file_otg_proto_rawDesc = []byte{ 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, - 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, + 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, + 0x74, 0x6c, 0x53, 0x79, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, @@ -128966,25 +149225,25 @@ var file_otg_proto_rawDesc = []byte{ 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x55, 0x64, 0x70, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x53, 0x79, 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x4c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, + 0x6c, 0x53, 0x79, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x53, 0x79, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x53, 0x79, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x53, 0x79, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, @@ -128993,128 +149252,184 @@ var file_otg_proto_rawDesc = []byte{ 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0xe5, 0x02, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x55, 0x64, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x44, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, - 0x64, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x75, 0x6d, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x01, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, - 0x3c, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x37, 0x0a, - 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, - 0x03, 0x62, 0x61, 0x64, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x92, 0x01, 0x0a, 0x24, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, - 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xec, 0x03, 0x0a, - 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x12, 0x4b, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, - 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x47, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, - 0x65, 0x73, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x75, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x12, 0x45, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x2e, 0x43, 0x68, 0x6f, 0x69, + 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x46, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, + 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, + 0x70, 0x43, 0x74, 0x6c, 0x46, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x46, 0x69, 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, + 0x43, 0x74, 0x6c, 0x46, 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x46, 0x69, 0x6e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x46, 0x69, 0x6e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x74, 0x6c, 0x46, + 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, + 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, + 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x54, 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x42, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, + 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x57, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, + 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x57, 0x69, + 0x6e, 0x64, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe5, 0x02, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, + 0x6d, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x63, 0x70, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, + 0x02, 0x1a, 0x37, 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, + 0x01, 0x12, 0x07, 0x0a, 0x03, 0x62, 0x61, 0x64, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x8a, + 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, + 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, + 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, + 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, + 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x53, 0x72, + 0x63, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, + 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x22, 0xa2, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x55, 0x64, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, + 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, + 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x12, 0x17, + 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, + 0x73, 0x65, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, + 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, + 0x61, 0x78, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8a, 0x04, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, + 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x55, 0x64, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, - 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x53, + 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, + 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x55, 0x64, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x12, + 0x38, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x55, 0x64, 0x70, 0x53, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x6f, + 0x6d, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x1a, 0x62, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x58, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x10, 0x06, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x47, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, + 0x6f, 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, @@ -129122,8 +149437,8 @@ var file_otg_proto_rawDesc = []byte{ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, + 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, @@ -129131,106 +149446,51 @@ var file_otg_proto_rawDesc = []byte{ 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x43, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, + 0x6e, 0x67, 0x74, 0x68, 0x22, 0xa2, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, + 0x6e, 0x64, 0x6f, 0x6d, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, + 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x88, + 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x06, + 0x0a, 0x04, 0x5f, 0x6d, 0x61, 0x78, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8a, 0x04, 0x0a, 0x15, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, + 0x6f, 0x72, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x2e, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x1d, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, - 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe5, 0x02, 0x0a, 0x16, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x09, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x09, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x37, 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, - 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x62, 0x61, 0x64, 0x10, 0x02, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x43, + 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, + 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x61, 0x67, 0x73, 0x12, 0x38, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x52, + 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x1a, 0x62, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x58, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x10, + 0x06, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, @@ -129238,84 +149498,108 @@ var file_otg_proto_rawDesc = []byte{ 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x31, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x31, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, - 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, - 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, - 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x74, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x55, 0x64, 0x70, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, + 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x55, 0x64, 0x70, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, + 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe5, 0x02, 0x0a, 0x16, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x09, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x55, 0x64, + 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x10, 0x02, 0x1a, 0x37, 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x6f, 0x6f, + 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x62, 0x61, 0x64, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x22, 0x92, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, + 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, + 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0xec, 0x03, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x65, + 0x73, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, + 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x65, + 0x73, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, @@ -129324,67 +149608,279 @@ var file_otg_proto_rawDesc = []byte{ 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x91, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, - 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x30, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x30, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x30, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, + 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x30, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, + 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x22, 0xe7, 0x03, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, + 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, + 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, + 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, + 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, + 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, + 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf5, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, + 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x1a, 0x60, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x22, 0xe5, 0x02, + 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4d, + 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, + 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, + 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x37, 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, + 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x62, 0x61, 0x64, 0x10, + 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0c, 0x0a, 0x0a, + 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x31, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x46, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x1f, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, + 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x72, + 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, + 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, + 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, + 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, - 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x95, 0x01, 0x0a, 0x21, + 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, + 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x74, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x74, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, + 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, + 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, + 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, + 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, @@ -129392,168 +149888,77 @@ var file_otg_proto_rawDesc = []byte{ 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x22, 0xd3, 0x03, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x12, 0x46, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x67, 0x74, 0x68, 0x22, 0xe7, 0x03, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x74, 0x70, 0x76, 0x31, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x42, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, + 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, + 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, + 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8d, 0x01, + 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x31, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, + 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, + 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, + 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x95, 0x01, + 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x31, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xd3, 0x03, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x12, 0x46, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, - 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x52, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x45, 0x46, - 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x45, 0x46, 0x6c, 0x61, 0x67, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, - 0x45, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x45, 0x46, 0x6c, 0x61, - 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, + 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x45, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x45, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x45, 0x46, 0x6c, 0x61, 0x67, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, - 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x43, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, - 0x53, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, - 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x1d, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, - 0x50, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x6e, - 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, - 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x31, 0x50, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, + 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x42, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x52, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, + 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, - 0x31, 0x50, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x6e, 0x46, - 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, - 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x31, 0x50, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x31, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, @@ -129561,144 +149966,238 @@ var file_otg_proto_rawDesc = []byte{ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x22, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, - 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, - 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe2, 0x03, 0x0a, 0x1b, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, - 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, - 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, - 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, - 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x92, - 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xec, 0x03, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, - 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, - 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x31, 0x54, 0x65, 0x69, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, + 0x45, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x45, 0x46, 0x6c, + 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x03, + 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x31, 0x45, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x45, 0x46, + 0x6c, 0x61, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x45, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x45, 0x46, 0x6c, 0x61, 0x67, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x45, 0x46, 0x6c, + 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, + 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, + 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, + 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, + 0x70, 0x76, 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, + 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, 0x01, + 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x31, 0x50, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, - 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x1d, + 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, - 0x54, 0x65, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, - 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x31, 0x54, 0x65, 0x69, 0x64, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x54, - 0x65, 0x69, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x54, 0x65, 0x69, 0x64, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x54, 0x65, 0x69, 0x64, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x54, 0x65, 0x69, 0x64, 0x4d, + 0x50, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, + 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x44, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, + 0x70, 0x76, 0x31, 0x50, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, + 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, + 0x31, 0x50, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x74, 0x70, 0x76, 0x31, 0x50, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, + 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x90, 0x01, + 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x98, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe2, 0x03, 0x0a, 0x1b, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, + 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x45, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, + 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x92, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0xec, 0x03, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, @@ -129707,257 +150206,95 @@ var file_otg_proto_rawDesc = []byte{ 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x92, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, - 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x22, 0xec, 0x03, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x71, 0x75, 0x65, - 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, - 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x31, 0x53, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, - 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x50, 0x64, 0x75, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x50, 0x64, 0x75, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, - 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xdd, - 0x03, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x31, 0x4e, 0x50, 0x64, 0x75, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x48, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x31, 0x4e, 0x50, 0x64, 0x75, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x31, 0x4e, 0x50, 0x64, 0x75, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x44, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x50, 0x64, 0x75, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, - 0x76, 0x31, 0x4e, 0x50, 0x64, 0x75, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, - 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9c, - 0x01, 0x0a, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x31, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x54, 0x65, 0x69, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, - 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa4, 0x01, - 0x0a, 0x30, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, - 0x76, 0x31, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0x9e, 0x04, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x55, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x31, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x51, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x56, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x65, 0x78, 0x74, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, - 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x2d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0xa3, 0x01, 0x0a, 0x2f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x99, 0x04, 0x0a, 0x26, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x12, 0x54, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x50, 0x0a, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x50, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x55, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, - 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9c, 0x01, 0x0a, - 0x28, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, - 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf6, 0x03, 0x0a, 0x1f, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, - 0x4d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, + 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x31, 0x54, 0x65, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, + 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x54, 0x65, 0x69, 0x64, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, + 0x31, 0x54, 0x65, 0x69, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x49, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, + 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x54, 0x65, 0x69, 0x64, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x54, 0x65, 0x69, 0x64, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x54, 0x65, 0x69, + 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, + 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, + 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xec, 0x03, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, + 0x31, 0x53, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x47, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x74, 0x70, 0x76, 0x31, 0x53, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, @@ -129965,20 +150302,18 @@ var file_otg_proto_rawDesc = []byte{ 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x31, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x50, 0x64, 0x75, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa7, 0x01, 0x0a, 0x33, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x50, 0x64, 0x75, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, @@ -129986,33 +150321,28 @@ var file_otg_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xad, 0x04, 0x0a, 0x2a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x65, 0x78, 0x74, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, - 0x58, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x65, 0x78, - 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x22, 0xdd, 0x03, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x50, 0x64, 0x75, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x50, 0x64, 0x75, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x54, 0x0a, 0x09, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x65, 0x78, - 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x50, 0x64, 0x75, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x59, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x50, 0x64, 0x75, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x65, 0x78, 0x74, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x65, + 0x74, 0x70, 0x76, 0x31, 0x4e, 0x50, 0x64, 0x75, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, @@ -130021,8 +150351,9 @@ var file_otg_proto_rawDesc = []byte{ 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, + 0x22, 0x9c, 0x01, 0x0a, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, @@ -130030,8 +150361,9 @@ var file_otg_proto_rawDesc = []byte{ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0xa4, 0x01, 0x0a, 0x30, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, + 0x74, 0x70, 0x76, 0x31, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, @@ -130039,28 +150371,87 @@ var file_otg_proto_rawDesc = []byte{ 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x9e, 0x04, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x65, 0x78, 0x74, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x55, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, + 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x51, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, + 0x6e, 0x74, 0x12, 0x56, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x31, 0x4e, 0x65, + 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x2d, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa3, 0x01, 0x0a, 0x2f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x99, 0x04, 0x0a, 0x26, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x54, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x50, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x50, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x55, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, + 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, @@ -130068,9 +150459,214 @@ var file_otg_proto_rawDesc = []byte{ 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x50, 0x69, 0x67, 0x67, - 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, + 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9c, + 0x01, 0x0a, 0x28, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, + 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf6, 0x03, + 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x4d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x0b, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x31, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa7, 0x01, 0x0a, 0x33, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0xad, 0x04, 0x0a, 0x2a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x65, + 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x58, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, + 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x54, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, + 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x59, 0x0a, 0x0b, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x65, 0x78, + 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, + 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, + 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x27, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x50, 0x69, + 0x67, 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x9d, 0x01, 0x0a, 0x29, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x50, 0x69, 0x67, 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, + 0x6e, 0x67, 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, + 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x22, 0xfb, 0x03, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x50, 0x69, 0x67, 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, + 0x6e, 0x67, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x4e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x50, 0x69, 0x67, + 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x61, 0x67, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, + 0x70, 0x76, 0x32, 0x50, 0x69, 0x67, 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, + 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x50, + 0x69, 0x67, 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x61, 0x67, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x4f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x50, 0x69, 0x67, + 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, + 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x8d, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, + 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, @@ -130078,40 +150674,37 @@ var file_otg_proto_rawDesc = []byte{ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x9d, 0x01, 0x0a, 0x29, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x32, 0x50, 0x69, 0x67, 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, - 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, - 0xfb, 0x03, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x32, 0x50, 0x69, 0x67, 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, - 0x46, 0x6c, 0x61, 0x67, 0x12, 0x4e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x50, 0x69, 0x67, 0x67, 0x79, - 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x61, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, - 0x32, 0x50, 0x69, 0x67, 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x61, + 0x95, 0x01, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, + 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xd3, 0x03, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, + 0x46, 0x6c, 0x61, 0x67, 0x12, 0x46, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x46, + 0x6c, 0x61, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x42, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x50, 0x69, 0x67, - 0x67, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x4f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x50, 0x69, 0x67, 0x67, 0x79, - 0x62, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, + 0x64, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, + 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, @@ -130119,47 +150712,242 @@ var file_otg_proto_rawDesc = []byte{ 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8d, 0x01, - 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, - 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, 0x01, + 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, + 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, + 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, + 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x1f, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, + 0x53, 0x70, 0x61, 0x72, 0x65, 0x31, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, + 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x31, 0x12, 0x44, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, + 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x31, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, + 0x70, 0x61, 0x72, 0x65, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, + 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x31, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, + 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x90, 0x01, + 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x98, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe2, 0x03, 0x0a, 0x1b, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, + 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x45, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, + 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x92, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0xec, 0x03, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, - 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x95, 0x01, - 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, - 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xd3, 0x03, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x46, 0x6c, - 0x61, 0x67, 0x12, 0x46, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x46, 0x6c, 0x61, - 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x42, 0x0a, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x43, + 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, + 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, + 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, + 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x22, 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, + 0x32, 0x54, 0x65, 0x69, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x42, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x46, - 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, - 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, + 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, + 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, + 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, + 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x27, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, - 0x32, 0x54, 0x65, 0x69, 0x64, 0x46, 0x6c, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x32, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x4d, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, @@ -130169,7 +150957,7 @@ var file_otg_proto_rawDesc = []byte{ 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, - 0x53, 0x70, 0x61, 0x72, 0x65, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x53, 0x70, 0x61, 0x72, 0x65, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, @@ -130178,7 +150966,7 @@ var file_otg_proto_rawDesc = []byte{ 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x70, - 0x61, 0x72, 0x65, 0x31, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, + 0x61, 0x72, 0x65, 0x32, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, @@ -130187,10 +150975,10 @@ var file_otg_proto_rawDesc = []byte{ 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc9, 0x03, 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x31, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, + 0x74, 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x32, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, - 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x31, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x32, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, @@ -130198,15 +150986,15 @@ var file_otg_proto_rawDesc = []byte{ 0x75, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, - 0x72, 0x65, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x72, 0x65, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, - 0x70, 0x61, 0x72, 0x65, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, + 0x70, 0x61, 0x72, 0x65, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x31, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x32, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, @@ -130214,640 +151002,243 @@ var file_otg_proto_rawDesc = []byte{ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x22, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, - 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, - 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe2, 0x03, 0x0a, 0x1b, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, - 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, - 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, - 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, - 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x92, - 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xec, 0x03, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x47, 0x74, 0x70, 0x76, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, - 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, - 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, - 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, - 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x1d, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, - 0x54, 0x65, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, - 0xbf, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, - 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, - 0x65, 0x69, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x21, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, + 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, + 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, + 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, + 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97, 0x01, + 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, + 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xdd, 0x03, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, + 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, + 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, + 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, + 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x49, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97, 0x01, 0x0a, 0x23, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x22, 0xdd, 0x03, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, + 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x54, 0x65, 0x69, 0x64, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x65, 0x71, 0x75, - 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf1, 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, - 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, - 0x70, 0x76, 0x32, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x65, 0x71, - 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x1d, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x70, - 0x61, 0x72, 0x65, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, - 0x65, 0x32, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc9, 0x03, - 0x0a, 0x16, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, - 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x32, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, - 0x70, 0x61, 0x72, 0x65, 0x32, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x40, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, - 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, 0x32, 0x53, 0x70, 0x61, - 0x72, 0x65, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, - 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x47, 0x74, 0x70, 0x76, - 0x32, 0x53, 0x70, 0x61, 0x72, 0x65, 0x32, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, - 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x21, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, - 0x77, 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, - 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, - 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97, 0x01, 0x0a, 0x23, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, - 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xdd, 0x03, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x44, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, - 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, + 0x44, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, + 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0b, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, + 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, + 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, + 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x22, 0xdd, 0x03, 0x0a, 0x1a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, - 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x44, 0x0a, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, - 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0b, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x91, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, - 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x22, 0xe7, 0x03, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x46, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, + 0x72, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x22, 0xe7, 0x03, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, - 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, - 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, - 0x61, 0x72, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x23, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, - 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe7, 0x03, 0x0a, 0x1c, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x4a, 0x0a, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, - 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, + 0x61, 0x72, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, + 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x48, 0x61, 0x72, + 0x64, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, + 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x91, 0x01, + 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe7, 0x03, + 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x4a, + 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x46, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, + 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, - 0x70, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, - 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x95, 0x01, 0x0a, - 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, - 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9d, 0x01, 0x0a, 0x29, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, - 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0xfb, 0x03, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, - 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x4e, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, - 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, - 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, - 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, - 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, - 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9d, 0x01, 0x0a, 0x29, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, - 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xfb, 0x03, 0x0a, 0x20, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12, - 0x4e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x0b, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, - 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x9d, 0x01, 0x0a, 0x29, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, - 0x65, 0x41, 0x64, 0x64, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xfb, 0x03, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, - 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x4e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x2e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, - 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, - 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x4f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x4d, 0x65, 0x74, 0x72, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xce, 0x03, + 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x41, 0x72, 0x70, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, @@ -130857,7 +151248,7 @@ var file_otg_proto_rawDesc = []byte{ 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, - 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, + 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, @@ -130866,8 +151257,8 @@ var file_otg_proto_rawDesc = []byte{ 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9d, 0x01, 0x0a, 0x29, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, + 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, @@ -130876,11 +151267,11 @@ var file_otg_proto_rawDesc = []byte{ 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xfb, 0x03, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12, 0x4e, 0x0a, 0x06, 0x63, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, + 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x4e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, - 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, + 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, @@ -130888,17 +151279,17 @@ var file_otg_proto_rawDesc = []byte{ 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, 0x64, + 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, - 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, - 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, + 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, @@ -130907,167 +151298,50 @@ var file_otg_proto_rawDesc = []byte{ 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, - 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, - 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, - 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, - 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, - 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, - 0x70, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, - 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, - 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x45, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, - 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, - 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0xf4, 0x02, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x75, 0x6d, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x52, 0x0a, - 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x75, 0x6d, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x01, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x88, 0x01, - 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3c, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x10, 0x01, - 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x37, 0x0a, 0x09, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, - 0x62, 0x61, 0x64, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x92, 0x01, 0x0a, 0x24, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, - 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, - 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9a, - 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, - 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xec, 0x03, 0x0a, 0x1d, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, - 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x4b, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x47, 0x0a, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, - 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, + 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9d, 0x01, 0x0a, + 0x29, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, + 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xfb, 0x03, 0x0a, + 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, + 0x72, 0x12, 0x4e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x4a, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, @@ -131075,95 +151349,19 @@ var file_otg_proto_rawDesc = []byte{ 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x28, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, - 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x9e, 0x01, 0x0a, 0x2a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, - 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0x80, 0x04, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, - 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, - 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4b, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, - 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xfa, 0x02, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x09, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x06, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x37, 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, - 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x62, 0x61, 0x64, 0x10, 0x02, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x98, 0x01, 0x0a, 0x2a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x73, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0xa0, 0x01, 0x0a, 0x2c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x27, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x9d, 0x01, 0x0a, 0x29, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x61, 0x72, 0x64, 0x77, + 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, @@ -131171,182 +151369,30 @@ var file_otg_proto_rawDesc = []byte{ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x22, 0x8a, 0x04, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, - 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x4d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x73, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x4d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x73, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x52, - 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x73, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, - 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, - 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x9c, 0x01, 0x0a, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x53, 0x65, 0x71, - 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, - 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa4, - 0x01, 0x0a, 0x30, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, - 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x53, 0x65, 0x71, 0x75, - 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x9e, 0x04, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x73, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x55, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x73, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x53, 0x65, - 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x51, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x73, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x56, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, - 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x96, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, - 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xd8, 0x03, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x47, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, + 0x74, 0x68, 0x22, 0xfb, 0x03, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x61, 0x72, 0x64, 0x77, + 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x4e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x43, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, - 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, - 0x36, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x20, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, - 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x96, 0x01, 0x0a, - 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, - 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xd8, 0x03, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, - 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x43, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, - 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, - 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x4d, 0x65, + 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, + 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, + 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, @@ -131355,262 +151401,18 @@ var file_otg_proto_rawDesc = []byte{ 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x94, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x28, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, - 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf6, 0x03, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, - 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, - 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, - 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, - 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, - 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x98, 0x01, 0x0a, 0x2a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa0, 0x01, 0x0a, 0x2c, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, - 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x8a, 0x04, - 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, - 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, - 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x52, 0x0a, 0x0b, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, - 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, - 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xfa, 0x02, 0x0a, 0x1d, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, - 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x4b, 0x0a, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, - 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, - 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x09, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, - 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, - 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x01, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x0d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, - 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x37, 0x0a, 0x09, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x08, 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x62, 0x61, - 0x64, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0c, - 0x0a, 0x0a, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x80, 0x03, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x4d, 0x0a, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, - 0x70, 0x76, 0x36, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, - 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x56, 0x0a, 0x09, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x63, 0x6d, 0x70, 0x76, 0x36, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x75, 0x6d, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x01, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x88, - 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, - 0x3c, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x37, 0x0a, - 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, - 0x03, 0x62, 0x61, 0x64, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x03, 0x0a, - 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, - 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, - 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x50, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, - 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x50, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x50, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, - 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8f, 0x01, 0x0a, - 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, - 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97, - 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, - 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, + 0x22, 0x95, 0x01, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9d, 0x01, 0x0a, 0x29, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, @@ -131618,994 +151420,870 @@ var file_otg_proto_rawDesc = []byte{ 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x89, 0x04, 0x0a, 0x1a, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x50, 0x70, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, - 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0b, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x50, 0x70, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x73, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x08, - 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x61, 0x75, 0x74, 0x6f, 0x22, 0x8d, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x95, 0x01, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xd3, 0x03, 0x0a, - 0x18, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, - 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, - 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, - 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x0b, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, - 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x67, 0x6d, 0x70, 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, 0x12, 0x43, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, - 0x31, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, - 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x67, 0x6d, 0x70, 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, - 0x31, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, - 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, - 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, - 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x12, 0x45, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x67, 0x6d, 0x70, 0x76, 0x31, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, - 0x76, 0x31, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, - 0x67, 0x6d, 0x70, 0x76, 0x31, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, - 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0xee, 0x02, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, - 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, - 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x50, 0x0a, 0x09, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, - 0x6d, 0x70, 0x76, 0x31, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x09, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x37, 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, - 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x62, 0x61, 0x64, 0x10, 0x02, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x22, 0x92, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xec, 0x03, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, - 0x76, 0x31, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x47, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, - 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, - 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x4d, 0x70, 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x22, 0xeb, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x42, 0x0a, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, - 0x70, 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, - 0x67, 0x73, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, - 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, - 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, - 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xfb, 0x03, 0x0a, 0x20, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12, 0x4e, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, + 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x41, 0x64, 0x64, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x4a, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x41, 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x41, + 0x72, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x41, 0x64, 0x64, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, + 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, - 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x22, 0xe2, 0x03, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x45, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, - 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0b, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x42, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x4f, - 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x42, 0x6f, 0x74, - 0x74, 0x6f, 0x6d, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x93, 0x04, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x42, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x4f, - 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x42, 0x6f, 0x74, 0x74, - 0x6f, 0x6d, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x46, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x42, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x4f, 0x66, 0x53, - 0x74, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x42, - 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, - 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x42, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x4f, - 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, - 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x60, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, - 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x22, 0x8e, 0x01, 0x0a, 0x20, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, - 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x96, 0x01, 0x0a, - 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, - 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xd8, 0x03, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, - 0x69, 0x76, 0x65, 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, - 0x69, 0x76, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x43, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, - 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x69, 0x6d, - 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, - 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, - 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, - 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x8e, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0x8e, 0x03, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x43, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, - 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, - 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa2, 0x03, 0x0a, 0x1e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, - 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, - 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, - 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, - 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x94, 0x01, - 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, - 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa6, 0x03, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x4d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, - 0x63, 0x50, 0x44, 0x55, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, - 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, - 0x63, 0x50, 0x44, 0x55, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, + 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xce, 0x03, 0x0a, + 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, + 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, + 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x54, + 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, + 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x97, 0x01, - 0x0a, 0x29, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, - 0x70, 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x02, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb2, 0x03, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, 0x75, - 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x50, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, - 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, - 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x4c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, - 0x6b, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, - 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xfe, 0x01, 0x0a, - 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, - 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4e, 0x6f, 0x6e, 0x52, 0x65, 0x70, - 0x65, 0x61, 0x74, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, - 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4e, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x38, - 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2e, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9c, 0x01, - 0x0a, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, - 0x70, 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4d, 0x61, 0x78, 0x52, 0x65, - 0x70, 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, + 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, + 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xc6, 0x03, 0x0a, - 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, - 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x70, - 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, - 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x65, 0x74, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x51, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, 0x75, - 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x65, 0x74, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, - 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x65, 0x74, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x39, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0xf2, 0x03, 0x0a, 0x32, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, - 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, - 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x60, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x43, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x05, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, - 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, - 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, + 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, + 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, + 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, + 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x3b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, - 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0xf4, 0x02, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x52, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, + 0x1a, 0x3c, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x37, + 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x07, + 0x0a, 0x03, 0x62, 0x61, 0x64, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x92, 0x01, 0x0a, 0x24, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, + 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0xfa, 0x03, 0x0a, 0x34, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x70, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x62, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x45, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, - 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xec, 0x03, + 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, + 0x70, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, + 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, + 0x70, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, + 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x96, 0x01, 0x0a, + 0x28, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, + 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9e, 0x01, 0x0a, 0x2a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x80, 0x04, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, + 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x5e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x5e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x4b, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x0b, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x63, 0x6d, 0x70, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xfa, 0x02, 0x0a, 0x1d, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x4b, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, + 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, + 0x70, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, + 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, + 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, + 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x37, 0x0a, 0x09, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x08, 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x62, 0x61, 0x64, + 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0c, 0x0a, + 0x0a, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x98, 0x01, 0x0a, 0x2a, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0xa0, 0x01, 0x0a, 0x2c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x22, 0x8a, 0x04, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, + 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x4d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x52, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x53, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0xa4, 0x01, 0x0a, 0x30, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x53, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x9e, 0x04, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x73, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x51, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x51, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x73, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x56, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, + 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x4e, 0x65, + 0x78, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, + 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, + 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x96, 0x01, 0x0a, 0x22, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, + 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0xd8, 0x03, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x43, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, + 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, + 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa7, 0x01, - 0x0a, 0x39, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, - 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf2, 0x03, 0x0a, 0x32, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x60, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x43, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x5c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, + 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8e, 0x01, + 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, + 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x96, + 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, + 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xd8, 0x03, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, + 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, + 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x43, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, + 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, + 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x6f, 0x64, 0x65, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, + 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x28, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, + 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xf6, 0x03, 0x0a, 0x1f, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, + 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, + 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x49, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, + 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, + 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, + 0x36, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x98, 0x01, 0x0a, 0x2a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, + 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa0, 0x01, 0x0a, + 0x2c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, + 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, + 0x8a, 0x04, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, + 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4d, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x52, 0x0a, 0x0b, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x31, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa9, 0x01, 0x0a, - 0x3b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, - 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x74, 0x69, 0x63, 0x6b, 0x73, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xfa, 0x03, 0x0a, 0x34, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x62, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x45, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, - 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, - 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x74, 0x69, 0x63, 0x6b, - 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, - 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x74, 0x69, 0x63, 0x6b, - 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xfa, 0x02, 0x0a, + 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, + 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x4b, + 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x09, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x45, 0x63, 0x68, 0x6f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x75, 0x6d, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x01, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3c, + 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, + 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x10, 0x01, + 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x37, 0x0a, 0x09, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, + 0x62, 0x61, 0x64, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x80, 0x03, 0x0a, 0x1f, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x4d, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x63, 0x6d, 0x70, 0x76, 0x36, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x56, 0x0a, 0x09, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x63, 0x6d, 0x70, 0x76, 0x36, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, + 0x01, 0x1a, 0x3c, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, + 0x37, 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, + 0x07, 0x0a, 0x03, 0x62, 0x61, 0x64, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x8a, 0x01, 0x0a, + 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, + 0x03, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, + 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x3c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x69, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0xfe, 0x03, 0x0a, 0x35, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x69, 0x67, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x63, 0x0a, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, - 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x69, 0x67, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, - 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x42, 0x69, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, - 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x69, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x50, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, + 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, + 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x50, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, + 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8f, + 0x01, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, + 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x97, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x50, 0x70, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, + 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x89, 0x04, 0x0a, 0x1a, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, + 0x44, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, + 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x70, 0x70, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0b, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x50, 0x70, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, + 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x56, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, - 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, - 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x41, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x6e, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x04, 0x0a, 0x3a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x68, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x64, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, - 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, - 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, - 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x28, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, - 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0xae, 0x03, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x4f, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, - 0x32, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, - 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4b, 0x0a, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, - 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, + 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x22, 0x8d, 0x01, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x95, 0x01, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xd3, + 0x03, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, + 0x6d, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, + 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, + 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, + 0x67, 0x6d, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, + 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0xf4, 0x02, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x52, 0x73, 0x76, 0x70, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x52, 0x73, 0x76, 0x70, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x52, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x52, 0x73, 0x76, 0x70, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, - 0x1a, 0x3c, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x37, - 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x07, - 0x0a, 0x03, 0x62, 0x61, 0x64, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x8e, 0x01, 0x0a, 0x20, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x54, - 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8e, 0x03, 0x0a, - 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, - 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, - 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x54, - 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x52, 0x73, 0x76, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xc4, 0x03, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x26, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, + 0x70, 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, + 0x6d, 0x70, 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, @@ -132613,251 +152291,568 @@ var file_otg_proto_rawDesc = []byte{ 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, - 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, - 0x70, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, + 0x70, 0x76, 0x31, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x86, 0x03, 0x0a, - 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x52, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x52, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x52, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb5, 0x01, 0x0a, 0x47, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, - 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x50, 0x6f, - 0x69, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, - 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xaa, 0x04, - 0x0a, 0x40, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x6e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x51, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, - 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x69, - 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x6a, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x6a, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, - 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x50, - 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, - 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x36, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0xe6, 0x03, 0x0a, 0x2f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x5d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x40, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, - 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x01, 0x0a, + 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, + 0x76, 0x31, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x22, 0xce, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x12, + 0x45, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, + 0x6d, 0x70, 0x76, 0x31, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x55, 0x6e, 0x75, 0x73, + 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, + 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, + 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0xee, 0x02, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x75, 0x6d, 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x50, 0x0a, 0x09, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, + 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, + 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, 0x1a, 0x37, 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, + 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x62, 0x61, 0x64, 0x10, + 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0c, 0x0a, 0x0a, + 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x92, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x26, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xec, 0x03, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, + 0x31, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, + 0x6d, 0x70, 0x76, 0x31, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x59, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, - 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, - 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x36, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0xe6, 0x03, 0x0a, 0x2f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x5d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x40, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, - 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, + 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x49, 0x67, 0x6d, 0x70, 0x76, 0x31, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xeb, 0x03, 0x0a, 0x14, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, + 0x42, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, 0x12, + 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x43, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x54, 0x61, 0x67, 0x73, 0x1a, 0x60, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, + 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x08, + 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x61, 0x75, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, + 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x22, 0xe2, 0x03, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x45, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, + 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4a, + 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x23, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x42, 0x6f, 0x74, 0x74, 0x6f, + 0x6d, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, + 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, + 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, + 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x25, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x42, + 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x93, 0x04, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x42, 0x6f, 0x74, 0x74, 0x6f, + 0x6d, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x42, 0x6f, + 0x74, 0x74, 0x6f, 0x6d, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x59, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, - 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, - 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x88, 0x01, 0x01, + 0x12, 0x46, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x42, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x4f, + 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, + 0x73, 0x42, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x4b, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x42, 0x6f, 0x74, 0x74, 0x6f, + 0x6d, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, + 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x60, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x35, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0xe2, 0x03, 0x0a, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, - 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, 0x6e, 0x74, 0x65, - 0x67, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, - 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, - 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x58, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, - 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x32, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, - 0x73, 0x49, 0x70, 0x76, 0x34, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xd6, 0x03, 0x0a, 0x2b, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x49, 0x64, 0x41, 0x73, 0x49, 0x70, 0x76, 0x34, 0x12, 0x59, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, 0x70, 0x76, 0x34, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, - 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, 0x70, 0x76, 0x34, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x55, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, 0x70, - 0x76, 0x34, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x30, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, - 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x10, + 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, + 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x22, 0x8e, 0x01, + 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, + 0x73, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x96, + 0x01, 0x0a, 0x22, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, + 0x6c, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, + 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xd8, 0x03, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x54, + 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x54, + 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x43, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, + 0x4c, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, + 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x4d, 0x70, 0x6c, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, + 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, + 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x8e, 0x03, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x47, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, + 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, + 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa2, 0x03, 0x0a, 0x1e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, + 0x63, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x4c, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, + 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x49, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x48, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, + 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, + 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x94, 0x01, 0x0a, 0x26, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, + 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa6, 0x03, 0x0a, 0x1f, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x4d, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, + 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, + 0x76, 0x32, 0x63, 0x50, 0x44, 0x55, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, + 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x97, 0x01, 0x0a, 0x29, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, + 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb2, 0x03, 0x0a, 0x22, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, + 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, + 0x12, 0x50, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, + 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, + 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, + 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, + 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xfe, + 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, + 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4e, 0x6f, 0x6e, 0x52, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, + 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4e, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x1a, 0x38, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2e, 0x0a, 0x04, 0x45, 0x6e, + 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x9c, 0x01, 0x0a, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, + 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4d, 0x61, 0x78, + 0x52, 0x65, 0x70, 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xc6, + 0x03, 0x0a, 0x27, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, + 0x6d, 0x70, 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4d, 0x61, 0x78, 0x52, + 0x65, 0x70, 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, + 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x70, + 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x51, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, + 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x70, 0x65, 0x74, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, + 0x76, 0x32, 0x63, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x44, 0x55, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x70, + 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x39, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, + 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0xf2, 0x03, 0x0a, 0x32, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x65, + 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x60, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x43, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, + 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5c, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, + 0x65, 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, + 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x3b, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, @@ -132865,154 +152860,158 @@ var file_otg_proto_rawDesc = []byte{ 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0xce, 0x03, 0x0a, 0x29, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, - 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x57, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, - 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x53, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, - 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x53, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, - 0x76, 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, - 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, - 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, - 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x3b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, - 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, - 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0xfa, 0x03, 0x0a, 0x34, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, - 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, - 0x76, 0x34, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, - 0x63, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x62, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x45, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x6f, 0x67, - 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x48, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x5e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, - 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x5e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, - 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, - 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa5, 0x01, 0x0a, - 0x37, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x54, 0x79, - 0x70, 0x65, 0x31, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x52, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xea, 0x03, 0x0a, 0x30, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x31, 0x52, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x52, 0x12, 0x5e, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x41, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, - 0x61, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x31, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x52, - 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5a, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x31, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x50, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x52, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x54, - 0x79, 0x70, 0x65, 0x31, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x50, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x52, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x3a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, - 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf6, 0x03, 0x0a, - 0x33, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x4c, 0x42, 0x69, 0x74, 0x12, 0x61, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, - 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, - 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x42, 0x69, 0x74, 0x2e, 0x43, + 0x6e, 0x74, 0x22, 0xfa, 0x03, 0x0a, 0x34, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x70, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x62, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x45, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, + 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x5e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x5e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, + 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0xa7, 0x01, 0x0a, 0x39, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, + 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf2, 0x03, 0x0a, 0x32, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, + 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x60, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x43, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, + 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, + 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa9, + 0x01, 0x0a, 0x3b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, + 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x74, 0x69, 0x63, + 0x6b, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xfa, 0x03, 0x0a, 0x34, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, + 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x62, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x45, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5d, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, - 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x4c, 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5d, 0x0a, 0x09, 0x64, 0x65, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x4c, 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, + 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5e, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, + 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x74, 0x69, + 0x63, 0x6b, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5e, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, + 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x74, 0x69, + 0x63, 0x6b, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x3c, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x69, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xfe, 0x03, 0x0a, 0x35, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x69, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x63, + 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, + 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x69, 0x67, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, + 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x69, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, + 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x69, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, @@ -133021,42 +153020,42 @@ var file_otg_proto_rawDesc = []byte{ 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x41, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, - 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, - 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x04, 0x0a, 0x3a, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, - 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x68, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, + 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x68, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x64, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, + 0x6d, 0x70, 0x76, 0x32, 0x63, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, @@ -133064,41 +153063,36 @@ var file_otg_proto_rawDesc = []byte{ 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa6, 0x01, 0x0a, - 0x38, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x41, 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x42, - 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x96, 0x01, 0x0a, + 0x28, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, + 0x76, 0x32, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, + 0x28, 0x05, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xee, 0x03, 0x0a, 0x31, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, - 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x41, - 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x42, 0x69, 0x74, 0x12, 0x5f, 0x0a, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x42, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x41, 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, - 0x42, 0x69, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xae, 0x03, 0x0a, 0x21, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x4f, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, + 0x70, 0x76, 0x32, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x49, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x5b, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, - 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x41, 0x53, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5b, 0x0a, 0x09, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x4b, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, - 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x41, 0x53, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x4c, 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x2d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x53, 0x6e, 0x6d, 0x70, 0x76, 0x32, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, @@ -133106,43 +153100,637 @@ var file_otg_proto_rawDesc = []byte{ 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x3f, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, - 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xf4, 0x02, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x52, 0x73, 0x76, 0x70, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x49, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x52, 0x73, 0x76, 0x70, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x52, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x52, 0x73, 0x76, 0x70, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x01, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x88, + 0x01, 0x01, 0x1a, 0x3c, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x32, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x02, + 0x1a, 0x37, 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2a, 0x0a, + 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x67, 0x6f, 0x6f, 0x64, 0x10, 0x01, + 0x12, 0x07, 0x0a, 0x03, 0x62, 0x61, 0x64, 0x10, 0x02, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x22, 0x8e, 0x01, + 0x0a, 0x20, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, + 0x70, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8e, + 0x03, 0x0a, 0x19, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, + 0x76, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x12, 0x47, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, + 0x76, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, + 0x70, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, + 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x8c, 0x01, 0x0a, 0x1e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x73, 0x76, 0x70, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x86, + 0x03, 0x0a, 0x17, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, + 0x76, 0x70, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, + 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x73, 0x76, 0x70, + 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb5, 0x01, 0x0a, 0x47, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, + 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x64, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, + 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, + 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, + 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0xaa, 0x04, 0x0a, 0x40, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, + 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x6e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x51, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, + 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x50, + 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x6a, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x45, 0x6e, + 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, + 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa4, 0x01, 0x0a, + 0x36, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0xe6, 0x03, 0x0a, 0x2f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x5d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x40, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x59, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, + 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa4, 0x01, 0x0a, + 0x36, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0xe6, 0x03, 0x0a, 0x2f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x5d, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x40, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x59, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, + 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa3, 0x01, 0x0a, + 0x35, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0xe2, 0x03, 0x0a, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, 0x6e, + 0x74, 0x65, 0x67, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, + 0x64, 0x41, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, + 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x58, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, + 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x32, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, + 0x64, 0x41, 0x73, 0x49, 0x70, 0x76, 0x34, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xd6, 0x03, 0x0a, 0x2b, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, + 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, 0x70, 0x76, 0x34, 0x12, 0x59, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, 0x70, 0x76, 0x34, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, 0x49, 0x70, 0x76, 0x34, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x55, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x41, 0x73, + 0x49, 0x70, 0x76, 0x34, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, + 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, + 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x30, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, + 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xce, 0x03, 0x0a, 0x29, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, + 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x57, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, + 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x53, + 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, + 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x3b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, + 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, + 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0xfa, 0x03, 0x0a, 0x34, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, + 0x49, 0x70, 0x76, 0x34, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x62, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x45, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, 0x76, 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x4c, + 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x48, + 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x5e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, + 0x76, 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x5e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x73, + 0x76, 0x70, 0x48, 0x6f, 0x70, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, + 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa5, + 0x01, 0x0a, 0x37, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x31, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x50, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x52, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8a, 0x04, 0x0a, 0x38, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, - 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x12, 0x66, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x49, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xea, 0x03, 0x0a, 0x30, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x54, 0x69, + 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x31, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x52, 0x12, 0x5e, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x41, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x50, 0x61, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x31, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x52, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x62, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5a, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x62, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x0b, 0x32, 0x3c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x31, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x52, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x31, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x50, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x52, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, + 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, + 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x3a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, + 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, + 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf6, + 0x03, 0x0a, 0x33, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x4c, 0x42, 0x69, 0x74, 0x12, 0x61, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x42, 0x69, 0x74, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5d, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, + 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5d, 0x0a, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x4c, 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x41, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, + 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x04, 0x0a, 0x3a, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, + 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x68, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, + 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, + 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x64, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, + 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, + 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, + 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa6, + 0x01, 0x0a, 0x38, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x41, 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x4c, 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, + 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xee, 0x03, 0x0a, 0x31, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, + 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x31, 0x41, 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x42, 0x69, 0x74, 0x12, 0x5f, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x42, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x41, 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x4c, 0x42, 0x69, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x5b, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, + 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, + 0x41, 0x53, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5b, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x70, 0x6c, 0x69, + 0x63, 0x69, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x41, 0x53, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x3f, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, + 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8a, 0x04, 0x0a, 0x38, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, + 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x66, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x49, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x76, 0x65, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x62, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x62, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, + 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x3c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x33, 0x70, 0x69, 0x64, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0xfe, 0x03, 0x0a, 0x35, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x33, 0x70, 0x69, 0x64, 0x12, 0x63, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x4c, 0x33, 0x70, 0x69, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, + 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x33, + 0x70, 0x69, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, + 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, + 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4c, + 0x33, 0x70, 0x69, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, @@ -133150,42 +153738,47 @@ var file_otg_proto_rawDesc = []byte{ 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x3c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x33, 0x70, 0x69, 0x64, 0x43, 0x6f, 0x75, + 0x6c, 0x75, 0x65, 0x22, 0xba, 0x01, 0x0a, 0x4c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0xfe, 0x03, 0x0a, 0x35, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x33, 0x70, 0x69, 0x64, 0x12, 0x63, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x6f, 0x74, 0x67, + 0x22, 0xbe, 0x04, 0x0a, 0x45, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, + 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x73, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x56, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x4c, 0x33, 0x70, 0x69, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, + 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x49, + 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, + 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x6f, - 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x33, 0x70, 0x69, - 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x5f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x6f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x6f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, - 0x6f, 0x75, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x33, 0x70, - 0x69, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, + 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, @@ -133193,213 +153786,249 @@ var file_otg_proto_rawDesc = []byte{ 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0xba, 0x01, 0x0a, 0x4c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x65, 0x22, 0xab, 0x01, 0x0a, 0x3d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, - 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xbe, - 0x04, 0x0a, 0x45, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, - 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x73, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x56, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, - 0x34, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x6f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x6f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x49, 0x70, 0x76, 0x34, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, - 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0xab, 0x01, 0x0a, 0x3d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, + 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, + 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, + 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x82, 0x04, 0x0a, 0x36, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, - 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, - 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x82, 0x04, - 0x0a, 0x36, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x64, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x47, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x60, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x60, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x64, 0x0a, 0x06, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x47, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x60, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, - 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, - 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x3a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x60, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, + 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, + 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, + 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x3a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, + 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, + 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, + 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0xf6, 0x03, 0x0a, 0x33, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, + 0x76, 0x34, 0x4c, 0x73, 0x70, 0x49, 0x64, 0x12, 0x61, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, + 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x49, + 0x64, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5d, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, - 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, - 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf6, 0x03, - 0x0a, 0x33, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, - 0x4c, 0x73, 0x70, 0x49, 0x64, 0x12, 0x61, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x49, 0x64, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5d, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, - 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5d, 0x0a, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, + 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5d, 0x0a, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x49, 0x70, 0x76, 0x34, 0x4c, 0x73, 0x70, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, + 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa1, 0x01, 0x0a, 0x33, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, + 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xda, 0x03, 0x0a, + 0x2c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, + 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, - 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x73, 0x70, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x70, - 0x76, 0x34, 0x4c, 0x73, 0x70, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa1, 0x01, 0x0a, 0x33, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xda, 0x03, 0x0a, 0x2c, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, - 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, + 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, + 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, + 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x56, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x35, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, + 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, + 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, + 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0xe2, 0x03, 0x0a, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, + 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x31, 0x12, 0x5c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x58, 0x0a, + 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, + 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, + 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x39, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4f, 0x76, + 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf2, + 0x03, 0x0a, 0x32, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, + 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x60, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x43, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x4f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, - 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x56, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x35, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, + 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, + 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, + 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x39, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, - 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xe2, 0x03, - 0x0a, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf2, 0x03, + 0x0a, 0x32, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, - 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, - 0x12, 0x5c, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x3f, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x31, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x58, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x60, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x43, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x58, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, - 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x31, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, + 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, + 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, @@ -133407,83 +154036,170 @@ var file_otg_proto_rawDesc = []byte{ 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x39, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x75, 0x65, 0x22, 0xa1, 0x01, 0x0a, 0x33, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4f, 0x76, 0x65, 0x72, - 0x61, 0x6c, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf2, 0x03, 0x0a, - 0x32, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x5a, 0x65, 0x72, 0x6f, + 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xda, 0x03, 0x0a, 0x2c, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x5a, 0x65, 0x72, 0x6f, 0x42, 0x69, 0x74, 0x12, 0x5a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x5a, 0x65, 0x72, 0x6f, 0x42, 0x69, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, + 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x5a, 0x65, 0x72, 0x6f, 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x56, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x5a, 0x65, 0x72, + 0x6f, 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, + 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, + 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x35, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xe2, 0x03, 0x0a, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x32, 0x12, 0x5c, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, + 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x32, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x58, 0x0a, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x58, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, - 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x12, 0x60, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x43, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4f, - 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, - 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, 0x74, + 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x32, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, + 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xad, + 0x01, 0x0a, 0x3f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, + 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4f, 0x66, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8a, + 0x04, 0x0a, 0x38, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, + 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4f, 0x66, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x66, 0x0a, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x49, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, - 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x4c, 0x65, - 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4f, 0x66, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x62, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x4f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x39, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, - 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, - 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, - 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf2, 0x03, 0x0a, 0x32, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4f, 0x66, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x62, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, + 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4f, + 0x66, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, + 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, + 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb5, 0x01, 0x0a, 0x47, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x12, 0x60, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x43, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, - 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, 0x64, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x73, 0x70, 0x65, 0x63, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0xaa, 0x04, 0x0a, 0x40, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x54, 0x73, 0x70, 0x65, 0x63, 0x12, 0x6e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x51, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, 0x64, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x73, 0x70, 0x65, 0x63, 0x2e, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x6a, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, + 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x49, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x54, 0x73, 0x70, 0x65, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, + 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, + 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x73, 0x70, 0x65, + 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, @@ -133491,169 +154207,41 @@ var file_otg_proto_rawDesc = []byte{ 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0xa1, 0x01, 0x0a, 0x33, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, - 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x5a, 0x65, 0x72, 0x6f, 0x42, 0x69, - 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xda, 0x03, 0x0a, 0x2c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x5a, 0x65, - 0x72, 0x6f, 0x42, 0x69, 0x74, 0x12, 0x5a, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x5a, 0x65, 0x72, 0x6f, 0x42, 0x69, 0x74, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, - 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x5a, 0x65, 0x72, 0x6f, 0x42, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x56, 0x0a, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x38, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, - 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x5a, 0x65, 0x72, 0x6f, 0x42, - 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, - 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, - 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x35, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, - 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xe2, 0x03, 0x0a, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x32, 0x12, 0x5c, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, - 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x32, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x22, 0xaa, 0x01, 0x0a, 0x3c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, - 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x58, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x32, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, - 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xad, 0x01, 0x0a, - 0x3f, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, - 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4f, 0x66, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, - 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8a, 0x04, 0x0a, - 0x38, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, - 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4f, 0x66, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x66, 0x0a, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x49, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, - 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4f, 0x66, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x62, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, - 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, - 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x62, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, + 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, + 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, + 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xfe, 0x03, + 0x0a, 0x35, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, - 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4f, 0x66, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, - 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, - 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb5, 0x01, 0x0a, 0x47, 0x50, 0x61, + 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x31, 0x32, 0x37, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x63, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, 0x64, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x73, 0x70, 0x65, 0x63, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, - 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0xaa, 0x04, 0x0a, 0x40, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, - 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x49, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x54, 0x73, 0x70, 0x65, 0x63, 0x12, 0x6e, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x51, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, 0x64, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x6a, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, - 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, - 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x49, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x73, - 0x70, 0x65, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, 0x64, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x73, 0x70, 0x65, 0x63, 0x43, + 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x46, + 0x6c, 0x61, 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, + 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x5f, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x5f, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, @@ -133661,217 +154249,130 @@ var file_otg_proto_rawDesc = []byte{ 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xaa, - 0x01, 0x0a, 0x3c, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xac, + 0x01, 0x0a, 0x3e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x31, 0x32, 0x37, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, - 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, - 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xfe, 0x03, 0x0a, 0x35, + 0x72, 0x31, 0x32, 0x37, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, + 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, + 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, + 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x86, 0x04, + 0x0a, 0x37, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, + 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x31, 0x32, 0x37, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x65, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x48, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, - 0x37, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x63, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x46, 0x6c, 0x61, - 0x67, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, - 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5f, 0x0a, - 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x41, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, - 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5f, - 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x41, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x46, 0x6c, 0x61, 0x67, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, - 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xac, 0x01, 0x0a, - 0x3e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, - 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, - 0x32, 0x37, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, - 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, - 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x86, 0x04, 0x0a, 0x37, + 0x37, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x61, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, - 0x37, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x65, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x48, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, - 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x61, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x37, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, + 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xac, 0x01, 0x0a, 0x3e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x61, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, - 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x31, 0x32, 0x37, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, - 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, - 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x22, 0xac, 0x01, 0x0a, 0x3e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x69, - 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x86, 0x04, 0x0a, 0x37, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, + 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x86, 0x04, 0x0a, 0x37, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, + 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, + 0x74, 0x12, 0x65, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x48, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x69, 0x6e, - 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x12, - 0x65, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x48, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, - 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x69, 0x6e, 0x69, 0x6d, - 0x75, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x2e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, - 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x2e, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, + 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, + 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x61, + 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x43, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x69, 0x6e, + 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, + 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, + 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xab, + 0x01, 0x0a, 0x3d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, - 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x61, 0x0a, 0x09, - 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x43, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, - 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x69, 0x6e, 0x69, 0x6d, - 0x75, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, - 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, - 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xab, 0x01, 0x0a, - 0x3d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, + 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, + 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x82, 0x04, 0x0a, + 0x36, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, - 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x82, 0x04, 0x0a, 0x36, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x61, 0x63, 0x6b, 0x65, - 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x64, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x47, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, - 0x7a, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x60, - 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x42, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x61, 0x78, - 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x60, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x64, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x47, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, + 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x53, 0x69, 0x7a, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x60, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, - 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, - 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0xae, 0x01, 0x0a, 0x40, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, - 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, - 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x8e, 0x04, 0x0a, 0x39, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x67, - 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4a, - 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, - 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x63, 0x0a, 0x09, 0x69, 0x6e, - 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, - 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x63, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x60, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x53, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x73, 0x70, 0x65, 0x63, 0x49, 0x6e, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, + 0x7a, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, @@ -133879,115 +154380,43 @@ var file_otg_proto_rawDesc = []byte{ 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x41, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x65, 0x22, 0xae, 0x01, 0x0a, 0x40, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, - 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x92, 0x04, 0x0a, 0x3a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, - 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x12, 0x68, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x64, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8e, 0x02, 0x0a, 0x2d, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x5b, 0x0a, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, - 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x31, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, - 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x38, 0x0a, 0x06, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2e, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, - 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8e, 0x02, 0x0a, 0x2d, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, - 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x31, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5b, 0x0a, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, - 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x31, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x54, 0x79, 0x70, 0x65, 0x2e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x38, 0x0a, 0x06, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2e, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, - 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x99, 0x01, 0x0a, 0x2b, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, - 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, - 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xba, 0x03, 0x0a, 0x24, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x52, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, - 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, - 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, - 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, - 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, + 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x8e, 0x04, 0x0a, 0x39, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x67, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x4a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, + 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x63, 0x0a, 0x09, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x45, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, + 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x63, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, + 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, @@ -133995,139 +154424,255 @@ var file_otg_proto_rawDesc = []byte{ 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x2d, 0x0a, 0x10, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x70, 0x69, - 0x53, 0x70, 0x65, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x24, - 0x0a, 0x0b, 0x73, 0x64, 0x6b, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0a, 0x73, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x61, 0x70, 0x70, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x61, - 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, - 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x64, 0x6b, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, - 0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, - 0x31, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x26, 0x0a, 0x07, 0x77, 0x61, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6f, 0x74, - 0x67, 0x2e, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, - 0x6e, 0x67, 0x22, 0x2b, 0x0a, 0x07, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x20, 0x0a, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, - 0x37, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x4d, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x36, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x3b, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, + 0x6c, 0x75, 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x41, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x92, 0x04, 0x0a, 0x3a, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, + 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x12, 0x68, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, + 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x64, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, + 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x31, 0x49, 0x70, 0x76, 0x34, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x10, 0x05, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8e, 0x02, 0x0a, 0x2d, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, + 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x31, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x5b, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, + 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x46, 0x6c, 0x61, 0x67, 0x73, + 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x38, 0x0a, 0x06, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2e, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, + 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, + 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8e, 0x02, 0x0a, 0x2d, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, + 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x31, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5b, 0x0a, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, + 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, + 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x31, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x43, 0x54, 0x79, 0x70, + 0x65, 0x2e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, + 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x38, 0x0a, + 0x06, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x2e, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x99, 0x01, 0x0a, + 0x2b, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, + 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x02, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xba, 0x03, 0x0a, 0x24, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x52, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x35, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x53, 0x56, + 0x50, 0x50, 0x61, 0x74, 0x68, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x06, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, + 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x05, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x2d, 0x0a, 0x10, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x61, + 0x70, 0x69, 0x53, 0x70, 0x65, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, + 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x64, 0x6b, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0a, 0x73, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x61, + 0x70, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, + 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x64, 0x6b, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x22, 0x31, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x26, 0x0a, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x77, 0x61, 0x72, - 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x38, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x3e, - 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, - 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x57, 0x61, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x50, - 0x0a, 0x16, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x22, 0x41, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x77, - 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x77, 0x61, 0x72, 0x6e, - 0x69, 0x6e, 0x67, 0x22, 0x54, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, - 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6e, 0x0a, 0x18, 0x53, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x11, 0x47, 0x65, 0x74, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, - 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0e, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x55, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x51, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x61, 0x70, 0x74, - 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0f, 0x63, 0x61, - 0x70, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0e, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, - 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, - 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x32, 0xdf, 0x04, 0x0a, 0x07, 0x4f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x12, - 0x3a, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x15, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, - 0x0f, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x10, 0x53, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x2b, 0x0a, 0x07, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, + 0x20, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x22, 0x37, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x4d, 0x0a, 0x13, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x36, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x3b, 0x0a, 0x11, 0x53, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, + 0x0a, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x77, + 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x38, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x6f, 0x74, + 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x22, 0x3e, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x77, 0x61, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x22, 0x50, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x22, 0x41, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, + 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x77, 0x61, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x54, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x39, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6e, 0x0a, 0x18, 0x53, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3c, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0e, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x55, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0e, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0f, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x61, + 0x70, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0f, + 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x43, 0x61, 0x70, 0x74, + 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0e, 0x63, 0x61, 0x70, 0x74, + 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x12, 0x47, 0x65, + 0x74, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xdf, 0x04, 0x0a, 0x07, 0x4f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x12, 0x3a, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x15, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, + 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4c, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, - 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x16, 0x2e, 0x6f, 0x74, 0x67, - 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x47, - 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x47, - 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x61, - 0x70, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, - 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, - 0x6f, 0x74, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x6f, - 0x74, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x6f, 0x74, 0x67, 0x3b, 0x6f, - 0x74, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, + 0x10, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1c, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x16, 0x2e, 0x6f, + 0x74, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, + 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x6f, 0x74, 0x67, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x47, 0x65, 0x74, + 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, + 0x2e, 0x6f, 0x74, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x6f, 0x74, 0x67, + 0x3b, 0x6f, 0x74, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -134142,3487 +154687,3997 @@ func file_otg_proto_rawDescGZIP() []byte { return file_otg_proto_rawDescData } -var file_otg_proto_enumTypes = make([]protoimpl.EnumInfo, 410) -var file_otg_proto_msgTypes = make([]protoimpl.MessageInfo, 1366) +var file_otg_proto_enumTypes = make([]protoimpl.EnumInfo, 453) +var file_otg_proto_msgTypes = make([]protoimpl.MessageInfo, 1571) var file_otg_proto_goTypes = []interface{}{ (LagProtocol_Choice_Enum)(0), // 0: otg.LagProtocol.Choice.Enum (LagPortLacp_ActorActivity_Enum)(0), // 1: otg.LagPortLacp.ActorActivity.Enum (EthernetConnection_Choice_Enum)(0), // 2: otg.EthernetConnection.Choice.Enum - (DeviceVlan_Tpid_Enum)(0), // 3: otg.DeviceVlan.Tpid.Enum - (DeviceIpv4GatewayMAC_Choice_Enum)(0), // 4: otg.DeviceIpv4GatewayMAC.Choice.Enum - (DeviceIpv6GatewayMAC_Choice_Enum)(0), // 5: otg.DeviceIpv6GatewayMAC.Choice.Enum - (Layer1_Speed_Enum)(0), // 6: otg.Layer1.Speed.Enum - (Layer1_Media_Enum)(0), // 7: otg.Layer1.Media.Enum - (Layer1FlowControl_Choice_Enum)(0), // 8: otg.Layer1FlowControl.Choice.Enum - (Capture_Format_Enum)(0), // 9: otg.Capture.Format.Enum - (CaptureFilter_Choice_Enum)(0), // 10: otg.CaptureFilter.Choice.Enum - (IsisInterface_NetworkType_Enum)(0), // 11: otg.IsisInterface.NetworkType.Enum - (IsisInterface_LevelType_Enum)(0), // 12: otg.IsisInterface.LevelType.Enum - (IsisInterfaceAuthentication_AuthType_Enum)(0), // 13: otg.IsisInterfaceAuthentication.AuthType.Enum - (IsisAuthenticationBase_AuthType_Enum)(0), // 14: otg.IsisAuthenticationBase.AuthType.Enum - (IsisV4RouteRange_OriginType_Enum)(0), // 15: otg.IsisV4RouteRange.OriginType.Enum - (IsisV4RouteRange_RedistributionType_Enum)(0), // 16: otg.IsisV4RouteRange.RedistributionType.Enum - (IsisV6RouteRange_OriginType_Enum)(0), // 17: otg.IsisV6RouteRange.OriginType.Enum - (IsisV6RouteRange_RedistributionType_Enum)(0), // 18: otg.IsisV6RouteRange.RedistributionType.Enum - (DeviceBgpMessageHeaderError_Subcode_Enum)(0), // 19: otg.DeviceBgpMessageHeaderError.Subcode.Enum - (DeviceBgpOpenMessageError_Subcode_Enum)(0), // 20: otg.DeviceBgpOpenMessageError.Subcode.Enum - (DeviceBgpUpdateMessageError_Subcode_Enum)(0), // 21: otg.DeviceBgpUpdateMessageError.Subcode.Enum - (DeviceBgpCeaseError_Subcode_Enum)(0), // 22: otg.DeviceBgpCeaseError.Subcode.Enum - (BgpV4Peer_AsType_Enum)(0), // 23: otg.BgpV4Peer.AsType.Enum - (BgpV4Peer_AsNumberWidth_Enum)(0), // 24: otg.BgpV4Peer.AsNumberWidth.Enum - (BgpV4EthernetSegment_ActiveMode_Enum)(0), // 25: otg.BgpV4EthernetSegment.ActiveMode.Enum - (BgpRouteAdvanced_Origin_Enum)(0), // 26: otg.BgpRouteAdvanced.Origin.Enum - (BgpCommunity_Type_Enum)(0), // 27: otg.BgpCommunity.Type.Enum - (BgpExtCommunity_Type_Enum)(0), // 28: otg.BgpExtCommunity.Type.Enum - (BgpExtCommunity_Subtype_Enum)(0), // 29: otg.BgpExtCommunity.Subtype.Enum - (BgpAsPath_AsSetMode_Enum)(0), // 30: otg.BgpAsPath.AsSetMode.Enum - (BgpAsPathSegment_Type_Enum)(0), // 31: otg.BgpAsPathSegment.Type.Enum - (BgpV4EvpnEvis_Choice_Enum)(0), // 32: otg.BgpV4EvpnEvis.Choice.Enum - (BgpV4EviVxlan_ReplicationType_Enum)(0), // 33: otg.BgpV4EviVxlan.ReplicationType.Enum - (BgpRouteDistinguisher_RdType_Enum)(0), // 34: otg.BgpRouteDistinguisher.RdType.Enum - (BgpRouteTarget_RtType_Enum)(0), // 35: otg.BgpRouteTarget.RtType.Enum - (BgpV4RouteRange_NextHopMode_Enum)(0), // 36: otg.BgpV4RouteRange.NextHopMode.Enum - (BgpV4RouteRange_NextHopAddressType_Enum)(0), // 37: otg.BgpV4RouteRange.NextHopAddressType.Enum - (BgpExtendedCommunity_Choice_Enum)(0), // 38: otg.BgpExtendedCommunity.Choice.Enum - (BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum)(0), // 39: otg.BgpExtendedCommunityTransitive2OctetAsType.Choice.Enum - (BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum)(0), // 40: otg.BgpExtendedCommunityTransitiveIpv4AddressType.Choice.Enum - (BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum)(0), // 41: otg.BgpExtendedCommunityTransitive4OctetAsType.Choice.Enum - (BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum)(0), // 42: otg.BgpExtendedCommunityTransitiveOpaqueType.Choice.Enum - (BgpExtendedCommunityTransitiveEvpnType_Choice_Enum)(0), // 43: otg.BgpExtendedCommunityTransitiveEvpnType.Choice.Enum - (BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum)(0), // 44: otg.BgpExtendedCommunityNonTransitive2OctetAsType.Choice.Enum - (BgpV6RouteRange_NextHopMode_Enum)(0), // 45: otg.BgpV6RouteRange.NextHopMode.Enum - (BgpV6RouteRange_NextHopAddressType_Enum)(0), // 46: otg.BgpV6RouteRange.NextHopAddressType.Enum - (BgpSrteV4Policy_NextHopMode_Enum)(0), // 47: otg.BgpSrteV4Policy.NextHopMode.Enum - (BgpSrteV4Policy_NextHopAddressType_Enum)(0), // 48: otg.BgpSrteV4Policy.NextHopAddressType.Enum - (BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum)(0), // 49: otg.BgpSrteRemoteEndpointSubTlv.AddressFamily.Enum - (BgpSrteBindingSubTlv_BindingSidType_Enum)(0), // 50: otg.BgpSrteBindingSubTlv.BindingSidType.Enum - (BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum)(0), // 51: otg.BgpSrteExplicitNullLabelPolicySubTlv.ExplicitNullLabelPolicy.Enum - (BgpSrteSegment_SegmentType_Enum)(0), // 52: otg.BgpSrteSegment.SegmentType.Enum - (BgpSrteV6Policy_NextHopMode_Enum)(0), // 53: otg.BgpSrteV6Policy.NextHopMode.Enum - (BgpSrteV6Policy_NextHopAddressType_Enum)(0), // 54: otg.BgpSrteV6Policy.NextHopAddressType.Enum - (BgpUpdateReplay_Choice_Enum)(0), // 55: otg.BgpUpdateReplay.Choice.Enum - (BgpAttributes_Origin_Enum)(0), // 56: otg.BgpAttributes.Origin.Enum - (BgpAttributesAsPath_Choice_Enum)(0), // 57: otg.BgpAttributesAsPath.Choice.Enum - (BgpAttributesFourByteAsPathSegment_Type_Enum)(0), // 58: otg.BgpAttributesFourByteAsPathSegment.Type.Enum - (BgpAttributesTwoByteAsPathSegment_Type_Enum)(0), // 59: otg.BgpAttributesTwoByteAsPathSegment.Type.Enum - (BgpAttributesAggregator_Choice_Enum)(0), // 60: otg.BgpAttributesAggregator.Choice.Enum - (BgpAttributesCommunity_Choice_Enum)(0), // 61: otg.BgpAttributesCommunity.Choice.Enum - (BgpAttributesNextHop_Choice_Enum)(0), // 62: otg.BgpAttributesNextHop.Choice.Enum - (BgpAttributesMpReachNlri_Choice_Enum)(0), // 63: otg.BgpAttributesMpReachNlri.Choice.Enum - (BgpAttributesMpUnreachNlri_Choice_Enum)(0), // 64: otg.BgpAttributesMpUnreachNlri.Choice.Enum - (BgpV6Peer_AsType_Enum)(0), // 65: otg.BgpV6Peer.AsType.Enum - (BgpV6Peer_AsNumberWidth_Enum)(0), // 66: otg.BgpV6Peer.AsNumberWidth.Enum - (BgpV6EthernetSegment_ActiveMode_Enum)(0), // 67: otg.BgpV6EthernetSegment.ActiveMode.Enum - (BgpV6EvpnEvis_Choice_Enum)(0), // 68: otg.BgpV6EvpnEvis.Choice.Enum - (BgpV6EviVxlan_ReplicationType_Enum)(0), // 69: otg.BgpV6EviVxlan.ReplicationType.Enum - (VxlanV4TunnelDestinationIPMode_Choice_Enum)(0), // 70: otg.VxlanV4TunnelDestinationIPMode.Choice.Enum - (VxlanV6TunnelDestinationIPMode_Choice_Enum)(0), // 71: otg.VxlanV6TunnelDestinationIPMode.Choice.Enum - (RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum)(0), // 72: otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.ReservationStyle.Enum - (RsvpEro_PrependNeighborIp_Enum)(0), // 73: otg.RsvpEro.PrependNeighborIp.Enum - (RsvpEroSubobject_Type_Enum)(0), // 74: otg.RsvpEroSubobject.Type.Enum - (RsvpEroSubobject_HopType_Enum)(0), // 75: otg.RsvpEroSubobject.HopType.Enum - (FlowTxRx_Choice_Enum)(0), // 76: otg.FlowTxRx.Choice.Enum - (FlowRouter_Mode_Enum)(0), // 77: otg.FlowRouter.Mode.Enum - (FlowHeader_Choice_Enum)(0), // 78: otg.FlowHeader.Choice.Enum - (FlowIpv4Options_Choice_Enum)(0), // 79: otg.FlowIpv4Options.Choice.Enum - (FlowIpv4OptionsCustomLength_Choice_Enum)(0), // 80: otg.FlowIpv4OptionsCustomLength.Choice.Enum - (FlowIpv4Priority_Choice_Enum)(0), // 81: otg.FlowIpv4Priority.Choice.Enum - (FlowIcmp_Choice_Enum)(0), // 82: otg.FlowIcmp.Choice.Enum - (FlowIcmpv6_Choice_Enum)(0), // 83: otg.FlowIcmpv6.Choice.Enum - (FlowSnmpv2CData_Choice_Enum)(0), // 84: otg.FlowSnmpv2cData.Choice.Enum - (FlowSnmpv2CPDU_ErrorStatus_Enum)(0), // 85: otg.FlowSnmpv2cPDU.ErrorStatus.Enum - (FlowSnmpv2CVariableBindingValue_Choice_Enum)(0), // 86: otg.FlowSnmpv2cVariableBindingValue.Choice.Enum - (FlowSnmpv2CVariableBindingStringValue_Choice_Enum)(0), // 87: otg.FlowSnmpv2cVariableBindingStringValue.Choice.Enum - (FlowRsvp_Flag_Enum)(0), // 88: otg.FlowRsvp.Flag.Enum - (FlowRSVPLength_Choice_Enum)(0), // 89: otg.FlowRSVPLength.Choice.Enum - (FlowRSVPMessage_Choice_Enum)(0), // 90: otg.FlowRSVPMessage.Choice.Enum - (FlowRSVPObjectLength_Choice_Enum)(0), // 91: otg.FlowRSVPObjectLength.Choice.Enum - (FlowRSVPPathObjectsClass_Choice_Enum)(0), // 92: otg.FlowRSVPPathObjectsClass.Choice.Enum - (FlowRSVPPathObjectsSessionCType_Choice_Enum)(0), // 93: otg.FlowRSVPPathObjectsSessionCType.Choice.Enum - (FlowRSVPPathSessionExtTunnelId_Choice_Enum)(0), // 94: otg.FlowRSVPPathSessionExtTunnelId.Choice.Enum - (FlowRSVPPathObjectsRsvpHopCType_Choice_Enum)(0), // 95: otg.FlowRSVPPathObjectsRsvpHopCType.Choice.Enum - (FlowRSVPPathObjectsTimeValuesCType_Choice_Enum)(0), // 96: otg.FlowRSVPPathObjectsTimeValuesCType.Choice.Enum - (FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum)(0), // 97: otg.FlowRSVPPathObjectsClassExplicitRouteCType.Choice.Enum - (FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum)(0), // 98: otg.FlowRSVPType1ExplicitRouteSubobjectsType.Choice.Enum - (FlowRSVPExplicitRouteLength_Choice_Enum)(0), // 99: otg.FlowRSVPExplicitRouteLength.Choice.Enum - (FlowRSVPExplicitRouteASNumberLength_Choice_Enum)(0), // 100: otg.FlowRSVPExplicitRouteASNumberLength.Choice.Enum - (FlowRSVPPathObjectsLabelRequestCType_Choice_Enum)(0), // 101: otg.FlowRSVPPathObjectsLabelRequestCType.Choice.Enum - (FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum)(0), // 102: otg.FlowRSVPPathObjectsSessionAttributeCType.Choice.Enum - (FlowRSVPLspTunnelFlag_Choice_Enum)(0), // 103: otg.FlowRSVPLspTunnelFlag.Choice.Enum - (FlowRSVPSessionAttributeNameLength_Choice_Enum)(0), // 104: otg.FlowRSVPSessionAttributeNameLength.Choice.Enum - (FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum)(0), // 105: otg.FlowRSVPPathObjectsSenderTemplateCType.Choice.Enum - (FlowRSVPPathObjectsSenderTspecCType_Choice_Enum)(0), // 106: otg.FlowRSVPPathObjectsSenderTspecCType.Choice.Enum - (FlowRSVPPathObjectsRecordRouteCType_Choice_Enum)(0), // 107: otg.FlowRSVPPathObjectsRecordRouteCType.Choice.Enum - (FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum)(0), // 108: otg.FlowRSVPPathObjectsRecordRouteSubObjectType.Choice.Enum - (FlowRSVPRecordRouteIPv4Flag_Choice_Enum)(0), // 109: otg.FlowRSVPRecordRouteIPv4Flag.Choice.Enum - (FlowRSVPPathRecordRouteLabel_Choice_Enum)(0), // 110: otg.FlowRSVPPathRecordRouteLabel.Choice.Enum - (FlowRSVPRouteRecordLength_Choice_Enum)(0), // 111: otg.FlowRSVPRouteRecordLength.Choice.Enum - (FlowSize_Choice_Enum)(0), // 112: otg.FlowSize.Choice.Enum - (FlowSizeWeightPairs_Choice_Enum)(0), // 113: otg.FlowSizeWeightPairs.Choice.Enum - (FlowSizeWeightPairs_Predefined_Enum)(0), // 114: otg.FlowSizeWeightPairs.Predefined.Enum - (FlowRate_Choice_Enum)(0), // 115: otg.FlowRate.Choice.Enum - (FlowDuration_Choice_Enum)(0), // 116: otg.FlowDuration.Choice.Enum - (FlowDelay_Choice_Enum)(0), // 117: otg.FlowDelay.Choice.Enum - (FlowDurationInterBurstGap_Choice_Enum)(0), // 118: otg.FlowDurationInterBurstGap.Choice.Enum - (FlowLatencyMetrics_Mode_Enum)(0), // 119: otg.FlowLatencyMetrics.Mode.Enum - (FlowRxTxRatio_Choice_Enum)(0), // 120: otg.FlowRxTxRatio.Choice.Enum - (EventRequest_Type_Enum)(0), // 121: otg.EventRequest.Type.Enum - (LldpConnection_Choice_Enum)(0), // 122: otg.LldpConnection.Choice.Enum - (LldpChassisId_Choice_Enum)(0), // 123: otg.LldpChassisId.Choice.Enum - (LldpPortId_Choice_Enum)(0), // 124: otg.LldpPortId.Choice.Enum - (LldpChassisMacSubType_Choice_Enum)(0), // 125: otg.LldpChassisMacSubType.Choice.Enum - (LldpPortInterfaceNameSubType_Choice_Enum)(0), // 126: otg.LldpPortInterfaceNameSubType.Choice.Enum - (LldpSystemName_Choice_Enum)(0), // 127: otg.LldpSystemName.Choice.Enum - (Error_Kind_Enum)(0), // 128: otg.Error.Kind.Enum - (ConfigUpdate_Choice_Enum)(0), // 129: otg.ConfigUpdate.Choice.Enum - (FlowsUpdate_PropertyNames_Enum)(0), // 130: otg.FlowsUpdate.PropertyNames.Enum - (ControlState_Choice_Enum)(0), // 131: otg.ControlState.Choice.Enum - (StatePort_Choice_Enum)(0), // 132: otg.StatePort.Choice.Enum - (StateTraffic_Choice_Enum)(0), // 133: otg.StateTraffic.Choice.Enum - (StateProtocol_Choice_Enum)(0), // 134: otg.StateProtocol.Choice.Enum - (StatePortLink_State_Enum)(0), // 135: otg.StatePortLink.State.Enum - (StatePortCapture_State_Enum)(0), // 136: otg.StatePortCapture.State.Enum - (StateTrafficFlowTransmit_State_Enum)(0), // 137: otg.StateTrafficFlowTransmit.State.Enum - (StateProtocolAll_State_Enum)(0), // 138: otg.StateProtocolAll.State.Enum - (StateProtocolRoute_State_Enum)(0), // 139: otg.StateProtocolRoute.State.Enum - (StateProtocolLacp_Choice_Enum)(0), // 140: otg.StateProtocolLacp.Choice.Enum - (StateProtocolLacpAdmin_State_Enum)(0), // 141: otg.StateProtocolLacpAdmin.State.Enum - (StateProtocolLacpMemberPorts_State_Enum)(0), // 142: otg.StateProtocolLacpMemberPorts.State.Enum - (StateProtocolBgp_Choice_Enum)(0), // 143: otg.StateProtocolBgp.Choice.Enum - (StateProtocolBgpPeers_State_Enum)(0), // 144: otg.StateProtocolBgpPeers.State.Enum - (StateProtocolIsis_Choice_Enum)(0), // 145: otg.StateProtocolIsis.Choice.Enum - (StateProtocolIsisRouters_State_Enum)(0), // 146: otg.StateProtocolIsisRouters.State.Enum - (ControlAction_Choice_Enum)(0), // 147: otg.ControlAction.Choice.Enum - (ActionResponse_Choice_Enum)(0), // 148: otg.ActionResponse.Choice.Enum - (ActionProtocol_Choice_Enum)(0), // 149: otg.ActionProtocol.Choice.Enum - (ActionResponseProtocol_Choice_Enum)(0), // 150: otg.ActionResponseProtocol.Choice.Enum - (ActionProtocolIpv4_Choice_Enum)(0), // 151: otg.ActionProtocolIpv4.Choice.Enum - (ActionResponseProtocolIpv4_Choice_Enum)(0), // 152: otg.ActionResponseProtocolIpv4.Choice.Enum - (ActionResponseProtocolIpv4PingResponse_Result_Enum)(0), // 153: otg.ActionResponseProtocolIpv4PingResponse.Result.Enum - (ActionProtocolIpv6_Choice_Enum)(0), // 154: otg.ActionProtocolIpv6.Choice.Enum - (ActionResponseProtocolIpv6_Choice_Enum)(0), // 155: otg.ActionResponseProtocolIpv6.Choice.Enum - (ActionResponseProtocolIpv6PingResponse_Result_Enum)(0), // 156: otg.ActionResponseProtocolIpv6PingResponse.Result.Enum - (ActionProtocolBgp_Choice_Enum)(0), // 157: otg.ActionProtocolBgp.Choice.Enum - (ActionProtocolBgpNotification_Choice_Enum)(0), // 158: otg.ActionProtocolBgpNotification.Choice.Enum - (MetricsRequest_Choice_Enum)(0), // 159: otg.MetricsRequest.Choice.Enum - (MetricsResponse_Choice_Enum)(0), // 160: otg.MetricsResponse.Choice.Enum - (PortMetricsRequest_ColumnNames_Enum)(0), // 161: otg.PortMetricsRequest.ColumnNames.Enum - (PortMetric_Link_Enum)(0), // 162: otg.PortMetric.Link.Enum - (PortMetric_Capture_Enum)(0), // 163: otg.PortMetric.Capture.Enum - (PortMetric_Transmit_Enum)(0), // 164: otg.PortMetric.Transmit.Enum - (FlowMetricsRequest_MetricNames_Enum)(0), // 165: otg.FlowMetricsRequest.MetricNames.Enum - (FlowTaggedMetricsFilter_MetricNames_Enum)(0), // 166: otg.FlowTaggedMetricsFilter.MetricNames.Enum - (FlowMetric_Transmit_Enum)(0), // 167: otg.FlowMetric.Transmit.Enum - (FlowMetricTagValue_Choice_Enum)(0), // 168: otg.FlowMetricTagValue.Choice.Enum - (Bgpv4MetricsRequest_ColumnNames_Enum)(0), // 169: otg.Bgpv4MetricsRequest.ColumnNames.Enum - (Bgpv4Metric_SessionState_Enum)(0), // 170: otg.Bgpv4Metric.SessionState.Enum - (Bgpv4Metric_FsmState_Enum)(0), // 171: otg.Bgpv4Metric.FsmState.Enum - (Bgpv6MetricsRequest_ColumnNames_Enum)(0), // 172: otg.Bgpv6MetricsRequest.ColumnNames.Enum - (Bgpv6Metric_SessionState_Enum)(0), // 173: otg.Bgpv6Metric.SessionState.Enum - (Bgpv6Metric_FsmState_Enum)(0), // 174: otg.Bgpv6Metric.FsmState.Enum - (IsisMetricsRequest_ColumnNames_Enum)(0), // 175: otg.IsisMetricsRequest.ColumnNames.Enum - (LagMetricsRequest_ColumnNames_Enum)(0), // 176: otg.LagMetricsRequest.ColumnNames.Enum - (LagMetric_OperStatus_Enum)(0), // 177: otg.LagMetric.OperStatus.Enum - (LacpMetricsRequest_ColumnNames_Enum)(0), // 178: otg.LacpMetricsRequest.ColumnNames.Enum - (LacpMetric_Activity_Enum)(0), // 179: otg.LacpMetric.Activity.Enum - (LacpMetric_Timeout_Enum)(0), // 180: otg.LacpMetric.Timeout.Enum - (LacpMetric_Synchronization_Enum)(0), // 181: otg.LacpMetric.Synchronization.Enum - (LldpMetricsRequest_ColumnNames_Enum)(0), // 182: otg.LldpMetricsRequest.ColumnNames.Enum - (RsvpMetricsRequest_ColumnNames_Enum)(0), // 183: otg.RsvpMetricsRequest.ColumnNames.Enum - (StatesRequest_Choice_Enum)(0), // 184: otg.StatesRequest.Choice.Enum - (StatesResponse_Choice_Enum)(0), // 185: otg.StatesResponse.Choice.Enum - (BgpPrefixStateRequest_PrefixFilters_Enum)(0), // 186: otg.BgpPrefixStateRequest.PrefixFilters.Enum - (BgpPrefixIpv4UnicastFilter_Origin_Enum)(0), // 187: otg.BgpPrefixIpv4UnicastFilter.Origin.Enum - (BgpPrefixIpv6UnicastFilter_Origin_Enum)(0), // 188: otg.BgpPrefixIpv6UnicastFilter.Origin.Enum - (BgpPrefixIpv4UnicastState_Origin_Enum)(0), // 189: otg.BgpPrefixIpv4UnicastState.Origin.Enum - (BgpPrefixIpv6UnicastState_Origin_Enum)(0), // 190: otg.BgpPrefixIpv6UnicastState.Origin.Enum - (ResultBgpCommunity_Type_Enum)(0), // 191: otg.ResultBgpCommunity.Type.Enum - (ResultBgpAsPathSegment_Type_Enum)(0), // 192: otg.ResultBgpAsPathSegment.Type.Enum - (IsisLspState_PduType_Enum)(0), // 193: otg.IsisLspState.PduType.Enum - (IsisLspV4Prefix_RedistributionType_Enum)(0), // 194: otg.IsisLspV4Prefix.RedistributionType.Enum - (IsisLspV4Prefix_OriginType_Enum)(0), // 195: otg.IsisLspV4Prefix.OriginType.Enum - (IsisLspExtendedV4Prefix_RedistributionType_Enum)(0), // 196: otg.IsisLspExtendedV4Prefix.RedistributionType.Enum - (IsisLspV6Prefix_RedistributionType_Enum)(0), // 197: otg.IsisLspV6Prefix.RedistributionType.Enum - (IsisLspV6Prefix_OriginType_Enum)(0), // 198: otg.IsisLspV6Prefix.OriginType.Enum - (LldpNeighborsState_ChassisIdType_Enum)(0), // 199: otg.LldpNeighborsState.ChassisIdType.Enum - (LldpNeighborsState_PortIdType_Enum)(0), // 200: otg.LldpNeighborsState.PortIdType.Enum - (LldpCapabilityState_CapabilityName_Enum)(0), // 201: otg.LldpCapabilityState.CapabilityName.Enum - (RsvpLspState_SessionStatus_Enum)(0), // 202: otg.RsvpLspState.SessionStatus.Enum - (RsvpLspState_LastFlapReason_Enum)(0), // 203: otg.RsvpLspState.LastFlapReason.Enum - (RsvpLspIpv4Ero_Type_Enum)(0), // 204: otg.RsvpLspIpv4Ero.Type.Enum - (PatternFlowEthernetDst_Choice_Enum)(0), // 205: otg.PatternFlowEthernetDst.Choice.Enum - (PatternFlowEthernetSrc_Choice_Enum)(0), // 206: otg.PatternFlowEthernetSrc.Choice.Enum - (PatternFlowEthernetEtherType_Choice_Enum)(0), // 207: otg.PatternFlowEthernetEtherType.Choice.Enum - (PatternFlowEthernetPfcQueue_Choice_Enum)(0), // 208: otg.PatternFlowEthernetPfcQueue.Choice.Enum - (PatternFlowVlanPriority_Choice_Enum)(0), // 209: otg.PatternFlowVlanPriority.Choice.Enum - (PatternFlowVlanCfi_Choice_Enum)(0), // 210: otg.PatternFlowVlanCfi.Choice.Enum - (PatternFlowVlanId_Choice_Enum)(0), // 211: otg.PatternFlowVlanId.Choice.Enum - (PatternFlowVlanTpid_Choice_Enum)(0), // 212: otg.PatternFlowVlanTpid.Choice.Enum - (PatternFlowVxlanFlags_Choice_Enum)(0), // 213: otg.PatternFlowVxlanFlags.Choice.Enum - (PatternFlowVxlanReserved0_Choice_Enum)(0), // 214: otg.PatternFlowVxlanReserved0.Choice.Enum - (PatternFlowVxlanVni_Choice_Enum)(0), // 215: otg.PatternFlowVxlanVni.Choice.Enum - (PatternFlowVxlanReserved1_Choice_Enum)(0), // 216: otg.PatternFlowVxlanReserved1.Choice.Enum - (PatternFlowIpv4Version_Choice_Enum)(0), // 217: otg.PatternFlowIpv4Version.Choice.Enum - (PatternFlowIpv4HeaderLength_Choice_Enum)(0), // 218: otg.PatternFlowIpv4HeaderLength.Choice.Enum - (PatternFlowIpv4TotalLength_Choice_Enum)(0), // 219: otg.PatternFlowIpv4TotalLength.Choice.Enum - (PatternFlowIpv4Identification_Choice_Enum)(0), // 220: otg.PatternFlowIpv4Identification.Choice.Enum - (PatternFlowIpv4Reserved_Choice_Enum)(0), // 221: otg.PatternFlowIpv4Reserved.Choice.Enum - (PatternFlowIpv4DontFragment_Choice_Enum)(0), // 222: otg.PatternFlowIpv4DontFragment.Choice.Enum - (PatternFlowIpv4MoreFragments_Choice_Enum)(0), // 223: otg.PatternFlowIpv4MoreFragments.Choice.Enum - (PatternFlowIpv4FragmentOffset_Choice_Enum)(0), // 224: otg.PatternFlowIpv4FragmentOffset.Choice.Enum - (PatternFlowIpv4TimeToLive_Choice_Enum)(0), // 225: otg.PatternFlowIpv4TimeToLive.Choice.Enum - (PatternFlowIpv4Protocol_Choice_Enum)(0), // 226: otg.PatternFlowIpv4Protocol.Choice.Enum - (PatternFlowIpv4HeaderChecksum_Choice_Enum)(0), // 227: otg.PatternFlowIpv4HeaderChecksum.Choice.Enum - (PatternFlowIpv4HeaderChecksum_Generated_Enum)(0), // 228: otg.PatternFlowIpv4HeaderChecksum.Generated.Enum - (PatternFlowIpv4Src_Choice_Enum)(0), // 229: otg.PatternFlowIpv4Src.Choice.Enum - (PatternFlowIpv4Dst_Choice_Enum)(0), // 230: otg.PatternFlowIpv4Dst.Choice.Enum - (PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum)(0), // 231: otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag.Choice.Enum - (PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum)(0), // 232: otg.PatternFlowIpv4OptionsCustomTypeOptionClass.Choice.Enum - (PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum)(0), // 233: otg.PatternFlowIpv4OptionsCustomTypeOptionNumber.Choice.Enum - (PatternFlowIpv4PriorityRaw_Choice_Enum)(0), // 234: otg.PatternFlowIpv4PriorityRaw.Choice.Enum - (PatternFlowIpv4DscpPhb_Choice_Enum)(0), // 235: otg.PatternFlowIpv4DscpPhb.Choice.Enum - (PatternFlowIpv4DscpEcn_Choice_Enum)(0), // 236: otg.PatternFlowIpv4DscpEcn.Choice.Enum - (PatternFlowIpv4TosPrecedence_Choice_Enum)(0), // 237: otg.PatternFlowIpv4TosPrecedence.Choice.Enum - (PatternFlowIpv4TosDelay_Choice_Enum)(0), // 238: otg.PatternFlowIpv4TosDelay.Choice.Enum - (PatternFlowIpv4TosThroughput_Choice_Enum)(0), // 239: otg.PatternFlowIpv4TosThroughput.Choice.Enum - (PatternFlowIpv4TosReliability_Choice_Enum)(0), // 240: otg.PatternFlowIpv4TosReliability.Choice.Enum - (PatternFlowIpv4TosMonetary_Choice_Enum)(0), // 241: otg.PatternFlowIpv4TosMonetary.Choice.Enum - (PatternFlowIpv4TosUnused_Choice_Enum)(0), // 242: otg.PatternFlowIpv4TosUnused.Choice.Enum - (PatternFlowIpv6Version_Choice_Enum)(0), // 243: otg.PatternFlowIpv6Version.Choice.Enum - (PatternFlowIpv6TrafficClass_Choice_Enum)(0), // 244: otg.PatternFlowIpv6TrafficClass.Choice.Enum - (PatternFlowIpv6FlowLabel_Choice_Enum)(0), // 245: otg.PatternFlowIpv6FlowLabel.Choice.Enum - (PatternFlowIpv6PayloadLength_Choice_Enum)(0), // 246: otg.PatternFlowIpv6PayloadLength.Choice.Enum - (PatternFlowIpv6NextHeader_Choice_Enum)(0), // 247: otg.PatternFlowIpv6NextHeader.Choice.Enum - (PatternFlowIpv6HopLimit_Choice_Enum)(0), // 248: otg.PatternFlowIpv6HopLimit.Choice.Enum - (PatternFlowIpv6Src_Choice_Enum)(0), // 249: otg.PatternFlowIpv6Src.Choice.Enum - (PatternFlowIpv6Dst_Choice_Enum)(0), // 250: otg.PatternFlowIpv6Dst.Choice.Enum - (PatternFlowPfcPauseDst_Choice_Enum)(0), // 251: otg.PatternFlowPfcPauseDst.Choice.Enum - (PatternFlowPfcPauseSrc_Choice_Enum)(0), // 252: otg.PatternFlowPfcPauseSrc.Choice.Enum - (PatternFlowPfcPauseEtherType_Choice_Enum)(0), // 253: otg.PatternFlowPfcPauseEtherType.Choice.Enum - (PatternFlowPfcPauseControlOpCode_Choice_Enum)(0), // 254: otg.PatternFlowPfcPauseControlOpCode.Choice.Enum - (PatternFlowPfcPauseClassEnableVector_Choice_Enum)(0), // 255: otg.PatternFlowPfcPauseClassEnableVector.Choice.Enum - (PatternFlowPfcPausePauseClass0_Choice_Enum)(0), // 256: otg.PatternFlowPfcPausePauseClass0.Choice.Enum - (PatternFlowPfcPausePauseClass1_Choice_Enum)(0), // 257: otg.PatternFlowPfcPausePauseClass1.Choice.Enum - (PatternFlowPfcPausePauseClass2_Choice_Enum)(0), // 258: otg.PatternFlowPfcPausePauseClass2.Choice.Enum - (PatternFlowPfcPausePauseClass3_Choice_Enum)(0), // 259: otg.PatternFlowPfcPausePauseClass3.Choice.Enum - (PatternFlowPfcPausePauseClass4_Choice_Enum)(0), // 260: otg.PatternFlowPfcPausePauseClass4.Choice.Enum - (PatternFlowPfcPausePauseClass5_Choice_Enum)(0), // 261: otg.PatternFlowPfcPausePauseClass5.Choice.Enum - (PatternFlowPfcPausePauseClass6_Choice_Enum)(0), // 262: otg.PatternFlowPfcPausePauseClass6.Choice.Enum - (PatternFlowPfcPausePauseClass7_Choice_Enum)(0), // 263: otg.PatternFlowPfcPausePauseClass7.Choice.Enum - (PatternFlowEthernetPauseDst_Choice_Enum)(0), // 264: otg.PatternFlowEthernetPauseDst.Choice.Enum - (PatternFlowEthernetPauseSrc_Choice_Enum)(0), // 265: otg.PatternFlowEthernetPauseSrc.Choice.Enum - (PatternFlowEthernetPauseEtherType_Choice_Enum)(0), // 266: otg.PatternFlowEthernetPauseEtherType.Choice.Enum - (PatternFlowEthernetPauseControlOpCode_Choice_Enum)(0), // 267: otg.PatternFlowEthernetPauseControlOpCode.Choice.Enum - (PatternFlowEthernetPauseTime_Choice_Enum)(0), // 268: otg.PatternFlowEthernetPauseTime.Choice.Enum - (PatternFlowTcpSrcPort_Choice_Enum)(0), // 269: otg.PatternFlowTcpSrcPort.Choice.Enum - (PatternFlowTcpDstPort_Choice_Enum)(0), // 270: otg.PatternFlowTcpDstPort.Choice.Enum - (PatternFlowTcpSeqNum_Choice_Enum)(0), // 271: otg.PatternFlowTcpSeqNum.Choice.Enum - (PatternFlowTcpAckNum_Choice_Enum)(0), // 272: otg.PatternFlowTcpAckNum.Choice.Enum - (PatternFlowTcpDataOffset_Choice_Enum)(0), // 273: otg.PatternFlowTcpDataOffset.Choice.Enum - (PatternFlowTcpEcnNs_Choice_Enum)(0), // 274: otg.PatternFlowTcpEcnNs.Choice.Enum - (PatternFlowTcpEcnCwr_Choice_Enum)(0), // 275: otg.PatternFlowTcpEcnCwr.Choice.Enum - (PatternFlowTcpEcnEcho_Choice_Enum)(0), // 276: otg.PatternFlowTcpEcnEcho.Choice.Enum - (PatternFlowTcpCtlUrg_Choice_Enum)(0), // 277: otg.PatternFlowTcpCtlUrg.Choice.Enum - (PatternFlowTcpCtlAck_Choice_Enum)(0), // 278: otg.PatternFlowTcpCtlAck.Choice.Enum - (PatternFlowTcpCtlPsh_Choice_Enum)(0), // 279: otg.PatternFlowTcpCtlPsh.Choice.Enum - (PatternFlowTcpCtlRst_Choice_Enum)(0), // 280: otg.PatternFlowTcpCtlRst.Choice.Enum - (PatternFlowTcpCtlSyn_Choice_Enum)(0), // 281: otg.PatternFlowTcpCtlSyn.Choice.Enum - (PatternFlowTcpCtlFin_Choice_Enum)(0), // 282: otg.PatternFlowTcpCtlFin.Choice.Enum - (PatternFlowTcpWindow_Choice_Enum)(0), // 283: otg.PatternFlowTcpWindow.Choice.Enum - (PatternFlowUdpSrcPort_Choice_Enum)(0), // 284: otg.PatternFlowUdpSrcPort.Choice.Enum - (PatternFlowUdpDstPort_Choice_Enum)(0), // 285: otg.PatternFlowUdpDstPort.Choice.Enum - (PatternFlowUdpLength_Choice_Enum)(0), // 286: otg.PatternFlowUdpLength.Choice.Enum - (PatternFlowUdpChecksum_Choice_Enum)(0), // 287: otg.PatternFlowUdpChecksum.Choice.Enum - (PatternFlowUdpChecksum_Generated_Enum)(0), // 288: otg.PatternFlowUdpChecksum.Generated.Enum - (PatternFlowGreChecksumPresent_Choice_Enum)(0), // 289: otg.PatternFlowGreChecksumPresent.Choice.Enum - (PatternFlowGreReserved0_Choice_Enum)(0), // 290: otg.PatternFlowGreReserved0.Choice.Enum - (PatternFlowGreVersion_Choice_Enum)(0), // 291: otg.PatternFlowGreVersion.Choice.Enum - (PatternFlowGreProtocol_Choice_Enum)(0), // 292: otg.PatternFlowGreProtocol.Choice.Enum - (PatternFlowGreChecksum_Choice_Enum)(0), // 293: otg.PatternFlowGreChecksum.Choice.Enum - (PatternFlowGreChecksum_Generated_Enum)(0), // 294: otg.PatternFlowGreChecksum.Generated.Enum - (PatternFlowGreReserved1_Choice_Enum)(0), // 295: otg.PatternFlowGreReserved1.Choice.Enum - (PatternFlowGtpv1Version_Choice_Enum)(0), // 296: otg.PatternFlowGtpv1Version.Choice.Enum - (PatternFlowGtpv1ProtocolType_Choice_Enum)(0), // 297: otg.PatternFlowGtpv1ProtocolType.Choice.Enum - (PatternFlowGtpv1Reserved_Choice_Enum)(0), // 298: otg.PatternFlowGtpv1Reserved.Choice.Enum - (PatternFlowGtpv1EFlag_Choice_Enum)(0), // 299: otg.PatternFlowGtpv1EFlag.Choice.Enum - (PatternFlowGtpv1SFlag_Choice_Enum)(0), // 300: otg.PatternFlowGtpv1SFlag.Choice.Enum - (PatternFlowGtpv1PnFlag_Choice_Enum)(0), // 301: otg.PatternFlowGtpv1PnFlag.Choice.Enum - (PatternFlowGtpv1MessageType_Choice_Enum)(0), // 302: otg.PatternFlowGtpv1MessageType.Choice.Enum - (PatternFlowGtpv1MessageLength_Choice_Enum)(0), // 303: otg.PatternFlowGtpv1MessageLength.Choice.Enum - (PatternFlowGtpv1Teid_Choice_Enum)(0), // 304: otg.PatternFlowGtpv1Teid.Choice.Enum - (PatternFlowGtpv1SquenceNumber_Choice_Enum)(0), // 305: otg.PatternFlowGtpv1SquenceNumber.Choice.Enum - (PatternFlowGtpv1NPduNumber_Choice_Enum)(0), // 306: otg.PatternFlowGtpv1NPduNumber.Choice.Enum - (PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum)(0), // 307: otg.PatternFlowGtpv1NextExtensionHeaderType.Choice.Enum - (PatternFlowGtpExtensionExtensionLength_Choice_Enum)(0), // 308: otg.PatternFlowGtpExtensionExtensionLength.Choice.Enum - (PatternFlowGtpExtensionContents_Choice_Enum)(0), // 309: otg.PatternFlowGtpExtensionContents.Choice.Enum - (PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum)(0), // 310: otg.PatternFlowGtpExtensionNextExtensionHeader.Choice.Enum - (PatternFlowGtpv2Version_Choice_Enum)(0), // 311: otg.PatternFlowGtpv2Version.Choice.Enum - (PatternFlowGtpv2PiggybackingFlag_Choice_Enum)(0), // 312: otg.PatternFlowGtpv2PiggybackingFlag.Choice.Enum - (PatternFlowGtpv2TeidFlag_Choice_Enum)(0), // 313: otg.PatternFlowGtpv2TeidFlag.Choice.Enum - (PatternFlowGtpv2Spare1_Choice_Enum)(0), // 314: otg.PatternFlowGtpv2Spare1.Choice.Enum - (PatternFlowGtpv2MessageType_Choice_Enum)(0), // 315: otg.PatternFlowGtpv2MessageType.Choice.Enum - (PatternFlowGtpv2MessageLength_Choice_Enum)(0), // 316: otg.PatternFlowGtpv2MessageLength.Choice.Enum - (PatternFlowGtpv2Teid_Choice_Enum)(0), // 317: otg.PatternFlowGtpv2Teid.Choice.Enum - (PatternFlowGtpv2SequenceNumber_Choice_Enum)(0), // 318: otg.PatternFlowGtpv2SequenceNumber.Choice.Enum - (PatternFlowGtpv2Spare2_Choice_Enum)(0), // 319: otg.PatternFlowGtpv2Spare2.Choice.Enum - (PatternFlowArpHardwareType_Choice_Enum)(0), // 320: otg.PatternFlowArpHardwareType.Choice.Enum - (PatternFlowArpProtocolType_Choice_Enum)(0), // 321: otg.PatternFlowArpProtocolType.Choice.Enum - (PatternFlowArpHardwareLength_Choice_Enum)(0), // 322: otg.PatternFlowArpHardwareLength.Choice.Enum - (PatternFlowArpProtocolLength_Choice_Enum)(0), // 323: otg.PatternFlowArpProtocolLength.Choice.Enum - (PatternFlowArpOperation_Choice_Enum)(0), // 324: otg.PatternFlowArpOperation.Choice.Enum - (PatternFlowArpSenderHardwareAddr_Choice_Enum)(0), // 325: otg.PatternFlowArpSenderHardwareAddr.Choice.Enum - (PatternFlowArpSenderProtocolAddr_Choice_Enum)(0), // 326: otg.PatternFlowArpSenderProtocolAddr.Choice.Enum - (PatternFlowArpTargetHardwareAddr_Choice_Enum)(0), // 327: otg.PatternFlowArpTargetHardwareAddr.Choice.Enum - (PatternFlowArpTargetProtocolAddr_Choice_Enum)(0), // 328: otg.PatternFlowArpTargetProtocolAddr.Choice.Enum - (PatternFlowIcmpEchoType_Choice_Enum)(0), // 329: otg.PatternFlowIcmpEchoType.Choice.Enum - (PatternFlowIcmpEchoCode_Choice_Enum)(0), // 330: otg.PatternFlowIcmpEchoCode.Choice.Enum - (PatternFlowIcmpEchoChecksum_Choice_Enum)(0), // 331: otg.PatternFlowIcmpEchoChecksum.Choice.Enum - (PatternFlowIcmpEchoChecksum_Generated_Enum)(0), // 332: otg.PatternFlowIcmpEchoChecksum.Generated.Enum - (PatternFlowIcmpEchoIdentifier_Choice_Enum)(0), // 333: otg.PatternFlowIcmpEchoIdentifier.Choice.Enum - (PatternFlowIcmpEchoSequenceNumber_Choice_Enum)(0), // 334: otg.PatternFlowIcmpEchoSequenceNumber.Choice.Enum - (PatternFlowIcmpCommonChecksum_Choice_Enum)(0), // 335: otg.PatternFlowIcmpCommonChecksum.Choice.Enum - (PatternFlowIcmpCommonChecksum_Generated_Enum)(0), // 336: otg.PatternFlowIcmpCommonChecksum.Generated.Enum - (PatternFlowIcmpNextFieldsIdentifier_Choice_Enum)(0), // 337: otg.PatternFlowIcmpNextFieldsIdentifier.Choice.Enum - (PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum)(0), // 338: otg.PatternFlowIcmpNextFieldsSequenceNumber.Choice.Enum - (PatternFlowIcmpv6EchoType_Choice_Enum)(0), // 339: otg.PatternFlowIcmpv6EchoType.Choice.Enum - (PatternFlowIcmpv6EchoCode_Choice_Enum)(0), // 340: otg.PatternFlowIcmpv6EchoCode.Choice.Enum - (PatternFlowIcmpv6EchoIdentifier_Choice_Enum)(0), // 341: otg.PatternFlowIcmpv6EchoIdentifier.Choice.Enum - (PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum)(0), // 342: otg.PatternFlowIcmpv6EchoSequenceNumber.Choice.Enum - (PatternFlowIcmpv6EchoChecksum_Choice_Enum)(0), // 343: otg.PatternFlowIcmpv6EchoChecksum.Choice.Enum - (PatternFlowIcmpv6EchoChecksum_Generated_Enum)(0), // 344: otg.PatternFlowIcmpv6EchoChecksum.Generated.Enum - (PatternFlowIcmpv6CommonChecksum_Choice_Enum)(0), // 345: otg.PatternFlowIcmpv6CommonChecksum.Choice.Enum - (PatternFlowIcmpv6CommonChecksum_Generated_Enum)(0), // 346: otg.PatternFlowIcmpv6CommonChecksum.Generated.Enum - (PatternFlowPppAddress_Choice_Enum)(0), // 347: otg.PatternFlowPppAddress.Choice.Enum - (PatternFlowPppControl_Choice_Enum)(0), // 348: otg.PatternFlowPppControl.Choice.Enum - (PatternFlowPppProtocolType_Choice_Enum)(0), // 349: otg.PatternFlowPppProtocolType.Choice.Enum - (PatternFlowIgmpv1Version_Choice_Enum)(0), // 350: otg.PatternFlowIgmpv1Version.Choice.Enum - (PatternFlowIgmpv1Type_Choice_Enum)(0), // 351: otg.PatternFlowIgmpv1Type.Choice.Enum - (PatternFlowIgmpv1Unused_Choice_Enum)(0), // 352: otg.PatternFlowIgmpv1Unused.Choice.Enum - (PatternFlowIgmpv1Checksum_Choice_Enum)(0), // 353: otg.PatternFlowIgmpv1Checksum.Choice.Enum - (PatternFlowIgmpv1Checksum_Generated_Enum)(0), // 354: otg.PatternFlowIgmpv1Checksum.Generated.Enum - (PatternFlowIgmpv1GroupAddress_Choice_Enum)(0), // 355: otg.PatternFlowIgmpv1GroupAddress.Choice.Enum - (PatternFlowMplsLabel_Choice_Enum)(0), // 356: otg.PatternFlowMplsLabel.Choice.Enum - (PatternFlowMplsTrafficClass_Choice_Enum)(0), // 357: otg.PatternFlowMplsTrafficClass.Choice.Enum - (PatternFlowMplsBottomOfStack_Choice_Enum)(0), // 358: otg.PatternFlowMplsBottomOfStack.Choice.Enum - (PatternFlowMplsTimeToLive_Choice_Enum)(0), // 359: otg.PatternFlowMplsTimeToLive.Choice.Enum - (PatternFlowSnmpv2CVersion_Choice_Enum)(0), // 360: otg.PatternFlowSnmpv2cVersion.Choice.Enum - (PatternFlowSnmpv2CPDURequestId_Choice_Enum)(0), // 361: otg.PatternFlowSnmpv2cPDURequestId.Choice.Enum - (PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum)(0), // 362: otg.PatternFlowSnmpv2cPDUErrorIndex.Choice.Enum - (PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum)(0), // 363: otg.PatternFlowSnmpv2cBulkPDURequestId.Choice.Enum - (PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum)(0), // 364: otg.PatternFlowSnmpv2cBulkPDUNonRepeaters.Choice.Enum - (PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum)(0), // 365: otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions.Choice.Enum - (PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum)(0), // 366: otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue.Choice.Enum - (PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum)(0), // 367: otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue.Choice.Enum - (PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum)(0), // 368: otg.PatternFlowSnmpv2cVariableBindingValueCounterValue.Choice.Enum - (PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum)(0), // 369: otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue.Choice.Enum - (PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum)(0), // 370: otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue.Choice.Enum - (PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum)(0), // 371: otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue.Choice.Enum - (PatternFlowSnmpv2CCommonRequestId_Choice_Enum)(0), // 372: otg.PatternFlowSnmpv2cCommonRequestId.Choice.Enum - (PatternFlowRsvpRsvpChecksum_Choice_Enum)(0), // 373: otg.PatternFlowRsvpRsvpChecksum.Choice.Enum - (PatternFlowRsvpRsvpChecksum_Generated_Enum)(0), // 374: otg.PatternFlowRsvpRsvpChecksum.Generated.Enum - (PatternFlowRsvpTimeToLive_Choice_Enum)(0), // 375: otg.PatternFlowRsvpTimeToLive.Choice.Enum - (PatternFlowRsvpReserved_Choice_Enum)(0), // 376: otg.PatternFlowRsvpReserved.Choice.Enum - (PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum)(0), // 377: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.Choice.Enum - (PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum)(0), // 378: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.Choice.Enum - (PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum)(0), // 379: otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.Choice.Enum - (PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum)(0), // 380: otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger.Choice.Enum - (PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum)(0), // 381: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.Choice.Enum - (PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum)(0), // 382: otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.Choice.Enum - (PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum)(0), // 383: otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle.Choice.Enum - (PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum)(0), // 384: otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR.Choice.Enum - (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum)(0), // 385: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.Choice.Enum - (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum)(0), // 386: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.Choice.Enum - (PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum)(0), // 387: otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.Choice.Enum - (PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum)(0), // 388: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.Choice.Enum - (PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum)(0), // 389: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid.Choice.Enum - (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum)(0), // 390: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.Choice.Enum - (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum)(0), // 391: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.Choice.Enum - (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum)(0), // 392: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.Choice.Enum - (PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum)(0), // 393: otg.PatternFlowRSVPPathSenderTspecIntServVersion.Choice.Enum - (PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum)(0), // 394: otg.PatternFlowRSVPPathSenderTspecIntServReserved1.Choice.Enum - (PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum)(0), // 395: otg.PatternFlowRSVPPathSenderTspecIntServOverallLength.Choice.Enum - (PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum)(0), // 396: otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader.Choice.Enum - (PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum)(0), // 397: otg.PatternFlowRSVPPathSenderTspecIntServZeroBit.Choice.Enum - (PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum)(0), // 398: otg.PatternFlowRSVPPathSenderTspecIntServReserved2.Choice.Enum - (PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum)(0), // 399: otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.Choice.Enum - (PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum)(0), // 400: otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.Choice.Enum - (PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum)(0), // 401: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag.Choice.Enum - (PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum)(0), // 402: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length.Choice.Enum - (PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum)(0), // 403: otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.Choice.Enum - (PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum)(0), // 404: otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.Choice.Enum - (PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum)(0), // 405: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.Choice.Enum - (PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum)(0), // 406: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.Choice.Enum - (PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum)(0), // 407: otg.PatternFlowRSVPPathRecordRouteType1LabelFlags.Choice.Enum - (PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum)(0), // 408: otg.PatternFlowRSVPPathRecordRouteType1LabelCType.Choice.Enum - (PatternFlowRSVPPathObjectsCustomType_Choice_Enum)(0), // 409: otg.PatternFlowRSVPPathObjectsCustomType.Choice.Enum - (*Config)(nil), // 410: otg.Config - (*ConfigOptions)(nil), // 411: otg.ConfigOptions - (*Port)(nil), // 412: otg.Port - (*PortOptions)(nil), // 413: otg.PortOptions - (*Lag)(nil), // 414: otg.Lag - (*LagPort)(nil), // 415: otg.LagPort - (*LagProtocol)(nil), // 416: otg.LagProtocol - (*LagProtocolStatic)(nil), // 417: otg.LagProtocolStatic - (*LagProtocolLacp)(nil), // 418: otg.LagProtocolLacp - (*LagPortLacp)(nil), // 419: otg.LagPortLacp - (*DeviceEthernetBase)(nil), // 420: otg.DeviceEthernetBase - (*DeviceEthernet)(nil), // 421: otg.DeviceEthernet - (*EthernetConnection)(nil), // 422: otg.EthernetConnection - (*DeviceVlan)(nil), // 423: otg.DeviceVlan - (*DeviceIpv4)(nil), // 424: otg.DeviceIpv4 - (*DeviceIpv4Loopback)(nil), // 425: otg.DeviceIpv4Loopback - (*DeviceIpv4GatewayMAC)(nil), // 426: otg.DeviceIpv4GatewayMAC - (*DeviceIpv6)(nil), // 427: otg.DeviceIpv6 - (*DeviceIpv6Loopback)(nil), // 428: otg.DeviceIpv6Loopback - (*DeviceIpv6GatewayMAC)(nil), // 429: otg.DeviceIpv6GatewayMAC - (*Layer1)(nil), // 430: otg.Layer1 - (*Layer1AutoNegotiation)(nil), // 431: otg.Layer1AutoNegotiation - (*Layer1FlowControl)(nil), // 432: otg.Layer1FlowControl - (*Layer1Ieee8023X)(nil), // 433: otg.Layer1Ieee8023x - (*Layer1Ieee8021Qbb)(nil), // 434: otg.Layer1Ieee8021qbb - (*Capture)(nil), // 435: otg.Capture - (*CaptureFilter)(nil), // 436: otg.CaptureFilter - (*CaptureCustom)(nil), // 437: otg.CaptureCustom - (*CaptureField)(nil), // 438: otg.CaptureField - (*CaptureEthernet)(nil), // 439: otg.CaptureEthernet - (*CaptureVlan)(nil), // 440: otg.CaptureVlan - (*CaptureIpv4)(nil), // 441: otg.CaptureIpv4 - (*CaptureIpv6)(nil), // 442: otg.CaptureIpv6 - (*Device)(nil), // 443: otg.Device - (*ProtocolOptions)(nil), // 444: otg.ProtocolOptions - (*DeviceIsisRouter)(nil), // 445: otg.DeviceIsisRouter - (*DeviceIsisMultiInstance)(nil), // 446: otg.DeviceIsisMultiInstance - (*IsisInterface)(nil), // 447: otg.IsisInterface - (*IsisInterfaceLevel)(nil), // 448: otg.IsisInterfaceLevel - (*IsisMT)(nil), // 449: otg.IsisMT - (*LinkStateTE)(nil), // 450: otg.LinkStateTE - (*LinkStatepriorityBandwidths)(nil), // 451: otg.LinkStatepriorityBandwidths - (*IsisInterfaceAuthentication)(nil), // 452: otg.IsisInterfaceAuthentication - (*IsisInterfaceAdvanced)(nil), // 453: otg.IsisInterfaceAdvanced - (*IsisInterfaceLinkProtection)(nil), // 454: otg.IsisInterfaceLinkProtection - (*IsisBasic)(nil), // 455: otg.IsisBasic - (*IsisAdvanced)(nil), // 456: otg.IsisAdvanced - (*IsisAuthentication)(nil), // 457: otg.IsisAuthentication - (*IsisAuthenticationBase)(nil), // 458: otg.IsisAuthenticationBase - (*IsisV4RouteRange)(nil), // 459: otg.IsisV4RouteRange - (*V4RouteAddress)(nil), // 460: otg.V4RouteAddress - (*V6RouteAddress)(nil), // 461: otg.V6RouteAddress - (*MACRouteAddress)(nil), // 462: otg.MACRouteAddress - (*IsisV6RouteRange)(nil), // 463: otg.IsisV6RouteRange - (*DeviceBgpRouter)(nil), // 464: otg.DeviceBgpRouter - (*DeviceBgpMessageHeaderError)(nil), // 465: otg.DeviceBgpMessageHeaderError - (*DeviceBgpOpenMessageError)(nil), // 466: otg.DeviceBgpOpenMessageError - (*DeviceBgpUpdateMessageError)(nil), // 467: otg.DeviceBgpUpdateMessageError - (*DeviceBgpHoldTimerExpired)(nil), // 468: otg.DeviceBgpHoldTimerExpired - (*DeviceBgpFiniteStateMachineError)(nil), // 469: otg.DeviceBgpFiniteStateMachineError - (*DeviceBgpCeaseError)(nil), // 470: otg.DeviceBgpCeaseError - (*DeviceBgpCustomError)(nil), // 471: otg.DeviceBgpCustomError - (*BgpV4Peer)(nil), // 472: otg.BgpV4Peer - (*BgpV4Interface)(nil), // 473: otg.BgpV4Interface - (*BgpV4EthernetSegment)(nil), // 474: otg.BgpV4EthernetSegment - (*BgpEthernetSegmentDfElection)(nil), // 475: otg.BgpEthernetSegmentDfElection - (*BgpRouteAdvanced)(nil), // 476: otg.BgpRouteAdvanced - (*BgpCommunity)(nil), // 477: otg.BgpCommunity - (*BgpExtCommunity)(nil), // 478: otg.BgpExtCommunity - (*BgpAsPath)(nil), // 479: otg.BgpAsPath - (*BgpAsPathSegment)(nil), // 480: otg.BgpAsPathSegment - (*BgpV4EvpnEvis)(nil), // 481: otg.BgpV4EvpnEvis - (*BgpV4EviVxlan)(nil), // 482: otg.BgpV4EviVxlan - (*BgpV4EviVxlanBroadcastDomain)(nil), // 483: otg.BgpV4EviVxlanBroadcastDomain - (*BgpCMacIpRange)(nil), // 484: otg.BgpCMacIpRange - (*BgpRouteDistinguisher)(nil), // 485: otg.BgpRouteDistinguisher - (*BgpRouteTarget)(nil), // 486: otg.BgpRouteTarget - (*BgpAdvanced)(nil), // 487: otg.BgpAdvanced - (*BgpCapability)(nil), // 488: otg.BgpCapability - (*BgpLearnedInformationFilter)(nil), // 489: otg.BgpLearnedInformationFilter - (*BgpV4RouteRange)(nil), // 490: otg.BgpV4RouteRange - (*BgpAddPath)(nil), // 491: otg.BgpAddPath - (*BgpExtendedCommunity)(nil), // 492: otg.BgpExtendedCommunity - (*BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget)(nil), // 493: otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget - (*BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin)(nil), // 494: otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin - (*BgpExtendedCommunityTransitive2OctetAsType)(nil), // 495: otg.BgpExtendedCommunityTransitive2OctetAsType - (*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin)(nil), // 496: otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin - (*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget)(nil), // 497: otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget - (*BgpExtendedCommunityTransitiveIpv4AddressType)(nil), // 498: otg.BgpExtendedCommunityTransitiveIpv4AddressType - (*BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget)(nil), // 499: otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget - (*BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin)(nil), // 500: otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin - (*BgpExtendedCommunityTransitive4OctetAsType)(nil), // 501: otg.BgpExtendedCommunityTransitive4OctetAsType - (*BgpExtendedCommunityTransitiveOpaqueTypeColor)(nil), // 502: otg.BgpExtendedCommunityTransitiveOpaqueTypeColor - (*BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation)(nil), // 503: otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation - (*BgpExtendedCommunityTransitiveOpaqueType)(nil), // 504: otg.BgpExtendedCommunityTransitiveOpaqueType - (*BgpExtendedCommunityTransitiveEvpnTypeRouterMac)(nil), // 505: otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac - (*BgpExtendedCommunityTransitiveEvpnType)(nil), // 506: otg.BgpExtendedCommunityTransitiveEvpnType - (*BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth)(nil), // 507: otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth - (*BgpExtendedCommunityNonTransitive2OctetAsType)(nil), // 508: otg.BgpExtendedCommunityNonTransitive2OctetAsType - (*BgpExtendedCommunityCustomType)(nil), // 509: otg.BgpExtendedCommunityCustomType - (*BgpV6RouteRange)(nil), // 510: otg.BgpV6RouteRange - (*BgpSrteV4Policy)(nil), // 511: otg.BgpSrteV4Policy - (*BgpSrteV4TunnelTlv)(nil), // 512: otg.BgpSrteV4TunnelTlv - (*BgpSrteRemoteEndpointSubTlv)(nil), // 513: otg.BgpSrteRemoteEndpointSubTlv - (*BgpSrteColorSubTlv)(nil), // 514: otg.BgpSrteColorSubTlv - (*BgpSrteBindingSubTlv)(nil), // 515: otg.BgpSrteBindingSubTlv - (*BgpSrtePreferenceSubTlv)(nil), // 516: otg.BgpSrtePreferenceSubTlv - (*BgpSrtePolicyPrioritySubTlv)(nil), // 517: otg.BgpSrtePolicyPrioritySubTlv - (*BgpSrtePolicyNameSubTlv)(nil), // 518: otg.BgpSrtePolicyNameSubTlv - (*BgpSrteExplicitNullLabelPolicySubTlv)(nil), // 519: otg.BgpSrteExplicitNullLabelPolicySubTlv - (*BgpSrteSegmentList)(nil), // 520: otg.BgpSrteSegmentList - (*BgpSrteSegment)(nil), // 521: otg.BgpSrteSegment - (*BgpSrteSrMplsSid)(nil), // 522: otg.BgpSrteSrMplsSid - (*BgpSrteSRv6SIDEndpointBehaviorAndStructure)(nil), // 523: otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure - (*BgpSrteSegmentATypeSubTlv)(nil), // 524: otg.BgpSrteSegmentATypeSubTlv - (*BgpSrteSegmentBTypeSubTlv)(nil), // 525: otg.BgpSrteSegmentBTypeSubTlv - (*BgpSrteSegmentCTypeSubTlv)(nil), // 526: otg.BgpSrteSegmentCTypeSubTlv - (*BgpSrteSegmentDTypeSubTlv)(nil), // 527: otg.BgpSrteSegmentDTypeSubTlv - (*BgpSrteSegmentETypeSubTlv)(nil), // 528: otg.BgpSrteSegmentETypeSubTlv - (*BgpSrteSegmentFTypeSubTlv)(nil), // 529: otg.BgpSrteSegmentFTypeSubTlv - (*BgpSrteSegmentGTypeSubTlv)(nil), // 530: otg.BgpSrteSegmentGTypeSubTlv - (*BgpSrteSegmentHTypeSubTlv)(nil), // 531: otg.BgpSrteSegmentHTypeSubTlv - (*BgpSrteSegmentITypeSubTlv)(nil), // 532: otg.BgpSrteSegmentITypeSubTlv - (*BgpSrteSegmentJTypeSubTlv)(nil), // 533: otg.BgpSrteSegmentJTypeSubTlv - (*BgpSrteSegmentKTypeSubTlv)(nil), // 534: otg.BgpSrteSegmentKTypeSubTlv - (*BgpSrteV6Policy)(nil), // 535: otg.BgpSrteV6Policy - (*BgpSrteV6TunnelTlv)(nil), // 536: otg.BgpSrteV6TunnelTlv - (*BgpGracefulRestart)(nil), // 537: otg.BgpGracefulRestart - (*BgpUpdateReplay)(nil), // 538: otg.BgpUpdateReplay - (*BgpRawBytes)(nil), // 539: otg.BgpRawBytes - (*BgpOneUpdateReplay)(nil), // 540: otg.BgpOneUpdateReplay - (*BgpStructuredPdus)(nil), // 541: otg.BgpStructuredPdus - (*BgpOneStructuredUpdateReplay)(nil), // 542: otg.BgpOneStructuredUpdateReplay - (*BgpOneTraditionalNlriPrefix)(nil), // 543: otg.BgpOneTraditionalNlriPrefix - (*BgpOneIpv4NLRIPrefix)(nil), // 544: otg.BgpOneIpv4NLRIPrefix - (*BgpOneIpv6NLRIPrefix)(nil), // 545: otg.BgpOneIpv6NLRIPrefix - (*BgpNLRIPrefixPathId)(nil), // 546: otg.BgpNLRIPrefixPathId - (*BgpAttributes)(nil), // 547: otg.BgpAttributes - (*BgpAttributesOtherAttribute)(nil), // 548: otg.BgpAttributesOtherAttribute - (*BgpAttributesAsPath)(nil), // 549: otg.BgpAttributesAsPath - (*BgpAttributesAsPathFourByteAsPath)(nil), // 550: otg.BgpAttributesAsPathFourByteAsPath - (*BgpAttributesFourByteAsPathSegment)(nil), // 551: otg.BgpAttributesFourByteAsPathSegment - (*BgpAttributesAsPathTwoByteAsPath)(nil), // 552: otg.BgpAttributesAsPathTwoByteAsPath - (*BgpAttributesTwoByteAsPathSegment)(nil), // 553: otg.BgpAttributesTwoByteAsPathSegment - (*BgpAttributesAs4Path)(nil), // 554: otg.BgpAttributesAs4Path - (*BgpAttributesAggregator)(nil), // 555: otg.BgpAttributesAggregator - (*BgpAttributesAs4Aggregator)(nil), // 556: otg.BgpAttributesAs4Aggregator - (*BgpAttributesCommunity)(nil), // 557: otg.BgpAttributesCommunity - (*BgpAttributesCustomCommunity)(nil), // 558: otg.BgpAttributesCustomCommunity - (*BgpAttributesNextHop)(nil), // 559: otg.BgpAttributesNextHop - (*BgpAttributesNextHopIpv6TwoAddresses)(nil), // 560: otg.BgpAttributesNextHopIpv6TwoAddresses - (*BgpAttributesMpReachNlri)(nil), // 561: otg.BgpAttributesMpReachNlri - (*BgpAttributesMpUnreachNlri)(nil), // 562: otg.BgpAttributesMpUnreachNlri - (*BgpAttributesMultiExitDiscriminator)(nil), // 563: otg.BgpAttributesMultiExitDiscriminator - (*BgpAttributesLocalPreference)(nil), // 564: otg.BgpAttributesLocalPreference - (*BgpAttributesOriginatorId)(nil), // 565: otg.BgpAttributesOriginatorId - (*BgpV6Peer)(nil), // 566: otg.BgpV6Peer - (*BgpV6Interface)(nil), // 567: otg.BgpV6Interface - (*BgpV6SegmentRouting)(nil), // 568: otg.BgpV6SegmentRouting - (*BgpV6EthernetSegment)(nil), // 569: otg.BgpV6EthernetSegment - (*BgpV6EvpnEvis)(nil), // 570: otg.BgpV6EvpnEvis - (*BgpV6EviVxlan)(nil), // 571: otg.BgpV6EviVxlan - (*BgpV6EviVxlanBroadcastDomain)(nil), // 572: otg.BgpV6EviVxlanBroadcastDomain - (*DeviceVxlan)(nil), // 573: otg.DeviceVxlan - (*VxlanV4Tunnel)(nil), // 574: otg.VxlanV4Tunnel - (*VxlanV6Tunnel)(nil), // 575: otg.VxlanV6Tunnel - (*VxlanV4TunnelDestinationIPMode)(nil), // 576: otg.VxlanV4TunnelDestinationIPMode - (*VxlanV6TunnelDestinationIPMode)(nil), // 577: otg.VxlanV6TunnelDestinationIPMode - (*VxlanV4TunnelDestinationIPModeUnicast)(nil), // 578: otg.VxlanV4TunnelDestinationIPModeUnicast - (*VxlanV6TunnelDestinationIPModeUnicast)(nil), // 579: otg.VxlanV6TunnelDestinationIPModeUnicast - (*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache)(nil), // 580: otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache - (*VxlanV4TunnelDestinationIPModeUnicastVtep)(nil), // 581: otg.VxlanV4TunnelDestinationIPModeUnicastVtep - (*VxlanV6TunnelDestinationIPModeUnicastVtep)(nil), // 582: otg.VxlanV6TunnelDestinationIPModeUnicastVtep - (*VxlanV4TunnelDestinationIPModeMulticast)(nil), // 583: otg.VxlanV4TunnelDestinationIPModeMulticast - (*VxlanV6TunnelDestinationIPModeMulticast)(nil), // 584: otg.VxlanV6TunnelDestinationIPModeMulticast - (*DeviceRsvp)(nil), // 585: otg.DeviceRsvp - (*RsvpIpv4Interface)(nil), // 586: otg.RsvpIpv4Interface - (*RsvpLspIpv4Interface)(nil), // 587: otg.RsvpLspIpv4Interface - (*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp)(nil), // 588: otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp - (*RsvpLspIpv4InterfaceP2PIngressIpv4Lsp)(nil), // 589: otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp - (*RsvpSessionAttribute)(nil), // 590: otg.RsvpSessionAttribute - (*RsvpResourceAffinities)(nil), // 591: otg.RsvpResourceAffinities - (*RsvpTspec)(nil), // 592: otg.RsvpTspec - (*RsvpFastReroute)(nil), // 593: otg.RsvpFastReroute - (*RsvpEro)(nil), // 594: otg.RsvpEro - (*RsvpEroSubobject)(nil), // 595: otg.RsvpEroSubobject - (*Flow)(nil), // 596: otg.Flow - (*FlowTxRx)(nil), // 597: otg.FlowTxRx - (*FlowPort)(nil), // 598: otg.FlowPort - (*FlowRouter)(nil), // 599: otg.FlowRouter - (*FlowHeader)(nil), // 600: otg.FlowHeader - (*FlowCustom)(nil), // 601: otg.FlowCustom - (*FlowCustomMetricTag)(nil), // 602: otg.FlowCustomMetricTag - (*FlowEthernet)(nil), // 603: otg.FlowEthernet - (*FlowVlan)(nil), // 604: otg.FlowVlan - (*FlowVxlan)(nil), // 605: otg.FlowVxlan - (*FlowIpv4)(nil), // 606: otg.FlowIpv4 - (*FlowIpv4Options)(nil), // 607: otg.FlowIpv4Options - (*FlowIpv4OptionsCustom)(nil), // 608: otg.FlowIpv4OptionsCustom - (*FlowIpv4OptionsCustomType)(nil), // 609: otg.FlowIpv4OptionsCustomType - (*FlowIpv4OptionsCustomLength)(nil), // 610: otg.FlowIpv4OptionsCustomLength - (*FlowIpv4Priority)(nil), // 611: otg.FlowIpv4Priority - (*FlowIpv4Dscp)(nil), // 612: otg.FlowIpv4Dscp - (*FlowIpv4Tos)(nil), // 613: otg.FlowIpv4Tos - (*FlowIpv6)(nil), // 614: otg.FlowIpv6 - (*FlowPfcPause)(nil), // 615: otg.FlowPfcPause - (*FlowEthernetPause)(nil), // 616: otg.FlowEthernetPause - (*FlowTcp)(nil), // 617: otg.FlowTcp - (*FlowUdp)(nil), // 618: otg.FlowUdp - (*FlowGre)(nil), // 619: otg.FlowGre - (*FlowGtpv1)(nil), // 620: otg.FlowGtpv1 - (*FlowGtpExtension)(nil), // 621: otg.FlowGtpExtension - (*FlowGtpv2)(nil), // 622: otg.FlowGtpv2 - (*FlowArp)(nil), // 623: otg.FlowArp - (*FlowIcmp)(nil), // 624: otg.FlowIcmp - (*FlowIcmpEcho)(nil), // 625: otg.FlowIcmpEcho - (*FlowIcmpv6)(nil), // 626: otg.FlowIcmpv6 - (*FlowIcmpv6Echo)(nil), // 627: otg.FlowIcmpv6Echo - (*FlowPpp)(nil), // 628: otg.FlowPpp - (*FlowIgmpv1)(nil), // 629: otg.FlowIgmpv1 - (*FlowMpls)(nil), // 630: otg.FlowMpls - (*FlowSnmpv2C)(nil), // 631: otg.FlowSnmpv2c - (*FlowSnmpv2CData)(nil), // 632: otg.FlowSnmpv2cData - (*FlowSnmpv2CPDU)(nil), // 633: otg.FlowSnmpv2cPDU - (*FlowSnmpv2CBulkPDU)(nil), // 634: otg.FlowSnmpv2cBulkPDU - (*FlowSnmpv2CVariableBinding)(nil), // 635: otg.FlowSnmpv2cVariableBinding - (*FlowSnmpv2CVariableBindingValue)(nil), // 636: otg.FlowSnmpv2cVariableBindingValue - (*FlowSnmpv2CVariableBindingStringValue)(nil), // 637: otg.FlowSnmpv2cVariableBindingStringValue - (*FlowRsvp)(nil), // 638: otg.FlowRsvp - (*FlowRSVPLength)(nil), // 639: otg.FlowRSVPLength - (*FlowRSVPMessage)(nil), // 640: otg.FlowRSVPMessage - (*FlowRSVPPathMessage)(nil), // 641: otg.FlowRSVPPathMessage - (*FlowRSVPPathObjects)(nil), // 642: otg.FlowRSVPPathObjects - (*FlowRSVPObjectLength)(nil), // 643: otg.FlowRSVPObjectLength - (*FlowRSVPPathObjectsClass)(nil), // 644: otg.FlowRSVPPathObjectsClass - (*FlowRSVPPathObjectsClassSession)(nil), // 645: otg.FlowRSVPPathObjectsClassSession - (*FlowRSVPPathObjectsSessionCType)(nil), // 646: otg.FlowRSVPPathObjectsSessionCType - (*FlowRSVPPathSessionLspTunnelIpv4)(nil), // 647: otg.FlowRSVPPathSessionLspTunnelIpv4 - (*FlowRSVPPathSessionExtTunnelId)(nil), // 648: otg.FlowRSVPPathSessionExtTunnelId - (*FlowRSVPPathObjectsClassRsvpHop)(nil), // 649: otg.FlowRSVPPathObjectsClassRsvpHop - (*FlowRSVPPathObjectsRsvpHopCType)(nil), // 650: otg.FlowRSVPPathObjectsRsvpHopCType - (*FlowRSVPPathRsvpHopIpv4)(nil), // 651: otg.FlowRSVPPathRsvpHopIpv4 - (*FlowRSVPPathObjectsClassTimeValues)(nil), // 652: otg.FlowRSVPPathObjectsClassTimeValues - (*FlowRSVPPathObjectsTimeValuesCType)(nil), // 653: otg.FlowRSVPPathObjectsTimeValuesCType - (*FlowRSVPPathTimeValuesType1)(nil), // 654: otg.FlowRSVPPathTimeValuesType1 - (*FlowRSVPPathObjectsClassExplicitRoute)(nil), // 655: otg.FlowRSVPPathObjectsClassExplicitRoute - (*FlowRSVPPathObjectsClassExplicitRouteCType)(nil), // 656: otg.FlowRSVPPathObjectsClassExplicitRouteCType - (*FlowRSVPPathExplicitRouteType1)(nil), // 657: otg.FlowRSVPPathExplicitRouteType1 - (*FlowRSVPType1ExplicitRouteSubobjects)(nil), // 658: otg.FlowRSVPType1ExplicitRouteSubobjects - (*FlowRSVPType1ExplicitRouteSubobjectsType)(nil), // 659: otg.FlowRSVPType1ExplicitRouteSubobjectsType - (*FlowRSVPPathExplicitRouteType1Ipv4Prefix)(nil), // 660: otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix - (*FlowRSVPPathExplicitRouteType1ASNumber)(nil), // 661: otg.FlowRSVPPathExplicitRouteType1ASNumber - (*FlowRSVPExplicitRouteLength)(nil), // 662: otg.FlowRSVPExplicitRouteLength - (*FlowRSVPExplicitRouteASNumberLength)(nil), // 663: otg.FlowRSVPExplicitRouteASNumberLength - (*FlowRSVPPathObjectsClassLabelRequest)(nil), // 664: otg.FlowRSVPPathObjectsClassLabelRequest - (*FlowRSVPPathObjectsLabelRequestCType)(nil), // 665: otg.FlowRSVPPathObjectsLabelRequestCType - (*FlowRSVPPathLabelRequestWithoutLabelRange)(nil), // 666: otg.FlowRSVPPathLabelRequestWithoutLabelRange - (*FlowRSVPPathObjectsClassSessionAttribute)(nil), // 667: otg.FlowRSVPPathObjectsClassSessionAttribute - (*FlowRSVPPathObjectsSessionAttributeCType)(nil), // 668: otg.FlowRSVPPathObjectsSessionAttributeCType - (*FlowRSVPPathSessionAttributeLspTunnel)(nil), // 669: otg.FlowRSVPPathSessionAttributeLspTunnel - (*FlowRSVPPathSessionAttributeLspTunnelRa)(nil), // 670: otg.FlowRSVPPathSessionAttributeLspTunnelRa - (*FlowRSVPLspTunnelFlag)(nil), // 671: otg.FlowRSVPLspTunnelFlag - (*FlowRSVPSessionAttributeNameLength)(nil), // 672: otg.FlowRSVPSessionAttributeNameLength - (*FlowRSVPPathObjectsClassSenderTemplate)(nil), // 673: otg.FlowRSVPPathObjectsClassSenderTemplate - (*FlowRSVPPathObjectsSenderTemplateCType)(nil), // 674: otg.FlowRSVPPathObjectsSenderTemplateCType - (*FlowRSVPPathSenderTemplateLspTunnelIpv4)(nil), // 675: otg.FlowRSVPPathSenderTemplateLspTunnelIpv4 - (*FlowRSVPPathObjectsClassSenderTspec)(nil), // 676: otg.FlowRSVPPathObjectsClassSenderTspec - (*FlowRSVPPathObjectsSenderTspecCType)(nil), // 677: otg.FlowRSVPPathObjectsSenderTspecCType - (*FlowRSVPPathSenderTspecIntServ)(nil), // 678: otg.FlowRSVPPathSenderTspecIntServ - (*FlowRSVPPathObjectsClassRecordRoute)(nil), // 679: otg.FlowRSVPPathObjectsClassRecordRoute - (*FlowRSVPPathObjectsRecordRouteCType)(nil), // 680: otg.FlowRSVPPathObjectsRecordRouteCType - (*FlowRSVPPathRecordRouteType1)(nil), // 681: otg.FlowRSVPPathRecordRouteType1 - (*FlowRSVPType1RecordRouteSubobjects)(nil), // 682: otg.FlowRSVPType1RecordRouteSubobjects - (*FlowRSVPPathObjectsRecordRouteSubObjectType)(nil), // 683: otg.FlowRSVPPathObjectsRecordRouteSubObjectType - (*FlowRSVPPathRecordRouteType1Ipv4Address)(nil), // 684: otg.FlowRSVPPathRecordRouteType1Ipv4Address - (*FlowRSVPRecordRouteIPv4Flag)(nil), // 685: otg.FlowRSVPRecordRouteIPv4Flag - (*FlowRSVPPathRecordRouteType1Label)(nil), // 686: otg.FlowRSVPPathRecordRouteType1Label - (*FlowRSVPPathRecordRouteLabel)(nil), // 687: otg.FlowRSVPPathRecordRouteLabel - (*FlowRSVPRouteRecordLength)(nil), // 688: otg.FlowRSVPRouteRecordLength - (*FlowRSVPPathObjectsCustom)(nil), // 689: otg.FlowRSVPPathObjectsCustom - (*FlowSize)(nil), // 690: otg.FlowSize - (*FlowSizeIncrement)(nil), // 691: otg.FlowSizeIncrement - (*FlowSizeRandom)(nil), // 692: otg.FlowSizeRandom - (*FlowSizeWeightPairs)(nil), // 693: otg.FlowSizeWeightPairs - (*FlowSizeWeightPairsCustom)(nil), // 694: otg.FlowSizeWeightPairsCustom - (*FlowRate)(nil), // 695: otg.FlowRate - (*FlowDuration)(nil), // 696: otg.FlowDuration - (*FlowContinuous)(nil), // 697: otg.FlowContinuous - (*FlowDelay)(nil), // 698: otg.FlowDelay - (*FlowFixedPackets)(nil), // 699: otg.FlowFixedPackets - (*FlowFixedSeconds)(nil), // 700: otg.FlowFixedSeconds - (*FlowBurst)(nil), // 701: otg.FlowBurst - (*FlowDurationInterBurstGap)(nil), // 702: otg.FlowDurationInterBurstGap - (*FlowMetrics)(nil), // 703: otg.FlowMetrics - (*FlowLatencyMetrics)(nil), // 704: otg.FlowLatencyMetrics - (*FlowPredefinedTags)(nil), // 705: otg.FlowPredefinedTags - (*FlowRxTxRatio)(nil), // 706: otg.FlowRxTxRatio - (*FlowRxTxRatioRxCount)(nil), // 707: otg.FlowRxTxRatioRxCount - (*Event)(nil), // 708: otg.Event - (*EventRxRateThreshold)(nil), // 709: otg.EventRxRateThreshold - (*EventLink)(nil), // 710: otg.EventLink - (*EventRouteAdvertiseWithdraw)(nil), // 711: otg.EventRouteAdvertiseWithdraw - (*EventRequest)(nil), // 712: otg.EventRequest - (*EventSubscription)(nil), // 713: otg.EventSubscription - (*Lldp)(nil), // 714: otg.Lldp - (*LldpConnection)(nil), // 715: otg.LldpConnection - (*LldpChassisId)(nil), // 716: otg.LldpChassisId - (*LldpPortId)(nil), // 717: otg.LldpPortId - (*LldpChassisMacSubType)(nil), // 718: otg.LldpChassisMacSubType - (*LldpPortInterfaceNameSubType)(nil), // 719: otg.LldpPortInterfaceNameSubType - (*LldpSystemName)(nil), // 720: otg.LldpSystemName - (*Error)(nil), // 721: otg.Error - (*Warning)(nil), // 722: otg.Warning - (*ConfigUpdate)(nil), // 723: otg.ConfigUpdate - (*FlowsUpdate)(nil), // 724: otg.FlowsUpdate - (*ControlState)(nil), // 725: otg.ControlState - (*StatePort)(nil), // 726: otg.StatePort - (*StateTraffic)(nil), // 727: otg.StateTraffic - (*StateProtocol)(nil), // 728: otg.StateProtocol - (*StatePortLink)(nil), // 729: otg.StatePortLink - (*StatePortCapture)(nil), // 730: otg.StatePortCapture - (*StateTrafficFlowTransmit)(nil), // 731: otg.StateTrafficFlowTransmit - (*StateProtocolAll)(nil), // 732: otg.StateProtocolAll - (*StateProtocolRoute)(nil), // 733: otg.StateProtocolRoute - (*StateProtocolLacp)(nil), // 734: otg.StateProtocolLacp - (*StateProtocolLacpAdmin)(nil), // 735: otg.StateProtocolLacpAdmin - (*StateProtocolLacpMemberPorts)(nil), // 736: otg.StateProtocolLacpMemberPorts - (*StateProtocolBgp)(nil), // 737: otg.StateProtocolBgp - (*StateProtocolBgpPeers)(nil), // 738: otg.StateProtocolBgpPeers - (*StateProtocolIsis)(nil), // 739: otg.StateProtocolIsis - (*StateProtocolIsisRouters)(nil), // 740: otg.StateProtocolIsisRouters - (*ControlAction)(nil), // 741: otg.ControlAction - (*ControlActionResponse)(nil), // 742: otg.ControlActionResponse - (*ActionResponse)(nil), // 743: otg.ActionResponse - (*ActionProtocol)(nil), // 744: otg.ActionProtocol - (*ActionResponseProtocol)(nil), // 745: otg.ActionResponseProtocol - (*ActionProtocolIpv4)(nil), // 746: otg.ActionProtocolIpv4 - (*ActionResponseProtocolIpv4)(nil), // 747: otg.ActionResponseProtocolIpv4 - (*ActionProtocolIpv4Ping)(nil), // 748: otg.ActionProtocolIpv4Ping - (*ActionProtocolIpv4PingRequest)(nil), // 749: otg.ActionProtocolIpv4PingRequest - (*ActionResponseProtocolIpv4Ping)(nil), // 750: otg.ActionResponseProtocolIpv4Ping - (*ActionResponseProtocolIpv4PingResponse)(nil), // 751: otg.ActionResponseProtocolIpv4PingResponse - (*ActionProtocolIpv6)(nil), // 752: otg.ActionProtocolIpv6 - (*ActionResponseProtocolIpv6)(nil), // 753: otg.ActionResponseProtocolIpv6 - (*ActionProtocolIpv6Ping)(nil), // 754: otg.ActionProtocolIpv6Ping - (*ActionProtocolIpv6PingRequest)(nil), // 755: otg.ActionProtocolIpv6PingRequest - (*ActionResponseProtocolIpv6Ping)(nil), // 756: otg.ActionResponseProtocolIpv6Ping - (*ActionResponseProtocolIpv6PingResponse)(nil), // 757: otg.ActionResponseProtocolIpv6PingResponse - (*ActionProtocolBgp)(nil), // 758: otg.ActionProtocolBgp - (*ActionProtocolBgpNotification)(nil), // 759: otg.ActionProtocolBgpNotification - (*ActionProtocolBgpInitiateGracefulRestart)(nil), // 760: otg.ActionProtocolBgpInitiateGracefulRestart - (*MetricsRequest)(nil), // 761: otg.MetricsRequest - (*MetricsResponse)(nil), // 762: otg.MetricsResponse - (*PortMetricsRequest)(nil), // 763: otg.PortMetricsRequest - (*PortMetric)(nil), // 764: otg.PortMetric - (*FlowMetricsRequest)(nil), // 765: otg.FlowMetricsRequest - (*FlowTaggedMetricsFilter)(nil), // 766: otg.FlowTaggedMetricsFilter - (*FlowMetricTagFilter)(nil), // 767: otg.FlowMetricTagFilter - (*FlowMetric)(nil), // 768: otg.FlowMetric - (*FlowTaggedMetric)(nil), // 769: otg.FlowTaggedMetric - (*FlowMetricTag)(nil), // 770: otg.FlowMetricTag - (*FlowMetricTagValue)(nil), // 771: otg.FlowMetricTagValue - (*MetricTimestamp)(nil), // 772: otg.MetricTimestamp - (*MetricLatency)(nil), // 773: otg.MetricLatency - (*Bgpv4MetricsRequest)(nil), // 774: otg.Bgpv4MetricsRequest - (*Bgpv4Metric)(nil), // 775: otg.Bgpv4Metric - (*Bgpv6MetricsRequest)(nil), // 776: otg.Bgpv6MetricsRequest - (*Bgpv6Metric)(nil), // 777: otg.Bgpv6Metric - (*IsisMetricsRequest)(nil), // 778: otg.IsisMetricsRequest - (*IsisMetric)(nil), // 779: otg.IsisMetric - (*LagMetricsRequest)(nil), // 780: otg.LagMetricsRequest - (*LagMetric)(nil), // 781: otg.LagMetric - (*LacpMetricsRequest)(nil), // 782: otg.LacpMetricsRequest - (*LacpMetric)(nil), // 783: otg.LacpMetric - (*LldpMetricsRequest)(nil), // 784: otg.LldpMetricsRequest - (*LldpMetric)(nil), // 785: otg.LldpMetric - (*RsvpMetricsRequest)(nil), // 786: otg.RsvpMetricsRequest - (*RsvpMetric)(nil), // 787: otg.RsvpMetric - (*StatesRequest)(nil), // 788: otg.StatesRequest - (*StatesResponse)(nil), // 789: otg.StatesResponse - (*Neighborsv4StatesRequest)(nil), // 790: otg.Neighborsv4StatesRequest - (*Neighborsv4State)(nil), // 791: otg.Neighborsv4State - (*Neighborsv6StatesRequest)(nil), // 792: otg.Neighborsv6StatesRequest - (*Neighborsv6State)(nil), // 793: otg.Neighborsv6State - (*BgpPrefixStateRequest)(nil), // 794: otg.BgpPrefixStateRequest - (*BgpPrefixIpv4UnicastFilter)(nil), // 795: otg.BgpPrefixIpv4UnicastFilter - (*BgpPrefixIpv6UnicastFilter)(nil), // 796: otg.BgpPrefixIpv6UnicastFilter - (*BgpPrefixesState)(nil), // 797: otg.BgpPrefixesState - (*BgpPrefixIpv4UnicastState)(nil), // 798: otg.BgpPrefixIpv4UnicastState - (*BgpPrefixIpv6UnicastState)(nil), // 799: otg.BgpPrefixIpv6UnicastState - (*ResultBgpCommunity)(nil), // 800: otg.ResultBgpCommunity - (*ResultBgpAsPath)(nil), // 801: otg.ResultBgpAsPath - (*ResultBgpAsPathSegment)(nil), // 802: otg.ResultBgpAsPathSegment - (*IsisLspsStateRequest)(nil), // 803: otg.IsisLspsStateRequest - (*IsisLspsState)(nil), // 804: otg.IsisLspsState - (*IsisLspState)(nil), // 805: otg.IsisLspState - (*IsisLspTlvs)(nil), // 806: otg.IsisLspTlvs - (*IsisLspHostname)(nil), // 807: otg.IsisLspHostname - (*IsisLspFlags)(nil), // 808: otg.IsisLspFlags - (*IsisLspIsReachabilityTlv)(nil), // 809: otg.IsisLspIsReachabilityTlv - (*IsisLspExtendedIsReachabilityTlv)(nil), // 810: otg.IsisLspExtendedIsReachabilityTlv - (*IsisLspneighbor)(nil), // 811: otg.IsisLspneighbor - (*IsisLspIpv4InternalReachabilityTlv)(nil), // 812: otg.IsisLspIpv4InternalReachabilityTlv - (*IsisLspIpv4ExternalReachabilityTlv)(nil), // 813: otg.IsisLspIpv4ExternalReachabilityTlv - (*IsisLspV4Prefix)(nil), // 814: otg.IsisLspV4Prefix - (*IsisLspExtendedIpv4ReachabilityTlv)(nil), // 815: otg.IsisLspExtendedIpv4ReachabilityTlv - (*IsisLspExtendedV4Prefix)(nil), // 816: otg.IsisLspExtendedV4Prefix - (*IsisLspIpv6ReachabilityTlv)(nil), // 817: otg.IsisLspIpv6ReachabilityTlv - (*IsisLspV6Prefix)(nil), // 818: otg.IsisLspV6Prefix - (*IsisLspPrefixAttributes)(nil), // 819: otg.IsisLspPrefixAttributes - (*LldpNeighborsStateRequest)(nil), // 820: otg.LldpNeighborsStateRequest - (*LldpNeighborsState)(nil), // 821: otg.LldpNeighborsState - (*LldpCustomTLVState)(nil), // 822: otg.LldpCustomTLVState - (*LldpCapabilityState)(nil), // 823: otg.LldpCapabilityState - (*RsvpLspsStateRequest)(nil), // 824: otg.RsvpLspsStateRequest - (*RsvpLspsState)(nil), // 825: otg.RsvpLspsState - (*RsvpIPv4LspState)(nil), // 826: otg.RsvpIPv4LspState - (*RsvpLspState)(nil), // 827: otg.RsvpLspState - (*RsvpLspIpv4Rro)(nil), // 828: otg.RsvpLspIpv4Rro - (*RsvpLspIpv4Ero)(nil), // 829: otg.RsvpLspIpv4Ero - (*CaptureRequest)(nil), // 830: otg.CaptureRequest - (*PatternFlowEthernetDstCounter)(nil), // 831: otg.PatternFlowEthernetDstCounter - (*PatternFlowEthernetDstMetricTag)(nil), // 832: otg.PatternFlowEthernetDstMetricTag - (*PatternFlowEthernetDst)(nil), // 833: otg.PatternFlowEthernetDst - (*PatternFlowEthernetSrcCounter)(nil), // 834: otg.PatternFlowEthernetSrcCounter - (*PatternFlowEthernetSrcMetricTag)(nil), // 835: otg.PatternFlowEthernetSrcMetricTag - (*PatternFlowEthernetSrc)(nil), // 836: otg.PatternFlowEthernetSrc - (*PatternFlowEthernetEtherTypeCounter)(nil), // 837: otg.PatternFlowEthernetEtherTypeCounter - (*PatternFlowEthernetEtherTypeMetricTag)(nil), // 838: otg.PatternFlowEthernetEtherTypeMetricTag - (*PatternFlowEthernetEtherType)(nil), // 839: otg.PatternFlowEthernetEtherType - (*PatternFlowEthernetPfcQueueCounter)(nil), // 840: otg.PatternFlowEthernetPfcQueueCounter - (*PatternFlowEthernetPfcQueueMetricTag)(nil), // 841: otg.PatternFlowEthernetPfcQueueMetricTag - (*PatternFlowEthernetPfcQueue)(nil), // 842: otg.PatternFlowEthernetPfcQueue - (*PatternFlowVlanPriorityCounter)(nil), // 843: otg.PatternFlowVlanPriorityCounter - (*PatternFlowVlanPriorityMetricTag)(nil), // 844: otg.PatternFlowVlanPriorityMetricTag - (*PatternFlowVlanPriority)(nil), // 845: otg.PatternFlowVlanPriority - (*PatternFlowVlanCfiCounter)(nil), // 846: otg.PatternFlowVlanCfiCounter - (*PatternFlowVlanCfiMetricTag)(nil), // 847: otg.PatternFlowVlanCfiMetricTag - (*PatternFlowVlanCfi)(nil), // 848: otg.PatternFlowVlanCfi - (*PatternFlowVlanIdCounter)(nil), // 849: otg.PatternFlowVlanIdCounter - (*PatternFlowVlanIdMetricTag)(nil), // 850: otg.PatternFlowVlanIdMetricTag - (*PatternFlowVlanId)(nil), // 851: otg.PatternFlowVlanId - (*PatternFlowVlanTpidCounter)(nil), // 852: otg.PatternFlowVlanTpidCounter - (*PatternFlowVlanTpidMetricTag)(nil), // 853: otg.PatternFlowVlanTpidMetricTag - (*PatternFlowVlanTpid)(nil), // 854: otg.PatternFlowVlanTpid - (*PatternFlowVxlanFlagsCounter)(nil), // 855: otg.PatternFlowVxlanFlagsCounter - (*PatternFlowVxlanFlagsMetricTag)(nil), // 856: otg.PatternFlowVxlanFlagsMetricTag - (*PatternFlowVxlanFlags)(nil), // 857: otg.PatternFlowVxlanFlags - (*PatternFlowVxlanReserved0Counter)(nil), // 858: otg.PatternFlowVxlanReserved0Counter - (*PatternFlowVxlanReserved0MetricTag)(nil), // 859: otg.PatternFlowVxlanReserved0MetricTag - (*PatternFlowVxlanReserved0)(nil), // 860: otg.PatternFlowVxlanReserved0 - (*PatternFlowVxlanVniCounter)(nil), // 861: otg.PatternFlowVxlanVniCounter - (*PatternFlowVxlanVniMetricTag)(nil), // 862: otg.PatternFlowVxlanVniMetricTag - (*PatternFlowVxlanVni)(nil), // 863: otg.PatternFlowVxlanVni - (*PatternFlowVxlanReserved1Counter)(nil), // 864: otg.PatternFlowVxlanReserved1Counter - (*PatternFlowVxlanReserved1MetricTag)(nil), // 865: otg.PatternFlowVxlanReserved1MetricTag - (*PatternFlowVxlanReserved1)(nil), // 866: otg.PatternFlowVxlanReserved1 - (*PatternFlowIpv4VersionCounter)(nil), // 867: otg.PatternFlowIpv4VersionCounter - (*PatternFlowIpv4VersionMetricTag)(nil), // 868: otg.PatternFlowIpv4VersionMetricTag - (*PatternFlowIpv4Version)(nil), // 869: otg.PatternFlowIpv4Version - (*PatternFlowIpv4HeaderLengthCounter)(nil), // 870: otg.PatternFlowIpv4HeaderLengthCounter - (*PatternFlowIpv4HeaderLengthMetricTag)(nil), // 871: otg.PatternFlowIpv4HeaderLengthMetricTag - (*PatternFlowIpv4HeaderLength)(nil), // 872: otg.PatternFlowIpv4HeaderLength - (*PatternFlowIpv4TotalLengthCounter)(nil), // 873: otg.PatternFlowIpv4TotalLengthCounter - (*PatternFlowIpv4TotalLengthMetricTag)(nil), // 874: otg.PatternFlowIpv4TotalLengthMetricTag - (*PatternFlowIpv4TotalLength)(nil), // 875: otg.PatternFlowIpv4TotalLength - (*PatternFlowIpv4IdentificationCounter)(nil), // 876: otg.PatternFlowIpv4IdentificationCounter - (*PatternFlowIpv4IdentificationMetricTag)(nil), // 877: otg.PatternFlowIpv4IdentificationMetricTag - (*PatternFlowIpv4Identification)(nil), // 878: otg.PatternFlowIpv4Identification - (*PatternFlowIpv4ReservedCounter)(nil), // 879: otg.PatternFlowIpv4ReservedCounter - (*PatternFlowIpv4ReservedMetricTag)(nil), // 880: otg.PatternFlowIpv4ReservedMetricTag - (*PatternFlowIpv4Reserved)(nil), // 881: otg.PatternFlowIpv4Reserved - (*PatternFlowIpv4DontFragmentCounter)(nil), // 882: otg.PatternFlowIpv4DontFragmentCounter - (*PatternFlowIpv4DontFragmentMetricTag)(nil), // 883: otg.PatternFlowIpv4DontFragmentMetricTag - (*PatternFlowIpv4DontFragment)(nil), // 884: otg.PatternFlowIpv4DontFragment - (*PatternFlowIpv4MoreFragmentsCounter)(nil), // 885: otg.PatternFlowIpv4MoreFragmentsCounter - (*PatternFlowIpv4MoreFragmentsMetricTag)(nil), // 886: otg.PatternFlowIpv4MoreFragmentsMetricTag - (*PatternFlowIpv4MoreFragments)(nil), // 887: otg.PatternFlowIpv4MoreFragments - (*PatternFlowIpv4FragmentOffsetCounter)(nil), // 888: otg.PatternFlowIpv4FragmentOffsetCounter - (*PatternFlowIpv4FragmentOffsetMetricTag)(nil), // 889: otg.PatternFlowIpv4FragmentOffsetMetricTag - (*PatternFlowIpv4FragmentOffset)(nil), // 890: otg.PatternFlowIpv4FragmentOffset - (*PatternFlowIpv4TimeToLiveCounter)(nil), // 891: otg.PatternFlowIpv4TimeToLiveCounter - (*PatternFlowIpv4TimeToLiveMetricTag)(nil), // 892: otg.PatternFlowIpv4TimeToLiveMetricTag - (*PatternFlowIpv4TimeToLive)(nil), // 893: otg.PatternFlowIpv4TimeToLive - (*PatternFlowIpv4ProtocolCounter)(nil), // 894: otg.PatternFlowIpv4ProtocolCounter - (*PatternFlowIpv4ProtocolMetricTag)(nil), // 895: otg.PatternFlowIpv4ProtocolMetricTag - (*PatternFlowIpv4Protocol)(nil), // 896: otg.PatternFlowIpv4Protocol - (*PatternFlowIpv4HeaderChecksum)(nil), // 897: otg.PatternFlowIpv4HeaderChecksum - (*PatternFlowIpv4SrcCounter)(nil), // 898: otg.PatternFlowIpv4SrcCounter - (*PatternFlowIpv4SrcMetricTag)(nil), // 899: otg.PatternFlowIpv4SrcMetricTag - (*PatternFlowIpv4Src)(nil), // 900: otg.PatternFlowIpv4Src - (*PatternFlowIpv4DstCounter)(nil), // 901: otg.PatternFlowIpv4DstCounter - (*PatternFlowIpv4DstMetricTag)(nil), // 902: otg.PatternFlowIpv4DstMetricTag - (*PatternFlowIpv4Dst)(nil), // 903: otg.PatternFlowIpv4Dst - (*PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter)(nil), // 904: otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter - (*PatternFlowIpv4OptionsCustomTypeCopiedFlag)(nil), // 905: otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag - (*PatternFlowIpv4OptionsCustomTypeOptionClassCounter)(nil), // 906: otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter - (*PatternFlowIpv4OptionsCustomTypeOptionClass)(nil), // 907: otg.PatternFlowIpv4OptionsCustomTypeOptionClass - (*PatternFlowIpv4OptionsCustomTypeOptionNumberCounter)(nil), // 908: otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter - (*PatternFlowIpv4OptionsCustomTypeOptionNumber)(nil), // 909: otg.PatternFlowIpv4OptionsCustomTypeOptionNumber - (*PatternFlowIpv4PriorityRawCounter)(nil), // 910: otg.PatternFlowIpv4PriorityRawCounter - (*PatternFlowIpv4PriorityRawMetricTag)(nil), // 911: otg.PatternFlowIpv4PriorityRawMetricTag - (*PatternFlowIpv4PriorityRaw)(nil), // 912: otg.PatternFlowIpv4PriorityRaw - (*PatternFlowIpv4DscpPhbCounter)(nil), // 913: otg.PatternFlowIpv4DscpPhbCounter - (*PatternFlowIpv4DscpPhbMetricTag)(nil), // 914: otg.PatternFlowIpv4DscpPhbMetricTag - (*PatternFlowIpv4DscpPhb)(nil), // 915: otg.PatternFlowIpv4DscpPhb - (*PatternFlowIpv4DscpEcnCounter)(nil), // 916: otg.PatternFlowIpv4DscpEcnCounter - (*PatternFlowIpv4DscpEcnMetricTag)(nil), // 917: otg.PatternFlowIpv4DscpEcnMetricTag - (*PatternFlowIpv4DscpEcn)(nil), // 918: otg.PatternFlowIpv4DscpEcn - (*PatternFlowIpv4TosPrecedenceCounter)(nil), // 919: otg.PatternFlowIpv4TosPrecedenceCounter - (*PatternFlowIpv4TosPrecedenceMetricTag)(nil), // 920: otg.PatternFlowIpv4TosPrecedenceMetricTag - (*PatternFlowIpv4TosPrecedence)(nil), // 921: otg.PatternFlowIpv4TosPrecedence - (*PatternFlowIpv4TosDelayCounter)(nil), // 922: otg.PatternFlowIpv4TosDelayCounter - (*PatternFlowIpv4TosDelayMetricTag)(nil), // 923: otg.PatternFlowIpv4TosDelayMetricTag - (*PatternFlowIpv4TosDelay)(nil), // 924: otg.PatternFlowIpv4TosDelay - (*PatternFlowIpv4TosThroughputCounter)(nil), // 925: otg.PatternFlowIpv4TosThroughputCounter - (*PatternFlowIpv4TosThroughputMetricTag)(nil), // 926: otg.PatternFlowIpv4TosThroughputMetricTag - (*PatternFlowIpv4TosThroughput)(nil), // 927: otg.PatternFlowIpv4TosThroughput - (*PatternFlowIpv4TosReliabilityCounter)(nil), // 928: otg.PatternFlowIpv4TosReliabilityCounter - (*PatternFlowIpv4TosReliabilityMetricTag)(nil), // 929: otg.PatternFlowIpv4TosReliabilityMetricTag - (*PatternFlowIpv4TosReliability)(nil), // 930: otg.PatternFlowIpv4TosReliability - (*PatternFlowIpv4TosMonetaryCounter)(nil), // 931: otg.PatternFlowIpv4TosMonetaryCounter - (*PatternFlowIpv4TosMonetaryMetricTag)(nil), // 932: otg.PatternFlowIpv4TosMonetaryMetricTag - (*PatternFlowIpv4TosMonetary)(nil), // 933: otg.PatternFlowIpv4TosMonetary - (*PatternFlowIpv4TosUnusedCounter)(nil), // 934: otg.PatternFlowIpv4TosUnusedCounter - (*PatternFlowIpv4TosUnusedMetricTag)(nil), // 935: otg.PatternFlowIpv4TosUnusedMetricTag - (*PatternFlowIpv4TosUnused)(nil), // 936: otg.PatternFlowIpv4TosUnused - (*PatternFlowIpv6VersionCounter)(nil), // 937: otg.PatternFlowIpv6VersionCounter - (*PatternFlowIpv6VersionMetricTag)(nil), // 938: otg.PatternFlowIpv6VersionMetricTag - (*PatternFlowIpv6Version)(nil), // 939: otg.PatternFlowIpv6Version - (*PatternFlowIpv6TrafficClassCounter)(nil), // 940: otg.PatternFlowIpv6TrafficClassCounter - (*PatternFlowIpv6TrafficClassMetricTag)(nil), // 941: otg.PatternFlowIpv6TrafficClassMetricTag - (*PatternFlowIpv6TrafficClass)(nil), // 942: otg.PatternFlowIpv6TrafficClass - (*PatternFlowIpv6FlowLabelCounter)(nil), // 943: otg.PatternFlowIpv6FlowLabelCounter - (*PatternFlowIpv6FlowLabelMetricTag)(nil), // 944: otg.PatternFlowIpv6FlowLabelMetricTag - (*PatternFlowIpv6FlowLabel)(nil), // 945: otg.PatternFlowIpv6FlowLabel - (*PatternFlowIpv6PayloadLengthCounter)(nil), // 946: otg.PatternFlowIpv6PayloadLengthCounter - (*PatternFlowIpv6PayloadLengthMetricTag)(nil), // 947: otg.PatternFlowIpv6PayloadLengthMetricTag - (*PatternFlowIpv6PayloadLength)(nil), // 948: otg.PatternFlowIpv6PayloadLength - (*PatternFlowIpv6NextHeaderCounter)(nil), // 949: otg.PatternFlowIpv6NextHeaderCounter - (*PatternFlowIpv6NextHeaderMetricTag)(nil), // 950: otg.PatternFlowIpv6NextHeaderMetricTag - (*PatternFlowIpv6NextHeader)(nil), // 951: otg.PatternFlowIpv6NextHeader - (*PatternFlowIpv6HopLimitCounter)(nil), // 952: otg.PatternFlowIpv6HopLimitCounter - (*PatternFlowIpv6HopLimitMetricTag)(nil), // 953: otg.PatternFlowIpv6HopLimitMetricTag - (*PatternFlowIpv6HopLimit)(nil), // 954: otg.PatternFlowIpv6HopLimit - (*PatternFlowIpv6SrcCounter)(nil), // 955: otg.PatternFlowIpv6SrcCounter - (*PatternFlowIpv6SrcMetricTag)(nil), // 956: otg.PatternFlowIpv6SrcMetricTag - (*PatternFlowIpv6Src)(nil), // 957: otg.PatternFlowIpv6Src - (*PatternFlowIpv6DstCounter)(nil), // 958: otg.PatternFlowIpv6DstCounter - (*PatternFlowIpv6DstMetricTag)(nil), // 959: otg.PatternFlowIpv6DstMetricTag - (*PatternFlowIpv6Dst)(nil), // 960: otg.PatternFlowIpv6Dst - (*PatternFlowPfcPauseDstCounter)(nil), // 961: otg.PatternFlowPfcPauseDstCounter - (*PatternFlowPfcPauseDstMetricTag)(nil), // 962: otg.PatternFlowPfcPauseDstMetricTag - (*PatternFlowPfcPauseDst)(nil), // 963: otg.PatternFlowPfcPauseDst - (*PatternFlowPfcPauseSrcCounter)(nil), // 964: otg.PatternFlowPfcPauseSrcCounter - (*PatternFlowPfcPauseSrcMetricTag)(nil), // 965: otg.PatternFlowPfcPauseSrcMetricTag - (*PatternFlowPfcPauseSrc)(nil), // 966: otg.PatternFlowPfcPauseSrc - (*PatternFlowPfcPauseEtherTypeCounter)(nil), // 967: otg.PatternFlowPfcPauseEtherTypeCounter - (*PatternFlowPfcPauseEtherTypeMetricTag)(nil), // 968: otg.PatternFlowPfcPauseEtherTypeMetricTag - (*PatternFlowPfcPauseEtherType)(nil), // 969: otg.PatternFlowPfcPauseEtherType - (*PatternFlowPfcPauseControlOpCodeCounter)(nil), // 970: otg.PatternFlowPfcPauseControlOpCodeCounter - (*PatternFlowPfcPauseControlOpCodeMetricTag)(nil), // 971: otg.PatternFlowPfcPauseControlOpCodeMetricTag - (*PatternFlowPfcPauseControlOpCode)(nil), // 972: otg.PatternFlowPfcPauseControlOpCode - (*PatternFlowPfcPauseClassEnableVectorCounter)(nil), // 973: otg.PatternFlowPfcPauseClassEnableVectorCounter - (*PatternFlowPfcPauseClassEnableVectorMetricTag)(nil), // 974: otg.PatternFlowPfcPauseClassEnableVectorMetricTag - (*PatternFlowPfcPauseClassEnableVector)(nil), // 975: otg.PatternFlowPfcPauseClassEnableVector - (*PatternFlowPfcPausePauseClass0Counter)(nil), // 976: otg.PatternFlowPfcPausePauseClass0Counter - (*PatternFlowPfcPausePauseClass0MetricTag)(nil), // 977: otg.PatternFlowPfcPausePauseClass0MetricTag - (*PatternFlowPfcPausePauseClass0)(nil), // 978: otg.PatternFlowPfcPausePauseClass0 - (*PatternFlowPfcPausePauseClass1Counter)(nil), // 979: otg.PatternFlowPfcPausePauseClass1Counter - (*PatternFlowPfcPausePauseClass1MetricTag)(nil), // 980: otg.PatternFlowPfcPausePauseClass1MetricTag - (*PatternFlowPfcPausePauseClass1)(nil), // 981: otg.PatternFlowPfcPausePauseClass1 - (*PatternFlowPfcPausePauseClass2Counter)(nil), // 982: otg.PatternFlowPfcPausePauseClass2Counter - (*PatternFlowPfcPausePauseClass2MetricTag)(nil), // 983: otg.PatternFlowPfcPausePauseClass2MetricTag - (*PatternFlowPfcPausePauseClass2)(nil), // 984: otg.PatternFlowPfcPausePauseClass2 - (*PatternFlowPfcPausePauseClass3Counter)(nil), // 985: otg.PatternFlowPfcPausePauseClass3Counter - (*PatternFlowPfcPausePauseClass3MetricTag)(nil), // 986: otg.PatternFlowPfcPausePauseClass3MetricTag - (*PatternFlowPfcPausePauseClass3)(nil), // 987: otg.PatternFlowPfcPausePauseClass3 - (*PatternFlowPfcPausePauseClass4Counter)(nil), // 988: otg.PatternFlowPfcPausePauseClass4Counter - (*PatternFlowPfcPausePauseClass4MetricTag)(nil), // 989: otg.PatternFlowPfcPausePauseClass4MetricTag - (*PatternFlowPfcPausePauseClass4)(nil), // 990: otg.PatternFlowPfcPausePauseClass4 - (*PatternFlowPfcPausePauseClass5Counter)(nil), // 991: otg.PatternFlowPfcPausePauseClass5Counter - (*PatternFlowPfcPausePauseClass5MetricTag)(nil), // 992: otg.PatternFlowPfcPausePauseClass5MetricTag - (*PatternFlowPfcPausePauseClass5)(nil), // 993: otg.PatternFlowPfcPausePauseClass5 - (*PatternFlowPfcPausePauseClass6Counter)(nil), // 994: otg.PatternFlowPfcPausePauseClass6Counter - (*PatternFlowPfcPausePauseClass6MetricTag)(nil), // 995: otg.PatternFlowPfcPausePauseClass6MetricTag - (*PatternFlowPfcPausePauseClass6)(nil), // 996: otg.PatternFlowPfcPausePauseClass6 - (*PatternFlowPfcPausePauseClass7Counter)(nil), // 997: otg.PatternFlowPfcPausePauseClass7Counter - (*PatternFlowPfcPausePauseClass7MetricTag)(nil), // 998: otg.PatternFlowPfcPausePauseClass7MetricTag - (*PatternFlowPfcPausePauseClass7)(nil), // 999: otg.PatternFlowPfcPausePauseClass7 - (*PatternFlowEthernetPauseDstCounter)(nil), // 1000: otg.PatternFlowEthernetPauseDstCounter - (*PatternFlowEthernetPauseDstMetricTag)(nil), // 1001: otg.PatternFlowEthernetPauseDstMetricTag - (*PatternFlowEthernetPauseDst)(nil), // 1002: otg.PatternFlowEthernetPauseDst - (*PatternFlowEthernetPauseSrcCounter)(nil), // 1003: otg.PatternFlowEthernetPauseSrcCounter - (*PatternFlowEthernetPauseSrcMetricTag)(nil), // 1004: otg.PatternFlowEthernetPauseSrcMetricTag - (*PatternFlowEthernetPauseSrc)(nil), // 1005: otg.PatternFlowEthernetPauseSrc - (*PatternFlowEthernetPauseEtherTypeCounter)(nil), // 1006: otg.PatternFlowEthernetPauseEtherTypeCounter - (*PatternFlowEthernetPauseEtherTypeMetricTag)(nil), // 1007: otg.PatternFlowEthernetPauseEtherTypeMetricTag - (*PatternFlowEthernetPauseEtherType)(nil), // 1008: otg.PatternFlowEthernetPauseEtherType - (*PatternFlowEthernetPauseControlOpCodeCounter)(nil), // 1009: otg.PatternFlowEthernetPauseControlOpCodeCounter - (*PatternFlowEthernetPauseControlOpCodeMetricTag)(nil), // 1010: otg.PatternFlowEthernetPauseControlOpCodeMetricTag - (*PatternFlowEthernetPauseControlOpCode)(nil), // 1011: otg.PatternFlowEthernetPauseControlOpCode - (*PatternFlowEthernetPauseTimeCounter)(nil), // 1012: otg.PatternFlowEthernetPauseTimeCounter - (*PatternFlowEthernetPauseTimeMetricTag)(nil), // 1013: otg.PatternFlowEthernetPauseTimeMetricTag - (*PatternFlowEthernetPauseTime)(nil), // 1014: otg.PatternFlowEthernetPauseTime - (*PatternFlowTcpSrcPortCounter)(nil), // 1015: otg.PatternFlowTcpSrcPortCounter - (*PatternFlowTcpSrcPortMetricTag)(nil), // 1016: otg.PatternFlowTcpSrcPortMetricTag - (*PatternFlowTcpSrcPort)(nil), // 1017: otg.PatternFlowTcpSrcPort - (*PatternFlowTcpDstPortCounter)(nil), // 1018: otg.PatternFlowTcpDstPortCounter - (*PatternFlowTcpDstPortMetricTag)(nil), // 1019: otg.PatternFlowTcpDstPortMetricTag - (*PatternFlowTcpDstPort)(nil), // 1020: otg.PatternFlowTcpDstPort - (*PatternFlowTcpSeqNumCounter)(nil), // 1021: otg.PatternFlowTcpSeqNumCounter - (*PatternFlowTcpSeqNumMetricTag)(nil), // 1022: otg.PatternFlowTcpSeqNumMetricTag - (*PatternFlowTcpSeqNum)(nil), // 1023: otg.PatternFlowTcpSeqNum - (*PatternFlowTcpAckNumCounter)(nil), // 1024: otg.PatternFlowTcpAckNumCounter - (*PatternFlowTcpAckNumMetricTag)(nil), // 1025: otg.PatternFlowTcpAckNumMetricTag - (*PatternFlowTcpAckNum)(nil), // 1026: otg.PatternFlowTcpAckNum - (*PatternFlowTcpDataOffsetCounter)(nil), // 1027: otg.PatternFlowTcpDataOffsetCounter - (*PatternFlowTcpDataOffsetMetricTag)(nil), // 1028: otg.PatternFlowTcpDataOffsetMetricTag - (*PatternFlowTcpDataOffset)(nil), // 1029: otg.PatternFlowTcpDataOffset - (*PatternFlowTcpEcnNsCounter)(nil), // 1030: otg.PatternFlowTcpEcnNsCounter - (*PatternFlowTcpEcnNsMetricTag)(nil), // 1031: otg.PatternFlowTcpEcnNsMetricTag - (*PatternFlowTcpEcnNs)(nil), // 1032: otg.PatternFlowTcpEcnNs - (*PatternFlowTcpEcnCwrCounter)(nil), // 1033: otg.PatternFlowTcpEcnCwrCounter - (*PatternFlowTcpEcnCwrMetricTag)(nil), // 1034: otg.PatternFlowTcpEcnCwrMetricTag - (*PatternFlowTcpEcnCwr)(nil), // 1035: otg.PatternFlowTcpEcnCwr - (*PatternFlowTcpEcnEchoCounter)(nil), // 1036: otg.PatternFlowTcpEcnEchoCounter - (*PatternFlowTcpEcnEchoMetricTag)(nil), // 1037: otg.PatternFlowTcpEcnEchoMetricTag - (*PatternFlowTcpEcnEcho)(nil), // 1038: otg.PatternFlowTcpEcnEcho - (*PatternFlowTcpCtlUrgCounter)(nil), // 1039: otg.PatternFlowTcpCtlUrgCounter - (*PatternFlowTcpCtlUrgMetricTag)(nil), // 1040: otg.PatternFlowTcpCtlUrgMetricTag - (*PatternFlowTcpCtlUrg)(nil), // 1041: otg.PatternFlowTcpCtlUrg - (*PatternFlowTcpCtlAckCounter)(nil), // 1042: otg.PatternFlowTcpCtlAckCounter - (*PatternFlowTcpCtlAckMetricTag)(nil), // 1043: otg.PatternFlowTcpCtlAckMetricTag - (*PatternFlowTcpCtlAck)(nil), // 1044: otg.PatternFlowTcpCtlAck - (*PatternFlowTcpCtlPshCounter)(nil), // 1045: otg.PatternFlowTcpCtlPshCounter - (*PatternFlowTcpCtlPshMetricTag)(nil), // 1046: otg.PatternFlowTcpCtlPshMetricTag - (*PatternFlowTcpCtlPsh)(nil), // 1047: otg.PatternFlowTcpCtlPsh - (*PatternFlowTcpCtlRstCounter)(nil), // 1048: otg.PatternFlowTcpCtlRstCounter - (*PatternFlowTcpCtlRstMetricTag)(nil), // 1049: otg.PatternFlowTcpCtlRstMetricTag - (*PatternFlowTcpCtlRst)(nil), // 1050: otg.PatternFlowTcpCtlRst - (*PatternFlowTcpCtlSynCounter)(nil), // 1051: otg.PatternFlowTcpCtlSynCounter - (*PatternFlowTcpCtlSynMetricTag)(nil), // 1052: otg.PatternFlowTcpCtlSynMetricTag - (*PatternFlowTcpCtlSyn)(nil), // 1053: otg.PatternFlowTcpCtlSyn - (*PatternFlowTcpCtlFinCounter)(nil), // 1054: otg.PatternFlowTcpCtlFinCounter - (*PatternFlowTcpCtlFinMetricTag)(nil), // 1055: otg.PatternFlowTcpCtlFinMetricTag - (*PatternFlowTcpCtlFin)(nil), // 1056: otg.PatternFlowTcpCtlFin - (*PatternFlowTcpWindowCounter)(nil), // 1057: otg.PatternFlowTcpWindowCounter - (*PatternFlowTcpWindowMetricTag)(nil), // 1058: otg.PatternFlowTcpWindowMetricTag - (*PatternFlowTcpWindow)(nil), // 1059: otg.PatternFlowTcpWindow - (*PatternFlowUdpSrcPortCounter)(nil), // 1060: otg.PatternFlowUdpSrcPortCounter - (*PatternFlowUdpSrcPortMetricTag)(nil), // 1061: otg.PatternFlowUdpSrcPortMetricTag - (*PatternFlowUdpSrcPort)(nil), // 1062: otg.PatternFlowUdpSrcPort - (*PatternFlowUdpDstPortCounter)(nil), // 1063: otg.PatternFlowUdpDstPortCounter - (*PatternFlowUdpDstPortMetricTag)(nil), // 1064: otg.PatternFlowUdpDstPortMetricTag - (*PatternFlowUdpDstPort)(nil), // 1065: otg.PatternFlowUdpDstPort - (*PatternFlowUdpLengthCounter)(nil), // 1066: otg.PatternFlowUdpLengthCounter - (*PatternFlowUdpLengthMetricTag)(nil), // 1067: otg.PatternFlowUdpLengthMetricTag - (*PatternFlowUdpLength)(nil), // 1068: otg.PatternFlowUdpLength - (*PatternFlowUdpChecksum)(nil), // 1069: otg.PatternFlowUdpChecksum - (*PatternFlowGreChecksumPresentCounter)(nil), // 1070: otg.PatternFlowGreChecksumPresentCounter - (*PatternFlowGreChecksumPresentMetricTag)(nil), // 1071: otg.PatternFlowGreChecksumPresentMetricTag - (*PatternFlowGreChecksumPresent)(nil), // 1072: otg.PatternFlowGreChecksumPresent - (*PatternFlowGreReserved0Counter)(nil), // 1073: otg.PatternFlowGreReserved0Counter - (*PatternFlowGreReserved0MetricTag)(nil), // 1074: otg.PatternFlowGreReserved0MetricTag - (*PatternFlowGreReserved0)(nil), // 1075: otg.PatternFlowGreReserved0 - (*PatternFlowGreVersionCounter)(nil), // 1076: otg.PatternFlowGreVersionCounter - (*PatternFlowGreVersionMetricTag)(nil), // 1077: otg.PatternFlowGreVersionMetricTag - (*PatternFlowGreVersion)(nil), // 1078: otg.PatternFlowGreVersion - (*PatternFlowGreProtocolCounter)(nil), // 1079: otg.PatternFlowGreProtocolCounter - (*PatternFlowGreProtocolMetricTag)(nil), // 1080: otg.PatternFlowGreProtocolMetricTag - (*PatternFlowGreProtocol)(nil), // 1081: otg.PatternFlowGreProtocol - (*PatternFlowGreChecksum)(nil), // 1082: otg.PatternFlowGreChecksum - (*PatternFlowGreReserved1Counter)(nil), // 1083: otg.PatternFlowGreReserved1Counter - (*PatternFlowGreReserved1MetricTag)(nil), // 1084: otg.PatternFlowGreReserved1MetricTag - (*PatternFlowGreReserved1)(nil), // 1085: otg.PatternFlowGreReserved1 - (*PatternFlowGtpv1VersionCounter)(nil), // 1086: otg.PatternFlowGtpv1VersionCounter - (*PatternFlowGtpv1VersionMetricTag)(nil), // 1087: otg.PatternFlowGtpv1VersionMetricTag - (*PatternFlowGtpv1Version)(nil), // 1088: otg.PatternFlowGtpv1Version - (*PatternFlowGtpv1ProtocolTypeCounter)(nil), // 1089: otg.PatternFlowGtpv1ProtocolTypeCounter - (*PatternFlowGtpv1ProtocolTypeMetricTag)(nil), // 1090: otg.PatternFlowGtpv1ProtocolTypeMetricTag - (*PatternFlowGtpv1ProtocolType)(nil), // 1091: otg.PatternFlowGtpv1ProtocolType - (*PatternFlowGtpv1ReservedCounter)(nil), // 1092: otg.PatternFlowGtpv1ReservedCounter - (*PatternFlowGtpv1ReservedMetricTag)(nil), // 1093: otg.PatternFlowGtpv1ReservedMetricTag - (*PatternFlowGtpv1Reserved)(nil), // 1094: otg.PatternFlowGtpv1Reserved - (*PatternFlowGtpv1EFlagCounter)(nil), // 1095: otg.PatternFlowGtpv1EFlagCounter - (*PatternFlowGtpv1EFlagMetricTag)(nil), // 1096: otg.PatternFlowGtpv1EFlagMetricTag - (*PatternFlowGtpv1EFlag)(nil), // 1097: otg.PatternFlowGtpv1EFlag - (*PatternFlowGtpv1SFlagCounter)(nil), // 1098: otg.PatternFlowGtpv1SFlagCounter - (*PatternFlowGtpv1SFlagMetricTag)(nil), // 1099: otg.PatternFlowGtpv1SFlagMetricTag - (*PatternFlowGtpv1SFlag)(nil), // 1100: otg.PatternFlowGtpv1SFlag - (*PatternFlowGtpv1PnFlagCounter)(nil), // 1101: otg.PatternFlowGtpv1PnFlagCounter - (*PatternFlowGtpv1PnFlagMetricTag)(nil), // 1102: otg.PatternFlowGtpv1PnFlagMetricTag - (*PatternFlowGtpv1PnFlag)(nil), // 1103: otg.PatternFlowGtpv1PnFlag - (*PatternFlowGtpv1MessageTypeCounter)(nil), // 1104: otg.PatternFlowGtpv1MessageTypeCounter - (*PatternFlowGtpv1MessageTypeMetricTag)(nil), // 1105: otg.PatternFlowGtpv1MessageTypeMetricTag - (*PatternFlowGtpv1MessageType)(nil), // 1106: otg.PatternFlowGtpv1MessageType - (*PatternFlowGtpv1MessageLengthCounter)(nil), // 1107: otg.PatternFlowGtpv1MessageLengthCounter - (*PatternFlowGtpv1MessageLengthMetricTag)(nil), // 1108: otg.PatternFlowGtpv1MessageLengthMetricTag - (*PatternFlowGtpv1MessageLength)(nil), // 1109: otg.PatternFlowGtpv1MessageLength - (*PatternFlowGtpv1TeidCounter)(nil), // 1110: otg.PatternFlowGtpv1TeidCounter - (*PatternFlowGtpv1TeidMetricTag)(nil), // 1111: otg.PatternFlowGtpv1TeidMetricTag - (*PatternFlowGtpv1Teid)(nil), // 1112: otg.PatternFlowGtpv1Teid - (*PatternFlowGtpv1SquenceNumberCounter)(nil), // 1113: otg.PatternFlowGtpv1SquenceNumberCounter - (*PatternFlowGtpv1SquenceNumberMetricTag)(nil), // 1114: otg.PatternFlowGtpv1SquenceNumberMetricTag - (*PatternFlowGtpv1SquenceNumber)(nil), // 1115: otg.PatternFlowGtpv1SquenceNumber - (*PatternFlowGtpv1NPduNumberCounter)(nil), // 1116: otg.PatternFlowGtpv1NPduNumberCounter - (*PatternFlowGtpv1NPduNumberMetricTag)(nil), // 1117: otg.PatternFlowGtpv1NPduNumberMetricTag - (*PatternFlowGtpv1NPduNumber)(nil), // 1118: otg.PatternFlowGtpv1NPduNumber - (*PatternFlowGtpv1NextExtensionHeaderTypeCounter)(nil), // 1119: otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter - (*PatternFlowGtpv1NextExtensionHeaderTypeMetricTag)(nil), // 1120: otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag - (*PatternFlowGtpv1NextExtensionHeaderType)(nil), // 1121: otg.PatternFlowGtpv1NextExtensionHeaderType - (*PatternFlowGtpExtensionExtensionLengthCounter)(nil), // 1122: otg.PatternFlowGtpExtensionExtensionLengthCounter - (*PatternFlowGtpExtensionExtensionLengthMetricTag)(nil), // 1123: otg.PatternFlowGtpExtensionExtensionLengthMetricTag - (*PatternFlowGtpExtensionExtensionLength)(nil), // 1124: otg.PatternFlowGtpExtensionExtensionLength - (*PatternFlowGtpExtensionContentsCounter)(nil), // 1125: otg.PatternFlowGtpExtensionContentsCounter - (*PatternFlowGtpExtensionContentsMetricTag)(nil), // 1126: otg.PatternFlowGtpExtensionContentsMetricTag - (*PatternFlowGtpExtensionContents)(nil), // 1127: otg.PatternFlowGtpExtensionContents - (*PatternFlowGtpExtensionNextExtensionHeaderCounter)(nil), // 1128: otg.PatternFlowGtpExtensionNextExtensionHeaderCounter - (*PatternFlowGtpExtensionNextExtensionHeaderMetricTag)(nil), // 1129: otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag - (*PatternFlowGtpExtensionNextExtensionHeader)(nil), // 1130: otg.PatternFlowGtpExtensionNextExtensionHeader - (*PatternFlowGtpv2VersionCounter)(nil), // 1131: otg.PatternFlowGtpv2VersionCounter - (*PatternFlowGtpv2VersionMetricTag)(nil), // 1132: otg.PatternFlowGtpv2VersionMetricTag - (*PatternFlowGtpv2Version)(nil), // 1133: otg.PatternFlowGtpv2Version - (*PatternFlowGtpv2PiggybackingFlagCounter)(nil), // 1134: otg.PatternFlowGtpv2PiggybackingFlagCounter - (*PatternFlowGtpv2PiggybackingFlagMetricTag)(nil), // 1135: otg.PatternFlowGtpv2PiggybackingFlagMetricTag - (*PatternFlowGtpv2PiggybackingFlag)(nil), // 1136: otg.PatternFlowGtpv2PiggybackingFlag - (*PatternFlowGtpv2TeidFlagCounter)(nil), // 1137: otg.PatternFlowGtpv2TeidFlagCounter - (*PatternFlowGtpv2TeidFlagMetricTag)(nil), // 1138: otg.PatternFlowGtpv2TeidFlagMetricTag - (*PatternFlowGtpv2TeidFlag)(nil), // 1139: otg.PatternFlowGtpv2TeidFlag - (*PatternFlowGtpv2Spare1Counter)(nil), // 1140: otg.PatternFlowGtpv2Spare1Counter - (*PatternFlowGtpv2Spare1MetricTag)(nil), // 1141: otg.PatternFlowGtpv2Spare1MetricTag - (*PatternFlowGtpv2Spare1)(nil), // 1142: otg.PatternFlowGtpv2Spare1 - (*PatternFlowGtpv2MessageTypeCounter)(nil), // 1143: otg.PatternFlowGtpv2MessageTypeCounter - (*PatternFlowGtpv2MessageTypeMetricTag)(nil), // 1144: otg.PatternFlowGtpv2MessageTypeMetricTag - (*PatternFlowGtpv2MessageType)(nil), // 1145: otg.PatternFlowGtpv2MessageType - (*PatternFlowGtpv2MessageLengthCounter)(nil), // 1146: otg.PatternFlowGtpv2MessageLengthCounter - (*PatternFlowGtpv2MessageLengthMetricTag)(nil), // 1147: otg.PatternFlowGtpv2MessageLengthMetricTag - (*PatternFlowGtpv2MessageLength)(nil), // 1148: otg.PatternFlowGtpv2MessageLength - (*PatternFlowGtpv2TeidCounter)(nil), // 1149: otg.PatternFlowGtpv2TeidCounter - (*PatternFlowGtpv2TeidMetricTag)(nil), // 1150: otg.PatternFlowGtpv2TeidMetricTag - (*PatternFlowGtpv2Teid)(nil), // 1151: otg.PatternFlowGtpv2Teid - (*PatternFlowGtpv2SequenceNumberCounter)(nil), // 1152: otg.PatternFlowGtpv2SequenceNumberCounter - (*PatternFlowGtpv2SequenceNumberMetricTag)(nil), // 1153: otg.PatternFlowGtpv2SequenceNumberMetricTag - (*PatternFlowGtpv2SequenceNumber)(nil), // 1154: otg.PatternFlowGtpv2SequenceNumber - (*PatternFlowGtpv2Spare2Counter)(nil), // 1155: otg.PatternFlowGtpv2Spare2Counter - (*PatternFlowGtpv2Spare2MetricTag)(nil), // 1156: otg.PatternFlowGtpv2Spare2MetricTag - (*PatternFlowGtpv2Spare2)(nil), // 1157: otg.PatternFlowGtpv2Spare2 - (*PatternFlowArpHardwareTypeCounter)(nil), // 1158: otg.PatternFlowArpHardwareTypeCounter - (*PatternFlowArpHardwareTypeMetricTag)(nil), // 1159: otg.PatternFlowArpHardwareTypeMetricTag - (*PatternFlowArpHardwareType)(nil), // 1160: otg.PatternFlowArpHardwareType - (*PatternFlowArpProtocolTypeCounter)(nil), // 1161: otg.PatternFlowArpProtocolTypeCounter - (*PatternFlowArpProtocolTypeMetricTag)(nil), // 1162: otg.PatternFlowArpProtocolTypeMetricTag - (*PatternFlowArpProtocolType)(nil), // 1163: otg.PatternFlowArpProtocolType - (*PatternFlowArpHardwareLengthCounter)(nil), // 1164: otg.PatternFlowArpHardwareLengthCounter - (*PatternFlowArpHardwareLengthMetricTag)(nil), // 1165: otg.PatternFlowArpHardwareLengthMetricTag - (*PatternFlowArpHardwareLength)(nil), // 1166: otg.PatternFlowArpHardwareLength - (*PatternFlowArpProtocolLengthCounter)(nil), // 1167: otg.PatternFlowArpProtocolLengthCounter - (*PatternFlowArpProtocolLengthMetricTag)(nil), // 1168: otg.PatternFlowArpProtocolLengthMetricTag - (*PatternFlowArpProtocolLength)(nil), // 1169: otg.PatternFlowArpProtocolLength - (*PatternFlowArpOperationCounter)(nil), // 1170: otg.PatternFlowArpOperationCounter - (*PatternFlowArpOperationMetricTag)(nil), // 1171: otg.PatternFlowArpOperationMetricTag - (*PatternFlowArpOperation)(nil), // 1172: otg.PatternFlowArpOperation - (*PatternFlowArpSenderHardwareAddrCounter)(nil), // 1173: otg.PatternFlowArpSenderHardwareAddrCounter - (*PatternFlowArpSenderHardwareAddrMetricTag)(nil), // 1174: otg.PatternFlowArpSenderHardwareAddrMetricTag - (*PatternFlowArpSenderHardwareAddr)(nil), // 1175: otg.PatternFlowArpSenderHardwareAddr - (*PatternFlowArpSenderProtocolAddrCounter)(nil), // 1176: otg.PatternFlowArpSenderProtocolAddrCounter - (*PatternFlowArpSenderProtocolAddrMetricTag)(nil), // 1177: otg.PatternFlowArpSenderProtocolAddrMetricTag - (*PatternFlowArpSenderProtocolAddr)(nil), // 1178: otg.PatternFlowArpSenderProtocolAddr - (*PatternFlowArpTargetHardwareAddrCounter)(nil), // 1179: otg.PatternFlowArpTargetHardwareAddrCounter - (*PatternFlowArpTargetHardwareAddrMetricTag)(nil), // 1180: otg.PatternFlowArpTargetHardwareAddrMetricTag - (*PatternFlowArpTargetHardwareAddr)(nil), // 1181: otg.PatternFlowArpTargetHardwareAddr - (*PatternFlowArpTargetProtocolAddrCounter)(nil), // 1182: otg.PatternFlowArpTargetProtocolAddrCounter - (*PatternFlowArpTargetProtocolAddrMetricTag)(nil), // 1183: otg.PatternFlowArpTargetProtocolAddrMetricTag - (*PatternFlowArpTargetProtocolAddr)(nil), // 1184: otg.PatternFlowArpTargetProtocolAddr - (*PatternFlowIcmpEchoTypeCounter)(nil), // 1185: otg.PatternFlowIcmpEchoTypeCounter - (*PatternFlowIcmpEchoTypeMetricTag)(nil), // 1186: otg.PatternFlowIcmpEchoTypeMetricTag - (*PatternFlowIcmpEchoType)(nil), // 1187: otg.PatternFlowIcmpEchoType - (*PatternFlowIcmpEchoCodeCounter)(nil), // 1188: otg.PatternFlowIcmpEchoCodeCounter - (*PatternFlowIcmpEchoCodeMetricTag)(nil), // 1189: otg.PatternFlowIcmpEchoCodeMetricTag - (*PatternFlowIcmpEchoCode)(nil), // 1190: otg.PatternFlowIcmpEchoCode - (*PatternFlowIcmpEchoChecksum)(nil), // 1191: otg.PatternFlowIcmpEchoChecksum - (*PatternFlowIcmpEchoIdentifierCounter)(nil), // 1192: otg.PatternFlowIcmpEchoIdentifierCounter - (*PatternFlowIcmpEchoIdentifierMetricTag)(nil), // 1193: otg.PatternFlowIcmpEchoIdentifierMetricTag - (*PatternFlowIcmpEchoIdentifier)(nil), // 1194: otg.PatternFlowIcmpEchoIdentifier - (*PatternFlowIcmpEchoSequenceNumberCounter)(nil), // 1195: otg.PatternFlowIcmpEchoSequenceNumberCounter - (*PatternFlowIcmpEchoSequenceNumberMetricTag)(nil), // 1196: otg.PatternFlowIcmpEchoSequenceNumberMetricTag - (*PatternFlowIcmpEchoSequenceNumber)(nil), // 1197: otg.PatternFlowIcmpEchoSequenceNumber - (*PatternFlowIcmpCommonChecksum)(nil), // 1198: otg.PatternFlowIcmpCommonChecksum - (*PatternFlowIcmpNextFieldsIdentifierCounter)(nil), // 1199: otg.PatternFlowIcmpNextFieldsIdentifierCounter - (*PatternFlowIcmpNextFieldsIdentifierMetricTag)(nil), // 1200: otg.PatternFlowIcmpNextFieldsIdentifierMetricTag - (*PatternFlowIcmpNextFieldsIdentifier)(nil), // 1201: otg.PatternFlowIcmpNextFieldsIdentifier - (*PatternFlowIcmpNextFieldsSequenceNumberCounter)(nil), // 1202: otg.PatternFlowIcmpNextFieldsSequenceNumberCounter - (*PatternFlowIcmpNextFieldsSequenceNumberMetricTag)(nil), // 1203: otg.PatternFlowIcmpNextFieldsSequenceNumberMetricTag - (*PatternFlowIcmpNextFieldsSequenceNumber)(nil), // 1204: otg.PatternFlowIcmpNextFieldsSequenceNumber - (*PatternFlowIcmpv6EchoTypeCounter)(nil), // 1205: otg.PatternFlowIcmpv6EchoTypeCounter - (*PatternFlowIcmpv6EchoTypeMetricTag)(nil), // 1206: otg.PatternFlowIcmpv6EchoTypeMetricTag - (*PatternFlowIcmpv6EchoType)(nil), // 1207: otg.PatternFlowIcmpv6EchoType - (*PatternFlowIcmpv6EchoCodeCounter)(nil), // 1208: otg.PatternFlowIcmpv6EchoCodeCounter - (*PatternFlowIcmpv6EchoCodeMetricTag)(nil), // 1209: otg.PatternFlowIcmpv6EchoCodeMetricTag - (*PatternFlowIcmpv6EchoCode)(nil), // 1210: otg.PatternFlowIcmpv6EchoCode - (*PatternFlowIcmpv6EchoIdentifierCounter)(nil), // 1211: otg.PatternFlowIcmpv6EchoIdentifierCounter - (*PatternFlowIcmpv6EchoIdentifierMetricTag)(nil), // 1212: otg.PatternFlowIcmpv6EchoIdentifierMetricTag - (*PatternFlowIcmpv6EchoIdentifier)(nil), // 1213: otg.PatternFlowIcmpv6EchoIdentifier - (*PatternFlowIcmpv6EchoSequenceNumberCounter)(nil), // 1214: otg.PatternFlowIcmpv6EchoSequenceNumberCounter - (*PatternFlowIcmpv6EchoSequenceNumberMetricTag)(nil), // 1215: otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag - (*PatternFlowIcmpv6EchoSequenceNumber)(nil), // 1216: otg.PatternFlowIcmpv6EchoSequenceNumber - (*PatternFlowIcmpv6EchoChecksum)(nil), // 1217: otg.PatternFlowIcmpv6EchoChecksum - (*PatternFlowIcmpv6CommonChecksum)(nil), // 1218: otg.PatternFlowIcmpv6CommonChecksum - (*PatternFlowPppAddressCounter)(nil), // 1219: otg.PatternFlowPppAddressCounter - (*PatternFlowPppAddressMetricTag)(nil), // 1220: otg.PatternFlowPppAddressMetricTag - (*PatternFlowPppAddress)(nil), // 1221: otg.PatternFlowPppAddress - (*PatternFlowPppControlCounter)(nil), // 1222: otg.PatternFlowPppControlCounter - (*PatternFlowPppControlMetricTag)(nil), // 1223: otg.PatternFlowPppControlMetricTag - (*PatternFlowPppControl)(nil), // 1224: otg.PatternFlowPppControl - (*PatternFlowPppProtocolTypeCounter)(nil), // 1225: otg.PatternFlowPppProtocolTypeCounter - (*PatternFlowPppProtocolTypeMetricTag)(nil), // 1226: otg.PatternFlowPppProtocolTypeMetricTag - (*PatternFlowPppProtocolType)(nil), // 1227: otg.PatternFlowPppProtocolType - (*PatternFlowIgmpv1VersionCounter)(nil), // 1228: otg.PatternFlowIgmpv1VersionCounter - (*PatternFlowIgmpv1VersionMetricTag)(nil), // 1229: otg.PatternFlowIgmpv1VersionMetricTag - (*PatternFlowIgmpv1Version)(nil), // 1230: otg.PatternFlowIgmpv1Version - (*PatternFlowIgmpv1TypeCounter)(nil), // 1231: otg.PatternFlowIgmpv1TypeCounter - (*PatternFlowIgmpv1TypeMetricTag)(nil), // 1232: otg.PatternFlowIgmpv1TypeMetricTag - (*PatternFlowIgmpv1Type)(nil), // 1233: otg.PatternFlowIgmpv1Type - (*PatternFlowIgmpv1UnusedCounter)(nil), // 1234: otg.PatternFlowIgmpv1UnusedCounter - (*PatternFlowIgmpv1UnusedMetricTag)(nil), // 1235: otg.PatternFlowIgmpv1UnusedMetricTag - (*PatternFlowIgmpv1Unused)(nil), // 1236: otg.PatternFlowIgmpv1Unused - (*PatternFlowIgmpv1Checksum)(nil), // 1237: otg.PatternFlowIgmpv1Checksum - (*PatternFlowIgmpv1GroupAddressCounter)(nil), // 1238: otg.PatternFlowIgmpv1GroupAddressCounter - (*PatternFlowIgmpv1GroupAddressMetricTag)(nil), // 1239: otg.PatternFlowIgmpv1GroupAddressMetricTag - (*PatternFlowIgmpv1GroupAddress)(nil), // 1240: otg.PatternFlowIgmpv1GroupAddress - (*PatternFlowMplsLabelCounter)(nil), // 1241: otg.PatternFlowMplsLabelCounter - (*PatternFlowMplsLabelMetricTag)(nil), // 1242: otg.PatternFlowMplsLabelMetricTag - (*PatternFlowMplsLabel)(nil), // 1243: otg.PatternFlowMplsLabel - (*PatternFlowMplsTrafficClassCounter)(nil), // 1244: otg.PatternFlowMplsTrafficClassCounter - (*PatternFlowMplsTrafficClassMetricTag)(nil), // 1245: otg.PatternFlowMplsTrafficClassMetricTag - (*PatternFlowMplsTrafficClass)(nil), // 1246: otg.PatternFlowMplsTrafficClass - (*PatternFlowMplsBottomOfStackCounter)(nil), // 1247: otg.PatternFlowMplsBottomOfStackCounter - (*PatternFlowMplsBottomOfStackMetricTag)(nil), // 1248: otg.PatternFlowMplsBottomOfStackMetricTag - (*PatternFlowMplsBottomOfStack)(nil), // 1249: otg.PatternFlowMplsBottomOfStack - (*PatternFlowMplsTimeToLiveCounter)(nil), // 1250: otg.PatternFlowMplsTimeToLiveCounter - (*PatternFlowMplsTimeToLiveMetricTag)(nil), // 1251: otg.PatternFlowMplsTimeToLiveMetricTag - (*PatternFlowMplsTimeToLive)(nil), // 1252: otg.PatternFlowMplsTimeToLive - (*PatternFlowSnmpv2CVersionCounter)(nil), // 1253: otg.PatternFlowSnmpv2cVersionCounter - (*PatternFlowSnmpv2CVersion)(nil), // 1254: otg.PatternFlowSnmpv2cVersion - (*PatternFlowSnmpv2CPDURequestIdCounter)(nil), // 1255: otg.PatternFlowSnmpv2cPDURequestIdCounter - (*PatternFlowSnmpv2CPDURequestId)(nil), // 1256: otg.PatternFlowSnmpv2cPDURequestId - (*PatternFlowSnmpv2CPDUErrorIndexCounter)(nil), // 1257: otg.PatternFlowSnmpv2cPDUErrorIndexCounter - (*PatternFlowSnmpv2CPDUErrorIndex)(nil), // 1258: otg.PatternFlowSnmpv2cPDUErrorIndex - (*PatternFlowSnmpv2CBulkPDURequestIdCounter)(nil), // 1259: otg.PatternFlowSnmpv2cBulkPDURequestIdCounter - (*PatternFlowSnmpv2CBulkPDURequestId)(nil), // 1260: otg.PatternFlowSnmpv2cBulkPDURequestId - (*PatternFlowSnmpv2CBulkPDUNonRepeaters)(nil), // 1261: otg.PatternFlowSnmpv2cBulkPDUNonRepeaters - (*PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter)(nil), // 1262: otg.PatternFlowSnmpv2cBulkPDUMaxRepetitionsCounter - (*PatternFlowSnmpv2CBulkPDUMaxRepetitions)(nil), // 1263: otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions - (*PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter)(nil), // 1264: otg.PatternFlowSnmpv2cVariableBindingValueIntegerValueCounter - (*PatternFlowSnmpv2CVariableBindingValueIntegerValue)(nil), // 1265: otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue - (*PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter)(nil), // 1266: otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValueCounter - (*PatternFlowSnmpv2CVariableBindingValueIpAddressValue)(nil), // 1267: otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue - (*PatternFlowSnmpv2CVariableBindingValueCounterValueCounter)(nil), // 1268: otg.PatternFlowSnmpv2cVariableBindingValueCounterValueCounter - (*PatternFlowSnmpv2CVariableBindingValueCounterValue)(nil), // 1269: otg.PatternFlowSnmpv2cVariableBindingValueCounterValue - (*PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter)(nil), // 1270: otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValueCounter - (*PatternFlowSnmpv2CVariableBindingValueTimeticksValue)(nil), // 1271: otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue - (*PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter)(nil), // 1272: otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValueCounter - (*PatternFlowSnmpv2CVariableBindingValueBigCounterValue)(nil), // 1273: otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue - (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter)(nil), // 1274: otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValueCounter - (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue)(nil), // 1275: otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue - (*PatternFlowSnmpv2CCommonRequestIdCounter)(nil), // 1276: otg.PatternFlowSnmpv2cCommonRequestIdCounter - (*PatternFlowSnmpv2CCommonRequestId)(nil), // 1277: otg.PatternFlowSnmpv2cCommonRequestId - (*PatternFlowRsvpRsvpChecksum)(nil), // 1278: otg.PatternFlowRsvpRsvpChecksum - (*PatternFlowRsvpTimeToLiveCounter)(nil), // 1279: otg.PatternFlowRsvpTimeToLiveCounter - (*PatternFlowRsvpTimeToLive)(nil), // 1280: otg.PatternFlowRsvpTimeToLive - (*PatternFlowRsvpReservedCounter)(nil), // 1281: otg.PatternFlowRsvpReservedCounter - (*PatternFlowRsvpReserved)(nil), // 1282: otg.PatternFlowRsvpReserved - (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter)(nil), // 1283: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter - (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress)(nil), // 1284: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress - (*PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter)(nil), // 1285: otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter - (*PatternFlowRSVPPathSessionLspTunnelIpv4Reserved)(nil), // 1286: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved - (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter)(nil), // 1287: otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter - (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId)(nil), // 1288: otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId - (*PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter)(nil), // 1289: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter - (*PatternFlowRSVPPathSessionExtTunnelIdAsInteger)(nil), // 1290: otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger - (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter)(nil), // 1291: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter - (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4)(nil), // 1292: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 - (*PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter)(nil), // 1293: otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter - (*PatternFlowRSVPPathRsvpHopIpv4Ipv4Address)(nil), // 1294: otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address - (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter)(nil), // 1295: otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter - (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle)(nil), // 1296: otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle - (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter)(nil), // 1297: otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter - (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodR)(nil), // 1298: otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR - (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter)(nil), // 1299: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter - (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit)(nil), // 1300: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit - (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter)(nil), // 1301: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter - (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address)(nil), // 1302: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address - (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter)(nil), // 1303: otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter - (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBit)(nil), // 1304: otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit - (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter)(nil), // 1305: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter - (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved)(nil), // 1306: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved - (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter)(nil), // 1307: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pidCounter - (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid)(nil), // 1308: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid - (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter)(nil), // 1309: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter - (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress)(nil), // 1310: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress - (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter)(nil), // 1311: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter - (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved)(nil), // 1312: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved - (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter)(nil), // 1313: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter - (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId)(nil), // 1314: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId - (*PatternFlowRSVPPathSenderTspecIntServVersionCounter)(nil), // 1315: otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter - (*PatternFlowRSVPPathSenderTspecIntServVersion)(nil), // 1316: otg.PatternFlowRSVPPathSenderTspecIntServVersion - (*PatternFlowRSVPPathSenderTspecIntServReserved1Counter)(nil), // 1317: otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter - (*PatternFlowRSVPPathSenderTspecIntServReserved1)(nil), // 1318: otg.PatternFlowRSVPPathSenderTspecIntServReserved1 - (*PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter)(nil), // 1319: otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter - (*PatternFlowRSVPPathSenderTspecIntServOverallLength)(nil), // 1320: otg.PatternFlowRSVPPathSenderTspecIntServOverallLength - (*PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter)(nil), // 1321: otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter - (*PatternFlowRSVPPathSenderTspecIntServServiceHeader)(nil), // 1322: otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader - (*PatternFlowRSVPPathSenderTspecIntServZeroBitCounter)(nil), // 1323: otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter - (*PatternFlowRSVPPathSenderTspecIntServZeroBit)(nil), // 1324: otg.PatternFlowRSVPPathSenderTspecIntServZeroBit - (*PatternFlowRSVPPathSenderTspecIntServReserved2Counter)(nil), // 1325: otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter - (*PatternFlowRSVPPathSenderTspecIntServReserved2)(nil), // 1326: otg.PatternFlowRSVPPathSenderTspecIntServReserved2 - (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter)(nil), // 1327: otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter - (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData)(nil), // 1328: otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData - (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter)(nil), // 1329: otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter - (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec)(nil), // 1330: otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec - (*PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter)(nil), // 1331: otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter - (*PatternFlowRSVPPathSenderTspecIntServParameter127Flag)(nil), // 1332: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag - (*PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter)(nil), // 1333: otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter - (*PatternFlowRSVPPathSenderTspecIntServParameter127Length)(nil), // 1334: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length - (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter)(nil), // 1335: otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter - (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit)(nil), // 1336: otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit - (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter)(nil), // 1337: otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter - (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize)(nil), // 1338: otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize - (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter)(nil), // 1339: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter - (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address)(nil), // 1340: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address - (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter)(nil), // 1341: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter - (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength)(nil), // 1342: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength - (*PatternFlowRSVPPathRecordRouteType1LabelFlags)(nil), // 1343: otg.PatternFlowRSVPPathRecordRouteType1LabelFlags - (*PatternFlowRSVPPathRecordRouteType1LabelCType)(nil), // 1344: otg.PatternFlowRSVPPathRecordRouteType1LabelCType - (*PatternFlowRSVPPathObjectsCustomTypeCounter)(nil), // 1345: otg.PatternFlowRSVPPathObjectsCustomTypeCounter - (*PatternFlowRSVPPathObjectsCustomType)(nil), // 1346: otg.PatternFlowRSVPPathObjectsCustomType - (*Version)(nil), // 1347: otg.Version - (*Success)(nil), // 1348: otg.Success - (*Failure)(nil), // 1349: otg.Failure - (*SetConfigRequest)(nil), // 1350: otg.SetConfigRequest - (*UpdateConfigRequest)(nil), // 1351: otg.UpdateConfigRequest - (*SetConfigResponse)(nil), // 1352: otg.SetConfigResponse - (*GetConfigResponse)(nil), // 1353: otg.GetConfigResponse - (*UpdateConfigResponse)(nil), // 1354: otg.UpdateConfigResponse - (*SetControlStateRequest)(nil), // 1355: otg.SetControlStateRequest - (*SetControlStateResponse)(nil), // 1356: otg.SetControlStateResponse - (*SetControlActionRequest)(nil), // 1357: otg.SetControlActionRequest - (*SetControlActionResponse)(nil), // 1358: otg.SetControlActionResponse - (*GetMetricsRequest)(nil), // 1359: otg.GetMetricsRequest - (*GetMetricsResponse)(nil), // 1360: otg.GetMetricsResponse - (*GetStatesRequest)(nil), // 1361: otg.GetStatesRequest - (*GetStatesResponse)(nil), // 1362: otg.GetStatesResponse - (*GetCaptureRequest)(nil), // 1363: otg.GetCaptureRequest - (*GetCaptureResponse)(nil), // 1364: otg.GetCaptureResponse - (*GetVersionResponse)(nil), // 1365: otg.GetVersionResponse - (*LagProtocol_Choice)(nil), // 1366: otg.LagProtocol.Choice - (*LagPortLacp_ActorActivity)(nil), // 1367: otg.LagPortLacp.ActorActivity - (*EthernetConnection_Choice)(nil), // 1368: otg.EthernetConnection.Choice - (*DeviceVlan_Tpid)(nil), // 1369: otg.DeviceVlan.Tpid - (*DeviceIpv4GatewayMAC_Choice)(nil), // 1370: otg.DeviceIpv4GatewayMAC.Choice - (*DeviceIpv6GatewayMAC_Choice)(nil), // 1371: otg.DeviceIpv6GatewayMAC.Choice - (*Layer1_Speed)(nil), // 1372: otg.Layer1.Speed - (*Layer1_Media)(nil), // 1373: otg.Layer1.Media - (*Layer1FlowControl_Choice)(nil), // 1374: otg.Layer1FlowControl.Choice - (*Capture_Format)(nil), // 1375: otg.Capture.Format - (*CaptureFilter_Choice)(nil), // 1376: otg.CaptureFilter.Choice - (*IsisInterface_NetworkType)(nil), // 1377: otg.IsisInterface.NetworkType - (*IsisInterface_LevelType)(nil), // 1378: otg.IsisInterface.LevelType - (*IsisInterfaceAuthentication_AuthType)(nil), // 1379: otg.IsisInterfaceAuthentication.AuthType - (*IsisAuthenticationBase_AuthType)(nil), // 1380: otg.IsisAuthenticationBase.AuthType - (*IsisV4RouteRange_OriginType)(nil), // 1381: otg.IsisV4RouteRange.OriginType - (*IsisV4RouteRange_RedistributionType)(nil), // 1382: otg.IsisV4RouteRange.RedistributionType - (*IsisV6RouteRange_OriginType)(nil), // 1383: otg.IsisV6RouteRange.OriginType - (*IsisV6RouteRange_RedistributionType)(nil), // 1384: otg.IsisV6RouteRange.RedistributionType - (*DeviceBgpMessageHeaderError_Subcode)(nil), // 1385: otg.DeviceBgpMessageHeaderError.Subcode - (*DeviceBgpOpenMessageError_Subcode)(nil), // 1386: otg.DeviceBgpOpenMessageError.Subcode - (*DeviceBgpUpdateMessageError_Subcode)(nil), // 1387: otg.DeviceBgpUpdateMessageError.Subcode - (*DeviceBgpCeaseError_Subcode)(nil), // 1388: otg.DeviceBgpCeaseError.Subcode - (*BgpV4Peer_AsType)(nil), // 1389: otg.BgpV4Peer.AsType - (*BgpV4Peer_AsNumberWidth)(nil), // 1390: otg.BgpV4Peer.AsNumberWidth - (*BgpV4EthernetSegment_ActiveMode)(nil), // 1391: otg.BgpV4EthernetSegment.ActiveMode - (*BgpRouteAdvanced_Origin)(nil), // 1392: otg.BgpRouteAdvanced.Origin - (*BgpCommunity_Type)(nil), // 1393: otg.BgpCommunity.Type - (*BgpExtCommunity_Type)(nil), // 1394: otg.BgpExtCommunity.Type - (*BgpExtCommunity_Subtype)(nil), // 1395: otg.BgpExtCommunity.Subtype - (*BgpAsPath_AsSetMode)(nil), // 1396: otg.BgpAsPath.AsSetMode - (*BgpAsPathSegment_Type)(nil), // 1397: otg.BgpAsPathSegment.Type - (*BgpV4EvpnEvis_Choice)(nil), // 1398: otg.BgpV4EvpnEvis.Choice - (*BgpV4EviVxlan_ReplicationType)(nil), // 1399: otg.BgpV4EviVxlan.ReplicationType - (*BgpRouteDistinguisher_RdType)(nil), // 1400: otg.BgpRouteDistinguisher.RdType - (*BgpRouteTarget_RtType)(nil), // 1401: otg.BgpRouteTarget.RtType - (*BgpV4RouteRange_NextHopMode)(nil), // 1402: otg.BgpV4RouteRange.NextHopMode - (*BgpV4RouteRange_NextHopAddressType)(nil), // 1403: otg.BgpV4RouteRange.NextHopAddressType - (*BgpExtendedCommunity_Choice)(nil), // 1404: otg.BgpExtendedCommunity.Choice - (*BgpExtendedCommunityTransitive2OctetAsType_Choice)(nil), // 1405: otg.BgpExtendedCommunityTransitive2OctetAsType.Choice - (*BgpExtendedCommunityTransitiveIpv4AddressType_Choice)(nil), // 1406: otg.BgpExtendedCommunityTransitiveIpv4AddressType.Choice - (*BgpExtendedCommunityTransitive4OctetAsType_Choice)(nil), // 1407: otg.BgpExtendedCommunityTransitive4OctetAsType.Choice - (*BgpExtendedCommunityTransitiveOpaqueType_Choice)(nil), // 1408: otg.BgpExtendedCommunityTransitiveOpaqueType.Choice - (*BgpExtendedCommunityTransitiveEvpnType_Choice)(nil), // 1409: otg.BgpExtendedCommunityTransitiveEvpnType.Choice - (*BgpExtendedCommunityNonTransitive2OctetAsType_Choice)(nil), // 1410: otg.BgpExtendedCommunityNonTransitive2OctetAsType.Choice - (*BgpV6RouteRange_NextHopMode)(nil), // 1411: otg.BgpV6RouteRange.NextHopMode - (*BgpV6RouteRange_NextHopAddressType)(nil), // 1412: otg.BgpV6RouteRange.NextHopAddressType - (*BgpSrteV4Policy_NextHopMode)(nil), // 1413: otg.BgpSrteV4Policy.NextHopMode - (*BgpSrteV4Policy_NextHopAddressType)(nil), // 1414: otg.BgpSrteV4Policy.NextHopAddressType - (*BgpSrteRemoteEndpointSubTlv_AddressFamily)(nil), // 1415: otg.BgpSrteRemoteEndpointSubTlv.AddressFamily - (*BgpSrteBindingSubTlv_BindingSidType)(nil), // 1416: otg.BgpSrteBindingSubTlv.BindingSidType - (*BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy)(nil), // 1417: otg.BgpSrteExplicitNullLabelPolicySubTlv.ExplicitNullLabelPolicy - (*BgpSrteSegment_SegmentType)(nil), // 1418: otg.BgpSrteSegment.SegmentType - (*BgpSrteV6Policy_NextHopMode)(nil), // 1419: otg.BgpSrteV6Policy.NextHopMode - (*BgpSrteV6Policy_NextHopAddressType)(nil), // 1420: otg.BgpSrteV6Policy.NextHopAddressType - (*BgpUpdateReplay_Choice)(nil), // 1421: otg.BgpUpdateReplay.Choice - (*BgpAttributes_Origin)(nil), // 1422: otg.BgpAttributes.Origin - (*BgpAttributesAsPath_Choice)(nil), // 1423: otg.BgpAttributesAsPath.Choice - (*BgpAttributesFourByteAsPathSegment_Type)(nil), // 1424: otg.BgpAttributesFourByteAsPathSegment.Type - (*BgpAttributesTwoByteAsPathSegment_Type)(nil), // 1425: otg.BgpAttributesTwoByteAsPathSegment.Type - (*BgpAttributesAggregator_Choice)(nil), // 1426: otg.BgpAttributesAggregator.Choice - (*BgpAttributesCommunity_Choice)(nil), // 1427: otg.BgpAttributesCommunity.Choice - (*BgpAttributesNextHop_Choice)(nil), // 1428: otg.BgpAttributesNextHop.Choice - (*BgpAttributesMpReachNlri_Choice)(nil), // 1429: otg.BgpAttributesMpReachNlri.Choice - (*BgpAttributesMpUnreachNlri_Choice)(nil), // 1430: otg.BgpAttributesMpUnreachNlri.Choice - (*BgpV6Peer_AsType)(nil), // 1431: otg.BgpV6Peer.AsType - (*BgpV6Peer_AsNumberWidth)(nil), // 1432: otg.BgpV6Peer.AsNumberWidth - (*BgpV6EthernetSegment_ActiveMode)(nil), // 1433: otg.BgpV6EthernetSegment.ActiveMode - (*BgpV6EvpnEvis_Choice)(nil), // 1434: otg.BgpV6EvpnEvis.Choice - (*BgpV6EviVxlan_ReplicationType)(nil), // 1435: otg.BgpV6EviVxlan.ReplicationType - (*VxlanV4TunnelDestinationIPMode_Choice)(nil), // 1436: otg.VxlanV4TunnelDestinationIPMode.Choice - (*VxlanV6TunnelDestinationIPMode_Choice)(nil), // 1437: otg.VxlanV6TunnelDestinationIPMode.Choice - (*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle)(nil), // 1438: otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.ReservationStyle - (*RsvpEro_PrependNeighborIp)(nil), // 1439: otg.RsvpEro.PrependNeighborIp - (*RsvpEroSubobject_Type)(nil), // 1440: otg.RsvpEroSubobject.Type - (*RsvpEroSubobject_HopType)(nil), // 1441: otg.RsvpEroSubobject.HopType - (*FlowTxRx_Choice)(nil), // 1442: otg.FlowTxRx.Choice - (*FlowRouter_Mode)(nil), // 1443: otg.FlowRouter.Mode - (*FlowHeader_Choice)(nil), // 1444: otg.FlowHeader.Choice - (*FlowIpv4Options_Choice)(nil), // 1445: otg.FlowIpv4Options.Choice - (*FlowIpv4OptionsCustomLength_Choice)(nil), // 1446: otg.FlowIpv4OptionsCustomLength.Choice - (*FlowIpv4Priority_Choice)(nil), // 1447: otg.FlowIpv4Priority.Choice - (*FlowIcmp_Choice)(nil), // 1448: otg.FlowIcmp.Choice - (*FlowIcmpv6_Choice)(nil), // 1449: otg.FlowIcmpv6.Choice - (*FlowSnmpv2CData_Choice)(nil), // 1450: otg.FlowSnmpv2cData.Choice - (*FlowSnmpv2CPDU_ErrorStatus)(nil), // 1451: otg.FlowSnmpv2cPDU.ErrorStatus - (*FlowSnmpv2CVariableBindingValue_Choice)(nil), // 1452: otg.FlowSnmpv2cVariableBindingValue.Choice - (*FlowSnmpv2CVariableBindingStringValue_Choice)(nil), // 1453: otg.FlowSnmpv2cVariableBindingStringValue.Choice - (*FlowRsvp_Flag)(nil), // 1454: otg.FlowRsvp.Flag - (*FlowRSVPLength_Choice)(nil), // 1455: otg.FlowRSVPLength.Choice - (*FlowRSVPMessage_Choice)(nil), // 1456: otg.FlowRSVPMessage.Choice - (*FlowRSVPObjectLength_Choice)(nil), // 1457: otg.FlowRSVPObjectLength.Choice - (*FlowRSVPPathObjectsClass_Choice)(nil), // 1458: otg.FlowRSVPPathObjectsClass.Choice - (*FlowRSVPPathObjectsSessionCType_Choice)(nil), // 1459: otg.FlowRSVPPathObjectsSessionCType.Choice - (*FlowRSVPPathSessionExtTunnelId_Choice)(nil), // 1460: otg.FlowRSVPPathSessionExtTunnelId.Choice - (*FlowRSVPPathObjectsRsvpHopCType_Choice)(nil), // 1461: otg.FlowRSVPPathObjectsRsvpHopCType.Choice - (*FlowRSVPPathObjectsTimeValuesCType_Choice)(nil), // 1462: otg.FlowRSVPPathObjectsTimeValuesCType.Choice - (*FlowRSVPPathObjectsClassExplicitRouteCType_Choice)(nil), // 1463: otg.FlowRSVPPathObjectsClassExplicitRouteCType.Choice - (*FlowRSVPType1ExplicitRouteSubobjectsType_Choice)(nil), // 1464: otg.FlowRSVPType1ExplicitRouteSubobjectsType.Choice - (*FlowRSVPExplicitRouteLength_Choice)(nil), // 1465: otg.FlowRSVPExplicitRouteLength.Choice - (*FlowRSVPExplicitRouteASNumberLength_Choice)(nil), // 1466: otg.FlowRSVPExplicitRouteASNumberLength.Choice - (*FlowRSVPPathObjectsLabelRequestCType_Choice)(nil), // 1467: otg.FlowRSVPPathObjectsLabelRequestCType.Choice - (*FlowRSVPPathObjectsSessionAttributeCType_Choice)(nil), // 1468: otg.FlowRSVPPathObjectsSessionAttributeCType.Choice - (*FlowRSVPLspTunnelFlag_Choice)(nil), // 1469: otg.FlowRSVPLspTunnelFlag.Choice - (*FlowRSVPSessionAttributeNameLength_Choice)(nil), // 1470: otg.FlowRSVPSessionAttributeNameLength.Choice - (*FlowRSVPPathObjectsSenderTemplateCType_Choice)(nil), // 1471: otg.FlowRSVPPathObjectsSenderTemplateCType.Choice - (*FlowRSVPPathObjectsSenderTspecCType_Choice)(nil), // 1472: otg.FlowRSVPPathObjectsSenderTspecCType.Choice - (*FlowRSVPPathObjectsRecordRouteCType_Choice)(nil), // 1473: otg.FlowRSVPPathObjectsRecordRouteCType.Choice - (*FlowRSVPPathObjectsRecordRouteSubObjectType_Choice)(nil), // 1474: otg.FlowRSVPPathObjectsRecordRouteSubObjectType.Choice - (*FlowRSVPRecordRouteIPv4Flag_Choice)(nil), // 1475: otg.FlowRSVPRecordRouteIPv4Flag.Choice - (*FlowRSVPPathRecordRouteLabel_Choice)(nil), // 1476: otg.FlowRSVPPathRecordRouteLabel.Choice - (*FlowRSVPRouteRecordLength_Choice)(nil), // 1477: otg.FlowRSVPRouteRecordLength.Choice - (*FlowSize_Choice)(nil), // 1478: otg.FlowSize.Choice - (*FlowSizeWeightPairs_Choice)(nil), // 1479: otg.FlowSizeWeightPairs.Choice - (*FlowSizeWeightPairs_Predefined)(nil), // 1480: otg.FlowSizeWeightPairs.Predefined - (*FlowRate_Choice)(nil), // 1481: otg.FlowRate.Choice - (*FlowDuration_Choice)(nil), // 1482: otg.FlowDuration.Choice - (*FlowDelay_Choice)(nil), // 1483: otg.FlowDelay.Choice - (*FlowDurationInterBurstGap_Choice)(nil), // 1484: otg.FlowDurationInterBurstGap.Choice - (*FlowLatencyMetrics_Mode)(nil), // 1485: otg.FlowLatencyMetrics.Mode - (*FlowRxTxRatio_Choice)(nil), // 1486: otg.FlowRxTxRatio.Choice - (*EventRequest_Type)(nil), // 1487: otg.EventRequest.Type - (*LldpConnection_Choice)(nil), // 1488: otg.LldpConnection.Choice - (*LldpChassisId_Choice)(nil), // 1489: otg.LldpChassisId.Choice - (*LldpPortId_Choice)(nil), // 1490: otg.LldpPortId.Choice - (*LldpChassisMacSubType_Choice)(nil), // 1491: otg.LldpChassisMacSubType.Choice - (*LldpPortInterfaceNameSubType_Choice)(nil), // 1492: otg.LldpPortInterfaceNameSubType.Choice - (*LldpSystemName_Choice)(nil), // 1493: otg.LldpSystemName.Choice - (*Error_Kind)(nil), // 1494: otg.Error.Kind - (*ConfigUpdate_Choice)(nil), // 1495: otg.ConfigUpdate.Choice - (*FlowsUpdate_PropertyNames)(nil), // 1496: otg.FlowsUpdate.PropertyNames - (*ControlState_Choice)(nil), // 1497: otg.ControlState.Choice - (*StatePort_Choice)(nil), // 1498: otg.StatePort.Choice - (*StateTraffic_Choice)(nil), // 1499: otg.StateTraffic.Choice - (*StateProtocol_Choice)(nil), // 1500: otg.StateProtocol.Choice - (*StatePortLink_State)(nil), // 1501: otg.StatePortLink.State - (*StatePortCapture_State)(nil), // 1502: otg.StatePortCapture.State - (*StateTrafficFlowTransmit_State)(nil), // 1503: otg.StateTrafficFlowTransmit.State - (*StateProtocolAll_State)(nil), // 1504: otg.StateProtocolAll.State - (*StateProtocolRoute_State)(nil), // 1505: otg.StateProtocolRoute.State - (*StateProtocolLacp_Choice)(nil), // 1506: otg.StateProtocolLacp.Choice - (*StateProtocolLacpAdmin_State)(nil), // 1507: otg.StateProtocolLacpAdmin.State - (*StateProtocolLacpMemberPorts_State)(nil), // 1508: otg.StateProtocolLacpMemberPorts.State - (*StateProtocolBgp_Choice)(nil), // 1509: otg.StateProtocolBgp.Choice - (*StateProtocolBgpPeers_State)(nil), // 1510: otg.StateProtocolBgpPeers.State - (*StateProtocolIsis_Choice)(nil), // 1511: otg.StateProtocolIsis.Choice - (*StateProtocolIsisRouters_State)(nil), // 1512: otg.StateProtocolIsisRouters.State - (*ControlAction_Choice)(nil), // 1513: otg.ControlAction.Choice - (*ActionResponse_Choice)(nil), // 1514: otg.ActionResponse.Choice - (*ActionProtocol_Choice)(nil), // 1515: otg.ActionProtocol.Choice - (*ActionResponseProtocol_Choice)(nil), // 1516: otg.ActionResponseProtocol.Choice - (*ActionProtocolIpv4_Choice)(nil), // 1517: otg.ActionProtocolIpv4.Choice - (*ActionResponseProtocolIpv4_Choice)(nil), // 1518: otg.ActionResponseProtocolIpv4.Choice - (*ActionResponseProtocolIpv4PingResponse_Result)(nil), // 1519: otg.ActionResponseProtocolIpv4PingResponse.Result - (*ActionProtocolIpv6_Choice)(nil), // 1520: otg.ActionProtocolIpv6.Choice - (*ActionResponseProtocolIpv6_Choice)(nil), // 1521: otg.ActionResponseProtocolIpv6.Choice - (*ActionResponseProtocolIpv6PingResponse_Result)(nil), // 1522: otg.ActionResponseProtocolIpv6PingResponse.Result - (*ActionProtocolBgp_Choice)(nil), // 1523: otg.ActionProtocolBgp.Choice - (*ActionProtocolBgpNotification_Choice)(nil), // 1524: otg.ActionProtocolBgpNotification.Choice - (*MetricsRequest_Choice)(nil), // 1525: otg.MetricsRequest.Choice - (*MetricsResponse_Choice)(nil), // 1526: otg.MetricsResponse.Choice - (*PortMetricsRequest_ColumnNames)(nil), // 1527: otg.PortMetricsRequest.ColumnNames - (*PortMetric_Link)(nil), // 1528: otg.PortMetric.Link - (*PortMetric_Capture)(nil), // 1529: otg.PortMetric.Capture - (*PortMetric_Transmit)(nil), // 1530: otg.PortMetric.Transmit - (*FlowMetricsRequest_MetricNames)(nil), // 1531: otg.FlowMetricsRequest.MetricNames - (*FlowTaggedMetricsFilter_MetricNames)(nil), // 1532: otg.FlowTaggedMetricsFilter.MetricNames - (*FlowMetric_Transmit)(nil), // 1533: otg.FlowMetric.Transmit - (*FlowMetricTagValue_Choice)(nil), // 1534: otg.FlowMetricTagValue.Choice - (*Bgpv4MetricsRequest_ColumnNames)(nil), // 1535: otg.Bgpv4MetricsRequest.ColumnNames - (*Bgpv4Metric_SessionState)(nil), // 1536: otg.Bgpv4Metric.SessionState - (*Bgpv4Metric_FsmState)(nil), // 1537: otg.Bgpv4Metric.FsmState - (*Bgpv6MetricsRequest_ColumnNames)(nil), // 1538: otg.Bgpv6MetricsRequest.ColumnNames - (*Bgpv6Metric_SessionState)(nil), // 1539: otg.Bgpv6Metric.SessionState - (*Bgpv6Metric_FsmState)(nil), // 1540: otg.Bgpv6Metric.FsmState - (*IsisMetricsRequest_ColumnNames)(nil), // 1541: otg.IsisMetricsRequest.ColumnNames - (*LagMetricsRequest_ColumnNames)(nil), // 1542: otg.LagMetricsRequest.ColumnNames - (*LagMetric_OperStatus)(nil), // 1543: otg.LagMetric.OperStatus - (*LacpMetricsRequest_ColumnNames)(nil), // 1544: otg.LacpMetricsRequest.ColumnNames - (*LacpMetric_Activity)(nil), // 1545: otg.LacpMetric.Activity - (*LacpMetric_Timeout)(nil), // 1546: otg.LacpMetric.Timeout - (*LacpMetric_Synchronization)(nil), // 1547: otg.LacpMetric.Synchronization - (*LldpMetricsRequest_ColumnNames)(nil), // 1548: otg.LldpMetricsRequest.ColumnNames - (*RsvpMetricsRequest_ColumnNames)(nil), // 1549: otg.RsvpMetricsRequest.ColumnNames - (*StatesRequest_Choice)(nil), // 1550: otg.StatesRequest.Choice - (*StatesResponse_Choice)(nil), // 1551: otg.StatesResponse.Choice - (*BgpPrefixStateRequest_PrefixFilters)(nil), // 1552: otg.BgpPrefixStateRequest.PrefixFilters - (*BgpPrefixIpv4UnicastFilter_Origin)(nil), // 1553: otg.BgpPrefixIpv4UnicastFilter.Origin - (*BgpPrefixIpv6UnicastFilter_Origin)(nil), // 1554: otg.BgpPrefixIpv6UnicastFilter.Origin - (*BgpPrefixIpv4UnicastState_Origin)(nil), // 1555: otg.BgpPrefixIpv4UnicastState.Origin - (*BgpPrefixIpv6UnicastState_Origin)(nil), // 1556: otg.BgpPrefixIpv6UnicastState.Origin - (*ResultBgpCommunity_Type)(nil), // 1557: otg.ResultBgpCommunity.Type - (*ResultBgpAsPathSegment_Type)(nil), // 1558: otg.ResultBgpAsPathSegment.Type - (*IsisLspState_PduType)(nil), // 1559: otg.IsisLspState.PduType - (*IsisLspV4Prefix_RedistributionType)(nil), // 1560: otg.IsisLspV4Prefix.RedistributionType - (*IsisLspV4Prefix_OriginType)(nil), // 1561: otg.IsisLspV4Prefix.OriginType - (*IsisLspExtendedV4Prefix_RedistributionType)(nil), // 1562: otg.IsisLspExtendedV4Prefix.RedistributionType - (*IsisLspV6Prefix_RedistributionType)(nil), // 1563: otg.IsisLspV6Prefix.RedistributionType - (*IsisLspV6Prefix_OriginType)(nil), // 1564: otg.IsisLspV6Prefix.OriginType - (*LldpNeighborsState_ChassisIdType)(nil), // 1565: otg.LldpNeighborsState.ChassisIdType - (*LldpNeighborsState_PortIdType)(nil), // 1566: otg.LldpNeighborsState.PortIdType - (*LldpCapabilityState_CapabilityName)(nil), // 1567: otg.LldpCapabilityState.CapabilityName - (*RsvpLspState_SessionStatus)(nil), // 1568: otg.RsvpLspState.SessionStatus - (*RsvpLspState_LastFlapReason)(nil), // 1569: otg.RsvpLspState.LastFlapReason - (*RsvpLspIpv4Ero_Type)(nil), // 1570: otg.RsvpLspIpv4Ero.Type - (*PatternFlowEthernetDst_Choice)(nil), // 1571: otg.PatternFlowEthernetDst.Choice - (*PatternFlowEthernetSrc_Choice)(nil), // 1572: otg.PatternFlowEthernetSrc.Choice - (*PatternFlowEthernetEtherType_Choice)(nil), // 1573: otg.PatternFlowEthernetEtherType.Choice - (*PatternFlowEthernetPfcQueue_Choice)(nil), // 1574: otg.PatternFlowEthernetPfcQueue.Choice - (*PatternFlowVlanPriority_Choice)(nil), // 1575: otg.PatternFlowVlanPriority.Choice - (*PatternFlowVlanCfi_Choice)(nil), // 1576: otg.PatternFlowVlanCfi.Choice - (*PatternFlowVlanId_Choice)(nil), // 1577: otg.PatternFlowVlanId.Choice - (*PatternFlowVlanTpid_Choice)(nil), // 1578: otg.PatternFlowVlanTpid.Choice - (*PatternFlowVxlanFlags_Choice)(nil), // 1579: otg.PatternFlowVxlanFlags.Choice - (*PatternFlowVxlanReserved0_Choice)(nil), // 1580: otg.PatternFlowVxlanReserved0.Choice - (*PatternFlowVxlanVni_Choice)(nil), // 1581: otg.PatternFlowVxlanVni.Choice - (*PatternFlowVxlanReserved1_Choice)(nil), // 1582: otg.PatternFlowVxlanReserved1.Choice - (*PatternFlowIpv4Version_Choice)(nil), // 1583: otg.PatternFlowIpv4Version.Choice - (*PatternFlowIpv4HeaderLength_Choice)(nil), // 1584: otg.PatternFlowIpv4HeaderLength.Choice - (*PatternFlowIpv4TotalLength_Choice)(nil), // 1585: otg.PatternFlowIpv4TotalLength.Choice - (*PatternFlowIpv4Identification_Choice)(nil), // 1586: otg.PatternFlowIpv4Identification.Choice - (*PatternFlowIpv4Reserved_Choice)(nil), // 1587: otg.PatternFlowIpv4Reserved.Choice - (*PatternFlowIpv4DontFragment_Choice)(nil), // 1588: otg.PatternFlowIpv4DontFragment.Choice - (*PatternFlowIpv4MoreFragments_Choice)(nil), // 1589: otg.PatternFlowIpv4MoreFragments.Choice - (*PatternFlowIpv4FragmentOffset_Choice)(nil), // 1590: otg.PatternFlowIpv4FragmentOffset.Choice - (*PatternFlowIpv4TimeToLive_Choice)(nil), // 1591: otg.PatternFlowIpv4TimeToLive.Choice - (*PatternFlowIpv4Protocol_Choice)(nil), // 1592: otg.PatternFlowIpv4Protocol.Choice - (*PatternFlowIpv4HeaderChecksum_Choice)(nil), // 1593: otg.PatternFlowIpv4HeaderChecksum.Choice - (*PatternFlowIpv4HeaderChecksum_Generated)(nil), // 1594: otg.PatternFlowIpv4HeaderChecksum.Generated - (*PatternFlowIpv4Src_Choice)(nil), // 1595: otg.PatternFlowIpv4Src.Choice - (*PatternFlowIpv4Dst_Choice)(nil), // 1596: otg.PatternFlowIpv4Dst.Choice - (*PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice)(nil), // 1597: otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag.Choice - (*PatternFlowIpv4OptionsCustomTypeOptionClass_Choice)(nil), // 1598: otg.PatternFlowIpv4OptionsCustomTypeOptionClass.Choice - (*PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice)(nil), // 1599: otg.PatternFlowIpv4OptionsCustomTypeOptionNumber.Choice - (*PatternFlowIpv4PriorityRaw_Choice)(nil), // 1600: otg.PatternFlowIpv4PriorityRaw.Choice - (*PatternFlowIpv4DscpPhb_Choice)(nil), // 1601: otg.PatternFlowIpv4DscpPhb.Choice - (*PatternFlowIpv4DscpEcn_Choice)(nil), // 1602: otg.PatternFlowIpv4DscpEcn.Choice - (*PatternFlowIpv4TosPrecedence_Choice)(nil), // 1603: otg.PatternFlowIpv4TosPrecedence.Choice - (*PatternFlowIpv4TosDelay_Choice)(nil), // 1604: otg.PatternFlowIpv4TosDelay.Choice - (*PatternFlowIpv4TosThroughput_Choice)(nil), // 1605: otg.PatternFlowIpv4TosThroughput.Choice - (*PatternFlowIpv4TosReliability_Choice)(nil), // 1606: otg.PatternFlowIpv4TosReliability.Choice - (*PatternFlowIpv4TosMonetary_Choice)(nil), // 1607: otg.PatternFlowIpv4TosMonetary.Choice - (*PatternFlowIpv4TosUnused_Choice)(nil), // 1608: otg.PatternFlowIpv4TosUnused.Choice - (*PatternFlowIpv6Version_Choice)(nil), // 1609: otg.PatternFlowIpv6Version.Choice - (*PatternFlowIpv6TrafficClass_Choice)(nil), // 1610: otg.PatternFlowIpv6TrafficClass.Choice - (*PatternFlowIpv6FlowLabel_Choice)(nil), // 1611: otg.PatternFlowIpv6FlowLabel.Choice - (*PatternFlowIpv6PayloadLength_Choice)(nil), // 1612: otg.PatternFlowIpv6PayloadLength.Choice - (*PatternFlowIpv6NextHeader_Choice)(nil), // 1613: otg.PatternFlowIpv6NextHeader.Choice - (*PatternFlowIpv6HopLimit_Choice)(nil), // 1614: otg.PatternFlowIpv6HopLimit.Choice - (*PatternFlowIpv6Src_Choice)(nil), // 1615: otg.PatternFlowIpv6Src.Choice - (*PatternFlowIpv6Dst_Choice)(nil), // 1616: otg.PatternFlowIpv6Dst.Choice - (*PatternFlowPfcPauseDst_Choice)(nil), // 1617: otg.PatternFlowPfcPauseDst.Choice - (*PatternFlowPfcPauseSrc_Choice)(nil), // 1618: otg.PatternFlowPfcPauseSrc.Choice - (*PatternFlowPfcPauseEtherType_Choice)(nil), // 1619: otg.PatternFlowPfcPauseEtherType.Choice - (*PatternFlowPfcPauseControlOpCode_Choice)(nil), // 1620: otg.PatternFlowPfcPauseControlOpCode.Choice - (*PatternFlowPfcPauseClassEnableVector_Choice)(nil), // 1621: otg.PatternFlowPfcPauseClassEnableVector.Choice - (*PatternFlowPfcPausePauseClass0_Choice)(nil), // 1622: otg.PatternFlowPfcPausePauseClass0.Choice - (*PatternFlowPfcPausePauseClass1_Choice)(nil), // 1623: otg.PatternFlowPfcPausePauseClass1.Choice - (*PatternFlowPfcPausePauseClass2_Choice)(nil), // 1624: otg.PatternFlowPfcPausePauseClass2.Choice - (*PatternFlowPfcPausePauseClass3_Choice)(nil), // 1625: otg.PatternFlowPfcPausePauseClass3.Choice - (*PatternFlowPfcPausePauseClass4_Choice)(nil), // 1626: otg.PatternFlowPfcPausePauseClass4.Choice - (*PatternFlowPfcPausePauseClass5_Choice)(nil), // 1627: otg.PatternFlowPfcPausePauseClass5.Choice - (*PatternFlowPfcPausePauseClass6_Choice)(nil), // 1628: otg.PatternFlowPfcPausePauseClass6.Choice - (*PatternFlowPfcPausePauseClass7_Choice)(nil), // 1629: otg.PatternFlowPfcPausePauseClass7.Choice - (*PatternFlowEthernetPauseDst_Choice)(nil), // 1630: otg.PatternFlowEthernetPauseDst.Choice - (*PatternFlowEthernetPauseSrc_Choice)(nil), // 1631: otg.PatternFlowEthernetPauseSrc.Choice - (*PatternFlowEthernetPauseEtherType_Choice)(nil), // 1632: otg.PatternFlowEthernetPauseEtherType.Choice - (*PatternFlowEthernetPauseControlOpCode_Choice)(nil), // 1633: otg.PatternFlowEthernetPauseControlOpCode.Choice - (*PatternFlowEthernetPauseTime_Choice)(nil), // 1634: otg.PatternFlowEthernetPauseTime.Choice - (*PatternFlowTcpSrcPort_Choice)(nil), // 1635: otg.PatternFlowTcpSrcPort.Choice - (*PatternFlowTcpDstPort_Choice)(nil), // 1636: otg.PatternFlowTcpDstPort.Choice - (*PatternFlowTcpSeqNum_Choice)(nil), // 1637: otg.PatternFlowTcpSeqNum.Choice - (*PatternFlowTcpAckNum_Choice)(nil), // 1638: otg.PatternFlowTcpAckNum.Choice - (*PatternFlowTcpDataOffset_Choice)(nil), // 1639: otg.PatternFlowTcpDataOffset.Choice - (*PatternFlowTcpEcnNs_Choice)(nil), // 1640: otg.PatternFlowTcpEcnNs.Choice - (*PatternFlowTcpEcnCwr_Choice)(nil), // 1641: otg.PatternFlowTcpEcnCwr.Choice - (*PatternFlowTcpEcnEcho_Choice)(nil), // 1642: otg.PatternFlowTcpEcnEcho.Choice - (*PatternFlowTcpCtlUrg_Choice)(nil), // 1643: otg.PatternFlowTcpCtlUrg.Choice - (*PatternFlowTcpCtlAck_Choice)(nil), // 1644: otg.PatternFlowTcpCtlAck.Choice - (*PatternFlowTcpCtlPsh_Choice)(nil), // 1645: otg.PatternFlowTcpCtlPsh.Choice - (*PatternFlowTcpCtlRst_Choice)(nil), // 1646: otg.PatternFlowTcpCtlRst.Choice - (*PatternFlowTcpCtlSyn_Choice)(nil), // 1647: otg.PatternFlowTcpCtlSyn.Choice - (*PatternFlowTcpCtlFin_Choice)(nil), // 1648: otg.PatternFlowTcpCtlFin.Choice - (*PatternFlowTcpWindow_Choice)(nil), // 1649: otg.PatternFlowTcpWindow.Choice - (*PatternFlowUdpSrcPort_Choice)(nil), // 1650: otg.PatternFlowUdpSrcPort.Choice - (*PatternFlowUdpDstPort_Choice)(nil), // 1651: otg.PatternFlowUdpDstPort.Choice - (*PatternFlowUdpLength_Choice)(nil), // 1652: otg.PatternFlowUdpLength.Choice - (*PatternFlowUdpChecksum_Choice)(nil), // 1653: otg.PatternFlowUdpChecksum.Choice - (*PatternFlowUdpChecksum_Generated)(nil), // 1654: otg.PatternFlowUdpChecksum.Generated - (*PatternFlowGreChecksumPresent_Choice)(nil), // 1655: otg.PatternFlowGreChecksumPresent.Choice - (*PatternFlowGreReserved0_Choice)(nil), // 1656: otg.PatternFlowGreReserved0.Choice - (*PatternFlowGreVersion_Choice)(nil), // 1657: otg.PatternFlowGreVersion.Choice - (*PatternFlowGreProtocol_Choice)(nil), // 1658: otg.PatternFlowGreProtocol.Choice - (*PatternFlowGreChecksum_Choice)(nil), // 1659: otg.PatternFlowGreChecksum.Choice - (*PatternFlowGreChecksum_Generated)(nil), // 1660: otg.PatternFlowGreChecksum.Generated - (*PatternFlowGreReserved1_Choice)(nil), // 1661: otg.PatternFlowGreReserved1.Choice - (*PatternFlowGtpv1Version_Choice)(nil), // 1662: otg.PatternFlowGtpv1Version.Choice - (*PatternFlowGtpv1ProtocolType_Choice)(nil), // 1663: otg.PatternFlowGtpv1ProtocolType.Choice - (*PatternFlowGtpv1Reserved_Choice)(nil), // 1664: otg.PatternFlowGtpv1Reserved.Choice - (*PatternFlowGtpv1EFlag_Choice)(nil), // 1665: otg.PatternFlowGtpv1EFlag.Choice - (*PatternFlowGtpv1SFlag_Choice)(nil), // 1666: otg.PatternFlowGtpv1SFlag.Choice - (*PatternFlowGtpv1PnFlag_Choice)(nil), // 1667: otg.PatternFlowGtpv1PnFlag.Choice - (*PatternFlowGtpv1MessageType_Choice)(nil), // 1668: otg.PatternFlowGtpv1MessageType.Choice - (*PatternFlowGtpv1MessageLength_Choice)(nil), // 1669: otg.PatternFlowGtpv1MessageLength.Choice - (*PatternFlowGtpv1Teid_Choice)(nil), // 1670: otg.PatternFlowGtpv1Teid.Choice - (*PatternFlowGtpv1SquenceNumber_Choice)(nil), // 1671: otg.PatternFlowGtpv1SquenceNumber.Choice - (*PatternFlowGtpv1NPduNumber_Choice)(nil), // 1672: otg.PatternFlowGtpv1NPduNumber.Choice - (*PatternFlowGtpv1NextExtensionHeaderType_Choice)(nil), // 1673: otg.PatternFlowGtpv1NextExtensionHeaderType.Choice - (*PatternFlowGtpExtensionExtensionLength_Choice)(nil), // 1674: otg.PatternFlowGtpExtensionExtensionLength.Choice - (*PatternFlowGtpExtensionContents_Choice)(nil), // 1675: otg.PatternFlowGtpExtensionContents.Choice - (*PatternFlowGtpExtensionNextExtensionHeader_Choice)(nil), // 1676: otg.PatternFlowGtpExtensionNextExtensionHeader.Choice - (*PatternFlowGtpv2Version_Choice)(nil), // 1677: otg.PatternFlowGtpv2Version.Choice - (*PatternFlowGtpv2PiggybackingFlag_Choice)(nil), // 1678: otg.PatternFlowGtpv2PiggybackingFlag.Choice - (*PatternFlowGtpv2TeidFlag_Choice)(nil), // 1679: otg.PatternFlowGtpv2TeidFlag.Choice - (*PatternFlowGtpv2Spare1_Choice)(nil), // 1680: otg.PatternFlowGtpv2Spare1.Choice - (*PatternFlowGtpv2MessageType_Choice)(nil), // 1681: otg.PatternFlowGtpv2MessageType.Choice - (*PatternFlowGtpv2MessageLength_Choice)(nil), // 1682: otg.PatternFlowGtpv2MessageLength.Choice - (*PatternFlowGtpv2Teid_Choice)(nil), // 1683: otg.PatternFlowGtpv2Teid.Choice - (*PatternFlowGtpv2SequenceNumber_Choice)(nil), // 1684: otg.PatternFlowGtpv2SequenceNumber.Choice - (*PatternFlowGtpv2Spare2_Choice)(nil), // 1685: otg.PatternFlowGtpv2Spare2.Choice - (*PatternFlowArpHardwareType_Choice)(nil), // 1686: otg.PatternFlowArpHardwareType.Choice - (*PatternFlowArpProtocolType_Choice)(nil), // 1687: otg.PatternFlowArpProtocolType.Choice - (*PatternFlowArpHardwareLength_Choice)(nil), // 1688: otg.PatternFlowArpHardwareLength.Choice - (*PatternFlowArpProtocolLength_Choice)(nil), // 1689: otg.PatternFlowArpProtocolLength.Choice - (*PatternFlowArpOperation_Choice)(nil), // 1690: otg.PatternFlowArpOperation.Choice - (*PatternFlowArpSenderHardwareAddr_Choice)(nil), // 1691: otg.PatternFlowArpSenderHardwareAddr.Choice - (*PatternFlowArpSenderProtocolAddr_Choice)(nil), // 1692: otg.PatternFlowArpSenderProtocolAddr.Choice - (*PatternFlowArpTargetHardwareAddr_Choice)(nil), // 1693: otg.PatternFlowArpTargetHardwareAddr.Choice - (*PatternFlowArpTargetProtocolAddr_Choice)(nil), // 1694: otg.PatternFlowArpTargetProtocolAddr.Choice - (*PatternFlowIcmpEchoType_Choice)(nil), // 1695: otg.PatternFlowIcmpEchoType.Choice - (*PatternFlowIcmpEchoCode_Choice)(nil), // 1696: otg.PatternFlowIcmpEchoCode.Choice - (*PatternFlowIcmpEchoChecksum_Choice)(nil), // 1697: otg.PatternFlowIcmpEchoChecksum.Choice - (*PatternFlowIcmpEchoChecksum_Generated)(nil), // 1698: otg.PatternFlowIcmpEchoChecksum.Generated - (*PatternFlowIcmpEchoIdentifier_Choice)(nil), // 1699: otg.PatternFlowIcmpEchoIdentifier.Choice - (*PatternFlowIcmpEchoSequenceNumber_Choice)(nil), // 1700: otg.PatternFlowIcmpEchoSequenceNumber.Choice - (*PatternFlowIcmpCommonChecksum_Choice)(nil), // 1701: otg.PatternFlowIcmpCommonChecksum.Choice - (*PatternFlowIcmpCommonChecksum_Generated)(nil), // 1702: otg.PatternFlowIcmpCommonChecksum.Generated - (*PatternFlowIcmpNextFieldsIdentifier_Choice)(nil), // 1703: otg.PatternFlowIcmpNextFieldsIdentifier.Choice - (*PatternFlowIcmpNextFieldsSequenceNumber_Choice)(nil), // 1704: otg.PatternFlowIcmpNextFieldsSequenceNumber.Choice - (*PatternFlowIcmpv6EchoType_Choice)(nil), // 1705: otg.PatternFlowIcmpv6EchoType.Choice - (*PatternFlowIcmpv6EchoCode_Choice)(nil), // 1706: otg.PatternFlowIcmpv6EchoCode.Choice - (*PatternFlowIcmpv6EchoIdentifier_Choice)(nil), // 1707: otg.PatternFlowIcmpv6EchoIdentifier.Choice - (*PatternFlowIcmpv6EchoSequenceNumber_Choice)(nil), // 1708: otg.PatternFlowIcmpv6EchoSequenceNumber.Choice - (*PatternFlowIcmpv6EchoChecksum_Choice)(nil), // 1709: otg.PatternFlowIcmpv6EchoChecksum.Choice - (*PatternFlowIcmpv6EchoChecksum_Generated)(nil), // 1710: otg.PatternFlowIcmpv6EchoChecksum.Generated - (*PatternFlowIcmpv6CommonChecksum_Choice)(nil), // 1711: otg.PatternFlowIcmpv6CommonChecksum.Choice - (*PatternFlowIcmpv6CommonChecksum_Generated)(nil), // 1712: otg.PatternFlowIcmpv6CommonChecksum.Generated - (*PatternFlowPppAddress_Choice)(nil), // 1713: otg.PatternFlowPppAddress.Choice - (*PatternFlowPppControl_Choice)(nil), // 1714: otg.PatternFlowPppControl.Choice - (*PatternFlowPppProtocolType_Choice)(nil), // 1715: otg.PatternFlowPppProtocolType.Choice - (*PatternFlowIgmpv1Version_Choice)(nil), // 1716: otg.PatternFlowIgmpv1Version.Choice - (*PatternFlowIgmpv1Type_Choice)(nil), // 1717: otg.PatternFlowIgmpv1Type.Choice - (*PatternFlowIgmpv1Unused_Choice)(nil), // 1718: otg.PatternFlowIgmpv1Unused.Choice - (*PatternFlowIgmpv1Checksum_Choice)(nil), // 1719: otg.PatternFlowIgmpv1Checksum.Choice - (*PatternFlowIgmpv1Checksum_Generated)(nil), // 1720: otg.PatternFlowIgmpv1Checksum.Generated - (*PatternFlowIgmpv1GroupAddress_Choice)(nil), // 1721: otg.PatternFlowIgmpv1GroupAddress.Choice - (*PatternFlowMplsLabel_Choice)(nil), // 1722: otg.PatternFlowMplsLabel.Choice - (*PatternFlowMplsTrafficClass_Choice)(nil), // 1723: otg.PatternFlowMplsTrafficClass.Choice - (*PatternFlowMplsBottomOfStack_Choice)(nil), // 1724: otg.PatternFlowMplsBottomOfStack.Choice - (*PatternFlowMplsTimeToLive_Choice)(nil), // 1725: otg.PatternFlowMplsTimeToLive.Choice - (*PatternFlowSnmpv2CVersion_Choice)(nil), // 1726: otg.PatternFlowSnmpv2cVersion.Choice - (*PatternFlowSnmpv2CPDURequestId_Choice)(nil), // 1727: otg.PatternFlowSnmpv2cPDURequestId.Choice - (*PatternFlowSnmpv2CPDUErrorIndex_Choice)(nil), // 1728: otg.PatternFlowSnmpv2cPDUErrorIndex.Choice - (*PatternFlowSnmpv2CBulkPDURequestId_Choice)(nil), // 1729: otg.PatternFlowSnmpv2cBulkPDURequestId.Choice - (*PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice)(nil), // 1730: otg.PatternFlowSnmpv2cBulkPDUNonRepeaters.Choice - (*PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice)(nil), // 1731: otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions.Choice - (*PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice)(nil), // 1732: otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue.Choice - (*PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice)(nil), // 1733: otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue.Choice - (*PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice)(nil), // 1734: otg.PatternFlowSnmpv2cVariableBindingValueCounterValue.Choice - (*PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice)(nil), // 1735: otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue.Choice - (*PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice)(nil), // 1736: otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue.Choice - (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice)(nil), // 1737: otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue.Choice - (*PatternFlowSnmpv2CCommonRequestId_Choice)(nil), // 1738: otg.PatternFlowSnmpv2cCommonRequestId.Choice - (*PatternFlowRsvpRsvpChecksum_Choice)(nil), // 1739: otg.PatternFlowRsvpRsvpChecksum.Choice - (*PatternFlowRsvpRsvpChecksum_Generated)(nil), // 1740: otg.PatternFlowRsvpRsvpChecksum.Generated - (*PatternFlowRsvpTimeToLive_Choice)(nil), // 1741: otg.PatternFlowRsvpTimeToLive.Choice - (*PatternFlowRsvpReserved_Choice)(nil), // 1742: otg.PatternFlowRsvpReserved.Choice - (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice)(nil), // 1743: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.Choice - (*PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice)(nil), // 1744: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.Choice - (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice)(nil), // 1745: otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.Choice - (*PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice)(nil), // 1746: otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger.Choice - (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice)(nil), // 1747: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.Choice - (*PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice)(nil), // 1748: otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.Choice - (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice)(nil), // 1749: otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle.Choice - (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice)(nil), // 1750: otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR.Choice - (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice)(nil), // 1751: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.Choice - (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice)(nil), // 1752: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.Choice - (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice)(nil), // 1753: otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.Choice - (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice)(nil), // 1754: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.Choice - (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice)(nil), // 1755: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid.Choice - (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice)(nil), // 1756: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.Choice - (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice)(nil), // 1757: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.Choice - (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice)(nil), // 1758: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.Choice - (*PatternFlowRSVPPathSenderTspecIntServVersion_Choice)(nil), // 1759: otg.PatternFlowRSVPPathSenderTspecIntServVersion.Choice - (*PatternFlowRSVPPathSenderTspecIntServReserved1_Choice)(nil), // 1760: otg.PatternFlowRSVPPathSenderTspecIntServReserved1.Choice - (*PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice)(nil), // 1761: otg.PatternFlowRSVPPathSenderTspecIntServOverallLength.Choice - (*PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice)(nil), // 1762: otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader.Choice - (*PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice)(nil), // 1763: otg.PatternFlowRSVPPathSenderTspecIntServZeroBit.Choice - (*PatternFlowRSVPPathSenderTspecIntServReserved2_Choice)(nil), // 1764: otg.PatternFlowRSVPPathSenderTspecIntServReserved2.Choice - (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice)(nil), // 1765: otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.Choice - (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice)(nil), // 1766: otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.Choice - (*PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice)(nil), // 1767: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag.Choice - (*PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice)(nil), // 1768: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length.Choice - (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice)(nil), // 1769: otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.Choice - (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice)(nil), // 1770: otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.Choice - (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice)(nil), // 1771: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.Choice - (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice)(nil), // 1772: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.Choice - (*PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice)(nil), // 1773: otg.PatternFlowRSVPPathRecordRouteType1LabelFlags.Choice - (*PatternFlowRSVPPathRecordRouteType1LabelCType_Choice)(nil), // 1774: otg.PatternFlowRSVPPathRecordRouteType1LabelCType.Choice - (*PatternFlowRSVPPathObjectsCustomType_Choice)(nil), // 1775: otg.PatternFlowRSVPPathObjectsCustomType.Choice - (*emptypb.Empty)(nil), // 1776: google.protobuf.Empty + (EthernetSimulatedLink_LinkType_Enum)(0), // 3: otg.EthernetSimulatedLink.LinkType.Enum + (DeviceVlan_Tpid_Enum)(0), // 4: otg.DeviceVlan.Tpid.Enum + (DeviceIpv4GatewayMAC_Choice_Enum)(0), // 5: otg.DeviceIpv4GatewayMAC.Choice.Enum + (DeviceIpv6GatewayMAC_Choice_Enum)(0), // 6: otg.DeviceIpv6GatewayMAC.Choice.Enum + (DeviceDhcpv4Client_Choice_Enum)(0), // 7: otg.DeviceDhcpv4client.Choice.Enum + (DeviceDhcpv6ClientIaType_Choice_Enum)(0), // 8: otg.DeviceDhcpv6clientIaType.Choice.Enum + (DeviceDhcpv6ClientDuidType_Choice_Enum)(0), // 9: otg.DeviceDhcpv6clientDuidType.Choice.Enum + (Dhcpv6ClientOptionsServerIdentifier_Choice_Enum)(0), // 10: otg.Dhcpv6ClientOptionsServerIdentifier.Choice.Enum + (Dhcpv6ClientOptionsDuidUuidVersion_Choice_Enum)(0), // 11: otg.Dhcpv6ClientOptionsDuidUuidVersion.Choice.Enum + (Dhcpv6ClientOptionsDuidUuidVariant_Choice_Enum)(0), // 12: otg.Dhcpv6ClientOptionsDuidUuidVariant.Choice.Enum + (Dhcpv6ClientOptionsOptionsRequest_Choice_Enum)(0), // 13: otg.Dhcpv6ClientOptionsOptionsRequest.Choice.Enum + (Dhcpv6ClientOptionsIncludedMessages_Choice_Enum)(0), // 14: otg.Dhcpv6ClientOptionsIncludedMessages.Choice.Enum + (Dhcpv6ClientOptionsMessageType_Choice_Enum)(0), // 15: otg.Dhcpv6ClientOptionsMessageType.Choice.Enum + (Dhcpv6ServerOptionsIncludedMessages_Choice_Enum)(0), // 16: otg.Dhcpv6ServerOptionsIncludedMessages.Choice.Enum + (Dhcpv6ServerOptionsMessageType_Choice_Enum)(0), // 17: otg.Dhcpv6ServerOptionsMessageType.Choice.Enum + (Layer1_Speed_Enum)(0), // 18: otg.Layer1.Speed.Enum + (Layer1_Media_Enum)(0), // 19: otg.Layer1.Media.Enum + (Layer1FlowControl_Choice_Enum)(0), // 20: otg.Layer1FlowControl.Choice.Enum + (Capture_Format_Enum)(0), // 21: otg.Capture.Format.Enum + (CaptureFilter_Choice_Enum)(0), // 22: otg.CaptureFilter.Choice.Enum + (IsisInterface_NetworkType_Enum)(0), // 23: otg.IsisInterface.NetworkType.Enum + (IsisInterface_LevelType_Enum)(0), // 24: otg.IsisInterface.LevelType.Enum + (IsisInterfaceAuthentication_AuthType_Enum)(0), // 25: otg.IsisInterfaceAuthentication.AuthType.Enum + (IsisAuthenticationBase_AuthType_Enum)(0), // 26: otg.IsisAuthenticationBase.AuthType.Enum + (IsisV4RouteRange_OriginType_Enum)(0), // 27: otg.IsisV4RouteRange.OriginType.Enum + (IsisV4RouteRange_RedistributionType_Enum)(0), // 28: otg.IsisV4RouteRange.RedistributionType.Enum + (IsisV6RouteRange_OriginType_Enum)(0), // 29: otg.IsisV6RouteRange.OriginType.Enum + (IsisV6RouteRange_RedistributionType_Enum)(0), // 30: otg.IsisV6RouteRange.RedistributionType.Enum + (DeviceBgpMessageHeaderError_Subcode_Enum)(0), // 31: otg.DeviceBgpMessageHeaderError.Subcode.Enum + (DeviceBgpOpenMessageError_Subcode_Enum)(0), // 32: otg.DeviceBgpOpenMessageError.Subcode.Enum + (DeviceBgpUpdateMessageError_Subcode_Enum)(0), // 33: otg.DeviceBgpUpdateMessageError.Subcode.Enum + (DeviceBgpCeaseError_Subcode_Enum)(0), // 34: otg.DeviceBgpCeaseError.Subcode.Enum + (BgpV4Peer_AsType_Enum)(0), // 35: otg.BgpV4Peer.AsType.Enum + (BgpV4Peer_AsNumberWidth_Enum)(0), // 36: otg.BgpV4Peer.AsNumberWidth.Enum + (BgpV4EthernetSegment_ActiveMode_Enum)(0), // 37: otg.BgpV4EthernetSegment.ActiveMode.Enum + (BgpRouteAdvanced_Origin_Enum)(0), // 38: otg.BgpRouteAdvanced.Origin.Enum + (BgpCommunity_Type_Enum)(0), // 39: otg.BgpCommunity.Type.Enum + (BgpExtCommunity_Type_Enum)(0), // 40: otg.BgpExtCommunity.Type.Enum + (BgpExtCommunity_Subtype_Enum)(0), // 41: otg.BgpExtCommunity.Subtype.Enum + (BgpAsPath_AsSetMode_Enum)(0), // 42: otg.BgpAsPath.AsSetMode.Enum + (BgpAsPathSegment_Type_Enum)(0), // 43: otg.BgpAsPathSegment.Type.Enum + (BgpV4EvpnEvis_Choice_Enum)(0), // 44: otg.BgpV4EvpnEvis.Choice.Enum + (BgpV4EviVxlan_ReplicationType_Enum)(0), // 45: otg.BgpV4EviVxlan.ReplicationType.Enum + (BgpRouteDistinguisher_RdType_Enum)(0), // 46: otg.BgpRouteDistinguisher.RdType.Enum + (BgpRouteTarget_RtType_Enum)(0), // 47: otg.BgpRouteTarget.RtType.Enum + (BgpV4RouteRange_NextHopMode_Enum)(0), // 48: otg.BgpV4RouteRange.NextHopMode.Enum + (BgpV4RouteRange_NextHopAddressType_Enum)(0), // 49: otg.BgpV4RouteRange.NextHopAddressType.Enum + (BgpExtendedCommunity_Choice_Enum)(0), // 50: otg.BgpExtendedCommunity.Choice.Enum + (BgpExtendedCommunityTransitive2OctetAsType_Choice_Enum)(0), // 51: otg.BgpExtendedCommunityTransitive2OctetAsType.Choice.Enum + (BgpExtendedCommunityTransitiveIpv4AddressType_Choice_Enum)(0), // 52: otg.BgpExtendedCommunityTransitiveIpv4AddressType.Choice.Enum + (BgpExtendedCommunityTransitive4OctetAsType_Choice_Enum)(0), // 53: otg.BgpExtendedCommunityTransitive4OctetAsType.Choice.Enum + (BgpExtendedCommunityTransitiveOpaqueType_Choice_Enum)(0), // 54: otg.BgpExtendedCommunityTransitiveOpaqueType.Choice.Enum + (BgpExtendedCommunityTransitiveEvpnType_Choice_Enum)(0), // 55: otg.BgpExtendedCommunityTransitiveEvpnType.Choice.Enum + (BgpExtendedCommunityNonTransitive2OctetAsType_Choice_Enum)(0), // 56: otg.BgpExtendedCommunityNonTransitive2OctetAsType.Choice.Enum + (BgpV6RouteRange_NextHopMode_Enum)(0), // 57: otg.BgpV6RouteRange.NextHopMode.Enum + (BgpV6RouteRange_NextHopAddressType_Enum)(0), // 58: otg.BgpV6RouteRange.NextHopAddressType.Enum + (BgpSrteV4Policy_NextHopMode_Enum)(0), // 59: otg.BgpSrteV4Policy.NextHopMode.Enum + (BgpSrteV4Policy_NextHopAddressType_Enum)(0), // 60: otg.BgpSrteV4Policy.NextHopAddressType.Enum + (BgpSrteRemoteEndpointSubTlv_AddressFamily_Enum)(0), // 61: otg.BgpSrteRemoteEndpointSubTlv.AddressFamily.Enum + (BgpSrteBindingSubTlv_BindingSidType_Enum)(0), // 62: otg.BgpSrteBindingSubTlv.BindingSidType.Enum + (BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy_Enum)(0), // 63: otg.BgpSrteExplicitNullLabelPolicySubTlv.ExplicitNullLabelPolicy.Enum + (BgpSrteSegment_SegmentType_Enum)(0), // 64: otg.BgpSrteSegment.SegmentType.Enum + (BgpSrteV6Policy_NextHopMode_Enum)(0), // 65: otg.BgpSrteV6Policy.NextHopMode.Enum + (BgpSrteV6Policy_NextHopAddressType_Enum)(0), // 66: otg.BgpSrteV6Policy.NextHopAddressType.Enum + (BgpUpdateReplay_Choice_Enum)(0), // 67: otg.BgpUpdateReplay.Choice.Enum + (BgpAttributes_Origin_Enum)(0), // 68: otg.BgpAttributes.Origin.Enum + (BgpAttributesAsPath_Choice_Enum)(0), // 69: otg.BgpAttributesAsPath.Choice.Enum + (BgpAttributesFourByteAsPathSegment_Type_Enum)(0), // 70: otg.BgpAttributesFourByteAsPathSegment.Type.Enum + (BgpAttributesTwoByteAsPathSegment_Type_Enum)(0), // 71: otg.BgpAttributesTwoByteAsPathSegment.Type.Enum + (BgpAttributesAggregator_Choice_Enum)(0), // 72: otg.BgpAttributesAggregator.Choice.Enum + (BgpAttributesCommunity_Choice_Enum)(0), // 73: otg.BgpAttributesCommunity.Choice.Enum + (BgpAttributesNextHop_Choice_Enum)(0), // 74: otg.BgpAttributesNextHop.Choice.Enum + (BgpAttributesMpReachNlri_Choice_Enum)(0), // 75: otg.BgpAttributesMpReachNlri.Choice.Enum + (BgpAttributesMpUnreachNlri_Choice_Enum)(0), // 76: otg.BgpAttributesMpUnreachNlri.Choice.Enum + (BgpAttributesTunnelEncapsulation_Choice_Enum)(0), // 77: otg.BgpAttributesTunnelEncapsulation.Choice.Enum + (BgpAttributesBsid_Choice_Enum)(0), // 78: otg.BgpAttributesBsid.Choice.Enum + (BgpAttributesSrPolicyExplicitNullPolicy_Choice_Enum)(0), // 79: otg.BgpAttributesSrPolicyExplicitNullPolicy.Choice.Enum + (BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice_Enum)(0), // 80: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.Choice.Enum + (BgpV6Peer_AsType_Enum)(0), // 81: otg.BgpV6Peer.AsType.Enum + (BgpV6Peer_AsNumberWidth_Enum)(0), // 82: otg.BgpV6Peer.AsNumberWidth.Enum + (BgpV6EthernetSegment_ActiveMode_Enum)(0), // 83: otg.BgpV6EthernetSegment.ActiveMode.Enum + (BgpV6EvpnEvis_Choice_Enum)(0), // 84: otg.BgpV6EvpnEvis.Choice.Enum + (BgpV6EviVxlan_ReplicationType_Enum)(0), // 85: otg.BgpV6EviVxlan.ReplicationType.Enum + (VxlanV4TunnelDestinationIPMode_Choice_Enum)(0), // 86: otg.VxlanV4TunnelDestinationIPMode.Choice.Enum + (VxlanV6TunnelDestinationIPMode_Choice_Enum)(0), // 87: otg.VxlanV6TunnelDestinationIPMode.Choice.Enum + (RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum)(0), // 88: otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.ReservationStyle.Enum + (RsvpEro_PrependNeighborIp_Enum)(0), // 89: otg.RsvpEro.PrependNeighborIp.Enum + (RsvpEroSubobject_Type_Enum)(0), // 90: otg.RsvpEroSubobject.Type.Enum + (RsvpEroSubobject_HopType_Enum)(0), // 91: otg.RsvpEroSubobject.HopType.Enum + (Dhcpv6ServerIaType_Choice_Enum)(0), // 92: otg.Dhcpv6ServerIaType.Choice.Enum + (Ospfv2RouterId_Choice_Enum)(0), // 93: otg.Ospfv2RouterId.Choice.Enum + (Ospfv2InterfaceArea_Choice_Enum)(0), // 94: otg.Ospfv2InterfaceArea.Choice.Enum + (Ospfv2InterfaceNetworkType_Choice_Enum)(0), // 95: otg.Ospfv2InterfaceNetworkType.Choice.Enum + (Ospfv2InterfaceAuthentication_Choice_Enum)(0), // 96: otg.Ospfv2InterfaceAuthentication.Choice.Enum + (Ospfv2V4RRRouteOrigin_Choice_Enum)(0), // 97: otg.Ospfv2V4RRRouteOrigin.Choice.Enum + (FlowTxRx_Choice_Enum)(0), // 98: otg.FlowTxRx.Choice.Enum + (FlowRouter_Mode_Enum)(0), // 99: otg.FlowRouter.Mode.Enum + (FlowHeader_Choice_Enum)(0), // 100: otg.FlowHeader.Choice.Enum + (FlowIpv4Options_Choice_Enum)(0), // 101: otg.FlowIpv4Options.Choice.Enum + (FlowIpv4OptionsCustomLength_Choice_Enum)(0), // 102: otg.FlowIpv4OptionsCustomLength.Choice.Enum + (FlowIpv4Priority_Choice_Enum)(0), // 103: otg.FlowIpv4Priority.Choice.Enum + (FlowIpv4Auto_Choice_Enum)(0), // 104: otg.FlowIpv4Auto.Choice.Enum + (FlowIpv6Auto_Choice_Enum)(0), // 105: otg.FlowIpv6Auto.Choice.Enum + (FlowIcmp_Choice_Enum)(0), // 106: otg.FlowIcmp.Choice.Enum + (FlowIcmpv6_Choice_Enum)(0), // 107: otg.FlowIcmpv6.Choice.Enum + (FlowSnmpv2CData_Choice_Enum)(0), // 108: otg.FlowSnmpv2cData.Choice.Enum + (FlowSnmpv2CPDU_ErrorStatus_Enum)(0), // 109: otg.FlowSnmpv2cPDU.ErrorStatus.Enum + (FlowSnmpv2CVariableBindingValue_Choice_Enum)(0), // 110: otg.FlowSnmpv2cVariableBindingValue.Choice.Enum + (FlowSnmpv2CVariableBindingStringValue_Choice_Enum)(0), // 111: otg.FlowSnmpv2cVariableBindingStringValue.Choice.Enum + (FlowRsvp_Flag_Enum)(0), // 112: otg.FlowRsvp.Flag.Enum + (FlowRSVPLength_Choice_Enum)(0), // 113: otg.FlowRSVPLength.Choice.Enum + (FlowRSVPMessage_Choice_Enum)(0), // 114: otg.FlowRSVPMessage.Choice.Enum + (FlowRSVPObjectLength_Choice_Enum)(0), // 115: otg.FlowRSVPObjectLength.Choice.Enum + (FlowRSVPPathObjectsClass_Choice_Enum)(0), // 116: otg.FlowRSVPPathObjectsClass.Choice.Enum + (FlowRSVPPathObjectsSessionCType_Choice_Enum)(0), // 117: otg.FlowRSVPPathObjectsSessionCType.Choice.Enum + (FlowRSVPPathSessionExtTunnelId_Choice_Enum)(0), // 118: otg.FlowRSVPPathSessionExtTunnelId.Choice.Enum + (FlowRSVPPathObjectsRsvpHopCType_Choice_Enum)(0), // 119: otg.FlowRSVPPathObjectsRsvpHopCType.Choice.Enum + (FlowRSVPPathObjectsTimeValuesCType_Choice_Enum)(0), // 120: otg.FlowRSVPPathObjectsTimeValuesCType.Choice.Enum + (FlowRSVPPathObjectsClassExplicitRouteCType_Choice_Enum)(0), // 121: otg.FlowRSVPPathObjectsClassExplicitRouteCType.Choice.Enum + (FlowRSVPType1ExplicitRouteSubobjectsType_Choice_Enum)(0), // 122: otg.FlowRSVPType1ExplicitRouteSubobjectsType.Choice.Enum + (FlowRSVPExplicitRouteLength_Choice_Enum)(0), // 123: otg.FlowRSVPExplicitRouteLength.Choice.Enum + (FlowRSVPExplicitRouteASNumberLength_Choice_Enum)(0), // 124: otg.FlowRSVPExplicitRouteASNumberLength.Choice.Enum + (FlowRSVPPathObjectsLabelRequestCType_Choice_Enum)(0), // 125: otg.FlowRSVPPathObjectsLabelRequestCType.Choice.Enum + (FlowRSVPPathObjectsSessionAttributeCType_Choice_Enum)(0), // 126: otg.FlowRSVPPathObjectsSessionAttributeCType.Choice.Enum + (FlowRSVPLspTunnelFlag_Choice_Enum)(0), // 127: otg.FlowRSVPLspTunnelFlag.Choice.Enum + (FlowRSVPSessionAttributeNameLength_Choice_Enum)(0), // 128: otg.FlowRSVPSessionAttributeNameLength.Choice.Enum + (FlowRSVPPathObjectsSenderTemplateCType_Choice_Enum)(0), // 129: otg.FlowRSVPPathObjectsSenderTemplateCType.Choice.Enum + (FlowRSVPPathObjectsSenderTspecCType_Choice_Enum)(0), // 130: otg.FlowRSVPPathObjectsSenderTspecCType.Choice.Enum + (FlowRSVPPathObjectsRecordRouteCType_Choice_Enum)(0), // 131: otg.FlowRSVPPathObjectsRecordRouteCType.Choice.Enum + (FlowRSVPPathObjectsRecordRouteSubObjectType_Choice_Enum)(0), // 132: otg.FlowRSVPPathObjectsRecordRouteSubObjectType.Choice.Enum + (FlowRSVPRecordRouteIPv4Flag_Choice_Enum)(0), // 133: otg.FlowRSVPRecordRouteIPv4Flag.Choice.Enum + (FlowRSVPPathRecordRouteLabel_Choice_Enum)(0), // 134: otg.FlowRSVPPathRecordRouteLabel.Choice.Enum + (FlowRSVPRouteRecordLength_Choice_Enum)(0), // 135: otg.FlowRSVPRouteRecordLength.Choice.Enum + (FlowSize_Choice_Enum)(0), // 136: otg.FlowSize.Choice.Enum + (FlowSizeWeightPairs_Choice_Enum)(0), // 137: otg.FlowSizeWeightPairs.Choice.Enum + (FlowSizeWeightPairs_Predefined_Enum)(0), // 138: otg.FlowSizeWeightPairs.Predefined.Enum + (FlowRate_Choice_Enum)(0), // 139: otg.FlowRate.Choice.Enum + (FlowDuration_Choice_Enum)(0), // 140: otg.FlowDuration.Choice.Enum + (FlowDelay_Choice_Enum)(0), // 141: otg.FlowDelay.Choice.Enum + (FlowDurationInterBurstGap_Choice_Enum)(0), // 142: otg.FlowDurationInterBurstGap.Choice.Enum + (FlowLatencyMetrics_Mode_Enum)(0), // 143: otg.FlowLatencyMetrics.Mode.Enum + (FlowRxTxRatio_Choice_Enum)(0), // 144: otg.FlowRxTxRatio.Choice.Enum + (EventRequest_Type_Enum)(0), // 145: otg.EventRequest.Type.Enum + (LldpConnection_Choice_Enum)(0), // 146: otg.LldpConnection.Choice.Enum + (LldpChassisId_Choice_Enum)(0), // 147: otg.LldpChassisId.Choice.Enum + (LldpPortId_Choice_Enum)(0), // 148: otg.LldpPortId.Choice.Enum + (LldpChassisMacSubType_Choice_Enum)(0), // 149: otg.LldpChassisMacSubType.Choice.Enum + (LldpPortInterfaceNameSubType_Choice_Enum)(0), // 150: otg.LldpPortInterfaceNameSubType.Choice.Enum + (LldpSystemName_Choice_Enum)(0), // 151: otg.LldpSystemName.Choice.Enum + (LldpOrgInfoType_Choice_Enum)(0), // 152: otg.LldpOrgInfoType.Choice.Enum + (Error_Kind_Enum)(0), // 153: otg.Error.Kind.Enum + (ConfigUpdate_Choice_Enum)(0), // 154: otg.ConfigUpdate.Choice.Enum + (FlowsUpdate_PropertyNames_Enum)(0), // 155: otg.FlowsUpdate.PropertyNames.Enum + (ControlState_Choice_Enum)(0), // 156: otg.ControlState.Choice.Enum + (StatePort_Choice_Enum)(0), // 157: otg.StatePort.Choice.Enum + (StateTraffic_Choice_Enum)(0), // 158: otg.StateTraffic.Choice.Enum + (StateProtocol_Choice_Enum)(0), // 159: otg.StateProtocol.Choice.Enum + (StatePortLink_State_Enum)(0), // 160: otg.StatePortLink.State.Enum + (StatePortCapture_State_Enum)(0), // 161: otg.StatePortCapture.State.Enum + (StateTrafficFlowTransmit_State_Enum)(0), // 162: otg.StateTrafficFlowTransmit.State.Enum + (StateProtocolAll_State_Enum)(0), // 163: otg.StateProtocolAll.State.Enum + (StateProtocolRoute_State_Enum)(0), // 164: otg.StateProtocolRoute.State.Enum + (StateProtocolLacp_Choice_Enum)(0), // 165: otg.StateProtocolLacp.Choice.Enum + (StateProtocolLacpAdmin_State_Enum)(0), // 166: otg.StateProtocolLacpAdmin.State.Enum + (StateProtocolLacpMemberPorts_State_Enum)(0), // 167: otg.StateProtocolLacpMemberPorts.State.Enum + (StateProtocolBgp_Choice_Enum)(0), // 168: otg.StateProtocolBgp.Choice.Enum + (StateProtocolBgpPeers_State_Enum)(0), // 169: otg.StateProtocolBgpPeers.State.Enum + (StateProtocolIsis_Choice_Enum)(0), // 170: otg.StateProtocolIsis.Choice.Enum + (StateProtocolIsisRouters_State_Enum)(0), // 171: otg.StateProtocolIsisRouters.State.Enum + (StateProtocolOspfv2_Choice_Enum)(0), // 172: otg.StateProtocolOspfv2.Choice.Enum + (StateProtocolOspfv2Routers_State_Enum)(0), // 173: otg.StateProtocolOspfv2Routers.State.Enum + (ControlAction_Choice_Enum)(0), // 174: otg.ControlAction.Choice.Enum + (ActionResponse_Choice_Enum)(0), // 175: otg.ActionResponse.Choice.Enum + (ActionProtocol_Choice_Enum)(0), // 176: otg.ActionProtocol.Choice.Enum + (ActionResponseProtocol_Choice_Enum)(0), // 177: otg.ActionResponseProtocol.Choice.Enum + (ActionProtocolIpv4_Choice_Enum)(0), // 178: otg.ActionProtocolIpv4.Choice.Enum + (ActionResponseProtocolIpv4_Choice_Enum)(0), // 179: otg.ActionResponseProtocolIpv4.Choice.Enum + (ActionResponseProtocolIpv4PingResponse_Result_Enum)(0), // 180: otg.ActionResponseProtocolIpv4PingResponse.Result.Enum + (ActionProtocolIpv6_Choice_Enum)(0), // 181: otg.ActionProtocolIpv6.Choice.Enum + (ActionResponseProtocolIpv6_Choice_Enum)(0), // 182: otg.ActionResponseProtocolIpv6.Choice.Enum + (ActionResponseProtocolIpv6PingResponse_Result_Enum)(0), // 183: otg.ActionResponseProtocolIpv6PingResponse.Result.Enum + (ActionProtocolBgp_Choice_Enum)(0), // 184: otg.ActionProtocolBgp.Choice.Enum + (ActionProtocolBgpNotification_Choice_Enum)(0), // 185: otg.ActionProtocolBgpNotification.Choice.Enum + (ActionProtocolBgpGracefulRestartNotification_Choice_Enum)(0), // 186: otg.ActionProtocolBgpGracefulRestartNotification.Choice.Enum + (MetricsRequest_Choice_Enum)(0), // 187: otg.MetricsRequest.Choice.Enum + (MetricsResponse_Choice_Enum)(0), // 188: otg.MetricsResponse.Choice.Enum + (PortMetricsRequest_ColumnNames_Enum)(0), // 189: otg.PortMetricsRequest.ColumnNames.Enum + (PortMetric_Link_Enum)(0), // 190: otg.PortMetric.Link.Enum + (PortMetric_Capture_Enum)(0), // 191: otg.PortMetric.Capture.Enum + (PortMetric_Transmit_Enum)(0), // 192: otg.PortMetric.Transmit.Enum + (FlowMetricsRequest_MetricNames_Enum)(0), // 193: otg.FlowMetricsRequest.MetricNames.Enum + (FlowTaggedMetricsFilter_MetricNames_Enum)(0), // 194: otg.FlowTaggedMetricsFilter.MetricNames.Enum + (FlowMetric_Transmit_Enum)(0), // 195: otg.FlowMetric.Transmit.Enum + (FlowMetricTagValue_Choice_Enum)(0), // 196: otg.FlowMetricTagValue.Choice.Enum + (Bgpv4MetricsRequest_ColumnNames_Enum)(0), // 197: otg.Bgpv4MetricsRequest.ColumnNames.Enum + (Bgpv4Metric_SessionState_Enum)(0), // 198: otg.Bgpv4Metric.SessionState.Enum + (Bgpv4Metric_FsmState_Enum)(0), // 199: otg.Bgpv4Metric.FsmState.Enum + (Bgpv6MetricsRequest_ColumnNames_Enum)(0), // 200: otg.Bgpv6MetricsRequest.ColumnNames.Enum + (Bgpv6Metric_SessionState_Enum)(0), // 201: otg.Bgpv6Metric.SessionState.Enum + (Bgpv6Metric_FsmState_Enum)(0), // 202: otg.Bgpv6Metric.FsmState.Enum + (IsisMetricsRequest_ColumnNames_Enum)(0), // 203: otg.IsisMetricsRequest.ColumnNames.Enum + (LagMetricsRequest_ColumnNames_Enum)(0), // 204: otg.LagMetricsRequest.ColumnNames.Enum + (LagMetric_OperStatus_Enum)(0), // 205: otg.LagMetric.OperStatus.Enum + (LacpMetricsRequest_ColumnNames_Enum)(0), // 206: otg.LacpMetricsRequest.ColumnNames.Enum + (LacpMetric_Activity_Enum)(0), // 207: otg.LacpMetric.Activity.Enum + (LacpMetric_Timeout_Enum)(0), // 208: otg.LacpMetric.Timeout.Enum + (LacpMetric_Synchronization_Enum)(0), // 209: otg.LacpMetric.Synchronization.Enum + (LldpMetricsRequest_ColumnNames_Enum)(0), // 210: otg.LldpMetricsRequest.ColumnNames.Enum + (RsvpMetricsRequest_ColumnNames_Enum)(0), // 211: otg.RsvpMetricsRequest.ColumnNames.Enum + (Dhcpv4ClientMetricsRequest_ColumnNames_Enum)(0), // 212: otg.Dhcpv4ClientMetricsRequest.ColumnNames.Enum + (Dhcpv4ServerMetricsRequest_ColumnNames_Enum)(0), // 213: otg.Dhcpv4ServerMetricsRequest.ColumnNames.Enum + (Dhcpv6ClientMetricsRequest_ColumnNames_Enum)(0), // 214: otg.Dhcpv6ClientMetricsRequest.ColumnNames.Enum + (Dhcpv6ServerMetricsRequest_ColumnNames_Enum)(0), // 215: otg.Dhcpv6ServerMetricsRequest.ColumnNames.Enum + (Ospfv2MetricsRequest_ColumnNames_Enum)(0), // 216: otg.Ospfv2MetricsRequest.ColumnNames.Enum + (StatesRequest_Choice_Enum)(0), // 217: otg.StatesRequest.Choice.Enum + (StatesResponse_Choice_Enum)(0), // 218: otg.StatesResponse.Choice.Enum + (BgpPrefixStateRequest_PrefixFilters_Enum)(0), // 219: otg.BgpPrefixStateRequest.PrefixFilters.Enum + (BgpPrefixIpv4UnicastFilter_Origin_Enum)(0), // 220: otg.BgpPrefixIpv4UnicastFilter.Origin.Enum + (BgpPrefixIpv6UnicastFilter_Origin_Enum)(0), // 221: otg.BgpPrefixIpv6UnicastFilter.Origin.Enum + (BgpPrefixIpv4UnicastState_Origin_Enum)(0), // 222: otg.BgpPrefixIpv4UnicastState.Origin.Enum + (BgpPrefixIpv6UnicastState_Origin_Enum)(0), // 223: otg.BgpPrefixIpv6UnicastState.Origin.Enum + (ResultExtendedCommunityStructured_Choice_Enum)(0), // 224: otg.ResultExtendedCommunityStructured.Choice.Enum + (ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum)(0), // 225: otg.ResultExtendedCommunityTransitive2OctetAsType.Choice.Enum + (ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum)(0), // 226: otg.ResultExtendedCommunityTransitiveIpv4AddressType.Choice.Enum + (ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum)(0), // 227: otg.ResultExtendedCommunityTransitive4OctetAsType.Choice.Enum + (ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum)(0), // 228: otg.ResultExtendedCommunityTransitiveOpaqueType.Choice.Enum + (ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum)(0), // 229: otg.ResultExtendedCommunityNonTransitive2OctetAsType.Choice.Enum + (ResultBgpCommunity_Type_Enum)(0), // 230: otg.ResultBgpCommunity.Type.Enum + (ResultBgpAsPathSegment_Type_Enum)(0), // 231: otg.ResultBgpAsPathSegment.Type.Enum + (IsisLspState_PduType_Enum)(0), // 232: otg.IsisLspState.PduType.Enum + (IsisLspV4Prefix_RedistributionType_Enum)(0), // 233: otg.IsisLspV4Prefix.RedistributionType.Enum + (IsisLspV4Prefix_OriginType_Enum)(0), // 234: otg.IsisLspV4Prefix.OriginType.Enum + (IsisLspExtendedV4Prefix_RedistributionType_Enum)(0), // 235: otg.IsisLspExtendedV4Prefix.RedistributionType.Enum + (IsisLspV6Prefix_RedistributionType_Enum)(0), // 236: otg.IsisLspV6Prefix.RedistributionType.Enum + (IsisLspV6Prefix_OriginType_Enum)(0), // 237: otg.IsisLspV6Prefix.OriginType.Enum + (LldpNeighborsState_ChassisIdType_Enum)(0), // 238: otg.LldpNeighborsState.ChassisIdType.Enum + (LldpNeighborsState_PortIdType_Enum)(0), // 239: otg.LldpNeighborsState.PortIdType.Enum + (LldpCapabilityState_CapabilityName_Enum)(0), // 240: otg.LldpCapabilityState.CapabilityName.Enum + (RsvpLspState_SessionStatus_Enum)(0), // 241: otg.RsvpLspState.SessionStatus.Enum + (RsvpLspState_LastFlapReason_Enum)(0), // 242: otg.RsvpLspState.LastFlapReason.Enum + (RsvpLspIpv4Ero_Type_Enum)(0), // 243: otg.RsvpLspIpv4Ero.Type.Enum + (Ospfv2OpaqueLsa_Type_Enum)(0), // 244: otg.Ospfv2OpaqueLsa.Type.Enum + (Ospfv2Link_Type_Enum)(0), // 245: otg.Ospfv2Link.Type.Enum + (PatternFlowEthernetDst_Choice_Enum)(0), // 246: otg.PatternFlowEthernetDst.Choice.Enum + (PatternFlowEthernetSrc_Choice_Enum)(0), // 247: otg.PatternFlowEthernetSrc.Choice.Enum + (PatternFlowEthernetEtherType_Choice_Enum)(0), // 248: otg.PatternFlowEthernetEtherType.Choice.Enum + (PatternFlowEthernetPfcQueue_Choice_Enum)(0), // 249: otg.PatternFlowEthernetPfcQueue.Choice.Enum + (PatternFlowVlanPriority_Choice_Enum)(0), // 250: otg.PatternFlowVlanPriority.Choice.Enum + (PatternFlowVlanCfi_Choice_Enum)(0), // 251: otg.PatternFlowVlanCfi.Choice.Enum + (PatternFlowVlanId_Choice_Enum)(0), // 252: otg.PatternFlowVlanId.Choice.Enum + (PatternFlowVlanTpid_Choice_Enum)(0), // 253: otg.PatternFlowVlanTpid.Choice.Enum + (PatternFlowVxlanFlags_Choice_Enum)(0), // 254: otg.PatternFlowVxlanFlags.Choice.Enum + (PatternFlowVxlanReserved0_Choice_Enum)(0), // 255: otg.PatternFlowVxlanReserved0.Choice.Enum + (PatternFlowVxlanVni_Choice_Enum)(0), // 256: otg.PatternFlowVxlanVni.Choice.Enum + (PatternFlowVxlanReserved1_Choice_Enum)(0), // 257: otg.PatternFlowVxlanReserved1.Choice.Enum + (PatternFlowIpv4Version_Choice_Enum)(0), // 258: otg.PatternFlowIpv4Version.Choice.Enum + (PatternFlowIpv4HeaderLength_Choice_Enum)(0), // 259: otg.PatternFlowIpv4HeaderLength.Choice.Enum + (PatternFlowIpv4TotalLength_Choice_Enum)(0), // 260: otg.PatternFlowIpv4TotalLength.Choice.Enum + (PatternFlowIpv4Identification_Choice_Enum)(0), // 261: otg.PatternFlowIpv4Identification.Choice.Enum + (PatternFlowIpv4Reserved_Choice_Enum)(0), // 262: otg.PatternFlowIpv4Reserved.Choice.Enum + (PatternFlowIpv4DontFragment_Choice_Enum)(0), // 263: otg.PatternFlowIpv4DontFragment.Choice.Enum + (PatternFlowIpv4MoreFragments_Choice_Enum)(0), // 264: otg.PatternFlowIpv4MoreFragments.Choice.Enum + (PatternFlowIpv4FragmentOffset_Choice_Enum)(0), // 265: otg.PatternFlowIpv4FragmentOffset.Choice.Enum + (PatternFlowIpv4TimeToLive_Choice_Enum)(0), // 266: otg.PatternFlowIpv4TimeToLive.Choice.Enum + (PatternFlowIpv4Protocol_Choice_Enum)(0), // 267: otg.PatternFlowIpv4Protocol.Choice.Enum + (PatternFlowIpv4HeaderChecksum_Choice_Enum)(0), // 268: otg.PatternFlowIpv4HeaderChecksum.Choice.Enum + (PatternFlowIpv4HeaderChecksum_Generated_Enum)(0), // 269: otg.PatternFlowIpv4HeaderChecksum.Generated.Enum + (PatternFlowIpv4Src_Choice_Enum)(0), // 270: otg.PatternFlowIpv4Src.Choice.Enum + (PatternFlowIpv4Dst_Choice_Enum)(0), // 271: otg.PatternFlowIpv4Dst.Choice.Enum + (PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum)(0), // 272: otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag.Choice.Enum + (PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum)(0), // 273: otg.PatternFlowIpv4OptionsCustomTypeOptionClass.Choice.Enum + (PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum)(0), // 274: otg.PatternFlowIpv4OptionsCustomTypeOptionNumber.Choice.Enum + (PatternFlowIpv4PriorityRaw_Choice_Enum)(0), // 275: otg.PatternFlowIpv4PriorityRaw.Choice.Enum + (PatternFlowIpv4DscpPhb_Choice_Enum)(0), // 276: otg.PatternFlowIpv4DscpPhb.Choice.Enum + (PatternFlowIpv4DscpEcn_Choice_Enum)(0), // 277: otg.PatternFlowIpv4DscpEcn.Choice.Enum + (PatternFlowIpv4TosPrecedence_Choice_Enum)(0), // 278: otg.PatternFlowIpv4TosPrecedence.Choice.Enum + (PatternFlowIpv4TosDelay_Choice_Enum)(0), // 279: otg.PatternFlowIpv4TosDelay.Choice.Enum + (PatternFlowIpv4TosThroughput_Choice_Enum)(0), // 280: otg.PatternFlowIpv4TosThroughput.Choice.Enum + (PatternFlowIpv4TosReliability_Choice_Enum)(0), // 281: otg.PatternFlowIpv4TosReliability.Choice.Enum + (PatternFlowIpv4TosMonetary_Choice_Enum)(0), // 282: otg.PatternFlowIpv4TosMonetary.Choice.Enum + (PatternFlowIpv4TosUnused_Choice_Enum)(0), // 283: otg.PatternFlowIpv4TosUnused.Choice.Enum + (PatternFlowIpv6Version_Choice_Enum)(0), // 284: otg.PatternFlowIpv6Version.Choice.Enum + (PatternFlowIpv6TrafficClass_Choice_Enum)(0), // 285: otg.PatternFlowIpv6TrafficClass.Choice.Enum + (PatternFlowIpv6FlowLabel_Choice_Enum)(0), // 286: otg.PatternFlowIpv6FlowLabel.Choice.Enum + (PatternFlowIpv6PayloadLength_Choice_Enum)(0), // 287: otg.PatternFlowIpv6PayloadLength.Choice.Enum + (PatternFlowIpv6NextHeader_Choice_Enum)(0), // 288: otg.PatternFlowIpv6NextHeader.Choice.Enum + (PatternFlowIpv6HopLimit_Choice_Enum)(0), // 289: otg.PatternFlowIpv6HopLimit.Choice.Enum + (PatternFlowIpv6Src_Choice_Enum)(0), // 290: otg.PatternFlowIpv6Src.Choice.Enum + (PatternFlowIpv6Dst_Choice_Enum)(0), // 291: otg.PatternFlowIpv6Dst.Choice.Enum + (PatternFlowPfcPauseDst_Choice_Enum)(0), // 292: otg.PatternFlowPfcPauseDst.Choice.Enum + (PatternFlowPfcPauseSrc_Choice_Enum)(0), // 293: otg.PatternFlowPfcPauseSrc.Choice.Enum + (PatternFlowPfcPauseEtherType_Choice_Enum)(0), // 294: otg.PatternFlowPfcPauseEtherType.Choice.Enum + (PatternFlowPfcPauseControlOpCode_Choice_Enum)(0), // 295: otg.PatternFlowPfcPauseControlOpCode.Choice.Enum + (PatternFlowPfcPauseClassEnableVector_Choice_Enum)(0), // 296: otg.PatternFlowPfcPauseClassEnableVector.Choice.Enum + (PatternFlowPfcPausePauseClass0_Choice_Enum)(0), // 297: otg.PatternFlowPfcPausePauseClass0.Choice.Enum + (PatternFlowPfcPausePauseClass1_Choice_Enum)(0), // 298: otg.PatternFlowPfcPausePauseClass1.Choice.Enum + (PatternFlowPfcPausePauseClass2_Choice_Enum)(0), // 299: otg.PatternFlowPfcPausePauseClass2.Choice.Enum + (PatternFlowPfcPausePauseClass3_Choice_Enum)(0), // 300: otg.PatternFlowPfcPausePauseClass3.Choice.Enum + (PatternFlowPfcPausePauseClass4_Choice_Enum)(0), // 301: otg.PatternFlowPfcPausePauseClass4.Choice.Enum + (PatternFlowPfcPausePauseClass5_Choice_Enum)(0), // 302: otg.PatternFlowPfcPausePauseClass5.Choice.Enum + (PatternFlowPfcPausePauseClass6_Choice_Enum)(0), // 303: otg.PatternFlowPfcPausePauseClass6.Choice.Enum + (PatternFlowPfcPausePauseClass7_Choice_Enum)(0), // 304: otg.PatternFlowPfcPausePauseClass7.Choice.Enum + (PatternFlowEthernetPauseDst_Choice_Enum)(0), // 305: otg.PatternFlowEthernetPauseDst.Choice.Enum + (PatternFlowEthernetPauseSrc_Choice_Enum)(0), // 306: otg.PatternFlowEthernetPauseSrc.Choice.Enum + (PatternFlowEthernetPauseEtherType_Choice_Enum)(0), // 307: otg.PatternFlowEthernetPauseEtherType.Choice.Enum + (PatternFlowEthernetPauseControlOpCode_Choice_Enum)(0), // 308: otg.PatternFlowEthernetPauseControlOpCode.Choice.Enum + (PatternFlowEthernetPauseTime_Choice_Enum)(0), // 309: otg.PatternFlowEthernetPauseTime.Choice.Enum + (PatternFlowTcpSrcPort_Choice_Enum)(0), // 310: otg.PatternFlowTcpSrcPort.Choice.Enum + (PatternFlowTcpDstPort_Choice_Enum)(0), // 311: otg.PatternFlowTcpDstPort.Choice.Enum + (PatternFlowTcpSeqNum_Choice_Enum)(0), // 312: otg.PatternFlowTcpSeqNum.Choice.Enum + (PatternFlowTcpAckNum_Choice_Enum)(0), // 313: otg.PatternFlowTcpAckNum.Choice.Enum + (PatternFlowTcpDataOffset_Choice_Enum)(0), // 314: otg.PatternFlowTcpDataOffset.Choice.Enum + (PatternFlowTcpEcnNs_Choice_Enum)(0), // 315: otg.PatternFlowTcpEcnNs.Choice.Enum + (PatternFlowTcpEcnCwr_Choice_Enum)(0), // 316: otg.PatternFlowTcpEcnCwr.Choice.Enum + (PatternFlowTcpEcnEcho_Choice_Enum)(0), // 317: otg.PatternFlowTcpEcnEcho.Choice.Enum + (PatternFlowTcpCtlUrg_Choice_Enum)(0), // 318: otg.PatternFlowTcpCtlUrg.Choice.Enum + (PatternFlowTcpCtlAck_Choice_Enum)(0), // 319: otg.PatternFlowTcpCtlAck.Choice.Enum + (PatternFlowTcpCtlPsh_Choice_Enum)(0), // 320: otg.PatternFlowTcpCtlPsh.Choice.Enum + (PatternFlowTcpCtlRst_Choice_Enum)(0), // 321: otg.PatternFlowTcpCtlRst.Choice.Enum + (PatternFlowTcpCtlSyn_Choice_Enum)(0), // 322: otg.PatternFlowTcpCtlSyn.Choice.Enum + (PatternFlowTcpCtlFin_Choice_Enum)(0), // 323: otg.PatternFlowTcpCtlFin.Choice.Enum + (PatternFlowTcpWindow_Choice_Enum)(0), // 324: otg.PatternFlowTcpWindow.Choice.Enum + (PatternFlowTcpChecksum_Choice_Enum)(0), // 325: otg.PatternFlowTcpChecksum.Choice.Enum + (PatternFlowTcpChecksum_Generated_Enum)(0), // 326: otg.PatternFlowTcpChecksum.Generated.Enum + (PatternFlowUdpSrcPort_Choice_Enum)(0), // 327: otg.PatternFlowUdpSrcPort.Choice.Enum + (PatternFlowUdpDstPort_Choice_Enum)(0), // 328: otg.PatternFlowUdpDstPort.Choice.Enum + (PatternFlowUdpLength_Choice_Enum)(0), // 329: otg.PatternFlowUdpLength.Choice.Enum + (PatternFlowUdpChecksum_Choice_Enum)(0), // 330: otg.PatternFlowUdpChecksum.Choice.Enum + (PatternFlowUdpChecksum_Generated_Enum)(0), // 331: otg.PatternFlowUdpChecksum.Generated.Enum + (PatternFlowGreChecksumPresent_Choice_Enum)(0), // 332: otg.PatternFlowGreChecksumPresent.Choice.Enum + (PatternFlowGreReserved0_Choice_Enum)(0), // 333: otg.PatternFlowGreReserved0.Choice.Enum + (PatternFlowGreVersion_Choice_Enum)(0), // 334: otg.PatternFlowGreVersion.Choice.Enum + (PatternFlowGreProtocol_Choice_Enum)(0), // 335: otg.PatternFlowGreProtocol.Choice.Enum + (PatternFlowGreChecksum_Choice_Enum)(0), // 336: otg.PatternFlowGreChecksum.Choice.Enum + (PatternFlowGreChecksum_Generated_Enum)(0), // 337: otg.PatternFlowGreChecksum.Generated.Enum + (PatternFlowGreReserved1_Choice_Enum)(0), // 338: otg.PatternFlowGreReserved1.Choice.Enum + (PatternFlowGtpv1Version_Choice_Enum)(0), // 339: otg.PatternFlowGtpv1Version.Choice.Enum + (PatternFlowGtpv1ProtocolType_Choice_Enum)(0), // 340: otg.PatternFlowGtpv1ProtocolType.Choice.Enum + (PatternFlowGtpv1Reserved_Choice_Enum)(0), // 341: otg.PatternFlowGtpv1Reserved.Choice.Enum + (PatternFlowGtpv1EFlag_Choice_Enum)(0), // 342: otg.PatternFlowGtpv1EFlag.Choice.Enum + (PatternFlowGtpv1SFlag_Choice_Enum)(0), // 343: otg.PatternFlowGtpv1SFlag.Choice.Enum + (PatternFlowGtpv1PnFlag_Choice_Enum)(0), // 344: otg.PatternFlowGtpv1PnFlag.Choice.Enum + (PatternFlowGtpv1MessageType_Choice_Enum)(0), // 345: otg.PatternFlowGtpv1MessageType.Choice.Enum + (PatternFlowGtpv1MessageLength_Choice_Enum)(0), // 346: otg.PatternFlowGtpv1MessageLength.Choice.Enum + (PatternFlowGtpv1Teid_Choice_Enum)(0), // 347: otg.PatternFlowGtpv1Teid.Choice.Enum + (PatternFlowGtpv1SquenceNumber_Choice_Enum)(0), // 348: otg.PatternFlowGtpv1SquenceNumber.Choice.Enum + (PatternFlowGtpv1NPduNumber_Choice_Enum)(0), // 349: otg.PatternFlowGtpv1NPduNumber.Choice.Enum + (PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum)(0), // 350: otg.PatternFlowGtpv1NextExtensionHeaderType.Choice.Enum + (PatternFlowGtpExtensionExtensionLength_Choice_Enum)(0), // 351: otg.PatternFlowGtpExtensionExtensionLength.Choice.Enum + (PatternFlowGtpExtensionContents_Choice_Enum)(0), // 352: otg.PatternFlowGtpExtensionContents.Choice.Enum + (PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum)(0), // 353: otg.PatternFlowGtpExtensionNextExtensionHeader.Choice.Enum + (PatternFlowGtpv2Version_Choice_Enum)(0), // 354: otg.PatternFlowGtpv2Version.Choice.Enum + (PatternFlowGtpv2PiggybackingFlag_Choice_Enum)(0), // 355: otg.PatternFlowGtpv2PiggybackingFlag.Choice.Enum + (PatternFlowGtpv2TeidFlag_Choice_Enum)(0), // 356: otg.PatternFlowGtpv2TeidFlag.Choice.Enum + (PatternFlowGtpv2Spare1_Choice_Enum)(0), // 357: otg.PatternFlowGtpv2Spare1.Choice.Enum + (PatternFlowGtpv2MessageType_Choice_Enum)(0), // 358: otg.PatternFlowGtpv2MessageType.Choice.Enum + (PatternFlowGtpv2MessageLength_Choice_Enum)(0), // 359: otg.PatternFlowGtpv2MessageLength.Choice.Enum + (PatternFlowGtpv2Teid_Choice_Enum)(0), // 360: otg.PatternFlowGtpv2Teid.Choice.Enum + (PatternFlowGtpv2SequenceNumber_Choice_Enum)(0), // 361: otg.PatternFlowGtpv2SequenceNumber.Choice.Enum + (PatternFlowGtpv2Spare2_Choice_Enum)(0), // 362: otg.PatternFlowGtpv2Spare2.Choice.Enum + (PatternFlowArpHardwareType_Choice_Enum)(0), // 363: otg.PatternFlowArpHardwareType.Choice.Enum + (PatternFlowArpProtocolType_Choice_Enum)(0), // 364: otg.PatternFlowArpProtocolType.Choice.Enum + (PatternFlowArpHardwareLength_Choice_Enum)(0), // 365: otg.PatternFlowArpHardwareLength.Choice.Enum + (PatternFlowArpProtocolLength_Choice_Enum)(0), // 366: otg.PatternFlowArpProtocolLength.Choice.Enum + (PatternFlowArpOperation_Choice_Enum)(0), // 367: otg.PatternFlowArpOperation.Choice.Enum + (PatternFlowArpSenderHardwareAddr_Choice_Enum)(0), // 368: otg.PatternFlowArpSenderHardwareAddr.Choice.Enum + (PatternFlowArpSenderProtocolAddr_Choice_Enum)(0), // 369: otg.PatternFlowArpSenderProtocolAddr.Choice.Enum + (PatternFlowArpTargetHardwareAddr_Choice_Enum)(0), // 370: otg.PatternFlowArpTargetHardwareAddr.Choice.Enum + (PatternFlowArpTargetProtocolAddr_Choice_Enum)(0), // 371: otg.PatternFlowArpTargetProtocolAddr.Choice.Enum + (PatternFlowIcmpEchoType_Choice_Enum)(0), // 372: otg.PatternFlowIcmpEchoType.Choice.Enum + (PatternFlowIcmpEchoCode_Choice_Enum)(0), // 373: otg.PatternFlowIcmpEchoCode.Choice.Enum + (PatternFlowIcmpEchoChecksum_Choice_Enum)(0), // 374: otg.PatternFlowIcmpEchoChecksum.Choice.Enum + (PatternFlowIcmpEchoChecksum_Generated_Enum)(0), // 375: otg.PatternFlowIcmpEchoChecksum.Generated.Enum + (PatternFlowIcmpEchoIdentifier_Choice_Enum)(0), // 376: otg.PatternFlowIcmpEchoIdentifier.Choice.Enum + (PatternFlowIcmpEchoSequenceNumber_Choice_Enum)(0), // 377: otg.PatternFlowIcmpEchoSequenceNumber.Choice.Enum + (PatternFlowIcmpCommonChecksum_Choice_Enum)(0), // 378: otg.PatternFlowIcmpCommonChecksum.Choice.Enum + (PatternFlowIcmpCommonChecksum_Generated_Enum)(0), // 379: otg.PatternFlowIcmpCommonChecksum.Generated.Enum + (PatternFlowIcmpNextFieldsIdentifier_Choice_Enum)(0), // 380: otg.PatternFlowIcmpNextFieldsIdentifier.Choice.Enum + (PatternFlowIcmpNextFieldsSequenceNumber_Choice_Enum)(0), // 381: otg.PatternFlowIcmpNextFieldsSequenceNumber.Choice.Enum + (PatternFlowIcmpv6EchoType_Choice_Enum)(0), // 382: otg.PatternFlowIcmpv6EchoType.Choice.Enum + (PatternFlowIcmpv6EchoCode_Choice_Enum)(0), // 383: otg.PatternFlowIcmpv6EchoCode.Choice.Enum + (PatternFlowIcmpv6EchoIdentifier_Choice_Enum)(0), // 384: otg.PatternFlowIcmpv6EchoIdentifier.Choice.Enum + (PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum)(0), // 385: otg.PatternFlowIcmpv6EchoSequenceNumber.Choice.Enum + (PatternFlowIcmpv6EchoChecksum_Choice_Enum)(0), // 386: otg.PatternFlowIcmpv6EchoChecksum.Choice.Enum + (PatternFlowIcmpv6EchoChecksum_Generated_Enum)(0), // 387: otg.PatternFlowIcmpv6EchoChecksum.Generated.Enum + (PatternFlowIcmpv6CommonChecksum_Choice_Enum)(0), // 388: otg.PatternFlowIcmpv6CommonChecksum.Choice.Enum + (PatternFlowIcmpv6CommonChecksum_Generated_Enum)(0), // 389: otg.PatternFlowIcmpv6CommonChecksum.Generated.Enum + (PatternFlowPppAddress_Choice_Enum)(0), // 390: otg.PatternFlowPppAddress.Choice.Enum + (PatternFlowPppControl_Choice_Enum)(0), // 391: otg.PatternFlowPppControl.Choice.Enum + (PatternFlowPppProtocolType_Choice_Enum)(0), // 392: otg.PatternFlowPppProtocolType.Choice.Enum + (PatternFlowIgmpv1Version_Choice_Enum)(0), // 393: otg.PatternFlowIgmpv1Version.Choice.Enum + (PatternFlowIgmpv1Type_Choice_Enum)(0), // 394: otg.PatternFlowIgmpv1Type.Choice.Enum + (PatternFlowIgmpv1Unused_Choice_Enum)(0), // 395: otg.PatternFlowIgmpv1Unused.Choice.Enum + (PatternFlowIgmpv1Checksum_Choice_Enum)(0), // 396: otg.PatternFlowIgmpv1Checksum.Choice.Enum + (PatternFlowIgmpv1Checksum_Generated_Enum)(0), // 397: otg.PatternFlowIgmpv1Checksum.Generated.Enum + (PatternFlowIgmpv1GroupAddress_Choice_Enum)(0), // 398: otg.PatternFlowIgmpv1GroupAddress.Choice.Enum + (PatternFlowMplsLabel_Choice_Enum)(0), // 399: otg.PatternFlowMplsLabel.Choice.Enum + (PatternFlowMplsTrafficClass_Choice_Enum)(0), // 400: otg.PatternFlowMplsTrafficClass.Choice.Enum + (PatternFlowMplsBottomOfStack_Choice_Enum)(0), // 401: otg.PatternFlowMplsBottomOfStack.Choice.Enum + (PatternFlowMplsTimeToLive_Choice_Enum)(0), // 402: otg.PatternFlowMplsTimeToLive.Choice.Enum + (PatternFlowSnmpv2CVersion_Choice_Enum)(0), // 403: otg.PatternFlowSnmpv2cVersion.Choice.Enum + (PatternFlowSnmpv2CPDURequestId_Choice_Enum)(0), // 404: otg.PatternFlowSnmpv2cPDURequestId.Choice.Enum + (PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum)(0), // 405: otg.PatternFlowSnmpv2cPDUErrorIndex.Choice.Enum + (PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum)(0), // 406: otg.PatternFlowSnmpv2cBulkPDURequestId.Choice.Enum + (PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum)(0), // 407: otg.PatternFlowSnmpv2cBulkPDUNonRepeaters.Choice.Enum + (PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum)(0), // 408: otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions.Choice.Enum + (PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum)(0), // 409: otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue.Choice.Enum + (PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum)(0), // 410: otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue.Choice.Enum + (PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum)(0), // 411: otg.PatternFlowSnmpv2cVariableBindingValueCounterValue.Choice.Enum + (PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum)(0), // 412: otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue.Choice.Enum + (PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum)(0), // 413: otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue.Choice.Enum + (PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum)(0), // 414: otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue.Choice.Enum + (PatternFlowSnmpv2CCommonRequestId_Choice_Enum)(0), // 415: otg.PatternFlowSnmpv2cCommonRequestId.Choice.Enum + (PatternFlowRsvpRsvpChecksum_Choice_Enum)(0), // 416: otg.PatternFlowRsvpRsvpChecksum.Choice.Enum + (PatternFlowRsvpRsvpChecksum_Generated_Enum)(0), // 417: otg.PatternFlowRsvpRsvpChecksum.Generated.Enum + (PatternFlowRsvpTimeToLive_Choice_Enum)(0), // 418: otg.PatternFlowRsvpTimeToLive.Choice.Enum + (PatternFlowRsvpReserved_Choice_Enum)(0), // 419: otg.PatternFlowRsvpReserved.Choice.Enum + (PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum)(0), // 420: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.Choice.Enum + (PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum)(0), // 421: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.Choice.Enum + (PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum)(0), // 422: otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.Choice.Enum + (PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum)(0), // 423: otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger.Choice.Enum + (PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum)(0), // 424: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.Choice.Enum + (PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum)(0), // 425: otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.Choice.Enum + (PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum)(0), // 426: otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle.Choice.Enum + (PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum)(0), // 427: otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR.Choice.Enum + (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum)(0), // 428: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.Choice.Enum + (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum)(0), // 429: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.Choice.Enum + (PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum)(0), // 430: otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.Choice.Enum + (PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum)(0), // 431: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.Choice.Enum + (PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum)(0), // 432: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid.Choice.Enum + (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum)(0), // 433: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.Choice.Enum + (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum)(0), // 434: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.Choice.Enum + (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum)(0), // 435: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.Choice.Enum + (PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum)(0), // 436: otg.PatternFlowRSVPPathSenderTspecIntServVersion.Choice.Enum + (PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum)(0), // 437: otg.PatternFlowRSVPPathSenderTspecIntServReserved1.Choice.Enum + (PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum)(0), // 438: otg.PatternFlowRSVPPathSenderTspecIntServOverallLength.Choice.Enum + (PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum)(0), // 439: otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader.Choice.Enum + (PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum)(0), // 440: otg.PatternFlowRSVPPathSenderTspecIntServZeroBit.Choice.Enum + (PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum)(0), // 441: otg.PatternFlowRSVPPathSenderTspecIntServReserved2.Choice.Enum + (PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum)(0), // 442: otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.Choice.Enum + (PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum)(0), // 443: otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.Choice.Enum + (PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum)(0), // 444: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag.Choice.Enum + (PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum)(0), // 445: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length.Choice.Enum + (PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum)(0), // 446: otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.Choice.Enum + (PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum)(0), // 447: otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.Choice.Enum + (PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum)(0), // 448: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.Choice.Enum + (PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum)(0), // 449: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.Choice.Enum + (PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum)(0), // 450: otg.PatternFlowRSVPPathRecordRouteType1LabelFlags.Choice.Enum + (PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum)(0), // 451: otg.PatternFlowRSVPPathRecordRouteType1LabelCType.Choice.Enum + (PatternFlowRSVPPathObjectsCustomType_Choice_Enum)(0), // 452: otg.PatternFlowRSVPPathObjectsCustomType.Choice.Enum + (*Config)(nil), // 453: otg.Config + (*ConfigOptions)(nil), // 454: otg.ConfigOptions + (*Port)(nil), // 455: otg.Port + (*PortOptions)(nil), // 456: otg.PortOptions + (*Lag)(nil), // 457: otg.Lag + (*LagPort)(nil), // 458: otg.LagPort + (*LagProtocol)(nil), // 459: otg.LagProtocol + (*LagProtocolStatic)(nil), // 460: otg.LagProtocolStatic + (*LagProtocolLacp)(nil), // 461: otg.LagProtocolLacp + (*LagPortLacp)(nil), // 462: otg.LagPortLacp + (*DeviceEthernetBase)(nil), // 463: otg.DeviceEthernetBase + (*DeviceEthernet)(nil), // 464: otg.DeviceEthernet + (*EthernetConnection)(nil), // 465: otg.EthernetConnection + (*EthernetSimulatedLink)(nil), // 466: otg.EthernetSimulatedLink + (*DeviceVlan)(nil), // 467: otg.DeviceVlan + (*DeviceIpv4)(nil), // 468: otg.DeviceIpv4 + (*DeviceIpv4Loopback)(nil), // 469: otg.DeviceIpv4Loopback + (*DeviceIpv4GatewayMAC)(nil), // 470: otg.DeviceIpv4GatewayMAC + (*DeviceIpv6)(nil), // 471: otg.DeviceIpv6 + (*DeviceIpv6Loopback)(nil), // 472: otg.DeviceIpv6Loopback + (*DeviceIpv6GatewayMAC)(nil), // 473: otg.DeviceIpv6GatewayMAC + (*DeviceDhcpv4Client)(nil), // 474: otg.DeviceDhcpv4client + (*Dhcpv4ClientParams)(nil), // 475: otg.Dhcpv4ClientParams + (*DeviceDhcpv6Client)(nil), // 476: otg.DeviceDhcpv6client + (*DeviceDhcpv6ClientOptionsRequest)(nil), // 477: otg.DeviceDhcpv6ClientOptionsRequest + (*DeviceDhcpv6ClientOptions)(nil), // 478: otg.DeviceDhcpv6ClientOptions + (*DeviceDhcpv6ClientIaType)(nil), // 479: otg.DeviceDhcpv6clientIaType + (*DeviceDhcpv6ClientIaTimeValue)(nil), // 480: otg.DeviceDhcpv6clientIaTimeValue + (*DeviceDhcpv6ClientDuidType)(nil), // 481: otg.DeviceDhcpv6clientDuidType + (*DeviceDhcpv6ClientDuidValue)(nil), // 482: otg.DeviceDhcpv6clientDuidValue + (*DeviceDhcpv6ClientNoDuid)(nil), // 483: otg.DeviceDhcpv6clientNoDuid + (*Dhcpv6ClientOptionsServerIdentifier)(nil), // 484: otg.Dhcpv6ClientOptionsServerIdentifier + (*Dhcpv6ClientOptionsDuidLlt)(nil), // 485: otg.Dhcpv6ClientOptionsDuidLlt + (*Dhcpv6ClientOptionsDuidEn)(nil), // 486: otg.Dhcpv6ClientOptionsDuidEn + (*Dhcpv6ClientOptionsDuidLl)(nil), // 487: otg.Dhcpv6ClientOptionsDuidLl + (*Dhcpv6ClientOptionsDuidUuid)(nil), // 488: otg.Dhcpv6ClientOptionsDuidUuid + (*Dhcpv6ClientOptionsDuidUuidVersion)(nil), // 489: otg.Dhcpv6ClientOptionsDuidUuidVersion + (*Dhcpv6ClientOptionsDuidUuidVariant)(nil), // 490: otg.Dhcpv6ClientOptionsDuidUuidVariant + (*Dhcpv6ClientOptionsLinkLayerAddress)(nil), // 491: otg.Dhcpv6ClientOptionsLinkLayerAddress + (*Dhcpv6ClientOptionsOptionsRequest)(nil), // 492: otg.Dhcpv6ClientOptionsOptionsRequest + (*Dhcpv6ClientOptionsCustom)(nil), // 493: otg.Dhcpv6ClientOptionsCustom + (*Dhcpv6ClientOptionsVendorClass)(nil), // 494: otg.Dhcpv6ClientOptionsVendorClass + (*Dhcpv6ClientOptionsIncludedMessages)(nil), // 495: otg.Dhcpv6ClientOptionsIncludedMessages + (*Dhcpv6ClientOptionsMessageType)(nil), // 496: otg.Dhcpv6ClientOptionsMessageType + (*Dhcpv6ClientOptionsVendorInfo)(nil), // 497: otg.Dhcpv6ClientOptionsVendorInfo + (*Dhcpv6ServerOptionsVendorInfo)(nil), // 498: otg.Dhcpv6ServerOptionsVendorInfo + (*Dhcpv6ServerOptionsIncludedMessages)(nil), // 499: otg.Dhcpv6ServerOptionsIncludedMessages + (*Dhcpv6ServerOptionsMessageType)(nil), // 500: otg.Dhcpv6ServerOptionsMessageType + (*Dhcpv6OptionsVendorSpecificOptions)(nil), // 501: otg.Dhcpv6OptionsVendorSpecificOptions + (*Dhcpv6ClientOptionsFqdn)(nil), // 502: otg.Dhcpv6ClientOptionsFqdn + (*Dhcpv6ServerOptionsBootfileUrl)(nil), // 503: otg.Dhcpv6ServerOptionsBootfileUrl + (*Dhcpv6ServerOptionsBootFileParams)(nil), // 504: otg.Dhcpv6ServerOptionsBootFileParams + (*Layer1)(nil), // 505: otg.Layer1 + (*Layer1AutoNegotiation)(nil), // 506: otg.Layer1AutoNegotiation + (*Layer1FlowControl)(nil), // 507: otg.Layer1FlowControl + (*Layer1Ieee8023X)(nil), // 508: otg.Layer1Ieee8023x + (*Layer1Ieee8021Qbb)(nil), // 509: otg.Layer1Ieee8021qbb + (*Capture)(nil), // 510: otg.Capture + (*CaptureFilter)(nil), // 511: otg.CaptureFilter + (*CaptureCustom)(nil), // 512: otg.CaptureCustom + (*CaptureField)(nil), // 513: otg.CaptureField + (*CaptureEthernet)(nil), // 514: otg.CaptureEthernet + (*CaptureVlan)(nil), // 515: otg.CaptureVlan + (*CaptureIpv4)(nil), // 516: otg.CaptureIpv4 + (*CaptureIpv6)(nil), // 517: otg.CaptureIpv6 + (*Device)(nil), // 518: otg.Device + (*ProtocolOptions)(nil), // 519: otg.ProtocolOptions + (*DeviceIsisRouter)(nil), // 520: otg.DeviceIsisRouter + (*DeviceIsisMultiInstance)(nil), // 521: otg.DeviceIsisMultiInstance + (*IsisInterface)(nil), // 522: otg.IsisInterface + (*IsisInterfaceLevel)(nil), // 523: otg.IsisInterfaceLevel + (*IsisMT)(nil), // 524: otg.IsisMT + (*LinkStateTE)(nil), // 525: otg.LinkStateTE + (*LinkStatepriorityBandwidths)(nil), // 526: otg.LinkStatepriorityBandwidths + (*IsisInterfaceAuthentication)(nil), // 527: otg.IsisInterfaceAuthentication + (*IsisInterfaceAdvanced)(nil), // 528: otg.IsisInterfaceAdvanced + (*IsisInterfaceLinkProtection)(nil), // 529: otg.IsisInterfaceLinkProtection + (*IsisBasic)(nil), // 530: otg.IsisBasic + (*IsisAdvanced)(nil), // 531: otg.IsisAdvanced + (*IsisAuthentication)(nil), // 532: otg.IsisAuthentication + (*IsisAuthenticationBase)(nil), // 533: otg.IsisAuthenticationBase + (*IsisV4RouteRange)(nil), // 534: otg.IsisV4RouteRange + (*V4RouteAddress)(nil), // 535: otg.V4RouteAddress + (*V6RouteAddress)(nil), // 536: otg.V6RouteAddress + (*MACRouteAddress)(nil), // 537: otg.MACRouteAddress + (*IsisV6RouteRange)(nil), // 538: otg.IsisV6RouteRange + (*DeviceBgpRouter)(nil), // 539: otg.DeviceBgpRouter + (*DeviceBgpMessageHeaderError)(nil), // 540: otg.DeviceBgpMessageHeaderError + (*DeviceBgpOpenMessageError)(nil), // 541: otg.DeviceBgpOpenMessageError + (*DeviceBgpUpdateMessageError)(nil), // 542: otg.DeviceBgpUpdateMessageError + (*DeviceBgpHoldTimerExpired)(nil), // 543: otg.DeviceBgpHoldTimerExpired + (*DeviceBgpFiniteStateMachineError)(nil), // 544: otg.DeviceBgpFiniteStateMachineError + (*DeviceBgpCeaseError)(nil), // 545: otg.DeviceBgpCeaseError + (*DeviceBgpCustomError)(nil), // 546: otg.DeviceBgpCustomError + (*BgpV4Peer)(nil), // 547: otg.BgpV4Peer + (*BgpV4Interface)(nil), // 548: otg.BgpV4Interface + (*BgpV4EthernetSegment)(nil), // 549: otg.BgpV4EthernetSegment + (*BgpEthernetSegmentDfElection)(nil), // 550: otg.BgpEthernetSegmentDfElection + (*BgpRouteAdvanced)(nil), // 551: otg.BgpRouteAdvanced + (*BgpCommunity)(nil), // 552: otg.BgpCommunity + (*BgpExtCommunity)(nil), // 553: otg.BgpExtCommunity + (*BgpAsPath)(nil), // 554: otg.BgpAsPath + (*BgpAsPathSegment)(nil), // 555: otg.BgpAsPathSegment + (*BgpV4EvpnEvis)(nil), // 556: otg.BgpV4EvpnEvis + (*BgpV4EviVxlan)(nil), // 557: otg.BgpV4EviVxlan + (*BgpV4EviVxlanBroadcastDomain)(nil), // 558: otg.BgpV4EviVxlanBroadcastDomain + (*BgpCMacIpRange)(nil), // 559: otg.BgpCMacIpRange + (*BgpRouteDistinguisher)(nil), // 560: otg.BgpRouteDistinguisher + (*BgpRouteTarget)(nil), // 561: otg.BgpRouteTarget + (*BgpAdvanced)(nil), // 562: otg.BgpAdvanced + (*BgpCapability)(nil), // 563: otg.BgpCapability + (*BgpLearnedInformationFilter)(nil), // 564: otg.BgpLearnedInformationFilter + (*BgpV4RouteRange)(nil), // 565: otg.BgpV4RouteRange + (*BgpAddPath)(nil), // 566: otg.BgpAddPath + (*BgpExtendedCommunity)(nil), // 567: otg.BgpExtendedCommunity + (*BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget)(nil), // 568: otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + (*BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin)(nil), // 569: otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + (*BgpExtendedCommunityTransitive2OctetAsType)(nil), // 570: otg.BgpExtendedCommunityTransitive2OctetAsType + (*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin)(nil), // 571: otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + (*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget)(nil), // 572: otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + (*BgpExtendedCommunityTransitiveIpv4AddressType)(nil), // 573: otg.BgpExtendedCommunityTransitiveIpv4AddressType + (*BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget)(nil), // 574: otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + (*BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin)(nil), // 575: otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + (*BgpExtendedCommunityTransitive4OctetAsType)(nil), // 576: otg.BgpExtendedCommunityTransitive4OctetAsType + (*BgpExtendedCommunityTransitiveOpaqueTypeColor)(nil), // 577: otg.BgpExtendedCommunityTransitiveOpaqueTypeColor + (*BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation)(nil), // 578: otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + (*BgpExtendedCommunityTransitiveOpaqueType)(nil), // 579: otg.BgpExtendedCommunityTransitiveOpaqueType + (*BgpExtendedCommunityTransitiveEvpnTypeRouterMac)(nil), // 580: otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac + (*BgpExtendedCommunityTransitiveEvpnType)(nil), // 581: otg.BgpExtendedCommunityTransitiveEvpnType + (*BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth)(nil), // 582: otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + (*BgpExtendedCommunityNonTransitive2OctetAsType)(nil), // 583: otg.BgpExtendedCommunityNonTransitive2OctetAsType + (*BgpExtendedCommunityCustomType)(nil), // 584: otg.BgpExtendedCommunityCustomType + (*BgpV6RouteRange)(nil), // 585: otg.BgpV6RouteRange + (*BgpSrteV4Policy)(nil), // 586: otg.BgpSrteV4Policy + (*BgpSrteV4TunnelTlv)(nil), // 587: otg.BgpSrteV4TunnelTlv + (*BgpSrteRemoteEndpointSubTlv)(nil), // 588: otg.BgpSrteRemoteEndpointSubTlv + (*BgpSrteColorSubTlv)(nil), // 589: otg.BgpSrteColorSubTlv + (*BgpSrteBindingSubTlv)(nil), // 590: otg.BgpSrteBindingSubTlv + (*BgpSrtePreferenceSubTlv)(nil), // 591: otg.BgpSrtePreferenceSubTlv + (*BgpSrtePolicyPrioritySubTlv)(nil), // 592: otg.BgpSrtePolicyPrioritySubTlv + (*BgpSrtePolicyNameSubTlv)(nil), // 593: otg.BgpSrtePolicyNameSubTlv + (*BgpSrteExplicitNullLabelPolicySubTlv)(nil), // 594: otg.BgpSrteExplicitNullLabelPolicySubTlv + (*BgpSrteSegmentList)(nil), // 595: otg.BgpSrteSegmentList + (*BgpSrteSegment)(nil), // 596: otg.BgpSrteSegment + (*BgpSrteSrMplsSid)(nil), // 597: otg.BgpSrteSrMplsSid + (*BgpSrteSRv6SIDEndpointBehaviorAndStructure)(nil), // 598: otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure + (*BgpSrteSegmentATypeSubTlv)(nil), // 599: otg.BgpSrteSegmentATypeSubTlv + (*BgpSrteSegmentBTypeSubTlv)(nil), // 600: otg.BgpSrteSegmentBTypeSubTlv + (*BgpSrteSegmentCTypeSubTlv)(nil), // 601: otg.BgpSrteSegmentCTypeSubTlv + (*BgpSrteSegmentDTypeSubTlv)(nil), // 602: otg.BgpSrteSegmentDTypeSubTlv + (*BgpSrteSegmentETypeSubTlv)(nil), // 603: otg.BgpSrteSegmentETypeSubTlv + (*BgpSrteSegmentFTypeSubTlv)(nil), // 604: otg.BgpSrteSegmentFTypeSubTlv + (*BgpSrteSegmentGTypeSubTlv)(nil), // 605: otg.BgpSrteSegmentGTypeSubTlv + (*BgpSrteSegmentHTypeSubTlv)(nil), // 606: otg.BgpSrteSegmentHTypeSubTlv + (*BgpSrteSegmentITypeSubTlv)(nil), // 607: otg.BgpSrteSegmentITypeSubTlv + (*BgpSrteSegmentJTypeSubTlv)(nil), // 608: otg.BgpSrteSegmentJTypeSubTlv + (*BgpSrteSegmentKTypeSubTlv)(nil), // 609: otg.BgpSrteSegmentKTypeSubTlv + (*BgpSrteV6Policy)(nil), // 610: otg.BgpSrteV6Policy + (*BgpSrteV6TunnelTlv)(nil), // 611: otg.BgpSrteV6TunnelTlv + (*BgpGracefulRestart)(nil), // 612: otg.BgpGracefulRestart + (*BgpUpdateReplay)(nil), // 613: otg.BgpUpdateReplay + (*BgpRawBytes)(nil), // 614: otg.BgpRawBytes + (*BgpOneUpdateReplay)(nil), // 615: otg.BgpOneUpdateReplay + (*BgpStructuredPdus)(nil), // 616: otg.BgpStructuredPdus + (*BgpOneStructuredUpdateReplay)(nil), // 617: otg.BgpOneStructuredUpdateReplay + (*BgpOneTraditionalNlriPrefix)(nil), // 618: otg.BgpOneTraditionalNlriPrefix + (*BgpOneIpv4NLRIPrefix)(nil), // 619: otg.BgpOneIpv4NLRIPrefix + (*BgpOneIpv6NLRIPrefix)(nil), // 620: otg.BgpOneIpv6NLRIPrefix + (*BgpNLRIPrefixPathId)(nil), // 621: otg.BgpNLRIPrefixPathId + (*BgpIpv4SrPolicyNLRIPrefix)(nil), // 622: otg.BgpIpv4SrPolicyNLRIPrefix + (*BgpIpv6SrPolicyNLRIPrefix)(nil), // 623: otg.BgpIpv6SrPolicyNLRIPrefix + (*BgpAttributes)(nil), // 624: otg.BgpAttributes + (*BgpAttributesOtherAttribute)(nil), // 625: otg.BgpAttributesOtherAttribute + (*BgpAttributesAsPath)(nil), // 626: otg.BgpAttributesAsPath + (*BgpAttributesAsPathFourByteAsPath)(nil), // 627: otg.BgpAttributesAsPathFourByteAsPath + (*BgpAttributesFourByteAsPathSegment)(nil), // 628: otg.BgpAttributesFourByteAsPathSegment + (*BgpAttributesAsPathTwoByteAsPath)(nil), // 629: otg.BgpAttributesAsPathTwoByteAsPath + (*BgpAttributesTwoByteAsPathSegment)(nil), // 630: otg.BgpAttributesTwoByteAsPathSegment + (*BgpAttributesAs4Path)(nil), // 631: otg.BgpAttributesAs4Path + (*BgpAttributesAggregator)(nil), // 632: otg.BgpAttributesAggregator + (*BgpAttributesAs4Aggregator)(nil), // 633: otg.BgpAttributesAs4Aggregator + (*BgpAttributesCommunity)(nil), // 634: otg.BgpAttributesCommunity + (*BgpAttributesCustomCommunity)(nil), // 635: otg.BgpAttributesCustomCommunity + (*BgpAttributesNextHop)(nil), // 636: otg.BgpAttributesNextHop + (*BgpAttributesNextHopIpv6TwoAddresses)(nil), // 637: otg.BgpAttributesNextHopIpv6TwoAddresses + (*BgpAttributesMpReachNlri)(nil), // 638: otg.BgpAttributesMpReachNlri + (*BgpAttributesMpUnreachNlri)(nil), // 639: otg.BgpAttributesMpUnreachNlri + (*BgpAttributesMultiExitDiscriminator)(nil), // 640: otg.BgpAttributesMultiExitDiscriminator + (*BgpAttributesLocalPreference)(nil), // 641: otg.BgpAttributesLocalPreference + (*BgpAttributesOriginatorId)(nil), // 642: otg.BgpAttributesOriginatorId + (*BgpAttributesTunnelEncapsulation)(nil), // 643: otg.BgpAttributesTunnelEncapsulation + (*BgpAttributesSegmentRoutingPolicy)(nil), // 644: otg.BgpAttributesSegmentRoutingPolicy + (*BgpAttributesBsid)(nil), // 645: otg.BgpAttributesBsid + (*BgpAttributesBsidMpls)(nil), // 646: otg.BgpAttributesBsidMpls + (*BgpAttributesBsidSrv6)(nil), // 647: otg.BgpAttributesBsidSrv6 + (*BgpAttributesSrv6Bsid)(nil), // 648: otg.BgpAttributesSrv6Bsid + (*BgpAttributesSidMpls)(nil), // 649: otg.BgpAttributesSidMpls + (*BgpAttributesSidSrv6)(nil), // 650: otg.BgpAttributesSidSrv6 + (*BgpAttributesSrPolicyPreference)(nil), // 651: otg.BgpAttributesSrPolicyPreference + (*BgpAttributesSrPolicyPriority)(nil), // 652: otg.BgpAttributesSrPolicyPriority + (*BgpAttributesSrPolicyPolicyCandidateName)(nil), // 653: otg.BgpAttributesSrPolicyPolicyCandidateName + (*BgpAttributesSrPolicyPolicyName)(nil), // 654: otg.BgpAttributesSrPolicyPolicyName + (*BgpAttributesSrPolicyExplicitNullPolicy)(nil), // 655: otg.BgpAttributesSrPolicyExplicitNullPolicy + (*BgpAttributesSrPolicySegmentList)(nil), // 656: otg.BgpAttributesSrPolicySegmentList + (*BgpAttributesSegmentRoutingPolicySegmentListWeight)(nil), // 657: otg.BgpAttributesSegmentRoutingPolicySegmentListWeight + (*BgpAttributesSegmentRoutingPolicySegmentListSegment)(nil), // 658: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment + (*BgpAttributesSegmentRoutingPolicyTypeA)(nil), // 659: otg.BgpAttributesSegmentRoutingPolicyTypeA + (*BgpAttributesSegmentRoutingPolicyTypeB)(nil), // 660: otg.BgpAttributesSegmentRoutingPolicyTypeB + (*BgpAttributesSegmentRoutingPolicyTypeC)(nil), // 661: otg.BgpAttributesSegmentRoutingPolicyTypeC + (*BgpAttributesSegmentRoutingPolicyTypeD)(nil), // 662: otg.BgpAttributesSegmentRoutingPolicyTypeD + (*BgpAttributesSegmentRoutingPolicyTypeE)(nil), // 663: otg.BgpAttributesSegmentRoutingPolicyTypeE + (*BgpAttributesSegmentRoutingPolicyTypeF)(nil), // 664: otg.BgpAttributesSegmentRoutingPolicyTypeF + (*BgpAttributesSegmentRoutingPolicyTypeG)(nil), // 665: otg.BgpAttributesSegmentRoutingPolicyTypeG + (*BgpAttributesSegmentRoutingPolicyTypeH)(nil), // 666: otg.BgpAttributesSegmentRoutingPolicyTypeH + (*BgpAttributesSegmentRoutingPolicyTypeI)(nil), // 667: otg.BgpAttributesSegmentRoutingPolicyTypeI + (*BgpAttributesSegmentRoutingPolicyTypeJ)(nil), // 668: otg.BgpAttributesSegmentRoutingPolicyTypeJ + (*BgpAttributesSegmentRoutingPolicyTypeK)(nil), // 669: otg.BgpAttributesSegmentRoutingPolicyTypeK + (*BgpAttributesSegmentRoutingPolicyTypeFlags)(nil), // 670: otg.BgpAttributesSegmentRoutingPolicyTypeFlags + (*BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure)(nil), // 671: otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + (*BgpNLRIPrefixSegmentRoutingDistinguisher)(nil), // 672: otg.BgpNLRIPrefixSegmentRoutingDistinguisher + (*BgpV6Peer)(nil), // 673: otg.BgpV6Peer + (*BgpV6Interface)(nil), // 674: otg.BgpV6Interface + (*BgpV6SegmentRouting)(nil), // 675: otg.BgpV6SegmentRouting + (*BgpV6EthernetSegment)(nil), // 676: otg.BgpV6EthernetSegment + (*BgpV6EvpnEvis)(nil), // 677: otg.BgpV6EvpnEvis + (*BgpV6EviVxlan)(nil), // 678: otg.BgpV6EviVxlan + (*BgpV6EviVxlanBroadcastDomain)(nil), // 679: otg.BgpV6EviVxlanBroadcastDomain + (*DeviceVxlan)(nil), // 680: otg.DeviceVxlan + (*VxlanV4Tunnel)(nil), // 681: otg.VxlanV4Tunnel + (*VxlanV6Tunnel)(nil), // 682: otg.VxlanV6Tunnel + (*VxlanV4TunnelDestinationIPMode)(nil), // 683: otg.VxlanV4TunnelDestinationIPMode + (*VxlanV6TunnelDestinationIPMode)(nil), // 684: otg.VxlanV6TunnelDestinationIPMode + (*VxlanV4TunnelDestinationIPModeUnicast)(nil), // 685: otg.VxlanV4TunnelDestinationIPModeUnicast + (*VxlanV6TunnelDestinationIPModeUnicast)(nil), // 686: otg.VxlanV6TunnelDestinationIPModeUnicast + (*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache)(nil), // 687: otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + (*VxlanV4TunnelDestinationIPModeUnicastVtep)(nil), // 688: otg.VxlanV4TunnelDestinationIPModeUnicastVtep + (*VxlanV6TunnelDestinationIPModeUnicastVtep)(nil), // 689: otg.VxlanV6TunnelDestinationIPModeUnicastVtep + (*VxlanV4TunnelDestinationIPModeMulticast)(nil), // 690: otg.VxlanV4TunnelDestinationIPModeMulticast + (*VxlanV6TunnelDestinationIPModeMulticast)(nil), // 691: otg.VxlanV6TunnelDestinationIPModeMulticast + (*DeviceRsvp)(nil), // 692: otg.DeviceRsvp + (*RsvpIpv4Interface)(nil), // 693: otg.RsvpIpv4Interface + (*RsvpLspIpv4Interface)(nil), // 694: otg.RsvpLspIpv4Interface + (*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp)(nil), // 695: otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + (*RsvpLspIpv4InterfaceP2PIngressIpv4Lsp)(nil), // 696: otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + (*RsvpSessionAttribute)(nil), // 697: otg.RsvpSessionAttribute + (*RsvpResourceAffinities)(nil), // 698: otg.RsvpResourceAffinities + (*RsvpTspec)(nil), // 699: otg.RsvpTspec + (*RsvpFastReroute)(nil), // 700: otg.RsvpFastReroute + (*RsvpEro)(nil), // 701: otg.RsvpEro + (*RsvpEroSubobject)(nil), // 702: otg.RsvpEroSubobject + (*DeviceDhcpServer)(nil), // 703: otg.DeviceDhcpServer + (*DhcpServerV4)(nil), // 704: otg.DhcpServerV4 + (*DhcpServerV4Pool)(nil), // 705: otg.DhcpServerV4Pool + (*DhcpServerV4PoolOption)(nil), // 706: otg.DhcpServerV4PoolOption + (*DhcpServerV6)(nil), // 707: otg.DhcpServerV6 + (*Dhcpv6ServerOptions)(nil), // 708: otg.Dhcpv6ServerOptions + (*DhcpV6ServerLease)(nil), // 709: otg.DhcpV6ServerLease + (*Dhcpv6ServerIaType)(nil), // 710: otg.Dhcpv6ServerIaType + (*Dhcpv6ServerPoolInfo)(nil), // 711: otg.Dhcpv6ServerPoolInfo + (*Dhcpv6ServerIapdPoolInfo)(nil), // 712: otg.Dhcpv6ServerIapdPoolInfo + (*Dhcpv6ServerIanapdPoolInfo)(nil), // 713: otg.Dhcpv6ServerIanapdPoolInfo + (*DhcpV6ServerDns)(nil), // 714: otg.DhcpV6ServerDns + (*DhcpV6ServerSecondaryDns)(nil), // 715: otg.DhcpV6ServerSecondaryDns + (*DeviceOspfv2Router)(nil), // 716: otg.DeviceOspfv2Router + (*Ospfv2RouterId)(nil), // 717: otg.Ospfv2RouterId + (*Ospfv2Options)(nil), // 718: otg.Ospfv2Options + (*Ospfv2GracefulRestart)(nil), // 719: otg.Ospfv2GracefulRestart + (*Ospfv2Interface)(nil), // 720: otg.Ospfv2Interface + (*Ospfv2InterfaceArea)(nil), // 721: otg.Ospfv2InterfaceArea + (*Ospfv2InterfaceNetworkType)(nil), // 722: otg.Ospfv2InterfaceNetworkType + (*Ospfv2InterfaceNeighbor)(nil), // 723: otg.Ospfv2InterfaceNeighbor + (*Ospfv2InterfaceAdvanced)(nil), // 724: otg.Ospfv2InterfaceAdvanced + (*Ospfv2InterfaceOptions)(nil), // 725: otg.Ospfv2InterfaceOptions + (*Ospfv2InterfaceAuthentication)(nil), // 726: otg.Ospfv2InterfaceAuthentication + (*Ospfv2AuthenticationMd5)(nil), // 727: otg.Ospfv2AuthenticationMd5 + (*Ospfv2InterfaceLinkProtection)(nil), // 728: otg.Ospfv2InterfaceLinkProtection + (*Ospfv2V4RouteRange)(nil), // 729: otg.Ospfv2V4RouteRange + (*Ospfv2V4RRRouteOrigin)(nil), // 730: otg.Ospfv2V4RRRouteOrigin + (*Ospfv2V4RRIntraArea)(nil), // 731: otg.Ospfv2V4RRIntraArea + (*Ospfv2V4RRInterArea)(nil), // 732: otg.Ospfv2V4RRInterArea + (*Ospfv2V4RRExternalType1)(nil), // 733: otg.Ospfv2V4RRExternalType1 + (*Ospfv2V4RRExternalType2)(nil), // 734: otg.Ospfv2V4RRExternalType2 + (*Ospfv2V4RRNssaExternal)(nil), // 735: otg.Ospfv2V4RRNssaExternal + (*Ospfv2V4RRExtdPrefixFlags)(nil), // 736: otg.Ospfv2V4RRExtdPrefixFlags + (*Flow)(nil), // 737: otg.Flow + (*FlowTxRx)(nil), // 738: otg.FlowTxRx + (*FlowPort)(nil), // 739: otg.FlowPort + (*FlowRouter)(nil), // 740: otg.FlowRouter + (*FlowHeader)(nil), // 741: otg.FlowHeader + (*FlowCustom)(nil), // 742: otg.FlowCustom + (*FlowCustomMetricTag)(nil), // 743: otg.FlowCustomMetricTag + (*FlowEthernet)(nil), // 744: otg.FlowEthernet + (*FlowVlan)(nil), // 745: otg.FlowVlan + (*FlowVxlan)(nil), // 746: otg.FlowVxlan + (*FlowIpv4)(nil), // 747: otg.FlowIpv4 + (*FlowIpv4Options)(nil), // 748: otg.FlowIpv4Options + (*FlowIpv4OptionsCustom)(nil), // 749: otg.FlowIpv4OptionsCustom + (*FlowIpv4OptionsCustomType)(nil), // 750: otg.FlowIpv4OptionsCustomType + (*FlowIpv4OptionsCustomLength)(nil), // 751: otg.FlowIpv4OptionsCustomLength + (*FlowIpv4Priority)(nil), // 752: otg.FlowIpv4Priority + (*FlowIpv4Dscp)(nil), // 753: otg.FlowIpv4Dscp + (*FlowIpv4Tos)(nil), // 754: otg.FlowIpv4Tos + (*FlowIpv4Auto)(nil), // 755: otg.FlowIpv4Auto + (*FlowIpv6)(nil), // 756: otg.FlowIpv6 + (*FlowIpv6Auto)(nil), // 757: otg.FlowIpv6Auto + (*FlowPfcPause)(nil), // 758: otg.FlowPfcPause + (*FlowEthernetPause)(nil), // 759: otg.FlowEthernetPause + (*FlowTcp)(nil), // 760: otg.FlowTcp + (*FlowUdp)(nil), // 761: otg.FlowUdp + (*FlowGre)(nil), // 762: otg.FlowGre + (*FlowGtpv1)(nil), // 763: otg.FlowGtpv1 + (*FlowGtpExtension)(nil), // 764: otg.FlowGtpExtension + (*FlowGtpv2)(nil), // 765: otg.FlowGtpv2 + (*FlowArp)(nil), // 766: otg.FlowArp + (*FlowIcmp)(nil), // 767: otg.FlowIcmp + (*FlowIcmpEcho)(nil), // 768: otg.FlowIcmpEcho + (*FlowIcmpv6)(nil), // 769: otg.FlowIcmpv6 + (*FlowIcmpv6Echo)(nil), // 770: otg.FlowIcmpv6Echo + (*FlowPpp)(nil), // 771: otg.FlowPpp + (*FlowIgmpv1)(nil), // 772: otg.FlowIgmpv1 + (*FlowMpls)(nil), // 773: otg.FlowMpls + (*FlowSnmpv2C)(nil), // 774: otg.FlowSnmpv2c + (*FlowSnmpv2CData)(nil), // 775: otg.FlowSnmpv2cData + (*FlowSnmpv2CPDU)(nil), // 776: otg.FlowSnmpv2cPDU + (*FlowSnmpv2CBulkPDU)(nil), // 777: otg.FlowSnmpv2cBulkPDU + (*FlowSnmpv2CVariableBinding)(nil), // 778: otg.FlowSnmpv2cVariableBinding + (*FlowSnmpv2CVariableBindingValue)(nil), // 779: otg.FlowSnmpv2cVariableBindingValue + (*FlowSnmpv2CVariableBindingStringValue)(nil), // 780: otg.FlowSnmpv2cVariableBindingStringValue + (*FlowRsvp)(nil), // 781: otg.FlowRsvp + (*FlowRSVPLength)(nil), // 782: otg.FlowRSVPLength + (*FlowRSVPMessage)(nil), // 783: otg.FlowRSVPMessage + (*FlowRSVPPathMessage)(nil), // 784: otg.FlowRSVPPathMessage + (*FlowRSVPPathObjects)(nil), // 785: otg.FlowRSVPPathObjects + (*FlowRSVPObjectLength)(nil), // 786: otg.FlowRSVPObjectLength + (*FlowRSVPPathObjectsClass)(nil), // 787: otg.FlowRSVPPathObjectsClass + (*FlowRSVPPathObjectsClassSession)(nil), // 788: otg.FlowRSVPPathObjectsClassSession + (*FlowRSVPPathObjectsSessionCType)(nil), // 789: otg.FlowRSVPPathObjectsSessionCType + (*FlowRSVPPathSessionLspTunnelIpv4)(nil), // 790: otg.FlowRSVPPathSessionLspTunnelIpv4 + (*FlowRSVPPathSessionExtTunnelId)(nil), // 791: otg.FlowRSVPPathSessionExtTunnelId + (*FlowRSVPPathObjectsClassRsvpHop)(nil), // 792: otg.FlowRSVPPathObjectsClassRsvpHop + (*FlowRSVPPathObjectsRsvpHopCType)(nil), // 793: otg.FlowRSVPPathObjectsRsvpHopCType + (*FlowRSVPPathRsvpHopIpv4)(nil), // 794: otg.FlowRSVPPathRsvpHopIpv4 + (*FlowRSVPPathObjectsClassTimeValues)(nil), // 795: otg.FlowRSVPPathObjectsClassTimeValues + (*FlowRSVPPathObjectsTimeValuesCType)(nil), // 796: otg.FlowRSVPPathObjectsTimeValuesCType + (*FlowRSVPPathTimeValuesType1)(nil), // 797: otg.FlowRSVPPathTimeValuesType1 + (*FlowRSVPPathObjectsClassExplicitRoute)(nil), // 798: otg.FlowRSVPPathObjectsClassExplicitRoute + (*FlowRSVPPathObjectsClassExplicitRouteCType)(nil), // 799: otg.FlowRSVPPathObjectsClassExplicitRouteCType + (*FlowRSVPPathExplicitRouteType1)(nil), // 800: otg.FlowRSVPPathExplicitRouteType1 + (*FlowRSVPType1ExplicitRouteSubobjects)(nil), // 801: otg.FlowRSVPType1ExplicitRouteSubobjects + (*FlowRSVPType1ExplicitRouteSubobjectsType)(nil), // 802: otg.FlowRSVPType1ExplicitRouteSubobjectsType + (*FlowRSVPPathExplicitRouteType1Ipv4Prefix)(nil), // 803: otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix + (*FlowRSVPPathExplicitRouteType1ASNumber)(nil), // 804: otg.FlowRSVPPathExplicitRouteType1ASNumber + (*FlowRSVPExplicitRouteLength)(nil), // 805: otg.FlowRSVPExplicitRouteLength + (*FlowRSVPExplicitRouteASNumberLength)(nil), // 806: otg.FlowRSVPExplicitRouteASNumberLength + (*FlowRSVPPathObjectsClassLabelRequest)(nil), // 807: otg.FlowRSVPPathObjectsClassLabelRequest + (*FlowRSVPPathObjectsLabelRequestCType)(nil), // 808: otg.FlowRSVPPathObjectsLabelRequestCType + (*FlowRSVPPathLabelRequestWithoutLabelRange)(nil), // 809: otg.FlowRSVPPathLabelRequestWithoutLabelRange + (*FlowRSVPPathObjectsClassSessionAttribute)(nil), // 810: otg.FlowRSVPPathObjectsClassSessionAttribute + (*FlowRSVPPathObjectsSessionAttributeCType)(nil), // 811: otg.FlowRSVPPathObjectsSessionAttributeCType + (*FlowRSVPPathSessionAttributeLspTunnel)(nil), // 812: otg.FlowRSVPPathSessionAttributeLspTunnel + (*FlowRSVPPathSessionAttributeLspTunnelRa)(nil), // 813: otg.FlowRSVPPathSessionAttributeLspTunnelRa + (*FlowRSVPLspTunnelFlag)(nil), // 814: otg.FlowRSVPLspTunnelFlag + (*FlowRSVPSessionAttributeNameLength)(nil), // 815: otg.FlowRSVPSessionAttributeNameLength + (*FlowRSVPPathObjectsClassSenderTemplate)(nil), // 816: otg.FlowRSVPPathObjectsClassSenderTemplate + (*FlowRSVPPathObjectsSenderTemplateCType)(nil), // 817: otg.FlowRSVPPathObjectsSenderTemplateCType + (*FlowRSVPPathSenderTemplateLspTunnelIpv4)(nil), // 818: otg.FlowRSVPPathSenderTemplateLspTunnelIpv4 + (*FlowRSVPPathObjectsClassSenderTspec)(nil), // 819: otg.FlowRSVPPathObjectsClassSenderTspec + (*FlowRSVPPathObjectsSenderTspecCType)(nil), // 820: otg.FlowRSVPPathObjectsSenderTspecCType + (*FlowRSVPPathSenderTspecIntServ)(nil), // 821: otg.FlowRSVPPathSenderTspecIntServ + (*FlowRSVPPathObjectsClassRecordRoute)(nil), // 822: otg.FlowRSVPPathObjectsClassRecordRoute + (*FlowRSVPPathObjectsRecordRouteCType)(nil), // 823: otg.FlowRSVPPathObjectsRecordRouteCType + (*FlowRSVPPathRecordRouteType1)(nil), // 824: otg.FlowRSVPPathRecordRouteType1 + (*FlowRSVPType1RecordRouteSubobjects)(nil), // 825: otg.FlowRSVPType1RecordRouteSubobjects + (*FlowRSVPPathObjectsRecordRouteSubObjectType)(nil), // 826: otg.FlowRSVPPathObjectsRecordRouteSubObjectType + (*FlowRSVPPathRecordRouteType1Ipv4Address)(nil), // 827: otg.FlowRSVPPathRecordRouteType1Ipv4Address + (*FlowRSVPRecordRouteIPv4Flag)(nil), // 828: otg.FlowRSVPRecordRouteIPv4Flag + (*FlowRSVPPathRecordRouteType1Label)(nil), // 829: otg.FlowRSVPPathRecordRouteType1Label + (*FlowRSVPPathRecordRouteLabel)(nil), // 830: otg.FlowRSVPPathRecordRouteLabel + (*FlowRSVPRouteRecordLength)(nil), // 831: otg.FlowRSVPRouteRecordLength + (*FlowRSVPPathObjectsCustom)(nil), // 832: otg.FlowRSVPPathObjectsCustom + (*FlowSize)(nil), // 833: otg.FlowSize + (*FlowSizeIncrement)(nil), // 834: otg.FlowSizeIncrement + (*FlowSizeRandom)(nil), // 835: otg.FlowSizeRandom + (*FlowSizeWeightPairs)(nil), // 836: otg.FlowSizeWeightPairs + (*FlowSizeWeightPairsCustom)(nil), // 837: otg.FlowSizeWeightPairsCustom + (*FlowRate)(nil), // 838: otg.FlowRate + (*FlowDuration)(nil), // 839: otg.FlowDuration + (*FlowContinuous)(nil), // 840: otg.FlowContinuous + (*FlowDelay)(nil), // 841: otg.FlowDelay + (*FlowFixedPackets)(nil), // 842: otg.FlowFixedPackets + (*FlowFixedSeconds)(nil), // 843: otg.FlowFixedSeconds + (*FlowBurst)(nil), // 844: otg.FlowBurst + (*FlowDurationInterBurstGap)(nil), // 845: otg.FlowDurationInterBurstGap + (*FlowMetrics)(nil), // 846: otg.FlowMetrics + (*FlowLatencyMetrics)(nil), // 847: otg.FlowLatencyMetrics + (*FlowPredefinedTags)(nil), // 848: otg.FlowPredefinedTags + (*FlowRxTxRatio)(nil), // 849: otg.FlowRxTxRatio + (*FlowRxTxRatioRxCount)(nil), // 850: otg.FlowRxTxRatioRxCount + (*Event)(nil), // 851: otg.Event + (*EventRxRateThreshold)(nil), // 852: otg.EventRxRateThreshold + (*EventLink)(nil), // 853: otg.EventLink + (*EventRouteAdvertiseWithdraw)(nil), // 854: otg.EventRouteAdvertiseWithdraw + (*EventRequest)(nil), // 855: otg.EventRequest + (*EventSubscription)(nil), // 856: otg.EventSubscription + (*Lldp)(nil), // 857: otg.Lldp + (*LldpConnection)(nil), // 858: otg.LldpConnection + (*LldpChassisId)(nil), // 859: otg.LldpChassisId + (*LldpPortId)(nil), // 860: otg.LldpPortId + (*LldpChassisMacSubType)(nil), // 861: otg.LldpChassisMacSubType + (*LldpPortInterfaceNameSubType)(nil), // 862: otg.LldpPortInterfaceNameSubType + (*LldpSystemName)(nil), // 863: otg.LldpSystemName + (*LldpOrgInfo)(nil), // 864: otg.LldpOrgInfo + (*LldpOrgInfoType)(nil), // 865: otg.LldpOrgInfoType + (*Error)(nil), // 866: otg.Error + (*Warning)(nil), // 867: otg.Warning + (*ConfigUpdate)(nil), // 868: otg.ConfigUpdate + (*FlowsUpdate)(nil), // 869: otg.FlowsUpdate + (*ControlState)(nil), // 870: otg.ControlState + (*StatePort)(nil), // 871: otg.StatePort + (*StateTraffic)(nil), // 872: otg.StateTraffic + (*StateProtocol)(nil), // 873: otg.StateProtocol + (*StatePortLink)(nil), // 874: otg.StatePortLink + (*StatePortCapture)(nil), // 875: otg.StatePortCapture + (*StateTrafficFlowTransmit)(nil), // 876: otg.StateTrafficFlowTransmit + (*StateProtocolAll)(nil), // 877: otg.StateProtocolAll + (*StateProtocolRoute)(nil), // 878: otg.StateProtocolRoute + (*StateProtocolLacp)(nil), // 879: otg.StateProtocolLacp + (*StateProtocolLacpAdmin)(nil), // 880: otg.StateProtocolLacpAdmin + (*StateProtocolLacpMemberPorts)(nil), // 881: otg.StateProtocolLacpMemberPorts + (*StateProtocolBgp)(nil), // 882: otg.StateProtocolBgp + (*StateProtocolBgpPeers)(nil), // 883: otg.StateProtocolBgpPeers + (*StateProtocolIsis)(nil), // 884: otg.StateProtocolIsis + (*StateProtocolIsisRouters)(nil), // 885: otg.StateProtocolIsisRouters + (*StateProtocolOspfv2)(nil), // 886: otg.StateProtocolOspfv2 + (*StateProtocolOspfv2Routers)(nil), // 887: otg.StateProtocolOspfv2Routers + (*ControlAction)(nil), // 888: otg.ControlAction + (*ControlActionResponse)(nil), // 889: otg.ControlActionResponse + (*ActionResponse)(nil), // 890: otg.ActionResponse + (*ActionProtocol)(nil), // 891: otg.ActionProtocol + (*ActionResponseProtocol)(nil), // 892: otg.ActionResponseProtocol + (*ActionProtocolIpv4)(nil), // 893: otg.ActionProtocolIpv4 + (*ActionResponseProtocolIpv4)(nil), // 894: otg.ActionResponseProtocolIpv4 + (*ActionProtocolIpv4Ping)(nil), // 895: otg.ActionProtocolIpv4Ping + (*ActionProtocolIpv4PingRequest)(nil), // 896: otg.ActionProtocolIpv4PingRequest + (*ActionResponseProtocolIpv4Ping)(nil), // 897: otg.ActionResponseProtocolIpv4Ping + (*ActionResponseProtocolIpv4PingResponse)(nil), // 898: otg.ActionResponseProtocolIpv4PingResponse + (*ActionProtocolIpv6)(nil), // 899: otg.ActionProtocolIpv6 + (*ActionResponseProtocolIpv6)(nil), // 900: otg.ActionResponseProtocolIpv6 + (*ActionProtocolIpv6Ping)(nil), // 901: otg.ActionProtocolIpv6Ping + (*ActionProtocolIpv6PingRequest)(nil), // 902: otg.ActionProtocolIpv6PingRequest + (*ActionResponseProtocolIpv6Ping)(nil), // 903: otg.ActionResponseProtocolIpv6Ping + (*ActionResponseProtocolIpv6PingResponse)(nil), // 904: otg.ActionResponseProtocolIpv6PingResponse + (*ActionProtocolBgp)(nil), // 905: otg.ActionProtocolBgp + (*ActionProtocolBgpNotification)(nil), // 906: otg.ActionProtocolBgpNotification + (*ActionProtocolBgpInitiateGracefulRestart)(nil), // 907: otg.ActionProtocolBgpInitiateGracefulRestart + (*ActionProtocolBgpGracefulRestartNotification)(nil), // 908: otg.ActionProtocolBgpGracefulRestartNotification + (*MetricsRequest)(nil), // 909: otg.MetricsRequest + (*MetricsResponse)(nil), // 910: otg.MetricsResponse + (*PortMetricsRequest)(nil), // 911: otg.PortMetricsRequest + (*PortMetric)(nil), // 912: otg.PortMetric + (*FlowMetricsRequest)(nil), // 913: otg.FlowMetricsRequest + (*FlowTaggedMetricsFilter)(nil), // 914: otg.FlowTaggedMetricsFilter + (*FlowMetricTagFilter)(nil), // 915: otg.FlowMetricTagFilter + (*FlowMetric)(nil), // 916: otg.FlowMetric + (*FlowTaggedMetric)(nil), // 917: otg.FlowTaggedMetric + (*FlowMetricTag)(nil), // 918: otg.FlowMetricTag + (*FlowMetricTagValue)(nil), // 919: otg.FlowMetricTagValue + (*MetricTimestamp)(nil), // 920: otg.MetricTimestamp + (*MetricLatency)(nil), // 921: otg.MetricLatency + (*Bgpv4MetricsRequest)(nil), // 922: otg.Bgpv4MetricsRequest + (*Bgpv4Metric)(nil), // 923: otg.Bgpv4Metric + (*Bgpv6MetricsRequest)(nil), // 924: otg.Bgpv6MetricsRequest + (*Bgpv6Metric)(nil), // 925: otg.Bgpv6Metric + (*IsisMetricsRequest)(nil), // 926: otg.IsisMetricsRequest + (*IsisMetric)(nil), // 927: otg.IsisMetric + (*LagMetricsRequest)(nil), // 928: otg.LagMetricsRequest + (*LagMetric)(nil), // 929: otg.LagMetric + (*LacpMetricsRequest)(nil), // 930: otg.LacpMetricsRequest + (*LacpMetric)(nil), // 931: otg.LacpMetric + (*LldpMetricsRequest)(nil), // 932: otg.LldpMetricsRequest + (*LldpMetric)(nil), // 933: otg.LldpMetric + (*RsvpMetricsRequest)(nil), // 934: otg.RsvpMetricsRequest + (*RsvpMetric)(nil), // 935: otg.RsvpMetric + (*Dhcpv4ClientMetricsRequest)(nil), // 936: otg.Dhcpv4ClientMetricsRequest + (*Dhcpv4ClientMetric)(nil), // 937: otg.Dhcpv4ClientMetric + (*Dhcpv4ServerMetricsRequest)(nil), // 938: otg.Dhcpv4ServerMetricsRequest + (*Dhcpv4ServerMetric)(nil), // 939: otg.Dhcpv4ServerMetric + (*Dhcpv6ClientMetricsRequest)(nil), // 940: otg.Dhcpv6ClientMetricsRequest + (*Dhcpv6ClientMetric)(nil), // 941: otg.Dhcpv6ClientMetric + (*Dhcpv6ServerMetricsRequest)(nil), // 942: otg.Dhcpv6ServerMetricsRequest + (*Dhcpv6ServerMetric)(nil), // 943: otg.Dhcpv6ServerMetric + (*Ospfv2MetricsRequest)(nil), // 944: otg.Ospfv2MetricsRequest + (*Ospfv2Metric)(nil), // 945: otg.Ospfv2Metric + (*StatesRequest)(nil), // 946: otg.StatesRequest + (*StatesResponse)(nil), // 947: otg.StatesResponse + (*Neighborsv4StatesRequest)(nil), // 948: otg.Neighborsv4StatesRequest + (*Neighborsv4State)(nil), // 949: otg.Neighborsv4State + (*Neighborsv6StatesRequest)(nil), // 950: otg.Neighborsv6StatesRequest + (*Neighborsv6State)(nil), // 951: otg.Neighborsv6State + (*BgpPrefixStateRequest)(nil), // 952: otg.BgpPrefixStateRequest + (*BgpPrefixIpv4UnicastFilter)(nil), // 953: otg.BgpPrefixIpv4UnicastFilter + (*BgpPrefixIpv6UnicastFilter)(nil), // 954: otg.BgpPrefixIpv6UnicastFilter + (*BgpPrefixesState)(nil), // 955: otg.BgpPrefixesState + (*BgpPrefixIpv4UnicastState)(nil), // 956: otg.BgpPrefixIpv4UnicastState + (*BgpPrefixIpv6UnicastState)(nil), // 957: otg.BgpPrefixIpv6UnicastState + (*ResultExtendedCommunity)(nil), // 958: otg.ResultExtendedCommunity + (*ResultExtendedCommunityStructured)(nil), // 959: otg.ResultExtendedCommunityStructured + (*ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget)(nil), // 960: otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + (*ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin)(nil), // 961: otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + (*ResultExtendedCommunityTransitive2OctetAsType)(nil), // 962: otg.ResultExtendedCommunityTransitive2OctetAsType + (*ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin)(nil), // 963: otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + (*ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget)(nil), // 964: otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + (*ResultExtendedCommunityTransitiveIpv4AddressType)(nil), // 965: otg.ResultExtendedCommunityTransitiveIpv4AddressType + (*ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget)(nil), // 966: otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + (*ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin)(nil), // 967: otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + (*ResultExtendedCommunityTransitive4OctetAsType)(nil), // 968: otg.ResultExtendedCommunityTransitive4OctetAsType + (*ResultExtendedCommunityTransitiveOpaqueTypeColor)(nil), // 969: otg.ResultExtendedCommunityTransitiveOpaqueTypeColor + (*ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation)(nil), // 970: otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + (*ResultExtendedCommunityTransitiveOpaqueType)(nil), // 971: otg.ResultExtendedCommunityTransitiveOpaqueType + (*ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth)(nil), // 972: otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + (*ResultExtendedCommunityNonTransitive2OctetAsType)(nil), // 973: otg.ResultExtendedCommunityNonTransitive2OctetAsType + (*ResultBgpCommunity)(nil), // 974: otg.ResultBgpCommunity + (*ResultBgpAsPath)(nil), // 975: otg.ResultBgpAsPath + (*ResultBgpAsPathSegment)(nil), // 976: otg.ResultBgpAsPathSegment + (*IsisLspsStateRequest)(nil), // 977: otg.IsisLspsStateRequest + (*IsisLspsState)(nil), // 978: otg.IsisLspsState + (*IsisLspState)(nil), // 979: otg.IsisLspState + (*IsisLspTlvs)(nil), // 980: otg.IsisLspTlvs + (*IsisLspHostname)(nil), // 981: otg.IsisLspHostname + (*IsisLspFlags)(nil), // 982: otg.IsisLspFlags + (*IsisLspIsReachabilityTlv)(nil), // 983: otg.IsisLspIsReachabilityTlv + (*IsisLspExtendedIsReachabilityTlv)(nil), // 984: otg.IsisLspExtendedIsReachabilityTlv + (*IsisLspneighbor)(nil), // 985: otg.IsisLspneighbor + (*IsisLspIpv4InternalReachabilityTlv)(nil), // 986: otg.IsisLspIpv4InternalReachabilityTlv + (*IsisLspIpv4ExternalReachabilityTlv)(nil), // 987: otg.IsisLspIpv4ExternalReachabilityTlv + (*IsisLspV4Prefix)(nil), // 988: otg.IsisLspV4Prefix + (*IsisLspExtendedIpv4ReachabilityTlv)(nil), // 989: otg.IsisLspExtendedIpv4ReachabilityTlv + (*IsisLspExtendedV4Prefix)(nil), // 990: otg.IsisLspExtendedV4Prefix + (*IsisLspIpv6ReachabilityTlv)(nil), // 991: otg.IsisLspIpv6ReachabilityTlv + (*IsisLspV6Prefix)(nil), // 992: otg.IsisLspV6Prefix + (*IsisLspPrefixAttributes)(nil), // 993: otg.IsisLspPrefixAttributes + (*LldpNeighborsStateRequest)(nil), // 994: otg.LldpNeighborsStateRequest + (*LldpNeighborsState)(nil), // 995: otg.LldpNeighborsState + (*LldpCustomTLVState)(nil), // 996: otg.LldpCustomTLVState + (*LldpCapabilityState)(nil), // 997: otg.LldpCapabilityState + (*RsvpLspsStateRequest)(nil), // 998: otg.RsvpLspsStateRequest + (*RsvpLspsState)(nil), // 999: otg.RsvpLspsState + (*RsvpIPv4LspState)(nil), // 1000: otg.RsvpIPv4LspState + (*RsvpLspState)(nil), // 1001: otg.RsvpLspState + (*RsvpLspIpv4Rro)(nil), // 1002: otg.RsvpLspIpv4Rro + (*RsvpLspIpv4Ero)(nil), // 1003: otg.RsvpLspIpv4Ero + (*Dhcpv4InterfaceStateRequest)(nil), // 1004: otg.Dhcpv4InterfaceStateRequest + (*Dhcpv4InterfaceState)(nil), // 1005: otg.Dhcpv4InterfaceState + (*Dhcpv4LeaseStateRequest)(nil), // 1006: otg.Dhcpv4LeaseStateRequest + (*Dhcpv4LeasesState)(nil), // 1007: otg.Dhcpv4LeasesState + (*Dhcpv4LeaseState)(nil), // 1008: otg.Dhcpv4LeaseState + (*Dhcpv6InterfaceStateRequest)(nil), // 1009: otg.Dhcpv6InterfaceStateRequest + (*Dhcpv6InterfaceState)(nil), // 1010: otg.Dhcpv6InterfaceState + (*Dhcpv6InterfaceIapd)(nil), // 1011: otg.Dhcpv6InterfaceIapd + (*Dhcpv6InterfaceIa)(nil), // 1012: otg.Dhcpv6InterfaceIa + (*Dhcpv6LeaseStateRequest)(nil), // 1013: otg.Dhcpv6LeaseStateRequest + (*Dhcpv6LeasesState)(nil), // 1014: otg.Dhcpv6LeasesState + (*Dhcpv6ServerLeaseState)(nil), // 1015: otg.Dhcpv6ServerLeaseState + (*Ospfv2LsasStateRequest)(nil), // 1016: otg.Ospfv2LsasStateRequest + (*Ospfv2LsaState)(nil), // 1017: otg.Ospfv2LsaState + (*Ospfv2RouterLsa)(nil), // 1018: otg.Ospfv2RouterLsa + (*Ospfv2NetworkLsa)(nil), // 1019: otg.Ospfv2NetworkLsa + (*Ospfv2NetworkSummaryLsa)(nil), // 1020: otg.Ospfv2NetworkSummaryLsa + (*Ospfv2SummaryAsLsa)(nil), // 1021: otg.Ospfv2SummaryAsLsa + (*Ospfv2ExternalAsLsa)(nil), // 1022: otg.Ospfv2ExternalAsLsa + (*Ospfv2NssaLsa)(nil), // 1023: otg.Ospfv2NssaLsa + (*Ospfv2OpaqueLsa)(nil), // 1024: otg.Ospfv2OpaqueLsa + (*Ospfv2LsaHeader)(nil), // 1025: otg.Ospfv2LsaHeader + (*Ospfv2Link)(nil), // 1026: otg.Ospfv2Link + (*CaptureRequest)(nil), // 1027: otg.CaptureRequest + (*PatternFlowEthernetDstCounter)(nil), // 1028: otg.PatternFlowEthernetDstCounter + (*PatternFlowEthernetDstMetricTag)(nil), // 1029: otg.PatternFlowEthernetDstMetricTag + (*PatternFlowEthernetDst)(nil), // 1030: otg.PatternFlowEthernetDst + (*PatternFlowEthernetSrcCounter)(nil), // 1031: otg.PatternFlowEthernetSrcCounter + (*PatternFlowEthernetSrcMetricTag)(nil), // 1032: otg.PatternFlowEthernetSrcMetricTag + (*PatternFlowEthernetSrc)(nil), // 1033: otg.PatternFlowEthernetSrc + (*PatternFlowEthernetEtherTypeCounter)(nil), // 1034: otg.PatternFlowEthernetEtherTypeCounter + (*PatternFlowEthernetEtherTypeMetricTag)(nil), // 1035: otg.PatternFlowEthernetEtherTypeMetricTag + (*PatternFlowEthernetEtherType)(nil), // 1036: otg.PatternFlowEthernetEtherType + (*PatternFlowEthernetPfcQueueCounter)(nil), // 1037: otg.PatternFlowEthernetPfcQueueCounter + (*PatternFlowEthernetPfcQueueMetricTag)(nil), // 1038: otg.PatternFlowEthernetPfcQueueMetricTag + (*PatternFlowEthernetPfcQueue)(nil), // 1039: otg.PatternFlowEthernetPfcQueue + (*PatternFlowVlanPriorityCounter)(nil), // 1040: otg.PatternFlowVlanPriorityCounter + (*PatternFlowVlanPriorityMetricTag)(nil), // 1041: otg.PatternFlowVlanPriorityMetricTag + (*PatternFlowVlanPriority)(nil), // 1042: otg.PatternFlowVlanPriority + (*PatternFlowVlanCfiCounter)(nil), // 1043: otg.PatternFlowVlanCfiCounter + (*PatternFlowVlanCfiMetricTag)(nil), // 1044: otg.PatternFlowVlanCfiMetricTag + (*PatternFlowVlanCfi)(nil), // 1045: otg.PatternFlowVlanCfi + (*PatternFlowVlanIdCounter)(nil), // 1046: otg.PatternFlowVlanIdCounter + (*PatternFlowVlanIdMetricTag)(nil), // 1047: otg.PatternFlowVlanIdMetricTag + (*PatternFlowVlanId)(nil), // 1048: otg.PatternFlowVlanId + (*PatternFlowVlanTpidCounter)(nil), // 1049: otg.PatternFlowVlanTpidCounter + (*PatternFlowVlanTpidMetricTag)(nil), // 1050: otg.PatternFlowVlanTpidMetricTag + (*PatternFlowVlanTpid)(nil), // 1051: otg.PatternFlowVlanTpid + (*PatternFlowVxlanFlagsCounter)(nil), // 1052: otg.PatternFlowVxlanFlagsCounter + (*PatternFlowVxlanFlagsMetricTag)(nil), // 1053: otg.PatternFlowVxlanFlagsMetricTag + (*PatternFlowVxlanFlags)(nil), // 1054: otg.PatternFlowVxlanFlags + (*PatternFlowVxlanReserved0Counter)(nil), // 1055: otg.PatternFlowVxlanReserved0Counter + (*PatternFlowVxlanReserved0MetricTag)(nil), // 1056: otg.PatternFlowVxlanReserved0MetricTag + (*PatternFlowVxlanReserved0)(nil), // 1057: otg.PatternFlowVxlanReserved0 + (*PatternFlowVxlanVniCounter)(nil), // 1058: otg.PatternFlowVxlanVniCounter + (*PatternFlowVxlanVniMetricTag)(nil), // 1059: otg.PatternFlowVxlanVniMetricTag + (*PatternFlowVxlanVni)(nil), // 1060: otg.PatternFlowVxlanVni + (*PatternFlowVxlanReserved1Counter)(nil), // 1061: otg.PatternFlowVxlanReserved1Counter + (*PatternFlowVxlanReserved1MetricTag)(nil), // 1062: otg.PatternFlowVxlanReserved1MetricTag + (*PatternFlowVxlanReserved1)(nil), // 1063: otg.PatternFlowVxlanReserved1 + (*PatternFlowIpv4VersionCounter)(nil), // 1064: otg.PatternFlowIpv4VersionCounter + (*PatternFlowIpv4VersionMetricTag)(nil), // 1065: otg.PatternFlowIpv4VersionMetricTag + (*PatternFlowIpv4Version)(nil), // 1066: otg.PatternFlowIpv4Version + (*PatternFlowIpv4HeaderLengthCounter)(nil), // 1067: otg.PatternFlowIpv4HeaderLengthCounter + (*PatternFlowIpv4HeaderLengthMetricTag)(nil), // 1068: otg.PatternFlowIpv4HeaderLengthMetricTag + (*PatternFlowIpv4HeaderLength)(nil), // 1069: otg.PatternFlowIpv4HeaderLength + (*PatternFlowIpv4TotalLengthCounter)(nil), // 1070: otg.PatternFlowIpv4TotalLengthCounter + (*PatternFlowIpv4TotalLengthMetricTag)(nil), // 1071: otg.PatternFlowIpv4TotalLengthMetricTag + (*PatternFlowIpv4TotalLength)(nil), // 1072: otg.PatternFlowIpv4TotalLength + (*PatternFlowIpv4IdentificationCounter)(nil), // 1073: otg.PatternFlowIpv4IdentificationCounter + (*PatternFlowIpv4IdentificationMetricTag)(nil), // 1074: otg.PatternFlowIpv4IdentificationMetricTag + (*PatternFlowIpv4Identification)(nil), // 1075: otg.PatternFlowIpv4Identification + (*PatternFlowIpv4ReservedCounter)(nil), // 1076: otg.PatternFlowIpv4ReservedCounter + (*PatternFlowIpv4ReservedMetricTag)(nil), // 1077: otg.PatternFlowIpv4ReservedMetricTag + (*PatternFlowIpv4Reserved)(nil), // 1078: otg.PatternFlowIpv4Reserved + (*PatternFlowIpv4DontFragmentCounter)(nil), // 1079: otg.PatternFlowIpv4DontFragmentCounter + (*PatternFlowIpv4DontFragmentMetricTag)(nil), // 1080: otg.PatternFlowIpv4DontFragmentMetricTag + (*PatternFlowIpv4DontFragment)(nil), // 1081: otg.PatternFlowIpv4DontFragment + (*PatternFlowIpv4MoreFragmentsCounter)(nil), // 1082: otg.PatternFlowIpv4MoreFragmentsCounter + (*PatternFlowIpv4MoreFragmentsMetricTag)(nil), // 1083: otg.PatternFlowIpv4MoreFragmentsMetricTag + (*PatternFlowIpv4MoreFragments)(nil), // 1084: otg.PatternFlowIpv4MoreFragments + (*PatternFlowIpv4FragmentOffsetCounter)(nil), // 1085: otg.PatternFlowIpv4FragmentOffsetCounter + (*PatternFlowIpv4FragmentOffsetMetricTag)(nil), // 1086: otg.PatternFlowIpv4FragmentOffsetMetricTag + (*PatternFlowIpv4FragmentOffset)(nil), // 1087: otg.PatternFlowIpv4FragmentOffset + (*PatternFlowIpv4TimeToLiveCounter)(nil), // 1088: otg.PatternFlowIpv4TimeToLiveCounter + (*PatternFlowIpv4TimeToLiveMetricTag)(nil), // 1089: otg.PatternFlowIpv4TimeToLiveMetricTag + (*PatternFlowIpv4TimeToLive)(nil), // 1090: otg.PatternFlowIpv4TimeToLive + (*PatternFlowIpv4ProtocolCounter)(nil), // 1091: otg.PatternFlowIpv4ProtocolCounter + (*PatternFlowIpv4ProtocolMetricTag)(nil), // 1092: otg.PatternFlowIpv4ProtocolMetricTag + (*PatternFlowIpv4Protocol)(nil), // 1093: otg.PatternFlowIpv4Protocol + (*PatternFlowIpv4HeaderChecksum)(nil), // 1094: otg.PatternFlowIpv4HeaderChecksum + (*PatternFlowIpv4SrcCounter)(nil), // 1095: otg.PatternFlowIpv4SrcCounter + (*PatternFlowIpv4SrcMetricTag)(nil), // 1096: otg.PatternFlowIpv4SrcMetricTag + (*PatternFlowIpv4SrcRandom)(nil), // 1097: otg.PatternFlowIpv4SrcRandom + (*PatternFlowIpv4Src)(nil), // 1098: otg.PatternFlowIpv4Src + (*PatternFlowIpv4DstCounter)(nil), // 1099: otg.PatternFlowIpv4DstCounter + (*PatternFlowIpv4DstMetricTag)(nil), // 1100: otg.PatternFlowIpv4DstMetricTag + (*PatternFlowIpv4DstRandom)(nil), // 1101: otg.PatternFlowIpv4DstRandom + (*PatternFlowIpv4Dst)(nil), // 1102: otg.PatternFlowIpv4Dst + (*PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter)(nil), // 1103: otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + (*PatternFlowIpv4OptionsCustomTypeCopiedFlag)(nil), // 1104: otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag + (*PatternFlowIpv4OptionsCustomTypeOptionClassCounter)(nil), // 1105: otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter + (*PatternFlowIpv4OptionsCustomTypeOptionClass)(nil), // 1106: otg.PatternFlowIpv4OptionsCustomTypeOptionClass + (*PatternFlowIpv4OptionsCustomTypeOptionNumberCounter)(nil), // 1107: otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + (*PatternFlowIpv4OptionsCustomTypeOptionNumber)(nil), // 1108: otg.PatternFlowIpv4OptionsCustomTypeOptionNumber + (*PatternFlowIpv4PriorityRawCounter)(nil), // 1109: otg.PatternFlowIpv4PriorityRawCounter + (*PatternFlowIpv4PriorityRawMetricTag)(nil), // 1110: otg.PatternFlowIpv4PriorityRawMetricTag + (*PatternFlowIpv4PriorityRaw)(nil), // 1111: otg.PatternFlowIpv4PriorityRaw + (*PatternFlowIpv4DscpPhbCounter)(nil), // 1112: otg.PatternFlowIpv4DscpPhbCounter + (*PatternFlowIpv4DscpPhbMetricTag)(nil), // 1113: otg.PatternFlowIpv4DscpPhbMetricTag + (*PatternFlowIpv4DscpPhb)(nil), // 1114: otg.PatternFlowIpv4DscpPhb + (*PatternFlowIpv4DscpEcnCounter)(nil), // 1115: otg.PatternFlowIpv4DscpEcnCounter + (*PatternFlowIpv4DscpEcnMetricTag)(nil), // 1116: otg.PatternFlowIpv4DscpEcnMetricTag + (*PatternFlowIpv4DscpEcn)(nil), // 1117: otg.PatternFlowIpv4DscpEcn + (*PatternFlowIpv4TosPrecedenceCounter)(nil), // 1118: otg.PatternFlowIpv4TosPrecedenceCounter + (*PatternFlowIpv4TosPrecedenceMetricTag)(nil), // 1119: otg.PatternFlowIpv4TosPrecedenceMetricTag + (*PatternFlowIpv4TosPrecedence)(nil), // 1120: otg.PatternFlowIpv4TosPrecedence + (*PatternFlowIpv4TosDelayCounter)(nil), // 1121: otg.PatternFlowIpv4TosDelayCounter + (*PatternFlowIpv4TosDelayMetricTag)(nil), // 1122: otg.PatternFlowIpv4TosDelayMetricTag + (*PatternFlowIpv4TosDelay)(nil), // 1123: otg.PatternFlowIpv4TosDelay + (*PatternFlowIpv4TosThroughputCounter)(nil), // 1124: otg.PatternFlowIpv4TosThroughputCounter + (*PatternFlowIpv4TosThroughputMetricTag)(nil), // 1125: otg.PatternFlowIpv4TosThroughputMetricTag + (*PatternFlowIpv4TosThroughput)(nil), // 1126: otg.PatternFlowIpv4TosThroughput + (*PatternFlowIpv4TosReliabilityCounter)(nil), // 1127: otg.PatternFlowIpv4TosReliabilityCounter + (*PatternFlowIpv4TosReliabilityMetricTag)(nil), // 1128: otg.PatternFlowIpv4TosReliabilityMetricTag + (*PatternFlowIpv4TosReliability)(nil), // 1129: otg.PatternFlowIpv4TosReliability + (*PatternFlowIpv4TosMonetaryCounter)(nil), // 1130: otg.PatternFlowIpv4TosMonetaryCounter + (*PatternFlowIpv4TosMonetaryMetricTag)(nil), // 1131: otg.PatternFlowIpv4TosMonetaryMetricTag + (*PatternFlowIpv4TosMonetary)(nil), // 1132: otg.PatternFlowIpv4TosMonetary + (*PatternFlowIpv4TosUnusedCounter)(nil), // 1133: otg.PatternFlowIpv4TosUnusedCounter + (*PatternFlowIpv4TosUnusedMetricTag)(nil), // 1134: otg.PatternFlowIpv4TosUnusedMetricTag + (*PatternFlowIpv4TosUnused)(nil), // 1135: otg.PatternFlowIpv4TosUnused + (*PatternFlowIpv6VersionCounter)(nil), // 1136: otg.PatternFlowIpv6VersionCounter + (*PatternFlowIpv6VersionMetricTag)(nil), // 1137: otg.PatternFlowIpv6VersionMetricTag + (*PatternFlowIpv6Version)(nil), // 1138: otg.PatternFlowIpv6Version + (*PatternFlowIpv6TrafficClassCounter)(nil), // 1139: otg.PatternFlowIpv6TrafficClassCounter + (*PatternFlowIpv6TrafficClassMetricTag)(nil), // 1140: otg.PatternFlowIpv6TrafficClassMetricTag + (*PatternFlowIpv6TrafficClass)(nil), // 1141: otg.PatternFlowIpv6TrafficClass + (*PatternFlowIpv6FlowLabelCounter)(nil), // 1142: otg.PatternFlowIpv6FlowLabelCounter + (*PatternFlowIpv6FlowLabelMetricTag)(nil), // 1143: otg.PatternFlowIpv6FlowLabelMetricTag + (*PatternFlowIpv6FlowLabelRandom)(nil), // 1144: otg.PatternFlowIpv6FlowLabelRandom + (*PatternFlowIpv6FlowLabel)(nil), // 1145: otg.PatternFlowIpv6FlowLabel + (*PatternFlowIpv6PayloadLengthCounter)(nil), // 1146: otg.PatternFlowIpv6PayloadLengthCounter + (*PatternFlowIpv6PayloadLengthMetricTag)(nil), // 1147: otg.PatternFlowIpv6PayloadLengthMetricTag + (*PatternFlowIpv6PayloadLength)(nil), // 1148: otg.PatternFlowIpv6PayloadLength + (*PatternFlowIpv6NextHeaderCounter)(nil), // 1149: otg.PatternFlowIpv6NextHeaderCounter + (*PatternFlowIpv6NextHeaderMetricTag)(nil), // 1150: otg.PatternFlowIpv6NextHeaderMetricTag + (*PatternFlowIpv6NextHeader)(nil), // 1151: otg.PatternFlowIpv6NextHeader + (*PatternFlowIpv6HopLimitCounter)(nil), // 1152: otg.PatternFlowIpv6HopLimitCounter + (*PatternFlowIpv6HopLimitMetricTag)(nil), // 1153: otg.PatternFlowIpv6HopLimitMetricTag + (*PatternFlowIpv6HopLimit)(nil), // 1154: otg.PatternFlowIpv6HopLimit + (*PatternFlowIpv6SrcCounter)(nil), // 1155: otg.PatternFlowIpv6SrcCounter + (*PatternFlowIpv6SrcMetricTag)(nil), // 1156: otg.PatternFlowIpv6SrcMetricTag + (*PatternFlowIpv6Src)(nil), // 1157: otg.PatternFlowIpv6Src + (*PatternFlowIpv6DstCounter)(nil), // 1158: otg.PatternFlowIpv6DstCounter + (*PatternFlowIpv6DstMetricTag)(nil), // 1159: otg.PatternFlowIpv6DstMetricTag + (*PatternFlowIpv6Dst)(nil), // 1160: otg.PatternFlowIpv6Dst + (*PatternFlowPfcPauseDstCounter)(nil), // 1161: otg.PatternFlowPfcPauseDstCounter + (*PatternFlowPfcPauseDstMetricTag)(nil), // 1162: otg.PatternFlowPfcPauseDstMetricTag + (*PatternFlowPfcPauseDst)(nil), // 1163: otg.PatternFlowPfcPauseDst + (*PatternFlowPfcPauseSrcCounter)(nil), // 1164: otg.PatternFlowPfcPauseSrcCounter + (*PatternFlowPfcPauseSrcMetricTag)(nil), // 1165: otg.PatternFlowPfcPauseSrcMetricTag + (*PatternFlowPfcPauseSrc)(nil), // 1166: otg.PatternFlowPfcPauseSrc + (*PatternFlowPfcPauseEtherTypeCounter)(nil), // 1167: otg.PatternFlowPfcPauseEtherTypeCounter + (*PatternFlowPfcPauseEtherTypeMetricTag)(nil), // 1168: otg.PatternFlowPfcPauseEtherTypeMetricTag + (*PatternFlowPfcPauseEtherType)(nil), // 1169: otg.PatternFlowPfcPauseEtherType + (*PatternFlowPfcPauseControlOpCodeCounter)(nil), // 1170: otg.PatternFlowPfcPauseControlOpCodeCounter + (*PatternFlowPfcPauseControlOpCodeMetricTag)(nil), // 1171: otg.PatternFlowPfcPauseControlOpCodeMetricTag + (*PatternFlowPfcPauseControlOpCode)(nil), // 1172: otg.PatternFlowPfcPauseControlOpCode + (*PatternFlowPfcPauseClassEnableVectorCounter)(nil), // 1173: otg.PatternFlowPfcPauseClassEnableVectorCounter + (*PatternFlowPfcPauseClassEnableVectorMetricTag)(nil), // 1174: otg.PatternFlowPfcPauseClassEnableVectorMetricTag + (*PatternFlowPfcPauseClassEnableVector)(nil), // 1175: otg.PatternFlowPfcPauseClassEnableVector + (*PatternFlowPfcPausePauseClass0Counter)(nil), // 1176: otg.PatternFlowPfcPausePauseClass0Counter + (*PatternFlowPfcPausePauseClass0MetricTag)(nil), // 1177: otg.PatternFlowPfcPausePauseClass0MetricTag + (*PatternFlowPfcPausePauseClass0)(nil), // 1178: otg.PatternFlowPfcPausePauseClass0 + (*PatternFlowPfcPausePauseClass1Counter)(nil), // 1179: otg.PatternFlowPfcPausePauseClass1Counter + (*PatternFlowPfcPausePauseClass1MetricTag)(nil), // 1180: otg.PatternFlowPfcPausePauseClass1MetricTag + (*PatternFlowPfcPausePauseClass1)(nil), // 1181: otg.PatternFlowPfcPausePauseClass1 + (*PatternFlowPfcPausePauseClass2Counter)(nil), // 1182: otg.PatternFlowPfcPausePauseClass2Counter + (*PatternFlowPfcPausePauseClass2MetricTag)(nil), // 1183: otg.PatternFlowPfcPausePauseClass2MetricTag + (*PatternFlowPfcPausePauseClass2)(nil), // 1184: otg.PatternFlowPfcPausePauseClass2 + (*PatternFlowPfcPausePauseClass3Counter)(nil), // 1185: otg.PatternFlowPfcPausePauseClass3Counter + (*PatternFlowPfcPausePauseClass3MetricTag)(nil), // 1186: otg.PatternFlowPfcPausePauseClass3MetricTag + (*PatternFlowPfcPausePauseClass3)(nil), // 1187: otg.PatternFlowPfcPausePauseClass3 + (*PatternFlowPfcPausePauseClass4Counter)(nil), // 1188: otg.PatternFlowPfcPausePauseClass4Counter + (*PatternFlowPfcPausePauseClass4MetricTag)(nil), // 1189: otg.PatternFlowPfcPausePauseClass4MetricTag + (*PatternFlowPfcPausePauseClass4)(nil), // 1190: otg.PatternFlowPfcPausePauseClass4 + (*PatternFlowPfcPausePauseClass5Counter)(nil), // 1191: otg.PatternFlowPfcPausePauseClass5Counter + (*PatternFlowPfcPausePauseClass5MetricTag)(nil), // 1192: otg.PatternFlowPfcPausePauseClass5MetricTag + (*PatternFlowPfcPausePauseClass5)(nil), // 1193: otg.PatternFlowPfcPausePauseClass5 + (*PatternFlowPfcPausePauseClass6Counter)(nil), // 1194: otg.PatternFlowPfcPausePauseClass6Counter + (*PatternFlowPfcPausePauseClass6MetricTag)(nil), // 1195: otg.PatternFlowPfcPausePauseClass6MetricTag + (*PatternFlowPfcPausePauseClass6)(nil), // 1196: otg.PatternFlowPfcPausePauseClass6 + (*PatternFlowPfcPausePauseClass7Counter)(nil), // 1197: otg.PatternFlowPfcPausePauseClass7Counter + (*PatternFlowPfcPausePauseClass7MetricTag)(nil), // 1198: otg.PatternFlowPfcPausePauseClass7MetricTag + (*PatternFlowPfcPausePauseClass7)(nil), // 1199: otg.PatternFlowPfcPausePauseClass7 + (*PatternFlowEthernetPauseDstCounter)(nil), // 1200: otg.PatternFlowEthernetPauseDstCounter + (*PatternFlowEthernetPauseDstMetricTag)(nil), // 1201: otg.PatternFlowEthernetPauseDstMetricTag + (*PatternFlowEthernetPauseDst)(nil), // 1202: otg.PatternFlowEthernetPauseDst + (*PatternFlowEthernetPauseSrcCounter)(nil), // 1203: otg.PatternFlowEthernetPauseSrcCounter + (*PatternFlowEthernetPauseSrcMetricTag)(nil), // 1204: otg.PatternFlowEthernetPauseSrcMetricTag + (*PatternFlowEthernetPauseSrc)(nil), // 1205: otg.PatternFlowEthernetPauseSrc + (*PatternFlowEthernetPauseEtherTypeCounter)(nil), // 1206: otg.PatternFlowEthernetPauseEtherTypeCounter + (*PatternFlowEthernetPauseEtherTypeMetricTag)(nil), // 1207: otg.PatternFlowEthernetPauseEtherTypeMetricTag + (*PatternFlowEthernetPauseEtherType)(nil), // 1208: otg.PatternFlowEthernetPauseEtherType + (*PatternFlowEthernetPauseControlOpCodeCounter)(nil), // 1209: otg.PatternFlowEthernetPauseControlOpCodeCounter + (*PatternFlowEthernetPauseControlOpCodeMetricTag)(nil), // 1210: otg.PatternFlowEthernetPauseControlOpCodeMetricTag + (*PatternFlowEthernetPauseControlOpCode)(nil), // 1211: otg.PatternFlowEthernetPauseControlOpCode + (*PatternFlowEthernetPauseTimeCounter)(nil), // 1212: otg.PatternFlowEthernetPauseTimeCounter + (*PatternFlowEthernetPauseTimeMetricTag)(nil), // 1213: otg.PatternFlowEthernetPauseTimeMetricTag + (*PatternFlowEthernetPauseTime)(nil), // 1214: otg.PatternFlowEthernetPauseTime + (*PatternFlowTcpSrcPortCounter)(nil), // 1215: otg.PatternFlowTcpSrcPortCounter + (*PatternFlowTcpSrcPortMetricTag)(nil), // 1216: otg.PatternFlowTcpSrcPortMetricTag + (*PatternFlowTcpSrcPortRandom)(nil), // 1217: otg.PatternFlowTcpSrcPortRandom + (*PatternFlowTcpSrcPort)(nil), // 1218: otg.PatternFlowTcpSrcPort + (*PatternFlowTcpDstPortCounter)(nil), // 1219: otg.PatternFlowTcpDstPortCounter + (*PatternFlowTcpDstPortMetricTag)(nil), // 1220: otg.PatternFlowTcpDstPortMetricTag + (*PatternFlowTcpDstPortRandom)(nil), // 1221: otg.PatternFlowTcpDstPortRandom + (*PatternFlowTcpDstPort)(nil), // 1222: otg.PatternFlowTcpDstPort + (*PatternFlowTcpSeqNumCounter)(nil), // 1223: otg.PatternFlowTcpSeqNumCounter + (*PatternFlowTcpSeqNumMetricTag)(nil), // 1224: otg.PatternFlowTcpSeqNumMetricTag + (*PatternFlowTcpSeqNum)(nil), // 1225: otg.PatternFlowTcpSeqNum + (*PatternFlowTcpAckNumCounter)(nil), // 1226: otg.PatternFlowTcpAckNumCounter + (*PatternFlowTcpAckNumMetricTag)(nil), // 1227: otg.PatternFlowTcpAckNumMetricTag + (*PatternFlowTcpAckNum)(nil), // 1228: otg.PatternFlowTcpAckNum + (*PatternFlowTcpDataOffsetCounter)(nil), // 1229: otg.PatternFlowTcpDataOffsetCounter + (*PatternFlowTcpDataOffsetMetricTag)(nil), // 1230: otg.PatternFlowTcpDataOffsetMetricTag + (*PatternFlowTcpDataOffset)(nil), // 1231: otg.PatternFlowTcpDataOffset + (*PatternFlowTcpEcnNsCounter)(nil), // 1232: otg.PatternFlowTcpEcnNsCounter + (*PatternFlowTcpEcnNsMetricTag)(nil), // 1233: otg.PatternFlowTcpEcnNsMetricTag + (*PatternFlowTcpEcnNs)(nil), // 1234: otg.PatternFlowTcpEcnNs + (*PatternFlowTcpEcnCwrCounter)(nil), // 1235: otg.PatternFlowTcpEcnCwrCounter + (*PatternFlowTcpEcnCwrMetricTag)(nil), // 1236: otg.PatternFlowTcpEcnCwrMetricTag + (*PatternFlowTcpEcnCwr)(nil), // 1237: otg.PatternFlowTcpEcnCwr + (*PatternFlowTcpEcnEchoCounter)(nil), // 1238: otg.PatternFlowTcpEcnEchoCounter + (*PatternFlowTcpEcnEchoMetricTag)(nil), // 1239: otg.PatternFlowTcpEcnEchoMetricTag + (*PatternFlowTcpEcnEcho)(nil), // 1240: otg.PatternFlowTcpEcnEcho + (*PatternFlowTcpCtlUrgCounter)(nil), // 1241: otg.PatternFlowTcpCtlUrgCounter + (*PatternFlowTcpCtlUrgMetricTag)(nil), // 1242: otg.PatternFlowTcpCtlUrgMetricTag + (*PatternFlowTcpCtlUrg)(nil), // 1243: otg.PatternFlowTcpCtlUrg + (*PatternFlowTcpCtlAckCounter)(nil), // 1244: otg.PatternFlowTcpCtlAckCounter + (*PatternFlowTcpCtlAckMetricTag)(nil), // 1245: otg.PatternFlowTcpCtlAckMetricTag + (*PatternFlowTcpCtlAck)(nil), // 1246: otg.PatternFlowTcpCtlAck + (*PatternFlowTcpCtlPshCounter)(nil), // 1247: otg.PatternFlowTcpCtlPshCounter + (*PatternFlowTcpCtlPshMetricTag)(nil), // 1248: otg.PatternFlowTcpCtlPshMetricTag + (*PatternFlowTcpCtlPsh)(nil), // 1249: otg.PatternFlowTcpCtlPsh + (*PatternFlowTcpCtlRstCounter)(nil), // 1250: otg.PatternFlowTcpCtlRstCounter + (*PatternFlowTcpCtlRstMetricTag)(nil), // 1251: otg.PatternFlowTcpCtlRstMetricTag + (*PatternFlowTcpCtlRst)(nil), // 1252: otg.PatternFlowTcpCtlRst + (*PatternFlowTcpCtlSynCounter)(nil), // 1253: otg.PatternFlowTcpCtlSynCounter + (*PatternFlowTcpCtlSynMetricTag)(nil), // 1254: otg.PatternFlowTcpCtlSynMetricTag + (*PatternFlowTcpCtlSyn)(nil), // 1255: otg.PatternFlowTcpCtlSyn + (*PatternFlowTcpCtlFinCounter)(nil), // 1256: otg.PatternFlowTcpCtlFinCounter + (*PatternFlowTcpCtlFinMetricTag)(nil), // 1257: otg.PatternFlowTcpCtlFinMetricTag + (*PatternFlowTcpCtlFin)(nil), // 1258: otg.PatternFlowTcpCtlFin + (*PatternFlowTcpWindowCounter)(nil), // 1259: otg.PatternFlowTcpWindowCounter + (*PatternFlowTcpWindowMetricTag)(nil), // 1260: otg.PatternFlowTcpWindowMetricTag + (*PatternFlowTcpWindow)(nil), // 1261: otg.PatternFlowTcpWindow + (*PatternFlowTcpChecksum)(nil), // 1262: otg.PatternFlowTcpChecksum + (*PatternFlowUdpSrcPortCounter)(nil), // 1263: otg.PatternFlowUdpSrcPortCounter + (*PatternFlowUdpSrcPortMetricTag)(nil), // 1264: otg.PatternFlowUdpSrcPortMetricTag + (*PatternFlowUdpSrcPortRandom)(nil), // 1265: otg.PatternFlowUdpSrcPortRandom + (*PatternFlowUdpSrcPort)(nil), // 1266: otg.PatternFlowUdpSrcPort + (*PatternFlowUdpDstPortCounter)(nil), // 1267: otg.PatternFlowUdpDstPortCounter + (*PatternFlowUdpDstPortMetricTag)(nil), // 1268: otg.PatternFlowUdpDstPortMetricTag + (*PatternFlowUdpDstPortRandom)(nil), // 1269: otg.PatternFlowUdpDstPortRandom + (*PatternFlowUdpDstPort)(nil), // 1270: otg.PatternFlowUdpDstPort + (*PatternFlowUdpLengthCounter)(nil), // 1271: otg.PatternFlowUdpLengthCounter + (*PatternFlowUdpLengthMetricTag)(nil), // 1272: otg.PatternFlowUdpLengthMetricTag + (*PatternFlowUdpLength)(nil), // 1273: otg.PatternFlowUdpLength + (*PatternFlowUdpChecksum)(nil), // 1274: otg.PatternFlowUdpChecksum + (*PatternFlowGreChecksumPresentCounter)(nil), // 1275: otg.PatternFlowGreChecksumPresentCounter + (*PatternFlowGreChecksumPresentMetricTag)(nil), // 1276: otg.PatternFlowGreChecksumPresentMetricTag + (*PatternFlowGreChecksumPresent)(nil), // 1277: otg.PatternFlowGreChecksumPresent + (*PatternFlowGreReserved0Counter)(nil), // 1278: otg.PatternFlowGreReserved0Counter + (*PatternFlowGreReserved0MetricTag)(nil), // 1279: otg.PatternFlowGreReserved0MetricTag + (*PatternFlowGreReserved0)(nil), // 1280: otg.PatternFlowGreReserved0 + (*PatternFlowGreVersionCounter)(nil), // 1281: otg.PatternFlowGreVersionCounter + (*PatternFlowGreVersionMetricTag)(nil), // 1282: otg.PatternFlowGreVersionMetricTag + (*PatternFlowGreVersion)(nil), // 1283: otg.PatternFlowGreVersion + (*PatternFlowGreProtocolCounter)(nil), // 1284: otg.PatternFlowGreProtocolCounter + (*PatternFlowGreProtocolMetricTag)(nil), // 1285: otg.PatternFlowGreProtocolMetricTag + (*PatternFlowGreProtocol)(nil), // 1286: otg.PatternFlowGreProtocol + (*PatternFlowGreChecksum)(nil), // 1287: otg.PatternFlowGreChecksum + (*PatternFlowGreReserved1Counter)(nil), // 1288: otg.PatternFlowGreReserved1Counter + (*PatternFlowGreReserved1MetricTag)(nil), // 1289: otg.PatternFlowGreReserved1MetricTag + (*PatternFlowGreReserved1)(nil), // 1290: otg.PatternFlowGreReserved1 + (*PatternFlowGtpv1VersionCounter)(nil), // 1291: otg.PatternFlowGtpv1VersionCounter + (*PatternFlowGtpv1VersionMetricTag)(nil), // 1292: otg.PatternFlowGtpv1VersionMetricTag + (*PatternFlowGtpv1Version)(nil), // 1293: otg.PatternFlowGtpv1Version + (*PatternFlowGtpv1ProtocolTypeCounter)(nil), // 1294: otg.PatternFlowGtpv1ProtocolTypeCounter + (*PatternFlowGtpv1ProtocolTypeMetricTag)(nil), // 1295: otg.PatternFlowGtpv1ProtocolTypeMetricTag + (*PatternFlowGtpv1ProtocolType)(nil), // 1296: otg.PatternFlowGtpv1ProtocolType + (*PatternFlowGtpv1ReservedCounter)(nil), // 1297: otg.PatternFlowGtpv1ReservedCounter + (*PatternFlowGtpv1ReservedMetricTag)(nil), // 1298: otg.PatternFlowGtpv1ReservedMetricTag + (*PatternFlowGtpv1Reserved)(nil), // 1299: otg.PatternFlowGtpv1Reserved + (*PatternFlowGtpv1EFlagCounter)(nil), // 1300: otg.PatternFlowGtpv1EFlagCounter + (*PatternFlowGtpv1EFlagMetricTag)(nil), // 1301: otg.PatternFlowGtpv1EFlagMetricTag + (*PatternFlowGtpv1EFlag)(nil), // 1302: otg.PatternFlowGtpv1EFlag + (*PatternFlowGtpv1SFlagCounter)(nil), // 1303: otg.PatternFlowGtpv1SFlagCounter + (*PatternFlowGtpv1SFlagMetricTag)(nil), // 1304: otg.PatternFlowGtpv1SFlagMetricTag + (*PatternFlowGtpv1SFlag)(nil), // 1305: otg.PatternFlowGtpv1SFlag + (*PatternFlowGtpv1PnFlagCounter)(nil), // 1306: otg.PatternFlowGtpv1PnFlagCounter + (*PatternFlowGtpv1PnFlagMetricTag)(nil), // 1307: otg.PatternFlowGtpv1PnFlagMetricTag + (*PatternFlowGtpv1PnFlag)(nil), // 1308: otg.PatternFlowGtpv1PnFlag + (*PatternFlowGtpv1MessageTypeCounter)(nil), // 1309: otg.PatternFlowGtpv1MessageTypeCounter + (*PatternFlowGtpv1MessageTypeMetricTag)(nil), // 1310: otg.PatternFlowGtpv1MessageTypeMetricTag + (*PatternFlowGtpv1MessageType)(nil), // 1311: otg.PatternFlowGtpv1MessageType + (*PatternFlowGtpv1MessageLengthCounter)(nil), // 1312: otg.PatternFlowGtpv1MessageLengthCounter + (*PatternFlowGtpv1MessageLengthMetricTag)(nil), // 1313: otg.PatternFlowGtpv1MessageLengthMetricTag + (*PatternFlowGtpv1MessageLength)(nil), // 1314: otg.PatternFlowGtpv1MessageLength + (*PatternFlowGtpv1TeidCounter)(nil), // 1315: otg.PatternFlowGtpv1TeidCounter + (*PatternFlowGtpv1TeidMetricTag)(nil), // 1316: otg.PatternFlowGtpv1TeidMetricTag + (*PatternFlowGtpv1Teid)(nil), // 1317: otg.PatternFlowGtpv1Teid + (*PatternFlowGtpv1SquenceNumberCounter)(nil), // 1318: otg.PatternFlowGtpv1SquenceNumberCounter + (*PatternFlowGtpv1SquenceNumberMetricTag)(nil), // 1319: otg.PatternFlowGtpv1SquenceNumberMetricTag + (*PatternFlowGtpv1SquenceNumber)(nil), // 1320: otg.PatternFlowGtpv1SquenceNumber + (*PatternFlowGtpv1NPduNumberCounter)(nil), // 1321: otg.PatternFlowGtpv1NPduNumberCounter + (*PatternFlowGtpv1NPduNumberMetricTag)(nil), // 1322: otg.PatternFlowGtpv1NPduNumberMetricTag + (*PatternFlowGtpv1NPduNumber)(nil), // 1323: otg.PatternFlowGtpv1NPduNumber + (*PatternFlowGtpv1NextExtensionHeaderTypeCounter)(nil), // 1324: otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter + (*PatternFlowGtpv1NextExtensionHeaderTypeMetricTag)(nil), // 1325: otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + (*PatternFlowGtpv1NextExtensionHeaderType)(nil), // 1326: otg.PatternFlowGtpv1NextExtensionHeaderType + (*PatternFlowGtpExtensionExtensionLengthCounter)(nil), // 1327: otg.PatternFlowGtpExtensionExtensionLengthCounter + (*PatternFlowGtpExtensionExtensionLengthMetricTag)(nil), // 1328: otg.PatternFlowGtpExtensionExtensionLengthMetricTag + (*PatternFlowGtpExtensionExtensionLength)(nil), // 1329: otg.PatternFlowGtpExtensionExtensionLength + (*PatternFlowGtpExtensionContentsCounter)(nil), // 1330: otg.PatternFlowGtpExtensionContentsCounter + (*PatternFlowGtpExtensionContentsMetricTag)(nil), // 1331: otg.PatternFlowGtpExtensionContentsMetricTag + (*PatternFlowGtpExtensionContents)(nil), // 1332: otg.PatternFlowGtpExtensionContents + (*PatternFlowGtpExtensionNextExtensionHeaderCounter)(nil), // 1333: otg.PatternFlowGtpExtensionNextExtensionHeaderCounter + (*PatternFlowGtpExtensionNextExtensionHeaderMetricTag)(nil), // 1334: otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag + (*PatternFlowGtpExtensionNextExtensionHeader)(nil), // 1335: otg.PatternFlowGtpExtensionNextExtensionHeader + (*PatternFlowGtpv2VersionCounter)(nil), // 1336: otg.PatternFlowGtpv2VersionCounter + (*PatternFlowGtpv2VersionMetricTag)(nil), // 1337: otg.PatternFlowGtpv2VersionMetricTag + (*PatternFlowGtpv2Version)(nil), // 1338: otg.PatternFlowGtpv2Version + (*PatternFlowGtpv2PiggybackingFlagCounter)(nil), // 1339: otg.PatternFlowGtpv2PiggybackingFlagCounter + (*PatternFlowGtpv2PiggybackingFlagMetricTag)(nil), // 1340: otg.PatternFlowGtpv2PiggybackingFlagMetricTag + (*PatternFlowGtpv2PiggybackingFlag)(nil), // 1341: otg.PatternFlowGtpv2PiggybackingFlag + (*PatternFlowGtpv2TeidFlagCounter)(nil), // 1342: otg.PatternFlowGtpv2TeidFlagCounter + (*PatternFlowGtpv2TeidFlagMetricTag)(nil), // 1343: otg.PatternFlowGtpv2TeidFlagMetricTag + (*PatternFlowGtpv2TeidFlag)(nil), // 1344: otg.PatternFlowGtpv2TeidFlag + (*PatternFlowGtpv2Spare1Counter)(nil), // 1345: otg.PatternFlowGtpv2Spare1Counter + (*PatternFlowGtpv2Spare1MetricTag)(nil), // 1346: otg.PatternFlowGtpv2Spare1MetricTag + (*PatternFlowGtpv2Spare1)(nil), // 1347: otg.PatternFlowGtpv2Spare1 + (*PatternFlowGtpv2MessageTypeCounter)(nil), // 1348: otg.PatternFlowGtpv2MessageTypeCounter + (*PatternFlowGtpv2MessageTypeMetricTag)(nil), // 1349: otg.PatternFlowGtpv2MessageTypeMetricTag + (*PatternFlowGtpv2MessageType)(nil), // 1350: otg.PatternFlowGtpv2MessageType + (*PatternFlowGtpv2MessageLengthCounter)(nil), // 1351: otg.PatternFlowGtpv2MessageLengthCounter + (*PatternFlowGtpv2MessageLengthMetricTag)(nil), // 1352: otg.PatternFlowGtpv2MessageLengthMetricTag + (*PatternFlowGtpv2MessageLength)(nil), // 1353: otg.PatternFlowGtpv2MessageLength + (*PatternFlowGtpv2TeidCounter)(nil), // 1354: otg.PatternFlowGtpv2TeidCounter + (*PatternFlowGtpv2TeidMetricTag)(nil), // 1355: otg.PatternFlowGtpv2TeidMetricTag + (*PatternFlowGtpv2Teid)(nil), // 1356: otg.PatternFlowGtpv2Teid + (*PatternFlowGtpv2SequenceNumberCounter)(nil), // 1357: otg.PatternFlowGtpv2SequenceNumberCounter + (*PatternFlowGtpv2SequenceNumberMetricTag)(nil), // 1358: otg.PatternFlowGtpv2SequenceNumberMetricTag + (*PatternFlowGtpv2SequenceNumber)(nil), // 1359: otg.PatternFlowGtpv2SequenceNumber + (*PatternFlowGtpv2Spare2Counter)(nil), // 1360: otg.PatternFlowGtpv2Spare2Counter + (*PatternFlowGtpv2Spare2MetricTag)(nil), // 1361: otg.PatternFlowGtpv2Spare2MetricTag + (*PatternFlowGtpv2Spare2)(nil), // 1362: otg.PatternFlowGtpv2Spare2 + (*PatternFlowArpHardwareTypeCounter)(nil), // 1363: otg.PatternFlowArpHardwareTypeCounter + (*PatternFlowArpHardwareTypeMetricTag)(nil), // 1364: otg.PatternFlowArpHardwareTypeMetricTag + (*PatternFlowArpHardwareType)(nil), // 1365: otg.PatternFlowArpHardwareType + (*PatternFlowArpProtocolTypeCounter)(nil), // 1366: otg.PatternFlowArpProtocolTypeCounter + (*PatternFlowArpProtocolTypeMetricTag)(nil), // 1367: otg.PatternFlowArpProtocolTypeMetricTag + (*PatternFlowArpProtocolType)(nil), // 1368: otg.PatternFlowArpProtocolType + (*PatternFlowArpHardwareLengthCounter)(nil), // 1369: otg.PatternFlowArpHardwareLengthCounter + (*PatternFlowArpHardwareLengthMetricTag)(nil), // 1370: otg.PatternFlowArpHardwareLengthMetricTag + (*PatternFlowArpHardwareLength)(nil), // 1371: otg.PatternFlowArpHardwareLength + (*PatternFlowArpProtocolLengthCounter)(nil), // 1372: otg.PatternFlowArpProtocolLengthCounter + (*PatternFlowArpProtocolLengthMetricTag)(nil), // 1373: otg.PatternFlowArpProtocolLengthMetricTag + (*PatternFlowArpProtocolLength)(nil), // 1374: otg.PatternFlowArpProtocolLength + (*PatternFlowArpOperationCounter)(nil), // 1375: otg.PatternFlowArpOperationCounter + (*PatternFlowArpOperationMetricTag)(nil), // 1376: otg.PatternFlowArpOperationMetricTag + (*PatternFlowArpOperation)(nil), // 1377: otg.PatternFlowArpOperation + (*PatternFlowArpSenderHardwareAddrCounter)(nil), // 1378: otg.PatternFlowArpSenderHardwareAddrCounter + (*PatternFlowArpSenderHardwareAddrMetricTag)(nil), // 1379: otg.PatternFlowArpSenderHardwareAddrMetricTag + (*PatternFlowArpSenderHardwareAddr)(nil), // 1380: otg.PatternFlowArpSenderHardwareAddr + (*PatternFlowArpSenderProtocolAddrCounter)(nil), // 1381: otg.PatternFlowArpSenderProtocolAddrCounter + (*PatternFlowArpSenderProtocolAddrMetricTag)(nil), // 1382: otg.PatternFlowArpSenderProtocolAddrMetricTag + (*PatternFlowArpSenderProtocolAddr)(nil), // 1383: otg.PatternFlowArpSenderProtocolAddr + (*PatternFlowArpTargetHardwareAddrCounter)(nil), // 1384: otg.PatternFlowArpTargetHardwareAddrCounter + (*PatternFlowArpTargetHardwareAddrMetricTag)(nil), // 1385: otg.PatternFlowArpTargetHardwareAddrMetricTag + (*PatternFlowArpTargetHardwareAddr)(nil), // 1386: otg.PatternFlowArpTargetHardwareAddr + (*PatternFlowArpTargetProtocolAddrCounter)(nil), // 1387: otg.PatternFlowArpTargetProtocolAddrCounter + (*PatternFlowArpTargetProtocolAddrMetricTag)(nil), // 1388: otg.PatternFlowArpTargetProtocolAddrMetricTag + (*PatternFlowArpTargetProtocolAddr)(nil), // 1389: otg.PatternFlowArpTargetProtocolAddr + (*PatternFlowIcmpEchoTypeCounter)(nil), // 1390: otg.PatternFlowIcmpEchoTypeCounter + (*PatternFlowIcmpEchoTypeMetricTag)(nil), // 1391: otg.PatternFlowIcmpEchoTypeMetricTag + (*PatternFlowIcmpEchoType)(nil), // 1392: otg.PatternFlowIcmpEchoType + (*PatternFlowIcmpEchoCodeCounter)(nil), // 1393: otg.PatternFlowIcmpEchoCodeCounter + (*PatternFlowIcmpEchoCodeMetricTag)(nil), // 1394: otg.PatternFlowIcmpEchoCodeMetricTag + (*PatternFlowIcmpEchoCode)(nil), // 1395: otg.PatternFlowIcmpEchoCode + (*PatternFlowIcmpEchoChecksum)(nil), // 1396: otg.PatternFlowIcmpEchoChecksum + (*PatternFlowIcmpEchoIdentifierCounter)(nil), // 1397: otg.PatternFlowIcmpEchoIdentifierCounter + (*PatternFlowIcmpEchoIdentifierMetricTag)(nil), // 1398: otg.PatternFlowIcmpEchoIdentifierMetricTag + (*PatternFlowIcmpEchoIdentifier)(nil), // 1399: otg.PatternFlowIcmpEchoIdentifier + (*PatternFlowIcmpEchoSequenceNumberCounter)(nil), // 1400: otg.PatternFlowIcmpEchoSequenceNumberCounter + (*PatternFlowIcmpEchoSequenceNumberMetricTag)(nil), // 1401: otg.PatternFlowIcmpEchoSequenceNumberMetricTag + (*PatternFlowIcmpEchoSequenceNumber)(nil), // 1402: otg.PatternFlowIcmpEchoSequenceNumber + (*PatternFlowIcmpCommonChecksum)(nil), // 1403: otg.PatternFlowIcmpCommonChecksum + (*PatternFlowIcmpNextFieldsIdentifierCounter)(nil), // 1404: otg.PatternFlowIcmpNextFieldsIdentifierCounter + (*PatternFlowIcmpNextFieldsIdentifierMetricTag)(nil), // 1405: otg.PatternFlowIcmpNextFieldsIdentifierMetricTag + (*PatternFlowIcmpNextFieldsIdentifier)(nil), // 1406: otg.PatternFlowIcmpNextFieldsIdentifier + (*PatternFlowIcmpNextFieldsSequenceNumberCounter)(nil), // 1407: otg.PatternFlowIcmpNextFieldsSequenceNumberCounter + (*PatternFlowIcmpNextFieldsSequenceNumberMetricTag)(nil), // 1408: otg.PatternFlowIcmpNextFieldsSequenceNumberMetricTag + (*PatternFlowIcmpNextFieldsSequenceNumber)(nil), // 1409: otg.PatternFlowIcmpNextFieldsSequenceNumber + (*PatternFlowIcmpv6EchoTypeCounter)(nil), // 1410: otg.PatternFlowIcmpv6EchoTypeCounter + (*PatternFlowIcmpv6EchoTypeMetricTag)(nil), // 1411: otg.PatternFlowIcmpv6EchoTypeMetricTag + (*PatternFlowIcmpv6EchoType)(nil), // 1412: otg.PatternFlowIcmpv6EchoType + (*PatternFlowIcmpv6EchoCodeCounter)(nil), // 1413: otg.PatternFlowIcmpv6EchoCodeCounter + (*PatternFlowIcmpv6EchoCodeMetricTag)(nil), // 1414: otg.PatternFlowIcmpv6EchoCodeMetricTag + (*PatternFlowIcmpv6EchoCode)(nil), // 1415: otg.PatternFlowIcmpv6EchoCode + (*PatternFlowIcmpv6EchoIdentifierCounter)(nil), // 1416: otg.PatternFlowIcmpv6EchoIdentifierCounter + (*PatternFlowIcmpv6EchoIdentifierMetricTag)(nil), // 1417: otg.PatternFlowIcmpv6EchoIdentifierMetricTag + (*PatternFlowIcmpv6EchoIdentifier)(nil), // 1418: otg.PatternFlowIcmpv6EchoIdentifier + (*PatternFlowIcmpv6EchoSequenceNumberCounter)(nil), // 1419: otg.PatternFlowIcmpv6EchoSequenceNumberCounter + (*PatternFlowIcmpv6EchoSequenceNumberMetricTag)(nil), // 1420: otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag + (*PatternFlowIcmpv6EchoSequenceNumber)(nil), // 1421: otg.PatternFlowIcmpv6EchoSequenceNumber + (*PatternFlowIcmpv6EchoChecksum)(nil), // 1422: otg.PatternFlowIcmpv6EchoChecksum + (*PatternFlowIcmpv6CommonChecksum)(nil), // 1423: otg.PatternFlowIcmpv6CommonChecksum + (*PatternFlowPppAddressCounter)(nil), // 1424: otg.PatternFlowPppAddressCounter + (*PatternFlowPppAddressMetricTag)(nil), // 1425: otg.PatternFlowPppAddressMetricTag + (*PatternFlowPppAddress)(nil), // 1426: otg.PatternFlowPppAddress + (*PatternFlowPppControlCounter)(nil), // 1427: otg.PatternFlowPppControlCounter + (*PatternFlowPppControlMetricTag)(nil), // 1428: otg.PatternFlowPppControlMetricTag + (*PatternFlowPppControl)(nil), // 1429: otg.PatternFlowPppControl + (*PatternFlowPppProtocolTypeCounter)(nil), // 1430: otg.PatternFlowPppProtocolTypeCounter + (*PatternFlowPppProtocolTypeMetricTag)(nil), // 1431: otg.PatternFlowPppProtocolTypeMetricTag + (*PatternFlowPppProtocolType)(nil), // 1432: otg.PatternFlowPppProtocolType + (*PatternFlowIgmpv1VersionCounter)(nil), // 1433: otg.PatternFlowIgmpv1VersionCounter + (*PatternFlowIgmpv1VersionMetricTag)(nil), // 1434: otg.PatternFlowIgmpv1VersionMetricTag + (*PatternFlowIgmpv1Version)(nil), // 1435: otg.PatternFlowIgmpv1Version + (*PatternFlowIgmpv1TypeCounter)(nil), // 1436: otg.PatternFlowIgmpv1TypeCounter + (*PatternFlowIgmpv1TypeMetricTag)(nil), // 1437: otg.PatternFlowIgmpv1TypeMetricTag + (*PatternFlowIgmpv1Type)(nil), // 1438: otg.PatternFlowIgmpv1Type + (*PatternFlowIgmpv1UnusedCounter)(nil), // 1439: otg.PatternFlowIgmpv1UnusedCounter + (*PatternFlowIgmpv1UnusedMetricTag)(nil), // 1440: otg.PatternFlowIgmpv1UnusedMetricTag + (*PatternFlowIgmpv1Unused)(nil), // 1441: otg.PatternFlowIgmpv1Unused + (*PatternFlowIgmpv1Checksum)(nil), // 1442: otg.PatternFlowIgmpv1Checksum + (*PatternFlowIgmpv1GroupAddressCounter)(nil), // 1443: otg.PatternFlowIgmpv1GroupAddressCounter + (*PatternFlowIgmpv1GroupAddressMetricTag)(nil), // 1444: otg.PatternFlowIgmpv1GroupAddressMetricTag + (*PatternFlowIgmpv1GroupAddress)(nil), // 1445: otg.PatternFlowIgmpv1GroupAddress + (*PatternFlowMplsLabelCounter)(nil), // 1446: otg.PatternFlowMplsLabelCounter + (*PatternFlowMplsLabelMetricTag)(nil), // 1447: otg.PatternFlowMplsLabelMetricTag + (*PatternFlowMplsLabel)(nil), // 1448: otg.PatternFlowMplsLabel + (*PatternFlowMplsTrafficClassCounter)(nil), // 1449: otg.PatternFlowMplsTrafficClassCounter + (*PatternFlowMplsTrafficClassMetricTag)(nil), // 1450: otg.PatternFlowMplsTrafficClassMetricTag + (*PatternFlowMplsTrafficClass)(nil), // 1451: otg.PatternFlowMplsTrafficClass + (*PatternFlowMplsBottomOfStackCounter)(nil), // 1452: otg.PatternFlowMplsBottomOfStackCounter + (*PatternFlowMplsBottomOfStackMetricTag)(nil), // 1453: otg.PatternFlowMplsBottomOfStackMetricTag + (*PatternFlowMplsBottomOfStack)(nil), // 1454: otg.PatternFlowMplsBottomOfStack + (*PatternFlowMplsTimeToLiveCounter)(nil), // 1455: otg.PatternFlowMplsTimeToLiveCounter + (*PatternFlowMplsTimeToLiveMetricTag)(nil), // 1456: otg.PatternFlowMplsTimeToLiveMetricTag + (*PatternFlowMplsTimeToLive)(nil), // 1457: otg.PatternFlowMplsTimeToLive + (*PatternFlowSnmpv2CVersionCounter)(nil), // 1458: otg.PatternFlowSnmpv2cVersionCounter + (*PatternFlowSnmpv2CVersion)(nil), // 1459: otg.PatternFlowSnmpv2cVersion + (*PatternFlowSnmpv2CPDURequestIdCounter)(nil), // 1460: otg.PatternFlowSnmpv2cPDURequestIdCounter + (*PatternFlowSnmpv2CPDURequestId)(nil), // 1461: otg.PatternFlowSnmpv2cPDURequestId + (*PatternFlowSnmpv2CPDUErrorIndexCounter)(nil), // 1462: otg.PatternFlowSnmpv2cPDUErrorIndexCounter + (*PatternFlowSnmpv2CPDUErrorIndex)(nil), // 1463: otg.PatternFlowSnmpv2cPDUErrorIndex + (*PatternFlowSnmpv2CBulkPDURequestIdCounter)(nil), // 1464: otg.PatternFlowSnmpv2cBulkPDURequestIdCounter + (*PatternFlowSnmpv2CBulkPDURequestId)(nil), // 1465: otg.PatternFlowSnmpv2cBulkPDURequestId + (*PatternFlowSnmpv2CBulkPDUNonRepeaters)(nil), // 1466: otg.PatternFlowSnmpv2cBulkPDUNonRepeaters + (*PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter)(nil), // 1467: otg.PatternFlowSnmpv2cBulkPDUMaxRepetitionsCounter + (*PatternFlowSnmpv2CBulkPDUMaxRepetitions)(nil), // 1468: otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions + (*PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter)(nil), // 1469: otg.PatternFlowSnmpv2cVariableBindingValueIntegerValueCounter + (*PatternFlowSnmpv2CVariableBindingValueIntegerValue)(nil), // 1470: otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue + (*PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter)(nil), // 1471: otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValueCounter + (*PatternFlowSnmpv2CVariableBindingValueIpAddressValue)(nil), // 1472: otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue + (*PatternFlowSnmpv2CVariableBindingValueCounterValueCounter)(nil), // 1473: otg.PatternFlowSnmpv2cVariableBindingValueCounterValueCounter + (*PatternFlowSnmpv2CVariableBindingValueCounterValue)(nil), // 1474: otg.PatternFlowSnmpv2cVariableBindingValueCounterValue + (*PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter)(nil), // 1475: otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValueCounter + (*PatternFlowSnmpv2CVariableBindingValueTimeticksValue)(nil), // 1476: otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue + (*PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter)(nil), // 1477: otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValueCounter + (*PatternFlowSnmpv2CVariableBindingValueBigCounterValue)(nil), // 1478: otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue + (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter)(nil), // 1479: otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValueCounter + (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue)(nil), // 1480: otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue + (*PatternFlowSnmpv2CCommonRequestIdCounter)(nil), // 1481: otg.PatternFlowSnmpv2cCommonRequestIdCounter + (*PatternFlowSnmpv2CCommonRequestId)(nil), // 1482: otg.PatternFlowSnmpv2cCommonRequestId + (*PatternFlowRsvpRsvpChecksum)(nil), // 1483: otg.PatternFlowRsvpRsvpChecksum + (*PatternFlowRsvpTimeToLiveCounter)(nil), // 1484: otg.PatternFlowRsvpTimeToLiveCounter + (*PatternFlowRsvpTimeToLive)(nil), // 1485: otg.PatternFlowRsvpTimeToLive + (*PatternFlowRsvpReservedCounter)(nil), // 1486: otg.PatternFlowRsvpReservedCounter + (*PatternFlowRsvpReserved)(nil), // 1487: otg.PatternFlowRsvpReserved + (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter)(nil), // 1488: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress)(nil), // 1489: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + (*PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter)(nil), // 1490: otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + (*PatternFlowRSVPPathSessionLspTunnelIpv4Reserved)(nil), // 1491: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter)(nil), // 1492: otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId)(nil), // 1493: otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + (*PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter)(nil), // 1494: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + (*PatternFlowRSVPPathSessionExtTunnelIdAsInteger)(nil), // 1495: otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger + (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter)(nil), // 1496: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4)(nil), // 1497: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + (*PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter)(nil), // 1498: otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + (*PatternFlowRSVPPathRsvpHopIpv4Ipv4Address)(nil), // 1499: otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter)(nil), // 1500: otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle)(nil), // 1501: otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter)(nil), // 1502: otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodR)(nil), // 1503: otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter)(nil), // 1504: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit)(nil), // 1505: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter)(nil), // 1506: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address)(nil), // 1507: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter)(nil), // 1508: otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBit)(nil), // 1509: otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter)(nil), // 1510: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved)(nil), // 1511: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter)(nil), // 1512: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pidCounter + (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid)(nil), // 1513: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid + (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter)(nil), // 1514: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress)(nil), // 1515: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter)(nil), // 1516: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved)(nil), // 1517: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter)(nil), // 1518: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId)(nil), // 1519: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + (*PatternFlowRSVPPathSenderTspecIntServVersionCounter)(nil), // 1520: otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter + (*PatternFlowRSVPPathSenderTspecIntServVersion)(nil), // 1521: otg.PatternFlowRSVPPathSenderTspecIntServVersion + (*PatternFlowRSVPPathSenderTspecIntServReserved1Counter)(nil), // 1522: otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter + (*PatternFlowRSVPPathSenderTspecIntServReserved1)(nil), // 1523: otg.PatternFlowRSVPPathSenderTspecIntServReserved1 + (*PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter)(nil), // 1524: otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + (*PatternFlowRSVPPathSenderTspecIntServOverallLength)(nil), // 1525: otg.PatternFlowRSVPPathSenderTspecIntServOverallLength + (*PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter)(nil), // 1526: otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + (*PatternFlowRSVPPathSenderTspecIntServServiceHeader)(nil), // 1527: otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader + (*PatternFlowRSVPPathSenderTspecIntServZeroBitCounter)(nil), // 1528: otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + (*PatternFlowRSVPPathSenderTspecIntServZeroBit)(nil), // 1529: otg.PatternFlowRSVPPathSenderTspecIntServZeroBit + (*PatternFlowRSVPPathSenderTspecIntServReserved2Counter)(nil), // 1530: otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter + (*PatternFlowRSVPPathSenderTspecIntServReserved2)(nil), // 1531: otg.PatternFlowRSVPPathSenderTspecIntServReserved2 + (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter)(nil), // 1532: otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData)(nil), // 1533: otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter)(nil), // 1534: otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec)(nil), // 1535: otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + (*PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter)(nil), // 1536: otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + (*PatternFlowRSVPPathSenderTspecIntServParameter127Flag)(nil), // 1537: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag + (*PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter)(nil), // 1538: otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + (*PatternFlowRSVPPathSenderTspecIntServParameter127Length)(nil), // 1539: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length + (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter)(nil), // 1540: otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit)(nil), // 1541: otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter)(nil), // 1542: otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize)(nil), // 1543: otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter)(nil), // 1544: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address)(nil), // 1545: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter)(nil), // 1546: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength)(nil), // 1547: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + (*PatternFlowRSVPPathRecordRouteType1LabelFlags)(nil), // 1548: otg.PatternFlowRSVPPathRecordRouteType1LabelFlags + (*PatternFlowRSVPPathRecordRouteType1LabelCType)(nil), // 1549: otg.PatternFlowRSVPPathRecordRouteType1LabelCType + (*PatternFlowRSVPPathObjectsCustomTypeCounter)(nil), // 1550: otg.PatternFlowRSVPPathObjectsCustomTypeCounter + (*PatternFlowRSVPPathObjectsCustomType)(nil), // 1551: otg.PatternFlowRSVPPathObjectsCustomType + (*Version)(nil), // 1552: otg.Version + (*Success)(nil), // 1553: otg.Success + (*Failure)(nil), // 1554: otg.Failure + (*SetConfigRequest)(nil), // 1555: otg.SetConfigRequest + (*UpdateConfigRequest)(nil), // 1556: otg.UpdateConfigRequest + (*SetConfigResponse)(nil), // 1557: otg.SetConfigResponse + (*GetConfigResponse)(nil), // 1558: otg.GetConfigResponse + (*UpdateConfigResponse)(nil), // 1559: otg.UpdateConfigResponse + (*SetControlStateRequest)(nil), // 1560: otg.SetControlStateRequest + (*SetControlStateResponse)(nil), // 1561: otg.SetControlStateResponse + (*SetControlActionRequest)(nil), // 1562: otg.SetControlActionRequest + (*SetControlActionResponse)(nil), // 1563: otg.SetControlActionResponse + (*GetMetricsRequest)(nil), // 1564: otg.GetMetricsRequest + (*GetMetricsResponse)(nil), // 1565: otg.GetMetricsResponse + (*GetStatesRequest)(nil), // 1566: otg.GetStatesRequest + (*GetStatesResponse)(nil), // 1567: otg.GetStatesResponse + (*GetCaptureRequest)(nil), // 1568: otg.GetCaptureRequest + (*GetCaptureResponse)(nil), // 1569: otg.GetCaptureResponse + (*GetVersionResponse)(nil), // 1570: otg.GetVersionResponse + (*LagProtocol_Choice)(nil), // 1571: otg.LagProtocol.Choice + (*LagPortLacp_ActorActivity)(nil), // 1572: otg.LagPortLacp.ActorActivity + (*EthernetConnection_Choice)(nil), // 1573: otg.EthernetConnection.Choice + (*EthernetSimulatedLink_LinkType)(nil), // 1574: otg.EthernetSimulatedLink.LinkType + (*DeviceVlan_Tpid)(nil), // 1575: otg.DeviceVlan.Tpid + (*DeviceIpv4GatewayMAC_Choice)(nil), // 1576: otg.DeviceIpv4GatewayMAC.Choice + (*DeviceIpv6GatewayMAC_Choice)(nil), // 1577: otg.DeviceIpv6GatewayMAC.Choice + (*DeviceDhcpv4Client_Choice)(nil), // 1578: otg.DeviceDhcpv4client.Choice + (*DeviceDhcpv6ClientIaType_Choice)(nil), // 1579: otg.DeviceDhcpv6clientIaType.Choice + (*DeviceDhcpv6ClientDuidType_Choice)(nil), // 1580: otg.DeviceDhcpv6clientDuidType.Choice + (*Dhcpv6ClientOptionsServerIdentifier_Choice)(nil), // 1581: otg.Dhcpv6ClientOptionsServerIdentifier.Choice + (*Dhcpv6ClientOptionsDuidUuidVersion_Choice)(nil), // 1582: otg.Dhcpv6ClientOptionsDuidUuidVersion.Choice + (*Dhcpv6ClientOptionsDuidUuidVariant_Choice)(nil), // 1583: otg.Dhcpv6ClientOptionsDuidUuidVariant.Choice + (*Dhcpv6ClientOptionsOptionsRequest_Choice)(nil), // 1584: otg.Dhcpv6ClientOptionsOptionsRequest.Choice + (*Dhcpv6ClientOptionsIncludedMessages_Choice)(nil), // 1585: otg.Dhcpv6ClientOptionsIncludedMessages.Choice + (*Dhcpv6ClientOptionsMessageType_Choice)(nil), // 1586: otg.Dhcpv6ClientOptionsMessageType.Choice + (*Dhcpv6ServerOptionsIncludedMessages_Choice)(nil), // 1587: otg.Dhcpv6ServerOptionsIncludedMessages.Choice + (*Dhcpv6ServerOptionsMessageType_Choice)(nil), // 1588: otg.Dhcpv6ServerOptionsMessageType.Choice + (*Layer1_Speed)(nil), // 1589: otg.Layer1.Speed + (*Layer1_Media)(nil), // 1590: otg.Layer1.Media + (*Layer1FlowControl_Choice)(nil), // 1591: otg.Layer1FlowControl.Choice + (*Capture_Format)(nil), // 1592: otg.Capture.Format + (*CaptureFilter_Choice)(nil), // 1593: otg.CaptureFilter.Choice + (*IsisInterface_NetworkType)(nil), // 1594: otg.IsisInterface.NetworkType + (*IsisInterface_LevelType)(nil), // 1595: otg.IsisInterface.LevelType + (*IsisInterfaceAuthentication_AuthType)(nil), // 1596: otg.IsisInterfaceAuthentication.AuthType + (*IsisAuthenticationBase_AuthType)(nil), // 1597: otg.IsisAuthenticationBase.AuthType + (*IsisV4RouteRange_OriginType)(nil), // 1598: otg.IsisV4RouteRange.OriginType + (*IsisV4RouteRange_RedistributionType)(nil), // 1599: otg.IsisV4RouteRange.RedistributionType + (*IsisV6RouteRange_OriginType)(nil), // 1600: otg.IsisV6RouteRange.OriginType + (*IsisV6RouteRange_RedistributionType)(nil), // 1601: otg.IsisV6RouteRange.RedistributionType + (*DeviceBgpMessageHeaderError_Subcode)(nil), // 1602: otg.DeviceBgpMessageHeaderError.Subcode + (*DeviceBgpOpenMessageError_Subcode)(nil), // 1603: otg.DeviceBgpOpenMessageError.Subcode + (*DeviceBgpUpdateMessageError_Subcode)(nil), // 1604: otg.DeviceBgpUpdateMessageError.Subcode + (*DeviceBgpCeaseError_Subcode)(nil), // 1605: otg.DeviceBgpCeaseError.Subcode + (*BgpV4Peer_AsType)(nil), // 1606: otg.BgpV4Peer.AsType + (*BgpV4Peer_AsNumberWidth)(nil), // 1607: otg.BgpV4Peer.AsNumberWidth + (*BgpV4EthernetSegment_ActiveMode)(nil), // 1608: otg.BgpV4EthernetSegment.ActiveMode + (*BgpRouteAdvanced_Origin)(nil), // 1609: otg.BgpRouteAdvanced.Origin + (*BgpCommunity_Type)(nil), // 1610: otg.BgpCommunity.Type + (*BgpExtCommunity_Type)(nil), // 1611: otg.BgpExtCommunity.Type + (*BgpExtCommunity_Subtype)(nil), // 1612: otg.BgpExtCommunity.Subtype + (*BgpAsPath_AsSetMode)(nil), // 1613: otg.BgpAsPath.AsSetMode + (*BgpAsPathSegment_Type)(nil), // 1614: otg.BgpAsPathSegment.Type + (*BgpV4EvpnEvis_Choice)(nil), // 1615: otg.BgpV4EvpnEvis.Choice + (*BgpV4EviVxlan_ReplicationType)(nil), // 1616: otg.BgpV4EviVxlan.ReplicationType + (*BgpRouteDistinguisher_RdType)(nil), // 1617: otg.BgpRouteDistinguisher.RdType + (*BgpRouteTarget_RtType)(nil), // 1618: otg.BgpRouteTarget.RtType + (*BgpV4RouteRange_NextHopMode)(nil), // 1619: otg.BgpV4RouteRange.NextHopMode + (*BgpV4RouteRange_NextHopAddressType)(nil), // 1620: otg.BgpV4RouteRange.NextHopAddressType + (*BgpExtendedCommunity_Choice)(nil), // 1621: otg.BgpExtendedCommunity.Choice + (*BgpExtendedCommunityTransitive2OctetAsType_Choice)(nil), // 1622: otg.BgpExtendedCommunityTransitive2OctetAsType.Choice + (*BgpExtendedCommunityTransitiveIpv4AddressType_Choice)(nil), // 1623: otg.BgpExtendedCommunityTransitiveIpv4AddressType.Choice + (*BgpExtendedCommunityTransitive4OctetAsType_Choice)(nil), // 1624: otg.BgpExtendedCommunityTransitive4OctetAsType.Choice + (*BgpExtendedCommunityTransitiveOpaqueType_Choice)(nil), // 1625: otg.BgpExtendedCommunityTransitiveOpaqueType.Choice + (*BgpExtendedCommunityTransitiveEvpnType_Choice)(nil), // 1626: otg.BgpExtendedCommunityTransitiveEvpnType.Choice + (*BgpExtendedCommunityNonTransitive2OctetAsType_Choice)(nil), // 1627: otg.BgpExtendedCommunityNonTransitive2OctetAsType.Choice + (*BgpV6RouteRange_NextHopMode)(nil), // 1628: otg.BgpV6RouteRange.NextHopMode + (*BgpV6RouteRange_NextHopAddressType)(nil), // 1629: otg.BgpV6RouteRange.NextHopAddressType + (*BgpSrteV4Policy_NextHopMode)(nil), // 1630: otg.BgpSrteV4Policy.NextHopMode + (*BgpSrteV4Policy_NextHopAddressType)(nil), // 1631: otg.BgpSrteV4Policy.NextHopAddressType + (*BgpSrteRemoteEndpointSubTlv_AddressFamily)(nil), // 1632: otg.BgpSrteRemoteEndpointSubTlv.AddressFamily + (*BgpSrteBindingSubTlv_BindingSidType)(nil), // 1633: otg.BgpSrteBindingSubTlv.BindingSidType + (*BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy)(nil), // 1634: otg.BgpSrteExplicitNullLabelPolicySubTlv.ExplicitNullLabelPolicy + (*BgpSrteSegment_SegmentType)(nil), // 1635: otg.BgpSrteSegment.SegmentType + (*BgpSrteV6Policy_NextHopMode)(nil), // 1636: otg.BgpSrteV6Policy.NextHopMode + (*BgpSrteV6Policy_NextHopAddressType)(nil), // 1637: otg.BgpSrteV6Policy.NextHopAddressType + (*BgpUpdateReplay_Choice)(nil), // 1638: otg.BgpUpdateReplay.Choice + (*BgpAttributes_Origin)(nil), // 1639: otg.BgpAttributes.Origin + (*BgpAttributesAsPath_Choice)(nil), // 1640: otg.BgpAttributesAsPath.Choice + (*BgpAttributesFourByteAsPathSegment_Type)(nil), // 1641: otg.BgpAttributesFourByteAsPathSegment.Type + (*BgpAttributesTwoByteAsPathSegment_Type)(nil), // 1642: otg.BgpAttributesTwoByteAsPathSegment.Type + (*BgpAttributesAggregator_Choice)(nil), // 1643: otg.BgpAttributesAggregator.Choice + (*BgpAttributesCommunity_Choice)(nil), // 1644: otg.BgpAttributesCommunity.Choice + (*BgpAttributesNextHop_Choice)(nil), // 1645: otg.BgpAttributesNextHop.Choice + (*BgpAttributesMpReachNlri_Choice)(nil), // 1646: otg.BgpAttributesMpReachNlri.Choice + (*BgpAttributesMpUnreachNlri_Choice)(nil), // 1647: otg.BgpAttributesMpUnreachNlri.Choice + (*BgpAttributesTunnelEncapsulation_Choice)(nil), // 1648: otg.BgpAttributesTunnelEncapsulation.Choice + (*BgpAttributesBsid_Choice)(nil), // 1649: otg.BgpAttributesBsid.Choice + (*BgpAttributesSrPolicyExplicitNullPolicy_Choice)(nil), // 1650: otg.BgpAttributesSrPolicyExplicitNullPolicy.Choice + (*BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice)(nil), // 1651: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.Choice + (*BgpV6Peer_AsType)(nil), // 1652: otg.BgpV6Peer.AsType + (*BgpV6Peer_AsNumberWidth)(nil), // 1653: otg.BgpV6Peer.AsNumberWidth + (*BgpV6EthernetSegment_ActiveMode)(nil), // 1654: otg.BgpV6EthernetSegment.ActiveMode + (*BgpV6EvpnEvis_Choice)(nil), // 1655: otg.BgpV6EvpnEvis.Choice + (*BgpV6EviVxlan_ReplicationType)(nil), // 1656: otg.BgpV6EviVxlan.ReplicationType + (*VxlanV4TunnelDestinationIPMode_Choice)(nil), // 1657: otg.VxlanV4TunnelDestinationIPMode.Choice + (*VxlanV6TunnelDestinationIPMode_Choice)(nil), // 1658: otg.VxlanV6TunnelDestinationIPMode.Choice + (*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle)(nil), // 1659: otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.ReservationStyle + (*RsvpEro_PrependNeighborIp)(nil), // 1660: otg.RsvpEro.PrependNeighborIp + (*RsvpEroSubobject_Type)(nil), // 1661: otg.RsvpEroSubobject.Type + (*RsvpEroSubobject_HopType)(nil), // 1662: otg.RsvpEroSubobject.HopType + (*Dhcpv6ServerIaType_Choice)(nil), // 1663: otg.Dhcpv6ServerIaType.Choice + (*Ospfv2RouterId_Choice)(nil), // 1664: otg.Ospfv2RouterId.Choice + (*Ospfv2InterfaceArea_Choice)(nil), // 1665: otg.Ospfv2InterfaceArea.Choice + (*Ospfv2InterfaceNetworkType_Choice)(nil), // 1666: otg.Ospfv2InterfaceNetworkType.Choice + (*Ospfv2InterfaceAuthentication_Choice)(nil), // 1667: otg.Ospfv2InterfaceAuthentication.Choice + (*Ospfv2V4RRRouteOrigin_Choice)(nil), // 1668: otg.Ospfv2V4RRRouteOrigin.Choice + (*FlowTxRx_Choice)(nil), // 1669: otg.FlowTxRx.Choice + (*FlowRouter_Mode)(nil), // 1670: otg.FlowRouter.Mode + (*FlowHeader_Choice)(nil), // 1671: otg.FlowHeader.Choice + (*FlowIpv4Options_Choice)(nil), // 1672: otg.FlowIpv4Options.Choice + (*FlowIpv4OptionsCustomLength_Choice)(nil), // 1673: otg.FlowIpv4OptionsCustomLength.Choice + (*FlowIpv4Priority_Choice)(nil), // 1674: otg.FlowIpv4Priority.Choice + (*FlowIpv4Auto_Choice)(nil), // 1675: otg.FlowIpv4Auto.Choice + (*FlowIpv6Auto_Choice)(nil), // 1676: otg.FlowIpv6Auto.Choice + (*FlowIcmp_Choice)(nil), // 1677: otg.FlowIcmp.Choice + (*FlowIcmpv6_Choice)(nil), // 1678: otg.FlowIcmpv6.Choice + (*FlowSnmpv2CData_Choice)(nil), // 1679: otg.FlowSnmpv2cData.Choice + (*FlowSnmpv2CPDU_ErrorStatus)(nil), // 1680: otg.FlowSnmpv2cPDU.ErrorStatus + (*FlowSnmpv2CVariableBindingValue_Choice)(nil), // 1681: otg.FlowSnmpv2cVariableBindingValue.Choice + (*FlowSnmpv2CVariableBindingStringValue_Choice)(nil), // 1682: otg.FlowSnmpv2cVariableBindingStringValue.Choice + (*FlowRsvp_Flag)(nil), // 1683: otg.FlowRsvp.Flag + (*FlowRSVPLength_Choice)(nil), // 1684: otg.FlowRSVPLength.Choice + (*FlowRSVPMessage_Choice)(nil), // 1685: otg.FlowRSVPMessage.Choice + (*FlowRSVPObjectLength_Choice)(nil), // 1686: otg.FlowRSVPObjectLength.Choice + (*FlowRSVPPathObjectsClass_Choice)(nil), // 1687: otg.FlowRSVPPathObjectsClass.Choice + (*FlowRSVPPathObjectsSessionCType_Choice)(nil), // 1688: otg.FlowRSVPPathObjectsSessionCType.Choice + (*FlowRSVPPathSessionExtTunnelId_Choice)(nil), // 1689: otg.FlowRSVPPathSessionExtTunnelId.Choice + (*FlowRSVPPathObjectsRsvpHopCType_Choice)(nil), // 1690: otg.FlowRSVPPathObjectsRsvpHopCType.Choice + (*FlowRSVPPathObjectsTimeValuesCType_Choice)(nil), // 1691: otg.FlowRSVPPathObjectsTimeValuesCType.Choice + (*FlowRSVPPathObjectsClassExplicitRouteCType_Choice)(nil), // 1692: otg.FlowRSVPPathObjectsClassExplicitRouteCType.Choice + (*FlowRSVPType1ExplicitRouteSubobjectsType_Choice)(nil), // 1693: otg.FlowRSVPType1ExplicitRouteSubobjectsType.Choice + (*FlowRSVPExplicitRouteLength_Choice)(nil), // 1694: otg.FlowRSVPExplicitRouteLength.Choice + (*FlowRSVPExplicitRouteASNumberLength_Choice)(nil), // 1695: otg.FlowRSVPExplicitRouteASNumberLength.Choice + (*FlowRSVPPathObjectsLabelRequestCType_Choice)(nil), // 1696: otg.FlowRSVPPathObjectsLabelRequestCType.Choice + (*FlowRSVPPathObjectsSessionAttributeCType_Choice)(nil), // 1697: otg.FlowRSVPPathObjectsSessionAttributeCType.Choice + (*FlowRSVPLspTunnelFlag_Choice)(nil), // 1698: otg.FlowRSVPLspTunnelFlag.Choice + (*FlowRSVPSessionAttributeNameLength_Choice)(nil), // 1699: otg.FlowRSVPSessionAttributeNameLength.Choice + (*FlowRSVPPathObjectsSenderTemplateCType_Choice)(nil), // 1700: otg.FlowRSVPPathObjectsSenderTemplateCType.Choice + (*FlowRSVPPathObjectsSenderTspecCType_Choice)(nil), // 1701: otg.FlowRSVPPathObjectsSenderTspecCType.Choice + (*FlowRSVPPathObjectsRecordRouteCType_Choice)(nil), // 1702: otg.FlowRSVPPathObjectsRecordRouteCType.Choice + (*FlowRSVPPathObjectsRecordRouteSubObjectType_Choice)(nil), // 1703: otg.FlowRSVPPathObjectsRecordRouteSubObjectType.Choice + (*FlowRSVPRecordRouteIPv4Flag_Choice)(nil), // 1704: otg.FlowRSVPRecordRouteIPv4Flag.Choice + (*FlowRSVPPathRecordRouteLabel_Choice)(nil), // 1705: otg.FlowRSVPPathRecordRouteLabel.Choice + (*FlowRSVPRouteRecordLength_Choice)(nil), // 1706: otg.FlowRSVPRouteRecordLength.Choice + (*FlowSize_Choice)(nil), // 1707: otg.FlowSize.Choice + (*FlowSizeWeightPairs_Choice)(nil), // 1708: otg.FlowSizeWeightPairs.Choice + (*FlowSizeWeightPairs_Predefined)(nil), // 1709: otg.FlowSizeWeightPairs.Predefined + (*FlowRate_Choice)(nil), // 1710: otg.FlowRate.Choice + (*FlowDuration_Choice)(nil), // 1711: otg.FlowDuration.Choice + (*FlowDelay_Choice)(nil), // 1712: otg.FlowDelay.Choice + (*FlowDurationInterBurstGap_Choice)(nil), // 1713: otg.FlowDurationInterBurstGap.Choice + (*FlowLatencyMetrics_Mode)(nil), // 1714: otg.FlowLatencyMetrics.Mode + (*FlowRxTxRatio_Choice)(nil), // 1715: otg.FlowRxTxRatio.Choice + (*EventRequest_Type)(nil), // 1716: otg.EventRequest.Type + (*LldpConnection_Choice)(nil), // 1717: otg.LldpConnection.Choice + (*LldpChassisId_Choice)(nil), // 1718: otg.LldpChassisId.Choice + (*LldpPortId_Choice)(nil), // 1719: otg.LldpPortId.Choice + (*LldpChassisMacSubType_Choice)(nil), // 1720: otg.LldpChassisMacSubType.Choice + (*LldpPortInterfaceNameSubType_Choice)(nil), // 1721: otg.LldpPortInterfaceNameSubType.Choice + (*LldpSystemName_Choice)(nil), // 1722: otg.LldpSystemName.Choice + (*LldpOrgInfoType_Choice)(nil), // 1723: otg.LldpOrgInfoType.Choice + (*Error_Kind)(nil), // 1724: otg.Error.Kind + (*ConfigUpdate_Choice)(nil), // 1725: otg.ConfigUpdate.Choice + (*FlowsUpdate_PropertyNames)(nil), // 1726: otg.FlowsUpdate.PropertyNames + (*ControlState_Choice)(nil), // 1727: otg.ControlState.Choice + (*StatePort_Choice)(nil), // 1728: otg.StatePort.Choice + (*StateTraffic_Choice)(nil), // 1729: otg.StateTraffic.Choice + (*StateProtocol_Choice)(nil), // 1730: otg.StateProtocol.Choice + (*StatePortLink_State)(nil), // 1731: otg.StatePortLink.State + (*StatePortCapture_State)(nil), // 1732: otg.StatePortCapture.State + (*StateTrafficFlowTransmit_State)(nil), // 1733: otg.StateTrafficFlowTransmit.State + (*StateProtocolAll_State)(nil), // 1734: otg.StateProtocolAll.State + (*StateProtocolRoute_State)(nil), // 1735: otg.StateProtocolRoute.State + (*StateProtocolLacp_Choice)(nil), // 1736: otg.StateProtocolLacp.Choice + (*StateProtocolLacpAdmin_State)(nil), // 1737: otg.StateProtocolLacpAdmin.State + (*StateProtocolLacpMemberPorts_State)(nil), // 1738: otg.StateProtocolLacpMemberPorts.State + (*StateProtocolBgp_Choice)(nil), // 1739: otg.StateProtocolBgp.Choice + (*StateProtocolBgpPeers_State)(nil), // 1740: otg.StateProtocolBgpPeers.State + (*StateProtocolIsis_Choice)(nil), // 1741: otg.StateProtocolIsis.Choice + (*StateProtocolIsisRouters_State)(nil), // 1742: otg.StateProtocolIsisRouters.State + (*StateProtocolOspfv2_Choice)(nil), // 1743: otg.StateProtocolOspfv2.Choice + (*StateProtocolOspfv2Routers_State)(nil), // 1744: otg.StateProtocolOspfv2Routers.State + (*ControlAction_Choice)(nil), // 1745: otg.ControlAction.Choice + (*ActionResponse_Choice)(nil), // 1746: otg.ActionResponse.Choice + (*ActionProtocol_Choice)(nil), // 1747: otg.ActionProtocol.Choice + (*ActionResponseProtocol_Choice)(nil), // 1748: otg.ActionResponseProtocol.Choice + (*ActionProtocolIpv4_Choice)(nil), // 1749: otg.ActionProtocolIpv4.Choice + (*ActionResponseProtocolIpv4_Choice)(nil), // 1750: otg.ActionResponseProtocolIpv4.Choice + (*ActionResponseProtocolIpv4PingResponse_Result)(nil), // 1751: otg.ActionResponseProtocolIpv4PingResponse.Result + (*ActionProtocolIpv6_Choice)(nil), // 1752: otg.ActionProtocolIpv6.Choice + (*ActionResponseProtocolIpv6_Choice)(nil), // 1753: otg.ActionResponseProtocolIpv6.Choice + (*ActionResponseProtocolIpv6PingResponse_Result)(nil), // 1754: otg.ActionResponseProtocolIpv6PingResponse.Result + (*ActionProtocolBgp_Choice)(nil), // 1755: otg.ActionProtocolBgp.Choice + (*ActionProtocolBgpNotification_Choice)(nil), // 1756: otg.ActionProtocolBgpNotification.Choice + (*ActionProtocolBgpGracefulRestartNotification_Choice)(nil), // 1757: otg.ActionProtocolBgpGracefulRestartNotification.Choice + (*MetricsRequest_Choice)(nil), // 1758: otg.MetricsRequest.Choice + (*MetricsResponse_Choice)(nil), // 1759: otg.MetricsResponse.Choice + (*PortMetricsRequest_ColumnNames)(nil), // 1760: otg.PortMetricsRequest.ColumnNames + (*PortMetric_Link)(nil), // 1761: otg.PortMetric.Link + (*PortMetric_Capture)(nil), // 1762: otg.PortMetric.Capture + (*PortMetric_Transmit)(nil), // 1763: otg.PortMetric.Transmit + (*FlowMetricsRequest_MetricNames)(nil), // 1764: otg.FlowMetricsRequest.MetricNames + (*FlowTaggedMetricsFilter_MetricNames)(nil), // 1765: otg.FlowTaggedMetricsFilter.MetricNames + (*FlowMetric_Transmit)(nil), // 1766: otg.FlowMetric.Transmit + (*FlowMetricTagValue_Choice)(nil), // 1767: otg.FlowMetricTagValue.Choice + (*Bgpv4MetricsRequest_ColumnNames)(nil), // 1768: otg.Bgpv4MetricsRequest.ColumnNames + (*Bgpv4Metric_SessionState)(nil), // 1769: otg.Bgpv4Metric.SessionState + (*Bgpv4Metric_FsmState)(nil), // 1770: otg.Bgpv4Metric.FsmState + (*Bgpv6MetricsRequest_ColumnNames)(nil), // 1771: otg.Bgpv6MetricsRequest.ColumnNames + (*Bgpv6Metric_SessionState)(nil), // 1772: otg.Bgpv6Metric.SessionState + (*Bgpv6Metric_FsmState)(nil), // 1773: otg.Bgpv6Metric.FsmState + (*IsisMetricsRequest_ColumnNames)(nil), // 1774: otg.IsisMetricsRequest.ColumnNames + (*LagMetricsRequest_ColumnNames)(nil), // 1775: otg.LagMetricsRequest.ColumnNames + (*LagMetric_OperStatus)(nil), // 1776: otg.LagMetric.OperStatus + (*LacpMetricsRequest_ColumnNames)(nil), // 1777: otg.LacpMetricsRequest.ColumnNames + (*LacpMetric_Activity)(nil), // 1778: otg.LacpMetric.Activity + (*LacpMetric_Timeout)(nil), // 1779: otg.LacpMetric.Timeout + (*LacpMetric_Synchronization)(nil), // 1780: otg.LacpMetric.Synchronization + (*LldpMetricsRequest_ColumnNames)(nil), // 1781: otg.LldpMetricsRequest.ColumnNames + (*RsvpMetricsRequest_ColumnNames)(nil), // 1782: otg.RsvpMetricsRequest.ColumnNames + (*Dhcpv4ClientMetricsRequest_ColumnNames)(nil), // 1783: otg.Dhcpv4ClientMetricsRequest.ColumnNames + (*Dhcpv4ServerMetricsRequest_ColumnNames)(nil), // 1784: otg.Dhcpv4ServerMetricsRequest.ColumnNames + (*Dhcpv6ClientMetricsRequest_ColumnNames)(nil), // 1785: otg.Dhcpv6ClientMetricsRequest.ColumnNames + (*Dhcpv6ServerMetricsRequest_ColumnNames)(nil), // 1786: otg.Dhcpv6ServerMetricsRequest.ColumnNames + (*Ospfv2MetricsRequest_ColumnNames)(nil), // 1787: otg.Ospfv2MetricsRequest.ColumnNames + (*StatesRequest_Choice)(nil), // 1788: otg.StatesRequest.Choice + (*StatesResponse_Choice)(nil), // 1789: otg.StatesResponse.Choice + (*BgpPrefixStateRequest_PrefixFilters)(nil), // 1790: otg.BgpPrefixStateRequest.PrefixFilters + (*BgpPrefixIpv4UnicastFilter_Origin)(nil), // 1791: otg.BgpPrefixIpv4UnicastFilter.Origin + (*BgpPrefixIpv6UnicastFilter_Origin)(nil), // 1792: otg.BgpPrefixIpv6UnicastFilter.Origin + (*BgpPrefixIpv4UnicastState_Origin)(nil), // 1793: otg.BgpPrefixIpv4UnicastState.Origin + (*BgpPrefixIpv6UnicastState_Origin)(nil), // 1794: otg.BgpPrefixIpv6UnicastState.Origin + (*ResultExtendedCommunityStructured_Choice)(nil), // 1795: otg.ResultExtendedCommunityStructured.Choice + (*ResultExtendedCommunityTransitive2OctetAsType_Choice)(nil), // 1796: otg.ResultExtendedCommunityTransitive2OctetAsType.Choice + (*ResultExtendedCommunityTransitiveIpv4AddressType_Choice)(nil), // 1797: otg.ResultExtendedCommunityTransitiveIpv4AddressType.Choice + (*ResultExtendedCommunityTransitive4OctetAsType_Choice)(nil), // 1798: otg.ResultExtendedCommunityTransitive4OctetAsType.Choice + (*ResultExtendedCommunityTransitiveOpaqueType_Choice)(nil), // 1799: otg.ResultExtendedCommunityTransitiveOpaqueType.Choice + (*ResultExtendedCommunityNonTransitive2OctetAsType_Choice)(nil), // 1800: otg.ResultExtendedCommunityNonTransitive2OctetAsType.Choice + (*ResultBgpCommunity_Type)(nil), // 1801: otg.ResultBgpCommunity.Type + (*ResultBgpAsPathSegment_Type)(nil), // 1802: otg.ResultBgpAsPathSegment.Type + (*IsisLspState_PduType)(nil), // 1803: otg.IsisLspState.PduType + (*IsisLspV4Prefix_RedistributionType)(nil), // 1804: otg.IsisLspV4Prefix.RedistributionType + (*IsisLspV4Prefix_OriginType)(nil), // 1805: otg.IsisLspV4Prefix.OriginType + (*IsisLspExtendedV4Prefix_RedistributionType)(nil), // 1806: otg.IsisLspExtendedV4Prefix.RedistributionType + (*IsisLspV6Prefix_RedistributionType)(nil), // 1807: otg.IsisLspV6Prefix.RedistributionType + (*IsisLspV6Prefix_OriginType)(nil), // 1808: otg.IsisLspV6Prefix.OriginType + (*LldpNeighborsState_ChassisIdType)(nil), // 1809: otg.LldpNeighborsState.ChassisIdType + (*LldpNeighborsState_PortIdType)(nil), // 1810: otg.LldpNeighborsState.PortIdType + (*LldpCapabilityState_CapabilityName)(nil), // 1811: otg.LldpCapabilityState.CapabilityName + (*RsvpLspState_SessionStatus)(nil), // 1812: otg.RsvpLspState.SessionStatus + (*RsvpLspState_LastFlapReason)(nil), // 1813: otg.RsvpLspState.LastFlapReason + (*RsvpLspIpv4Ero_Type)(nil), // 1814: otg.RsvpLspIpv4Ero.Type + (*Ospfv2OpaqueLsa_Type)(nil), // 1815: otg.Ospfv2OpaqueLsa.Type + (*Ospfv2Link_Type)(nil), // 1816: otg.Ospfv2Link.Type + (*PatternFlowEthernetDst_Choice)(nil), // 1817: otg.PatternFlowEthernetDst.Choice + (*PatternFlowEthernetSrc_Choice)(nil), // 1818: otg.PatternFlowEthernetSrc.Choice + (*PatternFlowEthernetEtherType_Choice)(nil), // 1819: otg.PatternFlowEthernetEtherType.Choice + (*PatternFlowEthernetPfcQueue_Choice)(nil), // 1820: otg.PatternFlowEthernetPfcQueue.Choice + (*PatternFlowVlanPriority_Choice)(nil), // 1821: otg.PatternFlowVlanPriority.Choice + (*PatternFlowVlanCfi_Choice)(nil), // 1822: otg.PatternFlowVlanCfi.Choice + (*PatternFlowVlanId_Choice)(nil), // 1823: otg.PatternFlowVlanId.Choice + (*PatternFlowVlanTpid_Choice)(nil), // 1824: otg.PatternFlowVlanTpid.Choice + (*PatternFlowVxlanFlags_Choice)(nil), // 1825: otg.PatternFlowVxlanFlags.Choice + (*PatternFlowVxlanReserved0_Choice)(nil), // 1826: otg.PatternFlowVxlanReserved0.Choice + (*PatternFlowVxlanVni_Choice)(nil), // 1827: otg.PatternFlowVxlanVni.Choice + (*PatternFlowVxlanReserved1_Choice)(nil), // 1828: otg.PatternFlowVxlanReserved1.Choice + (*PatternFlowIpv4Version_Choice)(nil), // 1829: otg.PatternFlowIpv4Version.Choice + (*PatternFlowIpv4HeaderLength_Choice)(nil), // 1830: otg.PatternFlowIpv4HeaderLength.Choice + (*PatternFlowIpv4TotalLength_Choice)(nil), // 1831: otg.PatternFlowIpv4TotalLength.Choice + (*PatternFlowIpv4Identification_Choice)(nil), // 1832: otg.PatternFlowIpv4Identification.Choice + (*PatternFlowIpv4Reserved_Choice)(nil), // 1833: otg.PatternFlowIpv4Reserved.Choice + (*PatternFlowIpv4DontFragment_Choice)(nil), // 1834: otg.PatternFlowIpv4DontFragment.Choice + (*PatternFlowIpv4MoreFragments_Choice)(nil), // 1835: otg.PatternFlowIpv4MoreFragments.Choice + (*PatternFlowIpv4FragmentOffset_Choice)(nil), // 1836: otg.PatternFlowIpv4FragmentOffset.Choice + (*PatternFlowIpv4TimeToLive_Choice)(nil), // 1837: otg.PatternFlowIpv4TimeToLive.Choice + (*PatternFlowIpv4Protocol_Choice)(nil), // 1838: otg.PatternFlowIpv4Protocol.Choice + (*PatternFlowIpv4HeaderChecksum_Choice)(nil), // 1839: otg.PatternFlowIpv4HeaderChecksum.Choice + (*PatternFlowIpv4HeaderChecksum_Generated)(nil), // 1840: otg.PatternFlowIpv4HeaderChecksum.Generated + (*PatternFlowIpv4Src_Choice)(nil), // 1841: otg.PatternFlowIpv4Src.Choice + (*PatternFlowIpv4Dst_Choice)(nil), // 1842: otg.PatternFlowIpv4Dst.Choice + (*PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice)(nil), // 1843: otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag.Choice + (*PatternFlowIpv4OptionsCustomTypeOptionClass_Choice)(nil), // 1844: otg.PatternFlowIpv4OptionsCustomTypeOptionClass.Choice + (*PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice)(nil), // 1845: otg.PatternFlowIpv4OptionsCustomTypeOptionNumber.Choice + (*PatternFlowIpv4PriorityRaw_Choice)(nil), // 1846: otg.PatternFlowIpv4PriorityRaw.Choice + (*PatternFlowIpv4DscpPhb_Choice)(nil), // 1847: otg.PatternFlowIpv4DscpPhb.Choice + (*PatternFlowIpv4DscpEcn_Choice)(nil), // 1848: otg.PatternFlowIpv4DscpEcn.Choice + (*PatternFlowIpv4TosPrecedence_Choice)(nil), // 1849: otg.PatternFlowIpv4TosPrecedence.Choice + (*PatternFlowIpv4TosDelay_Choice)(nil), // 1850: otg.PatternFlowIpv4TosDelay.Choice + (*PatternFlowIpv4TosThroughput_Choice)(nil), // 1851: otg.PatternFlowIpv4TosThroughput.Choice + (*PatternFlowIpv4TosReliability_Choice)(nil), // 1852: otg.PatternFlowIpv4TosReliability.Choice + (*PatternFlowIpv4TosMonetary_Choice)(nil), // 1853: otg.PatternFlowIpv4TosMonetary.Choice + (*PatternFlowIpv4TosUnused_Choice)(nil), // 1854: otg.PatternFlowIpv4TosUnused.Choice + (*PatternFlowIpv6Version_Choice)(nil), // 1855: otg.PatternFlowIpv6Version.Choice + (*PatternFlowIpv6TrafficClass_Choice)(nil), // 1856: otg.PatternFlowIpv6TrafficClass.Choice + (*PatternFlowIpv6FlowLabel_Choice)(nil), // 1857: otg.PatternFlowIpv6FlowLabel.Choice + (*PatternFlowIpv6PayloadLength_Choice)(nil), // 1858: otg.PatternFlowIpv6PayloadLength.Choice + (*PatternFlowIpv6NextHeader_Choice)(nil), // 1859: otg.PatternFlowIpv6NextHeader.Choice + (*PatternFlowIpv6HopLimit_Choice)(nil), // 1860: otg.PatternFlowIpv6HopLimit.Choice + (*PatternFlowIpv6Src_Choice)(nil), // 1861: otg.PatternFlowIpv6Src.Choice + (*PatternFlowIpv6Dst_Choice)(nil), // 1862: otg.PatternFlowIpv6Dst.Choice + (*PatternFlowPfcPauseDst_Choice)(nil), // 1863: otg.PatternFlowPfcPauseDst.Choice + (*PatternFlowPfcPauseSrc_Choice)(nil), // 1864: otg.PatternFlowPfcPauseSrc.Choice + (*PatternFlowPfcPauseEtherType_Choice)(nil), // 1865: otg.PatternFlowPfcPauseEtherType.Choice + (*PatternFlowPfcPauseControlOpCode_Choice)(nil), // 1866: otg.PatternFlowPfcPauseControlOpCode.Choice + (*PatternFlowPfcPauseClassEnableVector_Choice)(nil), // 1867: otg.PatternFlowPfcPauseClassEnableVector.Choice + (*PatternFlowPfcPausePauseClass0_Choice)(nil), // 1868: otg.PatternFlowPfcPausePauseClass0.Choice + (*PatternFlowPfcPausePauseClass1_Choice)(nil), // 1869: otg.PatternFlowPfcPausePauseClass1.Choice + (*PatternFlowPfcPausePauseClass2_Choice)(nil), // 1870: otg.PatternFlowPfcPausePauseClass2.Choice + (*PatternFlowPfcPausePauseClass3_Choice)(nil), // 1871: otg.PatternFlowPfcPausePauseClass3.Choice + (*PatternFlowPfcPausePauseClass4_Choice)(nil), // 1872: otg.PatternFlowPfcPausePauseClass4.Choice + (*PatternFlowPfcPausePauseClass5_Choice)(nil), // 1873: otg.PatternFlowPfcPausePauseClass5.Choice + (*PatternFlowPfcPausePauseClass6_Choice)(nil), // 1874: otg.PatternFlowPfcPausePauseClass6.Choice + (*PatternFlowPfcPausePauseClass7_Choice)(nil), // 1875: otg.PatternFlowPfcPausePauseClass7.Choice + (*PatternFlowEthernetPauseDst_Choice)(nil), // 1876: otg.PatternFlowEthernetPauseDst.Choice + (*PatternFlowEthernetPauseSrc_Choice)(nil), // 1877: otg.PatternFlowEthernetPauseSrc.Choice + (*PatternFlowEthernetPauseEtherType_Choice)(nil), // 1878: otg.PatternFlowEthernetPauseEtherType.Choice + (*PatternFlowEthernetPauseControlOpCode_Choice)(nil), // 1879: otg.PatternFlowEthernetPauseControlOpCode.Choice + (*PatternFlowEthernetPauseTime_Choice)(nil), // 1880: otg.PatternFlowEthernetPauseTime.Choice + (*PatternFlowTcpSrcPort_Choice)(nil), // 1881: otg.PatternFlowTcpSrcPort.Choice + (*PatternFlowTcpDstPort_Choice)(nil), // 1882: otg.PatternFlowTcpDstPort.Choice + (*PatternFlowTcpSeqNum_Choice)(nil), // 1883: otg.PatternFlowTcpSeqNum.Choice + (*PatternFlowTcpAckNum_Choice)(nil), // 1884: otg.PatternFlowTcpAckNum.Choice + (*PatternFlowTcpDataOffset_Choice)(nil), // 1885: otg.PatternFlowTcpDataOffset.Choice + (*PatternFlowTcpEcnNs_Choice)(nil), // 1886: otg.PatternFlowTcpEcnNs.Choice + (*PatternFlowTcpEcnCwr_Choice)(nil), // 1887: otg.PatternFlowTcpEcnCwr.Choice + (*PatternFlowTcpEcnEcho_Choice)(nil), // 1888: otg.PatternFlowTcpEcnEcho.Choice + (*PatternFlowTcpCtlUrg_Choice)(nil), // 1889: otg.PatternFlowTcpCtlUrg.Choice + (*PatternFlowTcpCtlAck_Choice)(nil), // 1890: otg.PatternFlowTcpCtlAck.Choice + (*PatternFlowTcpCtlPsh_Choice)(nil), // 1891: otg.PatternFlowTcpCtlPsh.Choice + (*PatternFlowTcpCtlRst_Choice)(nil), // 1892: otg.PatternFlowTcpCtlRst.Choice + (*PatternFlowTcpCtlSyn_Choice)(nil), // 1893: otg.PatternFlowTcpCtlSyn.Choice + (*PatternFlowTcpCtlFin_Choice)(nil), // 1894: otg.PatternFlowTcpCtlFin.Choice + (*PatternFlowTcpWindow_Choice)(nil), // 1895: otg.PatternFlowTcpWindow.Choice + (*PatternFlowTcpChecksum_Choice)(nil), // 1896: otg.PatternFlowTcpChecksum.Choice + (*PatternFlowTcpChecksum_Generated)(nil), // 1897: otg.PatternFlowTcpChecksum.Generated + (*PatternFlowUdpSrcPort_Choice)(nil), // 1898: otg.PatternFlowUdpSrcPort.Choice + (*PatternFlowUdpDstPort_Choice)(nil), // 1899: otg.PatternFlowUdpDstPort.Choice + (*PatternFlowUdpLength_Choice)(nil), // 1900: otg.PatternFlowUdpLength.Choice + (*PatternFlowUdpChecksum_Choice)(nil), // 1901: otg.PatternFlowUdpChecksum.Choice + (*PatternFlowUdpChecksum_Generated)(nil), // 1902: otg.PatternFlowUdpChecksum.Generated + (*PatternFlowGreChecksumPresent_Choice)(nil), // 1903: otg.PatternFlowGreChecksumPresent.Choice + (*PatternFlowGreReserved0_Choice)(nil), // 1904: otg.PatternFlowGreReserved0.Choice + (*PatternFlowGreVersion_Choice)(nil), // 1905: otg.PatternFlowGreVersion.Choice + (*PatternFlowGreProtocol_Choice)(nil), // 1906: otg.PatternFlowGreProtocol.Choice + (*PatternFlowGreChecksum_Choice)(nil), // 1907: otg.PatternFlowGreChecksum.Choice + (*PatternFlowGreChecksum_Generated)(nil), // 1908: otg.PatternFlowGreChecksum.Generated + (*PatternFlowGreReserved1_Choice)(nil), // 1909: otg.PatternFlowGreReserved1.Choice + (*PatternFlowGtpv1Version_Choice)(nil), // 1910: otg.PatternFlowGtpv1Version.Choice + (*PatternFlowGtpv1ProtocolType_Choice)(nil), // 1911: otg.PatternFlowGtpv1ProtocolType.Choice + (*PatternFlowGtpv1Reserved_Choice)(nil), // 1912: otg.PatternFlowGtpv1Reserved.Choice + (*PatternFlowGtpv1EFlag_Choice)(nil), // 1913: otg.PatternFlowGtpv1EFlag.Choice + (*PatternFlowGtpv1SFlag_Choice)(nil), // 1914: otg.PatternFlowGtpv1SFlag.Choice + (*PatternFlowGtpv1PnFlag_Choice)(nil), // 1915: otg.PatternFlowGtpv1PnFlag.Choice + (*PatternFlowGtpv1MessageType_Choice)(nil), // 1916: otg.PatternFlowGtpv1MessageType.Choice + (*PatternFlowGtpv1MessageLength_Choice)(nil), // 1917: otg.PatternFlowGtpv1MessageLength.Choice + (*PatternFlowGtpv1Teid_Choice)(nil), // 1918: otg.PatternFlowGtpv1Teid.Choice + (*PatternFlowGtpv1SquenceNumber_Choice)(nil), // 1919: otg.PatternFlowGtpv1SquenceNumber.Choice + (*PatternFlowGtpv1NPduNumber_Choice)(nil), // 1920: otg.PatternFlowGtpv1NPduNumber.Choice + (*PatternFlowGtpv1NextExtensionHeaderType_Choice)(nil), // 1921: otg.PatternFlowGtpv1NextExtensionHeaderType.Choice + (*PatternFlowGtpExtensionExtensionLength_Choice)(nil), // 1922: otg.PatternFlowGtpExtensionExtensionLength.Choice + (*PatternFlowGtpExtensionContents_Choice)(nil), // 1923: otg.PatternFlowGtpExtensionContents.Choice + (*PatternFlowGtpExtensionNextExtensionHeader_Choice)(nil), // 1924: otg.PatternFlowGtpExtensionNextExtensionHeader.Choice + (*PatternFlowGtpv2Version_Choice)(nil), // 1925: otg.PatternFlowGtpv2Version.Choice + (*PatternFlowGtpv2PiggybackingFlag_Choice)(nil), // 1926: otg.PatternFlowGtpv2PiggybackingFlag.Choice + (*PatternFlowGtpv2TeidFlag_Choice)(nil), // 1927: otg.PatternFlowGtpv2TeidFlag.Choice + (*PatternFlowGtpv2Spare1_Choice)(nil), // 1928: otg.PatternFlowGtpv2Spare1.Choice + (*PatternFlowGtpv2MessageType_Choice)(nil), // 1929: otg.PatternFlowGtpv2MessageType.Choice + (*PatternFlowGtpv2MessageLength_Choice)(nil), // 1930: otg.PatternFlowGtpv2MessageLength.Choice + (*PatternFlowGtpv2Teid_Choice)(nil), // 1931: otg.PatternFlowGtpv2Teid.Choice + (*PatternFlowGtpv2SequenceNumber_Choice)(nil), // 1932: otg.PatternFlowGtpv2SequenceNumber.Choice + (*PatternFlowGtpv2Spare2_Choice)(nil), // 1933: otg.PatternFlowGtpv2Spare2.Choice + (*PatternFlowArpHardwareType_Choice)(nil), // 1934: otg.PatternFlowArpHardwareType.Choice + (*PatternFlowArpProtocolType_Choice)(nil), // 1935: otg.PatternFlowArpProtocolType.Choice + (*PatternFlowArpHardwareLength_Choice)(nil), // 1936: otg.PatternFlowArpHardwareLength.Choice + (*PatternFlowArpProtocolLength_Choice)(nil), // 1937: otg.PatternFlowArpProtocolLength.Choice + (*PatternFlowArpOperation_Choice)(nil), // 1938: otg.PatternFlowArpOperation.Choice + (*PatternFlowArpSenderHardwareAddr_Choice)(nil), // 1939: otg.PatternFlowArpSenderHardwareAddr.Choice + (*PatternFlowArpSenderProtocolAddr_Choice)(nil), // 1940: otg.PatternFlowArpSenderProtocolAddr.Choice + (*PatternFlowArpTargetHardwareAddr_Choice)(nil), // 1941: otg.PatternFlowArpTargetHardwareAddr.Choice + (*PatternFlowArpTargetProtocolAddr_Choice)(nil), // 1942: otg.PatternFlowArpTargetProtocolAddr.Choice + (*PatternFlowIcmpEchoType_Choice)(nil), // 1943: otg.PatternFlowIcmpEchoType.Choice + (*PatternFlowIcmpEchoCode_Choice)(nil), // 1944: otg.PatternFlowIcmpEchoCode.Choice + (*PatternFlowIcmpEchoChecksum_Choice)(nil), // 1945: otg.PatternFlowIcmpEchoChecksum.Choice + (*PatternFlowIcmpEchoChecksum_Generated)(nil), // 1946: otg.PatternFlowIcmpEchoChecksum.Generated + (*PatternFlowIcmpEchoIdentifier_Choice)(nil), // 1947: otg.PatternFlowIcmpEchoIdentifier.Choice + (*PatternFlowIcmpEchoSequenceNumber_Choice)(nil), // 1948: otg.PatternFlowIcmpEchoSequenceNumber.Choice + (*PatternFlowIcmpCommonChecksum_Choice)(nil), // 1949: otg.PatternFlowIcmpCommonChecksum.Choice + (*PatternFlowIcmpCommonChecksum_Generated)(nil), // 1950: otg.PatternFlowIcmpCommonChecksum.Generated + (*PatternFlowIcmpNextFieldsIdentifier_Choice)(nil), // 1951: otg.PatternFlowIcmpNextFieldsIdentifier.Choice + (*PatternFlowIcmpNextFieldsSequenceNumber_Choice)(nil), // 1952: otg.PatternFlowIcmpNextFieldsSequenceNumber.Choice + (*PatternFlowIcmpv6EchoType_Choice)(nil), // 1953: otg.PatternFlowIcmpv6EchoType.Choice + (*PatternFlowIcmpv6EchoCode_Choice)(nil), // 1954: otg.PatternFlowIcmpv6EchoCode.Choice + (*PatternFlowIcmpv6EchoIdentifier_Choice)(nil), // 1955: otg.PatternFlowIcmpv6EchoIdentifier.Choice + (*PatternFlowIcmpv6EchoSequenceNumber_Choice)(nil), // 1956: otg.PatternFlowIcmpv6EchoSequenceNumber.Choice + (*PatternFlowIcmpv6EchoChecksum_Choice)(nil), // 1957: otg.PatternFlowIcmpv6EchoChecksum.Choice + (*PatternFlowIcmpv6EchoChecksum_Generated)(nil), // 1958: otg.PatternFlowIcmpv6EchoChecksum.Generated + (*PatternFlowIcmpv6CommonChecksum_Choice)(nil), // 1959: otg.PatternFlowIcmpv6CommonChecksum.Choice + (*PatternFlowIcmpv6CommonChecksum_Generated)(nil), // 1960: otg.PatternFlowIcmpv6CommonChecksum.Generated + (*PatternFlowPppAddress_Choice)(nil), // 1961: otg.PatternFlowPppAddress.Choice + (*PatternFlowPppControl_Choice)(nil), // 1962: otg.PatternFlowPppControl.Choice + (*PatternFlowPppProtocolType_Choice)(nil), // 1963: otg.PatternFlowPppProtocolType.Choice + (*PatternFlowIgmpv1Version_Choice)(nil), // 1964: otg.PatternFlowIgmpv1Version.Choice + (*PatternFlowIgmpv1Type_Choice)(nil), // 1965: otg.PatternFlowIgmpv1Type.Choice + (*PatternFlowIgmpv1Unused_Choice)(nil), // 1966: otg.PatternFlowIgmpv1Unused.Choice + (*PatternFlowIgmpv1Checksum_Choice)(nil), // 1967: otg.PatternFlowIgmpv1Checksum.Choice + (*PatternFlowIgmpv1Checksum_Generated)(nil), // 1968: otg.PatternFlowIgmpv1Checksum.Generated + (*PatternFlowIgmpv1GroupAddress_Choice)(nil), // 1969: otg.PatternFlowIgmpv1GroupAddress.Choice + (*PatternFlowMplsLabel_Choice)(nil), // 1970: otg.PatternFlowMplsLabel.Choice + (*PatternFlowMplsTrafficClass_Choice)(nil), // 1971: otg.PatternFlowMplsTrafficClass.Choice + (*PatternFlowMplsBottomOfStack_Choice)(nil), // 1972: otg.PatternFlowMplsBottomOfStack.Choice + (*PatternFlowMplsTimeToLive_Choice)(nil), // 1973: otg.PatternFlowMplsTimeToLive.Choice + (*PatternFlowSnmpv2CVersion_Choice)(nil), // 1974: otg.PatternFlowSnmpv2cVersion.Choice + (*PatternFlowSnmpv2CPDURequestId_Choice)(nil), // 1975: otg.PatternFlowSnmpv2cPDURequestId.Choice + (*PatternFlowSnmpv2CPDUErrorIndex_Choice)(nil), // 1976: otg.PatternFlowSnmpv2cPDUErrorIndex.Choice + (*PatternFlowSnmpv2CBulkPDURequestId_Choice)(nil), // 1977: otg.PatternFlowSnmpv2cBulkPDURequestId.Choice + (*PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice)(nil), // 1978: otg.PatternFlowSnmpv2cBulkPDUNonRepeaters.Choice + (*PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice)(nil), // 1979: otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions.Choice + (*PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice)(nil), // 1980: otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue.Choice + (*PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice)(nil), // 1981: otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue.Choice + (*PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice)(nil), // 1982: otg.PatternFlowSnmpv2cVariableBindingValueCounterValue.Choice + (*PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice)(nil), // 1983: otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue.Choice + (*PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice)(nil), // 1984: otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue.Choice + (*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice)(nil), // 1985: otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue.Choice + (*PatternFlowSnmpv2CCommonRequestId_Choice)(nil), // 1986: otg.PatternFlowSnmpv2cCommonRequestId.Choice + (*PatternFlowRsvpRsvpChecksum_Choice)(nil), // 1987: otg.PatternFlowRsvpRsvpChecksum.Choice + (*PatternFlowRsvpRsvpChecksum_Generated)(nil), // 1988: otg.PatternFlowRsvpRsvpChecksum.Generated + (*PatternFlowRsvpTimeToLive_Choice)(nil), // 1989: otg.PatternFlowRsvpTimeToLive.Choice + (*PatternFlowRsvpReserved_Choice)(nil), // 1990: otg.PatternFlowRsvpReserved.Choice + (*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice)(nil), // 1991: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.Choice + (*PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice)(nil), // 1992: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.Choice + (*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice)(nil), // 1993: otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.Choice + (*PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice)(nil), // 1994: otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger.Choice + (*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice)(nil), // 1995: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.Choice + (*PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice)(nil), // 1996: otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.Choice + (*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice)(nil), // 1997: otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle.Choice + (*PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice)(nil), // 1998: otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR.Choice + (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice)(nil), // 1999: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.Choice + (*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice)(nil), // 2000: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.Choice + (*PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice)(nil), // 2001: otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.Choice + (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice)(nil), // 2002: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.Choice + (*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice)(nil), // 2003: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid.Choice + (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice)(nil), // 2004: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.Choice + (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice)(nil), // 2005: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.Choice + (*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice)(nil), // 2006: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.Choice + (*PatternFlowRSVPPathSenderTspecIntServVersion_Choice)(nil), // 2007: otg.PatternFlowRSVPPathSenderTspecIntServVersion.Choice + (*PatternFlowRSVPPathSenderTspecIntServReserved1_Choice)(nil), // 2008: otg.PatternFlowRSVPPathSenderTspecIntServReserved1.Choice + (*PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice)(nil), // 2009: otg.PatternFlowRSVPPathSenderTspecIntServOverallLength.Choice + (*PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice)(nil), // 2010: otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader.Choice + (*PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice)(nil), // 2011: otg.PatternFlowRSVPPathSenderTspecIntServZeroBit.Choice + (*PatternFlowRSVPPathSenderTspecIntServReserved2_Choice)(nil), // 2012: otg.PatternFlowRSVPPathSenderTspecIntServReserved2.Choice + (*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice)(nil), // 2013: otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.Choice + (*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice)(nil), // 2014: otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.Choice + (*PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice)(nil), // 2015: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag.Choice + (*PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice)(nil), // 2016: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length.Choice + (*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice)(nil), // 2017: otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.Choice + (*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice)(nil), // 2018: otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.Choice + (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice)(nil), // 2019: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.Choice + (*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice)(nil), // 2020: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.Choice + (*PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice)(nil), // 2021: otg.PatternFlowRSVPPathRecordRouteType1LabelFlags.Choice + (*PatternFlowRSVPPathRecordRouteType1LabelCType_Choice)(nil), // 2022: otg.PatternFlowRSVPPathRecordRouteType1LabelCType.Choice + (*PatternFlowRSVPPathObjectsCustomType_Choice)(nil), // 2023: otg.PatternFlowRSVPPathObjectsCustomType.Choice + (*emptypb.Empty)(nil), // 2024: google.protobuf.Empty } var file_otg_proto_depIdxs = []int32{ - 412, // 0: otg.Config.ports:type_name -> otg.Port - 414, // 1: otg.Config.lags:type_name -> otg.Lag - 430, // 2: otg.Config.layer1:type_name -> otg.Layer1 - 435, // 3: otg.Config.captures:type_name -> otg.Capture - 443, // 4: otg.Config.devices:type_name -> otg.Device - 596, // 5: otg.Config.flows:type_name -> otg.Flow - 708, // 6: otg.Config.events:type_name -> otg.Event - 411, // 7: otg.Config.options:type_name -> otg.ConfigOptions - 714, // 8: otg.Config.lldp:type_name -> otg.Lldp - 413, // 9: otg.ConfigOptions.port_options:type_name -> otg.PortOptions - 444, // 10: otg.ConfigOptions.protocol_options:type_name -> otg.ProtocolOptions - 415, // 11: otg.Lag.ports:type_name -> otg.LagPort - 416, // 12: otg.Lag.protocol:type_name -> otg.LagProtocol - 419, // 13: otg.LagPort.lacp:type_name -> otg.LagPortLacp - 420, // 14: otg.LagPort.ethernet:type_name -> otg.DeviceEthernetBase + 455, // 0: otg.Config.ports:type_name -> otg.Port + 457, // 1: otg.Config.lags:type_name -> otg.Lag + 505, // 2: otg.Config.layer1:type_name -> otg.Layer1 + 510, // 3: otg.Config.captures:type_name -> otg.Capture + 518, // 4: otg.Config.devices:type_name -> otg.Device + 737, // 5: otg.Config.flows:type_name -> otg.Flow + 851, // 6: otg.Config.events:type_name -> otg.Event + 454, // 7: otg.Config.options:type_name -> otg.ConfigOptions + 857, // 8: otg.Config.lldp:type_name -> otg.Lldp + 456, // 9: otg.ConfigOptions.port_options:type_name -> otg.PortOptions + 519, // 10: otg.ConfigOptions.protocol_options:type_name -> otg.ProtocolOptions + 458, // 11: otg.Lag.ports:type_name -> otg.LagPort + 459, // 12: otg.Lag.protocol:type_name -> otg.LagProtocol + 462, // 13: otg.LagPort.lacp:type_name -> otg.LagPortLacp + 463, // 14: otg.LagPort.ethernet:type_name -> otg.DeviceEthernetBase 0, // 15: otg.LagProtocol.choice:type_name -> otg.LagProtocol.Choice.Enum - 418, // 16: otg.LagProtocol.lacp:type_name -> otg.LagProtocolLacp - 417, // 17: otg.LagProtocol.static:type_name -> otg.LagProtocolStatic + 461, // 16: otg.LagProtocol.lacp:type_name -> otg.LagProtocolLacp + 460, // 17: otg.LagProtocol.static:type_name -> otg.LagProtocolStatic 1, // 18: otg.LagPortLacp.actor_activity:type_name -> otg.LagPortLacp.ActorActivity.Enum - 423, // 19: otg.DeviceEthernetBase.vlans:type_name -> otg.DeviceVlan - 422, // 20: otg.DeviceEthernet.connection:type_name -> otg.EthernetConnection - 424, // 21: otg.DeviceEthernet.ipv4_addresses:type_name -> otg.DeviceIpv4 - 427, // 22: otg.DeviceEthernet.ipv6_addresses:type_name -> otg.DeviceIpv6 - 423, // 23: otg.DeviceEthernet.vlans:type_name -> otg.DeviceVlan - 2, // 24: otg.EthernetConnection.choice:type_name -> otg.EthernetConnection.Choice.Enum - 3, // 25: otg.DeviceVlan.tpid:type_name -> otg.DeviceVlan.Tpid.Enum - 426, // 26: otg.DeviceIpv4.gateway_mac:type_name -> otg.DeviceIpv4GatewayMAC - 4, // 27: otg.DeviceIpv4GatewayMAC.choice:type_name -> otg.DeviceIpv4GatewayMAC.Choice.Enum - 429, // 28: otg.DeviceIpv6.gateway_mac:type_name -> otg.DeviceIpv6GatewayMAC - 5, // 29: otg.DeviceIpv6GatewayMAC.choice:type_name -> otg.DeviceIpv6GatewayMAC.Choice.Enum - 6, // 30: otg.Layer1.speed:type_name -> otg.Layer1.Speed.Enum - 7, // 31: otg.Layer1.media:type_name -> otg.Layer1.Media.Enum - 431, // 32: otg.Layer1.auto_negotiation:type_name -> otg.Layer1AutoNegotiation - 432, // 33: otg.Layer1.flow_control:type_name -> otg.Layer1FlowControl - 8, // 34: otg.Layer1FlowControl.choice:type_name -> otg.Layer1FlowControl.Choice.Enum - 434, // 35: otg.Layer1FlowControl.ieee_802_1qbb:type_name -> otg.Layer1Ieee8021qbb - 433, // 36: otg.Layer1FlowControl.ieee_802_3x:type_name -> otg.Layer1Ieee8023x - 436, // 37: otg.Capture.filters:type_name -> otg.CaptureFilter - 9, // 38: otg.Capture.format:type_name -> otg.Capture.Format.Enum - 10, // 39: otg.CaptureFilter.choice:type_name -> otg.CaptureFilter.Choice.Enum - 437, // 40: otg.CaptureFilter.custom:type_name -> otg.CaptureCustom - 439, // 41: otg.CaptureFilter.ethernet:type_name -> otg.CaptureEthernet - 440, // 42: otg.CaptureFilter.vlan:type_name -> otg.CaptureVlan - 441, // 43: otg.CaptureFilter.ipv4:type_name -> otg.CaptureIpv4 - 442, // 44: otg.CaptureFilter.ipv6:type_name -> otg.CaptureIpv6 - 438, // 45: otg.CaptureEthernet.src:type_name -> otg.CaptureField - 438, // 46: otg.CaptureEthernet.dst:type_name -> otg.CaptureField - 438, // 47: otg.CaptureEthernet.ether_type:type_name -> otg.CaptureField - 438, // 48: otg.CaptureEthernet.pfc_queue:type_name -> otg.CaptureField - 438, // 49: otg.CaptureVlan.priority:type_name -> otg.CaptureField - 438, // 50: otg.CaptureVlan.cfi:type_name -> otg.CaptureField - 438, // 51: otg.CaptureVlan.id:type_name -> otg.CaptureField - 438, // 52: otg.CaptureVlan.protocol:type_name -> otg.CaptureField - 438, // 53: otg.CaptureIpv4.version:type_name -> otg.CaptureField - 438, // 54: otg.CaptureIpv4.header_length:type_name -> otg.CaptureField - 438, // 55: otg.CaptureIpv4.priority:type_name -> otg.CaptureField - 438, // 56: otg.CaptureIpv4.total_length:type_name -> otg.CaptureField - 438, // 57: otg.CaptureIpv4.identification:type_name -> otg.CaptureField - 438, // 58: otg.CaptureIpv4.reserved:type_name -> otg.CaptureField - 438, // 59: otg.CaptureIpv4.dont_fragment:type_name -> otg.CaptureField - 438, // 60: otg.CaptureIpv4.more_fragments:type_name -> otg.CaptureField - 438, // 61: otg.CaptureIpv4.fragment_offset:type_name -> otg.CaptureField - 438, // 62: otg.CaptureIpv4.time_to_live:type_name -> otg.CaptureField - 438, // 63: otg.CaptureIpv4.protocol:type_name -> otg.CaptureField - 438, // 64: otg.CaptureIpv4.header_checksum:type_name -> otg.CaptureField - 438, // 65: otg.CaptureIpv4.src:type_name -> otg.CaptureField - 438, // 66: otg.CaptureIpv4.dst:type_name -> otg.CaptureField - 438, // 67: otg.CaptureIpv6.version:type_name -> otg.CaptureField - 438, // 68: otg.CaptureIpv6.traffic_class:type_name -> otg.CaptureField - 438, // 69: otg.CaptureIpv6.flow_label:type_name -> otg.CaptureField - 438, // 70: otg.CaptureIpv6.payload_length:type_name -> otg.CaptureField - 438, // 71: otg.CaptureIpv6.next_header:type_name -> otg.CaptureField - 438, // 72: otg.CaptureIpv6.hop_limit:type_name -> otg.CaptureField - 438, // 73: otg.CaptureIpv6.src:type_name -> otg.CaptureField - 438, // 74: otg.CaptureIpv6.dst:type_name -> otg.CaptureField - 421, // 75: otg.Device.ethernets:type_name -> otg.DeviceEthernet - 425, // 76: otg.Device.ipv4_loopbacks:type_name -> otg.DeviceIpv4Loopback - 428, // 77: otg.Device.ipv6_loopbacks:type_name -> otg.DeviceIpv6Loopback - 445, // 78: otg.Device.isis:type_name -> otg.DeviceIsisRouter - 464, // 79: otg.Device.bgp:type_name -> otg.DeviceBgpRouter - 573, // 80: otg.Device.vxlan:type_name -> otg.DeviceVxlan - 585, // 81: otg.Device.rsvp:type_name -> otg.DeviceRsvp - 446, // 82: otg.DeviceIsisRouter.instance:type_name -> otg.DeviceIsisMultiInstance - 447, // 83: otg.DeviceIsisRouter.interfaces:type_name -> otg.IsisInterface - 455, // 84: otg.DeviceIsisRouter.basic:type_name -> otg.IsisBasic - 456, // 85: otg.DeviceIsisRouter.advanced:type_name -> otg.IsisAdvanced - 457, // 86: otg.DeviceIsisRouter.router_auth:type_name -> otg.IsisAuthentication - 459, // 87: otg.DeviceIsisRouter.v4_routes:type_name -> otg.IsisV4RouteRange - 463, // 88: otg.DeviceIsisRouter.v6_routes:type_name -> otg.IsisV6RouteRange - 11, // 89: otg.IsisInterface.network_type:type_name -> otg.IsisInterface.NetworkType.Enum - 12, // 90: otg.IsisInterface.level_type:type_name -> otg.IsisInterface.LevelType.Enum - 448, // 91: otg.IsisInterface.l1_settings:type_name -> otg.IsisInterfaceLevel - 448, // 92: otg.IsisInterface.l2_settings:type_name -> otg.IsisInterfaceLevel - 449, // 93: otg.IsisInterface.multi_topology_ids:type_name -> otg.IsisMT - 450, // 94: otg.IsisInterface.traffic_engineering:type_name -> otg.LinkStateTE - 452, // 95: otg.IsisInterface.authentication:type_name -> otg.IsisInterfaceAuthentication - 453, // 96: otg.IsisInterface.advanced:type_name -> otg.IsisInterfaceAdvanced - 454, // 97: otg.IsisInterface.link_protection:type_name -> otg.IsisInterfaceLinkProtection - 451, // 98: otg.LinkStateTE.priority_bandwidths:type_name -> otg.LinkStatepriorityBandwidths - 13, // 99: otg.IsisInterfaceAuthentication.auth_type:type_name -> otg.IsisInterfaceAuthentication.AuthType.Enum - 458, // 100: otg.IsisAuthentication.area_auth:type_name -> otg.IsisAuthenticationBase - 458, // 101: otg.IsisAuthentication.domain_auth:type_name -> otg.IsisAuthenticationBase - 14, // 102: otg.IsisAuthenticationBase.auth_type:type_name -> otg.IsisAuthenticationBase.AuthType.Enum - 460, // 103: otg.IsisV4RouteRange.addresses:type_name -> otg.V4RouteAddress - 15, // 104: otg.IsisV4RouteRange.origin_type:type_name -> otg.IsisV4RouteRange.OriginType.Enum - 16, // 105: otg.IsisV4RouteRange.redistribution_type:type_name -> otg.IsisV4RouteRange.RedistributionType.Enum - 461, // 106: otg.IsisV6RouteRange.addresses:type_name -> otg.V6RouteAddress - 17, // 107: otg.IsisV6RouteRange.origin_type:type_name -> otg.IsisV6RouteRange.OriginType.Enum - 18, // 108: otg.IsisV6RouteRange.redistribution_type:type_name -> otg.IsisV6RouteRange.RedistributionType.Enum - 473, // 109: otg.DeviceBgpRouter.ipv4_interfaces:type_name -> otg.BgpV4Interface - 567, // 110: otg.DeviceBgpRouter.ipv6_interfaces:type_name -> otg.BgpV6Interface - 19, // 111: otg.DeviceBgpMessageHeaderError.subcode:type_name -> otg.DeviceBgpMessageHeaderError.Subcode.Enum - 20, // 112: otg.DeviceBgpOpenMessageError.subcode:type_name -> otg.DeviceBgpOpenMessageError.Subcode.Enum - 21, // 113: otg.DeviceBgpUpdateMessageError.subcode:type_name -> otg.DeviceBgpUpdateMessageError.Subcode.Enum - 22, // 114: otg.DeviceBgpCeaseError.subcode:type_name -> otg.DeviceBgpCeaseError.Subcode.Enum - 474, // 115: otg.BgpV4Peer.evpn_ethernet_segments:type_name -> otg.BgpV4EthernetSegment - 23, // 116: otg.BgpV4Peer.as_type:type_name -> otg.BgpV4Peer.AsType.Enum - 24, // 117: otg.BgpV4Peer.as_number_width:type_name -> otg.BgpV4Peer.AsNumberWidth.Enum - 487, // 118: otg.BgpV4Peer.advanced:type_name -> otg.BgpAdvanced - 488, // 119: otg.BgpV4Peer.capability:type_name -> otg.BgpCapability - 489, // 120: otg.BgpV4Peer.learned_information_filter:type_name -> otg.BgpLearnedInformationFilter - 490, // 121: otg.BgpV4Peer.v4_routes:type_name -> otg.BgpV4RouteRange - 510, // 122: otg.BgpV4Peer.v6_routes:type_name -> otg.BgpV6RouteRange - 511, // 123: otg.BgpV4Peer.v4_srte_policies:type_name -> otg.BgpSrteV4Policy - 535, // 124: otg.BgpV4Peer.v6_srte_policies:type_name -> otg.BgpSrteV6Policy - 537, // 125: otg.BgpV4Peer.graceful_restart:type_name -> otg.BgpGracefulRestart - 538, // 126: otg.BgpV4Peer.replay_updates:type_name -> otg.BgpUpdateReplay - 472, // 127: otg.BgpV4Interface.peers:type_name -> otg.BgpV4Peer - 475, // 128: otg.BgpV4EthernetSegment.df_election:type_name -> otg.BgpEthernetSegmentDfElection - 481, // 129: otg.BgpV4EthernetSegment.evis:type_name -> otg.BgpV4EvpnEvis - 25, // 130: otg.BgpV4EthernetSegment.active_mode:type_name -> otg.BgpV4EthernetSegment.ActiveMode.Enum - 476, // 131: otg.BgpV4EthernetSegment.advanced:type_name -> otg.BgpRouteAdvanced - 477, // 132: otg.BgpV4EthernetSegment.communities:type_name -> otg.BgpCommunity - 478, // 133: otg.BgpV4EthernetSegment.ext_communities:type_name -> otg.BgpExtCommunity - 479, // 134: otg.BgpV4EthernetSegment.as_path:type_name -> otg.BgpAsPath - 26, // 135: otg.BgpRouteAdvanced.origin:type_name -> otg.BgpRouteAdvanced.Origin.Enum - 27, // 136: otg.BgpCommunity.type:type_name -> otg.BgpCommunity.Type.Enum - 28, // 137: otg.BgpExtCommunity.type:type_name -> otg.BgpExtCommunity.Type.Enum - 29, // 138: otg.BgpExtCommunity.subtype:type_name -> otg.BgpExtCommunity.Subtype.Enum - 30, // 139: otg.BgpAsPath.as_set_mode:type_name -> otg.BgpAsPath.AsSetMode.Enum - 480, // 140: otg.BgpAsPath.segments:type_name -> otg.BgpAsPathSegment - 31, // 141: otg.BgpAsPathSegment.type:type_name -> otg.BgpAsPathSegment.Type.Enum - 32, // 142: otg.BgpV4EvpnEvis.choice:type_name -> otg.BgpV4EvpnEvis.Choice.Enum - 482, // 143: otg.BgpV4EvpnEvis.evi_vxlan:type_name -> otg.BgpV4EviVxlan - 483, // 144: otg.BgpV4EviVxlan.broadcast_domains:type_name -> otg.BgpV4EviVxlanBroadcastDomain - 33, // 145: otg.BgpV4EviVxlan.replication_type:type_name -> otg.BgpV4EviVxlan.ReplicationType.Enum - 485, // 146: otg.BgpV4EviVxlan.route_distinguisher:type_name -> otg.BgpRouteDistinguisher - 486, // 147: otg.BgpV4EviVxlan.route_target_export:type_name -> otg.BgpRouteTarget - 486, // 148: otg.BgpV4EviVxlan.route_target_import:type_name -> otg.BgpRouteTarget - 486, // 149: otg.BgpV4EviVxlan.l3_route_target_export:type_name -> otg.BgpRouteTarget - 486, // 150: otg.BgpV4EviVxlan.l3_route_target_import:type_name -> otg.BgpRouteTarget - 476, // 151: otg.BgpV4EviVxlan.advanced:type_name -> otg.BgpRouteAdvanced - 477, // 152: otg.BgpV4EviVxlan.communities:type_name -> otg.BgpCommunity - 478, // 153: otg.BgpV4EviVxlan.ext_communities:type_name -> otg.BgpExtCommunity - 479, // 154: otg.BgpV4EviVxlan.as_path:type_name -> otg.BgpAsPath - 484, // 155: otg.BgpV4EviVxlanBroadcastDomain.cmac_ip_range:type_name -> otg.BgpCMacIpRange - 462, // 156: otg.BgpCMacIpRange.mac_addresses:type_name -> otg.MACRouteAddress - 460, // 157: otg.BgpCMacIpRange.ipv4_addresses:type_name -> otg.V4RouteAddress - 461, // 158: otg.BgpCMacIpRange.ipv6_addresses:type_name -> otg.V6RouteAddress - 476, // 159: otg.BgpCMacIpRange.advanced:type_name -> otg.BgpRouteAdvanced - 477, // 160: otg.BgpCMacIpRange.communities:type_name -> otg.BgpCommunity - 478, // 161: otg.BgpCMacIpRange.ext_communities:type_name -> otg.BgpExtCommunity - 479, // 162: otg.BgpCMacIpRange.as_path:type_name -> otg.BgpAsPath - 34, // 163: otg.BgpRouteDistinguisher.rd_type:type_name -> otg.BgpRouteDistinguisher.RdType.Enum - 35, // 164: otg.BgpRouteTarget.rt_type:type_name -> otg.BgpRouteTarget.RtType.Enum - 460, // 165: otg.BgpV4RouteRange.addresses:type_name -> otg.V4RouteAddress - 36, // 166: otg.BgpV4RouteRange.next_hop_mode:type_name -> otg.BgpV4RouteRange.NextHopMode.Enum - 37, // 167: otg.BgpV4RouteRange.next_hop_address_type:type_name -> otg.BgpV4RouteRange.NextHopAddressType.Enum - 476, // 168: otg.BgpV4RouteRange.advanced:type_name -> otg.BgpRouteAdvanced - 477, // 169: otg.BgpV4RouteRange.communities:type_name -> otg.BgpCommunity - 479, // 170: otg.BgpV4RouteRange.as_path:type_name -> otg.BgpAsPath - 491, // 171: otg.BgpV4RouteRange.add_path:type_name -> otg.BgpAddPath - 478, // 172: otg.BgpV4RouteRange.ext_communities:type_name -> otg.BgpExtCommunity - 492, // 173: otg.BgpV4RouteRange.extended_communities:type_name -> otg.BgpExtendedCommunity - 38, // 174: otg.BgpExtendedCommunity.choice:type_name -> otg.BgpExtendedCommunity.Choice.Enum - 495, // 175: otg.BgpExtendedCommunity.transitive_2octet_as_type:type_name -> otg.BgpExtendedCommunityTransitive2OctetAsType - 498, // 176: otg.BgpExtendedCommunity.transitive_ipv4_address_type:type_name -> otg.BgpExtendedCommunityTransitiveIpv4AddressType - 501, // 177: otg.BgpExtendedCommunity.transitive_4octet_as_type:type_name -> otg.BgpExtendedCommunityTransitive4OctetAsType - 504, // 178: otg.BgpExtendedCommunity.transitive_opaque_type:type_name -> otg.BgpExtendedCommunityTransitiveOpaqueType - 506, // 179: otg.BgpExtendedCommunity.transitive_evpn_type:type_name -> otg.BgpExtendedCommunityTransitiveEvpnType - 508, // 180: otg.BgpExtendedCommunity.non_transitive_2octet_as_type:type_name -> otg.BgpExtendedCommunityNonTransitive2OctetAsType - 509, // 181: otg.BgpExtendedCommunity.custom:type_name -> otg.BgpExtendedCommunityCustomType - 39, // 182: otg.BgpExtendedCommunityTransitive2OctetAsType.choice:type_name -> otg.BgpExtendedCommunityTransitive2OctetAsType.Choice.Enum - 493, // 183: otg.BgpExtendedCommunityTransitive2OctetAsType.route_target_subtype:type_name -> otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget - 494, // 184: otg.BgpExtendedCommunityTransitive2OctetAsType.route_origin_subtype:type_name -> otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin - 40, // 185: otg.BgpExtendedCommunityTransitiveIpv4AddressType.choice:type_name -> otg.BgpExtendedCommunityTransitiveIpv4AddressType.Choice.Enum - 497, // 186: otg.BgpExtendedCommunityTransitiveIpv4AddressType.route_target_subtype:type_name -> otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget - 496, // 187: otg.BgpExtendedCommunityTransitiveIpv4AddressType.route_origin_subtype:type_name -> otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin - 41, // 188: otg.BgpExtendedCommunityTransitive4OctetAsType.choice:type_name -> otg.BgpExtendedCommunityTransitive4OctetAsType.Choice.Enum - 499, // 189: otg.BgpExtendedCommunityTransitive4OctetAsType.route_target_subtype:type_name -> otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget - 500, // 190: otg.BgpExtendedCommunityTransitive4OctetAsType.route_origin_subtype:type_name -> otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin - 42, // 191: otg.BgpExtendedCommunityTransitiveOpaqueType.choice:type_name -> otg.BgpExtendedCommunityTransitiveOpaqueType.Choice.Enum - 502, // 192: otg.BgpExtendedCommunityTransitiveOpaqueType.color_subtype:type_name -> otg.BgpExtendedCommunityTransitiveOpaqueTypeColor - 503, // 193: otg.BgpExtendedCommunityTransitiveOpaqueType.encapsulation_subtype:type_name -> otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation - 43, // 194: otg.BgpExtendedCommunityTransitiveEvpnType.choice:type_name -> otg.BgpExtendedCommunityTransitiveEvpnType.Choice.Enum - 505, // 195: otg.BgpExtendedCommunityTransitiveEvpnType.router_mac_subtype:type_name -> otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac - 44, // 196: otg.BgpExtendedCommunityNonTransitive2OctetAsType.choice:type_name -> otg.BgpExtendedCommunityNonTransitive2OctetAsType.Choice.Enum - 507, // 197: otg.BgpExtendedCommunityNonTransitive2OctetAsType.link_bandwidth_subtype:type_name -> otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth - 461, // 198: otg.BgpV6RouteRange.addresses:type_name -> otg.V6RouteAddress - 45, // 199: otg.BgpV6RouteRange.next_hop_mode:type_name -> otg.BgpV6RouteRange.NextHopMode.Enum - 46, // 200: otg.BgpV6RouteRange.next_hop_address_type:type_name -> otg.BgpV6RouteRange.NextHopAddressType.Enum - 476, // 201: otg.BgpV6RouteRange.advanced:type_name -> otg.BgpRouteAdvanced - 477, // 202: otg.BgpV6RouteRange.communities:type_name -> otg.BgpCommunity - 479, // 203: otg.BgpV6RouteRange.as_path:type_name -> otg.BgpAsPath - 491, // 204: otg.BgpV6RouteRange.add_path:type_name -> otg.BgpAddPath - 478, // 205: otg.BgpV6RouteRange.ext_communities:type_name -> otg.BgpExtCommunity - 492, // 206: otg.BgpV6RouteRange.extended_communities:type_name -> otg.BgpExtendedCommunity - 47, // 207: otg.BgpSrteV4Policy.next_hop_mode:type_name -> otg.BgpSrteV4Policy.NextHopMode.Enum - 48, // 208: otg.BgpSrteV4Policy.next_hop_address_type:type_name -> otg.BgpSrteV4Policy.NextHopAddressType.Enum - 476, // 209: otg.BgpSrteV4Policy.advanced:type_name -> otg.BgpRouteAdvanced - 491, // 210: otg.BgpSrteV4Policy.add_path:type_name -> otg.BgpAddPath - 479, // 211: otg.BgpSrteV4Policy.as_path:type_name -> otg.BgpAsPath - 477, // 212: otg.BgpSrteV4Policy.communities:type_name -> otg.BgpCommunity - 478, // 213: otg.BgpSrteV4Policy.ext_communities:type_name -> otg.BgpExtCommunity - 512, // 214: otg.BgpSrteV4Policy.tunnel_tlvs:type_name -> otg.BgpSrteV4TunnelTlv - 513, // 215: otg.BgpSrteV4TunnelTlv.remote_endpoint_sub_tlv:type_name -> otg.BgpSrteRemoteEndpointSubTlv - 514, // 216: otg.BgpSrteV4TunnelTlv.color_sub_tlv:type_name -> otg.BgpSrteColorSubTlv - 515, // 217: otg.BgpSrteV4TunnelTlv.binding_sub_tlv:type_name -> otg.BgpSrteBindingSubTlv - 516, // 218: otg.BgpSrteV4TunnelTlv.preference_sub_tlv:type_name -> otg.BgpSrtePreferenceSubTlv - 517, // 219: otg.BgpSrteV4TunnelTlv.policy_priority_sub_tlv:type_name -> otg.BgpSrtePolicyPrioritySubTlv - 518, // 220: otg.BgpSrteV4TunnelTlv.policy_name_sub_tlv:type_name -> otg.BgpSrtePolicyNameSubTlv - 519, // 221: otg.BgpSrteV4TunnelTlv.explicit_null_label_policy_sub_tlv:type_name -> otg.BgpSrteExplicitNullLabelPolicySubTlv - 520, // 222: otg.BgpSrteV4TunnelTlv.segment_lists:type_name -> otg.BgpSrteSegmentList - 49, // 223: otg.BgpSrteRemoteEndpointSubTlv.address_family:type_name -> otg.BgpSrteRemoteEndpointSubTlv.AddressFamily.Enum - 50, // 224: otg.BgpSrteBindingSubTlv.binding_sid_type:type_name -> otg.BgpSrteBindingSubTlv.BindingSidType.Enum - 51, // 225: otg.BgpSrteExplicitNullLabelPolicySubTlv.explicit_null_label_policy:type_name -> otg.BgpSrteExplicitNullLabelPolicySubTlv.ExplicitNullLabelPolicy.Enum - 521, // 226: otg.BgpSrteSegmentList.segments:type_name -> otg.BgpSrteSegment - 52, // 227: otg.BgpSrteSegment.segment_type:type_name -> otg.BgpSrteSegment.SegmentType.Enum - 524, // 228: otg.BgpSrteSegment.type_a:type_name -> otg.BgpSrteSegmentATypeSubTlv - 525, // 229: otg.BgpSrteSegment.type_b:type_name -> otg.BgpSrteSegmentBTypeSubTlv - 526, // 230: otg.BgpSrteSegment.type_c:type_name -> otg.BgpSrteSegmentCTypeSubTlv - 527, // 231: otg.BgpSrteSegment.type_d:type_name -> otg.BgpSrteSegmentDTypeSubTlv - 528, // 232: otg.BgpSrteSegment.type_e:type_name -> otg.BgpSrteSegmentETypeSubTlv - 529, // 233: otg.BgpSrteSegment.type_f:type_name -> otg.BgpSrteSegmentFTypeSubTlv - 530, // 234: otg.BgpSrteSegment.type_g:type_name -> otg.BgpSrteSegmentGTypeSubTlv - 531, // 235: otg.BgpSrteSegment.type_h:type_name -> otg.BgpSrteSegmentHTypeSubTlv - 532, // 236: otg.BgpSrteSegment.type_i:type_name -> otg.BgpSrteSegmentITypeSubTlv - 533, // 237: otg.BgpSrteSegment.type_j:type_name -> otg.BgpSrteSegmentJTypeSubTlv - 534, // 238: otg.BgpSrteSegment.type_k:type_name -> otg.BgpSrteSegmentKTypeSubTlv - 523, // 239: otg.BgpSrteSegmentBTypeSubTlv.srv6_sid_endpoint_behavior:type_name -> otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure - 522, // 240: otg.BgpSrteSegmentCTypeSubTlv.sr_mpls_sid:type_name -> otg.BgpSrteSrMplsSid - 522, // 241: otg.BgpSrteSegmentDTypeSubTlv.sr_mpls_sid:type_name -> otg.BgpSrteSrMplsSid - 522, // 242: otg.BgpSrteSegmentETypeSubTlv.sr_mpls_sid:type_name -> otg.BgpSrteSrMplsSid - 522, // 243: otg.BgpSrteSegmentFTypeSubTlv.sr_mpls_sid:type_name -> otg.BgpSrteSrMplsSid - 522, // 244: otg.BgpSrteSegmentGTypeSubTlv.sr_mpls_sid:type_name -> otg.BgpSrteSrMplsSid - 522, // 245: otg.BgpSrteSegmentHTypeSubTlv.sr_mpls_sid:type_name -> otg.BgpSrteSrMplsSid - 523, // 246: otg.BgpSrteSegmentITypeSubTlv.srv6_sid_endpoint_behavior:type_name -> otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure - 523, // 247: otg.BgpSrteSegmentJTypeSubTlv.srv6_sid_endpoint_behavior:type_name -> otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure - 523, // 248: otg.BgpSrteSegmentKTypeSubTlv.srv6_sid_endpoint_behavior:type_name -> otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure - 53, // 249: otg.BgpSrteV6Policy.next_hop_mode:type_name -> otg.BgpSrteV6Policy.NextHopMode.Enum - 54, // 250: otg.BgpSrteV6Policy.next_hop_address_type:type_name -> otg.BgpSrteV6Policy.NextHopAddressType.Enum - 476, // 251: otg.BgpSrteV6Policy.advanced:type_name -> otg.BgpRouteAdvanced - 491, // 252: otg.BgpSrteV6Policy.add_path:type_name -> otg.BgpAddPath - 479, // 253: otg.BgpSrteV6Policy.as_path:type_name -> otg.BgpAsPath - 477, // 254: otg.BgpSrteV6Policy.communities:type_name -> otg.BgpCommunity - 478, // 255: otg.BgpSrteV6Policy.extcommunities:type_name -> otg.BgpExtCommunity - 536, // 256: otg.BgpSrteV6Policy.tunnel_tlvs:type_name -> otg.BgpSrteV6TunnelTlv - 513, // 257: otg.BgpSrteV6TunnelTlv.remote_endpoint_sub_tlv:type_name -> otg.BgpSrteRemoteEndpointSubTlv - 514, // 258: otg.BgpSrteV6TunnelTlv.color_sub_tlv:type_name -> otg.BgpSrteColorSubTlv - 515, // 259: otg.BgpSrteV6TunnelTlv.binding_sub_tlv:type_name -> otg.BgpSrteBindingSubTlv - 516, // 260: otg.BgpSrteV6TunnelTlv.preference_sub_tlv:type_name -> otg.BgpSrtePreferenceSubTlv - 517, // 261: otg.BgpSrteV6TunnelTlv.policy_priority_sub_tlv:type_name -> otg.BgpSrtePolicyPrioritySubTlv - 518, // 262: otg.BgpSrteV6TunnelTlv.policy_name_sub_tlv:type_name -> otg.BgpSrtePolicyNameSubTlv - 519, // 263: otg.BgpSrteV6TunnelTlv.explicit_null_label_policy_sub_tlv:type_name -> otg.BgpSrteExplicitNullLabelPolicySubTlv - 520, // 264: otg.BgpSrteV6TunnelTlv.segment_lists:type_name -> otg.BgpSrteSegmentList - 55, // 265: otg.BgpUpdateReplay.choice:type_name -> otg.BgpUpdateReplay.Choice.Enum - 541, // 266: otg.BgpUpdateReplay.structured_pdus:type_name -> otg.BgpStructuredPdus - 539, // 267: otg.BgpUpdateReplay.raw_bytes:type_name -> otg.BgpRawBytes - 540, // 268: otg.BgpRawBytes.updates:type_name -> otg.BgpOneUpdateReplay - 542, // 269: otg.BgpStructuredPdus.updates:type_name -> otg.BgpOneStructuredUpdateReplay - 547, // 270: otg.BgpOneStructuredUpdateReplay.path_attributes:type_name -> otg.BgpAttributes - 543, // 271: otg.BgpOneStructuredUpdateReplay.traditional_unreach_nlris:type_name -> otg.BgpOneTraditionalNlriPrefix - 543, // 272: otg.BgpOneStructuredUpdateReplay.traditional_reach_nlris:type_name -> otg.BgpOneTraditionalNlriPrefix - 546, // 273: otg.BgpOneTraditionalNlriPrefix.path_id:type_name -> otg.BgpNLRIPrefixPathId - 546, // 274: otg.BgpOneIpv4NLRIPrefix.path_id:type_name -> otg.BgpNLRIPrefixPathId - 546, // 275: otg.BgpOneIpv6NLRIPrefix.path_id:type_name -> otg.BgpNLRIPrefixPathId - 548, // 276: otg.BgpAttributes.other_attributes:type_name -> otg.BgpAttributesOtherAttribute - 56, // 277: otg.BgpAttributes.origin:type_name -> otg.BgpAttributes.Origin.Enum - 549, // 278: otg.BgpAttributes.as_path:type_name -> otg.BgpAttributesAsPath - 554, // 279: otg.BgpAttributes.as4_path:type_name -> otg.BgpAttributesAs4Path - 559, // 280: otg.BgpAttributes.next_hop:type_name -> otg.BgpAttributesNextHop - 563, // 281: otg.BgpAttributes.multi_exit_discriminator:type_name -> otg.BgpAttributesMultiExitDiscriminator - 564, // 282: otg.BgpAttributes.local_preference:type_name -> otg.BgpAttributesLocalPreference - 555, // 283: otg.BgpAttributes.aggregator:type_name -> otg.BgpAttributesAggregator - 556, // 284: otg.BgpAttributes.as4_aggregator:type_name -> otg.BgpAttributesAs4Aggregator - 557, // 285: otg.BgpAttributes.community:type_name -> otg.BgpAttributesCommunity - 565, // 286: otg.BgpAttributes.originator_id:type_name -> otg.BgpAttributesOriginatorId - 492, // 287: otg.BgpAttributes.extended_communities:type_name -> otg.BgpExtendedCommunity - 561, // 288: otg.BgpAttributes.mp_reach:type_name -> otg.BgpAttributesMpReachNlri - 562, // 289: otg.BgpAttributes.mp_unreach:type_name -> otg.BgpAttributesMpUnreachNlri - 57, // 290: otg.BgpAttributesAsPath.choice:type_name -> otg.BgpAttributesAsPath.Choice.Enum - 550, // 291: otg.BgpAttributesAsPath.four_byte_as_path:type_name -> otg.BgpAttributesAsPathFourByteAsPath - 552, // 292: otg.BgpAttributesAsPath.two_byte_as_path:type_name -> otg.BgpAttributesAsPathTwoByteAsPath - 551, // 293: otg.BgpAttributesAsPathFourByteAsPath.segments:type_name -> otg.BgpAttributesFourByteAsPathSegment - 58, // 294: otg.BgpAttributesFourByteAsPathSegment.type:type_name -> otg.BgpAttributesFourByteAsPathSegment.Type.Enum - 553, // 295: otg.BgpAttributesAsPathTwoByteAsPath.segments:type_name -> otg.BgpAttributesTwoByteAsPathSegment - 59, // 296: otg.BgpAttributesTwoByteAsPathSegment.type:type_name -> otg.BgpAttributesTwoByteAsPathSegment.Type.Enum - 551, // 297: otg.BgpAttributesAs4Path.segments:type_name -> otg.BgpAttributesFourByteAsPathSegment - 60, // 298: otg.BgpAttributesAggregator.choice:type_name -> otg.BgpAttributesAggregator.Choice.Enum - 61, // 299: otg.BgpAttributesCommunity.choice:type_name -> otg.BgpAttributesCommunity.Choice.Enum - 558, // 300: otg.BgpAttributesCommunity.custom_community:type_name -> otg.BgpAttributesCustomCommunity - 62, // 301: otg.BgpAttributesNextHop.choice:type_name -> otg.BgpAttributesNextHop.Choice.Enum - 560, // 302: otg.BgpAttributesNextHop.ipv6_two_addresses:type_name -> otg.BgpAttributesNextHopIpv6TwoAddresses - 559, // 303: otg.BgpAttributesMpReachNlri.next_hop:type_name -> otg.BgpAttributesNextHop - 63, // 304: otg.BgpAttributesMpReachNlri.choice:type_name -> otg.BgpAttributesMpReachNlri.Choice.Enum - 544, // 305: otg.BgpAttributesMpReachNlri.ipv4_unicast:type_name -> otg.BgpOneIpv4NLRIPrefix - 545, // 306: otg.BgpAttributesMpReachNlri.ipv6_unicast:type_name -> otg.BgpOneIpv6NLRIPrefix - 64, // 307: otg.BgpAttributesMpUnreachNlri.choice:type_name -> otg.BgpAttributesMpUnreachNlri.Choice.Enum - 544, // 308: otg.BgpAttributesMpUnreachNlri.ipv4_unicast:type_name -> otg.BgpOneIpv4NLRIPrefix - 545, // 309: otg.BgpAttributesMpUnreachNlri.ipv6_unicast:type_name -> otg.BgpOneIpv6NLRIPrefix - 568, // 310: otg.BgpV6Peer.segment_routing:type_name -> otg.BgpV6SegmentRouting - 569, // 311: otg.BgpV6Peer.evpn_ethernet_segments:type_name -> otg.BgpV6EthernetSegment - 65, // 312: otg.BgpV6Peer.as_type:type_name -> otg.BgpV6Peer.AsType.Enum - 66, // 313: otg.BgpV6Peer.as_number_width:type_name -> otg.BgpV6Peer.AsNumberWidth.Enum - 487, // 314: otg.BgpV6Peer.advanced:type_name -> otg.BgpAdvanced - 488, // 315: otg.BgpV6Peer.capability:type_name -> otg.BgpCapability - 489, // 316: otg.BgpV6Peer.learned_information_filter:type_name -> otg.BgpLearnedInformationFilter - 490, // 317: otg.BgpV6Peer.v4_routes:type_name -> otg.BgpV4RouteRange - 510, // 318: otg.BgpV6Peer.v6_routes:type_name -> otg.BgpV6RouteRange - 511, // 319: otg.BgpV6Peer.v4_srte_policies:type_name -> otg.BgpSrteV4Policy - 535, // 320: otg.BgpV6Peer.v6_srte_policies:type_name -> otg.BgpSrteV6Policy - 537, // 321: otg.BgpV6Peer.graceful_restart:type_name -> otg.BgpGracefulRestart - 538, // 322: otg.BgpV6Peer.replay_updates:type_name -> otg.BgpUpdateReplay - 566, // 323: otg.BgpV6Interface.peers:type_name -> otg.BgpV6Peer - 475, // 324: otg.BgpV6EthernetSegment.df_election:type_name -> otg.BgpEthernetSegmentDfElection - 570, // 325: otg.BgpV6EthernetSegment.evis:type_name -> otg.BgpV6EvpnEvis - 67, // 326: otg.BgpV6EthernetSegment.active_mode:type_name -> otg.BgpV6EthernetSegment.ActiveMode.Enum - 476, // 327: otg.BgpV6EthernetSegment.advanced:type_name -> otg.BgpRouteAdvanced - 477, // 328: otg.BgpV6EthernetSegment.communities:type_name -> otg.BgpCommunity - 478, // 329: otg.BgpV6EthernetSegment.ext_communities:type_name -> otg.BgpExtCommunity - 479, // 330: otg.BgpV6EthernetSegment.as_path:type_name -> otg.BgpAsPath - 68, // 331: otg.BgpV6EvpnEvis.choice:type_name -> otg.BgpV6EvpnEvis.Choice.Enum - 571, // 332: otg.BgpV6EvpnEvis.evi_vxlan:type_name -> otg.BgpV6EviVxlan - 572, // 333: otg.BgpV6EviVxlan.broadcast_domains:type_name -> otg.BgpV6EviVxlanBroadcastDomain - 69, // 334: otg.BgpV6EviVxlan.replication_type:type_name -> otg.BgpV6EviVxlan.ReplicationType.Enum - 485, // 335: otg.BgpV6EviVxlan.route_distinguisher:type_name -> otg.BgpRouteDistinguisher - 486, // 336: otg.BgpV6EviVxlan.route_target_export:type_name -> otg.BgpRouteTarget - 486, // 337: otg.BgpV6EviVxlan.route_target_import:type_name -> otg.BgpRouteTarget - 486, // 338: otg.BgpV6EviVxlan.l3_route_target_export:type_name -> otg.BgpRouteTarget - 486, // 339: otg.BgpV6EviVxlan.l3_route_target_import:type_name -> otg.BgpRouteTarget - 476, // 340: otg.BgpV6EviVxlan.advanced:type_name -> otg.BgpRouteAdvanced - 477, // 341: otg.BgpV6EviVxlan.communities:type_name -> otg.BgpCommunity - 478, // 342: otg.BgpV6EviVxlan.ext_communities:type_name -> otg.BgpExtCommunity - 479, // 343: otg.BgpV6EviVxlan.as_path:type_name -> otg.BgpAsPath - 484, // 344: otg.BgpV6EviVxlanBroadcastDomain.cmac_ip_range:type_name -> otg.BgpCMacIpRange - 574, // 345: otg.DeviceVxlan.v4_tunnels:type_name -> otg.VxlanV4Tunnel - 575, // 346: otg.DeviceVxlan.v6_tunnels:type_name -> otg.VxlanV6Tunnel - 576, // 347: otg.VxlanV4Tunnel.destination_ip_mode:type_name -> otg.VxlanV4TunnelDestinationIPMode - 577, // 348: otg.VxlanV6Tunnel.destination_ip_mode:type_name -> otg.VxlanV6TunnelDestinationIPMode - 70, // 349: otg.VxlanV4TunnelDestinationIPMode.choice:type_name -> otg.VxlanV4TunnelDestinationIPMode.Choice.Enum - 578, // 350: otg.VxlanV4TunnelDestinationIPMode.unicast:type_name -> otg.VxlanV4TunnelDestinationIPModeUnicast - 583, // 351: otg.VxlanV4TunnelDestinationIPMode.multicast:type_name -> otg.VxlanV4TunnelDestinationIPModeMulticast - 71, // 352: otg.VxlanV6TunnelDestinationIPMode.choice:type_name -> otg.VxlanV6TunnelDestinationIPMode.Choice.Enum - 579, // 353: otg.VxlanV6TunnelDestinationIPMode.unicast:type_name -> otg.VxlanV6TunnelDestinationIPModeUnicast - 584, // 354: otg.VxlanV6TunnelDestinationIPMode.multicast:type_name -> otg.VxlanV6TunnelDestinationIPModeMulticast - 581, // 355: otg.VxlanV4TunnelDestinationIPModeUnicast.vteps:type_name -> otg.VxlanV4TunnelDestinationIPModeUnicastVtep - 582, // 356: otg.VxlanV6TunnelDestinationIPModeUnicast.vteps:type_name -> otg.VxlanV6TunnelDestinationIPModeUnicastVtep - 580, // 357: otg.VxlanV4TunnelDestinationIPModeUnicastVtep.arp_suppression_cache:type_name -> otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache - 580, // 358: otg.VxlanV6TunnelDestinationIPModeUnicastVtep.arp_suppression_cache:type_name -> otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache - 586, // 359: otg.DeviceRsvp.ipv4_interfaces:type_name -> otg.RsvpIpv4Interface - 587, // 360: otg.DeviceRsvp.lsp_ipv4_interfaces:type_name -> otg.RsvpLspIpv4Interface - 588, // 361: otg.RsvpLspIpv4Interface.p2p_egress_ipv4_lsps:type_name -> otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp - 589, // 362: otg.RsvpLspIpv4Interface.p2p_ingress_ipv4_lsps:type_name -> otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp - 72, // 363: otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.reservation_style:type_name -> otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.ReservationStyle.Enum - 590, // 364: otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.session_attribute:type_name -> otg.RsvpSessionAttribute - 592, // 365: otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.tspec:type_name -> otg.RsvpTspec - 593, // 366: otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.fast_reroute:type_name -> otg.RsvpFastReroute - 594, // 367: otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.ero:type_name -> otg.RsvpEro - 591, // 368: otg.RsvpSessionAttribute.resource_affinities:type_name -> otg.RsvpResourceAffinities - 73, // 369: otg.RsvpEro.prepend_neighbor_ip:type_name -> otg.RsvpEro.PrependNeighborIp.Enum - 595, // 370: otg.RsvpEro.subobjects:type_name -> otg.RsvpEroSubobject - 74, // 371: otg.RsvpEroSubobject.type:type_name -> otg.RsvpEroSubobject.Type.Enum - 75, // 372: otg.RsvpEroSubobject.hop_type:type_name -> otg.RsvpEroSubobject.HopType.Enum - 597, // 373: otg.Flow.tx_rx:type_name -> otg.FlowTxRx - 600, // 374: otg.Flow.packet:type_name -> otg.FlowHeader - 600, // 375: otg.Flow.egress_packet:type_name -> otg.FlowHeader - 690, // 376: otg.Flow.size:type_name -> otg.FlowSize - 695, // 377: otg.Flow.rate:type_name -> otg.FlowRate - 696, // 378: otg.Flow.duration:type_name -> otg.FlowDuration - 703, // 379: otg.Flow.metrics:type_name -> otg.FlowMetrics - 76, // 380: otg.FlowTxRx.choice:type_name -> otg.FlowTxRx.Choice.Enum - 598, // 381: otg.FlowTxRx.port:type_name -> otg.FlowPort - 599, // 382: otg.FlowTxRx.device:type_name -> otg.FlowRouter - 77, // 383: otg.FlowRouter.mode:type_name -> otg.FlowRouter.Mode.Enum - 78, // 384: otg.FlowHeader.choice:type_name -> otg.FlowHeader.Choice.Enum - 601, // 385: otg.FlowHeader.custom:type_name -> otg.FlowCustom - 603, // 386: otg.FlowHeader.ethernet:type_name -> otg.FlowEthernet - 604, // 387: otg.FlowHeader.vlan:type_name -> otg.FlowVlan - 605, // 388: otg.FlowHeader.vxlan:type_name -> otg.FlowVxlan - 606, // 389: otg.FlowHeader.ipv4:type_name -> otg.FlowIpv4 - 614, // 390: otg.FlowHeader.ipv6:type_name -> otg.FlowIpv6 - 615, // 391: otg.FlowHeader.pfcpause:type_name -> otg.FlowPfcPause - 616, // 392: otg.FlowHeader.ethernetpause:type_name -> otg.FlowEthernetPause - 617, // 393: otg.FlowHeader.tcp:type_name -> otg.FlowTcp - 618, // 394: otg.FlowHeader.udp:type_name -> otg.FlowUdp - 619, // 395: otg.FlowHeader.gre:type_name -> otg.FlowGre - 620, // 396: otg.FlowHeader.gtpv1:type_name -> otg.FlowGtpv1 - 622, // 397: otg.FlowHeader.gtpv2:type_name -> otg.FlowGtpv2 - 623, // 398: otg.FlowHeader.arp:type_name -> otg.FlowArp - 624, // 399: otg.FlowHeader.icmp:type_name -> otg.FlowIcmp - 626, // 400: otg.FlowHeader.icmpv6:type_name -> otg.FlowIcmpv6 - 628, // 401: otg.FlowHeader.ppp:type_name -> otg.FlowPpp - 629, // 402: otg.FlowHeader.igmpv1:type_name -> otg.FlowIgmpv1 - 630, // 403: otg.FlowHeader.mpls:type_name -> otg.FlowMpls - 631, // 404: otg.FlowHeader.snmpv2c:type_name -> otg.FlowSnmpv2c - 638, // 405: otg.FlowHeader.rsvp:type_name -> otg.FlowRsvp - 602, // 406: otg.FlowCustom.metric_tags:type_name -> otg.FlowCustomMetricTag - 833, // 407: otg.FlowEthernet.dst:type_name -> otg.PatternFlowEthernetDst - 836, // 408: otg.FlowEthernet.src:type_name -> otg.PatternFlowEthernetSrc - 839, // 409: otg.FlowEthernet.ether_type:type_name -> otg.PatternFlowEthernetEtherType - 842, // 410: otg.FlowEthernet.pfc_queue:type_name -> otg.PatternFlowEthernetPfcQueue - 845, // 411: otg.FlowVlan.priority:type_name -> otg.PatternFlowVlanPriority - 848, // 412: otg.FlowVlan.cfi:type_name -> otg.PatternFlowVlanCfi - 851, // 413: otg.FlowVlan.id:type_name -> otg.PatternFlowVlanId - 854, // 414: otg.FlowVlan.tpid:type_name -> otg.PatternFlowVlanTpid - 857, // 415: otg.FlowVxlan.flags:type_name -> otg.PatternFlowVxlanFlags - 860, // 416: otg.FlowVxlan.reserved0:type_name -> otg.PatternFlowVxlanReserved0 - 863, // 417: otg.FlowVxlan.vni:type_name -> otg.PatternFlowVxlanVni - 866, // 418: otg.FlowVxlan.reserved1:type_name -> otg.PatternFlowVxlanReserved1 - 869, // 419: otg.FlowIpv4.version:type_name -> otg.PatternFlowIpv4Version - 872, // 420: otg.FlowIpv4.header_length:type_name -> otg.PatternFlowIpv4HeaderLength - 611, // 421: otg.FlowIpv4.priority:type_name -> otg.FlowIpv4Priority - 875, // 422: otg.FlowIpv4.total_length:type_name -> otg.PatternFlowIpv4TotalLength - 878, // 423: otg.FlowIpv4.identification:type_name -> otg.PatternFlowIpv4Identification - 881, // 424: otg.FlowIpv4.reserved:type_name -> otg.PatternFlowIpv4Reserved - 884, // 425: otg.FlowIpv4.dont_fragment:type_name -> otg.PatternFlowIpv4DontFragment - 887, // 426: otg.FlowIpv4.more_fragments:type_name -> otg.PatternFlowIpv4MoreFragments - 890, // 427: otg.FlowIpv4.fragment_offset:type_name -> otg.PatternFlowIpv4FragmentOffset - 893, // 428: otg.FlowIpv4.time_to_live:type_name -> otg.PatternFlowIpv4TimeToLive - 896, // 429: otg.FlowIpv4.protocol:type_name -> otg.PatternFlowIpv4Protocol - 897, // 430: otg.FlowIpv4.header_checksum:type_name -> otg.PatternFlowIpv4HeaderChecksum - 900, // 431: otg.FlowIpv4.src:type_name -> otg.PatternFlowIpv4Src - 903, // 432: otg.FlowIpv4.dst:type_name -> otg.PatternFlowIpv4Dst - 607, // 433: otg.FlowIpv4.options:type_name -> otg.FlowIpv4Options - 79, // 434: otg.FlowIpv4Options.choice:type_name -> otg.FlowIpv4Options.Choice.Enum - 608, // 435: otg.FlowIpv4Options.custom:type_name -> otg.FlowIpv4OptionsCustom - 609, // 436: otg.FlowIpv4OptionsCustom.type:type_name -> otg.FlowIpv4OptionsCustomType - 610, // 437: otg.FlowIpv4OptionsCustom.length:type_name -> otg.FlowIpv4OptionsCustomLength - 905, // 438: otg.FlowIpv4OptionsCustomType.copied_flag:type_name -> otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag - 907, // 439: otg.FlowIpv4OptionsCustomType.option_class:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionClass - 909, // 440: otg.FlowIpv4OptionsCustomType.option_number:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionNumber - 80, // 441: otg.FlowIpv4OptionsCustomLength.choice:type_name -> otg.FlowIpv4OptionsCustomLength.Choice.Enum - 81, // 442: otg.FlowIpv4Priority.choice:type_name -> otg.FlowIpv4Priority.Choice.Enum - 912, // 443: otg.FlowIpv4Priority.raw:type_name -> otg.PatternFlowIpv4PriorityRaw - 613, // 444: otg.FlowIpv4Priority.tos:type_name -> otg.FlowIpv4Tos - 612, // 445: otg.FlowIpv4Priority.dscp:type_name -> otg.FlowIpv4Dscp - 915, // 446: otg.FlowIpv4Dscp.phb:type_name -> otg.PatternFlowIpv4DscpPhb - 918, // 447: otg.FlowIpv4Dscp.ecn:type_name -> otg.PatternFlowIpv4DscpEcn - 921, // 448: otg.FlowIpv4Tos.precedence:type_name -> otg.PatternFlowIpv4TosPrecedence - 924, // 449: otg.FlowIpv4Tos.delay:type_name -> otg.PatternFlowIpv4TosDelay - 927, // 450: otg.FlowIpv4Tos.throughput:type_name -> otg.PatternFlowIpv4TosThroughput - 930, // 451: otg.FlowIpv4Tos.reliability:type_name -> otg.PatternFlowIpv4TosReliability - 933, // 452: otg.FlowIpv4Tos.monetary:type_name -> otg.PatternFlowIpv4TosMonetary - 936, // 453: otg.FlowIpv4Tos.unused:type_name -> otg.PatternFlowIpv4TosUnused - 939, // 454: otg.FlowIpv6.version:type_name -> otg.PatternFlowIpv6Version - 942, // 455: otg.FlowIpv6.traffic_class:type_name -> otg.PatternFlowIpv6TrafficClass - 945, // 456: otg.FlowIpv6.flow_label:type_name -> otg.PatternFlowIpv6FlowLabel - 948, // 457: otg.FlowIpv6.payload_length:type_name -> otg.PatternFlowIpv6PayloadLength - 951, // 458: otg.FlowIpv6.next_header:type_name -> otg.PatternFlowIpv6NextHeader - 954, // 459: otg.FlowIpv6.hop_limit:type_name -> otg.PatternFlowIpv6HopLimit - 957, // 460: otg.FlowIpv6.src:type_name -> otg.PatternFlowIpv6Src - 960, // 461: otg.FlowIpv6.dst:type_name -> otg.PatternFlowIpv6Dst - 963, // 462: otg.FlowPfcPause.dst:type_name -> otg.PatternFlowPfcPauseDst - 966, // 463: otg.FlowPfcPause.src:type_name -> otg.PatternFlowPfcPauseSrc - 969, // 464: otg.FlowPfcPause.ether_type:type_name -> otg.PatternFlowPfcPauseEtherType - 972, // 465: otg.FlowPfcPause.control_op_code:type_name -> otg.PatternFlowPfcPauseControlOpCode - 975, // 466: otg.FlowPfcPause.class_enable_vector:type_name -> otg.PatternFlowPfcPauseClassEnableVector - 978, // 467: otg.FlowPfcPause.pause_class_0:type_name -> otg.PatternFlowPfcPausePauseClass0 - 981, // 468: otg.FlowPfcPause.pause_class_1:type_name -> otg.PatternFlowPfcPausePauseClass1 - 984, // 469: otg.FlowPfcPause.pause_class_2:type_name -> otg.PatternFlowPfcPausePauseClass2 - 987, // 470: otg.FlowPfcPause.pause_class_3:type_name -> otg.PatternFlowPfcPausePauseClass3 - 990, // 471: otg.FlowPfcPause.pause_class_4:type_name -> otg.PatternFlowPfcPausePauseClass4 - 993, // 472: otg.FlowPfcPause.pause_class_5:type_name -> otg.PatternFlowPfcPausePauseClass5 - 996, // 473: otg.FlowPfcPause.pause_class_6:type_name -> otg.PatternFlowPfcPausePauseClass6 - 999, // 474: otg.FlowPfcPause.pause_class_7:type_name -> otg.PatternFlowPfcPausePauseClass7 - 1002, // 475: otg.FlowEthernetPause.dst:type_name -> otg.PatternFlowEthernetPauseDst - 1005, // 476: otg.FlowEthernetPause.src:type_name -> otg.PatternFlowEthernetPauseSrc - 1008, // 477: otg.FlowEthernetPause.ether_type:type_name -> otg.PatternFlowEthernetPauseEtherType - 1011, // 478: otg.FlowEthernetPause.control_op_code:type_name -> otg.PatternFlowEthernetPauseControlOpCode - 1014, // 479: otg.FlowEthernetPause.time:type_name -> otg.PatternFlowEthernetPauseTime - 1017, // 480: otg.FlowTcp.src_port:type_name -> otg.PatternFlowTcpSrcPort - 1020, // 481: otg.FlowTcp.dst_port:type_name -> otg.PatternFlowTcpDstPort - 1023, // 482: otg.FlowTcp.seq_num:type_name -> otg.PatternFlowTcpSeqNum - 1026, // 483: otg.FlowTcp.ack_num:type_name -> otg.PatternFlowTcpAckNum - 1029, // 484: otg.FlowTcp.data_offset:type_name -> otg.PatternFlowTcpDataOffset - 1032, // 485: otg.FlowTcp.ecn_ns:type_name -> otg.PatternFlowTcpEcnNs - 1035, // 486: otg.FlowTcp.ecn_cwr:type_name -> otg.PatternFlowTcpEcnCwr - 1038, // 487: otg.FlowTcp.ecn_echo:type_name -> otg.PatternFlowTcpEcnEcho - 1041, // 488: otg.FlowTcp.ctl_urg:type_name -> otg.PatternFlowTcpCtlUrg - 1044, // 489: otg.FlowTcp.ctl_ack:type_name -> otg.PatternFlowTcpCtlAck - 1047, // 490: otg.FlowTcp.ctl_psh:type_name -> otg.PatternFlowTcpCtlPsh - 1050, // 491: otg.FlowTcp.ctl_rst:type_name -> otg.PatternFlowTcpCtlRst - 1053, // 492: otg.FlowTcp.ctl_syn:type_name -> otg.PatternFlowTcpCtlSyn - 1056, // 493: otg.FlowTcp.ctl_fin:type_name -> otg.PatternFlowTcpCtlFin - 1059, // 494: otg.FlowTcp.window:type_name -> otg.PatternFlowTcpWindow - 1062, // 495: otg.FlowUdp.src_port:type_name -> otg.PatternFlowUdpSrcPort - 1065, // 496: otg.FlowUdp.dst_port:type_name -> otg.PatternFlowUdpDstPort - 1068, // 497: otg.FlowUdp.length:type_name -> otg.PatternFlowUdpLength - 1069, // 498: otg.FlowUdp.checksum:type_name -> otg.PatternFlowUdpChecksum - 1072, // 499: otg.FlowGre.checksum_present:type_name -> otg.PatternFlowGreChecksumPresent - 1075, // 500: otg.FlowGre.reserved0:type_name -> otg.PatternFlowGreReserved0 - 1078, // 501: otg.FlowGre.version:type_name -> otg.PatternFlowGreVersion - 1081, // 502: otg.FlowGre.protocol:type_name -> otg.PatternFlowGreProtocol - 1082, // 503: otg.FlowGre.checksum:type_name -> otg.PatternFlowGreChecksum - 1085, // 504: otg.FlowGre.reserved1:type_name -> otg.PatternFlowGreReserved1 - 1088, // 505: otg.FlowGtpv1.version:type_name -> otg.PatternFlowGtpv1Version - 1091, // 506: otg.FlowGtpv1.protocol_type:type_name -> otg.PatternFlowGtpv1ProtocolType - 1094, // 507: otg.FlowGtpv1.reserved:type_name -> otg.PatternFlowGtpv1Reserved - 1097, // 508: otg.FlowGtpv1.e_flag:type_name -> otg.PatternFlowGtpv1EFlag - 1100, // 509: otg.FlowGtpv1.s_flag:type_name -> otg.PatternFlowGtpv1SFlag - 1103, // 510: otg.FlowGtpv1.pn_flag:type_name -> otg.PatternFlowGtpv1PnFlag - 1106, // 511: otg.FlowGtpv1.message_type:type_name -> otg.PatternFlowGtpv1MessageType - 1109, // 512: otg.FlowGtpv1.message_length:type_name -> otg.PatternFlowGtpv1MessageLength - 1112, // 513: otg.FlowGtpv1.teid:type_name -> otg.PatternFlowGtpv1Teid - 1115, // 514: otg.FlowGtpv1.squence_number:type_name -> otg.PatternFlowGtpv1SquenceNumber - 1118, // 515: otg.FlowGtpv1.n_pdu_number:type_name -> otg.PatternFlowGtpv1NPduNumber - 1121, // 516: otg.FlowGtpv1.next_extension_header_type:type_name -> otg.PatternFlowGtpv1NextExtensionHeaderType - 621, // 517: otg.FlowGtpv1.extension_headers:type_name -> otg.FlowGtpExtension - 1124, // 518: otg.FlowGtpExtension.extension_length:type_name -> otg.PatternFlowGtpExtensionExtensionLength - 1127, // 519: otg.FlowGtpExtension.contents:type_name -> otg.PatternFlowGtpExtensionContents - 1130, // 520: otg.FlowGtpExtension.next_extension_header:type_name -> otg.PatternFlowGtpExtensionNextExtensionHeader - 1133, // 521: otg.FlowGtpv2.version:type_name -> otg.PatternFlowGtpv2Version - 1136, // 522: otg.FlowGtpv2.piggybacking_flag:type_name -> otg.PatternFlowGtpv2PiggybackingFlag - 1139, // 523: otg.FlowGtpv2.teid_flag:type_name -> otg.PatternFlowGtpv2TeidFlag - 1142, // 524: otg.FlowGtpv2.spare1:type_name -> otg.PatternFlowGtpv2Spare1 - 1145, // 525: otg.FlowGtpv2.message_type:type_name -> otg.PatternFlowGtpv2MessageType - 1148, // 526: otg.FlowGtpv2.message_length:type_name -> otg.PatternFlowGtpv2MessageLength - 1151, // 527: otg.FlowGtpv2.teid:type_name -> otg.PatternFlowGtpv2Teid - 1154, // 528: otg.FlowGtpv2.sequence_number:type_name -> otg.PatternFlowGtpv2SequenceNumber - 1157, // 529: otg.FlowGtpv2.spare2:type_name -> otg.PatternFlowGtpv2Spare2 - 1160, // 530: otg.FlowArp.hardware_type:type_name -> otg.PatternFlowArpHardwareType - 1163, // 531: otg.FlowArp.protocol_type:type_name -> otg.PatternFlowArpProtocolType - 1166, // 532: otg.FlowArp.hardware_length:type_name -> otg.PatternFlowArpHardwareLength - 1169, // 533: otg.FlowArp.protocol_length:type_name -> otg.PatternFlowArpProtocolLength - 1172, // 534: otg.FlowArp.operation:type_name -> otg.PatternFlowArpOperation - 1175, // 535: otg.FlowArp.sender_hardware_addr:type_name -> otg.PatternFlowArpSenderHardwareAddr - 1178, // 536: otg.FlowArp.sender_protocol_addr:type_name -> otg.PatternFlowArpSenderProtocolAddr - 1181, // 537: otg.FlowArp.target_hardware_addr:type_name -> otg.PatternFlowArpTargetHardwareAddr - 1184, // 538: otg.FlowArp.target_protocol_addr:type_name -> otg.PatternFlowArpTargetProtocolAddr - 82, // 539: otg.FlowIcmp.choice:type_name -> otg.FlowIcmp.Choice.Enum - 625, // 540: otg.FlowIcmp.echo:type_name -> otg.FlowIcmpEcho - 1187, // 541: otg.FlowIcmpEcho.type:type_name -> otg.PatternFlowIcmpEchoType - 1190, // 542: otg.FlowIcmpEcho.code:type_name -> otg.PatternFlowIcmpEchoCode - 1191, // 543: otg.FlowIcmpEcho.checksum:type_name -> otg.PatternFlowIcmpEchoChecksum - 1194, // 544: otg.FlowIcmpEcho.identifier:type_name -> otg.PatternFlowIcmpEchoIdentifier - 1197, // 545: otg.FlowIcmpEcho.sequence_number:type_name -> otg.PatternFlowIcmpEchoSequenceNumber - 83, // 546: otg.FlowIcmpv6.choice:type_name -> otg.FlowIcmpv6.Choice.Enum - 627, // 547: otg.FlowIcmpv6.echo:type_name -> otg.FlowIcmpv6Echo - 1207, // 548: otg.FlowIcmpv6Echo.type:type_name -> otg.PatternFlowIcmpv6EchoType - 1210, // 549: otg.FlowIcmpv6Echo.code:type_name -> otg.PatternFlowIcmpv6EchoCode - 1213, // 550: otg.FlowIcmpv6Echo.identifier:type_name -> otg.PatternFlowIcmpv6EchoIdentifier - 1216, // 551: otg.FlowIcmpv6Echo.sequence_number:type_name -> otg.PatternFlowIcmpv6EchoSequenceNumber - 1217, // 552: otg.FlowIcmpv6Echo.checksum:type_name -> otg.PatternFlowIcmpv6EchoChecksum - 1221, // 553: otg.FlowPpp.address:type_name -> otg.PatternFlowPppAddress - 1224, // 554: otg.FlowPpp.control:type_name -> otg.PatternFlowPppControl - 1227, // 555: otg.FlowPpp.protocol_type:type_name -> otg.PatternFlowPppProtocolType - 1230, // 556: otg.FlowIgmpv1.version:type_name -> otg.PatternFlowIgmpv1Version - 1233, // 557: otg.FlowIgmpv1.type:type_name -> otg.PatternFlowIgmpv1Type - 1236, // 558: otg.FlowIgmpv1.unused:type_name -> otg.PatternFlowIgmpv1Unused - 1237, // 559: otg.FlowIgmpv1.checksum:type_name -> otg.PatternFlowIgmpv1Checksum - 1240, // 560: otg.FlowIgmpv1.group_address:type_name -> otg.PatternFlowIgmpv1GroupAddress - 1243, // 561: otg.FlowMpls.label:type_name -> otg.PatternFlowMplsLabel - 1246, // 562: otg.FlowMpls.traffic_class:type_name -> otg.PatternFlowMplsTrafficClass - 1249, // 563: otg.FlowMpls.bottom_of_stack:type_name -> otg.PatternFlowMplsBottomOfStack - 1252, // 564: otg.FlowMpls.time_to_live:type_name -> otg.PatternFlowMplsTimeToLive - 1254, // 565: otg.FlowSnmpv2c.version:type_name -> otg.PatternFlowSnmpv2cVersion - 632, // 566: otg.FlowSnmpv2c.data:type_name -> otg.FlowSnmpv2cData - 84, // 567: otg.FlowSnmpv2cData.choice:type_name -> otg.FlowSnmpv2cData.Choice.Enum - 633, // 568: otg.FlowSnmpv2cData.get_request:type_name -> otg.FlowSnmpv2cPDU - 633, // 569: otg.FlowSnmpv2cData.get_next_request:type_name -> otg.FlowSnmpv2cPDU - 633, // 570: otg.FlowSnmpv2cData.response:type_name -> otg.FlowSnmpv2cPDU - 633, // 571: otg.FlowSnmpv2cData.set_request:type_name -> otg.FlowSnmpv2cPDU - 634, // 572: otg.FlowSnmpv2cData.get_bulk_request:type_name -> otg.FlowSnmpv2cBulkPDU - 633, // 573: otg.FlowSnmpv2cData.inform_request:type_name -> otg.FlowSnmpv2cPDU - 633, // 574: otg.FlowSnmpv2cData.snmpv2_trap:type_name -> otg.FlowSnmpv2cPDU - 633, // 575: otg.FlowSnmpv2cData.report:type_name -> otg.FlowSnmpv2cPDU - 1256, // 576: otg.FlowSnmpv2cPDU.request_id:type_name -> otg.PatternFlowSnmpv2cPDURequestId - 85, // 577: otg.FlowSnmpv2cPDU.error_status:type_name -> otg.FlowSnmpv2cPDU.ErrorStatus.Enum - 1258, // 578: otg.FlowSnmpv2cPDU.error_index:type_name -> otg.PatternFlowSnmpv2cPDUErrorIndex - 635, // 579: otg.FlowSnmpv2cPDU.variable_bindings:type_name -> otg.FlowSnmpv2cVariableBinding - 1260, // 580: otg.FlowSnmpv2cBulkPDU.request_id:type_name -> otg.PatternFlowSnmpv2cBulkPDURequestId - 1261, // 581: otg.FlowSnmpv2cBulkPDU.non_repeaters:type_name -> otg.PatternFlowSnmpv2cBulkPDUNonRepeaters - 1263, // 582: otg.FlowSnmpv2cBulkPDU.max_repetitions:type_name -> otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions - 635, // 583: otg.FlowSnmpv2cBulkPDU.variable_bindings:type_name -> otg.FlowSnmpv2cVariableBinding - 636, // 584: otg.FlowSnmpv2cVariableBinding.value:type_name -> otg.FlowSnmpv2cVariableBindingValue - 86, // 585: otg.FlowSnmpv2cVariableBindingValue.choice:type_name -> otg.FlowSnmpv2cVariableBindingValue.Choice.Enum - 1265, // 586: otg.FlowSnmpv2cVariableBindingValue.integer_value:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue - 637, // 587: otg.FlowSnmpv2cVariableBindingValue.string_value:type_name -> otg.FlowSnmpv2cVariableBindingStringValue - 1267, // 588: otg.FlowSnmpv2cVariableBindingValue.ip_address_value:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue - 1269, // 589: otg.FlowSnmpv2cVariableBindingValue.counter_value:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueCounterValue - 1271, // 590: otg.FlowSnmpv2cVariableBindingValue.timeticks_value:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue - 1273, // 591: otg.FlowSnmpv2cVariableBindingValue.big_counter_value:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue - 1275, // 592: otg.FlowSnmpv2cVariableBindingValue.unsigned_integer_value:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue - 87, // 593: otg.FlowSnmpv2cVariableBindingStringValue.choice:type_name -> otg.FlowSnmpv2cVariableBindingStringValue.Choice.Enum - 88, // 594: otg.FlowRsvp.flag:type_name -> otg.FlowRsvp.Flag.Enum - 1278, // 595: otg.FlowRsvp.rsvp_checksum:type_name -> otg.PatternFlowRsvpRsvpChecksum - 1280, // 596: otg.FlowRsvp.time_to_live:type_name -> otg.PatternFlowRsvpTimeToLive - 1282, // 597: otg.FlowRsvp.reserved:type_name -> otg.PatternFlowRsvpReserved - 639, // 598: otg.FlowRsvp.rsvp_length:type_name -> otg.FlowRSVPLength - 640, // 599: otg.FlowRsvp.message_type:type_name -> otg.FlowRSVPMessage - 89, // 600: otg.FlowRSVPLength.choice:type_name -> otg.FlowRSVPLength.Choice.Enum - 90, // 601: otg.FlowRSVPMessage.choice:type_name -> otg.FlowRSVPMessage.Choice.Enum - 641, // 602: otg.FlowRSVPMessage.path:type_name -> otg.FlowRSVPPathMessage - 642, // 603: otg.FlowRSVPPathMessage.objects:type_name -> otg.FlowRSVPPathObjects - 644, // 604: otg.FlowRSVPPathObjects.class_num:type_name -> otg.FlowRSVPPathObjectsClass - 91, // 605: otg.FlowRSVPObjectLength.choice:type_name -> otg.FlowRSVPObjectLength.Choice.Enum - 92, // 606: otg.FlowRSVPPathObjectsClass.choice:type_name -> otg.FlowRSVPPathObjectsClass.Choice.Enum - 645, // 607: otg.FlowRSVPPathObjectsClass.session:type_name -> otg.FlowRSVPPathObjectsClassSession - 649, // 608: otg.FlowRSVPPathObjectsClass.rsvp_hop:type_name -> otg.FlowRSVPPathObjectsClassRsvpHop - 652, // 609: otg.FlowRSVPPathObjectsClass.time_values:type_name -> otg.FlowRSVPPathObjectsClassTimeValues - 655, // 610: otg.FlowRSVPPathObjectsClass.explicit_route:type_name -> otg.FlowRSVPPathObjectsClassExplicitRoute - 664, // 611: otg.FlowRSVPPathObjectsClass.label_request:type_name -> otg.FlowRSVPPathObjectsClassLabelRequest - 667, // 612: otg.FlowRSVPPathObjectsClass.session_attribute:type_name -> otg.FlowRSVPPathObjectsClassSessionAttribute - 673, // 613: otg.FlowRSVPPathObjectsClass.sender_template:type_name -> otg.FlowRSVPPathObjectsClassSenderTemplate - 676, // 614: otg.FlowRSVPPathObjectsClass.sender_tspec:type_name -> otg.FlowRSVPPathObjectsClassSenderTspec - 679, // 615: otg.FlowRSVPPathObjectsClass.record_route:type_name -> otg.FlowRSVPPathObjectsClassRecordRoute - 689, // 616: otg.FlowRSVPPathObjectsClass.custom:type_name -> otg.FlowRSVPPathObjectsCustom - 643, // 617: otg.FlowRSVPPathObjectsClassSession.length:type_name -> otg.FlowRSVPObjectLength - 646, // 618: otg.FlowRSVPPathObjectsClassSession.c_type:type_name -> otg.FlowRSVPPathObjectsSessionCType - 93, // 619: otg.FlowRSVPPathObjectsSessionCType.choice:type_name -> otg.FlowRSVPPathObjectsSessionCType.Choice.Enum - 647, // 620: otg.FlowRSVPPathObjectsSessionCType.lsp_tunnel_ipv4:type_name -> otg.FlowRSVPPathSessionLspTunnelIpv4 - 1284, // 621: otg.FlowRSVPPathSessionLspTunnelIpv4.ipv4_tunnel_end_point_address:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress - 1286, // 622: otg.FlowRSVPPathSessionLspTunnelIpv4.reserved:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved - 1288, // 623: otg.FlowRSVPPathSessionLspTunnelIpv4.tunnel_id:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId - 648, // 624: otg.FlowRSVPPathSessionLspTunnelIpv4.extended_tunnel_id:type_name -> otg.FlowRSVPPathSessionExtTunnelId - 94, // 625: otg.FlowRSVPPathSessionExtTunnelId.choice:type_name -> otg.FlowRSVPPathSessionExtTunnelId.Choice.Enum - 1290, // 626: otg.FlowRSVPPathSessionExtTunnelId.as_integer:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger - 1292, // 627: otg.FlowRSVPPathSessionExtTunnelId.as_ipv4:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 - 643, // 628: otg.FlowRSVPPathObjectsClassRsvpHop.length:type_name -> otg.FlowRSVPObjectLength - 650, // 629: otg.FlowRSVPPathObjectsClassRsvpHop.c_type:type_name -> otg.FlowRSVPPathObjectsRsvpHopCType - 95, // 630: otg.FlowRSVPPathObjectsRsvpHopCType.choice:type_name -> otg.FlowRSVPPathObjectsRsvpHopCType.Choice.Enum - 651, // 631: otg.FlowRSVPPathObjectsRsvpHopCType.ipv4:type_name -> otg.FlowRSVPPathRsvpHopIpv4 - 1294, // 632: otg.FlowRSVPPathRsvpHopIpv4.ipv4_address:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address - 1296, // 633: otg.FlowRSVPPathRsvpHopIpv4.logical_interface_handle:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle - 643, // 634: otg.FlowRSVPPathObjectsClassTimeValues.length:type_name -> otg.FlowRSVPObjectLength - 653, // 635: otg.FlowRSVPPathObjectsClassTimeValues.c_type:type_name -> otg.FlowRSVPPathObjectsTimeValuesCType - 96, // 636: otg.FlowRSVPPathObjectsTimeValuesCType.choice:type_name -> otg.FlowRSVPPathObjectsTimeValuesCType.Choice.Enum - 654, // 637: otg.FlowRSVPPathObjectsTimeValuesCType.type_1:type_name -> otg.FlowRSVPPathTimeValuesType1 - 1298, // 638: otg.FlowRSVPPathTimeValuesType1.refresh_period_r:type_name -> otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR - 643, // 639: otg.FlowRSVPPathObjectsClassExplicitRoute.length:type_name -> otg.FlowRSVPObjectLength - 656, // 640: otg.FlowRSVPPathObjectsClassExplicitRoute.c_type:type_name -> otg.FlowRSVPPathObjectsClassExplicitRouteCType - 97, // 641: otg.FlowRSVPPathObjectsClassExplicitRouteCType.choice:type_name -> otg.FlowRSVPPathObjectsClassExplicitRouteCType.Choice.Enum - 657, // 642: otg.FlowRSVPPathObjectsClassExplicitRouteCType.type_1:type_name -> otg.FlowRSVPPathExplicitRouteType1 - 658, // 643: otg.FlowRSVPPathExplicitRouteType1.subobjects:type_name -> otg.FlowRSVPType1ExplicitRouteSubobjects - 659, // 644: otg.FlowRSVPType1ExplicitRouteSubobjects.type:type_name -> otg.FlowRSVPType1ExplicitRouteSubobjectsType - 98, // 645: otg.FlowRSVPType1ExplicitRouteSubobjectsType.choice:type_name -> otg.FlowRSVPType1ExplicitRouteSubobjectsType.Choice.Enum - 660, // 646: otg.FlowRSVPType1ExplicitRouteSubobjectsType.ipv4_prefix:type_name -> otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix - 661, // 647: otg.FlowRSVPType1ExplicitRouteSubobjectsType.as_number:type_name -> otg.FlowRSVPPathExplicitRouteType1ASNumber - 1300, // 648: otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix.l_bit:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit - 662, // 649: otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix.length:type_name -> otg.FlowRSVPExplicitRouteLength - 1302, // 650: otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix.ipv4_address:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address - 1304, // 651: otg.FlowRSVPPathExplicitRouteType1ASNumber.l_bit:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit - 663, // 652: otg.FlowRSVPPathExplicitRouteType1ASNumber.length:type_name -> otg.FlowRSVPExplicitRouteASNumberLength - 99, // 653: otg.FlowRSVPExplicitRouteLength.choice:type_name -> otg.FlowRSVPExplicitRouteLength.Choice.Enum - 100, // 654: otg.FlowRSVPExplicitRouteASNumberLength.choice:type_name -> otg.FlowRSVPExplicitRouteASNumberLength.Choice.Enum - 643, // 655: otg.FlowRSVPPathObjectsClassLabelRequest.length:type_name -> otg.FlowRSVPObjectLength - 665, // 656: otg.FlowRSVPPathObjectsClassLabelRequest.c_type:type_name -> otg.FlowRSVPPathObjectsLabelRequestCType - 101, // 657: otg.FlowRSVPPathObjectsLabelRequestCType.choice:type_name -> otg.FlowRSVPPathObjectsLabelRequestCType.Choice.Enum - 666, // 658: otg.FlowRSVPPathObjectsLabelRequestCType.without_label_range:type_name -> otg.FlowRSVPPathLabelRequestWithoutLabelRange - 1306, // 659: otg.FlowRSVPPathLabelRequestWithoutLabelRange.reserved:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved - 1308, // 660: otg.FlowRSVPPathLabelRequestWithoutLabelRange.l3pid:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid - 643, // 661: otg.FlowRSVPPathObjectsClassSessionAttribute.length:type_name -> otg.FlowRSVPObjectLength - 668, // 662: otg.FlowRSVPPathObjectsClassSessionAttribute.c_type:type_name -> otg.FlowRSVPPathObjectsSessionAttributeCType - 102, // 663: otg.FlowRSVPPathObjectsSessionAttributeCType.choice:type_name -> otg.FlowRSVPPathObjectsSessionAttributeCType.Choice.Enum - 669, // 664: otg.FlowRSVPPathObjectsSessionAttributeCType.lsp_tunnel:type_name -> otg.FlowRSVPPathSessionAttributeLspTunnel - 670, // 665: otg.FlowRSVPPathObjectsSessionAttributeCType.lsp_tunnel_ra:type_name -> otg.FlowRSVPPathSessionAttributeLspTunnelRa - 671, // 666: otg.FlowRSVPPathSessionAttributeLspTunnel.flags:type_name -> otg.FlowRSVPLspTunnelFlag - 672, // 667: otg.FlowRSVPPathSessionAttributeLspTunnel.name_length:type_name -> otg.FlowRSVPSessionAttributeNameLength - 671, // 668: otg.FlowRSVPPathSessionAttributeLspTunnelRa.flags:type_name -> otg.FlowRSVPLspTunnelFlag - 672, // 669: otg.FlowRSVPPathSessionAttributeLspTunnelRa.name_length:type_name -> otg.FlowRSVPSessionAttributeNameLength - 103, // 670: otg.FlowRSVPLspTunnelFlag.choice:type_name -> otg.FlowRSVPLspTunnelFlag.Choice.Enum - 104, // 671: otg.FlowRSVPSessionAttributeNameLength.choice:type_name -> otg.FlowRSVPSessionAttributeNameLength.Choice.Enum - 643, // 672: otg.FlowRSVPPathObjectsClassSenderTemplate.length:type_name -> otg.FlowRSVPObjectLength - 674, // 673: otg.FlowRSVPPathObjectsClassSenderTemplate.c_type:type_name -> otg.FlowRSVPPathObjectsSenderTemplateCType - 105, // 674: otg.FlowRSVPPathObjectsSenderTemplateCType.choice:type_name -> otg.FlowRSVPPathObjectsSenderTemplateCType.Choice.Enum - 675, // 675: otg.FlowRSVPPathObjectsSenderTemplateCType.lsp_tunnel_ipv4:type_name -> otg.FlowRSVPPathSenderTemplateLspTunnelIpv4 - 1310, // 676: otg.FlowRSVPPathSenderTemplateLspTunnelIpv4.ipv4_tunnel_sender_address:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress - 1312, // 677: otg.FlowRSVPPathSenderTemplateLspTunnelIpv4.reserved:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved - 1314, // 678: otg.FlowRSVPPathSenderTemplateLspTunnelIpv4.lsp_id:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId - 643, // 679: otg.FlowRSVPPathObjectsClassSenderTspec.length:type_name -> otg.FlowRSVPObjectLength - 677, // 680: otg.FlowRSVPPathObjectsClassSenderTspec.c_type:type_name -> otg.FlowRSVPPathObjectsSenderTspecCType - 106, // 681: otg.FlowRSVPPathObjectsSenderTspecCType.choice:type_name -> otg.FlowRSVPPathObjectsSenderTspecCType.Choice.Enum - 678, // 682: otg.FlowRSVPPathObjectsSenderTspecCType.int_serv:type_name -> otg.FlowRSVPPathSenderTspecIntServ - 1316, // 683: otg.FlowRSVPPathSenderTspecIntServ.version:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServVersion - 1318, // 684: otg.FlowRSVPPathSenderTspecIntServ.reserved1:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved1 - 1320, // 685: otg.FlowRSVPPathSenderTspecIntServ.overall_length:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServOverallLength - 1322, // 686: otg.FlowRSVPPathSenderTspecIntServ.service_header:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader - 1324, // 687: otg.FlowRSVPPathSenderTspecIntServ.zero_bit:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServZeroBit - 1326, // 688: otg.FlowRSVPPathSenderTspecIntServ.reserved2:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved2 - 1328, // 689: otg.FlowRSVPPathSenderTspecIntServ.length_of_service_data:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData - 1330, // 690: otg.FlowRSVPPathSenderTspecIntServ.parameter_id_token_bucket_tspec:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec - 1332, // 691: otg.FlowRSVPPathSenderTspecIntServ.parameter_127_flag:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag - 1334, // 692: otg.FlowRSVPPathSenderTspecIntServ.parameter_127_length:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length - 1336, // 693: otg.FlowRSVPPathSenderTspecIntServ.minimum_policed_unit:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit - 1338, // 694: otg.FlowRSVPPathSenderTspecIntServ.maximum_packet_size:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize - 643, // 695: otg.FlowRSVPPathObjectsClassRecordRoute.length:type_name -> otg.FlowRSVPObjectLength - 680, // 696: otg.FlowRSVPPathObjectsClassRecordRoute.c_type:type_name -> otg.FlowRSVPPathObjectsRecordRouteCType - 107, // 697: otg.FlowRSVPPathObjectsRecordRouteCType.choice:type_name -> otg.FlowRSVPPathObjectsRecordRouteCType.Choice.Enum - 681, // 698: otg.FlowRSVPPathObjectsRecordRouteCType.type_1:type_name -> otg.FlowRSVPPathRecordRouteType1 - 682, // 699: otg.FlowRSVPPathRecordRouteType1.subobjects:type_name -> otg.FlowRSVPType1RecordRouteSubobjects - 683, // 700: otg.FlowRSVPType1RecordRouteSubobjects.type:type_name -> otg.FlowRSVPPathObjectsRecordRouteSubObjectType - 108, // 701: otg.FlowRSVPPathObjectsRecordRouteSubObjectType.choice:type_name -> otg.FlowRSVPPathObjectsRecordRouteSubObjectType.Choice.Enum - 684, // 702: otg.FlowRSVPPathObjectsRecordRouteSubObjectType.ipv4_address:type_name -> otg.FlowRSVPPathRecordRouteType1Ipv4Address - 686, // 703: otg.FlowRSVPPathObjectsRecordRouteSubObjectType.label:type_name -> otg.FlowRSVPPathRecordRouteType1Label - 688, // 704: otg.FlowRSVPPathRecordRouteType1Ipv4Address.length:type_name -> otg.FlowRSVPRouteRecordLength - 1340, // 705: otg.FlowRSVPPathRecordRouteType1Ipv4Address.ipv4_address:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address - 1342, // 706: otg.FlowRSVPPathRecordRouteType1Ipv4Address.prefix_length:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength - 685, // 707: otg.FlowRSVPPathRecordRouteType1Ipv4Address.flags:type_name -> otg.FlowRSVPRecordRouteIPv4Flag - 109, // 708: otg.FlowRSVPRecordRouteIPv4Flag.choice:type_name -> otg.FlowRSVPRecordRouteIPv4Flag.Choice.Enum - 688, // 709: otg.FlowRSVPPathRecordRouteType1Label.length:type_name -> otg.FlowRSVPRouteRecordLength - 1343, // 710: otg.FlowRSVPPathRecordRouteType1Label.flags:type_name -> otg.PatternFlowRSVPPathRecordRouteType1LabelFlags - 1344, // 711: otg.FlowRSVPPathRecordRouteType1Label.c_type:type_name -> otg.PatternFlowRSVPPathRecordRouteType1LabelCType - 687, // 712: otg.FlowRSVPPathRecordRouteType1Label.label:type_name -> otg.FlowRSVPPathRecordRouteLabel - 110, // 713: otg.FlowRSVPPathRecordRouteLabel.choice:type_name -> otg.FlowRSVPPathRecordRouteLabel.Choice.Enum - 111, // 714: otg.FlowRSVPRouteRecordLength.choice:type_name -> otg.FlowRSVPRouteRecordLength.Choice.Enum - 1346, // 715: otg.FlowRSVPPathObjectsCustom.type:type_name -> otg.PatternFlowRSVPPathObjectsCustomType - 643, // 716: otg.FlowRSVPPathObjectsCustom.length:type_name -> otg.FlowRSVPObjectLength - 112, // 717: otg.FlowSize.choice:type_name -> otg.FlowSize.Choice.Enum - 691, // 718: otg.FlowSize.increment:type_name -> otg.FlowSizeIncrement - 692, // 719: otg.FlowSize.random:type_name -> otg.FlowSizeRandom - 693, // 720: otg.FlowSize.weight_pairs:type_name -> otg.FlowSizeWeightPairs - 113, // 721: otg.FlowSizeWeightPairs.choice:type_name -> otg.FlowSizeWeightPairs.Choice.Enum - 114, // 722: otg.FlowSizeWeightPairs.predefined:type_name -> otg.FlowSizeWeightPairs.Predefined.Enum - 694, // 723: otg.FlowSizeWeightPairs.custom:type_name -> otg.FlowSizeWeightPairsCustom - 115, // 724: otg.FlowRate.choice:type_name -> otg.FlowRate.Choice.Enum - 116, // 725: otg.FlowDuration.choice:type_name -> otg.FlowDuration.Choice.Enum - 699, // 726: otg.FlowDuration.fixed_packets:type_name -> otg.FlowFixedPackets - 700, // 727: otg.FlowDuration.fixed_seconds:type_name -> otg.FlowFixedSeconds - 701, // 728: otg.FlowDuration.burst:type_name -> otg.FlowBurst - 697, // 729: otg.FlowDuration.continuous:type_name -> otg.FlowContinuous - 698, // 730: otg.FlowContinuous.delay:type_name -> otg.FlowDelay - 117, // 731: otg.FlowDelay.choice:type_name -> otg.FlowDelay.Choice.Enum - 698, // 732: otg.FlowFixedPackets.delay:type_name -> otg.FlowDelay - 698, // 733: otg.FlowFixedSeconds.delay:type_name -> otg.FlowDelay - 702, // 734: otg.FlowBurst.inter_burst_gap:type_name -> otg.FlowDurationInterBurstGap - 118, // 735: otg.FlowDurationInterBurstGap.choice:type_name -> otg.FlowDurationInterBurstGap.Choice.Enum - 706, // 736: otg.FlowMetrics.rx_tx_ratio:type_name -> otg.FlowRxTxRatio - 704, // 737: otg.FlowMetrics.latency:type_name -> otg.FlowLatencyMetrics - 705, // 738: otg.FlowMetrics.predefined_metric_tags:type_name -> otg.FlowPredefinedTags - 119, // 739: otg.FlowLatencyMetrics.mode:type_name -> otg.FlowLatencyMetrics.Mode.Enum - 120, // 740: otg.FlowRxTxRatio.choice:type_name -> otg.FlowRxTxRatio.Choice.Enum - 707, // 741: otg.FlowRxTxRatio.rx_count:type_name -> otg.FlowRxTxRatioRxCount - 710, // 742: otg.Event.link:type_name -> otg.EventLink - 709, // 743: otg.Event.rx_rate_threshold:type_name -> otg.EventRxRateThreshold - 711, // 744: otg.Event.route_advertise_withdraw:type_name -> otg.EventRouteAdvertiseWithdraw - 121, // 745: otg.EventRequest.type:type_name -> otg.EventRequest.Type.Enum - 712, // 746: otg.EventSubscription.events:type_name -> otg.EventRequest - 715, // 747: otg.Lldp.connection:type_name -> otg.LldpConnection - 716, // 748: otg.Lldp.chassis_id:type_name -> otg.LldpChassisId - 717, // 749: otg.Lldp.port_id:type_name -> otg.LldpPortId - 720, // 750: otg.Lldp.system_name:type_name -> otg.LldpSystemName - 122, // 751: otg.LldpConnection.choice:type_name -> otg.LldpConnection.Choice.Enum - 123, // 752: otg.LldpChassisId.choice:type_name -> otg.LldpChassisId.Choice.Enum - 718, // 753: otg.LldpChassisId.mac_address_subtype:type_name -> otg.LldpChassisMacSubType - 124, // 754: otg.LldpPortId.choice:type_name -> otg.LldpPortId.Choice.Enum - 719, // 755: otg.LldpPortId.interface_name_subtype:type_name -> otg.LldpPortInterfaceNameSubType - 125, // 756: otg.LldpChassisMacSubType.choice:type_name -> otg.LldpChassisMacSubType.Choice.Enum - 126, // 757: otg.LldpPortInterfaceNameSubType.choice:type_name -> otg.LldpPortInterfaceNameSubType.Choice.Enum - 127, // 758: otg.LldpSystemName.choice:type_name -> otg.LldpSystemName.Choice.Enum - 128, // 759: otg.Error.kind:type_name -> otg.Error.Kind.Enum - 129, // 760: otg.ConfigUpdate.choice:type_name -> otg.ConfigUpdate.Choice.Enum - 724, // 761: otg.ConfigUpdate.flows:type_name -> otg.FlowsUpdate - 130, // 762: otg.FlowsUpdate.property_names:type_name -> otg.FlowsUpdate.PropertyNames.Enum - 596, // 763: otg.FlowsUpdate.flows:type_name -> otg.Flow - 131, // 764: otg.ControlState.choice:type_name -> otg.ControlState.Choice.Enum - 726, // 765: otg.ControlState.port:type_name -> otg.StatePort - 728, // 766: otg.ControlState.protocol:type_name -> otg.StateProtocol - 727, // 767: otg.ControlState.traffic:type_name -> otg.StateTraffic - 132, // 768: otg.StatePort.choice:type_name -> otg.StatePort.Choice.Enum - 729, // 769: otg.StatePort.link:type_name -> otg.StatePortLink - 730, // 770: otg.StatePort.capture:type_name -> otg.StatePortCapture - 133, // 771: otg.StateTraffic.choice:type_name -> otg.StateTraffic.Choice.Enum - 731, // 772: otg.StateTraffic.flow_transmit:type_name -> otg.StateTrafficFlowTransmit - 134, // 773: otg.StateProtocol.choice:type_name -> otg.StateProtocol.Choice.Enum - 732, // 774: otg.StateProtocol.all:type_name -> otg.StateProtocolAll - 733, // 775: otg.StateProtocol.route:type_name -> otg.StateProtocolRoute - 734, // 776: otg.StateProtocol.lacp:type_name -> otg.StateProtocolLacp - 737, // 777: otg.StateProtocol.bgp:type_name -> otg.StateProtocolBgp - 739, // 778: otg.StateProtocol.isis:type_name -> otg.StateProtocolIsis - 135, // 779: otg.StatePortLink.state:type_name -> otg.StatePortLink.State.Enum - 136, // 780: otg.StatePortCapture.state:type_name -> otg.StatePortCapture.State.Enum - 137, // 781: otg.StateTrafficFlowTransmit.state:type_name -> otg.StateTrafficFlowTransmit.State.Enum - 138, // 782: otg.StateProtocolAll.state:type_name -> otg.StateProtocolAll.State.Enum - 139, // 783: otg.StateProtocolRoute.state:type_name -> otg.StateProtocolRoute.State.Enum - 140, // 784: otg.StateProtocolLacp.choice:type_name -> otg.StateProtocolLacp.Choice.Enum - 735, // 785: otg.StateProtocolLacp.admin:type_name -> otg.StateProtocolLacpAdmin - 736, // 786: otg.StateProtocolLacp.member_ports:type_name -> otg.StateProtocolLacpMemberPorts - 141, // 787: otg.StateProtocolLacpAdmin.state:type_name -> otg.StateProtocolLacpAdmin.State.Enum - 142, // 788: otg.StateProtocolLacpMemberPorts.state:type_name -> otg.StateProtocolLacpMemberPorts.State.Enum - 143, // 789: otg.StateProtocolBgp.choice:type_name -> otg.StateProtocolBgp.Choice.Enum - 738, // 790: otg.StateProtocolBgp.peers:type_name -> otg.StateProtocolBgpPeers - 144, // 791: otg.StateProtocolBgpPeers.state:type_name -> otg.StateProtocolBgpPeers.State.Enum - 145, // 792: otg.StateProtocolIsis.choice:type_name -> otg.StateProtocolIsis.Choice.Enum - 740, // 793: otg.StateProtocolIsis.routers:type_name -> otg.StateProtocolIsisRouters - 146, // 794: otg.StateProtocolIsisRouters.state:type_name -> otg.StateProtocolIsisRouters.State.Enum - 147, // 795: otg.ControlAction.choice:type_name -> otg.ControlAction.Choice.Enum - 744, // 796: otg.ControlAction.protocol:type_name -> otg.ActionProtocol - 743, // 797: otg.ControlActionResponse.response:type_name -> otg.ActionResponse - 148, // 798: otg.ActionResponse.choice:type_name -> otg.ActionResponse.Choice.Enum - 745, // 799: otg.ActionResponse.protocol:type_name -> otg.ActionResponseProtocol - 149, // 800: otg.ActionProtocol.choice:type_name -> otg.ActionProtocol.Choice.Enum - 746, // 801: otg.ActionProtocol.ipv4:type_name -> otg.ActionProtocolIpv4 - 752, // 802: otg.ActionProtocol.ipv6:type_name -> otg.ActionProtocolIpv6 - 758, // 803: otg.ActionProtocol.bgp:type_name -> otg.ActionProtocolBgp - 150, // 804: otg.ActionResponseProtocol.choice:type_name -> otg.ActionResponseProtocol.Choice.Enum - 747, // 805: otg.ActionResponseProtocol.ipv4:type_name -> otg.ActionResponseProtocolIpv4 - 753, // 806: otg.ActionResponseProtocol.ipv6:type_name -> otg.ActionResponseProtocolIpv6 - 151, // 807: otg.ActionProtocolIpv4.choice:type_name -> otg.ActionProtocolIpv4.Choice.Enum - 748, // 808: otg.ActionProtocolIpv4.ping:type_name -> otg.ActionProtocolIpv4Ping - 152, // 809: otg.ActionResponseProtocolIpv4.choice:type_name -> otg.ActionResponseProtocolIpv4.Choice.Enum - 750, // 810: otg.ActionResponseProtocolIpv4.ping:type_name -> otg.ActionResponseProtocolIpv4Ping - 749, // 811: otg.ActionProtocolIpv4Ping.requests:type_name -> otg.ActionProtocolIpv4PingRequest - 751, // 812: otg.ActionResponseProtocolIpv4Ping.responses:type_name -> otg.ActionResponseProtocolIpv4PingResponse - 153, // 813: otg.ActionResponseProtocolIpv4PingResponse.result:type_name -> otg.ActionResponseProtocolIpv4PingResponse.Result.Enum - 154, // 814: otg.ActionProtocolIpv6.choice:type_name -> otg.ActionProtocolIpv6.Choice.Enum - 754, // 815: otg.ActionProtocolIpv6.ping:type_name -> otg.ActionProtocolIpv6Ping - 155, // 816: otg.ActionResponseProtocolIpv6.choice:type_name -> otg.ActionResponseProtocolIpv6.Choice.Enum - 756, // 817: otg.ActionResponseProtocolIpv6.ping:type_name -> otg.ActionResponseProtocolIpv6Ping - 755, // 818: otg.ActionProtocolIpv6Ping.requests:type_name -> otg.ActionProtocolIpv6PingRequest - 757, // 819: otg.ActionResponseProtocolIpv6Ping.responses:type_name -> otg.ActionResponseProtocolIpv6PingResponse - 156, // 820: otg.ActionResponseProtocolIpv6PingResponse.result:type_name -> otg.ActionResponseProtocolIpv6PingResponse.Result.Enum - 157, // 821: otg.ActionProtocolBgp.choice:type_name -> otg.ActionProtocolBgp.Choice.Enum - 759, // 822: otg.ActionProtocolBgp.notification:type_name -> otg.ActionProtocolBgpNotification - 760, // 823: otg.ActionProtocolBgp.initiate_graceful_restart:type_name -> otg.ActionProtocolBgpInitiateGracefulRestart - 158, // 824: otg.ActionProtocolBgpNotification.choice:type_name -> otg.ActionProtocolBgpNotification.Choice.Enum - 470, // 825: otg.ActionProtocolBgpNotification.cease:type_name -> otg.DeviceBgpCeaseError - 465, // 826: otg.ActionProtocolBgpNotification.message_header_error:type_name -> otg.DeviceBgpMessageHeaderError - 466, // 827: otg.ActionProtocolBgpNotification.open_message_error:type_name -> otg.DeviceBgpOpenMessageError - 467, // 828: otg.ActionProtocolBgpNotification.update_message_error:type_name -> otg.DeviceBgpUpdateMessageError - 468, // 829: otg.ActionProtocolBgpNotification.hold_timer_expired:type_name -> otg.DeviceBgpHoldTimerExpired - 469, // 830: otg.ActionProtocolBgpNotification.finite_state_machine_error:type_name -> otg.DeviceBgpFiniteStateMachineError - 471, // 831: otg.ActionProtocolBgpNotification.custom:type_name -> otg.DeviceBgpCustomError - 159, // 832: otg.MetricsRequest.choice:type_name -> otg.MetricsRequest.Choice.Enum - 763, // 833: otg.MetricsRequest.port:type_name -> otg.PortMetricsRequest - 765, // 834: otg.MetricsRequest.flow:type_name -> otg.FlowMetricsRequest - 774, // 835: otg.MetricsRequest.bgpv4:type_name -> otg.Bgpv4MetricsRequest - 776, // 836: otg.MetricsRequest.bgpv6:type_name -> otg.Bgpv6MetricsRequest - 778, // 837: otg.MetricsRequest.isis:type_name -> otg.IsisMetricsRequest - 780, // 838: otg.MetricsRequest.lag:type_name -> otg.LagMetricsRequest - 782, // 839: otg.MetricsRequest.lacp:type_name -> otg.LacpMetricsRequest - 784, // 840: otg.MetricsRequest.lldp:type_name -> otg.LldpMetricsRequest - 786, // 841: otg.MetricsRequest.rsvp:type_name -> otg.RsvpMetricsRequest - 160, // 842: otg.MetricsResponse.choice:type_name -> otg.MetricsResponse.Choice.Enum - 764, // 843: otg.MetricsResponse.port_metrics:type_name -> otg.PortMetric - 768, // 844: otg.MetricsResponse.flow_metrics:type_name -> otg.FlowMetric - 775, // 845: otg.MetricsResponse.bgpv4_metrics:type_name -> otg.Bgpv4Metric - 777, // 846: otg.MetricsResponse.bgpv6_metrics:type_name -> otg.Bgpv6Metric - 779, // 847: otg.MetricsResponse.isis_metrics:type_name -> otg.IsisMetric - 781, // 848: otg.MetricsResponse.lag_metrics:type_name -> otg.LagMetric - 783, // 849: otg.MetricsResponse.lacp_metrics:type_name -> otg.LacpMetric - 785, // 850: otg.MetricsResponse.lldp_metrics:type_name -> otg.LldpMetric - 787, // 851: otg.MetricsResponse.rsvp_metrics:type_name -> otg.RsvpMetric - 161, // 852: otg.PortMetricsRequest.column_names:type_name -> otg.PortMetricsRequest.ColumnNames.Enum - 162, // 853: otg.PortMetric.link:type_name -> otg.PortMetric.Link.Enum - 163, // 854: otg.PortMetric.capture:type_name -> otg.PortMetric.Capture.Enum - 164, // 855: otg.PortMetric.transmit:type_name -> otg.PortMetric.Transmit.Enum - 165, // 856: otg.FlowMetricsRequest.metric_names:type_name -> otg.FlowMetricsRequest.MetricNames.Enum - 766, // 857: otg.FlowMetricsRequest.tagged_metrics:type_name -> otg.FlowTaggedMetricsFilter - 166, // 858: otg.FlowTaggedMetricsFilter.metric_names:type_name -> otg.FlowTaggedMetricsFilter.MetricNames.Enum - 767, // 859: otg.FlowTaggedMetricsFilter.filters:type_name -> otg.FlowMetricTagFilter - 167, // 860: otg.FlowMetric.transmit:type_name -> otg.FlowMetric.Transmit.Enum - 772, // 861: otg.FlowMetric.timestamps:type_name -> otg.MetricTimestamp - 773, // 862: otg.FlowMetric.latency:type_name -> otg.MetricLatency - 769, // 863: otg.FlowMetric.tagged_metrics:type_name -> otg.FlowTaggedMetric - 770, // 864: otg.FlowTaggedMetric.tags:type_name -> otg.FlowMetricTag - 772, // 865: otg.FlowTaggedMetric.timestamps:type_name -> otg.MetricTimestamp - 773, // 866: otg.FlowTaggedMetric.latency:type_name -> otg.MetricLatency - 771, // 867: otg.FlowMetricTag.value:type_name -> otg.FlowMetricTagValue - 168, // 868: otg.FlowMetricTagValue.choice:type_name -> otg.FlowMetricTagValue.Choice.Enum - 169, // 869: otg.Bgpv4MetricsRequest.column_names:type_name -> otg.Bgpv4MetricsRequest.ColumnNames.Enum - 170, // 870: otg.Bgpv4Metric.session_state:type_name -> otg.Bgpv4Metric.SessionState.Enum - 171, // 871: otg.Bgpv4Metric.fsm_state:type_name -> otg.Bgpv4Metric.FsmState.Enum - 172, // 872: otg.Bgpv6MetricsRequest.column_names:type_name -> otg.Bgpv6MetricsRequest.ColumnNames.Enum - 173, // 873: otg.Bgpv6Metric.session_state:type_name -> otg.Bgpv6Metric.SessionState.Enum - 174, // 874: otg.Bgpv6Metric.fsm_state:type_name -> otg.Bgpv6Metric.FsmState.Enum - 175, // 875: otg.IsisMetricsRequest.column_names:type_name -> otg.IsisMetricsRequest.ColumnNames.Enum - 176, // 876: otg.LagMetricsRequest.column_names:type_name -> otg.LagMetricsRequest.ColumnNames.Enum - 177, // 877: otg.LagMetric.oper_status:type_name -> otg.LagMetric.OperStatus.Enum - 178, // 878: otg.LacpMetricsRequest.column_names:type_name -> otg.LacpMetricsRequest.ColumnNames.Enum - 179, // 879: otg.LacpMetric.activity:type_name -> otg.LacpMetric.Activity.Enum - 180, // 880: otg.LacpMetric.timeout:type_name -> otg.LacpMetric.Timeout.Enum - 181, // 881: otg.LacpMetric.synchronization:type_name -> otg.LacpMetric.Synchronization.Enum - 182, // 882: otg.LldpMetricsRequest.column_names:type_name -> otg.LldpMetricsRequest.ColumnNames.Enum - 183, // 883: otg.RsvpMetricsRequest.column_names:type_name -> otg.RsvpMetricsRequest.ColumnNames.Enum - 184, // 884: otg.StatesRequest.choice:type_name -> otg.StatesRequest.Choice.Enum - 790, // 885: otg.StatesRequest.ipv4_neighbors:type_name -> otg.Neighborsv4StatesRequest - 792, // 886: otg.StatesRequest.ipv6_neighbors:type_name -> otg.Neighborsv6StatesRequest - 794, // 887: otg.StatesRequest.bgp_prefixes:type_name -> otg.BgpPrefixStateRequest - 803, // 888: otg.StatesRequest.isis_lsps:type_name -> otg.IsisLspsStateRequest - 820, // 889: otg.StatesRequest.lldp_neighbors:type_name -> otg.LldpNeighborsStateRequest - 824, // 890: otg.StatesRequest.rsvp_lsps:type_name -> otg.RsvpLspsStateRequest - 185, // 891: otg.StatesResponse.choice:type_name -> otg.StatesResponse.Choice.Enum - 791, // 892: otg.StatesResponse.ipv4_neighbors:type_name -> otg.Neighborsv4State - 793, // 893: otg.StatesResponse.ipv6_neighbors:type_name -> otg.Neighborsv6State - 797, // 894: otg.StatesResponse.bgp_prefixes:type_name -> otg.BgpPrefixesState - 804, // 895: otg.StatesResponse.isis_lsps:type_name -> otg.IsisLspsState - 821, // 896: otg.StatesResponse.lldp_neighbors:type_name -> otg.LldpNeighborsState - 825, // 897: otg.StatesResponse.rsvp_lsps:type_name -> otg.RsvpLspsState - 186, // 898: otg.BgpPrefixStateRequest.prefix_filters:type_name -> otg.BgpPrefixStateRequest.PrefixFilters.Enum - 795, // 899: otg.BgpPrefixStateRequest.ipv4_unicast_filters:type_name -> otg.BgpPrefixIpv4UnicastFilter - 796, // 900: otg.BgpPrefixStateRequest.ipv6_unicast_filters:type_name -> otg.BgpPrefixIpv6UnicastFilter - 187, // 901: otg.BgpPrefixIpv4UnicastFilter.origin:type_name -> otg.BgpPrefixIpv4UnicastFilter.Origin.Enum - 188, // 902: otg.BgpPrefixIpv6UnicastFilter.origin:type_name -> otg.BgpPrefixIpv6UnicastFilter.Origin.Enum - 798, // 903: otg.BgpPrefixesState.ipv4_unicast_prefixes:type_name -> otg.BgpPrefixIpv4UnicastState - 799, // 904: otg.BgpPrefixesState.ipv6_unicast_prefixes:type_name -> otg.BgpPrefixIpv6UnicastState - 189, // 905: otg.BgpPrefixIpv4UnicastState.origin:type_name -> otg.BgpPrefixIpv4UnicastState.Origin.Enum - 800, // 906: otg.BgpPrefixIpv4UnicastState.communities:type_name -> otg.ResultBgpCommunity - 801, // 907: otg.BgpPrefixIpv4UnicastState.as_path:type_name -> otg.ResultBgpAsPath - 190, // 908: otg.BgpPrefixIpv6UnicastState.origin:type_name -> otg.BgpPrefixIpv6UnicastState.Origin.Enum - 800, // 909: otg.BgpPrefixIpv6UnicastState.communities:type_name -> otg.ResultBgpCommunity - 801, // 910: otg.BgpPrefixIpv6UnicastState.as_path:type_name -> otg.ResultBgpAsPath - 191, // 911: otg.ResultBgpCommunity.type:type_name -> otg.ResultBgpCommunity.Type.Enum - 802, // 912: otg.ResultBgpAsPath.segments:type_name -> otg.ResultBgpAsPathSegment - 192, // 913: otg.ResultBgpAsPathSegment.type:type_name -> otg.ResultBgpAsPathSegment.Type.Enum - 805, // 914: otg.IsisLspsState.lsps:type_name -> otg.IsisLspState - 193, // 915: otg.IsisLspState.pdu_type:type_name -> otg.IsisLspState.PduType.Enum - 808, // 916: otg.IsisLspState.flags:type_name -> otg.IsisLspFlags - 806, // 917: otg.IsisLspState.tlvs:type_name -> otg.IsisLspTlvs - 807, // 918: otg.IsisLspTlvs.hostname_tlvs:type_name -> otg.IsisLspHostname - 809, // 919: otg.IsisLspTlvs.is_reachability_tlvs:type_name -> otg.IsisLspIsReachabilityTlv - 810, // 920: otg.IsisLspTlvs.extended_is_reachability_tlvs:type_name -> otg.IsisLspExtendedIsReachabilityTlv - 812, // 921: otg.IsisLspTlvs.ipv4_internal_reachability_tlvs:type_name -> otg.IsisLspIpv4InternalReachabilityTlv - 813, // 922: otg.IsisLspTlvs.ipv4_external_reachability_tlvs:type_name -> otg.IsisLspIpv4ExternalReachabilityTlv - 815, // 923: otg.IsisLspTlvs.extended_ipv4_reachability_tlvs:type_name -> otg.IsisLspExtendedIpv4ReachabilityTlv - 817, // 924: otg.IsisLspTlvs.ipv6_reachability_tlvs:type_name -> otg.IsisLspIpv6ReachabilityTlv - 811, // 925: otg.IsisLspIsReachabilityTlv.neighbors:type_name -> otg.IsisLspneighbor - 811, // 926: otg.IsisLspExtendedIsReachabilityTlv.neighbors:type_name -> otg.IsisLspneighbor - 814, // 927: otg.IsisLspIpv4InternalReachabilityTlv.prefixes:type_name -> otg.IsisLspV4Prefix - 814, // 928: otg.IsisLspIpv4ExternalReachabilityTlv.prefixes:type_name -> otg.IsisLspV4Prefix - 194, // 929: otg.IsisLspV4Prefix.redistribution_type:type_name -> otg.IsisLspV4Prefix.RedistributionType.Enum - 195, // 930: otg.IsisLspV4Prefix.origin_type:type_name -> otg.IsisLspV4Prefix.OriginType.Enum - 816, // 931: otg.IsisLspExtendedIpv4ReachabilityTlv.prefixes:type_name -> otg.IsisLspExtendedV4Prefix - 196, // 932: otg.IsisLspExtendedV4Prefix.redistribution_type:type_name -> otg.IsisLspExtendedV4Prefix.RedistributionType.Enum - 819, // 933: otg.IsisLspExtendedV4Prefix.prefix_attributes:type_name -> otg.IsisLspPrefixAttributes - 818, // 934: otg.IsisLspIpv6ReachabilityTlv.prefixes:type_name -> otg.IsisLspV6Prefix - 197, // 935: otg.IsisLspV6Prefix.redistribution_type:type_name -> otg.IsisLspV6Prefix.RedistributionType.Enum - 198, // 936: otg.IsisLspV6Prefix.origin_type:type_name -> otg.IsisLspV6Prefix.OriginType.Enum - 819, // 937: otg.IsisLspV6Prefix.prefix_attributes:type_name -> otg.IsisLspPrefixAttributes - 199, // 938: otg.LldpNeighborsState.chassis_id_type:type_name -> otg.LldpNeighborsState.ChassisIdType.Enum - 200, // 939: otg.LldpNeighborsState.port_id_type:type_name -> otg.LldpNeighborsState.PortIdType.Enum - 822, // 940: otg.LldpNeighborsState.custom_tlvs:type_name -> otg.LldpCustomTLVState - 823, // 941: otg.LldpNeighborsState.capabilities:type_name -> otg.LldpCapabilityState - 201, // 942: otg.LldpCapabilityState.capability_name:type_name -> otg.LldpCapabilityState.CapabilityName.Enum - 826, // 943: otg.RsvpLspsState.ipv4_lsps:type_name -> otg.RsvpIPv4LspState - 827, // 944: otg.RsvpIPv4LspState.lsp:type_name -> otg.RsvpLspState - 828, // 945: otg.RsvpIPv4LspState.rros:type_name -> otg.RsvpLspIpv4Rro - 829, // 946: otg.RsvpIPv4LspState.eros:type_name -> otg.RsvpLspIpv4Ero - 202, // 947: otg.RsvpLspState.session_status:type_name -> otg.RsvpLspState.SessionStatus.Enum - 203, // 948: otg.RsvpLspState.last_flap_reason:type_name -> otg.RsvpLspState.LastFlapReason.Enum - 204, // 949: otg.RsvpLspIpv4Ero.type:type_name -> otg.RsvpLspIpv4Ero.Type.Enum - 205, // 950: otg.PatternFlowEthernetDst.choice:type_name -> otg.PatternFlowEthernetDst.Choice.Enum - 831, // 951: otg.PatternFlowEthernetDst.increment:type_name -> otg.PatternFlowEthernetDstCounter - 831, // 952: otg.PatternFlowEthernetDst.decrement:type_name -> otg.PatternFlowEthernetDstCounter - 832, // 953: otg.PatternFlowEthernetDst.metric_tags:type_name -> otg.PatternFlowEthernetDstMetricTag - 206, // 954: otg.PatternFlowEthernetSrc.choice:type_name -> otg.PatternFlowEthernetSrc.Choice.Enum - 834, // 955: otg.PatternFlowEthernetSrc.increment:type_name -> otg.PatternFlowEthernetSrcCounter - 834, // 956: otg.PatternFlowEthernetSrc.decrement:type_name -> otg.PatternFlowEthernetSrcCounter - 835, // 957: otg.PatternFlowEthernetSrc.metric_tags:type_name -> otg.PatternFlowEthernetSrcMetricTag - 207, // 958: otg.PatternFlowEthernetEtherType.choice:type_name -> otg.PatternFlowEthernetEtherType.Choice.Enum - 837, // 959: otg.PatternFlowEthernetEtherType.increment:type_name -> otg.PatternFlowEthernetEtherTypeCounter - 837, // 960: otg.PatternFlowEthernetEtherType.decrement:type_name -> otg.PatternFlowEthernetEtherTypeCounter - 838, // 961: otg.PatternFlowEthernetEtherType.metric_tags:type_name -> otg.PatternFlowEthernetEtherTypeMetricTag - 208, // 962: otg.PatternFlowEthernetPfcQueue.choice:type_name -> otg.PatternFlowEthernetPfcQueue.Choice.Enum - 840, // 963: otg.PatternFlowEthernetPfcQueue.increment:type_name -> otg.PatternFlowEthernetPfcQueueCounter - 840, // 964: otg.PatternFlowEthernetPfcQueue.decrement:type_name -> otg.PatternFlowEthernetPfcQueueCounter - 841, // 965: otg.PatternFlowEthernetPfcQueue.metric_tags:type_name -> otg.PatternFlowEthernetPfcQueueMetricTag - 209, // 966: otg.PatternFlowVlanPriority.choice:type_name -> otg.PatternFlowVlanPriority.Choice.Enum - 843, // 967: otg.PatternFlowVlanPriority.increment:type_name -> otg.PatternFlowVlanPriorityCounter - 843, // 968: otg.PatternFlowVlanPriority.decrement:type_name -> otg.PatternFlowVlanPriorityCounter - 844, // 969: otg.PatternFlowVlanPriority.metric_tags:type_name -> otg.PatternFlowVlanPriorityMetricTag - 210, // 970: otg.PatternFlowVlanCfi.choice:type_name -> otg.PatternFlowVlanCfi.Choice.Enum - 846, // 971: otg.PatternFlowVlanCfi.increment:type_name -> otg.PatternFlowVlanCfiCounter - 846, // 972: otg.PatternFlowVlanCfi.decrement:type_name -> otg.PatternFlowVlanCfiCounter - 847, // 973: otg.PatternFlowVlanCfi.metric_tags:type_name -> otg.PatternFlowVlanCfiMetricTag - 211, // 974: otg.PatternFlowVlanId.choice:type_name -> otg.PatternFlowVlanId.Choice.Enum - 849, // 975: otg.PatternFlowVlanId.increment:type_name -> otg.PatternFlowVlanIdCounter - 849, // 976: otg.PatternFlowVlanId.decrement:type_name -> otg.PatternFlowVlanIdCounter - 850, // 977: otg.PatternFlowVlanId.metric_tags:type_name -> otg.PatternFlowVlanIdMetricTag - 212, // 978: otg.PatternFlowVlanTpid.choice:type_name -> otg.PatternFlowVlanTpid.Choice.Enum - 852, // 979: otg.PatternFlowVlanTpid.increment:type_name -> otg.PatternFlowVlanTpidCounter - 852, // 980: otg.PatternFlowVlanTpid.decrement:type_name -> otg.PatternFlowVlanTpidCounter - 853, // 981: otg.PatternFlowVlanTpid.metric_tags:type_name -> otg.PatternFlowVlanTpidMetricTag - 213, // 982: otg.PatternFlowVxlanFlags.choice:type_name -> otg.PatternFlowVxlanFlags.Choice.Enum - 855, // 983: otg.PatternFlowVxlanFlags.increment:type_name -> otg.PatternFlowVxlanFlagsCounter - 855, // 984: otg.PatternFlowVxlanFlags.decrement:type_name -> otg.PatternFlowVxlanFlagsCounter - 856, // 985: otg.PatternFlowVxlanFlags.metric_tags:type_name -> otg.PatternFlowVxlanFlagsMetricTag - 214, // 986: otg.PatternFlowVxlanReserved0.choice:type_name -> otg.PatternFlowVxlanReserved0.Choice.Enum - 858, // 987: otg.PatternFlowVxlanReserved0.increment:type_name -> otg.PatternFlowVxlanReserved0Counter - 858, // 988: otg.PatternFlowVxlanReserved0.decrement:type_name -> otg.PatternFlowVxlanReserved0Counter - 859, // 989: otg.PatternFlowVxlanReserved0.metric_tags:type_name -> otg.PatternFlowVxlanReserved0MetricTag - 215, // 990: otg.PatternFlowVxlanVni.choice:type_name -> otg.PatternFlowVxlanVni.Choice.Enum - 861, // 991: otg.PatternFlowVxlanVni.increment:type_name -> otg.PatternFlowVxlanVniCounter - 861, // 992: otg.PatternFlowVxlanVni.decrement:type_name -> otg.PatternFlowVxlanVniCounter - 862, // 993: otg.PatternFlowVxlanVni.metric_tags:type_name -> otg.PatternFlowVxlanVniMetricTag - 216, // 994: otg.PatternFlowVxlanReserved1.choice:type_name -> otg.PatternFlowVxlanReserved1.Choice.Enum - 864, // 995: otg.PatternFlowVxlanReserved1.increment:type_name -> otg.PatternFlowVxlanReserved1Counter - 864, // 996: otg.PatternFlowVxlanReserved1.decrement:type_name -> otg.PatternFlowVxlanReserved1Counter - 865, // 997: otg.PatternFlowVxlanReserved1.metric_tags:type_name -> otg.PatternFlowVxlanReserved1MetricTag - 217, // 998: otg.PatternFlowIpv4Version.choice:type_name -> otg.PatternFlowIpv4Version.Choice.Enum - 867, // 999: otg.PatternFlowIpv4Version.increment:type_name -> otg.PatternFlowIpv4VersionCounter - 867, // 1000: otg.PatternFlowIpv4Version.decrement:type_name -> otg.PatternFlowIpv4VersionCounter - 868, // 1001: otg.PatternFlowIpv4Version.metric_tags:type_name -> otg.PatternFlowIpv4VersionMetricTag - 218, // 1002: otg.PatternFlowIpv4HeaderLength.choice:type_name -> otg.PatternFlowIpv4HeaderLength.Choice.Enum - 870, // 1003: otg.PatternFlowIpv4HeaderLength.increment:type_name -> otg.PatternFlowIpv4HeaderLengthCounter - 870, // 1004: otg.PatternFlowIpv4HeaderLength.decrement:type_name -> otg.PatternFlowIpv4HeaderLengthCounter - 871, // 1005: otg.PatternFlowIpv4HeaderLength.metric_tags:type_name -> otg.PatternFlowIpv4HeaderLengthMetricTag - 219, // 1006: otg.PatternFlowIpv4TotalLength.choice:type_name -> otg.PatternFlowIpv4TotalLength.Choice.Enum - 873, // 1007: otg.PatternFlowIpv4TotalLength.increment:type_name -> otg.PatternFlowIpv4TotalLengthCounter - 873, // 1008: otg.PatternFlowIpv4TotalLength.decrement:type_name -> otg.PatternFlowIpv4TotalLengthCounter - 874, // 1009: otg.PatternFlowIpv4TotalLength.metric_tags:type_name -> otg.PatternFlowIpv4TotalLengthMetricTag - 220, // 1010: otg.PatternFlowIpv4Identification.choice:type_name -> otg.PatternFlowIpv4Identification.Choice.Enum - 876, // 1011: otg.PatternFlowIpv4Identification.increment:type_name -> otg.PatternFlowIpv4IdentificationCounter - 876, // 1012: otg.PatternFlowIpv4Identification.decrement:type_name -> otg.PatternFlowIpv4IdentificationCounter - 877, // 1013: otg.PatternFlowIpv4Identification.metric_tags:type_name -> otg.PatternFlowIpv4IdentificationMetricTag - 221, // 1014: otg.PatternFlowIpv4Reserved.choice:type_name -> otg.PatternFlowIpv4Reserved.Choice.Enum - 879, // 1015: otg.PatternFlowIpv4Reserved.increment:type_name -> otg.PatternFlowIpv4ReservedCounter - 879, // 1016: otg.PatternFlowIpv4Reserved.decrement:type_name -> otg.PatternFlowIpv4ReservedCounter - 880, // 1017: otg.PatternFlowIpv4Reserved.metric_tags:type_name -> otg.PatternFlowIpv4ReservedMetricTag - 222, // 1018: otg.PatternFlowIpv4DontFragment.choice:type_name -> otg.PatternFlowIpv4DontFragment.Choice.Enum - 882, // 1019: otg.PatternFlowIpv4DontFragment.increment:type_name -> otg.PatternFlowIpv4DontFragmentCounter - 882, // 1020: otg.PatternFlowIpv4DontFragment.decrement:type_name -> otg.PatternFlowIpv4DontFragmentCounter - 883, // 1021: otg.PatternFlowIpv4DontFragment.metric_tags:type_name -> otg.PatternFlowIpv4DontFragmentMetricTag - 223, // 1022: otg.PatternFlowIpv4MoreFragments.choice:type_name -> otg.PatternFlowIpv4MoreFragments.Choice.Enum - 885, // 1023: otg.PatternFlowIpv4MoreFragments.increment:type_name -> otg.PatternFlowIpv4MoreFragmentsCounter - 885, // 1024: otg.PatternFlowIpv4MoreFragments.decrement:type_name -> otg.PatternFlowIpv4MoreFragmentsCounter - 886, // 1025: otg.PatternFlowIpv4MoreFragments.metric_tags:type_name -> otg.PatternFlowIpv4MoreFragmentsMetricTag - 224, // 1026: otg.PatternFlowIpv4FragmentOffset.choice:type_name -> otg.PatternFlowIpv4FragmentOffset.Choice.Enum - 888, // 1027: otg.PatternFlowIpv4FragmentOffset.increment:type_name -> otg.PatternFlowIpv4FragmentOffsetCounter - 888, // 1028: otg.PatternFlowIpv4FragmentOffset.decrement:type_name -> otg.PatternFlowIpv4FragmentOffsetCounter - 889, // 1029: otg.PatternFlowIpv4FragmentOffset.metric_tags:type_name -> otg.PatternFlowIpv4FragmentOffsetMetricTag - 225, // 1030: otg.PatternFlowIpv4TimeToLive.choice:type_name -> otg.PatternFlowIpv4TimeToLive.Choice.Enum - 891, // 1031: otg.PatternFlowIpv4TimeToLive.increment:type_name -> otg.PatternFlowIpv4TimeToLiveCounter - 891, // 1032: otg.PatternFlowIpv4TimeToLive.decrement:type_name -> otg.PatternFlowIpv4TimeToLiveCounter - 892, // 1033: otg.PatternFlowIpv4TimeToLive.metric_tags:type_name -> otg.PatternFlowIpv4TimeToLiveMetricTag - 226, // 1034: otg.PatternFlowIpv4Protocol.choice:type_name -> otg.PatternFlowIpv4Protocol.Choice.Enum - 894, // 1035: otg.PatternFlowIpv4Protocol.increment:type_name -> otg.PatternFlowIpv4ProtocolCounter - 894, // 1036: otg.PatternFlowIpv4Protocol.decrement:type_name -> otg.PatternFlowIpv4ProtocolCounter - 895, // 1037: otg.PatternFlowIpv4Protocol.metric_tags:type_name -> otg.PatternFlowIpv4ProtocolMetricTag - 227, // 1038: otg.PatternFlowIpv4HeaderChecksum.choice:type_name -> otg.PatternFlowIpv4HeaderChecksum.Choice.Enum - 228, // 1039: otg.PatternFlowIpv4HeaderChecksum.generated:type_name -> otg.PatternFlowIpv4HeaderChecksum.Generated.Enum - 229, // 1040: otg.PatternFlowIpv4Src.choice:type_name -> otg.PatternFlowIpv4Src.Choice.Enum - 898, // 1041: otg.PatternFlowIpv4Src.increment:type_name -> otg.PatternFlowIpv4SrcCounter - 898, // 1042: otg.PatternFlowIpv4Src.decrement:type_name -> otg.PatternFlowIpv4SrcCounter - 899, // 1043: otg.PatternFlowIpv4Src.metric_tags:type_name -> otg.PatternFlowIpv4SrcMetricTag - 230, // 1044: otg.PatternFlowIpv4Dst.choice:type_name -> otg.PatternFlowIpv4Dst.Choice.Enum - 901, // 1045: otg.PatternFlowIpv4Dst.increment:type_name -> otg.PatternFlowIpv4DstCounter - 901, // 1046: otg.PatternFlowIpv4Dst.decrement:type_name -> otg.PatternFlowIpv4DstCounter - 902, // 1047: otg.PatternFlowIpv4Dst.metric_tags:type_name -> otg.PatternFlowIpv4DstMetricTag - 231, // 1048: otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag.choice:type_name -> otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag.Choice.Enum - 904, // 1049: otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag.increment:type_name -> otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter - 904, // 1050: otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag.decrement:type_name -> otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter - 232, // 1051: otg.PatternFlowIpv4OptionsCustomTypeOptionClass.choice:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionClass.Choice.Enum - 906, // 1052: otg.PatternFlowIpv4OptionsCustomTypeOptionClass.increment:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter - 906, // 1053: otg.PatternFlowIpv4OptionsCustomTypeOptionClass.decrement:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter - 233, // 1054: otg.PatternFlowIpv4OptionsCustomTypeOptionNumber.choice:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionNumber.Choice.Enum - 908, // 1055: otg.PatternFlowIpv4OptionsCustomTypeOptionNumber.increment:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter - 908, // 1056: otg.PatternFlowIpv4OptionsCustomTypeOptionNumber.decrement:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter - 234, // 1057: otg.PatternFlowIpv4PriorityRaw.choice:type_name -> otg.PatternFlowIpv4PriorityRaw.Choice.Enum - 910, // 1058: otg.PatternFlowIpv4PriorityRaw.increment:type_name -> otg.PatternFlowIpv4PriorityRawCounter - 910, // 1059: otg.PatternFlowIpv4PriorityRaw.decrement:type_name -> otg.PatternFlowIpv4PriorityRawCounter - 911, // 1060: otg.PatternFlowIpv4PriorityRaw.metric_tags:type_name -> otg.PatternFlowIpv4PriorityRawMetricTag - 235, // 1061: otg.PatternFlowIpv4DscpPhb.choice:type_name -> otg.PatternFlowIpv4DscpPhb.Choice.Enum - 913, // 1062: otg.PatternFlowIpv4DscpPhb.increment:type_name -> otg.PatternFlowIpv4DscpPhbCounter - 913, // 1063: otg.PatternFlowIpv4DscpPhb.decrement:type_name -> otg.PatternFlowIpv4DscpPhbCounter - 914, // 1064: otg.PatternFlowIpv4DscpPhb.metric_tags:type_name -> otg.PatternFlowIpv4DscpPhbMetricTag - 236, // 1065: otg.PatternFlowIpv4DscpEcn.choice:type_name -> otg.PatternFlowIpv4DscpEcn.Choice.Enum - 916, // 1066: otg.PatternFlowIpv4DscpEcn.increment:type_name -> otg.PatternFlowIpv4DscpEcnCounter - 916, // 1067: otg.PatternFlowIpv4DscpEcn.decrement:type_name -> otg.PatternFlowIpv4DscpEcnCounter - 917, // 1068: otg.PatternFlowIpv4DscpEcn.metric_tags:type_name -> otg.PatternFlowIpv4DscpEcnMetricTag - 237, // 1069: otg.PatternFlowIpv4TosPrecedence.choice:type_name -> otg.PatternFlowIpv4TosPrecedence.Choice.Enum - 919, // 1070: otg.PatternFlowIpv4TosPrecedence.increment:type_name -> otg.PatternFlowIpv4TosPrecedenceCounter - 919, // 1071: otg.PatternFlowIpv4TosPrecedence.decrement:type_name -> otg.PatternFlowIpv4TosPrecedenceCounter - 920, // 1072: otg.PatternFlowIpv4TosPrecedence.metric_tags:type_name -> otg.PatternFlowIpv4TosPrecedenceMetricTag - 238, // 1073: otg.PatternFlowIpv4TosDelay.choice:type_name -> otg.PatternFlowIpv4TosDelay.Choice.Enum - 922, // 1074: otg.PatternFlowIpv4TosDelay.increment:type_name -> otg.PatternFlowIpv4TosDelayCounter - 922, // 1075: otg.PatternFlowIpv4TosDelay.decrement:type_name -> otg.PatternFlowIpv4TosDelayCounter - 923, // 1076: otg.PatternFlowIpv4TosDelay.metric_tags:type_name -> otg.PatternFlowIpv4TosDelayMetricTag - 239, // 1077: otg.PatternFlowIpv4TosThroughput.choice:type_name -> otg.PatternFlowIpv4TosThroughput.Choice.Enum - 925, // 1078: otg.PatternFlowIpv4TosThroughput.increment:type_name -> otg.PatternFlowIpv4TosThroughputCounter - 925, // 1079: otg.PatternFlowIpv4TosThroughput.decrement:type_name -> otg.PatternFlowIpv4TosThroughputCounter - 926, // 1080: otg.PatternFlowIpv4TosThroughput.metric_tags:type_name -> otg.PatternFlowIpv4TosThroughputMetricTag - 240, // 1081: otg.PatternFlowIpv4TosReliability.choice:type_name -> otg.PatternFlowIpv4TosReliability.Choice.Enum - 928, // 1082: otg.PatternFlowIpv4TosReliability.increment:type_name -> otg.PatternFlowIpv4TosReliabilityCounter - 928, // 1083: otg.PatternFlowIpv4TosReliability.decrement:type_name -> otg.PatternFlowIpv4TosReliabilityCounter - 929, // 1084: otg.PatternFlowIpv4TosReliability.metric_tags:type_name -> otg.PatternFlowIpv4TosReliabilityMetricTag - 241, // 1085: otg.PatternFlowIpv4TosMonetary.choice:type_name -> otg.PatternFlowIpv4TosMonetary.Choice.Enum - 931, // 1086: otg.PatternFlowIpv4TosMonetary.increment:type_name -> otg.PatternFlowIpv4TosMonetaryCounter - 931, // 1087: otg.PatternFlowIpv4TosMonetary.decrement:type_name -> otg.PatternFlowIpv4TosMonetaryCounter - 932, // 1088: otg.PatternFlowIpv4TosMonetary.metric_tags:type_name -> otg.PatternFlowIpv4TosMonetaryMetricTag - 242, // 1089: otg.PatternFlowIpv4TosUnused.choice:type_name -> otg.PatternFlowIpv4TosUnused.Choice.Enum - 934, // 1090: otg.PatternFlowIpv4TosUnused.increment:type_name -> otg.PatternFlowIpv4TosUnusedCounter - 934, // 1091: otg.PatternFlowIpv4TosUnused.decrement:type_name -> otg.PatternFlowIpv4TosUnusedCounter - 935, // 1092: otg.PatternFlowIpv4TosUnused.metric_tags:type_name -> otg.PatternFlowIpv4TosUnusedMetricTag - 243, // 1093: otg.PatternFlowIpv6Version.choice:type_name -> otg.PatternFlowIpv6Version.Choice.Enum - 937, // 1094: otg.PatternFlowIpv6Version.increment:type_name -> otg.PatternFlowIpv6VersionCounter - 937, // 1095: otg.PatternFlowIpv6Version.decrement:type_name -> otg.PatternFlowIpv6VersionCounter - 938, // 1096: otg.PatternFlowIpv6Version.metric_tags:type_name -> otg.PatternFlowIpv6VersionMetricTag - 244, // 1097: otg.PatternFlowIpv6TrafficClass.choice:type_name -> otg.PatternFlowIpv6TrafficClass.Choice.Enum - 940, // 1098: otg.PatternFlowIpv6TrafficClass.increment:type_name -> otg.PatternFlowIpv6TrafficClassCounter - 940, // 1099: otg.PatternFlowIpv6TrafficClass.decrement:type_name -> otg.PatternFlowIpv6TrafficClassCounter - 941, // 1100: otg.PatternFlowIpv6TrafficClass.metric_tags:type_name -> otg.PatternFlowIpv6TrafficClassMetricTag - 245, // 1101: otg.PatternFlowIpv6FlowLabel.choice:type_name -> otg.PatternFlowIpv6FlowLabel.Choice.Enum - 943, // 1102: otg.PatternFlowIpv6FlowLabel.increment:type_name -> otg.PatternFlowIpv6FlowLabelCounter - 943, // 1103: otg.PatternFlowIpv6FlowLabel.decrement:type_name -> otg.PatternFlowIpv6FlowLabelCounter - 944, // 1104: otg.PatternFlowIpv6FlowLabel.metric_tags:type_name -> otg.PatternFlowIpv6FlowLabelMetricTag - 246, // 1105: otg.PatternFlowIpv6PayloadLength.choice:type_name -> otg.PatternFlowIpv6PayloadLength.Choice.Enum - 946, // 1106: otg.PatternFlowIpv6PayloadLength.increment:type_name -> otg.PatternFlowIpv6PayloadLengthCounter - 946, // 1107: otg.PatternFlowIpv6PayloadLength.decrement:type_name -> otg.PatternFlowIpv6PayloadLengthCounter - 947, // 1108: otg.PatternFlowIpv6PayloadLength.metric_tags:type_name -> otg.PatternFlowIpv6PayloadLengthMetricTag - 247, // 1109: otg.PatternFlowIpv6NextHeader.choice:type_name -> otg.PatternFlowIpv6NextHeader.Choice.Enum - 949, // 1110: otg.PatternFlowIpv6NextHeader.increment:type_name -> otg.PatternFlowIpv6NextHeaderCounter - 949, // 1111: otg.PatternFlowIpv6NextHeader.decrement:type_name -> otg.PatternFlowIpv6NextHeaderCounter - 950, // 1112: otg.PatternFlowIpv6NextHeader.metric_tags:type_name -> otg.PatternFlowIpv6NextHeaderMetricTag - 248, // 1113: otg.PatternFlowIpv6HopLimit.choice:type_name -> otg.PatternFlowIpv6HopLimit.Choice.Enum - 952, // 1114: otg.PatternFlowIpv6HopLimit.increment:type_name -> otg.PatternFlowIpv6HopLimitCounter - 952, // 1115: otg.PatternFlowIpv6HopLimit.decrement:type_name -> otg.PatternFlowIpv6HopLimitCounter - 953, // 1116: otg.PatternFlowIpv6HopLimit.metric_tags:type_name -> otg.PatternFlowIpv6HopLimitMetricTag - 249, // 1117: otg.PatternFlowIpv6Src.choice:type_name -> otg.PatternFlowIpv6Src.Choice.Enum - 955, // 1118: otg.PatternFlowIpv6Src.increment:type_name -> otg.PatternFlowIpv6SrcCounter - 955, // 1119: otg.PatternFlowIpv6Src.decrement:type_name -> otg.PatternFlowIpv6SrcCounter - 956, // 1120: otg.PatternFlowIpv6Src.metric_tags:type_name -> otg.PatternFlowIpv6SrcMetricTag - 250, // 1121: otg.PatternFlowIpv6Dst.choice:type_name -> otg.PatternFlowIpv6Dst.Choice.Enum - 958, // 1122: otg.PatternFlowIpv6Dst.increment:type_name -> otg.PatternFlowIpv6DstCounter - 958, // 1123: otg.PatternFlowIpv6Dst.decrement:type_name -> otg.PatternFlowIpv6DstCounter - 959, // 1124: otg.PatternFlowIpv6Dst.metric_tags:type_name -> otg.PatternFlowIpv6DstMetricTag - 251, // 1125: otg.PatternFlowPfcPauseDst.choice:type_name -> otg.PatternFlowPfcPauseDst.Choice.Enum - 961, // 1126: otg.PatternFlowPfcPauseDst.increment:type_name -> otg.PatternFlowPfcPauseDstCounter - 961, // 1127: otg.PatternFlowPfcPauseDst.decrement:type_name -> otg.PatternFlowPfcPauseDstCounter - 962, // 1128: otg.PatternFlowPfcPauseDst.metric_tags:type_name -> otg.PatternFlowPfcPauseDstMetricTag - 252, // 1129: otg.PatternFlowPfcPauseSrc.choice:type_name -> otg.PatternFlowPfcPauseSrc.Choice.Enum - 964, // 1130: otg.PatternFlowPfcPauseSrc.increment:type_name -> otg.PatternFlowPfcPauseSrcCounter - 964, // 1131: otg.PatternFlowPfcPauseSrc.decrement:type_name -> otg.PatternFlowPfcPauseSrcCounter - 965, // 1132: otg.PatternFlowPfcPauseSrc.metric_tags:type_name -> otg.PatternFlowPfcPauseSrcMetricTag - 253, // 1133: otg.PatternFlowPfcPauseEtherType.choice:type_name -> otg.PatternFlowPfcPauseEtherType.Choice.Enum - 967, // 1134: otg.PatternFlowPfcPauseEtherType.increment:type_name -> otg.PatternFlowPfcPauseEtherTypeCounter - 967, // 1135: otg.PatternFlowPfcPauseEtherType.decrement:type_name -> otg.PatternFlowPfcPauseEtherTypeCounter - 968, // 1136: otg.PatternFlowPfcPauseEtherType.metric_tags:type_name -> otg.PatternFlowPfcPauseEtherTypeMetricTag - 254, // 1137: otg.PatternFlowPfcPauseControlOpCode.choice:type_name -> otg.PatternFlowPfcPauseControlOpCode.Choice.Enum - 970, // 1138: otg.PatternFlowPfcPauseControlOpCode.increment:type_name -> otg.PatternFlowPfcPauseControlOpCodeCounter - 970, // 1139: otg.PatternFlowPfcPauseControlOpCode.decrement:type_name -> otg.PatternFlowPfcPauseControlOpCodeCounter - 971, // 1140: otg.PatternFlowPfcPauseControlOpCode.metric_tags:type_name -> otg.PatternFlowPfcPauseControlOpCodeMetricTag - 255, // 1141: otg.PatternFlowPfcPauseClassEnableVector.choice:type_name -> otg.PatternFlowPfcPauseClassEnableVector.Choice.Enum - 973, // 1142: otg.PatternFlowPfcPauseClassEnableVector.increment:type_name -> otg.PatternFlowPfcPauseClassEnableVectorCounter - 973, // 1143: otg.PatternFlowPfcPauseClassEnableVector.decrement:type_name -> otg.PatternFlowPfcPauseClassEnableVectorCounter - 974, // 1144: otg.PatternFlowPfcPauseClassEnableVector.metric_tags:type_name -> otg.PatternFlowPfcPauseClassEnableVectorMetricTag - 256, // 1145: otg.PatternFlowPfcPausePauseClass0.choice:type_name -> otg.PatternFlowPfcPausePauseClass0.Choice.Enum - 976, // 1146: otg.PatternFlowPfcPausePauseClass0.increment:type_name -> otg.PatternFlowPfcPausePauseClass0Counter - 976, // 1147: otg.PatternFlowPfcPausePauseClass0.decrement:type_name -> otg.PatternFlowPfcPausePauseClass0Counter - 977, // 1148: otg.PatternFlowPfcPausePauseClass0.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass0MetricTag - 257, // 1149: otg.PatternFlowPfcPausePauseClass1.choice:type_name -> otg.PatternFlowPfcPausePauseClass1.Choice.Enum - 979, // 1150: otg.PatternFlowPfcPausePauseClass1.increment:type_name -> otg.PatternFlowPfcPausePauseClass1Counter - 979, // 1151: otg.PatternFlowPfcPausePauseClass1.decrement:type_name -> otg.PatternFlowPfcPausePauseClass1Counter - 980, // 1152: otg.PatternFlowPfcPausePauseClass1.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass1MetricTag - 258, // 1153: otg.PatternFlowPfcPausePauseClass2.choice:type_name -> otg.PatternFlowPfcPausePauseClass2.Choice.Enum - 982, // 1154: otg.PatternFlowPfcPausePauseClass2.increment:type_name -> otg.PatternFlowPfcPausePauseClass2Counter - 982, // 1155: otg.PatternFlowPfcPausePauseClass2.decrement:type_name -> otg.PatternFlowPfcPausePauseClass2Counter - 983, // 1156: otg.PatternFlowPfcPausePauseClass2.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass2MetricTag - 259, // 1157: otg.PatternFlowPfcPausePauseClass3.choice:type_name -> otg.PatternFlowPfcPausePauseClass3.Choice.Enum - 985, // 1158: otg.PatternFlowPfcPausePauseClass3.increment:type_name -> otg.PatternFlowPfcPausePauseClass3Counter - 985, // 1159: otg.PatternFlowPfcPausePauseClass3.decrement:type_name -> otg.PatternFlowPfcPausePauseClass3Counter - 986, // 1160: otg.PatternFlowPfcPausePauseClass3.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass3MetricTag - 260, // 1161: otg.PatternFlowPfcPausePauseClass4.choice:type_name -> otg.PatternFlowPfcPausePauseClass4.Choice.Enum - 988, // 1162: otg.PatternFlowPfcPausePauseClass4.increment:type_name -> otg.PatternFlowPfcPausePauseClass4Counter - 988, // 1163: otg.PatternFlowPfcPausePauseClass4.decrement:type_name -> otg.PatternFlowPfcPausePauseClass4Counter - 989, // 1164: otg.PatternFlowPfcPausePauseClass4.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass4MetricTag - 261, // 1165: otg.PatternFlowPfcPausePauseClass5.choice:type_name -> otg.PatternFlowPfcPausePauseClass5.Choice.Enum - 991, // 1166: otg.PatternFlowPfcPausePauseClass5.increment:type_name -> otg.PatternFlowPfcPausePauseClass5Counter - 991, // 1167: otg.PatternFlowPfcPausePauseClass5.decrement:type_name -> otg.PatternFlowPfcPausePauseClass5Counter - 992, // 1168: otg.PatternFlowPfcPausePauseClass5.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass5MetricTag - 262, // 1169: otg.PatternFlowPfcPausePauseClass6.choice:type_name -> otg.PatternFlowPfcPausePauseClass6.Choice.Enum - 994, // 1170: otg.PatternFlowPfcPausePauseClass6.increment:type_name -> otg.PatternFlowPfcPausePauseClass6Counter - 994, // 1171: otg.PatternFlowPfcPausePauseClass6.decrement:type_name -> otg.PatternFlowPfcPausePauseClass6Counter - 995, // 1172: otg.PatternFlowPfcPausePauseClass6.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass6MetricTag - 263, // 1173: otg.PatternFlowPfcPausePauseClass7.choice:type_name -> otg.PatternFlowPfcPausePauseClass7.Choice.Enum - 997, // 1174: otg.PatternFlowPfcPausePauseClass7.increment:type_name -> otg.PatternFlowPfcPausePauseClass7Counter - 997, // 1175: otg.PatternFlowPfcPausePauseClass7.decrement:type_name -> otg.PatternFlowPfcPausePauseClass7Counter - 998, // 1176: otg.PatternFlowPfcPausePauseClass7.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass7MetricTag - 264, // 1177: otg.PatternFlowEthernetPauseDst.choice:type_name -> otg.PatternFlowEthernetPauseDst.Choice.Enum - 1000, // 1178: otg.PatternFlowEthernetPauseDst.increment:type_name -> otg.PatternFlowEthernetPauseDstCounter - 1000, // 1179: otg.PatternFlowEthernetPauseDst.decrement:type_name -> otg.PatternFlowEthernetPauseDstCounter - 1001, // 1180: otg.PatternFlowEthernetPauseDst.metric_tags:type_name -> otg.PatternFlowEthernetPauseDstMetricTag - 265, // 1181: otg.PatternFlowEthernetPauseSrc.choice:type_name -> otg.PatternFlowEthernetPauseSrc.Choice.Enum - 1003, // 1182: otg.PatternFlowEthernetPauseSrc.increment:type_name -> otg.PatternFlowEthernetPauseSrcCounter - 1003, // 1183: otg.PatternFlowEthernetPauseSrc.decrement:type_name -> otg.PatternFlowEthernetPauseSrcCounter - 1004, // 1184: otg.PatternFlowEthernetPauseSrc.metric_tags:type_name -> otg.PatternFlowEthernetPauseSrcMetricTag - 266, // 1185: otg.PatternFlowEthernetPauseEtherType.choice:type_name -> otg.PatternFlowEthernetPauseEtherType.Choice.Enum - 1006, // 1186: otg.PatternFlowEthernetPauseEtherType.increment:type_name -> otg.PatternFlowEthernetPauseEtherTypeCounter - 1006, // 1187: otg.PatternFlowEthernetPauseEtherType.decrement:type_name -> otg.PatternFlowEthernetPauseEtherTypeCounter - 1007, // 1188: otg.PatternFlowEthernetPauseEtherType.metric_tags:type_name -> otg.PatternFlowEthernetPauseEtherTypeMetricTag - 267, // 1189: otg.PatternFlowEthernetPauseControlOpCode.choice:type_name -> otg.PatternFlowEthernetPauseControlOpCode.Choice.Enum - 1009, // 1190: otg.PatternFlowEthernetPauseControlOpCode.increment:type_name -> otg.PatternFlowEthernetPauseControlOpCodeCounter - 1009, // 1191: otg.PatternFlowEthernetPauseControlOpCode.decrement:type_name -> otg.PatternFlowEthernetPauseControlOpCodeCounter - 1010, // 1192: otg.PatternFlowEthernetPauseControlOpCode.metric_tags:type_name -> otg.PatternFlowEthernetPauseControlOpCodeMetricTag - 268, // 1193: otg.PatternFlowEthernetPauseTime.choice:type_name -> otg.PatternFlowEthernetPauseTime.Choice.Enum - 1012, // 1194: otg.PatternFlowEthernetPauseTime.increment:type_name -> otg.PatternFlowEthernetPauseTimeCounter - 1012, // 1195: otg.PatternFlowEthernetPauseTime.decrement:type_name -> otg.PatternFlowEthernetPauseTimeCounter - 1013, // 1196: otg.PatternFlowEthernetPauseTime.metric_tags:type_name -> otg.PatternFlowEthernetPauseTimeMetricTag - 269, // 1197: otg.PatternFlowTcpSrcPort.choice:type_name -> otg.PatternFlowTcpSrcPort.Choice.Enum - 1015, // 1198: otg.PatternFlowTcpSrcPort.increment:type_name -> otg.PatternFlowTcpSrcPortCounter - 1015, // 1199: otg.PatternFlowTcpSrcPort.decrement:type_name -> otg.PatternFlowTcpSrcPortCounter - 1016, // 1200: otg.PatternFlowTcpSrcPort.metric_tags:type_name -> otg.PatternFlowTcpSrcPortMetricTag - 270, // 1201: otg.PatternFlowTcpDstPort.choice:type_name -> otg.PatternFlowTcpDstPort.Choice.Enum - 1018, // 1202: otg.PatternFlowTcpDstPort.increment:type_name -> otg.PatternFlowTcpDstPortCounter - 1018, // 1203: otg.PatternFlowTcpDstPort.decrement:type_name -> otg.PatternFlowTcpDstPortCounter - 1019, // 1204: otg.PatternFlowTcpDstPort.metric_tags:type_name -> otg.PatternFlowTcpDstPortMetricTag - 271, // 1205: otg.PatternFlowTcpSeqNum.choice:type_name -> otg.PatternFlowTcpSeqNum.Choice.Enum - 1021, // 1206: otg.PatternFlowTcpSeqNum.increment:type_name -> otg.PatternFlowTcpSeqNumCounter - 1021, // 1207: otg.PatternFlowTcpSeqNum.decrement:type_name -> otg.PatternFlowTcpSeqNumCounter - 1022, // 1208: otg.PatternFlowTcpSeqNum.metric_tags:type_name -> otg.PatternFlowTcpSeqNumMetricTag - 272, // 1209: otg.PatternFlowTcpAckNum.choice:type_name -> otg.PatternFlowTcpAckNum.Choice.Enum - 1024, // 1210: otg.PatternFlowTcpAckNum.increment:type_name -> otg.PatternFlowTcpAckNumCounter - 1024, // 1211: otg.PatternFlowTcpAckNum.decrement:type_name -> otg.PatternFlowTcpAckNumCounter - 1025, // 1212: otg.PatternFlowTcpAckNum.metric_tags:type_name -> otg.PatternFlowTcpAckNumMetricTag - 273, // 1213: otg.PatternFlowTcpDataOffset.choice:type_name -> otg.PatternFlowTcpDataOffset.Choice.Enum - 1027, // 1214: otg.PatternFlowTcpDataOffset.increment:type_name -> otg.PatternFlowTcpDataOffsetCounter - 1027, // 1215: otg.PatternFlowTcpDataOffset.decrement:type_name -> otg.PatternFlowTcpDataOffsetCounter - 1028, // 1216: otg.PatternFlowTcpDataOffset.metric_tags:type_name -> otg.PatternFlowTcpDataOffsetMetricTag - 274, // 1217: otg.PatternFlowTcpEcnNs.choice:type_name -> otg.PatternFlowTcpEcnNs.Choice.Enum - 1030, // 1218: otg.PatternFlowTcpEcnNs.increment:type_name -> otg.PatternFlowTcpEcnNsCounter - 1030, // 1219: otg.PatternFlowTcpEcnNs.decrement:type_name -> otg.PatternFlowTcpEcnNsCounter - 1031, // 1220: otg.PatternFlowTcpEcnNs.metric_tags:type_name -> otg.PatternFlowTcpEcnNsMetricTag - 275, // 1221: otg.PatternFlowTcpEcnCwr.choice:type_name -> otg.PatternFlowTcpEcnCwr.Choice.Enum - 1033, // 1222: otg.PatternFlowTcpEcnCwr.increment:type_name -> otg.PatternFlowTcpEcnCwrCounter - 1033, // 1223: otg.PatternFlowTcpEcnCwr.decrement:type_name -> otg.PatternFlowTcpEcnCwrCounter - 1034, // 1224: otg.PatternFlowTcpEcnCwr.metric_tags:type_name -> otg.PatternFlowTcpEcnCwrMetricTag - 276, // 1225: otg.PatternFlowTcpEcnEcho.choice:type_name -> otg.PatternFlowTcpEcnEcho.Choice.Enum - 1036, // 1226: otg.PatternFlowTcpEcnEcho.increment:type_name -> otg.PatternFlowTcpEcnEchoCounter - 1036, // 1227: otg.PatternFlowTcpEcnEcho.decrement:type_name -> otg.PatternFlowTcpEcnEchoCounter - 1037, // 1228: otg.PatternFlowTcpEcnEcho.metric_tags:type_name -> otg.PatternFlowTcpEcnEchoMetricTag - 277, // 1229: otg.PatternFlowTcpCtlUrg.choice:type_name -> otg.PatternFlowTcpCtlUrg.Choice.Enum - 1039, // 1230: otg.PatternFlowTcpCtlUrg.increment:type_name -> otg.PatternFlowTcpCtlUrgCounter - 1039, // 1231: otg.PatternFlowTcpCtlUrg.decrement:type_name -> otg.PatternFlowTcpCtlUrgCounter - 1040, // 1232: otg.PatternFlowTcpCtlUrg.metric_tags:type_name -> otg.PatternFlowTcpCtlUrgMetricTag - 278, // 1233: otg.PatternFlowTcpCtlAck.choice:type_name -> otg.PatternFlowTcpCtlAck.Choice.Enum - 1042, // 1234: otg.PatternFlowTcpCtlAck.increment:type_name -> otg.PatternFlowTcpCtlAckCounter - 1042, // 1235: otg.PatternFlowTcpCtlAck.decrement:type_name -> otg.PatternFlowTcpCtlAckCounter - 1043, // 1236: otg.PatternFlowTcpCtlAck.metric_tags:type_name -> otg.PatternFlowTcpCtlAckMetricTag - 279, // 1237: otg.PatternFlowTcpCtlPsh.choice:type_name -> otg.PatternFlowTcpCtlPsh.Choice.Enum - 1045, // 1238: otg.PatternFlowTcpCtlPsh.increment:type_name -> otg.PatternFlowTcpCtlPshCounter - 1045, // 1239: otg.PatternFlowTcpCtlPsh.decrement:type_name -> otg.PatternFlowTcpCtlPshCounter - 1046, // 1240: otg.PatternFlowTcpCtlPsh.metric_tags:type_name -> otg.PatternFlowTcpCtlPshMetricTag - 280, // 1241: otg.PatternFlowTcpCtlRst.choice:type_name -> otg.PatternFlowTcpCtlRst.Choice.Enum - 1048, // 1242: otg.PatternFlowTcpCtlRst.increment:type_name -> otg.PatternFlowTcpCtlRstCounter - 1048, // 1243: otg.PatternFlowTcpCtlRst.decrement:type_name -> otg.PatternFlowTcpCtlRstCounter - 1049, // 1244: otg.PatternFlowTcpCtlRst.metric_tags:type_name -> otg.PatternFlowTcpCtlRstMetricTag - 281, // 1245: otg.PatternFlowTcpCtlSyn.choice:type_name -> otg.PatternFlowTcpCtlSyn.Choice.Enum - 1051, // 1246: otg.PatternFlowTcpCtlSyn.increment:type_name -> otg.PatternFlowTcpCtlSynCounter - 1051, // 1247: otg.PatternFlowTcpCtlSyn.decrement:type_name -> otg.PatternFlowTcpCtlSynCounter - 1052, // 1248: otg.PatternFlowTcpCtlSyn.metric_tags:type_name -> otg.PatternFlowTcpCtlSynMetricTag - 282, // 1249: otg.PatternFlowTcpCtlFin.choice:type_name -> otg.PatternFlowTcpCtlFin.Choice.Enum - 1054, // 1250: otg.PatternFlowTcpCtlFin.increment:type_name -> otg.PatternFlowTcpCtlFinCounter - 1054, // 1251: otg.PatternFlowTcpCtlFin.decrement:type_name -> otg.PatternFlowTcpCtlFinCounter - 1055, // 1252: otg.PatternFlowTcpCtlFin.metric_tags:type_name -> otg.PatternFlowTcpCtlFinMetricTag - 283, // 1253: otg.PatternFlowTcpWindow.choice:type_name -> otg.PatternFlowTcpWindow.Choice.Enum - 1057, // 1254: otg.PatternFlowTcpWindow.increment:type_name -> otg.PatternFlowTcpWindowCounter - 1057, // 1255: otg.PatternFlowTcpWindow.decrement:type_name -> otg.PatternFlowTcpWindowCounter - 1058, // 1256: otg.PatternFlowTcpWindow.metric_tags:type_name -> otg.PatternFlowTcpWindowMetricTag - 284, // 1257: otg.PatternFlowUdpSrcPort.choice:type_name -> otg.PatternFlowUdpSrcPort.Choice.Enum - 1060, // 1258: otg.PatternFlowUdpSrcPort.increment:type_name -> otg.PatternFlowUdpSrcPortCounter - 1060, // 1259: otg.PatternFlowUdpSrcPort.decrement:type_name -> otg.PatternFlowUdpSrcPortCounter - 1061, // 1260: otg.PatternFlowUdpSrcPort.metric_tags:type_name -> otg.PatternFlowUdpSrcPortMetricTag - 285, // 1261: otg.PatternFlowUdpDstPort.choice:type_name -> otg.PatternFlowUdpDstPort.Choice.Enum - 1063, // 1262: otg.PatternFlowUdpDstPort.increment:type_name -> otg.PatternFlowUdpDstPortCounter - 1063, // 1263: otg.PatternFlowUdpDstPort.decrement:type_name -> otg.PatternFlowUdpDstPortCounter - 1064, // 1264: otg.PatternFlowUdpDstPort.metric_tags:type_name -> otg.PatternFlowUdpDstPortMetricTag - 286, // 1265: otg.PatternFlowUdpLength.choice:type_name -> otg.PatternFlowUdpLength.Choice.Enum - 1066, // 1266: otg.PatternFlowUdpLength.increment:type_name -> otg.PatternFlowUdpLengthCounter - 1066, // 1267: otg.PatternFlowUdpLength.decrement:type_name -> otg.PatternFlowUdpLengthCounter - 1067, // 1268: otg.PatternFlowUdpLength.metric_tags:type_name -> otg.PatternFlowUdpLengthMetricTag - 287, // 1269: otg.PatternFlowUdpChecksum.choice:type_name -> otg.PatternFlowUdpChecksum.Choice.Enum - 288, // 1270: otg.PatternFlowUdpChecksum.generated:type_name -> otg.PatternFlowUdpChecksum.Generated.Enum - 289, // 1271: otg.PatternFlowGreChecksumPresent.choice:type_name -> otg.PatternFlowGreChecksumPresent.Choice.Enum - 1070, // 1272: otg.PatternFlowGreChecksumPresent.increment:type_name -> otg.PatternFlowGreChecksumPresentCounter - 1070, // 1273: otg.PatternFlowGreChecksumPresent.decrement:type_name -> otg.PatternFlowGreChecksumPresentCounter - 1071, // 1274: otg.PatternFlowGreChecksumPresent.metric_tags:type_name -> otg.PatternFlowGreChecksumPresentMetricTag - 290, // 1275: otg.PatternFlowGreReserved0.choice:type_name -> otg.PatternFlowGreReserved0.Choice.Enum - 1073, // 1276: otg.PatternFlowGreReserved0.increment:type_name -> otg.PatternFlowGreReserved0Counter - 1073, // 1277: otg.PatternFlowGreReserved0.decrement:type_name -> otg.PatternFlowGreReserved0Counter - 1074, // 1278: otg.PatternFlowGreReserved0.metric_tags:type_name -> otg.PatternFlowGreReserved0MetricTag - 291, // 1279: otg.PatternFlowGreVersion.choice:type_name -> otg.PatternFlowGreVersion.Choice.Enum - 1076, // 1280: otg.PatternFlowGreVersion.increment:type_name -> otg.PatternFlowGreVersionCounter - 1076, // 1281: otg.PatternFlowGreVersion.decrement:type_name -> otg.PatternFlowGreVersionCounter - 1077, // 1282: otg.PatternFlowGreVersion.metric_tags:type_name -> otg.PatternFlowGreVersionMetricTag - 292, // 1283: otg.PatternFlowGreProtocol.choice:type_name -> otg.PatternFlowGreProtocol.Choice.Enum - 1079, // 1284: otg.PatternFlowGreProtocol.increment:type_name -> otg.PatternFlowGreProtocolCounter - 1079, // 1285: otg.PatternFlowGreProtocol.decrement:type_name -> otg.PatternFlowGreProtocolCounter - 1080, // 1286: otg.PatternFlowGreProtocol.metric_tags:type_name -> otg.PatternFlowGreProtocolMetricTag - 293, // 1287: otg.PatternFlowGreChecksum.choice:type_name -> otg.PatternFlowGreChecksum.Choice.Enum - 294, // 1288: otg.PatternFlowGreChecksum.generated:type_name -> otg.PatternFlowGreChecksum.Generated.Enum - 295, // 1289: otg.PatternFlowGreReserved1.choice:type_name -> otg.PatternFlowGreReserved1.Choice.Enum - 1083, // 1290: otg.PatternFlowGreReserved1.increment:type_name -> otg.PatternFlowGreReserved1Counter - 1083, // 1291: otg.PatternFlowGreReserved1.decrement:type_name -> otg.PatternFlowGreReserved1Counter - 1084, // 1292: otg.PatternFlowGreReserved1.metric_tags:type_name -> otg.PatternFlowGreReserved1MetricTag - 296, // 1293: otg.PatternFlowGtpv1Version.choice:type_name -> otg.PatternFlowGtpv1Version.Choice.Enum - 1086, // 1294: otg.PatternFlowGtpv1Version.increment:type_name -> otg.PatternFlowGtpv1VersionCounter - 1086, // 1295: otg.PatternFlowGtpv1Version.decrement:type_name -> otg.PatternFlowGtpv1VersionCounter - 1087, // 1296: otg.PatternFlowGtpv1Version.metric_tags:type_name -> otg.PatternFlowGtpv1VersionMetricTag - 297, // 1297: otg.PatternFlowGtpv1ProtocolType.choice:type_name -> otg.PatternFlowGtpv1ProtocolType.Choice.Enum - 1089, // 1298: otg.PatternFlowGtpv1ProtocolType.increment:type_name -> otg.PatternFlowGtpv1ProtocolTypeCounter - 1089, // 1299: otg.PatternFlowGtpv1ProtocolType.decrement:type_name -> otg.PatternFlowGtpv1ProtocolTypeCounter - 1090, // 1300: otg.PatternFlowGtpv1ProtocolType.metric_tags:type_name -> otg.PatternFlowGtpv1ProtocolTypeMetricTag - 298, // 1301: otg.PatternFlowGtpv1Reserved.choice:type_name -> otg.PatternFlowGtpv1Reserved.Choice.Enum - 1092, // 1302: otg.PatternFlowGtpv1Reserved.increment:type_name -> otg.PatternFlowGtpv1ReservedCounter - 1092, // 1303: otg.PatternFlowGtpv1Reserved.decrement:type_name -> otg.PatternFlowGtpv1ReservedCounter - 1093, // 1304: otg.PatternFlowGtpv1Reserved.metric_tags:type_name -> otg.PatternFlowGtpv1ReservedMetricTag - 299, // 1305: otg.PatternFlowGtpv1EFlag.choice:type_name -> otg.PatternFlowGtpv1EFlag.Choice.Enum - 1095, // 1306: otg.PatternFlowGtpv1EFlag.increment:type_name -> otg.PatternFlowGtpv1EFlagCounter - 1095, // 1307: otg.PatternFlowGtpv1EFlag.decrement:type_name -> otg.PatternFlowGtpv1EFlagCounter - 1096, // 1308: otg.PatternFlowGtpv1EFlag.metric_tags:type_name -> otg.PatternFlowGtpv1EFlagMetricTag - 300, // 1309: otg.PatternFlowGtpv1SFlag.choice:type_name -> otg.PatternFlowGtpv1SFlag.Choice.Enum - 1098, // 1310: otg.PatternFlowGtpv1SFlag.increment:type_name -> otg.PatternFlowGtpv1SFlagCounter - 1098, // 1311: otg.PatternFlowGtpv1SFlag.decrement:type_name -> otg.PatternFlowGtpv1SFlagCounter - 1099, // 1312: otg.PatternFlowGtpv1SFlag.metric_tags:type_name -> otg.PatternFlowGtpv1SFlagMetricTag - 301, // 1313: otg.PatternFlowGtpv1PnFlag.choice:type_name -> otg.PatternFlowGtpv1PnFlag.Choice.Enum - 1101, // 1314: otg.PatternFlowGtpv1PnFlag.increment:type_name -> otg.PatternFlowGtpv1PnFlagCounter - 1101, // 1315: otg.PatternFlowGtpv1PnFlag.decrement:type_name -> otg.PatternFlowGtpv1PnFlagCounter - 1102, // 1316: otg.PatternFlowGtpv1PnFlag.metric_tags:type_name -> otg.PatternFlowGtpv1PnFlagMetricTag - 302, // 1317: otg.PatternFlowGtpv1MessageType.choice:type_name -> otg.PatternFlowGtpv1MessageType.Choice.Enum - 1104, // 1318: otg.PatternFlowGtpv1MessageType.increment:type_name -> otg.PatternFlowGtpv1MessageTypeCounter - 1104, // 1319: otg.PatternFlowGtpv1MessageType.decrement:type_name -> otg.PatternFlowGtpv1MessageTypeCounter - 1105, // 1320: otg.PatternFlowGtpv1MessageType.metric_tags:type_name -> otg.PatternFlowGtpv1MessageTypeMetricTag - 303, // 1321: otg.PatternFlowGtpv1MessageLength.choice:type_name -> otg.PatternFlowGtpv1MessageLength.Choice.Enum - 1107, // 1322: otg.PatternFlowGtpv1MessageLength.increment:type_name -> otg.PatternFlowGtpv1MessageLengthCounter - 1107, // 1323: otg.PatternFlowGtpv1MessageLength.decrement:type_name -> otg.PatternFlowGtpv1MessageLengthCounter - 1108, // 1324: otg.PatternFlowGtpv1MessageLength.metric_tags:type_name -> otg.PatternFlowGtpv1MessageLengthMetricTag - 304, // 1325: otg.PatternFlowGtpv1Teid.choice:type_name -> otg.PatternFlowGtpv1Teid.Choice.Enum - 1110, // 1326: otg.PatternFlowGtpv1Teid.increment:type_name -> otg.PatternFlowGtpv1TeidCounter - 1110, // 1327: otg.PatternFlowGtpv1Teid.decrement:type_name -> otg.PatternFlowGtpv1TeidCounter - 1111, // 1328: otg.PatternFlowGtpv1Teid.metric_tags:type_name -> otg.PatternFlowGtpv1TeidMetricTag - 305, // 1329: otg.PatternFlowGtpv1SquenceNumber.choice:type_name -> otg.PatternFlowGtpv1SquenceNumber.Choice.Enum - 1113, // 1330: otg.PatternFlowGtpv1SquenceNumber.increment:type_name -> otg.PatternFlowGtpv1SquenceNumberCounter - 1113, // 1331: otg.PatternFlowGtpv1SquenceNumber.decrement:type_name -> otg.PatternFlowGtpv1SquenceNumberCounter - 1114, // 1332: otg.PatternFlowGtpv1SquenceNumber.metric_tags:type_name -> otg.PatternFlowGtpv1SquenceNumberMetricTag - 306, // 1333: otg.PatternFlowGtpv1NPduNumber.choice:type_name -> otg.PatternFlowGtpv1NPduNumber.Choice.Enum - 1116, // 1334: otg.PatternFlowGtpv1NPduNumber.increment:type_name -> otg.PatternFlowGtpv1NPduNumberCounter - 1116, // 1335: otg.PatternFlowGtpv1NPduNumber.decrement:type_name -> otg.PatternFlowGtpv1NPduNumberCounter - 1117, // 1336: otg.PatternFlowGtpv1NPduNumber.metric_tags:type_name -> otg.PatternFlowGtpv1NPduNumberMetricTag - 307, // 1337: otg.PatternFlowGtpv1NextExtensionHeaderType.choice:type_name -> otg.PatternFlowGtpv1NextExtensionHeaderType.Choice.Enum - 1119, // 1338: otg.PatternFlowGtpv1NextExtensionHeaderType.increment:type_name -> otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter - 1119, // 1339: otg.PatternFlowGtpv1NextExtensionHeaderType.decrement:type_name -> otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter - 1120, // 1340: otg.PatternFlowGtpv1NextExtensionHeaderType.metric_tags:type_name -> otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag - 308, // 1341: otg.PatternFlowGtpExtensionExtensionLength.choice:type_name -> otg.PatternFlowGtpExtensionExtensionLength.Choice.Enum - 1122, // 1342: otg.PatternFlowGtpExtensionExtensionLength.increment:type_name -> otg.PatternFlowGtpExtensionExtensionLengthCounter - 1122, // 1343: otg.PatternFlowGtpExtensionExtensionLength.decrement:type_name -> otg.PatternFlowGtpExtensionExtensionLengthCounter - 1123, // 1344: otg.PatternFlowGtpExtensionExtensionLength.metric_tags:type_name -> otg.PatternFlowGtpExtensionExtensionLengthMetricTag - 309, // 1345: otg.PatternFlowGtpExtensionContents.choice:type_name -> otg.PatternFlowGtpExtensionContents.Choice.Enum - 1125, // 1346: otg.PatternFlowGtpExtensionContents.increment:type_name -> otg.PatternFlowGtpExtensionContentsCounter - 1125, // 1347: otg.PatternFlowGtpExtensionContents.decrement:type_name -> otg.PatternFlowGtpExtensionContentsCounter - 1126, // 1348: otg.PatternFlowGtpExtensionContents.metric_tags:type_name -> otg.PatternFlowGtpExtensionContentsMetricTag - 310, // 1349: otg.PatternFlowGtpExtensionNextExtensionHeader.choice:type_name -> otg.PatternFlowGtpExtensionNextExtensionHeader.Choice.Enum - 1128, // 1350: otg.PatternFlowGtpExtensionNextExtensionHeader.increment:type_name -> otg.PatternFlowGtpExtensionNextExtensionHeaderCounter - 1128, // 1351: otg.PatternFlowGtpExtensionNextExtensionHeader.decrement:type_name -> otg.PatternFlowGtpExtensionNextExtensionHeaderCounter - 1129, // 1352: otg.PatternFlowGtpExtensionNextExtensionHeader.metric_tags:type_name -> otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag - 311, // 1353: otg.PatternFlowGtpv2Version.choice:type_name -> otg.PatternFlowGtpv2Version.Choice.Enum - 1131, // 1354: otg.PatternFlowGtpv2Version.increment:type_name -> otg.PatternFlowGtpv2VersionCounter - 1131, // 1355: otg.PatternFlowGtpv2Version.decrement:type_name -> otg.PatternFlowGtpv2VersionCounter - 1132, // 1356: otg.PatternFlowGtpv2Version.metric_tags:type_name -> otg.PatternFlowGtpv2VersionMetricTag - 312, // 1357: otg.PatternFlowGtpv2PiggybackingFlag.choice:type_name -> otg.PatternFlowGtpv2PiggybackingFlag.Choice.Enum - 1134, // 1358: otg.PatternFlowGtpv2PiggybackingFlag.increment:type_name -> otg.PatternFlowGtpv2PiggybackingFlagCounter - 1134, // 1359: otg.PatternFlowGtpv2PiggybackingFlag.decrement:type_name -> otg.PatternFlowGtpv2PiggybackingFlagCounter - 1135, // 1360: otg.PatternFlowGtpv2PiggybackingFlag.metric_tags:type_name -> otg.PatternFlowGtpv2PiggybackingFlagMetricTag - 313, // 1361: otg.PatternFlowGtpv2TeidFlag.choice:type_name -> otg.PatternFlowGtpv2TeidFlag.Choice.Enum - 1137, // 1362: otg.PatternFlowGtpv2TeidFlag.increment:type_name -> otg.PatternFlowGtpv2TeidFlagCounter - 1137, // 1363: otg.PatternFlowGtpv2TeidFlag.decrement:type_name -> otg.PatternFlowGtpv2TeidFlagCounter - 1138, // 1364: otg.PatternFlowGtpv2TeidFlag.metric_tags:type_name -> otg.PatternFlowGtpv2TeidFlagMetricTag - 314, // 1365: otg.PatternFlowGtpv2Spare1.choice:type_name -> otg.PatternFlowGtpv2Spare1.Choice.Enum - 1140, // 1366: otg.PatternFlowGtpv2Spare1.increment:type_name -> otg.PatternFlowGtpv2Spare1Counter - 1140, // 1367: otg.PatternFlowGtpv2Spare1.decrement:type_name -> otg.PatternFlowGtpv2Spare1Counter - 1141, // 1368: otg.PatternFlowGtpv2Spare1.metric_tags:type_name -> otg.PatternFlowGtpv2Spare1MetricTag - 315, // 1369: otg.PatternFlowGtpv2MessageType.choice:type_name -> otg.PatternFlowGtpv2MessageType.Choice.Enum - 1143, // 1370: otg.PatternFlowGtpv2MessageType.increment:type_name -> otg.PatternFlowGtpv2MessageTypeCounter - 1143, // 1371: otg.PatternFlowGtpv2MessageType.decrement:type_name -> otg.PatternFlowGtpv2MessageTypeCounter - 1144, // 1372: otg.PatternFlowGtpv2MessageType.metric_tags:type_name -> otg.PatternFlowGtpv2MessageTypeMetricTag - 316, // 1373: otg.PatternFlowGtpv2MessageLength.choice:type_name -> otg.PatternFlowGtpv2MessageLength.Choice.Enum - 1146, // 1374: otg.PatternFlowGtpv2MessageLength.increment:type_name -> otg.PatternFlowGtpv2MessageLengthCounter - 1146, // 1375: otg.PatternFlowGtpv2MessageLength.decrement:type_name -> otg.PatternFlowGtpv2MessageLengthCounter - 1147, // 1376: otg.PatternFlowGtpv2MessageLength.metric_tags:type_name -> otg.PatternFlowGtpv2MessageLengthMetricTag - 317, // 1377: otg.PatternFlowGtpv2Teid.choice:type_name -> otg.PatternFlowGtpv2Teid.Choice.Enum - 1149, // 1378: otg.PatternFlowGtpv2Teid.increment:type_name -> otg.PatternFlowGtpv2TeidCounter - 1149, // 1379: otg.PatternFlowGtpv2Teid.decrement:type_name -> otg.PatternFlowGtpv2TeidCounter - 1150, // 1380: otg.PatternFlowGtpv2Teid.metric_tags:type_name -> otg.PatternFlowGtpv2TeidMetricTag - 318, // 1381: otg.PatternFlowGtpv2SequenceNumber.choice:type_name -> otg.PatternFlowGtpv2SequenceNumber.Choice.Enum - 1152, // 1382: otg.PatternFlowGtpv2SequenceNumber.increment:type_name -> otg.PatternFlowGtpv2SequenceNumberCounter - 1152, // 1383: otg.PatternFlowGtpv2SequenceNumber.decrement:type_name -> otg.PatternFlowGtpv2SequenceNumberCounter - 1153, // 1384: otg.PatternFlowGtpv2SequenceNumber.metric_tags:type_name -> otg.PatternFlowGtpv2SequenceNumberMetricTag - 319, // 1385: otg.PatternFlowGtpv2Spare2.choice:type_name -> otg.PatternFlowGtpv2Spare2.Choice.Enum - 1155, // 1386: otg.PatternFlowGtpv2Spare2.increment:type_name -> otg.PatternFlowGtpv2Spare2Counter - 1155, // 1387: otg.PatternFlowGtpv2Spare2.decrement:type_name -> otg.PatternFlowGtpv2Spare2Counter - 1156, // 1388: otg.PatternFlowGtpv2Spare2.metric_tags:type_name -> otg.PatternFlowGtpv2Spare2MetricTag - 320, // 1389: otg.PatternFlowArpHardwareType.choice:type_name -> otg.PatternFlowArpHardwareType.Choice.Enum - 1158, // 1390: otg.PatternFlowArpHardwareType.increment:type_name -> otg.PatternFlowArpHardwareTypeCounter - 1158, // 1391: otg.PatternFlowArpHardwareType.decrement:type_name -> otg.PatternFlowArpHardwareTypeCounter - 1159, // 1392: otg.PatternFlowArpHardwareType.metric_tags:type_name -> otg.PatternFlowArpHardwareTypeMetricTag - 321, // 1393: otg.PatternFlowArpProtocolType.choice:type_name -> otg.PatternFlowArpProtocolType.Choice.Enum - 1161, // 1394: otg.PatternFlowArpProtocolType.increment:type_name -> otg.PatternFlowArpProtocolTypeCounter - 1161, // 1395: otg.PatternFlowArpProtocolType.decrement:type_name -> otg.PatternFlowArpProtocolTypeCounter - 1162, // 1396: otg.PatternFlowArpProtocolType.metric_tags:type_name -> otg.PatternFlowArpProtocolTypeMetricTag - 322, // 1397: otg.PatternFlowArpHardwareLength.choice:type_name -> otg.PatternFlowArpHardwareLength.Choice.Enum - 1164, // 1398: otg.PatternFlowArpHardwareLength.increment:type_name -> otg.PatternFlowArpHardwareLengthCounter - 1164, // 1399: otg.PatternFlowArpHardwareLength.decrement:type_name -> otg.PatternFlowArpHardwareLengthCounter - 1165, // 1400: otg.PatternFlowArpHardwareLength.metric_tags:type_name -> otg.PatternFlowArpHardwareLengthMetricTag - 323, // 1401: otg.PatternFlowArpProtocolLength.choice:type_name -> otg.PatternFlowArpProtocolLength.Choice.Enum - 1167, // 1402: otg.PatternFlowArpProtocolLength.increment:type_name -> otg.PatternFlowArpProtocolLengthCounter - 1167, // 1403: otg.PatternFlowArpProtocolLength.decrement:type_name -> otg.PatternFlowArpProtocolLengthCounter - 1168, // 1404: otg.PatternFlowArpProtocolLength.metric_tags:type_name -> otg.PatternFlowArpProtocolLengthMetricTag - 324, // 1405: otg.PatternFlowArpOperation.choice:type_name -> otg.PatternFlowArpOperation.Choice.Enum - 1170, // 1406: otg.PatternFlowArpOperation.increment:type_name -> otg.PatternFlowArpOperationCounter - 1170, // 1407: otg.PatternFlowArpOperation.decrement:type_name -> otg.PatternFlowArpOperationCounter - 1171, // 1408: otg.PatternFlowArpOperation.metric_tags:type_name -> otg.PatternFlowArpOperationMetricTag - 325, // 1409: otg.PatternFlowArpSenderHardwareAddr.choice:type_name -> otg.PatternFlowArpSenderHardwareAddr.Choice.Enum - 1173, // 1410: otg.PatternFlowArpSenderHardwareAddr.increment:type_name -> otg.PatternFlowArpSenderHardwareAddrCounter - 1173, // 1411: otg.PatternFlowArpSenderHardwareAddr.decrement:type_name -> otg.PatternFlowArpSenderHardwareAddrCounter - 1174, // 1412: otg.PatternFlowArpSenderHardwareAddr.metric_tags:type_name -> otg.PatternFlowArpSenderHardwareAddrMetricTag - 326, // 1413: otg.PatternFlowArpSenderProtocolAddr.choice:type_name -> otg.PatternFlowArpSenderProtocolAddr.Choice.Enum - 1176, // 1414: otg.PatternFlowArpSenderProtocolAddr.increment:type_name -> otg.PatternFlowArpSenderProtocolAddrCounter - 1176, // 1415: otg.PatternFlowArpSenderProtocolAddr.decrement:type_name -> otg.PatternFlowArpSenderProtocolAddrCounter - 1177, // 1416: otg.PatternFlowArpSenderProtocolAddr.metric_tags:type_name -> otg.PatternFlowArpSenderProtocolAddrMetricTag - 327, // 1417: otg.PatternFlowArpTargetHardwareAddr.choice:type_name -> otg.PatternFlowArpTargetHardwareAddr.Choice.Enum - 1179, // 1418: otg.PatternFlowArpTargetHardwareAddr.increment:type_name -> otg.PatternFlowArpTargetHardwareAddrCounter - 1179, // 1419: otg.PatternFlowArpTargetHardwareAddr.decrement:type_name -> otg.PatternFlowArpTargetHardwareAddrCounter - 1180, // 1420: otg.PatternFlowArpTargetHardwareAddr.metric_tags:type_name -> otg.PatternFlowArpTargetHardwareAddrMetricTag - 328, // 1421: otg.PatternFlowArpTargetProtocolAddr.choice:type_name -> otg.PatternFlowArpTargetProtocolAddr.Choice.Enum - 1182, // 1422: otg.PatternFlowArpTargetProtocolAddr.increment:type_name -> otg.PatternFlowArpTargetProtocolAddrCounter - 1182, // 1423: otg.PatternFlowArpTargetProtocolAddr.decrement:type_name -> otg.PatternFlowArpTargetProtocolAddrCounter - 1183, // 1424: otg.PatternFlowArpTargetProtocolAddr.metric_tags:type_name -> otg.PatternFlowArpTargetProtocolAddrMetricTag - 329, // 1425: otg.PatternFlowIcmpEchoType.choice:type_name -> otg.PatternFlowIcmpEchoType.Choice.Enum - 1185, // 1426: otg.PatternFlowIcmpEchoType.increment:type_name -> otg.PatternFlowIcmpEchoTypeCounter - 1185, // 1427: otg.PatternFlowIcmpEchoType.decrement:type_name -> otg.PatternFlowIcmpEchoTypeCounter - 1186, // 1428: otg.PatternFlowIcmpEchoType.metric_tags:type_name -> otg.PatternFlowIcmpEchoTypeMetricTag - 330, // 1429: otg.PatternFlowIcmpEchoCode.choice:type_name -> otg.PatternFlowIcmpEchoCode.Choice.Enum - 1188, // 1430: otg.PatternFlowIcmpEchoCode.increment:type_name -> otg.PatternFlowIcmpEchoCodeCounter - 1188, // 1431: otg.PatternFlowIcmpEchoCode.decrement:type_name -> otg.PatternFlowIcmpEchoCodeCounter - 1189, // 1432: otg.PatternFlowIcmpEchoCode.metric_tags:type_name -> otg.PatternFlowIcmpEchoCodeMetricTag - 331, // 1433: otg.PatternFlowIcmpEchoChecksum.choice:type_name -> otg.PatternFlowIcmpEchoChecksum.Choice.Enum - 332, // 1434: otg.PatternFlowIcmpEchoChecksum.generated:type_name -> otg.PatternFlowIcmpEchoChecksum.Generated.Enum - 333, // 1435: otg.PatternFlowIcmpEchoIdentifier.choice:type_name -> otg.PatternFlowIcmpEchoIdentifier.Choice.Enum - 1192, // 1436: otg.PatternFlowIcmpEchoIdentifier.increment:type_name -> otg.PatternFlowIcmpEchoIdentifierCounter - 1192, // 1437: otg.PatternFlowIcmpEchoIdentifier.decrement:type_name -> otg.PatternFlowIcmpEchoIdentifierCounter - 1193, // 1438: otg.PatternFlowIcmpEchoIdentifier.metric_tags:type_name -> otg.PatternFlowIcmpEchoIdentifierMetricTag - 334, // 1439: otg.PatternFlowIcmpEchoSequenceNumber.choice:type_name -> otg.PatternFlowIcmpEchoSequenceNumber.Choice.Enum - 1195, // 1440: otg.PatternFlowIcmpEchoSequenceNumber.increment:type_name -> otg.PatternFlowIcmpEchoSequenceNumberCounter - 1195, // 1441: otg.PatternFlowIcmpEchoSequenceNumber.decrement:type_name -> otg.PatternFlowIcmpEchoSequenceNumberCounter - 1196, // 1442: otg.PatternFlowIcmpEchoSequenceNumber.metric_tags:type_name -> otg.PatternFlowIcmpEchoSequenceNumberMetricTag - 335, // 1443: otg.PatternFlowIcmpCommonChecksum.choice:type_name -> otg.PatternFlowIcmpCommonChecksum.Choice.Enum - 336, // 1444: otg.PatternFlowIcmpCommonChecksum.generated:type_name -> otg.PatternFlowIcmpCommonChecksum.Generated.Enum - 337, // 1445: otg.PatternFlowIcmpNextFieldsIdentifier.choice:type_name -> otg.PatternFlowIcmpNextFieldsIdentifier.Choice.Enum - 1199, // 1446: otg.PatternFlowIcmpNextFieldsIdentifier.increment:type_name -> otg.PatternFlowIcmpNextFieldsIdentifierCounter - 1199, // 1447: otg.PatternFlowIcmpNextFieldsIdentifier.decrement:type_name -> otg.PatternFlowIcmpNextFieldsIdentifierCounter - 1200, // 1448: otg.PatternFlowIcmpNextFieldsIdentifier.metric_tags:type_name -> otg.PatternFlowIcmpNextFieldsIdentifierMetricTag - 338, // 1449: otg.PatternFlowIcmpNextFieldsSequenceNumber.choice:type_name -> otg.PatternFlowIcmpNextFieldsSequenceNumber.Choice.Enum - 1202, // 1450: otg.PatternFlowIcmpNextFieldsSequenceNumber.increment:type_name -> otg.PatternFlowIcmpNextFieldsSequenceNumberCounter - 1202, // 1451: otg.PatternFlowIcmpNextFieldsSequenceNumber.decrement:type_name -> otg.PatternFlowIcmpNextFieldsSequenceNumberCounter - 1203, // 1452: otg.PatternFlowIcmpNextFieldsSequenceNumber.metric_tags:type_name -> otg.PatternFlowIcmpNextFieldsSequenceNumberMetricTag - 339, // 1453: otg.PatternFlowIcmpv6EchoType.choice:type_name -> otg.PatternFlowIcmpv6EchoType.Choice.Enum - 1205, // 1454: otg.PatternFlowIcmpv6EchoType.increment:type_name -> otg.PatternFlowIcmpv6EchoTypeCounter - 1205, // 1455: otg.PatternFlowIcmpv6EchoType.decrement:type_name -> otg.PatternFlowIcmpv6EchoTypeCounter - 1206, // 1456: otg.PatternFlowIcmpv6EchoType.metric_tags:type_name -> otg.PatternFlowIcmpv6EchoTypeMetricTag - 340, // 1457: otg.PatternFlowIcmpv6EchoCode.choice:type_name -> otg.PatternFlowIcmpv6EchoCode.Choice.Enum - 1208, // 1458: otg.PatternFlowIcmpv6EchoCode.increment:type_name -> otg.PatternFlowIcmpv6EchoCodeCounter - 1208, // 1459: otg.PatternFlowIcmpv6EchoCode.decrement:type_name -> otg.PatternFlowIcmpv6EchoCodeCounter - 1209, // 1460: otg.PatternFlowIcmpv6EchoCode.metric_tags:type_name -> otg.PatternFlowIcmpv6EchoCodeMetricTag - 341, // 1461: otg.PatternFlowIcmpv6EchoIdentifier.choice:type_name -> otg.PatternFlowIcmpv6EchoIdentifier.Choice.Enum - 1211, // 1462: otg.PatternFlowIcmpv6EchoIdentifier.increment:type_name -> otg.PatternFlowIcmpv6EchoIdentifierCounter - 1211, // 1463: otg.PatternFlowIcmpv6EchoIdentifier.decrement:type_name -> otg.PatternFlowIcmpv6EchoIdentifierCounter - 1212, // 1464: otg.PatternFlowIcmpv6EchoIdentifier.metric_tags:type_name -> otg.PatternFlowIcmpv6EchoIdentifierMetricTag - 342, // 1465: otg.PatternFlowIcmpv6EchoSequenceNumber.choice:type_name -> otg.PatternFlowIcmpv6EchoSequenceNumber.Choice.Enum - 1214, // 1466: otg.PatternFlowIcmpv6EchoSequenceNumber.increment:type_name -> otg.PatternFlowIcmpv6EchoSequenceNumberCounter - 1214, // 1467: otg.PatternFlowIcmpv6EchoSequenceNumber.decrement:type_name -> otg.PatternFlowIcmpv6EchoSequenceNumberCounter - 1215, // 1468: otg.PatternFlowIcmpv6EchoSequenceNumber.metric_tags:type_name -> otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag - 343, // 1469: otg.PatternFlowIcmpv6EchoChecksum.choice:type_name -> otg.PatternFlowIcmpv6EchoChecksum.Choice.Enum - 344, // 1470: otg.PatternFlowIcmpv6EchoChecksum.generated:type_name -> otg.PatternFlowIcmpv6EchoChecksum.Generated.Enum - 345, // 1471: otg.PatternFlowIcmpv6CommonChecksum.choice:type_name -> otg.PatternFlowIcmpv6CommonChecksum.Choice.Enum - 346, // 1472: otg.PatternFlowIcmpv6CommonChecksum.generated:type_name -> otg.PatternFlowIcmpv6CommonChecksum.Generated.Enum - 347, // 1473: otg.PatternFlowPppAddress.choice:type_name -> otg.PatternFlowPppAddress.Choice.Enum - 1219, // 1474: otg.PatternFlowPppAddress.increment:type_name -> otg.PatternFlowPppAddressCounter - 1219, // 1475: otg.PatternFlowPppAddress.decrement:type_name -> otg.PatternFlowPppAddressCounter - 1220, // 1476: otg.PatternFlowPppAddress.metric_tags:type_name -> otg.PatternFlowPppAddressMetricTag - 348, // 1477: otg.PatternFlowPppControl.choice:type_name -> otg.PatternFlowPppControl.Choice.Enum - 1222, // 1478: otg.PatternFlowPppControl.increment:type_name -> otg.PatternFlowPppControlCounter - 1222, // 1479: otg.PatternFlowPppControl.decrement:type_name -> otg.PatternFlowPppControlCounter - 1223, // 1480: otg.PatternFlowPppControl.metric_tags:type_name -> otg.PatternFlowPppControlMetricTag - 349, // 1481: otg.PatternFlowPppProtocolType.choice:type_name -> otg.PatternFlowPppProtocolType.Choice.Enum - 1225, // 1482: otg.PatternFlowPppProtocolType.increment:type_name -> otg.PatternFlowPppProtocolTypeCounter - 1225, // 1483: otg.PatternFlowPppProtocolType.decrement:type_name -> otg.PatternFlowPppProtocolTypeCounter - 1226, // 1484: otg.PatternFlowPppProtocolType.metric_tags:type_name -> otg.PatternFlowPppProtocolTypeMetricTag - 350, // 1485: otg.PatternFlowIgmpv1Version.choice:type_name -> otg.PatternFlowIgmpv1Version.Choice.Enum - 1228, // 1486: otg.PatternFlowIgmpv1Version.increment:type_name -> otg.PatternFlowIgmpv1VersionCounter - 1228, // 1487: otg.PatternFlowIgmpv1Version.decrement:type_name -> otg.PatternFlowIgmpv1VersionCounter - 1229, // 1488: otg.PatternFlowIgmpv1Version.metric_tags:type_name -> otg.PatternFlowIgmpv1VersionMetricTag - 351, // 1489: otg.PatternFlowIgmpv1Type.choice:type_name -> otg.PatternFlowIgmpv1Type.Choice.Enum - 1231, // 1490: otg.PatternFlowIgmpv1Type.increment:type_name -> otg.PatternFlowIgmpv1TypeCounter - 1231, // 1491: otg.PatternFlowIgmpv1Type.decrement:type_name -> otg.PatternFlowIgmpv1TypeCounter - 1232, // 1492: otg.PatternFlowIgmpv1Type.metric_tags:type_name -> otg.PatternFlowIgmpv1TypeMetricTag - 352, // 1493: otg.PatternFlowIgmpv1Unused.choice:type_name -> otg.PatternFlowIgmpv1Unused.Choice.Enum - 1234, // 1494: otg.PatternFlowIgmpv1Unused.increment:type_name -> otg.PatternFlowIgmpv1UnusedCounter - 1234, // 1495: otg.PatternFlowIgmpv1Unused.decrement:type_name -> otg.PatternFlowIgmpv1UnusedCounter - 1235, // 1496: otg.PatternFlowIgmpv1Unused.metric_tags:type_name -> otg.PatternFlowIgmpv1UnusedMetricTag - 353, // 1497: otg.PatternFlowIgmpv1Checksum.choice:type_name -> otg.PatternFlowIgmpv1Checksum.Choice.Enum - 354, // 1498: otg.PatternFlowIgmpv1Checksum.generated:type_name -> otg.PatternFlowIgmpv1Checksum.Generated.Enum - 355, // 1499: otg.PatternFlowIgmpv1GroupAddress.choice:type_name -> otg.PatternFlowIgmpv1GroupAddress.Choice.Enum - 1238, // 1500: otg.PatternFlowIgmpv1GroupAddress.increment:type_name -> otg.PatternFlowIgmpv1GroupAddressCounter - 1238, // 1501: otg.PatternFlowIgmpv1GroupAddress.decrement:type_name -> otg.PatternFlowIgmpv1GroupAddressCounter - 1239, // 1502: otg.PatternFlowIgmpv1GroupAddress.metric_tags:type_name -> otg.PatternFlowIgmpv1GroupAddressMetricTag - 356, // 1503: otg.PatternFlowMplsLabel.choice:type_name -> otg.PatternFlowMplsLabel.Choice.Enum - 1241, // 1504: otg.PatternFlowMplsLabel.increment:type_name -> otg.PatternFlowMplsLabelCounter - 1241, // 1505: otg.PatternFlowMplsLabel.decrement:type_name -> otg.PatternFlowMplsLabelCounter - 1242, // 1506: otg.PatternFlowMplsLabel.metric_tags:type_name -> otg.PatternFlowMplsLabelMetricTag - 357, // 1507: otg.PatternFlowMplsTrafficClass.choice:type_name -> otg.PatternFlowMplsTrafficClass.Choice.Enum - 1244, // 1508: otg.PatternFlowMplsTrafficClass.increment:type_name -> otg.PatternFlowMplsTrafficClassCounter - 1244, // 1509: otg.PatternFlowMplsTrafficClass.decrement:type_name -> otg.PatternFlowMplsTrafficClassCounter - 1245, // 1510: otg.PatternFlowMplsTrafficClass.metric_tags:type_name -> otg.PatternFlowMplsTrafficClassMetricTag - 358, // 1511: otg.PatternFlowMplsBottomOfStack.choice:type_name -> otg.PatternFlowMplsBottomOfStack.Choice.Enum - 1247, // 1512: otg.PatternFlowMplsBottomOfStack.increment:type_name -> otg.PatternFlowMplsBottomOfStackCounter - 1247, // 1513: otg.PatternFlowMplsBottomOfStack.decrement:type_name -> otg.PatternFlowMplsBottomOfStackCounter - 1248, // 1514: otg.PatternFlowMplsBottomOfStack.metric_tags:type_name -> otg.PatternFlowMplsBottomOfStackMetricTag - 359, // 1515: otg.PatternFlowMplsTimeToLive.choice:type_name -> otg.PatternFlowMplsTimeToLive.Choice.Enum - 1250, // 1516: otg.PatternFlowMplsTimeToLive.increment:type_name -> otg.PatternFlowMplsTimeToLiveCounter - 1250, // 1517: otg.PatternFlowMplsTimeToLive.decrement:type_name -> otg.PatternFlowMplsTimeToLiveCounter - 1251, // 1518: otg.PatternFlowMplsTimeToLive.metric_tags:type_name -> otg.PatternFlowMplsTimeToLiveMetricTag - 360, // 1519: otg.PatternFlowSnmpv2cVersion.choice:type_name -> otg.PatternFlowSnmpv2cVersion.Choice.Enum - 1253, // 1520: otg.PatternFlowSnmpv2cVersion.increment:type_name -> otg.PatternFlowSnmpv2cVersionCounter - 1253, // 1521: otg.PatternFlowSnmpv2cVersion.decrement:type_name -> otg.PatternFlowSnmpv2cVersionCounter - 361, // 1522: otg.PatternFlowSnmpv2cPDURequestId.choice:type_name -> otg.PatternFlowSnmpv2cPDURequestId.Choice.Enum - 1255, // 1523: otg.PatternFlowSnmpv2cPDURequestId.increment:type_name -> otg.PatternFlowSnmpv2cPDURequestIdCounter - 1255, // 1524: otg.PatternFlowSnmpv2cPDURequestId.decrement:type_name -> otg.PatternFlowSnmpv2cPDURequestIdCounter - 362, // 1525: otg.PatternFlowSnmpv2cPDUErrorIndex.choice:type_name -> otg.PatternFlowSnmpv2cPDUErrorIndex.Choice.Enum - 1257, // 1526: otg.PatternFlowSnmpv2cPDUErrorIndex.increment:type_name -> otg.PatternFlowSnmpv2cPDUErrorIndexCounter - 1257, // 1527: otg.PatternFlowSnmpv2cPDUErrorIndex.decrement:type_name -> otg.PatternFlowSnmpv2cPDUErrorIndexCounter - 363, // 1528: otg.PatternFlowSnmpv2cBulkPDURequestId.choice:type_name -> otg.PatternFlowSnmpv2cBulkPDURequestId.Choice.Enum - 1259, // 1529: otg.PatternFlowSnmpv2cBulkPDURequestId.increment:type_name -> otg.PatternFlowSnmpv2cBulkPDURequestIdCounter - 1259, // 1530: otg.PatternFlowSnmpv2cBulkPDURequestId.decrement:type_name -> otg.PatternFlowSnmpv2cBulkPDURequestIdCounter - 364, // 1531: otg.PatternFlowSnmpv2cBulkPDUNonRepeaters.choice:type_name -> otg.PatternFlowSnmpv2cBulkPDUNonRepeaters.Choice.Enum - 365, // 1532: otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions.choice:type_name -> otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions.Choice.Enum - 1262, // 1533: otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions.increment:type_name -> otg.PatternFlowSnmpv2cBulkPDUMaxRepetitionsCounter - 1262, // 1534: otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions.decrement:type_name -> otg.PatternFlowSnmpv2cBulkPDUMaxRepetitionsCounter - 366, // 1535: otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue.choice:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue.Choice.Enum - 1264, // 1536: otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue.increment:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIntegerValueCounter - 1264, // 1537: otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue.decrement:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIntegerValueCounter - 367, // 1538: otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue.choice:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue.Choice.Enum - 1266, // 1539: otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue.increment:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValueCounter - 1266, // 1540: otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue.decrement:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValueCounter - 368, // 1541: otg.PatternFlowSnmpv2cVariableBindingValueCounterValue.choice:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueCounterValue.Choice.Enum - 1268, // 1542: otg.PatternFlowSnmpv2cVariableBindingValueCounterValue.increment:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueCounterValueCounter - 1268, // 1543: otg.PatternFlowSnmpv2cVariableBindingValueCounterValue.decrement:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueCounterValueCounter - 369, // 1544: otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue.choice:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue.Choice.Enum - 1270, // 1545: otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue.increment:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValueCounter - 1270, // 1546: otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue.decrement:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValueCounter - 370, // 1547: otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue.choice:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue.Choice.Enum - 1272, // 1548: otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue.increment:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValueCounter - 1272, // 1549: otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue.decrement:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValueCounter - 371, // 1550: otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue.choice:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue.Choice.Enum - 1274, // 1551: otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue.increment:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValueCounter - 1274, // 1552: otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue.decrement:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValueCounter - 372, // 1553: otg.PatternFlowSnmpv2cCommonRequestId.choice:type_name -> otg.PatternFlowSnmpv2cCommonRequestId.Choice.Enum - 1276, // 1554: otg.PatternFlowSnmpv2cCommonRequestId.increment:type_name -> otg.PatternFlowSnmpv2cCommonRequestIdCounter - 1276, // 1555: otg.PatternFlowSnmpv2cCommonRequestId.decrement:type_name -> otg.PatternFlowSnmpv2cCommonRequestIdCounter - 373, // 1556: otg.PatternFlowRsvpRsvpChecksum.choice:type_name -> otg.PatternFlowRsvpRsvpChecksum.Choice.Enum - 374, // 1557: otg.PatternFlowRsvpRsvpChecksum.generated:type_name -> otg.PatternFlowRsvpRsvpChecksum.Generated.Enum - 375, // 1558: otg.PatternFlowRsvpTimeToLive.choice:type_name -> otg.PatternFlowRsvpTimeToLive.Choice.Enum - 1279, // 1559: otg.PatternFlowRsvpTimeToLive.increment:type_name -> otg.PatternFlowRsvpTimeToLiveCounter - 1279, // 1560: otg.PatternFlowRsvpTimeToLive.decrement:type_name -> otg.PatternFlowRsvpTimeToLiveCounter - 376, // 1561: otg.PatternFlowRsvpReserved.choice:type_name -> otg.PatternFlowRsvpReserved.Choice.Enum - 1281, // 1562: otg.PatternFlowRsvpReserved.increment:type_name -> otg.PatternFlowRsvpReservedCounter - 1281, // 1563: otg.PatternFlowRsvpReserved.decrement:type_name -> otg.PatternFlowRsvpReservedCounter - 377, // 1564: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.choice:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.Choice.Enum - 1283, // 1565: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.increment:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter - 1283, // 1566: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.decrement:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter - 378, // 1567: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.choice:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.Choice.Enum - 1285, // 1568: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.increment:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter - 1285, // 1569: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.decrement:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter - 379, // 1570: otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.choice:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.Choice.Enum - 1287, // 1571: otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.increment:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter - 1287, // 1572: otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.decrement:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter - 380, // 1573: otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger.choice:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger.Choice.Enum - 1289, // 1574: otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger.increment:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter - 1289, // 1575: otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger.decrement:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter - 381, // 1576: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.choice:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.Choice.Enum - 1291, // 1577: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.increment:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter - 1291, // 1578: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.decrement:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter - 382, // 1579: otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.choice:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.Choice.Enum - 1293, // 1580: otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.increment:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter - 1293, // 1581: otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.decrement:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter - 383, // 1582: otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle.choice:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle.Choice.Enum - 1295, // 1583: otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle.increment:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter - 1295, // 1584: otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle.decrement:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter - 384, // 1585: otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR.choice:type_name -> otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR.Choice.Enum - 1297, // 1586: otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR.increment:type_name -> otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter - 1297, // 1587: otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR.decrement:type_name -> otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter - 385, // 1588: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.choice:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.Choice.Enum - 1299, // 1589: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.increment:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter - 1299, // 1590: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.decrement:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter - 386, // 1591: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.choice:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.Choice.Enum - 1301, // 1592: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.increment:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter - 1301, // 1593: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.decrement:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter - 387, // 1594: otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.choice:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.Choice.Enum - 1303, // 1595: otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.increment:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter - 1303, // 1596: otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.decrement:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter - 388, // 1597: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.choice:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.Choice.Enum - 1305, // 1598: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.increment:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter - 1305, // 1599: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.decrement:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter - 389, // 1600: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid.choice:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid.Choice.Enum - 1307, // 1601: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid.increment:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pidCounter - 1307, // 1602: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid.decrement:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pidCounter - 390, // 1603: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.choice:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.Choice.Enum - 1309, // 1604: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.increment:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter - 1309, // 1605: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.decrement:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter - 391, // 1606: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.choice:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.Choice.Enum - 1311, // 1607: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.increment:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter - 1311, // 1608: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.decrement:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter - 392, // 1609: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.choice:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.Choice.Enum - 1313, // 1610: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.increment:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter - 1313, // 1611: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.decrement:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter - 393, // 1612: otg.PatternFlowRSVPPathSenderTspecIntServVersion.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServVersion.Choice.Enum - 1315, // 1613: otg.PatternFlowRSVPPathSenderTspecIntServVersion.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter - 1315, // 1614: otg.PatternFlowRSVPPathSenderTspecIntServVersion.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter - 394, // 1615: otg.PatternFlowRSVPPathSenderTspecIntServReserved1.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved1.Choice.Enum - 1317, // 1616: otg.PatternFlowRSVPPathSenderTspecIntServReserved1.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter - 1317, // 1617: otg.PatternFlowRSVPPathSenderTspecIntServReserved1.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter - 395, // 1618: otg.PatternFlowRSVPPathSenderTspecIntServOverallLength.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServOverallLength.Choice.Enum - 1319, // 1619: otg.PatternFlowRSVPPathSenderTspecIntServOverallLength.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter - 1319, // 1620: otg.PatternFlowRSVPPathSenderTspecIntServOverallLength.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter - 396, // 1621: otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader.Choice.Enum - 1321, // 1622: otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter - 1321, // 1623: otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter - 397, // 1624: otg.PatternFlowRSVPPathSenderTspecIntServZeroBit.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServZeroBit.Choice.Enum - 1323, // 1625: otg.PatternFlowRSVPPathSenderTspecIntServZeroBit.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter - 1323, // 1626: otg.PatternFlowRSVPPathSenderTspecIntServZeroBit.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter - 398, // 1627: otg.PatternFlowRSVPPathSenderTspecIntServReserved2.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved2.Choice.Enum - 1325, // 1628: otg.PatternFlowRSVPPathSenderTspecIntServReserved2.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter - 1325, // 1629: otg.PatternFlowRSVPPathSenderTspecIntServReserved2.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter - 399, // 1630: otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.Choice.Enum - 1327, // 1631: otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter - 1327, // 1632: otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter - 400, // 1633: otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.Choice.Enum - 1329, // 1634: otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter - 1329, // 1635: otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter - 401, // 1636: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag.Choice.Enum - 1331, // 1637: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter - 1331, // 1638: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter - 402, // 1639: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length.Choice.Enum - 1333, // 1640: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter - 1333, // 1641: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter - 403, // 1642: otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.Choice.Enum - 1335, // 1643: otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter - 1335, // 1644: otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter - 404, // 1645: otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.Choice.Enum - 1337, // 1646: otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter - 1337, // 1647: otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter - 405, // 1648: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.choice:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.Choice.Enum - 1339, // 1649: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.increment:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter - 1339, // 1650: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.decrement:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter - 406, // 1651: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.choice:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.Choice.Enum - 1341, // 1652: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.increment:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter - 1341, // 1653: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.decrement:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter - 407, // 1654: otg.PatternFlowRSVPPathRecordRouteType1LabelFlags.choice:type_name -> otg.PatternFlowRSVPPathRecordRouteType1LabelFlags.Choice.Enum - 408, // 1655: otg.PatternFlowRSVPPathRecordRouteType1LabelCType.choice:type_name -> otg.PatternFlowRSVPPathRecordRouteType1LabelCType.Choice.Enum - 409, // 1656: otg.PatternFlowRSVPPathObjectsCustomType.choice:type_name -> otg.PatternFlowRSVPPathObjectsCustomType.Choice.Enum - 1345, // 1657: otg.PatternFlowRSVPPathObjectsCustomType.increment:type_name -> otg.PatternFlowRSVPPathObjectsCustomTypeCounter - 1345, // 1658: otg.PatternFlowRSVPPathObjectsCustomType.decrement:type_name -> otg.PatternFlowRSVPPathObjectsCustomTypeCounter - 722, // 1659: otg.Success.warning:type_name -> otg.Warning - 721, // 1660: otg.Failure.error:type_name -> otg.Error - 410, // 1661: otg.SetConfigRequest.config:type_name -> otg.Config - 723, // 1662: otg.UpdateConfigRequest.config_update:type_name -> otg.ConfigUpdate - 722, // 1663: otg.SetConfigResponse.warning:type_name -> otg.Warning - 410, // 1664: otg.GetConfigResponse.config:type_name -> otg.Config - 722, // 1665: otg.UpdateConfigResponse.warning:type_name -> otg.Warning - 725, // 1666: otg.SetControlStateRequest.control_state:type_name -> otg.ControlState - 722, // 1667: otg.SetControlStateResponse.warning:type_name -> otg.Warning - 741, // 1668: otg.SetControlActionRequest.control_action:type_name -> otg.ControlAction - 742, // 1669: otg.SetControlActionResponse.control_action_response:type_name -> otg.ControlActionResponse - 761, // 1670: otg.GetMetricsRequest.metrics_request:type_name -> otg.MetricsRequest - 762, // 1671: otg.GetMetricsResponse.metrics_response:type_name -> otg.MetricsResponse - 788, // 1672: otg.GetStatesRequest.states_request:type_name -> otg.StatesRequest - 789, // 1673: otg.GetStatesResponse.states_response:type_name -> otg.StatesResponse - 830, // 1674: otg.GetCaptureRequest.capture_request:type_name -> otg.CaptureRequest - 1347, // 1675: otg.GetVersionResponse.version:type_name -> otg.Version - 1350, // 1676: otg.Openapi.SetConfig:input_type -> otg.SetConfigRequest - 1776, // 1677: otg.Openapi.GetConfig:input_type -> google.protobuf.Empty - 1351, // 1678: otg.Openapi.UpdateConfig:input_type -> otg.UpdateConfigRequest - 1355, // 1679: otg.Openapi.SetControlState:input_type -> otg.SetControlStateRequest - 1357, // 1680: otg.Openapi.SetControlAction:input_type -> otg.SetControlActionRequest - 1359, // 1681: otg.Openapi.GetMetrics:input_type -> otg.GetMetricsRequest - 1361, // 1682: otg.Openapi.GetStates:input_type -> otg.GetStatesRequest - 1363, // 1683: otg.Openapi.GetCapture:input_type -> otg.GetCaptureRequest - 1776, // 1684: otg.Openapi.GetVersion:input_type -> google.protobuf.Empty - 1352, // 1685: otg.Openapi.SetConfig:output_type -> otg.SetConfigResponse - 1353, // 1686: otg.Openapi.GetConfig:output_type -> otg.GetConfigResponse - 1354, // 1687: otg.Openapi.UpdateConfig:output_type -> otg.UpdateConfigResponse - 1356, // 1688: otg.Openapi.SetControlState:output_type -> otg.SetControlStateResponse - 1358, // 1689: otg.Openapi.SetControlAction:output_type -> otg.SetControlActionResponse - 1360, // 1690: otg.Openapi.GetMetrics:output_type -> otg.GetMetricsResponse - 1362, // 1691: otg.Openapi.GetStates:output_type -> otg.GetStatesResponse - 1364, // 1692: otg.Openapi.GetCapture:output_type -> otg.GetCaptureResponse - 1365, // 1693: otg.Openapi.GetVersion:output_type -> otg.GetVersionResponse - 1685, // [1685:1694] is the sub-list for method output_type - 1676, // [1676:1685] is the sub-list for method input_type - 1676, // [1676:1676] is the sub-list for extension type_name - 1676, // [1676:1676] is the sub-list for extension extendee - 0, // [0:1676] is the sub-list for field type_name + 467, // 19: otg.DeviceEthernetBase.vlans:type_name -> otg.DeviceVlan + 465, // 20: otg.DeviceEthernet.connection:type_name -> otg.EthernetConnection + 468, // 21: otg.DeviceEthernet.ipv4_addresses:type_name -> otg.DeviceIpv4 + 471, // 22: otg.DeviceEthernet.ipv6_addresses:type_name -> otg.DeviceIpv6 + 467, // 23: otg.DeviceEthernet.vlans:type_name -> otg.DeviceVlan + 474, // 24: otg.DeviceEthernet.dhcpv4_interfaces:type_name -> otg.DeviceDhcpv4client + 476, // 25: otg.DeviceEthernet.dhcpv6_interfaces:type_name -> otg.DeviceDhcpv6client + 2, // 26: otg.EthernetConnection.choice:type_name -> otg.EthernetConnection.Choice.Enum + 466, // 27: otg.EthernetConnection.simulated_link:type_name -> otg.EthernetSimulatedLink + 3, // 28: otg.EthernetSimulatedLink.link_type:type_name -> otg.EthernetSimulatedLink.LinkType.Enum + 4, // 29: otg.DeviceVlan.tpid:type_name -> otg.DeviceVlan.Tpid.Enum + 470, // 30: otg.DeviceIpv4.gateway_mac:type_name -> otg.DeviceIpv4GatewayMAC + 5, // 31: otg.DeviceIpv4GatewayMAC.choice:type_name -> otg.DeviceIpv4GatewayMAC.Choice.Enum + 473, // 32: otg.DeviceIpv6.gateway_mac:type_name -> otg.DeviceIpv6GatewayMAC + 6, // 33: otg.DeviceIpv6GatewayMAC.choice:type_name -> otg.DeviceIpv6GatewayMAC.Choice.Enum + 7, // 34: otg.DeviceDhcpv4client.choice:type_name -> otg.DeviceDhcpv4client.Choice.Enum + 475, // 35: otg.DeviceDhcpv4client.parameters_request_list:type_name -> otg.Dhcpv4ClientParams + 479, // 36: otg.DeviceDhcpv6client.ia_type:type_name -> otg.DeviceDhcpv6clientIaType + 481, // 37: otg.DeviceDhcpv6client.duid_type:type_name -> otg.DeviceDhcpv6clientDuidType + 477, // 38: otg.DeviceDhcpv6client.options_request:type_name -> otg.DeviceDhcpv6ClientOptionsRequest + 478, // 39: otg.DeviceDhcpv6client.options:type_name -> otg.DeviceDhcpv6ClientOptions + 492, // 40: otg.DeviceDhcpv6ClientOptionsRequest.request:type_name -> otg.Dhcpv6ClientOptionsOptionsRequest + 495, // 41: otg.DeviceDhcpv6ClientOptionsRequest.associated_dhcp_messages:type_name -> otg.Dhcpv6ClientOptionsIncludedMessages + 484, // 42: otg.DeviceDhcpv6ClientOptions.server_identifier:type_name -> otg.Dhcpv6ClientOptionsServerIdentifier + 494, // 43: otg.DeviceDhcpv6ClientOptions.vendor_class:type_name -> otg.Dhcpv6ClientOptionsVendorClass + 497, // 44: otg.DeviceDhcpv6ClientOptions.vendor_info:type_name -> otg.Dhcpv6ClientOptionsVendorInfo + 502, // 45: otg.DeviceDhcpv6ClientOptions.fqdn:type_name -> otg.Dhcpv6ClientOptionsFqdn + 8, // 46: otg.DeviceDhcpv6clientIaType.choice:type_name -> otg.DeviceDhcpv6clientIaType.Choice.Enum + 480, // 47: otg.DeviceDhcpv6clientIaType.iana:type_name -> otg.DeviceDhcpv6clientIaTimeValue + 480, // 48: otg.DeviceDhcpv6clientIaType.iapd:type_name -> otg.DeviceDhcpv6clientIaTimeValue + 480, // 49: otg.DeviceDhcpv6clientIaType.ianapd:type_name -> otg.DeviceDhcpv6clientIaTimeValue + 9, // 50: otg.DeviceDhcpv6clientDuidType.choice:type_name -> otg.DeviceDhcpv6clientDuidType.Choice.Enum + 483, // 51: otg.DeviceDhcpv6clientDuidType.llt:type_name -> otg.DeviceDhcpv6clientNoDuid + 482, // 52: otg.DeviceDhcpv6clientDuidType.en:type_name -> otg.DeviceDhcpv6clientDuidValue + 483, // 53: otg.DeviceDhcpv6clientDuidType.ll:type_name -> otg.DeviceDhcpv6clientNoDuid + 10, // 54: otg.Dhcpv6ClientOptionsServerIdentifier.choice:type_name -> otg.Dhcpv6ClientOptionsServerIdentifier.Choice.Enum + 485, // 55: otg.Dhcpv6ClientOptionsServerIdentifier.duid_llt:type_name -> otg.Dhcpv6ClientOptionsDuidLlt + 486, // 56: otg.Dhcpv6ClientOptionsServerIdentifier.duid_en:type_name -> otg.Dhcpv6ClientOptionsDuidEn + 487, // 57: otg.Dhcpv6ClientOptionsServerIdentifier.duid_ll:type_name -> otg.Dhcpv6ClientOptionsDuidLl + 488, // 58: otg.Dhcpv6ClientOptionsServerIdentifier.duid_uuid:type_name -> otg.Dhcpv6ClientOptionsDuidUuid + 491, // 59: otg.Dhcpv6ClientOptionsDuidLlt.link_layer_address:type_name -> otg.Dhcpv6ClientOptionsLinkLayerAddress + 491, // 60: otg.Dhcpv6ClientOptionsDuidLl.link_layer_address:type_name -> otg.Dhcpv6ClientOptionsLinkLayerAddress + 489, // 61: otg.Dhcpv6ClientOptionsDuidUuid.version:type_name -> otg.Dhcpv6ClientOptionsDuidUuidVersion + 490, // 62: otg.Dhcpv6ClientOptionsDuidUuid.variant:type_name -> otg.Dhcpv6ClientOptionsDuidUuidVariant + 11, // 63: otg.Dhcpv6ClientOptionsDuidUuidVersion.choice:type_name -> otg.Dhcpv6ClientOptionsDuidUuidVersion.Choice.Enum + 12, // 64: otg.Dhcpv6ClientOptionsDuidUuidVariant.choice:type_name -> otg.Dhcpv6ClientOptionsDuidUuidVariant.Choice.Enum + 13, // 65: otg.Dhcpv6ClientOptionsOptionsRequest.choice:type_name -> otg.Dhcpv6ClientOptionsOptionsRequest.Choice.Enum + 493, // 66: otg.Dhcpv6ClientOptionsOptionsRequest.custom:type_name -> otg.Dhcpv6ClientOptionsCustom + 495, // 67: otg.Dhcpv6ClientOptionsVendorClass.associated_dhcp_messages:type_name -> otg.Dhcpv6ClientOptionsIncludedMessages + 14, // 68: otg.Dhcpv6ClientOptionsIncludedMessages.choice:type_name -> otg.Dhcpv6ClientOptionsIncludedMessages.Choice.Enum + 496, // 69: otg.Dhcpv6ClientOptionsIncludedMessages.msg_types:type_name -> otg.Dhcpv6ClientOptionsMessageType + 15, // 70: otg.Dhcpv6ClientOptionsMessageType.choice:type_name -> otg.Dhcpv6ClientOptionsMessageType.Choice.Enum + 501, // 71: otg.Dhcpv6ClientOptionsVendorInfo.option_data:type_name -> otg.Dhcpv6OptionsVendorSpecificOptions + 495, // 72: otg.Dhcpv6ClientOptionsVendorInfo.associated_dhcp_messages:type_name -> otg.Dhcpv6ClientOptionsIncludedMessages + 501, // 73: otg.Dhcpv6ServerOptionsVendorInfo.option_data:type_name -> otg.Dhcpv6OptionsVendorSpecificOptions + 499, // 74: otg.Dhcpv6ServerOptionsVendorInfo.associated_dhcp_messages:type_name -> otg.Dhcpv6ServerOptionsIncludedMessages + 16, // 75: otg.Dhcpv6ServerOptionsIncludedMessages.choice:type_name -> otg.Dhcpv6ServerOptionsIncludedMessages.Choice.Enum + 500, // 76: otg.Dhcpv6ServerOptionsIncludedMessages.msg_types:type_name -> otg.Dhcpv6ServerOptionsMessageType + 17, // 77: otg.Dhcpv6ServerOptionsMessageType.choice:type_name -> otg.Dhcpv6ServerOptionsMessageType.Choice.Enum + 495, // 78: otg.Dhcpv6ClientOptionsFqdn.associated_dhcp_messages:type_name -> otg.Dhcpv6ClientOptionsIncludedMessages + 504, // 79: otg.Dhcpv6ServerOptionsBootfileUrl.bootfile_params:type_name -> otg.Dhcpv6ServerOptionsBootFileParams + 499, // 80: otg.Dhcpv6ServerOptionsBootfileUrl.associated_dhcp_messages:type_name -> otg.Dhcpv6ServerOptionsIncludedMessages + 18, // 81: otg.Layer1.speed:type_name -> otg.Layer1.Speed.Enum + 19, // 82: otg.Layer1.media:type_name -> otg.Layer1.Media.Enum + 506, // 83: otg.Layer1.auto_negotiation:type_name -> otg.Layer1AutoNegotiation + 507, // 84: otg.Layer1.flow_control:type_name -> otg.Layer1FlowControl + 20, // 85: otg.Layer1FlowControl.choice:type_name -> otg.Layer1FlowControl.Choice.Enum + 509, // 86: otg.Layer1FlowControl.ieee_802_1qbb:type_name -> otg.Layer1Ieee8021qbb + 508, // 87: otg.Layer1FlowControl.ieee_802_3x:type_name -> otg.Layer1Ieee8023x + 511, // 88: otg.Capture.filters:type_name -> otg.CaptureFilter + 21, // 89: otg.Capture.format:type_name -> otg.Capture.Format.Enum + 22, // 90: otg.CaptureFilter.choice:type_name -> otg.CaptureFilter.Choice.Enum + 512, // 91: otg.CaptureFilter.custom:type_name -> otg.CaptureCustom + 514, // 92: otg.CaptureFilter.ethernet:type_name -> otg.CaptureEthernet + 515, // 93: otg.CaptureFilter.vlan:type_name -> otg.CaptureVlan + 516, // 94: otg.CaptureFilter.ipv4:type_name -> otg.CaptureIpv4 + 517, // 95: otg.CaptureFilter.ipv6:type_name -> otg.CaptureIpv6 + 513, // 96: otg.CaptureEthernet.src:type_name -> otg.CaptureField + 513, // 97: otg.CaptureEthernet.dst:type_name -> otg.CaptureField + 513, // 98: otg.CaptureEthernet.ether_type:type_name -> otg.CaptureField + 513, // 99: otg.CaptureEthernet.pfc_queue:type_name -> otg.CaptureField + 513, // 100: otg.CaptureVlan.priority:type_name -> otg.CaptureField + 513, // 101: otg.CaptureVlan.cfi:type_name -> otg.CaptureField + 513, // 102: otg.CaptureVlan.id:type_name -> otg.CaptureField + 513, // 103: otg.CaptureVlan.protocol:type_name -> otg.CaptureField + 513, // 104: otg.CaptureIpv4.version:type_name -> otg.CaptureField + 513, // 105: otg.CaptureIpv4.header_length:type_name -> otg.CaptureField + 513, // 106: otg.CaptureIpv4.priority:type_name -> otg.CaptureField + 513, // 107: otg.CaptureIpv4.total_length:type_name -> otg.CaptureField + 513, // 108: otg.CaptureIpv4.identification:type_name -> otg.CaptureField + 513, // 109: otg.CaptureIpv4.reserved:type_name -> otg.CaptureField + 513, // 110: otg.CaptureIpv4.dont_fragment:type_name -> otg.CaptureField + 513, // 111: otg.CaptureIpv4.more_fragments:type_name -> otg.CaptureField + 513, // 112: otg.CaptureIpv4.fragment_offset:type_name -> otg.CaptureField + 513, // 113: otg.CaptureIpv4.time_to_live:type_name -> otg.CaptureField + 513, // 114: otg.CaptureIpv4.protocol:type_name -> otg.CaptureField + 513, // 115: otg.CaptureIpv4.header_checksum:type_name -> otg.CaptureField + 513, // 116: otg.CaptureIpv4.src:type_name -> otg.CaptureField + 513, // 117: otg.CaptureIpv4.dst:type_name -> otg.CaptureField + 513, // 118: otg.CaptureIpv6.version:type_name -> otg.CaptureField + 513, // 119: otg.CaptureIpv6.traffic_class:type_name -> otg.CaptureField + 513, // 120: otg.CaptureIpv6.flow_label:type_name -> otg.CaptureField + 513, // 121: otg.CaptureIpv6.payload_length:type_name -> otg.CaptureField + 513, // 122: otg.CaptureIpv6.next_header:type_name -> otg.CaptureField + 513, // 123: otg.CaptureIpv6.hop_limit:type_name -> otg.CaptureField + 513, // 124: otg.CaptureIpv6.src:type_name -> otg.CaptureField + 513, // 125: otg.CaptureIpv6.dst:type_name -> otg.CaptureField + 464, // 126: otg.Device.ethernets:type_name -> otg.DeviceEthernet + 469, // 127: otg.Device.ipv4_loopbacks:type_name -> otg.DeviceIpv4Loopback + 472, // 128: otg.Device.ipv6_loopbacks:type_name -> otg.DeviceIpv6Loopback + 520, // 129: otg.Device.isis:type_name -> otg.DeviceIsisRouter + 539, // 130: otg.Device.bgp:type_name -> otg.DeviceBgpRouter + 680, // 131: otg.Device.vxlan:type_name -> otg.DeviceVxlan + 692, // 132: otg.Device.rsvp:type_name -> otg.DeviceRsvp + 703, // 133: otg.Device.dhcp_server:type_name -> otg.DeviceDhcpServer + 716, // 134: otg.Device.ospfv2:type_name -> otg.DeviceOspfv2Router + 521, // 135: otg.DeviceIsisRouter.instance:type_name -> otg.DeviceIsisMultiInstance + 522, // 136: otg.DeviceIsisRouter.interfaces:type_name -> otg.IsisInterface + 530, // 137: otg.DeviceIsisRouter.basic:type_name -> otg.IsisBasic + 531, // 138: otg.DeviceIsisRouter.advanced:type_name -> otg.IsisAdvanced + 532, // 139: otg.DeviceIsisRouter.router_auth:type_name -> otg.IsisAuthentication + 534, // 140: otg.DeviceIsisRouter.v4_routes:type_name -> otg.IsisV4RouteRange + 538, // 141: otg.DeviceIsisRouter.v6_routes:type_name -> otg.IsisV6RouteRange + 23, // 142: otg.IsisInterface.network_type:type_name -> otg.IsisInterface.NetworkType.Enum + 24, // 143: otg.IsisInterface.level_type:type_name -> otg.IsisInterface.LevelType.Enum + 523, // 144: otg.IsisInterface.l1_settings:type_name -> otg.IsisInterfaceLevel + 523, // 145: otg.IsisInterface.l2_settings:type_name -> otg.IsisInterfaceLevel + 524, // 146: otg.IsisInterface.multi_topology_ids:type_name -> otg.IsisMT + 525, // 147: otg.IsisInterface.traffic_engineering:type_name -> otg.LinkStateTE + 527, // 148: otg.IsisInterface.authentication:type_name -> otg.IsisInterfaceAuthentication + 528, // 149: otg.IsisInterface.advanced:type_name -> otg.IsisInterfaceAdvanced + 529, // 150: otg.IsisInterface.link_protection:type_name -> otg.IsisInterfaceLinkProtection + 526, // 151: otg.LinkStateTE.priority_bandwidths:type_name -> otg.LinkStatepriorityBandwidths + 25, // 152: otg.IsisInterfaceAuthentication.auth_type:type_name -> otg.IsisInterfaceAuthentication.AuthType.Enum + 533, // 153: otg.IsisAuthentication.area_auth:type_name -> otg.IsisAuthenticationBase + 533, // 154: otg.IsisAuthentication.domain_auth:type_name -> otg.IsisAuthenticationBase + 26, // 155: otg.IsisAuthenticationBase.auth_type:type_name -> otg.IsisAuthenticationBase.AuthType.Enum + 535, // 156: otg.IsisV4RouteRange.addresses:type_name -> otg.V4RouteAddress + 27, // 157: otg.IsisV4RouteRange.origin_type:type_name -> otg.IsisV4RouteRange.OriginType.Enum + 28, // 158: otg.IsisV4RouteRange.redistribution_type:type_name -> otg.IsisV4RouteRange.RedistributionType.Enum + 536, // 159: otg.IsisV6RouteRange.addresses:type_name -> otg.V6RouteAddress + 29, // 160: otg.IsisV6RouteRange.origin_type:type_name -> otg.IsisV6RouteRange.OriginType.Enum + 30, // 161: otg.IsisV6RouteRange.redistribution_type:type_name -> otg.IsisV6RouteRange.RedistributionType.Enum + 548, // 162: otg.DeviceBgpRouter.ipv4_interfaces:type_name -> otg.BgpV4Interface + 674, // 163: otg.DeviceBgpRouter.ipv6_interfaces:type_name -> otg.BgpV6Interface + 31, // 164: otg.DeviceBgpMessageHeaderError.subcode:type_name -> otg.DeviceBgpMessageHeaderError.Subcode.Enum + 32, // 165: otg.DeviceBgpOpenMessageError.subcode:type_name -> otg.DeviceBgpOpenMessageError.Subcode.Enum + 33, // 166: otg.DeviceBgpUpdateMessageError.subcode:type_name -> otg.DeviceBgpUpdateMessageError.Subcode.Enum + 34, // 167: otg.DeviceBgpCeaseError.subcode:type_name -> otg.DeviceBgpCeaseError.Subcode.Enum + 549, // 168: otg.BgpV4Peer.evpn_ethernet_segments:type_name -> otg.BgpV4EthernetSegment + 35, // 169: otg.BgpV4Peer.as_type:type_name -> otg.BgpV4Peer.AsType.Enum + 36, // 170: otg.BgpV4Peer.as_number_width:type_name -> otg.BgpV4Peer.AsNumberWidth.Enum + 562, // 171: otg.BgpV4Peer.advanced:type_name -> otg.BgpAdvanced + 563, // 172: otg.BgpV4Peer.capability:type_name -> otg.BgpCapability + 564, // 173: otg.BgpV4Peer.learned_information_filter:type_name -> otg.BgpLearnedInformationFilter + 565, // 174: otg.BgpV4Peer.v4_routes:type_name -> otg.BgpV4RouteRange + 585, // 175: otg.BgpV4Peer.v6_routes:type_name -> otg.BgpV6RouteRange + 586, // 176: otg.BgpV4Peer.v4_srte_policies:type_name -> otg.BgpSrteV4Policy + 610, // 177: otg.BgpV4Peer.v6_srte_policies:type_name -> otg.BgpSrteV6Policy + 612, // 178: otg.BgpV4Peer.graceful_restart:type_name -> otg.BgpGracefulRestart + 613, // 179: otg.BgpV4Peer.replay_updates:type_name -> otg.BgpUpdateReplay + 547, // 180: otg.BgpV4Interface.peers:type_name -> otg.BgpV4Peer + 550, // 181: otg.BgpV4EthernetSegment.df_election:type_name -> otg.BgpEthernetSegmentDfElection + 556, // 182: otg.BgpV4EthernetSegment.evis:type_name -> otg.BgpV4EvpnEvis + 37, // 183: otg.BgpV4EthernetSegment.active_mode:type_name -> otg.BgpV4EthernetSegment.ActiveMode.Enum + 551, // 184: otg.BgpV4EthernetSegment.advanced:type_name -> otg.BgpRouteAdvanced + 552, // 185: otg.BgpV4EthernetSegment.communities:type_name -> otg.BgpCommunity + 553, // 186: otg.BgpV4EthernetSegment.ext_communities:type_name -> otg.BgpExtCommunity + 554, // 187: otg.BgpV4EthernetSegment.as_path:type_name -> otg.BgpAsPath + 38, // 188: otg.BgpRouteAdvanced.origin:type_name -> otg.BgpRouteAdvanced.Origin.Enum + 39, // 189: otg.BgpCommunity.type:type_name -> otg.BgpCommunity.Type.Enum + 40, // 190: otg.BgpExtCommunity.type:type_name -> otg.BgpExtCommunity.Type.Enum + 41, // 191: otg.BgpExtCommunity.subtype:type_name -> otg.BgpExtCommunity.Subtype.Enum + 42, // 192: otg.BgpAsPath.as_set_mode:type_name -> otg.BgpAsPath.AsSetMode.Enum + 555, // 193: otg.BgpAsPath.segments:type_name -> otg.BgpAsPathSegment + 43, // 194: otg.BgpAsPathSegment.type:type_name -> otg.BgpAsPathSegment.Type.Enum + 44, // 195: otg.BgpV4EvpnEvis.choice:type_name -> otg.BgpV4EvpnEvis.Choice.Enum + 557, // 196: otg.BgpV4EvpnEvis.evi_vxlan:type_name -> otg.BgpV4EviVxlan + 558, // 197: otg.BgpV4EviVxlan.broadcast_domains:type_name -> otg.BgpV4EviVxlanBroadcastDomain + 45, // 198: otg.BgpV4EviVxlan.replication_type:type_name -> otg.BgpV4EviVxlan.ReplicationType.Enum + 560, // 199: otg.BgpV4EviVxlan.route_distinguisher:type_name -> otg.BgpRouteDistinguisher + 561, // 200: otg.BgpV4EviVxlan.route_target_export:type_name -> otg.BgpRouteTarget + 561, // 201: otg.BgpV4EviVxlan.route_target_import:type_name -> otg.BgpRouteTarget + 561, // 202: otg.BgpV4EviVxlan.l3_route_target_export:type_name -> otg.BgpRouteTarget + 561, // 203: otg.BgpV4EviVxlan.l3_route_target_import:type_name -> otg.BgpRouteTarget + 551, // 204: otg.BgpV4EviVxlan.advanced:type_name -> otg.BgpRouteAdvanced + 552, // 205: otg.BgpV4EviVxlan.communities:type_name -> otg.BgpCommunity + 553, // 206: otg.BgpV4EviVxlan.ext_communities:type_name -> otg.BgpExtCommunity + 554, // 207: otg.BgpV4EviVxlan.as_path:type_name -> otg.BgpAsPath + 559, // 208: otg.BgpV4EviVxlanBroadcastDomain.cmac_ip_range:type_name -> otg.BgpCMacIpRange + 537, // 209: otg.BgpCMacIpRange.mac_addresses:type_name -> otg.MACRouteAddress + 535, // 210: otg.BgpCMacIpRange.ipv4_addresses:type_name -> otg.V4RouteAddress + 536, // 211: otg.BgpCMacIpRange.ipv6_addresses:type_name -> otg.V6RouteAddress + 551, // 212: otg.BgpCMacIpRange.advanced:type_name -> otg.BgpRouteAdvanced + 552, // 213: otg.BgpCMacIpRange.communities:type_name -> otg.BgpCommunity + 553, // 214: otg.BgpCMacIpRange.ext_communities:type_name -> otg.BgpExtCommunity + 554, // 215: otg.BgpCMacIpRange.as_path:type_name -> otg.BgpAsPath + 46, // 216: otg.BgpRouteDistinguisher.rd_type:type_name -> otg.BgpRouteDistinguisher.RdType.Enum + 47, // 217: otg.BgpRouteTarget.rt_type:type_name -> otg.BgpRouteTarget.RtType.Enum + 535, // 218: otg.BgpV4RouteRange.addresses:type_name -> otg.V4RouteAddress + 48, // 219: otg.BgpV4RouteRange.next_hop_mode:type_name -> otg.BgpV4RouteRange.NextHopMode.Enum + 49, // 220: otg.BgpV4RouteRange.next_hop_address_type:type_name -> otg.BgpV4RouteRange.NextHopAddressType.Enum + 551, // 221: otg.BgpV4RouteRange.advanced:type_name -> otg.BgpRouteAdvanced + 552, // 222: otg.BgpV4RouteRange.communities:type_name -> otg.BgpCommunity + 554, // 223: otg.BgpV4RouteRange.as_path:type_name -> otg.BgpAsPath + 566, // 224: otg.BgpV4RouteRange.add_path:type_name -> otg.BgpAddPath + 553, // 225: otg.BgpV4RouteRange.ext_communities:type_name -> otg.BgpExtCommunity + 567, // 226: otg.BgpV4RouteRange.extended_communities:type_name -> otg.BgpExtendedCommunity + 50, // 227: otg.BgpExtendedCommunity.choice:type_name -> otg.BgpExtendedCommunity.Choice.Enum + 570, // 228: otg.BgpExtendedCommunity.transitive_2octet_as_type:type_name -> otg.BgpExtendedCommunityTransitive2OctetAsType + 573, // 229: otg.BgpExtendedCommunity.transitive_ipv4_address_type:type_name -> otg.BgpExtendedCommunityTransitiveIpv4AddressType + 576, // 230: otg.BgpExtendedCommunity.transitive_4octet_as_type:type_name -> otg.BgpExtendedCommunityTransitive4OctetAsType + 579, // 231: otg.BgpExtendedCommunity.transitive_opaque_type:type_name -> otg.BgpExtendedCommunityTransitiveOpaqueType + 581, // 232: otg.BgpExtendedCommunity.transitive_evpn_type:type_name -> otg.BgpExtendedCommunityTransitiveEvpnType + 583, // 233: otg.BgpExtendedCommunity.non_transitive_2octet_as_type:type_name -> otg.BgpExtendedCommunityNonTransitive2OctetAsType + 584, // 234: otg.BgpExtendedCommunity.custom:type_name -> otg.BgpExtendedCommunityCustomType + 51, // 235: otg.BgpExtendedCommunityTransitive2OctetAsType.choice:type_name -> otg.BgpExtendedCommunityTransitive2OctetAsType.Choice.Enum + 568, // 236: otg.BgpExtendedCommunityTransitive2OctetAsType.route_target_subtype:type_name -> otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget + 569, // 237: otg.BgpExtendedCommunityTransitive2OctetAsType.route_origin_subtype:type_name -> otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin + 52, // 238: otg.BgpExtendedCommunityTransitiveIpv4AddressType.choice:type_name -> otg.BgpExtendedCommunityTransitiveIpv4AddressType.Choice.Enum + 572, // 239: otg.BgpExtendedCommunityTransitiveIpv4AddressType.route_target_subtype:type_name -> otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + 571, // 240: otg.BgpExtendedCommunityTransitiveIpv4AddressType.route_origin_subtype:type_name -> otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + 53, // 241: otg.BgpExtendedCommunityTransitive4OctetAsType.choice:type_name -> otg.BgpExtendedCommunityTransitive4OctetAsType.Choice.Enum + 574, // 242: otg.BgpExtendedCommunityTransitive4OctetAsType.route_target_subtype:type_name -> otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget + 575, // 243: otg.BgpExtendedCommunityTransitive4OctetAsType.route_origin_subtype:type_name -> otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin + 54, // 244: otg.BgpExtendedCommunityTransitiveOpaqueType.choice:type_name -> otg.BgpExtendedCommunityTransitiveOpaqueType.Choice.Enum + 577, // 245: otg.BgpExtendedCommunityTransitiveOpaqueType.color_subtype:type_name -> otg.BgpExtendedCommunityTransitiveOpaqueTypeColor + 578, // 246: otg.BgpExtendedCommunityTransitiveOpaqueType.encapsulation_subtype:type_name -> otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation + 55, // 247: otg.BgpExtendedCommunityTransitiveEvpnType.choice:type_name -> otg.BgpExtendedCommunityTransitiveEvpnType.Choice.Enum + 580, // 248: otg.BgpExtendedCommunityTransitiveEvpnType.router_mac_subtype:type_name -> otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac + 56, // 249: otg.BgpExtendedCommunityNonTransitive2OctetAsType.choice:type_name -> otg.BgpExtendedCommunityNonTransitive2OctetAsType.Choice.Enum + 582, // 250: otg.BgpExtendedCommunityNonTransitive2OctetAsType.link_bandwidth_subtype:type_name -> otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + 536, // 251: otg.BgpV6RouteRange.addresses:type_name -> otg.V6RouteAddress + 57, // 252: otg.BgpV6RouteRange.next_hop_mode:type_name -> otg.BgpV6RouteRange.NextHopMode.Enum + 58, // 253: otg.BgpV6RouteRange.next_hop_address_type:type_name -> otg.BgpV6RouteRange.NextHopAddressType.Enum + 551, // 254: otg.BgpV6RouteRange.advanced:type_name -> otg.BgpRouteAdvanced + 552, // 255: otg.BgpV6RouteRange.communities:type_name -> otg.BgpCommunity + 554, // 256: otg.BgpV6RouteRange.as_path:type_name -> otg.BgpAsPath + 566, // 257: otg.BgpV6RouteRange.add_path:type_name -> otg.BgpAddPath + 553, // 258: otg.BgpV6RouteRange.ext_communities:type_name -> otg.BgpExtCommunity + 567, // 259: otg.BgpV6RouteRange.extended_communities:type_name -> otg.BgpExtendedCommunity + 59, // 260: otg.BgpSrteV4Policy.next_hop_mode:type_name -> otg.BgpSrteV4Policy.NextHopMode.Enum + 60, // 261: otg.BgpSrteV4Policy.next_hop_address_type:type_name -> otg.BgpSrteV4Policy.NextHopAddressType.Enum + 551, // 262: otg.BgpSrteV4Policy.advanced:type_name -> otg.BgpRouteAdvanced + 566, // 263: otg.BgpSrteV4Policy.add_path:type_name -> otg.BgpAddPath + 554, // 264: otg.BgpSrteV4Policy.as_path:type_name -> otg.BgpAsPath + 552, // 265: otg.BgpSrteV4Policy.communities:type_name -> otg.BgpCommunity + 553, // 266: otg.BgpSrteV4Policy.ext_communities:type_name -> otg.BgpExtCommunity + 587, // 267: otg.BgpSrteV4Policy.tunnel_tlvs:type_name -> otg.BgpSrteV4TunnelTlv + 588, // 268: otg.BgpSrteV4TunnelTlv.remote_endpoint_sub_tlv:type_name -> otg.BgpSrteRemoteEndpointSubTlv + 589, // 269: otg.BgpSrteV4TunnelTlv.color_sub_tlv:type_name -> otg.BgpSrteColorSubTlv + 590, // 270: otg.BgpSrteV4TunnelTlv.binding_sub_tlv:type_name -> otg.BgpSrteBindingSubTlv + 591, // 271: otg.BgpSrteV4TunnelTlv.preference_sub_tlv:type_name -> otg.BgpSrtePreferenceSubTlv + 592, // 272: otg.BgpSrteV4TunnelTlv.policy_priority_sub_tlv:type_name -> otg.BgpSrtePolicyPrioritySubTlv + 593, // 273: otg.BgpSrteV4TunnelTlv.policy_name_sub_tlv:type_name -> otg.BgpSrtePolicyNameSubTlv + 594, // 274: otg.BgpSrteV4TunnelTlv.explicit_null_label_policy_sub_tlv:type_name -> otg.BgpSrteExplicitNullLabelPolicySubTlv + 595, // 275: otg.BgpSrteV4TunnelTlv.segment_lists:type_name -> otg.BgpSrteSegmentList + 61, // 276: otg.BgpSrteRemoteEndpointSubTlv.address_family:type_name -> otg.BgpSrteRemoteEndpointSubTlv.AddressFamily.Enum + 62, // 277: otg.BgpSrteBindingSubTlv.binding_sid_type:type_name -> otg.BgpSrteBindingSubTlv.BindingSidType.Enum + 63, // 278: otg.BgpSrteExplicitNullLabelPolicySubTlv.explicit_null_label_policy:type_name -> otg.BgpSrteExplicitNullLabelPolicySubTlv.ExplicitNullLabelPolicy.Enum + 596, // 279: otg.BgpSrteSegmentList.segments:type_name -> otg.BgpSrteSegment + 64, // 280: otg.BgpSrteSegment.segment_type:type_name -> otg.BgpSrteSegment.SegmentType.Enum + 599, // 281: otg.BgpSrteSegment.type_a:type_name -> otg.BgpSrteSegmentATypeSubTlv + 600, // 282: otg.BgpSrteSegment.type_b:type_name -> otg.BgpSrteSegmentBTypeSubTlv + 601, // 283: otg.BgpSrteSegment.type_c:type_name -> otg.BgpSrteSegmentCTypeSubTlv + 602, // 284: otg.BgpSrteSegment.type_d:type_name -> otg.BgpSrteSegmentDTypeSubTlv + 603, // 285: otg.BgpSrteSegment.type_e:type_name -> otg.BgpSrteSegmentETypeSubTlv + 604, // 286: otg.BgpSrteSegment.type_f:type_name -> otg.BgpSrteSegmentFTypeSubTlv + 605, // 287: otg.BgpSrteSegment.type_g:type_name -> otg.BgpSrteSegmentGTypeSubTlv + 606, // 288: otg.BgpSrteSegment.type_h:type_name -> otg.BgpSrteSegmentHTypeSubTlv + 607, // 289: otg.BgpSrteSegment.type_i:type_name -> otg.BgpSrteSegmentITypeSubTlv + 608, // 290: otg.BgpSrteSegment.type_j:type_name -> otg.BgpSrteSegmentJTypeSubTlv + 609, // 291: otg.BgpSrteSegment.type_k:type_name -> otg.BgpSrteSegmentKTypeSubTlv + 598, // 292: otg.BgpSrteSegmentBTypeSubTlv.srv6_sid_endpoint_behavior:type_name -> otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure + 597, // 293: otg.BgpSrteSegmentCTypeSubTlv.sr_mpls_sid:type_name -> otg.BgpSrteSrMplsSid + 597, // 294: otg.BgpSrteSegmentDTypeSubTlv.sr_mpls_sid:type_name -> otg.BgpSrteSrMplsSid + 597, // 295: otg.BgpSrteSegmentETypeSubTlv.sr_mpls_sid:type_name -> otg.BgpSrteSrMplsSid + 597, // 296: otg.BgpSrteSegmentFTypeSubTlv.sr_mpls_sid:type_name -> otg.BgpSrteSrMplsSid + 597, // 297: otg.BgpSrteSegmentGTypeSubTlv.sr_mpls_sid:type_name -> otg.BgpSrteSrMplsSid + 597, // 298: otg.BgpSrteSegmentHTypeSubTlv.sr_mpls_sid:type_name -> otg.BgpSrteSrMplsSid + 598, // 299: otg.BgpSrteSegmentITypeSubTlv.srv6_sid_endpoint_behavior:type_name -> otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure + 598, // 300: otg.BgpSrteSegmentJTypeSubTlv.srv6_sid_endpoint_behavior:type_name -> otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure + 598, // 301: otg.BgpSrteSegmentKTypeSubTlv.srv6_sid_endpoint_behavior:type_name -> otg.BgpSrteSRv6SIDEndpointBehaviorAndStructure + 65, // 302: otg.BgpSrteV6Policy.next_hop_mode:type_name -> otg.BgpSrteV6Policy.NextHopMode.Enum + 66, // 303: otg.BgpSrteV6Policy.next_hop_address_type:type_name -> otg.BgpSrteV6Policy.NextHopAddressType.Enum + 551, // 304: otg.BgpSrteV6Policy.advanced:type_name -> otg.BgpRouteAdvanced + 566, // 305: otg.BgpSrteV6Policy.add_path:type_name -> otg.BgpAddPath + 554, // 306: otg.BgpSrteV6Policy.as_path:type_name -> otg.BgpAsPath + 552, // 307: otg.BgpSrteV6Policy.communities:type_name -> otg.BgpCommunity + 553, // 308: otg.BgpSrteV6Policy.extcommunities:type_name -> otg.BgpExtCommunity + 611, // 309: otg.BgpSrteV6Policy.tunnel_tlvs:type_name -> otg.BgpSrteV6TunnelTlv + 588, // 310: otg.BgpSrteV6TunnelTlv.remote_endpoint_sub_tlv:type_name -> otg.BgpSrteRemoteEndpointSubTlv + 589, // 311: otg.BgpSrteV6TunnelTlv.color_sub_tlv:type_name -> otg.BgpSrteColorSubTlv + 590, // 312: otg.BgpSrteV6TunnelTlv.binding_sub_tlv:type_name -> otg.BgpSrteBindingSubTlv + 591, // 313: otg.BgpSrteV6TunnelTlv.preference_sub_tlv:type_name -> otg.BgpSrtePreferenceSubTlv + 592, // 314: otg.BgpSrteV6TunnelTlv.policy_priority_sub_tlv:type_name -> otg.BgpSrtePolicyPrioritySubTlv + 593, // 315: otg.BgpSrteV6TunnelTlv.policy_name_sub_tlv:type_name -> otg.BgpSrtePolicyNameSubTlv + 594, // 316: otg.BgpSrteV6TunnelTlv.explicit_null_label_policy_sub_tlv:type_name -> otg.BgpSrteExplicitNullLabelPolicySubTlv + 595, // 317: otg.BgpSrteV6TunnelTlv.segment_lists:type_name -> otg.BgpSrteSegmentList + 67, // 318: otg.BgpUpdateReplay.choice:type_name -> otg.BgpUpdateReplay.Choice.Enum + 616, // 319: otg.BgpUpdateReplay.structured_pdus:type_name -> otg.BgpStructuredPdus + 614, // 320: otg.BgpUpdateReplay.raw_bytes:type_name -> otg.BgpRawBytes + 615, // 321: otg.BgpRawBytes.updates:type_name -> otg.BgpOneUpdateReplay + 617, // 322: otg.BgpStructuredPdus.updates:type_name -> otg.BgpOneStructuredUpdateReplay + 624, // 323: otg.BgpOneStructuredUpdateReplay.path_attributes:type_name -> otg.BgpAttributes + 618, // 324: otg.BgpOneStructuredUpdateReplay.traditional_unreach_nlris:type_name -> otg.BgpOneTraditionalNlriPrefix + 618, // 325: otg.BgpOneStructuredUpdateReplay.traditional_reach_nlris:type_name -> otg.BgpOneTraditionalNlriPrefix + 621, // 326: otg.BgpOneTraditionalNlriPrefix.path_id:type_name -> otg.BgpNLRIPrefixPathId + 621, // 327: otg.BgpOneIpv4NLRIPrefix.path_id:type_name -> otg.BgpNLRIPrefixPathId + 621, // 328: otg.BgpOneIpv6NLRIPrefix.path_id:type_name -> otg.BgpNLRIPrefixPathId + 625, // 329: otg.BgpAttributes.other_attributes:type_name -> otg.BgpAttributesOtherAttribute + 68, // 330: otg.BgpAttributes.origin:type_name -> otg.BgpAttributes.Origin.Enum + 626, // 331: otg.BgpAttributes.as_path:type_name -> otg.BgpAttributesAsPath + 631, // 332: otg.BgpAttributes.as4_path:type_name -> otg.BgpAttributesAs4Path + 636, // 333: otg.BgpAttributes.next_hop:type_name -> otg.BgpAttributesNextHop + 640, // 334: otg.BgpAttributes.multi_exit_discriminator:type_name -> otg.BgpAttributesMultiExitDiscriminator + 641, // 335: otg.BgpAttributes.local_preference:type_name -> otg.BgpAttributesLocalPreference + 632, // 336: otg.BgpAttributes.aggregator:type_name -> otg.BgpAttributesAggregator + 633, // 337: otg.BgpAttributes.as4_aggregator:type_name -> otg.BgpAttributesAs4Aggregator + 634, // 338: otg.BgpAttributes.community:type_name -> otg.BgpAttributesCommunity + 642, // 339: otg.BgpAttributes.originator_id:type_name -> otg.BgpAttributesOriginatorId + 567, // 340: otg.BgpAttributes.extended_communities:type_name -> otg.BgpExtendedCommunity + 643, // 341: otg.BgpAttributes.tunnel_encapsulation:type_name -> otg.BgpAttributesTunnelEncapsulation + 638, // 342: otg.BgpAttributes.mp_reach:type_name -> otg.BgpAttributesMpReachNlri + 639, // 343: otg.BgpAttributes.mp_unreach:type_name -> otg.BgpAttributesMpUnreachNlri + 69, // 344: otg.BgpAttributesAsPath.choice:type_name -> otg.BgpAttributesAsPath.Choice.Enum + 627, // 345: otg.BgpAttributesAsPath.four_byte_as_path:type_name -> otg.BgpAttributesAsPathFourByteAsPath + 629, // 346: otg.BgpAttributesAsPath.two_byte_as_path:type_name -> otg.BgpAttributesAsPathTwoByteAsPath + 628, // 347: otg.BgpAttributesAsPathFourByteAsPath.segments:type_name -> otg.BgpAttributesFourByteAsPathSegment + 70, // 348: otg.BgpAttributesFourByteAsPathSegment.type:type_name -> otg.BgpAttributesFourByteAsPathSegment.Type.Enum + 630, // 349: otg.BgpAttributesAsPathTwoByteAsPath.segments:type_name -> otg.BgpAttributesTwoByteAsPathSegment + 71, // 350: otg.BgpAttributesTwoByteAsPathSegment.type:type_name -> otg.BgpAttributesTwoByteAsPathSegment.Type.Enum + 628, // 351: otg.BgpAttributesAs4Path.segments:type_name -> otg.BgpAttributesFourByteAsPathSegment + 72, // 352: otg.BgpAttributesAggregator.choice:type_name -> otg.BgpAttributesAggregator.Choice.Enum + 73, // 353: otg.BgpAttributesCommunity.choice:type_name -> otg.BgpAttributesCommunity.Choice.Enum + 635, // 354: otg.BgpAttributesCommunity.custom_community:type_name -> otg.BgpAttributesCustomCommunity + 74, // 355: otg.BgpAttributesNextHop.choice:type_name -> otg.BgpAttributesNextHop.Choice.Enum + 637, // 356: otg.BgpAttributesNextHop.ipv6_two_addresses:type_name -> otg.BgpAttributesNextHopIpv6TwoAddresses + 636, // 357: otg.BgpAttributesMpReachNlri.next_hop:type_name -> otg.BgpAttributesNextHop + 75, // 358: otg.BgpAttributesMpReachNlri.choice:type_name -> otg.BgpAttributesMpReachNlri.Choice.Enum + 619, // 359: otg.BgpAttributesMpReachNlri.ipv4_unicast:type_name -> otg.BgpOneIpv4NLRIPrefix + 620, // 360: otg.BgpAttributesMpReachNlri.ipv6_unicast:type_name -> otg.BgpOneIpv6NLRIPrefix + 622, // 361: otg.BgpAttributesMpReachNlri.ipv4_srpolicy:type_name -> otg.BgpIpv4SrPolicyNLRIPrefix + 623, // 362: otg.BgpAttributesMpReachNlri.ipv6_srpolicy:type_name -> otg.BgpIpv6SrPolicyNLRIPrefix + 76, // 363: otg.BgpAttributesMpUnreachNlri.choice:type_name -> otg.BgpAttributesMpUnreachNlri.Choice.Enum + 619, // 364: otg.BgpAttributesMpUnreachNlri.ipv4_unicast:type_name -> otg.BgpOneIpv4NLRIPrefix + 620, // 365: otg.BgpAttributesMpUnreachNlri.ipv6_unicast:type_name -> otg.BgpOneIpv6NLRIPrefix + 622, // 366: otg.BgpAttributesMpUnreachNlri.ipv4_srpolicy:type_name -> otg.BgpIpv4SrPolicyNLRIPrefix + 623, // 367: otg.BgpAttributesMpUnreachNlri.ipv6_srpolicy:type_name -> otg.BgpIpv6SrPolicyNLRIPrefix + 77, // 368: otg.BgpAttributesTunnelEncapsulation.choice:type_name -> otg.BgpAttributesTunnelEncapsulation.Choice.Enum + 644, // 369: otg.BgpAttributesTunnelEncapsulation.sr_policy:type_name -> otg.BgpAttributesSegmentRoutingPolicy + 645, // 370: otg.BgpAttributesSegmentRoutingPolicy.binding_segment_identifier:type_name -> otg.BgpAttributesBsid + 648, // 371: otg.BgpAttributesSegmentRoutingPolicy.srv6_binding_segment_identifier:type_name -> otg.BgpAttributesSrv6Bsid + 651, // 372: otg.BgpAttributesSegmentRoutingPolicy.preference:type_name -> otg.BgpAttributesSrPolicyPreference + 652, // 373: otg.BgpAttributesSegmentRoutingPolicy.priority:type_name -> otg.BgpAttributesSrPolicyPriority + 654, // 374: otg.BgpAttributesSegmentRoutingPolicy.policy_name:type_name -> otg.BgpAttributesSrPolicyPolicyName + 653, // 375: otg.BgpAttributesSegmentRoutingPolicy.policy_candidate_name:type_name -> otg.BgpAttributesSrPolicyPolicyCandidateName + 655, // 376: otg.BgpAttributesSegmentRoutingPolicy.explicit_null_label_policy:type_name -> otg.BgpAttributesSrPolicyExplicitNullPolicy + 656, // 377: otg.BgpAttributesSegmentRoutingPolicy.segment_list:type_name -> otg.BgpAttributesSrPolicySegmentList + 78, // 378: otg.BgpAttributesBsid.choice:type_name -> otg.BgpAttributesBsid.Choice.Enum + 646, // 379: otg.BgpAttributesBsid.mpls:type_name -> otg.BgpAttributesBsidMpls + 647, // 380: otg.BgpAttributesBsid.srv6:type_name -> otg.BgpAttributesBsidSrv6 + 649, // 381: otg.BgpAttributesBsidMpls.mpls_sid:type_name -> otg.BgpAttributesSidMpls + 671, // 382: otg.BgpAttributesSrv6Bsid.srv6_endpoint_behavior:type_name -> otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + 79, // 383: otg.BgpAttributesSrPolicyExplicitNullPolicy.choice:type_name -> otg.BgpAttributesSrPolicyExplicitNullPolicy.Choice.Enum + 657, // 384: otg.BgpAttributesSrPolicySegmentList.weight:type_name -> otg.BgpAttributesSegmentRoutingPolicySegmentListWeight + 658, // 385: otg.BgpAttributesSrPolicySegmentList.segments:type_name -> otg.BgpAttributesSegmentRoutingPolicySegmentListSegment + 80, // 386: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.choice:type_name -> otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.Choice.Enum + 659, // 387: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.type_a:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeA + 660, // 388: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.type_b:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeB + 661, // 389: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.type_c:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeC + 662, // 390: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.type_d:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeD + 663, // 391: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.type_e:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeE + 664, // 392: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.type_f:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeF + 665, // 393: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.type_g:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeG + 666, // 394: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.type_h:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeH + 667, // 395: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.type_i:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeI + 668, // 396: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.type_j:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeJ + 669, // 397: otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.type_k:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeK + 670, // 398: otg.BgpAttributesSegmentRoutingPolicyTypeA.flags:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeFlags + 649, // 399: otg.BgpAttributesSegmentRoutingPolicyTypeA.mpls_sid:type_name -> otg.BgpAttributesSidMpls + 670, // 400: otg.BgpAttributesSegmentRoutingPolicyTypeB.flags:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeFlags + 671, // 401: otg.BgpAttributesSegmentRoutingPolicyTypeB.srv6_endpoint_behavior:type_name -> otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + 670, // 402: otg.BgpAttributesSegmentRoutingPolicyTypeC.flags:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeFlags + 649, // 403: otg.BgpAttributesSegmentRoutingPolicyTypeC.sr_mpls_sid:type_name -> otg.BgpAttributesSidMpls + 670, // 404: otg.BgpAttributesSegmentRoutingPolicyTypeD.flags:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeFlags + 649, // 405: otg.BgpAttributesSegmentRoutingPolicyTypeD.sr_mpls_sid:type_name -> otg.BgpAttributesSidMpls + 670, // 406: otg.BgpAttributesSegmentRoutingPolicyTypeE.flags:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeFlags + 649, // 407: otg.BgpAttributesSegmentRoutingPolicyTypeE.sr_mpls_sid:type_name -> otg.BgpAttributesSidMpls + 670, // 408: otg.BgpAttributesSegmentRoutingPolicyTypeF.flags:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeFlags + 649, // 409: otg.BgpAttributesSegmentRoutingPolicyTypeF.sr_mpls_sid:type_name -> otg.BgpAttributesSidMpls + 670, // 410: otg.BgpAttributesSegmentRoutingPolicyTypeG.flags:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeFlags + 649, // 411: otg.BgpAttributesSegmentRoutingPolicyTypeG.sr_mpls_sid:type_name -> otg.BgpAttributesSidMpls + 670, // 412: otg.BgpAttributesSegmentRoutingPolicyTypeH.flags:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeFlags + 649, // 413: otg.BgpAttributesSegmentRoutingPolicyTypeH.sr_mpls_sid:type_name -> otg.BgpAttributesSidMpls + 670, // 414: otg.BgpAttributesSegmentRoutingPolicyTypeI.flags:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeFlags + 650, // 415: otg.BgpAttributesSegmentRoutingPolicyTypeI.srv6_sid:type_name -> otg.BgpAttributesSidSrv6 + 671, // 416: otg.BgpAttributesSegmentRoutingPolicyTypeI.srv6_endpoint_behavior:type_name -> otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + 670, // 417: otg.BgpAttributesSegmentRoutingPolicyTypeJ.flags:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeFlags + 650, // 418: otg.BgpAttributesSegmentRoutingPolicyTypeJ.srv6_sid:type_name -> otg.BgpAttributesSidSrv6 + 671, // 419: otg.BgpAttributesSegmentRoutingPolicyTypeJ.srv6_endpoint_behavior:type_name -> otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + 670, // 420: otg.BgpAttributesSegmentRoutingPolicyTypeK.flags:type_name -> otg.BgpAttributesSegmentRoutingPolicyTypeFlags + 650, // 421: otg.BgpAttributesSegmentRoutingPolicyTypeK.srv6_sid:type_name -> otg.BgpAttributesSidSrv6 + 671, // 422: otg.BgpAttributesSegmentRoutingPolicyTypeK.srv6_endpoint_behavior:type_name -> otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure + 675, // 423: otg.BgpV6Peer.segment_routing:type_name -> otg.BgpV6SegmentRouting + 676, // 424: otg.BgpV6Peer.evpn_ethernet_segments:type_name -> otg.BgpV6EthernetSegment + 81, // 425: otg.BgpV6Peer.as_type:type_name -> otg.BgpV6Peer.AsType.Enum + 82, // 426: otg.BgpV6Peer.as_number_width:type_name -> otg.BgpV6Peer.AsNumberWidth.Enum + 562, // 427: otg.BgpV6Peer.advanced:type_name -> otg.BgpAdvanced + 563, // 428: otg.BgpV6Peer.capability:type_name -> otg.BgpCapability + 564, // 429: otg.BgpV6Peer.learned_information_filter:type_name -> otg.BgpLearnedInformationFilter + 565, // 430: otg.BgpV6Peer.v4_routes:type_name -> otg.BgpV4RouteRange + 585, // 431: otg.BgpV6Peer.v6_routes:type_name -> otg.BgpV6RouteRange + 586, // 432: otg.BgpV6Peer.v4_srte_policies:type_name -> otg.BgpSrteV4Policy + 610, // 433: otg.BgpV6Peer.v6_srte_policies:type_name -> otg.BgpSrteV6Policy + 612, // 434: otg.BgpV6Peer.graceful_restart:type_name -> otg.BgpGracefulRestart + 613, // 435: otg.BgpV6Peer.replay_updates:type_name -> otg.BgpUpdateReplay + 673, // 436: otg.BgpV6Interface.peers:type_name -> otg.BgpV6Peer + 550, // 437: otg.BgpV6EthernetSegment.df_election:type_name -> otg.BgpEthernetSegmentDfElection + 677, // 438: otg.BgpV6EthernetSegment.evis:type_name -> otg.BgpV6EvpnEvis + 83, // 439: otg.BgpV6EthernetSegment.active_mode:type_name -> otg.BgpV6EthernetSegment.ActiveMode.Enum + 551, // 440: otg.BgpV6EthernetSegment.advanced:type_name -> otg.BgpRouteAdvanced + 552, // 441: otg.BgpV6EthernetSegment.communities:type_name -> otg.BgpCommunity + 553, // 442: otg.BgpV6EthernetSegment.ext_communities:type_name -> otg.BgpExtCommunity + 554, // 443: otg.BgpV6EthernetSegment.as_path:type_name -> otg.BgpAsPath + 84, // 444: otg.BgpV6EvpnEvis.choice:type_name -> otg.BgpV6EvpnEvis.Choice.Enum + 678, // 445: otg.BgpV6EvpnEvis.evi_vxlan:type_name -> otg.BgpV6EviVxlan + 679, // 446: otg.BgpV6EviVxlan.broadcast_domains:type_name -> otg.BgpV6EviVxlanBroadcastDomain + 85, // 447: otg.BgpV6EviVxlan.replication_type:type_name -> otg.BgpV6EviVxlan.ReplicationType.Enum + 560, // 448: otg.BgpV6EviVxlan.route_distinguisher:type_name -> otg.BgpRouteDistinguisher + 561, // 449: otg.BgpV6EviVxlan.route_target_export:type_name -> otg.BgpRouteTarget + 561, // 450: otg.BgpV6EviVxlan.route_target_import:type_name -> otg.BgpRouteTarget + 561, // 451: otg.BgpV6EviVxlan.l3_route_target_export:type_name -> otg.BgpRouteTarget + 561, // 452: otg.BgpV6EviVxlan.l3_route_target_import:type_name -> otg.BgpRouteTarget + 551, // 453: otg.BgpV6EviVxlan.advanced:type_name -> otg.BgpRouteAdvanced + 552, // 454: otg.BgpV6EviVxlan.communities:type_name -> otg.BgpCommunity + 553, // 455: otg.BgpV6EviVxlan.ext_communities:type_name -> otg.BgpExtCommunity + 554, // 456: otg.BgpV6EviVxlan.as_path:type_name -> otg.BgpAsPath + 559, // 457: otg.BgpV6EviVxlanBroadcastDomain.cmac_ip_range:type_name -> otg.BgpCMacIpRange + 681, // 458: otg.DeviceVxlan.v4_tunnels:type_name -> otg.VxlanV4Tunnel + 682, // 459: otg.DeviceVxlan.v6_tunnels:type_name -> otg.VxlanV6Tunnel + 683, // 460: otg.VxlanV4Tunnel.destination_ip_mode:type_name -> otg.VxlanV4TunnelDestinationIPMode + 684, // 461: otg.VxlanV6Tunnel.destination_ip_mode:type_name -> otg.VxlanV6TunnelDestinationIPMode + 86, // 462: otg.VxlanV4TunnelDestinationIPMode.choice:type_name -> otg.VxlanV4TunnelDestinationIPMode.Choice.Enum + 685, // 463: otg.VxlanV4TunnelDestinationIPMode.unicast:type_name -> otg.VxlanV4TunnelDestinationIPModeUnicast + 690, // 464: otg.VxlanV4TunnelDestinationIPMode.multicast:type_name -> otg.VxlanV4TunnelDestinationIPModeMulticast + 87, // 465: otg.VxlanV6TunnelDestinationIPMode.choice:type_name -> otg.VxlanV6TunnelDestinationIPMode.Choice.Enum + 686, // 466: otg.VxlanV6TunnelDestinationIPMode.unicast:type_name -> otg.VxlanV6TunnelDestinationIPModeUnicast + 691, // 467: otg.VxlanV6TunnelDestinationIPMode.multicast:type_name -> otg.VxlanV6TunnelDestinationIPModeMulticast + 688, // 468: otg.VxlanV4TunnelDestinationIPModeUnicast.vteps:type_name -> otg.VxlanV4TunnelDestinationIPModeUnicastVtep + 689, // 469: otg.VxlanV6TunnelDestinationIPModeUnicast.vteps:type_name -> otg.VxlanV6TunnelDestinationIPModeUnicastVtep + 687, // 470: otg.VxlanV4TunnelDestinationIPModeUnicastVtep.arp_suppression_cache:type_name -> otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + 687, // 471: otg.VxlanV6TunnelDestinationIPModeUnicastVtep.arp_suppression_cache:type_name -> otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + 693, // 472: otg.DeviceRsvp.ipv4_interfaces:type_name -> otg.RsvpIpv4Interface + 694, // 473: otg.DeviceRsvp.lsp_ipv4_interfaces:type_name -> otg.RsvpLspIpv4Interface + 695, // 474: otg.RsvpLspIpv4Interface.p2p_egress_ipv4_lsps:type_name -> otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + 696, // 475: otg.RsvpLspIpv4Interface.p2p_ingress_ipv4_lsps:type_name -> otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + 88, // 476: otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.reservation_style:type_name -> otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.ReservationStyle.Enum + 697, // 477: otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.session_attribute:type_name -> otg.RsvpSessionAttribute + 699, // 478: otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.tspec:type_name -> otg.RsvpTspec + 700, // 479: otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.fast_reroute:type_name -> otg.RsvpFastReroute + 701, // 480: otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.ero:type_name -> otg.RsvpEro + 698, // 481: otg.RsvpSessionAttribute.resource_affinities:type_name -> otg.RsvpResourceAffinities + 89, // 482: otg.RsvpEro.prepend_neighbor_ip:type_name -> otg.RsvpEro.PrependNeighborIp.Enum + 702, // 483: otg.RsvpEro.subobjects:type_name -> otg.RsvpEroSubobject + 90, // 484: otg.RsvpEroSubobject.type:type_name -> otg.RsvpEroSubobject.Type.Enum + 91, // 485: otg.RsvpEroSubobject.hop_type:type_name -> otg.RsvpEroSubobject.HopType.Enum + 704, // 486: otg.DeviceDhcpServer.ipv4_interfaces:type_name -> otg.DhcpServerV4 + 707, // 487: otg.DeviceDhcpServer.ipv6_interfaces:type_name -> otg.DhcpServerV6 + 705, // 488: otg.DhcpServerV4.address_pools:type_name -> otg.DhcpServerV4Pool + 706, // 489: otg.DhcpServerV4Pool.options:type_name -> otg.DhcpServerV4PoolOption + 709, // 490: otg.DhcpServerV6.leases:type_name -> otg.DhcpV6ServerLease + 708, // 491: otg.DhcpServerV6.options:type_name -> otg.Dhcpv6ServerOptions + 714, // 492: otg.Dhcpv6ServerOptions.dns:type_name -> otg.DhcpV6ServerDns + 498, // 493: otg.Dhcpv6ServerOptions.vendor_info:type_name -> otg.Dhcpv6ServerOptionsVendorInfo + 503, // 494: otg.Dhcpv6ServerOptions.bootfile_url:type_name -> otg.Dhcpv6ServerOptionsBootfileUrl + 710, // 495: otg.DhcpV6ServerLease.ia_type:type_name -> otg.Dhcpv6ServerIaType + 92, // 496: otg.Dhcpv6ServerIaType.choice:type_name -> otg.Dhcpv6ServerIaType.Choice.Enum + 711, // 497: otg.Dhcpv6ServerIaType.iana:type_name -> otg.Dhcpv6ServerPoolInfo + 711, // 498: otg.Dhcpv6ServerIaType.iata:type_name -> otg.Dhcpv6ServerPoolInfo + 712, // 499: otg.Dhcpv6ServerIaType.iapd:type_name -> otg.Dhcpv6ServerIapdPoolInfo + 713, // 500: otg.Dhcpv6ServerIaType.ianapd:type_name -> otg.Dhcpv6ServerIanapdPoolInfo + 711, // 501: otg.Dhcpv6ServerIanapdPoolInfo.iana:type_name -> otg.Dhcpv6ServerPoolInfo + 712, // 502: otg.Dhcpv6ServerIanapdPoolInfo.iapd:type_name -> otg.Dhcpv6ServerIapdPoolInfo + 715, // 503: otg.DhcpV6ServerDns.secondary_dns:type_name -> otg.DhcpV6ServerSecondaryDns + 717, // 504: otg.DeviceOspfv2Router.router_id:type_name -> otg.Ospfv2RouterId + 719, // 505: otg.DeviceOspfv2Router.graceful_restart:type_name -> otg.Ospfv2GracefulRestart + 718, // 506: otg.DeviceOspfv2Router.capabilities:type_name -> otg.Ospfv2Options + 720, // 507: otg.DeviceOspfv2Router.interfaces:type_name -> otg.Ospfv2Interface + 729, // 508: otg.DeviceOspfv2Router.v4_routes:type_name -> otg.Ospfv2V4RouteRange + 93, // 509: otg.Ospfv2RouterId.choice:type_name -> otg.Ospfv2RouterId.Choice.Enum + 721, // 510: otg.Ospfv2Interface.area:type_name -> otg.Ospfv2InterfaceArea + 722, // 511: otg.Ospfv2Interface.network_type:type_name -> otg.Ospfv2InterfaceNetworkType + 525, // 512: otg.Ospfv2Interface.traffic_engineering:type_name -> otg.LinkStateTE + 726, // 513: otg.Ospfv2Interface.authentication:type_name -> otg.Ospfv2InterfaceAuthentication + 724, // 514: otg.Ospfv2Interface.advanced:type_name -> otg.Ospfv2InterfaceAdvanced + 728, // 515: otg.Ospfv2Interface.link_protection:type_name -> otg.Ospfv2InterfaceLinkProtection + 94, // 516: otg.Ospfv2InterfaceArea.choice:type_name -> otg.Ospfv2InterfaceArea.Choice.Enum + 95, // 517: otg.Ospfv2InterfaceNetworkType.choice:type_name -> otg.Ospfv2InterfaceNetworkType.Choice.Enum + 723, // 518: otg.Ospfv2InterfaceNetworkType.point_to_multipoint:type_name -> otg.Ospfv2InterfaceNeighbor + 96, // 519: otg.Ospfv2InterfaceAuthentication.choice:type_name -> otg.Ospfv2InterfaceAuthentication.Choice.Enum + 727, // 520: otg.Ospfv2InterfaceAuthentication.md5s:type_name -> otg.Ospfv2AuthenticationMd5 + 535, // 521: otg.Ospfv2V4RouteRange.addresses:type_name -> otg.V4RouteAddress + 730, // 522: otg.Ospfv2V4RouteRange.route_origin:type_name -> otg.Ospfv2V4RRRouteOrigin + 97, // 523: otg.Ospfv2V4RRRouteOrigin.choice:type_name -> otg.Ospfv2V4RRRouteOrigin.Choice.Enum + 731, // 524: otg.Ospfv2V4RRRouteOrigin.intra_area:type_name -> otg.Ospfv2V4RRIntraArea + 732, // 525: otg.Ospfv2V4RRRouteOrigin.inter_area:type_name -> otg.Ospfv2V4RRInterArea + 733, // 526: otg.Ospfv2V4RRRouteOrigin.external_type_1:type_name -> otg.Ospfv2V4RRExternalType1 + 734, // 527: otg.Ospfv2V4RRRouteOrigin.external_type_2:type_name -> otg.Ospfv2V4RRExternalType2 + 735, // 528: otg.Ospfv2V4RRRouteOrigin.nssa_external:type_name -> otg.Ospfv2V4RRNssaExternal + 736, // 529: otg.Ospfv2V4RRIntraArea.flags:type_name -> otg.Ospfv2V4RRExtdPrefixFlags + 736, // 530: otg.Ospfv2V4RRInterArea.flags:type_name -> otg.Ospfv2V4RRExtdPrefixFlags + 736, // 531: otg.Ospfv2V4RRExternalType1.flags:type_name -> otg.Ospfv2V4RRExtdPrefixFlags + 736, // 532: otg.Ospfv2V4RRExternalType2.flags:type_name -> otg.Ospfv2V4RRExtdPrefixFlags + 736, // 533: otg.Ospfv2V4RRNssaExternal.flags:type_name -> otg.Ospfv2V4RRExtdPrefixFlags + 738, // 534: otg.Flow.tx_rx:type_name -> otg.FlowTxRx + 741, // 535: otg.Flow.packet:type_name -> otg.FlowHeader + 741, // 536: otg.Flow.egress_packet:type_name -> otg.FlowHeader + 833, // 537: otg.Flow.size:type_name -> otg.FlowSize + 838, // 538: otg.Flow.rate:type_name -> otg.FlowRate + 839, // 539: otg.Flow.duration:type_name -> otg.FlowDuration + 846, // 540: otg.Flow.metrics:type_name -> otg.FlowMetrics + 98, // 541: otg.FlowTxRx.choice:type_name -> otg.FlowTxRx.Choice.Enum + 739, // 542: otg.FlowTxRx.port:type_name -> otg.FlowPort + 740, // 543: otg.FlowTxRx.device:type_name -> otg.FlowRouter + 99, // 544: otg.FlowRouter.mode:type_name -> otg.FlowRouter.Mode.Enum + 100, // 545: otg.FlowHeader.choice:type_name -> otg.FlowHeader.Choice.Enum + 742, // 546: otg.FlowHeader.custom:type_name -> otg.FlowCustom + 744, // 547: otg.FlowHeader.ethernet:type_name -> otg.FlowEthernet + 745, // 548: otg.FlowHeader.vlan:type_name -> otg.FlowVlan + 746, // 549: otg.FlowHeader.vxlan:type_name -> otg.FlowVxlan + 747, // 550: otg.FlowHeader.ipv4:type_name -> otg.FlowIpv4 + 756, // 551: otg.FlowHeader.ipv6:type_name -> otg.FlowIpv6 + 758, // 552: otg.FlowHeader.pfcpause:type_name -> otg.FlowPfcPause + 759, // 553: otg.FlowHeader.ethernetpause:type_name -> otg.FlowEthernetPause + 760, // 554: otg.FlowHeader.tcp:type_name -> otg.FlowTcp + 761, // 555: otg.FlowHeader.udp:type_name -> otg.FlowUdp + 762, // 556: otg.FlowHeader.gre:type_name -> otg.FlowGre + 763, // 557: otg.FlowHeader.gtpv1:type_name -> otg.FlowGtpv1 + 765, // 558: otg.FlowHeader.gtpv2:type_name -> otg.FlowGtpv2 + 766, // 559: otg.FlowHeader.arp:type_name -> otg.FlowArp + 767, // 560: otg.FlowHeader.icmp:type_name -> otg.FlowIcmp + 769, // 561: otg.FlowHeader.icmpv6:type_name -> otg.FlowIcmpv6 + 771, // 562: otg.FlowHeader.ppp:type_name -> otg.FlowPpp + 772, // 563: otg.FlowHeader.igmpv1:type_name -> otg.FlowIgmpv1 + 773, // 564: otg.FlowHeader.mpls:type_name -> otg.FlowMpls + 774, // 565: otg.FlowHeader.snmpv2c:type_name -> otg.FlowSnmpv2c + 781, // 566: otg.FlowHeader.rsvp:type_name -> otg.FlowRsvp + 743, // 567: otg.FlowCustom.metric_tags:type_name -> otg.FlowCustomMetricTag + 1030, // 568: otg.FlowEthernet.dst:type_name -> otg.PatternFlowEthernetDst + 1033, // 569: otg.FlowEthernet.src:type_name -> otg.PatternFlowEthernetSrc + 1036, // 570: otg.FlowEthernet.ether_type:type_name -> otg.PatternFlowEthernetEtherType + 1039, // 571: otg.FlowEthernet.pfc_queue:type_name -> otg.PatternFlowEthernetPfcQueue + 1042, // 572: otg.FlowVlan.priority:type_name -> otg.PatternFlowVlanPriority + 1045, // 573: otg.FlowVlan.cfi:type_name -> otg.PatternFlowVlanCfi + 1048, // 574: otg.FlowVlan.id:type_name -> otg.PatternFlowVlanId + 1051, // 575: otg.FlowVlan.tpid:type_name -> otg.PatternFlowVlanTpid + 1054, // 576: otg.FlowVxlan.flags:type_name -> otg.PatternFlowVxlanFlags + 1057, // 577: otg.FlowVxlan.reserved0:type_name -> otg.PatternFlowVxlanReserved0 + 1060, // 578: otg.FlowVxlan.vni:type_name -> otg.PatternFlowVxlanVni + 1063, // 579: otg.FlowVxlan.reserved1:type_name -> otg.PatternFlowVxlanReserved1 + 1066, // 580: otg.FlowIpv4.version:type_name -> otg.PatternFlowIpv4Version + 1069, // 581: otg.FlowIpv4.header_length:type_name -> otg.PatternFlowIpv4HeaderLength + 752, // 582: otg.FlowIpv4.priority:type_name -> otg.FlowIpv4Priority + 1072, // 583: otg.FlowIpv4.total_length:type_name -> otg.PatternFlowIpv4TotalLength + 1075, // 584: otg.FlowIpv4.identification:type_name -> otg.PatternFlowIpv4Identification + 1078, // 585: otg.FlowIpv4.reserved:type_name -> otg.PatternFlowIpv4Reserved + 1081, // 586: otg.FlowIpv4.dont_fragment:type_name -> otg.PatternFlowIpv4DontFragment + 1084, // 587: otg.FlowIpv4.more_fragments:type_name -> otg.PatternFlowIpv4MoreFragments + 1087, // 588: otg.FlowIpv4.fragment_offset:type_name -> otg.PatternFlowIpv4FragmentOffset + 1090, // 589: otg.FlowIpv4.time_to_live:type_name -> otg.PatternFlowIpv4TimeToLive + 1093, // 590: otg.FlowIpv4.protocol:type_name -> otg.PatternFlowIpv4Protocol + 1094, // 591: otg.FlowIpv4.header_checksum:type_name -> otg.PatternFlowIpv4HeaderChecksum + 1098, // 592: otg.FlowIpv4.src:type_name -> otg.PatternFlowIpv4Src + 1102, // 593: otg.FlowIpv4.dst:type_name -> otg.PatternFlowIpv4Dst + 748, // 594: otg.FlowIpv4.options:type_name -> otg.FlowIpv4Options + 101, // 595: otg.FlowIpv4Options.choice:type_name -> otg.FlowIpv4Options.Choice.Enum + 749, // 596: otg.FlowIpv4Options.custom:type_name -> otg.FlowIpv4OptionsCustom + 750, // 597: otg.FlowIpv4OptionsCustom.type:type_name -> otg.FlowIpv4OptionsCustomType + 751, // 598: otg.FlowIpv4OptionsCustom.length:type_name -> otg.FlowIpv4OptionsCustomLength + 1104, // 599: otg.FlowIpv4OptionsCustomType.copied_flag:type_name -> otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag + 1106, // 600: otg.FlowIpv4OptionsCustomType.option_class:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionClass + 1108, // 601: otg.FlowIpv4OptionsCustomType.option_number:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionNumber + 102, // 602: otg.FlowIpv4OptionsCustomLength.choice:type_name -> otg.FlowIpv4OptionsCustomLength.Choice.Enum + 103, // 603: otg.FlowIpv4Priority.choice:type_name -> otg.FlowIpv4Priority.Choice.Enum + 1111, // 604: otg.FlowIpv4Priority.raw:type_name -> otg.PatternFlowIpv4PriorityRaw + 754, // 605: otg.FlowIpv4Priority.tos:type_name -> otg.FlowIpv4Tos + 753, // 606: otg.FlowIpv4Priority.dscp:type_name -> otg.FlowIpv4Dscp + 1114, // 607: otg.FlowIpv4Dscp.phb:type_name -> otg.PatternFlowIpv4DscpPhb + 1117, // 608: otg.FlowIpv4Dscp.ecn:type_name -> otg.PatternFlowIpv4DscpEcn + 1120, // 609: otg.FlowIpv4Tos.precedence:type_name -> otg.PatternFlowIpv4TosPrecedence + 1123, // 610: otg.FlowIpv4Tos.delay:type_name -> otg.PatternFlowIpv4TosDelay + 1126, // 611: otg.FlowIpv4Tos.throughput:type_name -> otg.PatternFlowIpv4TosThroughput + 1129, // 612: otg.FlowIpv4Tos.reliability:type_name -> otg.PatternFlowIpv4TosReliability + 1132, // 613: otg.FlowIpv4Tos.monetary:type_name -> otg.PatternFlowIpv4TosMonetary + 1135, // 614: otg.FlowIpv4Tos.unused:type_name -> otg.PatternFlowIpv4TosUnused + 104, // 615: otg.FlowIpv4Auto.choice:type_name -> otg.FlowIpv4Auto.Choice.Enum + 1138, // 616: otg.FlowIpv6.version:type_name -> otg.PatternFlowIpv6Version + 1141, // 617: otg.FlowIpv6.traffic_class:type_name -> otg.PatternFlowIpv6TrafficClass + 1145, // 618: otg.FlowIpv6.flow_label:type_name -> otg.PatternFlowIpv6FlowLabel + 1148, // 619: otg.FlowIpv6.payload_length:type_name -> otg.PatternFlowIpv6PayloadLength + 1151, // 620: otg.FlowIpv6.next_header:type_name -> otg.PatternFlowIpv6NextHeader + 1154, // 621: otg.FlowIpv6.hop_limit:type_name -> otg.PatternFlowIpv6HopLimit + 1157, // 622: otg.FlowIpv6.src:type_name -> otg.PatternFlowIpv6Src + 1160, // 623: otg.FlowIpv6.dst:type_name -> otg.PatternFlowIpv6Dst + 105, // 624: otg.FlowIpv6Auto.choice:type_name -> otg.FlowIpv6Auto.Choice.Enum + 1163, // 625: otg.FlowPfcPause.dst:type_name -> otg.PatternFlowPfcPauseDst + 1166, // 626: otg.FlowPfcPause.src:type_name -> otg.PatternFlowPfcPauseSrc + 1169, // 627: otg.FlowPfcPause.ether_type:type_name -> otg.PatternFlowPfcPauseEtherType + 1172, // 628: otg.FlowPfcPause.control_op_code:type_name -> otg.PatternFlowPfcPauseControlOpCode + 1175, // 629: otg.FlowPfcPause.class_enable_vector:type_name -> otg.PatternFlowPfcPauseClassEnableVector + 1178, // 630: otg.FlowPfcPause.pause_class_0:type_name -> otg.PatternFlowPfcPausePauseClass0 + 1181, // 631: otg.FlowPfcPause.pause_class_1:type_name -> otg.PatternFlowPfcPausePauseClass1 + 1184, // 632: otg.FlowPfcPause.pause_class_2:type_name -> otg.PatternFlowPfcPausePauseClass2 + 1187, // 633: otg.FlowPfcPause.pause_class_3:type_name -> otg.PatternFlowPfcPausePauseClass3 + 1190, // 634: otg.FlowPfcPause.pause_class_4:type_name -> otg.PatternFlowPfcPausePauseClass4 + 1193, // 635: otg.FlowPfcPause.pause_class_5:type_name -> otg.PatternFlowPfcPausePauseClass5 + 1196, // 636: otg.FlowPfcPause.pause_class_6:type_name -> otg.PatternFlowPfcPausePauseClass6 + 1199, // 637: otg.FlowPfcPause.pause_class_7:type_name -> otg.PatternFlowPfcPausePauseClass7 + 1202, // 638: otg.FlowEthernetPause.dst:type_name -> otg.PatternFlowEthernetPauseDst + 1205, // 639: otg.FlowEthernetPause.src:type_name -> otg.PatternFlowEthernetPauseSrc + 1208, // 640: otg.FlowEthernetPause.ether_type:type_name -> otg.PatternFlowEthernetPauseEtherType + 1211, // 641: otg.FlowEthernetPause.control_op_code:type_name -> otg.PatternFlowEthernetPauseControlOpCode + 1214, // 642: otg.FlowEthernetPause.time:type_name -> otg.PatternFlowEthernetPauseTime + 1218, // 643: otg.FlowTcp.src_port:type_name -> otg.PatternFlowTcpSrcPort + 1222, // 644: otg.FlowTcp.dst_port:type_name -> otg.PatternFlowTcpDstPort + 1225, // 645: otg.FlowTcp.seq_num:type_name -> otg.PatternFlowTcpSeqNum + 1228, // 646: otg.FlowTcp.ack_num:type_name -> otg.PatternFlowTcpAckNum + 1231, // 647: otg.FlowTcp.data_offset:type_name -> otg.PatternFlowTcpDataOffset + 1234, // 648: otg.FlowTcp.ecn_ns:type_name -> otg.PatternFlowTcpEcnNs + 1237, // 649: otg.FlowTcp.ecn_cwr:type_name -> otg.PatternFlowTcpEcnCwr + 1240, // 650: otg.FlowTcp.ecn_echo:type_name -> otg.PatternFlowTcpEcnEcho + 1243, // 651: otg.FlowTcp.ctl_urg:type_name -> otg.PatternFlowTcpCtlUrg + 1246, // 652: otg.FlowTcp.ctl_ack:type_name -> otg.PatternFlowTcpCtlAck + 1249, // 653: otg.FlowTcp.ctl_psh:type_name -> otg.PatternFlowTcpCtlPsh + 1252, // 654: otg.FlowTcp.ctl_rst:type_name -> otg.PatternFlowTcpCtlRst + 1255, // 655: otg.FlowTcp.ctl_syn:type_name -> otg.PatternFlowTcpCtlSyn + 1258, // 656: otg.FlowTcp.ctl_fin:type_name -> otg.PatternFlowTcpCtlFin + 1261, // 657: otg.FlowTcp.window:type_name -> otg.PatternFlowTcpWindow + 1262, // 658: otg.FlowTcp.checksum:type_name -> otg.PatternFlowTcpChecksum + 1266, // 659: otg.FlowUdp.src_port:type_name -> otg.PatternFlowUdpSrcPort + 1270, // 660: otg.FlowUdp.dst_port:type_name -> otg.PatternFlowUdpDstPort + 1273, // 661: otg.FlowUdp.length:type_name -> otg.PatternFlowUdpLength + 1274, // 662: otg.FlowUdp.checksum:type_name -> otg.PatternFlowUdpChecksum + 1277, // 663: otg.FlowGre.checksum_present:type_name -> otg.PatternFlowGreChecksumPresent + 1280, // 664: otg.FlowGre.reserved0:type_name -> otg.PatternFlowGreReserved0 + 1283, // 665: otg.FlowGre.version:type_name -> otg.PatternFlowGreVersion + 1286, // 666: otg.FlowGre.protocol:type_name -> otg.PatternFlowGreProtocol + 1287, // 667: otg.FlowGre.checksum:type_name -> otg.PatternFlowGreChecksum + 1290, // 668: otg.FlowGre.reserved1:type_name -> otg.PatternFlowGreReserved1 + 1293, // 669: otg.FlowGtpv1.version:type_name -> otg.PatternFlowGtpv1Version + 1296, // 670: otg.FlowGtpv1.protocol_type:type_name -> otg.PatternFlowGtpv1ProtocolType + 1299, // 671: otg.FlowGtpv1.reserved:type_name -> otg.PatternFlowGtpv1Reserved + 1302, // 672: otg.FlowGtpv1.e_flag:type_name -> otg.PatternFlowGtpv1EFlag + 1305, // 673: otg.FlowGtpv1.s_flag:type_name -> otg.PatternFlowGtpv1SFlag + 1308, // 674: otg.FlowGtpv1.pn_flag:type_name -> otg.PatternFlowGtpv1PnFlag + 1311, // 675: otg.FlowGtpv1.message_type:type_name -> otg.PatternFlowGtpv1MessageType + 1314, // 676: otg.FlowGtpv1.message_length:type_name -> otg.PatternFlowGtpv1MessageLength + 1317, // 677: otg.FlowGtpv1.teid:type_name -> otg.PatternFlowGtpv1Teid + 1320, // 678: otg.FlowGtpv1.squence_number:type_name -> otg.PatternFlowGtpv1SquenceNumber + 1323, // 679: otg.FlowGtpv1.n_pdu_number:type_name -> otg.PatternFlowGtpv1NPduNumber + 1326, // 680: otg.FlowGtpv1.next_extension_header_type:type_name -> otg.PatternFlowGtpv1NextExtensionHeaderType + 764, // 681: otg.FlowGtpv1.extension_headers:type_name -> otg.FlowGtpExtension + 1329, // 682: otg.FlowGtpExtension.extension_length:type_name -> otg.PatternFlowGtpExtensionExtensionLength + 1332, // 683: otg.FlowGtpExtension.contents:type_name -> otg.PatternFlowGtpExtensionContents + 1335, // 684: otg.FlowGtpExtension.next_extension_header:type_name -> otg.PatternFlowGtpExtensionNextExtensionHeader + 1338, // 685: otg.FlowGtpv2.version:type_name -> otg.PatternFlowGtpv2Version + 1341, // 686: otg.FlowGtpv2.piggybacking_flag:type_name -> otg.PatternFlowGtpv2PiggybackingFlag + 1344, // 687: otg.FlowGtpv2.teid_flag:type_name -> otg.PatternFlowGtpv2TeidFlag + 1347, // 688: otg.FlowGtpv2.spare1:type_name -> otg.PatternFlowGtpv2Spare1 + 1350, // 689: otg.FlowGtpv2.message_type:type_name -> otg.PatternFlowGtpv2MessageType + 1353, // 690: otg.FlowGtpv2.message_length:type_name -> otg.PatternFlowGtpv2MessageLength + 1356, // 691: otg.FlowGtpv2.teid:type_name -> otg.PatternFlowGtpv2Teid + 1359, // 692: otg.FlowGtpv2.sequence_number:type_name -> otg.PatternFlowGtpv2SequenceNumber + 1362, // 693: otg.FlowGtpv2.spare2:type_name -> otg.PatternFlowGtpv2Spare2 + 1365, // 694: otg.FlowArp.hardware_type:type_name -> otg.PatternFlowArpHardwareType + 1368, // 695: otg.FlowArp.protocol_type:type_name -> otg.PatternFlowArpProtocolType + 1371, // 696: otg.FlowArp.hardware_length:type_name -> otg.PatternFlowArpHardwareLength + 1374, // 697: otg.FlowArp.protocol_length:type_name -> otg.PatternFlowArpProtocolLength + 1377, // 698: otg.FlowArp.operation:type_name -> otg.PatternFlowArpOperation + 1380, // 699: otg.FlowArp.sender_hardware_addr:type_name -> otg.PatternFlowArpSenderHardwareAddr + 1383, // 700: otg.FlowArp.sender_protocol_addr:type_name -> otg.PatternFlowArpSenderProtocolAddr + 1386, // 701: otg.FlowArp.target_hardware_addr:type_name -> otg.PatternFlowArpTargetHardwareAddr + 1389, // 702: otg.FlowArp.target_protocol_addr:type_name -> otg.PatternFlowArpTargetProtocolAddr + 106, // 703: otg.FlowIcmp.choice:type_name -> otg.FlowIcmp.Choice.Enum + 768, // 704: otg.FlowIcmp.echo:type_name -> otg.FlowIcmpEcho + 1392, // 705: otg.FlowIcmpEcho.type:type_name -> otg.PatternFlowIcmpEchoType + 1395, // 706: otg.FlowIcmpEcho.code:type_name -> otg.PatternFlowIcmpEchoCode + 1396, // 707: otg.FlowIcmpEcho.checksum:type_name -> otg.PatternFlowIcmpEchoChecksum + 1399, // 708: otg.FlowIcmpEcho.identifier:type_name -> otg.PatternFlowIcmpEchoIdentifier + 1402, // 709: otg.FlowIcmpEcho.sequence_number:type_name -> otg.PatternFlowIcmpEchoSequenceNumber + 107, // 710: otg.FlowIcmpv6.choice:type_name -> otg.FlowIcmpv6.Choice.Enum + 770, // 711: otg.FlowIcmpv6.echo:type_name -> otg.FlowIcmpv6Echo + 1412, // 712: otg.FlowIcmpv6Echo.type:type_name -> otg.PatternFlowIcmpv6EchoType + 1415, // 713: otg.FlowIcmpv6Echo.code:type_name -> otg.PatternFlowIcmpv6EchoCode + 1418, // 714: otg.FlowIcmpv6Echo.identifier:type_name -> otg.PatternFlowIcmpv6EchoIdentifier + 1421, // 715: otg.FlowIcmpv6Echo.sequence_number:type_name -> otg.PatternFlowIcmpv6EchoSequenceNumber + 1422, // 716: otg.FlowIcmpv6Echo.checksum:type_name -> otg.PatternFlowIcmpv6EchoChecksum + 1426, // 717: otg.FlowPpp.address:type_name -> otg.PatternFlowPppAddress + 1429, // 718: otg.FlowPpp.control:type_name -> otg.PatternFlowPppControl + 1432, // 719: otg.FlowPpp.protocol_type:type_name -> otg.PatternFlowPppProtocolType + 1435, // 720: otg.FlowIgmpv1.version:type_name -> otg.PatternFlowIgmpv1Version + 1438, // 721: otg.FlowIgmpv1.type:type_name -> otg.PatternFlowIgmpv1Type + 1441, // 722: otg.FlowIgmpv1.unused:type_name -> otg.PatternFlowIgmpv1Unused + 1442, // 723: otg.FlowIgmpv1.checksum:type_name -> otg.PatternFlowIgmpv1Checksum + 1445, // 724: otg.FlowIgmpv1.group_address:type_name -> otg.PatternFlowIgmpv1GroupAddress + 1448, // 725: otg.FlowMpls.label:type_name -> otg.PatternFlowMplsLabel + 1451, // 726: otg.FlowMpls.traffic_class:type_name -> otg.PatternFlowMplsTrafficClass + 1454, // 727: otg.FlowMpls.bottom_of_stack:type_name -> otg.PatternFlowMplsBottomOfStack + 1457, // 728: otg.FlowMpls.time_to_live:type_name -> otg.PatternFlowMplsTimeToLive + 1459, // 729: otg.FlowSnmpv2c.version:type_name -> otg.PatternFlowSnmpv2cVersion + 775, // 730: otg.FlowSnmpv2c.data:type_name -> otg.FlowSnmpv2cData + 108, // 731: otg.FlowSnmpv2cData.choice:type_name -> otg.FlowSnmpv2cData.Choice.Enum + 776, // 732: otg.FlowSnmpv2cData.get_request:type_name -> otg.FlowSnmpv2cPDU + 776, // 733: otg.FlowSnmpv2cData.get_next_request:type_name -> otg.FlowSnmpv2cPDU + 776, // 734: otg.FlowSnmpv2cData.response:type_name -> otg.FlowSnmpv2cPDU + 776, // 735: otg.FlowSnmpv2cData.set_request:type_name -> otg.FlowSnmpv2cPDU + 777, // 736: otg.FlowSnmpv2cData.get_bulk_request:type_name -> otg.FlowSnmpv2cBulkPDU + 776, // 737: otg.FlowSnmpv2cData.inform_request:type_name -> otg.FlowSnmpv2cPDU + 776, // 738: otg.FlowSnmpv2cData.snmpv2_trap:type_name -> otg.FlowSnmpv2cPDU + 776, // 739: otg.FlowSnmpv2cData.report:type_name -> otg.FlowSnmpv2cPDU + 1461, // 740: otg.FlowSnmpv2cPDU.request_id:type_name -> otg.PatternFlowSnmpv2cPDURequestId + 109, // 741: otg.FlowSnmpv2cPDU.error_status:type_name -> otg.FlowSnmpv2cPDU.ErrorStatus.Enum + 1463, // 742: otg.FlowSnmpv2cPDU.error_index:type_name -> otg.PatternFlowSnmpv2cPDUErrorIndex + 778, // 743: otg.FlowSnmpv2cPDU.variable_bindings:type_name -> otg.FlowSnmpv2cVariableBinding + 1465, // 744: otg.FlowSnmpv2cBulkPDU.request_id:type_name -> otg.PatternFlowSnmpv2cBulkPDURequestId + 1466, // 745: otg.FlowSnmpv2cBulkPDU.non_repeaters:type_name -> otg.PatternFlowSnmpv2cBulkPDUNonRepeaters + 1468, // 746: otg.FlowSnmpv2cBulkPDU.max_repetitions:type_name -> otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions + 778, // 747: otg.FlowSnmpv2cBulkPDU.variable_bindings:type_name -> otg.FlowSnmpv2cVariableBinding + 779, // 748: otg.FlowSnmpv2cVariableBinding.value:type_name -> otg.FlowSnmpv2cVariableBindingValue + 110, // 749: otg.FlowSnmpv2cVariableBindingValue.choice:type_name -> otg.FlowSnmpv2cVariableBindingValue.Choice.Enum + 1470, // 750: otg.FlowSnmpv2cVariableBindingValue.integer_value:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue + 780, // 751: otg.FlowSnmpv2cVariableBindingValue.string_value:type_name -> otg.FlowSnmpv2cVariableBindingStringValue + 1472, // 752: otg.FlowSnmpv2cVariableBindingValue.ip_address_value:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue + 1474, // 753: otg.FlowSnmpv2cVariableBindingValue.counter_value:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueCounterValue + 1476, // 754: otg.FlowSnmpv2cVariableBindingValue.timeticks_value:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue + 1478, // 755: otg.FlowSnmpv2cVariableBindingValue.big_counter_value:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue + 1480, // 756: otg.FlowSnmpv2cVariableBindingValue.unsigned_integer_value:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue + 111, // 757: otg.FlowSnmpv2cVariableBindingStringValue.choice:type_name -> otg.FlowSnmpv2cVariableBindingStringValue.Choice.Enum + 112, // 758: otg.FlowRsvp.flag:type_name -> otg.FlowRsvp.Flag.Enum + 1483, // 759: otg.FlowRsvp.rsvp_checksum:type_name -> otg.PatternFlowRsvpRsvpChecksum + 1485, // 760: otg.FlowRsvp.time_to_live:type_name -> otg.PatternFlowRsvpTimeToLive + 1487, // 761: otg.FlowRsvp.reserved:type_name -> otg.PatternFlowRsvpReserved + 782, // 762: otg.FlowRsvp.rsvp_length:type_name -> otg.FlowRSVPLength + 783, // 763: otg.FlowRsvp.message_type:type_name -> otg.FlowRSVPMessage + 113, // 764: otg.FlowRSVPLength.choice:type_name -> otg.FlowRSVPLength.Choice.Enum + 114, // 765: otg.FlowRSVPMessage.choice:type_name -> otg.FlowRSVPMessage.Choice.Enum + 784, // 766: otg.FlowRSVPMessage.path:type_name -> otg.FlowRSVPPathMessage + 785, // 767: otg.FlowRSVPPathMessage.objects:type_name -> otg.FlowRSVPPathObjects + 787, // 768: otg.FlowRSVPPathObjects.class_num:type_name -> otg.FlowRSVPPathObjectsClass + 115, // 769: otg.FlowRSVPObjectLength.choice:type_name -> otg.FlowRSVPObjectLength.Choice.Enum + 116, // 770: otg.FlowRSVPPathObjectsClass.choice:type_name -> otg.FlowRSVPPathObjectsClass.Choice.Enum + 788, // 771: otg.FlowRSVPPathObjectsClass.session:type_name -> otg.FlowRSVPPathObjectsClassSession + 792, // 772: otg.FlowRSVPPathObjectsClass.rsvp_hop:type_name -> otg.FlowRSVPPathObjectsClassRsvpHop + 795, // 773: otg.FlowRSVPPathObjectsClass.time_values:type_name -> otg.FlowRSVPPathObjectsClassTimeValues + 798, // 774: otg.FlowRSVPPathObjectsClass.explicit_route:type_name -> otg.FlowRSVPPathObjectsClassExplicitRoute + 807, // 775: otg.FlowRSVPPathObjectsClass.label_request:type_name -> otg.FlowRSVPPathObjectsClassLabelRequest + 810, // 776: otg.FlowRSVPPathObjectsClass.session_attribute:type_name -> otg.FlowRSVPPathObjectsClassSessionAttribute + 816, // 777: otg.FlowRSVPPathObjectsClass.sender_template:type_name -> otg.FlowRSVPPathObjectsClassSenderTemplate + 819, // 778: otg.FlowRSVPPathObjectsClass.sender_tspec:type_name -> otg.FlowRSVPPathObjectsClassSenderTspec + 822, // 779: otg.FlowRSVPPathObjectsClass.record_route:type_name -> otg.FlowRSVPPathObjectsClassRecordRoute + 832, // 780: otg.FlowRSVPPathObjectsClass.custom:type_name -> otg.FlowRSVPPathObjectsCustom + 786, // 781: otg.FlowRSVPPathObjectsClassSession.length:type_name -> otg.FlowRSVPObjectLength + 789, // 782: otg.FlowRSVPPathObjectsClassSession.c_type:type_name -> otg.FlowRSVPPathObjectsSessionCType + 117, // 783: otg.FlowRSVPPathObjectsSessionCType.choice:type_name -> otg.FlowRSVPPathObjectsSessionCType.Choice.Enum + 790, // 784: otg.FlowRSVPPathObjectsSessionCType.lsp_tunnel_ipv4:type_name -> otg.FlowRSVPPathSessionLspTunnelIpv4 + 1489, // 785: otg.FlowRSVPPathSessionLspTunnelIpv4.ipv4_tunnel_end_point_address:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + 1491, // 786: otg.FlowRSVPPathSessionLspTunnelIpv4.reserved:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + 1493, // 787: otg.FlowRSVPPathSessionLspTunnelIpv4.tunnel_id:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + 791, // 788: otg.FlowRSVPPathSessionLspTunnelIpv4.extended_tunnel_id:type_name -> otg.FlowRSVPPathSessionExtTunnelId + 118, // 789: otg.FlowRSVPPathSessionExtTunnelId.choice:type_name -> otg.FlowRSVPPathSessionExtTunnelId.Choice.Enum + 1495, // 790: otg.FlowRSVPPathSessionExtTunnelId.as_integer:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger + 1497, // 791: otg.FlowRSVPPathSessionExtTunnelId.as_ipv4:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + 786, // 792: otg.FlowRSVPPathObjectsClassRsvpHop.length:type_name -> otg.FlowRSVPObjectLength + 793, // 793: otg.FlowRSVPPathObjectsClassRsvpHop.c_type:type_name -> otg.FlowRSVPPathObjectsRsvpHopCType + 119, // 794: otg.FlowRSVPPathObjectsRsvpHopCType.choice:type_name -> otg.FlowRSVPPathObjectsRsvpHopCType.Choice.Enum + 794, // 795: otg.FlowRSVPPathObjectsRsvpHopCType.ipv4:type_name -> otg.FlowRSVPPathRsvpHopIpv4 + 1499, // 796: otg.FlowRSVPPathRsvpHopIpv4.ipv4_address:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + 1501, // 797: otg.FlowRSVPPathRsvpHopIpv4.logical_interface_handle:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + 786, // 798: otg.FlowRSVPPathObjectsClassTimeValues.length:type_name -> otg.FlowRSVPObjectLength + 796, // 799: otg.FlowRSVPPathObjectsClassTimeValues.c_type:type_name -> otg.FlowRSVPPathObjectsTimeValuesCType + 120, // 800: otg.FlowRSVPPathObjectsTimeValuesCType.choice:type_name -> otg.FlowRSVPPathObjectsTimeValuesCType.Choice.Enum + 797, // 801: otg.FlowRSVPPathObjectsTimeValuesCType.type_1:type_name -> otg.FlowRSVPPathTimeValuesType1 + 1503, // 802: otg.FlowRSVPPathTimeValuesType1.refresh_period_r:type_name -> otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + 786, // 803: otg.FlowRSVPPathObjectsClassExplicitRoute.length:type_name -> otg.FlowRSVPObjectLength + 799, // 804: otg.FlowRSVPPathObjectsClassExplicitRoute.c_type:type_name -> otg.FlowRSVPPathObjectsClassExplicitRouteCType + 121, // 805: otg.FlowRSVPPathObjectsClassExplicitRouteCType.choice:type_name -> otg.FlowRSVPPathObjectsClassExplicitRouteCType.Choice.Enum + 800, // 806: otg.FlowRSVPPathObjectsClassExplicitRouteCType.type_1:type_name -> otg.FlowRSVPPathExplicitRouteType1 + 801, // 807: otg.FlowRSVPPathExplicitRouteType1.subobjects:type_name -> otg.FlowRSVPType1ExplicitRouteSubobjects + 802, // 808: otg.FlowRSVPType1ExplicitRouteSubobjects.type:type_name -> otg.FlowRSVPType1ExplicitRouteSubobjectsType + 122, // 809: otg.FlowRSVPType1ExplicitRouteSubobjectsType.choice:type_name -> otg.FlowRSVPType1ExplicitRouteSubobjectsType.Choice.Enum + 803, // 810: otg.FlowRSVPType1ExplicitRouteSubobjectsType.ipv4_prefix:type_name -> otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix + 804, // 811: otg.FlowRSVPType1ExplicitRouteSubobjectsType.as_number:type_name -> otg.FlowRSVPPathExplicitRouteType1ASNumber + 1505, // 812: otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix.l_bit:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + 805, // 813: otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix.length:type_name -> otg.FlowRSVPExplicitRouteLength + 1507, // 814: otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix.ipv4_address:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + 1509, // 815: otg.FlowRSVPPathExplicitRouteType1ASNumber.l_bit:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + 806, // 816: otg.FlowRSVPPathExplicitRouteType1ASNumber.length:type_name -> otg.FlowRSVPExplicitRouteASNumberLength + 123, // 817: otg.FlowRSVPExplicitRouteLength.choice:type_name -> otg.FlowRSVPExplicitRouteLength.Choice.Enum + 124, // 818: otg.FlowRSVPExplicitRouteASNumberLength.choice:type_name -> otg.FlowRSVPExplicitRouteASNumberLength.Choice.Enum + 786, // 819: otg.FlowRSVPPathObjectsClassLabelRequest.length:type_name -> otg.FlowRSVPObjectLength + 808, // 820: otg.FlowRSVPPathObjectsClassLabelRequest.c_type:type_name -> otg.FlowRSVPPathObjectsLabelRequestCType + 125, // 821: otg.FlowRSVPPathObjectsLabelRequestCType.choice:type_name -> otg.FlowRSVPPathObjectsLabelRequestCType.Choice.Enum + 809, // 822: otg.FlowRSVPPathObjectsLabelRequestCType.without_label_range:type_name -> otg.FlowRSVPPathLabelRequestWithoutLabelRange + 1511, // 823: otg.FlowRSVPPathLabelRequestWithoutLabelRange.reserved:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + 1513, // 824: otg.FlowRSVPPathLabelRequestWithoutLabelRange.l3pid:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid + 786, // 825: otg.FlowRSVPPathObjectsClassSessionAttribute.length:type_name -> otg.FlowRSVPObjectLength + 811, // 826: otg.FlowRSVPPathObjectsClassSessionAttribute.c_type:type_name -> otg.FlowRSVPPathObjectsSessionAttributeCType + 126, // 827: otg.FlowRSVPPathObjectsSessionAttributeCType.choice:type_name -> otg.FlowRSVPPathObjectsSessionAttributeCType.Choice.Enum + 812, // 828: otg.FlowRSVPPathObjectsSessionAttributeCType.lsp_tunnel:type_name -> otg.FlowRSVPPathSessionAttributeLspTunnel + 813, // 829: otg.FlowRSVPPathObjectsSessionAttributeCType.lsp_tunnel_ra:type_name -> otg.FlowRSVPPathSessionAttributeLspTunnelRa + 814, // 830: otg.FlowRSVPPathSessionAttributeLspTunnel.flags:type_name -> otg.FlowRSVPLspTunnelFlag + 815, // 831: otg.FlowRSVPPathSessionAttributeLspTunnel.name_length:type_name -> otg.FlowRSVPSessionAttributeNameLength + 814, // 832: otg.FlowRSVPPathSessionAttributeLspTunnelRa.flags:type_name -> otg.FlowRSVPLspTunnelFlag + 815, // 833: otg.FlowRSVPPathSessionAttributeLspTunnelRa.name_length:type_name -> otg.FlowRSVPSessionAttributeNameLength + 127, // 834: otg.FlowRSVPLspTunnelFlag.choice:type_name -> otg.FlowRSVPLspTunnelFlag.Choice.Enum + 128, // 835: otg.FlowRSVPSessionAttributeNameLength.choice:type_name -> otg.FlowRSVPSessionAttributeNameLength.Choice.Enum + 786, // 836: otg.FlowRSVPPathObjectsClassSenderTemplate.length:type_name -> otg.FlowRSVPObjectLength + 817, // 837: otg.FlowRSVPPathObjectsClassSenderTemplate.c_type:type_name -> otg.FlowRSVPPathObjectsSenderTemplateCType + 129, // 838: otg.FlowRSVPPathObjectsSenderTemplateCType.choice:type_name -> otg.FlowRSVPPathObjectsSenderTemplateCType.Choice.Enum + 818, // 839: otg.FlowRSVPPathObjectsSenderTemplateCType.lsp_tunnel_ipv4:type_name -> otg.FlowRSVPPathSenderTemplateLspTunnelIpv4 + 1515, // 840: otg.FlowRSVPPathSenderTemplateLspTunnelIpv4.ipv4_tunnel_sender_address:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + 1517, // 841: otg.FlowRSVPPathSenderTemplateLspTunnelIpv4.reserved:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + 1519, // 842: otg.FlowRSVPPathSenderTemplateLspTunnelIpv4.lsp_id:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + 786, // 843: otg.FlowRSVPPathObjectsClassSenderTspec.length:type_name -> otg.FlowRSVPObjectLength + 820, // 844: otg.FlowRSVPPathObjectsClassSenderTspec.c_type:type_name -> otg.FlowRSVPPathObjectsSenderTspecCType + 130, // 845: otg.FlowRSVPPathObjectsSenderTspecCType.choice:type_name -> otg.FlowRSVPPathObjectsSenderTspecCType.Choice.Enum + 821, // 846: otg.FlowRSVPPathObjectsSenderTspecCType.int_serv:type_name -> otg.FlowRSVPPathSenderTspecIntServ + 1521, // 847: otg.FlowRSVPPathSenderTspecIntServ.version:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServVersion + 1523, // 848: otg.FlowRSVPPathSenderTspecIntServ.reserved1:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved1 + 1525, // 849: otg.FlowRSVPPathSenderTspecIntServ.overall_length:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServOverallLength + 1527, // 850: otg.FlowRSVPPathSenderTspecIntServ.service_header:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader + 1529, // 851: otg.FlowRSVPPathSenderTspecIntServ.zero_bit:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServZeroBit + 1531, // 852: otg.FlowRSVPPathSenderTspecIntServ.reserved2:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved2 + 1533, // 853: otg.FlowRSVPPathSenderTspecIntServ.length_of_service_data:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + 1535, // 854: otg.FlowRSVPPathSenderTspecIntServ.parameter_id_token_bucket_tspec:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + 1537, // 855: otg.FlowRSVPPathSenderTspecIntServ.parameter_127_flag:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag + 1539, // 856: otg.FlowRSVPPathSenderTspecIntServ.parameter_127_length:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length + 1541, // 857: otg.FlowRSVPPathSenderTspecIntServ.minimum_policed_unit:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + 1543, // 858: otg.FlowRSVPPathSenderTspecIntServ.maximum_packet_size:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + 786, // 859: otg.FlowRSVPPathObjectsClassRecordRoute.length:type_name -> otg.FlowRSVPObjectLength + 823, // 860: otg.FlowRSVPPathObjectsClassRecordRoute.c_type:type_name -> otg.FlowRSVPPathObjectsRecordRouteCType + 131, // 861: otg.FlowRSVPPathObjectsRecordRouteCType.choice:type_name -> otg.FlowRSVPPathObjectsRecordRouteCType.Choice.Enum + 824, // 862: otg.FlowRSVPPathObjectsRecordRouteCType.type_1:type_name -> otg.FlowRSVPPathRecordRouteType1 + 825, // 863: otg.FlowRSVPPathRecordRouteType1.subobjects:type_name -> otg.FlowRSVPType1RecordRouteSubobjects + 826, // 864: otg.FlowRSVPType1RecordRouteSubobjects.type:type_name -> otg.FlowRSVPPathObjectsRecordRouteSubObjectType + 132, // 865: otg.FlowRSVPPathObjectsRecordRouteSubObjectType.choice:type_name -> otg.FlowRSVPPathObjectsRecordRouteSubObjectType.Choice.Enum + 827, // 866: otg.FlowRSVPPathObjectsRecordRouteSubObjectType.ipv4_address:type_name -> otg.FlowRSVPPathRecordRouteType1Ipv4Address + 829, // 867: otg.FlowRSVPPathObjectsRecordRouteSubObjectType.label:type_name -> otg.FlowRSVPPathRecordRouteType1Label + 831, // 868: otg.FlowRSVPPathRecordRouteType1Ipv4Address.length:type_name -> otg.FlowRSVPRouteRecordLength + 1545, // 869: otg.FlowRSVPPathRecordRouteType1Ipv4Address.ipv4_address:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + 1547, // 870: otg.FlowRSVPPathRecordRouteType1Ipv4Address.prefix_length:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + 828, // 871: otg.FlowRSVPPathRecordRouteType1Ipv4Address.flags:type_name -> otg.FlowRSVPRecordRouteIPv4Flag + 133, // 872: otg.FlowRSVPRecordRouteIPv4Flag.choice:type_name -> otg.FlowRSVPRecordRouteIPv4Flag.Choice.Enum + 831, // 873: otg.FlowRSVPPathRecordRouteType1Label.length:type_name -> otg.FlowRSVPRouteRecordLength + 1548, // 874: otg.FlowRSVPPathRecordRouteType1Label.flags:type_name -> otg.PatternFlowRSVPPathRecordRouteType1LabelFlags + 1549, // 875: otg.FlowRSVPPathRecordRouteType1Label.c_type:type_name -> otg.PatternFlowRSVPPathRecordRouteType1LabelCType + 830, // 876: otg.FlowRSVPPathRecordRouteType1Label.label:type_name -> otg.FlowRSVPPathRecordRouteLabel + 134, // 877: otg.FlowRSVPPathRecordRouteLabel.choice:type_name -> otg.FlowRSVPPathRecordRouteLabel.Choice.Enum + 135, // 878: otg.FlowRSVPRouteRecordLength.choice:type_name -> otg.FlowRSVPRouteRecordLength.Choice.Enum + 1551, // 879: otg.FlowRSVPPathObjectsCustom.type:type_name -> otg.PatternFlowRSVPPathObjectsCustomType + 786, // 880: otg.FlowRSVPPathObjectsCustom.length:type_name -> otg.FlowRSVPObjectLength + 136, // 881: otg.FlowSize.choice:type_name -> otg.FlowSize.Choice.Enum + 834, // 882: otg.FlowSize.increment:type_name -> otg.FlowSizeIncrement + 835, // 883: otg.FlowSize.random:type_name -> otg.FlowSizeRandom + 836, // 884: otg.FlowSize.weight_pairs:type_name -> otg.FlowSizeWeightPairs + 137, // 885: otg.FlowSizeWeightPairs.choice:type_name -> otg.FlowSizeWeightPairs.Choice.Enum + 138, // 886: otg.FlowSizeWeightPairs.predefined:type_name -> otg.FlowSizeWeightPairs.Predefined.Enum + 837, // 887: otg.FlowSizeWeightPairs.custom:type_name -> otg.FlowSizeWeightPairsCustom + 139, // 888: otg.FlowRate.choice:type_name -> otg.FlowRate.Choice.Enum + 140, // 889: otg.FlowDuration.choice:type_name -> otg.FlowDuration.Choice.Enum + 842, // 890: otg.FlowDuration.fixed_packets:type_name -> otg.FlowFixedPackets + 843, // 891: otg.FlowDuration.fixed_seconds:type_name -> otg.FlowFixedSeconds + 844, // 892: otg.FlowDuration.burst:type_name -> otg.FlowBurst + 840, // 893: otg.FlowDuration.continuous:type_name -> otg.FlowContinuous + 841, // 894: otg.FlowContinuous.delay:type_name -> otg.FlowDelay + 141, // 895: otg.FlowDelay.choice:type_name -> otg.FlowDelay.Choice.Enum + 841, // 896: otg.FlowFixedPackets.delay:type_name -> otg.FlowDelay + 841, // 897: otg.FlowFixedSeconds.delay:type_name -> otg.FlowDelay + 845, // 898: otg.FlowBurst.inter_burst_gap:type_name -> otg.FlowDurationInterBurstGap + 142, // 899: otg.FlowDurationInterBurstGap.choice:type_name -> otg.FlowDurationInterBurstGap.Choice.Enum + 849, // 900: otg.FlowMetrics.rx_tx_ratio:type_name -> otg.FlowRxTxRatio + 847, // 901: otg.FlowMetrics.latency:type_name -> otg.FlowLatencyMetrics + 848, // 902: otg.FlowMetrics.predefined_metric_tags:type_name -> otg.FlowPredefinedTags + 143, // 903: otg.FlowLatencyMetrics.mode:type_name -> otg.FlowLatencyMetrics.Mode.Enum + 144, // 904: otg.FlowRxTxRatio.choice:type_name -> otg.FlowRxTxRatio.Choice.Enum + 850, // 905: otg.FlowRxTxRatio.rx_count:type_name -> otg.FlowRxTxRatioRxCount + 853, // 906: otg.Event.link:type_name -> otg.EventLink + 852, // 907: otg.Event.rx_rate_threshold:type_name -> otg.EventRxRateThreshold + 854, // 908: otg.Event.route_advertise_withdraw:type_name -> otg.EventRouteAdvertiseWithdraw + 145, // 909: otg.EventRequest.type:type_name -> otg.EventRequest.Type.Enum + 855, // 910: otg.EventSubscription.events:type_name -> otg.EventRequest + 858, // 911: otg.Lldp.connection:type_name -> otg.LldpConnection + 859, // 912: otg.Lldp.chassis_id:type_name -> otg.LldpChassisId + 860, // 913: otg.Lldp.port_id:type_name -> otg.LldpPortId + 863, // 914: otg.Lldp.system_name:type_name -> otg.LldpSystemName + 864, // 915: otg.Lldp.org_infos:type_name -> otg.LldpOrgInfo + 146, // 916: otg.LldpConnection.choice:type_name -> otg.LldpConnection.Choice.Enum + 147, // 917: otg.LldpChassisId.choice:type_name -> otg.LldpChassisId.Choice.Enum + 861, // 918: otg.LldpChassisId.mac_address_subtype:type_name -> otg.LldpChassisMacSubType + 148, // 919: otg.LldpPortId.choice:type_name -> otg.LldpPortId.Choice.Enum + 862, // 920: otg.LldpPortId.interface_name_subtype:type_name -> otg.LldpPortInterfaceNameSubType + 149, // 921: otg.LldpChassisMacSubType.choice:type_name -> otg.LldpChassisMacSubType.Choice.Enum + 150, // 922: otg.LldpPortInterfaceNameSubType.choice:type_name -> otg.LldpPortInterfaceNameSubType.Choice.Enum + 151, // 923: otg.LldpSystemName.choice:type_name -> otg.LldpSystemName.Choice.Enum + 865, // 924: otg.LldpOrgInfo.information:type_name -> otg.LldpOrgInfoType + 152, // 925: otg.LldpOrgInfoType.choice:type_name -> otg.LldpOrgInfoType.Choice.Enum + 153, // 926: otg.Error.kind:type_name -> otg.Error.Kind.Enum + 154, // 927: otg.ConfigUpdate.choice:type_name -> otg.ConfigUpdate.Choice.Enum + 869, // 928: otg.ConfigUpdate.flows:type_name -> otg.FlowsUpdate + 155, // 929: otg.FlowsUpdate.property_names:type_name -> otg.FlowsUpdate.PropertyNames.Enum + 737, // 930: otg.FlowsUpdate.flows:type_name -> otg.Flow + 156, // 931: otg.ControlState.choice:type_name -> otg.ControlState.Choice.Enum + 871, // 932: otg.ControlState.port:type_name -> otg.StatePort + 873, // 933: otg.ControlState.protocol:type_name -> otg.StateProtocol + 872, // 934: otg.ControlState.traffic:type_name -> otg.StateTraffic + 157, // 935: otg.StatePort.choice:type_name -> otg.StatePort.Choice.Enum + 874, // 936: otg.StatePort.link:type_name -> otg.StatePortLink + 875, // 937: otg.StatePort.capture:type_name -> otg.StatePortCapture + 158, // 938: otg.StateTraffic.choice:type_name -> otg.StateTraffic.Choice.Enum + 876, // 939: otg.StateTraffic.flow_transmit:type_name -> otg.StateTrafficFlowTransmit + 159, // 940: otg.StateProtocol.choice:type_name -> otg.StateProtocol.Choice.Enum + 877, // 941: otg.StateProtocol.all:type_name -> otg.StateProtocolAll + 878, // 942: otg.StateProtocol.route:type_name -> otg.StateProtocolRoute + 879, // 943: otg.StateProtocol.lacp:type_name -> otg.StateProtocolLacp + 882, // 944: otg.StateProtocol.bgp:type_name -> otg.StateProtocolBgp + 884, // 945: otg.StateProtocol.isis:type_name -> otg.StateProtocolIsis + 886, // 946: otg.StateProtocol.ospfv2:type_name -> otg.StateProtocolOspfv2 + 160, // 947: otg.StatePortLink.state:type_name -> otg.StatePortLink.State.Enum + 161, // 948: otg.StatePortCapture.state:type_name -> otg.StatePortCapture.State.Enum + 162, // 949: otg.StateTrafficFlowTransmit.state:type_name -> otg.StateTrafficFlowTransmit.State.Enum + 163, // 950: otg.StateProtocolAll.state:type_name -> otg.StateProtocolAll.State.Enum + 164, // 951: otg.StateProtocolRoute.state:type_name -> otg.StateProtocolRoute.State.Enum + 165, // 952: otg.StateProtocolLacp.choice:type_name -> otg.StateProtocolLacp.Choice.Enum + 880, // 953: otg.StateProtocolLacp.admin:type_name -> otg.StateProtocolLacpAdmin + 881, // 954: otg.StateProtocolLacp.member_ports:type_name -> otg.StateProtocolLacpMemberPorts + 166, // 955: otg.StateProtocolLacpAdmin.state:type_name -> otg.StateProtocolLacpAdmin.State.Enum + 167, // 956: otg.StateProtocolLacpMemberPorts.state:type_name -> otg.StateProtocolLacpMemberPorts.State.Enum + 168, // 957: otg.StateProtocolBgp.choice:type_name -> otg.StateProtocolBgp.Choice.Enum + 883, // 958: otg.StateProtocolBgp.peers:type_name -> otg.StateProtocolBgpPeers + 169, // 959: otg.StateProtocolBgpPeers.state:type_name -> otg.StateProtocolBgpPeers.State.Enum + 170, // 960: otg.StateProtocolIsis.choice:type_name -> otg.StateProtocolIsis.Choice.Enum + 885, // 961: otg.StateProtocolIsis.routers:type_name -> otg.StateProtocolIsisRouters + 171, // 962: otg.StateProtocolIsisRouters.state:type_name -> otg.StateProtocolIsisRouters.State.Enum + 172, // 963: otg.StateProtocolOspfv2.choice:type_name -> otg.StateProtocolOspfv2.Choice.Enum + 887, // 964: otg.StateProtocolOspfv2.routers:type_name -> otg.StateProtocolOspfv2Routers + 173, // 965: otg.StateProtocolOspfv2Routers.state:type_name -> otg.StateProtocolOspfv2Routers.State.Enum + 174, // 966: otg.ControlAction.choice:type_name -> otg.ControlAction.Choice.Enum + 891, // 967: otg.ControlAction.protocol:type_name -> otg.ActionProtocol + 890, // 968: otg.ControlActionResponse.response:type_name -> otg.ActionResponse + 175, // 969: otg.ActionResponse.choice:type_name -> otg.ActionResponse.Choice.Enum + 892, // 970: otg.ActionResponse.protocol:type_name -> otg.ActionResponseProtocol + 176, // 971: otg.ActionProtocol.choice:type_name -> otg.ActionProtocol.Choice.Enum + 893, // 972: otg.ActionProtocol.ipv4:type_name -> otg.ActionProtocolIpv4 + 899, // 973: otg.ActionProtocol.ipv6:type_name -> otg.ActionProtocolIpv6 + 905, // 974: otg.ActionProtocol.bgp:type_name -> otg.ActionProtocolBgp + 177, // 975: otg.ActionResponseProtocol.choice:type_name -> otg.ActionResponseProtocol.Choice.Enum + 894, // 976: otg.ActionResponseProtocol.ipv4:type_name -> otg.ActionResponseProtocolIpv4 + 900, // 977: otg.ActionResponseProtocol.ipv6:type_name -> otg.ActionResponseProtocolIpv6 + 178, // 978: otg.ActionProtocolIpv4.choice:type_name -> otg.ActionProtocolIpv4.Choice.Enum + 895, // 979: otg.ActionProtocolIpv4.ping:type_name -> otg.ActionProtocolIpv4Ping + 179, // 980: otg.ActionResponseProtocolIpv4.choice:type_name -> otg.ActionResponseProtocolIpv4.Choice.Enum + 897, // 981: otg.ActionResponseProtocolIpv4.ping:type_name -> otg.ActionResponseProtocolIpv4Ping + 896, // 982: otg.ActionProtocolIpv4Ping.requests:type_name -> otg.ActionProtocolIpv4PingRequest + 898, // 983: otg.ActionResponseProtocolIpv4Ping.responses:type_name -> otg.ActionResponseProtocolIpv4PingResponse + 180, // 984: otg.ActionResponseProtocolIpv4PingResponse.result:type_name -> otg.ActionResponseProtocolIpv4PingResponse.Result.Enum + 181, // 985: otg.ActionProtocolIpv6.choice:type_name -> otg.ActionProtocolIpv6.Choice.Enum + 901, // 986: otg.ActionProtocolIpv6.ping:type_name -> otg.ActionProtocolIpv6Ping + 182, // 987: otg.ActionResponseProtocolIpv6.choice:type_name -> otg.ActionResponseProtocolIpv6.Choice.Enum + 903, // 988: otg.ActionResponseProtocolIpv6.ping:type_name -> otg.ActionResponseProtocolIpv6Ping + 902, // 989: otg.ActionProtocolIpv6Ping.requests:type_name -> otg.ActionProtocolIpv6PingRequest + 904, // 990: otg.ActionResponseProtocolIpv6Ping.responses:type_name -> otg.ActionResponseProtocolIpv6PingResponse + 183, // 991: otg.ActionResponseProtocolIpv6PingResponse.result:type_name -> otg.ActionResponseProtocolIpv6PingResponse.Result.Enum + 184, // 992: otg.ActionProtocolBgp.choice:type_name -> otg.ActionProtocolBgp.Choice.Enum + 906, // 993: otg.ActionProtocolBgp.notification:type_name -> otg.ActionProtocolBgpNotification + 907, // 994: otg.ActionProtocolBgp.initiate_graceful_restart:type_name -> otg.ActionProtocolBgpInitiateGracefulRestart + 185, // 995: otg.ActionProtocolBgpNotification.choice:type_name -> otg.ActionProtocolBgpNotification.Choice.Enum + 545, // 996: otg.ActionProtocolBgpNotification.cease:type_name -> otg.DeviceBgpCeaseError + 540, // 997: otg.ActionProtocolBgpNotification.message_header_error:type_name -> otg.DeviceBgpMessageHeaderError + 541, // 998: otg.ActionProtocolBgpNotification.open_message_error:type_name -> otg.DeviceBgpOpenMessageError + 542, // 999: otg.ActionProtocolBgpNotification.update_message_error:type_name -> otg.DeviceBgpUpdateMessageError + 543, // 1000: otg.ActionProtocolBgpNotification.hold_timer_expired:type_name -> otg.DeviceBgpHoldTimerExpired + 544, // 1001: otg.ActionProtocolBgpNotification.finite_state_machine_error:type_name -> otg.DeviceBgpFiniteStateMachineError + 546, // 1002: otg.ActionProtocolBgpNotification.custom:type_name -> otg.DeviceBgpCustomError + 908, // 1003: otg.ActionProtocolBgpInitiateGracefulRestart.notification:type_name -> otg.ActionProtocolBgpGracefulRestartNotification + 186, // 1004: otg.ActionProtocolBgpGracefulRestartNotification.choice:type_name -> otg.ActionProtocolBgpGracefulRestartNotification.Choice.Enum + 545, // 1005: otg.ActionProtocolBgpGracefulRestartNotification.cease:type_name -> otg.DeviceBgpCeaseError + 540, // 1006: otg.ActionProtocolBgpGracefulRestartNotification.message_header_error:type_name -> otg.DeviceBgpMessageHeaderError + 541, // 1007: otg.ActionProtocolBgpGracefulRestartNotification.open_message_error:type_name -> otg.DeviceBgpOpenMessageError + 542, // 1008: otg.ActionProtocolBgpGracefulRestartNotification.update_message_error:type_name -> otg.DeviceBgpUpdateMessageError + 543, // 1009: otg.ActionProtocolBgpGracefulRestartNotification.hold_timer_expired:type_name -> otg.DeviceBgpHoldTimerExpired + 544, // 1010: otg.ActionProtocolBgpGracefulRestartNotification.finite_state_machine_error:type_name -> otg.DeviceBgpFiniteStateMachineError + 546, // 1011: otg.ActionProtocolBgpGracefulRestartNotification.custom:type_name -> otg.DeviceBgpCustomError + 187, // 1012: otg.MetricsRequest.choice:type_name -> otg.MetricsRequest.Choice.Enum + 911, // 1013: otg.MetricsRequest.port:type_name -> otg.PortMetricsRequest + 913, // 1014: otg.MetricsRequest.flow:type_name -> otg.FlowMetricsRequest + 922, // 1015: otg.MetricsRequest.bgpv4:type_name -> otg.Bgpv4MetricsRequest + 924, // 1016: otg.MetricsRequest.bgpv6:type_name -> otg.Bgpv6MetricsRequest + 926, // 1017: otg.MetricsRequest.isis:type_name -> otg.IsisMetricsRequest + 928, // 1018: otg.MetricsRequest.lag:type_name -> otg.LagMetricsRequest + 930, // 1019: otg.MetricsRequest.lacp:type_name -> otg.LacpMetricsRequest + 932, // 1020: otg.MetricsRequest.lldp:type_name -> otg.LldpMetricsRequest + 934, // 1021: otg.MetricsRequest.rsvp:type_name -> otg.RsvpMetricsRequest + 936, // 1022: otg.MetricsRequest.dhcpv4_client:type_name -> otg.Dhcpv4ClientMetricsRequest + 938, // 1023: otg.MetricsRequest.dhcpv4_server:type_name -> otg.Dhcpv4ServerMetricsRequest + 940, // 1024: otg.MetricsRequest.dhcpv6_client:type_name -> otg.Dhcpv6ClientMetricsRequest + 942, // 1025: otg.MetricsRequest.dhcpv6_server:type_name -> otg.Dhcpv6ServerMetricsRequest + 944, // 1026: otg.MetricsRequest.ospfv2:type_name -> otg.Ospfv2MetricsRequest + 188, // 1027: otg.MetricsResponse.choice:type_name -> otg.MetricsResponse.Choice.Enum + 912, // 1028: otg.MetricsResponse.port_metrics:type_name -> otg.PortMetric + 916, // 1029: otg.MetricsResponse.flow_metrics:type_name -> otg.FlowMetric + 923, // 1030: otg.MetricsResponse.bgpv4_metrics:type_name -> otg.Bgpv4Metric + 925, // 1031: otg.MetricsResponse.bgpv6_metrics:type_name -> otg.Bgpv6Metric + 927, // 1032: otg.MetricsResponse.isis_metrics:type_name -> otg.IsisMetric + 929, // 1033: otg.MetricsResponse.lag_metrics:type_name -> otg.LagMetric + 931, // 1034: otg.MetricsResponse.lacp_metrics:type_name -> otg.LacpMetric + 933, // 1035: otg.MetricsResponse.lldp_metrics:type_name -> otg.LldpMetric + 935, // 1036: otg.MetricsResponse.rsvp_metrics:type_name -> otg.RsvpMetric + 937, // 1037: otg.MetricsResponse.dhcpv4client_metrics:type_name -> otg.Dhcpv4ClientMetric + 939, // 1038: otg.MetricsResponse.dhcpv4server_metrics:type_name -> otg.Dhcpv4ServerMetric + 941, // 1039: otg.MetricsResponse.dhcpv6client_metrics:type_name -> otg.Dhcpv6ClientMetric + 943, // 1040: otg.MetricsResponse.dhcpv6server_metrics:type_name -> otg.Dhcpv6ServerMetric + 945, // 1041: otg.MetricsResponse.ospfv2_metrics:type_name -> otg.Ospfv2Metric + 189, // 1042: otg.PortMetricsRequest.column_names:type_name -> otg.PortMetricsRequest.ColumnNames.Enum + 190, // 1043: otg.PortMetric.link:type_name -> otg.PortMetric.Link.Enum + 191, // 1044: otg.PortMetric.capture:type_name -> otg.PortMetric.Capture.Enum + 192, // 1045: otg.PortMetric.transmit:type_name -> otg.PortMetric.Transmit.Enum + 193, // 1046: otg.FlowMetricsRequest.metric_names:type_name -> otg.FlowMetricsRequest.MetricNames.Enum + 914, // 1047: otg.FlowMetricsRequest.tagged_metrics:type_name -> otg.FlowTaggedMetricsFilter + 194, // 1048: otg.FlowTaggedMetricsFilter.metric_names:type_name -> otg.FlowTaggedMetricsFilter.MetricNames.Enum + 915, // 1049: otg.FlowTaggedMetricsFilter.filters:type_name -> otg.FlowMetricTagFilter + 195, // 1050: otg.FlowMetric.transmit:type_name -> otg.FlowMetric.Transmit.Enum + 920, // 1051: otg.FlowMetric.timestamps:type_name -> otg.MetricTimestamp + 921, // 1052: otg.FlowMetric.latency:type_name -> otg.MetricLatency + 917, // 1053: otg.FlowMetric.tagged_metrics:type_name -> otg.FlowTaggedMetric + 918, // 1054: otg.FlowTaggedMetric.tags:type_name -> otg.FlowMetricTag + 920, // 1055: otg.FlowTaggedMetric.timestamps:type_name -> otg.MetricTimestamp + 921, // 1056: otg.FlowTaggedMetric.latency:type_name -> otg.MetricLatency + 919, // 1057: otg.FlowMetricTag.value:type_name -> otg.FlowMetricTagValue + 196, // 1058: otg.FlowMetricTagValue.choice:type_name -> otg.FlowMetricTagValue.Choice.Enum + 197, // 1059: otg.Bgpv4MetricsRequest.column_names:type_name -> otg.Bgpv4MetricsRequest.ColumnNames.Enum + 198, // 1060: otg.Bgpv4Metric.session_state:type_name -> otg.Bgpv4Metric.SessionState.Enum + 199, // 1061: otg.Bgpv4Metric.fsm_state:type_name -> otg.Bgpv4Metric.FsmState.Enum + 200, // 1062: otg.Bgpv6MetricsRequest.column_names:type_name -> otg.Bgpv6MetricsRequest.ColumnNames.Enum + 201, // 1063: otg.Bgpv6Metric.session_state:type_name -> otg.Bgpv6Metric.SessionState.Enum + 202, // 1064: otg.Bgpv6Metric.fsm_state:type_name -> otg.Bgpv6Metric.FsmState.Enum + 203, // 1065: otg.IsisMetricsRequest.column_names:type_name -> otg.IsisMetricsRequest.ColumnNames.Enum + 204, // 1066: otg.LagMetricsRequest.column_names:type_name -> otg.LagMetricsRequest.ColumnNames.Enum + 205, // 1067: otg.LagMetric.oper_status:type_name -> otg.LagMetric.OperStatus.Enum + 206, // 1068: otg.LacpMetricsRequest.column_names:type_name -> otg.LacpMetricsRequest.ColumnNames.Enum + 207, // 1069: otg.LacpMetric.activity:type_name -> otg.LacpMetric.Activity.Enum + 208, // 1070: otg.LacpMetric.timeout:type_name -> otg.LacpMetric.Timeout.Enum + 209, // 1071: otg.LacpMetric.synchronization:type_name -> otg.LacpMetric.Synchronization.Enum + 210, // 1072: otg.LldpMetricsRequest.column_names:type_name -> otg.LldpMetricsRequest.ColumnNames.Enum + 211, // 1073: otg.RsvpMetricsRequest.column_names:type_name -> otg.RsvpMetricsRequest.ColumnNames.Enum + 212, // 1074: otg.Dhcpv4ClientMetricsRequest.column_names:type_name -> otg.Dhcpv4ClientMetricsRequest.ColumnNames.Enum + 213, // 1075: otg.Dhcpv4ServerMetricsRequest.column_names:type_name -> otg.Dhcpv4ServerMetricsRequest.ColumnNames.Enum + 214, // 1076: otg.Dhcpv6ClientMetricsRequest.column_names:type_name -> otg.Dhcpv6ClientMetricsRequest.ColumnNames.Enum + 215, // 1077: otg.Dhcpv6ServerMetricsRequest.column_names:type_name -> otg.Dhcpv6ServerMetricsRequest.ColumnNames.Enum + 216, // 1078: otg.Ospfv2MetricsRequest.column_names:type_name -> otg.Ospfv2MetricsRequest.ColumnNames.Enum + 217, // 1079: otg.StatesRequest.choice:type_name -> otg.StatesRequest.Choice.Enum + 948, // 1080: otg.StatesRequest.ipv4_neighbors:type_name -> otg.Neighborsv4StatesRequest + 950, // 1081: otg.StatesRequest.ipv6_neighbors:type_name -> otg.Neighborsv6StatesRequest + 952, // 1082: otg.StatesRequest.bgp_prefixes:type_name -> otg.BgpPrefixStateRequest + 977, // 1083: otg.StatesRequest.isis_lsps:type_name -> otg.IsisLspsStateRequest + 994, // 1084: otg.StatesRequest.lldp_neighbors:type_name -> otg.LldpNeighborsStateRequest + 998, // 1085: otg.StatesRequest.rsvp_lsps:type_name -> otg.RsvpLspsStateRequest + 1004, // 1086: otg.StatesRequest.dhcpv4_interfaces:type_name -> otg.Dhcpv4InterfaceStateRequest + 1006, // 1087: otg.StatesRequest.dhcpv4_leases:type_name -> otg.Dhcpv4LeaseStateRequest + 1009, // 1088: otg.StatesRequest.dhcpv6_interfaces:type_name -> otg.Dhcpv6InterfaceStateRequest + 1013, // 1089: otg.StatesRequest.dhcpv6_leases:type_name -> otg.Dhcpv6LeaseStateRequest + 1016, // 1090: otg.StatesRequest.ospfv2_lsas:type_name -> otg.Ospfv2LsasStateRequest + 218, // 1091: otg.StatesResponse.choice:type_name -> otg.StatesResponse.Choice.Enum + 949, // 1092: otg.StatesResponse.ipv4_neighbors:type_name -> otg.Neighborsv4State + 951, // 1093: otg.StatesResponse.ipv6_neighbors:type_name -> otg.Neighborsv6State + 955, // 1094: otg.StatesResponse.bgp_prefixes:type_name -> otg.BgpPrefixesState + 978, // 1095: otg.StatesResponse.isis_lsps:type_name -> otg.IsisLspsState + 995, // 1096: otg.StatesResponse.lldp_neighbors:type_name -> otg.LldpNeighborsState + 999, // 1097: otg.StatesResponse.rsvp_lsps:type_name -> otg.RsvpLspsState + 1005, // 1098: otg.StatesResponse.dhcpv4_interfaces:type_name -> otg.Dhcpv4InterfaceState + 1007, // 1099: otg.StatesResponse.dhcpv4_leases:type_name -> otg.Dhcpv4LeasesState + 1010, // 1100: otg.StatesResponse.dhcpv6_interfaces:type_name -> otg.Dhcpv6InterfaceState + 1014, // 1101: otg.StatesResponse.dhcpv6_leases:type_name -> otg.Dhcpv6LeasesState + 1017, // 1102: otg.StatesResponse.ospfv2_lsas:type_name -> otg.Ospfv2LsaState + 219, // 1103: otg.BgpPrefixStateRequest.prefix_filters:type_name -> otg.BgpPrefixStateRequest.PrefixFilters.Enum + 953, // 1104: otg.BgpPrefixStateRequest.ipv4_unicast_filters:type_name -> otg.BgpPrefixIpv4UnicastFilter + 954, // 1105: otg.BgpPrefixStateRequest.ipv6_unicast_filters:type_name -> otg.BgpPrefixIpv6UnicastFilter + 220, // 1106: otg.BgpPrefixIpv4UnicastFilter.origin:type_name -> otg.BgpPrefixIpv4UnicastFilter.Origin.Enum + 221, // 1107: otg.BgpPrefixIpv6UnicastFilter.origin:type_name -> otg.BgpPrefixIpv6UnicastFilter.Origin.Enum + 956, // 1108: otg.BgpPrefixesState.ipv4_unicast_prefixes:type_name -> otg.BgpPrefixIpv4UnicastState + 957, // 1109: otg.BgpPrefixesState.ipv6_unicast_prefixes:type_name -> otg.BgpPrefixIpv6UnicastState + 222, // 1110: otg.BgpPrefixIpv4UnicastState.origin:type_name -> otg.BgpPrefixIpv4UnicastState.Origin.Enum + 974, // 1111: otg.BgpPrefixIpv4UnicastState.communities:type_name -> otg.ResultBgpCommunity + 958, // 1112: otg.BgpPrefixIpv4UnicastState.extended_communities:type_name -> otg.ResultExtendedCommunity + 975, // 1113: otg.BgpPrefixIpv4UnicastState.as_path:type_name -> otg.ResultBgpAsPath + 223, // 1114: otg.BgpPrefixIpv6UnicastState.origin:type_name -> otg.BgpPrefixIpv6UnicastState.Origin.Enum + 974, // 1115: otg.BgpPrefixIpv6UnicastState.communities:type_name -> otg.ResultBgpCommunity + 958, // 1116: otg.BgpPrefixIpv6UnicastState.extended_communities:type_name -> otg.ResultExtendedCommunity + 975, // 1117: otg.BgpPrefixIpv6UnicastState.as_path:type_name -> otg.ResultBgpAsPath + 959, // 1118: otg.ResultExtendedCommunity.structured:type_name -> otg.ResultExtendedCommunityStructured + 224, // 1119: otg.ResultExtendedCommunityStructured.choice:type_name -> otg.ResultExtendedCommunityStructured.Choice.Enum + 962, // 1120: otg.ResultExtendedCommunityStructured.transitive_2octet_as_type:type_name -> otg.ResultExtendedCommunityTransitive2OctetAsType + 965, // 1121: otg.ResultExtendedCommunityStructured.transitive_ipv4_address_type:type_name -> otg.ResultExtendedCommunityTransitiveIpv4AddressType + 968, // 1122: otg.ResultExtendedCommunityStructured.transitive_4octet_as_type:type_name -> otg.ResultExtendedCommunityTransitive4OctetAsType + 971, // 1123: otg.ResultExtendedCommunityStructured.transitive_opaque_type:type_name -> otg.ResultExtendedCommunityTransitiveOpaqueType + 973, // 1124: otg.ResultExtendedCommunityStructured.non_transitive_2octet_as_type:type_name -> otg.ResultExtendedCommunityNonTransitive2OctetAsType + 225, // 1125: otg.ResultExtendedCommunityTransitive2OctetAsType.choice:type_name -> otg.ResultExtendedCommunityTransitive2OctetAsType.Choice.Enum + 960, // 1126: otg.ResultExtendedCommunityTransitive2OctetAsType.route_target_subtype:type_name -> otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + 961, // 1127: otg.ResultExtendedCommunityTransitive2OctetAsType.route_origin_subtype:type_name -> otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + 226, // 1128: otg.ResultExtendedCommunityTransitiveIpv4AddressType.choice:type_name -> otg.ResultExtendedCommunityTransitiveIpv4AddressType.Choice.Enum + 964, // 1129: otg.ResultExtendedCommunityTransitiveIpv4AddressType.route_target_subtype:type_name -> otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + 963, // 1130: otg.ResultExtendedCommunityTransitiveIpv4AddressType.route_origin_subtype:type_name -> otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + 227, // 1131: otg.ResultExtendedCommunityTransitive4OctetAsType.choice:type_name -> otg.ResultExtendedCommunityTransitive4OctetAsType.Choice.Enum + 966, // 1132: otg.ResultExtendedCommunityTransitive4OctetAsType.route_target_subtype:type_name -> otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + 967, // 1133: otg.ResultExtendedCommunityTransitive4OctetAsType.route_origin_subtype:type_name -> otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + 228, // 1134: otg.ResultExtendedCommunityTransitiveOpaqueType.choice:type_name -> otg.ResultExtendedCommunityTransitiveOpaqueType.Choice.Enum + 969, // 1135: otg.ResultExtendedCommunityTransitiveOpaqueType.color_subtype:type_name -> otg.ResultExtendedCommunityTransitiveOpaqueTypeColor + 970, // 1136: otg.ResultExtendedCommunityTransitiveOpaqueType.encapsulation_subtype:type_name -> otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + 229, // 1137: otg.ResultExtendedCommunityNonTransitive2OctetAsType.choice:type_name -> otg.ResultExtendedCommunityNonTransitive2OctetAsType.Choice.Enum + 972, // 1138: otg.ResultExtendedCommunityNonTransitive2OctetAsType.link_bandwidth_subtype:type_name -> otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + 230, // 1139: otg.ResultBgpCommunity.type:type_name -> otg.ResultBgpCommunity.Type.Enum + 976, // 1140: otg.ResultBgpAsPath.segments:type_name -> otg.ResultBgpAsPathSegment + 231, // 1141: otg.ResultBgpAsPathSegment.type:type_name -> otg.ResultBgpAsPathSegment.Type.Enum + 979, // 1142: otg.IsisLspsState.lsps:type_name -> otg.IsisLspState + 232, // 1143: otg.IsisLspState.pdu_type:type_name -> otg.IsisLspState.PduType.Enum + 982, // 1144: otg.IsisLspState.flags:type_name -> otg.IsisLspFlags + 980, // 1145: otg.IsisLspState.tlvs:type_name -> otg.IsisLspTlvs + 981, // 1146: otg.IsisLspTlvs.hostname_tlvs:type_name -> otg.IsisLspHostname + 983, // 1147: otg.IsisLspTlvs.is_reachability_tlvs:type_name -> otg.IsisLspIsReachabilityTlv + 984, // 1148: otg.IsisLspTlvs.extended_is_reachability_tlvs:type_name -> otg.IsisLspExtendedIsReachabilityTlv + 986, // 1149: otg.IsisLspTlvs.ipv4_internal_reachability_tlvs:type_name -> otg.IsisLspIpv4InternalReachabilityTlv + 987, // 1150: otg.IsisLspTlvs.ipv4_external_reachability_tlvs:type_name -> otg.IsisLspIpv4ExternalReachabilityTlv + 989, // 1151: otg.IsisLspTlvs.extended_ipv4_reachability_tlvs:type_name -> otg.IsisLspExtendedIpv4ReachabilityTlv + 991, // 1152: otg.IsisLspTlvs.ipv6_reachability_tlvs:type_name -> otg.IsisLspIpv6ReachabilityTlv + 985, // 1153: otg.IsisLspIsReachabilityTlv.neighbors:type_name -> otg.IsisLspneighbor + 985, // 1154: otg.IsisLspExtendedIsReachabilityTlv.neighbors:type_name -> otg.IsisLspneighbor + 988, // 1155: otg.IsisLspIpv4InternalReachabilityTlv.prefixes:type_name -> otg.IsisLspV4Prefix + 988, // 1156: otg.IsisLspIpv4ExternalReachabilityTlv.prefixes:type_name -> otg.IsisLspV4Prefix + 233, // 1157: otg.IsisLspV4Prefix.redistribution_type:type_name -> otg.IsisLspV4Prefix.RedistributionType.Enum + 234, // 1158: otg.IsisLspV4Prefix.origin_type:type_name -> otg.IsisLspV4Prefix.OriginType.Enum + 990, // 1159: otg.IsisLspExtendedIpv4ReachabilityTlv.prefixes:type_name -> otg.IsisLspExtendedV4Prefix + 235, // 1160: otg.IsisLspExtendedV4Prefix.redistribution_type:type_name -> otg.IsisLspExtendedV4Prefix.RedistributionType.Enum + 993, // 1161: otg.IsisLspExtendedV4Prefix.prefix_attributes:type_name -> otg.IsisLspPrefixAttributes + 992, // 1162: otg.IsisLspIpv6ReachabilityTlv.prefixes:type_name -> otg.IsisLspV6Prefix + 236, // 1163: otg.IsisLspV6Prefix.redistribution_type:type_name -> otg.IsisLspV6Prefix.RedistributionType.Enum + 237, // 1164: otg.IsisLspV6Prefix.origin_type:type_name -> otg.IsisLspV6Prefix.OriginType.Enum + 993, // 1165: otg.IsisLspV6Prefix.prefix_attributes:type_name -> otg.IsisLspPrefixAttributes + 238, // 1166: otg.LldpNeighborsState.chassis_id_type:type_name -> otg.LldpNeighborsState.ChassisIdType.Enum + 239, // 1167: otg.LldpNeighborsState.port_id_type:type_name -> otg.LldpNeighborsState.PortIdType.Enum + 996, // 1168: otg.LldpNeighborsState.custom_tlvs:type_name -> otg.LldpCustomTLVState + 997, // 1169: otg.LldpNeighborsState.capabilities:type_name -> otg.LldpCapabilityState + 240, // 1170: otg.LldpCapabilityState.capability_name:type_name -> otg.LldpCapabilityState.CapabilityName.Enum + 1000, // 1171: otg.RsvpLspsState.ipv4_lsps:type_name -> otg.RsvpIPv4LspState + 1001, // 1172: otg.RsvpIPv4LspState.lsp:type_name -> otg.RsvpLspState + 1002, // 1173: otg.RsvpIPv4LspState.rros:type_name -> otg.RsvpLspIpv4Rro + 1003, // 1174: otg.RsvpIPv4LspState.eros:type_name -> otg.RsvpLspIpv4Ero + 241, // 1175: otg.RsvpLspState.session_status:type_name -> otg.RsvpLspState.SessionStatus.Enum + 242, // 1176: otg.RsvpLspState.last_flap_reason:type_name -> otg.RsvpLspState.LastFlapReason.Enum + 243, // 1177: otg.RsvpLspIpv4Ero.type:type_name -> otg.RsvpLspIpv4Ero.Type.Enum + 1008, // 1178: otg.Dhcpv4LeasesState.leases:type_name -> otg.Dhcpv4LeaseState + 1011, // 1179: otg.Dhcpv6InterfaceState.iapd_addresses:type_name -> otg.Dhcpv6InterfaceIapd + 1012, // 1180: otg.Dhcpv6InterfaceState.ia_addresses:type_name -> otg.Dhcpv6InterfaceIa + 1015, // 1181: otg.Dhcpv6LeasesState.leases:type_name -> otg.Dhcpv6ServerLeaseState + 1018, // 1182: otg.Ospfv2LsaState.router_lsas:type_name -> otg.Ospfv2RouterLsa + 1019, // 1183: otg.Ospfv2LsaState.network_lsas:type_name -> otg.Ospfv2NetworkLsa + 1020, // 1184: otg.Ospfv2LsaState.network_summary_lsas:type_name -> otg.Ospfv2NetworkSummaryLsa + 1021, // 1185: otg.Ospfv2LsaState.summary_as_lsas:type_name -> otg.Ospfv2SummaryAsLsa + 1022, // 1186: otg.Ospfv2LsaState.external_as_lsas:type_name -> otg.Ospfv2ExternalAsLsa + 1023, // 1187: otg.Ospfv2LsaState.nssa_lsas:type_name -> otg.Ospfv2NssaLsa + 1024, // 1188: otg.Ospfv2LsaState.opaque_lsas:type_name -> otg.Ospfv2OpaqueLsa + 1025, // 1189: otg.Ospfv2RouterLsa.header:type_name -> otg.Ospfv2LsaHeader + 1026, // 1190: otg.Ospfv2RouterLsa.links:type_name -> otg.Ospfv2Link + 1025, // 1191: otg.Ospfv2NetworkLsa.header:type_name -> otg.Ospfv2LsaHeader + 1025, // 1192: otg.Ospfv2NetworkSummaryLsa.header:type_name -> otg.Ospfv2LsaHeader + 1025, // 1193: otg.Ospfv2SummaryAsLsa.header:type_name -> otg.Ospfv2LsaHeader + 1025, // 1194: otg.Ospfv2ExternalAsLsa.header:type_name -> otg.Ospfv2LsaHeader + 1025, // 1195: otg.Ospfv2NssaLsa.header:type_name -> otg.Ospfv2LsaHeader + 1025, // 1196: otg.Ospfv2OpaqueLsa.header:type_name -> otg.Ospfv2LsaHeader + 244, // 1197: otg.Ospfv2OpaqueLsa.type:type_name -> otg.Ospfv2OpaqueLsa.Type.Enum + 245, // 1198: otg.Ospfv2Link.type:type_name -> otg.Ospfv2Link.Type.Enum + 246, // 1199: otg.PatternFlowEthernetDst.choice:type_name -> otg.PatternFlowEthernetDst.Choice.Enum + 1028, // 1200: otg.PatternFlowEthernetDst.increment:type_name -> otg.PatternFlowEthernetDstCounter + 1028, // 1201: otg.PatternFlowEthernetDst.decrement:type_name -> otg.PatternFlowEthernetDstCounter + 1029, // 1202: otg.PatternFlowEthernetDst.metric_tags:type_name -> otg.PatternFlowEthernetDstMetricTag + 247, // 1203: otg.PatternFlowEthernetSrc.choice:type_name -> otg.PatternFlowEthernetSrc.Choice.Enum + 1031, // 1204: otg.PatternFlowEthernetSrc.increment:type_name -> otg.PatternFlowEthernetSrcCounter + 1031, // 1205: otg.PatternFlowEthernetSrc.decrement:type_name -> otg.PatternFlowEthernetSrcCounter + 1032, // 1206: otg.PatternFlowEthernetSrc.metric_tags:type_name -> otg.PatternFlowEthernetSrcMetricTag + 248, // 1207: otg.PatternFlowEthernetEtherType.choice:type_name -> otg.PatternFlowEthernetEtherType.Choice.Enum + 1034, // 1208: otg.PatternFlowEthernetEtherType.increment:type_name -> otg.PatternFlowEthernetEtherTypeCounter + 1034, // 1209: otg.PatternFlowEthernetEtherType.decrement:type_name -> otg.PatternFlowEthernetEtherTypeCounter + 1035, // 1210: otg.PatternFlowEthernetEtherType.metric_tags:type_name -> otg.PatternFlowEthernetEtherTypeMetricTag + 249, // 1211: otg.PatternFlowEthernetPfcQueue.choice:type_name -> otg.PatternFlowEthernetPfcQueue.Choice.Enum + 1037, // 1212: otg.PatternFlowEthernetPfcQueue.increment:type_name -> otg.PatternFlowEthernetPfcQueueCounter + 1037, // 1213: otg.PatternFlowEthernetPfcQueue.decrement:type_name -> otg.PatternFlowEthernetPfcQueueCounter + 1038, // 1214: otg.PatternFlowEthernetPfcQueue.metric_tags:type_name -> otg.PatternFlowEthernetPfcQueueMetricTag + 250, // 1215: otg.PatternFlowVlanPriority.choice:type_name -> otg.PatternFlowVlanPriority.Choice.Enum + 1040, // 1216: otg.PatternFlowVlanPriority.increment:type_name -> otg.PatternFlowVlanPriorityCounter + 1040, // 1217: otg.PatternFlowVlanPriority.decrement:type_name -> otg.PatternFlowVlanPriorityCounter + 1041, // 1218: otg.PatternFlowVlanPriority.metric_tags:type_name -> otg.PatternFlowVlanPriorityMetricTag + 251, // 1219: otg.PatternFlowVlanCfi.choice:type_name -> otg.PatternFlowVlanCfi.Choice.Enum + 1043, // 1220: otg.PatternFlowVlanCfi.increment:type_name -> otg.PatternFlowVlanCfiCounter + 1043, // 1221: otg.PatternFlowVlanCfi.decrement:type_name -> otg.PatternFlowVlanCfiCounter + 1044, // 1222: otg.PatternFlowVlanCfi.metric_tags:type_name -> otg.PatternFlowVlanCfiMetricTag + 252, // 1223: otg.PatternFlowVlanId.choice:type_name -> otg.PatternFlowVlanId.Choice.Enum + 1046, // 1224: otg.PatternFlowVlanId.increment:type_name -> otg.PatternFlowVlanIdCounter + 1046, // 1225: otg.PatternFlowVlanId.decrement:type_name -> otg.PatternFlowVlanIdCounter + 1047, // 1226: otg.PatternFlowVlanId.metric_tags:type_name -> otg.PatternFlowVlanIdMetricTag + 253, // 1227: otg.PatternFlowVlanTpid.choice:type_name -> otg.PatternFlowVlanTpid.Choice.Enum + 1049, // 1228: otg.PatternFlowVlanTpid.increment:type_name -> otg.PatternFlowVlanTpidCounter + 1049, // 1229: otg.PatternFlowVlanTpid.decrement:type_name -> otg.PatternFlowVlanTpidCounter + 1050, // 1230: otg.PatternFlowVlanTpid.metric_tags:type_name -> otg.PatternFlowVlanTpidMetricTag + 254, // 1231: otg.PatternFlowVxlanFlags.choice:type_name -> otg.PatternFlowVxlanFlags.Choice.Enum + 1052, // 1232: otg.PatternFlowVxlanFlags.increment:type_name -> otg.PatternFlowVxlanFlagsCounter + 1052, // 1233: otg.PatternFlowVxlanFlags.decrement:type_name -> otg.PatternFlowVxlanFlagsCounter + 1053, // 1234: otg.PatternFlowVxlanFlags.metric_tags:type_name -> otg.PatternFlowVxlanFlagsMetricTag + 255, // 1235: otg.PatternFlowVxlanReserved0.choice:type_name -> otg.PatternFlowVxlanReserved0.Choice.Enum + 1055, // 1236: otg.PatternFlowVxlanReserved0.increment:type_name -> otg.PatternFlowVxlanReserved0Counter + 1055, // 1237: otg.PatternFlowVxlanReserved0.decrement:type_name -> otg.PatternFlowVxlanReserved0Counter + 1056, // 1238: otg.PatternFlowVxlanReserved0.metric_tags:type_name -> otg.PatternFlowVxlanReserved0MetricTag + 256, // 1239: otg.PatternFlowVxlanVni.choice:type_name -> otg.PatternFlowVxlanVni.Choice.Enum + 1058, // 1240: otg.PatternFlowVxlanVni.increment:type_name -> otg.PatternFlowVxlanVniCounter + 1058, // 1241: otg.PatternFlowVxlanVni.decrement:type_name -> otg.PatternFlowVxlanVniCounter + 1059, // 1242: otg.PatternFlowVxlanVni.metric_tags:type_name -> otg.PatternFlowVxlanVniMetricTag + 257, // 1243: otg.PatternFlowVxlanReserved1.choice:type_name -> otg.PatternFlowVxlanReserved1.Choice.Enum + 1061, // 1244: otg.PatternFlowVxlanReserved1.increment:type_name -> otg.PatternFlowVxlanReserved1Counter + 1061, // 1245: otg.PatternFlowVxlanReserved1.decrement:type_name -> otg.PatternFlowVxlanReserved1Counter + 1062, // 1246: otg.PatternFlowVxlanReserved1.metric_tags:type_name -> otg.PatternFlowVxlanReserved1MetricTag + 258, // 1247: otg.PatternFlowIpv4Version.choice:type_name -> otg.PatternFlowIpv4Version.Choice.Enum + 1064, // 1248: otg.PatternFlowIpv4Version.increment:type_name -> otg.PatternFlowIpv4VersionCounter + 1064, // 1249: otg.PatternFlowIpv4Version.decrement:type_name -> otg.PatternFlowIpv4VersionCounter + 1065, // 1250: otg.PatternFlowIpv4Version.metric_tags:type_name -> otg.PatternFlowIpv4VersionMetricTag + 259, // 1251: otg.PatternFlowIpv4HeaderLength.choice:type_name -> otg.PatternFlowIpv4HeaderLength.Choice.Enum + 1067, // 1252: otg.PatternFlowIpv4HeaderLength.increment:type_name -> otg.PatternFlowIpv4HeaderLengthCounter + 1067, // 1253: otg.PatternFlowIpv4HeaderLength.decrement:type_name -> otg.PatternFlowIpv4HeaderLengthCounter + 1068, // 1254: otg.PatternFlowIpv4HeaderLength.metric_tags:type_name -> otg.PatternFlowIpv4HeaderLengthMetricTag + 260, // 1255: otg.PatternFlowIpv4TotalLength.choice:type_name -> otg.PatternFlowIpv4TotalLength.Choice.Enum + 1070, // 1256: otg.PatternFlowIpv4TotalLength.increment:type_name -> otg.PatternFlowIpv4TotalLengthCounter + 1070, // 1257: otg.PatternFlowIpv4TotalLength.decrement:type_name -> otg.PatternFlowIpv4TotalLengthCounter + 1071, // 1258: otg.PatternFlowIpv4TotalLength.metric_tags:type_name -> otg.PatternFlowIpv4TotalLengthMetricTag + 261, // 1259: otg.PatternFlowIpv4Identification.choice:type_name -> otg.PatternFlowIpv4Identification.Choice.Enum + 1073, // 1260: otg.PatternFlowIpv4Identification.increment:type_name -> otg.PatternFlowIpv4IdentificationCounter + 1073, // 1261: otg.PatternFlowIpv4Identification.decrement:type_name -> otg.PatternFlowIpv4IdentificationCounter + 1074, // 1262: otg.PatternFlowIpv4Identification.metric_tags:type_name -> otg.PatternFlowIpv4IdentificationMetricTag + 262, // 1263: otg.PatternFlowIpv4Reserved.choice:type_name -> otg.PatternFlowIpv4Reserved.Choice.Enum + 1076, // 1264: otg.PatternFlowIpv4Reserved.increment:type_name -> otg.PatternFlowIpv4ReservedCounter + 1076, // 1265: otg.PatternFlowIpv4Reserved.decrement:type_name -> otg.PatternFlowIpv4ReservedCounter + 1077, // 1266: otg.PatternFlowIpv4Reserved.metric_tags:type_name -> otg.PatternFlowIpv4ReservedMetricTag + 263, // 1267: otg.PatternFlowIpv4DontFragment.choice:type_name -> otg.PatternFlowIpv4DontFragment.Choice.Enum + 1079, // 1268: otg.PatternFlowIpv4DontFragment.increment:type_name -> otg.PatternFlowIpv4DontFragmentCounter + 1079, // 1269: otg.PatternFlowIpv4DontFragment.decrement:type_name -> otg.PatternFlowIpv4DontFragmentCounter + 1080, // 1270: otg.PatternFlowIpv4DontFragment.metric_tags:type_name -> otg.PatternFlowIpv4DontFragmentMetricTag + 264, // 1271: otg.PatternFlowIpv4MoreFragments.choice:type_name -> otg.PatternFlowIpv4MoreFragments.Choice.Enum + 1082, // 1272: otg.PatternFlowIpv4MoreFragments.increment:type_name -> otg.PatternFlowIpv4MoreFragmentsCounter + 1082, // 1273: otg.PatternFlowIpv4MoreFragments.decrement:type_name -> otg.PatternFlowIpv4MoreFragmentsCounter + 1083, // 1274: otg.PatternFlowIpv4MoreFragments.metric_tags:type_name -> otg.PatternFlowIpv4MoreFragmentsMetricTag + 265, // 1275: otg.PatternFlowIpv4FragmentOffset.choice:type_name -> otg.PatternFlowIpv4FragmentOffset.Choice.Enum + 1085, // 1276: otg.PatternFlowIpv4FragmentOffset.increment:type_name -> otg.PatternFlowIpv4FragmentOffsetCounter + 1085, // 1277: otg.PatternFlowIpv4FragmentOffset.decrement:type_name -> otg.PatternFlowIpv4FragmentOffsetCounter + 1086, // 1278: otg.PatternFlowIpv4FragmentOffset.metric_tags:type_name -> otg.PatternFlowIpv4FragmentOffsetMetricTag + 266, // 1279: otg.PatternFlowIpv4TimeToLive.choice:type_name -> otg.PatternFlowIpv4TimeToLive.Choice.Enum + 1088, // 1280: otg.PatternFlowIpv4TimeToLive.increment:type_name -> otg.PatternFlowIpv4TimeToLiveCounter + 1088, // 1281: otg.PatternFlowIpv4TimeToLive.decrement:type_name -> otg.PatternFlowIpv4TimeToLiveCounter + 1089, // 1282: otg.PatternFlowIpv4TimeToLive.metric_tags:type_name -> otg.PatternFlowIpv4TimeToLiveMetricTag + 267, // 1283: otg.PatternFlowIpv4Protocol.choice:type_name -> otg.PatternFlowIpv4Protocol.Choice.Enum + 1091, // 1284: otg.PatternFlowIpv4Protocol.increment:type_name -> otg.PatternFlowIpv4ProtocolCounter + 1091, // 1285: otg.PatternFlowIpv4Protocol.decrement:type_name -> otg.PatternFlowIpv4ProtocolCounter + 1092, // 1286: otg.PatternFlowIpv4Protocol.metric_tags:type_name -> otg.PatternFlowIpv4ProtocolMetricTag + 268, // 1287: otg.PatternFlowIpv4HeaderChecksum.choice:type_name -> otg.PatternFlowIpv4HeaderChecksum.Choice.Enum + 269, // 1288: otg.PatternFlowIpv4HeaderChecksum.generated:type_name -> otg.PatternFlowIpv4HeaderChecksum.Generated.Enum + 270, // 1289: otg.PatternFlowIpv4Src.choice:type_name -> otg.PatternFlowIpv4Src.Choice.Enum + 1095, // 1290: otg.PatternFlowIpv4Src.increment:type_name -> otg.PatternFlowIpv4SrcCounter + 1095, // 1291: otg.PatternFlowIpv4Src.decrement:type_name -> otg.PatternFlowIpv4SrcCounter + 1096, // 1292: otg.PatternFlowIpv4Src.metric_tags:type_name -> otg.PatternFlowIpv4SrcMetricTag + 755, // 1293: otg.PatternFlowIpv4Src.auto:type_name -> otg.FlowIpv4Auto + 1097, // 1294: otg.PatternFlowIpv4Src.random:type_name -> otg.PatternFlowIpv4SrcRandom + 271, // 1295: otg.PatternFlowIpv4Dst.choice:type_name -> otg.PatternFlowIpv4Dst.Choice.Enum + 1099, // 1296: otg.PatternFlowIpv4Dst.increment:type_name -> otg.PatternFlowIpv4DstCounter + 1099, // 1297: otg.PatternFlowIpv4Dst.decrement:type_name -> otg.PatternFlowIpv4DstCounter + 1100, // 1298: otg.PatternFlowIpv4Dst.metric_tags:type_name -> otg.PatternFlowIpv4DstMetricTag + 755, // 1299: otg.PatternFlowIpv4Dst.auto:type_name -> otg.FlowIpv4Auto + 1101, // 1300: otg.PatternFlowIpv4Dst.random:type_name -> otg.PatternFlowIpv4DstRandom + 272, // 1301: otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag.choice:type_name -> otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag.Choice.Enum + 1103, // 1302: otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag.increment:type_name -> otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + 1103, // 1303: otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag.decrement:type_name -> otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + 273, // 1304: otg.PatternFlowIpv4OptionsCustomTypeOptionClass.choice:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionClass.Choice.Enum + 1105, // 1305: otg.PatternFlowIpv4OptionsCustomTypeOptionClass.increment:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter + 1105, // 1306: otg.PatternFlowIpv4OptionsCustomTypeOptionClass.decrement:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter + 274, // 1307: otg.PatternFlowIpv4OptionsCustomTypeOptionNumber.choice:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionNumber.Choice.Enum + 1107, // 1308: otg.PatternFlowIpv4OptionsCustomTypeOptionNumber.increment:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + 1107, // 1309: otg.PatternFlowIpv4OptionsCustomTypeOptionNumber.decrement:type_name -> otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + 275, // 1310: otg.PatternFlowIpv4PriorityRaw.choice:type_name -> otg.PatternFlowIpv4PriorityRaw.Choice.Enum + 1109, // 1311: otg.PatternFlowIpv4PriorityRaw.increment:type_name -> otg.PatternFlowIpv4PriorityRawCounter + 1109, // 1312: otg.PatternFlowIpv4PriorityRaw.decrement:type_name -> otg.PatternFlowIpv4PriorityRawCounter + 1110, // 1313: otg.PatternFlowIpv4PriorityRaw.metric_tags:type_name -> otg.PatternFlowIpv4PriorityRawMetricTag + 276, // 1314: otg.PatternFlowIpv4DscpPhb.choice:type_name -> otg.PatternFlowIpv4DscpPhb.Choice.Enum + 1112, // 1315: otg.PatternFlowIpv4DscpPhb.increment:type_name -> otg.PatternFlowIpv4DscpPhbCounter + 1112, // 1316: otg.PatternFlowIpv4DscpPhb.decrement:type_name -> otg.PatternFlowIpv4DscpPhbCounter + 1113, // 1317: otg.PatternFlowIpv4DscpPhb.metric_tags:type_name -> otg.PatternFlowIpv4DscpPhbMetricTag + 277, // 1318: otg.PatternFlowIpv4DscpEcn.choice:type_name -> otg.PatternFlowIpv4DscpEcn.Choice.Enum + 1115, // 1319: otg.PatternFlowIpv4DscpEcn.increment:type_name -> otg.PatternFlowIpv4DscpEcnCounter + 1115, // 1320: otg.PatternFlowIpv4DscpEcn.decrement:type_name -> otg.PatternFlowIpv4DscpEcnCounter + 1116, // 1321: otg.PatternFlowIpv4DscpEcn.metric_tags:type_name -> otg.PatternFlowIpv4DscpEcnMetricTag + 278, // 1322: otg.PatternFlowIpv4TosPrecedence.choice:type_name -> otg.PatternFlowIpv4TosPrecedence.Choice.Enum + 1118, // 1323: otg.PatternFlowIpv4TosPrecedence.increment:type_name -> otg.PatternFlowIpv4TosPrecedenceCounter + 1118, // 1324: otg.PatternFlowIpv4TosPrecedence.decrement:type_name -> otg.PatternFlowIpv4TosPrecedenceCounter + 1119, // 1325: otg.PatternFlowIpv4TosPrecedence.metric_tags:type_name -> otg.PatternFlowIpv4TosPrecedenceMetricTag + 279, // 1326: otg.PatternFlowIpv4TosDelay.choice:type_name -> otg.PatternFlowIpv4TosDelay.Choice.Enum + 1121, // 1327: otg.PatternFlowIpv4TosDelay.increment:type_name -> otg.PatternFlowIpv4TosDelayCounter + 1121, // 1328: otg.PatternFlowIpv4TosDelay.decrement:type_name -> otg.PatternFlowIpv4TosDelayCounter + 1122, // 1329: otg.PatternFlowIpv4TosDelay.metric_tags:type_name -> otg.PatternFlowIpv4TosDelayMetricTag + 280, // 1330: otg.PatternFlowIpv4TosThroughput.choice:type_name -> otg.PatternFlowIpv4TosThroughput.Choice.Enum + 1124, // 1331: otg.PatternFlowIpv4TosThroughput.increment:type_name -> otg.PatternFlowIpv4TosThroughputCounter + 1124, // 1332: otg.PatternFlowIpv4TosThroughput.decrement:type_name -> otg.PatternFlowIpv4TosThroughputCounter + 1125, // 1333: otg.PatternFlowIpv4TosThroughput.metric_tags:type_name -> otg.PatternFlowIpv4TosThroughputMetricTag + 281, // 1334: otg.PatternFlowIpv4TosReliability.choice:type_name -> otg.PatternFlowIpv4TosReliability.Choice.Enum + 1127, // 1335: otg.PatternFlowIpv4TosReliability.increment:type_name -> otg.PatternFlowIpv4TosReliabilityCounter + 1127, // 1336: otg.PatternFlowIpv4TosReliability.decrement:type_name -> otg.PatternFlowIpv4TosReliabilityCounter + 1128, // 1337: otg.PatternFlowIpv4TosReliability.metric_tags:type_name -> otg.PatternFlowIpv4TosReliabilityMetricTag + 282, // 1338: otg.PatternFlowIpv4TosMonetary.choice:type_name -> otg.PatternFlowIpv4TosMonetary.Choice.Enum + 1130, // 1339: otg.PatternFlowIpv4TosMonetary.increment:type_name -> otg.PatternFlowIpv4TosMonetaryCounter + 1130, // 1340: otg.PatternFlowIpv4TosMonetary.decrement:type_name -> otg.PatternFlowIpv4TosMonetaryCounter + 1131, // 1341: otg.PatternFlowIpv4TosMonetary.metric_tags:type_name -> otg.PatternFlowIpv4TosMonetaryMetricTag + 283, // 1342: otg.PatternFlowIpv4TosUnused.choice:type_name -> otg.PatternFlowIpv4TosUnused.Choice.Enum + 1133, // 1343: otg.PatternFlowIpv4TosUnused.increment:type_name -> otg.PatternFlowIpv4TosUnusedCounter + 1133, // 1344: otg.PatternFlowIpv4TosUnused.decrement:type_name -> otg.PatternFlowIpv4TosUnusedCounter + 1134, // 1345: otg.PatternFlowIpv4TosUnused.metric_tags:type_name -> otg.PatternFlowIpv4TosUnusedMetricTag + 284, // 1346: otg.PatternFlowIpv6Version.choice:type_name -> otg.PatternFlowIpv6Version.Choice.Enum + 1136, // 1347: otg.PatternFlowIpv6Version.increment:type_name -> otg.PatternFlowIpv6VersionCounter + 1136, // 1348: otg.PatternFlowIpv6Version.decrement:type_name -> otg.PatternFlowIpv6VersionCounter + 1137, // 1349: otg.PatternFlowIpv6Version.metric_tags:type_name -> otg.PatternFlowIpv6VersionMetricTag + 285, // 1350: otg.PatternFlowIpv6TrafficClass.choice:type_name -> otg.PatternFlowIpv6TrafficClass.Choice.Enum + 1139, // 1351: otg.PatternFlowIpv6TrafficClass.increment:type_name -> otg.PatternFlowIpv6TrafficClassCounter + 1139, // 1352: otg.PatternFlowIpv6TrafficClass.decrement:type_name -> otg.PatternFlowIpv6TrafficClassCounter + 1140, // 1353: otg.PatternFlowIpv6TrafficClass.metric_tags:type_name -> otg.PatternFlowIpv6TrafficClassMetricTag + 286, // 1354: otg.PatternFlowIpv6FlowLabel.choice:type_name -> otg.PatternFlowIpv6FlowLabel.Choice.Enum + 1142, // 1355: otg.PatternFlowIpv6FlowLabel.increment:type_name -> otg.PatternFlowIpv6FlowLabelCounter + 1142, // 1356: otg.PatternFlowIpv6FlowLabel.decrement:type_name -> otg.PatternFlowIpv6FlowLabelCounter + 1143, // 1357: otg.PatternFlowIpv6FlowLabel.metric_tags:type_name -> otg.PatternFlowIpv6FlowLabelMetricTag + 1144, // 1358: otg.PatternFlowIpv6FlowLabel.random:type_name -> otg.PatternFlowIpv6FlowLabelRandom + 287, // 1359: otg.PatternFlowIpv6PayloadLength.choice:type_name -> otg.PatternFlowIpv6PayloadLength.Choice.Enum + 1146, // 1360: otg.PatternFlowIpv6PayloadLength.increment:type_name -> otg.PatternFlowIpv6PayloadLengthCounter + 1146, // 1361: otg.PatternFlowIpv6PayloadLength.decrement:type_name -> otg.PatternFlowIpv6PayloadLengthCounter + 1147, // 1362: otg.PatternFlowIpv6PayloadLength.metric_tags:type_name -> otg.PatternFlowIpv6PayloadLengthMetricTag + 288, // 1363: otg.PatternFlowIpv6NextHeader.choice:type_name -> otg.PatternFlowIpv6NextHeader.Choice.Enum + 1149, // 1364: otg.PatternFlowIpv6NextHeader.increment:type_name -> otg.PatternFlowIpv6NextHeaderCounter + 1149, // 1365: otg.PatternFlowIpv6NextHeader.decrement:type_name -> otg.PatternFlowIpv6NextHeaderCounter + 1150, // 1366: otg.PatternFlowIpv6NextHeader.metric_tags:type_name -> otg.PatternFlowIpv6NextHeaderMetricTag + 289, // 1367: otg.PatternFlowIpv6HopLimit.choice:type_name -> otg.PatternFlowIpv6HopLimit.Choice.Enum + 1152, // 1368: otg.PatternFlowIpv6HopLimit.increment:type_name -> otg.PatternFlowIpv6HopLimitCounter + 1152, // 1369: otg.PatternFlowIpv6HopLimit.decrement:type_name -> otg.PatternFlowIpv6HopLimitCounter + 1153, // 1370: otg.PatternFlowIpv6HopLimit.metric_tags:type_name -> otg.PatternFlowIpv6HopLimitMetricTag + 290, // 1371: otg.PatternFlowIpv6Src.choice:type_name -> otg.PatternFlowIpv6Src.Choice.Enum + 1155, // 1372: otg.PatternFlowIpv6Src.increment:type_name -> otg.PatternFlowIpv6SrcCounter + 1155, // 1373: otg.PatternFlowIpv6Src.decrement:type_name -> otg.PatternFlowIpv6SrcCounter + 1156, // 1374: otg.PatternFlowIpv6Src.metric_tags:type_name -> otg.PatternFlowIpv6SrcMetricTag + 757, // 1375: otg.PatternFlowIpv6Src.auto:type_name -> otg.FlowIpv6Auto + 291, // 1376: otg.PatternFlowIpv6Dst.choice:type_name -> otg.PatternFlowIpv6Dst.Choice.Enum + 1158, // 1377: otg.PatternFlowIpv6Dst.increment:type_name -> otg.PatternFlowIpv6DstCounter + 1158, // 1378: otg.PatternFlowIpv6Dst.decrement:type_name -> otg.PatternFlowIpv6DstCounter + 1159, // 1379: otg.PatternFlowIpv6Dst.metric_tags:type_name -> otg.PatternFlowIpv6DstMetricTag + 757, // 1380: otg.PatternFlowIpv6Dst.auto:type_name -> otg.FlowIpv6Auto + 292, // 1381: otg.PatternFlowPfcPauseDst.choice:type_name -> otg.PatternFlowPfcPauseDst.Choice.Enum + 1161, // 1382: otg.PatternFlowPfcPauseDst.increment:type_name -> otg.PatternFlowPfcPauseDstCounter + 1161, // 1383: otg.PatternFlowPfcPauseDst.decrement:type_name -> otg.PatternFlowPfcPauseDstCounter + 1162, // 1384: otg.PatternFlowPfcPauseDst.metric_tags:type_name -> otg.PatternFlowPfcPauseDstMetricTag + 293, // 1385: otg.PatternFlowPfcPauseSrc.choice:type_name -> otg.PatternFlowPfcPauseSrc.Choice.Enum + 1164, // 1386: otg.PatternFlowPfcPauseSrc.increment:type_name -> otg.PatternFlowPfcPauseSrcCounter + 1164, // 1387: otg.PatternFlowPfcPauseSrc.decrement:type_name -> otg.PatternFlowPfcPauseSrcCounter + 1165, // 1388: otg.PatternFlowPfcPauseSrc.metric_tags:type_name -> otg.PatternFlowPfcPauseSrcMetricTag + 294, // 1389: otg.PatternFlowPfcPauseEtherType.choice:type_name -> otg.PatternFlowPfcPauseEtherType.Choice.Enum + 1167, // 1390: otg.PatternFlowPfcPauseEtherType.increment:type_name -> otg.PatternFlowPfcPauseEtherTypeCounter + 1167, // 1391: otg.PatternFlowPfcPauseEtherType.decrement:type_name -> otg.PatternFlowPfcPauseEtherTypeCounter + 1168, // 1392: otg.PatternFlowPfcPauseEtherType.metric_tags:type_name -> otg.PatternFlowPfcPauseEtherTypeMetricTag + 295, // 1393: otg.PatternFlowPfcPauseControlOpCode.choice:type_name -> otg.PatternFlowPfcPauseControlOpCode.Choice.Enum + 1170, // 1394: otg.PatternFlowPfcPauseControlOpCode.increment:type_name -> otg.PatternFlowPfcPauseControlOpCodeCounter + 1170, // 1395: otg.PatternFlowPfcPauseControlOpCode.decrement:type_name -> otg.PatternFlowPfcPauseControlOpCodeCounter + 1171, // 1396: otg.PatternFlowPfcPauseControlOpCode.metric_tags:type_name -> otg.PatternFlowPfcPauseControlOpCodeMetricTag + 296, // 1397: otg.PatternFlowPfcPauseClassEnableVector.choice:type_name -> otg.PatternFlowPfcPauseClassEnableVector.Choice.Enum + 1173, // 1398: otg.PatternFlowPfcPauseClassEnableVector.increment:type_name -> otg.PatternFlowPfcPauseClassEnableVectorCounter + 1173, // 1399: otg.PatternFlowPfcPauseClassEnableVector.decrement:type_name -> otg.PatternFlowPfcPauseClassEnableVectorCounter + 1174, // 1400: otg.PatternFlowPfcPauseClassEnableVector.metric_tags:type_name -> otg.PatternFlowPfcPauseClassEnableVectorMetricTag + 297, // 1401: otg.PatternFlowPfcPausePauseClass0.choice:type_name -> otg.PatternFlowPfcPausePauseClass0.Choice.Enum + 1176, // 1402: otg.PatternFlowPfcPausePauseClass0.increment:type_name -> otg.PatternFlowPfcPausePauseClass0Counter + 1176, // 1403: otg.PatternFlowPfcPausePauseClass0.decrement:type_name -> otg.PatternFlowPfcPausePauseClass0Counter + 1177, // 1404: otg.PatternFlowPfcPausePauseClass0.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass0MetricTag + 298, // 1405: otg.PatternFlowPfcPausePauseClass1.choice:type_name -> otg.PatternFlowPfcPausePauseClass1.Choice.Enum + 1179, // 1406: otg.PatternFlowPfcPausePauseClass1.increment:type_name -> otg.PatternFlowPfcPausePauseClass1Counter + 1179, // 1407: otg.PatternFlowPfcPausePauseClass1.decrement:type_name -> otg.PatternFlowPfcPausePauseClass1Counter + 1180, // 1408: otg.PatternFlowPfcPausePauseClass1.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass1MetricTag + 299, // 1409: otg.PatternFlowPfcPausePauseClass2.choice:type_name -> otg.PatternFlowPfcPausePauseClass2.Choice.Enum + 1182, // 1410: otg.PatternFlowPfcPausePauseClass2.increment:type_name -> otg.PatternFlowPfcPausePauseClass2Counter + 1182, // 1411: otg.PatternFlowPfcPausePauseClass2.decrement:type_name -> otg.PatternFlowPfcPausePauseClass2Counter + 1183, // 1412: otg.PatternFlowPfcPausePauseClass2.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass2MetricTag + 300, // 1413: otg.PatternFlowPfcPausePauseClass3.choice:type_name -> otg.PatternFlowPfcPausePauseClass3.Choice.Enum + 1185, // 1414: otg.PatternFlowPfcPausePauseClass3.increment:type_name -> otg.PatternFlowPfcPausePauseClass3Counter + 1185, // 1415: otg.PatternFlowPfcPausePauseClass3.decrement:type_name -> otg.PatternFlowPfcPausePauseClass3Counter + 1186, // 1416: otg.PatternFlowPfcPausePauseClass3.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass3MetricTag + 301, // 1417: otg.PatternFlowPfcPausePauseClass4.choice:type_name -> otg.PatternFlowPfcPausePauseClass4.Choice.Enum + 1188, // 1418: otg.PatternFlowPfcPausePauseClass4.increment:type_name -> otg.PatternFlowPfcPausePauseClass4Counter + 1188, // 1419: otg.PatternFlowPfcPausePauseClass4.decrement:type_name -> otg.PatternFlowPfcPausePauseClass4Counter + 1189, // 1420: otg.PatternFlowPfcPausePauseClass4.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass4MetricTag + 302, // 1421: otg.PatternFlowPfcPausePauseClass5.choice:type_name -> otg.PatternFlowPfcPausePauseClass5.Choice.Enum + 1191, // 1422: otg.PatternFlowPfcPausePauseClass5.increment:type_name -> otg.PatternFlowPfcPausePauseClass5Counter + 1191, // 1423: otg.PatternFlowPfcPausePauseClass5.decrement:type_name -> otg.PatternFlowPfcPausePauseClass5Counter + 1192, // 1424: otg.PatternFlowPfcPausePauseClass5.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass5MetricTag + 303, // 1425: otg.PatternFlowPfcPausePauseClass6.choice:type_name -> otg.PatternFlowPfcPausePauseClass6.Choice.Enum + 1194, // 1426: otg.PatternFlowPfcPausePauseClass6.increment:type_name -> otg.PatternFlowPfcPausePauseClass6Counter + 1194, // 1427: otg.PatternFlowPfcPausePauseClass6.decrement:type_name -> otg.PatternFlowPfcPausePauseClass6Counter + 1195, // 1428: otg.PatternFlowPfcPausePauseClass6.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass6MetricTag + 304, // 1429: otg.PatternFlowPfcPausePauseClass7.choice:type_name -> otg.PatternFlowPfcPausePauseClass7.Choice.Enum + 1197, // 1430: otg.PatternFlowPfcPausePauseClass7.increment:type_name -> otg.PatternFlowPfcPausePauseClass7Counter + 1197, // 1431: otg.PatternFlowPfcPausePauseClass7.decrement:type_name -> otg.PatternFlowPfcPausePauseClass7Counter + 1198, // 1432: otg.PatternFlowPfcPausePauseClass7.metric_tags:type_name -> otg.PatternFlowPfcPausePauseClass7MetricTag + 305, // 1433: otg.PatternFlowEthernetPauseDst.choice:type_name -> otg.PatternFlowEthernetPauseDst.Choice.Enum + 1200, // 1434: otg.PatternFlowEthernetPauseDst.increment:type_name -> otg.PatternFlowEthernetPauseDstCounter + 1200, // 1435: otg.PatternFlowEthernetPauseDst.decrement:type_name -> otg.PatternFlowEthernetPauseDstCounter + 1201, // 1436: otg.PatternFlowEthernetPauseDst.metric_tags:type_name -> otg.PatternFlowEthernetPauseDstMetricTag + 306, // 1437: otg.PatternFlowEthernetPauseSrc.choice:type_name -> otg.PatternFlowEthernetPauseSrc.Choice.Enum + 1203, // 1438: otg.PatternFlowEthernetPauseSrc.increment:type_name -> otg.PatternFlowEthernetPauseSrcCounter + 1203, // 1439: otg.PatternFlowEthernetPauseSrc.decrement:type_name -> otg.PatternFlowEthernetPauseSrcCounter + 1204, // 1440: otg.PatternFlowEthernetPauseSrc.metric_tags:type_name -> otg.PatternFlowEthernetPauseSrcMetricTag + 307, // 1441: otg.PatternFlowEthernetPauseEtherType.choice:type_name -> otg.PatternFlowEthernetPauseEtherType.Choice.Enum + 1206, // 1442: otg.PatternFlowEthernetPauseEtherType.increment:type_name -> otg.PatternFlowEthernetPauseEtherTypeCounter + 1206, // 1443: otg.PatternFlowEthernetPauseEtherType.decrement:type_name -> otg.PatternFlowEthernetPauseEtherTypeCounter + 1207, // 1444: otg.PatternFlowEthernetPauseEtherType.metric_tags:type_name -> otg.PatternFlowEthernetPauseEtherTypeMetricTag + 308, // 1445: otg.PatternFlowEthernetPauseControlOpCode.choice:type_name -> otg.PatternFlowEthernetPauseControlOpCode.Choice.Enum + 1209, // 1446: otg.PatternFlowEthernetPauseControlOpCode.increment:type_name -> otg.PatternFlowEthernetPauseControlOpCodeCounter + 1209, // 1447: otg.PatternFlowEthernetPauseControlOpCode.decrement:type_name -> otg.PatternFlowEthernetPauseControlOpCodeCounter + 1210, // 1448: otg.PatternFlowEthernetPauseControlOpCode.metric_tags:type_name -> otg.PatternFlowEthernetPauseControlOpCodeMetricTag + 309, // 1449: otg.PatternFlowEthernetPauseTime.choice:type_name -> otg.PatternFlowEthernetPauseTime.Choice.Enum + 1212, // 1450: otg.PatternFlowEthernetPauseTime.increment:type_name -> otg.PatternFlowEthernetPauseTimeCounter + 1212, // 1451: otg.PatternFlowEthernetPauseTime.decrement:type_name -> otg.PatternFlowEthernetPauseTimeCounter + 1213, // 1452: otg.PatternFlowEthernetPauseTime.metric_tags:type_name -> otg.PatternFlowEthernetPauseTimeMetricTag + 310, // 1453: otg.PatternFlowTcpSrcPort.choice:type_name -> otg.PatternFlowTcpSrcPort.Choice.Enum + 1215, // 1454: otg.PatternFlowTcpSrcPort.increment:type_name -> otg.PatternFlowTcpSrcPortCounter + 1215, // 1455: otg.PatternFlowTcpSrcPort.decrement:type_name -> otg.PatternFlowTcpSrcPortCounter + 1216, // 1456: otg.PatternFlowTcpSrcPort.metric_tags:type_name -> otg.PatternFlowTcpSrcPortMetricTag + 1217, // 1457: otg.PatternFlowTcpSrcPort.random:type_name -> otg.PatternFlowTcpSrcPortRandom + 311, // 1458: otg.PatternFlowTcpDstPort.choice:type_name -> otg.PatternFlowTcpDstPort.Choice.Enum + 1219, // 1459: otg.PatternFlowTcpDstPort.increment:type_name -> otg.PatternFlowTcpDstPortCounter + 1219, // 1460: otg.PatternFlowTcpDstPort.decrement:type_name -> otg.PatternFlowTcpDstPortCounter + 1220, // 1461: otg.PatternFlowTcpDstPort.metric_tags:type_name -> otg.PatternFlowTcpDstPortMetricTag + 1221, // 1462: otg.PatternFlowTcpDstPort.random:type_name -> otg.PatternFlowTcpDstPortRandom + 312, // 1463: otg.PatternFlowTcpSeqNum.choice:type_name -> otg.PatternFlowTcpSeqNum.Choice.Enum + 1223, // 1464: otg.PatternFlowTcpSeqNum.increment:type_name -> otg.PatternFlowTcpSeqNumCounter + 1223, // 1465: otg.PatternFlowTcpSeqNum.decrement:type_name -> otg.PatternFlowTcpSeqNumCounter + 1224, // 1466: otg.PatternFlowTcpSeqNum.metric_tags:type_name -> otg.PatternFlowTcpSeqNumMetricTag + 313, // 1467: otg.PatternFlowTcpAckNum.choice:type_name -> otg.PatternFlowTcpAckNum.Choice.Enum + 1226, // 1468: otg.PatternFlowTcpAckNum.increment:type_name -> otg.PatternFlowTcpAckNumCounter + 1226, // 1469: otg.PatternFlowTcpAckNum.decrement:type_name -> otg.PatternFlowTcpAckNumCounter + 1227, // 1470: otg.PatternFlowTcpAckNum.metric_tags:type_name -> otg.PatternFlowTcpAckNumMetricTag + 314, // 1471: otg.PatternFlowTcpDataOffset.choice:type_name -> otg.PatternFlowTcpDataOffset.Choice.Enum + 1229, // 1472: otg.PatternFlowTcpDataOffset.increment:type_name -> otg.PatternFlowTcpDataOffsetCounter + 1229, // 1473: otg.PatternFlowTcpDataOffset.decrement:type_name -> otg.PatternFlowTcpDataOffsetCounter + 1230, // 1474: otg.PatternFlowTcpDataOffset.metric_tags:type_name -> otg.PatternFlowTcpDataOffsetMetricTag + 315, // 1475: otg.PatternFlowTcpEcnNs.choice:type_name -> otg.PatternFlowTcpEcnNs.Choice.Enum + 1232, // 1476: otg.PatternFlowTcpEcnNs.increment:type_name -> otg.PatternFlowTcpEcnNsCounter + 1232, // 1477: otg.PatternFlowTcpEcnNs.decrement:type_name -> otg.PatternFlowTcpEcnNsCounter + 1233, // 1478: otg.PatternFlowTcpEcnNs.metric_tags:type_name -> otg.PatternFlowTcpEcnNsMetricTag + 316, // 1479: otg.PatternFlowTcpEcnCwr.choice:type_name -> otg.PatternFlowTcpEcnCwr.Choice.Enum + 1235, // 1480: otg.PatternFlowTcpEcnCwr.increment:type_name -> otg.PatternFlowTcpEcnCwrCounter + 1235, // 1481: otg.PatternFlowTcpEcnCwr.decrement:type_name -> otg.PatternFlowTcpEcnCwrCounter + 1236, // 1482: otg.PatternFlowTcpEcnCwr.metric_tags:type_name -> otg.PatternFlowTcpEcnCwrMetricTag + 317, // 1483: otg.PatternFlowTcpEcnEcho.choice:type_name -> otg.PatternFlowTcpEcnEcho.Choice.Enum + 1238, // 1484: otg.PatternFlowTcpEcnEcho.increment:type_name -> otg.PatternFlowTcpEcnEchoCounter + 1238, // 1485: otg.PatternFlowTcpEcnEcho.decrement:type_name -> otg.PatternFlowTcpEcnEchoCounter + 1239, // 1486: otg.PatternFlowTcpEcnEcho.metric_tags:type_name -> otg.PatternFlowTcpEcnEchoMetricTag + 318, // 1487: otg.PatternFlowTcpCtlUrg.choice:type_name -> otg.PatternFlowTcpCtlUrg.Choice.Enum + 1241, // 1488: otg.PatternFlowTcpCtlUrg.increment:type_name -> otg.PatternFlowTcpCtlUrgCounter + 1241, // 1489: otg.PatternFlowTcpCtlUrg.decrement:type_name -> otg.PatternFlowTcpCtlUrgCounter + 1242, // 1490: otg.PatternFlowTcpCtlUrg.metric_tags:type_name -> otg.PatternFlowTcpCtlUrgMetricTag + 319, // 1491: otg.PatternFlowTcpCtlAck.choice:type_name -> otg.PatternFlowTcpCtlAck.Choice.Enum + 1244, // 1492: otg.PatternFlowTcpCtlAck.increment:type_name -> otg.PatternFlowTcpCtlAckCounter + 1244, // 1493: otg.PatternFlowTcpCtlAck.decrement:type_name -> otg.PatternFlowTcpCtlAckCounter + 1245, // 1494: otg.PatternFlowTcpCtlAck.metric_tags:type_name -> otg.PatternFlowTcpCtlAckMetricTag + 320, // 1495: otg.PatternFlowTcpCtlPsh.choice:type_name -> otg.PatternFlowTcpCtlPsh.Choice.Enum + 1247, // 1496: otg.PatternFlowTcpCtlPsh.increment:type_name -> otg.PatternFlowTcpCtlPshCounter + 1247, // 1497: otg.PatternFlowTcpCtlPsh.decrement:type_name -> otg.PatternFlowTcpCtlPshCounter + 1248, // 1498: otg.PatternFlowTcpCtlPsh.metric_tags:type_name -> otg.PatternFlowTcpCtlPshMetricTag + 321, // 1499: otg.PatternFlowTcpCtlRst.choice:type_name -> otg.PatternFlowTcpCtlRst.Choice.Enum + 1250, // 1500: otg.PatternFlowTcpCtlRst.increment:type_name -> otg.PatternFlowTcpCtlRstCounter + 1250, // 1501: otg.PatternFlowTcpCtlRst.decrement:type_name -> otg.PatternFlowTcpCtlRstCounter + 1251, // 1502: otg.PatternFlowTcpCtlRst.metric_tags:type_name -> otg.PatternFlowTcpCtlRstMetricTag + 322, // 1503: otg.PatternFlowTcpCtlSyn.choice:type_name -> otg.PatternFlowTcpCtlSyn.Choice.Enum + 1253, // 1504: otg.PatternFlowTcpCtlSyn.increment:type_name -> otg.PatternFlowTcpCtlSynCounter + 1253, // 1505: otg.PatternFlowTcpCtlSyn.decrement:type_name -> otg.PatternFlowTcpCtlSynCounter + 1254, // 1506: otg.PatternFlowTcpCtlSyn.metric_tags:type_name -> otg.PatternFlowTcpCtlSynMetricTag + 323, // 1507: otg.PatternFlowTcpCtlFin.choice:type_name -> otg.PatternFlowTcpCtlFin.Choice.Enum + 1256, // 1508: otg.PatternFlowTcpCtlFin.increment:type_name -> otg.PatternFlowTcpCtlFinCounter + 1256, // 1509: otg.PatternFlowTcpCtlFin.decrement:type_name -> otg.PatternFlowTcpCtlFinCounter + 1257, // 1510: otg.PatternFlowTcpCtlFin.metric_tags:type_name -> otg.PatternFlowTcpCtlFinMetricTag + 324, // 1511: otg.PatternFlowTcpWindow.choice:type_name -> otg.PatternFlowTcpWindow.Choice.Enum + 1259, // 1512: otg.PatternFlowTcpWindow.increment:type_name -> otg.PatternFlowTcpWindowCounter + 1259, // 1513: otg.PatternFlowTcpWindow.decrement:type_name -> otg.PatternFlowTcpWindowCounter + 1260, // 1514: otg.PatternFlowTcpWindow.metric_tags:type_name -> otg.PatternFlowTcpWindowMetricTag + 325, // 1515: otg.PatternFlowTcpChecksum.choice:type_name -> otg.PatternFlowTcpChecksum.Choice.Enum + 326, // 1516: otg.PatternFlowTcpChecksum.generated:type_name -> otg.PatternFlowTcpChecksum.Generated.Enum + 327, // 1517: otg.PatternFlowUdpSrcPort.choice:type_name -> otg.PatternFlowUdpSrcPort.Choice.Enum + 1263, // 1518: otg.PatternFlowUdpSrcPort.increment:type_name -> otg.PatternFlowUdpSrcPortCounter + 1263, // 1519: otg.PatternFlowUdpSrcPort.decrement:type_name -> otg.PatternFlowUdpSrcPortCounter + 1264, // 1520: otg.PatternFlowUdpSrcPort.metric_tags:type_name -> otg.PatternFlowUdpSrcPortMetricTag + 1265, // 1521: otg.PatternFlowUdpSrcPort.random:type_name -> otg.PatternFlowUdpSrcPortRandom + 328, // 1522: otg.PatternFlowUdpDstPort.choice:type_name -> otg.PatternFlowUdpDstPort.Choice.Enum + 1267, // 1523: otg.PatternFlowUdpDstPort.increment:type_name -> otg.PatternFlowUdpDstPortCounter + 1267, // 1524: otg.PatternFlowUdpDstPort.decrement:type_name -> otg.PatternFlowUdpDstPortCounter + 1268, // 1525: otg.PatternFlowUdpDstPort.metric_tags:type_name -> otg.PatternFlowUdpDstPortMetricTag + 1269, // 1526: otg.PatternFlowUdpDstPort.random:type_name -> otg.PatternFlowUdpDstPortRandom + 329, // 1527: otg.PatternFlowUdpLength.choice:type_name -> otg.PatternFlowUdpLength.Choice.Enum + 1271, // 1528: otg.PatternFlowUdpLength.increment:type_name -> otg.PatternFlowUdpLengthCounter + 1271, // 1529: otg.PatternFlowUdpLength.decrement:type_name -> otg.PatternFlowUdpLengthCounter + 1272, // 1530: otg.PatternFlowUdpLength.metric_tags:type_name -> otg.PatternFlowUdpLengthMetricTag + 330, // 1531: otg.PatternFlowUdpChecksum.choice:type_name -> otg.PatternFlowUdpChecksum.Choice.Enum + 331, // 1532: otg.PatternFlowUdpChecksum.generated:type_name -> otg.PatternFlowUdpChecksum.Generated.Enum + 332, // 1533: otg.PatternFlowGreChecksumPresent.choice:type_name -> otg.PatternFlowGreChecksumPresent.Choice.Enum + 1275, // 1534: otg.PatternFlowGreChecksumPresent.increment:type_name -> otg.PatternFlowGreChecksumPresentCounter + 1275, // 1535: otg.PatternFlowGreChecksumPresent.decrement:type_name -> otg.PatternFlowGreChecksumPresentCounter + 1276, // 1536: otg.PatternFlowGreChecksumPresent.metric_tags:type_name -> otg.PatternFlowGreChecksumPresentMetricTag + 333, // 1537: otg.PatternFlowGreReserved0.choice:type_name -> otg.PatternFlowGreReserved0.Choice.Enum + 1278, // 1538: otg.PatternFlowGreReserved0.increment:type_name -> otg.PatternFlowGreReserved0Counter + 1278, // 1539: otg.PatternFlowGreReserved0.decrement:type_name -> otg.PatternFlowGreReserved0Counter + 1279, // 1540: otg.PatternFlowGreReserved0.metric_tags:type_name -> otg.PatternFlowGreReserved0MetricTag + 334, // 1541: otg.PatternFlowGreVersion.choice:type_name -> otg.PatternFlowGreVersion.Choice.Enum + 1281, // 1542: otg.PatternFlowGreVersion.increment:type_name -> otg.PatternFlowGreVersionCounter + 1281, // 1543: otg.PatternFlowGreVersion.decrement:type_name -> otg.PatternFlowGreVersionCounter + 1282, // 1544: otg.PatternFlowGreVersion.metric_tags:type_name -> otg.PatternFlowGreVersionMetricTag + 335, // 1545: otg.PatternFlowGreProtocol.choice:type_name -> otg.PatternFlowGreProtocol.Choice.Enum + 1284, // 1546: otg.PatternFlowGreProtocol.increment:type_name -> otg.PatternFlowGreProtocolCounter + 1284, // 1547: otg.PatternFlowGreProtocol.decrement:type_name -> otg.PatternFlowGreProtocolCounter + 1285, // 1548: otg.PatternFlowGreProtocol.metric_tags:type_name -> otg.PatternFlowGreProtocolMetricTag + 336, // 1549: otg.PatternFlowGreChecksum.choice:type_name -> otg.PatternFlowGreChecksum.Choice.Enum + 337, // 1550: otg.PatternFlowGreChecksum.generated:type_name -> otg.PatternFlowGreChecksum.Generated.Enum + 338, // 1551: otg.PatternFlowGreReserved1.choice:type_name -> otg.PatternFlowGreReserved1.Choice.Enum + 1288, // 1552: otg.PatternFlowGreReserved1.increment:type_name -> otg.PatternFlowGreReserved1Counter + 1288, // 1553: otg.PatternFlowGreReserved1.decrement:type_name -> otg.PatternFlowGreReserved1Counter + 1289, // 1554: otg.PatternFlowGreReserved1.metric_tags:type_name -> otg.PatternFlowGreReserved1MetricTag + 339, // 1555: otg.PatternFlowGtpv1Version.choice:type_name -> otg.PatternFlowGtpv1Version.Choice.Enum + 1291, // 1556: otg.PatternFlowGtpv1Version.increment:type_name -> otg.PatternFlowGtpv1VersionCounter + 1291, // 1557: otg.PatternFlowGtpv1Version.decrement:type_name -> otg.PatternFlowGtpv1VersionCounter + 1292, // 1558: otg.PatternFlowGtpv1Version.metric_tags:type_name -> otg.PatternFlowGtpv1VersionMetricTag + 340, // 1559: otg.PatternFlowGtpv1ProtocolType.choice:type_name -> otg.PatternFlowGtpv1ProtocolType.Choice.Enum + 1294, // 1560: otg.PatternFlowGtpv1ProtocolType.increment:type_name -> otg.PatternFlowGtpv1ProtocolTypeCounter + 1294, // 1561: otg.PatternFlowGtpv1ProtocolType.decrement:type_name -> otg.PatternFlowGtpv1ProtocolTypeCounter + 1295, // 1562: otg.PatternFlowGtpv1ProtocolType.metric_tags:type_name -> otg.PatternFlowGtpv1ProtocolTypeMetricTag + 341, // 1563: otg.PatternFlowGtpv1Reserved.choice:type_name -> otg.PatternFlowGtpv1Reserved.Choice.Enum + 1297, // 1564: otg.PatternFlowGtpv1Reserved.increment:type_name -> otg.PatternFlowGtpv1ReservedCounter + 1297, // 1565: otg.PatternFlowGtpv1Reserved.decrement:type_name -> otg.PatternFlowGtpv1ReservedCounter + 1298, // 1566: otg.PatternFlowGtpv1Reserved.metric_tags:type_name -> otg.PatternFlowGtpv1ReservedMetricTag + 342, // 1567: otg.PatternFlowGtpv1EFlag.choice:type_name -> otg.PatternFlowGtpv1EFlag.Choice.Enum + 1300, // 1568: otg.PatternFlowGtpv1EFlag.increment:type_name -> otg.PatternFlowGtpv1EFlagCounter + 1300, // 1569: otg.PatternFlowGtpv1EFlag.decrement:type_name -> otg.PatternFlowGtpv1EFlagCounter + 1301, // 1570: otg.PatternFlowGtpv1EFlag.metric_tags:type_name -> otg.PatternFlowGtpv1EFlagMetricTag + 343, // 1571: otg.PatternFlowGtpv1SFlag.choice:type_name -> otg.PatternFlowGtpv1SFlag.Choice.Enum + 1303, // 1572: otg.PatternFlowGtpv1SFlag.increment:type_name -> otg.PatternFlowGtpv1SFlagCounter + 1303, // 1573: otg.PatternFlowGtpv1SFlag.decrement:type_name -> otg.PatternFlowGtpv1SFlagCounter + 1304, // 1574: otg.PatternFlowGtpv1SFlag.metric_tags:type_name -> otg.PatternFlowGtpv1SFlagMetricTag + 344, // 1575: otg.PatternFlowGtpv1PnFlag.choice:type_name -> otg.PatternFlowGtpv1PnFlag.Choice.Enum + 1306, // 1576: otg.PatternFlowGtpv1PnFlag.increment:type_name -> otg.PatternFlowGtpv1PnFlagCounter + 1306, // 1577: otg.PatternFlowGtpv1PnFlag.decrement:type_name -> otg.PatternFlowGtpv1PnFlagCounter + 1307, // 1578: otg.PatternFlowGtpv1PnFlag.metric_tags:type_name -> otg.PatternFlowGtpv1PnFlagMetricTag + 345, // 1579: otg.PatternFlowGtpv1MessageType.choice:type_name -> otg.PatternFlowGtpv1MessageType.Choice.Enum + 1309, // 1580: otg.PatternFlowGtpv1MessageType.increment:type_name -> otg.PatternFlowGtpv1MessageTypeCounter + 1309, // 1581: otg.PatternFlowGtpv1MessageType.decrement:type_name -> otg.PatternFlowGtpv1MessageTypeCounter + 1310, // 1582: otg.PatternFlowGtpv1MessageType.metric_tags:type_name -> otg.PatternFlowGtpv1MessageTypeMetricTag + 346, // 1583: otg.PatternFlowGtpv1MessageLength.choice:type_name -> otg.PatternFlowGtpv1MessageLength.Choice.Enum + 1312, // 1584: otg.PatternFlowGtpv1MessageLength.increment:type_name -> otg.PatternFlowGtpv1MessageLengthCounter + 1312, // 1585: otg.PatternFlowGtpv1MessageLength.decrement:type_name -> otg.PatternFlowGtpv1MessageLengthCounter + 1313, // 1586: otg.PatternFlowGtpv1MessageLength.metric_tags:type_name -> otg.PatternFlowGtpv1MessageLengthMetricTag + 347, // 1587: otg.PatternFlowGtpv1Teid.choice:type_name -> otg.PatternFlowGtpv1Teid.Choice.Enum + 1315, // 1588: otg.PatternFlowGtpv1Teid.increment:type_name -> otg.PatternFlowGtpv1TeidCounter + 1315, // 1589: otg.PatternFlowGtpv1Teid.decrement:type_name -> otg.PatternFlowGtpv1TeidCounter + 1316, // 1590: otg.PatternFlowGtpv1Teid.metric_tags:type_name -> otg.PatternFlowGtpv1TeidMetricTag + 348, // 1591: otg.PatternFlowGtpv1SquenceNumber.choice:type_name -> otg.PatternFlowGtpv1SquenceNumber.Choice.Enum + 1318, // 1592: otg.PatternFlowGtpv1SquenceNumber.increment:type_name -> otg.PatternFlowGtpv1SquenceNumberCounter + 1318, // 1593: otg.PatternFlowGtpv1SquenceNumber.decrement:type_name -> otg.PatternFlowGtpv1SquenceNumberCounter + 1319, // 1594: otg.PatternFlowGtpv1SquenceNumber.metric_tags:type_name -> otg.PatternFlowGtpv1SquenceNumberMetricTag + 349, // 1595: otg.PatternFlowGtpv1NPduNumber.choice:type_name -> otg.PatternFlowGtpv1NPduNumber.Choice.Enum + 1321, // 1596: otg.PatternFlowGtpv1NPduNumber.increment:type_name -> otg.PatternFlowGtpv1NPduNumberCounter + 1321, // 1597: otg.PatternFlowGtpv1NPduNumber.decrement:type_name -> otg.PatternFlowGtpv1NPduNumberCounter + 1322, // 1598: otg.PatternFlowGtpv1NPduNumber.metric_tags:type_name -> otg.PatternFlowGtpv1NPduNumberMetricTag + 350, // 1599: otg.PatternFlowGtpv1NextExtensionHeaderType.choice:type_name -> otg.PatternFlowGtpv1NextExtensionHeaderType.Choice.Enum + 1324, // 1600: otg.PatternFlowGtpv1NextExtensionHeaderType.increment:type_name -> otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter + 1324, // 1601: otg.PatternFlowGtpv1NextExtensionHeaderType.decrement:type_name -> otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter + 1325, // 1602: otg.PatternFlowGtpv1NextExtensionHeaderType.metric_tags:type_name -> otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + 351, // 1603: otg.PatternFlowGtpExtensionExtensionLength.choice:type_name -> otg.PatternFlowGtpExtensionExtensionLength.Choice.Enum + 1327, // 1604: otg.PatternFlowGtpExtensionExtensionLength.increment:type_name -> otg.PatternFlowGtpExtensionExtensionLengthCounter + 1327, // 1605: otg.PatternFlowGtpExtensionExtensionLength.decrement:type_name -> otg.PatternFlowGtpExtensionExtensionLengthCounter + 1328, // 1606: otg.PatternFlowGtpExtensionExtensionLength.metric_tags:type_name -> otg.PatternFlowGtpExtensionExtensionLengthMetricTag + 352, // 1607: otg.PatternFlowGtpExtensionContents.choice:type_name -> otg.PatternFlowGtpExtensionContents.Choice.Enum + 1330, // 1608: otg.PatternFlowGtpExtensionContents.increment:type_name -> otg.PatternFlowGtpExtensionContentsCounter + 1330, // 1609: otg.PatternFlowGtpExtensionContents.decrement:type_name -> otg.PatternFlowGtpExtensionContentsCounter + 1331, // 1610: otg.PatternFlowGtpExtensionContents.metric_tags:type_name -> otg.PatternFlowGtpExtensionContentsMetricTag + 353, // 1611: otg.PatternFlowGtpExtensionNextExtensionHeader.choice:type_name -> otg.PatternFlowGtpExtensionNextExtensionHeader.Choice.Enum + 1333, // 1612: otg.PatternFlowGtpExtensionNextExtensionHeader.increment:type_name -> otg.PatternFlowGtpExtensionNextExtensionHeaderCounter + 1333, // 1613: otg.PatternFlowGtpExtensionNextExtensionHeader.decrement:type_name -> otg.PatternFlowGtpExtensionNextExtensionHeaderCounter + 1334, // 1614: otg.PatternFlowGtpExtensionNextExtensionHeader.metric_tags:type_name -> otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag + 354, // 1615: otg.PatternFlowGtpv2Version.choice:type_name -> otg.PatternFlowGtpv2Version.Choice.Enum + 1336, // 1616: otg.PatternFlowGtpv2Version.increment:type_name -> otg.PatternFlowGtpv2VersionCounter + 1336, // 1617: otg.PatternFlowGtpv2Version.decrement:type_name -> otg.PatternFlowGtpv2VersionCounter + 1337, // 1618: otg.PatternFlowGtpv2Version.metric_tags:type_name -> otg.PatternFlowGtpv2VersionMetricTag + 355, // 1619: otg.PatternFlowGtpv2PiggybackingFlag.choice:type_name -> otg.PatternFlowGtpv2PiggybackingFlag.Choice.Enum + 1339, // 1620: otg.PatternFlowGtpv2PiggybackingFlag.increment:type_name -> otg.PatternFlowGtpv2PiggybackingFlagCounter + 1339, // 1621: otg.PatternFlowGtpv2PiggybackingFlag.decrement:type_name -> otg.PatternFlowGtpv2PiggybackingFlagCounter + 1340, // 1622: otg.PatternFlowGtpv2PiggybackingFlag.metric_tags:type_name -> otg.PatternFlowGtpv2PiggybackingFlagMetricTag + 356, // 1623: otg.PatternFlowGtpv2TeidFlag.choice:type_name -> otg.PatternFlowGtpv2TeidFlag.Choice.Enum + 1342, // 1624: otg.PatternFlowGtpv2TeidFlag.increment:type_name -> otg.PatternFlowGtpv2TeidFlagCounter + 1342, // 1625: otg.PatternFlowGtpv2TeidFlag.decrement:type_name -> otg.PatternFlowGtpv2TeidFlagCounter + 1343, // 1626: otg.PatternFlowGtpv2TeidFlag.metric_tags:type_name -> otg.PatternFlowGtpv2TeidFlagMetricTag + 357, // 1627: otg.PatternFlowGtpv2Spare1.choice:type_name -> otg.PatternFlowGtpv2Spare1.Choice.Enum + 1345, // 1628: otg.PatternFlowGtpv2Spare1.increment:type_name -> otg.PatternFlowGtpv2Spare1Counter + 1345, // 1629: otg.PatternFlowGtpv2Spare1.decrement:type_name -> otg.PatternFlowGtpv2Spare1Counter + 1346, // 1630: otg.PatternFlowGtpv2Spare1.metric_tags:type_name -> otg.PatternFlowGtpv2Spare1MetricTag + 358, // 1631: otg.PatternFlowGtpv2MessageType.choice:type_name -> otg.PatternFlowGtpv2MessageType.Choice.Enum + 1348, // 1632: otg.PatternFlowGtpv2MessageType.increment:type_name -> otg.PatternFlowGtpv2MessageTypeCounter + 1348, // 1633: otg.PatternFlowGtpv2MessageType.decrement:type_name -> otg.PatternFlowGtpv2MessageTypeCounter + 1349, // 1634: otg.PatternFlowGtpv2MessageType.metric_tags:type_name -> otg.PatternFlowGtpv2MessageTypeMetricTag + 359, // 1635: otg.PatternFlowGtpv2MessageLength.choice:type_name -> otg.PatternFlowGtpv2MessageLength.Choice.Enum + 1351, // 1636: otg.PatternFlowGtpv2MessageLength.increment:type_name -> otg.PatternFlowGtpv2MessageLengthCounter + 1351, // 1637: otg.PatternFlowGtpv2MessageLength.decrement:type_name -> otg.PatternFlowGtpv2MessageLengthCounter + 1352, // 1638: otg.PatternFlowGtpv2MessageLength.metric_tags:type_name -> otg.PatternFlowGtpv2MessageLengthMetricTag + 360, // 1639: otg.PatternFlowGtpv2Teid.choice:type_name -> otg.PatternFlowGtpv2Teid.Choice.Enum + 1354, // 1640: otg.PatternFlowGtpv2Teid.increment:type_name -> otg.PatternFlowGtpv2TeidCounter + 1354, // 1641: otg.PatternFlowGtpv2Teid.decrement:type_name -> otg.PatternFlowGtpv2TeidCounter + 1355, // 1642: otg.PatternFlowGtpv2Teid.metric_tags:type_name -> otg.PatternFlowGtpv2TeidMetricTag + 361, // 1643: otg.PatternFlowGtpv2SequenceNumber.choice:type_name -> otg.PatternFlowGtpv2SequenceNumber.Choice.Enum + 1357, // 1644: otg.PatternFlowGtpv2SequenceNumber.increment:type_name -> otg.PatternFlowGtpv2SequenceNumberCounter + 1357, // 1645: otg.PatternFlowGtpv2SequenceNumber.decrement:type_name -> otg.PatternFlowGtpv2SequenceNumberCounter + 1358, // 1646: otg.PatternFlowGtpv2SequenceNumber.metric_tags:type_name -> otg.PatternFlowGtpv2SequenceNumberMetricTag + 362, // 1647: otg.PatternFlowGtpv2Spare2.choice:type_name -> otg.PatternFlowGtpv2Spare2.Choice.Enum + 1360, // 1648: otg.PatternFlowGtpv2Spare2.increment:type_name -> otg.PatternFlowGtpv2Spare2Counter + 1360, // 1649: otg.PatternFlowGtpv2Spare2.decrement:type_name -> otg.PatternFlowGtpv2Spare2Counter + 1361, // 1650: otg.PatternFlowGtpv2Spare2.metric_tags:type_name -> otg.PatternFlowGtpv2Spare2MetricTag + 363, // 1651: otg.PatternFlowArpHardwareType.choice:type_name -> otg.PatternFlowArpHardwareType.Choice.Enum + 1363, // 1652: otg.PatternFlowArpHardwareType.increment:type_name -> otg.PatternFlowArpHardwareTypeCounter + 1363, // 1653: otg.PatternFlowArpHardwareType.decrement:type_name -> otg.PatternFlowArpHardwareTypeCounter + 1364, // 1654: otg.PatternFlowArpHardwareType.metric_tags:type_name -> otg.PatternFlowArpHardwareTypeMetricTag + 364, // 1655: otg.PatternFlowArpProtocolType.choice:type_name -> otg.PatternFlowArpProtocolType.Choice.Enum + 1366, // 1656: otg.PatternFlowArpProtocolType.increment:type_name -> otg.PatternFlowArpProtocolTypeCounter + 1366, // 1657: otg.PatternFlowArpProtocolType.decrement:type_name -> otg.PatternFlowArpProtocolTypeCounter + 1367, // 1658: otg.PatternFlowArpProtocolType.metric_tags:type_name -> otg.PatternFlowArpProtocolTypeMetricTag + 365, // 1659: otg.PatternFlowArpHardwareLength.choice:type_name -> otg.PatternFlowArpHardwareLength.Choice.Enum + 1369, // 1660: otg.PatternFlowArpHardwareLength.increment:type_name -> otg.PatternFlowArpHardwareLengthCounter + 1369, // 1661: otg.PatternFlowArpHardwareLength.decrement:type_name -> otg.PatternFlowArpHardwareLengthCounter + 1370, // 1662: otg.PatternFlowArpHardwareLength.metric_tags:type_name -> otg.PatternFlowArpHardwareLengthMetricTag + 366, // 1663: otg.PatternFlowArpProtocolLength.choice:type_name -> otg.PatternFlowArpProtocolLength.Choice.Enum + 1372, // 1664: otg.PatternFlowArpProtocolLength.increment:type_name -> otg.PatternFlowArpProtocolLengthCounter + 1372, // 1665: otg.PatternFlowArpProtocolLength.decrement:type_name -> otg.PatternFlowArpProtocolLengthCounter + 1373, // 1666: otg.PatternFlowArpProtocolLength.metric_tags:type_name -> otg.PatternFlowArpProtocolLengthMetricTag + 367, // 1667: otg.PatternFlowArpOperation.choice:type_name -> otg.PatternFlowArpOperation.Choice.Enum + 1375, // 1668: otg.PatternFlowArpOperation.increment:type_name -> otg.PatternFlowArpOperationCounter + 1375, // 1669: otg.PatternFlowArpOperation.decrement:type_name -> otg.PatternFlowArpOperationCounter + 1376, // 1670: otg.PatternFlowArpOperation.metric_tags:type_name -> otg.PatternFlowArpOperationMetricTag + 368, // 1671: otg.PatternFlowArpSenderHardwareAddr.choice:type_name -> otg.PatternFlowArpSenderHardwareAddr.Choice.Enum + 1378, // 1672: otg.PatternFlowArpSenderHardwareAddr.increment:type_name -> otg.PatternFlowArpSenderHardwareAddrCounter + 1378, // 1673: otg.PatternFlowArpSenderHardwareAddr.decrement:type_name -> otg.PatternFlowArpSenderHardwareAddrCounter + 1379, // 1674: otg.PatternFlowArpSenderHardwareAddr.metric_tags:type_name -> otg.PatternFlowArpSenderHardwareAddrMetricTag + 369, // 1675: otg.PatternFlowArpSenderProtocolAddr.choice:type_name -> otg.PatternFlowArpSenderProtocolAddr.Choice.Enum + 1381, // 1676: otg.PatternFlowArpSenderProtocolAddr.increment:type_name -> otg.PatternFlowArpSenderProtocolAddrCounter + 1381, // 1677: otg.PatternFlowArpSenderProtocolAddr.decrement:type_name -> otg.PatternFlowArpSenderProtocolAddrCounter + 1382, // 1678: otg.PatternFlowArpSenderProtocolAddr.metric_tags:type_name -> otg.PatternFlowArpSenderProtocolAddrMetricTag + 370, // 1679: otg.PatternFlowArpTargetHardwareAddr.choice:type_name -> otg.PatternFlowArpTargetHardwareAddr.Choice.Enum + 1384, // 1680: otg.PatternFlowArpTargetHardwareAddr.increment:type_name -> otg.PatternFlowArpTargetHardwareAddrCounter + 1384, // 1681: otg.PatternFlowArpTargetHardwareAddr.decrement:type_name -> otg.PatternFlowArpTargetHardwareAddrCounter + 1385, // 1682: otg.PatternFlowArpTargetHardwareAddr.metric_tags:type_name -> otg.PatternFlowArpTargetHardwareAddrMetricTag + 371, // 1683: otg.PatternFlowArpTargetProtocolAddr.choice:type_name -> otg.PatternFlowArpTargetProtocolAddr.Choice.Enum + 1387, // 1684: otg.PatternFlowArpTargetProtocolAddr.increment:type_name -> otg.PatternFlowArpTargetProtocolAddrCounter + 1387, // 1685: otg.PatternFlowArpTargetProtocolAddr.decrement:type_name -> otg.PatternFlowArpTargetProtocolAddrCounter + 1388, // 1686: otg.PatternFlowArpTargetProtocolAddr.metric_tags:type_name -> otg.PatternFlowArpTargetProtocolAddrMetricTag + 372, // 1687: otg.PatternFlowIcmpEchoType.choice:type_name -> otg.PatternFlowIcmpEchoType.Choice.Enum + 1390, // 1688: otg.PatternFlowIcmpEchoType.increment:type_name -> otg.PatternFlowIcmpEchoTypeCounter + 1390, // 1689: otg.PatternFlowIcmpEchoType.decrement:type_name -> otg.PatternFlowIcmpEchoTypeCounter + 1391, // 1690: otg.PatternFlowIcmpEchoType.metric_tags:type_name -> otg.PatternFlowIcmpEchoTypeMetricTag + 373, // 1691: otg.PatternFlowIcmpEchoCode.choice:type_name -> otg.PatternFlowIcmpEchoCode.Choice.Enum + 1393, // 1692: otg.PatternFlowIcmpEchoCode.increment:type_name -> otg.PatternFlowIcmpEchoCodeCounter + 1393, // 1693: otg.PatternFlowIcmpEchoCode.decrement:type_name -> otg.PatternFlowIcmpEchoCodeCounter + 1394, // 1694: otg.PatternFlowIcmpEchoCode.metric_tags:type_name -> otg.PatternFlowIcmpEchoCodeMetricTag + 374, // 1695: otg.PatternFlowIcmpEchoChecksum.choice:type_name -> otg.PatternFlowIcmpEchoChecksum.Choice.Enum + 375, // 1696: otg.PatternFlowIcmpEchoChecksum.generated:type_name -> otg.PatternFlowIcmpEchoChecksum.Generated.Enum + 376, // 1697: otg.PatternFlowIcmpEchoIdentifier.choice:type_name -> otg.PatternFlowIcmpEchoIdentifier.Choice.Enum + 1397, // 1698: otg.PatternFlowIcmpEchoIdentifier.increment:type_name -> otg.PatternFlowIcmpEchoIdentifierCounter + 1397, // 1699: otg.PatternFlowIcmpEchoIdentifier.decrement:type_name -> otg.PatternFlowIcmpEchoIdentifierCounter + 1398, // 1700: otg.PatternFlowIcmpEchoIdentifier.metric_tags:type_name -> otg.PatternFlowIcmpEchoIdentifierMetricTag + 377, // 1701: otg.PatternFlowIcmpEchoSequenceNumber.choice:type_name -> otg.PatternFlowIcmpEchoSequenceNumber.Choice.Enum + 1400, // 1702: otg.PatternFlowIcmpEchoSequenceNumber.increment:type_name -> otg.PatternFlowIcmpEchoSequenceNumberCounter + 1400, // 1703: otg.PatternFlowIcmpEchoSequenceNumber.decrement:type_name -> otg.PatternFlowIcmpEchoSequenceNumberCounter + 1401, // 1704: otg.PatternFlowIcmpEchoSequenceNumber.metric_tags:type_name -> otg.PatternFlowIcmpEchoSequenceNumberMetricTag + 378, // 1705: otg.PatternFlowIcmpCommonChecksum.choice:type_name -> otg.PatternFlowIcmpCommonChecksum.Choice.Enum + 379, // 1706: otg.PatternFlowIcmpCommonChecksum.generated:type_name -> otg.PatternFlowIcmpCommonChecksum.Generated.Enum + 380, // 1707: otg.PatternFlowIcmpNextFieldsIdentifier.choice:type_name -> otg.PatternFlowIcmpNextFieldsIdentifier.Choice.Enum + 1404, // 1708: otg.PatternFlowIcmpNextFieldsIdentifier.increment:type_name -> otg.PatternFlowIcmpNextFieldsIdentifierCounter + 1404, // 1709: otg.PatternFlowIcmpNextFieldsIdentifier.decrement:type_name -> otg.PatternFlowIcmpNextFieldsIdentifierCounter + 1405, // 1710: otg.PatternFlowIcmpNextFieldsIdentifier.metric_tags:type_name -> otg.PatternFlowIcmpNextFieldsIdentifierMetricTag + 381, // 1711: otg.PatternFlowIcmpNextFieldsSequenceNumber.choice:type_name -> otg.PatternFlowIcmpNextFieldsSequenceNumber.Choice.Enum + 1407, // 1712: otg.PatternFlowIcmpNextFieldsSequenceNumber.increment:type_name -> otg.PatternFlowIcmpNextFieldsSequenceNumberCounter + 1407, // 1713: otg.PatternFlowIcmpNextFieldsSequenceNumber.decrement:type_name -> otg.PatternFlowIcmpNextFieldsSequenceNumberCounter + 1408, // 1714: otg.PatternFlowIcmpNextFieldsSequenceNumber.metric_tags:type_name -> otg.PatternFlowIcmpNextFieldsSequenceNumberMetricTag + 382, // 1715: otg.PatternFlowIcmpv6EchoType.choice:type_name -> otg.PatternFlowIcmpv6EchoType.Choice.Enum + 1410, // 1716: otg.PatternFlowIcmpv6EchoType.increment:type_name -> otg.PatternFlowIcmpv6EchoTypeCounter + 1410, // 1717: otg.PatternFlowIcmpv6EchoType.decrement:type_name -> otg.PatternFlowIcmpv6EchoTypeCounter + 1411, // 1718: otg.PatternFlowIcmpv6EchoType.metric_tags:type_name -> otg.PatternFlowIcmpv6EchoTypeMetricTag + 383, // 1719: otg.PatternFlowIcmpv6EchoCode.choice:type_name -> otg.PatternFlowIcmpv6EchoCode.Choice.Enum + 1413, // 1720: otg.PatternFlowIcmpv6EchoCode.increment:type_name -> otg.PatternFlowIcmpv6EchoCodeCounter + 1413, // 1721: otg.PatternFlowIcmpv6EchoCode.decrement:type_name -> otg.PatternFlowIcmpv6EchoCodeCounter + 1414, // 1722: otg.PatternFlowIcmpv6EchoCode.metric_tags:type_name -> otg.PatternFlowIcmpv6EchoCodeMetricTag + 384, // 1723: otg.PatternFlowIcmpv6EchoIdentifier.choice:type_name -> otg.PatternFlowIcmpv6EchoIdentifier.Choice.Enum + 1416, // 1724: otg.PatternFlowIcmpv6EchoIdentifier.increment:type_name -> otg.PatternFlowIcmpv6EchoIdentifierCounter + 1416, // 1725: otg.PatternFlowIcmpv6EchoIdentifier.decrement:type_name -> otg.PatternFlowIcmpv6EchoIdentifierCounter + 1417, // 1726: otg.PatternFlowIcmpv6EchoIdentifier.metric_tags:type_name -> otg.PatternFlowIcmpv6EchoIdentifierMetricTag + 385, // 1727: otg.PatternFlowIcmpv6EchoSequenceNumber.choice:type_name -> otg.PatternFlowIcmpv6EchoSequenceNumber.Choice.Enum + 1419, // 1728: otg.PatternFlowIcmpv6EchoSequenceNumber.increment:type_name -> otg.PatternFlowIcmpv6EchoSequenceNumberCounter + 1419, // 1729: otg.PatternFlowIcmpv6EchoSequenceNumber.decrement:type_name -> otg.PatternFlowIcmpv6EchoSequenceNumberCounter + 1420, // 1730: otg.PatternFlowIcmpv6EchoSequenceNumber.metric_tags:type_name -> otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag + 386, // 1731: otg.PatternFlowIcmpv6EchoChecksum.choice:type_name -> otg.PatternFlowIcmpv6EchoChecksum.Choice.Enum + 387, // 1732: otg.PatternFlowIcmpv6EchoChecksum.generated:type_name -> otg.PatternFlowIcmpv6EchoChecksum.Generated.Enum + 388, // 1733: otg.PatternFlowIcmpv6CommonChecksum.choice:type_name -> otg.PatternFlowIcmpv6CommonChecksum.Choice.Enum + 389, // 1734: otg.PatternFlowIcmpv6CommonChecksum.generated:type_name -> otg.PatternFlowIcmpv6CommonChecksum.Generated.Enum + 390, // 1735: otg.PatternFlowPppAddress.choice:type_name -> otg.PatternFlowPppAddress.Choice.Enum + 1424, // 1736: otg.PatternFlowPppAddress.increment:type_name -> otg.PatternFlowPppAddressCounter + 1424, // 1737: otg.PatternFlowPppAddress.decrement:type_name -> otg.PatternFlowPppAddressCounter + 1425, // 1738: otg.PatternFlowPppAddress.metric_tags:type_name -> otg.PatternFlowPppAddressMetricTag + 391, // 1739: otg.PatternFlowPppControl.choice:type_name -> otg.PatternFlowPppControl.Choice.Enum + 1427, // 1740: otg.PatternFlowPppControl.increment:type_name -> otg.PatternFlowPppControlCounter + 1427, // 1741: otg.PatternFlowPppControl.decrement:type_name -> otg.PatternFlowPppControlCounter + 1428, // 1742: otg.PatternFlowPppControl.metric_tags:type_name -> otg.PatternFlowPppControlMetricTag + 392, // 1743: otg.PatternFlowPppProtocolType.choice:type_name -> otg.PatternFlowPppProtocolType.Choice.Enum + 1430, // 1744: otg.PatternFlowPppProtocolType.increment:type_name -> otg.PatternFlowPppProtocolTypeCounter + 1430, // 1745: otg.PatternFlowPppProtocolType.decrement:type_name -> otg.PatternFlowPppProtocolTypeCounter + 1431, // 1746: otg.PatternFlowPppProtocolType.metric_tags:type_name -> otg.PatternFlowPppProtocolTypeMetricTag + 393, // 1747: otg.PatternFlowIgmpv1Version.choice:type_name -> otg.PatternFlowIgmpv1Version.Choice.Enum + 1433, // 1748: otg.PatternFlowIgmpv1Version.increment:type_name -> otg.PatternFlowIgmpv1VersionCounter + 1433, // 1749: otg.PatternFlowIgmpv1Version.decrement:type_name -> otg.PatternFlowIgmpv1VersionCounter + 1434, // 1750: otg.PatternFlowIgmpv1Version.metric_tags:type_name -> otg.PatternFlowIgmpv1VersionMetricTag + 394, // 1751: otg.PatternFlowIgmpv1Type.choice:type_name -> otg.PatternFlowIgmpv1Type.Choice.Enum + 1436, // 1752: otg.PatternFlowIgmpv1Type.increment:type_name -> otg.PatternFlowIgmpv1TypeCounter + 1436, // 1753: otg.PatternFlowIgmpv1Type.decrement:type_name -> otg.PatternFlowIgmpv1TypeCounter + 1437, // 1754: otg.PatternFlowIgmpv1Type.metric_tags:type_name -> otg.PatternFlowIgmpv1TypeMetricTag + 395, // 1755: otg.PatternFlowIgmpv1Unused.choice:type_name -> otg.PatternFlowIgmpv1Unused.Choice.Enum + 1439, // 1756: otg.PatternFlowIgmpv1Unused.increment:type_name -> otg.PatternFlowIgmpv1UnusedCounter + 1439, // 1757: otg.PatternFlowIgmpv1Unused.decrement:type_name -> otg.PatternFlowIgmpv1UnusedCounter + 1440, // 1758: otg.PatternFlowIgmpv1Unused.metric_tags:type_name -> otg.PatternFlowIgmpv1UnusedMetricTag + 396, // 1759: otg.PatternFlowIgmpv1Checksum.choice:type_name -> otg.PatternFlowIgmpv1Checksum.Choice.Enum + 397, // 1760: otg.PatternFlowIgmpv1Checksum.generated:type_name -> otg.PatternFlowIgmpv1Checksum.Generated.Enum + 398, // 1761: otg.PatternFlowIgmpv1GroupAddress.choice:type_name -> otg.PatternFlowIgmpv1GroupAddress.Choice.Enum + 1443, // 1762: otg.PatternFlowIgmpv1GroupAddress.increment:type_name -> otg.PatternFlowIgmpv1GroupAddressCounter + 1443, // 1763: otg.PatternFlowIgmpv1GroupAddress.decrement:type_name -> otg.PatternFlowIgmpv1GroupAddressCounter + 1444, // 1764: otg.PatternFlowIgmpv1GroupAddress.metric_tags:type_name -> otg.PatternFlowIgmpv1GroupAddressMetricTag + 399, // 1765: otg.PatternFlowMplsLabel.choice:type_name -> otg.PatternFlowMplsLabel.Choice.Enum + 1446, // 1766: otg.PatternFlowMplsLabel.increment:type_name -> otg.PatternFlowMplsLabelCounter + 1446, // 1767: otg.PatternFlowMplsLabel.decrement:type_name -> otg.PatternFlowMplsLabelCounter + 1447, // 1768: otg.PatternFlowMplsLabel.metric_tags:type_name -> otg.PatternFlowMplsLabelMetricTag + 400, // 1769: otg.PatternFlowMplsTrafficClass.choice:type_name -> otg.PatternFlowMplsTrafficClass.Choice.Enum + 1449, // 1770: otg.PatternFlowMplsTrafficClass.increment:type_name -> otg.PatternFlowMplsTrafficClassCounter + 1449, // 1771: otg.PatternFlowMplsTrafficClass.decrement:type_name -> otg.PatternFlowMplsTrafficClassCounter + 1450, // 1772: otg.PatternFlowMplsTrafficClass.metric_tags:type_name -> otg.PatternFlowMplsTrafficClassMetricTag + 401, // 1773: otg.PatternFlowMplsBottomOfStack.choice:type_name -> otg.PatternFlowMplsBottomOfStack.Choice.Enum + 1452, // 1774: otg.PatternFlowMplsBottomOfStack.increment:type_name -> otg.PatternFlowMplsBottomOfStackCounter + 1452, // 1775: otg.PatternFlowMplsBottomOfStack.decrement:type_name -> otg.PatternFlowMplsBottomOfStackCounter + 1453, // 1776: otg.PatternFlowMplsBottomOfStack.metric_tags:type_name -> otg.PatternFlowMplsBottomOfStackMetricTag + 402, // 1777: otg.PatternFlowMplsTimeToLive.choice:type_name -> otg.PatternFlowMplsTimeToLive.Choice.Enum + 1455, // 1778: otg.PatternFlowMplsTimeToLive.increment:type_name -> otg.PatternFlowMplsTimeToLiveCounter + 1455, // 1779: otg.PatternFlowMplsTimeToLive.decrement:type_name -> otg.PatternFlowMplsTimeToLiveCounter + 1456, // 1780: otg.PatternFlowMplsTimeToLive.metric_tags:type_name -> otg.PatternFlowMplsTimeToLiveMetricTag + 403, // 1781: otg.PatternFlowSnmpv2cVersion.choice:type_name -> otg.PatternFlowSnmpv2cVersion.Choice.Enum + 1458, // 1782: otg.PatternFlowSnmpv2cVersion.increment:type_name -> otg.PatternFlowSnmpv2cVersionCounter + 1458, // 1783: otg.PatternFlowSnmpv2cVersion.decrement:type_name -> otg.PatternFlowSnmpv2cVersionCounter + 404, // 1784: otg.PatternFlowSnmpv2cPDURequestId.choice:type_name -> otg.PatternFlowSnmpv2cPDURequestId.Choice.Enum + 1460, // 1785: otg.PatternFlowSnmpv2cPDURequestId.increment:type_name -> otg.PatternFlowSnmpv2cPDURequestIdCounter + 1460, // 1786: otg.PatternFlowSnmpv2cPDURequestId.decrement:type_name -> otg.PatternFlowSnmpv2cPDURequestIdCounter + 405, // 1787: otg.PatternFlowSnmpv2cPDUErrorIndex.choice:type_name -> otg.PatternFlowSnmpv2cPDUErrorIndex.Choice.Enum + 1462, // 1788: otg.PatternFlowSnmpv2cPDUErrorIndex.increment:type_name -> otg.PatternFlowSnmpv2cPDUErrorIndexCounter + 1462, // 1789: otg.PatternFlowSnmpv2cPDUErrorIndex.decrement:type_name -> otg.PatternFlowSnmpv2cPDUErrorIndexCounter + 406, // 1790: otg.PatternFlowSnmpv2cBulkPDURequestId.choice:type_name -> otg.PatternFlowSnmpv2cBulkPDURequestId.Choice.Enum + 1464, // 1791: otg.PatternFlowSnmpv2cBulkPDURequestId.increment:type_name -> otg.PatternFlowSnmpv2cBulkPDURequestIdCounter + 1464, // 1792: otg.PatternFlowSnmpv2cBulkPDURequestId.decrement:type_name -> otg.PatternFlowSnmpv2cBulkPDURequestIdCounter + 407, // 1793: otg.PatternFlowSnmpv2cBulkPDUNonRepeaters.choice:type_name -> otg.PatternFlowSnmpv2cBulkPDUNonRepeaters.Choice.Enum + 408, // 1794: otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions.choice:type_name -> otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions.Choice.Enum + 1467, // 1795: otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions.increment:type_name -> otg.PatternFlowSnmpv2cBulkPDUMaxRepetitionsCounter + 1467, // 1796: otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions.decrement:type_name -> otg.PatternFlowSnmpv2cBulkPDUMaxRepetitionsCounter + 409, // 1797: otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue.choice:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue.Choice.Enum + 1469, // 1798: otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue.increment:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIntegerValueCounter + 1469, // 1799: otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue.decrement:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIntegerValueCounter + 410, // 1800: otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue.choice:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue.Choice.Enum + 1471, // 1801: otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue.increment:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValueCounter + 1471, // 1802: otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue.decrement:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValueCounter + 411, // 1803: otg.PatternFlowSnmpv2cVariableBindingValueCounterValue.choice:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueCounterValue.Choice.Enum + 1473, // 1804: otg.PatternFlowSnmpv2cVariableBindingValueCounterValue.increment:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueCounterValueCounter + 1473, // 1805: otg.PatternFlowSnmpv2cVariableBindingValueCounterValue.decrement:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueCounterValueCounter + 412, // 1806: otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue.choice:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue.Choice.Enum + 1475, // 1807: otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue.increment:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValueCounter + 1475, // 1808: otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue.decrement:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValueCounter + 413, // 1809: otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue.choice:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue.Choice.Enum + 1477, // 1810: otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue.increment:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValueCounter + 1477, // 1811: otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue.decrement:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValueCounter + 414, // 1812: otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue.choice:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue.Choice.Enum + 1479, // 1813: otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue.increment:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValueCounter + 1479, // 1814: otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue.decrement:type_name -> otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValueCounter + 415, // 1815: otg.PatternFlowSnmpv2cCommonRequestId.choice:type_name -> otg.PatternFlowSnmpv2cCommonRequestId.Choice.Enum + 1481, // 1816: otg.PatternFlowSnmpv2cCommonRequestId.increment:type_name -> otg.PatternFlowSnmpv2cCommonRequestIdCounter + 1481, // 1817: otg.PatternFlowSnmpv2cCommonRequestId.decrement:type_name -> otg.PatternFlowSnmpv2cCommonRequestIdCounter + 416, // 1818: otg.PatternFlowRsvpRsvpChecksum.choice:type_name -> otg.PatternFlowRsvpRsvpChecksum.Choice.Enum + 417, // 1819: otg.PatternFlowRsvpRsvpChecksum.generated:type_name -> otg.PatternFlowRsvpRsvpChecksum.Generated.Enum + 418, // 1820: otg.PatternFlowRsvpTimeToLive.choice:type_name -> otg.PatternFlowRsvpTimeToLive.Choice.Enum + 1484, // 1821: otg.PatternFlowRsvpTimeToLive.increment:type_name -> otg.PatternFlowRsvpTimeToLiveCounter + 1484, // 1822: otg.PatternFlowRsvpTimeToLive.decrement:type_name -> otg.PatternFlowRsvpTimeToLiveCounter + 419, // 1823: otg.PatternFlowRsvpReserved.choice:type_name -> otg.PatternFlowRsvpReserved.Choice.Enum + 1486, // 1824: otg.PatternFlowRsvpReserved.increment:type_name -> otg.PatternFlowRsvpReservedCounter + 1486, // 1825: otg.PatternFlowRsvpReserved.decrement:type_name -> otg.PatternFlowRsvpReservedCounter + 420, // 1826: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.choice:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.Choice.Enum + 1488, // 1827: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.increment:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + 1488, // 1828: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.decrement:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + 421, // 1829: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.choice:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.Choice.Enum + 1490, // 1830: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.increment:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + 1490, // 1831: otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.decrement:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + 422, // 1832: otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.choice:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.Choice.Enum + 1492, // 1833: otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.increment:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + 1492, // 1834: otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.decrement:type_name -> otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + 423, // 1835: otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger.choice:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger.Choice.Enum + 1494, // 1836: otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger.increment:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + 1494, // 1837: otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger.decrement:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + 424, // 1838: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.choice:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.Choice.Enum + 1496, // 1839: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.increment:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + 1496, // 1840: otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.decrement:type_name -> otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + 425, // 1841: otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.choice:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.Choice.Enum + 1498, // 1842: otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.increment:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + 1498, // 1843: otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.decrement:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + 426, // 1844: otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle.choice:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle.Choice.Enum + 1500, // 1845: otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle.increment:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + 1500, // 1846: otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle.decrement:type_name -> otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + 427, // 1847: otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR.choice:type_name -> otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR.Choice.Enum + 1502, // 1848: otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR.increment:type_name -> otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + 1502, // 1849: otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR.decrement:type_name -> otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + 428, // 1850: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.choice:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.Choice.Enum + 1504, // 1851: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.increment:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + 1504, // 1852: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.decrement:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + 429, // 1853: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.choice:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.Choice.Enum + 1506, // 1854: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.increment:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + 1506, // 1855: otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.decrement:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + 430, // 1856: otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.choice:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.Choice.Enum + 1508, // 1857: otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.increment:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + 1508, // 1858: otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.decrement:type_name -> otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + 431, // 1859: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.choice:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.Choice.Enum + 1510, // 1860: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.increment:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + 1510, // 1861: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.decrement:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + 432, // 1862: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid.choice:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid.Choice.Enum + 1512, // 1863: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid.increment:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pidCounter + 1512, // 1864: otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid.decrement:type_name -> otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pidCounter + 433, // 1865: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.choice:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.Choice.Enum + 1514, // 1866: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.increment:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + 1514, // 1867: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.decrement:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + 434, // 1868: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.choice:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.Choice.Enum + 1516, // 1869: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.increment:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + 1516, // 1870: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.decrement:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + 435, // 1871: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.choice:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.Choice.Enum + 1518, // 1872: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.increment:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + 1518, // 1873: otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.decrement:type_name -> otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + 436, // 1874: otg.PatternFlowRSVPPathSenderTspecIntServVersion.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServVersion.Choice.Enum + 1520, // 1875: otg.PatternFlowRSVPPathSenderTspecIntServVersion.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter + 1520, // 1876: otg.PatternFlowRSVPPathSenderTspecIntServVersion.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter + 437, // 1877: otg.PatternFlowRSVPPathSenderTspecIntServReserved1.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved1.Choice.Enum + 1522, // 1878: otg.PatternFlowRSVPPathSenderTspecIntServReserved1.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter + 1522, // 1879: otg.PatternFlowRSVPPathSenderTspecIntServReserved1.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter + 438, // 1880: otg.PatternFlowRSVPPathSenderTspecIntServOverallLength.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServOverallLength.Choice.Enum + 1524, // 1881: otg.PatternFlowRSVPPathSenderTspecIntServOverallLength.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + 1524, // 1882: otg.PatternFlowRSVPPathSenderTspecIntServOverallLength.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + 439, // 1883: otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader.Choice.Enum + 1526, // 1884: otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + 1526, // 1885: otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + 440, // 1886: otg.PatternFlowRSVPPathSenderTspecIntServZeroBit.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServZeroBit.Choice.Enum + 1528, // 1887: otg.PatternFlowRSVPPathSenderTspecIntServZeroBit.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + 1528, // 1888: otg.PatternFlowRSVPPathSenderTspecIntServZeroBit.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + 441, // 1889: otg.PatternFlowRSVPPathSenderTspecIntServReserved2.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved2.Choice.Enum + 1530, // 1890: otg.PatternFlowRSVPPathSenderTspecIntServReserved2.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter + 1530, // 1891: otg.PatternFlowRSVPPathSenderTspecIntServReserved2.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter + 442, // 1892: otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.Choice.Enum + 1532, // 1893: otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + 1532, // 1894: otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + 443, // 1895: otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.Choice.Enum + 1534, // 1896: otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + 1534, // 1897: otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + 444, // 1898: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag.Choice.Enum + 1536, // 1899: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + 1536, // 1900: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + 445, // 1901: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length.Choice.Enum + 1538, // 1902: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + 1538, // 1903: otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + 446, // 1904: otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.Choice.Enum + 1540, // 1905: otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + 1540, // 1906: otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + 447, // 1907: otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.choice:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.Choice.Enum + 1542, // 1908: otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.increment:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + 1542, // 1909: otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.decrement:type_name -> otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + 448, // 1910: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.choice:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.Choice.Enum + 1544, // 1911: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.increment:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + 1544, // 1912: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.decrement:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + 449, // 1913: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.choice:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.Choice.Enum + 1546, // 1914: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.increment:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + 1546, // 1915: otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.decrement:type_name -> otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + 450, // 1916: otg.PatternFlowRSVPPathRecordRouteType1LabelFlags.choice:type_name -> otg.PatternFlowRSVPPathRecordRouteType1LabelFlags.Choice.Enum + 451, // 1917: otg.PatternFlowRSVPPathRecordRouteType1LabelCType.choice:type_name -> otg.PatternFlowRSVPPathRecordRouteType1LabelCType.Choice.Enum + 452, // 1918: otg.PatternFlowRSVPPathObjectsCustomType.choice:type_name -> otg.PatternFlowRSVPPathObjectsCustomType.Choice.Enum + 1550, // 1919: otg.PatternFlowRSVPPathObjectsCustomType.increment:type_name -> otg.PatternFlowRSVPPathObjectsCustomTypeCounter + 1550, // 1920: otg.PatternFlowRSVPPathObjectsCustomType.decrement:type_name -> otg.PatternFlowRSVPPathObjectsCustomTypeCounter + 867, // 1921: otg.Success.warning:type_name -> otg.Warning + 866, // 1922: otg.Failure.error:type_name -> otg.Error + 453, // 1923: otg.SetConfigRequest.config:type_name -> otg.Config + 868, // 1924: otg.UpdateConfigRequest.config_update:type_name -> otg.ConfigUpdate + 867, // 1925: otg.SetConfigResponse.warning:type_name -> otg.Warning + 453, // 1926: otg.GetConfigResponse.config:type_name -> otg.Config + 867, // 1927: otg.UpdateConfigResponse.warning:type_name -> otg.Warning + 870, // 1928: otg.SetControlStateRequest.control_state:type_name -> otg.ControlState + 867, // 1929: otg.SetControlStateResponse.warning:type_name -> otg.Warning + 888, // 1930: otg.SetControlActionRequest.control_action:type_name -> otg.ControlAction + 889, // 1931: otg.SetControlActionResponse.control_action_response:type_name -> otg.ControlActionResponse + 909, // 1932: otg.GetMetricsRequest.metrics_request:type_name -> otg.MetricsRequest + 910, // 1933: otg.GetMetricsResponse.metrics_response:type_name -> otg.MetricsResponse + 946, // 1934: otg.GetStatesRequest.states_request:type_name -> otg.StatesRequest + 947, // 1935: otg.GetStatesResponse.states_response:type_name -> otg.StatesResponse + 1027, // 1936: otg.GetCaptureRequest.capture_request:type_name -> otg.CaptureRequest + 1552, // 1937: otg.GetVersionResponse.version:type_name -> otg.Version + 1555, // 1938: otg.Openapi.SetConfig:input_type -> otg.SetConfigRequest + 2024, // 1939: otg.Openapi.GetConfig:input_type -> google.protobuf.Empty + 1556, // 1940: otg.Openapi.UpdateConfig:input_type -> otg.UpdateConfigRequest + 1560, // 1941: otg.Openapi.SetControlState:input_type -> otg.SetControlStateRequest + 1562, // 1942: otg.Openapi.SetControlAction:input_type -> otg.SetControlActionRequest + 1564, // 1943: otg.Openapi.GetMetrics:input_type -> otg.GetMetricsRequest + 1566, // 1944: otg.Openapi.GetStates:input_type -> otg.GetStatesRequest + 1568, // 1945: otg.Openapi.GetCapture:input_type -> otg.GetCaptureRequest + 2024, // 1946: otg.Openapi.GetVersion:input_type -> google.protobuf.Empty + 1557, // 1947: otg.Openapi.SetConfig:output_type -> otg.SetConfigResponse + 1558, // 1948: otg.Openapi.GetConfig:output_type -> otg.GetConfigResponse + 1559, // 1949: otg.Openapi.UpdateConfig:output_type -> otg.UpdateConfigResponse + 1561, // 1950: otg.Openapi.SetControlState:output_type -> otg.SetControlStateResponse + 1563, // 1951: otg.Openapi.SetControlAction:output_type -> otg.SetControlActionResponse + 1565, // 1952: otg.Openapi.GetMetrics:output_type -> otg.GetMetricsResponse + 1567, // 1953: otg.Openapi.GetStates:output_type -> otg.GetStatesResponse + 1569, // 1954: otg.Openapi.GetCapture:output_type -> otg.GetCaptureResponse + 1570, // 1955: otg.Openapi.GetVersion:output_type -> otg.GetVersionResponse + 1947, // [1947:1956] is the sub-list for method output_type + 1938, // [1938:1947] is the sub-list for method input_type + 1938, // [1938:1938] is the sub-list for extension type_name + 1938, // [1938:1938] is the sub-list for extension extendee + 0, // [0:1938] is the sub-list for field type_name } func init() { file_otg_proto_init() } @@ -137643,8 +158698,1616 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigOptions); i { + file_otg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConfigOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Port); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PortOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Lag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LagPort); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LagProtocol); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LagProtocolStatic); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LagProtocolLacp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LagPortLacp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceEthernetBase); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceEthernet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthernetConnection); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthernetSimulatedLink); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceVlan); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceIpv4); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceIpv4Loopback); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceIpv4GatewayMAC); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceIpv6); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceIpv6Loopback); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceIpv6GatewayMAC); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceDhcpv4Client); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv4ClientParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceDhcpv6Client); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceDhcpv6ClientOptionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceDhcpv6ClientOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceDhcpv6ClientIaType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceDhcpv6ClientIaTimeValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceDhcpv6ClientDuidType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceDhcpv6ClientDuidValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceDhcpv6ClientNoDuid); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsServerIdentifier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsDuidLlt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsDuidEn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsDuidLl); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsDuidUuid); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsDuidUuidVersion); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsDuidUuidVariant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsLinkLayerAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsOptionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsCustom); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsVendorClass); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsIncludedMessages); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsMessageType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsVendorInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerOptionsVendorInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerOptionsIncludedMessages); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerOptionsMessageType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6OptionsVendorSpecificOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsFqdn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerOptionsBootfileUrl); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerOptionsBootFileParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Layer1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Layer1AutoNegotiation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Layer1FlowControl); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Layer1Ieee8023X); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Layer1Ieee8021Qbb); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Capture); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CaptureFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CaptureCustom); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CaptureField); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CaptureEthernet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CaptureVlan); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CaptureIpv4); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CaptureIpv6); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Device); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProtocolOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceIsisRouter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceIsisMultiInstance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisInterface); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisInterfaceLevel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisMT); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LinkStateTE); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LinkStatepriorityBandwidths); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisInterfaceAuthentication); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisInterfaceAdvanced); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisInterfaceLinkProtection); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisBasic); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisAdvanced); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisAuthentication); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisAuthenticationBase); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisV4RouteRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*V4RouteAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*V6RouteAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MACRouteAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisV6RouteRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceBgpRouter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceBgpMessageHeaderError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceBgpOpenMessageError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceBgpUpdateMessageError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceBgpHoldTimerExpired); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceBgpFiniteStateMachineError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceBgpCeaseError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceBgpCustomError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV4Peer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV4Interface); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV4EthernetSegment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpEthernetSegmentDfElection); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpRouteAdvanced); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpCommunity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtCommunity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAsPath); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAsPathSegment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV4EvpnEvis); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV4EviVxlan); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV4EviVxlanBroadcastDomain); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpCMacIpRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpRouteDistinguisher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpRouteTarget); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAdvanced); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpCapability); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpLearnedInformationFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV4RouteRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAddPath); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[117].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityTransitive2OctetAsType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[118].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityTransitiveIpv4AddressType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityTransitive4OctetAsType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[124].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityTransitiveOpaqueTypeColor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityTransitiveOpaqueType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityTransitiveEvpnTypeRouterMac); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityTransitiveEvpnType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[130].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityNonTransitive2OctetAsType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[131].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpExtendedCommunityCustomType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[132].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV6RouteRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[133].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteV4Policy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteV4TunnelTlv); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteRemoteEndpointSubTlv); i { case 0: return &v.state case 1: @@ -137655,8 +160318,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Port); i { + file_otg_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteColorSubTlv); i { case 0: return &v.state case 1: @@ -137667,8 +160330,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PortOptions); i { + file_otg_proto_msgTypes[137].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteBindingSubTlv); i { case 0: return &v.state case 1: @@ -137679,8 +160342,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Lag); i { + file_otg_proto_msgTypes[138].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrtePreferenceSubTlv); i { case 0: return &v.state case 1: @@ -137691,8 +160354,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LagPort); i { + file_otg_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrtePolicyPrioritySubTlv); i { case 0: return &v.state case 1: @@ -137703,8 +160366,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LagProtocol); i { + file_otg_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrtePolicyNameSubTlv); i { case 0: return &v.state case 1: @@ -137715,8 +160378,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LagProtocolStatic); i { + file_otg_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteExplicitNullLabelPolicySubTlv); i { case 0: return &v.state case 1: @@ -137727,8 +160390,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LagProtocolLacp); i { + file_otg_proto_msgTypes[142].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSegmentList); i { case 0: return &v.state case 1: @@ -137739,8 +160402,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LagPortLacp); i { + file_otg_proto_msgTypes[143].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSegment); i { case 0: return &v.state case 1: @@ -137751,8 +160414,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceEthernetBase); i { + file_otg_proto_msgTypes[144].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSrMplsSid); i { case 0: return &v.state case 1: @@ -137763,8 +160426,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceEthernet); i { + file_otg_proto_msgTypes[145].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSRv6SIDEndpointBehaviorAndStructure); i { case 0: return &v.state case 1: @@ -137775,8 +160438,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthernetConnection); i { + file_otg_proto_msgTypes[146].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSegmentATypeSubTlv); i { case 0: return &v.state case 1: @@ -137787,8 +160450,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceVlan); i { + file_otg_proto_msgTypes[147].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSegmentBTypeSubTlv); i { case 0: return &v.state case 1: @@ -137799,8 +160462,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceIpv4); i { + file_otg_proto_msgTypes[148].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSegmentCTypeSubTlv); i { case 0: return &v.state case 1: @@ -137811,8 +160474,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceIpv4Loopback); i { + file_otg_proto_msgTypes[149].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSegmentDTypeSubTlv); i { case 0: return &v.state case 1: @@ -137823,8 +160486,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceIpv4GatewayMAC); i { + file_otg_proto_msgTypes[150].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSegmentETypeSubTlv); i { case 0: return &v.state case 1: @@ -137835,8 +160498,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceIpv6); i { + file_otg_proto_msgTypes[151].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSegmentFTypeSubTlv); i { case 0: return &v.state case 1: @@ -137847,8 +160510,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceIpv6Loopback); i { + file_otg_proto_msgTypes[152].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSegmentGTypeSubTlv); i { case 0: return &v.state case 1: @@ -137859,8 +160522,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceIpv6GatewayMAC); i { + file_otg_proto_msgTypes[153].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSegmentHTypeSubTlv); i { case 0: return &v.state case 1: @@ -137871,8 +160534,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Layer1); i { + file_otg_proto_msgTypes[154].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSegmentITypeSubTlv); i { case 0: return &v.state case 1: @@ -137883,8 +160546,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Layer1AutoNegotiation); i { + file_otg_proto_msgTypes[155].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSegmentJTypeSubTlv); i { case 0: return &v.state case 1: @@ -137895,8 +160558,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Layer1FlowControl); i { + file_otg_proto_msgTypes[156].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteSegmentKTypeSubTlv); i { case 0: return &v.state case 1: @@ -137907,8 +160570,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Layer1Ieee8023X); i { + file_otg_proto_msgTypes[157].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteV6Policy); i { case 0: return &v.state case 1: @@ -137919,8 +160582,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Layer1Ieee8021Qbb); i { + file_otg_proto_msgTypes[158].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpSrteV6TunnelTlv); i { case 0: return &v.state case 1: @@ -137931,8 +160594,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Capture); i { + file_otg_proto_msgTypes[159].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpGracefulRestart); i { case 0: return &v.state case 1: @@ -137943,8 +160606,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CaptureFilter); i { + file_otg_proto_msgTypes[160].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpUpdateReplay); i { case 0: return &v.state case 1: @@ -137955,8 +160618,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CaptureCustom); i { + file_otg_proto_msgTypes[161].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpRawBytes); i { case 0: return &v.state case 1: @@ -137967,8 +160630,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CaptureField); i { + file_otg_proto_msgTypes[162].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpOneUpdateReplay); i { case 0: return &v.state case 1: @@ -137979,8 +160642,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CaptureEthernet); i { + file_otg_proto_msgTypes[163].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpStructuredPdus); i { case 0: return &v.state case 1: @@ -137991,8 +160654,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CaptureVlan); i { + file_otg_proto_msgTypes[164].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpOneStructuredUpdateReplay); i { case 0: return &v.state case 1: @@ -138003,8 +160666,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CaptureIpv4); i { + file_otg_proto_msgTypes[165].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpOneTraditionalNlriPrefix); i { case 0: return &v.state case 1: @@ -138015,8 +160678,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CaptureIpv6); i { + file_otg_proto_msgTypes[166].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpOneIpv4NLRIPrefix); i { case 0: return &v.state case 1: @@ -138027,8 +160690,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Device); i { + file_otg_proto_msgTypes[167].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpOneIpv6NLRIPrefix); i { case 0: return &v.state case 1: @@ -138039,8 +160702,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtocolOptions); i { + file_otg_proto_msgTypes[168].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpNLRIPrefixPathId); i { case 0: return &v.state case 1: @@ -138051,8 +160714,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceIsisRouter); i { + file_otg_proto_msgTypes[169].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpIpv4SrPolicyNLRIPrefix); i { case 0: return &v.state case 1: @@ -138063,8 +160726,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceIsisMultiInstance); i { + file_otg_proto_msgTypes[170].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpIpv6SrPolicyNLRIPrefix); i { case 0: return &v.state case 1: @@ -138075,8 +160738,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisInterface); i { + file_otg_proto_msgTypes[171].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributes); i { case 0: return &v.state case 1: @@ -138087,8 +160750,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisInterfaceLevel); i { + file_otg_proto_msgTypes[172].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesOtherAttribute); i { case 0: return &v.state case 1: @@ -138099,8 +160762,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisMT); i { + file_otg_proto_msgTypes[173].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesAsPath); i { case 0: return &v.state case 1: @@ -138111,8 +160774,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LinkStateTE); i { + file_otg_proto_msgTypes[174].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesAsPathFourByteAsPath); i { case 0: return &v.state case 1: @@ -138123,8 +160786,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LinkStatepriorityBandwidths); i { + file_otg_proto_msgTypes[175].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesFourByteAsPathSegment); i { case 0: return &v.state case 1: @@ -138135,8 +160798,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisInterfaceAuthentication); i { + file_otg_proto_msgTypes[176].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesAsPathTwoByteAsPath); i { case 0: return &v.state case 1: @@ -138147,8 +160810,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisInterfaceAdvanced); i { + file_otg_proto_msgTypes[177].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesTwoByteAsPathSegment); i { case 0: return &v.state case 1: @@ -138159,8 +160822,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisInterfaceLinkProtection); i { + file_otg_proto_msgTypes[178].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesAs4Path); i { case 0: return &v.state case 1: @@ -138171,8 +160834,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisBasic); i { + file_otg_proto_msgTypes[179].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesAggregator); i { case 0: return &v.state case 1: @@ -138183,8 +160846,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisAdvanced); i { + file_otg_proto_msgTypes[180].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesAs4Aggregator); i { case 0: return &v.state case 1: @@ -138195,8 +160858,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisAuthentication); i { + file_otg_proto_msgTypes[181].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesCommunity); i { case 0: return &v.state case 1: @@ -138207,8 +160870,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisAuthenticationBase); i { + file_otg_proto_msgTypes[182].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesCustomCommunity); i { case 0: return &v.state case 1: @@ -138219,8 +160882,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisV4RouteRange); i { + file_otg_proto_msgTypes[183].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesNextHop); i { case 0: return &v.state case 1: @@ -138231,8 +160894,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*V4RouteAddress); i { + file_otg_proto_msgTypes[184].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesNextHopIpv6TwoAddresses); i { case 0: return &v.state case 1: @@ -138243,8 +160906,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*V6RouteAddress); i { + file_otg_proto_msgTypes[185].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesMpReachNlri); i { case 0: return &v.state case 1: @@ -138255,8 +160918,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MACRouteAddress); i { + file_otg_proto_msgTypes[186].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesMpUnreachNlri); i { case 0: return &v.state case 1: @@ -138267,8 +160930,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisV6RouteRange); i { + file_otg_proto_msgTypes[187].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesMultiExitDiscriminator); i { case 0: return &v.state case 1: @@ -138279,8 +160942,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceBgpRouter); i { + file_otg_proto_msgTypes[188].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesLocalPreference); i { case 0: return &v.state case 1: @@ -138291,8 +160954,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceBgpMessageHeaderError); i { + file_otg_proto_msgTypes[189].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesOriginatorId); i { case 0: return &v.state case 1: @@ -138303,8 +160966,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceBgpOpenMessageError); i { + file_otg_proto_msgTypes[190].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesTunnelEncapsulation); i { case 0: return &v.state case 1: @@ -138315,8 +160978,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceBgpUpdateMessageError); i { + file_otg_proto_msgTypes[191].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicy); i { case 0: return &v.state case 1: @@ -138327,8 +160990,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceBgpHoldTimerExpired); i { + file_otg_proto_msgTypes[192].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesBsid); i { case 0: return &v.state case 1: @@ -138339,8 +161002,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceBgpFiniteStateMachineError); i { + file_otg_proto_msgTypes[193].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesBsidMpls); i { case 0: return &v.state case 1: @@ -138351,8 +161014,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceBgpCeaseError); i { + file_otg_proto_msgTypes[194].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesBsidSrv6); i { case 0: return &v.state case 1: @@ -138363,8 +161026,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceBgpCustomError); i { + file_otg_proto_msgTypes[195].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSrv6Bsid); i { case 0: return &v.state case 1: @@ -138375,8 +161038,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV4Peer); i { + file_otg_proto_msgTypes[196].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSidMpls); i { case 0: return &v.state case 1: @@ -138387,8 +161050,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV4Interface); i { + file_otg_proto_msgTypes[197].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSidSrv6); i { case 0: return &v.state case 1: @@ -138399,8 +161062,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV4EthernetSegment); i { + file_otg_proto_msgTypes[198].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSrPolicyPreference); i { case 0: return &v.state case 1: @@ -138411,8 +161074,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpEthernetSegmentDfElection); i { + file_otg_proto_msgTypes[199].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSrPolicyPriority); i { case 0: return &v.state case 1: @@ -138423,8 +161086,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpRouteAdvanced); i { + file_otg_proto_msgTypes[200].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSrPolicyPolicyCandidateName); i { case 0: return &v.state case 1: @@ -138435,8 +161098,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpCommunity); i { + file_otg_proto_msgTypes[201].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSrPolicyPolicyName); i { case 0: return &v.state case 1: @@ -138447,8 +161110,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtCommunity); i { + file_otg_proto_msgTypes[202].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSrPolicyExplicitNullPolicy); i { case 0: return &v.state case 1: @@ -138459,8 +161122,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAsPath); i { + file_otg_proto_msgTypes[203].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSrPolicySegmentList); i { case 0: return &v.state case 1: @@ -138471,8 +161134,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAsPathSegment); i { + file_otg_proto_msgTypes[204].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicySegmentListWeight); i { case 0: return &v.state case 1: @@ -138483,8 +161146,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV4EvpnEvis); i { + file_otg_proto_msgTypes[205].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicySegmentListSegment); i { case 0: return &v.state case 1: @@ -138495,8 +161158,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV4EviVxlan); i { + file_otg_proto_msgTypes[206].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicyTypeA); i { case 0: return &v.state case 1: @@ -138507,8 +161170,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV4EviVxlanBroadcastDomain); i { + file_otg_proto_msgTypes[207].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicyTypeB); i { case 0: return &v.state case 1: @@ -138519,8 +161182,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpCMacIpRange); i { + file_otg_proto_msgTypes[208].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicyTypeC); i { case 0: return &v.state case 1: @@ -138531,8 +161194,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpRouteDistinguisher); i { + file_otg_proto_msgTypes[209].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicyTypeD); i { case 0: return &v.state case 1: @@ -138543,8 +161206,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpRouteTarget); i { + file_otg_proto_msgTypes[210].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicyTypeE); i { case 0: return &v.state case 1: @@ -138555,8 +161218,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAdvanced); i { + file_otg_proto_msgTypes[211].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicyTypeF); i { case 0: return &v.state case 1: @@ -138567,8 +161230,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpCapability); i { + file_otg_proto_msgTypes[212].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicyTypeG); i { case 0: return &v.state case 1: @@ -138579,8 +161242,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpLearnedInformationFilter); i { + file_otg_proto_msgTypes[213].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicyTypeH); i { case 0: return &v.state case 1: @@ -138591,8 +161254,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV4RouteRange); i { + file_otg_proto_msgTypes[214].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicyTypeI); i { case 0: return &v.state case 1: @@ -138603,8 +161266,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAddPath); i { + file_otg_proto_msgTypes[215].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicyTypeJ); i { case 0: return &v.state case 1: @@ -138615,8 +161278,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunity); i { + file_otg_proto_msgTypes[216].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicyTypeK); i { case 0: return &v.state case 1: @@ -138627,8 +161290,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget); i { + file_otg_proto_msgTypes[217].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicyTypeFlags); i { case 0: return &v.state case 1: @@ -138639,8 +161302,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin); i { + file_otg_proto_msgTypes[218].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure); i { case 0: return &v.state case 1: @@ -138651,8 +161314,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityTransitive2OctetAsType); i { + file_otg_proto_msgTypes[219].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpNLRIPrefixSegmentRoutingDistinguisher); i { case 0: return &v.state case 1: @@ -138663,8 +161326,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin); i { + file_otg_proto_msgTypes[220].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV6Peer); i { case 0: return &v.state case 1: @@ -138675,8 +161338,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget); i { + file_otg_proto_msgTypes[221].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV6Interface); i { case 0: return &v.state case 1: @@ -138687,8 +161350,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityTransitiveIpv4AddressType); i { + file_otg_proto_msgTypes[222].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV6SegmentRouting); i { case 0: return &v.state case 1: @@ -138699,8 +161362,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget); i { + file_otg_proto_msgTypes[223].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV6EthernetSegment); i { case 0: return &v.state case 1: @@ -138711,8 +161374,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin); i { + file_otg_proto_msgTypes[224].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV6EvpnEvis); i { case 0: return &v.state case 1: @@ -138723,8 +161386,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityTransitive4OctetAsType); i { + file_otg_proto_msgTypes[225].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV6EviVxlan); i { case 0: return &v.state case 1: @@ -138735,8 +161398,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityTransitiveOpaqueTypeColor); i { + file_otg_proto_msgTypes[226].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpV6EviVxlanBroadcastDomain); i { case 0: return &v.state case 1: @@ -138747,8 +161410,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation); i { + file_otg_proto_msgTypes[227].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceVxlan); i { case 0: return &v.state case 1: @@ -138759,8 +161422,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityTransitiveOpaqueType); i { + file_otg_proto_msgTypes[228].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VxlanV4Tunnel); i { case 0: return &v.state case 1: @@ -138771,8 +161434,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityTransitiveEvpnTypeRouterMac); i { + file_otg_proto_msgTypes[229].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VxlanV6Tunnel); i { case 0: return &v.state case 1: @@ -138783,8 +161446,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityTransitiveEvpnType); i { + file_otg_proto_msgTypes[230].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VxlanV4TunnelDestinationIPMode); i { case 0: return &v.state case 1: @@ -138795,8 +161458,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth); i { + file_otg_proto_msgTypes[231].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VxlanV6TunnelDestinationIPMode); i { case 0: return &v.state case 1: @@ -138807,8 +161470,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityNonTransitive2OctetAsType); i { + file_otg_proto_msgTypes[232].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VxlanV4TunnelDestinationIPModeUnicast); i { case 0: return &v.state case 1: @@ -138819,8 +161482,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpExtendedCommunityCustomType); i { + file_otg_proto_msgTypes[233].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VxlanV6TunnelDestinationIPModeUnicast); i { case 0: return &v.state case 1: @@ -138831,8 +161494,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV6RouteRange); i { + file_otg_proto_msgTypes[234].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache); i { case 0: return &v.state case 1: @@ -138843,8 +161506,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteV4Policy); i { + file_otg_proto_msgTypes[235].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VxlanV4TunnelDestinationIPModeUnicastVtep); i { case 0: return &v.state case 1: @@ -138855,8 +161518,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteV4TunnelTlv); i { + file_otg_proto_msgTypes[236].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VxlanV6TunnelDestinationIPModeUnicastVtep); i { case 0: return &v.state case 1: @@ -138867,8 +161530,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteRemoteEndpointSubTlv); i { + file_otg_proto_msgTypes[237].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VxlanV4TunnelDestinationIPModeMulticast); i { case 0: return &v.state case 1: @@ -138879,8 +161542,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteColorSubTlv); i { + file_otg_proto_msgTypes[238].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VxlanV6TunnelDestinationIPModeMulticast); i { case 0: return &v.state case 1: @@ -138891,8 +161554,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteBindingSubTlv); i { + file_otg_proto_msgTypes[239].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceRsvp); i { case 0: return &v.state case 1: @@ -138903,8 +161566,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrtePreferenceSubTlv); i { + file_otg_proto_msgTypes[240].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpIpv4Interface); i { case 0: return &v.state case 1: @@ -138915,8 +161578,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrtePolicyPrioritySubTlv); i { + file_otg_proto_msgTypes[241].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpLspIpv4Interface); i { case 0: return &v.state case 1: @@ -138927,8 +161590,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrtePolicyNameSubTlv); i { + file_otg_proto_msgTypes[242].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp); i { case 0: return &v.state case 1: @@ -138939,8 +161602,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteExplicitNullLabelPolicySubTlv); i { + file_otg_proto_msgTypes[243].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpLspIpv4InterfaceP2PIngressIpv4Lsp); i { case 0: return &v.state case 1: @@ -138951,8 +161614,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSegmentList); i { + file_otg_proto_msgTypes[244].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpSessionAttribute); i { case 0: return &v.state case 1: @@ -138963,8 +161626,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSegment); i { + file_otg_proto_msgTypes[245].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpResourceAffinities); i { case 0: return &v.state case 1: @@ -138975,8 +161638,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSrMplsSid); i { + file_otg_proto_msgTypes[246].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpTspec); i { case 0: return &v.state case 1: @@ -138987,8 +161650,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSRv6SIDEndpointBehaviorAndStructure); i { + file_otg_proto_msgTypes[247].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpFastReroute); i { case 0: return &v.state case 1: @@ -138999,8 +161662,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSegmentATypeSubTlv); i { + file_otg_proto_msgTypes[248].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpEro); i { case 0: return &v.state case 1: @@ -139011,8 +161674,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSegmentBTypeSubTlv); i { + file_otg_proto_msgTypes[249].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpEroSubobject); i { case 0: return &v.state case 1: @@ -139023,8 +161686,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSegmentCTypeSubTlv); i { + file_otg_proto_msgTypes[250].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceDhcpServer); i { case 0: return &v.state case 1: @@ -139035,8 +161698,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[117].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSegmentDTypeSubTlv); i { + file_otg_proto_msgTypes[251].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DhcpServerV4); i { case 0: return &v.state case 1: @@ -139047,8 +161710,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[118].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSegmentETypeSubTlv); i { + file_otg_proto_msgTypes[252].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DhcpServerV4Pool); i { case 0: return &v.state case 1: @@ -139059,8 +161722,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSegmentFTypeSubTlv); i { + file_otg_proto_msgTypes[253].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DhcpServerV4PoolOption); i { case 0: return &v.state case 1: @@ -139071,8 +161734,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSegmentGTypeSubTlv); i { + file_otg_proto_msgTypes[254].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DhcpServerV6); i { case 0: return &v.state case 1: @@ -139083,8 +161746,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSegmentHTypeSubTlv); i { + file_otg_proto_msgTypes[255].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerOptions); i { case 0: return &v.state case 1: @@ -139095,8 +161758,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSegmentITypeSubTlv); i { + file_otg_proto_msgTypes[256].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DhcpV6ServerLease); i { case 0: return &v.state case 1: @@ -139107,8 +161770,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSegmentJTypeSubTlv); i { + file_otg_proto_msgTypes[257].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerIaType); i { case 0: return &v.state case 1: @@ -139119,8 +161782,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[124].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteSegmentKTypeSubTlv); i { + file_otg_proto_msgTypes[258].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerPoolInfo); i { case 0: return &v.state case 1: @@ -139131,8 +161794,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteV6Policy); i { + file_otg_proto_msgTypes[259].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerIapdPoolInfo); i { case 0: return &v.state case 1: @@ -139143,8 +161806,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpSrteV6TunnelTlv); i { + file_otg_proto_msgTypes[260].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerIanapdPoolInfo); i { case 0: return &v.state case 1: @@ -139155,8 +161818,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpGracefulRestart); i { + file_otg_proto_msgTypes[261].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DhcpV6ServerDns); i { case 0: return &v.state case 1: @@ -139167,8 +161830,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpUpdateReplay); i { + file_otg_proto_msgTypes[262].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DhcpV6ServerSecondaryDns); i { case 0: return &v.state case 1: @@ -139179,8 +161842,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpRawBytes); i { + file_otg_proto_msgTypes[263].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceOspfv2Router); i { case 0: return &v.state case 1: @@ -139191,8 +161854,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[130].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpOneUpdateReplay); i { + file_otg_proto_msgTypes[264].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2RouterId); i { case 0: return &v.state case 1: @@ -139203,8 +161866,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[131].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpStructuredPdus); i { + file_otg_proto_msgTypes[265].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2Options); i { case 0: return &v.state case 1: @@ -139215,8 +161878,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[132].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpOneStructuredUpdateReplay); i { + file_otg_proto_msgTypes[266].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2GracefulRestart); i { case 0: return &v.state case 1: @@ -139227,8 +161890,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[133].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpOneTraditionalNlriPrefix); i { + file_otg_proto_msgTypes[267].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2Interface); i { case 0: return &v.state case 1: @@ -139239,8 +161902,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpOneIpv4NLRIPrefix); i { + file_otg_proto_msgTypes[268].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2InterfaceArea); i { case 0: return &v.state case 1: @@ -139251,8 +161914,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpOneIpv6NLRIPrefix); i { + file_otg_proto_msgTypes[269].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2InterfaceNetworkType); i { case 0: return &v.state case 1: @@ -139263,8 +161926,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpNLRIPrefixPathId); i { + file_otg_proto_msgTypes[270].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2InterfaceNeighbor); i { case 0: return &v.state case 1: @@ -139275,8 +161938,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[137].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributes); i { + file_otg_proto_msgTypes[271].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2InterfaceAdvanced); i { case 0: return &v.state case 1: @@ -139287,8 +161950,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[138].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesOtherAttribute); i { + file_otg_proto_msgTypes[272].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2InterfaceOptions); i { case 0: return &v.state case 1: @@ -139299,8 +161962,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesAsPath); i { + file_otg_proto_msgTypes[273].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2InterfaceAuthentication); i { case 0: return &v.state case 1: @@ -139311,8 +161974,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesAsPathFourByteAsPath); i { + file_otg_proto_msgTypes[274].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2AuthenticationMd5); i { case 0: return &v.state case 1: @@ -139323,8 +161986,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesFourByteAsPathSegment); i { + file_otg_proto_msgTypes[275].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2InterfaceLinkProtection); i { case 0: return &v.state case 1: @@ -139335,8 +161998,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[142].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesAsPathTwoByteAsPath); i { + file_otg_proto_msgTypes[276].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2V4RouteRange); i { case 0: return &v.state case 1: @@ -139347,8 +162010,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[143].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesTwoByteAsPathSegment); i { + file_otg_proto_msgTypes[277].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2V4RRRouteOrigin); i { case 0: return &v.state case 1: @@ -139359,8 +162022,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[144].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesAs4Path); i { + file_otg_proto_msgTypes[278].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2V4RRIntraArea); i { case 0: return &v.state case 1: @@ -139371,8 +162034,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[145].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesAggregator); i { + file_otg_proto_msgTypes[279].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2V4RRInterArea); i { case 0: return &v.state case 1: @@ -139383,8 +162046,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[146].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesAs4Aggregator); i { + file_otg_proto_msgTypes[280].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2V4RRExternalType1); i { case 0: return &v.state case 1: @@ -139395,8 +162058,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[147].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesCommunity); i { + file_otg_proto_msgTypes[281].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2V4RRExternalType2); i { case 0: return &v.state case 1: @@ -139407,8 +162070,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[148].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesCustomCommunity); i { + file_otg_proto_msgTypes[282].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2V4RRNssaExternal); i { case 0: return &v.state case 1: @@ -139419,8 +162082,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[149].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesNextHop); i { + file_otg_proto_msgTypes[283].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2V4RRExtdPrefixFlags); i { case 0: return &v.state case 1: @@ -139431,8 +162094,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[150].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesNextHopIpv6TwoAddresses); i { + file_otg_proto_msgTypes[284].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Flow); i { case 0: return &v.state case 1: @@ -139443,8 +162106,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[151].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesMpReachNlri); i { + file_otg_proto_msgTypes[285].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowTxRx); i { case 0: return &v.state case 1: @@ -139455,8 +162118,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[152].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesMpUnreachNlri); i { + file_otg_proto_msgTypes[286].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowPort); i { case 0: return &v.state case 1: @@ -139467,8 +162130,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[153].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesMultiExitDiscriminator); i { + file_otg_proto_msgTypes[287].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRouter); i { case 0: return &v.state case 1: @@ -139479,8 +162142,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[154].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesLocalPreference); i { + file_otg_proto_msgTypes[288].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowHeader); i { case 0: return &v.state case 1: @@ -139491,8 +162154,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[155].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpAttributesOriginatorId); i { + file_otg_proto_msgTypes[289].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowCustom); i { case 0: return &v.state case 1: @@ -139503,8 +162166,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[156].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV6Peer); i { + file_otg_proto_msgTypes[290].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowCustomMetricTag); i { case 0: return &v.state case 1: @@ -139515,8 +162178,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[157].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV6Interface); i { + file_otg_proto_msgTypes[291].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowEthernet); i { case 0: return &v.state case 1: @@ -139527,8 +162190,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[158].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV6SegmentRouting); i { + file_otg_proto_msgTypes[292].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowVlan); i { case 0: return &v.state case 1: @@ -139539,8 +162202,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[159].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV6EthernetSegment); i { + file_otg_proto_msgTypes[293].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowVxlan); i { case 0: return &v.state case 1: @@ -139551,8 +162214,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[160].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV6EvpnEvis); i { + file_otg_proto_msgTypes[294].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIpv4); i { case 0: return &v.state case 1: @@ -139563,8 +162226,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[161].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV6EviVxlan); i { + file_otg_proto_msgTypes[295].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIpv4Options); i { case 0: return &v.state case 1: @@ -139575,8 +162238,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[162].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpV6EviVxlanBroadcastDomain); i { + file_otg_proto_msgTypes[296].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIpv4OptionsCustom); i { case 0: return &v.state case 1: @@ -139587,8 +162250,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[163].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceVxlan); i { + file_otg_proto_msgTypes[297].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIpv4OptionsCustomType); i { case 0: return &v.state case 1: @@ -139599,8 +162262,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[164].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VxlanV4Tunnel); i { + file_otg_proto_msgTypes[298].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIpv4OptionsCustomLength); i { case 0: return &v.state case 1: @@ -139611,8 +162274,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[165].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VxlanV6Tunnel); i { + file_otg_proto_msgTypes[299].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIpv4Priority); i { case 0: return &v.state case 1: @@ -139623,8 +162286,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[166].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VxlanV4TunnelDestinationIPMode); i { + file_otg_proto_msgTypes[300].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIpv4Dscp); i { case 0: return &v.state case 1: @@ -139635,8 +162298,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[167].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VxlanV6TunnelDestinationIPMode); i { + file_otg_proto_msgTypes[301].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIpv4Tos); i { case 0: return &v.state case 1: @@ -139647,8 +162310,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[168].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VxlanV4TunnelDestinationIPModeUnicast); i { + file_otg_proto_msgTypes[302].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIpv4Auto); i { case 0: return &v.state case 1: @@ -139659,8 +162322,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[169].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VxlanV6TunnelDestinationIPModeUnicast); i { + file_otg_proto_msgTypes[303].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIpv6); i { case 0: return &v.state case 1: @@ -139671,8 +162334,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[170].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VxlanTunnelDestinationIPModeUnicastArpSuppressionCache); i { + file_otg_proto_msgTypes[304].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIpv6Auto); i { case 0: return &v.state case 1: @@ -139683,8 +162346,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[171].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VxlanV4TunnelDestinationIPModeUnicastVtep); i { + file_otg_proto_msgTypes[305].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowPfcPause); i { case 0: return &v.state case 1: @@ -139695,8 +162358,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[172].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VxlanV6TunnelDestinationIPModeUnicastVtep); i { + file_otg_proto_msgTypes[306].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowEthernetPause); i { case 0: return &v.state case 1: @@ -139707,8 +162370,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[173].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VxlanV4TunnelDestinationIPModeMulticast); i { + file_otg_proto_msgTypes[307].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowTcp); i { case 0: return &v.state case 1: @@ -139719,8 +162382,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[174].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VxlanV6TunnelDestinationIPModeMulticast); i { + file_otg_proto_msgTypes[308].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowUdp); i { case 0: return &v.state case 1: @@ -139731,8 +162394,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[175].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceRsvp); i { + file_otg_proto_msgTypes[309].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowGre); i { case 0: return &v.state case 1: @@ -139743,8 +162406,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[176].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpIpv4Interface); i { + file_otg_proto_msgTypes[310].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowGtpv1); i { case 0: return &v.state case 1: @@ -139755,8 +162418,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[177].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpLspIpv4Interface); i { + file_otg_proto_msgTypes[311].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowGtpExtension); i { case 0: return &v.state case 1: @@ -139767,8 +162430,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[178].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp); i { + file_otg_proto_msgTypes[312].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowGtpv2); i { case 0: return &v.state case 1: @@ -139779,8 +162442,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[179].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpLspIpv4InterfaceP2PIngressIpv4Lsp); i { + file_otg_proto_msgTypes[313].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowArp); i { case 0: return &v.state case 1: @@ -139791,8 +162454,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[180].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpSessionAttribute); i { + file_otg_proto_msgTypes[314].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIcmp); i { case 0: return &v.state case 1: @@ -139803,8 +162466,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[181].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpResourceAffinities); i { + file_otg_proto_msgTypes[315].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIcmpEcho); i { case 0: return &v.state case 1: @@ -139815,8 +162478,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[182].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpTspec); i { + file_otg_proto_msgTypes[316].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIcmpv6); i { case 0: return &v.state case 1: @@ -139827,8 +162490,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[183].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpFastReroute); i { + file_otg_proto_msgTypes[317].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIcmpv6Echo); i { case 0: return &v.state case 1: @@ -139839,8 +162502,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[184].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpEro); i { + file_otg_proto_msgTypes[318].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowPpp); i { case 0: return &v.state case 1: @@ -139851,8 +162514,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[185].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpEroSubobject); i { + file_otg_proto_msgTypes[319].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIgmpv1); i { case 0: return &v.state case 1: @@ -139863,8 +162526,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[186].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Flow); i { + file_otg_proto_msgTypes[320].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowMpls); i { case 0: return &v.state case 1: @@ -139875,8 +162538,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[187].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowTxRx); i { + file_otg_proto_msgTypes[321].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowSnmpv2C); i { case 0: return &v.state case 1: @@ -139887,8 +162550,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[188].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowPort); i { + file_otg_proto_msgTypes[322].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowSnmpv2CData); i { case 0: return &v.state case 1: @@ -139899,8 +162562,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[189].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRouter); i { + file_otg_proto_msgTypes[323].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowSnmpv2CPDU); i { case 0: return &v.state case 1: @@ -139911,8 +162574,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[190].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowHeader); i { + file_otg_proto_msgTypes[324].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowSnmpv2CBulkPDU); i { case 0: return &v.state case 1: @@ -139923,8 +162586,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[191].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowCustom); i { + file_otg_proto_msgTypes[325].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowSnmpv2CVariableBinding); i { case 0: return &v.state case 1: @@ -139935,8 +162598,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[192].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowCustomMetricTag); i { + file_otg_proto_msgTypes[326].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowSnmpv2CVariableBindingValue); i { case 0: return &v.state case 1: @@ -139947,8 +162610,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[193].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowEthernet); i { + file_otg_proto_msgTypes[327].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowSnmpv2CVariableBindingStringValue); i { case 0: return &v.state case 1: @@ -139959,8 +162622,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[194].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowVlan); i { + file_otg_proto_msgTypes[328].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRsvp); i { case 0: return &v.state case 1: @@ -139971,8 +162634,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[195].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowVxlan); i { + file_otg_proto_msgTypes[329].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPLength); i { case 0: return &v.state case 1: @@ -139983,8 +162646,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[196].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowIpv4); i { + file_otg_proto_msgTypes[330].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPMessage); i { case 0: return &v.state case 1: @@ -139995,8 +162658,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[197].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowIpv4Options); i { + file_otg_proto_msgTypes[331].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathMessage); i { case 0: return &v.state case 1: @@ -140007,8 +162670,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[198].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowIpv4OptionsCustom); i { + file_otg_proto_msgTypes[332].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjects); i { case 0: return &v.state case 1: @@ -140019,8 +162682,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[199].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowIpv4OptionsCustomType); i { + file_otg_proto_msgTypes[333].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPObjectLength); i { case 0: return &v.state case 1: @@ -140031,8 +162694,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[200].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowIpv4OptionsCustomLength); i { + file_otg_proto_msgTypes[334].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsClass); i { case 0: return &v.state case 1: @@ -140043,8 +162706,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[201].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowIpv4Priority); i { + file_otg_proto_msgTypes[335].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsClassSession); i { case 0: return &v.state case 1: @@ -140055,8 +162718,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[202].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowIpv4Dscp); i { + file_otg_proto_msgTypes[336].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsSessionCType); i { case 0: return &v.state case 1: @@ -140067,8 +162730,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[203].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowIpv4Tos); i { + file_otg_proto_msgTypes[337].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathSessionLspTunnelIpv4); i { case 0: return &v.state case 1: @@ -140079,8 +162742,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[204].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowIpv6); i { + file_otg_proto_msgTypes[338].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathSessionExtTunnelId); i { case 0: return &v.state case 1: @@ -140091,8 +162754,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[205].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowPfcPause); i { + file_otg_proto_msgTypes[339].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsClassRsvpHop); i { case 0: return &v.state case 1: @@ -140103,8 +162766,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[206].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowEthernetPause); i { + file_otg_proto_msgTypes[340].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsRsvpHopCType); i { case 0: return &v.state case 1: @@ -140115,8 +162778,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[207].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowTcp); i { + file_otg_proto_msgTypes[341].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathRsvpHopIpv4); i { case 0: return &v.state case 1: @@ -140127,8 +162790,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[208].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowUdp); i { + file_otg_proto_msgTypes[342].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsClassTimeValues); i { case 0: return &v.state case 1: @@ -140139,8 +162802,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[209].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowGre); i { + file_otg_proto_msgTypes[343].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsTimeValuesCType); i { case 0: return &v.state case 1: @@ -140151,8 +162814,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[210].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowGtpv1); i { + file_otg_proto_msgTypes[344].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathTimeValuesType1); i { case 0: return &v.state case 1: @@ -140163,8 +162826,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[211].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowGtpExtension); i { + file_otg_proto_msgTypes[345].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsClassExplicitRoute); i { case 0: return &v.state case 1: @@ -140175,8 +162838,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[212].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowGtpv2); i { + file_otg_proto_msgTypes[346].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsClassExplicitRouteCType); i { case 0: return &v.state case 1: @@ -140187,8 +162850,248 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[213].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowArp); i { + file_otg_proto_msgTypes[347].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathExplicitRouteType1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[348].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPType1ExplicitRouteSubobjects); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[349].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPType1ExplicitRouteSubobjectsType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[350].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathExplicitRouteType1Ipv4Prefix); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[351].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathExplicitRouteType1ASNumber); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[352].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPExplicitRouteLength); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[353].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPExplicitRouteASNumberLength); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[354].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsClassLabelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[355].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsLabelRequestCType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[356].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathLabelRequestWithoutLabelRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[357].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsClassSessionAttribute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[358].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsSessionAttributeCType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[359].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathSessionAttributeLspTunnel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[360].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathSessionAttributeLspTunnelRa); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[361].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPLspTunnelFlag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[362].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPSessionAttributeNameLength); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[363].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsClassSenderTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[364].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsSenderTemplateCType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[365].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathSenderTemplateLspTunnelIpv4); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[366].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsClassSenderTspec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[367].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsSenderTspecCType); i { case 0: return &v.state case 1: @@ -140199,8 +163102,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[214].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowIcmp); i { + file_otg_proto_msgTypes[368].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathSenderTspecIntServ); i { case 0: return &v.state case 1: @@ -140211,8 +163114,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[215].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowIcmpEcho); i { + file_otg_proto_msgTypes[369].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsClassRecordRoute); i { case 0: return &v.state case 1: @@ -140223,8 +163126,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[216].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowIcmpv6); i { + file_otg_proto_msgTypes[370].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsRecordRouteCType); i { case 0: return &v.state case 1: @@ -140235,8 +163138,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[217].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowIcmpv6Echo); i { + file_otg_proto_msgTypes[371].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathRecordRouteType1); i { case 0: return &v.state case 1: @@ -140247,8 +163150,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[218].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowPpp); i { + file_otg_proto_msgTypes[372].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPType1RecordRouteSubobjects); i { case 0: return &v.state case 1: @@ -140259,8 +163162,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[219].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowIgmpv1); i { + file_otg_proto_msgTypes[373].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsRecordRouteSubObjectType); i { case 0: return &v.state case 1: @@ -140271,8 +163174,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[220].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowMpls); i { + file_otg_proto_msgTypes[374].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathRecordRouteType1Ipv4Address); i { case 0: return &v.state case 1: @@ -140283,8 +163186,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[221].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowSnmpv2C); i { + file_otg_proto_msgTypes[375].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPRecordRouteIPv4Flag); i { case 0: return &v.state case 1: @@ -140295,8 +163198,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[222].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowSnmpv2CData); i { + file_otg_proto_msgTypes[376].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathRecordRouteType1Label); i { case 0: return &v.state case 1: @@ -140307,8 +163210,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[223].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowSnmpv2CPDU); i { + file_otg_proto_msgTypes[377].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathRecordRouteLabel); i { case 0: return &v.state case 1: @@ -140319,8 +163222,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[224].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowSnmpv2CBulkPDU); i { + file_otg_proto_msgTypes[378].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPRouteRecordLength); i { case 0: return &v.state case 1: @@ -140331,8 +163234,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[225].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowSnmpv2CVariableBinding); i { + file_otg_proto_msgTypes[379].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRSVPPathObjectsCustom); i { case 0: return &v.state case 1: @@ -140343,8 +163246,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[226].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowSnmpv2CVariableBindingValue); i { + file_otg_proto_msgTypes[380].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowSize); i { case 0: return &v.state case 1: @@ -140355,8 +163258,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[227].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowSnmpv2CVariableBindingStringValue); i { + file_otg_proto_msgTypes[381].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowSizeIncrement); i { case 0: return &v.state case 1: @@ -140367,8 +163270,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[228].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRsvp); i { + file_otg_proto_msgTypes[382].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowSizeRandom); i { case 0: return &v.state case 1: @@ -140379,8 +163282,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[229].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPLength); i { + file_otg_proto_msgTypes[383].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowSizeWeightPairs); i { case 0: return &v.state case 1: @@ -140391,8 +163294,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[230].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPMessage); i { + file_otg_proto_msgTypes[384].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowSizeWeightPairsCustom); i { case 0: return &v.state case 1: @@ -140403,8 +163306,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[231].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathMessage); i { + file_otg_proto_msgTypes[385].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRate); i { case 0: return &v.state case 1: @@ -140415,8 +163318,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[232].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjects); i { + file_otg_proto_msgTypes[386].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowDuration); i { case 0: return &v.state case 1: @@ -140427,8 +163330,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[233].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPObjectLength); i { + file_otg_proto_msgTypes[387].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowContinuous); i { case 0: return &v.state case 1: @@ -140439,8 +163342,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[234].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsClass); i { + file_otg_proto_msgTypes[388].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowDelay); i { case 0: return &v.state case 1: @@ -140451,8 +163354,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[235].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsClassSession); i { + file_otg_proto_msgTypes[389].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowFixedPackets); i { case 0: return &v.state case 1: @@ -140463,8 +163366,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[236].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsSessionCType); i { + file_otg_proto_msgTypes[390].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowFixedSeconds); i { case 0: return &v.state case 1: @@ -140475,8 +163378,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[237].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathSessionLspTunnelIpv4); i { + file_otg_proto_msgTypes[391].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowBurst); i { case 0: return &v.state case 1: @@ -140487,8 +163390,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[238].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathSessionExtTunnelId); i { + file_otg_proto_msgTypes[392].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowDurationInterBurstGap); i { case 0: return &v.state case 1: @@ -140499,8 +163402,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[239].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsClassRsvpHop); i { + file_otg_proto_msgTypes[393].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowMetrics); i { case 0: return &v.state case 1: @@ -140511,8 +163414,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[240].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsRsvpHopCType); i { + file_otg_proto_msgTypes[394].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowLatencyMetrics); i { case 0: return &v.state case 1: @@ -140523,8 +163426,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[241].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathRsvpHopIpv4); i { + file_otg_proto_msgTypes[395].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowPredefinedTags); i { case 0: return &v.state case 1: @@ -140535,8 +163438,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[242].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsClassTimeValues); i { + file_otg_proto_msgTypes[396].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRxTxRatio); i { case 0: return &v.state case 1: @@ -140547,8 +163450,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[243].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsTimeValuesCType); i { + file_otg_proto_msgTypes[397].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowRxTxRatioRxCount); i { case 0: return &v.state case 1: @@ -140559,8 +163462,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[244].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathTimeValuesType1); i { + file_otg_proto_msgTypes[398].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { case 0: return &v.state case 1: @@ -140571,8 +163474,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[245].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsClassExplicitRoute); i { + file_otg_proto_msgTypes[399].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventRxRateThreshold); i { case 0: return &v.state case 1: @@ -140583,8 +163486,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[246].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsClassExplicitRouteCType); i { + file_otg_proto_msgTypes[400].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventLink); i { case 0: return &v.state case 1: @@ -140595,8 +163498,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[247].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathExplicitRouteType1); i { + file_otg_proto_msgTypes[401].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventRouteAdvertiseWithdraw); i { case 0: return &v.state case 1: @@ -140607,8 +163510,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[248].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPType1ExplicitRouteSubobjects); i { + file_otg_proto_msgTypes[402].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventRequest); i { case 0: return &v.state case 1: @@ -140619,8 +163522,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[249].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPType1ExplicitRouteSubobjectsType); i { + file_otg_proto_msgTypes[403].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventSubscription); i { case 0: return &v.state case 1: @@ -140631,8 +163534,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[250].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathExplicitRouteType1Ipv4Prefix); i { + file_otg_proto_msgTypes[404].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Lldp); i { case 0: return &v.state case 1: @@ -140643,8 +163546,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[251].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathExplicitRouteType1ASNumber); i { + file_otg_proto_msgTypes[405].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpConnection); i { case 0: return &v.state case 1: @@ -140655,8 +163558,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[252].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPExplicitRouteLength); i { + file_otg_proto_msgTypes[406].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpChassisId); i { case 0: return &v.state case 1: @@ -140667,8 +163570,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[253].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPExplicitRouteASNumberLength); i { + file_otg_proto_msgTypes[407].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpPortId); i { case 0: return &v.state case 1: @@ -140679,8 +163582,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[254].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsClassLabelRequest); i { + file_otg_proto_msgTypes[408].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpChassisMacSubType); i { case 0: return &v.state case 1: @@ -140691,8 +163594,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[255].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsLabelRequestCType); i { + file_otg_proto_msgTypes[409].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpPortInterfaceNameSubType); i { case 0: return &v.state case 1: @@ -140703,8 +163606,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[256].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathLabelRequestWithoutLabelRange); i { + file_otg_proto_msgTypes[410].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpSystemName); i { case 0: return &v.state case 1: @@ -140715,8 +163618,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[257].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsClassSessionAttribute); i { + file_otg_proto_msgTypes[411].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpOrgInfo); i { case 0: return &v.state case 1: @@ -140727,8 +163630,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[258].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsSessionAttributeCType); i { + file_otg_proto_msgTypes[412].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpOrgInfoType); i { case 0: return &v.state case 1: @@ -140739,8 +163642,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[259].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathSessionAttributeLspTunnel); i { + file_otg_proto_msgTypes[413].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Error); i { case 0: return &v.state case 1: @@ -140751,8 +163654,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[260].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathSessionAttributeLspTunnelRa); i { + file_otg_proto_msgTypes[414].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Warning); i { case 0: return &v.state case 1: @@ -140763,8 +163666,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[261].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPLspTunnelFlag); i { + file_otg_proto_msgTypes[415].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConfigUpdate); i { case 0: return &v.state case 1: @@ -140775,8 +163678,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[262].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPSessionAttributeNameLength); i { + file_otg_proto_msgTypes[416].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowsUpdate); i { case 0: return &v.state case 1: @@ -140787,8 +163690,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[263].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsClassSenderTemplate); i { + file_otg_proto_msgTypes[417].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ControlState); i { case 0: return &v.state case 1: @@ -140799,8 +163702,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[264].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsSenderTemplateCType); i { + file_otg_proto_msgTypes[418].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatePort); i { case 0: return &v.state case 1: @@ -140811,8 +163714,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[265].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathSenderTemplateLspTunnelIpv4); i { + file_otg_proto_msgTypes[419].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateTraffic); i { case 0: return &v.state case 1: @@ -140823,8 +163726,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[266].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsClassSenderTspec); i { + file_otg_proto_msgTypes[420].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateProtocol); i { case 0: return &v.state case 1: @@ -140835,8 +163738,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[267].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsSenderTspecCType); i { + file_otg_proto_msgTypes[421].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatePortLink); i { case 0: return &v.state case 1: @@ -140847,8 +163750,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[268].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathSenderTspecIntServ); i { + file_otg_proto_msgTypes[422].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatePortCapture); i { case 0: return &v.state case 1: @@ -140859,8 +163762,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[269].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsClassRecordRoute); i { + file_otg_proto_msgTypes[423].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateTrafficFlowTransmit); i { case 0: return &v.state case 1: @@ -140871,8 +163774,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[270].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsRecordRouteCType); i { + file_otg_proto_msgTypes[424].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateProtocolAll); i { case 0: return &v.state case 1: @@ -140883,8 +163786,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[271].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathRecordRouteType1); i { + file_otg_proto_msgTypes[425].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateProtocolRoute); i { case 0: return &v.state case 1: @@ -140895,8 +163798,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[272].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPType1RecordRouteSubobjects); i { + file_otg_proto_msgTypes[426].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateProtocolLacp); i { case 0: return &v.state case 1: @@ -140907,8 +163810,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[273].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsRecordRouteSubObjectType); i { + file_otg_proto_msgTypes[427].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateProtocolLacpAdmin); i { case 0: return &v.state case 1: @@ -140919,8 +163822,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[274].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathRecordRouteType1Ipv4Address); i { + file_otg_proto_msgTypes[428].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateProtocolLacpMemberPorts); i { case 0: return &v.state case 1: @@ -140931,8 +163834,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[275].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPRecordRouteIPv4Flag); i { + file_otg_proto_msgTypes[429].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateProtocolBgp); i { case 0: return &v.state case 1: @@ -140943,8 +163846,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[276].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathRecordRouteType1Label); i { + file_otg_proto_msgTypes[430].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateProtocolBgpPeers); i { case 0: return &v.state case 1: @@ -140955,8 +163858,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[277].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathRecordRouteLabel); i { + file_otg_proto_msgTypes[431].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateProtocolIsis); i { case 0: return &v.state case 1: @@ -140967,8 +163870,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[278].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPRouteRecordLength); i { + file_otg_proto_msgTypes[432].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateProtocolIsisRouters); i { case 0: return &v.state case 1: @@ -140979,8 +163882,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[279].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRSVPPathObjectsCustom); i { + file_otg_proto_msgTypes[433].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateProtocolOspfv2); i { case 0: return &v.state case 1: @@ -140991,8 +163894,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[280].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowSize); i { + file_otg_proto_msgTypes[434].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateProtocolOspfv2Routers); i { case 0: return &v.state case 1: @@ -141003,8 +163906,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[281].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowSizeIncrement); i { + file_otg_proto_msgTypes[435].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ControlAction); i { case 0: return &v.state case 1: @@ -141015,8 +163918,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[282].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowSizeRandom); i { + file_otg_proto_msgTypes[436].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ControlActionResponse); i { case 0: return &v.state case 1: @@ -141027,8 +163930,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[283].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowSizeWeightPairs); i { + file_otg_proto_msgTypes[437].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionResponse); i { case 0: return &v.state case 1: @@ -141039,8 +163942,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[284].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowSizeWeightPairsCustom); i { + file_otg_proto_msgTypes[438].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionProtocol); i { case 0: return &v.state case 1: @@ -141051,8 +163954,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[285].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRate); i { + file_otg_proto_msgTypes[439].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionResponseProtocol); i { case 0: return &v.state case 1: @@ -141063,8 +163966,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[286].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowDuration); i { + file_otg_proto_msgTypes[440].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionProtocolIpv4); i { case 0: return &v.state case 1: @@ -141075,8 +163978,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[287].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowContinuous); i { + file_otg_proto_msgTypes[441].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionResponseProtocolIpv4); i { case 0: return &v.state case 1: @@ -141087,8 +163990,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[288].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowDelay); i { + file_otg_proto_msgTypes[442].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionProtocolIpv4Ping); i { case 0: return &v.state case 1: @@ -141099,8 +164002,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[289].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowFixedPackets); i { + file_otg_proto_msgTypes[443].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionProtocolIpv4PingRequest); i { case 0: return &v.state case 1: @@ -141111,8 +164014,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[290].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowFixedSeconds); i { + file_otg_proto_msgTypes[444].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionResponseProtocolIpv4Ping); i { case 0: return &v.state case 1: @@ -141123,8 +164026,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[291].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowBurst); i { + file_otg_proto_msgTypes[445].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionResponseProtocolIpv4PingResponse); i { case 0: return &v.state case 1: @@ -141135,8 +164038,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[292].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowDurationInterBurstGap); i { + file_otg_proto_msgTypes[446].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionProtocolIpv6); i { case 0: return &v.state case 1: @@ -141147,8 +164050,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[293].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowMetrics); i { + file_otg_proto_msgTypes[447].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionResponseProtocolIpv6); i { case 0: return &v.state case 1: @@ -141159,8 +164062,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[294].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowLatencyMetrics); i { + file_otg_proto_msgTypes[448].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionProtocolIpv6Ping); i { case 0: return &v.state case 1: @@ -141171,8 +164074,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[295].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowPredefinedTags); i { + file_otg_proto_msgTypes[449].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionProtocolIpv6PingRequest); i { case 0: return &v.state case 1: @@ -141183,8 +164086,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[296].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRxTxRatio); i { + file_otg_proto_msgTypes[450].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionResponseProtocolIpv6Ping); i { case 0: return &v.state case 1: @@ -141195,8 +164098,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[297].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowRxTxRatioRxCount); i { + file_otg_proto_msgTypes[451].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionResponseProtocolIpv6PingResponse); i { case 0: return &v.state case 1: @@ -141207,8 +164110,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[298].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Event); i { + file_otg_proto_msgTypes[452].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionProtocolBgp); i { case 0: return &v.state case 1: @@ -141219,8 +164122,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[299].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventRxRateThreshold); i { + file_otg_proto_msgTypes[453].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionProtocolBgpNotification); i { case 0: return &v.state case 1: @@ -141231,8 +164134,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[300].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventLink); i { + file_otg_proto_msgTypes[454].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionProtocolBgpInitiateGracefulRestart); i { case 0: return &v.state case 1: @@ -141243,8 +164146,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[301].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventRouteAdvertiseWithdraw); i { + file_otg_proto_msgTypes[455].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionProtocolBgpGracefulRestartNotification); i { case 0: return &v.state case 1: @@ -141255,8 +164158,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[302].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventRequest); i { + file_otg_proto_msgTypes[456].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetricsRequest); i { case 0: return &v.state case 1: @@ -141267,8 +164170,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[303].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventSubscription); i { + file_otg_proto_msgTypes[457].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetricsResponse); i { case 0: return &v.state case 1: @@ -141279,8 +164182,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[304].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Lldp); i { + file_otg_proto_msgTypes[458].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PortMetricsRequest); i { case 0: return &v.state case 1: @@ -141291,8 +164194,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[305].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LldpConnection); i { + file_otg_proto_msgTypes[459].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PortMetric); i { case 0: return &v.state case 1: @@ -141303,8 +164206,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[306].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LldpChassisId); i { + file_otg_proto_msgTypes[460].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowMetricsRequest); i { case 0: return &v.state case 1: @@ -141315,8 +164218,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[307].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LldpPortId); i { + file_otg_proto_msgTypes[461].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowTaggedMetricsFilter); i { case 0: return &v.state case 1: @@ -141327,8 +164230,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[308].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LldpChassisMacSubType); i { + file_otg_proto_msgTypes[462].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowMetricTagFilter); i { case 0: return &v.state case 1: @@ -141339,8 +164242,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[309].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LldpPortInterfaceNameSubType); i { + file_otg_proto_msgTypes[463].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowMetric); i { case 0: return &v.state case 1: @@ -141351,8 +164254,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[310].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LldpSystemName); i { + file_otg_proto_msgTypes[464].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowTaggedMetric); i { case 0: return &v.state case 1: @@ -141363,8 +164266,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[311].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Error); i { + file_otg_proto_msgTypes[465].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowMetricTag); i { case 0: return &v.state case 1: @@ -141375,8 +164278,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[312].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Warning); i { + file_otg_proto_msgTypes[466].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowMetricTagValue); i { case 0: return &v.state case 1: @@ -141387,8 +164290,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[313].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigUpdate); i { + file_otg_proto_msgTypes[467].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetricTimestamp); i { case 0: return &v.state case 1: @@ -141399,8 +164302,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[314].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowsUpdate); i { + file_otg_proto_msgTypes[468].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetricLatency); i { case 0: return &v.state case 1: @@ -141411,8 +164314,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[315].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ControlState); i { + file_otg_proto_msgTypes[469].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bgpv4MetricsRequest); i { case 0: return &v.state case 1: @@ -141423,8 +164326,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[316].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatePort); i { + file_otg_proto_msgTypes[470].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bgpv4Metric); i { case 0: return &v.state case 1: @@ -141435,8 +164338,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[317].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateTraffic); i { + file_otg_proto_msgTypes[471].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bgpv6MetricsRequest); i { case 0: return &v.state case 1: @@ -141447,8 +164350,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[318].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateProtocol); i { + file_otg_proto_msgTypes[472].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bgpv6Metric); i { case 0: return &v.state case 1: @@ -141459,8 +164362,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[319].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatePortLink); i { + file_otg_proto_msgTypes[473].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisMetricsRequest); i { case 0: return &v.state case 1: @@ -141471,8 +164374,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[320].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatePortCapture); i { + file_otg_proto_msgTypes[474].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisMetric); i { case 0: return &v.state case 1: @@ -141483,8 +164386,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[321].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateTrafficFlowTransmit); i { + file_otg_proto_msgTypes[475].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LagMetricsRequest); i { case 0: return &v.state case 1: @@ -141495,8 +164398,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[322].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateProtocolAll); i { + file_otg_proto_msgTypes[476].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LagMetric); i { case 0: return &v.state case 1: @@ -141507,8 +164410,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[323].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateProtocolRoute); i { + file_otg_proto_msgTypes[477].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LacpMetricsRequest); i { case 0: return &v.state case 1: @@ -141519,8 +164422,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[324].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateProtocolLacp); i { + file_otg_proto_msgTypes[478].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LacpMetric); i { case 0: return &v.state case 1: @@ -141531,8 +164434,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[325].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateProtocolLacpAdmin); i { + file_otg_proto_msgTypes[479].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpMetricsRequest); i { case 0: return &v.state case 1: @@ -141543,8 +164446,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[326].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateProtocolLacpMemberPorts); i { + file_otg_proto_msgTypes[480].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpMetric); i { case 0: return &v.state case 1: @@ -141555,8 +164458,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[327].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateProtocolBgp); i { + file_otg_proto_msgTypes[481].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpMetricsRequest); i { case 0: return &v.state case 1: @@ -141567,8 +164470,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[328].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateProtocolBgpPeers); i { + file_otg_proto_msgTypes[482].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpMetric); i { case 0: return &v.state case 1: @@ -141579,8 +164482,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[329].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateProtocolIsis); i { + file_otg_proto_msgTypes[483].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv4ClientMetricsRequest); i { case 0: return &v.state case 1: @@ -141591,8 +164494,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[330].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateProtocolIsisRouters); i { + file_otg_proto_msgTypes[484].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv4ClientMetric); i { case 0: return &v.state case 1: @@ -141603,8 +164506,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[331].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ControlAction); i { + file_otg_proto_msgTypes[485].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv4ServerMetricsRequest); i { case 0: return &v.state case 1: @@ -141615,8 +164518,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[332].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ControlActionResponse); i { + file_otg_proto_msgTypes[486].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv4ServerMetric); i { case 0: return &v.state case 1: @@ -141627,8 +164530,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[333].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionResponse); i { + file_otg_proto_msgTypes[487].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientMetricsRequest); i { case 0: return &v.state case 1: @@ -141639,8 +164542,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[334].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionProtocol); i { + file_otg_proto_msgTypes[488].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientMetric); i { case 0: return &v.state case 1: @@ -141651,8 +164554,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[335].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionResponseProtocol); i { + file_otg_proto_msgTypes[489].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerMetricsRequest); i { case 0: return &v.state case 1: @@ -141663,8 +164566,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[336].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionProtocolIpv4); i { + file_otg_proto_msgTypes[490].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerMetric); i { case 0: return &v.state case 1: @@ -141675,8 +164578,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[337].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionResponseProtocolIpv4); i { + file_otg_proto_msgTypes[491].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2MetricsRequest); i { case 0: return &v.state case 1: @@ -141687,8 +164590,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[338].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionProtocolIpv4Ping); i { + file_otg_proto_msgTypes[492].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2Metric); i { case 0: return &v.state case 1: @@ -141699,8 +164602,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[339].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionProtocolIpv4PingRequest); i { + file_otg_proto_msgTypes[493].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatesRequest); i { case 0: return &v.state case 1: @@ -141711,8 +164614,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[340].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionResponseProtocolIpv4Ping); i { + file_otg_proto_msgTypes[494].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatesResponse); i { case 0: return &v.state case 1: @@ -141723,8 +164626,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[341].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionResponseProtocolIpv4PingResponse); i { + file_otg_proto_msgTypes[495].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Neighborsv4StatesRequest); i { case 0: return &v.state case 1: @@ -141735,8 +164638,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[342].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionProtocolIpv6); i { + file_otg_proto_msgTypes[496].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Neighborsv4State); i { case 0: return &v.state case 1: @@ -141747,8 +164650,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[343].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionResponseProtocolIpv6); i { + file_otg_proto_msgTypes[497].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Neighborsv6StatesRequest); i { case 0: return &v.state case 1: @@ -141759,8 +164662,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[344].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionProtocolIpv6Ping); i { + file_otg_proto_msgTypes[498].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Neighborsv6State); i { case 0: return &v.state case 1: @@ -141771,8 +164674,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[345].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionProtocolIpv6PingRequest); i { + file_otg_proto_msgTypes[499].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpPrefixStateRequest); i { case 0: return &v.state case 1: @@ -141783,8 +164686,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[346].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionResponseProtocolIpv6Ping); i { + file_otg_proto_msgTypes[500].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpPrefixIpv4UnicastFilter); i { case 0: return &v.state case 1: @@ -141795,8 +164698,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[347].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionResponseProtocolIpv6PingResponse); i { + file_otg_proto_msgTypes[501].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpPrefixIpv6UnicastFilter); i { case 0: return &v.state case 1: @@ -141807,8 +164710,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[348].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionProtocolBgp); i { + file_otg_proto_msgTypes[502].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpPrefixesState); i { case 0: return &v.state case 1: @@ -141819,8 +164722,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[349].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionProtocolBgpNotification); i { + file_otg_proto_msgTypes[503].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpPrefixIpv4UnicastState); i { case 0: return &v.state case 1: @@ -141831,8 +164734,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[350].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActionProtocolBgpInitiateGracefulRestart); i { + file_otg_proto_msgTypes[504].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpPrefixIpv6UnicastState); i { case 0: return &v.state case 1: @@ -141843,8 +164746,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[351].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetricsRequest); i { + file_otg_proto_msgTypes[505].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunity); i { case 0: return &v.state case 1: @@ -141855,8 +164758,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[352].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetricsResponse); i { + file_otg_proto_msgTypes[506].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityStructured); i { case 0: return &v.state case 1: @@ -141867,8 +164770,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[353].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PortMetricsRequest); i { + file_otg_proto_msgTypes[507].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget); i { case 0: return &v.state case 1: @@ -141879,8 +164782,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[354].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PortMetric); i { + file_otg_proto_msgTypes[508].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin); i { case 0: return &v.state case 1: @@ -141891,8 +164794,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[355].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowMetricsRequest); i { + file_otg_proto_msgTypes[509].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitive2OctetAsType); i { case 0: return &v.state case 1: @@ -141903,8 +164806,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[356].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowTaggedMetricsFilter); i { + file_otg_proto_msgTypes[510].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin); i { case 0: return &v.state case 1: @@ -141915,8 +164818,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[357].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowMetricTagFilter); i { + file_otg_proto_msgTypes[511].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget); i { case 0: return &v.state case 1: @@ -141927,8 +164830,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[358].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowMetric); i { + file_otg_proto_msgTypes[512].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitiveIpv4AddressType); i { case 0: return &v.state case 1: @@ -141939,8 +164842,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[359].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowTaggedMetric); i { + file_otg_proto_msgTypes[513].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget); i { case 0: return &v.state case 1: @@ -141951,8 +164854,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[360].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowMetricTag); i { + file_otg_proto_msgTypes[514].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin); i { case 0: return &v.state case 1: @@ -141963,8 +164866,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[361].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FlowMetricTagValue); i { + file_otg_proto_msgTypes[515].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitive4OctetAsType); i { case 0: return &v.state case 1: @@ -141975,8 +164878,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[362].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetricTimestamp); i { + file_otg_proto_msgTypes[516].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitiveOpaqueTypeColor); i { case 0: return &v.state case 1: @@ -141987,8 +164890,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[363].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetricLatency); i { + file_otg_proto_msgTypes[517].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation); i { case 0: return &v.state case 1: @@ -141999,8 +164902,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[364].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bgpv4MetricsRequest); i { + file_otg_proto_msgTypes[518].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitiveOpaqueType); i { case 0: return &v.state case 1: @@ -142011,8 +164914,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[365].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bgpv4Metric); i { + file_otg_proto_msgTypes[519].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth); i { case 0: return &v.state case 1: @@ -142023,8 +164926,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[366].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bgpv6MetricsRequest); i { + file_otg_proto_msgTypes[520].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityNonTransitive2OctetAsType); i { case 0: return &v.state case 1: @@ -142035,8 +164938,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[367].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bgpv6Metric); i { + file_otg_proto_msgTypes[521].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultBgpCommunity); i { case 0: return &v.state case 1: @@ -142047,8 +164950,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[368].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisMetricsRequest); i { + file_otg_proto_msgTypes[522].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultBgpAsPath); i { case 0: return &v.state case 1: @@ -142059,8 +164962,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[369].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisMetric); i { + file_otg_proto_msgTypes[523].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultBgpAsPathSegment); i { case 0: return &v.state case 1: @@ -142071,8 +164974,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[370].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LagMetricsRequest); i { + file_otg_proto_msgTypes[524].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspsStateRequest); i { case 0: return &v.state case 1: @@ -142083,8 +164986,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[371].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LagMetric); i { + file_otg_proto_msgTypes[525].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspsState); i { case 0: return &v.state case 1: @@ -142095,8 +164998,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[372].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LacpMetricsRequest); i { + file_otg_proto_msgTypes[526].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspState); i { case 0: return &v.state case 1: @@ -142107,8 +165010,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[373].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LacpMetric); i { + file_otg_proto_msgTypes[527].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspTlvs); i { case 0: return &v.state case 1: @@ -142119,8 +165022,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[374].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LldpMetricsRequest); i { + file_otg_proto_msgTypes[528].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspHostname); i { case 0: return &v.state case 1: @@ -142131,8 +165034,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[375].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LldpMetric); i { + file_otg_proto_msgTypes[529].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspFlags); i { case 0: return &v.state case 1: @@ -142143,8 +165046,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[376].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpMetricsRequest); i { + file_otg_proto_msgTypes[530].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspIsReachabilityTlv); i { case 0: return &v.state case 1: @@ -142155,8 +165058,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[377].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpMetric); i { + file_otg_proto_msgTypes[531].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspExtendedIsReachabilityTlv); i { case 0: return &v.state case 1: @@ -142167,8 +165070,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[378].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatesRequest); i { + file_otg_proto_msgTypes[532].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspneighbor); i { case 0: return &v.state case 1: @@ -142179,8 +165082,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[379].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatesResponse); i { + file_otg_proto_msgTypes[533].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspIpv4InternalReachabilityTlv); i { case 0: return &v.state case 1: @@ -142191,8 +165094,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[380].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Neighborsv4StatesRequest); i { + file_otg_proto_msgTypes[534].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspIpv4ExternalReachabilityTlv); i { case 0: return &v.state case 1: @@ -142203,8 +165106,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[381].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Neighborsv4State); i { + file_otg_proto_msgTypes[535].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspV4Prefix); i { case 0: return &v.state case 1: @@ -142215,8 +165118,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[382].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Neighborsv6StatesRequest); i { + file_otg_proto_msgTypes[536].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspExtendedIpv4ReachabilityTlv); i { case 0: return &v.state case 1: @@ -142227,8 +165130,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[383].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Neighborsv6State); i { + file_otg_proto_msgTypes[537].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspExtendedV4Prefix); i { case 0: return &v.state case 1: @@ -142239,8 +165142,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[384].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpPrefixStateRequest); i { + file_otg_proto_msgTypes[538].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspIpv6ReachabilityTlv); i { case 0: return &v.state case 1: @@ -142251,8 +165154,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[385].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpPrefixIpv4UnicastFilter); i { + file_otg_proto_msgTypes[539].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspV6Prefix); i { case 0: return &v.state case 1: @@ -142263,8 +165166,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[386].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpPrefixIpv6UnicastFilter); i { + file_otg_proto_msgTypes[540].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsisLspPrefixAttributes); i { case 0: return &v.state case 1: @@ -142275,8 +165178,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[387].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpPrefixesState); i { + file_otg_proto_msgTypes[541].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpNeighborsStateRequest); i { case 0: return &v.state case 1: @@ -142287,8 +165190,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[388].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpPrefixIpv4UnicastState); i { + file_otg_proto_msgTypes[542].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpNeighborsState); i { case 0: return &v.state case 1: @@ -142299,8 +165202,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[389].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BgpPrefixIpv6UnicastState); i { + file_otg_proto_msgTypes[543].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpCustomTLVState); i { case 0: return &v.state case 1: @@ -142311,8 +165214,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[390].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResultBgpCommunity); i { + file_otg_proto_msgTypes[544].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpCapabilityState); i { case 0: return &v.state case 1: @@ -142323,8 +165226,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[391].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResultBgpAsPath); i { + file_otg_proto_msgTypes[545].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpLspsStateRequest); i { case 0: return &v.state case 1: @@ -142335,8 +165238,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[392].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResultBgpAsPathSegment); i { + file_otg_proto_msgTypes[546].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpLspsState); i { case 0: return &v.state case 1: @@ -142347,8 +165250,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[393].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspsStateRequest); i { + file_otg_proto_msgTypes[547].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpIPv4LspState); i { case 0: return &v.state case 1: @@ -142359,8 +165262,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[394].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspsState); i { + file_otg_proto_msgTypes[548].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpLspState); i { case 0: return &v.state case 1: @@ -142371,8 +165274,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[395].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspState); i { + file_otg_proto_msgTypes[549].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpLspIpv4Rro); i { case 0: return &v.state case 1: @@ -142383,8 +165286,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[396].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspTlvs); i { + file_otg_proto_msgTypes[550].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RsvpLspIpv4Ero); i { case 0: return &v.state case 1: @@ -142395,8 +165298,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[397].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspHostname); i { + file_otg_proto_msgTypes[551].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv4InterfaceStateRequest); i { case 0: return &v.state case 1: @@ -142407,8 +165310,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[398].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspFlags); i { + file_otg_proto_msgTypes[552].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv4InterfaceState); i { case 0: return &v.state case 1: @@ -142419,8 +165322,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[399].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspIsReachabilityTlv); i { + file_otg_proto_msgTypes[553].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv4LeaseStateRequest); i { case 0: return &v.state case 1: @@ -142431,8 +165334,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[400].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspExtendedIsReachabilityTlv); i { + file_otg_proto_msgTypes[554].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv4LeasesState); i { case 0: return &v.state case 1: @@ -142443,8 +165346,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[401].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspneighbor); i { + file_otg_proto_msgTypes[555].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv4LeaseState); i { case 0: return &v.state case 1: @@ -142455,8 +165358,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[402].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspIpv4InternalReachabilityTlv); i { + file_otg_proto_msgTypes[556].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6InterfaceStateRequest); i { case 0: return &v.state case 1: @@ -142467,8 +165370,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[403].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspIpv4ExternalReachabilityTlv); i { + file_otg_proto_msgTypes[557].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6InterfaceState); i { case 0: return &v.state case 1: @@ -142479,8 +165382,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[404].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspV4Prefix); i { + file_otg_proto_msgTypes[558].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6InterfaceIapd); i { case 0: return &v.state case 1: @@ -142491,8 +165394,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[405].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspExtendedIpv4ReachabilityTlv); i { + file_otg_proto_msgTypes[559].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6InterfaceIa); i { case 0: return &v.state case 1: @@ -142503,8 +165406,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[406].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspExtendedV4Prefix); i { + file_otg_proto_msgTypes[560].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6LeaseStateRequest); i { case 0: return &v.state case 1: @@ -142515,8 +165418,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[407].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspIpv6ReachabilityTlv); i { + file_otg_proto_msgTypes[561].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6LeasesState); i { case 0: return &v.state case 1: @@ -142527,8 +165430,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[408].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspV6Prefix); i { + file_otg_proto_msgTypes[562].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerLeaseState); i { case 0: return &v.state case 1: @@ -142539,8 +165442,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[409].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsisLspPrefixAttributes); i { + file_otg_proto_msgTypes[563].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2LsasStateRequest); i { case 0: return &v.state case 1: @@ -142551,8 +165454,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[410].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LldpNeighborsStateRequest); i { + file_otg_proto_msgTypes[564].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2LsaState); i { case 0: return &v.state case 1: @@ -142563,8 +165466,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[411].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LldpNeighborsState); i { + file_otg_proto_msgTypes[565].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2RouterLsa); i { case 0: return &v.state case 1: @@ -142575,8 +165478,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[412].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LldpCustomTLVState); i { + file_otg_proto_msgTypes[566].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2NetworkLsa); i { case 0: return &v.state case 1: @@ -142587,8 +165490,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[413].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LldpCapabilityState); i { + file_otg_proto_msgTypes[567].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2NetworkSummaryLsa); i { case 0: return &v.state case 1: @@ -142599,8 +165502,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[414].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpLspsStateRequest); i { + file_otg_proto_msgTypes[568].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2SummaryAsLsa); i { case 0: return &v.state case 1: @@ -142611,8 +165514,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[415].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpLspsState); i { + file_otg_proto_msgTypes[569].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2ExternalAsLsa); i { case 0: return &v.state case 1: @@ -142623,8 +165526,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[416].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpIPv4LspState); i { + file_otg_proto_msgTypes[570].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2NssaLsa); i { case 0: return &v.state case 1: @@ -142635,8 +165538,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[417].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpLspState); i { + file_otg_proto_msgTypes[571].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2OpaqueLsa); i { case 0: return &v.state case 1: @@ -142647,8 +165550,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[418].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpLspIpv4Rro); i { + file_otg_proto_msgTypes[572].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2LsaHeader); i { case 0: return &v.state case 1: @@ -142659,8 +165562,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[419].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RsvpLspIpv4Ero); i { + file_otg_proto_msgTypes[573].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2Link); i { case 0: return &v.state case 1: @@ -142671,7 +165574,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[420].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[574].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CaptureRequest); i { case 0: return &v.state @@ -142683,7 +165586,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[421].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[575].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetDstCounter); i { case 0: return &v.state @@ -142695,7 +165598,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[422].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[576].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetDstMetricTag); i { case 0: return &v.state @@ -142707,7 +165610,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[423].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[577].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetDst); i { case 0: return &v.state @@ -142719,7 +165622,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[424].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[578].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetSrcCounter); i { case 0: return &v.state @@ -142731,7 +165634,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[425].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[579].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetSrcMetricTag); i { case 0: return &v.state @@ -142743,7 +165646,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[426].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[580].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetSrc); i { case 0: return &v.state @@ -142755,7 +165658,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[427].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[581].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetEtherTypeCounter); i { case 0: return &v.state @@ -142767,7 +165670,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[428].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[582].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetEtherTypeMetricTag); i { case 0: return &v.state @@ -142779,7 +165682,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[429].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[583].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetEtherType); i { case 0: return &v.state @@ -142791,7 +165694,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[430].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[584].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPfcQueueCounter); i { case 0: return &v.state @@ -142803,7 +165706,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[431].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[585].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPfcQueueMetricTag); i { case 0: return &v.state @@ -142815,7 +165718,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[432].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[586].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPfcQueue); i { case 0: return &v.state @@ -142827,7 +165730,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[433].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[587].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanPriorityCounter); i { case 0: return &v.state @@ -142839,7 +165742,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[434].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[588].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanPriorityMetricTag); i { case 0: return &v.state @@ -142851,7 +165754,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[435].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[589].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanPriority); i { case 0: return &v.state @@ -142863,7 +165766,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[436].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[590].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanCfiCounter); i { case 0: return &v.state @@ -142875,7 +165778,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[437].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[591].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanCfiMetricTag); i { case 0: return &v.state @@ -142887,7 +165790,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[438].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[592].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanCfi); i { case 0: return &v.state @@ -142899,7 +165802,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[439].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[593].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanIdCounter); i { case 0: return &v.state @@ -142911,7 +165814,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[440].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[594].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanIdMetricTag); i { case 0: return &v.state @@ -142923,7 +165826,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[441].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[595].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanId); i { case 0: return &v.state @@ -142935,7 +165838,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[442].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[596].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanTpidCounter); i { case 0: return &v.state @@ -142947,7 +165850,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[443].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[597].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanTpidMetricTag); i { case 0: return &v.state @@ -142959,7 +165862,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[444].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[598].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanTpid); i { case 0: return &v.state @@ -142971,7 +165874,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[445].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[599].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanFlagsCounter); i { case 0: return &v.state @@ -142983,7 +165886,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[446].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[600].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanFlagsMetricTag); i { case 0: return &v.state @@ -142995,7 +165898,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[447].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[601].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanFlags); i { case 0: return &v.state @@ -143007,7 +165910,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[448].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[602].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanReserved0Counter); i { case 0: return &v.state @@ -143019,7 +165922,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[449].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[603].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanReserved0MetricTag); i { case 0: return &v.state @@ -143031,7 +165934,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[450].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[604].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanReserved0); i { case 0: return &v.state @@ -143043,7 +165946,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[451].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[605].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanVniCounter); i { case 0: return &v.state @@ -143055,7 +165958,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[452].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[606].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanVniMetricTag); i { case 0: return &v.state @@ -143067,7 +165970,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[453].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[607].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanVni); i { case 0: return &v.state @@ -143079,7 +165982,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[454].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[608].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanReserved1Counter); i { case 0: return &v.state @@ -143091,7 +165994,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[455].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[609].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanReserved1MetricTag); i { case 0: return &v.state @@ -143103,7 +166006,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[456].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[610].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanReserved1); i { case 0: return &v.state @@ -143115,7 +166018,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[457].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[611].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4VersionCounter); i { case 0: return &v.state @@ -143127,7 +166030,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[458].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[612].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4VersionMetricTag); i { case 0: return &v.state @@ -143139,7 +166042,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[459].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[613].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4Version); i { case 0: return &v.state @@ -143151,7 +166054,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[460].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[614].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4HeaderLengthCounter); i { case 0: return &v.state @@ -143163,7 +166066,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[461].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[615].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4HeaderLengthMetricTag); i { case 0: return &v.state @@ -143175,7 +166078,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[462].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[616].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4HeaderLength); i { case 0: return &v.state @@ -143187,7 +166090,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[463].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[617].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TotalLengthCounter); i { case 0: return &v.state @@ -143199,7 +166102,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[464].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[618].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TotalLengthMetricTag); i { case 0: return &v.state @@ -143211,7 +166114,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[465].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[619].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TotalLength); i { case 0: return &v.state @@ -143223,7 +166126,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[466].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[620].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4IdentificationCounter); i { case 0: return &v.state @@ -143235,7 +166138,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[467].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[621].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4IdentificationMetricTag); i { case 0: return &v.state @@ -143247,7 +166150,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[468].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[622].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4Identification); i { case 0: return &v.state @@ -143259,7 +166162,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[469].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[623].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4ReservedCounter); i { case 0: return &v.state @@ -143271,7 +166174,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[470].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[624].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4ReservedMetricTag); i { case 0: return &v.state @@ -143283,7 +166186,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[471].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[625].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4Reserved); i { case 0: return &v.state @@ -143295,7 +166198,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[472].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[626].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4DontFragmentCounter); i { case 0: return &v.state @@ -143307,7 +166210,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[473].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[627].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4DontFragmentMetricTag); i { case 0: return &v.state @@ -143319,7 +166222,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[474].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[628].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4DontFragment); i { case 0: return &v.state @@ -143331,7 +166234,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[475].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[629].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4MoreFragmentsCounter); i { case 0: return &v.state @@ -143343,7 +166246,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[476].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[630].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4MoreFragmentsMetricTag); i { case 0: return &v.state @@ -143355,7 +166258,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[477].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[631].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4MoreFragments); i { case 0: return &v.state @@ -143367,7 +166270,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[478].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[632].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4FragmentOffsetCounter); i { case 0: return &v.state @@ -143379,7 +166282,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[479].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[633].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4FragmentOffsetMetricTag); i { case 0: return &v.state @@ -143391,7 +166294,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[480].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[634].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4FragmentOffset); i { case 0: return &v.state @@ -143403,7 +166306,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[481].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[635].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TimeToLiveCounter); i { case 0: return &v.state @@ -143415,7 +166318,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[482].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[636].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TimeToLiveMetricTag); i { case 0: return &v.state @@ -143427,7 +166330,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[483].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[637].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TimeToLive); i { case 0: return &v.state @@ -143439,7 +166342,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[484].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[638].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4ProtocolCounter); i { case 0: return &v.state @@ -143451,7 +166354,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[485].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[639].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4ProtocolMetricTag); i { case 0: return &v.state @@ -143463,7 +166366,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[486].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[640].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4Protocol); i { case 0: return &v.state @@ -143475,7 +166378,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[487].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[641].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4HeaderChecksum); i { case 0: return &v.state @@ -143487,7 +166390,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[488].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[642].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4SrcCounter); i { case 0: return &v.state @@ -143499,7 +166402,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[489].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[643].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4SrcMetricTag); i { case 0: return &v.state @@ -143511,7 +166414,19 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[490].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[644].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatternFlowIpv4SrcRandom); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[645].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4Src); i { case 0: return &v.state @@ -143523,7 +166438,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[491].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[646].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4DstCounter); i { case 0: return &v.state @@ -143535,7 +166450,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[492].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[647].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4DstMetricTag); i { case 0: return &v.state @@ -143547,7 +166462,19 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[493].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[648].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatternFlowIpv4DstRandom); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[649].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4Dst); i { case 0: return &v.state @@ -143559,7 +166486,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[494].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[650].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter); i { case 0: return &v.state @@ -143571,7 +166498,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[495].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[651].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4OptionsCustomTypeCopiedFlag); i { case 0: return &v.state @@ -143583,7 +166510,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[496].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[652].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4OptionsCustomTypeOptionClassCounter); i { case 0: return &v.state @@ -143595,7 +166522,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[497].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[653].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4OptionsCustomTypeOptionClass); i { case 0: return &v.state @@ -143607,7 +166534,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[498].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[654].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4OptionsCustomTypeOptionNumberCounter); i { case 0: return &v.state @@ -143619,7 +166546,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[499].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[655].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4OptionsCustomTypeOptionNumber); i { case 0: return &v.state @@ -143631,7 +166558,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[500].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[656].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4PriorityRawCounter); i { case 0: return &v.state @@ -143643,7 +166570,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[501].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[657].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4PriorityRawMetricTag); i { case 0: return &v.state @@ -143655,7 +166582,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[502].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[658].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4PriorityRaw); i { case 0: return &v.state @@ -143667,7 +166594,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[503].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[659].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4DscpPhbCounter); i { case 0: return &v.state @@ -143679,7 +166606,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[504].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[660].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4DscpPhbMetricTag); i { case 0: return &v.state @@ -143691,7 +166618,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[505].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[661].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4DscpPhb); i { case 0: return &v.state @@ -143703,7 +166630,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[506].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[662].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4DscpEcnCounter); i { case 0: return &v.state @@ -143715,7 +166642,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[507].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[663].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4DscpEcnMetricTag); i { case 0: return &v.state @@ -143727,7 +166654,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[508].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[664].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4DscpEcn); i { case 0: return &v.state @@ -143739,7 +166666,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[509].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[665].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosPrecedenceCounter); i { case 0: return &v.state @@ -143751,7 +166678,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[510].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[666].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosPrecedenceMetricTag); i { case 0: return &v.state @@ -143763,7 +166690,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[511].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[667].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosPrecedence); i { case 0: return &v.state @@ -143775,7 +166702,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[512].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[668].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosDelayCounter); i { case 0: return &v.state @@ -143787,7 +166714,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[513].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[669].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosDelayMetricTag); i { case 0: return &v.state @@ -143799,7 +166726,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[514].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[670].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosDelay); i { case 0: return &v.state @@ -143811,7 +166738,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[515].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[671].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosThroughputCounter); i { case 0: return &v.state @@ -143823,7 +166750,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[516].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[672].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosThroughputMetricTag); i { case 0: return &v.state @@ -143835,7 +166762,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[517].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[673].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosThroughput); i { case 0: return &v.state @@ -143847,7 +166774,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[518].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[674].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosReliabilityCounter); i { case 0: return &v.state @@ -143859,7 +166786,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[519].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[675].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosReliabilityMetricTag); i { case 0: return &v.state @@ -143871,7 +166798,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[520].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[676].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosReliability); i { case 0: return &v.state @@ -143883,7 +166810,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[521].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[677].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosMonetaryCounter); i { case 0: return &v.state @@ -143895,7 +166822,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[522].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[678].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosMonetaryMetricTag); i { case 0: return &v.state @@ -143907,7 +166834,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[523].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[679].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosMonetary); i { case 0: return &v.state @@ -143919,7 +166846,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[524].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[680].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosUnusedCounter); i { case 0: return &v.state @@ -143931,7 +166858,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[525].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[681].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosUnusedMetricTag); i { case 0: return &v.state @@ -143943,7 +166870,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[526].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[682].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosUnused); i { case 0: return &v.state @@ -143955,7 +166882,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[527].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[683].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6VersionCounter); i { case 0: return &v.state @@ -143967,7 +166894,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[528].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[684].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6VersionMetricTag); i { case 0: return &v.state @@ -143979,7 +166906,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[529].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[685].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6Version); i { case 0: return &v.state @@ -143991,7 +166918,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[530].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[686].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6TrafficClassCounter); i { case 0: return &v.state @@ -144003,8 +166930,20 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[531].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PatternFlowIpv6TrafficClassMetricTag); i { + file_otg_proto_msgTypes[687].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatternFlowIpv6TrafficClassMetricTag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[688].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatternFlowIpv6TrafficClass); i { case 0: return &v.state case 1: @@ -144015,8 +166954,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[532].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PatternFlowIpv6TrafficClass); i { + file_otg_proto_msgTypes[689].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatternFlowIpv6FlowLabelCounter); i { case 0: return &v.state case 1: @@ -144027,8 +166966,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[533].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PatternFlowIpv6FlowLabelCounter); i { + file_otg_proto_msgTypes[690].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatternFlowIpv6FlowLabelMetricTag); i { case 0: return &v.state case 1: @@ -144039,8 +166978,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[534].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PatternFlowIpv6FlowLabelMetricTag); i { + file_otg_proto_msgTypes[691].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatternFlowIpv6FlowLabelRandom); i { case 0: return &v.state case 1: @@ -144051,7 +166990,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[535].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[692].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6FlowLabel); i { case 0: return &v.state @@ -144063,7 +167002,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[536].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[693].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6PayloadLengthCounter); i { case 0: return &v.state @@ -144075,7 +167014,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[537].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[694].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6PayloadLengthMetricTag); i { case 0: return &v.state @@ -144087,7 +167026,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[538].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[695].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6PayloadLength); i { case 0: return &v.state @@ -144099,7 +167038,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[539].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[696].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6NextHeaderCounter); i { case 0: return &v.state @@ -144111,7 +167050,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[540].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[697].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6NextHeaderMetricTag); i { case 0: return &v.state @@ -144123,7 +167062,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[541].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[698].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6NextHeader); i { case 0: return &v.state @@ -144135,7 +167074,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[542].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[699].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6HopLimitCounter); i { case 0: return &v.state @@ -144147,7 +167086,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[543].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[700].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6HopLimitMetricTag); i { case 0: return &v.state @@ -144159,7 +167098,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[544].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[701].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6HopLimit); i { case 0: return &v.state @@ -144171,7 +167110,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[545].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[702].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6SrcCounter); i { case 0: return &v.state @@ -144183,7 +167122,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[546].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[703].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6SrcMetricTag); i { case 0: return &v.state @@ -144195,7 +167134,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[547].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[704].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6Src); i { case 0: return &v.state @@ -144207,7 +167146,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[548].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[705].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6DstCounter); i { case 0: return &v.state @@ -144219,7 +167158,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[549].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[706].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6DstMetricTag); i { case 0: return &v.state @@ -144231,7 +167170,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[550].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[707].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6Dst); i { case 0: return &v.state @@ -144243,7 +167182,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[551].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[708].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseDstCounter); i { case 0: return &v.state @@ -144255,7 +167194,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[552].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[709].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseDstMetricTag); i { case 0: return &v.state @@ -144267,7 +167206,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[553].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[710].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseDst); i { case 0: return &v.state @@ -144279,7 +167218,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[554].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[711].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseSrcCounter); i { case 0: return &v.state @@ -144291,7 +167230,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[555].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[712].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseSrcMetricTag); i { case 0: return &v.state @@ -144303,7 +167242,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[556].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[713].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseSrc); i { case 0: return &v.state @@ -144315,7 +167254,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[557].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[714].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseEtherTypeCounter); i { case 0: return &v.state @@ -144327,7 +167266,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[558].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[715].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseEtherTypeMetricTag); i { case 0: return &v.state @@ -144339,7 +167278,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[559].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[716].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseEtherType); i { case 0: return &v.state @@ -144351,7 +167290,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[560].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[717].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseControlOpCodeCounter); i { case 0: return &v.state @@ -144363,7 +167302,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[561].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[718].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseControlOpCodeMetricTag); i { case 0: return &v.state @@ -144375,7 +167314,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[562].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[719].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseControlOpCode); i { case 0: return &v.state @@ -144387,7 +167326,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[563].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[720].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseClassEnableVectorCounter); i { case 0: return &v.state @@ -144399,7 +167338,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[564].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[721].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseClassEnableVectorMetricTag); i { case 0: return &v.state @@ -144411,7 +167350,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[565].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[722].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseClassEnableVector); i { case 0: return &v.state @@ -144423,7 +167362,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[566].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[723].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass0Counter); i { case 0: return &v.state @@ -144435,7 +167374,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[567].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[724].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass0MetricTag); i { case 0: return &v.state @@ -144447,7 +167386,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[568].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[725].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass0); i { case 0: return &v.state @@ -144459,7 +167398,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[569].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[726].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass1Counter); i { case 0: return &v.state @@ -144471,7 +167410,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[570].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[727].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass1MetricTag); i { case 0: return &v.state @@ -144483,7 +167422,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[571].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[728].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass1); i { case 0: return &v.state @@ -144495,7 +167434,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[572].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[729].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass2Counter); i { case 0: return &v.state @@ -144507,7 +167446,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[573].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[730].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass2MetricTag); i { case 0: return &v.state @@ -144519,7 +167458,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[574].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[731].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass2); i { case 0: return &v.state @@ -144531,7 +167470,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[575].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[732].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass3Counter); i { case 0: return &v.state @@ -144543,7 +167482,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[576].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[733].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass3MetricTag); i { case 0: return &v.state @@ -144555,7 +167494,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[577].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[734].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass3); i { case 0: return &v.state @@ -144567,7 +167506,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[578].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[735].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass4Counter); i { case 0: return &v.state @@ -144579,7 +167518,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[579].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[736].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass4MetricTag); i { case 0: return &v.state @@ -144591,7 +167530,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[580].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[737].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass4); i { case 0: return &v.state @@ -144603,7 +167542,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[581].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[738].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass5Counter); i { case 0: return &v.state @@ -144615,7 +167554,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[582].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[739].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass5MetricTag); i { case 0: return &v.state @@ -144627,7 +167566,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[583].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[740].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass5); i { case 0: return &v.state @@ -144639,7 +167578,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[584].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[741].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass6Counter); i { case 0: return &v.state @@ -144651,7 +167590,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[585].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[742].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass6MetricTag); i { case 0: return &v.state @@ -144663,7 +167602,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[586].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[743].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass6); i { case 0: return &v.state @@ -144675,7 +167614,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[587].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[744].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass7Counter); i { case 0: return &v.state @@ -144687,7 +167626,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[588].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[745].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass7MetricTag); i { case 0: return &v.state @@ -144699,7 +167638,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[589].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[746].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass7); i { case 0: return &v.state @@ -144711,7 +167650,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[590].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[747].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseDstCounter); i { case 0: return &v.state @@ -144723,7 +167662,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[591].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[748].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseDstMetricTag); i { case 0: return &v.state @@ -144735,7 +167674,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[592].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[749].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseDst); i { case 0: return &v.state @@ -144747,7 +167686,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[593].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[750].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseSrcCounter); i { case 0: return &v.state @@ -144759,7 +167698,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[594].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[751].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseSrcMetricTag); i { case 0: return &v.state @@ -144771,7 +167710,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[595].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[752].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseSrc); i { case 0: return &v.state @@ -144783,7 +167722,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[596].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[753].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseEtherTypeCounter); i { case 0: return &v.state @@ -144795,7 +167734,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[597].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[754].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseEtherTypeMetricTag); i { case 0: return &v.state @@ -144807,7 +167746,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[598].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[755].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseEtherType); i { case 0: return &v.state @@ -144819,7 +167758,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[599].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[756].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseControlOpCodeCounter); i { case 0: return &v.state @@ -144831,7 +167770,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[600].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[757].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseControlOpCodeMetricTag); i { case 0: return &v.state @@ -144843,7 +167782,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[601].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[758].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseControlOpCode); i { case 0: return &v.state @@ -144855,7 +167794,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[602].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[759].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseTimeCounter); i { case 0: return &v.state @@ -144867,7 +167806,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[603].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[760].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseTimeMetricTag); i { case 0: return &v.state @@ -144879,7 +167818,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[604].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[761].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseTime); i { case 0: return &v.state @@ -144891,7 +167830,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[605].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[762].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpSrcPortCounter); i { case 0: return &v.state @@ -144903,7 +167842,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[606].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[763].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpSrcPortMetricTag); i { case 0: return &v.state @@ -144915,7 +167854,19 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[607].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[764].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatternFlowTcpSrcPortRandom); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[765].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpSrcPort); i { case 0: return &v.state @@ -144927,7 +167878,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[608].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[766].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpDstPortCounter); i { case 0: return &v.state @@ -144939,7 +167890,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[609].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[767].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpDstPortMetricTag); i { case 0: return &v.state @@ -144951,7 +167902,19 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[610].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[768].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatternFlowTcpDstPortRandom); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[769].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpDstPort); i { case 0: return &v.state @@ -144963,7 +167926,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[611].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[770].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpSeqNumCounter); i { case 0: return &v.state @@ -144975,7 +167938,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[612].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[771].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpSeqNumMetricTag); i { case 0: return &v.state @@ -144987,7 +167950,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[613].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[772].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpSeqNum); i { case 0: return &v.state @@ -144999,7 +167962,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[614].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[773].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpAckNumCounter); i { case 0: return &v.state @@ -145011,7 +167974,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[615].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[774].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpAckNumMetricTag); i { case 0: return &v.state @@ -145023,7 +167986,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[616].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[775].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpAckNum); i { case 0: return &v.state @@ -145035,7 +167998,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[617].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[776].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpDataOffsetCounter); i { case 0: return &v.state @@ -145047,7 +168010,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[618].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[777].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpDataOffsetMetricTag); i { case 0: return &v.state @@ -145059,7 +168022,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[619].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[778].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpDataOffset); i { case 0: return &v.state @@ -145071,7 +168034,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[620].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[779].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpEcnNsCounter); i { case 0: return &v.state @@ -145083,7 +168046,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[621].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[780].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpEcnNsMetricTag); i { case 0: return &v.state @@ -145095,7 +168058,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[622].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[781].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpEcnNs); i { case 0: return &v.state @@ -145107,7 +168070,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[623].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[782].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpEcnCwrCounter); i { case 0: return &v.state @@ -145119,7 +168082,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[624].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[783].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpEcnCwrMetricTag); i { case 0: return &v.state @@ -145131,7 +168094,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[625].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[784].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpEcnCwr); i { case 0: return &v.state @@ -145143,7 +168106,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[626].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[785].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpEcnEchoCounter); i { case 0: return &v.state @@ -145155,7 +168118,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[627].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[786].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpEcnEchoMetricTag); i { case 0: return &v.state @@ -145167,7 +168130,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[628].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[787].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpEcnEcho); i { case 0: return &v.state @@ -145179,7 +168142,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[629].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[788].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlUrgCounter); i { case 0: return &v.state @@ -145191,7 +168154,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[630].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[789].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlUrgMetricTag); i { case 0: return &v.state @@ -145203,7 +168166,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[631].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[790].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlUrg); i { case 0: return &v.state @@ -145215,7 +168178,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[632].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[791].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlAckCounter); i { case 0: return &v.state @@ -145227,7 +168190,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[633].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[792].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlAckMetricTag); i { case 0: return &v.state @@ -145239,7 +168202,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[634].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[793].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlAck); i { case 0: return &v.state @@ -145251,7 +168214,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[635].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[794].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlPshCounter); i { case 0: return &v.state @@ -145263,7 +168226,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[636].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[795].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlPshMetricTag); i { case 0: return &v.state @@ -145275,7 +168238,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[637].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[796].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlPsh); i { case 0: return &v.state @@ -145287,7 +168250,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[638].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[797].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlRstCounter); i { case 0: return &v.state @@ -145299,7 +168262,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[639].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[798].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlRstMetricTag); i { case 0: return &v.state @@ -145311,7 +168274,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[640].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[799].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlRst); i { case 0: return &v.state @@ -145323,7 +168286,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[641].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[800].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlSynCounter); i { case 0: return &v.state @@ -145335,7 +168298,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[642].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[801].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlSynMetricTag); i { case 0: return &v.state @@ -145347,7 +168310,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[643].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[802].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlSyn); i { case 0: return &v.state @@ -145359,7 +168322,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[644].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[803].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlFinCounter); i { case 0: return &v.state @@ -145371,7 +168334,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[645].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[804].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlFinMetricTag); i { case 0: return &v.state @@ -145383,7 +168346,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[646].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[805].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlFin); i { case 0: return &v.state @@ -145395,7 +168358,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[647].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[806].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpWindowCounter); i { case 0: return &v.state @@ -145407,7 +168370,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[648].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[807].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpWindowMetricTag); i { case 0: return &v.state @@ -145419,7 +168382,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[649].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[808].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpWindow); i { case 0: return &v.state @@ -145431,7 +168394,19 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[650].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[809].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatternFlowTcpChecksum); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[810].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpSrcPortCounter); i { case 0: return &v.state @@ -145443,7 +168418,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[651].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[811].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpSrcPortMetricTag); i { case 0: return &v.state @@ -145455,7 +168430,19 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[652].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[812].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatternFlowUdpSrcPortRandom); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[813].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpSrcPort); i { case 0: return &v.state @@ -145467,7 +168454,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[653].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[814].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpDstPortCounter); i { case 0: return &v.state @@ -145479,7 +168466,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[654].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[815].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpDstPortMetricTag); i { case 0: return &v.state @@ -145491,7 +168478,19 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[655].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[816].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatternFlowUdpDstPortRandom); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[817].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpDstPort); i { case 0: return &v.state @@ -145503,7 +168502,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[656].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[818].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpLengthCounter); i { case 0: return &v.state @@ -145515,7 +168514,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[657].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[819].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpLengthMetricTag); i { case 0: return &v.state @@ -145527,7 +168526,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[658].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[820].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpLength); i { case 0: return &v.state @@ -145539,7 +168538,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[659].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[821].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpChecksum); i { case 0: return &v.state @@ -145551,7 +168550,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[660].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[822].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreChecksumPresentCounter); i { case 0: return &v.state @@ -145563,7 +168562,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[661].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[823].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreChecksumPresentMetricTag); i { case 0: return &v.state @@ -145575,7 +168574,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[662].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[824].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreChecksumPresent); i { case 0: return &v.state @@ -145587,7 +168586,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[663].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[825].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreReserved0Counter); i { case 0: return &v.state @@ -145599,7 +168598,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[664].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[826].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreReserved0MetricTag); i { case 0: return &v.state @@ -145611,7 +168610,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[665].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[827].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreReserved0); i { case 0: return &v.state @@ -145623,7 +168622,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[666].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[828].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreVersionCounter); i { case 0: return &v.state @@ -145635,7 +168634,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[667].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[829].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreVersionMetricTag); i { case 0: return &v.state @@ -145647,7 +168646,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[668].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[830].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreVersion); i { case 0: return &v.state @@ -145659,7 +168658,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[669].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[831].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreProtocolCounter); i { case 0: return &v.state @@ -145671,7 +168670,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[670].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[832].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreProtocolMetricTag); i { case 0: return &v.state @@ -145683,7 +168682,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[671].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[833].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreProtocol); i { case 0: return &v.state @@ -145695,7 +168694,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[672].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[834].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreChecksum); i { case 0: return &v.state @@ -145707,7 +168706,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[673].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[835].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreReserved1Counter); i { case 0: return &v.state @@ -145719,7 +168718,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[674].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[836].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreReserved1MetricTag); i { case 0: return &v.state @@ -145731,7 +168730,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[675].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[837].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreReserved1); i { case 0: return &v.state @@ -145743,7 +168742,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[676].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[838].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1VersionCounter); i { case 0: return &v.state @@ -145755,7 +168754,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[677].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[839].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1VersionMetricTag); i { case 0: return &v.state @@ -145767,7 +168766,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[678].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[840].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1Version); i { case 0: return &v.state @@ -145779,7 +168778,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[679].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[841].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1ProtocolTypeCounter); i { case 0: return &v.state @@ -145791,7 +168790,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[680].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[842].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1ProtocolTypeMetricTag); i { case 0: return &v.state @@ -145803,7 +168802,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[681].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[843].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1ProtocolType); i { case 0: return &v.state @@ -145815,7 +168814,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[682].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[844].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1ReservedCounter); i { case 0: return &v.state @@ -145827,7 +168826,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[683].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[845].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1ReservedMetricTag); i { case 0: return &v.state @@ -145839,7 +168838,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[684].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[846].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1Reserved); i { case 0: return &v.state @@ -145851,7 +168850,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[685].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[847].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1EFlagCounter); i { case 0: return &v.state @@ -145863,7 +168862,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[686].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[848].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1EFlagMetricTag); i { case 0: return &v.state @@ -145875,7 +168874,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[687].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[849].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1EFlag); i { case 0: return &v.state @@ -145887,7 +168886,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[688].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[850].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1SFlagCounter); i { case 0: return &v.state @@ -145899,7 +168898,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[689].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[851].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1SFlagMetricTag); i { case 0: return &v.state @@ -145911,7 +168910,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[690].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[852].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1SFlag); i { case 0: return &v.state @@ -145923,7 +168922,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[691].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[853].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1PnFlagCounter); i { case 0: return &v.state @@ -145935,7 +168934,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[692].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[854].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1PnFlagMetricTag); i { case 0: return &v.state @@ -145947,7 +168946,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[693].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[855].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1PnFlag); i { case 0: return &v.state @@ -145959,7 +168958,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[694].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[856].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1MessageTypeCounter); i { case 0: return &v.state @@ -145971,7 +168970,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[695].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[857].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1MessageTypeMetricTag); i { case 0: return &v.state @@ -145983,7 +168982,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[696].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[858].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1MessageType); i { case 0: return &v.state @@ -145995,7 +168994,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[697].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[859].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1MessageLengthCounter); i { case 0: return &v.state @@ -146007,7 +169006,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[698].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[860].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1MessageLengthMetricTag); i { case 0: return &v.state @@ -146019,7 +169018,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[699].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[861].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1MessageLength); i { case 0: return &v.state @@ -146031,7 +169030,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[700].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[862].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1TeidCounter); i { case 0: return &v.state @@ -146043,7 +169042,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[701].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[863].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1TeidMetricTag); i { case 0: return &v.state @@ -146055,7 +169054,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[702].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[864].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1Teid); i { case 0: return &v.state @@ -146067,7 +169066,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[703].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[865].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1SquenceNumberCounter); i { case 0: return &v.state @@ -146079,7 +169078,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[704].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[866].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1SquenceNumberMetricTag); i { case 0: return &v.state @@ -146091,7 +169090,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[705].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[867].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1SquenceNumber); i { case 0: return &v.state @@ -146103,7 +169102,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[706].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[868].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1NPduNumberCounter); i { case 0: return &v.state @@ -146115,7 +169114,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[707].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[869].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1NPduNumberMetricTag); i { case 0: return &v.state @@ -146127,7 +169126,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[708].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[870].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1NPduNumber); i { case 0: return &v.state @@ -146139,7 +169138,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[709].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[871].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1NextExtensionHeaderTypeCounter); i { case 0: return &v.state @@ -146151,7 +169150,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[710].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[872].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1NextExtensionHeaderTypeMetricTag); i { case 0: return &v.state @@ -146163,7 +169162,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[711].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[873].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1NextExtensionHeaderType); i { case 0: return &v.state @@ -146175,7 +169174,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[712].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[874].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpExtensionExtensionLengthCounter); i { case 0: return &v.state @@ -146187,7 +169186,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[713].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[875].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpExtensionExtensionLengthMetricTag); i { case 0: return &v.state @@ -146199,7 +169198,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[714].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[876].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpExtensionExtensionLength); i { case 0: return &v.state @@ -146211,7 +169210,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[715].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[877].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpExtensionContentsCounter); i { case 0: return &v.state @@ -146223,7 +169222,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[716].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[878].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpExtensionContentsMetricTag); i { case 0: return &v.state @@ -146235,7 +169234,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[717].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[879].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpExtensionContents); i { case 0: return &v.state @@ -146247,7 +169246,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[718].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[880].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpExtensionNextExtensionHeaderCounter); i { case 0: return &v.state @@ -146259,7 +169258,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[719].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[881].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpExtensionNextExtensionHeaderMetricTag); i { case 0: return &v.state @@ -146271,7 +169270,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[720].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[882].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpExtensionNextExtensionHeader); i { case 0: return &v.state @@ -146283,7 +169282,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[721].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[883].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2VersionCounter); i { case 0: return &v.state @@ -146295,7 +169294,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[722].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[884].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2VersionMetricTag); i { case 0: return &v.state @@ -146307,7 +169306,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[723].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[885].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2Version); i { case 0: return &v.state @@ -146319,7 +169318,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[724].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[886].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2PiggybackingFlagCounter); i { case 0: return &v.state @@ -146331,7 +169330,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[725].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[887].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2PiggybackingFlagMetricTag); i { case 0: return &v.state @@ -146343,7 +169342,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[726].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[888].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2PiggybackingFlag); i { case 0: return &v.state @@ -146355,7 +169354,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[727].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[889].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2TeidFlagCounter); i { case 0: return &v.state @@ -146367,7 +169366,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[728].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[890].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2TeidFlagMetricTag); i { case 0: return &v.state @@ -146379,7 +169378,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[729].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[891].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2TeidFlag); i { case 0: return &v.state @@ -146391,7 +169390,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[730].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[892].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2Spare1Counter); i { case 0: return &v.state @@ -146403,7 +169402,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[731].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[893].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2Spare1MetricTag); i { case 0: return &v.state @@ -146415,7 +169414,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[732].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[894].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2Spare1); i { case 0: return &v.state @@ -146427,7 +169426,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[733].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[895].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2MessageTypeCounter); i { case 0: return &v.state @@ -146439,7 +169438,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[734].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[896].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2MessageTypeMetricTag); i { case 0: return &v.state @@ -146451,7 +169450,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[735].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[897].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2MessageType); i { case 0: return &v.state @@ -146463,7 +169462,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[736].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[898].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2MessageLengthCounter); i { case 0: return &v.state @@ -146475,7 +169474,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[737].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[899].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2MessageLengthMetricTag); i { case 0: return &v.state @@ -146487,7 +169486,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[738].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[900].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2MessageLength); i { case 0: return &v.state @@ -146499,7 +169498,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[739].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[901].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2TeidCounter); i { case 0: return &v.state @@ -146511,7 +169510,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[740].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[902].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2TeidMetricTag); i { case 0: return &v.state @@ -146523,7 +169522,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[741].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[903].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2Teid); i { case 0: return &v.state @@ -146535,7 +169534,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[742].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[904].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2SequenceNumberCounter); i { case 0: return &v.state @@ -146547,7 +169546,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[743].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[905].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2SequenceNumberMetricTag); i { case 0: return &v.state @@ -146559,7 +169558,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[744].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[906].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2SequenceNumber); i { case 0: return &v.state @@ -146571,7 +169570,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[745].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[907].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2Spare2Counter); i { case 0: return &v.state @@ -146583,7 +169582,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[746].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[908].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2Spare2MetricTag); i { case 0: return &v.state @@ -146595,7 +169594,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[747].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[909].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2Spare2); i { case 0: return &v.state @@ -146607,7 +169606,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[748].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[910].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpHardwareTypeCounter); i { case 0: return &v.state @@ -146619,7 +169618,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[749].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[911].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpHardwareTypeMetricTag); i { case 0: return &v.state @@ -146631,7 +169630,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[750].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[912].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpHardwareType); i { case 0: return &v.state @@ -146643,7 +169642,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[751].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[913].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpProtocolTypeCounter); i { case 0: return &v.state @@ -146655,7 +169654,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[752].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[914].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpProtocolTypeMetricTag); i { case 0: return &v.state @@ -146667,7 +169666,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[753].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[915].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpProtocolType); i { case 0: return &v.state @@ -146679,7 +169678,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[754].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[916].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpHardwareLengthCounter); i { case 0: return &v.state @@ -146691,7 +169690,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[755].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[917].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpHardwareLengthMetricTag); i { case 0: return &v.state @@ -146703,7 +169702,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[756].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[918].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpHardwareLength); i { case 0: return &v.state @@ -146715,7 +169714,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[757].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[919].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpProtocolLengthCounter); i { case 0: return &v.state @@ -146727,7 +169726,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[758].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[920].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpProtocolLengthMetricTag); i { case 0: return &v.state @@ -146739,7 +169738,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[759].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[921].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpProtocolLength); i { case 0: return &v.state @@ -146751,7 +169750,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[760].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[922].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpOperationCounter); i { case 0: return &v.state @@ -146763,7 +169762,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[761].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[923].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpOperationMetricTag); i { case 0: return &v.state @@ -146775,7 +169774,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[762].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[924].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpOperation); i { case 0: return &v.state @@ -146787,7 +169786,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[763].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[925].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpSenderHardwareAddrCounter); i { case 0: return &v.state @@ -146799,7 +169798,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[764].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[926].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpSenderHardwareAddrMetricTag); i { case 0: return &v.state @@ -146811,7 +169810,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[765].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[927].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpSenderHardwareAddr); i { case 0: return &v.state @@ -146823,7 +169822,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[766].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[928].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpSenderProtocolAddrCounter); i { case 0: return &v.state @@ -146835,7 +169834,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[767].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[929].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpSenderProtocolAddrMetricTag); i { case 0: return &v.state @@ -146847,7 +169846,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[768].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[930].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpSenderProtocolAddr); i { case 0: return &v.state @@ -146859,7 +169858,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[769].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[931].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpTargetHardwareAddrCounter); i { case 0: return &v.state @@ -146871,7 +169870,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[770].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[932].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpTargetHardwareAddrMetricTag); i { case 0: return &v.state @@ -146883,7 +169882,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[771].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[933].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpTargetHardwareAddr); i { case 0: return &v.state @@ -146895,7 +169894,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[772].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[934].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpTargetProtocolAddrCounter); i { case 0: return &v.state @@ -146907,7 +169906,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[773].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[935].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpTargetProtocolAddrMetricTag); i { case 0: return &v.state @@ -146919,7 +169918,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[774].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[936].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpTargetProtocolAddr); i { case 0: return &v.state @@ -146931,7 +169930,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[775].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[937].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoTypeCounter); i { case 0: return &v.state @@ -146943,7 +169942,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[776].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[938].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoTypeMetricTag); i { case 0: return &v.state @@ -146955,7 +169954,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[777].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[939].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoType); i { case 0: return &v.state @@ -146967,7 +169966,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[778].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[940].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoCodeCounter); i { case 0: return &v.state @@ -146979,7 +169978,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[779].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[941].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoCodeMetricTag); i { case 0: return &v.state @@ -146991,7 +169990,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[780].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[942].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoCode); i { case 0: return &v.state @@ -147003,7 +170002,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[781].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[943].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoChecksum); i { case 0: return &v.state @@ -147015,7 +170014,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[782].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[944].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoIdentifierCounter); i { case 0: return &v.state @@ -147027,7 +170026,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[783].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[945].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoIdentifierMetricTag); i { case 0: return &v.state @@ -147039,7 +170038,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[784].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[946].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoIdentifier); i { case 0: return &v.state @@ -147051,7 +170050,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[785].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[947].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoSequenceNumberCounter); i { case 0: return &v.state @@ -147063,7 +170062,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[786].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[948].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoSequenceNumberMetricTag); i { case 0: return &v.state @@ -147075,7 +170074,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[787].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[949].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoSequenceNumber); i { case 0: return &v.state @@ -147087,7 +170086,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[788].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[950].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpCommonChecksum); i { case 0: return &v.state @@ -147099,7 +170098,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[789].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[951].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpNextFieldsIdentifierCounter); i { case 0: return &v.state @@ -147111,7 +170110,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[790].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[952].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpNextFieldsIdentifierMetricTag); i { case 0: return &v.state @@ -147123,7 +170122,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[791].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[953].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpNextFieldsIdentifier); i { case 0: return &v.state @@ -147135,7 +170134,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[792].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[954].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpNextFieldsSequenceNumberCounter); i { case 0: return &v.state @@ -147147,7 +170146,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[793].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[955].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpNextFieldsSequenceNumberMetricTag); i { case 0: return &v.state @@ -147159,7 +170158,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[794].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[956].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpNextFieldsSequenceNumber); i { case 0: return &v.state @@ -147171,7 +170170,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[795].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[957].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoTypeCounter); i { case 0: return &v.state @@ -147183,7 +170182,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[796].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[958].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoTypeMetricTag); i { case 0: return &v.state @@ -147195,7 +170194,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[797].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[959].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoType); i { case 0: return &v.state @@ -147207,7 +170206,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[798].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[960].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoCodeCounter); i { case 0: return &v.state @@ -147219,7 +170218,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[799].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[961].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoCodeMetricTag); i { case 0: return &v.state @@ -147231,7 +170230,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[800].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[962].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoCode); i { case 0: return &v.state @@ -147243,7 +170242,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[801].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[963].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoIdentifierCounter); i { case 0: return &v.state @@ -147255,7 +170254,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[802].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[964].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoIdentifierMetricTag); i { case 0: return &v.state @@ -147267,7 +170266,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[803].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[965].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoIdentifier); i { case 0: return &v.state @@ -147279,7 +170278,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[804].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[966].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoSequenceNumberCounter); i { case 0: return &v.state @@ -147291,7 +170290,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[805].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[967].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoSequenceNumberMetricTag); i { case 0: return &v.state @@ -147303,7 +170302,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[806].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[968].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoSequenceNumber); i { case 0: return &v.state @@ -147315,7 +170314,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[807].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[969].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoChecksum); i { case 0: return &v.state @@ -147327,7 +170326,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[808].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[970].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6CommonChecksum); i { case 0: return &v.state @@ -147339,7 +170338,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[809].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[971].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPppAddressCounter); i { case 0: return &v.state @@ -147351,7 +170350,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[810].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[972].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPppAddressMetricTag); i { case 0: return &v.state @@ -147363,7 +170362,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[811].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[973].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPppAddress); i { case 0: return &v.state @@ -147375,7 +170374,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[812].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[974].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPppControlCounter); i { case 0: return &v.state @@ -147387,7 +170386,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[813].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[975].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPppControlMetricTag); i { case 0: return &v.state @@ -147399,7 +170398,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[814].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[976].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPppControl); i { case 0: return &v.state @@ -147411,7 +170410,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[815].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[977].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPppProtocolTypeCounter); i { case 0: return &v.state @@ -147423,7 +170422,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[816].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[978].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPppProtocolTypeMetricTag); i { case 0: return &v.state @@ -147435,7 +170434,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[817].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[979].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPppProtocolType); i { case 0: return &v.state @@ -147447,7 +170446,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[818].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[980].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1VersionCounter); i { case 0: return &v.state @@ -147459,7 +170458,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[819].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[981].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1VersionMetricTag); i { case 0: return &v.state @@ -147471,7 +170470,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[820].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[982].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1Version); i { case 0: return &v.state @@ -147483,7 +170482,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[821].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[983].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1TypeCounter); i { case 0: return &v.state @@ -147495,7 +170494,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[822].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[984].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1TypeMetricTag); i { case 0: return &v.state @@ -147507,7 +170506,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[823].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[985].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1Type); i { case 0: return &v.state @@ -147519,7 +170518,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[824].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[986].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1UnusedCounter); i { case 0: return &v.state @@ -147531,7 +170530,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[825].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[987].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1UnusedMetricTag); i { case 0: return &v.state @@ -147543,7 +170542,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[826].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[988].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1Unused); i { case 0: return &v.state @@ -147555,7 +170554,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[827].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[989].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1Checksum); i { case 0: return &v.state @@ -147567,7 +170566,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[828].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[990].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1GroupAddressCounter); i { case 0: return &v.state @@ -147579,7 +170578,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[829].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[991].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1GroupAddressMetricTag); i { case 0: return &v.state @@ -147591,7 +170590,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[830].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[992].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1GroupAddress); i { case 0: return &v.state @@ -147603,7 +170602,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[831].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[993].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsLabelCounter); i { case 0: return &v.state @@ -147615,7 +170614,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[832].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[994].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsLabelMetricTag); i { case 0: return &v.state @@ -147627,7 +170626,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[833].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[995].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsLabel); i { case 0: return &v.state @@ -147639,7 +170638,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[834].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[996].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsTrafficClassCounter); i { case 0: return &v.state @@ -147651,7 +170650,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[835].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[997].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsTrafficClassMetricTag); i { case 0: return &v.state @@ -147663,7 +170662,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[836].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[998].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsTrafficClass); i { case 0: return &v.state @@ -147675,7 +170674,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[837].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[999].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsBottomOfStackCounter); i { case 0: return &v.state @@ -147687,7 +170686,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[838].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1000].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsBottomOfStackMetricTag); i { case 0: return &v.state @@ -147699,7 +170698,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[839].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1001].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsBottomOfStack); i { case 0: return &v.state @@ -147711,7 +170710,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[840].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1002].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsTimeToLiveCounter); i { case 0: return &v.state @@ -147723,7 +170722,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[841].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1003].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsTimeToLiveMetricTag); i { case 0: return &v.state @@ -147735,7 +170734,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[842].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1004].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsTimeToLive); i { case 0: return &v.state @@ -147747,7 +170746,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[843].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1005].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVersionCounter); i { case 0: return &v.state @@ -147759,7 +170758,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[844].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1006].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVersion); i { case 0: return &v.state @@ -147771,7 +170770,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[845].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1007].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CPDURequestIdCounter); i { case 0: return &v.state @@ -147783,7 +170782,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[846].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1008].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CPDURequestId); i { case 0: return &v.state @@ -147795,7 +170794,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[847].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1009].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CPDUErrorIndexCounter); i { case 0: return &v.state @@ -147807,7 +170806,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[848].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1010].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CPDUErrorIndex); i { case 0: return &v.state @@ -147819,7 +170818,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[849].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1011].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CBulkPDURequestIdCounter); i { case 0: return &v.state @@ -147831,7 +170830,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[850].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1012].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CBulkPDURequestId); i { case 0: return &v.state @@ -147843,7 +170842,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[851].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1013].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CBulkPDUNonRepeaters); i { case 0: return &v.state @@ -147855,7 +170854,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[852].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1014].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter); i { case 0: return &v.state @@ -147867,7 +170866,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[853].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1015].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CBulkPDUMaxRepetitions); i { case 0: return &v.state @@ -147879,7 +170878,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[854].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1016].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter); i { case 0: return &v.state @@ -147891,7 +170890,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[855].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1017].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueIntegerValue); i { case 0: return &v.state @@ -147903,7 +170902,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[856].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1018].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter); i { case 0: return &v.state @@ -147915,7 +170914,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[857].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1019].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueIpAddressValue); i { case 0: return &v.state @@ -147927,7 +170926,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[858].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1020].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueCounterValueCounter); i { case 0: return &v.state @@ -147939,7 +170938,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[859].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1021].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueCounterValue); i { case 0: return &v.state @@ -147951,7 +170950,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[860].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1022].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter); i { case 0: return &v.state @@ -147963,7 +170962,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[861].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1023].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueTimeticksValue); i { case 0: return &v.state @@ -147975,7 +170974,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[862].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1024].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter); i { case 0: return &v.state @@ -147987,7 +170986,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[863].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1025].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueBigCounterValue); i { case 0: return &v.state @@ -147999,7 +170998,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[864].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1026].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter); i { case 0: return &v.state @@ -148011,7 +171010,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[865].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1027].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue); i { case 0: return &v.state @@ -148023,7 +171022,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[866].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1028].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CCommonRequestIdCounter); i { case 0: return &v.state @@ -148035,7 +171034,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[867].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1029].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CCommonRequestId); i { case 0: return &v.state @@ -148047,7 +171046,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[868].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1030].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRsvpRsvpChecksum); i { case 0: return &v.state @@ -148059,7 +171058,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[869].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1031].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRsvpTimeToLiveCounter); i { case 0: return &v.state @@ -148071,7 +171070,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[870].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1032].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRsvpTimeToLive); i { case 0: return &v.state @@ -148083,7 +171082,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[871].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1033].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRsvpReservedCounter); i { case 0: return &v.state @@ -148095,7 +171094,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[872].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1034].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRsvpReserved); i { case 0: return &v.state @@ -148107,7 +171106,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[873].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1035].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter); i { case 0: return &v.state @@ -148119,7 +171118,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[874].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1036].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress); i { case 0: return &v.state @@ -148131,7 +171130,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[875].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1037].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter); i { case 0: return &v.state @@ -148143,7 +171142,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[876].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1038].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionLspTunnelIpv4Reserved); i { case 0: return &v.state @@ -148155,7 +171154,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[877].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1039].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter); i { case 0: return &v.state @@ -148167,7 +171166,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[878].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1040].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId); i { case 0: return &v.state @@ -148179,7 +171178,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[879].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1041].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter); i { case 0: return &v.state @@ -148191,7 +171190,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[880].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1042].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionExtTunnelIdAsInteger); i { case 0: return &v.state @@ -148203,7 +171202,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[881].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1043].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter); i { case 0: return &v.state @@ -148215,7 +171214,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[882].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1044].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4); i { case 0: return &v.state @@ -148227,7 +171226,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[883].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1045].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter); i { case 0: return &v.state @@ -148239,7 +171238,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[884].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1046].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRsvpHopIpv4Ipv4Address); i { case 0: return &v.state @@ -148251,7 +171250,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[885].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1047].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter); i { case 0: return &v.state @@ -148263,7 +171262,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[886].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1048].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle); i { case 0: return &v.state @@ -148275,7 +171274,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[887].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1049].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter); i { case 0: return &v.state @@ -148287,7 +171286,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[888].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1050].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathTimeValuesType1RefreshPeriodR); i { case 0: return &v.state @@ -148299,7 +171298,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[889].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1051].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter); i { case 0: return &v.state @@ -148311,7 +171310,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[890].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1052].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit); i { case 0: return &v.state @@ -148323,7 +171322,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[891].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1053].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter); i { case 0: return &v.state @@ -148335,7 +171334,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[892].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1054].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address); i { case 0: return &v.state @@ -148347,7 +171346,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[893].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1055].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter); i { case 0: return &v.state @@ -148359,7 +171358,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[894].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1056].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathExplicitRouteType1ASNumberLBit); i { case 0: return &v.state @@ -148371,7 +171370,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[895].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1057].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter); i { case 0: return &v.state @@ -148383,7 +171382,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[896].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1058].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved); i { case 0: return &v.state @@ -148395,7 +171394,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[897].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1059].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter); i { case 0: return &v.state @@ -148407,7 +171406,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[898].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1060].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid); i { case 0: return &v.state @@ -148419,7 +171418,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[899].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1061].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter); i { case 0: return &v.state @@ -148431,7 +171430,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[900].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1062].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress); i { case 0: return &v.state @@ -148443,7 +171442,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[901].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1063].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter); i { case 0: return &v.state @@ -148455,7 +171454,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[902].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1064].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved); i { case 0: return &v.state @@ -148467,7 +171466,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[903].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1065].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter); i { case 0: return &v.state @@ -148479,7 +171478,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[904].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1066].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId); i { case 0: return &v.state @@ -148491,7 +171490,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[905].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1067].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServVersionCounter); i { case 0: return &v.state @@ -148503,7 +171502,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[906].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1068].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServVersion); i { case 0: return &v.state @@ -148515,7 +171514,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[907].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1069].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServReserved1Counter); i { case 0: return &v.state @@ -148527,7 +171526,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[908].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1070].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServReserved1); i { case 0: return &v.state @@ -148539,7 +171538,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[909].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1071].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter); i { case 0: return &v.state @@ -148551,7 +171550,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[910].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1072].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServOverallLength); i { case 0: return &v.state @@ -148563,7 +171562,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[911].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1073].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter); i { case 0: return &v.state @@ -148575,7 +171574,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[912].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1074].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServServiceHeader); i { case 0: return &v.state @@ -148587,7 +171586,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[913].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1075].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServZeroBitCounter); i { case 0: return &v.state @@ -148599,7 +171598,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[914].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1076].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServZeroBit); i { case 0: return &v.state @@ -148611,7 +171610,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[915].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1077].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServReserved2Counter); i { case 0: return &v.state @@ -148623,7 +171622,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[916].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1078].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServReserved2); i { case 0: return &v.state @@ -148635,7 +171634,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[917].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1079].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter); i { case 0: return &v.state @@ -148647,7 +171646,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[918].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1080].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData); i { case 0: return &v.state @@ -148659,7 +171658,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[919].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1081].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter); i { case 0: return &v.state @@ -148671,7 +171670,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[920].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1082].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec); i { case 0: return &v.state @@ -148683,7 +171682,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[921].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1083].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter); i { case 0: return &v.state @@ -148695,7 +171694,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[922].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1084].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServParameter127Flag); i { case 0: return &v.state @@ -148707,7 +171706,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[923].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1085].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter); i { case 0: return &v.state @@ -148719,7 +171718,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[924].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1086].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServParameter127Length); i { case 0: return &v.state @@ -148731,7 +171730,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[925].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1087].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter); i { case 0: return &v.state @@ -148743,7 +171742,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[926].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1088].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit); i { case 0: return &v.state @@ -148755,7 +171754,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[927].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1089].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter); i { case 0: return &v.state @@ -148767,7 +171766,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[928].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1090].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize); i { case 0: return &v.state @@ -148779,7 +171778,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[929].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1091].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter); i { case 0: return &v.state @@ -148791,7 +171790,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[930].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1092].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address); i { case 0: return &v.state @@ -148803,7 +171802,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[931].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1093].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter); i { case 0: return &v.state @@ -148815,7 +171814,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[932].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1094].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength); i { case 0: return &v.state @@ -148827,7 +171826,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[933].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1095].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRecordRouteType1LabelFlags); i { case 0: return &v.state @@ -148839,7 +171838,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[934].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1096].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRecordRouteType1LabelCType); i { case 0: return &v.state @@ -148851,7 +171850,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[935].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1097].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathObjectsCustomTypeCounter); i { case 0: return &v.state @@ -148863,7 +171862,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[936].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1098].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathObjectsCustomType); i { case 0: return &v.state @@ -148875,7 +171874,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[937].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1099].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Version); i { case 0: return &v.state @@ -148887,7 +171886,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[938].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1100].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Success); i { case 0: return &v.state @@ -148899,8 +171898,152 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[939].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Failure); i { + file_otg_proto_msgTypes[1101].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Failure); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1102].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1103].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1104].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1105].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1106].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1107].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetControlStateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1108].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetControlStateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1109].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetControlActionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1110].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetControlActionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1111].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMetricsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1112].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMetricsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1113].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStatesRequest); i { case 0: return &v.state case 1: @@ -148911,8 +172054,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[940].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetConfigRequest); i { + file_otg_proto_msgTypes[1114].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStatesResponse); i { case 0: return &v.state case 1: @@ -148923,8 +172066,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[941].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateConfigRequest); i { + file_otg_proto_msgTypes[1115].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCaptureRequest); i { case 0: return &v.state case 1: @@ -148935,8 +172078,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[942].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetConfigResponse); i { + file_otg_proto_msgTypes[1116].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCaptureResponse); i { case 0: return &v.state case 1: @@ -148947,8 +172090,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[943].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConfigResponse); i { + file_otg_proto_msgTypes[1117].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVersionResponse); i { case 0: return &v.state case 1: @@ -148959,8 +172102,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[944].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateConfigResponse); i { + file_otg_proto_msgTypes[1118].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LagProtocol_Choice); i { case 0: return &v.state case 1: @@ -148971,8 +172114,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[945].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetControlStateRequest); i { + file_otg_proto_msgTypes[1119].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LagPortLacp_ActorActivity); i { case 0: return &v.state case 1: @@ -148983,8 +172126,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[946].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetControlStateResponse); i { + file_otg_proto_msgTypes[1120].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthernetConnection_Choice); i { case 0: return &v.state case 1: @@ -148995,8 +172138,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[947].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetControlActionRequest); i { + file_otg_proto_msgTypes[1121].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthernetSimulatedLink_LinkType); i { case 0: return &v.state case 1: @@ -149007,8 +172150,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[948].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetControlActionResponse); i { + file_otg_proto_msgTypes[1122].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceVlan_Tpid); i { case 0: return &v.state case 1: @@ -149019,8 +172162,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[949].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMetricsRequest); i { + file_otg_proto_msgTypes[1123].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceIpv4GatewayMAC_Choice); i { case 0: return &v.state case 1: @@ -149031,8 +172174,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[950].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMetricsResponse); i { + file_otg_proto_msgTypes[1124].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceIpv6GatewayMAC_Choice); i { case 0: return &v.state case 1: @@ -149043,8 +172186,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[951].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetStatesRequest); i { + file_otg_proto_msgTypes[1125].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceDhcpv4Client_Choice); i { case 0: return &v.state case 1: @@ -149055,8 +172198,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[952].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetStatesResponse); i { + file_otg_proto_msgTypes[1126].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceDhcpv6ClientIaType_Choice); i { case 0: return &v.state case 1: @@ -149067,8 +172210,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[953].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCaptureRequest); i { + file_otg_proto_msgTypes[1127].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceDhcpv6ClientDuidType_Choice); i { case 0: return &v.state case 1: @@ -149079,8 +172222,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[954].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCaptureResponse); i { + file_otg_proto_msgTypes[1128].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsServerIdentifier_Choice); i { case 0: return &v.state case 1: @@ -149091,8 +172234,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[955].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetVersionResponse); i { + file_otg_proto_msgTypes[1129].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsDuidUuidVersion_Choice); i { case 0: return &v.state case 1: @@ -149103,8 +172246,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[956].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LagProtocol_Choice); i { + file_otg_proto_msgTypes[1130].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsDuidUuidVariant_Choice); i { case 0: return &v.state case 1: @@ -149115,8 +172258,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[957].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LagPortLacp_ActorActivity); i { + file_otg_proto_msgTypes[1131].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsOptionsRequest_Choice); i { case 0: return &v.state case 1: @@ -149127,8 +172270,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[958].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthernetConnection_Choice); i { + file_otg_proto_msgTypes[1132].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsIncludedMessages_Choice); i { case 0: return &v.state case 1: @@ -149139,8 +172282,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[959].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceVlan_Tpid); i { + file_otg_proto_msgTypes[1133].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientOptionsMessageType_Choice); i { case 0: return &v.state case 1: @@ -149151,8 +172294,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[960].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceIpv4GatewayMAC_Choice); i { + file_otg_proto_msgTypes[1134].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerOptionsIncludedMessages_Choice); i { case 0: return &v.state case 1: @@ -149163,8 +172306,8 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[961].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceIpv6GatewayMAC_Choice); i { + file_otg_proto_msgTypes[1135].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerOptionsMessageType_Choice); i { case 0: return &v.state case 1: @@ -149175,7 +172318,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[962].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1136].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Layer1_Speed); i { case 0: return &v.state @@ -149187,7 +172330,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[963].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1137].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Layer1_Media); i { case 0: return &v.state @@ -149199,7 +172342,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[964].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1138].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Layer1FlowControl_Choice); i { case 0: return &v.state @@ -149211,7 +172354,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[965].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1139].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Capture_Format); i { case 0: return &v.state @@ -149223,7 +172366,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[966].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1140].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CaptureFilter_Choice); i { case 0: return &v.state @@ -149235,7 +172378,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[967].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1141].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisInterface_NetworkType); i { case 0: return &v.state @@ -149247,7 +172390,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[968].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1142].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisInterface_LevelType); i { case 0: return &v.state @@ -149259,7 +172402,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[969].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1143].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisInterfaceAuthentication_AuthType); i { case 0: return &v.state @@ -149271,7 +172414,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[970].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1144].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisAuthenticationBase_AuthType); i { case 0: return &v.state @@ -149283,7 +172426,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[971].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1145].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisV4RouteRange_OriginType); i { case 0: return &v.state @@ -149295,7 +172438,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[972].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1146].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisV4RouteRange_RedistributionType); i { case 0: return &v.state @@ -149307,7 +172450,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[973].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1147].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisV6RouteRange_OriginType); i { case 0: return &v.state @@ -149319,7 +172462,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[974].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1148].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisV6RouteRange_RedistributionType); i { case 0: return &v.state @@ -149331,7 +172474,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[975].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1149].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeviceBgpMessageHeaderError_Subcode); i { case 0: return &v.state @@ -149343,7 +172486,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[976].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1150].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeviceBgpOpenMessageError_Subcode); i { case 0: return &v.state @@ -149355,7 +172498,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[977].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1151].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeviceBgpUpdateMessageError_Subcode); i { case 0: return &v.state @@ -149367,7 +172510,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[978].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1152].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeviceBgpCeaseError_Subcode); i { case 0: return &v.state @@ -149379,7 +172522,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[979].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1153].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpV4Peer_AsType); i { case 0: return &v.state @@ -149391,7 +172534,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[980].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1154].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpV4Peer_AsNumberWidth); i { case 0: return &v.state @@ -149403,7 +172546,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[981].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1155].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpV4EthernetSegment_ActiveMode); i { case 0: return &v.state @@ -149415,7 +172558,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[982].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1156].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpRouteAdvanced_Origin); i { case 0: return &v.state @@ -149427,7 +172570,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[983].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1157].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpCommunity_Type); i { case 0: return &v.state @@ -149439,7 +172582,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[984].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1158].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpExtCommunity_Type); i { case 0: return &v.state @@ -149451,7 +172594,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[985].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1159].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpExtCommunity_Subtype); i { case 0: return &v.state @@ -149463,7 +172606,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[986].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1160].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpAsPath_AsSetMode); i { case 0: return &v.state @@ -149475,7 +172618,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[987].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1161].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpAsPathSegment_Type); i { case 0: return &v.state @@ -149487,7 +172630,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[988].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1162].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpV4EvpnEvis_Choice); i { case 0: return &v.state @@ -149499,7 +172642,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[989].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1163].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpV4EviVxlan_ReplicationType); i { case 0: return &v.state @@ -149511,7 +172654,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[990].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1164].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpRouteDistinguisher_RdType); i { case 0: return &v.state @@ -149523,7 +172666,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[991].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1165].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpRouteTarget_RtType); i { case 0: return &v.state @@ -149535,7 +172678,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[992].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1166].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpV4RouteRange_NextHopMode); i { case 0: return &v.state @@ -149547,7 +172690,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[993].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1167].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpV4RouteRange_NextHopAddressType); i { case 0: return &v.state @@ -149559,7 +172702,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[994].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1168].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpExtendedCommunity_Choice); i { case 0: return &v.state @@ -149571,7 +172714,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[995].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1169].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpExtendedCommunityTransitive2OctetAsType_Choice); i { case 0: return &v.state @@ -149583,7 +172726,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[996].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1170].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpExtendedCommunityTransitiveIpv4AddressType_Choice); i { case 0: return &v.state @@ -149595,7 +172738,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[997].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1171].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpExtendedCommunityTransitive4OctetAsType_Choice); i { case 0: return &v.state @@ -149607,7 +172750,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[998].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1172].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpExtendedCommunityTransitiveOpaqueType_Choice); i { case 0: return &v.state @@ -149619,7 +172762,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[999].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1173].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpExtendedCommunityTransitiveEvpnType_Choice); i { case 0: return &v.state @@ -149631,7 +172774,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1000].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1174].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpExtendedCommunityNonTransitive2OctetAsType_Choice); i { case 0: return &v.state @@ -149643,7 +172786,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1001].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1175].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpV6RouteRange_NextHopMode); i { case 0: return &v.state @@ -149655,7 +172798,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1002].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1176].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpV6RouteRange_NextHopAddressType); i { case 0: return &v.state @@ -149667,7 +172810,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1003].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1177].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpSrteV4Policy_NextHopMode); i { case 0: return &v.state @@ -149679,7 +172822,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1004].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1178].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpSrteV4Policy_NextHopAddressType); i { case 0: return &v.state @@ -149691,7 +172834,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1005].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1179].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpSrteRemoteEndpointSubTlv_AddressFamily); i { case 0: return &v.state @@ -149703,7 +172846,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1006].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1180].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpSrteBindingSubTlv_BindingSidType); i { case 0: return &v.state @@ -149715,7 +172858,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1007].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1181].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpSrteExplicitNullLabelPolicySubTlv_ExplicitNullLabelPolicy); i { case 0: return &v.state @@ -149727,7 +172870,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1008].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1182].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpSrteSegment_SegmentType); i { case 0: return &v.state @@ -149739,7 +172882,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1009].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1183].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpSrteV6Policy_NextHopMode); i { case 0: return &v.state @@ -149751,7 +172894,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1010].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1184].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpSrteV6Policy_NextHopAddressType); i { case 0: return &v.state @@ -149763,7 +172906,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1011].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1185].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpUpdateReplay_Choice); i { case 0: return &v.state @@ -149775,7 +172918,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1012].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1186].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpAttributes_Origin); i { case 0: return &v.state @@ -149787,7 +172930,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1013].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1187].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpAttributesAsPath_Choice); i { case 0: return &v.state @@ -149799,7 +172942,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1014].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1188].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpAttributesFourByteAsPathSegment_Type); i { case 0: return &v.state @@ -149811,7 +172954,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1015].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1189].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpAttributesTwoByteAsPathSegment_Type); i { case 0: return &v.state @@ -149823,7 +172966,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1016].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1190].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpAttributesAggregator_Choice); i { case 0: return &v.state @@ -149835,7 +172978,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1017].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1191].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpAttributesCommunity_Choice); i { case 0: return &v.state @@ -149847,7 +172990,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1018].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1192].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpAttributesNextHop_Choice); i { case 0: return &v.state @@ -149859,7 +173002,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1019].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1193].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpAttributesMpReachNlri_Choice); i { case 0: return &v.state @@ -149871,7 +173014,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1020].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1194].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpAttributesMpUnreachNlri_Choice); i { case 0: return &v.state @@ -149883,7 +173026,55 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1021].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1195].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesTunnelEncapsulation_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1196].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesBsid_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1197].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSrPolicyExplicitNullPolicy_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1198].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BgpAttributesSegmentRoutingPolicySegmentListSegment_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1199].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpV6Peer_AsType); i { case 0: return &v.state @@ -149895,7 +173086,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1022].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1200].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpV6Peer_AsNumberWidth); i { case 0: return &v.state @@ -149907,7 +173098,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1023].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1201].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpV6EthernetSegment_ActiveMode); i { case 0: return &v.state @@ -149919,7 +173110,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1024].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1202].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpV6EvpnEvis_Choice); i { case 0: return &v.state @@ -149931,7 +173122,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1025].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1203].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpV6EviVxlan_ReplicationType); i { case 0: return &v.state @@ -149943,7 +173134,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1026].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1204].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VxlanV4TunnelDestinationIPMode_Choice); i { case 0: return &v.state @@ -149955,7 +173146,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1027].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1205].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VxlanV6TunnelDestinationIPMode_Choice); i { case 0: return &v.state @@ -149967,7 +173158,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1028].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1206].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle); i { case 0: return &v.state @@ -149979,7 +173170,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1029].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1207].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RsvpEro_PrependNeighborIp); i { case 0: return &v.state @@ -149991,7 +173182,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1030].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1208].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RsvpEroSubobject_Type); i { case 0: return &v.state @@ -150003,7 +173194,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1031].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1209].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RsvpEroSubobject_HopType); i { case 0: return &v.state @@ -150015,7 +173206,79 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1032].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1210].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerIaType_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1211].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2RouterId_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1212].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2InterfaceArea_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1213].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2InterfaceNetworkType_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1214].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2InterfaceAuthentication_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1215].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2V4RRRouteOrigin_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1216].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowTxRx_Choice); i { case 0: return &v.state @@ -150027,7 +173290,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1033].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1217].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRouter_Mode); i { case 0: return &v.state @@ -150039,7 +173302,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1034].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1218].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowHeader_Choice); i { case 0: return &v.state @@ -150051,7 +173314,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1035].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1219].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowIpv4Options_Choice); i { case 0: return &v.state @@ -150063,7 +173326,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1036].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1220].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowIpv4OptionsCustomLength_Choice); i { case 0: return &v.state @@ -150075,7 +173338,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1037].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1221].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowIpv4Priority_Choice); i { case 0: return &v.state @@ -150087,7 +173350,31 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1038].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1222].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIpv4Auto_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1223].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowIpv6Auto_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1224].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowIcmp_Choice); i { case 0: return &v.state @@ -150099,7 +173386,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1039].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1225].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowIcmpv6_Choice); i { case 0: return &v.state @@ -150111,7 +173398,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1040].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1226].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowSnmpv2CData_Choice); i { case 0: return &v.state @@ -150123,7 +173410,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1041].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1227].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowSnmpv2CPDU_ErrorStatus); i { case 0: return &v.state @@ -150135,7 +173422,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1042].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1228].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowSnmpv2CVariableBindingValue_Choice); i { case 0: return &v.state @@ -150147,7 +173434,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1043].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1229].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowSnmpv2CVariableBindingStringValue_Choice); i { case 0: return &v.state @@ -150159,7 +173446,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1044].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1230].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRsvp_Flag); i { case 0: return &v.state @@ -150171,7 +173458,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1045].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1231].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPLength_Choice); i { case 0: return &v.state @@ -150183,7 +173470,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1046].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1232].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPMessage_Choice); i { case 0: return &v.state @@ -150195,7 +173482,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1047].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1233].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPObjectLength_Choice); i { case 0: return &v.state @@ -150207,7 +173494,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1048].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1234].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPPathObjectsClass_Choice); i { case 0: return &v.state @@ -150219,7 +173506,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1049].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1235].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPPathObjectsSessionCType_Choice); i { case 0: return &v.state @@ -150231,7 +173518,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1050].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1236].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPPathSessionExtTunnelId_Choice); i { case 0: return &v.state @@ -150243,7 +173530,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1051].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1237].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPPathObjectsRsvpHopCType_Choice); i { case 0: return &v.state @@ -150255,7 +173542,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1052].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1238].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPPathObjectsTimeValuesCType_Choice); i { case 0: return &v.state @@ -150267,7 +173554,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1053].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1239].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPPathObjectsClassExplicitRouteCType_Choice); i { case 0: return &v.state @@ -150279,7 +173566,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1054].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1240].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPType1ExplicitRouteSubobjectsType_Choice); i { case 0: return &v.state @@ -150291,7 +173578,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1055].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1241].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPExplicitRouteLength_Choice); i { case 0: return &v.state @@ -150303,7 +173590,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1056].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1242].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPExplicitRouteASNumberLength_Choice); i { case 0: return &v.state @@ -150315,7 +173602,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1057].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1243].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPPathObjectsLabelRequestCType_Choice); i { case 0: return &v.state @@ -150327,7 +173614,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1058].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1244].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPPathObjectsSessionAttributeCType_Choice); i { case 0: return &v.state @@ -150339,7 +173626,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1059].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1245].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPLspTunnelFlag_Choice); i { case 0: return &v.state @@ -150351,7 +173638,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1060].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1246].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPSessionAttributeNameLength_Choice); i { case 0: return &v.state @@ -150363,7 +173650,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1061].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1247].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPPathObjectsSenderTemplateCType_Choice); i { case 0: return &v.state @@ -150375,7 +173662,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1062].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1248].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPPathObjectsSenderTspecCType_Choice); i { case 0: return &v.state @@ -150387,7 +173674,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1063].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1249].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPPathObjectsRecordRouteCType_Choice); i { case 0: return &v.state @@ -150399,7 +173686,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1064].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1250].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPPathObjectsRecordRouteSubObjectType_Choice); i { case 0: return &v.state @@ -150411,7 +173698,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1065].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1251].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPRecordRouteIPv4Flag_Choice); i { case 0: return &v.state @@ -150423,7 +173710,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1066].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1252].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPPathRecordRouteLabel_Choice); i { case 0: return &v.state @@ -150435,7 +173722,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1067].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1253].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRSVPRouteRecordLength_Choice); i { case 0: return &v.state @@ -150447,7 +173734,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1068].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1254].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowSize_Choice); i { case 0: return &v.state @@ -150459,7 +173746,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1069].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1255].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowSizeWeightPairs_Choice); i { case 0: return &v.state @@ -150471,7 +173758,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1070].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1256].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowSizeWeightPairs_Predefined); i { case 0: return &v.state @@ -150483,7 +173770,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1071].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1257].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRate_Choice); i { case 0: return &v.state @@ -150495,7 +173782,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1072].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1258].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowDuration_Choice); i { case 0: return &v.state @@ -150507,7 +173794,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1073].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1259].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowDelay_Choice); i { case 0: return &v.state @@ -150519,7 +173806,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1074].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1260].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowDurationInterBurstGap_Choice); i { case 0: return &v.state @@ -150531,7 +173818,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1075].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1261].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowLatencyMetrics_Mode); i { case 0: return &v.state @@ -150543,7 +173830,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1076].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1262].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowRxTxRatio_Choice); i { case 0: return &v.state @@ -150555,7 +173842,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1077].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1263].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EventRequest_Type); i { case 0: return &v.state @@ -150567,7 +173854,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1078].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1264].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LldpConnection_Choice); i { case 0: return &v.state @@ -150579,7 +173866,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1079].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1265].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LldpChassisId_Choice); i { case 0: return &v.state @@ -150591,7 +173878,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1080].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1266].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LldpPortId_Choice); i { case 0: return &v.state @@ -150603,7 +173890,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1081].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1267].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LldpChassisMacSubType_Choice); i { case 0: return &v.state @@ -150615,7 +173902,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1082].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1268].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LldpPortInterfaceNameSubType_Choice); i { case 0: return &v.state @@ -150627,7 +173914,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1083].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1269].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LldpSystemName_Choice); i { case 0: return &v.state @@ -150639,7 +173926,19 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1084].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1270].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LldpOrgInfoType_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1271].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Error_Kind); i { case 0: return &v.state @@ -150651,7 +173950,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1085].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1272].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ConfigUpdate_Choice); i { case 0: return &v.state @@ -150663,7 +173962,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1086].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1273].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowsUpdate_PropertyNames); i { case 0: return &v.state @@ -150675,7 +173974,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1087].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1274].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ControlState_Choice); i { case 0: return &v.state @@ -150687,7 +173986,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1088].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1275].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatePort_Choice); i { case 0: return &v.state @@ -150699,7 +173998,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1089].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1276].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateTraffic_Choice); i { case 0: return &v.state @@ -150711,7 +174010,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1090].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1277].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateProtocol_Choice); i { case 0: return &v.state @@ -150723,7 +174022,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1091].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1278].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatePortLink_State); i { case 0: return &v.state @@ -150735,7 +174034,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1092].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1279].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatePortCapture_State); i { case 0: return &v.state @@ -150747,7 +174046,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1093].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1280].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateTrafficFlowTransmit_State); i { case 0: return &v.state @@ -150759,7 +174058,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1094].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1281].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateProtocolAll_State); i { case 0: return &v.state @@ -150771,7 +174070,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1095].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1282].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateProtocolRoute_State); i { case 0: return &v.state @@ -150783,7 +174082,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1096].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1283].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateProtocolLacp_Choice); i { case 0: return &v.state @@ -150795,7 +174094,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1097].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1284].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateProtocolLacpAdmin_State); i { case 0: return &v.state @@ -150807,7 +174106,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1098].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1285].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateProtocolLacpMemberPorts_State); i { case 0: return &v.state @@ -150819,7 +174118,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1099].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1286].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateProtocolBgp_Choice); i { case 0: return &v.state @@ -150831,7 +174130,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1100].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1287].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateProtocolBgpPeers_State); i { case 0: return &v.state @@ -150843,7 +174142,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1101].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1288].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateProtocolIsis_Choice); i { case 0: return &v.state @@ -150855,7 +174154,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1102].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1289].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateProtocolIsisRouters_State); i { case 0: return &v.state @@ -150867,7 +174166,31 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1103].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1290].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateProtocolOspfv2_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1291].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateProtocolOspfv2Routers_State); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1292].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ControlAction_Choice); i { case 0: return &v.state @@ -150879,7 +174202,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1104].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1293].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActionResponse_Choice); i { case 0: return &v.state @@ -150891,7 +174214,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1105].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1294].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActionProtocol_Choice); i { case 0: return &v.state @@ -150903,7 +174226,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1106].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1295].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActionResponseProtocol_Choice); i { case 0: return &v.state @@ -150915,7 +174238,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1107].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1296].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActionProtocolIpv4_Choice); i { case 0: return &v.state @@ -150927,7 +174250,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1108].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1297].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActionResponseProtocolIpv4_Choice); i { case 0: return &v.state @@ -150939,7 +174262,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1109].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1298].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActionResponseProtocolIpv4PingResponse_Result); i { case 0: return &v.state @@ -150951,7 +174274,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1110].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1299].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActionProtocolIpv6_Choice); i { case 0: return &v.state @@ -150963,7 +174286,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1111].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1300].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActionResponseProtocolIpv6_Choice); i { case 0: return &v.state @@ -150975,7 +174298,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1112].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1301].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActionResponseProtocolIpv6PingResponse_Result); i { case 0: return &v.state @@ -150987,7 +174310,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1113].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1302].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActionProtocolBgp_Choice); i { case 0: return &v.state @@ -150999,7 +174322,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1114].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1303].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ActionProtocolBgpNotification_Choice); i { case 0: return &v.state @@ -151011,7 +174334,19 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1115].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1304].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActionProtocolBgpGracefulRestartNotification_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1305].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MetricsRequest_Choice); i { case 0: return &v.state @@ -151023,7 +174358,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1116].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1306].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MetricsResponse_Choice); i { case 0: return &v.state @@ -151035,7 +174370,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1117].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1307].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PortMetricsRequest_ColumnNames); i { case 0: return &v.state @@ -151047,7 +174382,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1118].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1308].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PortMetric_Link); i { case 0: return &v.state @@ -151059,7 +174394,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1119].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1309].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PortMetric_Capture); i { case 0: return &v.state @@ -151071,7 +174406,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1120].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1310].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PortMetric_Transmit); i { case 0: return &v.state @@ -151083,7 +174418,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1121].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1311].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowMetricsRequest_MetricNames); i { case 0: return &v.state @@ -151095,7 +174430,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1122].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1312].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowTaggedMetricsFilter_MetricNames); i { case 0: return &v.state @@ -151107,7 +174442,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1123].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1313].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowMetric_Transmit); i { case 0: return &v.state @@ -151119,7 +174454,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1124].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1314].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlowMetricTagValue_Choice); i { case 0: return &v.state @@ -151131,7 +174466,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1125].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1315].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Bgpv4MetricsRequest_ColumnNames); i { case 0: return &v.state @@ -151143,7 +174478,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1126].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1316].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Bgpv4Metric_SessionState); i { case 0: return &v.state @@ -151155,7 +174490,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1127].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1317].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Bgpv4Metric_FsmState); i { case 0: return &v.state @@ -151167,7 +174502,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1128].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1318].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Bgpv6MetricsRequest_ColumnNames); i { case 0: return &v.state @@ -151179,7 +174514,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1129].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1319].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Bgpv6Metric_SessionState); i { case 0: return &v.state @@ -151191,7 +174526,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1130].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1320].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Bgpv6Metric_FsmState); i { case 0: return &v.state @@ -151203,7 +174538,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1131].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1321].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisMetricsRequest_ColumnNames); i { case 0: return &v.state @@ -151215,7 +174550,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1132].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1322].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LagMetricsRequest_ColumnNames); i { case 0: return &v.state @@ -151227,7 +174562,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1133].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1323].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LagMetric_OperStatus); i { case 0: return &v.state @@ -151239,7 +174574,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1134].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1324].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LacpMetricsRequest_ColumnNames); i { case 0: return &v.state @@ -151251,7 +174586,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1135].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1325].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LacpMetric_Activity); i { case 0: return &v.state @@ -151263,7 +174598,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1136].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1326].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LacpMetric_Timeout); i { case 0: return &v.state @@ -151275,7 +174610,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1137].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1327].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LacpMetric_Synchronization); i { case 0: return &v.state @@ -151287,7 +174622,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1138].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1328].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LldpMetricsRequest_ColumnNames); i { case 0: return &v.state @@ -151299,7 +174634,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1139].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1329].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RsvpMetricsRequest_ColumnNames); i { case 0: return &v.state @@ -151311,7 +174646,67 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1140].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1330].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv4ClientMetricsRequest_ColumnNames); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1331].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv4ServerMetricsRequest_ColumnNames); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1332].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ClientMetricsRequest_ColumnNames); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1333].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dhcpv6ServerMetricsRequest_ColumnNames); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1334].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2MetricsRequest_ColumnNames); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1335].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatesRequest_Choice); i { case 0: return &v.state @@ -151323,7 +174718,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1141].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1336].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatesResponse_Choice); i { case 0: return &v.state @@ -151335,7 +174730,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1142].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1337].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpPrefixStateRequest_PrefixFilters); i { case 0: return &v.state @@ -151347,7 +174742,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1143].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1338].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpPrefixIpv4UnicastFilter_Origin); i { case 0: return &v.state @@ -151359,7 +174754,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1144].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1339].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpPrefixIpv6UnicastFilter_Origin); i { case 0: return &v.state @@ -151371,7 +174766,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1145].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1340].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpPrefixIpv4UnicastState_Origin); i { case 0: return &v.state @@ -151383,7 +174778,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1146].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1341].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BgpPrefixIpv6UnicastState_Origin); i { case 0: return &v.state @@ -151395,7 +174790,79 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1147].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1342].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityStructured_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1343].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitive2OctetAsType_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1344].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitiveIpv4AddressType_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1345].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitive4OctetAsType_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1346].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityTransitiveOpaqueType_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1347].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResultExtendedCommunityNonTransitive2OctetAsType_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1348].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResultBgpCommunity_Type); i { case 0: return &v.state @@ -151407,7 +174874,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1148].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1349].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResultBgpAsPathSegment_Type); i { case 0: return &v.state @@ -151419,7 +174886,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1149].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1350].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisLspState_PduType); i { case 0: return &v.state @@ -151431,7 +174898,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1150].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1351].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisLspV4Prefix_RedistributionType); i { case 0: return &v.state @@ -151443,7 +174910,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1151].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1352].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisLspV4Prefix_OriginType); i { case 0: return &v.state @@ -151455,7 +174922,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1152].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1353].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisLspExtendedV4Prefix_RedistributionType); i { case 0: return &v.state @@ -151467,7 +174934,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1153].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1354].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisLspV6Prefix_RedistributionType); i { case 0: return &v.state @@ -151479,7 +174946,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1154].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1355].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IsisLspV6Prefix_OriginType); i { case 0: return &v.state @@ -151491,7 +174958,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1155].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1356].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LldpNeighborsState_ChassisIdType); i { case 0: return &v.state @@ -151503,7 +174970,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1156].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1357].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LldpNeighborsState_PortIdType); i { case 0: return &v.state @@ -151515,7 +174982,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1157].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1358].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LldpCapabilityState_CapabilityName); i { case 0: return &v.state @@ -151527,7 +174994,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1158].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1359].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RsvpLspState_SessionStatus); i { case 0: return &v.state @@ -151539,7 +175006,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1159].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1360].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RsvpLspState_LastFlapReason); i { case 0: return &v.state @@ -151551,7 +175018,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1160].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1361].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RsvpLspIpv4Ero_Type); i { case 0: return &v.state @@ -151563,7 +175030,31 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1161].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1362].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2OpaqueLsa_Type); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1363].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ospfv2Link_Type); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1364].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetDst_Choice); i { case 0: return &v.state @@ -151575,7 +175066,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1162].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1365].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetSrc_Choice); i { case 0: return &v.state @@ -151587,7 +175078,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1163].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1366].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetEtherType_Choice); i { case 0: return &v.state @@ -151599,7 +175090,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1164].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1367].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPfcQueue_Choice); i { case 0: return &v.state @@ -151611,7 +175102,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1165].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1368].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanPriority_Choice); i { case 0: return &v.state @@ -151623,7 +175114,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1166].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1369].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanCfi_Choice); i { case 0: return &v.state @@ -151635,7 +175126,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1167].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1370].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanId_Choice); i { case 0: return &v.state @@ -151647,7 +175138,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1168].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1371].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVlanTpid_Choice); i { case 0: return &v.state @@ -151659,7 +175150,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1169].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1372].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanFlags_Choice); i { case 0: return &v.state @@ -151671,7 +175162,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1170].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1373].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanReserved0_Choice); i { case 0: return &v.state @@ -151683,7 +175174,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1171].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1374].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanVni_Choice); i { case 0: return &v.state @@ -151695,7 +175186,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1172].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1375].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowVxlanReserved1_Choice); i { case 0: return &v.state @@ -151707,7 +175198,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1173].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1376].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4Version_Choice); i { case 0: return &v.state @@ -151719,7 +175210,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1174].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1377].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4HeaderLength_Choice); i { case 0: return &v.state @@ -151731,7 +175222,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1175].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1378].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TotalLength_Choice); i { case 0: return &v.state @@ -151743,7 +175234,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1176].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1379].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4Identification_Choice); i { case 0: return &v.state @@ -151755,7 +175246,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1177].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1380].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4Reserved_Choice); i { case 0: return &v.state @@ -151767,7 +175258,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1178].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1381].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4DontFragment_Choice); i { case 0: return &v.state @@ -151779,7 +175270,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1179].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1382].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4MoreFragments_Choice); i { case 0: return &v.state @@ -151791,7 +175282,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1180].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1383].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4FragmentOffset_Choice); i { case 0: return &v.state @@ -151803,7 +175294,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1181].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1384].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TimeToLive_Choice); i { case 0: return &v.state @@ -151815,7 +175306,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1182].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1385].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4Protocol_Choice); i { case 0: return &v.state @@ -151827,7 +175318,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1183].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1386].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4HeaderChecksum_Choice); i { case 0: return &v.state @@ -151839,7 +175330,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1184].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1387].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4HeaderChecksum_Generated); i { case 0: return &v.state @@ -151851,7 +175342,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1185].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1388].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4Src_Choice); i { case 0: return &v.state @@ -151863,7 +175354,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1186].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1389].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4Dst_Choice); i { case 0: return &v.state @@ -151875,7 +175366,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1187].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1390].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice); i { case 0: return &v.state @@ -151887,7 +175378,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1188].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1391].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4OptionsCustomTypeOptionClass_Choice); i { case 0: return &v.state @@ -151899,7 +175390,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1189].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1392].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice); i { case 0: return &v.state @@ -151911,7 +175402,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1190].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1393].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4PriorityRaw_Choice); i { case 0: return &v.state @@ -151923,7 +175414,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1191].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1394].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4DscpPhb_Choice); i { case 0: return &v.state @@ -151935,7 +175426,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1192].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1395].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4DscpEcn_Choice); i { case 0: return &v.state @@ -151947,7 +175438,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1193].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1396].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosPrecedence_Choice); i { case 0: return &v.state @@ -151959,7 +175450,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1194].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1397].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosDelay_Choice); i { case 0: return &v.state @@ -151971,7 +175462,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1195].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1398].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosThroughput_Choice); i { case 0: return &v.state @@ -151983,7 +175474,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1196].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1399].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosReliability_Choice); i { case 0: return &v.state @@ -151995,7 +175486,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1197].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1400].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosMonetary_Choice); i { case 0: return &v.state @@ -152007,7 +175498,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1198].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1401].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv4TosUnused_Choice); i { case 0: return &v.state @@ -152019,7 +175510,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1199].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1402].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6Version_Choice); i { case 0: return &v.state @@ -152031,7 +175522,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1200].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1403].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6TrafficClass_Choice); i { case 0: return &v.state @@ -152043,7 +175534,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1201].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1404].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6FlowLabel_Choice); i { case 0: return &v.state @@ -152055,7 +175546,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1202].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1405].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6PayloadLength_Choice); i { case 0: return &v.state @@ -152067,7 +175558,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1203].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1406].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6NextHeader_Choice); i { case 0: return &v.state @@ -152079,7 +175570,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1204].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1407].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6HopLimit_Choice); i { case 0: return &v.state @@ -152091,7 +175582,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1205].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1408].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6Src_Choice); i { case 0: return &v.state @@ -152103,7 +175594,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1206].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1409].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIpv6Dst_Choice); i { case 0: return &v.state @@ -152115,7 +175606,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1207].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1410].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseDst_Choice); i { case 0: return &v.state @@ -152127,7 +175618,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1208].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1411].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseSrc_Choice); i { case 0: return &v.state @@ -152139,7 +175630,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1209].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1412].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseEtherType_Choice); i { case 0: return &v.state @@ -152151,7 +175642,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1210].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1413].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseControlOpCode_Choice); i { case 0: return &v.state @@ -152163,7 +175654,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1211].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1414].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPauseClassEnableVector_Choice); i { case 0: return &v.state @@ -152175,7 +175666,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1212].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1415].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass0_Choice); i { case 0: return &v.state @@ -152187,7 +175678,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1213].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1416].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass1_Choice); i { case 0: return &v.state @@ -152199,7 +175690,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1214].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1417].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass2_Choice); i { case 0: return &v.state @@ -152211,7 +175702,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1215].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1418].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass3_Choice); i { case 0: return &v.state @@ -152223,7 +175714,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1216].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1419].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass4_Choice); i { case 0: return &v.state @@ -152235,7 +175726,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1217].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1420].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass5_Choice); i { case 0: return &v.state @@ -152247,7 +175738,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1218].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1421].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass6_Choice); i { case 0: return &v.state @@ -152259,7 +175750,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1219].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1422].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPfcPausePauseClass7_Choice); i { case 0: return &v.state @@ -152271,7 +175762,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1220].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1423].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseDst_Choice); i { case 0: return &v.state @@ -152283,7 +175774,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1221].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1424].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseSrc_Choice); i { case 0: return &v.state @@ -152295,7 +175786,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1222].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1425].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseEtherType_Choice); i { case 0: return &v.state @@ -152307,7 +175798,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1223].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1426].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseControlOpCode_Choice); i { case 0: return &v.state @@ -152319,7 +175810,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1224].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1427].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowEthernetPauseTime_Choice); i { case 0: return &v.state @@ -152331,7 +175822,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1225].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1428].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpSrcPort_Choice); i { case 0: return &v.state @@ -152343,7 +175834,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1226].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1429].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpDstPort_Choice); i { case 0: return &v.state @@ -152355,7 +175846,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1227].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1430].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpSeqNum_Choice); i { case 0: return &v.state @@ -152367,7 +175858,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1228].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1431].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpAckNum_Choice); i { case 0: return &v.state @@ -152379,7 +175870,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1229].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1432].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpDataOffset_Choice); i { case 0: return &v.state @@ -152391,7 +175882,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1230].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1433].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpEcnNs_Choice); i { case 0: return &v.state @@ -152403,7 +175894,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1231].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1434].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpEcnCwr_Choice); i { case 0: return &v.state @@ -152415,7 +175906,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1232].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1435].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpEcnEcho_Choice); i { case 0: return &v.state @@ -152427,7 +175918,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1233].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1436].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlUrg_Choice); i { case 0: return &v.state @@ -152439,7 +175930,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1234].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1437].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlAck_Choice); i { case 0: return &v.state @@ -152451,7 +175942,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1235].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1438].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlPsh_Choice); i { case 0: return &v.state @@ -152463,7 +175954,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1236].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1439].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlRst_Choice); i { case 0: return &v.state @@ -152475,7 +175966,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1237].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1440].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlSyn_Choice); i { case 0: return &v.state @@ -152487,7 +175978,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1238].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1441].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpCtlFin_Choice); i { case 0: return &v.state @@ -152499,7 +175990,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1239].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1442].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowTcpWindow_Choice); i { case 0: return &v.state @@ -152511,7 +176002,31 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1240].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1443].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatternFlowTcpChecksum_Choice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1444].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatternFlowTcpChecksum_Generated); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_otg_proto_msgTypes[1445].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpSrcPort_Choice); i { case 0: return &v.state @@ -152523,7 +176038,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1241].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1446].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpDstPort_Choice); i { case 0: return &v.state @@ -152535,7 +176050,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1242].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1447].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpLength_Choice); i { case 0: return &v.state @@ -152547,7 +176062,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1243].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1448].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpChecksum_Choice); i { case 0: return &v.state @@ -152559,7 +176074,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1244].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1449].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowUdpChecksum_Generated); i { case 0: return &v.state @@ -152571,7 +176086,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1245].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1450].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreChecksumPresent_Choice); i { case 0: return &v.state @@ -152583,7 +176098,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1246].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1451].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreReserved0_Choice); i { case 0: return &v.state @@ -152595,7 +176110,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1247].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1452].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreVersion_Choice); i { case 0: return &v.state @@ -152607,7 +176122,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1248].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1453].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreProtocol_Choice); i { case 0: return &v.state @@ -152619,7 +176134,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1249].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1454].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreChecksum_Choice); i { case 0: return &v.state @@ -152631,7 +176146,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1250].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1455].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreChecksum_Generated); i { case 0: return &v.state @@ -152643,7 +176158,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1251].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1456].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGreReserved1_Choice); i { case 0: return &v.state @@ -152655,7 +176170,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1252].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1457].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1Version_Choice); i { case 0: return &v.state @@ -152667,7 +176182,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1253].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1458].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1ProtocolType_Choice); i { case 0: return &v.state @@ -152679,7 +176194,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1254].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1459].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1Reserved_Choice); i { case 0: return &v.state @@ -152691,7 +176206,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1255].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1460].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1EFlag_Choice); i { case 0: return &v.state @@ -152703,7 +176218,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1256].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1461].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1SFlag_Choice); i { case 0: return &v.state @@ -152715,7 +176230,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1257].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1462].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1PnFlag_Choice); i { case 0: return &v.state @@ -152727,7 +176242,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1258].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1463].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1MessageType_Choice); i { case 0: return &v.state @@ -152739,7 +176254,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1259].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1464].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1MessageLength_Choice); i { case 0: return &v.state @@ -152751,7 +176266,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1260].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1465].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1Teid_Choice); i { case 0: return &v.state @@ -152763,7 +176278,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1261].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1466].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1SquenceNumber_Choice); i { case 0: return &v.state @@ -152775,7 +176290,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1262].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1467].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1NPduNumber_Choice); i { case 0: return &v.state @@ -152787,7 +176302,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1263].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1468].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv1NextExtensionHeaderType_Choice); i { case 0: return &v.state @@ -152799,7 +176314,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1264].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1469].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpExtensionExtensionLength_Choice); i { case 0: return &v.state @@ -152811,7 +176326,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1265].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1470].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpExtensionContents_Choice); i { case 0: return &v.state @@ -152823,7 +176338,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1266].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1471].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpExtensionNextExtensionHeader_Choice); i { case 0: return &v.state @@ -152835,7 +176350,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1267].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1472].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2Version_Choice); i { case 0: return &v.state @@ -152847,7 +176362,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1268].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1473].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2PiggybackingFlag_Choice); i { case 0: return &v.state @@ -152859,7 +176374,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1269].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1474].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2TeidFlag_Choice); i { case 0: return &v.state @@ -152871,7 +176386,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1270].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1475].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2Spare1_Choice); i { case 0: return &v.state @@ -152883,7 +176398,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1271].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1476].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2MessageType_Choice); i { case 0: return &v.state @@ -152895,7 +176410,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1272].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1477].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2MessageLength_Choice); i { case 0: return &v.state @@ -152907,7 +176422,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1273].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1478].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2Teid_Choice); i { case 0: return &v.state @@ -152919,7 +176434,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1274].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1479].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2SequenceNumber_Choice); i { case 0: return &v.state @@ -152931,7 +176446,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1275].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1480].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowGtpv2Spare2_Choice); i { case 0: return &v.state @@ -152943,7 +176458,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1276].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1481].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpHardwareType_Choice); i { case 0: return &v.state @@ -152955,7 +176470,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1277].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1482].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpProtocolType_Choice); i { case 0: return &v.state @@ -152967,7 +176482,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1278].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1483].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpHardwareLength_Choice); i { case 0: return &v.state @@ -152979,7 +176494,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1279].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1484].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpProtocolLength_Choice); i { case 0: return &v.state @@ -152991,7 +176506,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1280].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1485].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpOperation_Choice); i { case 0: return &v.state @@ -153003,7 +176518,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1281].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1486].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpSenderHardwareAddr_Choice); i { case 0: return &v.state @@ -153015,7 +176530,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1282].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1487].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpSenderProtocolAddr_Choice); i { case 0: return &v.state @@ -153027,7 +176542,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1283].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1488].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpTargetHardwareAddr_Choice); i { case 0: return &v.state @@ -153039,7 +176554,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1284].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1489].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowArpTargetProtocolAddr_Choice); i { case 0: return &v.state @@ -153051,7 +176566,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1285].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1490].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoType_Choice); i { case 0: return &v.state @@ -153063,7 +176578,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1286].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1491].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoCode_Choice); i { case 0: return &v.state @@ -153075,7 +176590,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1287].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1492].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoChecksum_Choice); i { case 0: return &v.state @@ -153087,7 +176602,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1288].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1493].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoChecksum_Generated); i { case 0: return &v.state @@ -153099,7 +176614,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1289].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1494].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoIdentifier_Choice); i { case 0: return &v.state @@ -153111,7 +176626,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1290].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1495].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpEchoSequenceNumber_Choice); i { case 0: return &v.state @@ -153123,7 +176638,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1291].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1496].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpCommonChecksum_Choice); i { case 0: return &v.state @@ -153135,7 +176650,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1292].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1497].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpCommonChecksum_Generated); i { case 0: return &v.state @@ -153147,7 +176662,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1293].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1498].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpNextFieldsIdentifier_Choice); i { case 0: return &v.state @@ -153159,7 +176674,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1294].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1499].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpNextFieldsSequenceNumber_Choice); i { case 0: return &v.state @@ -153171,7 +176686,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1295].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1500].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoType_Choice); i { case 0: return &v.state @@ -153183,7 +176698,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1296].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1501].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoCode_Choice); i { case 0: return &v.state @@ -153195,7 +176710,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1297].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1502].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoIdentifier_Choice); i { case 0: return &v.state @@ -153207,7 +176722,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1298].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1503].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoSequenceNumber_Choice); i { case 0: return &v.state @@ -153219,7 +176734,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1299].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1504].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoChecksum_Choice); i { case 0: return &v.state @@ -153231,7 +176746,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1300].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1505].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6EchoChecksum_Generated); i { case 0: return &v.state @@ -153243,7 +176758,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1301].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1506].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6CommonChecksum_Choice); i { case 0: return &v.state @@ -153255,7 +176770,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1302].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1507].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIcmpv6CommonChecksum_Generated); i { case 0: return &v.state @@ -153267,7 +176782,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1303].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1508].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPppAddress_Choice); i { case 0: return &v.state @@ -153279,7 +176794,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1304].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1509].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPppControl_Choice); i { case 0: return &v.state @@ -153291,7 +176806,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1305].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1510].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowPppProtocolType_Choice); i { case 0: return &v.state @@ -153303,7 +176818,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1306].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1511].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1Version_Choice); i { case 0: return &v.state @@ -153315,7 +176830,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1307].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1512].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1Type_Choice); i { case 0: return &v.state @@ -153327,7 +176842,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1308].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1513].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1Unused_Choice); i { case 0: return &v.state @@ -153339,7 +176854,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1309].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1514].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1Checksum_Choice); i { case 0: return &v.state @@ -153351,7 +176866,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1310].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1515].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1Checksum_Generated); i { case 0: return &v.state @@ -153363,7 +176878,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1311].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1516].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowIgmpv1GroupAddress_Choice); i { case 0: return &v.state @@ -153375,7 +176890,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1312].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1517].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsLabel_Choice); i { case 0: return &v.state @@ -153387,7 +176902,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1313].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1518].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsTrafficClass_Choice); i { case 0: return &v.state @@ -153399,7 +176914,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1314].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1519].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsBottomOfStack_Choice); i { case 0: return &v.state @@ -153411,7 +176926,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1315].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1520].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowMplsTimeToLive_Choice); i { case 0: return &v.state @@ -153423,7 +176938,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1316].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1521].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVersion_Choice); i { case 0: return &v.state @@ -153435,7 +176950,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1317].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1522].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CPDURequestId_Choice); i { case 0: return &v.state @@ -153447,7 +176962,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1318].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1523].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CPDUErrorIndex_Choice); i { case 0: return &v.state @@ -153459,7 +176974,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1319].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1524].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CBulkPDURequestId_Choice); i { case 0: return &v.state @@ -153471,7 +176986,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1320].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1525].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice); i { case 0: return &v.state @@ -153483,7 +176998,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1321].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1526].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice); i { case 0: return &v.state @@ -153495,7 +177010,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1322].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1527].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice); i { case 0: return &v.state @@ -153507,7 +177022,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1323].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1528].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice); i { case 0: return &v.state @@ -153519,7 +177034,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1324].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1529].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice); i { case 0: return &v.state @@ -153531,7 +177046,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1325].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1530].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice); i { case 0: return &v.state @@ -153543,7 +177058,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1326].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1531].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice); i { case 0: return &v.state @@ -153555,7 +177070,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1327].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1532].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice); i { case 0: return &v.state @@ -153567,7 +177082,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1328].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1533].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowSnmpv2CCommonRequestId_Choice); i { case 0: return &v.state @@ -153579,7 +177094,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1329].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1534].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRsvpRsvpChecksum_Choice); i { case 0: return &v.state @@ -153591,7 +177106,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1330].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1535].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRsvpRsvpChecksum_Generated); i { case 0: return &v.state @@ -153603,7 +177118,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1331].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1536].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRsvpTimeToLive_Choice); i { case 0: return &v.state @@ -153615,7 +177130,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1332].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1537].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRsvpReserved_Choice); i { case 0: return &v.state @@ -153627,7 +177142,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1333].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1538].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice); i { case 0: return &v.state @@ -153639,7 +177154,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1334].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1539].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice); i { case 0: return &v.state @@ -153651,7 +177166,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1335].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1540].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice); i { case 0: return &v.state @@ -153663,7 +177178,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1336].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1541].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice); i { case 0: return &v.state @@ -153675,7 +177190,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1337].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1542].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice); i { case 0: return &v.state @@ -153687,7 +177202,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1338].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1543].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice); i { case 0: return &v.state @@ -153699,7 +177214,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1339].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1544].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice); i { case 0: return &v.state @@ -153711,7 +177226,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1340].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1545].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice); i { case 0: return &v.state @@ -153723,7 +177238,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1341].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1546].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice); i { case 0: return &v.state @@ -153735,7 +177250,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1342].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1547].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice); i { case 0: return &v.state @@ -153747,7 +177262,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1343].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1548].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice); i { case 0: return &v.state @@ -153759,7 +177274,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1344].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1549].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice); i { case 0: return &v.state @@ -153771,7 +177286,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1345].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1550].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice); i { case 0: return &v.state @@ -153783,7 +177298,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1346].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1551].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice); i { case 0: return &v.state @@ -153795,7 +177310,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1347].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1552].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice); i { case 0: return &v.state @@ -153807,7 +177322,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1348].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1553].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice); i { case 0: return &v.state @@ -153819,7 +177334,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1349].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1554].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServVersion_Choice); i { case 0: return &v.state @@ -153831,7 +177346,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1350].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1555].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServReserved1_Choice); i { case 0: return &v.state @@ -153843,7 +177358,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1351].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1556].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice); i { case 0: return &v.state @@ -153855,7 +177370,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1352].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1557].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice); i { case 0: return &v.state @@ -153867,7 +177382,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1353].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1558].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice); i { case 0: return &v.state @@ -153879,7 +177394,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1354].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1559].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServReserved2_Choice); i { case 0: return &v.state @@ -153891,7 +177406,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1355].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1560].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice); i { case 0: return &v.state @@ -153903,7 +177418,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1356].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1561].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice); i { case 0: return &v.state @@ -153915,7 +177430,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1357].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1562].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice); i { case 0: return &v.state @@ -153927,7 +177442,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1358].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1563].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice); i { case 0: return &v.state @@ -153939,7 +177454,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1359].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1564].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice); i { case 0: return &v.state @@ -153951,7 +177466,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1360].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1565].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice); i { case 0: return &v.state @@ -153963,7 +177478,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1361].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1566].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice); i { case 0: return &v.state @@ -153975,7 +177490,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1362].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1567].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice); i { case 0: return &v.state @@ -153987,7 +177502,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1363].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1568].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice); i { case 0: return &v.state @@ -153999,7 +177514,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1364].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1569].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathRecordRouteType1LabelCType_Choice); i { case 0: return &v.state @@ -154011,7 +177526,7 @@ func file_otg_proto_init() { return nil } } - file_otg_proto_msgTypes[1365].Exporter = func(v interface{}, i int) interface{} { + file_otg_proto_msgTypes[1570].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PatternFlowRSVPPathObjectsCustomType_Choice); i { case 0: return &v.state @@ -154045,13 +177560,14 @@ func file_otg_proto_init() { file_otg_proto_msgTypes[20].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[21].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[22].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[24].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[25].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[23].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[26].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[27].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[28].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[29].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[31].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[32].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[33].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[34].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[35].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[36].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[37].OneofWrappers = []interface{}{} @@ -154072,14 +177588,11 @@ func file_otg_proto_init() { file_otg_proto_msgTypes[52].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[53].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[54].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[55].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[56].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[57].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[58].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[59].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[60].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[61].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[62].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[63].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[64].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[65].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[66].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[67].OneofWrappers = []interface{}{} @@ -154105,8 +177618,6 @@ func file_otg_proto_init() { file_otg_proto_msgTypes[87].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[88].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[89].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[90].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[91].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[92].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[93].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[94].OneofWrappers = []interface{}{} @@ -154144,7 +177655,9 @@ func file_otg_proto_init() { file_otg_proto_msgTypes[126].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[127].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[128].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[129].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[130].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[131].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[132].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[133].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[134].OneofWrappers = []interface{}{} @@ -154153,8 +177666,11 @@ func file_otg_proto_init() { file_otg_proto_msgTypes[137].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[138].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[139].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[140].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[141].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[142].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[143].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[144].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[145].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[146].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[147].OneofWrappers = []interface{}{} @@ -154171,21 +177687,19 @@ func file_otg_proto_init() { file_otg_proto_msgTypes[158].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[159].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[160].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[161].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[162].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[164].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[165].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[166].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[167].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[168].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[169].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[170].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[171].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[172].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[173].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[174].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[175].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[176].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[177].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[178].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[179].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[180].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[181].OneofWrappers = []interface{}{} @@ -154198,52 +177712,84 @@ func file_otg_proto_init() { file_otg_proto_msgTypes[188].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[189].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[190].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[191].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[192].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[193].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[194].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[195].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[196].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[197].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[198].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[199].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[200].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[201].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[202].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[204].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[205].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[207].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[208].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[209].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[210].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[211].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[212].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[213].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[214].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[215].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[216].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[217].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[218].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[219].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[220].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[221].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[222].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[223].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[224].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[225].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[226].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[227].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[228].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[229].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[230].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[233].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[231].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[234].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[235].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[236].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[237].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[238].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[239].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[240].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[241].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[242].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[243].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[244].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[245].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[246].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[247].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[248].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[249].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[250].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[251].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[252].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[253].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[255].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[254].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[256].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[257].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[258].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[259].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[260].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[261].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[262].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[263].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[264].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[265].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[266].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[267].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[268].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[269].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[270].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[271].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[272].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[273].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[274].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[275].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[276].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[277].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[278].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[279].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[280].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[281].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[282].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[283].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[284].OneofWrappers = []interface{}{} @@ -154253,100 +177799,83 @@ func file_otg_proto_init() { file_otg_proto_msgTypes[288].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[289].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[290].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[291].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[292].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[293].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[294].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[295].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[296].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[298].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[299].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[300].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[301].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[303].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[302].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[304].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[305].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[306].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[307].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[308].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[309].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[310].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[311].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[313].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[315].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[314].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[316].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[317].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[318].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[319].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[320].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[321].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[322].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[323].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[324].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[325].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[326].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[327].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[328].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[329].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[330].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[331].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[333].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[334].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[335].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[336].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[337].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[339].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[341].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[342].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[338].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[340].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[343].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[345].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[347].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[348].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[346].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[349].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[350].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[351].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[352].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[354].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[356].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[357].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[353].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[355].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[358].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[359].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[360].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[361].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[362].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[363].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[365].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[364].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[367].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[369].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[371].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[368].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[370].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[373].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[375].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[377].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[378].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[379].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[380].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[381].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[382].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[383].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[384].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[385].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[386].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[387].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[388].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[389].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[390].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[391].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[392].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[393].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[394].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[395].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[397].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[396].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[398].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[399].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[400].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[401].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[403].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[404].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[405].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[406].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[407].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[408].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[409].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[410].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[411].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[412].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[413].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[415].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[416].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[417].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[418].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[419].OneofWrappers = []interface{}{} @@ -154366,21 +177895,16 @@ func file_otg_proto_init() { file_otg_proto_msgTypes[433].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[434].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[435].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[436].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[437].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[438].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[439].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[440].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[441].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[442].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[443].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[444].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[445].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[446].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[447].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[448].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[449].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[450].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[451].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[452].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[453].OneofWrappers = []interface{}{} @@ -154388,9 +177912,7 @@ func file_otg_proto_init() { file_otg_proto_msgTypes[455].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[456].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[457].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[458].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[459].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[460].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[461].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[462].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[463].OneofWrappers = []interface{}{} @@ -154399,37 +177921,22 @@ func file_otg_proto_init() { file_otg_proto_msgTypes[466].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[467].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[468].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[469].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[470].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[471].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[472].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[473].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[474].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[475].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[476].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[477].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[478].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[479].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[480].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[481].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[482].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[483].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[484].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[485].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[486].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[487].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[488].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[489].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[490].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[491].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[492].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[493].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[494].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[495].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[496].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[497].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[498].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[499].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[500].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[501].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[502].OneofWrappers = []interface{}{} @@ -154452,50 +177959,33 @@ func file_otg_proto_init() { file_otg_proto_msgTypes[519].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[520].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[521].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[522].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[523].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[524].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[525].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[526].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[527].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[528].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[529].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[530].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[531].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[532].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[533].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[534].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[535].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[536].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[537].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[538].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[539].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[540].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[541].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[542].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[543].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[544].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[545].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[546].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[547].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[548].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[549].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[550].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[551].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[552].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[553].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[554].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[555].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[556].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[557].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[558].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[559].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[560].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[561].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[562].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[563].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[564].OneofWrappers = []interface{}{} - file_otg_proto_msgTypes[565].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[566].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[567].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[568].OneofWrappers = []interface{}{} @@ -154868,13 +178358,175 @@ func file_otg_proto_init() { file_otg_proto_msgTypes[935].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[936].OneofWrappers = []interface{}{} file_otg_proto_msgTypes[937].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[938].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[939].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[940].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[941].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[942].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[943].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[944].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[945].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[946].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[947].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[948].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[949].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[950].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[951].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[952].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[953].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[954].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[955].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[956].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[957].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[958].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[959].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[960].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[961].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[962].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[963].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[964].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[965].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[966].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[967].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[968].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[969].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[970].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[971].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[972].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[973].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[974].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[975].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[976].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[977].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[978].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[979].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[980].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[981].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[982].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[983].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[984].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[985].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[986].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[987].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[988].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[989].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[990].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[991].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[992].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[993].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[994].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[995].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[996].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[997].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[998].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[999].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1000].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1001].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1002].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1003].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1004].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1005].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1006].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1007].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1008].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1009].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1010].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1011].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1012].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1013].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1014].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1015].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1016].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1017].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1018].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1019].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1020].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1021].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1022].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1023].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1024].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1025].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1026].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1027].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1028].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1029].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1030].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1031].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1032].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1033].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1034].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1035].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1036].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1037].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1038].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1039].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1040].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1041].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1042].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1043].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1044].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1045].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1046].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1047].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1048].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1049].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1050].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1051].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1052].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1053].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1054].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1055].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1056].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1057].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1058].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1059].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1060].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1061].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1062].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1063].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1064].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1065].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1066].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1067].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1068].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1069].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1070].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1071].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1072].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1073].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1074].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1075].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1076].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1077].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1078].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1079].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1080].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1081].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1082].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1083].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1084].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1085].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1086].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1087].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1088].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1089].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1090].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1091].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1092].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1093].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1094].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1095].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1096].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1097].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1098].OneofWrappers = []interface{}{} + file_otg_proto_msgTypes[1099].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_otg_proto_rawDesc, - NumEnums: 410, - NumMessages: 1366, + NumEnums: 453, + NumMessages: 1571, NumExtensions: 0, NumServices: 1, }, diff --git a/gosnappi/otg/otg.proto b/gosnappi/otg/otg.proto index 89e547bd..e79667ce 100644 --- a/gosnappi/otg/otg.proto +++ b/gosnappi/otg/otg.proto @@ -1,4 +1,4 @@ -/* Open Traffic Generator API 1.1.0 +/* Open Traffic Generator API 1.17.0 * Open Traffic Generator API defines a model-driven, vendor-neutral and standard * interface for emulating layer 2-7 network devices and generating test traffic. * @@ -223,8 +223,9 @@ message LagPortLacp { // Base Ethernet interface. message DeviceEthernetBase { - // Media Access Control address. - // required = true + // Media Access Control address.The implementation should ensure that the 'mac' field + // is explicitly configured by the user for all types of interfaces as denoted by 'connection' + // attribute except 'simulated_link' where 'mac' is not mandatory. optional string mac = 1; // Maximum Transmission Unit. @@ -240,7 +241,9 @@ message DeviceEthernetBase { optional string name = 4; } -// An Ethernet interface with IPv4 and IPv6 addresses. +// An Ethernet interface with IPv4 and IPv6 addresses. The implementation should ensure +// that the 'mac' field is explicitly configured by the user for all types of interfaces +// as denoted by 'connection' attribute except 'simulated_link' where MAC is not mandatory. message DeviceEthernet { // Device connection to physical, LAG or another device. @@ -253,8 +256,9 @@ message DeviceEthernet { // The Link Local IPv6 address will be automatically generated. repeated DeviceIpv6 ipv6_addresses = 4; - // Media Access Control address. - // required = true + // Media Access Control address.The implementation should ensure that the 'mac' field + // is explicitly configured by the user for all types of interfaces as denoted by 'connection' + // attribute except 'simulated_link' where 'mac' is not mandatory. optional string mac = 5; // Maximum Transmission Unit. @@ -268,9 +272,16 @@ message DeviceEthernet { // objects. // required = true optional string name = 8; + + // List of DHCPv4 Clients Configuration. + repeated DeviceDhcpv4client dhcpv4_interfaces = 9; + + // List of DHCPv6 Clients Configuration. + repeated DeviceDhcpv6client dhcpv6_interfaces = 10; } -// Ethernet interface connection to a port, LAG or VXLAN tunnel. +// Ethernet interface connection to a port, LAG, VXLAN tunnel or a Simulated Internal +// Link used to create simulated topologies behind an emulated router. message EthernetConnection { message Choice { @@ -279,9 +290,10 @@ message EthernetConnection { port_name = 1; lag_name = 2; vxlan_name = 3; + simulated_link = 4; } } - // port_name, lag_name or vxlan_name + // port_name, lag_name, vxlan_name or simulated_link optional Choice.Enum choice = 1; // Name of the port that the Ethernet interface is configured on. @@ -319,6 +331,67 @@ message EthernetConnection { // - #/components/schemas/Vxlan.V6Tunnel/properties/name // optional string vxlan_name = 4; + + // Description missing in models + EthernetSimulatedLink simulated_link = 5; +} + +// Details of the internal link which can be used to create simulated device topologies +// behind an emulated router. MAC, VLAN and MTU information for the internal links are +// not used for purposes of emulating Simulated Topologies ( e.g. by ISIS Emulated Router +// behind which this is configured ) +message EthernetSimulatedLink { + + // Name of the remote end of the simulated interface which also must be a simulated_link + // on a device which might be acting either as an unconnected device in a simulated + // topology + // ( all ethernet links of type simulated_link ) or an emulated device connected to + // the Device Under Test (has at atleast one ethernet interface with connection to the + // port or + // lag connected to the DUT) + // + // x-constraint: + // - #/components/schemas/Device.Ethernet/properties/name + // + // + // x-constraint: + // - #/components/schemas/Device.Ethernet/properties/name + // + optional string remote_simulated_link = 1; + + message LinkType { + enum Enum { + unspecified = 0; + primary = 1; + secondary = 2; + } + } + // By default, simulated links are treated as Primary links , which means that the intention + // is for connected device to advertise this and full topology of devices connected + // to it. + // e.g. when advertised as ISIS Simulated Topology. + // + // All simulated links inside one topology subset would normally can point to only other + // unconnected devices in the same topology or to the 'root' emulated device. + // If a link is designated as secondary , only that link information will be advertised + // by the IGP e.g. ISIS , and not the entire topology behind it. + // The optional secondary option allows emulation of external link scenarios where a + // simulated device (e.g. part of a ISIS simulated topology ) is advertised as reachable + // part of the topology + // by the emulated router behind which this is configured , as well as the other end + // of the secondary link which could be + // - 1) either a simulated device behind a different emulated router. + // - 2) or an emulated router on same or different port. + // This allows emulation of scenarios where one device/router is emulated to be reachable + // from different Emulated Routers connected to the Device Under Test. (e.g. for FRR + // scenarios) + // + // If an implementation does not support multiple primary links from same simulated + // topology i.e. full topology advertised via multiple emulated routers, it should return + // an error + // during set_config operation with such a topology. + // default = LinkType.Enum.primary + optional LinkType.Enum link_type = 2; } // Emulated VLAN protocol. @@ -508,1478 +581,4356 @@ message DeviceIpv6GatewayMAC { optional string value = 3; } -// A container for layer1 settings. -message Layer1 { +// Configuration for emulated DHCPv4 Client on a single Interface. https://www.rfc-editor.org/rfc/rfc2131.html +message DeviceDhcpv4client { - // A list of unique names of port objects that will share the - // choice settings. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - repeated string port_names = 1; + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 1; - message Speed { + message Choice { enum Enum { unspecified = 0; - speed_10_fd_mbps = 1; - speed_10_hd_mbps = 2; - speed_100_fd_mbps = 3; - speed_100_hd_mbps = 4; - speed_1_gbps = 5; - speed_10_gbps = 6; - speed_25_gbps = 7; - speed_40_gbps = 8; - speed_50_gbps = 9; - speed_100_gbps = 10; - speed_200_gbps = 11; - speed_400_gbps = 12; - speed_800_gbps = 13; + first_server = 1; + server_address = 2; } } - // Set the speed if supported. When no speed is explicitly set, the current - // speed of underlying test interface shall be assumed. - optional Speed.Enum speed = 2; + // The client receives one or more DHCPOFFER messages from one or more servers and client + // may choose to wait for multiple responses. + // The client chooses one server from which to request configuration + // parameters, based on the configuration parameters offered in the DHCPOFFER messages. + // - first_server: if selected, the subnet accepts the IP addresses offered by the first + // server to respond with an offer of IP addresses. + // - server_address: The address of the DHCP server from which the subnet will accept + // IP addresses. + // default = Choice.Enum.first_server + optional Choice.Enum choice = 2; - message Media { - enum Enum { - unspecified = 0; - copper = 1; - fiber = 2; - sgmii = 3; - } - } - // Set the type of media for test interface if supported. When no media - // type is explicitly set, the current media type of underlying test - // interface shall be assumed. - optional Media.Enum media = 3; + // The address of the DHCP server. + optional string server_address = 4; - // Enable promiscuous mode on test interface. A warning shall be raised if - // this field is set to `true`, even when it's not supported, ignoring - // the setting altogether. - // default = True - optional bool promiscuous = 4; + // If the broadcast bit is set, then the server and relay agent broadcast DHCPOFFER + // and DHCPACK messages. + // default = False + optional bool broadcast = 5; - // Set the maximum transmission unit size. A warning shall be raised if - // the specified value is valid but not supported, ignoring the setting altogether. - // default = 1500 - optional uint32 mtu = 5; + // Optional parameters field request list of DHCPv4 Client. + Dhcpv4ClientParams parameters_request_list = 6; +} - // Under Review: This field is currently under review for pending exploration on use - // cases - // - // Under Review: This field is currently under review for pending exploration on use - // cases - // - // Set to true to override the auto_negotiate, link_training - // and rs_fec settings for gigabit ethernet interfaces. - optional bool ieee_media_defaults = 6; +// Configuration Parameter request list by emulated DHCPv4 Client. +message Dhcpv4ClientParams { - // Under Review: This field is currently under review for pending exploration on use - // cases, given that a separate configuration called `AutoNegotiation` already exists. + // Request for the subnet mask option specifies the client's subnet mask as per RFC950. // - // Under Review: This field is currently under review for pending exploration on use - // cases, given that a separate configuration called `AutoNegotiation` already exists. - // - // Enable/disable auto negotiation. - optional bool auto_negotiate = 7; + // default = True + optional bool subnet_mask = 1; - // Description missing in models - Layer1AutoNegotiation auto_negotiation = 8; + // Request for the router option that specifies a list of IP addresses for routers on + // the client's subnet. + // default = True + optional bool router = 2; - // Description missing in models - Layer1FlowControl flow_control = 9; + // Request for the renewal timer, T1. When the timer expires, the client transitions + // from the BOUND state to the RENEWING state. + // default = False + optional bool renewal_timer = 3; + + // Request for the rebinding timer (T2). When expires, the client transitions to the + // REBINDING state. + // default = False + optional bool rebinding_timer = 4; +} + +// Configuration for emulated DHCPv6 Client on a single Interface. If the DHCPv6 Client +// receives one or more DHCPv6 ADVERTISE messages from one or more servers then the +// client chooses one server from which to request configuration parameters, based +// on the configuration parameters offered by the server in the DHCPv6 ADVERTISE messages. +// If all configuration parameters match then the first server will be chosen. https://www.rfc-editor.org/rfc/rfc8415.html +message DeviceDhcpv6client { // Globally unique name of an object. It also serves as the primary key for arrays of // objects. // required = true - optional string name = 10; -} + optional string name = 1; -// Configuration for auto negotiation settings -message Layer1AutoNegotiation { + // If Rapid Commit is set, client initiates Rapid Commit two-message exchange by including + // Rapid Commit option in Solicit message. + // default = False + optional bool rapid_commit = 2; - // If auto_negotiate is true and the interface supports this option - // then this speed will be advertised. - // default = True - optional bool advertise_1000_mbps = 1; + // Each IA has an associated IAID. Differnet IA options represent different types of + // IPv6 addresses and parameters + // accepted by DHCPv6 clients each used in different context by an IPv6 node. + DeviceDhcpv6clientIaType ia_type = 3; - // If auto_negotiate is true and the interface supports this option - // then this speed will be advertised. - // default = True - optional bool advertise_100_fd_mbps = 2; + // Each DHCP client and server has a DUID. DHCP clients and servers use DUIDs to identify + // each other. + DeviceDhcpv6clientDuidType duid_type = 4; - // If auto_negotiate is true and the interface supports this option - // then this speed will be advertised. - // default = True - optional bool advertise_100_hd_mbps = 3; + // The options requested by a client from a server in the options request option. + DeviceDhcpv6ClientOptionsRequest options_request = 5; - // If auto_negotiate is true and the interface supports this option - // then this speed will be advertised. - // default = True - optional bool advertise_10_fd_mbps = 4; + // Optional DHCPv4 Client options that are sent in Dhcp client messages. + DeviceDhcpv6ClientOptions options = 6; +} - // If auto_negotiate is true and the interface supports this option - // then this speed will be advertised. - // default = True - optional bool advertise_10_hd_mbps = 5; +// DHCP client options, these configured options are sent in Dhcp client messages. +message DeviceDhcpv6ClientOptionsRequest { - // Enable/disable gigabit ethernet link training. - // default = False - optional bool link_training = 6; + // List of options requested by a client from a server. + repeated Dhcpv6ClientOptionsOptionsRequest request = 1; - // Enable/disable gigabit ethernet reed solomon forward error correction (RS FEC). - // default = False - optional bool rs_fec = 7; + // The list of dhcpv6 client messages where this option is included. + // required = true + Dhcpv6ClientOptionsIncludedMessages associated_dhcp_messages = 2; } -// A container for layer1 receive flow control settings. -// To enable flow control settings on ports this object must be a valid -// object not a null value. -message Layer1FlowControl { +// DHCP client options, these configured options are sent in Dhcp client messages. +message DeviceDhcpv6ClientOptions { - // The 48bit mac address that the layer1 port names will listen on - // for a directed pause. - // default = 01:80:C2:00:00:01 - optional string directed_address = 1; + // A client uses multicast to reach all servers or an individual server. An individual + // server is indicated by + // specifying that server's DUID in a Server Identifier option in the client's message + // (all servers will receive + // this message but only the indicated server will respond). All servers are indicated + // by not supplying this option. + Dhcpv6ClientOptionsServerIdentifier server_identifier = 1; + + // The vendor class option is used by a client to identify the vendor that manufactured + // the hardware on which + // the client is running. The information contained in the data area of this option + // is contained in one or more + // opaque fields that identify details of the hardware configuration. + Dhcpv6ClientOptionsVendorClass vendor_class = 2; + + // This option is used by clients to exchange vendor-specific information with servers. + Dhcpv6ClientOptionsVendorInfo vendor_info = 3; + + // DHCPv6 server needs to know the FQDN of the client for the addresses for the client's + // IA_NA bindings in order to + // update the IPv6-address-to-FQDN mapping. This option allows the client to convey + // its FQDN to the server. The Client + // FQDN option also contains Flags that DHCPv6 clients and servers use to negotiate + // who does which update. + Dhcpv6ClientOptionsFqdn fqdn = 4; +} + +// Description missing in models +message DeviceDhcpv6clientIaType { message Choice { enum Enum { unspecified = 0; - ieee_802_1qbb = 1; - ieee_802_3x = 2; + iana = 1; + iata = 2; + iapd = 3; + ianapd = 4; } } - // The type of priority flow control. - // default = Choice.Enum.ieee_802_1qbb - optional Choice.Enum choice = 2; + // Identity Association: Each IA has an associated IAID. IA_NA and IA_TA options represent + // different types of IPv6 addresses and parameters accepted by DHCPv6 clients each + // used in different context by an IPv6 node. IA_NA is the Identity Association for + // Non-temporary Addresses option. IA_TA is the Identity Association for Temporary + // Addresses option. IA_PD and IA_NAPD options represent one or more IPv6 prefix and + // parameters. IA_PD is the Identity Association for Prefix Delegation and IA_NAPD + // s the Identity Association for Temporary Prefix Delegation. + // default = Choice.Enum.iana + optional Choice.Enum choice = 1; // Description missing in models - Layer1Ieee8021qbb ieee_802_1qbb = 3; + DeviceDhcpv6clientIaTimeValue iana = 2; // Description missing in models - Layer1Ieee8023x ieee_802_3x = 4; -} + DeviceDhcpv6clientIaTimeValue iapd = 3; -// A container for ieee 802.3x rx pause settings -message Layer1Ieee8023x { + // Description missing in models + DeviceDhcpv6clientIaTimeValue ianapd = 4; } -// These settings enhance the existing 802.3x pause priority capabilities -// to enable flow control based on 802.1p priorities (classes of service). -message Layer1Ieee8021qbb { - - // The upper limit on the transmit time of a queue after receiving a - // message to pause a specified priority. - // A value of 0 or null indicates that pfc delay will not be enabled. - // default = 0 - optional uint32 pfc_delay = 1; - - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 0 - optional uint32 pfc_class_0 = 2; +// The container for the suggested times at which the client contacts the server or +// any available server. +message DeviceDhcpv6clientIaTimeValue { - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 1 - optional uint32 pfc_class_1 = 3; + // The suggested time at which the client contacts the server from which the addresses + // were obtained to extend the lifetimes of the addresses assigned. T1 is a time duration + // relative to the current time expressed in units of seconds. If set to 0 server will + // ignore it. If the maximum value is specified it means infinite time. + // default = 302400 + optional uint32 t1 = 1; - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 2 - optional uint32 pfc_class_2 = 4; + // The suggested time at which the client contacts any available server to extend the + // lifetimes of the addresses assigned. T2 is a time duration relative to the current + // time expressed in units of seconds. If set to 0 server will ignore it. If the maximum + // value is specified it means infinite time + // default = 483840 + optional uint32 t2 = 2; +} - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 3 - optional uint32 pfc_class_3 = 5; +// Description missing in models +message DeviceDhcpv6clientDuidType { - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 4 - optional uint32 pfc_class_4 = 6; + message Choice { + enum Enum { + unspecified = 0; + llt = 1; + en = 2; + ll = 3; + } + } + // Each DHCP client and server has a DUID. DHCP clients use DUIDs to identify a server + // in messages where a server needs to be identified. + // default = Choice.Enum.llt + optional Choice.Enum choice = 1; - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 5 - optional uint32 pfc_class_5 = 7; + // Description missing in models + DeviceDhcpv6clientNoDuid llt = 2; - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 6 - optional uint32 pfc_class_6 = 8; + // Description missing in models + DeviceDhcpv6clientDuidValue en = 3; - // The valid values are null, 0 - 7. - // A null value indicates there is no setting for this pfc class. - // default = 7 - optional uint32 pfc_class_7 = 9; + // Description missing in models + DeviceDhcpv6clientNoDuid ll = 4; } -// Under Review: There may be changes in filter configuration -// -// Under Review: There may be changes in filter configuration -// -// Configuration for capture settings. -message Capture { +// The container for the DUID-EN. This consists of the 4-octet vendor's registered Private +// Enterprise Number as maintained by IANA [IANA-PEN] followed by a unique identifier +// assigned by the vendor. +message DeviceDhcpv6clientDuidValue { - // The unique names of ports that the capture settings will apply to. Port_names cannot - // be duplicated between capture objects. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - repeated string port_names = 1; + // 4-octet vendor's registered Private Enterprise Number as maintained by IANA [IANA-PEN]. + // default = 10 + optional uint32 enterprise_id = 1; - // A list of filters to apply to the capturing ports. If no filters are specified then - // all packets will be captured. A capture can have multiple filters. The number of - // filters supported is determined by the implementation which can be retrieved using - // the capabilities API. - // When multiple filters are specified the capture implementation must && (and) all - // the filters. - repeated CaptureFilter filters = 2; + // Unique identifier assigned by the vendor. + // default = 10 + optional uint32 vendor_id = 2; +} - // Overwrite the capture buffer. - // default = True - optional bool overwrite = 3; +// The container for DUID-LL and DUID-LLT. +message DeviceDhcpv6clientNoDuid { +} - // The maximum size of each captured packet. If no value is specified or it is null - // then the entire packet will be captured. - optional uint32 packet_size = 4; - - message Format { - enum Enum { - unspecified = 0; - pcap = 1; - pcapng = 2; - } - } - // The format of the capture file. - // default = Format.Enum.pcap - optional Format.Enum format = 5; - - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 6; -} - -// Configuration for capture filters -message CaptureFilter { +// Description missing in models +message Dhcpv6ClientOptionsServerIdentifier { message Choice { enum Enum { unspecified = 0; - custom = 1; - ethernet = 2; - vlan = 3; - ipv4 = 4; - ipv6 = 5; + duid_llt = 1; + duid_en = 2; + duid_ll = 3; + duid_uuid = 4; } } - // The type of capture filter. - // default = Choice.Enum.custom + // The Identifier option is used to carry a DUID. The option code is 2. The server identifier + // identifies a server. This option is used when client wants to contact a particular + // server. + // default = Choice.Enum.duid_ll optional Choice.Enum choice = 1; - // Offset from last filter in the list. If no filters are present it is offset from - // position 0. Multiple custom filters can be present, the length of each custom filter - // is the length of the value being filtered. - CaptureCustom custom = 2; - // Description missing in models - CaptureEthernet ethernet = 3; + Dhcpv6ClientOptionsDuidLlt duid_llt = 2; // Description missing in models - CaptureVlan vlan = 4; + Dhcpv6ClientOptionsDuidEn duid_en = 3; // Description missing in models - CaptureIpv4 ipv4 = 5; + Dhcpv6ClientOptionsDuidLl duid_ll = 4; // Description missing in models - CaptureIpv6 ipv6 = 6; + Dhcpv6ClientOptionsDuidUuid duid_uuid = 5; } -// Description missing in models -message CaptureCustom { +// DUID based on Link Layer address plus time. Hardware Type will be auto assigned to +// ethernet type. +message Dhcpv6ClientOptionsDuidLlt { - // The bit offset of field to filter on - optional uint32 offset = 1; + // The time value is the time that the DUID is generated represented in seconds since + // midnight (UTC), January 1, + // 2000, modulo 2^32. The DUID generatation time will the current time when dhcpv6 client + // contacts the server. + // required = true + optional uint32 time = 1; - // The bit length of field to filter on - // default = 8 - optional uint32 bit_length = 2; + // The link-layer address is stored in canonical form, as described in RFC 2464. + // + // required = true + Dhcpv6ClientOptionsLinkLayerAddress link_layer_address = 2; +} - // Description missing in models - // default = 00 - optional string value = 3; +// DUID assigned by vendor based on enterprise number. +message Dhcpv6ClientOptionsDuidEn { - // Description missing in models - // default = 00 - optional string mask = 4; + // Vendor's registered private enterprise number as maintained by IANA. + // required = true + optional uint32 enterprise_number = 1; - // Description missing in models - // default = False - optional bool negate = 5; + // The unique identifier assigned by the vendor. + // required = true + optional string identifier = 2; } -// Description missing in models -message CaptureField { +// DUID based on Link Layer address. Hardware Type will be auto assigned to ethernet +// type. +message Dhcpv6ClientOptionsDuidLl { - // Description missing in models - // default = 00 - optional string value = 1; + // The link-layer address is stored in canonical form, as described in RFC 2464. + // + // required = true + Dhcpv6ClientOptionsLinkLayerAddress link_layer_address = 1; +} - // Description missing in models - // default = 00 - optional string mask = 2; +// DUID embedded a Universally Unique IDentifier (UUID). A UUID is an identifier that +// is unique across both space and time, with respect to the space of all UUIDs. +message Dhcpv6ClientOptionsDuidUuid { - // Description missing in models - // default = False - optional bool negate = 3; -} + // The version number is in the most significant 4 bits of the timestamp (bits 4 through + // 7 of the time_hi_and_version field). + Dhcpv6ClientOptionsDuidUuidVersion version = 1; -// Description missing in models -message CaptureEthernet { + // The variant field determines the layout of the UUID. It is multiplexed with clock_seq_hi_and_reserved. + // + Dhcpv6ClientOptionsDuidUuidVariant variant = 2; - // Description missing in models - CaptureField src = 1; + // The low field of the timestamp. + // default = 0 + optional uint32 time_low = 3; - // Description missing in models - CaptureField dst = 2; + // The middle field of the timestamp. + // default = 0 + optional uint32 time_mid = 4; - // Description missing in models - CaptureField ether_type = 3; + // The high field of the timestamp multiplexed with the version number. + // default = 0 + optional uint32 time_hi_and_version = 5; - // Description missing in models - CaptureField pfc_queue = 4; + // The high field of the clock sequence multiplexed with the variant. + // default = 0 + optional uint32 clock_seq_hi_and_reserved = 6; + + // The low field of the clock sequence. + // default = 0 + optional uint32 clock_seq_low = 7; + + // The spatially unique node identifier. + // default = 00:00:00:00:00:00 + optional string node = 8; } -// Description missing in models -message CaptureVlan { +// The version number is in the most significant 4 bits of the timestamp (bits 4 through +// 7 of the time_hi_and_version field). +message Dhcpv6ClientOptionsDuidUuidVersion { - // Description missing in models - CaptureField priority = 1; + message Choice { + enum Enum { + unspecified = 0; + v_1 = 1; + v_2 = 2; + v_3 = 3; + v_4 = 4; + v_5 = 5; + } + } + // The version values are from 1 to 5 in the most significant 4 bits of the timestamp + // (bits 4 through 7 of the time_hi_and_version field). + // default = Choice.Enum.v_1 + optional Choice.Enum choice = 1; +} - // Description missing in models - CaptureField cfi = 2; +// The variant field determines the layout of the UUID. That is, the interpretation +// of all other bits in the UUID depends on the setting of the bits in the variant +// field). +message Dhcpv6ClientOptionsDuidUuidVariant { - // Description missing in models - CaptureField id = 3; + message Choice { + enum Enum { + unspecified = 0; + ncs = 1; + dce = 2; + guid = 3; + var_reserved = 4; + } + } + // The current variants are ncs, dce,microsoft guid and reserved. + // default = Choice.Enum.ncs + optional Choice.Enum choice = 1; +} - // Description missing in models - CaptureField protocol = 4; +// The link-layer address configured in DUID llt or DUID ll. +message Dhcpv6ClientOptionsLinkLayerAddress { + + // The MAC address that becomes part of DUID llt or DUID ll. + // required = true + optional string value = 3; } // Description missing in models -message CaptureIpv4 { - - // Description missing in models - CaptureField version = 1; +message Dhcpv6ClientOptionsOptionsRequest { - // Description missing in models - CaptureField header_length = 2; + message Choice { + enum Enum { + unspecified = 0; + vendor_information = 1; + name_servers = 2; + fqdn = 3; + bootfile_url = 4; + sztp = 5; + custom = 6; + } + } + // The Option Request option is used to identify a list of options in a message between + // a client and a server. The option code is 6. - Vendor_specific information option, + // requested by clients for vendor-specific informations from servers. - DNS Recursive + // Name Server Option, requested by clients to get the list ofIPv6 addresses of DNS + // recursive name + // servers to which DNS queries may be sent by the client resolver in order of preference. + // - Client FQDN option - indicates whether the client or the DHCP server should update + // DNS with the AAAA record + // corresponding to the assigned IPv6 address and the FQDN provided in this option. + // The DHCP server always updates + // the PTR record. + // - bootfile_url, if client is configured for network booting then the client must + // use this option to obtain the boot + // file url from the server. + // - sztp. Securely provision a networking device when it is booting in a factory-default + // state. + // default = Choice.Enum.vendor_information + optional Choice.Enum choice = 1; // Description missing in models - CaptureField priority = 3; + Dhcpv6ClientOptionsCustom custom = 2; +} - // Description missing in models - CaptureField total_length = 4; +// The Custom option is used to provide a not so well known option in the message between +// a client and a server. +message Dhcpv6ClientOptionsCustom { - // Description missing in models - CaptureField identification = 5; + // The type of the Custom option TLV. + // required = true + optional uint32 type = 1; +} - // Description missing in models - CaptureField reserved = 6; +// This option is used by a client to identify the vendor that manufactured the hardware +// on which the client is running. The option code is 16. +message Dhcpv6ClientOptionsVendorClass { - // Description missing in models - CaptureField dont_fragment = 7; + // The vendor's registered Enterprise Number as registered with IANA. + // required = true + optional uint32 enterprise_number = 1; - // Description missing in models - CaptureField more_fragments = 8; + // The opaque data representing the hardware configuration of the host on which the + // client is running. Examples of class data instances might include the version of + // the operating system the client is running or the amount of memory installed on + // the client. + repeated string class_data = 2; - // Description missing in models - CaptureField fragment_offset = 9; + // The dhcpv6 client messages where this option is included. + // required = true + Dhcpv6ClientOptionsIncludedMessages associated_dhcp_messages = 3; +} - // Description missing in models - CaptureField time_to_live = 10; +// The dhcpv6 client messages where the option will be included. If all is selected +// the selected option will be added in the all the Dhcpv6 client messages, else based +// on the selection in particular Dhcpv6 client messages the option will be included. +message Dhcpv6ClientOptionsIncludedMessages { - // Description missing in models - CaptureField protocol = 11; + message Choice { + enum Enum { + unspecified = 0; + all = 1; + msg_types = 2; + } + } + // The client message name where the option is included, by default it is all. + // default = Choice.Enum.all + optional Choice.Enum choice = 1; - // Description missing in models - CaptureField header_checksum = 12; + // User must specify the Dhcpv6 message type. + repeated Dhcpv6ClientOptionsMessageType msg_types = 2; +} - // Description missing in models - CaptureField src = 13; +// The dhcpv6 client messages where the option will be included. +message Dhcpv6ClientOptionsMessageType { - // Description missing in models - CaptureField dst = 14; + message Choice { + enum Enum { + unspecified = 0; + solicit = 1; + request = 2; + inform_request = 3; + release = 4; + renew = 5; + rebind = 6; + } + } + // The client message name where the option is included, by default it is all. + // default = Choice.Enum.solicit + optional Choice.Enum choice = 1; } -// Description missing in models -message CaptureIpv6 { - - // Description missing in models - CaptureField version = 1; +// This option is used by clients to exchange vendor-specific information. The option +// code is 17. +message Dhcpv6ClientOptionsVendorInfo { - // Description missing in models - CaptureField traffic_class = 2; + // The vendor's registered Enterprise Number as registered with IANA. + // required = true + optional uint32 enterprise_number = 1; - // Description missing in models - CaptureField flow_label = 3; + // An opaque object of octets,interpreted by vendor-specific code on the clients and + // servers. + repeated Dhcpv6OptionsVendorSpecificOptions option_data = 2; - // Description missing in models - CaptureField payload_length = 4; + // The list of dhcpv6 client messages where this option is included. + // required = true + Dhcpv6ClientOptionsIncludedMessages associated_dhcp_messages = 3; +} - // Description missing in models - CaptureField next_header = 5; +// This option is used by servers to exchange vendor-specific information. The option +// code is 17. +message Dhcpv6ServerOptionsVendorInfo { - // Description missing in models - CaptureField hop_limit = 6; + // The vendor's registered Enterprise Number as registered with IANA. + // required = true + optional uint32 enterprise_number = 1; - // Description missing in models - CaptureField src = 7; + // An opaque object of octets,interpreted by vendor-specific code on the clients and + // servers. + repeated Dhcpv6OptionsVendorSpecificOptions option_data = 2; - // Description missing in models - CaptureField dst = 8; + // The list of dhcpv6 client messages where this option is included. + // required = true + Dhcpv6ServerOptionsIncludedMessages associated_dhcp_messages = 3; } -// A container for emulated interfaces, loopback interfaces and protocol configurations. -message Device { - - // Ethernet configuration for one or more emulated network interfaces. - repeated DeviceEthernet ethernets = 1; +// The dhcpv6 server messages where the option will be included. If all is selected +// the selected option will be added in the all the Dhcpv6 server messages, else based +// on the selection in particular Dhcpv6 server messages the option will be included. +message Dhcpv6ServerOptionsIncludedMessages { - // IPv4 Loopback interface that can be attached to an Ethernet in the same device or - // to an Ethernet in another device. - repeated DeviceIpv4Loopback ipv4_loopbacks = 2; + message Choice { + enum Enum { + unspecified = 0; + all = 1; + msg_types = 2; + } + } + // The server message name where the option is included, by default it is all. + // default = Choice.Enum.all + optional Choice.Enum choice = 1; - // IPv6 Loopback interface that can be attached to an Ethernet in the same device or - // to an Ethernet in another device. - repeated DeviceIpv6Loopback ipv6_loopbacks = 3; + // User must specify the Dhcpv6 message type. + repeated Dhcpv6ServerOptionsMessageType msg_types = 2; +} - // The properties of an IS-IS router and its children, such as IS-IS interfaces and - // route ranges. - DeviceIsisRouter isis = 4; +// The dhcpv6 server messages where the option will be included. +message Dhcpv6ServerOptionsMessageType { - // The properties of BGP router and its children, such as BGPv4, BGPv6 peers and their - // route ranges. - DeviceBgpRouter bgp = 5; + message Choice { + enum Enum { + unspecified = 0; + advertise = 1; + reply = 2; + re_configure = 3; + } + } + // The server message name where the option is included, by default it is all. + // default = Choice.Enum.advertise + optional Choice.Enum choice = 1; +} - // Configuration of VXLAN tunnel interfaces RFC Ref: https://datatracker.ietf.org/doc/html/rfc7348 - DeviceVxlan vxlan = 6; +// The encapsulated vendor-specific options field is encoded as a sequence of code/length/value +// fields of identical format to the DHCP options field. The option codes are defined +// by the vendor identified in the enterprise-number field and are not managed by IANA. +message Dhcpv6OptionsVendorSpecificOptions { - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. + // The code for the encapsulated option. // required = true - optional string name = 7; + optional uint32 code = 1; - // The properties of an RSVP router and its children. - DeviceRsvp rsvp = 8; + // The data for the encapsulated option. + // required = true + optional string data = 2; } -// Common options that apply to all configured protocols and interfaces. -message ProtocolOptions { +// DHCPv6 server needs to know the FQDN of the client for the addresses for the client's +// IA_NA bindings in order to update the IPv6-address-to-FQDN mapping. This option allows +// the client to convey its FQDN to the server. The Client FQDN option also contains +// Flags that DHCPv6 clients and servers use to negotiate who does which updates. The +// option code is 39. +message Dhcpv6ClientOptionsFqdn { - // When set to true, all underlying resources for configured protocols and interfaces - // shall be created and corresponding protocol session negotiation shall be initiated. - // Otherwise, when set to false, corresponding protocol session negotiation will need - // to be initiated using a separate set_protocol_state API call. + // The S bit indicates whether the server should or should not perform the AAAA RR (FQDN-to-address) + // DNS updates. A client sets the bit to 0 to indicate that the server should not perform + // the updates and 1 to indicate that the server should perform the updates. The state + // of the bit in the reply from the server indicates the action to be taken by the + // server. If it is 1, the server has taken responsibility for AAAA RR updates for the + // FQDN. // default = True - optional bool auto_start_all = 1; -} - -// A container of properties for an ISIS router and its interfaces. -message DeviceIsisRouter { + optional bool flag_s = 1; - // This contains the properties of a Multi-Instance-capable routers or MI-RTR. Each - // router can emulate one ISIS instance at a time. - DeviceIsisMultiInstance instance = 1; + // The O bit indicates whether the server has overridden the client's preference for + // the S bit. A client must set this bit to 0. A server must set this bit to 1 if the + // S bit in its reply to the client does not match the S bit received from the client. + // default = False + optional bool flag_o = 2; + + // The N bit indicates whether the server should not perform any DNS updates. A client + // sets this bit to 0 to request that the server should perform updates (the PTR RR + // and possibly the AAAA RR based on the S bit) or to 1 to request that the server + // should not perform any DNS updates. A server sets the N bit to indicate whether the + // server shall (0) or shall not (1) perform DNS updates. If the N bit is 1, the S + // bit MUST be 0. + // default = False + optional bool flag_n = 3; - // The System ID for this emulated ISIS router, e.g. 640100010000. + // The Domain Name part of the option carries all or part of the FQDN of a DHCPv6 client. + // A client MAY also leave the Domain Name field empty if it desires the server to + // provide a name. A fully qualified domain name (FQDN) is the complete address of + // an internet host or computer. It provides its exact location within the domain name + // system (DNS) by specifying the hostname, domain name and top-level domain (TLD). + // An FQDN isn't the same as a URL but rather is a part of it that fully identifies + // the server to which the request is addressed. An FQDN doesn't carry the TCP/IP protocol + // information, such as Hypertext Transfer Protocol (HTTP) or Hypertext Transfer Protocol + // Secure (HTTPS), which is always used at the beginning of a URL. Therefore, adding + // the prefix http:// or https:// to the FQDN turns it into a full URL. One example + // can be microsoft.com. // required = true - optional string system_id = 2; + optional string domain_name = 4; - // List of ISIS interfaces for this router. - repeated IsisInterface interfaces = 3; - - // Contains basic properties of an ISIS Router. - IsisBasic basic = 4; - - // Contains advance properties of an ISIS Router.. - IsisAdvanced advanced = 5; + // The list of dhcpv6 client messages where this option is included. + Dhcpv6ClientOptionsIncludedMessages associated_dhcp_messages = 5; +} - // ISIS Router authentication properties. - IsisAuthentication router_auth = 6; +// The server sends this option to inform the client about a URL to a boot file. This +// information is required for booting over the network includes the details about +// the server on which the boot files can be found, the protocol to be used for the +// download (for example,HTTP or TFTP, and the path and name of the boot file on the +// server. The option code is 59. The URL will contain the network communication protocol, +// a subdomain, a domain name, and its extension. If the host in the URL is expressed +// using an IPv6 address rather than a domain name, the address in the URL then must +// be enclosed in [ and ] characters, conforming to [RFC3986]. Eg of a boot file url +// can be tftp://[xxxx:xxxx:xxxx:xxxx::xxxx]/mboot.efi. +message Dhcpv6ServerOptionsBootfileUrl { - // Emulated ISIS IPv4 routes. - repeated IsisV4RouteRange v4_routes = 7; + // The URL for the boot file. It must comply with STD 66 format. + // required = true + optional string url = 1; - // Emulated ISIS IPv6 routes. - repeated IsisV6RouteRange v6_routes = 8; + // They are used to specify parameters for the boot file (similar to the command line + // arguments in most modern operating systems). For example, these parameters could + // be used to specify the root file system of the OS kernel, or the location from which + // a second-stage boot-loader program can download its configuration file. + repeated Dhcpv6ServerOptionsBootFileParams bootfile_params = 2; - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 9; + // The list of dhcpv6 client messages where this option is included. + Dhcpv6ServerOptionsIncludedMessages associated_dhcp_messages = 3; } -// This container properties of an Multi-Instance-capable router (MI-RTR). -message DeviceIsisMultiInstance { - - // Instance Identifier (IID) TLV will associate a PDU with an ISIS instance by using - // a unique 16-bit number and including one or more Instance-Specific Topology Identifiers - // (ITIDs). - // default = 1 - optional uint32 iid = 1; +// The option code is 60. They are used to specify parameters for the boot file (similar +// to the command line arguments in most modern operating systems). For example, these +// parameters could be used to specify the root file system of the OS kernel, or the +// location from which a second-stage boot-loader program can download its configuration +// file. +message Dhcpv6ServerOptionsBootFileParams { - // This contains one or more ITIDs that will be advertised in IID TLV. - repeated uint32 itids = 2; + // UTF-8 strings are parameters needed for booting, e.g., kernel parameters. + // required = true + optional string parameter = 1; } -// Configuration for single ISIS interface. -message IsisInterface { +// A container for layer1 settings. +message Layer1 { - // The unique name of the Ethernet interface on which ISIS is running. Two ISIS interfaces - // cannot share the same Ethernet. + // A list of unique names of port objects that will share the + // choice settings. // // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name + // - /components/schemas/Port/properties/name // // // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name + // - /components/schemas/Port/properties/name // - // required = true - optional string eth_name = 1; - - // The default metric cost for the interface. - // default = 10 - optional uint32 metric = 2; + repeated string port_names = 1; - message NetworkType { + message Speed { enum Enum { unspecified = 0; - broadcast = 1; - point_to_point = 2; + speed_10_fd_mbps = 1; + speed_10_hd_mbps = 2; + speed_100_fd_mbps = 3; + speed_100_hd_mbps = 4; + speed_1_gbps = 5; + speed_10_gbps = 6; + speed_25_gbps = 7; + speed_40_gbps = 8; + speed_50_gbps = 9; + speed_100_gbps = 10; + speed_200_gbps = 11; + speed_400_gbps = 12; + speed_800_gbps = 13; } } - // The type of network link. - // default = NetworkType.Enum.broadcast - optional NetworkType.Enum network_type = 3; + // Set the speed if supported. When no speed is explicitly set, the current + // speed of underlying test interface shall be assumed. + optional Speed.Enum speed = 2; - message LevelType { + message Media { enum Enum { unspecified = 0; - level_1 = 1; - level_2 = 2; - level_1_2 = 3; + copper = 1; + fiber = 2; + sgmii = 3; } } - // This indicates whether this router is participating in Level-1 (L1), - // Level-2 (L2) or both L1 and L2 domains on this interface. - // default = LevelType.Enum.level_2 - optional LevelType.Enum level_type = 4; - - // Settings of Level 1 Hello. - IsisInterfaceLevel l1_settings = 5; - - // Settings of Level 2 Hello. - IsisInterfaceLevel l2_settings = 6; + // Set the type of media for test interface if supported. When no media + // type is explicitly set, the current media type of underlying test + // interface shall be assumed. + optional Media.Enum media = 3; - // Contains the properties of multiple topologies. - repeated IsisMT multi_topology_ids = 7; + // Enable promiscuous mode on test interface. A warning shall be raised if + // this field is set to `true`, even when it's not supported, ignoring + // the setting altogether. + // default = True + optional bool promiscuous = 4; - // Contains a list of Traffic Engineering attributes. - repeated LinkStateTE traffic_engineering = 8; + // Set the maximum transmission unit size. A warning shall be raised if + // the specified value is valid but not supported, ignoring the setting altogether. + // default = 1500 + optional uint32 mtu = 5; - // The Circuit authentication method used for the interfaces on this emulated ISIS v4/v6 - // router. - IsisInterfaceAuthentication authentication = 9; + // Under Review: This field is currently under review for pending exploration on use + // cases + // + // Under Review: This field is currently under review for pending exploration on use + // cases + // + // Set to true to override the auto_negotiate, link_training + // and rs_fec settings for gigabit ethernet interfaces. + optional bool ieee_media_defaults = 6; - // Optional container for advanced interface properties. - IsisInterfaceAdvanced advanced = 10; + // Under Review: This field is currently under review for pending exploration on use + // cases, given that a separate configuration called `AutoNegotiation` already exists. + // + // Under Review: This field is currently under review for pending exploration on use + // cases, given that a separate configuration called `AutoNegotiation` already exists. + // + // Enable/disable auto negotiation. + optional bool auto_negotiate = 7; - // Link protection on the ISIS link between two interfaces. - IsisInterfaceLinkProtection link_protection = 11; + // Description missing in models + Layer1AutoNegotiation auto_negotiation = 8; - // This contains list of SRLG values for the link between two interfaces. - repeated uint32 srlg_values = 12; + // Description missing in models + Layer1FlowControl flow_control = 9; // Globally unique name of an object. It also serves as the primary key for arrays of // objects. // required = true - optional string name = 13; + optional string name = 10; } -// Configuration for the properties of Level 1 Hello. -message IsisInterfaceLevel { +// Configuration for auto negotiation settings +message Layer1AutoNegotiation { - // The Priority setting in Level 1 LAN Hellos for Designated Router election. - // default = 0 - optional uint32 priority = 1; + // If auto_negotiate is true and the interface supports this option + // then this speed will be advertised. + // default = True + optional bool advertise_1000_mbps = 1; - // The Hello interval for Level 1 Hello messages, in seconds. - // default = 10 - optional uint32 hello_interval = 2; + // If auto_negotiate is true and the interface supports this option + // then this speed will be advertised. + // default = True + optional bool advertise_100_fd_mbps = 2; - // The Dead (Holding Time) interval for Level 1 Hello messages, in seconds. - // default = 30 - optional uint32 dead_interval = 3; -} + // If auto_negotiate is true and the interface supports this option + // then this speed will be advertised. + // default = True + optional bool advertise_100_hd_mbps = 3; -// Configuration of properties per interface per topology when multiple topologies are -// configured in an ISIS router. -// in a ISIS router. -message IsisMT { + // If auto_negotiate is true and the interface supports this option + // then this speed will be advertised. + // default = True + optional bool advertise_10_fd_mbps = 4; - // The Multi Topology ID for one of the topologies supported on the ISIS interface. - // default = 0 - optional uint32 mt_id = 1; + // If auto_negotiate is true and the interface supports this option + // then this speed will be advertised. + // default = True + optional bool advertise_10_hd_mbps = 5; - // Specifies the link metric for this topology on the ISIS interface. - // default = 10 - optional uint32 link_metric = 2; + // Enable/disable gigabit ethernet link training. + // default = False + optional bool link_training = 6; + + // Enable/disable gigabit ethernet reed solomon forward error correction (RS FEC). + // default = False + optional bool rs_fec = 7; } -// A container for Traffic Engineering properties on a interface. -message LinkStateTE { +// A container for layer1 receive flow control settings. +// To enable flow control settings on ports this object must be a valid +// object not a null value. +message Layer1FlowControl { - // The Administrative group sub-TLV (sub-TLV 3). It is a 4-octet - // user-defined bit mask used to assign administrative group numbers - // to the interface, for use in assigning colors and resource classes. - // Each set bit corresponds to a single administrative group for this - // interface. The settings translate into Group numbers, which range - // from 0 to 31 (integers). - // default = 00000000 - optional string administrative_group = 1; + // The 48bit mac address that the layer1 port names will listen on + // for a directed pause. + // default = 01:80:C2:00:00:01 + optional string directed_address = 1; - // The user-assigned link metric for Traffic Engineering. - // default = 0 - optional uint32 metric_level = 2; + message Choice { + enum Enum { + unspecified = 0; + ieee_802_1qbb = 1; + ieee_802_3x = 2; + } + } + // The type of priority flow control. + // default = Choice.Enum.ieee_802_1qbb + optional Choice.Enum choice = 2; - // The maximum link bandwidth (sub-TLV 9) in bytes/sec allowed for this - // link for a direction. - // default = 125000000 - optional uint32 max_bandwith = 3; + // Description missing in models + Layer1Ieee8021qbb ieee_802_1qbb = 3; - // The maximum link bandwidth (sub-TLV 10) in bytes/sec allowed for this - // link in a direction. - // default = 125000000 - optional uint32 max_reservable_bandwidth = 4; + // Description missing in models + Layer1Ieee8023x ieee_802_3x = 4; +} - // Configuration of bandwidths of priority 0 through priority 7. - LinkStatepriorityBandwidths priority_bandwidths = 5; +// A container for ieee 802.3x rx pause settings +message Layer1Ieee8023x { } -// Specifies the amount of bandwidth that can be reserved with a setup priority of 0 -// -// through 7, arranged in increasing order with priority 0 having highest priority. -// -// In ISIS, this is sent in sub-TLV (11) of Extended IS Reachability TLV. -message LinkStatepriorityBandwidths { +// These settings enhance the existing 802.3x pause priority capabilities +// to enable flow control based on 802.1p priorities (classes of service). +message Layer1Ieee8021qbb { - // Specifies the amount of bandwidth that can be reserved for the Priority 0. - // default = 125000000 - optional uint32 pb0 = 1; + // The upper limit on the transmit time of a queue after receiving a + // message to pause a specified priority. + // A value of 0 or null indicates that pfc delay will not be enabled. + // default = 0 + optional uint32 pfc_delay = 1; - // Specifies the amount of bandwidth that can be reserved for the Priority 1. - // default = 125000000 - optional uint32 pb1 = 2; + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 0 + optional uint32 pfc_class_0 = 2; - // Specify the amount of bandwidth that can be reserved for the Priority 2. - // default = 125000000 - optional uint32 pb2 = 3; + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 1 + optional uint32 pfc_class_1 = 3; - // Specifies the amount of bandwidth that can be reserved for the Priority 3. - // default = 125000000 - optional uint32 pb3 = 4; + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 2 + optional uint32 pfc_class_2 = 4; - // Specifies the amount of bandwidth that can be reserved for the Priority 4. - // default = 125000000 - optional uint32 pb4 = 5; + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 3 + optional uint32 pfc_class_3 = 5; - // Specifies the amount of bandwidth that can be reserved for the Priority 5. - // default = 125000000 - optional uint32 pb5 = 6; + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 4 + optional uint32 pfc_class_4 = 6; - // Specifies the amount of bandwidth that can be reserved for the Priority 6. - // default = 125000000 - optional uint32 pb6 = 7; + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 5 + optional uint32 pfc_class_5 = 7; - // Specifies the amount of bandwidth that can be reserved for the Priority 7. - // default = 125000000 - optional uint32 pb7 = 8; + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 6 + optional uint32 pfc_class_6 = 8; + + // The valid values are null, 0 - 7. + // A null value indicates there is no setting for this pfc class. + // default = 7 + optional uint32 pfc_class_7 = 9; } -// Optional container for circuit authentication properties. -message IsisInterfaceAuthentication { +// Under Review: There may be changes in filter configuration +// +// Under Review: There may be changes in filter configuration +// +// Configuration for capture settings. +message Capture { - message AuthType { + // The unique names of ports that the capture settings will apply to. Port_names cannot + // be duplicated between capture objects. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + repeated string port_names = 1; + + // A list of filters to apply to the capturing ports. If no filters are specified then + // all packets will be captured. A capture can have multiple filters. The number of + // filters supported is determined by the implementation which can be retrieved using + // the capabilities API. + // When multiple filters are specified the capture implementation must && (and) all + // the filters. + repeated CaptureFilter filters = 2; + + // Overwrite the capture buffer. + // default = True + optional bool overwrite = 3; + + // The maximum size of each captured packet. If no value is specified or it is null + // then the entire packet will be captured. + optional uint32 packet_size = 4; + + message Format { enum Enum { unspecified = 0; - md5 = 1; - password = 2; + pcap = 1; + pcapng = 2; } } - // The circuit authentication method. - // required = true - optional AuthType.Enum auth_type = 1; - - // MD5 key to be used for authentication. - optional string md5 = 2; + // The format of the capture file. + // default = Format.Enum.pcap + optional Format.Enum format = 5; - // The password, in clear text, to be used for Authentication. - optional string password = 3; + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 6; } -// Optional container for advanced interface properties. -message IsisInterfaceAdvanced { +// Configuration for capture filters +message CaptureFilter { - // If a padded Hello message is received on the interface, the length of - // the Hello packets sent out on that interface is adjusted to match. - // default = True - optional bool auto_adjust_mtu = 1; + message Choice { + enum Enum { + unspecified = 0; + custom = 1; + ethernet = 2; + vlan = 3; + ipv4 = 4; + ipv6 = 5; + } + } + // The type of capture filter. + // default = Choice.Enum.custom + optional Choice.Enum choice = 1; - // If a Level 1 Hello is received on this emulated router for an area - // not currently in its area list, an area from the received Hello is - // added to that list. This ensures an area match for all future - // Level 1 Hellos from the source L1 router. - // default = True - optional bool auto_adjust_area = 2; + // Offset from last filter in the list. If no filters are present it is offset from + // position 0. Multiple custom filters can be present, the length of each custom filter + // is the length of the value being filtered. + CaptureCustom custom = 2; - // If a Hello message listing supported protocols is received on this - // emulated router, the supported protocols advertised by this router - // are changed to match exactly. - // default = False - optional bool auto_adjust_supported_protocols = 3; + // Description missing in models + CaptureEthernet ethernet = 3; - // If it is true, the Point-to-Point circuit will include 3-way TLV in its Point-to-Point - // IIH and attempt to establish the adjacency as specified in RFC 5303. This field - // is not applicable if network_type is set to 'broadcast' type in ISIS interface. - // default = True - optional bool enable_3way_handshake = 4; + // Description missing in models + CaptureVlan vlan = 4; - // If it is true, the Point-to-Point Hello messages will be sent to the unicast MAC - // address. - // default = False - optional bool p2p_hellos_to_unicast_mac = 5; + // Description missing in models + CaptureIpv4 ipv4 = 5; + + // Description missing in models + CaptureIpv6 ipv6 = 6; } -// Optional container for the link protection sub TLV (type 20). -message IsisInterfaceLinkProtection { +// Description missing in models +message CaptureCustom { - // Enable this to protect other link or links. LSPs on a link of this type are lost - // if any of the links fail. - // default = False - optional bool extra_traffic = 1; + // The bit offset of field to filter on + optional uint32 offset = 1; - // Enabling this signifies that there is no other link protecting this - // link. LSPs on a link of this type are lost if the link fails. - // default = False - optional bool unprotected = 2; + // The bit length of field to filter on + // default = 8 + optional uint32 bit_length = 2; - // Enable this to share the Extra Traffic links between one or more - // links of type Shared.There are one or more disjoint links of type - // Extra Traffic that are protecting this link. - // default = False - optional bool shared = 3; + // Description missing in models + // default = 00 + optional string value = 3; - // Enabling this signifies that there is one dedicated disjoint link - // of type Extra Traffic that is protecting this link. - // default = False - optional bool dedicated_1_to_1 = 4; + // Description missing in models + // default = 00 + optional string mask = 4; - // Enabling this signifies that a dedicated disjoint link is protecting - // this link. However, the protecting link is not advertised in the - // link state database and is therefore not available for the routing - // of LSPs. + // Description missing in models // default = False - optional bool dedicated_1_plus_1 = 5; + optional bool negate = 5; +} - // Enabling this signifies that a protection scheme that is more - // reliable than Dedicated 1+1. - // default = False - optional bool enhanced = 6; +// Description missing in models +message CaptureField { - // This is a Protection Scheme with value 0x40. - // default = False - optional bool reserved_40 = 7; + // Description missing in models + // default = 00 + optional string value = 1; - // This is a Protection Scheme with value 0x80. + // Description missing in models + // default = 00 + optional string mask = 2; + + // Description missing in models // default = False - optional bool reserved_80 = 8; + optional bool negate = 3; } -// This contains ISIS router basic properties. -message IsisBasic { +// Description missing in models +message CaptureEthernet { - // IPv4 Traffic Engineering(TE) router id. This address should be configured as an IPv4 - // Loopback address in 'ipv4_loopbacks' in the Device. - optional string ipv4_te_router_id = 1; + // Description missing in models + CaptureField src = 1; - // Host name for the router. The host name is transmitted in all the packets sent from - // the router. - optional string hostname = 2; + // Description missing in models + CaptureField dst = 2; - // When set to true, it allows sending of more detailed metric information for the - // routes using 32-bit wide values using TLV 135 IP reachability and more detailed - // reachability information for IS reachability by using TLV 22. The detailed usage - // is described in RFC3784. - // default = True - optional bool enable_wide_metric = 3; + // Description missing in models + CaptureField ether_type = 3; - // Configuration for controlling storage of ISIS learned LSPs are received from the - // neighbors. - // default = False - optional bool learned_lsp_filter = 4; + // Description missing in models + CaptureField pfc_queue = 4; } -// Contains ISIS router advanced properties. -message IsisAdvanced { +// Description missing in models +message CaptureVlan { - // It enables padding of Hello message to MTU size. - // default = True - optional bool enable_hello_padding = 1; + // Description missing in models + CaptureField priority = 1; - // The Number of Area Addresses permitted, with a valid range from 0 to 254. A zero - // indicates a maximum of 3 addresses. - // default = 3 - optional uint32 max_area_addresses = 2; + // Description missing in models + CaptureField cfi = 2; - // Its combination of the ISP and HO-DSP.Usually all nodes within an area have the - // same area address. If no area addresses are configured, a default area of 490001 - // will be advertised. - repeated string area_addresses = 3; + // Description missing in models + CaptureField id = 3; - // The rate at which LSPs are re-sent in seconds. - // default = 600 - optional uint32 lsp_refresh_rate = 4; + // Description missing in models + CaptureField protocol = 4; +} - // The MaxAge for retaining a learned LSP on this router in seconds. - // default = 1200 - optional uint32 lsp_lifetime = 5; +// Description missing in models +message CaptureIpv4 { - // The number of milliseconds between transmissions of Partial Sequence Number PDU. - // default = 2000 - optional uint32 psnp_interval = 6; + // Description missing in models + CaptureField version = 1; - // The number of milliseconds between transmissions of Partial Sequence Number PDU. - // default = 10000 - optional uint32 csnp_interval = 7; + // Description missing in models + CaptureField header_length = 2; - // The maximum size in bytes of any LSP that can be transmitted over a link of equal - // or less than maximum MTU size. - // default = 1492 - optional uint32 max_lsp_size = 8; + // Description missing in models + CaptureField priority = 3; - // The number of seconds between transmissions of LSPs/MGROUP-PDUs. - // default = 5000 - optional uint32 lsp_mgroup_min_trans_interval = 9; + // Description missing in models + CaptureField total_length = 4; - // If the Attached bit is enabled, it indicates that the ISIS router is attached to - // another area or the Level 2 backbone. The purpose of an Attached-Bit is to accomplish - // Inter-Area Routing. When an L1/L2 router is connected to more than one area, it - // sets the Attached-bit on its L1 LSP. This can cause a default route ( 0.0.0.0/0 ) - // to be installed by the receiving router. - // default = True - optional bool enable_attached_bit = 10; -} + // Description missing in models + CaptureField identification = 5; -// This contains ISIS Area/Domain authentication properties. -message IsisAuthentication { + // Description missing in models + CaptureField reserved = 6; - // Do not verify MD5 checksum in received LSPs. - // default = True - optional bool ignore_receive_md5 = 1; + // Description missing in models + CaptureField dont_fragment = 7; - // The Area authentication method used for the emulated ISIS router. - // This is used for L1 LSPs. - IsisAuthenticationBase area_auth = 2; + // Description missing in models + CaptureField more_fragments = 8; - // The Domain authentication method used for the emulated ISIS router. - // This is used for L2 LSPs. - IsisAuthenticationBase domain_auth = 3; -} + // Description missing in models + CaptureField fragment_offset = 9; -// Optional container for ISIS authentication properties. -message IsisAuthenticationBase { + // Description missing in models + CaptureField time_to_live = 10; - message AuthType { - enum Enum { - unspecified = 0; - md5 = 1; - password = 2; - } - } - // The authentication method. - // required = true - optional AuthType.Enum auth_type = 1; + // Description missing in models + CaptureField protocol = 11; - // Authentication as an MD5 key. - optional string md5 = 2; + // Description missing in models + CaptureField header_checksum = 12; - // Authentication as a clear text password. - optional string password = 3; -} + // Description missing in models + CaptureField src = 13; -// Emulated ISIS IPv4 routes. -message IsisV4RouteRange { + // Description missing in models + CaptureField dst = 14; +} - // A list of group of IPv4 route addresses. - repeated V4RouteAddress addresses = 1; +// Description missing in models +message CaptureIpv6 { - // The user-defined metric associated with this route range. - // default = 0 - optional uint32 link_metric = 2; + // Description missing in models + CaptureField version = 1; - message OriginType { - enum Enum { - unspecified = 0; - internal = 1; - external = 2; - } - } - // The origin of the advertised route-internal or external to the ISIS area. Options - // include the following: - // Internal-for intra-area routes, through Level 1 LSPs. - // External-for inter-area routes redistributed within L1, through Level - // 1 LSPs. - // default = OriginType.Enum.internal - optional OriginType.Enum origin_type = 3; + // Description missing in models + CaptureField traffic_class = 2; - message RedistributionType { - enum Enum { - unspecified = 0; - up = 1; - down = 2; - } - } - // Defines the Up/Down (Redistribution) bit defined for TLVs 128 and 130 by RFC 2966. - // It is used for domain-wide advertisement of prefix information. - // - // Up (0)-used when a prefix is initially advertised within the ISIS L3 - // hierarchy, - // and for all other prefixes in L1 and L2 LSPs. (default) - // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. - // - // The prefixes are being advertised from a higher level (L2) down to a lower level - // (L1). - // default = RedistributionType.Enum.up - optional RedistributionType.Enum redistribution_type = 4; + // Description missing in models + CaptureField flow_label = 3; - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 5; + // Description missing in models + CaptureField payload_length = 4; - // Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability Attribute Flags - // will be advertised or not. - // default = False - optional bool prefix_attr_enabled = 6; + // Description missing in models + CaptureField next_header = 5; - // External Prefix Flag (Bit 0) - // default = False - optional bool x_flag = 7; + // Description missing in models + CaptureField hop_limit = 6; - // Re-advertisement Flag (Bit 1) - // default = False - optional bool r_flag = 8; + // Description missing in models + CaptureField src = 7; - // Node Flag (Bit 2) - // default = False - optional bool n_flag = 9; + // Description missing in models + CaptureField dst = 8; } -// A container for IPv4 route addresses. -message V4RouteAddress { +// A container for emulated or simulated interfaces, loopback interfaces and protocol +// configurations. +message Device { - // The starting address of the network. - // required = true - optional string address = 1; + // Ethernet configuration for one or more emulated or simulated network interfaces. + repeated DeviceEthernet ethernets = 1; - // The IPv4 network prefix length to be applied to the address. - // default = 24 - optional uint32 prefix = 2; + // IPv4 Loopback interface that can be attached to an Ethernet in the same device or + // to an Ethernet in another device. + repeated DeviceIpv4Loopback ipv4_loopbacks = 2; - // The total number of addresses in the range. - // default = 1 - optional uint32 count = 3; + // IPv6 Loopback interface that can be attached to an Ethernet in the same device or + // to an Ethernet in another device. + repeated DeviceIpv6Loopback ipv6_loopbacks = 3; - // Increments the network address prefixes within a route range where multiple routes - // are present. The value is incremented according to the Prefix Length and Step. - // default = 1 - optional uint32 step = 4; -} + // The properties of an IS-IS router and its children, such as IS-IS interfaces and + // route ranges. + DeviceIsisRouter isis = 4; -// A container for IPv6 route addresses. -message V6RouteAddress { + // The properties of BGP router and its children, such as BGPv4, BGPv6 peers and their + // route ranges. + DeviceBgpRouter bgp = 5; - // The starting address of the network. + // Configuration of VXLAN tunnel interfaces RFC Ref: https://datatracker.ietf.org/doc/html/rfc7348 + DeviceVxlan vxlan = 6; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. // required = true - optional string address = 1; + optional string name = 7; - // The IPv6 network prefix length to be applied to the address. - // default = 64 - optional uint32 prefix = 2; + // The properties of an RSVP router and its children. + DeviceRsvp rsvp = 8; - // The total number of addresses in the range. - // default = 1 - optional uint32 count = 3; + // The properties of DHCP Server and its children, such as DHCPv4, DHCPv6 servers. + DeviceDhcpServer dhcp_server = 9; - // Increments the network address prefixes within a route range where multiple routes - // are present. The value is incremented according to the Prefix Length and Step. - // default = 1 - optional uint32 step = 4; + // Configuration for OSPFv2 router. + DeviceOspfv2Router ospfv2 = 10; } -// A container for MAC route addresses. -message MACRouteAddress { +// Common options that apply to all configured protocols and interfaces. +message ProtocolOptions { - // The starting address of the MAC Range. - // required = true - optional string address = 1; + // When set to true, all underlying resources for configured protocols and interfaces + // shall be created and corresponding protocol session negotiation shall be initiated. + // Otherwise, when set to false, corresponding protocol session negotiation will need + // to be initiated using a separate set_protocol_state API call. + // default = True + optional bool auto_start_all = 1; +} - // The MAC prefix length to be applied to the address. - // default = 48 - optional uint32 prefix = 2; +// A container of properties for an ISIS router and its interfaces. +message DeviceIsisRouter { - // The total number of mac addresses in the range. - // default = 1 - optional uint32 count = 3; + // This contains the properties of a Multi-Instance-capable routers or MI-RTR. Each + // router can emulate one ISIS instance at a time. + DeviceIsisMultiInstance instance = 1; - // Increments the mac address prefixes within a mac range where multiple routes are - // present. The value is incremented according to the mac prefix Length and Step. - // default = 1 - optional uint32 step = 4; -} + // The System ID for this emulated ISIS router, e.g. 640100010000. + // required = true + optional string system_id = 2; -// Emulated ISIS IPv6 routes. -message IsisV6RouteRange { + // List of ISIS interfaces for this router. + repeated IsisInterface interfaces = 3; - // A list of group of IPv6 route addresses. - repeated V6RouteAddress addresses = 1; + // Contains basic properties of an ISIS Router. + IsisBasic basic = 4; - // The user-defined metric associated with this route range. - // default = 0 - optional uint32 link_metric = 2; + // Contains advance properties of an ISIS Router.. + IsisAdvanced advanced = 5; - message OriginType { - enum Enum { - unspecified = 0; - internal = 1; - external = 2; - } - } - // The origin of the advertised route-internal or external to the ISIS area. Options - // include the following: - // Internal-for intra-area routes, through Level 1 LSPs. - // External-for inter-area routes redistributed within L1, through Level - // 1 LSPs. - // default = OriginType.Enum.internal - optional OriginType.Enum origin_type = 3; + // ISIS Router authentication properties. + IsisAuthentication router_auth = 6; - message RedistributionType { - enum Enum { - unspecified = 0; - up = 1; - down = 2; - } - } - // Defines the Up/Down (Redistribution) bit defined for TLVs 128 and 130 by RFC 2966. - // It is used for domain-wide advertisement of prefix information. - // - // Up (0)-used when a prefix is initially advertised within the ISIS L3 - // hierarchy, - // and for all other prefixes in L1 and L2 LSPs. (default) - // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. - // - // The prefixes are being advertised from a higher level (L2) down to a lower level - // (L1). - // default = RedistributionType.Enum.up - optional RedistributionType.Enum redistribution_type = 4; + // Emulated ISIS IPv4 routes. + repeated IsisV4RouteRange v4_routes = 7; + + // Emulated ISIS IPv6 routes. + repeated IsisV6RouteRange v6_routes = 8; // Globally unique name of an object. It also serves as the primary key for arrays of // objects. // required = true - optional string name = 5; - - // Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability Attribute Flags - // will be advertised or not. - // default = False - optional bool prefix_attr_enabled = 6; + optional string name = 9; +} - // External Prefix Flag (Bit 0) - // default = False - optional bool x_flag = 7; +// This container properties of an Multi-Instance-capable router (MI-RTR). +message DeviceIsisMultiInstance { - // Re-advertisement Flag (Bit 1) - // default = False - optional bool r_flag = 8; + // Instance Identifier (IID) TLV will associate a PDU with an ISIS instance by using + // a unique 16-bit number and including one or more Instance-Specific Topology Identifiers + // (ITIDs). + // default = 1 + optional uint32 iid = 1; - // Node Flag (Bit 2) - // default = False - optional bool n_flag = 9; + // This contains one or more ITIDs that will be advertised in IID TLV. + repeated uint32 itids = 2; } -// Configuration for one or more IPv4 or IPv6 BGP peers. -message DeviceBgpRouter { +// Configuration for single ISIS interface. +message IsisInterface { - // The BGP router ID is a unique identifier used by BGP. It is a 32-bit value that is - // often represented by an IPv4 address. + // The unique name of the Ethernet interface on which ISIS is running. Two ISIS interfaces + // cannot share the same Ethernet. The underlying Ethernet Interface can an emulated + // or simulated interface. A simulated ethernet interface can be assumed to be connected + // by a primary (internal to a simulated topology) or a secondary link (connected + // to a device behind a different simulated topology). + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // // required = true - optional string router_id = 1; - - // This contains an array of references to IPv4 interfaces, each of which will have - // list of peers to different destinations. - repeated BgpV4Interface ipv4_interfaces = 2; - - // This contains an array of references to IPv6 interfaces, each of which will have - // list of peers to different destinations. - repeated BgpV6Interface ipv6_interfaces = 3; -} + optional string eth_name = 1; -// All errors detected while processing the Message Header are indicated by sending -// the NOTIFICATION message with the Error Code-Message Header Error. The Error Subcode -// elaborates on the specific nature of the error. -message DeviceBgpMessageHeaderError { + // The default metric cost for the interface. + // default = 10 + optional uint32 metric = 2; - message Subcode { + message NetworkType { enum Enum { unspecified = 0; - connection_not_synchronized_code1_subcode1 = 1; - bad_message_length_code1_subcode2 = 2; - bad_message_type_code1_subcode3 = 3; + broadcast = 1; + point_to_point = 2; } } - // The Error Subcode indicates the specific type of error encountered during Message - // Header processing. - // default = Subcode.Enum.connection_not_synchronized_code1_subcode1 - optional Subcode.Enum subcode = 1; -} - -// All errors detected while processing the OPEN message are indicated by sending the -// NOTIFICATION message with the Error Code-Open Message Error. The Error Subcode elaborates -// on the specific nature of the error. -message DeviceBgpOpenMessageError { + // The type of network link. + // default = NetworkType.Enum.broadcast + optional NetworkType.Enum network_type = 3; - message Subcode { + message LevelType { enum Enum { unspecified = 0; - unsupported_version_number_code2_subcode1 = 1; - error_peer_as_code2_subcode2 = 2; - error_bgp_id_code2_subcode3 = 3; - unsupported_optional_parameter_code2_subcode4 = 4; - auth_failed_code2_subcode5 = 5; - unsupported_hold_time_code2_subcode6 = 6; - unsupported_capability_code2_subcode7 = 7; + level_1 = 1; + level_2 = 2; + level_1_2 = 3; } } - // The Error Subcode indicates the specific type of error encountered during OPEN message - // processing. - // default = Subcode.Enum.unsupported_version_number_code2_subcode1 - optional Subcode.Enum subcode = 1; -} + // This indicates whether this router is participating in Level-1 (L1), + // Level-2 (L2) or both L1 and L2 domains on this interface. + // default = LevelType.Enum.level_2 + optional LevelType.Enum level_type = 4; -// All errors detected while processing the UPDATE message are indicated by sending -// the NOTIFICATION message with the Error Code-Update Message Error. The Error Subcode -// elaborates on the specific nature of the error. -message DeviceBgpUpdateMessageError { + // Settings of Level 1 Hello. + IsisInterfaceLevel l1_settings = 5; - message Subcode { - enum Enum { - unspecified = 0; - malformed_attrib_list_code3_subcode1 = 1; - unrecognized_wellknown_attrib_code3_subcode2 = 2; - wellknown_attrib_missing_code3_subcode3 = 3; - attrib_flags_error_code3_subcode4 = 4; - attrib_length_error_code3_subcode5 = 5; - invalid_origin_attrib_code3_subcode6 = 6; - as_routing_loop_code3_subcode7 = 7; - invalid_nhop_attrib_code3_subcode8 = 8; - error_optional_attrib_code3_subcode9 = 9; - invalid_network_field_code3_subcode10 = 10; - abnormal_aspath_code3_subcode11 = 11; - } - } - // The Error Subcode, the specific type of error encountered during UPDATE processing. - // default = Subcode.Enum.malformed_attrib_list_code3_subcode1 - optional Subcode.Enum subcode = 1; -} + // Settings of Level 2 Hello. + IsisInterfaceLevel l2_settings = 6; -// If a system does not receive successive KEEPALIVE, UPDATE, and/or NOTIFICATION messages -// within the period specified in the Hold Time field of the OPEN message, then the -// NOTIFICATION message with the Hold Timer Expired Error Code(Error Code 4) is sent -// and the BGP connection is closed. The Sub Code used is 0. If a user wants to use -// non zero Sub Code then CustomError can be used. -message DeviceBgpHoldTimerExpired { -} + // Contains the properties of multiple topologies. + repeated IsisMT multi_topology_ids = 7; -// Any error detected by the BGP Finite State Machine (e.g., receipt of an unexpected -// event) is indicated by sending the NOTIFICATION message with the Error Code-Finite -// State Machine Error(Error Code 5). The Sub Code used is 0. If a user wants to use -// non zero Sub Code then CustomError can be used. -message DeviceBgpFiniteStateMachineError { -} + // Contains a list of Traffic Engineering attributes. + repeated LinkStateTE traffic_engineering = 8; -// In the absence of any fatal errors, a BGP peer can close its BGP connection by sending -// the NOTIFICATION message with the Error Code Cease. -message DeviceBgpCeaseError { + // The Circuit authentication method used for the interfaces on this emulated ISIS v4/v6 + // router. + IsisInterfaceAuthentication authentication = 9; - message Subcode { - enum Enum { - unspecified = 0; - max_number_prefix_reached_code6_subcode1 = 1; - admin_shutdown_code6_subcode2 = 2; - peer_deleted_code6_subcode3 = 3; - admin_reset_code6_subcode4 = 4; - connection_reject_code6_subcode5 = 5; - other_config_changes_code6_subcode6 = 6; - connection_collision_resolution_code6_subcode7 = 7; - out_of_resources_code6_subcode8 = 8; - bfd_session_down_code6_subcode9 = 9; - } - } - // The Error Subcode to be sent to the peer in the Cease NOTIFICATION. - // default = Subcode.Enum.admin_shutdown_code6_subcode2 - optional Subcode.Enum subcode = 1; -} + // Optional container for advanced interface properties. + IsisInterfaceAdvanced advanced = 10; -// A BGP peer can send NOTIFICATION message with user defined Error Code and Error Subcode. -message DeviceBgpCustomError { + // Link protection on the ISIS link between two interfaces. + IsisInterfaceLinkProtection link_protection = 11; - // The Error code to be sent in the NOTIFICATION message to peer. - optional uint32 code = 1; + // This contains list of SRLG values for the link between two interfaces. + repeated uint32 srlg_values = 12; - // The Error Subcode to be sent in the NOTIFICATION message to peer. - optional uint32 subcode = 2; + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 13; } -// Configuration for emulated BGPv4 peers and routes. -message BgpV4Peer { - - // IPv4 address of the BGP peer for the session. - // required = true - optional string peer_address = 1; +// Configuration for the properties of Level 1 Hello. +message IsisInterfaceLevel { - // This contains the list of Ethernet Virtual Private Network (EVPN) Ethernet Segments - // (ES) Per BGP Peer for IPv4 Address Family Identifier (AFI). - // - // Each Ethernet Segment contains a list of EVPN Instances (EVIs) . - // Each EVI contains a list of Broadcast Domains. - // Each Broadcast Domain contains a list of MAC/IP Ranges. - // - // is responsible for advertising Ethernet - // Auto-discovery Route Per EVI (Type 1). - // - // is responsible for advertising Ethernet Auto-discovery Route - // Per Ethernet Segment (Type 1). - // - // is responsible for advertising - // MAC/IP Advertisement Route (Type 2). - // - // is responsible for advertising Inclusive - // Multicast Ethernet Tag Route (Type 3). - // - // Ethernet Segment is responsible for advertising Ethernet Segment Route (Type 4). - repeated BgpV4EthernetSegment evpn_ethernet_segments = 2; + // The Priority setting in Level 1 LAN Hellos for Designated Router election. + // default = 0 + optional uint32 priority = 1; - message AsType { - enum Enum { - unspecified = 0; - ibgp = 1; - ebgp = 2; - } - } - // The type of BGP autonomous system. External BGP is used for BGP links between two - // or more autonomous systems (ebgp). Internal BGP is used within a single autonomous - // system (ibgp). BGP property defaults are aligned with this object defined as an internal - // BGP peer. If the as_type is specified as 'ebgp' then other properties will need to - // be specified as per an external BGP peer. Specifically, for 'ebgp', 'as_set_mode' - // attribute in 'as_path' field in any Route Range should be changed from default value - // 'do_not_include_local_as' to any other value. - // required = true - optional AsType.Enum as_type = 3; + // The Hello interval for Level 1 Hello messages, in seconds. + // default = 10 + optional uint32 hello_interval = 2; - // Autonomous System Number (AS number or ASN) - // required = true - optional uint32 as_number = 4; + // The Dead (Holding Time) interval for Level 1 Hello messages, in seconds. + // default = 30 + optional uint32 dead_interval = 3; +} - message AsNumberWidth { - enum Enum { - unspecified = 0; - two = 1; - four = 2; - } - } - // The width in bytes of the as_number values. Any as_number values that exceeds the - // width MUST result in an error. - // default = AsNumberWidth.Enum.four - optional AsNumberWidth.Enum as_number_width = 5; +// Configuration of properties per interface per topology when multiple topologies are +// configured in an ISIS router. +// in a ISIS router. +message IsisMT { - // Description missing in models - BgpAdvanced advanced = 6; + // The Multi Topology ID for one of the topologies supported on the ISIS interface. + // default = 0 + optional uint32 mt_id = 1; - // Description missing in models - BgpCapability capability = 7; + // Specifies the link metric for this topology on the ISIS interface. + // default = 10 + optional uint32 link_metric = 2; +} - // Description missing in models - BgpLearnedInformationFilter learned_information_filter = 8; +// A container for Traffic Engineering properties on a interface. +message LinkStateTE { - // Emulated BGPv4 route ranges. - repeated BgpV4RouteRange v4_routes = 9; + // The Administrative group sub-TLV (sub-TLV 3). It is a 4-octet + // user-defined bit mask used to assign administrative group numbers + // to the interface, for use in assigning colors and resource classes. + // Each set bit corresponds to a single administrative group for this + // interface. The settings translate into Group numbers, which range + // from 0 to 31 (integers). + // default = 00000000 + optional string administrative_group = 1; - // Emulated BGPv6 route ranges. - repeated BgpV6RouteRange v6_routes = 10; + // The user-assigned link metric for Traffic Engineering. + // default = 0 + optional uint32 metric_level = 2; - // Segment Routing Traffic Engineering (SR TE) Policies for IPv4 Address Family Identifier - // (AFI). - repeated BgpSrteV4Policy v4_srte_policies = 11; + // The maximum link bandwidth (sub-TLV 9) in bytes/sec allowed for this + // link for a direction. + // default = 125000000 + optional uint32 max_bandwith = 3; - // Segment Routing Traffic Engineering (SR TE) Policies for IPv6 Address Family Identifier - // (AFI). - repeated BgpSrteV6Policy v6_srte_policies = 12; + // The maximum link bandwidth (sub-TLV 10) in bytes/sec allowed for this + // link in a direction. + // default = 125000000 + optional uint32 max_reservable_bandwidth = 4; - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 13; + // Configuration of bandwidths of priority 0 through priority 7. + LinkStatepriorityBandwidths priority_bandwidths = 5; +} - // Description missing in models - BgpGracefulRestart graceful_restart = 14; +// Specifies the amount of bandwidth that can be reserved with a setup priority of 0 +// +// through 7, arranged in increasing order with priority 0 having highest priority. +// +// In ISIS, this is sent in sub-TLV (11) of Extended IS Reachability TLV. +message LinkStatepriorityBandwidths { - // BGP Updates to be sent to the peer as specified after the session is established. - // - BgpUpdateReplay replay_updates = 15; -} + // Specifies the amount of bandwidth that can be reserved for the Priority 0. + // default = 125000000 + optional uint32 pb0 = 1; -// Configuration for emulated BGPv4 peers and routes on a single IPv4 interface. -message BgpV4Interface { + // Specifies the amount of bandwidth that can be reserved for the Priority 1. + // default = 125000000 + optional uint32 pb1 = 2; - // The unique name of the IPv4 or Loopback IPv4 interface used as the source IP for - // this list of BGP peers. - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv4Loopback/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv4Loopback/properties/name - // - // required = true - optional string ipv4_name = 1; + // Specify the amount of bandwidth that can be reserved for the Priority 2. + // default = 125000000 + optional uint32 pb2 = 3; - // This contains the list of BGPv4 peers configured on this interface. - repeated BgpV4Peer peers = 2; -} + // Specifies the amount of bandwidth that can be reserved for the Priority 3. + // default = 125000000 + optional uint32 pb3 = 4; -// Configuration for BGP Ethernet Segment ranges. Advertises following routes - -// -// Type 4 - Ethernet Segment Route -message BgpV4EthernetSegment { + // Specifies the amount of bandwidth that can be reserved for the Priority 4. + // default = 125000000 + optional uint32 pb4 = 5; - // Designated Forwarder (DF) election configuration. - BgpEthernetSegmentDfElection df_election = 1; + // Specifies the amount of bandwidth that can be reserved for the Priority 5. + // default = 125000000 + optional uint32 pb5 = 6; - // This contains the list of EVIs. - repeated BgpV4EvpnEvis evis = 2; + // Specifies the amount of bandwidth that can be reserved for the Priority 6. + // default = 125000000 + optional uint32 pb6 = 7; - // 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero - // ESI is '10000000000000000000' . - // default = 00000000000000000000 - optional string esi = 3; + // Specifies the amount of bandwidth that can be reserved for the Priority 7. + // default = 125000000 + optional uint32 pb7 = 8; +} - message ActiveMode { +// Optional container for circuit authentication properties. +message IsisInterfaceAuthentication { + + message AuthType { enum Enum { unspecified = 0; - single_active = 1; - all_active = 2; + md5 = 1; + password = 2; } } - // Single Active or All Active mode Redundancy mode selection for Multi-home. - // default = ActiveMode.Enum.all_active - optional ActiveMode.Enum active_mode = 4; - - // The label value to be advertised as ESI Label in ESI Label Extended Community. This - // is included in Ethernet Auto-discovery per ES Routes advertised by a router. - // default = 0 - optional uint32 esi_label = 5; - - // Description missing in models - BgpRouteAdvanced advanced = 6; - - // Optional community settings. - repeated BgpCommunity communities = 7; + // The circuit authentication method. + // required = true + optional AuthType.Enum auth_type = 1; - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. - repeated BgpExtCommunity ext_communities = 8; + // MD5 key to be used for authentication. + optional string md5 = 2; - // Optional AS PATH settings. - BgpAsPath as_path = 9; + // The password, in clear text, to be used for Authentication. + optional string password = 3; } -// Configuration for Designated Forwarder (DF) election among the Provider Edge (PE) -// routers on the same Ethernet Segment. -message BgpEthernetSegmentDfElection { +// Optional container for advanced interface properties. +message IsisInterfaceAdvanced { - // The DF election timer in seconds. - // default = 3 - optional uint32 election_timer = 1; -} + // If a padded Hello message is received on the interface, the length of + // the Hello packets sent out on that interface is adjusted to match. + // default = True + optional bool auto_adjust_mtu = 1; + + // If a Level 1 Hello is received on this emulated router for an area + // not currently in its area list, an area from the received Hello is + // added to that list. This ensures an area match for all future + // Level 1 Hellos from the source L1 router. + // default = True + optional bool auto_adjust_area = 2; + + // If a Hello message listing supported protocols is received on this + // emulated router, the supported protocols advertised by this router + // are changed to match exactly. + // default = False + optional bool auto_adjust_supported_protocols = 3; + + // If it is true, the Point-to-Point circuit will include 3-way TLV in its Point-to-Point + // IIH and attempt to establish the adjacency as specified in RFC 5303. This field + // is not applicable if network_type is set to 'broadcast' type in ISIS interface. + // default = True + optional bool enable_3way_handshake = 4; + + // If it is true, the Point-to-Point Hello messages will be sent to the unicast MAC + // address. + // default = False + optional bool p2p_hellos_to_unicast_mac = 5; +} + +// Optional container for the link protection sub TLV (type 20). +message IsisInterfaceLinkProtection { + + // Enable this to protect other link or links. LSPs on a link of this type are lost + // if any of the links fail. + // default = False + optional bool extra_traffic = 1; + + // Enabling this signifies that there is no other link protecting this + // link. LSPs on a link of this type are lost if the link fails. + // default = False + optional bool unprotected = 2; + + // Enable this to share the Extra Traffic links between one or more + // links of type Shared.There are one or more disjoint links of type + // Extra Traffic that are protecting this link. + // default = False + optional bool shared = 3; + + // Enabling this signifies that there is one dedicated disjoint link + // of type Extra Traffic that is protecting this link. + // default = False + optional bool dedicated_1_to_1 = 4; + + // Enabling this signifies that a dedicated disjoint link is protecting + // this link. However, the protecting link is not advertised in the + // link state database and is therefore not available for the routing + // of LSPs. + // default = False + optional bool dedicated_1_plus_1 = 5; + + // Enabling this signifies that a protection scheme that is more + // reliable than Dedicated 1+1. + // default = False + optional bool enhanced = 6; + + // This is a Protection Scheme with value 0x40. + // default = False + optional bool reserved_40 = 7; + + // This is a Protection Scheme with value 0x80. + // default = False + optional bool reserved_80 = 8; +} + +// This contains ISIS router basic properties. +message IsisBasic { + + // IPv4 Traffic Engineering(TE) router id. This address should be configured as an IPv4 + // Loopback address in 'ipv4_loopbacks' in the Device. + optional string ipv4_te_router_id = 1; + + // Host name for the router. The host name is transmitted in all the packets sent from + // the router. + optional string hostname = 2; + + // When set to true, it allows sending of more detailed metric information for the + // routes using 32-bit wide values using TLV 135 IP reachability and more detailed + // reachability information for IS reachability by using TLV 22. The detailed usage + // is described in RFC3784. + // default = True + optional bool enable_wide_metric = 3; + + // Configuration for controlling storage of ISIS learned LSPs are received from the + // neighbors. + // default = False + optional bool learned_lsp_filter = 4; +} + +// Contains ISIS router advanced properties. +message IsisAdvanced { + + // It enables padding of Hello message to MTU size. + // default = True + optional bool enable_hello_padding = 1; + + // The Number of Area Addresses permitted, with a valid range from 0 to 254. A zero + // indicates a maximum of 3 addresses. + // default = 3 + optional uint32 max_area_addresses = 2; + + // Its combination of the ISP and HO-DSP.Usually all nodes within an area have the + // same area address. If no area addresses are configured, a default area of 490001 + // will be advertised. + repeated string area_addresses = 3; + + // The rate at which LSPs are re-sent in seconds. + // default = 600 + optional uint32 lsp_refresh_rate = 4; + + // The MaxAge for retaining a learned LSP on this router in seconds. + // default = 1200 + optional uint32 lsp_lifetime = 5; + + // The number of milliseconds between transmissions of Partial Sequence Number PDU. + // default = 2000 + optional uint32 psnp_interval = 6; + + // The number of milliseconds between transmissions of Partial Sequence Number PDU. + // default = 10000 + optional uint32 csnp_interval = 7; + + // The maximum size in bytes of any LSP that can be transmitted over a link of equal + // or less than maximum MTU size. + // default = 1492 + optional uint32 max_lsp_size = 8; + + // The number of seconds between transmissions of LSPs/MGROUP-PDUs. + // default = 5000 + optional uint32 lsp_mgroup_min_trans_interval = 9; + + // If the Attached bit is enabled, it indicates that the ISIS router is attached to + // another area or the Level 2 backbone. The purpose of an Attached-Bit is to accomplish + // Inter-Area Routing. When an L1/L2 router is connected to more than one area, it + // sets the Attached-bit on its L1 LSP. This can cause a default route ( 0.0.0.0/0 ) + // to be installed by the receiving router. + // default = True + optional bool enable_attached_bit = 10; +} + +// This contains ISIS Area/Domain authentication properties. +message IsisAuthentication { + + // Do not verify MD5 checksum in received LSPs. + // default = True + optional bool ignore_receive_md5 = 1; + + // The Area authentication method used for the emulated ISIS router. + // This is used for L1 LSPs. + IsisAuthenticationBase area_auth = 2; + + // The Domain authentication method used for the emulated ISIS router. + // This is used for L2 LSPs. + IsisAuthenticationBase domain_auth = 3; +} + +// Optional container for ISIS authentication properties. +message IsisAuthenticationBase { + + message AuthType { + enum Enum { + unspecified = 0; + md5 = 1; + password = 2; + } + } + // The authentication method. + // required = true + optional AuthType.Enum auth_type = 1; + + // Authentication as an MD5 key. + optional string md5 = 2; + + // Authentication as a clear text password. + optional string password = 3; +} + +// Emulated ISIS IPv4 routes. +message IsisV4RouteRange { + + // A list of group of IPv4 route addresses. + repeated V4RouteAddress addresses = 1; + + // The user-defined metric associated with this route range. + // default = 0 + optional uint32 link_metric = 2; + + message OriginType { + enum Enum { + unspecified = 0; + internal = 1; + external = 2; + } + } + // The origin of the advertised route-internal or external to the ISIS area. Options + // include the following: + // Internal-for intra-area routes, through Level 1 LSPs. + // External-for inter-area routes redistributed within L1, through Level + // 1 LSPs. + // default = OriginType.Enum.internal + optional OriginType.Enum origin_type = 3; + + message RedistributionType { + enum Enum { + unspecified = 0; + up = 1; + down = 2; + } + } + // Defines the Up/Down (Redistribution) bit defined for TLVs 128 and 130 by RFC 2966. + // It is used for domain-wide advertisement of prefix information. + // + // Up (0)-used when a prefix is initially advertised within the ISIS L3 + // hierarchy, + // and for all other prefixes in L1 and L2 LSPs. (default) + // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. + // + // The prefixes are being advertised from a higher level (L2) down to a lower level + // (L1). + // default = RedistributionType.Enum.up + optional RedistributionType.Enum redistribution_type = 4; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 5; + + // Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability Attribute Flags + // will be advertised or not. + // default = False + optional bool prefix_attr_enabled = 6; + + // External Prefix Flag (Bit 0) + // default = False + optional bool x_flag = 7; + + // Re-advertisement Flag (Bit 1) + // default = False + optional bool r_flag = 8; + + // Node Flag (Bit 2) + // default = False + optional bool n_flag = 9; +} + +// A container for IPv4 route addresses. +message V4RouteAddress { + + // The starting address of the network. + // required = true + optional string address = 1; + + // The IPv4 network prefix length to be applied to the address. + // default = 24 + optional uint32 prefix = 2; + + // The total number of addresses in the range. + // default = 1 + optional uint32 count = 3; + + // Increments the network address prefixes within a route range where multiple routes + // are present. The value is incremented according to the Prefix Length and Step. + // default = 1 + optional uint32 step = 4; +} + +// A container for IPv6 route addresses. +message V6RouteAddress { + + // The starting address of the network. + // required = true + optional string address = 1; + + // The IPv6 network prefix length to be applied to the address. + // default = 64 + optional uint32 prefix = 2; + + // The total number of addresses in the range. + // default = 1 + optional uint32 count = 3; + + // Increments the network address prefixes within a route range where multiple routes + // are present. The value is incremented according to the Prefix Length and Step. + // default = 1 + optional uint32 step = 4; +} + +// A container for MAC route addresses. +message MACRouteAddress { + + // The starting address of the MAC Range. + // required = true + optional string address = 1; + + // The MAC prefix length to be applied to the address. + // default = 48 + optional uint32 prefix = 2; + + // The total number of mac addresses in the range. + // default = 1 + optional uint32 count = 3; + + // Increments the mac address prefixes within a mac range where multiple routes are + // present. The value is incremented according to the mac prefix Length and Step. + // default = 1 + optional uint32 step = 4; +} + +// Emulated ISIS IPv6 routes. +message IsisV6RouteRange { + + // A list of group of IPv6 route addresses. + repeated V6RouteAddress addresses = 1; + + // The user-defined metric associated with this route range. + // default = 0 + optional uint32 link_metric = 2; + + message OriginType { + enum Enum { + unspecified = 0; + internal = 1; + external = 2; + } + } + // The origin of the advertised route-internal or external to the ISIS area. Options + // include the following: + // Internal-for intra-area routes, through Level 1 LSPs. + // External-for inter-area routes redistributed within L1, through Level + // 1 LSPs. + // default = OriginType.Enum.internal + optional OriginType.Enum origin_type = 3; + + message RedistributionType { + enum Enum { + unspecified = 0; + up = 1; + down = 2; + } + } + // Defines the Up/Down (Redistribution) bit defined for TLVs 128 and 130 by RFC 2966. + // It is used for domain-wide advertisement of prefix information. + // + // Up (0)-used when a prefix is initially advertised within the ISIS L3 + // hierarchy, + // and for all other prefixes in L1 and L2 LSPs. (default) + // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. + // + // The prefixes are being advertised from a higher level (L2) down to a lower level + // (L1). + // default = RedistributionType.Enum.up + optional RedistributionType.Enum redistribution_type = 4; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 5; + + // Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability Attribute Flags + // will be advertised or not. + // default = False + optional bool prefix_attr_enabled = 6; + + // External Prefix Flag (Bit 0) + // default = False + optional bool x_flag = 7; + + // Re-advertisement Flag (Bit 1) + // default = False + optional bool r_flag = 8; + + // Node Flag (Bit 2) + // default = False + optional bool n_flag = 9; +} + +// Configuration for one or more IPv4 or IPv6 BGP peers. +message DeviceBgpRouter { + + // The BGP router ID is a unique identifier used by BGP. It is a 32-bit value that is + // often represented by an IPv4 address. + // required = true + optional string router_id = 1; + + // This contains an array of references to IPv4 interfaces, each of which will have + // list of peers to different destinations. + repeated BgpV4Interface ipv4_interfaces = 2; + + // This contains an array of references to IPv6 interfaces, each of which will have + // list of peers to different destinations. + repeated BgpV6Interface ipv6_interfaces = 3; +} + +// All errors detected while processing the Message Header are indicated by sending +// the NOTIFICATION message with the Error Code-Message Header Error. The Error Subcode +// elaborates on the specific nature of the error. +message DeviceBgpMessageHeaderError { + + message Subcode { + enum Enum { + unspecified = 0; + connection_not_synchronized_code1_subcode1 = 1; + bad_message_length_code1_subcode2 = 2; + bad_message_type_code1_subcode3 = 3; + } + } + // The Error Subcode indicates the specific type of error encountered during Message + // Header processing. + // default = Subcode.Enum.connection_not_synchronized_code1_subcode1 + optional Subcode.Enum subcode = 1; +} + +// All errors detected while processing the OPEN message are indicated by sending the +// NOTIFICATION message with the Error Code-Open Message Error. The Error Subcode elaborates +// on the specific nature of the error. +message DeviceBgpOpenMessageError { + + message Subcode { + enum Enum { + unspecified = 0; + unsupported_version_number_code2_subcode1 = 1; + error_peer_as_code2_subcode2 = 2; + error_bgp_id_code2_subcode3 = 3; + unsupported_optional_parameter_code2_subcode4 = 4; + auth_failed_code2_subcode5 = 5; + unsupported_hold_time_code2_subcode6 = 6; + unsupported_capability_code2_subcode7 = 7; + } + } + // The Error Subcode indicates the specific type of error encountered during OPEN message + // processing. + // default = Subcode.Enum.unsupported_version_number_code2_subcode1 + optional Subcode.Enum subcode = 1; +} + +// All errors detected while processing the UPDATE message are indicated by sending +// the NOTIFICATION message with the Error Code-Update Message Error. The Error Subcode +// elaborates on the specific nature of the error. +message DeviceBgpUpdateMessageError { + + message Subcode { + enum Enum { + unspecified = 0; + malformed_attrib_list_code3_subcode1 = 1; + unrecognized_wellknown_attrib_code3_subcode2 = 2; + wellknown_attrib_missing_code3_subcode3 = 3; + attrib_flags_error_code3_subcode4 = 4; + attrib_length_error_code3_subcode5 = 5; + invalid_origin_attrib_code3_subcode6 = 6; + as_routing_loop_code3_subcode7 = 7; + invalid_nhop_attrib_code3_subcode8 = 8; + error_optional_attrib_code3_subcode9 = 9; + invalid_network_field_code3_subcode10 = 10; + abnormal_aspath_code3_subcode11 = 11; + } + } + // The Error Subcode, the specific type of error encountered during UPDATE processing. + // default = Subcode.Enum.malformed_attrib_list_code3_subcode1 + optional Subcode.Enum subcode = 1; +} + +// If a system does not receive successive KEEPALIVE, UPDATE, and/or NOTIFICATION messages +// within the period specified in the Hold Time field of the OPEN message, then the +// NOTIFICATION message with the Hold Timer Expired Error Code(Error Code 4) is sent +// and the BGP connection is closed. The Sub Code used is 0. If a user wants to use +// non zero Sub Code then CustomError can be used. +message DeviceBgpHoldTimerExpired { +} + +// Any error detected by the BGP Finite State Machine (e.g., receipt of an unexpected +// event) is indicated by sending the NOTIFICATION message with the Error Code-Finite +// State Machine Error(Error Code 5). The Sub Code used is 0. If a user wants to use +// non zero Sub Code then CustomError can be used. +message DeviceBgpFiniteStateMachineError { +} + +// In the absence of any fatal errors, a BGP peer can close its BGP connection by sending +// the NOTIFICATION message with the Error Code Cease. The 'hard_reset_code6_subcode9' +// subcode for Cease Notification can be used to signal a hard reset that will indicate +// that Graceful Restart cannot be performed, even when Notification extensions to +// Graceful Restart procedure is supported. +message DeviceBgpCeaseError { + + message Subcode { + enum Enum { + unspecified = 0; + max_number_prefix_reached_code6_subcode1 = 1; + admin_shutdown_code6_subcode2 = 2; + peer_deleted_code6_subcode3 = 3; + admin_reset_code6_subcode4 = 4; + connection_reject_code6_subcode5 = 5; + other_config_changes_code6_subcode6 = 6; + connection_collision_resolution_code6_subcode7 = 7; + out_of_resources_code6_subcode8 = 8; + bfd_session_down_code6_subcode10 = 9; + hard_reset_code6_subcode9 = 10; + } + } + // The Error Subcode to be sent to the peer in the Cease NOTIFICATION. + // default = Subcode.Enum.admin_shutdown_code6_subcode2 + optional Subcode.Enum subcode = 1; +} + +// A BGP peer can send NOTIFICATION message with user defined Error Code and Error Subcode. +message DeviceBgpCustomError { + + // The Error code to be sent in the NOTIFICATION message to peer. + optional uint32 code = 1; + + // The Error Subcode to be sent in the NOTIFICATION message to peer. + optional uint32 subcode = 2; +} + +// Configuration for emulated BGPv4 peers and routes. +message BgpV4Peer { + + // IPv4 address of the BGP peer for the session. + // required = true + optional string peer_address = 1; + + // This contains the list of Ethernet Virtual Private Network (EVPN) Ethernet Segments + // (ES) Per BGP Peer for IPv4 Address Family Identifier (AFI). + // + // Each Ethernet Segment contains a list of EVPN Instances (EVIs) . + // Each EVI contains a list of Broadcast Domains. + // Each Broadcast Domain contains a list of MAC/IP Ranges. + // + // is responsible for advertising Ethernet + // Auto-discovery Route Per EVI (Type 1). + // + // is responsible for advertising Ethernet Auto-discovery Route + // Per Ethernet Segment (Type 1). + // + // is responsible for advertising + // MAC/IP Advertisement Route (Type 2). + // + // is responsible for advertising Inclusive + // Multicast Ethernet Tag Route (Type 3). + // + // Ethernet Segment is responsible for advertising Ethernet Segment Route (Type 4). + repeated BgpV4EthernetSegment evpn_ethernet_segments = 2; + + message AsType { + enum Enum { + unspecified = 0; + ibgp = 1; + ebgp = 2; + } + } + // The type of BGP autonomous system. External BGP is used for BGP links between two + // or more autonomous systems (ebgp). Internal BGP is used within a single autonomous + // system (ibgp). BGP property defaults are aligned with this object defined as an internal + // BGP peer. If the as_type is specified as 'ebgp' then other properties will need to + // be specified as per an external BGP peer. Specifically, for 'ebgp', 'as_set_mode' + // attribute in 'as_path' field in any Route Range should be changed from default value + // 'do_not_include_local_as' to any other value. + // required = true + optional AsType.Enum as_type = 3; + + // Autonomous System Number (AS number or ASN) + // required = true + optional uint32 as_number = 4; + + message AsNumberWidth { + enum Enum { + unspecified = 0; + two = 1; + four = 2; + } + } + // The width in bytes of the as_number values. Any as_number values that exceeds the + // width MUST result in an error. + // default = AsNumberWidth.Enum.four + optional AsNumberWidth.Enum as_number_width = 5; + + // Description missing in models + BgpAdvanced advanced = 6; + + // Description missing in models + BgpCapability capability = 7; + + // Description missing in models + BgpLearnedInformationFilter learned_information_filter = 8; + + // Emulated BGPv4 route ranges. + repeated BgpV4RouteRange v4_routes = 9; + + // Emulated BGPv6 route ranges. + repeated BgpV6RouteRange v6_routes = 10; + + // Segment Routing Traffic Engineering (SR TE) Policies for IPv4 Address Family Identifier + // (AFI). + repeated BgpSrteV4Policy v4_srte_policies = 11; + + // Segment Routing Traffic Engineering (SR TE) Policies for IPv6 Address Family Identifier + // (AFI). + repeated BgpSrteV6Policy v6_srte_policies = 12; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 13; + + // Description missing in models + BgpGracefulRestart graceful_restart = 14; + + // BGP Updates to be sent to the peer as specified after the session is established. + // + BgpUpdateReplay replay_updates = 15; +} + +// Configuration for emulated BGPv4 peers and routes on a single IPv4 interface. +message BgpV4Interface { + + // The unique name of the IPv4, Loopback IPv4 interface or DHCPv4 client used as the + // source IP for this list of BGP peers. + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv4Loopback/properties/name + // - /components/schemas/Device.Dhcpv4client/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv4Loopback/properties/name + // - /components/schemas/Device.Dhcpv4client/properties/name + // + // required = true + optional string ipv4_name = 1; + + // This contains the list of BGPv4 peers configured on this interface. + repeated BgpV4Peer peers = 2; +} + +// Configuration for BGP Ethernet Segment ranges. Advertises following routes - +// +// Type 4 - Ethernet Segment Route +message BgpV4EthernetSegment { + + // Designated Forwarder (DF) election configuration. + BgpEthernetSegmentDfElection df_election = 1; + + // This contains the list of EVIs. + repeated BgpV4EvpnEvis evis = 2; + + // 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero + // ESI is '10000000000000000000' . + // default = 00000000000000000000 + optional string esi = 3; + + message ActiveMode { + enum Enum { + unspecified = 0; + single_active = 1; + all_active = 2; + } + } + // Single Active or All Active mode Redundancy mode selection for Multi-home. + // default = ActiveMode.Enum.all_active + optional ActiveMode.Enum active_mode = 4; + + // The label value to be advertised as ESI Label in ESI Label Extended Community. This + // is included in Ethernet Auto-discovery per ES Routes advertised by a router. + // default = 0 + optional uint32 esi_label = 5; + + // Description missing in models + BgpRouteAdvanced advanced = 6; + + // Optional community settings. + repeated BgpCommunity communities = 7; + + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. + repeated BgpExtCommunity ext_communities = 8; + + // Optional AS PATH settings. + BgpAsPath as_path = 9; +} + +// Configuration for Designated Forwarder (DF) election among the Provider Edge (PE) +// routers on the same Ethernet Segment. +message BgpEthernetSegmentDfElection { + + // The DF election timer in seconds. + // default = 3 + optional uint32 election_timer = 1; +} // Configuration for advanced BGP route range settings. message BgpRouteAdvanced { - // BGP Multi Exit Discriminator attribute sent to the peer to help in the route selection - // process. If set to true, the Multi Exit Discriminator attribute will be included - // in the route advertisement. + // BGP Multi Exit Discriminator attribute sent to the peer to help in the route selection + // process. If set to true, the Multi Exit Discriminator attribute will be included + // in the route advertisement. + // default = True + optional bool include_multi_exit_discriminator = 3; + + // The multi exit discriminator (MED) value used for route selection sent to the peer. + optional uint32 multi_exit_discriminator = 1; + + // If set to true, the Origin attribute will be included in the route advertisement. + // default = True + optional bool include_origin = 4; + + message Origin { + enum Enum { + unspecified = 0; + igp = 1; + egp = 2; + incomplete = 3; + } + } + // The origin attribute of a prefix can take three values: the prefix originates from + // an interior routing protocol 'igp', it originates from 'egp' or the origin is 'incomplete', + // if the prefix is learned through other means. + // default = Origin.Enum.igp + optional Origin.Enum origin = 2; + + // BGP Local Preference attribute sent to the peer to indicate the degree of preference + // for externally learned routes. If set to true, the Local Preference attribute will + // be included in the route advertisement. This should be included only for internal + // peers. + // default = True + optional bool include_local_preference = 5; + + // Value to be set in Local Preference attribute if include_local_preference is set + // to true. It is used for the selection of the path for the traffic leaving the AS. + // The route with the highest local preference value is preferred. + // default = 100 + optional uint32 local_preference = 6; +} + +// BGP communities provide additional capability for tagging routes and for modifying +// BGP routing policy on upstream and downstream routers. BGP community is a 32-bit +// number which is broken into 16-bit AS number and a 16-bit custom value. +message BgpCommunity { + + message Type { + enum Enum { + unspecified = 0; + manual_as_number = 1; + no_export = 2; + no_advertised = 3; + no_export_subconfed = 4; + llgr_stale = 5; + no_llgr = 6; + } + } + // The type of community AS number. + optional Type.Enum type = 1; + + // First two octets of 32 bit community AS number. + // default = 0 + optional uint32 as_number = 2; + + // Last two octets of the community value. + // default = 0 + optional uint32 as_custom = 3; +} + +// The Extended Communities Attribute is a transitive optional BGP attribute, with the +// Type Code 16. Community and Extended Communities attributes are utilized to trigger +// routing decisions, such as acceptance, rejection, preference, or redistribution. +// An extended community is an 8-Bytes value. It is divided into two main parts. The +// first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes +// carry a unique set of data in a format defined by the type and sub-type field. Extended +// communities provide a larger range for grouping or categorizing communities. +message BgpExtCommunity { + + message Type { + enum Enum { + unspecified = 0; + administrator_as_2octet = 1; + administrator_ipv4_address = 2; + administrator_as_4octet = 3; + opaque = 4; + evpn = 5; + administrator_as_2octet_link_bandwidth = 6; + } + } + // Extended Community Type field of 1 Byte. + // - administrator_as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). + // - administrator_ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). + // - administrator_as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). + // - opaque: Opaque Extended Community (RFC 7432). + // - evpn: EVPN Extended Community (RFC 7153). + // - administrator_as_2octet_link_bandwidth : Link Bandwidth Extended Community (RFC + // 7153). + optional Type.Enum type = 1; + + message Subtype { + enum Enum { + unspecified = 0; + route_target = 1; + origin = 2; + extended_bandwidth = 3; + color = 4; + encapsulation = 5; + mac_address = 6; + } + } + // Extended Community Sub Type field of 1 Byte. + // - route_target: Route Target. + // - origin: Origin. + // - extended_bandwidth: Specifies the link bandwidth. + // - color: Specifies the color value. + // - encapsulation: Specifies the Encapsulation Extended Community. + // - mac_address: Specifies the Extended community MAC address. + optional Subtype.Enum subtype = 2; + + // Extended Community value of 6 Bytes. Example - for the Opaque type and Color subtype + // value can be '0000000000c8' for the color value 200. + optional string value = 3; +} + +// This attribute identifies the autonomous systems through which routing information +// carried in this UPDATE message has passed. This contains the configuration of how +// to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains +// optional configuration of additional AS Path Segments that can be included in the +// AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems +// (AS) numbers that a routing information passes through to reach the destination. +message BgpAsPath { + + message AsSetMode { + enum Enum { + unspecified = 0; + do_not_include_local_as = 1; + include_as_seq = 2; + include_as_set = 3; + include_as_confed_seq = 4; + include_as_confed_set = 5; + prepend_to_first_segment = 6; + } + } + // Defines how the Local AS should be included in the MP REACH NLRI. For iBGP sessions, + // Do Not Include Local AS must be chosen. For eBGP sessions, any choice other than + // Do Not Include Local AS can be chosen. + // default = AsSetMode.Enum.do_not_include_local_as + optional AsSetMode.Enum as_set_mode = 1; + + // The additional AS path segments to be added in the NLRI. By default, an empty AS + // path is always included and the local AS is added to it as per the value of 'as_set_mode' + // attribute. + repeated BgpAsPathSegment segments = 2; +} + +// Configuration for a single BGP AS path segment +message BgpAsPathSegment { + + message Type { + enum Enum { + unspecified = 0; + as_seq = 1; + as_set = 2; + as_confed_seq = 3; + as_confed_set = 4; + } + } + // AS sequence is the most common type of AS_PATH, it contains the list of ASNs starting + // with the most recent ASN being added read from left to right. + // The other three AS_PATH types are used for Confederations - AS_SET is the type of + // AS_PATH attribute that summarizes routes using using the aggregate-address command, + // allowing AS_PATHs to be summarized in the update as well. - AS_CONFED_SEQ gives + // the list of ASNs in the path starting with the most recent ASN to be added reading + // left to right - AS_CONFED_SET will allow summarization of multiple AS PATHs to be + // sent in BGP Updates. + // default = Type.Enum.as_seq + optional Type.Enum type = 1; + + // The AS numbers in this AS path segment. + repeated uint32 as_numbers = 2; +} + +// This contains a list of different flavors of EVPN. +// For example EVPN over VXLAN or EVPN over MPLS etc to be configured per Ethernet segment. +// +// Need to instantiate correct type of EVPN instance as per requirement. +message BgpV4EvpnEvis { + + message Choice { + enum Enum { + unspecified = 0; + evi_vxlan = 1; + } + } + // Description missing in models + // default = Choice.Enum.evi_vxlan + optional Choice.Enum choice = 1; + + // EVPN VXLAN instance to be configured per Ethernet Segment. + BgpV4EviVxlan evi_vxlan = 2; +} + +// Configuration for BGP EVPN EVI. Advertises following routes - +// +// Type 3 - Inclusive Multicast Ethernet Tag Route +// +// Type 1 - Ethernet Auto-discovery Route (Per EVI) +// +// Type 1 - Ethernet Auto-discovery Route (Per ES) +message BgpV4EviVxlan { + + // This contains the list of Broadcast Domains to be configured per EVI. + repeated BgpV4EviVxlanBroadcastDomain broadcast_domains = 1; + + message ReplicationType { + enum Enum { + unspecified = 0; + ingress_replication = 1; + } + } + // This model only supports Ingress Replication + // default = ReplicationType.Enum.ingress_replication + optional ReplicationType.Enum replication_type = 2; + + // Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel + // attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. + // default = 16 + optional uint32 pmsi_label = 3; + + // The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet + // Auto-discovery Route per + // default = 0 + optional uint32 ad_label = 4; + + // Colon separated Extended Community value of 6 Bytes - AS number: Value identifying + // an EVI. Example - for the as_2octet 60005:100. + BgpRouteDistinguisher route_distinguisher = 5; + + // List of Layer 2 Virtual Network Identifier (L2VNI) export targets associated with + // this EVI. + repeated BgpRouteTarget route_target_export = 6; + + // List of L2VNI import targets associated with this EVI. + repeated BgpRouteTarget route_target_import = 7; + + // List of Layer 3 Virtual Network Identifier (L3VNI) Export Route Targets. + repeated BgpRouteTarget l3_route_target_export = 8; + + // List of L3VNI Import Route Targets. + repeated BgpRouteTarget l3_route_target_import = 9; + + // Description missing in models + BgpRouteAdvanced advanced = 10; + + // Optional community settings. + repeated BgpCommunity communities = 11; + + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. + repeated BgpExtCommunity ext_communities = 12; + + // Optional AS PATH settings. + BgpAsPath as_path = 13; +} + +// Configuration for Broadcast Domains per EVI. +message BgpV4EviVxlanBroadcastDomain { + + // This contains the list of Customer MAC/IP Ranges to be configured per Broadcast Domain. + // + // + // Advertises following route - + // Type 2 - MAC/IP Advertisement Route. + repeated BgpCMacIpRange cmac_ip_range = 1; + + // The Ethernet Tag ID of the Broadcast Domain. + // default = 0 + optional uint32 ethernet_tag_id = 2; + + // VLAN-Aware service to be enabled or disabled. + // default = False + optional bool vlan_aware_service = 3; +} + +// Configuration for MAC/IP Ranges per Broadcast Domain. +// +// Advertises following route - +// +// Type 2 - MAC/IP Advertisement Route. +message BgpCMacIpRange { + + // Host MAC address range per Broadcast Domain. + MACRouteAddress mac_addresses = 1; + + // Layer 2 Virtual Network Identifier (L2VNI) to be advertised with MAC/IP Advertisement + // Route (Type 2) + // default = 0 + optional uint32 l2vni = 2; + + // Host IPv4 address range per Broadcast Domain. + V4RouteAddress ipv4_addresses = 3; + + // Host IPv6 address range per Broadcast Domain. + V6RouteAddress ipv6_addresses = 4; + + // Layer 3 Virtual Network Identifier (L3VNI) to be advertised with MAC/IP Advertisement + // Route (Type 2). + // default = 0 + optional uint32 l3vni = 5; + + // Include default Gateway Extended Community in MAC/IP Advertisement Route (Type 2). + // default = False + optional bool include_default_gateway = 6; + + // Description missing in models + BgpRouteAdvanced advanced = 7; + + // Optional community settings. + repeated BgpCommunity communities = 8; + + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. + repeated BgpExtCommunity ext_communities = 9; + + // Optional AS PATH settings. + BgpAsPath as_path = 10; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 11; +} + +// BGP Route Distinguisher. +message BgpRouteDistinguisher { + + message RdType { + enum Enum { + unspecified = 0; + as_2octet = 1; + ipv4_address = 2; + as_4octet = 3; + } + } + // Route Distinguisher Type field of 2 Byte. + // - as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). + // - ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). + // - as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). + // default = RdType.Enum.as_2octet + optional RdType.Enum rd_type = 1; + + // Allow to automatically configure RD IP address from local ip. + // default = False + optional bool auto_config_rd_ip_addr = 2; + + // Colon separated Extended Community value of 6 Bytes - AS number: Value. Example + // - for the as_2octet or as_4octet 60005:100, for ipv4_address 1.1.1.1:100 + optional string rd_value = 3; +} + +// BGP Route Target. +message BgpRouteTarget { + + message RtType { + enum Enum { + unspecified = 0; + as_2octet = 1; + ipv4_address = 2; + as_4octet = 3; + } + } + // Extended Community Type field of 2 Byte. + // - as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). + // - ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). + // - as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). + optional RtType.Enum rt_type = 1; + + // Colon separated Extended Community value of 6 Bytes - AS number: Assigned Number. + // Example - for the as_2octet or as_4octet 60005:100, for ipv4_address 1.1.1.1:100 + optional string rt_value = 2; +} + +// Configuration for BGP advanced settings. +message BgpAdvanced { + + // Number of seconds the sender proposes for the value of the Hold Timer. + // default = 90 + optional uint32 hold_time_interval = 1; + + // Number of seconds between transmissions of Keepalive messages by this peer. + // default = 30 + optional uint32 keep_alive_interval = 2; + + // The time interval at which Update messages are sent to the DUT, expressed as the + // number of milliseconds between Update messages. The update interval 0 implies to + // send all the updates as fast as possible. + // default = 0 + optional uint32 update_interval = 3; + + // The limited number of iterations that a unit of data can experience before the data + // is discarded. This is placed in the TTL field in the IP header of the transmitted + // packets. + // default = 64 + optional uint32 time_to_live = 4; + + // The value to be used as a secret MD5 key for authentication. If not configured, MD5 + // authentication will not be enabled. + optional string md5_key = 5; + + // If set to true, the local BGP peer will wait for the remote peer to initiate the + // BGP session + // by establishing the TCP connection, rather than initiating sessions from the local + // peer. + // default = False + optional bool passive_mode = 6; + + // The TCP port number on which to accept BGP connections from the remote peer. + // default = 179 + optional uint32 listen_port = 7; + + // Destination TCP port number of the BGP peer when initiating a + // session from the local BGP peer. + // default = 179 + optional uint32 neighbor_port = 8; +} + +// Configuration for BGP capability settings. +message BgpCapability { + + // Support for the IPv4 Unicast address family. + // default = True + optional bool ipv4_unicast = 1; + + // Support for the IPv4 Multicast address family. + // default = False + optional bool ipv4_multicast = 2; + + // Support for the IPv4 Unicast address family. + // default = True + optional bool ipv6_unicast = 3; + + // Support for the IPv6 Multicast address family. + // default = False + optional bool ipv6_multicast = 4; + + // Support for VPLS as below. + // RFC4761 - Virtual Private LAN Service (VPLS) using BGP for Auto-Discovery + // and Signaling. + // RFC6624 - Layer 2 Virtual Private Networks using BGP for Auto-Discovery + // and Signaling. + // default = False + optional bool vpls = 5; + + // Support for the route refresh capabilities. Route Refresh allows the dynamic exchange + // of route refresh requests and routing information between BGP peers and the subsequent + // re-advertisement of the outbound or inbound routing table. + // default = True + optional bool route_refresh = 6; + + // Supports for the route constraint capabilities. Route Constraint allows the advertisement + // of Route Target Membership information. The BGP peers exchange Route Target Reachability + // Information, which is used to build a route distribution graph. This limits the + // propagation of VPN Network Layer Reachability Information (NLRI) between different + // autonomous systems or distinct clusters of the same autonomous system. This is supported + // for Layer 3 Virtual Private Network scenario. + // default = False + optional bool route_constraint = 7; + + // Support for BGP Link State for ISIS and OSPF. + // default = False + optional bool link_state_non_vpn = 8; + + // Capability advertisement of BGP Link State for VPNs. + // default = False + optional bool link_state_vpn = 9; + + // Support for the EVPN address family. + // default = False + optional bool evpn = 10; + + // Support for extended Next Hop Encoding for Nexthop field in IPv4 routes advertisement. + // This allows IPv4 routes being advertised by IPv6 peers to include an IPv6 Nexthop. + // default = False + optional bool extended_next_hop_encoding = 11; + + // Support for the IPv4 Multicast VPN address family. + // default = False + optional bool ipv4_multicast_vpn = 12; + + // Support for the IPv4 MPLS L3VPN address family. + // default = False + optional bool ipv4_mpls_vpn = 13; + + // Supports for IPv4 MDT address family messages. + // default = False + optional bool ipv4_mdt = 14; + + // Support for the IPv4 Multicast VPN address family. + // default = False + optional bool ipv4_multicast_mpls_vpn = 15; + + // Support for propagation of IPv4 unicast flow specification rules. + // default = False + optional bool ipv4_unicast_flow_spec = 16; + + // Support for IPv4 SRTE policy. + // default = False + optional bool ipv4_sr_te_policy = 17; + + // Support for IPv4 Unicast Add Path Capability. + // default = False + optional bool ipv4_unicast_add_path = 18; + + // Support for the IPv6 Multicast VPN address family. + // default = False + optional bool ipv6_multicast_vpn = 19; + + // Support for the IPv6 MPLS L3VPN address family. + // default = False + optional bool ipv6_mpls_vpn = 20; + + // Support for IPv6 MDT address family messages. + // default = False + optional bool ipv6_mdt = 21; + + // Support for the IPv6 Multicast VPN address family. + // default = False + optional bool ipv6_multicast_mpls_vpn = 22; + + // Support for propagation of IPv6 unicast flow specification rules. + // default = False + optional bool ipv6_unicast_flow_spec = 23; + + // Support for IPv6 SRTE policy. + // default = False + optional bool ipv6_sr_te_policy = 24; + + // Support for IPv6 Unicast Add Path Capability. + // default = False + optional bool ipv6_unicast_add_path = 25; +} + +// Configuration for controlling storage of BGP learned information recieved from the +// peer. +message BgpLearnedInformationFilter { + + // If enabled, will store the information related to Unicast IPv4 Prefixes recieved + // from the peer. + // default = False + optional bool unicast_ipv4_prefix = 1; + + // If enabled, will store the information related to Unicast IPv6 Prefixes recieved + // from the peer. + // default = False + optional bool unicast_ipv6_prefix = 2; +} + +// Emulated BGPv4 route range. +message BgpV4RouteRange { + + // A list of group of IPv4 route addresses. + repeated V4RouteAddress addresses = 1; + + message NextHopMode { + enum Enum { + unspecified = 0; + local_ip = 1; + manual = 2; + } + } + // Specify the NextHop in MP REACH NLRI. The mode for setting the IP address of the + // NextHop in the MP REACH NLRI can be one of the following: + // Local IP: Automatically fills the Nexthop with the Local IP of the BGP + // peer. + // If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. + // Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. + // default = NextHopMode.Enum.local_ip + optional NextHopMode.Enum next_hop_mode = 2; + + message NextHopAddressType { + enum Enum { + unspecified = 0; + ipv4 = 1; + ipv6 = 2; + } + } + // If the Nexthop Mode is Manual, it sets the type of the NextHop IP address. + // default = NextHopAddressType.Enum.ipv4 + optional NextHopAddressType.Enum next_hop_address_type = 3; + + // The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type + // is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. + // default = 0.0.0.0 + optional string next_hop_ipv4_address = 4; + + // The IPv6 address of the next hop if the Nexthop Mode is manual and the Nexthop type + // is IPv6. + // default = ::0 + optional string next_hop_ipv6_address = 5; + + // Description missing in models + BgpRouteAdvanced advanced = 6; + + // Optional community settings. + repeated BgpCommunity communities = 7; + + // Description missing in models + BgpAsPath as_path = 8; + + // Description missing in models + BgpAddPath add_path = 9; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 10; + + // Deprecated: This property is deprecated in favor of property extended_communities + // + // Deprecated: This property is deprecated in favor of property extended_communities + // + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. Note evpn type is defined mainly for use with evpn + // route updates and not for IPv4 and IPv6 route updates. + repeated BgpExtCommunity ext_communities = 11; + + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an eight byte value. It + // is divided into two main parts. The first two bytes of the community encode a type + // and sub-type fields and the last six bytes carry a unique set of data in a format + // defined by the type and sub-type field. Extended communities provide a larger range + // for grouping or categorizing communities. + repeated BgpExtendedCommunity extended_communities = 12; +} + +// The BGP Additional Paths feature is a BGP extension that allows the advertisement +// of multiple paths for the same prefix without the new paths implicitly replacing +// any previous paths. +message BgpAddPath { + + // The id of the additional path. + // default = 1 + optional uint32 path_id = 1; +} + +// The Extended Communities Attribute is a optional BGP attribute,defined in RFC4360 +// with the Type Code 16. Community and Extended Communities attributes are utilized +// to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. +// An extended community is an 8-Bytes value.It is divided into two main parts. The +// first 2 Bytes of the community encode a type and optonal sub-type field. The last +// 6 bytes (or 7 bytes for types without a sub-type) carry a unique set of data in a +// format defined by the type and optional sub-type field. Extended communities provide +// a larger range for grouping or categorizing communities. +message BgpExtendedCommunity { + + message Choice { + enum Enum { + unspecified = 0; + transitive_2octet_as_type = 1; + transitive_ipv4_address_type = 2; + transitive_4octet_as_type = 3; + transitive_opaque_type = 4; + transitive_evpn_type = 5; + non_transitive_2octet_as_type = 6; + custom = 7; + } + } + // Description missing in models + // default = Choice.Enum.transitive_2octet_as_type + optional Choice.Enum choice = 1; + + // Description missing in models + BgpExtendedCommunityTransitive2OctetAsType transitive_2octet_as_type = 2; + + // Description missing in models + BgpExtendedCommunityTransitiveIpv4AddressType transitive_ipv4_address_type = 3; + + // Description missing in models + BgpExtendedCommunityTransitive4OctetAsType transitive_4octet_as_type = 4; + + // Description missing in models + BgpExtendedCommunityTransitiveOpaqueType transitive_opaque_type = 5; + + // Description missing in models + BgpExtendedCommunityTransitiveEvpnType transitive_evpn_type = 6; + + // Description missing in models + BgpExtendedCommunityNonTransitive2OctetAsType non_transitive_2octet_as_type = 7; + + // Description missing in models + BgpExtendedCommunityCustomType custom = 8; +} + +// The Route Target Community identifies one or more routers that may receive a set +// of routes (that carry this Community) carried by BGP. It is sent with sub-type as +// 0x02. +message BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget { + + // The two octet IANA assigned AS value assigned to the Autonomous System. + // default = 100 + optional uint32 global_2byte_as = 1; + + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + // default = 1 + optional uint32 local_4byte_admin = 2; +} + +// The Route Origin Community identifies one or more routers that inject a set of routes +// (that carry this Community) into BGP. It is sent with sub-type as 0x03 . +message BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + + // The two octet IANA assigned AS value assigned to the Autonomous System. + // default = 100 + optional uint32 global_2byte_as = 1; + + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + // default = 1 + optional uint32 local_4byte_admin = 2; +} + +// The Transitive Two-Octet AS-Specific Extended Community is sent as type 0x00 . +// +message BgpExtendedCommunityTransitive2OctetAsType { + + message Choice { + enum Enum { + unspecified = 0; + route_target_subtype = 1; + route_origin_subtype = 2; + } + } + // Description missing in models + // default = Choice.Enum.route_target_subtype + optional Choice.Enum choice = 1; + + // Description missing in models + BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget route_target_subtype = 2; + + // Description missing in models + BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin route_origin_subtype = 3; +} + +// The Route Origin Community identifies one or more routers that inject a set of routes +// (that carry this Community) into BGP It is sent with sub-type as 0x03. +message BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + + // An IPv4 unicast address assigned by one of the Internet registries. + // default = 0.0.0.0 + optional string global_ipv4_admin = 1; + + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the IP address carried in the Global Administrator + // sub-field has been assigned by an appropriate authority. + // default = 1 + optional uint32 local_2byte_admin = 2; +} + +// The Route Target Community identifies one or more routers that may receive a set +// of routes (that carry this Community) carried by BGP. It is sent with sub-type as +// 0x02. +message BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + + // An IPv4 unicast address assigned by one of the Internet registries. + // default = 0.0.0.0 + optional string global_ipv4_admin = 1; + + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the IP address carried in the Global Administrator + // sub-field has been assigned by an appropriate authority. + // default = 1 + optional uint32 local_2byte_admin = 2; +} + +// The Transitive IPv4 Address Specific Extended Community is sent as type 0x01. +message BgpExtendedCommunityTransitiveIpv4AddressType { + + message Choice { + enum Enum { + unspecified = 0; + route_target_subtype = 1; + route_origin_subtype = 2; + } + } + // Description missing in models + // default = Choice.Enum.route_target_subtype + optional Choice.Enum choice = 1; + + // Description missing in models + BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget route_target_subtype = 2; + + // Description missing in models + BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin route_origin_subtype = 3; +} + +// The Route Target Community identifies one or more routers that may receive a set +// of routes (that carry this Community) carried by BGP. It is sent with sub-type as +// 0x02 +message BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget { + + // The four octet IANA assigned AS value assigned to the Autonomous System. + // default = 100 + optional uint32 global_4byte_as = 1; + + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + // default = 1 + optional uint32 local_2byte_admin = 2; +} + +// The Route Origin Community identifies one or more routers that inject a set of routes +// (that carry this Community) into BGP. It is sent with sub-type as 0x03. +message BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + + // The four octet IANA assigned AS value assigned to the Autonomous System. + // default = 100 + optional uint32 global_4byte_as = 1; + + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + // default = 1 + optional uint32 local_2byte_admin = 2; +} + +// The Transitive Four-Octet AS-Specific Extended Community is sent as type 0x02. It +// is defined in RFC 5668. +message BgpExtendedCommunityTransitive4OctetAsType { + + message Choice { + enum Enum { + unspecified = 0; + route_target_subtype = 1; + route_origin_subtype = 2; + } + } + // Description missing in models + // default = Choice.Enum.route_target_subtype + optional Choice.Enum choice = 1; + + // Description missing in models + BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget route_target_subtype = 2; + + // Description missing in models + BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin route_origin_subtype = 3; +} + +// The Color Community contains locally administrator defined 'color' value which is +// used in conjunction with Encapsulation attribute to decide whether a data packet +// can be transmitted on a certain tunnel or not. It is defined in RFC9012 and sent +// with sub-type as 0x0b. +message BgpExtendedCommunityTransitiveOpaqueTypeColor { + + // Two octet flag values. + // default = 0 + optional uint32 flags = 1; + + // The color value is user defined and configured locally and used to determine whether + // a data packet can be transmitted on a certain tunnel or not in conjunction with the + // Encapsulation attribute. It is defined in RFC9012. + // default = 0 + optional uint32 color = 2; +} + +// This identifies the type of tunneling technology being signalled. It is defined in +// RFC9012 and sent with sub-type as 0x0c. +message BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation { + + // Four bytes of reserved values. Normally set to 0 on transmit and ignored on receive. + // + // default = 0 + optional uint32 reserved = 1; + + // Identifies the type of tunneling technology being signalled. Initially defined in + // RFC5512 and extended in RFC9012. Some of the important tunnel types include 1 L2TPv3 + // over IP [RFC9012], + // 2 GRE [RFC9012] + // 7 IP in IP [RFC9012] + // 8 VXLAN Encapsulation [RFC8365] + // 9 NVGRE Encapsulation [RFC8365] + // 10 MPLS Encapsulation [RFC8365] + // 15 SR TE Policy Type [draft-ietf-idr-segment-routing-te-policy] + // 19 Geneve Encapsulation [RFC8926] + // default = 1 + optional uint32 tunnel_type = 2; +} + +// The Transitive Opaque Extended Community is sent as type 0x03. +message BgpExtendedCommunityTransitiveOpaqueType { + + message Choice { + enum Enum { + unspecified = 0; + color_subtype = 1; + encapsulation_subtype = 2; + } + } + // Description missing in models + // default = Choice.Enum.color_subtype + optional Choice.Enum choice = 1; + + // Description missing in models + BgpExtendedCommunityTransitiveOpaqueTypeColor color_subtype = 2; + + // Description missing in models + BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation encapsulation_subtype = 3; +} + +// The Router MAC EVPN Community is defined in RFC9135 and normally sent only for EVPN +// Type-2 Routes . It is sent with sub-type 0x03. +message BgpExtendedCommunityTransitiveEvpnTypeRouterMac { + + // MAC Address of the PE Router. + // default = 0:0:0:0:0:0 + optional string router_mac = 1; +} + +// The Transitive EVPN Extended Community is sent as type 0x06 . +message BgpExtendedCommunityTransitiveEvpnType { + + message Choice { + enum Enum { + unspecified = 0; + router_mac_subtype = 1; + } + } + // Description missing in models + // default = Choice.Enum.router_mac_subtype + optional Choice.Enum choice = 1; + + // Description missing in models + BgpExtendedCommunityTransitiveEvpnTypeRouterMac router_mac_subtype = 2; +} + +// The Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. +// It is sent with sub-type as 0x04. +message BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + + // The value of the Global Administrator subfield should represent the Autonomous System + // of the router that attaches the Link Bandwidth Community. If four octet AS numbering + // scheme is used, AS_TRANS (23456) should be used. + // default = 100 + optional uint32 global_2byte_as = 1; + + // Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and + // 1 Mbps is 1000 Kbps per second ) + // default = 0 + optional float bandwidth = 2; +} + +// The Non-Transitive Two-Octet AS-Specific Extended Community is sent as type 0x40. +// +message BgpExtendedCommunityNonTransitive2OctetAsType { + + message Choice { + enum Enum { + unspecified = 0; + link_bandwidth_subtype = 1; + } + } + // Description missing in models + // default = Choice.Enum.link_bandwidth_subtype + optional Choice.Enum choice = 1; + + // Description missing in models + BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth link_bandwidth_subtype = 2; +} + +// Add a custom Extended Community with a combination of types , sub-types and values +// not explicitly specified above or not defined yet. +message BgpExtendedCommunityCustomType { + + // The type to be set in the Extended Community attribute. Accepts hexadecimal input + // upto ff . + // default = 00 + optional string community_type = 1; + + // The sub-type to be set in the Extended Community attribute. For certain types with + // no sub-type this byte can also be used as part of an extended value field. Accepts + // hexadecimal input upto ff. + // default = 00 + optional string community_subtype = 2; + + // 6 byte hex value to be carried in the last 6 bytes of the Extended Community. Accepts + // hexadecimal input upto ffffffffffff. + // default = 000000000000 + optional string value = 3; +} + +// Emulated BGPv6 route range. +message BgpV6RouteRange { + + // A list of group of IPv6 route addresses. + repeated V6RouteAddress addresses = 1; + + message NextHopMode { + enum Enum { + unspecified = 0; + local_ip = 1; + manual = 2; + } + } + // Specify the NextHop in MP REACH NLRI. The mode for setting the IP address of the + // NextHop in the MP REACH NLRI can be one of the following: + // Local IP: Automatically fills the Nexthop with the Local IP of the BGP + // peer. + // If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. + // Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. + // default = NextHopMode.Enum.local_ip + optional NextHopMode.Enum next_hop_mode = 2; + + message NextHopAddressType { + enum Enum { + unspecified = 0; + ipv4 = 1; + ipv6 = 2; + } + } + // If the Nexthop Mode is Manual, it sets the type of the NextHop IP address. + // default = NextHopAddressType.Enum.ipv6 + optional NextHopAddressType.Enum next_hop_address_type = 3; + + // The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type + // is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. + // default = 0.0.0.0 + optional string next_hop_ipv4_address = 4; + + // The IPv6 address of the next hop if the Nexthop Mode is manual and the Nexthop type + // is IPv6. + // default = ::0 + optional string next_hop_ipv6_address = 5; + + // Description missing in models + BgpRouteAdvanced advanced = 6; + + // Optional community settings. + repeated BgpCommunity communities = 7; + + // Description missing in models + BgpAsPath as_path = 8; + + // Description missing in models + BgpAddPath add_path = 9; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 10; + + // Deprecated: This property is deprecated in favor of property extended_communities + // + // Deprecated: This property is deprecated in favor of property extended_communities + // + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. Note evpn type is defined mainly for use with evpn + // route updates and not for IPv4 and IPv6 route updates. + repeated BgpExtCommunity ext_communities = 11; + + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an eight byte value. It + // is divided into two main parts. The first two bytes of the community encode a type + // and sub-type fields and the last six bytes carry a unique set of data in a format + // defined by the type and sub-type field. Extended communities provide a larger range + // for grouping or categorizing communities. + repeated BgpExtendedCommunity extended_communities = 12; +} + +// Configuration for BGP Segment Routing Traffic Engineering(SRTE) +// policy. +// +message BgpSrteV4Policy { + + // 4-octet value uniquely identifying the policy in the context of (color, endpoint) + // tuple. It is used by the SR Policy originator to make unique (from an NLRI perspective) + // both for multiple candidate paths of the same SR Policy as well as candidate paths + // of different SR Policies (i.e. with different segment list) with the same Color + // and Endpoint but meant for different head-ends. + // default = 1 + optional uint32 distinguisher = 1; + + // Policy color is used to match the color of the destination prefixes to steer traffic + // into the SR Policy. + // default = 100 + optional uint32 color = 2; + + // Specifies a single node or a set of nodes (e.g. an anycast address). It is selected + // on the basis of the SR Policy type (AFI). + // required = true + optional string ipv4_endpoint = 3; + + message NextHopMode { + enum Enum { + unspecified = 0; + local_ip = 1; + manual = 2; + } + } + // Mode for choosing the NextHop in MP REACH NLRI. Available modes are : Local IP: Automatically + // fills the Nexthop with the Local IP of the BGP peer. For IPv6 BGP peer the Nexthop + // Encoding capability should be enabled. Manual: Override the Nexthop with any arbitrary + // IPv4/IPv6 address. + // default = NextHopMode.Enum.local_ip + optional NextHopMode.Enum next_hop_mode = 4; + + message NextHopAddressType { + enum Enum { + unspecified = 0; + ipv4 = 1; + ipv6 = 2; + } + } + // Type of next hop IP address to be used when 'next_hop_mode' is set to 'manual'. + // default = NextHopAddressType.Enum.ipv4 + optional NextHopAddressType.Enum next_hop_address_type = 5; + + // The IPv4 address of the next hop if the Nexthop type 'next_hop_mode' is 'manual' + // and the Nexthop type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, + // Nexthop Encoding capability extended_next_hop_encoding should be enabled. + optional string next_hop_ipv4_address = 6; + + // The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type' is 'manual' + // and the Nexthop type 'next_hop_address_type' is IPv6. + optional string next_hop_ipv6_address = 7; + + // Description missing in models + BgpRouteAdvanced advanced = 8; + + // Description missing in models + BgpAddPath add_path = 9; + + // Description missing in models + BgpAsPath as_path = 10; + + // Optional Community settings. + repeated BgpCommunity communities = 11; + + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. + repeated BgpExtCommunity ext_communities = 12; + + // List Tunnel Encapsulation Attributes. + repeated BgpSrteV4TunnelTlv tunnel_tlvs = 13; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 14; + + // If enabled means that this part of the configuration including any active 'children' + // nodes will be advertised to peer. If disabled, this means that though config is + // present, it is not taking any part of the test but can be activated at run-time to + // advertise just this part of the configuration to the peer. + // default = True + optional bool active = 15; +} + +// Configuration for BGP SRTE Tunnel TLV. +message BgpSrteV4TunnelTlv { + + // Description missing in models + BgpSrteRemoteEndpointSubTlv remote_endpoint_sub_tlv = 1; + + // Description missing in models + BgpSrteColorSubTlv color_sub_tlv = 2; + + // Description missing in models + BgpSrteBindingSubTlv binding_sub_tlv = 3; + + // Description missing in models + BgpSrtePreferenceSubTlv preference_sub_tlv = 4; + + // Description missing in models + BgpSrtePolicyPrioritySubTlv policy_priority_sub_tlv = 5; + + // Description missing in models + BgpSrtePolicyNameSubTlv policy_name_sub_tlv = 6; + + // Description missing in models + BgpSrteExplicitNullLabelPolicySubTlv explicit_null_label_policy_sub_tlv = 7; + + // Description missing in models + repeated BgpSrteSegmentList segment_lists = 8; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 9; + + // If enabled means that this part of the configuration including any active 'children' + // nodes will be advertised to peer. If disabled, this means that though config is + // present, it is not taking any part of the test but can be activated at run-time to + // advertise just this part of the configuration to the peer. + // default = True + optional bool active = 10; +} + +// Configuration for the BGP remote endpoint sub TLV. +message BgpSrteRemoteEndpointSubTlv { + + // Autonomous system (AS) number + // default = 0 + optional uint32 as_number = 1; + + message AddressFamily { + enum Enum { + unspecified = 0; + ipv4 = 1; + ipv6 = 2; + } + } + // Determines the address type + // default = AddressFamily.Enum.ipv4 + optional AddressFamily.Enum address_family = 2; + + // The IPv4 address of the Remote Endpoint. + // default = 0.0.0.0 + optional string ipv4_address = 3; + + // The IPv6 address of the Remote Endpoint. + // default = ::0 + optional string ipv6_address = 4; +} + +// Configuration for the Policy Color attribute sub-TLV. The Color sub-TLV MAY be used +// as a way to color the corresponding Tunnel TLV. The Value field of the sub-TLV is +// eight octets long and consists of a Color Extended Community. First two octets of +// its Value field are 0x030b as type and subtype of extended community. Remaining +// six octets are are exposed to configure. +message BgpSrteColorSubTlv { + + // Six octet values. Example: 000000000064 for color value 100. + optional string color = 1; +} + +// Configuration for the binding SID sub-TLV. This is used to signal the binding SID +// related information of the SR Policy candidate path. +message BgpSrteBindingSubTlv { + + message BindingSidType { + enum Enum { + unspecified = 0; + no_binding = 1; + four_octet_sid = 2; + ipv6_sid = 3; + } + } + // Type of the binding SID. Supported types are No Binding SID or Four Octets Sid or + // IPv6 SID. + // default = BindingSidType.Enum.no_binding + optional BindingSidType.Enum binding_sid_type = 1; + + // Binding SID is encoded in 4 octets. + optional uint32 four_octet_sid = 2; + + // IPv6 SID value. + optional string ipv6_sid = 3; + + // S-Flag encodes the Specified-BSID-only behavior. + // default = False + optional bool s_flag = 4; + + // I-Flag encodes the Drop Upon Invalid behavior. + // default = False + optional bool i_flag = 5; +} + +// Configuration for BGP preference sub TLV of the SR Policy candidate path. +message BgpSrtePreferenceSubTlv { + + // The preference value of the SR Policy candidate path. + // default = 0 + optional uint32 preference = 1; +} + +// Configuration for the Policy Priority sub-TLV. The Policy Priority to indicate the +// order in which the SR policies are re-computed upon topological change. +message BgpSrtePolicyPrioritySubTlv { + + // One-octet Priority value. + optional uint32 policy_priority = 1; +} + +// Configuration for the Policy Name sub-TLV. The Policy Name sub-TLV is used to attach +// a symbolic name to the SR Policy candidate path. +message BgpSrtePolicyNameSubTlv { + + // Symbolic name for the policy that should be a string of printable ASCII characters, + // without a NULL terminator. + optional string policy_name = 1; +} + +// Configuration for BGP explicit null label policy sub TLV settings. +message BgpSrteExplicitNullLabelPolicySubTlv { + + message ExplicitNullLabelPolicy { + enum Enum { + unspecified = 0; + reserved_enlp = 1; + push_ipv4_enlp = 2; + push_ipv6_enlp = 3; + push_ipv4_ipv6_enlp = 4; + do_not_push_enlp = 5; + } + } + // The value of the explicit null label policy + // default = ExplicitNullLabelPolicy.Enum.do_not_push_enlp + optional ExplicitNullLabelPolicy.Enum explicit_null_label_policy = 1; +} + +// Optional configuration for BGP SR TE Policy segment list. The Segment List sub-TLV +// encodes a single explicit path towards the Endpoint. +message BgpSrteSegmentList { + + // The Weight associated with a given path and the sub-TLV is optional. + // default = 0 + optional uint32 weight = 1; + + // Description missing in models + repeated BgpSrteSegment segments = 2; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 3; + + // If enabled means that this part of the configuration including any active 'children' + // nodes will be advertised to peer. If disabled, this means that though config is + // present, it is not taking any part of the test but can be activated at run-time to + // advertise just this part of the configuration to the peer. + // default = True + optional bool active = 4; +} + +// A Segment sub-TLV describes a single segment in a segment list i.e., a single element +// of the explicit path. The Segment sub-TLVs are optional. +message BgpSrteSegment { + + message SegmentType { + enum Enum { + unspecified = 0; + type_a = 1; + type_b = 2; + type_c = 3; + type_d = 4; + type_e = 5; + type_f = 6; + type_g = 7; + type_h = 8; + type_i = 9; + type_j = 10; + type_k = 11; + } + } + // Specify one of the segment type. + // https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13 + // Type A: SID only, in the form of MPLS Label. + // Type B: SID only, in the form of IPv6 Address. + // Type C: IPv4 Node Address with optional SID. + // Type D: IPv6 Node Address with optional SID for SR MPLS. + // Type E: IPv4 Address and index with optional SID. + // Type F: IPv4 Local and Remote addresses with optional SID. + // Type G: IPv6 Address and index for local and remote pair with optional + // SID for SR MPLS. + // Type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. + // Type I: IPv6 Node Address with optional SID for SRv6. + // Type J: IPv6 Address and index for local and remote pair with optional + // SID for SRv6. + // Type K: IPv6 Local and Remote addresses for SRv6. + // required = true + optional SegmentType.Enum segment_type = 1; + + // Description missing in models + BgpSrteSegmentATypeSubTlv type_a = 2; + + // Description missing in models + BgpSrteSegmentBTypeSubTlv type_b = 3; + + // Description missing in models + BgpSrteSegmentCTypeSubTlv type_c = 4; + + // Description missing in models + BgpSrteSegmentDTypeSubTlv type_d = 5; + + // Description missing in models + BgpSrteSegmentETypeSubTlv type_e = 6; + + // Description missing in models + BgpSrteSegmentFTypeSubTlv type_f = 7; + + // Description missing in models + BgpSrteSegmentGTypeSubTlv type_g = 8; + + // Description missing in models + BgpSrteSegmentHTypeSubTlv type_h = 9; + + // Description missing in models + BgpSrteSegmentITypeSubTlv type_i = 10; + + // Description missing in models + BgpSrteSegmentJTypeSubTlv type_j = 11; + + // Description missing in models + BgpSrteSegmentKTypeSubTlv type_k = 12; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 13; + + // If enabled means that this part of the configuration including any active 'children' + // nodes will be advertised to peer. If disabled, this means that though config is + // present, it is not taking any part of the test but can be activated at run-time to + // advertise just this part of the configuration to the peer. + // default = True + optional bool active = 14; +} + +// Configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. +message BgpSrteSrMplsSid { + + // Label value in [0, 2^20 -1]. + optional uint32 label = 1; + + // Traffic class in bits. + optional uint32 tc = 2; + + // Bottom-of-Stack bit. + optional bool s_bit = 3; + + // Time To Live. + optional uint32 ttl = 4; +} + +// Configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation +// of lengths for Locator Block, Locator Node, Function, and Argument MUST be less +// than or equal to 128. +message BgpSrteSRv6SIDEndpointBehaviorAndStructure { + + // SRv6 SID Locator Block length in bits. + // default = 0 + optional uint32 lb_length = 1; + + // SRv6 SID Locator Node length in bits. + // default = 0 + optional uint32 ln_length = 2; + + // SRv6 SID Function length in bits. + // default = 0 + optional uint32 func_length = 3; + + // SRv6 SID Arguments length in bits. + // default = 0 + optional uint32 arg_length = 4; +} + +// Type A: SID only, in the form of MPLS Label. +message BgpSrteSegmentATypeSubTlv { + + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + optional string flags = 1; + + // Label value in [0, 2^20 -1]. + optional uint32 label = 2; + + // Traffic class in bits. + optional uint32 tc = 3; + + // Bottom-of-Stack bit. + optional bool s_bit = 4; + + // Time To Live. + optional uint32 ttl = 5; +} + +// Type B: SID only, in the form of IPv6 address. +message BgpSrteSegmentBTypeSubTlv { + + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + optional string flags = 1; + + // SRv6 SID. + // required = true + optional string srv6_sid = 2; + + // Optional SRv6 Endpoint Behavior and SID Structure. + BgpSrteSRv6SIDEndpointBehaviorAndStructure srv6_sid_endpoint_behavior = 3; +} + +// Type C: IPv4 Node Address with optional SID. +message BgpSrteSegmentCTypeSubTlv { + + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + optional string flags = 1; + + // SR Algorithm identifier when A-Flag in on. + // default = 0 + optional uint32 sr_algorithm = 2; + + // IPv4 address representing a node. + // required = true + optional string ipv4_node_address = 3; + + // Optional SR-MPLS SID. + BgpSrteSrMplsSid sr_mpls_sid = 4; +} + +// Type D: IPv6 Node Address with optional SID for SR MPLS. +message BgpSrteSegmentDTypeSubTlv { + + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + optional string flags = 1; + + // specifying SR Algorithm when when A-Flag as defined in above flags. + // default = 0 + optional uint32 sr_algorithm = 2; + + // IPv6 address representing a node. + // required = true + optional string ipv6_node_address = 3; + + // Optional SR-MPLS SID. + BgpSrteSrMplsSid sr_mpls_sid = 4; +} + +// Type E: IPv4 Address and Local Interface ID with optional SID +message BgpSrteSegmentETypeSubTlv { + + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + optional string flags = 1; + + // Local Interface ID: The Interface Index as defined in [RFC8664]. + // default = 0 + optional uint32 local_interface_id = 2; + + // IPv4 address representing a node. + // required = true + optional string ipv4_node_address = 3; + + // Optional SR-MPLS SID. + BgpSrteSrMplsSid sr_mpls_sid = 4; +} + +// Type F: IPv4 Local and Remote addresses with optional SID. +message BgpSrteSegmentFTypeSubTlv { + + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + optional string flags = 1; + + // Local IPv4 Address. + // required = true + optional string local_ipv4_address = 2; + + // Remote IPv4 Address. + // required = true + optional string remote_ipv4_address = 3; + + // Optional SR-MPLS SID. + BgpSrteSrMplsSid sr_mpls_sid = 4; +} + +// Type G: IPv6 Address, Interface ID for local and remote pair with optional SID for +// SR MPLS. +message BgpSrteSegmentGTypeSubTlv { + + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + optional string flags = 1; + + // Local Interface ID: The Interface Index as defined in [RFC8664]. + // default = 0 + optional uint32 local_interface_id = 2; + + // IPv6 address representing a node. + // required = true + optional string local_ipv6_node_address = 3; + + // Local Interface ID: The Interface Index as defined in [RFC8664]. + // default = 0 + optional uint32 remote_interface_id = 4; + + // IPv6 address representing a node. + // required = true + optional string remote_ipv6_node_address = 5; + + // Optional SR-MPLS SID. + BgpSrteSrMplsSid sr_mpls_sid = 6; +} + +// Type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. +message BgpSrteSegmentHTypeSubTlv { + + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + optional string flags = 1; + + // Local IPv6 Address. + // required = true + optional string local_ipv6_address = 2; + + // Remote IPv6 Address. + // required = true + optional string remote_ipv6_address = 3; + + // Optional SR-MPLS SID. + BgpSrteSrMplsSid sr_mpls_sid = 4; +} + +// Type I: IPv6 Node Address with optional SRv6 SID. +message BgpSrteSegmentITypeSubTlv { + + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + optional string flags = 1; + + // IPv6 address representing a node. + // required = true + optional string ipv6_node_address = 2; + + // Optional SRv6 SID. + optional string srv6_sid = 3; + + // Optional SRv6 Endpoint Behavior and SID Structure. + BgpSrteSRv6SIDEndpointBehaviorAndStructure srv6_sid_endpoint_behavior = 4; +} + +// Type J: IPv6 Address, Interface ID for local and remote pair for SRv6 with optional +// SID. +message BgpSrteSegmentJTypeSubTlv { + + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + optional string flags = 1; + + // SR Algorithm identifier when A-Flag in on. + // default = 0 + optional uint32 sr_algorithm = 2; + + // Local Interface ID: The Interface Index as defined in [RFC8664]. + // default = 0 + optional uint32 local_interface_id = 3; + + // IPv6 address representing a node. + // required = true + optional string local_ipv6_node_address = 4; + + // Local Interface ID: The Interface Index as defined in [RFC8664]. + // default = 0 + optional uint32 remote_interface_id = 5; + + // IPv6 address representing a node. + // required = true + optional string remote_ipv6_node_address = 6; + + // Optional SRv6 SID. + optional string srv6_sid = 7; + + // Optional SRv6 Endpoint Behavior and SID Structure. + BgpSrteSRv6SIDEndpointBehaviorAndStructure srv6_sid_endpoint_behavior = 8; +} + +// Type K: IPv6 Local and Remote addresses for SRv6 with optional SID. +message BgpSrteSegmentKTypeSubTlv { + + // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined + // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + optional string flags = 1; + + // SR Algorithm identifier when A-Flag in on. + // default = 0 + optional uint32 sr_algorithm = 2; + + // IPv6 address representing a node. + // required = true + optional string local_ipv6_address = 3; + + // IPv6 address representing a node. + // required = true + optional string remote_ipv6_address = 4; + + // Optional SRv6 SID. + optional string srv6_sid = 5; + + // Optional SRv6 Endpoint Behavior and SID Structure. + BgpSrteSRv6SIDEndpointBehaviorAndStructure srv6_sid_endpoint_behavior = 6; +} + +// Configuration for BGP Segment Routing Traffic Engineering policy. +// +message BgpSrteV6Policy { + + // Identifies the policy in the context of (color and endpoint) tuple. It is used by + // the SR Policy originator to make unique multiple occurrences of the same SR Policy. + // default = 1 + optional uint32 distinguisher = 1; + + // Identifies the policy. It is used to match the color of the destination prefixes + // to steer traffic into the SR Policy. + // default = 100 + optional uint32 color = 2; + + // Specifies a single node or a set of nodes (e.g., an anycast address). It is selected + // on the basis of the SR Policy type (AFI). + // required = true + optional string ipv6_endpoint = 3; + + message NextHopMode { + enum Enum { + unspecified = 0; + local_ip = 1; + manual = 2; + } + } + // Mode for choosing the NextHop in MP REACH NLRI. Available modes are : Local IP: Automatically + // fills the Nexthop with the Local IP of the BGP peer. For IPv6 BGP peer the Nexthop + // Encoding capability should be enabled. Manual: Override the Nexthop with any arbitrary + // IPv4/IPv6 address. + // default = NextHopMode.Enum.local_ip + optional NextHopMode.Enum next_hop_mode = 4; + + message NextHopAddressType { + enum Enum { + unspecified = 0; + ipv4 = 1; + ipv6 = 2; + } + } + // Type of next hop IP address to be used when 'next_hop_mode' is set to 'manual'. + // default = NextHopAddressType.Enum.ipv6 + optional NextHopAddressType.Enum next_hop_address_type = 5; + + // The IPv4 address of the Nexthop if the 'next_hop_mode' is 'manual' and the Nexthop + // type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, Nexthop Encoding + // capability extended_next_hop_encoding should be enabled. + // default = 0.0.0.0 + optional string next_hop_ipv4_address = 6; + + // The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type' is 'manual' + // and the Nexthop type 'next_hop_address_type' is IPv6. + // default = ::0 + optional string next_hop_ipv6_address = 7; + + // Description missing in models + BgpRouteAdvanced advanced = 8; + + // Description missing in models + BgpAddPath add_path = 9; + + // Description missing in models + BgpAsPath as_path = 10; + + // Optional community settings. + repeated BgpCommunity communities = 11; + + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. + repeated BgpExtCommunity extcommunities = 12; + + // List of optional tunnel TLV settings. + repeated BgpSrteV6TunnelTlv tunnel_tlvs = 13; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 14; + + // If enabled means that this part of the configuration including any active 'children' + // nodes will be advertised to peer. If disabled, this means that though config is + // present, it is not taking any part of the test but can be activated at run-time to + // advertise just this part of the configuration to the peer. // default = True - optional bool include_multi_exit_discriminator = 3; + optional bool active = 15; +} + +// Configuration for BGP SRTE Tunnel TLV. +message BgpSrteV6TunnelTlv { + + // Description missing in models + BgpSrteRemoteEndpointSubTlv remote_endpoint_sub_tlv = 1; + + // Description missing in models + BgpSrteColorSubTlv color_sub_tlv = 2; + + // Description missing in models + BgpSrteBindingSubTlv binding_sub_tlv = 3; + + // Description missing in models + BgpSrtePreferenceSubTlv preference_sub_tlv = 4; + + // Description missing in models + BgpSrtePolicyPrioritySubTlv policy_priority_sub_tlv = 5; + + // Description missing in models + BgpSrtePolicyNameSubTlv policy_name_sub_tlv = 6; + + // Description missing in models + BgpSrteExplicitNullLabelPolicySubTlv explicit_null_label_policy_sub_tlv = 7; + + // Description missing in models + repeated BgpSrteSegmentList segment_lists = 8; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 9; + + // If enabled means that this part of the configuration including any active 'children' + // nodes will be advertised to peer. If disabled, this means that though config is + // present, it is not taking any part of the test but can be activated at run-time to + // advertise just this part of the configuration to the peer. + // default = True + optional bool active = 10; +} + +// The Graceful Restart Capability (RFC 4724) is a BGP capability that can be used by +// a BGP speaker to indicate its ability to preserve its forwarding state during BGP +// restart. The Graceful Restart (GR) capability is advertised in OPEN messages sent +// between BGP peers. After a BGP session has been established, and the initial routing +// update has been completed, an End-of-RIB (Routing Information Base) marker is sent +// in an UPDATE message to convey information about routing convergence. +message BgpGracefulRestart { + + // If enabled, Graceful Restart capability is advertised in BGP OPEN messages. + // default = False + optional bool enable_gr = 1; + + // This is the estimated duration (in seconds) it will take for the BGP session to be + // re-established after a restart. This can be used to speed up routing convergence + // by its peer in case the BGP speaker does not come back after a restart. + // default = 45 + optional uint32 restart_time = 2; + + // If enabled, the Long-lived Graceful Restart Capability, or LLGR Capability + // will be advertised. + // This capability MUST be advertised in conjunction with the Graceful Restart + // capability. + // default = False + optional bool enable_llgr = 3; + + // Duration (in seconds) specifying how long stale information (for the AFI/SAFI) + // may be retained. This is a three byte field and is applicable + // only if 'enable_llgr' is set to 'true'. + // default = 10 + optional uint32 stale_time = 4; + + // If enabled, the N flag will be set in the Graceful Restart capability in the Open + // message. + // If both peers in a BGP connection has this enabled, Graceful Restart procedures are + // performed + // even if the peer goes down due to sending of a Notification Message as per RFC8538. + // default = True + optional bool enable_notification = 5; +} + +// Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the +// order given in the input to the peer after the BGP session is established. +message BgpUpdateReplay { + + message Choice { + enum Enum { + unspecified = 0; + structured_pdus = 1; + raw_bytes = 2; + } + } + // Description missing in models + // default = Choice.Enum.structured_pdus + optional Choice.Enum choice = 1; + + // Description missing in models + BgpStructuredPdus structured_pdus = 2; + + // Description missing in models + BgpRawBytes raw_bytes = 3; +} + +// Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the +// order given in the input to the peer after the BGP session is established. +message BgpRawBytes { + + // Array of ordered BGP Updates ( including both Advertise and Withdraws ) to be sent + // in the order given in the input to the peer after the BGP session is established. + // + repeated BgpOneUpdateReplay updates = 1; +} + +// Specification of one BGP Update to be sent to the BGP peer. +message BgpOneUpdateReplay { + + // Minimum time interval in milliseconds from previous Update from the sequence of BGP + // Updates to be replayed. + // default = 0 + optional uint32 time_gap = 1; + + // Bytes specified in hex format to be sent to peer after the BGP Update Header. The + // Update Header will always have the initial 16 bytes containing Marker bytes, 2 bytes + // containing the Length and 1 byte containing the Type.The string MUST contain sequence + // of valid hex bytes. The bytes specified in hex format should be appended to the Update + // message to be sent to the peer after the fixed 19 bytes described above. This byte + // stream can be of any length from 1 to 4077 bytes.The value 4077 is derived from + // the maximum length allowed for a BGP message in RFC4271 which is 4096 minus mandatory + // 19 bytes described above. In the imported byte stream, one byte is represented as + // string of 2 characters, for example 2 character string (0x)AB represents value of + // a single byte. So the maximum length of this attribute is 8154 (4077 * 2 hex characters + // per byte). + // required = true + optional string update_bytes = 2; +} + +// Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the +// order given in the input to the peer after the BGP session is established. +message BgpStructuredPdus { + + // Array of ordered BGP Updates ( including both Advertise and Withdraws ) to be sent + // in the order given in the input to the peer after the BGP session is established. + // + repeated BgpOneStructuredUpdateReplay updates = 1; +} + +// One structured BGP Update. +message BgpOneStructuredUpdateReplay { + + // Minimum time interval in milliseconds from previous Update from the sequence of BGP + // Updates to be replayed. + // default = 0 + optional uint32 time_gap = 1; + + // Attributes carried in the Update packet alongwith the reach/unreach prefixes. + // + BgpAttributes path_attributes = 2; + + // The IPv4 prefixes to be included in the traditional UNREACH_NLRI. + repeated BgpOneTraditionalNlriPrefix traditional_unreach_nlris = 3; + + // The IPv4 prefixes to be included in the traditional REACH_NLRI. + repeated BgpOneTraditionalNlriPrefix traditional_reach_nlris = 4; +} + +// TRADITIONAL_NLRI is an optional part of the the BGP Update which can carry only IPv4 +// prefix information as defined in https://www.rfc-editor.org/rfc/rfc4271.html#section-4.3 +// +// and extended by https://datatracker.ietf.org/doc/html/rfc7911#section-3 to carry +// additional Path Id information per prefix. +message BgpOneTraditionalNlriPrefix { + + // The IPv4 address of the network. + // default = 0.0.0.0 + optional string address = 1; + + // The IPv4 network prefix length to be applied to the address. + // default = 24 + optional uint32 prefix = 2; + + // Description missing in models + BgpNLRIPrefixPathId path_id = 3; +} + +// One IPv4 NLRI Prefix. +message BgpOneIpv4NLRIPrefix { + + // The IPv4 address of the network. + // default = 0.0.0.0 + optional string address = 1; + + // The IPv4 network prefix length to be applied to the address. + // default = 24 + optional uint32 prefix = 2; + + // Description missing in models + BgpNLRIPrefixPathId path_id = 3; +} + +// One IPv6 NLRI Prefix. +message BgpOneIpv6NLRIPrefix { + + // The IPv6 address of the network. + // default = 0::0 + optional string address = 1; + + // The IPv6 network prefix length to be applied to the address. + // default = 64 + optional uint32 prefix = 2; + + // Description missing in models + BgpNLRIPrefixPathId path_id = 3; +} + +// Optional field in the NLRI carrying Path Id of the prefix. +message BgpNLRIPrefixPathId { + + // The value of the optional Path ID of the prefix. + // default = 1 + optional uint32 value = 1; +} + +// IPv4 Segment Routing Policy NLRI Prefix. +message BgpIpv4SrPolicyNLRIPrefix { + + // The 4-octet value uniquely identifying the policy in the context of + // tuple. The distinguisher has no semantic value and is solely used by the SR Policy + // originator to make unique (from an NLRI perspective) both for multiple candidate + // paths of the same SR Policy as well as candidate paths of different SR Policies + // (i.e. with different segment lists) with the same Color and Endpoint but meant for + // different headends. + // default = 1 + optional uint32 distinguisher = 1; + + // 4-octet value identifying (with the endpoint) the policy. The color is used to match + // the color of the destination prefixes to steer traffic into the SR Policy as specified + // in section 8 of RFC9256. + // default = 1 + optional uint32 color = 2; + + // Identifies the endpoint of a policy. The Endpoint is an IPv4 address and can be + // either a unicast or an unspecified address (0.0.0.0) as specified in section 2.1 + // of RFC9256. + // default = 0.0.0.0 + optional string endpoint = 3; +} + +// One IPv6 Segment Routing Policy NLRI Prefix. +message BgpIpv6SrPolicyNLRIPrefix { + + // The 4-octet value uniquely identifying the policy in the context of + // tuple. The distinguisher has no semantic value and is solely used by the SR Policy + // originator to make unique (from an NLRI perspective) both for multiple candidate + // paths of the same SR Policy as well as candidate paths of different SR Policies + // (i.e. with different segment lists) with the same Color and Endpoint but meant for + // different headends. + // default = 1 + optional uint32 distinguisher = 1; + + // 4-octet value identifying (with the endpoint) the policy. The color is used to match + // the color of the destination prefixes to steer traffic into the SR Policy as specified + // in section 8 of RFC9256. + // default = 1 + optional uint32 color = 2; - // The multi exit discriminator (MED) value used for route selection sent to the peer. - optional uint32 multi_exit_discriminator = 1; + // Identifies the endpoint of a policy. The Endpoint may represent a single node or + // a set of nodes (e.g., an anycast address). The Endpoint is an IPv6 address and can + // be either a unicast or an unspecified address (0::0) as specified in section 2.1 + // of RFC9256. + // default = 0::0 + optional string endpoint = 3; +} - // If set to true, the Origin attribute will be included in the route advertisement. - // default = True - optional bool include_origin = 4; +// Attributes carried in the Update packet alongwith the reach/unreach prefixes. +message BgpAttributes { + + // Any attributes not present in the list of configurable attributes should be added + // to the list of unknown attributes. + repeated BgpAttributesOtherAttribute other_attributes = 1; message Origin { enum Enum { @@ -1989,142 +4940,190 @@ message BgpRouteAdvanced { incomplete = 3; } } - // The origin attribute of a prefix can take three values: the prefix originates from - // an interior routing protocol 'igp', it originates from 'egp' or the origin is 'incomplete', - // if the prefix is learned through other means. - // default = Origin.Enum.igp + // The ORIGIN attribute is a mandatory attribute which can take three values: + // the prefix originates from an interior routing protocol 'igp', it originates from + // 'egp' + // or the origin is 'incomplete',if the prefix is learned through other means. + // + // default = Origin.Enum.incomplete optional Origin.Enum origin = 2; - // BGP Local Preference attribute sent to the peer to indicate the degree of preference - // for externally learned routes. If set to true, the Local Preference attribute will - // be included in the route advertisement. This should be included only for internal - // peers. - // default = True - optional bool include_local_preference = 5; + // AS_PATH attribute to be included in the Update. + BgpAttributesAsPath as_path = 3; - // Value to be set in Local Preference attribute if include_local_preference is set - // to true. It is used for the selection of the path for the traffic leaving the AS. - // The route with the highest local preference value is preferred. - // default = 100 - optional uint32 local_preference = 6; + // AS4_PATH attribute to be included in the Update. + BgpAttributesAs4Path as4_path = 4; + + // Description missing in models + BgpAttributesNextHop next_hop = 5; + + // Description missing in models + BgpAttributesMultiExitDiscriminator multi_exit_discriminator = 6; + + // Description missing in models + BgpAttributesLocalPreference local_preference = 7; + + // If enabled, it indicates that the ATOMIC_AGGREGATOR attribute should be included + // in the Update. + // Presence of this attribute Indicates that this route might not be getting sent on + // a fully optimized path + // since some intermediate BGP speaker has aggregated the route. + // + // default = False + optional bool include_atomic_aggregator = 8; + + // Description missing in models + BgpAttributesAggregator aggregator = 9; + + // Description missing in models + BgpAttributesAs4Aggregator as4_aggregator = 10; + + // Description missing in models + repeated BgpAttributesCommunity community = 11; + + // Description missing in models + BgpAttributesOriginatorId originator_id = 12; + + // When a Route Reflector reflects a route, it prepends the local CLUSTER_ID to the + // CLUSTER_LIST as defined in RFC4456. + repeated string cluster_ids = 13; + + // Optional EXTENDED_COMMUNITY attribute settings. + // The EXTENDED_COMMUNITY Attribute is a transitive optional BGP attribute, with the + // Type Code 16. Community and Extended Communities attributes + // are utilized to trigger routing decisions, such as acceptance, rejection, preference, + // or redistribution. An extended community is an eight byte value. + // It is divided into two main parts. The first two bytes of the community encode a + // type and sub-type fields and the last six bytes carry a unique set + // of data in a format defined by the type and sub-type field. Extended communities + // provide a larger range for grouping or categorizing communities. + repeated BgpExtendedCommunity extended_communities = 14; + + // Description missing in models + BgpAttributesTunnelEncapsulation tunnel_encapsulation = 15; + + // Description missing in models + BgpAttributesMpReachNlri mp_reach = 16; + + // Description missing in models + BgpAttributesMpUnreachNlri mp_unreach = 17; } -// BGP communities provide additional capability for tagging routes and for modifying -// BGP routing policy on upstream and downstream routers. BGP community is a 32-bit -// number which is broken into 16-bit AS number and a 16-bit custom value. -message BgpCommunity { +// One unknown attribute stored as hex bytes. +message BgpAttributesOtherAttribute { - message Type { - enum Enum { - unspecified = 0; - manual_as_number = 1; - no_export = 2; - no_advertised = 3; - no_export_subconfed = 4; - llgr_stale = 5; - no_llgr = 6; - } - } - // The type of community AS number. - optional Type.Enum type = 1; + // Optional flag in the BGP attribute. + // default = False + optional bool flag_optional = 1; - // First two octets of 32 bit community AS number. - // default = 0 - optional uint32 as_number = 2; + // Transitive flag in the BGP attribute. + // default = False + optional bool flag_transitive = 2; - // Last two octets of the community value. - // default = 0 - optional uint32 as_custom = 3; + // Partial flag in the BGP attribute. + // default = False + optional bool flag_partial = 3; + + // Extended length flag in the BGP attribute. + // default = False + optional bool flag_extended_length = 4; + + // The value of the Type field in the attribute. + // required = true + optional uint32 type = 5; + + // Contents of the value field ( the contents after the initial two bytes containing + // the Flags and Type field ) of the attribute in hex bytes. + // It includes the contents of length of the extended length field if included. + // required = true + optional string raw_value = 6; } -// The Extended Communities Attribute is a transitive optional BGP attribute, with the -// Type Code 16. Community and Extended Communities attributes are utilized to trigger -// routing decisions, such as acceptance, rejection, preference, or redistribution. -// An extended community is an 8-Bytes value. It is divided into two main parts. The -// first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes -// carry a unique set of data in a format defined by the type and sub-type field. Extended -// communities provide a larger range for grouping or categorizing communities. -message BgpExtCommunity { +// The AS_PATH attribute identifies the autonomous systems through which routing information +// carried in this UPDATE message has passed. +// This contains the configuration of how to include the Local AS in the AS path +// attribute of the MP REACH NLRI. It also contains optional configuration of +// additional AS Path Segments that can be included in the AS Path attribute. +// The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that +// a routing information passes through to reach the destination. +// There are two modes in which AS numbers can be encoded in the AS Path Segments +// - When the AS Path is being exchanged between old and new BGP speakers or between +// two old BGP speakers , the AS numbers are encoded as 2 byte values. +// - When the AS Path is being exchanged between two new BGP speakers supporting 4 byte +// AS , the AS numbers are encoded as 4 byte values. +message BgpAttributesAsPath { - message Type { + message Choice { enum Enum { unspecified = 0; - administrator_as_2octet = 1; - administrator_ipv4_address = 2; - administrator_as_4octet = 3; - opaque = 4; - evpn = 5; - administrator_as_2octet_link_bandwidth = 6; + four_byte_as_path = 1; + two_byte_as_path = 2; } } - // Extended Community Type field of 1 Byte. - // - administrator_as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). - // - administrator_ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). - // - administrator_as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). - // - opaque: Opaque Extended Community (RFC 7432). - // - evpn: EVPN Extended Community (RFC 7153). - // - administrator_as_2octet_link_bandwidth : Link Bandwidth Extended Community (RFC - // 7153). - optional Type.Enum type = 1; + // Description missing in models + // default = Choice.Enum.four_byte_as_path + optional Choice.Enum choice = 1; - message Subtype { - enum Enum { - unspecified = 0; - route_target = 1; - origin = 2; - extended_bandwidth = 3; - color = 4; - encapsulation = 5; - mac_address = 6; - } - } - // Extended Community Sub Type field of 1 Byte. - // - route_target: Route Target. - // - origin: Origin. - // - extended_bandwidth: Specifies the link bandwidth. - // - color: Specifies the color value. - // - encapsulation: Specifies the Encapsulation Extended Community. - // - mac_address: Specifies the Extended community MAC address. - optional Subtype.Enum subtype = 2; + // Description missing in models + BgpAttributesAsPathFourByteAsPath four_byte_as_path = 2; - // Extended Community value of 6 Bytes. Example - for the Opaque type and Color subtype - // value can be '0000000000c8' for the color value 200. - optional string value = 3; + // Description missing in models + BgpAttributesAsPathTwoByteAsPath two_byte_as_path = 3; } -// This attribute identifies the autonomous systems through which routing information -// carried in this UPDATE message has passed. This contains the configuration of how -// to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains -// optional configuration of additional AS Path Segments that can be included in the -// AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems -// (AS) numbers that a routing information passes through to reach the destination. -message BgpAsPath { +// AS Paths with 4 byte AS numbers can be exchanged only if both BGP speakers support +// 4 byte AS number extensions. +message BgpAttributesAsPathFourByteAsPath { - message AsSetMode { + // The AS path segments containing 4 byte AS numbers to be added in the AS Path attribute. + // By default, an empty AS path should always be included and for EBGP at minimum the + // local AS number should be present in the AS Path. + repeated BgpAttributesFourByteAsPathSegment segments = 1; +} + +// Configuration for a single BGP AS path segment containing 4 byte AS numbers. +message BgpAttributesFourByteAsPathSegment { + + message Type { enum Enum { unspecified = 0; - do_not_include_local_as = 1; - include_as_seq = 2; - include_as_set = 3; - include_as_confed_seq = 4; - include_as_confed_set = 5; - prepend_to_first_segment = 6; + as_seq = 1; + as_set = 2; + as_confed_seq = 3; + as_confed_set = 4; } } - // Defines how the Local AS should be included in the MP REACH NLRI. For iBGP sessions, - // Do Not Include Local AS must be chosen. For eBGP sessions, any choice other than - // Do Not Include Local AS can be chosen. - // default = AsSetMode.Enum.do_not_include_local_as - optional AsSetMode.Enum as_set_mode = 1; + // AS sequence is the most common type of AS_PATH, it contains the list + // of ASNs starting with the most recent ASN being added read from left + // to right. + // The other three AS_PATH types are used for Confederations + // - AS_SET is the type of AS_PATH attribute that summarizes routes using + // using the aggregate-address command, allowing AS_PATHs to be summarized + // in the update as well. + // - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most + // recent ASN to be added reading left to right + // - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent + // in BGP Updates. + // default = Type.Enum.as_seq + optional Type.Enum type = 1; - // The additional AS path segments to be added in the NLRI. By default, an empty AS - // path is always included and the local AS is added to it as per the value of 'as_set_mode' - // attribute. - repeated BgpAsPathSegment segments = 2; + // The 4 byte AS numbers in this AS path segment. + repeated uint32 as_numbers = 2; } -// Configuration for a single BGP AS path segment -message BgpAsPathSegment { +// AS Paths with 2 byte AS numbers is used when any of the two scenarios occur : +// - An old BGP speaker and new BGP speaker are sending BGP Updates to one another. +// - Two old BGP speakers are sending BGP Updates to one another. +message BgpAttributesAsPathTwoByteAsPath { + + // The AS path segments containing 2 byte AS numbers to be added in the AS Path attribute. + // By default, an empty AS path should always be included and for EBGP the sender's + // AS number should be prepended to the AS Path. + repeated BgpAttributesTwoByteAsPathSegment segments = 1; +} + +// Configuration for a single BGP AS path segment containing 2 byte AS numbers. +message BgpAttributesTwoByteAsPathSegment { message Type { enum Enum { @@ -2135,1082 +5134,1169 @@ message BgpAsPathSegment { as_confed_set = 4; } } - // AS sequence is the most common type of AS_PATH, it contains the list of ASNs starting - // with the most recent ASN being added read from left to right. - // The other three AS_PATH types are used for Confederations - AS_SET is the type of - // AS_PATH attribute that summarizes routes using using the aggregate-address command, - // allowing AS_PATHs to be summarized in the update as well. - AS_CONFED_SEQ gives - // the list of ASNs in the path starting with the most recent ASN to be added reading - // left to right - AS_CONFED_SET will allow summarization of multiple AS PATHs to be - // sent in BGP Updates. + // AS sequence is the most common type of AS_PATH, it contains the list + // of ASNs starting with the most recent ASN being added read from left + // to right. + // The other three AS_PATH types are used for Confederations + // - AS_SET is the type of AS_PATH attribute that summarizes routes using + // using the aggregate-address command, allowing AS_PATHs to be summarized + // in the update as well. + // - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most + // recent ASN to be added reading left to right + // - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent + // in BGP Updates. // default = Type.Enum.as_seq optional Type.Enum type = 1; - // The AS numbers in this AS path segment. + // The 2 byte AS numbers in this AS path segment. repeated uint32 as_numbers = 2; } -// This contains a list of different flavors of EVPN. -// For example EVPN over VXLAN or EVPN over MPLS etc to be configured per Ethernet segment. +// The AS4_PATH attribute identifies the autonomous systems through which routing information +// carried in this UPDATE message has passed. +// This contains the configuration of how to include the Local AS in the AS path +// attribute of the MP REACH NLRI. It also contains optional configuration of +// additional AS Path Segments that can be included in the AS Path attribute. +// The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that +// a routing information passes through to reach the destination. +// AS4_PATH is only exchanged in two scenarios: +// - When an old BGP speaker has to forward a received AS4_PATH containing 4 byte AS +// numbers to new BGP speaker. +// - When a new BGP speaker is connected to an old BGP speaker and has to propagate +// 4 byte AS numbers via the old BGP speaker. +// Its usage is described in RFC4893. +message BgpAttributesAs4Path { + + // The AS path segments containing 4 byte AS numbers to be added in the AS4_PATH attribute. + repeated BgpAttributesFourByteAsPathSegment segments = 1; +} + +// Optional AGGREGATOR attribute which maybe be added by a BGP speaker which performs +// route aggregation. +// When AGGREGATOR attribute is being sent to a new BGP speaker , the AS number is encoded +// as a 4 byte value. +// When AGGREGATOR attribute is being exchanged between a new and an old BGP speaker +// or between two old BGP speakers, +// the AS number is encoded as a 2 byte value. +// It contain the AS number and IP address of the speaker performing the aggregation. // -// Need to instantiate correct type of EVPN instance as per requirement. -message BgpV4EvpnEvis { +message BgpAttributesAggregator { message Choice { enum Enum { unspecified = 0; - evi_vxlan = 1; + four_byte_as = 1; + two_byte_as = 2; } } // Description missing in models - // default = Choice.Enum.evi_vxlan + // default = Choice.Enum.four_byte_as optional Choice.Enum choice = 1; - // EVPN VXLAN instance to be configured per Ethernet Segment. - BgpV4EviVxlan evi_vxlan = 2; + // The value of the 4 byte AS number of the BGP speaker which aggregated the route. + // If the value of the AS number is less than 2 octets ( 65535 or less), the AS4_AGGREGATOR + // object should not be sent. + // default = 65536 + optional uint32 four_byte_as = 2; + + // The value of the 2 byte AS number of the BGP speaker which aggregated the route. + // + // default = 1 + optional uint32 two_byte_as = 3; + + // The IPv4 address of the BGP speaker which aggregated the route. + // default = 0.0.0.0 + optional string ipv4_address = 4; } -// Configuration for BGP EVPN EVI. Advertises following routes - -// -// Type 3 - Inclusive Multicast Ethernet Tag Route -// -// Type 1 - Ethernet Auto-discovery Route (Per EVI) -// -// Type 1 - Ethernet Auto-discovery Route (Per ES) -message BgpV4EviVxlan { +// Optional AS4_AGGREGATOR attribute which maybe be added by a BGP speaker in one of +// two cases: +// - If it is a new BGP speaker speaking to an old BGP speaker and needs to send a 4 +// byte value for the AS number of the BGP route aggregator. +// - If it is a old BGP speaker speaking to a new BGP speaker and has to transparently +// forward a received AS4_AGGREGATOR from some other peer. +// Its usage is described in RFC4893. +message BgpAttributesAs4Aggregator { - // This contains the list of Broadcast Domains to be configured per EVI. - repeated BgpV4EviVxlanBroadcastDomain broadcast_domains = 1; + // The value of the 4 byte AS number of the BGP speaker which aggregated the route. + // + optional uint32 as_num = 1; - message ReplicationType { + // The IPv4 address of the BGP speaker which aggregated the route. + // default = 0.0.0.0 + optional string ipv4_address = 2; +} + +// The COMMUNITY attribute provide additional capability for tagging routes and for +// modifying BGP routing policy on +// upstream and downstream routers. BGP community is a 32-bit number which is broken +// into 16-bit AS number and a +// 16-bit custom value or it contains some pre-defined well known values. +// +message BgpAttributesCommunity { + + message Choice { enum Enum { unspecified = 0; - ingress_replication = 1; + custom_community = 1; + no_export = 2; + no_advertised = 3; + no_export_subconfed = 4; + llgr_stale = 5; + no_llgr = 6; } } - // This model only supports Ingress Replication - // default = ReplicationType.Enum.ingress_replication - optional ReplicationType.Enum replication_type = 2; - - // Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel - // attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. - // default = 16 - optional uint32 pmsi_label = 3; - - // The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet - // Auto-discovery Route per - // default = 0 - optional uint32 ad_label = 4; - - // Colon separated Extended Community value of 6 Bytes - AS number: Value identifying - // an EVI. Example - for the as_2octet 60005:100. - BgpRouteDistinguisher route_distinguisher = 5; - - // List of Layer 2 Virtual Network Identifier (L2VNI) export targets associated with - // this EVI. - repeated BgpRouteTarget route_target_export = 6; - - // List of L2VNI import targets associated with this EVI. - repeated BgpRouteTarget route_target_import = 7; - - // List of Layer 3 Virtual Network Identifier (L3VNI) Export Route Targets. - repeated BgpRouteTarget l3_route_target_export = 8; - - // List of L3VNI Import Route Targets. - repeated BgpRouteTarget l3_route_target_import = 9; + // The type of community AS number. + // required = true + optional Choice.Enum choice = 1; // Description missing in models - BgpRouteAdvanced advanced = 10; - - // Optional community settings. - repeated BgpCommunity communities = 11; - - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. - repeated BgpExtCommunity ext_communities = 12; - - // Optional AS PATH settings. - BgpAsPath as_path = 13; + BgpAttributesCustomCommunity custom_community = 2; } -// Configuration for Broadcast Domains per EVI. -message BgpV4EviVxlanBroadcastDomain { - - // This contains the list of Customer MAC/IP Ranges to be configured per Broadcast Domain. - // - // - // Advertises following route - - // Type 2 - MAC/IP Advertisement Route. - repeated BgpCMacIpRange cmac_ip_range = 1; +// User defined COMMUNITY attribute containing 2 byte AS and custom 2 byte value defined +// by the administrator of the domain. +message BgpAttributesCustomCommunity { - // The Ethernet Tag ID of the Broadcast Domain. + // First two octets of the community value containing a 2 byte AS number. // default = 0 - optional uint32 ethernet_tag_id = 2; + optional uint32 as_number = 1; - // VLAN-Aware service to be enabled or disabled. - // default = False - optional bool vlan_aware_service = 3; + // Last two octets of the community value in hex. If user provides less than 4 hex + // bytes, it should be left-padded with 0s. + // default = 0000 + optional string custom = 2; } -// Configuration for MAC/IP Ranges per Broadcast Domain. -// -// Advertises following route - -// -// Type 2 - MAC/IP Advertisement Route. -message BgpCMacIpRange { +// Next hop to be sent inside MP_REACH NLRI or as the NEXT_HOP attribute if advertised +// as traditional NLRI. +message BgpAttributesNextHop { + + message Choice { + enum Enum { + unspecified = 0; + ipv4 = 1; + ipv6 = 2; + ipv6_two_addresses = 3; + } + } + // The type of the next HOP. + // required = true + optional Choice.Enum choice = 1; + + // The 4 byte IPv4 address of the next-hop from which the route was received. + // default = 0.0.0.0 + optional string ipv4 = 2; - // Host MAC address range per Broadcast Domain. - MACRouteAddress mac_addresses = 1; + // The 16 byte IPv6 address of the next-hop from which the route was received. + // default = 0::0 + optional string ipv6 = 3; - // Layer 2 Virtual Network Identifier (L2VNI) to be advertised with MAC/IP Advertisement - // Route (Type 2) - // default = 0 - optional uint32 l2vni = 2; + // Description missing in models + BgpAttributesNextHopIpv6TwoAddresses ipv6_two_addresses = 4; +} - // Host IPv4 address range per Broadcast Domain. - V4RouteAddress ipv4_addresses = 3; +// There is a specific scenario in which it is possible to receive a Global and Link +// Local address in the Next Hop +// field in a MP_REACH attribute or in the NEXT_HOP attribute(RFC2545: Section 3). +message BgpAttributesNextHopIpv6TwoAddresses { - // Host IPv6 address range per Broadcast Domain. - V6RouteAddress ipv6_addresses = 4; + // The first IPv6 next hop in the 32 byte IPv6 Next Hop. + // default = 0::0 + optional string first = 1; - // Layer 3 Virtual Network Identifier (L3VNI) to be advertised with MAC/IP Advertisement - // Route (Type 2). - // default = 0 - optional uint32 l3vni = 5; + // The second IPv6 next hop in the 32 byte IPv6 Next Hop. + // default = 0::0 + optional string second = 2; +} - // Include default Gateway Extended Community in MAC/IP Advertisement Route (Type 2). - // default = False - optional bool include_default_gateway = 6; +// The MP_REACH attribute is an optional attribute which can be included in the attributes +// of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3. +// The following AFI / SAFI combinations are supported: +// - IPv4 Unicast with AFI as 1 and SAFI as 1 +// - IPv6 Unicast with AFI as 2 and SAFI as 1 +// - Segment Routing Policy for IPv4 Unicast with AFI as 1 and SAFI as 73 ( draft-ietf-idr-sr-policy-safi-02 +// Section 2.1 ) +// - Segment Routing Policy for IPv6 Unicast with AFI as 2 and SAFI as 73 +message BgpAttributesMpReachNlri { // Description missing in models - BgpRouteAdvanced advanced = 7; + BgpAttributesNextHop next_hop = 1; - // Optional community settings. - repeated BgpCommunity communities = 8; + message Choice { + enum Enum { + unspecified = 0; + ipv4_unicast = 1; + ipv6_unicast = 2; + ipv4_srpolicy = 3; + ipv6_srpolicy = 4; + } + } + // The AFI and SAFI to be sent in the MPREACH_NLRI in the Update. + // required = true + optional Choice.Enum choice = 2; - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. - repeated BgpExtCommunity ext_communities = 9; + // List of IPv4 prefixes being sent in the IPv4 Unicast MPREACH_NLRI . + repeated BgpOneIpv4NLRIPrefix ipv4_unicast = 3; - // Optional AS PATH settings. - BgpAsPath as_path = 10; + // List of IPv6 prefixes being sent in the IPv6 Unicast MPREACH_NLRI . + repeated BgpOneIpv6NLRIPrefix ipv6_unicast = 4; - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 11; + // IPv4 endpoint with Segment Routing Policy being sent in the IPv4 MPREACH_NLRI . + BgpIpv4SrPolicyNLRIPrefix ipv4_srpolicy = 5; + + // IPv6 endpoint with Segment Routing Policy being sent in the IPv6 MPREACH_NLRI . + // + BgpIpv6SrPolicyNLRIPrefix ipv6_srpolicy = 6; } -// BGP Route Distinguisher. -message BgpRouteDistinguisher { +// The MP_UNREACH attribute is an optional attribute which can be included in the attributes +// of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3. +// The following AFI / SAFI combinations are supported: +// - IPv4 Unicast with AFI as 1 and SAFI as 1 +// - IPv6 Unicast with AFI as 2 and SAFI as 1 +// - Segment Routing Policy for IPv4 Unicast with AFI as 1 and SAFI as 73 (draft-ietf-idr-sr-policy-safi-02 +// Section 2.1) +// - Segment Routing Policy for IPv6 Unicast with AFI as 2 and SAFI as 73 +message BgpAttributesMpUnreachNlri { - message RdType { + message Choice { enum Enum { unspecified = 0; - as_2octet = 1; - ipv4_address = 2; - as_4octet = 3; + ipv4_unicast = 1; + ipv6_unicast = 2; + ipv4_srpolicy = 3; + ipv6_srpolicy = 4; } } - // Route Distinguisher Type field of 2 Byte. - // - as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). - // - ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). - // - as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). - // default = RdType.Enum.as_2octet - optional RdType.Enum rd_type = 1; + // The AFI and SAFI to be sent in the MPUNREACH_NLRI in the Update. + optional Choice.Enum choice = 1; - // Allow to automatically configure RD IP address from local ip. - // default = False - optional bool auto_config_rd_ip_addr = 2; + // List of IPv4 prefixes being sent in the IPv4 Unicast MPUNREACH_NLRI . + repeated BgpOneIpv4NLRIPrefix ipv4_unicast = 2; - // Colon separated Extended Community value of 6 Bytes - AS number: Value. Example - // - for the as_2octet or as_4octet 60005:100, for ipv4_address 1.1.1.1:100 - optional string rd_value = 3; + // List of IPv6 prefixes being sent in the IPv6 Unicast MPUNREACH_NLRI . + repeated BgpOneIpv6NLRIPrefix ipv6_unicast = 3; + + // IPv4 endpoint with Segment Routing Policy being sent in the IPv4 MPUNREACH_NLRI . + BgpIpv4SrPolicyNLRIPrefix ipv4_srpolicy = 4; + + // IPv6 endpoint with Segment Routing Policy being sent in the IPv4 MPUNREACH_NLRI . + // + BgpIpv6SrPolicyNLRIPrefix ipv6_srpolicy = 5; } -// BGP Route Target. -message BgpRouteTarget { +// Optional MULTI_EXIT_DISCRIMINATOR attribute sent to the peer to help in the route +// selection process. +message BgpAttributesMultiExitDiscriminator { - message RtType { + // The multi exit discriminator (MED) value used for route selection sent to the peer. + // + // default = 0 + optional uint32 value = 1; +} + +// Optional LOCAL_PREFERENCE attribute sent to the peer to indicate the degree of preference +// +// for externally learned routes.This should be included only for internal peers.It +// is +// used for the selection of the path for the traffic leaving the AS.The route with +// the +// highest local preference value is preferred. +message BgpAttributesLocalPreference { + + // Value to be set in the LOCAL_PREFERENCE attribute The multi exit discriminator (MED) + // value used for route selection sent to the peer. + // default = 100 + optional uint32 value = 1; +} + +// Optional ORIGINATOR_ID attribute (type code 9) carries the Router Id of the route's +// originator in the local AS. +message BgpAttributesOriginatorId { + + // The value of the originator's Router Id. + // default = 0.0.0.0 + optional string value = 1; +} + +// The TUNNEL_ENCAPSULATION attribute is used by a BGP speaker to inform other BGP +// speakers how to encapsulate packets that need to be sent to it. +// It is defined in RFC9012 and is assigned a Type code of 23. +message BgpAttributesTunnelEncapsulation { + + message Choice { enum Enum { unspecified = 0; - as_2octet = 1; - ipv4_address = 2; - as_4octet = 3; + sr_policy = 1; } } - // Extended Community Type field of 2 Byte. - // - as_2octet: Two-Octet AS Specific Extended Community (RFC 4360). - // - ipv4_address: IPv4 Address Specific Extended Community (RFC 4360). - // - as_4octet: 4-Octet AS Specific Extended Community (RFC 5668). - optional RtType.Enum rt_type = 1; + // Identifies a type of tunnel. The field contains values from the IANA registry BGP + // Tunnel Encapsulation Attribute Tunnel Types. + // default = Choice.Enum.sr_policy + optional Choice.Enum choice = 1; - // Colon separated Extended Community value of 6 Bytes - AS number: Assigned Number. - // Example - for the as_2octet or as_4octet 60005:100, for ipv4_address 1.1.1.1:100 - optional string rt_value = 2; + // Description missing in models + BgpAttributesSegmentRoutingPolicy sr_policy = 2; } -// Configuration for BGP advanced settings. -message BgpAdvanced { +// Optional Segment Routing Policy information as defined in draft-ietf-idr-sr-policy-safi-02. +// This information is carried in TUNNEL_ENCAPSULATION attribute with type set to SR +// Policy (15). +message BgpAttributesSegmentRoutingPolicy { - // Number of seconds the sender proposes for the value of the Hold Timer. - // default = 90 - optional uint32 hold_time_interval = 1; + // Description missing in models + BgpAttributesBsid binding_segment_identifier = 1; - // Number of seconds between transmissions of Keepalive messages by this peer. - // default = 30 - optional uint32 keep_alive_interval = 2; + // The SRv6 Binding SID sub-TLV is an optional sub-TLV of type 20 that is used to signal + // the SRv6 Binding SID + // related information of an SR Policy candidate path. + // - More than one SRv6 Binding SID sub-TLVs MAY be signaled in the same SR Policy + // encoding to indicate one + // or more SRv6 SIDs, each with potentially different SRv6 Endpoint Behaviors to + // be instantiated. + // - The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section + // 2.4.3 . + repeated BgpAttributesSrv6Bsid srv6_binding_segment_identifier = 2; - // The time interval at which Update messages are sent to the DUT, expressed as the - // number of milliseconds between Update messages. The update interval 0 implies to - // send all the updates as fast as possible. - // default = 0 - optional uint32 update_interval = 3; + // Description missing in models + BgpAttributesSrPolicyPreference preference = 3; - // The limited number of iterations that a unit of data can experience before the data - // is discarded. This is placed in the TTL field in the IP header of the transmitted - // packets. - // default = 64 - optional uint32 time_to_live = 4; + // Description missing in models + BgpAttributesSrPolicyPriority priority = 4; - // The value to be used as a secret MD5 key for authentication. If not configured, MD5 - // authentication will not be enabled. - optional string md5_key = 5; + // Description missing in models + BgpAttributesSrPolicyPolicyName policy_name = 5; - // If set to true, the local BGP peer will wait for the remote peer to initiate the - // BGP session - // by establishing the TCP connection, rather than initiating sessions from the local - // peer. - // default = False - optional bool passive_mode = 6; + // Description missing in models + BgpAttributesSrPolicyPolicyCandidateName policy_candidate_name = 6; - // The TCP port number on which to accept BGP connections from the remote peer. - // default = 179 - optional uint32 listen_port = 7; + // Description missing in models + BgpAttributesSrPolicyExplicitNullPolicy explicit_null_label_policy = 7; - // Destination TCP port number of the BGP peer when initiating a - // session from the local BGP peer. - // default = 179 - optional uint32 neighbor_port = 8; + // Description missing in models + repeated BgpAttributesSrPolicySegmentList segment_list = 8; } -// Configuration for BGP capability settings. -message BgpCapability { - - // Support for the IPv4 Unicast address family. - // default = True - optional bool ipv4_unicast = 1; - - // Support for the IPv4 Multicast address family. - // default = False - optional bool ipv4_multicast = 2; +// The Binding Segment Identifier is an optional sub-tlv of type 13 that can be sent +// with a SR Policy +// Tunnel Encapsulation attribute. +// When the active candidate path has a specified Binding Segment Identifier, the SR +// Policy uses that +// BSID if this value (label in MPLS, IPv6 address in SRv6) is available. +// - The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section +// 2.4.2 . +// - It is recommended that if SRv6 Binding SID is desired to be signalled, the SRv6 +// Binding SID sub-TLV that enables +// the specification of the SRv6 Endpoint Behavior should be used. +message BgpAttributesBsid { - // Support for the IPv4 Unicast address family. - // default = True - optional bool ipv6_unicast = 3; + message Choice { + enum Enum { + unspecified = 0; + mpls = 1; + srv6 = 2; + } + } + // The type of Segment Identifier. + // required = true + optional Choice.Enum choice = 1; - // Support for the IPv6 Multicast address family. - // default = False - optional bool ipv6_multicast = 4; + // Description missing in models + BgpAttributesBsidMpls mpls = 2; - // Support for VPLS as below. - // RFC4761 - Virtual Private LAN Service (VPLS) using BGP for Auto-Discovery - // and Signaling. - // RFC6624 - Layer 2 Virtual Private Networks using BGP for Auto-Discovery - // and Signaling. - // default = False - optional bool vpls = 5; + // Description missing in models + BgpAttributesBsidSrv6 srv6 = 3; +} - // Support for the route refresh capabilities. Route Refresh allows the dynamic exchange - // of route refresh requests and routing information between BGP peers and the subsequent - // re-advertisement of the outbound or inbound routing table. - // default = True - optional bool route_refresh = 6; +// When the active candidate path has a specified Binding Segment Identifier, the SR +// Policy uses that BSID defined +// as a MPLS label.The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 +// Section 2.4.2 . +message BgpAttributesBsidMpls { - // Supports for the route constraint capabilities. Route Constraint allows the advertisement - // of Route Target Membership information. The BGP peers exchange Route Target Reachability - // Information, which is used to build a route distribution graph. This limits the - // propagation of VPN Network Layer Reachability Information (NLRI) between different - // autonomous systems or distinct clusters of the same autonomous system. This is supported - // for Layer 3 Virtual Private Network scenario. + // S-Flag: This flag encodes the Specified-BSID-only behavior. It's usage is + // described in section 6.2.3 in [RFC9256]. // default = False - optional bool route_constraint = 7; + optional bool flag_specified_bsid_only = 1; - // Support for BGP Link State for ISIS and OSPF. + // I-Flag: This flag encodes the Drop Upon Invalid behavior. + // It's usage is described in section 8.2 in [RFC9256]. // default = False - optional bool link_state_non_vpn = 8; + optional bool flag_drop_upon_invalid = 2; - // Capability advertisement of BGP Link State for VPNs. - // default = False - optional bool link_state_vpn = 9; + // Description missing in models + BgpAttributesSidMpls mpls_sid = 3; +} - // Support for the EVPN address family. - // default = False - optional bool evpn = 10; +// When the active candidate path has a specified Binding Segment Identifier, the SR +// Policy uses that BSID defined +// as an IPv6 Address.The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 +// Section 2.4.2 . +message BgpAttributesBsidSrv6 { - // Support for extended Next Hop Encoding for Nexthop field in IPv4 routes advertisement. - // This allows IPv4 routes being advertised by IPv6 peers to include an IPv6 Nexthop. + // S-Flag: This flag encodes the Specified-BSID-only behavior. It's usage is + // described in section 6.2.3 in [RFC9256]. // default = False - optional bool extended_next_hop_encoding = 11; + optional bool flag_specified_bsid_only = 1; - // Support for the IPv4 Multicast VPN address family. + // I-Flag: This flag encodes the Drop Upon Invalid behavior. + // It's usage is described in section 8.2 in [RFC9256]. // default = False - optional bool ipv4_multicast_vpn = 12; + optional bool flag_drop_upon_invalid = 2; - // Support for the IPv4 MPLS L3VPN address family. + // IPv6 address denoting the SRv6 SID. + // default = 0::0 + optional string ipv6_addr = 3; +} + +// The SRv6 Binding SID sub-TLV is an optional sub-TLV of type 20 that is used to signal +// the SRv6 Binding SID +// related information of an SR Policy candidate path. +// - More than one SRv6 Binding SID sub-TLVs MAY be signaled in the same SR Policy +// encoding to indicate one or +// more SRv6 SIDs, each with potentially different SRv6 Endpoint Behaviors to be +// instantiated. +// - The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section +// 2.4.3 . +message BgpAttributesSrv6Bsid { + + // S-Flag: This flag encodes the Specified-BSID-only behavior. It's usage is + // described in section 6.2.3 in [RFC9256]. // default = False - optional bool ipv4_mpls_vpn = 13; + optional bool flag_specified_bsid_only = 1; - // Supports for IPv4 MDT address family messages. + // I-Flag: This flag encodes the Drop Upon Invalid behavior. + // It's usage is described in section 8.2 in [RFC9256]. // default = False - optional bool ipv4_mdt = 14; + optional bool flag_drop_upon_invalid = 2; - // Support for the IPv4 Multicast VPN address family. + // B-Flag: This flag, when set, indicates the presence of the SRv6 Endpoint Behavior + // + // and SID Structure encoding specified in Section 2.4.4.2.4 of draft-ietf-idr-sr-policy-safi-02. // default = False - optional bool ipv4_multicast_mpls_vpn = 15; + optional bool flag_srv6_endpoint_behavior = 3; - // Support for propagation of IPv4 unicast flow specification rules. - // default = False - optional bool ipv4_unicast_flow_spec = 16; + // IPv6 address denoting the SRv6 SID. + // default = 0::0 + optional string ipv6_addr = 4; - // Support for IPv4 SRTE policy. - // default = False - optional bool ipv4_sr_te_policy = 17; + // Description missing in models + BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure srv6_endpoint_behavior = 5; +} - // Support for IPv4 Unicast Add Path Capability. - // default = False - optional bool ipv4_unicast_add_path = 18; +// This carries a 20 bit Multi Protocol Label Switching alongwith 3 bits traffic class, +// 1 bit indicating presence +// or absence of Bottom-Of-Stack and 8 bits carrying the Time to Live value. +message BgpAttributesSidMpls { - // Support for the IPv6 Multicast VPN address family. - // default = False - optional bool ipv6_multicast_vpn = 19; + // 20 bit MPLS Label value. + // default = 16 + optional uint32 label = 1; - // Support for the IPv6 MPLS L3VPN address family. - // default = False - optional bool ipv6_mpls_vpn = 20; + // 3 bits of Traffic Class. + // default = 0 + optional uint32 traffic_class = 2; - // Support for IPv6 MDT address family messages. - // default = False - optional bool ipv6_mdt = 21; + // Bottom of Stack + // default = True + optional bool flag_bos = 3; - // Support for the IPv6 Multicast VPN address family. - // default = False - optional bool ipv6_multicast_mpls_vpn = 22; + // 8 bits Time to Live + // default = 63 + optional uint32 ttl = 4; +} - // Support for propagation of IPv6 unicast flow specification rules. - // default = False - optional bool ipv6_unicast_flow_spec = 23; +// An IPv6 address denoting a SRv6 SID. +message BgpAttributesSidSrv6 { - // Support for IPv6 SRTE policy. - // default = False - optional bool ipv6_sr_te_policy = 24; + // Description missing in models + // default = 0::0 + optional string ip = 1; +} - // Support for IPv6 Unicast Add Path Capability. - // default = False - optional bool ipv6_unicast_add_path = 25; +// Optional Preference sub-tlv (Type 12) is used to select the best candidate path for +// an SR Policy. +// It is defined in Section 2.4.1 of draft-ietf-idr-sr-policy-safi-02 . +// +message BgpAttributesSrPolicyPreference { + + // Value to be carried in the Preference sub-tlv. + // default = 0 + optional uint32 value = 1; } -// Configuration for controlling storage of BGP learned information recieved from the -// peer. -message BgpLearnedInformationFilter { +// Optional Priority sub-tlv (Type 15) used to select the order in which policies should +// be re-computed. +// - It is defined in Section 2.4.6 of draft-ietf-idr-sr-policy-safi-02 . +message BgpAttributesSrPolicyPriority { - // If enabled, will store the information related to Unicast IPv4 Prefixes recieved - // from the peer. - // default = False - optional bool unicast_ipv4_prefix = 1; + // Value to be carried in the Priority sub-tlv. + // default = 0 + optional uint32 value = 1; +} - // If enabled, will store the information related to Unicast IPv6 Prefixes recieved - // from the peer. - // default = False - optional bool unicast_ipv6_prefix = 2; +// Optional Policy Candidate Path Name sub-tlv (Type 129) which carries the symbolic +// name for the SR Policy candidate path +// for debugging. +// - It is defined in Section 2.4.7 of draft-ietf-idr-sr-policy-safi-02 . +message BgpAttributesSrPolicyPolicyCandidateName { + + // Value of the symbolic Policy Candidate Path Name carried in the Policy Candidate + // Path Name sub-tlv. + // It is recommended that the size of the name is limited to 255 bytes. + // required = true + optional string value = 1; } -// Emulated BGPv4 route range. -message BgpV4RouteRange { +// Optional Policy Name sub-tlv (Type 130) which carries the symbolic name for the SR +// Policy for which the +// candidate path is being advertised for debugging. +// - It is defined in Section 2.4.8 of draft-ietf-idr-sr-policy-safi-02 . +message BgpAttributesSrPolicyPolicyName { - // A list of group of IPv4 route addresses. - repeated V4RouteAddress addresses = 1; + // Value of the symbolic policy name carried in the Policy Name sub-tlv. + // It is recommended that the size of the name is limited to 255 bytes. + // required = true + optional string value = 1; +} - message NextHopMode { - enum Enum { - unspecified = 0; - local_ip = 1; - manual = 2; - } - } - // Specify the NextHop in MP REACH NLRI. The mode for setting the IP address of the - // NextHop in the MP REACH NLRI can be one of the following: - // Local IP: Automatically fills the Nexthop with the Local IP of the BGP - // peer. - // If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. - // Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. - // default = NextHopMode.Enum.local_ip - optional NextHopMode.Enum next_hop_mode = 2; +// This is an optional sub-tlv (Type 14) which indicates whether an Explicit NULL Label +// must be pushed on an unlabeled IP +// packet before other labels for IPv4 or IPv6 flows. +// - It is defined in Section 2.4.5 of draft-ietf-idr-sr-policy-safi-02. +message BgpAttributesSrPolicyExplicitNullPolicy { - message NextHopAddressType { + message Choice { enum Enum { unspecified = 0; - ipv4 = 1; - ipv6 = 2; + unknown = 1; + push_ipv4 = 2; + push_ipv6 = 3; + push_ipv4_and_ipv6 = 4; + donot_push = 5; } } - // If the Nexthop Mode is Manual, it sets the type of the NextHop IP address. - // default = NextHopAddressType.Enum.ipv4 - optional NextHopAddressType.Enum next_hop_address_type = 3; - - // The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type - // is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. - // default = 0.0.0.0 - optional string next_hop_ipv4_address = 4; - - // The IPv6 address of the next hop if the Nexthop Mode is manual and the Nexthop type - // is IPv6. - // default = ::0 - optional string next_hop_ipv6_address = 5; - - // Description missing in models - BgpRouteAdvanced advanced = 6; + // The Explicit NULL Label policy. + // default = Choice.Enum.push_ipv4_and_ipv6 + optional Choice.Enum choice = 1; +} - // Optional community settings. - repeated BgpCommunity communities = 7; +// One optional SEGMENT_LIST sub-tlv encoded with type of 128. +// One sub-tlv (Type 128) encodes a single explicit path towards the endpoint as described +// in +// section 5.1 of [RFC9256]. +// The Segment List sub-TLV includes the elements of the paths (i.e., segments) as well +// +// as an optional Weight sub-TLV. +message BgpAttributesSrPolicySegmentList { // Description missing in models - BgpAsPath as_path = 8; + BgpAttributesSegmentRoutingPolicySegmentListWeight weight = 1; // Description missing in models - BgpAddPath add_path = 9; - - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 10; - - // Deprecated: This property is deprecated in favor of property extended_communities - // - // Deprecated: This property is deprecated in favor of property extended_communities - // - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. Note evpn type is defined mainly for use with evpn - // route updates and not for IPv4 and IPv6 route updates. - repeated BgpExtCommunity ext_communities = 11; - - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an eight byte value. It - // is divided into two main parts. The first two bytes of the community encode a type - // and sub-type fields and the last six bytes carry a unique set of data in a format - // defined by the type and sub-type field. Extended communities provide a larger range - // for grouping or categorizing communities. - repeated BgpExtendedCommunity extended_communities = 12; + repeated BgpAttributesSegmentRoutingPolicySegmentListSegment segments = 2; } -// The BGP Additional Paths feature is a BGP extension that allows the advertisement -// of multiple paths for the same prefix without the new paths implicitly replacing -// any previous paths. -message BgpAddPath { +// The optional Weight sub-TLV (Type 9) specifies the weight associated with a given +// segment list. The weight is used for weighted multipath. +message BgpAttributesSegmentRoutingPolicySegmentListWeight { - // The id of the additional path. - // default = 1 - optional uint32 path_id = 1; + // Value of the weight. + // default = 0 + optional uint32 value = 1; } -// The Extended Communities Attribute is a optional BGP attribute,defined in RFC4360 -// with the Type Code 16. Community and Extended Communities attributes are utilized -// to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. -// An extended community is an 8-Bytes value.It is divided into two main parts. The -// first 2 Bytes of the community encode a type and optonal sub-type field. The last -// 6 bytes (or 7 bytes for types without a sub-type) carry a unique set of data in a -// format defined by the type and optional sub-type field. Extended communities provide -// a larger range for grouping or categorizing communities. -message BgpExtendedCommunity { +// A Segment sub-TLV describes a single segment in a segment list i.e., a single +// element of the explicit path. The Segment sub-TLVs are optional. +// Segment Types A and B are defined as described in 2.4.4.2. +// Segment Types C upto K are defined as described in in draft-ietf-idr-bgp-sr-segtypes-ext-03 +// . +message BgpAttributesSegmentRoutingPolicySegmentListSegment { message Choice { enum Enum { unspecified = 0; - transitive_2octet_as_type = 1; - transitive_ipv4_address_type = 2; - transitive_4octet_as_type = 3; - transitive_opaque_type = 4; - transitive_evpn_type = 5; - non_transitive_2octet_as_type = 6; - custom = 7; + type_a = 1; + type_b = 2; + type_c = 3; + type_d = 4; + type_e = 5; + type_f = 6; + type_g = 7; + type_h = 8; + type_i = 9; + type_j = 10; + type_k = 11; } } - // Description missing in models - // default = Choice.Enum.transitive_2octet_as_type + // Specify one of the segment types as defined in ietf-idr-segment-routing-te-policy + // - Type A: SID only, in the form of MPLS Label. + // - Type B: SID only, in the form of IPv6 Address. + // - Type C: IPv4 Prefix with optional SR Algorithm. + // - Type D: IPv6 Global Prefix with optional SR Algorithm for SR-MPLS. + // - Type E: IPv4 Prefix with Local Interface ID. + // - Type F: IPv4 Addresses for link endpoints as Local, Remote pair. + // - Type G: IPv6 Prefix and Interface ID for link endpoints as Local, Remote pair + // for SR-MPLS. + // - Type H: IPv6 Addresses for link endpoints as Local, Remote pair for SR-MPLS. + // - Type I: IPv6 Global Prefix with optional SR Algorithm for SRv6. + // - Type J: IPv6 Prefix and Interface ID for link endpoints as Local, Remote pair + // for SRv6. + // - Type K: IPv6 Addresses for link endpoints as Local, Remote pair for SRv6. + // required = true optional Choice.Enum choice = 1; // Description missing in models - BgpExtendedCommunityTransitive2OctetAsType transitive_2octet_as_type = 2; + BgpAttributesSegmentRoutingPolicyTypeA type_a = 2; // Description missing in models - BgpExtendedCommunityTransitiveIpv4AddressType transitive_ipv4_address_type = 3; + BgpAttributesSegmentRoutingPolicyTypeB type_b = 3; // Description missing in models - BgpExtendedCommunityTransitive4OctetAsType transitive_4octet_as_type = 4; + BgpAttributesSegmentRoutingPolicyTypeC type_c = 4; // Description missing in models - BgpExtendedCommunityTransitiveOpaqueType transitive_opaque_type = 5; + BgpAttributesSegmentRoutingPolicyTypeD type_d = 5; // Description missing in models - BgpExtendedCommunityTransitiveEvpnType transitive_evpn_type = 6; + BgpAttributesSegmentRoutingPolicyTypeE type_e = 6; + + // Description missing in models + BgpAttributesSegmentRoutingPolicyTypeF type_f = 7; + + // Description missing in models + BgpAttributesSegmentRoutingPolicyTypeG type_g = 8; + + // Description missing in models + BgpAttributesSegmentRoutingPolicyTypeH type_h = 9; + + // Description missing in models + BgpAttributesSegmentRoutingPolicyTypeI type_i = 10; + + // Description missing in models + BgpAttributesSegmentRoutingPolicyTypeJ type_j = 11; + + // Description missing in models + BgpAttributesSegmentRoutingPolicyTypeK type_k = 12; +} + +// Type A: SID only, in the form of MPLS Label. +// It is encoded as a Segment of Type 1 in the SEGMENT_LIST sub-tlv. +message BgpAttributesSegmentRoutingPolicyTypeA { // Description missing in models - BgpExtendedCommunityNonTransitive2OctetAsType non_transitive_2octet_as_type = 7; + BgpAttributesSegmentRoutingPolicyTypeFlags flags = 1; // Description missing in models - BgpExtendedCommunityCustomType custom = 8; + BgpAttributesSidMpls mpls_sid = 2; } -// The Route Target Community identifies one or more routers that may receive a set -// of routes (that carry this Community) carried by BGP. It is sent with sub-type as -// 0x02. -message BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget { +// Type B: SID only, in the form of IPv6 address. +// It is encoded as a Segment of Type 13 in the SEGMENT_LIST sub-tlv. +message BgpAttributesSegmentRoutingPolicyTypeB { - // The two octet IANA assigned AS value assigned to the Autonomous System. - // default = 100 - optional uint32 global_2byte_as = 1; + // Description missing in models + BgpAttributesSegmentRoutingPolicyTypeFlags flags = 1; - // The Local Administrator sub-field contains a number from a numbering space that is - // administered by the organization to which the Autonomous System number carried in - // the Global Administrator sub-field has been assigned by an appropriate authority. - // default = 1 - optional uint32 local_4byte_admin = 2; + // SRv6 SID. + // default = 0::0 + optional string srv6_sid = 2; + + // Description missing in models + BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure srv6_endpoint_behavior = 3; } -// The Route Origin Community identifies one or more routers that inject a set of routes -// (that carry this Community) into BGP. It is sent with sub-type as 0x03 . -message BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin { +// Type C: IPv4 Node Address with optional SID. +// It is encoded as a Segment of Type 3 in the SEGMENT_LIST sub-tlv. +message BgpAttributesSegmentRoutingPolicyTypeC { - // The two octet IANA assigned AS value assigned to the Autonomous System. - // default = 100 - optional uint32 global_2byte_as = 1; + // Description missing in models + BgpAttributesSegmentRoutingPolicyTypeFlags flags = 1; - // The Local Administrator sub-field contains a number from a numbering space that is - // administered by the organization to which the Autonomous System number carried in - // the Global Administrator sub-field has been assigned by an appropriate authority. - // default = 1 - optional uint32 local_4byte_admin = 2; + // SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be + // set to 0 on transmission and ignored on receipt. + // default = 0 + optional uint32 sr_algorithm = 2; + + // IPv4 address representing a node. + // default = 0.0.0.0 + optional string ipv4_node_address = 3; + + // Optional SR-MPLS SID. + BgpAttributesSidMpls sr_mpls_sid = 4; } -// The Transitive Two-Octet AS-Specific Extended Community is sent as type 0x00 . -// -message BgpExtendedCommunityTransitive2OctetAsType { +// Type D: IPv6 Node Address with optional SID for SR MPLS. +// It is encoded as a Segment of Type 4 in the SEGMENT_LIST sub-tlv. +message BgpAttributesSegmentRoutingPolicyTypeD { - message Choice { - enum Enum { - unspecified = 0; - route_target_subtype = 1; - route_origin_subtype = 2; - } - } // Description missing in models - // default = Choice.Enum.route_target_subtype - optional Choice.Enum choice = 1; + BgpAttributesSegmentRoutingPolicyTypeFlags flags = 1; - // Description missing in models - BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget route_target_subtype = 2; + // SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be + // set to 0 on transmission and ignored on receipt. + // default = 0 + optional uint32 sr_algorithm = 2; - // Description missing in models - BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin route_origin_subtype = 3; + // IPv6 address representing a node. + // default = 0::0 + optional string ipv6_node_address = 3; + + // Optional SR-MPLS SID. + BgpAttributesSidMpls sr_mpls_sid = 4; } -// The Route Origin Community identifies one or more routers that inject a set of routes -// (that carry this Community) into BGP It is sent with sub-type as 0x03. -message BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { +// Type E: IPv4 Address and Local Interface ID with optional SID +// It is encoded as a Segment of Type 5 in the SEGMENT_LIST sub-tlv. +message BgpAttributesSegmentRoutingPolicyTypeE { - // An IPv4 unicast address assigned by one of the Internet registries. + // Description missing in models + BgpAttributesSegmentRoutingPolicyTypeFlags flags = 1; + + // The Interface Index as defined in [RFC8664]. + // default = 0 + optional uint32 local_interface_id = 2; + + // IPv4 address representing a node. // default = 0.0.0.0 - optional string global_ipv4_admin = 1; + optional string ipv4_node_address = 3; - // The Local Administrator sub-field contains a number from a numbering space that is - // administered by the organization to which the IP address carried in the Global Administrator - // sub-field has been assigned by an appropriate authority. - // default = 1 - optional uint32 local_2byte_admin = 2; + // Optional SR-MPLS SID. + BgpAttributesSidMpls sr_mpls_sid = 4; } -// The Route Target Community identifies one or more routers that may receive a set -// of routes (that carry this Community) carried by BGP. It is sent with sub-type as -// 0x02. -message BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { +// Type F: IPv4 Local and Remote addresses with optional SR-MPLS SID. +// It is encoded as a Segment of Type 6 in the SEGMENT_LIST sub-tlv. +message BgpAttributesSegmentRoutingPolicyTypeF { - // An IPv4 unicast address assigned by one of the Internet registries. + // Description missing in models + BgpAttributesSegmentRoutingPolicyTypeFlags flags = 1; + + // Local IPv4 Address. // default = 0.0.0.0 - optional string global_ipv4_admin = 1; + optional string local_ipv4_address = 2; - // The Local Administrator sub-field contains a number from a numbering space that is - // administered by the organization to which the IP address carried in the Global Administrator - // sub-field has been assigned by an appropriate authority. - // default = 1 - optional uint32 local_2byte_admin = 2; + // Remote IPv4 Address. + // default = 0.0.0.0 + optional string remote_ipv4_address = 3; + + // Optional SR-MPLS SID. + BgpAttributesSidMpls sr_mpls_sid = 4; } -// The Transitive IPv4 Address Specific Extended Community is sent as type 0x01. -message BgpExtendedCommunityTransitiveIpv4AddressType { +// Type G: IPv6 Address, Interface ID for local and remote pair with optional SID for +// SR MPLS. +// It is encoded as a Segment of Type 7 in the SEGMENT_LIST sub-tlv. +message BgpAttributesSegmentRoutingPolicyTypeG { - message Choice { - enum Enum { - unspecified = 0; - route_target_subtype = 1; - route_origin_subtype = 2; - } - } // Description missing in models - // default = Choice.Enum.route_target_subtype - optional Choice.Enum choice = 1; + BgpAttributesSegmentRoutingPolicyTypeFlags flags = 1; - // Description missing in models - BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget route_target_subtype = 2; + // The local Interface Index as defined in [RFC8664]. + // default = 0 + optional uint32 local_interface_id = 2; - // Description missing in models - BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin route_origin_subtype = 3; -} + // The IPv6 address representing the local node. + // default = 0::0 + optional string local_ipv6_node_address = 3; -// The Route Target Community identifies one or more routers that may receive a set -// of routes (that carry this Community) carried by BGP. It is sent with sub-type as -// 0x02 -message BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget { + // The remote Interface Index as defined in [RFC8664]. The value MAY be set to zero + // when the local node address and interface identifiers are sufficient to describe + // the link. + // default = 0 + optional uint32 remote_interface_id = 4; - // The four octet IANA assigned AS value assigned to the Autonomous System. - // default = 100 - optional uint32 global_4byte_as = 1; + // IPv6 address representing the remote node. The value MAY be set to zero when the + // local node address and interface identifiers are sufficient to describe the link. + // default = 0::0 + optional string remote_ipv6_node_address = 5; - // The Local Administrator sub-field contains a number from a numbering space that is - // administered by the organization to which the Autonomous System number carried in - // the Global Administrator sub-field has been assigned by an appropriate authority. - // default = 1 - optional uint32 local_2byte_admin = 2; + // Optional SR-MPLS SID. + BgpAttributesSidMpls sr_mpls_sid = 6; } -// The Route Origin Community identifies one or more routers that inject a set of routes -// (that carry this Community) into BGP. It is sent with sub-type as 0x03. -message BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin { +// Type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. +// It is encoded as a Segment of Type 8 in the SEGMENT_LIST sub-tlv. +message BgpAttributesSegmentRoutingPolicyTypeH { - // The four octet IANA assigned AS value assigned to the Autonomous System. - // default = 100 - optional uint32 global_4byte_as = 1; + // Description missing in models + BgpAttributesSegmentRoutingPolicyTypeFlags flags = 1; - // The Local Administrator sub-field contains a number from a numbering space that is - // administered by the organization to which the Autonomous System number carried in - // the Global Administrator sub-field has been assigned by an appropriate authority. - // default = 1 - optional uint32 local_2byte_admin = 2; + // Local IPv6 Address. + // default = 0::0 + optional string local_ipv6_address = 2; + + // Remote IPv6 Address. + // default = 0::0 + optional string remote_ipv6_address = 3; + + // Optional SR-MPLS SID. + BgpAttributesSidMpls sr_mpls_sid = 6; } -// The Transitive Four-Octet AS-Specific Extended Community is sent as type 0x02. It -// is defined in RFC 5668. -message BgpExtendedCommunityTransitive4OctetAsType { +// Type I: IPv6 Node Address with optional SR Algorithm and optional SRv6 SID. +// It is encoded as a Segment of Type 14 in the SEGMENT_LIST sub-tlv. +message BgpAttributesSegmentRoutingPolicyTypeI { - message Choice { - enum Enum { - unspecified = 0; - route_target_subtype = 1; - route_origin_subtype = 2; - } - } // Description missing in models - // default = Choice.Enum.route_target_subtype - optional Choice.Enum choice = 1; + BgpAttributesSegmentRoutingPolicyTypeFlags flags = 1; + + // SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be + // set to 0 on transmission and ignored on receipt. + // default = 0 + optional uint32 sr_algorithm = 2; + + // IPv6 address representing a node. + // default = 0::0 + optional string ipv6_node_address = 3; // Description missing in models - BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget route_target_subtype = 2; + BgpAttributesSidSrv6 srv6_sid = 4; // Description missing in models - BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin route_origin_subtype = 3; + BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure srv6_endpoint_behavior = 5; } -// The Color Community contains locally administrator defined 'color' value which is -// used in conjunction with Encapsulation attribute to decide whether a data packet -// can be transmitted on a certain tunnel or not. It is defined in RFC9012 and sent -// with sub-type as 0x0b. -message BgpExtendedCommunityTransitiveOpaqueTypeColor { +// Type J: IPv6 Address, Interface ID for local and remote pair for SRv6 with optional +// SID. +// It is encoded as a Segment of Type 15 in the SEGMENT_LIST sub-tlv. +message BgpAttributesSegmentRoutingPolicyTypeJ { - // Two octet flag values. + // Description missing in models + BgpAttributesSegmentRoutingPolicyTypeFlags flags = 1; + + // SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be + // set to 0 on transmission and ignored on receipt. // default = 0 - optional uint32 flags = 1; + optional uint32 sr_algorithm = 2; - // The color value is user defined and configured locally and used to determine whether - // a data packet can be transmitted on a certain tunnel or not in conjunction with the - // Encapsulation attribute. It is defined in RFC9012. + // The local Interface Index as defined in [RFC8664]. // default = 0 - optional uint32 color = 2; -} + optional uint32 local_interface_id = 3; -// This identifies the type of tunneling technology being signalled. It is defined in -// RFC9012 and sent with sub-type as 0x0c. -message BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation { + // The IPv6 address representing the local node. + // default = 0::0 + optional string local_ipv6_node_address = 4; - // Four bytes of reserved values. Normally set to 0 on transmit and ignored on receive. - // + // The remote Interface Index as defined in [RFC8664]. The value MAY be set to zero + // when the local node address and interface identifiers are sufficient to describe + // the link. // default = 0 - optional uint32 reserved = 1; + optional uint32 remote_interface_id = 5; - // Identifies the type of tunneling technology being signalled. Initially defined in - // RFC5512 and extended in RFC9012. Some of the important tunnel types include 1 L2TPv3 - // over IP [RFC9012], - // 2 GRE [RFC9012] - // 7 IP in IP [RFC9012] - // 8 VXLAN Encapsulation [RFC8365] - // 9 NVGRE Encapsulation [RFC8365] - // 10 MPLS Encapsulation [RFC8365] - // 15 SR TE Policy Type [draft-ietf-idr-segment-routing-te-policy] - // 19 Geneve Encapsulation [RFC8926] - // default = 1 - optional uint32 tunnel_type = 2; + // IPv6 address representing the remote node. The value MAY be set to zero when the + // local node address and interface identifiers are sufficient to describe the link. + // default = 0::0 + optional string remote_ipv6_node_address = 6; + + // Description missing in models + BgpAttributesSidSrv6 srv6_sid = 7; + + // Description missing in models + BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure srv6_endpoint_behavior = 8; } -// The Transitive Opaque Extended Community is sent as type 0x03. -message BgpExtendedCommunityTransitiveOpaqueType { +// Type K: IPv6 Local and Remote addresses for SRv6 with optional SID. +// It is encoded as a Segment of Type 16 in the SEGMENT_LIST sub-tlv. +message BgpAttributesSegmentRoutingPolicyTypeK { - message Choice { - enum Enum { - unspecified = 0; - color_subtype = 1; - encapsulation_subtype = 2; - } - } // Description missing in models - // default = Choice.Enum.color_subtype - optional Choice.Enum choice = 1; + BgpAttributesSegmentRoutingPolicyTypeFlags flags = 1; + + // SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be + // set to 0 on transmission and ignored on receipt. + // default = 0 + optional uint32 sr_algorithm = 2; + + // Local IPv6 Address. + // default = 0::0 + optional string local_ipv6_address = 3; + + // Remote IPv6 Address. + // default = 0::0 + optional string remote_ipv6_address = 4; // Description missing in models - BgpExtendedCommunityTransitiveOpaqueTypeColor color_subtype = 2; + BgpAttributesSidSrv6 srv6_sid = 5; // Description missing in models - BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation encapsulation_subtype = 3; + BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure srv6_endpoint_behavior = 6; } -// The Router MAC EVPN Community is defined in RFC9135 and normally sent only for EVPN -// Type-2 Routes . It is sent with sub-type 0x03. -message BgpExtendedCommunityTransitiveEvpnTypeRouterMac { +// Flags for each Segment in SEGMENT_LIST sub-tlv. +// - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 +// - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, +// D , I , J and K . +// - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding +// applicable to Segment Types B , I , J and K . +// - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID +// depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). +// This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. +message BgpAttributesSegmentRoutingPolicyTypeFlags { - // MAC Address of the PE Router. - // default = 0:0:0:0:0:0 - optional string router_mac = 1; -} + // Indicates verification of segment data in is enabled. + // default = False + optional bool v_flag = 1; -// The Transitive EVPN Extended Community is sent as type 0x06 . -message BgpExtendedCommunityTransitiveEvpnType { + // Indicates presence of SR Algorithm field applicable to Segment Types 3, 4, and 9. + // + // default = False + optional bool a_flag = 2; - message Choice { - enum Enum { - unspecified = 0; - router_mac_subtype = 1; - } - } - // Description missing in models - // default = Choice.Enum.router_mac_subtype - optional Choice.Enum choice = 1; + // This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending + // on the segment type. + // default = False + optional bool s_flag = 3; - // Description missing in models - BgpExtendedCommunityTransitiveEvpnTypeRouterMac router_mac_subtype = 2; + // Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding specified + // in Section 2.4.4.2.4 + // of draft-ietf-idr-sr-policy-safi-02. + // default = False + optional bool b_flag = 4; } -// The Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. -// It is sent with sub-type as 0x04. -message BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { +// Configuration for optional SRv6 Endpoint Behavior and SID Structure. Summation of +// lengths for Locator Block, Locator Node, Function, and Argument MUST be less than +// or equal to 128. - This is specified in draft-ietf-idr-sr-policy-safi-02 Section +// 2.4.4.2.4 +message BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure { - // The value of the Global Administrator subfield should represent the Autonomous System - // of the router that attaches the Link Bandwidth Community. If four octet AS numbering - // scheme is used, AS_TRANS (23456) should be used. - // default = 100 - optional uint32 global_2byte_as = 1; + // This is a 2-octet field that is used to specify the SRv6 Endpoint Behavior code point + // for the SRv6 SID as defined + // in section 9.2 of [RFC8986]. When set with the value 0xFFFF (i.e., Opaque), the choice + // of SRv6 Endpoint Behavior is + // left to the headend. Well known 16-bit values for this field are available at + // https://www.iana.org/assignments/segment-routing/segment-routing.xhtml . + // default = ffff + optional string endpoint_behaviour = 1; - // Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and - // 1 Mbps is 1000 Kbps per second ) + // SRv6 SID Locator Block length in bits. // default = 0 - optional float bandwidth = 2; -} + optional uint32 lb_length = 2; -// The Non-Transitive Two-Octet AS-Specific Extended Community is sent as type 0x40. -// -message BgpExtendedCommunityNonTransitive2OctetAsType { + // SRv6 SID Locator Node length in bits. + // default = 0 + optional uint32 ln_length = 3; - message Choice { - enum Enum { - unspecified = 0; - link_bandwidth_subtype = 1; - } - } - // Description missing in models - // default = Choice.Enum.link_bandwidth_subtype - optional Choice.Enum choice = 1; + // SRv6 SID Function length in bits. + // default = 0 + optional uint32 func_length = 4; - // Description missing in models - BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth link_bandwidth_subtype = 2; + // SRv6 SID Arguments length in bits. + // default = 0 + optional uint32 arg_length = 5; } -// Add a custom Extended Community with a combination of types , sub-types and values -// not explicitly specified above or not defined yet. -message BgpExtendedCommunityCustomType { +// Optional field in the NLRI carrying the distinguisher for Segment Routing Policy +// NLRI with SAFI 73. +message BgpNLRIPrefixSegmentRoutingDistinguisher { - // The type to be set in the Extended Community attribute. Accepts hexadecimal input - // upto ff . - // default = 00 - optional string community_type = 1; + // The value of the optional Segment Routing distinguisher of the prefix. + // default = 1 + optional uint32 value = 1; +} - // The sub-type to be set in the Extended Community attribute. For certain types with - // no sub-type this byte can also be used as part of an extended value field. Accepts - // hexadecimal input upto ff. - // default = 00 - optional string community_subtype = 2; +// Configuration for BGPv6 peer settings and routes. +message BgpV6Peer { - // 6 byte hex value to be carried in the last 6 bytes of the Extended Community. Accepts - // hexadecimal input upto ffffffffffff. - // default = 000000000000 - optional string value = 3; -} + // IPv6 address of the BGP peer for the session + // required = true + optional string peer_address = 1; -// Emulated BGPv6 route range. -message BgpV6RouteRange { + // Description missing in models + BgpV6SegmentRouting segment_routing = 2; - // A list of group of IPv6 route addresses. - repeated V6RouteAddress addresses = 1; + // This contains the list of Ethernet Virtual Private Network (EVPN) Ethernet Segments + // (ES) Per BGP Peer for IPv6 Address Family Identifier (AFI). + // + // Each Ethernet Segment contains a list of EVPN Instances (EVIs) . + // Each EVI contains a list of Broadcast Domains. + // Each Broadcast Domain contains a list of MAC/IP Ranges. + // + // is responsible for advertising Ethernet + // Auto-discovery Route Per EVI (Type 1). + // + // is responsible for advertising Ethernet Auto-discovery Route + // Per Ethernet Segment (Type 1). + // + // is responsible for advertising + // MAC/IP Advertisement Route (Type 2). + // + // is responsible for advertising Inclusive + // Multicast Ethernet Tag Route (Type 3). + // + // Ethernet Segment is responsible for advertising Ethernet Segment Route (Type 4). + repeated BgpV6EthernetSegment evpn_ethernet_segments = 3; - message NextHopMode { + message AsType { enum Enum { unspecified = 0; - local_ip = 1; - manual = 2; + ibgp = 1; + ebgp = 2; } } - // Specify the NextHop in MP REACH NLRI. The mode for setting the IP address of the - // NextHop in the MP REACH NLRI can be one of the following: - // Local IP: Automatically fills the Nexthop with the Local IP of the BGP - // peer. - // If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. - // Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. - // default = NextHopMode.Enum.local_ip - optional NextHopMode.Enum next_hop_mode = 2; + // The type of BGP autonomous system. External BGP is used for BGP links between two + // or more autonomous systems (ebgp). Internal BGP is used within a single autonomous + // system (ibgp). BGP property defaults are aligned with this object defined as an internal + // BGP peer. If the as_type is specified as 'ebgp' then other properties will need to + // be specified as per an external BGP peer. Specifically, for 'ebgp', 'as_set_mode' + // attribute in 'as_path' field in any Route Range should be changed from default value + // 'do_not_include_local_as' to any other value. + // required = true + optional AsType.Enum as_type = 4; - message NextHopAddressType { + // Autonomous System Number (AS number or ASN) + // required = true + optional uint32 as_number = 5; + + message AsNumberWidth { enum Enum { unspecified = 0; - ipv4 = 1; - ipv6 = 2; + two = 1; + four = 2; } } - // If the Nexthop Mode is Manual, it sets the type of the NextHop IP address. - // default = NextHopAddressType.Enum.ipv6 - optional NextHopAddressType.Enum next_hop_address_type = 3; + // The width in bytes of the as_number values. Any as_number values that exceeds the + // width MUST result in an error. + // default = AsNumberWidth.Enum.four + optional AsNumberWidth.Enum as_number_width = 6; - // The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type - // is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. - // default = 0.0.0.0 - optional string next_hop_ipv4_address = 4; + // Description missing in models + BgpAdvanced advanced = 7; - // The IPv6 address of the next hop if the Nexthop Mode is manual and the Nexthop type - // is IPv6. - // default = ::0 - optional string next_hop_ipv6_address = 5; + // Description missing in models + BgpCapability capability = 8; // Description missing in models - BgpRouteAdvanced advanced = 6; + BgpLearnedInformationFilter learned_information_filter = 9; - // Optional community settings. - repeated BgpCommunity communities = 7; + // Emulated BGPv4 route ranges. + repeated BgpV4RouteRange v4_routes = 10; - // Description missing in models - BgpAsPath as_path = 8; + // Emulated BGPv6 route ranges. + repeated BgpV6RouteRange v6_routes = 11; - // Description missing in models - BgpAddPath add_path = 9; + // Segment Routing Traffic Engineering (SR TE) Policies for IPv4 Address Family Identifier + // (AFI). + repeated BgpSrteV4Policy v4_srte_policies = 12; + + // Segment Routing Traffic Engineering (SR TE) Policies for IPv6 Address Family Identifier + // (AFI). + repeated BgpSrteV6Policy v6_srte_policies = 13; + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. // Globally unique name of an object. It also serves as the primary key for arrays of // objects. // required = true - optional string name = 10; + optional string name = 14; - // Deprecated: This property is deprecated in favor of property extended_communities + // Description missing in models + BgpGracefulRestart graceful_restart = 15; + + // BGP Updates to be sent to the peer as specified after the session is established. // - // Deprecated: This property is deprecated in favor of property extended_communities + BgpUpdateReplay replay_updates = 16; +} + +// Configuration for emulated BGPv6 peers and routes on a single IPv6 interface. +message BgpV6Interface { + + // The unique name of IPv6 Loopback IPv6 interface or DHCPv4 client used as the source + // IP for this list of BGP peers. // - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. Note evpn type is defined mainly for use with evpn - // route updates and not for IPv4 and IPv6 route updates. - repeated BgpExtCommunity ext_communities = 11; + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Device.Ipv6Loopback/properties/name + // - /components/schemas/Device.Dhcpv6client/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Device.Ipv6Loopback/properties/name + // - /components/schemas/Device.Dhcpv6client/properties/name + // + // required = true + optional string ipv6_name = 1; + + // This contains the list of BGPv6 peers configured on this interface. + repeated BgpV6Peer peers = 2; +} + +// Configuration for BGPv6 segment routing settings. +message BgpV6SegmentRouting { + + // TBD + // default = False + optional bool ingress_supports_vpn = 1; + + // TBD + // default = False + optional bool reduced_encapsulation = 2; + + // TBD + // default = False + optional bool copy_time_to_live = 3; - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an eight byte value. It - // is divided into two main parts. The first two bytes of the community encode a type - // and sub-type fields and the last six bytes carry a unique set of data in a format - // defined by the type and sub-type field. Extended communities provide a larger range - // for grouping or categorizing communities. - repeated BgpExtendedCommunity extended_communities = 12; + // TBD + // default = 0 + optional uint32 time_to_live = 4; + + // TBD + // default = 0 + optional uint32 max_sids_per_srh = 5; + + // TBD + // default = False + optional bool auto_generate_segment_left_value = 6; + + // TBD + // default = 0 + optional uint32 segment_left_value = 7; + + // TBD + // default = False + optional bool advertise_sr_te_policy = 8; } -// Configuration for BGP Segment Routing Traffic Engineering(SRTE) -// policy. +// Configuration for BGP Ethernet Segment ranges. Advertises following routes - // -message BgpSrteV4Policy { - - // 4-octet value uniquely identifying the policy in the context of (color, endpoint) - // tuple. It is used by the SR Policy originator to make unique (from an NLRI perspective) - // both for multiple candidate paths of the same SR Policy as well as candidate paths - // of different SR Policies (i.e. with different segment list) with the same Color - // and Endpoint but meant for different head-ends. - // default = 1 - optional uint32 distinguisher = 1; +// Type 4 - Ethernet Segment Route +message BgpV6EthernetSegment { - // Policy color is used to match the color of the destination prefixes to steer traffic - // into the SR Policy. - // default = 100 - optional uint32 color = 2; + // Designated Forwarder (DF) election configuration. + BgpEthernetSegmentDfElection df_election = 1; - // Specifies a single node or a set of nodes (e.g. an anycast address). It is selected - // on the basis of the SR Policy type (AFI). - // required = true - optional string ipv4_endpoint = 3; + // This contains the list of EVIs. + repeated BgpV6EvpnEvis evis = 2; - message NextHopMode { - enum Enum { - unspecified = 0; - local_ip = 1; - manual = 2; - } - } - // Mode for choosing the NextHop in MP REACH NLRI. Available modes are : Local IP: Automatically - // fills the Nexthop with the Local IP of the BGP peer. For IPv6 BGP peer the Nexthop - // Encoding capability should be enabled. Manual: Override the Nexthop with any arbitrary - // IPv4/IPv6 address. - // default = NextHopMode.Enum.local_ip - optional NextHopMode.Enum next_hop_mode = 4; + // 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero + // ESI is '10000000000000000000' . + // default = 00000000000000000000 + optional string esi = 3; - message NextHopAddressType { + message ActiveMode { enum Enum { unspecified = 0; - ipv4 = 1; - ipv6 = 2; + single_active = 1; + all_active = 2; } } - // Type of next hop IP address to be used when 'next_hop_mode' is set to 'manual'. - // default = NextHopAddressType.Enum.ipv4 - optional NextHopAddressType.Enum next_hop_address_type = 5; - - // The IPv4 address of the next hop if the Nexthop type 'next_hop_mode' is 'manual' - // and the Nexthop type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, - // Nexthop Encoding capability extended_next_hop_encoding should be enabled. - optional string next_hop_ipv4_address = 6; - - // The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type' is 'manual' - // and the Nexthop type 'next_hop_address_type' is IPv6. - optional string next_hop_ipv6_address = 7; - - // Description missing in models - BgpRouteAdvanced advanced = 8; + // Single Active or All Active mode Redundancy mode selection for Multi-home. + // default = ActiveMode.Enum.all_active + optional ActiveMode.Enum active_mode = 4; - // Description missing in models - BgpAddPath add_path = 9; + // The label value to be advertised as ESI Label in ESI Label Extended Community. This + // is included in Ethernet Auto-discovery per ES Routes advertised by a router. + // default = 0 + optional uint32 esi_label = 5; // Description missing in models - BgpAsPath as_path = 10; + BgpRouteAdvanced advanced = 6; - // Optional Community settings. - repeated BgpCommunity communities = 11; + // Optional community settings. + repeated BgpCommunity communities = 7; // Optional Extended Community settings. The Extended Communities Attribute is a transitive // optional BGP attribute, with the Type Code 16. Community and Extended Communities @@ -3239,5251 +6325,5896 @@ message BgpSrteV4Policy { // byte is reserved and the last four bytes contain the sequence number which is used // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates // occur for the same MAC address. - repeated BgpExtCommunity ext_communities = 12; - - // List Tunnel Encapsulation Attributes. - repeated BgpSrteV4TunnelTlv tunnel_tlvs = 13; - - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 14; - - // If enabled means that this part of the configuration including any active 'children' - // nodes will be advertised to peer. If disabled, this means that though config is - // present, it is not taking any part of the test but can be activated at run-time to - // advertise just this part of the configuration to the peer. - // default = True - optional bool active = 15; -} - -// Configuration for BGP SRTE Tunnel TLV. -message BgpSrteV4TunnelTlv { - - // Description missing in models - BgpSrteRemoteEndpointSubTlv remote_endpoint_sub_tlv = 1; - - // Description missing in models - BgpSrteColorSubTlv color_sub_tlv = 2; - - // Description missing in models - BgpSrteBindingSubTlv binding_sub_tlv = 3; - - // Description missing in models - BgpSrtePreferenceSubTlv preference_sub_tlv = 4; - - // Description missing in models - BgpSrtePolicyPrioritySubTlv policy_priority_sub_tlv = 5; - - // Description missing in models - BgpSrtePolicyNameSubTlv policy_name_sub_tlv = 6; - - // Description missing in models - BgpSrteExplicitNullLabelPolicySubTlv explicit_null_label_policy_sub_tlv = 7; - - // Description missing in models - repeated BgpSrteSegmentList segment_lists = 8; - - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 9; - - // If enabled means that this part of the configuration including any active 'children' - // nodes will be advertised to peer. If disabled, this means that though config is - // present, it is not taking any part of the test but can be activated at run-time to - // advertise just this part of the configuration to the peer. - // default = True - optional bool active = 10; -} - -// Configuration for the BGP remote endpoint sub TLV. -message BgpSrteRemoteEndpointSubTlv { - - // Autonomous system (AS) number - // default = 0 - optional uint32 as_number = 1; - - message AddressFamily { - enum Enum { - unspecified = 0; - ipv4 = 1; - ipv6 = 2; - } - } - // Determines the address type - // default = AddressFamily.Enum.ipv4 - optional AddressFamily.Enum address_family = 2; - - // The IPv4 address of the Remote Endpoint. - // default = 0.0.0.0 - optional string ipv4_address = 3; - - // The IPv6 address of the Remote Endpoint. - // default = ::0 - optional string ipv6_address = 4; -} - -// Configuration for the Policy Color attribute sub-TLV. The Color sub-TLV MAY be used -// as a way to color the corresponding Tunnel TLV. The Value field of the sub-TLV is -// eight octets long and consists of a Color Extended Community. First two octets of -// its Value field are 0x030b as type and subtype of extended community. Remaining -// six octets are are exposed to configure. -message BgpSrteColorSubTlv { + repeated BgpExtCommunity ext_communities = 8; - // Six octet values. Example: 000000000064 for color value 100. - optional string color = 1; + // Optional AS PATH settings. + BgpAsPath as_path = 9; } -// Configuration for the binding SID sub-TLV. This is used to signal the binding SID -// related information of the SR Policy candidate path. -message BgpSrteBindingSubTlv { +// This contains a list of different flavors of EVPN. +// For example EVPN over VXLAN or EVPN over MPLS etc to be configured per Ethernet segment. +// +// Need to instantiate correct type of EVPN instance as per requirement. +message BgpV6EvpnEvis { - message BindingSidType { + message Choice { enum Enum { unspecified = 0; - no_binding = 1; - four_octet_sid = 2; - ipv6_sid = 3; + evi_vxlan = 1; } } - // Type of the binding SID. Supported types are No Binding SID or Four Octets Sid or - // IPv6 SID. - // default = BindingSidType.Enum.no_binding - optional BindingSidType.Enum binding_sid_type = 1; - - // Binding SID is encoded in 4 octets. - optional uint32 four_octet_sid = 2; - - // IPv6 SID value. - optional string ipv6_sid = 3; - - // S-Flag encodes the Specified-BSID-only behavior. - // default = False - optional bool s_flag = 4; - - // I-Flag encodes the Drop Upon Invalid behavior. - // default = False - optional bool i_flag = 5; -} - -// Configuration for BGP preference sub TLV of the SR Policy candidate path. -message BgpSrtePreferenceSubTlv { - - // The preference value of the SR Policy candidate path. - // default = 0 - optional uint32 preference = 1; -} - -// Configuration for the Policy Priority sub-TLV. The Policy Priority to indicate the -// order in which the SR policies are re-computed upon topological change. -message BgpSrtePolicyPrioritySubTlv { - - // One-octet Priority value. - optional uint32 policy_priority = 1; -} - -// Configuration for the Policy Name sub-TLV. The Policy Name sub-TLV is used to attach -// a symbolic name to the SR Policy candidate path. -message BgpSrtePolicyNameSubTlv { + // Description missing in models + // default = Choice.Enum.evi_vxlan + optional Choice.Enum choice = 1; - // Symbolic name for the policy that should be a string of printable ASCII characters, - // without a NULL terminator. - optional string policy_name = 1; + // EVPN VXLAN instance to be configured per Ethernet Segment. + BgpV6EviVxlan evi_vxlan = 2; } -// Configuration for BGP explicit null label policy sub TLV settings. -message BgpSrteExplicitNullLabelPolicySubTlv { +// Configuration for BGP EVPN EVI. Advertises following routes - +// +// Type 3 - Inclusive Multicast Ethernet Tag Route +// +// Type 1 - Ethernet Auto-discovery Route (Per EVI) +// +// Type 1 - Ethernet Auto-discovery Route (Per ES) +message BgpV6EviVxlan { - message ExplicitNullLabelPolicy { + // This contains the list of Broadcast Domains to be configured per EVI. + repeated BgpV6EviVxlanBroadcastDomain broadcast_domains = 1; + + message ReplicationType { enum Enum { unspecified = 0; - reserved_enlp = 1; - push_ipv4_enlp = 2; - push_ipv6_enlp = 3; - push_ipv4_ipv6_enlp = 4; - do_not_push_enlp = 5; + ingress_replication = 1; } } - // The value of the explicit null label policy - // default = ExplicitNullLabelPolicy.Enum.do_not_push_enlp - optional ExplicitNullLabelPolicy.Enum explicit_null_label_policy = 1; -} + // This model only supports Ingress Replication + // default = ReplicationType.Enum.ingress_replication + optional ReplicationType.Enum replication_type = 2; -// Optional configuration for BGP SR TE Policy segment list. The Segment List sub-TLV -// encodes a single explicit path towards the Endpoint. -message BgpSrteSegmentList { + // Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel + // attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. + // default = 16 + optional uint32 pmsi_label = 3; - // The Weight associated with a given path and the sub-TLV is optional. + // The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet + // Auto-discovery Route per // default = 0 - optional uint32 weight = 1; + optional uint32 ad_label = 4; - // Description missing in models - repeated BgpSrteSegment segments = 2; + // Colon separated Extended Community value of 6 Bytes - AS number: Value identifying + // an EVI. Example - for the as_2octet 60005:100. + BgpRouteDistinguisher route_distinguisher = 5; - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 3; + // List of Layer 2 Virtual Network Identifier (L2VNI) export targets associated with + // this EVI. + repeated BgpRouteTarget route_target_export = 6; - // If enabled means that this part of the configuration including any active 'children' - // nodes will be advertised to peer. If disabled, this means that though config is - // present, it is not taking any part of the test but can be activated at run-time to - // advertise just this part of the configuration to the peer. - // default = True - optional bool active = 4; -} + // List of L2VNI import targets associated with this EVI. + repeated BgpRouteTarget route_target_import = 7; -// A Segment sub-TLV describes a single segment in a segment list i.e., a single element -// of the explicit path. The Segment sub-TLVs are optional. -message BgpSrteSegment { + // List of Layer 3 Virtual Network Identifier (L3VNI) Export Route Targets. + repeated BgpRouteTarget l3_route_target_export = 8; - message SegmentType { - enum Enum { - unspecified = 0; - type_a = 1; - type_b = 2; - type_c = 3; - type_d = 4; - type_e = 5; - type_f = 6; - type_g = 7; - type_h = 8; - type_i = 9; - type_j = 10; - type_k = 11; - } - } - // Specify one of the segment type. - // https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13 - // Type A: SID only, in the form of MPLS Label. - // Type B: SID only, in the form of IPv6 Address. - // Type C: IPv4 Node Address with optional SID. - // Type D: IPv6 Node Address with optional SID for SR MPLS. - // Type E: IPv4 Address and index with optional SID. - // Type F: IPv4 Local and Remote addresses with optional SID. - // Type G: IPv6 Address and index for local and remote pair with optional - // SID for SR MPLS. - // Type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. - // Type I: IPv6 Node Address with optional SID for SRv6. - // Type J: IPv6 Address and index for local and remote pair with optional - // SID for SRv6. - // Type K: IPv6 Local and Remote addresses for SRv6. - // required = true - optional SegmentType.Enum segment_type = 1; + // List of L3VNI Import Route Targets. + repeated BgpRouteTarget l3_route_target_import = 9; // Description missing in models - BgpSrteSegmentATypeSubTlv type_a = 2; + BgpRouteAdvanced advanced = 10; - // Description missing in models - BgpSrteSegmentBTypeSubTlv type_b = 3; + // Optional community settings. + repeated BgpCommunity communities = 11; - // Description missing in models - BgpSrteSegmentCTypeSubTlv type_c = 4; + // Optional Extended Community settings. The Extended Communities Attribute is a transitive + // optional BGP attribute, with the Type Code 16. Community and Extended Communities + // attributes are utilized to trigger routing decisions, such as acceptance, rejection, + // preference, or redistribution. An extended community is an 8-Bytes value. It is + // divided into two main parts. The first 2 Bytes of the community encode a type and + // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined + // by the type and sub-type field. Extended communities provide a larger range for + // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, + // the valid sub types are route target and origin. The valid value for administrator_as_2octet + // and administrator_as_4octet type is either two byte AS followed by four byte local + // administrator id or four byte AS followed by two byte local administrator id. When + // type is administrator_ipv4_address the valid sub types are route target and origin. + // The valid value for administrator_ipv4_address is a four byte IPv4 address followed + // by a two byte local administrator id. When type is opaque, valid sub types are color + // and encapsulation. When sub type is color, first two bytes of the value field contain + // flags and last four bytes contains the value of the color. When sub type is encapsulation + // the first four bytes of value field are reserved and last two bytes carries the tunnel + // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol + // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth + // the valid sub type is extended_bandwidth. The first two bytes of the value field + // contains the AS number and the last four bytes contains the bandwidth in IEEE floating + // point format. When type is evpn the valid subtype is mac_address. In the value field + // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and + // may be set to 1, indicating the MAC address is static and cannot move. The second + // byte is reserved and the last four bytes contain the sequence number which is used + // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates + // occur for the same MAC address. + repeated BgpExtCommunity ext_communities = 12; - // Description missing in models - BgpSrteSegmentDTypeSubTlv type_d = 5; + // Optional AS PATH settings. + BgpAsPath as_path = 13; +} - // Description missing in models - BgpSrteSegmentETypeSubTlv type_e = 6; +// Configuration for Broadcast Domains per EVI. +message BgpV6EviVxlanBroadcastDomain { - // Description missing in models - BgpSrteSegmentFTypeSubTlv type_f = 7; + // This contains the list of Customer MAC/IP Ranges to be configured per Broadcast Domain. + // + // + // Advertises following route - + // Type 2 - MAC/IP Advertisement Route. + repeated BgpCMacIpRange cmac_ip_range = 1; - // Description missing in models - BgpSrteSegmentGTypeSubTlv type_g = 8; + // The Ethernet Tag ID of the Broadcast Domain. + // default = 0 + optional uint32 ethernet_tag_id = 2; - // Description missing in models - BgpSrteSegmentHTypeSubTlv type_h = 9; + // VLAN-Aware service to be enabled or disabled. + // default = False + optional bool vlan_aware_service = 3; +} - // Description missing in models - BgpSrteSegmentITypeSubTlv type_i = 10; +// Description missing in models +message DeviceVxlan { - // Description missing in models - BgpSrteSegmentJTypeSubTlv type_j = 11; + // IPv4 VXLAN Tunnels + repeated VxlanV4Tunnel v4_tunnels = 1; + + // IPv6 VXLAN Tunnels + repeated VxlanV6Tunnel v6_tunnels = 2; +} + +// Configuration and operational state parameters relating to IPv4 VXLAN tunnel end-point +// interface. +message VxlanV4Tunnel { + + // Determines the source interface. + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv4Loopback/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv4Loopback/properties/name + // + // required = true + optional string source_interface = 1; // Description missing in models - BgpSrteSegmentKTypeSubTlv type_k = 12; + VxlanV4TunnelDestinationIPMode destination_ip_mode = 2; + + // VXLAN Network Identifier (VNI) to distinguish network instances on the wire + // required = true + optional uint32 vni = 3; + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. // Globally unique name of an object. It also serves as the primary key for arrays of // objects. // required = true - optional string name = 13; - - // If enabled means that this part of the configuration including any active 'children' - // nodes will be advertised to peer. If disabled, this means that though config is - // present, it is not taking any part of the test but can be activated at run-time to - // advertise just this part of the configuration to the peer. - // default = True - optional bool active = 14; + optional string name = 4; } -// Configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. -message BgpSrteSrMplsSid { +// Configuration and operational state parameters relating to IPv6 VXLAN tunnel end-point +// interface. +message VxlanV6Tunnel { - // Label value in [0, 2^20 -1]. - optional uint32 label = 1; + // Determines the source interface. + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Device.Ipv6Loopback/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Device.Ipv6Loopback/properties/name + // + // required = true + optional string source_interface = 1; - // Traffic class in bits. - optional uint32 tc = 2; + // Description missing in models + VxlanV6TunnelDestinationIPMode destination_ip_mode = 2; - // Bottom-of-Stack bit. - optional bool s_bit = 3; + // VXLAN Network Identifier (VNI) to distinguish network instances on the wire + // required = true + optional uint32 vni = 3; - // Time To Live. - optional uint32 ttl = 4; + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 4; } -// Configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation -// of lengths for Locator Block, Locator Node, Function, and Argument MUST be less -// than or equal to 128. -message BgpSrteSRv6SIDEndpointBehaviorAndStructure { - - // SRv6 SID Locator Block length in bits. - // default = 0 - optional uint32 lb_length = 1; +// Communication mode between the VTEPs, either unicast or multicast. +message VxlanV4TunnelDestinationIPMode { - // SRv6 SID Locator Node length in bits. - // default = 0 - optional uint32 ln_length = 2; + message Choice { + enum Enum { + unspecified = 0; + unicast = 1; + multicast = 2; + } + } + // unicast or multicast + // default = Choice.Enum.multicast + optional Choice.Enum choice = 1; - // SRv6 SID Function length in bits. - // default = 0 - optional uint32 func_length = 3; + // Description missing in models + VxlanV4TunnelDestinationIPModeUnicast unicast = 2; - // SRv6 SID Arguments length in bits. - // default = 0 - optional uint32 arg_length = 4; + // Description missing in models + VxlanV4TunnelDestinationIPModeMulticast multicast = 3; } -// Type A: SID only, in the form of MPLS Label. -message BgpSrteSegmentATypeSubTlv { - - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - optional string flags = 1; - - // Label value in [0, 2^20 -1]. - optional uint32 label = 2; +// Communication mode between the VTEPs, either unicast or multicast. +message VxlanV6TunnelDestinationIPMode { - // Traffic class in bits. - optional uint32 tc = 3; + message Choice { + enum Enum { + unspecified = 0; + unicast = 1; + multicast = 2; + } + } + // unicast or multicast + // default = Choice.Enum.multicast + optional Choice.Enum choice = 1; - // Bottom-of-Stack bit. - optional bool s_bit = 4; + // Description missing in models + VxlanV6TunnelDestinationIPModeUnicast unicast = 2; - // Time To Live. - optional uint32 ttl = 5; + // Description missing in models + VxlanV6TunnelDestinationIPModeMulticast multicast = 3; } -// Type B: SID only, in the form of IPv6 address. -message BgpSrteSegmentBTypeSubTlv { +// Description missing in models +message VxlanV4TunnelDestinationIPModeUnicast { - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - optional string flags = 1; + // List of VTEPs for member VNI(VXLAN Network Identifier) + repeated VxlanV4TunnelDestinationIPModeUnicastVtep vteps = 1; +} - // SRv6 SID. - // required = true - optional string srv6_sid = 2; +// Description missing in models +message VxlanV6TunnelDestinationIPModeUnicast { - // Optional SRv6 Endpoint Behavior and SID Structure. - BgpSrteSRv6SIDEndpointBehaviorAndStructure srv6_sid_endpoint_behavior = 3; + // List of VTEPs for member VNI(VXLAN Network Identifier) + repeated VxlanV6TunnelDestinationIPModeUnicastVtep vteps = 1; } -// Type C: IPv4 Node Address with optional SID. -message BgpSrteSegmentCTypeSubTlv { +// Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated +// MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request +// for another end-host IP address, its local VTEP intercepts the ARP request and checks +// for the ARP-resolved IP address in its ARP suppression cache table. If it finds +// a match, the local VTEP sends an ARP response on behalf of the remote end host. +message VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - optional string flags = 1; + // Remote VM MAC address bound to Remote VM IPv4 address + optional string remote_vm_mac = 1; - // SR Algorithm identifier when A-Flag in on. - // default = 0 - optional uint32 sr_algorithm = 2; + // Remote VM IPv4 address + optional string remote_vm_ipv4 = 2; +} - // IPv4 address representing a node. - // required = true - optional string ipv4_node_address = 3; +// VTEP (VXLAN Tunnel End Point (VTEP)) parameters +message VxlanV4TunnelDestinationIPModeUnicastVtep { - // Optional SR-MPLS SID. - BgpSrteSrMplsSid sr_mpls_sid = 4; + // Remote VXLAN Tunnel End Point address + optional string remote_vtep_address = 1; + + // Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated + // MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request + // for another end-host IP address, its local VTEP intercepts the ARP request and checks + // for the ARP-resolved IP address in its ARP suppression cache table. If it finds + // a match, the local VTEP sends an ARP response on behalf of the remote end host. + repeated VxlanTunnelDestinationIPModeUnicastArpSuppressionCache arp_suppression_cache = 2; } -// Type D: IPv6 Node Address with optional SID for SR MPLS. -message BgpSrteSegmentDTypeSubTlv { +// VTEP (VXLAN Tunnel End Point (VTEP)) parameters +message VxlanV6TunnelDestinationIPModeUnicastVtep { - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - optional string flags = 1; + // Remote VXLAN Tunnel End Point address + optional string remote_vtep_address = 1; - // specifying SR Algorithm when when A-Flag as defined in above flags. - // default = 0 - optional uint32 sr_algorithm = 2; + // Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated + // MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request + // for another end-host IP address, its local VTEP intercepts the ARP request and checks + // for the ARP-resolved IP address in its ARP suppression cache table. If it finds + // a match, the local VTEP sends an ARP response on behalf of the remote end host. + repeated VxlanTunnelDestinationIPModeUnicastArpSuppressionCache arp_suppression_cache = 2; +} - // IPv6 address representing a node. - // required = true - optional string ipv6_node_address = 3; +// Multicast Group address for member VNI(VXLAN Network Identifier) +message VxlanV4TunnelDestinationIPModeMulticast { - // Optional SR-MPLS SID. - BgpSrteSrMplsSid sr_mpls_sid = 4; + // IPv4 Multicast address + optional string address = 1; } -// Type E: IPv4 Address and Local Interface ID with optional SID -message BgpSrteSegmentETypeSubTlv { +// Multicast Group address for member VNI(VXLAN Network Identifier) +message VxlanV6TunnelDestinationIPModeMulticast { - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - optional string flags = 1; + // IPv6 Multicast address + optional string address = 1; +} - // Local Interface ID: The Interface Index as defined in [RFC8664]. - // default = 0 - optional uint32 local_interface_id = 2; +// Configuration for one or more RSVP interfaces, ingress and egress LSPs. In this model, +// currently IPv4 RSVP and point-to-point LSPs are supported as per RFC3209 and related +// specifications. +message DeviceRsvp { - // IPv4 address representing a node. - // required = true - optional string ipv4_node_address = 3; + // List of IPv4 RSVP connected interfaces. At least one interface should be present + // for device connected to the DUT. For unconnected devices, this array must be empty. + repeated RsvpIpv4Interface ipv4_interfaces = 1; - // Optional SR-MPLS SID. - BgpSrteSrMplsSid sr_mpls_sid = 4; -} + // List of IPv4 Loopback or IPv4 connected interfaces acting as RSVP ingress and egress + // endpoints. + repeated RsvpLspIpv4Interface lsp_ipv4_interfaces = 2; -// Type F: IPv4 Local and Remote addresses with optional SID. -message BgpSrteSegmentFTypeSubTlv { + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + optional string name = 3; +} - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - optional string flags = 1; +// Configuration for RSVP Interface. +message RsvpIpv4Interface { - // Local IPv4 Address. + // The globally unique name of the IPv4 interface connected to the DUT. This name must + // match the name field of the ipv4_addresses on top which this RSVP interface is configured. + // + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // // required = true - optional string local_ipv4_address = 2; + optional string ipv4_name = 1; - // Remote IPv4 Address. + // IPv4 address of the RSVP neighbor on this interface. // required = true - optional string remote_ipv4_address = 3; + optional string neighbor_ip = 2; - // Optional SR-MPLS SID. - BgpSrteSrMplsSid sr_mpls_sid = 4; -} + // The user-defined label space start value. The LSPs for which this router acts as + // a egress are assigned labels from this label pool.Thelabel_space_start and label_space_end + // together defines this label-pool. + // default = 1000 + optional uint32 label_space_start = 3; -// Type G: IPv6 Address, Interface ID for local and remote pair with optional SID for -// SR MPLS. -message BgpSrteSegmentGTypeSubTlv { + // The user-defined label space end value.The last label value that can be assigned + // to the LSPs for which this router acts as egress. + // default = 100000 + optional uint32 label_space_end = 4; - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - optional string flags = 1; + // Enables sending of Refresh Reduction as described in RFC2961. + // default = False + optional bool enable_refresh_reduction = 5; - // Local Interface ID: The Interface Index as defined in [RFC8664]. - // default = 0 - optional uint32 local_interface_id = 2; + // The number of seconds between transmissions of successive Summary Refreshes. There + // is no specification specified maximum value. For clarity, setting the maximum to + // 1 hour. + // default = 30 + optional uint32 summary_refresh_interval = 6; - // IPv6 address representing a node. - // required = true - optional string local_ipv6_node_address = 3; + // Enables aggregration of different RSVP messages within a single PDU. + // default = False + optional bool send_bundle = 7; - // Local Interface ID: The Interface Index as defined in [RFC8664]. - // default = 0 - optional uint32 remote_interface_id = 4; + // The number of milliseconds to wait after which RSVP will bundle different RSVP messages + // and transmit Bundle messages. + // default = 50 + optional uint32 bundle_threshold = 8; - // IPv6 address representing a node. - // required = true - optional string remote_ipv6_node_address = 5; + // Enables sending of Hello Messages as per RFC3209. + // default = False + optional bool enable_hello = 9; + + // If enable_hello is set to 'true', this specifies the minimum hello interval in seconds + // at which successive Hello Messages are sent as per RFC3209. There is no specification + // specified maximum value. For clarity, setting the maximum to 1 hour. + // default = 9 + optional uint32 hello_interval = 10; - // Optional SR-MPLS SID. - BgpSrteSrMplsSid sr_mpls_sid = 6; + // The number of missed hellos after which the node should consider RSVP Neighbor to + // have timed out. There is no specification specified maximum value. Setting the maximum + // allowed value to 10. + // default = 3 + optional uint32 timeout_multiplier = 11; } -// Type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. -message BgpSrteSegmentHTypeSubTlv { - - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - optional string flags = 1; +// Configuration for RSVP LSP IPv4 Interface. +message RsvpLspIpv4Interface { - // Local IPv6 Address. + // The globally unique name of the IPv4 or Loopback IPv4 interface acting as the RSVP + // ingress and egress endpoint for the LSPs configured on this interface. This must + // match the name field of either ipv4_addresses or ipv4_loopbacks on which this LSP + // interface is configured. + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv4Loopback/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv4Loopback/properties/name + // // required = true - optional string local_ipv6_address = 2; + optional string ipv4_name = 1; - // Remote IPv6 Address. - // required = true - optional string remote_ipv6_address = 3; + // Contains properties of Tail(Egress) LSPs. + RsvpLspIpv4InterfaceP2PEgressIpv4Lsp p2p_egress_ipv4_lsps = 2; - // Optional SR-MPLS SID. - BgpSrteSrMplsSid sr_mpls_sid = 4; + // Array of point-to-point RSVP-TE P2P LSPs originating from this interface. + repeated RsvpLspIpv4InterfaceP2PIngressIpv4Lsp p2p_ingress_ipv4_lsps = 3; } -// Type I: IPv6 Node Address with optional SRv6 SID. -message BgpSrteSegmentITypeSubTlv { - - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - optional string flags = 1; +// Configuration for RSVP Egress Point-to-Point(P2P) IPv4 LSPs. +message RsvpLspIpv4InterfaceP2PEgressIpv4Lsp { - // IPv6 address representing a node. + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. // required = true - optional string ipv6_node_address = 2; + optional string name = 1; - // Optional SRv6 SID. - optional string srv6_sid = 3; + // The time in seconds between successive transmissions of RESV Refreshes. The actual + // refresh interval is jittered by upto 50%. There is no specification specified maximum + // value. For clarity, setting the maximum to 1 hour. + // default = 30 + optional uint32 refresh_interval = 2; - // Optional SRv6 Endpoint Behavior and SID Structure. - BgpSrteSRv6SIDEndpointBehaviorAndStructure srv6_sid_endpoint_behavior = 4; -} + // The number of missed PATH refreshes after which a recieving node should consider + // the LSP state to have timed out. There is no specification specified maximum value. + // Setting the maximum allowed value to 10. + // default = 3 + optional uint32 timeout_multiplier = 3; -// Type J: IPv6 Address, Interface ID for local and remote pair for SRv6 with optional -// SID. -message BgpSrteSegmentJTypeSubTlv { + message ReservationStyle { + enum Enum { + unspecified = 0; + shared_explicit = 1; + fixed_filter = 2; + auto = 3; + } + } + // It determines how RSVP-TE enabled network devices set up reservations along the path + // between an end-to-end QOS-enabled connection. If 'auto' is enabled, the style is + // chosen based on whether the incoming Path has 'SE Desired' flag set. Otherwise, the + // style is chosen based on the value selected for this attribute. + // default = ReservationStyle.Enum.shared_explicit + optional ReservationStyle.Enum reservation_style = 4; - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - optional string flags = 1; + // If enabled, a specific fixed label will be advertised by the egress or tail end for + // all Path messages received by this egress. This can be leveraged to advertise Explicit + // or Implicit null labels. + // default = False + optional bool enable_fixed_label = 5; - // SR Algorithm identifier when A-Flag in on. + // The fixed label value as advertised by egress in RESV message. Applicable only if + // 'fixed_label' is set to 'true'. Special values are '0 - IPv4 Explicit NULL', '2 - + // IPv6 Explicit NULL' and '3 - Implicit NULL'. Outside of this, labels are expected + // to have a minimum value of 16. // default = 0 - optional uint32 sr_algorithm = 2; + optional uint32 fixed_label_value = 6; +} - // Local Interface ID: The Interface Index as defined in [RFC8664]. - // default = 0 - optional uint32 local_interface_id = 3; +// Configuration for an RSVP Ingress point-to-point LSP. +message RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { - // IPv6 address representing a node. + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. // required = true - optional string local_ipv6_node_address = 4; - - // Local Interface ID: The Interface Index as defined in [RFC8664]. - // default = 0 - optional uint32 remote_interface_id = 5; + optional string name = 1; - // IPv6 address representing a node. + // IPv4 address of the remote endpoint of the LSP. // required = true - optional string remote_ipv6_node_address = 6; + optional string remote_address = 2; - // Optional SRv6 SID. - optional string srv6_sid = 7; + // The Tunnel ID of the RSVP LSP. Carried in the SESSION object in Path Messages. + // default = 1 + optional uint32 tunnel_id = 3; - // Optional SRv6 Endpoint Behavior and SID Structure. - BgpSrteSRv6SIDEndpointBehaviorAndStructure srv6_sid_endpoint_behavior = 8; -} + // The LSP ID of the RSVP LSP. Carried in the SENDER_TEMPLATE object in Path Messages. + // default = 1 + optional uint32 lsp_id = 4; -// Type K: IPv6 Local and Remote addresses for SRv6 with optional SID. -message BgpSrteSegmentKTypeSubTlv { + // The time in seconds between successive transmissions of PATH Refreshes. The actual + // refresh interval is jittered by upto 50%. There is no specification specified maximum + // value. For clarity, setting the maximum to 1 hour. + // default = 30 + optional uint32 refresh_interval = 5; - // One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined - // in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - optional string flags = 1; + // The number of missed RESV refreshes after which a recieving node should consider + // the LSP state to have timed out. There is no specification specified maximum value. + // Setting the maximum allowed value to 10. + // default = 3 + optional uint32 timeout_multiplier = 6; - // SR Algorithm identifier when A-Flag in on. + // The LSP id that will be used when creating a Make-Before-Break LSP when the active + // LSP is using lsp_id. If the active LSP on which Make-Before-Break is being done is + // using the backup_lsp_id, the new LSP created will toggle to use the lsp_id instead. + // default = 2 + optional uint32 backup_lsp_id = 7; + + // The amount of delay in milliseconds that an implementation should wait for before + // switching traffic to the new LSP created after a Make-Before-Break is done on an + // LSP. The default value is 0 which means to switch immediately. An implementation + // should support a minimum delay value of at least 50ms . There is no specification + // specified maximum value. Setting maximum allowed value to 1 minute. If a delay value + // is supplied which is lesser than the minimum delay value supported, a warning should + // be provided indicating that the minimum value of LSP switchover delay is automatically + // increased to the supported minimum value. This warning should be included in the + // list of warnings in the 'Response.Warning' attribute sent in the SetConfig 'Success' + // Response. // default = 0 - optional uint32 sr_algorithm = 2; + optional uint32 lsp_switchover_delay = 8; - // IPv6 address representing a node. - // required = true - optional string local_ipv6_address = 3; + // This contains the values of the fields to be included in the SESSION_ATTRIBUTE object + // in the Path Message sent for the LSP. + RsvpSessionAttribute session_attribute = 9; - // IPv6 address representing a node. - // required = true - optional string remote_ipv6_address = 4; + // This contains the values of the fields to be included in the TSPEC object in the + // Path Message sent for the LSP. + RsvpTspec tspec = 10; - // Optional SRv6 SID. - optional string srv6_sid = 5; + // This contains the values of the fields to be included in the FAST_REROUTE object + // in the Path Message sent for the LSP. + // This is an optional object . If this attribute is not included , the FAST_REROUTE + // object will not be included. + RsvpFastReroute fast_reroute = 11; - // Optional SRv6 Endpoint Behavior and SID Structure. - BgpSrteSRv6SIDEndpointBehaviorAndStructure srv6_sid_endpoint_behavior = 6; + // This contains the values of the fields to be included in the ERO object in the Path + // Message sent for the LSP. + // This is an optional object . If this attribute is not included , the ERO object will + // not be included. + RsvpEro ero = 12; } -// Configuration for BGP Segment Routing Traffic Engineering policy. -// -message BgpSrteV6Policy { - - // Identifies the policy in the context of (color and endpoint) tuple. It is used by - // the SR Policy originator to make unique multiple occurrences of the same SR Policy. - // default = 1 - optional uint32 distinguisher = 1; +// Configuration for RSVP-TE SESSION_ATTRIBUTE object included in Path Messages as defined +// in RFC3209. The bandwidth_protection_desired and node_protection_desired flags are +// defined in RFC4090 (Fast Reroute). +message RsvpSessionAttribute { - // Identifies the policy. It is used to match the color of the destination prefixes - // to steer traffic into the SR Policy. - // default = 100 - optional uint32 color = 2; + // If this is enabled, an auto-generated Session Name is included in the SESSION_ATTRIBUTE + // object in the Path Message for this LSP. + // default = True + optional bool auto_generate_session_name = 1; - // Specifies a single node or a set of nodes (e.g., an anycast address). It is selected - // on the basis of the SR Policy type (AFI). - // required = true - optional string ipv6_endpoint = 3; + // If auto_generate_session_name is set to 'false', then the value of this field is + // used to fill the Session Name field of the SESSION_ATTRIBUTE object in the Path Message + // for this LSP. It is suggested to include the Local IP, Remote IP, Tunnel ID and LSP + // ID in the auto-generated Session Name to ensure uniqueness of the name in the test. + // The maximum length of session name is 254 bytes. + optional string session_name = 2; - message NextHopMode { - enum Enum { - unspecified = 0; - local_ip = 1; - manual = 2; - } - } - // Mode for choosing the NextHop in MP REACH NLRI. Available modes are : Local IP: Automatically - // fills the Nexthop with the Local IP of the BGP peer. For IPv6 BGP peer the Nexthop - // Encoding capability should be enabled. Manual: Override the Nexthop with any arbitrary - // IPv4/IPv6 address. - // default = NextHopMode.Enum.local_ip - optional NextHopMode.Enum next_hop_mode = 4; + // Specifies the value of the Setup Priority field. This controls whether the LSP should + // pre-empt existing LSP setup with certain Holding Priority if resource limitation + // is encountered when setting up the LSP. (e.g. bandwidth availability). The value + // 0 is the highest priority while 7 is the lowest. + // default = 7 + optional uint32 setup_priority = 3; - message NextHopAddressType { - enum Enum { - unspecified = 0; - ipv4 = 1; - ipv6 = 2; - } - } - // Type of next hop IP address to be used when 'next_hop_mode' is set to 'manual'. - // default = NextHopAddressType.Enum.ipv6 - optional NextHopAddressType.Enum next_hop_address_type = 5; + // Specifies the value of the Holding Priority field. This controls whether a new LSP + // being created with certain Setup Priority should pre-empt this LSP if resource limitation + // is encountered when setting up the LSP. (e.g. bandwidth availability). The value + // 0 is the highest priority while 7 is the lowest. + // default = 7 + optional uint32 holding_priority = 4; - // The IPv4 address of the Nexthop if the 'next_hop_mode' is 'manual' and the Nexthop - // type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, Nexthop Encoding - // capability extended_next_hop_encoding should be enabled. - // default = 0.0.0.0 - optional string next_hop_ipv4_address = 6; + // This flag permits transit routers to use a local repair mechanism which may result + // in violation of the explicit route object. When a fault is detected on an adjacent + // downstream link or node, a transit router can reroute traffic for fast service restoration. + // default = False + optional bool local_protection_desired = 5; - // The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type' is 'manual' - // and the Nexthop type 'next_hop_address_type' is IPv6. - // default = ::0 - optional string next_hop_ipv6_address = 7; + // This flag indicates that label information should be included when doing a route + // record. + // default = False + optional bool label_recording_desired = 6; - // Description missing in models - BgpRouteAdvanced advanced = 8; + // This flag indicates that the tunnel ingress node may choose to reroute this tunnel + // without tearing it down. A tunnel egress node SHOULD use the Shared Explicit(SE) + // Style when responding with a Resv message. + // default = False + optional bool se_style_desired = 7; - // Description missing in models - BgpAddPath add_path = 9; + // This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs + // along the protected LSP path that a backup path with a bandwidth guarantee is desired. + // This bandwidth has to be guaranteed for the protected LSP, if no FAST_REROUTE object + // is included in the PATH message. If a FAST_REROUTE object is present in the Path + // message, then the bandwidth specified therein is to be guaranteed. + // default = False + optional bool bandwidth_protection_desired = 8; - // Description missing in models - BgpAsPath as_path = 10; + // This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs + // along a protected LSP path that it is desired to have a backup path that bypasses + // at least the next node of the protected LSP. + // default = False + optional bool node_protection_desired = 9; - // Optional community settings. - repeated BgpCommunity communities = 11; + // This is an optional object. If included the extended SESSION_ATTRIBUTE object is + // sent in the Path message containing + // the additional fields included in this object. This contains a set of three bitmaps + // using which further constraints can be + // set on the path calculated for the LSP based on the Admin Group settings in the IGP + // (e.g ISIS or OSPF interface). + RsvpResourceAffinities resource_affinities = 10; +} - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. - repeated BgpExtCommunity extcommunities = 12; +// This is an optional object. If included, the extended SESSION_ATTRIBUTE object is +// sent in the Path message containing +// the additional fields included in this object. This contains a set of three bitmaps +// using which further constraints can be +// set on the path calculated for the LSP based on the Admin Group settings in the IGP +// (e.g ISIS or OSPF interface). +message RsvpResourceAffinities { - // List of optional tunnel TLV settings. - repeated BgpSrteV6TunnelTlv tunnel_tlvs = 13; + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // any of which renders a link unacceptable. A null set (all bits set to zero) doesn't + // render the link unacceptable. The most significant byte in the hex-string is the + // farthest to the left in the byte sequence. Leading zero bytes in the configured + // value may be omitted for brevity. + // default = 0 + optional string exclude_any = 1; - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 14; + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // any of which renders a link acceptable. A null set (all bits set to zero) automatically + // passes. The most significant byte in the hex-string is the farthest to the left + // in the byte sequence. Leading zero bytes in the configured value may be omitted + // for brevity. + // default = 0 + optional string include_any = 2; - // If enabled means that this part of the configuration including any active 'children' - // nodes will be advertised to peer. If disabled, this means that though config is - // present, it is not taking any part of the test but can be activated at run-time to - // advertise just this part of the configuration to the peer. - // default = True - optional bool active = 15; + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // all of which must be present for a link to be acceptable. A null set (all bits set + // to zero) automatically passes. The most significant byte in the hex-string is the + // farthest to the left in the byte sequence. Leading zero bytes in the configured + // value may be omitted for brevity. + // default = 0 + optional string include_all = 3; } -// Configuration for BGP SRTE Tunnel TLV. -message BgpSrteV6TunnelTlv { +// Configuration for RSVP-TE TSPEC object included in Path Messages. The usage of these +// parameters is defined in RFC2215. +message RsvpTspec { - // Description missing in models - BgpSrteRemoteEndpointSubTlv remote_endpoint_sub_tlv = 1; + // The rate of the traffic to be carried in this LSP in bytes per second. This is part + // of the Token Bucket specification defined for a traffic flow defined in RFC2215. + // default = 0 + optional float token_bucket_rate = 1; - // Description missing in models - BgpSrteColorSubTlv color_sub_tlv = 2; + // The depth of the token bucket in bytes used to specify the Token Bucket characteristics + // of the traffic to be carried in the LSP. This is part of the Token Bucket specification + // defined for a traffic flow defined in RFC2215. + // default = 0 + optional float token_bucket_size = 2; - // Description missing in models - BgpSrteBindingSubTlv binding_sub_tlv = 3; + // The peak data rate of the traffic in bytes per second used to specify the Token Bucket + // characteristics of the traffic to be carried in the LSP. This is part of the Token + // Bucket specification defined for a traffic flow defined in RFC2215. + // default = 0 + optional float peak_data_rate = 3; - // Description missing in models - BgpSrtePreferenceSubTlv preference_sub_tlv = 4; + // Specifies the minium length of packet frames that will be policed. + // default = 0 + optional uint32 minimum_policed_unit = 4; - // Description missing in models - BgpSrtePolicyPrioritySubTlv policy_priority_sub_tlv = 5; + // Specifies the maximum length of packet frames that will be policed. + // default = 0 + optional uint32 maximum_policed_unit = 5; +} - // Description missing in models - BgpSrtePolicyNameSubTlv policy_name_sub_tlv = 6; +// Configuration for the optional RSVP-TE FAST_REROUTE object included in Path Messages +// as defined in RFC4090. +message RsvpFastReroute { - // Description missing in models - BgpSrteExplicitNullLabelPolicySubTlv explicit_null_label_policy_sub_tlv = 7; + // Specifies the value of the Setup Priority field. This controls whether the backup + // LSP should pre-empt existing LSP that is setup with certain Holding Priority. While + // setting up a backup LSP, preemption of existing LSP can happen if resource limitation + // is encountered (e.g bandwidth availability). + // default = 7 + optional uint32 setup_priority = 1; - // Description missing in models - repeated BgpSrteSegmentList segment_lists = 8; + // Specifies the value of the Holding Priority field. This controls whether a new LSP + // being created with certain Setup Priority should pre-empt this LSP set up with this + // Holding Priority. While setting up a new LSP, preemption of existing LSP can happen + // if resource limitation is encountered (e.g bandwidth availability). + // default = 7 + optional uint32 holding_priority = 2; - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 9; + // Specifies the value of the Hop Limit field. This controls the maximum number of hops + // the LSP should traverse to reach the LSP end-point. + // default = 3 + optional uint32 hop_limit = 3; - // If enabled means that this part of the configuration including any active 'children' - // nodes will be advertised to peer. If disabled, this means that though config is - // present, it is not taking any part of the test but can be activated at run-time to - // advertise just this part of the configuration to the peer. - // default = True - optional bool active = 10; -} + // Specifies the value of the Bandwidth field as a 32-bit IEEE floating point integer, + // in bytes per second, as desired for the LSP. + // default = 0 + optional float bandwidth = 4; -// The Graceful Restart Capability (RFC 4724) is a BGP capability that can be used by -// a BGP speaker to indicate its ability to preserve its forwarding state during BGP -// restart. The Graceful Restart (GR) capability is advertised in OPEN messages sent -// between BGP peers. After a BGP session has been established, and the initial routing -// update has been completed, an End-of-RIB (Routing Information Base) marker is sent -// in an UPDATE message to convey information about routing convergence. -message BgpGracefulRestart { + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // any of which renders a link unacceptable. A null set (all bits set to zero) doesn't + // render the link unacceptable. The most significant byte in the hex-string is the + // farthest to the left in the byte sequence. Leading zero bytes in the configured + // value may be omitted for brevity. + // default = 0 + optional string exclude_any = 5; - // If enabled, Graceful Restart capability is advertised in BGP OPEN messages. - // default = False - optional bool enable_gr = 1; + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // any of which renders a link acceptable. A null set (all bits set to zero) automatically + // passes. The most significant byte in the hex-string is the farthest to the left + // in the byte sequence. Leading zero bytes in the configured value may be omitted + // for brevity. + // default = 0 + optional string include_any = 6; - // This is the estimated duration (in seconds) it will take for the BGP session to be - // re-established after a restart. This can be used to speed up routing convergence - // by its peer in case the BGP speaker does not come back after a restart. - // default = 45 - optional uint32 restart_time = 2; + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // all of which must be present for a link to be acceptable. A null set (all bits set + // to zero) automatically passes. The most significant byte in the hex-string is the + // farthest to the left in the byte sequence. Leading zero bytes in the configured + // value may be omitted for brevity. + // default = 0 + optional string include_all = 7; - // If enabled, the Long-lived Graceful Restart Capability, or LLGR Capability - // will be advertised. - // This capability MUST be advertised in conjunction with the Graceful Restart - // capability. + // Requests protection via the one-to-one backup method. // default = False - optional bool enable_llgr = 3; + optional bool one_to_one_backup_desired = 8; - // Duration (in seconds) specifying how long stale information (for the AFI/SAFI) - // may be retained. This is a three byte field and is applicable - // only if 'enable_llgr' is set to 'true'. - // default = 10 - optional uint32 stale_time = 4; + // Requests protection via the facility backup method. + // default = False + optional bool facility_backup_desired = 9; } -// Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the -// order given in the input to the peer after the BGP session is established. -message BgpUpdateReplay { +// Configuration for the optional RSVP-TE explicit route object(ERO) object included +// in Path Messages. +message RsvpEro { - message Choice { + message PrependNeighborIp { enum Enum { unspecified = 0; - structured_pdus = 1; - raw_bytes = 2; + dont_prepend = 1; + prepend_loose = 2; + prepend_strict = 3; } } - // Description missing in models - // default = Choice.Enum.structured_pdus - optional Choice.Enum choice = 1; + // Determines whether the IP address of the RSVP neighbor should be added as an ERO + // sub-object. If it is to be included, it can be included as a Loose hop or as a Strict + // hop. + // default = PrependNeighborIp.Enum.prepend_loose + optional PrependNeighborIp.Enum prepend_neighbor_ip = 1; - // Description missing in models - BgpStructuredPdus structured_pdus = 2; + // If prepend_egress_ip is set to one of 'prepend_loose' or 'prepend_strict', then set + // this value as the prefix length of the ERO sub-object containing egress IP address. + // + // default = 32 + optional uint32 prefix_length = 2; - // Description missing in models - BgpRawBytes raw_bytes = 3; + // Array of sub-objects to be included in the ERO. These sub-objects contain the intermediate + // hops to be traversed by the LSP while being forwarded towards the egress endpoint. + // These sub-objects are included after the optional sub-object containing IP address + // of egress endpoint of the LSP (when present). + repeated RsvpEroSubobject subobjects = 3; } -// Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the -// order given in the input to the peer after the BGP session is established. -message BgpRawBytes { +// Configuration for the ERO sub-object. +message RsvpEroSubobject { - // Array of ordered BGP Updates ( including both Advertise and Withdraws ) to be sent - // in the order given in the input to the peer after the BGP session is established. - // - repeated BgpOneUpdateReplay updates = 1; -} + message Type { + enum Enum { + unspecified = 0; + ipv4 = 1; + as_number = 2; + } + } + // The type of the ERO sub-object, one of IPv4 Address or AS Number. + // default = Type.Enum.ipv4 + optional Type.Enum type = 1; -// Specification of one BGP Update to be sent to the BGP peer. -message BgpOneUpdateReplay { + // IPv4 address that this LSP should traverse through. This field is applicable only + // if the value of 'type' is set to 'ipv4'. + // default = 0.0.0.0 + optional string ipv4_address = 2; - // Minimum time interval in milliseconds from previous Update from the sequence of BGP - // Updates to be replayed. + // Prefix length for the IPv4 address in the ERO sub-object. This field is applicable + // only if the value of 'type' is set to 'ipv4'. + // default = 32 + optional uint32 prefix_length = 3; + + // Autonomous System number to be set in the ERO sub-object that this LSP should traverse + // through. This field is applicable only if the value of 'type' is set to 'as_number'. + // Note that as per RFC3209, 4-byte AS encoding is not supported. // default = 0 - optional uint32 time_gap = 1; + optional uint32 as_number = 4; - // Bytes specified in hex format to be sent to peer after the BGP Update Header. The - // Update Header will always have the initial 16 bytes containing Marker bytes, 2 bytes - // containing the Length and 1 byte containing the Type.The string MUST contain sequence - // of valid hex bytes. The bytes specified in hex format should be appended to the Update - // message to be sent to the peer after the fixed 19 bytes described above. This byte - // stream can be of any length from 1 to 4077 bytes.The value 4077 is derived from - // the maximum length allowed for a BGP message in RFC4271 which is 4096 minus mandatory - // 19 bytes described above. In the imported byte stream, one byte is represented as - // string of 2 characters, for example 2 character string (0x)AB represents value of - // a single byte. So the maximum length of this attribute is 8154 (4077 * 2 hex characters - // per byte). - // required = true - optional string update_bytes = 2; + message HopType { + enum Enum { + unspecified = 0; + strict = 1; + loose = 2; + } + } + // The hop type of the ERO sub-object, one of Strict or Loose. + // default = HopType.Enum.loose + optional HopType.Enum hop_type = 5; } -// Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the -// order given in the input to the peer after the BGP session is established. -message BgpStructuredPdus { +// Configuration for one or more IPv4 or IPv6 DHCP servers. +message DeviceDhcpServer { - // Array of ordered BGP Updates ( including both Advertise and Withdraws ) to be sent - // in the order given in the input to the peer after the BGP session is established. - // - repeated BgpOneStructuredUpdateReplay updates = 1; + // This contains an array of references to IPv4 interfaces, each of which will contain + // one DHCPv4 server. + repeated DhcpServerV4 ipv4_interfaces = 2; + + // This contains an array of references to IPv6 interfaces, each of which will contain + // one DHCPv6 server. + repeated DhcpServerV6 ipv6_interfaces = 3; } -// One structured BGP Update. -message BgpOneStructuredUpdateReplay { +// Configuration for emulated DHCPv4 Server. +message DhcpServerV4 { - // Minimum time interval in milliseconds from previous Update from the sequence of BGP - // Updates to be replayed. - // default = 0 - optional uint32 time_gap = 1; + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 1; - // Attributes carried in the Update packet alongwith the reach/unreach prefixes. + // The unique name of the IPv4 on which DHCPv4 server will run. // - BgpAttributes path_attributes = 2; - - // The IPv4 prefixes to be included in the traditional UNREACH_NLRI. - repeated BgpOneTraditionalNlriPrefix traditional_unreach_nlris = 3; + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // required = true + optional string ipv4_name = 2; - // The IPv4 prefixes to be included in the traditional REACH_NLRI. - repeated BgpOneTraditionalNlriPrefix traditional_reach_nlris = 4; + // List of DHCPv4 Server Lease parameters + repeated DhcpServerV4Pool address_pools = 3; } -// TRADITIONAL_NLRI is an optional part of the the BGP Update which can carry only IPv4 -// prefix information as defined in https://www.rfc-editor.org/rfc/rfc4271.html#section-4.3 -// -// and extended by https://datatracker.ietf.org/doc/html/rfc7911#section-3 to carry -// additional Path Id information per prefix. -message BgpOneTraditionalNlriPrefix { - - // The IPv4 address of the network. - // default = 0.0.0.0 - optional string address = 1; - - // The IPv4 network prefix length to be applied to the address. - // default = 24 - optional uint32 prefix = 2; +// Configuration for DHCPv4 address pool for a lease. +message DhcpServerV4Pool { - // Description missing in models - BgpNLRIPrefixPathId path_id = 3; -} + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + optional string name = 1; -// One IPv4 NLRI Prefix. -message BgpOneIpv4NLRIPrefix { + // The duration of time in seconds that is assigned to a lease. + // default = 86400 + optional uint32 lease_time = 2; - // The IPv4 address of the network. - // default = 0.0.0.0 - optional string address = 1; + // The IPv4 address of the first lease pool. + // required = true + optional string start_address = 3; // The IPv4 network prefix length to be applied to the address. // default = 24 - optional uint32 prefix = 2; - - // Description missing in models - BgpNLRIPrefixPathId path_id = 3; -} - -// One IPv6 NLRI Prefix. -message BgpOneIpv6NLRIPrefix { - - // The IPv6 address of the network. - // default = 0::0 - optional string address = 1; + optional uint32 prefix_length = 4; - // The IPv6 network prefix length to be applied to the address. - // default = 64 - optional uint32 prefix = 2; - - // Description missing in models - BgpNLRIPrefixPathId path_id = 3; -} - -// Optional field in the NLRI carrying Path Id of the prefix. -message BgpNLRIPrefixPathId { + // The total number of addresses in the pool. + // default = 1 + optional uint32 count = 5; - // The value of the optional Path ID of the prefix. + // The increment value for the lease address within the lease pool. The value is incremented + // according to the prefix_length and step. // default = 1 - optional uint32 value = 1; -} + optional uint32 step = 6; -// Attributes carried in the Update packet alongwith the reach/unreach prefixes. -message BgpAttributes { + // Optional configuration for DHCPv4 address pool for the lease. + DhcpServerV4PoolOption options = 7; +} - // Any attributes not present in the list of configurable attributes should be added - // to the list of unknown attributes. - repeated BgpAttributesOtherAttribute other_attributes = 1; +// Optional configuration for DHCPv4 address pool for the lease. +message DhcpServerV4PoolOption { - message Origin { - enum Enum { - unspecified = 0; - igp = 1; - egp = 2; - incomplete = 3; - } - } - // The ORIGIN attribute is a mandatory attribute which can take three values: - // the prefix originates from an interior routing protocol 'igp', it originates from - // 'egp' - // or the origin is 'incomplete',if the prefix is learned through other means. - // - // default = Origin.Enum.incomplete - optional Origin.Enum origin = 2; + // The Router address advertised by the DHCPv4 server in Offer and Ack messages. + // default = 0.0.0.0 + optional string router_address = 1; - // AS_PATH attribute to be included in the Update. - BgpAttributesAsPath as_path = 3; + // The primary DNS server address that is offered to DHCP clients that request this + // information through a TLV option. + // default = 0.0.0.0 + optional string primary_dns_server = 2; - // AS4_PATH attribute to be included in the Update. - BgpAttributesAs4Path as4_path = 4; + // The primary DNS server address that is offered to DHCP clients that request this + // information through a TLV option. + // default = 0.0.0.0 + optional string secondary_dns_server = 3; - // Description missing in models - BgpAttributesNextHop next_hop = 5; + // If selected, the DHCP server includes in its replies the TLV information for the + // DHCPv4 Relay Agent Option 82 and the corresponding sub-TLVs that it receives from + // a DHCP relay agent, otherwise it replies without including this TLV. + // default = True + optional bool echo_relay_with_tlv_82 = 4; +} - // Description missing in models - BgpAttributesMultiExitDiscriminator multi_exit_discriminator = 6; +// Configuration for emulated DHCPv6 Server. +message DhcpServerV6 { - // Description missing in models - BgpAttributesLocalPreference local_preference = 7; + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 1; - // If enabled, it indicates that the ATOMIC_AGGREGATOR attribute should be included - // in the Update. - // Presence of this attribute Indicates that this route might not be getting sent on - // a fully optimized path - // since some intermediate BGP speaker has aggregated the route. + // The unique name of the IPv6 on which DHCPv6 server will run. // - // default = False - optional bool include_atomic_aggregator = 8; - - // Description missing in models - BgpAttributesAggregator aggregator = 9; - - // Description missing in models - BgpAttributesAs4Aggregator as4_aggregator = 10; - - // Description missing in models - repeated BgpAttributesCommunity community = 11; - - // Description missing in models - BgpAttributesOriginatorId originator_id = 12; + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // + // required = true + optional string ipv6_name = 2; - // When a Route Reflector reflects a route, it prepends the local CLUSTER_ID to the - // CLUSTER_LIST as defined in RFC4456. - repeated string cluster_ids = 13; + // If Rapid Commit is set, server responds to client initiated Rapid Commit two-message + // exchanges. + // default = False + optional bool rapid_commit = 3; - // Optional EXTENDED_COMMUNITY attribute settings. - // The EXTENDED_COMMUNITY Attribute is a transitive optional BGP attribute, with the - // Type Code 16. Community and Extended Communities attributes - // are utilized to trigger routing decisions, such as acceptance, rejection, preference, - // or redistribution. An extended community is an eight byte value. - // It is divided into two main parts. The first two bytes of the community encode a - // type and sub-type fields and the last six bytes carry a unique set - // of data in a format defined by the type and sub-type field. Extended communities - // provide a larger range for grouping or categorizing communities. - repeated BgpExtendedCommunity extended_communities = 14; + // If the server does not have an address to which it can send the Reconfigure message + // directly to the client, the server uses a Relay-reply message to send the Reconfigure + // message to a relay agent that will relay the message to the client. + // default = False + optional bool reconfigure_via_relay_agent = 4; - // Description missing in models - BgpAttributesMpReachNlri mp_reach = 16; + // Array of DHCP pools configured on a server. + repeated DhcpV6ServerLease leases = 5; - // Description missing in models - BgpAttributesMpUnreachNlri mp_unreach = 17; + // Optional DHCPv4 Server options that are sent in Dhcp server messages. + Dhcpv6ServerOptions options = 6; } -// One unknown attribute stored as hex bytes. -message BgpAttributesOtherAttribute { +// DHCP server options, these configured options are sent in Dhcp server messages. +message Dhcpv6ServerOptions { - // Optional flag in the BGP attribute. - // default = False - optional bool flag_optional = 1; + // Additional DHCP server primary dns and other configuration options. + DhcpV6ServerDns dns = 1; - // Transitive flag in the BGP attribute. - // default = False - optional bool flag_transitive = 2; + // This option is used by servers to exchange vendor-specific information with clients. + Dhcpv6ServerOptionsVendorInfo vendor_info = 2; - // Partial flag in the BGP attribute. - // default = False - optional bool flag_partial = 3; + // The server sends this option to inform the client about a URL to a boot file which + // client will use for + // network boots. + Dhcpv6ServerOptionsBootfileUrl bootfile_url = 3; +} - // Extended length flag in the BGP attribute. - // default = False - optional bool flag_extended_length = 4; +// One DHCP pool configuration on a server. +message DhcpV6ServerLease { - // The value of the Type field in the attribute. - // required = true - optional uint32 type = 5; + // The Life Time length in seconds that is assigned to a lease if the requesting DHCP + // client does not specify a specific expiration time. + // default = 86400 + optional uint32 lease_time = 1; - // Contents of the value field ( the contents after the initial two bytes containing - // the Flags and Type field ) of the attribute in hex bytes. - // It includes the contents of length of the extended length field if included. + // Description missing in models // required = true - optional string raw_value = 6; + Dhcpv6ServerIaType ia_type = 5; } -// The AS_PATH attribute identifies the autonomous systems through which routing information -// carried in this UPDATE message has passed. -// This contains the configuration of how to include the Local AS in the AS path -// attribute of the MP REACH NLRI. It also contains optional configuration of -// additional AS Path Segments that can be included in the AS Path attribute. -// The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that -// a routing information passes through to reach the destination. -// There are two modes in which AS numbers can be encoded in the AS Path Segments -// - When the AS Path is being exchanged between old and new BGP speakers or between -// two old BGP speakers , the AS numbers are encoded as 2 byte values. -// - When the AS Path is being exchanged between two new BGP speakers supporting 4 byte -// AS , the AS numbers are encoded as 4 byte values. -message BgpAttributesAsPath { +// Description missing in models +message Dhcpv6ServerIaType { message Choice { enum Enum { unspecified = 0; - four_byte_as_path = 1; - two_byte_as_path = 2; + iana = 1; + iata = 2; + iapd = 3; + ianapd = 4; } } - // Description missing in models - // default = Choice.Enum.four_byte_as_path + // Identity Association: a collection of leases assigned to a client. Each IA has an + // associated IAID. Each IA holds one type of lease, like an identity association for + // temporary addresses (IA_TA) holds temporary addresses, and an identity association + // for prefix delegation (IA_PD). + // default = Choice.Enum.iana optional Choice.Enum choice = 1; // Description missing in models - BgpAttributesAsPathFourByteAsPath four_byte_as_path = 2; + Dhcpv6ServerPoolInfo iana = 2; // Description missing in models - BgpAttributesAsPathTwoByteAsPath two_byte_as_path = 3; + Dhcpv6ServerPoolInfo iata = 3; + + // Description missing in models + Dhcpv6ServerIapdPoolInfo iapd = 4; + + // Description missing in models + Dhcpv6ServerIanapdPoolInfo ianapd = 5; } -// AS Paths with 4 byte AS numbers can be exchanged only if both BGP speakers support -// 4 byte AS number extensions. -message BgpAttributesAsPathFourByteAsPath { +// The container for pool configurations for IA types iana and iata. +message Dhcpv6ServerPoolInfo { - // The AS path segments containing 4 byte AS numbers to be added in the AS Path attribute. - // By default, an empty AS path should always be included and for EBGP at minimum the - // local AS number should be present in the AS Path. - repeated BgpAttributesFourByteAsPathSegment segments = 1; + // The first IP address of the lease pool. + optional string start_address = 1; + + // The IPv6 network prefix length is used for incrementing the lease address within + // the lease pool where multiple addresses are configured by using the size field. The + // address is incremented using the configured Prefix Length and Step. + // default = 64 + optional uint32 prefix_len = 2; + + // The total number of addresses in the pool. + // default = 1 + optional uint32 size = 3; + + // The increment value for the lease address within the lease pool where multiple addresses + // are present. The value is incremented according to the configured Prefix Length and + // Step. + // default = 1 + optional uint32 step = 4; } -// Configuration for a single BGP AS path segment containing 4 byte AS numbers. -message BgpAttributesFourByteAsPathSegment { +// The container for prefix pool configurations for IA type iapd. +message Dhcpv6ServerIapdPoolInfo { - message Type { - enum Enum { - unspecified = 0; - as_seq = 1; - as_set = 2; - as_confed_seq = 3; - as_confed_set = 4; - } - } - // AS sequence is the most common type of AS_PATH, it contains the list - // of ASNs starting with the most recent ASN being added read from left - // to right. - // The other three AS_PATH types are used for Confederations - // - AS_SET is the type of AS_PATH attribute that summarizes routes using - // using the aggregate-address command, allowing AS_PATHs to be summarized - // in the update as well. - // - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most - // recent ASN to be added reading left to right - // - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent - // in BGP Updates. - // default = Type.Enum.as_seq - optional Type.Enum type = 1; + // The first IP address of the prefix pool. + optional string start_prefix_address = 1; - // The 4 byte AS numbers in this AS path segment. - repeated uint32 as_numbers = 2; + // The IPv6 network prefix length is used for incrementing the lease address within + // the lease pool where multiple addresses are configured by using the size field. The + // address is incremented using the configured Prefix Length and Step. + // default = 64 + optional uint32 configured_prefix_len = 2; + + // The total number of addresses in the pool. + // default = 10 + optional uint32 prefix_size = 3; + + // The increment value for the lease address within the lease pool where multiple addresses + // are present. The value is incremented according to the Prefix Length and Step. + // default = 1 + optional uint32 prefix_step = 4; + + // The prefix length of the IPv6 prefix that the Dhcpv6 server offers to the Dhcpv6 + // client. + // default = 64 + optional uint32 advertised_prefix_len = 5; } -// AS Paths with 2 byte AS numbers is used when any of the two scenarios occur : -// - An old BGP speaker and new BGP speaker are sending BGP Updates to one another. -// - Two old BGP speakers are sending BGP Updates to one another. -message BgpAttributesAsPathTwoByteAsPath { +// The container for pool configurations for IA type ianapd. +message Dhcpv6ServerIanapdPoolInfo { - // The AS path segments containing 2 byte AS numbers to be added in the AS Path attribute. - // By default, an empty AS path should always be included and for EBGP the sender's - // AS number should be prepended to the AS Path. - repeated BgpAttributesTwoByteAsPathSegment segments = 1; + // The pool configurations for IA types iana in ianapd. + Dhcpv6ServerPoolInfo iana = 1; + + // The pool configurations for IA types iapd in ianapd. + Dhcpv6ServerIapdPoolInfo iapd = 2; } -// Configuration for a single BGP AS path segment containing 2 byte AS numbers. -message BgpAttributesTwoByteAsPathSegment { +// Optional Dns configuration for DHCPv6 server. +message DhcpV6ServerDns { - message Type { - enum Enum { - unspecified = 0; - as_seq = 1; - as_set = 2; - as_confed_seq = 3; - as_confed_set = 4; - } - } - // AS sequence is the most common type of AS_PATH, it contains the list - // of ASNs starting with the most recent ASN being added read from left - // to right. - // The other three AS_PATH types are used for Confederations - // - AS_SET is the type of AS_PATH attribute that summarizes routes using - // using the aggregate-address command, allowing AS_PATHs to be summarized - // in the update as well. - // - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most - // recent ASN to be added reading left to right - // - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent - // in BGP Updates. - // default = Type.Enum.as_seq - optional Type.Enum type = 1; + // The primary DNS server address that is offered to DHCP clients that request this + // information through a TLV option. + // required = true + optional string primary = 1; - // The 2 byte AS numbers in this AS path segment. - repeated uint32 as_numbers = 2; + // DHCP server secondary dns configuration options. If included secondary DNS server + // address will be offered to + // DHCP clients that request this information through a TLV option. + repeated DhcpV6ServerSecondaryDns secondary_dns = 2; } -// The AS4_PATH attribute identifies the autonomous systems through which routing information -// carried in this UPDATE message has passed. -// This contains the configuration of how to include the Local AS in the AS path -// attribute of the MP REACH NLRI. It also contains optional configuration of -// additional AS Path Segments that can be included in the AS Path attribute. -// The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that -// a routing information passes through to reach the destination. -// AS4_PATH is only exchanged in two scenarios: -// - When an old BGP speaker has to forward a received AS4_PATH containing 4 byte AS -// numbers to new BGP speaker. -// - When a new BGP speaker is connected to an old BGP speaker and has to propagate -// 4 byte AS numbers via the old BGP speaker. -// Its usage is described in RFC4893. -message BgpAttributesAs4Path { +// Advanced Dns configuration for DHCPv6 server. +message DhcpV6ServerSecondaryDns { - // The AS path segments containing 4 byte AS numbers to be added in the AS4_PATH attribute. - repeated BgpAttributesFourByteAsPathSegment segments = 1; + // The secondary DNS server address that is offered to DHCP clients that request this + // information through a TLV option. + optional string ip = 1; } -// Optional AGGREGATOR attribute which maybe be added by a BGP speaker which performs -// route aggregation. -// When AGGREGATOR attribute is being sent to a new BGP speaker , the AS number is encoded -// as a 4 byte value. -// When AGGREGATOR attribute is being exchanged between a new and an old BGP speaker -// or between two old BGP speakers, -// the AS number is encoded as a 2 byte value. -// It contain the AS number and IP address of the speaker performing the aggregation. +// Under Review: OSPFv2 is currently under review for pending exploration on use cases. // -message BgpAttributesAggregator { +// Under Review: OSPFv2 is currently under review for pending exploration on use cases. +// +// A container of properties for an OSPFv2 router and its interfaces & Route Ranges. +message DeviceOspfv2Router { + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 1; + + // OSPFv2 Router Id. + Ospfv2RouterId router_id = 2; + + // The time in seconds for LSA retransmission. + // default = 5 + optional uint32 lsa_retransmit_time = 3; + + // The time in seconds required for LSA refresh. + // default = 1800 + optional uint32 lsa_refresh_time = 4; + + // The gap in miliseconds between each Flood Link State Update Burst + // default = 33 + optional uint32 inter_burst_lsu_interval = 5; + + // The maximum number of Flood LSUpdates for each burst + // default = 1 + optional uint32 max_flood_lsu_per_burst = 6; + + // Description missing in models + Ospfv2GracefulRestart graceful_restart = 7; + + // Configuration for controlling storage of OSPFv2 learned LSAs received from the neighbors. + // default = False + optional bool store_lsa = 8; + + // A router indicates the optional capabilities that it supports in its OSPF Hello packets, + // Database Description packets and in its LSAs. + Ospfv2Options capabilities = 9; + + // List of OSPFv2 interfaces for this router. + repeated Ospfv2Interface interfaces = 10; + + // Emulated OSPFv4 IPv4 routes. + repeated Ospfv2V4RouteRange v4_routes = 11; +} + +// Container for OSPFv2 Router ID configuration. +message Ospfv2RouterId { message Choice { enum Enum { unspecified = 0; - four_byte_as = 1; - two_byte_as = 2; + interface_ip = 1; + custom = 2; } } - // Description missing in models - // default = Choice.Enum.four_byte_as + // IP address of Router ID for this emulated OSPFv2 router. + // - interface_ip: When IPv4 interface address to be assigned as Router ID. + // - custom: When, Router ID needs to be configured different from Interface IPv4 address. + // default = Choice.Enum.interface_ip optional Choice.Enum choice = 1; - // The value of the 4 byte AS number of the BGP speaker which aggregated the route. - // If the value of the AS number is less than 2 octets ( 65535 or less), the AS4_AGGREGATOR - // object should not be sent. - // default = 65536 - optional uint32 four_byte_as = 2; + // Router ID in IPv4 address format. + optional string custom = 3; +} - // The value of the 2 byte AS number of the BGP speaker which aggregated the route. - // - // default = 1 - optional uint32 two_byte_as = 3; +// The OSPFv2 Options field is present Database Description packets and all LSAs. +// This enables OSPF routers to support (or not support) optional capabilities, +// and to communicate their capability level to other OSPF routers. +// When capabilities are exchanged in Database Description packets a +// router can choose not to forward certain LSAs to a neighbor because +// of its reduced functionality. +// Reference: A.2 The Options field: https://www.rfc-editor.org/rfc/rfc2328#page-46. +message Ospfv2Options { - // The IPv4 address of the BGP speaker which aggregated the route. - // default = 0.0.0.0 - optional string ipv4_address = 4; + // Type of Service: 0th-bit: describes OSPFv2's TOS capability. + // default = False + optional bool t_bit = 1; + + // External Capability: 1st-bit: describes the way AS-external-LSAs are flooded. + // default = False + optional bool e_bit = 2; + + // Multicast Capability: 2nd-bit: describes whether IP multicast datagrams are forwarded + // according to the specifications in [Ref18], rfc2328. + // default = False + optional bool mc_bit = 3; + + // NSSA Capability: 3rd-bit: describes the handling of Type-7 LSAs, as specified in + // [Ref19], rfc2328. + // default = False + optional bool np_bit = 4; + + // External Attribute: 4th-bit: describes the router's willingness to receive and forward + // External-Attributes-LSAs, as specified in [Ref20], rfc2328. + // default = False + optional bool ea_bit = 5; + + // Demand Circuit: 5th-bit: describes the router's handling of demand circuits, as specified + // in [Ref21], rfc2328. + // default = False + optional bool dc_bit = 6; + + // Opaque LSA's Forwarded: 6th-bit: describes the router's willingness to receive and + // forward Opaque-LSAs, rfc2370. + // default = False + optional bool o_bit = 7; + + // Opaque LSA's Forwarded: 7th-bit: unused bit. + // default = False + optional bool unused_bit = 8; + + // Set to indicate that the router acts as an Area Border Router. + // default = False + optional bool lsa_b_bit = 9; + + // Set to indicate that the router acts as an AS Boundary Router. + // default = False + optional bool lsa_e_bit = 10; } -// Optional AS4_AGGREGATOR attribute which maybe be added by a BGP speaker in one of -// two cases: -// - If it is a new BGP speaker speaking to an old BGP speaker and needs to send a 4 -// byte value for the AS number of the BGP route aggregator. -// - If it is a old BGP speaker speaking to a new BGP speaker and has to transparently -// forward a received AS4_AGGREGATOR from some other peer. -// Its usage is described in RFC4893. -message BgpAttributesAs4Aggregator { +// Container of properties of OSPFv2 Graceful Retstart. +message Ospfv2GracefulRestart { - // The value of the 4 byte AS number of the BGP speaker which aggregated the route. + // Support of Graceful Restart in Helper Mode. + // default = False + optional bool helper_mode = 1; +} + +// Configuration for single OSPFv2 interface. +message Ospfv2Interface { + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 1; + + // The globally unique name of the IPv4 interface connected to the DUT. // - optional uint32 as_num = 1; + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // required = true + optional string ipv4_name = 2; - // The IPv4 address of the BGP speaker which aggregated the route. - // default = 0.0.0.0 - optional string ipv4_address = 2; + // The Area ID of the area to which the attached network belongs. + // All routing protocol packets originating from the interface are + // labelled with this Area ID. + Ospfv2InterfaceArea area = 3; + + // The OSPF network link type. + Ospfv2InterfaceNetworkType network_type = 4; + + // Contains a list of Traffic Engineering attributes. + repeated LinkStateTE traffic_engineering = 5; + + // OSPFv2 authentication properties. + // If the authentication is not configured, none OSPF packet exchange is authenticated. + Ospfv2InterfaceAuthentication authentication = 6; + + // Optional container for advanced interface properties. + Ospfv2InterfaceAdvanced advanced = 7; + + // Link protection on the OSPFv2 link between two interfaces. + Ospfv2InterfaceLinkProtection link_protection = 8; + + // A Shared Risk Link Group (SRLG) is represented by a 32-bit number unique within an + // IGP (OSPFv2 and IS-IS) domain. + // An SRLG is a set of links sharing a common resource, which affects all links in the + // set if the common resource fails. + // Links share the same risk of failure and are therefore considered to belong to the + // same SRLG. + repeated uint32 srlg_values = 9; } -// The COMMUNITY attribute provide additional capability for tagging routes and for -// modifying BGP routing policy on -// upstream and downstream routers. BGP community is a 32-bit number which is broken -// into 16-bit AS number and a -// 16-bit custom value or it contains some pre-defined well known values. +// Container for OSPF Area ID identifies the routing area to which the host belongs.. // -message BgpAttributesCommunity { +message Ospfv2InterfaceArea { message Choice { enum Enum { unspecified = 0; - custom_community = 1; - no_export = 2; - no_advertised = 3; - no_export_subconfed = 4; - llgr_stale = 5; - no_llgr = 6; + id = 1; + ip = 2; } } - // The type of community AS number. - // required = true + // The OSPF Area ID identifies the routing area to which the host belongs. Area ID type + // can be following format. + // - id: A 32-bit number identifying the area. + // - ip: The Area ID in IPv4 address format. + // default = Choice.Enum.id optional Choice.Enum choice = 1; - // Description missing in models - BgpAttributesCustomCommunity custom_community = 2; -} - -// User defined COMMUNITY attribute containing 2 byte AS and custom 2 byte value defined -// by the administrator of the domain. -message BgpAttributesCustomCommunity { - - // First two octets of the community value containing a 2 byte AS number. + // The Area ID. // default = 0 - optional uint32 as_number = 1; + optional uint32 id = 2; - // Last two octets of the community value in hex. If user provides less than 4 hex - // bytes, it should be left-padded with 0s. - // default = 0000 - optional string custom = 2; + // The Area ID in IPv4 address format. + optional string ip = 3; } -// Next hop to be sent inside MP_REACH NLRI or as the NEXT_HOP attribute if advertised -// as traditional NLRI. -message BgpAttributesNextHop { +// The OSPF network link type options. +// - Point to Point: +// - Broadcast: +// - Point to Multipoint: In this case, at least a neigbor to be configured. +message Ospfv2InterfaceNetworkType { message Choice { enum Enum { unspecified = 0; - ipv4 = 1; - ipv6 = 2; - ipv6_two_addresses = 3; + broadcast = 1; + point_to_point = 2; + point_to_multipoint = 3; } } - // The type of the next HOP. - // required = true + // Description missing in models + // default = Choice.Enum.broadcast optional Choice.Enum choice = 1; - // The 4 byte IPv4 address of the next-hop from which the route was received. - // default = 0.0.0.0 - optional string ipv4 = 2; + // List of Neigbhors. + repeated Ospfv2InterfaceNeighbor point_to_multipoint = 2; +} - // The 16 byte IPv6 address of the next-hop from which the route was received. - // default = 0::0 - optional string ipv6 = 3; +// Configuration of a neighbor. +message Ospfv2InterfaceNeighbor { // Description missing in models - BgpAttributesNextHopIpv6TwoAddresses ipv6_two_addresses = 4; + optional string neighbor_ip = 1; } -// There is a specific scenario in which it is possible to receive a Global and Link -// Local address in the Next Hop -// field in a MP_REACH attribute or in the NEXT_HOP attribute(RFC2545: Section 3). -message BgpAttributesNextHopIpv6TwoAddresses { +// Contains OSPFv2 advanced properties. +message Ospfv2InterfaceAdvanced { - // The first IPv6 next hop in the 32 byte IPv6 Next Hop. - // default = 0::0 - optional string first = 1; + // The time interval, in seconds, between the Hello packets that + // the router sends on the interface. Advertised in Hello packets + // sent out this interface. + // default = 10 + optional uint32 hello_interval = 1; - // The second IPv6 next hop in the 32 byte IPv6 Next Hop. - // default = 0::0 - optional string second = 2; + // The time interval in seconds before the router's neighbors will declare + // it down, when they stop hearing the router's Hello Packets. + // Advertised in Hello packets sent out this interface. + // default = 40 + optional uint32 dead_interval = 2; + + // Routing metric associated with the interface.. + // default = 0 + optional uint32 routing_metric = 3; + + // The Priority for (Backup) Designated Router election. + // This value is used in Hello packets for the Designated Router (DR) election process. + // The default is 0, which indicates that the router will not participate in the DR + // election process. + // default = 0 + optional uint32 priority = 4; + + // If this is set to true, then the MTU received from the neighbor during Database (DB) + // Exchange + // will be validated, otherwise it will be ignored. + // + // default = True + optional bool validate_received_mtu = 5; } -// The MP_REACH attribute is an optional attribute which can be included in the attributes -// of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3. -// The following AFI / SAFI combinations are supported: -// - IPv4 Unicast with AFI as 1 and SAFI as 1 -// - IPv6 Unicast with AFI as 2 and SAFI as 1 -message BgpAttributesMpReachNlri { +// The OSPF Options field is present in OSPF Hello packets, Database Description packets +// and all LSAs. +// The Options field enables OSPF routers to support (or not support) optional capabilities, +// and to +// communicate their capability level to other OSPF routers https://datatracker.ietf.org/doc/html/rfc2328#page-46. +// When used in Hello packets, the Options field allows a router to reject a neighbor +// because of a capability mismatch. +message Ospfv2InterfaceOptions { - // Description missing in models - BgpAttributesNextHop next_hop = 1; + // Type of Service: 0th-bit: describes OSPFv2's TOS capability. + // default = False + optional bool t_bit = 1; + + // External Capability: This bit describes the way AS-external-LSAs are flooded. + // default = False + optional bool e_bit = 2; + + // Multicast Capability: This bit describes whether IP multicast datagrams are forwarded + // according to the specifications in [Ref18], rfc2328. + // default = False + optional bool mc_bit = 3; + + // NSSA Capability: This bit describes the handling of Type-7 LSAs, as specified in + // [Ref19], rfc2328. + // default = False + optional bool np_bit = 4; + + // External Attribute: This bit describes the router's willingness to receive and forward + // External-Attributes-LSAs, as specified in [Ref20], rfc2328. + // default = False + optional bool ea_bit = 5; + + // Demand Circuit: This bit describes the router's handling of demand circuits, as specified + // in [Ref21], rfc2328. + // default = False + optional bool dc_bit = 6; + + // Opaque LSA's Forwarded: This bit describes the router's willingness to receive and + // forward Opaque-LSAs, rfc2370. + // default = False + optional bool o_bit = 7; + + // Opaque LSA's Forwarded: 7th-bit: unused bit. + // default = False + optional bool unused_bit = 8; +} + +// This contains OSPFv2 authentication properties. +// Reference: https://www.rfc-editor.org/rfc/rfc2328#appendix-D +message Ospfv2InterfaceAuthentication { message Choice { enum Enum { unspecified = 0; - ipv4_unicast = 1; - ipv6_unicast = 2; + md5s = 1; + clear_text = 2; } } - // The AFI and SAFI to be sent in the MPREACH_NLRI in the Update. + // The authentication method. + // - md5 - Cryptographic authentication. + // - clear_text - Simple password authentication. A 64-bit field is configured on a + // per-network basis. + // All packets sent on a particular network must have this configured value (in clear + // text) + // in their OSPF header 64-bit authentication field. + // default = Choice.Enum.clear_text + optional Choice.Enum choice = 1; + + // List of MD5 Key IDs and MD5 Keys. + repeated Ospfv2AuthenticationMd5 md5s = 2; + + // The 8 Byte authentication field in the OSPF packet. + // default = otg + optional string clear_text = 4; +} + +// Container of Cryptographic authentication. +// If the authentication type is of 'md5' then 'md5_key_id' and 'md5_key' +// both are to be configured. A shared secret key is configured in all routers attached +// to a common network/subnet. +// For each OSPF protocol packet, the key is used to generate/verify a message digest +// that is appended to the end +// of the OSPF packet. +message Ospfv2AuthenticationMd5 { + + // The unique MD5 Key Identifier per-interface. + optional uint32 key_id = 1; + + // An alphanumeric secret used to generate the 16 byte MD5 hash value added + // to the OSPFv2 PDU in the Authentication TLV. + optional string key = 2; +} + +// Optional container for the link protection sub TLV (type 20). +message Ospfv2InterfaceLinkProtection { + + // Enable this to protect other link or links. LSAs on a link of this type are lost + // if any of the links fail. + // default = False + optional bool extra_traffic = 1; + + // Enabling this signifies that there is no other link protecting this + // link. LSAs on a link of this type are lost if the link fails. + // default = False + optional bool unprotected = 2; + + // Enable this to share the Extra Traffic links between one or more + // links of type Shared.There are one or more disjoint links of type + // Extra Traffic that are protecting this link. + // default = False + optional bool shared = 3; + + // Enabling this signifies that there is one dedicated disjoint link + // of type Extra Traffic that is protecting this link. + // default = False + optional bool dedicated_1_to_1 = 4; + + // Enabling this signifies that a dedicated disjoint link is protecting + // this link. However, the protecting link is not advertised in the + // link state database and is therefore not available for the routing + // of LSAs. + // default = False + optional bool dedicated_1_plus_1 = 5; + + // Enabling this signifies that a protection scheme that is more + // reliable than Dedicated 1+1. + // default = False + optional bool enhanced = 6; + + // This is a Protection Scheme with value 0x40. + // default = False + optional bool reserved_40 = 7; + + // This is a Protection Scheme with value 0x80. + // default = False + optional bool reserved_80 = 8; +} + +// Emulated OSPFv2 IPv4 routes. +message Ospfv2V4RouteRange { + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. // required = true - optional Choice.Enum choice = 2; + optional string name = 1; - // List of IPv4 prefixes being sent in the IPv4 Unicast MPREACH_NLRI . - repeated BgpOneIpv4NLRIPrefix ipv4_unicast = 3; + // A list of group of IPv4 route addresses. + repeated V4RouteAddress addresses = 2; - // SAFI of the NLRI being sent in the Update. - // description: >- - // List of IPv6 prefixes being sent in the IPv6 Unicast MPREACH_NLRI . - repeated BgpOneIpv6NLRIPrefix ipv6_unicast = 4; + // The user-defined metric associated with this route range. + // default = 0 + optional uint32 metric = 3; + + // The type of the OSPFv2 routes. + Ospfv2V4RRRouteOrigin route_origin = 4; } -// The MP_UNREACH attribute is an optional attribute which can be included in the attributes -// of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3. -// The following AFI / SAFI combinations are supported: -// - IPv4 Unicast with AFI as 1 and SAFI as 1 -// - IPv6 Unicast with AFI as 2 and SAFI as 1 -message BgpAttributesMpUnreachNlri { +// Container of type of the OSPFv2 types correspond directly to the OSPFv2 LSAs types +// as +// defined in the OSPFv2 Link State (LS) Type - http://www.iana.org/assignments/ospfv2-parameters. +// +message Ospfv2V4RRRouteOrigin { message Choice { enum Enum { unspecified = 0; - ipv4_unicast = 1; - ipv6_unicast = 2; + intra_area = 1; + inter_area = 2; + external_type_1 = 3; + external_type_2 = 4; + nssa_external = 5; } } - // The AFI and SAFI to be sent in the MPUNREACH_NLRI in the Update. + // Supported types are: - intra_area: for Intra-Area. - inter_area: for Inter Area. + // - external_type_1: for Autonomous System (AS) External with internal AS meteric. + // - external_type_2: for Autonomous System (AS) External with internal and external + // AS meteric. - nssa_external: for 7 Not-So-Stubby Area (NSSA) External. + // default = Choice.Enum.inter_area optional Choice.Enum choice = 1; - // List of IPv4 prefixes being sent in the IPv4 Unicast MPUNREACH_NLRI . - repeated BgpOneIpv4NLRIPrefix ipv4_unicast = 2; + // Configuration for the Intra-Area. + Ospfv2V4RRIntraArea intra_area = 2; - // SAFI of the NLRI being sent in the Update. - // description: >- - // List of IPv6 prefixes being sent in the IPv6 Unicast MPUNREACH_NLRI . - repeated BgpOneIpv6NLRIPrefix ipv6_unicast = 3; + // Configuration for the Intra-Area. + Ospfv2V4RRInterArea inter_area = 3; + + // Configuration for the External Type 1. + Ospfv2V4RRExternalType1 external_type_1 = 4; + + // Configuration for the External Type 2. + Ospfv2V4RRExternalType2 external_type_2 = 5; + + // Configuration for the External Type 2. + Ospfv2V4RRNssaExternal nssa_external = 6; } -// Optional MULTI_EXIT_DISCRIMINATOR attribute sent to the peer to help in the route -// selection process. -message BgpAttributesMultiExitDiscriminator { +// Container for Intra-Area. +message Ospfv2V4RRIntraArea { - // The multi exit discriminator (MED) value used for route selection sent to the peer. + // One-octet field contains flags applicable to the prefix. + Ospfv2V4RRExtdPrefixFlags flags = 1; +} + +// Container for Intra-Area. +message Ospfv2V4RRInterArea { + + // One-octet field contains flags applicable to the prefix. + Ospfv2V4RRExtdPrefixFlags flags = 1; +} + +// Container for Intra-Area. +message Ospfv2V4RRExternalType1 { + + // One-octet field contains flags applicable to the prefix. + Ospfv2V4RRExtdPrefixFlags flags = 1; +} + +// Container for Intra-Area. +message Ospfv2V4RRExternalType2 { + + // One-octet field contains flags applicable to the prefix. + Ospfv2V4RRExtdPrefixFlags flags = 1; +} + +// Container for Intra-Area. +message Ospfv2V4RRNssaExternal { + + // One-octet field contains flags applicable to the prefix. + Ospfv2V4RRExtdPrefixFlags flags = 1; + + // The flag is set True if LSA will be propagated between Areas. + // default = False + optional bool propagation = 2; +} + +// One-octet field contains flags applicable to the prefix. https://datatracker.ietf.org/doc/html/rfc7684. +message Ospfv2V4RRExtdPrefixFlags { + + // 0x80 - (Attach Flag): An Area Border Router (ABR) + // generating an OSPFv2 Extended Prefix TLV for an inter-area + // prefix that is locally connected or attached in another + // connected area SHOULD set this flag. + // default = False + optional bool a_flag = 1; + + // N-Flag (Node Flag): Set when the prefix identifies the + // advertising router, i.e., the prefix is a host prefix + // advertising a globally reachable address typically associated + // with a loopback address. + // default = False + optional bool n_flag = 2; +} + +// A high level data plane traffic flow. +message Flow { + + // The transmit and receive endpoints. + // required = true + FlowTxRx tx_rx = 1; + + // The list of protocol headers defining the shape of all + // intended packets in corresponding flow as it is transmitted + // by traffic-generator port. // - // default = 0 - optional uint32 value = 1; + // The order of protocol headers assigned to the list is the + // order they will appear on the wire. + // + // In the case of an empty list the keyword/value of minItems: 1 + // indicates that an implementation MUST provide at least one + // Flow.Header object. + // + // The default value for the Flow.Header choice property is ethernet + // which will result in an implementation by default providing at least + // one ethernet packet header. + repeated FlowHeader packet = 2; + + // Under Review: The packet header schema for egress tracking currently exposes unwanted + // fields. The query structure for tagged metrics inside flows metrics requires documenting + // expected response format. + // + // Under Review: The packet header schema for egress tracking currently exposes unwanted + // fields. The query structure for tagged metrics inside flows metrics requires documenting + // expected response format. + // + // The list of protocol headers defining the shape of all + // intended packets in corresponding flow as it is received + // by traffic-generator port. + // + // For all protocol headers, only the `metric_tags` property is configurable. + repeated FlowHeader egress_packet = 9; + + // The size of the packets. + FlowSize size = 3; + + // The transmit rate of the packets. + FlowRate rate = 4; + + // The transmit duration of the packets. + FlowDuration duration = 5; + + // Flow metrics. + FlowMetrics metrics = 6; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 7; } -// Optional LOCAL_PREFERENCE attribute sent to the peer to indicate the degree of preference -// -// for externally learned routes.This should be included only for internal peers.It -// is -// used for the selection of the path for the traffic leaving the AS.The route with -// the -// highest local preference value is preferred. -message BgpAttributesLocalPreference { +// A container for different types of transmit and receive +// endpoint containers. +message FlowTxRx { - // Value to be set in the LOCAL_PREFERENCE attribute The multi exit discriminator (MED) - // value used for route selection sent to the peer. - // default = 100 - optional uint32 value = 1; -} + message Choice { + enum Enum { + unspecified = 0; + port = 1; + device = 2; + } + } + // The type of transmit and receive container used by the flow. + // default = Choice.Enum.port + optional Choice.Enum choice = 1; -// Optional ORIGINATOR_ID attribute (type code 9) carries the Router Id of the route's -// originator in the local AS. -message BgpAttributesOriginatorId { + // Description missing in models + FlowPort port = 2; - // The value of the originator's Router Id. - // default = 0.0.0.0 - optional string value = 1; + // Description missing in models + FlowRouter device = 3; } -// Configuration for BGPv6 peer settings and routes. -message BgpV6Peer { +// A container for a transmit port and 0..n intended receive ports. +// When assigning this container to a flow the flows's +// packet headers will not be populated with any address resolution +// information such as source and/or destination addresses. +// For example Flow.Ethernet dst mac address values will be defaulted to 0. +// For full control over the Flow.properties.packet header contents use this +// container. +message FlowPort { - // IPv6 address of the BGP peer for the session + // The unique name of a port that is the transmit port. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Lag/properties/name + // + // + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Lag/properties/name + // // required = true - optional string peer_address = 1; - - // Description missing in models - BgpV6SegmentRouting segment_routing = 2; + optional string tx_name = 1; - // This contains the list of Ethernet Virtual Private Network (EVPN) Ethernet Segments - // (ES) Per BGP Peer for IPv6 Address Family Identifier (AFI). + // Deprecated: This property is deprecated in favor of property rx_names // - // Each Ethernet Segment contains a list of EVPN Instances (EVIs) . - // Each EVI contains a list of Broadcast Domains. - // Each Broadcast Domain contains a list of MAC/IP Ranges. + // Deprecated: This property is deprecated in favor of property rx_names // - // is responsible for advertising Ethernet - // Auto-discovery Route Per EVI (Type 1). + // The unique name of a port that is the intended receive port. // - // is responsible for advertising Ethernet Auto-discovery Route - // Per Ethernet Segment (Type 1). + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Lag/properties/name // - // is responsible for advertising - // MAC/IP Advertisement Route (Type 2). // - // is responsible for advertising Inclusive - // Multicast Ethernet Tag Route (Type 3). + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Lag/properties/name // - // Ethernet Segment is responsible for advertising Ethernet Segment Route (Type 4). - repeated BgpV6EthernetSegment evpn_ethernet_segments = 3; + optional string rx_name = 2; - message AsType { + // Unique name of ports or lags that are intended receive endpoints. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Lag/properties/name + // + // + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Lag/properties/name + // + repeated string rx_names = 3; +} + +// A container for declaring a map of 1..n transmit devices to 1..n receive devices. +// This allows for a single flow to have different tx to rx device flows such as a +// single one to one map or a many to many map. +message FlowRouter { + + message Mode { enum Enum { unspecified = 0; - ibgp = 1; - ebgp = 2; + mesh = 1; + one_to_one = 2; } } - // The type of BGP autonomous system. External BGP is used for BGP links between two - // or more autonomous systems (ebgp). Internal BGP is used within a single autonomous - // system (ibgp). BGP property defaults are aligned with this object defined as an internal - // BGP peer. If the as_type is specified as 'ebgp' then other properties will need to - // be specified as per an external BGP peer. Specifically, for 'ebgp', 'as_set_mode' - // attribute in 'as_path' field in any Route Range should be changed from default value - // 'do_not_include_local_as' to any other value. - // required = true - optional AsType.Enum as_type = 4; + // Determines the intent of creating traffic sub-flow(s) between the device + // endpoints, from the entities of tx_names to the entities of rx_names + // + // to derive how auto packet fields can be populated with + // the actual value(s) by the implementation. + // + // The one_to_one mode creates traffic sub-flow(s) between each device endpoint + // pair in + // tx_names to rx_names by index. + // The length of tx_names and rx_names MUST be the same. + // The same device name can be repeated multiple times in tx_names or rx_names, in any + // order to create desired meshing between device(s). + // For 2 values in tx_names and 2 values in rx_names, 2 device endpoint pairs would + // be generated (each pair representing a traffic sub-flow). + // + // The mesh mode creates traffic sub-flow(s) between each value in tx_names to + // every value in rx_names, forming the device endpoint pair(s). + // For 2 values in tx_names and 3 values in rx_names, generated device endpoint pairs + // would be 2x3=6. + // + // A generated device endpoint pair with same device endpoint name for both transmit + // & receive device endpoint MUST raise an error. + // + // Packet fields of type auto would be populated with one value for each device + // endpoint pair (representing the traffic sub-flow). + // The value would be determined considering transmit & receive device of the sub-flow. + // And the sequence of the populated value(s) + // would be in the order of generated device endpoint pair(s). + // If 2 device endpoint pairs are generated (based on mode, tx_names and rx_names), + // say (d1 to d3) and (d2 to d3), and ethernet.dst is set as auto, then + // the auto field would be replaced by the implementation with a sequence of + // 2 values, [v1,v2] where + // v1 is determined using context (d1,d3) and v2 using context (d2,d3). + // The final outcome is that packets generated on the wire will contain the values v1,v2,v1,... + // for ethernet.dst field. Any non-auto packet fields + // should be configured accordingly. For example, non-auto packet field ethernet.src + // can be configured with values [u1, u2], where + // u1 & u2 are source MAC of the connected interface of device d1 and d2 respectively. + // Then packets on the wire will contain correct value pairs + // (u1,v1),(u2,v2),(u1,v1),... for (ethernet.src,ethernet.dst) fields. + // default = Mode.Enum.mesh + optional Mode.Enum mode = 1; - // Autonomous System Number (AS number or ASN) - // required = true - optional uint32 as_number = 5; + // TBD + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Bgp.V4RouteRange/properties/name + // - /components/schemas/Bgp.V6RouteRange/properties/name + // - /components/schemas/Bgp.CMacIpRange/properties/name + // - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name + // - /components/schemas/Isis.V4RouteRange/properties/name + // - /components/schemas/Isis.V6RouteRange/properties/name + // - /components/schemas/Ospfv2.V4RouteRange/properties/name + // - /components/schemas/Device.Dhcpv4client/properties/name + // - /components/schemas/Device.Dhcpv6client/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Bgp.V4RouteRange/properties/name + // - /components/schemas/Bgp.V6RouteRange/properties/name + // - /components/schemas/Bgp.CMacIpRange/properties/name + // - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name + // - /components/schemas/Isis.V4RouteRange/properties/name + // - /components/schemas/Isis.V6RouteRange/properties/name + // - /components/schemas/Ospfv2.V4RouteRange/properties/name + // - /components/schemas/Device.Dhcpv4client/properties/name + // - /components/schemas/Device.Dhcpv6client/properties/name + // + repeated string tx_names = 2; - message AsNumberWidth { + // TBD + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Bgp.V4RouteRange/properties/name + // - /components/schemas/Bgp.V6RouteRange/properties/name + // - /components/schemas/Bgp.CMacIpRange/properties/name + // - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name + // - /components/schemas/Isis.V4RouteRange/properties/name + // - /components/schemas/Isis.V6RouteRange/properties/name + // - /components/schemas/Device.Dhcpv4client/properties/name + // - /components/schemas/Ospfv2.V4RouteRange/properties/name + // - /components/schemas/Device.Dhcpv6client/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Bgp.V4RouteRange/properties/name + // - /components/schemas/Bgp.V6RouteRange/properties/name + // - /components/schemas/Bgp.CMacIpRange/properties/name + // - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name + // - /components/schemas/Isis.V4RouteRange/properties/name + // - /components/schemas/Isis.V6RouteRange/properties/name + // - /components/schemas/Device.Dhcpv4client/properties/name + // - /components/schemas/Ospfv2.V4RouteRange/properties/name + // - /components/schemas/Device.Dhcpv6client/properties/name + // + repeated string rx_names = 3; +} + +// Configuration for all traffic packet headers +message FlowHeader { + + message Choice { enum Enum { unspecified = 0; - two = 1; - four = 2; + custom = 1; + ethernet = 2; + vlan = 3; + vxlan = 4; + ipv4 = 5; + ipv6 = 6; + pfcpause = 7; + ethernetpause = 8; + tcp = 9; + udp = 10; + gre = 11; + gtpv1 = 12; + gtpv2 = 13; + arp = 14; + icmp = 15; + icmpv6 = 16; + ppp = 17; + igmpv1 = 18; + mpls = 19; + snmpv2c = 20; + rsvp = 21; } } - // The width in bytes of the as_number values. Any as_number values that exceeds the - // width MUST result in an error. - // default = AsNumberWidth.Enum.four - optional AsNumberWidth.Enum as_number_width = 6; + // The available types of flow headers. If one is not provided the + // default ethernet packet header MUST be provided. + // default = Choice.Enum.ethernet + optional Choice.Enum choice = 1; // Description missing in models - BgpAdvanced advanced = 7; + FlowCustom custom = 2; // Description missing in models - BgpCapability capability = 8; + FlowEthernet ethernet = 3; // Description missing in models - BgpLearnedInformationFilter learned_information_filter = 9; - - // Emulated BGPv4 route ranges. - repeated BgpV4RouteRange v4_routes = 10; + FlowVlan vlan = 4; - // Emulated BGPv6 route ranges. - repeated BgpV6RouteRange v6_routes = 11; + // Description missing in models + FlowVxlan vxlan = 5; - // Segment Routing Traffic Engineering (SR TE) Policies for IPv4 Address Family Identifier - // (AFI). - repeated BgpSrteV4Policy v4_srte_policies = 12; + // Description missing in models + FlowIpv4 ipv4 = 6; - // Segment Routing Traffic Engineering (SR TE) Policies for IPv6 Address Family Identifier - // (AFI). - repeated BgpSrteV6Policy v6_srte_policies = 13; + // Description missing in models + FlowIpv6 ipv6 = 7; - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 14; + // Description missing in models + FlowPfcPause pfcpause = 8; // Description missing in models - BgpGracefulRestart graceful_restart = 15; + FlowEthernetPause ethernetpause = 9; - // BGP Updates to be sent to the peer as specified after the session is established. - // - BgpUpdateReplay replay_updates = 16; -} + // Description missing in models + FlowTcp tcp = 10; -// Configuration for emulated BGPv6 peers and routes on a single IPv6 interface. -message BgpV6Interface { + // Description missing in models + FlowUdp udp = 11; - // The unique name of IPv6 or Loopback IPv6 interface used as the source IP for this - // list of BGP peers. - // - // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Device.Ipv6Loopback/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Device.Ipv6Loopback/properties/name - // - // required = true - optional string ipv6_name = 1; + // Description missing in models + FlowGre gre = 12; - // This contains the list of BGPv6 peers configured on this interface. - repeated BgpV6Peer peers = 2; -} + // Description missing in models + FlowGtpv1 gtpv1 = 13; -// Configuration for BGPv6 segment routing settings. -message BgpV6SegmentRouting { + // Description missing in models + FlowGtpv2 gtpv2 = 14; - // TBD - // default = False - optional bool ingress_supports_vpn = 1; + // Description missing in models + FlowArp arp = 15; - // TBD - // default = False - optional bool reduced_encapsulation = 2; + // Description missing in models + FlowIcmp icmp = 16; - // TBD - // default = False - optional bool copy_time_to_live = 3; + // Description missing in models + FlowIcmpv6 icmpv6 = 17; - // TBD - // default = 0 - optional uint32 time_to_live = 4; + // Description missing in models + FlowPpp ppp = 18; - // TBD - // default = 0 - optional uint32 max_sids_per_srh = 5; + // Description missing in models + FlowIgmpv1 igmpv1 = 19; - // TBD - // default = False - optional bool auto_generate_segment_left_value = 6; + // Description missing in models + FlowMpls mpls = 20; - // TBD - // default = 0 - optional uint32 segment_left_value = 7; + // Description missing in models + FlowSnmpv2c snmpv2c = 21; - // TBD - // default = False - optional bool advertise_sr_te_policy = 8; + // Description missing in models + FlowRsvp rsvp = 22; } -// Configuration for BGP Ethernet Segment ranges. Advertises following routes - -// -// Type 4 - Ethernet Segment Route -message BgpV6EthernetSegment { +// Custom packet header +message FlowCustom { - // Designated Forwarder (DF) election configuration. - BgpEthernetSegmentDfElection df_election = 1; + // A custom packet header defined as a string of hex bytes. The string MUST contain + // sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be + // discarded. This packet header can be used in multiple places in the packet. + // required = true + optional string bytes = 1; - // This contains the list of EVIs. - repeated BgpV6EvpnEvis evis = 2; + // One or more metric tags can be used to enable tracking portion of or all bits + // in a corresponding header field for metrics per each applicable value. + // These would appear as tagged metrics in corresponding flow metrics. + repeated FlowCustomMetricTag metric_tags = 2; +} - // 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero - // ESI is '10000000000000000000' . - // default = 00000000000000000000 - optional string esi = 3; +// Metric Tag can be used to enable tracking portion of or all bits +// in a corresponding header field for metrics per each applicable value. +// These would appear as tagged metrics in corresponding flow metrics. +message FlowCustomMetricTag { - message ActiveMode { - enum Enum { - unspecified = 0; - single_active = 1; - all_active = 2; - } - } - // Single Active or All Active mode Redundancy mode selection for Multi-home. - // default = ActiveMode.Enum.all_active - optional ActiveMode.Enum active_mode = 4; + // Name used to identify the metrics associated with the values applicable + // for configured offset and length inside corresponding header field + // required = true + optional string name = 1; - // The label value to be advertised as ESI Label in ESI Label Extended Community. This - // is included in Ethernet Auto-discovery per ES Routes advertised by a router. + // Offset in bits relative to start of corresponding header field // default = 0 - optional uint32 esi_label = 5; + optional uint32 offset = 2; + + // Number of bits to track for metrics starting from configured offset + // of corresponding header field + // default = 1 + optional uint32 length = 3; +} + +// Ethernet packet header +message FlowEthernet { // Description missing in models - BgpRouteAdvanced advanced = 6; + PatternFlowEthernetDst dst = 1; - // Optional community settings. - repeated BgpCommunity communities = 7; + // Description missing in models + PatternFlowEthernetSrc src = 2; - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. - repeated BgpExtCommunity ext_communities = 8; + // Description missing in models + PatternFlowEthernetEtherType ether_type = 3; - // Optional AS PATH settings. - BgpAsPath as_path = 9; + // Description missing in models + PatternFlowEthernetPfcQueue pfc_queue = 4; } -// This contains a list of different flavors of EVPN. -// For example EVPN over VXLAN or EVPN over MPLS etc to be configured per Ethernet segment. -// -// Need to instantiate correct type of EVPN instance as per requirement. -message BgpV6EvpnEvis { +// VLAN packet header +message FlowVlan { - message Choice { - enum Enum { - unspecified = 0; - evi_vxlan = 1; - } - } // Description missing in models - // default = Choice.Enum.evi_vxlan - optional Choice.Enum choice = 1; + PatternFlowVlanPriority priority = 1; - // EVPN VXLAN instance to be configured per Ethernet Segment. - BgpV6EviVxlan evi_vxlan = 2; + // Description missing in models + PatternFlowVlanCfi cfi = 2; + + // Description missing in models + PatternFlowVlanId id = 3; + + // Description missing in models + PatternFlowVlanTpid tpid = 4; } -// Configuration for BGP EVPN EVI. Advertises following routes - -// -// Type 3 - Inclusive Multicast Ethernet Tag Route -// -// Type 1 - Ethernet Auto-discovery Route (Per EVI) -// -// Type 1 - Ethernet Auto-discovery Route (Per ES) -message BgpV6EviVxlan { +// VXLAN packet header +message FlowVxlan { - // This contains the list of Broadcast Domains to be configured per EVI. - repeated BgpV6EviVxlanBroadcastDomain broadcast_domains = 1; + // Description missing in models + PatternFlowVxlanFlags flags = 1; - message ReplicationType { - enum Enum { - unspecified = 0; - ingress_replication = 1; - } - } - // This model only supports Ingress Replication - // default = ReplicationType.Enum.ingress_replication - optional ReplicationType.Enum replication_type = 2; + // Description missing in models + PatternFlowVxlanReserved0 reserved0 = 2; + + // Description missing in models + PatternFlowVxlanVni vni = 3; - // Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel - // attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. - // default = 16 - optional uint32 pmsi_label = 3; + // Description missing in models + PatternFlowVxlanReserved1 reserved1 = 4; +} - // The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet - // Auto-discovery Route per - // default = 0 - optional uint32 ad_label = 4; +// IPv4 packet header +message FlowIpv4 { - // Colon separated Extended Community value of 6 Bytes - AS number: Value identifying - // an EVI. Example - for the as_2octet 60005:100. - BgpRouteDistinguisher route_distinguisher = 5; + // Description missing in models + PatternFlowIpv4Version version = 1; - // List of Layer 2 Virtual Network Identifier (L2VNI) export targets associated with - // this EVI. - repeated BgpRouteTarget route_target_export = 6; + // Description missing in models + PatternFlowIpv4HeaderLength header_length = 2; - // List of L2VNI import targets associated with this EVI. - repeated BgpRouteTarget route_target_import = 7; + // Description missing in models + FlowIpv4Priority priority = 3; - // List of Layer 3 Virtual Network Identifier (L3VNI) Export Route Targets. - repeated BgpRouteTarget l3_route_target_export = 8; + // Description missing in models + PatternFlowIpv4TotalLength total_length = 4; - // List of L3VNI Import Route Targets. - repeated BgpRouteTarget l3_route_target_import = 9; + // Description missing in models + PatternFlowIpv4Identification identification = 5; // Description missing in models - BgpRouteAdvanced advanced = 10; + PatternFlowIpv4Reserved reserved = 6; - // Optional community settings. - repeated BgpCommunity communities = 11; + // Description missing in models + PatternFlowIpv4DontFragment dont_fragment = 7; - // Optional Extended Community settings. The Extended Communities Attribute is a transitive - // optional BGP attribute, with the Type Code 16. Community and Extended Communities - // attributes are utilized to trigger routing decisions, such as acceptance, rejection, - // preference, or redistribution. An extended community is an 8-Bytes value. It is - // divided into two main parts. The first 2 Bytes of the community encode a type and - // sub-type fields and the last 6 Bytes carry a unique set of data in a format defined - // by the type and sub-type field. Extended communities provide a larger range for - // grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, - // the valid sub types are route target and origin. The valid value for administrator_as_2octet - // and administrator_as_4octet type is either two byte AS followed by four byte local - // administrator id or four byte AS followed by two byte local administrator id. When - // type is administrator_ipv4_address the valid sub types are route target and origin. - // The valid value for administrator_ipv4_address is a four byte IPv4 address followed - // by a two byte local administrator id. When type is opaque, valid sub types are color - // and encapsulation. When sub type is color, first two bytes of the value field contain - // flags and last four bytes contains the value of the color. When sub type is encapsulation - // the first four bytes of value field are reserved and last two bytes carries the tunnel - // type from IANA's ETHER TYPES registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol - // type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth - // the valid sub type is extended_bandwidth. The first two bytes of the value field - // contains the AS number and the last four bytes contains the bandwidth in IEEE floating - // point format. When type is evpn the valid subtype is mac_address. In the value field - // the low-order bit of the first byte(Flags) is defined as the Sticky/static flag and - // may be set to 1, indicating the MAC address is static and cannot move. The second - // byte is reserved and the last four bytes contain the sequence number which is used - // to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates - // occur for the same MAC address. - repeated BgpExtCommunity ext_communities = 12; + // Description missing in models + PatternFlowIpv4MoreFragments more_fragments = 8; - // Optional AS PATH settings. - BgpAsPath as_path = 13; -} + // Description missing in models + PatternFlowIpv4FragmentOffset fragment_offset = 9; -// Configuration for Broadcast Domains per EVI. -message BgpV6EviVxlanBroadcastDomain { + // Description missing in models + PatternFlowIpv4TimeToLive time_to_live = 10; - // This contains the list of Customer MAC/IP Ranges to be configured per Broadcast Domain. - // - // - // Advertises following route - - // Type 2 - MAC/IP Advertisement Route. - repeated BgpCMacIpRange cmac_ip_range = 1; + // Description missing in models + PatternFlowIpv4Protocol protocol = 11; - // The Ethernet Tag ID of the Broadcast Domain. - // default = 0 - optional uint32 ethernet_tag_id = 2; + // Description missing in models + PatternFlowIpv4HeaderChecksum header_checksum = 12; - // VLAN-Aware service to be enabled or disabled. - // default = False - optional bool vlan_aware_service = 3; + // Description missing in models + PatternFlowIpv4Src src = 13; + + // Description missing in models + PatternFlowIpv4Dst dst = 14; + + // Description missing in models + repeated FlowIpv4Options options = 15; } -// Description missing in models -message DeviceVxlan { +// IPv4 options are optional extensions for the IPv4 header that can be utilised to +// provide additional information about the IPv4 datagram. It is encoded as a series +// of type, length and value attributes. The IP header length MUST be increased to +// accommodate the extra bytes needed to encode the IP options. The length of the all +// options included to a IPv4 header should not exceed 40 bytes since IPv4 Header length +// (4 bits) can at max specify 15 4-word octets for a total of 60 bytes which includes +// 20 bytes needed for mandatory attributes of the IPv4 header. If the user adds multiples +// IPv4 options that exceeds 40 bytes and specify header length as auto, implementation +// should throw error. Currently IP options supported are: 1. router_alert option allows +// devices to intercept packets not addressed to them directly as defined in RFC2113. +// 2. custom option is provided to configure user defined IP options as needed. +message FlowIpv4Options { - // IPv4 VXLAN Tunnels - repeated VxlanV4Tunnel v4_tunnels = 1; + message Choice { + enum Enum { + unspecified = 0; + router_alert = 1; + custom = 2; + } + } + // Description missing in models + // default = Choice.Enum.router_alert + optional Choice.Enum choice = 1; - // IPv6 VXLAN Tunnels - repeated VxlanV6Tunnel v6_tunnels = 2; + // Description missing in models + FlowIpv4OptionsCustom custom = 2; } -// Configuration and operational state parameters relating to IPv4 VXLAN tunnel end-point -// interface. -message VxlanV4Tunnel { - - // Determines the source interface. - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv4Loopback/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv4Loopback/properties/name - // - // required = true - optional string source_interface = 1; +// User defined IP options to be appended to the IPv4 header. +message FlowIpv4OptionsCustom { // Description missing in models - VxlanV4TunnelDestinationIPMode destination_ip_mode = 2; + FlowIpv4OptionsCustomType type = 1; - // VXLAN Network Identifier (VNI) to distinguish network instances on the wire - // required = true - optional uint32 vni = 3; + // Description missing in models + FlowIpv4OptionsCustomLength length = 2; - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 4; + // Value of the option field should not excced 38 bytes since maximum 40 bytes can be + // added as options in IPv4 header. For type and length requires 2 bytes, hence maximum + // of 38 bytes are expected. Maximum length of this attribute is 76 (38 * 2 hex character + // per byte). + // default = 0000 + optional string value = 3; } -// Configuration and operational state parameters relating to IPv6 VXLAN tunnel end-point -// interface. -message VxlanV6Tunnel { +// Type options for custom options. +message FlowIpv4OptionsCustomType { - // Determines the source interface. - // - // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Device.Ipv6Loopback/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Device.Ipv6Loopback/properties/name - // - // required = true - optional string source_interface = 1; + // Description missing in models + PatternFlowIpv4OptionsCustomTypeCopiedFlag copied_flag = 1; // Description missing in models - VxlanV6TunnelDestinationIPMode destination_ip_mode = 2; + PatternFlowIpv4OptionsCustomTypeOptionClass option_class = 2; - // VXLAN Network Identifier (VNI) to distinguish network instances on the wire - // required = true - optional uint32 vni = 3; + // Description missing in models + PatternFlowIpv4OptionsCustomTypeOptionNumber option_number = 3; +} - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 4; +// Length for custom options. +message FlowIpv4OptionsCustomLength { + + message Choice { + enum Enum { + unspecified = 0; + auto = 1; + value = 2; + } + } + // auto or configured value. + // default = Choice.Enum.auto + optional Choice.Enum choice = 1; + + // The OTG implementation can provide a system generated value for this property. If + // the OTG is unable to generate a value the default value must be used. + // default = 0 + optional uint32 auto = 2; + + // Description missing in models + // default = 0 + optional uint32 value = 3; } -// Communication mode between the VTEPs, either unicast or multicast. -message VxlanV4TunnelDestinationIPMode { +// A container for ipv4 raw, tos, dscp ip priorities. +message FlowIpv4Priority { message Choice { enum Enum { unspecified = 0; - unicast = 1; - multicast = 2; + raw = 1; + tos = 2; + dscp = 3; } } - // unicast or multicast - // default = Choice.Enum.multicast + // Description missing in models + // default = Choice.Enum.dscp optional Choice.Enum choice = 1; // Description missing in models - VxlanV4TunnelDestinationIPModeUnicast unicast = 2; + PatternFlowIpv4PriorityRaw raw = 2; + + // Description missing in models + FlowIpv4Tos tos = 3; + + // Description missing in models + FlowIpv4Dscp dscp = 4; +} + +// Differentiated services code point (DSCP) packet field. +message FlowIpv4Dscp { + + // Description missing in models + PatternFlowIpv4DscpPhb phb = 1; // Description missing in models - VxlanV4TunnelDestinationIPModeMulticast multicast = 3; + PatternFlowIpv4DscpEcn ecn = 2; } -// Communication mode between the VTEPs, either unicast or multicast. -message VxlanV6TunnelDestinationIPMode { +// Type of service (TOS) packet field. +message FlowIpv4Tos { - message Choice { - enum Enum { - unspecified = 0; - unicast = 1; - multicast = 2; - } - } - // unicast or multicast - // default = Choice.Enum.multicast - optional Choice.Enum choice = 1; + // Description missing in models + PatternFlowIpv4TosPrecedence precedence = 1; // Description missing in models - VxlanV6TunnelDestinationIPModeUnicast unicast = 2; + PatternFlowIpv4TosDelay delay = 2; // Description missing in models - VxlanV6TunnelDestinationIPModeMulticast multicast = 3; -} + PatternFlowIpv4TosThroughput throughput = 3; -// Description missing in models -message VxlanV4TunnelDestinationIPModeUnicast { + // Description missing in models + PatternFlowIpv4TosReliability reliability = 4; - // List of VTEPs for member VNI(VXLAN Network Identifier) - repeated VxlanV4TunnelDestinationIPModeUnicastVtep vteps = 1; + // Description missing in models + PatternFlowIpv4TosMonetary monetary = 5; + + // Description missing in models + PatternFlowIpv4TosUnused unused = 6; } -// Description missing in models -message VxlanV6TunnelDestinationIPModeUnicast { +// The OTG implementation can provide a system generated, value for this property. +message FlowIpv4Auto { - // List of VTEPs for member VNI(VXLAN Network Identifier) - repeated VxlanV6TunnelDestinationIPModeUnicastVtep vteps = 1; + message Choice { + enum Enum { + unspecified = 0; + dhcp = 1; + } + } + // The method to be used to provide the system generated value. + // + // The dhcp option populates the field based on the dynamic IPv4 address that has been + // assigned to the DHCPv4 client by a DHCPv4 server. + // required = true + optional Choice.Enum choice = 1; } -// Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated -// MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request -// for another end-host IP address, its local VTEP intercepts the ARP request and checks -// for the ARP-resolved IP address in its ARP suppression cache table. If it finds -// a match, the local VTEP sends an ARP response on behalf of the remote end host. -message VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { +// IPv6 packet header +message FlowIpv6 { - // Remote VM MAC address bound to Remote VM IPv4 address - optional string remote_vm_mac = 1; + // Description missing in models + PatternFlowIpv6Version version = 1; - // Remote VM IPv4 address - optional string remote_vm_ipv4 = 2; -} + // Description missing in models + PatternFlowIpv6TrafficClass traffic_class = 2; -// VTEP (VXLAN Tunnel End Point (VTEP)) parameters -message VxlanV4TunnelDestinationIPModeUnicastVtep { + // Description missing in models + PatternFlowIpv6FlowLabel flow_label = 3; - // Remote VXLAN Tunnel End Point address - optional string remote_vtep_address = 1; + // Description missing in models + PatternFlowIpv6PayloadLength payload_length = 4; - // Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated - // MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request - // for another end-host IP address, its local VTEP intercepts the ARP request and checks - // for the ARP-resolved IP address in its ARP suppression cache table. If it finds - // a match, the local VTEP sends an ARP response on behalf of the remote end host. - repeated VxlanTunnelDestinationIPModeUnicastArpSuppressionCache arp_suppression_cache = 2; -} + // Description missing in models + PatternFlowIpv6NextHeader next_header = 5; -// VTEP (VXLAN Tunnel End Point (VTEP)) parameters -message VxlanV6TunnelDestinationIPModeUnicastVtep { + // Description missing in models + PatternFlowIpv6HopLimit hop_limit = 6; - // Remote VXLAN Tunnel End Point address - optional string remote_vtep_address = 1; + // Description missing in models + PatternFlowIpv6Src src = 7; - // Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated - // MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request - // for another end-host IP address, its local VTEP intercepts the ARP request and checks - // for the ARP-resolved IP address in its ARP suppression cache table. If it finds - // a match, the local VTEP sends an ARP response on behalf of the remote end host. - repeated VxlanTunnelDestinationIPModeUnicastArpSuppressionCache arp_suppression_cache = 2; + // Description missing in models + PatternFlowIpv6Dst dst = 8; } -// Multicast Group address for member VNI(VXLAN Network Identifier) -message VxlanV4TunnelDestinationIPModeMulticast { +// The OTG implementation can provide a system generated, value for this property. +message FlowIpv6Auto { - // IPv4 Multicast address - optional string address = 1; + message Choice { + enum Enum { + unspecified = 0; + dhcp = 1; + } + } + // The method to be used to provide the system generated value. + // The dhcp option populates the field based on the dynamic IPv6 address that has been + // assigned to the DHCPv6 client + // by a DHCPv6 server. + // required = true + optional Choice.Enum choice = 1; } -// Multicast Group address for member VNI(VXLAN Network Identifier) -message VxlanV6TunnelDestinationIPModeMulticast { +// IEEE 802.1Qbb PFC Pause packet header. +message FlowPfcPause { - // IPv6 Multicast address - optional string address = 1; -} + // Description missing in models + PatternFlowPfcPauseDst dst = 1; -// Configuration for one or more RSVP interfaces, ingress and egress LSPs. In this model, -// currently IPv4 RSVP and point-to-point LSPs are supported as per RFC3209 and related -// specifications. -message DeviceRsvp { + // Description missing in models + PatternFlowPfcPauseSrc src = 2; - // List of IPv4 RSVP connected interfaces. At least one interface should be present - // for device connected to the DUT. For unconnected devices, this array must be empty. - repeated RsvpIpv4Interface ipv4_interfaces = 1; + // Description missing in models + PatternFlowPfcPauseEtherType ether_type = 3; - // List of IPv4 Loopback or IPv4 connected interfaces acting as RSVP ingress and egress - // endpoints. - repeated RsvpLspIpv4Interface lsp_ipv4_interfaces = 2; + // Description missing in models + PatternFlowPfcPauseControlOpCode control_op_code = 4; - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - optional string name = 3; -} + // Description missing in models + PatternFlowPfcPauseClassEnableVector class_enable_vector = 5; -// Configuration for RSVP Interface. -message RsvpIpv4Interface { + // Description missing in models + PatternFlowPfcPausePauseClass0 pause_class_0 = 6; - // The globally unique name of the IPv4 interface connected to the DUT. This name must - // match the name field of the ipv4_addresses on top which this RSVP interface is configured. - // - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - // required = true - optional string ipv4_name = 1; + // Description missing in models + PatternFlowPfcPausePauseClass1 pause_class_1 = 7; - // IPv4 address of the RSVP neighbor on this interface. - // required = true - optional string neighbor_ip = 2; + // Description missing in models + PatternFlowPfcPausePauseClass2 pause_class_2 = 8; - // The user-defined label space start value. The LSPs for which this router acts as - // a egress are assigned labels from this label pool.Thelabel_space_start and label_space_end - // together defines this label-pool. - // default = 1000 - optional uint32 label_space_start = 3; + // Description missing in models + PatternFlowPfcPausePauseClass3 pause_class_3 = 9; - // The user-defined label space end value.The last label value that can be assigned - // to the LSPs for which this router acts as egress. - // default = 100000 - optional uint32 label_space_end = 4; + // Description missing in models + PatternFlowPfcPausePauseClass4 pause_class_4 = 10; - // Enables sending of Refresh Reduction as described in RFC2961. - // default = False - optional bool enable_refresh_reduction = 5; + // Description missing in models + PatternFlowPfcPausePauseClass5 pause_class_5 = 11; - // The number of seconds between transmissions of successive Summary Refreshes. There - // is no specification specified maximum value. For clarity, setting the maximum to - // 1 hour. - // default = 30 - optional uint32 summary_refresh_interval = 6; + // Description missing in models + PatternFlowPfcPausePauseClass6 pause_class_6 = 12; - // Enables aggregration of different RSVP messages within a single PDU. - // default = False - optional bool send_bundle = 7; + // Description missing in models + PatternFlowPfcPausePauseClass7 pause_class_7 = 13; +} - // The number of milliseconds to wait after which RSVP will bundle different RSVP messages - // and transmit Bundle messages. - // default = 50 - optional uint32 bundle_threshold = 8; +// IEEE 802.3x global ethernet pause packet header +message FlowEthernetPause { - // Enables sending of Hello Messages as per RFC3209. - // default = False - optional bool enable_hello = 9; + // Description missing in models + PatternFlowEthernetPauseDst dst = 1; - // If enable_hello is set to 'true', this specifies the minimum hello interval in seconds - // at which successive Hello Messages are sent as per RFC3209. There is no specification - // specified maximum value. For clarity, setting the maximum to 1 hour. - // default = 9 - optional uint32 hello_interval = 10; + // Description missing in models + PatternFlowEthernetPauseSrc src = 2; - // The number of missed hellos after which the node should consider RSVP Neighbor to - // have timed out. There is no specification specified maximum value. Setting the maximum - // allowed value to 10. - // default = 3 - optional uint32 timeout_multiplier = 11; -} + // Description missing in models + PatternFlowEthernetPauseEtherType ether_type = 3; -// Configuration for RSVP LSP IPv4 Interface. -message RsvpLspIpv4Interface { + // Description missing in models + PatternFlowEthernetPauseControlOpCode control_op_code = 4; - // The globally unique name of the IPv4 or Loopback IPv4 interface acting as the RSVP - // ingress and egress endpoint for the LSPs configured on this interface. This must - // match the name field of either ipv4_addresses or ipv4_loopbacks on which this LSP - // interface is configured. - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv4Loopback/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv4Loopback/properties/name - // - // required = true - optional string ipv4_name = 1; + // Description missing in models + PatternFlowEthernetPauseTime time = 5; +} - // Contains properties of Tail(Egress) LSPs. - RsvpLspIpv4InterfaceP2PEgressIpv4Lsp p2p_egress_ipv4_lsps = 2; +// TCP packet header +message FlowTcp { - // Array of point-to-point RSVP-TE P2P LSPs originating from this interface. - repeated RsvpLspIpv4InterfaceP2PIngressIpv4Lsp p2p_ingress_ipv4_lsps = 3; -} + // Description missing in models + PatternFlowTcpSrcPort src_port = 1; -// Configuration for RSVP Egress Point-to-Point(P2P) IPv4 LSPs. -message RsvpLspIpv4InterfaceP2PEgressIpv4Lsp { + // Description missing in models + PatternFlowTcpDstPort dst_port = 2; - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 1; + // Description missing in models + PatternFlowTcpSeqNum seq_num = 3; - // The time in seconds between successive transmissions of RESV Refreshes. The actual - // refresh interval is jittered by upto 50%. There is no specification specified maximum - // value. For clarity, setting the maximum to 1 hour. - // default = 30 - optional uint32 refresh_interval = 2; + // Description missing in models + PatternFlowTcpAckNum ack_num = 4; - // The number of missed PATH refreshes after which a recieving node should consider - // the LSP state to have timed out. There is no specification specified maximum value. - // Setting the maximum allowed value to 10. - // default = 3 - optional uint32 timeout_multiplier = 3; + // Description missing in models + PatternFlowTcpDataOffset data_offset = 5; - message ReservationStyle { - enum Enum { - unspecified = 0; - shared_explicit = 1; - fixed_filter = 2; - auto = 3; - } - } - // It determines how RSVP-TE enabled network devices set up reservations along the path - // between an end-to-end QOS-enabled connection. If 'auto' is enabled, the style is - // chosen based on whether the incoming Path has 'SE Desired' flag set. Otherwise, the - // style is chosen based on the value selected for this attribute. - // default = ReservationStyle.Enum.shared_explicit - optional ReservationStyle.Enum reservation_style = 4; + // Description missing in models + PatternFlowTcpEcnNs ecn_ns = 6; - // If enabled, a specific fixed label will be advertised by the egress or tail end for - // all Path messages received by this egress. This can be leveraged to advertise Explicit - // or Implicit null labels. - // default = False - optional bool enable_fixed_label = 5; + // Description missing in models + PatternFlowTcpEcnCwr ecn_cwr = 7; - // The fixed label value as advertised by egress in RESV message. Applicable only if - // 'fixed_label' is set to 'true'. Special values are '0 - IPv4 Explicit NULL', '2 - - // IPv6 Explicit NULL' and '3 - Implicit NULL'. Outside of this, labels are expected - // to have a minimum value of 16. - // default = 0 - optional uint32 fixed_label_value = 6; -} + // Description missing in models + PatternFlowTcpEcnEcho ecn_echo = 8; -// Configuration for an RSVP Ingress point-to-point LSP. -message RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + // Description missing in models + PatternFlowTcpCtlUrg ctl_urg = 9; - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 1; + // Description missing in models + PatternFlowTcpCtlAck ctl_ack = 10; - // IPv4 address of the remote endpoint of the LSP. - // required = true - optional string remote_address = 2; + // Description missing in models + PatternFlowTcpCtlPsh ctl_psh = 11; - // The Tunnel ID of the RSVP LSP. Carried in the SESSION object in Path Messages. - // default = 1 - optional uint32 tunnel_id = 3; + // Description missing in models + PatternFlowTcpCtlRst ctl_rst = 12; - // The LSP ID of the RSVP LSP. Carried in the SENDER_TEMPLATE object in Path Messages. - // default = 1 - optional uint32 lsp_id = 4; + // Description missing in models + PatternFlowTcpCtlSyn ctl_syn = 13; - // The time in seconds between successive transmissions of PATH Refreshes. The actual - // refresh interval is jittered by upto 50%. There is no specification specified maximum - // value. For clarity, setting the maximum to 1 hour. - // default = 30 - optional uint32 refresh_interval = 5; + // Description missing in models + PatternFlowTcpCtlFin ctl_fin = 14; - // The number of missed RESV refreshes after which a recieving node should consider - // the LSP state to have timed out. There is no specification specified maximum value. - // Setting the maximum allowed value to 10. - // default = 3 - optional uint32 timeout_multiplier = 6; + // Description missing in models + PatternFlowTcpWindow window = 15; - // The LSP id that will be used when creating a Make-Before-Break LSP when the active - // LSP is using lsp_id. If the active LSP on which Make-Before-Break is being done is - // using the backup_lsp_id, the new LSP created will toggle to use the lsp_id instead. - // default = 2 - optional uint32 backup_lsp_id = 7; + // Description missing in models + PatternFlowTcpChecksum checksum = 16; +} - // The amount of delay in milliseconds that an implementation should wait for before - // switching traffic to the new LSP created after a Make-Before-Break is done on an - // LSP. The default value is 0 which means to switch immediately. An implementation - // should support a minimum delay value of at least 50ms . There is no specification - // specified maximum value. Setting maximum allowed value to 1 minute. If a delay value - // is supplied which is lesser than the minimum delay value supported, a warning should - // be provided indicating that the minimum value of LSP switchover delay is automatically - // increased to the supported minimum value. This warning should be included in the - // list of warnings in the 'Response.Warning' attribute sent in the SetConfig 'Success' - // Response. - // default = 0 - optional uint32 lsp_switchover_delay = 8; +// UDP packet header +message FlowUdp { - // This contains the values of the fields to be included in the SESSION_ATTRIBUTE object - // in the Path Message sent for the LSP. - RsvpSessionAttribute session_attribute = 9; + // Description missing in models + PatternFlowUdpSrcPort src_port = 1; - // This contains the values of the fields to be included in the TSPEC object in the - // Path Message sent for the LSP. - RsvpTspec tspec = 10; + // Description missing in models + PatternFlowUdpDstPort dst_port = 2; - // This contains the values of the fields to be included in the FAST_REROUTE object - // in the Path Message sent for the LSP. - // This is an optional object . If this attribute is not included , the FAST_REROUTE - // object will not be included. - RsvpFastReroute fast_reroute = 11; + // Description missing in models + PatternFlowUdpLength length = 3; - // This contains the values of the fields to be included in the ERO object in the Path - // Message sent for the LSP. - // This is an optional object . If this attribute is not included , the ERO object will - // not be included. - RsvpEro ero = 12; + // Description missing in models + PatternFlowUdpChecksum checksum = 4; } -// Configuration for RSVP-TE SESSION_ATTRIBUTE object included in Path Messages as defined -// in RFC3209. The bandwidth_protection_desired and node_protection_desired flags are -// defined in RFC4090 (Fast Reroute). -message RsvpSessionAttribute { +// Standard GRE packet header (RFC2784) +message FlowGre { - // If this is enabled, an auto-generated Session Name is included in the SESSION_ATTRIBUTE - // object in the Path Message for this LSP. - // default = True - optional bool auto_generate_session_name = 1; + // Description missing in models + PatternFlowGreChecksumPresent checksum_present = 1; - // If auto_generate_session_name is set to 'false', then the value of this field is - // used to fill the Session Name field of the SESSION_ATTRIBUTE object in the Path Message - // for this LSP. It is suggested to include the Local IP, Remote IP, Tunnel ID and LSP - // ID in the auto-generated Session Name to ensure uniqueness of the name in the test. - // The maximum length of session name is 254 bytes. - optional string session_name = 2; + // Description missing in models + PatternFlowGreReserved0 reserved0 = 2; - // Specifies the value of the Setup Priority field. This controls whether the LSP should - // pre-empt existing LSP setup with certain Holding Priority if resource limitation - // is encountered when setting up the LSP. (e.g. bandwidth availability). The value - // 0 is the highest priority while 7 is the lowest. - // default = 7 - optional uint32 setup_priority = 3; + // Description missing in models + PatternFlowGreVersion version = 3; - // Specifies the value of the Holding Priority field. This controls whether a new LSP - // being created with certain Setup Priority should pre-empt this LSP if resource limitation - // is encountered when setting up the LSP. (e.g. bandwidth availability). The value - // 0 is the highest priority while 7 is the lowest. - // default = 7 - optional uint32 holding_priority = 4; + // Description missing in models + PatternFlowGreProtocol protocol = 4; - // This flag permits transit routers to use a local repair mechanism which may result - // in violation of the explicit route object. When a fault is detected on an adjacent - // downstream link or node, a transit router can reroute traffic for fast service restoration. - // default = False - optional bool local_protection_desired = 5; + // Description missing in models + PatternFlowGreChecksum checksum = 5; - // This flag indicates that label information should be included when doing a route - // record. - // default = False - optional bool label_recording_desired = 6; + // Description missing in models + PatternFlowGreReserved1 reserved1 = 6; +} - // This flag indicates that the tunnel ingress node may choose to reroute this tunnel - // without tearing it down. A tunnel egress node SHOULD use the Shared Explicit(SE) - // Style when responding with a Resv message. - // default = False - optional bool se_style_desired = 7; +// GTPv1 packet header +message FlowGtpv1 { - // This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs - // along the protected LSP path that a backup path with a bandwidth guarantee is desired. - // This bandwidth has to be guaranteed for the protected LSP, if no FAST_REROUTE object - // is included in the PATH message. If a FAST_REROUTE object is present in the Path - // message, then the bandwidth specified therein is to be guaranteed. - // default = False - optional bool bandwidth_protection_desired = 8; + // Description missing in models + PatternFlowGtpv1Version version = 1; - // This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs - // along a protected LSP path that it is desired to have a backup path that bypasses - // at least the next node of the protected LSP. - // default = False - optional bool node_protection_desired = 9; + // Description missing in models + PatternFlowGtpv1ProtocolType protocol_type = 2; - // This is an optional object. If included the extended SESSION_ATTRIBUTE object is - // sent in the Path message containing - // the additional fields included in this object. This contains a set of three bitmaps - // using which further constraints can be - // set on the path calculated for the LSP based on the Admin Group settings in the IGP - // (e.g ISIS or OSPF interface). - RsvpResourceAffinities resource_affinities = 10; -} + // Description missing in models + PatternFlowGtpv1Reserved reserved = 3; -// This is an optional object. If included, the extended SESSION_ATTRIBUTE object is -// sent in the Path message containing -// the additional fields included in this object. This contains a set of three bitmaps -// using which further constraints can be -// set on the path calculated for the LSP based on the Admin Group settings in the IGP -// (e.g ISIS or OSPF interface). -message RsvpResourceAffinities { + // Description missing in models + PatternFlowGtpv1EFlag e_flag = 4; - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // any of which renders a link unacceptable. A null set (all bits set to zero) doesn't - // render the link unacceptable. The most significant byte in the hex-string is the - // farthest to the left in the byte sequence. Leading zero bytes in the configured - // value may be omitted for brevity. - // default = 0 - optional string exclude_any = 1; + // Description missing in models + PatternFlowGtpv1SFlag s_flag = 5; - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // any of which renders a link acceptable. A null set (all bits set to zero) automatically - // passes. The most significant byte in the hex-string is the farthest to the left - // in the byte sequence. Leading zero bytes in the configured value may be omitted - // for brevity. - // default = 0 - optional string include_any = 2; + // Description missing in models + PatternFlowGtpv1PnFlag pn_flag = 6; + + // Description missing in models + PatternFlowGtpv1MessageType message_type = 7; + + // Description missing in models + PatternFlowGtpv1MessageLength message_length = 8; + + // Description missing in models + PatternFlowGtpv1Teid teid = 9; - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // all of which must be present for a link to be acceptable. A null set (all bits set - // to zero) automatically passes. The most significant byte in the hex-string is the - // farthest to the left in the byte sequence. Leading zero bytes in the configured - // value may be omitted for brevity. - // default = 0 - optional string include_all = 3; -} + // Description missing in models + PatternFlowGtpv1SquenceNumber squence_number = 10; -// Configuration for RSVP-TE TSPEC object included in Path Messages. The usage of these -// parameters is defined in RFC2215. -message RsvpTspec { + // Description missing in models + PatternFlowGtpv1NPduNumber n_pdu_number = 11; - // The rate of the traffic to be carried in this LSP in bytes per second. This is part - // of the Token Bucket specification defined for a traffic flow defined in RFC2215. - // default = 0 - optional float token_bucket_rate = 1; + // Description missing in models + PatternFlowGtpv1NextExtensionHeaderType next_extension_header_type = 12; - // The depth of the token bucket in bytes used to specify the Token Bucket characteristics - // of the traffic to be carried in the LSP. This is part of the Token Bucket specification - // defined for a traffic flow defined in RFC2215. - // default = 0 - optional float token_bucket_size = 2; + // A list of optional extension headers. + repeated FlowGtpExtension extension_headers = 13; +} - // The peak data rate of the traffic in bytes per second used to specify the Token Bucket - // characteristics of the traffic to be carried in the LSP. This is part of the Token - // Bucket specification defined for a traffic flow defined in RFC2215. - // default = 0 - optional float peak_data_rate = 3; +// Description missing in models +message FlowGtpExtension { - // Specifies the minium length of packet frames that will be policed. - // default = 0 - optional uint32 minimum_policed_unit = 4; + // Description missing in models + PatternFlowGtpExtensionExtensionLength extension_length = 1; - // Specifies the maximum length of packet frames that will be policed. - // default = 0 - optional uint32 maximum_policed_unit = 5; + // Description missing in models + PatternFlowGtpExtensionContents contents = 2; + + // Description missing in models + PatternFlowGtpExtensionNextExtensionHeader next_extension_header = 3; } -// Configuration for the optional RSVP-TE FAST_REROUTE object included in Path Messages -// as defined in RFC4090. -message RsvpFastReroute { +// GTPv2 packet header +message FlowGtpv2 { - // Specifies the value of the Setup Priority field. This controls whether the backup - // LSP should pre-empt existing LSP that is setup with certain Holding Priority. While - // setting up a backup LSP, preemption of existing LSP can happen if resource limitation - // is encountered (e.g bandwidth availability). - // default = 7 - optional uint32 setup_priority = 1; + // Description missing in models + PatternFlowGtpv2Version version = 1; - // Specifies the value of the Holding Priority field. This controls whether a new LSP - // being created with certain Setup Priority should pre-empt this LSP set up with this - // Holding Priority. While setting up a new LSP, preemption of existing LSP can happen - // if resource limitation is encountered (e.g bandwidth availability). - // default = 7 - optional uint32 holding_priority = 2; + // Description missing in models + PatternFlowGtpv2PiggybackingFlag piggybacking_flag = 2; - // Specifies the value of the Hop Limit field. This controls the maximum number of hops - // the LSP should traverse to reach the LSP end-point. - // default = 3 - optional uint32 hop_limit = 3; + // Description missing in models + PatternFlowGtpv2TeidFlag teid_flag = 3; - // Specifies the value of the Bandwidth field as a 32-bit IEEE floating point integer, - // in bytes per second, as desired for the LSP. - // default = 0 - optional float bandwidth = 4; + // Description missing in models + PatternFlowGtpv2Spare1 spare1 = 4; - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // any of which renders a link unacceptable. A null set (all bits set to zero) doesn't - // render the link unacceptable. The most significant byte in the hex-string is the - // farthest to the left in the byte sequence. Leading zero bytes in the configured - // value may be omitted for brevity. - // default = 0 - optional string exclude_any = 5; + // Description missing in models + PatternFlowGtpv2MessageType message_type = 5; - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // any of which renders a link acceptable. A null set (all bits set to zero) automatically - // passes. The most significant byte in the hex-string is the farthest to the left - // in the byte sequence. Leading zero bytes in the configured value may be omitted - // for brevity. - // default = 0 - optional string include_any = 6; + // Description missing in models + PatternFlowGtpv2MessageLength message_length = 6; - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // all of which must be present for a link to be acceptable. A null set (all bits set - // to zero) automatically passes. The most significant byte in the hex-string is the - // farthest to the left in the byte sequence. Leading zero bytes in the configured - // value may be omitted for brevity. - // default = 0 - optional string include_all = 7; + // Description missing in models + PatternFlowGtpv2Teid teid = 7; - // Requests protection via the one-to-one backup method. - // default = False - optional bool one_to_one_backup_desired = 8; + // Description missing in models + PatternFlowGtpv2SequenceNumber sequence_number = 8; - // Requests protection via the facility backup method. - // default = False - optional bool facility_backup_desired = 9; + // Description missing in models + PatternFlowGtpv2Spare2 spare2 = 9; } -// Configuration for the optional RSVP-TE explicit route object(ERO) object included -// in Path Messages. -message RsvpEro { +// ARP packet header +message FlowArp { - message PrependNeighborIp { - enum Enum { - unspecified = 0; - dont_prepend = 1; - prepend_loose = 2; - prepend_strict = 3; - } - } - // Determines whether the IP address of the RSVP neighbor should be added as an ERO - // sub-object. If it is to be included, it can be included as a Loose hop or as a Strict - // hop. - // default = PrependNeighborIp.Enum.prepend_loose - optional PrependNeighborIp.Enum prepend_neighbor_ip = 1; + // Description missing in models + PatternFlowArpHardwareType hardware_type = 1; - // If prepend_egress_ip is set to one of 'prepend_loose' or 'prepend_strict', then set - // this value as the prefix length of the ERO sub-object containing egress IP address. - // - // default = 32 - optional uint32 prefix_length = 2; + // Description missing in models + PatternFlowArpProtocolType protocol_type = 2; - // Array of sub-objects to be included in the ERO. These sub-objects contain the intermediate - // hops to be traversed by the LSP while being forwarded towards the egress endpoint. - // These sub-objects are included after the optional sub-object containing IP address - // of egress endpoint of the LSP (when present). - repeated RsvpEroSubobject subobjects = 3; -} + // Description missing in models + PatternFlowArpHardwareLength hardware_length = 3; -// Configuration for the ERO sub-object. -message RsvpEroSubobject { + // Description missing in models + PatternFlowArpProtocolLength protocol_length = 4; - message Type { - enum Enum { - unspecified = 0; - ipv4 = 1; - as_number = 2; - } - } - // The type of the ERO sub-object, one of IPv4 Address or AS Number. - // default = Type.Enum.ipv4 - optional Type.Enum type = 1; + // Description missing in models + PatternFlowArpOperation operation = 5; - // IPv4 address that this LSP should traverse through. This field is applicable only - // if the value of 'type' is set to 'ipv4'. - // default = 0.0.0.0 - optional string ipv4_address = 2; + // Description missing in models + PatternFlowArpSenderHardwareAddr sender_hardware_addr = 6; - // Prefix length for the IPv4 address in the ERO sub-object. This field is applicable - // only if the value of 'type' is set to 'ipv4'. - // default = 32 - optional uint32 prefix_length = 3; + // Description missing in models + PatternFlowArpSenderProtocolAddr sender_protocol_addr = 7; - // Autonomous System number to be set in the ERO sub-object that this LSP should traverse - // through. This field is applicable only if the value of 'type' is set to 'as_number'. - // Note that as per RFC3209, 4-byte AS encoding is not supported. - // default = 0 - optional uint32 as_number = 4; + // Description missing in models + PatternFlowArpTargetHardwareAddr target_hardware_addr = 8; - message HopType { + // Description missing in models + PatternFlowArpTargetProtocolAddr target_protocol_addr = 9; +} + +// ICMP packet header +message FlowIcmp { + + message Choice { enum Enum { unspecified = 0; - strict = 1; - loose = 2; + echo = 1; } } - // The hop type of the ERO sub-object, one of Strict or Loose. - // default = HopType.Enum.loose - optional HopType.Enum hop_type = 5; -} - -// A high level data plane traffic flow. -message Flow { - - // The transmit and receive endpoints. - // required = true - FlowTxRx tx_rx = 1; - - // The list of protocol headers defining the shape of all - // intended packets in corresponding flow as it is transmitted - // by traffic-generator port. - // - // The order of protocol headers assigned to the list is the - // order they will appear on the wire. - // - // In the case of an empty list the keyword/value of minItems: 1 - // indicates that an implementation MUST provide at least one - // Flow.Header object. - // - // The default value for the Flow.Header choice property is ethernet - // which will result in an implementation by default providing at least - // one ethernet packet header. - repeated FlowHeader packet = 2; + // Description missing in models + // default = Choice.Enum.echo + optional Choice.Enum choice = 1; - // Under Review: The packet header schema for egress tracking currently exposes unwanted - // fields. The query structure for tagged metrics inside flows metrics requires documenting - // expected response format. - // - // Under Review: The packet header schema for egress tracking currently exposes unwanted - // fields. The query structure for tagged metrics inside flows metrics requires documenting - // expected response format. - // - // The list of protocol headers defining the shape of all - // intended packets in corresponding flow as it is received - // by traffic-generator port. - // - // For all protocol headers, only the `metric_tags` property is configurable. - repeated FlowHeader egress_packet = 9; + // Description missing in models + FlowIcmpEcho echo = 2; +} - // The size of the packets. - FlowSize size = 3; +// Packet Header for ICMP echo request +message FlowIcmpEcho { - // The transmit rate of the packets. - FlowRate rate = 4; + // Description missing in models + PatternFlowIcmpEchoType type = 1; - // The transmit duration of the packets. - FlowDuration duration = 5; + // Description missing in models + PatternFlowIcmpEchoCode code = 2; - // Flow metrics. - FlowMetrics metrics = 6; + // Description missing in models + PatternFlowIcmpEchoChecksum checksum = 3; - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 7; + // Description missing in models + PatternFlowIcmpEchoIdentifier identifier = 4; + + // Description missing in models + PatternFlowIcmpEchoSequenceNumber sequence_number = 5; } -// A container for different types of transmit and receive -// endpoint containers. -message FlowTxRx { +// ICMPv6 packet header +message FlowIcmpv6 { message Choice { enum Enum { unspecified = 0; - port = 1; - device = 2; + echo = 1; } } - // The type of transmit and receive container used by the flow. - // default = Choice.Enum.port + // Description missing in models + // default = Choice.Enum.echo optional Choice.Enum choice = 1; // Description missing in models - FlowPort port = 2; + FlowIcmpv6Echo echo = 2; +} + +// Packet Header for ICMPv6 Echo +message FlowIcmpv6Echo { // Description missing in models - FlowRouter device = 3; + PatternFlowIcmpv6EchoType type = 1; + + // Description missing in models + PatternFlowIcmpv6EchoCode code = 2; + + // Description missing in models + PatternFlowIcmpv6EchoIdentifier identifier = 3; + + // Description missing in models + PatternFlowIcmpv6EchoSequenceNumber sequence_number = 4; + + // Description missing in models + PatternFlowIcmpv6EchoChecksum checksum = 5; } -// A container for a transmit port and 0..n intended receive ports. -// When assigning this container to a flow the flows's -// packet headers will not be populated with any address resolution -// information such as source and/or destination addresses. -// For example Flow.Ethernet dst mac address values will be defaulted to 0. -// For full control over the Flow.properties.packet header contents use this -// container. -message FlowPort { +// PPP packet header +message FlowPpp { - // The unique name of a port that is the transmit port. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Lag/properties/name - // - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Lag/properties/name - // - // required = true - optional string tx_name = 1; + // Description missing in models + PatternFlowPppAddress address = 1; - // Deprecated: This property is deprecated in favor of property rx_names - // - // Deprecated: This property is deprecated in favor of property rx_names - // - // The unique name of a port that is the intended receive port. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Lag/properties/name - // - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Lag/properties/name - // - optional string rx_name = 2; + // Description missing in models + PatternFlowPppControl control = 2; - // Unique name of ports or lags that are intended receive endpoints. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Lag/properties/name - // - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Lag/properties/name - // - repeated string rx_names = 3; + // Description missing in models + PatternFlowPppProtocolType protocol_type = 3; } -// A container for declaring a map of 1..n transmit devices to 1..n receive devices. -// This allows for a single flow to have different tx to rx device flows such as a -// single one to one map or a many to many map. -message FlowRouter { +// IGMPv1 packet header +message FlowIgmpv1 { - message Mode { - enum Enum { - unspecified = 0; - mesh = 1; - one_to_one = 2; - } - } - // Determines the intent of creating traffic sub-flow(s) between the device - // endpoints, from the entities of tx_names to the entities of rx_names - // - // to derive how auto packet fields can be populated with - // the actual value(s) by the implementation. - // - // The one_to_one mode creates traffic sub-flow(s) between each device endpoint - // pair in - // tx_names to rx_names by index. - // The length of tx_names and rx_names MUST be the same. - // The same device name can be repeated multiple times in tx_names or rx_names, in any - // order to create desired meshing between device(s). - // For 2 values in tx_names and 2 values in rx_names, 2 device endpoint pairs would - // be generated (each pair representing a traffic sub-flow). - // - // The mesh mode creates traffic sub-flow(s) between each value in tx_names to - // every value in rx_names, forming the device endpoint pair(s). - // For 2 values in tx_names and 3 values in rx_names, generated device endpoint pairs - // would be 2x3=6. - // - // A generated device endpoint pair with same device endpoint name for both transmit - // & receive device endpoint MUST raise an error. - // - // Packet fields of type auto would be populated with one value for each device - // endpoint pair (representing the traffic sub-flow). - // The value would be determined considering transmit & receive device of the sub-flow. - // And the sequence of the populated value(s) - // would be in the order of generated device endpoint pair(s). - // If 2 device endpoint pairs are generated (based on mode, tx_names and rx_names), - // say (d1 to d3) and (d2 to d3), and ethernet.dst is set as auto, then - // the auto field would be replaced by the implementation with a sequence of - // 2 values, [v1,v2] where - // v1 is determined using context (d1,d3) and v2 using context (d2,d3). - // The final outcome is that packets generated on the wire will contain the values v1,v2,v1,... - // for ethernet.dst field. Any non-auto packet fields - // should be configured accordingly. For example, non-auto packet field ethernet.src - // can be configured with values [u1, u2], where - // u1 & u2 are source MAC of the connected interface of device d1 and d2 respectively. - // Then packets on the wire will contain correct value pairs - // (u1,v1),(u2,v2),(u1,v1),... for (ethernet.src,ethernet.dst) fields. - // default = Mode.Enum.mesh - optional Mode.Enum mode = 1; + // Description missing in models + PatternFlowIgmpv1Version version = 1; - // TBD - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Bgp.V4RouteRange/properties/name - // - /components/schemas/Bgp.V6RouteRange/properties/name - // - /components/schemas/Bgp.CMacIpRange/properties/name - // - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name - // - /components/schemas/Isis.V4RouteRange/properties/name - // - /components/schemas/Isis.V6RouteRange/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Bgp.V4RouteRange/properties/name - // - /components/schemas/Bgp.V6RouteRange/properties/name - // - /components/schemas/Bgp.CMacIpRange/properties/name - // - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name - // - /components/schemas/Isis.V4RouteRange/properties/name - // - /components/schemas/Isis.V6RouteRange/properties/name - // - repeated string tx_names = 2; + // Description missing in models + PatternFlowIgmpv1Type type = 2; - // TBD - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Bgp.V4RouteRange/properties/name - // - /components/schemas/Bgp.V6RouteRange/properties/name - // - /components/schemas/Bgp.CMacIpRange/properties/name - // - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name - // - /components/schemas/Isis.V4RouteRange/properties/name - // - /components/schemas/Isis.V6RouteRange/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - /components/schemas/Device.Ipv4/properties/name - // - /components/schemas/Device.Ipv6/properties/name - // - /components/schemas/Bgp.V4RouteRange/properties/name - // - /components/schemas/Bgp.V6RouteRange/properties/name - // - /components/schemas/Bgp.CMacIpRange/properties/name - // - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name - // - /components/schemas/Isis.V4RouteRange/properties/name - // - /components/schemas/Isis.V6RouteRange/properties/name - // - repeated string rx_names = 3; + // Description missing in models + PatternFlowIgmpv1Unused unused = 3; + + // Description missing in models + PatternFlowIgmpv1Checksum checksum = 4; + + // Description missing in models + PatternFlowIgmpv1GroupAddress group_address = 5; +} + +// MPLS packet header; When configuring multiple such headers, the count shall not exceed +// 20. +message FlowMpls { + + // Description missing in models + PatternFlowMplsLabel label = 1; + + // Description missing in models + PatternFlowMplsTrafficClass traffic_class = 2; + + // Description missing in models + PatternFlowMplsBottomOfStack bottom_of_stack = 3; + + // Description missing in models + PatternFlowMplsTimeToLive time_to_live = 4; +} + +// SNMPv2C packet header as defined in RFC1901 and RFC3416. +message FlowSnmpv2c { + + // Description missing in models + PatternFlowSnmpv2cVersion version = 1; + + // It is an ASCII based octet string which identifies the SNMP community in which the + // sender and recipient of this message are located. It should match the read-only or + // read-write community string configured on the recipient for the PDU to be accepted. + // default = community + optional string community = 2; + + // Description missing in models + // required = true + FlowSnmpv2cData data = 3; } -// Configuration for all traffic packet headers -message FlowHeader { +// This contains the body of the SNMPv2C message. +// +// - Encoding of subsequent fields follow ASN.1 specification. +// Refer: http://www.itu.int/ITU-T/asn1/ +message FlowSnmpv2cData { message Choice { enum Enum { unspecified = 0; - custom = 1; - ethernet = 2; - vlan = 3; - vxlan = 4; - ipv4 = 5; - ipv6 = 6; - pfcpause = 7; - ethernetpause = 8; - tcp = 9; - udp = 10; - gre = 11; - gtpv1 = 12; - gtpv2 = 13; - arp = 14; - icmp = 15; - icmpv6 = 16; - ppp = 17; - igmpv1 = 18; - mpls = 19; - snmpv2c = 20; - rsvp = 21; + get_request = 1; + get_next_request = 2; + response = 3; + set_request = 4; + get_bulk_request = 5; + inform_request = 6; + snmpv2_trap = 7; + report = 8; } } - // The available types of flow headers. If one is not provided the - // default ethernet packet header MUST be provided. - // default = Choice.Enum.ethernet + // Description missing in models + // required = true optional Choice.Enum choice = 1; // Description missing in models - FlowCustom custom = 2; + FlowSnmpv2cPDU get_request = 2; // Description missing in models - FlowEthernet ethernet = 3; + FlowSnmpv2cPDU get_next_request = 3; // Description missing in models - FlowVlan vlan = 4; + FlowSnmpv2cPDU response = 4; // Description missing in models - FlowVxlan vxlan = 5; + FlowSnmpv2cPDU set_request = 5; // Description missing in models - FlowIpv4 ipv4 = 6; + FlowSnmpv2cBulkPDU get_bulk_request = 6; // Description missing in models - FlowIpv6 ipv6 = 7; + FlowSnmpv2cPDU inform_request = 7; // Description missing in models - FlowPfcPause pfcpause = 8; + FlowSnmpv2cPDU snmpv2_trap = 8; // Description missing in models - FlowEthernetPause ethernetpause = 9; + FlowSnmpv2cPDU report = 9; +} + +// This contains the body of the SNMPv2C PDU. +message FlowSnmpv2cPDU { // Description missing in models - FlowTcp tcp = 10; + PatternFlowSnmpv2cPDURequestId request_id = 1; + + message ErrorStatus { + enum Enum { + unspecified = 0; + no_error = 1; + too_big = 2; + no_such_name = 3; + bad_value = 4; + read_only = 5; + gen_err = 6; + no_access = 7; + wrong_type = 8; + wrong_length = 9; + wrong_encoding = 10; + wrong_value = 11; + no_creation = 12; + inconsistent_value = 13; + resource_unavailable = 14; + commit_failed = 15; + undo_failed = 16; + authorization_error = 17; + not_writable = 18; + inconsistent_name = 19; + } + } + // The SNMP agent places an error code in this field in the response message if an error + // occurred processing the request. + // default = ErrorStatus.Enum.no_error + optional ErrorStatus.Enum error_status = 2; // Description missing in models - FlowUdp udp = 11; + PatternFlowSnmpv2cPDUErrorIndex error_index = 3; + + // A Sequence of variable_bindings. + repeated FlowSnmpv2cVariableBinding variable_bindings = 4; +} + +// The purpose of the GetBulkRequest-PDU is to request the transfer of a potentially +// large amount of data, including, but not limited to, the efficient and rapid retrieval +// of large tables. +message FlowSnmpv2cBulkPDU { // Description missing in models - FlowGre gre = 12; + PatternFlowSnmpv2cBulkPDURequestId request_id = 1; // Description missing in models - FlowGtpv1 gtpv1 = 13; + PatternFlowSnmpv2cBulkPDUNonRepeaters non_repeaters = 2; // Description missing in models - FlowGtpv2 gtpv2 = 14; + PatternFlowSnmpv2cBulkPDUMaxRepetitions max_repetitions = 3; + + // A Sequence of variable_bindings. + repeated FlowSnmpv2cVariableBinding variable_bindings = 4; +} + +// A Sequence of two fields, an object_identifier and the value for/from that object_identifier. +message FlowSnmpv2cVariableBinding { + + // The Object Identifier points to a particular parameter in the SNMP agent. + // - Encoding of this field follows RFC2578(section 3.5) and ASN.1 X.690(section 8.1.3.6) + // specification. + // Refer: http://www.itu.int/ITU-T/asn1/ + // - According to BER, the first two numbers of any OID (x.y) are encoded as one value + // using the formula (40*x)+y. + // Example, the first two numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, + // because (40*1)+3 = 43. + // - After the first two numbers are encoded, the subsequent numbers in the OID are + // each encoded as a byte. + // - However, a special rule is required for large numbers because one byte can only + // represent a number from 0-127. + // - The rule for large numbers states that only the lower 7 bits in the byte are used + // for holding the value (0-127). + // - The highest order bit(8th) is used as a flag to indicate that this number spans + // more than one byte. Therefore, any number over 127 must be encoded using more than + // one byte. + // - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0' cannot be + // encoded using a single byte. + // According to this rule, the number 2680 must be encoded as 0x94 0x78. + // Since the most significant bit is set in the first byte (0x94), it indicates + // that number spans to the next byte. + // Since the most significant bit is not set in the next byte (0x78), it indicates + // that the number ends at the second byte. + // The value is derived by appending 7 bits from each of the concatenated bytes + // i.e (0x14 *128^1) + (0x78 * 128^0) = 2680. + // default = 0.1 + optional string object_identifier = 1; // Description missing in models - FlowArp arp = 15; + FlowSnmpv2cVariableBindingValue value = 2; +} + +// The value for the object_identifier as per RFC2578. +message FlowSnmpv2cVariableBindingValue { + message Choice { + enum Enum { + unspecified = 0; + no_value = 1; + integer_value = 2; + string_value = 3; + object_identifier_value = 4; + ip_address_value = 5; + counter_value = 6; + timeticks_value = 7; + arbitrary_value = 8; + big_counter_value = 9; + unsigned_integer_value = 10; + } + } // Description missing in models - FlowIcmp icmp = 16; + // default = Choice.Enum.no_value + optional Choice.Enum choice = 1; // Description missing in models - FlowIcmpv6 icmpv6 = 17; + PatternFlowSnmpv2cVariableBindingValueIntegerValue integer_value = 2; // Description missing in models - FlowPpp ppp = 18; + FlowSnmpv2cVariableBindingStringValue string_value = 3; + + // The Object Identifier points to a particular parameter in the SNMP agent. + // - Encoding of this field follows RFC2578(section 3.5) and ASN.1 X.690(section 8.1.3.6) + // specification. + // Refer: http://www.itu.int/ITU-T/asn1/ + // - According to BER, the first two numbers of any OID (x.y) are encoded as one value + // using the formula (40*x)+y. + // Example, the first two numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, + // because (40*1)+3 = 43. + // - After the first two numbers are encoded, the subsequent numbers in the OID are + // each encoded as a byte. + // - However, a special rule is required for large numbers because one byte can only + // represent a number from 0-127. + // - The rule for large numbers states that only the lower 7 bits in the byte are used + // for holding the value (0-127). + // - The highest order bit(8th) is used as a flag to indicate that this number spans + // more than one byte. Therefore, any number over 127 must be encoded using more than + // one byte. + // - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0' cannot be + // encoded using a single byte. + // According to this rule, the number 2680 must be encoded as 0x94 0x78. + // Since the most significant bit is set in the first byte (0x94), it indicates + // that number spans to the next byte. + // Since the most significant bit is not set in the next byte (0x78), it indicates + // that the number ends at the second byte. + // The value is derived by appending 7 bits from each of the concatenated bytes + // i.e (0x14 *128^1) + (0x78 * 128^0) = 2680. + // default = 0.1 + optional string object_identifier_value = 4; + + // Description missing in models + PatternFlowSnmpv2cVariableBindingValueIpAddressValue ip_address_value = 5; + + // Description missing in models + PatternFlowSnmpv2cVariableBindingValueCounterValue counter_value = 6; + + // Description missing in models + PatternFlowSnmpv2cVariableBindingValueTimeticksValue timeticks_value = 7; + + // It contains the hex bytes of the value to be sent. As of now it is restricted to + // 10000 bytes. + // default = 00 + optional string arbitrary_value = 8; + + // Description missing in models + PatternFlowSnmpv2cVariableBindingValueBigCounterValue big_counter_value = 9; + + // Description missing in models + PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue unsigned_integer_value = 10; +} + +// It contains the raw/ascii string value to be sent. +message FlowSnmpv2cVariableBindingStringValue { + + message Choice { + enum Enum { + unspecified = 0; + ascii = 1; + raw = 2; + } + } + // Description missing in models + // default = Choice.Enum.ascii + optional Choice.Enum choice = 1; + + // It contains the ASCII string to be sent. As of now it is restricted to 10000 bytes. + // default = ascii + optional string ascii = 2; + + // It contains the hex string to be sent. As of now it is restricted to 10000 bytes. + // default = 00 + optional string raw = 3; +} + +// RSVP packet header as defined in RFC2205 and RFC3209. Currently only supported message +// type is Path with mandatory objects and sub-objects. +message FlowRsvp { + + // RSVP Protocol Version. + // default = 1 + optional uint32 version = 1; - // Description missing in models - FlowIgmpv1 igmpv1 = 19; + message Flag { + enum Enum { + unspecified = 0; + not_refresh_reduction_capable = 1; + refresh_reduction_capable = 2; + } + } + // Flag, 0x01-0x08: Reserved. + // default = Flag.Enum.not_refresh_reduction_capable + optional Flag.Enum flag = 2; // Description missing in models - FlowMpls mpls = 20; + PatternFlowRsvpRsvpChecksum rsvp_checksum = 3; // Description missing in models - FlowSnmpv2c snmpv2c = 21; + PatternFlowRsvpTimeToLive time_to_live = 4; // Description missing in models - FlowRsvp rsvp = 22; -} - -// Custom packet header -message FlowCustom { + PatternFlowRsvpReserved reserved = 5; - // A custom packet header defined as a string of hex bytes. The string MUST contain - // sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be - // discarded. This packet header can be used in multiple places in the packet. - // required = true - optional string bytes = 1; + // The sum of the lengths of the common header and all objects included in the message. + FlowRSVPLength rsvp_length = 6; - // One or more metric tags can be used to enable tracking portion of or all bits - // in a corresponding header field for metrics per each applicable value. - // These would appear as tagged metrics in corresponding flow metrics. - repeated FlowCustomMetricTag metric_tags = 2; + // An 8-bit number that identifies the function of the RSVP message. There are aound + // 20 message types defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-2 + // . Among these presently supported is Path(value: 1) message type. + FlowRSVPMessage message_type = 7; } -// Metric Tag can be used to enable tracking portion of or all bits -// in a corresponding header field for metrics per each applicable value. -// These would appear as tagged metrics in corresponding flow metrics. -message FlowCustomMetricTag { +// Description missing in models +message FlowRSVPLength { - // Name used to identify the metrics associated with the values applicable - // for configured offset and length inside corresponding header field - // required = true - optional string name = 1; + message Choice { + enum Enum { + unspecified = 0; + auto = 1; + value = 2; + } + } + // auto or configured value. + // default = Choice.Enum.auto + optional Choice.Enum choice = 1; - // Offset in bits relative to start of corresponding header field + // The OTG implementation will provide a system generated value for this property. + // If the OTG implementation is unable to generate a value the default value must be + // used. // default = 0 - optional uint32 offset = 2; + optional uint32 auto = 2; - // Number of bits to track for metrics starting from configured offset - // of corresponding header field - // default = 1 - optional uint32 length = 3; + // Description missing in models + // default = 0 + optional uint32 value = 3; } -// Ethernet packet header -message FlowEthernet { +// Description missing in models +message FlowRSVPMessage { + message Choice { + enum Enum { + unspecified = 0; + path = 1; + } + } // Description missing in models - PatternFlowEthernetDst dst = 1; + // default = Choice.Enum.path + optional Choice.Enum choice = 1; // Description missing in models - PatternFlowEthernetSrc src = 2; + FlowRSVPPathMessage path = 2; +} - // Description missing in models - PatternFlowEthernetEtherType ether_type = 3; +// Path message requires the following list of objects in order as defined in https://www.rfc-editor.org/rfc/rfc3209.html#page-15: +// 1. SESSION 2. RSVP_HOP 3. TIME_VALUES 4. EXPLICIT_ROUTE [optional] 5. LABEL_REQUEST +// 6. SESSION_ATTRIBUTE [optional] 7. SENDER_TEMPLATE 8. SENDER_TSPEC 9. RECORD_ROUTE +// [optional] +message FlowRSVPPathMessage { - // Description missing in models - PatternFlowEthernetPfcQueue pfc_queue = 4; + // Path message requires atleast SESSION, RSVP_HOP, TIME_VALUES, LABEL_REQUEST, SENDER_TEMPLATE + // and SENDER_TSPEC objects in order. + repeated FlowRSVPPathObjects objects = 1; } -// VLAN packet header -message FlowVlan { +// Every RSVP object encapsulated in an RSVP message consists of a 32-bit word header +// and the object's contents. +message FlowRSVPPathObjects { // Description missing in models - PatternFlowVlanPriority priority = 1; + FlowRSVPPathObjectsClass class_num = 1; +} - // Description missing in models - PatternFlowVlanCfi cfi = 2; +// Description missing in models +message FlowRSVPObjectLength { - // Description missing in models - PatternFlowVlanId id = 3; + message Choice { + enum Enum { + unspecified = 0; + auto = 1; + value = 2; + } + } + // auto or configured value. + // default = Choice.Enum.auto + optional Choice.Enum choice = 1; + + // The OTG implementation will provide a system generated value for this property. + // If the OTG implementation is unable to generate a value the default value must be + // used. + // default = 4 + optional uint32 auto = 2; // Description missing in models - PatternFlowVlanTpid tpid = 4; + // default = 4 + optional uint32 value = 3; } -// VXLAN packet header -message FlowVxlan { +// The class number is used to identify the class of an object. Defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-4 +// . Curently supported class numbers are for Path message type. Path message: Supported +// Class numbers and it's value: SESSION: 1, RSVP_HOP: 3, TIME_VALUES: 5, EXPLICIT_ROUTE: +// 20, LABEL_REQUEST: 19, SESSION_ATTRIBUTE: 207, SENDER_TEMPLATE: 11, SENDER_TSPEC: +// 12, RECORD_ROUTE: 21, Custom: User defined bytes based on class and c-types not supported +// in above options. +message FlowRSVPPathObjectsClass { + message Choice { + enum Enum { + unspecified = 0; + session = 1; + rsvp_hop = 2; + time_values = 3; + explicit_route = 4; + label_request = 5; + session_attribute = 6; + sender_template = 7; + sender_tspec = 8; + record_route = 9; + custom = 10; + } + } // Description missing in models - PatternFlowVxlanFlags flags = 1; + // required = true + optional Choice.Enum choice = 1; // Description missing in models - PatternFlowVxlanReserved0 reserved0 = 2; + FlowRSVPPathObjectsClassSession session = 2; // Description missing in models - PatternFlowVxlanVni vni = 3; + FlowRSVPPathObjectsClassRsvpHop rsvp_hop = 3; // Description missing in models - PatternFlowVxlanReserved1 reserved1 = 4; -} - -// IPv4 packet header -message FlowIpv4 { + FlowRSVPPathObjectsClassTimeValues time_values = 4; // Description missing in models - PatternFlowIpv4Version version = 1; + FlowRSVPPathObjectsClassExplicitRoute explicit_route = 5; // Description missing in models - PatternFlowIpv4HeaderLength header_length = 2; + FlowRSVPPathObjectsClassLabelRequest label_request = 6; // Description missing in models - FlowIpv4Priority priority = 3; + FlowRSVPPathObjectsClassSessionAttribute session_attribute = 7; // Description missing in models - PatternFlowIpv4TotalLength total_length = 4; + FlowRSVPPathObjectsClassSenderTemplate sender_template = 8; // Description missing in models - PatternFlowIpv4Identification identification = 5; + FlowRSVPPathObjectsClassSenderTspec sender_tspec = 9; // Description missing in models - PatternFlowIpv4Reserved reserved = 6; + FlowRSVPPathObjectsClassRecordRoute record_route = 10; // Description missing in models - PatternFlowIpv4DontFragment dont_fragment = 7; + FlowRSVPPathObjectsCustom custom = 11; +} + +// C-Type is specific to a class num. +message FlowRSVPPathObjectsClassSession { + + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + FlowRSVPObjectLength length = 1; // Description missing in models - PatternFlowIpv4MoreFragments more_fragments = 8; + FlowRSVPPathObjectsSessionCType c_type = 2; +} + +// The body of an object corresponding to the class number and c-type. Currently supported +// c-type for SESSION object is LSP Tunnel IPv4 (7). +message FlowRSVPPathObjectsSessionCType { + message Choice { + enum Enum { + unspecified = 0; + lsp_tunnel_ipv4 = 1; + } + } // Description missing in models - PatternFlowIpv4FragmentOffset fragment_offset = 9; + // default = Choice.Enum.lsp_tunnel_ipv4 + optional Choice.Enum choice = 1; // Description missing in models - PatternFlowIpv4TimeToLive time_to_live = 10; + FlowRSVPPathSessionLspTunnelIpv4 lsp_tunnel_ipv4 = 2; +} + +// Class = SESSION, LSP_TUNNEL_IPv4 C-Type = 7. +message FlowRSVPPathSessionLspTunnelIpv4 { // Description missing in models - PatternFlowIpv4Protocol protocol = 11; + PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress ipv4_tunnel_end_point_address = 1; // Description missing in models - PatternFlowIpv4HeaderChecksum header_checksum = 12; + PatternFlowRSVPPathSessionLspTunnelIpv4Reserved reserved = 2; // Description missing in models - PatternFlowIpv4Src src = 13; + PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId tunnel_id = 3; + + // A 32-bit identifier used in the SESSION that remains constant over the life of the + // tunnel. Normally set to all zeros. Ingress nodes that wish to narrow the scope of + // a SESSION to the ingress-egress pair may place their IPv4 address here as a globally + // unique identifier. + FlowRSVPPathSessionExtTunnelId extended_tunnel_id = 4; +} + +// Description missing in models +message FlowRSVPPathSessionExtTunnelId { + + message Choice { + enum Enum { + unspecified = 0; + as_integer = 1; + as_ipv4 = 2; + } + } + // 32 bit integer or IPv4 address. + // default = Choice.Enum.as_integer + optional Choice.Enum choice = 1; // Description missing in models - PatternFlowIpv4Dst dst = 14; + PatternFlowRSVPPathSessionExtTunnelIdAsInteger as_integer = 2; // Description missing in models - repeated FlowIpv4Options options = 15; + PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 as_ipv4 = 3; } -// IPv4 options are optional extensions for the IPv4 header that can be utilised to -// provide additional information about the IPv4 datagram. It is encoded as a series -// of type, length and value attributes. The IP header length MUST be increased to -// accommodate the extra bytes needed to encode the IP options. The length of the all -// options included to a IPv4 header should not exceed 40 bytes since IPv4 Header length -// (4 bits) can at max specify 15 4-word octets for a total of 60 bytes which includes -// 20 bytes needed for mandatory attributes of the IPv4 header. If the user adds multiples -// IPv4 options that exceeds 40 bytes and specify header length as auto, implementation -// should throw error. Currently IP options supported are: 1. router_alert option allows -// devices to intercept packets not addressed to them directly as defined in RFC2113. -// 2. custom option is provided to configure user defined IP options as needed. -message FlowIpv4Options { +// C-Type is specific to a class num. +message FlowRSVPPathObjectsClassRsvpHop { + + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + FlowRSVPObjectLength length = 1; + + // Description missing in models + FlowRSVPPathObjectsRsvpHopCType c_type = 2; +} + +// Object for RSVP_HOP class. Currently supported c-type is IPv4 (1). +message FlowRSVPPathObjectsRsvpHopCType { message Choice { enum Enum { unspecified = 0; - router_alert = 1; - custom = 2; + ipv4 = 1; } } // Description missing in models - // default = Choice.Enum.router_alert + // default = Choice.Enum.ipv4 optional Choice.Enum choice = 1; // Description missing in models - FlowIpv4OptionsCustom custom = 2; + FlowRSVPPathRsvpHopIpv4 ipv4 = 2; } -// User defined IP options to be appended to the IPv4 header. -message FlowIpv4OptionsCustom { +// IPv4 RSVP_HOP object: Class = 3, C-Type = 1 +message FlowRSVPPathRsvpHopIpv4 { // Description missing in models - FlowIpv4OptionsCustomType type = 1; + PatternFlowRSVPPathRsvpHopIpv4Ipv4Address ipv4_address = 1; // Description missing in models - FlowIpv4OptionsCustomLength length = 2; - - // Value of the option field should not excced 38 bytes since maximum 40 bytes can be - // added as options in IPv4 header. For type and length requires 2 bytes, hence maximum - // of 38 bytes are expected. Maximum length of this attribute is 76 (38 * 2 hex character - // per byte). - // default = 0000 - optional string value = 3; + PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle logical_interface_handle = 2; } -// Type options for custom options. -message FlowIpv4OptionsCustomType { - - // Description missing in models - PatternFlowIpv4OptionsCustomTypeCopiedFlag copied_flag = 1; +// C-Type is specific to a class num. +message FlowRSVPPathObjectsClassTimeValues { - // Description missing in models - PatternFlowIpv4OptionsCustomTypeOptionClass option_class = 2; + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + FlowRSVPObjectLength length = 1; // Description missing in models - PatternFlowIpv4OptionsCustomTypeOptionNumber option_number = 3; + FlowRSVPPathObjectsTimeValuesCType c_type = 2; } -// Length for custom options. -message FlowIpv4OptionsCustomLength { +// Object for TIME_VALUES class. Currently supported c-type is Type 1 Time Value (1). +message FlowRSVPPathObjectsTimeValuesCType { message Choice { enum Enum { unspecified = 0; - auto = 1; - value = 2; + type_1 = 1; } } - // auto or configured value. - // default = Choice.Enum.auto + // Description missing in models + // default = Choice.Enum.type_1 optional Choice.Enum choice = 1; - // The OTG implementation can provide a system generated value for this property. If - // the OTG is unable to generate a value the default value must be used. - // default = 0 - optional uint32 auto = 2; + // Description missing in models + FlowRSVPPathTimeValuesType1 type_1 = 2; +} + +// TIME_VALUES Object: Class = 5, C-Type = 1 +message FlowRSVPPathTimeValuesType1 { // Description missing in models - // default = 0 - optional uint32 value = 3; + PatternFlowRSVPPathTimeValuesType1RefreshPeriodR refresh_period_r = 1; } -// A container for ipv4 raw, tos, dscp ip priorities. -message FlowIpv4Priority { +// C-Type is specific to a class num. +message FlowRSVPPathObjectsClassExplicitRoute { + + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + FlowRSVPObjectLength length = 1; + + // Description missing in models + FlowRSVPPathObjectsClassExplicitRouteCType c_type = 2; +} + +// Object for EXPLICIT_ROUTE class and c-type is Type 1 Explicit Route (1). +message FlowRSVPPathObjectsClassExplicitRouteCType { message Choice { enum Enum { unspecified = 0; - raw = 1; - tos = 2; - dscp = 3; + type_1 = 1; } } // Description missing in models - // default = Choice.Enum.dscp + // default = Choice.Enum.type_1 optional Choice.Enum choice = 1; // Description missing in models - PatternFlowIpv4PriorityRaw raw = 2; - - // Description missing in models - FlowIpv4Tos tos = 3; - - // Description missing in models - FlowIpv4Dscp dscp = 4; + FlowRSVPPathExplicitRouteType1 type_1 = 2; } -// Differentiated services code point (DSCP) packet field. -message FlowIpv4Dscp { - - // Description missing in models - PatternFlowIpv4DscpPhb phb = 1; +// Type1 Explicit Route has subobjects. Currently supported subobjects are IPv4 prefix +// and Autonomous system number. +message FlowRSVPPathExplicitRouteType1 { // Description missing in models - PatternFlowIpv4DscpEcn ecn = 2; + repeated FlowRSVPType1ExplicitRouteSubobjects subobjects = 1; } -// Type of service (TOS) packet field. -message FlowIpv4Tos { - - // Description missing in models - PatternFlowIpv4TosPrecedence precedence = 1; +// Type is specific to a subobject. +message FlowRSVPType1ExplicitRouteSubobjects { // Description missing in models - PatternFlowIpv4TosDelay delay = 2; + FlowRSVPType1ExplicitRouteSubobjectsType type = 1; +} - // Description missing in models - PatternFlowIpv4TosThroughput throughput = 3; +// Currently supported subobjects are IPv4 address(1) and Autonomous system number(32). +message FlowRSVPType1ExplicitRouteSubobjectsType { + message Choice { + enum Enum { + unspecified = 0; + ipv4_prefix = 1; + as_number = 2; + } + } // Description missing in models - PatternFlowIpv4TosReliability reliability = 4; + // default = Choice.Enum.ipv4_prefix + optional Choice.Enum choice = 1; // Description missing in models - PatternFlowIpv4TosMonetary monetary = 5; + FlowRSVPPathExplicitRouteType1Ipv4Prefix ipv4_prefix = 2; // Description missing in models - PatternFlowIpv4TosUnused unused = 6; + FlowRSVPPathExplicitRouteType1ASNumber as_number = 3; } -// IPv6 packet header -message FlowIpv6 { +// Class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Prefix, C-Type: +// 1 +message FlowRSVPPathExplicitRouteType1Ipv4Prefix { // Description missing in models - PatternFlowIpv6Version version = 1; + PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit l_bit = 1; - // Description missing in models - PatternFlowIpv6TrafficClass traffic_class = 2; + // The Length contains the total length of the subobject in bytes,including L,Type and + // Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. + FlowRSVPExplicitRouteLength length = 2; // Description missing in models - PatternFlowIpv6FlowLabel flow_label = 3; + PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address ipv4_address = 3; - // Description missing in models - PatternFlowIpv6PayloadLength payload_length = 4; + // The prefix length of the IPv4 address. + // default = 32 + optional uint32 prefix = 4; +} - // Description missing in models - PatternFlowIpv6NextHeader next_header = 5; +// Class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Autonomous system +// number, C-Type: 32 +message FlowRSVPPathExplicitRouteType1ASNumber { // Description missing in models - PatternFlowIpv6HopLimit hop_limit = 6; + PatternFlowRSVPPathExplicitRouteType1ASNumberLBit l_bit = 1; - // Description missing in models - PatternFlowIpv6Src src = 7; + // The Length contains the total length of the subobject in bytes,including L, Type + // and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. + FlowRSVPExplicitRouteASNumberLength length = 2; - // Description missing in models - PatternFlowIpv6Dst dst = 8; + // Autonomous System number to be set in the ERO sub-object that this LSP should traverse + // through. This field is applicable only if the value of 'type' is set to 'as_number'. + // default = 0 + optional uint32 as_number = 3; } -// IEEE 802.1Qbb PFC Pause packet header. -message FlowPfcPause { +// Description missing in models +message FlowRSVPExplicitRouteLength { - // Description missing in models - PatternFlowPfcPauseDst dst = 1; + message Choice { + enum Enum { + unspecified = 0; + auto = 1; + value = 2; + } + } + // auto or configured value. + // default = Choice.Enum.auto + optional Choice.Enum choice = 1; - // Description missing in models - PatternFlowPfcPauseSrc src = 2; + // The OTG implementation will provide a system generated value for this property. + // If the OTG implementation is unable to generate a value the default value must be + // used. + // default = 8 + optional uint32 auto = 2; // Description missing in models - PatternFlowPfcPauseEtherType ether_type = 3; + // default = 8 + optional uint32 value = 3; +} - // Description missing in models - PatternFlowPfcPauseControlOpCode control_op_code = 4; +// Description missing in models +message FlowRSVPExplicitRouteASNumberLength { - // Description missing in models - PatternFlowPfcPauseClassEnableVector class_enable_vector = 5; + message Choice { + enum Enum { + unspecified = 0; + auto = 1; + value = 2; + } + } + // auto or configured value. + // default = Choice.Enum.auto + optional Choice.Enum choice = 1; - // Description missing in models - PatternFlowPfcPausePauseClass0 pause_class_0 = 6; + // The OTG implementation will provide a system generated value for this property. + // If the OTG implementation is unable to generate a value the default value must be + // used. + // default = 4 + optional uint32 auto = 2; // Description missing in models - PatternFlowPfcPausePauseClass1 pause_class_1 = 7; + // default = 4 + optional uint32 value = 3; +} - // Description missing in models - PatternFlowPfcPausePauseClass2 pause_class_2 = 8; +// C-Type is specific to a class num. +message FlowRSVPPathObjectsClassLabelRequest { - // Description missing in models - PatternFlowPfcPausePauseClass3 pause_class_3 = 9; + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + FlowRSVPObjectLength length = 1; // Description missing in models - PatternFlowPfcPausePauseClass4 pause_class_4 = 10; + FlowRSVPPathObjectsLabelRequestCType c_type = 2; +} - // Description missing in models - PatternFlowPfcPausePauseClass5 pause_class_5 = 11; +// Object for LABEL_REQUEST class. Currently supported c-type is Without Label Range +// (1). +message FlowRSVPPathObjectsLabelRequestCType { + message Choice { + enum Enum { + unspecified = 0; + without_label_range = 1; + } + } // Description missing in models - PatternFlowPfcPausePauseClass6 pause_class_6 = 12; + // default = Choice.Enum.without_label_range + optional Choice.Enum choice = 1; // Description missing in models - PatternFlowPfcPausePauseClass7 pause_class_7 = 13; + FlowRSVPPathLabelRequestWithoutLabelRange without_label_range = 2; } -// IEEE 802.3x global ethernet pause packet header -message FlowEthernetPause { +// Class = LABEL_REQUEST, Without Label Range C-Type = 1 +message FlowRSVPPathLabelRequestWithoutLabelRange { // Description missing in models - PatternFlowEthernetPauseDst dst = 1; + PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved reserved = 1; // Description missing in models - PatternFlowEthernetPauseSrc src = 2; + PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid l3pid = 2; +} - // Description missing in models - PatternFlowEthernetPauseEtherType ether_type = 3; +// C-Type is specific to a class num. +message FlowRSVPPathObjectsClassSessionAttribute { - // Description missing in models - PatternFlowEthernetPauseControlOpCode control_op_code = 4; + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + FlowRSVPObjectLength length = 1; // Description missing in models - PatternFlowEthernetPauseTime time = 5; + FlowRSVPPathObjectsSessionAttributeCType c_type = 2; } -// TCP packet header -message FlowTcp { - - // Description missing in models - PatternFlowTcpSrcPort src_port = 1; - - // Description missing in models - PatternFlowTcpDstPort dst_port = 2; +// Object for SESSION_ATTRIBUTE class. Currently supported c-type is LSP_Tunnel_RA (1) +// and LSP_Tunnel (7). +message FlowRSVPPathObjectsSessionAttributeCType { + message Choice { + enum Enum { + unspecified = 0; + lsp_tunnel = 1; + lsp_tunnel_ra = 2; + } + } // Description missing in models - PatternFlowTcpSeqNum seq_num = 3; + // default = Choice.Enum.lsp_tunnel + optional Choice.Enum choice = 1; // Description missing in models - PatternFlowTcpAckNum ack_num = 4; + FlowRSVPPathSessionAttributeLspTunnel lsp_tunnel = 2; // Description missing in models - PatternFlowTcpDataOffset data_offset = 5; + FlowRSVPPathSessionAttributeLspTunnelRa lsp_tunnel_ra = 3; +} - // Description missing in models - PatternFlowTcpEcnNs ecn_ns = 6; +// SESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 7, resource affinity information. +message FlowRSVPPathSessionAttributeLspTunnel { - // Description missing in models - PatternFlowTcpEcnCwr ecn_cwr = 7; + // The priority of the session with respect to taking resources,in the range of 0 to + // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether + // this session can preempt another session. + // default = 7 + optional uint32 setup_priority = 1; - // Description missing in models - PatternFlowTcpEcnEcho ecn_echo = 8; + // The priority of the session with respect to holding resources,in the range of 0 to + // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether + // this session can preempt another session. + // default = 7 + optional uint32 holding_priority = 2; - // Description missing in models - PatternFlowTcpCtlUrg ctl_urg = 9; + // 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired + FlowRSVPLspTunnelFlag flags = 3; - // Description missing in models - PatternFlowTcpCtlAck ctl_ack = 10; + // The length of the display string before padding, in bytes. + FlowRSVPSessionAttributeNameLength name_length = 4; - // Description missing in models - PatternFlowTcpCtlPsh ctl_psh = 11; + // A null padded string of characters. + // default = + optional string session_name = 5; +} - // Description missing in models - PatternFlowTcpCtlRst ctl_rst = 12; +// SESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 1, it carries resource affinity +// information. +message FlowRSVPPathSessionAttributeLspTunnelRa { - // Description missing in models - PatternFlowTcpCtlSyn ctl_syn = 13; + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // any of which renders a link unacceptable. A null set (all bits set to zero) doesn't + // render the link unacceptable. The most significant byte in the hex-string is the + // farthest to the left in the byte sequence. Leading zero bytes in the configured + // value may be omitted for brevity. + // default = 00 + optional string exclude_any = 1; - // Description missing in models - PatternFlowTcpCtlFin ctl_fin = 14; + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // any of which renders a link acceptable. A null set (all bits set to zero) automatically + // passes. The most significant byte in the hex-string is the farthest to the left + // in the byte sequence. Leading zero bytes in the configured value may be omitted + // for brevity. + // default = 00 + optional string include_any = 2; - // Description missing in models - PatternFlowTcpWindow window = 15; -} + // A 32-bit vector representing a set of attribute filters associated with a tunnel + // all of which must be present for a link to be acceptable. A null set (all bits set + // to zero) automatically passes. The most significant byte in the hex-string is the + // farthest to the left in the byte sequence. Leading zero bytes in the configured + // value may be omitted for brevity. + // default = 00 + optional string include_all = 3; -// UDP packet header -message FlowUdp { + // The priority of the session with respect to taking resources,in the range of 0 to + // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether + // this session can preempt another session. + // default = 7 + optional uint32 setup_priority = 4; - // Description missing in models - PatternFlowUdpSrcPort src_port = 1; + // The priority of the session with respect to holding resources,in the range of 0 to + // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether + // this session can preempt another session. + // default = 7 + optional uint32 holding_priority = 5; - // Description missing in models - PatternFlowUdpDstPort dst_port = 2; + // 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired + FlowRSVPLspTunnelFlag flags = 6; - // Description missing in models - PatternFlowUdpLength length = 3; + // The length of the display string before padding, in bytes. + FlowRSVPSessionAttributeNameLength name_length = 7; - // Description missing in models - PatternFlowUdpChecksum checksum = 4; + // A null padded string of characters. + // default = + optional string session_name = 8; } -// Standard GRE packet header (RFC2784) -message FlowGre { - - // Description missing in models - PatternFlowGreChecksumPresent checksum_present = 1; +// Description missing in models +message FlowRSVPLspTunnelFlag { + message Choice { + enum Enum { + unspecified = 0; + local_protection_desired = 1; + label_recording_desired = 2; + se_style_desired = 3; + } + } // Description missing in models - PatternFlowGreReserved0 reserved0 = 2; + // default = Choice.Enum.local_protection_desired + optional Choice.Enum choice = 1; +} - // Description missing in models - PatternFlowGreVersion version = 3; +// Description missing in models +message FlowRSVPSessionAttributeNameLength { - // Description missing in models - PatternFlowGreProtocol protocol = 4; + message Choice { + enum Enum { + unspecified = 0; + auto = 1; + value = 2; + } + } + // auto or configured value. + // default = Choice.Enum.auto + optional Choice.Enum choice = 1; - // Description missing in models - PatternFlowGreChecksum checksum = 5; + // The OTG implementation will provide a system generated value for this property. + // If the OTG implementation is unable to generate a value the default value must be + // used. + // default = 0 + optional uint32 auto = 2; // Description missing in models - PatternFlowGreReserved1 reserved1 = 6; + // default = 0 + optional uint32 value = 3; } -// GTPv1 packet header -message FlowGtpv1 { +// C-Type is specific to a class num. +message FlowRSVPPathObjectsClassSenderTemplate { - // Description missing in models - PatternFlowGtpv1Version version = 1; + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + FlowRSVPObjectLength length = 1; // Description missing in models - PatternFlowGtpv1ProtocolType protocol_type = 2; + FlowRSVPPathObjectsSenderTemplateCType c_type = 2; +} - // Description missing in models - PatternFlowGtpv1Reserved reserved = 3; +// Object for SENDER_TEMPLATE class. Currently supported c-type is LSP Tunnel IPv4 (7). +message FlowRSVPPathObjectsSenderTemplateCType { + message Choice { + enum Enum { + unspecified = 0; + lsp_tunnel_ipv4 = 1; + } + } // Description missing in models - PatternFlowGtpv1EFlag e_flag = 4; + // default = Choice.Enum.lsp_tunnel_ipv4 + optional Choice.Enum choice = 1; // Description missing in models - PatternFlowGtpv1SFlag s_flag = 5; + FlowRSVPPathSenderTemplateLspTunnelIpv4 lsp_tunnel_ipv4 = 2; +} - // Description missing in models - PatternFlowGtpv1PnFlag pn_flag = 6; +// Class = SENDER_TEMPLATE, LSP_TUNNEL_IPv4 C-Type = 7 +message FlowRSVPPathSenderTemplateLspTunnelIpv4 { // Description missing in models - PatternFlowGtpv1MessageType message_type = 7; + PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress ipv4_tunnel_sender_address = 1; // Description missing in models - PatternFlowGtpv1MessageLength message_length = 8; + PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved reserved = 2; // Description missing in models - PatternFlowGtpv1Teid teid = 9; + PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId lsp_id = 3; +} - // Description missing in models - PatternFlowGtpv1SquenceNumber squence_number = 10; +// C-Type is specific to a class num. +message FlowRSVPPathObjectsClassSenderTspec { - // Description missing in models - PatternFlowGtpv1NPduNumber n_pdu_number = 11; + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + FlowRSVPObjectLength length = 1; // Description missing in models - PatternFlowGtpv1NextExtensionHeaderType next_extension_header_type = 12; - - // A list of optional extension headers. - repeated FlowGtpExtension extension_headers = 13; + FlowRSVPPathObjectsSenderTspecCType c_type = 2; } -// Description missing in models -message FlowGtpExtension { - - // Description missing in models - PatternFlowGtpExtensionExtensionLength extension_length = 1; +// Object for SENDER_TSPEC class. Currently supported c-type is int-serv (2). +message FlowRSVPPathObjectsSenderTspecCType { + message Choice { + enum Enum { + unspecified = 0; + int_serv = 1; + } + } // Description missing in models - PatternFlowGtpExtensionContents contents = 2; + // default = Choice.Enum.int_serv + optional Choice.Enum choice = 1; // Description missing in models - PatternFlowGtpExtensionNextExtensionHeader next_extension_header = 3; + FlowRSVPPathSenderTspecIntServ int_serv = 2; } -// GTPv2 packet header -message FlowGtpv2 { +// int-serv SENDER_TSPEC object: Class = 12, C-Type = 2 +message FlowRSVPPathSenderTspecIntServ { // Description missing in models - PatternFlowGtpv2Version version = 1; + PatternFlowRSVPPathSenderTspecIntServVersion version = 1; // Description missing in models - PatternFlowGtpv2PiggybackingFlag piggybacking_flag = 2; + PatternFlowRSVPPathSenderTspecIntServReserved1 reserved1 = 2; // Description missing in models - PatternFlowGtpv2TeidFlag teid_flag = 3; + PatternFlowRSVPPathSenderTspecIntServOverallLength overall_length = 3; // Description missing in models - PatternFlowGtpv2Spare1 spare1 = 4; + PatternFlowRSVPPathSenderTspecIntServServiceHeader service_header = 4; // Description missing in models - PatternFlowGtpv2MessageType message_type = 5; + PatternFlowRSVPPathSenderTspecIntServZeroBit zero_bit = 5; // Description missing in models - PatternFlowGtpv2MessageLength message_length = 6; + PatternFlowRSVPPathSenderTspecIntServReserved2 reserved2 = 6; // Description missing in models - PatternFlowGtpv2Teid teid = 7; + PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData length_of_service_data = 7; // Description missing in models - PatternFlowGtpv2SequenceNumber sequence_number = 8; + PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec parameter_id_token_bucket_tspec = 8; // Description missing in models - PatternFlowGtpv2Spare2 spare2 = 9; -} - -// ARP packet header -message FlowArp { + PatternFlowRSVPPathSenderTspecIntServParameter127Flag parameter_127_flag = 9; // Description missing in models - PatternFlowArpHardwareType hardware_type = 1; + PatternFlowRSVPPathSenderTspecIntServParameter127Length parameter_127_length = 10; - // Description missing in models - PatternFlowArpProtocolType protocol_type = 2; + // Token bucket rate is set to sender's view of its generated traffic. + // default = 0 + optional float token_bucket_rate = 11; - // Description missing in models - PatternFlowArpHardwareLength hardware_length = 3; + // Token bucket size is set to sender's view of its generated traffic. + // default = 0 + optional float token_bucket_size = 12; - // Description missing in models - PatternFlowArpProtocolLength protocol_length = 4; + // The peak rate may be set to the sender's peak traffic generation rate (if known and + // controlled), the physical interface line rate (if known), or positive infinity (if + // no better value is available). + // default = 0 + optional float peak_data_rate = 13; // Description missing in models - PatternFlowArpOperation operation = 5; + PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit minimum_policed_unit = 14; // Description missing in models - PatternFlowArpSenderHardwareAddr sender_hardware_addr = 6; + PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize maximum_packet_size = 15; +} - // Description missing in models - PatternFlowArpSenderProtocolAddr sender_protocol_addr = 7; +// C-Type is specific to a class num. +message FlowRSVPPathObjectsClassRecordRoute { - // Description missing in models - PatternFlowArpTargetHardwareAddr target_hardware_addr = 8; + // A 16-bit field containing the total object length in bytes. Must always be a multiple + // of 4 or at least 4. + FlowRSVPObjectLength length = 1; // Description missing in models - PatternFlowArpTargetProtocolAddr target_protocol_addr = 9; + FlowRSVPPathObjectsRecordRouteCType c_type = 2; } -// ICMP packet header -message FlowIcmp { +// Object for RECORD_ROUTE class. c-type is Type 1 Route Record (1). +message FlowRSVPPathObjectsRecordRouteCType { message Choice { enum Enum { unspecified = 0; - echo = 1; + type_1 = 1; } } // Description missing in models - // default = Choice.Enum.echo + // default = Choice.Enum.type_1 optional Choice.Enum choice = 1; // Description missing in models - FlowIcmpEcho echo = 2; + FlowRSVPPathRecordRouteType1 type_1 = 2; } -// Packet Header for ICMP echo request -message FlowIcmpEcho { - - // Description missing in models - PatternFlowIcmpEchoType type = 1; - - // Description missing in models - PatternFlowIcmpEchoCode code = 2; +// Type1 record route has list of subobjects. Currently supported subobjects are IPv4 +// address(1) and Label(3). +message FlowRSVPPathRecordRouteType1 { // Description missing in models - PatternFlowIcmpEchoChecksum checksum = 3; + repeated FlowRSVPType1RecordRouteSubobjects subobjects = 1; +} - // Description missing in models - PatternFlowIcmpEchoIdentifier identifier = 4; +// Type is specific to a subobject. +message FlowRSVPType1RecordRouteSubobjects { // Description missing in models - PatternFlowIcmpEchoSequenceNumber sequence_number = 5; + FlowRSVPPathObjectsRecordRouteSubObjectType type = 1; } -// ICMPv6 packet header -message FlowIcmpv6 { +// Currently supported subobjects are IPv4 address(1) and Label(3). +message FlowRSVPPathObjectsRecordRouteSubObjectType { message Choice { enum Enum { unspecified = 0; - echo = 1; + ipv4_address = 1; + label = 2; } } // Description missing in models - // default = Choice.Enum.echo + // default = Choice.Enum.ipv4_address optional Choice.Enum choice = 1; // Description missing in models - FlowIcmpv6Echo echo = 2; + FlowRSVPPathRecordRouteType1Ipv4Address ipv4_address = 2; + + // Description missing in models + FlowRSVPPathRecordRouteType1Label label = 3; } -// Packet Header for ICMPv6 Echo -message FlowIcmpv6Echo { +// Class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Address, C-Type: +// 1 +message FlowRSVPPathRecordRouteType1Ipv4Address { - // Description missing in models - PatternFlowIcmpv6EchoType type = 1; + // The Length contains the total length of the subobject in bytes, including the Type + // and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. + FlowRSVPRouteRecordLength length = 1; // Description missing in models - PatternFlowIcmpv6EchoCode code = 2; + PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address ipv4_address = 2; // Description missing in models - PatternFlowIcmpv6EchoIdentifier identifier = 3; + PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength prefix_length = 3; - // Description missing in models - PatternFlowIcmpv6EchoSequenceNumber sequence_number = 4; + // 0x01 local_protection_available, 0x02 local_protection_in_use + FlowRSVPRecordRouteIPv4Flag flags = 4; +} + +// Description missing in models +message FlowRSVPRecordRouteIPv4Flag { + message Choice { + enum Enum { + unspecified = 0; + local_protection_available = 1; + local_protection_in_use = 2; + } + } // Description missing in models - PatternFlowIcmpv6EchoChecksum checksum = 5; + // default = Choice.Enum.local_protection_available + optional Choice.Enum choice = 1; } -// PPP packet header -message FlowPpp { +// Class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Label, C-Type: 3 +message FlowRSVPPathRecordRouteType1Label { - // Description missing in models - PatternFlowPppAddress address = 1; + // The Length contains the total length of the subobject in bytes, including the Type + // and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. + FlowRSVPRouteRecordLength length = 1; // Description missing in models - PatternFlowPppControl control = 2; + PatternFlowRSVPPathRecordRouteType1LabelFlags flags = 2; // Description missing in models - PatternFlowPppProtocolType protocol_type = 3; -} - -// IGMPv1 packet header -message FlowIgmpv1 { + PatternFlowRSVPPathRecordRouteType1LabelCType c_type = 3; - // Description missing in models - PatternFlowIgmpv1Version version = 1; + // The contents of the Label Object. Copied from the Label Object. + FlowRSVPPathRecordRouteLabel label = 4; +} - // Description missing in models - PatternFlowIgmpv1Type type = 2; +// Description missing in models +message FlowRSVPPathRecordRouteLabel { - // Description missing in models - PatternFlowIgmpv1Unused unused = 3; + message Choice { + enum Enum { + unspecified = 0; + as_integer = 1; + as_hex = 2; + } + } + // 32 bit integer or hex value. + // default = Choice.Enum.as_integer + optional Choice.Enum choice = 1; // Description missing in models - PatternFlowIgmpv1Checksum checksum = 4; + // default = 16 + optional uint32 as_integer = 2; - // Description missing in models - PatternFlowIgmpv1GroupAddress group_address = 5; + // Value of the this field should not excced 4 bytes. Maximum length of this attribute + // is 8 (4 * 2 hex character per byte). + // default = 10 + optional string as_hex = 3; } -// MPLS packet header; When configuring multiple such headers, the count shall not exceed -// 20. -message FlowMpls { - - // Description missing in models - PatternFlowMplsLabel label = 1; +// Description missing in models +message FlowRSVPRouteRecordLength { - // Description missing in models - PatternFlowMplsTrafficClass traffic_class = 2; + message Choice { + enum Enum { + unspecified = 0; + auto = 1; + value = 2; + } + } + // auto or configured value. + // default = Choice.Enum.auto + optional Choice.Enum choice = 1; - // Description missing in models - PatternFlowMplsBottomOfStack bottom_of_stack = 3; + // The OTG implementation will provide a system generated value for this property. + // If the OTG implementation is unable to generate a value the default value must be + // used. + // default = 8 + optional uint32 auto = 2; // Description missing in models - PatternFlowMplsTimeToLive time_to_live = 4; + // default = 8 + optional uint32 value = 3; } -// SNMPv2C packet header as defined in RFC1901 and RFC3416. -message FlowSnmpv2c { +// Custom packet header +message FlowRSVPPathObjectsCustom { // Description missing in models - PatternFlowSnmpv2cVersion version = 1; - - // It is an ASCII based octet string which identifies the SNMP community in which the - // sender and recipient of this message are located. It should match the read-only or - // read-write community string configured on the recipient for the PDU to be accepted. - // default = community - optional string community = 2; + PatternFlowRSVPPathObjectsCustomType type = 1; // Description missing in models - // required = true - FlowSnmpv2cData data = 3; + FlowRSVPObjectLength length = 2; + + // A custom packet header defined as a string of hex bytes. The string MUST contain + // sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be + // discarded. Value of the this field should not excced 65525 bytes since maximum 65528 + // bytes can be added as object-contents in RSVP header. For type and length requires + // 3 bytes, hence maximum of 65524 bytes are expected. Maximum length of this attribute + // is 131050 (65525 * 2 hex character per byte). + // default = 0000 + optional string bytes = 3; } -// This contains the body of the SNMPv2C message. -// -// - Encoding of subsequent fields follow ASN.1 specification. -// Refer: http://www.itu.int/ITU-T/asn1/ -message FlowSnmpv2cData { +// The frame size which overrides the total length of the packet +message FlowSize { message Choice { enum Enum { unspecified = 0; - get_request = 1; - get_next_request = 2; - response = 3; - set_request = 4; - get_bulk_request = 5; - inform_request = 6; - snmpv2_trap = 7; - report = 8; + fixed = 1; + increment = 2; + random = 3; + weight_pairs = 4; } } // Description missing in models - // required = true + // default = Choice.Enum.fixed optional Choice.Enum choice = 1; // Description missing in models - FlowSnmpv2cPDU get_request = 2; + // default = 64 + optional uint32 fixed = 2; // Description missing in models - FlowSnmpv2cPDU get_next_request = 3; + FlowSizeIncrement increment = 3; // Description missing in models - FlowSnmpv2cPDU response = 4; + FlowSizeRandom random = 4; // Description missing in models - FlowSnmpv2cPDU set_request = 5; + FlowSizeWeightPairs weight_pairs = 5; +} - // Description missing in models - FlowSnmpv2cBulkPDU get_bulk_request = 6; +// Frame size that increments from a starting size to +// an ending size incrementing by a step size. +message FlowSizeIncrement { - // Description missing in models - FlowSnmpv2cPDU inform_request = 7; + // Starting frame size in bytes + // default = 64 + optional uint32 start = 1; + + // Ending frame size in bytes + // default = 1518 + optional uint32 end = 2; + + // Step frame size in bytes + // default = 1 + optional uint32 step = 3; +} + +// Random frame size from a min value to a max value. +message FlowSizeRandom { // Description missing in models - FlowSnmpv2cPDU snmpv2_trap = 8; + // default = 64 + optional uint32 min = 1; // Description missing in models - FlowSnmpv2cPDU report = 9; + // default = 1518 + optional uint32 max = 2; } -// This contains the body of the SNMPv2C PDU. -message FlowSnmpv2cPDU { +// Frame size distribution, defined as pairs (including IMIX distribution). +// Frames are randomly generated such that the proportion of each frame size out of +// the total number of frames +// are matching with the weight value of the pair. However, as with any +// other probability +// distribution, the sample distribution is close to theoretical value only if the size +// of the sample is reasonably large. +// When the number of frames is very low the transmitted frames may not come close to +// the ratio described in the weight. +message FlowSizeWeightPairs { + message Choice { + enum Enum { + unspecified = 0; + predefined = 1; + custom = 2; + } + } // Description missing in models - PatternFlowSnmpv2cPDURequestId request_id = 1; + // default = Choice.Enum.predefined + optional Choice.Enum choice = 1; - message ErrorStatus { + message Predefined { enum Enum { unspecified = 0; - no_error = 1; - too_big = 2; - no_such_name = 3; - bad_value = 4; - read_only = 5; - gen_err = 6; - no_access = 7; - wrong_type = 8; - wrong_length = 9; - wrong_encoding = 10; - wrong_value = 11; - no_creation = 12; - inconsistent_value = 13; - resource_unavailable = 14; - commit_failed = 15; - undo_failed = 16; - authorization_error = 17; - not_writable = 18; - inconsistent_name = 19; + imix = 1; + ipsec_imix = 2; + ipv6_imix = 3; + standard_imix = 4; + tcp_imix = 5; } } - // The SNMP agent places an error code in this field in the response message if an error - // occurred processing the request. - // default = ErrorStatus.Enum.no_error - optional ErrorStatus.Enum error_status = 2; + // Specify predefined frame size distribution pairs (including IMIX distribution). + // + // The available predefined distribution pairs are: + // - IMIX (64:7, 570:4, and 1518:1) + // - IPSec IMIX (90:58.67, 92:2, 594:23.66 and 1418:15.67) + // - IPv6 IMIX (60:58.67, 496:2, 594:23.66 and 1518:15.67) + // - Standard IMIX (58:58.67, 62:2, 594:23.66 and 1518:15.67) + // - TCP IMIX (90:58.67, 92:2, 594:23.66 and 1518:15.67) + // default = Predefined.Enum.imix + optional Predefined.Enum predefined = 2; // Description missing in models - PatternFlowSnmpv2cPDUErrorIndex error_index = 3; + repeated FlowSizeWeightPairsCustom custom = 3; +} - // A Sequence of variable_bindings. - repeated FlowSnmpv2cVariableBinding variable_bindings = 4; +// Custom frame size distribution pair. +message FlowSizeWeightPairsCustom { + + // The size of the frame (in bytes) for this weight pair. + // default = 64 + optional uint32 size = 1; + + // Weight assigned to the corresponding frame size in this weight pair. + // Higher weight means more packets. + // default = 1 + optional float weight = 2; } -// The purpose of the GetBulkRequest-PDU is to request the transfer of a potentially -// large amount of data, including, but not limited to, the efficient and rapid retrieval -// of large tables. -message FlowSnmpv2cBulkPDU { +// The rate of packet transmission +message FlowRate { - // Description missing in models - PatternFlowSnmpv2cBulkPDURequestId request_id = 1; + message Choice { + enum Enum { + unspecified = 0; + pps = 1; + bps = 2; + kbps = 3; + mbps = 4; + gbps = 5; + percentage = 6; + } + } + // The available types of flow rate. + // default = Choice.Enum.pps + optional Choice.Enum choice = 1; - // Description missing in models - PatternFlowSnmpv2cBulkPDUNonRepeaters non_repeaters = 2; + // Packets per second. + // default = 1000 + optional uint64 pps = 2; - // Description missing in models - PatternFlowSnmpv2cBulkPDUMaxRepetitions max_repetitions = 3; + // Bits per second. + // default = 1000000000 + optional uint64 bps = 3; - // A Sequence of variable_bindings. - repeated FlowSnmpv2cVariableBinding variable_bindings = 4; -} + // Kilobits per second. + // default = 1000000 + optional uint64 kbps = 4; -// A Sequence of two fields, an object_identifier and the value for/from that object_identifier. -message FlowSnmpv2cVariableBinding { + // Megabits per second. + // default = 1000 + optional uint64 mbps = 5; - // The Object Identifier points to a particular parameter in the SNMP agent. - // - Encoding of this field follows RFC2578(section 3.5) and ASN.1 X.690(section 8.1.3.6) - // specification. - // Refer: http://www.itu.int/ITU-T/asn1/ - // - According to BER, the first two numbers of any OID (x.y) are encoded as one value - // using the formula (40*x)+y. - // Example, the first two numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, - // because (40*1)+3 = 43. - // - After the first two numbers are encoded, the subsequent numbers in the OID are - // each encoded as a byte. - // - However, a special rule is required for large numbers because one byte can only - // represent a number from 0-127. - // - The rule for large numbers states that only the lower 7 bits in the byte are used - // for holding the value (0-127). - // - The highest order bit(8th) is used as a flag to indicate that this number spans - // more than one byte. Therefore, any number over 127 must be encoded using more than - // one byte. - // - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0' cannot be - // encoded using a single byte. - // According to this rule, the number 2680 must be encoded as 0x94 0x78. - // Since the most significant bit is set in the first byte (0x94), it indicates - // that number spans to the next byte. - // Since the most significant bit is not set in the next byte (0x78), it indicates - // that the number ends at the second byte. - // The value is derived by appending 7 bits from each of the concatenated bytes - // i.e (0x14 *128^1) + (0x78 * 128^0) = 2680. - // default = 0.1 - optional string object_identifier = 1; + // Gigabits per second. + // default = 1 + optional uint32 gbps = 6; - // Description missing in models - FlowSnmpv2cVariableBindingValue value = 2; + // The percentage of a port location's available bandwidth. + // default = 100 + optional float percentage = 7; } -// The value for the object_identifier as per RFC2578. -message FlowSnmpv2cVariableBindingValue { +// A container for different transmit durations. +message FlowDuration { message Choice { enum Enum { unspecified = 0; - no_value = 1; - integer_value = 2; - string_value = 3; - object_identifier_value = 4; - ip_address_value = 5; - counter_value = 6; - timeticks_value = 7; - arbitrary_value = 8; - big_counter_value = 9; - unsigned_integer_value = 10; + fixed_packets = 1; + fixed_seconds = 2; + burst = 3; + continuous = 4; } } - // Description missing in models - // default = Choice.Enum.no_value - optional Choice.Enum choice = 1; - - // Description missing in models - PatternFlowSnmpv2cVariableBindingValueIntegerValue integer_value = 2; - - // Description missing in models - FlowSnmpv2cVariableBindingStringValue string_value = 3; - - // The Object Identifier points to a particular parameter in the SNMP agent. - // - Encoding of this field follows RFC2578(section 3.5) and ASN.1 X.690(section 8.1.3.6) - // specification. - // Refer: http://www.itu.int/ITU-T/asn1/ - // - According to BER, the first two numbers of any OID (x.y) are encoded as one value - // using the formula (40*x)+y. - // Example, the first two numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, - // because (40*1)+3 = 43. - // - After the first two numbers are encoded, the subsequent numbers in the OID are - // each encoded as a byte. - // - However, a special rule is required for large numbers because one byte can only - // represent a number from 0-127. - // - The rule for large numbers states that only the lower 7 bits in the byte are used - // for holding the value (0-127). - // - The highest order bit(8th) is used as a flag to indicate that this number spans - // more than one byte. Therefore, any number over 127 must be encoded using more than - // one byte. - // - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0' cannot be - // encoded using a single byte. - // According to this rule, the number 2680 must be encoded as 0x94 0x78. - // Since the most significant bit is set in the first byte (0x94), it indicates - // that number spans to the next byte. - // Since the most significant bit is not set in the next byte (0x78), it indicates - // that the number ends at the second byte. - // The value is derived by appending 7 bits from each of the concatenated bytes - // i.e (0x14 *128^1) + (0x78 * 128^0) = 2680. - // default = 0.1 - optional string object_identifier_value = 4; + // A choice used to determine the type of duration. + // default = Choice.Enum.continuous + optional Choice.Enum choice = 1; // Description missing in models - PatternFlowSnmpv2cVariableBindingValueIpAddressValue ip_address_value = 5; + FlowFixedPackets fixed_packets = 2; // Description missing in models - PatternFlowSnmpv2cVariableBindingValueCounterValue counter_value = 6; + FlowFixedSeconds fixed_seconds = 3; // Description missing in models - PatternFlowSnmpv2cVariableBindingValueTimeticksValue timeticks_value = 7; - - // It contains the hex bytes of the value to be sent. As of now it is restricted to - // 10000 bytes. - // default = 00 - optional string arbitrary_value = 8; + FlowBurst burst = 4; // Description missing in models - PatternFlowSnmpv2cVariableBindingValueBigCounterValue big_counter_value = 9; + FlowContinuous continuous = 5; +} + +// Transmit will be continuous and will not stop automatically. +message FlowContinuous { + + // The minimum gap between packets expressed as bytes. + // default = 12 + optional uint32 gap = 1; // Description missing in models - PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue unsigned_integer_value = 10; + FlowDelay delay = 2; } -// It contains the raw/ascii string value to be sent. -message FlowSnmpv2cVariableBindingStringValue { +// The optional container to specify the delay before starting +// transmission of packets. +message FlowDelay { message Choice { enum Enum { unspecified = 0; - ascii = 1; - raw = 2; + bytes = 1; + nanoseconds = 2; + microseconds = 3; } } // Description missing in models - // default = Choice.Enum.ascii + // default = Choice.Enum.bytes optional Choice.Enum choice = 1; - // It contains the ASCII string to be sent. As of now it is restricted to 10000 bytes. - // default = ascii - optional string ascii = 2; + // The delay before starting transmission of packets. + // A value of 0 indicates no delay. + // default = 0 + optional float bytes = 2; - // It contains the hex string to be sent. As of now it is restricted to 10000 bytes. - // default = 00 - optional string raw = 3; + // The delay before starting transmission of packets. + // A value of 0 indicates no delay. + // default = 0 + optional float nanoseconds = 3; + + // The delay before starting transmission of packets. + // A value of 0 indicates no delay. + // default = 0 + optional float microseconds = 4; } -// RSVP packet header as defined in RFC2205 and RFC3209. Currently only supported message -// type is Path with mandatory objects and sub-objects. -message FlowRsvp { +// Transmit a fixed number of packets after which the flow will stop. +message FlowFixedPackets { - // RSVP Protocol Version. + // Stop transmit of the flow after this number of packets. // default = 1 - optional uint32 version = 1; + optional uint32 packets = 1; - message Flag { - enum Enum { - unspecified = 0; - not_refresh_reduction_capable = 1; - refresh_reduction_capable = 2; - } - } - // Flag, 0x01-0x08: Reserved. - // default = Flag.Enum.not_refresh_reduction_capable - optional Flag.Enum flag = 2; + // The minimum gap between packets expressed as bytes. + // default = 12 + optional uint32 gap = 2; // Description missing in models - PatternFlowRsvpRsvpChecksum rsvp_checksum = 3; + FlowDelay delay = 3; +} - // Description missing in models - PatternFlowRsvpTimeToLive time_to_live = 4; +// Transmit for a fixed number of seconds after which the flow will stop. +message FlowFixedSeconds { - // Description missing in models - PatternFlowRsvpReserved reserved = 5; + // Stop transmit of the flow after this number of seconds. + // default = 1 + optional float seconds = 1; - // The sum of the lengths of the common header and all objects included in the message. - FlowRSVPLength rsvp_length = 6; + // The minimum gap between packets expressed as bytes. + // default = 12 + optional uint32 gap = 2; - // An 8-bit number that identifies the function of the RSVP message. There are aound - // 20 message types defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-2 - // . Among these presently supported is Path(value: 1) message type. - FlowRSVPMessage message_type = 7; + // Description missing in models + FlowDelay delay = 3; } -// Description missing in models -message FlowRSVPLength { - - message Choice { - enum Enum { - unspecified = 0; - auto = 1; - value = 2; - } - } - // auto or configured value. - // default = Choice.Enum.auto - optional Choice.Enum choice = 1; +// Transmits continuous or fixed burst of packets. +// For continuous burst of packets, it will not automatically stop. +// For fixed burst of packets, it will stop after transmitting fixed number of bursts. +// +message FlowBurst { - // The OTG implementation will provide a system generated value for this property. - // If the OTG implementation is unable to generate a value the default value must be - // used. + // The number of packet bursts transmitted per flow. + // A value of 0 implies continuous burst of packets. // default = 0 - optional uint32 auto = 2; + optional uint32 bursts = 1; + + // The number of packets transmitted per burst. + // default = 1 + optional uint32 packets = 2; + + // The minimum gap between packets expressed as bytes. + // default = 12 + optional uint32 gap = 3; // Description missing in models - // default = 0 - optional uint32 value = 3; + FlowDurationInterBurstGap inter_burst_gap = 4; } -// Description missing in models -message FlowRSVPMessage { +// The optional container for specifying a gap between bursts. +message FlowDurationInterBurstGap { message Choice { enum Enum { unspecified = 0; - path = 1; + bytes = 1; + nanoseconds = 2; + microseconds = 3; } } - // Description missing in models - // default = Choice.Enum.path + // The type of inter burst gap units. + // default = Choice.Enum.bytes optional Choice.Enum choice = 1; - // Description missing in models - FlowRSVPPathMessage path = 2; -} + // The amount of time between bursts expressed in bytes. + // A value of 0 indicates no gap between bursts. + // default = 12 + optional double bytes = 2; -// Path message requires the following list of objects in order as defined in https://www.rfc-editor.org/rfc/rfc3209.html#page-15: -// 1. SESSION 2. RSVP_HOP 3. TIME_VALUES 4. EXPLICIT_ROUTE [optional] 5. LABEL_REQUEST -// 6. SESSION_ATTRIBUTE [optional] 7. SENDER_TEMPLATE 8. SENDER_TSPEC 9. RECORD_ROUTE -// [optional] -message FlowRSVPPathMessage { + // The amount of time between bursts expressed in nanoseconds. + // A value of 0 indicates no gap between bursts. + // default = 96 + optional double nanoseconds = 3; - // Path message requires atleast SESSION, RSVP_HOP, TIME_VALUES, LABEL_REQUEST, SENDER_TEMPLATE - // and SENDER_TSPEC objects in order. - repeated FlowRSVPPathObjects objects = 1; + // The amount of time between bursts expressed in microseconds. + // A value of 0 indicates no gap between bursts. + // default = 0.096 + optional double microseconds = 4; } -// Every RSVP object encapsulated in an RSVP message consists of a 32-bit word header -// and the object's contents. -message FlowRSVPPathObjects { +// The optional container for configuring flow metrics. +message FlowMetrics { - // Description missing in models - FlowRSVPPathObjectsClass class_num = 1; + // Enables flow metrics. + // Enabling this option may affect the resultant packet payload due to + // additional instrumentation data. + // default = False + optional bool enable = 1; + + // Enables additional flow metric loss calculation. + // default = False + optional bool loss = 2; + + // Rx Tx ratio. + FlowRxTxRatio rx_tx_ratio = 6; + + // Enables additional flow metric first and last timestamps. + // default = False + optional bool timestamps = 3; + + // Latency metrics. + FlowLatencyMetrics latency = 4; + + // Predefined metric tags + FlowPredefinedTags predefined_metric_tags = 5; } -// Description missing in models -message FlowRSVPObjectLength { +// The optional container for per flow latency metric configuration. +message FlowLatencyMetrics { - message Choice { + // True to enable latency metrics using timestamps. + // + // Enabling this option may affect the resultant packet payload due to + // additional instrumentation data. + // default = False + optional bool enable = 1; + + message Mode { enum Enum { unspecified = 0; - auto = 1; - value = 2; + store_forward = 1; + cut_through = 2; } } - // auto or configured value. - // default = Choice.Enum.auto - optional Choice.Enum choice = 1; + // Select the type of latency measurement. The different types of + // latency measurements are: + // + // + // store_forward: + // The time interval starting when the last bit of the frame leaves the + // sending port and ending when the first bit of the frame is seen on + // the receiving port (LIFO). This is based on the RFC 1242 standard. + // + // + // cut_through: + // The time interval starting when the first bit of the frame leaves + // the sending port and ending when the first bit of the frame is seen + // on the receiving port (FIFO). This is based on the RFC 1242 + // standard. + // default = Mode.Enum.store_forward + optional Mode.Enum mode = 2; +} - // The OTG implementation will provide a system generated value for this property. - // If the OTG implementation is unable to generate a value the default value must be - // used. - // default = 4 - optional uint32 auto = 2; +// List of predefined flow tracking options, outside packet fields, that can be enabled. +message FlowPredefinedTags { - // Description missing in models - // default = 4 - optional uint32 value = 3; + // Enables Rx port or lag level disaggregation with predefined metrics tag name set + // as rx_name. + // The Rx port / lag names can be found under tagged_metrics tag names in flow metrics + // response. + // default = False + optional bool rx_name = 1; } -// The class number is used to identify the class of an object. Defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-4 -// . Curently supported class numbers are for Path message type. Path message: Supported -// Class numbers and it's value: SESSION: 1, RSVP_HOP: 3, TIME_VALUES: 5, EXPLICIT_ROUTE: -// 20, LABEL_REQUEST: 19, SESSION_ATTRIBUTE: 207, SENDER_TEMPLATE: 11, SENDER_TSPEC: -// 12, RECORD_ROUTE: 21, Custom: User defined bytes based on class and c-types not supported -// in above options. -message FlowRSVPPathObjectsClass { +// Rx Tx ratio is the ratio of expected number of Rx packets across all Rx ports to +// the Tx packets +// for the configured flow. It is a factor by which the Tx packet count is multiplied +// to calculate +// the sum of expected Rx packet count, across all Rx ports. This will be used to calculate +// loss +// percentage of flow at aggregate level. +message FlowRxTxRatio { message Choice { enum Enum { unspecified = 0; - session = 1; - rsvp_hop = 2; - time_values = 3; - explicit_route = 4; - label_request = 5; - session_attribute = 6; - sender_template = 7; - sender_tspec = 8; - record_route = 9; - custom = 10; + rx_count = 1; + value = 2; } } // Description missing in models - // required = true + // default = Choice.Enum.value optional Choice.Enum choice = 1; // Description missing in models - FlowRSVPPathObjectsClassSession session = 2; + FlowRxTxRatioRxCount rx_count = 2; - // Description missing in models - FlowRSVPPathObjectsClassRsvpHop rsvp_hop = 3; + // Should be a positive, non-zero value. The default value of 1, is when the Rx packet + // count across + // all ports is expected to match the Tx packet count. A custom integer value (>1) can + // be specified for + // loss calculation for cases when there are multiple destination addresses configured + // within one flow, + // but DUT is configured to replicate only to a subset of Rx ports. For cases when Tx + // side generates two + // packets from each source in 1:1 protection mode but only one of the two packets are + // received by the + // Rx port, we may need to specify a fractional value instead. + // default = 1.0 + optional float value = 3; +} - // Description missing in models - FlowRSVPPathObjectsClassTimeValues time_values = 4; +// This is for cases where one copy of Tx packet is received on all Rx ports and so +// the sum total of Rx packets +// received across all Rx ports is a multiple of Rx port count and Tx packets. +message FlowRxTxRatioRxCount { +} - // Description missing in models - FlowRSVPPathObjectsClassExplicitRoute explicit_route = 5; +// The optional container for event configuration. +message Event { - // Description missing in models - FlowRSVPPathObjectsClassLabelRequest label_request = 6; + // True to enable all events. + // Enabling this option may affect the resultant packet payload due to + // additional instrumentation data. + // default = False + optional bool enable = 1; // Description missing in models - FlowRSVPPathObjectsClassSessionAttribute session_attribute = 7; + EventLink link = 2; // Description missing in models - FlowRSVPPathObjectsClassSenderTemplate sender_template = 8; + EventRxRateThreshold rx_rate_threshold = 3; // Description missing in models - FlowRSVPPathObjectsClassSenderTspec sender_tspec = 9; + EventRouteAdvertiseWithdraw route_advertise_withdraw = 4; +} - // Description missing in models - FlowRSVPPathObjectsClassRecordRoute record_route = 10; +// The optional container for rx rate threshold event configuration. +message EventRxRateThreshold { - // Description missing in models - FlowRSVPPathObjectsCustom custom = 11; + // True to enable the rx_rate_threshold event. + // Enabling this option may affect the resultant packet payload due to + // additional instrumentation data. + // default = False + optional bool enable = 1; + + // True to enable notifications when the rx rate of a flow passes above + // or below the threshold value. + // default = 95 + optional float threshold = 2; } -// C-Type is specific to a class num. -message FlowRSVPPathObjectsClassSession { +// The optional container for link up/down event configuration. +message EventLink { - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - FlowRSVPObjectLength length = 1; + // True to enable notifications when a link up/down event occurs. + // default = False + optional bool enable = 1; +} - // Description missing in models - FlowRSVPPathObjectsSessionCType c_type = 2; +// The optional container for route advertise/withdraw event configuration. +message EventRouteAdvertiseWithdraw { + + // True to enable notifications when a route advertise/withdraw + // event occurs. + // default = False + optional bool enable = 1; } -// The body of an object corresponding to the class number and c-type. Currently supported -// c-type for SESSION object is LSP Tunnel IPv4 (7). -message FlowRSVPPathObjectsSessionCType { +// Description missing in models +message EventRequest { - message Choice { + message Type { enum Enum { unspecified = 0; - lsp_tunnel_ipv4 = 1; + link_down = 1; + link_up = 2; + route_withdraw = 3; + route_advertise = 4; + flow_rx_rate_above_threshold = 5; + flow_rx_rate_below_threshold = 6; } } - // Description missing in models - // default = Choice.Enum.lsp_tunnel_ipv4 - optional Choice.Enum choice = 1; + // Constrain the events being returned by specifying event types. + // If the list is empty then all event types will be returned. + repeated Type.Enum type = 1; - // Description missing in models - FlowRSVPPathSessionLspTunnelIpv4 lsp_tunnel_ipv4 = 2; + // Constrain the events being returned by specifying event sources. + // If the list is empty then all event sources will be returned. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Bgp.V4RouteRange/name + // - /components/schemas/Bgp.V6RouteRange/name + // + // + // x-constraint: + // - /components/schemas/Port/properties/name + // - /components/schemas/Bgp.V4RouteRange/name + // - /components/schemas/Bgp.V6RouteRange/name + // + repeated string source = 2; } -// Class = SESSION, LSP_TUNNEL_IPv4 C-Type = 7. -message FlowRSVPPathSessionLspTunnelIpv4 { +// A container that describes what events a system should provide and +// optionally where to publish them. +message EventSubscription { // Description missing in models - PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress ipv4_tunnel_end_point_address = 1; + EventRequest events = 1; - // Description missing in models - PatternFlowRSVPPathSessionLspTunnelIpv4Reserved reserved = 2; + // Indicates where a client wants to be notified of the events set in + // the events property. + // If this property is empty or null then no event notifications will + // be forwarded. + optional string callback_url = 2; +} - // Description missing in models - PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId tunnel_id = 3; +// Configuration of LLDP protocol IEEE Ref: https://www.ieee802.org/1/files/public/docs2002/lldp-protocol-00.pdf +message Lldp { - // A 32-bit identifier used in the SESSION that remains constant over the life of the - // tunnel. Normally set to all zeros. Ingress nodes that wish to narrow the scope of - // a SESSION to the ingress-egress pair may place their IPv4 address here as a globally - // unique identifier. - FlowRSVPPathSessionExtTunnelId extended_tunnel_id = 4; + // The unique name of the object on which LLDP is running. + // required = true + LldpConnection connection = 1; + + // The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint + // identifier associated with the transmitting LLDP agent. If mac address is specified + // it should be in colon seperated mac address format. + LldpChassisId chassis_id = 2; + + // The Port ID is a mandatory TLV which identifies the port component of the endpoint + // identifier associated with the transmitting LLDP agent. If the specified port is + // an IEEE 802.3 Repeater port, then this TLV is optional. + LldpPortId port_id = 3; + + // The system name field shall contain an alpha-numeric string that indicates the system's + // administratively assigned name. The system name should be the system's fully qualified + // domain name. If implementations support IETF RFC 3418, the sysName object should + // be used for this field. + LldpSystemName system_name = 4; + + // Specifies the amount of time in seconds a receiving device should maintain LLDP information + // sent by the device before discarding it. + // default = 120 + optional uint32 hold_time = 5; + + // Set the transmission frequency of LLDP updates in seconds. + // default = 30 + optional uint32 advertisement_interval = 6; + + // Globally unique name of an object. It also serves as the primary key for arrays of + // objects. + // required = true + optional string name = 7; + + // The Organization Information is used to define the organization specific TLVs. The + // organization specific TLV is defined in IEEE 802.1AB-2016 specification. This category + // is provided to allow different organizations, such as IEEE 802.1, IEEE 802.3, IETF, + // as well as individual software and equipment vendors, to define TLVs that advertise + // information to remote entities attached to the same media. + repeated LldpOrgInfo org_infos = 8; } -// Description missing in models -message FlowRSVPPathSessionExtTunnelId { +// LLDP connection to a test port. In future if more connection options arise LLDP +// connection object will be enhanced. +message LldpConnection { message Choice { enum Enum { unspecified = 0; - as_integer = 1; - as_ipv4 = 2; + port_name = 1; } } - // 32 bit integer or IPv4 address. - // default = Choice.Enum.as_integer + // The name of the test port or other connection objects on which LLDP is configured. optional Choice.Enum choice = 1; - // Description missing in models - PatternFlowRSVPPathSessionExtTunnelIdAsInteger as_integer = 2; - - // Description missing in models - PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 as_ipv4 = 3; + // Name of the test port on which LLDP is configured on. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + optional string port_name = 2; } -// C-Type is specific to a class num. -message FlowRSVPPathObjectsClassRsvpHop { +// The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint +// identifier associated with the transmitting LLDP agent. This field identifies the +// format and source of the chassis identifier string. It is based on the enumerator +// defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. +message LldpChassisId { - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - FlowRSVPObjectLength length = 1; + message Choice { + enum Enum { + unspecified = 0; + mac_address_subtype = 1; + interface_name_subtype = 2; + local_subtype = 3; + } + } + // Chassis ID subtype to be used in Chassis ID TLV. + // default = Choice.Enum.mac_address_subtype + optional Choice.Enum choice = 1; + + // Description missing in models + LldpChassisMacSubType mac_address_subtype = 2; + + // Name of an interface of the chassis that uniquely identifies the chassis. + optional string interface_name_subtype = 3; - // Description missing in models - FlowRSVPPathObjectsRsvpHopCType c_type = 2; + // Locally assigned name of the chassis. + optional string local_subtype = 4; } -// Object for RSVP_HOP class. Currently supported c-type is IPv4 (1). -message FlowRSVPPathObjectsRsvpHopCType { +// The Port ID is a mandatory TLV which identifies the port component of the endpoint +// identifier associated with the transmitting LLDP agent.This field identifies the +// format and source of the port identifier string. It is based on the enumerator defined +// by the PtopoPortIdType object from RFC2922. +message LldpPortId { message Choice { enum Enum { unspecified = 0; - ipv4 = 1; + mac_address_subtype = 1; + interface_name_subtype = 2; + local_subtype = 3; } } - // Description missing in models - // default = Choice.Enum.ipv4 + // Port ID subtype to be used in Port ID TLV. + // default = Choice.Enum.interface_name_subtype optional Choice.Enum choice = 1; - // Description missing in models - FlowRSVPPathRsvpHopIpv4 ipv4 = 2; -} - -// IPv4 RSVP_HOP object: Class = 3, C-Type = 1 -message FlowRSVPPathRsvpHopIpv4 { - - // Description missing in models - PatternFlowRSVPPathRsvpHopIpv4Ipv4Address ipv4_address = 1; + // The MAC Address configured in the Port ID TLV. + optional string mac_address_subtype = 2; // Description missing in models - PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle logical_interface_handle = 2; -} - -// C-Type is specific to a class num. -message FlowRSVPPathObjectsClassTimeValues { - - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - FlowRSVPObjectLength length = 1; + LldpPortInterfaceNameSubType interface_name_subtype = 3; - // Description missing in models - FlowRSVPPathObjectsTimeValuesCType c_type = 2; + // The Locally assigned name configured in the Port ID TLV. + optional string local_subtype = 4; } -// Object for TIME_VALUES class. Currently supported c-type is Type 1 Time Value (1). -message FlowRSVPPathObjectsTimeValuesCType { +// The MAC address configured in the Chassis ID TLV. +message LldpChassisMacSubType { message Choice { enum Enum { unspecified = 0; - type_1 = 1; + auto = 1; + value = 2; } } - // Description missing in models - // default = Choice.Enum.type_1 + // In auto mode the system generated value is set for this property, while if the choice + // is selected as value, a user configured value will be used for this property. + // default = Choice.Enum.auto optional Choice.Enum choice = 1; - // Description missing in models - FlowRSVPPathTimeValuesType1 type_1 = 2; -} - -// TIME_VALUES Object: Class = 5, C-Type = 1 -message FlowRSVPPathTimeValuesType1 { + // The OTG implementation must provide a system generated value for this property. + optional string auto = 2; - // Description missing in models - PatternFlowRSVPPathTimeValuesType1RefreshPeriodR refresh_period_r = 1; + // User must specify a value if mode is not auto. + optional string value = 3; } -// C-Type is specific to a class num. -message FlowRSVPPathObjectsClassExplicitRoute { +// The interface name configured in the Port ID TLV. +message LldpPortInterfaceNameSubType { - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - FlowRSVPObjectLength length = 1; + message Choice { + enum Enum { + unspecified = 0; + auto = 1; + value = 2; + } + } + // In auto mode the system generated value is set for this property, while if the choice + // is selected as value, a user configured value will be used for this property. + // default = Choice.Enum.auto + optional Choice.Enum choice = 1; - // Description missing in models - FlowRSVPPathObjectsClassExplicitRouteCType c_type = 2; + // The OTG implementation must provide a system generated value for this property. + optional string auto = 2; + + // User must specify a value if mode is not auto. + optional string value = 3; } -// Object for EXPLICIT_ROUTE class and c-type is Type 1 Explicit Route (1). -message FlowRSVPPathObjectsClassExplicitRouteCType { +// The system Name configured in the System Name TLV. +message LldpSystemName { message Choice { enum Enum { unspecified = 0; - type_1 = 1; + auto = 1; + value = 2; } } - // Description missing in models - // default = Choice.Enum.type_1 + // In auto mode the system generated value is set for this property, while if the choice + // is selected as value, a user configured value will be used for this property. + // default = Choice.Enum.auto optional Choice.Enum choice = 1; - // Description missing in models - FlowRSVPPathExplicitRouteType1 type_1 = 2; + // The OTG implementation must provide a system generated value for this property. + optional string auto = 2; + + // User must specify a value if mode is not auto. + optional string value = 3; } -// Type1 Explicit Route has subobjects. Currently supported subobjects are IPv4 prefix -// and Autonomous system number. -message FlowRSVPPathExplicitRouteType1 { +// The organization specific information configured in the Organization Specific TLV. +// +message LldpOrgInfo { - // Description missing in models - repeated FlowRSVPType1ExplicitRouteSubobjects subobjects = 1; -} + // The organizationally unique identifier field shall contain the organization's OUI + // as defined in Clause 9 of IEEE Std 802. It is a 24 bit number that uniquely identifies + // a vendor, manufacturer, or other organizations. + // default = 0080C2 + optional string oui = 1; -// Type is specific to a subobject. -message FlowRSVPType1ExplicitRouteSubobjects { + // The organizationally defined subtype field shall contain a unique subtype value assigned + // by the defining organization. + // default = 1 + optional uint32 subtype = 2; - // Description missing in models - FlowRSVPType1ExplicitRouteSubobjectsType type = 1; + // Contains the organizationally defined information. The actual format of the organizationally + // defined information string field is organizationally specific and can contain either + // binary or alpha-numeric information that is instance specific for the particular + // TLV type and subtype. Alpha-numeric information are encoded in UTF-8 (as specified + // in IETF RFC 3629). Or include one or more information fields with their associated + // field-type identifiers, designators similar to those in the Management Address TLV. + LldpOrgInfoType information = 3; } -// Currently supported subobjects are IPv4 address(1) and Autonomous system number(32). -message FlowRSVPType1ExplicitRouteSubobjectsType { +// Contains either the Alpha-numeric information encoded in UTF-8 (as specified in IETF +// RFC 3629) or include one or more information fields with their associated field-type +// identifiers designators, similar to those in the Management Address TLV. Currently +// only one choice as info is given in future if required it can be extended to define +// sub tlvs. +message LldpOrgInfoType { message Choice { enum Enum { unspecified = 0; - ipv4_prefix = 1; - as_number = 2; + info = 1; } } - // Description missing in models - // default = Choice.Enum.ipv4_prefix + // In info mode the organizationally defined information contain either binary or alpha-numeric + // information encoded in UTF-8 (as specified in IETF RFC 3629). + // default = Choice.Enum.info optional Choice.Enum choice = 1; - // Description missing in models - FlowRSVPPathExplicitRouteType1Ipv4Prefix ipv4_prefix = 2; - - // Description missing in models - FlowRSVPPathExplicitRouteType1ASNumber as_number = 3; + // The organizationally defined information encoded in UTF-8 (as specified in IETF RFC + // 3629). This byte stream can be of any length from 1 to 507 bytes. In the info byte + // stream, one byte is represented as string of 2 characters, for example 2 character + // string (0x)AB represents value of a single byte. So the maximum length of this attribute + // is 1014 (507 * 2 hex characters per byte). + optional string info = 2; } -// Class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Prefix, C-Type: -// 1 -message FlowRSVPPathExplicitRouteType1Ipv4Prefix { - - // Description missing in models - PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit l_bit = 1; +// Error response generated while serving API request. +message Error { - // The Length contains the total length of the subobject in bytes,including L,Type and - // Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. - FlowRSVPExplicitRouteLength length = 2; + // Numeric status code based on the underlying transport being used. + // The API server MUST set this code explicitly based on following references: + // - HTTP 4xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.5 + // - HTTP 5xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.6 + // - gRPC errors: https://grpc.github.io/grpc/core/md_doc_statuscodes.html + // required = true + optional int32 code = 1; - // Description missing in models - PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address ipv4_address = 3; + message Kind { + enum Enum { + unspecified = 0; + validation = 1; + internal = 2; + } + } + // Classification of error originating from within API server that may not be mapped + // to the value in `code`. + // Absence of this field may indicate that the error did not originate from within API + // server. + optional Kind.Enum kind = 2; - // The prefix length of the IPv4 address. - // default = 32 - optional uint32 prefix = 4; + // List of error messages generated while executing the request. + repeated string errors = 3; } -// Class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Autonomous system -// number, C-Type: 32 -message FlowRSVPPathExplicitRouteType1ASNumber { - - // Description missing in models - PatternFlowRSVPPathExplicitRouteType1ASNumberLBit l_bit = 1; - - // The Length contains the total length of the subobject in bytes,including L, Type - // and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. - FlowRSVPExplicitRouteASNumberLength length = 2; +// A list of warnings that have occurred while executing the request. +message Warning { - // Autonomous System number to be set in the ERO sub-object that this LSP should traverse - // through. This field is applicable only if the value of 'type' is set to 'as_number'. - // default = 0 - optional uint32 as_number = 3; + // A list of any system specific warnings that have occurred while + // executing the request. + repeated string warnings = 1; } -// Description missing in models -message FlowRSVPExplicitRouteLength { +// Request for updating specific attributes of resources in traffic generator +message ConfigUpdate { message Choice { enum Enum { unspecified = 0; - auto = 1; - value = 2; + flows = 1; } } - // auto or configured value. - // default = Choice.Enum.auto + // Description missing in models optional Choice.Enum choice = 1; - // The OTG implementation will provide a system generated value for this property. - // If the OTG implementation is unable to generate a value the default value must be - // used. - // default = 8 - optional uint32 auto = 2; - // Description missing in models - // default = 8 - optional uint32 value = 3; + FlowsUpdate flows = 2; } -// Description missing in models -message FlowRSVPExplicitRouteASNumberLength { +// A container of flows with associated properties to be updated without affecting the +// flows current transmit state. +message FlowsUpdate { - message Choice { + message PropertyNames { enum Enum { unspecified = 0; - auto = 1; - value = 2; + rate = 1; + size = 2; } } - // auto or configured value. - // default = Choice.Enum.auto - optional Choice.Enum choice = 1; - - // The OTG implementation will provide a system generated value for this property. - // If the OTG implementation is unable to generate a value the default value must be - // used. - // default = 4 - optional uint32 auto = 2; + // Flow properties to be updated without affecting the transmit state. + repeated PropertyNames.Enum property_names = 1; - // Description missing in models - // default = 4 - optional uint32 value = 3; + // The list of configured flows for which given property will be updated. + repeated Flow flows = 2; } -// C-Type is specific to a class num. -message FlowRSVPPathObjectsClassLabelRequest { +// Request for setting operational state of configured resources. +message ControlState { + + message Choice { + enum Enum { + unspecified = 0; + port = 1; + protocol = 2; + traffic = 3; + } + } + // Description missing in models + // required = true + optional Choice.Enum choice = 1; - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - FlowRSVPObjectLength length = 1; + // Description missing in models + StatePort port = 2; // Description missing in models - FlowRSVPPathObjectsLabelRequestCType c_type = 2; + StateProtocol protocol = 3; + + // Description missing in models + StateTraffic traffic = 4; } -// Object for LABEL_REQUEST class. Currently supported c-type is Without Label Range -// (1). -message FlowRSVPPathObjectsLabelRequestCType { +// States associated with configured ports. +message StatePort { message Choice { enum Enum { unspecified = 0; - without_label_range = 1; + link = 1; + capture = 2; } } // Description missing in models - // default = Choice.Enum.without_label_range + // required = true optional Choice.Enum choice = 1; // Description missing in models - FlowRSVPPathLabelRequestWithoutLabelRange without_label_range = 2; -} - -// Class = LABEL_REQUEST, Without Label Range C-Type = 1 -message FlowRSVPPathLabelRequestWithoutLabelRange { - - // Description missing in models - PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved reserved = 1; + StatePortLink link = 2; // Description missing in models - PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid l3pid = 2; + StatePortCapture capture = 3; } -// C-Type is specific to a class num. -message FlowRSVPPathObjectsClassSessionAttribute { +// States associated with configured flows +message StateTraffic { - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - FlowRSVPObjectLength length = 1; + message Choice { + enum Enum { + unspecified = 0; + flow_transmit = 1; + } + } + // Description missing in models + // required = true + optional Choice.Enum choice = 1; // Description missing in models - FlowRSVPPathObjectsSessionAttributeCType c_type = 2; + StateTrafficFlowTransmit flow_transmit = 2; } -// Object for SESSION_ATTRIBUTE class. Currently supported c-type is LSP_Tunnel_RA (1) -// and LSP_Tunnel (7). -message FlowRSVPPathObjectsSessionAttributeCType { +// States associated with protocols on configured resources. +message StateProtocol { message Choice { enum Enum { unspecified = 0; - lsp_tunnel = 1; - lsp_tunnel_ra = 2; + all = 1; + route = 2; + lacp = 3; + bgp = 4; + isis = 5; + ospfv2 = 6; } } // Description missing in models - // default = Choice.Enum.lsp_tunnel + // required = true optional Choice.Enum choice = 1; // Description missing in models - FlowRSVPPathSessionAttributeLspTunnel lsp_tunnel = 2; + StateProtocolAll all = 2; // Description missing in models - FlowRSVPPathSessionAttributeLspTunnelRa lsp_tunnel_ra = 3; -} + StateProtocolRoute route = 3; -// SESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 7, resource affinity information. -message FlowRSVPPathSessionAttributeLspTunnel { + // Description missing in models + StateProtocolLacp lacp = 4; - // The priority of the session with respect to taking resources,in the range of 0 to - // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether - // this session can preempt another session. - // default = 7 - optional uint32 setup_priority = 1; + // Description missing in models + StateProtocolBgp bgp = 5; - // The priority of the session with respect to holding resources,in the range of 0 to - // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether - // this session can preempt another session. - // default = 7 - optional uint32 holding_priority = 2; + // Description missing in models + StateProtocolIsis isis = 6; - // 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired - FlowRSVPLspTunnelFlag flags = 3; + // Description missing in models + StateProtocolOspfv2 ospfv2 = 7; +} - // The length of the display string before padding, in bytes. - FlowRSVPSessionAttributeNameLength name_length = 4; +// Sets the link of configured ports. +message StatePortLink { - // A null padded string of characters. - // default = - optional string session_name = 5; -} + // The names of target ports. An empty or null list will target all ports. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + repeated string port_names = 1; -// SESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 1, it carries resource affinity -// information. -message FlowRSVPPathSessionAttributeLspTunnelRa { + message State { + enum Enum { + unspecified = 0; + up = 1; + down = 2; + } + } + // The link state. + // required = true + optional State.Enum state = 2; +} - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // any of which renders a link unacceptable. A null set (all bits set to zero) doesn't - // render the link unacceptable. The most significant byte in the hex-string is the - // farthest to the left in the byte sequence. Leading zero bytes in the configured - // value may be omitted for brevity. - // default = 00 - optional string exclude_any = 1; +// Sets the capture state of configured ports +message StatePortCapture { - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // any of which renders a link acceptable. A null set (all bits set to zero) automatically - // passes. The most significant byte in the hex-string is the farthest to the left - // in the byte sequence. Leading zero bytes in the configured value may be omitted - // for brevity. - // default = 00 - optional string include_any = 2; + // The names of ports to which the capture state will be applied to. If the list of + // port_names is empty or null the state will be applied to all configured ports. + // If the list is not empty any port that is not included in the list of port_names + // MUST be ignored and not included in the state change. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + repeated string port_names = 1; - // A 32-bit vector representing a set of attribute filters associated with a tunnel - // all of which must be present for a link to be acceptable. A null set (all bits set - // to zero) automatically passes. The most significant byte in the hex-string is the - // farthest to the left in the byte sequence. Leading zero bytes in the configured - // value may be omitted for brevity. - // default = 00 - optional string include_all = 3; + message State { + enum Enum { + unspecified = 0; + start = 1; + stop = 2; + } + } + // The capture state. + // required = true + optional State.Enum state = 2; +} - // The priority of the session with respect to taking resources,in the range of 0 to - // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether - // this session can preempt another session. - // default = 7 - optional uint32 setup_priority = 4; +// Provides state control of flow transmission. +message StateTrafficFlowTransmit { - // The priority of the session with respect to holding resources,in the range of 0 to - // 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether - // this session can preempt another session. - // default = 7 - optional uint32 holding_priority = 5; + // The names of flows to which the transmit state will be applied to. If the list of + // flow_names is empty or null the state will be applied to all configured flows. + // If the list is not empty any flow that is not included in the list of flow_names + // MUST be ignored and not included in the state change. + // + // x-constraint: + // - /components/schemas/Flow/properties/name + // + // + // x-constraint: + // - /components/schemas/Flow/properties/name + // + repeated string flow_names = 1; - // 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired - FlowRSVPLspTunnelFlag flags = 6; + message State { + enum Enum { + unspecified = 0; + start = 1; + stop = 2; + pause = 3; + resume = 4; + } + } + // The transmit state. + // If the value of the state property is 'start' then all flows defined by the 'flow_names' + // property will be started and the metric counters MUST be cleared prior to starting + // the flow(s). + // If the value of the state property is 'stop' then all flows defined by the 'flow_names' + // property will be stopped and the metric counters MUST NOT be cleared. + // If the value of the state property is 'pause' then all flows defined by the 'flow_names' + // property will be paused and the metric counters MUST NOT be cleared. + // If the value of the state property is 'resume' then any paused flows defined by the + // 'flow_names' property will start transmit at the point at which they were paused. + // Any flow that is stopped will start transmit at the beginning of the flow. The flow(s) + // MUST NOT have their metric counters cleared. + // required = true + optional State.Enum state = 2; +} - // The length of the display string before padding, in bytes. - FlowRSVPSessionAttributeNameLength name_length = 7; +// Sets all configured protocols to `start` or `stop` state. +// Setting protocol state to `start` shall be a no-op if preceding `set_config` API +// call was made with `config.options.protocol_options.auto_start_all` set to `true` +// or if all the configured protocols are already started. +message StateProtocolAll { - // A null padded string of characters. - // default = - optional string session_name = 8; + message State { + enum Enum { + unspecified = 0; + start = 1; + stop = 2; + } + } + // Protocol states + // required = true + optional State.Enum state = 1; } -// Description missing in models -message FlowRSVPLspTunnelFlag { +// Sets the state of configured routes +message StateProtocolRoute { + + // The names of device route objects to control. If no names are specified then all + // route objects that match the x-constraint will be affected. + // + // x-constraint: + // - /components/schemas/Bgp.V4RouteRange/properties/name + // - /components/schemas/Bgp.V6RouteRange/properties/name + // - /components/schemas/Isis.V4RouteRange/properties/name + // - /components/schemas/Isis.V6RouteRange/properties/name + // - /components/schemas/Ospfv2.V4RouteRange/properties/name + // + // + // x-constraint: + // - /components/schemas/Bgp.V4RouteRange/properties/name + // - /components/schemas/Bgp.V6RouteRange/properties/name + // - /components/schemas/Isis.V4RouteRange/properties/name + // - /components/schemas/Isis.V6RouteRange/properties/name + // - /components/schemas/Ospfv2.V4RouteRange/properties/name + // + repeated string names = 1; - message Choice { + message State { enum Enum { unspecified = 0; - local_protection_desired = 1; - label_recording_desired = 2; - se_style_desired = 3; + withdraw = 1; + advertise = 2; } } - // Description missing in models - // default = Choice.Enum.local_protection_desired - optional Choice.Enum choice = 1; + // Route states + // required = true + optional State.Enum state = 2; } -// Description missing in models -message FlowRSVPSessionAttributeNameLength { +// Sets state of configured LACP +message StateProtocolLacp { message Choice { enum Enum { unspecified = 0; - auto = 1; - value = 2; + admin = 1; + member_ports = 2; } } - // auto or configured value. - // default = Choice.Enum.auto + // Description missing in models + // required = true optional Choice.Enum choice = 1; - // The OTG implementation will provide a system generated value for this property. - // If the OTG implementation is unable to generate a value the default value must be - // used. - // default = 0 - optional uint32 auto = 2; + // Description missing in models + StateProtocolLacpAdmin admin = 2; // Description missing in models - // default = 0 - optional uint32 value = 3; + StateProtocolLacpMemberPorts member_ports = 3; } -// C-Type is specific to a class num. -message FlowRSVPPathObjectsClassSenderTemplate { +// Sets admin state of LACP configured on LAG members +message StateProtocolLacpAdmin { - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - FlowRSVPObjectLength length = 1; + // The names of LAG members (ports) for which the state has to be applied. An empty + // or null list will control all LAG members. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + repeated string lag_member_names = 1; - // Description missing in models - FlowRSVPPathObjectsSenderTemplateCType c_type = 2; + message State { + enum Enum { + unspecified = 0; + up = 1; + down = 2; + } + } + // The LACP Member admin state. 'up' will send LACPDUs with 'sync' flag set on selected + // member ports. 'down' will send LACPDUs with 'sync' flag unset on selected member + // ports. + // required = true + optional State.Enum state = 2; } -// Object for SENDER_TEMPLATE class. Currently supported c-type is LSP Tunnel IPv4 (7). -message FlowRSVPPathObjectsSenderTemplateCType { +// Sets state of LACP member ports configured on LAG. +message StateProtocolLacpMemberPorts { - message Choice { + // The names of LAG members (ports) for which the state has to be applied. An empty + // or null list will control all LAG members. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + repeated string lag_member_names = 1; + + message State { enum Enum { unspecified = 0; - lsp_tunnel_ipv4 = 1; + up = 1; + down = 2; } } - // Description missing in models - // default = Choice.Enum.lsp_tunnel_ipv4 - optional Choice.Enum choice = 1; - - // Description missing in models - FlowRSVPPathSenderTemplateLspTunnelIpv4 lsp_tunnel_ipv4 = 2; + // The desired LACP member port state. + // required = true + optional State.Enum state = 2; } -// Class = SENDER_TEMPLATE, LSP_TUNNEL_IPv4 C-Type = 7 -message FlowRSVPPathSenderTemplateLspTunnelIpv4 { - - // Description missing in models - PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress ipv4_tunnel_sender_address = 1; +// Sets state of configured BGP peers. +message StateProtocolBgp { + message Choice { + enum Enum { + unspecified = 0; + peers = 1; + } + } // Description missing in models - PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved reserved = 2; + // required = true + optional Choice.Enum choice = 1; // Description missing in models - PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId lsp_id = 3; + StateProtocolBgpPeers peers = 2; } -// C-Type is specific to a class num. -message FlowRSVPPathObjectsClassSenderTspec { +// Sets state of configured BGP peers. +message StateProtocolBgpPeers { - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - FlowRSVPObjectLength length = 1; + // The names of BGP peers for which the state has to be applied. An empty or null list + // will control all BGP peers. + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + // + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + // + repeated string peer_names = 1; - // Description missing in models - FlowRSVPPathObjectsSenderTspecCType c_type = 2; + message State { + enum Enum { + unspecified = 0; + up = 1; + down = 2; + } + } + // The desired state of BGP peer. If the desired state is 'up', underlying IP interface(s) + // would be brought up automatically (if not already up), would attempt to bring up + // the BGP session(s) and advertise route(s), if configured. If the desired state is + // 'down', BGP session(s) would be brought down. + // required = true + optional State.Enum state = 2; } -// Object for SENDER_TSPEC class. Currently supported c-type is int-serv (2). -message FlowRSVPPathObjectsSenderTspecCType { +// Sets state of configured ISIS routers. +message StateProtocolIsis { message Choice { enum Enum { unspecified = 0; - int_serv = 1; + routers = 1; } } // Description missing in models - // default = Choice.Enum.int_serv + // required = true optional Choice.Enum choice = 1; // Description missing in models - FlowRSVPPathSenderTspecIntServ int_serv = 2; + StateProtocolIsisRouters routers = 2; } -// int-serv SENDER_TSPEC object: Class = 12, C-Type = 2 -message FlowRSVPPathSenderTspecIntServ { - - // Description missing in models - PatternFlowRSVPPathSenderTspecIntServVersion version = 1; - - // Description missing in models - PatternFlowRSVPPathSenderTspecIntServReserved1 reserved1 = 2; - - // Description missing in models - PatternFlowRSVPPathSenderTspecIntServOverallLength overall_length = 3; - - // Description missing in models - PatternFlowRSVPPathSenderTspecIntServServiceHeader service_header = 4; - - // Description missing in models - PatternFlowRSVPPathSenderTspecIntServZeroBit zero_bit = 5; - - // Description missing in models - PatternFlowRSVPPathSenderTspecIntServReserved2 reserved2 = 6; - - // Description missing in models - PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData length_of_service_data = 7; - - // Description missing in models - PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec parameter_id_token_bucket_tspec = 8; - - // Description missing in models - PatternFlowRSVPPathSenderTspecIntServParameter127Flag parameter_127_flag = 9; - - // Description missing in models - PatternFlowRSVPPathSenderTspecIntServParameter127Length parameter_127_length = 10; +// Sets state of configured ISIS routers. +message StateProtocolIsisRouters { - // Token bucket rate is set to sender's view of its generated traffic. - // default = 0 - optional float token_bucket_rate = 11; + // The names of ISIS routers for which the state has to be applied. An empty or null + // list will control all ISIS routers. + // + // x-constraint: + // - /components/schemas/Device.IsisRouter/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.IsisRouter/properties/name + // + repeated string router_names = 1; - // Token bucket size is set to sender's view of its generated traffic. - // default = 0 - optional float token_bucket_size = 12; + message State { + enum Enum { + unspecified = 0; + up = 1; + down = 2; + } + } + // The desired state of ISIS router. If the desired state is 'up', would attempt to + // bring up the ISIS session(s) with respective peer(s) and advertise route(s), if configured. + // If the desired state is 'down', would bring down ISIS session(s) with respective + // peer(s). + // required = true + optional State.Enum state = 2; +} - // The peak rate may be set to the sender's peak traffic generation rate (if known and - // controlled), the physical interface line rate (if known), or positive infinity (if - // no better value is available). - // default = 0 - optional float peak_data_rate = 13; +// Sets state of configured OSPFv2 routers. +message StateProtocolOspfv2 { + message Choice { + enum Enum { + unspecified = 0; + routers = 1; + } + } // Description missing in models - PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit minimum_policed_unit = 14; + // required = true + optional Choice.Enum choice = 1; // Description missing in models - PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize maximum_packet_size = 15; + StateProtocolOspfv2Routers routers = 2; } -// C-Type is specific to a class num. -message FlowRSVPPathObjectsClassRecordRoute { +// Sets state of configured OSPFv2 routers. +message StateProtocolOspfv2Routers { - // A 16-bit field containing the total object length in bytes. Must always be a multiple - // of 4 or at least 4. - FlowRSVPObjectLength length = 1; + // The names of OSPFv2 routers for which the state has to be applied. An empty or null + // list will control all OSPFv2 routers. + // + // x-constraint: + // - /components/schemas/Device.Ospfv2/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ospfv2/properties/name + // + repeated string router_names = 1; - // Description missing in models - FlowRSVPPathObjectsRecordRouteCType c_type = 2; + message State { + enum Enum { + unspecified = 0; + up = 1; + down = 2; + } + } + // The desired state of OSPFv2 router. If the desired state is 'up', would attempt to + // bring up the OSPFv2 session(s) with respective peer(s) and advertise route(s), if + // configured. If the desired state is 'down', would bring down OSPFv2 session(s) with + // respective peer(s). + // required = true + optional State.Enum state = 2; } -// Object for RECORD_ROUTE class. c-type is Type 1 Route Record (1). -message FlowRSVPPathObjectsRecordRouteCType { +// Request for triggering action against configured resources. +message ControlAction { message Choice { enum Enum { unspecified = 0; - type_1 = 1; + protocol = 1; } } // Description missing in models - // default = Choice.Enum.type_1 + // required = true optional Choice.Enum choice = 1; // Description missing in models - FlowRSVPPathRecordRouteType1 type_1 = 2; + ActionProtocol protocol = 2; } -// Type1 record route has list of subobjects. Currently supported subobjects are IPv4 -// address(1) and Label(3). -message FlowRSVPPathRecordRouteType1 { - - // Description missing in models - repeated FlowRSVPType1RecordRouteSubobjects subobjects = 1; -} +// Response for action triggered against configured resources along with warnings. +message ControlActionResponse { -// Type is specific to a subobject. -message FlowRSVPType1RecordRouteSubobjects { + // List of warnings generated while triggering specified action + repeated string warnings = 1; // Description missing in models - FlowRSVPPathObjectsRecordRouteSubObjectType type = 1; + ActionResponse response = 2; } -// Currently supported subobjects are IPv4 address(1) and Label(3). -message FlowRSVPPathObjectsRecordRouteSubObjectType { +// Response for action triggered against configured resources. +message ActionResponse { message Choice { enum Enum { unspecified = 0; - ipv4_address = 1; - label = 2; + protocol = 1; } } // Description missing in models - // default = Choice.Enum.ipv4_address + // required = true optional Choice.Enum choice = 1; // Description missing in models - FlowRSVPPathRecordRouteType1Ipv4Address ipv4_address = 2; - - // Description missing in models - FlowRSVPPathRecordRouteType1Label label = 3; -} - -// Class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Address, C-Type: -// 1 -message FlowRSVPPathRecordRouteType1Ipv4Address { - - // The Length contains the total length of the subobject in bytes, including the Type - // and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. - FlowRSVPRouteRecordLength length = 1; - - // Description missing in models - PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address ipv4_address = 2; - - // Description missing in models - PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength prefix_length = 3; - - // 0x01 local_protection_available, 0x02 local_protection_in_use - FlowRSVPRecordRouteIPv4Flag flags = 4; + ActionResponseProtocol protocol = 2; } -// Description missing in models -message FlowRSVPRecordRouteIPv4Flag { +// Actions associated with protocols on configured resources. +message ActionProtocol { message Choice { enum Enum { unspecified = 0; - local_protection_available = 1; - local_protection_in_use = 2; + ipv4 = 1; + ipv6 = 2; + bgp = 3; } } // Description missing in models - // default = Choice.Enum.local_protection_available + // required = true optional Choice.Enum choice = 1; -} - -// Class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Label, C-Type: 3 -message FlowRSVPPathRecordRouteType1Label { - - // The Length contains the total length of the subobject in bytes, including the Type - // and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. - FlowRSVPRouteRecordLength length = 1; // Description missing in models - PatternFlowRSVPPathRecordRouteType1LabelFlags flags = 2; + ActionProtocolIpv4 ipv4 = 2; // Description missing in models - PatternFlowRSVPPathRecordRouteType1LabelCType c_type = 3; + ActionProtocolIpv6 ipv6 = 3; - // The contents of the Label Object. Copied from the Label Object. - FlowRSVPPathRecordRouteLabel label = 4; + // Description missing in models + ActionProtocolBgp bgp = 4; } -// Description missing in models -message FlowRSVPPathRecordRouteLabel { +// Response for actions associated with protocols on configured resources. +message ActionResponseProtocol { message Choice { enum Enum { unspecified = 0; - as_integer = 1; - as_hex = 2; + ipv4 = 1; + ipv6 = 2; } } - // 32 bit integer or hex value. - // default = Choice.Enum.as_integer + // Description missing in models + // required = true optional Choice.Enum choice = 1; // Description missing in models - // default = 16 - optional uint32 as_integer = 2; + ActionResponseProtocolIpv4 ipv4 = 2; - // Value of the this field should not excced 4 bytes. Maximum length of this attribute - // is 8 (4 * 2 hex character per byte). - // default = 10 - optional string as_hex = 3; + // Description missing in models + ActionResponseProtocolIpv6 ipv6 = 3; } -// Description missing in models -message FlowRSVPRouteRecordLength { +// Actions associated with IPv4 on configured resources. +message ActionProtocolIpv4 { message Choice { enum Enum { unspecified = 0; - auto = 1; - value = 2; + ping = 1; } } - // auto or configured value. - // default = Choice.Enum.auto - optional Choice.Enum choice = 1; - - // The OTG implementation will provide a system generated value for this property. - // If the OTG implementation is unable to generate a value the default value must be - // used. - // default = 8 - optional uint32 auto = 2; - - // Description missing in models - // default = 8 - optional uint32 value = 3; -} - -// Custom packet header -message FlowRSVPPathObjectsCustom { - // Description missing in models - PatternFlowRSVPPathObjectsCustomType type = 1; + // required = true + optional Choice.Enum choice = 1; // Description missing in models - FlowRSVPObjectLength length = 2; - - // A custom packet header defined as a string of hex bytes. The string MUST contain - // sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be - // discarded. Value of the this field should not excced 65525 bytes since maximum 65528 - // bytes can be added as object-contents in RSVP header. For type and length requires - // 3 bytes, hence maximum of 65524 bytes are expected. Maximum length of this attribute - // is 131050 (65525 * 2 hex character per byte). - // default = 0000 - optional string bytes = 3; + ActionProtocolIpv4Ping ping = 2; } -// The frame size which overrides the total length of the packet -message FlowSize { +// Response for actions associated with IPv4 on configured resources. +message ActionResponseProtocolIpv4 { message Choice { enum Enum { unspecified = 0; - fixed = 1; - increment = 2; - random = 3; - weight_pairs = 4; + ping = 1; } } // Description missing in models - // default = Choice.Enum.fixed + // required = true optional Choice.Enum choice = 1; // Description missing in models - // default = 64 - optional uint32 fixed = 2; - - // Description missing in models - FlowSizeIncrement increment = 3; + ActionResponseProtocolIpv4Ping ping = 2; +} - // Description missing in models - FlowSizeRandom random = 4; +// Request for initiating ping between multiple source and destination pairs. +message ActionProtocolIpv4Ping { - // Description missing in models - FlowSizeWeightPairs weight_pairs = 5; + // List of IPv4 ping requests. + repeated ActionProtocolIpv4PingRequest requests = 1; } -// Frame size that increments from a starting size to -// an ending size incrementing by a step size. -message FlowSizeIncrement { +// Under Review: Most ping request parameters are still TBD. +// +// Under Review: Most ping request parameters are still TBD. +// +// Request for initiating ping between a single source and destination pair. +// For ping request, 1 IPv4 ICMP Echo Request shall be sent and wait for ping response +// to either succeed or time out. The API wait timeout for each request shall be 300ms. +message ActionProtocolIpv4PingRequest { - // Starting frame size in bytes - // default = 64 - optional uint32 start = 1; + // Name of source IPv4 interface to be used. + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + optional string src_name = 1; - // Ending frame size in bytes - // default = 1518 - optional uint32 end = 2; + // Destination IPv4 address to ping. + optional string dst_ip = 2; +} - // Step frame size in bytes - // default = 1 - optional uint32 step = 3; +// Response for ping initiated between multiple source and destination pairs. +message ActionResponseProtocolIpv4Ping { + + // List of responses for IPv4 ping responses. + repeated ActionResponseProtocolIpv4PingResponse responses = 1; } -// Random frame size from a min value to a max value. -message FlowSizeRandom { +// Response for ping initiated between a single source and destination pair. +message ActionResponseProtocolIpv4PingResponse { - // Description missing in models - // default = 64 - optional uint32 min = 1; + // Name of source IPv4 interface used for ping. + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ipv4/properties/name + // + // required = true + optional string src_name = 1; - // Description missing in models - // default = 1518 - optional uint32 max = 2; + // Destination IPv4 address used for ping. + // required = true + optional string dst_ip = 2; + + message Result { + enum Enum { + unspecified = 0; + succeeded = 1; + failed = 2; + } + } + // Result of the ping request. + // required = true + optional Result.Enum result = 3; } -// Frame size distribution, defined as pairs (including IMIX distribution). -// Frames are randomly generated such that the proportion of each frame size out of -// the total number of frames -// are matching with the weight value of the pair. However, as with any -// other probability -// distribution, the sample distribution is close to theoretical value only if the size -// of the sample is reasonably large. -// When the number of frames is very low the transmitted frames may not come close to -// the ratio described in the weight. -message FlowSizeWeightPairs { +// Actions associated with IPv6 on configured resources. +message ActionProtocolIpv6 { message Choice { enum Enum { unspecified = 0; - predefined = 1; - custom = 2; + ping = 1; } } // Description missing in models - // default = Choice.Enum.predefined + // required = true optional Choice.Enum choice = 1; - message Predefined { + // Description missing in models + ActionProtocolIpv6Ping ping = 2; +} + +// Response for actions associated with IPv6 on configured resources. +message ActionResponseProtocolIpv6 { + + message Choice { enum Enum { unspecified = 0; - imix = 1; - ipsec_imix = 2; - ipv6_imix = 3; - standard_imix = 4; - tcp_imix = 5; + ping = 1; } } - // Specify predefined frame size distribution pairs (including IMIX distribution). - // - // The available predefined distribution pairs are: - // - IMIX (64:7, 570:4, and 1518:1) - // - IPSec IMIX (90:58.67, 92:2, 594:23.66 and 1418:15.67) - // - IPv6 IMIX (60:58.67, 496:2, 594:23.66 and 1518:15.67) - // - Standard IMIX (58:58.67, 62:2, 594:23.66 and 1518:15.67) - // - TCP IMIX (90:58.67, 92:2, 594:23.66 and 1518:15.67) - // default = Predefined.Enum.imix - optional Predefined.Enum predefined = 2; + // Description missing in models + // required = true + optional Choice.Enum choice = 1; // Description missing in models - repeated FlowSizeWeightPairsCustom custom = 3; + ActionResponseProtocolIpv6Ping ping = 2; } -// Custom frame size distribution pair. -message FlowSizeWeightPairsCustom { - - // The size of the frame (in bytes) for this weight pair. - // default = 64 - optional uint32 size = 1; +// Request for initiating ping between multiple source and destination pairs. +message ActionProtocolIpv6Ping { - // Weight assigned to the corresponding frame size in this weight pair. - // Higher weight means more packets. - // default = 1 - optional float weight = 2; + // List of IPv6 ping requests. + repeated ActionProtocolIpv6PingRequest requests = 1; } -// The rate of packet transmission -message FlowRate { +// Under Review: Most ping request parameters are still TBD. +// +// Under Review: Most ping request parameters are still TBD. +// +// Request for initiating ping between a single source and destination pair. +// For ping request, 1 IPv6 ICMP Echo Request shall be sent and wait for ping response +// to either succeed or time out. The API wait timeout for each request shall be 300ms. +message ActionProtocolIpv6PingRequest { - message Choice { - enum Enum { - unspecified = 0; - pps = 1; - bps = 2; - kbps = 3; - mbps = 4; - gbps = 5; - percentage = 6; - } - } - // The available types of flow rate. - // default = Choice.Enum.pps - optional Choice.Enum choice = 1; + // Name of source IPv6 interface to be used. + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // + optional string src_name = 1; - // Packets per second. - // default = 1000 - optional uint64 pps = 2; + // Destination IPv6 address to ping. + optional string dst_ip = 2; +} - // Bits per second. - // default = 1000000000 - optional uint64 bps = 3; +// Response for ping initiated between multiple source and destination pairs. +message ActionResponseProtocolIpv6Ping { - // Kilobits per second. - // default = 1000000 - optional uint64 kbps = 4; + // List of responses for IPv6 ping responses. + repeated ActionResponseProtocolIpv6PingResponse responses = 1; +} - // Megabits per second. - // default = 1000 - optional uint64 mbps = 5; +// Response for ping initiated between a single source and destination pair. +message ActionResponseProtocolIpv6PingResponse { - // Gigabits per second. - // default = 1 - optional uint32 gbps = 6; + // Name of source IPv6 interface used for ping. + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ipv6/properties/name + // + // required = true + optional string src_name = 1; - // The percentage of a port location's available bandwidth. - // default = 100 - optional float percentage = 7; + // Destination IPv6 address used for ping. + // required = true + optional string dst_ip = 2; + + message Result { + enum Enum { + unspecified = 0; + succeeded = 1; + failed = 2; + } + } + // Result of the ping request. + // required = true + optional Result.Enum result = 3; } -// A container for different transmit durations. -message FlowDuration { +// Actions associated with BGP on configured resources. +message ActionProtocolBgp { message Choice { enum Enum { unspecified = 0; - fixed_packets = 1; - fixed_seconds = 2; - burst = 3; - continuous = 4; + notification = 1; + initiate_graceful_restart = 2; } } - // A choice used to determine the type of duration. - // default = Choice.Enum.continuous - optional Choice.Enum choice = 1; - - // Description missing in models - FlowFixedPackets fixed_packets = 2; - // Description missing in models - FlowFixedSeconds fixed_seconds = 3; + // required = true + optional Choice.Enum choice = 1; // Description missing in models - FlowBurst burst = 4; + ActionProtocolBgpNotification notification = 2; // Description missing in models - FlowContinuous continuous = 5; + ActionProtocolBgpInitiateGracefulRestart initiate_graceful_restart = 3; } -// Transmit will be continuous and will not stop automatically. -message FlowContinuous { - - // The minimum gap between packets expressed as bytes. - // default = 12 - optional uint32 gap = 1; - - // Description missing in models - FlowDelay delay = 2; -} +// A NOTIFICATION message is sent when an error is detected with the BGP session, such +// as hold timer expiring, misconfigured AS number or a BGP session reset is requested. +// This causes the BGP connection to close. Send explicit NOTIFICATIONs for list of +// specified BGP peers. If a user wants to send custom Error Code and Error Subcode +// the custom object should be configured. A user can send IANA defined BGP NOTIFICATIONs +// according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. +// +message ActionProtocolBgpNotification { -// The optional container to specify the delay before starting -// transmission of packets. -message FlowDelay { + // The names of BGP Peers to send NOTIFICATION to. If no name is specified then NOTIFICATION + // will be sent to all configured BGP peers. + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + // + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + // + repeated string names = 1; message Choice { enum Enum { unspecified = 0; - bytes = 1; - nanoseconds = 2; - microseconds = 3; + cease = 1; + message_header_error = 2; + open_message_error = 3; + update_message_error = 4; + hold_timer_expired = 5; + finite_state_machine_error = 6; + custom = 7; } } - // Description missing in models - // default = Choice.Enum.bytes - optional Choice.Enum choice = 1; - - // The delay before starting transmission of packets. - // A value of 0 indicates no delay. - // default = 0 - optional float bytes = 2; - - // The delay before starting transmission of packets. - // A value of 0 indicates no delay. - // default = 0 - optional float nanoseconds = 3; - - // The delay before starting transmission of packets. - // A value of 0 indicates no delay. - // default = 0 - optional float microseconds = 4; -} - -// Transmit a fixed number of packets after which the flow will stop. -message FlowFixedPackets { - - // Stop transmit of the flow after this number of packets. - // default = 1 - optional uint32 packets = 1; + // Each BGP NOTIFICATION message includes an Error Code field indicating what type of + // problem occurred. For certain Error Codes, an Error Subcode field provides additional + // details about the specific nature of the problem. The choice value will provide + // the Error Code used in NOTIFICATION message. The Subcode can be set for each of + // the corresponding errors except for Hold Timer Expired error and BGP Finite State + // Machine error. In both of these cases Subcode 0 will be sent. If a user wants to + // use non zero Sub Code then custom choice can be used. + // default = Choice.Enum.cease + optional Choice.Enum choice = 2; - // The minimum gap between packets expressed as bytes. - // default = 12 - optional uint32 gap = 2; + // Description missing in models + DeviceBgpCeaseError cease = 3; // Description missing in models - FlowDelay delay = 3; -} + DeviceBgpMessageHeaderError message_header_error = 4; -// Transmit for a fixed number of seconds after which the flow will stop. -message FlowFixedSeconds { + // Description missing in models + DeviceBgpOpenMessageError open_message_error = 5; - // Stop transmit of the flow after this number of seconds. - // default = 1 - optional float seconds = 1; + // Description missing in models + DeviceBgpUpdateMessageError update_message_error = 6; - // The minimum gap between packets expressed as bytes. - // default = 12 - optional uint32 gap = 2; + // Description missing in models + DeviceBgpHoldTimerExpired hold_timer_expired = 7; // Description missing in models - FlowDelay delay = 3; -} + DeviceBgpFiniteStateMachineError finite_state_machine_error = 8; -// Transmits continuous or fixed burst of packets. -// For continuous burst of packets, it will not automatically stop. -// For fixed burst of packets, it will stop after transmitting fixed number of bursts. -// -message FlowBurst { + // Description missing in models + DeviceBgpCustomError custom = 9; +} - // The number of packet bursts transmitted per flow. - // A value of 0 implies continuous burst of packets. - // default = 0 - optional uint32 bursts = 1; +// Initiates BGP Graceful Restart process for the selected BGP peers. If no name is +// specified then Graceful Restart will be sent to all configured BGP peers. To emulate +// scenarios where a peer sends a Notification and stops the session, an optional Notification +// object is included. If the remote peer and the local peer are both configured to +// perform Graceful Restart for Notification triggered session , this will result in +// Graceful Restart scenario to be triggered as per RFC8538. +message ActionProtocolBgpInitiateGracefulRestart { - // The number of packets transmitted per burst. - // default = 1 - optional uint32 packets = 2; + // The names of device BGP peers objects to control. + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + // + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + // + repeated string peer_names = 1; - // The minimum gap between packets expressed as bytes. - // default = 12 - optional uint32 gap = 3; + // Duration (in seconds) after which selected BGP peers will initiate + // Graceful restart by sending the Open Message with Restart State bit set in the Graceful + // Restart capability. + // default = 30 + optional uint32 restart_delay = 2; - // Description missing in models - FlowDurationInterBurstGap inter_burst_gap = 4; + // Send a Notification to the peer as per configured parameters when initially bringing + // down a session as per + // configured parameters. + ActionProtocolBgpGracefulRestartNotification notification = 3; } -// The optional container for specifying a gap between bursts. -message FlowDurationInterBurstGap { +// Defines the explicit contents of the NOTIFICATION message to be sent when executing +// InitiateGracefulRestart trigger. This causes the BGP connection to close.If a user +// wants to send custom Error Code and Error Subcode the custom object should be configured. +// A user can send IANA defined BGP NOTIFICATIONs according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. +// +message ActionProtocolBgpGracefulRestartNotification { message Choice { enum Enum { unspecified = 0; - bytes = 1; - nanoseconds = 2; - microseconds = 3; + cease = 1; + message_header_error = 2; + open_message_error = 3; + update_message_error = 4; + hold_timer_expired = 5; + finite_state_machine_error = 6; + custom = 7; } } - // The type of inter burst gap units. - // default = Choice.Enum.bytes - optional Choice.Enum choice = 1; - - // The amount of time between bursts expressed in bytes. - // A value of 0 indicates no gap between bursts. - // default = 12 - optional double bytes = 2; - - // The amount of time between bursts expressed in nanoseconds. - // A value of 0 indicates no gap between bursts. - // default = 96 - optional double nanoseconds = 3; - - // The amount of time between bursts expressed in microseconds. - // A value of 0 indicates no gap between bursts. - // default = 0.096 - optional double microseconds = 4; -} - -// The optional container for configuring flow metrics. -message FlowMetrics { - - // Enables flow metrics. - // Enabling this option may affect the resultant packet payload due to - // additional instrumentation data. - // default = False - optional bool enable = 1; - - // Enables additional flow metric loss calculation. - // default = False - optional bool loss = 2; - - // Rx Tx ratio. - FlowRxTxRatio rx_tx_ratio = 6; - - // Enables additional flow metric first and last timestamps. - // default = False - optional bool timestamps = 3; + // Each BGP NOTIFICATION message includes an Error Code field indicating what type of + // problem occurred. For certain Error Codes, an Error Subcode field provides additional + // details about the specific nature of the problem. The choice value will provide + // the Error Code used in NOTIFICATION message. The Subcode can be set for each of + // the corresponding errors except for Hold Timer Expired error and BGP Finite State + // Machine error. In both of these cases Subcode 0 will be sent. If a user wants to + // use non zero Sub Code then custom choice can be used. + // default = Choice.Enum.cease + optional Choice.Enum choice = 2; - // Latency metrics. - FlowLatencyMetrics latency = 4; + // Description missing in models + DeviceBgpCeaseError cease = 3; - // Predefined metric tags - FlowPredefinedTags predefined_metric_tags = 5; -} + // Description missing in models + DeviceBgpMessageHeaderError message_header_error = 4; -// The optional container for per flow latency metric configuration. -message FlowLatencyMetrics { + // Description missing in models + DeviceBgpOpenMessageError open_message_error = 5; - // True to enable latency metrics using timestamps. - // - // Enabling this option may affect the resultant packet payload due to - // additional instrumentation data. - // default = False - optional bool enable = 1; + // Description missing in models + DeviceBgpUpdateMessageError update_message_error = 6; - message Mode { - enum Enum { - unspecified = 0; - store_forward = 1; - cut_through = 2; - } - } - // Select the type of latency measurement. The different types of - // latency measurements are: - // - // - // store_forward: - // The time interval starting when the last bit of the frame leaves the - // sending port and ending when the first bit of the frame is seen on - // the receiving port (LIFO). This is based on the RFC 1242 standard. - // - // - // cut_through: - // The time interval starting when the first bit of the frame leaves - // the sending port and ending when the first bit of the frame is seen - // on the receiving port (FIFO). This is based on the RFC 1242 - // standard. - // default = Mode.Enum.store_forward - optional Mode.Enum mode = 2; -} + // Description missing in models + DeviceBgpHoldTimerExpired hold_timer_expired = 7; -// List of predefined flow tracking options, outside packet fields, that can be enabled. -message FlowPredefinedTags { + // Description missing in models + DeviceBgpFiniteStateMachineError finite_state_machine_error = 8; - // Enables Rx port or lag level disaggregation with predefined metrics tag name set - // as rx_name. - // The Rx port / lag names can be found under tagged_metrics tag names in flow metrics - // response. - // default = False - optional bool rx_name = 1; + // Description missing in models + DeviceBgpCustomError custom = 9; } -// Rx Tx ratio is the ratio of expected number of Rx packets across all Rx ports to -// the Tx packets -// for the configured flow. It is a factor by which the Tx packet count is multiplied -// to calculate -// the sum of expected Rx packet count, across all Rx ports. This will be used to calculate -// loss -// percentage of flow at aggregate level. -message FlowRxTxRatio { +// Request to traffic generator for metrics of choice. +message MetricsRequest { message Choice { enum Enum { unspecified = 0; - rx_count = 1; - value = 2; + port = 1; + flow = 2; + bgpv4 = 3; + bgpv6 = 4; + isis = 5; + lag = 6; + lacp = 7; + lldp = 8; + rsvp = 9; + dhcpv4_client = 10; + dhcpv4_server = 11; + dhcpv6_client = 12; + dhcpv6_server = 13; + ospfv2 = 14; } } // Description missing in models - // default = Choice.Enum.value + // default = Choice.Enum.port optional Choice.Enum choice = 1; // Description missing in models - FlowRxTxRatioRxCount rx_count = 2; - - // Should be a positive, non-zero value. The default value of 1, is when the Rx packet - // count across - // all ports is expected to match the Tx packet count. A custom integer value (>1) can - // be specified for - // loss calculation for cases when there are multiple destination addresses configured - // within one flow, - // but DUT is configured to replicate only to a subset of Rx ports. For cases when Tx - // side generates two - // packets from each source in 1:1 protection mode but only one of the two packets are - // received by the - // Rx port, we may need to specify a fractional value instead. - // default = 1.0 - optional float value = 3; -} + PortMetricsRequest port = 2; -// This is for cases where one copy of Tx packet is received on all Rx ports and so -// the sum total of Rx packets -// received across all Rx ports is a multiple of Rx port count and Tx packets. -message FlowRxTxRatioRxCount { -} + // Description missing in models + FlowMetricsRequest flow = 3; -// The optional container for event configuration. -message Event { + // Description missing in models + Bgpv4MetricsRequest bgpv4 = 4; - // True to enable all events. - // Enabling this option may affect the resultant packet payload due to - // additional instrumentation data. - // default = False - optional bool enable = 1; + // Description missing in models + Bgpv6MetricsRequest bgpv6 = 5; // Description missing in models - EventLink link = 2; + IsisMetricsRequest isis = 6; // Description missing in models - EventRxRateThreshold rx_rate_threshold = 3; + LagMetricsRequest lag = 7; // Description missing in models - EventRouteAdvertiseWithdraw route_advertise_withdraw = 4; -} + LacpMetricsRequest lacp = 8; -// The optional container for rx rate threshold event configuration. -message EventRxRateThreshold { + // Description missing in models + LldpMetricsRequest lldp = 9; - // True to enable the rx_rate_threshold event. - // Enabling this option may affect the resultant packet payload due to - // additional instrumentation data. - // default = False - optional bool enable = 1; + // Description missing in models + RsvpMetricsRequest rsvp = 10; - // True to enable notifications when the rx rate of a flow passes above - // or below the threshold value. - // default = 95 - optional float threshold = 2; -} + // Description missing in models + Dhcpv4ClientMetricsRequest dhcpv4_client = 11; -// The optional container for link up/down event configuration. -message EventLink { + // Description missing in models + Dhcpv4ServerMetricsRequest dhcpv4_server = 12; - // True to enable notifications when a link up/down event occurs. - // default = False - optional bool enable = 1; -} + // Description missing in models + Dhcpv6ClientMetricsRequest dhcpv6_client = 13; -// The optional container for route advertise/withdraw event configuration. -message EventRouteAdvertiseWithdraw { + // Description missing in models + Dhcpv6ServerMetricsRequest dhcpv6_server = 14; - // True to enable notifications when a route advertise/withdraw - // event occurs. - // default = False - optional bool enable = 1; + // Description missing in models + Ospfv2MetricsRequest ospfv2 = 15; } -// Description missing in models -message EventRequest { +// Response containing chosen traffic generator metrics. +message MetricsResponse { - message Type { + message Choice { enum Enum { unspecified = 0; - link_down = 1; - link_up = 2; - route_withdraw = 3; - route_advertise = 4; - flow_rx_rate_above_threshold = 5; - flow_rx_rate_below_threshold = 6; + flow_metrics = 1; + port_metrics = 2; + bgpv4_metrics = 3; + bgpv6_metrics = 4; + isis_metrics = 5; + lag_metrics = 6; + lacp_metrics = 7; + lldp_metrics = 8; + rsvp_metrics = 9; + dhcpv4_client = 10; + dhcpv4_server = 11; + dhcpv6_client = 12; + dhcpv6_server = 13; + ospfv2_metrics = 14; } } - // Constrain the events being returned by specifying event types. - // If the list is empty then all event types will be returned. - repeated Type.Enum type = 1; + // Description missing in models + // default = Choice.Enum.port_metrics + optional Choice.Enum choice = 1; - // Constrain the events being returned by specifying event sources. - // If the list is empty then all event sources will be returned. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Bgp.V4RouteRange/name - // - /components/schemas/Bgp.V6RouteRange/name - // - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - /components/schemas/Bgp.V4RouteRange/name - // - /components/schemas/Bgp.V6RouteRange/name - // - repeated string source = 2; -} + // Description missing in models + repeated PortMetric port_metrics = 2; -// A container that describes what events a system should provide and -// optionally where to publish them. -message EventSubscription { + // Description missing in models + repeated FlowMetric flow_metrics = 3; // Description missing in models - EventRequest events = 1; + repeated Bgpv4Metric bgpv4_metrics = 4; - // Indicates where a client wants to be notified of the events set in - // the events property. - // If this property is empty or null then no event notifications will - // be forwarded. - optional string callback_url = 2; -} + // Description missing in models + repeated Bgpv6Metric bgpv6_metrics = 5; -// Configuration of LLDP protocol IEEE Ref: https://www.ieee802.org/1/files/public/docs2002/lldp-protocol-00.pdf -message Lldp { + // Description missing in models + repeated IsisMetric isis_metrics = 6; - // The unique name of the object on which LLDP is running. - // required = true - LldpConnection connection = 1; + // Description missing in models + repeated LagMetric lag_metrics = 7; - // The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint - // identifier associated with the transmitting LLDP agent. If mac address is specified - // it should be in colon seperated mac address format. - LldpChassisId chassis_id = 2; + // Description missing in models + repeated LacpMetric lacp_metrics = 8; - // The Port ID is a mandatory TLV which identifies the port component of the endpoint - // identifier associated with the transmitting LLDP agent. If the specified port is - // an IEEE 802.3 Repeater port, then this TLV is optional. - LldpPortId port_id = 3; + // Description missing in models + repeated LldpMetric lldp_metrics = 9; - // The system name field shall contain an alpha-numeric string that indicates the system's - // administratively assigned name. The system name should be the system's fully qualified - // domain name. If implementations support IETF RFC 3418, the sysName object should - // be used for this field. - LldpSystemName system_name = 4; + // Description missing in models + repeated RsvpMetric rsvp_metrics = 10; - // Specifies the amount of time in seconds a receiving device should maintain LLDP information - // sent by the device before discarding it. - // default = 120 - optional uint32 hold_time = 5; + // Description missing in models + repeated Dhcpv4ClientMetric dhcpv4client_metrics = 11; - // Set the transmission frequency of LLDP updates in seconds. - // default = 30 - optional uint32 advertisement_interval = 6; + // Description missing in models + repeated Dhcpv4ServerMetric dhcpv4server_metrics = 12; - // Globally unique name of an object. It also serves as the primary key for arrays of - // objects. - // required = true - optional string name = 7; + // Description missing in models + repeated Dhcpv6ClientMetric dhcpv6client_metrics = 13; + + // Description missing in models + repeated Dhcpv6ServerMetric dhcpv6server_metrics = 14; + + // Description missing in models + repeated Ospfv2Metric ospfv2_metrics = 15; } -// LLDP connection to a test port. In future if more connection options arise LLDP -// connection object will be enhanced. -message LldpConnection { +// The port result request to the traffic generator +message PortMetricsRequest { - message Choice { + // The names of objects to return results for. An empty list will return all port row + // results. + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + // + // x-constraint: + // - /components/schemas/Port/properties/name + // + repeated string port_names = 1; + + message ColumnNames { enum Enum { unspecified = 0; - port_name = 1; + transmit = 1; + location = 2; + link = 3; + capture = 4; + frames_tx = 5; + frames_rx = 6; + bytes_tx = 7; + bytes_rx = 8; + frames_tx_rate = 9; + frames_rx_rate = 10; + bytes_tx_rate = 11; + bytes_rx_rate = 12; } } - // The name of the test port or other connection objects on which LLDP is configured. - optional Choice.Enum choice = 1; + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned. The name of the port cannot be excluded. + repeated ColumnNames.Enum column_names = 2; +} - // Name of the test port on which LLDP is configured on. +// Description missing in models +message PortMetric { + + // The name of a configured port // // x-constraint: // - /components/schemas/Port/properties/name @@ -8492,3317 +12223,3381 @@ message LldpConnection { // x-constraint: // - /components/schemas/Port/properties/name // - optional string port_name = 2; -} + optional string name = 1; -// The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint -// identifier associated with the transmitting LLDP agent. This field identifies the -// format and source of the chassis identifier string. It is based on the enumerator -// defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. -message LldpChassisId { + // The state of the connection to the test port location. The format should be the configured + // port location along with any custom connection state message. + optional string location = 2; - message Choice { + message Link { enum Enum { unspecified = 0; - mac_address_subtype = 1; - interface_name_subtype = 2; - local_subtype = 3; + up = 1; + down = 2; } } - // Chassis ID subtype to be used in Chassis ID TLV. - // default = Choice.Enum.mac_address_subtype - optional Choice.Enum choice = 1; - - // Description missing in models - LldpChassisMacSubType mac_address_subtype = 2; - - // Name of an interface of the chassis that uniquely identifies the chassis. - optional string interface_name_subtype = 3; - - // Locally assigned name of the chassis. - optional string local_subtype = 4; -} - -// The Port ID is a mandatory TLV which identifies the port component of the endpoint -// identifier associated with the transmitting LLDP agent.This field identifies the -// format and source of the port identifier string. It is based on the enumerator defined -// by the PtopoPortIdType object from RFC2922. -message LldpPortId { + // The state of the test port link The string can be up, down or a custom error message. + optional Link.Enum link = 3; - message Choice { + message Capture { enum Enum { unspecified = 0; - mac_address_subtype = 1; - interface_name_subtype = 2; - local_subtype = 3; + started = 1; + stopped = 2; } } - // Port ID subtype to be used in Port ID TLV. - // default = Choice.Enum.interface_name_subtype - optional Choice.Enum choice = 1; + // The state of the test port capture infrastructure. The string can be started, stopped + // or a custom error message. + optional Capture.Enum capture = 4; - // The MAC Address configured in the Port ID TLV. - optional string mac_address_subtype = 2; + // The current total number of frames transmitted + optional uint64 frames_tx = 5; - // Description missing in models - LldpPortInterfaceNameSubType interface_name_subtype = 3; + // The current total number of valid frames received + optional uint64 frames_rx = 6; - // The Locally assigned name configured in the Port ID TLV. - optional string local_subtype = 4; -} + // The current total number of bytes transmitted + optional uint64 bytes_tx = 7; -// The MAC address configured in the Chassis ID TLV. -message LldpChassisMacSubType { + // The current total number of valid bytes received + optional uint64 bytes_rx = 8; - message Choice { - enum Enum { - unspecified = 0; - auto = 1; - value = 2; - } - } - // In auto mode the system generated value is set for this property, while if the choice - // is selected as value, a user configured value will be used for this property. - // default = Choice.Enum.auto - optional Choice.Enum choice = 1; + // The current rate of frames transmitted + optional float frames_tx_rate = 9; - // The OTG implementation must provide a system generated value for this property. - optional string auto = 2; + // The current rate of valid frames received + optional float frames_rx_rate = 10; - // User must specify a value if mode is not auto. - optional string value = 3; -} + // The current rate of bytes transmitted + optional float bytes_tx_rate = 11; -// The interface name configured in the Port ID TLV. -message LldpPortInterfaceNameSubType { + // The current rate of bytes received + optional float bytes_rx_rate = 12; - message Choice { + message Transmit { enum Enum { unspecified = 0; - auto = 1; - value = 2; + started = 1; + stopped = 2; } } - // In auto mode the system generated value is set for this property, while if the choice - // is selected as value, a user configured value will be used for this property. - // default = Choice.Enum.auto - optional Choice.Enum choice = 1; - - // The OTG implementation must provide a system generated value for this property. - optional string auto = 2; - - // User must specify a value if mode is not auto. - optional string value = 3; + // The transmit state of the flow. + optional Transmit.Enum transmit = 13; } -// The system Name configured in the System Name TLV. -message LldpSystemName { +// The container for a flow metric request. +message FlowMetricsRequest { - message Choice { + // Flow metrics will be retrieved for these flow names. + // If no flow names are specified then all flows will be returned. + // + // x-constraint: + // - /components/schemas/Flow/properties/name + // + // + // x-constraint: + // - /components/schemas/Flow/properties/name + // + repeated string flow_names = 1; + + message MetricNames { enum Enum { unspecified = 0; - auto = 1; - value = 2; + transmit = 1; + frames_tx = 2; + frames_rx = 3; + bytes_tx = 4; + bytes_rx = 5; + frames_tx_rate = 6; + frames_rx_rate = 7; } } - // In auto mode the system generated value is set for this property, while if the choice - // is selected as value, a user configured value will be used for this property. - // default = Choice.Enum.auto - optional Choice.Enum choice = 1; - - // The OTG implementation must provide a system generated value for this property. - optional string auto = 2; + // The list of metric names that the returned result set will contain. If the list is + // empty then all metrics will be returned. + repeated MetricNames.Enum metric_names = 3; - // User must specify a value if mode is not auto. - optional string value = 3; + // Description missing in models + FlowTaggedMetricsFilter tagged_metrics = 4; } -// Error response generated while serving API request. -message Error { +// Filter for tagged metrics +message FlowTaggedMetricsFilter { - // Numeric status code based on the underlying transport being used. - // The API server MUST set this code explicitly based on following references: - // - HTTP 4xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.5 - // - HTTP 5xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.6 - // - gRPC errors: https://grpc.github.io/grpc/core/md_doc_statuscodes.html - // required = true - optional int32 code = 1; + // Controls inclusion/exclusion of tagged metrics when fetching flow metrics. + // default = True + optional bool include = 1; - message Kind { + // Controls inclusion/exclusion of tagged metrics where each underlying attributes has + // zero value or absent value. + // default = False + optional bool include_empty_metrics = 2; + + message MetricNames { enum Enum { unspecified = 0; - validation = 1; - internal = 2; + frames_tx = 1; + frames_rx = 2; + bytes_tx = 3; + bytes_rx = 4; + frames_tx_rate = 5; + frames_rx_rate = 6; } } - // Classification of error originating from within API server that may not be mapped - // to the value in `code`. - // Absence of this field may indicate that the error did not originate from within API - // server. - optional Kind.Enum kind = 2; + // The list of metric names that the returned result set will contain. If the list is + // empty then all metrics will be returned. + repeated MetricNames.Enum metric_names = 3; - // List of error messages generated while executing the request. - repeated string errors = 3; + // List of filters to selectively fetch tagged metrics with certain tag and corresponding + // value. + repeated FlowMetricTagFilter filters = 4; } -// A list of warnings that have occurred while executing the request. -message Warning { +// A container for filtering ingress and/or egress metric tags. +// The Tx stats may not be applicable in both the request and response filter. +message FlowMetricTagFilter { - // A list of any system specific warnings that have occurred while - // executing the request. - repeated string warnings = 1; + // A metric tag name that MUST exist in a flow packet or + // flow egress_packet configuration + optional string name = 1; + + // A list of filters that can be applied to the metric tag name. + // By default all values will be included in the flow metric results. + repeated string values = 2; } -// Request for updating specific attributes of resources in traffic generator -message ConfigUpdate { +// A container for flow metrics. +// The container is keyed by the name, port_tx and port_rx. +message FlowMetric { - message Choice { - enum Enum { - unspecified = 0; - flows = 1; - } - } - // Description missing in models - optional Choice.Enum choice = 1; + // The name of the flow + optional string name = 1; - // Description missing in models - FlowsUpdate flows = 2; -} + // The name of the transmit port + optional string port_tx = 2; -// A container of flows with associated properties to be updated without affecting the -// flows current transmit state. -message FlowsUpdate { + // The name of the receive port + optional string port_rx = 3; - message PropertyNames { + message Transmit { enum Enum { unspecified = 0; - rate = 1; - size = 2; + started = 1; + stopped = 2; + paused = 3; } } - // Flow properties to be updated without affecting the transmit state. - repeated PropertyNames.Enum property_names = 1; + // The transmit state of the flow. + optional Transmit.Enum transmit = 5; - // The list of configured flows for which given property will be updated. - repeated Flow flows = 2; -} + // The current total number of frames transmitted + optional uint64 frames_tx = 6; -// Request for setting operational state of configured resources. -message ControlState { + // The current total number of valid frames received + optional uint64 frames_rx = 7; - message Choice { - enum Enum { - unspecified = 0; - port = 1; - protocol = 2; - traffic = 3; - } - } - // Description missing in models - // required = true - optional Choice.Enum choice = 1; + // The current total number of bytes transmitted + optional uint64 bytes_tx = 8; - // Description missing in models - StatePort port = 2; + // The current total number of bytes received + optional uint64 bytes_rx = 9; + + // The current rate of frames transmitted + optional float frames_tx_rate = 10; + + // The current rate of valid frames received + optional float frames_rx_rate = 11; + + // The percentage of lost frames + optional float loss = 12; // Description missing in models - StateProtocol protocol = 3; + MetricTimestamp timestamps = 13; // Description missing in models - StateTraffic traffic = 4; + MetricLatency latency = 14; + + // List of metrics corresponding to a set of values applicable + // for configured metric tags in ingress or egress packet header fields of corresponding + // flow. + // The container is keyed by list of tag-value pairs. + repeated FlowTaggedMetric tagged_metrics = 15; } -// States associated with configured ports. -message StatePort { +// Metrics for each set of values applicable for configured +// metric tags in ingress or egress packet header fields of corresponding flow. +// The container is keyed by list of tag-value pairs. +message FlowTaggedMetric { + + // List of tag and value pairs + repeated FlowMetricTag tags = 1; + + // The current total number of frames transmitted + optional uint64 frames_tx = 2; + + // The current total number of valid frames received + optional uint64 frames_rx = 3; + + // The current total number of bytes transmitted + optional uint64 bytes_tx = 4; + + // The current total number of bytes received + optional uint64 bytes_rx = 5; + + // The current rate of frames transmitted + optional float frames_tx_rate = 6; + + // The current rate of valid frames received + optional float frames_rx_rate = 7; + + // The percentage of lost frames + optional float loss = 8; - message Choice { - enum Enum { - unspecified = 0; - link = 1; - capture = 2; - } - } // Description missing in models - // required = true - optional Choice.Enum choice = 1; + MetricTimestamp timestamps = 9; // Description missing in models - StatePortLink link = 2; + MetricLatency latency = 10; +} + +// Description missing in models +message FlowMetricTag { + + // Name of packet field metric tag + optional string name = 1; // Description missing in models - StatePortCapture capture = 3; + FlowMetricTagValue value = 2; } -// States associated with configured flows -message StateTraffic { +// A container for metric tag value +message FlowMetricTagValue { message Choice { enum Enum { unspecified = 0; - flow_transmit = 1; + hex = 1; + str = 2; } } - // Description missing in models - // required = true + // Available formats for metric tag value + // default = Choice.Enum.hex optional Choice.Enum choice = 1; - // Description missing in models - StateTrafficFlowTransmit flow_transmit = 2; + // Value represented in hexadecimal format + optional string hex = 2; + + // Value represented in string format + optional string str = 3; } -// States associated with protocols on configured resources. -message StateProtocol { +// The container for timestamp metrics. +// The container will be empty if the timestamp has not been configured for +// the flow. +message MetricTimestamp { - message Choice { - enum Enum { - unspecified = 0; - all = 1; - route = 2; - lacp = 3; - bgp = 4; - isis = 5; - } - } - // Description missing in models - // required = true - optional Choice.Enum choice = 1; + // First timestamp in nanoseconds + optional double first_timestamp_ns = 1; - // Description missing in models - StateProtocolAll all = 2; + // Last timestamp in nanoseconds + optional double last_timestamp_ns = 2; +} - // Description missing in models - StateProtocolRoute route = 3; +// The container for latency metrics. +// The min/max/avg values are dependent on the type of latency measurement +// mode that is configured. +// The container will be empty if the latency has not been configured for +// the flow. +message MetricLatency { - // Description missing in models - StateProtocolLacp lacp = 4; + // Minimum latency in nanoseconds + optional double minimum_ns = 1; - // Description missing in models - StateProtocolBgp bgp = 5; + // Maximum latency in nanoseconds + optional double maximum_ns = 2; - // Description missing in models - StateProtocolIsis isis = 6; + // Average latency in nanoseconds + optional double average_ns = 3; } -// Sets the link of configured ports. -message StatePortLink { +// The request to retrieve BGPv4 per peer metrics/statistics. +message Bgpv4MetricsRequest { - // The names of target ports. An empty or null list will target all ports. + // The names of BGPv4 peers to return results for. An empty list will return results + // for all BGPv4 peers. // // x-constraint: - // - /components/schemas/Port/properties/name + // - /components/schemas/Bgp.V4peer/properties/name // // // x-constraint: - // - /components/schemas/Port/properties/name + // - /components/schemas/Bgp.V4peer/properties/name // - repeated string port_names = 1; + repeated string peer_names = 1; - message State { + message ColumnNames { enum Enum { unspecified = 0; - up = 1; - down = 2; + session_state = 1; + session_flap_count = 2; + routes_advertised = 3; + routes_received = 4; + route_withdraws_sent = 5; + route_withdraws_received = 6; + updates_sent = 7; + updates_received = 8; + opens_sent = 9; + opens_received = 10; + keepalives_sent = 11; + keepalives_received = 12; + notifications_sent = 13; + notifications_received = 14; + fsm_state = 15; + end_of_rib_received = 16; } } - // The link state. - // required = true - optional State.Enum state = 2; + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned except for any result_groups. The name of + // the BGPv4 peer cannot be excluded. + repeated ColumnNames.Enum column_names = 2; } -// Sets the capture state of configured ports -message StatePortCapture { +// BGPv4 per peer statistics information. +message Bgpv4Metric { - // The names of ports to which the capture state will be applied to. If the list of - // port_names is empty or null the state will be applied to all configured ports. - // If the list is not empty any port that is not included in the list of port_names - // MUST be ignored and not included in the state change. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - repeated string port_names = 1; + // The name of a configured BGPv4 peer. + optional string name = 1; - message State { + message SessionState { enum Enum { unspecified = 0; - start = 1; - stop = 2; + up = 1; + down = 2; } } - // The capture state. - // required = true - optional State.Enum state = 2; -} + // Session state as up or down. Up refers to an Established state and Down refers to + // any other state. + optional SessionState.Enum session_state = 2; -// Provides state control of flow transmission. -message StateTrafficFlowTransmit { + // Number of times the session went from Up to Down state. + optional uint64 session_flap_count = 3; - // The names of flows to which the transmit state will be applied to. If the list of - // flow_names is empty or null the state will be applied to all configured flows. - // If the list is not empty any flow that is not included in the list of flow_names - // MUST be ignored and not included in the state change. - // - // x-constraint: - // - /components/schemas/Flow/properties/name - // - // - // x-constraint: - // - /components/schemas/Flow/properties/name - // - repeated string flow_names = 1; + // Number of routes advertised. + optional uint64 routes_advertised = 4; - message State { - enum Enum { - unspecified = 0; - start = 1; - stop = 2; - pause = 3; - resume = 4; - } - } - // The transmit state. - // If the value of the state property is 'start' then all flows defined by the 'flow_names' - // property will be started and the metric counters MUST be cleared prior to starting - // the flow(s). - // If the value of the state property is 'stop' then all flows defined by the 'flow_names' - // property will be stopped and the metric counters MUST NOT be cleared. - // If the value of the state property is 'pause' then all flows defined by the 'flow_names' - // property will be paused and the metric counters MUST NOT be cleared. - // If the value of the state property is 'resume' then any paused flows defined by the - // 'flow_names' property will start transmit at the point at which they were paused. - // Any flow that is stopped will start transmit at the beginning of the flow. The flow(s) - // MUST NOT have their metric counters cleared. - // required = true - optional State.Enum state = 2; -} + // Number of routes received. + optional uint64 routes_received = 5; -// Sets all configured protocols to `start` or `stop` state. -// Setting protocol state to `start` shall be a no-op if preceding `set_config` API -// call was made with `config.options.protocol_options.auto_start_all` set to `true` -// or if all the configured protocols are already started. -message StateProtocolAll { + // Number of route withdraws sent. + optional uint64 route_withdraws_sent = 6; - message State { + // Number of route withdraws received. + optional uint64 route_withdraws_received = 7; + + // Number of Update messages sent. + optional uint64 updates_sent = 8; + + // Number of Update messages received. + optional uint64 updates_received = 9; + + // Number of Open messages sent. + optional uint64 opens_sent = 10; + + // Number of Open messages received. + optional uint64 opens_received = 11; + + // Number of Keepalive messages sent. + optional uint64 keepalives_sent = 12; + + // Number of Keepalive messages received. + optional uint64 keepalives_received = 13; + + // Number of Notification messages sent. + optional uint64 notifications_sent = 14; + + // Number of Notification messages received. + optional uint64 notifications_received = 15; + + message FsmState { enum Enum { unspecified = 0; - start = 1; - stop = 2; + idle = 1; + connect = 2; + active = 3; + opensent = 4; + openconfirm = 5; + established = 6; } } - // Protocol states - // required = true - optional State.Enum state = 1; -} + // BGP peer FSM (Finite State Machine) state as Idle, Connect, Active, OpenSent, OpenConfirm + // and Established. In all the states except Established the BGP session is down. Idle + // refers to the Idle state of the FSM. Connect refers to the state where the session + // is waiting for the underlying transport session to be established. Active refers + // to the state where the session is awaiting for a connection from the remote peer. + // OpenSent refers to the state where the session is in the process of being established. + // The local system has sent an OPEN message. OpenConfirm refers to the state where + // the session is in the process of being established. The local system has sent and + // received an OPEN message and is awaiting a NOTIFICATION or KEEPALIVE message from + // remote peer. Established refers to the state where the BGP session with the peer + // is established. + optional FsmState.Enum fsm_state = 16; -// Sets the state of configured routes -message StateProtocolRoute { + // Number of End-of-RIB markers received indicating the completion of the initial routing + // update for a particular address family after the session is established. + // For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with + // the minimum length. For any other address family, it is an UPDATE message that contains + // only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . + optional uint64 end_of_rib_received = 17; +} - // The names of device route objects to control. If no names are specified then all - // route objects that match the x-constraint will be affected. +// The request to retrieve BGPv6 per peer metrics/statistics. +message Bgpv6MetricsRequest { + + // The names of BGPv6 peers to return results for. An empty list will return results + // for all BGPv6 peers. // // x-constraint: - // - /components/schemas/Bgp.V4RouteRange/properties/name - // - /components/schemas/Bgp.V6RouteRange/properties/name - // - /components/schemas/Isis.V4RouteRange/properties/name - // - /components/schemas/Isis.V6RouteRange/properties/name + // - /components/schemas/Bgp.V6peer/properties/name // // // x-constraint: - // - /components/schemas/Bgp.V4RouteRange/properties/name - // - /components/schemas/Bgp.V6RouteRange/properties/name - // - /components/schemas/Isis.V4RouteRange/properties/name - // - /components/schemas/Isis.V6RouteRange/properties/name + // - /components/schemas/Bgp.V6peer/properties/name // - repeated string names = 1; + repeated string peer_names = 1; - message State { + message ColumnNames { enum Enum { unspecified = 0; - withdraw = 1; - advertise = 2; + session_state = 1; + session_flap_count = 2; + routes_advertised = 3; + routes_received = 4; + route_withdraws_sent = 5; + route_withdraws_received = 6; + updates_sent = 7; + updates_received = 8; + opens_sent = 9; + opens_received = 10; + keepalives_sent = 11; + keepalives_received = 12; + notifications_sent = 13; + notifications_received = 14; + fsm_state = 15; + end_of_rib_received = 16; } } - // Route states - // required = true - optional State.Enum state = 2; + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned except for any result_groups. The name of + // the BGPv6 peer cannot be excluded. + repeated ColumnNames.Enum column_names = 2; } -// Sets state of configured LACP -message StateProtocolLacp { +// BGPv6 per peer statistics information. +message Bgpv6Metric { - message Choice { + // The name of a configured BGPv6 peer. + optional string name = 1; + + message SessionState { enum Enum { unspecified = 0; - admin = 1; - member_ports = 2; + up = 1; + down = 2; } } - // Description missing in models - // required = true - optional Choice.Enum choice = 1; + // Session state as up or down. Up refers to an Established state and Down refers to + // any other state. + optional SessionState.Enum session_state = 2; - // Description missing in models - StateProtocolLacpAdmin admin = 2; + // Number of times the session went from Up to Down state. + optional uint64 session_flap_count = 3; - // Description missing in models - StateProtocolLacpMemberPorts member_ports = 3; + // Number of routes advertised. + optional uint64 routes_advertised = 4; + + // Number of routes received. + optional uint64 routes_received = 5; + + // Number of route withdraws sent. + optional uint64 route_withdraws_sent = 6; + + // Number of route withdraws received. + optional uint64 route_withdraws_received = 7; + + // Number of Update messages sent. + optional uint64 updates_sent = 8; + + // Number of Update messages received. + optional uint64 updates_received = 9; + + // Number of Open messages sent. + optional uint64 opens_sent = 10; + + // Number of Open messages received. + optional uint64 opens_received = 11; + + // Number of Keepalive messages sent. + optional uint64 keepalives_sent = 12; + + // Number of Keepalive messages received. + optional uint64 keepalives_received = 13; + + // Number of Notification messages sent. + optional uint64 notifications_sent = 14; + + // Number of Notification messages received. + optional uint64 notifications_received = 15; + + message FsmState { + enum Enum { + unspecified = 0; + idle = 1; + connect = 2; + active = 3; + opensent = 4; + openconfirm = 5; + established = 6; + } + } + // BGP peer FSM (Finite State Machine) state as Idle, Connect, Active, OpenSent, OpenConfirm + // and Established. In all the states except Established the BGP session is down. Idle + // refers to the Idle state of the FSM. Connect refers to the state where the session + // is waiting for the underlying transport session to be established. Active refers + // to the state where the session is awaiting for a connection from the remote peer. + // OpenSent refers to the state where the session is in the process of being established. + // The local system has sent an OPEN message. OpenConfirm refers to the state where + // the session is in the process of being established. The local system has sent and + // received an OPEN message and is awaiting a NOTIFICATION or KEEPALIVE message from + // remote peer. Established refers to the state where the BGP session with the peer + // is established. + optional FsmState.Enum fsm_state = 16; + + // Number of End-of-RIB markers received indicating the completion of the initial routing + // update for a particular address family after the session is established. + // For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with + // the minimum length. For any other address family, it is an UPDATE message that contains + // only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . + optional uint64 end_of_rib_received = 17; } -// Sets admin state of LACP configured on LAG members -message StateProtocolLacpAdmin { +// The request to retrieve ISIS per Router metrics/statistics. +message IsisMetricsRequest { - // The names of LAG members (ports) for which the state has to be applied. An empty - // or null list will control all LAG members. + // The names of ISIS Routers to return results for. An empty list will return results + // for all ISIS router. // // x-constraint: - // - /components/schemas/Port/properties/name + // - /components/schemas/Device.IsisRouter/properties/name // // // x-constraint: - // - /components/schemas/Port/properties/name + // - /components/schemas/Device.IsisRouter/properties/name // - repeated string lag_member_names = 1; + repeated string router_names = 1; - message State { + message ColumnNames { enum Enum { unspecified = 0; - up = 1; - down = 2; + l1_sessions_up = 1; + l1_session_flap = 2; + l1_database_size = 3; + l1_broadcast_hellos_sent = 4; + l1_broadcast_hellos_received = 5; + l1_point_to_point_hellos_sent = 6; + l1_point_to_point_hellos_received = 7; + l1_psnp_sent = 8; + l1_psnp_received = 9; + l1_csnp_sent = 10; + l1_csnp_received = 11; + l1_lsp_sent = 12; + l1_lsp_received = 13; + l2_sessions_up = 14; + l2_session_flap = 15; + l2_database_size = 16; + l2_broadcast_hellos_sent = 17; + l2_broadcast_hellos_received = 18; + l2_point_to_point_hellos_sent = 19; + l2_point_to_point_hellos_received = 20; + l2_psnp_sent = 21; + l2_psnp_received = 22; + l2_csnp_sent = 23; + l2_csnp_received = 24; + l2_lsp_sent = 25; + l2_lsp_received = 26; } } - // The LACP Member admin state. 'up' will send LACPDUs with 'sync' flag set on selected - // member ports. 'down' will send LACPDUs with 'sync' flag unset on selected member - // ports. - // required = true - optional State.Enum state = 2; + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned except for any result_groups. The name of + // the ISIS Router cannot be excluded. + repeated ColumnNames.Enum column_names = 2; } -// Sets state of LACP member ports configured on LAG. -message StateProtocolLacpMemberPorts { +// ISIS per router statistics information. +message IsisMetric { + + // The name of a configured ISIS router. + optional string name = 1; + + // The number of Level 1 (L1) sessions that are fully up. + optional uint32 l1_sessions_up = 2; + + // The number of Level 1 Sessions Flap. + optional uint64 l1_session_flap = 3; + + // Number of Level 1 Hello messages sent. + optional uint64 l1_broadcast_hellos_sent = 4; + + // Number of Level 1 Hello messages received. + optional uint64 l1_broadcast_hellos_received = 5; + + // Number of Level 1 Point-to-Point(P2P) Hello messages sent. + optional uint64 l1_point_to_point_hellos_sent = 6; + + // Number of Level 1 Point-to-Point(P2P) Hello messages received. + optional uint64 l1_point_to_point_hellos_received = 7; + + // Number of Link State Updates (LSPs) in the Level 1 LSP Databases. + optional uint64 l1_database_size = 8; + + // Number of Level 1 (L1) Partial Sequence Number Packet (PSNPs) sent. + optional uint64 l1_psnp_sent = 9; + + // Number of Level 1 (L1) Complete Sequence Number Packet (PSNPs) received. + optional uint64 l1_psnp_received = 10; + + // Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) sent. + optional uint64 l1_csnp_sent = 11; + + // Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) received. + optional uint64 l1_csnp_received = 12; + + // Number of Level 1 (L1) Link State Protocol Data Units (LSPs) sent. + optional uint64 l1_lsp_sent = 13; + + // Number of Level 1 (L1) Link State Protocol Data Units (LSPs) received. + optional uint64 l1_lsp_received = 14; + + // The number of Level 2 (L2) sessions that are fully up. + optional uint32 l2_sessions_up = 15; + + // The number of Level 2 Sessions Flap. + optional uint64 l2_session_flap = 16; + + // Number of Level 2 Hello messages sent. + optional uint64 l2_broadcast_hellos_sent = 17; + + // Number of Level 2 Hello messages received. + optional uint64 l2_broadcast_hellos_received = 18; + + // Number of Level 2 Point-to-Point(P2P) Hello messages sent. + optional uint64 l2_point_to_point_hellos_sent = 19; + + // Number of Level 2 Point-to-Point(P2P) Hello messages received. + optional uint64 l2_point_to_point_hellos_received = 20; + + // Number of Link State Updates (LSPs) in the Level 2 LSP Databases. + optional uint64 l2_database_size = 21; + + // Number of Level 2 (L2) Partial Sequence Number Packet (PSNPs) sent. + optional uint64 l2_psnp_sent = 22; - // The names of LAG members (ports) for which the state has to be applied. An empty - // or null list will control all LAG members. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - repeated string lag_member_names = 1; + // Number of Level 2 (L2) Complete Sequence Number Packet (PSNPs) received. + optional uint64 l2_psnp_received = 23; - message State { - enum Enum { - unspecified = 0; - up = 1; - down = 2; - } - } - // The desired LACP member port state. - // required = true - optional State.Enum state = 2; -} + // Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) sent. + optional uint64 l2_csnp_sent = 24; -// Sets state of configured BGP peers. -message StateProtocolBgp { + // Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) received. + optional uint64 l2_csnp_received = 25; - message Choice { - enum Enum { - unspecified = 0; - peers = 1; - } - } - // Description missing in models - // required = true - optional Choice.Enum choice = 1; + // Number of Level 2 (L2) Link State Protocol Data Units (LSPs) sent. + optional uint64 l2_lsp_sent = 26; - // Description missing in models - StateProtocolBgpPeers peers = 2; + // Number of Level 2 (L2) Link State Protocol Data Units (LSPs) received. + optional uint64 l2_lsp_received = 27; } -// Sets state of configured BGP peers. -message StateProtocolBgpPeers { +// The request to retrieve per LAG metrics/statistics. +message LagMetricsRequest { - // The names of BGP peers for which the state has to be applied. An empty or null list - // will control all BGP peers. + // The names of LAGs to return results for. An empty list will return results for all + // LAGs. // // x-constraint: - // - /components/schemas/Bgp.V4Peer/properties/name - // - /components/schemas/Bgp.V6Peer/properties/name + // - /components/schemas/Lag/properties/name // // // x-constraint: - // - /components/schemas/Bgp.V4Peer/properties/name - // - /components/schemas/Bgp.V6Peer/properties/name + // - /components/schemas/Lag/properties/name // - repeated string peer_names = 1; - - message State { - enum Enum { - unspecified = 0; - up = 1; - down = 2; - } - } - // The desired state of BGP peer. If the desired state is 'up', underlying IP interface(s) - // would be brought up automatically (if not already up), would attempt to bring up - // the BGP session(s) and advertise route(s), if configured. If the desired state is - // 'down', BGP session(s) would be brought down. - // required = true - optional State.Enum state = 2; -} - -// Sets state of configured ISIS routers. -message StateProtocolIsis { + repeated string lag_names = 1; - message Choice { + message ColumnNames { enum Enum { unspecified = 0; - routers = 1; + oper_status = 1; + member_ports_up = 2; + frames_tx = 3; + frames_rx = 4; + bytes_tx = 5; + bytes_rx = 6; + frames_tx_rate = 7; + frames_rx_rate = 8; + bytes_tx_rate = 9; + bytes_rx_rate = 10; } } - // Description missing in models - // required = true - optional Choice.Enum choice = 1; - - // Description missing in models - StateProtocolIsisRouters routers = 2; + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned. The name of the LAG cannot be excluded. + repeated ColumnNames.Enum column_names = 2; } -// Sets state of configured ISIS routers. -message StateProtocolIsisRouters { +// Description missing in models +message LagMetric { - // The names of ISIS routers for which the state has to be applied. An empty or null - // list will control all ISIS routers. + // The name of a configured LAG // // x-constraint: - // - /components/schemas/Device.IsisRouter/properties/name + // - /components/schemas/Lag/properties/name // // // x-constraint: - // - /components/schemas/Device.IsisRouter/properties/name + // - /components/schemas/Lag/properties/name // - repeated string router_names = 1; + optional string name = 1; - message State { + message OperStatus { enum Enum { unspecified = 0; up = 1; down = 2; } } - // The desired state of ISIS router. If the desired state is 'up', would attempt to - // bring up the ISIS session(s) with respective peer(s) and advertise route(s), if configured. - // If the desired state is 'down', would bring down ISIS session(s) with respective - // peer(s). - // required = true - optional State.Enum state = 2; -} - -// Request for triggering action against configured resources. -message ControlAction { - - message Choice { - enum Enum { - unspecified = 0; - protocol = 1; - } - } - // Description missing in models - // required = true - optional Choice.Enum choice = 1; - - // Description missing in models - ActionProtocol protocol = 2; -} - -// Response for action triggered against configured resources along with warnings. -message ControlActionResponse { - - // List of warnings generated while triggering specified action - repeated string warnings = 1; - - // Description missing in models - ActionResponse response = 2; -} - -// Response for action triggered against configured resources. -message ActionResponse { - - message Choice { - enum Enum { - unspecified = 0; - protocol = 1; - } - } - // Description missing in models - // required = true - optional Choice.Enum choice = 1; - - // Description missing in models - ActionResponseProtocol protocol = 2; -} - -// Actions associated with protocols on configured resources. -message ActionProtocol { - - message Choice { - enum Enum { - unspecified = 0; - ipv4 = 1; - ipv6 = 2; - bgp = 3; - } - } - // Description missing in models - // required = true - optional Choice.Enum choice = 1; - - // Description missing in models - ActionProtocolIpv4 ipv4 = 2; - - // Description missing in models - ActionProtocolIpv6 ipv6 = 3; - - // Description missing in models - ActionProtocolBgp bgp = 4; -} - -// Response for actions associated with protocols on configured resources. -message ActionResponseProtocol { - - message Choice { - enum Enum { - unspecified = 0; - ipv4 = 1; - ipv6 = 2; - } - } - // Description missing in models - // required = true - optional Choice.Enum choice = 1; - - // Description missing in models - ActionResponseProtocolIpv4 ipv4 = 2; + // The current operational state of the LAG. The state can be up or down. State 'up' + // indicates member_ports_up >= min_links. + optional OperStatus.Enum oper_status = 2; - // Description missing in models - ActionResponseProtocolIpv6 ipv6 = 3; -} + // The number of LAG member ports up. + optional uint32 member_ports_up = 3; -// Actions associated with IPv4 on configured resources. -message ActionProtocolIpv4 { + // The current total number of frames transmitted. + optional uint64 frames_tx = 4; - message Choice { - enum Enum { - unspecified = 0; - ping = 1; - } - } - // Description missing in models - // required = true - optional Choice.Enum choice = 1; + // The current total number of valid frames received. + optional uint64 frames_rx = 5; - // Description missing in models - ActionProtocolIpv4Ping ping = 2; -} + // The current total number of bytes transmitted. + optional uint64 bytes_tx = 6; -// Response for actions associated with IPv4 on configured resources. -message ActionResponseProtocolIpv4 { + // The current total number of valid bytes received. + optional uint64 bytes_rx = 7; - message Choice { - enum Enum { - unspecified = 0; - ping = 1; - } - } - // Description missing in models - // required = true - optional Choice.Enum choice = 1; + // The current rate of frames transmitted. + optional float frames_tx_rate = 8; - // Description missing in models - ActionResponseProtocolIpv4Ping ping = 2; -} + // The current rate of valid frames received. + optional float frames_rx_rate = 9; -// Request for initiating ping between multiple source and destination pairs. -message ActionProtocolIpv4Ping { + // The current rate of bytes transmitted. + optional float bytes_tx_rate = 10; - // List of IPv4 ping requests. - repeated ActionProtocolIpv4PingRequest requests = 1; + // The current rate of bytes received. + optional float bytes_rx_rate = 11; } -// Under Review: Most ping request parameters are still TBD. -// -// Under Review: Most ping request parameters are still TBD. -// -// Request for initiating ping between a single source and destination pair. -// For ping request, 1 IPv4 ICMP Echo Request shall be sent and wait for ping response -// to either succeed or time out. The API wait timeout for each request shall be 300ms. -message ActionProtocolIpv4PingRequest { +// The request to retrieve LACP per LAG member metrics/statistics. +message LacpMetricsRequest { - // Name of source IPv4 interface to be used. + // The names of LAG (ports group) for which LACP metrics to be returned. An empty list + // will return metrics for all LAGs. // // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Lag/properties/name // // // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Lag/properties/name // - optional string src_name = 1; - - // Destination IPv4 address to ping. - optional string dst_ip = 2; -} - -// Response for ping initiated between multiple source and destination pairs. -message ActionResponseProtocolIpv4Ping { - - // List of responses for IPv4 ping responses. - repeated ActionResponseProtocolIpv4PingResponse responses = 1; -} - -// Response for ping initiated between a single source and destination pair. -message ActionResponseProtocolIpv4PingResponse { + repeated string lag_names = 1; - // Name of source IPv4 interface used for ping. + // The names of LAG members (ports) for which LACP metrics to be returned. An empty + // list will return metrics for all LAG members. // // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Port/properties/name // // // x-constraint: - // - /components/schemas/Device.Ipv4/properties/name + // - /components/schemas/Port/properties/name // - // required = true - optional string src_name = 1; - - // Destination IPv4 address used for ping. - // required = true - optional string dst_ip = 2; + repeated string lag_member_port_names = 2; - message Result { + message ColumnNames { enum Enum { unspecified = 0; - succeeded = 1; - failed = 2; + lacp_packets_rx = 1; + lacp_packets_tx = 2; + lacp_rx_errors = 3; + activity = 4; + timeout = 5; + synchronization = 6; + aggregatable = 7; + collecting = 8; + distributing = 9; + system_id = 10; + oper_key = 11; + partner_id = 12; + partner_key = 13; + port_num = 14; + partner_port_num = 15; } } - // Result of the ping request. - // required = true - optional Result.Enum result = 3; + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned. The name of LAG and LAG member can not be + // excluded. + repeated ColumnNames.Enum column_names = 3; } -// Actions associated with IPv6 on configured resources. -message ActionProtocolIpv6 { +// LACP metrics (statistics) per LAG member. +message LacpMetric { - message Choice { + // The name of a LAG (ports group) configured with LACP. + optional string lag_name = 1; + + // The name of a LAG member (port) configured with LACP. + optional string lag_member_port_name = 2; + + // Number of LACPDUs received. + optional uint64 lacp_packets_rx = 3; + + // Number of LACPDUs transmitted. + optional uint64 lacp_packets_tx = 4; + + // Number of LACPDUs receive packet errors. + optional uint64 lacp_rx_errors = 5; + + message Activity { enum Enum { unspecified = 0; - ping = 1; + active = 1; + passive = 2; } } - // Description missing in models - // required = true - optional Choice.Enum choice = 1; - - // Description missing in models - ActionProtocolIpv6Ping ping = 2; -} + // Indicates participant is active or passive. + optional Activity.Enum activity = 6; -// Response for actions associated with IPv6 on configured resources. -message ActionResponseProtocolIpv6 { + message Timeout { + enum Enum { + unspecified = 0; + short = 1; + long = 2; + } + } + // The timeout type (short or long) used by the participant. + optional Timeout.Enum timeout = 7; - message Choice { + message Synchronization { enum Enum { unspecified = 0; - ping = 1; + in_sync = 1; + out_sync = 2; } } - // Description missing in models - // required = true - optional Choice.Enum choice = 1; + // Indicates whether the participant is in-sync or out-of-sync. + optional Synchronization.Enum synchronization = 8; - // Description missing in models - ActionResponseProtocolIpv6Ping ping = 2; -} + // A true value indicates that the participant will allow the link to be used as part + // of the aggregate. A false value indicates the link should be used as an individual + // link. + optional bool aggregatable = 9; -// Request for initiating ping between multiple source and destination pairs. -message ActionProtocolIpv6Ping { + // If true, the participant is collecting incoming frames on the link, otherwise false. + optional bool collecting = 10; - // List of IPv6 ping requests. - repeated ActionProtocolIpv6PingRequest requests = 1; -} + // When true, the participant is distributing outgoing frames; when false, distribution + // is disabled. + optional bool distributing = 11; -// Under Review: Most ping request parameters are still TBD. -// -// Under Review: Most ping request parameters are still TBD. -// -// Request for initiating ping between a single source and destination pair. -// For ping request, 1 IPv6 ICMP Echo Request shall be sent and wait for ping response -// to either succeed or time out. The API wait timeout for each request shall be 300ms. -message ActionProtocolIpv6PingRequest { + // MAC address that defines the local system ID for the aggregate interface. + optional string system_id = 12; - // Name of source IPv6 interface to be used. - // - // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name - // - optional string src_name = 1; + // Current operational value of the key for the aggregate interface. + optional uint32 oper_key = 13; - // Destination IPv6 address to ping. - optional string dst_ip = 2; -} + // MAC address representing the protocol partner's interface system ID. + optional string partner_id = 14; -// Response for ping initiated between multiple source and destination pairs. -message ActionResponseProtocolIpv6Ping { + // Operational value of the protocol partner's key. + optional uint32 partner_key = 15; - // List of responses for IPv6 ping responses. - repeated ActionResponseProtocolIpv6PingResponse responses = 1; + // Port number of the local (actor) aggregation member. + optional uint32 port_num = 16; + + // Port number of the partner (remote) port for this member port. + optional uint32 partner_port_num = 17; } -// Response for ping initiated between a single source and destination pair. -message ActionResponseProtocolIpv6PingResponse { +// The request to retrieve LLDP per instance metrics/statistics. +message LldpMetricsRequest { - // Name of source IPv6 interface used for ping. + // The names of LLDP instances to return results for. An empty list will return results + // for all LLDP instances. // // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Lldp/properties/name // // // x-constraint: - // - /components/schemas/Device.Ipv6/properties/name + // - /components/schemas/Lldp/properties/name // - // required = true - optional string src_name = 1; - - // Destination IPv6 address used for ping. - // required = true - optional string dst_ip = 2; + repeated string lldp_names = 1; - message Result { + message ColumnNames { enum Enum { unspecified = 0; - succeeded = 1; - failed = 2; + frames_rx = 1; + frames_tx = 2; + frames_error_rx = 3; + frames_discard = 4; + tlvs_discard = 5; + tlvs_unknown = 6; } } - // Result of the ping request. - // required = true - optional Result.Enum result = 3; + // The requested list of column names for the result set. If the list is empty then + // metrics for all columns will be returned. The name of LLDP instance can not be excluded. + repeated ColumnNames.Enum column_names = 2; } -// Actions associated with BGP on configured resources. -message ActionProtocolBgp { +// LLDP per instance statistics information. +message LldpMetric { - message Choice { - enum Enum { - unspecified = 0; - notification = 1; - initiate_graceful_restart = 2; - } - } - // Description missing in models - // required = true - optional Choice.Enum choice = 1; + // The name of the configured LLDP instance. + optional string name = 1; + + // Number of LLDP frames received. + optional uint64 frames_rx = 2; + + // Number of LLDP frames transmitted. + optional uint64 frames_tx = 3; + + // Number of LLDP frames received with packet errors. This stat should be incremented + // based on statsFramesInErrorsTotal increment rule in section 10.3.2 of IEEE Std 802.1 + // AB-2005. + optional uint64 frames_error_rx = 4; + + // Number of LLDP frames received that are discarded. This stat should be incremented + // when one or more of the three mandatory TLVs at the beginning of the LLDPDU is missing, + // out of order or contains an out of range information string length. This stat should + // follow the validation rules in section 10.3.2 of IEEE Std 802.1 AB-2005. + optional uint64 frames_discard = 5; - // Description missing in models - ActionProtocolBgpNotification notification = 2; + // Number of LLDP tlvs received that are discarded. If any TLV contains an error condition + // specific for that particular TLV or if any TLV extends past the physical end of + // the frame then these TLVs will be discarded. + optional uint64 tlvs_discard = 6; - // Description missing in models - ActionProtocolBgpInitiateGracefulRestart initiate_graceful_restart = 3; + // Number of LLDP unknown tlvs received. If the OUI of the organizationlly specific + // TLV and/or organizationally defined subtype are not recognized,or if TLV type value + // is in the range of reserved TLV types then these TLVs will be considered as unknown + // TLVs. + optional uint64 tlvs_unknown = 7; } -// A NOTIFICATION message is sent when an error is detected with the BGP session, such -// as hold timer expiring, misconfigured AS number or a BGP session reset is requested. -// This causes the BGP connection to close. Send explicit NOTIFICATIONs for list of -// specified BGP peers. If a user wants to send custom Error Code and Error Subcode -// the custom object should be configured. A user can send IANA defined BGP NOTIFICATIONs -// according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. -// -message ActionProtocolBgpNotification { +// The request to retrieve RSVP-TE per Router metrics/statistics. +message RsvpMetricsRequest { - // The names of BGP Peers to send NOTIFICATION to. If no name is specified then NOTIFICATION - // will be sent to all configured BGP peers. + // The names of RSVP-TE Routers to return results for. An empty list as input will return + // results for all RSVP-TE routers. // // x-constraint: - // - /components/schemas/Device.Bgp/properties/name + // - /components/schemas/Device.Rsvp/properties/name // // // x-constraint: - // - /components/schemas/Device.Bgp/properties/name + // - /components/schemas/Device.Rsvp/properties/name // - repeated string names = 1; + repeated string router_names = 1; - message Choice { + message ColumnNames { enum Enum { unspecified = 0; - cease = 1; - message_header_error = 2; - open_message_error = 3; - update_message_error = 4; - hold_timer_expired = 5; - finite_state_machine_error = 6; - custom = 7; + ingress_p2p_lsps_configured = 1; + ingress_p2p_lsps_up = 2; + egress_p2p_lsps_up = 3; + lsp_flap_count = 4; + paths_tx = 5; + paths_rx = 6; + resvs_tx = 7; + resvs_rx = 8; + path_tears_tx = 9; + path_tears_rx = 10; + resv_tears_tx = 11; + resv_tears_rx = 12; + path_errors_tx = 13; + path_errors_rx = 14; + resv_errors_tx = 15; + resv_errors_rx = 16; + resv_conf_tx = 17; + resv_conf_rx = 18; + hellos_tx = 19; + hellos_rx = 20; + acks_tx = 21; + acks_rx = 22; + nacks_tx = 23; + nacks_rx = 24; + srefresh_tx = 25; + srefresh_rx = 26; + bundle_tx = 27; + bundle_rx = 28; + path_reevaluation_request_tx = 29; + path_reoptimizations = 30; } } - // Each BGP NOTIFICATION message includes an Error Code field indicating what type of - // problem occurred. For certain Error Codes, an Error Subcode field provides additional - // details about the specific nature of the problem. The choice value will provide - // the Error Code used in NOTIFICATION message. The Subcode can be set for each of - // the corresponding errors except for Hold Timer Expired error and BGP Finite State - // Machine error. In both of these cases Subcode 0 will be sent. If a user wants to - // use non zero Sub Code then custom choice can be used. - // default = Choice.Enum.cease - optional Choice.Enum choice = 2; + // The list of column names that the returned result set will contain. If the input + // list is empty then all columns will be returned except for any result_groups. + // + repeated ColumnNames.Enum column_names = 2; +} - // Description missing in models - DeviceBgpCeaseError cease = 3; +// RSVP-TE per router statistics information. +message RsvpMetric { - // Description missing in models - DeviceBgpMessageHeaderError message_header_error = 4; + // The name of a configured RSVP router. + optional string name = 1; - // Description missing in models - DeviceBgpOpenMessageError open_message_error = 5; + // The number of ingress point-to-point LSPs configured or transiting through the RSVP + // router which have been initated from the test port. + optional uint32 ingress_p2p_lsps_configured = 2; - // Description missing in models - DeviceBgpUpdateMessageError update_message_error = 6; + // The number of ingress point-to-point LSPs for which Resv has been received and is + // currently up. + optional uint32 ingress_p2p_lsps_up = 3; - // Description missing in models - DeviceBgpHoldTimerExpired hold_timer_expired = 7; + // The number of egress point-to-point LSPs for which Path requests were successfully + // processed and is currently up. + optional uint32 egress_p2p_lsps_up = 4; - // Description missing in models - DeviceBgpFiniteStateMachineError finite_state_machine_error = 8; + // The number of times an LSP went from up to down state either because it timed out + // while waiting for Refreshes or a PathTear or ResvTear message was received which + // caused the LSP to flap. + optional uint64 lsp_flap_count = 5; - // Description missing in models - DeviceBgpCustomError custom = 9; -} + // The number of Path messages sent by this RSVP router. + optional uint64 paths_tx = 6; -// Initiates BGP Graceful Restart process for the selected BGP peers. If no name is -// specified then Graceful Restart will be sent to all configured BGP peers. -message ActionProtocolBgpInitiateGracefulRestart { + // The number of Path messages received by this RSVP router. + optional uint64 paths_rx = 7; - // The names of device BGP peers objects to control. - // - // x-constraint: - // - /components/schemas/Device.Bgp/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.Bgp/properties/name - // - repeated string peer_names = 1; + // The number of Resv messages sent by this RSVP router. + optional uint64 resvs_tx = 8; - // Duration (in seconds) after which selected BGP peers will initiate - // Graceful restart by sending the Open Message with Restart State bit set in the Graceful - // Restart capability. - // default = 30 - optional uint32 restart_delay = 2; -} + // The number of Resv messages received by this RSVP router. + optional uint64 resvs_rx = 9; -// Request to traffic generator for metrics of choice. -message MetricsRequest { + // The number of Path Tear messages sent by this RSVP router. + optional uint64 path_tears_tx = 10; - message Choice { - enum Enum { - unspecified = 0; - port = 1; - flow = 2; - bgpv4 = 3; - bgpv6 = 4; - isis = 5; - lag = 6; - lacp = 7; - lldp = 8; - rsvp = 9; - } - } - // Description missing in models - // default = Choice.Enum.port - optional Choice.Enum choice = 1; + // The number of Path Tear messages received by this RSVP router. + optional uint64 path_tears_rx = 11; - // Description missing in models - PortMetricsRequest port = 2; + // The number of Resv Tear messages sent by this RSVP router. + optional uint64 resv_tears_tx = 12; - // Description missing in models - FlowMetricsRequest flow = 3; + // The number of Resv Tear messages received by this RSVP router. + optional uint64 resv_tears_rx = 13; - // Description missing in models - Bgpv4MetricsRequest bgpv4 = 4; + // The number of Path Error messages sent by this RSVP router. + optional uint64 path_errors_tx = 14; - // Description missing in models - Bgpv6MetricsRequest bgpv6 = 5; + // The number of Path Error messages received by this RSVP router. + optional uint64 path_errors_rx = 15; - // Description missing in models - IsisMetricsRequest isis = 6; + // The number of Resv Error messages sent by this RSVP router. + optional uint64 resv_errors_tx = 16; - // Description missing in models - LagMetricsRequest lag = 7; + // The number of Resv Error messages received by this RSVP router. + optional uint64 resv_errors_rx = 17; - // Description missing in models - LacpMetricsRequest lacp = 8; + // The number of ResvConf messages sent by this RSVP router. + optional uint64 resv_conf_tx = 18; - // Description missing in models - LldpMetricsRequest lldp = 9; + // The number of ResvConf messages received by this RSVP router. + optional uint64 resv_conf_rx = 19; - // Description missing in models - RsvpMetricsRequest rsvp = 10; + // The number of Hello messages sent by this RSVP router. + optional uint64 hellos_tx = 20; + + // The number of Hello messages received by this RSVP router. + optional uint64 hellos_rx = 21; + + // The number of Ack messages sent by this RSVP router. + optional uint64 acks_tx = 22; + + // The number of Ack messages received by this RSVP router. + optional uint64 acks_rx = 23; + + // The number of Nack messages sent by this RSVP router. + optional uint64 nacks_tx = 24; + + // The number of Nack messages received by this RSVP router. + optional uint64 nacks_rx = 25; + + // The number of SRefresh messages sent by this RSVP router. + optional uint64 srefresh_tx = 26; + + // The number of SRefresh messages received by this RSVP router. + optional uint64 srefresh_rx = 27; + + // The number of Bundle messages sent by this RSVP router. + optional uint64 bundle_tx = 28; + + // The number of Bundle messages received by this RSVP router. + optional uint64 bundle_rx = 29; + + // The number of Path messages with Path Re-evaluation Request enabled sent by this + // RSVP router. + optional uint64 path_reevaluation_request_tx = 30; + + // The number of successfully completed Make-Before-Break operations on LSPs on this + // RSVP router. + optional uint64 path_reoptimizations = 31; } -// Response containing chosen traffic generator metrics. -message MetricsResponse { +// The request to retrieve DHCPv4 per client metrics/statistics. +message Dhcpv4ClientMetricsRequest { - message Choice { + // The names of DHCPv4 clients to return results for. An empty list will return results + // for all DHCPv4 client. + // + // x-constraint: + // - /components/schemas/Device.Dhcpv4client/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Dhcpv4client/properties/name + // + repeated string client_names = 1; + + message ColumnNames { enum Enum { unspecified = 0; - flow_metrics = 1; - port_metrics = 2; - bgpv4_metrics = 3; - bgpv6_metrics = 4; - isis_metrics = 5; - lag_metrics = 6; - lacp_metrics = 7; - lldp_metrics = 8; - rsvp_metrics = 9; + discovers_sent = 1; + offers_received = 2; + requests_sent = 3; + acks_received = 4; + nacks_received = 5; + releases_sent = 6; + declines_sent = 7; } } - // Description missing in models - // default = Choice.Enum.port_metrics - optional Choice.Enum choice = 1; + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned. The name of the DHCPv4 client cannot be + // excluded. + repeated ColumnNames.Enum column_names = 2; +} - // Description missing in models - repeated PortMetric port_metrics = 2; +// DHCPv4 per peer statistics information. +message Dhcpv4ClientMetric { - // Description missing in models - repeated FlowMetric flow_metrics = 3; + // The name of a configured DHCPv4 client. + optional string name = 1; - // Description missing in models - repeated Bgpv4Metric bgpv4_metrics = 4; + // Number of DHCPDISCOVER messages sent. + optional uint64 discovers_sent = 2; - // Description missing in models - repeated Bgpv6Metric bgpv6_metrics = 5; + // Number of DHCPOFFER messages received. + optional uint64 offers_received = 3; - // Description missing in models - repeated IsisMetric isis_metrics = 6; + // Number of DHCPREQUEST messages sent. + optional uint64 requests_sent = 4; - // Description missing in models - repeated LagMetric lag_metrics = 7; + // Number of lease DHCPACK messages received. + optional uint64 acks_received = 5; - // Description missing in models - repeated LacpMetric lacp_metrics = 8; + // Number of negative lease DHCPNACK messages received. + optional uint64 nacks_received = 6; - // Description missing in models - repeated LldpMetric lldp_metrics = 9; + // Number of DHCPRELEASE messages sent. + optional uint64 releases_sent = 7; - // Description missing in models - repeated RsvpMetric rsvp_metrics = 10; + // Number of DHCPDECLINE messages sent. + optional uint64 declines_sent = 8; } -// The port result request to the traffic generator -message PortMetricsRequest { +// The request to retrieve DHCPv4 per Server metrics/statistics. +message Dhcpv4ServerMetricsRequest { - // The names of objects to return results for. An empty list will return all port row - // results. + // The names of DHCPv4 Servers to return results for. An empty list will return results + // for all DHCPv4 Server. // // x-constraint: - // - /components/schemas/Port/properties/name + // - /components/schemas/Device.Dhcpv4Server/properties/name // // // x-constraint: - // - /components/schemas/Port/properties/name + // - /components/schemas/Device.Dhcpv4Server/properties/name // - repeated string port_names = 1; + repeated string server_names = 1; message ColumnNames { enum Enum { unspecified = 0; - transmit = 1; - location = 2; - link = 3; - capture = 4; - frames_tx = 5; - frames_rx = 6; - bytes_tx = 7; - bytes_rx = 8; - frames_tx_rate = 9; - frames_rx_rate = 10; - bytes_tx_rate = 11; - bytes_rx_rate = 12; + discovers_received = 1; + offers_sent = 2; + requests_received = 3; + acks_sent = 4; + nacks_sent = 5; + releases_received = 6; + declines_received = 7; } } // The list of column names that the returned result set will contain. If the list is - // empty then all columns will be returned. The name of the port cannot be excluded. + // empty then all columns will be returned. The name of the DHCPv4 server cannot be + // excluded. repeated ColumnNames.Enum column_names = 2; } -// Description missing in models -message PortMetric { +// DHCPv4 per peer statistics information. +message Dhcpv4ServerMetric { - // The name of a configured port + // The name of a configured DHCPv4 Server. + optional string name = 1; + + // Number of DHCPDISCOVER messages received. + optional uint64 discovers_received = 2; + + // Number of DHCPOFFER messages sent. + optional uint64 offers_sent = 3; + + // Number of DHCPOFFER messages received. + optional uint64 requests_received = 4; + + // Number of lease DHCPACK messages sent. + optional uint64 acks_sent = 5; + + // Number of negative lease DHCPNACK messages sent. + optional uint64 nacks_sent = 6; + + // Number of DHCPRELEASE messages received. + optional uint64 releases_received = 7; + + // Number of DHCPDECLINE messages received. + optional uint64 declines_received = 8; +} + +// The request to retrieve DHCPv6 per client metrics/statistics. +message Dhcpv6ClientMetricsRequest { + + // The names of DHCPv6 clients to return results for. An empty list will return results + // for all DHCPv6 client. // // x-constraint: - // - /components/schemas/Port/properties/name + // - /components/schemas/Device.Dhcpv6client/properties/name // // // x-constraint: - // - /components/schemas/Port/properties/name + // - /components/schemas/Device.Dhcpv6client/properties/name // - optional string name = 1; + repeated string client_names = 1; - // The state of the connection to the test port location. The format should be the configured - // port location along with any custom connection state message. - optional string location = 2; - - message Link { + message ColumnNames { enum Enum { unspecified = 0; - up = 1; - down = 2; + solicits_sent = 1; + advertisements_received = 2; + advertisements_ignored = 3; + requests_sent = 4; + nacks_received = 5; + replies_received = 6; + information_requests_sent = 7; + renews_sent = 8; + rebinds_sent = 9; + releases_sent = 10; + reconfigures_received = 11; + rapid_commit_solicits_sent = 12; + rapid_commit_replies_received = 13; } } - // The state of the test port link The string can be up, down or a custom error message. - optional Link.Enum link = 3; + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned except for any result_groups. The name of + // the DHCPv6 client cannot be excluded. + repeated ColumnNames.Enum column_names = 2; +} - message Capture { - enum Enum { - unspecified = 0; - started = 1; - stopped = 2; - } - } - // The state of the test port capture infrastructure. The string can be started, stopped - // or a custom error message. - optional Capture.Enum capture = 4; +// DHCPv6 per peer statistics information. +message Dhcpv6ClientMetric { - // The current total number of frames transmitted - optional uint64 frames_tx = 5; + // The name of a configured DHCPv6 client. + optional string name = 1; - // The current total number of valid frames received - optional uint64 frames_rx = 6; + // Number of DHCPSOLICIT messages sent. + optional uint64 solicits_sent = 2; - // The current total number of bytes transmitted - optional uint64 bytes_tx = 7; + // Number of DHCPADVERTISE messages received. + optional uint64 advertisements_received = 3; - // The current total number of valid bytes received - optional uint64 bytes_rx = 8; + // Number of DHCPADVERTISE messages ignored. + optional uint64 advertisements_ignored = 4; - // The current rate of frames transmitted - optional float frames_tx_rate = 9; + // Number of DHCPREQUEST messages sent. + optional uint64 requests_sent = 5; - // The current rate of valid frames received - optional float frames_rx_rate = 10; + // Number of negative lease DHCPNACK messages received. + optional uint64 nacks_received = 6; - // The current rate of bytes transmitted - optional float bytes_tx_rate = 11; + // Number of DHCPOFFER messages received. + optional uint64 replies_received = 7; - // The current rate of bytes received - optional float bytes_rx_rate = 12; + // Number of DHCP Inform requests sent. + optional uint64 information_requests_sent = 8; - message Transmit { - enum Enum { - unspecified = 0; - started = 1; - stopped = 2; - } - } - // The transmit state of the flow. - optional Transmit.Enum transmit = 13; + // Number of DHCP renew messages sent. + optional uint64 renews_sent = 9; + + // Number of DHCP rebind messages sent. + optional uint64 rebinds_sent = 10; + + // Number of DHCP Release messages sent. + optional uint64 releases_sent = 11; + + // Number of DHCP Reconfigure messages received. + optional uint64 reconfigures_received = 12; + + // Number of rapid commit DHCPSOLICIT messages sent. + optional uint64 rapid_commit_solicits_sent = 13; + + // Number of rapid commit DHCP Reply messages received. + optional uint64 rapid_commit_replies_received = 14; } -// The container for a flow metric request. -message FlowMetricsRequest { +// The request to retrieve DHCPv6 per Server metrics/statistics. +message Dhcpv6ServerMetricsRequest { - // Flow metrics will be retrieved for these flow names. - // If no flow names are specified then all flows will be returned. + // The names of DHCPv6 Servers to return results for. An empty list will return results + // for all DHCPv6 Server. // // x-constraint: - // - /components/schemas/Flow/properties/name + // - /components/schemas/Device.Dhcpv6Server/properties/name // // // x-constraint: - // - /components/schemas/Flow/properties/name + // - /components/schemas/Device.Dhcpv6Server/properties/name // - repeated string flow_names = 1; + repeated string server_names = 1; - message MetricNames { + message ColumnNames { enum Enum { unspecified = 0; - transmit = 1; - frames_tx = 2; - frames_rx = 3; - bytes_tx = 4; - bytes_rx = 5; - frames_tx_rate = 6; - frames_rx_rate = 7; + solicits_received = 1; + solicits_ignored = 2; + advertisements_sent = 3; + requests_received = 4; + nacks_sent = 5; + confirms_received = 6; + renewals_received = 7; + rebinds_received = 8; + replies_sent = 9; + releases_received = 10; + declines_received = 11; + information_requests_received = 12; + relay_forwards_received = 13; + relay_replies_sent = 14; + reconfigures_sent = 15; } } - // The list of metric names that the returned result set will contain. If the list is - // empty then all metrics will be returned. - repeated MetricNames.Enum metric_names = 3; - - // Description missing in models - FlowTaggedMetricsFilter tagged_metrics = 4; + // The list of column names that the returned result set will contain. If the list is + // empty then all columns will be returned except for any result_groups. The name of + // the DHCPv6 server cannot be excluded. + repeated ColumnNames.Enum column_names = 2; } -// Filter for tagged metrics -message FlowTaggedMetricsFilter { +// DHCPv6 per server statistics information. +message Dhcpv6ServerMetric { - // Controls inclusion/exclusion of tagged metrics when fetching flow metrics. - // default = True - optional bool include = 1; + // The name of a configured DHCPv6 Server. + optional string name = 1; - // Controls inclusion/exclusion of tagged metrics where each underlying attributes has - // zero value or absent value. - // default = False - optional bool include_empty_metrics = 2; + // Number of DHCPSOLICIT messages received. + optional uint64 solicits_received = 2; - message MetricNames { - enum Enum { - unspecified = 0; - frames_tx = 1; - frames_rx = 2; - bytes_tx = 3; - bytes_rx = 4; - frames_tx_rate = 5; - frames_rx_rate = 6; - } - } - // The list of metric names that the returned result set will contain. If the list is - // empty then all metrics will be returned. - repeated MetricNames.Enum metric_names = 3; + // Number of DHCPSOLICIT messages ignored. + optional uint64 solicits_ignored = 3; - // List of filters to selectively fetch tagged metrics with certain tag and corresponding - // value. - repeated FlowMetricTagFilter filters = 4; + // Number of DHCP Advertise messages sent. + optional uint64 advertisements_sent = 4; + + // Number of DHCPREQUEST messages received. + optional uint64 requests_received = 5; + + // Number of naks sent for DHCPREQUEST messages. + optional uint64 nacks_sent = 6; + + // Number of DHCP Confirm messages received. + optional uint64 confirms_received = 7; + + // Number of DHCP Renewal messages received. + optional uint64 renewals_received = 8; + + // Number of DHCP Rebind messages received. + optional uint64 rebinds_received = 9; + + // Number of DHCP Reply messages sent. + optional uint64 replies_sent = 10; + + // Number of DHCP Release messages received. + optional uint64 releases_received = 11; + + // Number of DHCP Decline messages received. + optional uint64 declines_received = 12; + + // Number of DHCP Information Request messages received. + optional uint64 information_requests_received = 13; + + // Number of DHCP Relay agent forward messages received. + optional uint64 relay_forwards_received = 14; + + // Number of DHCP reply messages sent to Relay agent. + optional uint64 relay_replies_sent = 15; + + // Number of DHCP Reconfigure messages sent. + optional uint64 reconfigures_sent = 16; } -// A container for filtering ingress and/or egress metric tags. -// The Tx stats may not be applicable in both the request and response filter. -message FlowMetricTagFilter { +// The request to retrieve OSPFv2 per Router metrics/statistics. +message Ospfv2MetricsRequest { - // A metric tag name that MUST exist in a flow packet or - // flow egress_packet configuration - optional string name = 1; + // The names of OSPFv2 routers to return results for. An empty list will return results + // for all OSPFv2 router. + // + // x-constraint: + // - /components/schemas/Device.Ospfv2/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ospfv2/properties/name + // + repeated string router_names = 1; - // A list of filters that can be applied to the metric tag name. - // By default all values will be included in the flow metric results. - repeated string values = 2; + message ColumnNames { + enum Enum { + unspecified = 0; + full_state_count = 1; + down_state_count = 2; + sessions_flap = 3; + hellos_sent = 4; + hellos_received = 5; + dbd_sent = 6; + dbd_received = 7; + ls_request_sent = 8; + ls_request_received = 9; + ls_update_sent = 10; + ls_update_received = 11; + ls_ack_sent = 12; + ls_ack_received = 13; + lsa_sent = 14; + lsa_received = 15; + lsa_ack_sent = 16; + lsa_ack_received = 17; + router_lsa_sent = 18; + router_lsa_received = 19; + network_lsa_sent = 20; + network_lsa_received = 21; + summary_lsa_sent = 22; + summary_lsa_received = 23; + external_lsa_sent = 24; + external_lsa_received = 25; + nssa_lsa_sent = 26; + nssa_lsa_received = 27; + opaque_local_sent = 28; + opaque_local_received = 29; + opaque_area_sent = 30; + opaque_area_received = 31; + opaque_domain_sent = 32; + opaque_domain_received = 33; + } + } + // The list of column names that the returned result set will contain. + // If the list is empty then all columns will be returned except for + // any result_groups. + // The name of the OSPFv2 Router cannot be excluded. + repeated ColumnNames.Enum column_names = 2; } -// A container for flow metrics. -// The container is keyed by the name, port_tx and port_rx. -message FlowMetric { +// OSPFv2 per router statistics information. +message Ospfv2Metric { - // The name of the flow + // The name of a configured OSPFv2 router. optional string name = 1; - // The name of the transmit port - optional string port_tx = 2; + // The number of OSPFv2 sessions in up state. + optional uint64 full_state_count = 2; - // The name of the receive port - optional string port_rx = 3; + // The number of OSPFv2 sessions in down state. + optional uint64 down_state_count = 3; - message Transmit { - enum Enum { - unspecified = 0; - started = 1; - stopped = 2; - paused = 3; - } - } - // The transmit state of the flow. - optional Transmit.Enum transmit = 5; + // The number of change of OSPFv2 sessions from up to down state. + optional uint64 sessions_flap = 4; - // The current total number of frames transmitted - optional uint64 frames_tx = 6; + // The number of OSPFv2 Hello messages transmitted. + optional uint64 hellos_sent = 5; - // The current total number of valid frames received - optional uint64 frames_rx = 7; + // The number of OSPFv2 Hello messages received. + optional uint64 hellos_received = 6; - // The current total number of bytes transmitted - optional uint64 bytes_tx = 8; + // The number of OSPFv2 Database Description (DBD) messages transmitted. + optional uint64 dbd_sent = 7; - // The current total number of bytes received - optional uint64 bytes_rx = 9; + // The number of OSPFv2 Database Description (DBD) messages received. + optional uint64 dbd_received = 8; - // The current rate of frames transmitted - optional float frames_tx_rate = 10; + // The number of OSPFv2 LinkState (LS) Request messages transmitted. + optional uint64 ls_request_sent = 9; - // The current rate of valid frames received - optional float frames_rx_rate = 11; + // The number of OSPFv2 LinkState (LS) Request messages received. + optional uint64 ls_request_received = 10; - // The percentage of lost frames - optional float loss = 12; + // The number of OSPFv2 LinkState (LS) Update messages transmitted. + optional uint64 ls_update_sent = 11; - // Description missing in models - MetricTimestamp timestamps = 13; + // The number of OSPFv2 LinkState (LS) Update messages received. + optional uint64 ls_update_received = 12; - // Description missing in models - MetricLatency latency = 14; + // The number of OSPFv2 LinkState (LS) Acknowledgement messages transmitted. + optional uint64 ls_ack_sent = 13; - // List of metrics corresponding to a set of values applicable - // for configured metric tags in ingress or egress packet header fields of corresponding - // flow. - // The container is keyed by list of tag-value pairs. - repeated FlowTaggedMetric tagged_metrics = 15; -} + // The number of OSPFv2 LinkState (LS) Acknowledgement messages received. + optional uint64 ls_ack_received = 14; -// Metrics for each set of values applicable for configured -// metric tags in ingress or egress packet header fields of corresponding flow. -// The container is keyed by list of tag-value pairs. -message FlowTaggedMetric { + // The total number of OSPFv2 LinkState Advertisement (LSA) messages transmitted. + optional uint64 lsa_sent = 15; - // List of tag and value pairs - repeated FlowMetricTag tags = 1; + // The total number of OSPFv2 LinkState Advertisement (LSA) messages received. + optional uint64 lsa_received = 16; + + // The total number of OSPFv2 LinkState Advertisement (LSA) messages acknowledged. + optional uint64 lsa_ack_sent = 17; + + // The total number of OSPFv2 LinkState Advertisement (LSA) acknowledge messages received + // . + optional uint64 lsa_ack_received = 18; + + // The number of OSPFv2 Router (Type 1) LSAs transmitted. + optional uint64 router_lsa_sent = 19; + + // The number of OSPFv2 Router (Type 1) LSAs received. + optional uint64 router_lsa_received = 20; + + // The number of OSPFv2 Network (Type 2) LSAs transmitted. + optional uint64 network_lsa_sent = 21; - // The current total number of frames transmitted - optional uint64 frames_tx = 2; + // The number of OSPFv2 Network (Type 2) LSAs transmitted. + optional uint64 network_lsa_received = 22; - // The current total number of valid frames received - optional uint64 frames_rx = 3; + // The number of OSPFv2 Summary IP (Type 3) LSAs transmitted. + optional uint64 summary_lsa_sent = 23; - // The current total number of bytes transmitted - optional uint64 bytes_tx = 4; + // The number of OSPFv2 Summary IP (Type 3) LSA received. + optional uint64 summary_lsa_received = 24; - // The current total number of bytes received - optional uint64 bytes_rx = 5; + // The number of OSPFv2 External (Type 5) LSAs transmitted. + optional uint64 external_lsa_sent = 25; - // The current rate of frames transmitted - optional float frames_tx_rate = 6; + // The number of OSPFv2 External (Type 5) LSAs received. + optional uint64 external_lsa_received = 26; - // The current rate of valid frames received - optional float frames_rx_rate = 7; + // The number of OSPFv2 NSSA (Type 7) LSAs transmitted. + optional uint64 nssa_lsa_sent = 27; - // The percentage of lost frames - optional float loss = 8; + // The number of OSPFv2 NSSA (Type 7) LSAs received. + optional uint64 nssa_lsa_received = 28; - // Description missing in models - MetricTimestamp timestamps = 9; + // The number of OSPFv2 Opaque Local (Type 9) LSAs transmitted. + optional uint64 opaque_local_sent = 29; - // Description missing in models - MetricLatency latency = 10; -} + // The number of OSPFv2 Opaque Local (Type 9) LSAs received. + optional uint64 opaque_local_received = 30; -// Description missing in models -message FlowMetricTag { + // The number of OSPF Opaque Area (Type 10) LSAs transmitted. + optional uint64 opaque_area_sent = 31; - // Name of packet field metric tag - optional string name = 1; + // The number of OSPFv2 Opaque Area (Type 10) LSAs received. + optional uint64 opaque_area_received = 32; - // Description missing in models - FlowMetricTagValue value = 2; + // The number of OSPFv2 Opaque Domain (Type 11) LSAs transmitted. + optional uint64 opaque_domain_sent = 33; + + // The number of OSPFv2 Opaque Domain (Type 11) LSAs received. + optional uint64 opaque_domain_received = 34; } -// A container for metric tag value -message FlowMetricTagValue { +// Request to traffic generator for states of choice +message StatesRequest { message Choice { enum Enum { unspecified = 0; - hex = 1; - str = 2; + ipv4_neighbors = 1; + ipv6_neighbors = 2; + bgp_prefixes = 3; + isis_lsps = 4; + lldp_neighbors = 5; + rsvp_lsps = 6; + dhcpv4_interfaces = 7; + dhcpv4_leases = 8; + dhcpv6_interfaces = 9; + dhcpv6_leases = 10; + ospfv2_lsas = 11; } } - // Available formats for metric tag value - // default = Choice.Enum.hex + // Description missing in models + // default = Choice.Enum.ipv4_neighbors optional Choice.Enum choice = 1; - // Value represented in hexadecimal format - optional string hex = 2; - - // Value represented in string format - optional string str = 3; -} + // Description missing in models + Neighborsv4StatesRequest ipv4_neighbors = 2; -// The container for timestamp metrics. -// The container will be empty if the timestamp has not been configured for -// the flow. -message MetricTimestamp { + // Description missing in models + Neighborsv6StatesRequest ipv6_neighbors = 3; - // First timestamp in nanoseconds - optional double first_timestamp_ns = 1; + // Description missing in models + BgpPrefixStateRequest bgp_prefixes = 4; - // Last timestamp in nanoseconds - optional double last_timestamp_ns = 2; -} + // Description missing in models + IsisLspsStateRequest isis_lsps = 5; -// The container for latency metrics. -// The min/max/avg values are dependent on the type of latency measurement -// mode that is configured. -// The container will be empty if the latency has not been configured for -// the flow. -message MetricLatency { + // Description missing in models + LldpNeighborsStateRequest lldp_neighbors = 6; - // Minimum latency in nanoseconds - optional double minimum_ns = 1; + // Description missing in models + RsvpLspsStateRequest rsvp_lsps = 7; - // Maximum latency in nanoseconds - optional double maximum_ns = 2; + // Description missing in models + Dhcpv4InterfaceStateRequest dhcpv4_interfaces = 8; - // Average latency in nanoseconds - optional double average_ns = 3; -} + // Description missing in models + Dhcpv4LeaseStateRequest dhcpv4_leases = 9; -// The request to retrieve BGPv4 per peer metrics/statistics. -message Bgpv4MetricsRequest { + // Description missing in models + Dhcpv6InterfaceStateRequest dhcpv6_interfaces = 10; - // The names of BGPv4 peers to return results for. An empty list will return results - // for all BGPv4 peers. - // - // x-constraint: - // - /components/schemas/Bgp.V4peer/properties/name - // - // - // x-constraint: - // - /components/schemas/Bgp.V4peer/properties/name - // - repeated string peer_names = 1; + // Description missing in models + Dhcpv6LeaseStateRequest dhcpv6_leases = 11; - message ColumnNames { - enum Enum { - unspecified = 0; - session_state = 1; - session_flap_count = 2; - routes_advertised = 3; - routes_received = 4; - route_withdraws_sent = 5; - route_withdraws_received = 6; - updates_sent = 7; - updates_received = 8; - opens_sent = 9; - opens_received = 10; - keepalives_sent = 11; - keepalives_received = 12; - notifications_sent = 13; - notifications_received = 14; - fsm_state = 15; - end_of_rib_received = 16; - } - } - // The list of column names that the returned result set will contain. If the list is - // empty then all columns will be returned except for any result_groups. The name of - // the BGPv4 peer cannot be excluded. - repeated ColumnNames.Enum column_names = 2; + // Description missing in models + Ospfv2LsasStateRequest ospfv2_lsas = 12; } -// BGPv4 per peer statistics information. -message Bgpv4Metric { - - // The name of a configured BGPv4 peer. - optional string name = 1; +// Response containing chosen traffic generator states +message StatesResponse { - message SessionState { + message Choice { enum Enum { unspecified = 0; - up = 1; - down = 2; + ipv4_neighbors = 1; + ipv6_neighbors = 2; + bgp_prefixes = 3; + isis_lsps = 4; + lldp_neighbors = 5; + rsvp_lsps = 6; + dhcpv4_interfaces = 7; + dhcpv4_leases = 8; + dhcpv6_interfaces = 9; + dhcpv6_leases = 10; + ospfv2_lsas = 11; } } - // Session state as up or down. Up refers to an Established state and Down refers to - // any other state. - optional SessionState.Enum session_state = 2; + // Description missing in models + // default = Choice.Enum.ipv4_neighbors + optional Choice.Enum choice = 1; - // Number of times the session went from Up to Down state. - optional uint64 session_flap_count = 3; + // Description missing in models + repeated Neighborsv4State ipv4_neighbors = 2; - // Number of routes advertised. - optional uint64 routes_advertised = 4; + // Description missing in models + repeated Neighborsv6State ipv6_neighbors = 3; - // Number of routes received. - optional uint64 routes_received = 5; + // Description missing in models + repeated BgpPrefixesState bgp_prefixes = 4; - // Number of route withdraws sent. - optional uint64 route_withdraws_sent = 6; + // Description missing in models + repeated IsisLspsState isis_lsps = 5; - // Number of route withdraws received. - optional uint64 route_withdraws_received = 7; + // Description missing in models + repeated LldpNeighborsState lldp_neighbors = 6; - // Number of Update messages sent. - optional uint64 updates_sent = 8; + // Description missing in models + repeated RsvpLspsState rsvp_lsps = 7; - // Number of Update messages received. - optional uint64 updates_received = 9; + // Description missing in models + repeated Dhcpv4InterfaceState dhcpv4_interfaces = 8; - // Number of Open messages sent. - optional uint64 opens_sent = 10; + // Description missing in models + repeated Dhcpv4LeasesState dhcpv4_leases = 9; - // Number of Open messages received. - optional uint64 opens_received = 11; + // Description missing in models + repeated Dhcpv6InterfaceState dhcpv6_interfaces = 10; - // Number of Keepalive messages sent. - optional uint64 keepalives_sent = 12; + // Description missing in models + repeated Dhcpv6LeasesState dhcpv6_leases = 11; - // Number of Keepalive messages received. - optional uint64 keepalives_received = 13; + // Description missing in models + repeated Ospfv2LsaState ospfv2_lsas = 12; +} - // Number of Notification messages sent. - optional uint64 notifications_sent = 14; +// The request to retrieve IPv4 Neighbor state (ARP cache entries) of a network interface(s). +message Neighborsv4StatesRequest { - // Number of Notification messages received. - optional uint64 notifications_received = 15; + // The names of Ethernet interfaces for which Neighbor state (ARP cache entries) will + // be retrieved. If no names are specified then the results will contain Neighbor state + // (ARP cache entries) for all available Ethernet interfaces. + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ethernet/properties/name + // + repeated string ethernet_names = 1; +} - message FsmState { - enum Enum { - unspecified = 0; - idle = 1; - connect = 2; - active = 3; - opensent = 4; - openconfirm = 5; - established = 6; - } - } - // BGP peer FSM (Finite State Machine) state as Idle, Connect, Active, OpenSent, OpenConfirm - // and Established. In all the states except Established the BGP session is down. Idle - // refers to the Idle state of the FSM. Connect refers to the state where the session - // is waiting for the underlying transport session to be established. Active refers - // to the state where the session is awaiting for a connection from the remote peer. - // OpenSent refers to the state where the session is in the process of being established. - // The local system has sent an OPEN message. OpenConfirm refers to the state where - // the session is in the process of being established. The local system has sent and - // received an OPEN message and is awaiting a NOTIFICATION or KEEPALIVE message from - // remote peer. Established refers to the state where the BGP session with the peer - // is established. - optional FsmState.Enum fsm_state = 16; +// IPv4 Neighbor state (ARP cache entry). +message Neighborsv4State { - // Number of End-of-RIB markers received indicating the completion of the initial routing - // update for a particular address family after the session is established. - // For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with - // the minimum length. For any other address family, it is an UPDATE message that contains - // only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . - optional uint64 end_of_rib_received = 17; -} + // The name of the Ethernet interface associated with the Neighbor state (ARP cache + // entry). + // required = true + optional string ethernet_name = 1; -// The request to retrieve BGPv6 per peer metrics/statistics. -message Bgpv6MetricsRequest { + // The IPv4 address of the neighbor. + // required = true + optional string ipv4_address = 2; - // The names of BGPv6 peers to return results for. An empty list will return results - // for all BGPv6 peers. + // The link-layer address (MAC) of the neighbor. + optional string link_layer_address = 3; +} + +// The request to retrieve IPv6 Neighbor state (NDISC cache entries) of a network interface(s). +message Neighborsv6StatesRequest { + + // The names of Ethernet interfaces for which Neighbor state (NDISC cache entries) will + // be retrieved. If no names are specified then the results will contain Neighbor state + // (NDISC cache entries) for all available Ethernet interfaces. // // x-constraint: - // - /components/schemas/Bgp.V6peer/properties/name + // - /components/schemas/Device.Ethernet/properties/name // // // x-constraint: - // - /components/schemas/Bgp.V6peer/properties/name + // - /components/schemas/Device.Ethernet/properties/name // - repeated string peer_names = 1; + repeated string ethernet_names = 1; +} - message ColumnNames { - enum Enum { - unspecified = 0; - session_state = 1; - session_flap_count = 2; - routes_advertised = 3; - routes_received = 4; - route_withdraws_sent = 5; - route_withdraws_received = 6; - updates_sent = 7; - updates_received = 8; - opens_sent = 9; - opens_received = 10; - keepalives_sent = 11; - keepalives_received = 12; - notifications_sent = 13; - notifications_received = 14; - fsm_state = 15; - end_of_rib_received = 16; - } - } - // The list of column names that the returned result set will contain. If the list is - // empty then all columns will be returned except for any result_groups. The name of - // the BGPv6 peer cannot be excluded. - repeated ColumnNames.Enum column_names = 2; +// IPv6 Neighbor state (NDISC cache entry). +message Neighborsv6State { + + // The name of the Ethernet interface associated with the Neighbor state (NDISC cache + // entry). + // required = true + optional string ethernet_name = 1; + + // The IPv6 address of the neighbor. + // required = true + optional string ipv6_address = 2; + + // The link-layer address (MAC) of the neighbor. + optional string link_layer_address = 3; } -// BGPv6 per peer statistics information. -message Bgpv6Metric { +// The request to retrieve BGP peer prefix information. +message BgpPrefixStateRequest { - // The name of a configured BGPv6 peer. - optional string name = 1; + // The names of BGP peers for which prefix information will be retrieved. If no names + // are specified then the results will contain prefix information for all configured + // BGP peers. + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + // + // + // x-constraint: + // - /components/schemas/Bgp.V4Peer/properties/name + // - /components/schemas/Bgp.V6Peer/properties/name + // + repeated string bgp_peer_names = 1; - message SessionState { + message PrefixFilters { enum Enum { unspecified = 0; - up = 1; - down = 2; + ipv4_unicast = 1; + ipv6_unicast = 2; } } - // Session state as up or down. Up refers to an Established state and Down refers to - // any other state. - optional SessionState.Enum session_state = 2; - - // Number of times the session went from Up to Down state. - optional uint64 session_flap_count = 3; - - // Number of routes advertised. - optional uint64 routes_advertised = 4; - - // Number of routes received. - optional uint64 routes_received = 5; - - // Number of route withdraws sent. - optional uint64 route_withdraws_sent = 6; - - // Number of route withdraws received. - optional uint64 route_withdraws_received = 7; - - // Number of Update messages sent. - optional uint64 updates_sent = 8; - - // Number of Update messages received. - optional uint64 updates_received = 9; - - // Number of Open messages sent. - optional uint64 opens_sent = 10; + // Specify which prefixes to return. If the list is empty or missing then all prefixes + // will be returned. + repeated PrefixFilters.Enum prefix_filters = 2; - // Number of Open messages received. - optional uint64 opens_received = 11; + // The IPv4 unicast results can be filtered by specifying additional prefix search criteria. + // If the ipv4_unicast_filters property is missing or empty then all IPv4 prefixes will + // be returned. + repeated BgpPrefixIpv4UnicastFilter ipv4_unicast_filters = 3; - // Number of Keepalive messages sent. - optional uint64 keepalives_sent = 12; + // The IPv6 unicast results can be filtered by specifying additional prefix search criteria. + // If the ipv6_unicast_filters property is missing or empty then all IPv6 prefixes will + // be returned. + repeated BgpPrefixIpv6UnicastFilter ipv6_unicast_filters = 4; +} - // Number of Keepalive messages received. - optional uint64 keepalives_received = 13; +// Description missing in models +message BgpPrefixIpv4UnicastFilter { - // Number of Notification messages sent. - optional uint64 notifications_sent = 14; + // The addresses to match. If the addresses property is missing or empty then all addresses + // will match. + repeated string addresses = 1; - // Number of Notification messages received. - optional uint64 notifications_received = 15; + // The prefix length to match. If the prefix length is missing then all prefix lengths + // will match. + optional uint32 prefix_length = 2; - message FsmState { + message Origin { enum Enum { unspecified = 0; - idle = 1; - connect = 2; - active = 3; - opensent = 4; - openconfirm = 5; - established = 6; + igp = 1; + egp = 2; + incomplete = 3; } } - // BGP peer FSM (Finite State Machine) state as Idle, Connect, Active, OpenSent, OpenConfirm - // and Established. In all the states except Established the BGP session is down. Idle - // refers to the Idle state of the FSM. Connect refers to the state where the session - // is waiting for the underlying transport session to be established. Active refers - // to the state where the session is awaiting for a connection from the remote peer. - // OpenSent refers to the state where the session is in the process of being established. - // The local system has sent an OPEN message. OpenConfirm refers to the state where - // the session is in the process of being established. The local system has sent and - // received an OPEN message and is awaiting a NOTIFICATION or KEEPALIVE message from - // remote peer. Established refers to the state where the BGP session with the peer - // is established. - optional FsmState.Enum fsm_state = 16; + // The origin to match. If the origin is missing then all origins will match. + optional Origin.Enum origin = 3; - // Number of End-of-RIB markers received indicating the completion of the initial routing - // update for a particular address family after the session is established. - // For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with - // the minimum length. For any other address family, it is an UPDATE message that contains - // only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . - optional uint64 end_of_rib_received = 17; + // The path id to match. If the path id is missing then all path ids will match. + optional uint32 path_id = 4; } -// The request to retrieve ISIS per Router metrics/statistics. -message IsisMetricsRequest { +// Description missing in models +message BgpPrefixIpv6UnicastFilter { - // The names of ISIS Routers to return results for. An empty list will return results - // for all ISIS router. - // - // x-constraint: - // - /components/schemas/Device.IsisRouter/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.IsisRouter/properties/name - // - repeated string router_names = 1; + // The addresses to match. If the addresses property is missing or empty then all addresses + // will match. + repeated string addresses = 1; - message ColumnNames { + // The prefix length to match. If the prefix length is missing then all prefix lengths + // will match. + optional uint32 prefix_length = 2; + + message Origin { enum Enum { unspecified = 0; - l1_sessions_up = 1; - l1_session_flap = 2; - l1_database_size = 3; - l1_broadcast_hellos_sent = 4; - l1_broadcast_hellos_received = 5; - l1_point_to_point_hellos_sent = 6; - l1_point_to_point_hellos_received = 7; - l1_psnp_sent = 8; - l1_psnp_received = 9; - l1_csnp_sent = 10; - l1_csnp_received = 11; - l1_lsp_sent = 12; - l1_lsp_received = 13; - l2_sessions_up = 14; - l2_session_flap = 15; - l2_database_size = 16; - l2_broadcast_hellos_sent = 17; - l2_broadcast_hellos_received = 18; - l2_point_to_point_hellos_sent = 19; - l2_point_to_point_hellos_received = 20; - l2_psnp_sent = 21; - l2_psnp_received = 22; - l2_csnp_sent = 23; - l2_csnp_received = 24; - l2_lsp_sent = 25; - l2_lsp_received = 26; + igp = 1; + egp = 2; + incomplete = 3; } } - // The list of column names that the returned result set will contain. If the list is - // empty then all columns will be returned except for any result_groups. The name of - // the ISIS Router cannot be excluded. - repeated ColumnNames.Enum column_names = 2; + // The origin to match. If the origin is missing then all origins will match. + optional Origin.Enum origin = 3; + + // The path id to match. If the path id is missing then all path ids will match. + optional uint32 path_id = 4; } -// ISIS per router statistics information. -message IsisMetric { +// BGP peer prefixes. +message BgpPrefixesState { - // The name of a configured ISIS router. - optional string name = 1; + // The name of a BGP peer. + optional string bgp_peer_name = 1; - // The number of Level 1 (L1) sessions that are fully up. - optional uint32 l1_sessions_up = 2; + // Description missing in models + repeated BgpPrefixIpv4UnicastState ipv4_unicast_prefixes = 2; - // The number of Level 1 Sessions Flap. - optional uint64 l1_session_flap = 3; + // Description missing in models + repeated BgpPrefixIpv6UnicastState ipv6_unicast_prefixes = 3; +} - // Number of Level 1 Hello messages sent. - optional uint64 l1_broadcast_hellos_sent = 4; +// IPv4 unicast prefix. +message BgpPrefixIpv4UnicastState { - // Number of Level 1 Hello messages received. - optional uint64 l1_broadcast_hellos_received = 5; + // An IPv4 unicast address + optional string ipv4_address = 1; - // Number of Level 1 Point-to-Point(P2P) Hello messages sent. - optional uint64 l1_point_to_point_hellos_sent = 6; + // The length of the prefix. + optional uint32 prefix_length = 2; - // Number of Level 1 Point-to-Point(P2P) Hello messages received. - optional uint64 l1_point_to_point_hellos_received = 7; + message Origin { + enum Enum { + unspecified = 0; + igp = 1; + egp = 2; + incomplete = 3; + } + } + // The origin of the prefix. + optional Origin.Enum origin = 3; - // Number of Link State Updates (LSPs) in the Level 1 LSP Databases. - optional uint64 l1_database_size = 8; + // The path id. + optional uint32 path_id = 4; - // Number of Level 1 (L1) Partial Sequence Number Packet (PSNPs) sent. - optional uint64 l1_psnp_sent = 9; + // The IPv4 address of the egress interface. + optional string ipv4_next_hop = 5; - // Number of Level 1 (L1) Complete Sequence Number Packet (PSNPs) received. - optional uint64 l1_psnp_received = 10; + // The IPv6 address of the egress interface. + optional string ipv6_next_hop = 6; - // Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) sent. - optional uint64 l1_csnp_sent = 11; + // Optional community attributes. + repeated ResultBgpCommunity communities = 7; - // Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) received. - optional uint64 l1_csnp_received = 12; + // Optional received Extended Community attributes. Each received Extended Community + // attribute is available for retrieval in two forms. Support of the 'raw' format in + // which all 8 bytes (16 hex characters) is always present and available for use. In + // addition, if supported by the implementation, the Extended Community attribute may + // also be retrieved in the 'structured' format which is an optional field. + repeated ResultExtendedCommunity extended_communities = 11; - // Number of Level 1 (L1) Link State Protocol Data Units (LSPs) sent. - optional uint64 l1_lsp_sent = 13; + // Description missing in models + ResultBgpAsPath as_path = 8; - // Number of Level 1 (L1) Link State Protocol Data Units (LSPs) received. - optional uint64 l1_lsp_received = 14; + // The local preference is a well-known attribute and the value is used for route selection. + // The route with the highest local preference value is preferred. + optional uint32 local_preference = 9; - // The number of Level 2 (L2) sessions that are fully up. - optional uint32 l2_sessions_up = 15; + // The multi exit discriminator (MED) is an optional non-transitive attribute and the + // value is used for route selection. The route with the lowest MED value is preferred. + optional uint32 multi_exit_discriminator = 10; +} - // The number of Level 2 Sessions Flap. - optional uint64 l2_session_flap = 16; +// IPv6 unicast prefix. +message BgpPrefixIpv6UnicastState { - // Number of Level 2 Hello messages sent. - optional uint64 l2_broadcast_hellos_sent = 17; + // An IPv6 unicast address + optional string ipv6_address = 1; - // Number of Level 2 Hello messages received. - optional uint64 l2_broadcast_hellos_received = 18; + // The length of the prefix. + optional uint32 prefix_length = 2; - // Number of Level 2 Point-to-Point(P2P) Hello messages sent. - optional uint64 l2_point_to_point_hellos_sent = 19; + message Origin { + enum Enum { + unspecified = 0; + igp = 1; + egp = 2; + incomplete = 3; + } + } + // The origin of the prefix. + optional Origin.Enum origin = 3; - // Number of Level 2 Point-to-Point(P2P) Hello messages received. - optional uint64 l2_point_to_point_hellos_received = 20; + // The path id. + optional uint32 path_id = 4; - // Number of Link State Updates (LSPs) in the Level 2 LSP Databases. - optional uint64 l2_database_size = 21; + // The IPv4 address of the egress interface. + optional string ipv4_next_hop = 5; - // Number of Level 2 (L2) Partial Sequence Number Packet (PSNPs) sent. - optional uint64 l2_psnp_sent = 22; + // The IPv6 address of the egress interface. + optional string ipv6_next_hop = 6; - // Number of Level 2 (L2) Complete Sequence Number Packet (PSNPs) received. - optional uint64 l2_psnp_received = 23; + // Optional community attributes. + repeated ResultBgpCommunity communities = 7; - // Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) sent. - optional uint64 l2_csnp_sent = 24; + // Optional received Extended Community attributes. Each received Extended Community + // attribute is available for retrieval in two forms. Support of the 'raw' format in + // which all 8 bytes (16 hex characters) is always present and available for use. In + // addition, if supported by the implementation, the Extended Community attribute may + // also be retrieved in the 'structured' format which is an optional field. + repeated ResultExtendedCommunity extended_communities = 11; - // Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) received. - optional uint64 l2_csnp_received = 25; + // Description missing in models + ResultBgpAsPath as_path = 8; - // Number of Level 2 (L2) Link State Protocol Data Units (LSPs) sent. - optional uint64 l2_lsp_sent = 26; + // The local preference is a well-known attribute and the value is used for route selection. + // The route with the highest local preference value is preferred. + optional uint32 local_preference = 9; - // Number of Level 2 (L2) Link State Protocol Data Units (LSPs) received. - optional uint64 l2_lsp_received = 27; + // The multi exit discriminator (MED) is an optional non-transitive attribute and the + // value is used for route selection. The route with the lowest MED value is preferred. + optional uint32 multi_exit_discriminator = 10; } -// The request to retrieve per LAG metrics/statistics. -message LagMetricsRequest { +// Each received Extended Community attribute is available for retrieval in two forms. +// Support of the 'raw' format in which all 8 bytes (16 hex characters) is always present +// and available for use. In addition, if supported by the implementation, the Extended +// Community attribute may also be retrieved in the 'structured' format which is an +// optional field. +message ResultExtendedCommunity { - // The names of LAGs to return results for. An empty list will return results for all - // LAGs. - // - // x-constraint: - // - /components/schemas/Lag/properties/name - // - // - // x-constraint: - // - /components/schemas/Lag/properties/name - // - repeated string lag_names = 1; + // The raw byte contents of the 8 bytes received in the Extended Community as 16 hex + // characters. + optional string raw = 1; - message ColumnNames { - enum Enum { - unspecified = 0; - oper_status = 1; - member_ports_up = 2; - frames_tx = 3; - frames_rx = 4; - bytes_tx = 5; - bytes_rx = 6; - frames_tx_rate = 7; - frames_rx_rate = 8; - bytes_tx_rate = 9; - bytes_rx_rate = 10; - } - } - // The list of column names that the returned result set will contain. If the list is - // empty then all columns will be returned. The name of the LAG cannot be excluded. - repeated ColumnNames.Enum column_names = 2; + // Description missing in models + ResultExtendedCommunityStructured structured = 2; } -// Description missing in models -message LagMetric { - - // The name of a configured LAG - // - // x-constraint: - // - /components/schemas/Lag/properties/name - // - // - // x-constraint: - // - /components/schemas/Lag/properties/name - // - optional string name = 1; +// The Extended Communities Attribute is a optional BGP attribute,defined in RFC4360 +// with the Type Code 16. +// Community and Extended Communities attributes are utilized to trigger routing decisions, +// such as acceptance, rejection, preference, or redistribution. +// An extended community is an 8-bytes value. It is divided into two main parts. The +// first 2 bytes of the community encode a type and optonal sub-type field. +// The last 6 bytes (or 7 bytes for types without a sub-type) carry a unique set of +// data in a format defined by the type and optional sub-type field. +// Extended communities provide a larger range for grouping or categorizing communities. +message ResultExtendedCommunityStructured { - message OperStatus { + message Choice { enum Enum { unspecified = 0; - up = 1; - down = 2; + transitive_2octet_as_type = 1; + transitive_ipv4_address_type = 2; + transitive_4octet_as_type = 3; + transitive_opaque_type = 4; + non_transitive_2octet_as_type = 5; } } - // The current operational state of the LAG. The state can be up or down. State 'up' - // indicates member_ports_up >= min_links. - optional OperStatus.Enum oper_status = 2; - - // The number of LAG member ports up. - optional uint32 member_ports_up = 3; + // Description missing in models + optional Choice.Enum choice = 1; - // The current total number of frames transmitted. - optional uint64 frames_tx = 4; + // Description missing in models + ResultExtendedCommunityTransitive2OctetAsType transitive_2octet_as_type = 2; - // The current total number of valid frames received. - optional uint64 frames_rx = 5; + // Description missing in models + ResultExtendedCommunityTransitiveIpv4AddressType transitive_ipv4_address_type = 3; - // The current total number of bytes transmitted. - optional uint64 bytes_tx = 6; + // Description missing in models + ResultExtendedCommunityTransitive4OctetAsType transitive_4octet_as_type = 4; - // The current total number of valid bytes received. - optional uint64 bytes_rx = 7; + // Description missing in models + ResultExtendedCommunityTransitiveOpaqueType transitive_opaque_type = 5; - // The current rate of frames transmitted. - optional float frames_tx_rate = 8; + // Description missing in models + ResultExtendedCommunityNonTransitive2OctetAsType non_transitive_2octet_as_type = 6; +} - // The current rate of valid frames received. - optional float frames_rx_rate = 9; +// The Route Target Community identifies one or more routers that may receive a set +// of routes (that carry this Community) carried by BGP Update message. It is sent +// with sub-type as 0x02. +message ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget { - // The current rate of bytes transmitted. - optional float bytes_tx_rate = 10; + // The two octet IANA assigned AS value assigned to the Autonomous System. + optional uint32 global_2byte_as = 1; - // The current rate of bytes received. - optional float bytes_rx_rate = 11; + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + optional uint32 local_4byte_admin = 2; } -// The request to retrieve LACP per LAG member metrics/statistics. -message LacpMetricsRequest { +// The Route Origin Community identifies one or more routers that inject a set of routes +// (that carry this Community) into BGP. It is sent with sub-type as 0x03 . +message ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin { - // The names of LAG (ports group) for which LACP metrics to be returned. An empty list - // will return metrics for all LAGs. - // - // x-constraint: - // - /components/schemas/Lag/properties/name - // - // - // x-constraint: - // - /components/schemas/Lag/properties/name - // - repeated string lag_names = 1; + // The two octet IANA assigned AS value assigned to the Autonomous System. + optional uint32 global_2byte_as = 1; - // The names of LAG members (ports) for which LACP metrics to be returned. An empty - // list will return metrics for all LAG members. - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - // - // x-constraint: - // - /components/schemas/Port/properties/name - // - repeated string lag_member_port_names = 2; + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + optional uint32 local_4byte_admin = 2; +} - message ColumnNames { +// The Transitive Two-Octet AS-Specific Extended Community is sent as type 0x00 . +// +message ResultExtendedCommunityTransitive2OctetAsType { + + message Choice { enum Enum { unspecified = 0; - lacp_packets_rx = 1; - lacp_packets_tx = 2; - lacp_rx_errors = 3; - activity = 4; - timeout = 5; - synchronization = 6; - aggregatable = 7; - collecting = 8; - distributing = 9; - system_id = 10; - oper_key = 11; - partner_id = 12; - partner_key = 13; - port_num = 14; - partner_port_num = 15; + route_target_subtype = 1; + route_origin_subtype = 2; } } - // The list of column names that the returned result set will contain. If the list is - // empty then all columns will be returned. The name of LAG and LAG member can not be - // excluded. - repeated ColumnNames.Enum column_names = 3; -} + // Description missing in models + optional Choice.Enum choice = 1; + + // Description missing in models + ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget route_target_subtype = 2; -// LACP metrics (statistics) per LAG member. -message LacpMetric { + // Description missing in models + ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin route_origin_subtype = 3; +} - // The name of a LAG (ports group) configured with LACP. - optional string lag_name = 1; +// The Route Origin Community identifies one or more routers that inject a set of routes +// (that carry this Community) into BGP It is sent with sub-type as 0x03. +message ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { - // The name of a LAG member (port) configured with LACP. - optional string lag_member_port_name = 2; + // An IPv4 unicast address assigned by one of the Internet registries. + optional string global_ipv4_admin = 1; - // Number of LACPDUs received. - optional uint64 lacp_packets_rx = 3; + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the IP address carried in the Global Administrator + // sub-field has been assigned by an appropriate authority. + optional uint32 local_2byte_admin = 2; +} - // Number of LACPDUs transmitted. - optional uint64 lacp_packets_tx = 4; +// The Route Target Community identifies one or more routers that may receive a set +// of routes (that carry this Community) carried by BGP. It is sent with sub-type as +// 0x02. +message ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { - // Number of LACPDUs receive packet errors. - optional uint64 lacp_rx_errors = 5; + // An IPv4 unicast address assigned by one of the Internet registries. + optional string global_ipv4_admin = 1; - message Activity { - enum Enum { - unspecified = 0; - active = 1; - passive = 2; - } - } - // Indicates participant is active or passive. - optional Activity.Enum activity = 6; + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the IP address carried in the Global Administrator + // sub-field has been assigned by an appropriate authority. + optional uint32 local_2byte_admin = 2; +} - message Timeout { - enum Enum { - unspecified = 0; - short = 1; - long = 2; - } - } - // The timeout type (short or long) used by the participant. - optional Timeout.Enum timeout = 7; +// The Transitive IPv4 Address Specific Extended Community is sent as type 0x01. +message ResultExtendedCommunityTransitiveIpv4AddressType { - message Synchronization { + message Choice { enum Enum { unspecified = 0; - in_sync = 1; - out_sync = 2; + route_target_subtype = 1; + route_origin_subtype = 2; } } - // Indicates whether the participant is in-sync or out-of-sync. - optional Synchronization.Enum synchronization = 8; - - // A true value indicates that the participant will allow the link to be used as part - // of the aggregate. A false value indicates the link should be used as an individual - // link. - optional bool aggregatable = 9; + // Description missing in models + optional Choice.Enum choice = 1; - // If true, the participant is collecting incoming frames on the link, otherwise false. - optional bool collecting = 10; + // Description missing in models + ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget route_target_subtype = 2; - // When true, the participant is distributing outgoing frames; when false, distribution - // is disabled. - optional bool distributing = 11; + // Description missing in models + ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin route_origin_subtype = 3; +} - // MAC address that defines the local system ID for the aggregate interface. - optional string system_id = 12; +// The Route Target Community identifies one or more routers that may receive a set +// of routes (that carry this Community) carried by BGP. It is sent with sub-type as +// 0x02 +message ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget { - // Current operational value of the key for the aggregate interface. - optional uint32 oper_key = 13; + // The four octet IANA assigned AS value assigned to the Autonomous System. + optional uint32 global_4byte_as = 1; - // MAC address representing the protocol partner's interface system ID. - optional string partner_id = 14; + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + optional uint32 local_2byte_admin = 2; +} - // Operational value of the protocol partner's key. - optional uint32 partner_key = 15; +// The Route Origin Community identifies one or more routers that inject a set of routes +// (that carry this Community) into BGP. It is sent with sub-type as 0x03. +message ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin { - // Port number of the local (actor) aggregation member. - optional uint32 port_num = 16; + // The four octet IANA assigned AS value assigned to the Autonomous System. + optional uint32 global_4byte_as = 1; - // Port number of the partner (remote) port for this member port. - optional uint32 partner_port_num = 17; + // The Local Administrator sub-field contains a number from a numbering space that is + // administered by the organization to which the Autonomous System number carried in + // the Global Administrator sub-field has been assigned by an appropriate authority. + optional uint32 local_2byte_admin = 2; } -// The request to retrieve LLDP per instance metrics/statistics. -message LldpMetricsRequest { - - // The names of LLDP instances to return results for. An empty list will return results - // for all LLDP instances. - // - // x-constraint: - // - /components/schemas/Lldp/properties/name - // - // - // x-constraint: - // - /components/schemas/Lldp/properties/name - // - repeated string lldp_names = 1; +// The Transitive Four-Octet AS-Specific Extended Community is sent as type 0x02. It +// is defined in RFC 5668. +message ResultExtendedCommunityTransitive4OctetAsType { - message ColumnNames { + message Choice { enum Enum { unspecified = 0; - frames_rx = 1; - frames_tx = 2; - frames_error_rx = 3; - frames_discard = 4; - tlvs_discard = 5; - tlvs_unknown = 6; + route_target_subtype = 1; + route_origin_subtype = 2; } } - // The requested list of column names for the result set. If the list is empty then - // metrics for all columns will be returned. The name of LLDP instance can not be excluded. - repeated ColumnNames.Enum column_names = 2; -} + // Description missing in models + optional Choice.Enum choice = 1; -// LLDP per instance statistics information. -message LldpMetric { + // Description missing in models + ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget route_target_subtype = 2; - // The name of the configured LLDP instance. - optional string name = 1; + // Description missing in models + ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin route_origin_subtype = 3; +} - // Number of LLDP frames received. - optional uint64 frames_rx = 2; +// The Color Community contains locally administrator defined 'color' value which is +// used in conjunction with Encapsulation attribute to decide whether a data packet +// can be transmitted on a certain tunnel or not. It is defined in RFC9012 and sent +// with sub-type as 0x0b. +message ResultExtendedCommunityTransitiveOpaqueTypeColor { - // Number of LLDP frames transmitted. - optional uint64 frames_tx = 3; + // Two octet flag values. + optional uint32 flags = 1; - // Number of LLDP frames received with packet errors. This stat should be incremented - // based on statsFramesInErrorsTotal increment rule in section 10.3.2 of IEEE Std 802.1 - // AB-2005. - optional uint64 frames_error_rx = 4; + // The color value is user defined and configured locally and used to determine whether + // a data packet can be transmitted on a certain tunnel or not + // in conjunction with the Encapsulation attribute. It is defined in RFC9012. + // + optional uint32 color = 2; +} - // Number of LLDP frames received that are discarded. This stat should be incremented - // when one or more of the three mandatory TLVs at the beginning of the LLDPDU is missing, - // out of order or contains an out of range information string length. This stat should - // follow the validation rules in section 10.3.2 of IEEE Std 802.1 AB-2005. - optional uint64 frames_discard = 5; +// This identifies the type of tunneling technology being signalled. It is defined in +// RFC9012 and sent with sub-type as 0x0c. +message ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation { - // Number of LLDP tlvs received that are discarded. If any TLV contains an error condition - // specific for that particular TLV or if any TLV extends past the physical end of - // the frame then these TLVs will be discarded. - optional uint64 tlvs_discard = 6; + // Four bytes of reserved values. Normally set to 0 on transmit and ignored on receive. + // + optional uint32 reserved = 1; - // Number of LLDP unknown tlvs received. If the OUI of the organizationlly specific - // TLV and/or organizationally defined subtype are not recognized,or if TLV type value - // is in the range of reserved TLV types then these TLVs will be considered as unknown - // TLVs. - optional uint64 tlvs_unknown = 7; + // Identifies the type of tunneling technology being signalled. Initially defined in + // RFC5512 and extended in RFC9012. + // Some of the important tunnel types include + // - 1 L2TPv3 over IP [RFC9012], + // - 2 GRE [RFC9012], + // - 7 IP in IP [RFC9012], + // - 8 VXLAN Encapsulation [RFC8365], + // - 9 NVGRE Encapsulation [RFC8365], + // - 10 MPLS Encapsulation [RFC8365], + // - 15 SR TE Policy Type [draft-ietf-idr-segment-routing-te-policy], + // - 19 Geneve Encapsulation [RFC8926] + optional uint32 tunnel_type = 2; } -// The request to retrieve RSVP-TE per Router metrics/statistics. -message RsvpMetricsRequest { - - // The names of RSVP-TE Routers to return results for. An empty list as input will return - // results for all RSVP-TE routers. - // - // x-constraint: - // - /components/schemas/Device.Rsvp/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.Rsvp/properties/name - // - repeated string router_names = 1; +// The Transitive Opaque Extended Community is sent as type 0x03. +message ResultExtendedCommunityTransitiveOpaqueType { - message ColumnNames { + message Choice { enum Enum { unspecified = 0; - ingress_p2p_lsps_configured = 1; - ingress_p2p_lsps_up = 2; - egress_p2p_lsps_up = 3; - lsp_flap_count = 4; - paths_tx = 5; - paths_rx = 6; - resvs_tx = 7; - resvs_rx = 8; - path_tears_tx = 9; - path_tears_rx = 10; - resv_tears_tx = 11; - resv_tears_rx = 12; - path_errors_tx = 13; - path_errors_rx = 14; - resv_errors_tx = 15; - resv_errors_rx = 16; - resv_conf_tx = 17; - resv_conf_rx = 18; - hellos_tx = 19; - hellos_rx = 20; - acks_tx = 21; - acks_rx = 22; - nacks_tx = 23; - nacks_rx = 24; - srefresh_tx = 25; - srefresh_rx = 26; - bundle_tx = 27; - bundle_rx = 28; - path_reevaluation_request_tx = 29; - path_reoptimizations = 30; + color_subtype = 1; + encapsulation_subtype = 2; } } - // The list of column names that the returned result set will contain. If the input - // list is empty then all columns will be returned except for any result_groups. - // - repeated ColumnNames.Enum column_names = 2; -} - -// RSVP-TE per router statistics information. -message RsvpMetric { + // Description missing in models + optional Choice.Enum choice = 1; - // The name of a configured RSVP router. - optional string name = 1; + // Description missing in models + ResultExtendedCommunityTransitiveOpaqueTypeColor color_subtype = 2; - // The number of ingress point-to-point LSPs configured or transiting through the RSVP - // router which have been initated from the test port. - optional uint32 ingress_p2p_lsps_configured = 2; + // Description missing in models + ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation encapsulation_subtype = 3; +} - // The number of ingress point-to-point LSPs for which Resv has been received and is - // currently up. - optional uint32 ingress_p2p_lsps_up = 3; +// The Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. +// It is sent with sub-type as 0x04. +message ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { - // The number of egress point-to-point LSPs for which Path requests were successfully - // processed and is currently up. - optional uint32 egress_p2p_lsps_up = 4; + // The value of the Global Administrator subfield should represent the Autonomous System + // of the router that attaches the Link Bandwidth Community. If four octet AS numbering + // scheme is used, AS_TRANS (23456) should be used. + optional uint32 global_2byte_as = 1; - // The number of times an LSP went from up to down state either because it timed out - // while waiting for Refreshes or a PathTear or ResvTear message was received which - // caused the LSP to flap. - optional uint64 lsp_flap_count = 5; + // Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and + // 1 Mbps is 1000 Kbps per second ) + optional float bandwidth = 2; +} - // The number of Path messages sent by this RSVP router. - optional uint64 paths_tx = 6; +// The Non-Transitive Two-Octet AS-Specific Extended Community is sent as type 0x40. +// +message ResultExtendedCommunityNonTransitive2OctetAsType { - // The number of Path messages received by this RSVP router. - optional uint64 paths_rx = 7; + message Choice { + enum Enum { + unspecified = 0; + link_bandwidth_subtype = 1; + } + } + // Description missing in models + optional Choice.Enum choice = 1; - // The number of Resv messages sent by this RSVP router. - optional uint64 resvs_tx = 8; + // Description missing in models + ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth link_bandwidth_subtype = 2; +} - // The number of Resv messages received by this RSVP router. - optional uint64 resvs_rx = 9; +// BGP communities provide additional capability for tagging routes and for modifying +// BGP routing policy on upstream and downstream routers. BGP community is a 32-bit +// number which is broken into 16-bit AS number and a 16-bit custom value. +message ResultBgpCommunity { - // The number of Path Tear messages sent by this RSVP router. - optional uint64 path_tears_tx = 10; + message Type { + enum Enum { + unspecified = 0; + manual_as_number = 1; + no_export = 2; + no_advertised = 3; + no_export_subconfed = 4; + llgr_stale = 5; + no_llgr = 6; + } + } + // The type of community AS number. If community type is manual_as_number then as_number + // and as_custom will be available. + optional Type.Enum type = 1; - // The number of Path Tear messages received by this RSVP router. - optional uint64 path_tears_rx = 11; + // First two octets of 32 bit community AS number. + optional uint32 as_number = 2; - // The number of Resv Tear messages sent by this RSVP router. - optional uint64 resv_tears_tx = 12; + // Last two octets of the community value. + optional uint32 as_custom = 3; +} - // The number of Resv Tear messages received by this RSVP router. - optional uint64 resv_tears_rx = 13; +// This attribute identifies the autonomous systems through which routing information +// carried in this UPDATE message has passed. +message ResultBgpAsPath { - // The number of Path Error messages sent by this RSVP router. - optional uint64 path_errors_tx = 14; + // AS Path segments present in the received AS Path attribute. + repeated ResultBgpAsPathSegment segments = 1; +} - // The number of Path Error messages received by this RSVP router. - optional uint64 path_errors_rx = 15; +// Configuration for a single BGP AS path segment +message ResultBgpAsPathSegment { - // The number of Resv Error messages sent by this RSVP router. - optional uint64 resv_errors_tx = 16; + message Type { + enum Enum { + unspecified = 0; + as_seq = 1; + as_set = 2; + as_confed_seq = 3; + as_confed_set = 4; + } + } + // AS sequence is the most common type of AS_PATH, it contains the list of ASNs starting + // with the most recent ASN being added read from left to right. + // The other three AS_PATH types are used for Confederations - AS_SET is the type of + // AS_PATH attribute that summarizes routes using using the aggregate-address command, + // allowing AS_PATHs to be summarized in the update as well. - AS_CONFED_SEQ gives + // the list of ASNs in the path starting with the most recent ASN to be added reading + // left to right - AS_CONFED_SET will allow summarization of multiple AS PATHs to be + // sent in BGP Updates. + optional Type.Enum type = 1; - // The number of Resv Error messages received by this RSVP router. - optional uint64 resv_errors_rx = 17; + // The AS numbers in this AS path segment. + repeated uint32 as_numbers = 2; +} - // The number of ResvConf messages sent by this RSVP router. - optional uint64 resv_conf_tx = 18; +// The request to retrieve ISIS Link State PDU (LSP) information learned by the router. +message IsisLspsStateRequest { - // The number of ResvConf messages received by this RSVP router. - optional uint64 resv_conf_rx = 19; + // The names of ISIS routers for which learned information is requested. An empty list + // will return results for all ISIS routers. + // + // x-constraint: + // - /components/schemas/Device.IsisRouter/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.IsisRouter/properties/name + // + repeated string isis_router_names = 1; +} - // The number of Hello messages sent by this RSVP router. - optional uint64 hellos_tx = 20; +// The result of ISIS LSP information that are retrieved. +message IsisLspsState { - // The number of Hello messages received by this RSVP router. - optional uint64 hellos_rx = 21; + // The name of the ISIS Router. + optional string isis_router_name = 1; - // The number of Ack messages sent by this RSVP router. - optional uint64 acks_tx = 22; + // One or more LSPs that are learned by this ISIS router. + repeated IsisLspState lsps = 2; +} - // The number of Ack messages received by this RSVP router. - optional uint64 acks_rx = 23; +// ISIS LSP. +message IsisLspState { - // The number of Nack messages sent by this RSVP router. - optional uint64 nacks_tx = 24; + // LSP ID in the format, e.g. '640000000001-00-00'. LSP ID consists of the System ID + // of a neighbor, the Pseudonode ID, and the LSP number. The last two bytes represent + // Pseudonode ID and LSP number respectively. A pseudonode is a logical representation + // of the LAN which is generated by a Designated Intermediate System (DIS) on a LAN + // segment. If one LSP exceeds the maximum LSP size then it is sent in another LSP with + // the LSP number incremented by one. A router's learned LSP gets refreshed by 'remaining_lifetime'. + // Then the sequence number is incremented by 1. + // required = true + optional string lsp_id = 1; - // The number of Nack messages received by this RSVP router. - optional uint64 nacks_rx = 25; + message PduType { + enum Enum { + unspecified = 0; + level_1 = 1; + level_2 = 2; + } + } + // Link State PDU type. + optional PduType.Enum pdu_type = 2; - // The number of SRefresh messages sent by this RSVP router. - optional uint64 srefresh_tx = 26; + // Remaining lifetime in seconds before LSP expires. + optional uint32 remaining_lifetime = 3; - // The number of SRefresh messages received by this RSVP router. - optional uint64 srefresh_rx = 27; + // Sequence number of the LSP. + optional uint64 sequence_number = 4; - // The number of Bundle messages sent by this RSVP router. - optional uint64 bundle_tx = 28; + // Total length of the LSP. + optional uint32 pdu_length = 5; - // The number of Bundle messages received by this RSVP router. - optional uint64 bundle_rx = 29; + // LSP Type-Block flags. + IsisLspFlags flags = 6; - // The number of Path messages with Path Re-evaluation Request enabled sent by this - // RSVP router. - optional uint64 path_reevaluation_request_tx = 30; + // IS Type - bits 1 and 2 indicate the type of Intermediate System. + // 1 - ( i.e. bit 1 set) Level 1 Intermediate system. + // 2 - Unused value. + // 3 - (i.e. bits 1 and 2 set) Level 2 Intermediate system. + optional uint32 is_type = 7; - // The number of successfully completed Make-Before-Break operations on LSPs on this - // RSVP router. - optional uint64 path_reoptimizations = 31; + // It refers to Link State PDU State TLVs container. + IsisLspTlvs tlvs = 8; } -// Request to traffic generator for states of choice -message StatesRequest { +// This contains the list of TLVs present in one LSP. +message IsisLspTlvs { - message Choice { - enum Enum { - unspecified = 0; - ipv4_neighbors = 1; - ipv6_neighbors = 2; - bgp_prefixes = 3; - isis_lsps = 4; - lldp_neighbors = 5; - rsvp_lsps = 6; - } - } - // Description missing in models - // default = Choice.Enum.ipv4_neighbors - optional Choice.Enum choice = 1; + // Array of Hostname TLVs ( type 137) present in this LSP. + repeated IsisLspHostname hostname_tlvs = 1; - // Description missing in models - Neighborsv4StatesRequest ipv4_neighbors = 2; + // Array of IS-Reachability TLVs (type 2) present in this LSP. + repeated IsisLspIsReachabilityTlv is_reachability_tlvs = 2; - // Description missing in models - Neighborsv6StatesRequest ipv6_neighbors = 3; + // Array of Extended IS-Reachability TLVs (type 22) present in this LSP. + repeated IsisLspExtendedIsReachabilityTlv extended_is_reachability_tlvs = 3; - // Description missing in models - BgpPrefixStateRequest bgp_prefixes = 4; + // Array of IPv4 Internal Reachability TLVs (type 128) present in this LSP. + repeated IsisLspIpv4InternalReachabilityTlv ipv4_internal_reachability_tlvs = 4; - // Description missing in models - IsisLspsStateRequest isis_lsps = 5; + // Array of IPv4 External Reachability TLVs (type 130) present in this LSP. + repeated IsisLspIpv4ExternalReachabilityTlv ipv4_external_reachability_tlvs = 5; - // Description missing in models - LldpNeighborsStateRequest lldp_neighbors = 6; + // Array of IPv4 Extended Reachability TLVs (type 135) present in this LSP. + repeated IsisLspExtendedIpv4ReachabilityTlv extended_ipv4_reachability_tlvs = 6; - // Description missing in models - RsvpLspsStateRequest rsvp_lsps = 7; + // Array of IPv6 Reachability TLVs (type 236) present in this LSP. + repeated IsisLspIpv6ReachabilityTlv ipv6_reachability_tlvs = 7; } -// Response containing chosen traffic generator states -message StatesResponse { +// It contains Hostname for the TLV 137. +message IsisLspHostname { - message Choice { - enum Enum { - unspecified = 0; - ipv4_neighbors = 1; - ipv6_neighbors = 2; - bgp_prefixes = 3; - isis_lsps = 4; - lldp_neighbors = 5; - rsvp_lsps = 6; - } - } - // Description missing in models - // default = Choice.Enum.ipv4_neighbors - optional Choice.Enum choice = 1; + // Hostname for an ISIS router. + optional string hostname = 1; +} + +// LSP Type flags. +message IsisLspFlags { - // Description missing in models - repeated Neighborsv4State ipv4_neighbors = 2; + // When set, the originator supports partition repair. + optional bool partition_repair = 1; - // Description missing in models - repeated Neighborsv6State ipv6_neighbors = 3; + // When set, the originator is attached to another area using the referred metric. + optional bool attached_error = 2; - // Description missing in models - repeated BgpPrefixesState bgp_prefixes = 4; + // When set, the originator is attached to another + // area using the referred metric. + optional bool attached_expense = 3; - // Description missing in models - repeated IsisLspsState isis_lsps = 5; + // Delay Metric - when set, the originator is attached to another + // area using the referred metric. + optional bool attached_delay = 4; - // Description missing in models - repeated LldpNeighborsState lldp_neighbors = 6; + // Default Metric - when set, the originator is attached to another + // area using the referred metric. + optional bool attached_default = 5; - // Description missing in models - repeated RsvpLspsState rsvp_lsps = 7; + // Overload bit - when set, the originator is overloaded, and must + // be avoided in path calculation. + optional bool overload = 6; } -// The request to retrieve IPv4 Neighbor state (ARP cache entries) of a network interface(s). -message Neighborsv4StatesRequest { +// This container describes list of ISIS neighbors and attributes in IS-Reachability +// TLV (type 2). +message IsisLspIsReachabilityTlv { - // The names of Ethernet interfaces for which Neighbor state (ARP cache entries) will - // be retrieved. If no names are specified then the results will contain Neighbor state - // (ARP cache entries) for all available Ethernet interfaces. - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - repeated string ethernet_names = 1; + // This container describes Intermediate System (IS) neighbors. + repeated IsisLspneighbor neighbors = 1; } -// IPv4 Neighbor state (ARP cache entry). -message Neighborsv4State { +// This is list of ISIS neighbors and attributes in Extended-IS-Reachability TLV (type +// 22). +message IsisLspExtendedIsReachabilityTlv { - // The name of the Ethernet interface associated with the Neighbor state (ARP cache - // entry). - // required = true - optional string ethernet_name = 1; + // This container describes IS neighbors. + repeated IsisLspneighbor neighbors = 1; +} - // The IPv4 address of the neighbor. - // required = true - optional string ipv4_address = 2; +// This contains IS neighbors. +message IsisLspneighbor { - // The link-layer address (MAC) of the neighbor. - optional string link_layer_address = 3; + // The System ID for this emulated ISIS router, e.g. 640100010000. + optional string system_id = 1; } -// The request to retrieve IPv6 Neighbor state (NDISC cache entries) of a network interface(s). -message Neighborsv6StatesRequest { +// This container defines list of IPv4 internal reachability information in one IPv4 +// internal reachability TLV. +// This is advertised when the origin-type is set 'internal' in route range configurations. +message IsisLspIpv4InternalReachabilityTlv { - // The names of Ethernet interfaces for which Neighbor state (NDISC cache entries) will - // be retrieved. If no names are specified then the results will contain Neighbor state - // (NDISC cache entries) for all available Ethernet interfaces. - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.Ethernet/properties/name - // - repeated string ethernet_names = 1; + // Describes list of IPv4 prefixes in this TLV. + repeated IsisLspV4Prefix prefixes = 1; } -// IPv6 Neighbor state (NDISC cache entry). -message Neighborsv6State { +// This container defines list of IPv4 external reachability information in one IPv4 +// external reachability TLV. +// This is advertised when the origin-type is set 'external' in route range configurations. +message IsisLspIpv4ExternalReachabilityTlv { - // The name of the Ethernet interface associated with the Neighbor state (NDISC cache - // entry). - // required = true - optional string ethernet_name = 1; + // Describes list of IPv4 prefixes in this TLV.. + repeated IsisLspV4Prefix prefixes = 1; +} - // The IPv6 address of the neighbor. - // required = true - optional string ipv6_address = 2; +// This group defines attributes of an IPv4 standard prefix. +message IsisLspV4Prefix { - // The link-layer address (MAC) of the neighbor. - optional string link_layer_address = 3; -} + // An IPv4 unicast prefix reachable via the originator of this LSP. + optional string ipv4_address = 1; -// The request to retrieve BGP peer prefix information. -message BgpPrefixStateRequest { + // The length of the IPv4 prefix. + optional uint32 prefix_length = 2; - // The names of BGP peers for which prefix information will be retrieved. If no names - // are specified then the results will contain prefix information for all configured - // BGP peers. - // - // x-constraint: - // - /components/schemas/Bgp.V4Peer/properties/name - // - /components/schemas/Bgp.V6Peer/properties/name - // - // - // x-constraint: - // - /components/schemas/Bgp.V4Peer/properties/name - // - /components/schemas/Bgp.V6Peer/properties/name - // - repeated string bgp_peer_names = 1; + message RedistributionType { + enum Enum { + unspecified = 0; + up = 1; + down = 2; + } + } + // Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, + // and for all other prefixes in L1 and L2 LSPs. (default) + // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. + // The prefixes are being advertised from a higher level (L2) down to a lower level + // (L1). + optional RedistributionType.Enum redistribution_type = 3; - message PrefixFilters { + // ISIS default metric value. + optional uint32 default_metric = 4; + + message OriginType { enum Enum { unspecified = 0; - ipv4_unicast = 1; - ipv6_unicast = 2; + internal = 1; + external = 2; } } - // Specify which prefixes to return. If the list is empty or missing then all prefixes - // will be returned. - repeated PrefixFilters.Enum prefix_filters = 2; + // The origin of the advertised route-internal or external to the ISIS area. Options + // include the following: + // Internal-for intra-area routes, through Level 1 LSPs. + // External-for inter-area routes redistributed within L1, through Level + // 1 LSPs. + optional OriginType.Enum origin_type = 5; +} - // The IPv4 unicast results can be filtered by specifying additional prefix search criteria. - // If the ipv4_unicast_filters property is missing or empty then all IPv4 prefixes will - // be returned. - repeated BgpPrefixIpv4UnicastFilter ipv4_unicast_filters = 3; +// This container defines list of IPv4 extended reachability information in one Extended +// IPv4 External Reachability TLV. +// It is advertised when the 'wide metric' is enabled. +message IsisLspExtendedIpv4ReachabilityTlv { - // The IPv6 unicast results can be filtered by specifying additional prefix search criteria. - // If the ipv6_unicast_filters property is missing or empty then all IPv6 prefixes will - // be returned. - repeated BgpPrefixIpv6UnicastFilter ipv6_unicast_filters = 4; + // IPv4 prefix contained within extended reachability TLVs. + repeated IsisLspExtendedV4Prefix prefixes = 1; } -// Description missing in models -message BgpPrefixIpv4UnicastFilter { +// This group defines attributes of an IPv4 standard prefix. +message IsisLspExtendedV4Prefix { - // The addresses to match. If the addresses property is missing or empty then all addresses - // will match. - repeated string addresses = 1; + // An IPv4 unicast prefix reachable via the originator of this LSP. + optional string ipv4_address = 1; - // The prefix length to match. If the prefix length is missing then all prefix lengths - // will match. + // The length of the IPv4 prefix. optional uint32 prefix_length = 2; - message Origin { + // ISIS wide metric. + optional uint32 metric = 3; + + message RedistributionType { enum Enum { unspecified = 0; - igp = 1; - egp = 2; - incomplete = 3; + up = 1; + down = 2; } } - // The origin to match. If the origin is missing then all origins will match. - optional Origin.Enum origin = 3; + // Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, + // and for all other prefixes in L1 and L2 LSPs. (default) + // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. + // The prefixes are being advertised from a higher level (L2) down to a lower level + // (L1). + optional RedistributionType.Enum redistribution_type = 4; - // The path id to match. If the path id is missing then all path ids will match. - optional uint32 path_id = 4; + // Description missing in models + IsisLspPrefixAttributes prefix_attributes = 5; } -// Description missing in models -message BgpPrefixIpv6UnicastFilter { +// It defines list of IPv6 extended reachability information in one IPv6 Reachability +// TLV. +message IsisLspIpv6ReachabilityTlv { - // The addresses to match. If the addresses property is missing or empty then all addresses - // will match. - repeated string addresses = 1; + // IPv6 prefix contained within reachability TLVs. + repeated IsisLspV6Prefix prefixes = 1; +} - // The prefix length to match. If the prefix length is missing then all prefix lengths - // will match. +// It defines attributes of an IPv6 standard prefix. +message IsisLspV6Prefix { + + // An IPv6 unicast prefix reachable via the originator of this LSP. + optional string ipv6_address = 1; + + // The length of the IPv6 prefix. optional uint32 prefix_length = 2; - message Origin { + // ISIS wide metric. + optional uint32 metric = 3; + + message RedistributionType { enum Enum { unspecified = 0; - igp = 1; - egp = 2; - incomplete = 3; + up = 1; + down = 2; } } - // The origin to match. If the origin is missing then all origins will match. - optional Origin.Enum origin = 3; + // Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, + // and for all other prefixes in L1 and L2 LSPs. (default) + // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. + // The prefixes are being advertised from a higher level (L2) down to a lower level + // (L1). + optional RedistributionType.Enum redistribution_type = 4; + + message OriginType { + enum Enum { + unspecified = 0; + internal = 1; + external = 2; + } + } + // The origin of the advertised route-internal or external to the ISIS area. Options + // include the following: + // Internal-for intra-area routes, through Level 1 LSPs. + // External-for inter-area routes redistributed within L1, through Level + // 1 LSPs. + optional OriginType.Enum origin_type = 5; - // The path id to match. If the path id is missing then all path ids will match. - optional uint32 path_id = 4; + // Description missing in models + IsisLspPrefixAttributes prefix_attributes = 6; } -// BGP peer prefixes. -message BgpPrefixesState { +// This contains the properties of ISIS Prefix attributes for the extended IPv4 and +// IPv6 reachability. https://www.rfc-editor.org/rfc/rfc7794.html +message IsisLspPrefixAttributes { - // The name of a BGP peer. - optional string bgp_peer_name = 1; + // External Prefix Flag (Bit 0) + optional bool x_flag = 1; - // Description missing in models - repeated BgpPrefixIpv4UnicastState ipv4_unicast_prefixes = 2; + // Re-advertisement Flag (Bit 1) + optional bool r_flag = 2; - // Description missing in models - repeated BgpPrefixIpv6UnicastState ipv6_unicast_prefixes = 3; + // Node Flag (Bit 2) + optional bool n_flag = 3; } -// IPv4 unicast prefix. -message BgpPrefixIpv4UnicastState { +// The request to retrieve LLDP neighbor information for a given instance. +message LldpNeighborsStateRequest { - // An IPv4 unicast address - optional string ipv4_address = 1; + // The names of LLDP instances for which neighbor information will be retrieved. If + // no names are specified then the results will contain neighbor information for all + // configured LLDP instances. + // + // x-constraint: + // - /components/schemas/Lldp/properties/name + // + // + // x-constraint: + // - /components/schemas/Lldp/properties/name + // + repeated string lldp_names = 1; - // The length of the prefix. - optional uint32 prefix_length = 2; + // Specify the neighbors for which information will be returned. If empty or missing + // then information for all neighbors will be returned. + repeated string neighbor_id_filters = 2; +} - message Origin { - enum Enum { - unspecified = 0; - igp = 1; - egp = 2; - incomplete = 3; - } - } - // The origin of the prefix. - optional Origin.Enum origin = 3; +// LLDP neighbor information. +message LldpNeighborsState { - // The path id. - optional uint32 path_id = 4; + // The name of the LLDP instance. + optional string lldp_name = 1; - // The IPv4 address of the egress interface. - optional string ipv4_next_hop = 5; + // The system name field shall contain an alpha-numeric string that indicates the system's + // administratively assigned name. The system name should be the system's fully qualified + // domain name. If implementations support IETF RFC 3418, the sysName object should + // be used for this field. + optional string system_name = 2; - // The IPv6 address of the egress interface. - optional string ipv6_next_hop = 6; + // The system description field shall contain an alpha-numeric string that is the textual + // description of the network entity. The system description should include the full + // name and version identification of the system's hardware type, software operating + // system, and networking software. If implementations support IETF RFC 3418, the sysDescr + // object should be used for this field. + optional string system_description = 3; - // Optional community attributes. - repeated ResultBgpCommunity communities = 7; + // The Chassis ID is a mandatory TLV which identifies the chassis component of the + // endpoint identifier associated with the transmitting LLDP agent. + optional string chassis_id = 4; - // Description missing in models - ResultBgpAsPath as_path = 8; + message ChassisIdType { + enum Enum { + unspecified = 0; + port_component = 1; + network_address = 2; + chassis_component = 3; + mac_address = 4; + interface_name = 5; + local = 6; + interface_alias = 7; + } + } + // This field identifies the format and source of the chassis identifier string. It + // is an enumerator defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. + optional ChassisIdType.Enum chassis_id_type = 5; - // The local preference is a well-known attribute and the value is used for route selection. - // The route with the highest local preference value is preferred. - optional uint32 local_preference = 9; + // System generated identifier for the neighbor on the LLDP instance. + optional string neighbor_id = 6; - // The multi exit discriminator (MED) is an optional non-transitive attribute and the - // value is used for route selection. The route with the lowest MED value is preferred. - optional uint32 multi_exit_discriminator = 10; -} + // Age since discovery in seconds. + optional uint32 age = 7; -// IPv6 unicast prefix. -message BgpPrefixIpv6UnicastState { + // Seconds since last update received. + optional uint32 last_update = 8; - // An IPv6 unicast address - optional string ipv6_address = 1; + // The time-to-live (TTL) in seconds is a mandatory TLV which indicates how long information + // from the neighbor should be considered valid. + optional uint32 ttl = 9; - // The length of the prefix. - optional uint32 prefix_length = 2; + // The Port ID is a mandatory TLV which identifies the port component of the endpoint + // identifier associated with the transmitting LLDP agent. If the specified port is + // an IEEE 802.3 Repeater port, then this TLV is optional. + optional string port_id = 10; - message Origin { + message PortIdType { enum Enum { unspecified = 0; - igp = 1; - egp = 2; - incomplete = 3; + port_component = 1; + network_address = 2; + agent_circuit_id = 3; + mac_address = 4; + interface_name = 5; + local = 6; + interface_alias = 7; } } - // The origin of the prefix. - optional Origin.Enum origin = 3; - - // The path id. - optional uint32 path_id = 4; + // This field identifies the format and source of the port identifier string. It is + // an enumerator defined by the PtopoPortIdType object from RFC2922. + optional PortIdType.Enum port_id_type = 11; - // The IPv4 address of the egress interface. - optional string ipv4_next_hop = 5; + // The binary string containing the actual port identifier for the port which this LLDP + // PDU was transmitted. The source and format of this field is defined by PtopoPortId + // from RFC2922. + optional string port_description = 12; - // The IPv6 address of the egress interface. - optional string ipv6_next_hop = 6; + // The Management Address is a mandatory TLV which identifies a network address associated + // with the local LLDP agent, which can be used to reach the agent on the port identified + // in the Port ID TLV. + optional string management_address = 13; - // Optional community attributes. - repeated ResultBgpCommunity communities = 7; + // The enumerated value for the network address type identified in this TLV. This enumeration + // is defined in the 'Assigned Numbers' RFC [RFC3232] and the ianaAddressFamilyNumbers + // object. + optional string management_address_type = 14; // Description missing in models - ResultBgpAsPath as_path = 8; - - // The local preference is a well-known attribute and the value is used for route selection. - // The route with the highest local preference value is preferred. - optional uint32 local_preference = 9; + repeated LldpCustomTLVState custom_tlvs = 15; - // The multi exit discriminator (MED) is an optional non-transitive attribute and the - // value is used for route selection. The route with the lowest MED value is preferred. - optional uint32 multi_exit_discriminator = 10; + // Description missing in models + repeated LldpCapabilityState capabilities = 16; } -// BGP communities provide additional capability for tagging routes and for modifying -// BGP routing policy on upstream and downstream routers. BGP community is a 32-bit -// number which is broken into 16-bit AS number and a 16-bit custom value. -message ResultBgpCommunity { - - message Type { - enum Enum { - unspecified = 0; - manual_as_number = 1; - no_export = 2; - no_advertised = 3; - no_export_subconfed = 4; - llgr_stale = 5; - no_llgr = 6; - } - } - // The type of community AS number. If community type is manual_as_number then as_number - // and as_custom will be available. - optional Type.Enum type = 1; +// Custom TLV received from a neighbor.Custom TLVs are organization specific TLVs advertised +// with TLV type 127. +message LldpCustomTLVState { - // First two octets of 32 bit community AS number. - optional uint32 as_number = 2; + // The integer value identifying the type of information contained in the value field. + optional uint32 custom_type = 1; - // Last two octets of the community value. - optional uint32 as_custom = 3; -} + // The organizationally unique identifier field shall contain the organization's OUI + // as defined in Clause 9 of IEEE Std 802. The high-order octet is 0 and the low-order + // 3 octets are the SMI Network Management Private Enterprise Code of the Vendor in + // network byte order, as defined in the 'Assigned Numbers' RFC [RFC3232]. + optional string oui = 2; -// This attribute identifies the autonomous systems through which routing information -// carried in this UPDATE message has passed. -message ResultBgpAsPath { + // The organizationally defined subtype field shall contain a unique subtype value assigned + // by the defining organization. + optional uint32 oui_subtype = 3; - // AS Path segments present in the received AS Path attribute. - repeated ResultBgpAsPathSegment segments = 1; + // Contains information on the remaining bytes of the received Organization-Specific + // TLV after the sub-type field. The value must be returned in lowercase hexadecimal + // format. + optional string information = 4; } -// Configuration for a single BGP AS path segment -message ResultBgpAsPathSegment { +// LLDP system capability advertised by the neighbor +message LldpCapabilityState { - message Type { + message CapabilityName { enum Enum { unspecified = 0; - as_seq = 1; - as_set = 2; - as_confed_seq = 3; - as_confed_set = 4; + mac_bridge = 1; + two_port_mac_relay = 2; + repeater = 3; + docsis_cable_device = 4; + s_vlan = 5; + telephone = 6; + other = 7; + router = 8; + c_vlan = 9; + station_only = 10; + wlan_access_point = 11; } } - // AS sequence is the most common type of AS_PATH, it contains the list of ASNs starting - // with the most recent ASN being added read from left to right. - // The other three AS_PATH types are used for Confederations - AS_SET is the type of - // AS_PATH attribute that summarizes routes using using the aggregate-address command, - // allowing AS_PATHs to be summarized in the update as well. - AS_CONFED_SEQ gives - // the list of ASNs in the path starting with the most recent ASN to be added reading - // left to right - AS_CONFED_SET will allow summarization of multiple AS PATHs to be - // sent in BGP Updates. - optional Type.Enum type = 1; + // Name of the system capability advertised by the neighbor. Capabilities are represented + // in a bitmap that defines the primary functions of the system. The capabilities are + // defined in IEEE 802.1AB. + optional CapabilityName.Enum capability_name = 1; - // The AS numbers in this AS path segment. - repeated uint32 as_numbers = 2; + // Indicates whether the corresponding system capability is enabled on the neighbor. + optional bool capability_enabled = 2; } -// The request to retrieve ISIS Link State PDU (LSP) information learned by the router. -message IsisLspsStateRequest { +// The request to retrieve RSVP Label Switched Path (LSP) information learned by the +// router. +message RsvpLspsStateRequest { - // The names of ISIS routers for which learned information is requested. An empty list - // will return results for all ISIS routers. + // The names of RSVP-TE routers for which learned information is requested. An empty + // list will return results for all RSVP=TE routers. // // x-constraint: - // - /components/schemas/Device.IsisRouter/properties/name + // - /components/schemas/Device.Rsvp/properties/name // // // x-constraint: - // - /components/schemas/Device.IsisRouter/properties/name + // - /components/schemas/Device.Rsvp/properties/name // - repeated string isis_router_names = 1; + repeated string rsvp_router_names = 1; } -// The result of ISIS LSP information that are retrieved. -message IsisLspsState { +// Discovered IPv4 Point-to-Point LSPs of a RSVP-TE router. +message RsvpLspsState { - // The name of the ISIS Router. - optional string isis_router_name = 1; + // The name of the RSVP-TE Router. + optional string rsvp_router_name = 1; - // One or more LSPs that are learned by this ISIS router. - repeated IsisLspState lsps = 2; + // IPv4 Point-to-Point RSVP-TE Discovered LSPs. + repeated RsvpIPv4LspState ipv4_lsps = 2; } -// ISIS LSP. -message IsisLspState { - - // LSP ID in the format, e.g. '640000000001-00-00'. LSP ID consists of the System ID - // of a neighbor, the Pseudonode ID, and the LSP number. The last two bytes represent - // Pseudonode ID and LSP number respectively. A pseudonode is a logical representation - // of the LAN which is generated by a Designated Intermediate System (DIS) on a LAN - // segment. If one LSP exceeds the maximum LSP size then it is sent in another LSP with - // the LSP number incremented by one. A router's learned LSP gets refreshed by 'remaining_lifetime'. - // Then the sequence number is incremented by 1. - // required = true - optional string lsp_id = 1; - - message PduType { - enum Enum { - unspecified = 0; - level_1 = 1; - level_2 = 2; - } - } - // Link State PDU type. - optional PduType.Enum pdu_type = 2; - - // Remaining lifetime in seconds before LSP expires. - optional uint32 remaining_lifetime = 3; +// IPv4 RSVP-TE Discovered LSPs. +message RsvpIPv4LspState { - // Sequence number of the LSP. - optional uint64 sequence_number = 4; + // The origin IPv4 address of RSVP session. + optional string source_address = 1; - // Total length of the LSP. - optional uint32 pdu_length = 5; + // The IPv4 destination address of RSVP session. + optional string destination_address = 2; - // LSP Type-Block flags. - IsisLspFlags flags = 6; + // It refers to the RSVP LSP properties. + RsvpLspState lsp = 3; - // IS Type - bits 1 and 2 indicate the type of Intermediate System. - // 1 - ( i.e. bit 1 set) Level 1 Intermediate system. - // 2 - Unused value. - // 3 - (i.e. bits 1 and 2 set) Level 2 Intermediate system. - optional uint32 is_type = 7; + // It refers to RSVP RRO objects container. + repeated RsvpLspIpv4Rro rros = 4; - // It refers to Link State PDU State TLVs container. - IsisLspTlvs tlvs = 8; + // It refers to RSVP ERO objects container. + repeated RsvpLspIpv4Ero eros = 5; } -// This contains the list of TLVs present in one LSP. -message IsisLspTlvs { - - // Array of Hostname TLVs ( type 137) present in this LSP. - repeated IsisLspHostname hostname_tlvs = 1; +// IPv4 RSVP-TE Discovered LSPs. +message RsvpLspState { - // Array of IS-Reachability TLVs (type 2) present in this LSP. - repeated IsisLspIsReachabilityTlv is_reachability_tlvs = 2; + // The tunnel id of RSVP session which acts as an identifier that remains constant over + // the life of the tunnel. + optional uint32 tunnel_id = 1; - // Array of Extended IS-Reachability TLVs (type 22) present in this LSP. - repeated IsisLspExtendedIsReachabilityTlv extended_is_reachability_tlvs = 3; + // The lsp-id of RSVP session which acts as a differentiator for two lsps originating + // from the same headend, commonly used to distinguish RSVP sessions during make before + // break operations. + optional uint32 lsp_id = 2; - // Array of IPv4 Internal Reachability TLVs (type 128) present in this LSP. - repeated IsisLspIpv4InternalReachabilityTlv ipv4_internal_reachability_tlvs = 4; + // The value of RSVP-TE Session Name field of the Session Attribute object. + optional string session_name = 3; - // Array of IPv4 External Reachability TLVs (type 130) present in this LSP. - repeated IsisLspIpv4ExternalReachabilityTlv ipv4_external_reachability_tlvs = 5; + // The label received by RSVP-TE ingress. + optional uint32 label_in = 4; - // Array of IPv4 Extended Reachability TLVs (type 135) present in this LSP. - repeated IsisLspExtendedIpv4ReachabilityTlv extended_ipv4_reachability_tlvs = 6; + // The label assigned by RSVP-TE egress. + optional uint32 label_out = 5; - // Array of IPv6 Reachability TLVs (type 236) present in this LSP. - repeated IsisLspIpv6ReachabilityTlv ipv6_reachability_tlvs = 7; -} + message SessionStatus { + enum Enum { + unspecified = 0; + up = 1; + down = 2; + } + } + // Operational state of the RSVP LSP. + optional SessionStatus.Enum session_status = 6; -// It contains Hostname for the TLV 137. -message IsisLspHostname { + message LastFlapReason { + enum Enum { + unspecified = 0; + resv_tear = 1; + path_tear = 2; + path_timeout = 3; + } + } + // The reason for the last flap of this RSVP session. + optional LastFlapReason.Enum last_flap_reason = 7; - // Hostname for an ISIS router. - optional string hostname = 1; + // The tunnel UP time in milli seconds. If the tunnel is DOWN the UP time will be zero. + optional uint64 up_time = 8; } -// LSP Type flags. -message IsisLspFlags { +// This contains the list of Record Route Object(RRO) objects associated with the traffic +// engineering tunnel. The Record Route Object(RRO) is used in RSVP-TE to record the +// route traversed by the LSP. The RRO might be present in both Path message and Resv +// message, the RRO stores the IP addresses of the routers that the traffic engineering +// tunnel traversed and also the label generated and distributed by the routers. The +// RROs in the Resv message mirrors that of the Path message, the only difference is +// that the RRO in a Resv message records the path information in the reverse direction. +// +message RsvpLspIpv4Rro { - // When set, the originator supports partition repair. - optional bool partition_repair = 1; + // The IPv4 addresses of the routers that the traffic engineering tunnel traversed. + optional string address = 1; - // When set, the originator is attached to another area using the referred metric. - optional bool attached_error = 2; + // Label reported for RRO hop. When the Label_Recording flag is set in the Session Attribute + // object, nodes doing route recording should include the Label Record subobject containing + // the reported label. + optional uint32 reported_label = 2; +} - // When set, the originator is attached to another - // area using the referred metric. - optional bool attached_expense = 3; +// This contains the list of sub-objects included in the Explicit Route Object(ERO) +// object send in the PATH message from the ingress. These sub-objects contain the intermediate +// hops to be traversed by the LSP while being forwarded towards the egress endpoint. +message RsvpLspIpv4Ero { - // Delay Metric - when set, the originator is attached to another - // area using the referred metric. - optional bool attached_delay = 4; + // The IPv4 prefix indicated by the ERO. Specified only when the ERO hop is an IPv4 + // prefix. + optional string prefix = 1; - // Default Metric - when set, the originator is attached to another - // area using the referred metric. - optional bool attached_default = 5; + // The autonomous system number indicated by the ERO. Specified only when the ERO hop + // is an 2 or 4-byte AS number. + optional uint32 asn = 2; - // Overload bit - when set, the originator is overloaded, and must - // be avoided in path calculation. - optional bool overload = 6; + message Type { + enum Enum { + unspecified = 0; + ipv4 = 1; + ipv6 = 2; + asn = 3; + asn4 = 4; + label = 5; + unnumbered_interface = 6; + } + } + // The type indicated by the ERO. + optional Type.Enum type = 3; } -// This container describes list of ISIS neighbors and attributes in IS-Reachability -// TLV (type 2). -message IsisLspIsReachabilityTlv { +// The request for assigned IPv4 address information associated with DHCP Client sessions. +message Dhcpv4InterfaceStateRequest { - // This container describes Intermediate System (IS) neighbors. - repeated IsisLspneighbor neighbors = 1; + // The names of DHCPv4 client to return results for. An empty list will return results + // for all DHCPv4 Client address information. + // + // x-constraint: + // - /components/schemas/Device.Dhcpv4client/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Dhcpv4client/properties/name + // + repeated string dhcp_client_names = 1; } -// This is list of ISIS neighbors and attributes in Extended-IS-Reachability TLV (type -// 22). -message IsisLspExtendedIsReachabilityTlv { +// The IPv4 address associated with this DHCP Client session. +message Dhcpv4InterfaceState { - // This container describes IS neighbors. - repeated IsisLspneighbor neighbors = 1; -} + // The name of a DHCPv4 Client. + optional string dhcp_client_name = 1; -// This contains IS neighbors. -message IsisLspneighbor { + // The IPv4 address associated with this DHCP Client session. + optional string ipv4_address = 2; - // The System ID for this emulated ISIS router, e.g. 640100010000. - optional string system_id = 1; -} + // The length of the prefix. + optional uint32 prefix_length = 3; -// This container defines list of IPv4 internal reachability information in one IPv4 -// internal reachability TLV. -// This is advertised when the origin-type is set 'internal' in route range configurations. -message IsisLspIpv4InternalReachabilityTlv { + // The Gateway Ipv4 address associated with this DHCP Client session. + optional string gateway_address = 4; - // Describes list of IPv4 prefixes in this TLV. - repeated IsisLspV4Prefix prefixes = 1; -} + // The duration of the IPv4 address lease, in seconds. + optional uint32 lease_time = 5; -// This container defines list of IPv4 external reachability information in one IPv4 -// external reachability TLV. -// This is advertised when the origin-type is set 'external' in route range configurations. -message IsisLspIpv4ExternalReachabilityTlv { + // Time in seconds until the DHCPv4 client starts renewing the lease. + optional uint32 renew_time = 6; - // Describes list of IPv4 prefixes in this TLV.. - repeated IsisLspV4Prefix prefixes = 1; + // Time in seconds until the DHCPv4 client starts rebinding. + optional uint32 rebind_time = 7; } -// This group defines attributes of an IPv4 standard prefix. -message IsisLspV4Prefix { - - // An IPv4 unicast prefix reachable via the originator of this LSP. - optional string ipv4_address = 1; - - // The length of the IPv4 prefix. - optional uint32 prefix_length = 2; +// The request to retrieve DHCP Server host allocated status. +message Dhcpv4LeaseStateRequest { - message RedistributionType { - enum Enum { - unspecified = 0; - up = 1; - down = 2; - } - } - // Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, - // and for all other prefixes in L1 and L2 LSPs. (default) - // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. - // The prefixes are being advertised from a higher level (L2) down to a lower level - // (L1). - optional RedistributionType.Enum redistribution_type = 3; + // The names of DHCPv4 server to return results for. An empty list will return results + // for all DHCPv4 servers. + // + // x-constraint: + // - /components/schemas/Device.Dhcpv4server/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Dhcpv4server/properties/name + // + repeated string dhcp_server_names = 1; +} - // ISIS default metric value. - optional uint32 default_metric = 4; +// Lease information of DHCP Server. +message Dhcpv4LeasesState { - message OriginType { - enum Enum { - unspecified = 0; - internal = 1; - external = 2; - } - } - // The origin of the advertised route-internal or external to the ISIS area. Options - // include the following: - // Internal-for intra-area routes, through Level 1 LSPs. - // External-for inter-area routes redistributed within L1, through Level - // 1 LSPs. - optional OriginType.Enum origin_type = 5; + // The name of a DHCP Server. + optional string dhcp_server_name = 1; + + // Description missing in models + repeated Dhcpv4LeaseState leases = 2; } -// This container defines list of IPv4 extended reachability information in one Extended -// IPv4 External Reachability TLV. -// It is advertised when the 'wide metric' is enabled. -message IsisLspExtendedIpv4ReachabilityTlv { +// IPv4 address lease state. +message Dhcpv4LeaseState { - // IPv4 prefix contained within extended reachability TLVs. - repeated IsisLspExtendedV4Prefix prefixes = 1; -} + // The IPv4 address associated with this lease. + optional string address = 1; -// This group defines attributes of an IPv4 standard prefix. -message IsisLspExtendedV4Prefix { + // The time in seconds after which the IPv4 address lease will expire. + optional uint32 valid_time = 2; - // An IPv4 unicast prefix reachable via the originator of this LSP. - optional string ipv4_address = 1; + // The elapsed time in seconds since the address has been renewed. + optional uint32 preferred_time = 3; - // The length of the IPv4 prefix. - optional uint32 prefix_length = 2; + // Time in seconds until the DHCPv4 client starts renewing the lease. + optional uint32 renew_time = 4; - // ISIS wide metric. - optional uint32 metric = 3; + // Time in seconds until the DHCPv4 client starts rebinding. + optional uint32 rebind_time = 5; - message RedistributionType { - enum Enum { - unspecified = 0; - up = 1; - down = 2; - } - } - // Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, - // and for all other prefixes in L1 and L2 LSPs. (default) - // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. - // The prefixes are being advertised from a higher level (L2) down to a lower level - // (L1). - optional RedistributionType.Enum redistribution_type = 4; + // The ID of the DHCPv4 client holding this lease. + optional string client_id = 6; - // Description missing in models - IsisLspPrefixAttributes prefix_attributes = 5; + // The Circuit ID option found in the last request message. + optional string circuit_id = 7; + + // The Remote ID option found in the last request message. + optional string remote_id = 8; } -// It defines list of IPv6 extended reachability information in one IPv6 Reachability -// TLV. -message IsisLspIpv6ReachabilityTlv { +// The request for assigned IPv6 address information associated with DHCP Client sessions. +message Dhcpv6InterfaceStateRequest { - // IPv6 prefix contained within reachability TLVs. - repeated IsisLspV6Prefix prefixes = 1; + // The names of DHCPv6 client to return results for. An empty list will return results + // for all DHCPv6 Client address information. + // + // x-constraint: + // - /components/schemas/Device.Dhcpv6client/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Dhcpv6client/properties/name + // + repeated string dhcp_client_names = 1; } -// It defines attributes of an IPv6 standard prefix. -message IsisLspV6Prefix { +// The IPv6 address associated with this DHCP Client session. +message Dhcpv6InterfaceState { - // An IPv6 unicast prefix reachable via the originator of this LSP. - optional string ipv6_address = 1; + // The name of a DHCPv6 Client. + optional string dhcp_client_name = 1; - // The length of the IPv6 prefix. - optional uint32 prefix_length = 2; + // The IPv6 IAPD addresses and prefixes associated with this DHCP Client session. + repeated Dhcpv6InterfaceIapd iapd_addresses = 2; - // ISIS wide metric. - optional uint32 metric = 3; + // The IPv6 IATA/IANA addresses and gateways associated with this DHCP Client session. + repeated Dhcpv6InterfaceIa ia_addresses = 3; +} - message RedistributionType { - enum Enum { - unspecified = 0; - up = 1; - down = 2; - } - } - // Up (0)-used when a prefix is initially advertised within the ISIS L3 hierarchy, - // and for all other prefixes in L1 and L2 LSPs. (default) - // Down (1)-used when an L1/L2 router advertises L2 prefixes in L1 LSPs. - // The prefixes are being advertised from a higher level (L2) down to a lower level - // (L1). - optional RedistributionType.Enum redistribution_type = 4; +// The IPv6 IAPD address and prefix length associated with this DHCP Client session. +message Dhcpv6InterfaceIapd { - message OriginType { - enum Enum { - unspecified = 0; - internal = 1; - external = 2; - } - } - // The origin of the advertised route-internal or external to the ISIS area. Options - // include the following: - // Internal-for intra-area routes, through Level 1 LSPs. - // External-for inter-area routes redistributed within L1, through Level - // 1 LSPs. - optional OriginType.Enum origin_type = 5; + // The IAPD address associated with this DHCPv6 Client session. + optional string address = 1; - // Description missing in models - IsisLspPrefixAttributes prefix_attributes = 6; + // The prefix length of the IAPD address associated with this DHCPv6 Client session. + optional uint32 prefix_length = 2; + + // The duration of the IPv6 address lease, in seconds. + optional uint32 lease_time = 3; } -// This contains the properties of ISIS Prefix attributes for the extended IPv4 and -// IPv6 reachability. https://www.rfc-editor.org/rfc/rfc7794.html -message IsisLspPrefixAttributes { +// The IPv6 IATA/IANA address and gateway associated with this DHCP Client session. +message Dhcpv6InterfaceIa { - // External Prefix Flag (Bit 0) - optional bool x_flag = 1; + // The address associated with this DHCPv6 Client session. + optional string address = 1; - // Re-advertisement Flag (Bit 1) - optional bool r_flag = 2; + // The Gateway address associated with this DHCPv6 Client session. + optional string gateway = 2; - // Node Flag (Bit 2) - optional bool n_flag = 3; + // The duration of the IPv6 address lease, in seconds. + optional uint32 lease_time = 3; } -// The request to retrieve LLDP neighbor information for a given instance. -message LldpNeighborsStateRequest { +// The request to retrieve DHCP Server host allocated status. +message Dhcpv6LeaseStateRequest { - // The names of LLDP instances for which neighbor information will be retrieved. If - // no names are specified then the results will contain neighbor information for all - // configured LLDP instances. + // The names of DHCPv6 server to return results for. An empty list will return results + // for all DHCPv6 servers. // // x-constraint: - // - /components/schemas/Lldp/properties/name + // - /components/schemas/Device.Dhcpv6server/properties/name // // // x-constraint: - // - /components/schemas/Lldp/properties/name + // - /components/schemas/Device.Dhcpv6server/properties/name // - repeated string lldp_names = 1; + repeated string dhcp_server_names = 1; +} - // Specify the neighbors for which information will be returned. If empty or missing - // then information for all neighbors will be returned. - repeated string neighbor_id_filters = 2; +// Lease information of DHCP Server. +message Dhcpv6LeasesState { + + // The name of a DHCP Server. + optional string dhcp_server_name = 1; + + // Description missing in models + repeated Dhcpv6ServerLeaseState leases = 2; } -// LLDP neighbor information. -message LldpNeighborsState { +// IPv6 unicast prefix. +message Dhcpv6ServerLeaseState { - // The name of the LLDP instance. - optional string lldp_name = 1; + // The IPv6 address associated with this lease. + optional string address = 1; - // The system name field shall contain an alpha-numeric string that indicates the system's - // administratively assigned name. The system name should be the system's fully qualified - // domain name. If implementations support IETF RFC 3418, the sysName object should - // be used for this field. - optional string system_name = 2; + // The time in seconds, IP address lease will expire. + optional uint32 valid_time = 2; - // The system description field shall contain an alpha-numeric string that is the textual - // description of the network entity. The system description should include the full - // name and version identification of the system's hardware type, software operating - // system, and networking software. If implementations support IETF RFC 3418, the sysDescr - // object should be used for this field. - optional string system_description = 3; + // The time in seconds, elapsed time since address has been renewed. + optional uint32 preferred_time = 3; - // The Chassis ID is a mandatory TLV which identifies the chassis component of the - // endpoint identifier associated with the transmitting LLDP agent. - optional string chassis_id = 4; + // Time in seconds until the DHCPv6 client starts renewing the lease. + optional uint32 renew_time = 4; - message ChassisIdType { - enum Enum { - unspecified = 0; - port_component = 1; - network_address = 2; - chassis_component = 3; - mac_address = 4; - interface_name = 5; - local = 6; - interface_alias = 7; - } - } - // This field identifies the format and source of the chassis identifier string. It - // is an enumerator defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. - optional ChassisIdType.Enum chassis_id_type = 5; + // Time in seconds until the DHCPv6 client starts rebinding. + optional uint32 rebind_time = 5; - // System generated identifier for the neighbor on the LLDP instance. - optional string neighbor_id = 6; + // The ID of the DHCPv6 client holding this lease. + optional string client_id = 6; - // Age since discovery in seconds. - optional uint32 age = 7; + // The Remote ID option found in the last request message. + optional string remote_id = 7; - // Seconds since last update received. - optional uint32 last_update = 8; + // The Interface ID option found in the last request message. + optional string interface_id = 8; +} - // The time-to-live (TTL) in seconds is a mandatory TLV which indicates how long information - // from the neighbor should be considered valid. - optional uint32 ttl = 9; +// The request to retrieve OSPFv2 Link State Advertisements (LSA) information learned +// by the routers. +message Ospfv2LsasStateRequest { - // The Port ID is a mandatory TLV which identifies the port component of the endpoint - // identifier associated with the transmitting LLDP agent. If the specified port is - // an IEEE 802.3 Repeater port, then this TLV is optional. - optional string port_id = 10; + // The names of OSPFv2 routers for which learned information is requested. An empty + // list will return results for all OSPFv2 routers. + // + // x-constraint: + // - /components/schemas/Device.Ospfv2Router/properties/name + // + // + // x-constraint: + // - /components/schemas/Device.Ospfv2Router/properties/name + // + repeated string router_names = 1; +} - message PortIdType { - enum Enum { - unspecified = 0; - port_component = 1; - network_address = 2; - agent_circuit_id = 3; - mac_address = 4; - interface_name = 5; - local = 6; - interface_alias = 7; - } - } - // This field identifies the format and source of the port identifier string. It is - // an enumerator defined by the PtopoPortIdType object from RFC2922. - optional PortIdType.Enum port_id_type = 11; +// The result of OSPFv2 LSA information that are retrieved. +message Ospfv2LsaState { - // The binary string containing the actual port identifier for the port which this LLDP - // PDU was transmitted. The source and format of this field is defined by PtopoPortId - // from RFC2922. - optional string port_description = 12; + // The name of the OSPFv2 Router that learned the LSA information. + optional string router_name = 1; - // The Management Address is a mandatory TLV which identifies a network address associated - // with the local LLDP agent, which can be used to reach the agent on the port identified - // in the Port ID TLV. - optional string management_address = 13; + // One or more OSPFv2 Router-LSA - Type 1. + repeated Ospfv2RouterLsa router_lsas = 2; - // The enumerated value for the network address type identified in this TLV. This enumeration - // is defined in the 'Assigned Numbers' RFC [RFC3232] and the ianaAddressFamilyNumbers - // object. - optional string management_address_type = 14; + // One or more OSPFv2 Network-LSA - Type 2. + repeated Ospfv2NetworkLsa network_lsas = 3; - // Description missing in models - repeated LldpCustomTLVState custom_tlvs = 15; + // One or more OSPFv2 Network summary LSA - Type 3. + repeated Ospfv2NetworkSummaryLsa network_summary_lsas = 4; - // Description missing in models - repeated LldpCapabilityState capabilities = 16; -} + // One or more OSPFv2 Autonomous System Boundary Router (ASBR) summary LSA - Type 4. + repeated Ospfv2SummaryAsLsa summary_as_lsas = 5; -// Custom TLV received from a neighbor.Custom TLVs are organization specific TLVs advertised -// with TLV type 127. -message LldpCustomTLVState { + // OSPFv2 AS-External-LSA - Type 5. + repeated Ospfv2ExternalAsLsa external_as_lsas = 6; - // The integer value identifying the type of information contained in the value field. - optional uint32 custom_type = 1; + // One or more OSPFv2 NSSA-LSA - Type 7. + repeated Ospfv2NssaLsa nssa_lsas = 7; - // The organizationally unique identifier field shall contain the organization's OUI - // as defined in Clause 9 of IEEE Std 802. The high-order octet is 0 and the low-order - // 3 octets are the SMI Network Management Private Enterprise Code of the Vendor in - // network byte order, as defined in the 'Assigned Numbers' RFC [RFC3232]. - optional string oui = 2; + // One or more OSPFv2 Link-Scope Opaque-LSA - Type 9. + repeated Ospfv2OpaqueLsa opaque_lsas = 8; +} - // The organizationally defined subtype field shall contain a unique subtype value assigned - // by the defining organization. - optional string oui_subtype = 3; +// Contents of the router LSA. +message Ospfv2RouterLsa { + + // Contents of the LSA header. + Ospfv2LsaHeader header = 1; + + // Links that are described within the LSA. + repeated Ospfv2Link links = 2; } -// LLDP system capability advertised by the neighbor -message LldpCapabilityState { +// Contents of the Network LSA. +message Ospfv2NetworkLsa { - message CapabilityName { - enum Enum { - unspecified = 0; - mac_bridge = 1; - two_port_mac_relay = 2; - repeater = 3; - docsis_cable_device = 4; - s_vlan = 5; - telephone = 6; - other = 7; - router = 8; - c_vlan = 9; - station_only = 10; - wlan_access_point = 11; - } - } - // Name of the system capability advertised by the neighbor. Capabilities are represented - // in a bitmap that defines the primary functions of the system. The capabilities are - // defined in IEEE 802.1AB. - optional CapabilityName.Enum capability_name = 1; + // Contents of the LSA header. + Ospfv2LsaHeader header = 1; + + // The IPv4 address mask for the network. + optional string network_mask = 2; - // Indicates whether the corresponding system capability is enabled on the neighbor. - optional bool capability_enabled = 2; + // Neighbor router ids that are described within the LSA. + repeated string neighbor_router_ids = 3; } -// The request to retrieve RSVP Label Switched Path (LSP) information learned by the -// router. -message RsvpLspsStateRequest { +// Contents of the Network Summary LSA - Type 3. +// The value of the IPv4 prefix that was received is present in header.lsa_id. +message Ospfv2NetworkSummaryLsa { - // The names of RSVP-TE routers for which learned information is requested. An empty - // list will return results for all RSVP=TE routers. - // - // x-constraint: - // - /components/schemas/Device.Rsvp/properties/name - // - // - // x-constraint: - // - /components/schemas/Device.Rsvp/properties/name - // - repeated string rsvp_router_names = 1; + // Contents of the LSA header. + Ospfv2LsaHeader header = 1; + + // The IPv4 address mask for the network. + optional string network_mask = 2; + + // The cost of the summary route TOS level 0 and all unspecified levels. + optional uint32 metric = 3; } -// Discovered IPv4 Point-to-Point LSPs of a RSVP-TE router. -message RsvpLspsState { +// Contents of OSPFv2 Autonomous System Boundary Router (ASBR) summary LSA - Type 4. +message Ospfv2SummaryAsLsa { - // The name of the RSVP-TE Router. - optional string rsvp_router_name = 1; + // Contents of the LSA header. + Ospfv2LsaHeader header = 1; - // IPv4 Point-to-Point RSVP-TE Discovered LSPs. - repeated RsvpIPv4LspState ipv4_lsps = 2; -} + // The IPv4 address mask for the network. + optional string network_mask = 2; -// IPv4 RSVP-TE Discovered LSPs. -message RsvpIPv4LspState { + // The cost of the summary route TOS level 0 and all unspecified levels. + optional uint32 metric = 3; +} - // The origin IPv4 address of RSVP session. - optional string source_address = 1; +// Contents of OSPFv2 AS-External-LSA - Type 5. +// The value of the IPv4 prefix that was received is present in header.lsa_id. +message Ospfv2ExternalAsLsa { - // The IPv4 destination address of RSVP session. - optional string destination_address = 2; + // Contents of the LSA header. + Ospfv2LsaHeader header = 1; - // It refers to the RSVP LSP properties. - RsvpLspState lsp = 3; + // The IPv4 address mask for the network. + optional string network_mask = 2; - // It refers to RSVP RRO objects container. - repeated RsvpLspIpv4Rro rros = 4; + // The cost of the summary route TOS level 0 and all unspecified levels. + optional uint32 metric = 3; - // It refers to RSVP ERO objects container. - repeated RsvpLspIpv4Ero eros = 5; + // The type of metric associated with the route range. + optional uint32 metric_type = 4; } -// IPv4 RSVP-TE Discovered LSPs. -message RsvpLspState { +// Contents of OSPFv2 NSSA LSA - Type 7. +// The value of the IPv4 prefix that was received is present in header.lsa_id. +message Ospfv2NssaLsa { - // The tunnel id of RSVP session which acts as an identifier that remains constant over - // the life of the tunnel. - optional uint32 tunnel_id = 1; + // Contents of the LSA header. + Ospfv2LsaHeader header = 1; - // The lsp-id of RSVP session which acts as a differentiator for two lsps originating - // from the same headend, commonly used to distinguish RSVP sessions during make before - // break operations. - optional uint32 lsp_id = 2; + // The IPv4 address mask for the network. + optional string network_mask = 2; - // The value of RSVP-TE Session Name field of the Session Attribute object. - optional string session_name = 3; + // The cost of the summary route TOS level 0 and all unspecified levels. + optional uint32 metric = 3; - // The label received by RSVP-TE ingress. - optional uint32 label_in = 4; + // The type of metric associated with the route range. + optional uint32 metric_type = 4; - // The label assigned by RSVP-TE egress. - optional uint32 label_out = 5; + // IPv4 Forwarding address. + optional string forwarding_address = 5; +} - message SessionStatus { - enum Enum { - unspecified = 0; - up = 1; - down = 2; - } - } - // Operational state of the RSVP LSP. - optional SessionStatus.Enum session_status = 6; +// Contents of OSPFv2 Opaque LSA - Type 7. +message Ospfv2OpaqueLsa { - message LastFlapReason { + // Contents of the LSA header. + Ospfv2LsaHeader header = 1; + + message Type { enum Enum { unspecified = 0; - resv_tear = 1; - path_tear = 2; - path_timeout = 3; + local = 1; + area = 2; + domain = 3; } } - // The reason for the last flap of this RSVP session. - optional LastFlapReason.Enum last_flap_reason = 7; - - // The tunnel UP time in milli seconds. If the tunnel is DOWN the UP time will be zero. - optional uint64 up_time = 8; + // The type of Opaque TE LSAs. The LSA type. + optional Type.Enum type = 2; } -// This contains the list of Record Route Object(RRO) objects associated with the traffic -// engineering tunnel. The Record Route Object(RRO) is used in RSVP-TE to record the -// route traversed by the LSP. The RRO might be present in both Path message and Resv -// message, the RRO stores the IP addresses of the routers that the traffic engineering -// tunnel traversed and also the label generated and distributed by the routers. The -// RROs in the Resv message mirrors that of the Path message, the only difference is -// that the RRO in a Resv message records the path information in the reverse direction. -// -message RsvpLspIpv4Rro { +// Attributes in LSA Header. +message Ospfv2LsaHeader { - // The IPv4 addresses of the routers that the traffic engineering tunnel traversed. - optional string address = 1; + // LSA ID in the IPv4 format. The Link State ID for the specified LSA type. + optional string lsa_id = 1; - // Label reported for RRO hop. When the Label_Recording flag is set in the Session Attribute - // object, nodes doing route recording should include the Label Record subobject containing - // the reported label. - optional uint32 reported_label = 2; -} + // The router ID (in the IPv4 format) of the router that originated the LSA. + optional string advertising_router_id = 2; -// This contains the list of sub-objects included in the Explicit Route Object(ERO) -// object send in the PATH message from the ingress. These sub-objects contain the intermediate -// hops to be traversed by the LSP while being forwarded towards the egress endpoint. -message RsvpLspIpv4Ero { + // Sequence number to detect old and duplicate LSAs. The greater the sequence number + // the more recent the LSA. + optional uint32 sequence_number = 3; - // The IPv4 prefix indicated by the ERO. Specified only when the ERO hop is an IPv4 - // prefix. - optional string prefix = 1; + // The time since the LSA's generation in seconds. + optional uint32 age = 4; - // The autonomous system number indicated by the ERO. Specified only when the ERO hop - // is an 2 or 4-byte AS number. - optional uint32 asn = 2; + // The optional bits. + optional uint32 option_bits = 5; +} + +// Generic attributes used to identify links within OSPFv2. +message Ospfv2Link { message Type { enum Enum { unspecified = 0; - ipv4 = 1; - ipv6 = 2; - asn = 3; - asn4 = 4; - label = 5; - unnumbered_interface = 6; + point_to_point = 1; + transit = 2; + stub = 3; + virtual = 4; } } - // The type indicated by the ERO. - optional Type.Enum type = 3; + // The data associated with the link type. The value is dependent upon the subtype of + // the LSA. - point_to_point: The LSA represents a point-to-point connection to another + // router. - transit: The LSA represents a connection to a transit network. - stub: + // The LSA represents a connection to a stub network. - virtual: The LSA represents + // a virtual link connection. + optional Type.Enum type = 1; + + // The identifier for the link specified. The value of the link + // identifier is dependent upon the type of the LSA. + optional string id = 2; + + // The data associated with the link type. The value is + // dependent upon the subtype of the LSA. When the connection is + // to a stub network it represents the mask; for p2p connections + // that are unnumbered it represents the ifIndex value of the + // router's interface; for all other connections it represents + // the local system's IP address. + optional string data = 3; + + // The data associated with the link type. The value is + // dependent upon the subtype of the LSA. When the connection is + // to a stub network it represents the mask; for p2p connections + // that are unnumbered it represents the ifIndex value of the + // router's interface; for all other connections it represents + // the local system's IP address. + optional uint32 metric = 4; } // The capture result request to the traffic generator. Stops the port capture on the @@ -13516,6 +17311,29 @@ message PatternFlowIpv4SrcMetricTag { optional uint32 length = 3; } +// ipv4 random pattern +message PatternFlowIpv4SrcRandom { + + // The minimum possible value generated by the random value generator. + // default = 0.0.0.0 + optional string min = 1; + + // The maximum possible value generated by the random value generator. + // default = 255.255.255.255 + optional string max = 2; + + // The seed value is used to initialize the random number generator to a deterministic + // state. If the user provides a seed value of 0, the implementation will generate a + // sequence of non-deterministic random values. For any other seed value, the sequence + // of random numbers will be generated in a deterministic manner (specific to the implementation). + // default = 1 + optional uint32 seed = 3; + + // The total number of values to be generated by the random value generator. + // default = 1 + optional uint32 count = 4; +} + // Source address message PatternFlowIpv4Src { @@ -13526,6 +17344,8 @@ message PatternFlowIpv4Src { values = 3; increment = 4; decrement = 5; + auto = 1; + random = 6; } } // Description missing in models @@ -13550,6 +17370,12 @@ message PatternFlowIpv4Src { // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. repeated PatternFlowIpv4SrcMetricTag metric_tags = 7; + + // Description missing in models + FlowIpv4Auto auto = 8; + + // Description missing in models + PatternFlowIpv4SrcRandom random = 9; } // ipv4 counter pattern @@ -13588,6 +17414,29 @@ message PatternFlowIpv4DstMetricTag { optional uint32 length = 3; } +// ipv4 random pattern +message PatternFlowIpv4DstRandom { + + // The minimum possible value generated by the random value generator. + // default = 0.0.0.0 + optional string min = 1; + + // The maximum possible value generated by the random value generator. + // default = 255.255.255.255 + optional string max = 2; + + // The seed value is used to initialize the random number generator to a deterministic + // state. If the user provides a seed value of 0, the implementation will generate a + // sequence of non-deterministic random values. For any other seed value, the sequence + // of random numbers will be generated in a deterministic manner (specific to the implementation). + // default = 1 + optional uint32 seed = 3; + + // The total number of values to be generated by the random value generator. + // default = 1 + optional uint32 count = 4; +} + // Destination address message PatternFlowIpv4Dst { @@ -13598,6 +17447,8 @@ message PatternFlowIpv4Dst { values = 3; increment = 4; decrement = 5; + auto = 1; + random = 6; } } // Description missing in models @@ -13622,6 +17473,12 @@ message PatternFlowIpv4Dst { // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. repeated PatternFlowIpv4DstMetricTag metric_tags = 7; + + // Description missing in models + FlowIpv4Auto auto = 8; + + // Description missing in models + PatternFlowIpv4DstRandom random = 9; } // integer counter pattern @@ -14593,6 +18450,29 @@ message PatternFlowIpv6FlowLabelMetricTag { optional uint32 length = 3; } +// integer random pattern +message PatternFlowIpv6FlowLabelRandom { + + // The minimum possible value generated by the random value generator. + // default = 0 + optional uint32 min = 1; + + // The maximum possible value generated by the random value generator. + // default = 1048575 + optional uint32 max = 2; + + // The seed value is used to initialize the random number generator to a deterministic + // state. If the user provides a seed value of 0, the implementation will generate a + // sequence of non-deterministic random values. For any other seed value, the sequence + // of random numbers will be generated in a deterministic manner (specific to the implementation). + // default = 1 + optional uint32 seed = 3; + + // The total number of values to be generated by the random value generator. + // default = 1 + optional uint32 count = 4; +} + // Flow label message PatternFlowIpv6FlowLabel { @@ -14603,6 +18483,7 @@ message PatternFlowIpv6FlowLabel { values = 3; increment = 4; decrement = 5; + random = 6; } } // Description missing in models @@ -14627,6 +18508,9 @@ message PatternFlowIpv6FlowLabel { // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. repeated PatternFlowIpv6FlowLabelMetricTag metric_tags = 7; + + // Description missing in models + PatternFlowIpv6FlowLabelRandom random = 8; } // integer counter pattern @@ -14905,6 +18789,7 @@ message PatternFlowIpv6Src { values = 3; increment = 4; decrement = 5; + auto = 1; } } // Description missing in models @@ -14929,6 +18814,9 @@ message PatternFlowIpv6Src { // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. repeated PatternFlowIpv6SrcMetricTag metric_tags = 7; + + // Description missing in models + FlowIpv6Auto auto = 8; } // ipv6 counter pattern @@ -14977,6 +18865,7 @@ message PatternFlowIpv6Dst { values = 3; increment = 4; decrement = 5; + auto = 1; } } // Description missing in models @@ -15001,6 +18890,9 @@ message PatternFlowIpv6Dst { // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. repeated PatternFlowIpv6DstMetricTag metric_tags = 7; + + // Description missing in models + FlowIpv6Auto auto = 8; } // mac counter pattern @@ -16335,6 +20227,29 @@ message PatternFlowTcpSrcPortMetricTag { optional uint32 length = 3; } +// integer random pattern +message PatternFlowTcpSrcPortRandom { + + // The minimum possible value generated by the random value generator. + // default = 0 + optional uint32 min = 1; + + // The maximum possible value generated by the random value generator. + // default = 65535 + optional uint32 max = 2; + + // The seed value is used to initialize the random number generator to a deterministic + // state. If the user provides a seed value of 0, the implementation will generate a + // sequence of non-deterministic random values. For any other seed value, the sequence + // of random numbers will be generated in a deterministic manner (specific to the implementation). + // default = 1 + optional uint32 seed = 3; + + // The total number of values to be generated by the random value generator. + // default = 1 + optional uint32 count = 4; +} + // Source port message PatternFlowTcpSrcPort { @@ -16345,6 +20260,7 @@ message PatternFlowTcpSrcPort { values = 3; increment = 4; decrement = 5; + random = 6; } } // Description missing in models @@ -16369,6 +20285,9 @@ message PatternFlowTcpSrcPort { // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. repeated PatternFlowTcpSrcPortMetricTag metric_tags = 7; + + // Description missing in models + PatternFlowTcpSrcPortRandom random = 8; } // integer counter pattern @@ -16407,6 +20326,29 @@ message PatternFlowTcpDstPortMetricTag { optional uint32 length = 3; } +// integer random pattern +message PatternFlowTcpDstPortRandom { + + // The minimum possible value generated by the random value generator. + // default = 0 + optional uint32 min = 1; + + // The maximum possible value generated by the random value generator. + // default = 65535 + optional uint32 max = 2; + + // The seed value is used to initialize the random number generator to a deterministic + // state. If the user provides a seed value of 0, the implementation will generate a + // sequence of non-deterministic random values. For any other seed value, the sequence + // of random numbers will be generated in a deterministic manner (specific to the implementation). + // default = 1 + optional uint32 seed = 3; + + // The total number of values to be generated by the random value generator. + // default = 1 + optional uint32 count = 4; +} + // Destination port message PatternFlowTcpDstPort { @@ -16417,6 +20359,7 @@ message PatternFlowTcpDstPort { values = 3; increment = 4; decrement = 5; + random = 6; } } // Description missing in models @@ -16441,6 +20384,9 @@ message PatternFlowTcpDstPort { // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. repeated PatternFlowTcpDstPortMetricTag metric_tags = 7; + + // Description missing in models + PatternFlowTcpDstPortRandom random = 8; } // integer counter pattern @@ -17380,6 +21326,37 @@ message PatternFlowTcpWindow { repeated PatternFlowTcpWindowMetricTag metric_tags = 7; } +// The one's complement of the one's complement sum of all 16 bit words in header and +// text. An all-zero value means that no checksum will be transmitted. While computing +// the checksum, the checksum field itself is replaced with zeros. +message PatternFlowTcpChecksum { + + message Choice { + enum Enum { + unspecified = 0; + generated = 1; + custom = 2; + } + } + // The type of checksum + // default = Choice.Enum.generated + optional Choice.Enum choice = 1; + + message Generated { + enum Enum { + unspecified = 0; + good = 1; + bad = 2; + } + } + // A system generated checksum value + // default = Generated.Enum.good + optional Generated.Enum generated = 2; + + // A custom checksum value + optional uint32 custom = 3; +} + // integer counter pattern message PatternFlowUdpSrcPortCounter { @@ -17416,6 +21393,29 @@ message PatternFlowUdpSrcPortMetricTag { optional uint32 length = 3; } +// integer random pattern +message PatternFlowUdpSrcPortRandom { + + // The minimum possible value generated by the random value generator. + // default = 0 + optional uint32 min = 1; + + // The maximum possible value generated by the random value generator. + // default = 65535 + optional uint32 max = 2; + + // The seed value is used to initialize the random number generator to a deterministic + // state. If the user provides a seed value of 0, the implementation will generate a + // sequence of non-deterministic random values. For any other seed value, the sequence + // of random numbers will be generated in a deterministic manner (specific to the implementation). + // default = 1 + optional uint32 seed = 3; + + // The total number of values to be generated by the random value generator. + // default = 1 + optional uint32 count = 4; +} + // Source port message PatternFlowUdpSrcPort { @@ -17426,6 +21426,7 @@ message PatternFlowUdpSrcPort { values = 3; increment = 4; decrement = 5; + random = 6; } } // Description missing in models @@ -17450,6 +21451,9 @@ message PatternFlowUdpSrcPort { // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. repeated PatternFlowUdpSrcPortMetricTag metric_tags = 7; + + // Description missing in models + PatternFlowUdpSrcPortRandom random = 8; } // integer counter pattern @@ -17488,6 +21492,29 @@ message PatternFlowUdpDstPortMetricTag { optional uint32 length = 3; } +// integer random pattern +message PatternFlowUdpDstPortRandom { + + // The minimum possible value generated by the random value generator. + // default = 0 + optional uint32 min = 1; + + // The maximum possible value generated by the random value generator. + // default = 65535 + optional uint32 max = 2; + + // The seed value is used to initialize the random number generator to a deterministic + // state. If the user provides a seed value of 0, the implementation will generate a + // sequence of non-deterministic random values. For any other seed value, the sequence + // of random numbers will be generated in a deterministic manner (specific to the implementation). + // default = 1 + optional uint32 seed = 3; + + // The total number of values to be generated by the random value generator. + // default = 1 + optional uint32 count = 4; +} + // Destination port message PatternFlowUdpDstPort { @@ -17498,6 +21525,7 @@ message PatternFlowUdpDstPort { values = 3; increment = 4; decrement = 5; + random = 6; } } // Description missing in models @@ -17522,6 +21550,9 @@ message PatternFlowUdpDstPort { // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. repeated PatternFlowUdpDstPortMetricTag metric_tags = 7; + + // Description missing in models + PatternFlowUdpDstPortRandom random = 8; } // integer counter pattern @@ -17887,10 +21918,11 @@ message PatternFlowGreProtocol { values = 3; increment = 4; decrement = 5; + auto = 1; } } // Description missing in models - // default = Choice.Enum.value + // default = Choice.Enum.auto optional Choice.Enum choice = 1; // Description missing in models @@ -17911,6 +21943,12 @@ message PatternFlowGreProtocol { // a corresponding header field for metrics per each applicable value. These would appear // as tagged metrics in corresponding flow metrics. repeated PatternFlowGreProtocolMetricTag metric_tags = 7; + + // The OTG implementation can provide a system generated + // value for this property. If the OTG is unable to generate a value + // the default value must be used. + // default = 2048 + optional uint32 auto = 8; } // Optional checksum of GRE header and payload. Only present if the checksum_present diff --git a/gosnappi/pattern_flow_arp_hardware_length.go b/gosnappi/pattern_flow_arp_hardware_length.go new file mode 100644 index 00000000..3016d3bf --- /dev/null +++ b/gosnappi/pattern_flow_arp_hardware_length.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpHardwareLength ***** +type patternFlowArpHardwareLength struct { + validation + obj *otg.PatternFlowArpHardwareLength + marshaller marshalPatternFlowArpHardwareLength + unMarshaller unMarshalPatternFlowArpHardwareLength + incrementHolder PatternFlowArpHardwareLengthCounter + decrementHolder PatternFlowArpHardwareLengthCounter + metricTagsHolder PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter +} + +func NewPatternFlowArpHardwareLength() PatternFlowArpHardwareLength { + obj := patternFlowArpHardwareLength{obj: &otg.PatternFlowArpHardwareLength{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpHardwareLength) msg() *otg.PatternFlowArpHardwareLength { + return obj.obj +} + +func (obj *patternFlowArpHardwareLength) setMsg(msg *otg.PatternFlowArpHardwareLength) PatternFlowArpHardwareLength { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpHardwareLength struct { + obj *patternFlowArpHardwareLength +} + +type marshalPatternFlowArpHardwareLength interface { + // ToProto marshals PatternFlowArpHardwareLength to protobuf object *otg.PatternFlowArpHardwareLength + ToProto() (*otg.PatternFlowArpHardwareLength, error) + // ToPbText marshals PatternFlowArpHardwareLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpHardwareLength to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpHardwareLength to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpHardwareLength struct { + obj *patternFlowArpHardwareLength +} + +type unMarshalPatternFlowArpHardwareLength interface { + // FromProto unmarshals PatternFlowArpHardwareLength from protobuf object *otg.PatternFlowArpHardwareLength + FromProto(msg *otg.PatternFlowArpHardwareLength) (PatternFlowArpHardwareLength, error) + // FromPbText unmarshals PatternFlowArpHardwareLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpHardwareLength from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpHardwareLength from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpHardwareLength) Marshal() marshalPatternFlowArpHardwareLength { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpHardwareLength{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpHardwareLength) Unmarshal() unMarshalPatternFlowArpHardwareLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpHardwareLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpHardwareLength) ToProto() (*otg.PatternFlowArpHardwareLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpHardwareLength) FromProto(msg *otg.PatternFlowArpHardwareLength) (PatternFlowArpHardwareLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpHardwareLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpHardwareLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpHardwareLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpHardwareLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpHardwareLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpHardwareLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpHardwareLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpHardwareLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpHardwareLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpHardwareLength) Clone() (PatternFlowArpHardwareLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpHardwareLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowArpHardwareLength) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowArpHardwareLength is length (in octets) of a hardware address +type PatternFlowArpHardwareLength interface { + Validation + // msg marshals PatternFlowArpHardwareLength to protobuf object *otg.PatternFlowArpHardwareLength + // and doesn't set defaults + msg() *otg.PatternFlowArpHardwareLength + // setMsg unmarshals PatternFlowArpHardwareLength from protobuf object *otg.PatternFlowArpHardwareLength + // and doesn't set defaults + setMsg(*otg.PatternFlowArpHardwareLength) PatternFlowArpHardwareLength + // provides marshal interface + Marshal() marshalPatternFlowArpHardwareLength + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpHardwareLength + // validate validates PatternFlowArpHardwareLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpHardwareLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowArpHardwareLengthChoiceEnum, set in PatternFlowArpHardwareLength + Choice() PatternFlowArpHardwareLengthChoiceEnum + // setChoice assigns PatternFlowArpHardwareLengthChoiceEnum provided by user to PatternFlowArpHardwareLength + setChoice(value PatternFlowArpHardwareLengthChoiceEnum) PatternFlowArpHardwareLength + // HasChoice checks if Choice has been set in PatternFlowArpHardwareLength + HasChoice() bool + // Value returns uint32, set in PatternFlowArpHardwareLength. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowArpHardwareLength + SetValue(value uint32) PatternFlowArpHardwareLength + // HasValue checks if Value has been set in PatternFlowArpHardwareLength + HasValue() bool + // Values returns []uint32, set in PatternFlowArpHardwareLength. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowArpHardwareLength + SetValues(value []uint32) PatternFlowArpHardwareLength + // Increment returns PatternFlowArpHardwareLengthCounter, set in PatternFlowArpHardwareLength. + // PatternFlowArpHardwareLengthCounter is integer counter pattern + Increment() PatternFlowArpHardwareLengthCounter + // SetIncrement assigns PatternFlowArpHardwareLengthCounter provided by user to PatternFlowArpHardwareLength. + // PatternFlowArpHardwareLengthCounter is integer counter pattern + SetIncrement(value PatternFlowArpHardwareLengthCounter) PatternFlowArpHardwareLength + // HasIncrement checks if Increment has been set in PatternFlowArpHardwareLength + HasIncrement() bool + // Decrement returns PatternFlowArpHardwareLengthCounter, set in PatternFlowArpHardwareLength. + // PatternFlowArpHardwareLengthCounter is integer counter pattern + Decrement() PatternFlowArpHardwareLengthCounter + // SetDecrement assigns PatternFlowArpHardwareLengthCounter provided by user to PatternFlowArpHardwareLength. + // PatternFlowArpHardwareLengthCounter is integer counter pattern + SetDecrement(value PatternFlowArpHardwareLengthCounter) PatternFlowArpHardwareLength + // HasDecrement checks if Decrement has been set in PatternFlowArpHardwareLength + HasDecrement() bool + // MetricTags returns PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIterIter, set in PatternFlowArpHardwareLength + MetricTags() PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter + setNil() +} + +type PatternFlowArpHardwareLengthChoiceEnum string + +// Enum of Choice on PatternFlowArpHardwareLength +var PatternFlowArpHardwareLengthChoice = struct { + VALUE PatternFlowArpHardwareLengthChoiceEnum + VALUES PatternFlowArpHardwareLengthChoiceEnum + INCREMENT PatternFlowArpHardwareLengthChoiceEnum + DECREMENT PatternFlowArpHardwareLengthChoiceEnum +}{ + VALUE: PatternFlowArpHardwareLengthChoiceEnum("value"), + VALUES: PatternFlowArpHardwareLengthChoiceEnum("values"), + INCREMENT: PatternFlowArpHardwareLengthChoiceEnum("increment"), + DECREMENT: PatternFlowArpHardwareLengthChoiceEnum("decrement"), +} + +func (obj *patternFlowArpHardwareLength) Choice() PatternFlowArpHardwareLengthChoiceEnum { + return PatternFlowArpHardwareLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowArpHardwareLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowArpHardwareLength) setChoice(value PatternFlowArpHardwareLengthChoiceEnum) PatternFlowArpHardwareLength { + intValue, ok := otg.PatternFlowArpHardwareLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowArpHardwareLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowArpHardwareLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowArpHardwareLengthChoice.VALUE { + defaultValue := uint32(6) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowArpHardwareLengthChoice.VALUES { + defaultValue := []uint32{6} + obj.obj.Values = defaultValue + } + + if value == PatternFlowArpHardwareLengthChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowArpHardwareLengthCounter().msg() + } + + if value == PatternFlowArpHardwareLengthChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowArpHardwareLengthCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowArpHardwareLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowArpHardwareLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowArpHardwareLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowArpHardwareLength object +func (obj *patternFlowArpHardwareLength) SetValue(value uint32) PatternFlowArpHardwareLength { + obj.setChoice(PatternFlowArpHardwareLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowArpHardwareLength) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{6}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowArpHardwareLength object +func (obj *patternFlowArpHardwareLength) SetValues(value []uint32) PatternFlowArpHardwareLength { + obj.setChoice(PatternFlowArpHardwareLengthChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowArpHardwareLengthCounter +func (obj *patternFlowArpHardwareLength) Increment() PatternFlowArpHardwareLengthCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowArpHardwareLengthChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowArpHardwareLengthCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowArpHardwareLengthCounter +func (obj *patternFlowArpHardwareLength) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowArpHardwareLengthCounter value in the PatternFlowArpHardwareLength object +func (obj *patternFlowArpHardwareLength) SetIncrement(value PatternFlowArpHardwareLengthCounter) PatternFlowArpHardwareLength { + obj.setChoice(PatternFlowArpHardwareLengthChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowArpHardwareLengthCounter +func (obj *patternFlowArpHardwareLength) Decrement() PatternFlowArpHardwareLengthCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowArpHardwareLengthChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowArpHardwareLengthCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowArpHardwareLengthCounter +func (obj *patternFlowArpHardwareLength) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowArpHardwareLengthCounter value in the PatternFlowArpHardwareLength object +func (obj *patternFlowArpHardwareLength) SetDecrement(value PatternFlowArpHardwareLengthCounter) PatternFlowArpHardwareLength { + obj.setChoice(PatternFlowArpHardwareLengthChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowArpHardwareLengthMetricTag +func (obj *patternFlowArpHardwareLength) MetricTags() PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowArpHardwareLengthMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter struct { + obj *patternFlowArpHardwareLength + patternFlowArpHardwareLengthMetricTagSlice []PatternFlowArpHardwareLengthMetricTag + fieldPtr *[]*otg.PatternFlowArpHardwareLengthMetricTag +} + +func newPatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter(ptr *[]*otg.PatternFlowArpHardwareLengthMetricTag) PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter { + return &patternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter interface { + setMsg(*patternFlowArpHardwareLength) PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter + Items() []PatternFlowArpHardwareLengthMetricTag + Add() PatternFlowArpHardwareLengthMetricTag + Append(items ...PatternFlowArpHardwareLengthMetricTag) PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter + Set(index int, newObj PatternFlowArpHardwareLengthMetricTag) PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter + Clear() PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter + clearHolderSlice() PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter + appendHolderSlice(item PatternFlowArpHardwareLengthMetricTag) PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter +} + +func (obj *patternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter) setMsg(msg *patternFlowArpHardwareLength) PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowArpHardwareLengthMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter) Items() []PatternFlowArpHardwareLengthMetricTag { + return obj.patternFlowArpHardwareLengthMetricTagSlice +} + +func (obj *patternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter) Add() PatternFlowArpHardwareLengthMetricTag { + newObj := &otg.PatternFlowArpHardwareLengthMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowArpHardwareLengthMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowArpHardwareLengthMetricTagSlice = append(obj.patternFlowArpHardwareLengthMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter) Append(items ...PatternFlowArpHardwareLengthMetricTag) PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowArpHardwareLengthMetricTagSlice = append(obj.patternFlowArpHardwareLengthMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter) Set(index int, newObj PatternFlowArpHardwareLengthMetricTag) PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowArpHardwareLengthMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter) Clear() PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowArpHardwareLengthMetricTag{} + obj.patternFlowArpHardwareLengthMetricTagSlice = []PatternFlowArpHardwareLengthMetricTag{} + } + return obj +} +func (obj *patternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter) clearHolderSlice() PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter { + if len(obj.patternFlowArpHardwareLengthMetricTagSlice) > 0 { + obj.patternFlowArpHardwareLengthMetricTagSlice = []PatternFlowArpHardwareLengthMetricTag{} + } + return obj +} +func (obj *patternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter) appendHolderSlice(item PatternFlowArpHardwareLengthMetricTag) PatternFlowArpHardwareLengthPatternFlowArpHardwareLengthMetricTagIter { + obj.patternFlowArpHardwareLengthMetricTagSlice = append(obj.patternFlowArpHardwareLengthMetricTagSlice, item) + return obj +} + +func (obj *patternFlowArpHardwareLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpHardwareLength.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowArpHardwareLength.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowArpHardwareLengthMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowArpHardwareLength) setDefault() { + var choices_set int = 0 + var choice PatternFlowArpHardwareLengthChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowArpHardwareLengthChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowArpHardwareLengthChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowArpHardwareLengthChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowArpHardwareLengthChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowArpHardwareLengthChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowArpHardwareLength") + } + } else { + intVal := otg.PatternFlowArpHardwareLength_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowArpHardwareLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_arp_hardware_length_counter.go b/gosnappi/pattern_flow_arp_hardware_length_counter.go new file mode 100644 index 00000000..63da983c --- /dev/null +++ b/gosnappi/pattern_flow_arp_hardware_length_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpHardwareLengthCounter ***** +type patternFlowArpHardwareLengthCounter struct { + validation + obj *otg.PatternFlowArpHardwareLengthCounter + marshaller marshalPatternFlowArpHardwareLengthCounter + unMarshaller unMarshalPatternFlowArpHardwareLengthCounter +} + +func NewPatternFlowArpHardwareLengthCounter() PatternFlowArpHardwareLengthCounter { + obj := patternFlowArpHardwareLengthCounter{obj: &otg.PatternFlowArpHardwareLengthCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpHardwareLengthCounter) msg() *otg.PatternFlowArpHardwareLengthCounter { + return obj.obj +} + +func (obj *patternFlowArpHardwareLengthCounter) setMsg(msg *otg.PatternFlowArpHardwareLengthCounter) PatternFlowArpHardwareLengthCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpHardwareLengthCounter struct { + obj *patternFlowArpHardwareLengthCounter +} + +type marshalPatternFlowArpHardwareLengthCounter interface { + // ToProto marshals PatternFlowArpHardwareLengthCounter to protobuf object *otg.PatternFlowArpHardwareLengthCounter + ToProto() (*otg.PatternFlowArpHardwareLengthCounter, error) + // ToPbText marshals PatternFlowArpHardwareLengthCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpHardwareLengthCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpHardwareLengthCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpHardwareLengthCounter struct { + obj *patternFlowArpHardwareLengthCounter +} + +type unMarshalPatternFlowArpHardwareLengthCounter interface { + // FromProto unmarshals PatternFlowArpHardwareLengthCounter from protobuf object *otg.PatternFlowArpHardwareLengthCounter + FromProto(msg *otg.PatternFlowArpHardwareLengthCounter) (PatternFlowArpHardwareLengthCounter, error) + // FromPbText unmarshals PatternFlowArpHardwareLengthCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpHardwareLengthCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpHardwareLengthCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpHardwareLengthCounter) Marshal() marshalPatternFlowArpHardwareLengthCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpHardwareLengthCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpHardwareLengthCounter) Unmarshal() unMarshalPatternFlowArpHardwareLengthCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpHardwareLengthCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpHardwareLengthCounter) ToProto() (*otg.PatternFlowArpHardwareLengthCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpHardwareLengthCounter) FromProto(msg *otg.PatternFlowArpHardwareLengthCounter) (PatternFlowArpHardwareLengthCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpHardwareLengthCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpHardwareLengthCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpHardwareLengthCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpHardwareLengthCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpHardwareLengthCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpHardwareLengthCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpHardwareLengthCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpHardwareLengthCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpHardwareLengthCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpHardwareLengthCounter) Clone() (PatternFlowArpHardwareLengthCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpHardwareLengthCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpHardwareLengthCounter is integer counter pattern +type PatternFlowArpHardwareLengthCounter interface { + Validation + // msg marshals PatternFlowArpHardwareLengthCounter to protobuf object *otg.PatternFlowArpHardwareLengthCounter + // and doesn't set defaults + msg() *otg.PatternFlowArpHardwareLengthCounter + // setMsg unmarshals PatternFlowArpHardwareLengthCounter from protobuf object *otg.PatternFlowArpHardwareLengthCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowArpHardwareLengthCounter) PatternFlowArpHardwareLengthCounter + // provides marshal interface + Marshal() marshalPatternFlowArpHardwareLengthCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpHardwareLengthCounter + // validate validates PatternFlowArpHardwareLengthCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpHardwareLengthCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowArpHardwareLengthCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowArpHardwareLengthCounter + SetStart(value uint32) PatternFlowArpHardwareLengthCounter + // HasStart checks if Start has been set in PatternFlowArpHardwareLengthCounter + HasStart() bool + // Step returns uint32, set in PatternFlowArpHardwareLengthCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowArpHardwareLengthCounter + SetStep(value uint32) PatternFlowArpHardwareLengthCounter + // HasStep checks if Step has been set in PatternFlowArpHardwareLengthCounter + HasStep() bool + // Count returns uint32, set in PatternFlowArpHardwareLengthCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowArpHardwareLengthCounter + SetCount(value uint32) PatternFlowArpHardwareLengthCounter + // HasCount checks if Count has been set in PatternFlowArpHardwareLengthCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowArpHardwareLengthCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowArpHardwareLengthCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowArpHardwareLengthCounter object +func (obj *patternFlowArpHardwareLengthCounter) SetStart(value uint32) PatternFlowArpHardwareLengthCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowArpHardwareLengthCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowArpHardwareLengthCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowArpHardwareLengthCounter object +func (obj *patternFlowArpHardwareLengthCounter) SetStep(value uint32) PatternFlowArpHardwareLengthCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpHardwareLengthCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpHardwareLengthCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowArpHardwareLengthCounter object +func (obj *patternFlowArpHardwareLengthCounter) SetCount(value uint32) PatternFlowArpHardwareLengthCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowArpHardwareLengthCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpHardwareLengthCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpHardwareLengthCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpHardwareLengthCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowArpHardwareLengthCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(6) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_arp_hardware_length_metric_tag.go b/gosnappi/pattern_flow_arp_hardware_length_metric_tag.go new file mode 100644 index 00000000..f521db42 --- /dev/null +++ b/gosnappi/pattern_flow_arp_hardware_length_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpHardwareLengthMetricTag ***** +type patternFlowArpHardwareLengthMetricTag struct { + validation + obj *otg.PatternFlowArpHardwareLengthMetricTag + marshaller marshalPatternFlowArpHardwareLengthMetricTag + unMarshaller unMarshalPatternFlowArpHardwareLengthMetricTag +} + +func NewPatternFlowArpHardwareLengthMetricTag() PatternFlowArpHardwareLengthMetricTag { + obj := patternFlowArpHardwareLengthMetricTag{obj: &otg.PatternFlowArpHardwareLengthMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpHardwareLengthMetricTag) msg() *otg.PatternFlowArpHardwareLengthMetricTag { + return obj.obj +} + +func (obj *patternFlowArpHardwareLengthMetricTag) setMsg(msg *otg.PatternFlowArpHardwareLengthMetricTag) PatternFlowArpHardwareLengthMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpHardwareLengthMetricTag struct { + obj *patternFlowArpHardwareLengthMetricTag +} + +type marshalPatternFlowArpHardwareLengthMetricTag interface { + // ToProto marshals PatternFlowArpHardwareLengthMetricTag to protobuf object *otg.PatternFlowArpHardwareLengthMetricTag + ToProto() (*otg.PatternFlowArpHardwareLengthMetricTag, error) + // ToPbText marshals PatternFlowArpHardwareLengthMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpHardwareLengthMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpHardwareLengthMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpHardwareLengthMetricTag struct { + obj *patternFlowArpHardwareLengthMetricTag +} + +type unMarshalPatternFlowArpHardwareLengthMetricTag interface { + // FromProto unmarshals PatternFlowArpHardwareLengthMetricTag from protobuf object *otg.PatternFlowArpHardwareLengthMetricTag + FromProto(msg *otg.PatternFlowArpHardwareLengthMetricTag) (PatternFlowArpHardwareLengthMetricTag, error) + // FromPbText unmarshals PatternFlowArpHardwareLengthMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpHardwareLengthMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpHardwareLengthMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpHardwareLengthMetricTag) Marshal() marshalPatternFlowArpHardwareLengthMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpHardwareLengthMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpHardwareLengthMetricTag) Unmarshal() unMarshalPatternFlowArpHardwareLengthMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpHardwareLengthMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpHardwareLengthMetricTag) ToProto() (*otg.PatternFlowArpHardwareLengthMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpHardwareLengthMetricTag) FromProto(msg *otg.PatternFlowArpHardwareLengthMetricTag) (PatternFlowArpHardwareLengthMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpHardwareLengthMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpHardwareLengthMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpHardwareLengthMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpHardwareLengthMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpHardwareLengthMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpHardwareLengthMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpHardwareLengthMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpHardwareLengthMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpHardwareLengthMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpHardwareLengthMetricTag) Clone() (PatternFlowArpHardwareLengthMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpHardwareLengthMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpHardwareLengthMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowArpHardwareLengthMetricTag interface { + Validation + // msg marshals PatternFlowArpHardwareLengthMetricTag to protobuf object *otg.PatternFlowArpHardwareLengthMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowArpHardwareLengthMetricTag + // setMsg unmarshals PatternFlowArpHardwareLengthMetricTag from protobuf object *otg.PatternFlowArpHardwareLengthMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowArpHardwareLengthMetricTag) PatternFlowArpHardwareLengthMetricTag + // provides marshal interface + Marshal() marshalPatternFlowArpHardwareLengthMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpHardwareLengthMetricTag + // validate validates PatternFlowArpHardwareLengthMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpHardwareLengthMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowArpHardwareLengthMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowArpHardwareLengthMetricTag + SetName(value string) PatternFlowArpHardwareLengthMetricTag + // Offset returns uint32, set in PatternFlowArpHardwareLengthMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowArpHardwareLengthMetricTag + SetOffset(value uint32) PatternFlowArpHardwareLengthMetricTag + // HasOffset checks if Offset has been set in PatternFlowArpHardwareLengthMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowArpHardwareLengthMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowArpHardwareLengthMetricTag + SetLength(value uint32) PatternFlowArpHardwareLengthMetricTag + // HasLength checks if Length has been set in PatternFlowArpHardwareLengthMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowArpHardwareLengthMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowArpHardwareLengthMetricTag object +func (obj *patternFlowArpHardwareLengthMetricTag) SetName(value string) PatternFlowArpHardwareLengthMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpHardwareLengthMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpHardwareLengthMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowArpHardwareLengthMetricTag object +func (obj *patternFlowArpHardwareLengthMetricTag) SetOffset(value uint32) PatternFlowArpHardwareLengthMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpHardwareLengthMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpHardwareLengthMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowArpHardwareLengthMetricTag object +func (obj *patternFlowArpHardwareLengthMetricTag) SetLength(value uint32) PatternFlowArpHardwareLengthMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowArpHardwareLengthMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowArpHardwareLengthMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpHardwareLengthMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowArpHardwareLengthMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowArpHardwareLengthMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_arp_hardware_type.go b/gosnappi/pattern_flow_arp_hardware_type.go new file mode 100644 index 00000000..39a525e7 --- /dev/null +++ b/gosnappi/pattern_flow_arp_hardware_type.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpHardwareType ***** +type patternFlowArpHardwareType struct { + validation + obj *otg.PatternFlowArpHardwareType + marshaller marshalPatternFlowArpHardwareType + unMarshaller unMarshalPatternFlowArpHardwareType + incrementHolder PatternFlowArpHardwareTypeCounter + decrementHolder PatternFlowArpHardwareTypeCounter + metricTagsHolder PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter +} + +func NewPatternFlowArpHardwareType() PatternFlowArpHardwareType { + obj := patternFlowArpHardwareType{obj: &otg.PatternFlowArpHardwareType{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpHardwareType) msg() *otg.PatternFlowArpHardwareType { + return obj.obj +} + +func (obj *patternFlowArpHardwareType) setMsg(msg *otg.PatternFlowArpHardwareType) PatternFlowArpHardwareType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpHardwareType struct { + obj *patternFlowArpHardwareType +} + +type marshalPatternFlowArpHardwareType interface { + // ToProto marshals PatternFlowArpHardwareType to protobuf object *otg.PatternFlowArpHardwareType + ToProto() (*otg.PatternFlowArpHardwareType, error) + // ToPbText marshals PatternFlowArpHardwareType to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpHardwareType to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpHardwareType to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpHardwareType struct { + obj *patternFlowArpHardwareType +} + +type unMarshalPatternFlowArpHardwareType interface { + // FromProto unmarshals PatternFlowArpHardwareType from protobuf object *otg.PatternFlowArpHardwareType + FromProto(msg *otg.PatternFlowArpHardwareType) (PatternFlowArpHardwareType, error) + // FromPbText unmarshals PatternFlowArpHardwareType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpHardwareType from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpHardwareType from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpHardwareType) Marshal() marshalPatternFlowArpHardwareType { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpHardwareType{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpHardwareType) Unmarshal() unMarshalPatternFlowArpHardwareType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpHardwareType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpHardwareType) ToProto() (*otg.PatternFlowArpHardwareType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpHardwareType) FromProto(msg *otg.PatternFlowArpHardwareType) (PatternFlowArpHardwareType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpHardwareType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpHardwareType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpHardwareType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpHardwareType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpHardwareType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpHardwareType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpHardwareType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpHardwareType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpHardwareType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpHardwareType) Clone() (PatternFlowArpHardwareType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpHardwareType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowArpHardwareType) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowArpHardwareType is network link protocol type +type PatternFlowArpHardwareType interface { + Validation + // msg marshals PatternFlowArpHardwareType to protobuf object *otg.PatternFlowArpHardwareType + // and doesn't set defaults + msg() *otg.PatternFlowArpHardwareType + // setMsg unmarshals PatternFlowArpHardwareType from protobuf object *otg.PatternFlowArpHardwareType + // and doesn't set defaults + setMsg(*otg.PatternFlowArpHardwareType) PatternFlowArpHardwareType + // provides marshal interface + Marshal() marshalPatternFlowArpHardwareType + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpHardwareType + // validate validates PatternFlowArpHardwareType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpHardwareType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowArpHardwareTypeChoiceEnum, set in PatternFlowArpHardwareType + Choice() PatternFlowArpHardwareTypeChoiceEnum + // setChoice assigns PatternFlowArpHardwareTypeChoiceEnum provided by user to PatternFlowArpHardwareType + setChoice(value PatternFlowArpHardwareTypeChoiceEnum) PatternFlowArpHardwareType + // HasChoice checks if Choice has been set in PatternFlowArpHardwareType + HasChoice() bool + // Value returns uint32, set in PatternFlowArpHardwareType. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowArpHardwareType + SetValue(value uint32) PatternFlowArpHardwareType + // HasValue checks if Value has been set in PatternFlowArpHardwareType + HasValue() bool + // Values returns []uint32, set in PatternFlowArpHardwareType. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowArpHardwareType + SetValues(value []uint32) PatternFlowArpHardwareType + // Increment returns PatternFlowArpHardwareTypeCounter, set in PatternFlowArpHardwareType. + // PatternFlowArpHardwareTypeCounter is integer counter pattern + Increment() PatternFlowArpHardwareTypeCounter + // SetIncrement assigns PatternFlowArpHardwareTypeCounter provided by user to PatternFlowArpHardwareType. + // PatternFlowArpHardwareTypeCounter is integer counter pattern + SetIncrement(value PatternFlowArpHardwareTypeCounter) PatternFlowArpHardwareType + // HasIncrement checks if Increment has been set in PatternFlowArpHardwareType + HasIncrement() bool + // Decrement returns PatternFlowArpHardwareTypeCounter, set in PatternFlowArpHardwareType. + // PatternFlowArpHardwareTypeCounter is integer counter pattern + Decrement() PatternFlowArpHardwareTypeCounter + // SetDecrement assigns PatternFlowArpHardwareTypeCounter provided by user to PatternFlowArpHardwareType. + // PatternFlowArpHardwareTypeCounter is integer counter pattern + SetDecrement(value PatternFlowArpHardwareTypeCounter) PatternFlowArpHardwareType + // HasDecrement checks if Decrement has been set in PatternFlowArpHardwareType + HasDecrement() bool + // MetricTags returns PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIterIter, set in PatternFlowArpHardwareType + MetricTags() PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter + setNil() +} + +type PatternFlowArpHardwareTypeChoiceEnum string + +// Enum of Choice on PatternFlowArpHardwareType +var PatternFlowArpHardwareTypeChoice = struct { + VALUE PatternFlowArpHardwareTypeChoiceEnum + VALUES PatternFlowArpHardwareTypeChoiceEnum + INCREMENT PatternFlowArpHardwareTypeChoiceEnum + DECREMENT PatternFlowArpHardwareTypeChoiceEnum +}{ + VALUE: PatternFlowArpHardwareTypeChoiceEnum("value"), + VALUES: PatternFlowArpHardwareTypeChoiceEnum("values"), + INCREMENT: PatternFlowArpHardwareTypeChoiceEnum("increment"), + DECREMENT: PatternFlowArpHardwareTypeChoiceEnum("decrement"), +} + +func (obj *patternFlowArpHardwareType) Choice() PatternFlowArpHardwareTypeChoiceEnum { + return PatternFlowArpHardwareTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowArpHardwareType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowArpHardwareType) setChoice(value PatternFlowArpHardwareTypeChoiceEnum) PatternFlowArpHardwareType { + intValue, ok := otg.PatternFlowArpHardwareType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowArpHardwareTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowArpHardwareType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowArpHardwareTypeChoice.VALUE { + defaultValue := uint32(1) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowArpHardwareTypeChoice.VALUES { + defaultValue := []uint32{1} + obj.obj.Values = defaultValue + } + + if value == PatternFlowArpHardwareTypeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowArpHardwareTypeCounter().msg() + } + + if value == PatternFlowArpHardwareTypeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowArpHardwareTypeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowArpHardwareType) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowArpHardwareTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowArpHardwareType) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowArpHardwareType object +func (obj *patternFlowArpHardwareType) SetValue(value uint32) PatternFlowArpHardwareType { + obj.setChoice(PatternFlowArpHardwareTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowArpHardwareType) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{1}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowArpHardwareType object +func (obj *patternFlowArpHardwareType) SetValues(value []uint32) PatternFlowArpHardwareType { + obj.setChoice(PatternFlowArpHardwareTypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowArpHardwareTypeCounter +func (obj *patternFlowArpHardwareType) Increment() PatternFlowArpHardwareTypeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowArpHardwareTypeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowArpHardwareTypeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowArpHardwareTypeCounter +func (obj *patternFlowArpHardwareType) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowArpHardwareTypeCounter value in the PatternFlowArpHardwareType object +func (obj *patternFlowArpHardwareType) SetIncrement(value PatternFlowArpHardwareTypeCounter) PatternFlowArpHardwareType { + obj.setChoice(PatternFlowArpHardwareTypeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowArpHardwareTypeCounter +func (obj *patternFlowArpHardwareType) Decrement() PatternFlowArpHardwareTypeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowArpHardwareTypeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowArpHardwareTypeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowArpHardwareTypeCounter +func (obj *patternFlowArpHardwareType) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowArpHardwareTypeCounter value in the PatternFlowArpHardwareType object +func (obj *patternFlowArpHardwareType) SetDecrement(value PatternFlowArpHardwareTypeCounter) PatternFlowArpHardwareType { + obj.setChoice(PatternFlowArpHardwareTypeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowArpHardwareTypeMetricTag +func (obj *patternFlowArpHardwareType) MetricTags() PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowArpHardwareTypeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter struct { + obj *patternFlowArpHardwareType + patternFlowArpHardwareTypeMetricTagSlice []PatternFlowArpHardwareTypeMetricTag + fieldPtr *[]*otg.PatternFlowArpHardwareTypeMetricTag +} + +func newPatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter(ptr *[]*otg.PatternFlowArpHardwareTypeMetricTag) PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter { + return &patternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter interface { + setMsg(*patternFlowArpHardwareType) PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter + Items() []PatternFlowArpHardwareTypeMetricTag + Add() PatternFlowArpHardwareTypeMetricTag + Append(items ...PatternFlowArpHardwareTypeMetricTag) PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter + Set(index int, newObj PatternFlowArpHardwareTypeMetricTag) PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter + Clear() PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter + clearHolderSlice() PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter + appendHolderSlice(item PatternFlowArpHardwareTypeMetricTag) PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter +} + +func (obj *patternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter) setMsg(msg *patternFlowArpHardwareType) PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowArpHardwareTypeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter) Items() []PatternFlowArpHardwareTypeMetricTag { + return obj.patternFlowArpHardwareTypeMetricTagSlice +} + +func (obj *patternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter) Add() PatternFlowArpHardwareTypeMetricTag { + newObj := &otg.PatternFlowArpHardwareTypeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowArpHardwareTypeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowArpHardwareTypeMetricTagSlice = append(obj.patternFlowArpHardwareTypeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter) Append(items ...PatternFlowArpHardwareTypeMetricTag) PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowArpHardwareTypeMetricTagSlice = append(obj.patternFlowArpHardwareTypeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter) Set(index int, newObj PatternFlowArpHardwareTypeMetricTag) PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowArpHardwareTypeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter) Clear() PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowArpHardwareTypeMetricTag{} + obj.patternFlowArpHardwareTypeMetricTagSlice = []PatternFlowArpHardwareTypeMetricTag{} + } + return obj +} +func (obj *patternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter) clearHolderSlice() PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter { + if len(obj.patternFlowArpHardwareTypeMetricTagSlice) > 0 { + obj.patternFlowArpHardwareTypeMetricTagSlice = []PatternFlowArpHardwareTypeMetricTag{} + } + return obj +} +func (obj *patternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter) appendHolderSlice(item PatternFlowArpHardwareTypeMetricTag) PatternFlowArpHardwareTypePatternFlowArpHardwareTypeMetricTagIter { + obj.patternFlowArpHardwareTypeMetricTagSlice = append(obj.patternFlowArpHardwareTypeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowArpHardwareType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpHardwareType.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowArpHardwareType.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowArpHardwareTypeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowArpHardwareType) setDefault() { + var choices_set int = 0 + var choice PatternFlowArpHardwareTypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowArpHardwareTypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowArpHardwareTypeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowArpHardwareTypeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowArpHardwareTypeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowArpHardwareTypeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowArpHardwareType") + } + } else { + intVal := otg.PatternFlowArpHardwareType_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowArpHardwareType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_arp_hardware_type_counter.go b/gosnappi/pattern_flow_arp_hardware_type_counter.go new file mode 100644 index 00000000..d42aed19 --- /dev/null +++ b/gosnappi/pattern_flow_arp_hardware_type_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpHardwareTypeCounter ***** +type patternFlowArpHardwareTypeCounter struct { + validation + obj *otg.PatternFlowArpHardwareTypeCounter + marshaller marshalPatternFlowArpHardwareTypeCounter + unMarshaller unMarshalPatternFlowArpHardwareTypeCounter +} + +func NewPatternFlowArpHardwareTypeCounter() PatternFlowArpHardwareTypeCounter { + obj := patternFlowArpHardwareTypeCounter{obj: &otg.PatternFlowArpHardwareTypeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpHardwareTypeCounter) msg() *otg.PatternFlowArpHardwareTypeCounter { + return obj.obj +} + +func (obj *patternFlowArpHardwareTypeCounter) setMsg(msg *otg.PatternFlowArpHardwareTypeCounter) PatternFlowArpHardwareTypeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpHardwareTypeCounter struct { + obj *patternFlowArpHardwareTypeCounter +} + +type marshalPatternFlowArpHardwareTypeCounter interface { + // ToProto marshals PatternFlowArpHardwareTypeCounter to protobuf object *otg.PatternFlowArpHardwareTypeCounter + ToProto() (*otg.PatternFlowArpHardwareTypeCounter, error) + // ToPbText marshals PatternFlowArpHardwareTypeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpHardwareTypeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpHardwareTypeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpHardwareTypeCounter struct { + obj *patternFlowArpHardwareTypeCounter +} + +type unMarshalPatternFlowArpHardwareTypeCounter interface { + // FromProto unmarshals PatternFlowArpHardwareTypeCounter from protobuf object *otg.PatternFlowArpHardwareTypeCounter + FromProto(msg *otg.PatternFlowArpHardwareTypeCounter) (PatternFlowArpHardwareTypeCounter, error) + // FromPbText unmarshals PatternFlowArpHardwareTypeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpHardwareTypeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpHardwareTypeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpHardwareTypeCounter) Marshal() marshalPatternFlowArpHardwareTypeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpHardwareTypeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpHardwareTypeCounter) Unmarshal() unMarshalPatternFlowArpHardwareTypeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpHardwareTypeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpHardwareTypeCounter) ToProto() (*otg.PatternFlowArpHardwareTypeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpHardwareTypeCounter) FromProto(msg *otg.PatternFlowArpHardwareTypeCounter) (PatternFlowArpHardwareTypeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpHardwareTypeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpHardwareTypeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpHardwareTypeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpHardwareTypeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpHardwareTypeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpHardwareTypeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpHardwareTypeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpHardwareTypeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpHardwareTypeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpHardwareTypeCounter) Clone() (PatternFlowArpHardwareTypeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpHardwareTypeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpHardwareTypeCounter is integer counter pattern +type PatternFlowArpHardwareTypeCounter interface { + Validation + // msg marshals PatternFlowArpHardwareTypeCounter to protobuf object *otg.PatternFlowArpHardwareTypeCounter + // and doesn't set defaults + msg() *otg.PatternFlowArpHardwareTypeCounter + // setMsg unmarshals PatternFlowArpHardwareTypeCounter from protobuf object *otg.PatternFlowArpHardwareTypeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowArpHardwareTypeCounter) PatternFlowArpHardwareTypeCounter + // provides marshal interface + Marshal() marshalPatternFlowArpHardwareTypeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpHardwareTypeCounter + // validate validates PatternFlowArpHardwareTypeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpHardwareTypeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowArpHardwareTypeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowArpHardwareTypeCounter + SetStart(value uint32) PatternFlowArpHardwareTypeCounter + // HasStart checks if Start has been set in PatternFlowArpHardwareTypeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowArpHardwareTypeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowArpHardwareTypeCounter + SetStep(value uint32) PatternFlowArpHardwareTypeCounter + // HasStep checks if Step has been set in PatternFlowArpHardwareTypeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowArpHardwareTypeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowArpHardwareTypeCounter + SetCount(value uint32) PatternFlowArpHardwareTypeCounter + // HasCount checks if Count has been set in PatternFlowArpHardwareTypeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowArpHardwareTypeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowArpHardwareTypeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowArpHardwareTypeCounter object +func (obj *patternFlowArpHardwareTypeCounter) SetStart(value uint32) PatternFlowArpHardwareTypeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowArpHardwareTypeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowArpHardwareTypeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowArpHardwareTypeCounter object +func (obj *patternFlowArpHardwareTypeCounter) SetStep(value uint32) PatternFlowArpHardwareTypeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpHardwareTypeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpHardwareTypeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowArpHardwareTypeCounter object +func (obj *patternFlowArpHardwareTypeCounter) SetCount(value uint32) PatternFlowArpHardwareTypeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowArpHardwareTypeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpHardwareTypeCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpHardwareTypeCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpHardwareTypeCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowArpHardwareTypeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_arp_hardware_type_metric_tag.go b/gosnappi/pattern_flow_arp_hardware_type_metric_tag.go new file mode 100644 index 00000000..7b42a8d1 --- /dev/null +++ b/gosnappi/pattern_flow_arp_hardware_type_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpHardwareTypeMetricTag ***** +type patternFlowArpHardwareTypeMetricTag struct { + validation + obj *otg.PatternFlowArpHardwareTypeMetricTag + marshaller marshalPatternFlowArpHardwareTypeMetricTag + unMarshaller unMarshalPatternFlowArpHardwareTypeMetricTag +} + +func NewPatternFlowArpHardwareTypeMetricTag() PatternFlowArpHardwareTypeMetricTag { + obj := patternFlowArpHardwareTypeMetricTag{obj: &otg.PatternFlowArpHardwareTypeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpHardwareTypeMetricTag) msg() *otg.PatternFlowArpHardwareTypeMetricTag { + return obj.obj +} + +func (obj *patternFlowArpHardwareTypeMetricTag) setMsg(msg *otg.PatternFlowArpHardwareTypeMetricTag) PatternFlowArpHardwareTypeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpHardwareTypeMetricTag struct { + obj *patternFlowArpHardwareTypeMetricTag +} + +type marshalPatternFlowArpHardwareTypeMetricTag interface { + // ToProto marshals PatternFlowArpHardwareTypeMetricTag to protobuf object *otg.PatternFlowArpHardwareTypeMetricTag + ToProto() (*otg.PatternFlowArpHardwareTypeMetricTag, error) + // ToPbText marshals PatternFlowArpHardwareTypeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpHardwareTypeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpHardwareTypeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpHardwareTypeMetricTag struct { + obj *patternFlowArpHardwareTypeMetricTag +} + +type unMarshalPatternFlowArpHardwareTypeMetricTag interface { + // FromProto unmarshals PatternFlowArpHardwareTypeMetricTag from protobuf object *otg.PatternFlowArpHardwareTypeMetricTag + FromProto(msg *otg.PatternFlowArpHardwareTypeMetricTag) (PatternFlowArpHardwareTypeMetricTag, error) + // FromPbText unmarshals PatternFlowArpHardwareTypeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpHardwareTypeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpHardwareTypeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpHardwareTypeMetricTag) Marshal() marshalPatternFlowArpHardwareTypeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpHardwareTypeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpHardwareTypeMetricTag) Unmarshal() unMarshalPatternFlowArpHardwareTypeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpHardwareTypeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpHardwareTypeMetricTag) ToProto() (*otg.PatternFlowArpHardwareTypeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpHardwareTypeMetricTag) FromProto(msg *otg.PatternFlowArpHardwareTypeMetricTag) (PatternFlowArpHardwareTypeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpHardwareTypeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpHardwareTypeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpHardwareTypeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpHardwareTypeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpHardwareTypeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpHardwareTypeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpHardwareTypeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpHardwareTypeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpHardwareTypeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpHardwareTypeMetricTag) Clone() (PatternFlowArpHardwareTypeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpHardwareTypeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpHardwareTypeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowArpHardwareTypeMetricTag interface { + Validation + // msg marshals PatternFlowArpHardwareTypeMetricTag to protobuf object *otg.PatternFlowArpHardwareTypeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowArpHardwareTypeMetricTag + // setMsg unmarshals PatternFlowArpHardwareTypeMetricTag from protobuf object *otg.PatternFlowArpHardwareTypeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowArpHardwareTypeMetricTag) PatternFlowArpHardwareTypeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowArpHardwareTypeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpHardwareTypeMetricTag + // validate validates PatternFlowArpHardwareTypeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpHardwareTypeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowArpHardwareTypeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowArpHardwareTypeMetricTag + SetName(value string) PatternFlowArpHardwareTypeMetricTag + // Offset returns uint32, set in PatternFlowArpHardwareTypeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowArpHardwareTypeMetricTag + SetOffset(value uint32) PatternFlowArpHardwareTypeMetricTag + // HasOffset checks if Offset has been set in PatternFlowArpHardwareTypeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowArpHardwareTypeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowArpHardwareTypeMetricTag + SetLength(value uint32) PatternFlowArpHardwareTypeMetricTag + // HasLength checks if Length has been set in PatternFlowArpHardwareTypeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowArpHardwareTypeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowArpHardwareTypeMetricTag object +func (obj *patternFlowArpHardwareTypeMetricTag) SetName(value string) PatternFlowArpHardwareTypeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpHardwareTypeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpHardwareTypeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowArpHardwareTypeMetricTag object +func (obj *patternFlowArpHardwareTypeMetricTag) SetOffset(value uint32) PatternFlowArpHardwareTypeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpHardwareTypeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpHardwareTypeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowArpHardwareTypeMetricTag object +func (obj *patternFlowArpHardwareTypeMetricTag) SetLength(value uint32) PatternFlowArpHardwareTypeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowArpHardwareTypeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowArpHardwareTypeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpHardwareTypeMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowArpHardwareTypeMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowArpHardwareTypeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_arp_operation.go b/gosnappi/pattern_flow_arp_operation.go new file mode 100644 index 00000000..ae1ff2de --- /dev/null +++ b/gosnappi/pattern_flow_arp_operation.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpOperation ***** +type patternFlowArpOperation struct { + validation + obj *otg.PatternFlowArpOperation + marshaller marshalPatternFlowArpOperation + unMarshaller unMarshalPatternFlowArpOperation + incrementHolder PatternFlowArpOperationCounter + decrementHolder PatternFlowArpOperationCounter + metricTagsHolder PatternFlowArpOperationPatternFlowArpOperationMetricTagIter +} + +func NewPatternFlowArpOperation() PatternFlowArpOperation { + obj := patternFlowArpOperation{obj: &otg.PatternFlowArpOperation{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpOperation) msg() *otg.PatternFlowArpOperation { + return obj.obj +} + +func (obj *patternFlowArpOperation) setMsg(msg *otg.PatternFlowArpOperation) PatternFlowArpOperation { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpOperation struct { + obj *patternFlowArpOperation +} + +type marshalPatternFlowArpOperation interface { + // ToProto marshals PatternFlowArpOperation to protobuf object *otg.PatternFlowArpOperation + ToProto() (*otg.PatternFlowArpOperation, error) + // ToPbText marshals PatternFlowArpOperation to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpOperation to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpOperation to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpOperation struct { + obj *patternFlowArpOperation +} + +type unMarshalPatternFlowArpOperation interface { + // FromProto unmarshals PatternFlowArpOperation from protobuf object *otg.PatternFlowArpOperation + FromProto(msg *otg.PatternFlowArpOperation) (PatternFlowArpOperation, error) + // FromPbText unmarshals PatternFlowArpOperation from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpOperation from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpOperation from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpOperation) Marshal() marshalPatternFlowArpOperation { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpOperation{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpOperation) Unmarshal() unMarshalPatternFlowArpOperation { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpOperation{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpOperation) ToProto() (*otg.PatternFlowArpOperation, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpOperation) FromProto(msg *otg.PatternFlowArpOperation) (PatternFlowArpOperation, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpOperation) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpOperation) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpOperation) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpOperation) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpOperation) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpOperation) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpOperation) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpOperation) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpOperation) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpOperation) Clone() (PatternFlowArpOperation, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpOperation() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowArpOperation) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowArpOperation is the operation that the sender is performing +type PatternFlowArpOperation interface { + Validation + // msg marshals PatternFlowArpOperation to protobuf object *otg.PatternFlowArpOperation + // and doesn't set defaults + msg() *otg.PatternFlowArpOperation + // setMsg unmarshals PatternFlowArpOperation from protobuf object *otg.PatternFlowArpOperation + // and doesn't set defaults + setMsg(*otg.PatternFlowArpOperation) PatternFlowArpOperation + // provides marshal interface + Marshal() marshalPatternFlowArpOperation + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpOperation + // validate validates PatternFlowArpOperation + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpOperation, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowArpOperationChoiceEnum, set in PatternFlowArpOperation + Choice() PatternFlowArpOperationChoiceEnum + // setChoice assigns PatternFlowArpOperationChoiceEnum provided by user to PatternFlowArpOperation + setChoice(value PatternFlowArpOperationChoiceEnum) PatternFlowArpOperation + // HasChoice checks if Choice has been set in PatternFlowArpOperation + HasChoice() bool + // Value returns uint32, set in PatternFlowArpOperation. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowArpOperation + SetValue(value uint32) PatternFlowArpOperation + // HasValue checks if Value has been set in PatternFlowArpOperation + HasValue() bool + // Values returns []uint32, set in PatternFlowArpOperation. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowArpOperation + SetValues(value []uint32) PatternFlowArpOperation + // Increment returns PatternFlowArpOperationCounter, set in PatternFlowArpOperation. + // PatternFlowArpOperationCounter is integer counter pattern + Increment() PatternFlowArpOperationCounter + // SetIncrement assigns PatternFlowArpOperationCounter provided by user to PatternFlowArpOperation. + // PatternFlowArpOperationCounter is integer counter pattern + SetIncrement(value PatternFlowArpOperationCounter) PatternFlowArpOperation + // HasIncrement checks if Increment has been set in PatternFlowArpOperation + HasIncrement() bool + // Decrement returns PatternFlowArpOperationCounter, set in PatternFlowArpOperation. + // PatternFlowArpOperationCounter is integer counter pattern + Decrement() PatternFlowArpOperationCounter + // SetDecrement assigns PatternFlowArpOperationCounter provided by user to PatternFlowArpOperation. + // PatternFlowArpOperationCounter is integer counter pattern + SetDecrement(value PatternFlowArpOperationCounter) PatternFlowArpOperation + // HasDecrement checks if Decrement has been set in PatternFlowArpOperation + HasDecrement() bool + // MetricTags returns PatternFlowArpOperationPatternFlowArpOperationMetricTagIterIter, set in PatternFlowArpOperation + MetricTags() PatternFlowArpOperationPatternFlowArpOperationMetricTagIter + setNil() +} + +type PatternFlowArpOperationChoiceEnum string + +// Enum of Choice on PatternFlowArpOperation +var PatternFlowArpOperationChoice = struct { + VALUE PatternFlowArpOperationChoiceEnum + VALUES PatternFlowArpOperationChoiceEnum + INCREMENT PatternFlowArpOperationChoiceEnum + DECREMENT PatternFlowArpOperationChoiceEnum +}{ + VALUE: PatternFlowArpOperationChoiceEnum("value"), + VALUES: PatternFlowArpOperationChoiceEnum("values"), + INCREMENT: PatternFlowArpOperationChoiceEnum("increment"), + DECREMENT: PatternFlowArpOperationChoiceEnum("decrement"), +} + +func (obj *patternFlowArpOperation) Choice() PatternFlowArpOperationChoiceEnum { + return PatternFlowArpOperationChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowArpOperation) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowArpOperation) setChoice(value PatternFlowArpOperationChoiceEnum) PatternFlowArpOperation { + intValue, ok := otg.PatternFlowArpOperation_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowArpOperationChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowArpOperation_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowArpOperationChoice.VALUE { + defaultValue := uint32(1) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowArpOperationChoice.VALUES { + defaultValue := []uint32{1} + obj.obj.Values = defaultValue + } + + if value == PatternFlowArpOperationChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowArpOperationCounter().msg() + } + + if value == PatternFlowArpOperationChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowArpOperationCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowArpOperation) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowArpOperationChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowArpOperation) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowArpOperation object +func (obj *patternFlowArpOperation) SetValue(value uint32) PatternFlowArpOperation { + obj.setChoice(PatternFlowArpOperationChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowArpOperation) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{1}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowArpOperation object +func (obj *patternFlowArpOperation) SetValues(value []uint32) PatternFlowArpOperation { + obj.setChoice(PatternFlowArpOperationChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowArpOperationCounter +func (obj *patternFlowArpOperation) Increment() PatternFlowArpOperationCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowArpOperationChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowArpOperationCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowArpOperationCounter +func (obj *patternFlowArpOperation) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowArpOperationCounter value in the PatternFlowArpOperation object +func (obj *patternFlowArpOperation) SetIncrement(value PatternFlowArpOperationCounter) PatternFlowArpOperation { + obj.setChoice(PatternFlowArpOperationChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowArpOperationCounter +func (obj *patternFlowArpOperation) Decrement() PatternFlowArpOperationCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowArpOperationChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowArpOperationCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowArpOperationCounter +func (obj *patternFlowArpOperation) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowArpOperationCounter value in the PatternFlowArpOperation object +func (obj *patternFlowArpOperation) SetDecrement(value PatternFlowArpOperationCounter) PatternFlowArpOperation { + obj.setChoice(PatternFlowArpOperationChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowArpOperationMetricTag +func (obj *patternFlowArpOperation) MetricTags() PatternFlowArpOperationPatternFlowArpOperationMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowArpOperationMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowArpOperationPatternFlowArpOperationMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowArpOperationPatternFlowArpOperationMetricTagIter struct { + obj *patternFlowArpOperation + patternFlowArpOperationMetricTagSlice []PatternFlowArpOperationMetricTag + fieldPtr *[]*otg.PatternFlowArpOperationMetricTag +} + +func newPatternFlowArpOperationPatternFlowArpOperationMetricTagIter(ptr *[]*otg.PatternFlowArpOperationMetricTag) PatternFlowArpOperationPatternFlowArpOperationMetricTagIter { + return &patternFlowArpOperationPatternFlowArpOperationMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowArpOperationPatternFlowArpOperationMetricTagIter interface { + setMsg(*patternFlowArpOperation) PatternFlowArpOperationPatternFlowArpOperationMetricTagIter + Items() []PatternFlowArpOperationMetricTag + Add() PatternFlowArpOperationMetricTag + Append(items ...PatternFlowArpOperationMetricTag) PatternFlowArpOperationPatternFlowArpOperationMetricTagIter + Set(index int, newObj PatternFlowArpOperationMetricTag) PatternFlowArpOperationPatternFlowArpOperationMetricTagIter + Clear() PatternFlowArpOperationPatternFlowArpOperationMetricTagIter + clearHolderSlice() PatternFlowArpOperationPatternFlowArpOperationMetricTagIter + appendHolderSlice(item PatternFlowArpOperationMetricTag) PatternFlowArpOperationPatternFlowArpOperationMetricTagIter +} + +func (obj *patternFlowArpOperationPatternFlowArpOperationMetricTagIter) setMsg(msg *patternFlowArpOperation) PatternFlowArpOperationPatternFlowArpOperationMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowArpOperationMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowArpOperationPatternFlowArpOperationMetricTagIter) Items() []PatternFlowArpOperationMetricTag { + return obj.patternFlowArpOperationMetricTagSlice +} + +func (obj *patternFlowArpOperationPatternFlowArpOperationMetricTagIter) Add() PatternFlowArpOperationMetricTag { + newObj := &otg.PatternFlowArpOperationMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowArpOperationMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowArpOperationMetricTagSlice = append(obj.patternFlowArpOperationMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowArpOperationPatternFlowArpOperationMetricTagIter) Append(items ...PatternFlowArpOperationMetricTag) PatternFlowArpOperationPatternFlowArpOperationMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowArpOperationMetricTagSlice = append(obj.patternFlowArpOperationMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowArpOperationPatternFlowArpOperationMetricTagIter) Set(index int, newObj PatternFlowArpOperationMetricTag) PatternFlowArpOperationPatternFlowArpOperationMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowArpOperationMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowArpOperationPatternFlowArpOperationMetricTagIter) Clear() PatternFlowArpOperationPatternFlowArpOperationMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowArpOperationMetricTag{} + obj.patternFlowArpOperationMetricTagSlice = []PatternFlowArpOperationMetricTag{} + } + return obj +} +func (obj *patternFlowArpOperationPatternFlowArpOperationMetricTagIter) clearHolderSlice() PatternFlowArpOperationPatternFlowArpOperationMetricTagIter { + if len(obj.patternFlowArpOperationMetricTagSlice) > 0 { + obj.patternFlowArpOperationMetricTagSlice = []PatternFlowArpOperationMetricTag{} + } + return obj +} +func (obj *patternFlowArpOperationPatternFlowArpOperationMetricTagIter) appendHolderSlice(item PatternFlowArpOperationMetricTag) PatternFlowArpOperationPatternFlowArpOperationMetricTagIter { + obj.patternFlowArpOperationMetricTagSlice = append(obj.patternFlowArpOperationMetricTagSlice, item) + return obj +} + +func (obj *patternFlowArpOperation) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpOperation.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowArpOperation.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowArpOperationMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowArpOperation) setDefault() { + var choices_set int = 0 + var choice PatternFlowArpOperationChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowArpOperationChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowArpOperationChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowArpOperationChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowArpOperationChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowArpOperationChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowArpOperation") + } + } else { + intVal := otg.PatternFlowArpOperation_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowArpOperation_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_arp_operation_counter.go b/gosnappi/pattern_flow_arp_operation_counter.go new file mode 100644 index 00000000..67320942 --- /dev/null +++ b/gosnappi/pattern_flow_arp_operation_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpOperationCounter ***** +type patternFlowArpOperationCounter struct { + validation + obj *otg.PatternFlowArpOperationCounter + marshaller marshalPatternFlowArpOperationCounter + unMarshaller unMarshalPatternFlowArpOperationCounter +} + +func NewPatternFlowArpOperationCounter() PatternFlowArpOperationCounter { + obj := patternFlowArpOperationCounter{obj: &otg.PatternFlowArpOperationCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpOperationCounter) msg() *otg.PatternFlowArpOperationCounter { + return obj.obj +} + +func (obj *patternFlowArpOperationCounter) setMsg(msg *otg.PatternFlowArpOperationCounter) PatternFlowArpOperationCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpOperationCounter struct { + obj *patternFlowArpOperationCounter +} + +type marshalPatternFlowArpOperationCounter interface { + // ToProto marshals PatternFlowArpOperationCounter to protobuf object *otg.PatternFlowArpOperationCounter + ToProto() (*otg.PatternFlowArpOperationCounter, error) + // ToPbText marshals PatternFlowArpOperationCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpOperationCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpOperationCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpOperationCounter struct { + obj *patternFlowArpOperationCounter +} + +type unMarshalPatternFlowArpOperationCounter interface { + // FromProto unmarshals PatternFlowArpOperationCounter from protobuf object *otg.PatternFlowArpOperationCounter + FromProto(msg *otg.PatternFlowArpOperationCounter) (PatternFlowArpOperationCounter, error) + // FromPbText unmarshals PatternFlowArpOperationCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpOperationCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpOperationCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpOperationCounter) Marshal() marshalPatternFlowArpOperationCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpOperationCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpOperationCounter) Unmarshal() unMarshalPatternFlowArpOperationCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpOperationCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpOperationCounter) ToProto() (*otg.PatternFlowArpOperationCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpOperationCounter) FromProto(msg *otg.PatternFlowArpOperationCounter) (PatternFlowArpOperationCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpOperationCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpOperationCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpOperationCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpOperationCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpOperationCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpOperationCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpOperationCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpOperationCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpOperationCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpOperationCounter) Clone() (PatternFlowArpOperationCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpOperationCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpOperationCounter is integer counter pattern +type PatternFlowArpOperationCounter interface { + Validation + // msg marshals PatternFlowArpOperationCounter to protobuf object *otg.PatternFlowArpOperationCounter + // and doesn't set defaults + msg() *otg.PatternFlowArpOperationCounter + // setMsg unmarshals PatternFlowArpOperationCounter from protobuf object *otg.PatternFlowArpOperationCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowArpOperationCounter) PatternFlowArpOperationCounter + // provides marshal interface + Marshal() marshalPatternFlowArpOperationCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpOperationCounter + // validate validates PatternFlowArpOperationCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpOperationCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowArpOperationCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowArpOperationCounter + SetStart(value uint32) PatternFlowArpOperationCounter + // HasStart checks if Start has been set in PatternFlowArpOperationCounter + HasStart() bool + // Step returns uint32, set in PatternFlowArpOperationCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowArpOperationCounter + SetStep(value uint32) PatternFlowArpOperationCounter + // HasStep checks if Step has been set in PatternFlowArpOperationCounter + HasStep() bool + // Count returns uint32, set in PatternFlowArpOperationCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowArpOperationCounter + SetCount(value uint32) PatternFlowArpOperationCounter + // HasCount checks if Count has been set in PatternFlowArpOperationCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowArpOperationCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowArpOperationCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowArpOperationCounter object +func (obj *patternFlowArpOperationCounter) SetStart(value uint32) PatternFlowArpOperationCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowArpOperationCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowArpOperationCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowArpOperationCounter object +func (obj *patternFlowArpOperationCounter) SetStep(value uint32) PatternFlowArpOperationCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpOperationCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpOperationCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowArpOperationCounter object +func (obj *patternFlowArpOperationCounter) SetCount(value uint32) PatternFlowArpOperationCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowArpOperationCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpOperationCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpOperationCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpOperationCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowArpOperationCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_arp_operation_metric_tag.go b/gosnappi/pattern_flow_arp_operation_metric_tag.go new file mode 100644 index 00000000..6eb19333 --- /dev/null +++ b/gosnappi/pattern_flow_arp_operation_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpOperationMetricTag ***** +type patternFlowArpOperationMetricTag struct { + validation + obj *otg.PatternFlowArpOperationMetricTag + marshaller marshalPatternFlowArpOperationMetricTag + unMarshaller unMarshalPatternFlowArpOperationMetricTag +} + +func NewPatternFlowArpOperationMetricTag() PatternFlowArpOperationMetricTag { + obj := patternFlowArpOperationMetricTag{obj: &otg.PatternFlowArpOperationMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpOperationMetricTag) msg() *otg.PatternFlowArpOperationMetricTag { + return obj.obj +} + +func (obj *patternFlowArpOperationMetricTag) setMsg(msg *otg.PatternFlowArpOperationMetricTag) PatternFlowArpOperationMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpOperationMetricTag struct { + obj *patternFlowArpOperationMetricTag +} + +type marshalPatternFlowArpOperationMetricTag interface { + // ToProto marshals PatternFlowArpOperationMetricTag to protobuf object *otg.PatternFlowArpOperationMetricTag + ToProto() (*otg.PatternFlowArpOperationMetricTag, error) + // ToPbText marshals PatternFlowArpOperationMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpOperationMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpOperationMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpOperationMetricTag struct { + obj *patternFlowArpOperationMetricTag +} + +type unMarshalPatternFlowArpOperationMetricTag interface { + // FromProto unmarshals PatternFlowArpOperationMetricTag from protobuf object *otg.PatternFlowArpOperationMetricTag + FromProto(msg *otg.PatternFlowArpOperationMetricTag) (PatternFlowArpOperationMetricTag, error) + // FromPbText unmarshals PatternFlowArpOperationMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpOperationMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpOperationMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpOperationMetricTag) Marshal() marshalPatternFlowArpOperationMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpOperationMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpOperationMetricTag) Unmarshal() unMarshalPatternFlowArpOperationMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpOperationMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpOperationMetricTag) ToProto() (*otg.PatternFlowArpOperationMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpOperationMetricTag) FromProto(msg *otg.PatternFlowArpOperationMetricTag) (PatternFlowArpOperationMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpOperationMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpOperationMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpOperationMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpOperationMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpOperationMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpOperationMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpOperationMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpOperationMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpOperationMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpOperationMetricTag) Clone() (PatternFlowArpOperationMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpOperationMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpOperationMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowArpOperationMetricTag interface { + Validation + // msg marshals PatternFlowArpOperationMetricTag to protobuf object *otg.PatternFlowArpOperationMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowArpOperationMetricTag + // setMsg unmarshals PatternFlowArpOperationMetricTag from protobuf object *otg.PatternFlowArpOperationMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowArpOperationMetricTag) PatternFlowArpOperationMetricTag + // provides marshal interface + Marshal() marshalPatternFlowArpOperationMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpOperationMetricTag + // validate validates PatternFlowArpOperationMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpOperationMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowArpOperationMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowArpOperationMetricTag + SetName(value string) PatternFlowArpOperationMetricTag + // Offset returns uint32, set in PatternFlowArpOperationMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowArpOperationMetricTag + SetOffset(value uint32) PatternFlowArpOperationMetricTag + // HasOffset checks if Offset has been set in PatternFlowArpOperationMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowArpOperationMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowArpOperationMetricTag + SetLength(value uint32) PatternFlowArpOperationMetricTag + // HasLength checks if Length has been set in PatternFlowArpOperationMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowArpOperationMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowArpOperationMetricTag object +func (obj *patternFlowArpOperationMetricTag) SetName(value string) PatternFlowArpOperationMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpOperationMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpOperationMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowArpOperationMetricTag object +func (obj *patternFlowArpOperationMetricTag) SetOffset(value uint32) PatternFlowArpOperationMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpOperationMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpOperationMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowArpOperationMetricTag object +func (obj *patternFlowArpOperationMetricTag) SetLength(value uint32) PatternFlowArpOperationMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowArpOperationMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowArpOperationMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpOperationMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowArpOperationMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowArpOperationMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_arp_protocol_length.go b/gosnappi/pattern_flow_arp_protocol_length.go new file mode 100644 index 00000000..d7a2c832 --- /dev/null +++ b/gosnappi/pattern_flow_arp_protocol_length.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpProtocolLength ***** +type patternFlowArpProtocolLength struct { + validation + obj *otg.PatternFlowArpProtocolLength + marshaller marshalPatternFlowArpProtocolLength + unMarshaller unMarshalPatternFlowArpProtocolLength + incrementHolder PatternFlowArpProtocolLengthCounter + decrementHolder PatternFlowArpProtocolLengthCounter + metricTagsHolder PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter +} + +func NewPatternFlowArpProtocolLength() PatternFlowArpProtocolLength { + obj := patternFlowArpProtocolLength{obj: &otg.PatternFlowArpProtocolLength{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpProtocolLength) msg() *otg.PatternFlowArpProtocolLength { + return obj.obj +} + +func (obj *patternFlowArpProtocolLength) setMsg(msg *otg.PatternFlowArpProtocolLength) PatternFlowArpProtocolLength { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpProtocolLength struct { + obj *patternFlowArpProtocolLength +} + +type marshalPatternFlowArpProtocolLength interface { + // ToProto marshals PatternFlowArpProtocolLength to protobuf object *otg.PatternFlowArpProtocolLength + ToProto() (*otg.PatternFlowArpProtocolLength, error) + // ToPbText marshals PatternFlowArpProtocolLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpProtocolLength to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpProtocolLength to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpProtocolLength struct { + obj *patternFlowArpProtocolLength +} + +type unMarshalPatternFlowArpProtocolLength interface { + // FromProto unmarshals PatternFlowArpProtocolLength from protobuf object *otg.PatternFlowArpProtocolLength + FromProto(msg *otg.PatternFlowArpProtocolLength) (PatternFlowArpProtocolLength, error) + // FromPbText unmarshals PatternFlowArpProtocolLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpProtocolLength from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpProtocolLength from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpProtocolLength) Marshal() marshalPatternFlowArpProtocolLength { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpProtocolLength{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpProtocolLength) Unmarshal() unMarshalPatternFlowArpProtocolLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpProtocolLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpProtocolLength) ToProto() (*otg.PatternFlowArpProtocolLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpProtocolLength) FromProto(msg *otg.PatternFlowArpProtocolLength) (PatternFlowArpProtocolLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpProtocolLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpProtocolLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpProtocolLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpProtocolLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpProtocolLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpProtocolLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpProtocolLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpProtocolLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpProtocolLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpProtocolLength) Clone() (PatternFlowArpProtocolLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpProtocolLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowArpProtocolLength) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowArpProtocolLength is length (in octets) of internetwork addresses +type PatternFlowArpProtocolLength interface { + Validation + // msg marshals PatternFlowArpProtocolLength to protobuf object *otg.PatternFlowArpProtocolLength + // and doesn't set defaults + msg() *otg.PatternFlowArpProtocolLength + // setMsg unmarshals PatternFlowArpProtocolLength from protobuf object *otg.PatternFlowArpProtocolLength + // and doesn't set defaults + setMsg(*otg.PatternFlowArpProtocolLength) PatternFlowArpProtocolLength + // provides marshal interface + Marshal() marshalPatternFlowArpProtocolLength + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpProtocolLength + // validate validates PatternFlowArpProtocolLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpProtocolLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowArpProtocolLengthChoiceEnum, set in PatternFlowArpProtocolLength + Choice() PatternFlowArpProtocolLengthChoiceEnum + // setChoice assigns PatternFlowArpProtocolLengthChoiceEnum provided by user to PatternFlowArpProtocolLength + setChoice(value PatternFlowArpProtocolLengthChoiceEnum) PatternFlowArpProtocolLength + // HasChoice checks if Choice has been set in PatternFlowArpProtocolLength + HasChoice() bool + // Value returns uint32, set in PatternFlowArpProtocolLength. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowArpProtocolLength + SetValue(value uint32) PatternFlowArpProtocolLength + // HasValue checks if Value has been set in PatternFlowArpProtocolLength + HasValue() bool + // Values returns []uint32, set in PatternFlowArpProtocolLength. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowArpProtocolLength + SetValues(value []uint32) PatternFlowArpProtocolLength + // Increment returns PatternFlowArpProtocolLengthCounter, set in PatternFlowArpProtocolLength. + // PatternFlowArpProtocolLengthCounter is integer counter pattern + Increment() PatternFlowArpProtocolLengthCounter + // SetIncrement assigns PatternFlowArpProtocolLengthCounter provided by user to PatternFlowArpProtocolLength. + // PatternFlowArpProtocolLengthCounter is integer counter pattern + SetIncrement(value PatternFlowArpProtocolLengthCounter) PatternFlowArpProtocolLength + // HasIncrement checks if Increment has been set in PatternFlowArpProtocolLength + HasIncrement() bool + // Decrement returns PatternFlowArpProtocolLengthCounter, set in PatternFlowArpProtocolLength. + // PatternFlowArpProtocolLengthCounter is integer counter pattern + Decrement() PatternFlowArpProtocolLengthCounter + // SetDecrement assigns PatternFlowArpProtocolLengthCounter provided by user to PatternFlowArpProtocolLength. + // PatternFlowArpProtocolLengthCounter is integer counter pattern + SetDecrement(value PatternFlowArpProtocolLengthCounter) PatternFlowArpProtocolLength + // HasDecrement checks if Decrement has been set in PatternFlowArpProtocolLength + HasDecrement() bool + // MetricTags returns PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIterIter, set in PatternFlowArpProtocolLength + MetricTags() PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter + setNil() +} + +type PatternFlowArpProtocolLengthChoiceEnum string + +// Enum of Choice on PatternFlowArpProtocolLength +var PatternFlowArpProtocolLengthChoice = struct { + VALUE PatternFlowArpProtocolLengthChoiceEnum + VALUES PatternFlowArpProtocolLengthChoiceEnum + INCREMENT PatternFlowArpProtocolLengthChoiceEnum + DECREMENT PatternFlowArpProtocolLengthChoiceEnum +}{ + VALUE: PatternFlowArpProtocolLengthChoiceEnum("value"), + VALUES: PatternFlowArpProtocolLengthChoiceEnum("values"), + INCREMENT: PatternFlowArpProtocolLengthChoiceEnum("increment"), + DECREMENT: PatternFlowArpProtocolLengthChoiceEnum("decrement"), +} + +func (obj *patternFlowArpProtocolLength) Choice() PatternFlowArpProtocolLengthChoiceEnum { + return PatternFlowArpProtocolLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowArpProtocolLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowArpProtocolLength) setChoice(value PatternFlowArpProtocolLengthChoiceEnum) PatternFlowArpProtocolLength { + intValue, ok := otg.PatternFlowArpProtocolLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowArpProtocolLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowArpProtocolLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowArpProtocolLengthChoice.VALUE { + defaultValue := uint32(4) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowArpProtocolLengthChoice.VALUES { + defaultValue := []uint32{4} + obj.obj.Values = defaultValue + } + + if value == PatternFlowArpProtocolLengthChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowArpProtocolLengthCounter().msg() + } + + if value == PatternFlowArpProtocolLengthChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowArpProtocolLengthCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowArpProtocolLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowArpProtocolLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowArpProtocolLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowArpProtocolLength object +func (obj *patternFlowArpProtocolLength) SetValue(value uint32) PatternFlowArpProtocolLength { + obj.setChoice(PatternFlowArpProtocolLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowArpProtocolLength) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{4}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowArpProtocolLength object +func (obj *patternFlowArpProtocolLength) SetValues(value []uint32) PatternFlowArpProtocolLength { + obj.setChoice(PatternFlowArpProtocolLengthChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowArpProtocolLengthCounter +func (obj *patternFlowArpProtocolLength) Increment() PatternFlowArpProtocolLengthCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowArpProtocolLengthChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowArpProtocolLengthCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowArpProtocolLengthCounter +func (obj *patternFlowArpProtocolLength) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowArpProtocolLengthCounter value in the PatternFlowArpProtocolLength object +func (obj *patternFlowArpProtocolLength) SetIncrement(value PatternFlowArpProtocolLengthCounter) PatternFlowArpProtocolLength { + obj.setChoice(PatternFlowArpProtocolLengthChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowArpProtocolLengthCounter +func (obj *patternFlowArpProtocolLength) Decrement() PatternFlowArpProtocolLengthCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowArpProtocolLengthChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowArpProtocolLengthCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowArpProtocolLengthCounter +func (obj *patternFlowArpProtocolLength) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowArpProtocolLengthCounter value in the PatternFlowArpProtocolLength object +func (obj *patternFlowArpProtocolLength) SetDecrement(value PatternFlowArpProtocolLengthCounter) PatternFlowArpProtocolLength { + obj.setChoice(PatternFlowArpProtocolLengthChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowArpProtocolLengthMetricTag +func (obj *patternFlowArpProtocolLength) MetricTags() PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowArpProtocolLengthMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter struct { + obj *patternFlowArpProtocolLength + patternFlowArpProtocolLengthMetricTagSlice []PatternFlowArpProtocolLengthMetricTag + fieldPtr *[]*otg.PatternFlowArpProtocolLengthMetricTag +} + +func newPatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter(ptr *[]*otg.PatternFlowArpProtocolLengthMetricTag) PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter { + return &patternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter interface { + setMsg(*patternFlowArpProtocolLength) PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter + Items() []PatternFlowArpProtocolLengthMetricTag + Add() PatternFlowArpProtocolLengthMetricTag + Append(items ...PatternFlowArpProtocolLengthMetricTag) PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter + Set(index int, newObj PatternFlowArpProtocolLengthMetricTag) PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter + Clear() PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter + clearHolderSlice() PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter + appendHolderSlice(item PatternFlowArpProtocolLengthMetricTag) PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter +} + +func (obj *patternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter) setMsg(msg *patternFlowArpProtocolLength) PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowArpProtocolLengthMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter) Items() []PatternFlowArpProtocolLengthMetricTag { + return obj.patternFlowArpProtocolLengthMetricTagSlice +} + +func (obj *patternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter) Add() PatternFlowArpProtocolLengthMetricTag { + newObj := &otg.PatternFlowArpProtocolLengthMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowArpProtocolLengthMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowArpProtocolLengthMetricTagSlice = append(obj.patternFlowArpProtocolLengthMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter) Append(items ...PatternFlowArpProtocolLengthMetricTag) PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowArpProtocolLengthMetricTagSlice = append(obj.patternFlowArpProtocolLengthMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter) Set(index int, newObj PatternFlowArpProtocolLengthMetricTag) PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowArpProtocolLengthMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter) Clear() PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowArpProtocolLengthMetricTag{} + obj.patternFlowArpProtocolLengthMetricTagSlice = []PatternFlowArpProtocolLengthMetricTag{} + } + return obj +} +func (obj *patternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter) clearHolderSlice() PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter { + if len(obj.patternFlowArpProtocolLengthMetricTagSlice) > 0 { + obj.patternFlowArpProtocolLengthMetricTagSlice = []PatternFlowArpProtocolLengthMetricTag{} + } + return obj +} +func (obj *patternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter) appendHolderSlice(item PatternFlowArpProtocolLengthMetricTag) PatternFlowArpProtocolLengthPatternFlowArpProtocolLengthMetricTagIter { + obj.patternFlowArpProtocolLengthMetricTagSlice = append(obj.patternFlowArpProtocolLengthMetricTagSlice, item) + return obj +} + +func (obj *patternFlowArpProtocolLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpProtocolLength.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowArpProtocolLength.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowArpProtocolLengthMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowArpProtocolLength) setDefault() { + var choices_set int = 0 + var choice PatternFlowArpProtocolLengthChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowArpProtocolLengthChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowArpProtocolLengthChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowArpProtocolLengthChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowArpProtocolLengthChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowArpProtocolLengthChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowArpProtocolLength") + } + } else { + intVal := otg.PatternFlowArpProtocolLength_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowArpProtocolLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_arp_protocol_length_counter.go b/gosnappi/pattern_flow_arp_protocol_length_counter.go new file mode 100644 index 00000000..af3f40fc --- /dev/null +++ b/gosnappi/pattern_flow_arp_protocol_length_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpProtocolLengthCounter ***** +type patternFlowArpProtocolLengthCounter struct { + validation + obj *otg.PatternFlowArpProtocolLengthCounter + marshaller marshalPatternFlowArpProtocolLengthCounter + unMarshaller unMarshalPatternFlowArpProtocolLengthCounter +} + +func NewPatternFlowArpProtocolLengthCounter() PatternFlowArpProtocolLengthCounter { + obj := patternFlowArpProtocolLengthCounter{obj: &otg.PatternFlowArpProtocolLengthCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpProtocolLengthCounter) msg() *otg.PatternFlowArpProtocolLengthCounter { + return obj.obj +} + +func (obj *patternFlowArpProtocolLengthCounter) setMsg(msg *otg.PatternFlowArpProtocolLengthCounter) PatternFlowArpProtocolLengthCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpProtocolLengthCounter struct { + obj *patternFlowArpProtocolLengthCounter +} + +type marshalPatternFlowArpProtocolLengthCounter interface { + // ToProto marshals PatternFlowArpProtocolLengthCounter to protobuf object *otg.PatternFlowArpProtocolLengthCounter + ToProto() (*otg.PatternFlowArpProtocolLengthCounter, error) + // ToPbText marshals PatternFlowArpProtocolLengthCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpProtocolLengthCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpProtocolLengthCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpProtocolLengthCounter struct { + obj *patternFlowArpProtocolLengthCounter +} + +type unMarshalPatternFlowArpProtocolLengthCounter interface { + // FromProto unmarshals PatternFlowArpProtocolLengthCounter from protobuf object *otg.PatternFlowArpProtocolLengthCounter + FromProto(msg *otg.PatternFlowArpProtocolLengthCounter) (PatternFlowArpProtocolLengthCounter, error) + // FromPbText unmarshals PatternFlowArpProtocolLengthCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpProtocolLengthCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpProtocolLengthCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpProtocolLengthCounter) Marshal() marshalPatternFlowArpProtocolLengthCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpProtocolLengthCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpProtocolLengthCounter) Unmarshal() unMarshalPatternFlowArpProtocolLengthCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpProtocolLengthCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpProtocolLengthCounter) ToProto() (*otg.PatternFlowArpProtocolLengthCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpProtocolLengthCounter) FromProto(msg *otg.PatternFlowArpProtocolLengthCounter) (PatternFlowArpProtocolLengthCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpProtocolLengthCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpProtocolLengthCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpProtocolLengthCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpProtocolLengthCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpProtocolLengthCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpProtocolLengthCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpProtocolLengthCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpProtocolLengthCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpProtocolLengthCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpProtocolLengthCounter) Clone() (PatternFlowArpProtocolLengthCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpProtocolLengthCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpProtocolLengthCounter is integer counter pattern +type PatternFlowArpProtocolLengthCounter interface { + Validation + // msg marshals PatternFlowArpProtocolLengthCounter to protobuf object *otg.PatternFlowArpProtocolLengthCounter + // and doesn't set defaults + msg() *otg.PatternFlowArpProtocolLengthCounter + // setMsg unmarshals PatternFlowArpProtocolLengthCounter from protobuf object *otg.PatternFlowArpProtocolLengthCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowArpProtocolLengthCounter) PatternFlowArpProtocolLengthCounter + // provides marshal interface + Marshal() marshalPatternFlowArpProtocolLengthCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpProtocolLengthCounter + // validate validates PatternFlowArpProtocolLengthCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpProtocolLengthCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowArpProtocolLengthCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowArpProtocolLengthCounter + SetStart(value uint32) PatternFlowArpProtocolLengthCounter + // HasStart checks if Start has been set in PatternFlowArpProtocolLengthCounter + HasStart() bool + // Step returns uint32, set in PatternFlowArpProtocolLengthCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowArpProtocolLengthCounter + SetStep(value uint32) PatternFlowArpProtocolLengthCounter + // HasStep checks if Step has been set in PatternFlowArpProtocolLengthCounter + HasStep() bool + // Count returns uint32, set in PatternFlowArpProtocolLengthCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowArpProtocolLengthCounter + SetCount(value uint32) PatternFlowArpProtocolLengthCounter + // HasCount checks if Count has been set in PatternFlowArpProtocolLengthCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowArpProtocolLengthCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowArpProtocolLengthCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowArpProtocolLengthCounter object +func (obj *patternFlowArpProtocolLengthCounter) SetStart(value uint32) PatternFlowArpProtocolLengthCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowArpProtocolLengthCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowArpProtocolLengthCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowArpProtocolLengthCounter object +func (obj *patternFlowArpProtocolLengthCounter) SetStep(value uint32) PatternFlowArpProtocolLengthCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpProtocolLengthCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpProtocolLengthCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowArpProtocolLengthCounter object +func (obj *patternFlowArpProtocolLengthCounter) SetCount(value uint32) PatternFlowArpProtocolLengthCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowArpProtocolLengthCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpProtocolLengthCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpProtocolLengthCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpProtocolLengthCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowArpProtocolLengthCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(4) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_arp_protocol_length_metric_tag.go b/gosnappi/pattern_flow_arp_protocol_length_metric_tag.go new file mode 100644 index 00000000..d505aff1 --- /dev/null +++ b/gosnappi/pattern_flow_arp_protocol_length_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpProtocolLengthMetricTag ***** +type patternFlowArpProtocolLengthMetricTag struct { + validation + obj *otg.PatternFlowArpProtocolLengthMetricTag + marshaller marshalPatternFlowArpProtocolLengthMetricTag + unMarshaller unMarshalPatternFlowArpProtocolLengthMetricTag +} + +func NewPatternFlowArpProtocolLengthMetricTag() PatternFlowArpProtocolLengthMetricTag { + obj := patternFlowArpProtocolLengthMetricTag{obj: &otg.PatternFlowArpProtocolLengthMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpProtocolLengthMetricTag) msg() *otg.PatternFlowArpProtocolLengthMetricTag { + return obj.obj +} + +func (obj *patternFlowArpProtocolLengthMetricTag) setMsg(msg *otg.PatternFlowArpProtocolLengthMetricTag) PatternFlowArpProtocolLengthMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpProtocolLengthMetricTag struct { + obj *patternFlowArpProtocolLengthMetricTag +} + +type marshalPatternFlowArpProtocolLengthMetricTag interface { + // ToProto marshals PatternFlowArpProtocolLengthMetricTag to protobuf object *otg.PatternFlowArpProtocolLengthMetricTag + ToProto() (*otg.PatternFlowArpProtocolLengthMetricTag, error) + // ToPbText marshals PatternFlowArpProtocolLengthMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpProtocolLengthMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpProtocolLengthMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpProtocolLengthMetricTag struct { + obj *patternFlowArpProtocolLengthMetricTag +} + +type unMarshalPatternFlowArpProtocolLengthMetricTag interface { + // FromProto unmarshals PatternFlowArpProtocolLengthMetricTag from protobuf object *otg.PatternFlowArpProtocolLengthMetricTag + FromProto(msg *otg.PatternFlowArpProtocolLengthMetricTag) (PatternFlowArpProtocolLengthMetricTag, error) + // FromPbText unmarshals PatternFlowArpProtocolLengthMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpProtocolLengthMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpProtocolLengthMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpProtocolLengthMetricTag) Marshal() marshalPatternFlowArpProtocolLengthMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpProtocolLengthMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpProtocolLengthMetricTag) Unmarshal() unMarshalPatternFlowArpProtocolLengthMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpProtocolLengthMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpProtocolLengthMetricTag) ToProto() (*otg.PatternFlowArpProtocolLengthMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpProtocolLengthMetricTag) FromProto(msg *otg.PatternFlowArpProtocolLengthMetricTag) (PatternFlowArpProtocolLengthMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpProtocolLengthMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpProtocolLengthMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpProtocolLengthMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpProtocolLengthMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpProtocolLengthMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpProtocolLengthMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpProtocolLengthMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpProtocolLengthMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpProtocolLengthMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpProtocolLengthMetricTag) Clone() (PatternFlowArpProtocolLengthMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpProtocolLengthMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpProtocolLengthMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowArpProtocolLengthMetricTag interface { + Validation + // msg marshals PatternFlowArpProtocolLengthMetricTag to protobuf object *otg.PatternFlowArpProtocolLengthMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowArpProtocolLengthMetricTag + // setMsg unmarshals PatternFlowArpProtocolLengthMetricTag from protobuf object *otg.PatternFlowArpProtocolLengthMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowArpProtocolLengthMetricTag) PatternFlowArpProtocolLengthMetricTag + // provides marshal interface + Marshal() marshalPatternFlowArpProtocolLengthMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpProtocolLengthMetricTag + // validate validates PatternFlowArpProtocolLengthMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpProtocolLengthMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowArpProtocolLengthMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowArpProtocolLengthMetricTag + SetName(value string) PatternFlowArpProtocolLengthMetricTag + // Offset returns uint32, set in PatternFlowArpProtocolLengthMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowArpProtocolLengthMetricTag + SetOffset(value uint32) PatternFlowArpProtocolLengthMetricTag + // HasOffset checks if Offset has been set in PatternFlowArpProtocolLengthMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowArpProtocolLengthMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowArpProtocolLengthMetricTag + SetLength(value uint32) PatternFlowArpProtocolLengthMetricTag + // HasLength checks if Length has been set in PatternFlowArpProtocolLengthMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowArpProtocolLengthMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowArpProtocolLengthMetricTag object +func (obj *patternFlowArpProtocolLengthMetricTag) SetName(value string) PatternFlowArpProtocolLengthMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpProtocolLengthMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpProtocolLengthMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowArpProtocolLengthMetricTag object +func (obj *patternFlowArpProtocolLengthMetricTag) SetOffset(value uint32) PatternFlowArpProtocolLengthMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpProtocolLengthMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpProtocolLengthMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowArpProtocolLengthMetricTag object +func (obj *patternFlowArpProtocolLengthMetricTag) SetLength(value uint32) PatternFlowArpProtocolLengthMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowArpProtocolLengthMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowArpProtocolLengthMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpProtocolLengthMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowArpProtocolLengthMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowArpProtocolLengthMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_arp_protocol_type.go b/gosnappi/pattern_flow_arp_protocol_type.go new file mode 100644 index 00000000..a059dc72 --- /dev/null +++ b/gosnappi/pattern_flow_arp_protocol_type.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpProtocolType ***** +type patternFlowArpProtocolType struct { + validation + obj *otg.PatternFlowArpProtocolType + marshaller marshalPatternFlowArpProtocolType + unMarshaller unMarshalPatternFlowArpProtocolType + incrementHolder PatternFlowArpProtocolTypeCounter + decrementHolder PatternFlowArpProtocolTypeCounter + metricTagsHolder PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter +} + +func NewPatternFlowArpProtocolType() PatternFlowArpProtocolType { + obj := patternFlowArpProtocolType{obj: &otg.PatternFlowArpProtocolType{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpProtocolType) msg() *otg.PatternFlowArpProtocolType { + return obj.obj +} + +func (obj *patternFlowArpProtocolType) setMsg(msg *otg.PatternFlowArpProtocolType) PatternFlowArpProtocolType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpProtocolType struct { + obj *patternFlowArpProtocolType +} + +type marshalPatternFlowArpProtocolType interface { + // ToProto marshals PatternFlowArpProtocolType to protobuf object *otg.PatternFlowArpProtocolType + ToProto() (*otg.PatternFlowArpProtocolType, error) + // ToPbText marshals PatternFlowArpProtocolType to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpProtocolType to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpProtocolType to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpProtocolType struct { + obj *patternFlowArpProtocolType +} + +type unMarshalPatternFlowArpProtocolType interface { + // FromProto unmarshals PatternFlowArpProtocolType from protobuf object *otg.PatternFlowArpProtocolType + FromProto(msg *otg.PatternFlowArpProtocolType) (PatternFlowArpProtocolType, error) + // FromPbText unmarshals PatternFlowArpProtocolType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpProtocolType from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpProtocolType from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpProtocolType) Marshal() marshalPatternFlowArpProtocolType { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpProtocolType{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpProtocolType) Unmarshal() unMarshalPatternFlowArpProtocolType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpProtocolType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpProtocolType) ToProto() (*otg.PatternFlowArpProtocolType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpProtocolType) FromProto(msg *otg.PatternFlowArpProtocolType) (PatternFlowArpProtocolType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpProtocolType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpProtocolType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpProtocolType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpProtocolType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpProtocolType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpProtocolType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpProtocolType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpProtocolType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpProtocolType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpProtocolType) Clone() (PatternFlowArpProtocolType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpProtocolType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowArpProtocolType) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowArpProtocolType is the internetwork protocol for which the ARP request is intended +type PatternFlowArpProtocolType interface { + Validation + // msg marshals PatternFlowArpProtocolType to protobuf object *otg.PatternFlowArpProtocolType + // and doesn't set defaults + msg() *otg.PatternFlowArpProtocolType + // setMsg unmarshals PatternFlowArpProtocolType from protobuf object *otg.PatternFlowArpProtocolType + // and doesn't set defaults + setMsg(*otg.PatternFlowArpProtocolType) PatternFlowArpProtocolType + // provides marshal interface + Marshal() marshalPatternFlowArpProtocolType + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpProtocolType + // validate validates PatternFlowArpProtocolType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpProtocolType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowArpProtocolTypeChoiceEnum, set in PatternFlowArpProtocolType + Choice() PatternFlowArpProtocolTypeChoiceEnum + // setChoice assigns PatternFlowArpProtocolTypeChoiceEnum provided by user to PatternFlowArpProtocolType + setChoice(value PatternFlowArpProtocolTypeChoiceEnum) PatternFlowArpProtocolType + // HasChoice checks if Choice has been set in PatternFlowArpProtocolType + HasChoice() bool + // Value returns uint32, set in PatternFlowArpProtocolType. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowArpProtocolType + SetValue(value uint32) PatternFlowArpProtocolType + // HasValue checks if Value has been set in PatternFlowArpProtocolType + HasValue() bool + // Values returns []uint32, set in PatternFlowArpProtocolType. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowArpProtocolType + SetValues(value []uint32) PatternFlowArpProtocolType + // Increment returns PatternFlowArpProtocolTypeCounter, set in PatternFlowArpProtocolType. + // PatternFlowArpProtocolTypeCounter is integer counter pattern + Increment() PatternFlowArpProtocolTypeCounter + // SetIncrement assigns PatternFlowArpProtocolTypeCounter provided by user to PatternFlowArpProtocolType. + // PatternFlowArpProtocolTypeCounter is integer counter pattern + SetIncrement(value PatternFlowArpProtocolTypeCounter) PatternFlowArpProtocolType + // HasIncrement checks if Increment has been set in PatternFlowArpProtocolType + HasIncrement() bool + // Decrement returns PatternFlowArpProtocolTypeCounter, set in PatternFlowArpProtocolType. + // PatternFlowArpProtocolTypeCounter is integer counter pattern + Decrement() PatternFlowArpProtocolTypeCounter + // SetDecrement assigns PatternFlowArpProtocolTypeCounter provided by user to PatternFlowArpProtocolType. + // PatternFlowArpProtocolTypeCounter is integer counter pattern + SetDecrement(value PatternFlowArpProtocolTypeCounter) PatternFlowArpProtocolType + // HasDecrement checks if Decrement has been set in PatternFlowArpProtocolType + HasDecrement() bool + // MetricTags returns PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIterIter, set in PatternFlowArpProtocolType + MetricTags() PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter + setNil() +} + +type PatternFlowArpProtocolTypeChoiceEnum string + +// Enum of Choice on PatternFlowArpProtocolType +var PatternFlowArpProtocolTypeChoice = struct { + VALUE PatternFlowArpProtocolTypeChoiceEnum + VALUES PatternFlowArpProtocolTypeChoiceEnum + INCREMENT PatternFlowArpProtocolTypeChoiceEnum + DECREMENT PatternFlowArpProtocolTypeChoiceEnum +}{ + VALUE: PatternFlowArpProtocolTypeChoiceEnum("value"), + VALUES: PatternFlowArpProtocolTypeChoiceEnum("values"), + INCREMENT: PatternFlowArpProtocolTypeChoiceEnum("increment"), + DECREMENT: PatternFlowArpProtocolTypeChoiceEnum("decrement"), +} + +func (obj *patternFlowArpProtocolType) Choice() PatternFlowArpProtocolTypeChoiceEnum { + return PatternFlowArpProtocolTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowArpProtocolType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowArpProtocolType) setChoice(value PatternFlowArpProtocolTypeChoiceEnum) PatternFlowArpProtocolType { + intValue, ok := otg.PatternFlowArpProtocolType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowArpProtocolTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowArpProtocolType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowArpProtocolTypeChoice.VALUE { + defaultValue := uint32(2048) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowArpProtocolTypeChoice.VALUES { + defaultValue := []uint32{2048} + obj.obj.Values = defaultValue + } + + if value == PatternFlowArpProtocolTypeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowArpProtocolTypeCounter().msg() + } + + if value == PatternFlowArpProtocolTypeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowArpProtocolTypeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowArpProtocolType) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowArpProtocolTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowArpProtocolType) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowArpProtocolType object +func (obj *patternFlowArpProtocolType) SetValue(value uint32) PatternFlowArpProtocolType { + obj.setChoice(PatternFlowArpProtocolTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowArpProtocolType) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{2048}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowArpProtocolType object +func (obj *patternFlowArpProtocolType) SetValues(value []uint32) PatternFlowArpProtocolType { + obj.setChoice(PatternFlowArpProtocolTypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowArpProtocolTypeCounter +func (obj *patternFlowArpProtocolType) Increment() PatternFlowArpProtocolTypeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowArpProtocolTypeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowArpProtocolTypeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowArpProtocolTypeCounter +func (obj *patternFlowArpProtocolType) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowArpProtocolTypeCounter value in the PatternFlowArpProtocolType object +func (obj *patternFlowArpProtocolType) SetIncrement(value PatternFlowArpProtocolTypeCounter) PatternFlowArpProtocolType { + obj.setChoice(PatternFlowArpProtocolTypeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowArpProtocolTypeCounter +func (obj *patternFlowArpProtocolType) Decrement() PatternFlowArpProtocolTypeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowArpProtocolTypeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowArpProtocolTypeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowArpProtocolTypeCounter +func (obj *patternFlowArpProtocolType) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowArpProtocolTypeCounter value in the PatternFlowArpProtocolType object +func (obj *patternFlowArpProtocolType) SetDecrement(value PatternFlowArpProtocolTypeCounter) PatternFlowArpProtocolType { + obj.setChoice(PatternFlowArpProtocolTypeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowArpProtocolTypeMetricTag +func (obj *patternFlowArpProtocolType) MetricTags() PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowArpProtocolTypeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter struct { + obj *patternFlowArpProtocolType + patternFlowArpProtocolTypeMetricTagSlice []PatternFlowArpProtocolTypeMetricTag + fieldPtr *[]*otg.PatternFlowArpProtocolTypeMetricTag +} + +func newPatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter(ptr *[]*otg.PatternFlowArpProtocolTypeMetricTag) PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter { + return &patternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter interface { + setMsg(*patternFlowArpProtocolType) PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter + Items() []PatternFlowArpProtocolTypeMetricTag + Add() PatternFlowArpProtocolTypeMetricTag + Append(items ...PatternFlowArpProtocolTypeMetricTag) PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter + Set(index int, newObj PatternFlowArpProtocolTypeMetricTag) PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter + Clear() PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter + clearHolderSlice() PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter + appendHolderSlice(item PatternFlowArpProtocolTypeMetricTag) PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter +} + +func (obj *patternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter) setMsg(msg *patternFlowArpProtocolType) PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowArpProtocolTypeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter) Items() []PatternFlowArpProtocolTypeMetricTag { + return obj.patternFlowArpProtocolTypeMetricTagSlice +} + +func (obj *patternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter) Add() PatternFlowArpProtocolTypeMetricTag { + newObj := &otg.PatternFlowArpProtocolTypeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowArpProtocolTypeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowArpProtocolTypeMetricTagSlice = append(obj.patternFlowArpProtocolTypeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter) Append(items ...PatternFlowArpProtocolTypeMetricTag) PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowArpProtocolTypeMetricTagSlice = append(obj.patternFlowArpProtocolTypeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter) Set(index int, newObj PatternFlowArpProtocolTypeMetricTag) PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowArpProtocolTypeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter) Clear() PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowArpProtocolTypeMetricTag{} + obj.patternFlowArpProtocolTypeMetricTagSlice = []PatternFlowArpProtocolTypeMetricTag{} + } + return obj +} +func (obj *patternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter) clearHolderSlice() PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter { + if len(obj.patternFlowArpProtocolTypeMetricTagSlice) > 0 { + obj.patternFlowArpProtocolTypeMetricTagSlice = []PatternFlowArpProtocolTypeMetricTag{} + } + return obj +} +func (obj *patternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter) appendHolderSlice(item PatternFlowArpProtocolTypeMetricTag) PatternFlowArpProtocolTypePatternFlowArpProtocolTypeMetricTagIter { + obj.patternFlowArpProtocolTypeMetricTagSlice = append(obj.patternFlowArpProtocolTypeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowArpProtocolType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpProtocolType.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowArpProtocolType.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowArpProtocolTypeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowArpProtocolType) setDefault() { + var choices_set int = 0 + var choice PatternFlowArpProtocolTypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowArpProtocolTypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowArpProtocolTypeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowArpProtocolTypeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowArpProtocolTypeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowArpProtocolTypeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowArpProtocolType") + } + } else { + intVal := otg.PatternFlowArpProtocolType_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowArpProtocolType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_arp_protocol_type_counter.go b/gosnappi/pattern_flow_arp_protocol_type_counter.go new file mode 100644 index 00000000..629366d2 --- /dev/null +++ b/gosnappi/pattern_flow_arp_protocol_type_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpProtocolTypeCounter ***** +type patternFlowArpProtocolTypeCounter struct { + validation + obj *otg.PatternFlowArpProtocolTypeCounter + marshaller marshalPatternFlowArpProtocolTypeCounter + unMarshaller unMarshalPatternFlowArpProtocolTypeCounter +} + +func NewPatternFlowArpProtocolTypeCounter() PatternFlowArpProtocolTypeCounter { + obj := patternFlowArpProtocolTypeCounter{obj: &otg.PatternFlowArpProtocolTypeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpProtocolTypeCounter) msg() *otg.PatternFlowArpProtocolTypeCounter { + return obj.obj +} + +func (obj *patternFlowArpProtocolTypeCounter) setMsg(msg *otg.PatternFlowArpProtocolTypeCounter) PatternFlowArpProtocolTypeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpProtocolTypeCounter struct { + obj *patternFlowArpProtocolTypeCounter +} + +type marshalPatternFlowArpProtocolTypeCounter interface { + // ToProto marshals PatternFlowArpProtocolTypeCounter to protobuf object *otg.PatternFlowArpProtocolTypeCounter + ToProto() (*otg.PatternFlowArpProtocolTypeCounter, error) + // ToPbText marshals PatternFlowArpProtocolTypeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpProtocolTypeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpProtocolTypeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpProtocolTypeCounter struct { + obj *patternFlowArpProtocolTypeCounter +} + +type unMarshalPatternFlowArpProtocolTypeCounter interface { + // FromProto unmarshals PatternFlowArpProtocolTypeCounter from protobuf object *otg.PatternFlowArpProtocolTypeCounter + FromProto(msg *otg.PatternFlowArpProtocolTypeCounter) (PatternFlowArpProtocolTypeCounter, error) + // FromPbText unmarshals PatternFlowArpProtocolTypeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpProtocolTypeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpProtocolTypeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpProtocolTypeCounter) Marshal() marshalPatternFlowArpProtocolTypeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpProtocolTypeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpProtocolTypeCounter) Unmarshal() unMarshalPatternFlowArpProtocolTypeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpProtocolTypeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpProtocolTypeCounter) ToProto() (*otg.PatternFlowArpProtocolTypeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpProtocolTypeCounter) FromProto(msg *otg.PatternFlowArpProtocolTypeCounter) (PatternFlowArpProtocolTypeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpProtocolTypeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpProtocolTypeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpProtocolTypeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpProtocolTypeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpProtocolTypeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpProtocolTypeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpProtocolTypeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpProtocolTypeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpProtocolTypeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpProtocolTypeCounter) Clone() (PatternFlowArpProtocolTypeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpProtocolTypeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpProtocolTypeCounter is integer counter pattern +type PatternFlowArpProtocolTypeCounter interface { + Validation + // msg marshals PatternFlowArpProtocolTypeCounter to protobuf object *otg.PatternFlowArpProtocolTypeCounter + // and doesn't set defaults + msg() *otg.PatternFlowArpProtocolTypeCounter + // setMsg unmarshals PatternFlowArpProtocolTypeCounter from protobuf object *otg.PatternFlowArpProtocolTypeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowArpProtocolTypeCounter) PatternFlowArpProtocolTypeCounter + // provides marshal interface + Marshal() marshalPatternFlowArpProtocolTypeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpProtocolTypeCounter + // validate validates PatternFlowArpProtocolTypeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpProtocolTypeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowArpProtocolTypeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowArpProtocolTypeCounter + SetStart(value uint32) PatternFlowArpProtocolTypeCounter + // HasStart checks if Start has been set in PatternFlowArpProtocolTypeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowArpProtocolTypeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowArpProtocolTypeCounter + SetStep(value uint32) PatternFlowArpProtocolTypeCounter + // HasStep checks if Step has been set in PatternFlowArpProtocolTypeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowArpProtocolTypeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowArpProtocolTypeCounter + SetCount(value uint32) PatternFlowArpProtocolTypeCounter + // HasCount checks if Count has been set in PatternFlowArpProtocolTypeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowArpProtocolTypeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowArpProtocolTypeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowArpProtocolTypeCounter object +func (obj *patternFlowArpProtocolTypeCounter) SetStart(value uint32) PatternFlowArpProtocolTypeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowArpProtocolTypeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowArpProtocolTypeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowArpProtocolTypeCounter object +func (obj *patternFlowArpProtocolTypeCounter) SetStep(value uint32) PatternFlowArpProtocolTypeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpProtocolTypeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpProtocolTypeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowArpProtocolTypeCounter object +func (obj *patternFlowArpProtocolTypeCounter) SetCount(value uint32) PatternFlowArpProtocolTypeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowArpProtocolTypeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpProtocolTypeCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpProtocolTypeCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpProtocolTypeCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowArpProtocolTypeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(2048) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_arp_protocol_type_metric_tag.go b/gosnappi/pattern_flow_arp_protocol_type_metric_tag.go new file mode 100644 index 00000000..cf51bf4d --- /dev/null +++ b/gosnappi/pattern_flow_arp_protocol_type_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpProtocolTypeMetricTag ***** +type patternFlowArpProtocolTypeMetricTag struct { + validation + obj *otg.PatternFlowArpProtocolTypeMetricTag + marshaller marshalPatternFlowArpProtocolTypeMetricTag + unMarshaller unMarshalPatternFlowArpProtocolTypeMetricTag +} + +func NewPatternFlowArpProtocolTypeMetricTag() PatternFlowArpProtocolTypeMetricTag { + obj := patternFlowArpProtocolTypeMetricTag{obj: &otg.PatternFlowArpProtocolTypeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpProtocolTypeMetricTag) msg() *otg.PatternFlowArpProtocolTypeMetricTag { + return obj.obj +} + +func (obj *patternFlowArpProtocolTypeMetricTag) setMsg(msg *otg.PatternFlowArpProtocolTypeMetricTag) PatternFlowArpProtocolTypeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpProtocolTypeMetricTag struct { + obj *patternFlowArpProtocolTypeMetricTag +} + +type marshalPatternFlowArpProtocolTypeMetricTag interface { + // ToProto marshals PatternFlowArpProtocolTypeMetricTag to protobuf object *otg.PatternFlowArpProtocolTypeMetricTag + ToProto() (*otg.PatternFlowArpProtocolTypeMetricTag, error) + // ToPbText marshals PatternFlowArpProtocolTypeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpProtocolTypeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpProtocolTypeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpProtocolTypeMetricTag struct { + obj *patternFlowArpProtocolTypeMetricTag +} + +type unMarshalPatternFlowArpProtocolTypeMetricTag interface { + // FromProto unmarshals PatternFlowArpProtocolTypeMetricTag from protobuf object *otg.PatternFlowArpProtocolTypeMetricTag + FromProto(msg *otg.PatternFlowArpProtocolTypeMetricTag) (PatternFlowArpProtocolTypeMetricTag, error) + // FromPbText unmarshals PatternFlowArpProtocolTypeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpProtocolTypeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpProtocolTypeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpProtocolTypeMetricTag) Marshal() marshalPatternFlowArpProtocolTypeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpProtocolTypeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpProtocolTypeMetricTag) Unmarshal() unMarshalPatternFlowArpProtocolTypeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpProtocolTypeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpProtocolTypeMetricTag) ToProto() (*otg.PatternFlowArpProtocolTypeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpProtocolTypeMetricTag) FromProto(msg *otg.PatternFlowArpProtocolTypeMetricTag) (PatternFlowArpProtocolTypeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpProtocolTypeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpProtocolTypeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpProtocolTypeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpProtocolTypeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpProtocolTypeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpProtocolTypeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpProtocolTypeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpProtocolTypeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpProtocolTypeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpProtocolTypeMetricTag) Clone() (PatternFlowArpProtocolTypeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpProtocolTypeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpProtocolTypeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowArpProtocolTypeMetricTag interface { + Validation + // msg marshals PatternFlowArpProtocolTypeMetricTag to protobuf object *otg.PatternFlowArpProtocolTypeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowArpProtocolTypeMetricTag + // setMsg unmarshals PatternFlowArpProtocolTypeMetricTag from protobuf object *otg.PatternFlowArpProtocolTypeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowArpProtocolTypeMetricTag) PatternFlowArpProtocolTypeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowArpProtocolTypeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpProtocolTypeMetricTag + // validate validates PatternFlowArpProtocolTypeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpProtocolTypeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowArpProtocolTypeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowArpProtocolTypeMetricTag + SetName(value string) PatternFlowArpProtocolTypeMetricTag + // Offset returns uint32, set in PatternFlowArpProtocolTypeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowArpProtocolTypeMetricTag + SetOffset(value uint32) PatternFlowArpProtocolTypeMetricTag + // HasOffset checks if Offset has been set in PatternFlowArpProtocolTypeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowArpProtocolTypeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowArpProtocolTypeMetricTag + SetLength(value uint32) PatternFlowArpProtocolTypeMetricTag + // HasLength checks if Length has been set in PatternFlowArpProtocolTypeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowArpProtocolTypeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowArpProtocolTypeMetricTag object +func (obj *patternFlowArpProtocolTypeMetricTag) SetName(value string) PatternFlowArpProtocolTypeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpProtocolTypeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpProtocolTypeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowArpProtocolTypeMetricTag object +func (obj *patternFlowArpProtocolTypeMetricTag) SetOffset(value uint32) PatternFlowArpProtocolTypeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpProtocolTypeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpProtocolTypeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowArpProtocolTypeMetricTag object +func (obj *patternFlowArpProtocolTypeMetricTag) SetLength(value uint32) PatternFlowArpProtocolTypeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowArpProtocolTypeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowArpProtocolTypeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpProtocolTypeMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowArpProtocolTypeMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowArpProtocolTypeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_arp_sender_hardware_addr.go b/gosnappi/pattern_flow_arp_sender_hardware_addr.go new file mode 100644 index 00000000..c9cbb05a --- /dev/null +++ b/gosnappi/pattern_flow_arp_sender_hardware_addr.go @@ -0,0 +1,658 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpSenderHardwareAddr ***** +type patternFlowArpSenderHardwareAddr struct { + validation + obj *otg.PatternFlowArpSenderHardwareAddr + marshaller marshalPatternFlowArpSenderHardwareAddr + unMarshaller unMarshalPatternFlowArpSenderHardwareAddr + incrementHolder PatternFlowArpSenderHardwareAddrCounter + decrementHolder PatternFlowArpSenderHardwareAddrCounter + metricTagsHolder PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter +} + +func NewPatternFlowArpSenderHardwareAddr() PatternFlowArpSenderHardwareAddr { + obj := patternFlowArpSenderHardwareAddr{obj: &otg.PatternFlowArpSenderHardwareAddr{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpSenderHardwareAddr) msg() *otg.PatternFlowArpSenderHardwareAddr { + return obj.obj +} + +func (obj *patternFlowArpSenderHardwareAddr) setMsg(msg *otg.PatternFlowArpSenderHardwareAddr) PatternFlowArpSenderHardwareAddr { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpSenderHardwareAddr struct { + obj *patternFlowArpSenderHardwareAddr +} + +type marshalPatternFlowArpSenderHardwareAddr interface { + // ToProto marshals PatternFlowArpSenderHardwareAddr to protobuf object *otg.PatternFlowArpSenderHardwareAddr + ToProto() (*otg.PatternFlowArpSenderHardwareAddr, error) + // ToPbText marshals PatternFlowArpSenderHardwareAddr to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpSenderHardwareAddr to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpSenderHardwareAddr to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpSenderHardwareAddr struct { + obj *patternFlowArpSenderHardwareAddr +} + +type unMarshalPatternFlowArpSenderHardwareAddr interface { + // FromProto unmarshals PatternFlowArpSenderHardwareAddr from protobuf object *otg.PatternFlowArpSenderHardwareAddr + FromProto(msg *otg.PatternFlowArpSenderHardwareAddr) (PatternFlowArpSenderHardwareAddr, error) + // FromPbText unmarshals PatternFlowArpSenderHardwareAddr from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpSenderHardwareAddr from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpSenderHardwareAddr from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpSenderHardwareAddr) Marshal() marshalPatternFlowArpSenderHardwareAddr { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpSenderHardwareAddr{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpSenderHardwareAddr) Unmarshal() unMarshalPatternFlowArpSenderHardwareAddr { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpSenderHardwareAddr{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpSenderHardwareAddr) ToProto() (*otg.PatternFlowArpSenderHardwareAddr, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpSenderHardwareAddr) FromProto(msg *otg.PatternFlowArpSenderHardwareAddr) (PatternFlowArpSenderHardwareAddr, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpSenderHardwareAddr) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpSenderHardwareAddr) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpSenderHardwareAddr) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpSenderHardwareAddr) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpSenderHardwareAddr) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpSenderHardwareAddr) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpSenderHardwareAddr) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpSenderHardwareAddr) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpSenderHardwareAddr) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpSenderHardwareAddr) Clone() (PatternFlowArpSenderHardwareAddr, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpSenderHardwareAddr() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowArpSenderHardwareAddr) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowArpSenderHardwareAddr is media address of the sender +type PatternFlowArpSenderHardwareAddr interface { + Validation + // msg marshals PatternFlowArpSenderHardwareAddr to protobuf object *otg.PatternFlowArpSenderHardwareAddr + // and doesn't set defaults + msg() *otg.PatternFlowArpSenderHardwareAddr + // setMsg unmarshals PatternFlowArpSenderHardwareAddr from protobuf object *otg.PatternFlowArpSenderHardwareAddr + // and doesn't set defaults + setMsg(*otg.PatternFlowArpSenderHardwareAddr) PatternFlowArpSenderHardwareAddr + // provides marshal interface + Marshal() marshalPatternFlowArpSenderHardwareAddr + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpSenderHardwareAddr + // validate validates PatternFlowArpSenderHardwareAddr + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpSenderHardwareAddr, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowArpSenderHardwareAddrChoiceEnum, set in PatternFlowArpSenderHardwareAddr + Choice() PatternFlowArpSenderHardwareAddrChoiceEnum + // setChoice assigns PatternFlowArpSenderHardwareAddrChoiceEnum provided by user to PatternFlowArpSenderHardwareAddr + setChoice(value PatternFlowArpSenderHardwareAddrChoiceEnum) PatternFlowArpSenderHardwareAddr + // HasChoice checks if Choice has been set in PatternFlowArpSenderHardwareAddr + HasChoice() bool + // Value returns string, set in PatternFlowArpSenderHardwareAddr. + Value() string + // SetValue assigns string provided by user to PatternFlowArpSenderHardwareAddr + SetValue(value string) PatternFlowArpSenderHardwareAddr + // HasValue checks if Value has been set in PatternFlowArpSenderHardwareAddr + HasValue() bool + // Values returns []string, set in PatternFlowArpSenderHardwareAddr. + Values() []string + // SetValues assigns []string provided by user to PatternFlowArpSenderHardwareAddr + SetValues(value []string) PatternFlowArpSenderHardwareAddr + // Increment returns PatternFlowArpSenderHardwareAddrCounter, set in PatternFlowArpSenderHardwareAddr. + // PatternFlowArpSenderHardwareAddrCounter is mac counter pattern + Increment() PatternFlowArpSenderHardwareAddrCounter + // SetIncrement assigns PatternFlowArpSenderHardwareAddrCounter provided by user to PatternFlowArpSenderHardwareAddr. + // PatternFlowArpSenderHardwareAddrCounter is mac counter pattern + SetIncrement(value PatternFlowArpSenderHardwareAddrCounter) PatternFlowArpSenderHardwareAddr + // HasIncrement checks if Increment has been set in PatternFlowArpSenderHardwareAddr + HasIncrement() bool + // Decrement returns PatternFlowArpSenderHardwareAddrCounter, set in PatternFlowArpSenderHardwareAddr. + // PatternFlowArpSenderHardwareAddrCounter is mac counter pattern + Decrement() PatternFlowArpSenderHardwareAddrCounter + // SetDecrement assigns PatternFlowArpSenderHardwareAddrCounter provided by user to PatternFlowArpSenderHardwareAddr. + // PatternFlowArpSenderHardwareAddrCounter is mac counter pattern + SetDecrement(value PatternFlowArpSenderHardwareAddrCounter) PatternFlowArpSenderHardwareAddr + // HasDecrement checks if Decrement has been set in PatternFlowArpSenderHardwareAddr + HasDecrement() bool + // MetricTags returns PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIterIter, set in PatternFlowArpSenderHardwareAddr + MetricTags() PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter + setNil() +} + +type PatternFlowArpSenderHardwareAddrChoiceEnum string + +// Enum of Choice on PatternFlowArpSenderHardwareAddr +var PatternFlowArpSenderHardwareAddrChoice = struct { + VALUE PatternFlowArpSenderHardwareAddrChoiceEnum + VALUES PatternFlowArpSenderHardwareAddrChoiceEnum + INCREMENT PatternFlowArpSenderHardwareAddrChoiceEnum + DECREMENT PatternFlowArpSenderHardwareAddrChoiceEnum +}{ + VALUE: PatternFlowArpSenderHardwareAddrChoiceEnum("value"), + VALUES: PatternFlowArpSenderHardwareAddrChoiceEnum("values"), + INCREMENT: PatternFlowArpSenderHardwareAddrChoiceEnum("increment"), + DECREMENT: PatternFlowArpSenderHardwareAddrChoiceEnum("decrement"), +} + +func (obj *patternFlowArpSenderHardwareAddr) Choice() PatternFlowArpSenderHardwareAddrChoiceEnum { + return PatternFlowArpSenderHardwareAddrChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowArpSenderHardwareAddr) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowArpSenderHardwareAddr) setChoice(value PatternFlowArpSenderHardwareAddrChoiceEnum) PatternFlowArpSenderHardwareAddr { + intValue, ok := otg.PatternFlowArpSenderHardwareAddr_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowArpSenderHardwareAddrChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowArpSenderHardwareAddr_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowArpSenderHardwareAddrChoice.VALUE { + defaultValue := "00:00:00:00:00:00" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowArpSenderHardwareAddrChoice.VALUES { + defaultValue := []string{"00:00:00:00:00:00"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowArpSenderHardwareAddrChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowArpSenderHardwareAddrCounter().msg() + } + + if value == PatternFlowArpSenderHardwareAddrChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowArpSenderHardwareAddrCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowArpSenderHardwareAddr) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowArpSenderHardwareAddrChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowArpSenderHardwareAddr) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowArpSenderHardwareAddr object +func (obj *patternFlowArpSenderHardwareAddr) SetValue(value string) PatternFlowArpSenderHardwareAddr { + obj.setChoice(PatternFlowArpSenderHardwareAddrChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowArpSenderHardwareAddr) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"00:00:00:00:00:00"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowArpSenderHardwareAddr object +func (obj *patternFlowArpSenderHardwareAddr) SetValues(value []string) PatternFlowArpSenderHardwareAddr { + obj.setChoice(PatternFlowArpSenderHardwareAddrChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowArpSenderHardwareAddrCounter +func (obj *patternFlowArpSenderHardwareAddr) Increment() PatternFlowArpSenderHardwareAddrCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowArpSenderHardwareAddrChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowArpSenderHardwareAddrCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowArpSenderHardwareAddrCounter +func (obj *patternFlowArpSenderHardwareAddr) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowArpSenderHardwareAddrCounter value in the PatternFlowArpSenderHardwareAddr object +func (obj *patternFlowArpSenderHardwareAddr) SetIncrement(value PatternFlowArpSenderHardwareAddrCounter) PatternFlowArpSenderHardwareAddr { + obj.setChoice(PatternFlowArpSenderHardwareAddrChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowArpSenderHardwareAddrCounter +func (obj *patternFlowArpSenderHardwareAddr) Decrement() PatternFlowArpSenderHardwareAddrCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowArpSenderHardwareAddrChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowArpSenderHardwareAddrCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowArpSenderHardwareAddrCounter +func (obj *patternFlowArpSenderHardwareAddr) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowArpSenderHardwareAddrCounter value in the PatternFlowArpSenderHardwareAddr object +func (obj *patternFlowArpSenderHardwareAddr) SetDecrement(value PatternFlowArpSenderHardwareAddrCounter) PatternFlowArpSenderHardwareAddr { + obj.setChoice(PatternFlowArpSenderHardwareAddrChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowArpSenderHardwareAddrMetricTag +func (obj *patternFlowArpSenderHardwareAddr) MetricTags() PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowArpSenderHardwareAddrMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter struct { + obj *patternFlowArpSenderHardwareAddr + patternFlowArpSenderHardwareAddrMetricTagSlice []PatternFlowArpSenderHardwareAddrMetricTag + fieldPtr *[]*otg.PatternFlowArpSenderHardwareAddrMetricTag +} + +func newPatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter(ptr *[]*otg.PatternFlowArpSenderHardwareAddrMetricTag) PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter { + return &patternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter interface { + setMsg(*patternFlowArpSenderHardwareAddr) PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter + Items() []PatternFlowArpSenderHardwareAddrMetricTag + Add() PatternFlowArpSenderHardwareAddrMetricTag + Append(items ...PatternFlowArpSenderHardwareAddrMetricTag) PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter + Set(index int, newObj PatternFlowArpSenderHardwareAddrMetricTag) PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter + Clear() PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter + clearHolderSlice() PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter + appendHolderSlice(item PatternFlowArpSenderHardwareAddrMetricTag) PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter +} + +func (obj *patternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter) setMsg(msg *patternFlowArpSenderHardwareAddr) PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowArpSenderHardwareAddrMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter) Items() []PatternFlowArpSenderHardwareAddrMetricTag { + return obj.patternFlowArpSenderHardwareAddrMetricTagSlice +} + +func (obj *patternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter) Add() PatternFlowArpSenderHardwareAddrMetricTag { + newObj := &otg.PatternFlowArpSenderHardwareAddrMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowArpSenderHardwareAddrMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowArpSenderHardwareAddrMetricTagSlice = append(obj.patternFlowArpSenderHardwareAddrMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter) Append(items ...PatternFlowArpSenderHardwareAddrMetricTag) PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowArpSenderHardwareAddrMetricTagSlice = append(obj.patternFlowArpSenderHardwareAddrMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter) Set(index int, newObj PatternFlowArpSenderHardwareAddrMetricTag) PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowArpSenderHardwareAddrMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter) Clear() PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowArpSenderHardwareAddrMetricTag{} + obj.patternFlowArpSenderHardwareAddrMetricTagSlice = []PatternFlowArpSenderHardwareAddrMetricTag{} + } + return obj +} +func (obj *patternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter) clearHolderSlice() PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter { + if len(obj.patternFlowArpSenderHardwareAddrMetricTagSlice) > 0 { + obj.patternFlowArpSenderHardwareAddrMetricTagSlice = []PatternFlowArpSenderHardwareAddrMetricTag{} + } + return obj +} +func (obj *patternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter) appendHolderSlice(item PatternFlowArpSenderHardwareAddrMetricTag) PatternFlowArpSenderHardwareAddrPatternFlowArpSenderHardwareAddrMetricTagIter { + obj.patternFlowArpSenderHardwareAddrMetricTagSlice = append(obj.patternFlowArpSenderHardwareAddrMetricTagSlice, item) + return obj +} + +func (obj *patternFlowArpSenderHardwareAddr) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateMac(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpSenderHardwareAddr.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateMacSlice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpSenderHardwareAddr.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowArpSenderHardwareAddrMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowArpSenderHardwareAddr) setDefault() { + var choices_set int = 0 + var choice PatternFlowArpSenderHardwareAddrChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowArpSenderHardwareAddrChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowArpSenderHardwareAddrChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowArpSenderHardwareAddrChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowArpSenderHardwareAddrChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowArpSenderHardwareAddrChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowArpSenderHardwareAddr") + } + } else { + intVal := otg.PatternFlowArpSenderHardwareAddr_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowArpSenderHardwareAddr_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_arp_sender_hardware_addr_counter.go b/gosnappi/pattern_flow_arp_sender_hardware_addr_counter.go new file mode 100644 index 00000000..2ab461a1 --- /dev/null +++ b/gosnappi/pattern_flow_arp_sender_hardware_addr_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpSenderHardwareAddrCounter ***** +type patternFlowArpSenderHardwareAddrCounter struct { + validation + obj *otg.PatternFlowArpSenderHardwareAddrCounter + marshaller marshalPatternFlowArpSenderHardwareAddrCounter + unMarshaller unMarshalPatternFlowArpSenderHardwareAddrCounter +} + +func NewPatternFlowArpSenderHardwareAddrCounter() PatternFlowArpSenderHardwareAddrCounter { + obj := patternFlowArpSenderHardwareAddrCounter{obj: &otg.PatternFlowArpSenderHardwareAddrCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpSenderHardwareAddrCounter) msg() *otg.PatternFlowArpSenderHardwareAddrCounter { + return obj.obj +} + +func (obj *patternFlowArpSenderHardwareAddrCounter) setMsg(msg *otg.PatternFlowArpSenderHardwareAddrCounter) PatternFlowArpSenderHardwareAddrCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpSenderHardwareAddrCounter struct { + obj *patternFlowArpSenderHardwareAddrCounter +} + +type marshalPatternFlowArpSenderHardwareAddrCounter interface { + // ToProto marshals PatternFlowArpSenderHardwareAddrCounter to protobuf object *otg.PatternFlowArpSenderHardwareAddrCounter + ToProto() (*otg.PatternFlowArpSenderHardwareAddrCounter, error) + // ToPbText marshals PatternFlowArpSenderHardwareAddrCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpSenderHardwareAddrCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpSenderHardwareAddrCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpSenderHardwareAddrCounter struct { + obj *patternFlowArpSenderHardwareAddrCounter +} + +type unMarshalPatternFlowArpSenderHardwareAddrCounter interface { + // FromProto unmarshals PatternFlowArpSenderHardwareAddrCounter from protobuf object *otg.PatternFlowArpSenderHardwareAddrCounter + FromProto(msg *otg.PatternFlowArpSenderHardwareAddrCounter) (PatternFlowArpSenderHardwareAddrCounter, error) + // FromPbText unmarshals PatternFlowArpSenderHardwareAddrCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpSenderHardwareAddrCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpSenderHardwareAddrCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpSenderHardwareAddrCounter) Marshal() marshalPatternFlowArpSenderHardwareAddrCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpSenderHardwareAddrCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpSenderHardwareAddrCounter) Unmarshal() unMarshalPatternFlowArpSenderHardwareAddrCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpSenderHardwareAddrCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpSenderHardwareAddrCounter) ToProto() (*otg.PatternFlowArpSenderHardwareAddrCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpSenderHardwareAddrCounter) FromProto(msg *otg.PatternFlowArpSenderHardwareAddrCounter) (PatternFlowArpSenderHardwareAddrCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpSenderHardwareAddrCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpSenderHardwareAddrCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpSenderHardwareAddrCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpSenderHardwareAddrCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpSenderHardwareAddrCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpSenderHardwareAddrCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpSenderHardwareAddrCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpSenderHardwareAddrCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpSenderHardwareAddrCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpSenderHardwareAddrCounter) Clone() (PatternFlowArpSenderHardwareAddrCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpSenderHardwareAddrCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpSenderHardwareAddrCounter is mac counter pattern +type PatternFlowArpSenderHardwareAddrCounter interface { + Validation + // msg marshals PatternFlowArpSenderHardwareAddrCounter to protobuf object *otg.PatternFlowArpSenderHardwareAddrCounter + // and doesn't set defaults + msg() *otg.PatternFlowArpSenderHardwareAddrCounter + // setMsg unmarshals PatternFlowArpSenderHardwareAddrCounter from protobuf object *otg.PatternFlowArpSenderHardwareAddrCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowArpSenderHardwareAddrCounter) PatternFlowArpSenderHardwareAddrCounter + // provides marshal interface + Marshal() marshalPatternFlowArpSenderHardwareAddrCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpSenderHardwareAddrCounter + // validate validates PatternFlowArpSenderHardwareAddrCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpSenderHardwareAddrCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowArpSenderHardwareAddrCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowArpSenderHardwareAddrCounter + SetStart(value string) PatternFlowArpSenderHardwareAddrCounter + // HasStart checks if Start has been set in PatternFlowArpSenderHardwareAddrCounter + HasStart() bool + // Step returns string, set in PatternFlowArpSenderHardwareAddrCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowArpSenderHardwareAddrCounter + SetStep(value string) PatternFlowArpSenderHardwareAddrCounter + // HasStep checks if Step has been set in PatternFlowArpSenderHardwareAddrCounter + HasStep() bool + // Count returns uint32, set in PatternFlowArpSenderHardwareAddrCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowArpSenderHardwareAddrCounter + SetCount(value uint32) PatternFlowArpSenderHardwareAddrCounter + // HasCount checks if Count has been set in PatternFlowArpSenderHardwareAddrCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowArpSenderHardwareAddrCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowArpSenderHardwareAddrCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowArpSenderHardwareAddrCounter object +func (obj *patternFlowArpSenderHardwareAddrCounter) SetStart(value string) PatternFlowArpSenderHardwareAddrCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowArpSenderHardwareAddrCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowArpSenderHardwareAddrCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowArpSenderHardwareAddrCounter object +func (obj *patternFlowArpSenderHardwareAddrCounter) SetStep(value string) PatternFlowArpSenderHardwareAddrCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpSenderHardwareAddrCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpSenderHardwareAddrCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowArpSenderHardwareAddrCounter object +func (obj *patternFlowArpSenderHardwareAddrCounter) SetCount(value uint32) PatternFlowArpSenderHardwareAddrCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowArpSenderHardwareAddrCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateMac(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpSenderHardwareAddrCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateMac(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpSenderHardwareAddrCounter.Step")) + } + + } + +} + +func (obj *patternFlowArpSenderHardwareAddrCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("00:00:00:00:00:00") + } + if obj.obj.Step == nil { + obj.SetStep("00:00:00:00:00:01") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_arp_sender_hardware_addr_metric_tag.go b/gosnappi/pattern_flow_arp_sender_hardware_addr_metric_tag.go new file mode 100644 index 00000000..d1d07531 --- /dev/null +++ b/gosnappi/pattern_flow_arp_sender_hardware_addr_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpSenderHardwareAddrMetricTag ***** +type patternFlowArpSenderHardwareAddrMetricTag struct { + validation + obj *otg.PatternFlowArpSenderHardwareAddrMetricTag + marshaller marshalPatternFlowArpSenderHardwareAddrMetricTag + unMarshaller unMarshalPatternFlowArpSenderHardwareAddrMetricTag +} + +func NewPatternFlowArpSenderHardwareAddrMetricTag() PatternFlowArpSenderHardwareAddrMetricTag { + obj := patternFlowArpSenderHardwareAddrMetricTag{obj: &otg.PatternFlowArpSenderHardwareAddrMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpSenderHardwareAddrMetricTag) msg() *otg.PatternFlowArpSenderHardwareAddrMetricTag { + return obj.obj +} + +func (obj *patternFlowArpSenderHardwareAddrMetricTag) setMsg(msg *otg.PatternFlowArpSenderHardwareAddrMetricTag) PatternFlowArpSenderHardwareAddrMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpSenderHardwareAddrMetricTag struct { + obj *patternFlowArpSenderHardwareAddrMetricTag +} + +type marshalPatternFlowArpSenderHardwareAddrMetricTag interface { + // ToProto marshals PatternFlowArpSenderHardwareAddrMetricTag to protobuf object *otg.PatternFlowArpSenderHardwareAddrMetricTag + ToProto() (*otg.PatternFlowArpSenderHardwareAddrMetricTag, error) + // ToPbText marshals PatternFlowArpSenderHardwareAddrMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpSenderHardwareAddrMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpSenderHardwareAddrMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpSenderHardwareAddrMetricTag struct { + obj *patternFlowArpSenderHardwareAddrMetricTag +} + +type unMarshalPatternFlowArpSenderHardwareAddrMetricTag interface { + // FromProto unmarshals PatternFlowArpSenderHardwareAddrMetricTag from protobuf object *otg.PatternFlowArpSenderHardwareAddrMetricTag + FromProto(msg *otg.PatternFlowArpSenderHardwareAddrMetricTag) (PatternFlowArpSenderHardwareAddrMetricTag, error) + // FromPbText unmarshals PatternFlowArpSenderHardwareAddrMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpSenderHardwareAddrMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpSenderHardwareAddrMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpSenderHardwareAddrMetricTag) Marshal() marshalPatternFlowArpSenderHardwareAddrMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpSenderHardwareAddrMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpSenderHardwareAddrMetricTag) Unmarshal() unMarshalPatternFlowArpSenderHardwareAddrMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpSenderHardwareAddrMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpSenderHardwareAddrMetricTag) ToProto() (*otg.PatternFlowArpSenderHardwareAddrMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpSenderHardwareAddrMetricTag) FromProto(msg *otg.PatternFlowArpSenderHardwareAddrMetricTag) (PatternFlowArpSenderHardwareAddrMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpSenderHardwareAddrMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpSenderHardwareAddrMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpSenderHardwareAddrMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpSenderHardwareAddrMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpSenderHardwareAddrMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpSenderHardwareAddrMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpSenderHardwareAddrMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpSenderHardwareAddrMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpSenderHardwareAddrMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpSenderHardwareAddrMetricTag) Clone() (PatternFlowArpSenderHardwareAddrMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpSenderHardwareAddrMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpSenderHardwareAddrMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowArpSenderHardwareAddrMetricTag interface { + Validation + // msg marshals PatternFlowArpSenderHardwareAddrMetricTag to protobuf object *otg.PatternFlowArpSenderHardwareAddrMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowArpSenderHardwareAddrMetricTag + // setMsg unmarshals PatternFlowArpSenderHardwareAddrMetricTag from protobuf object *otg.PatternFlowArpSenderHardwareAddrMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowArpSenderHardwareAddrMetricTag) PatternFlowArpSenderHardwareAddrMetricTag + // provides marshal interface + Marshal() marshalPatternFlowArpSenderHardwareAddrMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpSenderHardwareAddrMetricTag + // validate validates PatternFlowArpSenderHardwareAddrMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpSenderHardwareAddrMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowArpSenderHardwareAddrMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowArpSenderHardwareAddrMetricTag + SetName(value string) PatternFlowArpSenderHardwareAddrMetricTag + // Offset returns uint32, set in PatternFlowArpSenderHardwareAddrMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowArpSenderHardwareAddrMetricTag + SetOffset(value uint32) PatternFlowArpSenderHardwareAddrMetricTag + // HasOffset checks if Offset has been set in PatternFlowArpSenderHardwareAddrMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowArpSenderHardwareAddrMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowArpSenderHardwareAddrMetricTag + SetLength(value uint32) PatternFlowArpSenderHardwareAddrMetricTag + // HasLength checks if Length has been set in PatternFlowArpSenderHardwareAddrMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowArpSenderHardwareAddrMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowArpSenderHardwareAddrMetricTag object +func (obj *patternFlowArpSenderHardwareAddrMetricTag) SetName(value string) PatternFlowArpSenderHardwareAddrMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpSenderHardwareAddrMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpSenderHardwareAddrMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowArpSenderHardwareAddrMetricTag object +func (obj *patternFlowArpSenderHardwareAddrMetricTag) SetOffset(value uint32) PatternFlowArpSenderHardwareAddrMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpSenderHardwareAddrMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpSenderHardwareAddrMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowArpSenderHardwareAddrMetricTag object +func (obj *patternFlowArpSenderHardwareAddrMetricTag) SetLength(value uint32) PatternFlowArpSenderHardwareAddrMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowArpSenderHardwareAddrMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowArpSenderHardwareAddrMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 47 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpSenderHardwareAddrMetricTag.Offset <= 47 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 48 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowArpSenderHardwareAddrMetricTag.Length <= 48 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowArpSenderHardwareAddrMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(48) + } + +} diff --git a/gosnappi/pattern_flow_arp_sender_protocol_addr.go b/gosnappi/pattern_flow_arp_sender_protocol_addr.go new file mode 100644 index 00000000..45824f52 --- /dev/null +++ b/gosnappi/pattern_flow_arp_sender_protocol_addr.go @@ -0,0 +1,658 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpSenderProtocolAddr ***** +type patternFlowArpSenderProtocolAddr struct { + validation + obj *otg.PatternFlowArpSenderProtocolAddr + marshaller marshalPatternFlowArpSenderProtocolAddr + unMarshaller unMarshalPatternFlowArpSenderProtocolAddr + incrementHolder PatternFlowArpSenderProtocolAddrCounter + decrementHolder PatternFlowArpSenderProtocolAddrCounter + metricTagsHolder PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter +} + +func NewPatternFlowArpSenderProtocolAddr() PatternFlowArpSenderProtocolAddr { + obj := patternFlowArpSenderProtocolAddr{obj: &otg.PatternFlowArpSenderProtocolAddr{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpSenderProtocolAddr) msg() *otg.PatternFlowArpSenderProtocolAddr { + return obj.obj +} + +func (obj *patternFlowArpSenderProtocolAddr) setMsg(msg *otg.PatternFlowArpSenderProtocolAddr) PatternFlowArpSenderProtocolAddr { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpSenderProtocolAddr struct { + obj *patternFlowArpSenderProtocolAddr +} + +type marshalPatternFlowArpSenderProtocolAddr interface { + // ToProto marshals PatternFlowArpSenderProtocolAddr to protobuf object *otg.PatternFlowArpSenderProtocolAddr + ToProto() (*otg.PatternFlowArpSenderProtocolAddr, error) + // ToPbText marshals PatternFlowArpSenderProtocolAddr to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpSenderProtocolAddr to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpSenderProtocolAddr to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpSenderProtocolAddr struct { + obj *patternFlowArpSenderProtocolAddr +} + +type unMarshalPatternFlowArpSenderProtocolAddr interface { + // FromProto unmarshals PatternFlowArpSenderProtocolAddr from protobuf object *otg.PatternFlowArpSenderProtocolAddr + FromProto(msg *otg.PatternFlowArpSenderProtocolAddr) (PatternFlowArpSenderProtocolAddr, error) + // FromPbText unmarshals PatternFlowArpSenderProtocolAddr from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpSenderProtocolAddr from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpSenderProtocolAddr from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpSenderProtocolAddr) Marshal() marshalPatternFlowArpSenderProtocolAddr { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpSenderProtocolAddr{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpSenderProtocolAddr) Unmarshal() unMarshalPatternFlowArpSenderProtocolAddr { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpSenderProtocolAddr{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpSenderProtocolAddr) ToProto() (*otg.PatternFlowArpSenderProtocolAddr, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpSenderProtocolAddr) FromProto(msg *otg.PatternFlowArpSenderProtocolAddr) (PatternFlowArpSenderProtocolAddr, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpSenderProtocolAddr) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpSenderProtocolAddr) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpSenderProtocolAddr) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpSenderProtocolAddr) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpSenderProtocolAddr) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpSenderProtocolAddr) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpSenderProtocolAddr) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpSenderProtocolAddr) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpSenderProtocolAddr) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpSenderProtocolAddr) Clone() (PatternFlowArpSenderProtocolAddr, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpSenderProtocolAddr() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowArpSenderProtocolAddr) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowArpSenderProtocolAddr is internetwork address of the sender +type PatternFlowArpSenderProtocolAddr interface { + Validation + // msg marshals PatternFlowArpSenderProtocolAddr to protobuf object *otg.PatternFlowArpSenderProtocolAddr + // and doesn't set defaults + msg() *otg.PatternFlowArpSenderProtocolAddr + // setMsg unmarshals PatternFlowArpSenderProtocolAddr from protobuf object *otg.PatternFlowArpSenderProtocolAddr + // and doesn't set defaults + setMsg(*otg.PatternFlowArpSenderProtocolAddr) PatternFlowArpSenderProtocolAddr + // provides marshal interface + Marshal() marshalPatternFlowArpSenderProtocolAddr + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpSenderProtocolAddr + // validate validates PatternFlowArpSenderProtocolAddr + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpSenderProtocolAddr, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowArpSenderProtocolAddrChoiceEnum, set in PatternFlowArpSenderProtocolAddr + Choice() PatternFlowArpSenderProtocolAddrChoiceEnum + // setChoice assigns PatternFlowArpSenderProtocolAddrChoiceEnum provided by user to PatternFlowArpSenderProtocolAddr + setChoice(value PatternFlowArpSenderProtocolAddrChoiceEnum) PatternFlowArpSenderProtocolAddr + // HasChoice checks if Choice has been set in PatternFlowArpSenderProtocolAddr + HasChoice() bool + // Value returns string, set in PatternFlowArpSenderProtocolAddr. + Value() string + // SetValue assigns string provided by user to PatternFlowArpSenderProtocolAddr + SetValue(value string) PatternFlowArpSenderProtocolAddr + // HasValue checks if Value has been set in PatternFlowArpSenderProtocolAddr + HasValue() bool + // Values returns []string, set in PatternFlowArpSenderProtocolAddr. + Values() []string + // SetValues assigns []string provided by user to PatternFlowArpSenderProtocolAddr + SetValues(value []string) PatternFlowArpSenderProtocolAddr + // Increment returns PatternFlowArpSenderProtocolAddrCounter, set in PatternFlowArpSenderProtocolAddr. + // PatternFlowArpSenderProtocolAddrCounter is ipv4 counter pattern + Increment() PatternFlowArpSenderProtocolAddrCounter + // SetIncrement assigns PatternFlowArpSenderProtocolAddrCounter provided by user to PatternFlowArpSenderProtocolAddr. + // PatternFlowArpSenderProtocolAddrCounter is ipv4 counter pattern + SetIncrement(value PatternFlowArpSenderProtocolAddrCounter) PatternFlowArpSenderProtocolAddr + // HasIncrement checks if Increment has been set in PatternFlowArpSenderProtocolAddr + HasIncrement() bool + // Decrement returns PatternFlowArpSenderProtocolAddrCounter, set in PatternFlowArpSenderProtocolAddr. + // PatternFlowArpSenderProtocolAddrCounter is ipv4 counter pattern + Decrement() PatternFlowArpSenderProtocolAddrCounter + // SetDecrement assigns PatternFlowArpSenderProtocolAddrCounter provided by user to PatternFlowArpSenderProtocolAddr. + // PatternFlowArpSenderProtocolAddrCounter is ipv4 counter pattern + SetDecrement(value PatternFlowArpSenderProtocolAddrCounter) PatternFlowArpSenderProtocolAddr + // HasDecrement checks if Decrement has been set in PatternFlowArpSenderProtocolAddr + HasDecrement() bool + // MetricTags returns PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIterIter, set in PatternFlowArpSenderProtocolAddr + MetricTags() PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter + setNil() +} + +type PatternFlowArpSenderProtocolAddrChoiceEnum string + +// Enum of Choice on PatternFlowArpSenderProtocolAddr +var PatternFlowArpSenderProtocolAddrChoice = struct { + VALUE PatternFlowArpSenderProtocolAddrChoiceEnum + VALUES PatternFlowArpSenderProtocolAddrChoiceEnum + INCREMENT PatternFlowArpSenderProtocolAddrChoiceEnum + DECREMENT PatternFlowArpSenderProtocolAddrChoiceEnum +}{ + VALUE: PatternFlowArpSenderProtocolAddrChoiceEnum("value"), + VALUES: PatternFlowArpSenderProtocolAddrChoiceEnum("values"), + INCREMENT: PatternFlowArpSenderProtocolAddrChoiceEnum("increment"), + DECREMENT: PatternFlowArpSenderProtocolAddrChoiceEnum("decrement"), +} + +func (obj *patternFlowArpSenderProtocolAddr) Choice() PatternFlowArpSenderProtocolAddrChoiceEnum { + return PatternFlowArpSenderProtocolAddrChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowArpSenderProtocolAddr) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowArpSenderProtocolAddr) setChoice(value PatternFlowArpSenderProtocolAddrChoiceEnum) PatternFlowArpSenderProtocolAddr { + intValue, ok := otg.PatternFlowArpSenderProtocolAddr_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowArpSenderProtocolAddrChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowArpSenderProtocolAddr_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowArpSenderProtocolAddrChoice.VALUE { + defaultValue := "0.0.0.0" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowArpSenderProtocolAddrChoice.VALUES { + defaultValue := []string{"0.0.0.0"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowArpSenderProtocolAddrChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowArpSenderProtocolAddrCounter().msg() + } + + if value == PatternFlowArpSenderProtocolAddrChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowArpSenderProtocolAddrCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowArpSenderProtocolAddr) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowArpSenderProtocolAddrChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowArpSenderProtocolAddr) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowArpSenderProtocolAddr object +func (obj *patternFlowArpSenderProtocolAddr) SetValue(value string) PatternFlowArpSenderProtocolAddr { + obj.setChoice(PatternFlowArpSenderProtocolAddrChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowArpSenderProtocolAddr) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"0.0.0.0"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowArpSenderProtocolAddr object +func (obj *patternFlowArpSenderProtocolAddr) SetValues(value []string) PatternFlowArpSenderProtocolAddr { + obj.setChoice(PatternFlowArpSenderProtocolAddrChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowArpSenderProtocolAddrCounter +func (obj *patternFlowArpSenderProtocolAddr) Increment() PatternFlowArpSenderProtocolAddrCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowArpSenderProtocolAddrChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowArpSenderProtocolAddrCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowArpSenderProtocolAddrCounter +func (obj *patternFlowArpSenderProtocolAddr) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowArpSenderProtocolAddrCounter value in the PatternFlowArpSenderProtocolAddr object +func (obj *patternFlowArpSenderProtocolAddr) SetIncrement(value PatternFlowArpSenderProtocolAddrCounter) PatternFlowArpSenderProtocolAddr { + obj.setChoice(PatternFlowArpSenderProtocolAddrChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowArpSenderProtocolAddrCounter +func (obj *patternFlowArpSenderProtocolAddr) Decrement() PatternFlowArpSenderProtocolAddrCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowArpSenderProtocolAddrChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowArpSenderProtocolAddrCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowArpSenderProtocolAddrCounter +func (obj *patternFlowArpSenderProtocolAddr) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowArpSenderProtocolAddrCounter value in the PatternFlowArpSenderProtocolAddr object +func (obj *patternFlowArpSenderProtocolAddr) SetDecrement(value PatternFlowArpSenderProtocolAddrCounter) PatternFlowArpSenderProtocolAddr { + obj.setChoice(PatternFlowArpSenderProtocolAddrChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowArpSenderProtocolAddrMetricTag +func (obj *patternFlowArpSenderProtocolAddr) MetricTags() PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowArpSenderProtocolAddrMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter struct { + obj *patternFlowArpSenderProtocolAddr + patternFlowArpSenderProtocolAddrMetricTagSlice []PatternFlowArpSenderProtocolAddrMetricTag + fieldPtr *[]*otg.PatternFlowArpSenderProtocolAddrMetricTag +} + +func newPatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter(ptr *[]*otg.PatternFlowArpSenderProtocolAddrMetricTag) PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter { + return &patternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter interface { + setMsg(*patternFlowArpSenderProtocolAddr) PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter + Items() []PatternFlowArpSenderProtocolAddrMetricTag + Add() PatternFlowArpSenderProtocolAddrMetricTag + Append(items ...PatternFlowArpSenderProtocolAddrMetricTag) PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter + Set(index int, newObj PatternFlowArpSenderProtocolAddrMetricTag) PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter + Clear() PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter + clearHolderSlice() PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter + appendHolderSlice(item PatternFlowArpSenderProtocolAddrMetricTag) PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter +} + +func (obj *patternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter) setMsg(msg *patternFlowArpSenderProtocolAddr) PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowArpSenderProtocolAddrMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter) Items() []PatternFlowArpSenderProtocolAddrMetricTag { + return obj.patternFlowArpSenderProtocolAddrMetricTagSlice +} + +func (obj *patternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter) Add() PatternFlowArpSenderProtocolAddrMetricTag { + newObj := &otg.PatternFlowArpSenderProtocolAddrMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowArpSenderProtocolAddrMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowArpSenderProtocolAddrMetricTagSlice = append(obj.patternFlowArpSenderProtocolAddrMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter) Append(items ...PatternFlowArpSenderProtocolAddrMetricTag) PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowArpSenderProtocolAddrMetricTagSlice = append(obj.patternFlowArpSenderProtocolAddrMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter) Set(index int, newObj PatternFlowArpSenderProtocolAddrMetricTag) PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowArpSenderProtocolAddrMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter) Clear() PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowArpSenderProtocolAddrMetricTag{} + obj.patternFlowArpSenderProtocolAddrMetricTagSlice = []PatternFlowArpSenderProtocolAddrMetricTag{} + } + return obj +} +func (obj *patternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter) clearHolderSlice() PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter { + if len(obj.patternFlowArpSenderProtocolAddrMetricTagSlice) > 0 { + obj.patternFlowArpSenderProtocolAddrMetricTagSlice = []PatternFlowArpSenderProtocolAddrMetricTag{} + } + return obj +} +func (obj *patternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter) appendHolderSlice(item PatternFlowArpSenderProtocolAddrMetricTag) PatternFlowArpSenderProtocolAddrPatternFlowArpSenderProtocolAddrMetricTagIter { + obj.patternFlowArpSenderProtocolAddrMetricTagSlice = append(obj.patternFlowArpSenderProtocolAddrMetricTagSlice, item) + return obj +} + +func (obj *patternFlowArpSenderProtocolAddr) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv4(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpSenderProtocolAddr.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateIpv4Slice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpSenderProtocolAddr.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowArpSenderProtocolAddrMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowArpSenderProtocolAddr) setDefault() { + var choices_set int = 0 + var choice PatternFlowArpSenderProtocolAddrChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowArpSenderProtocolAddrChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowArpSenderProtocolAddrChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowArpSenderProtocolAddrChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowArpSenderProtocolAddrChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowArpSenderProtocolAddrChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowArpSenderProtocolAddr") + } + } else { + intVal := otg.PatternFlowArpSenderProtocolAddr_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowArpSenderProtocolAddr_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_arp_sender_protocol_addr_counter.go b/gosnappi/pattern_flow_arp_sender_protocol_addr_counter.go new file mode 100644 index 00000000..d4bf738c --- /dev/null +++ b/gosnappi/pattern_flow_arp_sender_protocol_addr_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpSenderProtocolAddrCounter ***** +type patternFlowArpSenderProtocolAddrCounter struct { + validation + obj *otg.PatternFlowArpSenderProtocolAddrCounter + marshaller marshalPatternFlowArpSenderProtocolAddrCounter + unMarshaller unMarshalPatternFlowArpSenderProtocolAddrCounter +} + +func NewPatternFlowArpSenderProtocolAddrCounter() PatternFlowArpSenderProtocolAddrCounter { + obj := patternFlowArpSenderProtocolAddrCounter{obj: &otg.PatternFlowArpSenderProtocolAddrCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpSenderProtocolAddrCounter) msg() *otg.PatternFlowArpSenderProtocolAddrCounter { + return obj.obj +} + +func (obj *patternFlowArpSenderProtocolAddrCounter) setMsg(msg *otg.PatternFlowArpSenderProtocolAddrCounter) PatternFlowArpSenderProtocolAddrCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpSenderProtocolAddrCounter struct { + obj *patternFlowArpSenderProtocolAddrCounter +} + +type marshalPatternFlowArpSenderProtocolAddrCounter interface { + // ToProto marshals PatternFlowArpSenderProtocolAddrCounter to protobuf object *otg.PatternFlowArpSenderProtocolAddrCounter + ToProto() (*otg.PatternFlowArpSenderProtocolAddrCounter, error) + // ToPbText marshals PatternFlowArpSenderProtocolAddrCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpSenderProtocolAddrCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpSenderProtocolAddrCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpSenderProtocolAddrCounter struct { + obj *patternFlowArpSenderProtocolAddrCounter +} + +type unMarshalPatternFlowArpSenderProtocolAddrCounter interface { + // FromProto unmarshals PatternFlowArpSenderProtocolAddrCounter from protobuf object *otg.PatternFlowArpSenderProtocolAddrCounter + FromProto(msg *otg.PatternFlowArpSenderProtocolAddrCounter) (PatternFlowArpSenderProtocolAddrCounter, error) + // FromPbText unmarshals PatternFlowArpSenderProtocolAddrCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpSenderProtocolAddrCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpSenderProtocolAddrCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpSenderProtocolAddrCounter) Marshal() marshalPatternFlowArpSenderProtocolAddrCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpSenderProtocolAddrCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpSenderProtocolAddrCounter) Unmarshal() unMarshalPatternFlowArpSenderProtocolAddrCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpSenderProtocolAddrCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpSenderProtocolAddrCounter) ToProto() (*otg.PatternFlowArpSenderProtocolAddrCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpSenderProtocolAddrCounter) FromProto(msg *otg.PatternFlowArpSenderProtocolAddrCounter) (PatternFlowArpSenderProtocolAddrCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpSenderProtocolAddrCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpSenderProtocolAddrCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpSenderProtocolAddrCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpSenderProtocolAddrCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpSenderProtocolAddrCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpSenderProtocolAddrCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpSenderProtocolAddrCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpSenderProtocolAddrCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpSenderProtocolAddrCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpSenderProtocolAddrCounter) Clone() (PatternFlowArpSenderProtocolAddrCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpSenderProtocolAddrCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpSenderProtocolAddrCounter is ipv4 counter pattern +type PatternFlowArpSenderProtocolAddrCounter interface { + Validation + // msg marshals PatternFlowArpSenderProtocolAddrCounter to protobuf object *otg.PatternFlowArpSenderProtocolAddrCounter + // and doesn't set defaults + msg() *otg.PatternFlowArpSenderProtocolAddrCounter + // setMsg unmarshals PatternFlowArpSenderProtocolAddrCounter from protobuf object *otg.PatternFlowArpSenderProtocolAddrCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowArpSenderProtocolAddrCounter) PatternFlowArpSenderProtocolAddrCounter + // provides marshal interface + Marshal() marshalPatternFlowArpSenderProtocolAddrCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpSenderProtocolAddrCounter + // validate validates PatternFlowArpSenderProtocolAddrCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpSenderProtocolAddrCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowArpSenderProtocolAddrCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowArpSenderProtocolAddrCounter + SetStart(value string) PatternFlowArpSenderProtocolAddrCounter + // HasStart checks if Start has been set in PatternFlowArpSenderProtocolAddrCounter + HasStart() bool + // Step returns string, set in PatternFlowArpSenderProtocolAddrCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowArpSenderProtocolAddrCounter + SetStep(value string) PatternFlowArpSenderProtocolAddrCounter + // HasStep checks if Step has been set in PatternFlowArpSenderProtocolAddrCounter + HasStep() bool + // Count returns uint32, set in PatternFlowArpSenderProtocolAddrCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowArpSenderProtocolAddrCounter + SetCount(value uint32) PatternFlowArpSenderProtocolAddrCounter + // HasCount checks if Count has been set in PatternFlowArpSenderProtocolAddrCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowArpSenderProtocolAddrCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowArpSenderProtocolAddrCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowArpSenderProtocolAddrCounter object +func (obj *patternFlowArpSenderProtocolAddrCounter) SetStart(value string) PatternFlowArpSenderProtocolAddrCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowArpSenderProtocolAddrCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowArpSenderProtocolAddrCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowArpSenderProtocolAddrCounter object +func (obj *patternFlowArpSenderProtocolAddrCounter) SetStep(value string) PatternFlowArpSenderProtocolAddrCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpSenderProtocolAddrCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpSenderProtocolAddrCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowArpSenderProtocolAddrCounter object +func (obj *patternFlowArpSenderProtocolAddrCounter) SetCount(value uint32) PatternFlowArpSenderProtocolAddrCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowArpSenderProtocolAddrCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateIpv4(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpSenderProtocolAddrCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateIpv4(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpSenderProtocolAddrCounter.Step")) + } + + } + +} + +func (obj *patternFlowArpSenderProtocolAddrCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("0.0.0.0") + } + if obj.obj.Step == nil { + obj.SetStep("0.0.0.1") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_arp_sender_protocol_addr_metric_tag.go b/gosnappi/pattern_flow_arp_sender_protocol_addr_metric_tag.go new file mode 100644 index 00000000..f1fea2bc --- /dev/null +++ b/gosnappi/pattern_flow_arp_sender_protocol_addr_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpSenderProtocolAddrMetricTag ***** +type patternFlowArpSenderProtocolAddrMetricTag struct { + validation + obj *otg.PatternFlowArpSenderProtocolAddrMetricTag + marshaller marshalPatternFlowArpSenderProtocolAddrMetricTag + unMarshaller unMarshalPatternFlowArpSenderProtocolAddrMetricTag +} + +func NewPatternFlowArpSenderProtocolAddrMetricTag() PatternFlowArpSenderProtocolAddrMetricTag { + obj := patternFlowArpSenderProtocolAddrMetricTag{obj: &otg.PatternFlowArpSenderProtocolAddrMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpSenderProtocolAddrMetricTag) msg() *otg.PatternFlowArpSenderProtocolAddrMetricTag { + return obj.obj +} + +func (obj *patternFlowArpSenderProtocolAddrMetricTag) setMsg(msg *otg.PatternFlowArpSenderProtocolAddrMetricTag) PatternFlowArpSenderProtocolAddrMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpSenderProtocolAddrMetricTag struct { + obj *patternFlowArpSenderProtocolAddrMetricTag +} + +type marshalPatternFlowArpSenderProtocolAddrMetricTag interface { + // ToProto marshals PatternFlowArpSenderProtocolAddrMetricTag to protobuf object *otg.PatternFlowArpSenderProtocolAddrMetricTag + ToProto() (*otg.PatternFlowArpSenderProtocolAddrMetricTag, error) + // ToPbText marshals PatternFlowArpSenderProtocolAddrMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpSenderProtocolAddrMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpSenderProtocolAddrMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpSenderProtocolAddrMetricTag struct { + obj *patternFlowArpSenderProtocolAddrMetricTag +} + +type unMarshalPatternFlowArpSenderProtocolAddrMetricTag interface { + // FromProto unmarshals PatternFlowArpSenderProtocolAddrMetricTag from protobuf object *otg.PatternFlowArpSenderProtocolAddrMetricTag + FromProto(msg *otg.PatternFlowArpSenderProtocolAddrMetricTag) (PatternFlowArpSenderProtocolAddrMetricTag, error) + // FromPbText unmarshals PatternFlowArpSenderProtocolAddrMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpSenderProtocolAddrMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpSenderProtocolAddrMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpSenderProtocolAddrMetricTag) Marshal() marshalPatternFlowArpSenderProtocolAddrMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpSenderProtocolAddrMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpSenderProtocolAddrMetricTag) Unmarshal() unMarshalPatternFlowArpSenderProtocolAddrMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpSenderProtocolAddrMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpSenderProtocolAddrMetricTag) ToProto() (*otg.PatternFlowArpSenderProtocolAddrMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpSenderProtocolAddrMetricTag) FromProto(msg *otg.PatternFlowArpSenderProtocolAddrMetricTag) (PatternFlowArpSenderProtocolAddrMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpSenderProtocolAddrMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpSenderProtocolAddrMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpSenderProtocolAddrMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpSenderProtocolAddrMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpSenderProtocolAddrMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpSenderProtocolAddrMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpSenderProtocolAddrMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpSenderProtocolAddrMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpSenderProtocolAddrMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpSenderProtocolAddrMetricTag) Clone() (PatternFlowArpSenderProtocolAddrMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpSenderProtocolAddrMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpSenderProtocolAddrMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowArpSenderProtocolAddrMetricTag interface { + Validation + // msg marshals PatternFlowArpSenderProtocolAddrMetricTag to protobuf object *otg.PatternFlowArpSenderProtocolAddrMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowArpSenderProtocolAddrMetricTag + // setMsg unmarshals PatternFlowArpSenderProtocolAddrMetricTag from protobuf object *otg.PatternFlowArpSenderProtocolAddrMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowArpSenderProtocolAddrMetricTag) PatternFlowArpSenderProtocolAddrMetricTag + // provides marshal interface + Marshal() marshalPatternFlowArpSenderProtocolAddrMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpSenderProtocolAddrMetricTag + // validate validates PatternFlowArpSenderProtocolAddrMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpSenderProtocolAddrMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowArpSenderProtocolAddrMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowArpSenderProtocolAddrMetricTag + SetName(value string) PatternFlowArpSenderProtocolAddrMetricTag + // Offset returns uint32, set in PatternFlowArpSenderProtocolAddrMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowArpSenderProtocolAddrMetricTag + SetOffset(value uint32) PatternFlowArpSenderProtocolAddrMetricTag + // HasOffset checks if Offset has been set in PatternFlowArpSenderProtocolAddrMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowArpSenderProtocolAddrMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowArpSenderProtocolAddrMetricTag + SetLength(value uint32) PatternFlowArpSenderProtocolAddrMetricTag + // HasLength checks if Length has been set in PatternFlowArpSenderProtocolAddrMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowArpSenderProtocolAddrMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowArpSenderProtocolAddrMetricTag object +func (obj *patternFlowArpSenderProtocolAddrMetricTag) SetName(value string) PatternFlowArpSenderProtocolAddrMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpSenderProtocolAddrMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpSenderProtocolAddrMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowArpSenderProtocolAddrMetricTag object +func (obj *patternFlowArpSenderProtocolAddrMetricTag) SetOffset(value uint32) PatternFlowArpSenderProtocolAddrMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpSenderProtocolAddrMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpSenderProtocolAddrMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowArpSenderProtocolAddrMetricTag object +func (obj *patternFlowArpSenderProtocolAddrMetricTag) SetLength(value uint32) PatternFlowArpSenderProtocolAddrMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowArpSenderProtocolAddrMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowArpSenderProtocolAddrMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpSenderProtocolAddrMetricTag.Offset <= 31 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowArpSenderProtocolAddrMetricTag.Length <= 32 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowArpSenderProtocolAddrMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(32) + } + +} diff --git a/gosnappi/pattern_flow_arp_target_hardware_addr.go b/gosnappi/pattern_flow_arp_target_hardware_addr.go new file mode 100644 index 00000000..d65b35ff --- /dev/null +++ b/gosnappi/pattern_flow_arp_target_hardware_addr.go @@ -0,0 +1,658 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpTargetHardwareAddr ***** +type patternFlowArpTargetHardwareAddr struct { + validation + obj *otg.PatternFlowArpTargetHardwareAddr + marshaller marshalPatternFlowArpTargetHardwareAddr + unMarshaller unMarshalPatternFlowArpTargetHardwareAddr + incrementHolder PatternFlowArpTargetHardwareAddrCounter + decrementHolder PatternFlowArpTargetHardwareAddrCounter + metricTagsHolder PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter +} + +func NewPatternFlowArpTargetHardwareAddr() PatternFlowArpTargetHardwareAddr { + obj := patternFlowArpTargetHardwareAddr{obj: &otg.PatternFlowArpTargetHardwareAddr{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpTargetHardwareAddr) msg() *otg.PatternFlowArpTargetHardwareAddr { + return obj.obj +} + +func (obj *patternFlowArpTargetHardwareAddr) setMsg(msg *otg.PatternFlowArpTargetHardwareAddr) PatternFlowArpTargetHardwareAddr { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpTargetHardwareAddr struct { + obj *patternFlowArpTargetHardwareAddr +} + +type marshalPatternFlowArpTargetHardwareAddr interface { + // ToProto marshals PatternFlowArpTargetHardwareAddr to protobuf object *otg.PatternFlowArpTargetHardwareAddr + ToProto() (*otg.PatternFlowArpTargetHardwareAddr, error) + // ToPbText marshals PatternFlowArpTargetHardwareAddr to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpTargetHardwareAddr to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpTargetHardwareAddr to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpTargetHardwareAddr struct { + obj *patternFlowArpTargetHardwareAddr +} + +type unMarshalPatternFlowArpTargetHardwareAddr interface { + // FromProto unmarshals PatternFlowArpTargetHardwareAddr from protobuf object *otg.PatternFlowArpTargetHardwareAddr + FromProto(msg *otg.PatternFlowArpTargetHardwareAddr) (PatternFlowArpTargetHardwareAddr, error) + // FromPbText unmarshals PatternFlowArpTargetHardwareAddr from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpTargetHardwareAddr from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpTargetHardwareAddr from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpTargetHardwareAddr) Marshal() marshalPatternFlowArpTargetHardwareAddr { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpTargetHardwareAddr{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpTargetHardwareAddr) Unmarshal() unMarshalPatternFlowArpTargetHardwareAddr { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpTargetHardwareAddr{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpTargetHardwareAddr) ToProto() (*otg.PatternFlowArpTargetHardwareAddr, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpTargetHardwareAddr) FromProto(msg *otg.PatternFlowArpTargetHardwareAddr) (PatternFlowArpTargetHardwareAddr, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpTargetHardwareAddr) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpTargetHardwareAddr) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpTargetHardwareAddr) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpTargetHardwareAddr) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpTargetHardwareAddr) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpTargetHardwareAddr) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpTargetHardwareAddr) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpTargetHardwareAddr) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpTargetHardwareAddr) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpTargetHardwareAddr) Clone() (PatternFlowArpTargetHardwareAddr, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpTargetHardwareAddr() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowArpTargetHardwareAddr) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowArpTargetHardwareAddr is media address of the target +type PatternFlowArpTargetHardwareAddr interface { + Validation + // msg marshals PatternFlowArpTargetHardwareAddr to protobuf object *otg.PatternFlowArpTargetHardwareAddr + // and doesn't set defaults + msg() *otg.PatternFlowArpTargetHardwareAddr + // setMsg unmarshals PatternFlowArpTargetHardwareAddr from protobuf object *otg.PatternFlowArpTargetHardwareAddr + // and doesn't set defaults + setMsg(*otg.PatternFlowArpTargetHardwareAddr) PatternFlowArpTargetHardwareAddr + // provides marshal interface + Marshal() marshalPatternFlowArpTargetHardwareAddr + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpTargetHardwareAddr + // validate validates PatternFlowArpTargetHardwareAddr + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpTargetHardwareAddr, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowArpTargetHardwareAddrChoiceEnum, set in PatternFlowArpTargetHardwareAddr + Choice() PatternFlowArpTargetHardwareAddrChoiceEnum + // setChoice assigns PatternFlowArpTargetHardwareAddrChoiceEnum provided by user to PatternFlowArpTargetHardwareAddr + setChoice(value PatternFlowArpTargetHardwareAddrChoiceEnum) PatternFlowArpTargetHardwareAddr + // HasChoice checks if Choice has been set in PatternFlowArpTargetHardwareAddr + HasChoice() bool + // Value returns string, set in PatternFlowArpTargetHardwareAddr. + Value() string + // SetValue assigns string provided by user to PatternFlowArpTargetHardwareAddr + SetValue(value string) PatternFlowArpTargetHardwareAddr + // HasValue checks if Value has been set in PatternFlowArpTargetHardwareAddr + HasValue() bool + // Values returns []string, set in PatternFlowArpTargetHardwareAddr. + Values() []string + // SetValues assigns []string provided by user to PatternFlowArpTargetHardwareAddr + SetValues(value []string) PatternFlowArpTargetHardwareAddr + // Increment returns PatternFlowArpTargetHardwareAddrCounter, set in PatternFlowArpTargetHardwareAddr. + // PatternFlowArpTargetHardwareAddrCounter is mac counter pattern + Increment() PatternFlowArpTargetHardwareAddrCounter + // SetIncrement assigns PatternFlowArpTargetHardwareAddrCounter provided by user to PatternFlowArpTargetHardwareAddr. + // PatternFlowArpTargetHardwareAddrCounter is mac counter pattern + SetIncrement(value PatternFlowArpTargetHardwareAddrCounter) PatternFlowArpTargetHardwareAddr + // HasIncrement checks if Increment has been set in PatternFlowArpTargetHardwareAddr + HasIncrement() bool + // Decrement returns PatternFlowArpTargetHardwareAddrCounter, set in PatternFlowArpTargetHardwareAddr. + // PatternFlowArpTargetHardwareAddrCounter is mac counter pattern + Decrement() PatternFlowArpTargetHardwareAddrCounter + // SetDecrement assigns PatternFlowArpTargetHardwareAddrCounter provided by user to PatternFlowArpTargetHardwareAddr. + // PatternFlowArpTargetHardwareAddrCounter is mac counter pattern + SetDecrement(value PatternFlowArpTargetHardwareAddrCounter) PatternFlowArpTargetHardwareAddr + // HasDecrement checks if Decrement has been set in PatternFlowArpTargetHardwareAddr + HasDecrement() bool + // MetricTags returns PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIterIter, set in PatternFlowArpTargetHardwareAddr + MetricTags() PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter + setNil() +} + +type PatternFlowArpTargetHardwareAddrChoiceEnum string + +// Enum of Choice on PatternFlowArpTargetHardwareAddr +var PatternFlowArpTargetHardwareAddrChoice = struct { + VALUE PatternFlowArpTargetHardwareAddrChoiceEnum + VALUES PatternFlowArpTargetHardwareAddrChoiceEnum + INCREMENT PatternFlowArpTargetHardwareAddrChoiceEnum + DECREMENT PatternFlowArpTargetHardwareAddrChoiceEnum +}{ + VALUE: PatternFlowArpTargetHardwareAddrChoiceEnum("value"), + VALUES: PatternFlowArpTargetHardwareAddrChoiceEnum("values"), + INCREMENT: PatternFlowArpTargetHardwareAddrChoiceEnum("increment"), + DECREMENT: PatternFlowArpTargetHardwareAddrChoiceEnum("decrement"), +} + +func (obj *patternFlowArpTargetHardwareAddr) Choice() PatternFlowArpTargetHardwareAddrChoiceEnum { + return PatternFlowArpTargetHardwareAddrChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowArpTargetHardwareAddr) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowArpTargetHardwareAddr) setChoice(value PatternFlowArpTargetHardwareAddrChoiceEnum) PatternFlowArpTargetHardwareAddr { + intValue, ok := otg.PatternFlowArpTargetHardwareAddr_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowArpTargetHardwareAddrChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowArpTargetHardwareAddr_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowArpTargetHardwareAddrChoice.VALUE { + defaultValue := "00:00:00:00:00:00" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowArpTargetHardwareAddrChoice.VALUES { + defaultValue := []string{"00:00:00:00:00:00"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowArpTargetHardwareAddrChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowArpTargetHardwareAddrCounter().msg() + } + + if value == PatternFlowArpTargetHardwareAddrChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowArpTargetHardwareAddrCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowArpTargetHardwareAddr) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowArpTargetHardwareAddrChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowArpTargetHardwareAddr) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowArpTargetHardwareAddr object +func (obj *patternFlowArpTargetHardwareAddr) SetValue(value string) PatternFlowArpTargetHardwareAddr { + obj.setChoice(PatternFlowArpTargetHardwareAddrChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowArpTargetHardwareAddr) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"00:00:00:00:00:00"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowArpTargetHardwareAddr object +func (obj *patternFlowArpTargetHardwareAddr) SetValues(value []string) PatternFlowArpTargetHardwareAddr { + obj.setChoice(PatternFlowArpTargetHardwareAddrChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowArpTargetHardwareAddrCounter +func (obj *patternFlowArpTargetHardwareAddr) Increment() PatternFlowArpTargetHardwareAddrCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowArpTargetHardwareAddrChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowArpTargetHardwareAddrCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowArpTargetHardwareAddrCounter +func (obj *patternFlowArpTargetHardwareAddr) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowArpTargetHardwareAddrCounter value in the PatternFlowArpTargetHardwareAddr object +func (obj *patternFlowArpTargetHardwareAddr) SetIncrement(value PatternFlowArpTargetHardwareAddrCounter) PatternFlowArpTargetHardwareAddr { + obj.setChoice(PatternFlowArpTargetHardwareAddrChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowArpTargetHardwareAddrCounter +func (obj *patternFlowArpTargetHardwareAddr) Decrement() PatternFlowArpTargetHardwareAddrCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowArpTargetHardwareAddrChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowArpTargetHardwareAddrCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowArpTargetHardwareAddrCounter +func (obj *patternFlowArpTargetHardwareAddr) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowArpTargetHardwareAddrCounter value in the PatternFlowArpTargetHardwareAddr object +func (obj *patternFlowArpTargetHardwareAddr) SetDecrement(value PatternFlowArpTargetHardwareAddrCounter) PatternFlowArpTargetHardwareAddr { + obj.setChoice(PatternFlowArpTargetHardwareAddrChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowArpTargetHardwareAddrMetricTag +func (obj *patternFlowArpTargetHardwareAddr) MetricTags() PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowArpTargetHardwareAddrMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter struct { + obj *patternFlowArpTargetHardwareAddr + patternFlowArpTargetHardwareAddrMetricTagSlice []PatternFlowArpTargetHardwareAddrMetricTag + fieldPtr *[]*otg.PatternFlowArpTargetHardwareAddrMetricTag +} + +func newPatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter(ptr *[]*otg.PatternFlowArpTargetHardwareAddrMetricTag) PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter { + return &patternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter interface { + setMsg(*patternFlowArpTargetHardwareAddr) PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter + Items() []PatternFlowArpTargetHardwareAddrMetricTag + Add() PatternFlowArpTargetHardwareAddrMetricTag + Append(items ...PatternFlowArpTargetHardwareAddrMetricTag) PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter + Set(index int, newObj PatternFlowArpTargetHardwareAddrMetricTag) PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter + Clear() PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter + clearHolderSlice() PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter + appendHolderSlice(item PatternFlowArpTargetHardwareAddrMetricTag) PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter +} + +func (obj *patternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter) setMsg(msg *patternFlowArpTargetHardwareAddr) PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowArpTargetHardwareAddrMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter) Items() []PatternFlowArpTargetHardwareAddrMetricTag { + return obj.patternFlowArpTargetHardwareAddrMetricTagSlice +} + +func (obj *patternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter) Add() PatternFlowArpTargetHardwareAddrMetricTag { + newObj := &otg.PatternFlowArpTargetHardwareAddrMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowArpTargetHardwareAddrMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowArpTargetHardwareAddrMetricTagSlice = append(obj.patternFlowArpTargetHardwareAddrMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter) Append(items ...PatternFlowArpTargetHardwareAddrMetricTag) PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowArpTargetHardwareAddrMetricTagSlice = append(obj.patternFlowArpTargetHardwareAddrMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter) Set(index int, newObj PatternFlowArpTargetHardwareAddrMetricTag) PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowArpTargetHardwareAddrMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter) Clear() PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowArpTargetHardwareAddrMetricTag{} + obj.patternFlowArpTargetHardwareAddrMetricTagSlice = []PatternFlowArpTargetHardwareAddrMetricTag{} + } + return obj +} +func (obj *patternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter) clearHolderSlice() PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter { + if len(obj.patternFlowArpTargetHardwareAddrMetricTagSlice) > 0 { + obj.patternFlowArpTargetHardwareAddrMetricTagSlice = []PatternFlowArpTargetHardwareAddrMetricTag{} + } + return obj +} +func (obj *patternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter) appendHolderSlice(item PatternFlowArpTargetHardwareAddrMetricTag) PatternFlowArpTargetHardwareAddrPatternFlowArpTargetHardwareAddrMetricTagIter { + obj.patternFlowArpTargetHardwareAddrMetricTagSlice = append(obj.patternFlowArpTargetHardwareAddrMetricTagSlice, item) + return obj +} + +func (obj *patternFlowArpTargetHardwareAddr) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateMac(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpTargetHardwareAddr.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateMacSlice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpTargetHardwareAddr.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowArpTargetHardwareAddrMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowArpTargetHardwareAddr) setDefault() { + var choices_set int = 0 + var choice PatternFlowArpTargetHardwareAddrChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowArpTargetHardwareAddrChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowArpTargetHardwareAddrChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowArpTargetHardwareAddrChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowArpTargetHardwareAddrChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowArpTargetHardwareAddrChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowArpTargetHardwareAddr") + } + } else { + intVal := otg.PatternFlowArpTargetHardwareAddr_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowArpTargetHardwareAddr_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_arp_target_hardware_addr_counter.go b/gosnappi/pattern_flow_arp_target_hardware_addr_counter.go new file mode 100644 index 00000000..9fa87d0b --- /dev/null +++ b/gosnappi/pattern_flow_arp_target_hardware_addr_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpTargetHardwareAddrCounter ***** +type patternFlowArpTargetHardwareAddrCounter struct { + validation + obj *otg.PatternFlowArpTargetHardwareAddrCounter + marshaller marshalPatternFlowArpTargetHardwareAddrCounter + unMarshaller unMarshalPatternFlowArpTargetHardwareAddrCounter +} + +func NewPatternFlowArpTargetHardwareAddrCounter() PatternFlowArpTargetHardwareAddrCounter { + obj := patternFlowArpTargetHardwareAddrCounter{obj: &otg.PatternFlowArpTargetHardwareAddrCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpTargetHardwareAddrCounter) msg() *otg.PatternFlowArpTargetHardwareAddrCounter { + return obj.obj +} + +func (obj *patternFlowArpTargetHardwareAddrCounter) setMsg(msg *otg.PatternFlowArpTargetHardwareAddrCounter) PatternFlowArpTargetHardwareAddrCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpTargetHardwareAddrCounter struct { + obj *patternFlowArpTargetHardwareAddrCounter +} + +type marshalPatternFlowArpTargetHardwareAddrCounter interface { + // ToProto marshals PatternFlowArpTargetHardwareAddrCounter to protobuf object *otg.PatternFlowArpTargetHardwareAddrCounter + ToProto() (*otg.PatternFlowArpTargetHardwareAddrCounter, error) + // ToPbText marshals PatternFlowArpTargetHardwareAddrCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpTargetHardwareAddrCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpTargetHardwareAddrCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpTargetHardwareAddrCounter struct { + obj *patternFlowArpTargetHardwareAddrCounter +} + +type unMarshalPatternFlowArpTargetHardwareAddrCounter interface { + // FromProto unmarshals PatternFlowArpTargetHardwareAddrCounter from protobuf object *otg.PatternFlowArpTargetHardwareAddrCounter + FromProto(msg *otg.PatternFlowArpTargetHardwareAddrCounter) (PatternFlowArpTargetHardwareAddrCounter, error) + // FromPbText unmarshals PatternFlowArpTargetHardwareAddrCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpTargetHardwareAddrCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpTargetHardwareAddrCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpTargetHardwareAddrCounter) Marshal() marshalPatternFlowArpTargetHardwareAddrCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpTargetHardwareAddrCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpTargetHardwareAddrCounter) Unmarshal() unMarshalPatternFlowArpTargetHardwareAddrCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpTargetHardwareAddrCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpTargetHardwareAddrCounter) ToProto() (*otg.PatternFlowArpTargetHardwareAddrCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpTargetHardwareAddrCounter) FromProto(msg *otg.PatternFlowArpTargetHardwareAddrCounter) (PatternFlowArpTargetHardwareAddrCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpTargetHardwareAddrCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpTargetHardwareAddrCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpTargetHardwareAddrCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpTargetHardwareAddrCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpTargetHardwareAddrCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpTargetHardwareAddrCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpTargetHardwareAddrCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpTargetHardwareAddrCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpTargetHardwareAddrCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpTargetHardwareAddrCounter) Clone() (PatternFlowArpTargetHardwareAddrCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpTargetHardwareAddrCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpTargetHardwareAddrCounter is mac counter pattern +type PatternFlowArpTargetHardwareAddrCounter interface { + Validation + // msg marshals PatternFlowArpTargetHardwareAddrCounter to protobuf object *otg.PatternFlowArpTargetHardwareAddrCounter + // and doesn't set defaults + msg() *otg.PatternFlowArpTargetHardwareAddrCounter + // setMsg unmarshals PatternFlowArpTargetHardwareAddrCounter from protobuf object *otg.PatternFlowArpTargetHardwareAddrCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowArpTargetHardwareAddrCounter) PatternFlowArpTargetHardwareAddrCounter + // provides marshal interface + Marshal() marshalPatternFlowArpTargetHardwareAddrCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpTargetHardwareAddrCounter + // validate validates PatternFlowArpTargetHardwareAddrCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpTargetHardwareAddrCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowArpTargetHardwareAddrCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowArpTargetHardwareAddrCounter + SetStart(value string) PatternFlowArpTargetHardwareAddrCounter + // HasStart checks if Start has been set in PatternFlowArpTargetHardwareAddrCounter + HasStart() bool + // Step returns string, set in PatternFlowArpTargetHardwareAddrCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowArpTargetHardwareAddrCounter + SetStep(value string) PatternFlowArpTargetHardwareAddrCounter + // HasStep checks if Step has been set in PatternFlowArpTargetHardwareAddrCounter + HasStep() bool + // Count returns uint32, set in PatternFlowArpTargetHardwareAddrCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowArpTargetHardwareAddrCounter + SetCount(value uint32) PatternFlowArpTargetHardwareAddrCounter + // HasCount checks if Count has been set in PatternFlowArpTargetHardwareAddrCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowArpTargetHardwareAddrCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowArpTargetHardwareAddrCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowArpTargetHardwareAddrCounter object +func (obj *patternFlowArpTargetHardwareAddrCounter) SetStart(value string) PatternFlowArpTargetHardwareAddrCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowArpTargetHardwareAddrCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowArpTargetHardwareAddrCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowArpTargetHardwareAddrCounter object +func (obj *patternFlowArpTargetHardwareAddrCounter) SetStep(value string) PatternFlowArpTargetHardwareAddrCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpTargetHardwareAddrCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpTargetHardwareAddrCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowArpTargetHardwareAddrCounter object +func (obj *patternFlowArpTargetHardwareAddrCounter) SetCount(value uint32) PatternFlowArpTargetHardwareAddrCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowArpTargetHardwareAddrCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateMac(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpTargetHardwareAddrCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateMac(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpTargetHardwareAddrCounter.Step")) + } + + } + +} + +func (obj *patternFlowArpTargetHardwareAddrCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("00:00:00:00:00:00") + } + if obj.obj.Step == nil { + obj.SetStep("00:00:00:00:00:01") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_arp_target_hardware_addr_metric_tag.go b/gosnappi/pattern_flow_arp_target_hardware_addr_metric_tag.go new file mode 100644 index 00000000..5d3d602f --- /dev/null +++ b/gosnappi/pattern_flow_arp_target_hardware_addr_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpTargetHardwareAddrMetricTag ***** +type patternFlowArpTargetHardwareAddrMetricTag struct { + validation + obj *otg.PatternFlowArpTargetHardwareAddrMetricTag + marshaller marshalPatternFlowArpTargetHardwareAddrMetricTag + unMarshaller unMarshalPatternFlowArpTargetHardwareAddrMetricTag +} + +func NewPatternFlowArpTargetHardwareAddrMetricTag() PatternFlowArpTargetHardwareAddrMetricTag { + obj := patternFlowArpTargetHardwareAddrMetricTag{obj: &otg.PatternFlowArpTargetHardwareAddrMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpTargetHardwareAddrMetricTag) msg() *otg.PatternFlowArpTargetHardwareAddrMetricTag { + return obj.obj +} + +func (obj *patternFlowArpTargetHardwareAddrMetricTag) setMsg(msg *otg.PatternFlowArpTargetHardwareAddrMetricTag) PatternFlowArpTargetHardwareAddrMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpTargetHardwareAddrMetricTag struct { + obj *patternFlowArpTargetHardwareAddrMetricTag +} + +type marshalPatternFlowArpTargetHardwareAddrMetricTag interface { + // ToProto marshals PatternFlowArpTargetHardwareAddrMetricTag to protobuf object *otg.PatternFlowArpTargetHardwareAddrMetricTag + ToProto() (*otg.PatternFlowArpTargetHardwareAddrMetricTag, error) + // ToPbText marshals PatternFlowArpTargetHardwareAddrMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpTargetHardwareAddrMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpTargetHardwareAddrMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpTargetHardwareAddrMetricTag struct { + obj *patternFlowArpTargetHardwareAddrMetricTag +} + +type unMarshalPatternFlowArpTargetHardwareAddrMetricTag interface { + // FromProto unmarshals PatternFlowArpTargetHardwareAddrMetricTag from protobuf object *otg.PatternFlowArpTargetHardwareAddrMetricTag + FromProto(msg *otg.PatternFlowArpTargetHardwareAddrMetricTag) (PatternFlowArpTargetHardwareAddrMetricTag, error) + // FromPbText unmarshals PatternFlowArpTargetHardwareAddrMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpTargetHardwareAddrMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpTargetHardwareAddrMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpTargetHardwareAddrMetricTag) Marshal() marshalPatternFlowArpTargetHardwareAddrMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpTargetHardwareAddrMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpTargetHardwareAddrMetricTag) Unmarshal() unMarshalPatternFlowArpTargetHardwareAddrMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpTargetHardwareAddrMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpTargetHardwareAddrMetricTag) ToProto() (*otg.PatternFlowArpTargetHardwareAddrMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpTargetHardwareAddrMetricTag) FromProto(msg *otg.PatternFlowArpTargetHardwareAddrMetricTag) (PatternFlowArpTargetHardwareAddrMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpTargetHardwareAddrMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpTargetHardwareAddrMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpTargetHardwareAddrMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpTargetHardwareAddrMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpTargetHardwareAddrMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpTargetHardwareAddrMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpTargetHardwareAddrMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpTargetHardwareAddrMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpTargetHardwareAddrMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpTargetHardwareAddrMetricTag) Clone() (PatternFlowArpTargetHardwareAddrMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpTargetHardwareAddrMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpTargetHardwareAddrMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowArpTargetHardwareAddrMetricTag interface { + Validation + // msg marshals PatternFlowArpTargetHardwareAddrMetricTag to protobuf object *otg.PatternFlowArpTargetHardwareAddrMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowArpTargetHardwareAddrMetricTag + // setMsg unmarshals PatternFlowArpTargetHardwareAddrMetricTag from protobuf object *otg.PatternFlowArpTargetHardwareAddrMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowArpTargetHardwareAddrMetricTag) PatternFlowArpTargetHardwareAddrMetricTag + // provides marshal interface + Marshal() marshalPatternFlowArpTargetHardwareAddrMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpTargetHardwareAddrMetricTag + // validate validates PatternFlowArpTargetHardwareAddrMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpTargetHardwareAddrMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowArpTargetHardwareAddrMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowArpTargetHardwareAddrMetricTag + SetName(value string) PatternFlowArpTargetHardwareAddrMetricTag + // Offset returns uint32, set in PatternFlowArpTargetHardwareAddrMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowArpTargetHardwareAddrMetricTag + SetOffset(value uint32) PatternFlowArpTargetHardwareAddrMetricTag + // HasOffset checks if Offset has been set in PatternFlowArpTargetHardwareAddrMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowArpTargetHardwareAddrMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowArpTargetHardwareAddrMetricTag + SetLength(value uint32) PatternFlowArpTargetHardwareAddrMetricTag + // HasLength checks if Length has been set in PatternFlowArpTargetHardwareAddrMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowArpTargetHardwareAddrMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowArpTargetHardwareAddrMetricTag object +func (obj *patternFlowArpTargetHardwareAddrMetricTag) SetName(value string) PatternFlowArpTargetHardwareAddrMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpTargetHardwareAddrMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpTargetHardwareAddrMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowArpTargetHardwareAddrMetricTag object +func (obj *patternFlowArpTargetHardwareAddrMetricTag) SetOffset(value uint32) PatternFlowArpTargetHardwareAddrMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpTargetHardwareAddrMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpTargetHardwareAddrMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowArpTargetHardwareAddrMetricTag object +func (obj *patternFlowArpTargetHardwareAddrMetricTag) SetLength(value uint32) PatternFlowArpTargetHardwareAddrMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowArpTargetHardwareAddrMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowArpTargetHardwareAddrMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 47 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpTargetHardwareAddrMetricTag.Offset <= 47 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 48 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowArpTargetHardwareAddrMetricTag.Length <= 48 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowArpTargetHardwareAddrMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(48) + } + +} diff --git a/gosnappi/pattern_flow_arp_target_protocol_addr.go b/gosnappi/pattern_flow_arp_target_protocol_addr.go new file mode 100644 index 00000000..6787a3ca --- /dev/null +++ b/gosnappi/pattern_flow_arp_target_protocol_addr.go @@ -0,0 +1,658 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpTargetProtocolAddr ***** +type patternFlowArpTargetProtocolAddr struct { + validation + obj *otg.PatternFlowArpTargetProtocolAddr + marshaller marshalPatternFlowArpTargetProtocolAddr + unMarshaller unMarshalPatternFlowArpTargetProtocolAddr + incrementHolder PatternFlowArpTargetProtocolAddrCounter + decrementHolder PatternFlowArpTargetProtocolAddrCounter + metricTagsHolder PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter +} + +func NewPatternFlowArpTargetProtocolAddr() PatternFlowArpTargetProtocolAddr { + obj := patternFlowArpTargetProtocolAddr{obj: &otg.PatternFlowArpTargetProtocolAddr{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpTargetProtocolAddr) msg() *otg.PatternFlowArpTargetProtocolAddr { + return obj.obj +} + +func (obj *patternFlowArpTargetProtocolAddr) setMsg(msg *otg.PatternFlowArpTargetProtocolAddr) PatternFlowArpTargetProtocolAddr { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpTargetProtocolAddr struct { + obj *patternFlowArpTargetProtocolAddr +} + +type marshalPatternFlowArpTargetProtocolAddr interface { + // ToProto marshals PatternFlowArpTargetProtocolAddr to protobuf object *otg.PatternFlowArpTargetProtocolAddr + ToProto() (*otg.PatternFlowArpTargetProtocolAddr, error) + // ToPbText marshals PatternFlowArpTargetProtocolAddr to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpTargetProtocolAddr to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpTargetProtocolAddr to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpTargetProtocolAddr struct { + obj *patternFlowArpTargetProtocolAddr +} + +type unMarshalPatternFlowArpTargetProtocolAddr interface { + // FromProto unmarshals PatternFlowArpTargetProtocolAddr from protobuf object *otg.PatternFlowArpTargetProtocolAddr + FromProto(msg *otg.PatternFlowArpTargetProtocolAddr) (PatternFlowArpTargetProtocolAddr, error) + // FromPbText unmarshals PatternFlowArpTargetProtocolAddr from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpTargetProtocolAddr from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpTargetProtocolAddr from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpTargetProtocolAddr) Marshal() marshalPatternFlowArpTargetProtocolAddr { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpTargetProtocolAddr{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpTargetProtocolAddr) Unmarshal() unMarshalPatternFlowArpTargetProtocolAddr { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpTargetProtocolAddr{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpTargetProtocolAddr) ToProto() (*otg.PatternFlowArpTargetProtocolAddr, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpTargetProtocolAddr) FromProto(msg *otg.PatternFlowArpTargetProtocolAddr) (PatternFlowArpTargetProtocolAddr, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpTargetProtocolAddr) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpTargetProtocolAddr) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpTargetProtocolAddr) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpTargetProtocolAddr) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpTargetProtocolAddr) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpTargetProtocolAddr) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpTargetProtocolAddr) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpTargetProtocolAddr) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpTargetProtocolAddr) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpTargetProtocolAddr) Clone() (PatternFlowArpTargetProtocolAddr, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpTargetProtocolAddr() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowArpTargetProtocolAddr) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowArpTargetProtocolAddr is internetwork address of the target +type PatternFlowArpTargetProtocolAddr interface { + Validation + // msg marshals PatternFlowArpTargetProtocolAddr to protobuf object *otg.PatternFlowArpTargetProtocolAddr + // and doesn't set defaults + msg() *otg.PatternFlowArpTargetProtocolAddr + // setMsg unmarshals PatternFlowArpTargetProtocolAddr from protobuf object *otg.PatternFlowArpTargetProtocolAddr + // and doesn't set defaults + setMsg(*otg.PatternFlowArpTargetProtocolAddr) PatternFlowArpTargetProtocolAddr + // provides marshal interface + Marshal() marshalPatternFlowArpTargetProtocolAddr + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpTargetProtocolAddr + // validate validates PatternFlowArpTargetProtocolAddr + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpTargetProtocolAddr, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowArpTargetProtocolAddrChoiceEnum, set in PatternFlowArpTargetProtocolAddr + Choice() PatternFlowArpTargetProtocolAddrChoiceEnum + // setChoice assigns PatternFlowArpTargetProtocolAddrChoiceEnum provided by user to PatternFlowArpTargetProtocolAddr + setChoice(value PatternFlowArpTargetProtocolAddrChoiceEnum) PatternFlowArpTargetProtocolAddr + // HasChoice checks if Choice has been set in PatternFlowArpTargetProtocolAddr + HasChoice() bool + // Value returns string, set in PatternFlowArpTargetProtocolAddr. + Value() string + // SetValue assigns string provided by user to PatternFlowArpTargetProtocolAddr + SetValue(value string) PatternFlowArpTargetProtocolAddr + // HasValue checks if Value has been set in PatternFlowArpTargetProtocolAddr + HasValue() bool + // Values returns []string, set in PatternFlowArpTargetProtocolAddr. + Values() []string + // SetValues assigns []string provided by user to PatternFlowArpTargetProtocolAddr + SetValues(value []string) PatternFlowArpTargetProtocolAddr + // Increment returns PatternFlowArpTargetProtocolAddrCounter, set in PatternFlowArpTargetProtocolAddr. + // PatternFlowArpTargetProtocolAddrCounter is ipv4 counter pattern + Increment() PatternFlowArpTargetProtocolAddrCounter + // SetIncrement assigns PatternFlowArpTargetProtocolAddrCounter provided by user to PatternFlowArpTargetProtocolAddr. + // PatternFlowArpTargetProtocolAddrCounter is ipv4 counter pattern + SetIncrement(value PatternFlowArpTargetProtocolAddrCounter) PatternFlowArpTargetProtocolAddr + // HasIncrement checks if Increment has been set in PatternFlowArpTargetProtocolAddr + HasIncrement() bool + // Decrement returns PatternFlowArpTargetProtocolAddrCounter, set in PatternFlowArpTargetProtocolAddr. + // PatternFlowArpTargetProtocolAddrCounter is ipv4 counter pattern + Decrement() PatternFlowArpTargetProtocolAddrCounter + // SetDecrement assigns PatternFlowArpTargetProtocolAddrCounter provided by user to PatternFlowArpTargetProtocolAddr. + // PatternFlowArpTargetProtocolAddrCounter is ipv4 counter pattern + SetDecrement(value PatternFlowArpTargetProtocolAddrCounter) PatternFlowArpTargetProtocolAddr + // HasDecrement checks if Decrement has been set in PatternFlowArpTargetProtocolAddr + HasDecrement() bool + // MetricTags returns PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIterIter, set in PatternFlowArpTargetProtocolAddr + MetricTags() PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter + setNil() +} + +type PatternFlowArpTargetProtocolAddrChoiceEnum string + +// Enum of Choice on PatternFlowArpTargetProtocolAddr +var PatternFlowArpTargetProtocolAddrChoice = struct { + VALUE PatternFlowArpTargetProtocolAddrChoiceEnum + VALUES PatternFlowArpTargetProtocolAddrChoiceEnum + INCREMENT PatternFlowArpTargetProtocolAddrChoiceEnum + DECREMENT PatternFlowArpTargetProtocolAddrChoiceEnum +}{ + VALUE: PatternFlowArpTargetProtocolAddrChoiceEnum("value"), + VALUES: PatternFlowArpTargetProtocolAddrChoiceEnum("values"), + INCREMENT: PatternFlowArpTargetProtocolAddrChoiceEnum("increment"), + DECREMENT: PatternFlowArpTargetProtocolAddrChoiceEnum("decrement"), +} + +func (obj *patternFlowArpTargetProtocolAddr) Choice() PatternFlowArpTargetProtocolAddrChoiceEnum { + return PatternFlowArpTargetProtocolAddrChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowArpTargetProtocolAddr) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowArpTargetProtocolAddr) setChoice(value PatternFlowArpTargetProtocolAddrChoiceEnum) PatternFlowArpTargetProtocolAddr { + intValue, ok := otg.PatternFlowArpTargetProtocolAddr_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowArpTargetProtocolAddrChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowArpTargetProtocolAddr_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowArpTargetProtocolAddrChoice.VALUE { + defaultValue := "0.0.0.0" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowArpTargetProtocolAddrChoice.VALUES { + defaultValue := []string{"0.0.0.0"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowArpTargetProtocolAddrChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowArpTargetProtocolAddrCounter().msg() + } + + if value == PatternFlowArpTargetProtocolAddrChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowArpTargetProtocolAddrCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowArpTargetProtocolAddr) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowArpTargetProtocolAddrChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowArpTargetProtocolAddr) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowArpTargetProtocolAddr object +func (obj *patternFlowArpTargetProtocolAddr) SetValue(value string) PatternFlowArpTargetProtocolAddr { + obj.setChoice(PatternFlowArpTargetProtocolAddrChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowArpTargetProtocolAddr) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"0.0.0.0"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowArpTargetProtocolAddr object +func (obj *patternFlowArpTargetProtocolAddr) SetValues(value []string) PatternFlowArpTargetProtocolAddr { + obj.setChoice(PatternFlowArpTargetProtocolAddrChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowArpTargetProtocolAddrCounter +func (obj *patternFlowArpTargetProtocolAddr) Increment() PatternFlowArpTargetProtocolAddrCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowArpTargetProtocolAddrChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowArpTargetProtocolAddrCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowArpTargetProtocolAddrCounter +func (obj *patternFlowArpTargetProtocolAddr) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowArpTargetProtocolAddrCounter value in the PatternFlowArpTargetProtocolAddr object +func (obj *patternFlowArpTargetProtocolAddr) SetIncrement(value PatternFlowArpTargetProtocolAddrCounter) PatternFlowArpTargetProtocolAddr { + obj.setChoice(PatternFlowArpTargetProtocolAddrChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowArpTargetProtocolAddrCounter +func (obj *patternFlowArpTargetProtocolAddr) Decrement() PatternFlowArpTargetProtocolAddrCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowArpTargetProtocolAddrChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowArpTargetProtocolAddrCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowArpTargetProtocolAddrCounter +func (obj *patternFlowArpTargetProtocolAddr) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowArpTargetProtocolAddrCounter value in the PatternFlowArpTargetProtocolAddr object +func (obj *patternFlowArpTargetProtocolAddr) SetDecrement(value PatternFlowArpTargetProtocolAddrCounter) PatternFlowArpTargetProtocolAddr { + obj.setChoice(PatternFlowArpTargetProtocolAddrChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowArpTargetProtocolAddrMetricTag +func (obj *patternFlowArpTargetProtocolAddr) MetricTags() PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowArpTargetProtocolAddrMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter struct { + obj *patternFlowArpTargetProtocolAddr + patternFlowArpTargetProtocolAddrMetricTagSlice []PatternFlowArpTargetProtocolAddrMetricTag + fieldPtr *[]*otg.PatternFlowArpTargetProtocolAddrMetricTag +} + +func newPatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter(ptr *[]*otg.PatternFlowArpTargetProtocolAddrMetricTag) PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter { + return &patternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter interface { + setMsg(*patternFlowArpTargetProtocolAddr) PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter + Items() []PatternFlowArpTargetProtocolAddrMetricTag + Add() PatternFlowArpTargetProtocolAddrMetricTag + Append(items ...PatternFlowArpTargetProtocolAddrMetricTag) PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter + Set(index int, newObj PatternFlowArpTargetProtocolAddrMetricTag) PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter + Clear() PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter + clearHolderSlice() PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter + appendHolderSlice(item PatternFlowArpTargetProtocolAddrMetricTag) PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter +} + +func (obj *patternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter) setMsg(msg *patternFlowArpTargetProtocolAddr) PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowArpTargetProtocolAddrMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter) Items() []PatternFlowArpTargetProtocolAddrMetricTag { + return obj.patternFlowArpTargetProtocolAddrMetricTagSlice +} + +func (obj *patternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter) Add() PatternFlowArpTargetProtocolAddrMetricTag { + newObj := &otg.PatternFlowArpTargetProtocolAddrMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowArpTargetProtocolAddrMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowArpTargetProtocolAddrMetricTagSlice = append(obj.patternFlowArpTargetProtocolAddrMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter) Append(items ...PatternFlowArpTargetProtocolAddrMetricTag) PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowArpTargetProtocolAddrMetricTagSlice = append(obj.patternFlowArpTargetProtocolAddrMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter) Set(index int, newObj PatternFlowArpTargetProtocolAddrMetricTag) PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowArpTargetProtocolAddrMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter) Clear() PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowArpTargetProtocolAddrMetricTag{} + obj.patternFlowArpTargetProtocolAddrMetricTagSlice = []PatternFlowArpTargetProtocolAddrMetricTag{} + } + return obj +} +func (obj *patternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter) clearHolderSlice() PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter { + if len(obj.patternFlowArpTargetProtocolAddrMetricTagSlice) > 0 { + obj.patternFlowArpTargetProtocolAddrMetricTagSlice = []PatternFlowArpTargetProtocolAddrMetricTag{} + } + return obj +} +func (obj *patternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter) appendHolderSlice(item PatternFlowArpTargetProtocolAddrMetricTag) PatternFlowArpTargetProtocolAddrPatternFlowArpTargetProtocolAddrMetricTagIter { + obj.patternFlowArpTargetProtocolAddrMetricTagSlice = append(obj.patternFlowArpTargetProtocolAddrMetricTagSlice, item) + return obj +} + +func (obj *patternFlowArpTargetProtocolAddr) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv4(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpTargetProtocolAddr.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateIpv4Slice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpTargetProtocolAddr.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowArpTargetProtocolAddrMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowArpTargetProtocolAddr) setDefault() { + var choices_set int = 0 + var choice PatternFlowArpTargetProtocolAddrChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowArpTargetProtocolAddrChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowArpTargetProtocolAddrChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowArpTargetProtocolAddrChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowArpTargetProtocolAddrChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowArpTargetProtocolAddrChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowArpTargetProtocolAddr") + } + } else { + intVal := otg.PatternFlowArpTargetProtocolAddr_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowArpTargetProtocolAddr_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_arp_target_protocol_addr_counter.go b/gosnappi/pattern_flow_arp_target_protocol_addr_counter.go new file mode 100644 index 00000000..23092092 --- /dev/null +++ b/gosnappi/pattern_flow_arp_target_protocol_addr_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpTargetProtocolAddrCounter ***** +type patternFlowArpTargetProtocolAddrCounter struct { + validation + obj *otg.PatternFlowArpTargetProtocolAddrCounter + marshaller marshalPatternFlowArpTargetProtocolAddrCounter + unMarshaller unMarshalPatternFlowArpTargetProtocolAddrCounter +} + +func NewPatternFlowArpTargetProtocolAddrCounter() PatternFlowArpTargetProtocolAddrCounter { + obj := patternFlowArpTargetProtocolAddrCounter{obj: &otg.PatternFlowArpTargetProtocolAddrCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpTargetProtocolAddrCounter) msg() *otg.PatternFlowArpTargetProtocolAddrCounter { + return obj.obj +} + +func (obj *patternFlowArpTargetProtocolAddrCounter) setMsg(msg *otg.PatternFlowArpTargetProtocolAddrCounter) PatternFlowArpTargetProtocolAddrCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpTargetProtocolAddrCounter struct { + obj *patternFlowArpTargetProtocolAddrCounter +} + +type marshalPatternFlowArpTargetProtocolAddrCounter interface { + // ToProto marshals PatternFlowArpTargetProtocolAddrCounter to protobuf object *otg.PatternFlowArpTargetProtocolAddrCounter + ToProto() (*otg.PatternFlowArpTargetProtocolAddrCounter, error) + // ToPbText marshals PatternFlowArpTargetProtocolAddrCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpTargetProtocolAddrCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpTargetProtocolAddrCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpTargetProtocolAddrCounter struct { + obj *patternFlowArpTargetProtocolAddrCounter +} + +type unMarshalPatternFlowArpTargetProtocolAddrCounter interface { + // FromProto unmarshals PatternFlowArpTargetProtocolAddrCounter from protobuf object *otg.PatternFlowArpTargetProtocolAddrCounter + FromProto(msg *otg.PatternFlowArpTargetProtocolAddrCounter) (PatternFlowArpTargetProtocolAddrCounter, error) + // FromPbText unmarshals PatternFlowArpTargetProtocolAddrCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpTargetProtocolAddrCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpTargetProtocolAddrCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpTargetProtocolAddrCounter) Marshal() marshalPatternFlowArpTargetProtocolAddrCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpTargetProtocolAddrCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpTargetProtocolAddrCounter) Unmarshal() unMarshalPatternFlowArpTargetProtocolAddrCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpTargetProtocolAddrCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpTargetProtocolAddrCounter) ToProto() (*otg.PatternFlowArpTargetProtocolAddrCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpTargetProtocolAddrCounter) FromProto(msg *otg.PatternFlowArpTargetProtocolAddrCounter) (PatternFlowArpTargetProtocolAddrCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpTargetProtocolAddrCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpTargetProtocolAddrCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpTargetProtocolAddrCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpTargetProtocolAddrCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpTargetProtocolAddrCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpTargetProtocolAddrCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpTargetProtocolAddrCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpTargetProtocolAddrCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpTargetProtocolAddrCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpTargetProtocolAddrCounter) Clone() (PatternFlowArpTargetProtocolAddrCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpTargetProtocolAddrCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpTargetProtocolAddrCounter is ipv4 counter pattern +type PatternFlowArpTargetProtocolAddrCounter interface { + Validation + // msg marshals PatternFlowArpTargetProtocolAddrCounter to protobuf object *otg.PatternFlowArpTargetProtocolAddrCounter + // and doesn't set defaults + msg() *otg.PatternFlowArpTargetProtocolAddrCounter + // setMsg unmarshals PatternFlowArpTargetProtocolAddrCounter from protobuf object *otg.PatternFlowArpTargetProtocolAddrCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowArpTargetProtocolAddrCounter) PatternFlowArpTargetProtocolAddrCounter + // provides marshal interface + Marshal() marshalPatternFlowArpTargetProtocolAddrCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpTargetProtocolAddrCounter + // validate validates PatternFlowArpTargetProtocolAddrCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpTargetProtocolAddrCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowArpTargetProtocolAddrCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowArpTargetProtocolAddrCounter + SetStart(value string) PatternFlowArpTargetProtocolAddrCounter + // HasStart checks if Start has been set in PatternFlowArpTargetProtocolAddrCounter + HasStart() bool + // Step returns string, set in PatternFlowArpTargetProtocolAddrCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowArpTargetProtocolAddrCounter + SetStep(value string) PatternFlowArpTargetProtocolAddrCounter + // HasStep checks if Step has been set in PatternFlowArpTargetProtocolAddrCounter + HasStep() bool + // Count returns uint32, set in PatternFlowArpTargetProtocolAddrCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowArpTargetProtocolAddrCounter + SetCount(value uint32) PatternFlowArpTargetProtocolAddrCounter + // HasCount checks if Count has been set in PatternFlowArpTargetProtocolAddrCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowArpTargetProtocolAddrCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowArpTargetProtocolAddrCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowArpTargetProtocolAddrCounter object +func (obj *patternFlowArpTargetProtocolAddrCounter) SetStart(value string) PatternFlowArpTargetProtocolAddrCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowArpTargetProtocolAddrCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowArpTargetProtocolAddrCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowArpTargetProtocolAddrCounter object +func (obj *patternFlowArpTargetProtocolAddrCounter) SetStep(value string) PatternFlowArpTargetProtocolAddrCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpTargetProtocolAddrCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowArpTargetProtocolAddrCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowArpTargetProtocolAddrCounter object +func (obj *patternFlowArpTargetProtocolAddrCounter) SetCount(value uint32) PatternFlowArpTargetProtocolAddrCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowArpTargetProtocolAddrCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateIpv4(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpTargetProtocolAddrCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateIpv4(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowArpTargetProtocolAddrCounter.Step")) + } + + } + +} + +func (obj *patternFlowArpTargetProtocolAddrCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("0.0.0.0") + } + if obj.obj.Step == nil { + obj.SetStep("0.0.0.1") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_arp_target_protocol_addr_metric_tag.go b/gosnappi/pattern_flow_arp_target_protocol_addr_metric_tag.go new file mode 100644 index 00000000..42a4d54d --- /dev/null +++ b/gosnappi/pattern_flow_arp_target_protocol_addr_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowArpTargetProtocolAddrMetricTag ***** +type patternFlowArpTargetProtocolAddrMetricTag struct { + validation + obj *otg.PatternFlowArpTargetProtocolAddrMetricTag + marshaller marshalPatternFlowArpTargetProtocolAddrMetricTag + unMarshaller unMarshalPatternFlowArpTargetProtocolAddrMetricTag +} + +func NewPatternFlowArpTargetProtocolAddrMetricTag() PatternFlowArpTargetProtocolAddrMetricTag { + obj := patternFlowArpTargetProtocolAddrMetricTag{obj: &otg.PatternFlowArpTargetProtocolAddrMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowArpTargetProtocolAddrMetricTag) msg() *otg.PatternFlowArpTargetProtocolAddrMetricTag { + return obj.obj +} + +func (obj *patternFlowArpTargetProtocolAddrMetricTag) setMsg(msg *otg.PatternFlowArpTargetProtocolAddrMetricTag) PatternFlowArpTargetProtocolAddrMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowArpTargetProtocolAddrMetricTag struct { + obj *patternFlowArpTargetProtocolAddrMetricTag +} + +type marshalPatternFlowArpTargetProtocolAddrMetricTag interface { + // ToProto marshals PatternFlowArpTargetProtocolAddrMetricTag to protobuf object *otg.PatternFlowArpTargetProtocolAddrMetricTag + ToProto() (*otg.PatternFlowArpTargetProtocolAddrMetricTag, error) + // ToPbText marshals PatternFlowArpTargetProtocolAddrMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowArpTargetProtocolAddrMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowArpTargetProtocolAddrMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowArpTargetProtocolAddrMetricTag struct { + obj *patternFlowArpTargetProtocolAddrMetricTag +} + +type unMarshalPatternFlowArpTargetProtocolAddrMetricTag interface { + // FromProto unmarshals PatternFlowArpTargetProtocolAddrMetricTag from protobuf object *otg.PatternFlowArpTargetProtocolAddrMetricTag + FromProto(msg *otg.PatternFlowArpTargetProtocolAddrMetricTag) (PatternFlowArpTargetProtocolAddrMetricTag, error) + // FromPbText unmarshals PatternFlowArpTargetProtocolAddrMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowArpTargetProtocolAddrMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowArpTargetProtocolAddrMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowArpTargetProtocolAddrMetricTag) Marshal() marshalPatternFlowArpTargetProtocolAddrMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowArpTargetProtocolAddrMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowArpTargetProtocolAddrMetricTag) Unmarshal() unMarshalPatternFlowArpTargetProtocolAddrMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowArpTargetProtocolAddrMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowArpTargetProtocolAddrMetricTag) ToProto() (*otg.PatternFlowArpTargetProtocolAddrMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowArpTargetProtocolAddrMetricTag) FromProto(msg *otg.PatternFlowArpTargetProtocolAddrMetricTag) (PatternFlowArpTargetProtocolAddrMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowArpTargetProtocolAddrMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowArpTargetProtocolAddrMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowArpTargetProtocolAddrMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpTargetProtocolAddrMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowArpTargetProtocolAddrMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowArpTargetProtocolAddrMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowArpTargetProtocolAddrMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowArpTargetProtocolAddrMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowArpTargetProtocolAddrMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowArpTargetProtocolAddrMetricTag) Clone() (PatternFlowArpTargetProtocolAddrMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowArpTargetProtocolAddrMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowArpTargetProtocolAddrMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowArpTargetProtocolAddrMetricTag interface { + Validation + // msg marshals PatternFlowArpTargetProtocolAddrMetricTag to protobuf object *otg.PatternFlowArpTargetProtocolAddrMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowArpTargetProtocolAddrMetricTag + // setMsg unmarshals PatternFlowArpTargetProtocolAddrMetricTag from protobuf object *otg.PatternFlowArpTargetProtocolAddrMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowArpTargetProtocolAddrMetricTag) PatternFlowArpTargetProtocolAddrMetricTag + // provides marshal interface + Marshal() marshalPatternFlowArpTargetProtocolAddrMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowArpTargetProtocolAddrMetricTag + // validate validates PatternFlowArpTargetProtocolAddrMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowArpTargetProtocolAddrMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowArpTargetProtocolAddrMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowArpTargetProtocolAddrMetricTag + SetName(value string) PatternFlowArpTargetProtocolAddrMetricTag + // Offset returns uint32, set in PatternFlowArpTargetProtocolAddrMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowArpTargetProtocolAddrMetricTag + SetOffset(value uint32) PatternFlowArpTargetProtocolAddrMetricTag + // HasOffset checks if Offset has been set in PatternFlowArpTargetProtocolAddrMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowArpTargetProtocolAddrMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowArpTargetProtocolAddrMetricTag + SetLength(value uint32) PatternFlowArpTargetProtocolAddrMetricTag + // HasLength checks if Length has been set in PatternFlowArpTargetProtocolAddrMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowArpTargetProtocolAddrMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowArpTargetProtocolAddrMetricTag object +func (obj *patternFlowArpTargetProtocolAddrMetricTag) SetName(value string) PatternFlowArpTargetProtocolAddrMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpTargetProtocolAddrMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowArpTargetProtocolAddrMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowArpTargetProtocolAddrMetricTag object +func (obj *patternFlowArpTargetProtocolAddrMetricTag) SetOffset(value uint32) PatternFlowArpTargetProtocolAddrMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpTargetProtocolAddrMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowArpTargetProtocolAddrMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowArpTargetProtocolAddrMetricTag object +func (obj *patternFlowArpTargetProtocolAddrMetricTag) SetLength(value uint32) PatternFlowArpTargetProtocolAddrMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowArpTargetProtocolAddrMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowArpTargetProtocolAddrMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowArpTargetProtocolAddrMetricTag.Offset <= 31 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowArpTargetProtocolAddrMetricTag.Length <= 32 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowArpTargetProtocolAddrMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(32) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_dst.go b/gosnappi/pattern_flow_ethernet_dst.go new file mode 100644 index 00000000..095650a4 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_dst.go @@ -0,0 +1,706 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetDst ***** +type patternFlowEthernetDst struct { + validation + obj *otg.PatternFlowEthernetDst + marshaller marshalPatternFlowEthernetDst + unMarshaller unMarshalPatternFlowEthernetDst + incrementHolder PatternFlowEthernetDstCounter + decrementHolder PatternFlowEthernetDstCounter + metricTagsHolder PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter +} + +func NewPatternFlowEthernetDst() PatternFlowEthernetDst { + obj := patternFlowEthernetDst{obj: &otg.PatternFlowEthernetDst{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetDst) msg() *otg.PatternFlowEthernetDst { + return obj.obj +} + +func (obj *patternFlowEthernetDst) setMsg(msg *otg.PatternFlowEthernetDst) PatternFlowEthernetDst { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetDst struct { + obj *patternFlowEthernetDst +} + +type marshalPatternFlowEthernetDst interface { + // ToProto marshals PatternFlowEthernetDst to protobuf object *otg.PatternFlowEthernetDst + ToProto() (*otg.PatternFlowEthernetDst, error) + // ToPbText marshals PatternFlowEthernetDst to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetDst to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetDst to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetDst struct { + obj *patternFlowEthernetDst +} + +type unMarshalPatternFlowEthernetDst interface { + // FromProto unmarshals PatternFlowEthernetDst from protobuf object *otg.PatternFlowEthernetDst + FromProto(msg *otg.PatternFlowEthernetDst) (PatternFlowEthernetDst, error) + // FromPbText unmarshals PatternFlowEthernetDst from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetDst from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetDst from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetDst) Marshal() marshalPatternFlowEthernetDst { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetDst{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetDst) Unmarshal() unMarshalPatternFlowEthernetDst { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetDst{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetDst) ToProto() (*otg.PatternFlowEthernetDst, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetDst) FromProto(msg *otg.PatternFlowEthernetDst) (PatternFlowEthernetDst, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetDst) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetDst) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetDst) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetDst) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetDst) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetDst) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetDst) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetDst) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetDst) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetDst) Clone() (PatternFlowEthernetDst, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetDst() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowEthernetDst) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowEthernetDst is destination MAC address +type PatternFlowEthernetDst interface { + Validation + // msg marshals PatternFlowEthernetDst to protobuf object *otg.PatternFlowEthernetDst + // and doesn't set defaults + msg() *otg.PatternFlowEthernetDst + // setMsg unmarshals PatternFlowEthernetDst from protobuf object *otg.PatternFlowEthernetDst + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetDst) PatternFlowEthernetDst + // provides marshal interface + Marshal() marshalPatternFlowEthernetDst + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetDst + // validate validates PatternFlowEthernetDst + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetDst, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowEthernetDstChoiceEnum, set in PatternFlowEthernetDst + Choice() PatternFlowEthernetDstChoiceEnum + // setChoice assigns PatternFlowEthernetDstChoiceEnum provided by user to PatternFlowEthernetDst + setChoice(value PatternFlowEthernetDstChoiceEnum) PatternFlowEthernetDst + // HasChoice checks if Choice has been set in PatternFlowEthernetDst + HasChoice() bool + // Value returns string, set in PatternFlowEthernetDst. + Value() string + // SetValue assigns string provided by user to PatternFlowEthernetDst + SetValue(value string) PatternFlowEthernetDst + // HasValue checks if Value has been set in PatternFlowEthernetDst + HasValue() bool + // Values returns []string, set in PatternFlowEthernetDst. + Values() []string + // SetValues assigns []string provided by user to PatternFlowEthernetDst + SetValues(value []string) PatternFlowEthernetDst + // Auto returns string, set in PatternFlowEthernetDst. + Auto() string + // HasAuto checks if Auto has been set in PatternFlowEthernetDst + HasAuto() bool + // Increment returns PatternFlowEthernetDstCounter, set in PatternFlowEthernetDst. + // PatternFlowEthernetDstCounter is mac counter pattern + Increment() PatternFlowEthernetDstCounter + // SetIncrement assigns PatternFlowEthernetDstCounter provided by user to PatternFlowEthernetDst. + // PatternFlowEthernetDstCounter is mac counter pattern + SetIncrement(value PatternFlowEthernetDstCounter) PatternFlowEthernetDst + // HasIncrement checks if Increment has been set in PatternFlowEthernetDst + HasIncrement() bool + // Decrement returns PatternFlowEthernetDstCounter, set in PatternFlowEthernetDst. + // PatternFlowEthernetDstCounter is mac counter pattern + Decrement() PatternFlowEthernetDstCounter + // SetDecrement assigns PatternFlowEthernetDstCounter provided by user to PatternFlowEthernetDst. + // PatternFlowEthernetDstCounter is mac counter pattern + SetDecrement(value PatternFlowEthernetDstCounter) PatternFlowEthernetDst + // HasDecrement checks if Decrement has been set in PatternFlowEthernetDst + HasDecrement() bool + // MetricTags returns PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIterIter, set in PatternFlowEthernetDst + MetricTags() PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter + setNil() +} + +type PatternFlowEthernetDstChoiceEnum string + +// Enum of Choice on PatternFlowEthernetDst +var PatternFlowEthernetDstChoice = struct { + VALUE PatternFlowEthernetDstChoiceEnum + VALUES PatternFlowEthernetDstChoiceEnum + AUTO PatternFlowEthernetDstChoiceEnum + INCREMENT PatternFlowEthernetDstChoiceEnum + DECREMENT PatternFlowEthernetDstChoiceEnum +}{ + VALUE: PatternFlowEthernetDstChoiceEnum("value"), + VALUES: PatternFlowEthernetDstChoiceEnum("values"), + AUTO: PatternFlowEthernetDstChoiceEnum("auto"), + INCREMENT: PatternFlowEthernetDstChoiceEnum("increment"), + DECREMENT: PatternFlowEthernetDstChoiceEnum("decrement"), +} + +func (obj *patternFlowEthernetDst) Choice() PatternFlowEthernetDstChoiceEnum { + return PatternFlowEthernetDstChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowEthernetDst) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowEthernetDst) setChoice(value PatternFlowEthernetDstChoiceEnum) PatternFlowEthernetDst { + intValue, ok := otg.PatternFlowEthernetDst_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowEthernetDstChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowEthernetDst_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Auto = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowEthernetDstChoice.VALUE { + defaultValue := "00:00:00:00:00:00" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowEthernetDstChoice.VALUES { + defaultValue := []string{"00:00:00:00:00:00"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowEthernetDstChoice.AUTO { + defaultValue := "00:00:00:00:00:00" + obj.obj.Auto = &defaultValue + } + + if value == PatternFlowEthernetDstChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowEthernetDstCounter().msg() + } + + if value == PatternFlowEthernetDstChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowEthernetDstCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowEthernetDst) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowEthernetDstChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowEthernetDst) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowEthernetDst object +func (obj *patternFlowEthernetDst) SetValue(value string) PatternFlowEthernetDst { + obj.setChoice(PatternFlowEthernetDstChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowEthernetDst) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"00:00:00:00:00:00"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowEthernetDst object +func (obj *patternFlowEthernetDst) SetValues(value []string) PatternFlowEthernetDst { + obj.setChoice(PatternFlowEthernetDstChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a string +func (obj *patternFlowEthernetDst) Auto() string { + + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowEthernetDstChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a string +func (obj *patternFlowEthernetDst) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Increment returns a PatternFlowEthernetDstCounter +func (obj *patternFlowEthernetDst) Increment() PatternFlowEthernetDstCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowEthernetDstChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowEthernetDstCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowEthernetDstCounter +func (obj *patternFlowEthernetDst) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowEthernetDstCounter value in the PatternFlowEthernetDst object +func (obj *patternFlowEthernetDst) SetIncrement(value PatternFlowEthernetDstCounter) PatternFlowEthernetDst { + obj.setChoice(PatternFlowEthernetDstChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowEthernetDstCounter +func (obj *patternFlowEthernetDst) Decrement() PatternFlowEthernetDstCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowEthernetDstChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowEthernetDstCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowEthernetDstCounter +func (obj *patternFlowEthernetDst) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowEthernetDstCounter value in the PatternFlowEthernetDst object +func (obj *patternFlowEthernetDst) SetDecrement(value PatternFlowEthernetDstCounter) PatternFlowEthernetDst { + obj.setChoice(PatternFlowEthernetDstChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowEthernetDstMetricTag +func (obj *patternFlowEthernetDst) MetricTags() PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowEthernetDstMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowEthernetDstPatternFlowEthernetDstMetricTagIter struct { + obj *patternFlowEthernetDst + patternFlowEthernetDstMetricTagSlice []PatternFlowEthernetDstMetricTag + fieldPtr *[]*otg.PatternFlowEthernetDstMetricTag +} + +func newPatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter(ptr *[]*otg.PatternFlowEthernetDstMetricTag) PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter { + return &patternFlowEthernetDstPatternFlowEthernetDstMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter interface { + setMsg(*patternFlowEthernetDst) PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter + Items() []PatternFlowEthernetDstMetricTag + Add() PatternFlowEthernetDstMetricTag + Append(items ...PatternFlowEthernetDstMetricTag) PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter + Set(index int, newObj PatternFlowEthernetDstMetricTag) PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter + Clear() PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter + clearHolderSlice() PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter + appendHolderSlice(item PatternFlowEthernetDstMetricTag) PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter +} + +func (obj *patternFlowEthernetDstPatternFlowEthernetDstMetricTagIter) setMsg(msg *patternFlowEthernetDst) PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowEthernetDstMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowEthernetDstPatternFlowEthernetDstMetricTagIter) Items() []PatternFlowEthernetDstMetricTag { + return obj.patternFlowEthernetDstMetricTagSlice +} + +func (obj *patternFlowEthernetDstPatternFlowEthernetDstMetricTagIter) Add() PatternFlowEthernetDstMetricTag { + newObj := &otg.PatternFlowEthernetDstMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowEthernetDstMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowEthernetDstMetricTagSlice = append(obj.patternFlowEthernetDstMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowEthernetDstPatternFlowEthernetDstMetricTagIter) Append(items ...PatternFlowEthernetDstMetricTag) PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowEthernetDstMetricTagSlice = append(obj.patternFlowEthernetDstMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowEthernetDstPatternFlowEthernetDstMetricTagIter) Set(index int, newObj PatternFlowEthernetDstMetricTag) PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowEthernetDstMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowEthernetDstPatternFlowEthernetDstMetricTagIter) Clear() PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowEthernetDstMetricTag{} + obj.patternFlowEthernetDstMetricTagSlice = []PatternFlowEthernetDstMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetDstPatternFlowEthernetDstMetricTagIter) clearHolderSlice() PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter { + if len(obj.patternFlowEthernetDstMetricTagSlice) > 0 { + obj.patternFlowEthernetDstMetricTagSlice = []PatternFlowEthernetDstMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetDstPatternFlowEthernetDstMetricTagIter) appendHolderSlice(item PatternFlowEthernetDstMetricTag) PatternFlowEthernetDstPatternFlowEthernetDstMetricTagIter { + obj.patternFlowEthernetDstMetricTagSlice = append(obj.patternFlowEthernetDstMetricTagSlice, item) + return obj +} + +func (obj *patternFlowEthernetDst) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateMac(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetDst.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateMacSlice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetDst.Values")) + } + + } + + if obj.obj.Auto != nil { + + err := obj.validateMac(obj.Auto()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetDst.Auto")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowEthernetDstMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowEthernetDst) setDefault() { + var choices_set int = 0 + var choice PatternFlowEthernetDstChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowEthernetDstChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowEthernetDstChoice.VALUES + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowEthernetDstChoice.AUTO + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowEthernetDstChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowEthernetDstChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowEthernetDstChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowEthernetDst") + } + } else { + intVal := otg.PatternFlowEthernetDst_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowEthernetDst_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ethernet_dst_counter.go b/gosnappi/pattern_flow_ethernet_dst_counter.go new file mode 100644 index 00000000..25bdb540 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_dst_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetDstCounter ***** +type patternFlowEthernetDstCounter struct { + validation + obj *otg.PatternFlowEthernetDstCounter + marshaller marshalPatternFlowEthernetDstCounter + unMarshaller unMarshalPatternFlowEthernetDstCounter +} + +func NewPatternFlowEthernetDstCounter() PatternFlowEthernetDstCounter { + obj := patternFlowEthernetDstCounter{obj: &otg.PatternFlowEthernetDstCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetDstCounter) msg() *otg.PatternFlowEthernetDstCounter { + return obj.obj +} + +func (obj *patternFlowEthernetDstCounter) setMsg(msg *otg.PatternFlowEthernetDstCounter) PatternFlowEthernetDstCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetDstCounter struct { + obj *patternFlowEthernetDstCounter +} + +type marshalPatternFlowEthernetDstCounter interface { + // ToProto marshals PatternFlowEthernetDstCounter to protobuf object *otg.PatternFlowEthernetDstCounter + ToProto() (*otg.PatternFlowEthernetDstCounter, error) + // ToPbText marshals PatternFlowEthernetDstCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetDstCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetDstCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetDstCounter struct { + obj *patternFlowEthernetDstCounter +} + +type unMarshalPatternFlowEthernetDstCounter interface { + // FromProto unmarshals PatternFlowEthernetDstCounter from protobuf object *otg.PatternFlowEthernetDstCounter + FromProto(msg *otg.PatternFlowEthernetDstCounter) (PatternFlowEthernetDstCounter, error) + // FromPbText unmarshals PatternFlowEthernetDstCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetDstCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetDstCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetDstCounter) Marshal() marshalPatternFlowEthernetDstCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetDstCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetDstCounter) Unmarshal() unMarshalPatternFlowEthernetDstCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetDstCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetDstCounter) ToProto() (*otg.PatternFlowEthernetDstCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetDstCounter) FromProto(msg *otg.PatternFlowEthernetDstCounter) (PatternFlowEthernetDstCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetDstCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetDstCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetDstCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetDstCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetDstCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetDstCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetDstCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetDstCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetDstCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetDstCounter) Clone() (PatternFlowEthernetDstCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetDstCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetDstCounter is mac counter pattern +type PatternFlowEthernetDstCounter interface { + Validation + // msg marshals PatternFlowEthernetDstCounter to protobuf object *otg.PatternFlowEthernetDstCounter + // and doesn't set defaults + msg() *otg.PatternFlowEthernetDstCounter + // setMsg unmarshals PatternFlowEthernetDstCounter from protobuf object *otg.PatternFlowEthernetDstCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetDstCounter) PatternFlowEthernetDstCounter + // provides marshal interface + Marshal() marshalPatternFlowEthernetDstCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetDstCounter + // validate validates PatternFlowEthernetDstCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetDstCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowEthernetDstCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowEthernetDstCounter + SetStart(value string) PatternFlowEthernetDstCounter + // HasStart checks if Start has been set in PatternFlowEthernetDstCounter + HasStart() bool + // Step returns string, set in PatternFlowEthernetDstCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowEthernetDstCounter + SetStep(value string) PatternFlowEthernetDstCounter + // HasStep checks if Step has been set in PatternFlowEthernetDstCounter + HasStep() bool + // Count returns uint32, set in PatternFlowEthernetDstCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowEthernetDstCounter + SetCount(value uint32) PatternFlowEthernetDstCounter + // HasCount checks if Count has been set in PatternFlowEthernetDstCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowEthernetDstCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowEthernetDstCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowEthernetDstCounter object +func (obj *patternFlowEthernetDstCounter) SetStart(value string) PatternFlowEthernetDstCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowEthernetDstCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowEthernetDstCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowEthernetDstCounter object +func (obj *patternFlowEthernetDstCounter) SetStep(value string) PatternFlowEthernetDstCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetDstCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetDstCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowEthernetDstCounter object +func (obj *patternFlowEthernetDstCounter) SetCount(value uint32) PatternFlowEthernetDstCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowEthernetDstCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateMac(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetDstCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateMac(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetDstCounter.Step")) + } + + } + +} + +func (obj *patternFlowEthernetDstCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("00:00:00:00:00:00") + } + if obj.obj.Step == nil { + obj.SetStep("00:00:00:00:00:01") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_dst_metric_tag.go b/gosnappi/pattern_flow_ethernet_dst_metric_tag.go new file mode 100644 index 00000000..16c0d64b --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_dst_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetDstMetricTag ***** +type patternFlowEthernetDstMetricTag struct { + validation + obj *otg.PatternFlowEthernetDstMetricTag + marshaller marshalPatternFlowEthernetDstMetricTag + unMarshaller unMarshalPatternFlowEthernetDstMetricTag +} + +func NewPatternFlowEthernetDstMetricTag() PatternFlowEthernetDstMetricTag { + obj := patternFlowEthernetDstMetricTag{obj: &otg.PatternFlowEthernetDstMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetDstMetricTag) msg() *otg.PatternFlowEthernetDstMetricTag { + return obj.obj +} + +func (obj *patternFlowEthernetDstMetricTag) setMsg(msg *otg.PatternFlowEthernetDstMetricTag) PatternFlowEthernetDstMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetDstMetricTag struct { + obj *patternFlowEthernetDstMetricTag +} + +type marshalPatternFlowEthernetDstMetricTag interface { + // ToProto marshals PatternFlowEthernetDstMetricTag to protobuf object *otg.PatternFlowEthernetDstMetricTag + ToProto() (*otg.PatternFlowEthernetDstMetricTag, error) + // ToPbText marshals PatternFlowEthernetDstMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetDstMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetDstMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetDstMetricTag struct { + obj *patternFlowEthernetDstMetricTag +} + +type unMarshalPatternFlowEthernetDstMetricTag interface { + // FromProto unmarshals PatternFlowEthernetDstMetricTag from protobuf object *otg.PatternFlowEthernetDstMetricTag + FromProto(msg *otg.PatternFlowEthernetDstMetricTag) (PatternFlowEthernetDstMetricTag, error) + // FromPbText unmarshals PatternFlowEthernetDstMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetDstMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetDstMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetDstMetricTag) Marshal() marshalPatternFlowEthernetDstMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetDstMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetDstMetricTag) Unmarshal() unMarshalPatternFlowEthernetDstMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetDstMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetDstMetricTag) ToProto() (*otg.PatternFlowEthernetDstMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetDstMetricTag) FromProto(msg *otg.PatternFlowEthernetDstMetricTag) (PatternFlowEthernetDstMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetDstMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetDstMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetDstMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetDstMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetDstMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetDstMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetDstMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetDstMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetDstMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetDstMetricTag) Clone() (PatternFlowEthernetDstMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetDstMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetDstMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowEthernetDstMetricTag interface { + Validation + // msg marshals PatternFlowEthernetDstMetricTag to protobuf object *otg.PatternFlowEthernetDstMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowEthernetDstMetricTag + // setMsg unmarshals PatternFlowEthernetDstMetricTag from protobuf object *otg.PatternFlowEthernetDstMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetDstMetricTag) PatternFlowEthernetDstMetricTag + // provides marshal interface + Marshal() marshalPatternFlowEthernetDstMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetDstMetricTag + // validate validates PatternFlowEthernetDstMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetDstMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowEthernetDstMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowEthernetDstMetricTag + SetName(value string) PatternFlowEthernetDstMetricTag + // Offset returns uint32, set in PatternFlowEthernetDstMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowEthernetDstMetricTag + SetOffset(value uint32) PatternFlowEthernetDstMetricTag + // HasOffset checks if Offset has been set in PatternFlowEthernetDstMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowEthernetDstMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowEthernetDstMetricTag + SetLength(value uint32) PatternFlowEthernetDstMetricTag + // HasLength checks if Length has been set in PatternFlowEthernetDstMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowEthernetDstMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowEthernetDstMetricTag object +func (obj *patternFlowEthernetDstMetricTag) SetName(value string) PatternFlowEthernetDstMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetDstMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetDstMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowEthernetDstMetricTag object +func (obj *patternFlowEthernetDstMetricTag) SetOffset(value uint32) PatternFlowEthernetDstMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetDstMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetDstMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowEthernetDstMetricTag object +func (obj *patternFlowEthernetDstMetricTag) SetLength(value uint32) PatternFlowEthernetDstMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowEthernetDstMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowEthernetDstMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 47 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetDstMetricTag.Offset <= 47 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 48 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowEthernetDstMetricTag.Length <= 48 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowEthernetDstMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(48) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_ether_type.go b/gosnappi/pattern_flow_ethernet_ether_type.go new file mode 100644 index 00000000..c2ef6f07 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_ether_type.go @@ -0,0 +1,712 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetEtherType ***** +type patternFlowEthernetEtherType struct { + validation + obj *otg.PatternFlowEthernetEtherType + marshaller marshalPatternFlowEthernetEtherType + unMarshaller unMarshalPatternFlowEthernetEtherType + incrementHolder PatternFlowEthernetEtherTypeCounter + decrementHolder PatternFlowEthernetEtherTypeCounter + metricTagsHolder PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter +} + +func NewPatternFlowEthernetEtherType() PatternFlowEthernetEtherType { + obj := patternFlowEthernetEtherType{obj: &otg.PatternFlowEthernetEtherType{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetEtherType) msg() *otg.PatternFlowEthernetEtherType { + return obj.obj +} + +func (obj *patternFlowEthernetEtherType) setMsg(msg *otg.PatternFlowEthernetEtherType) PatternFlowEthernetEtherType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetEtherType struct { + obj *patternFlowEthernetEtherType +} + +type marshalPatternFlowEthernetEtherType interface { + // ToProto marshals PatternFlowEthernetEtherType to protobuf object *otg.PatternFlowEthernetEtherType + ToProto() (*otg.PatternFlowEthernetEtherType, error) + // ToPbText marshals PatternFlowEthernetEtherType to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetEtherType to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetEtherType to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetEtherType struct { + obj *patternFlowEthernetEtherType +} + +type unMarshalPatternFlowEthernetEtherType interface { + // FromProto unmarshals PatternFlowEthernetEtherType from protobuf object *otg.PatternFlowEthernetEtherType + FromProto(msg *otg.PatternFlowEthernetEtherType) (PatternFlowEthernetEtherType, error) + // FromPbText unmarshals PatternFlowEthernetEtherType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetEtherType from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetEtherType from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetEtherType) Marshal() marshalPatternFlowEthernetEtherType { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetEtherType{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetEtherType) Unmarshal() unMarshalPatternFlowEthernetEtherType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetEtherType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetEtherType) ToProto() (*otg.PatternFlowEthernetEtherType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetEtherType) FromProto(msg *otg.PatternFlowEthernetEtherType) (PatternFlowEthernetEtherType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetEtherType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetEtherType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetEtherType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetEtherType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetEtherType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetEtherType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetEtherType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetEtherType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetEtherType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetEtherType) Clone() (PatternFlowEthernetEtherType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetEtherType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowEthernetEtherType) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowEthernetEtherType is ethernet type +type PatternFlowEthernetEtherType interface { + Validation + // msg marshals PatternFlowEthernetEtherType to protobuf object *otg.PatternFlowEthernetEtherType + // and doesn't set defaults + msg() *otg.PatternFlowEthernetEtherType + // setMsg unmarshals PatternFlowEthernetEtherType from protobuf object *otg.PatternFlowEthernetEtherType + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetEtherType) PatternFlowEthernetEtherType + // provides marshal interface + Marshal() marshalPatternFlowEthernetEtherType + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetEtherType + // validate validates PatternFlowEthernetEtherType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetEtherType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowEthernetEtherTypeChoiceEnum, set in PatternFlowEthernetEtherType + Choice() PatternFlowEthernetEtherTypeChoiceEnum + // setChoice assigns PatternFlowEthernetEtherTypeChoiceEnum provided by user to PatternFlowEthernetEtherType + setChoice(value PatternFlowEthernetEtherTypeChoiceEnum) PatternFlowEthernetEtherType + // HasChoice checks if Choice has been set in PatternFlowEthernetEtherType + HasChoice() bool + // Value returns uint32, set in PatternFlowEthernetEtherType. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowEthernetEtherType + SetValue(value uint32) PatternFlowEthernetEtherType + // HasValue checks if Value has been set in PatternFlowEthernetEtherType + HasValue() bool + // Values returns []uint32, set in PatternFlowEthernetEtherType. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowEthernetEtherType + SetValues(value []uint32) PatternFlowEthernetEtherType + // Auto returns uint32, set in PatternFlowEthernetEtherType. + Auto() uint32 + // HasAuto checks if Auto has been set in PatternFlowEthernetEtherType + HasAuto() bool + // Increment returns PatternFlowEthernetEtherTypeCounter, set in PatternFlowEthernetEtherType. + // PatternFlowEthernetEtherTypeCounter is integer counter pattern + Increment() PatternFlowEthernetEtherTypeCounter + // SetIncrement assigns PatternFlowEthernetEtherTypeCounter provided by user to PatternFlowEthernetEtherType. + // PatternFlowEthernetEtherTypeCounter is integer counter pattern + SetIncrement(value PatternFlowEthernetEtherTypeCounter) PatternFlowEthernetEtherType + // HasIncrement checks if Increment has been set in PatternFlowEthernetEtherType + HasIncrement() bool + // Decrement returns PatternFlowEthernetEtherTypeCounter, set in PatternFlowEthernetEtherType. + // PatternFlowEthernetEtherTypeCounter is integer counter pattern + Decrement() PatternFlowEthernetEtherTypeCounter + // SetDecrement assigns PatternFlowEthernetEtherTypeCounter provided by user to PatternFlowEthernetEtherType. + // PatternFlowEthernetEtherTypeCounter is integer counter pattern + SetDecrement(value PatternFlowEthernetEtherTypeCounter) PatternFlowEthernetEtherType + // HasDecrement checks if Decrement has been set in PatternFlowEthernetEtherType + HasDecrement() bool + // MetricTags returns PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIterIter, set in PatternFlowEthernetEtherType + MetricTags() PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter + setNil() +} + +type PatternFlowEthernetEtherTypeChoiceEnum string + +// Enum of Choice on PatternFlowEthernetEtherType +var PatternFlowEthernetEtherTypeChoice = struct { + VALUE PatternFlowEthernetEtherTypeChoiceEnum + VALUES PatternFlowEthernetEtherTypeChoiceEnum + AUTO PatternFlowEthernetEtherTypeChoiceEnum + INCREMENT PatternFlowEthernetEtherTypeChoiceEnum + DECREMENT PatternFlowEthernetEtherTypeChoiceEnum +}{ + VALUE: PatternFlowEthernetEtherTypeChoiceEnum("value"), + VALUES: PatternFlowEthernetEtherTypeChoiceEnum("values"), + AUTO: PatternFlowEthernetEtherTypeChoiceEnum("auto"), + INCREMENT: PatternFlowEthernetEtherTypeChoiceEnum("increment"), + DECREMENT: PatternFlowEthernetEtherTypeChoiceEnum("decrement"), +} + +func (obj *patternFlowEthernetEtherType) Choice() PatternFlowEthernetEtherTypeChoiceEnum { + return PatternFlowEthernetEtherTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowEthernetEtherType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowEthernetEtherType) setChoice(value PatternFlowEthernetEtherTypeChoiceEnum) PatternFlowEthernetEtherType { + intValue, ok := otg.PatternFlowEthernetEtherType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowEthernetEtherTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowEthernetEtherType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Auto = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowEthernetEtherTypeChoice.VALUE { + defaultValue := uint32(65535) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowEthernetEtherTypeChoice.VALUES { + defaultValue := []uint32{65535} + obj.obj.Values = defaultValue + } + + if value == PatternFlowEthernetEtherTypeChoice.AUTO { + defaultValue := uint32(65535) + obj.obj.Auto = &defaultValue + } + + if value == PatternFlowEthernetEtherTypeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowEthernetEtherTypeCounter().msg() + } + + if value == PatternFlowEthernetEtherTypeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowEthernetEtherTypeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowEthernetEtherType) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowEthernetEtherTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowEthernetEtherType) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowEthernetEtherType object +func (obj *patternFlowEthernetEtherType) SetValue(value uint32) PatternFlowEthernetEtherType { + obj.setChoice(PatternFlowEthernetEtherTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowEthernetEtherType) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{65535}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowEthernetEtherType object +func (obj *patternFlowEthernetEtherType) SetValues(value []uint32) PatternFlowEthernetEtherType { + obj.setChoice(PatternFlowEthernetEtherTypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowEthernetEtherType) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowEthernetEtherTypeChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowEthernetEtherType) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Increment returns a PatternFlowEthernetEtherTypeCounter +func (obj *patternFlowEthernetEtherType) Increment() PatternFlowEthernetEtherTypeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowEthernetEtherTypeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowEthernetEtherTypeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowEthernetEtherTypeCounter +func (obj *patternFlowEthernetEtherType) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowEthernetEtherTypeCounter value in the PatternFlowEthernetEtherType object +func (obj *patternFlowEthernetEtherType) SetIncrement(value PatternFlowEthernetEtherTypeCounter) PatternFlowEthernetEtherType { + obj.setChoice(PatternFlowEthernetEtherTypeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowEthernetEtherTypeCounter +func (obj *patternFlowEthernetEtherType) Decrement() PatternFlowEthernetEtherTypeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowEthernetEtherTypeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowEthernetEtherTypeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowEthernetEtherTypeCounter +func (obj *patternFlowEthernetEtherType) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowEthernetEtherTypeCounter value in the PatternFlowEthernetEtherType object +func (obj *patternFlowEthernetEtherType) SetDecrement(value PatternFlowEthernetEtherTypeCounter) PatternFlowEthernetEtherType { + obj.setChoice(PatternFlowEthernetEtherTypeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowEthernetEtherTypeMetricTag +func (obj *patternFlowEthernetEtherType) MetricTags() PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowEthernetEtherTypeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter struct { + obj *patternFlowEthernetEtherType + patternFlowEthernetEtherTypeMetricTagSlice []PatternFlowEthernetEtherTypeMetricTag + fieldPtr *[]*otg.PatternFlowEthernetEtherTypeMetricTag +} + +func newPatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter(ptr *[]*otg.PatternFlowEthernetEtherTypeMetricTag) PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter { + return &patternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter interface { + setMsg(*patternFlowEthernetEtherType) PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter + Items() []PatternFlowEthernetEtherTypeMetricTag + Add() PatternFlowEthernetEtherTypeMetricTag + Append(items ...PatternFlowEthernetEtherTypeMetricTag) PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter + Set(index int, newObj PatternFlowEthernetEtherTypeMetricTag) PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter + Clear() PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter + clearHolderSlice() PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter + appendHolderSlice(item PatternFlowEthernetEtherTypeMetricTag) PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter +} + +func (obj *patternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter) setMsg(msg *patternFlowEthernetEtherType) PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowEthernetEtherTypeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter) Items() []PatternFlowEthernetEtherTypeMetricTag { + return obj.patternFlowEthernetEtherTypeMetricTagSlice +} + +func (obj *patternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter) Add() PatternFlowEthernetEtherTypeMetricTag { + newObj := &otg.PatternFlowEthernetEtherTypeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowEthernetEtherTypeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowEthernetEtherTypeMetricTagSlice = append(obj.patternFlowEthernetEtherTypeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter) Append(items ...PatternFlowEthernetEtherTypeMetricTag) PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowEthernetEtherTypeMetricTagSlice = append(obj.patternFlowEthernetEtherTypeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter) Set(index int, newObj PatternFlowEthernetEtherTypeMetricTag) PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowEthernetEtherTypeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter) Clear() PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowEthernetEtherTypeMetricTag{} + obj.patternFlowEthernetEtherTypeMetricTagSlice = []PatternFlowEthernetEtherTypeMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter) clearHolderSlice() PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter { + if len(obj.patternFlowEthernetEtherTypeMetricTagSlice) > 0 { + obj.patternFlowEthernetEtherTypeMetricTagSlice = []PatternFlowEthernetEtherTypeMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter) appendHolderSlice(item PatternFlowEthernetEtherTypeMetricTag) PatternFlowEthernetEtherTypePatternFlowEthernetEtherTypeMetricTagIter { + obj.patternFlowEthernetEtherTypeMetricTagSlice = append(obj.patternFlowEthernetEtherTypeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowEthernetEtherType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetEtherType.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowEthernetEtherType.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Auto != nil { + + if *obj.obj.Auto > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetEtherType.Auto <= 65535 but Got %d", *obj.obj.Auto)) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowEthernetEtherTypeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowEthernetEtherType) setDefault() { + var choices_set int = 0 + var choice PatternFlowEthernetEtherTypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowEthernetEtherTypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowEthernetEtherTypeChoice.VALUES + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowEthernetEtherTypeChoice.AUTO + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowEthernetEtherTypeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowEthernetEtherTypeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowEthernetEtherTypeChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowEthernetEtherType") + } + } else { + intVal := otg.PatternFlowEthernetEtherType_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowEthernetEtherType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ethernet_ether_type_counter.go b/gosnappi/pattern_flow_ethernet_ether_type_counter.go new file mode 100644 index 00000000..4e6efee8 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_ether_type_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetEtherTypeCounter ***** +type patternFlowEthernetEtherTypeCounter struct { + validation + obj *otg.PatternFlowEthernetEtherTypeCounter + marshaller marshalPatternFlowEthernetEtherTypeCounter + unMarshaller unMarshalPatternFlowEthernetEtherTypeCounter +} + +func NewPatternFlowEthernetEtherTypeCounter() PatternFlowEthernetEtherTypeCounter { + obj := patternFlowEthernetEtherTypeCounter{obj: &otg.PatternFlowEthernetEtherTypeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetEtherTypeCounter) msg() *otg.PatternFlowEthernetEtherTypeCounter { + return obj.obj +} + +func (obj *patternFlowEthernetEtherTypeCounter) setMsg(msg *otg.PatternFlowEthernetEtherTypeCounter) PatternFlowEthernetEtherTypeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetEtherTypeCounter struct { + obj *patternFlowEthernetEtherTypeCounter +} + +type marshalPatternFlowEthernetEtherTypeCounter interface { + // ToProto marshals PatternFlowEthernetEtherTypeCounter to protobuf object *otg.PatternFlowEthernetEtherTypeCounter + ToProto() (*otg.PatternFlowEthernetEtherTypeCounter, error) + // ToPbText marshals PatternFlowEthernetEtherTypeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetEtherTypeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetEtherTypeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetEtherTypeCounter struct { + obj *patternFlowEthernetEtherTypeCounter +} + +type unMarshalPatternFlowEthernetEtherTypeCounter interface { + // FromProto unmarshals PatternFlowEthernetEtherTypeCounter from protobuf object *otg.PatternFlowEthernetEtherTypeCounter + FromProto(msg *otg.PatternFlowEthernetEtherTypeCounter) (PatternFlowEthernetEtherTypeCounter, error) + // FromPbText unmarshals PatternFlowEthernetEtherTypeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetEtherTypeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetEtherTypeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetEtherTypeCounter) Marshal() marshalPatternFlowEthernetEtherTypeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetEtherTypeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetEtherTypeCounter) Unmarshal() unMarshalPatternFlowEthernetEtherTypeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetEtherTypeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetEtherTypeCounter) ToProto() (*otg.PatternFlowEthernetEtherTypeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetEtherTypeCounter) FromProto(msg *otg.PatternFlowEthernetEtherTypeCounter) (PatternFlowEthernetEtherTypeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetEtherTypeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetEtherTypeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetEtherTypeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetEtherTypeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetEtherTypeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetEtherTypeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetEtherTypeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetEtherTypeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetEtherTypeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetEtherTypeCounter) Clone() (PatternFlowEthernetEtherTypeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetEtherTypeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetEtherTypeCounter is integer counter pattern +type PatternFlowEthernetEtherTypeCounter interface { + Validation + // msg marshals PatternFlowEthernetEtherTypeCounter to protobuf object *otg.PatternFlowEthernetEtherTypeCounter + // and doesn't set defaults + msg() *otg.PatternFlowEthernetEtherTypeCounter + // setMsg unmarshals PatternFlowEthernetEtherTypeCounter from protobuf object *otg.PatternFlowEthernetEtherTypeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetEtherTypeCounter) PatternFlowEthernetEtherTypeCounter + // provides marshal interface + Marshal() marshalPatternFlowEthernetEtherTypeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetEtherTypeCounter + // validate validates PatternFlowEthernetEtherTypeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetEtherTypeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowEthernetEtherTypeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowEthernetEtherTypeCounter + SetStart(value uint32) PatternFlowEthernetEtherTypeCounter + // HasStart checks if Start has been set in PatternFlowEthernetEtherTypeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowEthernetEtherTypeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowEthernetEtherTypeCounter + SetStep(value uint32) PatternFlowEthernetEtherTypeCounter + // HasStep checks if Step has been set in PatternFlowEthernetEtherTypeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowEthernetEtherTypeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowEthernetEtherTypeCounter + SetCount(value uint32) PatternFlowEthernetEtherTypeCounter + // HasCount checks if Count has been set in PatternFlowEthernetEtherTypeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowEthernetEtherTypeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowEthernetEtherTypeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowEthernetEtherTypeCounter object +func (obj *patternFlowEthernetEtherTypeCounter) SetStart(value uint32) PatternFlowEthernetEtherTypeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowEthernetEtherTypeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowEthernetEtherTypeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowEthernetEtherTypeCounter object +func (obj *patternFlowEthernetEtherTypeCounter) SetStep(value uint32) PatternFlowEthernetEtherTypeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetEtherTypeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetEtherTypeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowEthernetEtherTypeCounter object +func (obj *patternFlowEthernetEtherTypeCounter) SetCount(value uint32) PatternFlowEthernetEtherTypeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowEthernetEtherTypeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetEtherTypeCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetEtherTypeCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetEtherTypeCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowEthernetEtherTypeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(65535) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_ether_type_metric_tag.go b/gosnappi/pattern_flow_ethernet_ether_type_metric_tag.go new file mode 100644 index 00000000..6681c7db --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_ether_type_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetEtherTypeMetricTag ***** +type patternFlowEthernetEtherTypeMetricTag struct { + validation + obj *otg.PatternFlowEthernetEtherTypeMetricTag + marshaller marshalPatternFlowEthernetEtherTypeMetricTag + unMarshaller unMarshalPatternFlowEthernetEtherTypeMetricTag +} + +func NewPatternFlowEthernetEtherTypeMetricTag() PatternFlowEthernetEtherTypeMetricTag { + obj := patternFlowEthernetEtherTypeMetricTag{obj: &otg.PatternFlowEthernetEtherTypeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetEtherTypeMetricTag) msg() *otg.PatternFlowEthernetEtherTypeMetricTag { + return obj.obj +} + +func (obj *patternFlowEthernetEtherTypeMetricTag) setMsg(msg *otg.PatternFlowEthernetEtherTypeMetricTag) PatternFlowEthernetEtherTypeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetEtherTypeMetricTag struct { + obj *patternFlowEthernetEtherTypeMetricTag +} + +type marshalPatternFlowEthernetEtherTypeMetricTag interface { + // ToProto marshals PatternFlowEthernetEtherTypeMetricTag to protobuf object *otg.PatternFlowEthernetEtherTypeMetricTag + ToProto() (*otg.PatternFlowEthernetEtherTypeMetricTag, error) + // ToPbText marshals PatternFlowEthernetEtherTypeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetEtherTypeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetEtherTypeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetEtherTypeMetricTag struct { + obj *patternFlowEthernetEtherTypeMetricTag +} + +type unMarshalPatternFlowEthernetEtherTypeMetricTag interface { + // FromProto unmarshals PatternFlowEthernetEtherTypeMetricTag from protobuf object *otg.PatternFlowEthernetEtherTypeMetricTag + FromProto(msg *otg.PatternFlowEthernetEtherTypeMetricTag) (PatternFlowEthernetEtherTypeMetricTag, error) + // FromPbText unmarshals PatternFlowEthernetEtherTypeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetEtherTypeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetEtherTypeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetEtherTypeMetricTag) Marshal() marshalPatternFlowEthernetEtherTypeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetEtherTypeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetEtherTypeMetricTag) Unmarshal() unMarshalPatternFlowEthernetEtherTypeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetEtherTypeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetEtherTypeMetricTag) ToProto() (*otg.PatternFlowEthernetEtherTypeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetEtherTypeMetricTag) FromProto(msg *otg.PatternFlowEthernetEtherTypeMetricTag) (PatternFlowEthernetEtherTypeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetEtherTypeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetEtherTypeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetEtherTypeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetEtherTypeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetEtherTypeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetEtherTypeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetEtherTypeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetEtherTypeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetEtherTypeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetEtherTypeMetricTag) Clone() (PatternFlowEthernetEtherTypeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetEtherTypeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetEtherTypeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowEthernetEtherTypeMetricTag interface { + Validation + // msg marshals PatternFlowEthernetEtherTypeMetricTag to protobuf object *otg.PatternFlowEthernetEtherTypeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowEthernetEtherTypeMetricTag + // setMsg unmarshals PatternFlowEthernetEtherTypeMetricTag from protobuf object *otg.PatternFlowEthernetEtherTypeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetEtherTypeMetricTag) PatternFlowEthernetEtherTypeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowEthernetEtherTypeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetEtherTypeMetricTag + // validate validates PatternFlowEthernetEtherTypeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetEtherTypeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowEthernetEtherTypeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowEthernetEtherTypeMetricTag + SetName(value string) PatternFlowEthernetEtherTypeMetricTag + // Offset returns uint32, set in PatternFlowEthernetEtherTypeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowEthernetEtherTypeMetricTag + SetOffset(value uint32) PatternFlowEthernetEtherTypeMetricTag + // HasOffset checks if Offset has been set in PatternFlowEthernetEtherTypeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowEthernetEtherTypeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowEthernetEtherTypeMetricTag + SetLength(value uint32) PatternFlowEthernetEtherTypeMetricTag + // HasLength checks if Length has been set in PatternFlowEthernetEtherTypeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowEthernetEtherTypeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowEthernetEtherTypeMetricTag object +func (obj *patternFlowEthernetEtherTypeMetricTag) SetName(value string) PatternFlowEthernetEtherTypeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetEtherTypeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetEtherTypeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowEthernetEtherTypeMetricTag object +func (obj *patternFlowEthernetEtherTypeMetricTag) SetOffset(value uint32) PatternFlowEthernetEtherTypeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetEtherTypeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetEtherTypeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowEthernetEtherTypeMetricTag object +func (obj *patternFlowEthernetEtherTypeMetricTag) SetLength(value uint32) PatternFlowEthernetEtherTypeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowEthernetEtherTypeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowEthernetEtherTypeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetEtherTypeMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowEthernetEtherTypeMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowEthernetEtherTypeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_control_op_code.go b/gosnappi/pattern_flow_ethernet_pause_control_op_code.go new file mode 100644 index 00000000..fbc2de1d --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_control_op_code.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseControlOpCode ***** +type patternFlowEthernetPauseControlOpCode struct { + validation + obj *otg.PatternFlowEthernetPauseControlOpCode + marshaller marshalPatternFlowEthernetPauseControlOpCode + unMarshaller unMarshalPatternFlowEthernetPauseControlOpCode + incrementHolder PatternFlowEthernetPauseControlOpCodeCounter + decrementHolder PatternFlowEthernetPauseControlOpCodeCounter + metricTagsHolder PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter +} + +func NewPatternFlowEthernetPauseControlOpCode() PatternFlowEthernetPauseControlOpCode { + obj := patternFlowEthernetPauseControlOpCode{obj: &otg.PatternFlowEthernetPauseControlOpCode{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseControlOpCode) msg() *otg.PatternFlowEthernetPauseControlOpCode { + return obj.obj +} + +func (obj *patternFlowEthernetPauseControlOpCode) setMsg(msg *otg.PatternFlowEthernetPauseControlOpCode) PatternFlowEthernetPauseControlOpCode { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseControlOpCode struct { + obj *patternFlowEthernetPauseControlOpCode +} + +type marshalPatternFlowEthernetPauseControlOpCode interface { + // ToProto marshals PatternFlowEthernetPauseControlOpCode to protobuf object *otg.PatternFlowEthernetPauseControlOpCode + ToProto() (*otg.PatternFlowEthernetPauseControlOpCode, error) + // ToPbText marshals PatternFlowEthernetPauseControlOpCode to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseControlOpCode to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseControlOpCode to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseControlOpCode struct { + obj *patternFlowEthernetPauseControlOpCode +} + +type unMarshalPatternFlowEthernetPauseControlOpCode interface { + // FromProto unmarshals PatternFlowEthernetPauseControlOpCode from protobuf object *otg.PatternFlowEthernetPauseControlOpCode + FromProto(msg *otg.PatternFlowEthernetPauseControlOpCode) (PatternFlowEthernetPauseControlOpCode, error) + // FromPbText unmarshals PatternFlowEthernetPauseControlOpCode from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseControlOpCode from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseControlOpCode from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseControlOpCode) Marshal() marshalPatternFlowEthernetPauseControlOpCode { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseControlOpCode{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseControlOpCode) Unmarshal() unMarshalPatternFlowEthernetPauseControlOpCode { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseControlOpCode{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseControlOpCode) ToProto() (*otg.PatternFlowEthernetPauseControlOpCode, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseControlOpCode) FromProto(msg *otg.PatternFlowEthernetPauseControlOpCode) (PatternFlowEthernetPauseControlOpCode, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseControlOpCode) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseControlOpCode) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseControlOpCode) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseControlOpCode) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseControlOpCode) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseControlOpCode) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseControlOpCode) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseControlOpCode) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseControlOpCode) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseControlOpCode) Clone() (PatternFlowEthernetPauseControlOpCode, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseControlOpCode() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowEthernetPauseControlOpCode) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowEthernetPauseControlOpCode is control operation code +type PatternFlowEthernetPauseControlOpCode interface { + Validation + // msg marshals PatternFlowEthernetPauseControlOpCode to protobuf object *otg.PatternFlowEthernetPauseControlOpCode + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseControlOpCode + // setMsg unmarshals PatternFlowEthernetPauseControlOpCode from protobuf object *otg.PatternFlowEthernetPauseControlOpCode + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseControlOpCode) PatternFlowEthernetPauseControlOpCode + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseControlOpCode + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseControlOpCode + // validate validates PatternFlowEthernetPauseControlOpCode + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseControlOpCode, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowEthernetPauseControlOpCodeChoiceEnum, set in PatternFlowEthernetPauseControlOpCode + Choice() PatternFlowEthernetPauseControlOpCodeChoiceEnum + // setChoice assigns PatternFlowEthernetPauseControlOpCodeChoiceEnum provided by user to PatternFlowEthernetPauseControlOpCode + setChoice(value PatternFlowEthernetPauseControlOpCodeChoiceEnum) PatternFlowEthernetPauseControlOpCode + // HasChoice checks if Choice has been set in PatternFlowEthernetPauseControlOpCode + HasChoice() bool + // Value returns uint32, set in PatternFlowEthernetPauseControlOpCode. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowEthernetPauseControlOpCode + SetValue(value uint32) PatternFlowEthernetPauseControlOpCode + // HasValue checks if Value has been set in PatternFlowEthernetPauseControlOpCode + HasValue() bool + // Values returns []uint32, set in PatternFlowEthernetPauseControlOpCode. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowEthernetPauseControlOpCode + SetValues(value []uint32) PatternFlowEthernetPauseControlOpCode + // Increment returns PatternFlowEthernetPauseControlOpCodeCounter, set in PatternFlowEthernetPauseControlOpCode. + // PatternFlowEthernetPauseControlOpCodeCounter is integer counter pattern + Increment() PatternFlowEthernetPauseControlOpCodeCounter + // SetIncrement assigns PatternFlowEthernetPauseControlOpCodeCounter provided by user to PatternFlowEthernetPauseControlOpCode. + // PatternFlowEthernetPauseControlOpCodeCounter is integer counter pattern + SetIncrement(value PatternFlowEthernetPauseControlOpCodeCounter) PatternFlowEthernetPauseControlOpCode + // HasIncrement checks if Increment has been set in PatternFlowEthernetPauseControlOpCode + HasIncrement() bool + // Decrement returns PatternFlowEthernetPauseControlOpCodeCounter, set in PatternFlowEthernetPauseControlOpCode. + // PatternFlowEthernetPauseControlOpCodeCounter is integer counter pattern + Decrement() PatternFlowEthernetPauseControlOpCodeCounter + // SetDecrement assigns PatternFlowEthernetPauseControlOpCodeCounter provided by user to PatternFlowEthernetPauseControlOpCode. + // PatternFlowEthernetPauseControlOpCodeCounter is integer counter pattern + SetDecrement(value PatternFlowEthernetPauseControlOpCodeCounter) PatternFlowEthernetPauseControlOpCode + // HasDecrement checks if Decrement has been set in PatternFlowEthernetPauseControlOpCode + HasDecrement() bool + // MetricTags returns PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIterIter, set in PatternFlowEthernetPauseControlOpCode + MetricTags() PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter + setNil() +} + +type PatternFlowEthernetPauseControlOpCodeChoiceEnum string + +// Enum of Choice on PatternFlowEthernetPauseControlOpCode +var PatternFlowEthernetPauseControlOpCodeChoice = struct { + VALUE PatternFlowEthernetPauseControlOpCodeChoiceEnum + VALUES PatternFlowEthernetPauseControlOpCodeChoiceEnum + INCREMENT PatternFlowEthernetPauseControlOpCodeChoiceEnum + DECREMENT PatternFlowEthernetPauseControlOpCodeChoiceEnum +}{ + VALUE: PatternFlowEthernetPauseControlOpCodeChoiceEnum("value"), + VALUES: PatternFlowEthernetPauseControlOpCodeChoiceEnum("values"), + INCREMENT: PatternFlowEthernetPauseControlOpCodeChoiceEnum("increment"), + DECREMENT: PatternFlowEthernetPauseControlOpCodeChoiceEnum("decrement"), +} + +func (obj *patternFlowEthernetPauseControlOpCode) Choice() PatternFlowEthernetPauseControlOpCodeChoiceEnum { + return PatternFlowEthernetPauseControlOpCodeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowEthernetPauseControlOpCode) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowEthernetPauseControlOpCode) setChoice(value PatternFlowEthernetPauseControlOpCodeChoiceEnum) PatternFlowEthernetPauseControlOpCode { + intValue, ok := otg.PatternFlowEthernetPauseControlOpCode_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowEthernetPauseControlOpCodeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowEthernetPauseControlOpCode_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowEthernetPauseControlOpCodeChoice.VALUE { + defaultValue := uint32(1) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowEthernetPauseControlOpCodeChoice.VALUES { + defaultValue := []uint32{1} + obj.obj.Values = defaultValue + } + + if value == PatternFlowEthernetPauseControlOpCodeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowEthernetPauseControlOpCodeCounter().msg() + } + + if value == PatternFlowEthernetPauseControlOpCodeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowEthernetPauseControlOpCodeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowEthernetPauseControlOpCode) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowEthernetPauseControlOpCodeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowEthernetPauseControlOpCode) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowEthernetPauseControlOpCode object +func (obj *patternFlowEthernetPauseControlOpCode) SetValue(value uint32) PatternFlowEthernetPauseControlOpCode { + obj.setChoice(PatternFlowEthernetPauseControlOpCodeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowEthernetPauseControlOpCode) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{1}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowEthernetPauseControlOpCode object +func (obj *patternFlowEthernetPauseControlOpCode) SetValues(value []uint32) PatternFlowEthernetPauseControlOpCode { + obj.setChoice(PatternFlowEthernetPauseControlOpCodeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowEthernetPauseControlOpCodeCounter +func (obj *patternFlowEthernetPauseControlOpCode) Increment() PatternFlowEthernetPauseControlOpCodeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowEthernetPauseControlOpCodeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowEthernetPauseControlOpCodeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowEthernetPauseControlOpCodeCounter +func (obj *patternFlowEthernetPauseControlOpCode) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowEthernetPauseControlOpCodeCounter value in the PatternFlowEthernetPauseControlOpCode object +func (obj *patternFlowEthernetPauseControlOpCode) SetIncrement(value PatternFlowEthernetPauseControlOpCodeCounter) PatternFlowEthernetPauseControlOpCode { + obj.setChoice(PatternFlowEthernetPauseControlOpCodeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowEthernetPauseControlOpCodeCounter +func (obj *patternFlowEthernetPauseControlOpCode) Decrement() PatternFlowEthernetPauseControlOpCodeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowEthernetPauseControlOpCodeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowEthernetPauseControlOpCodeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowEthernetPauseControlOpCodeCounter +func (obj *patternFlowEthernetPauseControlOpCode) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowEthernetPauseControlOpCodeCounter value in the PatternFlowEthernetPauseControlOpCode object +func (obj *patternFlowEthernetPauseControlOpCode) SetDecrement(value PatternFlowEthernetPauseControlOpCodeCounter) PatternFlowEthernetPauseControlOpCode { + obj.setChoice(PatternFlowEthernetPauseControlOpCodeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowEthernetPauseControlOpCodeMetricTag +func (obj *patternFlowEthernetPauseControlOpCode) MetricTags() PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowEthernetPauseControlOpCodeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter struct { + obj *patternFlowEthernetPauseControlOpCode + patternFlowEthernetPauseControlOpCodeMetricTagSlice []PatternFlowEthernetPauseControlOpCodeMetricTag + fieldPtr *[]*otg.PatternFlowEthernetPauseControlOpCodeMetricTag +} + +func newPatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter(ptr *[]*otg.PatternFlowEthernetPauseControlOpCodeMetricTag) PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter { + return &patternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter interface { + setMsg(*patternFlowEthernetPauseControlOpCode) PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter + Items() []PatternFlowEthernetPauseControlOpCodeMetricTag + Add() PatternFlowEthernetPauseControlOpCodeMetricTag + Append(items ...PatternFlowEthernetPauseControlOpCodeMetricTag) PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter + Set(index int, newObj PatternFlowEthernetPauseControlOpCodeMetricTag) PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter + Clear() PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter + clearHolderSlice() PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter + appendHolderSlice(item PatternFlowEthernetPauseControlOpCodeMetricTag) PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter +} + +func (obj *patternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter) setMsg(msg *patternFlowEthernetPauseControlOpCode) PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowEthernetPauseControlOpCodeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter) Items() []PatternFlowEthernetPauseControlOpCodeMetricTag { + return obj.patternFlowEthernetPauseControlOpCodeMetricTagSlice +} + +func (obj *patternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter) Add() PatternFlowEthernetPauseControlOpCodeMetricTag { + newObj := &otg.PatternFlowEthernetPauseControlOpCodeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowEthernetPauseControlOpCodeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowEthernetPauseControlOpCodeMetricTagSlice = append(obj.patternFlowEthernetPauseControlOpCodeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter) Append(items ...PatternFlowEthernetPauseControlOpCodeMetricTag) PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowEthernetPauseControlOpCodeMetricTagSlice = append(obj.patternFlowEthernetPauseControlOpCodeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter) Set(index int, newObj PatternFlowEthernetPauseControlOpCodeMetricTag) PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowEthernetPauseControlOpCodeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter) Clear() PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowEthernetPauseControlOpCodeMetricTag{} + obj.patternFlowEthernetPauseControlOpCodeMetricTagSlice = []PatternFlowEthernetPauseControlOpCodeMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter) clearHolderSlice() PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter { + if len(obj.patternFlowEthernetPauseControlOpCodeMetricTagSlice) > 0 { + obj.patternFlowEthernetPauseControlOpCodeMetricTagSlice = []PatternFlowEthernetPauseControlOpCodeMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter) appendHolderSlice(item PatternFlowEthernetPauseControlOpCodeMetricTag) PatternFlowEthernetPauseControlOpCodePatternFlowEthernetPauseControlOpCodeMetricTagIter { + obj.patternFlowEthernetPauseControlOpCodeMetricTagSlice = append(obj.patternFlowEthernetPauseControlOpCodeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowEthernetPauseControlOpCode) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseControlOpCode.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowEthernetPauseControlOpCode.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowEthernetPauseControlOpCodeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowEthernetPauseControlOpCode) setDefault() { + var choices_set int = 0 + var choice PatternFlowEthernetPauseControlOpCodeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseControlOpCodeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowEthernetPauseControlOpCodeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseControlOpCodeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseControlOpCodeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowEthernetPauseControlOpCodeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowEthernetPauseControlOpCode") + } + } else { + intVal := otg.PatternFlowEthernetPauseControlOpCode_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowEthernetPauseControlOpCode_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_control_op_code_counter.go b/gosnappi/pattern_flow_ethernet_pause_control_op_code_counter.go new file mode 100644 index 00000000..a2e2d060 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_control_op_code_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseControlOpCodeCounter ***** +type patternFlowEthernetPauseControlOpCodeCounter struct { + validation + obj *otg.PatternFlowEthernetPauseControlOpCodeCounter + marshaller marshalPatternFlowEthernetPauseControlOpCodeCounter + unMarshaller unMarshalPatternFlowEthernetPauseControlOpCodeCounter +} + +func NewPatternFlowEthernetPauseControlOpCodeCounter() PatternFlowEthernetPauseControlOpCodeCounter { + obj := patternFlowEthernetPauseControlOpCodeCounter{obj: &otg.PatternFlowEthernetPauseControlOpCodeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseControlOpCodeCounter) msg() *otg.PatternFlowEthernetPauseControlOpCodeCounter { + return obj.obj +} + +func (obj *patternFlowEthernetPauseControlOpCodeCounter) setMsg(msg *otg.PatternFlowEthernetPauseControlOpCodeCounter) PatternFlowEthernetPauseControlOpCodeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseControlOpCodeCounter struct { + obj *patternFlowEthernetPauseControlOpCodeCounter +} + +type marshalPatternFlowEthernetPauseControlOpCodeCounter interface { + // ToProto marshals PatternFlowEthernetPauseControlOpCodeCounter to protobuf object *otg.PatternFlowEthernetPauseControlOpCodeCounter + ToProto() (*otg.PatternFlowEthernetPauseControlOpCodeCounter, error) + // ToPbText marshals PatternFlowEthernetPauseControlOpCodeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseControlOpCodeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseControlOpCodeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseControlOpCodeCounter struct { + obj *patternFlowEthernetPauseControlOpCodeCounter +} + +type unMarshalPatternFlowEthernetPauseControlOpCodeCounter interface { + // FromProto unmarshals PatternFlowEthernetPauseControlOpCodeCounter from protobuf object *otg.PatternFlowEthernetPauseControlOpCodeCounter + FromProto(msg *otg.PatternFlowEthernetPauseControlOpCodeCounter) (PatternFlowEthernetPauseControlOpCodeCounter, error) + // FromPbText unmarshals PatternFlowEthernetPauseControlOpCodeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseControlOpCodeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseControlOpCodeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseControlOpCodeCounter) Marshal() marshalPatternFlowEthernetPauseControlOpCodeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseControlOpCodeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseControlOpCodeCounter) Unmarshal() unMarshalPatternFlowEthernetPauseControlOpCodeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseControlOpCodeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseControlOpCodeCounter) ToProto() (*otg.PatternFlowEthernetPauseControlOpCodeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseControlOpCodeCounter) FromProto(msg *otg.PatternFlowEthernetPauseControlOpCodeCounter) (PatternFlowEthernetPauseControlOpCodeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseControlOpCodeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseControlOpCodeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseControlOpCodeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseControlOpCodeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseControlOpCodeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseControlOpCodeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseControlOpCodeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseControlOpCodeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseControlOpCodeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseControlOpCodeCounter) Clone() (PatternFlowEthernetPauseControlOpCodeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseControlOpCodeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetPauseControlOpCodeCounter is integer counter pattern +type PatternFlowEthernetPauseControlOpCodeCounter interface { + Validation + // msg marshals PatternFlowEthernetPauseControlOpCodeCounter to protobuf object *otg.PatternFlowEthernetPauseControlOpCodeCounter + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseControlOpCodeCounter + // setMsg unmarshals PatternFlowEthernetPauseControlOpCodeCounter from protobuf object *otg.PatternFlowEthernetPauseControlOpCodeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseControlOpCodeCounter) PatternFlowEthernetPauseControlOpCodeCounter + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseControlOpCodeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseControlOpCodeCounter + // validate validates PatternFlowEthernetPauseControlOpCodeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseControlOpCodeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowEthernetPauseControlOpCodeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowEthernetPauseControlOpCodeCounter + SetStart(value uint32) PatternFlowEthernetPauseControlOpCodeCounter + // HasStart checks if Start has been set in PatternFlowEthernetPauseControlOpCodeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowEthernetPauseControlOpCodeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowEthernetPauseControlOpCodeCounter + SetStep(value uint32) PatternFlowEthernetPauseControlOpCodeCounter + // HasStep checks if Step has been set in PatternFlowEthernetPauseControlOpCodeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowEthernetPauseControlOpCodeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowEthernetPauseControlOpCodeCounter + SetCount(value uint32) PatternFlowEthernetPauseControlOpCodeCounter + // HasCount checks if Count has been set in PatternFlowEthernetPauseControlOpCodeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowEthernetPauseControlOpCodeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowEthernetPauseControlOpCodeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowEthernetPauseControlOpCodeCounter object +func (obj *patternFlowEthernetPauseControlOpCodeCounter) SetStart(value uint32) PatternFlowEthernetPauseControlOpCodeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowEthernetPauseControlOpCodeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowEthernetPauseControlOpCodeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowEthernetPauseControlOpCodeCounter object +func (obj *patternFlowEthernetPauseControlOpCodeCounter) SetStep(value uint32) PatternFlowEthernetPauseControlOpCodeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetPauseControlOpCodeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetPauseControlOpCodeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowEthernetPauseControlOpCodeCounter object +func (obj *patternFlowEthernetPauseControlOpCodeCounter) SetCount(value uint32) PatternFlowEthernetPauseControlOpCodeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowEthernetPauseControlOpCodeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseControlOpCodeCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseControlOpCodeCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseControlOpCodeCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowEthernetPauseControlOpCodeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_control_op_code_metric_tag.go b/gosnappi/pattern_flow_ethernet_pause_control_op_code_metric_tag.go new file mode 100644 index 00000000..db32f463 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_control_op_code_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseControlOpCodeMetricTag ***** +type patternFlowEthernetPauseControlOpCodeMetricTag struct { + validation + obj *otg.PatternFlowEthernetPauseControlOpCodeMetricTag + marshaller marshalPatternFlowEthernetPauseControlOpCodeMetricTag + unMarshaller unMarshalPatternFlowEthernetPauseControlOpCodeMetricTag +} + +func NewPatternFlowEthernetPauseControlOpCodeMetricTag() PatternFlowEthernetPauseControlOpCodeMetricTag { + obj := patternFlowEthernetPauseControlOpCodeMetricTag{obj: &otg.PatternFlowEthernetPauseControlOpCodeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) msg() *otg.PatternFlowEthernetPauseControlOpCodeMetricTag { + return obj.obj +} + +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) setMsg(msg *otg.PatternFlowEthernetPauseControlOpCodeMetricTag) PatternFlowEthernetPauseControlOpCodeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseControlOpCodeMetricTag struct { + obj *patternFlowEthernetPauseControlOpCodeMetricTag +} + +type marshalPatternFlowEthernetPauseControlOpCodeMetricTag interface { + // ToProto marshals PatternFlowEthernetPauseControlOpCodeMetricTag to protobuf object *otg.PatternFlowEthernetPauseControlOpCodeMetricTag + ToProto() (*otg.PatternFlowEthernetPauseControlOpCodeMetricTag, error) + // ToPbText marshals PatternFlowEthernetPauseControlOpCodeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseControlOpCodeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseControlOpCodeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseControlOpCodeMetricTag struct { + obj *patternFlowEthernetPauseControlOpCodeMetricTag +} + +type unMarshalPatternFlowEthernetPauseControlOpCodeMetricTag interface { + // FromProto unmarshals PatternFlowEthernetPauseControlOpCodeMetricTag from protobuf object *otg.PatternFlowEthernetPauseControlOpCodeMetricTag + FromProto(msg *otg.PatternFlowEthernetPauseControlOpCodeMetricTag) (PatternFlowEthernetPauseControlOpCodeMetricTag, error) + // FromPbText unmarshals PatternFlowEthernetPauseControlOpCodeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseControlOpCodeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseControlOpCodeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) Marshal() marshalPatternFlowEthernetPauseControlOpCodeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseControlOpCodeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) Unmarshal() unMarshalPatternFlowEthernetPauseControlOpCodeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseControlOpCodeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseControlOpCodeMetricTag) ToProto() (*otg.PatternFlowEthernetPauseControlOpCodeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseControlOpCodeMetricTag) FromProto(msg *otg.PatternFlowEthernetPauseControlOpCodeMetricTag) (PatternFlowEthernetPauseControlOpCodeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseControlOpCodeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseControlOpCodeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseControlOpCodeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseControlOpCodeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseControlOpCodeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseControlOpCodeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) Clone() (PatternFlowEthernetPauseControlOpCodeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseControlOpCodeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetPauseControlOpCodeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowEthernetPauseControlOpCodeMetricTag interface { + Validation + // msg marshals PatternFlowEthernetPauseControlOpCodeMetricTag to protobuf object *otg.PatternFlowEthernetPauseControlOpCodeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseControlOpCodeMetricTag + // setMsg unmarshals PatternFlowEthernetPauseControlOpCodeMetricTag from protobuf object *otg.PatternFlowEthernetPauseControlOpCodeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseControlOpCodeMetricTag) PatternFlowEthernetPauseControlOpCodeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseControlOpCodeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseControlOpCodeMetricTag + // validate validates PatternFlowEthernetPauseControlOpCodeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseControlOpCodeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowEthernetPauseControlOpCodeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowEthernetPauseControlOpCodeMetricTag + SetName(value string) PatternFlowEthernetPauseControlOpCodeMetricTag + // Offset returns uint32, set in PatternFlowEthernetPauseControlOpCodeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowEthernetPauseControlOpCodeMetricTag + SetOffset(value uint32) PatternFlowEthernetPauseControlOpCodeMetricTag + // HasOffset checks if Offset has been set in PatternFlowEthernetPauseControlOpCodeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowEthernetPauseControlOpCodeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowEthernetPauseControlOpCodeMetricTag + SetLength(value uint32) PatternFlowEthernetPauseControlOpCodeMetricTag + // HasLength checks if Length has been set in PatternFlowEthernetPauseControlOpCodeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowEthernetPauseControlOpCodeMetricTag object +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) SetName(value string) PatternFlowEthernetPauseControlOpCodeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowEthernetPauseControlOpCodeMetricTag object +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) SetOffset(value uint32) PatternFlowEthernetPauseControlOpCodeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowEthernetPauseControlOpCodeMetricTag object +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) SetLength(value uint32) PatternFlowEthernetPauseControlOpCodeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowEthernetPauseControlOpCodeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseControlOpCodeMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowEthernetPauseControlOpCodeMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowEthernetPauseControlOpCodeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_dst.go b/gosnappi/pattern_flow_ethernet_pause_dst.go new file mode 100644 index 00000000..93b7b636 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_dst.go @@ -0,0 +1,658 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseDst ***** +type patternFlowEthernetPauseDst struct { + validation + obj *otg.PatternFlowEthernetPauseDst + marshaller marshalPatternFlowEthernetPauseDst + unMarshaller unMarshalPatternFlowEthernetPauseDst + incrementHolder PatternFlowEthernetPauseDstCounter + decrementHolder PatternFlowEthernetPauseDstCounter + metricTagsHolder PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter +} + +func NewPatternFlowEthernetPauseDst() PatternFlowEthernetPauseDst { + obj := patternFlowEthernetPauseDst{obj: &otg.PatternFlowEthernetPauseDst{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseDst) msg() *otg.PatternFlowEthernetPauseDst { + return obj.obj +} + +func (obj *patternFlowEthernetPauseDst) setMsg(msg *otg.PatternFlowEthernetPauseDst) PatternFlowEthernetPauseDst { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseDst struct { + obj *patternFlowEthernetPauseDst +} + +type marshalPatternFlowEthernetPauseDst interface { + // ToProto marshals PatternFlowEthernetPauseDst to protobuf object *otg.PatternFlowEthernetPauseDst + ToProto() (*otg.PatternFlowEthernetPauseDst, error) + // ToPbText marshals PatternFlowEthernetPauseDst to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseDst to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseDst to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseDst struct { + obj *patternFlowEthernetPauseDst +} + +type unMarshalPatternFlowEthernetPauseDst interface { + // FromProto unmarshals PatternFlowEthernetPauseDst from protobuf object *otg.PatternFlowEthernetPauseDst + FromProto(msg *otg.PatternFlowEthernetPauseDst) (PatternFlowEthernetPauseDst, error) + // FromPbText unmarshals PatternFlowEthernetPauseDst from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseDst from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseDst from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseDst) Marshal() marshalPatternFlowEthernetPauseDst { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseDst{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseDst) Unmarshal() unMarshalPatternFlowEthernetPauseDst { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseDst{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseDst) ToProto() (*otg.PatternFlowEthernetPauseDst, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseDst) FromProto(msg *otg.PatternFlowEthernetPauseDst) (PatternFlowEthernetPauseDst, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseDst) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseDst) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseDst) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseDst) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseDst) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseDst) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseDst) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseDst) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseDst) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseDst) Clone() (PatternFlowEthernetPauseDst, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseDst() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowEthernetPauseDst) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowEthernetPauseDst is destination MAC address +type PatternFlowEthernetPauseDst interface { + Validation + // msg marshals PatternFlowEthernetPauseDst to protobuf object *otg.PatternFlowEthernetPauseDst + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseDst + // setMsg unmarshals PatternFlowEthernetPauseDst from protobuf object *otg.PatternFlowEthernetPauseDst + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseDst) PatternFlowEthernetPauseDst + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseDst + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseDst + // validate validates PatternFlowEthernetPauseDst + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseDst, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowEthernetPauseDstChoiceEnum, set in PatternFlowEthernetPauseDst + Choice() PatternFlowEthernetPauseDstChoiceEnum + // setChoice assigns PatternFlowEthernetPauseDstChoiceEnum provided by user to PatternFlowEthernetPauseDst + setChoice(value PatternFlowEthernetPauseDstChoiceEnum) PatternFlowEthernetPauseDst + // HasChoice checks if Choice has been set in PatternFlowEthernetPauseDst + HasChoice() bool + // Value returns string, set in PatternFlowEthernetPauseDst. + Value() string + // SetValue assigns string provided by user to PatternFlowEthernetPauseDst + SetValue(value string) PatternFlowEthernetPauseDst + // HasValue checks if Value has been set in PatternFlowEthernetPauseDst + HasValue() bool + // Values returns []string, set in PatternFlowEthernetPauseDst. + Values() []string + // SetValues assigns []string provided by user to PatternFlowEthernetPauseDst + SetValues(value []string) PatternFlowEthernetPauseDst + // Increment returns PatternFlowEthernetPauseDstCounter, set in PatternFlowEthernetPauseDst. + // PatternFlowEthernetPauseDstCounter is mac counter pattern + Increment() PatternFlowEthernetPauseDstCounter + // SetIncrement assigns PatternFlowEthernetPauseDstCounter provided by user to PatternFlowEthernetPauseDst. + // PatternFlowEthernetPauseDstCounter is mac counter pattern + SetIncrement(value PatternFlowEthernetPauseDstCounter) PatternFlowEthernetPauseDst + // HasIncrement checks if Increment has been set in PatternFlowEthernetPauseDst + HasIncrement() bool + // Decrement returns PatternFlowEthernetPauseDstCounter, set in PatternFlowEthernetPauseDst. + // PatternFlowEthernetPauseDstCounter is mac counter pattern + Decrement() PatternFlowEthernetPauseDstCounter + // SetDecrement assigns PatternFlowEthernetPauseDstCounter provided by user to PatternFlowEthernetPauseDst. + // PatternFlowEthernetPauseDstCounter is mac counter pattern + SetDecrement(value PatternFlowEthernetPauseDstCounter) PatternFlowEthernetPauseDst + // HasDecrement checks if Decrement has been set in PatternFlowEthernetPauseDst + HasDecrement() bool + // MetricTags returns PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIterIter, set in PatternFlowEthernetPauseDst + MetricTags() PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter + setNil() +} + +type PatternFlowEthernetPauseDstChoiceEnum string + +// Enum of Choice on PatternFlowEthernetPauseDst +var PatternFlowEthernetPauseDstChoice = struct { + VALUE PatternFlowEthernetPauseDstChoiceEnum + VALUES PatternFlowEthernetPauseDstChoiceEnum + INCREMENT PatternFlowEthernetPauseDstChoiceEnum + DECREMENT PatternFlowEthernetPauseDstChoiceEnum +}{ + VALUE: PatternFlowEthernetPauseDstChoiceEnum("value"), + VALUES: PatternFlowEthernetPauseDstChoiceEnum("values"), + INCREMENT: PatternFlowEthernetPauseDstChoiceEnum("increment"), + DECREMENT: PatternFlowEthernetPauseDstChoiceEnum("decrement"), +} + +func (obj *patternFlowEthernetPauseDst) Choice() PatternFlowEthernetPauseDstChoiceEnum { + return PatternFlowEthernetPauseDstChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowEthernetPauseDst) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowEthernetPauseDst) setChoice(value PatternFlowEthernetPauseDstChoiceEnum) PatternFlowEthernetPauseDst { + intValue, ok := otg.PatternFlowEthernetPauseDst_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowEthernetPauseDstChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowEthernetPauseDst_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowEthernetPauseDstChoice.VALUE { + defaultValue := "01:80:c2:00:00:01" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowEthernetPauseDstChoice.VALUES { + defaultValue := []string{"01:80:c2:00:00:01"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowEthernetPauseDstChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowEthernetPauseDstCounter().msg() + } + + if value == PatternFlowEthernetPauseDstChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowEthernetPauseDstCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowEthernetPauseDst) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowEthernetPauseDstChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowEthernetPauseDst) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowEthernetPauseDst object +func (obj *patternFlowEthernetPauseDst) SetValue(value string) PatternFlowEthernetPauseDst { + obj.setChoice(PatternFlowEthernetPauseDstChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowEthernetPauseDst) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"01:80:c2:00:00:01"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowEthernetPauseDst object +func (obj *patternFlowEthernetPauseDst) SetValues(value []string) PatternFlowEthernetPauseDst { + obj.setChoice(PatternFlowEthernetPauseDstChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowEthernetPauseDstCounter +func (obj *patternFlowEthernetPauseDst) Increment() PatternFlowEthernetPauseDstCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowEthernetPauseDstChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowEthernetPauseDstCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowEthernetPauseDstCounter +func (obj *patternFlowEthernetPauseDst) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowEthernetPauseDstCounter value in the PatternFlowEthernetPauseDst object +func (obj *patternFlowEthernetPauseDst) SetIncrement(value PatternFlowEthernetPauseDstCounter) PatternFlowEthernetPauseDst { + obj.setChoice(PatternFlowEthernetPauseDstChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowEthernetPauseDstCounter +func (obj *patternFlowEthernetPauseDst) Decrement() PatternFlowEthernetPauseDstCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowEthernetPauseDstChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowEthernetPauseDstCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowEthernetPauseDstCounter +func (obj *patternFlowEthernetPauseDst) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowEthernetPauseDstCounter value in the PatternFlowEthernetPauseDst object +func (obj *patternFlowEthernetPauseDst) SetDecrement(value PatternFlowEthernetPauseDstCounter) PatternFlowEthernetPauseDst { + obj.setChoice(PatternFlowEthernetPauseDstChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowEthernetPauseDstMetricTag +func (obj *patternFlowEthernetPauseDst) MetricTags() PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowEthernetPauseDstMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter struct { + obj *patternFlowEthernetPauseDst + patternFlowEthernetPauseDstMetricTagSlice []PatternFlowEthernetPauseDstMetricTag + fieldPtr *[]*otg.PatternFlowEthernetPauseDstMetricTag +} + +func newPatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter(ptr *[]*otg.PatternFlowEthernetPauseDstMetricTag) PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter { + return &patternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter interface { + setMsg(*patternFlowEthernetPauseDst) PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter + Items() []PatternFlowEthernetPauseDstMetricTag + Add() PatternFlowEthernetPauseDstMetricTag + Append(items ...PatternFlowEthernetPauseDstMetricTag) PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter + Set(index int, newObj PatternFlowEthernetPauseDstMetricTag) PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter + Clear() PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter + clearHolderSlice() PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter + appendHolderSlice(item PatternFlowEthernetPauseDstMetricTag) PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter +} + +func (obj *patternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter) setMsg(msg *patternFlowEthernetPauseDst) PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowEthernetPauseDstMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter) Items() []PatternFlowEthernetPauseDstMetricTag { + return obj.patternFlowEthernetPauseDstMetricTagSlice +} + +func (obj *patternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter) Add() PatternFlowEthernetPauseDstMetricTag { + newObj := &otg.PatternFlowEthernetPauseDstMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowEthernetPauseDstMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowEthernetPauseDstMetricTagSlice = append(obj.patternFlowEthernetPauseDstMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter) Append(items ...PatternFlowEthernetPauseDstMetricTag) PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowEthernetPauseDstMetricTagSlice = append(obj.patternFlowEthernetPauseDstMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter) Set(index int, newObj PatternFlowEthernetPauseDstMetricTag) PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowEthernetPauseDstMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter) Clear() PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowEthernetPauseDstMetricTag{} + obj.patternFlowEthernetPauseDstMetricTagSlice = []PatternFlowEthernetPauseDstMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter) clearHolderSlice() PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter { + if len(obj.patternFlowEthernetPauseDstMetricTagSlice) > 0 { + obj.patternFlowEthernetPauseDstMetricTagSlice = []PatternFlowEthernetPauseDstMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter) appendHolderSlice(item PatternFlowEthernetPauseDstMetricTag) PatternFlowEthernetPauseDstPatternFlowEthernetPauseDstMetricTagIter { + obj.patternFlowEthernetPauseDstMetricTagSlice = append(obj.patternFlowEthernetPauseDstMetricTagSlice, item) + return obj +} + +func (obj *patternFlowEthernetPauseDst) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateMac(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetPauseDst.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateMacSlice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetPauseDst.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowEthernetPauseDstMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowEthernetPauseDst) setDefault() { + var choices_set int = 0 + var choice PatternFlowEthernetPauseDstChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseDstChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowEthernetPauseDstChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseDstChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseDstChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowEthernetPauseDstChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowEthernetPauseDst") + } + } else { + intVal := otg.PatternFlowEthernetPauseDst_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowEthernetPauseDst_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_dst_counter.go b/gosnappi/pattern_flow_ethernet_pause_dst_counter.go new file mode 100644 index 00000000..ce786b89 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_dst_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseDstCounter ***** +type patternFlowEthernetPauseDstCounter struct { + validation + obj *otg.PatternFlowEthernetPauseDstCounter + marshaller marshalPatternFlowEthernetPauseDstCounter + unMarshaller unMarshalPatternFlowEthernetPauseDstCounter +} + +func NewPatternFlowEthernetPauseDstCounter() PatternFlowEthernetPauseDstCounter { + obj := patternFlowEthernetPauseDstCounter{obj: &otg.PatternFlowEthernetPauseDstCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseDstCounter) msg() *otg.PatternFlowEthernetPauseDstCounter { + return obj.obj +} + +func (obj *patternFlowEthernetPauseDstCounter) setMsg(msg *otg.PatternFlowEthernetPauseDstCounter) PatternFlowEthernetPauseDstCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseDstCounter struct { + obj *patternFlowEthernetPauseDstCounter +} + +type marshalPatternFlowEthernetPauseDstCounter interface { + // ToProto marshals PatternFlowEthernetPauseDstCounter to protobuf object *otg.PatternFlowEthernetPauseDstCounter + ToProto() (*otg.PatternFlowEthernetPauseDstCounter, error) + // ToPbText marshals PatternFlowEthernetPauseDstCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseDstCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseDstCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseDstCounter struct { + obj *patternFlowEthernetPauseDstCounter +} + +type unMarshalPatternFlowEthernetPauseDstCounter interface { + // FromProto unmarshals PatternFlowEthernetPauseDstCounter from protobuf object *otg.PatternFlowEthernetPauseDstCounter + FromProto(msg *otg.PatternFlowEthernetPauseDstCounter) (PatternFlowEthernetPauseDstCounter, error) + // FromPbText unmarshals PatternFlowEthernetPauseDstCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseDstCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseDstCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseDstCounter) Marshal() marshalPatternFlowEthernetPauseDstCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseDstCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseDstCounter) Unmarshal() unMarshalPatternFlowEthernetPauseDstCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseDstCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseDstCounter) ToProto() (*otg.PatternFlowEthernetPauseDstCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseDstCounter) FromProto(msg *otg.PatternFlowEthernetPauseDstCounter) (PatternFlowEthernetPauseDstCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseDstCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseDstCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseDstCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseDstCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseDstCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseDstCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseDstCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseDstCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseDstCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseDstCounter) Clone() (PatternFlowEthernetPauseDstCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseDstCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetPauseDstCounter is mac counter pattern +type PatternFlowEthernetPauseDstCounter interface { + Validation + // msg marshals PatternFlowEthernetPauseDstCounter to protobuf object *otg.PatternFlowEthernetPauseDstCounter + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseDstCounter + // setMsg unmarshals PatternFlowEthernetPauseDstCounter from protobuf object *otg.PatternFlowEthernetPauseDstCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseDstCounter) PatternFlowEthernetPauseDstCounter + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseDstCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseDstCounter + // validate validates PatternFlowEthernetPauseDstCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseDstCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowEthernetPauseDstCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowEthernetPauseDstCounter + SetStart(value string) PatternFlowEthernetPauseDstCounter + // HasStart checks if Start has been set in PatternFlowEthernetPauseDstCounter + HasStart() bool + // Step returns string, set in PatternFlowEthernetPauseDstCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowEthernetPauseDstCounter + SetStep(value string) PatternFlowEthernetPauseDstCounter + // HasStep checks if Step has been set in PatternFlowEthernetPauseDstCounter + HasStep() bool + // Count returns uint32, set in PatternFlowEthernetPauseDstCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowEthernetPauseDstCounter + SetCount(value uint32) PatternFlowEthernetPauseDstCounter + // HasCount checks if Count has been set in PatternFlowEthernetPauseDstCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowEthernetPauseDstCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowEthernetPauseDstCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowEthernetPauseDstCounter object +func (obj *patternFlowEthernetPauseDstCounter) SetStart(value string) PatternFlowEthernetPauseDstCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowEthernetPauseDstCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowEthernetPauseDstCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowEthernetPauseDstCounter object +func (obj *patternFlowEthernetPauseDstCounter) SetStep(value string) PatternFlowEthernetPauseDstCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetPauseDstCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetPauseDstCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowEthernetPauseDstCounter object +func (obj *patternFlowEthernetPauseDstCounter) SetCount(value uint32) PatternFlowEthernetPauseDstCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowEthernetPauseDstCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateMac(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetPauseDstCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateMac(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetPauseDstCounter.Step")) + } + + } + +} + +func (obj *patternFlowEthernetPauseDstCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("01:80:c2:00:00:01") + } + if obj.obj.Step == nil { + obj.SetStep("00:00:00:00:00:01") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_dst_metric_tag.go b/gosnappi/pattern_flow_ethernet_pause_dst_metric_tag.go new file mode 100644 index 00000000..3d202857 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_dst_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseDstMetricTag ***** +type patternFlowEthernetPauseDstMetricTag struct { + validation + obj *otg.PatternFlowEthernetPauseDstMetricTag + marshaller marshalPatternFlowEthernetPauseDstMetricTag + unMarshaller unMarshalPatternFlowEthernetPauseDstMetricTag +} + +func NewPatternFlowEthernetPauseDstMetricTag() PatternFlowEthernetPauseDstMetricTag { + obj := patternFlowEthernetPauseDstMetricTag{obj: &otg.PatternFlowEthernetPauseDstMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseDstMetricTag) msg() *otg.PatternFlowEthernetPauseDstMetricTag { + return obj.obj +} + +func (obj *patternFlowEthernetPauseDstMetricTag) setMsg(msg *otg.PatternFlowEthernetPauseDstMetricTag) PatternFlowEthernetPauseDstMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseDstMetricTag struct { + obj *patternFlowEthernetPauseDstMetricTag +} + +type marshalPatternFlowEthernetPauseDstMetricTag interface { + // ToProto marshals PatternFlowEthernetPauseDstMetricTag to protobuf object *otg.PatternFlowEthernetPauseDstMetricTag + ToProto() (*otg.PatternFlowEthernetPauseDstMetricTag, error) + // ToPbText marshals PatternFlowEthernetPauseDstMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseDstMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseDstMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseDstMetricTag struct { + obj *patternFlowEthernetPauseDstMetricTag +} + +type unMarshalPatternFlowEthernetPauseDstMetricTag interface { + // FromProto unmarshals PatternFlowEthernetPauseDstMetricTag from protobuf object *otg.PatternFlowEthernetPauseDstMetricTag + FromProto(msg *otg.PatternFlowEthernetPauseDstMetricTag) (PatternFlowEthernetPauseDstMetricTag, error) + // FromPbText unmarshals PatternFlowEthernetPauseDstMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseDstMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseDstMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseDstMetricTag) Marshal() marshalPatternFlowEthernetPauseDstMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseDstMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseDstMetricTag) Unmarshal() unMarshalPatternFlowEthernetPauseDstMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseDstMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseDstMetricTag) ToProto() (*otg.PatternFlowEthernetPauseDstMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseDstMetricTag) FromProto(msg *otg.PatternFlowEthernetPauseDstMetricTag) (PatternFlowEthernetPauseDstMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseDstMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseDstMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseDstMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseDstMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseDstMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseDstMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseDstMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseDstMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseDstMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseDstMetricTag) Clone() (PatternFlowEthernetPauseDstMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseDstMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetPauseDstMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowEthernetPauseDstMetricTag interface { + Validation + // msg marshals PatternFlowEthernetPauseDstMetricTag to protobuf object *otg.PatternFlowEthernetPauseDstMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseDstMetricTag + // setMsg unmarshals PatternFlowEthernetPauseDstMetricTag from protobuf object *otg.PatternFlowEthernetPauseDstMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseDstMetricTag) PatternFlowEthernetPauseDstMetricTag + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseDstMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseDstMetricTag + // validate validates PatternFlowEthernetPauseDstMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseDstMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowEthernetPauseDstMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowEthernetPauseDstMetricTag + SetName(value string) PatternFlowEthernetPauseDstMetricTag + // Offset returns uint32, set in PatternFlowEthernetPauseDstMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowEthernetPauseDstMetricTag + SetOffset(value uint32) PatternFlowEthernetPauseDstMetricTag + // HasOffset checks if Offset has been set in PatternFlowEthernetPauseDstMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowEthernetPauseDstMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowEthernetPauseDstMetricTag + SetLength(value uint32) PatternFlowEthernetPauseDstMetricTag + // HasLength checks if Length has been set in PatternFlowEthernetPauseDstMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowEthernetPauseDstMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowEthernetPauseDstMetricTag object +func (obj *patternFlowEthernetPauseDstMetricTag) SetName(value string) PatternFlowEthernetPauseDstMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetPauseDstMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetPauseDstMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowEthernetPauseDstMetricTag object +func (obj *patternFlowEthernetPauseDstMetricTag) SetOffset(value uint32) PatternFlowEthernetPauseDstMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetPauseDstMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetPauseDstMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowEthernetPauseDstMetricTag object +func (obj *patternFlowEthernetPauseDstMetricTag) SetLength(value uint32) PatternFlowEthernetPauseDstMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowEthernetPauseDstMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowEthernetPauseDstMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 47 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseDstMetricTag.Offset <= 47 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 48 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowEthernetPauseDstMetricTag.Length <= 48 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowEthernetPauseDstMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(48) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_ether_type.go b/gosnappi/pattern_flow_ethernet_pause_ether_type.go new file mode 100644 index 00000000..52d469b0 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_ether_type.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseEtherType ***** +type patternFlowEthernetPauseEtherType struct { + validation + obj *otg.PatternFlowEthernetPauseEtherType + marshaller marshalPatternFlowEthernetPauseEtherType + unMarshaller unMarshalPatternFlowEthernetPauseEtherType + incrementHolder PatternFlowEthernetPauseEtherTypeCounter + decrementHolder PatternFlowEthernetPauseEtherTypeCounter + metricTagsHolder PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter +} + +func NewPatternFlowEthernetPauseEtherType() PatternFlowEthernetPauseEtherType { + obj := patternFlowEthernetPauseEtherType{obj: &otg.PatternFlowEthernetPauseEtherType{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseEtherType) msg() *otg.PatternFlowEthernetPauseEtherType { + return obj.obj +} + +func (obj *patternFlowEthernetPauseEtherType) setMsg(msg *otg.PatternFlowEthernetPauseEtherType) PatternFlowEthernetPauseEtherType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseEtherType struct { + obj *patternFlowEthernetPauseEtherType +} + +type marshalPatternFlowEthernetPauseEtherType interface { + // ToProto marshals PatternFlowEthernetPauseEtherType to protobuf object *otg.PatternFlowEthernetPauseEtherType + ToProto() (*otg.PatternFlowEthernetPauseEtherType, error) + // ToPbText marshals PatternFlowEthernetPauseEtherType to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseEtherType to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseEtherType to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseEtherType struct { + obj *patternFlowEthernetPauseEtherType +} + +type unMarshalPatternFlowEthernetPauseEtherType interface { + // FromProto unmarshals PatternFlowEthernetPauseEtherType from protobuf object *otg.PatternFlowEthernetPauseEtherType + FromProto(msg *otg.PatternFlowEthernetPauseEtherType) (PatternFlowEthernetPauseEtherType, error) + // FromPbText unmarshals PatternFlowEthernetPauseEtherType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseEtherType from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseEtherType from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseEtherType) Marshal() marshalPatternFlowEthernetPauseEtherType { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseEtherType{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseEtherType) Unmarshal() unMarshalPatternFlowEthernetPauseEtherType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseEtherType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseEtherType) ToProto() (*otg.PatternFlowEthernetPauseEtherType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseEtherType) FromProto(msg *otg.PatternFlowEthernetPauseEtherType) (PatternFlowEthernetPauseEtherType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseEtherType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseEtherType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseEtherType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseEtherType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseEtherType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseEtherType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseEtherType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseEtherType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseEtherType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseEtherType) Clone() (PatternFlowEthernetPauseEtherType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseEtherType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowEthernetPauseEtherType) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowEthernetPauseEtherType is ethernet type +type PatternFlowEthernetPauseEtherType interface { + Validation + // msg marshals PatternFlowEthernetPauseEtherType to protobuf object *otg.PatternFlowEthernetPauseEtherType + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseEtherType + // setMsg unmarshals PatternFlowEthernetPauseEtherType from protobuf object *otg.PatternFlowEthernetPauseEtherType + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseEtherType) PatternFlowEthernetPauseEtherType + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseEtherType + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseEtherType + // validate validates PatternFlowEthernetPauseEtherType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseEtherType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowEthernetPauseEtherTypeChoiceEnum, set in PatternFlowEthernetPauseEtherType + Choice() PatternFlowEthernetPauseEtherTypeChoiceEnum + // setChoice assigns PatternFlowEthernetPauseEtherTypeChoiceEnum provided by user to PatternFlowEthernetPauseEtherType + setChoice(value PatternFlowEthernetPauseEtherTypeChoiceEnum) PatternFlowEthernetPauseEtherType + // HasChoice checks if Choice has been set in PatternFlowEthernetPauseEtherType + HasChoice() bool + // Value returns uint32, set in PatternFlowEthernetPauseEtherType. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowEthernetPauseEtherType + SetValue(value uint32) PatternFlowEthernetPauseEtherType + // HasValue checks if Value has been set in PatternFlowEthernetPauseEtherType + HasValue() bool + // Values returns []uint32, set in PatternFlowEthernetPauseEtherType. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowEthernetPauseEtherType + SetValues(value []uint32) PatternFlowEthernetPauseEtherType + // Increment returns PatternFlowEthernetPauseEtherTypeCounter, set in PatternFlowEthernetPauseEtherType. + // PatternFlowEthernetPauseEtherTypeCounter is integer counter pattern + Increment() PatternFlowEthernetPauseEtherTypeCounter + // SetIncrement assigns PatternFlowEthernetPauseEtherTypeCounter provided by user to PatternFlowEthernetPauseEtherType. + // PatternFlowEthernetPauseEtherTypeCounter is integer counter pattern + SetIncrement(value PatternFlowEthernetPauseEtherTypeCounter) PatternFlowEthernetPauseEtherType + // HasIncrement checks if Increment has been set in PatternFlowEthernetPauseEtherType + HasIncrement() bool + // Decrement returns PatternFlowEthernetPauseEtherTypeCounter, set in PatternFlowEthernetPauseEtherType. + // PatternFlowEthernetPauseEtherTypeCounter is integer counter pattern + Decrement() PatternFlowEthernetPauseEtherTypeCounter + // SetDecrement assigns PatternFlowEthernetPauseEtherTypeCounter provided by user to PatternFlowEthernetPauseEtherType. + // PatternFlowEthernetPauseEtherTypeCounter is integer counter pattern + SetDecrement(value PatternFlowEthernetPauseEtherTypeCounter) PatternFlowEthernetPauseEtherType + // HasDecrement checks if Decrement has been set in PatternFlowEthernetPauseEtherType + HasDecrement() bool + // MetricTags returns PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIterIter, set in PatternFlowEthernetPauseEtherType + MetricTags() PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter + setNil() +} + +type PatternFlowEthernetPauseEtherTypeChoiceEnum string + +// Enum of Choice on PatternFlowEthernetPauseEtherType +var PatternFlowEthernetPauseEtherTypeChoice = struct { + VALUE PatternFlowEthernetPauseEtherTypeChoiceEnum + VALUES PatternFlowEthernetPauseEtherTypeChoiceEnum + INCREMENT PatternFlowEthernetPauseEtherTypeChoiceEnum + DECREMENT PatternFlowEthernetPauseEtherTypeChoiceEnum +}{ + VALUE: PatternFlowEthernetPauseEtherTypeChoiceEnum("value"), + VALUES: PatternFlowEthernetPauseEtherTypeChoiceEnum("values"), + INCREMENT: PatternFlowEthernetPauseEtherTypeChoiceEnum("increment"), + DECREMENT: PatternFlowEthernetPauseEtherTypeChoiceEnum("decrement"), +} + +func (obj *patternFlowEthernetPauseEtherType) Choice() PatternFlowEthernetPauseEtherTypeChoiceEnum { + return PatternFlowEthernetPauseEtherTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowEthernetPauseEtherType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowEthernetPauseEtherType) setChoice(value PatternFlowEthernetPauseEtherTypeChoiceEnum) PatternFlowEthernetPauseEtherType { + intValue, ok := otg.PatternFlowEthernetPauseEtherType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowEthernetPauseEtherTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowEthernetPauseEtherType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowEthernetPauseEtherTypeChoice.VALUE { + defaultValue := uint32(34824) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowEthernetPauseEtherTypeChoice.VALUES { + defaultValue := []uint32{34824} + obj.obj.Values = defaultValue + } + + if value == PatternFlowEthernetPauseEtherTypeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowEthernetPauseEtherTypeCounter().msg() + } + + if value == PatternFlowEthernetPauseEtherTypeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowEthernetPauseEtherTypeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowEthernetPauseEtherType) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowEthernetPauseEtherTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowEthernetPauseEtherType) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowEthernetPauseEtherType object +func (obj *patternFlowEthernetPauseEtherType) SetValue(value uint32) PatternFlowEthernetPauseEtherType { + obj.setChoice(PatternFlowEthernetPauseEtherTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowEthernetPauseEtherType) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{34824}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowEthernetPauseEtherType object +func (obj *patternFlowEthernetPauseEtherType) SetValues(value []uint32) PatternFlowEthernetPauseEtherType { + obj.setChoice(PatternFlowEthernetPauseEtherTypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowEthernetPauseEtherTypeCounter +func (obj *patternFlowEthernetPauseEtherType) Increment() PatternFlowEthernetPauseEtherTypeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowEthernetPauseEtherTypeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowEthernetPauseEtherTypeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowEthernetPauseEtherTypeCounter +func (obj *patternFlowEthernetPauseEtherType) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowEthernetPauseEtherTypeCounter value in the PatternFlowEthernetPauseEtherType object +func (obj *patternFlowEthernetPauseEtherType) SetIncrement(value PatternFlowEthernetPauseEtherTypeCounter) PatternFlowEthernetPauseEtherType { + obj.setChoice(PatternFlowEthernetPauseEtherTypeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowEthernetPauseEtherTypeCounter +func (obj *patternFlowEthernetPauseEtherType) Decrement() PatternFlowEthernetPauseEtherTypeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowEthernetPauseEtherTypeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowEthernetPauseEtherTypeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowEthernetPauseEtherTypeCounter +func (obj *patternFlowEthernetPauseEtherType) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowEthernetPauseEtherTypeCounter value in the PatternFlowEthernetPauseEtherType object +func (obj *patternFlowEthernetPauseEtherType) SetDecrement(value PatternFlowEthernetPauseEtherTypeCounter) PatternFlowEthernetPauseEtherType { + obj.setChoice(PatternFlowEthernetPauseEtherTypeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowEthernetPauseEtherTypeMetricTag +func (obj *patternFlowEthernetPauseEtherType) MetricTags() PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowEthernetPauseEtherTypeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter struct { + obj *patternFlowEthernetPauseEtherType + patternFlowEthernetPauseEtherTypeMetricTagSlice []PatternFlowEthernetPauseEtherTypeMetricTag + fieldPtr *[]*otg.PatternFlowEthernetPauseEtherTypeMetricTag +} + +func newPatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter(ptr *[]*otg.PatternFlowEthernetPauseEtherTypeMetricTag) PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter { + return &patternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter interface { + setMsg(*patternFlowEthernetPauseEtherType) PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter + Items() []PatternFlowEthernetPauseEtherTypeMetricTag + Add() PatternFlowEthernetPauseEtherTypeMetricTag + Append(items ...PatternFlowEthernetPauseEtherTypeMetricTag) PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter + Set(index int, newObj PatternFlowEthernetPauseEtherTypeMetricTag) PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter + Clear() PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter + clearHolderSlice() PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter + appendHolderSlice(item PatternFlowEthernetPauseEtherTypeMetricTag) PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter +} + +func (obj *patternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter) setMsg(msg *patternFlowEthernetPauseEtherType) PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowEthernetPauseEtherTypeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter) Items() []PatternFlowEthernetPauseEtherTypeMetricTag { + return obj.patternFlowEthernetPauseEtherTypeMetricTagSlice +} + +func (obj *patternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter) Add() PatternFlowEthernetPauseEtherTypeMetricTag { + newObj := &otg.PatternFlowEthernetPauseEtherTypeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowEthernetPauseEtherTypeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowEthernetPauseEtherTypeMetricTagSlice = append(obj.patternFlowEthernetPauseEtherTypeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter) Append(items ...PatternFlowEthernetPauseEtherTypeMetricTag) PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowEthernetPauseEtherTypeMetricTagSlice = append(obj.patternFlowEthernetPauseEtherTypeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter) Set(index int, newObj PatternFlowEthernetPauseEtherTypeMetricTag) PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowEthernetPauseEtherTypeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter) Clear() PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowEthernetPauseEtherTypeMetricTag{} + obj.patternFlowEthernetPauseEtherTypeMetricTagSlice = []PatternFlowEthernetPauseEtherTypeMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter) clearHolderSlice() PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter { + if len(obj.patternFlowEthernetPauseEtherTypeMetricTagSlice) > 0 { + obj.patternFlowEthernetPauseEtherTypeMetricTagSlice = []PatternFlowEthernetPauseEtherTypeMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter) appendHolderSlice(item PatternFlowEthernetPauseEtherTypeMetricTag) PatternFlowEthernetPauseEtherTypePatternFlowEthernetPauseEtherTypeMetricTagIter { + obj.patternFlowEthernetPauseEtherTypeMetricTagSlice = append(obj.patternFlowEthernetPauseEtherTypeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowEthernetPauseEtherType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseEtherType.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowEthernetPauseEtherType.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowEthernetPauseEtherTypeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowEthernetPauseEtherType) setDefault() { + var choices_set int = 0 + var choice PatternFlowEthernetPauseEtherTypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseEtherTypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowEthernetPauseEtherTypeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseEtherTypeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseEtherTypeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowEthernetPauseEtherTypeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowEthernetPauseEtherType") + } + } else { + intVal := otg.PatternFlowEthernetPauseEtherType_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowEthernetPauseEtherType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_ether_type_counter.go b/gosnappi/pattern_flow_ethernet_pause_ether_type_counter.go new file mode 100644 index 00000000..983489ba --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_ether_type_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseEtherTypeCounter ***** +type patternFlowEthernetPauseEtherTypeCounter struct { + validation + obj *otg.PatternFlowEthernetPauseEtherTypeCounter + marshaller marshalPatternFlowEthernetPauseEtherTypeCounter + unMarshaller unMarshalPatternFlowEthernetPauseEtherTypeCounter +} + +func NewPatternFlowEthernetPauseEtherTypeCounter() PatternFlowEthernetPauseEtherTypeCounter { + obj := patternFlowEthernetPauseEtherTypeCounter{obj: &otg.PatternFlowEthernetPauseEtherTypeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseEtherTypeCounter) msg() *otg.PatternFlowEthernetPauseEtherTypeCounter { + return obj.obj +} + +func (obj *patternFlowEthernetPauseEtherTypeCounter) setMsg(msg *otg.PatternFlowEthernetPauseEtherTypeCounter) PatternFlowEthernetPauseEtherTypeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseEtherTypeCounter struct { + obj *patternFlowEthernetPauseEtherTypeCounter +} + +type marshalPatternFlowEthernetPauseEtherTypeCounter interface { + // ToProto marshals PatternFlowEthernetPauseEtherTypeCounter to protobuf object *otg.PatternFlowEthernetPauseEtherTypeCounter + ToProto() (*otg.PatternFlowEthernetPauseEtherTypeCounter, error) + // ToPbText marshals PatternFlowEthernetPauseEtherTypeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseEtherTypeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseEtherTypeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseEtherTypeCounter struct { + obj *patternFlowEthernetPauseEtherTypeCounter +} + +type unMarshalPatternFlowEthernetPauseEtherTypeCounter interface { + // FromProto unmarshals PatternFlowEthernetPauseEtherTypeCounter from protobuf object *otg.PatternFlowEthernetPauseEtherTypeCounter + FromProto(msg *otg.PatternFlowEthernetPauseEtherTypeCounter) (PatternFlowEthernetPauseEtherTypeCounter, error) + // FromPbText unmarshals PatternFlowEthernetPauseEtherTypeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseEtherTypeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseEtherTypeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseEtherTypeCounter) Marshal() marshalPatternFlowEthernetPauseEtherTypeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseEtherTypeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseEtherTypeCounter) Unmarshal() unMarshalPatternFlowEthernetPauseEtherTypeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseEtherTypeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseEtherTypeCounter) ToProto() (*otg.PatternFlowEthernetPauseEtherTypeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseEtherTypeCounter) FromProto(msg *otg.PatternFlowEthernetPauseEtherTypeCounter) (PatternFlowEthernetPauseEtherTypeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseEtherTypeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseEtherTypeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseEtherTypeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseEtherTypeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseEtherTypeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseEtherTypeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseEtherTypeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseEtherTypeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseEtherTypeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseEtherTypeCounter) Clone() (PatternFlowEthernetPauseEtherTypeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseEtherTypeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetPauseEtherTypeCounter is integer counter pattern +type PatternFlowEthernetPauseEtherTypeCounter interface { + Validation + // msg marshals PatternFlowEthernetPauseEtherTypeCounter to protobuf object *otg.PatternFlowEthernetPauseEtherTypeCounter + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseEtherTypeCounter + // setMsg unmarshals PatternFlowEthernetPauseEtherTypeCounter from protobuf object *otg.PatternFlowEthernetPauseEtherTypeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseEtherTypeCounter) PatternFlowEthernetPauseEtherTypeCounter + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseEtherTypeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseEtherTypeCounter + // validate validates PatternFlowEthernetPauseEtherTypeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseEtherTypeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowEthernetPauseEtherTypeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowEthernetPauseEtherTypeCounter + SetStart(value uint32) PatternFlowEthernetPauseEtherTypeCounter + // HasStart checks if Start has been set in PatternFlowEthernetPauseEtherTypeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowEthernetPauseEtherTypeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowEthernetPauseEtherTypeCounter + SetStep(value uint32) PatternFlowEthernetPauseEtherTypeCounter + // HasStep checks if Step has been set in PatternFlowEthernetPauseEtherTypeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowEthernetPauseEtherTypeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowEthernetPauseEtherTypeCounter + SetCount(value uint32) PatternFlowEthernetPauseEtherTypeCounter + // HasCount checks if Count has been set in PatternFlowEthernetPauseEtherTypeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowEthernetPauseEtherTypeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowEthernetPauseEtherTypeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowEthernetPauseEtherTypeCounter object +func (obj *patternFlowEthernetPauseEtherTypeCounter) SetStart(value uint32) PatternFlowEthernetPauseEtherTypeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowEthernetPauseEtherTypeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowEthernetPauseEtherTypeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowEthernetPauseEtherTypeCounter object +func (obj *patternFlowEthernetPauseEtherTypeCounter) SetStep(value uint32) PatternFlowEthernetPauseEtherTypeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetPauseEtherTypeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetPauseEtherTypeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowEthernetPauseEtherTypeCounter object +func (obj *patternFlowEthernetPauseEtherTypeCounter) SetCount(value uint32) PatternFlowEthernetPauseEtherTypeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowEthernetPauseEtherTypeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseEtherTypeCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseEtherTypeCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseEtherTypeCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowEthernetPauseEtherTypeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(34824) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_ether_type_metric_tag.go b/gosnappi/pattern_flow_ethernet_pause_ether_type_metric_tag.go new file mode 100644 index 00000000..5a59337c --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_ether_type_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseEtherTypeMetricTag ***** +type patternFlowEthernetPauseEtherTypeMetricTag struct { + validation + obj *otg.PatternFlowEthernetPauseEtherTypeMetricTag + marshaller marshalPatternFlowEthernetPauseEtherTypeMetricTag + unMarshaller unMarshalPatternFlowEthernetPauseEtherTypeMetricTag +} + +func NewPatternFlowEthernetPauseEtherTypeMetricTag() PatternFlowEthernetPauseEtherTypeMetricTag { + obj := patternFlowEthernetPauseEtherTypeMetricTag{obj: &otg.PatternFlowEthernetPauseEtherTypeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) msg() *otg.PatternFlowEthernetPauseEtherTypeMetricTag { + return obj.obj +} + +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) setMsg(msg *otg.PatternFlowEthernetPauseEtherTypeMetricTag) PatternFlowEthernetPauseEtherTypeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseEtherTypeMetricTag struct { + obj *patternFlowEthernetPauseEtherTypeMetricTag +} + +type marshalPatternFlowEthernetPauseEtherTypeMetricTag interface { + // ToProto marshals PatternFlowEthernetPauseEtherTypeMetricTag to protobuf object *otg.PatternFlowEthernetPauseEtherTypeMetricTag + ToProto() (*otg.PatternFlowEthernetPauseEtherTypeMetricTag, error) + // ToPbText marshals PatternFlowEthernetPauseEtherTypeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseEtherTypeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseEtherTypeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseEtherTypeMetricTag struct { + obj *patternFlowEthernetPauseEtherTypeMetricTag +} + +type unMarshalPatternFlowEthernetPauseEtherTypeMetricTag interface { + // FromProto unmarshals PatternFlowEthernetPauseEtherTypeMetricTag from protobuf object *otg.PatternFlowEthernetPauseEtherTypeMetricTag + FromProto(msg *otg.PatternFlowEthernetPauseEtherTypeMetricTag) (PatternFlowEthernetPauseEtherTypeMetricTag, error) + // FromPbText unmarshals PatternFlowEthernetPauseEtherTypeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseEtherTypeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseEtherTypeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) Marshal() marshalPatternFlowEthernetPauseEtherTypeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseEtherTypeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) Unmarshal() unMarshalPatternFlowEthernetPauseEtherTypeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseEtherTypeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseEtherTypeMetricTag) ToProto() (*otg.PatternFlowEthernetPauseEtherTypeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseEtherTypeMetricTag) FromProto(msg *otg.PatternFlowEthernetPauseEtherTypeMetricTag) (PatternFlowEthernetPauseEtherTypeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseEtherTypeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseEtherTypeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseEtherTypeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseEtherTypeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseEtherTypeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseEtherTypeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) Clone() (PatternFlowEthernetPauseEtherTypeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseEtherTypeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetPauseEtherTypeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowEthernetPauseEtherTypeMetricTag interface { + Validation + // msg marshals PatternFlowEthernetPauseEtherTypeMetricTag to protobuf object *otg.PatternFlowEthernetPauseEtherTypeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseEtherTypeMetricTag + // setMsg unmarshals PatternFlowEthernetPauseEtherTypeMetricTag from protobuf object *otg.PatternFlowEthernetPauseEtherTypeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseEtherTypeMetricTag) PatternFlowEthernetPauseEtherTypeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseEtherTypeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseEtherTypeMetricTag + // validate validates PatternFlowEthernetPauseEtherTypeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseEtherTypeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowEthernetPauseEtherTypeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowEthernetPauseEtherTypeMetricTag + SetName(value string) PatternFlowEthernetPauseEtherTypeMetricTag + // Offset returns uint32, set in PatternFlowEthernetPauseEtherTypeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowEthernetPauseEtherTypeMetricTag + SetOffset(value uint32) PatternFlowEthernetPauseEtherTypeMetricTag + // HasOffset checks if Offset has been set in PatternFlowEthernetPauseEtherTypeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowEthernetPauseEtherTypeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowEthernetPauseEtherTypeMetricTag + SetLength(value uint32) PatternFlowEthernetPauseEtherTypeMetricTag + // HasLength checks if Length has been set in PatternFlowEthernetPauseEtherTypeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowEthernetPauseEtherTypeMetricTag object +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) SetName(value string) PatternFlowEthernetPauseEtherTypeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowEthernetPauseEtherTypeMetricTag object +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) SetOffset(value uint32) PatternFlowEthernetPauseEtherTypeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowEthernetPauseEtherTypeMetricTag object +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) SetLength(value uint32) PatternFlowEthernetPauseEtherTypeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowEthernetPauseEtherTypeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseEtherTypeMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowEthernetPauseEtherTypeMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowEthernetPauseEtherTypeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_src.go b/gosnappi/pattern_flow_ethernet_pause_src.go new file mode 100644 index 00000000..314e1f1e --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_src.go @@ -0,0 +1,658 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseSrc ***** +type patternFlowEthernetPauseSrc struct { + validation + obj *otg.PatternFlowEthernetPauseSrc + marshaller marshalPatternFlowEthernetPauseSrc + unMarshaller unMarshalPatternFlowEthernetPauseSrc + incrementHolder PatternFlowEthernetPauseSrcCounter + decrementHolder PatternFlowEthernetPauseSrcCounter + metricTagsHolder PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter +} + +func NewPatternFlowEthernetPauseSrc() PatternFlowEthernetPauseSrc { + obj := patternFlowEthernetPauseSrc{obj: &otg.PatternFlowEthernetPauseSrc{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseSrc) msg() *otg.PatternFlowEthernetPauseSrc { + return obj.obj +} + +func (obj *patternFlowEthernetPauseSrc) setMsg(msg *otg.PatternFlowEthernetPauseSrc) PatternFlowEthernetPauseSrc { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseSrc struct { + obj *patternFlowEthernetPauseSrc +} + +type marshalPatternFlowEthernetPauseSrc interface { + // ToProto marshals PatternFlowEthernetPauseSrc to protobuf object *otg.PatternFlowEthernetPauseSrc + ToProto() (*otg.PatternFlowEthernetPauseSrc, error) + // ToPbText marshals PatternFlowEthernetPauseSrc to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseSrc to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseSrc to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseSrc struct { + obj *patternFlowEthernetPauseSrc +} + +type unMarshalPatternFlowEthernetPauseSrc interface { + // FromProto unmarshals PatternFlowEthernetPauseSrc from protobuf object *otg.PatternFlowEthernetPauseSrc + FromProto(msg *otg.PatternFlowEthernetPauseSrc) (PatternFlowEthernetPauseSrc, error) + // FromPbText unmarshals PatternFlowEthernetPauseSrc from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseSrc from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseSrc from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseSrc) Marshal() marshalPatternFlowEthernetPauseSrc { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseSrc{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseSrc) Unmarshal() unMarshalPatternFlowEthernetPauseSrc { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseSrc{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseSrc) ToProto() (*otg.PatternFlowEthernetPauseSrc, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseSrc) FromProto(msg *otg.PatternFlowEthernetPauseSrc) (PatternFlowEthernetPauseSrc, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseSrc) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseSrc) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseSrc) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseSrc) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseSrc) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseSrc) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseSrc) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseSrc) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseSrc) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseSrc) Clone() (PatternFlowEthernetPauseSrc, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseSrc() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowEthernetPauseSrc) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowEthernetPauseSrc is source MAC address +type PatternFlowEthernetPauseSrc interface { + Validation + // msg marshals PatternFlowEthernetPauseSrc to protobuf object *otg.PatternFlowEthernetPauseSrc + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseSrc + // setMsg unmarshals PatternFlowEthernetPauseSrc from protobuf object *otg.PatternFlowEthernetPauseSrc + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseSrc) PatternFlowEthernetPauseSrc + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseSrc + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseSrc + // validate validates PatternFlowEthernetPauseSrc + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseSrc, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowEthernetPauseSrcChoiceEnum, set in PatternFlowEthernetPauseSrc + Choice() PatternFlowEthernetPauseSrcChoiceEnum + // setChoice assigns PatternFlowEthernetPauseSrcChoiceEnum provided by user to PatternFlowEthernetPauseSrc + setChoice(value PatternFlowEthernetPauseSrcChoiceEnum) PatternFlowEthernetPauseSrc + // HasChoice checks if Choice has been set in PatternFlowEthernetPauseSrc + HasChoice() bool + // Value returns string, set in PatternFlowEthernetPauseSrc. + Value() string + // SetValue assigns string provided by user to PatternFlowEthernetPauseSrc + SetValue(value string) PatternFlowEthernetPauseSrc + // HasValue checks if Value has been set in PatternFlowEthernetPauseSrc + HasValue() bool + // Values returns []string, set in PatternFlowEthernetPauseSrc. + Values() []string + // SetValues assigns []string provided by user to PatternFlowEthernetPauseSrc + SetValues(value []string) PatternFlowEthernetPauseSrc + // Increment returns PatternFlowEthernetPauseSrcCounter, set in PatternFlowEthernetPauseSrc. + // PatternFlowEthernetPauseSrcCounter is mac counter pattern + Increment() PatternFlowEthernetPauseSrcCounter + // SetIncrement assigns PatternFlowEthernetPauseSrcCounter provided by user to PatternFlowEthernetPauseSrc. + // PatternFlowEthernetPauseSrcCounter is mac counter pattern + SetIncrement(value PatternFlowEthernetPauseSrcCounter) PatternFlowEthernetPauseSrc + // HasIncrement checks if Increment has been set in PatternFlowEthernetPauseSrc + HasIncrement() bool + // Decrement returns PatternFlowEthernetPauseSrcCounter, set in PatternFlowEthernetPauseSrc. + // PatternFlowEthernetPauseSrcCounter is mac counter pattern + Decrement() PatternFlowEthernetPauseSrcCounter + // SetDecrement assigns PatternFlowEthernetPauseSrcCounter provided by user to PatternFlowEthernetPauseSrc. + // PatternFlowEthernetPauseSrcCounter is mac counter pattern + SetDecrement(value PatternFlowEthernetPauseSrcCounter) PatternFlowEthernetPauseSrc + // HasDecrement checks if Decrement has been set in PatternFlowEthernetPauseSrc + HasDecrement() bool + // MetricTags returns PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIterIter, set in PatternFlowEthernetPauseSrc + MetricTags() PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter + setNil() +} + +type PatternFlowEthernetPauseSrcChoiceEnum string + +// Enum of Choice on PatternFlowEthernetPauseSrc +var PatternFlowEthernetPauseSrcChoice = struct { + VALUE PatternFlowEthernetPauseSrcChoiceEnum + VALUES PatternFlowEthernetPauseSrcChoiceEnum + INCREMENT PatternFlowEthernetPauseSrcChoiceEnum + DECREMENT PatternFlowEthernetPauseSrcChoiceEnum +}{ + VALUE: PatternFlowEthernetPauseSrcChoiceEnum("value"), + VALUES: PatternFlowEthernetPauseSrcChoiceEnum("values"), + INCREMENT: PatternFlowEthernetPauseSrcChoiceEnum("increment"), + DECREMENT: PatternFlowEthernetPauseSrcChoiceEnum("decrement"), +} + +func (obj *patternFlowEthernetPauseSrc) Choice() PatternFlowEthernetPauseSrcChoiceEnum { + return PatternFlowEthernetPauseSrcChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowEthernetPauseSrc) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowEthernetPauseSrc) setChoice(value PatternFlowEthernetPauseSrcChoiceEnum) PatternFlowEthernetPauseSrc { + intValue, ok := otg.PatternFlowEthernetPauseSrc_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowEthernetPauseSrcChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowEthernetPauseSrc_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowEthernetPauseSrcChoice.VALUE { + defaultValue := "00:00:00:00:00:00" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowEthernetPauseSrcChoice.VALUES { + defaultValue := []string{"00:00:00:00:00:00"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowEthernetPauseSrcChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowEthernetPauseSrcCounter().msg() + } + + if value == PatternFlowEthernetPauseSrcChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowEthernetPauseSrcCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowEthernetPauseSrc) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowEthernetPauseSrcChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowEthernetPauseSrc) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowEthernetPauseSrc object +func (obj *patternFlowEthernetPauseSrc) SetValue(value string) PatternFlowEthernetPauseSrc { + obj.setChoice(PatternFlowEthernetPauseSrcChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowEthernetPauseSrc) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"00:00:00:00:00:00"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowEthernetPauseSrc object +func (obj *patternFlowEthernetPauseSrc) SetValues(value []string) PatternFlowEthernetPauseSrc { + obj.setChoice(PatternFlowEthernetPauseSrcChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowEthernetPauseSrcCounter +func (obj *patternFlowEthernetPauseSrc) Increment() PatternFlowEthernetPauseSrcCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowEthernetPauseSrcChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowEthernetPauseSrcCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowEthernetPauseSrcCounter +func (obj *patternFlowEthernetPauseSrc) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowEthernetPauseSrcCounter value in the PatternFlowEthernetPauseSrc object +func (obj *patternFlowEthernetPauseSrc) SetIncrement(value PatternFlowEthernetPauseSrcCounter) PatternFlowEthernetPauseSrc { + obj.setChoice(PatternFlowEthernetPauseSrcChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowEthernetPauseSrcCounter +func (obj *patternFlowEthernetPauseSrc) Decrement() PatternFlowEthernetPauseSrcCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowEthernetPauseSrcChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowEthernetPauseSrcCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowEthernetPauseSrcCounter +func (obj *patternFlowEthernetPauseSrc) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowEthernetPauseSrcCounter value in the PatternFlowEthernetPauseSrc object +func (obj *patternFlowEthernetPauseSrc) SetDecrement(value PatternFlowEthernetPauseSrcCounter) PatternFlowEthernetPauseSrc { + obj.setChoice(PatternFlowEthernetPauseSrcChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowEthernetPauseSrcMetricTag +func (obj *patternFlowEthernetPauseSrc) MetricTags() PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowEthernetPauseSrcMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter struct { + obj *patternFlowEthernetPauseSrc + patternFlowEthernetPauseSrcMetricTagSlice []PatternFlowEthernetPauseSrcMetricTag + fieldPtr *[]*otg.PatternFlowEthernetPauseSrcMetricTag +} + +func newPatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter(ptr *[]*otg.PatternFlowEthernetPauseSrcMetricTag) PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter { + return &patternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter interface { + setMsg(*patternFlowEthernetPauseSrc) PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter + Items() []PatternFlowEthernetPauseSrcMetricTag + Add() PatternFlowEthernetPauseSrcMetricTag + Append(items ...PatternFlowEthernetPauseSrcMetricTag) PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter + Set(index int, newObj PatternFlowEthernetPauseSrcMetricTag) PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter + Clear() PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter + clearHolderSlice() PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter + appendHolderSlice(item PatternFlowEthernetPauseSrcMetricTag) PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter +} + +func (obj *patternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter) setMsg(msg *patternFlowEthernetPauseSrc) PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowEthernetPauseSrcMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter) Items() []PatternFlowEthernetPauseSrcMetricTag { + return obj.patternFlowEthernetPauseSrcMetricTagSlice +} + +func (obj *patternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter) Add() PatternFlowEthernetPauseSrcMetricTag { + newObj := &otg.PatternFlowEthernetPauseSrcMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowEthernetPauseSrcMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowEthernetPauseSrcMetricTagSlice = append(obj.patternFlowEthernetPauseSrcMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter) Append(items ...PatternFlowEthernetPauseSrcMetricTag) PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowEthernetPauseSrcMetricTagSlice = append(obj.patternFlowEthernetPauseSrcMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter) Set(index int, newObj PatternFlowEthernetPauseSrcMetricTag) PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowEthernetPauseSrcMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter) Clear() PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowEthernetPauseSrcMetricTag{} + obj.patternFlowEthernetPauseSrcMetricTagSlice = []PatternFlowEthernetPauseSrcMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter) clearHolderSlice() PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter { + if len(obj.patternFlowEthernetPauseSrcMetricTagSlice) > 0 { + obj.patternFlowEthernetPauseSrcMetricTagSlice = []PatternFlowEthernetPauseSrcMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter) appendHolderSlice(item PatternFlowEthernetPauseSrcMetricTag) PatternFlowEthernetPauseSrcPatternFlowEthernetPauseSrcMetricTagIter { + obj.patternFlowEthernetPauseSrcMetricTagSlice = append(obj.patternFlowEthernetPauseSrcMetricTagSlice, item) + return obj +} + +func (obj *patternFlowEthernetPauseSrc) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateMac(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetPauseSrc.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateMacSlice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetPauseSrc.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowEthernetPauseSrcMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowEthernetPauseSrc) setDefault() { + var choices_set int = 0 + var choice PatternFlowEthernetPauseSrcChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseSrcChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowEthernetPauseSrcChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseSrcChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseSrcChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowEthernetPauseSrcChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowEthernetPauseSrc") + } + } else { + intVal := otg.PatternFlowEthernetPauseSrc_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowEthernetPauseSrc_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_src_counter.go b/gosnappi/pattern_flow_ethernet_pause_src_counter.go new file mode 100644 index 00000000..dbeb9bfa --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_src_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseSrcCounter ***** +type patternFlowEthernetPauseSrcCounter struct { + validation + obj *otg.PatternFlowEthernetPauseSrcCounter + marshaller marshalPatternFlowEthernetPauseSrcCounter + unMarshaller unMarshalPatternFlowEthernetPauseSrcCounter +} + +func NewPatternFlowEthernetPauseSrcCounter() PatternFlowEthernetPauseSrcCounter { + obj := patternFlowEthernetPauseSrcCounter{obj: &otg.PatternFlowEthernetPauseSrcCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseSrcCounter) msg() *otg.PatternFlowEthernetPauseSrcCounter { + return obj.obj +} + +func (obj *patternFlowEthernetPauseSrcCounter) setMsg(msg *otg.PatternFlowEthernetPauseSrcCounter) PatternFlowEthernetPauseSrcCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseSrcCounter struct { + obj *patternFlowEthernetPauseSrcCounter +} + +type marshalPatternFlowEthernetPauseSrcCounter interface { + // ToProto marshals PatternFlowEthernetPauseSrcCounter to protobuf object *otg.PatternFlowEthernetPauseSrcCounter + ToProto() (*otg.PatternFlowEthernetPauseSrcCounter, error) + // ToPbText marshals PatternFlowEthernetPauseSrcCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseSrcCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseSrcCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseSrcCounter struct { + obj *patternFlowEthernetPauseSrcCounter +} + +type unMarshalPatternFlowEthernetPauseSrcCounter interface { + // FromProto unmarshals PatternFlowEthernetPauseSrcCounter from protobuf object *otg.PatternFlowEthernetPauseSrcCounter + FromProto(msg *otg.PatternFlowEthernetPauseSrcCounter) (PatternFlowEthernetPauseSrcCounter, error) + // FromPbText unmarshals PatternFlowEthernetPauseSrcCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseSrcCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseSrcCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseSrcCounter) Marshal() marshalPatternFlowEthernetPauseSrcCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseSrcCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseSrcCounter) Unmarshal() unMarshalPatternFlowEthernetPauseSrcCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseSrcCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseSrcCounter) ToProto() (*otg.PatternFlowEthernetPauseSrcCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseSrcCounter) FromProto(msg *otg.PatternFlowEthernetPauseSrcCounter) (PatternFlowEthernetPauseSrcCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseSrcCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseSrcCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseSrcCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseSrcCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseSrcCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseSrcCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseSrcCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseSrcCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseSrcCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseSrcCounter) Clone() (PatternFlowEthernetPauseSrcCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseSrcCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetPauseSrcCounter is mac counter pattern +type PatternFlowEthernetPauseSrcCounter interface { + Validation + // msg marshals PatternFlowEthernetPauseSrcCounter to protobuf object *otg.PatternFlowEthernetPauseSrcCounter + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseSrcCounter + // setMsg unmarshals PatternFlowEthernetPauseSrcCounter from protobuf object *otg.PatternFlowEthernetPauseSrcCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseSrcCounter) PatternFlowEthernetPauseSrcCounter + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseSrcCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseSrcCounter + // validate validates PatternFlowEthernetPauseSrcCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseSrcCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowEthernetPauseSrcCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowEthernetPauseSrcCounter + SetStart(value string) PatternFlowEthernetPauseSrcCounter + // HasStart checks if Start has been set in PatternFlowEthernetPauseSrcCounter + HasStart() bool + // Step returns string, set in PatternFlowEthernetPauseSrcCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowEthernetPauseSrcCounter + SetStep(value string) PatternFlowEthernetPauseSrcCounter + // HasStep checks if Step has been set in PatternFlowEthernetPauseSrcCounter + HasStep() bool + // Count returns uint32, set in PatternFlowEthernetPauseSrcCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowEthernetPauseSrcCounter + SetCount(value uint32) PatternFlowEthernetPauseSrcCounter + // HasCount checks if Count has been set in PatternFlowEthernetPauseSrcCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowEthernetPauseSrcCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowEthernetPauseSrcCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowEthernetPauseSrcCounter object +func (obj *patternFlowEthernetPauseSrcCounter) SetStart(value string) PatternFlowEthernetPauseSrcCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowEthernetPauseSrcCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowEthernetPauseSrcCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowEthernetPauseSrcCounter object +func (obj *patternFlowEthernetPauseSrcCounter) SetStep(value string) PatternFlowEthernetPauseSrcCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetPauseSrcCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetPauseSrcCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowEthernetPauseSrcCounter object +func (obj *patternFlowEthernetPauseSrcCounter) SetCount(value uint32) PatternFlowEthernetPauseSrcCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowEthernetPauseSrcCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateMac(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetPauseSrcCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateMac(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetPauseSrcCounter.Step")) + } + + } + +} + +func (obj *patternFlowEthernetPauseSrcCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("00:00:00:00:00:00") + } + if obj.obj.Step == nil { + obj.SetStep("00:00:00:00:00:01") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_src_metric_tag.go b/gosnappi/pattern_flow_ethernet_pause_src_metric_tag.go new file mode 100644 index 00000000..d8b2ca3e --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_src_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseSrcMetricTag ***** +type patternFlowEthernetPauseSrcMetricTag struct { + validation + obj *otg.PatternFlowEthernetPauseSrcMetricTag + marshaller marshalPatternFlowEthernetPauseSrcMetricTag + unMarshaller unMarshalPatternFlowEthernetPauseSrcMetricTag +} + +func NewPatternFlowEthernetPauseSrcMetricTag() PatternFlowEthernetPauseSrcMetricTag { + obj := patternFlowEthernetPauseSrcMetricTag{obj: &otg.PatternFlowEthernetPauseSrcMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseSrcMetricTag) msg() *otg.PatternFlowEthernetPauseSrcMetricTag { + return obj.obj +} + +func (obj *patternFlowEthernetPauseSrcMetricTag) setMsg(msg *otg.PatternFlowEthernetPauseSrcMetricTag) PatternFlowEthernetPauseSrcMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseSrcMetricTag struct { + obj *patternFlowEthernetPauseSrcMetricTag +} + +type marshalPatternFlowEthernetPauseSrcMetricTag interface { + // ToProto marshals PatternFlowEthernetPauseSrcMetricTag to protobuf object *otg.PatternFlowEthernetPauseSrcMetricTag + ToProto() (*otg.PatternFlowEthernetPauseSrcMetricTag, error) + // ToPbText marshals PatternFlowEthernetPauseSrcMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseSrcMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseSrcMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseSrcMetricTag struct { + obj *patternFlowEthernetPauseSrcMetricTag +} + +type unMarshalPatternFlowEthernetPauseSrcMetricTag interface { + // FromProto unmarshals PatternFlowEthernetPauseSrcMetricTag from protobuf object *otg.PatternFlowEthernetPauseSrcMetricTag + FromProto(msg *otg.PatternFlowEthernetPauseSrcMetricTag) (PatternFlowEthernetPauseSrcMetricTag, error) + // FromPbText unmarshals PatternFlowEthernetPauseSrcMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseSrcMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseSrcMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseSrcMetricTag) Marshal() marshalPatternFlowEthernetPauseSrcMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseSrcMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseSrcMetricTag) Unmarshal() unMarshalPatternFlowEthernetPauseSrcMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseSrcMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseSrcMetricTag) ToProto() (*otg.PatternFlowEthernetPauseSrcMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseSrcMetricTag) FromProto(msg *otg.PatternFlowEthernetPauseSrcMetricTag) (PatternFlowEthernetPauseSrcMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseSrcMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseSrcMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseSrcMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseSrcMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseSrcMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseSrcMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseSrcMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseSrcMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseSrcMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseSrcMetricTag) Clone() (PatternFlowEthernetPauseSrcMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseSrcMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetPauseSrcMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowEthernetPauseSrcMetricTag interface { + Validation + // msg marshals PatternFlowEthernetPauseSrcMetricTag to protobuf object *otg.PatternFlowEthernetPauseSrcMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseSrcMetricTag + // setMsg unmarshals PatternFlowEthernetPauseSrcMetricTag from protobuf object *otg.PatternFlowEthernetPauseSrcMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseSrcMetricTag) PatternFlowEthernetPauseSrcMetricTag + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseSrcMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseSrcMetricTag + // validate validates PatternFlowEthernetPauseSrcMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseSrcMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowEthernetPauseSrcMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowEthernetPauseSrcMetricTag + SetName(value string) PatternFlowEthernetPauseSrcMetricTag + // Offset returns uint32, set in PatternFlowEthernetPauseSrcMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowEthernetPauseSrcMetricTag + SetOffset(value uint32) PatternFlowEthernetPauseSrcMetricTag + // HasOffset checks if Offset has been set in PatternFlowEthernetPauseSrcMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowEthernetPauseSrcMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowEthernetPauseSrcMetricTag + SetLength(value uint32) PatternFlowEthernetPauseSrcMetricTag + // HasLength checks if Length has been set in PatternFlowEthernetPauseSrcMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowEthernetPauseSrcMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowEthernetPauseSrcMetricTag object +func (obj *patternFlowEthernetPauseSrcMetricTag) SetName(value string) PatternFlowEthernetPauseSrcMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetPauseSrcMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetPauseSrcMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowEthernetPauseSrcMetricTag object +func (obj *patternFlowEthernetPauseSrcMetricTag) SetOffset(value uint32) PatternFlowEthernetPauseSrcMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetPauseSrcMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetPauseSrcMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowEthernetPauseSrcMetricTag object +func (obj *patternFlowEthernetPauseSrcMetricTag) SetLength(value uint32) PatternFlowEthernetPauseSrcMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowEthernetPauseSrcMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowEthernetPauseSrcMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 47 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseSrcMetricTag.Offset <= 47 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 48 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowEthernetPauseSrcMetricTag.Length <= 48 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowEthernetPauseSrcMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(48) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_time.go b/gosnappi/pattern_flow_ethernet_pause_time.go new file mode 100644 index 00000000..3ae97818 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_time.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseTime ***** +type patternFlowEthernetPauseTime struct { + validation + obj *otg.PatternFlowEthernetPauseTime + marshaller marshalPatternFlowEthernetPauseTime + unMarshaller unMarshalPatternFlowEthernetPauseTime + incrementHolder PatternFlowEthernetPauseTimeCounter + decrementHolder PatternFlowEthernetPauseTimeCounter + metricTagsHolder PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter +} + +func NewPatternFlowEthernetPauseTime() PatternFlowEthernetPauseTime { + obj := patternFlowEthernetPauseTime{obj: &otg.PatternFlowEthernetPauseTime{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseTime) msg() *otg.PatternFlowEthernetPauseTime { + return obj.obj +} + +func (obj *patternFlowEthernetPauseTime) setMsg(msg *otg.PatternFlowEthernetPauseTime) PatternFlowEthernetPauseTime { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseTime struct { + obj *patternFlowEthernetPauseTime +} + +type marshalPatternFlowEthernetPauseTime interface { + // ToProto marshals PatternFlowEthernetPauseTime to protobuf object *otg.PatternFlowEthernetPauseTime + ToProto() (*otg.PatternFlowEthernetPauseTime, error) + // ToPbText marshals PatternFlowEthernetPauseTime to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseTime to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseTime to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseTime struct { + obj *patternFlowEthernetPauseTime +} + +type unMarshalPatternFlowEthernetPauseTime interface { + // FromProto unmarshals PatternFlowEthernetPauseTime from protobuf object *otg.PatternFlowEthernetPauseTime + FromProto(msg *otg.PatternFlowEthernetPauseTime) (PatternFlowEthernetPauseTime, error) + // FromPbText unmarshals PatternFlowEthernetPauseTime from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseTime from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseTime from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseTime) Marshal() marshalPatternFlowEthernetPauseTime { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseTime{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseTime) Unmarshal() unMarshalPatternFlowEthernetPauseTime { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseTime{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseTime) ToProto() (*otg.PatternFlowEthernetPauseTime, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseTime) FromProto(msg *otg.PatternFlowEthernetPauseTime) (PatternFlowEthernetPauseTime, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseTime) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseTime) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseTime) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseTime) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseTime) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseTime) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseTime) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseTime) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseTime) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseTime) Clone() (PatternFlowEthernetPauseTime, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseTime() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowEthernetPauseTime) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowEthernetPauseTime is time +type PatternFlowEthernetPauseTime interface { + Validation + // msg marshals PatternFlowEthernetPauseTime to protobuf object *otg.PatternFlowEthernetPauseTime + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseTime + // setMsg unmarshals PatternFlowEthernetPauseTime from protobuf object *otg.PatternFlowEthernetPauseTime + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseTime) PatternFlowEthernetPauseTime + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseTime + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseTime + // validate validates PatternFlowEthernetPauseTime + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseTime, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowEthernetPauseTimeChoiceEnum, set in PatternFlowEthernetPauseTime + Choice() PatternFlowEthernetPauseTimeChoiceEnum + // setChoice assigns PatternFlowEthernetPauseTimeChoiceEnum provided by user to PatternFlowEthernetPauseTime + setChoice(value PatternFlowEthernetPauseTimeChoiceEnum) PatternFlowEthernetPauseTime + // HasChoice checks if Choice has been set in PatternFlowEthernetPauseTime + HasChoice() bool + // Value returns uint32, set in PatternFlowEthernetPauseTime. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowEthernetPauseTime + SetValue(value uint32) PatternFlowEthernetPauseTime + // HasValue checks if Value has been set in PatternFlowEthernetPauseTime + HasValue() bool + // Values returns []uint32, set in PatternFlowEthernetPauseTime. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowEthernetPauseTime + SetValues(value []uint32) PatternFlowEthernetPauseTime + // Increment returns PatternFlowEthernetPauseTimeCounter, set in PatternFlowEthernetPauseTime. + // PatternFlowEthernetPauseTimeCounter is integer counter pattern + Increment() PatternFlowEthernetPauseTimeCounter + // SetIncrement assigns PatternFlowEthernetPauseTimeCounter provided by user to PatternFlowEthernetPauseTime. + // PatternFlowEthernetPauseTimeCounter is integer counter pattern + SetIncrement(value PatternFlowEthernetPauseTimeCounter) PatternFlowEthernetPauseTime + // HasIncrement checks if Increment has been set in PatternFlowEthernetPauseTime + HasIncrement() bool + // Decrement returns PatternFlowEthernetPauseTimeCounter, set in PatternFlowEthernetPauseTime. + // PatternFlowEthernetPauseTimeCounter is integer counter pattern + Decrement() PatternFlowEthernetPauseTimeCounter + // SetDecrement assigns PatternFlowEthernetPauseTimeCounter provided by user to PatternFlowEthernetPauseTime. + // PatternFlowEthernetPauseTimeCounter is integer counter pattern + SetDecrement(value PatternFlowEthernetPauseTimeCounter) PatternFlowEthernetPauseTime + // HasDecrement checks if Decrement has been set in PatternFlowEthernetPauseTime + HasDecrement() bool + // MetricTags returns PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIterIter, set in PatternFlowEthernetPauseTime + MetricTags() PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter + setNil() +} + +type PatternFlowEthernetPauseTimeChoiceEnum string + +// Enum of Choice on PatternFlowEthernetPauseTime +var PatternFlowEthernetPauseTimeChoice = struct { + VALUE PatternFlowEthernetPauseTimeChoiceEnum + VALUES PatternFlowEthernetPauseTimeChoiceEnum + INCREMENT PatternFlowEthernetPauseTimeChoiceEnum + DECREMENT PatternFlowEthernetPauseTimeChoiceEnum +}{ + VALUE: PatternFlowEthernetPauseTimeChoiceEnum("value"), + VALUES: PatternFlowEthernetPauseTimeChoiceEnum("values"), + INCREMENT: PatternFlowEthernetPauseTimeChoiceEnum("increment"), + DECREMENT: PatternFlowEthernetPauseTimeChoiceEnum("decrement"), +} + +func (obj *patternFlowEthernetPauseTime) Choice() PatternFlowEthernetPauseTimeChoiceEnum { + return PatternFlowEthernetPauseTimeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowEthernetPauseTime) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowEthernetPauseTime) setChoice(value PatternFlowEthernetPauseTimeChoiceEnum) PatternFlowEthernetPauseTime { + intValue, ok := otg.PatternFlowEthernetPauseTime_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowEthernetPauseTimeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowEthernetPauseTime_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowEthernetPauseTimeChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowEthernetPauseTimeChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowEthernetPauseTimeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowEthernetPauseTimeCounter().msg() + } + + if value == PatternFlowEthernetPauseTimeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowEthernetPauseTimeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowEthernetPauseTime) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowEthernetPauseTimeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowEthernetPauseTime) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowEthernetPauseTime object +func (obj *patternFlowEthernetPauseTime) SetValue(value uint32) PatternFlowEthernetPauseTime { + obj.setChoice(PatternFlowEthernetPauseTimeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowEthernetPauseTime) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowEthernetPauseTime object +func (obj *patternFlowEthernetPauseTime) SetValues(value []uint32) PatternFlowEthernetPauseTime { + obj.setChoice(PatternFlowEthernetPauseTimeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowEthernetPauseTimeCounter +func (obj *patternFlowEthernetPauseTime) Increment() PatternFlowEthernetPauseTimeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowEthernetPauseTimeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowEthernetPauseTimeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowEthernetPauseTimeCounter +func (obj *patternFlowEthernetPauseTime) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowEthernetPauseTimeCounter value in the PatternFlowEthernetPauseTime object +func (obj *patternFlowEthernetPauseTime) SetIncrement(value PatternFlowEthernetPauseTimeCounter) PatternFlowEthernetPauseTime { + obj.setChoice(PatternFlowEthernetPauseTimeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowEthernetPauseTimeCounter +func (obj *patternFlowEthernetPauseTime) Decrement() PatternFlowEthernetPauseTimeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowEthernetPauseTimeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowEthernetPauseTimeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowEthernetPauseTimeCounter +func (obj *patternFlowEthernetPauseTime) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowEthernetPauseTimeCounter value in the PatternFlowEthernetPauseTime object +func (obj *patternFlowEthernetPauseTime) SetDecrement(value PatternFlowEthernetPauseTimeCounter) PatternFlowEthernetPauseTime { + obj.setChoice(PatternFlowEthernetPauseTimeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowEthernetPauseTimeMetricTag +func (obj *patternFlowEthernetPauseTime) MetricTags() PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowEthernetPauseTimeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter struct { + obj *patternFlowEthernetPauseTime + patternFlowEthernetPauseTimeMetricTagSlice []PatternFlowEthernetPauseTimeMetricTag + fieldPtr *[]*otg.PatternFlowEthernetPauseTimeMetricTag +} + +func newPatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter(ptr *[]*otg.PatternFlowEthernetPauseTimeMetricTag) PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter { + return &patternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter interface { + setMsg(*patternFlowEthernetPauseTime) PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter + Items() []PatternFlowEthernetPauseTimeMetricTag + Add() PatternFlowEthernetPauseTimeMetricTag + Append(items ...PatternFlowEthernetPauseTimeMetricTag) PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter + Set(index int, newObj PatternFlowEthernetPauseTimeMetricTag) PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter + Clear() PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter + clearHolderSlice() PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter + appendHolderSlice(item PatternFlowEthernetPauseTimeMetricTag) PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter +} + +func (obj *patternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter) setMsg(msg *patternFlowEthernetPauseTime) PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowEthernetPauseTimeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter) Items() []PatternFlowEthernetPauseTimeMetricTag { + return obj.patternFlowEthernetPauseTimeMetricTagSlice +} + +func (obj *patternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter) Add() PatternFlowEthernetPauseTimeMetricTag { + newObj := &otg.PatternFlowEthernetPauseTimeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowEthernetPauseTimeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowEthernetPauseTimeMetricTagSlice = append(obj.patternFlowEthernetPauseTimeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter) Append(items ...PatternFlowEthernetPauseTimeMetricTag) PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowEthernetPauseTimeMetricTagSlice = append(obj.patternFlowEthernetPauseTimeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter) Set(index int, newObj PatternFlowEthernetPauseTimeMetricTag) PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowEthernetPauseTimeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter) Clear() PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowEthernetPauseTimeMetricTag{} + obj.patternFlowEthernetPauseTimeMetricTagSlice = []PatternFlowEthernetPauseTimeMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter) clearHolderSlice() PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter { + if len(obj.patternFlowEthernetPauseTimeMetricTagSlice) > 0 { + obj.patternFlowEthernetPauseTimeMetricTagSlice = []PatternFlowEthernetPauseTimeMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter) appendHolderSlice(item PatternFlowEthernetPauseTimeMetricTag) PatternFlowEthernetPauseTimePatternFlowEthernetPauseTimeMetricTagIter { + obj.patternFlowEthernetPauseTimeMetricTagSlice = append(obj.patternFlowEthernetPauseTimeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowEthernetPauseTime) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseTime.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowEthernetPauseTime.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowEthernetPauseTimeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowEthernetPauseTime) setDefault() { + var choices_set int = 0 + var choice PatternFlowEthernetPauseTimeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseTimeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowEthernetPauseTimeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseTimeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowEthernetPauseTimeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowEthernetPauseTimeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowEthernetPauseTime") + } + } else { + intVal := otg.PatternFlowEthernetPauseTime_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowEthernetPauseTime_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_time_counter.go b/gosnappi/pattern_flow_ethernet_pause_time_counter.go new file mode 100644 index 00000000..18aba2da --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_time_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseTimeCounter ***** +type patternFlowEthernetPauseTimeCounter struct { + validation + obj *otg.PatternFlowEthernetPauseTimeCounter + marshaller marshalPatternFlowEthernetPauseTimeCounter + unMarshaller unMarshalPatternFlowEthernetPauseTimeCounter +} + +func NewPatternFlowEthernetPauseTimeCounter() PatternFlowEthernetPauseTimeCounter { + obj := patternFlowEthernetPauseTimeCounter{obj: &otg.PatternFlowEthernetPauseTimeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseTimeCounter) msg() *otg.PatternFlowEthernetPauseTimeCounter { + return obj.obj +} + +func (obj *patternFlowEthernetPauseTimeCounter) setMsg(msg *otg.PatternFlowEthernetPauseTimeCounter) PatternFlowEthernetPauseTimeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseTimeCounter struct { + obj *patternFlowEthernetPauseTimeCounter +} + +type marshalPatternFlowEthernetPauseTimeCounter interface { + // ToProto marshals PatternFlowEthernetPauseTimeCounter to protobuf object *otg.PatternFlowEthernetPauseTimeCounter + ToProto() (*otg.PatternFlowEthernetPauseTimeCounter, error) + // ToPbText marshals PatternFlowEthernetPauseTimeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseTimeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseTimeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseTimeCounter struct { + obj *patternFlowEthernetPauseTimeCounter +} + +type unMarshalPatternFlowEthernetPauseTimeCounter interface { + // FromProto unmarshals PatternFlowEthernetPauseTimeCounter from protobuf object *otg.PatternFlowEthernetPauseTimeCounter + FromProto(msg *otg.PatternFlowEthernetPauseTimeCounter) (PatternFlowEthernetPauseTimeCounter, error) + // FromPbText unmarshals PatternFlowEthernetPauseTimeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseTimeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseTimeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseTimeCounter) Marshal() marshalPatternFlowEthernetPauseTimeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseTimeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseTimeCounter) Unmarshal() unMarshalPatternFlowEthernetPauseTimeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseTimeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseTimeCounter) ToProto() (*otg.PatternFlowEthernetPauseTimeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseTimeCounter) FromProto(msg *otg.PatternFlowEthernetPauseTimeCounter) (PatternFlowEthernetPauseTimeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseTimeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseTimeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseTimeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseTimeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseTimeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseTimeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseTimeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseTimeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseTimeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseTimeCounter) Clone() (PatternFlowEthernetPauseTimeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseTimeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetPauseTimeCounter is integer counter pattern +type PatternFlowEthernetPauseTimeCounter interface { + Validation + // msg marshals PatternFlowEthernetPauseTimeCounter to protobuf object *otg.PatternFlowEthernetPauseTimeCounter + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseTimeCounter + // setMsg unmarshals PatternFlowEthernetPauseTimeCounter from protobuf object *otg.PatternFlowEthernetPauseTimeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseTimeCounter) PatternFlowEthernetPauseTimeCounter + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseTimeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseTimeCounter + // validate validates PatternFlowEthernetPauseTimeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseTimeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowEthernetPauseTimeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowEthernetPauseTimeCounter + SetStart(value uint32) PatternFlowEthernetPauseTimeCounter + // HasStart checks if Start has been set in PatternFlowEthernetPauseTimeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowEthernetPauseTimeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowEthernetPauseTimeCounter + SetStep(value uint32) PatternFlowEthernetPauseTimeCounter + // HasStep checks if Step has been set in PatternFlowEthernetPauseTimeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowEthernetPauseTimeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowEthernetPauseTimeCounter + SetCount(value uint32) PatternFlowEthernetPauseTimeCounter + // HasCount checks if Count has been set in PatternFlowEthernetPauseTimeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowEthernetPauseTimeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowEthernetPauseTimeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowEthernetPauseTimeCounter object +func (obj *patternFlowEthernetPauseTimeCounter) SetStart(value uint32) PatternFlowEthernetPauseTimeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowEthernetPauseTimeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowEthernetPauseTimeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowEthernetPauseTimeCounter object +func (obj *patternFlowEthernetPauseTimeCounter) SetStep(value uint32) PatternFlowEthernetPauseTimeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetPauseTimeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetPauseTimeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowEthernetPauseTimeCounter object +func (obj *patternFlowEthernetPauseTimeCounter) SetCount(value uint32) PatternFlowEthernetPauseTimeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowEthernetPauseTimeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseTimeCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseTimeCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseTimeCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowEthernetPauseTimeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pause_time_metric_tag.go b/gosnappi/pattern_flow_ethernet_pause_time_metric_tag.go new file mode 100644 index 00000000..b8f06048 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pause_time_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPauseTimeMetricTag ***** +type patternFlowEthernetPauseTimeMetricTag struct { + validation + obj *otg.PatternFlowEthernetPauseTimeMetricTag + marshaller marshalPatternFlowEthernetPauseTimeMetricTag + unMarshaller unMarshalPatternFlowEthernetPauseTimeMetricTag +} + +func NewPatternFlowEthernetPauseTimeMetricTag() PatternFlowEthernetPauseTimeMetricTag { + obj := patternFlowEthernetPauseTimeMetricTag{obj: &otg.PatternFlowEthernetPauseTimeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPauseTimeMetricTag) msg() *otg.PatternFlowEthernetPauseTimeMetricTag { + return obj.obj +} + +func (obj *patternFlowEthernetPauseTimeMetricTag) setMsg(msg *otg.PatternFlowEthernetPauseTimeMetricTag) PatternFlowEthernetPauseTimeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPauseTimeMetricTag struct { + obj *patternFlowEthernetPauseTimeMetricTag +} + +type marshalPatternFlowEthernetPauseTimeMetricTag interface { + // ToProto marshals PatternFlowEthernetPauseTimeMetricTag to protobuf object *otg.PatternFlowEthernetPauseTimeMetricTag + ToProto() (*otg.PatternFlowEthernetPauseTimeMetricTag, error) + // ToPbText marshals PatternFlowEthernetPauseTimeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPauseTimeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPauseTimeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPauseTimeMetricTag struct { + obj *patternFlowEthernetPauseTimeMetricTag +} + +type unMarshalPatternFlowEthernetPauseTimeMetricTag interface { + // FromProto unmarshals PatternFlowEthernetPauseTimeMetricTag from protobuf object *otg.PatternFlowEthernetPauseTimeMetricTag + FromProto(msg *otg.PatternFlowEthernetPauseTimeMetricTag) (PatternFlowEthernetPauseTimeMetricTag, error) + // FromPbText unmarshals PatternFlowEthernetPauseTimeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPauseTimeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPauseTimeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPauseTimeMetricTag) Marshal() marshalPatternFlowEthernetPauseTimeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPauseTimeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPauseTimeMetricTag) Unmarshal() unMarshalPatternFlowEthernetPauseTimeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPauseTimeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPauseTimeMetricTag) ToProto() (*otg.PatternFlowEthernetPauseTimeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPauseTimeMetricTag) FromProto(msg *otg.PatternFlowEthernetPauseTimeMetricTag) (PatternFlowEthernetPauseTimeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPauseTimeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPauseTimeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPauseTimeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseTimeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPauseTimeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPauseTimeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPauseTimeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseTimeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPauseTimeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPauseTimeMetricTag) Clone() (PatternFlowEthernetPauseTimeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPauseTimeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetPauseTimeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowEthernetPauseTimeMetricTag interface { + Validation + // msg marshals PatternFlowEthernetPauseTimeMetricTag to protobuf object *otg.PatternFlowEthernetPauseTimeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPauseTimeMetricTag + // setMsg unmarshals PatternFlowEthernetPauseTimeMetricTag from protobuf object *otg.PatternFlowEthernetPauseTimeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPauseTimeMetricTag) PatternFlowEthernetPauseTimeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowEthernetPauseTimeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPauseTimeMetricTag + // validate validates PatternFlowEthernetPauseTimeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPauseTimeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowEthernetPauseTimeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowEthernetPauseTimeMetricTag + SetName(value string) PatternFlowEthernetPauseTimeMetricTag + // Offset returns uint32, set in PatternFlowEthernetPauseTimeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowEthernetPauseTimeMetricTag + SetOffset(value uint32) PatternFlowEthernetPauseTimeMetricTag + // HasOffset checks if Offset has been set in PatternFlowEthernetPauseTimeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowEthernetPauseTimeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowEthernetPauseTimeMetricTag + SetLength(value uint32) PatternFlowEthernetPauseTimeMetricTag + // HasLength checks if Length has been set in PatternFlowEthernetPauseTimeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowEthernetPauseTimeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowEthernetPauseTimeMetricTag object +func (obj *patternFlowEthernetPauseTimeMetricTag) SetName(value string) PatternFlowEthernetPauseTimeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetPauseTimeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetPauseTimeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowEthernetPauseTimeMetricTag object +func (obj *patternFlowEthernetPauseTimeMetricTag) SetOffset(value uint32) PatternFlowEthernetPauseTimeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetPauseTimeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetPauseTimeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowEthernetPauseTimeMetricTag object +func (obj *patternFlowEthernetPauseTimeMetricTag) SetLength(value uint32) PatternFlowEthernetPauseTimeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowEthernetPauseTimeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowEthernetPauseTimeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPauseTimeMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowEthernetPauseTimeMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowEthernetPauseTimeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pfc_queue.go b/gosnappi/pattern_flow_ethernet_pfc_queue.go new file mode 100644 index 00000000..f07be22d --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pfc_queue.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPfcQueue ***** +type patternFlowEthernetPfcQueue struct { + validation + obj *otg.PatternFlowEthernetPfcQueue + marshaller marshalPatternFlowEthernetPfcQueue + unMarshaller unMarshalPatternFlowEthernetPfcQueue + incrementHolder PatternFlowEthernetPfcQueueCounter + decrementHolder PatternFlowEthernetPfcQueueCounter + metricTagsHolder PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter +} + +func NewPatternFlowEthernetPfcQueue() PatternFlowEthernetPfcQueue { + obj := patternFlowEthernetPfcQueue{obj: &otg.PatternFlowEthernetPfcQueue{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPfcQueue) msg() *otg.PatternFlowEthernetPfcQueue { + return obj.obj +} + +func (obj *patternFlowEthernetPfcQueue) setMsg(msg *otg.PatternFlowEthernetPfcQueue) PatternFlowEthernetPfcQueue { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPfcQueue struct { + obj *patternFlowEthernetPfcQueue +} + +type marshalPatternFlowEthernetPfcQueue interface { + // ToProto marshals PatternFlowEthernetPfcQueue to protobuf object *otg.PatternFlowEthernetPfcQueue + ToProto() (*otg.PatternFlowEthernetPfcQueue, error) + // ToPbText marshals PatternFlowEthernetPfcQueue to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPfcQueue to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPfcQueue to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPfcQueue struct { + obj *patternFlowEthernetPfcQueue +} + +type unMarshalPatternFlowEthernetPfcQueue interface { + // FromProto unmarshals PatternFlowEthernetPfcQueue from protobuf object *otg.PatternFlowEthernetPfcQueue + FromProto(msg *otg.PatternFlowEthernetPfcQueue) (PatternFlowEthernetPfcQueue, error) + // FromPbText unmarshals PatternFlowEthernetPfcQueue from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPfcQueue from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPfcQueue from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPfcQueue) Marshal() marshalPatternFlowEthernetPfcQueue { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPfcQueue{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPfcQueue) Unmarshal() unMarshalPatternFlowEthernetPfcQueue { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPfcQueue{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPfcQueue) ToProto() (*otg.PatternFlowEthernetPfcQueue, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPfcQueue) FromProto(msg *otg.PatternFlowEthernetPfcQueue) (PatternFlowEthernetPfcQueue, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPfcQueue) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPfcQueue) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPfcQueue) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPfcQueue) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPfcQueue) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPfcQueue) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPfcQueue) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPfcQueue) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPfcQueue) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPfcQueue) Clone() (PatternFlowEthernetPfcQueue, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPfcQueue() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowEthernetPfcQueue) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowEthernetPfcQueue is priority flow control queue +type PatternFlowEthernetPfcQueue interface { + Validation + // msg marshals PatternFlowEthernetPfcQueue to protobuf object *otg.PatternFlowEthernetPfcQueue + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPfcQueue + // setMsg unmarshals PatternFlowEthernetPfcQueue from protobuf object *otg.PatternFlowEthernetPfcQueue + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPfcQueue) PatternFlowEthernetPfcQueue + // provides marshal interface + Marshal() marshalPatternFlowEthernetPfcQueue + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPfcQueue + // validate validates PatternFlowEthernetPfcQueue + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPfcQueue, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowEthernetPfcQueueChoiceEnum, set in PatternFlowEthernetPfcQueue + Choice() PatternFlowEthernetPfcQueueChoiceEnum + // setChoice assigns PatternFlowEthernetPfcQueueChoiceEnum provided by user to PatternFlowEthernetPfcQueue + setChoice(value PatternFlowEthernetPfcQueueChoiceEnum) PatternFlowEthernetPfcQueue + // HasChoice checks if Choice has been set in PatternFlowEthernetPfcQueue + HasChoice() bool + // Value returns uint32, set in PatternFlowEthernetPfcQueue. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowEthernetPfcQueue + SetValue(value uint32) PatternFlowEthernetPfcQueue + // HasValue checks if Value has been set in PatternFlowEthernetPfcQueue + HasValue() bool + // Values returns []uint32, set in PatternFlowEthernetPfcQueue. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowEthernetPfcQueue + SetValues(value []uint32) PatternFlowEthernetPfcQueue + // Increment returns PatternFlowEthernetPfcQueueCounter, set in PatternFlowEthernetPfcQueue. + // PatternFlowEthernetPfcQueueCounter is integer counter pattern + Increment() PatternFlowEthernetPfcQueueCounter + // SetIncrement assigns PatternFlowEthernetPfcQueueCounter provided by user to PatternFlowEthernetPfcQueue. + // PatternFlowEthernetPfcQueueCounter is integer counter pattern + SetIncrement(value PatternFlowEthernetPfcQueueCounter) PatternFlowEthernetPfcQueue + // HasIncrement checks if Increment has been set in PatternFlowEthernetPfcQueue + HasIncrement() bool + // Decrement returns PatternFlowEthernetPfcQueueCounter, set in PatternFlowEthernetPfcQueue. + // PatternFlowEthernetPfcQueueCounter is integer counter pattern + Decrement() PatternFlowEthernetPfcQueueCounter + // SetDecrement assigns PatternFlowEthernetPfcQueueCounter provided by user to PatternFlowEthernetPfcQueue. + // PatternFlowEthernetPfcQueueCounter is integer counter pattern + SetDecrement(value PatternFlowEthernetPfcQueueCounter) PatternFlowEthernetPfcQueue + // HasDecrement checks if Decrement has been set in PatternFlowEthernetPfcQueue + HasDecrement() bool + // MetricTags returns PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIterIter, set in PatternFlowEthernetPfcQueue + MetricTags() PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter + setNil() +} + +type PatternFlowEthernetPfcQueueChoiceEnum string + +// Enum of Choice on PatternFlowEthernetPfcQueue +var PatternFlowEthernetPfcQueueChoice = struct { + VALUE PatternFlowEthernetPfcQueueChoiceEnum + VALUES PatternFlowEthernetPfcQueueChoiceEnum + INCREMENT PatternFlowEthernetPfcQueueChoiceEnum + DECREMENT PatternFlowEthernetPfcQueueChoiceEnum +}{ + VALUE: PatternFlowEthernetPfcQueueChoiceEnum("value"), + VALUES: PatternFlowEthernetPfcQueueChoiceEnum("values"), + INCREMENT: PatternFlowEthernetPfcQueueChoiceEnum("increment"), + DECREMENT: PatternFlowEthernetPfcQueueChoiceEnum("decrement"), +} + +func (obj *patternFlowEthernetPfcQueue) Choice() PatternFlowEthernetPfcQueueChoiceEnum { + return PatternFlowEthernetPfcQueueChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowEthernetPfcQueue) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowEthernetPfcQueue) setChoice(value PatternFlowEthernetPfcQueueChoiceEnum) PatternFlowEthernetPfcQueue { + intValue, ok := otg.PatternFlowEthernetPfcQueue_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowEthernetPfcQueueChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowEthernetPfcQueue_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowEthernetPfcQueueChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowEthernetPfcQueueChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowEthernetPfcQueueChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowEthernetPfcQueueCounter().msg() + } + + if value == PatternFlowEthernetPfcQueueChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowEthernetPfcQueueCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowEthernetPfcQueue) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowEthernetPfcQueueChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowEthernetPfcQueue) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowEthernetPfcQueue object +func (obj *patternFlowEthernetPfcQueue) SetValue(value uint32) PatternFlowEthernetPfcQueue { + obj.setChoice(PatternFlowEthernetPfcQueueChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowEthernetPfcQueue) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowEthernetPfcQueue object +func (obj *patternFlowEthernetPfcQueue) SetValues(value []uint32) PatternFlowEthernetPfcQueue { + obj.setChoice(PatternFlowEthernetPfcQueueChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowEthernetPfcQueueCounter +func (obj *patternFlowEthernetPfcQueue) Increment() PatternFlowEthernetPfcQueueCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowEthernetPfcQueueChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowEthernetPfcQueueCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowEthernetPfcQueueCounter +func (obj *patternFlowEthernetPfcQueue) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowEthernetPfcQueueCounter value in the PatternFlowEthernetPfcQueue object +func (obj *patternFlowEthernetPfcQueue) SetIncrement(value PatternFlowEthernetPfcQueueCounter) PatternFlowEthernetPfcQueue { + obj.setChoice(PatternFlowEthernetPfcQueueChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowEthernetPfcQueueCounter +func (obj *patternFlowEthernetPfcQueue) Decrement() PatternFlowEthernetPfcQueueCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowEthernetPfcQueueChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowEthernetPfcQueueCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowEthernetPfcQueueCounter +func (obj *patternFlowEthernetPfcQueue) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowEthernetPfcQueueCounter value in the PatternFlowEthernetPfcQueue object +func (obj *patternFlowEthernetPfcQueue) SetDecrement(value PatternFlowEthernetPfcQueueCounter) PatternFlowEthernetPfcQueue { + obj.setChoice(PatternFlowEthernetPfcQueueChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowEthernetPfcQueueMetricTag +func (obj *patternFlowEthernetPfcQueue) MetricTags() PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowEthernetPfcQueueMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter struct { + obj *patternFlowEthernetPfcQueue + patternFlowEthernetPfcQueueMetricTagSlice []PatternFlowEthernetPfcQueueMetricTag + fieldPtr *[]*otg.PatternFlowEthernetPfcQueueMetricTag +} + +func newPatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter(ptr *[]*otg.PatternFlowEthernetPfcQueueMetricTag) PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter { + return &patternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter interface { + setMsg(*patternFlowEthernetPfcQueue) PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter + Items() []PatternFlowEthernetPfcQueueMetricTag + Add() PatternFlowEthernetPfcQueueMetricTag + Append(items ...PatternFlowEthernetPfcQueueMetricTag) PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter + Set(index int, newObj PatternFlowEthernetPfcQueueMetricTag) PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter + Clear() PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter + clearHolderSlice() PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter + appendHolderSlice(item PatternFlowEthernetPfcQueueMetricTag) PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter +} + +func (obj *patternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter) setMsg(msg *patternFlowEthernetPfcQueue) PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowEthernetPfcQueueMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter) Items() []PatternFlowEthernetPfcQueueMetricTag { + return obj.patternFlowEthernetPfcQueueMetricTagSlice +} + +func (obj *patternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter) Add() PatternFlowEthernetPfcQueueMetricTag { + newObj := &otg.PatternFlowEthernetPfcQueueMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowEthernetPfcQueueMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowEthernetPfcQueueMetricTagSlice = append(obj.patternFlowEthernetPfcQueueMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter) Append(items ...PatternFlowEthernetPfcQueueMetricTag) PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowEthernetPfcQueueMetricTagSlice = append(obj.patternFlowEthernetPfcQueueMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter) Set(index int, newObj PatternFlowEthernetPfcQueueMetricTag) PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowEthernetPfcQueueMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter) Clear() PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowEthernetPfcQueueMetricTag{} + obj.patternFlowEthernetPfcQueueMetricTagSlice = []PatternFlowEthernetPfcQueueMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter) clearHolderSlice() PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter { + if len(obj.patternFlowEthernetPfcQueueMetricTagSlice) > 0 { + obj.patternFlowEthernetPfcQueueMetricTagSlice = []PatternFlowEthernetPfcQueueMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter) appendHolderSlice(item PatternFlowEthernetPfcQueueMetricTag) PatternFlowEthernetPfcQueuePatternFlowEthernetPfcQueueMetricTagIter { + obj.patternFlowEthernetPfcQueueMetricTagSlice = append(obj.patternFlowEthernetPfcQueueMetricTagSlice, item) + return obj +} + +func (obj *patternFlowEthernetPfcQueue) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPfcQueue.Value <= 7 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowEthernetPfcQueue.Values <= 7 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowEthernetPfcQueueMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowEthernetPfcQueue) setDefault() { + var choices_set int = 0 + var choice PatternFlowEthernetPfcQueueChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowEthernetPfcQueueChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowEthernetPfcQueueChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowEthernetPfcQueueChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowEthernetPfcQueueChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowEthernetPfcQueueChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowEthernetPfcQueue") + } + } else { + intVal := otg.PatternFlowEthernetPfcQueue_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowEthernetPfcQueue_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pfc_queue_counter.go b/gosnappi/pattern_flow_ethernet_pfc_queue_counter.go new file mode 100644 index 00000000..a0cf3d29 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pfc_queue_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPfcQueueCounter ***** +type patternFlowEthernetPfcQueueCounter struct { + validation + obj *otg.PatternFlowEthernetPfcQueueCounter + marshaller marshalPatternFlowEthernetPfcQueueCounter + unMarshaller unMarshalPatternFlowEthernetPfcQueueCounter +} + +func NewPatternFlowEthernetPfcQueueCounter() PatternFlowEthernetPfcQueueCounter { + obj := patternFlowEthernetPfcQueueCounter{obj: &otg.PatternFlowEthernetPfcQueueCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPfcQueueCounter) msg() *otg.PatternFlowEthernetPfcQueueCounter { + return obj.obj +} + +func (obj *patternFlowEthernetPfcQueueCounter) setMsg(msg *otg.PatternFlowEthernetPfcQueueCounter) PatternFlowEthernetPfcQueueCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPfcQueueCounter struct { + obj *patternFlowEthernetPfcQueueCounter +} + +type marshalPatternFlowEthernetPfcQueueCounter interface { + // ToProto marshals PatternFlowEthernetPfcQueueCounter to protobuf object *otg.PatternFlowEthernetPfcQueueCounter + ToProto() (*otg.PatternFlowEthernetPfcQueueCounter, error) + // ToPbText marshals PatternFlowEthernetPfcQueueCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPfcQueueCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPfcQueueCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPfcQueueCounter struct { + obj *patternFlowEthernetPfcQueueCounter +} + +type unMarshalPatternFlowEthernetPfcQueueCounter interface { + // FromProto unmarshals PatternFlowEthernetPfcQueueCounter from protobuf object *otg.PatternFlowEthernetPfcQueueCounter + FromProto(msg *otg.PatternFlowEthernetPfcQueueCounter) (PatternFlowEthernetPfcQueueCounter, error) + // FromPbText unmarshals PatternFlowEthernetPfcQueueCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPfcQueueCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPfcQueueCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPfcQueueCounter) Marshal() marshalPatternFlowEthernetPfcQueueCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPfcQueueCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPfcQueueCounter) Unmarshal() unMarshalPatternFlowEthernetPfcQueueCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPfcQueueCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPfcQueueCounter) ToProto() (*otg.PatternFlowEthernetPfcQueueCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPfcQueueCounter) FromProto(msg *otg.PatternFlowEthernetPfcQueueCounter) (PatternFlowEthernetPfcQueueCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPfcQueueCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPfcQueueCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPfcQueueCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPfcQueueCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPfcQueueCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPfcQueueCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPfcQueueCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPfcQueueCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPfcQueueCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPfcQueueCounter) Clone() (PatternFlowEthernetPfcQueueCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPfcQueueCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetPfcQueueCounter is integer counter pattern +type PatternFlowEthernetPfcQueueCounter interface { + Validation + // msg marshals PatternFlowEthernetPfcQueueCounter to protobuf object *otg.PatternFlowEthernetPfcQueueCounter + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPfcQueueCounter + // setMsg unmarshals PatternFlowEthernetPfcQueueCounter from protobuf object *otg.PatternFlowEthernetPfcQueueCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPfcQueueCounter) PatternFlowEthernetPfcQueueCounter + // provides marshal interface + Marshal() marshalPatternFlowEthernetPfcQueueCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPfcQueueCounter + // validate validates PatternFlowEthernetPfcQueueCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPfcQueueCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowEthernetPfcQueueCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowEthernetPfcQueueCounter + SetStart(value uint32) PatternFlowEthernetPfcQueueCounter + // HasStart checks if Start has been set in PatternFlowEthernetPfcQueueCounter + HasStart() bool + // Step returns uint32, set in PatternFlowEthernetPfcQueueCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowEthernetPfcQueueCounter + SetStep(value uint32) PatternFlowEthernetPfcQueueCounter + // HasStep checks if Step has been set in PatternFlowEthernetPfcQueueCounter + HasStep() bool + // Count returns uint32, set in PatternFlowEthernetPfcQueueCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowEthernetPfcQueueCounter + SetCount(value uint32) PatternFlowEthernetPfcQueueCounter + // HasCount checks if Count has been set in PatternFlowEthernetPfcQueueCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowEthernetPfcQueueCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowEthernetPfcQueueCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowEthernetPfcQueueCounter object +func (obj *patternFlowEthernetPfcQueueCounter) SetStart(value uint32) PatternFlowEthernetPfcQueueCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowEthernetPfcQueueCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowEthernetPfcQueueCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowEthernetPfcQueueCounter object +func (obj *patternFlowEthernetPfcQueueCounter) SetStep(value uint32) PatternFlowEthernetPfcQueueCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetPfcQueueCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetPfcQueueCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowEthernetPfcQueueCounter object +func (obj *patternFlowEthernetPfcQueueCounter) SetCount(value uint32) PatternFlowEthernetPfcQueueCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowEthernetPfcQueueCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPfcQueueCounter.Start <= 7 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPfcQueueCounter.Step <= 7 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPfcQueueCounter.Count <= 7 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowEthernetPfcQueueCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_pfc_queue_metric_tag.go b/gosnappi/pattern_flow_ethernet_pfc_queue_metric_tag.go new file mode 100644 index 00000000..ab663d61 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_pfc_queue_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetPfcQueueMetricTag ***** +type patternFlowEthernetPfcQueueMetricTag struct { + validation + obj *otg.PatternFlowEthernetPfcQueueMetricTag + marshaller marshalPatternFlowEthernetPfcQueueMetricTag + unMarshaller unMarshalPatternFlowEthernetPfcQueueMetricTag +} + +func NewPatternFlowEthernetPfcQueueMetricTag() PatternFlowEthernetPfcQueueMetricTag { + obj := patternFlowEthernetPfcQueueMetricTag{obj: &otg.PatternFlowEthernetPfcQueueMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetPfcQueueMetricTag) msg() *otg.PatternFlowEthernetPfcQueueMetricTag { + return obj.obj +} + +func (obj *patternFlowEthernetPfcQueueMetricTag) setMsg(msg *otg.PatternFlowEthernetPfcQueueMetricTag) PatternFlowEthernetPfcQueueMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetPfcQueueMetricTag struct { + obj *patternFlowEthernetPfcQueueMetricTag +} + +type marshalPatternFlowEthernetPfcQueueMetricTag interface { + // ToProto marshals PatternFlowEthernetPfcQueueMetricTag to protobuf object *otg.PatternFlowEthernetPfcQueueMetricTag + ToProto() (*otg.PatternFlowEthernetPfcQueueMetricTag, error) + // ToPbText marshals PatternFlowEthernetPfcQueueMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetPfcQueueMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetPfcQueueMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetPfcQueueMetricTag struct { + obj *patternFlowEthernetPfcQueueMetricTag +} + +type unMarshalPatternFlowEthernetPfcQueueMetricTag interface { + // FromProto unmarshals PatternFlowEthernetPfcQueueMetricTag from protobuf object *otg.PatternFlowEthernetPfcQueueMetricTag + FromProto(msg *otg.PatternFlowEthernetPfcQueueMetricTag) (PatternFlowEthernetPfcQueueMetricTag, error) + // FromPbText unmarshals PatternFlowEthernetPfcQueueMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetPfcQueueMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetPfcQueueMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetPfcQueueMetricTag) Marshal() marshalPatternFlowEthernetPfcQueueMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetPfcQueueMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetPfcQueueMetricTag) Unmarshal() unMarshalPatternFlowEthernetPfcQueueMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetPfcQueueMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetPfcQueueMetricTag) ToProto() (*otg.PatternFlowEthernetPfcQueueMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetPfcQueueMetricTag) FromProto(msg *otg.PatternFlowEthernetPfcQueueMetricTag) (PatternFlowEthernetPfcQueueMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetPfcQueueMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetPfcQueueMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetPfcQueueMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPfcQueueMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetPfcQueueMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetPfcQueueMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetPfcQueueMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPfcQueueMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetPfcQueueMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetPfcQueueMetricTag) Clone() (PatternFlowEthernetPfcQueueMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetPfcQueueMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetPfcQueueMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowEthernetPfcQueueMetricTag interface { + Validation + // msg marshals PatternFlowEthernetPfcQueueMetricTag to protobuf object *otg.PatternFlowEthernetPfcQueueMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowEthernetPfcQueueMetricTag + // setMsg unmarshals PatternFlowEthernetPfcQueueMetricTag from protobuf object *otg.PatternFlowEthernetPfcQueueMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetPfcQueueMetricTag) PatternFlowEthernetPfcQueueMetricTag + // provides marshal interface + Marshal() marshalPatternFlowEthernetPfcQueueMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetPfcQueueMetricTag + // validate validates PatternFlowEthernetPfcQueueMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetPfcQueueMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowEthernetPfcQueueMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowEthernetPfcQueueMetricTag + SetName(value string) PatternFlowEthernetPfcQueueMetricTag + // Offset returns uint32, set in PatternFlowEthernetPfcQueueMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowEthernetPfcQueueMetricTag + SetOffset(value uint32) PatternFlowEthernetPfcQueueMetricTag + // HasOffset checks if Offset has been set in PatternFlowEthernetPfcQueueMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowEthernetPfcQueueMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowEthernetPfcQueueMetricTag + SetLength(value uint32) PatternFlowEthernetPfcQueueMetricTag + // HasLength checks if Length has been set in PatternFlowEthernetPfcQueueMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowEthernetPfcQueueMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowEthernetPfcQueueMetricTag object +func (obj *patternFlowEthernetPfcQueueMetricTag) SetName(value string) PatternFlowEthernetPfcQueueMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetPfcQueueMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetPfcQueueMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowEthernetPfcQueueMetricTag object +func (obj *patternFlowEthernetPfcQueueMetricTag) SetOffset(value uint32) PatternFlowEthernetPfcQueueMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetPfcQueueMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetPfcQueueMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowEthernetPfcQueueMetricTag object +func (obj *patternFlowEthernetPfcQueueMetricTag) SetLength(value uint32) PatternFlowEthernetPfcQueueMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowEthernetPfcQueueMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowEthernetPfcQueueMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 2 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetPfcQueueMetricTag.Offset <= 2 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowEthernetPfcQueueMetricTag.Length <= 3 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowEthernetPfcQueueMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(3) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_src.go b/gosnappi/pattern_flow_ethernet_src.go new file mode 100644 index 00000000..4b9ffde7 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_src.go @@ -0,0 +1,658 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetSrc ***** +type patternFlowEthernetSrc struct { + validation + obj *otg.PatternFlowEthernetSrc + marshaller marshalPatternFlowEthernetSrc + unMarshaller unMarshalPatternFlowEthernetSrc + incrementHolder PatternFlowEthernetSrcCounter + decrementHolder PatternFlowEthernetSrcCounter + metricTagsHolder PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter +} + +func NewPatternFlowEthernetSrc() PatternFlowEthernetSrc { + obj := patternFlowEthernetSrc{obj: &otg.PatternFlowEthernetSrc{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetSrc) msg() *otg.PatternFlowEthernetSrc { + return obj.obj +} + +func (obj *patternFlowEthernetSrc) setMsg(msg *otg.PatternFlowEthernetSrc) PatternFlowEthernetSrc { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetSrc struct { + obj *patternFlowEthernetSrc +} + +type marshalPatternFlowEthernetSrc interface { + // ToProto marshals PatternFlowEthernetSrc to protobuf object *otg.PatternFlowEthernetSrc + ToProto() (*otg.PatternFlowEthernetSrc, error) + // ToPbText marshals PatternFlowEthernetSrc to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetSrc to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetSrc to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetSrc struct { + obj *patternFlowEthernetSrc +} + +type unMarshalPatternFlowEthernetSrc interface { + // FromProto unmarshals PatternFlowEthernetSrc from protobuf object *otg.PatternFlowEthernetSrc + FromProto(msg *otg.PatternFlowEthernetSrc) (PatternFlowEthernetSrc, error) + // FromPbText unmarshals PatternFlowEthernetSrc from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetSrc from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetSrc from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetSrc) Marshal() marshalPatternFlowEthernetSrc { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetSrc{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetSrc) Unmarshal() unMarshalPatternFlowEthernetSrc { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetSrc{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetSrc) ToProto() (*otg.PatternFlowEthernetSrc, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetSrc) FromProto(msg *otg.PatternFlowEthernetSrc) (PatternFlowEthernetSrc, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetSrc) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetSrc) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetSrc) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetSrc) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetSrc) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetSrc) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetSrc) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetSrc) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetSrc) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetSrc) Clone() (PatternFlowEthernetSrc, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetSrc() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowEthernetSrc) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowEthernetSrc is source MAC address +type PatternFlowEthernetSrc interface { + Validation + // msg marshals PatternFlowEthernetSrc to protobuf object *otg.PatternFlowEthernetSrc + // and doesn't set defaults + msg() *otg.PatternFlowEthernetSrc + // setMsg unmarshals PatternFlowEthernetSrc from protobuf object *otg.PatternFlowEthernetSrc + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetSrc) PatternFlowEthernetSrc + // provides marshal interface + Marshal() marshalPatternFlowEthernetSrc + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetSrc + // validate validates PatternFlowEthernetSrc + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetSrc, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowEthernetSrcChoiceEnum, set in PatternFlowEthernetSrc + Choice() PatternFlowEthernetSrcChoiceEnum + // setChoice assigns PatternFlowEthernetSrcChoiceEnum provided by user to PatternFlowEthernetSrc + setChoice(value PatternFlowEthernetSrcChoiceEnum) PatternFlowEthernetSrc + // HasChoice checks if Choice has been set in PatternFlowEthernetSrc + HasChoice() bool + // Value returns string, set in PatternFlowEthernetSrc. + Value() string + // SetValue assigns string provided by user to PatternFlowEthernetSrc + SetValue(value string) PatternFlowEthernetSrc + // HasValue checks if Value has been set in PatternFlowEthernetSrc + HasValue() bool + // Values returns []string, set in PatternFlowEthernetSrc. + Values() []string + // SetValues assigns []string provided by user to PatternFlowEthernetSrc + SetValues(value []string) PatternFlowEthernetSrc + // Increment returns PatternFlowEthernetSrcCounter, set in PatternFlowEthernetSrc. + // PatternFlowEthernetSrcCounter is mac counter pattern + Increment() PatternFlowEthernetSrcCounter + // SetIncrement assigns PatternFlowEthernetSrcCounter provided by user to PatternFlowEthernetSrc. + // PatternFlowEthernetSrcCounter is mac counter pattern + SetIncrement(value PatternFlowEthernetSrcCounter) PatternFlowEthernetSrc + // HasIncrement checks if Increment has been set in PatternFlowEthernetSrc + HasIncrement() bool + // Decrement returns PatternFlowEthernetSrcCounter, set in PatternFlowEthernetSrc. + // PatternFlowEthernetSrcCounter is mac counter pattern + Decrement() PatternFlowEthernetSrcCounter + // SetDecrement assigns PatternFlowEthernetSrcCounter provided by user to PatternFlowEthernetSrc. + // PatternFlowEthernetSrcCounter is mac counter pattern + SetDecrement(value PatternFlowEthernetSrcCounter) PatternFlowEthernetSrc + // HasDecrement checks if Decrement has been set in PatternFlowEthernetSrc + HasDecrement() bool + // MetricTags returns PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIterIter, set in PatternFlowEthernetSrc + MetricTags() PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter + setNil() +} + +type PatternFlowEthernetSrcChoiceEnum string + +// Enum of Choice on PatternFlowEthernetSrc +var PatternFlowEthernetSrcChoice = struct { + VALUE PatternFlowEthernetSrcChoiceEnum + VALUES PatternFlowEthernetSrcChoiceEnum + INCREMENT PatternFlowEthernetSrcChoiceEnum + DECREMENT PatternFlowEthernetSrcChoiceEnum +}{ + VALUE: PatternFlowEthernetSrcChoiceEnum("value"), + VALUES: PatternFlowEthernetSrcChoiceEnum("values"), + INCREMENT: PatternFlowEthernetSrcChoiceEnum("increment"), + DECREMENT: PatternFlowEthernetSrcChoiceEnum("decrement"), +} + +func (obj *patternFlowEthernetSrc) Choice() PatternFlowEthernetSrcChoiceEnum { + return PatternFlowEthernetSrcChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowEthernetSrc) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowEthernetSrc) setChoice(value PatternFlowEthernetSrcChoiceEnum) PatternFlowEthernetSrc { + intValue, ok := otg.PatternFlowEthernetSrc_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowEthernetSrcChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowEthernetSrc_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowEthernetSrcChoice.VALUE { + defaultValue := "00:00:00:00:00:00" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowEthernetSrcChoice.VALUES { + defaultValue := []string{"00:00:00:00:00:00"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowEthernetSrcChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowEthernetSrcCounter().msg() + } + + if value == PatternFlowEthernetSrcChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowEthernetSrcCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowEthernetSrc) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowEthernetSrcChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowEthernetSrc) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowEthernetSrc object +func (obj *patternFlowEthernetSrc) SetValue(value string) PatternFlowEthernetSrc { + obj.setChoice(PatternFlowEthernetSrcChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowEthernetSrc) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"00:00:00:00:00:00"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowEthernetSrc object +func (obj *patternFlowEthernetSrc) SetValues(value []string) PatternFlowEthernetSrc { + obj.setChoice(PatternFlowEthernetSrcChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowEthernetSrcCounter +func (obj *patternFlowEthernetSrc) Increment() PatternFlowEthernetSrcCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowEthernetSrcChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowEthernetSrcCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowEthernetSrcCounter +func (obj *patternFlowEthernetSrc) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowEthernetSrcCounter value in the PatternFlowEthernetSrc object +func (obj *patternFlowEthernetSrc) SetIncrement(value PatternFlowEthernetSrcCounter) PatternFlowEthernetSrc { + obj.setChoice(PatternFlowEthernetSrcChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowEthernetSrcCounter +func (obj *patternFlowEthernetSrc) Decrement() PatternFlowEthernetSrcCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowEthernetSrcChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowEthernetSrcCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowEthernetSrcCounter +func (obj *patternFlowEthernetSrc) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowEthernetSrcCounter value in the PatternFlowEthernetSrc object +func (obj *patternFlowEthernetSrc) SetDecrement(value PatternFlowEthernetSrcCounter) PatternFlowEthernetSrc { + obj.setChoice(PatternFlowEthernetSrcChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowEthernetSrcMetricTag +func (obj *patternFlowEthernetSrc) MetricTags() PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowEthernetSrcMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter struct { + obj *patternFlowEthernetSrc + patternFlowEthernetSrcMetricTagSlice []PatternFlowEthernetSrcMetricTag + fieldPtr *[]*otg.PatternFlowEthernetSrcMetricTag +} + +func newPatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter(ptr *[]*otg.PatternFlowEthernetSrcMetricTag) PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter { + return &patternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter interface { + setMsg(*patternFlowEthernetSrc) PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter + Items() []PatternFlowEthernetSrcMetricTag + Add() PatternFlowEthernetSrcMetricTag + Append(items ...PatternFlowEthernetSrcMetricTag) PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter + Set(index int, newObj PatternFlowEthernetSrcMetricTag) PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter + Clear() PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter + clearHolderSlice() PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter + appendHolderSlice(item PatternFlowEthernetSrcMetricTag) PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter +} + +func (obj *patternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter) setMsg(msg *patternFlowEthernetSrc) PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowEthernetSrcMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter) Items() []PatternFlowEthernetSrcMetricTag { + return obj.patternFlowEthernetSrcMetricTagSlice +} + +func (obj *patternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter) Add() PatternFlowEthernetSrcMetricTag { + newObj := &otg.PatternFlowEthernetSrcMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowEthernetSrcMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowEthernetSrcMetricTagSlice = append(obj.patternFlowEthernetSrcMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter) Append(items ...PatternFlowEthernetSrcMetricTag) PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowEthernetSrcMetricTagSlice = append(obj.patternFlowEthernetSrcMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter) Set(index int, newObj PatternFlowEthernetSrcMetricTag) PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowEthernetSrcMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter) Clear() PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowEthernetSrcMetricTag{} + obj.patternFlowEthernetSrcMetricTagSlice = []PatternFlowEthernetSrcMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter) clearHolderSlice() PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter { + if len(obj.patternFlowEthernetSrcMetricTagSlice) > 0 { + obj.patternFlowEthernetSrcMetricTagSlice = []PatternFlowEthernetSrcMetricTag{} + } + return obj +} +func (obj *patternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter) appendHolderSlice(item PatternFlowEthernetSrcMetricTag) PatternFlowEthernetSrcPatternFlowEthernetSrcMetricTagIter { + obj.patternFlowEthernetSrcMetricTagSlice = append(obj.patternFlowEthernetSrcMetricTagSlice, item) + return obj +} + +func (obj *patternFlowEthernetSrc) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateMac(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetSrc.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateMacSlice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetSrc.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowEthernetSrcMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowEthernetSrc) setDefault() { + var choices_set int = 0 + var choice PatternFlowEthernetSrcChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowEthernetSrcChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowEthernetSrcChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowEthernetSrcChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowEthernetSrcChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowEthernetSrcChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowEthernetSrc") + } + } else { + intVal := otg.PatternFlowEthernetSrc_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowEthernetSrc_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ethernet_src_counter.go b/gosnappi/pattern_flow_ethernet_src_counter.go new file mode 100644 index 00000000..e48af7b4 --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_src_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetSrcCounter ***** +type patternFlowEthernetSrcCounter struct { + validation + obj *otg.PatternFlowEthernetSrcCounter + marshaller marshalPatternFlowEthernetSrcCounter + unMarshaller unMarshalPatternFlowEthernetSrcCounter +} + +func NewPatternFlowEthernetSrcCounter() PatternFlowEthernetSrcCounter { + obj := patternFlowEthernetSrcCounter{obj: &otg.PatternFlowEthernetSrcCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetSrcCounter) msg() *otg.PatternFlowEthernetSrcCounter { + return obj.obj +} + +func (obj *patternFlowEthernetSrcCounter) setMsg(msg *otg.PatternFlowEthernetSrcCounter) PatternFlowEthernetSrcCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetSrcCounter struct { + obj *patternFlowEthernetSrcCounter +} + +type marshalPatternFlowEthernetSrcCounter interface { + // ToProto marshals PatternFlowEthernetSrcCounter to protobuf object *otg.PatternFlowEthernetSrcCounter + ToProto() (*otg.PatternFlowEthernetSrcCounter, error) + // ToPbText marshals PatternFlowEthernetSrcCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetSrcCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetSrcCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetSrcCounter struct { + obj *patternFlowEthernetSrcCounter +} + +type unMarshalPatternFlowEthernetSrcCounter interface { + // FromProto unmarshals PatternFlowEthernetSrcCounter from protobuf object *otg.PatternFlowEthernetSrcCounter + FromProto(msg *otg.PatternFlowEthernetSrcCounter) (PatternFlowEthernetSrcCounter, error) + // FromPbText unmarshals PatternFlowEthernetSrcCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetSrcCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetSrcCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetSrcCounter) Marshal() marshalPatternFlowEthernetSrcCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetSrcCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetSrcCounter) Unmarshal() unMarshalPatternFlowEthernetSrcCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetSrcCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetSrcCounter) ToProto() (*otg.PatternFlowEthernetSrcCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetSrcCounter) FromProto(msg *otg.PatternFlowEthernetSrcCounter) (PatternFlowEthernetSrcCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetSrcCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetSrcCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetSrcCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetSrcCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetSrcCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetSrcCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetSrcCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetSrcCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetSrcCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetSrcCounter) Clone() (PatternFlowEthernetSrcCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetSrcCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetSrcCounter is mac counter pattern +type PatternFlowEthernetSrcCounter interface { + Validation + // msg marshals PatternFlowEthernetSrcCounter to protobuf object *otg.PatternFlowEthernetSrcCounter + // and doesn't set defaults + msg() *otg.PatternFlowEthernetSrcCounter + // setMsg unmarshals PatternFlowEthernetSrcCounter from protobuf object *otg.PatternFlowEthernetSrcCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetSrcCounter) PatternFlowEthernetSrcCounter + // provides marshal interface + Marshal() marshalPatternFlowEthernetSrcCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetSrcCounter + // validate validates PatternFlowEthernetSrcCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetSrcCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowEthernetSrcCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowEthernetSrcCounter + SetStart(value string) PatternFlowEthernetSrcCounter + // HasStart checks if Start has been set in PatternFlowEthernetSrcCounter + HasStart() bool + // Step returns string, set in PatternFlowEthernetSrcCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowEthernetSrcCounter + SetStep(value string) PatternFlowEthernetSrcCounter + // HasStep checks if Step has been set in PatternFlowEthernetSrcCounter + HasStep() bool + // Count returns uint32, set in PatternFlowEthernetSrcCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowEthernetSrcCounter + SetCount(value uint32) PatternFlowEthernetSrcCounter + // HasCount checks if Count has been set in PatternFlowEthernetSrcCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowEthernetSrcCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowEthernetSrcCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowEthernetSrcCounter object +func (obj *patternFlowEthernetSrcCounter) SetStart(value string) PatternFlowEthernetSrcCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowEthernetSrcCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowEthernetSrcCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowEthernetSrcCounter object +func (obj *patternFlowEthernetSrcCounter) SetStep(value string) PatternFlowEthernetSrcCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetSrcCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowEthernetSrcCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowEthernetSrcCounter object +func (obj *patternFlowEthernetSrcCounter) SetCount(value uint32) PatternFlowEthernetSrcCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowEthernetSrcCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateMac(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetSrcCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateMac(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowEthernetSrcCounter.Step")) + } + + } + +} + +func (obj *patternFlowEthernetSrcCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("00:00:00:00:00:00") + } + if obj.obj.Step == nil { + obj.SetStep("00:00:00:00:00:01") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ethernet_src_metric_tag.go b/gosnappi/pattern_flow_ethernet_src_metric_tag.go new file mode 100644 index 00000000..15108d3f --- /dev/null +++ b/gosnappi/pattern_flow_ethernet_src_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowEthernetSrcMetricTag ***** +type patternFlowEthernetSrcMetricTag struct { + validation + obj *otg.PatternFlowEthernetSrcMetricTag + marshaller marshalPatternFlowEthernetSrcMetricTag + unMarshaller unMarshalPatternFlowEthernetSrcMetricTag +} + +func NewPatternFlowEthernetSrcMetricTag() PatternFlowEthernetSrcMetricTag { + obj := patternFlowEthernetSrcMetricTag{obj: &otg.PatternFlowEthernetSrcMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowEthernetSrcMetricTag) msg() *otg.PatternFlowEthernetSrcMetricTag { + return obj.obj +} + +func (obj *patternFlowEthernetSrcMetricTag) setMsg(msg *otg.PatternFlowEthernetSrcMetricTag) PatternFlowEthernetSrcMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowEthernetSrcMetricTag struct { + obj *patternFlowEthernetSrcMetricTag +} + +type marshalPatternFlowEthernetSrcMetricTag interface { + // ToProto marshals PatternFlowEthernetSrcMetricTag to protobuf object *otg.PatternFlowEthernetSrcMetricTag + ToProto() (*otg.PatternFlowEthernetSrcMetricTag, error) + // ToPbText marshals PatternFlowEthernetSrcMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowEthernetSrcMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowEthernetSrcMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowEthernetSrcMetricTag struct { + obj *patternFlowEthernetSrcMetricTag +} + +type unMarshalPatternFlowEthernetSrcMetricTag interface { + // FromProto unmarshals PatternFlowEthernetSrcMetricTag from protobuf object *otg.PatternFlowEthernetSrcMetricTag + FromProto(msg *otg.PatternFlowEthernetSrcMetricTag) (PatternFlowEthernetSrcMetricTag, error) + // FromPbText unmarshals PatternFlowEthernetSrcMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowEthernetSrcMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowEthernetSrcMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowEthernetSrcMetricTag) Marshal() marshalPatternFlowEthernetSrcMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowEthernetSrcMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowEthernetSrcMetricTag) Unmarshal() unMarshalPatternFlowEthernetSrcMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowEthernetSrcMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowEthernetSrcMetricTag) ToProto() (*otg.PatternFlowEthernetSrcMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowEthernetSrcMetricTag) FromProto(msg *otg.PatternFlowEthernetSrcMetricTag) (PatternFlowEthernetSrcMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowEthernetSrcMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowEthernetSrcMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowEthernetSrcMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetSrcMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowEthernetSrcMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowEthernetSrcMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowEthernetSrcMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowEthernetSrcMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowEthernetSrcMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowEthernetSrcMetricTag) Clone() (PatternFlowEthernetSrcMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowEthernetSrcMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowEthernetSrcMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowEthernetSrcMetricTag interface { + Validation + // msg marshals PatternFlowEthernetSrcMetricTag to protobuf object *otg.PatternFlowEthernetSrcMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowEthernetSrcMetricTag + // setMsg unmarshals PatternFlowEthernetSrcMetricTag from protobuf object *otg.PatternFlowEthernetSrcMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowEthernetSrcMetricTag) PatternFlowEthernetSrcMetricTag + // provides marshal interface + Marshal() marshalPatternFlowEthernetSrcMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowEthernetSrcMetricTag + // validate validates PatternFlowEthernetSrcMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowEthernetSrcMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowEthernetSrcMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowEthernetSrcMetricTag + SetName(value string) PatternFlowEthernetSrcMetricTag + // Offset returns uint32, set in PatternFlowEthernetSrcMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowEthernetSrcMetricTag + SetOffset(value uint32) PatternFlowEthernetSrcMetricTag + // HasOffset checks if Offset has been set in PatternFlowEthernetSrcMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowEthernetSrcMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowEthernetSrcMetricTag + SetLength(value uint32) PatternFlowEthernetSrcMetricTag + // HasLength checks if Length has been set in PatternFlowEthernetSrcMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowEthernetSrcMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowEthernetSrcMetricTag object +func (obj *patternFlowEthernetSrcMetricTag) SetName(value string) PatternFlowEthernetSrcMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetSrcMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowEthernetSrcMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowEthernetSrcMetricTag object +func (obj *patternFlowEthernetSrcMetricTag) SetOffset(value uint32) PatternFlowEthernetSrcMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetSrcMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowEthernetSrcMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowEthernetSrcMetricTag object +func (obj *patternFlowEthernetSrcMetricTag) SetLength(value uint32) PatternFlowEthernetSrcMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowEthernetSrcMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowEthernetSrcMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 47 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowEthernetSrcMetricTag.Offset <= 47 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 48 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowEthernetSrcMetricTag.Length <= 48 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowEthernetSrcMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(48) + } + +} diff --git a/gosnappi/pattern_flow_gre_checksum.go b/gosnappi/pattern_flow_gre_checksum.go new file mode 100644 index 00000000..2b9f4c24 --- /dev/null +++ b/gosnappi/pattern_flow_gre_checksum.go @@ -0,0 +1,434 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreChecksum ***** +type patternFlowGreChecksum struct { + validation + obj *otg.PatternFlowGreChecksum + marshaller marshalPatternFlowGreChecksum + unMarshaller unMarshalPatternFlowGreChecksum +} + +func NewPatternFlowGreChecksum() PatternFlowGreChecksum { + obj := patternFlowGreChecksum{obj: &otg.PatternFlowGreChecksum{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreChecksum) msg() *otg.PatternFlowGreChecksum { + return obj.obj +} + +func (obj *patternFlowGreChecksum) setMsg(msg *otg.PatternFlowGreChecksum) PatternFlowGreChecksum { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreChecksum struct { + obj *patternFlowGreChecksum +} + +type marshalPatternFlowGreChecksum interface { + // ToProto marshals PatternFlowGreChecksum to protobuf object *otg.PatternFlowGreChecksum + ToProto() (*otg.PatternFlowGreChecksum, error) + // ToPbText marshals PatternFlowGreChecksum to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreChecksum to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreChecksum to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreChecksum struct { + obj *patternFlowGreChecksum +} + +type unMarshalPatternFlowGreChecksum interface { + // FromProto unmarshals PatternFlowGreChecksum from protobuf object *otg.PatternFlowGreChecksum + FromProto(msg *otg.PatternFlowGreChecksum) (PatternFlowGreChecksum, error) + // FromPbText unmarshals PatternFlowGreChecksum from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreChecksum from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreChecksum from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreChecksum) Marshal() marshalPatternFlowGreChecksum { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreChecksum{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreChecksum) Unmarshal() unMarshalPatternFlowGreChecksum { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreChecksum{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreChecksum) ToProto() (*otg.PatternFlowGreChecksum, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreChecksum) FromProto(msg *otg.PatternFlowGreChecksum) (PatternFlowGreChecksum, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreChecksum) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreChecksum) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreChecksum) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreChecksum) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreChecksum) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreChecksum) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreChecksum) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreChecksum) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreChecksum) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreChecksum) Clone() (PatternFlowGreChecksum, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreChecksum() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGreChecksum is optional checksum of GRE header and payload. Only present if the checksum_present bit is set. +type PatternFlowGreChecksum interface { + Validation + // msg marshals PatternFlowGreChecksum to protobuf object *otg.PatternFlowGreChecksum + // and doesn't set defaults + msg() *otg.PatternFlowGreChecksum + // setMsg unmarshals PatternFlowGreChecksum from protobuf object *otg.PatternFlowGreChecksum + // and doesn't set defaults + setMsg(*otg.PatternFlowGreChecksum) PatternFlowGreChecksum + // provides marshal interface + Marshal() marshalPatternFlowGreChecksum + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreChecksum + // validate validates PatternFlowGreChecksum + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreChecksum, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGreChecksumChoiceEnum, set in PatternFlowGreChecksum + Choice() PatternFlowGreChecksumChoiceEnum + // setChoice assigns PatternFlowGreChecksumChoiceEnum provided by user to PatternFlowGreChecksum + setChoice(value PatternFlowGreChecksumChoiceEnum) PatternFlowGreChecksum + // HasChoice checks if Choice has been set in PatternFlowGreChecksum + HasChoice() bool + // Generated returns PatternFlowGreChecksumGeneratedEnum, set in PatternFlowGreChecksum + Generated() PatternFlowGreChecksumGeneratedEnum + // SetGenerated assigns PatternFlowGreChecksumGeneratedEnum provided by user to PatternFlowGreChecksum + SetGenerated(value PatternFlowGreChecksumGeneratedEnum) PatternFlowGreChecksum + // HasGenerated checks if Generated has been set in PatternFlowGreChecksum + HasGenerated() bool + // Custom returns uint32, set in PatternFlowGreChecksum. + Custom() uint32 + // SetCustom assigns uint32 provided by user to PatternFlowGreChecksum + SetCustom(value uint32) PatternFlowGreChecksum + // HasCustom checks if Custom has been set in PatternFlowGreChecksum + HasCustom() bool +} + +type PatternFlowGreChecksumChoiceEnum string + +// Enum of Choice on PatternFlowGreChecksum +var PatternFlowGreChecksumChoice = struct { + GENERATED PatternFlowGreChecksumChoiceEnum + CUSTOM PatternFlowGreChecksumChoiceEnum +}{ + GENERATED: PatternFlowGreChecksumChoiceEnum("generated"), + CUSTOM: PatternFlowGreChecksumChoiceEnum("custom"), +} + +func (obj *patternFlowGreChecksum) Choice() PatternFlowGreChecksumChoiceEnum { + return PatternFlowGreChecksumChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The type of checksum +// Choice returns a string +func (obj *patternFlowGreChecksum) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGreChecksum) setChoice(value PatternFlowGreChecksumChoiceEnum) PatternFlowGreChecksum { + intValue, ok := otg.PatternFlowGreChecksum_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGreChecksumChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGreChecksum_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.obj.Generated = otg.PatternFlowGreChecksum_Generated_unspecified.Enum() + return obj +} + +type PatternFlowGreChecksumGeneratedEnum string + +// Enum of Generated on PatternFlowGreChecksum +var PatternFlowGreChecksumGenerated = struct { + GOOD PatternFlowGreChecksumGeneratedEnum + BAD PatternFlowGreChecksumGeneratedEnum +}{ + GOOD: PatternFlowGreChecksumGeneratedEnum("good"), + BAD: PatternFlowGreChecksumGeneratedEnum("bad"), +} + +func (obj *patternFlowGreChecksum) Generated() PatternFlowGreChecksumGeneratedEnum { + return PatternFlowGreChecksumGeneratedEnum(obj.obj.Generated.Enum().String()) +} + +// A system generated checksum value +// Generated returns a string +func (obj *patternFlowGreChecksum) HasGenerated() bool { + return obj.obj.Generated != nil +} + +func (obj *patternFlowGreChecksum) SetGenerated(value PatternFlowGreChecksumGeneratedEnum) PatternFlowGreChecksum { + intValue, ok := otg.PatternFlowGreChecksum_Generated_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGreChecksumGeneratedEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGreChecksum_Generated_Enum(intValue) + obj.obj.Generated = &enumValue + + return obj +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowGreChecksum) Custom() uint32 { + + if obj.obj.Custom == nil { + obj.setChoice(PatternFlowGreChecksumChoice.CUSTOM) + } + + return *obj.obj.Custom + +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowGreChecksum) HasCustom() bool { + return obj.obj.Custom != nil +} + +// A custom checksum value +// SetCustom sets the uint32 value in the PatternFlowGreChecksum object +func (obj *patternFlowGreChecksum) SetCustom(value uint32) PatternFlowGreChecksum { + obj.setChoice(PatternFlowGreChecksumChoice.CUSTOM) + obj.obj.Custom = &value + return obj +} + +func (obj *patternFlowGreChecksum) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Custom != nil { + + if *obj.obj.Custom > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreChecksum.Custom <= 65535 but Got %d", *obj.obj.Custom)) + } + + } + +} + +func (obj *patternFlowGreChecksum) setDefault() { + var choices_set int = 0 + var choice PatternFlowGreChecksumChoiceEnum + + if obj.obj.Generated != nil && obj.obj.Generated.Number() != 0 { + choices_set += 1 + choice = PatternFlowGreChecksumChoice.GENERATED + } + + if obj.obj.Custom != nil { + choices_set += 1 + choice = PatternFlowGreChecksumChoice.CUSTOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGreChecksumChoice.GENERATED) + if obj.obj.Generated.Number() == 0 { + obj.SetGenerated(PatternFlowGreChecksumGenerated.GOOD) + + } + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGreChecksum") + } + } else { + intVal := otg.PatternFlowGreChecksum_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGreChecksum_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gre_checksum_present.go b/gosnappi/pattern_flow_gre_checksum_present.go new file mode 100644 index 00000000..a1c52131 --- /dev/null +++ b/gosnappi/pattern_flow_gre_checksum_present.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreChecksumPresent ***** +type patternFlowGreChecksumPresent struct { + validation + obj *otg.PatternFlowGreChecksumPresent + marshaller marshalPatternFlowGreChecksumPresent + unMarshaller unMarshalPatternFlowGreChecksumPresent + incrementHolder PatternFlowGreChecksumPresentCounter + decrementHolder PatternFlowGreChecksumPresentCounter + metricTagsHolder PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter +} + +func NewPatternFlowGreChecksumPresent() PatternFlowGreChecksumPresent { + obj := patternFlowGreChecksumPresent{obj: &otg.PatternFlowGreChecksumPresent{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreChecksumPresent) msg() *otg.PatternFlowGreChecksumPresent { + return obj.obj +} + +func (obj *patternFlowGreChecksumPresent) setMsg(msg *otg.PatternFlowGreChecksumPresent) PatternFlowGreChecksumPresent { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreChecksumPresent struct { + obj *patternFlowGreChecksumPresent +} + +type marshalPatternFlowGreChecksumPresent interface { + // ToProto marshals PatternFlowGreChecksumPresent to protobuf object *otg.PatternFlowGreChecksumPresent + ToProto() (*otg.PatternFlowGreChecksumPresent, error) + // ToPbText marshals PatternFlowGreChecksumPresent to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreChecksumPresent to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreChecksumPresent to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreChecksumPresent struct { + obj *patternFlowGreChecksumPresent +} + +type unMarshalPatternFlowGreChecksumPresent interface { + // FromProto unmarshals PatternFlowGreChecksumPresent from protobuf object *otg.PatternFlowGreChecksumPresent + FromProto(msg *otg.PatternFlowGreChecksumPresent) (PatternFlowGreChecksumPresent, error) + // FromPbText unmarshals PatternFlowGreChecksumPresent from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreChecksumPresent from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreChecksumPresent from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreChecksumPresent) Marshal() marshalPatternFlowGreChecksumPresent { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreChecksumPresent{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreChecksumPresent) Unmarshal() unMarshalPatternFlowGreChecksumPresent { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreChecksumPresent{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreChecksumPresent) ToProto() (*otg.PatternFlowGreChecksumPresent, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreChecksumPresent) FromProto(msg *otg.PatternFlowGreChecksumPresent) (PatternFlowGreChecksumPresent, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreChecksumPresent) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreChecksumPresent) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreChecksumPresent) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreChecksumPresent) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreChecksumPresent) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreChecksumPresent) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreChecksumPresent) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreChecksumPresent) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreChecksumPresent) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreChecksumPresent) Clone() (PatternFlowGreChecksumPresent, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreChecksumPresent() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGreChecksumPresent) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGreChecksumPresent is checksum present bit +type PatternFlowGreChecksumPresent interface { + Validation + // msg marshals PatternFlowGreChecksumPresent to protobuf object *otg.PatternFlowGreChecksumPresent + // and doesn't set defaults + msg() *otg.PatternFlowGreChecksumPresent + // setMsg unmarshals PatternFlowGreChecksumPresent from protobuf object *otg.PatternFlowGreChecksumPresent + // and doesn't set defaults + setMsg(*otg.PatternFlowGreChecksumPresent) PatternFlowGreChecksumPresent + // provides marshal interface + Marshal() marshalPatternFlowGreChecksumPresent + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreChecksumPresent + // validate validates PatternFlowGreChecksumPresent + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreChecksumPresent, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGreChecksumPresentChoiceEnum, set in PatternFlowGreChecksumPresent + Choice() PatternFlowGreChecksumPresentChoiceEnum + // setChoice assigns PatternFlowGreChecksumPresentChoiceEnum provided by user to PatternFlowGreChecksumPresent + setChoice(value PatternFlowGreChecksumPresentChoiceEnum) PatternFlowGreChecksumPresent + // HasChoice checks if Choice has been set in PatternFlowGreChecksumPresent + HasChoice() bool + // Value returns uint32, set in PatternFlowGreChecksumPresent. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGreChecksumPresent + SetValue(value uint32) PatternFlowGreChecksumPresent + // HasValue checks if Value has been set in PatternFlowGreChecksumPresent + HasValue() bool + // Values returns []uint32, set in PatternFlowGreChecksumPresent. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGreChecksumPresent + SetValues(value []uint32) PatternFlowGreChecksumPresent + // Increment returns PatternFlowGreChecksumPresentCounter, set in PatternFlowGreChecksumPresent. + // PatternFlowGreChecksumPresentCounter is integer counter pattern + Increment() PatternFlowGreChecksumPresentCounter + // SetIncrement assigns PatternFlowGreChecksumPresentCounter provided by user to PatternFlowGreChecksumPresent. + // PatternFlowGreChecksumPresentCounter is integer counter pattern + SetIncrement(value PatternFlowGreChecksumPresentCounter) PatternFlowGreChecksumPresent + // HasIncrement checks if Increment has been set in PatternFlowGreChecksumPresent + HasIncrement() bool + // Decrement returns PatternFlowGreChecksumPresentCounter, set in PatternFlowGreChecksumPresent. + // PatternFlowGreChecksumPresentCounter is integer counter pattern + Decrement() PatternFlowGreChecksumPresentCounter + // SetDecrement assigns PatternFlowGreChecksumPresentCounter provided by user to PatternFlowGreChecksumPresent. + // PatternFlowGreChecksumPresentCounter is integer counter pattern + SetDecrement(value PatternFlowGreChecksumPresentCounter) PatternFlowGreChecksumPresent + // HasDecrement checks if Decrement has been set in PatternFlowGreChecksumPresent + HasDecrement() bool + // MetricTags returns PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIterIter, set in PatternFlowGreChecksumPresent + MetricTags() PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter + setNil() +} + +type PatternFlowGreChecksumPresentChoiceEnum string + +// Enum of Choice on PatternFlowGreChecksumPresent +var PatternFlowGreChecksumPresentChoice = struct { + VALUE PatternFlowGreChecksumPresentChoiceEnum + VALUES PatternFlowGreChecksumPresentChoiceEnum + INCREMENT PatternFlowGreChecksumPresentChoiceEnum + DECREMENT PatternFlowGreChecksumPresentChoiceEnum +}{ + VALUE: PatternFlowGreChecksumPresentChoiceEnum("value"), + VALUES: PatternFlowGreChecksumPresentChoiceEnum("values"), + INCREMENT: PatternFlowGreChecksumPresentChoiceEnum("increment"), + DECREMENT: PatternFlowGreChecksumPresentChoiceEnum("decrement"), +} + +func (obj *patternFlowGreChecksumPresent) Choice() PatternFlowGreChecksumPresentChoiceEnum { + return PatternFlowGreChecksumPresentChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGreChecksumPresent) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGreChecksumPresent) setChoice(value PatternFlowGreChecksumPresentChoiceEnum) PatternFlowGreChecksumPresent { + intValue, ok := otg.PatternFlowGreChecksumPresent_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGreChecksumPresentChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGreChecksumPresent_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGreChecksumPresentChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGreChecksumPresentChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGreChecksumPresentChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGreChecksumPresentCounter().msg() + } + + if value == PatternFlowGreChecksumPresentChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGreChecksumPresentCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGreChecksumPresent) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGreChecksumPresentChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGreChecksumPresent) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGreChecksumPresent object +func (obj *patternFlowGreChecksumPresent) SetValue(value uint32) PatternFlowGreChecksumPresent { + obj.setChoice(PatternFlowGreChecksumPresentChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGreChecksumPresent) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGreChecksumPresent object +func (obj *patternFlowGreChecksumPresent) SetValues(value []uint32) PatternFlowGreChecksumPresent { + obj.setChoice(PatternFlowGreChecksumPresentChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGreChecksumPresentCounter +func (obj *patternFlowGreChecksumPresent) Increment() PatternFlowGreChecksumPresentCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGreChecksumPresentChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGreChecksumPresentCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGreChecksumPresentCounter +func (obj *patternFlowGreChecksumPresent) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGreChecksumPresentCounter value in the PatternFlowGreChecksumPresent object +func (obj *patternFlowGreChecksumPresent) SetIncrement(value PatternFlowGreChecksumPresentCounter) PatternFlowGreChecksumPresent { + obj.setChoice(PatternFlowGreChecksumPresentChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGreChecksumPresentCounter +func (obj *patternFlowGreChecksumPresent) Decrement() PatternFlowGreChecksumPresentCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGreChecksumPresentChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGreChecksumPresentCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGreChecksumPresentCounter +func (obj *patternFlowGreChecksumPresent) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGreChecksumPresentCounter value in the PatternFlowGreChecksumPresent object +func (obj *patternFlowGreChecksumPresent) SetDecrement(value PatternFlowGreChecksumPresentCounter) PatternFlowGreChecksumPresent { + obj.setChoice(PatternFlowGreChecksumPresentChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGreChecksumPresentMetricTag +func (obj *patternFlowGreChecksumPresent) MetricTags() PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGreChecksumPresentMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter struct { + obj *patternFlowGreChecksumPresent + patternFlowGreChecksumPresentMetricTagSlice []PatternFlowGreChecksumPresentMetricTag + fieldPtr *[]*otg.PatternFlowGreChecksumPresentMetricTag +} + +func newPatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter(ptr *[]*otg.PatternFlowGreChecksumPresentMetricTag) PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter { + return &patternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter interface { + setMsg(*patternFlowGreChecksumPresent) PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter + Items() []PatternFlowGreChecksumPresentMetricTag + Add() PatternFlowGreChecksumPresentMetricTag + Append(items ...PatternFlowGreChecksumPresentMetricTag) PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter + Set(index int, newObj PatternFlowGreChecksumPresentMetricTag) PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter + Clear() PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter + clearHolderSlice() PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter + appendHolderSlice(item PatternFlowGreChecksumPresentMetricTag) PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter +} + +func (obj *patternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter) setMsg(msg *patternFlowGreChecksumPresent) PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGreChecksumPresentMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter) Items() []PatternFlowGreChecksumPresentMetricTag { + return obj.patternFlowGreChecksumPresentMetricTagSlice +} + +func (obj *patternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter) Add() PatternFlowGreChecksumPresentMetricTag { + newObj := &otg.PatternFlowGreChecksumPresentMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGreChecksumPresentMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGreChecksumPresentMetricTagSlice = append(obj.patternFlowGreChecksumPresentMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter) Append(items ...PatternFlowGreChecksumPresentMetricTag) PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGreChecksumPresentMetricTagSlice = append(obj.patternFlowGreChecksumPresentMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter) Set(index int, newObj PatternFlowGreChecksumPresentMetricTag) PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGreChecksumPresentMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter) Clear() PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGreChecksumPresentMetricTag{} + obj.patternFlowGreChecksumPresentMetricTagSlice = []PatternFlowGreChecksumPresentMetricTag{} + } + return obj +} +func (obj *patternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter) clearHolderSlice() PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter { + if len(obj.patternFlowGreChecksumPresentMetricTagSlice) > 0 { + obj.patternFlowGreChecksumPresentMetricTagSlice = []PatternFlowGreChecksumPresentMetricTag{} + } + return obj +} +func (obj *patternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter) appendHolderSlice(item PatternFlowGreChecksumPresentMetricTag) PatternFlowGreChecksumPresentPatternFlowGreChecksumPresentMetricTagIter { + obj.patternFlowGreChecksumPresentMetricTagSlice = append(obj.patternFlowGreChecksumPresentMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGreChecksumPresent) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreChecksumPresent.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGreChecksumPresent.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGreChecksumPresentMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGreChecksumPresent) setDefault() { + var choices_set int = 0 + var choice PatternFlowGreChecksumPresentChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGreChecksumPresentChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGreChecksumPresentChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGreChecksumPresentChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGreChecksumPresentChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGreChecksumPresentChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGreChecksumPresent") + } + } else { + intVal := otg.PatternFlowGreChecksumPresent_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGreChecksumPresent_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gre_checksum_present_counter.go b/gosnappi/pattern_flow_gre_checksum_present_counter.go new file mode 100644 index 00000000..a55d5f77 --- /dev/null +++ b/gosnappi/pattern_flow_gre_checksum_present_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreChecksumPresentCounter ***** +type patternFlowGreChecksumPresentCounter struct { + validation + obj *otg.PatternFlowGreChecksumPresentCounter + marshaller marshalPatternFlowGreChecksumPresentCounter + unMarshaller unMarshalPatternFlowGreChecksumPresentCounter +} + +func NewPatternFlowGreChecksumPresentCounter() PatternFlowGreChecksumPresentCounter { + obj := patternFlowGreChecksumPresentCounter{obj: &otg.PatternFlowGreChecksumPresentCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreChecksumPresentCounter) msg() *otg.PatternFlowGreChecksumPresentCounter { + return obj.obj +} + +func (obj *patternFlowGreChecksumPresentCounter) setMsg(msg *otg.PatternFlowGreChecksumPresentCounter) PatternFlowGreChecksumPresentCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreChecksumPresentCounter struct { + obj *patternFlowGreChecksumPresentCounter +} + +type marshalPatternFlowGreChecksumPresentCounter interface { + // ToProto marshals PatternFlowGreChecksumPresentCounter to protobuf object *otg.PatternFlowGreChecksumPresentCounter + ToProto() (*otg.PatternFlowGreChecksumPresentCounter, error) + // ToPbText marshals PatternFlowGreChecksumPresentCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreChecksumPresentCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreChecksumPresentCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreChecksumPresentCounter struct { + obj *patternFlowGreChecksumPresentCounter +} + +type unMarshalPatternFlowGreChecksumPresentCounter interface { + // FromProto unmarshals PatternFlowGreChecksumPresentCounter from protobuf object *otg.PatternFlowGreChecksumPresentCounter + FromProto(msg *otg.PatternFlowGreChecksumPresentCounter) (PatternFlowGreChecksumPresentCounter, error) + // FromPbText unmarshals PatternFlowGreChecksumPresentCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreChecksumPresentCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreChecksumPresentCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreChecksumPresentCounter) Marshal() marshalPatternFlowGreChecksumPresentCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreChecksumPresentCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreChecksumPresentCounter) Unmarshal() unMarshalPatternFlowGreChecksumPresentCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreChecksumPresentCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreChecksumPresentCounter) ToProto() (*otg.PatternFlowGreChecksumPresentCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreChecksumPresentCounter) FromProto(msg *otg.PatternFlowGreChecksumPresentCounter) (PatternFlowGreChecksumPresentCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreChecksumPresentCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreChecksumPresentCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreChecksumPresentCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreChecksumPresentCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreChecksumPresentCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreChecksumPresentCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreChecksumPresentCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreChecksumPresentCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreChecksumPresentCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreChecksumPresentCounter) Clone() (PatternFlowGreChecksumPresentCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreChecksumPresentCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGreChecksumPresentCounter is integer counter pattern +type PatternFlowGreChecksumPresentCounter interface { + Validation + // msg marshals PatternFlowGreChecksumPresentCounter to protobuf object *otg.PatternFlowGreChecksumPresentCounter + // and doesn't set defaults + msg() *otg.PatternFlowGreChecksumPresentCounter + // setMsg unmarshals PatternFlowGreChecksumPresentCounter from protobuf object *otg.PatternFlowGreChecksumPresentCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGreChecksumPresentCounter) PatternFlowGreChecksumPresentCounter + // provides marshal interface + Marshal() marshalPatternFlowGreChecksumPresentCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreChecksumPresentCounter + // validate validates PatternFlowGreChecksumPresentCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreChecksumPresentCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGreChecksumPresentCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGreChecksumPresentCounter + SetStart(value uint32) PatternFlowGreChecksumPresentCounter + // HasStart checks if Start has been set in PatternFlowGreChecksumPresentCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGreChecksumPresentCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGreChecksumPresentCounter + SetStep(value uint32) PatternFlowGreChecksumPresentCounter + // HasStep checks if Step has been set in PatternFlowGreChecksumPresentCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGreChecksumPresentCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGreChecksumPresentCounter + SetCount(value uint32) PatternFlowGreChecksumPresentCounter + // HasCount checks if Count has been set in PatternFlowGreChecksumPresentCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGreChecksumPresentCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGreChecksumPresentCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGreChecksumPresentCounter object +func (obj *patternFlowGreChecksumPresentCounter) SetStart(value uint32) PatternFlowGreChecksumPresentCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGreChecksumPresentCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGreChecksumPresentCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGreChecksumPresentCounter object +func (obj *patternFlowGreChecksumPresentCounter) SetStep(value uint32) PatternFlowGreChecksumPresentCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGreChecksumPresentCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGreChecksumPresentCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGreChecksumPresentCounter object +func (obj *patternFlowGreChecksumPresentCounter) SetCount(value uint32) PatternFlowGreChecksumPresentCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGreChecksumPresentCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreChecksumPresentCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreChecksumPresentCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreChecksumPresentCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGreChecksumPresentCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gre_checksum_present_metric_tag.go b/gosnappi/pattern_flow_gre_checksum_present_metric_tag.go new file mode 100644 index 00000000..d6179002 --- /dev/null +++ b/gosnappi/pattern_flow_gre_checksum_present_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreChecksumPresentMetricTag ***** +type patternFlowGreChecksumPresentMetricTag struct { + validation + obj *otg.PatternFlowGreChecksumPresentMetricTag + marshaller marshalPatternFlowGreChecksumPresentMetricTag + unMarshaller unMarshalPatternFlowGreChecksumPresentMetricTag +} + +func NewPatternFlowGreChecksumPresentMetricTag() PatternFlowGreChecksumPresentMetricTag { + obj := patternFlowGreChecksumPresentMetricTag{obj: &otg.PatternFlowGreChecksumPresentMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreChecksumPresentMetricTag) msg() *otg.PatternFlowGreChecksumPresentMetricTag { + return obj.obj +} + +func (obj *patternFlowGreChecksumPresentMetricTag) setMsg(msg *otg.PatternFlowGreChecksumPresentMetricTag) PatternFlowGreChecksumPresentMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreChecksumPresentMetricTag struct { + obj *patternFlowGreChecksumPresentMetricTag +} + +type marshalPatternFlowGreChecksumPresentMetricTag interface { + // ToProto marshals PatternFlowGreChecksumPresentMetricTag to protobuf object *otg.PatternFlowGreChecksumPresentMetricTag + ToProto() (*otg.PatternFlowGreChecksumPresentMetricTag, error) + // ToPbText marshals PatternFlowGreChecksumPresentMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreChecksumPresentMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreChecksumPresentMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreChecksumPresentMetricTag struct { + obj *patternFlowGreChecksumPresentMetricTag +} + +type unMarshalPatternFlowGreChecksumPresentMetricTag interface { + // FromProto unmarshals PatternFlowGreChecksumPresentMetricTag from protobuf object *otg.PatternFlowGreChecksumPresentMetricTag + FromProto(msg *otg.PatternFlowGreChecksumPresentMetricTag) (PatternFlowGreChecksumPresentMetricTag, error) + // FromPbText unmarshals PatternFlowGreChecksumPresentMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreChecksumPresentMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreChecksumPresentMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreChecksumPresentMetricTag) Marshal() marshalPatternFlowGreChecksumPresentMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreChecksumPresentMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreChecksumPresentMetricTag) Unmarshal() unMarshalPatternFlowGreChecksumPresentMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreChecksumPresentMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreChecksumPresentMetricTag) ToProto() (*otg.PatternFlowGreChecksumPresentMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreChecksumPresentMetricTag) FromProto(msg *otg.PatternFlowGreChecksumPresentMetricTag) (PatternFlowGreChecksumPresentMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreChecksumPresentMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreChecksumPresentMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreChecksumPresentMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreChecksumPresentMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreChecksumPresentMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreChecksumPresentMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreChecksumPresentMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreChecksumPresentMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreChecksumPresentMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreChecksumPresentMetricTag) Clone() (PatternFlowGreChecksumPresentMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreChecksumPresentMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGreChecksumPresentMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGreChecksumPresentMetricTag interface { + Validation + // msg marshals PatternFlowGreChecksumPresentMetricTag to protobuf object *otg.PatternFlowGreChecksumPresentMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGreChecksumPresentMetricTag + // setMsg unmarshals PatternFlowGreChecksumPresentMetricTag from protobuf object *otg.PatternFlowGreChecksumPresentMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGreChecksumPresentMetricTag) PatternFlowGreChecksumPresentMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGreChecksumPresentMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreChecksumPresentMetricTag + // validate validates PatternFlowGreChecksumPresentMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreChecksumPresentMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGreChecksumPresentMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGreChecksumPresentMetricTag + SetName(value string) PatternFlowGreChecksumPresentMetricTag + // Offset returns uint32, set in PatternFlowGreChecksumPresentMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGreChecksumPresentMetricTag + SetOffset(value uint32) PatternFlowGreChecksumPresentMetricTag + // HasOffset checks if Offset has been set in PatternFlowGreChecksumPresentMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGreChecksumPresentMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGreChecksumPresentMetricTag + SetLength(value uint32) PatternFlowGreChecksumPresentMetricTag + // HasLength checks if Length has been set in PatternFlowGreChecksumPresentMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGreChecksumPresentMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGreChecksumPresentMetricTag object +func (obj *patternFlowGreChecksumPresentMetricTag) SetName(value string) PatternFlowGreChecksumPresentMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGreChecksumPresentMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGreChecksumPresentMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGreChecksumPresentMetricTag object +func (obj *patternFlowGreChecksumPresentMetricTag) SetOffset(value uint32) PatternFlowGreChecksumPresentMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGreChecksumPresentMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGreChecksumPresentMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGreChecksumPresentMetricTag object +func (obj *patternFlowGreChecksumPresentMetricTag) SetLength(value uint32) PatternFlowGreChecksumPresentMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGreChecksumPresentMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGreChecksumPresentMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreChecksumPresentMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGreChecksumPresentMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGreChecksumPresentMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_gre_protocol.go b/gosnappi/pattern_flow_gre_protocol.go new file mode 100644 index 00000000..b90a546b --- /dev/null +++ b/gosnappi/pattern_flow_gre_protocol.go @@ -0,0 +1,712 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreProtocol ***** +type patternFlowGreProtocol struct { + validation + obj *otg.PatternFlowGreProtocol + marshaller marshalPatternFlowGreProtocol + unMarshaller unMarshalPatternFlowGreProtocol + incrementHolder PatternFlowGreProtocolCounter + decrementHolder PatternFlowGreProtocolCounter + metricTagsHolder PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter +} + +func NewPatternFlowGreProtocol() PatternFlowGreProtocol { + obj := patternFlowGreProtocol{obj: &otg.PatternFlowGreProtocol{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreProtocol) msg() *otg.PatternFlowGreProtocol { + return obj.obj +} + +func (obj *patternFlowGreProtocol) setMsg(msg *otg.PatternFlowGreProtocol) PatternFlowGreProtocol { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreProtocol struct { + obj *patternFlowGreProtocol +} + +type marshalPatternFlowGreProtocol interface { + // ToProto marshals PatternFlowGreProtocol to protobuf object *otg.PatternFlowGreProtocol + ToProto() (*otg.PatternFlowGreProtocol, error) + // ToPbText marshals PatternFlowGreProtocol to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreProtocol to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreProtocol to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreProtocol struct { + obj *patternFlowGreProtocol +} + +type unMarshalPatternFlowGreProtocol interface { + // FromProto unmarshals PatternFlowGreProtocol from protobuf object *otg.PatternFlowGreProtocol + FromProto(msg *otg.PatternFlowGreProtocol) (PatternFlowGreProtocol, error) + // FromPbText unmarshals PatternFlowGreProtocol from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreProtocol from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreProtocol from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreProtocol) Marshal() marshalPatternFlowGreProtocol { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreProtocol{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreProtocol) Unmarshal() unMarshalPatternFlowGreProtocol { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreProtocol{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreProtocol) ToProto() (*otg.PatternFlowGreProtocol, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreProtocol) FromProto(msg *otg.PatternFlowGreProtocol) (PatternFlowGreProtocol, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreProtocol) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreProtocol) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreProtocol) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreProtocol) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreProtocol) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreProtocol) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreProtocol) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreProtocol) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreProtocol) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreProtocol) Clone() (PatternFlowGreProtocol, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreProtocol() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGreProtocol) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGreProtocol is protocol type of encapsulated payload +type PatternFlowGreProtocol interface { + Validation + // msg marshals PatternFlowGreProtocol to protobuf object *otg.PatternFlowGreProtocol + // and doesn't set defaults + msg() *otg.PatternFlowGreProtocol + // setMsg unmarshals PatternFlowGreProtocol from protobuf object *otg.PatternFlowGreProtocol + // and doesn't set defaults + setMsg(*otg.PatternFlowGreProtocol) PatternFlowGreProtocol + // provides marshal interface + Marshal() marshalPatternFlowGreProtocol + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreProtocol + // validate validates PatternFlowGreProtocol + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreProtocol, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGreProtocolChoiceEnum, set in PatternFlowGreProtocol + Choice() PatternFlowGreProtocolChoiceEnum + // setChoice assigns PatternFlowGreProtocolChoiceEnum provided by user to PatternFlowGreProtocol + setChoice(value PatternFlowGreProtocolChoiceEnum) PatternFlowGreProtocol + // HasChoice checks if Choice has been set in PatternFlowGreProtocol + HasChoice() bool + // Value returns uint32, set in PatternFlowGreProtocol. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGreProtocol + SetValue(value uint32) PatternFlowGreProtocol + // HasValue checks if Value has been set in PatternFlowGreProtocol + HasValue() bool + // Values returns []uint32, set in PatternFlowGreProtocol. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGreProtocol + SetValues(value []uint32) PatternFlowGreProtocol + // Increment returns PatternFlowGreProtocolCounter, set in PatternFlowGreProtocol. + // PatternFlowGreProtocolCounter is integer counter pattern + Increment() PatternFlowGreProtocolCounter + // SetIncrement assigns PatternFlowGreProtocolCounter provided by user to PatternFlowGreProtocol. + // PatternFlowGreProtocolCounter is integer counter pattern + SetIncrement(value PatternFlowGreProtocolCounter) PatternFlowGreProtocol + // HasIncrement checks if Increment has been set in PatternFlowGreProtocol + HasIncrement() bool + // Decrement returns PatternFlowGreProtocolCounter, set in PatternFlowGreProtocol. + // PatternFlowGreProtocolCounter is integer counter pattern + Decrement() PatternFlowGreProtocolCounter + // SetDecrement assigns PatternFlowGreProtocolCounter provided by user to PatternFlowGreProtocol. + // PatternFlowGreProtocolCounter is integer counter pattern + SetDecrement(value PatternFlowGreProtocolCounter) PatternFlowGreProtocol + // HasDecrement checks if Decrement has been set in PatternFlowGreProtocol + HasDecrement() bool + // MetricTags returns PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIterIter, set in PatternFlowGreProtocol + MetricTags() PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter + // Auto returns uint32, set in PatternFlowGreProtocol. + Auto() uint32 + // HasAuto checks if Auto has been set in PatternFlowGreProtocol + HasAuto() bool + setNil() +} + +type PatternFlowGreProtocolChoiceEnum string + +// Enum of Choice on PatternFlowGreProtocol +var PatternFlowGreProtocolChoice = struct { + VALUE PatternFlowGreProtocolChoiceEnum + VALUES PatternFlowGreProtocolChoiceEnum + INCREMENT PatternFlowGreProtocolChoiceEnum + DECREMENT PatternFlowGreProtocolChoiceEnum + AUTO PatternFlowGreProtocolChoiceEnum +}{ + VALUE: PatternFlowGreProtocolChoiceEnum("value"), + VALUES: PatternFlowGreProtocolChoiceEnum("values"), + INCREMENT: PatternFlowGreProtocolChoiceEnum("increment"), + DECREMENT: PatternFlowGreProtocolChoiceEnum("decrement"), + AUTO: PatternFlowGreProtocolChoiceEnum("auto"), +} + +func (obj *patternFlowGreProtocol) Choice() PatternFlowGreProtocolChoiceEnum { + return PatternFlowGreProtocolChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGreProtocol) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGreProtocol) setChoice(value PatternFlowGreProtocolChoiceEnum) PatternFlowGreProtocol { + intValue, ok := otg.PatternFlowGreProtocol_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGreProtocolChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGreProtocol_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Auto = nil + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGreProtocolChoice.VALUE { + defaultValue := uint32(2048) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGreProtocolChoice.VALUES { + defaultValue := []uint32{2048} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGreProtocolChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGreProtocolCounter().msg() + } + + if value == PatternFlowGreProtocolChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGreProtocolCounter().msg() + } + + if value == PatternFlowGreProtocolChoice.AUTO { + defaultValue := uint32(2048) + obj.obj.Auto = &defaultValue + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGreProtocol) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGreProtocolChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGreProtocol) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGreProtocol object +func (obj *patternFlowGreProtocol) SetValue(value uint32) PatternFlowGreProtocol { + obj.setChoice(PatternFlowGreProtocolChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGreProtocol) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{2048}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGreProtocol object +func (obj *patternFlowGreProtocol) SetValues(value []uint32) PatternFlowGreProtocol { + obj.setChoice(PatternFlowGreProtocolChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGreProtocolCounter +func (obj *patternFlowGreProtocol) Increment() PatternFlowGreProtocolCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGreProtocolChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGreProtocolCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGreProtocolCounter +func (obj *patternFlowGreProtocol) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGreProtocolCounter value in the PatternFlowGreProtocol object +func (obj *patternFlowGreProtocol) SetIncrement(value PatternFlowGreProtocolCounter) PatternFlowGreProtocol { + obj.setChoice(PatternFlowGreProtocolChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGreProtocolCounter +func (obj *patternFlowGreProtocol) Decrement() PatternFlowGreProtocolCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGreProtocolChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGreProtocolCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGreProtocolCounter +func (obj *patternFlowGreProtocol) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGreProtocolCounter value in the PatternFlowGreProtocol object +func (obj *patternFlowGreProtocol) SetDecrement(value PatternFlowGreProtocolCounter) PatternFlowGreProtocol { + obj.setChoice(PatternFlowGreProtocolChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGreProtocolMetricTag +func (obj *patternFlowGreProtocol) MetricTags() PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGreProtocolMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGreProtocolPatternFlowGreProtocolMetricTagIter struct { + obj *patternFlowGreProtocol + patternFlowGreProtocolMetricTagSlice []PatternFlowGreProtocolMetricTag + fieldPtr *[]*otg.PatternFlowGreProtocolMetricTag +} + +func newPatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter(ptr *[]*otg.PatternFlowGreProtocolMetricTag) PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter { + return &patternFlowGreProtocolPatternFlowGreProtocolMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter interface { + setMsg(*patternFlowGreProtocol) PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter + Items() []PatternFlowGreProtocolMetricTag + Add() PatternFlowGreProtocolMetricTag + Append(items ...PatternFlowGreProtocolMetricTag) PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter + Set(index int, newObj PatternFlowGreProtocolMetricTag) PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter + Clear() PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter + clearHolderSlice() PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter + appendHolderSlice(item PatternFlowGreProtocolMetricTag) PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter +} + +func (obj *patternFlowGreProtocolPatternFlowGreProtocolMetricTagIter) setMsg(msg *patternFlowGreProtocol) PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGreProtocolMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGreProtocolPatternFlowGreProtocolMetricTagIter) Items() []PatternFlowGreProtocolMetricTag { + return obj.patternFlowGreProtocolMetricTagSlice +} + +func (obj *patternFlowGreProtocolPatternFlowGreProtocolMetricTagIter) Add() PatternFlowGreProtocolMetricTag { + newObj := &otg.PatternFlowGreProtocolMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGreProtocolMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGreProtocolMetricTagSlice = append(obj.patternFlowGreProtocolMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGreProtocolPatternFlowGreProtocolMetricTagIter) Append(items ...PatternFlowGreProtocolMetricTag) PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGreProtocolMetricTagSlice = append(obj.patternFlowGreProtocolMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGreProtocolPatternFlowGreProtocolMetricTagIter) Set(index int, newObj PatternFlowGreProtocolMetricTag) PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGreProtocolMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGreProtocolPatternFlowGreProtocolMetricTagIter) Clear() PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGreProtocolMetricTag{} + obj.patternFlowGreProtocolMetricTagSlice = []PatternFlowGreProtocolMetricTag{} + } + return obj +} +func (obj *patternFlowGreProtocolPatternFlowGreProtocolMetricTagIter) clearHolderSlice() PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter { + if len(obj.patternFlowGreProtocolMetricTagSlice) > 0 { + obj.patternFlowGreProtocolMetricTagSlice = []PatternFlowGreProtocolMetricTag{} + } + return obj +} +func (obj *patternFlowGreProtocolPatternFlowGreProtocolMetricTagIter) appendHolderSlice(item PatternFlowGreProtocolMetricTag) PatternFlowGreProtocolPatternFlowGreProtocolMetricTagIter { + obj.patternFlowGreProtocolMetricTagSlice = append(obj.patternFlowGreProtocolMetricTagSlice, item) + return obj +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowGreProtocol) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowGreProtocolChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowGreProtocol) HasAuto() bool { + return obj.obj.Auto != nil +} + +func (obj *patternFlowGreProtocol) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreProtocol.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGreProtocol.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGreProtocolMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Auto != nil { + + if *obj.obj.Auto > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreProtocol.Auto <= 65535 but Got %d", *obj.obj.Auto)) + } + + } + +} + +func (obj *patternFlowGreProtocol) setDefault() { + var choices_set int = 0 + var choice PatternFlowGreProtocolChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGreProtocolChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGreProtocolChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGreProtocolChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGreProtocolChoice.DECREMENT + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowGreProtocolChoice.AUTO + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGreProtocolChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGreProtocol") + } + } else { + intVal := otg.PatternFlowGreProtocol_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGreProtocol_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gre_protocol_counter.go b/gosnappi/pattern_flow_gre_protocol_counter.go new file mode 100644 index 00000000..e853ed92 --- /dev/null +++ b/gosnappi/pattern_flow_gre_protocol_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreProtocolCounter ***** +type patternFlowGreProtocolCounter struct { + validation + obj *otg.PatternFlowGreProtocolCounter + marshaller marshalPatternFlowGreProtocolCounter + unMarshaller unMarshalPatternFlowGreProtocolCounter +} + +func NewPatternFlowGreProtocolCounter() PatternFlowGreProtocolCounter { + obj := patternFlowGreProtocolCounter{obj: &otg.PatternFlowGreProtocolCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreProtocolCounter) msg() *otg.PatternFlowGreProtocolCounter { + return obj.obj +} + +func (obj *patternFlowGreProtocolCounter) setMsg(msg *otg.PatternFlowGreProtocolCounter) PatternFlowGreProtocolCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreProtocolCounter struct { + obj *patternFlowGreProtocolCounter +} + +type marshalPatternFlowGreProtocolCounter interface { + // ToProto marshals PatternFlowGreProtocolCounter to protobuf object *otg.PatternFlowGreProtocolCounter + ToProto() (*otg.PatternFlowGreProtocolCounter, error) + // ToPbText marshals PatternFlowGreProtocolCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreProtocolCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreProtocolCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreProtocolCounter struct { + obj *patternFlowGreProtocolCounter +} + +type unMarshalPatternFlowGreProtocolCounter interface { + // FromProto unmarshals PatternFlowGreProtocolCounter from protobuf object *otg.PatternFlowGreProtocolCounter + FromProto(msg *otg.PatternFlowGreProtocolCounter) (PatternFlowGreProtocolCounter, error) + // FromPbText unmarshals PatternFlowGreProtocolCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreProtocolCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreProtocolCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreProtocolCounter) Marshal() marshalPatternFlowGreProtocolCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreProtocolCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreProtocolCounter) Unmarshal() unMarshalPatternFlowGreProtocolCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreProtocolCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreProtocolCounter) ToProto() (*otg.PatternFlowGreProtocolCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreProtocolCounter) FromProto(msg *otg.PatternFlowGreProtocolCounter) (PatternFlowGreProtocolCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreProtocolCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreProtocolCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreProtocolCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreProtocolCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreProtocolCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreProtocolCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreProtocolCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreProtocolCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreProtocolCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreProtocolCounter) Clone() (PatternFlowGreProtocolCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreProtocolCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGreProtocolCounter is integer counter pattern +type PatternFlowGreProtocolCounter interface { + Validation + // msg marshals PatternFlowGreProtocolCounter to protobuf object *otg.PatternFlowGreProtocolCounter + // and doesn't set defaults + msg() *otg.PatternFlowGreProtocolCounter + // setMsg unmarshals PatternFlowGreProtocolCounter from protobuf object *otg.PatternFlowGreProtocolCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGreProtocolCounter) PatternFlowGreProtocolCounter + // provides marshal interface + Marshal() marshalPatternFlowGreProtocolCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreProtocolCounter + // validate validates PatternFlowGreProtocolCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreProtocolCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGreProtocolCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGreProtocolCounter + SetStart(value uint32) PatternFlowGreProtocolCounter + // HasStart checks if Start has been set in PatternFlowGreProtocolCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGreProtocolCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGreProtocolCounter + SetStep(value uint32) PatternFlowGreProtocolCounter + // HasStep checks if Step has been set in PatternFlowGreProtocolCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGreProtocolCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGreProtocolCounter + SetCount(value uint32) PatternFlowGreProtocolCounter + // HasCount checks if Count has been set in PatternFlowGreProtocolCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGreProtocolCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGreProtocolCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGreProtocolCounter object +func (obj *patternFlowGreProtocolCounter) SetStart(value uint32) PatternFlowGreProtocolCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGreProtocolCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGreProtocolCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGreProtocolCounter object +func (obj *patternFlowGreProtocolCounter) SetStep(value uint32) PatternFlowGreProtocolCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGreProtocolCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGreProtocolCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGreProtocolCounter object +func (obj *patternFlowGreProtocolCounter) SetCount(value uint32) PatternFlowGreProtocolCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGreProtocolCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreProtocolCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreProtocolCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreProtocolCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGreProtocolCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(2048) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gre_protocol_metric_tag.go b/gosnappi/pattern_flow_gre_protocol_metric_tag.go new file mode 100644 index 00000000..46758e17 --- /dev/null +++ b/gosnappi/pattern_flow_gre_protocol_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreProtocolMetricTag ***** +type patternFlowGreProtocolMetricTag struct { + validation + obj *otg.PatternFlowGreProtocolMetricTag + marshaller marshalPatternFlowGreProtocolMetricTag + unMarshaller unMarshalPatternFlowGreProtocolMetricTag +} + +func NewPatternFlowGreProtocolMetricTag() PatternFlowGreProtocolMetricTag { + obj := patternFlowGreProtocolMetricTag{obj: &otg.PatternFlowGreProtocolMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreProtocolMetricTag) msg() *otg.PatternFlowGreProtocolMetricTag { + return obj.obj +} + +func (obj *patternFlowGreProtocolMetricTag) setMsg(msg *otg.PatternFlowGreProtocolMetricTag) PatternFlowGreProtocolMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreProtocolMetricTag struct { + obj *patternFlowGreProtocolMetricTag +} + +type marshalPatternFlowGreProtocolMetricTag interface { + // ToProto marshals PatternFlowGreProtocolMetricTag to protobuf object *otg.PatternFlowGreProtocolMetricTag + ToProto() (*otg.PatternFlowGreProtocolMetricTag, error) + // ToPbText marshals PatternFlowGreProtocolMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreProtocolMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreProtocolMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreProtocolMetricTag struct { + obj *patternFlowGreProtocolMetricTag +} + +type unMarshalPatternFlowGreProtocolMetricTag interface { + // FromProto unmarshals PatternFlowGreProtocolMetricTag from protobuf object *otg.PatternFlowGreProtocolMetricTag + FromProto(msg *otg.PatternFlowGreProtocolMetricTag) (PatternFlowGreProtocolMetricTag, error) + // FromPbText unmarshals PatternFlowGreProtocolMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreProtocolMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreProtocolMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreProtocolMetricTag) Marshal() marshalPatternFlowGreProtocolMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreProtocolMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreProtocolMetricTag) Unmarshal() unMarshalPatternFlowGreProtocolMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreProtocolMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreProtocolMetricTag) ToProto() (*otg.PatternFlowGreProtocolMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreProtocolMetricTag) FromProto(msg *otg.PatternFlowGreProtocolMetricTag) (PatternFlowGreProtocolMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreProtocolMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreProtocolMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreProtocolMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreProtocolMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreProtocolMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreProtocolMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreProtocolMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreProtocolMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreProtocolMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreProtocolMetricTag) Clone() (PatternFlowGreProtocolMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreProtocolMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGreProtocolMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGreProtocolMetricTag interface { + Validation + // msg marshals PatternFlowGreProtocolMetricTag to protobuf object *otg.PatternFlowGreProtocolMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGreProtocolMetricTag + // setMsg unmarshals PatternFlowGreProtocolMetricTag from protobuf object *otg.PatternFlowGreProtocolMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGreProtocolMetricTag) PatternFlowGreProtocolMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGreProtocolMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreProtocolMetricTag + // validate validates PatternFlowGreProtocolMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreProtocolMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGreProtocolMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGreProtocolMetricTag + SetName(value string) PatternFlowGreProtocolMetricTag + // Offset returns uint32, set in PatternFlowGreProtocolMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGreProtocolMetricTag + SetOffset(value uint32) PatternFlowGreProtocolMetricTag + // HasOffset checks if Offset has been set in PatternFlowGreProtocolMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGreProtocolMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGreProtocolMetricTag + SetLength(value uint32) PatternFlowGreProtocolMetricTag + // HasLength checks if Length has been set in PatternFlowGreProtocolMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGreProtocolMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGreProtocolMetricTag object +func (obj *patternFlowGreProtocolMetricTag) SetName(value string) PatternFlowGreProtocolMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGreProtocolMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGreProtocolMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGreProtocolMetricTag object +func (obj *patternFlowGreProtocolMetricTag) SetOffset(value uint32) PatternFlowGreProtocolMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGreProtocolMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGreProtocolMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGreProtocolMetricTag object +func (obj *patternFlowGreProtocolMetricTag) SetLength(value uint32) PatternFlowGreProtocolMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGreProtocolMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGreProtocolMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreProtocolMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGreProtocolMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGreProtocolMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_gre_reserved0.go b/gosnappi/pattern_flow_gre_reserved0.go new file mode 100644 index 00000000..361262a7 --- /dev/null +++ b/gosnappi/pattern_flow_gre_reserved0.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreReserved0 ***** +type patternFlowGreReserved0 struct { + validation + obj *otg.PatternFlowGreReserved0 + marshaller marshalPatternFlowGreReserved0 + unMarshaller unMarshalPatternFlowGreReserved0 + incrementHolder PatternFlowGreReserved0Counter + decrementHolder PatternFlowGreReserved0Counter + metricTagsHolder PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter +} + +func NewPatternFlowGreReserved0() PatternFlowGreReserved0 { + obj := patternFlowGreReserved0{obj: &otg.PatternFlowGreReserved0{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreReserved0) msg() *otg.PatternFlowGreReserved0 { + return obj.obj +} + +func (obj *patternFlowGreReserved0) setMsg(msg *otg.PatternFlowGreReserved0) PatternFlowGreReserved0 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreReserved0 struct { + obj *patternFlowGreReserved0 +} + +type marshalPatternFlowGreReserved0 interface { + // ToProto marshals PatternFlowGreReserved0 to protobuf object *otg.PatternFlowGreReserved0 + ToProto() (*otg.PatternFlowGreReserved0, error) + // ToPbText marshals PatternFlowGreReserved0 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreReserved0 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreReserved0 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreReserved0 struct { + obj *patternFlowGreReserved0 +} + +type unMarshalPatternFlowGreReserved0 interface { + // FromProto unmarshals PatternFlowGreReserved0 from protobuf object *otg.PatternFlowGreReserved0 + FromProto(msg *otg.PatternFlowGreReserved0) (PatternFlowGreReserved0, error) + // FromPbText unmarshals PatternFlowGreReserved0 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreReserved0 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreReserved0 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreReserved0) Marshal() marshalPatternFlowGreReserved0 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreReserved0{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreReserved0) Unmarshal() unMarshalPatternFlowGreReserved0 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreReserved0{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreReserved0) ToProto() (*otg.PatternFlowGreReserved0, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreReserved0) FromProto(msg *otg.PatternFlowGreReserved0) (PatternFlowGreReserved0, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreReserved0) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreReserved0) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreReserved0) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreReserved0) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreReserved0) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreReserved0) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreReserved0) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreReserved0) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreReserved0) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreReserved0) Clone() (PatternFlowGreReserved0, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreReserved0() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGreReserved0) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGreReserved0 is reserved bits +type PatternFlowGreReserved0 interface { + Validation + // msg marshals PatternFlowGreReserved0 to protobuf object *otg.PatternFlowGreReserved0 + // and doesn't set defaults + msg() *otg.PatternFlowGreReserved0 + // setMsg unmarshals PatternFlowGreReserved0 from protobuf object *otg.PatternFlowGreReserved0 + // and doesn't set defaults + setMsg(*otg.PatternFlowGreReserved0) PatternFlowGreReserved0 + // provides marshal interface + Marshal() marshalPatternFlowGreReserved0 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreReserved0 + // validate validates PatternFlowGreReserved0 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreReserved0, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGreReserved0ChoiceEnum, set in PatternFlowGreReserved0 + Choice() PatternFlowGreReserved0ChoiceEnum + // setChoice assigns PatternFlowGreReserved0ChoiceEnum provided by user to PatternFlowGreReserved0 + setChoice(value PatternFlowGreReserved0ChoiceEnum) PatternFlowGreReserved0 + // HasChoice checks if Choice has been set in PatternFlowGreReserved0 + HasChoice() bool + // Value returns uint32, set in PatternFlowGreReserved0. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGreReserved0 + SetValue(value uint32) PatternFlowGreReserved0 + // HasValue checks if Value has been set in PatternFlowGreReserved0 + HasValue() bool + // Values returns []uint32, set in PatternFlowGreReserved0. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGreReserved0 + SetValues(value []uint32) PatternFlowGreReserved0 + // Increment returns PatternFlowGreReserved0Counter, set in PatternFlowGreReserved0. + // PatternFlowGreReserved0Counter is integer counter pattern + Increment() PatternFlowGreReserved0Counter + // SetIncrement assigns PatternFlowGreReserved0Counter provided by user to PatternFlowGreReserved0. + // PatternFlowGreReserved0Counter is integer counter pattern + SetIncrement(value PatternFlowGreReserved0Counter) PatternFlowGreReserved0 + // HasIncrement checks if Increment has been set in PatternFlowGreReserved0 + HasIncrement() bool + // Decrement returns PatternFlowGreReserved0Counter, set in PatternFlowGreReserved0. + // PatternFlowGreReserved0Counter is integer counter pattern + Decrement() PatternFlowGreReserved0Counter + // SetDecrement assigns PatternFlowGreReserved0Counter provided by user to PatternFlowGreReserved0. + // PatternFlowGreReserved0Counter is integer counter pattern + SetDecrement(value PatternFlowGreReserved0Counter) PatternFlowGreReserved0 + // HasDecrement checks if Decrement has been set in PatternFlowGreReserved0 + HasDecrement() bool + // MetricTags returns PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIterIter, set in PatternFlowGreReserved0 + MetricTags() PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter + setNil() +} + +type PatternFlowGreReserved0ChoiceEnum string + +// Enum of Choice on PatternFlowGreReserved0 +var PatternFlowGreReserved0Choice = struct { + VALUE PatternFlowGreReserved0ChoiceEnum + VALUES PatternFlowGreReserved0ChoiceEnum + INCREMENT PatternFlowGreReserved0ChoiceEnum + DECREMENT PatternFlowGreReserved0ChoiceEnum +}{ + VALUE: PatternFlowGreReserved0ChoiceEnum("value"), + VALUES: PatternFlowGreReserved0ChoiceEnum("values"), + INCREMENT: PatternFlowGreReserved0ChoiceEnum("increment"), + DECREMENT: PatternFlowGreReserved0ChoiceEnum("decrement"), +} + +func (obj *patternFlowGreReserved0) Choice() PatternFlowGreReserved0ChoiceEnum { + return PatternFlowGreReserved0ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGreReserved0) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGreReserved0) setChoice(value PatternFlowGreReserved0ChoiceEnum) PatternFlowGreReserved0 { + intValue, ok := otg.PatternFlowGreReserved0_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGreReserved0ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGreReserved0_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGreReserved0Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGreReserved0Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGreReserved0Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowGreReserved0Counter().msg() + } + + if value == PatternFlowGreReserved0Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGreReserved0Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGreReserved0) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGreReserved0Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGreReserved0) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGreReserved0 object +func (obj *patternFlowGreReserved0) SetValue(value uint32) PatternFlowGreReserved0 { + obj.setChoice(PatternFlowGreReserved0Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGreReserved0) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGreReserved0 object +func (obj *patternFlowGreReserved0) SetValues(value []uint32) PatternFlowGreReserved0 { + obj.setChoice(PatternFlowGreReserved0Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGreReserved0Counter +func (obj *patternFlowGreReserved0) Increment() PatternFlowGreReserved0Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGreReserved0Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGreReserved0Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGreReserved0Counter +func (obj *patternFlowGreReserved0) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGreReserved0Counter value in the PatternFlowGreReserved0 object +func (obj *patternFlowGreReserved0) SetIncrement(value PatternFlowGreReserved0Counter) PatternFlowGreReserved0 { + obj.setChoice(PatternFlowGreReserved0Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGreReserved0Counter +func (obj *patternFlowGreReserved0) Decrement() PatternFlowGreReserved0Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGreReserved0Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGreReserved0Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGreReserved0Counter +func (obj *patternFlowGreReserved0) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGreReserved0Counter value in the PatternFlowGreReserved0 object +func (obj *patternFlowGreReserved0) SetDecrement(value PatternFlowGreReserved0Counter) PatternFlowGreReserved0 { + obj.setChoice(PatternFlowGreReserved0Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGreReserved0MetricTag +func (obj *patternFlowGreReserved0) MetricTags() PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGreReserved0MetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGreReserved0PatternFlowGreReserved0MetricTagIter struct { + obj *patternFlowGreReserved0 + patternFlowGreReserved0MetricTagSlice []PatternFlowGreReserved0MetricTag + fieldPtr *[]*otg.PatternFlowGreReserved0MetricTag +} + +func newPatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter(ptr *[]*otg.PatternFlowGreReserved0MetricTag) PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter { + return &patternFlowGreReserved0PatternFlowGreReserved0MetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter interface { + setMsg(*patternFlowGreReserved0) PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter + Items() []PatternFlowGreReserved0MetricTag + Add() PatternFlowGreReserved0MetricTag + Append(items ...PatternFlowGreReserved0MetricTag) PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter + Set(index int, newObj PatternFlowGreReserved0MetricTag) PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter + Clear() PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter + clearHolderSlice() PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter + appendHolderSlice(item PatternFlowGreReserved0MetricTag) PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter +} + +func (obj *patternFlowGreReserved0PatternFlowGreReserved0MetricTagIter) setMsg(msg *patternFlowGreReserved0) PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGreReserved0MetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGreReserved0PatternFlowGreReserved0MetricTagIter) Items() []PatternFlowGreReserved0MetricTag { + return obj.patternFlowGreReserved0MetricTagSlice +} + +func (obj *patternFlowGreReserved0PatternFlowGreReserved0MetricTagIter) Add() PatternFlowGreReserved0MetricTag { + newObj := &otg.PatternFlowGreReserved0MetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGreReserved0MetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGreReserved0MetricTagSlice = append(obj.patternFlowGreReserved0MetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGreReserved0PatternFlowGreReserved0MetricTagIter) Append(items ...PatternFlowGreReserved0MetricTag) PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGreReserved0MetricTagSlice = append(obj.patternFlowGreReserved0MetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGreReserved0PatternFlowGreReserved0MetricTagIter) Set(index int, newObj PatternFlowGreReserved0MetricTag) PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGreReserved0MetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGreReserved0PatternFlowGreReserved0MetricTagIter) Clear() PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGreReserved0MetricTag{} + obj.patternFlowGreReserved0MetricTagSlice = []PatternFlowGreReserved0MetricTag{} + } + return obj +} +func (obj *patternFlowGreReserved0PatternFlowGreReserved0MetricTagIter) clearHolderSlice() PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter { + if len(obj.patternFlowGreReserved0MetricTagSlice) > 0 { + obj.patternFlowGreReserved0MetricTagSlice = []PatternFlowGreReserved0MetricTag{} + } + return obj +} +func (obj *patternFlowGreReserved0PatternFlowGreReserved0MetricTagIter) appendHolderSlice(item PatternFlowGreReserved0MetricTag) PatternFlowGreReserved0PatternFlowGreReserved0MetricTagIter { + obj.patternFlowGreReserved0MetricTagSlice = append(obj.patternFlowGreReserved0MetricTagSlice, item) + return obj +} + +func (obj *patternFlowGreReserved0) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreReserved0.Value <= 4095 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGreReserved0.Values <= 4095 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGreReserved0MetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGreReserved0) setDefault() { + var choices_set int = 0 + var choice PatternFlowGreReserved0ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGreReserved0Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGreReserved0Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGreReserved0Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGreReserved0Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGreReserved0Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGreReserved0") + } + } else { + intVal := otg.PatternFlowGreReserved0_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGreReserved0_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gre_reserved0_counter.go b/gosnappi/pattern_flow_gre_reserved0_counter.go new file mode 100644 index 00000000..25796ac7 --- /dev/null +++ b/gosnappi/pattern_flow_gre_reserved0_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreReserved0Counter ***** +type patternFlowGreReserved0Counter struct { + validation + obj *otg.PatternFlowGreReserved0Counter + marshaller marshalPatternFlowGreReserved0Counter + unMarshaller unMarshalPatternFlowGreReserved0Counter +} + +func NewPatternFlowGreReserved0Counter() PatternFlowGreReserved0Counter { + obj := patternFlowGreReserved0Counter{obj: &otg.PatternFlowGreReserved0Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreReserved0Counter) msg() *otg.PatternFlowGreReserved0Counter { + return obj.obj +} + +func (obj *patternFlowGreReserved0Counter) setMsg(msg *otg.PatternFlowGreReserved0Counter) PatternFlowGreReserved0Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreReserved0Counter struct { + obj *patternFlowGreReserved0Counter +} + +type marshalPatternFlowGreReserved0Counter interface { + // ToProto marshals PatternFlowGreReserved0Counter to protobuf object *otg.PatternFlowGreReserved0Counter + ToProto() (*otg.PatternFlowGreReserved0Counter, error) + // ToPbText marshals PatternFlowGreReserved0Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreReserved0Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreReserved0Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreReserved0Counter struct { + obj *patternFlowGreReserved0Counter +} + +type unMarshalPatternFlowGreReserved0Counter interface { + // FromProto unmarshals PatternFlowGreReserved0Counter from protobuf object *otg.PatternFlowGreReserved0Counter + FromProto(msg *otg.PatternFlowGreReserved0Counter) (PatternFlowGreReserved0Counter, error) + // FromPbText unmarshals PatternFlowGreReserved0Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreReserved0Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreReserved0Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreReserved0Counter) Marshal() marshalPatternFlowGreReserved0Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreReserved0Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreReserved0Counter) Unmarshal() unMarshalPatternFlowGreReserved0Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreReserved0Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreReserved0Counter) ToProto() (*otg.PatternFlowGreReserved0Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreReserved0Counter) FromProto(msg *otg.PatternFlowGreReserved0Counter) (PatternFlowGreReserved0Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreReserved0Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreReserved0Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreReserved0Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreReserved0Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreReserved0Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreReserved0Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreReserved0Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreReserved0Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreReserved0Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreReserved0Counter) Clone() (PatternFlowGreReserved0Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreReserved0Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGreReserved0Counter is integer counter pattern +type PatternFlowGreReserved0Counter interface { + Validation + // msg marshals PatternFlowGreReserved0Counter to protobuf object *otg.PatternFlowGreReserved0Counter + // and doesn't set defaults + msg() *otg.PatternFlowGreReserved0Counter + // setMsg unmarshals PatternFlowGreReserved0Counter from protobuf object *otg.PatternFlowGreReserved0Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowGreReserved0Counter) PatternFlowGreReserved0Counter + // provides marshal interface + Marshal() marshalPatternFlowGreReserved0Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreReserved0Counter + // validate validates PatternFlowGreReserved0Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreReserved0Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGreReserved0Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGreReserved0Counter + SetStart(value uint32) PatternFlowGreReserved0Counter + // HasStart checks if Start has been set in PatternFlowGreReserved0Counter + HasStart() bool + // Step returns uint32, set in PatternFlowGreReserved0Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGreReserved0Counter + SetStep(value uint32) PatternFlowGreReserved0Counter + // HasStep checks if Step has been set in PatternFlowGreReserved0Counter + HasStep() bool + // Count returns uint32, set in PatternFlowGreReserved0Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGreReserved0Counter + SetCount(value uint32) PatternFlowGreReserved0Counter + // HasCount checks if Count has been set in PatternFlowGreReserved0Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGreReserved0Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGreReserved0Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGreReserved0Counter object +func (obj *patternFlowGreReserved0Counter) SetStart(value uint32) PatternFlowGreReserved0Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGreReserved0Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGreReserved0Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGreReserved0Counter object +func (obj *patternFlowGreReserved0Counter) SetStep(value uint32) PatternFlowGreReserved0Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGreReserved0Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGreReserved0Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGreReserved0Counter object +func (obj *patternFlowGreReserved0Counter) SetCount(value uint32) PatternFlowGreReserved0Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGreReserved0Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreReserved0Counter.Start <= 4095 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreReserved0Counter.Step <= 4095 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreReserved0Counter.Count <= 4095 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGreReserved0Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gre_reserved0_metric_tag.go b/gosnappi/pattern_flow_gre_reserved0_metric_tag.go new file mode 100644 index 00000000..015de8b2 --- /dev/null +++ b/gosnappi/pattern_flow_gre_reserved0_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreReserved0MetricTag ***** +type patternFlowGreReserved0MetricTag struct { + validation + obj *otg.PatternFlowGreReserved0MetricTag + marshaller marshalPatternFlowGreReserved0MetricTag + unMarshaller unMarshalPatternFlowGreReserved0MetricTag +} + +func NewPatternFlowGreReserved0MetricTag() PatternFlowGreReserved0MetricTag { + obj := patternFlowGreReserved0MetricTag{obj: &otg.PatternFlowGreReserved0MetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreReserved0MetricTag) msg() *otg.PatternFlowGreReserved0MetricTag { + return obj.obj +} + +func (obj *patternFlowGreReserved0MetricTag) setMsg(msg *otg.PatternFlowGreReserved0MetricTag) PatternFlowGreReserved0MetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreReserved0MetricTag struct { + obj *patternFlowGreReserved0MetricTag +} + +type marshalPatternFlowGreReserved0MetricTag interface { + // ToProto marshals PatternFlowGreReserved0MetricTag to protobuf object *otg.PatternFlowGreReserved0MetricTag + ToProto() (*otg.PatternFlowGreReserved0MetricTag, error) + // ToPbText marshals PatternFlowGreReserved0MetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreReserved0MetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreReserved0MetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreReserved0MetricTag struct { + obj *patternFlowGreReserved0MetricTag +} + +type unMarshalPatternFlowGreReserved0MetricTag interface { + // FromProto unmarshals PatternFlowGreReserved0MetricTag from protobuf object *otg.PatternFlowGreReserved0MetricTag + FromProto(msg *otg.PatternFlowGreReserved0MetricTag) (PatternFlowGreReserved0MetricTag, error) + // FromPbText unmarshals PatternFlowGreReserved0MetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreReserved0MetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreReserved0MetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreReserved0MetricTag) Marshal() marshalPatternFlowGreReserved0MetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreReserved0MetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreReserved0MetricTag) Unmarshal() unMarshalPatternFlowGreReserved0MetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreReserved0MetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreReserved0MetricTag) ToProto() (*otg.PatternFlowGreReserved0MetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreReserved0MetricTag) FromProto(msg *otg.PatternFlowGreReserved0MetricTag) (PatternFlowGreReserved0MetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreReserved0MetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreReserved0MetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreReserved0MetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreReserved0MetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreReserved0MetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreReserved0MetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreReserved0MetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreReserved0MetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreReserved0MetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreReserved0MetricTag) Clone() (PatternFlowGreReserved0MetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreReserved0MetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGreReserved0MetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGreReserved0MetricTag interface { + Validation + // msg marshals PatternFlowGreReserved0MetricTag to protobuf object *otg.PatternFlowGreReserved0MetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGreReserved0MetricTag + // setMsg unmarshals PatternFlowGreReserved0MetricTag from protobuf object *otg.PatternFlowGreReserved0MetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGreReserved0MetricTag) PatternFlowGreReserved0MetricTag + // provides marshal interface + Marshal() marshalPatternFlowGreReserved0MetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreReserved0MetricTag + // validate validates PatternFlowGreReserved0MetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreReserved0MetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGreReserved0MetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGreReserved0MetricTag + SetName(value string) PatternFlowGreReserved0MetricTag + // Offset returns uint32, set in PatternFlowGreReserved0MetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGreReserved0MetricTag + SetOffset(value uint32) PatternFlowGreReserved0MetricTag + // HasOffset checks if Offset has been set in PatternFlowGreReserved0MetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGreReserved0MetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGreReserved0MetricTag + SetLength(value uint32) PatternFlowGreReserved0MetricTag + // HasLength checks if Length has been set in PatternFlowGreReserved0MetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGreReserved0MetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGreReserved0MetricTag object +func (obj *patternFlowGreReserved0MetricTag) SetName(value string) PatternFlowGreReserved0MetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGreReserved0MetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGreReserved0MetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGreReserved0MetricTag object +func (obj *patternFlowGreReserved0MetricTag) SetOffset(value uint32) PatternFlowGreReserved0MetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGreReserved0MetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGreReserved0MetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGreReserved0MetricTag object +func (obj *patternFlowGreReserved0MetricTag) SetLength(value uint32) PatternFlowGreReserved0MetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGreReserved0MetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGreReserved0MetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 11 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreReserved0MetricTag.Offset <= 11 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 12 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGreReserved0MetricTag.Length <= 12 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGreReserved0MetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(12) + } + +} diff --git a/gosnappi/pattern_flow_gre_reserved1.go b/gosnappi/pattern_flow_gre_reserved1.go new file mode 100644 index 00000000..2ceb0aea --- /dev/null +++ b/gosnappi/pattern_flow_gre_reserved1.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreReserved1 ***** +type patternFlowGreReserved1 struct { + validation + obj *otg.PatternFlowGreReserved1 + marshaller marshalPatternFlowGreReserved1 + unMarshaller unMarshalPatternFlowGreReserved1 + incrementHolder PatternFlowGreReserved1Counter + decrementHolder PatternFlowGreReserved1Counter + metricTagsHolder PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter +} + +func NewPatternFlowGreReserved1() PatternFlowGreReserved1 { + obj := patternFlowGreReserved1{obj: &otg.PatternFlowGreReserved1{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreReserved1) msg() *otg.PatternFlowGreReserved1 { + return obj.obj +} + +func (obj *patternFlowGreReserved1) setMsg(msg *otg.PatternFlowGreReserved1) PatternFlowGreReserved1 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreReserved1 struct { + obj *patternFlowGreReserved1 +} + +type marshalPatternFlowGreReserved1 interface { + // ToProto marshals PatternFlowGreReserved1 to protobuf object *otg.PatternFlowGreReserved1 + ToProto() (*otg.PatternFlowGreReserved1, error) + // ToPbText marshals PatternFlowGreReserved1 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreReserved1 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreReserved1 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreReserved1 struct { + obj *patternFlowGreReserved1 +} + +type unMarshalPatternFlowGreReserved1 interface { + // FromProto unmarshals PatternFlowGreReserved1 from protobuf object *otg.PatternFlowGreReserved1 + FromProto(msg *otg.PatternFlowGreReserved1) (PatternFlowGreReserved1, error) + // FromPbText unmarshals PatternFlowGreReserved1 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreReserved1 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreReserved1 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreReserved1) Marshal() marshalPatternFlowGreReserved1 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreReserved1{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreReserved1) Unmarshal() unMarshalPatternFlowGreReserved1 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreReserved1{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreReserved1) ToProto() (*otg.PatternFlowGreReserved1, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreReserved1) FromProto(msg *otg.PatternFlowGreReserved1) (PatternFlowGreReserved1, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreReserved1) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreReserved1) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreReserved1) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreReserved1) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreReserved1) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreReserved1) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreReserved1) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreReserved1) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreReserved1) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreReserved1) Clone() (PatternFlowGreReserved1, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreReserved1() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGreReserved1) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGreReserved1 is optional reserved field. Only present if the checksum_present bit is set. +type PatternFlowGreReserved1 interface { + Validation + // msg marshals PatternFlowGreReserved1 to protobuf object *otg.PatternFlowGreReserved1 + // and doesn't set defaults + msg() *otg.PatternFlowGreReserved1 + // setMsg unmarshals PatternFlowGreReserved1 from protobuf object *otg.PatternFlowGreReserved1 + // and doesn't set defaults + setMsg(*otg.PatternFlowGreReserved1) PatternFlowGreReserved1 + // provides marshal interface + Marshal() marshalPatternFlowGreReserved1 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreReserved1 + // validate validates PatternFlowGreReserved1 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreReserved1, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGreReserved1ChoiceEnum, set in PatternFlowGreReserved1 + Choice() PatternFlowGreReserved1ChoiceEnum + // setChoice assigns PatternFlowGreReserved1ChoiceEnum provided by user to PatternFlowGreReserved1 + setChoice(value PatternFlowGreReserved1ChoiceEnum) PatternFlowGreReserved1 + // HasChoice checks if Choice has been set in PatternFlowGreReserved1 + HasChoice() bool + // Value returns uint32, set in PatternFlowGreReserved1. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGreReserved1 + SetValue(value uint32) PatternFlowGreReserved1 + // HasValue checks if Value has been set in PatternFlowGreReserved1 + HasValue() bool + // Values returns []uint32, set in PatternFlowGreReserved1. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGreReserved1 + SetValues(value []uint32) PatternFlowGreReserved1 + // Increment returns PatternFlowGreReserved1Counter, set in PatternFlowGreReserved1. + // PatternFlowGreReserved1Counter is integer counter pattern + Increment() PatternFlowGreReserved1Counter + // SetIncrement assigns PatternFlowGreReserved1Counter provided by user to PatternFlowGreReserved1. + // PatternFlowGreReserved1Counter is integer counter pattern + SetIncrement(value PatternFlowGreReserved1Counter) PatternFlowGreReserved1 + // HasIncrement checks if Increment has been set in PatternFlowGreReserved1 + HasIncrement() bool + // Decrement returns PatternFlowGreReserved1Counter, set in PatternFlowGreReserved1. + // PatternFlowGreReserved1Counter is integer counter pattern + Decrement() PatternFlowGreReserved1Counter + // SetDecrement assigns PatternFlowGreReserved1Counter provided by user to PatternFlowGreReserved1. + // PatternFlowGreReserved1Counter is integer counter pattern + SetDecrement(value PatternFlowGreReserved1Counter) PatternFlowGreReserved1 + // HasDecrement checks if Decrement has been set in PatternFlowGreReserved1 + HasDecrement() bool + // MetricTags returns PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIterIter, set in PatternFlowGreReserved1 + MetricTags() PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter + setNil() +} + +type PatternFlowGreReserved1ChoiceEnum string + +// Enum of Choice on PatternFlowGreReserved1 +var PatternFlowGreReserved1Choice = struct { + VALUE PatternFlowGreReserved1ChoiceEnum + VALUES PatternFlowGreReserved1ChoiceEnum + INCREMENT PatternFlowGreReserved1ChoiceEnum + DECREMENT PatternFlowGreReserved1ChoiceEnum +}{ + VALUE: PatternFlowGreReserved1ChoiceEnum("value"), + VALUES: PatternFlowGreReserved1ChoiceEnum("values"), + INCREMENT: PatternFlowGreReserved1ChoiceEnum("increment"), + DECREMENT: PatternFlowGreReserved1ChoiceEnum("decrement"), +} + +func (obj *patternFlowGreReserved1) Choice() PatternFlowGreReserved1ChoiceEnum { + return PatternFlowGreReserved1ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGreReserved1) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGreReserved1) setChoice(value PatternFlowGreReserved1ChoiceEnum) PatternFlowGreReserved1 { + intValue, ok := otg.PatternFlowGreReserved1_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGreReserved1ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGreReserved1_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGreReserved1Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGreReserved1Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGreReserved1Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowGreReserved1Counter().msg() + } + + if value == PatternFlowGreReserved1Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGreReserved1Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGreReserved1) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGreReserved1Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGreReserved1) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGreReserved1 object +func (obj *patternFlowGreReserved1) SetValue(value uint32) PatternFlowGreReserved1 { + obj.setChoice(PatternFlowGreReserved1Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGreReserved1) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGreReserved1 object +func (obj *patternFlowGreReserved1) SetValues(value []uint32) PatternFlowGreReserved1 { + obj.setChoice(PatternFlowGreReserved1Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGreReserved1Counter +func (obj *patternFlowGreReserved1) Increment() PatternFlowGreReserved1Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGreReserved1Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGreReserved1Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGreReserved1Counter +func (obj *patternFlowGreReserved1) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGreReserved1Counter value in the PatternFlowGreReserved1 object +func (obj *patternFlowGreReserved1) SetIncrement(value PatternFlowGreReserved1Counter) PatternFlowGreReserved1 { + obj.setChoice(PatternFlowGreReserved1Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGreReserved1Counter +func (obj *patternFlowGreReserved1) Decrement() PatternFlowGreReserved1Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGreReserved1Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGreReserved1Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGreReserved1Counter +func (obj *patternFlowGreReserved1) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGreReserved1Counter value in the PatternFlowGreReserved1 object +func (obj *patternFlowGreReserved1) SetDecrement(value PatternFlowGreReserved1Counter) PatternFlowGreReserved1 { + obj.setChoice(PatternFlowGreReserved1Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGreReserved1MetricTag +func (obj *patternFlowGreReserved1) MetricTags() PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGreReserved1MetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGreReserved1PatternFlowGreReserved1MetricTagIter struct { + obj *patternFlowGreReserved1 + patternFlowGreReserved1MetricTagSlice []PatternFlowGreReserved1MetricTag + fieldPtr *[]*otg.PatternFlowGreReserved1MetricTag +} + +func newPatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter(ptr *[]*otg.PatternFlowGreReserved1MetricTag) PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter { + return &patternFlowGreReserved1PatternFlowGreReserved1MetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter interface { + setMsg(*patternFlowGreReserved1) PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter + Items() []PatternFlowGreReserved1MetricTag + Add() PatternFlowGreReserved1MetricTag + Append(items ...PatternFlowGreReserved1MetricTag) PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter + Set(index int, newObj PatternFlowGreReserved1MetricTag) PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter + Clear() PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter + clearHolderSlice() PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter + appendHolderSlice(item PatternFlowGreReserved1MetricTag) PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter +} + +func (obj *patternFlowGreReserved1PatternFlowGreReserved1MetricTagIter) setMsg(msg *patternFlowGreReserved1) PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGreReserved1MetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGreReserved1PatternFlowGreReserved1MetricTagIter) Items() []PatternFlowGreReserved1MetricTag { + return obj.patternFlowGreReserved1MetricTagSlice +} + +func (obj *patternFlowGreReserved1PatternFlowGreReserved1MetricTagIter) Add() PatternFlowGreReserved1MetricTag { + newObj := &otg.PatternFlowGreReserved1MetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGreReserved1MetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGreReserved1MetricTagSlice = append(obj.patternFlowGreReserved1MetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGreReserved1PatternFlowGreReserved1MetricTagIter) Append(items ...PatternFlowGreReserved1MetricTag) PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGreReserved1MetricTagSlice = append(obj.patternFlowGreReserved1MetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGreReserved1PatternFlowGreReserved1MetricTagIter) Set(index int, newObj PatternFlowGreReserved1MetricTag) PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGreReserved1MetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGreReserved1PatternFlowGreReserved1MetricTagIter) Clear() PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGreReserved1MetricTag{} + obj.patternFlowGreReserved1MetricTagSlice = []PatternFlowGreReserved1MetricTag{} + } + return obj +} +func (obj *patternFlowGreReserved1PatternFlowGreReserved1MetricTagIter) clearHolderSlice() PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter { + if len(obj.patternFlowGreReserved1MetricTagSlice) > 0 { + obj.patternFlowGreReserved1MetricTagSlice = []PatternFlowGreReserved1MetricTag{} + } + return obj +} +func (obj *patternFlowGreReserved1PatternFlowGreReserved1MetricTagIter) appendHolderSlice(item PatternFlowGreReserved1MetricTag) PatternFlowGreReserved1PatternFlowGreReserved1MetricTagIter { + obj.patternFlowGreReserved1MetricTagSlice = append(obj.patternFlowGreReserved1MetricTagSlice, item) + return obj +} + +func (obj *patternFlowGreReserved1) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreReserved1.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGreReserved1.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGreReserved1MetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGreReserved1) setDefault() { + var choices_set int = 0 + var choice PatternFlowGreReserved1ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGreReserved1Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGreReserved1Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGreReserved1Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGreReserved1Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGreReserved1Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGreReserved1") + } + } else { + intVal := otg.PatternFlowGreReserved1_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGreReserved1_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gre_reserved1_counter.go b/gosnappi/pattern_flow_gre_reserved1_counter.go new file mode 100644 index 00000000..363b3b4a --- /dev/null +++ b/gosnappi/pattern_flow_gre_reserved1_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreReserved1Counter ***** +type patternFlowGreReserved1Counter struct { + validation + obj *otg.PatternFlowGreReserved1Counter + marshaller marshalPatternFlowGreReserved1Counter + unMarshaller unMarshalPatternFlowGreReserved1Counter +} + +func NewPatternFlowGreReserved1Counter() PatternFlowGreReserved1Counter { + obj := patternFlowGreReserved1Counter{obj: &otg.PatternFlowGreReserved1Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreReserved1Counter) msg() *otg.PatternFlowGreReserved1Counter { + return obj.obj +} + +func (obj *patternFlowGreReserved1Counter) setMsg(msg *otg.PatternFlowGreReserved1Counter) PatternFlowGreReserved1Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreReserved1Counter struct { + obj *patternFlowGreReserved1Counter +} + +type marshalPatternFlowGreReserved1Counter interface { + // ToProto marshals PatternFlowGreReserved1Counter to protobuf object *otg.PatternFlowGreReserved1Counter + ToProto() (*otg.PatternFlowGreReserved1Counter, error) + // ToPbText marshals PatternFlowGreReserved1Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreReserved1Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreReserved1Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreReserved1Counter struct { + obj *patternFlowGreReserved1Counter +} + +type unMarshalPatternFlowGreReserved1Counter interface { + // FromProto unmarshals PatternFlowGreReserved1Counter from protobuf object *otg.PatternFlowGreReserved1Counter + FromProto(msg *otg.PatternFlowGreReserved1Counter) (PatternFlowGreReserved1Counter, error) + // FromPbText unmarshals PatternFlowGreReserved1Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreReserved1Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreReserved1Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreReserved1Counter) Marshal() marshalPatternFlowGreReserved1Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreReserved1Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreReserved1Counter) Unmarshal() unMarshalPatternFlowGreReserved1Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreReserved1Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreReserved1Counter) ToProto() (*otg.PatternFlowGreReserved1Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreReserved1Counter) FromProto(msg *otg.PatternFlowGreReserved1Counter) (PatternFlowGreReserved1Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreReserved1Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreReserved1Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreReserved1Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreReserved1Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreReserved1Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreReserved1Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreReserved1Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreReserved1Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreReserved1Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreReserved1Counter) Clone() (PatternFlowGreReserved1Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreReserved1Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGreReserved1Counter is integer counter pattern +type PatternFlowGreReserved1Counter interface { + Validation + // msg marshals PatternFlowGreReserved1Counter to protobuf object *otg.PatternFlowGreReserved1Counter + // and doesn't set defaults + msg() *otg.PatternFlowGreReserved1Counter + // setMsg unmarshals PatternFlowGreReserved1Counter from protobuf object *otg.PatternFlowGreReserved1Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowGreReserved1Counter) PatternFlowGreReserved1Counter + // provides marshal interface + Marshal() marshalPatternFlowGreReserved1Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreReserved1Counter + // validate validates PatternFlowGreReserved1Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreReserved1Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGreReserved1Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGreReserved1Counter + SetStart(value uint32) PatternFlowGreReserved1Counter + // HasStart checks if Start has been set in PatternFlowGreReserved1Counter + HasStart() bool + // Step returns uint32, set in PatternFlowGreReserved1Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGreReserved1Counter + SetStep(value uint32) PatternFlowGreReserved1Counter + // HasStep checks if Step has been set in PatternFlowGreReserved1Counter + HasStep() bool + // Count returns uint32, set in PatternFlowGreReserved1Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGreReserved1Counter + SetCount(value uint32) PatternFlowGreReserved1Counter + // HasCount checks if Count has been set in PatternFlowGreReserved1Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGreReserved1Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGreReserved1Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGreReserved1Counter object +func (obj *patternFlowGreReserved1Counter) SetStart(value uint32) PatternFlowGreReserved1Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGreReserved1Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGreReserved1Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGreReserved1Counter object +func (obj *patternFlowGreReserved1Counter) SetStep(value uint32) PatternFlowGreReserved1Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGreReserved1Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGreReserved1Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGreReserved1Counter object +func (obj *patternFlowGreReserved1Counter) SetCount(value uint32) PatternFlowGreReserved1Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGreReserved1Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreReserved1Counter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreReserved1Counter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreReserved1Counter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGreReserved1Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gre_reserved1_metric_tag.go b/gosnappi/pattern_flow_gre_reserved1_metric_tag.go new file mode 100644 index 00000000..b4fd5dd9 --- /dev/null +++ b/gosnappi/pattern_flow_gre_reserved1_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreReserved1MetricTag ***** +type patternFlowGreReserved1MetricTag struct { + validation + obj *otg.PatternFlowGreReserved1MetricTag + marshaller marshalPatternFlowGreReserved1MetricTag + unMarshaller unMarshalPatternFlowGreReserved1MetricTag +} + +func NewPatternFlowGreReserved1MetricTag() PatternFlowGreReserved1MetricTag { + obj := patternFlowGreReserved1MetricTag{obj: &otg.PatternFlowGreReserved1MetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreReserved1MetricTag) msg() *otg.PatternFlowGreReserved1MetricTag { + return obj.obj +} + +func (obj *patternFlowGreReserved1MetricTag) setMsg(msg *otg.PatternFlowGreReserved1MetricTag) PatternFlowGreReserved1MetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreReserved1MetricTag struct { + obj *patternFlowGreReserved1MetricTag +} + +type marshalPatternFlowGreReserved1MetricTag interface { + // ToProto marshals PatternFlowGreReserved1MetricTag to protobuf object *otg.PatternFlowGreReserved1MetricTag + ToProto() (*otg.PatternFlowGreReserved1MetricTag, error) + // ToPbText marshals PatternFlowGreReserved1MetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreReserved1MetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreReserved1MetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreReserved1MetricTag struct { + obj *patternFlowGreReserved1MetricTag +} + +type unMarshalPatternFlowGreReserved1MetricTag interface { + // FromProto unmarshals PatternFlowGreReserved1MetricTag from protobuf object *otg.PatternFlowGreReserved1MetricTag + FromProto(msg *otg.PatternFlowGreReserved1MetricTag) (PatternFlowGreReserved1MetricTag, error) + // FromPbText unmarshals PatternFlowGreReserved1MetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreReserved1MetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreReserved1MetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreReserved1MetricTag) Marshal() marshalPatternFlowGreReserved1MetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreReserved1MetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreReserved1MetricTag) Unmarshal() unMarshalPatternFlowGreReserved1MetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreReserved1MetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreReserved1MetricTag) ToProto() (*otg.PatternFlowGreReserved1MetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreReserved1MetricTag) FromProto(msg *otg.PatternFlowGreReserved1MetricTag) (PatternFlowGreReserved1MetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreReserved1MetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreReserved1MetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreReserved1MetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreReserved1MetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreReserved1MetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreReserved1MetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreReserved1MetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreReserved1MetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreReserved1MetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreReserved1MetricTag) Clone() (PatternFlowGreReserved1MetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreReserved1MetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGreReserved1MetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGreReserved1MetricTag interface { + Validation + // msg marshals PatternFlowGreReserved1MetricTag to protobuf object *otg.PatternFlowGreReserved1MetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGreReserved1MetricTag + // setMsg unmarshals PatternFlowGreReserved1MetricTag from protobuf object *otg.PatternFlowGreReserved1MetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGreReserved1MetricTag) PatternFlowGreReserved1MetricTag + // provides marshal interface + Marshal() marshalPatternFlowGreReserved1MetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreReserved1MetricTag + // validate validates PatternFlowGreReserved1MetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreReserved1MetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGreReserved1MetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGreReserved1MetricTag + SetName(value string) PatternFlowGreReserved1MetricTag + // Offset returns uint32, set in PatternFlowGreReserved1MetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGreReserved1MetricTag + SetOffset(value uint32) PatternFlowGreReserved1MetricTag + // HasOffset checks if Offset has been set in PatternFlowGreReserved1MetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGreReserved1MetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGreReserved1MetricTag + SetLength(value uint32) PatternFlowGreReserved1MetricTag + // HasLength checks if Length has been set in PatternFlowGreReserved1MetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGreReserved1MetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGreReserved1MetricTag object +func (obj *patternFlowGreReserved1MetricTag) SetName(value string) PatternFlowGreReserved1MetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGreReserved1MetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGreReserved1MetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGreReserved1MetricTag object +func (obj *patternFlowGreReserved1MetricTag) SetOffset(value uint32) PatternFlowGreReserved1MetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGreReserved1MetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGreReserved1MetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGreReserved1MetricTag object +func (obj *patternFlowGreReserved1MetricTag) SetLength(value uint32) PatternFlowGreReserved1MetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGreReserved1MetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGreReserved1MetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreReserved1MetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGreReserved1MetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGreReserved1MetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_gre_version.go b/gosnappi/pattern_flow_gre_version.go new file mode 100644 index 00000000..bdfdbcf9 --- /dev/null +++ b/gosnappi/pattern_flow_gre_version.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreVersion ***** +type patternFlowGreVersion struct { + validation + obj *otg.PatternFlowGreVersion + marshaller marshalPatternFlowGreVersion + unMarshaller unMarshalPatternFlowGreVersion + incrementHolder PatternFlowGreVersionCounter + decrementHolder PatternFlowGreVersionCounter + metricTagsHolder PatternFlowGreVersionPatternFlowGreVersionMetricTagIter +} + +func NewPatternFlowGreVersion() PatternFlowGreVersion { + obj := patternFlowGreVersion{obj: &otg.PatternFlowGreVersion{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreVersion) msg() *otg.PatternFlowGreVersion { + return obj.obj +} + +func (obj *patternFlowGreVersion) setMsg(msg *otg.PatternFlowGreVersion) PatternFlowGreVersion { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreVersion struct { + obj *patternFlowGreVersion +} + +type marshalPatternFlowGreVersion interface { + // ToProto marshals PatternFlowGreVersion to protobuf object *otg.PatternFlowGreVersion + ToProto() (*otg.PatternFlowGreVersion, error) + // ToPbText marshals PatternFlowGreVersion to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreVersion to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreVersion to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreVersion struct { + obj *patternFlowGreVersion +} + +type unMarshalPatternFlowGreVersion interface { + // FromProto unmarshals PatternFlowGreVersion from protobuf object *otg.PatternFlowGreVersion + FromProto(msg *otg.PatternFlowGreVersion) (PatternFlowGreVersion, error) + // FromPbText unmarshals PatternFlowGreVersion from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreVersion from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreVersion from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreVersion) Marshal() marshalPatternFlowGreVersion { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreVersion{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreVersion) Unmarshal() unMarshalPatternFlowGreVersion { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreVersion{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreVersion) ToProto() (*otg.PatternFlowGreVersion, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreVersion) FromProto(msg *otg.PatternFlowGreVersion) (PatternFlowGreVersion, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreVersion) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreVersion) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreVersion) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreVersion) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreVersion) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreVersion) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreVersion) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreVersion) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreVersion) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreVersion) Clone() (PatternFlowGreVersion, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreVersion() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGreVersion) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGreVersion is gRE version number +type PatternFlowGreVersion interface { + Validation + // msg marshals PatternFlowGreVersion to protobuf object *otg.PatternFlowGreVersion + // and doesn't set defaults + msg() *otg.PatternFlowGreVersion + // setMsg unmarshals PatternFlowGreVersion from protobuf object *otg.PatternFlowGreVersion + // and doesn't set defaults + setMsg(*otg.PatternFlowGreVersion) PatternFlowGreVersion + // provides marshal interface + Marshal() marshalPatternFlowGreVersion + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreVersion + // validate validates PatternFlowGreVersion + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreVersion, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGreVersionChoiceEnum, set in PatternFlowGreVersion + Choice() PatternFlowGreVersionChoiceEnum + // setChoice assigns PatternFlowGreVersionChoiceEnum provided by user to PatternFlowGreVersion + setChoice(value PatternFlowGreVersionChoiceEnum) PatternFlowGreVersion + // HasChoice checks if Choice has been set in PatternFlowGreVersion + HasChoice() bool + // Value returns uint32, set in PatternFlowGreVersion. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGreVersion + SetValue(value uint32) PatternFlowGreVersion + // HasValue checks if Value has been set in PatternFlowGreVersion + HasValue() bool + // Values returns []uint32, set in PatternFlowGreVersion. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGreVersion + SetValues(value []uint32) PatternFlowGreVersion + // Increment returns PatternFlowGreVersionCounter, set in PatternFlowGreVersion. + // PatternFlowGreVersionCounter is integer counter pattern + Increment() PatternFlowGreVersionCounter + // SetIncrement assigns PatternFlowGreVersionCounter provided by user to PatternFlowGreVersion. + // PatternFlowGreVersionCounter is integer counter pattern + SetIncrement(value PatternFlowGreVersionCounter) PatternFlowGreVersion + // HasIncrement checks if Increment has been set in PatternFlowGreVersion + HasIncrement() bool + // Decrement returns PatternFlowGreVersionCounter, set in PatternFlowGreVersion. + // PatternFlowGreVersionCounter is integer counter pattern + Decrement() PatternFlowGreVersionCounter + // SetDecrement assigns PatternFlowGreVersionCounter provided by user to PatternFlowGreVersion. + // PatternFlowGreVersionCounter is integer counter pattern + SetDecrement(value PatternFlowGreVersionCounter) PatternFlowGreVersion + // HasDecrement checks if Decrement has been set in PatternFlowGreVersion + HasDecrement() bool + // MetricTags returns PatternFlowGreVersionPatternFlowGreVersionMetricTagIterIter, set in PatternFlowGreVersion + MetricTags() PatternFlowGreVersionPatternFlowGreVersionMetricTagIter + setNil() +} + +type PatternFlowGreVersionChoiceEnum string + +// Enum of Choice on PatternFlowGreVersion +var PatternFlowGreVersionChoice = struct { + VALUE PatternFlowGreVersionChoiceEnum + VALUES PatternFlowGreVersionChoiceEnum + INCREMENT PatternFlowGreVersionChoiceEnum + DECREMENT PatternFlowGreVersionChoiceEnum +}{ + VALUE: PatternFlowGreVersionChoiceEnum("value"), + VALUES: PatternFlowGreVersionChoiceEnum("values"), + INCREMENT: PatternFlowGreVersionChoiceEnum("increment"), + DECREMENT: PatternFlowGreVersionChoiceEnum("decrement"), +} + +func (obj *patternFlowGreVersion) Choice() PatternFlowGreVersionChoiceEnum { + return PatternFlowGreVersionChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGreVersion) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGreVersion) setChoice(value PatternFlowGreVersionChoiceEnum) PatternFlowGreVersion { + intValue, ok := otg.PatternFlowGreVersion_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGreVersionChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGreVersion_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGreVersionChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGreVersionChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGreVersionChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGreVersionCounter().msg() + } + + if value == PatternFlowGreVersionChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGreVersionCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGreVersion) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGreVersionChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGreVersion) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGreVersion object +func (obj *patternFlowGreVersion) SetValue(value uint32) PatternFlowGreVersion { + obj.setChoice(PatternFlowGreVersionChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGreVersion) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGreVersion object +func (obj *patternFlowGreVersion) SetValues(value []uint32) PatternFlowGreVersion { + obj.setChoice(PatternFlowGreVersionChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGreVersionCounter +func (obj *patternFlowGreVersion) Increment() PatternFlowGreVersionCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGreVersionChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGreVersionCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGreVersionCounter +func (obj *patternFlowGreVersion) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGreVersionCounter value in the PatternFlowGreVersion object +func (obj *patternFlowGreVersion) SetIncrement(value PatternFlowGreVersionCounter) PatternFlowGreVersion { + obj.setChoice(PatternFlowGreVersionChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGreVersionCounter +func (obj *patternFlowGreVersion) Decrement() PatternFlowGreVersionCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGreVersionChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGreVersionCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGreVersionCounter +func (obj *patternFlowGreVersion) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGreVersionCounter value in the PatternFlowGreVersion object +func (obj *patternFlowGreVersion) SetDecrement(value PatternFlowGreVersionCounter) PatternFlowGreVersion { + obj.setChoice(PatternFlowGreVersionChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGreVersionMetricTag +func (obj *patternFlowGreVersion) MetricTags() PatternFlowGreVersionPatternFlowGreVersionMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGreVersionMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGreVersionPatternFlowGreVersionMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGreVersionPatternFlowGreVersionMetricTagIter struct { + obj *patternFlowGreVersion + patternFlowGreVersionMetricTagSlice []PatternFlowGreVersionMetricTag + fieldPtr *[]*otg.PatternFlowGreVersionMetricTag +} + +func newPatternFlowGreVersionPatternFlowGreVersionMetricTagIter(ptr *[]*otg.PatternFlowGreVersionMetricTag) PatternFlowGreVersionPatternFlowGreVersionMetricTagIter { + return &patternFlowGreVersionPatternFlowGreVersionMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGreVersionPatternFlowGreVersionMetricTagIter interface { + setMsg(*patternFlowGreVersion) PatternFlowGreVersionPatternFlowGreVersionMetricTagIter + Items() []PatternFlowGreVersionMetricTag + Add() PatternFlowGreVersionMetricTag + Append(items ...PatternFlowGreVersionMetricTag) PatternFlowGreVersionPatternFlowGreVersionMetricTagIter + Set(index int, newObj PatternFlowGreVersionMetricTag) PatternFlowGreVersionPatternFlowGreVersionMetricTagIter + Clear() PatternFlowGreVersionPatternFlowGreVersionMetricTagIter + clearHolderSlice() PatternFlowGreVersionPatternFlowGreVersionMetricTagIter + appendHolderSlice(item PatternFlowGreVersionMetricTag) PatternFlowGreVersionPatternFlowGreVersionMetricTagIter +} + +func (obj *patternFlowGreVersionPatternFlowGreVersionMetricTagIter) setMsg(msg *patternFlowGreVersion) PatternFlowGreVersionPatternFlowGreVersionMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGreVersionMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGreVersionPatternFlowGreVersionMetricTagIter) Items() []PatternFlowGreVersionMetricTag { + return obj.patternFlowGreVersionMetricTagSlice +} + +func (obj *patternFlowGreVersionPatternFlowGreVersionMetricTagIter) Add() PatternFlowGreVersionMetricTag { + newObj := &otg.PatternFlowGreVersionMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGreVersionMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGreVersionMetricTagSlice = append(obj.patternFlowGreVersionMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGreVersionPatternFlowGreVersionMetricTagIter) Append(items ...PatternFlowGreVersionMetricTag) PatternFlowGreVersionPatternFlowGreVersionMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGreVersionMetricTagSlice = append(obj.patternFlowGreVersionMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGreVersionPatternFlowGreVersionMetricTagIter) Set(index int, newObj PatternFlowGreVersionMetricTag) PatternFlowGreVersionPatternFlowGreVersionMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGreVersionMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGreVersionPatternFlowGreVersionMetricTagIter) Clear() PatternFlowGreVersionPatternFlowGreVersionMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGreVersionMetricTag{} + obj.patternFlowGreVersionMetricTagSlice = []PatternFlowGreVersionMetricTag{} + } + return obj +} +func (obj *patternFlowGreVersionPatternFlowGreVersionMetricTagIter) clearHolderSlice() PatternFlowGreVersionPatternFlowGreVersionMetricTagIter { + if len(obj.patternFlowGreVersionMetricTagSlice) > 0 { + obj.patternFlowGreVersionMetricTagSlice = []PatternFlowGreVersionMetricTag{} + } + return obj +} +func (obj *patternFlowGreVersionPatternFlowGreVersionMetricTagIter) appendHolderSlice(item PatternFlowGreVersionMetricTag) PatternFlowGreVersionPatternFlowGreVersionMetricTagIter { + obj.patternFlowGreVersionMetricTagSlice = append(obj.patternFlowGreVersionMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGreVersion) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreVersion.Value <= 7 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGreVersion.Values <= 7 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGreVersionMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGreVersion) setDefault() { + var choices_set int = 0 + var choice PatternFlowGreVersionChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGreVersionChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGreVersionChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGreVersionChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGreVersionChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGreVersionChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGreVersion") + } + } else { + intVal := otg.PatternFlowGreVersion_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGreVersion_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gre_version_counter.go b/gosnappi/pattern_flow_gre_version_counter.go new file mode 100644 index 00000000..980ee42a --- /dev/null +++ b/gosnappi/pattern_flow_gre_version_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreVersionCounter ***** +type patternFlowGreVersionCounter struct { + validation + obj *otg.PatternFlowGreVersionCounter + marshaller marshalPatternFlowGreVersionCounter + unMarshaller unMarshalPatternFlowGreVersionCounter +} + +func NewPatternFlowGreVersionCounter() PatternFlowGreVersionCounter { + obj := patternFlowGreVersionCounter{obj: &otg.PatternFlowGreVersionCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreVersionCounter) msg() *otg.PatternFlowGreVersionCounter { + return obj.obj +} + +func (obj *patternFlowGreVersionCounter) setMsg(msg *otg.PatternFlowGreVersionCounter) PatternFlowGreVersionCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreVersionCounter struct { + obj *patternFlowGreVersionCounter +} + +type marshalPatternFlowGreVersionCounter interface { + // ToProto marshals PatternFlowGreVersionCounter to protobuf object *otg.PatternFlowGreVersionCounter + ToProto() (*otg.PatternFlowGreVersionCounter, error) + // ToPbText marshals PatternFlowGreVersionCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreVersionCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreVersionCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreVersionCounter struct { + obj *patternFlowGreVersionCounter +} + +type unMarshalPatternFlowGreVersionCounter interface { + // FromProto unmarshals PatternFlowGreVersionCounter from protobuf object *otg.PatternFlowGreVersionCounter + FromProto(msg *otg.PatternFlowGreVersionCounter) (PatternFlowGreVersionCounter, error) + // FromPbText unmarshals PatternFlowGreVersionCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreVersionCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreVersionCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreVersionCounter) Marshal() marshalPatternFlowGreVersionCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreVersionCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreVersionCounter) Unmarshal() unMarshalPatternFlowGreVersionCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreVersionCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreVersionCounter) ToProto() (*otg.PatternFlowGreVersionCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreVersionCounter) FromProto(msg *otg.PatternFlowGreVersionCounter) (PatternFlowGreVersionCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreVersionCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreVersionCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreVersionCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreVersionCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreVersionCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreVersionCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreVersionCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreVersionCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreVersionCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreVersionCounter) Clone() (PatternFlowGreVersionCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreVersionCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGreVersionCounter is integer counter pattern +type PatternFlowGreVersionCounter interface { + Validation + // msg marshals PatternFlowGreVersionCounter to protobuf object *otg.PatternFlowGreVersionCounter + // and doesn't set defaults + msg() *otg.PatternFlowGreVersionCounter + // setMsg unmarshals PatternFlowGreVersionCounter from protobuf object *otg.PatternFlowGreVersionCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGreVersionCounter) PatternFlowGreVersionCounter + // provides marshal interface + Marshal() marshalPatternFlowGreVersionCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreVersionCounter + // validate validates PatternFlowGreVersionCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreVersionCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGreVersionCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGreVersionCounter + SetStart(value uint32) PatternFlowGreVersionCounter + // HasStart checks if Start has been set in PatternFlowGreVersionCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGreVersionCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGreVersionCounter + SetStep(value uint32) PatternFlowGreVersionCounter + // HasStep checks if Step has been set in PatternFlowGreVersionCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGreVersionCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGreVersionCounter + SetCount(value uint32) PatternFlowGreVersionCounter + // HasCount checks if Count has been set in PatternFlowGreVersionCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGreVersionCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGreVersionCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGreVersionCounter object +func (obj *patternFlowGreVersionCounter) SetStart(value uint32) PatternFlowGreVersionCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGreVersionCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGreVersionCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGreVersionCounter object +func (obj *patternFlowGreVersionCounter) SetStep(value uint32) PatternFlowGreVersionCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGreVersionCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGreVersionCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGreVersionCounter object +func (obj *patternFlowGreVersionCounter) SetCount(value uint32) PatternFlowGreVersionCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGreVersionCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreVersionCounter.Start <= 7 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreVersionCounter.Step <= 7 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreVersionCounter.Count <= 7 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGreVersionCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gre_version_metric_tag.go b/gosnappi/pattern_flow_gre_version_metric_tag.go new file mode 100644 index 00000000..350e4218 --- /dev/null +++ b/gosnappi/pattern_flow_gre_version_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGreVersionMetricTag ***** +type patternFlowGreVersionMetricTag struct { + validation + obj *otg.PatternFlowGreVersionMetricTag + marshaller marshalPatternFlowGreVersionMetricTag + unMarshaller unMarshalPatternFlowGreVersionMetricTag +} + +func NewPatternFlowGreVersionMetricTag() PatternFlowGreVersionMetricTag { + obj := patternFlowGreVersionMetricTag{obj: &otg.PatternFlowGreVersionMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGreVersionMetricTag) msg() *otg.PatternFlowGreVersionMetricTag { + return obj.obj +} + +func (obj *patternFlowGreVersionMetricTag) setMsg(msg *otg.PatternFlowGreVersionMetricTag) PatternFlowGreVersionMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGreVersionMetricTag struct { + obj *patternFlowGreVersionMetricTag +} + +type marshalPatternFlowGreVersionMetricTag interface { + // ToProto marshals PatternFlowGreVersionMetricTag to protobuf object *otg.PatternFlowGreVersionMetricTag + ToProto() (*otg.PatternFlowGreVersionMetricTag, error) + // ToPbText marshals PatternFlowGreVersionMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGreVersionMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGreVersionMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGreVersionMetricTag struct { + obj *patternFlowGreVersionMetricTag +} + +type unMarshalPatternFlowGreVersionMetricTag interface { + // FromProto unmarshals PatternFlowGreVersionMetricTag from protobuf object *otg.PatternFlowGreVersionMetricTag + FromProto(msg *otg.PatternFlowGreVersionMetricTag) (PatternFlowGreVersionMetricTag, error) + // FromPbText unmarshals PatternFlowGreVersionMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGreVersionMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGreVersionMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGreVersionMetricTag) Marshal() marshalPatternFlowGreVersionMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGreVersionMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGreVersionMetricTag) Unmarshal() unMarshalPatternFlowGreVersionMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGreVersionMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGreVersionMetricTag) ToProto() (*otg.PatternFlowGreVersionMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGreVersionMetricTag) FromProto(msg *otg.PatternFlowGreVersionMetricTag) (PatternFlowGreVersionMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGreVersionMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGreVersionMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGreVersionMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreVersionMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGreVersionMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGreVersionMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGreVersionMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGreVersionMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGreVersionMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGreVersionMetricTag) Clone() (PatternFlowGreVersionMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGreVersionMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGreVersionMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGreVersionMetricTag interface { + Validation + // msg marshals PatternFlowGreVersionMetricTag to protobuf object *otg.PatternFlowGreVersionMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGreVersionMetricTag + // setMsg unmarshals PatternFlowGreVersionMetricTag from protobuf object *otg.PatternFlowGreVersionMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGreVersionMetricTag) PatternFlowGreVersionMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGreVersionMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGreVersionMetricTag + // validate validates PatternFlowGreVersionMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGreVersionMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGreVersionMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGreVersionMetricTag + SetName(value string) PatternFlowGreVersionMetricTag + // Offset returns uint32, set in PatternFlowGreVersionMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGreVersionMetricTag + SetOffset(value uint32) PatternFlowGreVersionMetricTag + // HasOffset checks if Offset has been set in PatternFlowGreVersionMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGreVersionMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGreVersionMetricTag + SetLength(value uint32) PatternFlowGreVersionMetricTag + // HasLength checks if Length has been set in PatternFlowGreVersionMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGreVersionMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGreVersionMetricTag object +func (obj *patternFlowGreVersionMetricTag) SetName(value string) PatternFlowGreVersionMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGreVersionMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGreVersionMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGreVersionMetricTag object +func (obj *patternFlowGreVersionMetricTag) SetOffset(value uint32) PatternFlowGreVersionMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGreVersionMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGreVersionMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGreVersionMetricTag object +func (obj *patternFlowGreVersionMetricTag) SetLength(value uint32) PatternFlowGreVersionMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGreVersionMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGreVersionMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 2 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGreVersionMetricTag.Offset <= 2 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGreVersionMetricTag.Length <= 3 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGreVersionMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(3) + } + +} diff --git a/gosnappi/pattern_flow_gtp_extension_contents.go b/gosnappi/pattern_flow_gtp_extension_contents.go new file mode 100644 index 00000000..426d4d04 --- /dev/null +++ b/gosnappi/pattern_flow_gtp_extension_contents.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpExtensionContents ***** +type patternFlowGtpExtensionContents struct { + validation + obj *otg.PatternFlowGtpExtensionContents + marshaller marshalPatternFlowGtpExtensionContents + unMarshaller unMarshalPatternFlowGtpExtensionContents + incrementHolder PatternFlowGtpExtensionContentsCounter + decrementHolder PatternFlowGtpExtensionContentsCounter + metricTagsHolder PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter +} + +func NewPatternFlowGtpExtensionContents() PatternFlowGtpExtensionContents { + obj := patternFlowGtpExtensionContents{obj: &otg.PatternFlowGtpExtensionContents{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpExtensionContents) msg() *otg.PatternFlowGtpExtensionContents { + return obj.obj +} + +func (obj *patternFlowGtpExtensionContents) setMsg(msg *otg.PatternFlowGtpExtensionContents) PatternFlowGtpExtensionContents { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpExtensionContents struct { + obj *patternFlowGtpExtensionContents +} + +type marshalPatternFlowGtpExtensionContents interface { + // ToProto marshals PatternFlowGtpExtensionContents to protobuf object *otg.PatternFlowGtpExtensionContents + ToProto() (*otg.PatternFlowGtpExtensionContents, error) + // ToPbText marshals PatternFlowGtpExtensionContents to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpExtensionContents to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpExtensionContents to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpExtensionContents struct { + obj *patternFlowGtpExtensionContents +} + +type unMarshalPatternFlowGtpExtensionContents interface { + // FromProto unmarshals PatternFlowGtpExtensionContents from protobuf object *otg.PatternFlowGtpExtensionContents + FromProto(msg *otg.PatternFlowGtpExtensionContents) (PatternFlowGtpExtensionContents, error) + // FromPbText unmarshals PatternFlowGtpExtensionContents from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpExtensionContents from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpExtensionContents from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpExtensionContents) Marshal() marshalPatternFlowGtpExtensionContents { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpExtensionContents{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpExtensionContents) Unmarshal() unMarshalPatternFlowGtpExtensionContents { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpExtensionContents{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpExtensionContents) ToProto() (*otg.PatternFlowGtpExtensionContents, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpExtensionContents) FromProto(msg *otg.PatternFlowGtpExtensionContents) (PatternFlowGtpExtensionContents, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpExtensionContents) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpExtensionContents) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpExtensionContents) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionContents) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpExtensionContents) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionContents) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpExtensionContents) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionContents) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionContents) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpExtensionContents) Clone() (PatternFlowGtpExtensionContents, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpExtensionContents() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpExtensionContents) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpExtensionContents is the extension header contents +type PatternFlowGtpExtensionContents interface { + Validation + // msg marshals PatternFlowGtpExtensionContents to protobuf object *otg.PatternFlowGtpExtensionContents + // and doesn't set defaults + msg() *otg.PatternFlowGtpExtensionContents + // setMsg unmarshals PatternFlowGtpExtensionContents from protobuf object *otg.PatternFlowGtpExtensionContents + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpExtensionContents) PatternFlowGtpExtensionContents + // provides marshal interface + Marshal() marshalPatternFlowGtpExtensionContents + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpExtensionContents + // validate validates PatternFlowGtpExtensionContents + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpExtensionContents, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpExtensionContentsChoiceEnum, set in PatternFlowGtpExtensionContents + Choice() PatternFlowGtpExtensionContentsChoiceEnum + // setChoice assigns PatternFlowGtpExtensionContentsChoiceEnum provided by user to PatternFlowGtpExtensionContents + setChoice(value PatternFlowGtpExtensionContentsChoiceEnum) PatternFlowGtpExtensionContents + // HasChoice checks if Choice has been set in PatternFlowGtpExtensionContents + HasChoice() bool + // Value returns uint64, set in PatternFlowGtpExtensionContents. + Value() uint64 + // SetValue assigns uint64 provided by user to PatternFlowGtpExtensionContents + SetValue(value uint64) PatternFlowGtpExtensionContents + // HasValue checks if Value has been set in PatternFlowGtpExtensionContents + HasValue() bool + // Values returns []uint64, set in PatternFlowGtpExtensionContents. + Values() []uint64 + // SetValues assigns []uint64 provided by user to PatternFlowGtpExtensionContents + SetValues(value []uint64) PatternFlowGtpExtensionContents + // Increment returns PatternFlowGtpExtensionContentsCounter, set in PatternFlowGtpExtensionContents. + // PatternFlowGtpExtensionContentsCounter is integer counter pattern + Increment() PatternFlowGtpExtensionContentsCounter + // SetIncrement assigns PatternFlowGtpExtensionContentsCounter provided by user to PatternFlowGtpExtensionContents. + // PatternFlowGtpExtensionContentsCounter is integer counter pattern + SetIncrement(value PatternFlowGtpExtensionContentsCounter) PatternFlowGtpExtensionContents + // HasIncrement checks if Increment has been set in PatternFlowGtpExtensionContents + HasIncrement() bool + // Decrement returns PatternFlowGtpExtensionContentsCounter, set in PatternFlowGtpExtensionContents. + // PatternFlowGtpExtensionContentsCounter is integer counter pattern + Decrement() PatternFlowGtpExtensionContentsCounter + // SetDecrement assigns PatternFlowGtpExtensionContentsCounter provided by user to PatternFlowGtpExtensionContents. + // PatternFlowGtpExtensionContentsCounter is integer counter pattern + SetDecrement(value PatternFlowGtpExtensionContentsCounter) PatternFlowGtpExtensionContents + // HasDecrement checks if Decrement has been set in PatternFlowGtpExtensionContents + HasDecrement() bool + // MetricTags returns PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIterIter, set in PatternFlowGtpExtensionContents + MetricTags() PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter + setNil() +} + +type PatternFlowGtpExtensionContentsChoiceEnum string + +// Enum of Choice on PatternFlowGtpExtensionContents +var PatternFlowGtpExtensionContentsChoice = struct { + VALUE PatternFlowGtpExtensionContentsChoiceEnum + VALUES PatternFlowGtpExtensionContentsChoiceEnum + INCREMENT PatternFlowGtpExtensionContentsChoiceEnum + DECREMENT PatternFlowGtpExtensionContentsChoiceEnum +}{ + VALUE: PatternFlowGtpExtensionContentsChoiceEnum("value"), + VALUES: PatternFlowGtpExtensionContentsChoiceEnum("values"), + INCREMENT: PatternFlowGtpExtensionContentsChoiceEnum("increment"), + DECREMENT: PatternFlowGtpExtensionContentsChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpExtensionContents) Choice() PatternFlowGtpExtensionContentsChoiceEnum { + return PatternFlowGtpExtensionContentsChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpExtensionContents) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpExtensionContents) setChoice(value PatternFlowGtpExtensionContentsChoiceEnum) PatternFlowGtpExtensionContents { + intValue, ok := otg.PatternFlowGtpExtensionContents_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpExtensionContentsChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpExtensionContents_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpExtensionContentsChoice.VALUE { + defaultValue := uint64(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpExtensionContentsChoice.VALUES { + defaultValue := []uint64{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpExtensionContentsChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpExtensionContentsCounter().msg() + } + + if value == PatternFlowGtpExtensionContentsChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpExtensionContentsCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint64 +func (obj *patternFlowGtpExtensionContents) Value() uint64 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpExtensionContentsChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint64 +func (obj *patternFlowGtpExtensionContents) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint64 value in the PatternFlowGtpExtensionContents object +func (obj *patternFlowGtpExtensionContents) SetValue(value uint64) PatternFlowGtpExtensionContents { + obj.setChoice(PatternFlowGtpExtensionContentsChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint64 +func (obj *patternFlowGtpExtensionContents) Values() []uint64 { + if obj.obj.Values == nil { + obj.SetValues([]uint64{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint64 value in the PatternFlowGtpExtensionContents object +func (obj *patternFlowGtpExtensionContents) SetValues(value []uint64) PatternFlowGtpExtensionContents { + obj.setChoice(PatternFlowGtpExtensionContentsChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint64, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpExtensionContentsCounter +func (obj *patternFlowGtpExtensionContents) Increment() PatternFlowGtpExtensionContentsCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpExtensionContentsChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpExtensionContentsCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpExtensionContentsCounter +func (obj *patternFlowGtpExtensionContents) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpExtensionContentsCounter value in the PatternFlowGtpExtensionContents object +func (obj *patternFlowGtpExtensionContents) SetIncrement(value PatternFlowGtpExtensionContentsCounter) PatternFlowGtpExtensionContents { + obj.setChoice(PatternFlowGtpExtensionContentsChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpExtensionContentsCounter +func (obj *patternFlowGtpExtensionContents) Decrement() PatternFlowGtpExtensionContentsCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpExtensionContentsChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpExtensionContentsCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpExtensionContentsCounter +func (obj *patternFlowGtpExtensionContents) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpExtensionContentsCounter value in the PatternFlowGtpExtensionContents object +func (obj *patternFlowGtpExtensionContents) SetDecrement(value PatternFlowGtpExtensionContentsCounter) PatternFlowGtpExtensionContents { + obj.setChoice(PatternFlowGtpExtensionContentsChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpExtensionContentsMetricTag +func (obj *patternFlowGtpExtensionContents) MetricTags() PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpExtensionContentsMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter struct { + obj *patternFlowGtpExtensionContents + patternFlowGtpExtensionContentsMetricTagSlice []PatternFlowGtpExtensionContentsMetricTag + fieldPtr *[]*otg.PatternFlowGtpExtensionContentsMetricTag +} + +func newPatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter(ptr *[]*otg.PatternFlowGtpExtensionContentsMetricTag) PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter { + return &patternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter interface { + setMsg(*patternFlowGtpExtensionContents) PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter + Items() []PatternFlowGtpExtensionContentsMetricTag + Add() PatternFlowGtpExtensionContentsMetricTag + Append(items ...PatternFlowGtpExtensionContentsMetricTag) PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter + Set(index int, newObj PatternFlowGtpExtensionContentsMetricTag) PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter + Clear() PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter + clearHolderSlice() PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter + appendHolderSlice(item PatternFlowGtpExtensionContentsMetricTag) PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter +} + +func (obj *patternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter) setMsg(msg *patternFlowGtpExtensionContents) PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpExtensionContentsMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter) Items() []PatternFlowGtpExtensionContentsMetricTag { + return obj.patternFlowGtpExtensionContentsMetricTagSlice +} + +func (obj *patternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter) Add() PatternFlowGtpExtensionContentsMetricTag { + newObj := &otg.PatternFlowGtpExtensionContentsMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpExtensionContentsMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpExtensionContentsMetricTagSlice = append(obj.patternFlowGtpExtensionContentsMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter) Append(items ...PatternFlowGtpExtensionContentsMetricTag) PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpExtensionContentsMetricTagSlice = append(obj.patternFlowGtpExtensionContentsMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter) Set(index int, newObj PatternFlowGtpExtensionContentsMetricTag) PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpExtensionContentsMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter) Clear() PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpExtensionContentsMetricTag{} + obj.patternFlowGtpExtensionContentsMetricTagSlice = []PatternFlowGtpExtensionContentsMetricTag{} + } + return obj +} +func (obj *patternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter) clearHolderSlice() PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter { + if len(obj.patternFlowGtpExtensionContentsMetricTagSlice) > 0 { + obj.patternFlowGtpExtensionContentsMetricTagSlice = []PatternFlowGtpExtensionContentsMetricTag{} + } + return obj +} +func (obj *patternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter) appendHolderSlice(item PatternFlowGtpExtensionContentsMetricTag) PatternFlowGtpExtensionContentsPatternFlowGtpExtensionContentsMetricTagIter { + obj.patternFlowGtpExtensionContentsMetricTagSlice = append(obj.patternFlowGtpExtensionContentsMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpExtensionContents) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 281474976710655 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionContents.Value <= 281474976710655 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 281474976710655 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint64) <= PatternFlowGtpExtensionContents.Values <= 281474976710655 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpExtensionContentsMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpExtensionContents) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpExtensionContentsChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpExtensionContentsChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpExtensionContentsChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpExtensionContentsChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpExtensionContentsChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpExtensionContentsChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpExtensionContents") + } + } else { + intVal := otg.PatternFlowGtpExtensionContents_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpExtensionContents_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtp_extension_contents_counter.go b/gosnappi/pattern_flow_gtp_extension_contents_counter.go new file mode 100644 index 00000000..fda6182f --- /dev/null +++ b/gosnappi/pattern_flow_gtp_extension_contents_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpExtensionContentsCounter ***** +type patternFlowGtpExtensionContentsCounter struct { + validation + obj *otg.PatternFlowGtpExtensionContentsCounter + marshaller marshalPatternFlowGtpExtensionContentsCounter + unMarshaller unMarshalPatternFlowGtpExtensionContentsCounter +} + +func NewPatternFlowGtpExtensionContentsCounter() PatternFlowGtpExtensionContentsCounter { + obj := patternFlowGtpExtensionContentsCounter{obj: &otg.PatternFlowGtpExtensionContentsCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpExtensionContentsCounter) msg() *otg.PatternFlowGtpExtensionContentsCounter { + return obj.obj +} + +func (obj *patternFlowGtpExtensionContentsCounter) setMsg(msg *otg.PatternFlowGtpExtensionContentsCounter) PatternFlowGtpExtensionContentsCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpExtensionContentsCounter struct { + obj *patternFlowGtpExtensionContentsCounter +} + +type marshalPatternFlowGtpExtensionContentsCounter interface { + // ToProto marshals PatternFlowGtpExtensionContentsCounter to protobuf object *otg.PatternFlowGtpExtensionContentsCounter + ToProto() (*otg.PatternFlowGtpExtensionContentsCounter, error) + // ToPbText marshals PatternFlowGtpExtensionContentsCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpExtensionContentsCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpExtensionContentsCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpExtensionContentsCounter struct { + obj *patternFlowGtpExtensionContentsCounter +} + +type unMarshalPatternFlowGtpExtensionContentsCounter interface { + // FromProto unmarshals PatternFlowGtpExtensionContentsCounter from protobuf object *otg.PatternFlowGtpExtensionContentsCounter + FromProto(msg *otg.PatternFlowGtpExtensionContentsCounter) (PatternFlowGtpExtensionContentsCounter, error) + // FromPbText unmarshals PatternFlowGtpExtensionContentsCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpExtensionContentsCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpExtensionContentsCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpExtensionContentsCounter) Marshal() marshalPatternFlowGtpExtensionContentsCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpExtensionContentsCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpExtensionContentsCounter) Unmarshal() unMarshalPatternFlowGtpExtensionContentsCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpExtensionContentsCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpExtensionContentsCounter) ToProto() (*otg.PatternFlowGtpExtensionContentsCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpExtensionContentsCounter) FromProto(msg *otg.PatternFlowGtpExtensionContentsCounter) (PatternFlowGtpExtensionContentsCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpExtensionContentsCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpExtensionContentsCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpExtensionContentsCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionContentsCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpExtensionContentsCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionContentsCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpExtensionContentsCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionContentsCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionContentsCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpExtensionContentsCounter) Clone() (PatternFlowGtpExtensionContentsCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpExtensionContentsCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpExtensionContentsCounter is integer counter pattern +type PatternFlowGtpExtensionContentsCounter interface { + Validation + // msg marshals PatternFlowGtpExtensionContentsCounter to protobuf object *otg.PatternFlowGtpExtensionContentsCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpExtensionContentsCounter + // setMsg unmarshals PatternFlowGtpExtensionContentsCounter from protobuf object *otg.PatternFlowGtpExtensionContentsCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpExtensionContentsCounter) PatternFlowGtpExtensionContentsCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpExtensionContentsCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpExtensionContentsCounter + // validate validates PatternFlowGtpExtensionContentsCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpExtensionContentsCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint64, set in PatternFlowGtpExtensionContentsCounter. + Start() uint64 + // SetStart assigns uint64 provided by user to PatternFlowGtpExtensionContentsCounter + SetStart(value uint64) PatternFlowGtpExtensionContentsCounter + // HasStart checks if Start has been set in PatternFlowGtpExtensionContentsCounter + HasStart() bool + // Step returns uint64, set in PatternFlowGtpExtensionContentsCounter. + Step() uint64 + // SetStep assigns uint64 provided by user to PatternFlowGtpExtensionContentsCounter + SetStep(value uint64) PatternFlowGtpExtensionContentsCounter + // HasStep checks if Step has been set in PatternFlowGtpExtensionContentsCounter + HasStep() bool + // Count returns uint64, set in PatternFlowGtpExtensionContentsCounter. + Count() uint64 + // SetCount assigns uint64 provided by user to PatternFlowGtpExtensionContentsCounter + SetCount(value uint64) PatternFlowGtpExtensionContentsCounter + // HasCount checks if Count has been set in PatternFlowGtpExtensionContentsCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint64 +func (obj *patternFlowGtpExtensionContentsCounter) Start() uint64 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint64 +func (obj *patternFlowGtpExtensionContentsCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint64 value in the PatternFlowGtpExtensionContentsCounter object +func (obj *patternFlowGtpExtensionContentsCounter) SetStart(value uint64) PatternFlowGtpExtensionContentsCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint64 +func (obj *patternFlowGtpExtensionContentsCounter) Step() uint64 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint64 +func (obj *patternFlowGtpExtensionContentsCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint64 value in the PatternFlowGtpExtensionContentsCounter object +func (obj *patternFlowGtpExtensionContentsCounter) SetStep(value uint64) PatternFlowGtpExtensionContentsCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint64 +func (obj *patternFlowGtpExtensionContentsCounter) Count() uint64 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint64 +func (obj *patternFlowGtpExtensionContentsCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint64 value in the PatternFlowGtpExtensionContentsCounter object +func (obj *patternFlowGtpExtensionContentsCounter) SetCount(value uint64) PatternFlowGtpExtensionContentsCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpExtensionContentsCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 281474976710655 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionContentsCounter.Start <= 281474976710655 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 281474976710655 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionContentsCounter.Step <= 281474976710655 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 281474976710655 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionContentsCounter.Count <= 281474976710655 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpExtensionContentsCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtp_extension_contents_metric_tag.go b/gosnappi/pattern_flow_gtp_extension_contents_metric_tag.go new file mode 100644 index 00000000..3956f7a9 --- /dev/null +++ b/gosnappi/pattern_flow_gtp_extension_contents_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpExtensionContentsMetricTag ***** +type patternFlowGtpExtensionContentsMetricTag struct { + validation + obj *otg.PatternFlowGtpExtensionContentsMetricTag + marshaller marshalPatternFlowGtpExtensionContentsMetricTag + unMarshaller unMarshalPatternFlowGtpExtensionContentsMetricTag +} + +func NewPatternFlowGtpExtensionContentsMetricTag() PatternFlowGtpExtensionContentsMetricTag { + obj := patternFlowGtpExtensionContentsMetricTag{obj: &otg.PatternFlowGtpExtensionContentsMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpExtensionContentsMetricTag) msg() *otg.PatternFlowGtpExtensionContentsMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpExtensionContentsMetricTag) setMsg(msg *otg.PatternFlowGtpExtensionContentsMetricTag) PatternFlowGtpExtensionContentsMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpExtensionContentsMetricTag struct { + obj *patternFlowGtpExtensionContentsMetricTag +} + +type marshalPatternFlowGtpExtensionContentsMetricTag interface { + // ToProto marshals PatternFlowGtpExtensionContentsMetricTag to protobuf object *otg.PatternFlowGtpExtensionContentsMetricTag + ToProto() (*otg.PatternFlowGtpExtensionContentsMetricTag, error) + // ToPbText marshals PatternFlowGtpExtensionContentsMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpExtensionContentsMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpExtensionContentsMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpExtensionContentsMetricTag struct { + obj *patternFlowGtpExtensionContentsMetricTag +} + +type unMarshalPatternFlowGtpExtensionContentsMetricTag interface { + // FromProto unmarshals PatternFlowGtpExtensionContentsMetricTag from protobuf object *otg.PatternFlowGtpExtensionContentsMetricTag + FromProto(msg *otg.PatternFlowGtpExtensionContentsMetricTag) (PatternFlowGtpExtensionContentsMetricTag, error) + // FromPbText unmarshals PatternFlowGtpExtensionContentsMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpExtensionContentsMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpExtensionContentsMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpExtensionContentsMetricTag) Marshal() marshalPatternFlowGtpExtensionContentsMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpExtensionContentsMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpExtensionContentsMetricTag) Unmarshal() unMarshalPatternFlowGtpExtensionContentsMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpExtensionContentsMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpExtensionContentsMetricTag) ToProto() (*otg.PatternFlowGtpExtensionContentsMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpExtensionContentsMetricTag) FromProto(msg *otg.PatternFlowGtpExtensionContentsMetricTag) (PatternFlowGtpExtensionContentsMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpExtensionContentsMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpExtensionContentsMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpExtensionContentsMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionContentsMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpExtensionContentsMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionContentsMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpExtensionContentsMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionContentsMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionContentsMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpExtensionContentsMetricTag) Clone() (PatternFlowGtpExtensionContentsMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpExtensionContentsMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpExtensionContentsMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpExtensionContentsMetricTag interface { + Validation + // msg marshals PatternFlowGtpExtensionContentsMetricTag to protobuf object *otg.PatternFlowGtpExtensionContentsMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpExtensionContentsMetricTag + // setMsg unmarshals PatternFlowGtpExtensionContentsMetricTag from protobuf object *otg.PatternFlowGtpExtensionContentsMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpExtensionContentsMetricTag) PatternFlowGtpExtensionContentsMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpExtensionContentsMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpExtensionContentsMetricTag + // validate validates PatternFlowGtpExtensionContentsMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpExtensionContentsMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpExtensionContentsMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpExtensionContentsMetricTag + SetName(value string) PatternFlowGtpExtensionContentsMetricTag + // Offset returns uint64, set in PatternFlowGtpExtensionContentsMetricTag. + Offset() uint64 + // SetOffset assigns uint64 provided by user to PatternFlowGtpExtensionContentsMetricTag + SetOffset(value uint64) PatternFlowGtpExtensionContentsMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpExtensionContentsMetricTag + HasOffset() bool + // Length returns uint64, set in PatternFlowGtpExtensionContentsMetricTag. + Length() uint64 + // SetLength assigns uint64 provided by user to PatternFlowGtpExtensionContentsMetricTag + SetLength(value uint64) PatternFlowGtpExtensionContentsMetricTag + // HasLength checks if Length has been set in PatternFlowGtpExtensionContentsMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpExtensionContentsMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpExtensionContentsMetricTag object +func (obj *patternFlowGtpExtensionContentsMetricTag) SetName(value string) PatternFlowGtpExtensionContentsMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint64 +func (obj *patternFlowGtpExtensionContentsMetricTag) Offset() uint64 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint64 +func (obj *patternFlowGtpExtensionContentsMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint64 value in the PatternFlowGtpExtensionContentsMetricTag object +func (obj *patternFlowGtpExtensionContentsMetricTag) SetOffset(value uint64) PatternFlowGtpExtensionContentsMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint64 +func (obj *patternFlowGtpExtensionContentsMetricTag) Length() uint64 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint64 +func (obj *patternFlowGtpExtensionContentsMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint64 value in the PatternFlowGtpExtensionContentsMetricTag object +func (obj *patternFlowGtpExtensionContentsMetricTag) SetLength(value uint64) PatternFlowGtpExtensionContentsMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpExtensionContentsMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpExtensionContentsMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 47 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionContentsMetricTag.Offset <= 47 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 48 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpExtensionContentsMetricTag.Length <= 48 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpExtensionContentsMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(48) + } + +} diff --git a/gosnappi/pattern_flow_gtp_extension_extension_length.go b/gosnappi/pattern_flow_gtp_extension_extension_length.go new file mode 100644 index 00000000..e160bada --- /dev/null +++ b/gosnappi/pattern_flow_gtp_extension_extension_length.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpExtensionExtensionLength ***** +type patternFlowGtpExtensionExtensionLength struct { + validation + obj *otg.PatternFlowGtpExtensionExtensionLength + marshaller marshalPatternFlowGtpExtensionExtensionLength + unMarshaller unMarshalPatternFlowGtpExtensionExtensionLength + incrementHolder PatternFlowGtpExtensionExtensionLengthCounter + decrementHolder PatternFlowGtpExtensionExtensionLengthCounter + metricTagsHolder PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter +} + +func NewPatternFlowGtpExtensionExtensionLength() PatternFlowGtpExtensionExtensionLength { + obj := patternFlowGtpExtensionExtensionLength{obj: &otg.PatternFlowGtpExtensionExtensionLength{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpExtensionExtensionLength) msg() *otg.PatternFlowGtpExtensionExtensionLength { + return obj.obj +} + +func (obj *patternFlowGtpExtensionExtensionLength) setMsg(msg *otg.PatternFlowGtpExtensionExtensionLength) PatternFlowGtpExtensionExtensionLength { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpExtensionExtensionLength struct { + obj *patternFlowGtpExtensionExtensionLength +} + +type marshalPatternFlowGtpExtensionExtensionLength interface { + // ToProto marshals PatternFlowGtpExtensionExtensionLength to protobuf object *otg.PatternFlowGtpExtensionExtensionLength + ToProto() (*otg.PatternFlowGtpExtensionExtensionLength, error) + // ToPbText marshals PatternFlowGtpExtensionExtensionLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpExtensionExtensionLength to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpExtensionExtensionLength to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpExtensionExtensionLength struct { + obj *patternFlowGtpExtensionExtensionLength +} + +type unMarshalPatternFlowGtpExtensionExtensionLength interface { + // FromProto unmarshals PatternFlowGtpExtensionExtensionLength from protobuf object *otg.PatternFlowGtpExtensionExtensionLength + FromProto(msg *otg.PatternFlowGtpExtensionExtensionLength) (PatternFlowGtpExtensionExtensionLength, error) + // FromPbText unmarshals PatternFlowGtpExtensionExtensionLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpExtensionExtensionLength from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpExtensionExtensionLength from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpExtensionExtensionLength) Marshal() marshalPatternFlowGtpExtensionExtensionLength { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpExtensionExtensionLength{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpExtensionExtensionLength) Unmarshal() unMarshalPatternFlowGtpExtensionExtensionLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpExtensionExtensionLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpExtensionExtensionLength) ToProto() (*otg.PatternFlowGtpExtensionExtensionLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpExtensionExtensionLength) FromProto(msg *otg.PatternFlowGtpExtensionExtensionLength) (PatternFlowGtpExtensionExtensionLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpExtensionExtensionLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpExtensionExtensionLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpExtensionExtensionLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionExtensionLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpExtensionExtensionLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionExtensionLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpExtensionExtensionLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionExtensionLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionExtensionLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpExtensionExtensionLength) Clone() (PatternFlowGtpExtensionExtensionLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpExtensionExtensionLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpExtensionExtensionLength) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpExtensionExtensionLength is this field states the length of this extension header, including the length, the contents, and the next extension header field, in 4-octet units, so the length of the extension must always be a multiple of 4. +type PatternFlowGtpExtensionExtensionLength interface { + Validation + // msg marshals PatternFlowGtpExtensionExtensionLength to protobuf object *otg.PatternFlowGtpExtensionExtensionLength + // and doesn't set defaults + msg() *otg.PatternFlowGtpExtensionExtensionLength + // setMsg unmarshals PatternFlowGtpExtensionExtensionLength from protobuf object *otg.PatternFlowGtpExtensionExtensionLength + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpExtensionExtensionLength) PatternFlowGtpExtensionExtensionLength + // provides marshal interface + Marshal() marshalPatternFlowGtpExtensionExtensionLength + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpExtensionExtensionLength + // validate validates PatternFlowGtpExtensionExtensionLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpExtensionExtensionLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpExtensionExtensionLengthChoiceEnum, set in PatternFlowGtpExtensionExtensionLength + Choice() PatternFlowGtpExtensionExtensionLengthChoiceEnum + // setChoice assigns PatternFlowGtpExtensionExtensionLengthChoiceEnum provided by user to PatternFlowGtpExtensionExtensionLength + setChoice(value PatternFlowGtpExtensionExtensionLengthChoiceEnum) PatternFlowGtpExtensionExtensionLength + // HasChoice checks if Choice has been set in PatternFlowGtpExtensionExtensionLength + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpExtensionExtensionLength. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpExtensionExtensionLength + SetValue(value uint32) PatternFlowGtpExtensionExtensionLength + // HasValue checks if Value has been set in PatternFlowGtpExtensionExtensionLength + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpExtensionExtensionLength. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpExtensionExtensionLength + SetValues(value []uint32) PatternFlowGtpExtensionExtensionLength + // Increment returns PatternFlowGtpExtensionExtensionLengthCounter, set in PatternFlowGtpExtensionExtensionLength. + // PatternFlowGtpExtensionExtensionLengthCounter is integer counter pattern + Increment() PatternFlowGtpExtensionExtensionLengthCounter + // SetIncrement assigns PatternFlowGtpExtensionExtensionLengthCounter provided by user to PatternFlowGtpExtensionExtensionLength. + // PatternFlowGtpExtensionExtensionLengthCounter is integer counter pattern + SetIncrement(value PatternFlowGtpExtensionExtensionLengthCounter) PatternFlowGtpExtensionExtensionLength + // HasIncrement checks if Increment has been set in PatternFlowGtpExtensionExtensionLength + HasIncrement() bool + // Decrement returns PatternFlowGtpExtensionExtensionLengthCounter, set in PatternFlowGtpExtensionExtensionLength. + // PatternFlowGtpExtensionExtensionLengthCounter is integer counter pattern + Decrement() PatternFlowGtpExtensionExtensionLengthCounter + // SetDecrement assigns PatternFlowGtpExtensionExtensionLengthCounter provided by user to PatternFlowGtpExtensionExtensionLength. + // PatternFlowGtpExtensionExtensionLengthCounter is integer counter pattern + SetDecrement(value PatternFlowGtpExtensionExtensionLengthCounter) PatternFlowGtpExtensionExtensionLength + // HasDecrement checks if Decrement has been set in PatternFlowGtpExtensionExtensionLength + HasDecrement() bool + // MetricTags returns PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIterIter, set in PatternFlowGtpExtensionExtensionLength + MetricTags() PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter + setNil() +} + +type PatternFlowGtpExtensionExtensionLengthChoiceEnum string + +// Enum of Choice on PatternFlowGtpExtensionExtensionLength +var PatternFlowGtpExtensionExtensionLengthChoice = struct { + VALUE PatternFlowGtpExtensionExtensionLengthChoiceEnum + VALUES PatternFlowGtpExtensionExtensionLengthChoiceEnum + INCREMENT PatternFlowGtpExtensionExtensionLengthChoiceEnum + DECREMENT PatternFlowGtpExtensionExtensionLengthChoiceEnum +}{ + VALUE: PatternFlowGtpExtensionExtensionLengthChoiceEnum("value"), + VALUES: PatternFlowGtpExtensionExtensionLengthChoiceEnum("values"), + INCREMENT: PatternFlowGtpExtensionExtensionLengthChoiceEnum("increment"), + DECREMENT: PatternFlowGtpExtensionExtensionLengthChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpExtensionExtensionLength) Choice() PatternFlowGtpExtensionExtensionLengthChoiceEnum { + return PatternFlowGtpExtensionExtensionLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpExtensionExtensionLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpExtensionExtensionLength) setChoice(value PatternFlowGtpExtensionExtensionLengthChoiceEnum) PatternFlowGtpExtensionExtensionLength { + intValue, ok := otg.PatternFlowGtpExtensionExtensionLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpExtensionExtensionLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpExtensionExtensionLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpExtensionExtensionLengthChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpExtensionExtensionLengthChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpExtensionExtensionLengthChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpExtensionExtensionLengthCounter().msg() + } + + if value == PatternFlowGtpExtensionExtensionLengthChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpExtensionExtensionLengthCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpExtensionExtensionLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpExtensionExtensionLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpExtensionExtensionLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpExtensionExtensionLength object +func (obj *patternFlowGtpExtensionExtensionLength) SetValue(value uint32) PatternFlowGtpExtensionExtensionLength { + obj.setChoice(PatternFlowGtpExtensionExtensionLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpExtensionExtensionLength) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpExtensionExtensionLength object +func (obj *patternFlowGtpExtensionExtensionLength) SetValues(value []uint32) PatternFlowGtpExtensionExtensionLength { + obj.setChoice(PatternFlowGtpExtensionExtensionLengthChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpExtensionExtensionLengthCounter +func (obj *patternFlowGtpExtensionExtensionLength) Increment() PatternFlowGtpExtensionExtensionLengthCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpExtensionExtensionLengthChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpExtensionExtensionLengthCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpExtensionExtensionLengthCounter +func (obj *patternFlowGtpExtensionExtensionLength) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpExtensionExtensionLengthCounter value in the PatternFlowGtpExtensionExtensionLength object +func (obj *patternFlowGtpExtensionExtensionLength) SetIncrement(value PatternFlowGtpExtensionExtensionLengthCounter) PatternFlowGtpExtensionExtensionLength { + obj.setChoice(PatternFlowGtpExtensionExtensionLengthChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpExtensionExtensionLengthCounter +func (obj *patternFlowGtpExtensionExtensionLength) Decrement() PatternFlowGtpExtensionExtensionLengthCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpExtensionExtensionLengthChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpExtensionExtensionLengthCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpExtensionExtensionLengthCounter +func (obj *patternFlowGtpExtensionExtensionLength) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpExtensionExtensionLengthCounter value in the PatternFlowGtpExtensionExtensionLength object +func (obj *patternFlowGtpExtensionExtensionLength) SetDecrement(value PatternFlowGtpExtensionExtensionLengthCounter) PatternFlowGtpExtensionExtensionLength { + obj.setChoice(PatternFlowGtpExtensionExtensionLengthChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpExtensionExtensionLengthMetricTag +func (obj *patternFlowGtpExtensionExtensionLength) MetricTags() PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpExtensionExtensionLengthMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter struct { + obj *patternFlowGtpExtensionExtensionLength + patternFlowGtpExtensionExtensionLengthMetricTagSlice []PatternFlowGtpExtensionExtensionLengthMetricTag + fieldPtr *[]*otg.PatternFlowGtpExtensionExtensionLengthMetricTag +} + +func newPatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter(ptr *[]*otg.PatternFlowGtpExtensionExtensionLengthMetricTag) PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter { + return &patternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter interface { + setMsg(*patternFlowGtpExtensionExtensionLength) PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter + Items() []PatternFlowGtpExtensionExtensionLengthMetricTag + Add() PatternFlowGtpExtensionExtensionLengthMetricTag + Append(items ...PatternFlowGtpExtensionExtensionLengthMetricTag) PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter + Set(index int, newObj PatternFlowGtpExtensionExtensionLengthMetricTag) PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter + Clear() PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter + clearHolderSlice() PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter + appendHolderSlice(item PatternFlowGtpExtensionExtensionLengthMetricTag) PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter +} + +func (obj *patternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter) setMsg(msg *patternFlowGtpExtensionExtensionLength) PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpExtensionExtensionLengthMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter) Items() []PatternFlowGtpExtensionExtensionLengthMetricTag { + return obj.patternFlowGtpExtensionExtensionLengthMetricTagSlice +} + +func (obj *patternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter) Add() PatternFlowGtpExtensionExtensionLengthMetricTag { + newObj := &otg.PatternFlowGtpExtensionExtensionLengthMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpExtensionExtensionLengthMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpExtensionExtensionLengthMetricTagSlice = append(obj.patternFlowGtpExtensionExtensionLengthMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter) Append(items ...PatternFlowGtpExtensionExtensionLengthMetricTag) PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpExtensionExtensionLengthMetricTagSlice = append(obj.patternFlowGtpExtensionExtensionLengthMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter) Set(index int, newObj PatternFlowGtpExtensionExtensionLengthMetricTag) PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpExtensionExtensionLengthMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter) Clear() PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpExtensionExtensionLengthMetricTag{} + obj.patternFlowGtpExtensionExtensionLengthMetricTagSlice = []PatternFlowGtpExtensionExtensionLengthMetricTag{} + } + return obj +} +func (obj *patternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter) clearHolderSlice() PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter { + if len(obj.patternFlowGtpExtensionExtensionLengthMetricTagSlice) > 0 { + obj.patternFlowGtpExtensionExtensionLengthMetricTagSlice = []PatternFlowGtpExtensionExtensionLengthMetricTag{} + } + return obj +} +func (obj *patternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter) appendHolderSlice(item PatternFlowGtpExtensionExtensionLengthMetricTag) PatternFlowGtpExtensionExtensionLengthPatternFlowGtpExtensionExtensionLengthMetricTagIter { + obj.patternFlowGtpExtensionExtensionLengthMetricTagSlice = append(obj.patternFlowGtpExtensionExtensionLengthMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpExtensionExtensionLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionExtensionLength.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpExtensionExtensionLength.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpExtensionExtensionLengthMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpExtensionExtensionLength) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpExtensionExtensionLengthChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpExtensionExtensionLengthChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpExtensionExtensionLengthChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpExtensionExtensionLengthChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpExtensionExtensionLengthChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpExtensionExtensionLengthChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpExtensionExtensionLength") + } + } else { + intVal := otg.PatternFlowGtpExtensionExtensionLength_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpExtensionExtensionLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtp_extension_extension_length_counter.go b/gosnappi/pattern_flow_gtp_extension_extension_length_counter.go new file mode 100644 index 00000000..6f4e8baa --- /dev/null +++ b/gosnappi/pattern_flow_gtp_extension_extension_length_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpExtensionExtensionLengthCounter ***** +type patternFlowGtpExtensionExtensionLengthCounter struct { + validation + obj *otg.PatternFlowGtpExtensionExtensionLengthCounter + marshaller marshalPatternFlowGtpExtensionExtensionLengthCounter + unMarshaller unMarshalPatternFlowGtpExtensionExtensionLengthCounter +} + +func NewPatternFlowGtpExtensionExtensionLengthCounter() PatternFlowGtpExtensionExtensionLengthCounter { + obj := patternFlowGtpExtensionExtensionLengthCounter{obj: &otg.PatternFlowGtpExtensionExtensionLengthCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpExtensionExtensionLengthCounter) msg() *otg.PatternFlowGtpExtensionExtensionLengthCounter { + return obj.obj +} + +func (obj *patternFlowGtpExtensionExtensionLengthCounter) setMsg(msg *otg.PatternFlowGtpExtensionExtensionLengthCounter) PatternFlowGtpExtensionExtensionLengthCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpExtensionExtensionLengthCounter struct { + obj *patternFlowGtpExtensionExtensionLengthCounter +} + +type marshalPatternFlowGtpExtensionExtensionLengthCounter interface { + // ToProto marshals PatternFlowGtpExtensionExtensionLengthCounter to protobuf object *otg.PatternFlowGtpExtensionExtensionLengthCounter + ToProto() (*otg.PatternFlowGtpExtensionExtensionLengthCounter, error) + // ToPbText marshals PatternFlowGtpExtensionExtensionLengthCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpExtensionExtensionLengthCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpExtensionExtensionLengthCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpExtensionExtensionLengthCounter struct { + obj *patternFlowGtpExtensionExtensionLengthCounter +} + +type unMarshalPatternFlowGtpExtensionExtensionLengthCounter interface { + // FromProto unmarshals PatternFlowGtpExtensionExtensionLengthCounter from protobuf object *otg.PatternFlowGtpExtensionExtensionLengthCounter + FromProto(msg *otg.PatternFlowGtpExtensionExtensionLengthCounter) (PatternFlowGtpExtensionExtensionLengthCounter, error) + // FromPbText unmarshals PatternFlowGtpExtensionExtensionLengthCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpExtensionExtensionLengthCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpExtensionExtensionLengthCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpExtensionExtensionLengthCounter) Marshal() marshalPatternFlowGtpExtensionExtensionLengthCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpExtensionExtensionLengthCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpExtensionExtensionLengthCounter) Unmarshal() unMarshalPatternFlowGtpExtensionExtensionLengthCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpExtensionExtensionLengthCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpExtensionExtensionLengthCounter) ToProto() (*otg.PatternFlowGtpExtensionExtensionLengthCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpExtensionExtensionLengthCounter) FromProto(msg *otg.PatternFlowGtpExtensionExtensionLengthCounter) (PatternFlowGtpExtensionExtensionLengthCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpExtensionExtensionLengthCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpExtensionExtensionLengthCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpExtensionExtensionLengthCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionExtensionLengthCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpExtensionExtensionLengthCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionExtensionLengthCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpExtensionExtensionLengthCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionExtensionLengthCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionExtensionLengthCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpExtensionExtensionLengthCounter) Clone() (PatternFlowGtpExtensionExtensionLengthCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpExtensionExtensionLengthCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpExtensionExtensionLengthCounter is integer counter pattern +type PatternFlowGtpExtensionExtensionLengthCounter interface { + Validation + // msg marshals PatternFlowGtpExtensionExtensionLengthCounter to protobuf object *otg.PatternFlowGtpExtensionExtensionLengthCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpExtensionExtensionLengthCounter + // setMsg unmarshals PatternFlowGtpExtensionExtensionLengthCounter from protobuf object *otg.PatternFlowGtpExtensionExtensionLengthCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpExtensionExtensionLengthCounter) PatternFlowGtpExtensionExtensionLengthCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpExtensionExtensionLengthCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpExtensionExtensionLengthCounter + // validate validates PatternFlowGtpExtensionExtensionLengthCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpExtensionExtensionLengthCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpExtensionExtensionLengthCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpExtensionExtensionLengthCounter + SetStart(value uint32) PatternFlowGtpExtensionExtensionLengthCounter + // HasStart checks if Start has been set in PatternFlowGtpExtensionExtensionLengthCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpExtensionExtensionLengthCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpExtensionExtensionLengthCounter + SetStep(value uint32) PatternFlowGtpExtensionExtensionLengthCounter + // HasStep checks if Step has been set in PatternFlowGtpExtensionExtensionLengthCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpExtensionExtensionLengthCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpExtensionExtensionLengthCounter + SetCount(value uint32) PatternFlowGtpExtensionExtensionLengthCounter + // HasCount checks if Count has been set in PatternFlowGtpExtensionExtensionLengthCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpExtensionExtensionLengthCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpExtensionExtensionLengthCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpExtensionExtensionLengthCounter object +func (obj *patternFlowGtpExtensionExtensionLengthCounter) SetStart(value uint32) PatternFlowGtpExtensionExtensionLengthCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpExtensionExtensionLengthCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpExtensionExtensionLengthCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpExtensionExtensionLengthCounter object +func (obj *patternFlowGtpExtensionExtensionLengthCounter) SetStep(value uint32) PatternFlowGtpExtensionExtensionLengthCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpExtensionExtensionLengthCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpExtensionExtensionLengthCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpExtensionExtensionLengthCounter object +func (obj *patternFlowGtpExtensionExtensionLengthCounter) SetCount(value uint32) PatternFlowGtpExtensionExtensionLengthCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpExtensionExtensionLengthCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionExtensionLengthCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionExtensionLengthCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionExtensionLengthCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpExtensionExtensionLengthCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtp_extension_extension_length_metric_tag.go b/gosnappi/pattern_flow_gtp_extension_extension_length_metric_tag.go new file mode 100644 index 00000000..ed05e991 --- /dev/null +++ b/gosnappi/pattern_flow_gtp_extension_extension_length_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpExtensionExtensionLengthMetricTag ***** +type patternFlowGtpExtensionExtensionLengthMetricTag struct { + validation + obj *otg.PatternFlowGtpExtensionExtensionLengthMetricTag + marshaller marshalPatternFlowGtpExtensionExtensionLengthMetricTag + unMarshaller unMarshalPatternFlowGtpExtensionExtensionLengthMetricTag +} + +func NewPatternFlowGtpExtensionExtensionLengthMetricTag() PatternFlowGtpExtensionExtensionLengthMetricTag { + obj := patternFlowGtpExtensionExtensionLengthMetricTag{obj: &otg.PatternFlowGtpExtensionExtensionLengthMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) msg() *otg.PatternFlowGtpExtensionExtensionLengthMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) setMsg(msg *otg.PatternFlowGtpExtensionExtensionLengthMetricTag) PatternFlowGtpExtensionExtensionLengthMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpExtensionExtensionLengthMetricTag struct { + obj *patternFlowGtpExtensionExtensionLengthMetricTag +} + +type marshalPatternFlowGtpExtensionExtensionLengthMetricTag interface { + // ToProto marshals PatternFlowGtpExtensionExtensionLengthMetricTag to protobuf object *otg.PatternFlowGtpExtensionExtensionLengthMetricTag + ToProto() (*otg.PatternFlowGtpExtensionExtensionLengthMetricTag, error) + // ToPbText marshals PatternFlowGtpExtensionExtensionLengthMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpExtensionExtensionLengthMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpExtensionExtensionLengthMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpExtensionExtensionLengthMetricTag struct { + obj *patternFlowGtpExtensionExtensionLengthMetricTag +} + +type unMarshalPatternFlowGtpExtensionExtensionLengthMetricTag interface { + // FromProto unmarshals PatternFlowGtpExtensionExtensionLengthMetricTag from protobuf object *otg.PatternFlowGtpExtensionExtensionLengthMetricTag + FromProto(msg *otg.PatternFlowGtpExtensionExtensionLengthMetricTag) (PatternFlowGtpExtensionExtensionLengthMetricTag, error) + // FromPbText unmarshals PatternFlowGtpExtensionExtensionLengthMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpExtensionExtensionLengthMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpExtensionExtensionLengthMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) Marshal() marshalPatternFlowGtpExtensionExtensionLengthMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpExtensionExtensionLengthMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) Unmarshal() unMarshalPatternFlowGtpExtensionExtensionLengthMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpExtensionExtensionLengthMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpExtensionExtensionLengthMetricTag) ToProto() (*otg.PatternFlowGtpExtensionExtensionLengthMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpExtensionExtensionLengthMetricTag) FromProto(msg *otg.PatternFlowGtpExtensionExtensionLengthMetricTag) (PatternFlowGtpExtensionExtensionLengthMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpExtensionExtensionLengthMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpExtensionExtensionLengthMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpExtensionExtensionLengthMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionExtensionLengthMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpExtensionExtensionLengthMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionExtensionLengthMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) Clone() (PatternFlowGtpExtensionExtensionLengthMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpExtensionExtensionLengthMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpExtensionExtensionLengthMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpExtensionExtensionLengthMetricTag interface { + Validation + // msg marshals PatternFlowGtpExtensionExtensionLengthMetricTag to protobuf object *otg.PatternFlowGtpExtensionExtensionLengthMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpExtensionExtensionLengthMetricTag + // setMsg unmarshals PatternFlowGtpExtensionExtensionLengthMetricTag from protobuf object *otg.PatternFlowGtpExtensionExtensionLengthMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpExtensionExtensionLengthMetricTag) PatternFlowGtpExtensionExtensionLengthMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpExtensionExtensionLengthMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpExtensionExtensionLengthMetricTag + // validate validates PatternFlowGtpExtensionExtensionLengthMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpExtensionExtensionLengthMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpExtensionExtensionLengthMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpExtensionExtensionLengthMetricTag + SetName(value string) PatternFlowGtpExtensionExtensionLengthMetricTag + // Offset returns uint32, set in PatternFlowGtpExtensionExtensionLengthMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpExtensionExtensionLengthMetricTag + SetOffset(value uint32) PatternFlowGtpExtensionExtensionLengthMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpExtensionExtensionLengthMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpExtensionExtensionLengthMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpExtensionExtensionLengthMetricTag + SetLength(value uint32) PatternFlowGtpExtensionExtensionLengthMetricTag + // HasLength checks if Length has been set in PatternFlowGtpExtensionExtensionLengthMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpExtensionExtensionLengthMetricTag object +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) SetName(value string) PatternFlowGtpExtensionExtensionLengthMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpExtensionExtensionLengthMetricTag object +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) SetOffset(value uint32) PatternFlowGtpExtensionExtensionLengthMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpExtensionExtensionLengthMetricTag object +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) SetLength(value uint32) PatternFlowGtpExtensionExtensionLengthMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpExtensionExtensionLengthMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionExtensionLengthMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpExtensionExtensionLengthMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpExtensionExtensionLengthMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_gtp_extension_next_extension_header.go b/gosnappi/pattern_flow_gtp_extension_next_extension_header.go new file mode 100644 index 00000000..156c7264 --- /dev/null +++ b/gosnappi/pattern_flow_gtp_extension_next_extension_header.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpExtensionNextExtensionHeader ***** +type patternFlowGtpExtensionNextExtensionHeader struct { + validation + obj *otg.PatternFlowGtpExtensionNextExtensionHeader + marshaller marshalPatternFlowGtpExtensionNextExtensionHeader + unMarshaller unMarshalPatternFlowGtpExtensionNextExtensionHeader + incrementHolder PatternFlowGtpExtensionNextExtensionHeaderCounter + decrementHolder PatternFlowGtpExtensionNextExtensionHeaderCounter + metricTagsHolder PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter +} + +func NewPatternFlowGtpExtensionNextExtensionHeader() PatternFlowGtpExtensionNextExtensionHeader { + obj := patternFlowGtpExtensionNextExtensionHeader{obj: &otg.PatternFlowGtpExtensionNextExtensionHeader{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpExtensionNextExtensionHeader) msg() *otg.PatternFlowGtpExtensionNextExtensionHeader { + return obj.obj +} + +func (obj *patternFlowGtpExtensionNextExtensionHeader) setMsg(msg *otg.PatternFlowGtpExtensionNextExtensionHeader) PatternFlowGtpExtensionNextExtensionHeader { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpExtensionNextExtensionHeader struct { + obj *patternFlowGtpExtensionNextExtensionHeader +} + +type marshalPatternFlowGtpExtensionNextExtensionHeader interface { + // ToProto marshals PatternFlowGtpExtensionNextExtensionHeader to protobuf object *otg.PatternFlowGtpExtensionNextExtensionHeader + ToProto() (*otg.PatternFlowGtpExtensionNextExtensionHeader, error) + // ToPbText marshals PatternFlowGtpExtensionNextExtensionHeader to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpExtensionNextExtensionHeader to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpExtensionNextExtensionHeader to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpExtensionNextExtensionHeader struct { + obj *patternFlowGtpExtensionNextExtensionHeader +} + +type unMarshalPatternFlowGtpExtensionNextExtensionHeader interface { + // FromProto unmarshals PatternFlowGtpExtensionNextExtensionHeader from protobuf object *otg.PatternFlowGtpExtensionNextExtensionHeader + FromProto(msg *otg.PatternFlowGtpExtensionNextExtensionHeader) (PatternFlowGtpExtensionNextExtensionHeader, error) + // FromPbText unmarshals PatternFlowGtpExtensionNextExtensionHeader from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpExtensionNextExtensionHeader from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpExtensionNextExtensionHeader from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpExtensionNextExtensionHeader) Marshal() marshalPatternFlowGtpExtensionNextExtensionHeader { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpExtensionNextExtensionHeader{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpExtensionNextExtensionHeader) Unmarshal() unMarshalPatternFlowGtpExtensionNextExtensionHeader { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpExtensionNextExtensionHeader{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpExtensionNextExtensionHeader) ToProto() (*otg.PatternFlowGtpExtensionNextExtensionHeader, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpExtensionNextExtensionHeader) FromProto(msg *otg.PatternFlowGtpExtensionNextExtensionHeader) (PatternFlowGtpExtensionNextExtensionHeader, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpExtensionNextExtensionHeader) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpExtensionNextExtensionHeader) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpExtensionNextExtensionHeader) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionNextExtensionHeader) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpExtensionNextExtensionHeader) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionNextExtensionHeader) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpExtensionNextExtensionHeader) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionNextExtensionHeader) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionNextExtensionHeader) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpExtensionNextExtensionHeader) Clone() (PatternFlowGtpExtensionNextExtensionHeader, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpExtensionNextExtensionHeader() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpExtensionNextExtensionHeader) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpExtensionNextExtensionHeader is it states the type of the next extension, or 0 if no next extension exists. This permits chaining several next extension headers. +type PatternFlowGtpExtensionNextExtensionHeader interface { + Validation + // msg marshals PatternFlowGtpExtensionNextExtensionHeader to protobuf object *otg.PatternFlowGtpExtensionNextExtensionHeader + // and doesn't set defaults + msg() *otg.PatternFlowGtpExtensionNextExtensionHeader + // setMsg unmarshals PatternFlowGtpExtensionNextExtensionHeader from protobuf object *otg.PatternFlowGtpExtensionNextExtensionHeader + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpExtensionNextExtensionHeader) PatternFlowGtpExtensionNextExtensionHeader + // provides marshal interface + Marshal() marshalPatternFlowGtpExtensionNextExtensionHeader + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpExtensionNextExtensionHeader + // validate validates PatternFlowGtpExtensionNextExtensionHeader + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpExtensionNextExtensionHeader, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum, set in PatternFlowGtpExtensionNextExtensionHeader + Choice() PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum + // setChoice assigns PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum provided by user to PatternFlowGtpExtensionNextExtensionHeader + setChoice(value PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum) PatternFlowGtpExtensionNextExtensionHeader + // HasChoice checks if Choice has been set in PatternFlowGtpExtensionNextExtensionHeader + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpExtensionNextExtensionHeader. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpExtensionNextExtensionHeader + SetValue(value uint32) PatternFlowGtpExtensionNextExtensionHeader + // HasValue checks if Value has been set in PatternFlowGtpExtensionNextExtensionHeader + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpExtensionNextExtensionHeader. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpExtensionNextExtensionHeader + SetValues(value []uint32) PatternFlowGtpExtensionNextExtensionHeader + // Increment returns PatternFlowGtpExtensionNextExtensionHeaderCounter, set in PatternFlowGtpExtensionNextExtensionHeader. + // PatternFlowGtpExtensionNextExtensionHeaderCounter is integer counter pattern + Increment() PatternFlowGtpExtensionNextExtensionHeaderCounter + // SetIncrement assigns PatternFlowGtpExtensionNextExtensionHeaderCounter provided by user to PatternFlowGtpExtensionNextExtensionHeader. + // PatternFlowGtpExtensionNextExtensionHeaderCounter is integer counter pattern + SetIncrement(value PatternFlowGtpExtensionNextExtensionHeaderCounter) PatternFlowGtpExtensionNextExtensionHeader + // HasIncrement checks if Increment has been set in PatternFlowGtpExtensionNextExtensionHeader + HasIncrement() bool + // Decrement returns PatternFlowGtpExtensionNextExtensionHeaderCounter, set in PatternFlowGtpExtensionNextExtensionHeader. + // PatternFlowGtpExtensionNextExtensionHeaderCounter is integer counter pattern + Decrement() PatternFlowGtpExtensionNextExtensionHeaderCounter + // SetDecrement assigns PatternFlowGtpExtensionNextExtensionHeaderCounter provided by user to PatternFlowGtpExtensionNextExtensionHeader. + // PatternFlowGtpExtensionNextExtensionHeaderCounter is integer counter pattern + SetDecrement(value PatternFlowGtpExtensionNextExtensionHeaderCounter) PatternFlowGtpExtensionNextExtensionHeader + // HasDecrement checks if Decrement has been set in PatternFlowGtpExtensionNextExtensionHeader + HasDecrement() bool + // MetricTags returns PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIterIter, set in PatternFlowGtpExtensionNextExtensionHeader + MetricTags() PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter + setNil() +} + +type PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum string + +// Enum of Choice on PatternFlowGtpExtensionNextExtensionHeader +var PatternFlowGtpExtensionNextExtensionHeaderChoice = struct { + VALUE PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum + VALUES PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum + INCREMENT PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum + DECREMENT PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum +}{ + VALUE: PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum("value"), + VALUES: PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum("values"), + INCREMENT: PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum("increment"), + DECREMENT: PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpExtensionNextExtensionHeader) Choice() PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum { + return PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpExtensionNextExtensionHeader) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpExtensionNextExtensionHeader) setChoice(value PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum) PatternFlowGtpExtensionNextExtensionHeader { + intValue, ok := otg.PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpExtensionNextExtensionHeaderChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpExtensionNextExtensionHeaderChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpExtensionNextExtensionHeaderChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpExtensionNextExtensionHeaderCounter().msg() + } + + if value == PatternFlowGtpExtensionNextExtensionHeaderChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpExtensionNextExtensionHeaderCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpExtensionNextExtensionHeader) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpExtensionNextExtensionHeaderChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpExtensionNextExtensionHeader) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpExtensionNextExtensionHeader object +func (obj *patternFlowGtpExtensionNextExtensionHeader) SetValue(value uint32) PatternFlowGtpExtensionNextExtensionHeader { + obj.setChoice(PatternFlowGtpExtensionNextExtensionHeaderChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpExtensionNextExtensionHeader) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpExtensionNextExtensionHeader object +func (obj *patternFlowGtpExtensionNextExtensionHeader) SetValues(value []uint32) PatternFlowGtpExtensionNextExtensionHeader { + obj.setChoice(PatternFlowGtpExtensionNextExtensionHeaderChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpExtensionNextExtensionHeaderCounter +func (obj *patternFlowGtpExtensionNextExtensionHeader) Increment() PatternFlowGtpExtensionNextExtensionHeaderCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpExtensionNextExtensionHeaderChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpExtensionNextExtensionHeaderCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpExtensionNextExtensionHeaderCounter +func (obj *patternFlowGtpExtensionNextExtensionHeader) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpExtensionNextExtensionHeaderCounter value in the PatternFlowGtpExtensionNextExtensionHeader object +func (obj *patternFlowGtpExtensionNextExtensionHeader) SetIncrement(value PatternFlowGtpExtensionNextExtensionHeaderCounter) PatternFlowGtpExtensionNextExtensionHeader { + obj.setChoice(PatternFlowGtpExtensionNextExtensionHeaderChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpExtensionNextExtensionHeaderCounter +func (obj *patternFlowGtpExtensionNextExtensionHeader) Decrement() PatternFlowGtpExtensionNextExtensionHeaderCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpExtensionNextExtensionHeaderChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpExtensionNextExtensionHeaderCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpExtensionNextExtensionHeaderCounter +func (obj *patternFlowGtpExtensionNextExtensionHeader) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpExtensionNextExtensionHeaderCounter value in the PatternFlowGtpExtensionNextExtensionHeader object +func (obj *patternFlowGtpExtensionNextExtensionHeader) SetDecrement(value PatternFlowGtpExtensionNextExtensionHeaderCounter) PatternFlowGtpExtensionNextExtensionHeader { + obj.setChoice(PatternFlowGtpExtensionNextExtensionHeaderChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpExtensionNextExtensionHeaderMetricTag +func (obj *patternFlowGtpExtensionNextExtensionHeader) MetricTags() PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter struct { + obj *patternFlowGtpExtensionNextExtensionHeader + patternFlowGtpExtensionNextExtensionHeaderMetricTagSlice []PatternFlowGtpExtensionNextExtensionHeaderMetricTag + fieldPtr *[]*otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag +} + +func newPatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter(ptr *[]*otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag) PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter { + return &patternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter interface { + setMsg(*patternFlowGtpExtensionNextExtensionHeader) PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter + Items() []PatternFlowGtpExtensionNextExtensionHeaderMetricTag + Add() PatternFlowGtpExtensionNextExtensionHeaderMetricTag + Append(items ...PatternFlowGtpExtensionNextExtensionHeaderMetricTag) PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter + Set(index int, newObj PatternFlowGtpExtensionNextExtensionHeaderMetricTag) PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter + Clear() PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter + clearHolderSlice() PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter + appendHolderSlice(item PatternFlowGtpExtensionNextExtensionHeaderMetricTag) PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter) setMsg(msg *patternFlowGtpExtensionNextExtensionHeader) PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpExtensionNextExtensionHeaderMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter) Items() []PatternFlowGtpExtensionNextExtensionHeaderMetricTag { + return obj.patternFlowGtpExtensionNextExtensionHeaderMetricTagSlice +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter) Add() PatternFlowGtpExtensionNextExtensionHeaderMetricTag { + newObj := &otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpExtensionNextExtensionHeaderMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpExtensionNextExtensionHeaderMetricTagSlice = append(obj.patternFlowGtpExtensionNextExtensionHeaderMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter) Append(items ...PatternFlowGtpExtensionNextExtensionHeaderMetricTag) PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpExtensionNextExtensionHeaderMetricTagSlice = append(obj.patternFlowGtpExtensionNextExtensionHeaderMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter) Set(index int, newObj PatternFlowGtpExtensionNextExtensionHeaderMetricTag) PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpExtensionNextExtensionHeaderMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter) Clear() PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag{} + obj.patternFlowGtpExtensionNextExtensionHeaderMetricTagSlice = []PatternFlowGtpExtensionNextExtensionHeaderMetricTag{} + } + return obj +} +func (obj *patternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter) clearHolderSlice() PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter { + if len(obj.patternFlowGtpExtensionNextExtensionHeaderMetricTagSlice) > 0 { + obj.patternFlowGtpExtensionNextExtensionHeaderMetricTagSlice = []PatternFlowGtpExtensionNextExtensionHeaderMetricTag{} + } + return obj +} +func (obj *patternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter) appendHolderSlice(item PatternFlowGtpExtensionNextExtensionHeaderMetricTag) PatternFlowGtpExtensionNextExtensionHeaderPatternFlowGtpExtensionNextExtensionHeaderMetricTagIter { + obj.patternFlowGtpExtensionNextExtensionHeaderMetricTagSlice = append(obj.patternFlowGtpExtensionNextExtensionHeaderMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpExtensionNextExtensionHeader) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionNextExtensionHeader.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpExtensionNextExtensionHeader.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpExtensionNextExtensionHeaderMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpExtensionNextExtensionHeader) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpExtensionNextExtensionHeaderChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpExtensionNextExtensionHeaderChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpExtensionNextExtensionHeaderChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpExtensionNextExtensionHeaderChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpExtensionNextExtensionHeaderChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpExtensionNextExtensionHeaderChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpExtensionNextExtensionHeader") + } + } else { + intVal := otg.PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpExtensionNextExtensionHeader_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtp_extension_next_extension_header_counter.go b/gosnappi/pattern_flow_gtp_extension_next_extension_header_counter.go new file mode 100644 index 00000000..165deef7 --- /dev/null +++ b/gosnappi/pattern_flow_gtp_extension_next_extension_header_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpExtensionNextExtensionHeaderCounter ***** +type patternFlowGtpExtensionNextExtensionHeaderCounter struct { + validation + obj *otg.PatternFlowGtpExtensionNextExtensionHeaderCounter + marshaller marshalPatternFlowGtpExtensionNextExtensionHeaderCounter + unMarshaller unMarshalPatternFlowGtpExtensionNextExtensionHeaderCounter +} + +func NewPatternFlowGtpExtensionNextExtensionHeaderCounter() PatternFlowGtpExtensionNextExtensionHeaderCounter { + obj := patternFlowGtpExtensionNextExtensionHeaderCounter{obj: &otg.PatternFlowGtpExtensionNextExtensionHeaderCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) msg() *otg.PatternFlowGtpExtensionNextExtensionHeaderCounter { + return obj.obj +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) setMsg(msg *otg.PatternFlowGtpExtensionNextExtensionHeaderCounter) PatternFlowGtpExtensionNextExtensionHeaderCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpExtensionNextExtensionHeaderCounter struct { + obj *patternFlowGtpExtensionNextExtensionHeaderCounter +} + +type marshalPatternFlowGtpExtensionNextExtensionHeaderCounter interface { + // ToProto marshals PatternFlowGtpExtensionNextExtensionHeaderCounter to protobuf object *otg.PatternFlowGtpExtensionNextExtensionHeaderCounter + ToProto() (*otg.PatternFlowGtpExtensionNextExtensionHeaderCounter, error) + // ToPbText marshals PatternFlowGtpExtensionNextExtensionHeaderCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpExtensionNextExtensionHeaderCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpExtensionNextExtensionHeaderCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpExtensionNextExtensionHeaderCounter struct { + obj *patternFlowGtpExtensionNextExtensionHeaderCounter +} + +type unMarshalPatternFlowGtpExtensionNextExtensionHeaderCounter interface { + // FromProto unmarshals PatternFlowGtpExtensionNextExtensionHeaderCounter from protobuf object *otg.PatternFlowGtpExtensionNextExtensionHeaderCounter + FromProto(msg *otg.PatternFlowGtpExtensionNextExtensionHeaderCounter) (PatternFlowGtpExtensionNextExtensionHeaderCounter, error) + // FromPbText unmarshals PatternFlowGtpExtensionNextExtensionHeaderCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpExtensionNextExtensionHeaderCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpExtensionNextExtensionHeaderCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) Marshal() marshalPatternFlowGtpExtensionNextExtensionHeaderCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpExtensionNextExtensionHeaderCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) Unmarshal() unMarshalPatternFlowGtpExtensionNextExtensionHeaderCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpExtensionNextExtensionHeaderCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpExtensionNextExtensionHeaderCounter) ToProto() (*otg.PatternFlowGtpExtensionNextExtensionHeaderCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpExtensionNextExtensionHeaderCounter) FromProto(msg *otg.PatternFlowGtpExtensionNextExtensionHeaderCounter) (PatternFlowGtpExtensionNextExtensionHeaderCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpExtensionNextExtensionHeaderCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpExtensionNextExtensionHeaderCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpExtensionNextExtensionHeaderCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionNextExtensionHeaderCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpExtensionNextExtensionHeaderCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionNextExtensionHeaderCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) Clone() (PatternFlowGtpExtensionNextExtensionHeaderCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpExtensionNextExtensionHeaderCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpExtensionNextExtensionHeaderCounter is integer counter pattern +type PatternFlowGtpExtensionNextExtensionHeaderCounter interface { + Validation + // msg marshals PatternFlowGtpExtensionNextExtensionHeaderCounter to protobuf object *otg.PatternFlowGtpExtensionNextExtensionHeaderCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpExtensionNextExtensionHeaderCounter + // setMsg unmarshals PatternFlowGtpExtensionNextExtensionHeaderCounter from protobuf object *otg.PatternFlowGtpExtensionNextExtensionHeaderCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpExtensionNextExtensionHeaderCounter) PatternFlowGtpExtensionNextExtensionHeaderCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpExtensionNextExtensionHeaderCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpExtensionNextExtensionHeaderCounter + // validate validates PatternFlowGtpExtensionNextExtensionHeaderCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpExtensionNextExtensionHeaderCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpExtensionNextExtensionHeaderCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpExtensionNextExtensionHeaderCounter + SetStart(value uint32) PatternFlowGtpExtensionNextExtensionHeaderCounter + // HasStart checks if Start has been set in PatternFlowGtpExtensionNextExtensionHeaderCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpExtensionNextExtensionHeaderCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpExtensionNextExtensionHeaderCounter + SetStep(value uint32) PatternFlowGtpExtensionNextExtensionHeaderCounter + // HasStep checks if Step has been set in PatternFlowGtpExtensionNextExtensionHeaderCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpExtensionNextExtensionHeaderCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpExtensionNextExtensionHeaderCounter + SetCount(value uint32) PatternFlowGtpExtensionNextExtensionHeaderCounter + // HasCount checks if Count has been set in PatternFlowGtpExtensionNextExtensionHeaderCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpExtensionNextExtensionHeaderCounter object +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) SetStart(value uint32) PatternFlowGtpExtensionNextExtensionHeaderCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpExtensionNextExtensionHeaderCounter object +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) SetStep(value uint32) PatternFlowGtpExtensionNextExtensionHeaderCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpExtensionNextExtensionHeaderCounter object +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) SetCount(value uint32) PatternFlowGtpExtensionNextExtensionHeaderCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionNextExtensionHeaderCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionNextExtensionHeaderCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionNextExtensionHeaderCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtp_extension_next_extension_header_metric_tag.go b/gosnappi/pattern_flow_gtp_extension_next_extension_header_metric_tag.go new file mode 100644 index 00000000..21d39e35 --- /dev/null +++ b/gosnappi/pattern_flow_gtp_extension_next_extension_header_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpExtensionNextExtensionHeaderMetricTag ***** +type patternFlowGtpExtensionNextExtensionHeaderMetricTag struct { + validation + obj *otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag + marshaller marshalPatternFlowGtpExtensionNextExtensionHeaderMetricTag + unMarshaller unMarshalPatternFlowGtpExtensionNextExtensionHeaderMetricTag +} + +func NewPatternFlowGtpExtensionNextExtensionHeaderMetricTag() PatternFlowGtpExtensionNextExtensionHeaderMetricTag { + obj := patternFlowGtpExtensionNextExtensionHeaderMetricTag{obj: &otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) msg() *otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) setMsg(msg *otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag) PatternFlowGtpExtensionNextExtensionHeaderMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpExtensionNextExtensionHeaderMetricTag struct { + obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag +} + +type marshalPatternFlowGtpExtensionNextExtensionHeaderMetricTag interface { + // ToProto marshals PatternFlowGtpExtensionNextExtensionHeaderMetricTag to protobuf object *otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag + ToProto() (*otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag, error) + // ToPbText marshals PatternFlowGtpExtensionNextExtensionHeaderMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpExtensionNextExtensionHeaderMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpExtensionNextExtensionHeaderMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpExtensionNextExtensionHeaderMetricTag struct { + obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag +} + +type unMarshalPatternFlowGtpExtensionNextExtensionHeaderMetricTag interface { + // FromProto unmarshals PatternFlowGtpExtensionNextExtensionHeaderMetricTag from protobuf object *otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag + FromProto(msg *otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag) (PatternFlowGtpExtensionNextExtensionHeaderMetricTag, error) + // FromPbText unmarshals PatternFlowGtpExtensionNextExtensionHeaderMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpExtensionNextExtensionHeaderMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpExtensionNextExtensionHeaderMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) Marshal() marshalPatternFlowGtpExtensionNextExtensionHeaderMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpExtensionNextExtensionHeaderMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) Unmarshal() unMarshalPatternFlowGtpExtensionNextExtensionHeaderMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpExtensionNextExtensionHeaderMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpExtensionNextExtensionHeaderMetricTag) ToProto() (*otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpExtensionNextExtensionHeaderMetricTag) FromProto(msg *otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag) (PatternFlowGtpExtensionNextExtensionHeaderMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpExtensionNextExtensionHeaderMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpExtensionNextExtensionHeaderMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpExtensionNextExtensionHeaderMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionNextExtensionHeaderMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpExtensionNextExtensionHeaderMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpExtensionNextExtensionHeaderMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) Clone() (PatternFlowGtpExtensionNextExtensionHeaderMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpExtensionNextExtensionHeaderMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpExtensionNextExtensionHeaderMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpExtensionNextExtensionHeaderMetricTag interface { + Validation + // msg marshals PatternFlowGtpExtensionNextExtensionHeaderMetricTag to protobuf object *otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag + // setMsg unmarshals PatternFlowGtpExtensionNextExtensionHeaderMetricTag from protobuf object *otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag) PatternFlowGtpExtensionNextExtensionHeaderMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpExtensionNextExtensionHeaderMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpExtensionNextExtensionHeaderMetricTag + // validate validates PatternFlowGtpExtensionNextExtensionHeaderMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpExtensionNextExtensionHeaderMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpExtensionNextExtensionHeaderMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpExtensionNextExtensionHeaderMetricTag + SetName(value string) PatternFlowGtpExtensionNextExtensionHeaderMetricTag + // Offset returns uint32, set in PatternFlowGtpExtensionNextExtensionHeaderMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpExtensionNextExtensionHeaderMetricTag + SetOffset(value uint32) PatternFlowGtpExtensionNextExtensionHeaderMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpExtensionNextExtensionHeaderMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpExtensionNextExtensionHeaderMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpExtensionNextExtensionHeaderMetricTag + SetLength(value uint32) PatternFlowGtpExtensionNextExtensionHeaderMetricTag + // HasLength checks if Length has been set in PatternFlowGtpExtensionNextExtensionHeaderMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpExtensionNextExtensionHeaderMetricTag object +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) SetName(value string) PatternFlowGtpExtensionNextExtensionHeaderMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpExtensionNextExtensionHeaderMetricTag object +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) SetOffset(value uint32) PatternFlowGtpExtensionNextExtensionHeaderMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpExtensionNextExtensionHeaderMetricTag object +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) SetLength(value uint32) PatternFlowGtpExtensionNextExtensionHeaderMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpExtensionNextExtensionHeaderMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpExtensionNextExtensionHeaderMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpExtensionNextExtensionHeaderMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpExtensionNextExtensionHeaderMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_e_flag.go b/gosnappi/pattern_flow_gtpv1_e_flag.go new file mode 100644 index 00000000..1a8b0a57 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_e_flag.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1EFlag ***** +type patternFlowGtpv1EFlag struct { + validation + obj *otg.PatternFlowGtpv1EFlag + marshaller marshalPatternFlowGtpv1EFlag + unMarshaller unMarshalPatternFlowGtpv1EFlag + incrementHolder PatternFlowGtpv1EFlagCounter + decrementHolder PatternFlowGtpv1EFlagCounter + metricTagsHolder PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter +} + +func NewPatternFlowGtpv1EFlag() PatternFlowGtpv1EFlag { + obj := patternFlowGtpv1EFlag{obj: &otg.PatternFlowGtpv1EFlag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1EFlag) msg() *otg.PatternFlowGtpv1EFlag { + return obj.obj +} + +func (obj *patternFlowGtpv1EFlag) setMsg(msg *otg.PatternFlowGtpv1EFlag) PatternFlowGtpv1EFlag { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1EFlag struct { + obj *patternFlowGtpv1EFlag +} + +type marshalPatternFlowGtpv1EFlag interface { + // ToProto marshals PatternFlowGtpv1EFlag to protobuf object *otg.PatternFlowGtpv1EFlag + ToProto() (*otg.PatternFlowGtpv1EFlag, error) + // ToPbText marshals PatternFlowGtpv1EFlag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1EFlag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1EFlag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1EFlag struct { + obj *patternFlowGtpv1EFlag +} + +type unMarshalPatternFlowGtpv1EFlag interface { + // FromProto unmarshals PatternFlowGtpv1EFlag from protobuf object *otg.PatternFlowGtpv1EFlag + FromProto(msg *otg.PatternFlowGtpv1EFlag) (PatternFlowGtpv1EFlag, error) + // FromPbText unmarshals PatternFlowGtpv1EFlag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1EFlag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1EFlag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1EFlag) Marshal() marshalPatternFlowGtpv1EFlag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1EFlag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1EFlag) Unmarshal() unMarshalPatternFlowGtpv1EFlag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1EFlag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1EFlag) ToProto() (*otg.PatternFlowGtpv1EFlag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1EFlag) FromProto(msg *otg.PatternFlowGtpv1EFlag) (PatternFlowGtpv1EFlag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1EFlag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1EFlag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1EFlag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1EFlag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1EFlag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1EFlag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1EFlag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1EFlag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1EFlag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1EFlag) Clone() (PatternFlowGtpv1EFlag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1EFlag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv1EFlag) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv1EFlag is extension header field present +type PatternFlowGtpv1EFlag interface { + Validation + // msg marshals PatternFlowGtpv1EFlag to protobuf object *otg.PatternFlowGtpv1EFlag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1EFlag + // setMsg unmarshals PatternFlowGtpv1EFlag from protobuf object *otg.PatternFlowGtpv1EFlag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1EFlag) PatternFlowGtpv1EFlag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1EFlag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1EFlag + // validate validates PatternFlowGtpv1EFlag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1EFlag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv1EFlagChoiceEnum, set in PatternFlowGtpv1EFlag + Choice() PatternFlowGtpv1EFlagChoiceEnum + // setChoice assigns PatternFlowGtpv1EFlagChoiceEnum provided by user to PatternFlowGtpv1EFlag + setChoice(value PatternFlowGtpv1EFlagChoiceEnum) PatternFlowGtpv1EFlag + // HasChoice checks if Choice has been set in PatternFlowGtpv1EFlag + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv1EFlag. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv1EFlag + SetValue(value uint32) PatternFlowGtpv1EFlag + // HasValue checks if Value has been set in PatternFlowGtpv1EFlag + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv1EFlag. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv1EFlag + SetValues(value []uint32) PatternFlowGtpv1EFlag + // Increment returns PatternFlowGtpv1EFlagCounter, set in PatternFlowGtpv1EFlag. + // PatternFlowGtpv1EFlagCounter is integer counter pattern + Increment() PatternFlowGtpv1EFlagCounter + // SetIncrement assigns PatternFlowGtpv1EFlagCounter provided by user to PatternFlowGtpv1EFlag. + // PatternFlowGtpv1EFlagCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv1EFlagCounter) PatternFlowGtpv1EFlag + // HasIncrement checks if Increment has been set in PatternFlowGtpv1EFlag + HasIncrement() bool + // Decrement returns PatternFlowGtpv1EFlagCounter, set in PatternFlowGtpv1EFlag. + // PatternFlowGtpv1EFlagCounter is integer counter pattern + Decrement() PatternFlowGtpv1EFlagCounter + // SetDecrement assigns PatternFlowGtpv1EFlagCounter provided by user to PatternFlowGtpv1EFlag. + // PatternFlowGtpv1EFlagCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv1EFlagCounter) PatternFlowGtpv1EFlag + // HasDecrement checks if Decrement has been set in PatternFlowGtpv1EFlag + HasDecrement() bool + // MetricTags returns PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIterIter, set in PatternFlowGtpv1EFlag + MetricTags() PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter + setNil() +} + +type PatternFlowGtpv1EFlagChoiceEnum string + +// Enum of Choice on PatternFlowGtpv1EFlag +var PatternFlowGtpv1EFlagChoice = struct { + VALUE PatternFlowGtpv1EFlagChoiceEnum + VALUES PatternFlowGtpv1EFlagChoiceEnum + INCREMENT PatternFlowGtpv1EFlagChoiceEnum + DECREMENT PatternFlowGtpv1EFlagChoiceEnum +}{ + VALUE: PatternFlowGtpv1EFlagChoiceEnum("value"), + VALUES: PatternFlowGtpv1EFlagChoiceEnum("values"), + INCREMENT: PatternFlowGtpv1EFlagChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv1EFlagChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv1EFlag) Choice() PatternFlowGtpv1EFlagChoiceEnum { + return PatternFlowGtpv1EFlagChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv1EFlag) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv1EFlag) setChoice(value PatternFlowGtpv1EFlagChoiceEnum) PatternFlowGtpv1EFlag { + intValue, ok := otg.PatternFlowGtpv1EFlag_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv1EFlagChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv1EFlag_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv1EFlagChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv1EFlagChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv1EFlagChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv1EFlagCounter().msg() + } + + if value == PatternFlowGtpv1EFlagChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv1EFlagCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1EFlag) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv1EFlagChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1EFlag) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv1EFlag object +func (obj *patternFlowGtpv1EFlag) SetValue(value uint32) PatternFlowGtpv1EFlag { + obj.setChoice(PatternFlowGtpv1EFlagChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv1EFlag) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv1EFlag object +func (obj *patternFlowGtpv1EFlag) SetValues(value []uint32) PatternFlowGtpv1EFlag { + obj.setChoice(PatternFlowGtpv1EFlagChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv1EFlagCounter +func (obj *patternFlowGtpv1EFlag) Increment() PatternFlowGtpv1EFlagCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv1EFlagChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv1EFlagCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv1EFlagCounter +func (obj *patternFlowGtpv1EFlag) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv1EFlagCounter value in the PatternFlowGtpv1EFlag object +func (obj *patternFlowGtpv1EFlag) SetIncrement(value PatternFlowGtpv1EFlagCounter) PatternFlowGtpv1EFlag { + obj.setChoice(PatternFlowGtpv1EFlagChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1EFlagCounter +func (obj *patternFlowGtpv1EFlag) Decrement() PatternFlowGtpv1EFlagCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv1EFlagChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv1EFlagCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1EFlagCounter +func (obj *patternFlowGtpv1EFlag) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv1EFlagCounter value in the PatternFlowGtpv1EFlag object +func (obj *patternFlowGtpv1EFlag) SetDecrement(value PatternFlowGtpv1EFlagCounter) PatternFlowGtpv1EFlag { + obj.setChoice(PatternFlowGtpv1EFlagChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv1EFlagMetricTag +func (obj *patternFlowGtpv1EFlag) MetricTags() PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv1EFlagMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter struct { + obj *patternFlowGtpv1EFlag + patternFlowGtpv1EFlagMetricTagSlice []PatternFlowGtpv1EFlagMetricTag + fieldPtr *[]*otg.PatternFlowGtpv1EFlagMetricTag +} + +func newPatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter(ptr *[]*otg.PatternFlowGtpv1EFlagMetricTag) PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter { + return &patternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter interface { + setMsg(*patternFlowGtpv1EFlag) PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter + Items() []PatternFlowGtpv1EFlagMetricTag + Add() PatternFlowGtpv1EFlagMetricTag + Append(items ...PatternFlowGtpv1EFlagMetricTag) PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter + Set(index int, newObj PatternFlowGtpv1EFlagMetricTag) PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter + Clear() PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter + clearHolderSlice() PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter + appendHolderSlice(item PatternFlowGtpv1EFlagMetricTag) PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter +} + +func (obj *patternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter) setMsg(msg *patternFlowGtpv1EFlag) PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv1EFlagMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter) Items() []PatternFlowGtpv1EFlagMetricTag { + return obj.patternFlowGtpv1EFlagMetricTagSlice +} + +func (obj *patternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter) Add() PatternFlowGtpv1EFlagMetricTag { + newObj := &otg.PatternFlowGtpv1EFlagMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv1EFlagMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv1EFlagMetricTagSlice = append(obj.patternFlowGtpv1EFlagMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter) Append(items ...PatternFlowGtpv1EFlagMetricTag) PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv1EFlagMetricTagSlice = append(obj.patternFlowGtpv1EFlagMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter) Set(index int, newObj PatternFlowGtpv1EFlagMetricTag) PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv1EFlagMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter) Clear() PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv1EFlagMetricTag{} + obj.patternFlowGtpv1EFlagMetricTagSlice = []PatternFlowGtpv1EFlagMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter) clearHolderSlice() PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter { + if len(obj.patternFlowGtpv1EFlagMetricTagSlice) > 0 { + obj.patternFlowGtpv1EFlagMetricTagSlice = []PatternFlowGtpv1EFlagMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter) appendHolderSlice(item PatternFlowGtpv1EFlagMetricTag) PatternFlowGtpv1EFlagPatternFlowGtpv1EFlagMetricTagIter { + obj.patternFlowGtpv1EFlagMetricTagSlice = append(obj.patternFlowGtpv1EFlagMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv1EFlag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1EFlag.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv1EFlag.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv1EFlagMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv1EFlag) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv1EFlagChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv1EFlagChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv1EFlagChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv1EFlagChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv1EFlagChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv1EFlagChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv1EFlag") + } + } else { + intVal := otg.PatternFlowGtpv1EFlag_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv1EFlag_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_e_flag_counter.go b/gosnappi/pattern_flow_gtpv1_e_flag_counter.go new file mode 100644 index 00000000..360074c1 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_e_flag_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1EFlagCounter ***** +type patternFlowGtpv1EFlagCounter struct { + validation + obj *otg.PatternFlowGtpv1EFlagCounter + marshaller marshalPatternFlowGtpv1EFlagCounter + unMarshaller unMarshalPatternFlowGtpv1EFlagCounter +} + +func NewPatternFlowGtpv1EFlagCounter() PatternFlowGtpv1EFlagCounter { + obj := patternFlowGtpv1EFlagCounter{obj: &otg.PatternFlowGtpv1EFlagCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1EFlagCounter) msg() *otg.PatternFlowGtpv1EFlagCounter { + return obj.obj +} + +func (obj *patternFlowGtpv1EFlagCounter) setMsg(msg *otg.PatternFlowGtpv1EFlagCounter) PatternFlowGtpv1EFlagCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1EFlagCounter struct { + obj *patternFlowGtpv1EFlagCounter +} + +type marshalPatternFlowGtpv1EFlagCounter interface { + // ToProto marshals PatternFlowGtpv1EFlagCounter to protobuf object *otg.PatternFlowGtpv1EFlagCounter + ToProto() (*otg.PatternFlowGtpv1EFlagCounter, error) + // ToPbText marshals PatternFlowGtpv1EFlagCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1EFlagCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1EFlagCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1EFlagCounter struct { + obj *patternFlowGtpv1EFlagCounter +} + +type unMarshalPatternFlowGtpv1EFlagCounter interface { + // FromProto unmarshals PatternFlowGtpv1EFlagCounter from protobuf object *otg.PatternFlowGtpv1EFlagCounter + FromProto(msg *otg.PatternFlowGtpv1EFlagCounter) (PatternFlowGtpv1EFlagCounter, error) + // FromPbText unmarshals PatternFlowGtpv1EFlagCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1EFlagCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1EFlagCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1EFlagCounter) Marshal() marshalPatternFlowGtpv1EFlagCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1EFlagCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1EFlagCounter) Unmarshal() unMarshalPatternFlowGtpv1EFlagCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1EFlagCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1EFlagCounter) ToProto() (*otg.PatternFlowGtpv1EFlagCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1EFlagCounter) FromProto(msg *otg.PatternFlowGtpv1EFlagCounter) (PatternFlowGtpv1EFlagCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1EFlagCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1EFlagCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1EFlagCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1EFlagCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1EFlagCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1EFlagCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1EFlagCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1EFlagCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1EFlagCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1EFlagCounter) Clone() (PatternFlowGtpv1EFlagCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1EFlagCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1EFlagCounter is integer counter pattern +type PatternFlowGtpv1EFlagCounter interface { + Validation + // msg marshals PatternFlowGtpv1EFlagCounter to protobuf object *otg.PatternFlowGtpv1EFlagCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1EFlagCounter + // setMsg unmarshals PatternFlowGtpv1EFlagCounter from protobuf object *otg.PatternFlowGtpv1EFlagCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1EFlagCounter) PatternFlowGtpv1EFlagCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv1EFlagCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1EFlagCounter + // validate validates PatternFlowGtpv1EFlagCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1EFlagCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv1EFlagCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv1EFlagCounter + SetStart(value uint32) PatternFlowGtpv1EFlagCounter + // HasStart checks if Start has been set in PatternFlowGtpv1EFlagCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv1EFlagCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv1EFlagCounter + SetStep(value uint32) PatternFlowGtpv1EFlagCounter + // HasStep checks if Step has been set in PatternFlowGtpv1EFlagCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv1EFlagCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv1EFlagCounter + SetCount(value uint32) PatternFlowGtpv1EFlagCounter + // HasCount checks if Count has been set in PatternFlowGtpv1EFlagCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1EFlagCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1EFlagCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv1EFlagCounter object +func (obj *patternFlowGtpv1EFlagCounter) SetStart(value uint32) PatternFlowGtpv1EFlagCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1EFlagCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1EFlagCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv1EFlagCounter object +func (obj *patternFlowGtpv1EFlagCounter) SetStep(value uint32) PatternFlowGtpv1EFlagCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1EFlagCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1EFlagCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv1EFlagCounter object +func (obj *patternFlowGtpv1EFlagCounter) SetCount(value uint32) PatternFlowGtpv1EFlagCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv1EFlagCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1EFlagCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1EFlagCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1EFlagCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv1EFlagCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_e_flag_metric_tag.go b/gosnappi/pattern_flow_gtpv1_e_flag_metric_tag.go new file mode 100644 index 00000000..c684c7be --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_e_flag_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1EFlagMetricTag ***** +type patternFlowGtpv1EFlagMetricTag struct { + validation + obj *otg.PatternFlowGtpv1EFlagMetricTag + marshaller marshalPatternFlowGtpv1EFlagMetricTag + unMarshaller unMarshalPatternFlowGtpv1EFlagMetricTag +} + +func NewPatternFlowGtpv1EFlagMetricTag() PatternFlowGtpv1EFlagMetricTag { + obj := patternFlowGtpv1EFlagMetricTag{obj: &otg.PatternFlowGtpv1EFlagMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1EFlagMetricTag) msg() *otg.PatternFlowGtpv1EFlagMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv1EFlagMetricTag) setMsg(msg *otg.PatternFlowGtpv1EFlagMetricTag) PatternFlowGtpv1EFlagMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1EFlagMetricTag struct { + obj *patternFlowGtpv1EFlagMetricTag +} + +type marshalPatternFlowGtpv1EFlagMetricTag interface { + // ToProto marshals PatternFlowGtpv1EFlagMetricTag to protobuf object *otg.PatternFlowGtpv1EFlagMetricTag + ToProto() (*otg.PatternFlowGtpv1EFlagMetricTag, error) + // ToPbText marshals PatternFlowGtpv1EFlagMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1EFlagMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1EFlagMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1EFlagMetricTag struct { + obj *patternFlowGtpv1EFlagMetricTag +} + +type unMarshalPatternFlowGtpv1EFlagMetricTag interface { + // FromProto unmarshals PatternFlowGtpv1EFlagMetricTag from protobuf object *otg.PatternFlowGtpv1EFlagMetricTag + FromProto(msg *otg.PatternFlowGtpv1EFlagMetricTag) (PatternFlowGtpv1EFlagMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv1EFlagMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1EFlagMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1EFlagMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1EFlagMetricTag) Marshal() marshalPatternFlowGtpv1EFlagMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1EFlagMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1EFlagMetricTag) Unmarshal() unMarshalPatternFlowGtpv1EFlagMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1EFlagMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1EFlagMetricTag) ToProto() (*otg.PatternFlowGtpv1EFlagMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1EFlagMetricTag) FromProto(msg *otg.PatternFlowGtpv1EFlagMetricTag) (PatternFlowGtpv1EFlagMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1EFlagMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1EFlagMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1EFlagMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1EFlagMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1EFlagMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1EFlagMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1EFlagMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1EFlagMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1EFlagMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1EFlagMetricTag) Clone() (PatternFlowGtpv1EFlagMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1EFlagMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1EFlagMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv1EFlagMetricTag interface { + Validation + // msg marshals PatternFlowGtpv1EFlagMetricTag to protobuf object *otg.PatternFlowGtpv1EFlagMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1EFlagMetricTag + // setMsg unmarshals PatternFlowGtpv1EFlagMetricTag from protobuf object *otg.PatternFlowGtpv1EFlagMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1EFlagMetricTag) PatternFlowGtpv1EFlagMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1EFlagMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1EFlagMetricTag + // validate validates PatternFlowGtpv1EFlagMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1EFlagMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv1EFlagMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv1EFlagMetricTag + SetName(value string) PatternFlowGtpv1EFlagMetricTag + // Offset returns uint32, set in PatternFlowGtpv1EFlagMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv1EFlagMetricTag + SetOffset(value uint32) PatternFlowGtpv1EFlagMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv1EFlagMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv1EFlagMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv1EFlagMetricTag + SetLength(value uint32) PatternFlowGtpv1EFlagMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv1EFlagMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv1EFlagMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv1EFlagMetricTag object +func (obj *patternFlowGtpv1EFlagMetricTag) SetName(value string) PatternFlowGtpv1EFlagMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1EFlagMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1EFlagMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv1EFlagMetricTag object +func (obj *patternFlowGtpv1EFlagMetricTag) SetOffset(value uint32) PatternFlowGtpv1EFlagMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1EFlagMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1EFlagMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv1EFlagMetricTag object +func (obj *patternFlowGtpv1EFlagMetricTag) SetLength(value uint32) PatternFlowGtpv1EFlagMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv1EFlagMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv1EFlagMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1EFlagMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv1EFlagMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv1EFlagMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_message_length.go b/gosnappi/pattern_flow_gtpv1_message_length.go new file mode 100644 index 00000000..3c7313b2 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_message_length.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1MessageLength ***** +type patternFlowGtpv1MessageLength struct { + validation + obj *otg.PatternFlowGtpv1MessageLength + marshaller marshalPatternFlowGtpv1MessageLength + unMarshaller unMarshalPatternFlowGtpv1MessageLength + incrementHolder PatternFlowGtpv1MessageLengthCounter + decrementHolder PatternFlowGtpv1MessageLengthCounter + metricTagsHolder PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter +} + +func NewPatternFlowGtpv1MessageLength() PatternFlowGtpv1MessageLength { + obj := patternFlowGtpv1MessageLength{obj: &otg.PatternFlowGtpv1MessageLength{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1MessageLength) msg() *otg.PatternFlowGtpv1MessageLength { + return obj.obj +} + +func (obj *patternFlowGtpv1MessageLength) setMsg(msg *otg.PatternFlowGtpv1MessageLength) PatternFlowGtpv1MessageLength { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1MessageLength struct { + obj *patternFlowGtpv1MessageLength +} + +type marshalPatternFlowGtpv1MessageLength interface { + // ToProto marshals PatternFlowGtpv1MessageLength to protobuf object *otg.PatternFlowGtpv1MessageLength + ToProto() (*otg.PatternFlowGtpv1MessageLength, error) + // ToPbText marshals PatternFlowGtpv1MessageLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1MessageLength to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1MessageLength to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1MessageLength struct { + obj *patternFlowGtpv1MessageLength +} + +type unMarshalPatternFlowGtpv1MessageLength interface { + // FromProto unmarshals PatternFlowGtpv1MessageLength from protobuf object *otg.PatternFlowGtpv1MessageLength + FromProto(msg *otg.PatternFlowGtpv1MessageLength) (PatternFlowGtpv1MessageLength, error) + // FromPbText unmarshals PatternFlowGtpv1MessageLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1MessageLength from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1MessageLength from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1MessageLength) Marshal() marshalPatternFlowGtpv1MessageLength { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1MessageLength{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1MessageLength) Unmarshal() unMarshalPatternFlowGtpv1MessageLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1MessageLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1MessageLength) ToProto() (*otg.PatternFlowGtpv1MessageLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageLength) FromProto(msg *otg.PatternFlowGtpv1MessageLength) (PatternFlowGtpv1MessageLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1MessageLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1MessageLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1MessageLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1MessageLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1MessageLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1MessageLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1MessageLength) Clone() (PatternFlowGtpv1MessageLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1MessageLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv1MessageLength) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv1MessageLength is the length of the payload (the bytes following the mandatory 8-byte GTP header) in bytes that includes any optional fields +type PatternFlowGtpv1MessageLength interface { + Validation + // msg marshals PatternFlowGtpv1MessageLength to protobuf object *otg.PatternFlowGtpv1MessageLength + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1MessageLength + // setMsg unmarshals PatternFlowGtpv1MessageLength from protobuf object *otg.PatternFlowGtpv1MessageLength + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1MessageLength) PatternFlowGtpv1MessageLength + // provides marshal interface + Marshal() marshalPatternFlowGtpv1MessageLength + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1MessageLength + // validate validates PatternFlowGtpv1MessageLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1MessageLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv1MessageLengthChoiceEnum, set in PatternFlowGtpv1MessageLength + Choice() PatternFlowGtpv1MessageLengthChoiceEnum + // setChoice assigns PatternFlowGtpv1MessageLengthChoiceEnum provided by user to PatternFlowGtpv1MessageLength + setChoice(value PatternFlowGtpv1MessageLengthChoiceEnum) PatternFlowGtpv1MessageLength + // HasChoice checks if Choice has been set in PatternFlowGtpv1MessageLength + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv1MessageLength. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv1MessageLength + SetValue(value uint32) PatternFlowGtpv1MessageLength + // HasValue checks if Value has been set in PatternFlowGtpv1MessageLength + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv1MessageLength. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv1MessageLength + SetValues(value []uint32) PatternFlowGtpv1MessageLength + // Increment returns PatternFlowGtpv1MessageLengthCounter, set in PatternFlowGtpv1MessageLength. + // PatternFlowGtpv1MessageLengthCounter is integer counter pattern + Increment() PatternFlowGtpv1MessageLengthCounter + // SetIncrement assigns PatternFlowGtpv1MessageLengthCounter provided by user to PatternFlowGtpv1MessageLength. + // PatternFlowGtpv1MessageLengthCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv1MessageLengthCounter) PatternFlowGtpv1MessageLength + // HasIncrement checks if Increment has been set in PatternFlowGtpv1MessageLength + HasIncrement() bool + // Decrement returns PatternFlowGtpv1MessageLengthCounter, set in PatternFlowGtpv1MessageLength. + // PatternFlowGtpv1MessageLengthCounter is integer counter pattern + Decrement() PatternFlowGtpv1MessageLengthCounter + // SetDecrement assigns PatternFlowGtpv1MessageLengthCounter provided by user to PatternFlowGtpv1MessageLength. + // PatternFlowGtpv1MessageLengthCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv1MessageLengthCounter) PatternFlowGtpv1MessageLength + // HasDecrement checks if Decrement has been set in PatternFlowGtpv1MessageLength + HasDecrement() bool + // MetricTags returns PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIterIter, set in PatternFlowGtpv1MessageLength + MetricTags() PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter + setNil() +} + +type PatternFlowGtpv1MessageLengthChoiceEnum string + +// Enum of Choice on PatternFlowGtpv1MessageLength +var PatternFlowGtpv1MessageLengthChoice = struct { + VALUE PatternFlowGtpv1MessageLengthChoiceEnum + VALUES PatternFlowGtpv1MessageLengthChoiceEnum + INCREMENT PatternFlowGtpv1MessageLengthChoiceEnum + DECREMENT PatternFlowGtpv1MessageLengthChoiceEnum +}{ + VALUE: PatternFlowGtpv1MessageLengthChoiceEnum("value"), + VALUES: PatternFlowGtpv1MessageLengthChoiceEnum("values"), + INCREMENT: PatternFlowGtpv1MessageLengthChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv1MessageLengthChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv1MessageLength) Choice() PatternFlowGtpv1MessageLengthChoiceEnum { + return PatternFlowGtpv1MessageLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv1MessageLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv1MessageLength) setChoice(value PatternFlowGtpv1MessageLengthChoiceEnum) PatternFlowGtpv1MessageLength { + intValue, ok := otg.PatternFlowGtpv1MessageLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv1MessageLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv1MessageLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv1MessageLengthChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv1MessageLengthChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv1MessageLengthChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv1MessageLengthCounter().msg() + } + + if value == PatternFlowGtpv1MessageLengthChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv1MessageLengthCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1MessageLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv1MessageLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1MessageLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv1MessageLength object +func (obj *patternFlowGtpv1MessageLength) SetValue(value uint32) PatternFlowGtpv1MessageLength { + obj.setChoice(PatternFlowGtpv1MessageLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv1MessageLength) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv1MessageLength object +func (obj *patternFlowGtpv1MessageLength) SetValues(value []uint32) PatternFlowGtpv1MessageLength { + obj.setChoice(PatternFlowGtpv1MessageLengthChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv1MessageLengthCounter +func (obj *patternFlowGtpv1MessageLength) Increment() PatternFlowGtpv1MessageLengthCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv1MessageLengthChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv1MessageLengthCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv1MessageLengthCounter +func (obj *patternFlowGtpv1MessageLength) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv1MessageLengthCounter value in the PatternFlowGtpv1MessageLength object +func (obj *patternFlowGtpv1MessageLength) SetIncrement(value PatternFlowGtpv1MessageLengthCounter) PatternFlowGtpv1MessageLength { + obj.setChoice(PatternFlowGtpv1MessageLengthChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1MessageLengthCounter +func (obj *patternFlowGtpv1MessageLength) Decrement() PatternFlowGtpv1MessageLengthCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv1MessageLengthChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv1MessageLengthCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1MessageLengthCounter +func (obj *patternFlowGtpv1MessageLength) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv1MessageLengthCounter value in the PatternFlowGtpv1MessageLength object +func (obj *patternFlowGtpv1MessageLength) SetDecrement(value PatternFlowGtpv1MessageLengthCounter) PatternFlowGtpv1MessageLength { + obj.setChoice(PatternFlowGtpv1MessageLengthChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv1MessageLengthMetricTag +func (obj *patternFlowGtpv1MessageLength) MetricTags() PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv1MessageLengthMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter struct { + obj *patternFlowGtpv1MessageLength + patternFlowGtpv1MessageLengthMetricTagSlice []PatternFlowGtpv1MessageLengthMetricTag + fieldPtr *[]*otg.PatternFlowGtpv1MessageLengthMetricTag +} + +func newPatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter(ptr *[]*otg.PatternFlowGtpv1MessageLengthMetricTag) PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter { + return &patternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter interface { + setMsg(*patternFlowGtpv1MessageLength) PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter + Items() []PatternFlowGtpv1MessageLengthMetricTag + Add() PatternFlowGtpv1MessageLengthMetricTag + Append(items ...PatternFlowGtpv1MessageLengthMetricTag) PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter + Set(index int, newObj PatternFlowGtpv1MessageLengthMetricTag) PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter + Clear() PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter + clearHolderSlice() PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter + appendHolderSlice(item PatternFlowGtpv1MessageLengthMetricTag) PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter +} + +func (obj *patternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter) setMsg(msg *patternFlowGtpv1MessageLength) PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv1MessageLengthMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter) Items() []PatternFlowGtpv1MessageLengthMetricTag { + return obj.patternFlowGtpv1MessageLengthMetricTagSlice +} + +func (obj *patternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter) Add() PatternFlowGtpv1MessageLengthMetricTag { + newObj := &otg.PatternFlowGtpv1MessageLengthMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv1MessageLengthMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv1MessageLengthMetricTagSlice = append(obj.patternFlowGtpv1MessageLengthMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter) Append(items ...PatternFlowGtpv1MessageLengthMetricTag) PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv1MessageLengthMetricTagSlice = append(obj.patternFlowGtpv1MessageLengthMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter) Set(index int, newObj PatternFlowGtpv1MessageLengthMetricTag) PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv1MessageLengthMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter) Clear() PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv1MessageLengthMetricTag{} + obj.patternFlowGtpv1MessageLengthMetricTagSlice = []PatternFlowGtpv1MessageLengthMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter) clearHolderSlice() PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter { + if len(obj.patternFlowGtpv1MessageLengthMetricTagSlice) > 0 { + obj.patternFlowGtpv1MessageLengthMetricTagSlice = []PatternFlowGtpv1MessageLengthMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter) appendHolderSlice(item PatternFlowGtpv1MessageLengthMetricTag) PatternFlowGtpv1MessageLengthPatternFlowGtpv1MessageLengthMetricTagIter { + obj.patternFlowGtpv1MessageLengthMetricTagSlice = append(obj.patternFlowGtpv1MessageLengthMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv1MessageLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1MessageLength.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv1MessageLength.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv1MessageLengthMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv1MessageLength) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv1MessageLengthChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv1MessageLengthChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv1MessageLengthChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv1MessageLengthChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv1MessageLengthChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv1MessageLengthChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv1MessageLength") + } + } else { + intVal := otg.PatternFlowGtpv1MessageLength_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv1MessageLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_message_length_counter.go b/gosnappi/pattern_flow_gtpv1_message_length_counter.go new file mode 100644 index 00000000..b935ab36 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_message_length_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1MessageLengthCounter ***** +type patternFlowGtpv1MessageLengthCounter struct { + validation + obj *otg.PatternFlowGtpv1MessageLengthCounter + marshaller marshalPatternFlowGtpv1MessageLengthCounter + unMarshaller unMarshalPatternFlowGtpv1MessageLengthCounter +} + +func NewPatternFlowGtpv1MessageLengthCounter() PatternFlowGtpv1MessageLengthCounter { + obj := patternFlowGtpv1MessageLengthCounter{obj: &otg.PatternFlowGtpv1MessageLengthCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1MessageLengthCounter) msg() *otg.PatternFlowGtpv1MessageLengthCounter { + return obj.obj +} + +func (obj *patternFlowGtpv1MessageLengthCounter) setMsg(msg *otg.PatternFlowGtpv1MessageLengthCounter) PatternFlowGtpv1MessageLengthCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1MessageLengthCounter struct { + obj *patternFlowGtpv1MessageLengthCounter +} + +type marshalPatternFlowGtpv1MessageLengthCounter interface { + // ToProto marshals PatternFlowGtpv1MessageLengthCounter to protobuf object *otg.PatternFlowGtpv1MessageLengthCounter + ToProto() (*otg.PatternFlowGtpv1MessageLengthCounter, error) + // ToPbText marshals PatternFlowGtpv1MessageLengthCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1MessageLengthCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1MessageLengthCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1MessageLengthCounter struct { + obj *patternFlowGtpv1MessageLengthCounter +} + +type unMarshalPatternFlowGtpv1MessageLengthCounter interface { + // FromProto unmarshals PatternFlowGtpv1MessageLengthCounter from protobuf object *otg.PatternFlowGtpv1MessageLengthCounter + FromProto(msg *otg.PatternFlowGtpv1MessageLengthCounter) (PatternFlowGtpv1MessageLengthCounter, error) + // FromPbText unmarshals PatternFlowGtpv1MessageLengthCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1MessageLengthCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1MessageLengthCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1MessageLengthCounter) Marshal() marshalPatternFlowGtpv1MessageLengthCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1MessageLengthCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1MessageLengthCounter) Unmarshal() unMarshalPatternFlowGtpv1MessageLengthCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1MessageLengthCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1MessageLengthCounter) ToProto() (*otg.PatternFlowGtpv1MessageLengthCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageLengthCounter) FromProto(msg *otg.PatternFlowGtpv1MessageLengthCounter) (PatternFlowGtpv1MessageLengthCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1MessageLengthCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageLengthCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1MessageLengthCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageLengthCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1MessageLengthCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageLengthCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1MessageLengthCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1MessageLengthCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1MessageLengthCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1MessageLengthCounter) Clone() (PatternFlowGtpv1MessageLengthCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1MessageLengthCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1MessageLengthCounter is integer counter pattern +type PatternFlowGtpv1MessageLengthCounter interface { + Validation + // msg marshals PatternFlowGtpv1MessageLengthCounter to protobuf object *otg.PatternFlowGtpv1MessageLengthCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1MessageLengthCounter + // setMsg unmarshals PatternFlowGtpv1MessageLengthCounter from protobuf object *otg.PatternFlowGtpv1MessageLengthCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1MessageLengthCounter) PatternFlowGtpv1MessageLengthCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv1MessageLengthCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1MessageLengthCounter + // validate validates PatternFlowGtpv1MessageLengthCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1MessageLengthCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv1MessageLengthCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv1MessageLengthCounter + SetStart(value uint32) PatternFlowGtpv1MessageLengthCounter + // HasStart checks if Start has been set in PatternFlowGtpv1MessageLengthCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv1MessageLengthCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv1MessageLengthCounter + SetStep(value uint32) PatternFlowGtpv1MessageLengthCounter + // HasStep checks if Step has been set in PatternFlowGtpv1MessageLengthCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv1MessageLengthCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv1MessageLengthCounter + SetCount(value uint32) PatternFlowGtpv1MessageLengthCounter + // HasCount checks if Count has been set in PatternFlowGtpv1MessageLengthCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1MessageLengthCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1MessageLengthCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv1MessageLengthCounter object +func (obj *patternFlowGtpv1MessageLengthCounter) SetStart(value uint32) PatternFlowGtpv1MessageLengthCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1MessageLengthCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1MessageLengthCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv1MessageLengthCounter object +func (obj *patternFlowGtpv1MessageLengthCounter) SetStep(value uint32) PatternFlowGtpv1MessageLengthCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1MessageLengthCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1MessageLengthCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv1MessageLengthCounter object +func (obj *patternFlowGtpv1MessageLengthCounter) SetCount(value uint32) PatternFlowGtpv1MessageLengthCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv1MessageLengthCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1MessageLengthCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1MessageLengthCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1MessageLengthCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv1MessageLengthCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_message_length_metric_tag.go b/gosnappi/pattern_flow_gtpv1_message_length_metric_tag.go new file mode 100644 index 00000000..e85ade64 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_message_length_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1MessageLengthMetricTag ***** +type patternFlowGtpv1MessageLengthMetricTag struct { + validation + obj *otg.PatternFlowGtpv1MessageLengthMetricTag + marshaller marshalPatternFlowGtpv1MessageLengthMetricTag + unMarshaller unMarshalPatternFlowGtpv1MessageLengthMetricTag +} + +func NewPatternFlowGtpv1MessageLengthMetricTag() PatternFlowGtpv1MessageLengthMetricTag { + obj := patternFlowGtpv1MessageLengthMetricTag{obj: &otg.PatternFlowGtpv1MessageLengthMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1MessageLengthMetricTag) msg() *otg.PatternFlowGtpv1MessageLengthMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv1MessageLengthMetricTag) setMsg(msg *otg.PatternFlowGtpv1MessageLengthMetricTag) PatternFlowGtpv1MessageLengthMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1MessageLengthMetricTag struct { + obj *patternFlowGtpv1MessageLengthMetricTag +} + +type marshalPatternFlowGtpv1MessageLengthMetricTag interface { + // ToProto marshals PatternFlowGtpv1MessageLengthMetricTag to protobuf object *otg.PatternFlowGtpv1MessageLengthMetricTag + ToProto() (*otg.PatternFlowGtpv1MessageLengthMetricTag, error) + // ToPbText marshals PatternFlowGtpv1MessageLengthMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1MessageLengthMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1MessageLengthMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1MessageLengthMetricTag struct { + obj *patternFlowGtpv1MessageLengthMetricTag +} + +type unMarshalPatternFlowGtpv1MessageLengthMetricTag interface { + // FromProto unmarshals PatternFlowGtpv1MessageLengthMetricTag from protobuf object *otg.PatternFlowGtpv1MessageLengthMetricTag + FromProto(msg *otg.PatternFlowGtpv1MessageLengthMetricTag) (PatternFlowGtpv1MessageLengthMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv1MessageLengthMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1MessageLengthMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1MessageLengthMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1MessageLengthMetricTag) Marshal() marshalPatternFlowGtpv1MessageLengthMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1MessageLengthMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1MessageLengthMetricTag) Unmarshal() unMarshalPatternFlowGtpv1MessageLengthMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1MessageLengthMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1MessageLengthMetricTag) ToProto() (*otg.PatternFlowGtpv1MessageLengthMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageLengthMetricTag) FromProto(msg *otg.PatternFlowGtpv1MessageLengthMetricTag) (PatternFlowGtpv1MessageLengthMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1MessageLengthMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageLengthMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1MessageLengthMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageLengthMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1MessageLengthMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageLengthMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1MessageLengthMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1MessageLengthMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1MessageLengthMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1MessageLengthMetricTag) Clone() (PatternFlowGtpv1MessageLengthMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1MessageLengthMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1MessageLengthMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv1MessageLengthMetricTag interface { + Validation + // msg marshals PatternFlowGtpv1MessageLengthMetricTag to protobuf object *otg.PatternFlowGtpv1MessageLengthMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1MessageLengthMetricTag + // setMsg unmarshals PatternFlowGtpv1MessageLengthMetricTag from protobuf object *otg.PatternFlowGtpv1MessageLengthMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1MessageLengthMetricTag) PatternFlowGtpv1MessageLengthMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1MessageLengthMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1MessageLengthMetricTag + // validate validates PatternFlowGtpv1MessageLengthMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1MessageLengthMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv1MessageLengthMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv1MessageLengthMetricTag + SetName(value string) PatternFlowGtpv1MessageLengthMetricTag + // Offset returns uint32, set in PatternFlowGtpv1MessageLengthMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv1MessageLengthMetricTag + SetOffset(value uint32) PatternFlowGtpv1MessageLengthMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv1MessageLengthMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv1MessageLengthMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv1MessageLengthMetricTag + SetLength(value uint32) PatternFlowGtpv1MessageLengthMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv1MessageLengthMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv1MessageLengthMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv1MessageLengthMetricTag object +func (obj *patternFlowGtpv1MessageLengthMetricTag) SetName(value string) PatternFlowGtpv1MessageLengthMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1MessageLengthMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1MessageLengthMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv1MessageLengthMetricTag object +func (obj *patternFlowGtpv1MessageLengthMetricTag) SetOffset(value uint32) PatternFlowGtpv1MessageLengthMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1MessageLengthMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1MessageLengthMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv1MessageLengthMetricTag object +func (obj *patternFlowGtpv1MessageLengthMetricTag) SetLength(value uint32) PatternFlowGtpv1MessageLengthMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv1MessageLengthMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv1MessageLengthMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1MessageLengthMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv1MessageLengthMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv1MessageLengthMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_message_type.go b/gosnappi/pattern_flow_gtpv1_message_type.go new file mode 100644 index 00000000..12fd003e --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_message_type.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1MessageType ***** +type patternFlowGtpv1MessageType struct { + validation + obj *otg.PatternFlowGtpv1MessageType + marshaller marshalPatternFlowGtpv1MessageType + unMarshaller unMarshalPatternFlowGtpv1MessageType + incrementHolder PatternFlowGtpv1MessageTypeCounter + decrementHolder PatternFlowGtpv1MessageTypeCounter + metricTagsHolder PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter +} + +func NewPatternFlowGtpv1MessageType() PatternFlowGtpv1MessageType { + obj := patternFlowGtpv1MessageType{obj: &otg.PatternFlowGtpv1MessageType{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1MessageType) msg() *otg.PatternFlowGtpv1MessageType { + return obj.obj +} + +func (obj *patternFlowGtpv1MessageType) setMsg(msg *otg.PatternFlowGtpv1MessageType) PatternFlowGtpv1MessageType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1MessageType struct { + obj *patternFlowGtpv1MessageType +} + +type marshalPatternFlowGtpv1MessageType interface { + // ToProto marshals PatternFlowGtpv1MessageType to protobuf object *otg.PatternFlowGtpv1MessageType + ToProto() (*otg.PatternFlowGtpv1MessageType, error) + // ToPbText marshals PatternFlowGtpv1MessageType to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1MessageType to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1MessageType to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1MessageType struct { + obj *patternFlowGtpv1MessageType +} + +type unMarshalPatternFlowGtpv1MessageType interface { + // FromProto unmarshals PatternFlowGtpv1MessageType from protobuf object *otg.PatternFlowGtpv1MessageType + FromProto(msg *otg.PatternFlowGtpv1MessageType) (PatternFlowGtpv1MessageType, error) + // FromPbText unmarshals PatternFlowGtpv1MessageType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1MessageType from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1MessageType from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1MessageType) Marshal() marshalPatternFlowGtpv1MessageType { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1MessageType{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1MessageType) Unmarshal() unMarshalPatternFlowGtpv1MessageType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1MessageType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1MessageType) ToProto() (*otg.PatternFlowGtpv1MessageType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageType) FromProto(msg *otg.PatternFlowGtpv1MessageType) (PatternFlowGtpv1MessageType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1MessageType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1MessageType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1MessageType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1MessageType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1MessageType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1MessageType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1MessageType) Clone() (PatternFlowGtpv1MessageType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1MessageType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv1MessageType) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv1MessageType is the type of GTP message Different types of messages are defined in 3GPP TS 29.060 section 7.1 +type PatternFlowGtpv1MessageType interface { + Validation + // msg marshals PatternFlowGtpv1MessageType to protobuf object *otg.PatternFlowGtpv1MessageType + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1MessageType + // setMsg unmarshals PatternFlowGtpv1MessageType from protobuf object *otg.PatternFlowGtpv1MessageType + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1MessageType) PatternFlowGtpv1MessageType + // provides marshal interface + Marshal() marshalPatternFlowGtpv1MessageType + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1MessageType + // validate validates PatternFlowGtpv1MessageType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1MessageType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv1MessageTypeChoiceEnum, set in PatternFlowGtpv1MessageType + Choice() PatternFlowGtpv1MessageTypeChoiceEnum + // setChoice assigns PatternFlowGtpv1MessageTypeChoiceEnum provided by user to PatternFlowGtpv1MessageType + setChoice(value PatternFlowGtpv1MessageTypeChoiceEnum) PatternFlowGtpv1MessageType + // HasChoice checks if Choice has been set in PatternFlowGtpv1MessageType + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv1MessageType. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv1MessageType + SetValue(value uint32) PatternFlowGtpv1MessageType + // HasValue checks if Value has been set in PatternFlowGtpv1MessageType + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv1MessageType. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv1MessageType + SetValues(value []uint32) PatternFlowGtpv1MessageType + // Increment returns PatternFlowGtpv1MessageTypeCounter, set in PatternFlowGtpv1MessageType. + // PatternFlowGtpv1MessageTypeCounter is integer counter pattern + Increment() PatternFlowGtpv1MessageTypeCounter + // SetIncrement assigns PatternFlowGtpv1MessageTypeCounter provided by user to PatternFlowGtpv1MessageType. + // PatternFlowGtpv1MessageTypeCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv1MessageTypeCounter) PatternFlowGtpv1MessageType + // HasIncrement checks if Increment has been set in PatternFlowGtpv1MessageType + HasIncrement() bool + // Decrement returns PatternFlowGtpv1MessageTypeCounter, set in PatternFlowGtpv1MessageType. + // PatternFlowGtpv1MessageTypeCounter is integer counter pattern + Decrement() PatternFlowGtpv1MessageTypeCounter + // SetDecrement assigns PatternFlowGtpv1MessageTypeCounter provided by user to PatternFlowGtpv1MessageType. + // PatternFlowGtpv1MessageTypeCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv1MessageTypeCounter) PatternFlowGtpv1MessageType + // HasDecrement checks if Decrement has been set in PatternFlowGtpv1MessageType + HasDecrement() bool + // MetricTags returns PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIterIter, set in PatternFlowGtpv1MessageType + MetricTags() PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter + setNil() +} + +type PatternFlowGtpv1MessageTypeChoiceEnum string + +// Enum of Choice on PatternFlowGtpv1MessageType +var PatternFlowGtpv1MessageTypeChoice = struct { + VALUE PatternFlowGtpv1MessageTypeChoiceEnum + VALUES PatternFlowGtpv1MessageTypeChoiceEnum + INCREMENT PatternFlowGtpv1MessageTypeChoiceEnum + DECREMENT PatternFlowGtpv1MessageTypeChoiceEnum +}{ + VALUE: PatternFlowGtpv1MessageTypeChoiceEnum("value"), + VALUES: PatternFlowGtpv1MessageTypeChoiceEnum("values"), + INCREMENT: PatternFlowGtpv1MessageTypeChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv1MessageTypeChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv1MessageType) Choice() PatternFlowGtpv1MessageTypeChoiceEnum { + return PatternFlowGtpv1MessageTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv1MessageType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv1MessageType) setChoice(value PatternFlowGtpv1MessageTypeChoiceEnum) PatternFlowGtpv1MessageType { + intValue, ok := otg.PatternFlowGtpv1MessageType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv1MessageTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv1MessageType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv1MessageTypeChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv1MessageTypeChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv1MessageTypeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv1MessageTypeCounter().msg() + } + + if value == PatternFlowGtpv1MessageTypeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv1MessageTypeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1MessageType) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv1MessageTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1MessageType) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv1MessageType object +func (obj *patternFlowGtpv1MessageType) SetValue(value uint32) PatternFlowGtpv1MessageType { + obj.setChoice(PatternFlowGtpv1MessageTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv1MessageType) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv1MessageType object +func (obj *patternFlowGtpv1MessageType) SetValues(value []uint32) PatternFlowGtpv1MessageType { + obj.setChoice(PatternFlowGtpv1MessageTypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv1MessageTypeCounter +func (obj *patternFlowGtpv1MessageType) Increment() PatternFlowGtpv1MessageTypeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv1MessageTypeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv1MessageTypeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv1MessageTypeCounter +func (obj *patternFlowGtpv1MessageType) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv1MessageTypeCounter value in the PatternFlowGtpv1MessageType object +func (obj *patternFlowGtpv1MessageType) SetIncrement(value PatternFlowGtpv1MessageTypeCounter) PatternFlowGtpv1MessageType { + obj.setChoice(PatternFlowGtpv1MessageTypeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1MessageTypeCounter +func (obj *patternFlowGtpv1MessageType) Decrement() PatternFlowGtpv1MessageTypeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv1MessageTypeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv1MessageTypeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1MessageTypeCounter +func (obj *patternFlowGtpv1MessageType) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv1MessageTypeCounter value in the PatternFlowGtpv1MessageType object +func (obj *patternFlowGtpv1MessageType) SetDecrement(value PatternFlowGtpv1MessageTypeCounter) PatternFlowGtpv1MessageType { + obj.setChoice(PatternFlowGtpv1MessageTypeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv1MessageTypeMetricTag +func (obj *patternFlowGtpv1MessageType) MetricTags() PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv1MessageTypeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter struct { + obj *patternFlowGtpv1MessageType + patternFlowGtpv1MessageTypeMetricTagSlice []PatternFlowGtpv1MessageTypeMetricTag + fieldPtr *[]*otg.PatternFlowGtpv1MessageTypeMetricTag +} + +func newPatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter(ptr *[]*otg.PatternFlowGtpv1MessageTypeMetricTag) PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter { + return &patternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter interface { + setMsg(*patternFlowGtpv1MessageType) PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter + Items() []PatternFlowGtpv1MessageTypeMetricTag + Add() PatternFlowGtpv1MessageTypeMetricTag + Append(items ...PatternFlowGtpv1MessageTypeMetricTag) PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter + Set(index int, newObj PatternFlowGtpv1MessageTypeMetricTag) PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter + Clear() PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter + clearHolderSlice() PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter + appendHolderSlice(item PatternFlowGtpv1MessageTypeMetricTag) PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter +} + +func (obj *patternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter) setMsg(msg *patternFlowGtpv1MessageType) PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv1MessageTypeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter) Items() []PatternFlowGtpv1MessageTypeMetricTag { + return obj.patternFlowGtpv1MessageTypeMetricTagSlice +} + +func (obj *patternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter) Add() PatternFlowGtpv1MessageTypeMetricTag { + newObj := &otg.PatternFlowGtpv1MessageTypeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv1MessageTypeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv1MessageTypeMetricTagSlice = append(obj.patternFlowGtpv1MessageTypeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter) Append(items ...PatternFlowGtpv1MessageTypeMetricTag) PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv1MessageTypeMetricTagSlice = append(obj.patternFlowGtpv1MessageTypeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter) Set(index int, newObj PatternFlowGtpv1MessageTypeMetricTag) PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv1MessageTypeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter) Clear() PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv1MessageTypeMetricTag{} + obj.patternFlowGtpv1MessageTypeMetricTagSlice = []PatternFlowGtpv1MessageTypeMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter) clearHolderSlice() PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter { + if len(obj.patternFlowGtpv1MessageTypeMetricTagSlice) > 0 { + obj.patternFlowGtpv1MessageTypeMetricTagSlice = []PatternFlowGtpv1MessageTypeMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter) appendHolderSlice(item PatternFlowGtpv1MessageTypeMetricTag) PatternFlowGtpv1MessageTypePatternFlowGtpv1MessageTypeMetricTagIter { + obj.patternFlowGtpv1MessageTypeMetricTagSlice = append(obj.patternFlowGtpv1MessageTypeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv1MessageType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1MessageType.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv1MessageType.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv1MessageTypeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv1MessageType) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv1MessageTypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv1MessageTypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv1MessageTypeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv1MessageTypeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv1MessageTypeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv1MessageTypeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv1MessageType") + } + } else { + intVal := otg.PatternFlowGtpv1MessageType_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv1MessageType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_message_type_counter.go b/gosnappi/pattern_flow_gtpv1_message_type_counter.go new file mode 100644 index 00000000..7a1fb026 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_message_type_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1MessageTypeCounter ***** +type patternFlowGtpv1MessageTypeCounter struct { + validation + obj *otg.PatternFlowGtpv1MessageTypeCounter + marshaller marshalPatternFlowGtpv1MessageTypeCounter + unMarshaller unMarshalPatternFlowGtpv1MessageTypeCounter +} + +func NewPatternFlowGtpv1MessageTypeCounter() PatternFlowGtpv1MessageTypeCounter { + obj := patternFlowGtpv1MessageTypeCounter{obj: &otg.PatternFlowGtpv1MessageTypeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1MessageTypeCounter) msg() *otg.PatternFlowGtpv1MessageTypeCounter { + return obj.obj +} + +func (obj *patternFlowGtpv1MessageTypeCounter) setMsg(msg *otg.PatternFlowGtpv1MessageTypeCounter) PatternFlowGtpv1MessageTypeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1MessageTypeCounter struct { + obj *patternFlowGtpv1MessageTypeCounter +} + +type marshalPatternFlowGtpv1MessageTypeCounter interface { + // ToProto marshals PatternFlowGtpv1MessageTypeCounter to protobuf object *otg.PatternFlowGtpv1MessageTypeCounter + ToProto() (*otg.PatternFlowGtpv1MessageTypeCounter, error) + // ToPbText marshals PatternFlowGtpv1MessageTypeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1MessageTypeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1MessageTypeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1MessageTypeCounter struct { + obj *patternFlowGtpv1MessageTypeCounter +} + +type unMarshalPatternFlowGtpv1MessageTypeCounter interface { + // FromProto unmarshals PatternFlowGtpv1MessageTypeCounter from protobuf object *otg.PatternFlowGtpv1MessageTypeCounter + FromProto(msg *otg.PatternFlowGtpv1MessageTypeCounter) (PatternFlowGtpv1MessageTypeCounter, error) + // FromPbText unmarshals PatternFlowGtpv1MessageTypeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1MessageTypeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1MessageTypeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1MessageTypeCounter) Marshal() marshalPatternFlowGtpv1MessageTypeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1MessageTypeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1MessageTypeCounter) Unmarshal() unMarshalPatternFlowGtpv1MessageTypeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1MessageTypeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1MessageTypeCounter) ToProto() (*otg.PatternFlowGtpv1MessageTypeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageTypeCounter) FromProto(msg *otg.PatternFlowGtpv1MessageTypeCounter) (PatternFlowGtpv1MessageTypeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1MessageTypeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageTypeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1MessageTypeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageTypeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1MessageTypeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageTypeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1MessageTypeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1MessageTypeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1MessageTypeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1MessageTypeCounter) Clone() (PatternFlowGtpv1MessageTypeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1MessageTypeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1MessageTypeCounter is integer counter pattern +type PatternFlowGtpv1MessageTypeCounter interface { + Validation + // msg marshals PatternFlowGtpv1MessageTypeCounter to protobuf object *otg.PatternFlowGtpv1MessageTypeCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1MessageTypeCounter + // setMsg unmarshals PatternFlowGtpv1MessageTypeCounter from protobuf object *otg.PatternFlowGtpv1MessageTypeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1MessageTypeCounter) PatternFlowGtpv1MessageTypeCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv1MessageTypeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1MessageTypeCounter + // validate validates PatternFlowGtpv1MessageTypeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1MessageTypeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv1MessageTypeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv1MessageTypeCounter + SetStart(value uint32) PatternFlowGtpv1MessageTypeCounter + // HasStart checks if Start has been set in PatternFlowGtpv1MessageTypeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv1MessageTypeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv1MessageTypeCounter + SetStep(value uint32) PatternFlowGtpv1MessageTypeCounter + // HasStep checks if Step has been set in PatternFlowGtpv1MessageTypeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv1MessageTypeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv1MessageTypeCounter + SetCount(value uint32) PatternFlowGtpv1MessageTypeCounter + // HasCount checks if Count has been set in PatternFlowGtpv1MessageTypeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1MessageTypeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1MessageTypeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv1MessageTypeCounter object +func (obj *patternFlowGtpv1MessageTypeCounter) SetStart(value uint32) PatternFlowGtpv1MessageTypeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1MessageTypeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1MessageTypeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv1MessageTypeCounter object +func (obj *patternFlowGtpv1MessageTypeCounter) SetStep(value uint32) PatternFlowGtpv1MessageTypeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1MessageTypeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1MessageTypeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv1MessageTypeCounter object +func (obj *patternFlowGtpv1MessageTypeCounter) SetCount(value uint32) PatternFlowGtpv1MessageTypeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv1MessageTypeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1MessageTypeCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1MessageTypeCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1MessageTypeCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv1MessageTypeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_message_type_metric_tag.go b/gosnappi/pattern_flow_gtpv1_message_type_metric_tag.go new file mode 100644 index 00000000..6920c70d --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_message_type_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1MessageTypeMetricTag ***** +type patternFlowGtpv1MessageTypeMetricTag struct { + validation + obj *otg.PatternFlowGtpv1MessageTypeMetricTag + marshaller marshalPatternFlowGtpv1MessageTypeMetricTag + unMarshaller unMarshalPatternFlowGtpv1MessageTypeMetricTag +} + +func NewPatternFlowGtpv1MessageTypeMetricTag() PatternFlowGtpv1MessageTypeMetricTag { + obj := patternFlowGtpv1MessageTypeMetricTag{obj: &otg.PatternFlowGtpv1MessageTypeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1MessageTypeMetricTag) msg() *otg.PatternFlowGtpv1MessageTypeMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv1MessageTypeMetricTag) setMsg(msg *otg.PatternFlowGtpv1MessageTypeMetricTag) PatternFlowGtpv1MessageTypeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1MessageTypeMetricTag struct { + obj *patternFlowGtpv1MessageTypeMetricTag +} + +type marshalPatternFlowGtpv1MessageTypeMetricTag interface { + // ToProto marshals PatternFlowGtpv1MessageTypeMetricTag to protobuf object *otg.PatternFlowGtpv1MessageTypeMetricTag + ToProto() (*otg.PatternFlowGtpv1MessageTypeMetricTag, error) + // ToPbText marshals PatternFlowGtpv1MessageTypeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1MessageTypeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1MessageTypeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1MessageTypeMetricTag struct { + obj *patternFlowGtpv1MessageTypeMetricTag +} + +type unMarshalPatternFlowGtpv1MessageTypeMetricTag interface { + // FromProto unmarshals PatternFlowGtpv1MessageTypeMetricTag from protobuf object *otg.PatternFlowGtpv1MessageTypeMetricTag + FromProto(msg *otg.PatternFlowGtpv1MessageTypeMetricTag) (PatternFlowGtpv1MessageTypeMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv1MessageTypeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1MessageTypeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1MessageTypeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1MessageTypeMetricTag) Marshal() marshalPatternFlowGtpv1MessageTypeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1MessageTypeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1MessageTypeMetricTag) Unmarshal() unMarshalPatternFlowGtpv1MessageTypeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1MessageTypeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1MessageTypeMetricTag) ToProto() (*otg.PatternFlowGtpv1MessageTypeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageTypeMetricTag) FromProto(msg *otg.PatternFlowGtpv1MessageTypeMetricTag) (PatternFlowGtpv1MessageTypeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1MessageTypeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageTypeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1MessageTypeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageTypeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1MessageTypeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1MessageTypeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1MessageTypeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1MessageTypeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1MessageTypeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1MessageTypeMetricTag) Clone() (PatternFlowGtpv1MessageTypeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1MessageTypeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1MessageTypeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv1MessageTypeMetricTag interface { + Validation + // msg marshals PatternFlowGtpv1MessageTypeMetricTag to protobuf object *otg.PatternFlowGtpv1MessageTypeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1MessageTypeMetricTag + // setMsg unmarshals PatternFlowGtpv1MessageTypeMetricTag from protobuf object *otg.PatternFlowGtpv1MessageTypeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1MessageTypeMetricTag) PatternFlowGtpv1MessageTypeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1MessageTypeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1MessageTypeMetricTag + // validate validates PatternFlowGtpv1MessageTypeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1MessageTypeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv1MessageTypeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv1MessageTypeMetricTag + SetName(value string) PatternFlowGtpv1MessageTypeMetricTag + // Offset returns uint32, set in PatternFlowGtpv1MessageTypeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv1MessageTypeMetricTag + SetOffset(value uint32) PatternFlowGtpv1MessageTypeMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv1MessageTypeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv1MessageTypeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv1MessageTypeMetricTag + SetLength(value uint32) PatternFlowGtpv1MessageTypeMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv1MessageTypeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv1MessageTypeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv1MessageTypeMetricTag object +func (obj *patternFlowGtpv1MessageTypeMetricTag) SetName(value string) PatternFlowGtpv1MessageTypeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1MessageTypeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1MessageTypeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv1MessageTypeMetricTag object +func (obj *patternFlowGtpv1MessageTypeMetricTag) SetOffset(value uint32) PatternFlowGtpv1MessageTypeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1MessageTypeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1MessageTypeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv1MessageTypeMetricTag object +func (obj *patternFlowGtpv1MessageTypeMetricTag) SetLength(value uint32) PatternFlowGtpv1MessageTypeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv1MessageTypeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv1MessageTypeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1MessageTypeMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv1MessageTypeMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv1MessageTypeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_n_pdu_number.go b/gosnappi/pattern_flow_gtpv1_n_pdu_number.go new file mode 100644 index 00000000..a006f386 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_n_pdu_number.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1NPduNumber ***** +type patternFlowGtpv1NPduNumber struct { + validation + obj *otg.PatternFlowGtpv1NPduNumber + marshaller marshalPatternFlowGtpv1NPduNumber + unMarshaller unMarshalPatternFlowGtpv1NPduNumber + incrementHolder PatternFlowGtpv1NPduNumberCounter + decrementHolder PatternFlowGtpv1NPduNumberCounter + metricTagsHolder PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter +} + +func NewPatternFlowGtpv1NPduNumber() PatternFlowGtpv1NPduNumber { + obj := patternFlowGtpv1NPduNumber{obj: &otg.PatternFlowGtpv1NPduNumber{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1NPduNumber) msg() *otg.PatternFlowGtpv1NPduNumber { + return obj.obj +} + +func (obj *patternFlowGtpv1NPduNumber) setMsg(msg *otg.PatternFlowGtpv1NPduNumber) PatternFlowGtpv1NPduNumber { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1NPduNumber struct { + obj *patternFlowGtpv1NPduNumber +} + +type marshalPatternFlowGtpv1NPduNumber interface { + // ToProto marshals PatternFlowGtpv1NPduNumber to protobuf object *otg.PatternFlowGtpv1NPduNumber + ToProto() (*otg.PatternFlowGtpv1NPduNumber, error) + // ToPbText marshals PatternFlowGtpv1NPduNumber to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1NPduNumber to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1NPduNumber to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1NPduNumber struct { + obj *patternFlowGtpv1NPduNumber +} + +type unMarshalPatternFlowGtpv1NPduNumber interface { + // FromProto unmarshals PatternFlowGtpv1NPduNumber from protobuf object *otg.PatternFlowGtpv1NPduNumber + FromProto(msg *otg.PatternFlowGtpv1NPduNumber) (PatternFlowGtpv1NPduNumber, error) + // FromPbText unmarshals PatternFlowGtpv1NPduNumber from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1NPduNumber from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1NPduNumber from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1NPduNumber) Marshal() marshalPatternFlowGtpv1NPduNumber { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1NPduNumber{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1NPduNumber) Unmarshal() unMarshalPatternFlowGtpv1NPduNumber { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1NPduNumber{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1NPduNumber) ToProto() (*otg.PatternFlowGtpv1NPduNumber, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1NPduNumber) FromProto(msg *otg.PatternFlowGtpv1NPduNumber) (PatternFlowGtpv1NPduNumber, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1NPduNumber) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1NPduNumber) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1NPduNumber) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1NPduNumber) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1NPduNumber) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1NPduNumber) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1NPduNumber) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1NPduNumber) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1NPduNumber) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1NPduNumber) Clone() (PatternFlowGtpv1NPduNumber, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1NPduNumber() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv1NPduNumber) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv1NPduNumber is n-PDU number. Exists if any of the e_flag, s_flag, or pn_flag bits are on. Must be interpreted only if the pn_flag bit is on. +type PatternFlowGtpv1NPduNumber interface { + Validation + // msg marshals PatternFlowGtpv1NPduNumber to protobuf object *otg.PatternFlowGtpv1NPduNumber + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1NPduNumber + // setMsg unmarshals PatternFlowGtpv1NPduNumber from protobuf object *otg.PatternFlowGtpv1NPduNumber + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1NPduNumber) PatternFlowGtpv1NPduNumber + // provides marshal interface + Marshal() marshalPatternFlowGtpv1NPduNumber + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1NPduNumber + // validate validates PatternFlowGtpv1NPduNumber + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1NPduNumber, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv1NPduNumberChoiceEnum, set in PatternFlowGtpv1NPduNumber + Choice() PatternFlowGtpv1NPduNumberChoiceEnum + // setChoice assigns PatternFlowGtpv1NPduNumberChoiceEnum provided by user to PatternFlowGtpv1NPduNumber + setChoice(value PatternFlowGtpv1NPduNumberChoiceEnum) PatternFlowGtpv1NPduNumber + // HasChoice checks if Choice has been set in PatternFlowGtpv1NPduNumber + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv1NPduNumber. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv1NPduNumber + SetValue(value uint32) PatternFlowGtpv1NPduNumber + // HasValue checks if Value has been set in PatternFlowGtpv1NPduNumber + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv1NPduNumber. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv1NPduNumber + SetValues(value []uint32) PatternFlowGtpv1NPduNumber + // Increment returns PatternFlowGtpv1NPduNumberCounter, set in PatternFlowGtpv1NPduNumber. + // PatternFlowGtpv1NPduNumberCounter is integer counter pattern + Increment() PatternFlowGtpv1NPduNumberCounter + // SetIncrement assigns PatternFlowGtpv1NPduNumberCounter provided by user to PatternFlowGtpv1NPduNumber. + // PatternFlowGtpv1NPduNumberCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv1NPduNumberCounter) PatternFlowGtpv1NPduNumber + // HasIncrement checks if Increment has been set in PatternFlowGtpv1NPduNumber + HasIncrement() bool + // Decrement returns PatternFlowGtpv1NPduNumberCounter, set in PatternFlowGtpv1NPduNumber. + // PatternFlowGtpv1NPduNumberCounter is integer counter pattern + Decrement() PatternFlowGtpv1NPduNumberCounter + // SetDecrement assigns PatternFlowGtpv1NPduNumberCounter provided by user to PatternFlowGtpv1NPduNumber. + // PatternFlowGtpv1NPduNumberCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv1NPduNumberCounter) PatternFlowGtpv1NPduNumber + // HasDecrement checks if Decrement has been set in PatternFlowGtpv1NPduNumber + HasDecrement() bool + // MetricTags returns PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIterIter, set in PatternFlowGtpv1NPduNumber + MetricTags() PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter + setNil() +} + +type PatternFlowGtpv1NPduNumberChoiceEnum string + +// Enum of Choice on PatternFlowGtpv1NPduNumber +var PatternFlowGtpv1NPduNumberChoice = struct { + VALUE PatternFlowGtpv1NPduNumberChoiceEnum + VALUES PatternFlowGtpv1NPduNumberChoiceEnum + INCREMENT PatternFlowGtpv1NPduNumberChoiceEnum + DECREMENT PatternFlowGtpv1NPduNumberChoiceEnum +}{ + VALUE: PatternFlowGtpv1NPduNumberChoiceEnum("value"), + VALUES: PatternFlowGtpv1NPduNumberChoiceEnum("values"), + INCREMENT: PatternFlowGtpv1NPduNumberChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv1NPduNumberChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv1NPduNumber) Choice() PatternFlowGtpv1NPduNumberChoiceEnum { + return PatternFlowGtpv1NPduNumberChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv1NPduNumber) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv1NPduNumber) setChoice(value PatternFlowGtpv1NPduNumberChoiceEnum) PatternFlowGtpv1NPduNumber { + intValue, ok := otg.PatternFlowGtpv1NPduNumber_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv1NPduNumberChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv1NPduNumber_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv1NPduNumberChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv1NPduNumberChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv1NPduNumberChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv1NPduNumberCounter().msg() + } + + if value == PatternFlowGtpv1NPduNumberChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv1NPduNumberCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1NPduNumber) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv1NPduNumberChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1NPduNumber) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv1NPduNumber object +func (obj *patternFlowGtpv1NPduNumber) SetValue(value uint32) PatternFlowGtpv1NPduNumber { + obj.setChoice(PatternFlowGtpv1NPduNumberChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv1NPduNumber) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv1NPduNumber object +func (obj *patternFlowGtpv1NPduNumber) SetValues(value []uint32) PatternFlowGtpv1NPduNumber { + obj.setChoice(PatternFlowGtpv1NPduNumberChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv1NPduNumberCounter +func (obj *patternFlowGtpv1NPduNumber) Increment() PatternFlowGtpv1NPduNumberCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv1NPduNumberChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv1NPduNumberCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv1NPduNumberCounter +func (obj *patternFlowGtpv1NPduNumber) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv1NPduNumberCounter value in the PatternFlowGtpv1NPduNumber object +func (obj *patternFlowGtpv1NPduNumber) SetIncrement(value PatternFlowGtpv1NPduNumberCounter) PatternFlowGtpv1NPduNumber { + obj.setChoice(PatternFlowGtpv1NPduNumberChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1NPduNumberCounter +func (obj *patternFlowGtpv1NPduNumber) Decrement() PatternFlowGtpv1NPduNumberCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv1NPduNumberChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv1NPduNumberCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1NPduNumberCounter +func (obj *patternFlowGtpv1NPduNumber) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv1NPduNumberCounter value in the PatternFlowGtpv1NPduNumber object +func (obj *patternFlowGtpv1NPduNumber) SetDecrement(value PatternFlowGtpv1NPduNumberCounter) PatternFlowGtpv1NPduNumber { + obj.setChoice(PatternFlowGtpv1NPduNumberChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv1NPduNumberMetricTag +func (obj *patternFlowGtpv1NPduNumber) MetricTags() PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv1NPduNumberMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter struct { + obj *patternFlowGtpv1NPduNumber + patternFlowGtpv1NPduNumberMetricTagSlice []PatternFlowGtpv1NPduNumberMetricTag + fieldPtr *[]*otg.PatternFlowGtpv1NPduNumberMetricTag +} + +func newPatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter(ptr *[]*otg.PatternFlowGtpv1NPduNumberMetricTag) PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter { + return &patternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter interface { + setMsg(*patternFlowGtpv1NPduNumber) PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter + Items() []PatternFlowGtpv1NPduNumberMetricTag + Add() PatternFlowGtpv1NPduNumberMetricTag + Append(items ...PatternFlowGtpv1NPduNumberMetricTag) PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter + Set(index int, newObj PatternFlowGtpv1NPduNumberMetricTag) PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter + Clear() PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter + clearHolderSlice() PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter + appendHolderSlice(item PatternFlowGtpv1NPduNumberMetricTag) PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter +} + +func (obj *patternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter) setMsg(msg *patternFlowGtpv1NPduNumber) PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv1NPduNumberMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter) Items() []PatternFlowGtpv1NPduNumberMetricTag { + return obj.patternFlowGtpv1NPduNumberMetricTagSlice +} + +func (obj *patternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter) Add() PatternFlowGtpv1NPduNumberMetricTag { + newObj := &otg.PatternFlowGtpv1NPduNumberMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv1NPduNumberMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv1NPduNumberMetricTagSlice = append(obj.patternFlowGtpv1NPduNumberMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter) Append(items ...PatternFlowGtpv1NPduNumberMetricTag) PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv1NPduNumberMetricTagSlice = append(obj.patternFlowGtpv1NPduNumberMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter) Set(index int, newObj PatternFlowGtpv1NPduNumberMetricTag) PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv1NPduNumberMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter) Clear() PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv1NPduNumberMetricTag{} + obj.patternFlowGtpv1NPduNumberMetricTagSlice = []PatternFlowGtpv1NPduNumberMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter) clearHolderSlice() PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter { + if len(obj.patternFlowGtpv1NPduNumberMetricTagSlice) > 0 { + obj.patternFlowGtpv1NPduNumberMetricTagSlice = []PatternFlowGtpv1NPduNumberMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter) appendHolderSlice(item PatternFlowGtpv1NPduNumberMetricTag) PatternFlowGtpv1NPduNumberPatternFlowGtpv1NPduNumberMetricTagIter { + obj.patternFlowGtpv1NPduNumberMetricTagSlice = append(obj.patternFlowGtpv1NPduNumberMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv1NPduNumber) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1NPduNumber.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv1NPduNumber.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv1NPduNumberMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv1NPduNumber) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv1NPduNumberChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv1NPduNumberChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv1NPduNumberChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv1NPduNumberChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv1NPduNumberChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv1NPduNumberChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv1NPduNumber") + } + } else { + intVal := otg.PatternFlowGtpv1NPduNumber_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv1NPduNumber_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_n_pdu_number_counter.go b/gosnappi/pattern_flow_gtpv1_n_pdu_number_counter.go new file mode 100644 index 00000000..435b2c6b --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_n_pdu_number_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1NPduNumberCounter ***** +type patternFlowGtpv1NPduNumberCounter struct { + validation + obj *otg.PatternFlowGtpv1NPduNumberCounter + marshaller marshalPatternFlowGtpv1NPduNumberCounter + unMarshaller unMarshalPatternFlowGtpv1NPduNumberCounter +} + +func NewPatternFlowGtpv1NPduNumberCounter() PatternFlowGtpv1NPduNumberCounter { + obj := patternFlowGtpv1NPduNumberCounter{obj: &otg.PatternFlowGtpv1NPduNumberCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1NPduNumberCounter) msg() *otg.PatternFlowGtpv1NPduNumberCounter { + return obj.obj +} + +func (obj *patternFlowGtpv1NPduNumberCounter) setMsg(msg *otg.PatternFlowGtpv1NPduNumberCounter) PatternFlowGtpv1NPduNumberCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1NPduNumberCounter struct { + obj *patternFlowGtpv1NPduNumberCounter +} + +type marshalPatternFlowGtpv1NPduNumberCounter interface { + // ToProto marshals PatternFlowGtpv1NPduNumberCounter to protobuf object *otg.PatternFlowGtpv1NPduNumberCounter + ToProto() (*otg.PatternFlowGtpv1NPduNumberCounter, error) + // ToPbText marshals PatternFlowGtpv1NPduNumberCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1NPduNumberCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1NPduNumberCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1NPduNumberCounter struct { + obj *patternFlowGtpv1NPduNumberCounter +} + +type unMarshalPatternFlowGtpv1NPduNumberCounter interface { + // FromProto unmarshals PatternFlowGtpv1NPduNumberCounter from protobuf object *otg.PatternFlowGtpv1NPduNumberCounter + FromProto(msg *otg.PatternFlowGtpv1NPduNumberCounter) (PatternFlowGtpv1NPduNumberCounter, error) + // FromPbText unmarshals PatternFlowGtpv1NPduNumberCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1NPduNumberCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1NPduNumberCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1NPduNumberCounter) Marshal() marshalPatternFlowGtpv1NPduNumberCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1NPduNumberCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1NPduNumberCounter) Unmarshal() unMarshalPatternFlowGtpv1NPduNumberCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1NPduNumberCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1NPduNumberCounter) ToProto() (*otg.PatternFlowGtpv1NPduNumberCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1NPduNumberCounter) FromProto(msg *otg.PatternFlowGtpv1NPduNumberCounter) (PatternFlowGtpv1NPduNumberCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1NPduNumberCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1NPduNumberCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1NPduNumberCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1NPduNumberCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1NPduNumberCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1NPduNumberCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1NPduNumberCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1NPduNumberCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1NPduNumberCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1NPduNumberCounter) Clone() (PatternFlowGtpv1NPduNumberCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1NPduNumberCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1NPduNumberCounter is integer counter pattern +type PatternFlowGtpv1NPduNumberCounter interface { + Validation + // msg marshals PatternFlowGtpv1NPduNumberCounter to protobuf object *otg.PatternFlowGtpv1NPduNumberCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1NPduNumberCounter + // setMsg unmarshals PatternFlowGtpv1NPduNumberCounter from protobuf object *otg.PatternFlowGtpv1NPduNumberCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1NPduNumberCounter) PatternFlowGtpv1NPduNumberCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv1NPduNumberCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1NPduNumberCounter + // validate validates PatternFlowGtpv1NPduNumberCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1NPduNumberCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv1NPduNumberCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv1NPduNumberCounter + SetStart(value uint32) PatternFlowGtpv1NPduNumberCounter + // HasStart checks if Start has been set in PatternFlowGtpv1NPduNumberCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv1NPduNumberCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv1NPduNumberCounter + SetStep(value uint32) PatternFlowGtpv1NPduNumberCounter + // HasStep checks if Step has been set in PatternFlowGtpv1NPduNumberCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv1NPduNumberCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv1NPduNumberCounter + SetCount(value uint32) PatternFlowGtpv1NPduNumberCounter + // HasCount checks if Count has been set in PatternFlowGtpv1NPduNumberCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1NPduNumberCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1NPduNumberCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv1NPduNumberCounter object +func (obj *patternFlowGtpv1NPduNumberCounter) SetStart(value uint32) PatternFlowGtpv1NPduNumberCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1NPduNumberCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1NPduNumberCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv1NPduNumberCounter object +func (obj *patternFlowGtpv1NPduNumberCounter) SetStep(value uint32) PatternFlowGtpv1NPduNumberCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1NPduNumberCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1NPduNumberCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv1NPduNumberCounter object +func (obj *patternFlowGtpv1NPduNumberCounter) SetCount(value uint32) PatternFlowGtpv1NPduNumberCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv1NPduNumberCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1NPduNumberCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1NPduNumberCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1NPduNumberCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv1NPduNumberCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_n_pdu_number_metric_tag.go b/gosnappi/pattern_flow_gtpv1_n_pdu_number_metric_tag.go new file mode 100644 index 00000000..f1447dab --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_n_pdu_number_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1NPduNumberMetricTag ***** +type patternFlowGtpv1NPduNumberMetricTag struct { + validation + obj *otg.PatternFlowGtpv1NPduNumberMetricTag + marshaller marshalPatternFlowGtpv1NPduNumberMetricTag + unMarshaller unMarshalPatternFlowGtpv1NPduNumberMetricTag +} + +func NewPatternFlowGtpv1NPduNumberMetricTag() PatternFlowGtpv1NPduNumberMetricTag { + obj := patternFlowGtpv1NPduNumberMetricTag{obj: &otg.PatternFlowGtpv1NPduNumberMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1NPduNumberMetricTag) msg() *otg.PatternFlowGtpv1NPduNumberMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv1NPduNumberMetricTag) setMsg(msg *otg.PatternFlowGtpv1NPduNumberMetricTag) PatternFlowGtpv1NPduNumberMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1NPduNumberMetricTag struct { + obj *patternFlowGtpv1NPduNumberMetricTag +} + +type marshalPatternFlowGtpv1NPduNumberMetricTag interface { + // ToProto marshals PatternFlowGtpv1NPduNumberMetricTag to protobuf object *otg.PatternFlowGtpv1NPduNumberMetricTag + ToProto() (*otg.PatternFlowGtpv1NPduNumberMetricTag, error) + // ToPbText marshals PatternFlowGtpv1NPduNumberMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1NPduNumberMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1NPduNumberMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1NPduNumberMetricTag struct { + obj *patternFlowGtpv1NPduNumberMetricTag +} + +type unMarshalPatternFlowGtpv1NPduNumberMetricTag interface { + // FromProto unmarshals PatternFlowGtpv1NPduNumberMetricTag from protobuf object *otg.PatternFlowGtpv1NPduNumberMetricTag + FromProto(msg *otg.PatternFlowGtpv1NPduNumberMetricTag) (PatternFlowGtpv1NPduNumberMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv1NPduNumberMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1NPduNumberMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1NPduNumberMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1NPduNumberMetricTag) Marshal() marshalPatternFlowGtpv1NPduNumberMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1NPduNumberMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1NPduNumberMetricTag) Unmarshal() unMarshalPatternFlowGtpv1NPduNumberMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1NPduNumberMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1NPduNumberMetricTag) ToProto() (*otg.PatternFlowGtpv1NPduNumberMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1NPduNumberMetricTag) FromProto(msg *otg.PatternFlowGtpv1NPduNumberMetricTag) (PatternFlowGtpv1NPduNumberMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1NPduNumberMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1NPduNumberMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1NPduNumberMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1NPduNumberMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1NPduNumberMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1NPduNumberMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1NPduNumberMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1NPduNumberMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1NPduNumberMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1NPduNumberMetricTag) Clone() (PatternFlowGtpv1NPduNumberMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1NPduNumberMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1NPduNumberMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv1NPduNumberMetricTag interface { + Validation + // msg marshals PatternFlowGtpv1NPduNumberMetricTag to protobuf object *otg.PatternFlowGtpv1NPduNumberMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1NPduNumberMetricTag + // setMsg unmarshals PatternFlowGtpv1NPduNumberMetricTag from protobuf object *otg.PatternFlowGtpv1NPduNumberMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1NPduNumberMetricTag) PatternFlowGtpv1NPduNumberMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1NPduNumberMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1NPduNumberMetricTag + // validate validates PatternFlowGtpv1NPduNumberMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1NPduNumberMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv1NPduNumberMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv1NPduNumberMetricTag + SetName(value string) PatternFlowGtpv1NPduNumberMetricTag + // Offset returns uint32, set in PatternFlowGtpv1NPduNumberMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv1NPduNumberMetricTag + SetOffset(value uint32) PatternFlowGtpv1NPduNumberMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv1NPduNumberMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv1NPduNumberMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv1NPduNumberMetricTag + SetLength(value uint32) PatternFlowGtpv1NPduNumberMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv1NPduNumberMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv1NPduNumberMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv1NPduNumberMetricTag object +func (obj *patternFlowGtpv1NPduNumberMetricTag) SetName(value string) PatternFlowGtpv1NPduNumberMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1NPduNumberMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1NPduNumberMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv1NPduNumberMetricTag object +func (obj *patternFlowGtpv1NPduNumberMetricTag) SetOffset(value uint32) PatternFlowGtpv1NPduNumberMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1NPduNumberMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1NPduNumberMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv1NPduNumberMetricTag object +func (obj *patternFlowGtpv1NPduNumberMetricTag) SetLength(value uint32) PatternFlowGtpv1NPduNumberMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv1NPduNumberMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv1NPduNumberMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1NPduNumberMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv1NPduNumberMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv1NPduNumberMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_next_extension_header_type.go b/gosnappi/pattern_flow_gtpv1_next_extension_header_type.go new file mode 100644 index 00000000..a08f6e89 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_next_extension_header_type.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1NextExtensionHeaderType ***** +type patternFlowGtpv1NextExtensionHeaderType struct { + validation + obj *otg.PatternFlowGtpv1NextExtensionHeaderType + marshaller marshalPatternFlowGtpv1NextExtensionHeaderType + unMarshaller unMarshalPatternFlowGtpv1NextExtensionHeaderType + incrementHolder PatternFlowGtpv1NextExtensionHeaderTypeCounter + decrementHolder PatternFlowGtpv1NextExtensionHeaderTypeCounter + metricTagsHolder PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter +} + +func NewPatternFlowGtpv1NextExtensionHeaderType() PatternFlowGtpv1NextExtensionHeaderType { + obj := patternFlowGtpv1NextExtensionHeaderType{obj: &otg.PatternFlowGtpv1NextExtensionHeaderType{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1NextExtensionHeaderType) msg() *otg.PatternFlowGtpv1NextExtensionHeaderType { + return obj.obj +} + +func (obj *patternFlowGtpv1NextExtensionHeaderType) setMsg(msg *otg.PatternFlowGtpv1NextExtensionHeaderType) PatternFlowGtpv1NextExtensionHeaderType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1NextExtensionHeaderType struct { + obj *patternFlowGtpv1NextExtensionHeaderType +} + +type marshalPatternFlowGtpv1NextExtensionHeaderType interface { + // ToProto marshals PatternFlowGtpv1NextExtensionHeaderType to protobuf object *otg.PatternFlowGtpv1NextExtensionHeaderType + ToProto() (*otg.PatternFlowGtpv1NextExtensionHeaderType, error) + // ToPbText marshals PatternFlowGtpv1NextExtensionHeaderType to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1NextExtensionHeaderType to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1NextExtensionHeaderType to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1NextExtensionHeaderType struct { + obj *patternFlowGtpv1NextExtensionHeaderType +} + +type unMarshalPatternFlowGtpv1NextExtensionHeaderType interface { + // FromProto unmarshals PatternFlowGtpv1NextExtensionHeaderType from protobuf object *otg.PatternFlowGtpv1NextExtensionHeaderType + FromProto(msg *otg.PatternFlowGtpv1NextExtensionHeaderType) (PatternFlowGtpv1NextExtensionHeaderType, error) + // FromPbText unmarshals PatternFlowGtpv1NextExtensionHeaderType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1NextExtensionHeaderType from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1NextExtensionHeaderType from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1NextExtensionHeaderType) Marshal() marshalPatternFlowGtpv1NextExtensionHeaderType { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1NextExtensionHeaderType{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1NextExtensionHeaderType) Unmarshal() unMarshalPatternFlowGtpv1NextExtensionHeaderType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1NextExtensionHeaderType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1NextExtensionHeaderType) ToProto() (*otg.PatternFlowGtpv1NextExtensionHeaderType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1NextExtensionHeaderType) FromProto(msg *otg.PatternFlowGtpv1NextExtensionHeaderType) (PatternFlowGtpv1NextExtensionHeaderType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1NextExtensionHeaderType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1NextExtensionHeaderType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1NextExtensionHeaderType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1NextExtensionHeaderType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1NextExtensionHeaderType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1NextExtensionHeaderType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1NextExtensionHeaderType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1NextExtensionHeaderType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1NextExtensionHeaderType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1NextExtensionHeaderType) Clone() (PatternFlowGtpv1NextExtensionHeaderType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1NextExtensionHeaderType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv1NextExtensionHeaderType) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv1NextExtensionHeaderType is next extension header. Exists if any of the e_flag, s_flag, or pn_flag bits are on. Must be interpreted only if the e_flag bit is on. +type PatternFlowGtpv1NextExtensionHeaderType interface { + Validation + // msg marshals PatternFlowGtpv1NextExtensionHeaderType to protobuf object *otg.PatternFlowGtpv1NextExtensionHeaderType + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1NextExtensionHeaderType + // setMsg unmarshals PatternFlowGtpv1NextExtensionHeaderType from protobuf object *otg.PatternFlowGtpv1NextExtensionHeaderType + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1NextExtensionHeaderType) PatternFlowGtpv1NextExtensionHeaderType + // provides marshal interface + Marshal() marshalPatternFlowGtpv1NextExtensionHeaderType + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1NextExtensionHeaderType + // validate validates PatternFlowGtpv1NextExtensionHeaderType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1NextExtensionHeaderType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum, set in PatternFlowGtpv1NextExtensionHeaderType + Choice() PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum + // setChoice assigns PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum provided by user to PatternFlowGtpv1NextExtensionHeaderType + setChoice(value PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum) PatternFlowGtpv1NextExtensionHeaderType + // HasChoice checks if Choice has been set in PatternFlowGtpv1NextExtensionHeaderType + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv1NextExtensionHeaderType. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv1NextExtensionHeaderType + SetValue(value uint32) PatternFlowGtpv1NextExtensionHeaderType + // HasValue checks if Value has been set in PatternFlowGtpv1NextExtensionHeaderType + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv1NextExtensionHeaderType. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv1NextExtensionHeaderType + SetValues(value []uint32) PatternFlowGtpv1NextExtensionHeaderType + // Increment returns PatternFlowGtpv1NextExtensionHeaderTypeCounter, set in PatternFlowGtpv1NextExtensionHeaderType. + // PatternFlowGtpv1NextExtensionHeaderTypeCounter is integer counter pattern + Increment() PatternFlowGtpv1NextExtensionHeaderTypeCounter + // SetIncrement assigns PatternFlowGtpv1NextExtensionHeaderTypeCounter provided by user to PatternFlowGtpv1NextExtensionHeaderType. + // PatternFlowGtpv1NextExtensionHeaderTypeCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv1NextExtensionHeaderTypeCounter) PatternFlowGtpv1NextExtensionHeaderType + // HasIncrement checks if Increment has been set in PatternFlowGtpv1NextExtensionHeaderType + HasIncrement() bool + // Decrement returns PatternFlowGtpv1NextExtensionHeaderTypeCounter, set in PatternFlowGtpv1NextExtensionHeaderType. + // PatternFlowGtpv1NextExtensionHeaderTypeCounter is integer counter pattern + Decrement() PatternFlowGtpv1NextExtensionHeaderTypeCounter + // SetDecrement assigns PatternFlowGtpv1NextExtensionHeaderTypeCounter provided by user to PatternFlowGtpv1NextExtensionHeaderType. + // PatternFlowGtpv1NextExtensionHeaderTypeCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv1NextExtensionHeaderTypeCounter) PatternFlowGtpv1NextExtensionHeaderType + // HasDecrement checks if Decrement has been set in PatternFlowGtpv1NextExtensionHeaderType + HasDecrement() bool + // MetricTags returns PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIterIter, set in PatternFlowGtpv1NextExtensionHeaderType + MetricTags() PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter + setNil() +} + +type PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum string + +// Enum of Choice on PatternFlowGtpv1NextExtensionHeaderType +var PatternFlowGtpv1NextExtensionHeaderTypeChoice = struct { + VALUE PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum + VALUES PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum + INCREMENT PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum + DECREMENT PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum +}{ + VALUE: PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum("value"), + VALUES: PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum("values"), + INCREMENT: PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv1NextExtensionHeaderType) Choice() PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum { + return PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv1NextExtensionHeaderType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv1NextExtensionHeaderType) setChoice(value PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum) PatternFlowGtpv1NextExtensionHeaderType { + intValue, ok := otg.PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv1NextExtensionHeaderTypeChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv1NextExtensionHeaderTypeChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv1NextExtensionHeaderTypeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv1NextExtensionHeaderTypeCounter().msg() + } + + if value == PatternFlowGtpv1NextExtensionHeaderTypeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv1NextExtensionHeaderTypeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1NextExtensionHeaderType) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv1NextExtensionHeaderTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1NextExtensionHeaderType) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv1NextExtensionHeaderType object +func (obj *patternFlowGtpv1NextExtensionHeaderType) SetValue(value uint32) PatternFlowGtpv1NextExtensionHeaderType { + obj.setChoice(PatternFlowGtpv1NextExtensionHeaderTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv1NextExtensionHeaderType) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv1NextExtensionHeaderType object +func (obj *patternFlowGtpv1NextExtensionHeaderType) SetValues(value []uint32) PatternFlowGtpv1NextExtensionHeaderType { + obj.setChoice(PatternFlowGtpv1NextExtensionHeaderTypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv1NextExtensionHeaderTypeCounter +func (obj *patternFlowGtpv1NextExtensionHeaderType) Increment() PatternFlowGtpv1NextExtensionHeaderTypeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv1NextExtensionHeaderTypeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv1NextExtensionHeaderTypeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv1NextExtensionHeaderTypeCounter +func (obj *patternFlowGtpv1NextExtensionHeaderType) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv1NextExtensionHeaderTypeCounter value in the PatternFlowGtpv1NextExtensionHeaderType object +func (obj *patternFlowGtpv1NextExtensionHeaderType) SetIncrement(value PatternFlowGtpv1NextExtensionHeaderTypeCounter) PatternFlowGtpv1NextExtensionHeaderType { + obj.setChoice(PatternFlowGtpv1NextExtensionHeaderTypeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1NextExtensionHeaderTypeCounter +func (obj *patternFlowGtpv1NextExtensionHeaderType) Decrement() PatternFlowGtpv1NextExtensionHeaderTypeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv1NextExtensionHeaderTypeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv1NextExtensionHeaderTypeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1NextExtensionHeaderTypeCounter +func (obj *patternFlowGtpv1NextExtensionHeaderType) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv1NextExtensionHeaderTypeCounter value in the PatternFlowGtpv1NextExtensionHeaderType object +func (obj *patternFlowGtpv1NextExtensionHeaderType) SetDecrement(value PatternFlowGtpv1NextExtensionHeaderTypeCounter) PatternFlowGtpv1NextExtensionHeaderType { + obj.setChoice(PatternFlowGtpv1NextExtensionHeaderTypeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv1NextExtensionHeaderTypeMetricTag +func (obj *patternFlowGtpv1NextExtensionHeaderType) MetricTags() PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter struct { + obj *patternFlowGtpv1NextExtensionHeaderType + patternFlowGtpv1NextExtensionHeaderTypeMetricTagSlice []PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + fieldPtr *[]*otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag +} + +func newPatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter(ptr *[]*otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter { + return &patternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter interface { + setMsg(*patternFlowGtpv1NextExtensionHeaderType) PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter + Items() []PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + Add() PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + Append(items ...PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter + Set(index int, newObj PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter + Clear() PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter + clearHolderSlice() PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter + appendHolderSlice(item PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter) setMsg(msg *patternFlowGtpv1NextExtensionHeaderType) PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv1NextExtensionHeaderTypeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter) Items() []PatternFlowGtpv1NextExtensionHeaderTypeMetricTag { + return obj.patternFlowGtpv1NextExtensionHeaderTypeMetricTagSlice +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter) Add() PatternFlowGtpv1NextExtensionHeaderTypeMetricTag { + newObj := &otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv1NextExtensionHeaderTypeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv1NextExtensionHeaderTypeMetricTagSlice = append(obj.patternFlowGtpv1NextExtensionHeaderTypeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter) Append(items ...PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv1NextExtensionHeaderTypeMetricTagSlice = append(obj.patternFlowGtpv1NextExtensionHeaderTypeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter) Set(index int, newObj PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv1NextExtensionHeaderTypeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter) Clear() PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag{} + obj.patternFlowGtpv1NextExtensionHeaderTypeMetricTagSlice = []PatternFlowGtpv1NextExtensionHeaderTypeMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter) clearHolderSlice() PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter { + if len(obj.patternFlowGtpv1NextExtensionHeaderTypeMetricTagSlice) > 0 { + obj.patternFlowGtpv1NextExtensionHeaderTypeMetricTagSlice = []PatternFlowGtpv1NextExtensionHeaderTypeMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter) appendHolderSlice(item PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) PatternFlowGtpv1NextExtensionHeaderTypePatternFlowGtpv1NextExtensionHeaderTypeMetricTagIter { + obj.patternFlowGtpv1NextExtensionHeaderTypeMetricTagSlice = append(obj.patternFlowGtpv1NextExtensionHeaderTypeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv1NextExtensionHeaderType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1NextExtensionHeaderType.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv1NextExtensionHeaderType.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv1NextExtensionHeaderTypeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv1NextExtensionHeaderType) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv1NextExtensionHeaderTypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv1NextExtensionHeaderTypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv1NextExtensionHeaderTypeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv1NextExtensionHeaderTypeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv1NextExtensionHeaderTypeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv1NextExtensionHeaderTypeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv1NextExtensionHeaderType") + } + } else { + intVal := otg.PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv1NextExtensionHeaderType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_next_extension_header_type_counter.go b/gosnappi/pattern_flow_gtpv1_next_extension_header_type_counter.go new file mode 100644 index 00000000..9435dd8d --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_next_extension_header_type_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1NextExtensionHeaderTypeCounter ***** +type patternFlowGtpv1NextExtensionHeaderTypeCounter struct { + validation + obj *otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter + marshaller marshalPatternFlowGtpv1NextExtensionHeaderTypeCounter + unMarshaller unMarshalPatternFlowGtpv1NextExtensionHeaderTypeCounter +} + +func NewPatternFlowGtpv1NextExtensionHeaderTypeCounter() PatternFlowGtpv1NextExtensionHeaderTypeCounter { + obj := patternFlowGtpv1NextExtensionHeaderTypeCounter{obj: &otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) msg() *otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter { + return obj.obj +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) setMsg(msg *otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter) PatternFlowGtpv1NextExtensionHeaderTypeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1NextExtensionHeaderTypeCounter struct { + obj *patternFlowGtpv1NextExtensionHeaderTypeCounter +} + +type marshalPatternFlowGtpv1NextExtensionHeaderTypeCounter interface { + // ToProto marshals PatternFlowGtpv1NextExtensionHeaderTypeCounter to protobuf object *otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter + ToProto() (*otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter, error) + // ToPbText marshals PatternFlowGtpv1NextExtensionHeaderTypeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1NextExtensionHeaderTypeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1NextExtensionHeaderTypeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1NextExtensionHeaderTypeCounter struct { + obj *patternFlowGtpv1NextExtensionHeaderTypeCounter +} + +type unMarshalPatternFlowGtpv1NextExtensionHeaderTypeCounter interface { + // FromProto unmarshals PatternFlowGtpv1NextExtensionHeaderTypeCounter from protobuf object *otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter + FromProto(msg *otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter) (PatternFlowGtpv1NextExtensionHeaderTypeCounter, error) + // FromPbText unmarshals PatternFlowGtpv1NextExtensionHeaderTypeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1NextExtensionHeaderTypeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1NextExtensionHeaderTypeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) Marshal() marshalPatternFlowGtpv1NextExtensionHeaderTypeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1NextExtensionHeaderTypeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) Unmarshal() unMarshalPatternFlowGtpv1NextExtensionHeaderTypeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1NextExtensionHeaderTypeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1NextExtensionHeaderTypeCounter) ToProto() (*otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1NextExtensionHeaderTypeCounter) FromProto(msg *otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter) (PatternFlowGtpv1NextExtensionHeaderTypeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1NextExtensionHeaderTypeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1NextExtensionHeaderTypeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1NextExtensionHeaderTypeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1NextExtensionHeaderTypeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1NextExtensionHeaderTypeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1NextExtensionHeaderTypeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) Clone() (PatternFlowGtpv1NextExtensionHeaderTypeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1NextExtensionHeaderTypeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1NextExtensionHeaderTypeCounter is integer counter pattern +type PatternFlowGtpv1NextExtensionHeaderTypeCounter interface { + Validation + // msg marshals PatternFlowGtpv1NextExtensionHeaderTypeCounter to protobuf object *otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter + // setMsg unmarshals PatternFlowGtpv1NextExtensionHeaderTypeCounter from protobuf object *otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter) PatternFlowGtpv1NextExtensionHeaderTypeCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv1NextExtensionHeaderTypeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1NextExtensionHeaderTypeCounter + // validate validates PatternFlowGtpv1NextExtensionHeaderTypeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1NextExtensionHeaderTypeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv1NextExtensionHeaderTypeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv1NextExtensionHeaderTypeCounter + SetStart(value uint32) PatternFlowGtpv1NextExtensionHeaderTypeCounter + // HasStart checks if Start has been set in PatternFlowGtpv1NextExtensionHeaderTypeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv1NextExtensionHeaderTypeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv1NextExtensionHeaderTypeCounter + SetStep(value uint32) PatternFlowGtpv1NextExtensionHeaderTypeCounter + // HasStep checks if Step has been set in PatternFlowGtpv1NextExtensionHeaderTypeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv1NextExtensionHeaderTypeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv1NextExtensionHeaderTypeCounter + SetCount(value uint32) PatternFlowGtpv1NextExtensionHeaderTypeCounter + // HasCount checks if Count has been set in PatternFlowGtpv1NextExtensionHeaderTypeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv1NextExtensionHeaderTypeCounter object +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) SetStart(value uint32) PatternFlowGtpv1NextExtensionHeaderTypeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv1NextExtensionHeaderTypeCounter object +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) SetStep(value uint32) PatternFlowGtpv1NextExtensionHeaderTypeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv1NextExtensionHeaderTypeCounter object +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) SetCount(value uint32) PatternFlowGtpv1NextExtensionHeaderTypeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1NextExtensionHeaderTypeCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1NextExtensionHeaderTypeCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1NextExtensionHeaderTypeCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_next_extension_header_type_metric_tag.go b/gosnappi/pattern_flow_gtpv1_next_extension_header_type_metric_tag.go new file mode 100644 index 00000000..7c121ae5 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_next_extension_header_type_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1NextExtensionHeaderTypeMetricTag ***** +type patternFlowGtpv1NextExtensionHeaderTypeMetricTag struct { + validation + obj *otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + marshaller marshalPatternFlowGtpv1NextExtensionHeaderTypeMetricTag + unMarshaller unMarshalPatternFlowGtpv1NextExtensionHeaderTypeMetricTag +} + +func NewPatternFlowGtpv1NextExtensionHeaderTypeMetricTag() PatternFlowGtpv1NextExtensionHeaderTypeMetricTag { + obj := patternFlowGtpv1NextExtensionHeaderTypeMetricTag{obj: &otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) msg() *otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) setMsg(msg *otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) PatternFlowGtpv1NextExtensionHeaderTypeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1NextExtensionHeaderTypeMetricTag struct { + obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag +} + +type marshalPatternFlowGtpv1NextExtensionHeaderTypeMetricTag interface { + // ToProto marshals PatternFlowGtpv1NextExtensionHeaderTypeMetricTag to protobuf object *otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + ToProto() (*otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag, error) + // ToPbText marshals PatternFlowGtpv1NextExtensionHeaderTypeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1NextExtensionHeaderTypeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1NextExtensionHeaderTypeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1NextExtensionHeaderTypeMetricTag struct { + obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag +} + +type unMarshalPatternFlowGtpv1NextExtensionHeaderTypeMetricTag interface { + // FromProto unmarshals PatternFlowGtpv1NextExtensionHeaderTypeMetricTag from protobuf object *otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + FromProto(msg *otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) (PatternFlowGtpv1NextExtensionHeaderTypeMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv1NextExtensionHeaderTypeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1NextExtensionHeaderTypeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1NextExtensionHeaderTypeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) Marshal() marshalPatternFlowGtpv1NextExtensionHeaderTypeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1NextExtensionHeaderTypeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) Unmarshal() unMarshalPatternFlowGtpv1NextExtensionHeaderTypeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1NextExtensionHeaderTypeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1NextExtensionHeaderTypeMetricTag) ToProto() (*otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1NextExtensionHeaderTypeMetricTag) FromProto(msg *otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) (PatternFlowGtpv1NextExtensionHeaderTypeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1NextExtensionHeaderTypeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1NextExtensionHeaderTypeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1NextExtensionHeaderTypeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1NextExtensionHeaderTypeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1NextExtensionHeaderTypeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1NextExtensionHeaderTypeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) Clone() (PatternFlowGtpv1NextExtensionHeaderTypeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1NextExtensionHeaderTypeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1NextExtensionHeaderTypeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv1NextExtensionHeaderTypeMetricTag interface { + Validation + // msg marshals PatternFlowGtpv1NextExtensionHeaderTypeMetricTag to protobuf object *otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + // setMsg unmarshals PatternFlowGtpv1NextExtensionHeaderTypeMetricTag from protobuf object *otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag) PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1NextExtensionHeaderTypeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1NextExtensionHeaderTypeMetricTag + // validate validates PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1NextExtensionHeaderTypeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv1NextExtensionHeaderTypeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + SetName(value string) PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + // Offset returns uint32, set in PatternFlowGtpv1NextExtensionHeaderTypeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + SetOffset(value uint32) PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv1NextExtensionHeaderTypeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + SetLength(value uint32) PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv1NextExtensionHeaderTypeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv1NextExtensionHeaderTypeMetricTag object +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) SetName(value string) PatternFlowGtpv1NextExtensionHeaderTypeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv1NextExtensionHeaderTypeMetricTag object +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) SetOffset(value uint32) PatternFlowGtpv1NextExtensionHeaderTypeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv1NextExtensionHeaderTypeMetricTag object +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) SetLength(value uint32) PatternFlowGtpv1NextExtensionHeaderTypeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv1NextExtensionHeaderTypeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1NextExtensionHeaderTypeMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv1NextExtensionHeaderTypeMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv1NextExtensionHeaderTypeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_pn_flag.go b/gosnappi/pattern_flow_gtpv1_pn_flag.go new file mode 100644 index 00000000..43cbc95e --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_pn_flag.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1PnFlag ***** +type patternFlowGtpv1PnFlag struct { + validation + obj *otg.PatternFlowGtpv1PnFlag + marshaller marshalPatternFlowGtpv1PnFlag + unMarshaller unMarshalPatternFlowGtpv1PnFlag + incrementHolder PatternFlowGtpv1PnFlagCounter + decrementHolder PatternFlowGtpv1PnFlagCounter + metricTagsHolder PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter +} + +func NewPatternFlowGtpv1PnFlag() PatternFlowGtpv1PnFlag { + obj := patternFlowGtpv1PnFlag{obj: &otg.PatternFlowGtpv1PnFlag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1PnFlag) msg() *otg.PatternFlowGtpv1PnFlag { + return obj.obj +} + +func (obj *patternFlowGtpv1PnFlag) setMsg(msg *otg.PatternFlowGtpv1PnFlag) PatternFlowGtpv1PnFlag { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1PnFlag struct { + obj *patternFlowGtpv1PnFlag +} + +type marshalPatternFlowGtpv1PnFlag interface { + // ToProto marshals PatternFlowGtpv1PnFlag to protobuf object *otg.PatternFlowGtpv1PnFlag + ToProto() (*otg.PatternFlowGtpv1PnFlag, error) + // ToPbText marshals PatternFlowGtpv1PnFlag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1PnFlag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1PnFlag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1PnFlag struct { + obj *patternFlowGtpv1PnFlag +} + +type unMarshalPatternFlowGtpv1PnFlag interface { + // FromProto unmarshals PatternFlowGtpv1PnFlag from protobuf object *otg.PatternFlowGtpv1PnFlag + FromProto(msg *otg.PatternFlowGtpv1PnFlag) (PatternFlowGtpv1PnFlag, error) + // FromPbText unmarshals PatternFlowGtpv1PnFlag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1PnFlag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1PnFlag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1PnFlag) Marshal() marshalPatternFlowGtpv1PnFlag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1PnFlag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1PnFlag) Unmarshal() unMarshalPatternFlowGtpv1PnFlag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1PnFlag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1PnFlag) ToProto() (*otg.PatternFlowGtpv1PnFlag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1PnFlag) FromProto(msg *otg.PatternFlowGtpv1PnFlag) (PatternFlowGtpv1PnFlag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1PnFlag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1PnFlag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1PnFlag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1PnFlag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1PnFlag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1PnFlag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1PnFlag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1PnFlag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1PnFlag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1PnFlag) Clone() (PatternFlowGtpv1PnFlag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1PnFlag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv1PnFlag) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv1PnFlag is n-PDU field present +type PatternFlowGtpv1PnFlag interface { + Validation + // msg marshals PatternFlowGtpv1PnFlag to protobuf object *otg.PatternFlowGtpv1PnFlag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1PnFlag + // setMsg unmarshals PatternFlowGtpv1PnFlag from protobuf object *otg.PatternFlowGtpv1PnFlag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1PnFlag) PatternFlowGtpv1PnFlag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1PnFlag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1PnFlag + // validate validates PatternFlowGtpv1PnFlag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1PnFlag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv1PnFlagChoiceEnum, set in PatternFlowGtpv1PnFlag + Choice() PatternFlowGtpv1PnFlagChoiceEnum + // setChoice assigns PatternFlowGtpv1PnFlagChoiceEnum provided by user to PatternFlowGtpv1PnFlag + setChoice(value PatternFlowGtpv1PnFlagChoiceEnum) PatternFlowGtpv1PnFlag + // HasChoice checks if Choice has been set in PatternFlowGtpv1PnFlag + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv1PnFlag. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv1PnFlag + SetValue(value uint32) PatternFlowGtpv1PnFlag + // HasValue checks if Value has been set in PatternFlowGtpv1PnFlag + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv1PnFlag. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv1PnFlag + SetValues(value []uint32) PatternFlowGtpv1PnFlag + // Increment returns PatternFlowGtpv1PnFlagCounter, set in PatternFlowGtpv1PnFlag. + // PatternFlowGtpv1PnFlagCounter is integer counter pattern + Increment() PatternFlowGtpv1PnFlagCounter + // SetIncrement assigns PatternFlowGtpv1PnFlagCounter provided by user to PatternFlowGtpv1PnFlag. + // PatternFlowGtpv1PnFlagCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv1PnFlagCounter) PatternFlowGtpv1PnFlag + // HasIncrement checks if Increment has been set in PatternFlowGtpv1PnFlag + HasIncrement() bool + // Decrement returns PatternFlowGtpv1PnFlagCounter, set in PatternFlowGtpv1PnFlag. + // PatternFlowGtpv1PnFlagCounter is integer counter pattern + Decrement() PatternFlowGtpv1PnFlagCounter + // SetDecrement assigns PatternFlowGtpv1PnFlagCounter provided by user to PatternFlowGtpv1PnFlag. + // PatternFlowGtpv1PnFlagCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv1PnFlagCounter) PatternFlowGtpv1PnFlag + // HasDecrement checks if Decrement has been set in PatternFlowGtpv1PnFlag + HasDecrement() bool + // MetricTags returns PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIterIter, set in PatternFlowGtpv1PnFlag + MetricTags() PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter + setNil() +} + +type PatternFlowGtpv1PnFlagChoiceEnum string + +// Enum of Choice on PatternFlowGtpv1PnFlag +var PatternFlowGtpv1PnFlagChoice = struct { + VALUE PatternFlowGtpv1PnFlagChoiceEnum + VALUES PatternFlowGtpv1PnFlagChoiceEnum + INCREMENT PatternFlowGtpv1PnFlagChoiceEnum + DECREMENT PatternFlowGtpv1PnFlagChoiceEnum +}{ + VALUE: PatternFlowGtpv1PnFlagChoiceEnum("value"), + VALUES: PatternFlowGtpv1PnFlagChoiceEnum("values"), + INCREMENT: PatternFlowGtpv1PnFlagChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv1PnFlagChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv1PnFlag) Choice() PatternFlowGtpv1PnFlagChoiceEnum { + return PatternFlowGtpv1PnFlagChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv1PnFlag) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv1PnFlag) setChoice(value PatternFlowGtpv1PnFlagChoiceEnum) PatternFlowGtpv1PnFlag { + intValue, ok := otg.PatternFlowGtpv1PnFlag_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv1PnFlagChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv1PnFlag_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv1PnFlagChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv1PnFlagChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv1PnFlagChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv1PnFlagCounter().msg() + } + + if value == PatternFlowGtpv1PnFlagChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv1PnFlagCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1PnFlag) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv1PnFlagChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1PnFlag) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv1PnFlag object +func (obj *patternFlowGtpv1PnFlag) SetValue(value uint32) PatternFlowGtpv1PnFlag { + obj.setChoice(PatternFlowGtpv1PnFlagChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv1PnFlag) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv1PnFlag object +func (obj *patternFlowGtpv1PnFlag) SetValues(value []uint32) PatternFlowGtpv1PnFlag { + obj.setChoice(PatternFlowGtpv1PnFlagChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv1PnFlagCounter +func (obj *patternFlowGtpv1PnFlag) Increment() PatternFlowGtpv1PnFlagCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv1PnFlagChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv1PnFlagCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv1PnFlagCounter +func (obj *patternFlowGtpv1PnFlag) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv1PnFlagCounter value in the PatternFlowGtpv1PnFlag object +func (obj *patternFlowGtpv1PnFlag) SetIncrement(value PatternFlowGtpv1PnFlagCounter) PatternFlowGtpv1PnFlag { + obj.setChoice(PatternFlowGtpv1PnFlagChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1PnFlagCounter +func (obj *patternFlowGtpv1PnFlag) Decrement() PatternFlowGtpv1PnFlagCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv1PnFlagChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv1PnFlagCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1PnFlagCounter +func (obj *patternFlowGtpv1PnFlag) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv1PnFlagCounter value in the PatternFlowGtpv1PnFlag object +func (obj *patternFlowGtpv1PnFlag) SetDecrement(value PatternFlowGtpv1PnFlagCounter) PatternFlowGtpv1PnFlag { + obj.setChoice(PatternFlowGtpv1PnFlagChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv1PnFlagMetricTag +func (obj *patternFlowGtpv1PnFlag) MetricTags() PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv1PnFlagMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter struct { + obj *patternFlowGtpv1PnFlag + patternFlowGtpv1PnFlagMetricTagSlice []PatternFlowGtpv1PnFlagMetricTag + fieldPtr *[]*otg.PatternFlowGtpv1PnFlagMetricTag +} + +func newPatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter(ptr *[]*otg.PatternFlowGtpv1PnFlagMetricTag) PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter { + return &patternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter interface { + setMsg(*patternFlowGtpv1PnFlag) PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter + Items() []PatternFlowGtpv1PnFlagMetricTag + Add() PatternFlowGtpv1PnFlagMetricTag + Append(items ...PatternFlowGtpv1PnFlagMetricTag) PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter + Set(index int, newObj PatternFlowGtpv1PnFlagMetricTag) PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter + Clear() PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter + clearHolderSlice() PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter + appendHolderSlice(item PatternFlowGtpv1PnFlagMetricTag) PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter +} + +func (obj *patternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter) setMsg(msg *patternFlowGtpv1PnFlag) PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv1PnFlagMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter) Items() []PatternFlowGtpv1PnFlagMetricTag { + return obj.patternFlowGtpv1PnFlagMetricTagSlice +} + +func (obj *patternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter) Add() PatternFlowGtpv1PnFlagMetricTag { + newObj := &otg.PatternFlowGtpv1PnFlagMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv1PnFlagMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv1PnFlagMetricTagSlice = append(obj.patternFlowGtpv1PnFlagMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter) Append(items ...PatternFlowGtpv1PnFlagMetricTag) PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv1PnFlagMetricTagSlice = append(obj.patternFlowGtpv1PnFlagMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter) Set(index int, newObj PatternFlowGtpv1PnFlagMetricTag) PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv1PnFlagMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter) Clear() PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv1PnFlagMetricTag{} + obj.patternFlowGtpv1PnFlagMetricTagSlice = []PatternFlowGtpv1PnFlagMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter) clearHolderSlice() PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter { + if len(obj.patternFlowGtpv1PnFlagMetricTagSlice) > 0 { + obj.patternFlowGtpv1PnFlagMetricTagSlice = []PatternFlowGtpv1PnFlagMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter) appendHolderSlice(item PatternFlowGtpv1PnFlagMetricTag) PatternFlowGtpv1PnFlagPatternFlowGtpv1PnFlagMetricTagIter { + obj.patternFlowGtpv1PnFlagMetricTagSlice = append(obj.patternFlowGtpv1PnFlagMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv1PnFlag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1PnFlag.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv1PnFlag.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv1PnFlagMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv1PnFlag) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv1PnFlagChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv1PnFlagChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv1PnFlagChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv1PnFlagChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv1PnFlagChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv1PnFlagChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv1PnFlag") + } + } else { + intVal := otg.PatternFlowGtpv1PnFlag_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv1PnFlag_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_pn_flag_counter.go b/gosnappi/pattern_flow_gtpv1_pn_flag_counter.go new file mode 100644 index 00000000..ac079bce --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_pn_flag_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1PnFlagCounter ***** +type patternFlowGtpv1PnFlagCounter struct { + validation + obj *otg.PatternFlowGtpv1PnFlagCounter + marshaller marshalPatternFlowGtpv1PnFlagCounter + unMarshaller unMarshalPatternFlowGtpv1PnFlagCounter +} + +func NewPatternFlowGtpv1PnFlagCounter() PatternFlowGtpv1PnFlagCounter { + obj := patternFlowGtpv1PnFlagCounter{obj: &otg.PatternFlowGtpv1PnFlagCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1PnFlagCounter) msg() *otg.PatternFlowGtpv1PnFlagCounter { + return obj.obj +} + +func (obj *patternFlowGtpv1PnFlagCounter) setMsg(msg *otg.PatternFlowGtpv1PnFlagCounter) PatternFlowGtpv1PnFlagCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1PnFlagCounter struct { + obj *patternFlowGtpv1PnFlagCounter +} + +type marshalPatternFlowGtpv1PnFlagCounter interface { + // ToProto marshals PatternFlowGtpv1PnFlagCounter to protobuf object *otg.PatternFlowGtpv1PnFlagCounter + ToProto() (*otg.PatternFlowGtpv1PnFlagCounter, error) + // ToPbText marshals PatternFlowGtpv1PnFlagCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1PnFlagCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1PnFlagCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1PnFlagCounter struct { + obj *patternFlowGtpv1PnFlagCounter +} + +type unMarshalPatternFlowGtpv1PnFlagCounter interface { + // FromProto unmarshals PatternFlowGtpv1PnFlagCounter from protobuf object *otg.PatternFlowGtpv1PnFlagCounter + FromProto(msg *otg.PatternFlowGtpv1PnFlagCounter) (PatternFlowGtpv1PnFlagCounter, error) + // FromPbText unmarshals PatternFlowGtpv1PnFlagCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1PnFlagCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1PnFlagCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1PnFlagCounter) Marshal() marshalPatternFlowGtpv1PnFlagCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1PnFlagCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1PnFlagCounter) Unmarshal() unMarshalPatternFlowGtpv1PnFlagCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1PnFlagCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1PnFlagCounter) ToProto() (*otg.PatternFlowGtpv1PnFlagCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1PnFlagCounter) FromProto(msg *otg.PatternFlowGtpv1PnFlagCounter) (PatternFlowGtpv1PnFlagCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1PnFlagCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1PnFlagCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1PnFlagCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1PnFlagCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1PnFlagCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1PnFlagCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1PnFlagCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1PnFlagCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1PnFlagCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1PnFlagCounter) Clone() (PatternFlowGtpv1PnFlagCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1PnFlagCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1PnFlagCounter is integer counter pattern +type PatternFlowGtpv1PnFlagCounter interface { + Validation + // msg marshals PatternFlowGtpv1PnFlagCounter to protobuf object *otg.PatternFlowGtpv1PnFlagCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1PnFlagCounter + // setMsg unmarshals PatternFlowGtpv1PnFlagCounter from protobuf object *otg.PatternFlowGtpv1PnFlagCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1PnFlagCounter) PatternFlowGtpv1PnFlagCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv1PnFlagCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1PnFlagCounter + // validate validates PatternFlowGtpv1PnFlagCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1PnFlagCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv1PnFlagCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv1PnFlagCounter + SetStart(value uint32) PatternFlowGtpv1PnFlagCounter + // HasStart checks if Start has been set in PatternFlowGtpv1PnFlagCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv1PnFlagCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv1PnFlagCounter + SetStep(value uint32) PatternFlowGtpv1PnFlagCounter + // HasStep checks if Step has been set in PatternFlowGtpv1PnFlagCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv1PnFlagCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv1PnFlagCounter + SetCount(value uint32) PatternFlowGtpv1PnFlagCounter + // HasCount checks if Count has been set in PatternFlowGtpv1PnFlagCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1PnFlagCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1PnFlagCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv1PnFlagCounter object +func (obj *patternFlowGtpv1PnFlagCounter) SetStart(value uint32) PatternFlowGtpv1PnFlagCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1PnFlagCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1PnFlagCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv1PnFlagCounter object +func (obj *patternFlowGtpv1PnFlagCounter) SetStep(value uint32) PatternFlowGtpv1PnFlagCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1PnFlagCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1PnFlagCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv1PnFlagCounter object +func (obj *patternFlowGtpv1PnFlagCounter) SetCount(value uint32) PatternFlowGtpv1PnFlagCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv1PnFlagCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1PnFlagCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1PnFlagCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1PnFlagCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv1PnFlagCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_pn_flag_metric_tag.go b/gosnappi/pattern_flow_gtpv1_pn_flag_metric_tag.go new file mode 100644 index 00000000..f3ec5e30 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_pn_flag_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1PnFlagMetricTag ***** +type patternFlowGtpv1PnFlagMetricTag struct { + validation + obj *otg.PatternFlowGtpv1PnFlagMetricTag + marshaller marshalPatternFlowGtpv1PnFlagMetricTag + unMarshaller unMarshalPatternFlowGtpv1PnFlagMetricTag +} + +func NewPatternFlowGtpv1PnFlagMetricTag() PatternFlowGtpv1PnFlagMetricTag { + obj := patternFlowGtpv1PnFlagMetricTag{obj: &otg.PatternFlowGtpv1PnFlagMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1PnFlagMetricTag) msg() *otg.PatternFlowGtpv1PnFlagMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv1PnFlagMetricTag) setMsg(msg *otg.PatternFlowGtpv1PnFlagMetricTag) PatternFlowGtpv1PnFlagMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1PnFlagMetricTag struct { + obj *patternFlowGtpv1PnFlagMetricTag +} + +type marshalPatternFlowGtpv1PnFlagMetricTag interface { + // ToProto marshals PatternFlowGtpv1PnFlagMetricTag to protobuf object *otg.PatternFlowGtpv1PnFlagMetricTag + ToProto() (*otg.PatternFlowGtpv1PnFlagMetricTag, error) + // ToPbText marshals PatternFlowGtpv1PnFlagMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1PnFlagMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1PnFlagMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1PnFlagMetricTag struct { + obj *patternFlowGtpv1PnFlagMetricTag +} + +type unMarshalPatternFlowGtpv1PnFlagMetricTag interface { + // FromProto unmarshals PatternFlowGtpv1PnFlagMetricTag from protobuf object *otg.PatternFlowGtpv1PnFlagMetricTag + FromProto(msg *otg.PatternFlowGtpv1PnFlagMetricTag) (PatternFlowGtpv1PnFlagMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv1PnFlagMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1PnFlagMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1PnFlagMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1PnFlagMetricTag) Marshal() marshalPatternFlowGtpv1PnFlagMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1PnFlagMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1PnFlagMetricTag) Unmarshal() unMarshalPatternFlowGtpv1PnFlagMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1PnFlagMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1PnFlagMetricTag) ToProto() (*otg.PatternFlowGtpv1PnFlagMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1PnFlagMetricTag) FromProto(msg *otg.PatternFlowGtpv1PnFlagMetricTag) (PatternFlowGtpv1PnFlagMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1PnFlagMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1PnFlagMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1PnFlagMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1PnFlagMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1PnFlagMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1PnFlagMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1PnFlagMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1PnFlagMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1PnFlagMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1PnFlagMetricTag) Clone() (PatternFlowGtpv1PnFlagMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1PnFlagMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1PnFlagMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv1PnFlagMetricTag interface { + Validation + // msg marshals PatternFlowGtpv1PnFlagMetricTag to protobuf object *otg.PatternFlowGtpv1PnFlagMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1PnFlagMetricTag + // setMsg unmarshals PatternFlowGtpv1PnFlagMetricTag from protobuf object *otg.PatternFlowGtpv1PnFlagMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1PnFlagMetricTag) PatternFlowGtpv1PnFlagMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1PnFlagMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1PnFlagMetricTag + // validate validates PatternFlowGtpv1PnFlagMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1PnFlagMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv1PnFlagMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv1PnFlagMetricTag + SetName(value string) PatternFlowGtpv1PnFlagMetricTag + // Offset returns uint32, set in PatternFlowGtpv1PnFlagMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv1PnFlagMetricTag + SetOffset(value uint32) PatternFlowGtpv1PnFlagMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv1PnFlagMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv1PnFlagMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv1PnFlagMetricTag + SetLength(value uint32) PatternFlowGtpv1PnFlagMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv1PnFlagMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv1PnFlagMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv1PnFlagMetricTag object +func (obj *patternFlowGtpv1PnFlagMetricTag) SetName(value string) PatternFlowGtpv1PnFlagMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1PnFlagMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1PnFlagMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv1PnFlagMetricTag object +func (obj *patternFlowGtpv1PnFlagMetricTag) SetOffset(value uint32) PatternFlowGtpv1PnFlagMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1PnFlagMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1PnFlagMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv1PnFlagMetricTag object +func (obj *patternFlowGtpv1PnFlagMetricTag) SetLength(value uint32) PatternFlowGtpv1PnFlagMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv1PnFlagMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv1PnFlagMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1PnFlagMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv1PnFlagMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv1PnFlagMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_protocol_type.go b/gosnappi/pattern_flow_gtpv1_protocol_type.go new file mode 100644 index 00000000..c93ecee0 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_protocol_type.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1ProtocolType ***** +type patternFlowGtpv1ProtocolType struct { + validation + obj *otg.PatternFlowGtpv1ProtocolType + marshaller marshalPatternFlowGtpv1ProtocolType + unMarshaller unMarshalPatternFlowGtpv1ProtocolType + incrementHolder PatternFlowGtpv1ProtocolTypeCounter + decrementHolder PatternFlowGtpv1ProtocolTypeCounter + metricTagsHolder PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter +} + +func NewPatternFlowGtpv1ProtocolType() PatternFlowGtpv1ProtocolType { + obj := patternFlowGtpv1ProtocolType{obj: &otg.PatternFlowGtpv1ProtocolType{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1ProtocolType) msg() *otg.PatternFlowGtpv1ProtocolType { + return obj.obj +} + +func (obj *patternFlowGtpv1ProtocolType) setMsg(msg *otg.PatternFlowGtpv1ProtocolType) PatternFlowGtpv1ProtocolType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1ProtocolType struct { + obj *patternFlowGtpv1ProtocolType +} + +type marshalPatternFlowGtpv1ProtocolType interface { + // ToProto marshals PatternFlowGtpv1ProtocolType to protobuf object *otg.PatternFlowGtpv1ProtocolType + ToProto() (*otg.PatternFlowGtpv1ProtocolType, error) + // ToPbText marshals PatternFlowGtpv1ProtocolType to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1ProtocolType to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1ProtocolType to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1ProtocolType struct { + obj *patternFlowGtpv1ProtocolType +} + +type unMarshalPatternFlowGtpv1ProtocolType interface { + // FromProto unmarshals PatternFlowGtpv1ProtocolType from protobuf object *otg.PatternFlowGtpv1ProtocolType + FromProto(msg *otg.PatternFlowGtpv1ProtocolType) (PatternFlowGtpv1ProtocolType, error) + // FromPbText unmarshals PatternFlowGtpv1ProtocolType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1ProtocolType from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1ProtocolType from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1ProtocolType) Marshal() marshalPatternFlowGtpv1ProtocolType { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1ProtocolType{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1ProtocolType) Unmarshal() unMarshalPatternFlowGtpv1ProtocolType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1ProtocolType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1ProtocolType) ToProto() (*otg.PatternFlowGtpv1ProtocolType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1ProtocolType) FromProto(msg *otg.PatternFlowGtpv1ProtocolType) (PatternFlowGtpv1ProtocolType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1ProtocolType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1ProtocolType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1ProtocolType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1ProtocolType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1ProtocolType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1ProtocolType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1ProtocolType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1ProtocolType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1ProtocolType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1ProtocolType) Clone() (PatternFlowGtpv1ProtocolType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1ProtocolType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv1ProtocolType) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv1ProtocolType is protocol type, GTP is 1, GTP' is 0 +type PatternFlowGtpv1ProtocolType interface { + Validation + // msg marshals PatternFlowGtpv1ProtocolType to protobuf object *otg.PatternFlowGtpv1ProtocolType + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1ProtocolType + // setMsg unmarshals PatternFlowGtpv1ProtocolType from protobuf object *otg.PatternFlowGtpv1ProtocolType + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1ProtocolType) PatternFlowGtpv1ProtocolType + // provides marshal interface + Marshal() marshalPatternFlowGtpv1ProtocolType + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1ProtocolType + // validate validates PatternFlowGtpv1ProtocolType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1ProtocolType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv1ProtocolTypeChoiceEnum, set in PatternFlowGtpv1ProtocolType + Choice() PatternFlowGtpv1ProtocolTypeChoiceEnum + // setChoice assigns PatternFlowGtpv1ProtocolTypeChoiceEnum provided by user to PatternFlowGtpv1ProtocolType + setChoice(value PatternFlowGtpv1ProtocolTypeChoiceEnum) PatternFlowGtpv1ProtocolType + // HasChoice checks if Choice has been set in PatternFlowGtpv1ProtocolType + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv1ProtocolType. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv1ProtocolType + SetValue(value uint32) PatternFlowGtpv1ProtocolType + // HasValue checks if Value has been set in PatternFlowGtpv1ProtocolType + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv1ProtocolType. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv1ProtocolType + SetValues(value []uint32) PatternFlowGtpv1ProtocolType + // Increment returns PatternFlowGtpv1ProtocolTypeCounter, set in PatternFlowGtpv1ProtocolType. + // PatternFlowGtpv1ProtocolTypeCounter is integer counter pattern + Increment() PatternFlowGtpv1ProtocolTypeCounter + // SetIncrement assigns PatternFlowGtpv1ProtocolTypeCounter provided by user to PatternFlowGtpv1ProtocolType. + // PatternFlowGtpv1ProtocolTypeCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv1ProtocolTypeCounter) PatternFlowGtpv1ProtocolType + // HasIncrement checks if Increment has been set in PatternFlowGtpv1ProtocolType + HasIncrement() bool + // Decrement returns PatternFlowGtpv1ProtocolTypeCounter, set in PatternFlowGtpv1ProtocolType. + // PatternFlowGtpv1ProtocolTypeCounter is integer counter pattern + Decrement() PatternFlowGtpv1ProtocolTypeCounter + // SetDecrement assigns PatternFlowGtpv1ProtocolTypeCounter provided by user to PatternFlowGtpv1ProtocolType. + // PatternFlowGtpv1ProtocolTypeCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv1ProtocolTypeCounter) PatternFlowGtpv1ProtocolType + // HasDecrement checks if Decrement has been set in PatternFlowGtpv1ProtocolType + HasDecrement() bool + // MetricTags returns PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIterIter, set in PatternFlowGtpv1ProtocolType + MetricTags() PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter + setNil() +} + +type PatternFlowGtpv1ProtocolTypeChoiceEnum string + +// Enum of Choice on PatternFlowGtpv1ProtocolType +var PatternFlowGtpv1ProtocolTypeChoice = struct { + VALUE PatternFlowGtpv1ProtocolTypeChoiceEnum + VALUES PatternFlowGtpv1ProtocolTypeChoiceEnum + INCREMENT PatternFlowGtpv1ProtocolTypeChoiceEnum + DECREMENT PatternFlowGtpv1ProtocolTypeChoiceEnum +}{ + VALUE: PatternFlowGtpv1ProtocolTypeChoiceEnum("value"), + VALUES: PatternFlowGtpv1ProtocolTypeChoiceEnum("values"), + INCREMENT: PatternFlowGtpv1ProtocolTypeChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv1ProtocolTypeChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv1ProtocolType) Choice() PatternFlowGtpv1ProtocolTypeChoiceEnum { + return PatternFlowGtpv1ProtocolTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv1ProtocolType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv1ProtocolType) setChoice(value PatternFlowGtpv1ProtocolTypeChoiceEnum) PatternFlowGtpv1ProtocolType { + intValue, ok := otg.PatternFlowGtpv1ProtocolType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv1ProtocolTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv1ProtocolType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv1ProtocolTypeChoice.VALUE { + defaultValue := uint32(1) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv1ProtocolTypeChoice.VALUES { + defaultValue := []uint32{1} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv1ProtocolTypeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv1ProtocolTypeCounter().msg() + } + + if value == PatternFlowGtpv1ProtocolTypeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv1ProtocolTypeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1ProtocolType) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv1ProtocolTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1ProtocolType) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv1ProtocolType object +func (obj *patternFlowGtpv1ProtocolType) SetValue(value uint32) PatternFlowGtpv1ProtocolType { + obj.setChoice(PatternFlowGtpv1ProtocolTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv1ProtocolType) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{1}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv1ProtocolType object +func (obj *patternFlowGtpv1ProtocolType) SetValues(value []uint32) PatternFlowGtpv1ProtocolType { + obj.setChoice(PatternFlowGtpv1ProtocolTypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv1ProtocolTypeCounter +func (obj *patternFlowGtpv1ProtocolType) Increment() PatternFlowGtpv1ProtocolTypeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv1ProtocolTypeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv1ProtocolTypeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv1ProtocolTypeCounter +func (obj *patternFlowGtpv1ProtocolType) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv1ProtocolTypeCounter value in the PatternFlowGtpv1ProtocolType object +func (obj *patternFlowGtpv1ProtocolType) SetIncrement(value PatternFlowGtpv1ProtocolTypeCounter) PatternFlowGtpv1ProtocolType { + obj.setChoice(PatternFlowGtpv1ProtocolTypeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1ProtocolTypeCounter +func (obj *patternFlowGtpv1ProtocolType) Decrement() PatternFlowGtpv1ProtocolTypeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv1ProtocolTypeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv1ProtocolTypeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1ProtocolTypeCounter +func (obj *patternFlowGtpv1ProtocolType) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv1ProtocolTypeCounter value in the PatternFlowGtpv1ProtocolType object +func (obj *patternFlowGtpv1ProtocolType) SetDecrement(value PatternFlowGtpv1ProtocolTypeCounter) PatternFlowGtpv1ProtocolType { + obj.setChoice(PatternFlowGtpv1ProtocolTypeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv1ProtocolTypeMetricTag +func (obj *patternFlowGtpv1ProtocolType) MetricTags() PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv1ProtocolTypeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter struct { + obj *patternFlowGtpv1ProtocolType + patternFlowGtpv1ProtocolTypeMetricTagSlice []PatternFlowGtpv1ProtocolTypeMetricTag + fieldPtr *[]*otg.PatternFlowGtpv1ProtocolTypeMetricTag +} + +func newPatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter(ptr *[]*otg.PatternFlowGtpv1ProtocolTypeMetricTag) PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter { + return &patternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter interface { + setMsg(*patternFlowGtpv1ProtocolType) PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter + Items() []PatternFlowGtpv1ProtocolTypeMetricTag + Add() PatternFlowGtpv1ProtocolTypeMetricTag + Append(items ...PatternFlowGtpv1ProtocolTypeMetricTag) PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter + Set(index int, newObj PatternFlowGtpv1ProtocolTypeMetricTag) PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter + Clear() PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter + clearHolderSlice() PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter + appendHolderSlice(item PatternFlowGtpv1ProtocolTypeMetricTag) PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter +} + +func (obj *patternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter) setMsg(msg *patternFlowGtpv1ProtocolType) PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv1ProtocolTypeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter) Items() []PatternFlowGtpv1ProtocolTypeMetricTag { + return obj.patternFlowGtpv1ProtocolTypeMetricTagSlice +} + +func (obj *patternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter) Add() PatternFlowGtpv1ProtocolTypeMetricTag { + newObj := &otg.PatternFlowGtpv1ProtocolTypeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv1ProtocolTypeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv1ProtocolTypeMetricTagSlice = append(obj.patternFlowGtpv1ProtocolTypeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter) Append(items ...PatternFlowGtpv1ProtocolTypeMetricTag) PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv1ProtocolTypeMetricTagSlice = append(obj.patternFlowGtpv1ProtocolTypeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter) Set(index int, newObj PatternFlowGtpv1ProtocolTypeMetricTag) PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv1ProtocolTypeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter) Clear() PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv1ProtocolTypeMetricTag{} + obj.patternFlowGtpv1ProtocolTypeMetricTagSlice = []PatternFlowGtpv1ProtocolTypeMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter) clearHolderSlice() PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter { + if len(obj.patternFlowGtpv1ProtocolTypeMetricTagSlice) > 0 { + obj.patternFlowGtpv1ProtocolTypeMetricTagSlice = []PatternFlowGtpv1ProtocolTypeMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter) appendHolderSlice(item PatternFlowGtpv1ProtocolTypeMetricTag) PatternFlowGtpv1ProtocolTypePatternFlowGtpv1ProtocolTypeMetricTagIter { + obj.patternFlowGtpv1ProtocolTypeMetricTagSlice = append(obj.patternFlowGtpv1ProtocolTypeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv1ProtocolType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1ProtocolType.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv1ProtocolType.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv1ProtocolTypeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv1ProtocolType) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv1ProtocolTypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv1ProtocolTypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv1ProtocolTypeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv1ProtocolTypeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv1ProtocolTypeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv1ProtocolTypeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv1ProtocolType") + } + } else { + intVal := otg.PatternFlowGtpv1ProtocolType_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv1ProtocolType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_protocol_type_counter.go b/gosnappi/pattern_flow_gtpv1_protocol_type_counter.go new file mode 100644 index 00000000..f16d3914 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_protocol_type_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1ProtocolTypeCounter ***** +type patternFlowGtpv1ProtocolTypeCounter struct { + validation + obj *otg.PatternFlowGtpv1ProtocolTypeCounter + marshaller marshalPatternFlowGtpv1ProtocolTypeCounter + unMarshaller unMarshalPatternFlowGtpv1ProtocolTypeCounter +} + +func NewPatternFlowGtpv1ProtocolTypeCounter() PatternFlowGtpv1ProtocolTypeCounter { + obj := patternFlowGtpv1ProtocolTypeCounter{obj: &otg.PatternFlowGtpv1ProtocolTypeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1ProtocolTypeCounter) msg() *otg.PatternFlowGtpv1ProtocolTypeCounter { + return obj.obj +} + +func (obj *patternFlowGtpv1ProtocolTypeCounter) setMsg(msg *otg.PatternFlowGtpv1ProtocolTypeCounter) PatternFlowGtpv1ProtocolTypeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1ProtocolTypeCounter struct { + obj *patternFlowGtpv1ProtocolTypeCounter +} + +type marshalPatternFlowGtpv1ProtocolTypeCounter interface { + // ToProto marshals PatternFlowGtpv1ProtocolTypeCounter to protobuf object *otg.PatternFlowGtpv1ProtocolTypeCounter + ToProto() (*otg.PatternFlowGtpv1ProtocolTypeCounter, error) + // ToPbText marshals PatternFlowGtpv1ProtocolTypeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1ProtocolTypeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1ProtocolTypeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1ProtocolTypeCounter struct { + obj *patternFlowGtpv1ProtocolTypeCounter +} + +type unMarshalPatternFlowGtpv1ProtocolTypeCounter interface { + // FromProto unmarshals PatternFlowGtpv1ProtocolTypeCounter from protobuf object *otg.PatternFlowGtpv1ProtocolTypeCounter + FromProto(msg *otg.PatternFlowGtpv1ProtocolTypeCounter) (PatternFlowGtpv1ProtocolTypeCounter, error) + // FromPbText unmarshals PatternFlowGtpv1ProtocolTypeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1ProtocolTypeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1ProtocolTypeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1ProtocolTypeCounter) Marshal() marshalPatternFlowGtpv1ProtocolTypeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1ProtocolTypeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1ProtocolTypeCounter) Unmarshal() unMarshalPatternFlowGtpv1ProtocolTypeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1ProtocolTypeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1ProtocolTypeCounter) ToProto() (*otg.PatternFlowGtpv1ProtocolTypeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1ProtocolTypeCounter) FromProto(msg *otg.PatternFlowGtpv1ProtocolTypeCounter) (PatternFlowGtpv1ProtocolTypeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1ProtocolTypeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1ProtocolTypeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1ProtocolTypeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1ProtocolTypeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1ProtocolTypeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1ProtocolTypeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1ProtocolTypeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1ProtocolTypeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1ProtocolTypeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1ProtocolTypeCounter) Clone() (PatternFlowGtpv1ProtocolTypeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1ProtocolTypeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1ProtocolTypeCounter is integer counter pattern +type PatternFlowGtpv1ProtocolTypeCounter interface { + Validation + // msg marshals PatternFlowGtpv1ProtocolTypeCounter to protobuf object *otg.PatternFlowGtpv1ProtocolTypeCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1ProtocolTypeCounter + // setMsg unmarshals PatternFlowGtpv1ProtocolTypeCounter from protobuf object *otg.PatternFlowGtpv1ProtocolTypeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1ProtocolTypeCounter) PatternFlowGtpv1ProtocolTypeCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv1ProtocolTypeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1ProtocolTypeCounter + // validate validates PatternFlowGtpv1ProtocolTypeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1ProtocolTypeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv1ProtocolTypeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv1ProtocolTypeCounter + SetStart(value uint32) PatternFlowGtpv1ProtocolTypeCounter + // HasStart checks if Start has been set in PatternFlowGtpv1ProtocolTypeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv1ProtocolTypeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv1ProtocolTypeCounter + SetStep(value uint32) PatternFlowGtpv1ProtocolTypeCounter + // HasStep checks if Step has been set in PatternFlowGtpv1ProtocolTypeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv1ProtocolTypeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv1ProtocolTypeCounter + SetCount(value uint32) PatternFlowGtpv1ProtocolTypeCounter + // HasCount checks if Count has been set in PatternFlowGtpv1ProtocolTypeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1ProtocolTypeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1ProtocolTypeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv1ProtocolTypeCounter object +func (obj *patternFlowGtpv1ProtocolTypeCounter) SetStart(value uint32) PatternFlowGtpv1ProtocolTypeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1ProtocolTypeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1ProtocolTypeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv1ProtocolTypeCounter object +func (obj *patternFlowGtpv1ProtocolTypeCounter) SetStep(value uint32) PatternFlowGtpv1ProtocolTypeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1ProtocolTypeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1ProtocolTypeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv1ProtocolTypeCounter object +func (obj *patternFlowGtpv1ProtocolTypeCounter) SetCount(value uint32) PatternFlowGtpv1ProtocolTypeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv1ProtocolTypeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1ProtocolTypeCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1ProtocolTypeCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1ProtocolTypeCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv1ProtocolTypeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_protocol_type_metric_tag.go b/gosnappi/pattern_flow_gtpv1_protocol_type_metric_tag.go new file mode 100644 index 00000000..45c0be02 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_protocol_type_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1ProtocolTypeMetricTag ***** +type patternFlowGtpv1ProtocolTypeMetricTag struct { + validation + obj *otg.PatternFlowGtpv1ProtocolTypeMetricTag + marshaller marshalPatternFlowGtpv1ProtocolTypeMetricTag + unMarshaller unMarshalPatternFlowGtpv1ProtocolTypeMetricTag +} + +func NewPatternFlowGtpv1ProtocolTypeMetricTag() PatternFlowGtpv1ProtocolTypeMetricTag { + obj := patternFlowGtpv1ProtocolTypeMetricTag{obj: &otg.PatternFlowGtpv1ProtocolTypeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) msg() *otg.PatternFlowGtpv1ProtocolTypeMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) setMsg(msg *otg.PatternFlowGtpv1ProtocolTypeMetricTag) PatternFlowGtpv1ProtocolTypeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1ProtocolTypeMetricTag struct { + obj *patternFlowGtpv1ProtocolTypeMetricTag +} + +type marshalPatternFlowGtpv1ProtocolTypeMetricTag interface { + // ToProto marshals PatternFlowGtpv1ProtocolTypeMetricTag to protobuf object *otg.PatternFlowGtpv1ProtocolTypeMetricTag + ToProto() (*otg.PatternFlowGtpv1ProtocolTypeMetricTag, error) + // ToPbText marshals PatternFlowGtpv1ProtocolTypeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1ProtocolTypeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1ProtocolTypeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1ProtocolTypeMetricTag struct { + obj *patternFlowGtpv1ProtocolTypeMetricTag +} + +type unMarshalPatternFlowGtpv1ProtocolTypeMetricTag interface { + // FromProto unmarshals PatternFlowGtpv1ProtocolTypeMetricTag from protobuf object *otg.PatternFlowGtpv1ProtocolTypeMetricTag + FromProto(msg *otg.PatternFlowGtpv1ProtocolTypeMetricTag) (PatternFlowGtpv1ProtocolTypeMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv1ProtocolTypeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1ProtocolTypeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1ProtocolTypeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) Marshal() marshalPatternFlowGtpv1ProtocolTypeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1ProtocolTypeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) Unmarshal() unMarshalPatternFlowGtpv1ProtocolTypeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1ProtocolTypeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1ProtocolTypeMetricTag) ToProto() (*otg.PatternFlowGtpv1ProtocolTypeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1ProtocolTypeMetricTag) FromProto(msg *otg.PatternFlowGtpv1ProtocolTypeMetricTag) (PatternFlowGtpv1ProtocolTypeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1ProtocolTypeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1ProtocolTypeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1ProtocolTypeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1ProtocolTypeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1ProtocolTypeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1ProtocolTypeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) Clone() (PatternFlowGtpv1ProtocolTypeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1ProtocolTypeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1ProtocolTypeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv1ProtocolTypeMetricTag interface { + Validation + // msg marshals PatternFlowGtpv1ProtocolTypeMetricTag to protobuf object *otg.PatternFlowGtpv1ProtocolTypeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1ProtocolTypeMetricTag + // setMsg unmarshals PatternFlowGtpv1ProtocolTypeMetricTag from protobuf object *otg.PatternFlowGtpv1ProtocolTypeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1ProtocolTypeMetricTag) PatternFlowGtpv1ProtocolTypeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1ProtocolTypeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1ProtocolTypeMetricTag + // validate validates PatternFlowGtpv1ProtocolTypeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1ProtocolTypeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv1ProtocolTypeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv1ProtocolTypeMetricTag + SetName(value string) PatternFlowGtpv1ProtocolTypeMetricTag + // Offset returns uint32, set in PatternFlowGtpv1ProtocolTypeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv1ProtocolTypeMetricTag + SetOffset(value uint32) PatternFlowGtpv1ProtocolTypeMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv1ProtocolTypeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv1ProtocolTypeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv1ProtocolTypeMetricTag + SetLength(value uint32) PatternFlowGtpv1ProtocolTypeMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv1ProtocolTypeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv1ProtocolTypeMetricTag object +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) SetName(value string) PatternFlowGtpv1ProtocolTypeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv1ProtocolTypeMetricTag object +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) SetOffset(value uint32) PatternFlowGtpv1ProtocolTypeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv1ProtocolTypeMetricTag object +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) SetLength(value uint32) PatternFlowGtpv1ProtocolTypeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv1ProtocolTypeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1ProtocolTypeMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv1ProtocolTypeMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv1ProtocolTypeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_reserved.go b/gosnappi/pattern_flow_gtpv1_reserved.go new file mode 100644 index 00000000..425b5bcb --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_reserved.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1Reserved ***** +type patternFlowGtpv1Reserved struct { + validation + obj *otg.PatternFlowGtpv1Reserved + marshaller marshalPatternFlowGtpv1Reserved + unMarshaller unMarshalPatternFlowGtpv1Reserved + incrementHolder PatternFlowGtpv1ReservedCounter + decrementHolder PatternFlowGtpv1ReservedCounter + metricTagsHolder PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter +} + +func NewPatternFlowGtpv1Reserved() PatternFlowGtpv1Reserved { + obj := patternFlowGtpv1Reserved{obj: &otg.PatternFlowGtpv1Reserved{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1Reserved) msg() *otg.PatternFlowGtpv1Reserved { + return obj.obj +} + +func (obj *patternFlowGtpv1Reserved) setMsg(msg *otg.PatternFlowGtpv1Reserved) PatternFlowGtpv1Reserved { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1Reserved struct { + obj *patternFlowGtpv1Reserved +} + +type marshalPatternFlowGtpv1Reserved interface { + // ToProto marshals PatternFlowGtpv1Reserved to protobuf object *otg.PatternFlowGtpv1Reserved + ToProto() (*otg.PatternFlowGtpv1Reserved, error) + // ToPbText marshals PatternFlowGtpv1Reserved to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1Reserved to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1Reserved to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1Reserved struct { + obj *patternFlowGtpv1Reserved +} + +type unMarshalPatternFlowGtpv1Reserved interface { + // FromProto unmarshals PatternFlowGtpv1Reserved from protobuf object *otg.PatternFlowGtpv1Reserved + FromProto(msg *otg.PatternFlowGtpv1Reserved) (PatternFlowGtpv1Reserved, error) + // FromPbText unmarshals PatternFlowGtpv1Reserved from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1Reserved from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1Reserved from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1Reserved) Marshal() marshalPatternFlowGtpv1Reserved { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1Reserved{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1Reserved) Unmarshal() unMarshalPatternFlowGtpv1Reserved { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1Reserved{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1Reserved) ToProto() (*otg.PatternFlowGtpv1Reserved, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1Reserved) FromProto(msg *otg.PatternFlowGtpv1Reserved) (PatternFlowGtpv1Reserved, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1Reserved) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1Reserved) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1Reserved) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1Reserved) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1Reserved) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1Reserved) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1Reserved) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1Reserved) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1Reserved) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1Reserved) Clone() (PatternFlowGtpv1Reserved, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1Reserved() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv1Reserved) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv1Reserved is reserved field +type PatternFlowGtpv1Reserved interface { + Validation + // msg marshals PatternFlowGtpv1Reserved to protobuf object *otg.PatternFlowGtpv1Reserved + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1Reserved + // setMsg unmarshals PatternFlowGtpv1Reserved from protobuf object *otg.PatternFlowGtpv1Reserved + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1Reserved) PatternFlowGtpv1Reserved + // provides marshal interface + Marshal() marshalPatternFlowGtpv1Reserved + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1Reserved + // validate validates PatternFlowGtpv1Reserved + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1Reserved, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv1ReservedChoiceEnum, set in PatternFlowGtpv1Reserved + Choice() PatternFlowGtpv1ReservedChoiceEnum + // setChoice assigns PatternFlowGtpv1ReservedChoiceEnum provided by user to PatternFlowGtpv1Reserved + setChoice(value PatternFlowGtpv1ReservedChoiceEnum) PatternFlowGtpv1Reserved + // HasChoice checks if Choice has been set in PatternFlowGtpv1Reserved + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv1Reserved. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv1Reserved + SetValue(value uint32) PatternFlowGtpv1Reserved + // HasValue checks if Value has been set in PatternFlowGtpv1Reserved + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv1Reserved. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv1Reserved + SetValues(value []uint32) PatternFlowGtpv1Reserved + // Increment returns PatternFlowGtpv1ReservedCounter, set in PatternFlowGtpv1Reserved. + // PatternFlowGtpv1ReservedCounter is integer counter pattern + Increment() PatternFlowGtpv1ReservedCounter + // SetIncrement assigns PatternFlowGtpv1ReservedCounter provided by user to PatternFlowGtpv1Reserved. + // PatternFlowGtpv1ReservedCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv1ReservedCounter) PatternFlowGtpv1Reserved + // HasIncrement checks if Increment has been set in PatternFlowGtpv1Reserved + HasIncrement() bool + // Decrement returns PatternFlowGtpv1ReservedCounter, set in PatternFlowGtpv1Reserved. + // PatternFlowGtpv1ReservedCounter is integer counter pattern + Decrement() PatternFlowGtpv1ReservedCounter + // SetDecrement assigns PatternFlowGtpv1ReservedCounter provided by user to PatternFlowGtpv1Reserved. + // PatternFlowGtpv1ReservedCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv1ReservedCounter) PatternFlowGtpv1Reserved + // HasDecrement checks if Decrement has been set in PatternFlowGtpv1Reserved + HasDecrement() bool + // MetricTags returns PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIterIter, set in PatternFlowGtpv1Reserved + MetricTags() PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter + setNil() +} + +type PatternFlowGtpv1ReservedChoiceEnum string + +// Enum of Choice on PatternFlowGtpv1Reserved +var PatternFlowGtpv1ReservedChoice = struct { + VALUE PatternFlowGtpv1ReservedChoiceEnum + VALUES PatternFlowGtpv1ReservedChoiceEnum + INCREMENT PatternFlowGtpv1ReservedChoiceEnum + DECREMENT PatternFlowGtpv1ReservedChoiceEnum +}{ + VALUE: PatternFlowGtpv1ReservedChoiceEnum("value"), + VALUES: PatternFlowGtpv1ReservedChoiceEnum("values"), + INCREMENT: PatternFlowGtpv1ReservedChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv1ReservedChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv1Reserved) Choice() PatternFlowGtpv1ReservedChoiceEnum { + return PatternFlowGtpv1ReservedChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv1Reserved) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv1Reserved) setChoice(value PatternFlowGtpv1ReservedChoiceEnum) PatternFlowGtpv1Reserved { + intValue, ok := otg.PatternFlowGtpv1Reserved_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv1ReservedChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv1Reserved_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv1ReservedChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv1ReservedChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv1ReservedChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv1ReservedCounter().msg() + } + + if value == PatternFlowGtpv1ReservedChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv1ReservedCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1Reserved) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv1ReservedChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1Reserved) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv1Reserved object +func (obj *patternFlowGtpv1Reserved) SetValue(value uint32) PatternFlowGtpv1Reserved { + obj.setChoice(PatternFlowGtpv1ReservedChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv1Reserved) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv1Reserved object +func (obj *patternFlowGtpv1Reserved) SetValues(value []uint32) PatternFlowGtpv1Reserved { + obj.setChoice(PatternFlowGtpv1ReservedChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv1ReservedCounter +func (obj *patternFlowGtpv1Reserved) Increment() PatternFlowGtpv1ReservedCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv1ReservedChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv1ReservedCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv1ReservedCounter +func (obj *patternFlowGtpv1Reserved) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv1ReservedCounter value in the PatternFlowGtpv1Reserved object +func (obj *patternFlowGtpv1Reserved) SetIncrement(value PatternFlowGtpv1ReservedCounter) PatternFlowGtpv1Reserved { + obj.setChoice(PatternFlowGtpv1ReservedChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1ReservedCounter +func (obj *patternFlowGtpv1Reserved) Decrement() PatternFlowGtpv1ReservedCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv1ReservedChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv1ReservedCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1ReservedCounter +func (obj *patternFlowGtpv1Reserved) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv1ReservedCounter value in the PatternFlowGtpv1Reserved object +func (obj *patternFlowGtpv1Reserved) SetDecrement(value PatternFlowGtpv1ReservedCounter) PatternFlowGtpv1Reserved { + obj.setChoice(PatternFlowGtpv1ReservedChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv1ReservedMetricTag +func (obj *patternFlowGtpv1Reserved) MetricTags() PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv1ReservedMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter struct { + obj *patternFlowGtpv1Reserved + patternFlowGtpv1ReservedMetricTagSlice []PatternFlowGtpv1ReservedMetricTag + fieldPtr *[]*otg.PatternFlowGtpv1ReservedMetricTag +} + +func newPatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter(ptr *[]*otg.PatternFlowGtpv1ReservedMetricTag) PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter { + return &patternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter interface { + setMsg(*patternFlowGtpv1Reserved) PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter + Items() []PatternFlowGtpv1ReservedMetricTag + Add() PatternFlowGtpv1ReservedMetricTag + Append(items ...PatternFlowGtpv1ReservedMetricTag) PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter + Set(index int, newObj PatternFlowGtpv1ReservedMetricTag) PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter + Clear() PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter + clearHolderSlice() PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter + appendHolderSlice(item PatternFlowGtpv1ReservedMetricTag) PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter +} + +func (obj *patternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter) setMsg(msg *patternFlowGtpv1Reserved) PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv1ReservedMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter) Items() []PatternFlowGtpv1ReservedMetricTag { + return obj.patternFlowGtpv1ReservedMetricTagSlice +} + +func (obj *patternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter) Add() PatternFlowGtpv1ReservedMetricTag { + newObj := &otg.PatternFlowGtpv1ReservedMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv1ReservedMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv1ReservedMetricTagSlice = append(obj.patternFlowGtpv1ReservedMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter) Append(items ...PatternFlowGtpv1ReservedMetricTag) PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv1ReservedMetricTagSlice = append(obj.patternFlowGtpv1ReservedMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter) Set(index int, newObj PatternFlowGtpv1ReservedMetricTag) PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv1ReservedMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter) Clear() PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv1ReservedMetricTag{} + obj.patternFlowGtpv1ReservedMetricTagSlice = []PatternFlowGtpv1ReservedMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter) clearHolderSlice() PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter { + if len(obj.patternFlowGtpv1ReservedMetricTagSlice) > 0 { + obj.patternFlowGtpv1ReservedMetricTagSlice = []PatternFlowGtpv1ReservedMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter) appendHolderSlice(item PatternFlowGtpv1ReservedMetricTag) PatternFlowGtpv1ReservedPatternFlowGtpv1ReservedMetricTagIter { + obj.patternFlowGtpv1ReservedMetricTagSlice = append(obj.patternFlowGtpv1ReservedMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv1Reserved) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1Reserved.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv1Reserved.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv1ReservedMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv1Reserved) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv1ReservedChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv1ReservedChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv1ReservedChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv1ReservedChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv1ReservedChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv1ReservedChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv1Reserved") + } + } else { + intVal := otg.PatternFlowGtpv1Reserved_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv1Reserved_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_reserved_counter.go b/gosnappi/pattern_flow_gtpv1_reserved_counter.go new file mode 100644 index 00000000..e889f7dc --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_reserved_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1ReservedCounter ***** +type patternFlowGtpv1ReservedCounter struct { + validation + obj *otg.PatternFlowGtpv1ReservedCounter + marshaller marshalPatternFlowGtpv1ReservedCounter + unMarshaller unMarshalPatternFlowGtpv1ReservedCounter +} + +func NewPatternFlowGtpv1ReservedCounter() PatternFlowGtpv1ReservedCounter { + obj := patternFlowGtpv1ReservedCounter{obj: &otg.PatternFlowGtpv1ReservedCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1ReservedCounter) msg() *otg.PatternFlowGtpv1ReservedCounter { + return obj.obj +} + +func (obj *patternFlowGtpv1ReservedCounter) setMsg(msg *otg.PatternFlowGtpv1ReservedCounter) PatternFlowGtpv1ReservedCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1ReservedCounter struct { + obj *patternFlowGtpv1ReservedCounter +} + +type marshalPatternFlowGtpv1ReservedCounter interface { + // ToProto marshals PatternFlowGtpv1ReservedCounter to protobuf object *otg.PatternFlowGtpv1ReservedCounter + ToProto() (*otg.PatternFlowGtpv1ReservedCounter, error) + // ToPbText marshals PatternFlowGtpv1ReservedCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1ReservedCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1ReservedCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1ReservedCounter struct { + obj *patternFlowGtpv1ReservedCounter +} + +type unMarshalPatternFlowGtpv1ReservedCounter interface { + // FromProto unmarshals PatternFlowGtpv1ReservedCounter from protobuf object *otg.PatternFlowGtpv1ReservedCounter + FromProto(msg *otg.PatternFlowGtpv1ReservedCounter) (PatternFlowGtpv1ReservedCounter, error) + // FromPbText unmarshals PatternFlowGtpv1ReservedCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1ReservedCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1ReservedCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1ReservedCounter) Marshal() marshalPatternFlowGtpv1ReservedCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1ReservedCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1ReservedCounter) Unmarshal() unMarshalPatternFlowGtpv1ReservedCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1ReservedCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1ReservedCounter) ToProto() (*otg.PatternFlowGtpv1ReservedCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1ReservedCounter) FromProto(msg *otg.PatternFlowGtpv1ReservedCounter) (PatternFlowGtpv1ReservedCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1ReservedCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1ReservedCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1ReservedCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1ReservedCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1ReservedCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1ReservedCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1ReservedCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1ReservedCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1ReservedCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1ReservedCounter) Clone() (PatternFlowGtpv1ReservedCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1ReservedCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1ReservedCounter is integer counter pattern +type PatternFlowGtpv1ReservedCounter interface { + Validation + // msg marshals PatternFlowGtpv1ReservedCounter to protobuf object *otg.PatternFlowGtpv1ReservedCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1ReservedCounter + // setMsg unmarshals PatternFlowGtpv1ReservedCounter from protobuf object *otg.PatternFlowGtpv1ReservedCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1ReservedCounter) PatternFlowGtpv1ReservedCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv1ReservedCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1ReservedCounter + // validate validates PatternFlowGtpv1ReservedCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1ReservedCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv1ReservedCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv1ReservedCounter + SetStart(value uint32) PatternFlowGtpv1ReservedCounter + // HasStart checks if Start has been set in PatternFlowGtpv1ReservedCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv1ReservedCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv1ReservedCounter + SetStep(value uint32) PatternFlowGtpv1ReservedCounter + // HasStep checks if Step has been set in PatternFlowGtpv1ReservedCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv1ReservedCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv1ReservedCounter + SetCount(value uint32) PatternFlowGtpv1ReservedCounter + // HasCount checks if Count has been set in PatternFlowGtpv1ReservedCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1ReservedCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1ReservedCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv1ReservedCounter object +func (obj *patternFlowGtpv1ReservedCounter) SetStart(value uint32) PatternFlowGtpv1ReservedCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1ReservedCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1ReservedCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv1ReservedCounter object +func (obj *patternFlowGtpv1ReservedCounter) SetStep(value uint32) PatternFlowGtpv1ReservedCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1ReservedCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1ReservedCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv1ReservedCounter object +func (obj *patternFlowGtpv1ReservedCounter) SetCount(value uint32) PatternFlowGtpv1ReservedCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv1ReservedCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1ReservedCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1ReservedCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1ReservedCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv1ReservedCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_reserved_metric_tag.go b/gosnappi/pattern_flow_gtpv1_reserved_metric_tag.go new file mode 100644 index 00000000..b792d8fa --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_reserved_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1ReservedMetricTag ***** +type patternFlowGtpv1ReservedMetricTag struct { + validation + obj *otg.PatternFlowGtpv1ReservedMetricTag + marshaller marshalPatternFlowGtpv1ReservedMetricTag + unMarshaller unMarshalPatternFlowGtpv1ReservedMetricTag +} + +func NewPatternFlowGtpv1ReservedMetricTag() PatternFlowGtpv1ReservedMetricTag { + obj := patternFlowGtpv1ReservedMetricTag{obj: &otg.PatternFlowGtpv1ReservedMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1ReservedMetricTag) msg() *otg.PatternFlowGtpv1ReservedMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv1ReservedMetricTag) setMsg(msg *otg.PatternFlowGtpv1ReservedMetricTag) PatternFlowGtpv1ReservedMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1ReservedMetricTag struct { + obj *patternFlowGtpv1ReservedMetricTag +} + +type marshalPatternFlowGtpv1ReservedMetricTag interface { + // ToProto marshals PatternFlowGtpv1ReservedMetricTag to protobuf object *otg.PatternFlowGtpv1ReservedMetricTag + ToProto() (*otg.PatternFlowGtpv1ReservedMetricTag, error) + // ToPbText marshals PatternFlowGtpv1ReservedMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1ReservedMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1ReservedMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1ReservedMetricTag struct { + obj *patternFlowGtpv1ReservedMetricTag +} + +type unMarshalPatternFlowGtpv1ReservedMetricTag interface { + // FromProto unmarshals PatternFlowGtpv1ReservedMetricTag from protobuf object *otg.PatternFlowGtpv1ReservedMetricTag + FromProto(msg *otg.PatternFlowGtpv1ReservedMetricTag) (PatternFlowGtpv1ReservedMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv1ReservedMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1ReservedMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1ReservedMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1ReservedMetricTag) Marshal() marshalPatternFlowGtpv1ReservedMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1ReservedMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1ReservedMetricTag) Unmarshal() unMarshalPatternFlowGtpv1ReservedMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1ReservedMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1ReservedMetricTag) ToProto() (*otg.PatternFlowGtpv1ReservedMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1ReservedMetricTag) FromProto(msg *otg.PatternFlowGtpv1ReservedMetricTag) (PatternFlowGtpv1ReservedMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1ReservedMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1ReservedMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1ReservedMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1ReservedMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1ReservedMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1ReservedMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1ReservedMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1ReservedMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1ReservedMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1ReservedMetricTag) Clone() (PatternFlowGtpv1ReservedMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1ReservedMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1ReservedMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv1ReservedMetricTag interface { + Validation + // msg marshals PatternFlowGtpv1ReservedMetricTag to protobuf object *otg.PatternFlowGtpv1ReservedMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1ReservedMetricTag + // setMsg unmarshals PatternFlowGtpv1ReservedMetricTag from protobuf object *otg.PatternFlowGtpv1ReservedMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1ReservedMetricTag) PatternFlowGtpv1ReservedMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1ReservedMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1ReservedMetricTag + // validate validates PatternFlowGtpv1ReservedMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1ReservedMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv1ReservedMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv1ReservedMetricTag + SetName(value string) PatternFlowGtpv1ReservedMetricTag + // Offset returns uint32, set in PatternFlowGtpv1ReservedMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv1ReservedMetricTag + SetOffset(value uint32) PatternFlowGtpv1ReservedMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv1ReservedMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv1ReservedMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv1ReservedMetricTag + SetLength(value uint32) PatternFlowGtpv1ReservedMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv1ReservedMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv1ReservedMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv1ReservedMetricTag object +func (obj *patternFlowGtpv1ReservedMetricTag) SetName(value string) PatternFlowGtpv1ReservedMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1ReservedMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1ReservedMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv1ReservedMetricTag object +func (obj *patternFlowGtpv1ReservedMetricTag) SetOffset(value uint32) PatternFlowGtpv1ReservedMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1ReservedMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1ReservedMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv1ReservedMetricTag object +func (obj *patternFlowGtpv1ReservedMetricTag) SetLength(value uint32) PatternFlowGtpv1ReservedMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv1ReservedMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv1ReservedMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1ReservedMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv1ReservedMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv1ReservedMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_s_flag.go b/gosnappi/pattern_flow_gtpv1_s_flag.go new file mode 100644 index 00000000..53c6fd67 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_s_flag.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1SFlag ***** +type patternFlowGtpv1SFlag struct { + validation + obj *otg.PatternFlowGtpv1SFlag + marshaller marshalPatternFlowGtpv1SFlag + unMarshaller unMarshalPatternFlowGtpv1SFlag + incrementHolder PatternFlowGtpv1SFlagCounter + decrementHolder PatternFlowGtpv1SFlagCounter + metricTagsHolder PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter +} + +func NewPatternFlowGtpv1SFlag() PatternFlowGtpv1SFlag { + obj := patternFlowGtpv1SFlag{obj: &otg.PatternFlowGtpv1SFlag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1SFlag) msg() *otg.PatternFlowGtpv1SFlag { + return obj.obj +} + +func (obj *patternFlowGtpv1SFlag) setMsg(msg *otg.PatternFlowGtpv1SFlag) PatternFlowGtpv1SFlag { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1SFlag struct { + obj *patternFlowGtpv1SFlag +} + +type marshalPatternFlowGtpv1SFlag interface { + // ToProto marshals PatternFlowGtpv1SFlag to protobuf object *otg.PatternFlowGtpv1SFlag + ToProto() (*otg.PatternFlowGtpv1SFlag, error) + // ToPbText marshals PatternFlowGtpv1SFlag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1SFlag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1SFlag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1SFlag struct { + obj *patternFlowGtpv1SFlag +} + +type unMarshalPatternFlowGtpv1SFlag interface { + // FromProto unmarshals PatternFlowGtpv1SFlag from protobuf object *otg.PatternFlowGtpv1SFlag + FromProto(msg *otg.PatternFlowGtpv1SFlag) (PatternFlowGtpv1SFlag, error) + // FromPbText unmarshals PatternFlowGtpv1SFlag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1SFlag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1SFlag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1SFlag) Marshal() marshalPatternFlowGtpv1SFlag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1SFlag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1SFlag) Unmarshal() unMarshalPatternFlowGtpv1SFlag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1SFlag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1SFlag) ToProto() (*otg.PatternFlowGtpv1SFlag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1SFlag) FromProto(msg *otg.PatternFlowGtpv1SFlag) (PatternFlowGtpv1SFlag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1SFlag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1SFlag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1SFlag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1SFlag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1SFlag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1SFlag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1SFlag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1SFlag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1SFlag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1SFlag) Clone() (PatternFlowGtpv1SFlag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1SFlag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv1SFlag) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv1SFlag is sequence number field present +type PatternFlowGtpv1SFlag interface { + Validation + // msg marshals PatternFlowGtpv1SFlag to protobuf object *otg.PatternFlowGtpv1SFlag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1SFlag + // setMsg unmarshals PatternFlowGtpv1SFlag from protobuf object *otg.PatternFlowGtpv1SFlag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1SFlag) PatternFlowGtpv1SFlag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1SFlag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1SFlag + // validate validates PatternFlowGtpv1SFlag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1SFlag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv1SFlagChoiceEnum, set in PatternFlowGtpv1SFlag + Choice() PatternFlowGtpv1SFlagChoiceEnum + // setChoice assigns PatternFlowGtpv1SFlagChoiceEnum provided by user to PatternFlowGtpv1SFlag + setChoice(value PatternFlowGtpv1SFlagChoiceEnum) PatternFlowGtpv1SFlag + // HasChoice checks if Choice has been set in PatternFlowGtpv1SFlag + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv1SFlag. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv1SFlag + SetValue(value uint32) PatternFlowGtpv1SFlag + // HasValue checks if Value has been set in PatternFlowGtpv1SFlag + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv1SFlag. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv1SFlag + SetValues(value []uint32) PatternFlowGtpv1SFlag + // Increment returns PatternFlowGtpv1SFlagCounter, set in PatternFlowGtpv1SFlag. + // PatternFlowGtpv1SFlagCounter is integer counter pattern + Increment() PatternFlowGtpv1SFlagCounter + // SetIncrement assigns PatternFlowGtpv1SFlagCounter provided by user to PatternFlowGtpv1SFlag. + // PatternFlowGtpv1SFlagCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv1SFlagCounter) PatternFlowGtpv1SFlag + // HasIncrement checks if Increment has been set in PatternFlowGtpv1SFlag + HasIncrement() bool + // Decrement returns PatternFlowGtpv1SFlagCounter, set in PatternFlowGtpv1SFlag. + // PatternFlowGtpv1SFlagCounter is integer counter pattern + Decrement() PatternFlowGtpv1SFlagCounter + // SetDecrement assigns PatternFlowGtpv1SFlagCounter provided by user to PatternFlowGtpv1SFlag. + // PatternFlowGtpv1SFlagCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv1SFlagCounter) PatternFlowGtpv1SFlag + // HasDecrement checks if Decrement has been set in PatternFlowGtpv1SFlag + HasDecrement() bool + // MetricTags returns PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIterIter, set in PatternFlowGtpv1SFlag + MetricTags() PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter + setNil() +} + +type PatternFlowGtpv1SFlagChoiceEnum string + +// Enum of Choice on PatternFlowGtpv1SFlag +var PatternFlowGtpv1SFlagChoice = struct { + VALUE PatternFlowGtpv1SFlagChoiceEnum + VALUES PatternFlowGtpv1SFlagChoiceEnum + INCREMENT PatternFlowGtpv1SFlagChoiceEnum + DECREMENT PatternFlowGtpv1SFlagChoiceEnum +}{ + VALUE: PatternFlowGtpv1SFlagChoiceEnum("value"), + VALUES: PatternFlowGtpv1SFlagChoiceEnum("values"), + INCREMENT: PatternFlowGtpv1SFlagChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv1SFlagChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv1SFlag) Choice() PatternFlowGtpv1SFlagChoiceEnum { + return PatternFlowGtpv1SFlagChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv1SFlag) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv1SFlag) setChoice(value PatternFlowGtpv1SFlagChoiceEnum) PatternFlowGtpv1SFlag { + intValue, ok := otg.PatternFlowGtpv1SFlag_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv1SFlagChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv1SFlag_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv1SFlagChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv1SFlagChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv1SFlagChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv1SFlagCounter().msg() + } + + if value == PatternFlowGtpv1SFlagChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv1SFlagCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1SFlag) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv1SFlagChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1SFlag) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv1SFlag object +func (obj *patternFlowGtpv1SFlag) SetValue(value uint32) PatternFlowGtpv1SFlag { + obj.setChoice(PatternFlowGtpv1SFlagChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv1SFlag) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv1SFlag object +func (obj *patternFlowGtpv1SFlag) SetValues(value []uint32) PatternFlowGtpv1SFlag { + obj.setChoice(PatternFlowGtpv1SFlagChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv1SFlagCounter +func (obj *patternFlowGtpv1SFlag) Increment() PatternFlowGtpv1SFlagCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv1SFlagChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv1SFlagCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv1SFlagCounter +func (obj *patternFlowGtpv1SFlag) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv1SFlagCounter value in the PatternFlowGtpv1SFlag object +func (obj *patternFlowGtpv1SFlag) SetIncrement(value PatternFlowGtpv1SFlagCounter) PatternFlowGtpv1SFlag { + obj.setChoice(PatternFlowGtpv1SFlagChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1SFlagCounter +func (obj *patternFlowGtpv1SFlag) Decrement() PatternFlowGtpv1SFlagCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv1SFlagChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv1SFlagCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1SFlagCounter +func (obj *patternFlowGtpv1SFlag) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv1SFlagCounter value in the PatternFlowGtpv1SFlag object +func (obj *patternFlowGtpv1SFlag) SetDecrement(value PatternFlowGtpv1SFlagCounter) PatternFlowGtpv1SFlag { + obj.setChoice(PatternFlowGtpv1SFlagChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv1SFlagMetricTag +func (obj *patternFlowGtpv1SFlag) MetricTags() PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv1SFlagMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter struct { + obj *patternFlowGtpv1SFlag + patternFlowGtpv1SFlagMetricTagSlice []PatternFlowGtpv1SFlagMetricTag + fieldPtr *[]*otg.PatternFlowGtpv1SFlagMetricTag +} + +func newPatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter(ptr *[]*otg.PatternFlowGtpv1SFlagMetricTag) PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter { + return &patternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter interface { + setMsg(*patternFlowGtpv1SFlag) PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter + Items() []PatternFlowGtpv1SFlagMetricTag + Add() PatternFlowGtpv1SFlagMetricTag + Append(items ...PatternFlowGtpv1SFlagMetricTag) PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter + Set(index int, newObj PatternFlowGtpv1SFlagMetricTag) PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter + Clear() PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter + clearHolderSlice() PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter + appendHolderSlice(item PatternFlowGtpv1SFlagMetricTag) PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter +} + +func (obj *patternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter) setMsg(msg *patternFlowGtpv1SFlag) PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv1SFlagMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter) Items() []PatternFlowGtpv1SFlagMetricTag { + return obj.patternFlowGtpv1SFlagMetricTagSlice +} + +func (obj *patternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter) Add() PatternFlowGtpv1SFlagMetricTag { + newObj := &otg.PatternFlowGtpv1SFlagMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv1SFlagMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv1SFlagMetricTagSlice = append(obj.patternFlowGtpv1SFlagMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter) Append(items ...PatternFlowGtpv1SFlagMetricTag) PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv1SFlagMetricTagSlice = append(obj.patternFlowGtpv1SFlagMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter) Set(index int, newObj PatternFlowGtpv1SFlagMetricTag) PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv1SFlagMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter) Clear() PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv1SFlagMetricTag{} + obj.patternFlowGtpv1SFlagMetricTagSlice = []PatternFlowGtpv1SFlagMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter) clearHolderSlice() PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter { + if len(obj.patternFlowGtpv1SFlagMetricTagSlice) > 0 { + obj.patternFlowGtpv1SFlagMetricTagSlice = []PatternFlowGtpv1SFlagMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter) appendHolderSlice(item PatternFlowGtpv1SFlagMetricTag) PatternFlowGtpv1SFlagPatternFlowGtpv1SFlagMetricTagIter { + obj.patternFlowGtpv1SFlagMetricTagSlice = append(obj.patternFlowGtpv1SFlagMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv1SFlag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1SFlag.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv1SFlag.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv1SFlagMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv1SFlag) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv1SFlagChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv1SFlagChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv1SFlagChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv1SFlagChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv1SFlagChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv1SFlagChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv1SFlag") + } + } else { + intVal := otg.PatternFlowGtpv1SFlag_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv1SFlag_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_s_flag_counter.go b/gosnappi/pattern_flow_gtpv1_s_flag_counter.go new file mode 100644 index 00000000..c0d14a20 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_s_flag_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1SFlagCounter ***** +type patternFlowGtpv1SFlagCounter struct { + validation + obj *otg.PatternFlowGtpv1SFlagCounter + marshaller marshalPatternFlowGtpv1SFlagCounter + unMarshaller unMarshalPatternFlowGtpv1SFlagCounter +} + +func NewPatternFlowGtpv1SFlagCounter() PatternFlowGtpv1SFlagCounter { + obj := patternFlowGtpv1SFlagCounter{obj: &otg.PatternFlowGtpv1SFlagCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1SFlagCounter) msg() *otg.PatternFlowGtpv1SFlagCounter { + return obj.obj +} + +func (obj *patternFlowGtpv1SFlagCounter) setMsg(msg *otg.PatternFlowGtpv1SFlagCounter) PatternFlowGtpv1SFlagCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1SFlagCounter struct { + obj *patternFlowGtpv1SFlagCounter +} + +type marshalPatternFlowGtpv1SFlagCounter interface { + // ToProto marshals PatternFlowGtpv1SFlagCounter to protobuf object *otg.PatternFlowGtpv1SFlagCounter + ToProto() (*otg.PatternFlowGtpv1SFlagCounter, error) + // ToPbText marshals PatternFlowGtpv1SFlagCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1SFlagCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1SFlagCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1SFlagCounter struct { + obj *patternFlowGtpv1SFlagCounter +} + +type unMarshalPatternFlowGtpv1SFlagCounter interface { + // FromProto unmarshals PatternFlowGtpv1SFlagCounter from protobuf object *otg.PatternFlowGtpv1SFlagCounter + FromProto(msg *otg.PatternFlowGtpv1SFlagCounter) (PatternFlowGtpv1SFlagCounter, error) + // FromPbText unmarshals PatternFlowGtpv1SFlagCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1SFlagCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1SFlagCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1SFlagCounter) Marshal() marshalPatternFlowGtpv1SFlagCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1SFlagCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1SFlagCounter) Unmarshal() unMarshalPatternFlowGtpv1SFlagCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1SFlagCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1SFlagCounter) ToProto() (*otg.PatternFlowGtpv1SFlagCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1SFlagCounter) FromProto(msg *otg.PatternFlowGtpv1SFlagCounter) (PatternFlowGtpv1SFlagCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1SFlagCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1SFlagCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1SFlagCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1SFlagCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1SFlagCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1SFlagCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1SFlagCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1SFlagCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1SFlagCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1SFlagCounter) Clone() (PatternFlowGtpv1SFlagCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1SFlagCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1SFlagCounter is integer counter pattern +type PatternFlowGtpv1SFlagCounter interface { + Validation + // msg marshals PatternFlowGtpv1SFlagCounter to protobuf object *otg.PatternFlowGtpv1SFlagCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1SFlagCounter + // setMsg unmarshals PatternFlowGtpv1SFlagCounter from protobuf object *otg.PatternFlowGtpv1SFlagCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1SFlagCounter) PatternFlowGtpv1SFlagCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv1SFlagCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1SFlagCounter + // validate validates PatternFlowGtpv1SFlagCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1SFlagCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv1SFlagCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv1SFlagCounter + SetStart(value uint32) PatternFlowGtpv1SFlagCounter + // HasStart checks if Start has been set in PatternFlowGtpv1SFlagCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv1SFlagCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv1SFlagCounter + SetStep(value uint32) PatternFlowGtpv1SFlagCounter + // HasStep checks if Step has been set in PatternFlowGtpv1SFlagCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv1SFlagCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv1SFlagCounter + SetCount(value uint32) PatternFlowGtpv1SFlagCounter + // HasCount checks if Count has been set in PatternFlowGtpv1SFlagCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1SFlagCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1SFlagCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv1SFlagCounter object +func (obj *patternFlowGtpv1SFlagCounter) SetStart(value uint32) PatternFlowGtpv1SFlagCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1SFlagCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1SFlagCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv1SFlagCounter object +func (obj *patternFlowGtpv1SFlagCounter) SetStep(value uint32) PatternFlowGtpv1SFlagCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1SFlagCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1SFlagCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv1SFlagCounter object +func (obj *patternFlowGtpv1SFlagCounter) SetCount(value uint32) PatternFlowGtpv1SFlagCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv1SFlagCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1SFlagCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1SFlagCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1SFlagCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv1SFlagCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_s_flag_metric_tag.go b/gosnappi/pattern_flow_gtpv1_s_flag_metric_tag.go new file mode 100644 index 00000000..e9077733 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_s_flag_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1SFlagMetricTag ***** +type patternFlowGtpv1SFlagMetricTag struct { + validation + obj *otg.PatternFlowGtpv1SFlagMetricTag + marshaller marshalPatternFlowGtpv1SFlagMetricTag + unMarshaller unMarshalPatternFlowGtpv1SFlagMetricTag +} + +func NewPatternFlowGtpv1SFlagMetricTag() PatternFlowGtpv1SFlagMetricTag { + obj := patternFlowGtpv1SFlagMetricTag{obj: &otg.PatternFlowGtpv1SFlagMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1SFlagMetricTag) msg() *otg.PatternFlowGtpv1SFlagMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv1SFlagMetricTag) setMsg(msg *otg.PatternFlowGtpv1SFlagMetricTag) PatternFlowGtpv1SFlagMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1SFlagMetricTag struct { + obj *patternFlowGtpv1SFlagMetricTag +} + +type marshalPatternFlowGtpv1SFlagMetricTag interface { + // ToProto marshals PatternFlowGtpv1SFlagMetricTag to protobuf object *otg.PatternFlowGtpv1SFlagMetricTag + ToProto() (*otg.PatternFlowGtpv1SFlagMetricTag, error) + // ToPbText marshals PatternFlowGtpv1SFlagMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1SFlagMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1SFlagMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1SFlagMetricTag struct { + obj *patternFlowGtpv1SFlagMetricTag +} + +type unMarshalPatternFlowGtpv1SFlagMetricTag interface { + // FromProto unmarshals PatternFlowGtpv1SFlagMetricTag from protobuf object *otg.PatternFlowGtpv1SFlagMetricTag + FromProto(msg *otg.PatternFlowGtpv1SFlagMetricTag) (PatternFlowGtpv1SFlagMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv1SFlagMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1SFlagMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1SFlagMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1SFlagMetricTag) Marshal() marshalPatternFlowGtpv1SFlagMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1SFlagMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1SFlagMetricTag) Unmarshal() unMarshalPatternFlowGtpv1SFlagMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1SFlagMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1SFlagMetricTag) ToProto() (*otg.PatternFlowGtpv1SFlagMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1SFlagMetricTag) FromProto(msg *otg.PatternFlowGtpv1SFlagMetricTag) (PatternFlowGtpv1SFlagMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1SFlagMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1SFlagMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1SFlagMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1SFlagMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1SFlagMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1SFlagMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1SFlagMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1SFlagMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1SFlagMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1SFlagMetricTag) Clone() (PatternFlowGtpv1SFlagMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1SFlagMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1SFlagMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv1SFlagMetricTag interface { + Validation + // msg marshals PatternFlowGtpv1SFlagMetricTag to protobuf object *otg.PatternFlowGtpv1SFlagMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1SFlagMetricTag + // setMsg unmarshals PatternFlowGtpv1SFlagMetricTag from protobuf object *otg.PatternFlowGtpv1SFlagMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1SFlagMetricTag) PatternFlowGtpv1SFlagMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1SFlagMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1SFlagMetricTag + // validate validates PatternFlowGtpv1SFlagMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1SFlagMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv1SFlagMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv1SFlagMetricTag + SetName(value string) PatternFlowGtpv1SFlagMetricTag + // Offset returns uint32, set in PatternFlowGtpv1SFlagMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv1SFlagMetricTag + SetOffset(value uint32) PatternFlowGtpv1SFlagMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv1SFlagMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv1SFlagMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv1SFlagMetricTag + SetLength(value uint32) PatternFlowGtpv1SFlagMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv1SFlagMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv1SFlagMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv1SFlagMetricTag object +func (obj *patternFlowGtpv1SFlagMetricTag) SetName(value string) PatternFlowGtpv1SFlagMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1SFlagMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1SFlagMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv1SFlagMetricTag object +func (obj *patternFlowGtpv1SFlagMetricTag) SetOffset(value uint32) PatternFlowGtpv1SFlagMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1SFlagMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1SFlagMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv1SFlagMetricTag object +func (obj *patternFlowGtpv1SFlagMetricTag) SetLength(value uint32) PatternFlowGtpv1SFlagMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv1SFlagMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv1SFlagMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1SFlagMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv1SFlagMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv1SFlagMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_squence_number.go b/gosnappi/pattern_flow_gtpv1_squence_number.go new file mode 100644 index 00000000..d938aa6e --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_squence_number.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1SquenceNumber ***** +type patternFlowGtpv1SquenceNumber struct { + validation + obj *otg.PatternFlowGtpv1SquenceNumber + marshaller marshalPatternFlowGtpv1SquenceNumber + unMarshaller unMarshalPatternFlowGtpv1SquenceNumber + incrementHolder PatternFlowGtpv1SquenceNumberCounter + decrementHolder PatternFlowGtpv1SquenceNumberCounter + metricTagsHolder PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter +} + +func NewPatternFlowGtpv1SquenceNumber() PatternFlowGtpv1SquenceNumber { + obj := patternFlowGtpv1SquenceNumber{obj: &otg.PatternFlowGtpv1SquenceNumber{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1SquenceNumber) msg() *otg.PatternFlowGtpv1SquenceNumber { + return obj.obj +} + +func (obj *patternFlowGtpv1SquenceNumber) setMsg(msg *otg.PatternFlowGtpv1SquenceNumber) PatternFlowGtpv1SquenceNumber { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1SquenceNumber struct { + obj *patternFlowGtpv1SquenceNumber +} + +type marshalPatternFlowGtpv1SquenceNumber interface { + // ToProto marshals PatternFlowGtpv1SquenceNumber to protobuf object *otg.PatternFlowGtpv1SquenceNumber + ToProto() (*otg.PatternFlowGtpv1SquenceNumber, error) + // ToPbText marshals PatternFlowGtpv1SquenceNumber to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1SquenceNumber to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1SquenceNumber to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1SquenceNumber struct { + obj *patternFlowGtpv1SquenceNumber +} + +type unMarshalPatternFlowGtpv1SquenceNumber interface { + // FromProto unmarshals PatternFlowGtpv1SquenceNumber from protobuf object *otg.PatternFlowGtpv1SquenceNumber + FromProto(msg *otg.PatternFlowGtpv1SquenceNumber) (PatternFlowGtpv1SquenceNumber, error) + // FromPbText unmarshals PatternFlowGtpv1SquenceNumber from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1SquenceNumber from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1SquenceNumber from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1SquenceNumber) Marshal() marshalPatternFlowGtpv1SquenceNumber { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1SquenceNumber{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1SquenceNumber) Unmarshal() unMarshalPatternFlowGtpv1SquenceNumber { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1SquenceNumber{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1SquenceNumber) ToProto() (*otg.PatternFlowGtpv1SquenceNumber, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1SquenceNumber) FromProto(msg *otg.PatternFlowGtpv1SquenceNumber) (PatternFlowGtpv1SquenceNumber, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1SquenceNumber) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1SquenceNumber) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1SquenceNumber) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1SquenceNumber) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1SquenceNumber) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1SquenceNumber) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1SquenceNumber) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1SquenceNumber) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1SquenceNumber) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1SquenceNumber) Clone() (PatternFlowGtpv1SquenceNumber, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1SquenceNumber() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv1SquenceNumber) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv1SquenceNumber is sequence number. Exists if any of the e_flag, s_flag, or pn_flag bits are on. Must be interpreted only if the s_flag bit is on. +type PatternFlowGtpv1SquenceNumber interface { + Validation + // msg marshals PatternFlowGtpv1SquenceNumber to protobuf object *otg.PatternFlowGtpv1SquenceNumber + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1SquenceNumber + // setMsg unmarshals PatternFlowGtpv1SquenceNumber from protobuf object *otg.PatternFlowGtpv1SquenceNumber + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1SquenceNumber) PatternFlowGtpv1SquenceNumber + // provides marshal interface + Marshal() marshalPatternFlowGtpv1SquenceNumber + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1SquenceNumber + // validate validates PatternFlowGtpv1SquenceNumber + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1SquenceNumber, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv1SquenceNumberChoiceEnum, set in PatternFlowGtpv1SquenceNumber + Choice() PatternFlowGtpv1SquenceNumberChoiceEnum + // setChoice assigns PatternFlowGtpv1SquenceNumberChoiceEnum provided by user to PatternFlowGtpv1SquenceNumber + setChoice(value PatternFlowGtpv1SquenceNumberChoiceEnum) PatternFlowGtpv1SquenceNumber + // HasChoice checks if Choice has been set in PatternFlowGtpv1SquenceNumber + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv1SquenceNumber. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv1SquenceNumber + SetValue(value uint32) PatternFlowGtpv1SquenceNumber + // HasValue checks if Value has been set in PatternFlowGtpv1SquenceNumber + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv1SquenceNumber. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv1SquenceNumber + SetValues(value []uint32) PatternFlowGtpv1SquenceNumber + // Increment returns PatternFlowGtpv1SquenceNumberCounter, set in PatternFlowGtpv1SquenceNumber. + // PatternFlowGtpv1SquenceNumberCounter is integer counter pattern + Increment() PatternFlowGtpv1SquenceNumberCounter + // SetIncrement assigns PatternFlowGtpv1SquenceNumberCounter provided by user to PatternFlowGtpv1SquenceNumber. + // PatternFlowGtpv1SquenceNumberCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv1SquenceNumberCounter) PatternFlowGtpv1SquenceNumber + // HasIncrement checks if Increment has been set in PatternFlowGtpv1SquenceNumber + HasIncrement() bool + // Decrement returns PatternFlowGtpv1SquenceNumberCounter, set in PatternFlowGtpv1SquenceNumber. + // PatternFlowGtpv1SquenceNumberCounter is integer counter pattern + Decrement() PatternFlowGtpv1SquenceNumberCounter + // SetDecrement assigns PatternFlowGtpv1SquenceNumberCounter provided by user to PatternFlowGtpv1SquenceNumber. + // PatternFlowGtpv1SquenceNumberCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv1SquenceNumberCounter) PatternFlowGtpv1SquenceNumber + // HasDecrement checks if Decrement has been set in PatternFlowGtpv1SquenceNumber + HasDecrement() bool + // MetricTags returns PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIterIter, set in PatternFlowGtpv1SquenceNumber + MetricTags() PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter + setNil() +} + +type PatternFlowGtpv1SquenceNumberChoiceEnum string + +// Enum of Choice on PatternFlowGtpv1SquenceNumber +var PatternFlowGtpv1SquenceNumberChoice = struct { + VALUE PatternFlowGtpv1SquenceNumberChoiceEnum + VALUES PatternFlowGtpv1SquenceNumberChoiceEnum + INCREMENT PatternFlowGtpv1SquenceNumberChoiceEnum + DECREMENT PatternFlowGtpv1SquenceNumberChoiceEnum +}{ + VALUE: PatternFlowGtpv1SquenceNumberChoiceEnum("value"), + VALUES: PatternFlowGtpv1SquenceNumberChoiceEnum("values"), + INCREMENT: PatternFlowGtpv1SquenceNumberChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv1SquenceNumberChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv1SquenceNumber) Choice() PatternFlowGtpv1SquenceNumberChoiceEnum { + return PatternFlowGtpv1SquenceNumberChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv1SquenceNumber) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv1SquenceNumber) setChoice(value PatternFlowGtpv1SquenceNumberChoiceEnum) PatternFlowGtpv1SquenceNumber { + intValue, ok := otg.PatternFlowGtpv1SquenceNumber_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv1SquenceNumberChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv1SquenceNumber_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv1SquenceNumberChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv1SquenceNumberChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv1SquenceNumberChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv1SquenceNumberCounter().msg() + } + + if value == PatternFlowGtpv1SquenceNumberChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv1SquenceNumberCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1SquenceNumber) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv1SquenceNumberChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1SquenceNumber) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv1SquenceNumber object +func (obj *patternFlowGtpv1SquenceNumber) SetValue(value uint32) PatternFlowGtpv1SquenceNumber { + obj.setChoice(PatternFlowGtpv1SquenceNumberChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv1SquenceNumber) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv1SquenceNumber object +func (obj *patternFlowGtpv1SquenceNumber) SetValues(value []uint32) PatternFlowGtpv1SquenceNumber { + obj.setChoice(PatternFlowGtpv1SquenceNumberChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv1SquenceNumberCounter +func (obj *patternFlowGtpv1SquenceNumber) Increment() PatternFlowGtpv1SquenceNumberCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv1SquenceNumberChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv1SquenceNumberCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv1SquenceNumberCounter +func (obj *patternFlowGtpv1SquenceNumber) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv1SquenceNumberCounter value in the PatternFlowGtpv1SquenceNumber object +func (obj *patternFlowGtpv1SquenceNumber) SetIncrement(value PatternFlowGtpv1SquenceNumberCounter) PatternFlowGtpv1SquenceNumber { + obj.setChoice(PatternFlowGtpv1SquenceNumberChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1SquenceNumberCounter +func (obj *patternFlowGtpv1SquenceNumber) Decrement() PatternFlowGtpv1SquenceNumberCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv1SquenceNumberChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv1SquenceNumberCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1SquenceNumberCounter +func (obj *patternFlowGtpv1SquenceNumber) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv1SquenceNumberCounter value in the PatternFlowGtpv1SquenceNumber object +func (obj *patternFlowGtpv1SquenceNumber) SetDecrement(value PatternFlowGtpv1SquenceNumberCounter) PatternFlowGtpv1SquenceNumber { + obj.setChoice(PatternFlowGtpv1SquenceNumberChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv1SquenceNumberMetricTag +func (obj *patternFlowGtpv1SquenceNumber) MetricTags() PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv1SquenceNumberMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter struct { + obj *patternFlowGtpv1SquenceNumber + patternFlowGtpv1SquenceNumberMetricTagSlice []PatternFlowGtpv1SquenceNumberMetricTag + fieldPtr *[]*otg.PatternFlowGtpv1SquenceNumberMetricTag +} + +func newPatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter(ptr *[]*otg.PatternFlowGtpv1SquenceNumberMetricTag) PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter { + return &patternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter interface { + setMsg(*patternFlowGtpv1SquenceNumber) PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter + Items() []PatternFlowGtpv1SquenceNumberMetricTag + Add() PatternFlowGtpv1SquenceNumberMetricTag + Append(items ...PatternFlowGtpv1SquenceNumberMetricTag) PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter + Set(index int, newObj PatternFlowGtpv1SquenceNumberMetricTag) PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter + Clear() PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter + clearHolderSlice() PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter + appendHolderSlice(item PatternFlowGtpv1SquenceNumberMetricTag) PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter +} + +func (obj *patternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter) setMsg(msg *patternFlowGtpv1SquenceNumber) PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv1SquenceNumberMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter) Items() []PatternFlowGtpv1SquenceNumberMetricTag { + return obj.patternFlowGtpv1SquenceNumberMetricTagSlice +} + +func (obj *patternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter) Add() PatternFlowGtpv1SquenceNumberMetricTag { + newObj := &otg.PatternFlowGtpv1SquenceNumberMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv1SquenceNumberMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv1SquenceNumberMetricTagSlice = append(obj.patternFlowGtpv1SquenceNumberMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter) Append(items ...PatternFlowGtpv1SquenceNumberMetricTag) PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv1SquenceNumberMetricTagSlice = append(obj.patternFlowGtpv1SquenceNumberMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter) Set(index int, newObj PatternFlowGtpv1SquenceNumberMetricTag) PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv1SquenceNumberMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter) Clear() PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv1SquenceNumberMetricTag{} + obj.patternFlowGtpv1SquenceNumberMetricTagSlice = []PatternFlowGtpv1SquenceNumberMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter) clearHolderSlice() PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter { + if len(obj.patternFlowGtpv1SquenceNumberMetricTagSlice) > 0 { + obj.patternFlowGtpv1SquenceNumberMetricTagSlice = []PatternFlowGtpv1SquenceNumberMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter) appendHolderSlice(item PatternFlowGtpv1SquenceNumberMetricTag) PatternFlowGtpv1SquenceNumberPatternFlowGtpv1SquenceNumberMetricTagIter { + obj.patternFlowGtpv1SquenceNumberMetricTagSlice = append(obj.patternFlowGtpv1SquenceNumberMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv1SquenceNumber) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1SquenceNumber.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv1SquenceNumber.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv1SquenceNumberMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv1SquenceNumber) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv1SquenceNumberChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv1SquenceNumberChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv1SquenceNumberChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv1SquenceNumberChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv1SquenceNumberChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv1SquenceNumberChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv1SquenceNumber") + } + } else { + intVal := otg.PatternFlowGtpv1SquenceNumber_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv1SquenceNumber_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_squence_number_counter.go b/gosnappi/pattern_flow_gtpv1_squence_number_counter.go new file mode 100644 index 00000000..8c94ac24 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_squence_number_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1SquenceNumberCounter ***** +type patternFlowGtpv1SquenceNumberCounter struct { + validation + obj *otg.PatternFlowGtpv1SquenceNumberCounter + marshaller marshalPatternFlowGtpv1SquenceNumberCounter + unMarshaller unMarshalPatternFlowGtpv1SquenceNumberCounter +} + +func NewPatternFlowGtpv1SquenceNumberCounter() PatternFlowGtpv1SquenceNumberCounter { + obj := patternFlowGtpv1SquenceNumberCounter{obj: &otg.PatternFlowGtpv1SquenceNumberCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1SquenceNumberCounter) msg() *otg.PatternFlowGtpv1SquenceNumberCounter { + return obj.obj +} + +func (obj *patternFlowGtpv1SquenceNumberCounter) setMsg(msg *otg.PatternFlowGtpv1SquenceNumberCounter) PatternFlowGtpv1SquenceNumberCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1SquenceNumberCounter struct { + obj *patternFlowGtpv1SquenceNumberCounter +} + +type marshalPatternFlowGtpv1SquenceNumberCounter interface { + // ToProto marshals PatternFlowGtpv1SquenceNumberCounter to protobuf object *otg.PatternFlowGtpv1SquenceNumberCounter + ToProto() (*otg.PatternFlowGtpv1SquenceNumberCounter, error) + // ToPbText marshals PatternFlowGtpv1SquenceNumberCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1SquenceNumberCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1SquenceNumberCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1SquenceNumberCounter struct { + obj *patternFlowGtpv1SquenceNumberCounter +} + +type unMarshalPatternFlowGtpv1SquenceNumberCounter interface { + // FromProto unmarshals PatternFlowGtpv1SquenceNumberCounter from protobuf object *otg.PatternFlowGtpv1SquenceNumberCounter + FromProto(msg *otg.PatternFlowGtpv1SquenceNumberCounter) (PatternFlowGtpv1SquenceNumberCounter, error) + // FromPbText unmarshals PatternFlowGtpv1SquenceNumberCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1SquenceNumberCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1SquenceNumberCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1SquenceNumberCounter) Marshal() marshalPatternFlowGtpv1SquenceNumberCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1SquenceNumberCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1SquenceNumberCounter) Unmarshal() unMarshalPatternFlowGtpv1SquenceNumberCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1SquenceNumberCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1SquenceNumberCounter) ToProto() (*otg.PatternFlowGtpv1SquenceNumberCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1SquenceNumberCounter) FromProto(msg *otg.PatternFlowGtpv1SquenceNumberCounter) (PatternFlowGtpv1SquenceNumberCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1SquenceNumberCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1SquenceNumberCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1SquenceNumberCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1SquenceNumberCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1SquenceNumberCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1SquenceNumberCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1SquenceNumberCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1SquenceNumberCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1SquenceNumberCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1SquenceNumberCounter) Clone() (PatternFlowGtpv1SquenceNumberCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1SquenceNumberCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1SquenceNumberCounter is integer counter pattern +type PatternFlowGtpv1SquenceNumberCounter interface { + Validation + // msg marshals PatternFlowGtpv1SquenceNumberCounter to protobuf object *otg.PatternFlowGtpv1SquenceNumberCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1SquenceNumberCounter + // setMsg unmarshals PatternFlowGtpv1SquenceNumberCounter from protobuf object *otg.PatternFlowGtpv1SquenceNumberCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1SquenceNumberCounter) PatternFlowGtpv1SquenceNumberCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv1SquenceNumberCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1SquenceNumberCounter + // validate validates PatternFlowGtpv1SquenceNumberCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1SquenceNumberCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv1SquenceNumberCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv1SquenceNumberCounter + SetStart(value uint32) PatternFlowGtpv1SquenceNumberCounter + // HasStart checks if Start has been set in PatternFlowGtpv1SquenceNumberCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv1SquenceNumberCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv1SquenceNumberCounter + SetStep(value uint32) PatternFlowGtpv1SquenceNumberCounter + // HasStep checks if Step has been set in PatternFlowGtpv1SquenceNumberCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv1SquenceNumberCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv1SquenceNumberCounter + SetCount(value uint32) PatternFlowGtpv1SquenceNumberCounter + // HasCount checks if Count has been set in PatternFlowGtpv1SquenceNumberCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1SquenceNumberCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1SquenceNumberCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv1SquenceNumberCounter object +func (obj *patternFlowGtpv1SquenceNumberCounter) SetStart(value uint32) PatternFlowGtpv1SquenceNumberCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1SquenceNumberCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1SquenceNumberCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv1SquenceNumberCounter object +func (obj *patternFlowGtpv1SquenceNumberCounter) SetStep(value uint32) PatternFlowGtpv1SquenceNumberCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1SquenceNumberCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1SquenceNumberCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv1SquenceNumberCounter object +func (obj *patternFlowGtpv1SquenceNumberCounter) SetCount(value uint32) PatternFlowGtpv1SquenceNumberCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv1SquenceNumberCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1SquenceNumberCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1SquenceNumberCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1SquenceNumberCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv1SquenceNumberCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_squence_number_metric_tag.go b/gosnappi/pattern_flow_gtpv1_squence_number_metric_tag.go new file mode 100644 index 00000000..5a120d21 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_squence_number_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1SquenceNumberMetricTag ***** +type patternFlowGtpv1SquenceNumberMetricTag struct { + validation + obj *otg.PatternFlowGtpv1SquenceNumberMetricTag + marshaller marshalPatternFlowGtpv1SquenceNumberMetricTag + unMarshaller unMarshalPatternFlowGtpv1SquenceNumberMetricTag +} + +func NewPatternFlowGtpv1SquenceNumberMetricTag() PatternFlowGtpv1SquenceNumberMetricTag { + obj := patternFlowGtpv1SquenceNumberMetricTag{obj: &otg.PatternFlowGtpv1SquenceNumberMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1SquenceNumberMetricTag) msg() *otg.PatternFlowGtpv1SquenceNumberMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv1SquenceNumberMetricTag) setMsg(msg *otg.PatternFlowGtpv1SquenceNumberMetricTag) PatternFlowGtpv1SquenceNumberMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1SquenceNumberMetricTag struct { + obj *patternFlowGtpv1SquenceNumberMetricTag +} + +type marshalPatternFlowGtpv1SquenceNumberMetricTag interface { + // ToProto marshals PatternFlowGtpv1SquenceNumberMetricTag to protobuf object *otg.PatternFlowGtpv1SquenceNumberMetricTag + ToProto() (*otg.PatternFlowGtpv1SquenceNumberMetricTag, error) + // ToPbText marshals PatternFlowGtpv1SquenceNumberMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1SquenceNumberMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1SquenceNumberMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1SquenceNumberMetricTag struct { + obj *patternFlowGtpv1SquenceNumberMetricTag +} + +type unMarshalPatternFlowGtpv1SquenceNumberMetricTag interface { + // FromProto unmarshals PatternFlowGtpv1SquenceNumberMetricTag from protobuf object *otg.PatternFlowGtpv1SquenceNumberMetricTag + FromProto(msg *otg.PatternFlowGtpv1SquenceNumberMetricTag) (PatternFlowGtpv1SquenceNumberMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv1SquenceNumberMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1SquenceNumberMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1SquenceNumberMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1SquenceNumberMetricTag) Marshal() marshalPatternFlowGtpv1SquenceNumberMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1SquenceNumberMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1SquenceNumberMetricTag) Unmarshal() unMarshalPatternFlowGtpv1SquenceNumberMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1SquenceNumberMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1SquenceNumberMetricTag) ToProto() (*otg.PatternFlowGtpv1SquenceNumberMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1SquenceNumberMetricTag) FromProto(msg *otg.PatternFlowGtpv1SquenceNumberMetricTag) (PatternFlowGtpv1SquenceNumberMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1SquenceNumberMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1SquenceNumberMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1SquenceNumberMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1SquenceNumberMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1SquenceNumberMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1SquenceNumberMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1SquenceNumberMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1SquenceNumberMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1SquenceNumberMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1SquenceNumberMetricTag) Clone() (PatternFlowGtpv1SquenceNumberMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1SquenceNumberMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1SquenceNumberMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv1SquenceNumberMetricTag interface { + Validation + // msg marshals PatternFlowGtpv1SquenceNumberMetricTag to protobuf object *otg.PatternFlowGtpv1SquenceNumberMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1SquenceNumberMetricTag + // setMsg unmarshals PatternFlowGtpv1SquenceNumberMetricTag from protobuf object *otg.PatternFlowGtpv1SquenceNumberMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1SquenceNumberMetricTag) PatternFlowGtpv1SquenceNumberMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1SquenceNumberMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1SquenceNumberMetricTag + // validate validates PatternFlowGtpv1SquenceNumberMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1SquenceNumberMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv1SquenceNumberMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv1SquenceNumberMetricTag + SetName(value string) PatternFlowGtpv1SquenceNumberMetricTag + // Offset returns uint32, set in PatternFlowGtpv1SquenceNumberMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv1SquenceNumberMetricTag + SetOffset(value uint32) PatternFlowGtpv1SquenceNumberMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv1SquenceNumberMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv1SquenceNumberMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv1SquenceNumberMetricTag + SetLength(value uint32) PatternFlowGtpv1SquenceNumberMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv1SquenceNumberMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv1SquenceNumberMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv1SquenceNumberMetricTag object +func (obj *patternFlowGtpv1SquenceNumberMetricTag) SetName(value string) PatternFlowGtpv1SquenceNumberMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1SquenceNumberMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1SquenceNumberMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv1SquenceNumberMetricTag object +func (obj *patternFlowGtpv1SquenceNumberMetricTag) SetOffset(value uint32) PatternFlowGtpv1SquenceNumberMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1SquenceNumberMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1SquenceNumberMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv1SquenceNumberMetricTag object +func (obj *patternFlowGtpv1SquenceNumberMetricTag) SetLength(value uint32) PatternFlowGtpv1SquenceNumberMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv1SquenceNumberMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv1SquenceNumberMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1SquenceNumberMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv1SquenceNumberMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv1SquenceNumberMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_teid.go b/gosnappi/pattern_flow_gtpv1_teid.go new file mode 100644 index 00000000..7b9df3dc --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_teid.go @@ -0,0 +1,640 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1Teid ***** +type patternFlowGtpv1Teid struct { + validation + obj *otg.PatternFlowGtpv1Teid + marshaller marshalPatternFlowGtpv1Teid + unMarshaller unMarshalPatternFlowGtpv1Teid + incrementHolder PatternFlowGtpv1TeidCounter + decrementHolder PatternFlowGtpv1TeidCounter + metricTagsHolder PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter +} + +func NewPatternFlowGtpv1Teid() PatternFlowGtpv1Teid { + obj := patternFlowGtpv1Teid{obj: &otg.PatternFlowGtpv1Teid{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1Teid) msg() *otg.PatternFlowGtpv1Teid { + return obj.obj +} + +func (obj *patternFlowGtpv1Teid) setMsg(msg *otg.PatternFlowGtpv1Teid) PatternFlowGtpv1Teid { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1Teid struct { + obj *patternFlowGtpv1Teid +} + +type marshalPatternFlowGtpv1Teid interface { + // ToProto marshals PatternFlowGtpv1Teid to protobuf object *otg.PatternFlowGtpv1Teid + ToProto() (*otg.PatternFlowGtpv1Teid, error) + // ToPbText marshals PatternFlowGtpv1Teid to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1Teid to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1Teid to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1Teid struct { + obj *patternFlowGtpv1Teid +} + +type unMarshalPatternFlowGtpv1Teid interface { + // FromProto unmarshals PatternFlowGtpv1Teid from protobuf object *otg.PatternFlowGtpv1Teid + FromProto(msg *otg.PatternFlowGtpv1Teid) (PatternFlowGtpv1Teid, error) + // FromPbText unmarshals PatternFlowGtpv1Teid from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1Teid from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1Teid from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1Teid) Marshal() marshalPatternFlowGtpv1Teid { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1Teid{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1Teid) Unmarshal() unMarshalPatternFlowGtpv1Teid { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1Teid{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1Teid) ToProto() (*otg.PatternFlowGtpv1Teid, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1Teid) FromProto(msg *otg.PatternFlowGtpv1Teid) (PatternFlowGtpv1Teid, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1Teid) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1Teid) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1Teid) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1Teid) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1Teid) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1Teid) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1Teid) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1Teid) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1Teid) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1Teid) Clone() (PatternFlowGtpv1Teid, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1Teid() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv1Teid) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv1Teid is tunnel endpoint identifier (TEID) used to multiplex connections in the same GTP tunnel +type PatternFlowGtpv1Teid interface { + Validation + // msg marshals PatternFlowGtpv1Teid to protobuf object *otg.PatternFlowGtpv1Teid + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1Teid + // setMsg unmarshals PatternFlowGtpv1Teid from protobuf object *otg.PatternFlowGtpv1Teid + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1Teid) PatternFlowGtpv1Teid + // provides marshal interface + Marshal() marshalPatternFlowGtpv1Teid + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1Teid + // validate validates PatternFlowGtpv1Teid + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1Teid, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv1TeidChoiceEnum, set in PatternFlowGtpv1Teid + Choice() PatternFlowGtpv1TeidChoiceEnum + // setChoice assigns PatternFlowGtpv1TeidChoiceEnum provided by user to PatternFlowGtpv1Teid + setChoice(value PatternFlowGtpv1TeidChoiceEnum) PatternFlowGtpv1Teid + // HasChoice checks if Choice has been set in PatternFlowGtpv1Teid + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv1Teid. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv1Teid + SetValue(value uint32) PatternFlowGtpv1Teid + // HasValue checks if Value has been set in PatternFlowGtpv1Teid + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv1Teid. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv1Teid + SetValues(value []uint32) PatternFlowGtpv1Teid + // Increment returns PatternFlowGtpv1TeidCounter, set in PatternFlowGtpv1Teid. + // PatternFlowGtpv1TeidCounter is integer counter pattern + Increment() PatternFlowGtpv1TeidCounter + // SetIncrement assigns PatternFlowGtpv1TeidCounter provided by user to PatternFlowGtpv1Teid. + // PatternFlowGtpv1TeidCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv1TeidCounter) PatternFlowGtpv1Teid + // HasIncrement checks if Increment has been set in PatternFlowGtpv1Teid + HasIncrement() bool + // Decrement returns PatternFlowGtpv1TeidCounter, set in PatternFlowGtpv1Teid. + // PatternFlowGtpv1TeidCounter is integer counter pattern + Decrement() PatternFlowGtpv1TeidCounter + // SetDecrement assigns PatternFlowGtpv1TeidCounter provided by user to PatternFlowGtpv1Teid. + // PatternFlowGtpv1TeidCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv1TeidCounter) PatternFlowGtpv1Teid + // HasDecrement checks if Decrement has been set in PatternFlowGtpv1Teid + HasDecrement() bool + // MetricTags returns PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIterIter, set in PatternFlowGtpv1Teid + MetricTags() PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter + setNil() +} + +type PatternFlowGtpv1TeidChoiceEnum string + +// Enum of Choice on PatternFlowGtpv1Teid +var PatternFlowGtpv1TeidChoice = struct { + VALUE PatternFlowGtpv1TeidChoiceEnum + VALUES PatternFlowGtpv1TeidChoiceEnum + INCREMENT PatternFlowGtpv1TeidChoiceEnum + DECREMENT PatternFlowGtpv1TeidChoiceEnum +}{ + VALUE: PatternFlowGtpv1TeidChoiceEnum("value"), + VALUES: PatternFlowGtpv1TeidChoiceEnum("values"), + INCREMENT: PatternFlowGtpv1TeidChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv1TeidChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv1Teid) Choice() PatternFlowGtpv1TeidChoiceEnum { + return PatternFlowGtpv1TeidChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv1Teid) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv1Teid) setChoice(value PatternFlowGtpv1TeidChoiceEnum) PatternFlowGtpv1Teid { + intValue, ok := otg.PatternFlowGtpv1Teid_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv1TeidChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv1Teid_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv1TeidChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv1TeidChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv1TeidChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv1TeidCounter().msg() + } + + if value == PatternFlowGtpv1TeidChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv1TeidCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1Teid) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv1TeidChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1Teid) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv1Teid object +func (obj *patternFlowGtpv1Teid) SetValue(value uint32) PatternFlowGtpv1Teid { + obj.setChoice(PatternFlowGtpv1TeidChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv1Teid) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv1Teid object +func (obj *patternFlowGtpv1Teid) SetValues(value []uint32) PatternFlowGtpv1Teid { + obj.setChoice(PatternFlowGtpv1TeidChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv1TeidCounter +func (obj *patternFlowGtpv1Teid) Increment() PatternFlowGtpv1TeidCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv1TeidChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv1TeidCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv1TeidCounter +func (obj *patternFlowGtpv1Teid) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv1TeidCounter value in the PatternFlowGtpv1Teid object +func (obj *patternFlowGtpv1Teid) SetIncrement(value PatternFlowGtpv1TeidCounter) PatternFlowGtpv1Teid { + obj.setChoice(PatternFlowGtpv1TeidChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1TeidCounter +func (obj *patternFlowGtpv1Teid) Decrement() PatternFlowGtpv1TeidCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv1TeidChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv1TeidCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1TeidCounter +func (obj *patternFlowGtpv1Teid) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv1TeidCounter value in the PatternFlowGtpv1Teid object +func (obj *patternFlowGtpv1Teid) SetDecrement(value PatternFlowGtpv1TeidCounter) PatternFlowGtpv1Teid { + obj.setChoice(PatternFlowGtpv1TeidChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv1TeidMetricTag +func (obj *patternFlowGtpv1Teid) MetricTags() PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv1TeidMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter struct { + obj *patternFlowGtpv1Teid + patternFlowGtpv1TeidMetricTagSlice []PatternFlowGtpv1TeidMetricTag + fieldPtr *[]*otg.PatternFlowGtpv1TeidMetricTag +} + +func newPatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter(ptr *[]*otg.PatternFlowGtpv1TeidMetricTag) PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter { + return &patternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter interface { + setMsg(*patternFlowGtpv1Teid) PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter + Items() []PatternFlowGtpv1TeidMetricTag + Add() PatternFlowGtpv1TeidMetricTag + Append(items ...PatternFlowGtpv1TeidMetricTag) PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter + Set(index int, newObj PatternFlowGtpv1TeidMetricTag) PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter + Clear() PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter + clearHolderSlice() PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter + appendHolderSlice(item PatternFlowGtpv1TeidMetricTag) PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter +} + +func (obj *patternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter) setMsg(msg *patternFlowGtpv1Teid) PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv1TeidMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter) Items() []PatternFlowGtpv1TeidMetricTag { + return obj.patternFlowGtpv1TeidMetricTagSlice +} + +func (obj *patternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter) Add() PatternFlowGtpv1TeidMetricTag { + newObj := &otg.PatternFlowGtpv1TeidMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv1TeidMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv1TeidMetricTagSlice = append(obj.patternFlowGtpv1TeidMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter) Append(items ...PatternFlowGtpv1TeidMetricTag) PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv1TeidMetricTagSlice = append(obj.patternFlowGtpv1TeidMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter) Set(index int, newObj PatternFlowGtpv1TeidMetricTag) PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv1TeidMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter) Clear() PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv1TeidMetricTag{} + obj.patternFlowGtpv1TeidMetricTagSlice = []PatternFlowGtpv1TeidMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter) clearHolderSlice() PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter { + if len(obj.patternFlowGtpv1TeidMetricTagSlice) > 0 { + obj.patternFlowGtpv1TeidMetricTagSlice = []PatternFlowGtpv1TeidMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter) appendHolderSlice(item PatternFlowGtpv1TeidMetricTag) PatternFlowGtpv1TeidPatternFlowGtpv1TeidMetricTagIter { + obj.patternFlowGtpv1TeidMetricTagSlice = append(obj.patternFlowGtpv1TeidMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv1Teid) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv1TeidMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv1Teid) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv1TeidChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv1TeidChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv1TeidChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv1TeidChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv1TeidChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv1TeidChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv1Teid") + } + } else { + intVal := otg.PatternFlowGtpv1Teid_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv1Teid_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_teid_counter.go b/gosnappi/pattern_flow_gtpv1_teid_counter.go new file mode 100644 index 00000000..f50cb5ff --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_teid_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1TeidCounter ***** +type patternFlowGtpv1TeidCounter struct { + validation + obj *otg.PatternFlowGtpv1TeidCounter + marshaller marshalPatternFlowGtpv1TeidCounter + unMarshaller unMarshalPatternFlowGtpv1TeidCounter +} + +func NewPatternFlowGtpv1TeidCounter() PatternFlowGtpv1TeidCounter { + obj := patternFlowGtpv1TeidCounter{obj: &otg.PatternFlowGtpv1TeidCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1TeidCounter) msg() *otg.PatternFlowGtpv1TeidCounter { + return obj.obj +} + +func (obj *patternFlowGtpv1TeidCounter) setMsg(msg *otg.PatternFlowGtpv1TeidCounter) PatternFlowGtpv1TeidCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1TeidCounter struct { + obj *patternFlowGtpv1TeidCounter +} + +type marshalPatternFlowGtpv1TeidCounter interface { + // ToProto marshals PatternFlowGtpv1TeidCounter to protobuf object *otg.PatternFlowGtpv1TeidCounter + ToProto() (*otg.PatternFlowGtpv1TeidCounter, error) + // ToPbText marshals PatternFlowGtpv1TeidCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1TeidCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1TeidCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1TeidCounter struct { + obj *patternFlowGtpv1TeidCounter +} + +type unMarshalPatternFlowGtpv1TeidCounter interface { + // FromProto unmarshals PatternFlowGtpv1TeidCounter from protobuf object *otg.PatternFlowGtpv1TeidCounter + FromProto(msg *otg.PatternFlowGtpv1TeidCounter) (PatternFlowGtpv1TeidCounter, error) + // FromPbText unmarshals PatternFlowGtpv1TeidCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1TeidCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1TeidCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1TeidCounter) Marshal() marshalPatternFlowGtpv1TeidCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1TeidCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1TeidCounter) Unmarshal() unMarshalPatternFlowGtpv1TeidCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1TeidCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1TeidCounter) ToProto() (*otg.PatternFlowGtpv1TeidCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1TeidCounter) FromProto(msg *otg.PatternFlowGtpv1TeidCounter) (PatternFlowGtpv1TeidCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1TeidCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1TeidCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1TeidCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1TeidCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1TeidCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1TeidCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1TeidCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1TeidCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1TeidCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1TeidCounter) Clone() (PatternFlowGtpv1TeidCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1TeidCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1TeidCounter is integer counter pattern +type PatternFlowGtpv1TeidCounter interface { + Validation + // msg marshals PatternFlowGtpv1TeidCounter to protobuf object *otg.PatternFlowGtpv1TeidCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1TeidCounter + // setMsg unmarshals PatternFlowGtpv1TeidCounter from protobuf object *otg.PatternFlowGtpv1TeidCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1TeidCounter) PatternFlowGtpv1TeidCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv1TeidCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1TeidCounter + // validate validates PatternFlowGtpv1TeidCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1TeidCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv1TeidCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv1TeidCounter + SetStart(value uint32) PatternFlowGtpv1TeidCounter + // HasStart checks if Start has been set in PatternFlowGtpv1TeidCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv1TeidCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv1TeidCounter + SetStep(value uint32) PatternFlowGtpv1TeidCounter + // HasStep checks if Step has been set in PatternFlowGtpv1TeidCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv1TeidCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv1TeidCounter + SetCount(value uint32) PatternFlowGtpv1TeidCounter + // HasCount checks if Count has been set in PatternFlowGtpv1TeidCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1TeidCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1TeidCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv1TeidCounter object +func (obj *patternFlowGtpv1TeidCounter) SetStart(value uint32) PatternFlowGtpv1TeidCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1TeidCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1TeidCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv1TeidCounter object +func (obj *patternFlowGtpv1TeidCounter) SetStep(value uint32) PatternFlowGtpv1TeidCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1TeidCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1TeidCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv1TeidCounter object +func (obj *patternFlowGtpv1TeidCounter) SetCount(value uint32) PatternFlowGtpv1TeidCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv1TeidCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowGtpv1TeidCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_teid_metric_tag.go b/gosnappi/pattern_flow_gtpv1_teid_metric_tag.go new file mode 100644 index 00000000..f78a8913 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_teid_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1TeidMetricTag ***** +type patternFlowGtpv1TeidMetricTag struct { + validation + obj *otg.PatternFlowGtpv1TeidMetricTag + marshaller marshalPatternFlowGtpv1TeidMetricTag + unMarshaller unMarshalPatternFlowGtpv1TeidMetricTag +} + +func NewPatternFlowGtpv1TeidMetricTag() PatternFlowGtpv1TeidMetricTag { + obj := patternFlowGtpv1TeidMetricTag{obj: &otg.PatternFlowGtpv1TeidMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1TeidMetricTag) msg() *otg.PatternFlowGtpv1TeidMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv1TeidMetricTag) setMsg(msg *otg.PatternFlowGtpv1TeidMetricTag) PatternFlowGtpv1TeidMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1TeidMetricTag struct { + obj *patternFlowGtpv1TeidMetricTag +} + +type marshalPatternFlowGtpv1TeidMetricTag interface { + // ToProto marshals PatternFlowGtpv1TeidMetricTag to protobuf object *otg.PatternFlowGtpv1TeidMetricTag + ToProto() (*otg.PatternFlowGtpv1TeidMetricTag, error) + // ToPbText marshals PatternFlowGtpv1TeidMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1TeidMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1TeidMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1TeidMetricTag struct { + obj *patternFlowGtpv1TeidMetricTag +} + +type unMarshalPatternFlowGtpv1TeidMetricTag interface { + // FromProto unmarshals PatternFlowGtpv1TeidMetricTag from protobuf object *otg.PatternFlowGtpv1TeidMetricTag + FromProto(msg *otg.PatternFlowGtpv1TeidMetricTag) (PatternFlowGtpv1TeidMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv1TeidMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1TeidMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1TeidMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1TeidMetricTag) Marshal() marshalPatternFlowGtpv1TeidMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1TeidMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1TeidMetricTag) Unmarshal() unMarshalPatternFlowGtpv1TeidMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1TeidMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1TeidMetricTag) ToProto() (*otg.PatternFlowGtpv1TeidMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1TeidMetricTag) FromProto(msg *otg.PatternFlowGtpv1TeidMetricTag) (PatternFlowGtpv1TeidMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1TeidMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1TeidMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1TeidMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1TeidMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1TeidMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1TeidMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1TeidMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1TeidMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1TeidMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1TeidMetricTag) Clone() (PatternFlowGtpv1TeidMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1TeidMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1TeidMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv1TeidMetricTag interface { + Validation + // msg marshals PatternFlowGtpv1TeidMetricTag to protobuf object *otg.PatternFlowGtpv1TeidMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1TeidMetricTag + // setMsg unmarshals PatternFlowGtpv1TeidMetricTag from protobuf object *otg.PatternFlowGtpv1TeidMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1TeidMetricTag) PatternFlowGtpv1TeidMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1TeidMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1TeidMetricTag + // validate validates PatternFlowGtpv1TeidMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1TeidMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv1TeidMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv1TeidMetricTag + SetName(value string) PatternFlowGtpv1TeidMetricTag + // Offset returns uint32, set in PatternFlowGtpv1TeidMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv1TeidMetricTag + SetOffset(value uint32) PatternFlowGtpv1TeidMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv1TeidMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv1TeidMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv1TeidMetricTag + SetLength(value uint32) PatternFlowGtpv1TeidMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv1TeidMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv1TeidMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv1TeidMetricTag object +func (obj *patternFlowGtpv1TeidMetricTag) SetName(value string) PatternFlowGtpv1TeidMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1TeidMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1TeidMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv1TeidMetricTag object +func (obj *patternFlowGtpv1TeidMetricTag) SetOffset(value uint32) PatternFlowGtpv1TeidMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1TeidMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1TeidMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv1TeidMetricTag object +func (obj *patternFlowGtpv1TeidMetricTag) SetLength(value uint32) PatternFlowGtpv1TeidMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv1TeidMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv1TeidMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1TeidMetricTag.Offset <= 31 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv1TeidMetricTag.Length <= 32 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv1TeidMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(32) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_version.go b/gosnappi/pattern_flow_gtpv1_version.go new file mode 100644 index 00000000..3420be77 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_version.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1Version ***** +type patternFlowGtpv1Version struct { + validation + obj *otg.PatternFlowGtpv1Version + marshaller marshalPatternFlowGtpv1Version + unMarshaller unMarshalPatternFlowGtpv1Version + incrementHolder PatternFlowGtpv1VersionCounter + decrementHolder PatternFlowGtpv1VersionCounter + metricTagsHolder PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter +} + +func NewPatternFlowGtpv1Version() PatternFlowGtpv1Version { + obj := patternFlowGtpv1Version{obj: &otg.PatternFlowGtpv1Version{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1Version) msg() *otg.PatternFlowGtpv1Version { + return obj.obj +} + +func (obj *patternFlowGtpv1Version) setMsg(msg *otg.PatternFlowGtpv1Version) PatternFlowGtpv1Version { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1Version struct { + obj *patternFlowGtpv1Version +} + +type marshalPatternFlowGtpv1Version interface { + // ToProto marshals PatternFlowGtpv1Version to protobuf object *otg.PatternFlowGtpv1Version + ToProto() (*otg.PatternFlowGtpv1Version, error) + // ToPbText marshals PatternFlowGtpv1Version to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1Version to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1Version to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1Version struct { + obj *patternFlowGtpv1Version +} + +type unMarshalPatternFlowGtpv1Version interface { + // FromProto unmarshals PatternFlowGtpv1Version from protobuf object *otg.PatternFlowGtpv1Version + FromProto(msg *otg.PatternFlowGtpv1Version) (PatternFlowGtpv1Version, error) + // FromPbText unmarshals PatternFlowGtpv1Version from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1Version from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1Version from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1Version) Marshal() marshalPatternFlowGtpv1Version { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1Version{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1Version) Unmarshal() unMarshalPatternFlowGtpv1Version { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1Version{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1Version) ToProto() (*otg.PatternFlowGtpv1Version, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1Version) FromProto(msg *otg.PatternFlowGtpv1Version) (PatternFlowGtpv1Version, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1Version) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1Version) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1Version) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1Version) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1Version) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1Version) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1Version) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1Version) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1Version) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1Version) Clone() (PatternFlowGtpv1Version, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1Version() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv1Version) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv1Version is gTPv1 version +type PatternFlowGtpv1Version interface { + Validation + // msg marshals PatternFlowGtpv1Version to protobuf object *otg.PatternFlowGtpv1Version + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1Version + // setMsg unmarshals PatternFlowGtpv1Version from protobuf object *otg.PatternFlowGtpv1Version + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1Version) PatternFlowGtpv1Version + // provides marshal interface + Marshal() marshalPatternFlowGtpv1Version + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1Version + // validate validates PatternFlowGtpv1Version + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1Version, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv1VersionChoiceEnum, set in PatternFlowGtpv1Version + Choice() PatternFlowGtpv1VersionChoiceEnum + // setChoice assigns PatternFlowGtpv1VersionChoiceEnum provided by user to PatternFlowGtpv1Version + setChoice(value PatternFlowGtpv1VersionChoiceEnum) PatternFlowGtpv1Version + // HasChoice checks if Choice has been set in PatternFlowGtpv1Version + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv1Version. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv1Version + SetValue(value uint32) PatternFlowGtpv1Version + // HasValue checks if Value has been set in PatternFlowGtpv1Version + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv1Version. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv1Version + SetValues(value []uint32) PatternFlowGtpv1Version + // Increment returns PatternFlowGtpv1VersionCounter, set in PatternFlowGtpv1Version. + // PatternFlowGtpv1VersionCounter is integer counter pattern + Increment() PatternFlowGtpv1VersionCounter + // SetIncrement assigns PatternFlowGtpv1VersionCounter provided by user to PatternFlowGtpv1Version. + // PatternFlowGtpv1VersionCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv1VersionCounter) PatternFlowGtpv1Version + // HasIncrement checks if Increment has been set in PatternFlowGtpv1Version + HasIncrement() bool + // Decrement returns PatternFlowGtpv1VersionCounter, set in PatternFlowGtpv1Version. + // PatternFlowGtpv1VersionCounter is integer counter pattern + Decrement() PatternFlowGtpv1VersionCounter + // SetDecrement assigns PatternFlowGtpv1VersionCounter provided by user to PatternFlowGtpv1Version. + // PatternFlowGtpv1VersionCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv1VersionCounter) PatternFlowGtpv1Version + // HasDecrement checks if Decrement has been set in PatternFlowGtpv1Version + HasDecrement() bool + // MetricTags returns PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIterIter, set in PatternFlowGtpv1Version + MetricTags() PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter + setNil() +} + +type PatternFlowGtpv1VersionChoiceEnum string + +// Enum of Choice on PatternFlowGtpv1Version +var PatternFlowGtpv1VersionChoice = struct { + VALUE PatternFlowGtpv1VersionChoiceEnum + VALUES PatternFlowGtpv1VersionChoiceEnum + INCREMENT PatternFlowGtpv1VersionChoiceEnum + DECREMENT PatternFlowGtpv1VersionChoiceEnum +}{ + VALUE: PatternFlowGtpv1VersionChoiceEnum("value"), + VALUES: PatternFlowGtpv1VersionChoiceEnum("values"), + INCREMENT: PatternFlowGtpv1VersionChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv1VersionChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv1Version) Choice() PatternFlowGtpv1VersionChoiceEnum { + return PatternFlowGtpv1VersionChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv1Version) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv1Version) setChoice(value PatternFlowGtpv1VersionChoiceEnum) PatternFlowGtpv1Version { + intValue, ok := otg.PatternFlowGtpv1Version_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv1VersionChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv1Version_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv1VersionChoice.VALUE { + defaultValue := uint32(1) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv1VersionChoice.VALUES { + defaultValue := []uint32{1} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv1VersionChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv1VersionCounter().msg() + } + + if value == PatternFlowGtpv1VersionChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv1VersionCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1Version) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv1VersionChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv1Version) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv1Version object +func (obj *patternFlowGtpv1Version) SetValue(value uint32) PatternFlowGtpv1Version { + obj.setChoice(PatternFlowGtpv1VersionChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv1Version) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{1}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv1Version object +func (obj *patternFlowGtpv1Version) SetValues(value []uint32) PatternFlowGtpv1Version { + obj.setChoice(PatternFlowGtpv1VersionChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv1VersionCounter +func (obj *patternFlowGtpv1Version) Increment() PatternFlowGtpv1VersionCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv1VersionChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv1VersionCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv1VersionCounter +func (obj *patternFlowGtpv1Version) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv1VersionCounter value in the PatternFlowGtpv1Version object +func (obj *patternFlowGtpv1Version) SetIncrement(value PatternFlowGtpv1VersionCounter) PatternFlowGtpv1Version { + obj.setChoice(PatternFlowGtpv1VersionChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1VersionCounter +func (obj *patternFlowGtpv1Version) Decrement() PatternFlowGtpv1VersionCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv1VersionChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv1VersionCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv1VersionCounter +func (obj *patternFlowGtpv1Version) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv1VersionCounter value in the PatternFlowGtpv1Version object +func (obj *patternFlowGtpv1Version) SetDecrement(value PatternFlowGtpv1VersionCounter) PatternFlowGtpv1Version { + obj.setChoice(PatternFlowGtpv1VersionChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv1VersionMetricTag +func (obj *patternFlowGtpv1Version) MetricTags() PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv1VersionMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter struct { + obj *patternFlowGtpv1Version + patternFlowGtpv1VersionMetricTagSlice []PatternFlowGtpv1VersionMetricTag + fieldPtr *[]*otg.PatternFlowGtpv1VersionMetricTag +} + +func newPatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter(ptr *[]*otg.PatternFlowGtpv1VersionMetricTag) PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter { + return &patternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter interface { + setMsg(*patternFlowGtpv1Version) PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter + Items() []PatternFlowGtpv1VersionMetricTag + Add() PatternFlowGtpv1VersionMetricTag + Append(items ...PatternFlowGtpv1VersionMetricTag) PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter + Set(index int, newObj PatternFlowGtpv1VersionMetricTag) PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter + Clear() PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter + clearHolderSlice() PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter + appendHolderSlice(item PatternFlowGtpv1VersionMetricTag) PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter +} + +func (obj *patternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter) setMsg(msg *patternFlowGtpv1Version) PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv1VersionMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter) Items() []PatternFlowGtpv1VersionMetricTag { + return obj.patternFlowGtpv1VersionMetricTagSlice +} + +func (obj *patternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter) Add() PatternFlowGtpv1VersionMetricTag { + newObj := &otg.PatternFlowGtpv1VersionMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv1VersionMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv1VersionMetricTagSlice = append(obj.patternFlowGtpv1VersionMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter) Append(items ...PatternFlowGtpv1VersionMetricTag) PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv1VersionMetricTagSlice = append(obj.patternFlowGtpv1VersionMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter) Set(index int, newObj PatternFlowGtpv1VersionMetricTag) PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv1VersionMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter) Clear() PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv1VersionMetricTag{} + obj.patternFlowGtpv1VersionMetricTagSlice = []PatternFlowGtpv1VersionMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter) clearHolderSlice() PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter { + if len(obj.patternFlowGtpv1VersionMetricTagSlice) > 0 { + obj.patternFlowGtpv1VersionMetricTagSlice = []PatternFlowGtpv1VersionMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter) appendHolderSlice(item PatternFlowGtpv1VersionMetricTag) PatternFlowGtpv1VersionPatternFlowGtpv1VersionMetricTagIter { + obj.patternFlowGtpv1VersionMetricTagSlice = append(obj.patternFlowGtpv1VersionMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv1Version) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1Version.Value <= 7 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv1Version.Values <= 7 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv1VersionMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv1Version) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv1VersionChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv1VersionChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv1VersionChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv1VersionChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv1VersionChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv1VersionChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv1Version") + } + } else { + intVal := otg.PatternFlowGtpv1Version_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv1Version_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_version_counter.go b/gosnappi/pattern_flow_gtpv1_version_counter.go new file mode 100644 index 00000000..069e2573 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_version_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1VersionCounter ***** +type patternFlowGtpv1VersionCounter struct { + validation + obj *otg.PatternFlowGtpv1VersionCounter + marshaller marshalPatternFlowGtpv1VersionCounter + unMarshaller unMarshalPatternFlowGtpv1VersionCounter +} + +func NewPatternFlowGtpv1VersionCounter() PatternFlowGtpv1VersionCounter { + obj := patternFlowGtpv1VersionCounter{obj: &otg.PatternFlowGtpv1VersionCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1VersionCounter) msg() *otg.PatternFlowGtpv1VersionCounter { + return obj.obj +} + +func (obj *patternFlowGtpv1VersionCounter) setMsg(msg *otg.PatternFlowGtpv1VersionCounter) PatternFlowGtpv1VersionCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1VersionCounter struct { + obj *patternFlowGtpv1VersionCounter +} + +type marshalPatternFlowGtpv1VersionCounter interface { + // ToProto marshals PatternFlowGtpv1VersionCounter to protobuf object *otg.PatternFlowGtpv1VersionCounter + ToProto() (*otg.PatternFlowGtpv1VersionCounter, error) + // ToPbText marshals PatternFlowGtpv1VersionCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1VersionCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1VersionCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1VersionCounter struct { + obj *patternFlowGtpv1VersionCounter +} + +type unMarshalPatternFlowGtpv1VersionCounter interface { + // FromProto unmarshals PatternFlowGtpv1VersionCounter from protobuf object *otg.PatternFlowGtpv1VersionCounter + FromProto(msg *otg.PatternFlowGtpv1VersionCounter) (PatternFlowGtpv1VersionCounter, error) + // FromPbText unmarshals PatternFlowGtpv1VersionCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1VersionCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1VersionCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1VersionCounter) Marshal() marshalPatternFlowGtpv1VersionCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1VersionCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1VersionCounter) Unmarshal() unMarshalPatternFlowGtpv1VersionCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1VersionCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1VersionCounter) ToProto() (*otg.PatternFlowGtpv1VersionCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1VersionCounter) FromProto(msg *otg.PatternFlowGtpv1VersionCounter) (PatternFlowGtpv1VersionCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1VersionCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1VersionCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1VersionCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1VersionCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1VersionCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1VersionCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1VersionCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1VersionCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1VersionCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1VersionCounter) Clone() (PatternFlowGtpv1VersionCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1VersionCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1VersionCounter is integer counter pattern +type PatternFlowGtpv1VersionCounter interface { + Validation + // msg marshals PatternFlowGtpv1VersionCounter to protobuf object *otg.PatternFlowGtpv1VersionCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1VersionCounter + // setMsg unmarshals PatternFlowGtpv1VersionCounter from protobuf object *otg.PatternFlowGtpv1VersionCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1VersionCounter) PatternFlowGtpv1VersionCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv1VersionCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1VersionCounter + // validate validates PatternFlowGtpv1VersionCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1VersionCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv1VersionCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv1VersionCounter + SetStart(value uint32) PatternFlowGtpv1VersionCounter + // HasStart checks if Start has been set in PatternFlowGtpv1VersionCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv1VersionCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv1VersionCounter + SetStep(value uint32) PatternFlowGtpv1VersionCounter + // HasStep checks if Step has been set in PatternFlowGtpv1VersionCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv1VersionCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv1VersionCounter + SetCount(value uint32) PatternFlowGtpv1VersionCounter + // HasCount checks if Count has been set in PatternFlowGtpv1VersionCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1VersionCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv1VersionCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv1VersionCounter object +func (obj *patternFlowGtpv1VersionCounter) SetStart(value uint32) PatternFlowGtpv1VersionCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1VersionCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv1VersionCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv1VersionCounter object +func (obj *patternFlowGtpv1VersionCounter) SetStep(value uint32) PatternFlowGtpv1VersionCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1VersionCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv1VersionCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv1VersionCounter object +func (obj *patternFlowGtpv1VersionCounter) SetCount(value uint32) PatternFlowGtpv1VersionCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv1VersionCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1VersionCounter.Start <= 7 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1VersionCounter.Step <= 7 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1VersionCounter.Count <= 7 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv1VersionCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv1_version_metric_tag.go b/gosnappi/pattern_flow_gtpv1_version_metric_tag.go new file mode 100644 index 00000000..57b0130b --- /dev/null +++ b/gosnappi/pattern_flow_gtpv1_version_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv1VersionMetricTag ***** +type patternFlowGtpv1VersionMetricTag struct { + validation + obj *otg.PatternFlowGtpv1VersionMetricTag + marshaller marshalPatternFlowGtpv1VersionMetricTag + unMarshaller unMarshalPatternFlowGtpv1VersionMetricTag +} + +func NewPatternFlowGtpv1VersionMetricTag() PatternFlowGtpv1VersionMetricTag { + obj := patternFlowGtpv1VersionMetricTag{obj: &otg.PatternFlowGtpv1VersionMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv1VersionMetricTag) msg() *otg.PatternFlowGtpv1VersionMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv1VersionMetricTag) setMsg(msg *otg.PatternFlowGtpv1VersionMetricTag) PatternFlowGtpv1VersionMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv1VersionMetricTag struct { + obj *patternFlowGtpv1VersionMetricTag +} + +type marshalPatternFlowGtpv1VersionMetricTag interface { + // ToProto marshals PatternFlowGtpv1VersionMetricTag to protobuf object *otg.PatternFlowGtpv1VersionMetricTag + ToProto() (*otg.PatternFlowGtpv1VersionMetricTag, error) + // ToPbText marshals PatternFlowGtpv1VersionMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv1VersionMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv1VersionMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv1VersionMetricTag struct { + obj *patternFlowGtpv1VersionMetricTag +} + +type unMarshalPatternFlowGtpv1VersionMetricTag interface { + // FromProto unmarshals PatternFlowGtpv1VersionMetricTag from protobuf object *otg.PatternFlowGtpv1VersionMetricTag + FromProto(msg *otg.PatternFlowGtpv1VersionMetricTag) (PatternFlowGtpv1VersionMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv1VersionMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv1VersionMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv1VersionMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv1VersionMetricTag) Marshal() marshalPatternFlowGtpv1VersionMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv1VersionMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv1VersionMetricTag) Unmarshal() unMarshalPatternFlowGtpv1VersionMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv1VersionMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv1VersionMetricTag) ToProto() (*otg.PatternFlowGtpv1VersionMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv1VersionMetricTag) FromProto(msg *otg.PatternFlowGtpv1VersionMetricTag) (PatternFlowGtpv1VersionMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv1VersionMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv1VersionMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv1VersionMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1VersionMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv1VersionMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv1VersionMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv1VersionMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1VersionMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv1VersionMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv1VersionMetricTag) Clone() (PatternFlowGtpv1VersionMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv1VersionMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv1VersionMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv1VersionMetricTag interface { + Validation + // msg marshals PatternFlowGtpv1VersionMetricTag to protobuf object *otg.PatternFlowGtpv1VersionMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv1VersionMetricTag + // setMsg unmarshals PatternFlowGtpv1VersionMetricTag from protobuf object *otg.PatternFlowGtpv1VersionMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv1VersionMetricTag) PatternFlowGtpv1VersionMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv1VersionMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv1VersionMetricTag + // validate validates PatternFlowGtpv1VersionMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv1VersionMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv1VersionMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv1VersionMetricTag + SetName(value string) PatternFlowGtpv1VersionMetricTag + // Offset returns uint32, set in PatternFlowGtpv1VersionMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv1VersionMetricTag + SetOffset(value uint32) PatternFlowGtpv1VersionMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv1VersionMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv1VersionMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv1VersionMetricTag + SetLength(value uint32) PatternFlowGtpv1VersionMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv1VersionMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv1VersionMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv1VersionMetricTag object +func (obj *patternFlowGtpv1VersionMetricTag) SetName(value string) PatternFlowGtpv1VersionMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1VersionMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv1VersionMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv1VersionMetricTag object +func (obj *patternFlowGtpv1VersionMetricTag) SetOffset(value uint32) PatternFlowGtpv1VersionMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1VersionMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv1VersionMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv1VersionMetricTag object +func (obj *patternFlowGtpv1VersionMetricTag) SetLength(value uint32) PatternFlowGtpv1VersionMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv1VersionMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv1VersionMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 2 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv1VersionMetricTag.Offset <= 2 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv1VersionMetricTag.Length <= 3 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv1VersionMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(3) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_message_length.go b/gosnappi/pattern_flow_gtpv2_message_length.go new file mode 100644 index 00000000..2c4d790a --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_message_length.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2MessageLength ***** +type patternFlowGtpv2MessageLength struct { + validation + obj *otg.PatternFlowGtpv2MessageLength + marshaller marshalPatternFlowGtpv2MessageLength + unMarshaller unMarshalPatternFlowGtpv2MessageLength + incrementHolder PatternFlowGtpv2MessageLengthCounter + decrementHolder PatternFlowGtpv2MessageLengthCounter + metricTagsHolder PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter +} + +func NewPatternFlowGtpv2MessageLength() PatternFlowGtpv2MessageLength { + obj := patternFlowGtpv2MessageLength{obj: &otg.PatternFlowGtpv2MessageLength{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2MessageLength) msg() *otg.PatternFlowGtpv2MessageLength { + return obj.obj +} + +func (obj *patternFlowGtpv2MessageLength) setMsg(msg *otg.PatternFlowGtpv2MessageLength) PatternFlowGtpv2MessageLength { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2MessageLength struct { + obj *patternFlowGtpv2MessageLength +} + +type marshalPatternFlowGtpv2MessageLength interface { + // ToProto marshals PatternFlowGtpv2MessageLength to protobuf object *otg.PatternFlowGtpv2MessageLength + ToProto() (*otg.PatternFlowGtpv2MessageLength, error) + // ToPbText marshals PatternFlowGtpv2MessageLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2MessageLength to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2MessageLength to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2MessageLength struct { + obj *patternFlowGtpv2MessageLength +} + +type unMarshalPatternFlowGtpv2MessageLength interface { + // FromProto unmarshals PatternFlowGtpv2MessageLength from protobuf object *otg.PatternFlowGtpv2MessageLength + FromProto(msg *otg.PatternFlowGtpv2MessageLength) (PatternFlowGtpv2MessageLength, error) + // FromPbText unmarshals PatternFlowGtpv2MessageLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2MessageLength from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2MessageLength from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2MessageLength) Marshal() marshalPatternFlowGtpv2MessageLength { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2MessageLength{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2MessageLength) Unmarshal() unMarshalPatternFlowGtpv2MessageLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2MessageLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2MessageLength) ToProto() (*otg.PatternFlowGtpv2MessageLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageLength) FromProto(msg *otg.PatternFlowGtpv2MessageLength) (PatternFlowGtpv2MessageLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2MessageLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2MessageLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2MessageLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2MessageLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2MessageLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2MessageLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2MessageLength) Clone() (PatternFlowGtpv2MessageLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2MessageLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv2MessageLength) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv2MessageLength is a 16-bit field that indicates the length of the payload in bytes, excluding the mandatory GTP-c header (first 4 bytes). Includes the TEID and sequence_number if they are present. +type PatternFlowGtpv2MessageLength interface { + Validation + // msg marshals PatternFlowGtpv2MessageLength to protobuf object *otg.PatternFlowGtpv2MessageLength + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2MessageLength + // setMsg unmarshals PatternFlowGtpv2MessageLength from protobuf object *otg.PatternFlowGtpv2MessageLength + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2MessageLength) PatternFlowGtpv2MessageLength + // provides marshal interface + Marshal() marshalPatternFlowGtpv2MessageLength + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2MessageLength + // validate validates PatternFlowGtpv2MessageLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2MessageLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv2MessageLengthChoiceEnum, set in PatternFlowGtpv2MessageLength + Choice() PatternFlowGtpv2MessageLengthChoiceEnum + // setChoice assigns PatternFlowGtpv2MessageLengthChoiceEnum provided by user to PatternFlowGtpv2MessageLength + setChoice(value PatternFlowGtpv2MessageLengthChoiceEnum) PatternFlowGtpv2MessageLength + // HasChoice checks if Choice has been set in PatternFlowGtpv2MessageLength + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv2MessageLength. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv2MessageLength + SetValue(value uint32) PatternFlowGtpv2MessageLength + // HasValue checks if Value has been set in PatternFlowGtpv2MessageLength + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv2MessageLength. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv2MessageLength + SetValues(value []uint32) PatternFlowGtpv2MessageLength + // Increment returns PatternFlowGtpv2MessageLengthCounter, set in PatternFlowGtpv2MessageLength. + // PatternFlowGtpv2MessageLengthCounter is integer counter pattern + Increment() PatternFlowGtpv2MessageLengthCounter + // SetIncrement assigns PatternFlowGtpv2MessageLengthCounter provided by user to PatternFlowGtpv2MessageLength. + // PatternFlowGtpv2MessageLengthCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv2MessageLengthCounter) PatternFlowGtpv2MessageLength + // HasIncrement checks if Increment has been set in PatternFlowGtpv2MessageLength + HasIncrement() bool + // Decrement returns PatternFlowGtpv2MessageLengthCounter, set in PatternFlowGtpv2MessageLength. + // PatternFlowGtpv2MessageLengthCounter is integer counter pattern + Decrement() PatternFlowGtpv2MessageLengthCounter + // SetDecrement assigns PatternFlowGtpv2MessageLengthCounter provided by user to PatternFlowGtpv2MessageLength. + // PatternFlowGtpv2MessageLengthCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv2MessageLengthCounter) PatternFlowGtpv2MessageLength + // HasDecrement checks if Decrement has been set in PatternFlowGtpv2MessageLength + HasDecrement() bool + // MetricTags returns PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIterIter, set in PatternFlowGtpv2MessageLength + MetricTags() PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter + setNil() +} + +type PatternFlowGtpv2MessageLengthChoiceEnum string + +// Enum of Choice on PatternFlowGtpv2MessageLength +var PatternFlowGtpv2MessageLengthChoice = struct { + VALUE PatternFlowGtpv2MessageLengthChoiceEnum + VALUES PatternFlowGtpv2MessageLengthChoiceEnum + INCREMENT PatternFlowGtpv2MessageLengthChoiceEnum + DECREMENT PatternFlowGtpv2MessageLengthChoiceEnum +}{ + VALUE: PatternFlowGtpv2MessageLengthChoiceEnum("value"), + VALUES: PatternFlowGtpv2MessageLengthChoiceEnum("values"), + INCREMENT: PatternFlowGtpv2MessageLengthChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv2MessageLengthChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv2MessageLength) Choice() PatternFlowGtpv2MessageLengthChoiceEnum { + return PatternFlowGtpv2MessageLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv2MessageLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv2MessageLength) setChoice(value PatternFlowGtpv2MessageLengthChoiceEnum) PatternFlowGtpv2MessageLength { + intValue, ok := otg.PatternFlowGtpv2MessageLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv2MessageLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv2MessageLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv2MessageLengthChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv2MessageLengthChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv2MessageLengthChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv2MessageLengthCounter().msg() + } + + if value == PatternFlowGtpv2MessageLengthChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv2MessageLengthCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2MessageLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv2MessageLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2MessageLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv2MessageLength object +func (obj *patternFlowGtpv2MessageLength) SetValue(value uint32) PatternFlowGtpv2MessageLength { + obj.setChoice(PatternFlowGtpv2MessageLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv2MessageLength) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv2MessageLength object +func (obj *patternFlowGtpv2MessageLength) SetValues(value []uint32) PatternFlowGtpv2MessageLength { + obj.setChoice(PatternFlowGtpv2MessageLengthChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv2MessageLengthCounter +func (obj *patternFlowGtpv2MessageLength) Increment() PatternFlowGtpv2MessageLengthCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv2MessageLengthChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv2MessageLengthCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv2MessageLengthCounter +func (obj *patternFlowGtpv2MessageLength) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv2MessageLengthCounter value in the PatternFlowGtpv2MessageLength object +func (obj *patternFlowGtpv2MessageLength) SetIncrement(value PatternFlowGtpv2MessageLengthCounter) PatternFlowGtpv2MessageLength { + obj.setChoice(PatternFlowGtpv2MessageLengthChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2MessageLengthCounter +func (obj *patternFlowGtpv2MessageLength) Decrement() PatternFlowGtpv2MessageLengthCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv2MessageLengthChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv2MessageLengthCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2MessageLengthCounter +func (obj *patternFlowGtpv2MessageLength) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv2MessageLengthCounter value in the PatternFlowGtpv2MessageLength object +func (obj *patternFlowGtpv2MessageLength) SetDecrement(value PatternFlowGtpv2MessageLengthCounter) PatternFlowGtpv2MessageLength { + obj.setChoice(PatternFlowGtpv2MessageLengthChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv2MessageLengthMetricTag +func (obj *patternFlowGtpv2MessageLength) MetricTags() PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv2MessageLengthMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter struct { + obj *patternFlowGtpv2MessageLength + patternFlowGtpv2MessageLengthMetricTagSlice []PatternFlowGtpv2MessageLengthMetricTag + fieldPtr *[]*otg.PatternFlowGtpv2MessageLengthMetricTag +} + +func newPatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter(ptr *[]*otg.PatternFlowGtpv2MessageLengthMetricTag) PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter { + return &patternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter interface { + setMsg(*patternFlowGtpv2MessageLength) PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter + Items() []PatternFlowGtpv2MessageLengthMetricTag + Add() PatternFlowGtpv2MessageLengthMetricTag + Append(items ...PatternFlowGtpv2MessageLengthMetricTag) PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter + Set(index int, newObj PatternFlowGtpv2MessageLengthMetricTag) PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter + Clear() PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter + clearHolderSlice() PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter + appendHolderSlice(item PatternFlowGtpv2MessageLengthMetricTag) PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter +} + +func (obj *patternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter) setMsg(msg *patternFlowGtpv2MessageLength) PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv2MessageLengthMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter) Items() []PatternFlowGtpv2MessageLengthMetricTag { + return obj.patternFlowGtpv2MessageLengthMetricTagSlice +} + +func (obj *patternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter) Add() PatternFlowGtpv2MessageLengthMetricTag { + newObj := &otg.PatternFlowGtpv2MessageLengthMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv2MessageLengthMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv2MessageLengthMetricTagSlice = append(obj.patternFlowGtpv2MessageLengthMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter) Append(items ...PatternFlowGtpv2MessageLengthMetricTag) PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv2MessageLengthMetricTagSlice = append(obj.patternFlowGtpv2MessageLengthMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter) Set(index int, newObj PatternFlowGtpv2MessageLengthMetricTag) PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv2MessageLengthMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter) Clear() PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv2MessageLengthMetricTag{} + obj.patternFlowGtpv2MessageLengthMetricTagSlice = []PatternFlowGtpv2MessageLengthMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter) clearHolderSlice() PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter { + if len(obj.patternFlowGtpv2MessageLengthMetricTagSlice) > 0 { + obj.patternFlowGtpv2MessageLengthMetricTagSlice = []PatternFlowGtpv2MessageLengthMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter) appendHolderSlice(item PatternFlowGtpv2MessageLengthMetricTag) PatternFlowGtpv2MessageLengthPatternFlowGtpv2MessageLengthMetricTagIter { + obj.patternFlowGtpv2MessageLengthMetricTagSlice = append(obj.patternFlowGtpv2MessageLengthMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv2MessageLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2MessageLength.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv2MessageLength.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv2MessageLengthMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv2MessageLength) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv2MessageLengthChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv2MessageLengthChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv2MessageLengthChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv2MessageLengthChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv2MessageLengthChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv2MessageLengthChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv2MessageLength") + } + } else { + intVal := otg.PatternFlowGtpv2MessageLength_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv2MessageLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_message_length_counter.go b/gosnappi/pattern_flow_gtpv2_message_length_counter.go new file mode 100644 index 00000000..0a755e59 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_message_length_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2MessageLengthCounter ***** +type patternFlowGtpv2MessageLengthCounter struct { + validation + obj *otg.PatternFlowGtpv2MessageLengthCounter + marshaller marshalPatternFlowGtpv2MessageLengthCounter + unMarshaller unMarshalPatternFlowGtpv2MessageLengthCounter +} + +func NewPatternFlowGtpv2MessageLengthCounter() PatternFlowGtpv2MessageLengthCounter { + obj := patternFlowGtpv2MessageLengthCounter{obj: &otg.PatternFlowGtpv2MessageLengthCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2MessageLengthCounter) msg() *otg.PatternFlowGtpv2MessageLengthCounter { + return obj.obj +} + +func (obj *patternFlowGtpv2MessageLengthCounter) setMsg(msg *otg.PatternFlowGtpv2MessageLengthCounter) PatternFlowGtpv2MessageLengthCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2MessageLengthCounter struct { + obj *patternFlowGtpv2MessageLengthCounter +} + +type marshalPatternFlowGtpv2MessageLengthCounter interface { + // ToProto marshals PatternFlowGtpv2MessageLengthCounter to protobuf object *otg.PatternFlowGtpv2MessageLengthCounter + ToProto() (*otg.PatternFlowGtpv2MessageLengthCounter, error) + // ToPbText marshals PatternFlowGtpv2MessageLengthCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2MessageLengthCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2MessageLengthCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2MessageLengthCounter struct { + obj *patternFlowGtpv2MessageLengthCounter +} + +type unMarshalPatternFlowGtpv2MessageLengthCounter interface { + // FromProto unmarshals PatternFlowGtpv2MessageLengthCounter from protobuf object *otg.PatternFlowGtpv2MessageLengthCounter + FromProto(msg *otg.PatternFlowGtpv2MessageLengthCounter) (PatternFlowGtpv2MessageLengthCounter, error) + // FromPbText unmarshals PatternFlowGtpv2MessageLengthCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2MessageLengthCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2MessageLengthCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2MessageLengthCounter) Marshal() marshalPatternFlowGtpv2MessageLengthCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2MessageLengthCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2MessageLengthCounter) Unmarshal() unMarshalPatternFlowGtpv2MessageLengthCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2MessageLengthCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2MessageLengthCounter) ToProto() (*otg.PatternFlowGtpv2MessageLengthCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageLengthCounter) FromProto(msg *otg.PatternFlowGtpv2MessageLengthCounter) (PatternFlowGtpv2MessageLengthCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2MessageLengthCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageLengthCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2MessageLengthCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageLengthCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2MessageLengthCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageLengthCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2MessageLengthCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2MessageLengthCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2MessageLengthCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2MessageLengthCounter) Clone() (PatternFlowGtpv2MessageLengthCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2MessageLengthCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2MessageLengthCounter is integer counter pattern +type PatternFlowGtpv2MessageLengthCounter interface { + Validation + // msg marshals PatternFlowGtpv2MessageLengthCounter to protobuf object *otg.PatternFlowGtpv2MessageLengthCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2MessageLengthCounter + // setMsg unmarshals PatternFlowGtpv2MessageLengthCounter from protobuf object *otg.PatternFlowGtpv2MessageLengthCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2MessageLengthCounter) PatternFlowGtpv2MessageLengthCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv2MessageLengthCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2MessageLengthCounter + // validate validates PatternFlowGtpv2MessageLengthCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2MessageLengthCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv2MessageLengthCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv2MessageLengthCounter + SetStart(value uint32) PatternFlowGtpv2MessageLengthCounter + // HasStart checks if Start has been set in PatternFlowGtpv2MessageLengthCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv2MessageLengthCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv2MessageLengthCounter + SetStep(value uint32) PatternFlowGtpv2MessageLengthCounter + // HasStep checks if Step has been set in PatternFlowGtpv2MessageLengthCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv2MessageLengthCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv2MessageLengthCounter + SetCount(value uint32) PatternFlowGtpv2MessageLengthCounter + // HasCount checks if Count has been set in PatternFlowGtpv2MessageLengthCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2MessageLengthCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2MessageLengthCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv2MessageLengthCounter object +func (obj *patternFlowGtpv2MessageLengthCounter) SetStart(value uint32) PatternFlowGtpv2MessageLengthCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2MessageLengthCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2MessageLengthCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv2MessageLengthCounter object +func (obj *patternFlowGtpv2MessageLengthCounter) SetStep(value uint32) PatternFlowGtpv2MessageLengthCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2MessageLengthCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2MessageLengthCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv2MessageLengthCounter object +func (obj *patternFlowGtpv2MessageLengthCounter) SetCount(value uint32) PatternFlowGtpv2MessageLengthCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv2MessageLengthCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2MessageLengthCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2MessageLengthCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2MessageLengthCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv2MessageLengthCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_message_length_metric_tag.go b/gosnappi/pattern_flow_gtpv2_message_length_metric_tag.go new file mode 100644 index 00000000..76c4332d --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_message_length_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2MessageLengthMetricTag ***** +type patternFlowGtpv2MessageLengthMetricTag struct { + validation + obj *otg.PatternFlowGtpv2MessageLengthMetricTag + marshaller marshalPatternFlowGtpv2MessageLengthMetricTag + unMarshaller unMarshalPatternFlowGtpv2MessageLengthMetricTag +} + +func NewPatternFlowGtpv2MessageLengthMetricTag() PatternFlowGtpv2MessageLengthMetricTag { + obj := patternFlowGtpv2MessageLengthMetricTag{obj: &otg.PatternFlowGtpv2MessageLengthMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2MessageLengthMetricTag) msg() *otg.PatternFlowGtpv2MessageLengthMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv2MessageLengthMetricTag) setMsg(msg *otg.PatternFlowGtpv2MessageLengthMetricTag) PatternFlowGtpv2MessageLengthMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2MessageLengthMetricTag struct { + obj *patternFlowGtpv2MessageLengthMetricTag +} + +type marshalPatternFlowGtpv2MessageLengthMetricTag interface { + // ToProto marshals PatternFlowGtpv2MessageLengthMetricTag to protobuf object *otg.PatternFlowGtpv2MessageLengthMetricTag + ToProto() (*otg.PatternFlowGtpv2MessageLengthMetricTag, error) + // ToPbText marshals PatternFlowGtpv2MessageLengthMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2MessageLengthMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2MessageLengthMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2MessageLengthMetricTag struct { + obj *patternFlowGtpv2MessageLengthMetricTag +} + +type unMarshalPatternFlowGtpv2MessageLengthMetricTag interface { + // FromProto unmarshals PatternFlowGtpv2MessageLengthMetricTag from protobuf object *otg.PatternFlowGtpv2MessageLengthMetricTag + FromProto(msg *otg.PatternFlowGtpv2MessageLengthMetricTag) (PatternFlowGtpv2MessageLengthMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv2MessageLengthMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2MessageLengthMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2MessageLengthMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2MessageLengthMetricTag) Marshal() marshalPatternFlowGtpv2MessageLengthMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2MessageLengthMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2MessageLengthMetricTag) Unmarshal() unMarshalPatternFlowGtpv2MessageLengthMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2MessageLengthMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2MessageLengthMetricTag) ToProto() (*otg.PatternFlowGtpv2MessageLengthMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageLengthMetricTag) FromProto(msg *otg.PatternFlowGtpv2MessageLengthMetricTag) (PatternFlowGtpv2MessageLengthMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2MessageLengthMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageLengthMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2MessageLengthMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageLengthMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2MessageLengthMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageLengthMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2MessageLengthMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2MessageLengthMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2MessageLengthMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2MessageLengthMetricTag) Clone() (PatternFlowGtpv2MessageLengthMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2MessageLengthMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2MessageLengthMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv2MessageLengthMetricTag interface { + Validation + // msg marshals PatternFlowGtpv2MessageLengthMetricTag to protobuf object *otg.PatternFlowGtpv2MessageLengthMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2MessageLengthMetricTag + // setMsg unmarshals PatternFlowGtpv2MessageLengthMetricTag from protobuf object *otg.PatternFlowGtpv2MessageLengthMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2MessageLengthMetricTag) PatternFlowGtpv2MessageLengthMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv2MessageLengthMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2MessageLengthMetricTag + // validate validates PatternFlowGtpv2MessageLengthMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2MessageLengthMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv2MessageLengthMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv2MessageLengthMetricTag + SetName(value string) PatternFlowGtpv2MessageLengthMetricTag + // Offset returns uint32, set in PatternFlowGtpv2MessageLengthMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv2MessageLengthMetricTag + SetOffset(value uint32) PatternFlowGtpv2MessageLengthMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv2MessageLengthMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv2MessageLengthMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv2MessageLengthMetricTag + SetLength(value uint32) PatternFlowGtpv2MessageLengthMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv2MessageLengthMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv2MessageLengthMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv2MessageLengthMetricTag object +func (obj *patternFlowGtpv2MessageLengthMetricTag) SetName(value string) PatternFlowGtpv2MessageLengthMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2MessageLengthMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2MessageLengthMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv2MessageLengthMetricTag object +func (obj *patternFlowGtpv2MessageLengthMetricTag) SetOffset(value uint32) PatternFlowGtpv2MessageLengthMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2MessageLengthMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2MessageLengthMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv2MessageLengthMetricTag object +func (obj *patternFlowGtpv2MessageLengthMetricTag) SetLength(value uint32) PatternFlowGtpv2MessageLengthMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv2MessageLengthMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv2MessageLengthMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2MessageLengthMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv2MessageLengthMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv2MessageLengthMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_message_type.go b/gosnappi/pattern_flow_gtpv2_message_type.go new file mode 100644 index 00000000..f22d3383 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_message_type.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2MessageType ***** +type patternFlowGtpv2MessageType struct { + validation + obj *otg.PatternFlowGtpv2MessageType + marshaller marshalPatternFlowGtpv2MessageType + unMarshaller unMarshalPatternFlowGtpv2MessageType + incrementHolder PatternFlowGtpv2MessageTypeCounter + decrementHolder PatternFlowGtpv2MessageTypeCounter + metricTagsHolder PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter +} + +func NewPatternFlowGtpv2MessageType() PatternFlowGtpv2MessageType { + obj := patternFlowGtpv2MessageType{obj: &otg.PatternFlowGtpv2MessageType{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2MessageType) msg() *otg.PatternFlowGtpv2MessageType { + return obj.obj +} + +func (obj *patternFlowGtpv2MessageType) setMsg(msg *otg.PatternFlowGtpv2MessageType) PatternFlowGtpv2MessageType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2MessageType struct { + obj *patternFlowGtpv2MessageType +} + +type marshalPatternFlowGtpv2MessageType interface { + // ToProto marshals PatternFlowGtpv2MessageType to protobuf object *otg.PatternFlowGtpv2MessageType + ToProto() (*otg.PatternFlowGtpv2MessageType, error) + // ToPbText marshals PatternFlowGtpv2MessageType to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2MessageType to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2MessageType to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2MessageType struct { + obj *patternFlowGtpv2MessageType +} + +type unMarshalPatternFlowGtpv2MessageType interface { + // FromProto unmarshals PatternFlowGtpv2MessageType from protobuf object *otg.PatternFlowGtpv2MessageType + FromProto(msg *otg.PatternFlowGtpv2MessageType) (PatternFlowGtpv2MessageType, error) + // FromPbText unmarshals PatternFlowGtpv2MessageType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2MessageType from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2MessageType from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2MessageType) Marshal() marshalPatternFlowGtpv2MessageType { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2MessageType{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2MessageType) Unmarshal() unMarshalPatternFlowGtpv2MessageType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2MessageType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2MessageType) ToProto() (*otg.PatternFlowGtpv2MessageType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageType) FromProto(msg *otg.PatternFlowGtpv2MessageType) (PatternFlowGtpv2MessageType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2MessageType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2MessageType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2MessageType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2MessageType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2MessageType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2MessageType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2MessageType) Clone() (PatternFlowGtpv2MessageType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2MessageType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv2MessageType) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv2MessageType is an 8-bit field that indicates the type of GTP message. Different types of messages are defined in 3GPP TS 29.060 section 7.1 +type PatternFlowGtpv2MessageType interface { + Validation + // msg marshals PatternFlowGtpv2MessageType to protobuf object *otg.PatternFlowGtpv2MessageType + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2MessageType + // setMsg unmarshals PatternFlowGtpv2MessageType from protobuf object *otg.PatternFlowGtpv2MessageType + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2MessageType) PatternFlowGtpv2MessageType + // provides marshal interface + Marshal() marshalPatternFlowGtpv2MessageType + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2MessageType + // validate validates PatternFlowGtpv2MessageType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2MessageType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv2MessageTypeChoiceEnum, set in PatternFlowGtpv2MessageType + Choice() PatternFlowGtpv2MessageTypeChoiceEnum + // setChoice assigns PatternFlowGtpv2MessageTypeChoiceEnum provided by user to PatternFlowGtpv2MessageType + setChoice(value PatternFlowGtpv2MessageTypeChoiceEnum) PatternFlowGtpv2MessageType + // HasChoice checks if Choice has been set in PatternFlowGtpv2MessageType + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv2MessageType. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv2MessageType + SetValue(value uint32) PatternFlowGtpv2MessageType + // HasValue checks if Value has been set in PatternFlowGtpv2MessageType + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv2MessageType. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv2MessageType + SetValues(value []uint32) PatternFlowGtpv2MessageType + // Increment returns PatternFlowGtpv2MessageTypeCounter, set in PatternFlowGtpv2MessageType. + // PatternFlowGtpv2MessageTypeCounter is integer counter pattern + Increment() PatternFlowGtpv2MessageTypeCounter + // SetIncrement assigns PatternFlowGtpv2MessageTypeCounter provided by user to PatternFlowGtpv2MessageType. + // PatternFlowGtpv2MessageTypeCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv2MessageTypeCounter) PatternFlowGtpv2MessageType + // HasIncrement checks if Increment has been set in PatternFlowGtpv2MessageType + HasIncrement() bool + // Decrement returns PatternFlowGtpv2MessageTypeCounter, set in PatternFlowGtpv2MessageType. + // PatternFlowGtpv2MessageTypeCounter is integer counter pattern + Decrement() PatternFlowGtpv2MessageTypeCounter + // SetDecrement assigns PatternFlowGtpv2MessageTypeCounter provided by user to PatternFlowGtpv2MessageType. + // PatternFlowGtpv2MessageTypeCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv2MessageTypeCounter) PatternFlowGtpv2MessageType + // HasDecrement checks if Decrement has been set in PatternFlowGtpv2MessageType + HasDecrement() bool + // MetricTags returns PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIterIter, set in PatternFlowGtpv2MessageType + MetricTags() PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter + setNil() +} + +type PatternFlowGtpv2MessageTypeChoiceEnum string + +// Enum of Choice on PatternFlowGtpv2MessageType +var PatternFlowGtpv2MessageTypeChoice = struct { + VALUE PatternFlowGtpv2MessageTypeChoiceEnum + VALUES PatternFlowGtpv2MessageTypeChoiceEnum + INCREMENT PatternFlowGtpv2MessageTypeChoiceEnum + DECREMENT PatternFlowGtpv2MessageTypeChoiceEnum +}{ + VALUE: PatternFlowGtpv2MessageTypeChoiceEnum("value"), + VALUES: PatternFlowGtpv2MessageTypeChoiceEnum("values"), + INCREMENT: PatternFlowGtpv2MessageTypeChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv2MessageTypeChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv2MessageType) Choice() PatternFlowGtpv2MessageTypeChoiceEnum { + return PatternFlowGtpv2MessageTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv2MessageType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv2MessageType) setChoice(value PatternFlowGtpv2MessageTypeChoiceEnum) PatternFlowGtpv2MessageType { + intValue, ok := otg.PatternFlowGtpv2MessageType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv2MessageTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv2MessageType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv2MessageTypeChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv2MessageTypeChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv2MessageTypeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv2MessageTypeCounter().msg() + } + + if value == PatternFlowGtpv2MessageTypeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv2MessageTypeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2MessageType) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv2MessageTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2MessageType) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv2MessageType object +func (obj *patternFlowGtpv2MessageType) SetValue(value uint32) PatternFlowGtpv2MessageType { + obj.setChoice(PatternFlowGtpv2MessageTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv2MessageType) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv2MessageType object +func (obj *patternFlowGtpv2MessageType) SetValues(value []uint32) PatternFlowGtpv2MessageType { + obj.setChoice(PatternFlowGtpv2MessageTypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv2MessageTypeCounter +func (obj *patternFlowGtpv2MessageType) Increment() PatternFlowGtpv2MessageTypeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv2MessageTypeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv2MessageTypeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv2MessageTypeCounter +func (obj *patternFlowGtpv2MessageType) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv2MessageTypeCounter value in the PatternFlowGtpv2MessageType object +func (obj *patternFlowGtpv2MessageType) SetIncrement(value PatternFlowGtpv2MessageTypeCounter) PatternFlowGtpv2MessageType { + obj.setChoice(PatternFlowGtpv2MessageTypeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2MessageTypeCounter +func (obj *patternFlowGtpv2MessageType) Decrement() PatternFlowGtpv2MessageTypeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv2MessageTypeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv2MessageTypeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2MessageTypeCounter +func (obj *patternFlowGtpv2MessageType) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv2MessageTypeCounter value in the PatternFlowGtpv2MessageType object +func (obj *patternFlowGtpv2MessageType) SetDecrement(value PatternFlowGtpv2MessageTypeCounter) PatternFlowGtpv2MessageType { + obj.setChoice(PatternFlowGtpv2MessageTypeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv2MessageTypeMetricTag +func (obj *patternFlowGtpv2MessageType) MetricTags() PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv2MessageTypeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter struct { + obj *patternFlowGtpv2MessageType + patternFlowGtpv2MessageTypeMetricTagSlice []PatternFlowGtpv2MessageTypeMetricTag + fieldPtr *[]*otg.PatternFlowGtpv2MessageTypeMetricTag +} + +func newPatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter(ptr *[]*otg.PatternFlowGtpv2MessageTypeMetricTag) PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter { + return &patternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter interface { + setMsg(*patternFlowGtpv2MessageType) PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter + Items() []PatternFlowGtpv2MessageTypeMetricTag + Add() PatternFlowGtpv2MessageTypeMetricTag + Append(items ...PatternFlowGtpv2MessageTypeMetricTag) PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter + Set(index int, newObj PatternFlowGtpv2MessageTypeMetricTag) PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter + Clear() PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter + clearHolderSlice() PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter + appendHolderSlice(item PatternFlowGtpv2MessageTypeMetricTag) PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter +} + +func (obj *patternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter) setMsg(msg *patternFlowGtpv2MessageType) PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv2MessageTypeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter) Items() []PatternFlowGtpv2MessageTypeMetricTag { + return obj.patternFlowGtpv2MessageTypeMetricTagSlice +} + +func (obj *patternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter) Add() PatternFlowGtpv2MessageTypeMetricTag { + newObj := &otg.PatternFlowGtpv2MessageTypeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv2MessageTypeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv2MessageTypeMetricTagSlice = append(obj.patternFlowGtpv2MessageTypeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter) Append(items ...PatternFlowGtpv2MessageTypeMetricTag) PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv2MessageTypeMetricTagSlice = append(obj.patternFlowGtpv2MessageTypeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter) Set(index int, newObj PatternFlowGtpv2MessageTypeMetricTag) PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv2MessageTypeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter) Clear() PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv2MessageTypeMetricTag{} + obj.patternFlowGtpv2MessageTypeMetricTagSlice = []PatternFlowGtpv2MessageTypeMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter) clearHolderSlice() PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter { + if len(obj.patternFlowGtpv2MessageTypeMetricTagSlice) > 0 { + obj.patternFlowGtpv2MessageTypeMetricTagSlice = []PatternFlowGtpv2MessageTypeMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter) appendHolderSlice(item PatternFlowGtpv2MessageTypeMetricTag) PatternFlowGtpv2MessageTypePatternFlowGtpv2MessageTypeMetricTagIter { + obj.patternFlowGtpv2MessageTypeMetricTagSlice = append(obj.patternFlowGtpv2MessageTypeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv2MessageType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2MessageType.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv2MessageType.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv2MessageTypeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv2MessageType) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv2MessageTypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv2MessageTypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv2MessageTypeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv2MessageTypeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv2MessageTypeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv2MessageTypeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv2MessageType") + } + } else { + intVal := otg.PatternFlowGtpv2MessageType_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv2MessageType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_message_type_counter.go b/gosnappi/pattern_flow_gtpv2_message_type_counter.go new file mode 100644 index 00000000..bf55ce1f --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_message_type_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2MessageTypeCounter ***** +type patternFlowGtpv2MessageTypeCounter struct { + validation + obj *otg.PatternFlowGtpv2MessageTypeCounter + marshaller marshalPatternFlowGtpv2MessageTypeCounter + unMarshaller unMarshalPatternFlowGtpv2MessageTypeCounter +} + +func NewPatternFlowGtpv2MessageTypeCounter() PatternFlowGtpv2MessageTypeCounter { + obj := patternFlowGtpv2MessageTypeCounter{obj: &otg.PatternFlowGtpv2MessageTypeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2MessageTypeCounter) msg() *otg.PatternFlowGtpv2MessageTypeCounter { + return obj.obj +} + +func (obj *patternFlowGtpv2MessageTypeCounter) setMsg(msg *otg.PatternFlowGtpv2MessageTypeCounter) PatternFlowGtpv2MessageTypeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2MessageTypeCounter struct { + obj *patternFlowGtpv2MessageTypeCounter +} + +type marshalPatternFlowGtpv2MessageTypeCounter interface { + // ToProto marshals PatternFlowGtpv2MessageTypeCounter to protobuf object *otg.PatternFlowGtpv2MessageTypeCounter + ToProto() (*otg.PatternFlowGtpv2MessageTypeCounter, error) + // ToPbText marshals PatternFlowGtpv2MessageTypeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2MessageTypeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2MessageTypeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2MessageTypeCounter struct { + obj *patternFlowGtpv2MessageTypeCounter +} + +type unMarshalPatternFlowGtpv2MessageTypeCounter interface { + // FromProto unmarshals PatternFlowGtpv2MessageTypeCounter from protobuf object *otg.PatternFlowGtpv2MessageTypeCounter + FromProto(msg *otg.PatternFlowGtpv2MessageTypeCounter) (PatternFlowGtpv2MessageTypeCounter, error) + // FromPbText unmarshals PatternFlowGtpv2MessageTypeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2MessageTypeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2MessageTypeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2MessageTypeCounter) Marshal() marshalPatternFlowGtpv2MessageTypeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2MessageTypeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2MessageTypeCounter) Unmarshal() unMarshalPatternFlowGtpv2MessageTypeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2MessageTypeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2MessageTypeCounter) ToProto() (*otg.PatternFlowGtpv2MessageTypeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageTypeCounter) FromProto(msg *otg.PatternFlowGtpv2MessageTypeCounter) (PatternFlowGtpv2MessageTypeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2MessageTypeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageTypeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2MessageTypeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageTypeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2MessageTypeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageTypeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2MessageTypeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2MessageTypeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2MessageTypeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2MessageTypeCounter) Clone() (PatternFlowGtpv2MessageTypeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2MessageTypeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2MessageTypeCounter is integer counter pattern +type PatternFlowGtpv2MessageTypeCounter interface { + Validation + // msg marshals PatternFlowGtpv2MessageTypeCounter to protobuf object *otg.PatternFlowGtpv2MessageTypeCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2MessageTypeCounter + // setMsg unmarshals PatternFlowGtpv2MessageTypeCounter from protobuf object *otg.PatternFlowGtpv2MessageTypeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2MessageTypeCounter) PatternFlowGtpv2MessageTypeCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv2MessageTypeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2MessageTypeCounter + // validate validates PatternFlowGtpv2MessageTypeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2MessageTypeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv2MessageTypeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv2MessageTypeCounter + SetStart(value uint32) PatternFlowGtpv2MessageTypeCounter + // HasStart checks if Start has been set in PatternFlowGtpv2MessageTypeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv2MessageTypeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv2MessageTypeCounter + SetStep(value uint32) PatternFlowGtpv2MessageTypeCounter + // HasStep checks if Step has been set in PatternFlowGtpv2MessageTypeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv2MessageTypeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv2MessageTypeCounter + SetCount(value uint32) PatternFlowGtpv2MessageTypeCounter + // HasCount checks if Count has been set in PatternFlowGtpv2MessageTypeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2MessageTypeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2MessageTypeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv2MessageTypeCounter object +func (obj *patternFlowGtpv2MessageTypeCounter) SetStart(value uint32) PatternFlowGtpv2MessageTypeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2MessageTypeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2MessageTypeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv2MessageTypeCounter object +func (obj *patternFlowGtpv2MessageTypeCounter) SetStep(value uint32) PatternFlowGtpv2MessageTypeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2MessageTypeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2MessageTypeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv2MessageTypeCounter object +func (obj *patternFlowGtpv2MessageTypeCounter) SetCount(value uint32) PatternFlowGtpv2MessageTypeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv2MessageTypeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2MessageTypeCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2MessageTypeCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2MessageTypeCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv2MessageTypeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_message_type_metric_tag.go b/gosnappi/pattern_flow_gtpv2_message_type_metric_tag.go new file mode 100644 index 00000000..35d14948 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_message_type_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2MessageTypeMetricTag ***** +type patternFlowGtpv2MessageTypeMetricTag struct { + validation + obj *otg.PatternFlowGtpv2MessageTypeMetricTag + marshaller marshalPatternFlowGtpv2MessageTypeMetricTag + unMarshaller unMarshalPatternFlowGtpv2MessageTypeMetricTag +} + +func NewPatternFlowGtpv2MessageTypeMetricTag() PatternFlowGtpv2MessageTypeMetricTag { + obj := patternFlowGtpv2MessageTypeMetricTag{obj: &otg.PatternFlowGtpv2MessageTypeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2MessageTypeMetricTag) msg() *otg.PatternFlowGtpv2MessageTypeMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv2MessageTypeMetricTag) setMsg(msg *otg.PatternFlowGtpv2MessageTypeMetricTag) PatternFlowGtpv2MessageTypeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2MessageTypeMetricTag struct { + obj *patternFlowGtpv2MessageTypeMetricTag +} + +type marshalPatternFlowGtpv2MessageTypeMetricTag interface { + // ToProto marshals PatternFlowGtpv2MessageTypeMetricTag to protobuf object *otg.PatternFlowGtpv2MessageTypeMetricTag + ToProto() (*otg.PatternFlowGtpv2MessageTypeMetricTag, error) + // ToPbText marshals PatternFlowGtpv2MessageTypeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2MessageTypeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2MessageTypeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2MessageTypeMetricTag struct { + obj *patternFlowGtpv2MessageTypeMetricTag +} + +type unMarshalPatternFlowGtpv2MessageTypeMetricTag interface { + // FromProto unmarshals PatternFlowGtpv2MessageTypeMetricTag from protobuf object *otg.PatternFlowGtpv2MessageTypeMetricTag + FromProto(msg *otg.PatternFlowGtpv2MessageTypeMetricTag) (PatternFlowGtpv2MessageTypeMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv2MessageTypeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2MessageTypeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2MessageTypeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2MessageTypeMetricTag) Marshal() marshalPatternFlowGtpv2MessageTypeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2MessageTypeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2MessageTypeMetricTag) Unmarshal() unMarshalPatternFlowGtpv2MessageTypeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2MessageTypeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2MessageTypeMetricTag) ToProto() (*otg.PatternFlowGtpv2MessageTypeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageTypeMetricTag) FromProto(msg *otg.PatternFlowGtpv2MessageTypeMetricTag) (PatternFlowGtpv2MessageTypeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2MessageTypeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageTypeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2MessageTypeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageTypeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2MessageTypeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2MessageTypeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2MessageTypeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2MessageTypeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2MessageTypeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2MessageTypeMetricTag) Clone() (PatternFlowGtpv2MessageTypeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2MessageTypeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2MessageTypeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv2MessageTypeMetricTag interface { + Validation + // msg marshals PatternFlowGtpv2MessageTypeMetricTag to protobuf object *otg.PatternFlowGtpv2MessageTypeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2MessageTypeMetricTag + // setMsg unmarshals PatternFlowGtpv2MessageTypeMetricTag from protobuf object *otg.PatternFlowGtpv2MessageTypeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2MessageTypeMetricTag) PatternFlowGtpv2MessageTypeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv2MessageTypeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2MessageTypeMetricTag + // validate validates PatternFlowGtpv2MessageTypeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2MessageTypeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv2MessageTypeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv2MessageTypeMetricTag + SetName(value string) PatternFlowGtpv2MessageTypeMetricTag + // Offset returns uint32, set in PatternFlowGtpv2MessageTypeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv2MessageTypeMetricTag + SetOffset(value uint32) PatternFlowGtpv2MessageTypeMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv2MessageTypeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv2MessageTypeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv2MessageTypeMetricTag + SetLength(value uint32) PatternFlowGtpv2MessageTypeMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv2MessageTypeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv2MessageTypeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv2MessageTypeMetricTag object +func (obj *patternFlowGtpv2MessageTypeMetricTag) SetName(value string) PatternFlowGtpv2MessageTypeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2MessageTypeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2MessageTypeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv2MessageTypeMetricTag object +func (obj *patternFlowGtpv2MessageTypeMetricTag) SetOffset(value uint32) PatternFlowGtpv2MessageTypeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2MessageTypeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2MessageTypeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv2MessageTypeMetricTag object +func (obj *patternFlowGtpv2MessageTypeMetricTag) SetLength(value uint32) PatternFlowGtpv2MessageTypeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv2MessageTypeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv2MessageTypeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2MessageTypeMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv2MessageTypeMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv2MessageTypeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_piggybacking_flag.go b/gosnappi/pattern_flow_gtpv2_piggybacking_flag.go new file mode 100644 index 00000000..00d48844 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_piggybacking_flag.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2PiggybackingFlag ***** +type patternFlowGtpv2PiggybackingFlag struct { + validation + obj *otg.PatternFlowGtpv2PiggybackingFlag + marshaller marshalPatternFlowGtpv2PiggybackingFlag + unMarshaller unMarshalPatternFlowGtpv2PiggybackingFlag + incrementHolder PatternFlowGtpv2PiggybackingFlagCounter + decrementHolder PatternFlowGtpv2PiggybackingFlagCounter + metricTagsHolder PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter +} + +func NewPatternFlowGtpv2PiggybackingFlag() PatternFlowGtpv2PiggybackingFlag { + obj := patternFlowGtpv2PiggybackingFlag{obj: &otg.PatternFlowGtpv2PiggybackingFlag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2PiggybackingFlag) msg() *otg.PatternFlowGtpv2PiggybackingFlag { + return obj.obj +} + +func (obj *patternFlowGtpv2PiggybackingFlag) setMsg(msg *otg.PatternFlowGtpv2PiggybackingFlag) PatternFlowGtpv2PiggybackingFlag { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2PiggybackingFlag struct { + obj *patternFlowGtpv2PiggybackingFlag +} + +type marshalPatternFlowGtpv2PiggybackingFlag interface { + // ToProto marshals PatternFlowGtpv2PiggybackingFlag to protobuf object *otg.PatternFlowGtpv2PiggybackingFlag + ToProto() (*otg.PatternFlowGtpv2PiggybackingFlag, error) + // ToPbText marshals PatternFlowGtpv2PiggybackingFlag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2PiggybackingFlag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2PiggybackingFlag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2PiggybackingFlag struct { + obj *patternFlowGtpv2PiggybackingFlag +} + +type unMarshalPatternFlowGtpv2PiggybackingFlag interface { + // FromProto unmarshals PatternFlowGtpv2PiggybackingFlag from protobuf object *otg.PatternFlowGtpv2PiggybackingFlag + FromProto(msg *otg.PatternFlowGtpv2PiggybackingFlag) (PatternFlowGtpv2PiggybackingFlag, error) + // FromPbText unmarshals PatternFlowGtpv2PiggybackingFlag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2PiggybackingFlag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2PiggybackingFlag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2PiggybackingFlag) Marshal() marshalPatternFlowGtpv2PiggybackingFlag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2PiggybackingFlag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2PiggybackingFlag) Unmarshal() unMarshalPatternFlowGtpv2PiggybackingFlag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2PiggybackingFlag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2PiggybackingFlag) ToProto() (*otg.PatternFlowGtpv2PiggybackingFlag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2PiggybackingFlag) FromProto(msg *otg.PatternFlowGtpv2PiggybackingFlag) (PatternFlowGtpv2PiggybackingFlag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2PiggybackingFlag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2PiggybackingFlag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2PiggybackingFlag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2PiggybackingFlag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2PiggybackingFlag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2PiggybackingFlag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2PiggybackingFlag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2PiggybackingFlag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2PiggybackingFlag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2PiggybackingFlag) Clone() (PatternFlowGtpv2PiggybackingFlag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2PiggybackingFlag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv2PiggybackingFlag) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv2PiggybackingFlag is if piggybacking_flag is set to 1 then another GTP-C message with its own header shall be present at the end of the current message +type PatternFlowGtpv2PiggybackingFlag interface { + Validation + // msg marshals PatternFlowGtpv2PiggybackingFlag to protobuf object *otg.PatternFlowGtpv2PiggybackingFlag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2PiggybackingFlag + // setMsg unmarshals PatternFlowGtpv2PiggybackingFlag from protobuf object *otg.PatternFlowGtpv2PiggybackingFlag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2PiggybackingFlag) PatternFlowGtpv2PiggybackingFlag + // provides marshal interface + Marshal() marshalPatternFlowGtpv2PiggybackingFlag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2PiggybackingFlag + // validate validates PatternFlowGtpv2PiggybackingFlag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2PiggybackingFlag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv2PiggybackingFlagChoiceEnum, set in PatternFlowGtpv2PiggybackingFlag + Choice() PatternFlowGtpv2PiggybackingFlagChoiceEnum + // setChoice assigns PatternFlowGtpv2PiggybackingFlagChoiceEnum provided by user to PatternFlowGtpv2PiggybackingFlag + setChoice(value PatternFlowGtpv2PiggybackingFlagChoiceEnum) PatternFlowGtpv2PiggybackingFlag + // HasChoice checks if Choice has been set in PatternFlowGtpv2PiggybackingFlag + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv2PiggybackingFlag. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv2PiggybackingFlag + SetValue(value uint32) PatternFlowGtpv2PiggybackingFlag + // HasValue checks if Value has been set in PatternFlowGtpv2PiggybackingFlag + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv2PiggybackingFlag. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv2PiggybackingFlag + SetValues(value []uint32) PatternFlowGtpv2PiggybackingFlag + // Increment returns PatternFlowGtpv2PiggybackingFlagCounter, set in PatternFlowGtpv2PiggybackingFlag. + // PatternFlowGtpv2PiggybackingFlagCounter is integer counter pattern + Increment() PatternFlowGtpv2PiggybackingFlagCounter + // SetIncrement assigns PatternFlowGtpv2PiggybackingFlagCounter provided by user to PatternFlowGtpv2PiggybackingFlag. + // PatternFlowGtpv2PiggybackingFlagCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv2PiggybackingFlagCounter) PatternFlowGtpv2PiggybackingFlag + // HasIncrement checks if Increment has been set in PatternFlowGtpv2PiggybackingFlag + HasIncrement() bool + // Decrement returns PatternFlowGtpv2PiggybackingFlagCounter, set in PatternFlowGtpv2PiggybackingFlag. + // PatternFlowGtpv2PiggybackingFlagCounter is integer counter pattern + Decrement() PatternFlowGtpv2PiggybackingFlagCounter + // SetDecrement assigns PatternFlowGtpv2PiggybackingFlagCounter provided by user to PatternFlowGtpv2PiggybackingFlag. + // PatternFlowGtpv2PiggybackingFlagCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv2PiggybackingFlagCounter) PatternFlowGtpv2PiggybackingFlag + // HasDecrement checks if Decrement has been set in PatternFlowGtpv2PiggybackingFlag + HasDecrement() bool + // MetricTags returns PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIterIter, set in PatternFlowGtpv2PiggybackingFlag + MetricTags() PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter + setNil() +} + +type PatternFlowGtpv2PiggybackingFlagChoiceEnum string + +// Enum of Choice on PatternFlowGtpv2PiggybackingFlag +var PatternFlowGtpv2PiggybackingFlagChoice = struct { + VALUE PatternFlowGtpv2PiggybackingFlagChoiceEnum + VALUES PatternFlowGtpv2PiggybackingFlagChoiceEnum + INCREMENT PatternFlowGtpv2PiggybackingFlagChoiceEnum + DECREMENT PatternFlowGtpv2PiggybackingFlagChoiceEnum +}{ + VALUE: PatternFlowGtpv2PiggybackingFlagChoiceEnum("value"), + VALUES: PatternFlowGtpv2PiggybackingFlagChoiceEnum("values"), + INCREMENT: PatternFlowGtpv2PiggybackingFlagChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv2PiggybackingFlagChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv2PiggybackingFlag) Choice() PatternFlowGtpv2PiggybackingFlagChoiceEnum { + return PatternFlowGtpv2PiggybackingFlagChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv2PiggybackingFlag) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv2PiggybackingFlag) setChoice(value PatternFlowGtpv2PiggybackingFlagChoiceEnum) PatternFlowGtpv2PiggybackingFlag { + intValue, ok := otg.PatternFlowGtpv2PiggybackingFlag_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv2PiggybackingFlagChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv2PiggybackingFlag_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv2PiggybackingFlagChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv2PiggybackingFlagChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv2PiggybackingFlagChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv2PiggybackingFlagCounter().msg() + } + + if value == PatternFlowGtpv2PiggybackingFlagChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv2PiggybackingFlagCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2PiggybackingFlag) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv2PiggybackingFlagChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2PiggybackingFlag) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv2PiggybackingFlag object +func (obj *patternFlowGtpv2PiggybackingFlag) SetValue(value uint32) PatternFlowGtpv2PiggybackingFlag { + obj.setChoice(PatternFlowGtpv2PiggybackingFlagChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv2PiggybackingFlag) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv2PiggybackingFlag object +func (obj *patternFlowGtpv2PiggybackingFlag) SetValues(value []uint32) PatternFlowGtpv2PiggybackingFlag { + obj.setChoice(PatternFlowGtpv2PiggybackingFlagChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv2PiggybackingFlagCounter +func (obj *patternFlowGtpv2PiggybackingFlag) Increment() PatternFlowGtpv2PiggybackingFlagCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv2PiggybackingFlagChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv2PiggybackingFlagCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv2PiggybackingFlagCounter +func (obj *patternFlowGtpv2PiggybackingFlag) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv2PiggybackingFlagCounter value in the PatternFlowGtpv2PiggybackingFlag object +func (obj *patternFlowGtpv2PiggybackingFlag) SetIncrement(value PatternFlowGtpv2PiggybackingFlagCounter) PatternFlowGtpv2PiggybackingFlag { + obj.setChoice(PatternFlowGtpv2PiggybackingFlagChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2PiggybackingFlagCounter +func (obj *patternFlowGtpv2PiggybackingFlag) Decrement() PatternFlowGtpv2PiggybackingFlagCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv2PiggybackingFlagChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv2PiggybackingFlagCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2PiggybackingFlagCounter +func (obj *patternFlowGtpv2PiggybackingFlag) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv2PiggybackingFlagCounter value in the PatternFlowGtpv2PiggybackingFlag object +func (obj *patternFlowGtpv2PiggybackingFlag) SetDecrement(value PatternFlowGtpv2PiggybackingFlagCounter) PatternFlowGtpv2PiggybackingFlag { + obj.setChoice(PatternFlowGtpv2PiggybackingFlagChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv2PiggybackingFlagMetricTag +func (obj *patternFlowGtpv2PiggybackingFlag) MetricTags() PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv2PiggybackingFlagMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter struct { + obj *patternFlowGtpv2PiggybackingFlag + patternFlowGtpv2PiggybackingFlagMetricTagSlice []PatternFlowGtpv2PiggybackingFlagMetricTag + fieldPtr *[]*otg.PatternFlowGtpv2PiggybackingFlagMetricTag +} + +func newPatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter(ptr *[]*otg.PatternFlowGtpv2PiggybackingFlagMetricTag) PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter { + return &patternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter interface { + setMsg(*patternFlowGtpv2PiggybackingFlag) PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter + Items() []PatternFlowGtpv2PiggybackingFlagMetricTag + Add() PatternFlowGtpv2PiggybackingFlagMetricTag + Append(items ...PatternFlowGtpv2PiggybackingFlagMetricTag) PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter + Set(index int, newObj PatternFlowGtpv2PiggybackingFlagMetricTag) PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter + Clear() PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter + clearHolderSlice() PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter + appendHolderSlice(item PatternFlowGtpv2PiggybackingFlagMetricTag) PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter +} + +func (obj *patternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter) setMsg(msg *patternFlowGtpv2PiggybackingFlag) PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv2PiggybackingFlagMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter) Items() []PatternFlowGtpv2PiggybackingFlagMetricTag { + return obj.patternFlowGtpv2PiggybackingFlagMetricTagSlice +} + +func (obj *patternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter) Add() PatternFlowGtpv2PiggybackingFlagMetricTag { + newObj := &otg.PatternFlowGtpv2PiggybackingFlagMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv2PiggybackingFlagMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv2PiggybackingFlagMetricTagSlice = append(obj.patternFlowGtpv2PiggybackingFlagMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter) Append(items ...PatternFlowGtpv2PiggybackingFlagMetricTag) PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv2PiggybackingFlagMetricTagSlice = append(obj.patternFlowGtpv2PiggybackingFlagMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter) Set(index int, newObj PatternFlowGtpv2PiggybackingFlagMetricTag) PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv2PiggybackingFlagMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter) Clear() PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv2PiggybackingFlagMetricTag{} + obj.patternFlowGtpv2PiggybackingFlagMetricTagSlice = []PatternFlowGtpv2PiggybackingFlagMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter) clearHolderSlice() PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter { + if len(obj.patternFlowGtpv2PiggybackingFlagMetricTagSlice) > 0 { + obj.patternFlowGtpv2PiggybackingFlagMetricTagSlice = []PatternFlowGtpv2PiggybackingFlagMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter) appendHolderSlice(item PatternFlowGtpv2PiggybackingFlagMetricTag) PatternFlowGtpv2PiggybackingFlagPatternFlowGtpv2PiggybackingFlagMetricTagIter { + obj.patternFlowGtpv2PiggybackingFlagMetricTagSlice = append(obj.patternFlowGtpv2PiggybackingFlagMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv2PiggybackingFlag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2PiggybackingFlag.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv2PiggybackingFlag.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv2PiggybackingFlagMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv2PiggybackingFlag) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv2PiggybackingFlagChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv2PiggybackingFlagChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv2PiggybackingFlagChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv2PiggybackingFlagChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv2PiggybackingFlagChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv2PiggybackingFlagChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv2PiggybackingFlag") + } + } else { + intVal := otg.PatternFlowGtpv2PiggybackingFlag_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv2PiggybackingFlag_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_piggybacking_flag_counter.go b/gosnappi/pattern_flow_gtpv2_piggybacking_flag_counter.go new file mode 100644 index 00000000..165be078 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_piggybacking_flag_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2PiggybackingFlagCounter ***** +type patternFlowGtpv2PiggybackingFlagCounter struct { + validation + obj *otg.PatternFlowGtpv2PiggybackingFlagCounter + marshaller marshalPatternFlowGtpv2PiggybackingFlagCounter + unMarshaller unMarshalPatternFlowGtpv2PiggybackingFlagCounter +} + +func NewPatternFlowGtpv2PiggybackingFlagCounter() PatternFlowGtpv2PiggybackingFlagCounter { + obj := patternFlowGtpv2PiggybackingFlagCounter{obj: &otg.PatternFlowGtpv2PiggybackingFlagCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2PiggybackingFlagCounter) msg() *otg.PatternFlowGtpv2PiggybackingFlagCounter { + return obj.obj +} + +func (obj *patternFlowGtpv2PiggybackingFlagCounter) setMsg(msg *otg.PatternFlowGtpv2PiggybackingFlagCounter) PatternFlowGtpv2PiggybackingFlagCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2PiggybackingFlagCounter struct { + obj *patternFlowGtpv2PiggybackingFlagCounter +} + +type marshalPatternFlowGtpv2PiggybackingFlagCounter interface { + // ToProto marshals PatternFlowGtpv2PiggybackingFlagCounter to protobuf object *otg.PatternFlowGtpv2PiggybackingFlagCounter + ToProto() (*otg.PatternFlowGtpv2PiggybackingFlagCounter, error) + // ToPbText marshals PatternFlowGtpv2PiggybackingFlagCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2PiggybackingFlagCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2PiggybackingFlagCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2PiggybackingFlagCounter struct { + obj *patternFlowGtpv2PiggybackingFlagCounter +} + +type unMarshalPatternFlowGtpv2PiggybackingFlagCounter interface { + // FromProto unmarshals PatternFlowGtpv2PiggybackingFlagCounter from protobuf object *otg.PatternFlowGtpv2PiggybackingFlagCounter + FromProto(msg *otg.PatternFlowGtpv2PiggybackingFlagCounter) (PatternFlowGtpv2PiggybackingFlagCounter, error) + // FromPbText unmarshals PatternFlowGtpv2PiggybackingFlagCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2PiggybackingFlagCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2PiggybackingFlagCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2PiggybackingFlagCounter) Marshal() marshalPatternFlowGtpv2PiggybackingFlagCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2PiggybackingFlagCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2PiggybackingFlagCounter) Unmarshal() unMarshalPatternFlowGtpv2PiggybackingFlagCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2PiggybackingFlagCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2PiggybackingFlagCounter) ToProto() (*otg.PatternFlowGtpv2PiggybackingFlagCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2PiggybackingFlagCounter) FromProto(msg *otg.PatternFlowGtpv2PiggybackingFlagCounter) (PatternFlowGtpv2PiggybackingFlagCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2PiggybackingFlagCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2PiggybackingFlagCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2PiggybackingFlagCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2PiggybackingFlagCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2PiggybackingFlagCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2PiggybackingFlagCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2PiggybackingFlagCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2PiggybackingFlagCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2PiggybackingFlagCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2PiggybackingFlagCounter) Clone() (PatternFlowGtpv2PiggybackingFlagCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2PiggybackingFlagCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2PiggybackingFlagCounter is integer counter pattern +type PatternFlowGtpv2PiggybackingFlagCounter interface { + Validation + // msg marshals PatternFlowGtpv2PiggybackingFlagCounter to protobuf object *otg.PatternFlowGtpv2PiggybackingFlagCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2PiggybackingFlagCounter + // setMsg unmarshals PatternFlowGtpv2PiggybackingFlagCounter from protobuf object *otg.PatternFlowGtpv2PiggybackingFlagCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2PiggybackingFlagCounter) PatternFlowGtpv2PiggybackingFlagCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv2PiggybackingFlagCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2PiggybackingFlagCounter + // validate validates PatternFlowGtpv2PiggybackingFlagCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2PiggybackingFlagCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv2PiggybackingFlagCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv2PiggybackingFlagCounter + SetStart(value uint32) PatternFlowGtpv2PiggybackingFlagCounter + // HasStart checks if Start has been set in PatternFlowGtpv2PiggybackingFlagCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv2PiggybackingFlagCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv2PiggybackingFlagCounter + SetStep(value uint32) PatternFlowGtpv2PiggybackingFlagCounter + // HasStep checks if Step has been set in PatternFlowGtpv2PiggybackingFlagCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv2PiggybackingFlagCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv2PiggybackingFlagCounter + SetCount(value uint32) PatternFlowGtpv2PiggybackingFlagCounter + // HasCount checks if Count has been set in PatternFlowGtpv2PiggybackingFlagCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2PiggybackingFlagCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2PiggybackingFlagCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv2PiggybackingFlagCounter object +func (obj *patternFlowGtpv2PiggybackingFlagCounter) SetStart(value uint32) PatternFlowGtpv2PiggybackingFlagCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2PiggybackingFlagCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2PiggybackingFlagCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv2PiggybackingFlagCounter object +func (obj *patternFlowGtpv2PiggybackingFlagCounter) SetStep(value uint32) PatternFlowGtpv2PiggybackingFlagCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2PiggybackingFlagCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2PiggybackingFlagCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv2PiggybackingFlagCounter object +func (obj *patternFlowGtpv2PiggybackingFlagCounter) SetCount(value uint32) PatternFlowGtpv2PiggybackingFlagCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv2PiggybackingFlagCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2PiggybackingFlagCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2PiggybackingFlagCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2PiggybackingFlagCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv2PiggybackingFlagCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_piggybacking_flag_metric_tag.go b/gosnappi/pattern_flow_gtpv2_piggybacking_flag_metric_tag.go new file mode 100644 index 00000000..d717c9c9 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_piggybacking_flag_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2PiggybackingFlagMetricTag ***** +type patternFlowGtpv2PiggybackingFlagMetricTag struct { + validation + obj *otg.PatternFlowGtpv2PiggybackingFlagMetricTag + marshaller marshalPatternFlowGtpv2PiggybackingFlagMetricTag + unMarshaller unMarshalPatternFlowGtpv2PiggybackingFlagMetricTag +} + +func NewPatternFlowGtpv2PiggybackingFlagMetricTag() PatternFlowGtpv2PiggybackingFlagMetricTag { + obj := patternFlowGtpv2PiggybackingFlagMetricTag{obj: &otg.PatternFlowGtpv2PiggybackingFlagMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) msg() *otg.PatternFlowGtpv2PiggybackingFlagMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) setMsg(msg *otg.PatternFlowGtpv2PiggybackingFlagMetricTag) PatternFlowGtpv2PiggybackingFlagMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2PiggybackingFlagMetricTag struct { + obj *patternFlowGtpv2PiggybackingFlagMetricTag +} + +type marshalPatternFlowGtpv2PiggybackingFlagMetricTag interface { + // ToProto marshals PatternFlowGtpv2PiggybackingFlagMetricTag to protobuf object *otg.PatternFlowGtpv2PiggybackingFlagMetricTag + ToProto() (*otg.PatternFlowGtpv2PiggybackingFlagMetricTag, error) + // ToPbText marshals PatternFlowGtpv2PiggybackingFlagMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2PiggybackingFlagMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2PiggybackingFlagMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2PiggybackingFlagMetricTag struct { + obj *patternFlowGtpv2PiggybackingFlagMetricTag +} + +type unMarshalPatternFlowGtpv2PiggybackingFlagMetricTag interface { + // FromProto unmarshals PatternFlowGtpv2PiggybackingFlagMetricTag from protobuf object *otg.PatternFlowGtpv2PiggybackingFlagMetricTag + FromProto(msg *otg.PatternFlowGtpv2PiggybackingFlagMetricTag) (PatternFlowGtpv2PiggybackingFlagMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv2PiggybackingFlagMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2PiggybackingFlagMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2PiggybackingFlagMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) Marshal() marshalPatternFlowGtpv2PiggybackingFlagMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2PiggybackingFlagMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) Unmarshal() unMarshalPatternFlowGtpv2PiggybackingFlagMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2PiggybackingFlagMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2PiggybackingFlagMetricTag) ToProto() (*otg.PatternFlowGtpv2PiggybackingFlagMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2PiggybackingFlagMetricTag) FromProto(msg *otg.PatternFlowGtpv2PiggybackingFlagMetricTag) (PatternFlowGtpv2PiggybackingFlagMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2PiggybackingFlagMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2PiggybackingFlagMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2PiggybackingFlagMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2PiggybackingFlagMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2PiggybackingFlagMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2PiggybackingFlagMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) Clone() (PatternFlowGtpv2PiggybackingFlagMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2PiggybackingFlagMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2PiggybackingFlagMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv2PiggybackingFlagMetricTag interface { + Validation + // msg marshals PatternFlowGtpv2PiggybackingFlagMetricTag to protobuf object *otg.PatternFlowGtpv2PiggybackingFlagMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2PiggybackingFlagMetricTag + // setMsg unmarshals PatternFlowGtpv2PiggybackingFlagMetricTag from protobuf object *otg.PatternFlowGtpv2PiggybackingFlagMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2PiggybackingFlagMetricTag) PatternFlowGtpv2PiggybackingFlagMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv2PiggybackingFlagMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2PiggybackingFlagMetricTag + // validate validates PatternFlowGtpv2PiggybackingFlagMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2PiggybackingFlagMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv2PiggybackingFlagMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv2PiggybackingFlagMetricTag + SetName(value string) PatternFlowGtpv2PiggybackingFlagMetricTag + // Offset returns uint32, set in PatternFlowGtpv2PiggybackingFlagMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv2PiggybackingFlagMetricTag + SetOffset(value uint32) PatternFlowGtpv2PiggybackingFlagMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv2PiggybackingFlagMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv2PiggybackingFlagMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv2PiggybackingFlagMetricTag + SetLength(value uint32) PatternFlowGtpv2PiggybackingFlagMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv2PiggybackingFlagMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv2PiggybackingFlagMetricTag object +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) SetName(value string) PatternFlowGtpv2PiggybackingFlagMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv2PiggybackingFlagMetricTag object +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) SetOffset(value uint32) PatternFlowGtpv2PiggybackingFlagMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv2PiggybackingFlagMetricTag object +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) SetLength(value uint32) PatternFlowGtpv2PiggybackingFlagMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv2PiggybackingFlagMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2PiggybackingFlagMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv2PiggybackingFlagMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv2PiggybackingFlagMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_sequence_number.go b/gosnappi/pattern_flow_gtpv2_sequence_number.go new file mode 100644 index 00000000..5fe205a2 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_sequence_number.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2SequenceNumber ***** +type patternFlowGtpv2SequenceNumber struct { + validation + obj *otg.PatternFlowGtpv2SequenceNumber + marshaller marshalPatternFlowGtpv2SequenceNumber + unMarshaller unMarshalPatternFlowGtpv2SequenceNumber + incrementHolder PatternFlowGtpv2SequenceNumberCounter + decrementHolder PatternFlowGtpv2SequenceNumberCounter + metricTagsHolder PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter +} + +func NewPatternFlowGtpv2SequenceNumber() PatternFlowGtpv2SequenceNumber { + obj := patternFlowGtpv2SequenceNumber{obj: &otg.PatternFlowGtpv2SequenceNumber{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2SequenceNumber) msg() *otg.PatternFlowGtpv2SequenceNumber { + return obj.obj +} + +func (obj *patternFlowGtpv2SequenceNumber) setMsg(msg *otg.PatternFlowGtpv2SequenceNumber) PatternFlowGtpv2SequenceNumber { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2SequenceNumber struct { + obj *patternFlowGtpv2SequenceNumber +} + +type marshalPatternFlowGtpv2SequenceNumber interface { + // ToProto marshals PatternFlowGtpv2SequenceNumber to protobuf object *otg.PatternFlowGtpv2SequenceNumber + ToProto() (*otg.PatternFlowGtpv2SequenceNumber, error) + // ToPbText marshals PatternFlowGtpv2SequenceNumber to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2SequenceNumber to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2SequenceNumber to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2SequenceNumber struct { + obj *patternFlowGtpv2SequenceNumber +} + +type unMarshalPatternFlowGtpv2SequenceNumber interface { + // FromProto unmarshals PatternFlowGtpv2SequenceNumber from protobuf object *otg.PatternFlowGtpv2SequenceNumber + FromProto(msg *otg.PatternFlowGtpv2SequenceNumber) (PatternFlowGtpv2SequenceNumber, error) + // FromPbText unmarshals PatternFlowGtpv2SequenceNumber from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2SequenceNumber from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2SequenceNumber from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2SequenceNumber) Marshal() marshalPatternFlowGtpv2SequenceNumber { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2SequenceNumber{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2SequenceNumber) Unmarshal() unMarshalPatternFlowGtpv2SequenceNumber { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2SequenceNumber{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2SequenceNumber) ToProto() (*otg.PatternFlowGtpv2SequenceNumber, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2SequenceNumber) FromProto(msg *otg.PatternFlowGtpv2SequenceNumber) (PatternFlowGtpv2SequenceNumber, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2SequenceNumber) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2SequenceNumber) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2SequenceNumber) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2SequenceNumber) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2SequenceNumber) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2SequenceNumber) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2SequenceNumber) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2SequenceNumber) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2SequenceNumber) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2SequenceNumber) Clone() (PatternFlowGtpv2SequenceNumber, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2SequenceNumber() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv2SequenceNumber) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv2SequenceNumber is the sequence number +type PatternFlowGtpv2SequenceNumber interface { + Validation + // msg marshals PatternFlowGtpv2SequenceNumber to protobuf object *otg.PatternFlowGtpv2SequenceNumber + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2SequenceNumber + // setMsg unmarshals PatternFlowGtpv2SequenceNumber from protobuf object *otg.PatternFlowGtpv2SequenceNumber + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2SequenceNumber) PatternFlowGtpv2SequenceNumber + // provides marshal interface + Marshal() marshalPatternFlowGtpv2SequenceNumber + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2SequenceNumber + // validate validates PatternFlowGtpv2SequenceNumber + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2SequenceNumber, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv2SequenceNumberChoiceEnum, set in PatternFlowGtpv2SequenceNumber + Choice() PatternFlowGtpv2SequenceNumberChoiceEnum + // setChoice assigns PatternFlowGtpv2SequenceNumberChoiceEnum provided by user to PatternFlowGtpv2SequenceNumber + setChoice(value PatternFlowGtpv2SequenceNumberChoiceEnum) PatternFlowGtpv2SequenceNumber + // HasChoice checks if Choice has been set in PatternFlowGtpv2SequenceNumber + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv2SequenceNumber. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv2SequenceNumber + SetValue(value uint32) PatternFlowGtpv2SequenceNumber + // HasValue checks if Value has been set in PatternFlowGtpv2SequenceNumber + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv2SequenceNumber. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv2SequenceNumber + SetValues(value []uint32) PatternFlowGtpv2SequenceNumber + // Increment returns PatternFlowGtpv2SequenceNumberCounter, set in PatternFlowGtpv2SequenceNumber. + // PatternFlowGtpv2SequenceNumberCounter is integer counter pattern + Increment() PatternFlowGtpv2SequenceNumberCounter + // SetIncrement assigns PatternFlowGtpv2SequenceNumberCounter provided by user to PatternFlowGtpv2SequenceNumber. + // PatternFlowGtpv2SequenceNumberCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv2SequenceNumberCounter) PatternFlowGtpv2SequenceNumber + // HasIncrement checks if Increment has been set in PatternFlowGtpv2SequenceNumber + HasIncrement() bool + // Decrement returns PatternFlowGtpv2SequenceNumberCounter, set in PatternFlowGtpv2SequenceNumber. + // PatternFlowGtpv2SequenceNumberCounter is integer counter pattern + Decrement() PatternFlowGtpv2SequenceNumberCounter + // SetDecrement assigns PatternFlowGtpv2SequenceNumberCounter provided by user to PatternFlowGtpv2SequenceNumber. + // PatternFlowGtpv2SequenceNumberCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv2SequenceNumberCounter) PatternFlowGtpv2SequenceNumber + // HasDecrement checks if Decrement has been set in PatternFlowGtpv2SequenceNumber + HasDecrement() bool + // MetricTags returns PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIterIter, set in PatternFlowGtpv2SequenceNumber + MetricTags() PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter + setNil() +} + +type PatternFlowGtpv2SequenceNumberChoiceEnum string + +// Enum of Choice on PatternFlowGtpv2SequenceNumber +var PatternFlowGtpv2SequenceNumberChoice = struct { + VALUE PatternFlowGtpv2SequenceNumberChoiceEnum + VALUES PatternFlowGtpv2SequenceNumberChoiceEnum + INCREMENT PatternFlowGtpv2SequenceNumberChoiceEnum + DECREMENT PatternFlowGtpv2SequenceNumberChoiceEnum +}{ + VALUE: PatternFlowGtpv2SequenceNumberChoiceEnum("value"), + VALUES: PatternFlowGtpv2SequenceNumberChoiceEnum("values"), + INCREMENT: PatternFlowGtpv2SequenceNumberChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv2SequenceNumberChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv2SequenceNumber) Choice() PatternFlowGtpv2SequenceNumberChoiceEnum { + return PatternFlowGtpv2SequenceNumberChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv2SequenceNumber) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv2SequenceNumber) setChoice(value PatternFlowGtpv2SequenceNumberChoiceEnum) PatternFlowGtpv2SequenceNumber { + intValue, ok := otg.PatternFlowGtpv2SequenceNumber_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv2SequenceNumberChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv2SequenceNumber_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv2SequenceNumberChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv2SequenceNumberChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv2SequenceNumberChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv2SequenceNumberCounter().msg() + } + + if value == PatternFlowGtpv2SequenceNumberChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv2SequenceNumberCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2SequenceNumber) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv2SequenceNumberChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2SequenceNumber) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv2SequenceNumber object +func (obj *patternFlowGtpv2SequenceNumber) SetValue(value uint32) PatternFlowGtpv2SequenceNumber { + obj.setChoice(PatternFlowGtpv2SequenceNumberChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv2SequenceNumber) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv2SequenceNumber object +func (obj *patternFlowGtpv2SequenceNumber) SetValues(value []uint32) PatternFlowGtpv2SequenceNumber { + obj.setChoice(PatternFlowGtpv2SequenceNumberChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv2SequenceNumberCounter +func (obj *patternFlowGtpv2SequenceNumber) Increment() PatternFlowGtpv2SequenceNumberCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv2SequenceNumberChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv2SequenceNumberCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv2SequenceNumberCounter +func (obj *patternFlowGtpv2SequenceNumber) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv2SequenceNumberCounter value in the PatternFlowGtpv2SequenceNumber object +func (obj *patternFlowGtpv2SequenceNumber) SetIncrement(value PatternFlowGtpv2SequenceNumberCounter) PatternFlowGtpv2SequenceNumber { + obj.setChoice(PatternFlowGtpv2SequenceNumberChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2SequenceNumberCounter +func (obj *patternFlowGtpv2SequenceNumber) Decrement() PatternFlowGtpv2SequenceNumberCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv2SequenceNumberChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv2SequenceNumberCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2SequenceNumberCounter +func (obj *patternFlowGtpv2SequenceNumber) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv2SequenceNumberCounter value in the PatternFlowGtpv2SequenceNumber object +func (obj *patternFlowGtpv2SequenceNumber) SetDecrement(value PatternFlowGtpv2SequenceNumberCounter) PatternFlowGtpv2SequenceNumber { + obj.setChoice(PatternFlowGtpv2SequenceNumberChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv2SequenceNumberMetricTag +func (obj *patternFlowGtpv2SequenceNumber) MetricTags() PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv2SequenceNumberMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter struct { + obj *patternFlowGtpv2SequenceNumber + patternFlowGtpv2SequenceNumberMetricTagSlice []PatternFlowGtpv2SequenceNumberMetricTag + fieldPtr *[]*otg.PatternFlowGtpv2SequenceNumberMetricTag +} + +func newPatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter(ptr *[]*otg.PatternFlowGtpv2SequenceNumberMetricTag) PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter { + return &patternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter interface { + setMsg(*patternFlowGtpv2SequenceNumber) PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter + Items() []PatternFlowGtpv2SequenceNumberMetricTag + Add() PatternFlowGtpv2SequenceNumberMetricTag + Append(items ...PatternFlowGtpv2SequenceNumberMetricTag) PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter + Set(index int, newObj PatternFlowGtpv2SequenceNumberMetricTag) PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter + Clear() PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter + clearHolderSlice() PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter + appendHolderSlice(item PatternFlowGtpv2SequenceNumberMetricTag) PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter +} + +func (obj *patternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter) setMsg(msg *patternFlowGtpv2SequenceNumber) PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv2SequenceNumberMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter) Items() []PatternFlowGtpv2SequenceNumberMetricTag { + return obj.patternFlowGtpv2SequenceNumberMetricTagSlice +} + +func (obj *patternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter) Add() PatternFlowGtpv2SequenceNumberMetricTag { + newObj := &otg.PatternFlowGtpv2SequenceNumberMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv2SequenceNumberMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv2SequenceNumberMetricTagSlice = append(obj.patternFlowGtpv2SequenceNumberMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter) Append(items ...PatternFlowGtpv2SequenceNumberMetricTag) PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv2SequenceNumberMetricTagSlice = append(obj.patternFlowGtpv2SequenceNumberMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter) Set(index int, newObj PatternFlowGtpv2SequenceNumberMetricTag) PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv2SequenceNumberMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter) Clear() PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv2SequenceNumberMetricTag{} + obj.patternFlowGtpv2SequenceNumberMetricTagSlice = []PatternFlowGtpv2SequenceNumberMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter) clearHolderSlice() PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter { + if len(obj.patternFlowGtpv2SequenceNumberMetricTagSlice) > 0 { + obj.patternFlowGtpv2SequenceNumberMetricTagSlice = []PatternFlowGtpv2SequenceNumberMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter) appendHolderSlice(item PatternFlowGtpv2SequenceNumberMetricTag) PatternFlowGtpv2SequenceNumberPatternFlowGtpv2SequenceNumberMetricTagIter { + obj.patternFlowGtpv2SequenceNumberMetricTagSlice = append(obj.patternFlowGtpv2SequenceNumberMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv2SequenceNumber) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2SequenceNumber.Value <= 16777215 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv2SequenceNumber.Values <= 16777215 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv2SequenceNumberMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv2SequenceNumber) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv2SequenceNumberChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv2SequenceNumberChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv2SequenceNumberChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv2SequenceNumberChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv2SequenceNumberChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv2SequenceNumberChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv2SequenceNumber") + } + } else { + intVal := otg.PatternFlowGtpv2SequenceNumber_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv2SequenceNumber_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_sequence_number_counter.go b/gosnappi/pattern_flow_gtpv2_sequence_number_counter.go new file mode 100644 index 00000000..11ef696d --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_sequence_number_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2SequenceNumberCounter ***** +type patternFlowGtpv2SequenceNumberCounter struct { + validation + obj *otg.PatternFlowGtpv2SequenceNumberCounter + marshaller marshalPatternFlowGtpv2SequenceNumberCounter + unMarshaller unMarshalPatternFlowGtpv2SequenceNumberCounter +} + +func NewPatternFlowGtpv2SequenceNumberCounter() PatternFlowGtpv2SequenceNumberCounter { + obj := patternFlowGtpv2SequenceNumberCounter{obj: &otg.PatternFlowGtpv2SequenceNumberCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2SequenceNumberCounter) msg() *otg.PatternFlowGtpv2SequenceNumberCounter { + return obj.obj +} + +func (obj *patternFlowGtpv2SequenceNumberCounter) setMsg(msg *otg.PatternFlowGtpv2SequenceNumberCounter) PatternFlowGtpv2SequenceNumberCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2SequenceNumberCounter struct { + obj *patternFlowGtpv2SequenceNumberCounter +} + +type marshalPatternFlowGtpv2SequenceNumberCounter interface { + // ToProto marshals PatternFlowGtpv2SequenceNumberCounter to protobuf object *otg.PatternFlowGtpv2SequenceNumberCounter + ToProto() (*otg.PatternFlowGtpv2SequenceNumberCounter, error) + // ToPbText marshals PatternFlowGtpv2SequenceNumberCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2SequenceNumberCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2SequenceNumberCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2SequenceNumberCounter struct { + obj *patternFlowGtpv2SequenceNumberCounter +} + +type unMarshalPatternFlowGtpv2SequenceNumberCounter interface { + // FromProto unmarshals PatternFlowGtpv2SequenceNumberCounter from protobuf object *otg.PatternFlowGtpv2SequenceNumberCounter + FromProto(msg *otg.PatternFlowGtpv2SequenceNumberCounter) (PatternFlowGtpv2SequenceNumberCounter, error) + // FromPbText unmarshals PatternFlowGtpv2SequenceNumberCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2SequenceNumberCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2SequenceNumberCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2SequenceNumberCounter) Marshal() marshalPatternFlowGtpv2SequenceNumberCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2SequenceNumberCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2SequenceNumberCounter) Unmarshal() unMarshalPatternFlowGtpv2SequenceNumberCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2SequenceNumberCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2SequenceNumberCounter) ToProto() (*otg.PatternFlowGtpv2SequenceNumberCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2SequenceNumberCounter) FromProto(msg *otg.PatternFlowGtpv2SequenceNumberCounter) (PatternFlowGtpv2SequenceNumberCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2SequenceNumberCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2SequenceNumberCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2SequenceNumberCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2SequenceNumberCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2SequenceNumberCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2SequenceNumberCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2SequenceNumberCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2SequenceNumberCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2SequenceNumberCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2SequenceNumberCounter) Clone() (PatternFlowGtpv2SequenceNumberCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2SequenceNumberCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2SequenceNumberCounter is integer counter pattern +type PatternFlowGtpv2SequenceNumberCounter interface { + Validation + // msg marshals PatternFlowGtpv2SequenceNumberCounter to protobuf object *otg.PatternFlowGtpv2SequenceNumberCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2SequenceNumberCounter + // setMsg unmarshals PatternFlowGtpv2SequenceNumberCounter from protobuf object *otg.PatternFlowGtpv2SequenceNumberCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2SequenceNumberCounter) PatternFlowGtpv2SequenceNumberCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv2SequenceNumberCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2SequenceNumberCounter + // validate validates PatternFlowGtpv2SequenceNumberCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2SequenceNumberCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv2SequenceNumberCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv2SequenceNumberCounter + SetStart(value uint32) PatternFlowGtpv2SequenceNumberCounter + // HasStart checks if Start has been set in PatternFlowGtpv2SequenceNumberCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv2SequenceNumberCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv2SequenceNumberCounter + SetStep(value uint32) PatternFlowGtpv2SequenceNumberCounter + // HasStep checks if Step has been set in PatternFlowGtpv2SequenceNumberCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv2SequenceNumberCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv2SequenceNumberCounter + SetCount(value uint32) PatternFlowGtpv2SequenceNumberCounter + // HasCount checks if Count has been set in PatternFlowGtpv2SequenceNumberCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2SequenceNumberCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2SequenceNumberCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv2SequenceNumberCounter object +func (obj *patternFlowGtpv2SequenceNumberCounter) SetStart(value uint32) PatternFlowGtpv2SequenceNumberCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2SequenceNumberCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2SequenceNumberCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv2SequenceNumberCounter object +func (obj *patternFlowGtpv2SequenceNumberCounter) SetStep(value uint32) PatternFlowGtpv2SequenceNumberCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2SequenceNumberCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2SequenceNumberCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv2SequenceNumberCounter object +func (obj *patternFlowGtpv2SequenceNumberCounter) SetCount(value uint32) PatternFlowGtpv2SequenceNumberCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv2SequenceNumberCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2SequenceNumberCounter.Start <= 16777215 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2SequenceNumberCounter.Step <= 16777215 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2SequenceNumberCounter.Count <= 16777215 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv2SequenceNumberCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_sequence_number_metric_tag.go b/gosnappi/pattern_flow_gtpv2_sequence_number_metric_tag.go new file mode 100644 index 00000000..9d4906b8 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_sequence_number_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2SequenceNumberMetricTag ***** +type patternFlowGtpv2SequenceNumberMetricTag struct { + validation + obj *otg.PatternFlowGtpv2SequenceNumberMetricTag + marshaller marshalPatternFlowGtpv2SequenceNumberMetricTag + unMarshaller unMarshalPatternFlowGtpv2SequenceNumberMetricTag +} + +func NewPatternFlowGtpv2SequenceNumberMetricTag() PatternFlowGtpv2SequenceNumberMetricTag { + obj := patternFlowGtpv2SequenceNumberMetricTag{obj: &otg.PatternFlowGtpv2SequenceNumberMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2SequenceNumberMetricTag) msg() *otg.PatternFlowGtpv2SequenceNumberMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv2SequenceNumberMetricTag) setMsg(msg *otg.PatternFlowGtpv2SequenceNumberMetricTag) PatternFlowGtpv2SequenceNumberMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2SequenceNumberMetricTag struct { + obj *patternFlowGtpv2SequenceNumberMetricTag +} + +type marshalPatternFlowGtpv2SequenceNumberMetricTag interface { + // ToProto marshals PatternFlowGtpv2SequenceNumberMetricTag to protobuf object *otg.PatternFlowGtpv2SequenceNumberMetricTag + ToProto() (*otg.PatternFlowGtpv2SequenceNumberMetricTag, error) + // ToPbText marshals PatternFlowGtpv2SequenceNumberMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2SequenceNumberMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2SequenceNumberMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2SequenceNumberMetricTag struct { + obj *patternFlowGtpv2SequenceNumberMetricTag +} + +type unMarshalPatternFlowGtpv2SequenceNumberMetricTag interface { + // FromProto unmarshals PatternFlowGtpv2SequenceNumberMetricTag from protobuf object *otg.PatternFlowGtpv2SequenceNumberMetricTag + FromProto(msg *otg.PatternFlowGtpv2SequenceNumberMetricTag) (PatternFlowGtpv2SequenceNumberMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv2SequenceNumberMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2SequenceNumberMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2SequenceNumberMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2SequenceNumberMetricTag) Marshal() marshalPatternFlowGtpv2SequenceNumberMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2SequenceNumberMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2SequenceNumberMetricTag) Unmarshal() unMarshalPatternFlowGtpv2SequenceNumberMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2SequenceNumberMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2SequenceNumberMetricTag) ToProto() (*otg.PatternFlowGtpv2SequenceNumberMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2SequenceNumberMetricTag) FromProto(msg *otg.PatternFlowGtpv2SequenceNumberMetricTag) (PatternFlowGtpv2SequenceNumberMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2SequenceNumberMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2SequenceNumberMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2SequenceNumberMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2SequenceNumberMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2SequenceNumberMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2SequenceNumberMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2SequenceNumberMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2SequenceNumberMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2SequenceNumberMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2SequenceNumberMetricTag) Clone() (PatternFlowGtpv2SequenceNumberMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2SequenceNumberMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2SequenceNumberMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv2SequenceNumberMetricTag interface { + Validation + // msg marshals PatternFlowGtpv2SequenceNumberMetricTag to protobuf object *otg.PatternFlowGtpv2SequenceNumberMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2SequenceNumberMetricTag + // setMsg unmarshals PatternFlowGtpv2SequenceNumberMetricTag from protobuf object *otg.PatternFlowGtpv2SequenceNumberMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2SequenceNumberMetricTag) PatternFlowGtpv2SequenceNumberMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv2SequenceNumberMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2SequenceNumberMetricTag + // validate validates PatternFlowGtpv2SequenceNumberMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2SequenceNumberMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv2SequenceNumberMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv2SequenceNumberMetricTag + SetName(value string) PatternFlowGtpv2SequenceNumberMetricTag + // Offset returns uint32, set in PatternFlowGtpv2SequenceNumberMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv2SequenceNumberMetricTag + SetOffset(value uint32) PatternFlowGtpv2SequenceNumberMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv2SequenceNumberMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv2SequenceNumberMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv2SequenceNumberMetricTag + SetLength(value uint32) PatternFlowGtpv2SequenceNumberMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv2SequenceNumberMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv2SequenceNumberMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv2SequenceNumberMetricTag object +func (obj *patternFlowGtpv2SequenceNumberMetricTag) SetName(value string) PatternFlowGtpv2SequenceNumberMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2SequenceNumberMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2SequenceNumberMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv2SequenceNumberMetricTag object +func (obj *patternFlowGtpv2SequenceNumberMetricTag) SetOffset(value uint32) PatternFlowGtpv2SequenceNumberMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2SequenceNumberMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2SequenceNumberMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv2SequenceNumberMetricTag object +func (obj *patternFlowGtpv2SequenceNumberMetricTag) SetLength(value uint32) PatternFlowGtpv2SequenceNumberMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv2SequenceNumberMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv2SequenceNumberMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 23 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2SequenceNumberMetricTag.Offset <= 23 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 24 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv2SequenceNumberMetricTag.Length <= 24 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv2SequenceNumberMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(24) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_spare1.go b/gosnappi/pattern_flow_gtpv2_spare1.go new file mode 100644 index 00000000..367cb766 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_spare1.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2Spare1 ***** +type patternFlowGtpv2Spare1 struct { + validation + obj *otg.PatternFlowGtpv2Spare1 + marshaller marshalPatternFlowGtpv2Spare1 + unMarshaller unMarshalPatternFlowGtpv2Spare1 + incrementHolder PatternFlowGtpv2Spare1Counter + decrementHolder PatternFlowGtpv2Spare1Counter + metricTagsHolder PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter +} + +func NewPatternFlowGtpv2Spare1() PatternFlowGtpv2Spare1 { + obj := patternFlowGtpv2Spare1{obj: &otg.PatternFlowGtpv2Spare1{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2Spare1) msg() *otg.PatternFlowGtpv2Spare1 { + return obj.obj +} + +func (obj *patternFlowGtpv2Spare1) setMsg(msg *otg.PatternFlowGtpv2Spare1) PatternFlowGtpv2Spare1 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2Spare1 struct { + obj *patternFlowGtpv2Spare1 +} + +type marshalPatternFlowGtpv2Spare1 interface { + // ToProto marshals PatternFlowGtpv2Spare1 to protobuf object *otg.PatternFlowGtpv2Spare1 + ToProto() (*otg.PatternFlowGtpv2Spare1, error) + // ToPbText marshals PatternFlowGtpv2Spare1 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2Spare1 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2Spare1 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2Spare1 struct { + obj *patternFlowGtpv2Spare1 +} + +type unMarshalPatternFlowGtpv2Spare1 interface { + // FromProto unmarshals PatternFlowGtpv2Spare1 from protobuf object *otg.PatternFlowGtpv2Spare1 + FromProto(msg *otg.PatternFlowGtpv2Spare1) (PatternFlowGtpv2Spare1, error) + // FromPbText unmarshals PatternFlowGtpv2Spare1 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2Spare1 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2Spare1 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2Spare1) Marshal() marshalPatternFlowGtpv2Spare1 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2Spare1{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2Spare1) Unmarshal() unMarshalPatternFlowGtpv2Spare1 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2Spare1{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2Spare1) ToProto() (*otg.PatternFlowGtpv2Spare1, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare1) FromProto(msg *otg.PatternFlowGtpv2Spare1) (PatternFlowGtpv2Spare1, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2Spare1) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare1) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2Spare1) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare1) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2Spare1) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare1) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2Spare1) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Spare1) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Spare1) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2Spare1) Clone() (PatternFlowGtpv2Spare1, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2Spare1() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv2Spare1) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv2Spare1 is a 3-bit reserved field (must be 0). +type PatternFlowGtpv2Spare1 interface { + Validation + // msg marshals PatternFlowGtpv2Spare1 to protobuf object *otg.PatternFlowGtpv2Spare1 + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2Spare1 + // setMsg unmarshals PatternFlowGtpv2Spare1 from protobuf object *otg.PatternFlowGtpv2Spare1 + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2Spare1) PatternFlowGtpv2Spare1 + // provides marshal interface + Marshal() marshalPatternFlowGtpv2Spare1 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2Spare1 + // validate validates PatternFlowGtpv2Spare1 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2Spare1, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv2Spare1ChoiceEnum, set in PatternFlowGtpv2Spare1 + Choice() PatternFlowGtpv2Spare1ChoiceEnum + // setChoice assigns PatternFlowGtpv2Spare1ChoiceEnum provided by user to PatternFlowGtpv2Spare1 + setChoice(value PatternFlowGtpv2Spare1ChoiceEnum) PatternFlowGtpv2Spare1 + // HasChoice checks if Choice has been set in PatternFlowGtpv2Spare1 + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv2Spare1. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv2Spare1 + SetValue(value uint32) PatternFlowGtpv2Spare1 + // HasValue checks if Value has been set in PatternFlowGtpv2Spare1 + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv2Spare1. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv2Spare1 + SetValues(value []uint32) PatternFlowGtpv2Spare1 + // Increment returns PatternFlowGtpv2Spare1Counter, set in PatternFlowGtpv2Spare1. + // PatternFlowGtpv2Spare1Counter is integer counter pattern + Increment() PatternFlowGtpv2Spare1Counter + // SetIncrement assigns PatternFlowGtpv2Spare1Counter provided by user to PatternFlowGtpv2Spare1. + // PatternFlowGtpv2Spare1Counter is integer counter pattern + SetIncrement(value PatternFlowGtpv2Spare1Counter) PatternFlowGtpv2Spare1 + // HasIncrement checks if Increment has been set in PatternFlowGtpv2Spare1 + HasIncrement() bool + // Decrement returns PatternFlowGtpv2Spare1Counter, set in PatternFlowGtpv2Spare1. + // PatternFlowGtpv2Spare1Counter is integer counter pattern + Decrement() PatternFlowGtpv2Spare1Counter + // SetDecrement assigns PatternFlowGtpv2Spare1Counter provided by user to PatternFlowGtpv2Spare1. + // PatternFlowGtpv2Spare1Counter is integer counter pattern + SetDecrement(value PatternFlowGtpv2Spare1Counter) PatternFlowGtpv2Spare1 + // HasDecrement checks if Decrement has been set in PatternFlowGtpv2Spare1 + HasDecrement() bool + // MetricTags returns PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIterIter, set in PatternFlowGtpv2Spare1 + MetricTags() PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter + setNil() +} + +type PatternFlowGtpv2Spare1ChoiceEnum string + +// Enum of Choice on PatternFlowGtpv2Spare1 +var PatternFlowGtpv2Spare1Choice = struct { + VALUE PatternFlowGtpv2Spare1ChoiceEnum + VALUES PatternFlowGtpv2Spare1ChoiceEnum + INCREMENT PatternFlowGtpv2Spare1ChoiceEnum + DECREMENT PatternFlowGtpv2Spare1ChoiceEnum +}{ + VALUE: PatternFlowGtpv2Spare1ChoiceEnum("value"), + VALUES: PatternFlowGtpv2Spare1ChoiceEnum("values"), + INCREMENT: PatternFlowGtpv2Spare1ChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv2Spare1ChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv2Spare1) Choice() PatternFlowGtpv2Spare1ChoiceEnum { + return PatternFlowGtpv2Spare1ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv2Spare1) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv2Spare1) setChoice(value PatternFlowGtpv2Spare1ChoiceEnum) PatternFlowGtpv2Spare1 { + intValue, ok := otg.PatternFlowGtpv2Spare1_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv2Spare1ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv2Spare1_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv2Spare1Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv2Spare1Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv2Spare1Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv2Spare1Counter().msg() + } + + if value == PatternFlowGtpv2Spare1Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv2Spare1Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2Spare1) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv2Spare1Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2Spare1) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv2Spare1 object +func (obj *patternFlowGtpv2Spare1) SetValue(value uint32) PatternFlowGtpv2Spare1 { + obj.setChoice(PatternFlowGtpv2Spare1Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv2Spare1) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv2Spare1 object +func (obj *patternFlowGtpv2Spare1) SetValues(value []uint32) PatternFlowGtpv2Spare1 { + obj.setChoice(PatternFlowGtpv2Spare1Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv2Spare1Counter +func (obj *patternFlowGtpv2Spare1) Increment() PatternFlowGtpv2Spare1Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv2Spare1Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv2Spare1Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv2Spare1Counter +func (obj *patternFlowGtpv2Spare1) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv2Spare1Counter value in the PatternFlowGtpv2Spare1 object +func (obj *patternFlowGtpv2Spare1) SetIncrement(value PatternFlowGtpv2Spare1Counter) PatternFlowGtpv2Spare1 { + obj.setChoice(PatternFlowGtpv2Spare1Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2Spare1Counter +func (obj *patternFlowGtpv2Spare1) Decrement() PatternFlowGtpv2Spare1Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv2Spare1Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv2Spare1Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2Spare1Counter +func (obj *patternFlowGtpv2Spare1) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv2Spare1Counter value in the PatternFlowGtpv2Spare1 object +func (obj *patternFlowGtpv2Spare1) SetDecrement(value PatternFlowGtpv2Spare1Counter) PatternFlowGtpv2Spare1 { + obj.setChoice(PatternFlowGtpv2Spare1Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv2Spare1MetricTag +func (obj *patternFlowGtpv2Spare1) MetricTags() PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv2Spare1MetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter struct { + obj *patternFlowGtpv2Spare1 + patternFlowGtpv2Spare1MetricTagSlice []PatternFlowGtpv2Spare1MetricTag + fieldPtr *[]*otg.PatternFlowGtpv2Spare1MetricTag +} + +func newPatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter(ptr *[]*otg.PatternFlowGtpv2Spare1MetricTag) PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter { + return &patternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter interface { + setMsg(*patternFlowGtpv2Spare1) PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter + Items() []PatternFlowGtpv2Spare1MetricTag + Add() PatternFlowGtpv2Spare1MetricTag + Append(items ...PatternFlowGtpv2Spare1MetricTag) PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter + Set(index int, newObj PatternFlowGtpv2Spare1MetricTag) PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter + Clear() PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter + clearHolderSlice() PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter + appendHolderSlice(item PatternFlowGtpv2Spare1MetricTag) PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter +} + +func (obj *patternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter) setMsg(msg *patternFlowGtpv2Spare1) PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv2Spare1MetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter) Items() []PatternFlowGtpv2Spare1MetricTag { + return obj.patternFlowGtpv2Spare1MetricTagSlice +} + +func (obj *patternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter) Add() PatternFlowGtpv2Spare1MetricTag { + newObj := &otg.PatternFlowGtpv2Spare1MetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv2Spare1MetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv2Spare1MetricTagSlice = append(obj.patternFlowGtpv2Spare1MetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter) Append(items ...PatternFlowGtpv2Spare1MetricTag) PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv2Spare1MetricTagSlice = append(obj.patternFlowGtpv2Spare1MetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter) Set(index int, newObj PatternFlowGtpv2Spare1MetricTag) PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv2Spare1MetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter) Clear() PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv2Spare1MetricTag{} + obj.patternFlowGtpv2Spare1MetricTagSlice = []PatternFlowGtpv2Spare1MetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter) clearHolderSlice() PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter { + if len(obj.patternFlowGtpv2Spare1MetricTagSlice) > 0 { + obj.patternFlowGtpv2Spare1MetricTagSlice = []PatternFlowGtpv2Spare1MetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter) appendHolderSlice(item PatternFlowGtpv2Spare1MetricTag) PatternFlowGtpv2Spare1PatternFlowGtpv2Spare1MetricTagIter { + obj.patternFlowGtpv2Spare1MetricTagSlice = append(obj.patternFlowGtpv2Spare1MetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv2Spare1) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2Spare1.Value <= 7 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv2Spare1.Values <= 7 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv2Spare1MetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv2Spare1) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv2Spare1ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv2Spare1Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv2Spare1Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv2Spare1Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv2Spare1Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv2Spare1Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv2Spare1") + } + } else { + intVal := otg.PatternFlowGtpv2Spare1_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv2Spare1_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_spare1_counter.go b/gosnappi/pattern_flow_gtpv2_spare1_counter.go new file mode 100644 index 00000000..fa3e3084 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_spare1_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2Spare1Counter ***** +type patternFlowGtpv2Spare1Counter struct { + validation + obj *otg.PatternFlowGtpv2Spare1Counter + marshaller marshalPatternFlowGtpv2Spare1Counter + unMarshaller unMarshalPatternFlowGtpv2Spare1Counter +} + +func NewPatternFlowGtpv2Spare1Counter() PatternFlowGtpv2Spare1Counter { + obj := patternFlowGtpv2Spare1Counter{obj: &otg.PatternFlowGtpv2Spare1Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2Spare1Counter) msg() *otg.PatternFlowGtpv2Spare1Counter { + return obj.obj +} + +func (obj *patternFlowGtpv2Spare1Counter) setMsg(msg *otg.PatternFlowGtpv2Spare1Counter) PatternFlowGtpv2Spare1Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2Spare1Counter struct { + obj *patternFlowGtpv2Spare1Counter +} + +type marshalPatternFlowGtpv2Spare1Counter interface { + // ToProto marshals PatternFlowGtpv2Spare1Counter to protobuf object *otg.PatternFlowGtpv2Spare1Counter + ToProto() (*otg.PatternFlowGtpv2Spare1Counter, error) + // ToPbText marshals PatternFlowGtpv2Spare1Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2Spare1Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2Spare1Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2Spare1Counter struct { + obj *patternFlowGtpv2Spare1Counter +} + +type unMarshalPatternFlowGtpv2Spare1Counter interface { + // FromProto unmarshals PatternFlowGtpv2Spare1Counter from protobuf object *otg.PatternFlowGtpv2Spare1Counter + FromProto(msg *otg.PatternFlowGtpv2Spare1Counter) (PatternFlowGtpv2Spare1Counter, error) + // FromPbText unmarshals PatternFlowGtpv2Spare1Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2Spare1Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2Spare1Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2Spare1Counter) Marshal() marshalPatternFlowGtpv2Spare1Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2Spare1Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2Spare1Counter) Unmarshal() unMarshalPatternFlowGtpv2Spare1Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2Spare1Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2Spare1Counter) ToProto() (*otg.PatternFlowGtpv2Spare1Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare1Counter) FromProto(msg *otg.PatternFlowGtpv2Spare1Counter) (PatternFlowGtpv2Spare1Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2Spare1Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare1Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2Spare1Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare1Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2Spare1Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare1Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2Spare1Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Spare1Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Spare1Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2Spare1Counter) Clone() (PatternFlowGtpv2Spare1Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2Spare1Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2Spare1Counter is integer counter pattern +type PatternFlowGtpv2Spare1Counter interface { + Validation + // msg marshals PatternFlowGtpv2Spare1Counter to protobuf object *otg.PatternFlowGtpv2Spare1Counter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2Spare1Counter + // setMsg unmarshals PatternFlowGtpv2Spare1Counter from protobuf object *otg.PatternFlowGtpv2Spare1Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2Spare1Counter) PatternFlowGtpv2Spare1Counter + // provides marshal interface + Marshal() marshalPatternFlowGtpv2Spare1Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2Spare1Counter + // validate validates PatternFlowGtpv2Spare1Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2Spare1Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv2Spare1Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv2Spare1Counter + SetStart(value uint32) PatternFlowGtpv2Spare1Counter + // HasStart checks if Start has been set in PatternFlowGtpv2Spare1Counter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv2Spare1Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv2Spare1Counter + SetStep(value uint32) PatternFlowGtpv2Spare1Counter + // HasStep checks if Step has been set in PatternFlowGtpv2Spare1Counter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv2Spare1Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv2Spare1Counter + SetCount(value uint32) PatternFlowGtpv2Spare1Counter + // HasCount checks if Count has been set in PatternFlowGtpv2Spare1Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2Spare1Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2Spare1Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv2Spare1Counter object +func (obj *patternFlowGtpv2Spare1Counter) SetStart(value uint32) PatternFlowGtpv2Spare1Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2Spare1Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2Spare1Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv2Spare1Counter object +func (obj *patternFlowGtpv2Spare1Counter) SetStep(value uint32) PatternFlowGtpv2Spare1Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2Spare1Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2Spare1Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv2Spare1Counter object +func (obj *patternFlowGtpv2Spare1Counter) SetCount(value uint32) PatternFlowGtpv2Spare1Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv2Spare1Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2Spare1Counter.Start <= 7 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2Spare1Counter.Step <= 7 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2Spare1Counter.Count <= 7 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv2Spare1Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_spare1_metric_tag.go b/gosnappi/pattern_flow_gtpv2_spare1_metric_tag.go new file mode 100644 index 00000000..7fc55807 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_spare1_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2Spare1MetricTag ***** +type patternFlowGtpv2Spare1MetricTag struct { + validation + obj *otg.PatternFlowGtpv2Spare1MetricTag + marshaller marshalPatternFlowGtpv2Spare1MetricTag + unMarshaller unMarshalPatternFlowGtpv2Spare1MetricTag +} + +func NewPatternFlowGtpv2Spare1MetricTag() PatternFlowGtpv2Spare1MetricTag { + obj := patternFlowGtpv2Spare1MetricTag{obj: &otg.PatternFlowGtpv2Spare1MetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2Spare1MetricTag) msg() *otg.PatternFlowGtpv2Spare1MetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv2Spare1MetricTag) setMsg(msg *otg.PatternFlowGtpv2Spare1MetricTag) PatternFlowGtpv2Spare1MetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2Spare1MetricTag struct { + obj *patternFlowGtpv2Spare1MetricTag +} + +type marshalPatternFlowGtpv2Spare1MetricTag interface { + // ToProto marshals PatternFlowGtpv2Spare1MetricTag to protobuf object *otg.PatternFlowGtpv2Spare1MetricTag + ToProto() (*otg.PatternFlowGtpv2Spare1MetricTag, error) + // ToPbText marshals PatternFlowGtpv2Spare1MetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2Spare1MetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2Spare1MetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2Spare1MetricTag struct { + obj *patternFlowGtpv2Spare1MetricTag +} + +type unMarshalPatternFlowGtpv2Spare1MetricTag interface { + // FromProto unmarshals PatternFlowGtpv2Spare1MetricTag from protobuf object *otg.PatternFlowGtpv2Spare1MetricTag + FromProto(msg *otg.PatternFlowGtpv2Spare1MetricTag) (PatternFlowGtpv2Spare1MetricTag, error) + // FromPbText unmarshals PatternFlowGtpv2Spare1MetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2Spare1MetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2Spare1MetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2Spare1MetricTag) Marshal() marshalPatternFlowGtpv2Spare1MetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2Spare1MetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2Spare1MetricTag) Unmarshal() unMarshalPatternFlowGtpv2Spare1MetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2Spare1MetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2Spare1MetricTag) ToProto() (*otg.PatternFlowGtpv2Spare1MetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare1MetricTag) FromProto(msg *otg.PatternFlowGtpv2Spare1MetricTag) (PatternFlowGtpv2Spare1MetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2Spare1MetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare1MetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2Spare1MetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare1MetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2Spare1MetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare1MetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2Spare1MetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Spare1MetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Spare1MetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2Spare1MetricTag) Clone() (PatternFlowGtpv2Spare1MetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2Spare1MetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2Spare1MetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv2Spare1MetricTag interface { + Validation + // msg marshals PatternFlowGtpv2Spare1MetricTag to protobuf object *otg.PatternFlowGtpv2Spare1MetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2Spare1MetricTag + // setMsg unmarshals PatternFlowGtpv2Spare1MetricTag from protobuf object *otg.PatternFlowGtpv2Spare1MetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2Spare1MetricTag) PatternFlowGtpv2Spare1MetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv2Spare1MetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2Spare1MetricTag + // validate validates PatternFlowGtpv2Spare1MetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2Spare1MetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv2Spare1MetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv2Spare1MetricTag + SetName(value string) PatternFlowGtpv2Spare1MetricTag + // Offset returns uint32, set in PatternFlowGtpv2Spare1MetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv2Spare1MetricTag + SetOffset(value uint32) PatternFlowGtpv2Spare1MetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv2Spare1MetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv2Spare1MetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv2Spare1MetricTag + SetLength(value uint32) PatternFlowGtpv2Spare1MetricTag + // HasLength checks if Length has been set in PatternFlowGtpv2Spare1MetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv2Spare1MetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv2Spare1MetricTag object +func (obj *patternFlowGtpv2Spare1MetricTag) SetName(value string) PatternFlowGtpv2Spare1MetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2Spare1MetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2Spare1MetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv2Spare1MetricTag object +func (obj *patternFlowGtpv2Spare1MetricTag) SetOffset(value uint32) PatternFlowGtpv2Spare1MetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2Spare1MetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2Spare1MetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv2Spare1MetricTag object +func (obj *patternFlowGtpv2Spare1MetricTag) SetLength(value uint32) PatternFlowGtpv2Spare1MetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv2Spare1MetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv2Spare1MetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 2 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2Spare1MetricTag.Offset <= 2 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv2Spare1MetricTag.Length <= 3 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv2Spare1MetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(3) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_spare2.go b/gosnappi/pattern_flow_gtpv2_spare2.go new file mode 100644 index 00000000..447e615b --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_spare2.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2Spare2 ***** +type patternFlowGtpv2Spare2 struct { + validation + obj *otg.PatternFlowGtpv2Spare2 + marshaller marshalPatternFlowGtpv2Spare2 + unMarshaller unMarshalPatternFlowGtpv2Spare2 + incrementHolder PatternFlowGtpv2Spare2Counter + decrementHolder PatternFlowGtpv2Spare2Counter + metricTagsHolder PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter +} + +func NewPatternFlowGtpv2Spare2() PatternFlowGtpv2Spare2 { + obj := patternFlowGtpv2Spare2{obj: &otg.PatternFlowGtpv2Spare2{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2Spare2) msg() *otg.PatternFlowGtpv2Spare2 { + return obj.obj +} + +func (obj *patternFlowGtpv2Spare2) setMsg(msg *otg.PatternFlowGtpv2Spare2) PatternFlowGtpv2Spare2 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2Spare2 struct { + obj *patternFlowGtpv2Spare2 +} + +type marshalPatternFlowGtpv2Spare2 interface { + // ToProto marshals PatternFlowGtpv2Spare2 to protobuf object *otg.PatternFlowGtpv2Spare2 + ToProto() (*otg.PatternFlowGtpv2Spare2, error) + // ToPbText marshals PatternFlowGtpv2Spare2 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2Spare2 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2Spare2 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2Spare2 struct { + obj *patternFlowGtpv2Spare2 +} + +type unMarshalPatternFlowGtpv2Spare2 interface { + // FromProto unmarshals PatternFlowGtpv2Spare2 from protobuf object *otg.PatternFlowGtpv2Spare2 + FromProto(msg *otg.PatternFlowGtpv2Spare2) (PatternFlowGtpv2Spare2, error) + // FromPbText unmarshals PatternFlowGtpv2Spare2 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2Spare2 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2Spare2 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2Spare2) Marshal() marshalPatternFlowGtpv2Spare2 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2Spare2{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2Spare2) Unmarshal() unMarshalPatternFlowGtpv2Spare2 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2Spare2{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2Spare2) ToProto() (*otg.PatternFlowGtpv2Spare2, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare2) FromProto(msg *otg.PatternFlowGtpv2Spare2) (PatternFlowGtpv2Spare2, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2Spare2) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare2) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2Spare2) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare2) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2Spare2) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare2) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2Spare2) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Spare2) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Spare2) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2Spare2) Clone() (PatternFlowGtpv2Spare2, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2Spare2() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv2Spare2) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv2Spare2 is reserved field +type PatternFlowGtpv2Spare2 interface { + Validation + // msg marshals PatternFlowGtpv2Spare2 to protobuf object *otg.PatternFlowGtpv2Spare2 + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2Spare2 + // setMsg unmarshals PatternFlowGtpv2Spare2 from protobuf object *otg.PatternFlowGtpv2Spare2 + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2Spare2) PatternFlowGtpv2Spare2 + // provides marshal interface + Marshal() marshalPatternFlowGtpv2Spare2 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2Spare2 + // validate validates PatternFlowGtpv2Spare2 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2Spare2, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv2Spare2ChoiceEnum, set in PatternFlowGtpv2Spare2 + Choice() PatternFlowGtpv2Spare2ChoiceEnum + // setChoice assigns PatternFlowGtpv2Spare2ChoiceEnum provided by user to PatternFlowGtpv2Spare2 + setChoice(value PatternFlowGtpv2Spare2ChoiceEnum) PatternFlowGtpv2Spare2 + // HasChoice checks if Choice has been set in PatternFlowGtpv2Spare2 + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv2Spare2. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv2Spare2 + SetValue(value uint32) PatternFlowGtpv2Spare2 + // HasValue checks if Value has been set in PatternFlowGtpv2Spare2 + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv2Spare2. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv2Spare2 + SetValues(value []uint32) PatternFlowGtpv2Spare2 + // Increment returns PatternFlowGtpv2Spare2Counter, set in PatternFlowGtpv2Spare2. + // PatternFlowGtpv2Spare2Counter is integer counter pattern + Increment() PatternFlowGtpv2Spare2Counter + // SetIncrement assigns PatternFlowGtpv2Spare2Counter provided by user to PatternFlowGtpv2Spare2. + // PatternFlowGtpv2Spare2Counter is integer counter pattern + SetIncrement(value PatternFlowGtpv2Spare2Counter) PatternFlowGtpv2Spare2 + // HasIncrement checks if Increment has been set in PatternFlowGtpv2Spare2 + HasIncrement() bool + // Decrement returns PatternFlowGtpv2Spare2Counter, set in PatternFlowGtpv2Spare2. + // PatternFlowGtpv2Spare2Counter is integer counter pattern + Decrement() PatternFlowGtpv2Spare2Counter + // SetDecrement assigns PatternFlowGtpv2Spare2Counter provided by user to PatternFlowGtpv2Spare2. + // PatternFlowGtpv2Spare2Counter is integer counter pattern + SetDecrement(value PatternFlowGtpv2Spare2Counter) PatternFlowGtpv2Spare2 + // HasDecrement checks if Decrement has been set in PatternFlowGtpv2Spare2 + HasDecrement() bool + // MetricTags returns PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIterIter, set in PatternFlowGtpv2Spare2 + MetricTags() PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter + setNil() +} + +type PatternFlowGtpv2Spare2ChoiceEnum string + +// Enum of Choice on PatternFlowGtpv2Spare2 +var PatternFlowGtpv2Spare2Choice = struct { + VALUE PatternFlowGtpv2Spare2ChoiceEnum + VALUES PatternFlowGtpv2Spare2ChoiceEnum + INCREMENT PatternFlowGtpv2Spare2ChoiceEnum + DECREMENT PatternFlowGtpv2Spare2ChoiceEnum +}{ + VALUE: PatternFlowGtpv2Spare2ChoiceEnum("value"), + VALUES: PatternFlowGtpv2Spare2ChoiceEnum("values"), + INCREMENT: PatternFlowGtpv2Spare2ChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv2Spare2ChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv2Spare2) Choice() PatternFlowGtpv2Spare2ChoiceEnum { + return PatternFlowGtpv2Spare2ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv2Spare2) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv2Spare2) setChoice(value PatternFlowGtpv2Spare2ChoiceEnum) PatternFlowGtpv2Spare2 { + intValue, ok := otg.PatternFlowGtpv2Spare2_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv2Spare2ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv2Spare2_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv2Spare2Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv2Spare2Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv2Spare2Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv2Spare2Counter().msg() + } + + if value == PatternFlowGtpv2Spare2Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv2Spare2Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2Spare2) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv2Spare2Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2Spare2) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv2Spare2 object +func (obj *patternFlowGtpv2Spare2) SetValue(value uint32) PatternFlowGtpv2Spare2 { + obj.setChoice(PatternFlowGtpv2Spare2Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv2Spare2) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv2Spare2 object +func (obj *patternFlowGtpv2Spare2) SetValues(value []uint32) PatternFlowGtpv2Spare2 { + obj.setChoice(PatternFlowGtpv2Spare2Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv2Spare2Counter +func (obj *patternFlowGtpv2Spare2) Increment() PatternFlowGtpv2Spare2Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv2Spare2Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv2Spare2Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv2Spare2Counter +func (obj *patternFlowGtpv2Spare2) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv2Spare2Counter value in the PatternFlowGtpv2Spare2 object +func (obj *patternFlowGtpv2Spare2) SetIncrement(value PatternFlowGtpv2Spare2Counter) PatternFlowGtpv2Spare2 { + obj.setChoice(PatternFlowGtpv2Spare2Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2Spare2Counter +func (obj *patternFlowGtpv2Spare2) Decrement() PatternFlowGtpv2Spare2Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv2Spare2Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv2Spare2Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2Spare2Counter +func (obj *patternFlowGtpv2Spare2) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv2Spare2Counter value in the PatternFlowGtpv2Spare2 object +func (obj *patternFlowGtpv2Spare2) SetDecrement(value PatternFlowGtpv2Spare2Counter) PatternFlowGtpv2Spare2 { + obj.setChoice(PatternFlowGtpv2Spare2Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv2Spare2MetricTag +func (obj *patternFlowGtpv2Spare2) MetricTags() PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv2Spare2MetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter struct { + obj *patternFlowGtpv2Spare2 + patternFlowGtpv2Spare2MetricTagSlice []PatternFlowGtpv2Spare2MetricTag + fieldPtr *[]*otg.PatternFlowGtpv2Spare2MetricTag +} + +func newPatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter(ptr *[]*otg.PatternFlowGtpv2Spare2MetricTag) PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter { + return &patternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter interface { + setMsg(*patternFlowGtpv2Spare2) PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter + Items() []PatternFlowGtpv2Spare2MetricTag + Add() PatternFlowGtpv2Spare2MetricTag + Append(items ...PatternFlowGtpv2Spare2MetricTag) PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter + Set(index int, newObj PatternFlowGtpv2Spare2MetricTag) PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter + Clear() PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter + clearHolderSlice() PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter + appendHolderSlice(item PatternFlowGtpv2Spare2MetricTag) PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter +} + +func (obj *patternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter) setMsg(msg *patternFlowGtpv2Spare2) PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv2Spare2MetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter) Items() []PatternFlowGtpv2Spare2MetricTag { + return obj.patternFlowGtpv2Spare2MetricTagSlice +} + +func (obj *patternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter) Add() PatternFlowGtpv2Spare2MetricTag { + newObj := &otg.PatternFlowGtpv2Spare2MetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv2Spare2MetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv2Spare2MetricTagSlice = append(obj.patternFlowGtpv2Spare2MetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter) Append(items ...PatternFlowGtpv2Spare2MetricTag) PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv2Spare2MetricTagSlice = append(obj.patternFlowGtpv2Spare2MetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter) Set(index int, newObj PatternFlowGtpv2Spare2MetricTag) PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv2Spare2MetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter) Clear() PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv2Spare2MetricTag{} + obj.patternFlowGtpv2Spare2MetricTagSlice = []PatternFlowGtpv2Spare2MetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter) clearHolderSlice() PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter { + if len(obj.patternFlowGtpv2Spare2MetricTagSlice) > 0 { + obj.patternFlowGtpv2Spare2MetricTagSlice = []PatternFlowGtpv2Spare2MetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter) appendHolderSlice(item PatternFlowGtpv2Spare2MetricTag) PatternFlowGtpv2Spare2PatternFlowGtpv2Spare2MetricTagIter { + obj.patternFlowGtpv2Spare2MetricTagSlice = append(obj.patternFlowGtpv2Spare2MetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv2Spare2) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2Spare2.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv2Spare2.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv2Spare2MetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv2Spare2) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv2Spare2ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv2Spare2Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv2Spare2Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv2Spare2Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv2Spare2Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv2Spare2Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv2Spare2") + } + } else { + intVal := otg.PatternFlowGtpv2Spare2_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv2Spare2_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_spare2_counter.go b/gosnappi/pattern_flow_gtpv2_spare2_counter.go new file mode 100644 index 00000000..a18754f4 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_spare2_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2Spare2Counter ***** +type patternFlowGtpv2Spare2Counter struct { + validation + obj *otg.PatternFlowGtpv2Spare2Counter + marshaller marshalPatternFlowGtpv2Spare2Counter + unMarshaller unMarshalPatternFlowGtpv2Spare2Counter +} + +func NewPatternFlowGtpv2Spare2Counter() PatternFlowGtpv2Spare2Counter { + obj := patternFlowGtpv2Spare2Counter{obj: &otg.PatternFlowGtpv2Spare2Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2Spare2Counter) msg() *otg.PatternFlowGtpv2Spare2Counter { + return obj.obj +} + +func (obj *patternFlowGtpv2Spare2Counter) setMsg(msg *otg.PatternFlowGtpv2Spare2Counter) PatternFlowGtpv2Spare2Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2Spare2Counter struct { + obj *patternFlowGtpv2Spare2Counter +} + +type marshalPatternFlowGtpv2Spare2Counter interface { + // ToProto marshals PatternFlowGtpv2Spare2Counter to protobuf object *otg.PatternFlowGtpv2Spare2Counter + ToProto() (*otg.PatternFlowGtpv2Spare2Counter, error) + // ToPbText marshals PatternFlowGtpv2Spare2Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2Spare2Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2Spare2Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2Spare2Counter struct { + obj *patternFlowGtpv2Spare2Counter +} + +type unMarshalPatternFlowGtpv2Spare2Counter interface { + // FromProto unmarshals PatternFlowGtpv2Spare2Counter from protobuf object *otg.PatternFlowGtpv2Spare2Counter + FromProto(msg *otg.PatternFlowGtpv2Spare2Counter) (PatternFlowGtpv2Spare2Counter, error) + // FromPbText unmarshals PatternFlowGtpv2Spare2Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2Spare2Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2Spare2Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2Spare2Counter) Marshal() marshalPatternFlowGtpv2Spare2Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2Spare2Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2Spare2Counter) Unmarshal() unMarshalPatternFlowGtpv2Spare2Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2Spare2Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2Spare2Counter) ToProto() (*otg.PatternFlowGtpv2Spare2Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare2Counter) FromProto(msg *otg.PatternFlowGtpv2Spare2Counter) (PatternFlowGtpv2Spare2Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2Spare2Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare2Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2Spare2Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare2Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2Spare2Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare2Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2Spare2Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Spare2Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Spare2Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2Spare2Counter) Clone() (PatternFlowGtpv2Spare2Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2Spare2Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2Spare2Counter is integer counter pattern +type PatternFlowGtpv2Spare2Counter interface { + Validation + // msg marshals PatternFlowGtpv2Spare2Counter to protobuf object *otg.PatternFlowGtpv2Spare2Counter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2Spare2Counter + // setMsg unmarshals PatternFlowGtpv2Spare2Counter from protobuf object *otg.PatternFlowGtpv2Spare2Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2Spare2Counter) PatternFlowGtpv2Spare2Counter + // provides marshal interface + Marshal() marshalPatternFlowGtpv2Spare2Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2Spare2Counter + // validate validates PatternFlowGtpv2Spare2Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2Spare2Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv2Spare2Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv2Spare2Counter + SetStart(value uint32) PatternFlowGtpv2Spare2Counter + // HasStart checks if Start has been set in PatternFlowGtpv2Spare2Counter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv2Spare2Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv2Spare2Counter + SetStep(value uint32) PatternFlowGtpv2Spare2Counter + // HasStep checks if Step has been set in PatternFlowGtpv2Spare2Counter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv2Spare2Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv2Spare2Counter + SetCount(value uint32) PatternFlowGtpv2Spare2Counter + // HasCount checks if Count has been set in PatternFlowGtpv2Spare2Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2Spare2Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2Spare2Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv2Spare2Counter object +func (obj *patternFlowGtpv2Spare2Counter) SetStart(value uint32) PatternFlowGtpv2Spare2Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2Spare2Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2Spare2Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv2Spare2Counter object +func (obj *patternFlowGtpv2Spare2Counter) SetStep(value uint32) PatternFlowGtpv2Spare2Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2Spare2Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2Spare2Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv2Spare2Counter object +func (obj *patternFlowGtpv2Spare2Counter) SetCount(value uint32) PatternFlowGtpv2Spare2Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv2Spare2Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2Spare2Counter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2Spare2Counter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2Spare2Counter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv2Spare2Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_spare2_metric_tag.go b/gosnappi/pattern_flow_gtpv2_spare2_metric_tag.go new file mode 100644 index 00000000..c0d487c8 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_spare2_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2Spare2MetricTag ***** +type patternFlowGtpv2Spare2MetricTag struct { + validation + obj *otg.PatternFlowGtpv2Spare2MetricTag + marshaller marshalPatternFlowGtpv2Spare2MetricTag + unMarshaller unMarshalPatternFlowGtpv2Spare2MetricTag +} + +func NewPatternFlowGtpv2Spare2MetricTag() PatternFlowGtpv2Spare2MetricTag { + obj := patternFlowGtpv2Spare2MetricTag{obj: &otg.PatternFlowGtpv2Spare2MetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2Spare2MetricTag) msg() *otg.PatternFlowGtpv2Spare2MetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv2Spare2MetricTag) setMsg(msg *otg.PatternFlowGtpv2Spare2MetricTag) PatternFlowGtpv2Spare2MetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2Spare2MetricTag struct { + obj *patternFlowGtpv2Spare2MetricTag +} + +type marshalPatternFlowGtpv2Spare2MetricTag interface { + // ToProto marshals PatternFlowGtpv2Spare2MetricTag to protobuf object *otg.PatternFlowGtpv2Spare2MetricTag + ToProto() (*otg.PatternFlowGtpv2Spare2MetricTag, error) + // ToPbText marshals PatternFlowGtpv2Spare2MetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2Spare2MetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2Spare2MetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2Spare2MetricTag struct { + obj *patternFlowGtpv2Spare2MetricTag +} + +type unMarshalPatternFlowGtpv2Spare2MetricTag interface { + // FromProto unmarshals PatternFlowGtpv2Spare2MetricTag from protobuf object *otg.PatternFlowGtpv2Spare2MetricTag + FromProto(msg *otg.PatternFlowGtpv2Spare2MetricTag) (PatternFlowGtpv2Spare2MetricTag, error) + // FromPbText unmarshals PatternFlowGtpv2Spare2MetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2Spare2MetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2Spare2MetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2Spare2MetricTag) Marshal() marshalPatternFlowGtpv2Spare2MetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2Spare2MetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2Spare2MetricTag) Unmarshal() unMarshalPatternFlowGtpv2Spare2MetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2Spare2MetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2Spare2MetricTag) ToProto() (*otg.PatternFlowGtpv2Spare2MetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare2MetricTag) FromProto(msg *otg.PatternFlowGtpv2Spare2MetricTag) (PatternFlowGtpv2Spare2MetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2Spare2MetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare2MetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2Spare2MetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare2MetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2Spare2MetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Spare2MetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2Spare2MetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Spare2MetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Spare2MetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2Spare2MetricTag) Clone() (PatternFlowGtpv2Spare2MetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2Spare2MetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2Spare2MetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv2Spare2MetricTag interface { + Validation + // msg marshals PatternFlowGtpv2Spare2MetricTag to protobuf object *otg.PatternFlowGtpv2Spare2MetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2Spare2MetricTag + // setMsg unmarshals PatternFlowGtpv2Spare2MetricTag from protobuf object *otg.PatternFlowGtpv2Spare2MetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2Spare2MetricTag) PatternFlowGtpv2Spare2MetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv2Spare2MetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2Spare2MetricTag + // validate validates PatternFlowGtpv2Spare2MetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2Spare2MetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv2Spare2MetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv2Spare2MetricTag + SetName(value string) PatternFlowGtpv2Spare2MetricTag + // Offset returns uint32, set in PatternFlowGtpv2Spare2MetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv2Spare2MetricTag + SetOffset(value uint32) PatternFlowGtpv2Spare2MetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv2Spare2MetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv2Spare2MetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv2Spare2MetricTag + SetLength(value uint32) PatternFlowGtpv2Spare2MetricTag + // HasLength checks if Length has been set in PatternFlowGtpv2Spare2MetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv2Spare2MetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv2Spare2MetricTag object +func (obj *patternFlowGtpv2Spare2MetricTag) SetName(value string) PatternFlowGtpv2Spare2MetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2Spare2MetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2Spare2MetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv2Spare2MetricTag object +func (obj *patternFlowGtpv2Spare2MetricTag) SetOffset(value uint32) PatternFlowGtpv2Spare2MetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2Spare2MetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2Spare2MetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv2Spare2MetricTag object +func (obj *patternFlowGtpv2Spare2MetricTag) SetLength(value uint32) PatternFlowGtpv2Spare2MetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv2Spare2MetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv2Spare2MetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2Spare2MetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv2Spare2MetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv2Spare2MetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_teid.go b/gosnappi/pattern_flow_gtpv2_teid.go new file mode 100644 index 00000000..99032d6b --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_teid.go @@ -0,0 +1,640 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2Teid ***** +type patternFlowGtpv2Teid struct { + validation + obj *otg.PatternFlowGtpv2Teid + marshaller marshalPatternFlowGtpv2Teid + unMarshaller unMarshalPatternFlowGtpv2Teid + incrementHolder PatternFlowGtpv2TeidCounter + decrementHolder PatternFlowGtpv2TeidCounter + metricTagsHolder PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter +} + +func NewPatternFlowGtpv2Teid() PatternFlowGtpv2Teid { + obj := patternFlowGtpv2Teid{obj: &otg.PatternFlowGtpv2Teid{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2Teid) msg() *otg.PatternFlowGtpv2Teid { + return obj.obj +} + +func (obj *patternFlowGtpv2Teid) setMsg(msg *otg.PatternFlowGtpv2Teid) PatternFlowGtpv2Teid { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2Teid struct { + obj *patternFlowGtpv2Teid +} + +type marshalPatternFlowGtpv2Teid interface { + // ToProto marshals PatternFlowGtpv2Teid to protobuf object *otg.PatternFlowGtpv2Teid + ToProto() (*otg.PatternFlowGtpv2Teid, error) + // ToPbText marshals PatternFlowGtpv2Teid to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2Teid to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2Teid to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2Teid struct { + obj *patternFlowGtpv2Teid +} + +type unMarshalPatternFlowGtpv2Teid interface { + // FromProto unmarshals PatternFlowGtpv2Teid from protobuf object *otg.PatternFlowGtpv2Teid + FromProto(msg *otg.PatternFlowGtpv2Teid) (PatternFlowGtpv2Teid, error) + // FromPbText unmarshals PatternFlowGtpv2Teid from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2Teid from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2Teid from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2Teid) Marshal() marshalPatternFlowGtpv2Teid { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2Teid{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2Teid) Unmarshal() unMarshalPatternFlowGtpv2Teid { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2Teid{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2Teid) ToProto() (*otg.PatternFlowGtpv2Teid, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2Teid) FromProto(msg *otg.PatternFlowGtpv2Teid) (PatternFlowGtpv2Teid, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2Teid) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2Teid) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2Teid) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Teid) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2Teid) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Teid) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2Teid) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Teid) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Teid) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2Teid) Clone() (PatternFlowGtpv2Teid, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2Teid() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv2Teid) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv2Teid is tunnel endpoint identifier. A 32-bit (4-octet) field used to multiplex different connections in the same GTP tunnel. Is present only if the teid_flag is set. +type PatternFlowGtpv2Teid interface { + Validation + // msg marshals PatternFlowGtpv2Teid to protobuf object *otg.PatternFlowGtpv2Teid + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2Teid + // setMsg unmarshals PatternFlowGtpv2Teid from protobuf object *otg.PatternFlowGtpv2Teid + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2Teid) PatternFlowGtpv2Teid + // provides marshal interface + Marshal() marshalPatternFlowGtpv2Teid + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2Teid + // validate validates PatternFlowGtpv2Teid + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2Teid, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv2TeidChoiceEnum, set in PatternFlowGtpv2Teid + Choice() PatternFlowGtpv2TeidChoiceEnum + // setChoice assigns PatternFlowGtpv2TeidChoiceEnum provided by user to PatternFlowGtpv2Teid + setChoice(value PatternFlowGtpv2TeidChoiceEnum) PatternFlowGtpv2Teid + // HasChoice checks if Choice has been set in PatternFlowGtpv2Teid + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv2Teid. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv2Teid + SetValue(value uint32) PatternFlowGtpv2Teid + // HasValue checks if Value has been set in PatternFlowGtpv2Teid + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv2Teid. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv2Teid + SetValues(value []uint32) PatternFlowGtpv2Teid + // Increment returns PatternFlowGtpv2TeidCounter, set in PatternFlowGtpv2Teid. + // PatternFlowGtpv2TeidCounter is integer counter pattern + Increment() PatternFlowGtpv2TeidCounter + // SetIncrement assigns PatternFlowGtpv2TeidCounter provided by user to PatternFlowGtpv2Teid. + // PatternFlowGtpv2TeidCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv2TeidCounter) PatternFlowGtpv2Teid + // HasIncrement checks if Increment has been set in PatternFlowGtpv2Teid + HasIncrement() bool + // Decrement returns PatternFlowGtpv2TeidCounter, set in PatternFlowGtpv2Teid. + // PatternFlowGtpv2TeidCounter is integer counter pattern + Decrement() PatternFlowGtpv2TeidCounter + // SetDecrement assigns PatternFlowGtpv2TeidCounter provided by user to PatternFlowGtpv2Teid. + // PatternFlowGtpv2TeidCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv2TeidCounter) PatternFlowGtpv2Teid + // HasDecrement checks if Decrement has been set in PatternFlowGtpv2Teid + HasDecrement() bool + // MetricTags returns PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIterIter, set in PatternFlowGtpv2Teid + MetricTags() PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter + setNil() +} + +type PatternFlowGtpv2TeidChoiceEnum string + +// Enum of Choice on PatternFlowGtpv2Teid +var PatternFlowGtpv2TeidChoice = struct { + VALUE PatternFlowGtpv2TeidChoiceEnum + VALUES PatternFlowGtpv2TeidChoiceEnum + INCREMENT PatternFlowGtpv2TeidChoiceEnum + DECREMENT PatternFlowGtpv2TeidChoiceEnum +}{ + VALUE: PatternFlowGtpv2TeidChoiceEnum("value"), + VALUES: PatternFlowGtpv2TeidChoiceEnum("values"), + INCREMENT: PatternFlowGtpv2TeidChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv2TeidChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv2Teid) Choice() PatternFlowGtpv2TeidChoiceEnum { + return PatternFlowGtpv2TeidChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv2Teid) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv2Teid) setChoice(value PatternFlowGtpv2TeidChoiceEnum) PatternFlowGtpv2Teid { + intValue, ok := otg.PatternFlowGtpv2Teid_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv2TeidChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv2Teid_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv2TeidChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv2TeidChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv2TeidChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv2TeidCounter().msg() + } + + if value == PatternFlowGtpv2TeidChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv2TeidCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2Teid) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv2TeidChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2Teid) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv2Teid object +func (obj *patternFlowGtpv2Teid) SetValue(value uint32) PatternFlowGtpv2Teid { + obj.setChoice(PatternFlowGtpv2TeidChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv2Teid) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv2Teid object +func (obj *patternFlowGtpv2Teid) SetValues(value []uint32) PatternFlowGtpv2Teid { + obj.setChoice(PatternFlowGtpv2TeidChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv2TeidCounter +func (obj *patternFlowGtpv2Teid) Increment() PatternFlowGtpv2TeidCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv2TeidChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv2TeidCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv2TeidCounter +func (obj *patternFlowGtpv2Teid) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv2TeidCounter value in the PatternFlowGtpv2Teid object +func (obj *patternFlowGtpv2Teid) SetIncrement(value PatternFlowGtpv2TeidCounter) PatternFlowGtpv2Teid { + obj.setChoice(PatternFlowGtpv2TeidChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2TeidCounter +func (obj *patternFlowGtpv2Teid) Decrement() PatternFlowGtpv2TeidCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv2TeidChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv2TeidCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2TeidCounter +func (obj *patternFlowGtpv2Teid) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv2TeidCounter value in the PatternFlowGtpv2Teid object +func (obj *patternFlowGtpv2Teid) SetDecrement(value PatternFlowGtpv2TeidCounter) PatternFlowGtpv2Teid { + obj.setChoice(PatternFlowGtpv2TeidChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv2TeidMetricTag +func (obj *patternFlowGtpv2Teid) MetricTags() PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv2TeidMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter struct { + obj *patternFlowGtpv2Teid + patternFlowGtpv2TeidMetricTagSlice []PatternFlowGtpv2TeidMetricTag + fieldPtr *[]*otg.PatternFlowGtpv2TeidMetricTag +} + +func newPatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter(ptr *[]*otg.PatternFlowGtpv2TeidMetricTag) PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter { + return &patternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter interface { + setMsg(*patternFlowGtpv2Teid) PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter + Items() []PatternFlowGtpv2TeidMetricTag + Add() PatternFlowGtpv2TeidMetricTag + Append(items ...PatternFlowGtpv2TeidMetricTag) PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter + Set(index int, newObj PatternFlowGtpv2TeidMetricTag) PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter + Clear() PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter + clearHolderSlice() PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter + appendHolderSlice(item PatternFlowGtpv2TeidMetricTag) PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter +} + +func (obj *patternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter) setMsg(msg *patternFlowGtpv2Teid) PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv2TeidMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter) Items() []PatternFlowGtpv2TeidMetricTag { + return obj.patternFlowGtpv2TeidMetricTagSlice +} + +func (obj *patternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter) Add() PatternFlowGtpv2TeidMetricTag { + newObj := &otg.PatternFlowGtpv2TeidMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv2TeidMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv2TeidMetricTagSlice = append(obj.patternFlowGtpv2TeidMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter) Append(items ...PatternFlowGtpv2TeidMetricTag) PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv2TeidMetricTagSlice = append(obj.patternFlowGtpv2TeidMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter) Set(index int, newObj PatternFlowGtpv2TeidMetricTag) PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv2TeidMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter) Clear() PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv2TeidMetricTag{} + obj.patternFlowGtpv2TeidMetricTagSlice = []PatternFlowGtpv2TeidMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter) clearHolderSlice() PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter { + if len(obj.patternFlowGtpv2TeidMetricTagSlice) > 0 { + obj.patternFlowGtpv2TeidMetricTagSlice = []PatternFlowGtpv2TeidMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter) appendHolderSlice(item PatternFlowGtpv2TeidMetricTag) PatternFlowGtpv2TeidPatternFlowGtpv2TeidMetricTagIter { + obj.patternFlowGtpv2TeidMetricTagSlice = append(obj.patternFlowGtpv2TeidMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv2Teid) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv2TeidMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv2Teid) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv2TeidChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv2TeidChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv2TeidChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv2TeidChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv2TeidChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv2TeidChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv2Teid") + } + } else { + intVal := otg.PatternFlowGtpv2Teid_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv2Teid_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_teid_counter.go b/gosnappi/pattern_flow_gtpv2_teid_counter.go new file mode 100644 index 00000000..66c71c8c --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_teid_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2TeidCounter ***** +type patternFlowGtpv2TeidCounter struct { + validation + obj *otg.PatternFlowGtpv2TeidCounter + marshaller marshalPatternFlowGtpv2TeidCounter + unMarshaller unMarshalPatternFlowGtpv2TeidCounter +} + +func NewPatternFlowGtpv2TeidCounter() PatternFlowGtpv2TeidCounter { + obj := patternFlowGtpv2TeidCounter{obj: &otg.PatternFlowGtpv2TeidCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2TeidCounter) msg() *otg.PatternFlowGtpv2TeidCounter { + return obj.obj +} + +func (obj *patternFlowGtpv2TeidCounter) setMsg(msg *otg.PatternFlowGtpv2TeidCounter) PatternFlowGtpv2TeidCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2TeidCounter struct { + obj *patternFlowGtpv2TeidCounter +} + +type marshalPatternFlowGtpv2TeidCounter interface { + // ToProto marshals PatternFlowGtpv2TeidCounter to protobuf object *otg.PatternFlowGtpv2TeidCounter + ToProto() (*otg.PatternFlowGtpv2TeidCounter, error) + // ToPbText marshals PatternFlowGtpv2TeidCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2TeidCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2TeidCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2TeidCounter struct { + obj *patternFlowGtpv2TeidCounter +} + +type unMarshalPatternFlowGtpv2TeidCounter interface { + // FromProto unmarshals PatternFlowGtpv2TeidCounter from protobuf object *otg.PatternFlowGtpv2TeidCounter + FromProto(msg *otg.PatternFlowGtpv2TeidCounter) (PatternFlowGtpv2TeidCounter, error) + // FromPbText unmarshals PatternFlowGtpv2TeidCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2TeidCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2TeidCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2TeidCounter) Marshal() marshalPatternFlowGtpv2TeidCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2TeidCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2TeidCounter) Unmarshal() unMarshalPatternFlowGtpv2TeidCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2TeidCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2TeidCounter) ToProto() (*otg.PatternFlowGtpv2TeidCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidCounter) FromProto(msg *otg.PatternFlowGtpv2TeidCounter) (PatternFlowGtpv2TeidCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2TeidCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2TeidCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2TeidCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2TeidCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2TeidCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2TeidCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2TeidCounter) Clone() (PatternFlowGtpv2TeidCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2TeidCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2TeidCounter is integer counter pattern +type PatternFlowGtpv2TeidCounter interface { + Validation + // msg marshals PatternFlowGtpv2TeidCounter to protobuf object *otg.PatternFlowGtpv2TeidCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2TeidCounter + // setMsg unmarshals PatternFlowGtpv2TeidCounter from protobuf object *otg.PatternFlowGtpv2TeidCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2TeidCounter) PatternFlowGtpv2TeidCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv2TeidCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2TeidCounter + // validate validates PatternFlowGtpv2TeidCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2TeidCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv2TeidCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv2TeidCounter + SetStart(value uint32) PatternFlowGtpv2TeidCounter + // HasStart checks if Start has been set in PatternFlowGtpv2TeidCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv2TeidCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv2TeidCounter + SetStep(value uint32) PatternFlowGtpv2TeidCounter + // HasStep checks if Step has been set in PatternFlowGtpv2TeidCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv2TeidCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv2TeidCounter + SetCount(value uint32) PatternFlowGtpv2TeidCounter + // HasCount checks if Count has been set in PatternFlowGtpv2TeidCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2TeidCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2TeidCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv2TeidCounter object +func (obj *patternFlowGtpv2TeidCounter) SetStart(value uint32) PatternFlowGtpv2TeidCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2TeidCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2TeidCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv2TeidCounter object +func (obj *patternFlowGtpv2TeidCounter) SetStep(value uint32) PatternFlowGtpv2TeidCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2TeidCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2TeidCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv2TeidCounter object +func (obj *patternFlowGtpv2TeidCounter) SetCount(value uint32) PatternFlowGtpv2TeidCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv2TeidCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowGtpv2TeidCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_teid_flag.go b/gosnappi/pattern_flow_gtpv2_teid_flag.go new file mode 100644 index 00000000..8393504d --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_teid_flag.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2TeidFlag ***** +type patternFlowGtpv2TeidFlag struct { + validation + obj *otg.PatternFlowGtpv2TeidFlag + marshaller marshalPatternFlowGtpv2TeidFlag + unMarshaller unMarshalPatternFlowGtpv2TeidFlag + incrementHolder PatternFlowGtpv2TeidFlagCounter + decrementHolder PatternFlowGtpv2TeidFlagCounter + metricTagsHolder PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter +} + +func NewPatternFlowGtpv2TeidFlag() PatternFlowGtpv2TeidFlag { + obj := patternFlowGtpv2TeidFlag{obj: &otg.PatternFlowGtpv2TeidFlag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2TeidFlag) msg() *otg.PatternFlowGtpv2TeidFlag { + return obj.obj +} + +func (obj *patternFlowGtpv2TeidFlag) setMsg(msg *otg.PatternFlowGtpv2TeidFlag) PatternFlowGtpv2TeidFlag { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2TeidFlag struct { + obj *patternFlowGtpv2TeidFlag +} + +type marshalPatternFlowGtpv2TeidFlag interface { + // ToProto marshals PatternFlowGtpv2TeidFlag to protobuf object *otg.PatternFlowGtpv2TeidFlag + ToProto() (*otg.PatternFlowGtpv2TeidFlag, error) + // ToPbText marshals PatternFlowGtpv2TeidFlag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2TeidFlag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2TeidFlag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2TeidFlag struct { + obj *patternFlowGtpv2TeidFlag +} + +type unMarshalPatternFlowGtpv2TeidFlag interface { + // FromProto unmarshals PatternFlowGtpv2TeidFlag from protobuf object *otg.PatternFlowGtpv2TeidFlag + FromProto(msg *otg.PatternFlowGtpv2TeidFlag) (PatternFlowGtpv2TeidFlag, error) + // FromPbText unmarshals PatternFlowGtpv2TeidFlag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2TeidFlag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2TeidFlag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2TeidFlag) Marshal() marshalPatternFlowGtpv2TeidFlag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2TeidFlag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2TeidFlag) Unmarshal() unMarshalPatternFlowGtpv2TeidFlag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2TeidFlag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2TeidFlag) ToProto() (*otg.PatternFlowGtpv2TeidFlag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidFlag) FromProto(msg *otg.PatternFlowGtpv2TeidFlag) (PatternFlowGtpv2TeidFlag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2TeidFlag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidFlag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2TeidFlag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidFlag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2TeidFlag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidFlag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2TeidFlag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2TeidFlag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2TeidFlag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2TeidFlag) Clone() (PatternFlowGtpv2TeidFlag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2TeidFlag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv2TeidFlag) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv2TeidFlag is if teid_flag is set to 1 then the TEID field will be present between the message length and the sequence number. All messages except Echo and Echo reply require TEID to be present +type PatternFlowGtpv2TeidFlag interface { + Validation + // msg marshals PatternFlowGtpv2TeidFlag to protobuf object *otg.PatternFlowGtpv2TeidFlag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2TeidFlag + // setMsg unmarshals PatternFlowGtpv2TeidFlag from protobuf object *otg.PatternFlowGtpv2TeidFlag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2TeidFlag) PatternFlowGtpv2TeidFlag + // provides marshal interface + Marshal() marshalPatternFlowGtpv2TeidFlag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2TeidFlag + // validate validates PatternFlowGtpv2TeidFlag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2TeidFlag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv2TeidFlagChoiceEnum, set in PatternFlowGtpv2TeidFlag + Choice() PatternFlowGtpv2TeidFlagChoiceEnum + // setChoice assigns PatternFlowGtpv2TeidFlagChoiceEnum provided by user to PatternFlowGtpv2TeidFlag + setChoice(value PatternFlowGtpv2TeidFlagChoiceEnum) PatternFlowGtpv2TeidFlag + // HasChoice checks if Choice has been set in PatternFlowGtpv2TeidFlag + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv2TeidFlag. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv2TeidFlag + SetValue(value uint32) PatternFlowGtpv2TeidFlag + // HasValue checks if Value has been set in PatternFlowGtpv2TeidFlag + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv2TeidFlag. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv2TeidFlag + SetValues(value []uint32) PatternFlowGtpv2TeidFlag + // Increment returns PatternFlowGtpv2TeidFlagCounter, set in PatternFlowGtpv2TeidFlag. + // PatternFlowGtpv2TeidFlagCounter is integer counter pattern + Increment() PatternFlowGtpv2TeidFlagCounter + // SetIncrement assigns PatternFlowGtpv2TeidFlagCounter provided by user to PatternFlowGtpv2TeidFlag. + // PatternFlowGtpv2TeidFlagCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv2TeidFlagCounter) PatternFlowGtpv2TeidFlag + // HasIncrement checks if Increment has been set in PatternFlowGtpv2TeidFlag + HasIncrement() bool + // Decrement returns PatternFlowGtpv2TeidFlagCounter, set in PatternFlowGtpv2TeidFlag. + // PatternFlowGtpv2TeidFlagCounter is integer counter pattern + Decrement() PatternFlowGtpv2TeidFlagCounter + // SetDecrement assigns PatternFlowGtpv2TeidFlagCounter provided by user to PatternFlowGtpv2TeidFlag. + // PatternFlowGtpv2TeidFlagCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv2TeidFlagCounter) PatternFlowGtpv2TeidFlag + // HasDecrement checks if Decrement has been set in PatternFlowGtpv2TeidFlag + HasDecrement() bool + // MetricTags returns PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIterIter, set in PatternFlowGtpv2TeidFlag + MetricTags() PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter + setNil() +} + +type PatternFlowGtpv2TeidFlagChoiceEnum string + +// Enum of Choice on PatternFlowGtpv2TeidFlag +var PatternFlowGtpv2TeidFlagChoice = struct { + VALUE PatternFlowGtpv2TeidFlagChoiceEnum + VALUES PatternFlowGtpv2TeidFlagChoiceEnum + INCREMENT PatternFlowGtpv2TeidFlagChoiceEnum + DECREMENT PatternFlowGtpv2TeidFlagChoiceEnum +}{ + VALUE: PatternFlowGtpv2TeidFlagChoiceEnum("value"), + VALUES: PatternFlowGtpv2TeidFlagChoiceEnum("values"), + INCREMENT: PatternFlowGtpv2TeidFlagChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv2TeidFlagChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv2TeidFlag) Choice() PatternFlowGtpv2TeidFlagChoiceEnum { + return PatternFlowGtpv2TeidFlagChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv2TeidFlag) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv2TeidFlag) setChoice(value PatternFlowGtpv2TeidFlagChoiceEnum) PatternFlowGtpv2TeidFlag { + intValue, ok := otg.PatternFlowGtpv2TeidFlag_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv2TeidFlagChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv2TeidFlag_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv2TeidFlagChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv2TeidFlagChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv2TeidFlagChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv2TeidFlagCounter().msg() + } + + if value == PatternFlowGtpv2TeidFlagChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv2TeidFlagCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2TeidFlag) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv2TeidFlagChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2TeidFlag) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv2TeidFlag object +func (obj *patternFlowGtpv2TeidFlag) SetValue(value uint32) PatternFlowGtpv2TeidFlag { + obj.setChoice(PatternFlowGtpv2TeidFlagChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv2TeidFlag) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv2TeidFlag object +func (obj *patternFlowGtpv2TeidFlag) SetValues(value []uint32) PatternFlowGtpv2TeidFlag { + obj.setChoice(PatternFlowGtpv2TeidFlagChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv2TeidFlagCounter +func (obj *patternFlowGtpv2TeidFlag) Increment() PatternFlowGtpv2TeidFlagCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv2TeidFlagChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv2TeidFlagCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv2TeidFlagCounter +func (obj *patternFlowGtpv2TeidFlag) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv2TeidFlagCounter value in the PatternFlowGtpv2TeidFlag object +func (obj *patternFlowGtpv2TeidFlag) SetIncrement(value PatternFlowGtpv2TeidFlagCounter) PatternFlowGtpv2TeidFlag { + obj.setChoice(PatternFlowGtpv2TeidFlagChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2TeidFlagCounter +func (obj *patternFlowGtpv2TeidFlag) Decrement() PatternFlowGtpv2TeidFlagCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv2TeidFlagChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv2TeidFlagCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2TeidFlagCounter +func (obj *patternFlowGtpv2TeidFlag) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv2TeidFlagCounter value in the PatternFlowGtpv2TeidFlag object +func (obj *patternFlowGtpv2TeidFlag) SetDecrement(value PatternFlowGtpv2TeidFlagCounter) PatternFlowGtpv2TeidFlag { + obj.setChoice(PatternFlowGtpv2TeidFlagChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv2TeidFlagMetricTag +func (obj *patternFlowGtpv2TeidFlag) MetricTags() PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv2TeidFlagMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter struct { + obj *patternFlowGtpv2TeidFlag + patternFlowGtpv2TeidFlagMetricTagSlice []PatternFlowGtpv2TeidFlagMetricTag + fieldPtr *[]*otg.PatternFlowGtpv2TeidFlagMetricTag +} + +func newPatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter(ptr *[]*otg.PatternFlowGtpv2TeidFlagMetricTag) PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter { + return &patternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter interface { + setMsg(*patternFlowGtpv2TeidFlag) PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter + Items() []PatternFlowGtpv2TeidFlagMetricTag + Add() PatternFlowGtpv2TeidFlagMetricTag + Append(items ...PatternFlowGtpv2TeidFlagMetricTag) PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter + Set(index int, newObj PatternFlowGtpv2TeidFlagMetricTag) PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter + Clear() PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter + clearHolderSlice() PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter + appendHolderSlice(item PatternFlowGtpv2TeidFlagMetricTag) PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter +} + +func (obj *patternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter) setMsg(msg *patternFlowGtpv2TeidFlag) PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv2TeidFlagMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter) Items() []PatternFlowGtpv2TeidFlagMetricTag { + return obj.patternFlowGtpv2TeidFlagMetricTagSlice +} + +func (obj *patternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter) Add() PatternFlowGtpv2TeidFlagMetricTag { + newObj := &otg.PatternFlowGtpv2TeidFlagMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv2TeidFlagMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv2TeidFlagMetricTagSlice = append(obj.patternFlowGtpv2TeidFlagMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter) Append(items ...PatternFlowGtpv2TeidFlagMetricTag) PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv2TeidFlagMetricTagSlice = append(obj.patternFlowGtpv2TeidFlagMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter) Set(index int, newObj PatternFlowGtpv2TeidFlagMetricTag) PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv2TeidFlagMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter) Clear() PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv2TeidFlagMetricTag{} + obj.patternFlowGtpv2TeidFlagMetricTagSlice = []PatternFlowGtpv2TeidFlagMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter) clearHolderSlice() PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter { + if len(obj.patternFlowGtpv2TeidFlagMetricTagSlice) > 0 { + obj.patternFlowGtpv2TeidFlagMetricTagSlice = []PatternFlowGtpv2TeidFlagMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter) appendHolderSlice(item PatternFlowGtpv2TeidFlagMetricTag) PatternFlowGtpv2TeidFlagPatternFlowGtpv2TeidFlagMetricTagIter { + obj.patternFlowGtpv2TeidFlagMetricTagSlice = append(obj.patternFlowGtpv2TeidFlagMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv2TeidFlag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2TeidFlag.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv2TeidFlag.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv2TeidFlagMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv2TeidFlag) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv2TeidFlagChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv2TeidFlagChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv2TeidFlagChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv2TeidFlagChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv2TeidFlagChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv2TeidFlagChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv2TeidFlag") + } + } else { + intVal := otg.PatternFlowGtpv2TeidFlag_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv2TeidFlag_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_teid_flag_counter.go b/gosnappi/pattern_flow_gtpv2_teid_flag_counter.go new file mode 100644 index 00000000..1e0e3a12 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_teid_flag_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2TeidFlagCounter ***** +type patternFlowGtpv2TeidFlagCounter struct { + validation + obj *otg.PatternFlowGtpv2TeidFlagCounter + marshaller marshalPatternFlowGtpv2TeidFlagCounter + unMarshaller unMarshalPatternFlowGtpv2TeidFlagCounter +} + +func NewPatternFlowGtpv2TeidFlagCounter() PatternFlowGtpv2TeidFlagCounter { + obj := patternFlowGtpv2TeidFlagCounter{obj: &otg.PatternFlowGtpv2TeidFlagCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2TeidFlagCounter) msg() *otg.PatternFlowGtpv2TeidFlagCounter { + return obj.obj +} + +func (obj *patternFlowGtpv2TeidFlagCounter) setMsg(msg *otg.PatternFlowGtpv2TeidFlagCounter) PatternFlowGtpv2TeidFlagCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2TeidFlagCounter struct { + obj *patternFlowGtpv2TeidFlagCounter +} + +type marshalPatternFlowGtpv2TeidFlagCounter interface { + // ToProto marshals PatternFlowGtpv2TeidFlagCounter to protobuf object *otg.PatternFlowGtpv2TeidFlagCounter + ToProto() (*otg.PatternFlowGtpv2TeidFlagCounter, error) + // ToPbText marshals PatternFlowGtpv2TeidFlagCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2TeidFlagCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2TeidFlagCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2TeidFlagCounter struct { + obj *patternFlowGtpv2TeidFlagCounter +} + +type unMarshalPatternFlowGtpv2TeidFlagCounter interface { + // FromProto unmarshals PatternFlowGtpv2TeidFlagCounter from protobuf object *otg.PatternFlowGtpv2TeidFlagCounter + FromProto(msg *otg.PatternFlowGtpv2TeidFlagCounter) (PatternFlowGtpv2TeidFlagCounter, error) + // FromPbText unmarshals PatternFlowGtpv2TeidFlagCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2TeidFlagCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2TeidFlagCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2TeidFlagCounter) Marshal() marshalPatternFlowGtpv2TeidFlagCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2TeidFlagCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2TeidFlagCounter) Unmarshal() unMarshalPatternFlowGtpv2TeidFlagCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2TeidFlagCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2TeidFlagCounter) ToProto() (*otg.PatternFlowGtpv2TeidFlagCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidFlagCounter) FromProto(msg *otg.PatternFlowGtpv2TeidFlagCounter) (PatternFlowGtpv2TeidFlagCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2TeidFlagCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidFlagCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2TeidFlagCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidFlagCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2TeidFlagCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidFlagCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2TeidFlagCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2TeidFlagCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2TeidFlagCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2TeidFlagCounter) Clone() (PatternFlowGtpv2TeidFlagCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2TeidFlagCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2TeidFlagCounter is integer counter pattern +type PatternFlowGtpv2TeidFlagCounter interface { + Validation + // msg marshals PatternFlowGtpv2TeidFlagCounter to protobuf object *otg.PatternFlowGtpv2TeidFlagCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2TeidFlagCounter + // setMsg unmarshals PatternFlowGtpv2TeidFlagCounter from protobuf object *otg.PatternFlowGtpv2TeidFlagCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2TeidFlagCounter) PatternFlowGtpv2TeidFlagCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv2TeidFlagCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2TeidFlagCounter + // validate validates PatternFlowGtpv2TeidFlagCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2TeidFlagCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv2TeidFlagCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv2TeidFlagCounter + SetStart(value uint32) PatternFlowGtpv2TeidFlagCounter + // HasStart checks if Start has been set in PatternFlowGtpv2TeidFlagCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv2TeidFlagCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv2TeidFlagCounter + SetStep(value uint32) PatternFlowGtpv2TeidFlagCounter + // HasStep checks if Step has been set in PatternFlowGtpv2TeidFlagCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv2TeidFlagCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv2TeidFlagCounter + SetCount(value uint32) PatternFlowGtpv2TeidFlagCounter + // HasCount checks if Count has been set in PatternFlowGtpv2TeidFlagCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2TeidFlagCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2TeidFlagCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv2TeidFlagCounter object +func (obj *patternFlowGtpv2TeidFlagCounter) SetStart(value uint32) PatternFlowGtpv2TeidFlagCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2TeidFlagCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2TeidFlagCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv2TeidFlagCounter object +func (obj *patternFlowGtpv2TeidFlagCounter) SetStep(value uint32) PatternFlowGtpv2TeidFlagCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2TeidFlagCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2TeidFlagCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv2TeidFlagCounter object +func (obj *patternFlowGtpv2TeidFlagCounter) SetCount(value uint32) PatternFlowGtpv2TeidFlagCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv2TeidFlagCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2TeidFlagCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2TeidFlagCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2TeidFlagCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv2TeidFlagCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_teid_flag_metric_tag.go b/gosnappi/pattern_flow_gtpv2_teid_flag_metric_tag.go new file mode 100644 index 00000000..82ce73ec --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_teid_flag_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2TeidFlagMetricTag ***** +type patternFlowGtpv2TeidFlagMetricTag struct { + validation + obj *otg.PatternFlowGtpv2TeidFlagMetricTag + marshaller marshalPatternFlowGtpv2TeidFlagMetricTag + unMarshaller unMarshalPatternFlowGtpv2TeidFlagMetricTag +} + +func NewPatternFlowGtpv2TeidFlagMetricTag() PatternFlowGtpv2TeidFlagMetricTag { + obj := patternFlowGtpv2TeidFlagMetricTag{obj: &otg.PatternFlowGtpv2TeidFlagMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2TeidFlagMetricTag) msg() *otg.PatternFlowGtpv2TeidFlagMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv2TeidFlagMetricTag) setMsg(msg *otg.PatternFlowGtpv2TeidFlagMetricTag) PatternFlowGtpv2TeidFlagMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2TeidFlagMetricTag struct { + obj *patternFlowGtpv2TeidFlagMetricTag +} + +type marshalPatternFlowGtpv2TeidFlagMetricTag interface { + // ToProto marshals PatternFlowGtpv2TeidFlagMetricTag to protobuf object *otg.PatternFlowGtpv2TeidFlagMetricTag + ToProto() (*otg.PatternFlowGtpv2TeidFlagMetricTag, error) + // ToPbText marshals PatternFlowGtpv2TeidFlagMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2TeidFlagMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2TeidFlagMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2TeidFlagMetricTag struct { + obj *patternFlowGtpv2TeidFlagMetricTag +} + +type unMarshalPatternFlowGtpv2TeidFlagMetricTag interface { + // FromProto unmarshals PatternFlowGtpv2TeidFlagMetricTag from protobuf object *otg.PatternFlowGtpv2TeidFlagMetricTag + FromProto(msg *otg.PatternFlowGtpv2TeidFlagMetricTag) (PatternFlowGtpv2TeidFlagMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv2TeidFlagMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2TeidFlagMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2TeidFlagMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2TeidFlagMetricTag) Marshal() marshalPatternFlowGtpv2TeidFlagMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2TeidFlagMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2TeidFlagMetricTag) Unmarshal() unMarshalPatternFlowGtpv2TeidFlagMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2TeidFlagMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2TeidFlagMetricTag) ToProto() (*otg.PatternFlowGtpv2TeidFlagMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidFlagMetricTag) FromProto(msg *otg.PatternFlowGtpv2TeidFlagMetricTag) (PatternFlowGtpv2TeidFlagMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2TeidFlagMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidFlagMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2TeidFlagMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidFlagMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2TeidFlagMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidFlagMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2TeidFlagMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2TeidFlagMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2TeidFlagMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2TeidFlagMetricTag) Clone() (PatternFlowGtpv2TeidFlagMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2TeidFlagMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2TeidFlagMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv2TeidFlagMetricTag interface { + Validation + // msg marshals PatternFlowGtpv2TeidFlagMetricTag to protobuf object *otg.PatternFlowGtpv2TeidFlagMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2TeidFlagMetricTag + // setMsg unmarshals PatternFlowGtpv2TeidFlagMetricTag from protobuf object *otg.PatternFlowGtpv2TeidFlagMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2TeidFlagMetricTag) PatternFlowGtpv2TeidFlagMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv2TeidFlagMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2TeidFlagMetricTag + // validate validates PatternFlowGtpv2TeidFlagMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2TeidFlagMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv2TeidFlagMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv2TeidFlagMetricTag + SetName(value string) PatternFlowGtpv2TeidFlagMetricTag + // Offset returns uint32, set in PatternFlowGtpv2TeidFlagMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv2TeidFlagMetricTag + SetOffset(value uint32) PatternFlowGtpv2TeidFlagMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv2TeidFlagMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv2TeidFlagMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv2TeidFlagMetricTag + SetLength(value uint32) PatternFlowGtpv2TeidFlagMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv2TeidFlagMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv2TeidFlagMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv2TeidFlagMetricTag object +func (obj *patternFlowGtpv2TeidFlagMetricTag) SetName(value string) PatternFlowGtpv2TeidFlagMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2TeidFlagMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2TeidFlagMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv2TeidFlagMetricTag object +func (obj *patternFlowGtpv2TeidFlagMetricTag) SetOffset(value uint32) PatternFlowGtpv2TeidFlagMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2TeidFlagMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2TeidFlagMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv2TeidFlagMetricTag object +func (obj *patternFlowGtpv2TeidFlagMetricTag) SetLength(value uint32) PatternFlowGtpv2TeidFlagMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv2TeidFlagMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv2TeidFlagMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2TeidFlagMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv2TeidFlagMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv2TeidFlagMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_teid_metric_tag.go b/gosnappi/pattern_flow_gtpv2_teid_metric_tag.go new file mode 100644 index 00000000..bf86a694 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_teid_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2TeidMetricTag ***** +type patternFlowGtpv2TeidMetricTag struct { + validation + obj *otg.PatternFlowGtpv2TeidMetricTag + marshaller marshalPatternFlowGtpv2TeidMetricTag + unMarshaller unMarshalPatternFlowGtpv2TeidMetricTag +} + +func NewPatternFlowGtpv2TeidMetricTag() PatternFlowGtpv2TeidMetricTag { + obj := patternFlowGtpv2TeidMetricTag{obj: &otg.PatternFlowGtpv2TeidMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2TeidMetricTag) msg() *otg.PatternFlowGtpv2TeidMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv2TeidMetricTag) setMsg(msg *otg.PatternFlowGtpv2TeidMetricTag) PatternFlowGtpv2TeidMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2TeidMetricTag struct { + obj *patternFlowGtpv2TeidMetricTag +} + +type marshalPatternFlowGtpv2TeidMetricTag interface { + // ToProto marshals PatternFlowGtpv2TeidMetricTag to protobuf object *otg.PatternFlowGtpv2TeidMetricTag + ToProto() (*otg.PatternFlowGtpv2TeidMetricTag, error) + // ToPbText marshals PatternFlowGtpv2TeidMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2TeidMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2TeidMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2TeidMetricTag struct { + obj *patternFlowGtpv2TeidMetricTag +} + +type unMarshalPatternFlowGtpv2TeidMetricTag interface { + // FromProto unmarshals PatternFlowGtpv2TeidMetricTag from protobuf object *otg.PatternFlowGtpv2TeidMetricTag + FromProto(msg *otg.PatternFlowGtpv2TeidMetricTag) (PatternFlowGtpv2TeidMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv2TeidMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2TeidMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2TeidMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2TeidMetricTag) Marshal() marshalPatternFlowGtpv2TeidMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2TeidMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2TeidMetricTag) Unmarshal() unMarshalPatternFlowGtpv2TeidMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2TeidMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2TeidMetricTag) ToProto() (*otg.PatternFlowGtpv2TeidMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidMetricTag) FromProto(msg *otg.PatternFlowGtpv2TeidMetricTag) (PatternFlowGtpv2TeidMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2TeidMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2TeidMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2TeidMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2TeidMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2TeidMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2TeidMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2TeidMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2TeidMetricTag) Clone() (PatternFlowGtpv2TeidMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2TeidMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2TeidMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv2TeidMetricTag interface { + Validation + // msg marshals PatternFlowGtpv2TeidMetricTag to protobuf object *otg.PatternFlowGtpv2TeidMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2TeidMetricTag + // setMsg unmarshals PatternFlowGtpv2TeidMetricTag from protobuf object *otg.PatternFlowGtpv2TeidMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2TeidMetricTag) PatternFlowGtpv2TeidMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv2TeidMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2TeidMetricTag + // validate validates PatternFlowGtpv2TeidMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2TeidMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv2TeidMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv2TeidMetricTag + SetName(value string) PatternFlowGtpv2TeidMetricTag + // Offset returns uint32, set in PatternFlowGtpv2TeidMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv2TeidMetricTag + SetOffset(value uint32) PatternFlowGtpv2TeidMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv2TeidMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv2TeidMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv2TeidMetricTag + SetLength(value uint32) PatternFlowGtpv2TeidMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv2TeidMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv2TeidMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv2TeidMetricTag object +func (obj *patternFlowGtpv2TeidMetricTag) SetName(value string) PatternFlowGtpv2TeidMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2TeidMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2TeidMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv2TeidMetricTag object +func (obj *patternFlowGtpv2TeidMetricTag) SetOffset(value uint32) PatternFlowGtpv2TeidMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2TeidMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2TeidMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv2TeidMetricTag object +func (obj *patternFlowGtpv2TeidMetricTag) SetLength(value uint32) PatternFlowGtpv2TeidMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv2TeidMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv2TeidMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2TeidMetricTag.Offset <= 31 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv2TeidMetricTag.Length <= 32 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv2TeidMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(32) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_version.go b/gosnappi/pattern_flow_gtpv2_version.go new file mode 100644 index 00000000..3f1ff4d9 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_version.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2Version ***** +type patternFlowGtpv2Version struct { + validation + obj *otg.PatternFlowGtpv2Version + marshaller marshalPatternFlowGtpv2Version + unMarshaller unMarshalPatternFlowGtpv2Version + incrementHolder PatternFlowGtpv2VersionCounter + decrementHolder PatternFlowGtpv2VersionCounter + metricTagsHolder PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter +} + +func NewPatternFlowGtpv2Version() PatternFlowGtpv2Version { + obj := patternFlowGtpv2Version{obj: &otg.PatternFlowGtpv2Version{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2Version) msg() *otg.PatternFlowGtpv2Version { + return obj.obj +} + +func (obj *patternFlowGtpv2Version) setMsg(msg *otg.PatternFlowGtpv2Version) PatternFlowGtpv2Version { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2Version struct { + obj *patternFlowGtpv2Version +} + +type marshalPatternFlowGtpv2Version interface { + // ToProto marshals PatternFlowGtpv2Version to protobuf object *otg.PatternFlowGtpv2Version + ToProto() (*otg.PatternFlowGtpv2Version, error) + // ToPbText marshals PatternFlowGtpv2Version to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2Version to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2Version to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2Version struct { + obj *patternFlowGtpv2Version +} + +type unMarshalPatternFlowGtpv2Version interface { + // FromProto unmarshals PatternFlowGtpv2Version from protobuf object *otg.PatternFlowGtpv2Version + FromProto(msg *otg.PatternFlowGtpv2Version) (PatternFlowGtpv2Version, error) + // FromPbText unmarshals PatternFlowGtpv2Version from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2Version from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2Version from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2Version) Marshal() marshalPatternFlowGtpv2Version { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2Version{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2Version) Unmarshal() unMarshalPatternFlowGtpv2Version { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2Version{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2Version) ToProto() (*otg.PatternFlowGtpv2Version, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2Version) FromProto(msg *otg.PatternFlowGtpv2Version) (PatternFlowGtpv2Version, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2Version) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2Version) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2Version) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Version) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2Version) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2Version) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2Version) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Version) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2Version) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2Version) Clone() (PatternFlowGtpv2Version, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2Version() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowGtpv2Version) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowGtpv2Version is version number +type PatternFlowGtpv2Version interface { + Validation + // msg marshals PatternFlowGtpv2Version to protobuf object *otg.PatternFlowGtpv2Version + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2Version + // setMsg unmarshals PatternFlowGtpv2Version from protobuf object *otg.PatternFlowGtpv2Version + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2Version) PatternFlowGtpv2Version + // provides marshal interface + Marshal() marshalPatternFlowGtpv2Version + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2Version + // validate validates PatternFlowGtpv2Version + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2Version, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowGtpv2VersionChoiceEnum, set in PatternFlowGtpv2Version + Choice() PatternFlowGtpv2VersionChoiceEnum + // setChoice assigns PatternFlowGtpv2VersionChoiceEnum provided by user to PatternFlowGtpv2Version + setChoice(value PatternFlowGtpv2VersionChoiceEnum) PatternFlowGtpv2Version + // HasChoice checks if Choice has been set in PatternFlowGtpv2Version + HasChoice() bool + // Value returns uint32, set in PatternFlowGtpv2Version. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowGtpv2Version + SetValue(value uint32) PatternFlowGtpv2Version + // HasValue checks if Value has been set in PatternFlowGtpv2Version + HasValue() bool + // Values returns []uint32, set in PatternFlowGtpv2Version. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowGtpv2Version + SetValues(value []uint32) PatternFlowGtpv2Version + // Increment returns PatternFlowGtpv2VersionCounter, set in PatternFlowGtpv2Version. + // PatternFlowGtpv2VersionCounter is integer counter pattern + Increment() PatternFlowGtpv2VersionCounter + // SetIncrement assigns PatternFlowGtpv2VersionCounter provided by user to PatternFlowGtpv2Version. + // PatternFlowGtpv2VersionCounter is integer counter pattern + SetIncrement(value PatternFlowGtpv2VersionCounter) PatternFlowGtpv2Version + // HasIncrement checks if Increment has been set in PatternFlowGtpv2Version + HasIncrement() bool + // Decrement returns PatternFlowGtpv2VersionCounter, set in PatternFlowGtpv2Version. + // PatternFlowGtpv2VersionCounter is integer counter pattern + Decrement() PatternFlowGtpv2VersionCounter + // SetDecrement assigns PatternFlowGtpv2VersionCounter provided by user to PatternFlowGtpv2Version. + // PatternFlowGtpv2VersionCounter is integer counter pattern + SetDecrement(value PatternFlowGtpv2VersionCounter) PatternFlowGtpv2Version + // HasDecrement checks if Decrement has been set in PatternFlowGtpv2Version + HasDecrement() bool + // MetricTags returns PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIterIter, set in PatternFlowGtpv2Version + MetricTags() PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter + setNil() +} + +type PatternFlowGtpv2VersionChoiceEnum string + +// Enum of Choice on PatternFlowGtpv2Version +var PatternFlowGtpv2VersionChoice = struct { + VALUE PatternFlowGtpv2VersionChoiceEnum + VALUES PatternFlowGtpv2VersionChoiceEnum + INCREMENT PatternFlowGtpv2VersionChoiceEnum + DECREMENT PatternFlowGtpv2VersionChoiceEnum +}{ + VALUE: PatternFlowGtpv2VersionChoiceEnum("value"), + VALUES: PatternFlowGtpv2VersionChoiceEnum("values"), + INCREMENT: PatternFlowGtpv2VersionChoiceEnum("increment"), + DECREMENT: PatternFlowGtpv2VersionChoiceEnum("decrement"), +} + +func (obj *patternFlowGtpv2Version) Choice() PatternFlowGtpv2VersionChoiceEnum { + return PatternFlowGtpv2VersionChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowGtpv2Version) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowGtpv2Version) setChoice(value PatternFlowGtpv2VersionChoiceEnum) PatternFlowGtpv2Version { + intValue, ok := otg.PatternFlowGtpv2Version_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowGtpv2VersionChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowGtpv2Version_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowGtpv2VersionChoice.VALUE { + defaultValue := uint32(2) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowGtpv2VersionChoice.VALUES { + defaultValue := []uint32{2} + obj.obj.Values = defaultValue + } + + if value == PatternFlowGtpv2VersionChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowGtpv2VersionCounter().msg() + } + + if value == PatternFlowGtpv2VersionChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowGtpv2VersionCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2Version) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowGtpv2VersionChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowGtpv2Version) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowGtpv2Version object +func (obj *patternFlowGtpv2Version) SetValue(value uint32) PatternFlowGtpv2Version { + obj.setChoice(PatternFlowGtpv2VersionChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowGtpv2Version) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{2}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowGtpv2Version object +func (obj *patternFlowGtpv2Version) SetValues(value []uint32) PatternFlowGtpv2Version { + obj.setChoice(PatternFlowGtpv2VersionChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowGtpv2VersionCounter +func (obj *patternFlowGtpv2Version) Increment() PatternFlowGtpv2VersionCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowGtpv2VersionChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowGtpv2VersionCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowGtpv2VersionCounter +func (obj *patternFlowGtpv2Version) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowGtpv2VersionCounter value in the PatternFlowGtpv2Version object +func (obj *patternFlowGtpv2Version) SetIncrement(value PatternFlowGtpv2VersionCounter) PatternFlowGtpv2Version { + obj.setChoice(PatternFlowGtpv2VersionChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2VersionCounter +func (obj *patternFlowGtpv2Version) Decrement() PatternFlowGtpv2VersionCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowGtpv2VersionChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowGtpv2VersionCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowGtpv2VersionCounter +func (obj *patternFlowGtpv2Version) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowGtpv2VersionCounter value in the PatternFlowGtpv2Version object +func (obj *patternFlowGtpv2Version) SetDecrement(value PatternFlowGtpv2VersionCounter) PatternFlowGtpv2Version { + obj.setChoice(PatternFlowGtpv2VersionChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowGtpv2VersionMetricTag +func (obj *patternFlowGtpv2Version) MetricTags() PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowGtpv2VersionMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter struct { + obj *patternFlowGtpv2Version + patternFlowGtpv2VersionMetricTagSlice []PatternFlowGtpv2VersionMetricTag + fieldPtr *[]*otg.PatternFlowGtpv2VersionMetricTag +} + +func newPatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter(ptr *[]*otg.PatternFlowGtpv2VersionMetricTag) PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter { + return &patternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter interface { + setMsg(*patternFlowGtpv2Version) PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter + Items() []PatternFlowGtpv2VersionMetricTag + Add() PatternFlowGtpv2VersionMetricTag + Append(items ...PatternFlowGtpv2VersionMetricTag) PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter + Set(index int, newObj PatternFlowGtpv2VersionMetricTag) PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter + Clear() PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter + clearHolderSlice() PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter + appendHolderSlice(item PatternFlowGtpv2VersionMetricTag) PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter +} + +func (obj *patternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter) setMsg(msg *patternFlowGtpv2Version) PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowGtpv2VersionMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter) Items() []PatternFlowGtpv2VersionMetricTag { + return obj.patternFlowGtpv2VersionMetricTagSlice +} + +func (obj *patternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter) Add() PatternFlowGtpv2VersionMetricTag { + newObj := &otg.PatternFlowGtpv2VersionMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowGtpv2VersionMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowGtpv2VersionMetricTagSlice = append(obj.patternFlowGtpv2VersionMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter) Append(items ...PatternFlowGtpv2VersionMetricTag) PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowGtpv2VersionMetricTagSlice = append(obj.patternFlowGtpv2VersionMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter) Set(index int, newObj PatternFlowGtpv2VersionMetricTag) PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowGtpv2VersionMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter) Clear() PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowGtpv2VersionMetricTag{} + obj.patternFlowGtpv2VersionMetricTagSlice = []PatternFlowGtpv2VersionMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter) clearHolderSlice() PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter { + if len(obj.patternFlowGtpv2VersionMetricTagSlice) > 0 { + obj.patternFlowGtpv2VersionMetricTagSlice = []PatternFlowGtpv2VersionMetricTag{} + } + return obj +} +func (obj *patternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter) appendHolderSlice(item PatternFlowGtpv2VersionMetricTag) PatternFlowGtpv2VersionPatternFlowGtpv2VersionMetricTagIter { + obj.patternFlowGtpv2VersionMetricTagSlice = append(obj.patternFlowGtpv2VersionMetricTagSlice, item) + return obj +} + +func (obj *patternFlowGtpv2Version) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2Version.Value <= 7 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowGtpv2Version.Values <= 7 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowGtpv2VersionMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowGtpv2Version) setDefault() { + var choices_set int = 0 + var choice PatternFlowGtpv2VersionChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowGtpv2VersionChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowGtpv2VersionChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowGtpv2VersionChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowGtpv2VersionChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowGtpv2VersionChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowGtpv2Version") + } + } else { + intVal := otg.PatternFlowGtpv2Version_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowGtpv2Version_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_version_counter.go b/gosnappi/pattern_flow_gtpv2_version_counter.go new file mode 100644 index 00000000..05a7bd43 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_version_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2VersionCounter ***** +type patternFlowGtpv2VersionCounter struct { + validation + obj *otg.PatternFlowGtpv2VersionCounter + marshaller marshalPatternFlowGtpv2VersionCounter + unMarshaller unMarshalPatternFlowGtpv2VersionCounter +} + +func NewPatternFlowGtpv2VersionCounter() PatternFlowGtpv2VersionCounter { + obj := patternFlowGtpv2VersionCounter{obj: &otg.PatternFlowGtpv2VersionCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2VersionCounter) msg() *otg.PatternFlowGtpv2VersionCounter { + return obj.obj +} + +func (obj *patternFlowGtpv2VersionCounter) setMsg(msg *otg.PatternFlowGtpv2VersionCounter) PatternFlowGtpv2VersionCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2VersionCounter struct { + obj *patternFlowGtpv2VersionCounter +} + +type marshalPatternFlowGtpv2VersionCounter interface { + // ToProto marshals PatternFlowGtpv2VersionCounter to protobuf object *otg.PatternFlowGtpv2VersionCounter + ToProto() (*otg.PatternFlowGtpv2VersionCounter, error) + // ToPbText marshals PatternFlowGtpv2VersionCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2VersionCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2VersionCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2VersionCounter struct { + obj *patternFlowGtpv2VersionCounter +} + +type unMarshalPatternFlowGtpv2VersionCounter interface { + // FromProto unmarshals PatternFlowGtpv2VersionCounter from protobuf object *otg.PatternFlowGtpv2VersionCounter + FromProto(msg *otg.PatternFlowGtpv2VersionCounter) (PatternFlowGtpv2VersionCounter, error) + // FromPbText unmarshals PatternFlowGtpv2VersionCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2VersionCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2VersionCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2VersionCounter) Marshal() marshalPatternFlowGtpv2VersionCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2VersionCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2VersionCounter) Unmarshal() unMarshalPatternFlowGtpv2VersionCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2VersionCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2VersionCounter) ToProto() (*otg.PatternFlowGtpv2VersionCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2VersionCounter) FromProto(msg *otg.PatternFlowGtpv2VersionCounter) (PatternFlowGtpv2VersionCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2VersionCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2VersionCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2VersionCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2VersionCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2VersionCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2VersionCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2VersionCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2VersionCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2VersionCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2VersionCounter) Clone() (PatternFlowGtpv2VersionCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2VersionCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2VersionCounter is integer counter pattern +type PatternFlowGtpv2VersionCounter interface { + Validation + // msg marshals PatternFlowGtpv2VersionCounter to protobuf object *otg.PatternFlowGtpv2VersionCounter + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2VersionCounter + // setMsg unmarshals PatternFlowGtpv2VersionCounter from protobuf object *otg.PatternFlowGtpv2VersionCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2VersionCounter) PatternFlowGtpv2VersionCounter + // provides marshal interface + Marshal() marshalPatternFlowGtpv2VersionCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2VersionCounter + // validate validates PatternFlowGtpv2VersionCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2VersionCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowGtpv2VersionCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowGtpv2VersionCounter + SetStart(value uint32) PatternFlowGtpv2VersionCounter + // HasStart checks if Start has been set in PatternFlowGtpv2VersionCounter + HasStart() bool + // Step returns uint32, set in PatternFlowGtpv2VersionCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowGtpv2VersionCounter + SetStep(value uint32) PatternFlowGtpv2VersionCounter + // HasStep checks if Step has been set in PatternFlowGtpv2VersionCounter + HasStep() bool + // Count returns uint32, set in PatternFlowGtpv2VersionCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowGtpv2VersionCounter + SetCount(value uint32) PatternFlowGtpv2VersionCounter + // HasCount checks if Count has been set in PatternFlowGtpv2VersionCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2VersionCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowGtpv2VersionCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowGtpv2VersionCounter object +func (obj *patternFlowGtpv2VersionCounter) SetStart(value uint32) PatternFlowGtpv2VersionCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2VersionCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowGtpv2VersionCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowGtpv2VersionCounter object +func (obj *patternFlowGtpv2VersionCounter) SetStep(value uint32) PatternFlowGtpv2VersionCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2VersionCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowGtpv2VersionCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowGtpv2VersionCounter object +func (obj *patternFlowGtpv2VersionCounter) SetCount(value uint32) PatternFlowGtpv2VersionCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowGtpv2VersionCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2VersionCounter.Start <= 7 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2VersionCounter.Step <= 7 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2VersionCounter.Count <= 7 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowGtpv2VersionCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(2) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_gtpv2_version_metric_tag.go b/gosnappi/pattern_flow_gtpv2_version_metric_tag.go new file mode 100644 index 00000000..d8a20973 --- /dev/null +++ b/gosnappi/pattern_flow_gtpv2_version_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowGtpv2VersionMetricTag ***** +type patternFlowGtpv2VersionMetricTag struct { + validation + obj *otg.PatternFlowGtpv2VersionMetricTag + marshaller marshalPatternFlowGtpv2VersionMetricTag + unMarshaller unMarshalPatternFlowGtpv2VersionMetricTag +} + +func NewPatternFlowGtpv2VersionMetricTag() PatternFlowGtpv2VersionMetricTag { + obj := patternFlowGtpv2VersionMetricTag{obj: &otg.PatternFlowGtpv2VersionMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowGtpv2VersionMetricTag) msg() *otg.PatternFlowGtpv2VersionMetricTag { + return obj.obj +} + +func (obj *patternFlowGtpv2VersionMetricTag) setMsg(msg *otg.PatternFlowGtpv2VersionMetricTag) PatternFlowGtpv2VersionMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowGtpv2VersionMetricTag struct { + obj *patternFlowGtpv2VersionMetricTag +} + +type marshalPatternFlowGtpv2VersionMetricTag interface { + // ToProto marshals PatternFlowGtpv2VersionMetricTag to protobuf object *otg.PatternFlowGtpv2VersionMetricTag + ToProto() (*otg.PatternFlowGtpv2VersionMetricTag, error) + // ToPbText marshals PatternFlowGtpv2VersionMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowGtpv2VersionMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowGtpv2VersionMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowGtpv2VersionMetricTag struct { + obj *patternFlowGtpv2VersionMetricTag +} + +type unMarshalPatternFlowGtpv2VersionMetricTag interface { + // FromProto unmarshals PatternFlowGtpv2VersionMetricTag from protobuf object *otg.PatternFlowGtpv2VersionMetricTag + FromProto(msg *otg.PatternFlowGtpv2VersionMetricTag) (PatternFlowGtpv2VersionMetricTag, error) + // FromPbText unmarshals PatternFlowGtpv2VersionMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowGtpv2VersionMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowGtpv2VersionMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowGtpv2VersionMetricTag) Marshal() marshalPatternFlowGtpv2VersionMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowGtpv2VersionMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowGtpv2VersionMetricTag) Unmarshal() unMarshalPatternFlowGtpv2VersionMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowGtpv2VersionMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowGtpv2VersionMetricTag) ToProto() (*otg.PatternFlowGtpv2VersionMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowGtpv2VersionMetricTag) FromProto(msg *otg.PatternFlowGtpv2VersionMetricTag) (PatternFlowGtpv2VersionMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowGtpv2VersionMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowGtpv2VersionMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowGtpv2VersionMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2VersionMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowGtpv2VersionMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowGtpv2VersionMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowGtpv2VersionMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2VersionMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowGtpv2VersionMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowGtpv2VersionMetricTag) Clone() (PatternFlowGtpv2VersionMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowGtpv2VersionMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowGtpv2VersionMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowGtpv2VersionMetricTag interface { + Validation + // msg marshals PatternFlowGtpv2VersionMetricTag to protobuf object *otg.PatternFlowGtpv2VersionMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowGtpv2VersionMetricTag + // setMsg unmarshals PatternFlowGtpv2VersionMetricTag from protobuf object *otg.PatternFlowGtpv2VersionMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowGtpv2VersionMetricTag) PatternFlowGtpv2VersionMetricTag + // provides marshal interface + Marshal() marshalPatternFlowGtpv2VersionMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowGtpv2VersionMetricTag + // validate validates PatternFlowGtpv2VersionMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowGtpv2VersionMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowGtpv2VersionMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowGtpv2VersionMetricTag + SetName(value string) PatternFlowGtpv2VersionMetricTag + // Offset returns uint32, set in PatternFlowGtpv2VersionMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowGtpv2VersionMetricTag + SetOffset(value uint32) PatternFlowGtpv2VersionMetricTag + // HasOffset checks if Offset has been set in PatternFlowGtpv2VersionMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowGtpv2VersionMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowGtpv2VersionMetricTag + SetLength(value uint32) PatternFlowGtpv2VersionMetricTag + // HasLength checks if Length has been set in PatternFlowGtpv2VersionMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowGtpv2VersionMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowGtpv2VersionMetricTag object +func (obj *patternFlowGtpv2VersionMetricTag) SetName(value string) PatternFlowGtpv2VersionMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2VersionMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowGtpv2VersionMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowGtpv2VersionMetricTag object +func (obj *patternFlowGtpv2VersionMetricTag) SetOffset(value uint32) PatternFlowGtpv2VersionMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2VersionMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowGtpv2VersionMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowGtpv2VersionMetricTag object +func (obj *patternFlowGtpv2VersionMetricTag) SetLength(value uint32) PatternFlowGtpv2VersionMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowGtpv2VersionMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowGtpv2VersionMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 2 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowGtpv2VersionMetricTag.Offset <= 2 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowGtpv2VersionMetricTag.Length <= 3 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowGtpv2VersionMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(3) + } + +} diff --git a/gosnappi/pattern_flow_icmp_echo_checksum.go b/gosnappi/pattern_flow_icmp_echo_checksum.go new file mode 100644 index 00000000..a7915be9 --- /dev/null +++ b/gosnappi/pattern_flow_icmp_echo_checksum.go @@ -0,0 +1,434 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpEchoChecksum ***** +type patternFlowIcmpEchoChecksum struct { + validation + obj *otg.PatternFlowIcmpEchoChecksum + marshaller marshalPatternFlowIcmpEchoChecksum + unMarshaller unMarshalPatternFlowIcmpEchoChecksum +} + +func NewPatternFlowIcmpEchoChecksum() PatternFlowIcmpEchoChecksum { + obj := patternFlowIcmpEchoChecksum{obj: &otg.PatternFlowIcmpEchoChecksum{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpEchoChecksum) msg() *otg.PatternFlowIcmpEchoChecksum { + return obj.obj +} + +func (obj *patternFlowIcmpEchoChecksum) setMsg(msg *otg.PatternFlowIcmpEchoChecksum) PatternFlowIcmpEchoChecksum { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpEchoChecksum struct { + obj *patternFlowIcmpEchoChecksum +} + +type marshalPatternFlowIcmpEchoChecksum interface { + // ToProto marshals PatternFlowIcmpEchoChecksum to protobuf object *otg.PatternFlowIcmpEchoChecksum + ToProto() (*otg.PatternFlowIcmpEchoChecksum, error) + // ToPbText marshals PatternFlowIcmpEchoChecksum to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpEchoChecksum to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpEchoChecksum to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpEchoChecksum struct { + obj *patternFlowIcmpEchoChecksum +} + +type unMarshalPatternFlowIcmpEchoChecksum interface { + // FromProto unmarshals PatternFlowIcmpEchoChecksum from protobuf object *otg.PatternFlowIcmpEchoChecksum + FromProto(msg *otg.PatternFlowIcmpEchoChecksum) (PatternFlowIcmpEchoChecksum, error) + // FromPbText unmarshals PatternFlowIcmpEchoChecksum from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpEchoChecksum from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpEchoChecksum from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpEchoChecksum) Marshal() marshalPatternFlowIcmpEchoChecksum { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpEchoChecksum{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpEchoChecksum) Unmarshal() unMarshalPatternFlowIcmpEchoChecksum { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpEchoChecksum{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpEchoChecksum) ToProto() (*otg.PatternFlowIcmpEchoChecksum, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpEchoChecksum) FromProto(msg *otg.PatternFlowIcmpEchoChecksum) (PatternFlowIcmpEchoChecksum, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpEchoChecksum) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpEchoChecksum) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpEchoChecksum) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoChecksum) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpEchoChecksum) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoChecksum) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpEchoChecksum) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoChecksum) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoChecksum) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpEchoChecksum) Clone() (PatternFlowIcmpEchoChecksum, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpEchoChecksum() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpEchoChecksum is iCMP checksum +type PatternFlowIcmpEchoChecksum interface { + Validation + // msg marshals PatternFlowIcmpEchoChecksum to protobuf object *otg.PatternFlowIcmpEchoChecksum + // and doesn't set defaults + msg() *otg.PatternFlowIcmpEchoChecksum + // setMsg unmarshals PatternFlowIcmpEchoChecksum from protobuf object *otg.PatternFlowIcmpEchoChecksum + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpEchoChecksum) PatternFlowIcmpEchoChecksum + // provides marshal interface + Marshal() marshalPatternFlowIcmpEchoChecksum + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpEchoChecksum + // validate validates PatternFlowIcmpEchoChecksum + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpEchoChecksum, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIcmpEchoChecksumChoiceEnum, set in PatternFlowIcmpEchoChecksum + Choice() PatternFlowIcmpEchoChecksumChoiceEnum + // setChoice assigns PatternFlowIcmpEchoChecksumChoiceEnum provided by user to PatternFlowIcmpEchoChecksum + setChoice(value PatternFlowIcmpEchoChecksumChoiceEnum) PatternFlowIcmpEchoChecksum + // HasChoice checks if Choice has been set in PatternFlowIcmpEchoChecksum + HasChoice() bool + // Generated returns PatternFlowIcmpEchoChecksumGeneratedEnum, set in PatternFlowIcmpEchoChecksum + Generated() PatternFlowIcmpEchoChecksumGeneratedEnum + // SetGenerated assigns PatternFlowIcmpEchoChecksumGeneratedEnum provided by user to PatternFlowIcmpEchoChecksum + SetGenerated(value PatternFlowIcmpEchoChecksumGeneratedEnum) PatternFlowIcmpEchoChecksum + // HasGenerated checks if Generated has been set in PatternFlowIcmpEchoChecksum + HasGenerated() bool + // Custom returns uint32, set in PatternFlowIcmpEchoChecksum. + Custom() uint32 + // SetCustom assigns uint32 provided by user to PatternFlowIcmpEchoChecksum + SetCustom(value uint32) PatternFlowIcmpEchoChecksum + // HasCustom checks if Custom has been set in PatternFlowIcmpEchoChecksum + HasCustom() bool +} + +type PatternFlowIcmpEchoChecksumChoiceEnum string + +// Enum of Choice on PatternFlowIcmpEchoChecksum +var PatternFlowIcmpEchoChecksumChoice = struct { + GENERATED PatternFlowIcmpEchoChecksumChoiceEnum + CUSTOM PatternFlowIcmpEchoChecksumChoiceEnum +}{ + GENERATED: PatternFlowIcmpEchoChecksumChoiceEnum("generated"), + CUSTOM: PatternFlowIcmpEchoChecksumChoiceEnum("custom"), +} + +func (obj *patternFlowIcmpEchoChecksum) Choice() PatternFlowIcmpEchoChecksumChoiceEnum { + return PatternFlowIcmpEchoChecksumChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The type of checksum +// Choice returns a string +func (obj *patternFlowIcmpEchoChecksum) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIcmpEchoChecksum) setChoice(value PatternFlowIcmpEchoChecksumChoiceEnum) PatternFlowIcmpEchoChecksum { + intValue, ok := otg.PatternFlowIcmpEchoChecksum_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIcmpEchoChecksumChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIcmpEchoChecksum_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.obj.Generated = otg.PatternFlowIcmpEchoChecksum_Generated_unspecified.Enum() + return obj +} + +type PatternFlowIcmpEchoChecksumGeneratedEnum string + +// Enum of Generated on PatternFlowIcmpEchoChecksum +var PatternFlowIcmpEchoChecksumGenerated = struct { + GOOD PatternFlowIcmpEchoChecksumGeneratedEnum + BAD PatternFlowIcmpEchoChecksumGeneratedEnum +}{ + GOOD: PatternFlowIcmpEchoChecksumGeneratedEnum("good"), + BAD: PatternFlowIcmpEchoChecksumGeneratedEnum("bad"), +} + +func (obj *patternFlowIcmpEchoChecksum) Generated() PatternFlowIcmpEchoChecksumGeneratedEnum { + return PatternFlowIcmpEchoChecksumGeneratedEnum(obj.obj.Generated.Enum().String()) +} + +// A system generated checksum value +// Generated returns a string +func (obj *patternFlowIcmpEchoChecksum) HasGenerated() bool { + return obj.obj.Generated != nil +} + +func (obj *patternFlowIcmpEchoChecksum) SetGenerated(value PatternFlowIcmpEchoChecksumGeneratedEnum) PatternFlowIcmpEchoChecksum { + intValue, ok := otg.PatternFlowIcmpEchoChecksum_Generated_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIcmpEchoChecksumGeneratedEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIcmpEchoChecksum_Generated_Enum(intValue) + obj.obj.Generated = &enumValue + + return obj +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowIcmpEchoChecksum) Custom() uint32 { + + if obj.obj.Custom == nil { + obj.setChoice(PatternFlowIcmpEchoChecksumChoice.CUSTOM) + } + + return *obj.obj.Custom + +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowIcmpEchoChecksum) HasCustom() bool { + return obj.obj.Custom != nil +} + +// A custom checksum value +// SetCustom sets the uint32 value in the PatternFlowIcmpEchoChecksum object +func (obj *patternFlowIcmpEchoChecksum) SetCustom(value uint32) PatternFlowIcmpEchoChecksum { + obj.setChoice(PatternFlowIcmpEchoChecksumChoice.CUSTOM) + obj.obj.Custom = &value + return obj +} + +func (obj *patternFlowIcmpEchoChecksum) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Custom != nil { + + if *obj.obj.Custom > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoChecksum.Custom <= 65535 but Got %d", *obj.obj.Custom)) + } + + } + +} + +func (obj *patternFlowIcmpEchoChecksum) setDefault() { + var choices_set int = 0 + var choice PatternFlowIcmpEchoChecksumChoiceEnum + + if obj.obj.Generated != nil && obj.obj.Generated.Number() != 0 { + choices_set += 1 + choice = PatternFlowIcmpEchoChecksumChoice.GENERATED + } + + if obj.obj.Custom != nil { + choices_set += 1 + choice = PatternFlowIcmpEchoChecksumChoice.CUSTOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIcmpEchoChecksumChoice.GENERATED) + if obj.obj.Generated.Number() == 0 { + obj.SetGenerated(PatternFlowIcmpEchoChecksumGenerated.GOOD) + + } + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIcmpEchoChecksum") + } + } else { + intVal := otg.PatternFlowIcmpEchoChecksum_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIcmpEchoChecksum_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_icmp_echo_code.go b/gosnappi/pattern_flow_icmp_echo_code.go new file mode 100644 index 00000000..1869813e --- /dev/null +++ b/gosnappi/pattern_flow_icmp_echo_code.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpEchoCode ***** +type patternFlowIcmpEchoCode struct { + validation + obj *otg.PatternFlowIcmpEchoCode + marshaller marshalPatternFlowIcmpEchoCode + unMarshaller unMarshalPatternFlowIcmpEchoCode + incrementHolder PatternFlowIcmpEchoCodeCounter + decrementHolder PatternFlowIcmpEchoCodeCounter + metricTagsHolder PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter +} + +func NewPatternFlowIcmpEchoCode() PatternFlowIcmpEchoCode { + obj := patternFlowIcmpEchoCode{obj: &otg.PatternFlowIcmpEchoCode{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpEchoCode) msg() *otg.PatternFlowIcmpEchoCode { + return obj.obj +} + +func (obj *patternFlowIcmpEchoCode) setMsg(msg *otg.PatternFlowIcmpEchoCode) PatternFlowIcmpEchoCode { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpEchoCode struct { + obj *patternFlowIcmpEchoCode +} + +type marshalPatternFlowIcmpEchoCode interface { + // ToProto marshals PatternFlowIcmpEchoCode to protobuf object *otg.PatternFlowIcmpEchoCode + ToProto() (*otg.PatternFlowIcmpEchoCode, error) + // ToPbText marshals PatternFlowIcmpEchoCode to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpEchoCode to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpEchoCode to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpEchoCode struct { + obj *patternFlowIcmpEchoCode +} + +type unMarshalPatternFlowIcmpEchoCode interface { + // FromProto unmarshals PatternFlowIcmpEchoCode from protobuf object *otg.PatternFlowIcmpEchoCode + FromProto(msg *otg.PatternFlowIcmpEchoCode) (PatternFlowIcmpEchoCode, error) + // FromPbText unmarshals PatternFlowIcmpEchoCode from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpEchoCode from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpEchoCode from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpEchoCode) Marshal() marshalPatternFlowIcmpEchoCode { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpEchoCode{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpEchoCode) Unmarshal() unMarshalPatternFlowIcmpEchoCode { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpEchoCode{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpEchoCode) ToProto() (*otg.PatternFlowIcmpEchoCode, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpEchoCode) FromProto(msg *otg.PatternFlowIcmpEchoCode) (PatternFlowIcmpEchoCode, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpEchoCode) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpEchoCode) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpEchoCode) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoCode) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpEchoCode) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoCode) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpEchoCode) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoCode) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoCode) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpEchoCode) Clone() (PatternFlowIcmpEchoCode, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpEchoCode() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIcmpEchoCode) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIcmpEchoCode is the ICMP subtype. The default code for ICMP echo request and reply is 0. +type PatternFlowIcmpEchoCode interface { + Validation + // msg marshals PatternFlowIcmpEchoCode to protobuf object *otg.PatternFlowIcmpEchoCode + // and doesn't set defaults + msg() *otg.PatternFlowIcmpEchoCode + // setMsg unmarshals PatternFlowIcmpEchoCode from protobuf object *otg.PatternFlowIcmpEchoCode + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpEchoCode) PatternFlowIcmpEchoCode + // provides marshal interface + Marshal() marshalPatternFlowIcmpEchoCode + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpEchoCode + // validate validates PatternFlowIcmpEchoCode + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpEchoCode, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIcmpEchoCodeChoiceEnum, set in PatternFlowIcmpEchoCode + Choice() PatternFlowIcmpEchoCodeChoiceEnum + // setChoice assigns PatternFlowIcmpEchoCodeChoiceEnum provided by user to PatternFlowIcmpEchoCode + setChoice(value PatternFlowIcmpEchoCodeChoiceEnum) PatternFlowIcmpEchoCode + // HasChoice checks if Choice has been set in PatternFlowIcmpEchoCode + HasChoice() bool + // Value returns uint32, set in PatternFlowIcmpEchoCode. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIcmpEchoCode + SetValue(value uint32) PatternFlowIcmpEchoCode + // HasValue checks if Value has been set in PatternFlowIcmpEchoCode + HasValue() bool + // Values returns []uint32, set in PatternFlowIcmpEchoCode. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIcmpEchoCode + SetValues(value []uint32) PatternFlowIcmpEchoCode + // Increment returns PatternFlowIcmpEchoCodeCounter, set in PatternFlowIcmpEchoCode. + // PatternFlowIcmpEchoCodeCounter is integer counter pattern + Increment() PatternFlowIcmpEchoCodeCounter + // SetIncrement assigns PatternFlowIcmpEchoCodeCounter provided by user to PatternFlowIcmpEchoCode. + // PatternFlowIcmpEchoCodeCounter is integer counter pattern + SetIncrement(value PatternFlowIcmpEchoCodeCounter) PatternFlowIcmpEchoCode + // HasIncrement checks if Increment has been set in PatternFlowIcmpEchoCode + HasIncrement() bool + // Decrement returns PatternFlowIcmpEchoCodeCounter, set in PatternFlowIcmpEchoCode. + // PatternFlowIcmpEchoCodeCounter is integer counter pattern + Decrement() PatternFlowIcmpEchoCodeCounter + // SetDecrement assigns PatternFlowIcmpEchoCodeCounter provided by user to PatternFlowIcmpEchoCode. + // PatternFlowIcmpEchoCodeCounter is integer counter pattern + SetDecrement(value PatternFlowIcmpEchoCodeCounter) PatternFlowIcmpEchoCode + // HasDecrement checks if Decrement has been set in PatternFlowIcmpEchoCode + HasDecrement() bool + // MetricTags returns PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIterIter, set in PatternFlowIcmpEchoCode + MetricTags() PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter + setNil() +} + +type PatternFlowIcmpEchoCodeChoiceEnum string + +// Enum of Choice on PatternFlowIcmpEchoCode +var PatternFlowIcmpEchoCodeChoice = struct { + VALUE PatternFlowIcmpEchoCodeChoiceEnum + VALUES PatternFlowIcmpEchoCodeChoiceEnum + INCREMENT PatternFlowIcmpEchoCodeChoiceEnum + DECREMENT PatternFlowIcmpEchoCodeChoiceEnum +}{ + VALUE: PatternFlowIcmpEchoCodeChoiceEnum("value"), + VALUES: PatternFlowIcmpEchoCodeChoiceEnum("values"), + INCREMENT: PatternFlowIcmpEchoCodeChoiceEnum("increment"), + DECREMENT: PatternFlowIcmpEchoCodeChoiceEnum("decrement"), +} + +func (obj *patternFlowIcmpEchoCode) Choice() PatternFlowIcmpEchoCodeChoiceEnum { + return PatternFlowIcmpEchoCodeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIcmpEchoCode) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIcmpEchoCode) setChoice(value PatternFlowIcmpEchoCodeChoiceEnum) PatternFlowIcmpEchoCode { + intValue, ok := otg.PatternFlowIcmpEchoCode_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIcmpEchoCodeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIcmpEchoCode_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIcmpEchoCodeChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIcmpEchoCodeChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIcmpEchoCodeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIcmpEchoCodeCounter().msg() + } + + if value == PatternFlowIcmpEchoCodeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIcmpEchoCodeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpEchoCode) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIcmpEchoCodeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpEchoCode) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIcmpEchoCode object +func (obj *patternFlowIcmpEchoCode) SetValue(value uint32) PatternFlowIcmpEchoCode { + obj.setChoice(PatternFlowIcmpEchoCodeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIcmpEchoCode) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIcmpEchoCode object +func (obj *patternFlowIcmpEchoCode) SetValues(value []uint32) PatternFlowIcmpEchoCode { + obj.setChoice(PatternFlowIcmpEchoCodeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIcmpEchoCodeCounter +func (obj *patternFlowIcmpEchoCode) Increment() PatternFlowIcmpEchoCodeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIcmpEchoCodeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIcmpEchoCodeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIcmpEchoCodeCounter +func (obj *patternFlowIcmpEchoCode) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIcmpEchoCodeCounter value in the PatternFlowIcmpEchoCode object +func (obj *patternFlowIcmpEchoCode) SetIncrement(value PatternFlowIcmpEchoCodeCounter) PatternFlowIcmpEchoCode { + obj.setChoice(PatternFlowIcmpEchoCodeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIcmpEchoCodeCounter +func (obj *patternFlowIcmpEchoCode) Decrement() PatternFlowIcmpEchoCodeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIcmpEchoCodeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIcmpEchoCodeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIcmpEchoCodeCounter +func (obj *patternFlowIcmpEchoCode) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIcmpEchoCodeCounter value in the PatternFlowIcmpEchoCode object +func (obj *patternFlowIcmpEchoCode) SetDecrement(value PatternFlowIcmpEchoCodeCounter) PatternFlowIcmpEchoCode { + obj.setChoice(PatternFlowIcmpEchoCodeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIcmpEchoCodeMetricTag +func (obj *patternFlowIcmpEchoCode) MetricTags() PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIcmpEchoCodeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter struct { + obj *patternFlowIcmpEchoCode + patternFlowIcmpEchoCodeMetricTagSlice []PatternFlowIcmpEchoCodeMetricTag + fieldPtr *[]*otg.PatternFlowIcmpEchoCodeMetricTag +} + +func newPatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter(ptr *[]*otg.PatternFlowIcmpEchoCodeMetricTag) PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter { + return &patternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter interface { + setMsg(*patternFlowIcmpEchoCode) PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter + Items() []PatternFlowIcmpEchoCodeMetricTag + Add() PatternFlowIcmpEchoCodeMetricTag + Append(items ...PatternFlowIcmpEchoCodeMetricTag) PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter + Set(index int, newObj PatternFlowIcmpEchoCodeMetricTag) PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter + Clear() PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter + clearHolderSlice() PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter + appendHolderSlice(item PatternFlowIcmpEchoCodeMetricTag) PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter +} + +func (obj *patternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter) setMsg(msg *patternFlowIcmpEchoCode) PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIcmpEchoCodeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter) Items() []PatternFlowIcmpEchoCodeMetricTag { + return obj.patternFlowIcmpEchoCodeMetricTagSlice +} + +func (obj *patternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter) Add() PatternFlowIcmpEchoCodeMetricTag { + newObj := &otg.PatternFlowIcmpEchoCodeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIcmpEchoCodeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIcmpEchoCodeMetricTagSlice = append(obj.patternFlowIcmpEchoCodeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter) Append(items ...PatternFlowIcmpEchoCodeMetricTag) PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIcmpEchoCodeMetricTagSlice = append(obj.patternFlowIcmpEchoCodeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter) Set(index int, newObj PatternFlowIcmpEchoCodeMetricTag) PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIcmpEchoCodeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter) Clear() PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIcmpEchoCodeMetricTag{} + obj.patternFlowIcmpEchoCodeMetricTagSlice = []PatternFlowIcmpEchoCodeMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter) clearHolderSlice() PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter { + if len(obj.patternFlowIcmpEchoCodeMetricTagSlice) > 0 { + obj.patternFlowIcmpEchoCodeMetricTagSlice = []PatternFlowIcmpEchoCodeMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter) appendHolderSlice(item PatternFlowIcmpEchoCodeMetricTag) PatternFlowIcmpEchoCodePatternFlowIcmpEchoCodeMetricTagIter { + obj.patternFlowIcmpEchoCodeMetricTagSlice = append(obj.patternFlowIcmpEchoCodeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIcmpEchoCode) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoCode.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIcmpEchoCode.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIcmpEchoCodeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIcmpEchoCode) setDefault() { + var choices_set int = 0 + var choice PatternFlowIcmpEchoCodeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIcmpEchoCodeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIcmpEchoCodeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIcmpEchoCodeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIcmpEchoCodeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIcmpEchoCodeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIcmpEchoCode") + } + } else { + intVal := otg.PatternFlowIcmpEchoCode_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIcmpEchoCode_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_icmp_echo_code_counter.go b/gosnappi/pattern_flow_icmp_echo_code_counter.go new file mode 100644 index 00000000..4a7ee044 --- /dev/null +++ b/gosnappi/pattern_flow_icmp_echo_code_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpEchoCodeCounter ***** +type patternFlowIcmpEchoCodeCounter struct { + validation + obj *otg.PatternFlowIcmpEchoCodeCounter + marshaller marshalPatternFlowIcmpEchoCodeCounter + unMarshaller unMarshalPatternFlowIcmpEchoCodeCounter +} + +func NewPatternFlowIcmpEchoCodeCounter() PatternFlowIcmpEchoCodeCounter { + obj := patternFlowIcmpEchoCodeCounter{obj: &otg.PatternFlowIcmpEchoCodeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpEchoCodeCounter) msg() *otg.PatternFlowIcmpEchoCodeCounter { + return obj.obj +} + +func (obj *patternFlowIcmpEchoCodeCounter) setMsg(msg *otg.PatternFlowIcmpEchoCodeCounter) PatternFlowIcmpEchoCodeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpEchoCodeCounter struct { + obj *patternFlowIcmpEchoCodeCounter +} + +type marshalPatternFlowIcmpEchoCodeCounter interface { + // ToProto marshals PatternFlowIcmpEchoCodeCounter to protobuf object *otg.PatternFlowIcmpEchoCodeCounter + ToProto() (*otg.PatternFlowIcmpEchoCodeCounter, error) + // ToPbText marshals PatternFlowIcmpEchoCodeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpEchoCodeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpEchoCodeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpEchoCodeCounter struct { + obj *patternFlowIcmpEchoCodeCounter +} + +type unMarshalPatternFlowIcmpEchoCodeCounter interface { + // FromProto unmarshals PatternFlowIcmpEchoCodeCounter from protobuf object *otg.PatternFlowIcmpEchoCodeCounter + FromProto(msg *otg.PatternFlowIcmpEchoCodeCounter) (PatternFlowIcmpEchoCodeCounter, error) + // FromPbText unmarshals PatternFlowIcmpEchoCodeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpEchoCodeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpEchoCodeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpEchoCodeCounter) Marshal() marshalPatternFlowIcmpEchoCodeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpEchoCodeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpEchoCodeCounter) Unmarshal() unMarshalPatternFlowIcmpEchoCodeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpEchoCodeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpEchoCodeCounter) ToProto() (*otg.PatternFlowIcmpEchoCodeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpEchoCodeCounter) FromProto(msg *otg.PatternFlowIcmpEchoCodeCounter) (PatternFlowIcmpEchoCodeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpEchoCodeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpEchoCodeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpEchoCodeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoCodeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpEchoCodeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoCodeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpEchoCodeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoCodeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoCodeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpEchoCodeCounter) Clone() (PatternFlowIcmpEchoCodeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpEchoCodeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpEchoCodeCounter is integer counter pattern +type PatternFlowIcmpEchoCodeCounter interface { + Validation + // msg marshals PatternFlowIcmpEchoCodeCounter to protobuf object *otg.PatternFlowIcmpEchoCodeCounter + // and doesn't set defaults + msg() *otg.PatternFlowIcmpEchoCodeCounter + // setMsg unmarshals PatternFlowIcmpEchoCodeCounter from protobuf object *otg.PatternFlowIcmpEchoCodeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpEchoCodeCounter) PatternFlowIcmpEchoCodeCounter + // provides marshal interface + Marshal() marshalPatternFlowIcmpEchoCodeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpEchoCodeCounter + // validate validates PatternFlowIcmpEchoCodeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpEchoCodeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIcmpEchoCodeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIcmpEchoCodeCounter + SetStart(value uint32) PatternFlowIcmpEchoCodeCounter + // HasStart checks if Start has been set in PatternFlowIcmpEchoCodeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIcmpEchoCodeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIcmpEchoCodeCounter + SetStep(value uint32) PatternFlowIcmpEchoCodeCounter + // HasStep checks if Step has been set in PatternFlowIcmpEchoCodeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIcmpEchoCodeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIcmpEchoCodeCounter + SetCount(value uint32) PatternFlowIcmpEchoCodeCounter + // HasCount checks if Count has been set in PatternFlowIcmpEchoCodeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpEchoCodeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpEchoCodeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIcmpEchoCodeCounter object +func (obj *patternFlowIcmpEchoCodeCounter) SetStart(value uint32) PatternFlowIcmpEchoCodeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpEchoCodeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpEchoCodeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIcmpEchoCodeCounter object +func (obj *patternFlowIcmpEchoCodeCounter) SetStep(value uint32) PatternFlowIcmpEchoCodeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpEchoCodeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpEchoCodeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIcmpEchoCodeCounter object +func (obj *patternFlowIcmpEchoCodeCounter) SetCount(value uint32) PatternFlowIcmpEchoCodeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIcmpEchoCodeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoCodeCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoCodeCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoCodeCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIcmpEchoCodeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_icmp_echo_code_metric_tag.go b/gosnappi/pattern_flow_icmp_echo_code_metric_tag.go new file mode 100644 index 00000000..ad689519 --- /dev/null +++ b/gosnappi/pattern_flow_icmp_echo_code_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpEchoCodeMetricTag ***** +type patternFlowIcmpEchoCodeMetricTag struct { + validation + obj *otg.PatternFlowIcmpEchoCodeMetricTag + marshaller marshalPatternFlowIcmpEchoCodeMetricTag + unMarshaller unMarshalPatternFlowIcmpEchoCodeMetricTag +} + +func NewPatternFlowIcmpEchoCodeMetricTag() PatternFlowIcmpEchoCodeMetricTag { + obj := patternFlowIcmpEchoCodeMetricTag{obj: &otg.PatternFlowIcmpEchoCodeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpEchoCodeMetricTag) msg() *otg.PatternFlowIcmpEchoCodeMetricTag { + return obj.obj +} + +func (obj *patternFlowIcmpEchoCodeMetricTag) setMsg(msg *otg.PatternFlowIcmpEchoCodeMetricTag) PatternFlowIcmpEchoCodeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpEchoCodeMetricTag struct { + obj *patternFlowIcmpEchoCodeMetricTag +} + +type marshalPatternFlowIcmpEchoCodeMetricTag interface { + // ToProto marshals PatternFlowIcmpEchoCodeMetricTag to protobuf object *otg.PatternFlowIcmpEchoCodeMetricTag + ToProto() (*otg.PatternFlowIcmpEchoCodeMetricTag, error) + // ToPbText marshals PatternFlowIcmpEchoCodeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpEchoCodeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpEchoCodeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpEchoCodeMetricTag struct { + obj *patternFlowIcmpEchoCodeMetricTag +} + +type unMarshalPatternFlowIcmpEchoCodeMetricTag interface { + // FromProto unmarshals PatternFlowIcmpEchoCodeMetricTag from protobuf object *otg.PatternFlowIcmpEchoCodeMetricTag + FromProto(msg *otg.PatternFlowIcmpEchoCodeMetricTag) (PatternFlowIcmpEchoCodeMetricTag, error) + // FromPbText unmarshals PatternFlowIcmpEchoCodeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpEchoCodeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpEchoCodeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpEchoCodeMetricTag) Marshal() marshalPatternFlowIcmpEchoCodeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpEchoCodeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpEchoCodeMetricTag) Unmarshal() unMarshalPatternFlowIcmpEchoCodeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpEchoCodeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpEchoCodeMetricTag) ToProto() (*otg.PatternFlowIcmpEchoCodeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpEchoCodeMetricTag) FromProto(msg *otg.PatternFlowIcmpEchoCodeMetricTag) (PatternFlowIcmpEchoCodeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpEchoCodeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpEchoCodeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpEchoCodeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoCodeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpEchoCodeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoCodeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpEchoCodeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoCodeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoCodeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpEchoCodeMetricTag) Clone() (PatternFlowIcmpEchoCodeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpEchoCodeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpEchoCodeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIcmpEchoCodeMetricTag interface { + Validation + // msg marshals PatternFlowIcmpEchoCodeMetricTag to protobuf object *otg.PatternFlowIcmpEchoCodeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIcmpEchoCodeMetricTag + // setMsg unmarshals PatternFlowIcmpEchoCodeMetricTag from protobuf object *otg.PatternFlowIcmpEchoCodeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpEchoCodeMetricTag) PatternFlowIcmpEchoCodeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIcmpEchoCodeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpEchoCodeMetricTag + // validate validates PatternFlowIcmpEchoCodeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpEchoCodeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIcmpEchoCodeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIcmpEchoCodeMetricTag + SetName(value string) PatternFlowIcmpEchoCodeMetricTag + // Offset returns uint32, set in PatternFlowIcmpEchoCodeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIcmpEchoCodeMetricTag + SetOffset(value uint32) PatternFlowIcmpEchoCodeMetricTag + // HasOffset checks if Offset has been set in PatternFlowIcmpEchoCodeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIcmpEchoCodeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIcmpEchoCodeMetricTag + SetLength(value uint32) PatternFlowIcmpEchoCodeMetricTag + // HasLength checks if Length has been set in PatternFlowIcmpEchoCodeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIcmpEchoCodeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIcmpEchoCodeMetricTag object +func (obj *patternFlowIcmpEchoCodeMetricTag) SetName(value string) PatternFlowIcmpEchoCodeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpEchoCodeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpEchoCodeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIcmpEchoCodeMetricTag object +func (obj *patternFlowIcmpEchoCodeMetricTag) SetOffset(value uint32) PatternFlowIcmpEchoCodeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpEchoCodeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpEchoCodeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIcmpEchoCodeMetricTag object +func (obj *patternFlowIcmpEchoCodeMetricTag) SetLength(value uint32) PatternFlowIcmpEchoCodeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIcmpEchoCodeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIcmpEchoCodeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoCodeMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIcmpEchoCodeMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIcmpEchoCodeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_icmp_echo_identifier.go b/gosnappi/pattern_flow_icmp_echo_identifier.go new file mode 100644 index 00000000..83302521 --- /dev/null +++ b/gosnappi/pattern_flow_icmp_echo_identifier.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpEchoIdentifier ***** +type patternFlowIcmpEchoIdentifier struct { + validation + obj *otg.PatternFlowIcmpEchoIdentifier + marshaller marshalPatternFlowIcmpEchoIdentifier + unMarshaller unMarshalPatternFlowIcmpEchoIdentifier + incrementHolder PatternFlowIcmpEchoIdentifierCounter + decrementHolder PatternFlowIcmpEchoIdentifierCounter + metricTagsHolder PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter +} + +func NewPatternFlowIcmpEchoIdentifier() PatternFlowIcmpEchoIdentifier { + obj := patternFlowIcmpEchoIdentifier{obj: &otg.PatternFlowIcmpEchoIdentifier{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpEchoIdentifier) msg() *otg.PatternFlowIcmpEchoIdentifier { + return obj.obj +} + +func (obj *patternFlowIcmpEchoIdentifier) setMsg(msg *otg.PatternFlowIcmpEchoIdentifier) PatternFlowIcmpEchoIdentifier { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpEchoIdentifier struct { + obj *patternFlowIcmpEchoIdentifier +} + +type marshalPatternFlowIcmpEchoIdentifier interface { + // ToProto marshals PatternFlowIcmpEchoIdentifier to protobuf object *otg.PatternFlowIcmpEchoIdentifier + ToProto() (*otg.PatternFlowIcmpEchoIdentifier, error) + // ToPbText marshals PatternFlowIcmpEchoIdentifier to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpEchoIdentifier to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpEchoIdentifier to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpEchoIdentifier struct { + obj *patternFlowIcmpEchoIdentifier +} + +type unMarshalPatternFlowIcmpEchoIdentifier interface { + // FromProto unmarshals PatternFlowIcmpEchoIdentifier from protobuf object *otg.PatternFlowIcmpEchoIdentifier + FromProto(msg *otg.PatternFlowIcmpEchoIdentifier) (PatternFlowIcmpEchoIdentifier, error) + // FromPbText unmarshals PatternFlowIcmpEchoIdentifier from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpEchoIdentifier from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpEchoIdentifier from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpEchoIdentifier) Marshal() marshalPatternFlowIcmpEchoIdentifier { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpEchoIdentifier{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpEchoIdentifier) Unmarshal() unMarshalPatternFlowIcmpEchoIdentifier { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpEchoIdentifier{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpEchoIdentifier) ToProto() (*otg.PatternFlowIcmpEchoIdentifier, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpEchoIdentifier) FromProto(msg *otg.PatternFlowIcmpEchoIdentifier) (PatternFlowIcmpEchoIdentifier, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpEchoIdentifier) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpEchoIdentifier) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpEchoIdentifier) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoIdentifier) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpEchoIdentifier) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoIdentifier) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpEchoIdentifier) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoIdentifier) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoIdentifier) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpEchoIdentifier) Clone() (PatternFlowIcmpEchoIdentifier, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpEchoIdentifier() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIcmpEchoIdentifier) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIcmpEchoIdentifier is iCMP identifier +type PatternFlowIcmpEchoIdentifier interface { + Validation + // msg marshals PatternFlowIcmpEchoIdentifier to protobuf object *otg.PatternFlowIcmpEchoIdentifier + // and doesn't set defaults + msg() *otg.PatternFlowIcmpEchoIdentifier + // setMsg unmarshals PatternFlowIcmpEchoIdentifier from protobuf object *otg.PatternFlowIcmpEchoIdentifier + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpEchoIdentifier) PatternFlowIcmpEchoIdentifier + // provides marshal interface + Marshal() marshalPatternFlowIcmpEchoIdentifier + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpEchoIdentifier + // validate validates PatternFlowIcmpEchoIdentifier + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpEchoIdentifier, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIcmpEchoIdentifierChoiceEnum, set in PatternFlowIcmpEchoIdentifier + Choice() PatternFlowIcmpEchoIdentifierChoiceEnum + // setChoice assigns PatternFlowIcmpEchoIdentifierChoiceEnum provided by user to PatternFlowIcmpEchoIdentifier + setChoice(value PatternFlowIcmpEchoIdentifierChoiceEnum) PatternFlowIcmpEchoIdentifier + // HasChoice checks if Choice has been set in PatternFlowIcmpEchoIdentifier + HasChoice() bool + // Value returns uint32, set in PatternFlowIcmpEchoIdentifier. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIcmpEchoIdentifier + SetValue(value uint32) PatternFlowIcmpEchoIdentifier + // HasValue checks if Value has been set in PatternFlowIcmpEchoIdentifier + HasValue() bool + // Values returns []uint32, set in PatternFlowIcmpEchoIdentifier. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIcmpEchoIdentifier + SetValues(value []uint32) PatternFlowIcmpEchoIdentifier + // Increment returns PatternFlowIcmpEchoIdentifierCounter, set in PatternFlowIcmpEchoIdentifier. + // PatternFlowIcmpEchoIdentifierCounter is integer counter pattern + Increment() PatternFlowIcmpEchoIdentifierCounter + // SetIncrement assigns PatternFlowIcmpEchoIdentifierCounter provided by user to PatternFlowIcmpEchoIdentifier. + // PatternFlowIcmpEchoIdentifierCounter is integer counter pattern + SetIncrement(value PatternFlowIcmpEchoIdentifierCounter) PatternFlowIcmpEchoIdentifier + // HasIncrement checks if Increment has been set in PatternFlowIcmpEchoIdentifier + HasIncrement() bool + // Decrement returns PatternFlowIcmpEchoIdentifierCounter, set in PatternFlowIcmpEchoIdentifier. + // PatternFlowIcmpEchoIdentifierCounter is integer counter pattern + Decrement() PatternFlowIcmpEchoIdentifierCounter + // SetDecrement assigns PatternFlowIcmpEchoIdentifierCounter provided by user to PatternFlowIcmpEchoIdentifier. + // PatternFlowIcmpEchoIdentifierCounter is integer counter pattern + SetDecrement(value PatternFlowIcmpEchoIdentifierCounter) PatternFlowIcmpEchoIdentifier + // HasDecrement checks if Decrement has been set in PatternFlowIcmpEchoIdentifier + HasDecrement() bool + // MetricTags returns PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIterIter, set in PatternFlowIcmpEchoIdentifier + MetricTags() PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter + setNil() +} + +type PatternFlowIcmpEchoIdentifierChoiceEnum string + +// Enum of Choice on PatternFlowIcmpEchoIdentifier +var PatternFlowIcmpEchoIdentifierChoice = struct { + VALUE PatternFlowIcmpEchoIdentifierChoiceEnum + VALUES PatternFlowIcmpEchoIdentifierChoiceEnum + INCREMENT PatternFlowIcmpEchoIdentifierChoiceEnum + DECREMENT PatternFlowIcmpEchoIdentifierChoiceEnum +}{ + VALUE: PatternFlowIcmpEchoIdentifierChoiceEnum("value"), + VALUES: PatternFlowIcmpEchoIdentifierChoiceEnum("values"), + INCREMENT: PatternFlowIcmpEchoIdentifierChoiceEnum("increment"), + DECREMENT: PatternFlowIcmpEchoIdentifierChoiceEnum("decrement"), +} + +func (obj *patternFlowIcmpEchoIdentifier) Choice() PatternFlowIcmpEchoIdentifierChoiceEnum { + return PatternFlowIcmpEchoIdentifierChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIcmpEchoIdentifier) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIcmpEchoIdentifier) setChoice(value PatternFlowIcmpEchoIdentifierChoiceEnum) PatternFlowIcmpEchoIdentifier { + intValue, ok := otg.PatternFlowIcmpEchoIdentifier_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIcmpEchoIdentifierChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIcmpEchoIdentifier_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIcmpEchoIdentifierChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIcmpEchoIdentifierChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIcmpEchoIdentifierChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIcmpEchoIdentifierCounter().msg() + } + + if value == PatternFlowIcmpEchoIdentifierChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIcmpEchoIdentifierCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpEchoIdentifier) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIcmpEchoIdentifierChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpEchoIdentifier) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIcmpEchoIdentifier object +func (obj *patternFlowIcmpEchoIdentifier) SetValue(value uint32) PatternFlowIcmpEchoIdentifier { + obj.setChoice(PatternFlowIcmpEchoIdentifierChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIcmpEchoIdentifier) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIcmpEchoIdentifier object +func (obj *patternFlowIcmpEchoIdentifier) SetValues(value []uint32) PatternFlowIcmpEchoIdentifier { + obj.setChoice(PatternFlowIcmpEchoIdentifierChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIcmpEchoIdentifierCounter +func (obj *patternFlowIcmpEchoIdentifier) Increment() PatternFlowIcmpEchoIdentifierCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIcmpEchoIdentifierChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIcmpEchoIdentifierCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIcmpEchoIdentifierCounter +func (obj *patternFlowIcmpEchoIdentifier) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIcmpEchoIdentifierCounter value in the PatternFlowIcmpEchoIdentifier object +func (obj *patternFlowIcmpEchoIdentifier) SetIncrement(value PatternFlowIcmpEchoIdentifierCounter) PatternFlowIcmpEchoIdentifier { + obj.setChoice(PatternFlowIcmpEchoIdentifierChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIcmpEchoIdentifierCounter +func (obj *patternFlowIcmpEchoIdentifier) Decrement() PatternFlowIcmpEchoIdentifierCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIcmpEchoIdentifierChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIcmpEchoIdentifierCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIcmpEchoIdentifierCounter +func (obj *patternFlowIcmpEchoIdentifier) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIcmpEchoIdentifierCounter value in the PatternFlowIcmpEchoIdentifier object +func (obj *patternFlowIcmpEchoIdentifier) SetDecrement(value PatternFlowIcmpEchoIdentifierCounter) PatternFlowIcmpEchoIdentifier { + obj.setChoice(PatternFlowIcmpEchoIdentifierChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIcmpEchoIdentifierMetricTag +func (obj *patternFlowIcmpEchoIdentifier) MetricTags() PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIcmpEchoIdentifierMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter struct { + obj *patternFlowIcmpEchoIdentifier + patternFlowIcmpEchoIdentifierMetricTagSlice []PatternFlowIcmpEchoIdentifierMetricTag + fieldPtr *[]*otg.PatternFlowIcmpEchoIdentifierMetricTag +} + +func newPatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter(ptr *[]*otg.PatternFlowIcmpEchoIdentifierMetricTag) PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter { + return &patternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter interface { + setMsg(*patternFlowIcmpEchoIdentifier) PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter + Items() []PatternFlowIcmpEchoIdentifierMetricTag + Add() PatternFlowIcmpEchoIdentifierMetricTag + Append(items ...PatternFlowIcmpEchoIdentifierMetricTag) PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter + Set(index int, newObj PatternFlowIcmpEchoIdentifierMetricTag) PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter + Clear() PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter + clearHolderSlice() PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter + appendHolderSlice(item PatternFlowIcmpEchoIdentifierMetricTag) PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter +} + +func (obj *patternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter) setMsg(msg *patternFlowIcmpEchoIdentifier) PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIcmpEchoIdentifierMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter) Items() []PatternFlowIcmpEchoIdentifierMetricTag { + return obj.patternFlowIcmpEchoIdentifierMetricTagSlice +} + +func (obj *patternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter) Add() PatternFlowIcmpEchoIdentifierMetricTag { + newObj := &otg.PatternFlowIcmpEchoIdentifierMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIcmpEchoIdentifierMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIcmpEchoIdentifierMetricTagSlice = append(obj.patternFlowIcmpEchoIdentifierMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter) Append(items ...PatternFlowIcmpEchoIdentifierMetricTag) PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIcmpEchoIdentifierMetricTagSlice = append(obj.patternFlowIcmpEchoIdentifierMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter) Set(index int, newObj PatternFlowIcmpEchoIdentifierMetricTag) PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIcmpEchoIdentifierMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter) Clear() PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIcmpEchoIdentifierMetricTag{} + obj.patternFlowIcmpEchoIdentifierMetricTagSlice = []PatternFlowIcmpEchoIdentifierMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter) clearHolderSlice() PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter { + if len(obj.patternFlowIcmpEchoIdentifierMetricTagSlice) > 0 { + obj.patternFlowIcmpEchoIdentifierMetricTagSlice = []PatternFlowIcmpEchoIdentifierMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter) appendHolderSlice(item PatternFlowIcmpEchoIdentifierMetricTag) PatternFlowIcmpEchoIdentifierPatternFlowIcmpEchoIdentifierMetricTagIter { + obj.patternFlowIcmpEchoIdentifierMetricTagSlice = append(obj.patternFlowIcmpEchoIdentifierMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIcmpEchoIdentifier) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoIdentifier.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIcmpEchoIdentifier.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIcmpEchoIdentifierMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIcmpEchoIdentifier) setDefault() { + var choices_set int = 0 + var choice PatternFlowIcmpEchoIdentifierChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIcmpEchoIdentifierChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIcmpEchoIdentifierChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIcmpEchoIdentifierChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIcmpEchoIdentifierChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIcmpEchoIdentifierChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIcmpEchoIdentifier") + } + } else { + intVal := otg.PatternFlowIcmpEchoIdentifier_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIcmpEchoIdentifier_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_icmp_echo_identifier_counter.go b/gosnappi/pattern_flow_icmp_echo_identifier_counter.go new file mode 100644 index 00000000..76755877 --- /dev/null +++ b/gosnappi/pattern_flow_icmp_echo_identifier_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpEchoIdentifierCounter ***** +type patternFlowIcmpEchoIdentifierCounter struct { + validation + obj *otg.PatternFlowIcmpEchoIdentifierCounter + marshaller marshalPatternFlowIcmpEchoIdentifierCounter + unMarshaller unMarshalPatternFlowIcmpEchoIdentifierCounter +} + +func NewPatternFlowIcmpEchoIdentifierCounter() PatternFlowIcmpEchoIdentifierCounter { + obj := patternFlowIcmpEchoIdentifierCounter{obj: &otg.PatternFlowIcmpEchoIdentifierCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpEchoIdentifierCounter) msg() *otg.PatternFlowIcmpEchoIdentifierCounter { + return obj.obj +} + +func (obj *patternFlowIcmpEchoIdentifierCounter) setMsg(msg *otg.PatternFlowIcmpEchoIdentifierCounter) PatternFlowIcmpEchoIdentifierCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpEchoIdentifierCounter struct { + obj *patternFlowIcmpEchoIdentifierCounter +} + +type marshalPatternFlowIcmpEchoIdentifierCounter interface { + // ToProto marshals PatternFlowIcmpEchoIdentifierCounter to protobuf object *otg.PatternFlowIcmpEchoIdentifierCounter + ToProto() (*otg.PatternFlowIcmpEchoIdentifierCounter, error) + // ToPbText marshals PatternFlowIcmpEchoIdentifierCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpEchoIdentifierCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpEchoIdentifierCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpEchoIdentifierCounter struct { + obj *patternFlowIcmpEchoIdentifierCounter +} + +type unMarshalPatternFlowIcmpEchoIdentifierCounter interface { + // FromProto unmarshals PatternFlowIcmpEchoIdentifierCounter from protobuf object *otg.PatternFlowIcmpEchoIdentifierCounter + FromProto(msg *otg.PatternFlowIcmpEchoIdentifierCounter) (PatternFlowIcmpEchoIdentifierCounter, error) + // FromPbText unmarshals PatternFlowIcmpEchoIdentifierCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpEchoIdentifierCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpEchoIdentifierCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpEchoIdentifierCounter) Marshal() marshalPatternFlowIcmpEchoIdentifierCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpEchoIdentifierCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpEchoIdentifierCounter) Unmarshal() unMarshalPatternFlowIcmpEchoIdentifierCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpEchoIdentifierCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpEchoIdentifierCounter) ToProto() (*otg.PatternFlowIcmpEchoIdentifierCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpEchoIdentifierCounter) FromProto(msg *otg.PatternFlowIcmpEchoIdentifierCounter) (PatternFlowIcmpEchoIdentifierCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpEchoIdentifierCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpEchoIdentifierCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpEchoIdentifierCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoIdentifierCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpEchoIdentifierCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoIdentifierCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpEchoIdentifierCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoIdentifierCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoIdentifierCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpEchoIdentifierCounter) Clone() (PatternFlowIcmpEchoIdentifierCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpEchoIdentifierCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpEchoIdentifierCounter is integer counter pattern +type PatternFlowIcmpEchoIdentifierCounter interface { + Validation + // msg marshals PatternFlowIcmpEchoIdentifierCounter to protobuf object *otg.PatternFlowIcmpEchoIdentifierCounter + // and doesn't set defaults + msg() *otg.PatternFlowIcmpEchoIdentifierCounter + // setMsg unmarshals PatternFlowIcmpEchoIdentifierCounter from protobuf object *otg.PatternFlowIcmpEchoIdentifierCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpEchoIdentifierCounter) PatternFlowIcmpEchoIdentifierCounter + // provides marshal interface + Marshal() marshalPatternFlowIcmpEchoIdentifierCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpEchoIdentifierCounter + // validate validates PatternFlowIcmpEchoIdentifierCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpEchoIdentifierCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIcmpEchoIdentifierCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIcmpEchoIdentifierCounter + SetStart(value uint32) PatternFlowIcmpEchoIdentifierCounter + // HasStart checks if Start has been set in PatternFlowIcmpEchoIdentifierCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIcmpEchoIdentifierCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIcmpEchoIdentifierCounter + SetStep(value uint32) PatternFlowIcmpEchoIdentifierCounter + // HasStep checks if Step has been set in PatternFlowIcmpEchoIdentifierCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIcmpEchoIdentifierCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIcmpEchoIdentifierCounter + SetCount(value uint32) PatternFlowIcmpEchoIdentifierCounter + // HasCount checks if Count has been set in PatternFlowIcmpEchoIdentifierCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpEchoIdentifierCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpEchoIdentifierCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIcmpEchoIdentifierCounter object +func (obj *patternFlowIcmpEchoIdentifierCounter) SetStart(value uint32) PatternFlowIcmpEchoIdentifierCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpEchoIdentifierCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpEchoIdentifierCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIcmpEchoIdentifierCounter object +func (obj *patternFlowIcmpEchoIdentifierCounter) SetStep(value uint32) PatternFlowIcmpEchoIdentifierCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpEchoIdentifierCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpEchoIdentifierCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIcmpEchoIdentifierCounter object +func (obj *patternFlowIcmpEchoIdentifierCounter) SetCount(value uint32) PatternFlowIcmpEchoIdentifierCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIcmpEchoIdentifierCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoIdentifierCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoIdentifierCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoIdentifierCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIcmpEchoIdentifierCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_icmp_echo_identifier_metric_tag.go b/gosnappi/pattern_flow_icmp_echo_identifier_metric_tag.go new file mode 100644 index 00000000..dd85a2ff --- /dev/null +++ b/gosnappi/pattern_flow_icmp_echo_identifier_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpEchoIdentifierMetricTag ***** +type patternFlowIcmpEchoIdentifierMetricTag struct { + validation + obj *otg.PatternFlowIcmpEchoIdentifierMetricTag + marshaller marshalPatternFlowIcmpEchoIdentifierMetricTag + unMarshaller unMarshalPatternFlowIcmpEchoIdentifierMetricTag +} + +func NewPatternFlowIcmpEchoIdentifierMetricTag() PatternFlowIcmpEchoIdentifierMetricTag { + obj := patternFlowIcmpEchoIdentifierMetricTag{obj: &otg.PatternFlowIcmpEchoIdentifierMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpEchoIdentifierMetricTag) msg() *otg.PatternFlowIcmpEchoIdentifierMetricTag { + return obj.obj +} + +func (obj *patternFlowIcmpEchoIdentifierMetricTag) setMsg(msg *otg.PatternFlowIcmpEchoIdentifierMetricTag) PatternFlowIcmpEchoIdentifierMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpEchoIdentifierMetricTag struct { + obj *patternFlowIcmpEchoIdentifierMetricTag +} + +type marshalPatternFlowIcmpEchoIdentifierMetricTag interface { + // ToProto marshals PatternFlowIcmpEchoIdentifierMetricTag to protobuf object *otg.PatternFlowIcmpEchoIdentifierMetricTag + ToProto() (*otg.PatternFlowIcmpEchoIdentifierMetricTag, error) + // ToPbText marshals PatternFlowIcmpEchoIdentifierMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpEchoIdentifierMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpEchoIdentifierMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpEchoIdentifierMetricTag struct { + obj *patternFlowIcmpEchoIdentifierMetricTag +} + +type unMarshalPatternFlowIcmpEchoIdentifierMetricTag interface { + // FromProto unmarshals PatternFlowIcmpEchoIdentifierMetricTag from protobuf object *otg.PatternFlowIcmpEchoIdentifierMetricTag + FromProto(msg *otg.PatternFlowIcmpEchoIdentifierMetricTag) (PatternFlowIcmpEchoIdentifierMetricTag, error) + // FromPbText unmarshals PatternFlowIcmpEchoIdentifierMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpEchoIdentifierMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpEchoIdentifierMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpEchoIdentifierMetricTag) Marshal() marshalPatternFlowIcmpEchoIdentifierMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpEchoIdentifierMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpEchoIdentifierMetricTag) Unmarshal() unMarshalPatternFlowIcmpEchoIdentifierMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpEchoIdentifierMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpEchoIdentifierMetricTag) ToProto() (*otg.PatternFlowIcmpEchoIdentifierMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpEchoIdentifierMetricTag) FromProto(msg *otg.PatternFlowIcmpEchoIdentifierMetricTag) (PatternFlowIcmpEchoIdentifierMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpEchoIdentifierMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpEchoIdentifierMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpEchoIdentifierMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoIdentifierMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpEchoIdentifierMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoIdentifierMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpEchoIdentifierMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoIdentifierMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoIdentifierMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpEchoIdentifierMetricTag) Clone() (PatternFlowIcmpEchoIdentifierMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpEchoIdentifierMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpEchoIdentifierMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIcmpEchoIdentifierMetricTag interface { + Validation + // msg marshals PatternFlowIcmpEchoIdentifierMetricTag to protobuf object *otg.PatternFlowIcmpEchoIdentifierMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIcmpEchoIdentifierMetricTag + // setMsg unmarshals PatternFlowIcmpEchoIdentifierMetricTag from protobuf object *otg.PatternFlowIcmpEchoIdentifierMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpEchoIdentifierMetricTag) PatternFlowIcmpEchoIdentifierMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIcmpEchoIdentifierMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpEchoIdentifierMetricTag + // validate validates PatternFlowIcmpEchoIdentifierMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpEchoIdentifierMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIcmpEchoIdentifierMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIcmpEchoIdentifierMetricTag + SetName(value string) PatternFlowIcmpEchoIdentifierMetricTag + // Offset returns uint32, set in PatternFlowIcmpEchoIdentifierMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIcmpEchoIdentifierMetricTag + SetOffset(value uint32) PatternFlowIcmpEchoIdentifierMetricTag + // HasOffset checks if Offset has been set in PatternFlowIcmpEchoIdentifierMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIcmpEchoIdentifierMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIcmpEchoIdentifierMetricTag + SetLength(value uint32) PatternFlowIcmpEchoIdentifierMetricTag + // HasLength checks if Length has been set in PatternFlowIcmpEchoIdentifierMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIcmpEchoIdentifierMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIcmpEchoIdentifierMetricTag object +func (obj *patternFlowIcmpEchoIdentifierMetricTag) SetName(value string) PatternFlowIcmpEchoIdentifierMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpEchoIdentifierMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpEchoIdentifierMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIcmpEchoIdentifierMetricTag object +func (obj *patternFlowIcmpEchoIdentifierMetricTag) SetOffset(value uint32) PatternFlowIcmpEchoIdentifierMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpEchoIdentifierMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpEchoIdentifierMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIcmpEchoIdentifierMetricTag object +func (obj *patternFlowIcmpEchoIdentifierMetricTag) SetLength(value uint32) PatternFlowIcmpEchoIdentifierMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIcmpEchoIdentifierMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIcmpEchoIdentifierMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoIdentifierMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIcmpEchoIdentifierMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIcmpEchoIdentifierMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_icmp_echo_sequence_number.go b/gosnappi/pattern_flow_icmp_echo_sequence_number.go new file mode 100644 index 00000000..8ec4e49b --- /dev/null +++ b/gosnappi/pattern_flow_icmp_echo_sequence_number.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpEchoSequenceNumber ***** +type patternFlowIcmpEchoSequenceNumber struct { + validation + obj *otg.PatternFlowIcmpEchoSequenceNumber + marshaller marshalPatternFlowIcmpEchoSequenceNumber + unMarshaller unMarshalPatternFlowIcmpEchoSequenceNumber + incrementHolder PatternFlowIcmpEchoSequenceNumberCounter + decrementHolder PatternFlowIcmpEchoSequenceNumberCounter + metricTagsHolder PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter +} + +func NewPatternFlowIcmpEchoSequenceNumber() PatternFlowIcmpEchoSequenceNumber { + obj := patternFlowIcmpEchoSequenceNumber{obj: &otg.PatternFlowIcmpEchoSequenceNumber{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpEchoSequenceNumber) msg() *otg.PatternFlowIcmpEchoSequenceNumber { + return obj.obj +} + +func (obj *patternFlowIcmpEchoSequenceNumber) setMsg(msg *otg.PatternFlowIcmpEchoSequenceNumber) PatternFlowIcmpEchoSequenceNumber { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpEchoSequenceNumber struct { + obj *patternFlowIcmpEchoSequenceNumber +} + +type marshalPatternFlowIcmpEchoSequenceNumber interface { + // ToProto marshals PatternFlowIcmpEchoSequenceNumber to protobuf object *otg.PatternFlowIcmpEchoSequenceNumber + ToProto() (*otg.PatternFlowIcmpEchoSequenceNumber, error) + // ToPbText marshals PatternFlowIcmpEchoSequenceNumber to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpEchoSequenceNumber to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpEchoSequenceNumber to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpEchoSequenceNumber struct { + obj *patternFlowIcmpEchoSequenceNumber +} + +type unMarshalPatternFlowIcmpEchoSequenceNumber interface { + // FromProto unmarshals PatternFlowIcmpEchoSequenceNumber from protobuf object *otg.PatternFlowIcmpEchoSequenceNumber + FromProto(msg *otg.PatternFlowIcmpEchoSequenceNumber) (PatternFlowIcmpEchoSequenceNumber, error) + // FromPbText unmarshals PatternFlowIcmpEchoSequenceNumber from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpEchoSequenceNumber from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpEchoSequenceNumber from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpEchoSequenceNumber) Marshal() marshalPatternFlowIcmpEchoSequenceNumber { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpEchoSequenceNumber{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpEchoSequenceNumber) Unmarshal() unMarshalPatternFlowIcmpEchoSequenceNumber { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpEchoSequenceNumber{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpEchoSequenceNumber) ToProto() (*otg.PatternFlowIcmpEchoSequenceNumber, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpEchoSequenceNumber) FromProto(msg *otg.PatternFlowIcmpEchoSequenceNumber) (PatternFlowIcmpEchoSequenceNumber, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpEchoSequenceNumber) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpEchoSequenceNumber) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpEchoSequenceNumber) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoSequenceNumber) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpEchoSequenceNumber) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoSequenceNumber) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpEchoSequenceNumber) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoSequenceNumber) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoSequenceNumber) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpEchoSequenceNumber) Clone() (PatternFlowIcmpEchoSequenceNumber, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpEchoSequenceNumber() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIcmpEchoSequenceNumber) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIcmpEchoSequenceNumber is iCMP sequence number +type PatternFlowIcmpEchoSequenceNumber interface { + Validation + // msg marshals PatternFlowIcmpEchoSequenceNumber to protobuf object *otg.PatternFlowIcmpEchoSequenceNumber + // and doesn't set defaults + msg() *otg.PatternFlowIcmpEchoSequenceNumber + // setMsg unmarshals PatternFlowIcmpEchoSequenceNumber from protobuf object *otg.PatternFlowIcmpEchoSequenceNumber + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpEchoSequenceNumber) PatternFlowIcmpEchoSequenceNumber + // provides marshal interface + Marshal() marshalPatternFlowIcmpEchoSequenceNumber + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpEchoSequenceNumber + // validate validates PatternFlowIcmpEchoSequenceNumber + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpEchoSequenceNumber, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIcmpEchoSequenceNumberChoiceEnum, set in PatternFlowIcmpEchoSequenceNumber + Choice() PatternFlowIcmpEchoSequenceNumberChoiceEnum + // setChoice assigns PatternFlowIcmpEchoSequenceNumberChoiceEnum provided by user to PatternFlowIcmpEchoSequenceNumber + setChoice(value PatternFlowIcmpEchoSequenceNumberChoiceEnum) PatternFlowIcmpEchoSequenceNumber + // HasChoice checks if Choice has been set in PatternFlowIcmpEchoSequenceNumber + HasChoice() bool + // Value returns uint32, set in PatternFlowIcmpEchoSequenceNumber. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIcmpEchoSequenceNumber + SetValue(value uint32) PatternFlowIcmpEchoSequenceNumber + // HasValue checks if Value has been set in PatternFlowIcmpEchoSequenceNumber + HasValue() bool + // Values returns []uint32, set in PatternFlowIcmpEchoSequenceNumber. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIcmpEchoSequenceNumber + SetValues(value []uint32) PatternFlowIcmpEchoSequenceNumber + // Increment returns PatternFlowIcmpEchoSequenceNumberCounter, set in PatternFlowIcmpEchoSequenceNumber. + // PatternFlowIcmpEchoSequenceNumberCounter is integer counter pattern + Increment() PatternFlowIcmpEchoSequenceNumberCounter + // SetIncrement assigns PatternFlowIcmpEchoSequenceNumberCounter provided by user to PatternFlowIcmpEchoSequenceNumber. + // PatternFlowIcmpEchoSequenceNumberCounter is integer counter pattern + SetIncrement(value PatternFlowIcmpEchoSequenceNumberCounter) PatternFlowIcmpEchoSequenceNumber + // HasIncrement checks if Increment has been set in PatternFlowIcmpEchoSequenceNumber + HasIncrement() bool + // Decrement returns PatternFlowIcmpEchoSequenceNumberCounter, set in PatternFlowIcmpEchoSequenceNumber. + // PatternFlowIcmpEchoSequenceNumberCounter is integer counter pattern + Decrement() PatternFlowIcmpEchoSequenceNumberCounter + // SetDecrement assigns PatternFlowIcmpEchoSequenceNumberCounter provided by user to PatternFlowIcmpEchoSequenceNumber. + // PatternFlowIcmpEchoSequenceNumberCounter is integer counter pattern + SetDecrement(value PatternFlowIcmpEchoSequenceNumberCounter) PatternFlowIcmpEchoSequenceNumber + // HasDecrement checks if Decrement has been set in PatternFlowIcmpEchoSequenceNumber + HasDecrement() bool + // MetricTags returns PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIterIter, set in PatternFlowIcmpEchoSequenceNumber + MetricTags() PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter + setNil() +} + +type PatternFlowIcmpEchoSequenceNumberChoiceEnum string + +// Enum of Choice on PatternFlowIcmpEchoSequenceNumber +var PatternFlowIcmpEchoSequenceNumberChoice = struct { + VALUE PatternFlowIcmpEchoSequenceNumberChoiceEnum + VALUES PatternFlowIcmpEchoSequenceNumberChoiceEnum + INCREMENT PatternFlowIcmpEchoSequenceNumberChoiceEnum + DECREMENT PatternFlowIcmpEchoSequenceNumberChoiceEnum +}{ + VALUE: PatternFlowIcmpEchoSequenceNumberChoiceEnum("value"), + VALUES: PatternFlowIcmpEchoSequenceNumberChoiceEnum("values"), + INCREMENT: PatternFlowIcmpEchoSequenceNumberChoiceEnum("increment"), + DECREMENT: PatternFlowIcmpEchoSequenceNumberChoiceEnum("decrement"), +} + +func (obj *patternFlowIcmpEchoSequenceNumber) Choice() PatternFlowIcmpEchoSequenceNumberChoiceEnum { + return PatternFlowIcmpEchoSequenceNumberChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIcmpEchoSequenceNumber) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIcmpEchoSequenceNumber) setChoice(value PatternFlowIcmpEchoSequenceNumberChoiceEnum) PatternFlowIcmpEchoSequenceNumber { + intValue, ok := otg.PatternFlowIcmpEchoSequenceNumber_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIcmpEchoSequenceNumberChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIcmpEchoSequenceNumber_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIcmpEchoSequenceNumberChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIcmpEchoSequenceNumberChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIcmpEchoSequenceNumberChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIcmpEchoSequenceNumberCounter().msg() + } + + if value == PatternFlowIcmpEchoSequenceNumberChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIcmpEchoSequenceNumberCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpEchoSequenceNumber) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIcmpEchoSequenceNumberChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpEchoSequenceNumber) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIcmpEchoSequenceNumber object +func (obj *patternFlowIcmpEchoSequenceNumber) SetValue(value uint32) PatternFlowIcmpEchoSequenceNumber { + obj.setChoice(PatternFlowIcmpEchoSequenceNumberChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIcmpEchoSequenceNumber) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIcmpEchoSequenceNumber object +func (obj *patternFlowIcmpEchoSequenceNumber) SetValues(value []uint32) PatternFlowIcmpEchoSequenceNumber { + obj.setChoice(PatternFlowIcmpEchoSequenceNumberChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIcmpEchoSequenceNumberCounter +func (obj *patternFlowIcmpEchoSequenceNumber) Increment() PatternFlowIcmpEchoSequenceNumberCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIcmpEchoSequenceNumberChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIcmpEchoSequenceNumberCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIcmpEchoSequenceNumberCounter +func (obj *patternFlowIcmpEchoSequenceNumber) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIcmpEchoSequenceNumberCounter value in the PatternFlowIcmpEchoSequenceNumber object +func (obj *patternFlowIcmpEchoSequenceNumber) SetIncrement(value PatternFlowIcmpEchoSequenceNumberCounter) PatternFlowIcmpEchoSequenceNumber { + obj.setChoice(PatternFlowIcmpEchoSequenceNumberChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIcmpEchoSequenceNumberCounter +func (obj *patternFlowIcmpEchoSequenceNumber) Decrement() PatternFlowIcmpEchoSequenceNumberCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIcmpEchoSequenceNumberChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIcmpEchoSequenceNumberCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIcmpEchoSequenceNumberCounter +func (obj *patternFlowIcmpEchoSequenceNumber) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIcmpEchoSequenceNumberCounter value in the PatternFlowIcmpEchoSequenceNumber object +func (obj *patternFlowIcmpEchoSequenceNumber) SetDecrement(value PatternFlowIcmpEchoSequenceNumberCounter) PatternFlowIcmpEchoSequenceNumber { + obj.setChoice(PatternFlowIcmpEchoSequenceNumberChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIcmpEchoSequenceNumberMetricTag +func (obj *patternFlowIcmpEchoSequenceNumber) MetricTags() PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIcmpEchoSequenceNumberMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter struct { + obj *patternFlowIcmpEchoSequenceNumber + patternFlowIcmpEchoSequenceNumberMetricTagSlice []PatternFlowIcmpEchoSequenceNumberMetricTag + fieldPtr *[]*otg.PatternFlowIcmpEchoSequenceNumberMetricTag +} + +func newPatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter(ptr *[]*otg.PatternFlowIcmpEchoSequenceNumberMetricTag) PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter { + return &patternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter interface { + setMsg(*patternFlowIcmpEchoSequenceNumber) PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter + Items() []PatternFlowIcmpEchoSequenceNumberMetricTag + Add() PatternFlowIcmpEchoSequenceNumberMetricTag + Append(items ...PatternFlowIcmpEchoSequenceNumberMetricTag) PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter + Set(index int, newObj PatternFlowIcmpEchoSequenceNumberMetricTag) PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter + Clear() PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter + clearHolderSlice() PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter + appendHolderSlice(item PatternFlowIcmpEchoSequenceNumberMetricTag) PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter +} + +func (obj *patternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter) setMsg(msg *patternFlowIcmpEchoSequenceNumber) PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIcmpEchoSequenceNumberMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter) Items() []PatternFlowIcmpEchoSequenceNumberMetricTag { + return obj.patternFlowIcmpEchoSequenceNumberMetricTagSlice +} + +func (obj *patternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter) Add() PatternFlowIcmpEchoSequenceNumberMetricTag { + newObj := &otg.PatternFlowIcmpEchoSequenceNumberMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIcmpEchoSequenceNumberMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIcmpEchoSequenceNumberMetricTagSlice = append(obj.patternFlowIcmpEchoSequenceNumberMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter) Append(items ...PatternFlowIcmpEchoSequenceNumberMetricTag) PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIcmpEchoSequenceNumberMetricTagSlice = append(obj.patternFlowIcmpEchoSequenceNumberMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter) Set(index int, newObj PatternFlowIcmpEchoSequenceNumberMetricTag) PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIcmpEchoSequenceNumberMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter) Clear() PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIcmpEchoSequenceNumberMetricTag{} + obj.patternFlowIcmpEchoSequenceNumberMetricTagSlice = []PatternFlowIcmpEchoSequenceNumberMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter) clearHolderSlice() PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter { + if len(obj.patternFlowIcmpEchoSequenceNumberMetricTagSlice) > 0 { + obj.patternFlowIcmpEchoSequenceNumberMetricTagSlice = []PatternFlowIcmpEchoSequenceNumberMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter) appendHolderSlice(item PatternFlowIcmpEchoSequenceNumberMetricTag) PatternFlowIcmpEchoSequenceNumberPatternFlowIcmpEchoSequenceNumberMetricTagIter { + obj.patternFlowIcmpEchoSequenceNumberMetricTagSlice = append(obj.patternFlowIcmpEchoSequenceNumberMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIcmpEchoSequenceNumber) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoSequenceNumber.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIcmpEchoSequenceNumber.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIcmpEchoSequenceNumberMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIcmpEchoSequenceNumber) setDefault() { + var choices_set int = 0 + var choice PatternFlowIcmpEchoSequenceNumberChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIcmpEchoSequenceNumberChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIcmpEchoSequenceNumberChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIcmpEchoSequenceNumberChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIcmpEchoSequenceNumberChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIcmpEchoSequenceNumberChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIcmpEchoSequenceNumber") + } + } else { + intVal := otg.PatternFlowIcmpEchoSequenceNumber_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIcmpEchoSequenceNumber_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_icmp_echo_sequence_number_counter.go b/gosnappi/pattern_flow_icmp_echo_sequence_number_counter.go new file mode 100644 index 00000000..002ba3b6 --- /dev/null +++ b/gosnappi/pattern_flow_icmp_echo_sequence_number_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpEchoSequenceNumberCounter ***** +type patternFlowIcmpEchoSequenceNumberCounter struct { + validation + obj *otg.PatternFlowIcmpEchoSequenceNumberCounter + marshaller marshalPatternFlowIcmpEchoSequenceNumberCounter + unMarshaller unMarshalPatternFlowIcmpEchoSequenceNumberCounter +} + +func NewPatternFlowIcmpEchoSequenceNumberCounter() PatternFlowIcmpEchoSequenceNumberCounter { + obj := patternFlowIcmpEchoSequenceNumberCounter{obj: &otg.PatternFlowIcmpEchoSequenceNumberCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpEchoSequenceNumberCounter) msg() *otg.PatternFlowIcmpEchoSequenceNumberCounter { + return obj.obj +} + +func (obj *patternFlowIcmpEchoSequenceNumberCounter) setMsg(msg *otg.PatternFlowIcmpEchoSequenceNumberCounter) PatternFlowIcmpEchoSequenceNumberCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpEchoSequenceNumberCounter struct { + obj *patternFlowIcmpEchoSequenceNumberCounter +} + +type marshalPatternFlowIcmpEchoSequenceNumberCounter interface { + // ToProto marshals PatternFlowIcmpEchoSequenceNumberCounter to protobuf object *otg.PatternFlowIcmpEchoSequenceNumberCounter + ToProto() (*otg.PatternFlowIcmpEchoSequenceNumberCounter, error) + // ToPbText marshals PatternFlowIcmpEchoSequenceNumberCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpEchoSequenceNumberCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpEchoSequenceNumberCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpEchoSequenceNumberCounter struct { + obj *patternFlowIcmpEchoSequenceNumberCounter +} + +type unMarshalPatternFlowIcmpEchoSequenceNumberCounter interface { + // FromProto unmarshals PatternFlowIcmpEchoSequenceNumberCounter from protobuf object *otg.PatternFlowIcmpEchoSequenceNumberCounter + FromProto(msg *otg.PatternFlowIcmpEchoSequenceNumberCounter) (PatternFlowIcmpEchoSequenceNumberCounter, error) + // FromPbText unmarshals PatternFlowIcmpEchoSequenceNumberCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpEchoSequenceNumberCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpEchoSequenceNumberCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpEchoSequenceNumberCounter) Marshal() marshalPatternFlowIcmpEchoSequenceNumberCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpEchoSequenceNumberCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpEchoSequenceNumberCounter) Unmarshal() unMarshalPatternFlowIcmpEchoSequenceNumberCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpEchoSequenceNumberCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpEchoSequenceNumberCounter) ToProto() (*otg.PatternFlowIcmpEchoSequenceNumberCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpEchoSequenceNumberCounter) FromProto(msg *otg.PatternFlowIcmpEchoSequenceNumberCounter) (PatternFlowIcmpEchoSequenceNumberCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpEchoSequenceNumberCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpEchoSequenceNumberCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpEchoSequenceNumberCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoSequenceNumberCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpEchoSequenceNumberCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoSequenceNumberCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpEchoSequenceNumberCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoSequenceNumberCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoSequenceNumberCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpEchoSequenceNumberCounter) Clone() (PatternFlowIcmpEchoSequenceNumberCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpEchoSequenceNumberCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpEchoSequenceNumberCounter is integer counter pattern +type PatternFlowIcmpEchoSequenceNumberCounter interface { + Validation + // msg marshals PatternFlowIcmpEchoSequenceNumberCounter to protobuf object *otg.PatternFlowIcmpEchoSequenceNumberCounter + // and doesn't set defaults + msg() *otg.PatternFlowIcmpEchoSequenceNumberCounter + // setMsg unmarshals PatternFlowIcmpEchoSequenceNumberCounter from protobuf object *otg.PatternFlowIcmpEchoSequenceNumberCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpEchoSequenceNumberCounter) PatternFlowIcmpEchoSequenceNumberCounter + // provides marshal interface + Marshal() marshalPatternFlowIcmpEchoSequenceNumberCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpEchoSequenceNumberCounter + // validate validates PatternFlowIcmpEchoSequenceNumberCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpEchoSequenceNumberCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIcmpEchoSequenceNumberCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIcmpEchoSequenceNumberCounter + SetStart(value uint32) PatternFlowIcmpEchoSequenceNumberCounter + // HasStart checks if Start has been set in PatternFlowIcmpEchoSequenceNumberCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIcmpEchoSequenceNumberCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIcmpEchoSequenceNumberCounter + SetStep(value uint32) PatternFlowIcmpEchoSequenceNumberCounter + // HasStep checks if Step has been set in PatternFlowIcmpEchoSequenceNumberCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIcmpEchoSequenceNumberCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIcmpEchoSequenceNumberCounter + SetCount(value uint32) PatternFlowIcmpEchoSequenceNumberCounter + // HasCount checks if Count has been set in PatternFlowIcmpEchoSequenceNumberCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpEchoSequenceNumberCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpEchoSequenceNumberCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIcmpEchoSequenceNumberCounter object +func (obj *patternFlowIcmpEchoSequenceNumberCounter) SetStart(value uint32) PatternFlowIcmpEchoSequenceNumberCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpEchoSequenceNumberCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpEchoSequenceNumberCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIcmpEchoSequenceNumberCounter object +func (obj *patternFlowIcmpEchoSequenceNumberCounter) SetStep(value uint32) PatternFlowIcmpEchoSequenceNumberCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpEchoSequenceNumberCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpEchoSequenceNumberCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIcmpEchoSequenceNumberCounter object +func (obj *patternFlowIcmpEchoSequenceNumberCounter) SetCount(value uint32) PatternFlowIcmpEchoSequenceNumberCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIcmpEchoSequenceNumberCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoSequenceNumberCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoSequenceNumberCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoSequenceNumberCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIcmpEchoSequenceNumberCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_icmp_echo_sequence_number_metric_tag.go b/gosnappi/pattern_flow_icmp_echo_sequence_number_metric_tag.go new file mode 100644 index 00000000..27a81b29 --- /dev/null +++ b/gosnappi/pattern_flow_icmp_echo_sequence_number_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpEchoSequenceNumberMetricTag ***** +type patternFlowIcmpEchoSequenceNumberMetricTag struct { + validation + obj *otg.PatternFlowIcmpEchoSequenceNumberMetricTag + marshaller marshalPatternFlowIcmpEchoSequenceNumberMetricTag + unMarshaller unMarshalPatternFlowIcmpEchoSequenceNumberMetricTag +} + +func NewPatternFlowIcmpEchoSequenceNumberMetricTag() PatternFlowIcmpEchoSequenceNumberMetricTag { + obj := patternFlowIcmpEchoSequenceNumberMetricTag{obj: &otg.PatternFlowIcmpEchoSequenceNumberMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) msg() *otg.PatternFlowIcmpEchoSequenceNumberMetricTag { + return obj.obj +} + +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) setMsg(msg *otg.PatternFlowIcmpEchoSequenceNumberMetricTag) PatternFlowIcmpEchoSequenceNumberMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpEchoSequenceNumberMetricTag struct { + obj *patternFlowIcmpEchoSequenceNumberMetricTag +} + +type marshalPatternFlowIcmpEchoSequenceNumberMetricTag interface { + // ToProto marshals PatternFlowIcmpEchoSequenceNumberMetricTag to protobuf object *otg.PatternFlowIcmpEchoSequenceNumberMetricTag + ToProto() (*otg.PatternFlowIcmpEchoSequenceNumberMetricTag, error) + // ToPbText marshals PatternFlowIcmpEchoSequenceNumberMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpEchoSequenceNumberMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpEchoSequenceNumberMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpEchoSequenceNumberMetricTag struct { + obj *patternFlowIcmpEchoSequenceNumberMetricTag +} + +type unMarshalPatternFlowIcmpEchoSequenceNumberMetricTag interface { + // FromProto unmarshals PatternFlowIcmpEchoSequenceNumberMetricTag from protobuf object *otg.PatternFlowIcmpEchoSequenceNumberMetricTag + FromProto(msg *otg.PatternFlowIcmpEchoSequenceNumberMetricTag) (PatternFlowIcmpEchoSequenceNumberMetricTag, error) + // FromPbText unmarshals PatternFlowIcmpEchoSequenceNumberMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpEchoSequenceNumberMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpEchoSequenceNumberMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) Marshal() marshalPatternFlowIcmpEchoSequenceNumberMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpEchoSequenceNumberMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) Unmarshal() unMarshalPatternFlowIcmpEchoSequenceNumberMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpEchoSequenceNumberMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpEchoSequenceNumberMetricTag) ToProto() (*otg.PatternFlowIcmpEchoSequenceNumberMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpEchoSequenceNumberMetricTag) FromProto(msg *otg.PatternFlowIcmpEchoSequenceNumberMetricTag) (PatternFlowIcmpEchoSequenceNumberMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpEchoSequenceNumberMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpEchoSequenceNumberMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpEchoSequenceNumberMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoSequenceNumberMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpEchoSequenceNumberMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoSequenceNumberMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) Clone() (PatternFlowIcmpEchoSequenceNumberMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpEchoSequenceNumberMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpEchoSequenceNumberMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIcmpEchoSequenceNumberMetricTag interface { + Validation + // msg marshals PatternFlowIcmpEchoSequenceNumberMetricTag to protobuf object *otg.PatternFlowIcmpEchoSequenceNumberMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIcmpEchoSequenceNumberMetricTag + // setMsg unmarshals PatternFlowIcmpEchoSequenceNumberMetricTag from protobuf object *otg.PatternFlowIcmpEchoSequenceNumberMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpEchoSequenceNumberMetricTag) PatternFlowIcmpEchoSequenceNumberMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIcmpEchoSequenceNumberMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpEchoSequenceNumberMetricTag + // validate validates PatternFlowIcmpEchoSequenceNumberMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpEchoSequenceNumberMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIcmpEchoSequenceNumberMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIcmpEchoSequenceNumberMetricTag + SetName(value string) PatternFlowIcmpEchoSequenceNumberMetricTag + // Offset returns uint32, set in PatternFlowIcmpEchoSequenceNumberMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIcmpEchoSequenceNumberMetricTag + SetOffset(value uint32) PatternFlowIcmpEchoSequenceNumberMetricTag + // HasOffset checks if Offset has been set in PatternFlowIcmpEchoSequenceNumberMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIcmpEchoSequenceNumberMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIcmpEchoSequenceNumberMetricTag + SetLength(value uint32) PatternFlowIcmpEchoSequenceNumberMetricTag + // HasLength checks if Length has been set in PatternFlowIcmpEchoSequenceNumberMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIcmpEchoSequenceNumberMetricTag object +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) SetName(value string) PatternFlowIcmpEchoSequenceNumberMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIcmpEchoSequenceNumberMetricTag object +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) SetOffset(value uint32) PatternFlowIcmpEchoSequenceNumberMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIcmpEchoSequenceNumberMetricTag object +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) SetLength(value uint32) PatternFlowIcmpEchoSequenceNumberMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIcmpEchoSequenceNumberMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoSequenceNumberMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIcmpEchoSequenceNumberMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIcmpEchoSequenceNumberMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_icmp_echo_type.go b/gosnappi/pattern_flow_icmp_echo_type.go new file mode 100644 index 00000000..a99fa413 --- /dev/null +++ b/gosnappi/pattern_flow_icmp_echo_type.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpEchoType ***** +type patternFlowIcmpEchoType struct { + validation + obj *otg.PatternFlowIcmpEchoType + marshaller marshalPatternFlowIcmpEchoType + unMarshaller unMarshalPatternFlowIcmpEchoType + incrementHolder PatternFlowIcmpEchoTypeCounter + decrementHolder PatternFlowIcmpEchoTypeCounter + metricTagsHolder PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter +} + +func NewPatternFlowIcmpEchoType() PatternFlowIcmpEchoType { + obj := patternFlowIcmpEchoType{obj: &otg.PatternFlowIcmpEchoType{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpEchoType) msg() *otg.PatternFlowIcmpEchoType { + return obj.obj +} + +func (obj *patternFlowIcmpEchoType) setMsg(msg *otg.PatternFlowIcmpEchoType) PatternFlowIcmpEchoType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpEchoType struct { + obj *patternFlowIcmpEchoType +} + +type marshalPatternFlowIcmpEchoType interface { + // ToProto marshals PatternFlowIcmpEchoType to protobuf object *otg.PatternFlowIcmpEchoType + ToProto() (*otg.PatternFlowIcmpEchoType, error) + // ToPbText marshals PatternFlowIcmpEchoType to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpEchoType to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpEchoType to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpEchoType struct { + obj *patternFlowIcmpEchoType +} + +type unMarshalPatternFlowIcmpEchoType interface { + // FromProto unmarshals PatternFlowIcmpEchoType from protobuf object *otg.PatternFlowIcmpEchoType + FromProto(msg *otg.PatternFlowIcmpEchoType) (PatternFlowIcmpEchoType, error) + // FromPbText unmarshals PatternFlowIcmpEchoType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpEchoType from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpEchoType from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpEchoType) Marshal() marshalPatternFlowIcmpEchoType { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpEchoType{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpEchoType) Unmarshal() unMarshalPatternFlowIcmpEchoType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpEchoType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpEchoType) ToProto() (*otg.PatternFlowIcmpEchoType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpEchoType) FromProto(msg *otg.PatternFlowIcmpEchoType) (PatternFlowIcmpEchoType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpEchoType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpEchoType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpEchoType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpEchoType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpEchoType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpEchoType) Clone() (PatternFlowIcmpEchoType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpEchoType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIcmpEchoType) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIcmpEchoType is the type of ICMP echo packet +type PatternFlowIcmpEchoType interface { + Validation + // msg marshals PatternFlowIcmpEchoType to protobuf object *otg.PatternFlowIcmpEchoType + // and doesn't set defaults + msg() *otg.PatternFlowIcmpEchoType + // setMsg unmarshals PatternFlowIcmpEchoType from protobuf object *otg.PatternFlowIcmpEchoType + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpEchoType) PatternFlowIcmpEchoType + // provides marshal interface + Marshal() marshalPatternFlowIcmpEchoType + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpEchoType + // validate validates PatternFlowIcmpEchoType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpEchoType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIcmpEchoTypeChoiceEnum, set in PatternFlowIcmpEchoType + Choice() PatternFlowIcmpEchoTypeChoiceEnum + // setChoice assigns PatternFlowIcmpEchoTypeChoiceEnum provided by user to PatternFlowIcmpEchoType + setChoice(value PatternFlowIcmpEchoTypeChoiceEnum) PatternFlowIcmpEchoType + // HasChoice checks if Choice has been set in PatternFlowIcmpEchoType + HasChoice() bool + // Value returns uint32, set in PatternFlowIcmpEchoType. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIcmpEchoType + SetValue(value uint32) PatternFlowIcmpEchoType + // HasValue checks if Value has been set in PatternFlowIcmpEchoType + HasValue() bool + // Values returns []uint32, set in PatternFlowIcmpEchoType. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIcmpEchoType + SetValues(value []uint32) PatternFlowIcmpEchoType + // Increment returns PatternFlowIcmpEchoTypeCounter, set in PatternFlowIcmpEchoType. + // PatternFlowIcmpEchoTypeCounter is integer counter pattern + Increment() PatternFlowIcmpEchoTypeCounter + // SetIncrement assigns PatternFlowIcmpEchoTypeCounter provided by user to PatternFlowIcmpEchoType. + // PatternFlowIcmpEchoTypeCounter is integer counter pattern + SetIncrement(value PatternFlowIcmpEchoTypeCounter) PatternFlowIcmpEchoType + // HasIncrement checks if Increment has been set in PatternFlowIcmpEchoType + HasIncrement() bool + // Decrement returns PatternFlowIcmpEchoTypeCounter, set in PatternFlowIcmpEchoType. + // PatternFlowIcmpEchoTypeCounter is integer counter pattern + Decrement() PatternFlowIcmpEchoTypeCounter + // SetDecrement assigns PatternFlowIcmpEchoTypeCounter provided by user to PatternFlowIcmpEchoType. + // PatternFlowIcmpEchoTypeCounter is integer counter pattern + SetDecrement(value PatternFlowIcmpEchoTypeCounter) PatternFlowIcmpEchoType + // HasDecrement checks if Decrement has been set in PatternFlowIcmpEchoType + HasDecrement() bool + // MetricTags returns PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIterIter, set in PatternFlowIcmpEchoType + MetricTags() PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter + setNil() +} + +type PatternFlowIcmpEchoTypeChoiceEnum string + +// Enum of Choice on PatternFlowIcmpEchoType +var PatternFlowIcmpEchoTypeChoice = struct { + VALUE PatternFlowIcmpEchoTypeChoiceEnum + VALUES PatternFlowIcmpEchoTypeChoiceEnum + INCREMENT PatternFlowIcmpEchoTypeChoiceEnum + DECREMENT PatternFlowIcmpEchoTypeChoiceEnum +}{ + VALUE: PatternFlowIcmpEchoTypeChoiceEnum("value"), + VALUES: PatternFlowIcmpEchoTypeChoiceEnum("values"), + INCREMENT: PatternFlowIcmpEchoTypeChoiceEnum("increment"), + DECREMENT: PatternFlowIcmpEchoTypeChoiceEnum("decrement"), +} + +func (obj *patternFlowIcmpEchoType) Choice() PatternFlowIcmpEchoTypeChoiceEnum { + return PatternFlowIcmpEchoTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIcmpEchoType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIcmpEchoType) setChoice(value PatternFlowIcmpEchoTypeChoiceEnum) PatternFlowIcmpEchoType { + intValue, ok := otg.PatternFlowIcmpEchoType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIcmpEchoTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIcmpEchoType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIcmpEchoTypeChoice.VALUE { + defaultValue := uint32(8) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIcmpEchoTypeChoice.VALUES { + defaultValue := []uint32{8} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIcmpEchoTypeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIcmpEchoTypeCounter().msg() + } + + if value == PatternFlowIcmpEchoTypeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIcmpEchoTypeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpEchoType) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIcmpEchoTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpEchoType) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIcmpEchoType object +func (obj *patternFlowIcmpEchoType) SetValue(value uint32) PatternFlowIcmpEchoType { + obj.setChoice(PatternFlowIcmpEchoTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIcmpEchoType) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{8}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIcmpEchoType object +func (obj *patternFlowIcmpEchoType) SetValues(value []uint32) PatternFlowIcmpEchoType { + obj.setChoice(PatternFlowIcmpEchoTypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIcmpEchoTypeCounter +func (obj *patternFlowIcmpEchoType) Increment() PatternFlowIcmpEchoTypeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIcmpEchoTypeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIcmpEchoTypeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIcmpEchoTypeCounter +func (obj *patternFlowIcmpEchoType) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIcmpEchoTypeCounter value in the PatternFlowIcmpEchoType object +func (obj *patternFlowIcmpEchoType) SetIncrement(value PatternFlowIcmpEchoTypeCounter) PatternFlowIcmpEchoType { + obj.setChoice(PatternFlowIcmpEchoTypeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIcmpEchoTypeCounter +func (obj *patternFlowIcmpEchoType) Decrement() PatternFlowIcmpEchoTypeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIcmpEchoTypeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIcmpEchoTypeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIcmpEchoTypeCounter +func (obj *patternFlowIcmpEchoType) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIcmpEchoTypeCounter value in the PatternFlowIcmpEchoType object +func (obj *patternFlowIcmpEchoType) SetDecrement(value PatternFlowIcmpEchoTypeCounter) PatternFlowIcmpEchoType { + obj.setChoice(PatternFlowIcmpEchoTypeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIcmpEchoTypeMetricTag +func (obj *patternFlowIcmpEchoType) MetricTags() PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIcmpEchoTypeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter struct { + obj *patternFlowIcmpEchoType + patternFlowIcmpEchoTypeMetricTagSlice []PatternFlowIcmpEchoTypeMetricTag + fieldPtr *[]*otg.PatternFlowIcmpEchoTypeMetricTag +} + +func newPatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter(ptr *[]*otg.PatternFlowIcmpEchoTypeMetricTag) PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter { + return &patternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter interface { + setMsg(*patternFlowIcmpEchoType) PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter + Items() []PatternFlowIcmpEchoTypeMetricTag + Add() PatternFlowIcmpEchoTypeMetricTag + Append(items ...PatternFlowIcmpEchoTypeMetricTag) PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter + Set(index int, newObj PatternFlowIcmpEchoTypeMetricTag) PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter + Clear() PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter + clearHolderSlice() PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter + appendHolderSlice(item PatternFlowIcmpEchoTypeMetricTag) PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter +} + +func (obj *patternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter) setMsg(msg *patternFlowIcmpEchoType) PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIcmpEchoTypeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter) Items() []PatternFlowIcmpEchoTypeMetricTag { + return obj.patternFlowIcmpEchoTypeMetricTagSlice +} + +func (obj *patternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter) Add() PatternFlowIcmpEchoTypeMetricTag { + newObj := &otg.PatternFlowIcmpEchoTypeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIcmpEchoTypeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIcmpEchoTypeMetricTagSlice = append(obj.patternFlowIcmpEchoTypeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter) Append(items ...PatternFlowIcmpEchoTypeMetricTag) PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIcmpEchoTypeMetricTagSlice = append(obj.patternFlowIcmpEchoTypeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter) Set(index int, newObj PatternFlowIcmpEchoTypeMetricTag) PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIcmpEchoTypeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter) Clear() PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIcmpEchoTypeMetricTag{} + obj.patternFlowIcmpEchoTypeMetricTagSlice = []PatternFlowIcmpEchoTypeMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter) clearHolderSlice() PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter { + if len(obj.patternFlowIcmpEchoTypeMetricTagSlice) > 0 { + obj.patternFlowIcmpEchoTypeMetricTagSlice = []PatternFlowIcmpEchoTypeMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter) appendHolderSlice(item PatternFlowIcmpEchoTypeMetricTag) PatternFlowIcmpEchoTypePatternFlowIcmpEchoTypeMetricTagIter { + obj.patternFlowIcmpEchoTypeMetricTagSlice = append(obj.patternFlowIcmpEchoTypeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIcmpEchoType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoType.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIcmpEchoType.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIcmpEchoTypeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIcmpEchoType) setDefault() { + var choices_set int = 0 + var choice PatternFlowIcmpEchoTypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIcmpEchoTypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIcmpEchoTypeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIcmpEchoTypeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIcmpEchoTypeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIcmpEchoTypeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIcmpEchoType") + } + } else { + intVal := otg.PatternFlowIcmpEchoType_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIcmpEchoType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_icmp_echo_type_counter.go b/gosnappi/pattern_flow_icmp_echo_type_counter.go new file mode 100644 index 00000000..739ccdee --- /dev/null +++ b/gosnappi/pattern_flow_icmp_echo_type_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpEchoTypeCounter ***** +type patternFlowIcmpEchoTypeCounter struct { + validation + obj *otg.PatternFlowIcmpEchoTypeCounter + marshaller marshalPatternFlowIcmpEchoTypeCounter + unMarshaller unMarshalPatternFlowIcmpEchoTypeCounter +} + +func NewPatternFlowIcmpEchoTypeCounter() PatternFlowIcmpEchoTypeCounter { + obj := patternFlowIcmpEchoTypeCounter{obj: &otg.PatternFlowIcmpEchoTypeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpEchoTypeCounter) msg() *otg.PatternFlowIcmpEchoTypeCounter { + return obj.obj +} + +func (obj *patternFlowIcmpEchoTypeCounter) setMsg(msg *otg.PatternFlowIcmpEchoTypeCounter) PatternFlowIcmpEchoTypeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpEchoTypeCounter struct { + obj *patternFlowIcmpEchoTypeCounter +} + +type marshalPatternFlowIcmpEchoTypeCounter interface { + // ToProto marshals PatternFlowIcmpEchoTypeCounter to protobuf object *otg.PatternFlowIcmpEchoTypeCounter + ToProto() (*otg.PatternFlowIcmpEchoTypeCounter, error) + // ToPbText marshals PatternFlowIcmpEchoTypeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpEchoTypeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpEchoTypeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpEchoTypeCounter struct { + obj *patternFlowIcmpEchoTypeCounter +} + +type unMarshalPatternFlowIcmpEchoTypeCounter interface { + // FromProto unmarshals PatternFlowIcmpEchoTypeCounter from protobuf object *otg.PatternFlowIcmpEchoTypeCounter + FromProto(msg *otg.PatternFlowIcmpEchoTypeCounter) (PatternFlowIcmpEchoTypeCounter, error) + // FromPbText unmarshals PatternFlowIcmpEchoTypeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpEchoTypeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpEchoTypeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpEchoTypeCounter) Marshal() marshalPatternFlowIcmpEchoTypeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpEchoTypeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpEchoTypeCounter) Unmarshal() unMarshalPatternFlowIcmpEchoTypeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpEchoTypeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpEchoTypeCounter) ToProto() (*otg.PatternFlowIcmpEchoTypeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpEchoTypeCounter) FromProto(msg *otg.PatternFlowIcmpEchoTypeCounter) (PatternFlowIcmpEchoTypeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpEchoTypeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpEchoTypeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpEchoTypeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoTypeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpEchoTypeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoTypeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpEchoTypeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoTypeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoTypeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpEchoTypeCounter) Clone() (PatternFlowIcmpEchoTypeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpEchoTypeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpEchoTypeCounter is integer counter pattern +type PatternFlowIcmpEchoTypeCounter interface { + Validation + // msg marshals PatternFlowIcmpEchoTypeCounter to protobuf object *otg.PatternFlowIcmpEchoTypeCounter + // and doesn't set defaults + msg() *otg.PatternFlowIcmpEchoTypeCounter + // setMsg unmarshals PatternFlowIcmpEchoTypeCounter from protobuf object *otg.PatternFlowIcmpEchoTypeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpEchoTypeCounter) PatternFlowIcmpEchoTypeCounter + // provides marshal interface + Marshal() marshalPatternFlowIcmpEchoTypeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpEchoTypeCounter + // validate validates PatternFlowIcmpEchoTypeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpEchoTypeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIcmpEchoTypeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIcmpEchoTypeCounter + SetStart(value uint32) PatternFlowIcmpEchoTypeCounter + // HasStart checks if Start has been set in PatternFlowIcmpEchoTypeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIcmpEchoTypeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIcmpEchoTypeCounter + SetStep(value uint32) PatternFlowIcmpEchoTypeCounter + // HasStep checks if Step has been set in PatternFlowIcmpEchoTypeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIcmpEchoTypeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIcmpEchoTypeCounter + SetCount(value uint32) PatternFlowIcmpEchoTypeCounter + // HasCount checks if Count has been set in PatternFlowIcmpEchoTypeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpEchoTypeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpEchoTypeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIcmpEchoTypeCounter object +func (obj *patternFlowIcmpEchoTypeCounter) SetStart(value uint32) PatternFlowIcmpEchoTypeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpEchoTypeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpEchoTypeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIcmpEchoTypeCounter object +func (obj *patternFlowIcmpEchoTypeCounter) SetStep(value uint32) PatternFlowIcmpEchoTypeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpEchoTypeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpEchoTypeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIcmpEchoTypeCounter object +func (obj *patternFlowIcmpEchoTypeCounter) SetCount(value uint32) PatternFlowIcmpEchoTypeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIcmpEchoTypeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoTypeCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoTypeCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoTypeCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIcmpEchoTypeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(8) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_icmp_echo_type_metric_tag.go b/gosnappi/pattern_flow_icmp_echo_type_metric_tag.go new file mode 100644 index 00000000..75b4d885 --- /dev/null +++ b/gosnappi/pattern_flow_icmp_echo_type_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpEchoTypeMetricTag ***** +type patternFlowIcmpEchoTypeMetricTag struct { + validation + obj *otg.PatternFlowIcmpEchoTypeMetricTag + marshaller marshalPatternFlowIcmpEchoTypeMetricTag + unMarshaller unMarshalPatternFlowIcmpEchoTypeMetricTag +} + +func NewPatternFlowIcmpEchoTypeMetricTag() PatternFlowIcmpEchoTypeMetricTag { + obj := patternFlowIcmpEchoTypeMetricTag{obj: &otg.PatternFlowIcmpEchoTypeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpEchoTypeMetricTag) msg() *otg.PatternFlowIcmpEchoTypeMetricTag { + return obj.obj +} + +func (obj *patternFlowIcmpEchoTypeMetricTag) setMsg(msg *otg.PatternFlowIcmpEchoTypeMetricTag) PatternFlowIcmpEchoTypeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpEchoTypeMetricTag struct { + obj *patternFlowIcmpEchoTypeMetricTag +} + +type marshalPatternFlowIcmpEchoTypeMetricTag interface { + // ToProto marshals PatternFlowIcmpEchoTypeMetricTag to protobuf object *otg.PatternFlowIcmpEchoTypeMetricTag + ToProto() (*otg.PatternFlowIcmpEchoTypeMetricTag, error) + // ToPbText marshals PatternFlowIcmpEchoTypeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpEchoTypeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpEchoTypeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpEchoTypeMetricTag struct { + obj *patternFlowIcmpEchoTypeMetricTag +} + +type unMarshalPatternFlowIcmpEchoTypeMetricTag interface { + // FromProto unmarshals PatternFlowIcmpEchoTypeMetricTag from protobuf object *otg.PatternFlowIcmpEchoTypeMetricTag + FromProto(msg *otg.PatternFlowIcmpEchoTypeMetricTag) (PatternFlowIcmpEchoTypeMetricTag, error) + // FromPbText unmarshals PatternFlowIcmpEchoTypeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpEchoTypeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpEchoTypeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpEchoTypeMetricTag) Marshal() marshalPatternFlowIcmpEchoTypeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpEchoTypeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpEchoTypeMetricTag) Unmarshal() unMarshalPatternFlowIcmpEchoTypeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpEchoTypeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpEchoTypeMetricTag) ToProto() (*otg.PatternFlowIcmpEchoTypeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpEchoTypeMetricTag) FromProto(msg *otg.PatternFlowIcmpEchoTypeMetricTag) (PatternFlowIcmpEchoTypeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpEchoTypeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpEchoTypeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpEchoTypeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoTypeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpEchoTypeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpEchoTypeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpEchoTypeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoTypeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpEchoTypeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpEchoTypeMetricTag) Clone() (PatternFlowIcmpEchoTypeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpEchoTypeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpEchoTypeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIcmpEchoTypeMetricTag interface { + Validation + // msg marshals PatternFlowIcmpEchoTypeMetricTag to protobuf object *otg.PatternFlowIcmpEchoTypeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIcmpEchoTypeMetricTag + // setMsg unmarshals PatternFlowIcmpEchoTypeMetricTag from protobuf object *otg.PatternFlowIcmpEchoTypeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpEchoTypeMetricTag) PatternFlowIcmpEchoTypeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIcmpEchoTypeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpEchoTypeMetricTag + // validate validates PatternFlowIcmpEchoTypeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpEchoTypeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIcmpEchoTypeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIcmpEchoTypeMetricTag + SetName(value string) PatternFlowIcmpEchoTypeMetricTag + // Offset returns uint32, set in PatternFlowIcmpEchoTypeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIcmpEchoTypeMetricTag + SetOffset(value uint32) PatternFlowIcmpEchoTypeMetricTag + // HasOffset checks if Offset has been set in PatternFlowIcmpEchoTypeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIcmpEchoTypeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIcmpEchoTypeMetricTag + SetLength(value uint32) PatternFlowIcmpEchoTypeMetricTag + // HasLength checks if Length has been set in PatternFlowIcmpEchoTypeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIcmpEchoTypeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIcmpEchoTypeMetricTag object +func (obj *patternFlowIcmpEchoTypeMetricTag) SetName(value string) PatternFlowIcmpEchoTypeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpEchoTypeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpEchoTypeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIcmpEchoTypeMetricTag object +func (obj *patternFlowIcmpEchoTypeMetricTag) SetOffset(value uint32) PatternFlowIcmpEchoTypeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpEchoTypeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpEchoTypeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIcmpEchoTypeMetricTag object +func (obj *patternFlowIcmpEchoTypeMetricTag) SetLength(value uint32) PatternFlowIcmpEchoTypeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIcmpEchoTypeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIcmpEchoTypeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpEchoTypeMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIcmpEchoTypeMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIcmpEchoTypeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_icmpv6_echo_checksum.go b/gosnappi/pattern_flow_icmpv6_echo_checksum.go new file mode 100644 index 00000000..17918dd1 --- /dev/null +++ b/gosnappi/pattern_flow_icmpv6_echo_checksum.go @@ -0,0 +1,434 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpv6EchoChecksum ***** +type patternFlowIcmpv6EchoChecksum struct { + validation + obj *otg.PatternFlowIcmpv6EchoChecksum + marshaller marshalPatternFlowIcmpv6EchoChecksum + unMarshaller unMarshalPatternFlowIcmpv6EchoChecksum +} + +func NewPatternFlowIcmpv6EchoChecksum() PatternFlowIcmpv6EchoChecksum { + obj := patternFlowIcmpv6EchoChecksum{obj: &otg.PatternFlowIcmpv6EchoChecksum{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpv6EchoChecksum) msg() *otg.PatternFlowIcmpv6EchoChecksum { + return obj.obj +} + +func (obj *patternFlowIcmpv6EchoChecksum) setMsg(msg *otg.PatternFlowIcmpv6EchoChecksum) PatternFlowIcmpv6EchoChecksum { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpv6EchoChecksum struct { + obj *patternFlowIcmpv6EchoChecksum +} + +type marshalPatternFlowIcmpv6EchoChecksum interface { + // ToProto marshals PatternFlowIcmpv6EchoChecksum to protobuf object *otg.PatternFlowIcmpv6EchoChecksum + ToProto() (*otg.PatternFlowIcmpv6EchoChecksum, error) + // ToPbText marshals PatternFlowIcmpv6EchoChecksum to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpv6EchoChecksum to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpv6EchoChecksum to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpv6EchoChecksum struct { + obj *patternFlowIcmpv6EchoChecksum +} + +type unMarshalPatternFlowIcmpv6EchoChecksum interface { + // FromProto unmarshals PatternFlowIcmpv6EchoChecksum from protobuf object *otg.PatternFlowIcmpv6EchoChecksum + FromProto(msg *otg.PatternFlowIcmpv6EchoChecksum) (PatternFlowIcmpv6EchoChecksum, error) + // FromPbText unmarshals PatternFlowIcmpv6EchoChecksum from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpv6EchoChecksum from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpv6EchoChecksum from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpv6EchoChecksum) Marshal() marshalPatternFlowIcmpv6EchoChecksum { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpv6EchoChecksum{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpv6EchoChecksum) Unmarshal() unMarshalPatternFlowIcmpv6EchoChecksum { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpv6EchoChecksum{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpv6EchoChecksum) ToProto() (*otg.PatternFlowIcmpv6EchoChecksum, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoChecksum) FromProto(msg *otg.PatternFlowIcmpv6EchoChecksum) (PatternFlowIcmpv6EchoChecksum, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpv6EchoChecksum) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoChecksum) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpv6EchoChecksum) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoChecksum) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpv6EchoChecksum) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoChecksum) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpv6EchoChecksum) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoChecksum) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoChecksum) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpv6EchoChecksum) Clone() (PatternFlowIcmpv6EchoChecksum, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpv6EchoChecksum() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpv6EchoChecksum is iCMPv6 checksum +type PatternFlowIcmpv6EchoChecksum interface { + Validation + // msg marshals PatternFlowIcmpv6EchoChecksum to protobuf object *otg.PatternFlowIcmpv6EchoChecksum + // and doesn't set defaults + msg() *otg.PatternFlowIcmpv6EchoChecksum + // setMsg unmarshals PatternFlowIcmpv6EchoChecksum from protobuf object *otg.PatternFlowIcmpv6EchoChecksum + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpv6EchoChecksum) PatternFlowIcmpv6EchoChecksum + // provides marshal interface + Marshal() marshalPatternFlowIcmpv6EchoChecksum + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpv6EchoChecksum + // validate validates PatternFlowIcmpv6EchoChecksum + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpv6EchoChecksum, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIcmpv6EchoChecksumChoiceEnum, set in PatternFlowIcmpv6EchoChecksum + Choice() PatternFlowIcmpv6EchoChecksumChoiceEnum + // setChoice assigns PatternFlowIcmpv6EchoChecksumChoiceEnum provided by user to PatternFlowIcmpv6EchoChecksum + setChoice(value PatternFlowIcmpv6EchoChecksumChoiceEnum) PatternFlowIcmpv6EchoChecksum + // HasChoice checks if Choice has been set in PatternFlowIcmpv6EchoChecksum + HasChoice() bool + // Generated returns PatternFlowIcmpv6EchoChecksumGeneratedEnum, set in PatternFlowIcmpv6EchoChecksum + Generated() PatternFlowIcmpv6EchoChecksumGeneratedEnum + // SetGenerated assigns PatternFlowIcmpv6EchoChecksumGeneratedEnum provided by user to PatternFlowIcmpv6EchoChecksum + SetGenerated(value PatternFlowIcmpv6EchoChecksumGeneratedEnum) PatternFlowIcmpv6EchoChecksum + // HasGenerated checks if Generated has been set in PatternFlowIcmpv6EchoChecksum + HasGenerated() bool + // Custom returns uint32, set in PatternFlowIcmpv6EchoChecksum. + Custom() uint32 + // SetCustom assigns uint32 provided by user to PatternFlowIcmpv6EchoChecksum + SetCustom(value uint32) PatternFlowIcmpv6EchoChecksum + // HasCustom checks if Custom has been set in PatternFlowIcmpv6EchoChecksum + HasCustom() bool +} + +type PatternFlowIcmpv6EchoChecksumChoiceEnum string + +// Enum of Choice on PatternFlowIcmpv6EchoChecksum +var PatternFlowIcmpv6EchoChecksumChoice = struct { + GENERATED PatternFlowIcmpv6EchoChecksumChoiceEnum + CUSTOM PatternFlowIcmpv6EchoChecksumChoiceEnum +}{ + GENERATED: PatternFlowIcmpv6EchoChecksumChoiceEnum("generated"), + CUSTOM: PatternFlowIcmpv6EchoChecksumChoiceEnum("custom"), +} + +func (obj *patternFlowIcmpv6EchoChecksum) Choice() PatternFlowIcmpv6EchoChecksumChoiceEnum { + return PatternFlowIcmpv6EchoChecksumChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The type of checksum +// Choice returns a string +func (obj *patternFlowIcmpv6EchoChecksum) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIcmpv6EchoChecksum) setChoice(value PatternFlowIcmpv6EchoChecksumChoiceEnum) PatternFlowIcmpv6EchoChecksum { + intValue, ok := otg.PatternFlowIcmpv6EchoChecksum_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIcmpv6EchoChecksumChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIcmpv6EchoChecksum_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.obj.Generated = otg.PatternFlowIcmpv6EchoChecksum_Generated_unspecified.Enum() + return obj +} + +type PatternFlowIcmpv6EchoChecksumGeneratedEnum string + +// Enum of Generated on PatternFlowIcmpv6EchoChecksum +var PatternFlowIcmpv6EchoChecksumGenerated = struct { + GOOD PatternFlowIcmpv6EchoChecksumGeneratedEnum + BAD PatternFlowIcmpv6EchoChecksumGeneratedEnum +}{ + GOOD: PatternFlowIcmpv6EchoChecksumGeneratedEnum("good"), + BAD: PatternFlowIcmpv6EchoChecksumGeneratedEnum("bad"), +} + +func (obj *patternFlowIcmpv6EchoChecksum) Generated() PatternFlowIcmpv6EchoChecksumGeneratedEnum { + return PatternFlowIcmpv6EchoChecksumGeneratedEnum(obj.obj.Generated.Enum().String()) +} + +// A system generated checksum value +// Generated returns a string +func (obj *patternFlowIcmpv6EchoChecksum) HasGenerated() bool { + return obj.obj.Generated != nil +} + +func (obj *patternFlowIcmpv6EchoChecksum) SetGenerated(value PatternFlowIcmpv6EchoChecksumGeneratedEnum) PatternFlowIcmpv6EchoChecksum { + intValue, ok := otg.PatternFlowIcmpv6EchoChecksum_Generated_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIcmpv6EchoChecksumGeneratedEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIcmpv6EchoChecksum_Generated_Enum(intValue) + obj.obj.Generated = &enumValue + + return obj +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowIcmpv6EchoChecksum) Custom() uint32 { + + if obj.obj.Custom == nil { + obj.setChoice(PatternFlowIcmpv6EchoChecksumChoice.CUSTOM) + } + + return *obj.obj.Custom + +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowIcmpv6EchoChecksum) HasCustom() bool { + return obj.obj.Custom != nil +} + +// A custom checksum value +// SetCustom sets the uint32 value in the PatternFlowIcmpv6EchoChecksum object +func (obj *patternFlowIcmpv6EchoChecksum) SetCustom(value uint32) PatternFlowIcmpv6EchoChecksum { + obj.setChoice(PatternFlowIcmpv6EchoChecksumChoice.CUSTOM) + obj.obj.Custom = &value + return obj +} + +func (obj *patternFlowIcmpv6EchoChecksum) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Custom != nil { + + if *obj.obj.Custom > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoChecksum.Custom <= 65535 but Got %d", *obj.obj.Custom)) + } + + } + +} + +func (obj *patternFlowIcmpv6EchoChecksum) setDefault() { + var choices_set int = 0 + var choice PatternFlowIcmpv6EchoChecksumChoiceEnum + + if obj.obj.Generated != nil && obj.obj.Generated.Number() != 0 { + choices_set += 1 + choice = PatternFlowIcmpv6EchoChecksumChoice.GENERATED + } + + if obj.obj.Custom != nil { + choices_set += 1 + choice = PatternFlowIcmpv6EchoChecksumChoice.CUSTOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIcmpv6EchoChecksumChoice.GENERATED) + if obj.obj.Generated.Number() == 0 { + obj.SetGenerated(PatternFlowIcmpv6EchoChecksumGenerated.GOOD) + + } + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIcmpv6EchoChecksum") + } + } else { + intVal := otg.PatternFlowIcmpv6EchoChecksum_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIcmpv6EchoChecksum_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_icmpv6_echo_code.go b/gosnappi/pattern_flow_icmpv6_echo_code.go new file mode 100644 index 00000000..958da1c8 --- /dev/null +++ b/gosnappi/pattern_flow_icmpv6_echo_code.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpv6EchoCode ***** +type patternFlowIcmpv6EchoCode struct { + validation + obj *otg.PatternFlowIcmpv6EchoCode + marshaller marshalPatternFlowIcmpv6EchoCode + unMarshaller unMarshalPatternFlowIcmpv6EchoCode + incrementHolder PatternFlowIcmpv6EchoCodeCounter + decrementHolder PatternFlowIcmpv6EchoCodeCounter + metricTagsHolder PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter +} + +func NewPatternFlowIcmpv6EchoCode() PatternFlowIcmpv6EchoCode { + obj := patternFlowIcmpv6EchoCode{obj: &otg.PatternFlowIcmpv6EchoCode{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpv6EchoCode) msg() *otg.PatternFlowIcmpv6EchoCode { + return obj.obj +} + +func (obj *patternFlowIcmpv6EchoCode) setMsg(msg *otg.PatternFlowIcmpv6EchoCode) PatternFlowIcmpv6EchoCode { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpv6EchoCode struct { + obj *patternFlowIcmpv6EchoCode +} + +type marshalPatternFlowIcmpv6EchoCode interface { + // ToProto marshals PatternFlowIcmpv6EchoCode to protobuf object *otg.PatternFlowIcmpv6EchoCode + ToProto() (*otg.PatternFlowIcmpv6EchoCode, error) + // ToPbText marshals PatternFlowIcmpv6EchoCode to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpv6EchoCode to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpv6EchoCode to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpv6EchoCode struct { + obj *patternFlowIcmpv6EchoCode +} + +type unMarshalPatternFlowIcmpv6EchoCode interface { + // FromProto unmarshals PatternFlowIcmpv6EchoCode from protobuf object *otg.PatternFlowIcmpv6EchoCode + FromProto(msg *otg.PatternFlowIcmpv6EchoCode) (PatternFlowIcmpv6EchoCode, error) + // FromPbText unmarshals PatternFlowIcmpv6EchoCode from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpv6EchoCode from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpv6EchoCode from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpv6EchoCode) Marshal() marshalPatternFlowIcmpv6EchoCode { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpv6EchoCode{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpv6EchoCode) Unmarshal() unMarshalPatternFlowIcmpv6EchoCode { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpv6EchoCode{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpv6EchoCode) ToProto() (*otg.PatternFlowIcmpv6EchoCode, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoCode) FromProto(msg *otg.PatternFlowIcmpv6EchoCode) (PatternFlowIcmpv6EchoCode, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpv6EchoCode) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoCode) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpv6EchoCode) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoCode) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpv6EchoCode) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoCode) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpv6EchoCode) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoCode) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoCode) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpv6EchoCode) Clone() (PatternFlowIcmpv6EchoCode, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpv6EchoCode() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIcmpv6EchoCode) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIcmpv6EchoCode is iCMPv6 echo sub type +type PatternFlowIcmpv6EchoCode interface { + Validation + // msg marshals PatternFlowIcmpv6EchoCode to protobuf object *otg.PatternFlowIcmpv6EchoCode + // and doesn't set defaults + msg() *otg.PatternFlowIcmpv6EchoCode + // setMsg unmarshals PatternFlowIcmpv6EchoCode from protobuf object *otg.PatternFlowIcmpv6EchoCode + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpv6EchoCode) PatternFlowIcmpv6EchoCode + // provides marshal interface + Marshal() marshalPatternFlowIcmpv6EchoCode + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpv6EchoCode + // validate validates PatternFlowIcmpv6EchoCode + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpv6EchoCode, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIcmpv6EchoCodeChoiceEnum, set in PatternFlowIcmpv6EchoCode + Choice() PatternFlowIcmpv6EchoCodeChoiceEnum + // setChoice assigns PatternFlowIcmpv6EchoCodeChoiceEnum provided by user to PatternFlowIcmpv6EchoCode + setChoice(value PatternFlowIcmpv6EchoCodeChoiceEnum) PatternFlowIcmpv6EchoCode + // HasChoice checks if Choice has been set in PatternFlowIcmpv6EchoCode + HasChoice() bool + // Value returns uint32, set in PatternFlowIcmpv6EchoCode. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIcmpv6EchoCode + SetValue(value uint32) PatternFlowIcmpv6EchoCode + // HasValue checks if Value has been set in PatternFlowIcmpv6EchoCode + HasValue() bool + // Values returns []uint32, set in PatternFlowIcmpv6EchoCode. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIcmpv6EchoCode + SetValues(value []uint32) PatternFlowIcmpv6EchoCode + // Increment returns PatternFlowIcmpv6EchoCodeCounter, set in PatternFlowIcmpv6EchoCode. + // PatternFlowIcmpv6EchoCodeCounter is integer counter pattern + Increment() PatternFlowIcmpv6EchoCodeCounter + // SetIncrement assigns PatternFlowIcmpv6EchoCodeCounter provided by user to PatternFlowIcmpv6EchoCode. + // PatternFlowIcmpv6EchoCodeCounter is integer counter pattern + SetIncrement(value PatternFlowIcmpv6EchoCodeCounter) PatternFlowIcmpv6EchoCode + // HasIncrement checks if Increment has been set in PatternFlowIcmpv6EchoCode + HasIncrement() bool + // Decrement returns PatternFlowIcmpv6EchoCodeCounter, set in PatternFlowIcmpv6EchoCode. + // PatternFlowIcmpv6EchoCodeCounter is integer counter pattern + Decrement() PatternFlowIcmpv6EchoCodeCounter + // SetDecrement assigns PatternFlowIcmpv6EchoCodeCounter provided by user to PatternFlowIcmpv6EchoCode. + // PatternFlowIcmpv6EchoCodeCounter is integer counter pattern + SetDecrement(value PatternFlowIcmpv6EchoCodeCounter) PatternFlowIcmpv6EchoCode + // HasDecrement checks if Decrement has been set in PatternFlowIcmpv6EchoCode + HasDecrement() bool + // MetricTags returns PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIterIter, set in PatternFlowIcmpv6EchoCode + MetricTags() PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter + setNil() +} + +type PatternFlowIcmpv6EchoCodeChoiceEnum string + +// Enum of Choice on PatternFlowIcmpv6EchoCode +var PatternFlowIcmpv6EchoCodeChoice = struct { + VALUE PatternFlowIcmpv6EchoCodeChoiceEnum + VALUES PatternFlowIcmpv6EchoCodeChoiceEnum + INCREMENT PatternFlowIcmpv6EchoCodeChoiceEnum + DECREMENT PatternFlowIcmpv6EchoCodeChoiceEnum +}{ + VALUE: PatternFlowIcmpv6EchoCodeChoiceEnum("value"), + VALUES: PatternFlowIcmpv6EchoCodeChoiceEnum("values"), + INCREMENT: PatternFlowIcmpv6EchoCodeChoiceEnum("increment"), + DECREMENT: PatternFlowIcmpv6EchoCodeChoiceEnum("decrement"), +} + +func (obj *patternFlowIcmpv6EchoCode) Choice() PatternFlowIcmpv6EchoCodeChoiceEnum { + return PatternFlowIcmpv6EchoCodeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIcmpv6EchoCode) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIcmpv6EchoCode) setChoice(value PatternFlowIcmpv6EchoCodeChoiceEnum) PatternFlowIcmpv6EchoCode { + intValue, ok := otg.PatternFlowIcmpv6EchoCode_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIcmpv6EchoCodeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIcmpv6EchoCode_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIcmpv6EchoCodeChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIcmpv6EchoCodeChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIcmpv6EchoCodeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIcmpv6EchoCodeCounter().msg() + } + + if value == PatternFlowIcmpv6EchoCodeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIcmpv6EchoCodeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpv6EchoCode) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIcmpv6EchoCodeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpv6EchoCode) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIcmpv6EchoCode object +func (obj *patternFlowIcmpv6EchoCode) SetValue(value uint32) PatternFlowIcmpv6EchoCode { + obj.setChoice(PatternFlowIcmpv6EchoCodeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIcmpv6EchoCode) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIcmpv6EchoCode object +func (obj *patternFlowIcmpv6EchoCode) SetValues(value []uint32) PatternFlowIcmpv6EchoCode { + obj.setChoice(PatternFlowIcmpv6EchoCodeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIcmpv6EchoCodeCounter +func (obj *patternFlowIcmpv6EchoCode) Increment() PatternFlowIcmpv6EchoCodeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIcmpv6EchoCodeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIcmpv6EchoCodeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIcmpv6EchoCodeCounter +func (obj *patternFlowIcmpv6EchoCode) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIcmpv6EchoCodeCounter value in the PatternFlowIcmpv6EchoCode object +func (obj *patternFlowIcmpv6EchoCode) SetIncrement(value PatternFlowIcmpv6EchoCodeCounter) PatternFlowIcmpv6EchoCode { + obj.setChoice(PatternFlowIcmpv6EchoCodeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIcmpv6EchoCodeCounter +func (obj *patternFlowIcmpv6EchoCode) Decrement() PatternFlowIcmpv6EchoCodeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIcmpv6EchoCodeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIcmpv6EchoCodeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIcmpv6EchoCodeCounter +func (obj *patternFlowIcmpv6EchoCode) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIcmpv6EchoCodeCounter value in the PatternFlowIcmpv6EchoCode object +func (obj *patternFlowIcmpv6EchoCode) SetDecrement(value PatternFlowIcmpv6EchoCodeCounter) PatternFlowIcmpv6EchoCode { + obj.setChoice(PatternFlowIcmpv6EchoCodeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIcmpv6EchoCodeMetricTag +func (obj *patternFlowIcmpv6EchoCode) MetricTags() PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIcmpv6EchoCodeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter struct { + obj *patternFlowIcmpv6EchoCode + patternFlowIcmpv6EchoCodeMetricTagSlice []PatternFlowIcmpv6EchoCodeMetricTag + fieldPtr *[]*otg.PatternFlowIcmpv6EchoCodeMetricTag +} + +func newPatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter(ptr *[]*otg.PatternFlowIcmpv6EchoCodeMetricTag) PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter { + return &patternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter interface { + setMsg(*patternFlowIcmpv6EchoCode) PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter + Items() []PatternFlowIcmpv6EchoCodeMetricTag + Add() PatternFlowIcmpv6EchoCodeMetricTag + Append(items ...PatternFlowIcmpv6EchoCodeMetricTag) PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter + Set(index int, newObj PatternFlowIcmpv6EchoCodeMetricTag) PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter + Clear() PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter + clearHolderSlice() PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter + appendHolderSlice(item PatternFlowIcmpv6EchoCodeMetricTag) PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter +} + +func (obj *patternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter) setMsg(msg *patternFlowIcmpv6EchoCode) PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIcmpv6EchoCodeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter) Items() []PatternFlowIcmpv6EchoCodeMetricTag { + return obj.patternFlowIcmpv6EchoCodeMetricTagSlice +} + +func (obj *patternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter) Add() PatternFlowIcmpv6EchoCodeMetricTag { + newObj := &otg.PatternFlowIcmpv6EchoCodeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIcmpv6EchoCodeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIcmpv6EchoCodeMetricTagSlice = append(obj.patternFlowIcmpv6EchoCodeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter) Append(items ...PatternFlowIcmpv6EchoCodeMetricTag) PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIcmpv6EchoCodeMetricTagSlice = append(obj.patternFlowIcmpv6EchoCodeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter) Set(index int, newObj PatternFlowIcmpv6EchoCodeMetricTag) PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIcmpv6EchoCodeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter) Clear() PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIcmpv6EchoCodeMetricTag{} + obj.patternFlowIcmpv6EchoCodeMetricTagSlice = []PatternFlowIcmpv6EchoCodeMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter) clearHolderSlice() PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter { + if len(obj.patternFlowIcmpv6EchoCodeMetricTagSlice) > 0 { + obj.patternFlowIcmpv6EchoCodeMetricTagSlice = []PatternFlowIcmpv6EchoCodeMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter) appendHolderSlice(item PatternFlowIcmpv6EchoCodeMetricTag) PatternFlowIcmpv6EchoCodePatternFlowIcmpv6EchoCodeMetricTagIter { + obj.patternFlowIcmpv6EchoCodeMetricTagSlice = append(obj.patternFlowIcmpv6EchoCodeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIcmpv6EchoCode) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoCode.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIcmpv6EchoCode.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIcmpv6EchoCodeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIcmpv6EchoCode) setDefault() { + var choices_set int = 0 + var choice PatternFlowIcmpv6EchoCodeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIcmpv6EchoCodeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIcmpv6EchoCodeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIcmpv6EchoCodeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIcmpv6EchoCodeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIcmpv6EchoCodeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIcmpv6EchoCode") + } + } else { + intVal := otg.PatternFlowIcmpv6EchoCode_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIcmpv6EchoCode_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_icmpv6_echo_code_counter.go b/gosnappi/pattern_flow_icmpv6_echo_code_counter.go new file mode 100644 index 00000000..9ef3b123 --- /dev/null +++ b/gosnappi/pattern_flow_icmpv6_echo_code_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpv6EchoCodeCounter ***** +type patternFlowIcmpv6EchoCodeCounter struct { + validation + obj *otg.PatternFlowIcmpv6EchoCodeCounter + marshaller marshalPatternFlowIcmpv6EchoCodeCounter + unMarshaller unMarshalPatternFlowIcmpv6EchoCodeCounter +} + +func NewPatternFlowIcmpv6EchoCodeCounter() PatternFlowIcmpv6EchoCodeCounter { + obj := patternFlowIcmpv6EchoCodeCounter{obj: &otg.PatternFlowIcmpv6EchoCodeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpv6EchoCodeCounter) msg() *otg.PatternFlowIcmpv6EchoCodeCounter { + return obj.obj +} + +func (obj *patternFlowIcmpv6EchoCodeCounter) setMsg(msg *otg.PatternFlowIcmpv6EchoCodeCounter) PatternFlowIcmpv6EchoCodeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpv6EchoCodeCounter struct { + obj *patternFlowIcmpv6EchoCodeCounter +} + +type marshalPatternFlowIcmpv6EchoCodeCounter interface { + // ToProto marshals PatternFlowIcmpv6EchoCodeCounter to protobuf object *otg.PatternFlowIcmpv6EchoCodeCounter + ToProto() (*otg.PatternFlowIcmpv6EchoCodeCounter, error) + // ToPbText marshals PatternFlowIcmpv6EchoCodeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpv6EchoCodeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpv6EchoCodeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpv6EchoCodeCounter struct { + obj *patternFlowIcmpv6EchoCodeCounter +} + +type unMarshalPatternFlowIcmpv6EchoCodeCounter interface { + // FromProto unmarshals PatternFlowIcmpv6EchoCodeCounter from protobuf object *otg.PatternFlowIcmpv6EchoCodeCounter + FromProto(msg *otg.PatternFlowIcmpv6EchoCodeCounter) (PatternFlowIcmpv6EchoCodeCounter, error) + // FromPbText unmarshals PatternFlowIcmpv6EchoCodeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpv6EchoCodeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpv6EchoCodeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpv6EchoCodeCounter) Marshal() marshalPatternFlowIcmpv6EchoCodeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpv6EchoCodeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpv6EchoCodeCounter) Unmarshal() unMarshalPatternFlowIcmpv6EchoCodeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpv6EchoCodeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpv6EchoCodeCounter) ToProto() (*otg.PatternFlowIcmpv6EchoCodeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoCodeCounter) FromProto(msg *otg.PatternFlowIcmpv6EchoCodeCounter) (PatternFlowIcmpv6EchoCodeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpv6EchoCodeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoCodeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpv6EchoCodeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoCodeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpv6EchoCodeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoCodeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpv6EchoCodeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoCodeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoCodeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpv6EchoCodeCounter) Clone() (PatternFlowIcmpv6EchoCodeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpv6EchoCodeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpv6EchoCodeCounter is integer counter pattern +type PatternFlowIcmpv6EchoCodeCounter interface { + Validation + // msg marshals PatternFlowIcmpv6EchoCodeCounter to protobuf object *otg.PatternFlowIcmpv6EchoCodeCounter + // and doesn't set defaults + msg() *otg.PatternFlowIcmpv6EchoCodeCounter + // setMsg unmarshals PatternFlowIcmpv6EchoCodeCounter from protobuf object *otg.PatternFlowIcmpv6EchoCodeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpv6EchoCodeCounter) PatternFlowIcmpv6EchoCodeCounter + // provides marshal interface + Marshal() marshalPatternFlowIcmpv6EchoCodeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpv6EchoCodeCounter + // validate validates PatternFlowIcmpv6EchoCodeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpv6EchoCodeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIcmpv6EchoCodeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIcmpv6EchoCodeCounter + SetStart(value uint32) PatternFlowIcmpv6EchoCodeCounter + // HasStart checks if Start has been set in PatternFlowIcmpv6EchoCodeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIcmpv6EchoCodeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIcmpv6EchoCodeCounter + SetStep(value uint32) PatternFlowIcmpv6EchoCodeCounter + // HasStep checks if Step has been set in PatternFlowIcmpv6EchoCodeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIcmpv6EchoCodeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIcmpv6EchoCodeCounter + SetCount(value uint32) PatternFlowIcmpv6EchoCodeCounter + // HasCount checks if Count has been set in PatternFlowIcmpv6EchoCodeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpv6EchoCodeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpv6EchoCodeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIcmpv6EchoCodeCounter object +func (obj *patternFlowIcmpv6EchoCodeCounter) SetStart(value uint32) PatternFlowIcmpv6EchoCodeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpv6EchoCodeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpv6EchoCodeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIcmpv6EchoCodeCounter object +func (obj *patternFlowIcmpv6EchoCodeCounter) SetStep(value uint32) PatternFlowIcmpv6EchoCodeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpv6EchoCodeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpv6EchoCodeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIcmpv6EchoCodeCounter object +func (obj *patternFlowIcmpv6EchoCodeCounter) SetCount(value uint32) PatternFlowIcmpv6EchoCodeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIcmpv6EchoCodeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoCodeCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoCodeCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoCodeCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIcmpv6EchoCodeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_icmpv6_echo_code_metric_tag.go b/gosnappi/pattern_flow_icmpv6_echo_code_metric_tag.go new file mode 100644 index 00000000..7af2a28c --- /dev/null +++ b/gosnappi/pattern_flow_icmpv6_echo_code_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpv6EchoCodeMetricTag ***** +type patternFlowIcmpv6EchoCodeMetricTag struct { + validation + obj *otg.PatternFlowIcmpv6EchoCodeMetricTag + marshaller marshalPatternFlowIcmpv6EchoCodeMetricTag + unMarshaller unMarshalPatternFlowIcmpv6EchoCodeMetricTag +} + +func NewPatternFlowIcmpv6EchoCodeMetricTag() PatternFlowIcmpv6EchoCodeMetricTag { + obj := patternFlowIcmpv6EchoCodeMetricTag{obj: &otg.PatternFlowIcmpv6EchoCodeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpv6EchoCodeMetricTag) msg() *otg.PatternFlowIcmpv6EchoCodeMetricTag { + return obj.obj +} + +func (obj *patternFlowIcmpv6EchoCodeMetricTag) setMsg(msg *otg.PatternFlowIcmpv6EchoCodeMetricTag) PatternFlowIcmpv6EchoCodeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpv6EchoCodeMetricTag struct { + obj *patternFlowIcmpv6EchoCodeMetricTag +} + +type marshalPatternFlowIcmpv6EchoCodeMetricTag interface { + // ToProto marshals PatternFlowIcmpv6EchoCodeMetricTag to protobuf object *otg.PatternFlowIcmpv6EchoCodeMetricTag + ToProto() (*otg.PatternFlowIcmpv6EchoCodeMetricTag, error) + // ToPbText marshals PatternFlowIcmpv6EchoCodeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpv6EchoCodeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpv6EchoCodeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpv6EchoCodeMetricTag struct { + obj *patternFlowIcmpv6EchoCodeMetricTag +} + +type unMarshalPatternFlowIcmpv6EchoCodeMetricTag interface { + // FromProto unmarshals PatternFlowIcmpv6EchoCodeMetricTag from protobuf object *otg.PatternFlowIcmpv6EchoCodeMetricTag + FromProto(msg *otg.PatternFlowIcmpv6EchoCodeMetricTag) (PatternFlowIcmpv6EchoCodeMetricTag, error) + // FromPbText unmarshals PatternFlowIcmpv6EchoCodeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpv6EchoCodeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpv6EchoCodeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpv6EchoCodeMetricTag) Marshal() marshalPatternFlowIcmpv6EchoCodeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpv6EchoCodeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpv6EchoCodeMetricTag) Unmarshal() unMarshalPatternFlowIcmpv6EchoCodeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpv6EchoCodeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpv6EchoCodeMetricTag) ToProto() (*otg.PatternFlowIcmpv6EchoCodeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoCodeMetricTag) FromProto(msg *otg.PatternFlowIcmpv6EchoCodeMetricTag) (PatternFlowIcmpv6EchoCodeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpv6EchoCodeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoCodeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpv6EchoCodeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoCodeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpv6EchoCodeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoCodeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpv6EchoCodeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoCodeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoCodeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpv6EchoCodeMetricTag) Clone() (PatternFlowIcmpv6EchoCodeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpv6EchoCodeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpv6EchoCodeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIcmpv6EchoCodeMetricTag interface { + Validation + // msg marshals PatternFlowIcmpv6EchoCodeMetricTag to protobuf object *otg.PatternFlowIcmpv6EchoCodeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIcmpv6EchoCodeMetricTag + // setMsg unmarshals PatternFlowIcmpv6EchoCodeMetricTag from protobuf object *otg.PatternFlowIcmpv6EchoCodeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpv6EchoCodeMetricTag) PatternFlowIcmpv6EchoCodeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIcmpv6EchoCodeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpv6EchoCodeMetricTag + // validate validates PatternFlowIcmpv6EchoCodeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpv6EchoCodeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIcmpv6EchoCodeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIcmpv6EchoCodeMetricTag + SetName(value string) PatternFlowIcmpv6EchoCodeMetricTag + // Offset returns uint32, set in PatternFlowIcmpv6EchoCodeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIcmpv6EchoCodeMetricTag + SetOffset(value uint32) PatternFlowIcmpv6EchoCodeMetricTag + // HasOffset checks if Offset has been set in PatternFlowIcmpv6EchoCodeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIcmpv6EchoCodeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIcmpv6EchoCodeMetricTag + SetLength(value uint32) PatternFlowIcmpv6EchoCodeMetricTag + // HasLength checks if Length has been set in PatternFlowIcmpv6EchoCodeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIcmpv6EchoCodeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIcmpv6EchoCodeMetricTag object +func (obj *patternFlowIcmpv6EchoCodeMetricTag) SetName(value string) PatternFlowIcmpv6EchoCodeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpv6EchoCodeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpv6EchoCodeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIcmpv6EchoCodeMetricTag object +func (obj *patternFlowIcmpv6EchoCodeMetricTag) SetOffset(value uint32) PatternFlowIcmpv6EchoCodeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpv6EchoCodeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpv6EchoCodeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIcmpv6EchoCodeMetricTag object +func (obj *patternFlowIcmpv6EchoCodeMetricTag) SetLength(value uint32) PatternFlowIcmpv6EchoCodeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIcmpv6EchoCodeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIcmpv6EchoCodeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoCodeMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIcmpv6EchoCodeMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIcmpv6EchoCodeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_icmpv6_echo_identifier.go b/gosnappi/pattern_flow_icmpv6_echo_identifier.go new file mode 100644 index 00000000..546f860d --- /dev/null +++ b/gosnappi/pattern_flow_icmpv6_echo_identifier.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpv6EchoIdentifier ***** +type patternFlowIcmpv6EchoIdentifier struct { + validation + obj *otg.PatternFlowIcmpv6EchoIdentifier + marshaller marshalPatternFlowIcmpv6EchoIdentifier + unMarshaller unMarshalPatternFlowIcmpv6EchoIdentifier + incrementHolder PatternFlowIcmpv6EchoIdentifierCounter + decrementHolder PatternFlowIcmpv6EchoIdentifierCounter + metricTagsHolder PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter +} + +func NewPatternFlowIcmpv6EchoIdentifier() PatternFlowIcmpv6EchoIdentifier { + obj := patternFlowIcmpv6EchoIdentifier{obj: &otg.PatternFlowIcmpv6EchoIdentifier{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpv6EchoIdentifier) msg() *otg.PatternFlowIcmpv6EchoIdentifier { + return obj.obj +} + +func (obj *patternFlowIcmpv6EchoIdentifier) setMsg(msg *otg.PatternFlowIcmpv6EchoIdentifier) PatternFlowIcmpv6EchoIdentifier { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpv6EchoIdentifier struct { + obj *patternFlowIcmpv6EchoIdentifier +} + +type marshalPatternFlowIcmpv6EchoIdentifier interface { + // ToProto marshals PatternFlowIcmpv6EchoIdentifier to protobuf object *otg.PatternFlowIcmpv6EchoIdentifier + ToProto() (*otg.PatternFlowIcmpv6EchoIdentifier, error) + // ToPbText marshals PatternFlowIcmpv6EchoIdentifier to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpv6EchoIdentifier to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpv6EchoIdentifier to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpv6EchoIdentifier struct { + obj *patternFlowIcmpv6EchoIdentifier +} + +type unMarshalPatternFlowIcmpv6EchoIdentifier interface { + // FromProto unmarshals PatternFlowIcmpv6EchoIdentifier from protobuf object *otg.PatternFlowIcmpv6EchoIdentifier + FromProto(msg *otg.PatternFlowIcmpv6EchoIdentifier) (PatternFlowIcmpv6EchoIdentifier, error) + // FromPbText unmarshals PatternFlowIcmpv6EchoIdentifier from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpv6EchoIdentifier from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpv6EchoIdentifier from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpv6EchoIdentifier) Marshal() marshalPatternFlowIcmpv6EchoIdentifier { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpv6EchoIdentifier{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpv6EchoIdentifier) Unmarshal() unMarshalPatternFlowIcmpv6EchoIdentifier { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpv6EchoIdentifier{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpv6EchoIdentifier) ToProto() (*otg.PatternFlowIcmpv6EchoIdentifier, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoIdentifier) FromProto(msg *otg.PatternFlowIcmpv6EchoIdentifier) (PatternFlowIcmpv6EchoIdentifier, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpv6EchoIdentifier) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoIdentifier) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpv6EchoIdentifier) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoIdentifier) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpv6EchoIdentifier) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoIdentifier) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpv6EchoIdentifier) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoIdentifier) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoIdentifier) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpv6EchoIdentifier) Clone() (PatternFlowIcmpv6EchoIdentifier, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpv6EchoIdentifier() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIcmpv6EchoIdentifier) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIcmpv6EchoIdentifier is iCMPv6 echo identifier +type PatternFlowIcmpv6EchoIdentifier interface { + Validation + // msg marshals PatternFlowIcmpv6EchoIdentifier to protobuf object *otg.PatternFlowIcmpv6EchoIdentifier + // and doesn't set defaults + msg() *otg.PatternFlowIcmpv6EchoIdentifier + // setMsg unmarshals PatternFlowIcmpv6EchoIdentifier from protobuf object *otg.PatternFlowIcmpv6EchoIdentifier + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpv6EchoIdentifier) PatternFlowIcmpv6EchoIdentifier + // provides marshal interface + Marshal() marshalPatternFlowIcmpv6EchoIdentifier + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpv6EchoIdentifier + // validate validates PatternFlowIcmpv6EchoIdentifier + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpv6EchoIdentifier, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIcmpv6EchoIdentifierChoiceEnum, set in PatternFlowIcmpv6EchoIdentifier + Choice() PatternFlowIcmpv6EchoIdentifierChoiceEnum + // setChoice assigns PatternFlowIcmpv6EchoIdentifierChoiceEnum provided by user to PatternFlowIcmpv6EchoIdentifier + setChoice(value PatternFlowIcmpv6EchoIdentifierChoiceEnum) PatternFlowIcmpv6EchoIdentifier + // HasChoice checks if Choice has been set in PatternFlowIcmpv6EchoIdentifier + HasChoice() bool + // Value returns uint32, set in PatternFlowIcmpv6EchoIdentifier. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIcmpv6EchoIdentifier + SetValue(value uint32) PatternFlowIcmpv6EchoIdentifier + // HasValue checks if Value has been set in PatternFlowIcmpv6EchoIdentifier + HasValue() bool + // Values returns []uint32, set in PatternFlowIcmpv6EchoIdentifier. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIcmpv6EchoIdentifier + SetValues(value []uint32) PatternFlowIcmpv6EchoIdentifier + // Increment returns PatternFlowIcmpv6EchoIdentifierCounter, set in PatternFlowIcmpv6EchoIdentifier. + // PatternFlowIcmpv6EchoIdentifierCounter is integer counter pattern + Increment() PatternFlowIcmpv6EchoIdentifierCounter + // SetIncrement assigns PatternFlowIcmpv6EchoIdentifierCounter provided by user to PatternFlowIcmpv6EchoIdentifier. + // PatternFlowIcmpv6EchoIdentifierCounter is integer counter pattern + SetIncrement(value PatternFlowIcmpv6EchoIdentifierCounter) PatternFlowIcmpv6EchoIdentifier + // HasIncrement checks if Increment has been set in PatternFlowIcmpv6EchoIdentifier + HasIncrement() bool + // Decrement returns PatternFlowIcmpv6EchoIdentifierCounter, set in PatternFlowIcmpv6EchoIdentifier. + // PatternFlowIcmpv6EchoIdentifierCounter is integer counter pattern + Decrement() PatternFlowIcmpv6EchoIdentifierCounter + // SetDecrement assigns PatternFlowIcmpv6EchoIdentifierCounter provided by user to PatternFlowIcmpv6EchoIdentifier. + // PatternFlowIcmpv6EchoIdentifierCounter is integer counter pattern + SetDecrement(value PatternFlowIcmpv6EchoIdentifierCounter) PatternFlowIcmpv6EchoIdentifier + // HasDecrement checks if Decrement has been set in PatternFlowIcmpv6EchoIdentifier + HasDecrement() bool + // MetricTags returns PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIterIter, set in PatternFlowIcmpv6EchoIdentifier + MetricTags() PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter + setNil() +} + +type PatternFlowIcmpv6EchoIdentifierChoiceEnum string + +// Enum of Choice on PatternFlowIcmpv6EchoIdentifier +var PatternFlowIcmpv6EchoIdentifierChoice = struct { + VALUE PatternFlowIcmpv6EchoIdentifierChoiceEnum + VALUES PatternFlowIcmpv6EchoIdentifierChoiceEnum + INCREMENT PatternFlowIcmpv6EchoIdentifierChoiceEnum + DECREMENT PatternFlowIcmpv6EchoIdentifierChoiceEnum +}{ + VALUE: PatternFlowIcmpv6EchoIdentifierChoiceEnum("value"), + VALUES: PatternFlowIcmpv6EchoIdentifierChoiceEnum("values"), + INCREMENT: PatternFlowIcmpv6EchoIdentifierChoiceEnum("increment"), + DECREMENT: PatternFlowIcmpv6EchoIdentifierChoiceEnum("decrement"), +} + +func (obj *patternFlowIcmpv6EchoIdentifier) Choice() PatternFlowIcmpv6EchoIdentifierChoiceEnum { + return PatternFlowIcmpv6EchoIdentifierChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIcmpv6EchoIdentifier) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIcmpv6EchoIdentifier) setChoice(value PatternFlowIcmpv6EchoIdentifierChoiceEnum) PatternFlowIcmpv6EchoIdentifier { + intValue, ok := otg.PatternFlowIcmpv6EchoIdentifier_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIcmpv6EchoIdentifierChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIcmpv6EchoIdentifier_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIcmpv6EchoIdentifierChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIcmpv6EchoIdentifierChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIcmpv6EchoIdentifierChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIcmpv6EchoIdentifierCounter().msg() + } + + if value == PatternFlowIcmpv6EchoIdentifierChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIcmpv6EchoIdentifierCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpv6EchoIdentifier) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIcmpv6EchoIdentifierChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpv6EchoIdentifier) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIcmpv6EchoIdentifier object +func (obj *patternFlowIcmpv6EchoIdentifier) SetValue(value uint32) PatternFlowIcmpv6EchoIdentifier { + obj.setChoice(PatternFlowIcmpv6EchoIdentifierChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIcmpv6EchoIdentifier) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIcmpv6EchoIdentifier object +func (obj *patternFlowIcmpv6EchoIdentifier) SetValues(value []uint32) PatternFlowIcmpv6EchoIdentifier { + obj.setChoice(PatternFlowIcmpv6EchoIdentifierChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIcmpv6EchoIdentifierCounter +func (obj *patternFlowIcmpv6EchoIdentifier) Increment() PatternFlowIcmpv6EchoIdentifierCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIcmpv6EchoIdentifierChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIcmpv6EchoIdentifierCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIcmpv6EchoIdentifierCounter +func (obj *patternFlowIcmpv6EchoIdentifier) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIcmpv6EchoIdentifierCounter value in the PatternFlowIcmpv6EchoIdentifier object +func (obj *patternFlowIcmpv6EchoIdentifier) SetIncrement(value PatternFlowIcmpv6EchoIdentifierCounter) PatternFlowIcmpv6EchoIdentifier { + obj.setChoice(PatternFlowIcmpv6EchoIdentifierChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIcmpv6EchoIdentifierCounter +func (obj *patternFlowIcmpv6EchoIdentifier) Decrement() PatternFlowIcmpv6EchoIdentifierCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIcmpv6EchoIdentifierChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIcmpv6EchoIdentifierCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIcmpv6EchoIdentifierCounter +func (obj *patternFlowIcmpv6EchoIdentifier) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIcmpv6EchoIdentifierCounter value in the PatternFlowIcmpv6EchoIdentifier object +func (obj *patternFlowIcmpv6EchoIdentifier) SetDecrement(value PatternFlowIcmpv6EchoIdentifierCounter) PatternFlowIcmpv6EchoIdentifier { + obj.setChoice(PatternFlowIcmpv6EchoIdentifierChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIcmpv6EchoIdentifierMetricTag +func (obj *patternFlowIcmpv6EchoIdentifier) MetricTags() PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIcmpv6EchoIdentifierMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter struct { + obj *patternFlowIcmpv6EchoIdentifier + patternFlowIcmpv6EchoIdentifierMetricTagSlice []PatternFlowIcmpv6EchoIdentifierMetricTag + fieldPtr *[]*otg.PatternFlowIcmpv6EchoIdentifierMetricTag +} + +func newPatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter(ptr *[]*otg.PatternFlowIcmpv6EchoIdentifierMetricTag) PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter { + return &patternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter interface { + setMsg(*patternFlowIcmpv6EchoIdentifier) PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter + Items() []PatternFlowIcmpv6EchoIdentifierMetricTag + Add() PatternFlowIcmpv6EchoIdentifierMetricTag + Append(items ...PatternFlowIcmpv6EchoIdentifierMetricTag) PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter + Set(index int, newObj PatternFlowIcmpv6EchoIdentifierMetricTag) PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter + Clear() PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter + clearHolderSlice() PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter + appendHolderSlice(item PatternFlowIcmpv6EchoIdentifierMetricTag) PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter +} + +func (obj *patternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter) setMsg(msg *patternFlowIcmpv6EchoIdentifier) PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIcmpv6EchoIdentifierMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter) Items() []PatternFlowIcmpv6EchoIdentifierMetricTag { + return obj.patternFlowIcmpv6EchoIdentifierMetricTagSlice +} + +func (obj *patternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter) Add() PatternFlowIcmpv6EchoIdentifierMetricTag { + newObj := &otg.PatternFlowIcmpv6EchoIdentifierMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIcmpv6EchoIdentifierMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIcmpv6EchoIdentifierMetricTagSlice = append(obj.patternFlowIcmpv6EchoIdentifierMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter) Append(items ...PatternFlowIcmpv6EchoIdentifierMetricTag) PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIcmpv6EchoIdentifierMetricTagSlice = append(obj.patternFlowIcmpv6EchoIdentifierMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter) Set(index int, newObj PatternFlowIcmpv6EchoIdentifierMetricTag) PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIcmpv6EchoIdentifierMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter) Clear() PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIcmpv6EchoIdentifierMetricTag{} + obj.patternFlowIcmpv6EchoIdentifierMetricTagSlice = []PatternFlowIcmpv6EchoIdentifierMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter) clearHolderSlice() PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter { + if len(obj.patternFlowIcmpv6EchoIdentifierMetricTagSlice) > 0 { + obj.patternFlowIcmpv6EchoIdentifierMetricTagSlice = []PatternFlowIcmpv6EchoIdentifierMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter) appendHolderSlice(item PatternFlowIcmpv6EchoIdentifierMetricTag) PatternFlowIcmpv6EchoIdentifierPatternFlowIcmpv6EchoIdentifierMetricTagIter { + obj.patternFlowIcmpv6EchoIdentifierMetricTagSlice = append(obj.patternFlowIcmpv6EchoIdentifierMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIcmpv6EchoIdentifier) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoIdentifier.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIcmpv6EchoIdentifier.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIcmpv6EchoIdentifierMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIcmpv6EchoIdentifier) setDefault() { + var choices_set int = 0 + var choice PatternFlowIcmpv6EchoIdentifierChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIcmpv6EchoIdentifierChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIcmpv6EchoIdentifierChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIcmpv6EchoIdentifierChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIcmpv6EchoIdentifierChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIcmpv6EchoIdentifierChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIcmpv6EchoIdentifier") + } + } else { + intVal := otg.PatternFlowIcmpv6EchoIdentifier_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIcmpv6EchoIdentifier_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_icmpv6_echo_identifier_counter.go b/gosnappi/pattern_flow_icmpv6_echo_identifier_counter.go new file mode 100644 index 00000000..5a0f75ed --- /dev/null +++ b/gosnappi/pattern_flow_icmpv6_echo_identifier_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpv6EchoIdentifierCounter ***** +type patternFlowIcmpv6EchoIdentifierCounter struct { + validation + obj *otg.PatternFlowIcmpv6EchoIdentifierCounter + marshaller marshalPatternFlowIcmpv6EchoIdentifierCounter + unMarshaller unMarshalPatternFlowIcmpv6EchoIdentifierCounter +} + +func NewPatternFlowIcmpv6EchoIdentifierCounter() PatternFlowIcmpv6EchoIdentifierCounter { + obj := patternFlowIcmpv6EchoIdentifierCounter{obj: &otg.PatternFlowIcmpv6EchoIdentifierCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpv6EchoIdentifierCounter) msg() *otg.PatternFlowIcmpv6EchoIdentifierCounter { + return obj.obj +} + +func (obj *patternFlowIcmpv6EchoIdentifierCounter) setMsg(msg *otg.PatternFlowIcmpv6EchoIdentifierCounter) PatternFlowIcmpv6EchoIdentifierCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpv6EchoIdentifierCounter struct { + obj *patternFlowIcmpv6EchoIdentifierCounter +} + +type marshalPatternFlowIcmpv6EchoIdentifierCounter interface { + // ToProto marshals PatternFlowIcmpv6EchoIdentifierCounter to protobuf object *otg.PatternFlowIcmpv6EchoIdentifierCounter + ToProto() (*otg.PatternFlowIcmpv6EchoIdentifierCounter, error) + // ToPbText marshals PatternFlowIcmpv6EchoIdentifierCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpv6EchoIdentifierCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpv6EchoIdentifierCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpv6EchoIdentifierCounter struct { + obj *patternFlowIcmpv6EchoIdentifierCounter +} + +type unMarshalPatternFlowIcmpv6EchoIdentifierCounter interface { + // FromProto unmarshals PatternFlowIcmpv6EchoIdentifierCounter from protobuf object *otg.PatternFlowIcmpv6EchoIdentifierCounter + FromProto(msg *otg.PatternFlowIcmpv6EchoIdentifierCounter) (PatternFlowIcmpv6EchoIdentifierCounter, error) + // FromPbText unmarshals PatternFlowIcmpv6EchoIdentifierCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpv6EchoIdentifierCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpv6EchoIdentifierCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpv6EchoIdentifierCounter) Marshal() marshalPatternFlowIcmpv6EchoIdentifierCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpv6EchoIdentifierCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpv6EchoIdentifierCounter) Unmarshal() unMarshalPatternFlowIcmpv6EchoIdentifierCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpv6EchoIdentifierCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpv6EchoIdentifierCounter) ToProto() (*otg.PatternFlowIcmpv6EchoIdentifierCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoIdentifierCounter) FromProto(msg *otg.PatternFlowIcmpv6EchoIdentifierCounter) (PatternFlowIcmpv6EchoIdentifierCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpv6EchoIdentifierCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoIdentifierCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpv6EchoIdentifierCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoIdentifierCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpv6EchoIdentifierCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoIdentifierCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpv6EchoIdentifierCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoIdentifierCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoIdentifierCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpv6EchoIdentifierCounter) Clone() (PatternFlowIcmpv6EchoIdentifierCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpv6EchoIdentifierCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpv6EchoIdentifierCounter is integer counter pattern +type PatternFlowIcmpv6EchoIdentifierCounter interface { + Validation + // msg marshals PatternFlowIcmpv6EchoIdentifierCounter to protobuf object *otg.PatternFlowIcmpv6EchoIdentifierCounter + // and doesn't set defaults + msg() *otg.PatternFlowIcmpv6EchoIdentifierCounter + // setMsg unmarshals PatternFlowIcmpv6EchoIdentifierCounter from protobuf object *otg.PatternFlowIcmpv6EchoIdentifierCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpv6EchoIdentifierCounter) PatternFlowIcmpv6EchoIdentifierCounter + // provides marshal interface + Marshal() marshalPatternFlowIcmpv6EchoIdentifierCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpv6EchoIdentifierCounter + // validate validates PatternFlowIcmpv6EchoIdentifierCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpv6EchoIdentifierCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIcmpv6EchoIdentifierCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIcmpv6EchoIdentifierCounter + SetStart(value uint32) PatternFlowIcmpv6EchoIdentifierCounter + // HasStart checks if Start has been set in PatternFlowIcmpv6EchoIdentifierCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIcmpv6EchoIdentifierCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIcmpv6EchoIdentifierCounter + SetStep(value uint32) PatternFlowIcmpv6EchoIdentifierCounter + // HasStep checks if Step has been set in PatternFlowIcmpv6EchoIdentifierCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIcmpv6EchoIdentifierCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIcmpv6EchoIdentifierCounter + SetCount(value uint32) PatternFlowIcmpv6EchoIdentifierCounter + // HasCount checks if Count has been set in PatternFlowIcmpv6EchoIdentifierCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpv6EchoIdentifierCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpv6EchoIdentifierCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIcmpv6EchoIdentifierCounter object +func (obj *patternFlowIcmpv6EchoIdentifierCounter) SetStart(value uint32) PatternFlowIcmpv6EchoIdentifierCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpv6EchoIdentifierCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpv6EchoIdentifierCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIcmpv6EchoIdentifierCounter object +func (obj *patternFlowIcmpv6EchoIdentifierCounter) SetStep(value uint32) PatternFlowIcmpv6EchoIdentifierCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpv6EchoIdentifierCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpv6EchoIdentifierCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIcmpv6EchoIdentifierCounter object +func (obj *patternFlowIcmpv6EchoIdentifierCounter) SetCount(value uint32) PatternFlowIcmpv6EchoIdentifierCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIcmpv6EchoIdentifierCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoIdentifierCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoIdentifierCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoIdentifierCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIcmpv6EchoIdentifierCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_icmpv6_echo_identifier_metric_tag.go b/gosnappi/pattern_flow_icmpv6_echo_identifier_metric_tag.go new file mode 100644 index 00000000..1059f8d1 --- /dev/null +++ b/gosnappi/pattern_flow_icmpv6_echo_identifier_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpv6EchoIdentifierMetricTag ***** +type patternFlowIcmpv6EchoIdentifierMetricTag struct { + validation + obj *otg.PatternFlowIcmpv6EchoIdentifierMetricTag + marshaller marshalPatternFlowIcmpv6EchoIdentifierMetricTag + unMarshaller unMarshalPatternFlowIcmpv6EchoIdentifierMetricTag +} + +func NewPatternFlowIcmpv6EchoIdentifierMetricTag() PatternFlowIcmpv6EchoIdentifierMetricTag { + obj := patternFlowIcmpv6EchoIdentifierMetricTag{obj: &otg.PatternFlowIcmpv6EchoIdentifierMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) msg() *otg.PatternFlowIcmpv6EchoIdentifierMetricTag { + return obj.obj +} + +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) setMsg(msg *otg.PatternFlowIcmpv6EchoIdentifierMetricTag) PatternFlowIcmpv6EchoIdentifierMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpv6EchoIdentifierMetricTag struct { + obj *patternFlowIcmpv6EchoIdentifierMetricTag +} + +type marshalPatternFlowIcmpv6EchoIdentifierMetricTag interface { + // ToProto marshals PatternFlowIcmpv6EchoIdentifierMetricTag to protobuf object *otg.PatternFlowIcmpv6EchoIdentifierMetricTag + ToProto() (*otg.PatternFlowIcmpv6EchoIdentifierMetricTag, error) + // ToPbText marshals PatternFlowIcmpv6EchoIdentifierMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpv6EchoIdentifierMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpv6EchoIdentifierMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpv6EchoIdentifierMetricTag struct { + obj *patternFlowIcmpv6EchoIdentifierMetricTag +} + +type unMarshalPatternFlowIcmpv6EchoIdentifierMetricTag interface { + // FromProto unmarshals PatternFlowIcmpv6EchoIdentifierMetricTag from protobuf object *otg.PatternFlowIcmpv6EchoIdentifierMetricTag + FromProto(msg *otg.PatternFlowIcmpv6EchoIdentifierMetricTag) (PatternFlowIcmpv6EchoIdentifierMetricTag, error) + // FromPbText unmarshals PatternFlowIcmpv6EchoIdentifierMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpv6EchoIdentifierMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpv6EchoIdentifierMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) Marshal() marshalPatternFlowIcmpv6EchoIdentifierMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpv6EchoIdentifierMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) Unmarshal() unMarshalPatternFlowIcmpv6EchoIdentifierMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpv6EchoIdentifierMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpv6EchoIdentifierMetricTag) ToProto() (*otg.PatternFlowIcmpv6EchoIdentifierMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoIdentifierMetricTag) FromProto(msg *otg.PatternFlowIcmpv6EchoIdentifierMetricTag) (PatternFlowIcmpv6EchoIdentifierMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpv6EchoIdentifierMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoIdentifierMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpv6EchoIdentifierMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoIdentifierMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpv6EchoIdentifierMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoIdentifierMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) Clone() (PatternFlowIcmpv6EchoIdentifierMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpv6EchoIdentifierMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpv6EchoIdentifierMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIcmpv6EchoIdentifierMetricTag interface { + Validation + // msg marshals PatternFlowIcmpv6EchoIdentifierMetricTag to protobuf object *otg.PatternFlowIcmpv6EchoIdentifierMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIcmpv6EchoIdentifierMetricTag + // setMsg unmarshals PatternFlowIcmpv6EchoIdentifierMetricTag from protobuf object *otg.PatternFlowIcmpv6EchoIdentifierMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpv6EchoIdentifierMetricTag) PatternFlowIcmpv6EchoIdentifierMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIcmpv6EchoIdentifierMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpv6EchoIdentifierMetricTag + // validate validates PatternFlowIcmpv6EchoIdentifierMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpv6EchoIdentifierMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIcmpv6EchoIdentifierMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIcmpv6EchoIdentifierMetricTag + SetName(value string) PatternFlowIcmpv6EchoIdentifierMetricTag + // Offset returns uint32, set in PatternFlowIcmpv6EchoIdentifierMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIcmpv6EchoIdentifierMetricTag + SetOffset(value uint32) PatternFlowIcmpv6EchoIdentifierMetricTag + // HasOffset checks if Offset has been set in PatternFlowIcmpv6EchoIdentifierMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIcmpv6EchoIdentifierMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIcmpv6EchoIdentifierMetricTag + SetLength(value uint32) PatternFlowIcmpv6EchoIdentifierMetricTag + // HasLength checks if Length has been set in PatternFlowIcmpv6EchoIdentifierMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIcmpv6EchoIdentifierMetricTag object +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) SetName(value string) PatternFlowIcmpv6EchoIdentifierMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIcmpv6EchoIdentifierMetricTag object +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) SetOffset(value uint32) PatternFlowIcmpv6EchoIdentifierMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIcmpv6EchoIdentifierMetricTag object +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) SetLength(value uint32) PatternFlowIcmpv6EchoIdentifierMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIcmpv6EchoIdentifierMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoIdentifierMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIcmpv6EchoIdentifierMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIcmpv6EchoIdentifierMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_icmpv6_echo_sequence_number.go b/gosnappi/pattern_flow_icmpv6_echo_sequence_number.go new file mode 100644 index 00000000..a42c012a --- /dev/null +++ b/gosnappi/pattern_flow_icmpv6_echo_sequence_number.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpv6EchoSequenceNumber ***** +type patternFlowIcmpv6EchoSequenceNumber struct { + validation + obj *otg.PatternFlowIcmpv6EchoSequenceNumber + marshaller marshalPatternFlowIcmpv6EchoSequenceNumber + unMarshaller unMarshalPatternFlowIcmpv6EchoSequenceNumber + incrementHolder PatternFlowIcmpv6EchoSequenceNumberCounter + decrementHolder PatternFlowIcmpv6EchoSequenceNumberCounter + metricTagsHolder PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter +} + +func NewPatternFlowIcmpv6EchoSequenceNumber() PatternFlowIcmpv6EchoSequenceNumber { + obj := patternFlowIcmpv6EchoSequenceNumber{obj: &otg.PatternFlowIcmpv6EchoSequenceNumber{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpv6EchoSequenceNumber) msg() *otg.PatternFlowIcmpv6EchoSequenceNumber { + return obj.obj +} + +func (obj *patternFlowIcmpv6EchoSequenceNumber) setMsg(msg *otg.PatternFlowIcmpv6EchoSequenceNumber) PatternFlowIcmpv6EchoSequenceNumber { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpv6EchoSequenceNumber struct { + obj *patternFlowIcmpv6EchoSequenceNumber +} + +type marshalPatternFlowIcmpv6EchoSequenceNumber interface { + // ToProto marshals PatternFlowIcmpv6EchoSequenceNumber to protobuf object *otg.PatternFlowIcmpv6EchoSequenceNumber + ToProto() (*otg.PatternFlowIcmpv6EchoSequenceNumber, error) + // ToPbText marshals PatternFlowIcmpv6EchoSequenceNumber to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpv6EchoSequenceNumber to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpv6EchoSequenceNumber to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpv6EchoSequenceNumber struct { + obj *patternFlowIcmpv6EchoSequenceNumber +} + +type unMarshalPatternFlowIcmpv6EchoSequenceNumber interface { + // FromProto unmarshals PatternFlowIcmpv6EchoSequenceNumber from protobuf object *otg.PatternFlowIcmpv6EchoSequenceNumber + FromProto(msg *otg.PatternFlowIcmpv6EchoSequenceNumber) (PatternFlowIcmpv6EchoSequenceNumber, error) + // FromPbText unmarshals PatternFlowIcmpv6EchoSequenceNumber from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpv6EchoSequenceNumber from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpv6EchoSequenceNumber from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpv6EchoSequenceNumber) Marshal() marshalPatternFlowIcmpv6EchoSequenceNumber { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpv6EchoSequenceNumber{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpv6EchoSequenceNumber) Unmarshal() unMarshalPatternFlowIcmpv6EchoSequenceNumber { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpv6EchoSequenceNumber{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpv6EchoSequenceNumber) ToProto() (*otg.PatternFlowIcmpv6EchoSequenceNumber, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoSequenceNumber) FromProto(msg *otg.PatternFlowIcmpv6EchoSequenceNumber) (PatternFlowIcmpv6EchoSequenceNumber, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpv6EchoSequenceNumber) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoSequenceNumber) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpv6EchoSequenceNumber) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoSequenceNumber) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpv6EchoSequenceNumber) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoSequenceNumber) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpv6EchoSequenceNumber) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoSequenceNumber) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoSequenceNumber) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpv6EchoSequenceNumber) Clone() (PatternFlowIcmpv6EchoSequenceNumber, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpv6EchoSequenceNumber() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIcmpv6EchoSequenceNumber) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIcmpv6EchoSequenceNumber is iCMPv6 echo sequence number +type PatternFlowIcmpv6EchoSequenceNumber interface { + Validation + // msg marshals PatternFlowIcmpv6EchoSequenceNumber to protobuf object *otg.PatternFlowIcmpv6EchoSequenceNumber + // and doesn't set defaults + msg() *otg.PatternFlowIcmpv6EchoSequenceNumber + // setMsg unmarshals PatternFlowIcmpv6EchoSequenceNumber from protobuf object *otg.PatternFlowIcmpv6EchoSequenceNumber + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpv6EchoSequenceNumber) PatternFlowIcmpv6EchoSequenceNumber + // provides marshal interface + Marshal() marshalPatternFlowIcmpv6EchoSequenceNumber + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpv6EchoSequenceNumber + // validate validates PatternFlowIcmpv6EchoSequenceNumber + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpv6EchoSequenceNumber, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIcmpv6EchoSequenceNumberChoiceEnum, set in PatternFlowIcmpv6EchoSequenceNumber + Choice() PatternFlowIcmpv6EchoSequenceNumberChoiceEnum + // setChoice assigns PatternFlowIcmpv6EchoSequenceNumberChoiceEnum provided by user to PatternFlowIcmpv6EchoSequenceNumber + setChoice(value PatternFlowIcmpv6EchoSequenceNumberChoiceEnum) PatternFlowIcmpv6EchoSequenceNumber + // HasChoice checks if Choice has been set in PatternFlowIcmpv6EchoSequenceNumber + HasChoice() bool + // Value returns uint32, set in PatternFlowIcmpv6EchoSequenceNumber. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIcmpv6EchoSequenceNumber + SetValue(value uint32) PatternFlowIcmpv6EchoSequenceNumber + // HasValue checks if Value has been set in PatternFlowIcmpv6EchoSequenceNumber + HasValue() bool + // Values returns []uint32, set in PatternFlowIcmpv6EchoSequenceNumber. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIcmpv6EchoSequenceNumber + SetValues(value []uint32) PatternFlowIcmpv6EchoSequenceNumber + // Increment returns PatternFlowIcmpv6EchoSequenceNumberCounter, set in PatternFlowIcmpv6EchoSequenceNumber. + // PatternFlowIcmpv6EchoSequenceNumberCounter is integer counter pattern + Increment() PatternFlowIcmpv6EchoSequenceNumberCounter + // SetIncrement assigns PatternFlowIcmpv6EchoSequenceNumberCounter provided by user to PatternFlowIcmpv6EchoSequenceNumber. + // PatternFlowIcmpv6EchoSequenceNumberCounter is integer counter pattern + SetIncrement(value PatternFlowIcmpv6EchoSequenceNumberCounter) PatternFlowIcmpv6EchoSequenceNumber + // HasIncrement checks if Increment has been set in PatternFlowIcmpv6EchoSequenceNumber + HasIncrement() bool + // Decrement returns PatternFlowIcmpv6EchoSequenceNumberCounter, set in PatternFlowIcmpv6EchoSequenceNumber. + // PatternFlowIcmpv6EchoSequenceNumberCounter is integer counter pattern + Decrement() PatternFlowIcmpv6EchoSequenceNumberCounter + // SetDecrement assigns PatternFlowIcmpv6EchoSequenceNumberCounter provided by user to PatternFlowIcmpv6EchoSequenceNumber. + // PatternFlowIcmpv6EchoSequenceNumberCounter is integer counter pattern + SetDecrement(value PatternFlowIcmpv6EchoSequenceNumberCounter) PatternFlowIcmpv6EchoSequenceNumber + // HasDecrement checks if Decrement has been set in PatternFlowIcmpv6EchoSequenceNumber + HasDecrement() bool + // MetricTags returns PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIterIter, set in PatternFlowIcmpv6EchoSequenceNumber + MetricTags() PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter + setNil() +} + +type PatternFlowIcmpv6EchoSequenceNumberChoiceEnum string + +// Enum of Choice on PatternFlowIcmpv6EchoSequenceNumber +var PatternFlowIcmpv6EchoSequenceNumberChoice = struct { + VALUE PatternFlowIcmpv6EchoSequenceNumberChoiceEnum + VALUES PatternFlowIcmpv6EchoSequenceNumberChoiceEnum + INCREMENT PatternFlowIcmpv6EchoSequenceNumberChoiceEnum + DECREMENT PatternFlowIcmpv6EchoSequenceNumberChoiceEnum +}{ + VALUE: PatternFlowIcmpv6EchoSequenceNumberChoiceEnum("value"), + VALUES: PatternFlowIcmpv6EchoSequenceNumberChoiceEnum("values"), + INCREMENT: PatternFlowIcmpv6EchoSequenceNumberChoiceEnum("increment"), + DECREMENT: PatternFlowIcmpv6EchoSequenceNumberChoiceEnum("decrement"), +} + +func (obj *patternFlowIcmpv6EchoSequenceNumber) Choice() PatternFlowIcmpv6EchoSequenceNumberChoiceEnum { + return PatternFlowIcmpv6EchoSequenceNumberChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIcmpv6EchoSequenceNumber) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIcmpv6EchoSequenceNumber) setChoice(value PatternFlowIcmpv6EchoSequenceNumberChoiceEnum) PatternFlowIcmpv6EchoSequenceNumber { + intValue, ok := otg.PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIcmpv6EchoSequenceNumberChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIcmpv6EchoSequenceNumberChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIcmpv6EchoSequenceNumberChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIcmpv6EchoSequenceNumberChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIcmpv6EchoSequenceNumberCounter().msg() + } + + if value == PatternFlowIcmpv6EchoSequenceNumberChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIcmpv6EchoSequenceNumberCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpv6EchoSequenceNumber) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIcmpv6EchoSequenceNumberChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpv6EchoSequenceNumber) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIcmpv6EchoSequenceNumber object +func (obj *patternFlowIcmpv6EchoSequenceNumber) SetValue(value uint32) PatternFlowIcmpv6EchoSequenceNumber { + obj.setChoice(PatternFlowIcmpv6EchoSequenceNumberChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIcmpv6EchoSequenceNumber) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIcmpv6EchoSequenceNumber object +func (obj *patternFlowIcmpv6EchoSequenceNumber) SetValues(value []uint32) PatternFlowIcmpv6EchoSequenceNumber { + obj.setChoice(PatternFlowIcmpv6EchoSequenceNumberChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIcmpv6EchoSequenceNumberCounter +func (obj *patternFlowIcmpv6EchoSequenceNumber) Increment() PatternFlowIcmpv6EchoSequenceNumberCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIcmpv6EchoSequenceNumberChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIcmpv6EchoSequenceNumberCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIcmpv6EchoSequenceNumberCounter +func (obj *patternFlowIcmpv6EchoSequenceNumber) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIcmpv6EchoSequenceNumberCounter value in the PatternFlowIcmpv6EchoSequenceNumber object +func (obj *patternFlowIcmpv6EchoSequenceNumber) SetIncrement(value PatternFlowIcmpv6EchoSequenceNumberCounter) PatternFlowIcmpv6EchoSequenceNumber { + obj.setChoice(PatternFlowIcmpv6EchoSequenceNumberChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIcmpv6EchoSequenceNumberCounter +func (obj *patternFlowIcmpv6EchoSequenceNumber) Decrement() PatternFlowIcmpv6EchoSequenceNumberCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIcmpv6EchoSequenceNumberChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIcmpv6EchoSequenceNumberCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIcmpv6EchoSequenceNumberCounter +func (obj *patternFlowIcmpv6EchoSequenceNumber) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIcmpv6EchoSequenceNumberCounter value in the PatternFlowIcmpv6EchoSequenceNumber object +func (obj *patternFlowIcmpv6EchoSequenceNumber) SetDecrement(value PatternFlowIcmpv6EchoSequenceNumberCounter) PatternFlowIcmpv6EchoSequenceNumber { + obj.setChoice(PatternFlowIcmpv6EchoSequenceNumberChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIcmpv6EchoSequenceNumberMetricTag +func (obj *patternFlowIcmpv6EchoSequenceNumber) MetricTags() PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter struct { + obj *patternFlowIcmpv6EchoSequenceNumber + patternFlowIcmpv6EchoSequenceNumberMetricTagSlice []PatternFlowIcmpv6EchoSequenceNumberMetricTag + fieldPtr *[]*otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag +} + +func newPatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter(ptr *[]*otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag) PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter { + return &patternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter interface { + setMsg(*patternFlowIcmpv6EchoSequenceNumber) PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter + Items() []PatternFlowIcmpv6EchoSequenceNumberMetricTag + Add() PatternFlowIcmpv6EchoSequenceNumberMetricTag + Append(items ...PatternFlowIcmpv6EchoSequenceNumberMetricTag) PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter + Set(index int, newObj PatternFlowIcmpv6EchoSequenceNumberMetricTag) PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter + Clear() PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter + clearHolderSlice() PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter + appendHolderSlice(item PatternFlowIcmpv6EchoSequenceNumberMetricTag) PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter) setMsg(msg *patternFlowIcmpv6EchoSequenceNumber) PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIcmpv6EchoSequenceNumberMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter) Items() []PatternFlowIcmpv6EchoSequenceNumberMetricTag { + return obj.patternFlowIcmpv6EchoSequenceNumberMetricTagSlice +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter) Add() PatternFlowIcmpv6EchoSequenceNumberMetricTag { + newObj := &otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIcmpv6EchoSequenceNumberMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIcmpv6EchoSequenceNumberMetricTagSlice = append(obj.patternFlowIcmpv6EchoSequenceNumberMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter) Append(items ...PatternFlowIcmpv6EchoSequenceNumberMetricTag) PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIcmpv6EchoSequenceNumberMetricTagSlice = append(obj.patternFlowIcmpv6EchoSequenceNumberMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter) Set(index int, newObj PatternFlowIcmpv6EchoSequenceNumberMetricTag) PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIcmpv6EchoSequenceNumberMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter) Clear() PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag{} + obj.patternFlowIcmpv6EchoSequenceNumberMetricTagSlice = []PatternFlowIcmpv6EchoSequenceNumberMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter) clearHolderSlice() PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter { + if len(obj.patternFlowIcmpv6EchoSequenceNumberMetricTagSlice) > 0 { + obj.patternFlowIcmpv6EchoSequenceNumberMetricTagSlice = []PatternFlowIcmpv6EchoSequenceNumberMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter) appendHolderSlice(item PatternFlowIcmpv6EchoSequenceNumberMetricTag) PatternFlowIcmpv6EchoSequenceNumberPatternFlowIcmpv6EchoSequenceNumberMetricTagIter { + obj.patternFlowIcmpv6EchoSequenceNumberMetricTagSlice = append(obj.patternFlowIcmpv6EchoSequenceNumberMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIcmpv6EchoSequenceNumber) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoSequenceNumber.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIcmpv6EchoSequenceNumber.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIcmpv6EchoSequenceNumberMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIcmpv6EchoSequenceNumber) setDefault() { + var choices_set int = 0 + var choice PatternFlowIcmpv6EchoSequenceNumberChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIcmpv6EchoSequenceNumberChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIcmpv6EchoSequenceNumberChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIcmpv6EchoSequenceNumberChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIcmpv6EchoSequenceNumberChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIcmpv6EchoSequenceNumberChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIcmpv6EchoSequenceNumber") + } + } else { + intVal := otg.PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIcmpv6EchoSequenceNumber_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_icmpv6_echo_sequence_number_counter.go b/gosnappi/pattern_flow_icmpv6_echo_sequence_number_counter.go new file mode 100644 index 00000000..e606846b --- /dev/null +++ b/gosnappi/pattern_flow_icmpv6_echo_sequence_number_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpv6EchoSequenceNumberCounter ***** +type patternFlowIcmpv6EchoSequenceNumberCounter struct { + validation + obj *otg.PatternFlowIcmpv6EchoSequenceNumberCounter + marshaller marshalPatternFlowIcmpv6EchoSequenceNumberCounter + unMarshaller unMarshalPatternFlowIcmpv6EchoSequenceNumberCounter +} + +func NewPatternFlowIcmpv6EchoSequenceNumberCounter() PatternFlowIcmpv6EchoSequenceNumberCounter { + obj := patternFlowIcmpv6EchoSequenceNumberCounter{obj: &otg.PatternFlowIcmpv6EchoSequenceNumberCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) msg() *otg.PatternFlowIcmpv6EchoSequenceNumberCounter { + return obj.obj +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) setMsg(msg *otg.PatternFlowIcmpv6EchoSequenceNumberCounter) PatternFlowIcmpv6EchoSequenceNumberCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpv6EchoSequenceNumberCounter struct { + obj *patternFlowIcmpv6EchoSequenceNumberCounter +} + +type marshalPatternFlowIcmpv6EchoSequenceNumberCounter interface { + // ToProto marshals PatternFlowIcmpv6EchoSequenceNumberCounter to protobuf object *otg.PatternFlowIcmpv6EchoSequenceNumberCounter + ToProto() (*otg.PatternFlowIcmpv6EchoSequenceNumberCounter, error) + // ToPbText marshals PatternFlowIcmpv6EchoSequenceNumberCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpv6EchoSequenceNumberCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpv6EchoSequenceNumberCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpv6EchoSequenceNumberCounter struct { + obj *patternFlowIcmpv6EchoSequenceNumberCounter +} + +type unMarshalPatternFlowIcmpv6EchoSequenceNumberCounter interface { + // FromProto unmarshals PatternFlowIcmpv6EchoSequenceNumberCounter from protobuf object *otg.PatternFlowIcmpv6EchoSequenceNumberCounter + FromProto(msg *otg.PatternFlowIcmpv6EchoSequenceNumberCounter) (PatternFlowIcmpv6EchoSequenceNumberCounter, error) + // FromPbText unmarshals PatternFlowIcmpv6EchoSequenceNumberCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpv6EchoSequenceNumberCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpv6EchoSequenceNumberCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) Marshal() marshalPatternFlowIcmpv6EchoSequenceNumberCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpv6EchoSequenceNumberCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) Unmarshal() unMarshalPatternFlowIcmpv6EchoSequenceNumberCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpv6EchoSequenceNumberCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpv6EchoSequenceNumberCounter) ToProto() (*otg.PatternFlowIcmpv6EchoSequenceNumberCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoSequenceNumberCounter) FromProto(msg *otg.PatternFlowIcmpv6EchoSequenceNumberCounter) (PatternFlowIcmpv6EchoSequenceNumberCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpv6EchoSequenceNumberCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoSequenceNumberCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpv6EchoSequenceNumberCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoSequenceNumberCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpv6EchoSequenceNumberCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoSequenceNumberCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) Clone() (PatternFlowIcmpv6EchoSequenceNumberCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpv6EchoSequenceNumberCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpv6EchoSequenceNumberCounter is integer counter pattern +type PatternFlowIcmpv6EchoSequenceNumberCounter interface { + Validation + // msg marshals PatternFlowIcmpv6EchoSequenceNumberCounter to protobuf object *otg.PatternFlowIcmpv6EchoSequenceNumberCounter + // and doesn't set defaults + msg() *otg.PatternFlowIcmpv6EchoSequenceNumberCounter + // setMsg unmarshals PatternFlowIcmpv6EchoSequenceNumberCounter from protobuf object *otg.PatternFlowIcmpv6EchoSequenceNumberCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpv6EchoSequenceNumberCounter) PatternFlowIcmpv6EchoSequenceNumberCounter + // provides marshal interface + Marshal() marshalPatternFlowIcmpv6EchoSequenceNumberCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpv6EchoSequenceNumberCounter + // validate validates PatternFlowIcmpv6EchoSequenceNumberCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpv6EchoSequenceNumberCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIcmpv6EchoSequenceNumberCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIcmpv6EchoSequenceNumberCounter + SetStart(value uint32) PatternFlowIcmpv6EchoSequenceNumberCounter + // HasStart checks if Start has been set in PatternFlowIcmpv6EchoSequenceNumberCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIcmpv6EchoSequenceNumberCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIcmpv6EchoSequenceNumberCounter + SetStep(value uint32) PatternFlowIcmpv6EchoSequenceNumberCounter + // HasStep checks if Step has been set in PatternFlowIcmpv6EchoSequenceNumberCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIcmpv6EchoSequenceNumberCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIcmpv6EchoSequenceNumberCounter + SetCount(value uint32) PatternFlowIcmpv6EchoSequenceNumberCounter + // HasCount checks if Count has been set in PatternFlowIcmpv6EchoSequenceNumberCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIcmpv6EchoSequenceNumberCounter object +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) SetStart(value uint32) PatternFlowIcmpv6EchoSequenceNumberCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIcmpv6EchoSequenceNumberCounter object +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) SetStep(value uint32) PatternFlowIcmpv6EchoSequenceNumberCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIcmpv6EchoSequenceNumberCounter object +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) SetCount(value uint32) PatternFlowIcmpv6EchoSequenceNumberCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoSequenceNumberCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoSequenceNumberCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoSequenceNumberCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_icmpv6_echo_sequence_number_metric_tag.go b/gosnappi/pattern_flow_icmpv6_echo_sequence_number_metric_tag.go new file mode 100644 index 00000000..a6ab3caf --- /dev/null +++ b/gosnappi/pattern_flow_icmpv6_echo_sequence_number_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpv6EchoSequenceNumberMetricTag ***** +type patternFlowIcmpv6EchoSequenceNumberMetricTag struct { + validation + obj *otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag + marshaller marshalPatternFlowIcmpv6EchoSequenceNumberMetricTag + unMarshaller unMarshalPatternFlowIcmpv6EchoSequenceNumberMetricTag +} + +func NewPatternFlowIcmpv6EchoSequenceNumberMetricTag() PatternFlowIcmpv6EchoSequenceNumberMetricTag { + obj := patternFlowIcmpv6EchoSequenceNumberMetricTag{obj: &otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) msg() *otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag { + return obj.obj +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) setMsg(msg *otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag) PatternFlowIcmpv6EchoSequenceNumberMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpv6EchoSequenceNumberMetricTag struct { + obj *patternFlowIcmpv6EchoSequenceNumberMetricTag +} + +type marshalPatternFlowIcmpv6EchoSequenceNumberMetricTag interface { + // ToProto marshals PatternFlowIcmpv6EchoSequenceNumberMetricTag to protobuf object *otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag + ToProto() (*otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag, error) + // ToPbText marshals PatternFlowIcmpv6EchoSequenceNumberMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpv6EchoSequenceNumberMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpv6EchoSequenceNumberMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpv6EchoSequenceNumberMetricTag struct { + obj *patternFlowIcmpv6EchoSequenceNumberMetricTag +} + +type unMarshalPatternFlowIcmpv6EchoSequenceNumberMetricTag interface { + // FromProto unmarshals PatternFlowIcmpv6EchoSequenceNumberMetricTag from protobuf object *otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag + FromProto(msg *otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag) (PatternFlowIcmpv6EchoSequenceNumberMetricTag, error) + // FromPbText unmarshals PatternFlowIcmpv6EchoSequenceNumberMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpv6EchoSequenceNumberMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpv6EchoSequenceNumberMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) Marshal() marshalPatternFlowIcmpv6EchoSequenceNumberMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpv6EchoSequenceNumberMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) Unmarshal() unMarshalPatternFlowIcmpv6EchoSequenceNumberMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpv6EchoSequenceNumberMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpv6EchoSequenceNumberMetricTag) ToProto() (*otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoSequenceNumberMetricTag) FromProto(msg *otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag) (PatternFlowIcmpv6EchoSequenceNumberMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpv6EchoSequenceNumberMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoSequenceNumberMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpv6EchoSequenceNumberMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoSequenceNumberMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpv6EchoSequenceNumberMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoSequenceNumberMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) Clone() (PatternFlowIcmpv6EchoSequenceNumberMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpv6EchoSequenceNumberMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpv6EchoSequenceNumberMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIcmpv6EchoSequenceNumberMetricTag interface { + Validation + // msg marshals PatternFlowIcmpv6EchoSequenceNumberMetricTag to protobuf object *otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag + // setMsg unmarshals PatternFlowIcmpv6EchoSequenceNumberMetricTag from protobuf object *otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag) PatternFlowIcmpv6EchoSequenceNumberMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIcmpv6EchoSequenceNumberMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpv6EchoSequenceNumberMetricTag + // validate validates PatternFlowIcmpv6EchoSequenceNumberMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpv6EchoSequenceNumberMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIcmpv6EchoSequenceNumberMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIcmpv6EchoSequenceNumberMetricTag + SetName(value string) PatternFlowIcmpv6EchoSequenceNumberMetricTag + // Offset returns uint32, set in PatternFlowIcmpv6EchoSequenceNumberMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIcmpv6EchoSequenceNumberMetricTag + SetOffset(value uint32) PatternFlowIcmpv6EchoSequenceNumberMetricTag + // HasOffset checks if Offset has been set in PatternFlowIcmpv6EchoSequenceNumberMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIcmpv6EchoSequenceNumberMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIcmpv6EchoSequenceNumberMetricTag + SetLength(value uint32) PatternFlowIcmpv6EchoSequenceNumberMetricTag + // HasLength checks if Length has been set in PatternFlowIcmpv6EchoSequenceNumberMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIcmpv6EchoSequenceNumberMetricTag object +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) SetName(value string) PatternFlowIcmpv6EchoSequenceNumberMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIcmpv6EchoSequenceNumberMetricTag object +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) SetOffset(value uint32) PatternFlowIcmpv6EchoSequenceNumberMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIcmpv6EchoSequenceNumberMetricTag object +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) SetLength(value uint32) PatternFlowIcmpv6EchoSequenceNumberMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIcmpv6EchoSequenceNumberMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoSequenceNumberMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIcmpv6EchoSequenceNumberMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIcmpv6EchoSequenceNumberMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_icmpv6_echo_type.go b/gosnappi/pattern_flow_icmpv6_echo_type.go new file mode 100644 index 00000000..fb039404 --- /dev/null +++ b/gosnappi/pattern_flow_icmpv6_echo_type.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpv6EchoType ***** +type patternFlowIcmpv6EchoType struct { + validation + obj *otg.PatternFlowIcmpv6EchoType + marshaller marshalPatternFlowIcmpv6EchoType + unMarshaller unMarshalPatternFlowIcmpv6EchoType + incrementHolder PatternFlowIcmpv6EchoTypeCounter + decrementHolder PatternFlowIcmpv6EchoTypeCounter + metricTagsHolder PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter +} + +func NewPatternFlowIcmpv6EchoType() PatternFlowIcmpv6EchoType { + obj := patternFlowIcmpv6EchoType{obj: &otg.PatternFlowIcmpv6EchoType{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpv6EchoType) msg() *otg.PatternFlowIcmpv6EchoType { + return obj.obj +} + +func (obj *patternFlowIcmpv6EchoType) setMsg(msg *otg.PatternFlowIcmpv6EchoType) PatternFlowIcmpv6EchoType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpv6EchoType struct { + obj *patternFlowIcmpv6EchoType +} + +type marshalPatternFlowIcmpv6EchoType interface { + // ToProto marshals PatternFlowIcmpv6EchoType to protobuf object *otg.PatternFlowIcmpv6EchoType + ToProto() (*otg.PatternFlowIcmpv6EchoType, error) + // ToPbText marshals PatternFlowIcmpv6EchoType to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpv6EchoType to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpv6EchoType to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpv6EchoType struct { + obj *patternFlowIcmpv6EchoType +} + +type unMarshalPatternFlowIcmpv6EchoType interface { + // FromProto unmarshals PatternFlowIcmpv6EchoType from protobuf object *otg.PatternFlowIcmpv6EchoType + FromProto(msg *otg.PatternFlowIcmpv6EchoType) (PatternFlowIcmpv6EchoType, error) + // FromPbText unmarshals PatternFlowIcmpv6EchoType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpv6EchoType from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpv6EchoType from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpv6EchoType) Marshal() marshalPatternFlowIcmpv6EchoType { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpv6EchoType{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpv6EchoType) Unmarshal() unMarshalPatternFlowIcmpv6EchoType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpv6EchoType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpv6EchoType) ToProto() (*otg.PatternFlowIcmpv6EchoType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoType) FromProto(msg *otg.PatternFlowIcmpv6EchoType) (PatternFlowIcmpv6EchoType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpv6EchoType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpv6EchoType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpv6EchoType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpv6EchoType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpv6EchoType) Clone() (PatternFlowIcmpv6EchoType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpv6EchoType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIcmpv6EchoType) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIcmpv6EchoType is iCMPv6 echo type +type PatternFlowIcmpv6EchoType interface { + Validation + // msg marshals PatternFlowIcmpv6EchoType to protobuf object *otg.PatternFlowIcmpv6EchoType + // and doesn't set defaults + msg() *otg.PatternFlowIcmpv6EchoType + // setMsg unmarshals PatternFlowIcmpv6EchoType from protobuf object *otg.PatternFlowIcmpv6EchoType + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpv6EchoType) PatternFlowIcmpv6EchoType + // provides marshal interface + Marshal() marshalPatternFlowIcmpv6EchoType + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpv6EchoType + // validate validates PatternFlowIcmpv6EchoType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpv6EchoType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIcmpv6EchoTypeChoiceEnum, set in PatternFlowIcmpv6EchoType + Choice() PatternFlowIcmpv6EchoTypeChoiceEnum + // setChoice assigns PatternFlowIcmpv6EchoTypeChoiceEnum provided by user to PatternFlowIcmpv6EchoType + setChoice(value PatternFlowIcmpv6EchoTypeChoiceEnum) PatternFlowIcmpv6EchoType + // HasChoice checks if Choice has been set in PatternFlowIcmpv6EchoType + HasChoice() bool + // Value returns uint32, set in PatternFlowIcmpv6EchoType. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIcmpv6EchoType + SetValue(value uint32) PatternFlowIcmpv6EchoType + // HasValue checks if Value has been set in PatternFlowIcmpv6EchoType + HasValue() bool + // Values returns []uint32, set in PatternFlowIcmpv6EchoType. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIcmpv6EchoType + SetValues(value []uint32) PatternFlowIcmpv6EchoType + // Increment returns PatternFlowIcmpv6EchoTypeCounter, set in PatternFlowIcmpv6EchoType. + // PatternFlowIcmpv6EchoTypeCounter is integer counter pattern + Increment() PatternFlowIcmpv6EchoTypeCounter + // SetIncrement assigns PatternFlowIcmpv6EchoTypeCounter provided by user to PatternFlowIcmpv6EchoType. + // PatternFlowIcmpv6EchoTypeCounter is integer counter pattern + SetIncrement(value PatternFlowIcmpv6EchoTypeCounter) PatternFlowIcmpv6EchoType + // HasIncrement checks if Increment has been set in PatternFlowIcmpv6EchoType + HasIncrement() bool + // Decrement returns PatternFlowIcmpv6EchoTypeCounter, set in PatternFlowIcmpv6EchoType. + // PatternFlowIcmpv6EchoTypeCounter is integer counter pattern + Decrement() PatternFlowIcmpv6EchoTypeCounter + // SetDecrement assigns PatternFlowIcmpv6EchoTypeCounter provided by user to PatternFlowIcmpv6EchoType. + // PatternFlowIcmpv6EchoTypeCounter is integer counter pattern + SetDecrement(value PatternFlowIcmpv6EchoTypeCounter) PatternFlowIcmpv6EchoType + // HasDecrement checks if Decrement has been set in PatternFlowIcmpv6EchoType + HasDecrement() bool + // MetricTags returns PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIterIter, set in PatternFlowIcmpv6EchoType + MetricTags() PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter + setNil() +} + +type PatternFlowIcmpv6EchoTypeChoiceEnum string + +// Enum of Choice on PatternFlowIcmpv6EchoType +var PatternFlowIcmpv6EchoTypeChoice = struct { + VALUE PatternFlowIcmpv6EchoTypeChoiceEnum + VALUES PatternFlowIcmpv6EchoTypeChoiceEnum + INCREMENT PatternFlowIcmpv6EchoTypeChoiceEnum + DECREMENT PatternFlowIcmpv6EchoTypeChoiceEnum +}{ + VALUE: PatternFlowIcmpv6EchoTypeChoiceEnum("value"), + VALUES: PatternFlowIcmpv6EchoTypeChoiceEnum("values"), + INCREMENT: PatternFlowIcmpv6EchoTypeChoiceEnum("increment"), + DECREMENT: PatternFlowIcmpv6EchoTypeChoiceEnum("decrement"), +} + +func (obj *patternFlowIcmpv6EchoType) Choice() PatternFlowIcmpv6EchoTypeChoiceEnum { + return PatternFlowIcmpv6EchoTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIcmpv6EchoType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIcmpv6EchoType) setChoice(value PatternFlowIcmpv6EchoTypeChoiceEnum) PatternFlowIcmpv6EchoType { + intValue, ok := otg.PatternFlowIcmpv6EchoType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIcmpv6EchoTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIcmpv6EchoType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIcmpv6EchoTypeChoice.VALUE { + defaultValue := uint32(128) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIcmpv6EchoTypeChoice.VALUES { + defaultValue := []uint32{128} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIcmpv6EchoTypeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIcmpv6EchoTypeCounter().msg() + } + + if value == PatternFlowIcmpv6EchoTypeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIcmpv6EchoTypeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpv6EchoType) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIcmpv6EchoTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIcmpv6EchoType) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIcmpv6EchoType object +func (obj *patternFlowIcmpv6EchoType) SetValue(value uint32) PatternFlowIcmpv6EchoType { + obj.setChoice(PatternFlowIcmpv6EchoTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIcmpv6EchoType) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{128}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIcmpv6EchoType object +func (obj *patternFlowIcmpv6EchoType) SetValues(value []uint32) PatternFlowIcmpv6EchoType { + obj.setChoice(PatternFlowIcmpv6EchoTypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIcmpv6EchoTypeCounter +func (obj *patternFlowIcmpv6EchoType) Increment() PatternFlowIcmpv6EchoTypeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIcmpv6EchoTypeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIcmpv6EchoTypeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIcmpv6EchoTypeCounter +func (obj *patternFlowIcmpv6EchoType) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIcmpv6EchoTypeCounter value in the PatternFlowIcmpv6EchoType object +func (obj *patternFlowIcmpv6EchoType) SetIncrement(value PatternFlowIcmpv6EchoTypeCounter) PatternFlowIcmpv6EchoType { + obj.setChoice(PatternFlowIcmpv6EchoTypeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIcmpv6EchoTypeCounter +func (obj *patternFlowIcmpv6EchoType) Decrement() PatternFlowIcmpv6EchoTypeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIcmpv6EchoTypeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIcmpv6EchoTypeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIcmpv6EchoTypeCounter +func (obj *patternFlowIcmpv6EchoType) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIcmpv6EchoTypeCounter value in the PatternFlowIcmpv6EchoType object +func (obj *patternFlowIcmpv6EchoType) SetDecrement(value PatternFlowIcmpv6EchoTypeCounter) PatternFlowIcmpv6EchoType { + obj.setChoice(PatternFlowIcmpv6EchoTypeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIcmpv6EchoTypeMetricTag +func (obj *patternFlowIcmpv6EchoType) MetricTags() PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIcmpv6EchoTypeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter struct { + obj *patternFlowIcmpv6EchoType + patternFlowIcmpv6EchoTypeMetricTagSlice []PatternFlowIcmpv6EchoTypeMetricTag + fieldPtr *[]*otg.PatternFlowIcmpv6EchoTypeMetricTag +} + +func newPatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter(ptr *[]*otg.PatternFlowIcmpv6EchoTypeMetricTag) PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter { + return &patternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter interface { + setMsg(*patternFlowIcmpv6EchoType) PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter + Items() []PatternFlowIcmpv6EchoTypeMetricTag + Add() PatternFlowIcmpv6EchoTypeMetricTag + Append(items ...PatternFlowIcmpv6EchoTypeMetricTag) PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter + Set(index int, newObj PatternFlowIcmpv6EchoTypeMetricTag) PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter + Clear() PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter + clearHolderSlice() PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter + appendHolderSlice(item PatternFlowIcmpv6EchoTypeMetricTag) PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter +} + +func (obj *patternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter) setMsg(msg *patternFlowIcmpv6EchoType) PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIcmpv6EchoTypeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter) Items() []PatternFlowIcmpv6EchoTypeMetricTag { + return obj.patternFlowIcmpv6EchoTypeMetricTagSlice +} + +func (obj *patternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter) Add() PatternFlowIcmpv6EchoTypeMetricTag { + newObj := &otg.PatternFlowIcmpv6EchoTypeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIcmpv6EchoTypeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIcmpv6EchoTypeMetricTagSlice = append(obj.patternFlowIcmpv6EchoTypeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter) Append(items ...PatternFlowIcmpv6EchoTypeMetricTag) PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIcmpv6EchoTypeMetricTagSlice = append(obj.patternFlowIcmpv6EchoTypeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter) Set(index int, newObj PatternFlowIcmpv6EchoTypeMetricTag) PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIcmpv6EchoTypeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter) Clear() PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIcmpv6EchoTypeMetricTag{} + obj.patternFlowIcmpv6EchoTypeMetricTagSlice = []PatternFlowIcmpv6EchoTypeMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter) clearHolderSlice() PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter { + if len(obj.patternFlowIcmpv6EchoTypeMetricTagSlice) > 0 { + obj.patternFlowIcmpv6EchoTypeMetricTagSlice = []PatternFlowIcmpv6EchoTypeMetricTag{} + } + return obj +} +func (obj *patternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter) appendHolderSlice(item PatternFlowIcmpv6EchoTypeMetricTag) PatternFlowIcmpv6EchoTypePatternFlowIcmpv6EchoTypeMetricTagIter { + obj.patternFlowIcmpv6EchoTypeMetricTagSlice = append(obj.patternFlowIcmpv6EchoTypeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIcmpv6EchoType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoType.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIcmpv6EchoType.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIcmpv6EchoTypeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIcmpv6EchoType) setDefault() { + var choices_set int = 0 + var choice PatternFlowIcmpv6EchoTypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIcmpv6EchoTypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIcmpv6EchoTypeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIcmpv6EchoTypeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIcmpv6EchoTypeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIcmpv6EchoTypeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIcmpv6EchoType") + } + } else { + intVal := otg.PatternFlowIcmpv6EchoType_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIcmpv6EchoType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_icmpv6_echo_type_counter.go b/gosnappi/pattern_flow_icmpv6_echo_type_counter.go new file mode 100644 index 00000000..50d16674 --- /dev/null +++ b/gosnappi/pattern_flow_icmpv6_echo_type_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpv6EchoTypeCounter ***** +type patternFlowIcmpv6EchoTypeCounter struct { + validation + obj *otg.PatternFlowIcmpv6EchoTypeCounter + marshaller marshalPatternFlowIcmpv6EchoTypeCounter + unMarshaller unMarshalPatternFlowIcmpv6EchoTypeCounter +} + +func NewPatternFlowIcmpv6EchoTypeCounter() PatternFlowIcmpv6EchoTypeCounter { + obj := patternFlowIcmpv6EchoTypeCounter{obj: &otg.PatternFlowIcmpv6EchoTypeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpv6EchoTypeCounter) msg() *otg.PatternFlowIcmpv6EchoTypeCounter { + return obj.obj +} + +func (obj *patternFlowIcmpv6EchoTypeCounter) setMsg(msg *otg.PatternFlowIcmpv6EchoTypeCounter) PatternFlowIcmpv6EchoTypeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpv6EchoTypeCounter struct { + obj *patternFlowIcmpv6EchoTypeCounter +} + +type marshalPatternFlowIcmpv6EchoTypeCounter interface { + // ToProto marshals PatternFlowIcmpv6EchoTypeCounter to protobuf object *otg.PatternFlowIcmpv6EchoTypeCounter + ToProto() (*otg.PatternFlowIcmpv6EchoTypeCounter, error) + // ToPbText marshals PatternFlowIcmpv6EchoTypeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpv6EchoTypeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpv6EchoTypeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpv6EchoTypeCounter struct { + obj *patternFlowIcmpv6EchoTypeCounter +} + +type unMarshalPatternFlowIcmpv6EchoTypeCounter interface { + // FromProto unmarshals PatternFlowIcmpv6EchoTypeCounter from protobuf object *otg.PatternFlowIcmpv6EchoTypeCounter + FromProto(msg *otg.PatternFlowIcmpv6EchoTypeCounter) (PatternFlowIcmpv6EchoTypeCounter, error) + // FromPbText unmarshals PatternFlowIcmpv6EchoTypeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpv6EchoTypeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpv6EchoTypeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpv6EchoTypeCounter) Marshal() marshalPatternFlowIcmpv6EchoTypeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpv6EchoTypeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpv6EchoTypeCounter) Unmarshal() unMarshalPatternFlowIcmpv6EchoTypeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpv6EchoTypeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpv6EchoTypeCounter) ToProto() (*otg.PatternFlowIcmpv6EchoTypeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoTypeCounter) FromProto(msg *otg.PatternFlowIcmpv6EchoTypeCounter) (PatternFlowIcmpv6EchoTypeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpv6EchoTypeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoTypeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpv6EchoTypeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoTypeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpv6EchoTypeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoTypeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpv6EchoTypeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoTypeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoTypeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpv6EchoTypeCounter) Clone() (PatternFlowIcmpv6EchoTypeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpv6EchoTypeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpv6EchoTypeCounter is integer counter pattern +type PatternFlowIcmpv6EchoTypeCounter interface { + Validation + // msg marshals PatternFlowIcmpv6EchoTypeCounter to protobuf object *otg.PatternFlowIcmpv6EchoTypeCounter + // and doesn't set defaults + msg() *otg.PatternFlowIcmpv6EchoTypeCounter + // setMsg unmarshals PatternFlowIcmpv6EchoTypeCounter from protobuf object *otg.PatternFlowIcmpv6EchoTypeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpv6EchoTypeCounter) PatternFlowIcmpv6EchoTypeCounter + // provides marshal interface + Marshal() marshalPatternFlowIcmpv6EchoTypeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpv6EchoTypeCounter + // validate validates PatternFlowIcmpv6EchoTypeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpv6EchoTypeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIcmpv6EchoTypeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIcmpv6EchoTypeCounter + SetStart(value uint32) PatternFlowIcmpv6EchoTypeCounter + // HasStart checks if Start has been set in PatternFlowIcmpv6EchoTypeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIcmpv6EchoTypeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIcmpv6EchoTypeCounter + SetStep(value uint32) PatternFlowIcmpv6EchoTypeCounter + // HasStep checks if Step has been set in PatternFlowIcmpv6EchoTypeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIcmpv6EchoTypeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIcmpv6EchoTypeCounter + SetCount(value uint32) PatternFlowIcmpv6EchoTypeCounter + // HasCount checks if Count has been set in PatternFlowIcmpv6EchoTypeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpv6EchoTypeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIcmpv6EchoTypeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIcmpv6EchoTypeCounter object +func (obj *patternFlowIcmpv6EchoTypeCounter) SetStart(value uint32) PatternFlowIcmpv6EchoTypeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpv6EchoTypeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIcmpv6EchoTypeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIcmpv6EchoTypeCounter object +func (obj *patternFlowIcmpv6EchoTypeCounter) SetStep(value uint32) PatternFlowIcmpv6EchoTypeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpv6EchoTypeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIcmpv6EchoTypeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIcmpv6EchoTypeCounter object +func (obj *patternFlowIcmpv6EchoTypeCounter) SetCount(value uint32) PatternFlowIcmpv6EchoTypeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIcmpv6EchoTypeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoTypeCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoTypeCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoTypeCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIcmpv6EchoTypeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(128) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_icmpv6_echo_type_metric_tag.go b/gosnappi/pattern_flow_icmpv6_echo_type_metric_tag.go new file mode 100644 index 00000000..40cdedce --- /dev/null +++ b/gosnappi/pattern_flow_icmpv6_echo_type_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIcmpv6EchoTypeMetricTag ***** +type patternFlowIcmpv6EchoTypeMetricTag struct { + validation + obj *otg.PatternFlowIcmpv6EchoTypeMetricTag + marshaller marshalPatternFlowIcmpv6EchoTypeMetricTag + unMarshaller unMarshalPatternFlowIcmpv6EchoTypeMetricTag +} + +func NewPatternFlowIcmpv6EchoTypeMetricTag() PatternFlowIcmpv6EchoTypeMetricTag { + obj := patternFlowIcmpv6EchoTypeMetricTag{obj: &otg.PatternFlowIcmpv6EchoTypeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIcmpv6EchoTypeMetricTag) msg() *otg.PatternFlowIcmpv6EchoTypeMetricTag { + return obj.obj +} + +func (obj *patternFlowIcmpv6EchoTypeMetricTag) setMsg(msg *otg.PatternFlowIcmpv6EchoTypeMetricTag) PatternFlowIcmpv6EchoTypeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIcmpv6EchoTypeMetricTag struct { + obj *patternFlowIcmpv6EchoTypeMetricTag +} + +type marshalPatternFlowIcmpv6EchoTypeMetricTag interface { + // ToProto marshals PatternFlowIcmpv6EchoTypeMetricTag to protobuf object *otg.PatternFlowIcmpv6EchoTypeMetricTag + ToProto() (*otg.PatternFlowIcmpv6EchoTypeMetricTag, error) + // ToPbText marshals PatternFlowIcmpv6EchoTypeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIcmpv6EchoTypeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIcmpv6EchoTypeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIcmpv6EchoTypeMetricTag struct { + obj *patternFlowIcmpv6EchoTypeMetricTag +} + +type unMarshalPatternFlowIcmpv6EchoTypeMetricTag interface { + // FromProto unmarshals PatternFlowIcmpv6EchoTypeMetricTag from protobuf object *otg.PatternFlowIcmpv6EchoTypeMetricTag + FromProto(msg *otg.PatternFlowIcmpv6EchoTypeMetricTag) (PatternFlowIcmpv6EchoTypeMetricTag, error) + // FromPbText unmarshals PatternFlowIcmpv6EchoTypeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIcmpv6EchoTypeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIcmpv6EchoTypeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIcmpv6EchoTypeMetricTag) Marshal() marshalPatternFlowIcmpv6EchoTypeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIcmpv6EchoTypeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIcmpv6EchoTypeMetricTag) Unmarshal() unMarshalPatternFlowIcmpv6EchoTypeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIcmpv6EchoTypeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIcmpv6EchoTypeMetricTag) ToProto() (*otg.PatternFlowIcmpv6EchoTypeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoTypeMetricTag) FromProto(msg *otg.PatternFlowIcmpv6EchoTypeMetricTag) (PatternFlowIcmpv6EchoTypeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIcmpv6EchoTypeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoTypeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIcmpv6EchoTypeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoTypeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIcmpv6EchoTypeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIcmpv6EchoTypeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIcmpv6EchoTypeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoTypeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIcmpv6EchoTypeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIcmpv6EchoTypeMetricTag) Clone() (PatternFlowIcmpv6EchoTypeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIcmpv6EchoTypeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIcmpv6EchoTypeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIcmpv6EchoTypeMetricTag interface { + Validation + // msg marshals PatternFlowIcmpv6EchoTypeMetricTag to protobuf object *otg.PatternFlowIcmpv6EchoTypeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIcmpv6EchoTypeMetricTag + // setMsg unmarshals PatternFlowIcmpv6EchoTypeMetricTag from protobuf object *otg.PatternFlowIcmpv6EchoTypeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIcmpv6EchoTypeMetricTag) PatternFlowIcmpv6EchoTypeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIcmpv6EchoTypeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIcmpv6EchoTypeMetricTag + // validate validates PatternFlowIcmpv6EchoTypeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIcmpv6EchoTypeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIcmpv6EchoTypeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIcmpv6EchoTypeMetricTag + SetName(value string) PatternFlowIcmpv6EchoTypeMetricTag + // Offset returns uint32, set in PatternFlowIcmpv6EchoTypeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIcmpv6EchoTypeMetricTag + SetOffset(value uint32) PatternFlowIcmpv6EchoTypeMetricTag + // HasOffset checks if Offset has been set in PatternFlowIcmpv6EchoTypeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIcmpv6EchoTypeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIcmpv6EchoTypeMetricTag + SetLength(value uint32) PatternFlowIcmpv6EchoTypeMetricTag + // HasLength checks if Length has been set in PatternFlowIcmpv6EchoTypeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIcmpv6EchoTypeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIcmpv6EchoTypeMetricTag object +func (obj *patternFlowIcmpv6EchoTypeMetricTag) SetName(value string) PatternFlowIcmpv6EchoTypeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpv6EchoTypeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIcmpv6EchoTypeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIcmpv6EchoTypeMetricTag object +func (obj *patternFlowIcmpv6EchoTypeMetricTag) SetOffset(value uint32) PatternFlowIcmpv6EchoTypeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpv6EchoTypeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIcmpv6EchoTypeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIcmpv6EchoTypeMetricTag object +func (obj *patternFlowIcmpv6EchoTypeMetricTag) SetLength(value uint32) PatternFlowIcmpv6EchoTypeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIcmpv6EchoTypeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIcmpv6EchoTypeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIcmpv6EchoTypeMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIcmpv6EchoTypeMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIcmpv6EchoTypeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_igmpv1_checksum.go b/gosnappi/pattern_flow_igmpv1_checksum.go new file mode 100644 index 00000000..415ec802 --- /dev/null +++ b/gosnappi/pattern_flow_igmpv1_checksum.go @@ -0,0 +1,434 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIgmpv1Checksum ***** +type patternFlowIgmpv1Checksum struct { + validation + obj *otg.PatternFlowIgmpv1Checksum + marshaller marshalPatternFlowIgmpv1Checksum + unMarshaller unMarshalPatternFlowIgmpv1Checksum +} + +func NewPatternFlowIgmpv1Checksum() PatternFlowIgmpv1Checksum { + obj := patternFlowIgmpv1Checksum{obj: &otg.PatternFlowIgmpv1Checksum{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIgmpv1Checksum) msg() *otg.PatternFlowIgmpv1Checksum { + return obj.obj +} + +func (obj *patternFlowIgmpv1Checksum) setMsg(msg *otg.PatternFlowIgmpv1Checksum) PatternFlowIgmpv1Checksum { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIgmpv1Checksum struct { + obj *patternFlowIgmpv1Checksum +} + +type marshalPatternFlowIgmpv1Checksum interface { + // ToProto marshals PatternFlowIgmpv1Checksum to protobuf object *otg.PatternFlowIgmpv1Checksum + ToProto() (*otg.PatternFlowIgmpv1Checksum, error) + // ToPbText marshals PatternFlowIgmpv1Checksum to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIgmpv1Checksum to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIgmpv1Checksum to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIgmpv1Checksum struct { + obj *patternFlowIgmpv1Checksum +} + +type unMarshalPatternFlowIgmpv1Checksum interface { + // FromProto unmarshals PatternFlowIgmpv1Checksum from protobuf object *otg.PatternFlowIgmpv1Checksum + FromProto(msg *otg.PatternFlowIgmpv1Checksum) (PatternFlowIgmpv1Checksum, error) + // FromPbText unmarshals PatternFlowIgmpv1Checksum from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIgmpv1Checksum from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIgmpv1Checksum from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIgmpv1Checksum) Marshal() marshalPatternFlowIgmpv1Checksum { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIgmpv1Checksum{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIgmpv1Checksum) Unmarshal() unMarshalPatternFlowIgmpv1Checksum { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIgmpv1Checksum{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIgmpv1Checksum) ToProto() (*otg.PatternFlowIgmpv1Checksum, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIgmpv1Checksum) FromProto(msg *otg.PatternFlowIgmpv1Checksum) (PatternFlowIgmpv1Checksum, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIgmpv1Checksum) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIgmpv1Checksum) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIgmpv1Checksum) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1Checksum) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIgmpv1Checksum) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1Checksum) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIgmpv1Checksum) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1Checksum) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1Checksum) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIgmpv1Checksum) Clone() (PatternFlowIgmpv1Checksum, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIgmpv1Checksum() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIgmpv1Checksum is checksum +type PatternFlowIgmpv1Checksum interface { + Validation + // msg marshals PatternFlowIgmpv1Checksum to protobuf object *otg.PatternFlowIgmpv1Checksum + // and doesn't set defaults + msg() *otg.PatternFlowIgmpv1Checksum + // setMsg unmarshals PatternFlowIgmpv1Checksum from protobuf object *otg.PatternFlowIgmpv1Checksum + // and doesn't set defaults + setMsg(*otg.PatternFlowIgmpv1Checksum) PatternFlowIgmpv1Checksum + // provides marshal interface + Marshal() marshalPatternFlowIgmpv1Checksum + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIgmpv1Checksum + // validate validates PatternFlowIgmpv1Checksum + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIgmpv1Checksum, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIgmpv1ChecksumChoiceEnum, set in PatternFlowIgmpv1Checksum + Choice() PatternFlowIgmpv1ChecksumChoiceEnum + // setChoice assigns PatternFlowIgmpv1ChecksumChoiceEnum provided by user to PatternFlowIgmpv1Checksum + setChoice(value PatternFlowIgmpv1ChecksumChoiceEnum) PatternFlowIgmpv1Checksum + // HasChoice checks if Choice has been set in PatternFlowIgmpv1Checksum + HasChoice() bool + // Generated returns PatternFlowIgmpv1ChecksumGeneratedEnum, set in PatternFlowIgmpv1Checksum + Generated() PatternFlowIgmpv1ChecksumGeneratedEnum + // SetGenerated assigns PatternFlowIgmpv1ChecksumGeneratedEnum provided by user to PatternFlowIgmpv1Checksum + SetGenerated(value PatternFlowIgmpv1ChecksumGeneratedEnum) PatternFlowIgmpv1Checksum + // HasGenerated checks if Generated has been set in PatternFlowIgmpv1Checksum + HasGenerated() bool + // Custom returns uint32, set in PatternFlowIgmpv1Checksum. + Custom() uint32 + // SetCustom assigns uint32 provided by user to PatternFlowIgmpv1Checksum + SetCustom(value uint32) PatternFlowIgmpv1Checksum + // HasCustom checks if Custom has been set in PatternFlowIgmpv1Checksum + HasCustom() bool +} + +type PatternFlowIgmpv1ChecksumChoiceEnum string + +// Enum of Choice on PatternFlowIgmpv1Checksum +var PatternFlowIgmpv1ChecksumChoice = struct { + GENERATED PatternFlowIgmpv1ChecksumChoiceEnum + CUSTOM PatternFlowIgmpv1ChecksumChoiceEnum +}{ + GENERATED: PatternFlowIgmpv1ChecksumChoiceEnum("generated"), + CUSTOM: PatternFlowIgmpv1ChecksumChoiceEnum("custom"), +} + +func (obj *patternFlowIgmpv1Checksum) Choice() PatternFlowIgmpv1ChecksumChoiceEnum { + return PatternFlowIgmpv1ChecksumChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The type of checksum +// Choice returns a string +func (obj *patternFlowIgmpv1Checksum) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIgmpv1Checksum) setChoice(value PatternFlowIgmpv1ChecksumChoiceEnum) PatternFlowIgmpv1Checksum { + intValue, ok := otg.PatternFlowIgmpv1Checksum_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIgmpv1ChecksumChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIgmpv1Checksum_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.obj.Generated = otg.PatternFlowIgmpv1Checksum_Generated_unspecified.Enum() + return obj +} + +type PatternFlowIgmpv1ChecksumGeneratedEnum string + +// Enum of Generated on PatternFlowIgmpv1Checksum +var PatternFlowIgmpv1ChecksumGenerated = struct { + GOOD PatternFlowIgmpv1ChecksumGeneratedEnum + BAD PatternFlowIgmpv1ChecksumGeneratedEnum +}{ + GOOD: PatternFlowIgmpv1ChecksumGeneratedEnum("good"), + BAD: PatternFlowIgmpv1ChecksumGeneratedEnum("bad"), +} + +func (obj *patternFlowIgmpv1Checksum) Generated() PatternFlowIgmpv1ChecksumGeneratedEnum { + return PatternFlowIgmpv1ChecksumGeneratedEnum(obj.obj.Generated.Enum().String()) +} + +// A system generated checksum value +// Generated returns a string +func (obj *patternFlowIgmpv1Checksum) HasGenerated() bool { + return obj.obj.Generated != nil +} + +func (obj *patternFlowIgmpv1Checksum) SetGenerated(value PatternFlowIgmpv1ChecksumGeneratedEnum) PatternFlowIgmpv1Checksum { + intValue, ok := otg.PatternFlowIgmpv1Checksum_Generated_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIgmpv1ChecksumGeneratedEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIgmpv1Checksum_Generated_Enum(intValue) + obj.obj.Generated = &enumValue + + return obj +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowIgmpv1Checksum) Custom() uint32 { + + if obj.obj.Custom == nil { + obj.setChoice(PatternFlowIgmpv1ChecksumChoice.CUSTOM) + } + + return *obj.obj.Custom + +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowIgmpv1Checksum) HasCustom() bool { + return obj.obj.Custom != nil +} + +// A custom checksum value +// SetCustom sets the uint32 value in the PatternFlowIgmpv1Checksum object +func (obj *patternFlowIgmpv1Checksum) SetCustom(value uint32) PatternFlowIgmpv1Checksum { + obj.setChoice(PatternFlowIgmpv1ChecksumChoice.CUSTOM) + obj.obj.Custom = &value + return obj +} + +func (obj *patternFlowIgmpv1Checksum) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Custom != nil { + + if *obj.obj.Custom > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1Checksum.Custom <= 65535 but Got %d", *obj.obj.Custom)) + } + + } + +} + +func (obj *patternFlowIgmpv1Checksum) setDefault() { + var choices_set int = 0 + var choice PatternFlowIgmpv1ChecksumChoiceEnum + + if obj.obj.Generated != nil && obj.obj.Generated.Number() != 0 { + choices_set += 1 + choice = PatternFlowIgmpv1ChecksumChoice.GENERATED + } + + if obj.obj.Custom != nil { + choices_set += 1 + choice = PatternFlowIgmpv1ChecksumChoice.CUSTOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIgmpv1ChecksumChoice.GENERATED) + if obj.obj.Generated.Number() == 0 { + obj.SetGenerated(PatternFlowIgmpv1ChecksumGenerated.GOOD) + + } + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIgmpv1Checksum") + } + } else { + intVal := otg.PatternFlowIgmpv1Checksum_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIgmpv1Checksum_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_igmpv1_group_address.go b/gosnappi/pattern_flow_igmpv1_group_address.go new file mode 100644 index 00000000..46e13eb6 --- /dev/null +++ b/gosnappi/pattern_flow_igmpv1_group_address.go @@ -0,0 +1,658 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIgmpv1GroupAddress ***** +type patternFlowIgmpv1GroupAddress struct { + validation + obj *otg.PatternFlowIgmpv1GroupAddress + marshaller marshalPatternFlowIgmpv1GroupAddress + unMarshaller unMarshalPatternFlowIgmpv1GroupAddress + incrementHolder PatternFlowIgmpv1GroupAddressCounter + decrementHolder PatternFlowIgmpv1GroupAddressCounter + metricTagsHolder PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter +} + +func NewPatternFlowIgmpv1GroupAddress() PatternFlowIgmpv1GroupAddress { + obj := patternFlowIgmpv1GroupAddress{obj: &otg.PatternFlowIgmpv1GroupAddress{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIgmpv1GroupAddress) msg() *otg.PatternFlowIgmpv1GroupAddress { + return obj.obj +} + +func (obj *patternFlowIgmpv1GroupAddress) setMsg(msg *otg.PatternFlowIgmpv1GroupAddress) PatternFlowIgmpv1GroupAddress { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIgmpv1GroupAddress struct { + obj *patternFlowIgmpv1GroupAddress +} + +type marshalPatternFlowIgmpv1GroupAddress interface { + // ToProto marshals PatternFlowIgmpv1GroupAddress to protobuf object *otg.PatternFlowIgmpv1GroupAddress + ToProto() (*otg.PatternFlowIgmpv1GroupAddress, error) + // ToPbText marshals PatternFlowIgmpv1GroupAddress to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIgmpv1GroupAddress to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIgmpv1GroupAddress to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIgmpv1GroupAddress struct { + obj *patternFlowIgmpv1GroupAddress +} + +type unMarshalPatternFlowIgmpv1GroupAddress interface { + // FromProto unmarshals PatternFlowIgmpv1GroupAddress from protobuf object *otg.PatternFlowIgmpv1GroupAddress + FromProto(msg *otg.PatternFlowIgmpv1GroupAddress) (PatternFlowIgmpv1GroupAddress, error) + // FromPbText unmarshals PatternFlowIgmpv1GroupAddress from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIgmpv1GroupAddress from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIgmpv1GroupAddress from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIgmpv1GroupAddress) Marshal() marshalPatternFlowIgmpv1GroupAddress { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIgmpv1GroupAddress{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIgmpv1GroupAddress) Unmarshal() unMarshalPatternFlowIgmpv1GroupAddress { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIgmpv1GroupAddress{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIgmpv1GroupAddress) ToProto() (*otg.PatternFlowIgmpv1GroupAddress, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIgmpv1GroupAddress) FromProto(msg *otg.PatternFlowIgmpv1GroupAddress) (PatternFlowIgmpv1GroupAddress, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIgmpv1GroupAddress) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIgmpv1GroupAddress) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIgmpv1GroupAddress) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1GroupAddress) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIgmpv1GroupAddress) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1GroupAddress) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIgmpv1GroupAddress) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1GroupAddress) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1GroupAddress) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIgmpv1GroupAddress) Clone() (PatternFlowIgmpv1GroupAddress, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIgmpv1GroupAddress() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIgmpv1GroupAddress) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIgmpv1GroupAddress is group address +type PatternFlowIgmpv1GroupAddress interface { + Validation + // msg marshals PatternFlowIgmpv1GroupAddress to protobuf object *otg.PatternFlowIgmpv1GroupAddress + // and doesn't set defaults + msg() *otg.PatternFlowIgmpv1GroupAddress + // setMsg unmarshals PatternFlowIgmpv1GroupAddress from protobuf object *otg.PatternFlowIgmpv1GroupAddress + // and doesn't set defaults + setMsg(*otg.PatternFlowIgmpv1GroupAddress) PatternFlowIgmpv1GroupAddress + // provides marshal interface + Marshal() marshalPatternFlowIgmpv1GroupAddress + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIgmpv1GroupAddress + // validate validates PatternFlowIgmpv1GroupAddress + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIgmpv1GroupAddress, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIgmpv1GroupAddressChoiceEnum, set in PatternFlowIgmpv1GroupAddress + Choice() PatternFlowIgmpv1GroupAddressChoiceEnum + // setChoice assigns PatternFlowIgmpv1GroupAddressChoiceEnum provided by user to PatternFlowIgmpv1GroupAddress + setChoice(value PatternFlowIgmpv1GroupAddressChoiceEnum) PatternFlowIgmpv1GroupAddress + // HasChoice checks if Choice has been set in PatternFlowIgmpv1GroupAddress + HasChoice() bool + // Value returns string, set in PatternFlowIgmpv1GroupAddress. + Value() string + // SetValue assigns string provided by user to PatternFlowIgmpv1GroupAddress + SetValue(value string) PatternFlowIgmpv1GroupAddress + // HasValue checks if Value has been set in PatternFlowIgmpv1GroupAddress + HasValue() bool + // Values returns []string, set in PatternFlowIgmpv1GroupAddress. + Values() []string + // SetValues assigns []string provided by user to PatternFlowIgmpv1GroupAddress + SetValues(value []string) PatternFlowIgmpv1GroupAddress + // Increment returns PatternFlowIgmpv1GroupAddressCounter, set in PatternFlowIgmpv1GroupAddress. + // PatternFlowIgmpv1GroupAddressCounter is ipv4 counter pattern + Increment() PatternFlowIgmpv1GroupAddressCounter + // SetIncrement assigns PatternFlowIgmpv1GroupAddressCounter provided by user to PatternFlowIgmpv1GroupAddress. + // PatternFlowIgmpv1GroupAddressCounter is ipv4 counter pattern + SetIncrement(value PatternFlowIgmpv1GroupAddressCounter) PatternFlowIgmpv1GroupAddress + // HasIncrement checks if Increment has been set in PatternFlowIgmpv1GroupAddress + HasIncrement() bool + // Decrement returns PatternFlowIgmpv1GroupAddressCounter, set in PatternFlowIgmpv1GroupAddress. + // PatternFlowIgmpv1GroupAddressCounter is ipv4 counter pattern + Decrement() PatternFlowIgmpv1GroupAddressCounter + // SetDecrement assigns PatternFlowIgmpv1GroupAddressCounter provided by user to PatternFlowIgmpv1GroupAddress. + // PatternFlowIgmpv1GroupAddressCounter is ipv4 counter pattern + SetDecrement(value PatternFlowIgmpv1GroupAddressCounter) PatternFlowIgmpv1GroupAddress + // HasDecrement checks if Decrement has been set in PatternFlowIgmpv1GroupAddress + HasDecrement() bool + // MetricTags returns PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIterIter, set in PatternFlowIgmpv1GroupAddress + MetricTags() PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter + setNil() +} + +type PatternFlowIgmpv1GroupAddressChoiceEnum string + +// Enum of Choice on PatternFlowIgmpv1GroupAddress +var PatternFlowIgmpv1GroupAddressChoice = struct { + VALUE PatternFlowIgmpv1GroupAddressChoiceEnum + VALUES PatternFlowIgmpv1GroupAddressChoiceEnum + INCREMENT PatternFlowIgmpv1GroupAddressChoiceEnum + DECREMENT PatternFlowIgmpv1GroupAddressChoiceEnum +}{ + VALUE: PatternFlowIgmpv1GroupAddressChoiceEnum("value"), + VALUES: PatternFlowIgmpv1GroupAddressChoiceEnum("values"), + INCREMENT: PatternFlowIgmpv1GroupAddressChoiceEnum("increment"), + DECREMENT: PatternFlowIgmpv1GroupAddressChoiceEnum("decrement"), +} + +func (obj *patternFlowIgmpv1GroupAddress) Choice() PatternFlowIgmpv1GroupAddressChoiceEnum { + return PatternFlowIgmpv1GroupAddressChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIgmpv1GroupAddress) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIgmpv1GroupAddress) setChoice(value PatternFlowIgmpv1GroupAddressChoiceEnum) PatternFlowIgmpv1GroupAddress { + intValue, ok := otg.PatternFlowIgmpv1GroupAddress_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIgmpv1GroupAddressChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIgmpv1GroupAddress_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIgmpv1GroupAddressChoice.VALUE { + defaultValue := "0.0.0.0" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIgmpv1GroupAddressChoice.VALUES { + defaultValue := []string{"0.0.0.0"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIgmpv1GroupAddressChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIgmpv1GroupAddressCounter().msg() + } + + if value == PatternFlowIgmpv1GroupAddressChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIgmpv1GroupAddressCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowIgmpv1GroupAddress) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIgmpv1GroupAddressChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowIgmpv1GroupAddress) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowIgmpv1GroupAddress object +func (obj *patternFlowIgmpv1GroupAddress) SetValue(value string) PatternFlowIgmpv1GroupAddress { + obj.setChoice(PatternFlowIgmpv1GroupAddressChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowIgmpv1GroupAddress) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"0.0.0.0"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowIgmpv1GroupAddress object +func (obj *patternFlowIgmpv1GroupAddress) SetValues(value []string) PatternFlowIgmpv1GroupAddress { + obj.setChoice(PatternFlowIgmpv1GroupAddressChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIgmpv1GroupAddressCounter +func (obj *patternFlowIgmpv1GroupAddress) Increment() PatternFlowIgmpv1GroupAddressCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIgmpv1GroupAddressChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIgmpv1GroupAddressCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIgmpv1GroupAddressCounter +func (obj *patternFlowIgmpv1GroupAddress) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIgmpv1GroupAddressCounter value in the PatternFlowIgmpv1GroupAddress object +func (obj *patternFlowIgmpv1GroupAddress) SetIncrement(value PatternFlowIgmpv1GroupAddressCounter) PatternFlowIgmpv1GroupAddress { + obj.setChoice(PatternFlowIgmpv1GroupAddressChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIgmpv1GroupAddressCounter +func (obj *patternFlowIgmpv1GroupAddress) Decrement() PatternFlowIgmpv1GroupAddressCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIgmpv1GroupAddressChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIgmpv1GroupAddressCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIgmpv1GroupAddressCounter +func (obj *patternFlowIgmpv1GroupAddress) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIgmpv1GroupAddressCounter value in the PatternFlowIgmpv1GroupAddress object +func (obj *patternFlowIgmpv1GroupAddress) SetDecrement(value PatternFlowIgmpv1GroupAddressCounter) PatternFlowIgmpv1GroupAddress { + obj.setChoice(PatternFlowIgmpv1GroupAddressChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIgmpv1GroupAddressMetricTag +func (obj *patternFlowIgmpv1GroupAddress) MetricTags() PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIgmpv1GroupAddressMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter struct { + obj *patternFlowIgmpv1GroupAddress + patternFlowIgmpv1GroupAddressMetricTagSlice []PatternFlowIgmpv1GroupAddressMetricTag + fieldPtr *[]*otg.PatternFlowIgmpv1GroupAddressMetricTag +} + +func newPatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter(ptr *[]*otg.PatternFlowIgmpv1GroupAddressMetricTag) PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter { + return &patternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter interface { + setMsg(*patternFlowIgmpv1GroupAddress) PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter + Items() []PatternFlowIgmpv1GroupAddressMetricTag + Add() PatternFlowIgmpv1GroupAddressMetricTag + Append(items ...PatternFlowIgmpv1GroupAddressMetricTag) PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter + Set(index int, newObj PatternFlowIgmpv1GroupAddressMetricTag) PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter + Clear() PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter + clearHolderSlice() PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter + appendHolderSlice(item PatternFlowIgmpv1GroupAddressMetricTag) PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter +} + +func (obj *patternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter) setMsg(msg *patternFlowIgmpv1GroupAddress) PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIgmpv1GroupAddressMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter) Items() []PatternFlowIgmpv1GroupAddressMetricTag { + return obj.patternFlowIgmpv1GroupAddressMetricTagSlice +} + +func (obj *patternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter) Add() PatternFlowIgmpv1GroupAddressMetricTag { + newObj := &otg.PatternFlowIgmpv1GroupAddressMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIgmpv1GroupAddressMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIgmpv1GroupAddressMetricTagSlice = append(obj.patternFlowIgmpv1GroupAddressMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter) Append(items ...PatternFlowIgmpv1GroupAddressMetricTag) PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIgmpv1GroupAddressMetricTagSlice = append(obj.patternFlowIgmpv1GroupAddressMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter) Set(index int, newObj PatternFlowIgmpv1GroupAddressMetricTag) PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIgmpv1GroupAddressMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter) Clear() PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIgmpv1GroupAddressMetricTag{} + obj.patternFlowIgmpv1GroupAddressMetricTagSlice = []PatternFlowIgmpv1GroupAddressMetricTag{} + } + return obj +} +func (obj *patternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter) clearHolderSlice() PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter { + if len(obj.patternFlowIgmpv1GroupAddressMetricTagSlice) > 0 { + obj.patternFlowIgmpv1GroupAddressMetricTagSlice = []PatternFlowIgmpv1GroupAddressMetricTag{} + } + return obj +} +func (obj *patternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter) appendHolderSlice(item PatternFlowIgmpv1GroupAddressMetricTag) PatternFlowIgmpv1GroupAddressPatternFlowIgmpv1GroupAddressMetricTagIter { + obj.patternFlowIgmpv1GroupAddressMetricTagSlice = append(obj.patternFlowIgmpv1GroupAddressMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIgmpv1GroupAddress) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv4(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIgmpv1GroupAddress.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateIpv4Slice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIgmpv1GroupAddress.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIgmpv1GroupAddressMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIgmpv1GroupAddress) setDefault() { + var choices_set int = 0 + var choice PatternFlowIgmpv1GroupAddressChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIgmpv1GroupAddressChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIgmpv1GroupAddressChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIgmpv1GroupAddressChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIgmpv1GroupAddressChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIgmpv1GroupAddressChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIgmpv1GroupAddress") + } + } else { + intVal := otg.PatternFlowIgmpv1GroupAddress_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIgmpv1GroupAddress_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_igmpv1_group_address_counter.go b/gosnappi/pattern_flow_igmpv1_group_address_counter.go new file mode 100644 index 00000000..1d6df1a4 --- /dev/null +++ b/gosnappi/pattern_flow_igmpv1_group_address_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIgmpv1GroupAddressCounter ***** +type patternFlowIgmpv1GroupAddressCounter struct { + validation + obj *otg.PatternFlowIgmpv1GroupAddressCounter + marshaller marshalPatternFlowIgmpv1GroupAddressCounter + unMarshaller unMarshalPatternFlowIgmpv1GroupAddressCounter +} + +func NewPatternFlowIgmpv1GroupAddressCounter() PatternFlowIgmpv1GroupAddressCounter { + obj := patternFlowIgmpv1GroupAddressCounter{obj: &otg.PatternFlowIgmpv1GroupAddressCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIgmpv1GroupAddressCounter) msg() *otg.PatternFlowIgmpv1GroupAddressCounter { + return obj.obj +} + +func (obj *patternFlowIgmpv1GroupAddressCounter) setMsg(msg *otg.PatternFlowIgmpv1GroupAddressCounter) PatternFlowIgmpv1GroupAddressCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIgmpv1GroupAddressCounter struct { + obj *patternFlowIgmpv1GroupAddressCounter +} + +type marshalPatternFlowIgmpv1GroupAddressCounter interface { + // ToProto marshals PatternFlowIgmpv1GroupAddressCounter to protobuf object *otg.PatternFlowIgmpv1GroupAddressCounter + ToProto() (*otg.PatternFlowIgmpv1GroupAddressCounter, error) + // ToPbText marshals PatternFlowIgmpv1GroupAddressCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIgmpv1GroupAddressCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIgmpv1GroupAddressCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIgmpv1GroupAddressCounter struct { + obj *patternFlowIgmpv1GroupAddressCounter +} + +type unMarshalPatternFlowIgmpv1GroupAddressCounter interface { + // FromProto unmarshals PatternFlowIgmpv1GroupAddressCounter from protobuf object *otg.PatternFlowIgmpv1GroupAddressCounter + FromProto(msg *otg.PatternFlowIgmpv1GroupAddressCounter) (PatternFlowIgmpv1GroupAddressCounter, error) + // FromPbText unmarshals PatternFlowIgmpv1GroupAddressCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIgmpv1GroupAddressCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIgmpv1GroupAddressCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIgmpv1GroupAddressCounter) Marshal() marshalPatternFlowIgmpv1GroupAddressCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIgmpv1GroupAddressCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIgmpv1GroupAddressCounter) Unmarshal() unMarshalPatternFlowIgmpv1GroupAddressCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIgmpv1GroupAddressCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIgmpv1GroupAddressCounter) ToProto() (*otg.PatternFlowIgmpv1GroupAddressCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIgmpv1GroupAddressCounter) FromProto(msg *otg.PatternFlowIgmpv1GroupAddressCounter) (PatternFlowIgmpv1GroupAddressCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIgmpv1GroupAddressCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIgmpv1GroupAddressCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIgmpv1GroupAddressCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1GroupAddressCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIgmpv1GroupAddressCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1GroupAddressCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIgmpv1GroupAddressCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1GroupAddressCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1GroupAddressCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIgmpv1GroupAddressCounter) Clone() (PatternFlowIgmpv1GroupAddressCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIgmpv1GroupAddressCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIgmpv1GroupAddressCounter is ipv4 counter pattern +type PatternFlowIgmpv1GroupAddressCounter interface { + Validation + // msg marshals PatternFlowIgmpv1GroupAddressCounter to protobuf object *otg.PatternFlowIgmpv1GroupAddressCounter + // and doesn't set defaults + msg() *otg.PatternFlowIgmpv1GroupAddressCounter + // setMsg unmarshals PatternFlowIgmpv1GroupAddressCounter from protobuf object *otg.PatternFlowIgmpv1GroupAddressCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIgmpv1GroupAddressCounter) PatternFlowIgmpv1GroupAddressCounter + // provides marshal interface + Marshal() marshalPatternFlowIgmpv1GroupAddressCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIgmpv1GroupAddressCounter + // validate validates PatternFlowIgmpv1GroupAddressCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIgmpv1GroupAddressCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowIgmpv1GroupAddressCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowIgmpv1GroupAddressCounter + SetStart(value string) PatternFlowIgmpv1GroupAddressCounter + // HasStart checks if Start has been set in PatternFlowIgmpv1GroupAddressCounter + HasStart() bool + // Step returns string, set in PatternFlowIgmpv1GroupAddressCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowIgmpv1GroupAddressCounter + SetStep(value string) PatternFlowIgmpv1GroupAddressCounter + // HasStep checks if Step has been set in PatternFlowIgmpv1GroupAddressCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIgmpv1GroupAddressCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIgmpv1GroupAddressCounter + SetCount(value uint32) PatternFlowIgmpv1GroupAddressCounter + // HasCount checks if Count has been set in PatternFlowIgmpv1GroupAddressCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowIgmpv1GroupAddressCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowIgmpv1GroupAddressCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowIgmpv1GroupAddressCounter object +func (obj *patternFlowIgmpv1GroupAddressCounter) SetStart(value string) PatternFlowIgmpv1GroupAddressCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowIgmpv1GroupAddressCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowIgmpv1GroupAddressCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowIgmpv1GroupAddressCounter object +func (obj *patternFlowIgmpv1GroupAddressCounter) SetStep(value string) PatternFlowIgmpv1GroupAddressCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIgmpv1GroupAddressCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIgmpv1GroupAddressCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIgmpv1GroupAddressCounter object +func (obj *patternFlowIgmpv1GroupAddressCounter) SetCount(value uint32) PatternFlowIgmpv1GroupAddressCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIgmpv1GroupAddressCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateIpv4(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIgmpv1GroupAddressCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateIpv4(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIgmpv1GroupAddressCounter.Step")) + } + + } + +} + +func (obj *patternFlowIgmpv1GroupAddressCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("0.0.0.0") + } + if obj.obj.Step == nil { + obj.SetStep("0.0.0.1") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_igmpv1_group_address_metric_tag.go b/gosnappi/pattern_flow_igmpv1_group_address_metric_tag.go new file mode 100644 index 00000000..84ad3a57 --- /dev/null +++ b/gosnappi/pattern_flow_igmpv1_group_address_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIgmpv1GroupAddressMetricTag ***** +type patternFlowIgmpv1GroupAddressMetricTag struct { + validation + obj *otg.PatternFlowIgmpv1GroupAddressMetricTag + marshaller marshalPatternFlowIgmpv1GroupAddressMetricTag + unMarshaller unMarshalPatternFlowIgmpv1GroupAddressMetricTag +} + +func NewPatternFlowIgmpv1GroupAddressMetricTag() PatternFlowIgmpv1GroupAddressMetricTag { + obj := patternFlowIgmpv1GroupAddressMetricTag{obj: &otg.PatternFlowIgmpv1GroupAddressMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIgmpv1GroupAddressMetricTag) msg() *otg.PatternFlowIgmpv1GroupAddressMetricTag { + return obj.obj +} + +func (obj *patternFlowIgmpv1GroupAddressMetricTag) setMsg(msg *otg.PatternFlowIgmpv1GroupAddressMetricTag) PatternFlowIgmpv1GroupAddressMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIgmpv1GroupAddressMetricTag struct { + obj *patternFlowIgmpv1GroupAddressMetricTag +} + +type marshalPatternFlowIgmpv1GroupAddressMetricTag interface { + // ToProto marshals PatternFlowIgmpv1GroupAddressMetricTag to protobuf object *otg.PatternFlowIgmpv1GroupAddressMetricTag + ToProto() (*otg.PatternFlowIgmpv1GroupAddressMetricTag, error) + // ToPbText marshals PatternFlowIgmpv1GroupAddressMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIgmpv1GroupAddressMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIgmpv1GroupAddressMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIgmpv1GroupAddressMetricTag struct { + obj *patternFlowIgmpv1GroupAddressMetricTag +} + +type unMarshalPatternFlowIgmpv1GroupAddressMetricTag interface { + // FromProto unmarshals PatternFlowIgmpv1GroupAddressMetricTag from protobuf object *otg.PatternFlowIgmpv1GroupAddressMetricTag + FromProto(msg *otg.PatternFlowIgmpv1GroupAddressMetricTag) (PatternFlowIgmpv1GroupAddressMetricTag, error) + // FromPbText unmarshals PatternFlowIgmpv1GroupAddressMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIgmpv1GroupAddressMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIgmpv1GroupAddressMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIgmpv1GroupAddressMetricTag) Marshal() marshalPatternFlowIgmpv1GroupAddressMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIgmpv1GroupAddressMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIgmpv1GroupAddressMetricTag) Unmarshal() unMarshalPatternFlowIgmpv1GroupAddressMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIgmpv1GroupAddressMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIgmpv1GroupAddressMetricTag) ToProto() (*otg.PatternFlowIgmpv1GroupAddressMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIgmpv1GroupAddressMetricTag) FromProto(msg *otg.PatternFlowIgmpv1GroupAddressMetricTag) (PatternFlowIgmpv1GroupAddressMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIgmpv1GroupAddressMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIgmpv1GroupAddressMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIgmpv1GroupAddressMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1GroupAddressMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIgmpv1GroupAddressMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1GroupAddressMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIgmpv1GroupAddressMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1GroupAddressMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1GroupAddressMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIgmpv1GroupAddressMetricTag) Clone() (PatternFlowIgmpv1GroupAddressMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIgmpv1GroupAddressMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIgmpv1GroupAddressMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIgmpv1GroupAddressMetricTag interface { + Validation + // msg marshals PatternFlowIgmpv1GroupAddressMetricTag to protobuf object *otg.PatternFlowIgmpv1GroupAddressMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIgmpv1GroupAddressMetricTag + // setMsg unmarshals PatternFlowIgmpv1GroupAddressMetricTag from protobuf object *otg.PatternFlowIgmpv1GroupAddressMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIgmpv1GroupAddressMetricTag) PatternFlowIgmpv1GroupAddressMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIgmpv1GroupAddressMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIgmpv1GroupAddressMetricTag + // validate validates PatternFlowIgmpv1GroupAddressMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIgmpv1GroupAddressMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIgmpv1GroupAddressMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIgmpv1GroupAddressMetricTag + SetName(value string) PatternFlowIgmpv1GroupAddressMetricTag + // Offset returns uint32, set in PatternFlowIgmpv1GroupAddressMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIgmpv1GroupAddressMetricTag + SetOffset(value uint32) PatternFlowIgmpv1GroupAddressMetricTag + // HasOffset checks if Offset has been set in PatternFlowIgmpv1GroupAddressMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIgmpv1GroupAddressMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIgmpv1GroupAddressMetricTag + SetLength(value uint32) PatternFlowIgmpv1GroupAddressMetricTag + // HasLength checks if Length has been set in PatternFlowIgmpv1GroupAddressMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIgmpv1GroupAddressMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIgmpv1GroupAddressMetricTag object +func (obj *patternFlowIgmpv1GroupAddressMetricTag) SetName(value string) PatternFlowIgmpv1GroupAddressMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIgmpv1GroupAddressMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIgmpv1GroupAddressMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIgmpv1GroupAddressMetricTag object +func (obj *patternFlowIgmpv1GroupAddressMetricTag) SetOffset(value uint32) PatternFlowIgmpv1GroupAddressMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIgmpv1GroupAddressMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIgmpv1GroupAddressMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIgmpv1GroupAddressMetricTag object +func (obj *patternFlowIgmpv1GroupAddressMetricTag) SetLength(value uint32) PatternFlowIgmpv1GroupAddressMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIgmpv1GroupAddressMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIgmpv1GroupAddressMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1GroupAddressMetricTag.Offset <= 31 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIgmpv1GroupAddressMetricTag.Length <= 32 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIgmpv1GroupAddressMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(32) + } + +} diff --git a/gosnappi/pattern_flow_igmpv1_type.go b/gosnappi/pattern_flow_igmpv1_type.go new file mode 100644 index 00000000..2054fa67 --- /dev/null +++ b/gosnappi/pattern_flow_igmpv1_type.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIgmpv1Type ***** +type patternFlowIgmpv1Type struct { + validation + obj *otg.PatternFlowIgmpv1Type + marshaller marshalPatternFlowIgmpv1Type + unMarshaller unMarshalPatternFlowIgmpv1Type + incrementHolder PatternFlowIgmpv1TypeCounter + decrementHolder PatternFlowIgmpv1TypeCounter + metricTagsHolder PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter +} + +func NewPatternFlowIgmpv1Type() PatternFlowIgmpv1Type { + obj := patternFlowIgmpv1Type{obj: &otg.PatternFlowIgmpv1Type{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIgmpv1Type) msg() *otg.PatternFlowIgmpv1Type { + return obj.obj +} + +func (obj *patternFlowIgmpv1Type) setMsg(msg *otg.PatternFlowIgmpv1Type) PatternFlowIgmpv1Type { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIgmpv1Type struct { + obj *patternFlowIgmpv1Type +} + +type marshalPatternFlowIgmpv1Type interface { + // ToProto marshals PatternFlowIgmpv1Type to protobuf object *otg.PatternFlowIgmpv1Type + ToProto() (*otg.PatternFlowIgmpv1Type, error) + // ToPbText marshals PatternFlowIgmpv1Type to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIgmpv1Type to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIgmpv1Type to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIgmpv1Type struct { + obj *patternFlowIgmpv1Type +} + +type unMarshalPatternFlowIgmpv1Type interface { + // FromProto unmarshals PatternFlowIgmpv1Type from protobuf object *otg.PatternFlowIgmpv1Type + FromProto(msg *otg.PatternFlowIgmpv1Type) (PatternFlowIgmpv1Type, error) + // FromPbText unmarshals PatternFlowIgmpv1Type from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIgmpv1Type from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIgmpv1Type from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIgmpv1Type) Marshal() marshalPatternFlowIgmpv1Type { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIgmpv1Type{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIgmpv1Type) Unmarshal() unMarshalPatternFlowIgmpv1Type { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIgmpv1Type{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIgmpv1Type) ToProto() (*otg.PatternFlowIgmpv1Type, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIgmpv1Type) FromProto(msg *otg.PatternFlowIgmpv1Type) (PatternFlowIgmpv1Type, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIgmpv1Type) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIgmpv1Type) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIgmpv1Type) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1Type) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIgmpv1Type) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1Type) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIgmpv1Type) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1Type) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1Type) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIgmpv1Type) Clone() (PatternFlowIgmpv1Type, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIgmpv1Type() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIgmpv1Type) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIgmpv1Type is type of message +type PatternFlowIgmpv1Type interface { + Validation + // msg marshals PatternFlowIgmpv1Type to protobuf object *otg.PatternFlowIgmpv1Type + // and doesn't set defaults + msg() *otg.PatternFlowIgmpv1Type + // setMsg unmarshals PatternFlowIgmpv1Type from protobuf object *otg.PatternFlowIgmpv1Type + // and doesn't set defaults + setMsg(*otg.PatternFlowIgmpv1Type) PatternFlowIgmpv1Type + // provides marshal interface + Marshal() marshalPatternFlowIgmpv1Type + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIgmpv1Type + // validate validates PatternFlowIgmpv1Type + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIgmpv1Type, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIgmpv1TypeChoiceEnum, set in PatternFlowIgmpv1Type + Choice() PatternFlowIgmpv1TypeChoiceEnum + // setChoice assigns PatternFlowIgmpv1TypeChoiceEnum provided by user to PatternFlowIgmpv1Type + setChoice(value PatternFlowIgmpv1TypeChoiceEnum) PatternFlowIgmpv1Type + // HasChoice checks if Choice has been set in PatternFlowIgmpv1Type + HasChoice() bool + // Value returns uint32, set in PatternFlowIgmpv1Type. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIgmpv1Type + SetValue(value uint32) PatternFlowIgmpv1Type + // HasValue checks if Value has been set in PatternFlowIgmpv1Type + HasValue() bool + // Values returns []uint32, set in PatternFlowIgmpv1Type. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIgmpv1Type + SetValues(value []uint32) PatternFlowIgmpv1Type + // Increment returns PatternFlowIgmpv1TypeCounter, set in PatternFlowIgmpv1Type. + // PatternFlowIgmpv1TypeCounter is integer counter pattern + Increment() PatternFlowIgmpv1TypeCounter + // SetIncrement assigns PatternFlowIgmpv1TypeCounter provided by user to PatternFlowIgmpv1Type. + // PatternFlowIgmpv1TypeCounter is integer counter pattern + SetIncrement(value PatternFlowIgmpv1TypeCounter) PatternFlowIgmpv1Type + // HasIncrement checks if Increment has been set in PatternFlowIgmpv1Type + HasIncrement() bool + // Decrement returns PatternFlowIgmpv1TypeCounter, set in PatternFlowIgmpv1Type. + // PatternFlowIgmpv1TypeCounter is integer counter pattern + Decrement() PatternFlowIgmpv1TypeCounter + // SetDecrement assigns PatternFlowIgmpv1TypeCounter provided by user to PatternFlowIgmpv1Type. + // PatternFlowIgmpv1TypeCounter is integer counter pattern + SetDecrement(value PatternFlowIgmpv1TypeCounter) PatternFlowIgmpv1Type + // HasDecrement checks if Decrement has been set in PatternFlowIgmpv1Type + HasDecrement() bool + // MetricTags returns PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIterIter, set in PatternFlowIgmpv1Type + MetricTags() PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter + setNil() +} + +type PatternFlowIgmpv1TypeChoiceEnum string + +// Enum of Choice on PatternFlowIgmpv1Type +var PatternFlowIgmpv1TypeChoice = struct { + VALUE PatternFlowIgmpv1TypeChoiceEnum + VALUES PatternFlowIgmpv1TypeChoiceEnum + INCREMENT PatternFlowIgmpv1TypeChoiceEnum + DECREMENT PatternFlowIgmpv1TypeChoiceEnum +}{ + VALUE: PatternFlowIgmpv1TypeChoiceEnum("value"), + VALUES: PatternFlowIgmpv1TypeChoiceEnum("values"), + INCREMENT: PatternFlowIgmpv1TypeChoiceEnum("increment"), + DECREMENT: PatternFlowIgmpv1TypeChoiceEnum("decrement"), +} + +func (obj *patternFlowIgmpv1Type) Choice() PatternFlowIgmpv1TypeChoiceEnum { + return PatternFlowIgmpv1TypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIgmpv1Type) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIgmpv1Type) setChoice(value PatternFlowIgmpv1TypeChoiceEnum) PatternFlowIgmpv1Type { + intValue, ok := otg.PatternFlowIgmpv1Type_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIgmpv1TypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIgmpv1Type_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIgmpv1TypeChoice.VALUE { + defaultValue := uint32(1) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIgmpv1TypeChoice.VALUES { + defaultValue := []uint32{1} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIgmpv1TypeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIgmpv1TypeCounter().msg() + } + + if value == PatternFlowIgmpv1TypeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIgmpv1TypeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIgmpv1Type) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIgmpv1TypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIgmpv1Type) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIgmpv1Type object +func (obj *patternFlowIgmpv1Type) SetValue(value uint32) PatternFlowIgmpv1Type { + obj.setChoice(PatternFlowIgmpv1TypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIgmpv1Type) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{1}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIgmpv1Type object +func (obj *patternFlowIgmpv1Type) SetValues(value []uint32) PatternFlowIgmpv1Type { + obj.setChoice(PatternFlowIgmpv1TypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIgmpv1TypeCounter +func (obj *patternFlowIgmpv1Type) Increment() PatternFlowIgmpv1TypeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIgmpv1TypeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIgmpv1TypeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIgmpv1TypeCounter +func (obj *patternFlowIgmpv1Type) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIgmpv1TypeCounter value in the PatternFlowIgmpv1Type object +func (obj *patternFlowIgmpv1Type) SetIncrement(value PatternFlowIgmpv1TypeCounter) PatternFlowIgmpv1Type { + obj.setChoice(PatternFlowIgmpv1TypeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIgmpv1TypeCounter +func (obj *patternFlowIgmpv1Type) Decrement() PatternFlowIgmpv1TypeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIgmpv1TypeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIgmpv1TypeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIgmpv1TypeCounter +func (obj *patternFlowIgmpv1Type) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIgmpv1TypeCounter value in the PatternFlowIgmpv1Type object +func (obj *patternFlowIgmpv1Type) SetDecrement(value PatternFlowIgmpv1TypeCounter) PatternFlowIgmpv1Type { + obj.setChoice(PatternFlowIgmpv1TypeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIgmpv1TypeMetricTag +func (obj *patternFlowIgmpv1Type) MetricTags() PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIgmpv1TypeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter struct { + obj *patternFlowIgmpv1Type + patternFlowIgmpv1TypeMetricTagSlice []PatternFlowIgmpv1TypeMetricTag + fieldPtr *[]*otg.PatternFlowIgmpv1TypeMetricTag +} + +func newPatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter(ptr *[]*otg.PatternFlowIgmpv1TypeMetricTag) PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter { + return &patternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter interface { + setMsg(*patternFlowIgmpv1Type) PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter + Items() []PatternFlowIgmpv1TypeMetricTag + Add() PatternFlowIgmpv1TypeMetricTag + Append(items ...PatternFlowIgmpv1TypeMetricTag) PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter + Set(index int, newObj PatternFlowIgmpv1TypeMetricTag) PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter + Clear() PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter + clearHolderSlice() PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter + appendHolderSlice(item PatternFlowIgmpv1TypeMetricTag) PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter +} + +func (obj *patternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter) setMsg(msg *patternFlowIgmpv1Type) PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIgmpv1TypeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter) Items() []PatternFlowIgmpv1TypeMetricTag { + return obj.patternFlowIgmpv1TypeMetricTagSlice +} + +func (obj *patternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter) Add() PatternFlowIgmpv1TypeMetricTag { + newObj := &otg.PatternFlowIgmpv1TypeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIgmpv1TypeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIgmpv1TypeMetricTagSlice = append(obj.patternFlowIgmpv1TypeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter) Append(items ...PatternFlowIgmpv1TypeMetricTag) PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIgmpv1TypeMetricTagSlice = append(obj.patternFlowIgmpv1TypeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter) Set(index int, newObj PatternFlowIgmpv1TypeMetricTag) PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIgmpv1TypeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter) Clear() PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIgmpv1TypeMetricTag{} + obj.patternFlowIgmpv1TypeMetricTagSlice = []PatternFlowIgmpv1TypeMetricTag{} + } + return obj +} +func (obj *patternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter) clearHolderSlice() PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter { + if len(obj.patternFlowIgmpv1TypeMetricTagSlice) > 0 { + obj.patternFlowIgmpv1TypeMetricTagSlice = []PatternFlowIgmpv1TypeMetricTag{} + } + return obj +} +func (obj *patternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter) appendHolderSlice(item PatternFlowIgmpv1TypeMetricTag) PatternFlowIgmpv1TypePatternFlowIgmpv1TypeMetricTagIter { + obj.patternFlowIgmpv1TypeMetricTagSlice = append(obj.patternFlowIgmpv1TypeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIgmpv1Type) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1Type.Value <= 15 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIgmpv1Type.Values <= 15 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIgmpv1TypeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIgmpv1Type) setDefault() { + var choices_set int = 0 + var choice PatternFlowIgmpv1TypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIgmpv1TypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIgmpv1TypeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIgmpv1TypeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIgmpv1TypeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIgmpv1TypeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIgmpv1Type") + } + } else { + intVal := otg.PatternFlowIgmpv1Type_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIgmpv1Type_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_igmpv1_type_counter.go b/gosnappi/pattern_flow_igmpv1_type_counter.go new file mode 100644 index 00000000..ccc7e247 --- /dev/null +++ b/gosnappi/pattern_flow_igmpv1_type_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIgmpv1TypeCounter ***** +type patternFlowIgmpv1TypeCounter struct { + validation + obj *otg.PatternFlowIgmpv1TypeCounter + marshaller marshalPatternFlowIgmpv1TypeCounter + unMarshaller unMarshalPatternFlowIgmpv1TypeCounter +} + +func NewPatternFlowIgmpv1TypeCounter() PatternFlowIgmpv1TypeCounter { + obj := patternFlowIgmpv1TypeCounter{obj: &otg.PatternFlowIgmpv1TypeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIgmpv1TypeCounter) msg() *otg.PatternFlowIgmpv1TypeCounter { + return obj.obj +} + +func (obj *patternFlowIgmpv1TypeCounter) setMsg(msg *otg.PatternFlowIgmpv1TypeCounter) PatternFlowIgmpv1TypeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIgmpv1TypeCounter struct { + obj *patternFlowIgmpv1TypeCounter +} + +type marshalPatternFlowIgmpv1TypeCounter interface { + // ToProto marshals PatternFlowIgmpv1TypeCounter to protobuf object *otg.PatternFlowIgmpv1TypeCounter + ToProto() (*otg.PatternFlowIgmpv1TypeCounter, error) + // ToPbText marshals PatternFlowIgmpv1TypeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIgmpv1TypeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIgmpv1TypeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIgmpv1TypeCounter struct { + obj *patternFlowIgmpv1TypeCounter +} + +type unMarshalPatternFlowIgmpv1TypeCounter interface { + // FromProto unmarshals PatternFlowIgmpv1TypeCounter from protobuf object *otg.PatternFlowIgmpv1TypeCounter + FromProto(msg *otg.PatternFlowIgmpv1TypeCounter) (PatternFlowIgmpv1TypeCounter, error) + // FromPbText unmarshals PatternFlowIgmpv1TypeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIgmpv1TypeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIgmpv1TypeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIgmpv1TypeCounter) Marshal() marshalPatternFlowIgmpv1TypeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIgmpv1TypeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIgmpv1TypeCounter) Unmarshal() unMarshalPatternFlowIgmpv1TypeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIgmpv1TypeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIgmpv1TypeCounter) ToProto() (*otg.PatternFlowIgmpv1TypeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIgmpv1TypeCounter) FromProto(msg *otg.PatternFlowIgmpv1TypeCounter) (PatternFlowIgmpv1TypeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIgmpv1TypeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIgmpv1TypeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIgmpv1TypeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1TypeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIgmpv1TypeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1TypeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIgmpv1TypeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1TypeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1TypeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIgmpv1TypeCounter) Clone() (PatternFlowIgmpv1TypeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIgmpv1TypeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIgmpv1TypeCounter is integer counter pattern +type PatternFlowIgmpv1TypeCounter interface { + Validation + // msg marshals PatternFlowIgmpv1TypeCounter to protobuf object *otg.PatternFlowIgmpv1TypeCounter + // and doesn't set defaults + msg() *otg.PatternFlowIgmpv1TypeCounter + // setMsg unmarshals PatternFlowIgmpv1TypeCounter from protobuf object *otg.PatternFlowIgmpv1TypeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIgmpv1TypeCounter) PatternFlowIgmpv1TypeCounter + // provides marshal interface + Marshal() marshalPatternFlowIgmpv1TypeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIgmpv1TypeCounter + // validate validates PatternFlowIgmpv1TypeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIgmpv1TypeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIgmpv1TypeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIgmpv1TypeCounter + SetStart(value uint32) PatternFlowIgmpv1TypeCounter + // HasStart checks if Start has been set in PatternFlowIgmpv1TypeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIgmpv1TypeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIgmpv1TypeCounter + SetStep(value uint32) PatternFlowIgmpv1TypeCounter + // HasStep checks if Step has been set in PatternFlowIgmpv1TypeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIgmpv1TypeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIgmpv1TypeCounter + SetCount(value uint32) PatternFlowIgmpv1TypeCounter + // HasCount checks if Count has been set in PatternFlowIgmpv1TypeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIgmpv1TypeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIgmpv1TypeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIgmpv1TypeCounter object +func (obj *patternFlowIgmpv1TypeCounter) SetStart(value uint32) PatternFlowIgmpv1TypeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIgmpv1TypeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIgmpv1TypeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIgmpv1TypeCounter object +func (obj *patternFlowIgmpv1TypeCounter) SetStep(value uint32) PatternFlowIgmpv1TypeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIgmpv1TypeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIgmpv1TypeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIgmpv1TypeCounter object +func (obj *patternFlowIgmpv1TypeCounter) SetCount(value uint32) PatternFlowIgmpv1TypeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIgmpv1TypeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1TypeCounter.Start <= 15 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1TypeCounter.Step <= 15 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1TypeCounter.Count <= 15 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIgmpv1TypeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_igmpv1_type_metric_tag.go b/gosnappi/pattern_flow_igmpv1_type_metric_tag.go new file mode 100644 index 00000000..28cc4401 --- /dev/null +++ b/gosnappi/pattern_flow_igmpv1_type_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIgmpv1TypeMetricTag ***** +type patternFlowIgmpv1TypeMetricTag struct { + validation + obj *otg.PatternFlowIgmpv1TypeMetricTag + marshaller marshalPatternFlowIgmpv1TypeMetricTag + unMarshaller unMarshalPatternFlowIgmpv1TypeMetricTag +} + +func NewPatternFlowIgmpv1TypeMetricTag() PatternFlowIgmpv1TypeMetricTag { + obj := patternFlowIgmpv1TypeMetricTag{obj: &otg.PatternFlowIgmpv1TypeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIgmpv1TypeMetricTag) msg() *otg.PatternFlowIgmpv1TypeMetricTag { + return obj.obj +} + +func (obj *patternFlowIgmpv1TypeMetricTag) setMsg(msg *otg.PatternFlowIgmpv1TypeMetricTag) PatternFlowIgmpv1TypeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIgmpv1TypeMetricTag struct { + obj *patternFlowIgmpv1TypeMetricTag +} + +type marshalPatternFlowIgmpv1TypeMetricTag interface { + // ToProto marshals PatternFlowIgmpv1TypeMetricTag to protobuf object *otg.PatternFlowIgmpv1TypeMetricTag + ToProto() (*otg.PatternFlowIgmpv1TypeMetricTag, error) + // ToPbText marshals PatternFlowIgmpv1TypeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIgmpv1TypeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIgmpv1TypeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIgmpv1TypeMetricTag struct { + obj *patternFlowIgmpv1TypeMetricTag +} + +type unMarshalPatternFlowIgmpv1TypeMetricTag interface { + // FromProto unmarshals PatternFlowIgmpv1TypeMetricTag from protobuf object *otg.PatternFlowIgmpv1TypeMetricTag + FromProto(msg *otg.PatternFlowIgmpv1TypeMetricTag) (PatternFlowIgmpv1TypeMetricTag, error) + // FromPbText unmarshals PatternFlowIgmpv1TypeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIgmpv1TypeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIgmpv1TypeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIgmpv1TypeMetricTag) Marshal() marshalPatternFlowIgmpv1TypeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIgmpv1TypeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIgmpv1TypeMetricTag) Unmarshal() unMarshalPatternFlowIgmpv1TypeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIgmpv1TypeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIgmpv1TypeMetricTag) ToProto() (*otg.PatternFlowIgmpv1TypeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIgmpv1TypeMetricTag) FromProto(msg *otg.PatternFlowIgmpv1TypeMetricTag) (PatternFlowIgmpv1TypeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIgmpv1TypeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIgmpv1TypeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIgmpv1TypeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1TypeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIgmpv1TypeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1TypeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIgmpv1TypeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1TypeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1TypeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIgmpv1TypeMetricTag) Clone() (PatternFlowIgmpv1TypeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIgmpv1TypeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIgmpv1TypeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIgmpv1TypeMetricTag interface { + Validation + // msg marshals PatternFlowIgmpv1TypeMetricTag to protobuf object *otg.PatternFlowIgmpv1TypeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIgmpv1TypeMetricTag + // setMsg unmarshals PatternFlowIgmpv1TypeMetricTag from protobuf object *otg.PatternFlowIgmpv1TypeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIgmpv1TypeMetricTag) PatternFlowIgmpv1TypeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIgmpv1TypeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIgmpv1TypeMetricTag + // validate validates PatternFlowIgmpv1TypeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIgmpv1TypeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIgmpv1TypeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIgmpv1TypeMetricTag + SetName(value string) PatternFlowIgmpv1TypeMetricTag + // Offset returns uint32, set in PatternFlowIgmpv1TypeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIgmpv1TypeMetricTag + SetOffset(value uint32) PatternFlowIgmpv1TypeMetricTag + // HasOffset checks if Offset has been set in PatternFlowIgmpv1TypeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIgmpv1TypeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIgmpv1TypeMetricTag + SetLength(value uint32) PatternFlowIgmpv1TypeMetricTag + // HasLength checks if Length has been set in PatternFlowIgmpv1TypeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIgmpv1TypeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIgmpv1TypeMetricTag object +func (obj *patternFlowIgmpv1TypeMetricTag) SetName(value string) PatternFlowIgmpv1TypeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIgmpv1TypeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIgmpv1TypeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIgmpv1TypeMetricTag object +func (obj *patternFlowIgmpv1TypeMetricTag) SetOffset(value uint32) PatternFlowIgmpv1TypeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIgmpv1TypeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIgmpv1TypeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIgmpv1TypeMetricTag object +func (obj *patternFlowIgmpv1TypeMetricTag) SetLength(value uint32) PatternFlowIgmpv1TypeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIgmpv1TypeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIgmpv1TypeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1TypeMetricTag.Offset <= 3 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 4 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIgmpv1TypeMetricTag.Length <= 4 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIgmpv1TypeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(4) + } + +} diff --git a/gosnappi/pattern_flow_igmpv1_unused.go b/gosnappi/pattern_flow_igmpv1_unused.go new file mode 100644 index 00000000..9d3a4c9b --- /dev/null +++ b/gosnappi/pattern_flow_igmpv1_unused.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIgmpv1Unused ***** +type patternFlowIgmpv1Unused struct { + validation + obj *otg.PatternFlowIgmpv1Unused + marshaller marshalPatternFlowIgmpv1Unused + unMarshaller unMarshalPatternFlowIgmpv1Unused + incrementHolder PatternFlowIgmpv1UnusedCounter + decrementHolder PatternFlowIgmpv1UnusedCounter + metricTagsHolder PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter +} + +func NewPatternFlowIgmpv1Unused() PatternFlowIgmpv1Unused { + obj := patternFlowIgmpv1Unused{obj: &otg.PatternFlowIgmpv1Unused{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIgmpv1Unused) msg() *otg.PatternFlowIgmpv1Unused { + return obj.obj +} + +func (obj *patternFlowIgmpv1Unused) setMsg(msg *otg.PatternFlowIgmpv1Unused) PatternFlowIgmpv1Unused { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIgmpv1Unused struct { + obj *patternFlowIgmpv1Unused +} + +type marshalPatternFlowIgmpv1Unused interface { + // ToProto marshals PatternFlowIgmpv1Unused to protobuf object *otg.PatternFlowIgmpv1Unused + ToProto() (*otg.PatternFlowIgmpv1Unused, error) + // ToPbText marshals PatternFlowIgmpv1Unused to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIgmpv1Unused to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIgmpv1Unused to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIgmpv1Unused struct { + obj *patternFlowIgmpv1Unused +} + +type unMarshalPatternFlowIgmpv1Unused interface { + // FromProto unmarshals PatternFlowIgmpv1Unused from protobuf object *otg.PatternFlowIgmpv1Unused + FromProto(msg *otg.PatternFlowIgmpv1Unused) (PatternFlowIgmpv1Unused, error) + // FromPbText unmarshals PatternFlowIgmpv1Unused from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIgmpv1Unused from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIgmpv1Unused from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIgmpv1Unused) Marshal() marshalPatternFlowIgmpv1Unused { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIgmpv1Unused{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIgmpv1Unused) Unmarshal() unMarshalPatternFlowIgmpv1Unused { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIgmpv1Unused{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIgmpv1Unused) ToProto() (*otg.PatternFlowIgmpv1Unused, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIgmpv1Unused) FromProto(msg *otg.PatternFlowIgmpv1Unused) (PatternFlowIgmpv1Unused, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIgmpv1Unused) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIgmpv1Unused) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIgmpv1Unused) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1Unused) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIgmpv1Unused) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1Unused) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIgmpv1Unused) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1Unused) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1Unused) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIgmpv1Unused) Clone() (PatternFlowIgmpv1Unused, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIgmpv1Unused() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIgmpv1Unused) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIgmpv1Unused is unused +type PatternFlowIgmpv1Unused interface { + Validation + // msg marshals PatternFlowIgmpv1Unused to protobuf object *otg.PatternFlowIgmpv1Unused + // and doesn't set defaults + msg() *otg.PatternFlowIgmpv1Unused + // setMsg unmarshals PatternFlowIgmpv1Unused from protobuf object *otg.PatternFlowIgmpv1Unused + // and doesn't set defaults + setMsg(*otg.PatternFlowIgmpv1Unused) PatternFlowIgmpv1Unused + // provides marshal interface + Marshal() marshalPatternFlowIgmpv1Unused + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIgmpv1Unused + // validate validates PatternFlowIgmpv1Unused + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIgmpv1Unused, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIgmpv1UnusedChoiceEnum, set in PatternFlowIgmpv1Unused + Choice() PatternFlowIgmpv1UnusedChoiceEnum + // setChoice assigns PatternFlowIgmpv1UnusedChoiceEnum provided by user to PatternFlowIgmpv1Unused + setChoice(value PatternFlowIgmpv1UnusedChoiceEnum) PatternFlowIgmpv1Unused + // HasChoice checks if Choice has been set in PatternFlowIgmpv1Unused + HasChoice() bool + // Value returns uint32, set in PatternFlowIgmpv1Unused. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIgmpv1Unused + SetValue(value uint32) PatternFlowIgmpv1Unused + // HasValue checks if Value has been set in PatternFlowIgmpv1Unused + HasValue() bool + // Values returns []uint32, set in PatternFlowIgmpv1Unused. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIgmpv1Unused + SetValues(value []uint32) PatternFlowIgmpv1Unused + // Increment returns PatternFlowIgmpv1UnusedCounter, set in PatternFlowIgmpv1Unused. + // PatternFlowIgmpv1UnusedCounter is integer counter pattern + Increment() PatternFlowIgmpv1UnusedCounter + // SetIncrement assigns PatternFlowIgmpv1UnusedCounter provided by user to PatternFlowIgmpv1Unused. + // PatternFlowIgmpv1UnusedCounter is integer counter pattern + SetIncrement(value PatternFlowIgmpv1UnusedCounter) PatternFlowIgmpv1Unused + // HasIncrement checks if Increment has been set in PatternFlowIgmpv1Unused + HasIncrement() bool + // Decrement returns PatternFlowIgmpv1UnusedCounter, set in PatternFlowIgmpv1Unused. + // PatternFlowIgmpv1UnusedCounter is integer counter pattern + Decrement() PatternFlowIgmpv1UnusedCounter + // SetDecrement assigns PatternFlowIgmpv1UnusedCounter provided by user to PatternFlowIgmpv1Unused. + // PatternFlowIgmpv1UnusedCounter is integer counter pattern + SetDecrement(value PatternFlowIgmpv1UnusedCounter) PatternFlowIgmpv1Unused + // HasDecrement checks if Decrement has been set in PatternFlowIgmpv1Unused + HasDecrement() bool + // MetricTags returns PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIterIter, set in PatternFlowIgmpv1Unused + MetricTags() PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter + setNil() +} + +type PatternFlowIgmpv1UnusedChoiceEnum string + +// Enum of Choice on PatternFlowIgmpv1Unused +var PatternFlowIgmpv1UnusedChoice = struct { + VALUE PatternFlowIgmpv1UnusedChoiceEnum + VALUES PatternFlowIgmpv1UnusedChoiceEnum + INCREMENT PatternFlowIgmpv1UnusedChoiceEnum + DECREMENT PatternFlowIgmpv1UnusedChoiceEnum +}{ + VALUE: PatternFlowIgmpv1UnusedChoiceEnum("value"), + VALUES: PatternFlowIgmpv1UnusedChoiceEnum("values"), + INCREMENT: PatternFlowIgmpv1UnusedChoiceEnum("increment"), + DECREMENT: PatternFlowIgmpv1UnusedChoiceEnum("decrement"), +} + +func (obj *patternFlowIgmpv1Unused) Choice() PatternFlowIgmpv1UnusedChoiceEnum { + return PatternFlowIgmpv1UnusedChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIgmpv1Unused) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIgmpv1Unused) setChoice(value PatternFlowIgmpv1UnusedChoiceEnum) PatternFlowIgmpv1Unused { + intValue, ok := otg.PatternFlowIgmpv1Unused_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIgmpv1UnusedChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIgmpv1Unused_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIgmpv1UnusedChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIgmpv1UnusedChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIgmpv1UnusedChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIgmpv1UnusedCounter().msg() + } + + if value == PatternFlowIgmpv1UnusedChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIgmpv1UnusedCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIgmpv1Unused) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIgmpv1UnusedChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIgmpv1Unused) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIgmpv1Unused object +func (obj *patternFlowIgmpv1Unused) SetValue(value uint32) PatternFlowIgmpv1Unused { + obj.setChoice(PatternFlowIgmpv1UnusedChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIgmpv1Unused) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIgmpv1Unused object +func (obj *patternFlowIgmpv1Unused) SetValues(value []uint32) PatternFlowIgmpv1Unused { + obj.setChoice(PatternFlowIgmpv1UnusedChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIgmpv1UnusedCounter +func (obj *patternFlowIgmpv1Unused) Increment() PatternFlowIgmpv1UnusedCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIgmpv1UnusedChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIgmpv1UnusedCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIgmpv1UnusedCounter +func (obj *patternFlowIgmpv1Unused) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIgmpv1UnusedCounter value in the PatternFlowIgmpv1Unused object +func (obj *patternFlowIgmpv1Unused) SetIncrement(value PatternFlowIgmpv1UnusedCounter) PatternFlowIgmpv1Unused { + obj.setChoice(PatternFlowIgmpv1UnusedChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIgmpv1UnusedCounter +func (obj *patternFlowIgmpv1Unused) Decrement() PatternFlowIgmpv1UnusedCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIgmpv1UnusedChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIgmpv1UnusedCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIgmpv1UnusedCounter +func (obj *patternFlowIgmpv1Unused) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIgmpv1UnusedCounter value in the PatternFlowIgmpv1Unused object +func (obj *patternFlowIgmpv1Unused) SetDecrement(value PatternFlowIgmpv1UnusedCounter) PatternFlowIgmpv1Unused { + obj.setChoice(PatternFlowIgmpv1UnusedChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIgmpv1UnusedMetricTag +func (obj *patternFlowIgmpv1Unused) MetricTags() PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIgmpv1UnusedMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter struct { + obj *patternFlowIgmpv1Unused + patternFlowIgmpv1UnusedMetricTagSlice []PatternFlowIgmpv1UnusedMetricTag + fieldPtr *[]*otg.PatternFlowIgmpv1UnusedMetricTag +} + +func newPatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter(ptr *[]*otg.PatternFlowIgmpv1UnusedMetricTag) PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter { + return &patternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter interface { + setMsg(*patternFlowIgmpv1Unused) PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter + Items() []PatternFlowIgmpv1UnusedMetricTag + Add() PatternFlowIgmpv1UnusedMetricTag + Append(items ...PatternFlowIgmpv1UnusedMetricTag) PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter + Set(index int, newObj PatternFlowIgmpv1UnusedMetricTag) PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter + Clear() PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter + clearHolderSlice() PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter + appendHolderSlice(item PatternFlowIgmpv1UnusedMetricTag) PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter +} + +func (obj *patternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter) setMsg(msg *patternFlowIgmpv1Unused) PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIgmpv1UnusedMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter) Items() []PatternFlowIgmpv1UnusedMetricTag { + return obj.patternFlowIgmpv1UnusedMetricTagSlice +} + +func (obj *patternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter) Add() PatternFlowIgmpv1UnusedMetricTag { + newObj := &otg.PatternFlowIgmpv1UnusedMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIgmpv1UnusedMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIgmpv1UnusedMetricTagSlice = append(obj.patternFlowIgmpv1UnusedMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter) Append(items ...PatternFlowIgmpv1UnusedMetricTag) PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIgmpv1UnusedMetricTagSlice = append(obj.patternFlowIgmpv1UnusedMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter) Set(index int, newObj PatternFlowIgmpv1UnusedMetricTag) PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIgmpv1UnusedMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter) Clear() PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIgmpv1UnusedMetricTag{} + obj.patternFlowIgmpv1UnusedMetricTagSlice = []PatternFlowIgmpv1UnusedMetricTag{} + } + return obj +} +func (obj *patternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter) clearHolderSlice() PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter { + if len(obj.patternFlowIgmpv1UnusedMetricTagSlice) > 0 { + obj.patternFlowIgmpv1UnusedMetricTagSlice = []PatternFlowIgmpv1UnusedMetricTag{} + } + return obj +} +func (obj *patternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter) appendHolderSlice(item PatternFlowIgmpv1UnusedMetricTag) PatternFlowIgmpv1UnusedPatternFlowIgmpv1UnusedMetricTagIter { + obj.patternFlowIgmpv1UnusedMetricTagSlice = append(obj.patternFlowIgmpv1UnusedMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIgmpv1Unused) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1Unused.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIgmpv1Unused.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIgmpv1UnusedMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIgmpv1Unused) setDefault() { + var choices_set int = 0 + var choice PatternFlowIgmpv1UnusedChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIgmpv1UnusedChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIgmpv1UnusedChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIgmpv1UnusedChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIgmpv1UnusedChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIgmpv1UnusedChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIgmpv1Unused") + } + } else { + intVal := otg.PatternFlowIgmpv1Unused_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIgmpv1Unused_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_igmpv1_unused_counter.go b/gosnappi/pattern_flow_igmpv1_unused_counter.go new file mode 100644 index 00000000..6aa1a9d5 --- /dev/null +++ b/gosnappi/pattern_flow_igmpv1_unused_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIgmpv1UnusedCounter ***** +type patternFlowIgmpv1UnusedCounter struct { + validation + obj *otg.PatternFlowIgmpv1UnusedCounter + marshaller marshalPatternFlowIgmpv1UnusedCounter + unMarshaller unMarshalPatternFlowIgmpv1UnusedCounter +} + +func NewPatternFlowIgmpv1UnusedCounter() PatternFlowIgmpv1UnusedCounter { + obj := patternFlowIgmpv1UnusedCounter{obj: &otg.PatternFlowIgmpv1UnusedCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIgmpv1UnusedCounter) msg() *otg.PatternFlowIgmpv1UnusedCounter { + return obj.obj +} + +func (obj *patternFlowIgmpv1UnusedCounter) setMsg(msg *otg.PatternFlowIgmpv1UnusedCounter) PatternFlowIgmpv1UnusedCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIgmpv1UnusedCounter struct { + obj *patternFlowIgmpv1UnusedCounter +} + +type marshalPatternFlowIgmpv1UnusedCounter interface { + // ToProto marshals PatternFlowIgmpv1UnusedCounter to protobuf object *otg.PatternFlowIgmpv1UnusedCounter + ToProto() (*otg.PatternFlowIgmpv1UnusedCounter, error) + // ToPbText marshals PatternFlowIgmpv1UnusedCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIgmpv1UnusedCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIgmpv1UnusedCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIgmpv1UnusedCounter struct { + obj *patternFlowIgmpv1UnusedCounter +} + +type unMarshalPatternFlowIgmpv1UnusedCounter interface { + // FromProto unmarshals PatternFlowIgmpv1UnusedCounter from protobuf object *otg.PatternFlowIgmpv1UnusedCounter + FromProto(msg *otg.PatternFlowIgmpv1UnusedCounter) (PatternFlowIgmpv1UnusedCounter, error) + // FromPbText unmarshals PatternFlowIgmpv1UnusedCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIgmpv1UnusedCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIgmpv1UnusedCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIgmpv1UnusedCounter) Marshal() marshalPatternFlowIgmpv1UnusedCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIgmpv1UnusedCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIgmpv1UnusedCounter) Unmarshal() unMarshalPatternFlowIgmpv1UnusedCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIgmpv1UnusedCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIgmpv1UnusedCounter) ToProto() (*otg.PatternFlowIgmpv1UnusedCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIgmpv1UnusedCounter) FromProto(msg *otg.PatternFlowIgmpv1UnusedCounter) (PatternFlowIgmpv1UnusedCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIgmpv1UnusedCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIgmpv1UnusedCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIgmpv1UnusedCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1UnusedCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIgmpv1UnusedCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1UnusedCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIgmpv1UnusedCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1UnusedCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1UnusedCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIgmpv1UnusedCounter) Clone() (PatternFlowIgmpv1UnusedCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIgmpv1UnusedCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIgmpv1UnusedCounter is integer counter pattern +type PatternFlowIgmpv1UnusedCounter interface { + Validation + // msg marshals PatternFlowIgmpv1UnusedCounter to protobuf object *otg.PatternFlowIgmpv1UnusedCounter + // and doesn't set defaults + msg() *otg.PatternFlowIgmpv1UnusedCounter + // setMsg unmarshals PatternFlowIgmpv1UnusedCounter from protobuf object *otg.PatternFlowIgmpv1UnusedCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIgmpv1UnusedCounter) PatternFlowIgmpv1UnusedCounter + // provides marshal interface + Marshal() marshalPatternFlowIgmpv1UnusedCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIgmpv1UnusedCounter + // validate validates PatternFlowIgmpv1UnusedCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIgmpv1UnusedCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIgmpv1UnusedCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIgmpv1UnusedCounter + SetStart(value uint32) PatternFlowIgmpv1UnusedCounter + // HasStart checks if Start has been set in PatternFlowIgmpv1UnusedCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIgmpv1UnusedCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIgmpv1UnusedCounter + SetStep(value uint32) PatternFlowIgmpv1UnusedCounter + // HasStep checks if Step has been set in PatternFlowIgmpv1UnusedCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIgmpv1UnusedCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIgmpv1UnusedCounter + SetCount(value uint32) PatternFlowIgmpv1UnusedCounter + // HasCount checks if Count has been set in PatternFlowIgmpv1UnusedCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIgmpv1UnusedCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIgmpv1UnusedCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIgmpv1UnusedCounter object +func (obj *patternFlowIgmpv1UnusedCounter) SetStart(value uint32) PatternFlowIgmpv1UnusedCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIgmpv1UnusedCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIgmpv1UnusedCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIgmpv1UnusedCounter object +func (obj *patternFlowIgmpv1UnusedCounter) SetStep(value uint32) PatternFlowIgmpv1UnusedCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIgmpv1UnusedCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIgmpv1UnusedCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIgmpv1UnusedCounter object +func (obj *patternFlowIgmpv1UnusedCounter) SetCount(value uint32) PatternFlowIgmpv1UnusedCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIgmpv1UnusedCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1UnusedCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1UnusedCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1UnusedCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIgmpv1UnusedCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_igmpv1_unused_metric_tag.go b/gosnappi/pattern_flow_igmpv1_unused_metric_tag.go new file mode 100644 index 00000000..59ac6146 --- /dev/null +++ b/gosnappi/pattern_flow_igmpv1_unused_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIgmpv1UnusedMetricTag ***** +type patternFlowIgmpv1UnusedMetricTag struct { + validation + obj *otg.PatternFlowIgmpv1UnusedMetricTag + marshaller marshalPatternFlowIgmpv1UnusedMetricTag + unMarshaller unMarshalPatternFlowIgmpv1UnusedMetricTag +} + +func NewPatternFlowIgmpv1UnusedMetricTag() PatternFlowIgmpv1UnusedMetricTag { + obj := patternFlowIgmpv1UnusedMetricTag{obj: &otg.PatternFlowIgmpv1UnusedMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIgmpv1UnusedMetricTag) msg() *otg.PatternFlowIgmpv1UnusedMetricTag { + return obj.obj +} + +func (obj *patternFlowIgmpv1UnusedMetricTag) setMsg(msg *otg.PatternFlowIgmpv1UnusedMetricTag) PatternFlowIgmpv1UnusedMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIgmpv1UnusedMetricTag struct { + obj *patternFlowIgmpv1UnusedMetricTag +} + +type marshalPatternFlowIgmpv1UnusedMetricTag interface { + // ToProto marshals PatternFlowIgmpv1UnusedMetricTag to protobuf object *otg.PatternFlowIgmpv1UnusedMetricTag + ToProto() (*otg.PatternFlowIgmpv1UnusedMetricTag, error) + // ToPbText marshals PatternFlowIgmpv1UnusedMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIgmpv1UnusedMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIgmpv1UnusedMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIgmpv1UnusedMetricTag struct { + obj *patternFlowIgmpv1UnusedMetricTag +} + +type unMarshalPatternFlowIgmpv1UnusedMetricTag interface { + // FromProto unmarshals PatternFlowIgmpv1UnusedMetricTag from protobuf object *otg.PatternFlowIgmpv1UnusedMetricTag + FromProto(msg *otg.PatternFlowIgmpv1UnusedMetricTag) (PatternFlowIgmpv1UnusedMetricTag, error) + // FromPbText unmarshals PatternFlowIgmpv1UnusedMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIgmpv1UnusedMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIgmpv1UnusedMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIgmpv1UnusedMetricTag) Marshal() marshalPatternFlowIgmpv1UnusedMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIgmpv1UnusedMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIgmpv1UnusedMetricTag) Unmarshal() unMarshalPatternFlowIgmpv1UnusedMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIgmpv1UnusedMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIgmpv1UnusedMetricTag) ToProto() (*otg.PatternFlowIgmpv1UnusedMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIgmpv1UnusedMetricTag) FromProto(msg *otg.PatternFlowIgmpv1UnusedMetricTag) (PatternFlowIgmpv1UnusedMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIgmpv1UnusedMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIgmpv1UnusedMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIgmpv1UnusedMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1UnusedMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIgmpv1UnusedMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1UnusedMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIgmpv1UnusedMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1UnusedMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1UnusedMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIgmpv1UnusedMetricTag) Clone() (PatternFlowIgmpv1UnusedMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIgmpv1UnusedMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIgmpv1UnusedMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIgmpv1UnusedMetricTag interface { + Validation + // msg marshals PatternFlowIgmpv1UnusedMetricTag to protobuf object *otg.PatternFlowIgmpv1UnusedMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIgmpv1UnusedMetricTag + // setMsg unmarshals PatternFlowIgmpv1UnusedMetricTag from protobuf object *otg.PatternFlowIgmpv1UnusedMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIgmpv1UnusedMetricTag) PatternFlowIgmpv1UnusedMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIgmpv1UnusedMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIgmpv1UnusedMetricTag + // validate validates PatternFlowIgmpv1UnusedMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIgmpv1UnusedMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIgmpv1UnusedMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIgmpv1UnusedMetricTag + SetName(value string) PatternFlowIgmpv1UnusedMetricTag + // Offset returns uint32, set in PatternFlowIgmpv1UnusedMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIgmpv1UnusedMetricTag + SetOffset(value uint32) PatternFlowIgmpv1UnusedMetricTag + // HasOffset checks if Offset has been set in PatternFlowIgmpv1UnusedMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIgmpv1UnusedMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIgmpv1UnusedMetricTag + SetLength(value uint32) PatternFlowIgmpv1UnusedMetricTag + // HasLength checks if Length has been set in PatternFlowIgmpv1UnusedMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIgmpv1UnusedMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIgmpv1UnusedMetricTag object +func (obj *patternFlowIgmpv1UnusedMetricTag) SetName(value string) PatternFlowIgmpv1UnusedMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIgmpv1UnusedMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIgmpv1UnusedMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIgmpv1UnusedMetricTag object +func (obj *patternFlowIgmpv1UnusedMetricTag) SetOffset(value uint32) PatternFlowIgmpv1UnusedMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIgmpv1UnusedMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIgmpv1UnusedMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIgmpv1UnusedMetricTag object +func (obj *patternFlowIgmpv1UnusedMetricTag) SetLength(value uint32) PatternFlowIgmpv1UnusedMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIgmpv1UnusedMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIgmpv1UnusedMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1UnusedMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIgmpv1UnusedMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIgmpv1UnusedMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_igmpv1_version.go b/gosnappi/pattern_flow_igmpv1_version.go new file mode 100644 index 00000000..a3509367 --- /dev/null +++ b/gosnappi/pattern_flow_igmpv1_version.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIgmpv1Version ***** +type patternFlowIgmpv1Version struct { + validation + obj *otg.PatternFlowIgmpv1Version + marshaller marshalPatternFlowIgmpv1Version + unMarshaller unMarshalPatternFlowIgmpv1Version + incrementHolder PatternFlowIgmpv1VersionCounter + decrementHolder PatternFlowIgmpv1VersionCounter + metricTagsHolder PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter +} + +func NewPatternFlowIgmpv1Version() PatternFlowIgmpv1Version { + obj := patternFlowIgmpv1Version{obj: &otg.PatternFlowIgmpv1Version{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIgmpv1Version) msg() *otg.PatternFlowIgmpv1Version { + return obj.obj +} + +func (obj *patternFlowIgmpv1Version) setMsg(msg *otg.PatternFlowIgmpv1Version) PatternFlowIgmpv1Version { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIgmpv1Version struct { + obj *patternFlowIgmpv1Version +} + +type marshalPatternFlowIgmpv1Version interface { + // ToProto marshals PatternFlowIgmpv1Version to protobuf object *otg.PatternFlowIgmpv1Version + ToProto() (*otg.PatternFlowIgmpv1Version, error) + // ToPbText marshals PatternFlowIgmpv1Version to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIgmpv1Version to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIgmpv1Version to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIgmpv1Version struct { + obj *patternFlowIgmpv1Version +} + +type unMarshalPatternFlowIgmpv1Version interface { + // FromProto unmarshals PatternFlowIgmpv1Version from protobuf object *otg.PatternFlowIgmpv1Version + FromProto(msg *otg.PatternFlowIgmpv1Version) (PatternFlowIgmpv1Version, error) + // FromPbText unmarshals PatternFlowIgmpv1Version from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIgmpv1Version from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIgmpv1Version from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIgmpv1Version) Marshal() marshalPatternFlowIgmpv1Version { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIgmpv1Version{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIgmpv1Version) Unmarshal() unMarshalPatternFlowIgmpv1Version { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIgmpv1Version{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIgmpv1Version) ToProto() (*otg.PatternFlowIgmpv1Version, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIgmpv1Version) FromProto(msg *otg.PatternFlowIgmpv1Version) (PatternFlowIgmpv1Version, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIgmpv1Version) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIgmpv1Version) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIgmpv1Version) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1Version) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIgmpv1Version) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1Version) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIgmpv1Version) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1Version) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1Version) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIgmpv1Version) Clone() (PatternFlowIgmpv1Version, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIgmpv1Version() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIgmpv1Version) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIgmpv1Version is version number +type PatternFlowIgmpv1Version interface { + Validation + // msg marshals PatternFlowIgmpv1Version to protobuf object *otg.PatternFlowIgmpv1Version + // and doesn't set defaults + msg() *otg.PatternFlowIgmpv1Version + // setMsg unmarshals PatternFlowIgmpv1Version from protobuf object *otg.PatternFlowIgmpv1Version + // and doesn't set defaults + setMsg(*otg.PatternFlowIgmpv1Version) PatternFlowIgmpv1Version + // provides marshal interface + Marshal() marshalPatternFlowIgmpv1Version + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIgmpv1Version + // validate validates PatternFlowIgmpv1Version + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIgmpv1Version, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIgmpv1VersionChoiceEnum, set in PatternFlowIgmpv1Version + Choice() PatternFlowIgmpv1VersionChoiceEnum + // setChoice assigns PatternFlowIgmpv1VersionChoiceEnum provided by user to PatternFlowIgmpv1Version + setChoice(value PatternFlowIgmpv1VersionChoiceEnum) PatternFlowIgmpv1Version + // HasChoice checks if Choice has been set in PatternFlowIgmpv1Version + HasChoice() bool + // Value returns uint32, set in PatternFlowIgmpv1Version. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIgmpv1Version + SetValue(value uint32) PatternFlowIgmpv1Version + // HasValue checks if Value has been set in PatternFlowIgmpv1Version + HasValue() bool + // Values returns []uint32, set in PatternFlowIgmpv1Version. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIgmpv1Version + SetValues(value []uint32) PatternFlowIgmpv1Version + // Increment returns PatternFlowIgmpv1VersionCounter, set in PatternFlowIgmpv1Version. + // PatternFlowIgmpv1VersionCounter is integer counter pattern + Increment() PatternFlowIgmpv1VersionCounter + // SetIncrement assigns PatternFlowIgmpv1VersionCounter provided by user to PatternFlowIgmpv1Version. + // PatternFlowIgmpv1VersionCounter is integer counter pattern + SetIncrement(value PatternFlowIgmpv1VersionCounter) PatternFlowIgmpv1Version + // HasIncrement checks if Increment has been set in PatternFlowIgmpv1Version + HasIncrement() bool + // Decrement returns PatternFlowIgmpv1VersionCounter, set in PatternFlowIgmpv1Version. + // PatternFlowIgmpv1VersionCounter is integer counter pattern + Decrement() PatternFlowIgmpv1VersionCounter + // SetDecrement assigns PatternFlowIgmpv1VersionCounter provided by user to PatternFlowIgmpv1Version. + // PatternFlowIgmpv1VersionCounter is integer counter pattern + SetDecrement(value PatternFlowIgmpv1VersionCounter) PatternFlowIgmpv1Version + // HasDecrement checks if Decrement has been set in PatternFlowIgmpv1Version + HasDecrement() bool + // MetricTags returns PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIterIter, set in PatternFlowIgmpv1Version + MetricTags() PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter + setNil() +} + +type PatternFlowIgmpv1VersionChoiceEnum string + +// Enum of Choice on PatternFlowIgmpv1Version +var PatternFlowIgmpv1VersionChoice = struct { + VALUE PatternFlowIgmpv1VersionChoiceEnum + VALUES PatternFlowIgmpv1VersionChoiceEnum + INCREMENT PatternFlowIgmpv1VersionChoiceEnum + DECREMENT PatternFlowIgmpv1VersionChoiceEnum +}{ + VALUE: PatternFlowIgmpv1VersionChoiceEnum("value"), + VALUES: PatternFlowIgmpv1VersionChoiceEnum("values"), + INCREMENT: PatternFlowIgmpv1VersionChoiceEnum("increment"), + DECREMENT: PatternFlowIgmpv1VersionChoiceEnum("decrement"), +} + +func (obj *patternFlowIgmpv1Version) Choice() PatternFlowIgmpv1VersionChoiceEnum { + return PatternFlowIgmpv1VersionChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIgmpv1Version) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIgmpv1Version) setChoice(value PatternFlowIgmpv1VersionChoiceEnum) PatternFlowIgmpv1Version { + intValue, ok := otg.PatternFlowIgmpv1Version_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIgmpv1VersionChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIgmpv1Version_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIgmpv1VersionChoice.VALUE { + defaultValue := uint32(1) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIgmpv1VersionChoice.VALUES { + defaultValue := []uint32{1} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIgmpv1VersionChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIgmpv1VersionCounter().msg() + } + + if value == PatternFlowIgmpv1VersionChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIgmpv1VersionCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIgmpv1Version) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIgmpv1VersionChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIgmpv1Version) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIgmpv1Version object +func (obj *patternFlowIgmpv1Version) SetValue(value uint32) PatternFlowIgmpv1Version { + obj.setChoice(PatternFlowIgmpv1VersionChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIgmpv1Version) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{1}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIgmpv1Version object +func (obj *patternFlowIgmpv1Version) SetValues(value []uint32) PatternFlowIgmpv1Version { + obj.setChoice(PatternFlowIgmpv1VersionChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIgmpv1VersionCounter +func (obj *patternFlowIgmpv1Version) Increment() PatternFlowIgmpv1VersionCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIgmpv1VersionChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIgmpv1VersionCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIgmpv1VersionCounter +func (obj *patternFlowIgmpv1Version) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIgmpv1VersionCounter value in the PatternFlowIgmpv1Version object +func (obj *patternFlowIgmpv1Version) SetIncrement(value PatternFlowIgmpv1VersionCounter) PatternFlowIgmpv1Version { + obj.setChoice(PatternFlowIgmpv1VersionChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIgmpv1VersionCounter +func (obj *patternFlowIgmpv1Version) Decrement() PatternFlowIgmpv1VersionCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIgmpv1VersionChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIgmpv1VersionCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIgmpv1VersionCounter +func (obj *patternFlowIgmpv1Version) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIgmpv1VersionCounter value in the PatternFlowIgmpv1Version object +func (obj *patternFlowIgmpv1Version) SetDecrement(value PatternFlowIgmpv1VersionCounter) PatternFlowIgmpv1Version { + obj.setChoice(PatternFlowIgmpv1VersionChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIgmpv1VersionMetricTag +func (obj *patternFlowIgmpv1Version) MetricTags() PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIgmpv1VersionMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter struct { + obj *patternFlowIgmpv1Version + patternFlowIgmpv1VersionMetricTagSlice []PatternFlowIgmpv1VersionMetricTag + fieldPtr *[]*otg.PatternFlowIgmpv1VersionMetricTag +} + +func newPatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter(ptr *[]*otg.PatternFlowIgmpv1VersionMetricTag) PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter { + return &patternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter interface { + setMsg(*patternFlowIgmpv1Version) PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter + Items() []PatternFlowIgmpv1VersionMetricTag + Add() PatternFlowIgmpv1VersionMetricTag + Append(items ...PatternFlowIgmpv1VersionMetricTag) PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter + Set(index int, newObj PatternFlowIgmpv1VersionMetricTag) PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter + Clear() PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter + clearHolderSlice() PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter + appendHolderSlice(item PatternFlowIgmpv1VersionMetricTag) PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter +} + +func (obj *patternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter) setMsg(msg *patternFlowIgmpv1Version) PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIgmpv1VersionMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter) Items() []PatternFlowIgmpv1VersionMetricTag { + return obj.patternFlowIgmpv1VersionMetricTagSlice +} + +func (obj *patternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter) Add() PatternFlowIgmpv1VersionMetricTag { + newObj := &otg.PatternFlowIgmpv1VersionMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIgmpv1VersionMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIgmpv1VersionMetricTagSlice = append(obj.patternFlowIgmpv1VersionMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter) Append(items ...PatternFlowIgmpv1VersionMetricTag) PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIgmpv1VersionMetricTagSlice = append(obj.patternFlowIgmpv1VersionMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter) Set(index int, newObj PatternFlowIgmpv1VersionMetricTag) PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIgmpv1VersionMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter) Clear() PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIgmpv1VersionMetricTag{} + obj.patternFlowIgmpv1VersionMetricTagSlice = []PatternFlowIgmpv1VersionMetricTag{} + } + return obj +} +func (obj *patternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter) clearHolderSlice() PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter { + if len(obj.patternFlowIgmpv1VersionMetricTagSlice) > 0 { + obj.patternFlowIgmpv1VersionMetricTagSlice = []PatternFlowIgmpv1VersionMetricTag{} + } + return obj +} +func (obj *patternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter) appendHolderSlice(item PatternFlowIgmpv1VersionMetricTag) PatternFlowIgmpv1VersionPatternFlowIgmpv1VersionMetricTagIter { + obj.patternFlowIgmpv1VersionMetricTagSlice = append(obj.patternFlowIgmpv1VersionMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIgmpv1Version) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1Version.Value <= 15 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIgmpv1Version.Values <= 15 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIgmpv1VersionMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIgmpv1Version) setDefault() { + var choices_set int = 0 + var choice PatternFlowIgmpv1VersionChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIgmpv1VersionChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIgmpv1VersionChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIgmpv1VersionChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIgmpv1VersionChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIgmpv1VersionChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIgmpv1Version") + } + } else { + intVal := otg.PatternFlowIgmpv1Version_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIgmpv1Version_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_igmpv1_version_counter.go b/gosnappi/pattern_flow_igmpv1_version_counter.go new file mode 100644 index 00000000..a1eed87b --- /dev/null +++ b/gosnappi/pattern_flow_igmpv1_version_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIgmpv1VersionCounter ***** +type patternFlowIgmpv1VersionCounter struct { + validation + obj *otg.PatternFlowIgmpv1VersionCounter + marshaller marshalPatternFlowIgmpv1VersionCounter + unMarshaller unMarshalPatternFlowIgmpv1VersionCounter +} + +func NewPatternFlowIgmpv1VersionCounter() PatternFlowIgmpv1VersionCounter { + obj := patternFlowIgmpv1VersionCounter{obj: &otg.PatternFlowIgmpv1VersionCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIgmpv1VersionCounter) msg() *otg.PatternFlowIgmpv1VersionCounter { + return obj.obj +} + +func (obj *patternFlowIgmpv1VersionCounter) setMsg(msg *otg.PatternFlowIgmpv1VersionCounter) PatternFlowIgmpv1VersionCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIgmpv1VersionCounter struct { + obj *patternFlowIgmpv1VersionCounter +} + +type marshalPatternFlowIgmpv1VersionCounter interface { + // ToProto marshals PatternFlowIgmpv1VersionCounter to protobuf object *otg.PatternFlowIgmpv1VersionCounter + ToProto() (*otg.PatternFlowIgmpv1VersionCounter, error) + // ToPbText marshals PatternFlowIgmpv1VersionCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIgmpv1VersionCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIgmpv1VersionCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIgmpv1VersionCounter struct { + obj *patternFlowIgmpv1VersionCounter +} + +type unMarshalPatternFlowIgmpv1VersionCounter interface { + // FromProto unmarshals PatternFlowIgmpv1VersionCounter from protobuf object *otg.PatternFlowIgmpv1VersionCounter + FromProto(msg *otg.PatternFlowIgmpv1VersionCounter) (PatternFlowIgmpv1VersionCounter, error) + // FromPbText unmarshals PatternFlowIgmpv1VersionCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIgmpv1VersionCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIgmpv1VersionCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIgmpv1VersionCounter) Marshal() marshalPatternFlowIgmpv1VersionCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIgmpv1VersionCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIgmpv1VersionCounter) Unmarshal() unMarshalPatternFlowIgmpv1VersionCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIgmpv1VersionCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIgmpv1VersionCounter) ToProto() (*otg.PatternFlowIgmpv1VersionCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIgmpv1VersionCounter) FromProto(msg *otg.PatternFlowIgmpv1VersionCounter) (PatternFlowIgmpv1VersionCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIgmpv1VersionCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIgmpv1VersionCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIgmpv1VersionCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1VersionCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIgmpv1VersionCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1VersionCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIgmpv1VersionCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1VersionCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1VersionCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIgmpv1VersionCounter) Clone() (PatternFlowIgmpv1VersionCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIgmpv1VersionCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIgmpv1VersionCounter is integer counter pattern +type PatternFlowIgmpv1VersionCounter interface { + Validation + // msg marshals PatternFlowIgmpv1VersionCounter to protobuf object *otg.PatternFlowIgmpv1VersionCounter + // and doesn't set defaults + msg() *otg.PatternFlowIgmpv1VersionCounter + // setMsg unmarshals PatternFlowIgmpv1VersionCounter from protobuf object *otg.PatternFlowIgmpv1VersionCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIgmpv1VersionCounter) PatternFlowIgmpv1VersionCounter + // provides marshal interface + Marshal() marshalPatternFlowIgmpv1VersionCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIgmpv1VersionCounter + // validate validates PatternFlowIgmpv1VersionCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIgmpv1VersionCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIgmpv1VersionCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIgmpv1VersionCounter + SetStart(value uint32) PatternFlowIgmpv1VersionCounter + // HasStart checks if Start has been set in PatternFlowIgmpv1VersionCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIgmpv1VersionCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIgmpv1VersionCounter + SetStep(value uint32) PatternFlowIgmpv1VersionCounter + // HasStep checks if Step has been set in PatternFlowIgmpv1VersionCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIgmpv1VersionCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIgmpv1VersionCounter + SetCount(value uint32) PatternFlowIgmpv1VersionCounter + // HasCount checks if Count has been set in PatternFlowIgmpv1VersionCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIgmpv1VersionCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIgmpv1VersionCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIgmpv1VersionCounter object +func (obj *patternFlowIgmpv1VersionCounter) SetStart(value uint32) PatternFlowIgmpv1VersionCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIgmpv1VersionCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIgmpv1VersionCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIgmpv1VersionCounter object +func (obj *patternFlowIgmpv1VersionCounter) SetStep(value uint32) PatternFlowIgmpv1VersionCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIgmpv1VersionCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIgmpv1VersionCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIgmpv1VersionCounter object +func (obj *patternFlowIgmpv1VersionCounter) SetCount(value uint32) PatternFlowIgmpv1VersionCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIgmpv1VersionCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1VersionCounter.Start <= 15 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1VersionCounter.Step <= 15 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1VersionCounter.Count <= 15 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIgmpv1VersionCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_igmpv1_version_metric_tag.go b/gosnappi/pattern_flow_igmpv1_version_metric_tag.go new file mode 100644 index 00000000..7f428146 --- /dev/null +++ b/gosnappi/pattern_flow_igmpv1_version_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIgmpv1VersionMetricTag ***** +type patternFlowIgmpv1VersionMetricTag struct { + validation + obj *otg.PatternFlowIgmpv1VersionMetricTag + marshaller marshalPatternFlowIgmpv1VersionMetricTag + unMarshaller unMarshalPatternFlowIgmpv1VersionMetricTag +} + +func NewPatternFlowIgmpv1VersionMetricTag() PatternFlowIgmpv1VersionMetricTag { + obj := patternFlowIgmpv1VersionMetricTag{obj: &otg.PatternFlowIgmpv1VersionMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIgmpv1VersionMetricTag) msg() *otg.PatternFlowIgmpv1VersionMetricTag { + return obj.obj +} + +func (obj *patternFlowIgmpv1VersionMetricTag) setMsg(msg *otg.PatternFlowIgmpv1VersionMetricTag) PatternFlowIgmpv1VersionMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIgmpv1VersionMetricTag struct { + obj *patternFlowIgmpv1VersionMetricTag +} + +type marshalPatternFlowIgmpv1VersionMetricTag interface { + // ToProto marshals PatternFlowIgmpv1VersionMetricTag to protobuf object *otg.PatternFlowIgmpv1VersionMetricTag + ToProto() (*otg.PatternFlowIgmpv1VersionMetricTag, error) + // ToPbText marshals PatternFlowIgmpv1VersionMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIgmpv1VersionMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIgmpv1VersionMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIgmpv1VersionMetricTag struct { + obj *patternFlowIgmpv1VersionMetricTag +} + +type unMarshalPatternFlowIgmpv1VersionMetricTag interface { + // FromProto unmarshals PatternFlowIgmpv1VersionMetricTag from protobuf object *otg.PatternFlowIgmpv1VersionMetricTag + FromProto(msg *otg.PatternFlowIgmpv1VersionMetricTag) (PatternFlowIgmpv1VersionMetricTag, error) + // FromPbText unmarshals PatternFlowIgmpv1VersionMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIgmpv1VersionMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIgmpv1VersionMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIgmpv1VersionMetricTag) Marshal() marshalPatternFlowIgmpv1VersionMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIgmpv1VersionMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIgmpv1VersionMetricTag) Unmarshal() unMarshalPatternFlowIgmpv1VersionMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIgmpv1VersionMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIgmpv1VersionMetricTag) ToProto() (*otg.PatternFlowIgmpv1VersionMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIgmpv1VersionMetricTag) FromProto(msg *otg.PatternFlowIgmpv1VersionMetricTag) (PatternFlowIgmpv1VersionMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIgmpv1VersionMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIgmpv1VersionMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIgmpv1VersionMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1VersionMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIgmpv1VersionMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIgmpv1VersionMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIgmpv1VersionMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1VersionMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIgmpv1VersionMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIgmpv1VersionMetricTag) Clone() (PatternFlowIgmpv1VersionMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIgmpv1VersionMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIgmpv1VersionMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIgmpv1VersionMetricTag interface { + Validation + // msg marshals PatternFlowIgmpv1VersionMetricTag to protobuf object *otg.PatternFlowIgmpv1VersionMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIgmpv1VersionMetricTag + // setMsg unmarshals PatternFlowIgmpv1VersionMetricTag from protobuf object *otg.PatternFlowIgmpv1VersionMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIgmpv1VersionMetricTag) PatternFlowIgmpv1VersionMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIgmpv1VersionMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIgmpv1VersionMetricTag + // validate validates PatternFlowIgmpv1VersionMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIgmpv1VersionMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIgmpv1VersionMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIgmpv1VersionMetricTag + SetName(value string) PatternFlowIgmpv1VersionMetricTag + // Offset returns uint32, set in PatternFlowIgmpv1VersionMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIgmpv1VersionMetricTag + SetOffset(value uint32) PatternFlowIgmpv1VersionMetricTag + // HasOffset checks if Offset has been set in PatternFlowIgmpv1VersionMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIgmpv1VersionMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIgmpv1VersionMetricTag + SetLength(value uint32) PatternFlowIgmpv1VersionMetricTag + // HasLength checks if Length has been set in PatternFlowIgmpv1VersionMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIgmpv1VersionMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIgmpv1VersionMetricTag object +func (obj *patternFlowIgmpv1VersionMetricTag) SetName(value string) PatternFlowIgmpv1VersionMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIgmpv1VersionMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIgmpv1VersionMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIgmpv1VersionMetricTag object +func (obj *patternFlowIgmpv1VersionMetricTag) SetOffset(value uint32) PatternFlowIgmpv1VersionMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIgmpv1VersionMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIgmpv1VersionMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIgmpv1VersionMetricTag object +func (obj *patternFlowIgmpv1VersionMetricTag) SetLength(value uint32) PatternFlowIgmpv1VersionMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIgmpv1VersionMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIgmpv1VersionMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIgmpv1VersionMetricTag.Offset <= 3 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 4 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIgmpv1VersionMetricTag.Length <= 4 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIgmpv1VersionMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(4) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_dont_fragment.go b/gosnappi/pattern_flow_ipv4_dont_fragment.go new file mode 100644 index 00000000..6c369495 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_dont_fragment.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4DontFragment ***** +type patternFlowIpv4DontFragment struct { + validation + obj *otg.PatternFlowIpv4DontFragment + marshaller marshalPatternFlowIpv4DontFragment + unMarshaller unMarshalPatternFlowIpv4DontFragment + incrementHolder PatternFlowIpv4DontFragmentCounter + decrementHolder PatternFlowIpv4DontFragmentCounter + metricTagsHolder PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter +} + +func NewPatternFlowIpv4DontFragment() PatternFlowIpv4DontFragment { + obj := patternFlowIpv4DontFragment{obj: &otg.PatternFlowIpv4DontFragment{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4DontFragment) msg() *otg.PatternFlowIpv4DontFragment { + return obj.obj +} + +func (obj *patternFlowIpv4DontFragment) setMsg(msg *otg.PatternFlowIpv4DontFragment) PatternFlowIpv4DontFragment { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4DontFragment struct { + obj *patternFlowIpv4DontFragment +} + +type marshalPatternFlowIpv4DontFragment interface { + // ToProto marshals PatternFlowIpv4DontFragment to protobuf object *otg.PatternFlowIpv4DontFragment + ToProto() (*otg.PatternFlowIpv4DontFragment, error) + // ToPbText marshals PatternFlowIpv4DontFragment to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4DontFragment to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4DontFragment to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4DontFragment struct { + obj *patternFlowIpv4DontFragment +} + +type unMarshalPatternFlowIpv4DontFragment interface { + // FromProto unmarshals PatternFlowIpv4DontFragment from protobuf object *otg.PatternFlowIpv4DontFragment + FromProto(msg *otg.PatternFlowIpv4DontFragment) (PatternFlowIpv4DontFragment, error) + // FromPbText unmarshals PatternFlowIpv4DontFragment from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4DontFragment from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4DontFragment from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4DontFragment) Marshal() marshalPatternFlowIpv4DontFragment { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4DontFragment{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4DontFragment) Unmarshal() unMarshalPatternFlowIpv4DontFragment { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4DontFragment{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4DontFragment) ToProto() (*otg.PatternFlowIpv4DontFragment, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4DontFragment) FromProto(msg *otg.PatternFlowIpv4DontFragment) (PatternFlowIpv4DontFragment, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4DontFragment) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4DontFragment) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4DontFragment) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DontFragment) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4DontFragment) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DontFragment) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4DontFragment) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DontFragment) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DontFragment) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4DontFragment) Clone() (PatternFlowIpv4DontFragment, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4DontFragment() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4DontFragment) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4DontFragment is dont fragment flag If the dont_fragment flag is set and fragmentation is required to route the packet then the packet is dropped. +type PatternFlowIpv4DontFragment interface { + Validation + // msg marshals PatternFlowIpv4DontFragment to protobuf object *otg.PatternFlowIpv4DontFragment + // and doesn't set defaults + msg() *otg.PatternFlowIpv4DontFragment + // setMsg unmarshals PatternFlowIpv4DontFragment from protobuf object *otg.PatternFlowIpv4DontFragment + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4DontFragment) PatternFlowIpv4DontFragment + // provides marshal interface + Marshal() marshalPatternFlowIpv4DontFragment + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4DontFragment + // validate validates PatternFlowIpv4DontFragment + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4DontFragment, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4DontFragmentChoiceEnum, set in PatternFlowIpv4DontFragment + Choice() PatternFlowIpv4DontFragmentChoiceEnum + // setChoice assigns PatternFlowIpv4DontFragmentChoiceEnum provided by user to PatternFlowIpv4DontFragment + setChoice(value PatternFlowIpv4DontFragmentChoiceEnum) PatternFlowIpv4DontFragment + // HasChoice checks if Choice has been set in PatternFlowIpv4DontFragment + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4DontFragment. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4DontFragment + SetValue(value uint32) PatternFlowIpv4DontFragment + // HasValue checks if Value has been set in PatternFlowIpv4DontFragment + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4DontFragment. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4DontFragment + SetValues(value []uint32) PatternFlowIpv4DontFragment + // Increment returns PatternFlowIpv4DontFragmentCounter, set in PatternFlowIpv4DontFragment. + // PatternFlowIpv4DontFragmentCounter is integer counter pattern + Increment() PatternFlowIpv4DontFragmentCounter + // SetIncrement assigns PatternFlowIpv4DontFragmentCounter provided by user to PatternFlowIpv4DontFragment. + // PatternFlowIpv4DontFragmentCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4DontFragmentCounter) PatternFlowIpv4DontFragment + // HasIncrement checks if Increment has been set in PatternFlowIpv4DontFragment + HasIncrement() bool + // Decrement returns PatternFlowIpv4DontFragmentCounter, set in PatternFlowIpv4DontFragment. + // PatternFlowIpv4DontFragmentCounter is integer counter pattern + Decrement() PatternFlowIpv4DontFragmentCounter + // SetDecrement assigns PatternFlowIpv4DontFragmentCounter provided by user to PatternFlowIpv4DontFragment. + // PatternFlowIpv4DontFragmentCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4DontFragmentCounter) PatternFlowIpv4DontFragment + // HasDecrement checks if Decrement has been set in PatternFlowIpv4DontFragment + HasDecrement() bool + // MetricTags returns PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIterIter, set in PatternFlowIpv4DontFragment + MetricTags() PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter + setNil() +} + +type PatternFlowIpv4DontFragmentChoiceEnum string + +// Enum of Choice on PatternFlowIpv4DontFragment +var PatternFlowIpv4DontFragmentChoice = struct { + VALUE PatternFlowIpv4DontFragmentChoiceEnum + VALUES PatternFlowIpv4DontFragmentChoiceEnum + INCREMENT PatternFlowIpv4DontFragmentChoiceEnum + DECREMENT PatternFlowIpv4DontFragmentChoiceEnum +}{ + VALUE: PatternFlowIpv4DontFragmentChoiceEnum("value"), + VALUES: PatternFlowIpv4DontFragmentChoiceEnum("values"), + INCREMENT: PatternFlowIpv4DontFragmentChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4DontFragmentChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4DontFragment) Choice() PatternFlowIpv4DontFragmentChoiceEnum { + return PatternFlowIpv4DontFragmentChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4DontFragment) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4DontFragment) setChoice(value PatternFlowIpv4DontFragmentChoiceEnum) PatternFlowIpv4DontFragment { + intValue, ok := otg.PatternFlowIpv4DontFragment_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4DontFragmentChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4DontFragment_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4DontFragmentChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4DontFragmentChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4DontFragmentChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4DontFragmentCounter().msg() + } + + if value == PatternFlowIpv4DontFragmentChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4DontFragmentCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4DontFragment) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4DontFragmentChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4DontFragment) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4DontFragment object +func (obj *patternFlowIpv4DontFragment) SetValue(value uint32) PatternFlowIpv4DontFragment { + obj.setChoice(PatternFlowIpv4DontFragmentChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4DontFragment) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4DontFragment object +func (obj *patternFlowIpv4DontFragment) SetValues(value []uint32) PatternFlowIpv4DontFragment { + obj.setChoice(PatternFlowIpv4DontFragmentChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4DontFragmentCounter +func (obj *patternFlowIpv4DontFragment) Increment() PatternFlowIpv4DontFragmentCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4DontFragmentChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4DontFragmentCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4DontFragmentCounter +func (obj *patternFlowIpv4DontFragment) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4DontFragmentCounter value in the PatternFlowIpv4DontFragment object +func (obj *patternFlowIpv4DontFragment) SetIncrement(value PatternFlowIpv4DontFragmentCounter) PatternFlowIpv4DontFragment { + obj.setChoice(PatternFlowIpv4DontFragmentChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4DontFragmentCounter +func (obj *patternFlowIpv4DontFragment) Decrement() PatternFlowIpv4DontFragmentCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4DontFragmentChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4DontFragmentCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4DontFragmentCounter +func (obj *patternFlowIpv4DontFragment) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4DontFragmentCounter value in the PatternFlowIpv4DontFragment object +func (obj *patternFlowIpv4DontFragment) SetDecrement(value PatternFlowIpv4DontFragmentCounter) PatternFlowIpv4DontFragment { + obj.setChoice(PatternFlowIpv4DontFragmentChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4DontFragmentMetricTag +func (obj *patternFlowIpv4DontFragment) MetricTags() PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4DontFragmentMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter struct { + obj *patternFlowIpv4DontFragment + patternFlowIpv4DontFragmentMetricTagSlice []PatternFlowIpv4DontFragmentMetricTag + fieldPtr *[]*otg.PatternFlowIpv4DontFragmentMetricTag +} + +func newPatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter(ptr *[]*otg.PatternFlowIpv4DontFragmentMetricTag) PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter { + return &patternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter interface { + setMsg(*patternFlowIpv4DontFragment) PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter + Items() []PatternFlowIpv4DontFragmentMetricTag + Add() PatternFlowIpv4DontFragmentMetricTag + Append(items ...PatternFlowIpv4DontFragmentMetricTag) PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter + Set(index int, newObj PatternFlowIpv4DontFragmentMetricTag) PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter + Clear() PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter + clearHolderSlice() PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter + appendHolderSlice(item PatternFlowIpv4DontFragmentMetricTag) PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter +} + +func (obj *patternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter) setMsg(msg *patternFlowIpv4DontFragment) PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4DontFragmentMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter) Items() []PatternFlowIpv4DontFragmentMetricTag { + return obj.patternFlowIpv4DontFragmentMetricTagSlice +} + +func (obj *patternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter) Add() PatternFlowIpv4DontFragmentMetricTag { + newObj := &otg.PatternFlowIpv4DontFragmentMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4DontFragmentMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4DontFragmentMetricTagSlice = append(obj.patternFlowIpv4DontFragmentMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter) Append(items ...PatternFlowIpv4DontFragmentMetricTag) PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4DontFragmentMetricTagSlice = append(obj.patternFlowIpv4DontFragmentMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter) Set(index int, newObj PatternFlowIpv4DontFragmentMetricTag) PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4DontFragmentMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter) Clear() PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4DontFragmentMetricTag{} + obj.patternFlowIpv4DontFragmentMetricTagSlice = []PatternFlowIpv4DontFragmentMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter) clearHolderSlice() PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter { + if len(obj.patternFlowIpv4DontFragmentMetricTagSlice) > 0 { + obj.patternFlowIpv4DontFragmentMetricTagSlice = []PatternFlowIpv4DontFragmentMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter) appendHolderSlice(item PatternFlowIpv4DontFragmentMetricTag) PatternFlowIpv4DontFragmentPatternFlowIpv4DontFragmentMetricTagIter { + obj.patternFlowIpv4DontFragmentMetricTagSlice = append(obj.patternFlowIpv4DontFragmentMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4DontFragment) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DontFragment.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4DontFragment.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4DontFragmentMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4DontFragment) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4DontFragmentChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4DontFragmentChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4DontFragmentChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4DontFragmentChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4DontFragmentChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4DontFragmentChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4DontFragment") + } + } else { + intVal := otg.PatternFlowIpv4DontFragment_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4DontFragment_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_dont_fragment_counter.go b/gosnappi/pattern_flow_ipv4_dont_fragment_counter.go new file mode 100644 index 00000000..353a592c --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_dont_fragment_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4DontFragmentCounter ***** +type patternFlowIpv4DontFragmentCounter struct { + validation + obj *otg.PatternFlowIpv4DontFragmentCounter + marshaller marshalPatternFlowIpv4DontFragmentCounter + unMarshaller unMarshalPatternFlowIpv4DontFragmentCounter +} + +func NewPatternFlowIpv4DontFragmentCounter() PatternFlowIpv4DontFragmentCounter { + obj := patternFlowIpv4DontFragmentCounter{obj: &otg.PatternFlowIpv4DontFragmentCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4DontFragmentCounter) msg() *otg.PatternFlowIpv4DontFragmentCounter { + return obj.obj +} + +func (obj *patternFlowIpv4DontFragmentCounter) setMsg(msg *otg.PatternFlowIpv4DontFragmentCounter) PatternFlowIpv4DontFragmentCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4DontFragmentCounter struct { + obj *patternFlowIpv4DontFragmentCounter +} + +type marshalPatternFlowIpv4DontFragmentCounter interface { + // ToProto marshals PatternFlowIpv4DontFragmentCounter to protobuf object *otg.PatternFlowIpv4DontFragmentCounter + ToProto() (*otg.PatternFlowIpv4DontFragmentCounter, error) + // ToPbText marshals PatternFlowIpv4DontFragmentCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4DontFragmentCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4DontFragmentCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4DontFragmentCounter struct { + obj *patternFlowIpv4DontFragmentCounter +} + +type unMarshalPatternFlowIpv4DontFragmentCounter interface { + // FromProto unmarshals PatternFlowIpv4DontFragmentCounter from protobuf object *otg.PatternFlowIpv4DontFragmentCounter + FromProto(msg *otg.PatternFlowIpv4DontFragmentCounter) (PatternFlowIpv4DontFragmentCounter, error) + // FromPbText unmarshals PatternFlowIpv4DontFragmentCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4DontFragmentCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4DontFragmentCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4DontFragmentCounter) Marshal() marshalPatternFlowIpv4DontFragmentCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4DontFragmentCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4DontFragmentCounter) Unmarshal() unMarshalPatternFlowIpv4DontFragmentCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4DontFragmentCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4DontFragmentCounter) ToProto() (*otg.PatternFlowIpv4DontFragmentCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4DontFragmentCounter) FromProto(msg *otg.PatternFlowIpv4DontFragmentCounter) (PatternFlowIpv4DontFragmentCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4DontFragmentCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4DontFragmentCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4DontFragmentCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DontFragmentCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4DontFragmentCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DontFragmentCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4DontFragmentCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DontFragmentCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DontFragmentCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4DontFragmentCounter) Clone() (PatternFlowIpv4DontFragmentCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4DontFragmentCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4DontFragmentCounter is integer counter pattern +type PatternFlowIpv4DontFragmentCounter interface { + Validation + // msg marshals PatternFlowIpv4DontFragmentCounter to protobuf object *otg.PatternFlowIpv4DontFragmentCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4DontFragmentCounter + // setMsg unmarshals PatternFlowIpv4DontFragmentCounter from protobuf object *otg.PatternFlowIpv4DontFragmentCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4DontFragmentCounter) PatternFlowIpv4DontFragmentCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4DontFragmentCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4DontFragmentCounter + // validate validates PatternFlowIpv4DontFragmentCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4DontFragmentCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4DontFragmentCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4DontFragmentCounter + SetStart(value uint32) PatternFlowIpv4DontFragmentCounter + // HasStart checks if Start has been set in PatternFlowIpv4DontFragmentCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4DontFragmentCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4DontFragmentCounter + SetStep(value uint32) PatternFlowIpv4DontFragmentCounter + // HasStep checks if Step has been set in PatternFlowIpv4DontFragmentCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4DontFragmentCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4DontFragmentCounter + SetCount(value uint32) PatternFlowIpv4DontFragmentCounter + // HasCount checks if Count has been set in PatternFlowIpv4DontFragmentCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4DontFragmentCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4DontFragmentCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4DontFragmentCounter object +func (obj *patternFlowIpv4DontFragmentCounter) SetStart(value uint32) PatternFlowIpv4DontFragmentCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4DontFragmentCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4DontFragmentCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4DontFragmentCounter object +func (obj *patternFlowIpv4DontFragmentCounter) SetStep(value uint32) PatternFlowIpv4DontFragmentCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4DontFragmentCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4DontFragmentCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4DontFragmentCounter object +func (obj *patternFlowIpv4DontFragmentCounter) SetCount(value uint32) PatternFlowIpv4DontFragmentCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4DontFragmentCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DontFragmentCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DontFragmentCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DontFragmentCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4DontFragmentCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_dont_fragment_metric_tag.go b/gosnappi/pattern_flow_ipv4_dont_fragment_metric_tag.go new file mode 100644 index 00000000..a3fa8987 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_dont_fragment_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4DontFragmentMetricTag ***** +type patternFlowIpv4DontFragmentMetricTag struct { + validation + obj *otg.PatternFlowIpv4DontFragmentMetricTag + marshaller marshalPatternFlowIpv4DontFragmentMetricTag + unMarshaller unMarshalPatternFlowIpv4DontFragmentMetricTag +} + +func NewPatternFlowIpv4DontFragmentMetricTag() PatternFlowIpv4DontFragmentMetricTag { + obj := patternFlowIpv4DontFragmentMetricTag{obj: &otg.PatternFlowIpv4DontFragmentMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4DontFragmentMetricTag) msg() *otg.PatternFlowIpv4DontFragmentMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4DontFragmentMetricTag) setMsg(msg *otg.PatternFlowIpv4DontFragmentMetricTag) PatternFlowIpv4DontFragmentMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4DontFragmentMetricTag struct { + obj *patternFlowIpv4DontFragmentMetricTag +} + +type marshalPatternFlowIpv4DontFragmentMetricTag interface { + // ToProto marshals PatternFlowIpv4DontFragmentMetricTag to protobuf object *otg.PatternFlowIpv4DontFragmentMetricTag + ToProto() (*otg.PatternFlowIpv4DontFragmentMetricTag, error) + // ToPbText marshals PatternFlowIpv4DontFragmentMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4DontFragmentMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4DontFragmentMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4DontFragmentMetricTag struct { + obj *patternFlowIpv4DontFragmentMetricTag +} + +type unMarshalPatternFlowIpv4DontFragmentMetricTag interface { + // FromProto unmarshals PatternFlowIpv4DontFragmentMetricTag from protobuf object *otg.PatternFlowIpv4DontFragmentMetricTag + FromProto(msg *otg.PatternFlowIpv4DontFragmentMetricTag) (PatternFlowIpv4DontFragmentMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4DontFragmentMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4DontFragmentMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4DontFragmentMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4DontFragmentMetricTag) Marshal() marshalPatternFlowIpv4DontFragmentMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4DontFragmentMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4DontFragmentMetricTag) Unmarshal() unMarshalPatternFlowIpv4DontFragmentMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4DontFragmentMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4DontFragmentMetricTag) ToProto() (*otg.PatternFlowIpv4DontFragmentMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4DontFragmentMetricTag) FromProto(msg *otg.PatternFlowIpv4DontFragmentMetricTag) (PatternFlowIpv4DontFragmentMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4DontFragmentMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4DontFragmentMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4DontFragmentMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DontFragmentMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4DontFragmentMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DontFragmentMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4DontFragmentMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DontFragmentMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DontFragmentMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4DontFragmentMetricTag) Clone() (PatternFlowIpv4DontFragmentMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4DontFragmentMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4DontFragmentMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4DontFragmentMetricTag interface { + Validation + // msg marshals PatternFlowIpv4DontFragmentMetricTag to protobuf object *otg.PatternFlowIpv4DontFragmentMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4DontFragmentMetricTag + // setMsg unmarshals PatternFlowIpv4DontFragmentMetricTag from protobuf object *otg.PatternFlowIpv4DontFragmentMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4DontFragmentMetricTag) PatternFlowIpv4DontFragmentMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4DontFragmentMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4DontFragmentMetricTag + // validate validates PatternFlowIpv4DontFragmentMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4DontFragmentMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4DontFragmentMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4DontFragmentMetricTag + SetName(value string) PatternFlowIpv4DontFragmentMetricTag + // Offset returns uint32, set in PatternFlowIpv4DontFragmentMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4DontFragmentMetricTag + SetOffset(value uint32) PatternFlowIpv4DontFragmentMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4DontFragmentMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4DontFragmentMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4DontFragmentMetricTag + SetLength(value uint32) PatternFlowIpv4DontFragmentMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4DontFragmentMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4DontFragmentMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4DontFragmentMetricTag object +func (obj *patternFlowIpv4DontFragmentMetricTag) SetName(value string) PatternFlowIpv4DontFragmentMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4DontFragmentMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4DontFragmentMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4DontFragmentMetricTag object +func (obj *patternFlowIpv4DontFragmentMetricTag) SetOffset(value uint32) PatternFlowIpv4DontFragmentMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4DontFragmentMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4DontFragmentMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4DontFragmentMetricTag object +func (obj *patternFlowIpv4DontFragmentMetricTag) SetLength(value uint32) PatternFlowIpv4DontFragmentMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4DontFragmentMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4DontFragmentMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DontFragmentMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4DontFragmentMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4DontFragmentMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_dscp_ecn.go b/gosnappi/pattern_flow_ipv4_dscp_ecn.go new file mode 100644 index 00000000..c80baf83 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_dscp_ecn.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4DscpEcn ***** +type patternFlowIpv4DscpEcn struct { + validation + obj *otg.PatternFlowIpv4DscpEcn + marshaller marshalPatternFlowIpv4DscpEcn + unMarshaller unMarshalPatternFlowIpv4DscpEcn + incrementHolder PatternFlowIpv4DscpEcnCounter + decrementHolder PatternFlowIpv4DscpEcnCounter + metricTagsHolder PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter +} + +func NewPatternFlowIpv4DscpEcn() PatternFlowIpv4DscpEcn { + obj := patternFlowIpv4DscpEcn{obj: &otg.PatternFlowIpv4DscpEcn{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4DscpEcn) msg() *otg.PatternFlowIpv4DscpEcn { + return obj.obj +} + +func (obj *patternFlowIpv4DscpEcn) setMsg(msg *otg.PatternFlowIpv4DscpEcn) PatternFlowIpv4DscpEcn { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4DscpEcn struct { + obj *patternFlowIpv4DscpEcn +} + +type marshalPatternFlowIpv4DscpEcn interface { + // ToProto marshals PatternFlowIpv4DscpEcn to protobuf object *otg.PatternFlowIpv4DscpEcn + ToProto() (*otg.PatternFlowIpv4DscpEcn, error) + // ToPbText marshals PatternFlowIpv4DscpEcn to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4DscpEcn to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4DscpEcn to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4DscpEcn struct { + obj *patternFlowIpv4DscpEcn +} + +type unMarshalPatternFlowIpv4DscpEcn interface { + // FromProto unmarshals PatternFlowIpv4DscpEcn from protobuf object *otg.PatternFlowIpv4DscpEcn + FromProto(msg *otg.PatternFlowIpv4DscpEcn) (PatternFlowIpv4DscpEcn, error) + // FromPbText unmarshals PatternFlowIpv4DscpEcn from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4DscpEcn from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4DscpEcn from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4DscpEcn) Marshal() marshalPatternFlowIpv4DscpEcn { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4DscpEcn{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4DscpEcn) Unmarshal() unMarshalPatternFlowIpv4DscpEcn { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4DscpEcn{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4DscpEcn) ToProto() (*otg.PatternFlowIpv4DscpEcn, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4DscpEcn) FromProto(msg *otg.PatternFlowIpv4DscpEcn) (PatternFlowIpv4DscpEcn, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4DscpEcn) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4DscpEcn) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4DscpEcn) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DscpEcn) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4DscpEcn) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DscpEcn) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4DscpEcn) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DscpEcn) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DscpEcn) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4DscpEcn) Clone() (PatternFlowIpv4DscpEcn, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4DscpEcn() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4DscpEcn) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4DscpEcn is explicit congestion notification +type PatternFlowIpv4DscpEcn interface { + Validation + // msg marshals PatternFlowIpv4DscpEcn to protobuf object *otg.PatternFlowIpv4DscpEcn + // and doesn't set defaults + msg() *otg.PatternFlowIpv4DscpEcn + // setMsg unmarshals PatternFlowIpv4DscpEcn from protobuf object *otg.PatternFlowIpv4DscpEcn + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4DscpEcn) PatternFlowIpv4DscpEcn + // provides marshal interface + Marshal() marshalPatternFlowIpv4DscpEcn + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4DscpEcn + // validate validates PatternFlowIpv4DscpEcn + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4DscpEcn, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4DscpEcnChoiceEnum, set in PatternFlowIpv4DscpEcn + Choice() PatternFlowIpv4DscpEcnChoiceEnum + // setChoice assigns PatternFlowIpv4DscpEcnChoiceEnum provided by user to PatternFlowIpv4DscpEcn + setChoice(value PatternFlowIpv4DscpEcnChoiceEnum) PatternFlowIpv4DscpEcn + // HasChoice checks if Choice has been set in PatternFlowIpv4DscpEcn + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4DscpEcn. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4DscpEcn + SetValue(value uint32) PatternFlowIpv4DscpEcn + // HasValue checks if Value has been set in PatternFlowIpv4DscpEcn + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4DscpEcn. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4DscpEcn + SetValues(value []uint32) PatternFlowIpv4DscpEcn + // Increment returns PatternFlowIpv4DscpEcnCounter, set in PatternFlowIpv4DscpEcn. + // PatternFlowIpv4DscpEcnCounter is integer counter pattern + Increment() PatternFlowIpv4DscpEcnCounter + // SetIncrement assigns PatternFlowIpv4DscpEcnCounter provided by user to PatternFlowIpv4DscpEcn. + // PatternFlowIpv4DscpEcnCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4DscpEcnCounter) PatternFlowIpv4DscpEcn + // HasIncrement checks if Increment has been set in PatternFlowIpv4DscpEcn + HasIncrement() bool + // Decrement returns PatternFlowIpv4DscpEcnCounter, set in PatternFlowIpv4DscpEcn. + // PatternFlowIpv4DscpEcnCounter is integer counter pattern + Decrement() PatternFlowIpv4DscpEcnCounter + // SetDecrement assigns PatternFlowIpv4DscpEcnCounter provided by user to PatternFlowIpv4DscpEcn. + // PatternFlowIpv4DscpEcnCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4DscpEcnCounter) PatternFlowIpv4DscpEcn + // HasDecrement checks if Decrement has been set in PatternFlowIpv4DscpEcn + HasDecrement() bool + // MetricTags returns PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIterIter, set in PatternFlowIpv4DscpEcn + MetricTags() PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter + setNil() +} + +type PatternFlowIpv4DscpEcnChoiceEnum string + +// Enum of Choice on PatternFlowIpv4DscpEcn +var PatternFlowIpv4DscpEcnChoice = struct { + VALUE PatternFlowIpv4DscpEcnChoiceEnum + VALUES PatternFlowIpv4DscpEcnChoiceEnum + INCREMENT PatternFlowIpv4DscpEcnChoiceEnum + DECREMENT PatternFlowIpv4DscpEcnChoiceEnum +}{ + VALUE: PatternFlowIpv4DscpEcnChoiceEnum("value"), + VALUES: PatternFlowIpv4DscpEcnChoiceEnum("values"), + INCREMENT: PatternFlowIpv4DscpEcnChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4DscpEcnChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4DscpEcn) Choice() PatternFlowIpv4DscpEcnChoiceEnum { + return PatternFlowIpv4DscpEcnChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4DscpEcn) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4DscpEcn) setChoice(value PatternFlowIpv4DscpEcnChoiceEnum) PatternFlowIpv4DscpEcn { + intValue, ok := otg.PatternFlowIpv4DscpEcn_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4DscpEcnChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4DscpEcn_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4DscpEcnChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4DscpEcnChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4DscpEcnChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4DscpEcnCounter().msg() + } + + if value == PatternFlowIpv4DscpEcnChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4DscpEcnCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4DscpEcn) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4DscpEcnChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4DscpEcn) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4DscpEcn object +func (obj *patternFlowIpv4DscpEcn) SetValue(value uint32) PatternFlowIpv4DscpEcn { + obj.setChoice(PatternFlowIpv4DscpEcnChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4DscpEcn) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4DscpEcn object +func (obj *patternFlowIpv4DscpEcn) SetValues(value []uint32) PatternFlowIpv4DscpEcn { + obj.setChoice(PatternFlowIpv4DscpEcnChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4DscpEcnCounter +func (obj *patternFlowIpv4DscpEcn) Increment() PatternFlowIpv4DscpEcnCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4DscpEcnChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4DscpEcnCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4DscpEcnCounter +func (obj *patternFlowIpv4DscpEcn) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4DscpEcnCounter value in the PatternFlowIpv4DscpEcn object +func (obj *patternFlowIpv4DscpEcn) SetIncrement(value PatternFlowIpv4DscpEcnCounter) PatternFlowIpv4DscpEcn { + obj.setChoice(PatternFlowIpv4DscpEcnChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4DscpEcnCounter +func (obj *patternFlowIpv4DscpEcn) Decrement() PatternFlowIpv4DscpEcnCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4DscpEcnChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4DscpEcnCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4DscpEcnCounter +func (obj *patternFlowIpv4DscpEcn) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4DscpEcnCounter value in the PatternFlowIpv4DscpEcn object +func (obj *patternFlowIpv4DscpEcn) SetDecrement(value PatternFlowIpv4DscpEcnCounter) PatternFlowIpv4DscpEcn { + obj.setChoice(PatternFlowIpv4DscpEcnChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4DscpEcnMetricTag +func (obj *patternFlowIpv4DscpEcn) MetricTags() PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4DscpEcnMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter struct { + obj *patternFlowIpv4DscpEcn + patternFlowIpv4DscpEcnMetricTagSlice []PatternFlowIpv4DscpEcnMetricTag + fieldPtr *[]*otg.PatternFlowIpv4DscpEcnMetricTag +} + +func newPatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter(ptr *[]*otg.PatternFlowIpv4DscpEcnMetricTag) PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter { + return &patternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter interface { + setMsg(*patternFlowIpv4DscpEcn) PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter + Items() []PatternFlowIpv4DscpEcnMetricTag + Add() PatternFlowIpv4DscpEcnMetricTag + Append(items ...PatternFlowIpv4DscpEcnMetricTag) PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter + Set(index int, newObj PatternFlowIpv4DscpEcnMetricTag) PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter + Clear() PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter + clearHolderSlice() PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter + appendHolderSlice(item PatternFlowIpv4DscpEcnMetricTag) PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter +} + +func (obj *patternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter) setMsg(msg *patternFlowIpv4DscpEcn) PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4DscpEcnMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter) Items() []PatternFlowIpv4DscpEcnMetricTag { + return obj.patternFlowIpv4DscpEcnMetricTagSlice +} + +func (obj *patternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter) Add() PatternFlowIpv4DscpEcnMetricTag { + newObj := &otg.PatternFlowIpv4DscpEcnMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4DscpEcnMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4DscpEcnMetricTagSlice = append(obj.patternFlowIpv4DscpEcnMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter) Append(items ...PatternFlowIpv4DscpEcnMetricTag) PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4DscpEcnMetricTagSlice = append(obj.patternFlowIpv4DscpEcnMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter) Set(index int, newObj PatternFlowIpv4DscpEcnMetricTag) PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4DscpEcnMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter) Clear() PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4DscpEcnMetricTag{} + obj.patternFlowIpv4DscpEcnMetricTagSlice = []PatternFlowIpv4DscpEcnMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter) clearHolderSlice() PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter { + if len(obj.patternFlowIpv4DscpEcnMetricTagSlice) > 0 { + obj.patternFlowIpv4DscpEcnMetricTagSlice = []PatternFlowIpv4DscpEcnMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter) appendHolderSlice(item PatternFlowIpv4DscpEcnMetricTag) PatternFlowIpv4DscpEcnPatternFlowIpv4DscpEcnMetricTagIter { + obj.patternFlowIpv4DscpEcnMetricTagSlice = append(obj.patternFlowIpv4DscpEcnMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4DscpEcn) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DscpEcn.Value <= 3 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4DscpEcn.Values <= 3 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4DscpEcnMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4DscpEcn) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4DscpEcnChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4DscpEcnChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4DscpEcnChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4DscpEcnChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4DscpEcnChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4DscpEcnChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4DscpEcn") + } + } else { + intVal := otg.PatternFlowIpv4DscpEcn_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4DscpEcn_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_dscp_ecn_counter.go b/gosnappi/pattern_flow_ipv4_dscp_ecn_counter.go new file mode 100644 index 00000000..6868753a --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_dscp_ecn_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4DscpEcnCounter ***** +type patternFlowIpv4DscpEcnCounter struct { + validation + obj *otg.PatternFlowIpv4DscpEcnCounter + marshaller marshalPatternFlowIpv4DscpEcnCounter + unMarshaller unMarshalPatternFlowIpv4DscpEcnCounter +} + +func NewPatternFlowIpv4DscpEcnCounter() PatternFlowIpv4DscpEcnCounter { + obj := patternFlowIpv4DscpEcnCounter{obj: &otg.PatternFlowIpv4DscpEcnCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4DscpEcnCounter) msg() *otg.PatternFlowIpv4DscpEcnCounter { + return obj.obj +} + +func (obj *patternFlowIpv4DscpEcnCounter) setMsg(msg *otg.PatternFlowIpv4DscpEcnCounter) PatternFlowIpv4DscpEcnCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4DscpEcnCounter struct { + obj *patternFlowIpv4DscpEcnCounter +} + +type marshalPatternFlowIpv4DscpEcnCounter interface { + // ToProto marshals PatternFlowIpv4DscpEcnCounter to protobuf object *otg.PatternFlowIpv4DscpEcnCounter + ToProto() (*otg.PatternFlowIpv4DscpEcnCounter, error) + // ToPbText marshals PatternFlowIpv4DscpEcnCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4DscpEcnCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4DscpEcnCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4DscpEcnCounter struct { + obj *patternFlowIpv4DscpEcnCounter +} + +type unMarshalPatternFlowIpv4DscpEcnCounter interface { + // FromProto unmarshals PatternFlowIpv4DscpEcnCounter from protobuf object *otg.PatternFlowIpv4DscpEcnCounter + FromProto(msg *otg.PatternFlowIpv4DscpEcnCounter) (PatternFlowIpv4DscpEcnCounter, error) + // FromPbText unmarshals PatternFlowIpv4DscpEcnCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4DscpEcnCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4DscpEcnCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4DscpEcnCounter) Marshal() marshalPatternFlowIpv4DscpEcnCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4DscpEcnCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4DscpEcnCounter) Unmarshal() unMarshalPatternFlowIpv4DscpEcnCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4DscpEcnCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4DscpEcnCounter) ToProto() (*otg.PatternFlowIpv4DscpEcnCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4DscpEcnCounter) FromProto(msg *otg.PatternFlowIpv4DscpEcnCounter) (PatternFlowIpv4DscpEcnCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4DscpEcnCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4DscpEcnCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4DscpEcnCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DscpEcnCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4DscpEcnCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DscpEcnCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4DscpEcnCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DscpEcnCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DscpEcnCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4DscpEcnCounter) Clone() (PatternFlowIpv4DscpEcnCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4DscpEcnCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4DscpEcnCounter is integer counter pattern +type PatternFlowIpv4DscpEcnCounter interface { + Validation + // msg marshals PatternFlowIpv4DscpEcnCounter to protobuf object *otg.PatternFlowIpv4DscpEcnCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4DscpEcnCounter + // setMsg unmarshals PatternFlowIpv4DscpEcnCounter from protobuf object *otg.PatternFlowIpv4DscpEcnCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4DscpEcnCounter) PatternFlowIpv4DscpEcnCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4DscpEcnCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4DscpEcnCounter + // validate validates PatternFlowIpv4DscpEcnCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4DscpEcnCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4DscpEcnCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4DscpEcnCounter + SetStart(value uint32) PatternFlowIpv4DscpEcnCounter + // HasStart checks if Start has been set in PatternFlowIpv4DscpEcnCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4DscpEcnCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4DscpEcnCounter + SetStep(value uint32) PatternFlowIpv4DscpEcnCounter + // HasStep checks if Step has been set in PatternFlowIpv4DscpEcnCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4DscpEcnCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4DscpEcnCounter + SetCount(value uint32) PatternFlowIpv4DscpEcnCounter + // HasCount checks if Count has been set in PatternFlowIpv4DscpEcnCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4DscpEcnCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4DscpEcnCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4DscpEcnCounter object +func (obj *patternFlowIpv4DscpEcnCounter) SetStart(value uint32) PatternFlowIpv4DscpEcnCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4DscpEcnCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4DscpEcnCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4DscpEcnCounter object +func (obj *patternFlowIpv4DscpEcnCounter) SetStep(value uint32) PatternFlowIpv4DscpEcnCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4DscpEcnCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4DscpEcnCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4DscpEcnCounter object +func (obj *patternFlowIpv4DscpEcnCounter) SetCount(value uint32) PatternFlowIpv4DscpEcnCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4DscpEcnCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DscpEcnCounter.Start <= 3 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DscpEcnCounter.Step <= 3 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DscpEcnCounter.Count <= 3 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4DscpEcnCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_dscp_ecn_metric_tag.go b/gosnappi/pattern_flow_ipv4_dscp_ecn_metric_tag.go new file mode 100644 index 00000000..39faca66 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_dscp_ecn_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4DscpEcnMetricTag ***** +type patternFlowIpv4DscpEcnMetricTag struct { + validation + obj *otg.PatternFlowIpv4DscpEcnMetricTag + marshaller marshalPatternFlowIpv4DscpEcnMetricTag + unMarshaller unMarshalPatternFlowIpv4DscpEcnMetricTag +} + +func NewPatternFlowIpv4DscpEcnMetricTag() PatternFlowIpv4DscpEcnMetricTag { + obj := patternFlowIpv4DscpEcnMetricTag{obj: &otg.PatternFlowIpv4DscpEcnMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4DscpEcnMetricTag) msg() *otg.PatternFlowIpv4DscpEcnMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4DscpEcnMetricTag) setMsg(msg *otg.PatternFlowIpv4DscpEcnMetricTag) PatternFlowIpv4DscpEcnMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4DscpEcnMetricTag struct { + obj *patternFlowIpv4DscpEcnMetricTag +} + +type marshalPatternFlowIpv4DscpEcnMetricTag interface { + // ToProto marshals PatternFlowIpv4DscpEcnMetricTag to protobuf object *otg.PatternFlowIpv4DscpEcnMetricTag + ToProto() (*otg.PatternFlowIpv4DscpEcnMetricTag, error) + // ToPbText marshals PatternFlowIpv4DscpEcnMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4DscpEcnMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4DscpEcnMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4DscpEcnMetricTag struct { + obj *patternFlowIpv4DscpEcnMetricTag +} + +type unMarshalPatternFlowIpv4DscpEcnMetricTag interface { + // FromProto unmarshals PatternFlowIpv4DscpEcnMetricTag from protobuf object *otg.PatternFlowIpv4DscpEcnMetricTag + FromProto(msg *otg.PatternFlowIpv4DscpEcnMetricTag) (PatternFlowIpv4DscpEcnMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4DscpEcnMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4DscpEcnMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4DscpEcnMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4DscpEcnMetricTag) Marshal() marshalPatternFlowIpv4DscpEcnMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4DscpEcnMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4DscpEcnMetricTag) Unmarshal() unMarshalPatternFlowIpv4DscpEcnMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4DscpEcnMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4DscpEcnMetricTag) ToProto() (*otg.PatternFlowIpv4DscpEcnMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4DscpEcnMetricTag) FromProto(msg *otg.PatternFlowIpv4DscpEcnMetricTag) (PatternFlowIpv4DscpEcnMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4DscpEcnMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4DscpEcnMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4DscpEcnMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DscpEcnMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4DscpEcnMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DscpEcnMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4DscpEcnMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DscpEcnMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DscpEcnMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4DscpEcnMetricTag) Clone() (PatternFlowIpv4DscpEcnMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4DscpEcnMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4DscpEcnMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4DscpEcnMetricTag interface { + Validation + // msg marshals PatternFlowIpv4DscpEcnMetricTag to protobuf object *otg.PatternFlowIpv4DscpEcnMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4DscpEcnMetricTag + // setMsg unmarshals PatternFlowIpv4DscpEcnMetricTag from protobuf object *otg.PatternFlowIpv4DscpEcnMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4DscpEcnMetricTag) PatternFlowIpv4DscpEcnMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4DscpEcnMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4DscpEcnMetricTag + // validate validates PatternFlowIpv4DscpEcnMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4DscpEcnMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4DscpEcnMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4DscpEcnMetricTag + SetName(value string) PatternFlowIpv4DscpEcnMetricTag + // Offset returns uint32, set in PatternFlowIpv4DscpEcnMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4DscpEcnMetricTag + SetOffset(value uint32) PatternFlowIpv4DscpEcnMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4DscpEcnMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4DscpEcnMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4DscpEcnMetricTag + SetLength(value uint32) PatternFlowIpv4DscpEcnMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4DscpEcnMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4DscpEcnMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4DscpEcnMetricTag object +func (obj *patternFlowIpv4DscpEcnMetricTag) SetName(value string) PatternFlowIpv4DscpEcnMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4DscpEcnMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4DscpEcnMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4DscpEcnMetricTag object +func (obj *patternFlowIpv4DscpEcnMetricTag) SetOffset(value uint32) PatternFlowIpv4DscpEcnMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4DscpEcnMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4DscpEcnMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4DscpEcnMetricTag object +func (obj *patternFlowIpv4DscpEcnMetricTag) SetLength(value uint32) PatternFlowIpv4DscpEcnMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4DscpEcnMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4DscpEcnMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DscpEcnMetricTag.Offset <= 1 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 2 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4DscpEcnMetricTag.Length <= 2 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4DscpEcnMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(2) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_dscp_phb.go b/gosnappi/pattern_flow_ipv4_dscp_phb.go new file mode 100644 index 00000000..940d2281 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_dscp_phb.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4DscpPhb ***** +type patternFlowIpv4DscpPhb struct { + validation + obj *otg.PatternFlowIpv4DscpPhb + marshaller marshalPatternFlowIpv4DscpPhb + unMarshaller unMarshalPatternFlowIpv4DscpPhb + incrementHolder PatternFlowIpv4DscpPhbCounter + decrementHolder PatternFlowIpv4DscpPhbCounter + metricTagsHolder PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter +} + +func NewPatternFlowIpv4DscpPhb() PatternFlowIpv4DscpPhb { + obj := patternFlowIpv4DscpPhb{obj: &otg.PatternFlowIpv4DscpPhb{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4DscpPhb) msg() *otg.PatternFlowIpv4DscpPhb { + return obj.obj +} + +func (obj *patternFlowIpv4DscpPhb) setMsg(msg *otg.PatternFlowIpv4DscpPhb) PatternFlowIpv4DscpPhb { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4DscpPhb struct { + obj *patternFlowIpv4DscpPhb +} + +type marshalPatternFlowIpv4DscpPhb interface { + // ToProto marshals PatternFlowIpv4DscpPhb to protobuf object *otg.PatternFlowIpv4DscpPhb + ToProto() (*otg.PatternFlowIpv4DscpPhb, error) + // ToPbText marshals PatternFlowIpv4DscpPhb to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4DscpPhb to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4DscpPhb to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4DscpPhb struct { + obj *patternFlowIpv4DscpPhb +} + +type unMarshalPatternFlowIpv4DscpPhb interface { + // FromProto unmarshals PatternFlowIpv4DscpPhb from protobuf object *otg.PatternFlowIpv4DscpPhb + FromProto(msg *otg.PatternFlowIpv4DscpPhb) (PatternFlowIpv4DscpPhb, error) + // FromPbText unmarshals PatternFlowIpv4DscpPhb from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4DscpPhb from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4DscpPhb from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4DscpPhb) Marshal() marshalPatternFlowIpv4DscpPhb { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4DscpPhb{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4DscpPhb) Unmarshal() unMarshalPatternFlowIpv4DscpPhb { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4DscpPhb{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4DscpPhb) ToProto() (*otg.PatternFlowIpv4DscpPhb, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4DscpPhb) FromProto(msg *otg.PatternFlowIpv4DscpPhb) (PatternFlowIpv4DscpPhb, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4DscpPhb) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4DscpPhb) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4DscpPhb) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DscpPhb) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4DscpPhb) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DscpPhb) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4DscpPhb) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DscpPhb) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DscpPhb) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4DscpPhb) Clone() (PatternFlowIpv4DscpPhb, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4DscpPhb() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4DscpPhb) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4DscpPhb is per hop behavior +type PatternFlowIpv4DscpPhb interface { + Validation + // msg marshals PatternFlowIpv4DscpPhb to protobuf object *otg.PatternFlowIpv4DscpPhb + // and doesn't set defaults + msg() *otg.PatternFlowIpv4DscpPhb + // setMsg unmarshals PatternFlowIpv4DscpPhb from protobuf object *otg.PatternFlowIpv4DscpPhb + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4DscpPhb) PatternFlowIpv4DscpPhb + // provides marshal interface + Marshal() marshalPatternFlowIpv4DscpPhb + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4DscpPhb + // validate validates PatternFlowIpv4DscpPhb + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4DscpPhb, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4DscpPhbChoiceEnum, set in PatternFlowIpv4DscpPhb + Choice() PatternFlowIpv4DscpPhbChoiceEnum + // setChoice assigns PatternFlowIpv4DscpPhbChoiceEnum provided by user to PatternFlowIpv4DscpPhb + setChoice(value PatternFlowIpv4DscpPhbChoiceEnum) PatternFlowIpv4DscpPhb + // HasChoice checks if Choice has been set in PatternFlowIpv4DscpPhb + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4DscpPhb. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4DscpPhb + SetValue(value uint32) PatternFlowIpv4DscpPhb + // HasValue checks if Value has been set in PatternFlowIpv4DscpPhb + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4DscpPhb. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4DscpPhb + SetValues(value []uint32) PatternFlowIpv4DscpPhb + // Increment returns PatternFlowIpv4DscpPhbCounter, set in PatternFlowIpv4DscpPhb. + // PatternFlowIpv4DscpPhbCounter is integer counter pattern + Increment() PatternFlowIpv4DscpPhbCounter + // SetIncrement assigns PatternFlowIpv4DscpPhbCounter provided by user to PatternFlowIpv4DscpPhb. + // PatternFlowIpv4DscpPhbCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4DscpPhbCounter) PatternFlowIpv4DscpPhb + // HasIncrement checks if Increment has been set in PatternFlowIpv4DscpPhb + HasIncrement() bool + // Decrement returns PatternFlowIpv4DscpPhbCounter, set in PatternFlowIpv4DscpPhb. + // PatternFlowIpv4DscpPhbCounter is integer counter pattern + Decrement() PatternFlowIpv4DscpPhbCounter + // SetDecrement assigns PatternFlowIpv4DscpPhbCounter provided by user to PatternFlowIpv4DscpPhb. + // PatternFlowIpv4DscpPhbCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4DscpPhbCounter) PatternFlowIpv4DscpPhb + // HasDecrement checks if Decrement has been set in PatternFlowIpv4DscpPhb + HasDecrement() bool + // MetricTags returns PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIterIter, set in PatternFlowIpv4DscpPhb + MetricTags() PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter + setNil() +} + +type PatternFlowIpv4DscpPhbChoiceEnum string + +// Enum of Choice on PatternFlowIpv4DscpPhb +var PatternFlowIpv4DscpPhbChoice = struct { + VALUE PatternFlowIpv4DscpPhbChoiceEnum + VALUES PatternFlowIpv4DscpPhbChoiceEnum + INCREMENT PatternFlowIpv4DscpPhbChoiceEnum + DECREMENT PatternFlowIpv4DscpPhbChoiceEnum +}{ + VALUE: PatternFlowIpv4DscpPhbChoiceEnum("value"), + VALUES: PatternFlowIpv4DscpPhbChoiceEnum("values"), + INCREMENT: PatternFlowIpv4DscpPhbChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4DscpPhbChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4DscpPhb) Choice() PatternFlowIpv4DscpPhbChoiceEnum { + return PatternFlowIpv4DscpPhbChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4DscpPhb) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4DscpPhb) setChoice(value PatternFlowIpv4DscpPhbChoiceEnum) PatternFlowIpv4DscpPhb { + intValue, ok := otg.PatternFlowIpv4DscpPhb_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4DscpPhbChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4DscpPhb_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4DscpPhbChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4DscpPhbChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4DscpPhbChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4DscpPhbCounter().msg() + } + + if value == PatternFlowIpv4DscpPhbChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4DscpPhbCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4DscpPhb) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4DscpPhbChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4DscpPhb) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4DscpPhb object +func (obj *patternFlowIpv4DscpPhb) SetValue(value uint32) PatternFlowIpv4DscpPhb { + obj.setChoice(PatternFlowIpv4DscpPhbChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4DscpPhb) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4DscpPhb object +func (obj *patternFlowIpv4DscpPhb) SetValues(value []uint32) PatternFlowIpv4DscpPhb { + obj.setChoice(PatternFlowIpv4DscpPhbChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4DscpPhbCounter +func (obj *patternFlowIpv4DscpPhb) Increment() PatternFlowIpv4DscpPhbCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4DscpPhbChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4DscpPhbCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4DscpPhbCounter +func (obj *patternFlowIpv4DscpPhb) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4DscpPhbCounter value in the PatternFlowIpv4DscpPhb object +func (obj *patternFlowIpv4DscpPhb) SetIncrement(value PatternFlowIpv4DscpPhbCounter) PatternFlowIpv4DscpPhb { + obj.setChoice(PatternFlowIpv4DscpPhbChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4DscpPhbCounter +func (obj *patternFlowIpv4DscpPhb) Decrement() PatternFlowIpv4DscpPhbCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4DscpPhbChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4DscpPhbCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4DscpPhbCounter +func (obj *patternFlowIpv4DscpPhb) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4DscpPhbCounter value in the PatternFlowIpv4DscpPhb object +func (obj *patternFlowIpv4DscpPhb) SetDecrement(value PatternFlowIpv4DscpPhbCounter) PatternFlowIpv4DscpPhb { + obj.setChoice(PatternFlowIpv4DscpPhbChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4DscpPhbMetricTag +func (obj *patternFlowIpv4DscpPhb) MetricTags() PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4DscpPhbMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter struct { + obj *patternFlowIpv4DscpPhb + patternFlowIpv4DscpPhbMetricTagSlice []PatternFlowIpv4DscpPhbMetricTag + fieldPtr *[]*otg.PatternFlowIpv4DscpPhbMetricTag +} + +func newPatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter(ptr *[]*otg.PatternFlowIpv4DscpPhbMetricTag) PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter { + return &patternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter interface { + setMsg(*patternFlowIpv4DscpPhb) PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter + Items() []PatternFlowIpv4DscpPhbMetricTag + Add() PatternFlowIpv4DscpPhbMetricTag + Append(items ...PatternFlowIpv4DscpPhbMetricTag) PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter + Set(index int, newObj PatternFlowIpv4DscpPhbMetricTag) PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter + Clear() PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter + clearHolderSlice() PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter + appendHolderSlice(item PatternFlowIpv4DscpPhbMetricTag) PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter +} + +func (obj *patternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter) setMsg(msg *patternFlowIpv4DscpPhb) PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4DscpPhbMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter) Items() []PatternFlowIpv4DscpPhbMetricTag { + return obj.patternFlowIpv4DscpPhbMetricTagSlice +} + +func (obj *patternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter) Add() PatternFlowIpv4DscpPhbMetricTag { + newObj := &otg.PatternFlowIpv4DscpPhbMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4DscpPhbMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4DscpPhbMetricTagSlice = append(obj.patternFlowIpv4DscpPhbMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter) Append(items ...PatternFlowIpv4DscpPhbMetricTag) PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4DscpPhbMetricTagSlice = append(obj.patternFlowIpv4DscpPhbMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter) Set(index int, newObj PatternFlowIpv4DscpPhbMetricTag) PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4DscpPhbMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter) Clear() PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4DscpPhbMetricTag{} + obj.patternFlowIpv4DscpPhbMetricTagSlice = []PatternFlowIpv4DscpPhbMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter) clearHolderSlice() PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter { + if len(obj.patternFlowIpv4DscpPhbMetricTagSlice) > 0 { + obj.patternFlowIpv4DscpPhbMetricTagSlice = []PatternFlowIpv4DscpPhbMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter) appendHolderSlice(item PatternFlowIpv4DscpPhbMetricTag) PatternFlowIpv4DscpPhbPatternFlowIpv4DscpPhbMetricTagIter { + obj.patternFlowIpv4DscpPhbMetricTagSlice = append(obj.patternFlowIpv4DscpPhbMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4DscpPhb) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 63 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DscpPhb.Value <= 63 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 63 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4DscpPhb.Values <= 63 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4DscpPhbMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4DscpPhb) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4DscpPhbChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4DscpPhbChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4DscpPhbChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4DscpPhbChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4DscpPhbChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4DscpPhbChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4DscpPhb") + } + } else { + intVal := otg.PatternFlowIpv4DscpPhb_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4DscpPhb_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_dscp_phb_counter.go b/gosnappi/pattern_flow_ipv4_dscp_phb_counter.go new file mode 100644 index 00000000..fa870c7f --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_dscp_phb_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4DscpPhbCounter ***** +type patternFlowIpv4DscpPhbCounter struct { + validation + obj *otg.PatternFlowIpv4DscpPhbCounter + marshaller marshalPatternFlowIpv4DscpPhbCounter + unMarshaller unMarshalPatternFlowIpv4DscpPhbCounter +} + +func NewPatternFlowIpv4DscpPhbCounter() PatternFlowIpv4DscpPhbCounter { + obj := patternFlowIpv4DscpPhbCounter{obj: &otg.PatternFlowIpv4DscpPhbCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4DscpPhbCounter) msg() *otg.PatternFlowIpv4DscpPhbCounter { + return obj.obj +} + +func (obj *patternFlowIpv4DscpPhbCounter) setMsg(msg *otg.PatternFlowIpv4DscpPhbCounter) PatternFlowIpv4DscpPhbCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4DscpPhbCounter struct { + obj *patternFlowIpv4DscpPhbCounter +} + +type marshalPatternFlowIpv4DscpPhbCounter interface { + // ToProto marshals PatternFlowIpv4DscpPhbCounter to protobuf object *otg.PatternFlowIpv4DscpPhbCounter + ToProto() (*otg.PatternFlowIpv4DscpPhbCounter, error) + // ToPbText marshals PatternFlowIpv4DscpPhbCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4DscpPhbCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4DscpPhbCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4DscpPhbCounter struct { + obj *patternFlowIpv4DscpPhbCounter +} + +type unMarshalPatternFlowIpv4DscpPhbCounter interface { + // FromProto unmarshals PatternFlowIpv4DscpPhbCounter from protobuf object *otg.PatternFlowIpv4DscpPhbCounter + FromProto(msg *otg.PatternFlowIpv4DscpPhbCounter) (PatternFlowIpv4DscpPhbCounter, error) + // FromPbText unmarshals PatternFlowIpv4DscpPhbCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4DscpPhbCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4DscpPhbCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4DscpPhbCounter) Marshal() marshalPatternFlowIpv4DscpPhbCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4DscpPhbCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4DscpPhbCounter) Unmarshal() unMarshalPatternFlowIpv4DscpPhbCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4DscpPhbCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4DscpPhbCounter) ToProto() (*otg.PatternFlowIpv4DscpPhbCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4DscpPhbCounter) FromProto(msg *otg.PatternFlowIpv4DscpPhbCounter) (PatternFlowIpv4DscpPhbCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4DscpPhbCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4DscpPhbCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4DscpPhbCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DscpPhbCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4DscpPhbCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DscpPhbCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4DscpPhbCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DscpPhbCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DscpPhbCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4DscpPhbCounter) Clone() (PatternFlowIpv4DscpPhbCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4DscpPhbCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4DscpPhbCounter is integer counter pattern +type PatternFlowIpv4DscpPhbCounter interface { + Validation + // msg marshals PatternFlowIpv4DscpPhbCounter to protobuf object *otg.PatternFlowIpv4DscpPhbCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4DscpPhbCounter + // setMsg unmarshals PatternFlowIpv4DscpPhbCounter from protobuf object *otg.PatternFlowIpv4DscpPhbCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4DscpPhbCounter) PatternFlowIpv4DscpPhbCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4DscpPhbCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4DscpPhbCounter + // validate validates PatternFlowIpv4DscpPhbCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4DscpPhbCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4DscpPhbCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4DscpPhbCounter + SetStart(value uint32) PatternFlowIpv4DscpPhbCounter + // HasStart checks if Start has been set in PatternFlowIpv4DscpPhbCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4DscpPhbCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4DscpPhbCounter + SetStep(value uint32) PatternFlowIpv4DscpPhbCounter + // HasStep checks if Step has been set in PatternFlowIpv4DscpPhbCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4DscpPhbCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4DscpPhbCounter + SetCount(value uint32) PatternFlowIpv4DscpPhbCounter + // HasCount checks if Count has been set in PatternFlowIpv4DscpPhbCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4DscpPhbCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4DscpPhbCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4DscpPhbCounter object +func (obj *patternFlowIpv4DscpPhbCounter) SetStart(value uint32) PatternFlowIpv4DscpPhbCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4DscpPhbCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4DscpPhbCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4DscpPhbCounter object +func (obj *patternFlowIpv4DscpPhbCounter) SetStep(value uint32) PatternFlowIpv4DscpPhbCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4DscpPhbCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4DscpPhbCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4DscpPhbCounter object +func (obj *patternFlowIpv4DscpPhbCounter) SetCount(value uint32) PatternFlowIpv4DscpPhbCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4DscpPhbCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 63 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DscpPhbCounter.Start <= 63 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 63 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DscpPhbCounter.Step <= 63 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 63 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DscpPhbCounter.Count <= 63 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4DscpPhbCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_dscp_phb_metric_tag.go b/gosnappi/pattern_flow_ipv4_dscp_phb_metric_tag.go new file mode 100644 index 00000000..c1b212e9 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_dscp_phb_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4DscpPhbMetricTag ***** +type patternFlowIpv4DscpPhbMetricTag struct { + validation + obj *otg.PatternFlowIpv4DscpPhbMetricTag + marshaller marshalPatternFlowIpv4DscpPhbMetricTag + unMarshaller unMarshalPatternFlowIpv4DscpPhbMetricTag +} + +func NewPatternFlowIpv4DscpPhbMetricTag() PatternFlowIpv4DscpPhbMetricTag { + obj := patternFlowIpv4DscpPhbMetricTag{obj: &otg.PatternFlowIpv4DscpPhbMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4DscpPhbMetricTag) msg() *otg.PatternFlowIpv4DscpPhbMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4DscpPhbMetricTag) setMsg(msg *otg.PatternFlowIpv4DscpPhbMetricTag) PatternFlowIpv4DscpPhbMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4DscpPhbMetricTag struct { + obj *patternFlowIpv4DscpPhbMetricTag +} + +type marshalPatternFlowIpv4DscpPhbMetricTag interface { + // ToProto marshals PatternFlowIpv4DscpPhbMetricTag to protobuf object *otg.PatternFlowIpv4DscpPhbMetricTag + ToProto() (*otg.PatternFlowIpv4DscpPhbMetricTag, error) + // ToPbText marshals PatternFlowIpv4DscpPhbMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4DscpPhbMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4DscpPhbMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4DscpPhbMetricTag struct { + obj *patternFlowIpv4DscpPhbMetricTag +} + +type unMarshalPatternFlowIpv4DscpPhbMetricTag interface { + // FromProto unmarshals PatternFlowIpv4DscpPhbMetricTag from protobuf object *otg.PatternFlowIpv4DscpPhbMetricTag + FromProto(msg *otg.PatternFlowIpv4DscpPhbMetricTag) (PatternFlowIpv4DscpPhbMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4DscpPhbMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4DscpPhbMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4DscpPhbMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4DscpPhbMetricTag) Marshal() marshalPatternFlowIpv4DscpPhbMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4DscpPhbMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4DscpPhbMetricTag) Unmarshal() unMarshalPatternFlowIpv4DscpPhbMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4DscpPhbMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4DscpPhbMetricTag) ToProto() (*otg.PatternFlowIpv4DscpPhbMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4DscpPhbMetricTag) FromProto(msg *otg.PatternFlowIpv4DscpPhbMetricTag) (PatternFlowIpv4DscpPhbMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4DscpPhbMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4DscpPhbMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4DscpPhbMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DscpPhbMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4DscpPhbMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DscpPhbMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4DscpPhbMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DscpPhbMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DscpPhbMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4DscpPhbMetricTag) Clone() (PatternFlowIpv4DscpPhbMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4DscpPhbMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4DscpPhbMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4DscpPhbMetricTag interface { + Validation + // msg marshals PatternFlowIpv4DscpPhbMetricTag to protobuf object *otg.PatternFlowIpv4DscpPhbMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4DscpPhbMetricTag + // setMsg unmarshals PatternFlowIpv4DscpPhbMetricTag from protobuf object *otg.PatternFlowIpv4DscpPhbMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4DscpPhbMetricTag) PatternFlowIpv4DscpPhbMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4DscpPhbMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4DscpPhbMetricTag + // validate validates PatternFlowIpv4DscpPhbMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4DscpPhbMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4DscpPhbMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4DscpPhbMetricTag + SetName(value string) PatternFlowIpv4DscpPhbMetricTag + // Offset returns uint32, set in PatternFlowIpv4DscpPhbMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4DscpPhbMetricTag + SetOffset(value uint32) PatternFlowIpv4DscpPhbMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4DscpPhbMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4DscpPhbMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4DscpPhbMetricTag + SetLength(value uint32) PatternFlowIpv4DscpPhbMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4DscpPhbMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4DscpPhbMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4DscpPhbMetricTag object +func (obj *patternFlowIpv4DscpPhbMetricTag) SetName(value string) PatternFlowIpv4DscpPhbMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4DscpPhbMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4DscpPhbMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4DscpPhbMetricTag object +func (obj *patternFlowIpv4DscpPhbMetricTag) SetOffset(value uint32) PatternFlowIpv4DscpPhbMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4DscpPhbMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4DscpPhbMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4DscpPhbMetricTag object +func (obj *patternFlowIpv4DscpPhbMetricTag) SetLength(value uint32) PatternFlowIpv4DscpPhbMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4DscpPhbMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4DscpPhbMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 5 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DscpPhbMetricTag.Offset <= 5 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 6 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4DscpPhbMetricTag.Length <= 6 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4DscpPhbMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(6) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_dst.go b/gosnappi/pattern_flow_ipv4_dst.go new file mode 100644 index 00000000..936aecf2 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_dst.go @@ -0,0 +1,757 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4Dst ***** +type patternFlowIpv4Dst struct { + validation + obj *otg.PatternFlowIpv4Dst + marshaller marshalPatternFlowIpv4Dst + unMarshaller unMarshalPatternFlowIpv4Dst + incrementHolder PatternFlowIpv4DstCounter + decrementHolder PatternFlowIpv4DstCounter + metricTagsHolder PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter + autoHolder FlowIpv4Auto + randomHolder PatternFlowIpv4DstRandom +} + +func NewPatternFlowIpv4Dst() PatternFlowIpv4Dst { + obj := patternFlowIpv4Dst{obj: &otg.PatternFlowIpv4Dst{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4Dst) msg() *otg.PatternFlowIpv4Dst { + return obj.obj +} + +func (obj *patternFlowIpv4Dst) setMsg(msg *otg.PatternFlowIpv4Dst) PatternFlowIpv4Dst { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4Dst struct { + obj *patternFlowIpv4Dst +} + +type marshalPatternFlowIpv4Dst interface { + // ToProto marshals PatternFlowIpv4Dst to protobuf object *otg.PatternFlowIpv4Dst + ToProto() (*otg.PatternFlowIpv4Dst, error) + // ToPbText marshals PatternFlowIpv4Dst to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4Dst to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4Dst to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4Dst struct { + obj *patternFlowIpv4Dst +} + +type unMarshalPatternFlowIpv4Dst interface { + // FromProto unmarshals PatternFlowIpv4Dst from protobuf object *otg.PatternFlowIpv4Dst + FromProto(msg *otg.PatternFlowIpv4Dst) (PatternFlowIpv4Dst, error) + // FromPbText unmarshals PatternFlowIpv4Dst from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4Dst from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4Dst from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4Dst) Marshal() marshalPatternFlowIpv4Dst { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4Dst{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4Dst) Unmarshal() unMarshalPatternFlowIpv4Dst { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4Dst{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4Dst) ToProto() (*otg.PatternFlowIpv4Dst, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4Dst) FromProto(msg *otg.PatternFlowIpv4Dst) (PatternFlowIpv4Dst, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4Dst) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4Dst) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4Dst) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4Dst) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4Dst) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4Dst) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4Dst) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4Dst) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4Dst) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4Dst) Clone() (PatternFlowIpv4Dst, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4Dst() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4Dst) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.autoHolder = nil + obj.randomHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4Dst is destination address +type PatternFlowIpv4Dst interface { + Validation + // msg marshals PatternFlowIpv4Dst to protobuf object *otg.PatternFlowIpv4Dst + // and doesn't set defaults + msg() *otg.PatternFlowIpv4Dst + // setMsg unmarshals PatternFlowIpv4Dst from protobuf object *otg.PatternFlowIpv4Dst + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4Dst) PatternFlowIpv4Dst + // provides marshal interface + Marshal() marshalPatternFlowIpv4Dst + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4Dst + // validate validates PatternFlowIpv4Dst + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4Dst, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4DstChoiceEnum, set in PatternFlowIpv4Dst + Choice() PatternFlowIpv4DstChoiceEnum + // setChoice assigns PatternFlowIpv4DstChoiceEnum provided by user to PatternFlowIpv4Dst + setChoice(value PatternFlowIpv4DstChoiceEnum) PatternFlowIpv4Dst + // HasChoice checks if Choice has been set in PatternFlowIpv4Dst + HasChoice() bool + // Value returns string, set in PatternFlowIpv4Dst. + Value() string + // SetValue assigns string provided by user to PatternFlowIpv4Dst + SetValue(value string) PatternFlowIpv4Dst + // HasValue checks if Value has been set in PatternFlowIpv4Dst + HasValue() bool + // Values returns []string, set in PatternFlowIpv4Dst. + Values() []string + // SetValues assigns []string provided by user to PatternFlowIpv4Dst + SetValues(value []string) PatternFlowIpv4Dst + // Increment returns PatternFlowIpv4DstCounter, set in PatternFlowIpv4Dst. + // PatternFlowIpv4DstCounter is ipv4 counter pattern + Increment() PatternFlowIpv4DstCounter + // SetIncrement assigns PatternFlowIpv4DstCounter provided by user to PatternFlowIpv4Dst. + // PatternFlowIpv4DstCounter is ipv4 counter pattern + SetIncrement(value PatternFlowIpv4DstCounter) PatternFlowIpv4Dst + // HasIncrement checks if Increment has been set in PatternFlowIpv4Dst + HasIncrement() bool + // Decrement returns PatternFlowIpv4DstCounter, set in PatternFlowIpv4Dst. + // PatternFlowIpv4DstCounter is ipv4 counter pattern + Decrement() PatternFlowIpv4DstCounter + // SetDecrement assigns PatternFlowIpv4DstCounter provided by user to PatternFlowIpv4Dst. + // PatternFlowIpv4DstCounter is ipv4 counter pattern + SetDecrement(value PatternFlowIpv4DstCounter) PatternFlowIpv4Dst + // HasDecrement checks if Decrement has been set in PatternFlowIpv4Dst + HasDecrement() bool + // MetricTags returns PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIterIter, set in PatternFlowIpv4Dst + MetricTags() PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter + // Auto returns FlowIpv4Auto, set in PatternFlowIpv4Dst. + // FlowIpv4Auto is the OTG implementation can provide a system generated, value for this property. + Auto() FlowIpv4Auto + // HasAuto checks if Auto has been set in PatternFlowIpv4Dst + HasAuto() bool + // Random returns PatternFlowIpv4DstRandom, set in PatternFlowIpv4Dst. + // PatternFlowIpv4DstRandom is ipv4 random pattern + Random() PatternFlowIpv4DstRandom + // SetRandom assigns PatternFlowIpv4DstRandom provided by user to PatternFlowIpv4Dst. + // PatternFlowIpv4DstRandom is ipv4 random pattern + SetRandom(value PatternFlowIpv4DstRandom) PatternFlowIpv4Dst + // HasRandom checks if Random has been set in PatternFlowIpv4Dst + HasRandom() bool + setNil() +} + +type PatternFlowIpv4DstChoiceEnum string + +// Enum of Choice on PatternFlowIpv4Dst +var PatternFlowIpv4DstChoice = struct { + VALUE PatternFlowIpv4DstChoiceEnum + VALUES PatternFlowIpv4DstChoiceEnum + INCREMENT PatternFlowIpv4DstChoiceEnum + DECREMENT PatternFlowIpv4DstChoiceEnum + AUTO PatternFlowIpv4DstChoiceEnum + RANDOM PatternFlowIpv4DstChoiceEnum +}{ + VALUE: PatternFlowIpv4DstChoiceEnum("value"), + VALUES: PatternFlowIpv4DstChoiceEnum("values"), + INCREMENT: PatternFlowIpv4DstChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4DstChoiceEnum("decrement"), + AUTO: PatternFlowIpv4DstChoiceEnum("auto"), + RANDOM: PatternFlowIpv4DstChoiceEnum("random"), +} + +func (obj *patternFlowIpv4Dst) Choice() PatternFlowIpv4DstChoiceEnum { + return PatternFlowIpv4DstChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4Dst) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4Dst) setChoice(value PatternFlowIpv4DstChoiceEnum) PatternFlowIpv4Dst { + intValue, ok := otg.PatternFlowIpv4Dst_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4DstChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4Dst_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Random = nil + obj.randomHolder = nil + obj.obj.Auto = nil + obj.autoHolder = nil + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4DstChoice.VALUE { + defaultValue := "0.0.0.0" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4DstChoice.VALUES { + defaultValue := []string{"0.0.0.0"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4DstChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4DstCounter().msg() + } + + if value == PatternFlowIpv4DstChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4DstCounter().msg() + } + + if value == PatternFlowIpv4DstChoice.AUTO { + obj.obj.Auto = NewFlowIpv4Auto().msg() + } + + if value == PatternFlowIpv4DstChoice.RANDOM { + obj.obj.Random = NewPatternFlowIpv4DstRandom().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowIpv4Dst) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4DstChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowIpv4Dst) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowIpv4Dst object +func (obj *patternFlowIpv4Dst) SetValue(value string) PatternFlowIpv4Dst { + obj.setChoice(PatternFlowIpv4DstChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowIpv4Dst) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"0.0.0.0"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowIpv4Dst object +func (obj *patternFlowIpv4Dst) SetValues(value []string) PatternFlowIpv4Dst { + obj.setChoice(PatternFlowIpv4DstChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4DstCounter +func (obj *patternFlowIpv4Dst) Increment() PatternFlowIpv4DstCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4DstChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4DstCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4DstCounter +func (obj *patternFlowIpv4Dst) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4DstCounter value in the PatternFlowIpv4Dst object +func (obj *patternFlowIpv4Dst) SetIncrement(value PatternFlowIpv4DstCounter) PatternFlowIpv4Dst { + obj.setChoice(PatternFlowIpv4DstChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4DstCounter +func (obj *patternFlowIpv4Dst) Decrement() PatternFlowIpv4DstCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4DstChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4DstCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4DstCounter +func (obj *patternFlowIpv4Dst) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4DstCounter value in the PatternFlowIpv4Dst object +func (obj *patternFlowIpv4Dst) SetDecrement(value PatternFlowIpv4DstCounter) PatternFlowIpv4Dst { + obj.setChoice(PatternFlowIpv4DstChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4DstMetricTag +func (obj *patternFlowIpv4Dst) MetricTags() PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4DstMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4DstPatternFlowIpv4DstMetricTagIter struct { + obj *patternFlowIpv4Dst + patternFlowIpv4DstMetricTagSlice []PatternFlowIpv4DstMetricTag + fieldPtr *[]*otg.PatternFlowIpv4DstMetricTag +} + +func newPatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter(ptr *[]*otg.PatternFlowIpv4DstMetricTag) PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter { + return &patternFlowIpv4DstPatternFlowIpv4DstMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter interface { + setMsg(*patternFlowIpv4Dst) PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter + Items() []PatternFlowIpv4DstMetricTag + Add() PatternFlowIpv4DstMetricTag + Append(items ...PatternFlowIpv4DstMetricTag) PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter + Set(index int, newObj PatternFlowIpv4DstMetricTag) PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter + Clear() PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter + clearHolderSlice() PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter + appendHolderSlice(item PatternFlowIpv4DstMetricTag) PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter +} + +func (obj *patternFlowIpv4DstPatternFlowIpv4DstMetricTagIter) setMsg(msg *patternFlowIpv4Dst) PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4DstMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4DstPatternFlowIpv4DstMetricTagIter) Items() []PatternFlowIpv4DstMetricTag { + return obj.patternFlowIpv4DstMetricTagSlice +} + +func (obj *patternFlowIpv4DstPatternFlowIpv4DstMetricTagIter) Add() PatternFlowIpv4DstMetricTag { + newObj := &otg.PatternFlowIpv4DstMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4DstMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4DstMetricTagSlice = append(obj.patternFlowIpv4DstMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4DstPatternFlowIpv4DstMetricTagIter) Append(items ...PatternFlowIpv4DstMetricTag) PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4DstMetricTagSlice = append(obj.patternFlowIpv4DstMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4DstPatternFlowIpv4DstMetricTagIter) Set(index int, newObj PatternFlowIpv4DstMetricTag) PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4DstMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4DstPatternFlowIpv4DstMetricTagIter) Clear() PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4DstMetricTag{} + obj.patternFlowIpv4DstMetricTagSlice = []PatternFlowIpv4DstMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4DstPatternFlowIpv4DstMetricTagIter) clearHolderSlice() PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter { + if len(obj.patternFlowIpv4DstMetricTagSlice) > 0 { + obj.patternFlowIpv4DstMetricTagSlice = []PatternFlowIpv4DstMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4DstPatternFlowIpv4DstMetricTagIter) appendHolderSlice(item PatternFlowIpv4DstMetricTag) PatternFlowIpv4DstPatternFlowIpv4DstMetricTagIter { + obj.patternFlowIpv4DstMetricTagSlice = append(obj.patternFlowIpv4DstMetricTagSlice, item) + return obj +} + +// description is TBD +// Auto returns a FlowIpv4Auto +func (obj *patternFlowIpv4Dst) Auto() FlowIpv4Auto { + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowIpv4DstChoice.AUTO) + } + if obj.autoHolder == nil { + obj.autoHolder = &flowIpv4Auto{obj: obj.obj.Auto} + } + return obj.autoHolder +} + +// description is TBD +// Auto returns a FlowIpv4Auto +func (obj *patternFlowIpv4Dst) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Random returns a PatternFlowIpv4DstRandom +func (obj *patternFlowIpv4Dst) Random() PatternFlowIpv4DstRandom { + if obj.obj.Random == nil { + obj.setChoice(PatternFlowIpv4DstChoice.RANDOM) + } + if obj.randomHolder == nil { + obj.randomHolder = &patternFlowIpv4DstRandom{obj: obj.obj.Random} + } + return obj.randomHolder +} + +// description is TBD +// Random returns a PatternFlowIpv4DstRandom +func (obj *patternFlowIpv4Dst) HasRandom() bool { + return obj.obj.Random != nil +} + +// description is TBD +// SetRandom sets the PatternFlowIpv4DstRandom value in the PatternFlowIpv4Dst object +func (obj *patternFlowIpv4Dst) SetRandom(value PatternFlowIpv4DstRandom) PatternFlowIpv4Dst { + obj.setChoice(PatternFlowIpv4DstChoice.RANDOM) + obj.randomHolder = nil + obj.obj.Random = value.msg() + + return obj +} + +func (obj *patternFlowIpv4Dst) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv4(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv4Dst.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateIpv4Slice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv4Dst.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4DstMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Auto != nil { + + obj.Auto().validateObj(vObj, set_default) + } + + if obj.obj.Random != nil { + + obj.Random().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowIpv4Dst) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4DstChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4DstChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4DstChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4DstChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4DstChoice.DECREMENT + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowIpv4DstChoice.AUTO + } + + if obj.obj.Random != nil { + choices_set += 1 + choice = PatternFlowIpv4DstChoice.RANDOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4DstChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4Dst") + } + } else { + intVal := otg.PatternFlowIpv4Dst_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4Dst_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_dst_counter.go b/gosnappi/pattern_flow_ipv4_dst_counter.go new file mode 100644 index 00000000..aab6c775 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_dst_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4DstCounter ***** +type patternFlowIpv4DstCounter struct { + validation + obj *otg.PatternFlowIpv4DstCounter + marshaller marshalPatternFlowIpv4DstCounter + unMarshaller unMarshalPatternFlowIpv4DstCounter +} + +func NewPatternFlowIpv4DstCounter() PatternFlowIpv4DstCounter { + obj := patternFlowIpv4DstCounter{obj: &otg.PatternFlowIpv4DstCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4DstCounter) msg() *otg.PatternFlowIpv4DstCounter { + return obj.obj +} + +func (obj *patternFlowIpv4DstCounter) setMsg(msg *otg.PatternFlowIpv4DstCounter) PatternFlowIpv4DstCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4DstCounter struct { + obj *patternFlowIpv4DstCounter +} + +type marshalPatternFlowIpv4DstCounter interface { + // ToProto marshals PatternFlowIpv4DstCounter to protobuf object *otg.PatternFlowIpv4DstCounter + ToProto() (*otg.PatternFlowIpv4DstCounter, error) + // ToPbText marshals PatternFlowIpv4DstCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4DstCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4DstCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4DstCounter struct { + obj *patternFlowIpv4DstCounter +} + +type unMarshalPatternFlowIpv4DstCounter interface { + // FromProto unmarshals PatternFlowIpv4DstCounter from protobuf object *otg.PatternFlowIpv4DstCounter + FromProto(msg *otg.PatternFlowIpv4DstCounter) (PatternFlowIpv4DstCounter, error) + // FromPbText unmarshals PatternFlowIpv4DstCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4DstCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4DstCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4DstCounter) Marshal() marshalPatternFlowIpv4DstCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4DstCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4DstCounter) Unmarshal() unMarshalPatternFlowIpv4DstCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4DstCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4DstCounter) ToProto() (*otg.PatternFlowIpv4DstCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4DstCounter) FromProto(msg *otg.PatternFlowIpv4DstCounter) (PatternFlowIpv4DstCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4DstCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4DstCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4DstCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DstCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4DstCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DstCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4DstCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DstCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DstCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4DstCounter) Clone() (PatternFlowIpv4DstCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4DstCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4DstCounter is ipv4 counter pattern +type PatternFlowIpv4DstCounter interface { + Validation + // msg marshals PatternFlowIpv4DstCounter to protobuf object *otg.PatternFlowIpv4DstCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4DstCounter + // setMsg unmarshals PatternFlowIpv4DstCounter from protobuf object *otg.PatternFlowIpv4DstCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4DstCounter) PatternFlowIpv4DstCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4DstCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4DstCounter + // validate validates PatternFlowIpv4DstCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4DstCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowIpv4DstCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowIpv4DstCounter + SetStart(value string) PatternFlowIpv4DstCounter + // HasStart checks if Start has been set in PatternFlowIpv4DstCounter + HasStart() bool + // Step returns string, set in PatternFlowIpv4DstCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowIpv4DstCounter + SetStep(value string) PatternFlowIpv4DstCounter + // HasStep checks if Step has been set in PatternFlowIpv4DstCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4DstCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4DstCounter + SetCount(value uint32) PatternFlowIpv4DstCounter + // HasCount checks if Count has been set in PatternFlowIpv4DstCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowIpv4DstCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowIpv4DstCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowIpv4DstCounter object +func (obj *patternFlowIpv4DstCounter) SetStart(value string) PatternFlowIpv4DstCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowIpv4DstCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowIpv4DstCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowIpv4DstCounter object +func (obj *patternFlowIpv4DstCounter) SetStep(value string) PatternFlowIpv4DstCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4DstCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4DstCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4DstCounter object +func (obj *patternFlowIpv4DstCounter) SetCount(value uint32) PatternFlowIpv4DstCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4DstCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateIpv4(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv4DstCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateIpv4(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv4DstCounter.Step")) + } + + } + +} + +func (obj *patternFlowIpv4DstCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("0.0.0.0") + } + if obj.obj.Step == nil { + obj.SetStep("0.0.0.1") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_dst_metric_tag.go b/gosnappi/pattern_flow_ipv4_dst_metric_tag.go new file mode 100644 index 00000000..ad86cdc4 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_dst_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4DstMetricTag ***** +type patternFlowIpv4DstMetricTag struct { + validation + obj *otg.PatternFlowIpv4DstMetricTag + marshaller marshalPatternFlowIpv4DstMetricTag + unMarshaller unMarshalPatternFlowIpv4DstMetricTag +} + +func NewPatternFlowIpv4DstMetricTag() PatternFlowIpv4DstMetricTag { + obj := patternFlowIpv4DstMetricTag{obj: &otg.PatternFlowIpv4DstMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4DstMetricTag) msg() *otg.PatternFlowIpv4DstMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4DstMetricTag) setMsg(msg *otg.PatternFlowIpv4DstMetricTag) PatternFlowIpv4DstMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4DstMetricTag struct { + obj *patternFlowIpv4DstMetricTag +} + +type marshalPatternFlowIpv4DstMetricTag interface { + // ToProto marshals PatternFlowIpv4DstMetricTag to protobuf object *otg.PatternFlowIpv4DstMetricTag + ToProto() (*otg.PatternFlowIpv4DstMetricTag, error) + // ToPbText marshals PatternFlowIpv4DstMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4DstMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4DstMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4DstMetricTag struct { + obj *patternFlowIpv4DstMetricTag +} + +type unMarshalPatternFlowIpv4DstMetricTag interface { + // FromProto unmarshals PatternFlowIpv4DstMetricTag from protobuf object *otg.PatternFlowIpv4DstMetricTag + FromProto(msg *otg.PatternFlowIpv4DstMetricTag) (PatternFlowIpv4DstMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4DstMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4DstMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4DstMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4DstMetricTag) Marshal() marshalPatternFlowIpv4DstMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4DstMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4DstMetricTag) Unmarshal() unMarshalPatternFlowIpv4DstMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4DstMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4DstMetricTag) ToProto() (*otg.PatternFlowIpv4DstMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4DstMetricTag) FromProto(msg *otg.PatternFlowIpv4DstMetricTag) (PatternFlowIpv4DstMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4DstMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4DstMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4DstMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DstMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4DstMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DstMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4DstMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DstMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DstMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4DstMetricTag) Clone() (PatternFlowIpv4DstMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4DstMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4DstMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4DstMetricTag interface { + Validation + // msg marshals PatternFlowIpv4DstMetricTag to protobuf object *otg.PatternFlowIpv4DstMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4DstMetricTag + // setMsg unmarshals PatternFlowIpv4DstMetricTag from protobuf object *otg.PatternFlowIpv4DstMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4DstMetricTag) PatternFlowIpv4DstMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4DstMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4DstMetricTag + // validate validates PatternFlowIpv4DstMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4DstMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4DstMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4DstMetricTag + SetName(value string) PatternFlowIpv4DstMetricTag + // Offset returns uint32, set in PatternFlowIpv4DstMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4DstMetricTag + SetOffset(value uint32) PatternFlowIpv4DstMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4DstMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4DstMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4DstMetricTag + SetLength(value uint32) PatternFlowIpv4DstMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4DstMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4DstMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4DstMetricTag object +func (obj *patternFlowIpv4DstMetricTag) SetName(value string) PatternFlowIpv4DstMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4DstMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4DstMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4DstMetricTag object +func (obj *patternFlowIpv4DstMetricTag) SetOffset(value uint32) PatternFlowIpv4DstMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4DstMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4DstMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4DstMetricTag object +func (obj *patternFlowIpv4DstMetricTag) SetLength(value uint32) PatternFlowIpv4DstMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4DstMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4DstMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4DstMetricTag.Offset <= 31 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4DstMetricTag.Length <= 32 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4DstMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(32) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_dst_random.go b/gosnappi/pattern_flow_ipv4_dst_random.go new file mode 100644 index 00000000..7d11d88d --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_dst_random.go @@ -0,0 +1,420 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4DstRandom ***** +type patternFlowIpv4DstRandom struct { + validation + obj *otg.PatternFlowIpv4DstRandom + marshaller marshalPatternFlowIpv4DstRandom + unMarshaller unMarshalPatternFlowIpv4DstRandom +} + +func NewPatternFlowIpv4DstRandom() PatternFlowIpv4DstRandom { + obj := patternFlowIpv4DstRandom{obj: &otg.PatternFlowIpv4DstRandom{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4DstRandom) msg() *otg.PatternFlowIpv4DstRandom { + return obj.obj +} + +func (obj *patternFlowIpv4DstRandom) setMsg(msg *otg.PatternFlowIpv4DstRandom) PatternFlowIpv4DstRandom { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4DstRandom struct { + obj *patternFlowIpv4DstRandom +} + +type marshalPatternFlowIpv4DstRandom interface { + // ToProto marshals PatternFlowIpv4DstRandom to protobuf object *otg.PatternFlowIpv4DstRandom + ToProto() (*otg.PatternFlowIpv4DstRandom, error) + // ToPbText marshals PatternFlowIpv4DstRandom to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4DstRandom to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4DstRandom to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4DstRandom struct { + obj *patternFlowIpv4DstRandom +} + +type unMarshalPatternFlowIpv4DstRandom interface { + // FromProto unmarshals PatternFlowIpv4DstRandom from protobuf object *otg.PatternFlowIpv4DstRandom + FromProto(msg *otg.PatternFlowIpv4DstRandom) (PatternFlowIpv4DstRandom, error) + // FromPbText unmarshals PatternFlowIpv4DstRandom from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4DstRandom from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4DstRandom from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4DstRandom) Marshal() marshalPatternFlowIpv4DstRandom { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4DstRandom{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4DstRandom) Unmarshal() unMarshalPatternFlowIpv4DstRandom { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4DstRandom{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4DstRandom) ToProto() (*otg.PatternFlowIpv4DstRandom, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4DstRandom) FromProto(msg *otg.PatternFlowIpv4DstRandom) (PatternFlowIpv4DstRandom, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4DstRandom) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4DstRandom) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4DstRandom) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DstRandom) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4DstRandom) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4DstRandom) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4DstRandom) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DstRandom) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4DstRandom) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4DstRandom) Clone() (PatternFlowIpv4DstRandom, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4DstRandom() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4DstRandom is ipv4 random pattern +type PatternFlowIpv4DstRandom interface { + Validation + // msg marshals PatternFlowIpv4DstRandom to protobuf object *otg.PatternFlowIpv4DstRandom + // and doesn't set defaults + msg() *otg.PatternFlowIpv4DstRandom + // setMsg unmarshals PatternFlowIpv4DstRandom from protobuf object *otg.PatternFlowIpv4DstRandom + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4DstRandom) PatternFlowIpv4DstRandom + // provides marshal interface + Marshal() marshalPatternFlowIpv4DstRandom + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4DstRandom + // validate validates PatternFlowIpv4DstRandom + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4DstRandom, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Min returns string, set in PatternFlowIpv4DstRandom. + Min() string + // SetMin assigns string provided by user to PatternFlowIpv4DstRandom + SetMin(value string) PatternFlowIpv4DstRandom + // HasMin checks if Min has been set in PatternFlowIpv4DstRandom + HasMin() bool + // Max returns string, set in PatternFlowIpv4DstRandom. + Max() string + // SetMax assigns string provided by user to PatternFlowIpv4DstRandom + SetMax(value string) PatternFlowIpv4DstRandom + // HasMax checks if Max has been set in PatternFlowIpv4DstRandom + HasMax() bool + // Seed returns uint32, set in PatternFlowIpv4DstRandom. + Seed() uint32 + // SetSeed assigns uint32 provided by user to PatternFlowIpv4DstRandom + SetSeed(value uint32) PatternFlowIpv4DstRandom + // HasSeed checks if Seed has been set in PatternFlowIpv4DstRandom + HasSeed() bool + // Count returns uint32, set in PatternFlowIpv4DstRandom. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4DstRandom + SetCount(value uint32) PatternFlowIpv4DstRandom + // HasCount checks if Count has been set in PatternFlowIpv4DstRandom + HasCount() bool +} + +// The minimum possible value generated by the random value generator. +// Min returns a string +func (obj *patternFlowIpv4DstRandom) Min() string { + + return *obj.obj.Min + +} + +// The minimum possible value generated by the random value generator. +// Min returns a string +func (obj *patternFlowIpv4DstRandom) HasMin() bool { + return obj.obj.Min != nil +} + +// The minimum possible value generated by the random value generator. +// SetMin sets the string value in the PatternFlowIpv4DstRandom object +func (obj *patternFlowIpv4DstRandom) SetMin(value string) PatternFlowIpv4DstRandom { + + obj.obj.Min = &value + return obj +} + +// The maximum possible value generated by the random value generator. +// Max returns a string +func (obj *patternFlowIpv4DstRandom) Max() string { + + return *obj.obj.Max + +} + +// The maximum possible value generated by the random value generator. +// Max returns a string +func (obj *patternFlowIpv4DstRandom) HasMax() bool { + return obj.obj.Max != nil +} + +// The maximum possible value generated by the random value generator. +// SetMax sets the string value in the PatternFlowIpv4DstRandom object +func (obj *patternFlowIpv4DstRandom) SetMax(value string) PatternFlowIpv4DstRandom { + + obj.obj.Max = &value + return obj +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// Seed returns a uint32 +func (obj *patternFlowIpv4DstRandom) Seed() uint32 { + + return *obj.obj.Seed + +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// Seed returns a uint32 +func (obj *patternFlowIpv4DstRandom) HasSeed() bool { + return obj.obj.Seed != nil +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// SetSeed sets the uint32 value in the PatternFlowIpv4DstRandom object +func (obj *patternFlowIpv4DstRandom) SetSeed(value uint32) PatternFlowIpv4DstRandom { + + obj.obj.Seed = &value + return obj +} + +// The total number of values to be generated by the random value generator. +// Count returns a uint32 +func (obj *patternFlowIpv4DstRandom) Count() uint32 { + + return *obj.obj.Count + +} + +// The total number of values to be generated by the random value generator. +// Count returns a uint32 +func (obj *patternFlowIpv4DstRandom) HasCount() bool { + return obj.obj.Count != nil +} + +// The total number of values to be generated by the random value generator. +// SetCount sets the uint32 value in the PatternFlowIpv4DstRandom object +func (obj *patternFlowIpv4DstRandom) SetCount(value uint32) PatternFlowIpv4DstRandom { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4DstRandom) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Min != nil { + + err := obj.validateIpv4(obj.Min()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv4DstRandom.Min")) + } + + } + + if obj.obj.Max != nil { + + err := obj.validateIpv4(obj.Max()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv4DstRandom.Max")) + } + + } + +} + +func (obj *patternFlowIpv4DstRandom) setDefault() { + if obj.obj.Min == nil { + obj.SetMin("0.0.0.0") + } + if obj.obj.Max == nil { + obj.SetMax("255.255.255.255") + } + if obj.obj.Seed == nil { + obj.SetSeed(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_fragment_offset.go b/gosnappi/pattern_flow_ipv4_fragment_offset.go new file mode 100644 index 00000000..a28fc070 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_fragment_offset.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4FragmentOffset ***** +type patternFlowIpv4FragmentOffset struct { + validation + obj *otg.PatternFlowIpv4FragmentOffset + marshaller marshalPatternFlowIpv4FragmentOffset + unMarshaller unMarshalPatternFlowIpv4FragmentOffset + incrementHolder PatternFlowIpv4FragmentOffsetCounter + decrementHolder PatternFlowIpv4FragmentOffsetCounter + metricTagsHolder PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter +} + +func NewPatternFlowIpv4FragmentOffset() PatternFlowIpv4FragmentOffset { + obj := patternFlowIpv4FragmentOffset{obj: &otg.PatternFlowIpv4FragmentOffset{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4FragmentOffset) msg() *otg.PatternFlowIpv4FragmentOffset { + return obj.obj +} + +func (obj *patternFlowIpv4FragmentOffset) setMsg(msg *otg.PatternFlowIpv4FragmentOffset) PatternFlowIpv4FragmentOffset { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4FragmentOffset struct { + obj *patternFlowIpv4FragmentOffset +} + +type marshalPatternFlowIpv4FragmentOffset interface { + // ToProto marshals PatternFlowIpv4FragmentOffset to protobuf object *otg.PatternFlowIpv4FragmentOffset + ToProto() (*otg.PatternFlowIpv4FragmentOffset, error) + // ToPbText marshals PatternFlowIpv4FragmentOffset to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4FragmentOffset to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4FragmentOffset to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4FragmentOffset struct { + obj *patternFlowIpv4FragmentOffset +} + +type unMarshalPatternFlowIpv4FragmentOffset interface { + // FromProto unmarshals PatternFlowIpv4FragmentOffset from protobuf object *otg.PatternFlowIpv4FragmentOffset + FromProto(msg *otg.PatternFlowIpv4FragmentOffset) (PatternFlowIpv4FragmentOffset, error) + // FromPbText unmarshals PatternFlowIpv4FragmentOffset from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4FragmentOffset from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4FragmentOffset from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4FragmentOffset) Marshal() marshalPatternFlowIpv4FragmentOffset { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4FragmentOffset{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4FragmentOffset) Unmarshal() unMarshalPatternFlowIpv4FragmentOffset { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4FragmentOffset{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4FragmentOffset) ToProto() (*otg.PatternFlowIpv4FragmentOffset, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4FragmentOffset) FromProto(msg *otg.PatternFlowIpv4FragmentOffset) (PatternFlowIpv4FragmentOffset, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4FragmentOffset) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4FragmentOffset) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4FragmentOffset) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4FragmentOffset) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4FragmentOffset) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4FragmentOffset) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4FragmentOffset) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4FragmentOffset) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4FragmentOffset) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4FragmentOffset) Clone() (PatternFlowIpv4FragmentOffset, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4FragmentOffset() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4FragmentOffset) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4FragmentOffset is fragment offset +type PatternFlowIpv4FragmentOffset interface { + Validation + // msg marshals PatternFlowIpv4FragmentOffset to protobuf object *otg.PatternFlowIpv4FragmentOffset + // and doesn't set defaults + msg() *otg.PatternFlowIpv4FragmentOffset + // setMsg unmarshals PatternFlowIpv4FragmentOffset from protobuf object *otg.PatternFlowIpv4FragmentOffset + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4FragmentOffset) PatternFlowIpv4FragmentOffset + // provides marshal interface + Marshal() marshalPatternFlowIpv4FragmentOffset + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4FragmentOffset + // validate validates PatternFlowIpv4FragmentOffset + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4FragmentOffset, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4FragmentOffsetChoiceEnum, set in PatternFlowIpv4FragmentOffset + Choice() PatternFlowIpv4FragmentOffsetChoiceEnum + // setChoice assigns PatternFlowIpv4FragmentOffsetChoiceEnum provided by user to PatternFlowIpv4FragmentOffset + setChoice(value PatternFlowIpv4FragmentOffsetChoiceEnum) PatternFlowIpv4FragmentOffset + // HasChoice checks if Choice has been set in PatternFlowIpv4FragmentOffset + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4FragmentOffset. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4FragmentOffset + SetValue(value uint32) PatternFlowIpv4FragmentOffset + // HasValue checks if Value has been set in PatternFlowIpv4FragmentOffset + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4FragmentOffset. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4FragmentOffset + SetValues(value []uint32) PatternFlowIpv4FragmentOffset + // Increment returns PatternFlowIpv4FragmentOffsetCounter, set in PatternFlowIpv4FragmentOffset. + // PatternFlowIpv4FragmentOffsetCounter is integer counter pattern + Increment() PatternFlowIpv4FragmentOffsetCounter + // SetIncrement assigns PatternFlowIpv4FragmentOffsetCounter provided by user to PatternFlowIpv4FragmentOffset. + // PatternFlowIpv4FragmentOffsetCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4FragmentOffsetCounter) PatternFlowIpv4FragmentOffset + // HasIncrement checks if Increment has been set in PatternFlowIpv4FragmentOffset + HasIncrement() bool + // Decrement returns PatternFlowIpv4FragmentOffsetCounter, set in PatternFlowIpv4FragmentOffset. + // PatternFlowIpv4FragmentOffsetCounter is integer counter pattern + Decrement() PatternFlowIpv4FragmentOffsetCounter + // SetDecrement assigns PatternFlowIpv4FragmentOffsetCounter provided by user to PatternFlowIpv4FragmentOffset. + // PatternFlowIpv4FragmentOffsetCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4FragmentOffsetCounter) PatternFlowIpv4FragmentOffset + // HasDecrement checks if Decrement has been set in PatternFlowIpv4FragmentOffset + HasDecrement() bool + // MetricTags returns PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIterIter, set in PatternFlowIpv4FragmentOffset + MetricTags() PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter + setNil() +} + +type PatternFlowIpv4FragmentOffsetChoiceEnum string + +// Enum of Choice on PatternFlowIpv4FragmentOffset +var PatternFlowIpv4FragmentOffsetChoice = struct { + VALUE PatternFlowIpv4FragmentOffsetChoiceEnum + VALUES PatternFlowIpv4FragmentOffsetChoiceEnum + INCREMENT PatternFlowIpv4FragmentOffsetChoiceEnum + DECREMENT PatternFlowIpv4FragmentOffsetChoiceEnum +}{ + VALUE: PatternFlowIpv4FragmentOffsetChoiceEnum("value"), + VALUES: PatternFlowIpv4FragmentOffsetChoiceEnum("values"), + INCREMENT: PatternFlowIpv4FragmentOffsetChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4FragmentOffsetChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4FragmentOffset) Choice() PatternFlowIpv4FragmentOffsetChoiceEnum { + return PatternFlowIpv4FragmentOffsetChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4FragmentOffset) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4FragmentOffset) setChoice(value PatternFlowIpv4FragmentOffsetChoiceEnum) PatternFlowIpv4FragmentOffset { + intValue, ok := otg.PatternFlowIpv4FragmentOffset_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4FragmentOffsetChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4FragmentOffset_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4FragmentOffsetChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4FragmentOffsetChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4FragmentOffsetChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4FragmentOffsetCounter().msg() + } + + if value == PatternFlowIpv4FragmentOffsetChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4FragmentOffsetCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4FragmentOffset) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4FragmentOffsetChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4FragmentOffset) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4FragmentOffset object +func (obj *patternFlowIpv4FragmentOffset) SetValue(value uint32) PatternFlowIpv4FragmentOffset { + obj.setChoice(PatternFlowIpv4FragmentOffsetChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4FragmentOffset) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4FragmentOffset object +func (obj *patternFlowIpv4FragmentOffset) SetValues(value []uint32) PatternFlowIpv4FragmentOffset { + obj.setChoice(PatternFlowIpv4FragmentOffsetChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4FragmentOffsetCounter +func (obj *patternFlowIpv4FragmentOffset) Increment() PatternFlowIpv4FragmentOffsetCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4FragmentOffsetChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4FragmentOffsetCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4FragmentOffsetCounter +func (obj *patternFlowIpv4FragmentOffset) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4FragmentOffsetCounter value in the PatternFlowIpv4FragmentOffset object +func (obj *patternFlowIpv4FragmentOffset) SetIncrement(value PatternFlowIpv4FragmentOffsetCounter) PatternFlowIpv4FragmentOffset { + obj.setChoice(PatternFlowIpv4FragmentOffsetChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4FragmentOffsetCounter +func (obj *patternFlowIpv4FragmentOffset) Decrement() PatternFlowIpv4FragmentOffsetCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4FragmentOffsetChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4FragmentOffsetCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4FragmentOffsetCounter +func (obj *patternFlowIpv4FragmentOffset) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4FragmentOffsetCounter value in the PatternFlowIpv4FragmentOffset object +func (obj *patternFlowIpv4FragmentOffset) SetDecrement(value PatternFlowIpv4FragmentOffsetCounter) PatternFlowIpv4FragmentOffset { + obj.setChoice(PatternFlowIpv4FragmentOffsetChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4FragmentOffsetMetricTag +func (obj *patternFlowIpv4FragmentOffset) MetricTags() PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4FragmentOffsetMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter struct { + obj *patternFlowIpv4FragmentOffset + patternFlowIpv4FragmentOffsetMetricTagSlice []PatternFlowIpv4FragmentOffsetMetricTag + fieldPtr *[]*otg.PatternFlowIpv4FragmentOffsetMetricTag +} + +func newPatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter(ptr *[]*otg.PatternFlowIpv4FragmentOffsetMetricTag) PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter { + return &patternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter interface { + setMsg(*patternFlowIpv4FragmentOffset) PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter + Items() []PatternFlowIpv4FragmentOffsetMetricTag + Add() PatternFlowIpv4FragmentOffsetMetricTag + Append(items ...PatternFlowIpv4FragmentOffsetMetricTag) PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter + Set(index int, newObj PatternFlowIpv4FragmentOffsetMetricTag) PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter + Clear() PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter + clearHolderSlice() PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter + appendHolderSlice(item PatternFlowIpv4FragmentOffsetMetricTag) PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter +} + +func (obj *patternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter) setMsg(msg *patternFlowIpv4FragmentOffset) PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4FragmentOffsetMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter) Items() []PatternFlowIpv4FragmentOffsetMetricTag { + return obj.patternFlowIpv4FragmentOffsetMetricTagSlice +} + +func (obj *patternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter) Add() PatternFlowIpv4FragmentOffsetMetricTag { + newObj := &otg.PatternFlowIpv4FragmentOffsetMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4FragmentOffsetMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4FragmentOffsetMetricTagSlice = append(obj.patternFlowIpv4FragmentOffsetMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter) Append(items ...PatternFlowIpv4FragmentOffsetMetricTag) PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4FragmentOffsetMetricTagSlice = append(obj.patternFlowIpv4FragmentOffsetMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter) Set(index int, newObj PatternFlowIpv4FragmentOffsetMetricTag) PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4FragmentOffsetMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter) Clear() PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4FragmentOffsetMetricTag{} + obj.patternFlowIpv4FragmentOffsetMetricTagSlice = []PatternFlowIpv4FragmentOffsetMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter) clearHolderSlice() PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter { + if len(obj.patternFlowIpv4FragmentOffsetMetricTagSlice) > 0 { + obj.patternFlowIpv4FragmentOffsetMetricTagSlice = []PatternFlowIpv4FragmentOffsetMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter) appendHolderSlice(item PatternFlowIpv4FragmentOffsetMetricTag) PatternFlowIpv4FragmentOffsetPatternFlowIpv4FragmentOffsetMetricTagIter { + obj.patternFlowIpv4FragmentOffsetMetricTagSlice = append(obj.patternFlowIpv4FragmentOffsetMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4FragmentOffset) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4FragmentOffset.Value <= 31 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4FragmentOffset.Values <= 31 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4FragmentOffsetMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4FragmentOffset) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4FragmentOffsetChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4FragmentOffsetChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4FragmentOffsetChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4FragmentOffsetChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4FragmentOffsetChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4FragmentOffsetChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4FragmentOffset") + } + } else { + intVal := otg.PatternFlowIpv4FragmentOffset_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4FragmentOffset_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_fragment_offset_counter.go b/gosnappi/pattern_flow_ipv4_fragment_offset_counter.go new file mode 100644 index 00000000..2057563c --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_fragment_offset_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4FragmentOffsetCounter ***** +type patternFlowIpv4FragmentOffsetCounter struct { + validation + obj *otg.PatternFlowIpv4FragmentOffsetCounter + marshaller marshalPatternFlowIpv4FragmentOffsetCounter + unMarshaller unMarshalPatternFlowIpv4FragmentOffsetCounter +} + +func NewPatternFlowIpv4FragmentOffsetCounter() PatternFlowIpv4FragmentOffsetCounter { + obj := patternFlowIpv4FragmentOffsetCounter{obj: &otg.PatternFlowIpv4FragmentOffsetCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4FragmentOffsetCounter) msg() *otg.PatternFlowIpv4FragmentOffsetCounter { + return obj.obj +} + +func (obj *patternFlowIpv4FragmentOffsetCounter) setMsg(msg *otg.PatternFlowIpv4FragmentOffsetCounter) PatternFlowIpv4FragmentOffsetCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4FragmentOffsetCounter struct { + obj *patternFlowIpv4FragmentOffsetCounter +} + +type marshalPatternFlowIpv4FragmentOffsetCounter interface { + // ToProto marshals PatternFlowIpv4FragmentOffsetCounter to protobuf object *otg.PatternFlowIpv4FragmentOffsetCounter + ToProto() (*otg.PatternFlowIpv4FragmentOffsetCounter, error) + // ToPbText marshals PatternFlowIpv4FragmentOffsetCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4FragmentOffsetCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4FragmentOffsetCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4FragmentOffsetCounter struct { + obj *patternFlowIpv4FragmentOffsetCounter +} + +type unMarshalPatternFlowIpv4FragmentOffsetCounter interface { + // FromProto unmarshals PatternFlowIpv4FragmentOffsetCounter from protobuf object *otg.PatternFlowIpv4FragmentOffsetCounter + FromProto(msg *otg.PatternFlowIpv4FragmentOffsetCounter) (PatternFlowIpv4FragmentOffsetCounter, error) + // FromPbText unmarshals PatternFlowIpv4FragmentOffsetCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4FragmentOffsetCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4FragmentOffsetCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4FragmentOffsetCounter) Marshal() marshalPatternFlowIpv4FragmentOffsetCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4FragmentOffsetCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4FragmentOffsetCounter) Unmarshal() unMarshalPatternFlowIpv4FragmentOffsetCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4FragmentOffsetCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4FragmentOffsetCounter) ToProto() (*otg.PatternFlowIpv4FragmentOffsetCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4FragmentOffsetCounter) FromProto(msg *otg.PatternFlowIpv4FragmentOffsetCounter) (PatternFlowIpv4FragmentOffsetCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4FragmentOffsetCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4FragmentOffsetCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4FragmentOffsetCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4FragmentOffsetCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4FragmentOffsetCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4FragmentOffsetCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4FragmentOffsetCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4FragmentOffsetCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4FragmentOffsetCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4FragmentOffsetCounter) Clone() (PatternFlowIpv4FragmentOffsetCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4FragmentOffsetCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4FragmentOffsetCounter is integer counter pattern +type PatternFlowIpv4FragmentOffsetCounter interface { + Validation + // msg marshals PatternFlowIpv4FragmentOffsetCounter to protobuf object *otg.PatternFlowIpv4FragmentOffsetCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4FragmentOffsetCounter + // setMsg unmarshals PatternFlowIpv4FragmentOffsetCounter from protobuf object *otg.PatternFlowIpv4FragmentOffsetCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4FragmentOffsetCounter) PatternFlowIpv4FragmentOffsetCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4FragmentOffsetCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4FragmentOffsetCounter + // validate validates PatternFlowIpv4FragmentOffsetCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4FragmentOffsetCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4FragmentOffsetCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4FragmentOffsetCounter + SetStart(value uint32) PatternFlowIpv4FragmentOffsetCounter + // HasStart checks if Start has been set in PatternFlowIpv4FragmentOffsetCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4FragmentOffsetCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4FragmentOffsetCounter + SetStep(value uint32) PatternFlowIpv4FragmentOffsetCounter + // HasStep checks if Step has been set in PatternFlowIpv4FragmentOffsetCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4FragmentOffsetCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4FragmentOffsetCounter + SetCount(value uint32) PatternFlowIpv4FragmentOffsetCounter + // HasCount checks if Count has been set in PatternFlowIpv4FragmentOffsetCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4FragmentOffsetCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4FragmentOffsetCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4FragmentOffsetCounter object +func (obj *patternFlowIpv4FragmentOffsetCounter) SetStart(value uint32) PatternFlowIpv4FragmentOffsetCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4FragmentOffsetCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4FragmentOffsetCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4FragmentOffsetCounter object +func (obj *patternFlowIpv4FragmentOffsetCounter) SetStep(value uint32) PatternFlowIpv4FragmentOffsetCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4FragmentOffsetCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4FragmentOffsetCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4FragmentOffsetCounter object +func (obj *patternFlowIpv4FragmentOffsetCounter) SetCount(value uint32) PatternFlowIpv4FragmentOffsetCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4FragmentOffsetCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4FragmentOffsetCounter.Start <= 31 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4FragmentOffsetCounter.Step <= 31 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4FragmentOffsetCounter.Count <= 31 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4FragmentOffsetCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_fragment_offset_metric_tag.go b/gosnappi/pattern_flow_ipv4_fragment_offset_metric_tag.go new file mode 100644 index 00000000..6c72bb18 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_fragment_offset_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4FragmentOffsetMetricTag ***** +type patternFlowIpv4FragmentOffsetMetricTag struct { + validation + obj *otg.PatternFlowIpv4FragmentOffsetMetricTag + marshaller marshalPatternFlowIpv4FragmentOffsetMetricTag + unMarshaller unMarshalPatternFlowIpv4FragmentOffsetMetricTag +} + +func NewPatternFlowIpv4FragmentOffsetMetricTag() PatternFlowIpv4FragmentOffsetMetricTag { + obj := patternFlowIpv4FragmentOffsetMetricTag{obj: &otg.PatternFlowIpv4FragmentOffsetMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4FragmentOffsetMetricTag) msg() *otg.PatternFlowIpv4FragmentOffsetMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4FragmentOffsetMetricTag) setMsg(msg *otg.PatternFlowIpv4FragmentOffsetMetricTag) PatternFlowIpv4FragmentOffsetMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4FragmentOffsetMetricTag struct { + obj *patternFlowIpv4FragmentOffsetMetricTag +} + +type marshalPatternFlowIpv4FragmentOffsetMetricTag interface { + // ToProto marshals PatternFlowIpv4FragmentOffsetMetricTag to protobuf object *otg.PatternFlowIpv4FragmentOffsetMetricTag + ToProto() (*otg.PatternFlowIpv4FragmentOffsetMetricTag, error) + // ToPbText marshals PatternFlowIpv4FragmentOffsetMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4FragmentOffsetMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4FragmentOffsetMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4FragmentOffsetMetricTag struct { + obj *patternFlowIpv4FragmentOffsetMetricTag +} + +type unMarshalPatternFlowIpv4FragmentOffsetMetricTag interface { + // FromProto unmarshals PatternFlowIpv4FragmentOffsetMetricTag from protobuf object *otg.PatternFlowIpv4FragmentOffsetMetricTag + FromProto(msg *otg.PatternFlowIpv4FragmentOffsetMetricTag) (PatternFlowIpv4FragmentOffsetMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4FragmentOffsetMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4FragmentOffsetMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4FragmentOffsetMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4FragmentOffsetMetricTag) Marshal() marshalPatternFlowIpv4FragmentOffsetMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4FragmentOffsetMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4FragmentOffsetMetricTag) Unmarshal() unMarshalPatternFlowIpv4FragmentOffsetMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4FragmentOffsetMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4FragmentOffsetMetricTag) ToProto() (*otg.PatternFlowIpv4FragmentOffsetMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4FragmentOffsetMetricTag) FromProto(msg *otg.PatternFlowIpv4FragmentOffsetMetricTag) (PatternFlowIpv4FragmentOffsetMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4FragmentOffsetMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4FragmentOffsetMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4FragmentOffsetMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4FragmentOffsetMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4FragmentOffsetMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4FragmentOffsetMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4FragmentOffsetMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4FragmentOffsetMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4FragmentOffsetMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4FragmentOffsetMetricTag) Clone() (PatternFlowIpv4FragmentOffsetMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4FragmentOffsetMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4FragmentOffsetMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4FragmentOffsetMetricTag interface { + Validation + // msg marshals PatternFlowIpv4FragmentOffsetMetricTag to protobuf object *otg.PatternFlowIpv4FragmentOffsetMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4FragmentOffsetMetricTag + // setMsg unmarshals PatternFlowIpv4FragmentOffsetMetricTag from protobuf object *otg.PatternFlowIpv4FragmentOffsetMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4FragmentOffsetMetricTag) PatternFlowIpv4FragmentOffsetMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4FragmentOffsetMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4FragmentOffsetMetricTag + // validate validates PatternFlowIpv4FragmentOffsetMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4FragmentOffsetMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4FragmentOffsetMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4FragmentOffsetMetricTag + SetName(value string) PatternFlowIpv4FragmentOffsetMetricTag + // Offset returns uint32, set in PatternFlowIpv4FragmentOffsetMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4FragmentOffsetMetricTag + SetOffset(value uint32) PatternFlowIpv4FragmentOffsetMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4FragmentOffsetMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4FragmentOffsetMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4FragmentOffsetMetricTag + SetLength(value uint32) PatternFlowIpv4FragmentOffsetMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4FragmentOffsetMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4FragmentOffsetMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4FragmentOffsetMetricTag object +func (obj *patternFlowIpv4FragmentOffsetMetricTag) SetName(value string) PatternFlowIpv4FragmentOffsetMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4FragmentOffsetMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4FragmentOffsetMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4FragmentOffsetMetricTag object +func (obj *patternFlowIpv4FragmentOffsetMetricTag) SetOffset(value uint32) PatternFlowIpv4FragmentOffsetMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4FragmentOffsetMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4FragmentOffsetMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4FragmentOffsetMetricTag object +func (obj *patternFlowIpv4FragmentOffsetMetricTag) SetLength(value uint32) PatternFlowIpv4FragmentOffsetMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4FragmentOffsetMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4FragmentOffsetMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 4 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4FragmentOffsetMetricTag.Offset <= 4 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 5 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4FragmentOffsetMetricTag.Length <= 5 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4FragmentOffsetMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(5) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_header_checksum.go b/gosnappi/pattern_flow_ipv4_header_checksum.go new file mode 100644 index 00000000..e6d6319e --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_header_checksum.go @@ -0,0 +1,434 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4HeaderChecksum ***** +type patternFlowIpv4HeaderChecksum struct { + validation + obj *otg.PatternFlowIpv4HeaderChecksum + marshaller marshalPatternFlowIpv4HeaderChecksum + unMarshaller unMarshalPatternFlowIpv4HeaderChecksum +} + +func NewPatternFlowIpv4HeaderChecksum() PatternFlowIpv4HeaderChecksum { + obj := patternFlowIpv4HeaderChecksum{obj: &otg.PatternFlowIpv4HeaderChecksum{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4HeaderChecksum) msg() *otg.PatternFlowIpv4HeaderChecksum { + return obj.obj +} + +func (obj *patternFlowIpv4HeaderChecksum) setMsg(msg *otg.PatternFlowIpv4HeaderChecksum) PatternFlowIpv4HeaderChecksum { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4HeaderChecksum struct { + obj *patternFlowIpv4HeaderChecksum +} + +type marshalPatternFlowIpv4HeaderChecksum interface { + // ToProto marshals PatternFlowIpv4HeaderChecksum to protobuf object *otg.PatternFlowIpv4HeaderChecksum + ToProto() (*otg.PatternFlowIpv4HeaderChecksum, error) + // ToPbText marshals PatternFlowIpv4HeaderChecksum to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4HeaderChecksum to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4HeaderChecksum to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4HeaderChecksum struct { + obj *patternFlowIpv4HeaderChecksum +} + +type unMarshalPatternFlowIpv4HeaderChecksum interface { + // FromProto unmarshals PatternFlowIpv4HeaderChecksum from protobuf object *otg.PatternFlowIpv4HeaderChecksum + FromProto(msg *otg.PatternFlowIpv4HeaderChecksum) (PatternFlowIpv4HeaderChecksum, error) + // FromPbText unmarshals PatternFlowIpv4HeaderChecksum from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4HeaderChecksum from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4HeaderChecksum from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4HeaderChecksum) Marshal() marshalPatternFlowIpv4HeaderChecksum { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4HeaderChecksum{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4HeaderChecksum) Unmarshal() unMarshalPatternFlowIpv4HeaderChecksum { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4HeaderChecksum{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4HeaderChecksum) ToProto() (*otg.PatternFlowIpv4HeaderChecksum, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderChecksum) FromProto(msg *otg.PatternFlowIpv4HeaderChecksum) (PatternFlowIpv4HeaderChecksum, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4HeaderChecksum) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderChecksum) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4HeaderChecksum) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderChecksum) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4HeaderChecksum) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderChecksum) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4HeaderChecksum) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4HeaderChecksum) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4HeaderChecksum) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4HeaderChecksum) Clone() (PatternFlowIpv4HeaderChecksum, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4HeaderChecksum() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4HeaderChecksum is header checksum +type PatternFlowIpv4HeaderChecksum interface { + Validation + // msg marshals PatternFlowIpv4HeaderChecksum to protobuf object *otg.PatternFlowIpv4HeaderChecksum + // and doesn't set defaults + msg() *otg.PatternFlowIpv4HeaderChecksum + // setMsg unmarshals PatternFlowIpv4HeaderChecksum from protobuf object *otg.PatternFlowIpv4HeaderChecksum + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4HeaderChecksum) PatternFlowIpv4HeaderChecksum + // provides marshal interface + Marshal() marshalPatternFlowIpv4HeaderChecksum + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4HeaderChecksum + // validate validates PatternFlowIpv4HeaderChecksum + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4HeaderChecksum, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4HeaderChecksumChoiceEnum, set in PatternFlowIpv4HeaderChecksum + Choice() PatternFlowIpv4HeaderChecksumChoiceEnum + // setChoice assigns PatternFlowIpv4HeaderChecksumChoiceEnum provided by user to PatternFlowIpv4HeaderChecksum + setChoice(value PatternFlowIpv4HeaderChecksumChoiceEnum) PatternFlowIpv4HeaderChecksum + // HasChoice checks if Choice has been set in PatternFlowIpv4HeaderChecksum + HasChoice() bool + // Generated returns PatternFlowIpv4HeaderChecksumGeneratedEnum, set in PatternFlowIpv4HeaderChecksum + Generated() PatternFlowIpv4HeaderChecksumGeneratedEnum + // SetGenerated assigns PatternFlowIpv4HeaderChecksumGeneratedEnum provided by user to PatternFlowIpv4HeaderChecksum + SetGenerated(value PatternFlowIpv4HeaderChecksumGeneratedEnum) PatternFlowIpv4HeaderChecksum + // HasGenerated checks if Generated has been set in PatternFlowIpv4HeaderChecksum + HasGenerated() bool + // Custom returns uint32, set in PatternFlowIpv4HeaderChecksum. + Custom() uint32 + // SetCustom assigns uint32 provided by user to PatternFlowIpv4HeaderChecksum + SetCustom(value uint32) PatternFlowIpv4HeaderChecksum + // HasCustom checks if Custom has been set in PatternFlowIpv4HeaderChecksum + HasCustom() bool +} + +type PatternFlowIpv4HeaderChecksumChoiceEnum string + +// Enum of Choice on PatternFlowIpv4HeaderChecksum +var PatternFlowIpv4HeaderChecksumChoice = struct { + GENERATED PatternFlowIpv4HeaderChecksumChoiceEnum + CUSTOM PatternFlowIpv4HeaderChecksumChoiceEnum +}{ + GENERATED: PatternFlowIpv4HeaderChecksumChoiceEnum("generated"), + CUSTOM: PatternFlowIpv4HeaderChecksumChoiceEnum("custom"), +} + +func (obj *patternFlowIpv4HeaderChecksum) Choice() PatternFlowIpv4HeaderChecksumChoiceEnum { + return PatternFlowIpv4HeaderChecksumChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The type of checksum +// Choice returns a string +func (obj *patternFlowIpv4HeaderChecksum) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4HeaderChecksum) setChoice(value PatternFlowIpv4HeaderChecksumChoiceEnum) PatternFlowIpv4HeaderChecksum { + intValue, ok := otg.PatternFlowIpv4HeaderChecksum_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4HeaderChecksumChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4HeaderChecksum_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.obj.Generated = otg.PatternFlowIpv4HeaderChecksum_Generated_unspecified.Enum() + return obj +} + +type PatternFlowIpv4HeaderChecksumGeneratedEnum string + +// Enum of Generated on PatternFlowIpv4HeaderChecksum +var PatternFlowIpv4HeaderChecksumGenerated = struct { + GOOD PatternFlowIpv4HeaderChecksumGeneratedEnum + BAD PatternFlowIpv4HeaderChecksumGeneratedEnum +}{ + GOOD: PatternFlowIpv4HeaderChecksumGeneratedEnum("good"), + BAD: PatternFlowIpv4HeaderChecksumGeneratedEnum("bad"), +} + +func (obj *patternFlowIpv4HeaderChecksum) Generated() PatternFlowIpv4HeaderChecksumGeneratedEnum { + return PatternFlowIpv4HeaderChecksumGeneratedEnum(obj.obj.Generated.Enum().String()) +} + +// A system generated checksum value +// Generated returns a string +func (obj *patternFlowIpv4HeaderChecksum) HasGenerated() bool { + return obj.obj.Generated != nil +} + +func (obj *patternFlowIpv4HeaderChecksum) SetGenerated(value PatternFlowIpv4HeaderChecksumGeneratedEnum) PatternFlowIpv4HeaderChecksum { + intValue, ok := otg.PatternFlowIpv4HeaderChecksum_Generated_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4HeaderChecksumGeneratedEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4HeaderChecksum_Generated_Enum(intValue) + obj.obj.Generated = &enumValue + + return obj +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowIpv4HeaderChecksum) Custom() uint32 { + + if obj.obj.Custom == nil { + obj.setChoice(PatternFlowIpv4HeaderChecksumChoice.CUSTOM) + } + + return *obj.obj.Custom + +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowIpv4HeaderChecksum) HasCustom() bool { + return obj.obj.Custom != nil +} + +// A custom checksum value +// SetCustom sets the uint32 value in the PatternFlowIpv4HeaderChecksum object +func (obj *patternFlowIpv4HeaderChecksum) SetCustom(value uint32) PatternFlowIpv4HeaderChecksum { + obj.setChoice(PatternFlowIpv4HeaderChecksumChoice.CUSTOM) + obj.obj.Custom = &value + return obj +} + +func (obj *patternFlowIpv4HeaderChecksum) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Custom != nil { + + if *obj.obj.Custom > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4HeaderChecksum.Custom <= 65535 but Got %d", *obj.obj.Custom)) + } + + } + +} + +func (obj *patternFlowIpv4HeaderChecksum) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4HeaderChecksumChoiceEnum + + if obj.obj.Generated != nil && obj.obj.Generated.Number() != 0 { + choices_set += 1 + choice = PatternFlowIpv4HeaderChecksumChoice.GENERATED + } + + if obj.obj.Custom != nil { + choices_set += 1 + choice = PatternFlowIpv4HeaderChecksumChoice.CUSTOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4HeaderChecksumChoice.GENERATED) + if obj.obj.Generated.Number() == 0 { + obj.SetGenerated(PatternFlowIpv4HeaderChecksumGenerated.GOOD) + + } + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4HeaderChecksum") + } + } else { + intVal := otg.PatternFlowIpv4HeaderChecksum_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4HeaderChecksum_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_header_length.go b/gosnappi/pattern_flow_ipv4_header_length.go new file mode 100644 index 00000000..b3bfaac0 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_header_length.go @@ -0,0 +1,712 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4HeaderLength ***** +type patternFlowIpv4HeaderLength struct { + validation + obj *otg.PatternFlowIpv4HeaderLength + marshaller marshalPatternFlowIpv4HeaderLength + unMarshaller unMarshalPatternFlowIpv4HeaderLength + incrementHolder PatternFlowIpv4HeaderLengthCounter + decrementHolder PatternFlowIpv4HeaderLengthCounter + metricTagsHolder PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter +} + +func NewPatternFlowIpv4HeaderLength() PatternFlowIpv4HeaderLength { + obj := patternFlowIpv4HeaderLength{obj: &otg.PatternFlowIpv4HeaderLength{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4HeaderLength) msg() *otg.PatternFlowIpv4HeaderLength { + return obj.obj +} + +func (obj *patternFlowIpv4HeaderLength) setMsg(msg *otg.PatternFlowIpv4HeaderLength) PatternFlowIpv4HeaderLength { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4HeaderLength struct { + obj *patternFlowIpv4HeaderLength +} + +type marshalPatternFlowIpv4HeaderLength interface { + // ToProto marshals PatternFlowIpv4HeaderLength to protobuf object *otg.PatternFlowIpv4HeaderLength + ToProto() (*otg.PatternFlowIpv4HeaderLength, error) + // ToPbText marshals PatternFlowIpv4HeaderLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4HeaderLength to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4HeaderLength to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4HeaderLength struct { + obj *patternFlowIpv4HeaderLength +} + +type unMarshalPatternFlowIpv4HeaderLength interface { + // FromProto unmarshals PatternFlowIpv4HeaderLength from protobuf object *otg.PatternFlowIpv4HeaderLength + FromProto(msg *otg.PatternFlowIpv4HeaderLength) (PatternFlowIpv4HeaderLength, error) + // FromPbText unmarshals PatternFlowIpv4HeaderLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4HeaderLength from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4HeaderLength from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4HeaderLength) Marshal() marshalPatternFlowIpv4HeaderLength { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4HeaderLength{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4HeaderLength) Unmarshal() unMarshalPatternFlowIpv4HeaderLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4HeaderLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4HeaderLength) ToProto() (*otg.PatternFlowIpv4HeaderLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderLength) FromProto(msg *otg.PatternFlowIpv4HeaderLength) (PatternFlowIpv4HeaderLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4HeaderLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4HeaderLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4HeaderLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4HeaderLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4HeaderLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4HeaderLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4HeaderLength) Clone() (PatternFlowIpv4HeaderLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4HeaderLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4HeaderLength) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4HeaderLength is header length +type PatternFlowIpv4HeaderLength interface { + Validation + // msg marshals PatternFlowIpv4HeaderLength to protobuf object *otg.PatternFlowIpv4HeaderLength + // and doesn't set defaults + msg() *otg.PatternFlowIpv4HeaderLength + // setMsg unmarshals PatternFlowIpv4HeaderLength from protobuf object *otg.PatternFlowIpv4HeaderLength + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4HeaderLength) PatternFlowIpv4HeaderLength + // provides marshal interface + Marshal() marshalPatternFlowIpv4HeaderLength + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4HeaderLength + // validate validates PatternFlowIpv4HeaderLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4HeaderLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4HeaderLengthChoiceEnum, set in PatternFlowIpv4HeaderLength + Choice() PatternFlowIpv4HeaderLengthChoiceEnum + // setChoice assigns PatternFlowIpv4HeaderLengthChoiceEnum provided by user to PatternFlowIpv4HeaderLength + setChoice(value PatternFlowIpv4HeaderLengthChoiceEnum) PatternFlowIpv4HeaderLength + // HasChoice checks if Choice has been set in PatternFlowIpv4HeaderLength + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4HeaderLength. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4HeaderLength + SetValue(value uint32) PatternFlowIpv4HeaderLength + // HasValue checks if Value has been set in PatternFlowIpv4HeaderLength + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4HeaderLength. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4HeaderLength + SetValues(value []uint32) PatternFlowIpv4HeaderLength + // Auto returns uint32, set in PatternFlowIpv4HeaderLength. + Auto() uint32 + // HasAuto checks if Auto has been set in PatternFlowIpv4HeaderLength + HasAuto() bool + // Increment returns PatternFlowIpv4HeaderLengthCounter, set in PatternFlowIpv4HeaderLength. + // PatternFlowIpv4HeaderLengthCounter is integer counter pattern + Increment() PatternFlowIpv4HeaderLengthCounter + // SetIncrement assigns PatternFlowIpv4HeaderLengthCounter provided by user to PatternFlowIpv4HeaderLength. + // PatternFlowIpv4HeaderLengthCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4HeaderLengthCounter) PatternFlowIpv4HeaderLength + // HasIncrement checks if Increment has been set in PatternFlowIpv4HeaderLength + HasIncrement() bool + // Decrement returns PatternFlowIpv4HeaderLengthCounter, set in PatternFlowIpv4HeaderLength. + // PatternFlowIpv4HeaderLengthCounter is integer counter pattern + Decrement() PatternFlowIpv4HeaderLengthCounter + // SetDecrement assigns PatternFlowIpv4HeaderLengthCounter provided by user to PatternFlowIpv4HeaderLength. + // PatternFlowIpv4HeaderLengthCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4HeaderLengthCounter) PatternFlowIpv4HeaderLength + // HasDecrement checks if Decrement has been set in PatternFlowIpv4HeaderLength + HasDecrement() bool + // MetricTags returns PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIterIter, set in PatternFlowIpv4HeaderLength + MetricTags() PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter + setNil() +} + +type PatternFlowIpv4HeaderLengthChoiceEnum string + +// Enum of Choice on PatternFlowIpv4HeaderLength +var PatternFlowIpv4HeaderLengthChoice = struct { + VALUE PatternFlowIpv4HeaderLengthChoiceEnum + VALUES PatternFlowIpv4HeaderLengthChoiceEnum + AUTO PatternFlowIpv4HeaderLengthChoiceEnum + INCREMENT PatternFlowIpv4HeaderLengthChoiceEnum + DECREMENT PatternFlowIpv4HeaderLengthChoiceEnum +}{ + VALUE: PatternFlowIpv4HeaderLengthChoiceEnum("value"), + VALUES: PatternFlowIpv4HeaderLengthChoiceEnum("values"), + AUTO: PatternFlowIpv4HeaderLengthChoiceEnum("auto"), + INCREMENT: PatternFlowIpv4HeaderLengthChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4HeaderLengthChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4HeaderLength) Choice() PatternFlowIpv4HeaderLengthChoiceEnum { + return PatternFlowIpv4HeaderLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4HeaderLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4HeaderLength) setChoice(value PatternFlowIpv4HeaderLengthChoiceEnum) PatternFlowIpv4HeaderLength { + intValue, ok := otg.PatternFlowIpv4HeaderLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4HeaderLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4HeaderLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Auto = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4HeaderLengthChoice.VALUE { + defaultValue := uint32(5) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4HeaderLengthChoice.VALUES { + defaultValue := []uint32{5} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4HeaderLengthChoice.AUTO { + defaultValue := uint32(5) + obj.obj.Auto = &defaultValue + } + + if value == PatternFlowIpv4HeaderLengthChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4HeaderLengthCounter().msg() + } + + if value == PatternFlowIpv4HeaderLengthChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4HeaderLengthCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4HeaderLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4HeaderLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4HeaderLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4HeaderLength object +func (obj *patternFlowIpv4HeaderLength) SetValue(value uint32) PatternFlowIpv4HeaderLength { + obj.setChoice(PatternFlowIpv4HeaderLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4HeaderLength) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{5}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4HeaderLength object +func (obj *patternFlowIpv4HeaderLength) SetValues(value []uint32) PatternFlowIpv4HeaderLength { + obj.setChoice(PatternFlowIpv4HeaderLengthChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowIpv4HeaderLength) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowIpv4HeaderLengthChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowIpv4HeaderLength) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Increment returns a PatternFlowIpv4HeaderLengthCounter +func (obj *patternFlowIpv4HeaderLength) Increment() PatternFlowIpv4HeaderLengthCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4HeaderLengthChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4HeaderLengthCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4HeaderLengthCounter +func (obj *patternFlowIpv4HeaderLength) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4HeaderLengthCounter value in the PatternFlowIpv4HeaderLength object +func (obj *patternFlowIpv4HeaderLength) SetIncrement(value PatternFlowIpv4HeaderLengthCounter) PatternFlowIpv4HeaderLength { + obj.setChoice(PatternFlowIpv4HeaderLengthChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4HeaderLengthCounter +func (obj *patternFlowIpv4HeaderLength) Decrement() PatternFlowIpv4HeaderLengthCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4HeaderLengthChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4HeaderLengthCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4HeaderLengthCounter +func (obj *patternFlowIpv4HeaderLength) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4HeaderLengthCounter value in the PatternFlowIpv4HeaderLength object +func (obj *patternFlowIpv4HeaderLength) SetDecrement(value PatternFlowIpv4HeaderLengthCounter) PatternFlowIpv4HeaderLength { + obj.setChoice(PatternFlowIpv4HeaderLengthChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4HeaderLengthMetricTag +func (obj *patternFlowIpv4HeaderLength) MetricTags() PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4HeaderLengthMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter struct { + obj *patternFlowIpv4HeaderLength + patternFlowIpv4HeaderLengthMetricTagSlice []PatternFlowIpv4HeaderLengthMetricTag + fieldPtr *[]*otg.PatternFlowIpv4HeaderLengthMetricTag +} + +func newPatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter(ptr *[]*otg.PatternFlowIpv4HeaderLengthMetricTag) PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter { + return &patternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter interface { + setMsg(*patternFlowIpv4HeaderLength) PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter + Items() []PatternFlowIpv4HeaderLengthMetricTag + Add() PatternFlowIpv4HeaderLengthMetricTag + Append(items ...PatternFlowIpv4HeaderLengthMetricTag) PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter + Set(index int, newObj PatternFlowIpv4HeaderLengthMetricTag) PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter + Clear() PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter + clearHolderSlice() PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter + appendHolderSlice(item PatternFlowIpv4HeaderLengthMetricTag) PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter +} + +func (obj *patternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter) setMsg(msg *patternFlowIpv4HeaderLength) PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4HeaderLengthMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter) Items() []PatternFlowIpv4HeaderLengthMetricTag { + return obj.patternFlowIpv4HeaderLengthMetricTagSlice +} + +func (obj *patternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter) Add() PatternFlowIpv4HeaderLengthMetricTag { + newObj := &otg.PatternFlowIpv4HeaderLengthMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4HeaderLengthMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4HeaderLengthMetricTagSlice = append(obj.patternFlowIpv4HeaderLengthMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter) Append(items ...PatternFlowIpv4HeaderLengthMetricTag) PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4HeaderLengthMetricTagSlice = append(obj.patternFlowIpv4HeaderLengthMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter) Set(index int, newObj PatternFlowIpv4HeaderLengthMetricTag) PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4HeaderLengthMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter) Clear() PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4HeaderLengthMetricTag{} + obj.patternFlowIpv4HeaderLengthMetricTagSlice = []PatternFlowIpv4HeaderLengthMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter) clearHolderSlice() PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter { + if len(obj.patternFlowIpv4HeaderLengthMetricTagSlice) > 0 { + obj.patternFlowIpv4HeaderLengthMetricTagSlice = []PatternFlowIpv4HeaderLengthMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter) appendHolderSlice(item PatternFlowIpv4HeaderLengthMetricTag) PatternFlowIpv4HeaderLengthPatternFlowIpv4HeaderLengthMetricTagIter { + obj.patternFlowIpv4HeaderLengthMetricTagSlice = append(obj.patternFlowIpv4HeaderLengthMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4HeaderLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4HeaderLength.Value <= 15 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4HeaderLength.Values <= 15 but Got %d", item)) + } + + } + + } + + if obj.obj.Auto != nil { + + if *obj.obj.Auto > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4HeaderLength.Auto <= 15 but Got %d", *obj.obj.Auto)) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4HeaderLengthMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4HeaderLength) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4HeaderLengthChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4HeaderLengthChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4HeaderLengthChoice.VALUES + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowIpv4HeaderLengthChoice.AUTO + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4HeaderLengthChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4HeaderLengthChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4HeaderLengthChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4HeaderLength") + } + } else { + intVal := otg.PatternFlowIpv4HeaderLength_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4HeaderLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_header_length_counter.go b/gosnappi/pattern_flow_ipv4_header_length_counter.go new file mode 100644 index 00000000..4a5e0a91 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_header_length_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4HeaderLengthCounter ***** +type patternFlowIpv4HeaderLengthCounter struct { + validation + obj *otg.PatternFlowIpv4HeaderLengthCounter + marshaller marshalPatternFlowIpv4HeaderLengthCounter + unMarshaller unMarshalPatternFlowIpv4HeaderLengthCounter +} + +func NewPatternFlowIpv4HeaderLengthCounter() PatternFlowIpv4HeaderLengthCounter { + obj := patternFlowIpv4HeaderLengthCounter{obj: &otg.PatternFlowIpv4HeaderLengthCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4HeaderLengthCounter) msg() *otg.PatternFlowIpv4HeaderLengthCounter { + return obj.obj +} + +func (obj *patternFlowIpv4HeaderLengthCounter) setMsg(msg *otg.PatternFlowIpv4HeaderLengthCounter) PatternFlowIpv4HeaderLengthCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4HeaderLengthCounter struct { + obj *patternFlowIpv4HeaderLengthCounter +} + +type marshalPatternFlowIpv4HeaderLengthCounter interface { + // ToProto marshals PatternFlowIpv4HeaderLengthCounter to protobuf object *otg.PatternFlowIpv4HeaderLengthCounter + ToProto() (*otg.PatternFlowIpv4HeaderLengthCounter, error) + // ToPbText marshals PatternFlowIpv4HeaderLengthCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4HeaderLengthCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4HeaderLengthCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4HeaderLengthCounter struct { + obj *patternFlowIpv4HeaderLengthCounter +} + +type unMarshalPatternFlowIpv4HeaderLengthCounter interface { + // FromProto unmarshals PatternFlowIpv4HeaderLengthCounter from protobuf object *otg.PatternFlowIpv4HeaderLengthCounter + FromProto(msg *otg.PatternFlowIpv4HeaderLengthCounter) (PatternFlowIpv4HeaderLengthCounter, error) + // FromPbText unmarshals PatternFlowIpv4HeaderLengthCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4HeaderLengthCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4HeaderLengthCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4HeaderLengthCounter) Marshal() marshalPatternFlowIpv4HeaderLengthCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4HeaderLengthCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4HeaderLengthCounter) Unmarshal() unMarshalPatternFlowIpv4HeaderLengthCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4HeaderLengthCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4HeaderLengthCounter) ToProto() (*otg.PatternFlowIpv4HeaderLengthCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderLengthCounter) FromProto(msg *otg.PatternFlowIpv4HeaderLengthCounter) (PatternFlowIpv4HeaderLengthCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4HeaderLengthCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderLengthCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4HeaderLengthCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderLengthCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4HeaderLengthCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderLengthCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4HeaderLengthCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4HeaderLengthCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4HeaderLengthCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4HeaderLengthCounter) Clone() (PatternFlowIpv4HeaderLengthCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4HeaderLengthCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4HeaderLengthCounter is integer counter pattern +type PatternFlowIpv4HeaderLengthCounter interface { + Validation + // msg marshals PatternFlowIpv4HeaderLengthCounter to protobuf object *otg.PatternFlowIpv4HeaderLengthCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4HeaderLengthCounter + // setMsg unmarshals PatternFlowIpv4HeaderLengthCounter from protobuf object *otg.PatternFlowIpv4HeaderLengthCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4HeaderLengthCounter) PatternFlowIpv4HeaderLengthCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4HeaderLengthCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4HeaderLengthCounter + // validate validates PatternFlowIpv4HeaderLengthCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4HeaderLengthCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4HeaderLengthCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4HeaderLengthCounter + SetStart(value uint32) PatternFlowIpv4HeaderLengthCounter + // HasStart checks if Start has been set in PatternFlowIpv4HeaderLengthCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4HeaderLengthCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4HeaderLengthCounter + SetStep(value uint32) PatternFlowIpv4HeaderLengthCounter + // HasStep checks if Step has been set in PatternFlowIpv4HeaderLengthCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4HeaderLengthCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4HeaderLengthCounter + SetCount(value uint32) PatternFlowIpv4HeaderLengthCounter + // HasCount checks if Count has been set in PatternFlowIpv4HeaderLengthCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4HeaderLengthCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4HeaderLengthCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4HeaderLengthCounter object +func (obj *patternFlowIpv4HeaderLengthCounter) SetStart(value uint32) PatternFlowIpv4HeaderLengthCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4HeaderLengthCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4HeaderLengthCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4HeaderLengthCounter object +func (obj *patternFlowIpv4HeaderLengthCounter) SetStep(value uint32) PatternFlowIpv4HeaderLengthCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4HeaderLengthCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4HeaderLengthCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4HeaderLengthCounter object +func (obj *patternFlowIpv4HeaderLengthCounter) SetCount(value uint32) PatternFlowIpv4HeaderLengthCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4HeaderLengthCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4HeaderLengthCounter.Start <= 15 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4HeaderLengthCounter.Step <= 15 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4HeaderLengthCounter.Count <= 15 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4HeaderLengthCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(5) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_header_length_metric_tag.go b/gosnappi/pattern_flow_ipv4_header_length_metric_tag.go new file mode 100644 index 00000000..e77f13c7 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_header_length_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4HeaderLengthMetricTag ***** +type patternFlowIpv4HeaderLengthMetricTag struct { + validation + obj *otg.PatternFlowIpv4HeaderLengthMetricTag + marshaller marshalPatternFlowIpv4HeaderLengthMetricTag + unMarshaller unMarshalPatternFlowIpv4HeaderLengthMetricTag +} + +func NewPatternFlowIpv4HeaderLengthMetricTag() PatternFlowIpv4HeaderLengthMetricTag { + obj := patternFlowIpv4HeaderLengthMetricTag{obj: &otg.PatternFlowIpv4HeaderLengthMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4HeaderLengthMetricTag) msg() *otg.PatternFlowIpv4HeaderLengthMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4HeaderLengthMetricTag) setMsg(msg *otg.PatternFlowIpv4HeaderLengthMetricTag) PatternFlowIpv4HeaderLengthMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4HeaderLengthMetricTag struct { + obj *patternFlowIpv4HeaderLengthMetricTag +} + +type marshalPatternFlowIpv4HeaderLengthMetricTag interface { + // ToProto marshals PatternFlowIpv4HeaderLengthMetricTag to protobuf object *otg.PatternFlowIpv4HeaderLengthMetricTag + ToProto() (*otg.PatternFlowIpv4HeaderLengthMetricTag, error) + // ToPbText marshals PatternFlowIpv4HeaderLengthMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4HeaderLengthMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4HeaderLengthMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4HeaderLengthMetricTag struct { + obj *patternFlowIpv4HeaderLengthMetricTag +} + +type unMarshalPatternFlowIpv4HeaderLengthMetricTag interface { + // FromProto unmarshals PatternFlowIpv4HeaderLengthMetricTag from protobuf object *otg.PatternFlowIpv4HeaderLengthMetricTag + FromProto(msg *otg.PatternFlowIpv4HeaderLengthMetricTag) (PatternFlowIpv4HeaderLengthMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4HeaderLengthMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4HeaderLengthMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4HeaderLengthMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4HeaderLengthMetricTag) Marshal() marshalPatternFlowIpv4HeaderLengthMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4HeaderLengthMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4HeaderLengthMetricTag) Unmarshal() unMarshalPatternFlowIpv4HeaderLengthMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4HeaderLengthMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4HeaderLengthMetricTag) ToProto() (*otg.PatternFlowIpv4HeaderLengthMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderLengthMetricTag) FromProto(msg *otg.PatternFlowIpv4HeaderLengthMetricTag) (PatternFlowIpv4HeaderLengthMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4HeaderLengthMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderLengthMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4HeaderLengthMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderLengthMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4HeaderLengthMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4HeaderLengthMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4HeaderLengthMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4HeaderLengthMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4HeaderLengthMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4HeaderLengthMetricTag) Clone() (PatternFlowIpv4HeaderLengthMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4HeaderLengthMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4HeaderLengthMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4HeaderLengthMetricTag interface { + Validation + // msg marshals PatternFlowIpv4HeaderLengthMetricTag to protobuf object *otg.PatternFlowIpv4HeaderLengthMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4HeaderLengthMetricTag + // setMsg unmarshals PatternFlowIpv4HeaderLengthMetricTag from protobuf object *otg.PatternFlowIpv4HeaderLengthMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4HeaderLengthMetricTag) PatternFlowIpv4HeaderLengthMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4HeaderLengthMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4HeaderLengthMetricTag + // validate validates PatternFlowIpv4HeaderLengthMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4HeaderLengthMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4HeaderLengthMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4HeaderLengthMetricTag + SetName(value string) PatternFlowIpv4HeaderLengthMetricTag + // Offset returns uint32, set in PatternFlowIpv4HeaderLengthMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4HeaderLengthMetricTag + SetOffset(value uint32) PatternFlowIpv4HeaderLengthMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4HeaderLengthMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4HeaderLengthMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4HeaderLengthMetricTag + SetLength(value uint32) PatternFlowIpv4HeaderLengthMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4HeaderLengthMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4HeaderLengthMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4HeaderLengthMetricTag object +func (obj *patternFlowIpv4HeaderLengthMetricTag) SetName(value string) PatternFlowIpv4HeaderLengthMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4HeaderLengthMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4HeaderLengthMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4HeaderLengthMetricTag object +func (obj *patternFlowIpv4HeaderLengthMetricTag) SetOffset(value uint32) PatternFlowIpv4HeaderLengthMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4HeaderLengthMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4HeaderLengthMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4HeaderLengthMetricTag object +func (obj *patternFlowIpv4HeaderLengthMetricTag) SetLength(value uint32) PatternFlowIpv4HeaderLengthMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4HeaderLengthMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4HeaderLengthMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4HeaderLengthMetricTag.Offset <= 3 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 4 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4HeaderLengthMetricTag.Length <= 4 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4HeaderLengthMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(4) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_identification.go b/gosnappi/pattern_flow_ipv4_identification.go new file mode 100644 index 00000000..87083b4a --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_identification.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4Identification ***** +type patternFlowIpv4Identification struct { + validation + obj *otg.PatternFlowIpv4Identification + marshaller marshalPatternFlowIpv4Identification + unMarshaller unMarshalPatternFlowIpv4Identification + incrementHolder PatternFlowIpv4IdentificationCounter + decrementHolder PatternFlowIpv4IdentificationCounter + metricTagsHolder PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter +} + +func NewPatternFlowIpv4Identification() PatternFlowIpv4Identification { + obj := patternFlowIpv4Identification{obj: &otg.PatternFlowIpv4Identification{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4Identification) msg() *otg.PatternFlowIpv4Identification { + return obj.obj +} + +func (obj *patternFlowIpv4Identification) setMsg(msg *otg.PatternFlowIpv4Identification) PatternFlowIpv4Identification { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4Identification struct { + obj *patternFlowIpv4Identification +} + +type marshalPatternFlowIpv4Identification interface { + // ToProto marshals PatternFlowIpv4Identification to protobuf object *otg.PatternFlowIpv4Identification + ToProto() (*otg.PatternFlowIpv4Identification, error) + // ToPbText marshals PatternFlowIpv4Identification to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4Identification to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4Identification to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4Identification struct { + obj *patternFlowIpv4Identification +} + +type unMarshalPatternFlowIpv4Identification interface { + // FromProto unmarshals PatternFlowIpv4Identification from protobuf object *otg.PatternFlowIpv4Identification + FromProto(msg *otg.PatternFlowIpv4Identification) (PatternFlowIpv4Identification, error) + // FromPbText unmarshals PatternFlowIpv4Identification from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4Identification from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4Identification from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4Identification) Marshal() marshalPatternFlowIpv4Identification { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4Identification{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4Identification) Unmarshal() unMarshalPatternFlowIpv4Identification { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4Identification{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4Identification) ToProto() (*otg.PatternFlowIpv4Identification, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4Identification) FromProto(msg *otg.PatternFlowIpv4Identification) (PatternFlowIpv4Identification, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4Identification) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4Identification) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4Identification) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4Identification) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4Identification) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4Identification) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4Identification) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4Identification) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4Identification) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4Identification) Clone() (PatternFlowIpv4Identification, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4Identification() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4Identification) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4Identification is identification +type PatternFlowIpv4Identification interface { + Validation + // msg marshals PatternFlowIpv4Identification to protobuf object *otg.PatternFlowIpv4Identification + // and doesn't set defaults + msg() *otg.PatternFlowIpv4Identification + // setMsg unmarshals PatternFlowIpv4Identification from protobuf object *otg.PatternFlowIpv4Identification + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4Identification) PatternFlowIpv4Identification + // provides marshal interface + Marshal() marshalPatternFlowIpv4Identification + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4Identification + // validate validates PatternFlowIpv4Identification + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4Identification, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4IdentificationChoiceEnum, set in PatternFlowIpv4Identification + Choice() PatternFlowIpv4IdentificationChoiceEnum + // setChoice assigns PatternFlowIpv4IdentificationChoiceEnum provided by user to PatternFlowIpv4Identification + setChoice(value PatternFlowIpv4IdentificationChoiceEnum) PatternFlowIpv4Identification + // HasChoice checks if Choice has been set in PatternFlowIpv4Identification + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4Identification. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4Identification + SetValue(value uint32) PatternFlowIpv4Identification + // HasValue checks if Value has been set in PatternFlowIpv4Identification + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4Identification. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4Identification + SetValues(value []uint32) PatternFlowIpv4Identification + // Increment returns PatternFlowIpv4IdentificationCounter, set in PatternFlowIpv4Identification. + // PatternFlowIpv4IdentificationCounter is integer counter pattern + Increment() PatternFlowIpv4IdentificationCounter + // SetIncrement assigns PatternFlowIpv4IdentificationCounter provided by user to PatternFlowIpv4Identification. + // PatternFlowIpv4IdentificationCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4IdentificationCounter) PatternFlowIpv4Identification + // HasIncrement checks if Increment has been set in PatternFlowIpv4Identification + HasIncrement() bool + // Decrement returns PatternFlowIpv4IdentificationCounter, set in PatternFlowIpv4Identification. + // PatternFlowIpv4IdentificationCounter is integer counter pattern + Decrement() PatternFlowIpv4IdentificationCounter + // SetDecrement assigns PatternFlowIpv4IdentificationCounter provided by user to PatternFlowIpv4Identification. + // PatternFlowIpv4IdentificationCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4IdentificationCounter) PatternFlowIpv4Identification + // HasDecrement checks if Decrement has been set in PatternFlowIpv4Identification + HasDecrement() bool + // MetricTags returns PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIterIter, set in PatternFlowIpv4Identification + MetricTags() PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter + setNil() +} + +type PatternFlowIpv4IdentificationChoiceEnum string + +// Enum of Choice on PatternFlowIpv4Identification +var PatternFlowIpv4IdentificationChoice = struct { + VALUE PatternFlowIpv4IdentificationChoiceEnum + VALUES PatternFlowIpv4IdentificationChoiceEnum + INCREMENT PatternFlowIpv4IdentificationChoiceEnum + DECREMENT PatternFlowIpv4IdentificationChoiceEnum +}{ + VALUE: PatternFlowIpv4IdentificationChoiceEnum("value"), + VALUES: PatternFlowIpv4IdentificationChoiceEnum("values"), + INCREMENT: PatternFlowIpv4IdentificationChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4IdentificationChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4Identification) Choice() PatternFlowIpv4IdentificationChoiceEnum { + return PatternFlowIpv4IdentificationChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4Identification) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4Identification) setChoice(value PatternFlowIpv4IdentificationChoiceEnum) PatternFlowIpv4Identification { + intValue, ok := otg.PatternFlowIpv4Identification_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4IdentificationChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4Identification_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4IdentificationChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4IdentificationChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4IdentificationChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4IdentificationCounter().msg() + } + + if value == PatternFlowIpv4IdentificationChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4IdentificationCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4Identification) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4IdentificationChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4Identification) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4Identification object +func (obj *patternFlowIpv4Identification) SetValue(value uint32) PatternFlowIpv4Identification { + obj.setChoice(PatternFlowIpv4IdentificationChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4Identification) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4Identification object +func (obj *patternFlowIpv4Identification) SetValues(value []uint32) PatternFlowIpv4Identification { + obj.setChoice(PatternFlowIpv4IdentificationChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4IdentificationCounter +func (obj *patternFlowIpv4Identification) Increment() PatternFlowIpv4IdentificationCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4IdentificationChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4IdentificationCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4IdentificationCounter +func (obj *patternFlowIpv4Identification) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4IdentificationCounter value in the PatternFlowIpv4Identification object +func (obj *patternFlowIpv4Identification) SetIncrement(value PatternFlowIpv4IdentificationCounter) PatternFlowIpv4Identification { + obj.setChoice(PatternFlowIpv4IdentificationChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4IdentificationCounter +func (obj *patternFlowIpv4Identification) Decrement() PatternFlowIpv4IdentificationCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4IdentificationChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4IdentificationCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4IdentificationCounter +func (obj *patternFlowIpv4Identification) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4IdentificationCounter value in the PatternFlowIpv4Identification object +func (obj *patternFlowIpv4Identification) SetDecrement(value PatternFlowIpv4IdentificationCounter) PatternFlowIpv4Identification { + obj.setChoice(PatternFlowIpv4IdentificationChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4IdentificationMetricTag +func (obj *patternFlowIpv4Identification) MetricTags() PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4IdentificationMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter struct { + obj *patternFlowIpv4Identification + patternFlowIpv4IdentificationMetricTagSlice []PatternFlowIpv4IdentificationMetricTag + fieldPtr *[]*otg.PatternFlowIpv4IdentificationMetricTag +} + +func newPatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter(ptr *[]*otg.PatternFlowIpv4IdentificationMetricTag) PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter { + return &patternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter interface { + setMsg(*patternFlowIpv4Identification) PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter + Items() []PatternFlowIpv4IdentificationMetricTag + Add() PatternFlowIpv4IdentificationMetricTag + Append(items ...PatternFlowIpv4IdentificationMetricTag) PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter + Set(index int, newObj PatternFlowIpv4IdentificationMetricTag) PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter + Clear() PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter + clearHolderSlice() PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter + appendHolderSlice(item PatternFlowIpv4IdentificationMetricTag) PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter +} + +func (obj *patternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter) setMsg(msg *patternFlowIpv4Identification) PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4IdentificationMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter) Items() []PatternFlowIpv4IdentificationMetricTag { + return obj.patternFlowIpv4IdentificationMetricTagSlice +} + +func (obj *patternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter) Add() PatternFlowIpv4IdentificationMetricTag { + newObj := &otg.PatternFlowIpv4IdentificationMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4IdentificationMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4IdentificationMetricTagSlice = append(obj.patternFlowIpv4IdentificationMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter) Append(items ...PatternFlowIpv4IdentificationMetricTag) PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4IdentificationMetricTagSlice = append(obj.patternFlowIpv4IdentificationMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter) Set(index int, newObj PatternFlowIpv4IdentificationMetricTag) PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4IdentificationMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter) Clear() PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4IdentificationMetricTag{} + obj.patternFlowIpv4IdentificationMetricTagSlice = []PatternFlowIpv4IdentificationMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter) clearHolderSlice() PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter { + if len(obj.patternFlowIpv4IdentificationMetricTagSlice) > 0 { + obj.patternFlowIpv4IdentificationMetricTagSlice = []PatternFlowIpv4IdentificationMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter) appendHolderSlice(item PatternFlowIpv4IdentificationMetricTag) PatternFlowIpv4IdentificationPatternFlowIpv4IdentificationMetricTagIter { + obj.patternFlowIpv4IdentificationMetricTagSlice = append(obj.patternFlowIpv4IdentificationMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4Identification) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4Identification.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4Identification.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4IdentificationMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4Identification) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4IdentificationChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4IdentificationChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4IdentificationChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4IdentificationChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4IdentificationChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4IdentificationChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4Identification") + } + } else { + intVal := otg.PatternFlowIpv4Identification_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4Identification_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_identification_counter.go b/gosnappi/pattern_flow_ipv4_identification_counter.go new file mode 100644 index 00000000..c51e842c --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_identification_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4IdentificationCounter ***** +type patternFlowIpv4IdentificationCounter struct { + validation + obj *otg.PatternFlowIpv4IdentificationCounter + marshaller marshalPatternFlowIpv4IdentificationCounter + unMarshaller unMarshalPatternFlowIpv4IdentificationCounter +} + +func NewPatternFlowIpv4IdentificationCounter() PatternFlowIpv4IdentificationCounter { + obj := patternFlowIpv4IdentificationCounter{obj: &otg.PatternFlowIpv4IdentificationCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4IdentificationCounter) msg() *otg.PatternFlowIpv4IdentificationCounter { + return obj.obj +} + +func (obj *patternFlowIpv4IdentificationCounter) setMsg(msg *otg.PatternFlowIpv4IdentificationCounter) PatternFlowIpv4IdentificationCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4IdentificationCounter struct { + obj *patternFlowIpv4IdentificationCounter +} + +type marshalPatternFlowIpv4IdentificationCounter interface { + // ToProto marshals PatternFlowIpv4IdentificationCounter to protobuf object *otg.PatternFlowIpv4IdentificationCounter + ToProto() (*otg.PatternFlowIpv4IdentificationCounter, error) + // ToPbText marshals PatternFlowIpv4IdentificationCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4IdentificationCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4IdentificationCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4IdentificationCounter struct { + obj *patternFlowIpv4IdentificationCounter +} + +type unMarshalPatternFlowIpv4IdentificationCounter interface { + // FromProto unmarshals PatternFlowIpv4IdentificationCounter from protobuf object *otg.PatternFlowIpv4IdentificationCounter + FromProto(msg *otg.PatternFlowIpv4IdentificationCounter) (PatternFlowIpv4IdentificationCounter, error) + // FromPbText unmarshals PatternFlowIpv4IdentificationCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4IdentificationCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4IdentificationCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4IdentificationCounter) Marshal() marshalPatternFlowIpv4IdentificationCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4IdentificationCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4IdentificationCounter) Unmarshal() unMarshalPatternFlowIpv4IdentificationCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4IdentificationCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4IdentificationCounter) ToProto() (*otg.PatternFlowIpv4IdentificationCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4IdentificationCounter) FromProto(msg *otg.PatternFlowIpv4IdentificationCounter) (PatternFlowIpv4IdentificationCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4IdentificationCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4IdentificationCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4IdentificationCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4IdentificationCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4IdentificationCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4IdentificationCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4IdentificationCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4IdentificationCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4IdentificationCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4IdentificationCounter) Clone() (PatternFlowIpv4IdentificationCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4IdentificationCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4IdentificationCounter is integer counter pattern +type PatternFlowIpv4IdentificationCounter interface { + Validation + // msg marshals PatternFlowIpv4IdentificationCounter to protobuf object *otg.PatternFlowIpv4IdentificationCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4IdentificationCounter + // setMsg unmarshals PatternFlowIpv4IdentificationCounter from protobuf object *otg.PatternFlowIpv4IdentificationCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4IdentificationCounter) PatternFlowIpv4IdentificationCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4IdentificationCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4IdentificationCounter + // validate validates PatternFlowIpv4IdentificationCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4IdentificationCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4IdentificationCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4IdentificationCounter + SetStart(value uint32) PatternFlowIpv4IdentificationCounter + // HasStart checks if Start has been set in PatternFlowIpv4IdentificationCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4IdentificationCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4IdentificationCounter + SetStep(value uint32) PatternFlowIpv4IdentificationCounter + // HasStep checks if Step has been set in PatternFlowIpv4IdentificationCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4IdentificationCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4IdentificationCounter + SetCount(value uint32) PatternFlowIpv4IdentificationCounter + // HasCount checks if Count has been set in PatternFlowIpv4IdentificationCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4IdentificationCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4IdentificationCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4IdentificationCounter object +func (obj *patternFlowIpv4IdentificationCounter) SetStart(value uint32) PatternFlowIpv4IdentificationCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4IdentificationCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4IdentificationCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4IdentificationCounter object +func (obj *patternFlowIpv4IdentificationCounter) SetStep(value uint32) PatternFlowIpv4IdentificationCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4IdentificationCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4IdentificationCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4IdentificationCounter object +func (obj *patternFlowIpv4IdentificationCounter) SetCount(value uint32) PatternFlowIpv4IdentificationCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4IdentificationCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4IdentificationCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4IdentificationCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4IdentificationCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4IdentificationCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_identification_metric_tag.go b/gosnappi/pattern_flow_ipv4_identification_metric_tag.go new file mode 100644 index 00000000..d2968eb3 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_identification_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4IdentificationMetricTag ***** +type patternFlowIpv4IdentificationMetricTag struct { + validation + obj *otg.PatternFlowIpv4IdentificationMetricTag + marshaller marshalPatternFlowIpv4IdentificationMetricTag + unMarshaller unMarshalPatternFlowIpv4IdentificationMetricTag +} + +func NewPatternFlowIpv4IdentificationMetricTag() PatternFlowIpv4IdentificationMetricTag { + obj := patternFlowIpv4IdentificationMetricTag{obj: &otg.PatternFlowIpv4IdentificationMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4IdentificationMetricTag) msg() *otg.PatternFlowIpv4IdentificationMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4IdentificationMetricTag) setMsg(msg *otg.PatternFlowIpv4IdentificationMetricTag) PatternFlowIpv4IdentificationMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4IdentificationMetricTag struct { + obj *patternFlowIpv4IdentificationMetricTag +} + +type marshalPatternFlowIpv4IdentificationMetricTag interface { + // ToProto marshals PatternFlowIpv4IdentificationMetricTag to protobuf object *otg.PatternFlowIpv4IdentificationMetricTag + ToProto() (*otg.PatternFlowIpv4IdentificationMetricTag, error) + // ToPbText marshals PatternFlowIpv4IdentificationMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4IdentificationMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4IdentificationMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4IdentificationMetricTag struct { + obj *patternFlowIpv4IdentificationMetricTag +} + +type unMarshalPatternFlowIpv4IdentificationMetricTag interface { + // FromProto unmarshals PatternFlowIpv4IdentificationMetricTag from protobuf object *otg.PatternFlowIpv4IdentificationMetricTag + FromProto(msg *otg.PatternFlowIpv4IdentificationMetricTag) (PatternFlowIpv4IdentificationMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4IdentificationMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4IdentificationMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4IdentificationMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4IdentificationMetricTag) Marshal() marshalPatternFlowIpv4IdentificationMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4IdentificationMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4IdentificationMetricTag) Unmarshal() unMarshalPatternFlowIpv4IdentificationMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4IdentificationMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4IdentificationMetricTag) ToProto() (*otg.PatternFlowIpv4IdentificationMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4IdentificationMetricTag) FromProto(msg *otg.PatternFlowIpv4IdentificationMetricTag) (PatternFlowIpv4IdentificationMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4IdentificationMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4IdentificationMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4IdentificationMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4IdentificationMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4IdentificationMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4IdentificationMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4IdentificationMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4IdentificationMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4IdentificationMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4IdentificationMetricTag) Clone() (PatternFlowIpv4IdentificationMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4IdentificationMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4IdentificationMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4IdentificationMetricTag interface { + Validation + // msg marshals PatternFlowIpv4IdentificationMetricTag to protobuf object *otg.PatternFlowIpv4IdentificationMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4IdentificationMetricTag + // setMsg unmarshals PatternFlowIpv4IdentificationMetricTag from protobuf object *otg.PatternFlowIpv4IdentificationMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4IdentificationMetricTag) PatternFlowIpv4IdentificationMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4IdentificationMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4IdentificationMetricTag + // validate validates PatternFlowIpv4IdentificationMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4IdentificationMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4IdentificationMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4IdentificationMetricTag + SetName(value string) PatternFlowIpv4IdentificationMetricTag + // Offset returns uint32, set in PatternFlowIpv4IdentificationMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4IdentificationMetricTag + SetOffset(value uint32) PatternFlowIpv4IdentificationMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4IdentificationMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4IdentificationMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4IdentificationMetricTag + SetLength(value uint32) PatternFlowIpv4IdentificationMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4IdentificationMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4IdentificationMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4IdentificationMetricTag object +func (obj *patternFlowIpv4IdentificationMetricTag) SetName(value string) PatternFlowIpv4IdentificationMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4IdentificationMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4IdentificationMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4IdentificationMetricTag object +func (obj *patternFlowIpv4IdentificationMetricTag) SetOffset(value uint32) PatternFlowIpv4IdentificationMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4IdentificationMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4IdentificationMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4IdentificationMetricTag object +func (obj *patternFlowIpv4IdentificationMetricTag) SetLength(value uint32) PatternFlowIpv4IdentificationMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4IdentificationMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4IdentificationMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4IdentificationMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4IdentificationMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4IdentificationMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_more_fragments.go b/gosnappi/pattern_flow_ipv4_more_fragments.go new file mode 100644 index 00000000..f2d9fd6a --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_more_fragments.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4MoreFragments ***** +type patternFlowIpv4MoreFragments struct { + validation + obj *otg.PatternFlowIpv4MoreFragments + marshaller marshalPatternFlowIpv4MoreFragments + unMarshaller unMarshalPatternFlowIpv4MoreFragments + incrementHolder PatternFlowIpv4MoreFragmentsCounter + decrementHolder PatternFlowIpv4MoreFragmentsCounter + metricTagsHolder PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter +} + +func NewPatternFlowIpv4MoreFragments() PatternFlowIpv4MoreFragments { + obj := patternFlowIpv4MoreFragments{obj: &otg.PatternFlowIpv4MoreFragments{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4MoreFragments) msg() *otg.PatternFlowIpv4MoreFragments { + return obj.obj +} + +func (obj *patternFlowIpv4MoreFragments) setMsg(msg *otg.PatternFlowIpv4MoreFragments) PatternFlowIpv4MoreFragments { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4MoreFragments struct { + obj *patternFlowIpv4MoreFragments +} + +type marshalPatternFlowIpv4MoreFragments interface { + // ToProto marshals PatternFlowIpv4MoreFragments to protobuf object *otg.PatternFlowIpv4MoreFragments + ToProto() (*otg.PatternFlowIpv4MoreFragments, error) + // ToPbText marshals PatternFlowIpv4MoreFragments to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4MoreFragments to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4MoreFragments to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4MoreFragments struct { + obj *patternFlowIpv4MoreFragments +} + +type unMarshalPatternFlowIpv4MoreFragments interface { + // FromProto unmarshals PatternFlowIpv4MoreFragments from protobuf object *otg.PatternFlowIpv4MoreFragments + FromProto(msg *otg.PatternFlowIpv4MoreFragments) (PatternFlowIpv4MoreFragments, error) + // FromPbText unmarshals PatternFlowIpv4MoreFragments from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4MoreFragments from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4MoreFragments from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4MoreFragments) Marshal() marshalPatternFlowIpv4MoreFragments { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4MoreFragments{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4MoreFragments) Unmarshal() unMarshalPatternFlowIpv4MoreFragments { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4MoreFragments{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4MoreFragments) ToProto() (*otg.PatternFlowIpv4MoreFragments, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4MoreFragments) FromProto(msg *otg.PatternFlowIpv4MoreFragments) (PatternFlowIpv4MoreFragments, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4MoreFragments) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4MoreFragments) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4MoreFragments) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4MoreFragments) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4MoreFragments) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4MoreFragments) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4MoreFragments) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4MoreFragments) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4MoreFragments) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4MoreFragments) Clone() (PatternFlowIpv4MoreFragments, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4MoreFragments() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4MoreFragments) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4MoreFragments is more fragments flag +type PatternFlowIpv4MoreFragments interface { + Validation + // msg marshals PatternFlowIpv4MoreFragments to protobuf object *otg.PatternFlowIpv4MoreFragments + // and doesn't set defaults + msg() *otg.PatternFlowIpv4MoreFragments + // setMsg unmarshals PatternFlowIpv4MoreFragments from protobuf object *otg.PatternFlowIpv4MoreFragments + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4MoreFragments) PatternFlowIpv4MoreFragments + // provides marshal interface + Marshal() marshalPatternFlowIpv4MoreFragments + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4MoreFragments + // validate validates PatternFlowIpv4MoreFragments + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4MoreFragments, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4MoreFragmentsChoiceEnum, set in PatternFlowIpv4MoreFragments + Choice() PatternFlowIpv4MoreFragmentsChoiceEnum + // setChoice assigns PatternFlowIpv4MoreFragmentsChoiceEnum provided by user to PatternFlowIpv4MoreFragments + setChoice(value PatternFlowIpv4MoreFragmentsChoiceEnum) PatternFlowIpv4MoreFragments + // HasChoice checks if Choice has been set in PatternFlowIpv4MoreFragments + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4MoreFragments. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4MoreFragments + SetValue(value uint32) PatternFlowIpv4MoreFragments + // HasValue checks if Value has been set in PatternFlowIpv4MoreFragments + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4MoreFragments. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4MoreFragments + SetValues(value []uint32) PatternFlowIpv4MoreFragments + // Increment returns PatternFlowIpv4MoreFragmentsCounter, set in PatternFlowIpv4MoreFragments. + // PatternFlowIpv4MoreFragmentsCounter is integer counter pattern + Increment() PatternFlowIpv4MoreFragmentsCounter + // SetIncrement assigns PatternFlowIpv4MoreFragmentsCounter provided by user to PatternFlowIpv4MoreFragments. + // PatternFlowIpv4MoreFragmentsCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4MoreFragmentsCounter) PatternFlowIpv4MoreFragments + // HasIncrement checks if Increment has been set in PatternFlowIpv4MoreFragments + HasIncrement() bool + // Decrement returns PatternFlowIpv4MoreFragmentsCounter, set in PatternFlowIpv4MoreFragments. + // PatternFlowIpv4MoreFragmentsCounter is integer counter pattern + Decrement() PatternFlowIpv4MoreFragmentsCounter + // SetDecrement assigns PatternFlowIpv4MoreFragmentsCounter provided by user to PatternFlowIpv4MoreFragments. + // PatternFlowIpv4MoreFragmentsCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4MoreFragmentsCounter) PatternFlowIpv4MoreFragments + // HasDecrement checks if Decrement has been set in PatternFlowIpv4MoreFragments + HasDecrement() bool + // MetricTags returns PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIterIter, set in PatternFlowIpv4MoreFragments + MetricTags() PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter + setNil() +} + +type PatternFlowIpv4MoreFragmentsChoiceEnum string + +// Enum of Choice on PatternFlowIpv4MoreFragments +var PatternFlowIpv4MoreFragmentsChoice = struct { + VALUE PatternFlowIpv4MoreFragmentsChoiceEnum + VALUES PatternFlowIpv4MoreFragmentsChoiceEnum + INCREMENT PatternFlowIpv4MoreFragmentsChoiceEnum + DECREMENT PatternFlowIpv4MoreFragmentsChoiceEnum +}{ + VALUE: PatternFlowIpv4MoreFragmentsChoiceEnum("value"), + VALUES: PatternFlowIpv4MoreFragmentsChoiceEnum("values"), + INCREMENT: PatternFlowIpv4MoreFragmentsChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4MoreFragmentsChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4MoreFragments) Choice() PatternFlowIpv4MoreFragmentsChoiceEnum { + return PatternFlowIpv4MoreFragmentsChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4MoreFragments) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4MoreFragments) setChoice(value PatternFlowIpv4MoreFragmentsChoiceEnum) PatternFlowIpv4MoreFragments { + intValue, ok := otg.PatternFlowIpv4MoreFragments_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4MoreFragmentsChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4MoreFragments_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4MoreFragmentsChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4MoreFragmentsChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4MoreFragmentsChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4MoreFragmentsCounter().msg() + } + + if value == PatternFlowIpv4MoreFragmentsChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4MoreFragmentsCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4MoreFragments) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4MoreFragmentsChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4MoreFragments) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4MoreFragments object +func (obj *patternFlowIpv4MoreFragments) SetValue(value uint32) PatternFlowIpv4MoreFragments { + obj.setChoice(PatternFlowIpv4MoreFragmentsChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4MoreFragments) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4MoreFragments object +func (obj *patternFlowIpv4MoreFragments) SetValues(value []uint32) PatternFlowIpv4MoreFragments { + obj.setChoice(PatternFlowIpv4MoreFragmentsChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4MoreFragmentsCounter +func (obj *patternFlowIpv4MoreFragments) Increment() PatternFlowIpv4MoreFragmentsCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4MoreFragmentsChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4MoreFragmentsCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4MoreFragmentsCounter +func (obj *patternFlowIpv4MoreFragments) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4MoreFragmentsCounter value in the PatternFlowIpv4MoreFragments object +func (obj *patternFlowIpv4MoreFragments) SetIncrement(value PatternFlowIpv4MoreFragmentsCounter) PatternFlowIpv4MoreFragments { + obj.setChoice(PatternFlowIpv4MoreFragmentsChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4MoreFragmentsCounter +func (obj *patternFlowIpv4MoreFragments) Decrement() PatternFlowIpv4MoreFragmentsCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4MoreFragmentsChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4MoreFragmentsCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4MoreFragmentsCounter +func (obj *patternFlowIpv4MoreFragments) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4MoreFragmentsCounter value in the PatternFlowIpv4MoreFragments object +func (obj *patternFlowIpv4MoreFragments) SetDecrement(value PatternFlowIpv4MoreFragmentsCounter) PatternFlowIpv4MoreFragments { + obj.setChoice(PatternFlowIpv4MoreFragmentsChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4MoreFragmentsMetricTag +func (obj *patternFlowIpv4MoreFragments) MetricTags() PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4MoreFragmentsMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter struct { + obj *patternFlowIpv4MoreFragments + patternFlowIpv4MoreFragmentsMetricTagSlice []PatternFlowIpv4MoreFragmentsMetricTag + fieldPtr *[]*otg.PatternFlowIpv4MoreFragmentsMetricTag +} + +func newPatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter(ptr *[]*otg.PatternFlowIpv4MoreFragmentsMetricTag) PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter { + return &patternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter interface { + setMsg(*patternFlowIpv4MoreFragments) PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter + Items() []PatternFlowIpv4MoreFragmentsMetricTag + Add() PatternFlowIpv4MoreFragmentsMetricTag + Append(items ...PatternFlowIpv4MoreFragmentsMetricTag) PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter + Set(index int, newObj PatternFlowIpv4MoreFragmentsMetricTag) PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter + Clear() PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter + clearHolderSlice() PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter + appendHolderSlice(item PatternFlowIpv4MoreFragmentsMetricTag) PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter +} + +func (obj *patternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter) setMsg(msg *patternFlowIpv4MoreFragments) PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4MoreFragmentsMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter) Items() []PatternFlowIpv4MoreFragmentsMetricTag { + return obj.patternFlowIpv4MoreFragmentsMetricTagSlice +} + +func (obj *patternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter) Add() PatternFlowIpv4MoreFragmentsMetricTag { + newObj := &otg.PatternFlowIpv4MoreFragmentsMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4MoreFragmentsMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4MoreFragmentsMetricTagSlice = append(obj.patternFlowIpv4MoreFragmentsMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter) Append(items ...PatternFlowIpv4MoreFragmentsMetricTag) PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4MoreFragmentsMetricTagSlice = append(obj.patternFlowIpv4MoreFragmentsMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter) Set(index int, newObj PatternFlowIpv4MoreFragmentsMetricTag) PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4MoreFragmentsMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter) Clear() PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4MoreFragmentsMetricTag{} + obj.patternFlowIpv4MoreFragmentsMetricTagSlice = []PatternFlowIpv4MoreFragmentsMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter) clearHolderSlice() PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter { + if len(obj.patternFlowIpv4MoreFragmentsMetricTagSlice) > 0 { + obj.patternFlowIpv4MoreFragmentsMetricTagSlice = []PatternFlowIpv4MoreFragmentsMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter) appendHolderSlice(item PatternFlowIpv4MoreFragmentsMetricTag) PatternFlowIpv4MoreFragmentsPatternFlowIpv4MoreFragmentsMetricTagIter { + obj.patternFlowIpv4MoreFragmentsMetricTagSlice = append(obj.patternFlowIpv4MoreFragmentsMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4MoreFragments) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4MoreFragments.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4MoreFragments.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4MoreFragmentsMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4MoreFragments) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4MoreFragmentsChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4MoreFragmentsChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4MoreFragmentsChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4MoreFragmentsChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4MoreFragmentsChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4MoreFragmentsChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4MoreFragments") + } + } else { + intVal := otg.PatternFlowIpv4MoreFragments_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4MoreFragments_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_more_fragments_counter.go b/gosnappi/pattern_flow_ipv4_more_fragments_counter.go new file mode 100644 index 00000000..d00b9ae3 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_more_fragments_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4MoreFragmentsCounter ***** +type patternFlowIpv4MoreFragmentsCounter struct { + validation + obj *otg.PatternFlowIpv4MoreFragmentsCounter + marshaller marshalPatternFlowIpv4MoreFragmentsCounter + unMarshaller unMarshalPatternFlowIpv4MoreFragmentsCounter +} + +func NewPatternFlowIpv4MoreFragmentsCounter() PatternFlowIpv4MoreFragmentsCounter { + obj := patternFlowIpv4MoreFragmentsCounter{obj: &otg.PatternFlowIpv4MoreFragmentsCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4MoreFragmentsCounter) msg() *otg.PatternFlowIpv4MoreFragmentsCounter { + return obj.obj +} + +func (obj *patternFlowIpv4MoreFragmentsCounter) setMsg(msg *otg.PatternFlowIpv4MoreFragmentsCounter) PatternFlowIpv4MoreFragmentsCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4MoreFragmentsCounter struct { + obj *patternFlowIpv4MoreFragmentsCounter +} + +type marshalPatternFlowIpv4MoreFragmentsCounter interface { + // ToProto marshals PatternFlowIpv4MoreFragmentsCounter to protobuf object *otg.PatternFlowIpv4MoreFragmentsCounter + ToProto() (*otg.PatternFlowIpv4MoreFragmentsCounter, error) + // ToPbText marshals PatternFlowIpv4MoreFragmentsCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4MoreFragmentsCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4MoreFragmentsCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4MoreFragmentsCounter struct { + obj *patternFlowIpv4MoreFragmentsCounter +} + +type unMarshalPatternFlowIpv4MoreFragmentsCounter interface { + // FromProto unmarshals PatternFlowIpv4MoreFragmentsCounter from protobuf object *otg.PatternFlowIpv4MoreFragmentsCounter + FromProto(msg *otg.PatternFlowIpv4MoreFragmentsCounter) (PatternFlowIpv4MoreFragmentsCounter, error) + // FromPbText unmarshals PatternFlowIpv4MoreFragmentsCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4MoreFragmentsCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4MoreFragmentsCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4MoreFragmentsCounter) Marshal() marshalPatternFlowIpv4MoreFragmentsCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4MoreFragmentsCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4MoreFragmentsCounter) Unmarshal() unMarshalPatternFlowIpv4MoreFragmentsCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4MoreFragmentsCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4MoreFragmentsCounter) ToProto() (*otg.PatternFlowIpv4MoreFragmentsCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4MoreFragmentsCounter) FromProto(msg *otg.PatternFlowIpv4MoreFragmentsCounter) (PatternFlowIpv4MoreFragmentsCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4MoreFragmentsCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4MoreFragmentsCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4MoreFragmentsCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4MoreFragmentsCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4MoreFragmentsCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4MoreFragmentsCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4MoreFragmentsCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4MoreFragmentsCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4MoreFragmentsCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4MoreFragmentsCounter) Clone() (PatternFlowIpv4MoreFragmentsCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4MoreFragmentsCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4MoreFragmentsCounter is integer counter pattern +type PatternFlowIpv4MoreFragmentsCounter interface { + Validation + // msg marshals PatternFlowIpv4MoreFragmentsCounter to protobuf object *otg.PatternFlowIpv4MoreFragmentsCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4MoreFragmentsCounter + // setMsg unmarshals PatternFlowIpv4MoreFragmentsCounter from protobuf object *otg.PatternFlowIpv4MoreFragmentsCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4MoreFragmentsCounter) PatternFlowIpv4MoreFragmentsCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4MoreFragmentsCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4MoreFragmentsCounter + // validate validates PatternFlowIpv4MoreFragmentsCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4MoreFragmentsCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4MoreFragmentsCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4MoreFragmentsCounter + SetStart(value uint32) PatternFlowIpv4MoreFragmentsCounter + // HasStart checks if Start has been set in PatternFlowIpv4MoreFragmentsCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4MoreFragmentsCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4MoreFragmentsCounter + SetStep(value uint32) PatternFlowIpv4MoreFragmentsCounter + // HasStep checks if Step has been set in PatternFlowIpv4MoreFragmentsCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4MoreFragmentsCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4MoreFragmentsCounter + SetCount(value uint32) PatternFlowIpv4MoreFragmentsCounter + // HasCount checks if Count has been set in PatternFlowIpv4MoreFragmentsCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4MoreFragmentsCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4MoreFragmentsCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4MoreFragmentsCounter object +func (obj *patternFlowIpv4MoreFragmentsCounter) SetStart(value uint32) PatternFlowIpv4MoreFragmentsCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4MoreFragmentsCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4MoreFragmentsCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4MoreFragmentsCounter object +func (obj *patternFlowIpv4MoreFragmentsCounter) SetStep(value uint32) PatternFlowIpv4MoreFragmentsCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4MoreFragmentsCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4MoreFragmentsCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4MoreFragmentsCounter object +func (obj *patternFlowIpv4MoreFragmentsCounter) SetCount(value uint32) PatternFlowIpv4MoreFragmentsCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4MoreFragmentsCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4MoreFragmentsCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4MoreFragmentsCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4MoreFragmentsCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4MoreFragmentsCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_more_fragments_metric_tag.go b/gosnappi/pattern_flow_ipv4_more_fragments_metric_tag.go new file mode 100644 index 00000000..d0b80548 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_more_fragments_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4MoreFragmentsMetricTag ***** +type patternFlowIpv4MoreFragmentsMetricTag struct { + validation + obj *otg.PatternFlowIpv4MoreFragmentsMetricTag + marshaller marshalPatternFlowIpv4MoreFragmentsMetricTag + unMarshaller unMarshalPatternFlowIpv4MoreFragmentsMetricTag +} + +func NewPatternFlowIpv4MoreFragmentsMetricTag() PatternFlowIpv4MoreFragmentsMetricTag { + obj := patternFlowIpv4MoreFragmentsMetricTag{obj: &otg.PatternFlowIpv4MoreFragmentsMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4MoreFragmentsMetricTag) msg() *otg.PatternFlowIpv4MoreFragmentsMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4MoreFragmentsMetricTag) setMsg(msg *otg.PatternFlowIpv4MoreFragmentsMetricTag) PatternFlowIpv4MoreFragmentsMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4MoreFragmentsMetricTag struct { + obj *patternFlowIpv4MoreFragmentsMetricTag +} + +type marshalPatternFlowIpv4MoreFragmentsMetricTag interface { + // ToProto marshals PatternFlowIpv4MoreFragmentsMetricTag to protobuf object *otg.PatternFlowIpv4MoreFragmentsMetricTag + ToProto() (*otg.PatternFlowIpv4MoreFragmentsMetricTag, error) + // ToPbText marshals PatternFlowIpv4MoreFragmentsMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4MoreFragmentsMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4MoreFragmentsMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4MoreFragmentsMetricTag struct { + obj *patternFlowIpv4MoreFragmentsMetricTag +} + +type unMarshalPatternFlowIpv4MoreFragmentsMetricTag interface { + // FromProto unmarshals PatternFlowIpv4MoreFragmentsMetricTag from protobuf object *otg.PatternFlowIpv4MoreFragmentsMetricTag + FromProto(msg *otg.PatternFlowIpv4MoreFragmentsMetricTag) (PatternFlowIpv4MoreFragmentsMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4MoreFragmentsMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4MoreFragmentsMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4MoreFragmentsMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4MoreFragmentsMetricTag) Marshal() marshalPatternFlowIpv4MoreFragmentsMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4MoreFragmentsMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4MoreFragmentsMetricTag) Unmarshal() unMarshalPatternFlowIpv4MoreFragmentsMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4MoreFragmentsMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4MoreFragmentsMetricTag) ToProto() (*otg.PatternFlowIpv4MoreFragmentsMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4MoreFragmentsMetricTag) FromProto(msg *otg.PatternFlowIpv4MoreFragmentsMetricTag) (PatternFlowIpv4MoreFragmentsMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4MoreFragmentsMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4MoreFragmentsMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4MoreFragmentsMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4MoreFragmentsMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4MoreFragmentsMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4MoreFragmentsMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4MoreFragmentsMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4MoreFragmentsMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4MoreFragmentsMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4MoreFragmentsMetricTag) Clone() (PatternFlowIpv4MoreFragmentsMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4MoreFragmentsMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4MoreFragmentsMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4MoreFragmentsMetricTag interface { + Validation + // msg marshals PatternFlowIpv4MoreFragmentsMetricTag to protobuf object *otg.PatternFlowIpv4MoreFragmentsMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4MoreFragmentsMetricTag + // setMsg unmarshals PatternFlowIpv4MoreFragmentsMetricTag from protobuf object *otg.PatternFlowIpv4MoreFragmentsMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4MoreFragmentsMetricTag) PatternFlowIpv4MoreFragmentsMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4MoreFragmentsMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4MoreFragmentsMetricTag + // validate validates PatternFlowIpv4MoreFragmentsMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4MoreFragmentsMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4MoreFragmentsMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4MoreFragmentsMetricTag + SetName(value string) PatternFlowIpv4MoreFragmentsMetricTag + // Offset returns uint32, set in PatternFlowIpv4MoreFragmentsMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4MoreFragmentsMetricTag + SetOffset(value uint32) PatternFlowIpv4MoreFragmentsMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4MoreFragmentsMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4MoreFragmentsMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4MoreFragmentsMetricTag + SetLength(value uint32) PatternFlowIpv4MoreFragmentsMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4MoreFragmentsMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4MoreFragmentsMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4MoreFragmentsMetricTag object +func (obj *patternFlowIpv4MoreFragmentsMetricTag) SetName(value string) PatternFlowIpv4MoreFragmentsMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4MoreFragmentsMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4MoreFragmentsMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4MoreFragmentsMetricTag object +func (obj *patternFlowIpv4MoreFragmentsMetricTag) SetOffset(value uint32) PatternFlowIpv4MoreFragmentsMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4MoreFragmentsMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4MoreFragmentsMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4MoreFragmentsMetricTag object +func (obj *patternFlowIpv4MoreFragmentsMetricTag) SetLength(value uint32) PatternFlowIpv4MoreFragmentsMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4MoreFragmentsMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4MoreFragmentsMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4MoreFragmentsMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4MoreFragmentsMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4MoreFragmentsMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_options_custom_type_copied_flag.go b/gosnappi/pattern_flow_ipv4_options_custom_type_copied_flag.go new file mode 100644 index 00000000..f11470ad --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_options_custom_type_copied_flag.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4OptionsCustomTypeCopiedFlag ***** +type patternFlowIpv4OptionsCustomTypeCopiedFlag struct { + validation + obj *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag + marshaller marshalPatternFlowIpv4OptionsCustomTypeCopiedFlag + unMarshaller unMarshalPatternFlowIpv4OptionsCustomTypeCopiedFlag + incrementHolder PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + decrementHolder PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter +} + +func NewPatternFlowIpv4OptionsCustomTypeCopiedFlag() PatternFlowIpv4OptionsCustomTypeCopiedFlag { + obj := patternFlowIpv4OptionsCustomTypeCopiedFlag{obj: &otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) msg() *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag { + return obj.obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) setMsg(msg *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag) PatternFlowIpv4OptionsCustomTypeCopiedFlag { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4OptionsCustomTypeCopiedFlag struct { + obj *patternFlowIpv4OptionsCustomTypeCopiedFlag +} + +type marshalPatternFlowIpv4OptionsCustomTypeCopiedFlag interface { + // ToProto marshals PatternFlowIpv4OptionsCustomTypeCopiedFlag to protobuf object *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag + ToProto() (*otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag, error) + // ToPbText marshals PatternFlowIpv4OptionsCustomTypeCopiedFlag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4OptionsCustomTypeCopiedFlag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4OptionsCustomTypeCopiedFlag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4OptionsCustomTypeCopiedFlag struct { + obj *patternFlowIpv4OptionsCustomTypeCopiedFlag +} + +type unMarshalPatternFlowIpv4OptionsCustomTypeCopiedFlag interface { + // FromProto unmarshals PatternFlowIpv4OptionsCustomTypeCopiedFlag from protobuf object *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag + FromProto(msg *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag) (PatternFlowIpv4OptionsCustomTypeCopiedFlag, error) + // FromPbText unmarshals PatternFlowIpv4OptionsCustomTypeCopiedFlag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4OptionsCustomTypeCopiedFlag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4OptionsCustomTypeCopiedFlag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) Marshal() marshalPatternFlowIpv4OptionsCustomTypeCopiedFlag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4OptionsCustomTypeCopiedFlag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) Unmarshal() unMarshalPatternFlowIpv4OptionsCustomTypeCopiedFlag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4OptionsCustomTypeCopiedFlag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeCopiedFlag) ToProto() (*otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeCopiedFlag) FromProto(msg *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag) (PatternFlowIpv4OptionsCustomTypeCopiedFlag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeCopiedFlag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeCopiedFlag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeCopiedFlag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeCopiedFlag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeCopiedFlag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeCopiedFlag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) Clone() (PatternFlowIpv4OptionsCustomTypeCopiedFlag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4OptionsCustomTypeCopiedFlag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4OptionsCustomTypeCopiedFlag is this flag indicates this option is copied to all fragments on fragmentations. +type PatternFlowIpv4OptionsCustomTypeCopiedFlag interface { + Validation + // msg marshals PatternFlowIpv4OptionsCustomTypeCopiedFlag to protobuf object *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag + // setMsg unmarshals PatternFlowIpv4OptionsCustomTypeCopiedFlag from protobuf object *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag) PatternFlowIpv4OptionsCustomTypeCopiedFlag + // provides marshal interface + Marshal() marshalPatternFlowIpv4OptionsCustomTypeCopiedFlag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4OptionsCustomTypeCopiedFlag + // validate validates PatternFlowIpv4OptionsCustomTypeCopiedFlag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4OptionsCustomTypeCopiedFlag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum, set in PatternFlowIpv4OptionsCustomTypeCopiedFlag + Choice() PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum + // setChoice assigns PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum provided by user to PatternFlowIpv4OptionsCustomTypeCopiedFlag + setChoice(value PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum) PatternFlowIpv4OptionsCustomTypeCopiedFlag + // HasChoice checks if Choice has been set in PatternFlowIpv4OptionsCustomTypeCopiedFlag + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4OptionsCustomTypeCopiedFlag. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4OptionsCustomTypeCopiedFlag + SetValue(value uint32) PatternFlowIpv4OptionsCustomTypeCopiedFlag + // HasValue checks if Value has been set in PatternFlowIpv4OptionsCustomTypeCopiedFlag + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4OptionsCustomTypeCopiedFlag. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4OptionsCustomTypeCopiedFlag + SetValues(value []uint32) PatternFlowIpv4OptionsCustomTypeCopiedFlag + // Increment returns PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter, set in PatternFlowIpv4OptionsCustomTypeCopiedFlag. + // PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter is integer counter pattern + Increment() PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + // SetIncrement assigns PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter provided by user to PatternFlowIpv4OptionsCustomTypeCopiedFlag. + // PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) PatternFlowIpv4OptionsCustomTypeCopiedFlag + // HasIncrement checks if Increment has been set in PatternFlowIpv4OptionsCustomTypeCopiedFlag + HasIncrement() bool + // Decrement returns PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter, set in PatternFlowIpv4OptionsCustomTypeCopiedFlag. + // PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter is integer counter pattern + Decrement() PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + // SetDecrement assigns PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter provided by user to PatternFlowIpv4OptionsCustomTypeCopiedFlag. + // PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) PatternFlowIpv4OptionsCustomTypeCopiedFlag + // HasDecrement checks if Decrement has been set in PatternFlowIpv4OptionsCustomTypeCopiedFlag + HasDecrement() bool + setNil() +} + +type PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum string + +// Enum of Choice on PatternFlowIpv4OptionsCustomTypeCopiedFlag +var PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice = struct { + VALUE PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum + VALUES PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum + INCREMENT PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum + DECREMENT PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum +}{ + VALUE: PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum("value"), + VALUES: PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum("values"), + INCREMENT: PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) Choice() PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum { + return PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) setChoice(value PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum) PatternFlowIpv4OptionsCustomTypeCopiedFlag { + intValue, ok := otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4OptionsCustomTypeCopiedFlagCounter().msg() + } + + if value == PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4OptionsCustomTypeCopiedFlagCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4OptionsCustomTypeCopiedFlag object +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) SetValue(value uint32) PatternFlowIpv4OptionsCustomTypeCopiedFlag { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4OptionsCustomTypeCopiedFlag object +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) SetValues(value []uint32) PatternFlowIpv4OptionsCustomTypeCopiedFlag { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) Increment() PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4OptionsCustomTypeCopiedFlagCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter value in the PatternFlowIpv4OptionsCustomTypeCopiedFlag object +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) SetIncrement(value PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) PatternFlowIpv4OptionsCustomTypeCopiedFlag { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) Decrement() PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4OptionsCustomTypeCopiedFlagCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter value in the PatternFlowIpv4OptionsCustomTypeCopiedFlag object +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) SetDecrement(value PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) PatternFlowIpv4OptionsCustomTypeCopiedFlag { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4OptionsCustomTypeCopiedFlag.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4OptionsCustomTypeCopiedFlag.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlag) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4OptionsCustomTypeCopiedFlagChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeCopiedFlagChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4OptionsCustomTypeCopiedFlag") + } + } else { + intVal := otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_options_custom_type_copied_flag_counter.go b/gosnappi/pattern_flow_ipv4_options_custom_type_copied_flag_counter.go new file mode 100644 index 00000000..ca5d338e --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_options_custom_type_copied_flag_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter ***** +type patternFlowIpv4OptionsCustomTypeCopiedFlagCounter struct { + validation + obj *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + marshaller marshalPatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + unMarshaller unMarshalPatternFlowIpv4OptionsCustomTypeCopiedFlagCounter +} + +func NewPatternFlowIpv4OptionsCustomTypeCopiedFlagCounter() PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter { + obj := patternFlowIpv4OptionsCustomTypeCopiedFlagCounter{obj: &otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) msg() *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter { + return obj.obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) setMsg(msg *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4OptionsCustomTypeCopiedFlagCounter struct { + obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter +} + +type marshalPatternFlowIpv4OptionsCustomTypeCopiedFlagCounter interface { + // ToProto marshals PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter to protobuf object *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + ToProto() (*otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter, error) + // ToPbText marshals PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4OptionsCustomTypeCopiedFlagCounter struct { + obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter +} + +type unMarshalPatternFlowIpv4OptionsCustomTypeCopiedFlagCounter interface { + // FromProto unmarshals PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter from protobuf object *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + FromProto(msg *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) (PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter, error) + // FromPbText unmarshals PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) Marshal() marshalPatternFlowIpv4OptionsCustomTypeCopiedFlagCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4OptionsCustomTypeCopiedFlagCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) Unmarshal() unMarshalPatternFlowIpv4OptionsCustomTypeCopiedFlagCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4OptionsCustomTypeCopiedFlagCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) ToProto() (*otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) FromProto(msg *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) (PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) Clone() (PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4OptionsCustomTypeCopiedFlagCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter is integer counter pattern +type PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter interface { + Validation + // msg marshals PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter to protobuf object *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + // setMsg unmarshals PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter from protobuf object *otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter) PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + // validate validates PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + SetStart(value uint32) PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + // HasStart checks if Start has been set in PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + SetStep(value uint32) PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + // HasStep checks if Step has been set in PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + SetCount(value uint32) PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + // HasCount checks if Count has been set in PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter object +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) SetStart(value uint32) PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter object +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) SetStep(value uint32) PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter object +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) SetCount(value uint32) PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4OptionsCustomTypeCopiedFlagCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_options_custom_type_option_class.go b/gosnappi/pattern_flow_ipv4_options_custom_type_option_class.go new file mode 100644 index 00000000..b6153b6b --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_options_custom_type_option_class.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4OptionsCustomTypeOptionClass ***** +type patternFlowIpv4OptionsCustomTypeOptionClass struct { + validation + obj *otg.PatternFlowIpv4OptionsCustomTypeOptionClass + marshaller marshalPatternFlowIpv4OptionsCustomTypeOptionClass + unMarshaller unMarshalPatternFlowIpv4OptionsCustomTypeOptionClass + incrementHolder PatternFlowIpv4OptionsCustomTypeOptionClassCounter + decrementHolder PatternFlowIpv4OptionsCustomTypeOptionClassCounter +} + +func NewPatternFlowIpv4OptionsCustomTypeOptionClass() PatternFlowIpv4OptionsCustomTypeOptionClass { + obj := patternFlowIpv4OptionsCustomTypeOptionClass{obj: &otg.PatternFlowIpv4OptionsCustomTypeOptionClass{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) msg() *otg.PatternFlowIpv4OptionsCustomTypeOptionClass { + return obj.obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) setMsg(msg *otg.PatternFlowIpv4OptionsCustomTypeOptionClass) PatternFlowIpv4OptionsCustomTypeOptionClass { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4OptionsCustomTypeOptionClass struct { + obj *patternFlowIpv4OptionsCustomTypeOptionClass +} + +type marshalPatternFlowIpv4OptionsCustomTypeOptionClass interface { + // ToProto marshals PatternFlowIpv4OptionsCustomTypeOptionClass to protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionClass + ToProto() (*otg.PatternFlowIpv4OptionsCustomTypeOptionClass, error) + // ToPbText marshals PatternFlowIpv4OptionsCustomTypeOptionClass to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4OptionsCustomTypeOptionClass to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4OptionsCustomTypeOptionClass to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4OptionsCustomTypeOptionClass struct { + obj *patternFlowIpv4OptionsCustomTypeOptionClass +} + +type unMarshalPatternFlowIpv4OptionsCustomTypeOptionClass interface { + // FromProto unmarshals PatternFlowIpv4OptionsCustomTypeOptionClass from protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionClass + FromProto(msg *otg.PatternFlowIpv4OptionsCustomTypeOptionClass) (PatternFlowIpv4OptionsCustomTypeOptionClass, error) + // FromPbText unmarshals PatternFlowIpv4OptionsCustomTypeOptionClass from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4OptionsCustomTypeOptionClass from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4OptionsCustomTypeOptionClass from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) Marshal() marshalPatternFlowIpv4OptionsCustomTypeOptionClass { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4OptionsCustomTypeOptionClass{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) Unmarshal() unMarshalPatternFlowIpv4OptionsCustomTypeOptionClass { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4OptionsCustomTypeOptionClass{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionClass) ToProto() (*otg.PatternFlowIpv4OptionsCustomTypeOptionClass, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionClass) FromProto(msg *otg.PatternFlowIpv4OptionsCustomTypeOptionClass) (PatternFlowIpv4OptionsCustomTypeOptionClass, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionClass) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionClass) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionClass) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionClass) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionClass) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionClass) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) Clone() (PatternFlowIpv4OptionsCustomTypeOptionClass, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4OptionsCustomTypeOptionClass() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4OptionsCustomTypeOptionClass is option class [Ref:https://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml#ip-parameters-1]. +type PatternFlowIpv4OptionsCustomTypeOptionClass interface { + Validation + // msg marshals PatternFlowIpv4OptionsCustomTypeOptionClass to protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionClass + // and doesn't set defaults + msg() *otg.PatternFlowIpv4OptionsCustomTypeOptionClass + // setMsg unmarshals PatternFlowIpv4OptionsCustomTypeOptionClass from protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionClass + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4OptionsCustomTypeOptionClass) PatternFlowIpv4OptionsCustomTypeOptionClass + // provides marshal interface + Marshal() marshalPatternFlowIpv4OptionsCustomTypeOptionClass + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4OptionsCustomTypeOptionClass + // validate validates PatternFlowIpv4OptionsCustomTypeOptionClass + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4OptionsCustomTypeOptionClass, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum, set in PatternFlowIpv4OptionsCustomTypeOptionClass + Choice() PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum + // setChoice assigns PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum provided by user to PatternFlowIpv4OptionsCustomTypeOptionClass + setChoice(value PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum) PatternFlowIpv4OptionsCustomTypeOptionClass + // HasChoice checks if Choice has been set in PatternFlowIpv4OptionsCustomTypeOptionClass + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4OptionsCustomTypeOptionClass. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4OptionsCustomTypeOptionClass + SetValue(value uint32) PatternFlowIpv4OptionsCustomTypeOptionClass + // HasValue checks if Value has been set in PatternFlowIpv4OptionsCustomTypeOptionClass + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4OptionsCustomTypeOptionClass. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4OptionsCustomTypeOptionClass + SetValues(value []uint32) PatternFlowIpv4OptionsCustomTypeOptionClass + // Increment returns PatternFlowIpv4OptionsCustomTypeOptionClassCounter, set in PatternFlowIpv4OptionsCustomTypeOptionClass. + // PatternFlowIpv4OptionsCustomTypeOptionClassCounter is integer counter pattern + Increment() PatternFlowIpv4OptionsCustomTypeOptionClassCounter + // SetIncrement assigns PatternFlowIpv4OptionsCustomTypeOptionClassCounter provided by user to PatternFlowIpv4OptionsCustomTypeOptionClass. + // PatternFlowIpv4OptionsCustomTypeOptionClassCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4OptionsCustomTypeOptionClassCounter) PatternFlowIpv4OptionsCustomTypeOptionClass + // HasIncrement checks if Increment has been set in PatternFlowIpv4OptionsCustomTypeOptionClass + HasIncrement() bool + // Decrement returns PatternFlowIpv4OptionsCustomTypeOptionClassCounter, set in PatternFlowIpv4OptionsCustomTypeOptionClass. + // PatternFlowIpv4OptionsCustomTypeOptionClassCounter is integer counter pattern + Decrement() PatternFlowIpv4OptionsCustomTypeOptionClassCounter + // SetDecrement assigns PatternFlowIpv4OptionsCustomTypeOptionClassCounter provided by user to PatternFlowIpv4OptionsCustomTypeOptionClass. + // PatternFlowIpv4OptionsCustomTypeOptionClassCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4OptionsCustomTypeOptionClassCounter) PatternFlowIpv4OptionsCustomTypeOptionClass + // HasDecrement checks if Decrement has been set in PatternFlowIpv4OptionsCustomTypeOptionClass + HasDecrement() bool + setNil() +} + +type PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum string + +// Enum of Choice on PatternFlowIpv4OptionsCustomTypeOptionClass +var PatternFlowIpv4OptionsCustomTypeOptionClassChoice = struct { + VALUE PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum + VALUES PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum + INCREMENT PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum + DECREMENT PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum +}{ + VALUE: PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum("value"), + VALUES: PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum("values"), + INCREMENT: PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) Choice() PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum { + return PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) setChoice(value PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum) PatternFlowIpv4OptionsCustomTypeOptionClass { + intValue, ok := otg.PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4OptionsCustomTypeOptionClassChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4OptionsCustomTypeOptionClassChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4OptionsCustomTypeOptionClassChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4OptionsCustomTypeOptionClassCounter().msg() + } + + if value == PatternFlowIpv4OptionsCustomTypeOptionClassChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4OptionsCustomTypeOptionClassCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionClassChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4OptionsCustomTypeOptionClass object +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) SetValue(value uint32) PatternFlowIpv4OptionsCustomTypeOptionClass { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionClassChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4OptionsCustomTypeOptionClass object +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) SetValues(value []uint32) PatternFlowIpv4OptionsCustomTypeOptionClass { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionClassChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4OptionsCustomTypeOptionClassCounter +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) Increment() PatternFlowIpv4OptionsCustomTypeOptionClassCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionClassChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4OptionsCustomTypeOptionClassCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4OptionsCustomTypeOptionClassCounter +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4OptionsCustomTypeOptionClassCounter value in the PatternFlowIpv4OptionsCustomTypeOptionClass object +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) SetIncrement(value PatternFlowIpv4OptionsCustomTypeOptionClassCounter) PatternFlowIpv4OptionsCustomTypeOptionClass { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionClassChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4OptionsCustomTypeOptionClassCounter +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) Decrement() PatternFlowIpv4OptionsCustomTypeOptionClassCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionClassChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4OptionsCustomTypeOptionClassCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4OptionsCustomTypeOptionClassCounter +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4OptionsCustomTypeOptionClassCounter value in the PatternFlowIpv4OptionsCustomTypeOptionClass object +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) SetDecrement(value PatternFlowIpv4OptionsCustomTypeOptionClassCounter) PatternFlowIpv4OptionsCustomTypeOptionClass { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionClassChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4OptionsCustomTypeOptionClass.Value <= 3 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4OptionsCustomTypeOptionClass.Values <= 3 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClass) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4OptionsCustomTypeOptionClassChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4OptionsCustomTypeOptionClassChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4OptionsCustomTypeOptionClassChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4OptionsCustomTypeOptionClassChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4OptionsCustomTypeOptionClassChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionClassChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4OptionsCustomTypeOptionClass") + } + } else { + intVal := otg.PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4OptionsCustomTypeOptionClass_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_options_custom_type_option_class_counter.go b/gosnappi/pattern_flow_ipv4_options_custom_type_option_class_counter.go new file mode 100644 index 00000000..6c47864a --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_options_custom_type_option_class_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4OptionsCustomTypeOptionClassCounter ***** +type patternFlowIpv4OptionsCustomTypeOptionClassCounter struct { + validation + obj *otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter + marshaller marshalPatternFlowIpv4OptionsCustomTypeOptionClassCounter + unMarshaller unMarshalPatternFlowIpv4OptionsCustomTypeOptionClassCounter +} + +func NewPatternFlowIpv4OptionsCustomTypeOptionClassCounter() PatternFlowIpv4OptionsCustomTypeOptionClassCounter { + obj := patternFlowIpv4OptionsCustomTypeOptionClassCounter{obj: &otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) msg() *otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter { + return obj.obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) setMsg(msg *otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter) PatternFlowIpv4OptionsCustomTypeOptionClassCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4OptionsCustomTypeOptionClassCounter struct { + obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter +} + +type marshalPatternFlowIpv4OptionsCustomTypeOptionClassCounter interface { + // ToProto marshals PatternFlowIpv4OptionsCustomTypeOptionClassCounter to protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter + ToProto() (*otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter, error) + // ToPbText marshals PatternFlowIpv4OptionsCustomTypeOptionClassCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4OptionsCustomTypeOptionClassCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4OptionsCustomTypeOptionClassCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4OptionsCustomTypeOptionClassCounter struct { + obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter +} + +type unMarshalPatternFlowIpv4OptionsCustomTypeOptionClassCounter interface { + // FromProto unmarshals PatternFlowIpv4OptionsCustomTypeOptionClassCounter from protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter + FromProto(msg *otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter) (PatternFlowIpv4OptionsCustomTypeOptionClassCounter, error) + // FromPbText unmarshals PatternFlowIpv4OptionsCustomTypeOptionClassCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4OptionsCustomTypeOptionClassCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4OptionsCustomTypeOptionClassCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) Marshal() marshalPatternFlowIpv4OptionsCustomTypeOptionClassCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4OptionsCustomTypeOptionClassCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) Unmarshal() unMarshalPatternFlowIpv4OptionsCustomTypeOptionClassCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4OptionsCustomTypeOptionClassCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionClassCounter) ToProto() (*otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionClassCounter) FromProto(msg *otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter) (PatternFlowIpv4OptionsCustomTypeOptionClassCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionClassCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionClassCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionClassCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionClassCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionClassCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionClassCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) Clone() (PatternFlowIpv4OptionsCustomTypeOptionClassCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4OptionsCustomTypeOptionClassCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4OptionsCustomTypeOptionClassCounter is integer counter pattern +type PatternFlowIpv4OptionsCustomTypeOptionClassCounter interface { + Validation + // msg marshals PatternFlowIpv4OptionsCustomTypeOptionClassCounter to protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter + // setMsg unmarshals PatternFlowIpv4OptionsCustomTypeOptionClassCounter from protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter) PatternFlowIpv4OptionsCustomTypeOptionClassCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4OptionsCustomTypeOptionClassCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4OptionsCustomTypeOptionClassCounter + // validate validates PatternFlowIpv4OptionsCustomTypeOptionClassCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4OptionsCustomTypeOptionClassCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4OptionsCustomTypeOptionClassCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4OptionsCustomTypeOptionClassCounter + SetStart(value uint32) PatternFlowIpv4OptionsCustomTypeOptionClassCounter + // HasStart checks if Start has been set in PatternFlowIpv4OptionsCustomTypeOptionClassCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4OptionsCustomTypeOptionClassCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4OptionsCustomTypeOptionClassCounter + SetStep(value uint32) PatternFlowIpv4OptionsCustomTypeOptionClassCounter + // HasStep checks if Step has been set in PatternFlowIpv4OptionsCustomTypeOptionClassCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4OptionsCustomTypeOptionClassCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4OptionsCustomTypeOptionClassCounter + SetCount(value uint32) PatternFlowIpv4OptionsCustomTypeOptionClassCounter + // HasCount checks if Count has been set in PatternFlowIpv4OptionsCustomTypeOptionClassCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4OptionsCustomTypeOptionClassCounter object +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) SetStart(value uint32) PatternFlowIpv4OptionsCustomTypeOptionClassCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4OptionsCustomTypeOptionClassCounter object +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) SetStep(value uint32) PatternFlowIpv4OptionsCustomTypeOptionClassCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4OptionsCustomTypeOptionClassCounter object +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) SetCount(value uint32) PatternFlowIpv4OptionsCustomTypeOptionClassCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4OptionsCustomTypeOptionClassCounter.Start <= 3 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4OptionsCustomTypeOptionClassCounter.Step <= 3 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4OptionsCustomTypeOptionClassCounter.Count <= 3 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionClassCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_options_custom_type_option_number.go b/gosnappi/pattern_flow_ipv4_options_custom_type_option_number.go new file mode 100644 index 00000000..ab87c076 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_options_custom_type_option_number.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4OptionsCustomTypeOptionNumber ***** +type patternFlowIpv4OptionsCustomTypeOptionNumber struct { + validation + obj *otg.PatternFlowIpv4OptionsCustomTypeOptionNumber + marshaller marshalPatternFlowIpv4OptionsCustomTypeOptionNumber + unMarshaller unMarshalPatternFlowIpv4OptionsCustomTypeOptionNumber + incrementHolder PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + decrementHolder PatternFlowIpv4OptionsCustomTypeOptionNumberCounter +} + +func NewPatternFlowIpv4OptionsCustomTypeOptionNumber() PatternFlowIpv4OptionsCustomTypeOptionNumber { + obj := patternFlowIpv4OptionsCustomTypeOptionNumber{obj: &otg.PatternFlowIpv4OptionsCustomTypeOptionNumber{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) msg() *otg.PatternFlowIpv4OptionsCustomTypeOptionNumber { + return obj.obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) setMsg(msg *otg.PatternFlowIpv4OptionsCustomTypeOptionNumber) PatternFlowIpv4OptionsCustomTypeOptionNumber { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4OptionsCustomTypeOptionNumber struct { + obj *patternFlowIpv4OptionsCustomTypeOptionNumber +} + +type marshalPatternFlowIpv4OptionsCustomTypeOptionNumber interface { + // ToProto marshals PatternFlowIpv4OptionsCustomTypeOptionNumber to protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionNumber + ToProto() (*otg.PatternFlowIpv4OptionsCustomTypeOptionNumber, error) + // ToPbText marshals PatternFlowIpv4OptionsCustomTypeOptionNumber to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4OptionsCustomTypeOptionNumber to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4OptionsCustomTypeOptionNumber to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4OptionsCustomTypeOptionNumber struct { + obj *patternFlowIpv4OptionsCustomTypeOptionNumber +} + +type unMarshalPatternFlowIpv4OptionsCustomTypeOptionNumber interface { + // FromProto unmarshals PatternFlowIpv4OptionsCustomTypeOptionNumber from protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionNumber + FromProto(msg *otg.PatternFlowIpv4OptionsCustomTypeOptionNumber) (PatternFlowIpv4OptionsCustomTypeOptionNumber, error) + // FromPbText unmarshals PatternFlowIpv4OptionsCustomTypeOptionNumber from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4OptionsCustomTypeOptionNumber from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4OptionsCustomTypeOptionNumber from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) Marshal() marshalPatternFlowIpv4OptionsCustomTypeOptionNumber { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4OptionsCustomTypeOptionNumber{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) Unmarshal() unMarshalPatternFlowIpv4OptionsCustomTypeOptionNumber { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4OptionsCustomTypeOptionNumber{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionNumber) ToProto() (*otg.PatternFlowIpv4OptionsCustomTypeOptionNumber, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionNumber) FromProto(msg *otg.PatternFlowIpv4OptionsCustomTypeOptionNumber) (PatternFlowIpv4OptionsCustomTypeOptionNumber, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionNumber) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionNumber) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionNumber) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionNumber) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionNumber) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionNumber) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) Clone() (PatternFlowIpv4OptionsCustomTypeOptionNumber, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4OptionsCustomTypeOptionNumber() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4OptionsCustomTypeOptionNumber is option Number [Ref:https://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml#ip-parameters-1]. +type PatternFlowIpv4OptionsCustomTypeOptionNumber interface { + Validation + // msg marshals PatternFlowIpv4OptionsCustomTypeOptionNumber to protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionNumber + // and doesn't set defaults + msg() *otg.PatternFlowIpv4OptionsCustomTypeOptionNumber + // setMsg unmarshals PatternFlowIpv4OptionsCustomTypeOptionNumber from protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionNumber + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4OptionsCustomTypeOptionNumber) PatternFlowIpv4OptionsCustomTypeOptionNumber + // provides marshal interface + Marshal() marshalPatternFlowIpv4OptionsCustomTypeOptionNumber + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4OptionsCustomTypeOptionNumber + // validate validates PatternFlowIpv4OptionsCustomTypeOptionNumber + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4OptionsCustomTypeOptionNumber, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum, set in PatternFlowIpv4OptionsCustomTypeOptionNumber + Choice() PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum + // setChoice assigns PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum provided by user to PatternFlowIpv4OptionsCustomTypeOptionNumber + setChoice(value PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum) PatternFlowIpv4OptionsCustomTypeOptionNumber + // HasChoice checks if Choice has been set in PatternFlowIpv4OptionsCustomTypeOptionNumber + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4OptionsCustomTypeOptionNumber. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4OptionsCustomTypeOptionNumber + SetValue(value uint32) PatternFlowIpv4OptionsCustomTypeOptionNumber + // HasValue checks if Value has been set in PatternFlowIpv4OptionsCustomTypeOptionNumber + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4OptionsCustomTypeOptionNumber. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4OptionsCustomTypeOptionNumber + SetValues(value []uint32) PatternFlowIpv4OptionsCustomTypeOptionNumber + // Increment returns PatternFlowIpv4OptionsCustomTypeOptionNumberCounter, set in PatternFlowIpv4OptionsCustomTypeOptionNumber. + // PatternFlowIpv4OptionsCustomTypeOptionNumberCounter is integer counter pattern + Increment() PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + // SetIncrement assigns PatternFlowIpv4OptionsCustomTypeOptionNumberCounter provided by user to PatternFlowIpv4OptionsCustomTypeOptionNumber. + // PatternFlowIpv4OptionsCustomTypeOptionNumberCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) PatternFlowIpv4OptionsCustomTypeOptionNumber + // HasIncrement checks if Increment has been set in PatternFlowIpv4OptionsCustomTypeOptionNumber + HasIncrement() bool + // Decrement returns PatternFlowIpv4OptionsCustomTypeOptionNumberCounter, set in PatternFlowIpv4OptionsCustomTypeOptionNumber. + // PatternFlowIpv4OptionsCustomTypeOptionNumberCounter is integer counter pattern + Decrement() PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + // SetDecrement assigns PatternFlowIpv4OptionsCustomTypeOptionNumberCounter provided by user to PatternFlowIpv4OptionsCustomTypeOptionNumber. + // PatternFlowIpv4OptionsCustomTypeOptionNumberCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) PatternFlowIpv4OptionsCustomTypeOptionNumber + // HasDecrement checks if Decrement has been set in PatternFlowIpv4OptionsCustomTypeOptionNumber + HasDecrement() bool + setNil() +} + +type PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum string + +// Enum of Choice on PatternFlowIpv4OptionsCustomTypeOptionNumber +var PatternFlowIpv4OptionsCustomTypeOptionNumberChoice = struct { + VALUE PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum + VALUES PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum + INCREMENT PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum + DECREMENT PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum +}{ + VALUE: PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum("value"), + VALUES: PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum("values"), + INCREMENT: PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) Choice() PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum { + return PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) setChoice(value PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum) PatternFlowIpv4OptionsCustomTypeOptionNumber { + intValue, ok := otg.PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4OptionsCustomTypeOptionNumberCounter().msg() + } + + if value == PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4OptionsCustomTypeOptionNumberCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4OptionsCustomTypeOptionNumber object +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) SetValue(value uint32) PatternFlowIpv4OptionsCustomTypeOptionNumber { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4OptionsCustomTypeOptionNumber object +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) SetValues(value []uint32) PatternFlowIpv4OptionsCustomTypeOptionNumber { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4OptionsCustomTypeOptionNumberCounter +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) Increment() PatternFlowIpv4OptionsCustomTypeOptionNumberCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4OptionsCustomTypeOptionNumberCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4OptionsCustomTypeOptionNumberCounter +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4OptionsCustomTypeOptionNumberCounter value in the PatternFlowIpv4OptionsCustomTypeOptionNumber object +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) SetIncrement(value PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) PatternFlowIpv4OptionsCustomTypeOptionNumber { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4OptionsCustomTypeOptionNumberCounter +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) Decrement() PatternFlowIpv4OptionsCustomTypeOptionNumberCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4OptionsCustomTypeOptionNumberCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4OptionsCustomTypeOptionNumberCounter +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4OptionsCustomTypeOptionNumberCounter value in the PatternFlowIpv4OptionsCustomTypeOptionNumber object +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) SetDecrement(value PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) PatternFlowIpv4OptionsCustomTypeOptionNumber { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4OptionsCustomTypeOptionNumber.Value <= 31 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4OptionsCustomTypeOptionNumber.Values <= 31 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumber) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4OptionsCustomTypeOptionNumberChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4OptionsCustomTypeOptionNumberChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4OptionsCustomTypeOptionNumber") + } + } else { + intVal := otg.PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4OptionsCustomTypeOptionNumber_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_options_custom_type_option_number_counter.go b/gosnappi/pattern_flow_ipv4_options_custom_type_option_number_counter.go new file mode 100644 index 00000000..500aa3d4 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_options_custom_type_option_number_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4OptionsCustomTypeOptionNumberCounter ***** +type patternFlowIpv4OptionsCustomTypeOptionNumberCounter struct { + validation + obj *otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + marshaller marshalPatternFlowIpv4OptionsCustomTypeOptionNumberCounter + unMarshaller unMarshalPatternFlowIpv4OptionsCustomTypeOptionNumberCounter +} + +func NewPatternFlowIpv4OptionsCustomTypeOptionNumberCounter() PatternFlowIpv4OptionsCustomTypeOptionNumberCounter { + obj := patternFlowIpv4OptionsCustomTypeOptionNumberCounter{obj: &otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) msg() *otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter { + return obj.obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) setMsg(msg *otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) PatternFlowIpv4OptionsCustomTypeOptionNumberCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4OptionsCustomTypeOptionNumberCounter struct { + obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter +} + +type marshalPatternFlowIpv4OptionsCustomTypeOptionNumberCounter interface { + // ToProto marshals PatternFlowIpv4OptionsCustomTypeOptionNumberCounter to protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + ToProto() (*otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter, error) + // ToPbText marshals PatternFlowIpv4OptionsCustomTypeOptionNumberCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4OptionsCustomTypeOptionNumberCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4OptionsCustomTypeOptionNumberCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4OptionsCustomTypeOptionNumberCounter struct { + obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter +} + +type unMarshalPatternFlowIpv4OptionsCustomTypeOptionNumberCounter interface { + // FromProto unmarshals PatternFlowIpv4OptionsCustomTypeOptionNumberCounter from protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + FromProto(msg *otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) (PatternFlowIpv4OptionsCustomTypeOptionNumberCounter, error) + // FromPbText unmarshals PatternFlowIpv4OptionsCustomTypeOptionNumberCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4OptionsCustomTypeOptionNumberCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4OptionsCustomTypeOptionNumberCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) Marshal() marshalPatternFlowIpv4OptionsCustomTypeOptionNumberCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4OptionsCustomTypeOptionNumberCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) Unmarshal() unMarshalPatternFlowIpv4OptionsCustomTypeOptionNumberCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4OptionsCustomTypeOptionNumberCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionNumberCounter) ToProto() (*otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionNumberCounter) FromProto(msg *otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) (PatternFlowIpv4OptionsCustomTypeOptionNumberCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionNumberCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionNumberCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionNumberCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionNumberCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4OptionsCustomTypeOptionNumberCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4OptionsCustomTypeOptionNumberCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) Clone() (PatternFlowIpv4OptionsCustomTypeOptionNumberCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4OptionsCustomTypeOptionNumberCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4OptionsCustomTypeOptionNumberCounter is integer counter pattern +type PatternFlowIpv4OptionsCustomTypeOptionNumberCounter interface { + Validation + // msg marshals PatternFlowIpv4OptionsCustomTypeOptionNumberCounter to protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + // setMsg unmarshals PatternFlowIpv4OptionsCustomTypeOptionNumberCounter from protobuf object *otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter) PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4OptionsCustomTypeOptionNumberCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4OptionsCustomTypeOptionNumberCounter + // validate validates PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4OptionsCustomTypeOptionNumberCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4OptionsCustomTypeOptionNumberCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + SetStart(value uint32) PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + // HasStart checks if Start has been set in PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4OptionsCustomTypeOptionNumberCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + SetStep(value uint32) PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + // HasStep checks if Step has been set in PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4OptionsCustomTypeOptionNumberCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + SetCount(value uint32) PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + // HasCount checks if Count has been set in PatternFlowIpv4OptionsCustomTypeOptionNumberCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4OptionsCustomTypeOptionNumberCounter object +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) SetStart(value uint32) PatternFlowIpv4OptionsCustomTypeOptionNumberCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4OptionsCustomTypeOptionNumberCounter object +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) SetStep(value uint32) PatternFlowIpv4OptionsCustomTypeOptionNumberCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4OptionsCustomTypeOptionNumberCounter object +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) SetCount(value uint32) PatternFlowIpv4OptionsCustomTypeOptionNumberCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4OptionsCustomTypeOptionNumberCounter.Start <= 31 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4OptionsCustomTypeOptionNumberCounter.Step <= 31 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4OptionsCustomTypeOptionNumberCounter.Count <= 31 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4OptionsCustomTypeOptionNumberCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_priority_raw.go b/gosnappi/pattern_flow_ipv4_priority_raw.go new file mode 100644 index 00000000..0906d31c --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_priority_raw.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4PriorityRaw ***** +type patternFlowIpv4PriorityRaw struct { + validation + obj *otg.PatternFlowIpv4PriorityRaw + marshaller marshalPatternFlowIpv4PriorityRaw + unMarshaller unMarshalPatternFlowIpv4PriorityRaw + incrementHolder PatternFlowIpv4PriorityRawCounter + decrementHolder PatternFlowIpv4PriorityRawCounter + metricTagsHolder PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter +} + +func NewPatternFlowIpv4PriorityRaw() PatternFlowIpv4PriorityRaw { + obj := patternFlowIpv4PriorityRaw{obj: &otg.PatternFlowIpv4PriorityRaw{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4PriorityRaw) msg() *otg.PatternFlowIpv4PriorityRaw { + return obj.obj +} + +func (obj *patternFlowIpv4PriorityRaw) setMsg(msg *otg.PatternFlowIpv4PriorityRaw) PatternFlowIpv4PriorityRaw { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4PriorityRaw struct { + obj *patternFlowIpv4PriorityRaw +} + +type marshalPatternFlowIpv4PriorityRaw interface { + // ToProto marshals PatternFlowIpv4PriorityRaw to protobuf object *otg.PatternFlowIpv4PriorityRaw + ToProto() (*otg.PatternFlowIpv4PriorityRaw, error) + // ToPbText marshals PatternFlowIpv4PriorityRaw to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4PriorityRaw to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4PriorityRaw to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4PriorityRaw struct { + obj *patternFlowIpv4PriorityRaw +} + +type unMarshalPatternFlowIpv4PriorityRaw interface { + // FromProto unmarshals PatternFlowIpv4PriorityRaw from protobuf object *otg.PatternFlowIpv4PriorityRaw + FromProto(msg *otg.PatternFlowIpv4PriorityRaw) (PatternFlowIpv4PriorityRaw, error) + // FromPbText unmarshals PatternFlowIpv4PriorityRaw from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4PriorityRaw from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4PriorityRaw from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4PriorityRaw) Marshal() marshalPatternFlowIpv4PriorityRaw { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4PriorityRaw{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4PriorityRaw) Unmarshal() unMarshalPatternFlowIpv4PriorityRaw { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4PriorityRaw{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4PriorityRaw) ToProto() (*otg.PatternFlowIpv4PriorityRaw, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4PriorityRaw) FromProto(msg *otg.PatternFlowIpv4PriorityRaw) (PatternFlowIpv4PriorityRaw, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4PriorityRaw) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4PriorityRaw) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4PriorityRaw) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4PriorityRaw) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4PriorityRaw) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4PriorityRaw) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4PriorityRaw) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4PriorityRaw) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4PriorityRaw) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4PriorityRaw) Clone() (PatternFlowIpv4PriorityRaw, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4PriorityRaw() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4PriorityRaw) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4PriorityRaw is raw priority +type PatternFlowIpv4PriorityRaw interface { + Validation + // msg marshals PatternFlowIpv4PriorityRaw to protobuf object *otg.PatternFlowIpv4PriorityRaw + // and doesn't set defaults + msg() *otg.PatternFlowIpv4PriorityRaw + // setMsg unmarshals PatternFlowIpv4PriorityRaw from protobuf object *otg.PatternFlowIpv4PriorityRaw + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4PriorityRaw) PatternFlowIpv4PriorityRaw + // provides marshal interface + Marshal() marshalPatternFlowIpv4PriorityRaw + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4PriorityRaw + // validate validates PatternFlowIpv4PriorityRaw + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4PriorityRaw, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4PriorityRawChoiceEnum, set in PatternFlowIpv4PriorityRaw + Choice() PatternFlowIpv4PriorityRawChoiceEnum + // setChoice assigns PatternFlowIpv4PriorityRawChoiceEnum provided by user to PatternFlowIpv4PriorityRaw + setChoice(value PatternFlowIpv4PriorityRawChoiceEnum) PatternFlowIpv4PriorityRaw + // HasChoice checks if Choice has been set in PatternFlowIpv4PriorityRaw + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4PriorityRaw. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4PriorityRaw + SetValue(value uint32) PatternFlowIpv4PriorityRaw + // HasValue checks if Value has been set in PatternFlowIpv4PriorityRaw + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4PriorityRaw. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4PriorityRaw + SetValues(value []uint32) PatternFlowIpv4PriorityRaw + // Increment returns PatternFlowIpv4PriorityRawCounter, set in PatternFlowIpv4PriorityRaw. + // PatternFlowIpv4PriorityRawCounter is integer counter pattern + Increment() PatternFlowIpv4PriorityRawCounter + // SetIncrement assigns PatternFlowIpv4PriorityRawCounter provided by user to PatternFlowIpv4PriorityRaw. + // PatternFlowIpv4PriorityRawCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4PriorityRawCounter) PatternFlowIpv4PriorityRaw + // HasIncrement checks if Increment has been set in PatternFlowIpv4PriorityRaw + HasIncrement() bool + // Decrement returns PatternFlowIpv4PriorityRawCounter, set in PatternFlowIpv4PriorityRaw. + // PatternFlowIpv4PriorityRawCounter is integer counter pattern + Decrement() PatternFlowIpv4PriorityRawCounter + // SetDecrement assigns PatternFlowIpv4PriorityRawCounter provided by user to PatternFlowIpv4PriorityRaw. + // PatternFlowIpv4PriorityRawCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4PriorityRawCounter) PatternFlowIpv4PriorityRaw + // HasDecrement checks if Decrement has been set in PatternFlowIpv4PriorityRaw + HasDecrement() bool + // MetricTags returns PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIterIter, set in PatternFlowIpv4PriorityRaw + MetricTags() PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter + setNil() +} + +type PatternFlowIpv4PriorityRawChoiceEnum string + +// Enum of Choice on PatternFlowIpv4PriorityRaw +var PatternFlowIpv4PriorityRawChoice = struct { + VALUE PatternFlowIpv4PriorityRawChoiceEnum + VALUES PatternFlowIpv4PriorityRawChoiceEnum + INCREMENT PatternFlowIpv4PriorityRawChoiceEnum + DECREMENT PatternFlowIpv4PriorityRawChoiceEnum +}{ + VALUE: PatternFlowIpv4PriorityRawChoiceEnum("value"), + VALUES: PatternFlowIpv4PriorityRawChoiceEnum("values"), + INCREMENT: PatternFlowIpv4PriorityRawChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4PriorityRawChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4PriorityRaw) Choice() PatternFlowIpv4PriorityRawChoiceEnum { + return PatternFlowIpv4PriorityRawChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4PriorityRaw) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4PriorityRaw) setChoice(value PatternFlowIpv4PriorityRawChoiceEnum) PatternFlowIpv4PriorityRaw { + intValue, ok := otg.PatternFlowIpv4PriorityRaw_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4PriorityRawChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4PriorityRaw_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4PriorityRawChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4PriorityRawChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4PriorityRawChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4PriorityRawCounter().msg() + } + + if value == PatternFlowIpv4PriorityRawChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4PriorityRawCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4PriorityRaw) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4PriorityRawChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4PriorityRaw) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4PriorityRaw object +func (obj *patternFlowIpv4PriorityRaw) SetValue(value uint32) PatternFlowIpv4PriorityRaw { + obj.setChoice(PatternFlowIpv4PriorityRawChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4PriorityRaw) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4PriorityRaw object +func (obj *patternFlowIpv4PriorityRaw) SetValues(value []uint32) PatternFlowIpv4PriorityRaw { + obj.setChoice(PatternFlowIpv4PriorityRawChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4PriorityRawCounter +func (obj *patternFlowIpv4PriorityRaw) Increment() PatternFlowIpv4PriorityRawCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4PriorityRawChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4PriorityRawCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4PriorityRawCounter +func (obj *patternFlowIpv4PriorityRaw) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4PriorityRawCounter value in the PatternFlowIpv4PriorityRaw object +func (obj *patternFlowIpv4PriorityRaw) SetIncrement(value PatternFlowIpv4PriorityRawCounter) PatternFlowIpv4PriorityRaw { + obj.setChoice(PatternFlowIpv4PriorityRawChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4PriorityRawCounter +func (obj *patternFlowIpv4PriorityRaw) Decrement() PatternFlowIpv4PriorityRawCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4PriorityRawChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4PriorityRawCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4PriorityRawCounter +func (obj *patternFlowIpv4PriorityRaw) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4PriorityRawCounter value in the PatternFlowIpv4PriorityRaw object +func (obj *patternFlowIpv4PriorityRaw) SetDecrement(value PatternFlowIpv4PriorityRawCounter) PatternFlowIpv4PriorityRaw { + obj.setChoice(PatternFlowIpv4PriorityRawChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4PriorityRawMetricTag +func (obj *patternFlowIpv4PriorityRaw) MetricTags() PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4PriorityRawMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter struct { + obj *patternFlowIpv4PriorityRaw + patternFlowIpv4PriorityRawMetricTagSlice []PatternFlowIpv4PriorityRawMetricTag + fieldPtr *[]*otg.PatternFlowIpv4PriorityRawMetricTag +} + +func newPatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter(ptr *[]*otg.PatternFlowIpv4PriorityRawMetricTag) PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter { + return &patternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter interface { + setMsg(*patternFlowIpv4PriorityRaw) PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter + Items() []PatternFlowIpv4PriorityRawMetricTag + Add() PatternFlowIpv4PriorityRawMetricTag + Append(items ...PatternFlowIpv4PriorityRawMetricTag) PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter + Set(index int, newObj PatternFlowIpv4PriorityRawMetricTag) PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter + Clear() PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter + clearHolderSlice() PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter + appendHolderSlice(item PatternFlowIpv4PriorityRawMetricTag) PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter +} + +func (obj *patternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter) setMsg(msg *patternFlowIpv4PriorityRaw) PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4PriorityRawMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter) Items() []PatternFlowIpv4PriorityRawMetricTag { + return obj.patternFlowIpv4PriorityRawMetricTagSlice +} + +func (obj *patternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter) Add() PatternFlowIpv4PriorityRawMetricTag { + newObj := &otg.PatternFlowIpv4PriorityRawMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4PriorityRawMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4PriorityRawMetricTagSlice = append(obj.patternFlowIpv4PriorityRawMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter) Append(items ...PatternFlowIpv4PriorityRawMetricTag) PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4PriorityRawMetricTagSlice = append(obj.patternFlowIpv4PriorityRawMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter) Set(index int, newObj PatternFlowIpv4PriorityRawMetricTag) PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4PriorityRawMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter) Clear() PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4PriorityRawMetricTag{} + obj.patternFlowIpv4PriorityRawMetricTagSlice = []PatternFlowIpv4PriorityRawMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter) clearHolderSlice() PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter { + if len(obj.patternFlowIpv4PriorityRawMetricTagSlice) > 0 { + obj.patternFlowIpv4PriorityRawMetricTagSlice = []PatternFlowIpv4PriorityRawMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter) appendHolderSlice(item PatternFlowIpv4PriorityRawMetricTag) PatternFlowIpv4PriorityRawPatternFlowIpv4PriorityRawMetricTagIter { + obj.patternFlowIpv4PriorityRawMetricTagSlice = append(obj.patternFlowIpv4PriorityRawMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4PriorityRaw) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4PriorityRaw.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4PriorityRaw.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4PriorityRawMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4PriorityRaw) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4PriorityRawChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4PriorityRawChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4PriorityRawChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4PriorityRawChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4PriorityRawChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4PriorityRawChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4PriorityRaw") + } + } else { + intVal := otg.PatternFlowIpv4PriorityRaw_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4PriorityRaw_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_priority_raw_counter.go b/gosnappi/pattern_flow_ipv4_priority_raw_counter.go new file mode 100644 index 00000000..c80b2286 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_priority_raw_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4PriorityRawCounter ***** +type patternFlowIpv4PriorityRawCounter struct { + validation + obj *otg.PatternFlowIpv4PriorityRawCounter + marshaller marshalPatternFlowIpv4PriorityRawCounter + unMarshaller unMarshalPatternFlowIpv4PriorityRawCounter +} + +func NewPatternFlowIpv4PriorityRawCounter() PatternFlowIpv4PriorityRawCounter { + obj := patternFlowIpv4PriorityRawCounter{obj: &otg.PatternFlowIpv4PriorityRawCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4PriorityRawCounter) msg() *otg.PatternFlowIpv4PriorityRawCounter { + return obj.obj +} + +func (obj *patternFlowIpv4PriorityRawCounter) setMsg(msg *otg.PatternFlowIpv4PriorityRawCounter) PatternFlowIpv4PriorityRawCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4PriorityRawCounter struct { + obj *patternFlowIpv4PriorityRawCounter +} + +type marshalPatternFlowIpv4PriorityRawCounter interface { + // ToProto marshals PatternFlowIpv4PriorityRawCounter to protobuf object *otg.PatternFlowIpv4PriorityRawCounter + ToProto() (*otg.PatternFlowIpv4PriorityRawCounter, error) + // ToPbText marshals PatternFlowIpv4PriorityRawCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4PriorityRawCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4PriorityRawCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4PriorityRawCounter struct { + obj *patternFlowIpv4PriorityRawCounter +} + +type unMarshalPatternFlowIpv4PriorityRawCounter interface { + // FromProto unmarshals PatternFlowIpv4PriorityRawCounter from protobuf object *otg.PatternFlowIpv4PriorityRawCounter + FromProto(msg *otg.PatternFlowIpv4PriorityRawCounter) (PatternFlowIpv4PriorityRawCounter, error) + // FromPbText unmarshals PatternFlowIpv4PriorityRawCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4PriorityRawCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4PriorityRawCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4PriorityRawCounter) Marshal() marshalPatternFlowIpv4PriorityRawCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4PriorityRawCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4PriorityRawCounter) Unmarshal() unMarshalPatternFlowIpv4PriorityRawCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4PriorityRawCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4PriorityRawCounter) ToProto() (*otg.PatternFlowIpv4PriorityRawCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4PriorityRawCounter) FromProto(msg *otg.PatternFlowIpv4PriorityRawCounter) (PatternFlowIpv4PriorityRawCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4PriorityRawCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4PriorityRawCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4PriorityRawCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4PriorityRawCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4PriorityRawCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4PriorityRawCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4PriorityRawCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4PriorityRawCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4PriorityRawCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4PriorityRawCounter) Clone() (PatternFlowIpv4PriorityRawCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4PriorityRawCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4PriorityRawCounter is integer counter pattern +type PatternFlowIpv4PriorityRawCounter interface { + Validation + // msg marshals PatternFlowIpv4PriorityRawCounter to protobuf object *otg.PatternFlowIpv4PriorityRawCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4PriorityRawCounter + // setMsg unmarshals PatternFlowIpv4PriorityRawCounter from protobuf object *otg.PatternFlowIpv4PriorityRawCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4PriorityRawCounter) PatternFlowIpv4PriorityRawCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4PriorityRawCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4PriorityRawCounter + // validate validates PatternFlowIpv4PriorityRawCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4PriorityRawCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4PriorityRawCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4PriorityRawCounter + SetStart(value uint32) PatternFlowIpv4PriorityRawCounter + // HasStart checks if Start has been set in PatternFlowIpv4PriorityRawCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4PriorityRawCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4PriorityRawCounter + SetStep(value uint32) PatternFlowIpv4PriorityRawCounter + // HasStep checks if Step has been set in PatternFlowIpv4PriorityRawCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4PriorityRawCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4PriorityRawCounter + SetCount(value uint32) PatternFlowIpv4PriorityRawCounter + // HasCount checks if Count has been set in PatternFlowIpv4PriorityRawCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4PriorityRawCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4PriorityRawCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4PriorityRawCounter object +func (obj *patternFlowIpv4PriorityRawCounter) SetStart(value uint32) PatternFlowIpv4PriorityRawCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4PriorityRawCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4PriorityRawCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4PriorityRawCounter object +func (obj *patternFlowIpv4PriorityRawCounter) SetStep(value uint32) PatternFlowIpv4PriorityRawCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4PriorityRawCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4PriorityRawCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4PriorityRawCounter object +func (obj *patternFlowIpv4PriorityRawCounter) SetCount(value uint32) PatternFlowIpv4PriorityRawCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4PriorityRawCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4PriorityRawCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4PriorityRawCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4PriorityRawCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4PriorityRawCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_priority_raw_metric_tag.go b/gosnappi/pattern_flow_ipv4_priority_raw_metric_tag.go new file mode 100644 index 00000000..00cb3ccc --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_priority_raw_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4PriorityRawMetricTag ***** +type patternFlowIpv4PriorityRawMetricTag struct { + validation + obj *otg.PatternFlowIpv4PriorityRawMetricTag + marshaller marshalPatternFlowIpv4PriorityRawMetricTag + unMarshaller unMarshalPatternFlowIpv4PriorityRawMetricTag +} + +func NewPatternFlowIpv4PriorityRawMetricTag() PatternFlowIpv4PriorityRawMetricTag { + obj := patternFlowIpv4PriorityRawMetricTag{obj: &otg.PatternFlowIpv4PriorityRawMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4PriorityRawMetricTag) msg() *otg.PatternFlowIpv4PriorityRawMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4PriorityRawMetricTag) setMsg(msg *otg.PatternFlowIpv4PriorityRawMetricTag) PatternFlowIpv4PriorityRawMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4PriorityRawMetricTag struct { + obj *patternFlowIpv4PriorityRawMetricTag +} + +type marshalPatternFlowIpv4PriorityRawMetricTag interface { + // ToProto marshals PatternFlowIpv4PriorityRawMetricTag to protobuf object *otg.PatternFlowIpv4PriorityRawMetricTag + ToProto() (*otg.PatternFlowIpv4PriorityRawMetricTag, error) + // ToPbText marshals PatternFlowIpv4PriorityRawMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4PriorityRawMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4PriorityRawMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4PriorityRawMetricTag struct { + obj *patternFlowIpv4PriorityRawMetricTag +} + +type unMarshalPatternFlowIpv4PriorityRawMetricTag interface { + // FromProto unmarshals PatternFlowIpv4PriorityRawMetricTag from protobuf object *otg.PatternFlowIpv4PriorityRawMetricTag + FromProto(msg *otg.PatternFlowIpv4PriorityRawMetricTag) (PatternFlowIpv4PriorityRawMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4PriorityRawMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4PriorityRawMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4PriorityRawMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4PriorityRawMetricTag) Marshal() marshalPatternFlowIpv4PriorityRawMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4PriorityRawMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4PriorityRawMetricTag) Unmarshal() unMarshalPatternFlowIpv4PriorityRawMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4PriorityRawMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4PriorityRawMetricTag) ToProto() (*otg.PatternFlowIpv4PriorityRawMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4PriorityRawMetricTag) FromProto(msg *otg.PatternFlowIpv4PriorityRawMetricTag) (PatternFlowIpv4PriorityRawMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4PriorityRawMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4PriorityRawMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4PriorityRawMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4PriorityRawMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4PriorityRawMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4PriorityRawMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4PriorityRawMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4PriorityRawMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4PriorityRawMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4PriorityRawMetricTag) Clone() (PatternFlowIpv4PriorityRawMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4PriorityRawMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4PriorityRawMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4PriorityRawMetricTag interface { + Validation + // msg marshals PatternFlowIpv4PriorityRawMetricTag to protobuf object *otg.PatternFlowIpv4PriorityRawMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4PriorityRawMetricTag + // setMsg unmarshals PatternFlowIpv4PriorityRawMetricTag from protobuf object *otg.PatternFlowIpv4PriorityRawMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4PriorityRawMetricTag) PatternFlowIpv4PriorityRawMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4PriorityRawMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4PriorityRawMetricTag + // validate validates PatternFlowIpv4PriorityRawMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4PriorityRawMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4PriorityRawMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4PriorityRawMetricTag + SetName(value string) PatternFlowIpv4PriorityRawMetricTag + // Offset returns uint32, set in PatternFlowIpv4PriorityRawMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4PriorityRawMetricTag + SetOffset(value uint32) PatternFlowIpv4PriorityRawMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4PriorityRawMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4PriorityRawMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4PriorityRawMetricTag + SetLength(value uint32) PatternFlowIpv4PriorityRawMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4PriorityRawMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4PriorityRawMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4PriorityRawMetricTag object +func (obj *patternFlowIpv4PriorityRawMetricTag) SetName(value string) PatternFlowIpv4PriorityRawMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4PriorityRawMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4PriorityRawMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4PriorityRawMetricTag object +func (obj *patternFlowIpv4PriorityRawMetricTag) SetOffset(value uint32) PatternFlowIpv4PriorityRawMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4PriorityRawMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4PriorityRawMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4PriorityRawMetricTag object +func (obj *patternFlowIpv4PriorityRawMetricTag) SetLength(value uint32) PatternFlowIpv4PriorityRawMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4PriorityRawMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4PriorityRawMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4PriorityRawMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4PriorityRawMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4PriorityRawMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_protocol.go b/gosnappi/pattern_flow_ipv4_protocol.go new file mode 100644 index 00000000..3ec02538 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_protocol.go @@ -0,0 +1,712 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4Protocol ***** +type patternFlowIpv4Protocol struct { + validation + obj *otg.PatternFlowIpv4Protocol + marshaller marshalPatternFlowIpv4Protocol + unMarshaller unMarshalPatternFlowIpv4Protocol + incrementHolder PatternFlowIpv4ProtocolCounter + decrementHolder PatternFlowIpv4ProtocolCounter + metricTagsHolder PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter +} + +func NewPatternFlowIpv4Protocol() PatternFlowIpv4Protocol { + obj := patternFlowIpv4Protocol{obj: &otg.PatternFlowIpv4Protocol{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4Protocol) msg() *otg.PatternFlowIpv4Protocol { + return obj.obj +} + +func (obj *patternFlowIpv4Protocol) setMsg(msg *otg.PatternFlowIpv4Protocol) PatternFlowIpv4Protocol { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4Protocol struct { + obj *patternFlowIpv4Protocol +} + +type marshalPatternFlowIpv4Protocol interface { + // ToProto marshals PatternFlowIpv4Protocol to protobuf object *otg.PatternFlowIpv4Protocol + ToProto() (*otg.PatternFlowIpv4Protocol, error) + // ToPbText marshals PatternFlowIpv4Protocol to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4Protocol to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4Protocol to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4Protocol struct { + obj *patternFlowIpv4Protocol +} + +type unMarshalPatternFlowIpv4Protocol interface { + // FromProto unmarshals PatternFlowIpv4Protocol from protobuf object *otg.PatternFlowIpv4Protocol + FromProto(msg *otg.PatternFlowIpv4Protocol) (PatternFlowIpv4Protocol, error) + // FromPbText unmarshals PatternFlowIpv4Protocol from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4Protocol from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4Protocol from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4Protocol) Marshal() marshalPatternFlowIpv4Protocol { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4Protocol{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4Protocol) Unmarshal() unMarshalPatternFlowIpv4Protocol { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4Protocol{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4Protocol) ToProto() (*otg.PatternFlowIpv4Protocol, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4Protocol) FromProto(msg *otg.PatternFlowIpv4Protocol) (PatternFlowIpv4Protocol, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4Protocol) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4Protocol) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4Protocol) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4Protocol) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4Protocol) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4Protocol) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4Protocol) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4Protocol) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4Protocol) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4Protocol) Clone() (PatternFlowIpv4Protocol, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4Protocol() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4Protocol) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4Protocol is protocol, default is 61 any host internal protocol +type PatternFlowIpv4Protocol interface { + Validation + // msg marshals PatternFlowIpv4Protocol to protobuf object *otg.PatternFlowIpv4Protocol + // and doesn't set defaults + msg() *otg.PatternFlowIpv4Protocol + // setMsg unmarshals PatternFlowIpv4Protocol from protobuf object *otg.PatternFlowIpv4Protocol + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4Protocol) PatternFlowIpv4Protocol + // provides marshal interface + Marshal() marshalPatternFlowIpv4Protocol + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4Protocol + // validate validates PatternFlowIpv4Protocol + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4Protocol, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4ProtocolChoiceEnum, set in PatternFlowIpv4Protocol + Choice() PatternFlowIpv4ProtocolChoiceEnum + // setChoice assigns PatternFlowIpv4ProtocolChoiceEnum provided by user to PatternFlowIpv4Protocol + setChoice(value PatternFlowIpv4ProtocolChoiceEnum) PatternFlowIpv4Protocol + // HasChoice checks if Choice has been set in PatternFlowIpv4Protocol + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4Protocol. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4Protocol + SetValue(value uint32) PatternFlowIpv4Protocol + // HasValue checks if Value has been set in PatternFlowIpv4Protocol + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4Protocol. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4Protocol + SetValues(value []uint32) PatternFlowIpv4Protocol + // Auto returns uint32, set in PatternFlowIpv4Protocol. + Auto() uint32 + // HasAuto checks if Auto has been set in PatternFlowIpv4Protocol + HasAuto() bool + // Increment returns PatternFlowIpv4ProtocolCounter, set in PatternFlowIpv4Protocol. + // PatternFlowIpv4ProtocolCounter is integer counter pattern + Increment() PatternFlowIpv4ProtocolCounter + // SetIncrement assigns PatternFlowIpv4ProtocolCounter provided by user to PatternFlowIpv4Protocol. + // PatternFlowIpv4ProtocolCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4ProtocolCounter) PatternFlowIpv4Protocol + // HasIncrement checks if Increment has been set in PatternFlowIpv4Protocol + HasIncrement() bool + // Decrement returns PatternFlowIpv4ProtocolCounter, set in PatternFlowIpv4Protocol. + // PatternFlowIpv4ProtocolCounter is integer counter pattern + Decrement() PatternFlowIpv4ProtocolCounter + // SetDecrement assigns PatternFlowIpv4ProtocolCounter provided by user to PatternFlowIpv4Protocol. + // PatternFlowIpv4ProtocolCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4ProtocolCounter) PatternFlowIpv4Protocol + // HasDecrement checks if Decrement has been set in PatternFlowIpv4Protocol + HasDecrement() bool + // MetricTags returns PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIterIter, set in PatternFlowIpv4Protocol + MetricTags() PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter + setNil() +} + +type PatternFlowIpv4ProtocolChoiceEnum string + +// Enum of Choice on PatternFlowIpv4Protocol +var PatternFlowIpv4ProtocolChoice = struct { + VALUE PatternFlowIpv4ProtocolChoiceEnum + VALUES PatternFlowIpv4ProtocolChoiceEnum + AUTO PatternFlowIpv4ProtocolChoiceEnum + INCREMENT PatternFlowIpv4ProtocolChoiceEnum + DECREMENT PatternFlowIpv4ProtocolChoiceEnum +}{ + VALUE: PatternFlowIpv4ProtocolChoiceEnum("value"), + VALUES: PatternFlowIpv4ProtocolChoiceEnum("values"), + AUTO: PatternFlowIpv4ProtocolChoiceEnum("auto"), + INCREMENT: PatternFlowIpv4ProtocolChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4ProtocolChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4Protocol) Choice() PatternFlowIpv4ProtocolChoiceEnum { + return PatternFlowIpv4ProtocolChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4Protocol) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4Protocol) setChoice(value PatternFlowIpv4ProtocolChoiceEnum) PatternFlowIpv4Protocol { + intValue, ok := otg.PatternFlowIpv4Protocol_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4ProtocolChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4Protocol_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Auto = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4ProtocolChoice.VALUE { + defaultValue := uint32(61) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4ProtocolChoice.VALUES { + defaultValue := []uint32{61} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4ProtocolChoice.AUTO { + defaultValue := uint32(61) + obj.obj.Auto = &defaultValue + } + + if value == PatternFlowIpv4ProtocolChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4ProtocolCounter().msg() + } + + if value == PatternFlowIpv4ProtocolChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4ProtocolCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4Protocol) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4ProtocolChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4Protocol) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4Protocol object +func (obj *patternFlowIpv4Protocol) SetValue(value uint32) PatternFlowIpv4Protocol { + obj.setChoice(PatternFlowIpv4ProtocolChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4Protocol) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{61}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4Protocol object +func (obj *patternFlowIpv4Protocol) SetValues(value []uint32) PatternFlowIpv4Protocol { + obj.setChoice(PatternFlowIpv4ProtocolChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowIpv4Protocol) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowIpv4ProtocolChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowIpv4Protocol) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Increment returns a PatternFlowIpv4ProtocolCounter +func (obj *patternFlowIpv4Protocol) Increment() PatternFlowIpv4ProtocolCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4ProtocolChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4ProtocolCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4ProtocolCounter +func (obj *patternFlowIpv4Protocol) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4ProtocolCounter value in the PatternFlowIpv4Protocol object +func (obj *patternFlowIpv4Protocol) SetIncrement(value PatternFlowIpv4ProtocolCounter) PatternFlowIpv4Protocol { + obj.setChoice(PatternFlowIpv4ProtocolChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4ProtocolCounter +func (obj *patternFlowIpv4Protocol) Decrement() PatternFlowIpv4ProtocolCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4ProtocolChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4ProtocolCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4ProtocolCounter +func (obj *patternFlowIpv4Protocol) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4ProtocolCounter value in the PatternFlowIpv4Protocol object +func (obj *patternFlowIpv4Protocol) SetDecrement(value PatternFlowIpv4ProtocolCounter) PatternFlowIpv4Protocol { + obj.setChoice(PatternFlowIpv4ProtocolChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4ProtocolMetricTag +func (obj *patternFlowIpv4Protocol) MetricTags() PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4ProtocolMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter struct { + obj *patternFlowIpv4Protocol + patternFlowIpv4ProtocolMetricTagSlice []PatternFlowIpv4ProtocolMetricTag + fieldPtr *[]*otg.PatternFlowIpv4ProtocolMetricTag +} + +func newPatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter(ptr *[]*otg.PatternFlowIpv4ProtocolMetricTag) PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter { + return &patternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter interface { + setMsg(*patternFlowIpv4Protocol) PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter + Items() []PatternFlowIpv4ProtocolMetricTag + Add() PatternFlowIpv4ProtocolMetricTag + Append(items ...PatternFlowIpv4ProtocolMetricTag) PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter + Set(index int, newObj PatternFlowIpv4ProtocolMetricTag) PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter + Clear() PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter + clearHolderSlice() PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter + appendHolderSlice(item PatternFlowIpv4ProtocolMetricTag) PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter +} + +func (obj *patternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter) setMsg(msg *patternFlowIpv4Protocol) PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4ProtocolMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter) Items() []PatternFlowIpv4ProtocolMetricTag { + return obj.patternFlowIpv4ProtocolMetricTagSlice +} + +func (obj *patternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter) Add() PatternFlowIpv4ProtocolMetricTag { + newObj := &otg.PatternFlowIpv4ProtocolMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4ProtocolMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4ProtocolMetricTagSlice = append(obj.patternFlowIpv4ProtocolMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter) Append(items ...PatternFlowIpv4ProtocolMetricTag) PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4ProtocolMetricTagSlice = append(obj.patternFlowIpv4ProtocolMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter) Set(index int, newObj PatternFlowIpv4ProtocolMetricTag) PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4ProtocolMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter) Clear() PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4ProtocolMetricTag{} + obj.patternFlowIpv4ProtocolMetricTagSlice = []PatternFlowIpv4ProtocolMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter) clearHolderSlice() PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter { + if len(obj.patternFlowIpv4ProtocolMetricTagSlice) > 0 { + obj.patternFlowIpv4ProtocolMetricTagSlice = []PatternFlowIpv4ProtocolMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter) appendHolderSlice(item PatternFlowIpv4ProtocolMetricTag) PatternFlowIpv4ProtocolPatternFlowIpv4ProtocolMetricTagIter { + obj.patternFlowIpv4ProtocolMetricTagSlice = append(obj.patternFlowIpv4ProtocolMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4Protocol) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4Protocol.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4Protocol.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Auto != nil { + + if *obj.obj.Auto > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4Protocol.Auto <= 255 but Got %d", *obj.obj.Auto)) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4ProtocolMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4Protocol) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4ProtocolChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4ProtocolChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4ProtocolChoice.VALUES + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowIpv4ProtocolChoice.AUTO + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4ProtocolChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4ProtocolChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4ProtocolChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4Protocol") + } + } else { + intVal := otg.PatternFlowIpv4Protocol_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4Protocol_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_protocol_counter.go b/gosnappi/pattern_flow_ipv4_protocol_counter.go new file mode 100644 index 00000000..d97d323e --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_protocol_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4ProtocolCounter ***** +type patternFlowIpv4ProtocolCounter struct { + validation + obj *otg.PatternFlowIpv4ProtocolCounter + marshaller marshalPatternFlowIpv4ProtocolCounter + unMarshaller unMarshalPatternFlowIpv4ProtocolCounter +} + +func NewPatternFlowIpv4ProtocolCounter() PatternFlowIpv4ProtocolCounter { + obj := patternFlowIpv4ProtocolCounter{obj: &otg.PatternFlowIpv4ProtocolCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4ProtocolCounter) msg() *otg.PatternFlowIpv4ProtocolCounter { + return obj.obj +} + +func (obj *patternFlowIpv4ProtocolCounter) setMsg(msg *otg.PatternFlowIpv4ProtocolCounter) PatternFlowIpv4ProtocolCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4ProtocolCounter struct { + obj *patternFlowIpv4ProtocolCounter +} + +type marshalPatternFlowIpv4ProtocolCounter interface { + // ToProto marshals PatternFlowIpv4ProtocolCounter to protobuf object *otg.PatternFlowIpv4ProtocolCounter + ToProto() (*otg.PatternFlowIpv4ProtocolCounter, error) + // ToPbText marshals PatternFlowIpv4ProtocolCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4ProtocolCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4ProtocolCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4ProtocolCounter struct { + obj *patternFlowIpv4ProtocolCounter +} + +type unMarshalPatternFlowIpv4ProtocolCounter interface { + // FromProto unmarshals PatternFlowIpv4ProtocolCounter from protobuf object *otg.PatternFlowIpv4ProtocolCounter + FromProto(msg *otg.PatternFlowIpv4ProtocolCounter) (PatternFlowIpv4ProtocolCounter, error) + // FromPbText unmarshals PatternFlowIpv4ProtocolCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4ProtocolCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4ProtocolCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4ProtocolCounter) Marshal() marshalPatternFlowIpv4ProtocolCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4ProtocolCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4ProtocolCounter) Unmarshal() unMarshalPatternFlowIpv4ProtocolCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4ProtocolCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4ProtocolCounter) ToProto() (*otg.PatternFlowIpv4ProtocolCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4ProtocolCounter) FromProto(msg *otg.PatternFlowIpv4ProtocolCounter) (PatternFlowIpv4ProtocolCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4ProtocolCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4ProtocolCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4ProtocolCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4ProtocolCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4ProtocolCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4ProtocolCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4ProtocolCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4ProtocolCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4ProtocolCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4ProtocolCounter) Clone() (PatternFlowIpv4ProtocolCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4ProtocolCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4ProtocolCounter is integer counter pattern +type PatternFlowIpv4ProtocolCounter interface { + Validation + // msg marshals PatternFlowIpv4ProtocolCounter to protobuf object *otg.PatternFlowIpv4ProtocolCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4ProtocolCounter + // setMsg unmarshals PatternFlowIpv4ProtocolCounter from protobuf object *otg.PatternFlowIpv4ProtocolCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4ProtocolCounter) PatternFlowIpv4ProtocolCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4ProtocolCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4ProtocolCounter + // validate validates PatternFlowIpv4ProtocolCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4ProtocolCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4ProtocolCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4ProtocolCounter + SetStart(value uint32) PatternFlowIpv4ProtocolCounter + // HasStart checks if Start has been set in PatternFlowIpv4ProtocolCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4ProtocolCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4ProtocolCounter + SetStep(value uint32) PatternFlowIpv4ProtocolCounter + // HasStep checks if Step has been set in PatternFlowIpv4ProtocolCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4ProtocolCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4ProtocolCounter + SetCount(value uint32) PatternFlowIpv4ProtocolCounter + // HasCount checks if Count has been set in PatternFlowIpv4ProtocolCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4ProtocolCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4ProtocolCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4ProtocolCounter object +func (obj *patternFlowIpv4ProtocolCounter) SetStart(value uint32) PatternFlowIpv4ProtocolCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4ProtocolCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4ProtocolCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4ProtocolCounter object +func (obj *patternFlowIpv4ProtocolCounter) SetStep(value uint32) PatternFlowIpv4ProtocolCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4ProtocolCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4ProtocolCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4ProtocolCounter object +func (obj *patternFlowIpv4ProtocolCounter) SetCount(value uint32) PatternFlowIpv4ProtocolCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4ProtocolCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4ProtocolCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4ProtocolCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4ProtocolCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4ProtocolCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(61) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_protocol_metric_tag.go b/gosnappi/pattern_flow_ipv4_protocol_metric_tag.go new file mode 100644 index 00000000..2da57732 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_protocol_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4ProtocolMetricTag ***** +type patternFlowIpv4ProtocolMetricTag struct { + validation + obj *otg.PatternFlowIpv4ProtocolMetricTag + marshaller marshalPatternFlowIpv4ProtocolMetricTag + unMarshaller unMarshalPatternFlowIpv4ProtocolMetricTag +} + +func NewPatternFlowIpv4ProtocolMetricTag() PatternFlowIpv4ProtocolMetricTag { + obj := patternFlowIpv4ProtocolMetricTag{obj: &otg.PatternFlowIpv4ProtocolMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4ProtocolMetricTag) msg() *otg.PatternFlowIpv4ProtocolMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4ProtocolMetricTag) setMsg(msg *otg.PatternFlowIpv4ProtocolMetricTag) PatternFlowIpv4ProtocolMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4ProtocolMetricTag struct { + obj *patternFlowIpv4ProtocolMetricTag +} + +type marshalPatternFlowIpv4ProtocolMetricTag interface { + // ToProto marshals PatternFlowIpv4ProtocolMetricTag to protobuf object *otg.PatternFlowIpv4ProtocolMetricTag + ToProto() (*otg.PatternFlowIpv4ProtocolMetricTag, error) + // ToPbText marshals PatternFlowIpv4ProtocolMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4ProtocolMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4ProtocolMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4ProtocolMetricTag struct { + obj *patternFlowIpv4ProtocolMetricTag +} + +type unMarshalPatternFlowIpv4ProtocolMetricTag interface { + // FromProto unmarshals PatternFlowIpv4ProtocolMetricTag from protobuf object *otg.PatternFlowIpv4ProtocolMetricTag + FromProto(msg *otg.PatternFlowIpv4ProtocolMetricTag) (PatternFlowIpv4ProtocolMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4ProtocolMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4ProtocolMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4ProtocolMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4ProtocolMetricTag) Marshal() marshalPatternFlowIpv4ProtocolMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4ProtocolMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4ProtocolMetricTag) Unmarshal() unMarshalPatternFlowIpv4ProtocolMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4ProtocolMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4ProtocolMetricTag) ToProto() (*otg.PatternFlowIpv4ProtocolMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4ProtocolMetricTag) FromProto(msg *otg.PatternFlowIpv4ProtocolMetricTag) (PatternFlowIpv4ProtocolMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4ProtocolMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4ProtocolMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4ProtocolMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4ProtocolMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4ProtocolMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4ProtocolMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4ProtocolMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4ProtocolMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4ProtocolMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4ProtocolMetricTag) Clone() (PatternFlowIpv4ProtocolMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4ProtocolMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4ProtocolMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4ProtocolMetricTag interface { + Validation + // msg marshals PatternFlowIpv4ProtocolMetricTag to protobuf object *otg.PatternFlowIpv4ProtocolMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4ProtocolMetricTag + // setMsg unmarshals PatternFlowIpv4ProtocolMetricTag from protobuf object *otg.PatternFlowIpv4ProtocolMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4ProtocolMetricTag) PatternFlowIpv4ProtocolMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4ProtocolMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4ProtocolMetricTag + // validate validates PatternFlowIpv4ProtocolMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4ProtocolMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4ProtocolMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4ProtocolMetricTag + SetName(value string) PatternFlowIpv4ProtocolMetricTag + // Offset returns uint32, set in PatternFlowIpv4ProtocolMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4ProtocolMetricTag + SetOffset(value uint32) PatternFlowIpv4ProtocolMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4ProtocolMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4ProtocolMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4ProtocolMetricTag + SetLength(value uint32) PatternFlowIpv4ProtocolMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4ProtocolMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4ProtocolMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4ProtocolMetricTag object +func (obj *patternFlowIpv4ProtocolMetricTag) SetName(value string) PatternFlowIpv4ProtocolMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4ProtocolMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4ProtocolMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4ProtocolMetricTag object +func (obj *patternFlowIpv4ProtocolMetricTag) SetOffset(value uint32) PatternFlowIpv4ProtocolMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4ProtocolMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4ProtocolMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4ProtocolMetricTag object +func (obj *patternFlowIpv4ProtocolMetricTag) SetLength(value uint32) PatternFlowIpv4ProtocolMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4ProtocolMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4ProtocolMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4ProtocolMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4ProtocolMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4ProtocolMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_reserved.go b/gosnappi/pattern_flow_ipv4_reserved.go new file mode 100644 index 00000000..aacc2bd9 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_reserved.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4Reserved ***** +type patternFlowIpv4Reserved struct { + validation + obj *otg.PatternFlowIpv4Reserved + marshaller marshalPatternFlowIpv4Reserved + unMarshaller unMarshalPatternFlowIpv4Reserved + incrementHolder PatternFlowIpv4ReservedCounter + decrementHolder PatternFlowIpv4ReservedCounter + metricTagsHolder PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter +} + +func NewPatternFlowIpv4Reserved() PatternFlowIpv4Reserved { + obj := patternFlowIpv4Reserved{obj: &otg.PatternFlowIpv4Reserved{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4Reserved) msg() *otg.PatternFlowIpv4Reserved { + return obj.obj +} + +func (obj *patternFlowIpv4Reserved) setMsg(msg *otg.PatternFlowIpv4Reserved) PatternFlowIpv4Reserved { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4Reserved struct { + obj *patternFlowIpv4Reserved +} + +type marshalPatternFlowIpv4Reserved interface { + // ToProto marshals PatternFlowIpv4Reserved to protobuf object *otg.PatternFlowIpv4Reserved + ToProto() (*otg.PatternFlowIpv4Reserved, error) + // ToPbText marshals PatternFlowIpv4Reserved to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4Reserved to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4Reserved to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4Reserved struct { + obj *patternFlowIpv4Reserved +} + +type unMarshalPatternFlowIpv4Reserved interface { + // FromProto unmarshals PatternFlowIpv4Reserved from protobuf object *otg.PatternFlowIpv4Reserved + FromProto(msg *otg.PatternFlowIpv4Reserved) (PatternFlowIpv4Reserved, error) + // FromPbText unmarshals PatternFlowIpv4Reserved from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4Reserved from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4Reserved from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4Reserved) Marshal() marshalPatternFlowIpv4Reserved { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4Reserved{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4Reserved) Unmarshal() unMarshalPatternFlowIpv4Reserved { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4Reserved{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4Reserved) ToProto() (*otg.PatternFlowIpv4Reserved, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4Reserved) FromProto(msg *otg.PatternFlowIpv4Reserved) (PatternFlowIpv4Reserved, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4Reserved) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4Reserved) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4Reserved) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4Reserved) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4Reserved) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4Reserved) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4Reserved) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4Reserved) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4Reserved) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4Reserved) Clone() (PatternFlowIpv4Reserved, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4Reserved() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4Reserved) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4Reserved is reserved flag. +type PatternFlowIpv4Reserved interface { + Validation + // msg marshals PatternFlowIpv4Reserved to protobuf object *otg.PatternFlowIpv4Reserved + // and doesn't set defaults + msg() *otg.PatternFlowIpv4Reserved + // setMsg unmarshals PatternFlowIpv4Reserved from protobuf object *otg.PatternFlowIpv4Reserved + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4Reserved) PatternFlowIpv4Reserved + // provides marshal interface + Marshal() marshalPatternFlowIpv4Reserved + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4Reserved + // validate validates PatternFlowIpv4Reserved + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4Reserved, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4ReservedChoiceEnum, set in PatternFlowIpv4Reserved + Choice() PatternFlowIpv4ReservedChoiceEnum + // setChoice assigns PatternFlowIpv4ReservedChoiceEnum provided by user to PatternFlowIpv4Reserved + setChoice(value PatternFlowIpv4ReservedChoiceEnum) PatternFlowIpv4Reserved + // HasChoice checks if Choice has been set in PatternFlowIpv4Reserved + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4Reserved. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4Reserved + SetValue(value uint32) PatternFlowIpv4Reserved + // HasValue checks if Value has been set in PatternFlowIpv4Reserved + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4Reserved. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4Reserved + SetValues(value []uint32) PatternFlowIpv4Reserved + // Increment returns PatternFlowIpv4ReservedCounter, set in PatternFlowIpv4Reserved. + // PatternFlowIpv4ReservedCounter is integer counter pattern + Increment() PatternFlowIpv4ReservedCounter + // SetIncrement assigns PatternFlowIpv4ReservedCounter provided by user to PatternFlowIpv4Reserved. + // PatternFlowIpv4ReservedCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4ReservedCounter) PatternFlowIpv4Reserved + // HasIncrement checks if Increment has been set in PatternFlowIpv4Reserved + HasIncrement() bool + // Decrement returns PatternFlowIpv4ReservedCounter, set in PatternFlowIpv4Reserved. + // PatternFlowIpv4ReservedCounter is integer counter pattern + Decrement() PatternFlowIpv4ReservedCounter + // SetDecrement assigns PatternFlowIpv4ReservedCounter provided by user to PatternFlowIpv4Reserved. + // PatternFlowIpv4ReservedCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4ReservedCounter) PatternFlowIpv4Reserved + // HasDecrement checks if Decrement has been set in PatternFlowIpv4Reserved + HasDecrement() bool + // MetricTags returns PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIterIter, set in PatternFlowIpv4Reserved + MetricTags() PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter + setNil() +} + +type PatternFlowIpv4ReservedChoiceEnum string + +// Enum of Choice on PatternFlowIpv4Reserved +var PatternFlowIpv4ReservedChoice = struct { + VALUE PatternFlowIpv4ReservedChoiceEnum + VALUES PatternFlowIpv4ReservedChoiceEnum + INCREMENT PatternFlowIpv4ReservedChoiceEnum + DECREMENT PatternFlowIpv4ReservedChoiceEnum +}{ + VALUE: PatternFlowIpv4ReservedChoiceEnum("value"), + VALUES: PatternFlowIpv4ReservedChoiceEnum("values"), + INCREMENT: PatternFlowIpv4ReservedChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4ReservedChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4Reserved) Choice() PatternFlowIpv4ReservedChoiceEnum { + return PatternFlowIpv4ReservedChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4Reserved) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4Reserved) setChoice(value PatternFlowIpv4ReservedChoiceEnum) PatternFlowIpv4Reserved { + intValue, ok := otg.PatternFlowIpv4Reserved_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4ReservedChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4Reserved_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4ReservedChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4ReservedChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4ReservedChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4ReservedCounter().msg() + } + + if value == PatternFlowIpv4ReservedChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4ReservedCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4Reserved) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4ReservedChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4Reserved) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4Reserved object +func (obj *patternFlowIpv4Reserved) SetValue(value uint32) PatternFlowIpv4Reserved { + obj.setChoice(PatternFlowIpv4ReservedChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4Reserved) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4Reserved object +func (obj *patternFlowIpv4Reserved) SetValues(value []uint32) PatternFlowIpv4Reserved { + obj.setChoice(PatternFlowIpv4ReservedChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4ReservedCounter +func (obj *patternFlowIpv4Reserved) Increment() PatternFlowIpv4ReservedCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4ReservedChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4ReservedCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4ReservedCounter +func (obj *patternFlowIpv4Reserved) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4ReservedCounter value in the PatternFlowIpv4Reserved object +func (obj *patternFlowIpv4Reserved) SetIncrement(value PatternFlowIpv4ReservedCounter) PatternFlowIpv4Reserved { + obj.setChoice(PatternFlowIpv4ReservedChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4ReservedCounter +func (obj *patternFlowIpv4Reserved) Decrement() PatternFlowIpv4ReservedCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4ReservedChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4ReservedCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4ReservedCounter +func (obj *patternFlowIpv4Reserved) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4ReservedCounter value in the PatternFlowIpv4Reserved object +func (obj *patternFlowIpv4Reserved) SetDecrement(value PatternFlowIpv4ReservedCounter) PatternFlowIpv4Reserved { + obj.setChoice(PatternFlowIpv4ReservedChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4ReservedMetricTag +func (obj *patternFlowIpv4Reserved) MetricTags() PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4ReservedMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter struct { + obj *patternFlowIpv4Reserved + patternFlowIpv4ReservedMetricTagSlice []PatternFlowIpv4ReservedMetricTag + fieldPtr *[]*otg.PatternFlowIpv4ReservedMetricTag +} + +func newPatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter(ptr *[]*otg.PatternFlowIpv4ReservedMetricTag) PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter { + return &patternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter interface { + setMsg(*patternFlowIpv4Reserved) PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter + Items() []PatternFlowIpv4ReservedMetricTag + Add() PatternFlowIpv4ReservedMetricTag + Append(items ...PatternFlowIpv4ReservedMetricTag) PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter + Set(index int, newObj PatternFlowIpv4ReservedMetricTag) PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter + Clear() PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter + clearHolderSlice() PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter + appendHolderSlice(item PatternFlowIpv4ReservedMetricTag) PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter +} + +func (obj *patternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter) setMsg(msg *patternFlowIpv4Reserved) PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4ReservedMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter) Items() []PatternFlowIpv4ReservedMetricTag { + return obj.patternFlowIpv4ReservedMetricTagSlice +} + +func (obj *patternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter) Add() PatternFlowIpv4ReservedMetricTag { + newObj := &otg.PatternFlowIpv4ReservedMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4ReservedMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4ReservedMetricTagSlice = append(obj.patternFlowIpv4ReservedMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter) Append(items ...PatternFlowIpv4ReservedMetricTag) PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4ReservedMetricTagSlice = append(obj.patternFlowIpv4ReservedMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter) Set(index int, newObj PatternFlowIpv4ReservedMetricTag) PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4ReservedMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter) Clear() PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4ReservedMetricTag{} + obj.patternFlowIpv4ReservedMetricTagSlice = []PatternFlowIpv4ReservedMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter) clearHolderSlice() PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter { + if len(obj.patternFlowIpv4ReservedMetricTagSlice) > 0 { + obj.patternFlowIpv4ReservedMetricTagSlice = []PatternFlowIpv4ReservedMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter) appendHolderSlice(item PatternFlowIpv4ReservedMetricTag) PatternFlowIpv4ReservedPatternFlowIpv4ReservedMetricTagIter { + obj.patternFlowIpv4ReservedMetricTagSlice = append(obj.patternFlowIpv4ReservedMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4Reserved) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4Reserved.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4Reserved.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4ReservedMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4Reserved) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4ReservedChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4ReservedChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4ReservedChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4ReservedChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4ReservedChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4ReservedChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4Reserved") + } + } else { + intVal := otg.PatternFlowIpv4Reserved_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4Reserved_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_reserved_counter.go b/gosnappi/pattern_flow_ipv4_reserved_counter.go new file mode 100644 index 00000000..a9005b4b --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_reserved_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4ReservedCounter ***** +type patternFlowIpv4ReservedCounter struct { + validation + obj *otg.PatternFlowIpv4ReservedCounter + marshaller marshalPatternFlowIpv4ReservedCounter + unMarshaller unMarshalPatternFlowIpv4ReservedCounter +} + +func NewPatternFlowIpv4ReservedCounter() PatternFlowIpv4ReservedCounter { + obj := patternFlowIpv4ReservedCounter{obj: &otg.PatternFlowIpv4ReservedCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4ReservedCounter) msg() *otg.PatternFlowIpv4ReservedCounter { + return obj.obj +} + +func (obj *patternFlowIpv4ReservedCounter) setMsg(msg *otg.PatternFlowIpv4ReservedCounter) PatternFlowIpv4ReservedCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4ReservedCounter struct { + obj *patternFlowIpv4ReservedCounter +} + +type marshalPatternFlowIpv4ReservedCounter interface { + // ToProto marshals PatternFlowIpv4ReservedCounter to protobuf object *otg.PatternFlowIpv4ReservedCounter + ToProto() (*otg.PatternFlowIpv4ReservedCounter, error) + // ToPbText marshals PatternFlowIpv4ReservedCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4ReservedCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4ReservedCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4ReservedCounter struct { + obj *patternFlowIpv4ReservedCounter +} + +type unMarshalPatternFlowIpv4ReservedCounter interface { + // FromProto unmarshals PatternFlowIpv4ReservedCounter from protobuf object *otg.PatternFlowIpv4ReservedCounter + FromProto(msg *otg.PatternFlowIpv4ReservedCounter) (PatternFlowIpv4ReservedCounter, error) + // FromPbText unmarshals PatternFlowIpv4ReservedCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4ReservedCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4ReservedCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4ReservedCounter) Marshal() marshalPatternFlowIpv4ReservedCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4ReservedCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4ReservedCounter) Unmarshal() unMarshalPatternFlowIpv4ReservedCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4ReservedCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4ReservedCounter) ToProto() (*otg.PatternFlowIpv4ReservedCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4ReservedCounter) FromProto(msg *otg.PatternFlowIpv4ReservedCounter) (PatternFlowIpv4ReservedCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4ReservedCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4ReservedCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4ReservedCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4ReservedCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4ReservedCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4ReservedCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4ReservedCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4ReservedCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4ReservedCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4ReservedCounter) Clone() (PatternFlowIpv4ReservedCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4ReservedCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4ReservedCounter is integer counter pattern +type PatternFlowIpv4ReservedCounter interface { + Validation + // msg marshals PatternFlowIpv4ReservedCounter to protobuf object *otg.PatternFlowIpv4ReservedCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4ReservedCounter + // setMsg unmarshals PatternFlowIpv4ReservedCounter from protobuf object *otg.PatternFlowIpv4ReservedCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4ReservedCounter) PatternFlowIpv4ReservedCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4ReservedCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4ReservedCounter + // validate validates PatternFlowIpv4ReservedCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4ReservedCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4ReservedCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4ReservedCounter + SetStart(value uint32) PatternFlowIpv4ReservedCounter + // HasStart checks if Start has been set in PatternFlowIpv4ReservedCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4ReservedCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4ReservedCounter + SetStep(value uint32) PatternFlowIpv4ReservedCounter + // HasStep checks if Step has been set in PatternFlowIpv4ReservedCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4ReservedCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4ReservedCounter + SetCount(value uint32) PatternFlowIpv4ReservedCounter + // HasCount checks if Count has been set in PatternFlowIpv4ReservedCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4ReservedCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4ReservedCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4ReservedCounter object +func (obj *patternFlowIpv4ReservedCounter) SetStart(value uint32) PatternFlowIpv4ReservedCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4ReservedCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4ReservedCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4ReservedCounter object +func (obj *patternFlowIpv4ReservedCounter) SetStep(value uint32) PatternFlowIpv4ReservedCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4ReservedCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4ReservedCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4ReservedCounter object +func (obj *patternFlowIpv4ReservedCounter) SetCount(value uint32) PatternFlowIpv4ReservedCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4ReservedCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4ReservedCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4ReservedCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4ReservedCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4ReservedCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_reserved_metric_tag.go b/gosnappi/pattern_flow_ipv4_reserved_metric_tag.go new file mode 100644 index 00000000..80fe9d4b --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_reserved_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4ReservedMetricTag ***** +type patternFlowIpv4ReservedMetricTag struct { + validation + obj *otg.PatternFlowIpv4ReservedMetricTag + marshaller marshalPatternFlowIpv4ReservedMetricTag + unMarshaller unMarshalPatternFlowIpv4ReservedMetricTag +} + +func NewPatternFlowIpv4ReservedMetricTag() PatternFlowIpv4ReservedMetricTag { + obj := patternFlowIpv4ReservedMetricTag{obj: &otg.PatternFlowIpv4ReservedMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4ReservedMetricTag) msg() *otg.PatternFlowIpv4ReservedMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4ReservedMetricTag) setMsg(msg *otg.PatternFlowIpv4ReservedMetricTag) PatternFlowIpv4ReservedMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4ReservedMetricTag struct { + obj *patternFlowIpv4ReservedMetricTag +} + +type marshalPatternFlowIpv4ReservedMetricTag interface { + // ToProto marshals PatternFlowIpv4ReservedMetricTag to protobuf object *otg.PatternFlowIpv4ReservedMetricTag + ToProto() (*otg.PatternFlowIpv4ReservedMetricTag, error) + // ToPbText marshals PatternFlowIpv4ReservedMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4ReservedMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4ReservedMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4ReservedMetricTag struct { + obj *patternFlowIpv4ReservedMetricTag +} + +type unMarshalPatternFlowIpv4ReservedMetricTag interface { + // FromProto unmarshals PatternFlowIpv4ReservedMetricTag from protobuf object *otg.PatternFlowIpv4ReservedMetricTag + FromProto(msg *otg.PatternFlowIpv4ReservedMetricTag) (PatternFlowIpv4ReservedMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4ReservedMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4ReservedMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4ReservedMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4ReservedMetricTag) Marshal() marshalPatternFlowIpv4ReservedMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4ReservedMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4ReservedMetricTag) Unmarshal() unMarshalPatternFlowIpv4ReservedMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4ReservedMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4ReservedMetricTag) ToProto() (*otg.PatternFlowIpv4ReservedMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4ReservedMetricTag) FromProto(msg *otg.PatternFlowIpv4ReservedMetricTag) (PatternFlowIpv4ReservedMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4ReservedMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4ReservedMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4ReservedMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4ReservedMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4ReservedMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4ReservedMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4ReservedMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4ReservedMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4ReservedMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4ReservedMetricTag) Clone() (PatternFlowIpv4ReservedMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4ReservedMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4ReservedMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4ReservedMetricTag interface { + Validation + // msg marshals PatternFlowIpv4ReservedMetricTag to protobuf object *otg.PatternFlowIpv4ReservedMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4ReservedMetricTag + // setMsg unmarshals PatternFlowIpv4ReservedMetricTag from protobuf object *otg.PatternFlowIpv4ReservedMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4ReservedMetricTag) PatternFlowIpv4ReservedMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4ReservedMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4ReservedMetricTag + // validate validates PatternFlowIpv4ReservedMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4ReservedMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4ReservedMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4ReservedMetricTag + SetName(value string) PatternFlowIpv4ReservedMetricTag + // Offset returns uint32, set in PatternFlowIpv4ReservedMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4ReservedMetricTag + SetOffset(value uint32) PatternFlowIpv4ReservedMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4ReservedMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4ReservedMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4ReservedMetricTag + SetLength(value uint32) PatternFlowIpv4ReservedMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4ReservedMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4ReservedMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4ReservedMetricTag object +func (obj *patternFlowIpv4ReservedMetricTag) SetName(value string) PatternFlowIpv4ReservedMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4ReservedMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4ReservedMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4ReservedMetricTag object +func (obj *patternFlowIpv4ReservedMetricTag) SetOffset(value uint32) PatternFlowIpv4ReservedMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4ReservedMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4ReservedMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4ReservedMetricTag object +func (obj *patternFlowIpv4ReservedMetricTag) SetLength(value uint32) PatternFlowIpv4ReservedMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4ReservedMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4ReservedMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4ReservedMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4ReservedMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4ReservedMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_src.go b/gosnappi/pattern_flow_ipv4_src.go new file mode 100644 index 00000000..968e1648 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_src.go @@ -0,0 +1,757 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4Src ***** +type patternFlowIpv4Src struct { + validation + obj *otg.PatternFlowIpv4Src + marshaller marshalPatternFlowIpv4Src + unMarshaller unMarshalPatternFlowIpv4Src + incrementHolder PatternFlowIpv4SrcCounter + decrementHolder PatternFlowIpv4SrcCounter + metricTagsHolder PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter + autoHolder FlowIpv4Auto + randomHolder PatternFlowIpv4SrcRandom +} + +func NewPatternFlowIpv4Src() PatternFlowIpv4Src { + obj := patternFlowIpv4Src{obj: &otg.PatternFlowIpv4Src{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4Src) msg() *otg.PatternFlowIpv4Src { + return obj.obj +} + +func (obj *patternFlowIpv4Src) setMsg(msg *otg.PatternFlowIpv4Src) PatternFlowIpv4Src { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4Src struct { + obj *patternFlowIpv4Src +} + +type marshalPatternFlowIpv4Src interface { + // ToProto marshals PatternFlowIpv4Src to protobuf object *otg.PatternFlowIpv4Src + ToProto() (*otg.PatternFlowIpv4Src, error) + // ToPbText marshals PatternFlowIpv4Src to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4Src to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4Src to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4Src struct { + obj *patternFlowIpv4Src +} + +type unMarshalPatternFlowIpv4Src interface { + // FromProto unmarshals PatternFlowIpv4Src from protobuf object *otg.PatternFlowIpv4Src + FromProto(msg *otg.PatternFlowIpv4Src) (PatternFlowIpv4Src, error) + // FromPbText unmarshals PatternFlowIpv4Src from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4Src from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4Src from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4Src) Marshal() marshalPatternFlowIpv4Src { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4Src{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4Src) Unmarshal() unMarshalPatternFlowIpv4Src { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4Src{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4Src) ToProto() (*otg.PatternFlowIpv4Src, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4Src) FromProto(msg *otg.PatternFlowIpv4Src) (PatternFlowIpv4Src, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4Src) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4Src) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4Src) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4Src) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4Src) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4Src) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4Src) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4Src) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4Src) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4Src) Clone() (PatternFlowIpv4Src, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4Src() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4Src) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.autoHolder = nil + obj.randomHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4Src is source address +type PatternFlowIpv4Src interface { + Validation + // msg marshals PatternFlowIpv4Src to protobuf object *otg.PatternFlowIpv4Src + // and doesn't set defaults + msg() *otg.PatternFlowIpv4Src + // setMsg unmarshals PatternFlowIpv4Src from protobuf object *otg.PatternFlowIpv4Src + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4Src) PatternFlowIpv4Src + // provides marshal interface + Marshal() marshalPatternFlowIpv4Src + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4Src + // validate validates PatternFlowIpv4Src + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4Src, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4SrcChoiceEnum, set in PatternFlowIpv4Src + Choice() PatternFlowIpv4SrcChoiceEnum + // setChoice assigns PatternFlowIpv4SrcChoiceEnum provided by user to PatternFlowIpv4Src + setChoice(value PatternFlowIpv4SrcChoiceEnum) PatternFlowIpv4Src + // HasChoice checks if Choice has been set in PatternFlowIpv4Src + HasChoice() bool + // Value returns string, set in PatternFlowIpv4Src. + Value() string + // SetValue assigns string provided by user to PatternFlowIpv4Src + SetValue(value string) PatternFlowIpv4Src + // HasValue checks if Value has been set in PatternFlowIpv4Src + HasValue() bool + // Values returns []string, set in PatternFlowIpv4Src. + Values() []string + // SetValues assigns []string provided by user to PatternFlowIpv4Src + SetValues(value []string) PatternFlowIpv4Src + // Increment returns PatternFlowIpv4SrcCounter, set in PatternFlowIpv4Src. + // PatternFlowIpv4SrcCounter is ipv4 counter pattern + Increment() PatternFlowIpv4SrcCounter + // SetIncrement assigns PatternFlowIpv4SrcCounter provided by user to PatternFlowIpv4Src. + // PatternFlowIpv4SrcCounter is ipv4 counter pattern + SetIncrement(value PatternFlowIpv4SrcCounter) PatternFlowIpv4Src + // HasIncrement checks if Increment has been set in PatternFlowIpv4Src + HasIncrement() bool + // Decrement returns PatternFlowIpv4SrcCounter, set in PatternFlowIpv4Src. + // PatternFlowIpv4SrcCounter is ipv4 counter pattern + Decrement() PatternFlowIpv4SrcCounter + // SetDecrement assigns PatternFlowIpv4SrcCounter provided by user to PatternFlowIpv4Src. + // PatternFlowIpv4SrcCounter is ipv4 counter pattern + SetDecrement(value PatternFlowIpv4SrcCounter) PatternFlowIpv4Src + // HasDecrement checks if Decrement has been set in PatternFlowIpv4Src + HasDecrement() bool + // MetricTags returns PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIterIter, set in PatternFlowIpv4Src + MetricTags() PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter + // Auto returns FlowIpv4Auto, set in PatternFlowIpv4Src. + // FlowIpv4Auto is the OTG implementation can provide a system generated, value for this property. + Auto() FlowIpv4Auto + // HasAuto checks if Auto has been set in PatternFlowIpv4Src + HasAuto() bool + // Random returns PatternFlowIpv4SrcRandom, set in PatternFlowIpv4Src. + // PatternFlowIpv4SrcRandom is ipv4 random pattern + Random() PatternFlowIpv4SrcRandom + // SetRandom assigns PatternFlowIpv4SrcRandom provided by user to PatternFlowIpv4Src. + // PatternFlowIpv4SrcRandom is ipv4 random pattern + SetRandom(value PatternFlowIpv4SrcRandom) PatternFlowIpv4Src + // HasRandom checks if Random has been set in PatternFlowIpv4Src + HasRandom() bool + setNil() +} + +type PatternFlowIpv4SrcChoiceEnum string + +// Enum of Choice on PatternFlowIpv4Src +var PatternFlowIpv4SrcChoice = struct { + VALUE PatternFlowIpv4SrcChoiceEnum + VALUES PatternFlowIpv4SrcChoiceEnum + INCREMENT PatternFlowIpv4SrcChoiceEnum + DECREMENT PatternFlowIpv4SrcChoiceEnum + AUTO PatternFlowIpv4SrcChoiceEnum + RANDOM PatternFlowIpv4SrcChoiceEnum +}{ + VALUE: PatternFlowIpv4SrcChoiceEnum("value"), + VALUES: PatternFlowIpv4SrcChoiceEnum("values"), + INCREMENT: PatternFlowIpv4SrcChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4SrcChoiceEnum("decrement"), + AUTO: PatternFlowIpv4SrcChoiceEnum("auto"), + RANDOM: PatternFlowIpv4SrcChoiceEnum("random"), +} + +func (obj *patternFlowIpv4Src) Choice() PatternFlowIpv4SrcChoiceEnum { + return PatternFlowIpv4SrcChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4Src) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4Src) setChoice(value PatternFlowIpv4SrcChoiceEnum) PatternFlowIpv4Src { + intValue, ok := otg.PatternFlowIpv4Src_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4SrcChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4Src_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Random = nil + obj.randomHolder = nil + obj.obj.Auto = nil + obj.autoHolder = nil + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4SrcChoice.VALUE { + defaultValue := "0.0.0.0" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4SrcChoice.VALUES { + defaultValue := []string{"0.0.0.0"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4SrcChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4SrcCounter().msg() + } + + if value == PatternFlowIpv4SrcChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4SrcCounter().msg() + } + + if value == PatternFlowIpv4SrcChoice.AUTO { + obj.obj.Auto = NewFlowIpv4Auto().msg() + } + + if value == PatternFlowIpv4SrcChoice.RANDOM { + obj.obj.Random = NewPatternFlowIpv4SrcRandom().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowIpv4Src) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4SrcChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowIpv4Src) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowIpv4Src object +func (obj *patternFlowIpv4Src) SetValue(value string) PatternFlowIpv4Src { + obj.setChoice(PatternFlowIpv4SrcChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowIpv4Src) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"0.0.0.0"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowIpv4Src object +func (obj *patternFlowIpv4Src) SetValues(value []string) PatternFlowIpv4Src { + obj.setChoice(PatternFlowIpv4SrcChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4SrcCounter +func (obj *patternFlowIpv4Src) Increment() PatternFlowIpv4SrcCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4SrcChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4SrcCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4SrcCounter +func (obj *patternFlowIpv4Src) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4SrcCounter value in the PatternFlowIpv4Src object +func (obj *patternFlowIpv4Src) SetIncrement(value PatternFlowIpv4SrcCounter) PatternFlowIpv4Src { + obj.setChoice(PatternFlowIpv4SrcChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4SrcCounter +func (obj *patternFlowIpv4Src) Decrement() PatternFlowIpv4SrcCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4SrcChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4SrcCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4SrcCounter +func (obj *patternFlowIpv4Src) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4SrcCounter value in the PatternFlowIpv4Src object +func (obj *patternFlowIpv4Src) SetDecrement(value PatternFlowIpv4SrcCounter) PatternFlowIpv4Src { + obj.setChoice(PatternFlowIpv4SrcChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4SrcMetricTag +func (obj *patternFlowIpv4Src) MetricTags() PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4SrcMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter struct { + obj *patternFlowIpv4Src + patternFlowIpv4SrcMetricTagSlice []PatternFlowIpv4SrcMetricTag + fieldPtr *[]*otg.PatternFlowIpv4SrcMetricTag +} + +func newPatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter(ptr *[]*otg.PatternFlowIpv4SrcMetricTag) PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter { + return &patternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter interface { + setMsg(*patternFlowIpv4Src) PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter + Items() []PatternFlowIpv4SrcMetricTag + Add() PatternFlowIpv4SrcMetricTag + Append(items ...PatternFlowIpv4SrcMetricTag) PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter + Set(index int, newObj PatternFlowIpv4SrcMetricTag) PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter + Clear() PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter + clearHolderSlice() PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter + appendHolderSlice(item PatternFlowIpv4SrcMetricTag) PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter +} + +func (obj *patternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter) setMsg(msg *patternFlowIpv4Src) PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4SrcMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter) Items() []PatternFlowIpv4SrcMetricTag { + return obj.patternFlowIpv4SrcMetricTagSlice +} + +func (obj *patternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter) Add() PatternFlowIpv4SrcMetricTag { + newObj := &otg.PatternFlowIpv4SrcMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4SrcMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4SrcMetricTagSlice = append(obj.patternFlowIpv4SrcMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter) Append(items ...PatternFlowIpv4SrcMetricTag) PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4SrcMetricTagSlice = append(obj.patternFlowIpv4SrcMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter) Set(index int, newObj PatternFlowIpv4SrcMetricTag) PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4SrcMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter) Clear() PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4SrcMetricTag{} + obj.patternFlowIpv4SrcMetricTagSlice = []PatternFlowIpv4SrcMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter) clearHolderSlice() PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter { + if len(obj.patternFlowIpv4SrcMetricTagSlice) > 0 { + obj.patternFlowIpv4SrcMetricTagSlice = []PatternFlowIpv4SrcMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter) appendHolderSlice(item PatternFlowIpv4SrcMetricTag) PatternFlowIpv4SrcPatternFlowIpv4SrcMetricTagIter { + obj.patternFlowIpv4SrcMetricTagSlice = append(obj.patternFlowIpv4SrcMetricTagSlice, item) + return obj +} + +// description is TBD +// Auto returns a FlowIpv4Auto +func (obj *patternFlowIpv4Src) Auto() FlowIpv4Auto { + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowIpv4SrcChoice.AUTO) + } + if obj.autoHolder == nil { + obj.autoHolder = &flowIpv4Auto{obj: obj.obj.Auto} + } + return obj.autoHolder +} + +// description is TBD +// Auto returns a FlowIpv4Auto +func (obj *patternFlowIpv4Src) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Random returns a PatternFlowIpv4SrcRandom +func (obj *patternFlowIpv4Src) Random() PatternFlowIpv4SrcRandom { + if obj.obj.Random == nil { + obj.setChoice(PatternFlowIpv4SrcChoice.RANDOM) + } + if obj.randomHolder == nil { + obj.randomHolder = &patternFlowIpv4SrcRandom{obj: obj.obj.Random} + } + return obj.randomHolder +} + +// description is TBD +// Random returns a PatternFlowIpv4SrcRandom +func (obj *patternFlowIpv4Src) HasRandom() bool { + return obj.obj.Random != nil +} + +// description is TBD +// SetRandom sets the PatternFlowIpv4SrcRandom value in the PatternFlowIpv4Src object +func (obj *patternFlowIpv4Src) SetRandom(value PatternFlowIpv4SrcRandom) PatternFlowIpv4Src { + obj.setChoice(PatternFlowIpv4SrcChoice.RANDOM) + obj.randomHolder = nil + obj.obj.Random = value.msg() + + return obj +} + +func (obj *patternFlowIpv4Src) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv4(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv4Src.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateIpv4Slice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv4Src.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4SrcMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Auto != nil { + + obj.Auto().validateObj(vObj, set_default) + } + + if obj.obj.Random != nil { + + obj.Random().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowIpv4Src) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4SrcChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4SrcChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4SrcChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4SrcChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4SrcChoice.DECREMENT + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowIpv4SrcChoice.AUTO + } + + if obj.obj.Random != nil { + choices_set += 1 + choice = PatternFlowIpv4SrcChoice.RANDOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4SrcChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4Src") + } + } else { + intVal := otg.PatternFlowIpv4Src_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4Src_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_src_counter.go b/gosnappi/pattern_flow_ipv4_src_counter.go new file mode 100644 index 00000000..f94d136b --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_src_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4SrcCounter ***** +type patternFlowIpv4SrcCounter struct { + validation + obj *otg.PatternFlowIpv4SrcCounter + marshaller marshalPatternFlowIpv4SrcCounter + unMarshaller unMarshalPatternFlowIpv4SrcCounter +} + +func NewPatternFlowIpv4SrcCounter() PatternFlowIpv4SrcCounter { + obj := patternFlowIpv4SrcCounter{obj: &otg.PatternFlowIpv4SrcCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4SrcCounter) msg() *otg.PatternFlowIpv4SrcCounter { + return obj.obj +} + +func (obj *patternFlowIpv4SrcCounter) setMsg(msg *otg.PatternFlowIpv4SrcCounter) PatternFlowIpv4SrcCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4SrcCounter struct { + obj *patternFlowIpv4SrcCounter +} + +type marshalPatternFlowIpv4SrcCounter interface { + // ToProto marshals PatternFlowIpv4SrcCounter to protobuf object *otg.PatternFlowIpv4SrcCounter + ToProto() (*otg.PatternFlowIpv4SrcCounter, error) + // ToPbText marshals PatternFlowIpv4SrcCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4SrcCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4SrcCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4SrcCounter struct { + obj *patternFlowIpv4SrcCounter +} + +type unMarshalPatternFlowIpv4SrcCounter interface { + // FromProto unmarshals PatternFlowIpv4SrcCounter from protobuf object *otg.PatternFlowIpv4SrcCounter + FromProto(msg *otg.PatternFlowIpv4SrcCounter) (PatternFlowIpv4SrcCounter, error) + // FromPbText unmarshals PatternFlowIpv4SrcCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4SrcCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4SrcCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4SrcCounter) Marshal() marshalPatternFlowIpv4SrcCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4SrcCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4SrcCounter) Unmarshal() unMarshalPatternFlowIpv4SrcCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4SrcCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4SrcCounter) ToProto() (*otg.PatternFlowIpv4SrcCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4SrcCounter) FromProto(msg *otg.PatternFlowIpv4SrcCounter) (PatternFlowIpv4SrcCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4SrcCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4SrcCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4SrcCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4SrcCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4SrcCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4SrcCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4SrcCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4SrcCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4SrcCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4SrcCounter) Clone() (PatternFlowIpv4SrcCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4SrcCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4SrcCounter is ipv4 counter pattern +type PatternFlowIpv4SrcCounter interface { + Validation + // msg marshals PatternFlowIpv4SrcCounter to protobuf object *otg.PatternFlowIpv4SrcCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4SrcCounter + // setMsg unmarshals PatternFlowIpv4SrcCounter from protobuf object *otg.PatternFlowIpv4SrcCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4SrcCounter) PatternFlowIpv4SrcCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4SrcCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4SrcCounter + // validate validates PatternFlowIpv4SrcCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4SrcCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowIpv4SrcCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowIpv4SrcCounter + SetStart(value string) PatternFlowIpv4SrcCounter + // HasStart checks if Start has been set in PatternFlowIpv4SrcCounter + HasStart() bool + // Step returns string, set in PatternFlowIpv4SrcCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowIpv4SrcCounter + SetStep(value string) PatternFlowIpv4SrcCounter + // HasStep checks if Step has been set in PatternFlowIpv4SrcCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4SrcCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4SrcCounter + SetCount(value uint32) PatternFlowIpv4SrcCounter + // HasCount checks if Count has been set in PatternFlowIpv4SrcCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowIpv4SrcCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowIpv4SrcCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowIpv4SrcCounter object +func (obj *patternFlowIpv4SrcCounter) SetStart(value string) PatternFlowIpv4SrcCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowIpv4SrcCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowIpv4SrcCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowIpv4SrcCounter object +func (obj *patternFlowIpv4SrcCounter) SetStep(value string) PatternFlowIpv4SrcCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4SrcCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4SrcCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4SrcCounter object +func (obj *patternFlowIpv4SrcCounter) SetCount(value uint32) PatternFlowIpv4SrcCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4SrcCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateIpv4(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv4SrcCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateIpv4(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv4SrcCounter.Step")) + } + + } + +} + +func (obj *patternFlowIpv4SrcCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("0.0.0.0") + } + if obj.obj.Step == nil { + obj.SetStep("0.0.0.1") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_src_metric_tag.go b/gosnappi/pattern_flow_ipv4_src_metric_tag.go new file mode 100644 index 00000000..1e2a79b4 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_src_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4SrcMetricTag ***** +type patternFlowIpv4SrcMetricTag struct { + validation + obj *otg.PatternFlowIpv4SrcMetricTag + marshaller marshalPatternFlowIpv4SrcMetricTag + unMarshaller unMarshalPatternFlowIpv4SrcMetricTag +} + +func NewPatternFlowIpv4SrcMetricTag() PatternFlowIpv4SrcMetricTag { + obj := patternFlowIpv4SrcMetricTag{obj: &otg.PatternFlowIpv4SrcMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4SrcMetricTag) msg() *otg.PatternFlowIpv4SrcMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4SrcMetricTag) setMsg(msg *otg.PatternFlowIpv4SrcMetricTag) PatternFlowIpv4SrcMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4SrcMetricTag struct { + obj *patternFlowIpv4SrcMetricTag +} + +type marshalPatternFlowIpv4SrcMetricTag interface { + // ToProto marshals PatternFlowIpv4SrcMetricTag to protobuf object *otg.PatternFlowIpv4SrcMetricTag + ToProto() (*otg.PatternFlowIpv4SrcMetricTag, error) + // ToPbText marshals PatternFlowIpv4SrcMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4SrcMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4SrcMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4SrcMetricTag struct { + obj *patternFlowIpv4SrcMetricTag +} + +type unMarshalPatternFlowIpv4SrcMetricTag interface { + // FromProto unmarshals PatternFlowIpv4SrcMetricTag from protobuf object *otg.PatternFlowIpv4SrcMetricTag + FromProto(msg *otg.PatternFlowIpv4SrcMetricTag) (PatternFlowIpv4SrcMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4SrcMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4SrcMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4SrcMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4SrcMetricTag) Marshal() marshalPatternFlowIpv4SrcMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4SrcMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4SrcMetricTag) Unmarshal() unMarshalPatternFlowIpv4SrcMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4SrcMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4SrcMetricTag) ToProto() (*otg.PatternFlowIpv4SrcMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4SrcMetricTag) FromProto(msg *otg.PatternFlowIpv4SrcMetricTag) (PatternFlowIpv4SrcMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4SrcMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4SrcMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4SrcMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4SrcMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4SrcMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4SrcMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4SrcMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4SrcMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4SrcMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4SrcMetricTag) Clone() (PatternFlowIpv4SrcMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4SrcMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4SrcMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4SrcMetricTag interface { + Validation + // msg marshals PatternFlowIpv4SrcMetricTag to protobuf object *otg.PatternFlowIpv4SrcMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4SrcMetricTag + // setMsg unmarshals PatternFlowIpv4SrcMetricTag from protobuf object *otg.PatternFlowIpv4SrcMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4SrcMetricTag) PatternFlowIpv4SrcMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4SrcMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4SrcMetricTag + // validate validates PatternFlowIpv4SrcMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4SrcMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4SrcMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4SrcMetricTag + SetName(value string) PatternFlowIpv4SrcMetricTag + // Offset returns uint32, set in PatternFlowIpv4SrcMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4SrcMetricTag + SetOffset(value uint32) PatternFlowIpv4SrcMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4SrcMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4SrcMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4SrcMetricTag + SetLength(value uint32) PatternFlowIpv4SrcMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4SrcMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4SrcMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4SrcMetricTag object +func (obj *patternFlowIpv4SrcMetricTag) SetName(value string) PatternFlowIpv4SrcMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4SrcMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4SrcMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4SrcMetricTag object +func (obj *patternFlowIpv4SrcMetricTag) SetOffset(value uint32) PatternFlowIpv4SrcMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4SrcMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4SrcMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4SrcMetricTag object +func (obj *patternFlowIpv4SrcMetricTag) SetLength(value uint32) PatternFlowIpv4SrcMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4SrcMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4SrcMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4SrcMetricTag.Offset <= 31 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4SrcMetricTag.Length <= 32 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4SrcMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(32) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_src_random.go b/gosnappi/pattern_flow_ipv4_src_random.go new file mode 100644 index 00000000..5d18561c --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_src_random.go @@ -0,0 +1,420 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4SrcRandom ***** +type patternFlowIpv4SrcRandom struct { + validation + obj *otg.PatternFlowIpv4SrcRandom + marshaller marshalPatternFlowIpv4SrcRandom + unMarshaller unMarshalPatternFlowIpv4SrcRandom +} + +func NewPatternFlowIpv4SrcRandom() PatternFlowIpv4SrcRandom { + obj := patternFlowIpv4SrcRandom{obj: &otg.PatternFlowIpv4SrcRandom{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4SrcRandom) msg() *otg.PatternFlowIpv4SrcRandom { + return obj.obj +} + +func (obj *patternFlowIpv4SrcRandom) setMsg(msg *otg.PatternFlowIpv4SrcRandom) PatternFlowIpv4SrcRandom { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4SrcRandom struct { + obj *patternFlowIpv4SrcRandom +} + +type marshalPatternFlowIpv4SrcRandom interface { + // ToProto marshals PatternFlowIpv4SrcRandom to protobuf object *otg.PatternFlowIpv4SrcRandom + ToProto() (*otg.PatternFlowIpv4SrcRandom, error) + // ToPbText marshals PatternFlowIpv4SrcRandom to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4SrcRandom to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4SrcRandom to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4SrcRandom struct { + obj *patternFlowIpv4SrcRandom +} + +type unMarshalPatternFlowIpv4SrcRandom interface { + // FromProto unmarshals PatternFlowIpv4SrcRandom from protobuf object *otg.PatternFlowIpv4SrcRandom + FromProto(msg *otg.PatternFlowIpv4SrcRandom) (PatternFlowIpv4SrcRandom, error) + // FromPbText unmarshals PatternFlowIpv4SrcRandom from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4SrcRandom from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4SrcRandom from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4SrcRandom) Marshal() marshalPatternFlowIpv4SrcRandom { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4SrcRandom{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4SrcRandom) Unmarshal() unMarshalPatternFlowIpv4SrcRandom { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4SrcRandom{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4SrcRandom) ToProto() (*otg.PatternFlowIpv4SrcRandom, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4SrcRandom) FromProto(msg *otg.PatternFlowIpv4SrcRandom) (PatternFlowIpv4SrcRandom, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4SrcRandom) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4SrcRandom) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4SrcRandom) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4SrcRandom) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4SrcRandom) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4SrcRandom) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4SrcRandom) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4SrcRandom) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4SrcRandom) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4SrcRandom) Clone() (PatternFlowIpv4SrcRandom, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4SrcRandom() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4SrcRandom is ipv4 random pattern +type PatternFlowIpv4SrcRandom interface { + Validation + // msg marshals PatternFlowIpv4SrcRandom to protobuf object *otg.PatternFlowIpv4SrcRandom + // and doesn't set defaults + msg() *otg.PatternFlowIpv4SrcRandom + // setMsg unmarshals PatternFlowIpv4SrcRandom from protobuf object *otg.PatternFlowIpv4SrcRandom + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4SrcRandom) PatternFlowIpv4SrcRandom + // provides marshal interface + Marshal() marshalPatternFlowIpv4SrcRandom + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4SrcRandom + // validate validates PatternFlowIpv4SrcRandom + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4SrcRandom, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Min returns string, set in PatternFlowIpv4SrcRandom. + Min() string + // SetMin assigns string provided by user to PatternFlowIpv4SrcRandom + SetMin(value string) PatternFlowIpv4SrcRandom + // HasMin checks if Min has been set in PatternFlowIpv4SrcRandom + HasMin() bool + // Max returns string, set in PatternFlowIpv4SrcRandom. + Max() string + // SetMax assigns string provided by user to PatternFlowIpv4SrcRandom + SetMax(value string) PatternFlowIpv4SrcRandom + // HasMax checks if Max has been set in PatternFlowIpv4SrcRandom + HasMax() bool + // Seed returns uint32, set in PatternFlowIpv4SrcRandom. + Seed() uint32 + // SetSeed assigns uint32 provided by user to PatternFlowIpv4SrcRandom + SetSeed(value uint32) PatternFlowIpv4SrcRandom + // HasSeed checks if Seed has been set in PatternFlowIpv4SrcRandom + HasSeed() bool + // Count returns uint32, set in PatternFlowIpv4SrcRandom. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4SrcRandom + SetCount(value uint32) PatternFlowIpv4SrcRandom + // HasCount checks if Count has been set in PatternFlowIpv4SrcRandom + HasCount() bool +} + +// The minimum possible value generated by the random value generator. +// Min returns a string +func (obj *patternFlowIpv4SrcRandom) Min() string { + + return *obj.obj.Min + +} + +// The minimum possible value generated by the random value generator. +// Min returns a string +func (obj *patternFlowIpv4SrcRandom) HasMin() bool { + return obj.obj.Min != nil +} + +// The minimum possible value generated by the random value generator. +// SetMin sets the string value in the PatternFlowIpv4SrcRandom object +func (obj *patternFlowIpv4SrcRandom) SetMin(value string) PatternFlowIpv4SrcRandom { + + obj.obj.Min = &value + return obj +} + +// The maximum possible value generated by the random value generator. +// Max returns a string +func (obj *patternFlowIpv4SrcRandom) Max() string { + + return *obj.obj.Max + +} + +// The maximum possible value generated by the random value generator. +// Max returns a string +func (obj *patternFlowIpv4SrcRandom) HasMax() bool { + return obj.obj.Max != nil +} + +// The maximum possible value generated by the random value generator. +// SetMax sets the string value in the PatternFlowIpv4SrcRandom object +func (obj *patternFlowIpv4SrcRandom) SetMax(value string) PatternFlowIpv4SrcRandom { + + obj.obj.Max = &value + return obj +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// Seed returns a uint32 +func (obj *patternFlowIpv4SrcRandom) Seed() uint32 { + + return *obj.obj.Seed + +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// Seed returns a uint32 +func (obj *patternFlowIpv4SrcRandom) HasSeed() bool { + return obj.obj.Seed != nil +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// SetSeed sets the uint32 value in the PatternFlowIpv4SrcRandom object +func (obj *patternFlowIpv4SrcRandom) SetSeed(value uint32) PatternFlowIpv4SrcRandom { + + obj.obj.Seed = &value + return obj +} + +// The total number of values to be generated by the random value generator. +// Count returns a uint32 +func (obj *patternFlowIpv4SrcRandom) Count() uint32 { + + return *obj.obj.Count + +} + +// The total number of values to be generated by the random value generator. +// Count returns a uint32 +func (obj *patternFlowIpv4SrcRandom) HasCount() bool { + return obj.obj.Count != nil +} + +// The total number of values to be generated by the random value generator. +// SetCount sets the uint32 value in the PatternFlowIpv4SrcRandom object +func (obj *patternFlowIpv4SrcRandom) SetCount(value uint32) PatternFlowIpv4SrcRandom { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4SrcRandom) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Min != nil { + + err := obj.validateIpv4(obj.Min()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv4SrcRandom.Min")) + } + + } + + if obj.obj.Max != nil { + + err := obj.validateIpv4(obj.Max()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv4SrcRandom.Max")) + } + + } + +} + +func (obj *patternFlowIpv4SrcRandom) setDefault() { + if obj.obj.Min == nil { + obj.SetMin("0.0.0.0") + } + if obj.obj.Max == nil { + obj.SetMax("255.255.255.255") + } + if obj.obj.Seed == nil { + obj.SetSeed(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_time_to_live.go b/gosnappi/pattern_flow_ipv4_time_to_live.go new file mode 100644 index 00000000..b7b9f79d --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_time_to_live.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TimeToLive ***** +type patternFlowIpv4TimeToLive struct { + validation + obj *otg.PatternFlowIpv4TimeToLive + marshaller marshalPatternFlowIpv4TimeToLive + unMarshaller unMarshalPatternFlowIpv4TimeToLive + incrementHolder PatternFlowIpv4TimeToLiveCounter + decrementHolder PatternFlowIpv4TimeToLiveCounter + metricTagsHolder PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter +} + +func NewPatternFlowIpv4TimeToLive() PatternFlowIpv4TimeToLive { + obj := patternFlowIpv4TimeToLive{obj: &otg.PatternFlowIpv4TimeToLive{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TimeToLive) msg() *otg.PatternFlowIpv4TimeToLive { + return obj.obj +} + +func (obj *patternFlowIpv4TimeToLive) setMsg(msg *otg.PatternFlowIpv4TimeToLive) PatternFlowIpv4TimeToLive { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TimeToLive struct { + obj *patternFlowIpv4TimeToLive +} + +type marshalPatternFlowIpv4TimeToLive interface { + // ToProto marshals PatternFlowIpv4TimeToLive to protobuf object *otg.PatternFlowIpv4TimeToLive + ToProto() (*otg.PatternFlowIpv4TimeToLive, error) + // ToPbText marshals PatternFlowIpv4TimeToLive to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TimeToLive to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TimeToLive to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TimeToLive struct { + obj *patternFlowIpv4TimeToLive +} + +type unMarshalPatternFlowIpv4TimeToLive interface { + // FromProto unmarshals PatternFlowIpv4TimeToLive from protobuf object *otg.PatternFlowIpv4TimeToLive + FromProto(msg *otg.PatternFlowIpv4TimeToLive) (PatternFlowIpv4TimeToLive, error) + // FromPbText unmarshals PatternFlowIpv4TimeToLive from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TimeToLive from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TimeToLive from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TimeToLive) Marshal() marshalPatternFlowIpv4TimeToLive { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TimeToLive{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TimeToLive) Unmarshal() unMarshalPatternFlowIpv4TimeToLive { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TimeToLive{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TimeToLive) ToProto() (*otg.PatternFlowIpv4TimeToLive, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TimeToLive) FromProto(msg *otg.PatternFlowIpv4TimeToLive) (PatternFlowIpv4TimeToLive, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TimeToLive) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TimeToLive) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TimeToLive) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TimeToLive) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TimeToLive) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TimeToLive) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TimeToLive) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TimeToLive) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TimeToLive) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TimeToLive) Clone() (PatternFlowIpv4TimeToLive, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TimeToLive() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4TimeToLive) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4TimeToLive is time to live +type PatternFlowIpv4TimeToLive interface { + Validation + // msg marshals PatternFlowIpv4TimeToLive to protobuf object *otg.PatternFlowIpv4TimeToLive + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TimeToLive + // setMsg unmarshals PatternFlowIpv4TimeToLive from protobuf object *otg.PatternFlowIpv4TimeToLive + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TimeToLive) PatternFlowIpv4TimeToLive + // provides marshal interface + Marshal() marshalPatternFlowIpv4TimeToLive + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TimeToLive + // validate validates PatternFlowIpv4TimeToLive + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TimeToLive, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4TimeToLiveChoiceEnum, set in PatternFlowIpv4TimeToLive + Choice() PatternFlowIpv4TimeToLiveChoiceEnum + // setChoice assigns PatternFlowIpv4TimeToLiveChoiceEnum provided by user to PatternFlowIpv4TimeToLive + setChoice(value PatternFlowIpv4TimeToLiveChoiceEnum) PatternFlowIpv4TimeToLive + // HasChoice checks if Choice has been set in PatternFlowIpv4TimeToLive + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4TimeToLive. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4TimeToLive + SetValue(value uint32) PatternFlowIpv4TimeToLive + // HasValue checks if Value has been set in PatternFlowIpv4TimeToLive + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4TimeToLive. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4TimeToLive + SetValues(value []uint32) PatternFlowIpv4TimeToLive + // Increment returns PatternFlowIpv4TimeToLiveCounter, set in PatternFlowIpv4TimeToLive. + // PatternFlowIpv4TimeToLiveCounter is integer counter pattern + Increment() PatternFlowIpv4TimeToLiveCounter + // SetIncrement assigns PatternFlowIpv4TimeToLiveCounter provided by user to PatternFlowIpv4TimeToLive. + // PatternFlowIpv4TimeToLiveCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4TimeToLiveCounter) PatternFlowIpv4TimeToLive + // HasIncrement checks if Increment has been set in PatternFlowIpv4TimeToLive + HasIncrement() bool + // Decrement returns PatternFlowIpv4TimeToLiveCounter, set in PatternFlowIpv4TimeToLive. + // PatternFlowIpv4TimeToLiveCounter is integer counter pattern + Decrement() PatternFlowIpv4TimeToLiveCounter + // SetDecrement assigns PatternFlowIpv4TimeToLiveCounter provided by user to PatternFlowIpv4TimeToLive. + // PatternFlowIpv4TimeToLiveCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4TimeToLiveCounter) PatternFlowIpv4TimeToLive + // HasDecrement checks if Decrement has been set in PatternFlowIpv4TimeToLive + HasDecrement() bool + // MetricTags returns PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIterIter, set in PatternFlowIpv4TimeToLive + MetricTags() PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter + setNil() +} + +type PatternFlowIpv4TimeToLiveChoiceEnum string + +// Enum of Choice on PatternFlowIpv4TimeToLive +var PatternFlowIpv4TimeToLiveChoice = struct { + VALUE PatternFlowIpv4TimeToLiveChoiceEnum + VALUES PatternFlowIpv4TimeToLiveChoiceEnum + INCREMENT PatternFlowIpv4TimeToLiveChoiceEnum + DECREMENT PatternFlowIpv4TimeToLiveChoiceEnum +}{ + VALUE: PatternFlowIpv4TimeToLiveChoiceEnum("value"), + VALUES: PatternFlowIpv4TimeToLiveChoiceEnum("values"), + INCREMENT: PatternFlowIpv4TimeToLiveChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4TimeToLiveChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4TimeToLive) Choice() PatternFlowIpv4TimeToLiveChoiceEnum { + return PatternFlowIpv4TimeToLiveChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4TimeToLive) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4TimeToLive) setChoice(value PatternFlowIpv4TimeToLiveChoiceEnum) PatternFlowIpv4TimeToLive { + intValue, ok := otg.PatternFlowIpv4TimeToLive_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4TimeToLiveChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4TimeToLive_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4TimeToLiveChoice.VALUE { + defaultValue := uint32(64) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4TimeToLiveChoice.VALUES { + defaultValue := []uint32{64} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4TimeToLiveChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4TimeToLiveCounter().msg() + } + + if value == PatternFlowIpv4TimeToLiveChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4TimeToLiveCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TimeToLive) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4TimeToLiveChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TimeToLive) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4TimeToLive object +func (obj *patternFlowIpv4TimeToLive) SetValue(value uint32) PatternFlowIpv4TimeToLive { + obj.setChoice(PatternFlowIpv4TimeToLiveChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4TimeToLive) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{64}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4TimeToLive object +func (obj *patternFlowIpv4TimeToLive) SetValues(value []uint32) PatternFlowIpv4TimeToLive { + obj.setChoice(PatternFlowIpv4TimeToLiveChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4TimeToLiveCounter +func (obj *patternFlowIpv4TimeToLive) Increment() PatternFlowIpv4TimeToLiveCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4TimeToLiveChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4TimeToLiveCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4TimeToLiveCounter +func (obj *patternFlowIpv4TimeToLive) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4TimeToLiveCounter value in the PatternFlowIpv4TimeToLive object +func (obj *patternFlowIpv4TimeToLive) SetIncrement(value PatternFlowIpv4TimeToLiveCounter) PatternFlowIpv4TimeToLive { + obj.setChoice(PatternFlowIpv4TimeToLiveChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TimeToLiveCounter +func (obj *patternFlowIpv4TimeToLive) Decrement() PatternFlowIpv4TimeToLiveCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4TimeToLiveChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4TimeToLiveCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TimeToLiveCounter +func (obj *patternFlowIpv4TimeToLive) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4TimeToLiveCounter value in the PatternFlowIpv4TimeToLive object +func (obj *patternFlowIpv4TimeToLive) SetDecrement(value PatternFlowIpv4TimeToLiveCounter) PatternFlowIpv4TimeToLive { + obj.setChoice(PatternFlowIpv4TimeToLiveChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4TimeToLiveMetricTag +func (obj *patternFlowIpv4TimeToLive) MetricTags() PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4TimeToLiveMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter struct { + obj *patternFlowIpv4TimeToLive + patternFlowIpv4TimeToLiveMetricTagSlice []PatternFlowIpv4TimeToLiveMetricTag + fieldPtr *[]*otg.PatternFlowIpv4TimeToLiveMetricTag +} + +func newPatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter(ptr *[]*otg.PatternFlowIpv4TimeToLiveMetricTag) PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter { + return &patternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter interface { + setMsg(*patternFlowIpv4TimeToLive) PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter + Items() []PatternFlowIpv4TimeToLiveMetricTag + Add() PatternFlowIpv4TimeToLiveMetricTag + Append(items ...PatternFlowIpv4TimeToLiveMetricTag) PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter + Set(index int, newObj PatternFlowIpv4TimeToLiveMetricTag) PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter + Clear() PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter + clearHolderSlice() PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter + appendHolderSlice(item PatternFlowIpv4TimeToLiveMetricTag) PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter +} + +func (obj *patternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter) setMsg(msg *patternFlowIpv4TimeToLive) PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4TimeToLiveMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter) Items() []PatternFlowIpv4TimeToLiveMetricTag { + return obj.patternFlowIpv4TimeToLiveMetricTagSlice +} + +func (obj *patternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter) Add() PatternFlowIpv4TimeToLiveMetricTag { + newObj := &otg.PatternFlowIpv4TimeToLiveMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4TimeToLiveMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4TimeToLiveMetricTagSlice = append(obj.patternFlowIpv4TimeToLiveMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter) Append(items ...PatternFlowIpv4TimeToLiveMetricTag) PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4TimeToLiveMetricTagSlice = append(obj.patternFlowIpv4TimeToLiveMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter) Set(index int, newObj PatternFlowIpv4TimeToLiveMetricTag) PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4TimeToLiveMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter) Clear() PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4TimeToLiveMetricTag{} + obj.patternFlowIpv4TimeToLiveMetricTagSlice = []PatternFlowIpv4TimeToLiveMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter) clearHolderSlice() PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter { + if len(obj.patternFlowIpv4TimeToLiveMetricTagSlice) > 0 { + obj.patternFlowIpv4TimeToLiveMetricTagSlice = []PatternFlowIpv4TimeToLiveMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter) appendHolderSlice(item PatternFlowIpv4TimeToLiveMetricTag) PatternFlowIpv4TimeToLivePatternFlowIpv4TimeToLiveMetricTagIter { + obj.patternFlowIpv4TimeToLiveMetricTagSlice = append(obj.patternFlowIpv4TimeToLiveMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4TimeToLive) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TimeToLive.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4TimeToLive.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4TimeToLiveMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4TimeToLive) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4TimeToLiveChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4TimeToLiveChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4TimeToLiveChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4TimeToLiveChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4TimeToLiveChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4TimeToLiveChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4TimeToLive") + } + } else { + intVal := otg.PatternFlowIpv4TimeToLive_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4TimeToLive_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_time_to_live_counter.go b/gosnappi/pattern_flow_ipv4_time_to_live_counter.go new file mode 100644 index 00000000..333ab10f --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_time_to_live_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TimeToLiveCounter ***** +type patternFlowIpv4TimeToLiveCounter struct { + validation + obj *otg.PatternFlowIpv4TimeToLiveCounter + marshaller marshalPatternFlowIpv4TimeToLiveCounter + unMarshaller unMarshalPatternFlowIpv4TimeToLiveCounter +} + +func NewPatternFlowIpv4TimeToLiveCounter() PatternFlowIpv4TimeToLiveCounter { + obj := patternFlowIpv4TimeToLiveCounter{obj: &otg.PatternFlowIpv4TimeToLiveCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TimeToLiveCounter) msg() *otg.PatternFlowIpv4TimeToLiveCounter { + return obj.obj +} + +func (obj *patternFlowIpv4TimeToLiveCounter) setMsg(msg *otg.PatternFlowIpv4TimeToLiveCounter) PatternFlowIpv4TimeToLiveCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TimeToLiveCounter struct { + obj *patternFlowIpv4TimeToLiveCounter +} + +type marshalPatternFlowIpv4TimeToLiveCounter interface { + // ToProto marshals PatternFlowIpv4TimeToLiveCounter to protobuf object *otg.PatternFlowIpv4TimeToLiveCounter + ToProto() (*otg.PatternFlowIpv4TimeToLiveCounter, error) + // ToPbText marshals PatternFlowIpv4TimeToLiveCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TimeToLiveCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TimeToLiveCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TimeToLiveCounter struct { + obj *patternFlowIpv4TimeToLiveCounter +} + +type unMarshalPatternFlowIpv4TimeToLiveCounter interface { + // FromProto unmarshals PatternFlowIpv4TimeToLiveCounter from protobuf object *otg.PatternFlowIpv4TimeToLiveCounter + FromProto(msg *otg.PatternFlowIpv4TimeToLiveCounter) (PatternFlowIpv4TimeToLiveCounter, error) + // FromPbText unmarshals PatternFlowIpv4TimeToLiveCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TimeToLiveCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TimeToLiveCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TimeToLiveCounter) Marshal() marshalPatternFlowIpv4TimeToLiveCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TimeToLiveCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TimeToLiveCounter) Unmarshal() unMarshalPatternFlowIpv4TimeToLiveCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TimeToLiveCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TimeToLiveCounter) ToProto() (*otg.PatternFlowIpv4TimeToLiveCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TimeToLiveCounter) FromProto(msg *otg.PatternFlowIpv4TimeToLiveCounter) (PatternFlowIpv4TimeToLiveCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TimeToLiveCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TimeToLiveCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TimeToLiveCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TimeToLiveCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TimeToLiveCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TimeToLiveCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TimeToLiveCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TimeToLiveCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TimeToLiveCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TimeToLiveCounter) Clone() (PatternFlowIpv4TimeToLiveCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TimeToLiveCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TimeToLiveCounter is integer counter pattern +type PatternFlowIpv4TimeToLiveCounter interface { + Validation + // msg marshals PatternFlowIpv4TimeToLiveCounter to protobuf object *otg.PatternFlowIpv4TimeToLiveCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TimeToLiveCounter + // setMsg unmarshals PatternFlowIpv4TimeToLiveCounter from protobuf object *otg.PatternFlowIpv4TimeToLiveCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TimeToLiveCounter) PatternFlowIpv4TimeToLiveCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4TimeToLiveCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TimeToLiveCounter + // validate validates PatternFlowIpv4TimeToLiveCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TimeToLiveCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4TimeToLiveCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4TimeToLiveCounter + SetStart(value uint32) PatternFlowIpv4TimeToLiveCounter + // HasStart checks if Start has been set in PatternFlowIpv4TimeToLiveCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4TimeToLiveCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4TimeToLiveCounter + SetStep(value uint32) PatternFlowIpv4TimeToLiveCounter + // HasStep checks if Step has been set in PatternFlowIpv4TimeToLiveCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4TimeToLiveCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4TimeToLiveCounter + SetCount(value uint32) PatternFlowIpv4TimeToLiveCounter + // HasCount checks if Count has been set in PatternFlowIpv4TimeToLiveCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TimeToLiveCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TimeToLiveCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4TimeToLiveCounter object +func (obj *patternFlowIpv4TimeToLiveCounter) SetStart(value uint32) PatternFlowIpv4TimeToLiveCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TimeToLiveCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TimeToLiveCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4TimeToLiveCounter object +func (obj *patternFlowIpv4TimeToLiveCounter) SetStep(value uint32) PatternFlowIpv4TimeToLiveCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TimeToLiveCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TimeToLiveCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4TimeToLiveCounter object +func (obj *patternFlowIpv4TimeToLiveCounter) SetCount(value uint32) PatternFlowIpv4TimeToLiveCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4TimeToLiveCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TimeToLiveCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TimeToLiveCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TimeToLiveCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4TimeToLiveCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(64) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_time_to_live_metric_tag.go b/gosnappi/pattern_flow_ipv4_time_to_live_metric_tag.go new file mode 100644 index 00000000..6f6197f3 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_time_to_live_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TimeToLiveMetricTag ***** +type patternFlowIpv4TimeToLiveMetricTag struct { + validation + obj *otg.PatternFlowIpv4TimeToLiveMetricTag + marshaller marshalPatternFlowIpv4TimeToLiveMetricTag + unMarshaller unMarshalPatternFlowIpv4TimeToLiveMetricTag +} + +func NewPatternFlowIpv4TimeToLiveMetricTag() PatternFlowIpv4TimeToLiveMetricTag { + obj := patternFlowIpv4TimeToLiveMetricTag{obj: &otg.PatternFlowIpv4TimeToLiveMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TimeToLiveMetricTag) msg() *otg.PatternFlowIpv4TimeToLiveMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4TimeToLiveMetricTag) setMsg(msg *otg.PatternFlowIpv4TimeToLiveMetricTag) PatternFlowIpv4TimeToLiveMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TimeToLiveMetricTag struct { + obj *patternFlowIpv4TimeToLiveMetricTag +} + +type marshalPatternFlowIpv4TimeToLiveMetricTag interface { + // ToProto marshals PatternFlowIpv4TimeToLiveMetricTag to protobuf object *otg.PatternFlowIpv4TimeToLiveMetricTag + ToProto() (*otg.PatternFlowIpv4TimeToLiveMetricTag, error) + // ToPbText marshals PatternFlowIpv4TimeToLiveMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TimeToLiveMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TimeToLiveMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TimeToLiveMetricTag struct { + obj *patternFlowIpv4TimeToLiveMetricTag +} + +type unMarshalPatternFlowIpv4TimeToLiveMetricTag interface { + // FromProto unmarshals PatternFlowIpv4TimeToLiveMetricTag from protobuf object *otg.PatternFlowIpv4TimeToLiveMetricTag + FromProto(msg *otg.PatternFlowIpv4TimeToLiveMetricTag) (PatternFlowIpv4TimeToLiveMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4TimeToLiveMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TimeToLiveMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TimeToLiveMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TimeToLiveMetricTag) Marshal() marshalPatternFlowIpv4TimeToLiveMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TimeToLiveMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TimeToLiveMetricTag) Unmarshal() unMarshalPatternFlowIpv4TimeToLiveMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TimeToLiveMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TimeToLiveMetricTag) ToProto() (*otg.PatternFlowIpv4TimeToLiveMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TimeToLiveMetricTag) FromProto(msg *otg.PatternFlowIpv4TimeToLiveMetricTag) (PatternFlowIpv4TimeToLiveMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TimeToLiveMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TimeToLiveMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TimeToLiveMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TimeToLiveMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TimeToLiveMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TimeToLiveMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TimeToLiveMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TimeToLiveMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TimeToLiveMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TimeToLiveMetricTag) Clone() (PatternFlowIpv4TimeToLiveMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TimeToLiveMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TimeToLiveMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4TimeToLiveMetricTag interface { + Validation + // msg marshals PatternFlowIpv4TimeToLiveMetricTag to protobuf object *otg.PatternFlowIpv4TimeToLiveMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TimeToLiveMetricTag + // setMsg unmarshals PatternFlowIpv4TimeToLiveMetricTag from protobuf object *otg.PatternFlowIpv4TimeToLiveMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TimeToLiveMetricTag) PatternFlowIpv4TimeToLiveMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4TimeToLiveMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TimeToLiveMetricTag + // validate validates PatternFlowIpv4TimeToLiveMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TimeToLiveMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4TimeToLiveMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4TimeToLiveMetricTag + SetName(value string) PatternFlowIpv4TimeToLiveMetricTag + // Offset returns uint32, set in PatternFlowIpv4TimeToLiveMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4TimeToLiveMetricTag + SetOffset(value uint32) PatternFlowIpv4TimeToLiveMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4TimeToLiveMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4TimeToLiveMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4TimeToLiveMetricTag + SetLength(value uint32) PatternFlowIpv4TimeToLiveMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4TimeToLiveMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4TimeToLiveMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4TimeToLiveMetricTag object +func (obj *patternFlowIpv4TimeToLiveMetricTag) SetName(value string) PatternFlowIpv4TimeToLiveMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TimeToLiveMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TimeToLiveMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4TimeToLiveMetricTag object +func (obj *patternFlowIpv4TimeToLiveMetricTag) SetOffset(value uint32) PatternFlowIpv4TimeToLiveMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TimeToLiveMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TimeToLiveMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4TimeToLiveMetricTag object +func (obj *patternFlowIpv4TimeToLiveMetricTag) SetLength(value uint32) PatternFlowIpv4TimeToLiveMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4TimeToLiveMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4TimeToLiveMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TimeToLiveMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4TimeToLiveMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4TimeToLiveMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_delay.go b/gosnappi/pattern_flow_ipv4_tos_delay.go new file mode 100644 index 00000000..367c9f7d --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_delay.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosDelay ***** +type patternFlowIpv4TosDelay struct { + validation + obj *otg.PatternFlowIpv4TosDelay + marshaller marshalPatternFlowIpv4TosDelay + unMarshaller unMarshalPatternFlowIpv4TosDelay + incrementHolder PatternFlowIpv4TosDelayCounter + decrementHolder PatternFlowIpv4TosDelayCounter + metricTagsHolder PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter +} + +func NewPatternFlowIpv4TosDelay() PatternFlowIpv4TosDelay { + obj := patternFlowIpv4TosDelay{obj: &otg.PatternFlowIpv4TosDelay{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosDelay) msg() *otg.PatternFlowIpv4TosDelay { + return obj.obj +} + +func (obj *patternFlowIpv4TosDelay) setMsg(msg *otg.PatternFlowIpv4TosDelay) PatternFlowIpv4TosDelay { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosDelay struct { + obj *patternFlowIpv4TosDelay +} + +type marshalPatternFlowIpv4TosDelay interface { + // ToProto marshals PatternFlowIpv4TosDelay to protobuf object *otg.PatternFlowIpv4TosDelay + ToProto() (*otg.PatternFlowIpv4TosDelay, error) + // ToPbText marshals PatternFlowIpv4TosDelay to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosDelay to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosDelay to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosDelay struct { + obj *patternFlowIpv4TosDelay +} + +type unMarshalPatternFlowIpv4TosDelay interface { + // FromProto unmarshals PatternFlowIpv4TosDelay from protobuf object *otg.PatternFlowIpv4TosDelay + FromProto(msg *otg.PatternFlowIpv4TosDelay) (PatternFlowIpv4TosDelay, error) + // FromPbText unmarshals PatternFlowIpv4TosDelay from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosDelay from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosDelay from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosDelay) Marshal() marshalPatternFlowIpv4TosDelay { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosDelay{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosDelay) Unmarshal() unMarshalPatternFlowIpv4TosDelay { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosDelay{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosDelay) ToProto() (*otg.PatternFlowIpv4TosDelay, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosDelay) FromProto(msg *otg.PatternFlowIpv4TosDelay) (PatternFlowIpv4TosDelay, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosDelay) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosDelay) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosDelay) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosDelay) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosDelay) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosDelay) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosDelay) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosDelay) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosDelay) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosDelay) Clone() (PatternFlowIpv4TosDelay, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosDelay() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4TosDelay) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4TosDelay is delay +type PatternFlowIpv4TosDelay interface { + Validation + // msg marshals PatternFlowIpv4TosDelay to protobuf object *otg.PatternFlowIpv4TosDelay + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosDelay + // setMsg unmarshals PatternFlowIpv4TosDelay from protobuf object *otg.PatternFlowIpv4TosDelay + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosDelay) PatternFlowIpv4TosDelay + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosDelay + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosDelay + // validate validates PatternFlowIpv4TosDelay + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosDelay, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4TosDelayChoiceEnum, set in PatternFlowIpv4TosDelay + Choice() PatternFlowIpv4TosDelayChoiceEnum + // setChoice assigns PatternFlowIpv4TosDelayChoiceEnum provided by user to PatternFlowIpv4TosDelay + setChoice(value PatternFlowIpv4TosDelayChoiceEnum) PatternFlowIpv4TosDelay + // HasChoice checks if Choice has been set in PatternFlowIpv4TosDelay + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4TosDelay. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4TosDelay + SetValue(value uint32) PatternFlowIpv4TosDelay + // HasValue checks if Value has been set in PatternFlowIpv4TosDelay + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4TosDelay. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4TosDelay + SetValues(value []uint32) PatternFlowIpv4TosDelay + // Increment returns PatternFlowIpv4TosDelayCounter, set in PatternFlowIpv4TosDelay. + // PatternFlowIpv4TosDelayCounter is integer counter pattern + Increment() PatternFlowIpv4TosDelayCounter + // SetIncrement assigns PatternFlowIpv4TosDelayCounter provided by user to PatternFlowIpv4TosDelay. + // PatternFlowIpv4TosDelayCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4TosDelayCounter) PatternFlowIpv4TosDelay + // HasIncrement checks if Increment has been set in PatternFlowIpv4TosDelay + HasIncrement() bool + // Decrement returns PatternFlowIpv4TosDelayCounter, set in PatternFlowIpv4TosDelay. + // PatternFlowIpv4TosDelayCounter is integer counter pattern + Decrement() PatternFlowIpv4TosDelayCounter + // SetDecrement assigns PatternFlowIpv4TosDelayCounter provided by user to PatternFlowIpv4TosDelay. + // PatternFlowIpv4TosDelayCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4TosDelayCounter) PatternFlowIpv4TosDelay + // HasDecrement checks if Decrement has been set in PatternFlowIpv4TosDelay + HasDecrement() bool + // MetricTags returns PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIterIter, set in PatternFlowIpv4TosDelay + MetricTags() PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter + setNil() +} + +type PatternFlowIpv4TosDelayChoiceEnum string + +// Enum of Choice on PatternFlowIpv4TosDelay +var PatternFlowIpv4TosDelayChoice = struct { + VALUE PatternFlowIpv4TosDelayChoiceEnum + VALUES PatternFlowIpv4TosDelayChoiceEnum + INCREMENT PatternFlowIpv4TosDelayChoiceEnum + DECREMENT PatternFlowIpv4TosDelayChoiceEnum +}{ + VALUE: PatternFlowIpv4TosDelayChoiceEnum("value"), + VALUES: PatternFlowIpv4TosDelayChoiceEnum("values"), + INCREMENT: PatternFlowIpv4TosDelayChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4TosDelayChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4TosDelay) Choice() PatternFlowIpv4TosDelayChoiceEnum { + return PatternFlowIpv4TosDelayChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4TosDelay) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4TosDelay) setChoice(value PatternFlowIpv4TosDelayChoiceEnum) PatternFlowIpv4TosDelay { + intValue, ok := otg.PatternFlowIpv4TosDelay_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4TosDelayChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4TosDelay_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4TosDelayChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4TosDelayChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4TosDelayChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4TosDelayCounter().msg() + } + + if value == PatternFlowIpv4TosDelayChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4TosDelayCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TosDelay) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4TosDelayChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TosDelay) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4TosDelay object +func (obj *patternFlowIpv4TosDelay) SetValue(value uint32) PatternFlowIpv4TosDelay { + obj.setChoice(PatternFlowIpv4TosDelayChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4TosDelay) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4TosDelay object +func (obj *patternFlowIpv4TosDelay) SetValues(value []uint32) PatternFlowIpv4TosDelay { + obj.setChoice(PatternFlowIpv4TosDelayChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4TosDelayCounter +func (obj *patternFlowIpv4TosDelay) Increment() PatternFlowIpv4TosDelayCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4TosDelayChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4TosDelayCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4TosDelayCounter +func (obj *patternFlowIpv4TosDelay) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4TosDelayCounter value in the PatternFlowIpv4TosDelay object +func (obj *patternFlowIpv4TosDelay) SetIncrement(value PatternFlowIpv4TosDelayCounter) PatternFlowIpv4TosDelay { + obj.setChoice(PatternFlowIpv4TosDelayChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TosDelayCounter +func (obj *patternFlowIpv4TosDelay) Decrement() PatternFlowIpv4TosDelayCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4TosDelayChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4TosDelayCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TosDelayCounter +func (obj *patternFlowIpv4TosDelay) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4TosDelayCounter value in the PatternFlowIpv4TosDelay object +func (obj *patternFlowIpv4TosDelay) SetDecrement(value PatternFlowIpv4TosDelayCounter) PatternFlowIpv4TosDelay { + obj.setChoice(PatternFlowIpv4TosDelayChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4TosDelayMetricTag +func (obj *patternFlowIpv4TosDelay) MetricTags() PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4TosDelayMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter struct { + obj *patternFlowIpv4TosDelay + patternFlowIpv4TosDelayMetricTagSlice []PatternFlowIpv4TosDelayMetricTag + fieldPtr *[]*otg.PatternFlowIpv4TosDelayMetricTag +} + +func newPatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter(ptr *[]*otg.PatternFlowIpv4TosDelayMetricTag) PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter { + return &patternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter interface { + setMsg(*patternFlowIpv4TosDelay) PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter + Items() []PatternFlowIpv4TosDelayMetricTag + Add() PatternFlowIpv4TosDelayMetricTag + Append(items ...PatternFlowIpv4TosDelayMetricTag) PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter + Set(index int, newObj PatternFlowIpv4TosDelayMetricTag) PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter + Clear() PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter + clearHolderSlice() PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter + appendHolderSlice(item PatternFlowIpv4TosDelayMetricTag) PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter +} + +func (obj *patternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter) setMsg(msg *patternFlowIpv4TosDelay) PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4TosDelayMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter) Items() []PatternFlowIpv4TosDelayMetricTag { + return obj.patternFlowIpv4TosDelayMetricTagSlice +} + +func (obj *patternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter) Add() PatternFlowIpv4TosDelayMetricTag { + newObj := &otg.PatternFlowIpv4TosDelayMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4TosDelayMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4TosDelayMetricTagSlice = append(obj.patternFlowIpv4TosDelayMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter) Append(items ...PatternFlowIpv4TosDelayMetricTag) PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4TosDelayMetricTagSlice = append(obj.patternFlowIpv4TosDelayMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter) Set(index int, newObj PatternFlowIpv4TosDelayMetricTag) PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4TosDelayMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter) Clear() PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4TosDelayMetricTag{} + obj.patternFlowIpv4TosDelayMetricTagSlice = []PatternFlowIpv4TosDelayMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter) clearHolderSlice() PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter { + if len(obj.patternFlowIpv4TosDelayMetricTagSlice) > 0 { + obj.patternFlowIpv4TosDelayMetricTagSlice = []PatternFlowIpv4TosDelayMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter) appendHolderSlice(item PatternFlowIpv4TosDelayMetricTag) PatternFlowIpv4TosDelayPatternFlowIpv4TosDelayMetricTagIter { + obj.patternFlowIpv4TosDelayMetricTagSlice = append(obj.patternFlowIpv4TosDelayMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4TosDelay) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosDelay.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4TosDelay.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4TosDelayMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4TosDelay) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4TosDelayChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4TosDelayChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4TosDelayChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4TosDelayChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4TosDelayChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4TosDelayChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4TosDelay") + } + } else { + intVal := otg.PatternFlowIpv4TosDelay_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4TosDelay_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_delay_counter.go b/gosnappi/pattern_flow_ipv4_tos_delay_counter.go new file mode 100644 index 00000000..8c4b5dfc --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_delay_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosDelayCounter ***** +type patternFlowIpv4TosDelayCounter struct { + validation + obj *otg.PatternFlowIpv4TosDelayCounter + marshaller marshalPatternFlowIpv4TosDelayCounter + unMarshaller unMarshalPatternFlowIpv4TosDelayCounter +} + +func NewPatternFlowIpv4TosDelayCounter() PatternFlowIpv4TosDelayCounter { + obj := patternFlowIpv4TosDelayCounter{obj: &otg.PatternFlowIpv4TosDelayCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosDelayCounter) msg() *otg.PatternFlowIpv4TosDelayCounter { + return obj.obj +} + +func (obj *patternFlowIpv4TosDelayCounter) setMsg(msg *otg.PatternFlowIpv4TosDelayCounter) PatternFlowIpv4TosDelayCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosDelayCounter struct { + obj *patternFlowIpv4TosDelayCounter +} + +type marshalPatternFlowIpv4TosDelayCounter interface { + // ToProto marshals PatternFlowIpv4TosDelayCounter to protobuf object *otg.PatternFlowIpv4TosDelayCounter + ToProto() (*otg.PatternFlowIpv4TosDelayCounter, error) + // ToPbText marshals PatternFlowIpv4TosDelayCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosDelayCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosDelayCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosDelayCounter struct { + obj *patternFlowIpv4TosDelayCounter +} + +type unMarshalPatternFlowIpv4TosDelayCounter interface { + // FromProto unmarshals PatternFlowIpv4TosDelayCounter from protobuf object *otg.PatternFlowIpv4TosDelayCounter + FromProto(msg *otg.PatternFlowIpv4TosDelayCounter) (PatternFlowIpv4TosDelayCounter, error) + // FromPbText unmarshals PatternFlowIpv4TosDelayCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosDelayCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosDelayCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosDelayCounter) Marshal() marshalPatternFlowIpv4TosDelayCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosDelayCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosDelayCounter) Unmarshal() unMarshalPatternFlowIpv4TosDelayCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosDelayCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosDelayCounter) ToProto() (*otg.PatternFlowIpv4TosDelayCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosDelayCounter) FromProto(msg *otg.PatternFlowIpv4TosDelayCounter) (PatternFlowIpv4TosDelayCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosDelayCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosDelayCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosDelayCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosDelayCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosDelayCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosDelayCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosDelayCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosDelayCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosDelayCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosDelayCounter) Clone() (PatternFlowIpv4TosDelayCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosDelayCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TosDelayCounter is integer counter pattern +type PatternFlowIpv4TosDelayCounter interface { + Validation + // msg marshals PatternFlowIpv4TosDelayCounter to protobuf object *otg.PatternFlowIpv4TosDelayCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosDelayCounter + // setMsg unmarshals PatternFlowIpv4TosDelayCounter from protobuf object *otg.PatternFlowIpv4TosDelayCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosDelayCounter) PatternFlowIpv4TosDelayCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosDelayCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosDelayCounter + // validate validates PatternFlowIpv4TosDelayCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosDelayCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4TosDelayCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4TosDelayCounter + SetStart(value uint32) PatternFlowIpv4TosDelayCounter + // HasStart checks if Start has been set in PatternFlowIpv4TosDelayCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4TosDelayCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4TosDelayCounter + SetStep(value uint32) PatternFlowIpv4TosDelayCounter + // HasStep checks if Step has been set in PatternFlowIpv4TosDelayCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4TosDelayCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4TosDelayCounter + SetCount(value uint32) PatternFlowIpv4TosDelayCounter + // HasCount checks if Count has been set in PatternFlowIpv4TosDelayCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TosDelayCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TosDelayCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4TosDelayCounter object +func (obj *patternFlowIpv4TosDelayCounter) SetStart(value uint32) PatternFlowIpv4TosDelayCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TosDelayCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TosDelayCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4TosDelayCounter object +func (obj *patternFlowIpv4TosDelayCounter) SetStep(value uint32) PatternFlowIpv4TosDelayCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TosDelayCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TosDelayCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4TosDelayCounter object +func (obj *patternFlowIpv4TosDelayCounter) SetCount(value uint32) PatternFlowIpv4TosDelayCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4TosDelayCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosDelayCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosDelayCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosDelayCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4TosDelayCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_delay_metric_tag.go b/gosnappi/pattern_flow_ipv4_tos_delay_metric_tag.go new file mode 100644 index 00000000..31c9978a --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_delay_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosDelayMetricTag ***** +type patternFlowIpv4TosDelayMetricTag struct { + validation + obj *otg.PatternFlowIpv4TosDelayMetricTag + marshaller marshalPatternFlowIpv4TosDelayMetricTag + unMarshaller unMarshalPatternFlowIpv4TosDelayMetricTag +} + +func NewPatternFlowIpv4TosDelayMetricTag() PatternFlowIpv4TosDelayMetricTag { + obj := patternFlowIpv4TosDelayMetricTag{obj: &otg.PatternFlowIpv4TosDelayMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosDelayMetricTag) msg() *otg.PatternFlowIpv4TosDelayMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4TosDelayMetricTag) setMsg(msg *otg.PatternFlowIpv4TosDelayMetricTag) PatternFlowIpv4TosDelayMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosDelayMetricTag struct { + obj *patternFlowIpv4TosDelayMetricTag +} + +type marshalPatternFlowIpv4TosDelayMetricTag interface { + // ToProto marshals PatternFlowIpv4TosDelayMetricTag to protobuf object *otg.PatternFlowIpv4TosDelayMetricTag + ToProto() (*otg.PatternFlowIpv4TosDelayMetricTag, error) + // ToPbText marshals PatternFlowIpv4TosDelayMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosDelayMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosDelayMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosDelayMetricTag struct { + obj *patternFlowIpv4TosDelayMetricTag +} + +type unMarshalPatternFlowIpv4TosDelayMetricTag interface { + // FromProto unmarshals PatternFlowIpv4TosDelayMetricTag from protobuf object *otg.PatternFlowIpv4TosDelayMetricTag + FromProto(msg *otg.PatternFlowIpv4TosDelayMetricTag) (PatternFlowIpv4TosDelayMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4TosDelayMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosDelayMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosDelayMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosDelayMetricTag) Marshal() marshalPatternFlowIpv4TosDelayMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosDelayMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosDelayMetricTag) Unmarshal() unMarshalPatternFlowIpv4TosDelayMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosDelayMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosDelayMetricTag) ToProto() (*otg.PatternFlowIpv4TosDelayMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosDelayMetricTag) FromProto(msg *otg.PatternFlowIpv4TosDelayMetricTag) (PatternFlowIpv4TosDelayMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosDelayMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosDelayMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosDelayMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosDelayMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosDelayMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosDelayMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosDelayMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosDelayMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosDelayMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosDelayMetricTag) Clone() (PatternFlowIpv4TosDelayMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosDelayMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TosDelayMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4TosDelayMetricTag interface { + Validation + // msg marshals PatternFlowIpv4TosDelayMetricTag to protobuf object *otg.PatternFlowIpv4TosDelayMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosDelayMetricTag + // setMsg unmarshals PatternFlowIpv4TosDelayMetricTag from protobuf object *otg.PatternFlowIpv4TosDelayMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosDelayMetricTag) PatternFlowIpv4TosDelayMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosDelayMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosDelayMetricTag + // validate validates PatternFlowIpv4TosDelayMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosDelayMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4TosDelayMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4TosDelayMetricTag + SetName(value string) PatternFlowIpv4TosDelayMetricTag + // Offset returns uint32, set in PatternFlowIpv4TosDelayMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4TosDelayMetricTag + SetOffset(value uint32) PatternFlowIpv4TosDelayMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4TosDelayMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4TosDelayMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4TosDelayMetricTag + SetLength(value uint32) PatternFlowIpv4TosDelayMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4TosDelayMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4TosDelayMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4TosDelayMetricTag object +func (obj *patternFlowIpv4TosDelayMetricTag) SetName(value string) PatternFlowIpv4TosDelayMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TosDelayMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TosDelayMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4TosDelayMetricTag object +func (obj *patternFlowIpv4TosDelayMetricTag) SetOffset(value uint32) PatternFlowIpv4TosDelayMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TosDelayMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TosDelayMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4TosDelayMetricTag object +func (obj *patternFlowIpv4TosDelayMetricTag) SetLength(value uint32) PatternFlowIpv4TosDelayMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4TosDelayMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4TosDelayMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosDelayMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4TosDelayMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4TosDelayMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_monetary.go b/gosnappi/pattern_flow_ipv4_tos_monetary.go new file mode 100644 index 00000000..b11085b0 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_monetary.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosMonetary ***** +type patternFlowIpv4TosMonetary struct { + validation + obj *otg.PatternFlowIpv4TosMonetary + marshaller marshalPatternFlowIpv4TosMonetary + unMarshaller unMarshalPatternFlowIpv4TosMonetary + incrementHolder PatternFlowIpv4TosMonetaryCounter + decrementHolder PatternFlowIpv4TosMonetaryCounter + metricTagsHolder PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter +} + +func NewPatternFlowIpv4TosMonetary() PatternFlowIpv4TosMonetary { + obj := patternFlowIpv4TosMonetary{obj: &otg.PatternFlowIpv4TosMonetary{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosMonetary) msg() *otg.PatternFlowIpv4TosMonetary { + return obj.obj +} + +func (obj *patternFlowIpv4TosMonetary) setMsg(msg *otg.PatternFlowIpv4TosMonetary) PatternFlowIpv4TosMonetary { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosMonetary struct { + obj *patternFlowIpv4TosMonetary +} + +type marshalPatternFlowIpv4TosMonetary interface { + // ToProto marshals PatternFlowIpv4TosMonetary to protobuf object *otg.PatternFlowIpv4TosMonetary + ToProto() (*otg.PatternFlowIpv4TosMonetary, error) + // ToPbText marshals PatternFlowIpv4TosMonetary to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosMonetary to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosMonetary to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosMonetary struct { + obj *patternFlowIpv4TosMonetary +} + +type unMarshalPatternFlowIpv4TosMonetary interface { + // FromProto unmarshals PatternFlowIpv4TosMonetary from protobuf object *otg.PatternFlowIpv4TosMonetary + FromProto(msg *otg.PatternFlowIpv4TosMonetary) (PatternFlowIpv4TosMonetary, error) + // FromPbText unmarshals PatternFlowIpv4TosMonetary from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosMonetary from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosMonetary from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosMonetary) Marshal() marshalPatternFlowIpv4TosMonetary { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosMonetary{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosMonetary) Unmarshal() unMarshalPatternFlowIpv4TosMonetary { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosMonetary{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosMonetary) ToProto() (*otg.PatternFlowIpv4TosMonetary, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosMonetary) FromProto(msg *otg.PatternFlowIpv4TosMonetary) (PatternFlowIpv4TosMonetary, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosMonetary) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosMonetary) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosMonetary) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosMonetary) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosMonetary) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosMonetary) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosMonetary) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosMonetary) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosMonetary) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosMonetary) Clone() (PatternFlowIpv4TosMonetary, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosMonetary() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4TosMonetary) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4TosMonetary is monetary +type PatternFlowIpv4TosMonetary interface { + Validation + // msg marshals PatternFlowIpv4TosMonetary to protobuf object *otg.PatternFlowIpv4TosMonetary + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosMonetary + // setMsg unmarshals PatternFlowIpv4TosMonetary from protobuf object *otg.PatternFlowIpv4TosMonetary + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosMonetary) PatternFlowIpv4TosMonetary + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosMonetary + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosMonetary + // validate validates PatternFlowIpv4TosMonetary + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosMonetary, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4TosMonetaryChoiceEnum, set in PatternFlowIpv4TosMonetary + Choice() PatternFlowIpv4TosMonetaryChoiceEnum + // setChoice assigns PatternFlowIpv4TosMonetaryChoiceEnum provided by user to PatternFlowIpv4TosMonetary + setChoice(value PatternFlowIpv4TosMonetaryChoiceEnum) PatternFlowIpv4TosMonetary + // HasChoice checks if Choice has been set in PatternFlowIpv4TosMonetary + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4TosMonetary. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4TosMonetary + SetValue(value uint32) PatternFlowIpv4TosMonetary + // HasValue checks if Value has been set in PatternFlowIpv4TosMonetary + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4TosMonetary. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4TosMonetary + SetValues(value []uint32) PatternFlowIpv4TosMonetary + // Increment returns PatternFlowIpv4TosMonetaryCounter, set in PatternFlowIpv4TosMonetary. + // PatternFlowIpv4TosMonetaryCounter is integer counter pattern + Increment() PatternFlowIpv4TosMonetaryCounter + // SetIncrement assigns PatternFlowIpv4TosMonetaryCounter provided by user to PatternFlowIpv4TosMonetary. + // PatternFlowIpv4TosMonetaryCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4TosMonetaryCounter) PatternFlowIpv4TosMonetary + // HasIncrement checks if Increment has been set in PatternFlowIpv4TosMonetary + HasIncrement() bool + // Decrement returns PatternFlowIpv4TosMonetaryCounter, set in PatternFlowIpv4TosMonetary. + // PatternFlowIpv4TosMonetaryCounter is integer counter pattern + Decrement() PatternFlowIpv4TosMonetaryCounter + // SetDecrement assigns PatternFlowIpv4TosMonetaryCounter provided by user to PatternFlowIpv4TosMonetary. + // PatternFlowIpv4TosMonetaryCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4TosMonetaryCounter) PatternFlowIpv4TosMonetary + // HasDecrement checks if Decrement has been set in PatternFlowIpv4TosMonetary + HasDecrement() bool + // MetricTags returns PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIterIter, set in PatternFlowIpv4TosMonetary + MetricTags() PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter + setNil() +} + +type PatternFlowIpv4TosMonetaryChoiceEnum string + +// Enum of Choice on PatternFlowIpv4TosMonetary +var PatternFlowIpv4TosMonetaryChoice = struct { + VALUE PatternFlowIpv4TosMonetaryChoiceEnum + VALUES PatternFlowIpv4TosMonetaryChoiceEnum + INCREMENT PatternFlowIpv4TosMonetaryChoiceEnum + DECREMENT PatternFlowIpv4TosMonetaryChoiceEnum +}{ + VALUE: PatternFlowIpv4TosMonetaryChoiceEnum("value"), + VALUES: PatternFlowIpv4TosMonetaryChoiceEnum("values"), + INCREMENT: PatternFlowIpv4TosMonetaryChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4TosMonetaryChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4TosMonetary) Choice() PatternFlowIpv4TosMonetaryChoiceEnum { + return PatternFlowIpv4TosMonetaryChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4TosMonetary) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4TosMonetary) setChoice(value PatternFlowIpv4TosMonetaryChoiceEnum) PatternFlowIpv4TosMonetary { + intValue, ok := otg.PatternFlowIpv4TosMonetary_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4TosMonetaryChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4TosMonetary_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4TosMonetaryChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4TosMonetaryChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4TosMonetaryChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4TosMonetaryCounter().msg() + } + + if value == PatternFlowIpv4TosMonetaryChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4TosMonetaryCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TosMonetary) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4TosMonetaryChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TosMonetary) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4TosMonetary object +func (obj *patternFlowIpv4TosMonetary) SetValue(value uint32) PatternFlowIpv4TosMonetary { + obj.setChoice(PatternFlowIpv4TosMonetaryChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4TosMonetary) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4TosMonetary object +func (obj *patternFlowIpv4TosMonetary) SetValues(value []uint32) PatternFlowIpv4TosMonetary { + obj.setChoice(PatternFlowIpv4TosMonetaryChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4TosMonetaryCounter +func (obj *patternFlowIpv4TosMonetary) Increment() PatternFlowIpv4TosMonetaryCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4TosMonetaryChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4TosMonetaryCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4TosMonetaryCounter +func (obj *patternFlowIpv4TosMonetary) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4TosMonetaryCounter value in the PatternFlowIpv4TosMonetary object +func (obj *patternFlowIpv4TosMonetary) SetIncrement(value PatternFlowIpv4TosMonetaryCounter) PatternFlowIpv4TosMonetary { + obj.setChoice(PatternFlowIpv4TosMonetaryChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TosMonetaryCounter +func (obj *patternFlowIpv4TosMonetary) Decrement() PatternFlowIpv4TosMonetaryCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4TosMonetaryChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4TosMonetaryCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TosMonetaryCounter +func (obj *patternFlowIpv4TosMonetary) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4TosMonetaryCounter value in the PatternFlowIpv4TosMonetary object +func (obj *patternFlowIpv4TosMonetary) SetDecrement(value PatternFlowIpv4TosMonetaryCounter) PatternFlowIpv4TosMonetary { + obj.setChoice(PatternFlowIpv4TosMonetaryChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4TosMonetaryMetricTag +func (obj *patternFlowIpv4TosMonetary) MetricTags() PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4TosMonetaryMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter struct { + obj *patternFlowIpv4TosMonetary + patternFlowIpv4TosMonetaryMetricTagSlice []PatternFlowIpv4TosMonetaryMetricTag + fieldPtr *[]*otg.PatternFlowIpv4TosMonetaryMetricTag +} + +func newPatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter(ptr *[]*otg.PatternFlowIpv4TosMonetaryMetricTag) PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter { + return &patternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter interface { + setMsg(*patternFlowIpv4TosMonetary) PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter + Items() []PatternFlowIpv4TosMonetaryMetricTag + Add() PatternFlowIpv4TosMonetaryMetricTag + Append(items ...PatternFlowIpv4TosMonetaryMetricTag) PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter + Set(index int, newObj PatternFlowIpv4TosMonetaryMetricTag) PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter + Clear() PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter + clearHolderSlice() PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter + appendHolderSlice(item PatternFlowIpv4TosMonetaryMetricTag) PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter +} + +func (obj *patternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter) setMsg(msg *patternFlowIpv4TosMonetary) PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4TosMonetaryMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter) Items() []PatternFlowIpv4TosMonetaryMetricTag { + return obj.patternFlowIpv4TosMonetaryMetricTagSlice +} + +func (obj *patternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter) Add() PatternFlowIpv4TosMonetaryMetricTag { + newObj := &otg.PatternFlowIpv4TosMonetaryMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4TosMonetaryMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4TosMonetaryMetricTagSlice = append(obj.patternFlowIpv4TosMonetaryMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter) Append(items ...PatternFlowIpv4TosMonetaryMetricTag) PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4TosMonetaryMetricTagSlice = append(obj.patternFlowIpv4TosMonetaryMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter) Set(index int, newObj PatternFlowIpv4TosMonetaryMetricTag) PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4TosMonetaryMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter) Clear() PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4TosMonetaryMetricTag{} + obj.patternFlowIpv4TosMonetaryMetricTagSlice = []PatternFlowIpv4TosMonetaryMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter) clearHolderSlice() PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter { + if len(obj.patternFlowIpv4TosMonetaryMetricTagSlice) > 0 { + obj.patternFlowIpv4TosMonetaryMetricTagSlice = []PatternFlowIpv4TosMonetaryMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter) appendHolderSlice(item PatternFlowIpv4TosMonetaryMetricTag) PatternFlowIpv4TosMonetaryPatternFlowIpv4TosMonetaryMetricTagIter { + obj.patternFlowIpv4TosMonetaryMetricTagSlice = append(obj.patternFlowIpv4TosMonetaryMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4TosMonetary) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosMonetary.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4TosMonetary.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4TosMonetaryMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4TosMonetary) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4TosMonetaryChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4TosMonetaryChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4TosMonetaryChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4TosMonetaryChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4TosMonetaryChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4TosMonetaryChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4TosMonetary") + } + } else { + intVal := otg.PatternFlowIpv4TosMonetary_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4TosMonetary_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_monetary_counter.go b/gosnappi/pattern_flow_ipv4_tos_monetary_counter.go new file mode 100644 index 00000000..72491de0 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_monetary_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosMonetaryCounter ***** +type patternFlowIpv4TosMonetaryCounter struct { + validation + obj *otg.PatternFlowIpv4TosMonetaryCounter + marshaller marshalPatternFlowIpv4TosMonetaryCounter + unMarshaller unMarshalPatternFlowIpv4TosMonetaryCounter +} + +func NewPatternFlowIpv4TosMonetaryCounter() PatternFlowIpv4TosMonetaryCounter { + obj := patternFlowIpv4TosMonetaryCounter{obj: &otg.PatternFlowIpv4TosMonetaryCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosMonetaryCounter) msg() *otg.PatternFlowIpv4TosMonetaryCounter { + return obj.obj +} + +func (obj *patternFlowIpv4TosMonetaryCounter) setMsg(msg *otg.PatternFlowIpv4TosMonetaryCounter) PatternFlowIpv4TosMonetaryCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosMonetaryCounter struct { + obj *patternFlowIpv4TosMonetaryCounter +} + +type marshalPatternFlowIpv4TosMonetaryCounter interface { + // ToProto marshals PatternFlowIpv4TosMonetaryCounter to protobuf object *otg.PatternFlowIpv4TosMonetaryCounter + ToProto() (*otg.PatternFlowIpv4TosMonetaryCounter, error) + // ToPbText marshals PatternFlowIpv4TosMonetaryCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosMonetaryCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosMonetaryCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosMonetaryCounter struct { + obj *patternFlowIpv4TosMonetaryCounter +} + +type unMarshalPatternFlowIpv4TosMonetaryCounter interface { + // FromProto unmarshals PatternFlowIpv4TosMonetaryCounter from protobuf object *otg.PatternFlowIpv4TosMonetaryCounter + FromProto(msg *otg.PatternFlowIpv4TosMonetaryCounter) (PatternFlowIpv4TosMonetaryCounter, error) + // FromPbText unmarshals PatternFlowIpv4TosMonetaryCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosMonetaryCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosMonetaryCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosMonetaryCounter) Marshal() marshalPatternFlowIpv4TosMonetaryCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosMonetaryCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosMonetaryCounter) Unmarshal() unMarshalPatternFlowIpv4TosMonetaryCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosMonetaryCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosMonetaryCounter) ToProto() (*otg.PatternFlowIpv4TosMonetaryCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosMonetaryCounter) FromProto(msg *otg.PatternFlowIpv4TosMonetaryCounter) (PatternFlowIpv4TosMonetaryCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosMonetaryCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosMonetaryCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosMonetaryCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosMonetaryCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosMonetaryCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosMonetaryCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosMonetaryCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosMonetaryCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosMonetaryCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosMonetaryCounter) Clone() (PatternFlowIpv4TosMonetaryCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosMonetaryCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TosMonetaryCounter is integer counter pattern +type PatternFlowIpv4TosMonetaryCounter interface { + Validation + // msg marshals PatternFlowIpv4TosMonetaryCounter to protobuf object *otg.PatternFlowIpv4TosMonetaryCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosMonetaryCounter + // setMsg unmarshals PatternFlowIpv4TosMonetaryCounter from protobuf object *otg.PatternFlowIpv4TosMonetaryCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosMonetaryCounter) PatternFlowIpv4TosMonetaryCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosMonetaryCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosMonetaryCounter + // validate validates PatternFlowIpv4TosMonetaryCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosMonetaryCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4TosMonetaryCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4TosMonetaryCounter + SetStart(value uint32) PatternFlowIpv4TosMonetaryCounter + // HasStart checks if Start has been set in PatternFlowIpv4TosMonetaryCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4TosMonetaryCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4TosMonetaryCounter + SetStep(value uint32) PatternFlowIpv4TosMonetaryCounter + // HasStep checks if Step has been set in PatternFlowIpv4TosMonetaryCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4TosMonetaryCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4TosMonetaryCounter + SetCount(value uint32) PatternFlowIpv4TosMonetaryCounter + // HasCount checks if Count has been set in PatternFlowIpv4TosMonetaryCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TosMonetaryCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TosMonetaryCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4TosMonetaryCounter object +func (obj *patternFlowIpv4TosMonetaryCounter) SetStart(value uint32) PatternFlowIpv4TosMonetaryCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TosMonetaryCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TosMonetaryCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4TosMonetaryCounter object +func (obj *patternFlowIpv4TosMonetaryCounter) SetStep(value uint32) PatternFlowIpv4TosMonetaryCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TosMonetaryCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TosMonetaryCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4TosMonetaryCounter object +func (obj *patternFlowIpv4TosMonetaryCounter) SetCount(value uint32) PatternFlowIpv4TosMonetaryCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4TosMonetaryCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosMonetaryCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosMonetaryCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosMonetaryCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4TosMonetaryCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_monetary_metric_tag.go b/gosnappi/pattern_flow_ipv4_tos_monetary_metric_tag.go new file mode 100644 index 00000000..8386b365 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_monetary_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosMonetaryMetricTag ***** +type patternFlowIpv4TosMonetaryMetricTag struct { + validation + obj *otg.PatternFlowIpv4TosMonetaryMetricTag + marshaller marshalPatternFlowIpv4TosMonetaryMetricTag + unMarshaller unMarshalPatternFlowIpv4TosMonetaryMetricTag +} + +func NewPatternFlowIpv4TosMonetaryMetricTag() PatternFlowIpv4TosMonetaryMetricTag { + obj := patternFlowIpv4TosMonetaryMetricTag{obj: &otg.PatternFlowIpv4TosMonetaryMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosMonetaryMetricTag) msg() *otg.PatternFlowIpv4TosMonetaryMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4TosMonetaryMetricTag) setMsg(msg *otg.PatternFlowIpv4TosMonetaryMetricTag) PatternFlowIpv4TosMonetaryMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosMonetaryMetricTag struct { + obj *patternFlowIpv4TosMonetaryMetricTag +} + +type marshalPatternFlowIpv4TosMonetaryMetricTag interface { + // ToProto marshals PatternFlowIpv4TosMonetaryMetricTag to protobuf object *otg.PatternFlowIpv4TosMonetaryMetricTag + ToProto() (*otg.PatternFlowIpv4TosMonetaryMetricTag, error) + // ToPbText marshals PatternFlowIpv4TosMonetaryMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosMonetaryMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosMonetaryMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosMonetaryMetricTag struct { + obj *patternFlowIpv4TosMonetaryMetricTag +} + +type unMarshalPatternFlowIpv4TosMonetaryMetricTag interface { + // FromProto unmarshals PatternFlowIpv4TosMonetaryMetricTag from protobuf object *otg.PatternFlowIpv4TosMonetaryMetricTag + FromProto(msg *otg.PatternFlowIpv4TosMonetaryMetricTag) (PatternFlowIpv4TosMonetaryMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4TosMonetaryMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosMonetaryMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosMonetaryMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosMonetaryMetricTag) Marshal() marshalPatternFlowIpv4TosMonetaryMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosMonetaryMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosMonetaryMetricTag) Unmarshal() unMarshalPatternFlowIpv4TosMonetaryMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosMonetaryMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosMonetaryMetricTag) ToProto() (*otg.PatternFlowIpv4TosMonetaryMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosMonetaryMetricTag) FromProto(msg *otg.PatternFlowIpv4TosMonetaryMetricTag) (PatternFlowIpv4TosMonetaryMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosMonetaryMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosMonetaryMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosMonetaryMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosMonetaryMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosMonetaryMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosMonetaryMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosMonetaryMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosMonetaryMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosMonetaryMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosMonetaryMetricTag) Clone() (PatternFlowIpv4TosMonetaryMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosMonetaryMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TosMonetaryMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4TosMonetaryMetricTag interface { + Validation + // msg marshals PatternFlowIpv4TosMonetaryMetricTag to protobuf object *otg.PatternFlowIpv4TosMonetaryMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosMonetaryMetricTag + // setMsg unmarshals PatternFlowIpv4TosMonetaryMetricTag from protobuf object *otg.PatternFlowIpv4TosMonetaryMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosMonetaryMetricTag) PatternFlowIpv4TosMonetaryMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosMonetaryMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosMonetaryMetricTag + // validate validates PatternFlowIpv4TosMonetaryMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosMonetaryMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4TosMonetaryMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4TosMonetaryMetricTag + SetName(value string) PatternFlowIpv4TosMonetaryMetricTag + // Offset returns uint32, set in PatternFlowIpv4TosMonetaryMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4TosMonetaryMetricTag + SetOffset(value uint32) PatternFlowIpv4TosMonetaryMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4TosMonetaryMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4TosMonetaryMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4TosMonetaryMetricTag + SetLength(value uint32) PatternFlowIpv4TosMonetaryMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4TosMonetaryMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4TosMonetaryMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4TosMonetaryMetricTag object +func (obj *patternFlowIpv4TosMonetaryMetricTag) SetName(value string) PatternFlowIpv4TosMonetaryMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TosMonetaryMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TosMonetaryMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4TosMonetaryMetricTag object +func (obj *patternFlowIpv4TosMonetaryMetricTag) SetOffset(value uint32) PatternFlowIpv4TosMonetaryMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TosMonetaryMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TosMonetaryMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4TosMonetaryMetricTag object +func (obj *patternFlowIpv4TosMonetaryMetricTag) SetLength(value uint32) PatternFlowIpv4TosMonetaryMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4TosMonetaryMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4TosMonetaryMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosMonetaryMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4TosMonetaryMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4TosMonetaryMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_precedence.go b/gosnappi/pattern_flow_ipv4_tos_precedence.go new file mode 100644 index 00000000..ce53dff6 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_precedence.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosPrecedence ***** +type patternFlowIpv4TosPrecedence struct { + validation + obj *otg.PatternFlowIpv4TosPrecedence + marshaller marshalPatternFlowIpv4TosPrecedence + unMarshaller unMarshalPatternFlowIpv4TosPrecedence + incrementHolder PatternFlowIpv4TosPrecedenceCounter + decrementHolder PatternFlowIpv4TosPrecedenceCounter + metricTagsHolder PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter +} + +func NewPatternFlowIpv4TosPrecedence() PatternFlowIpv4TosPrecedence { + obj := patternFlowIpv4TosPrecedence{obj: &otg.PatternFlowIpv4TosPrecedence{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosPrecedence) msg() *otg.PatternFlowIpv4TosPrecedence { + return obj.obj +} + +func (obj *patternFlowIpv4TosPrecedence) setMsg(msg *otg.PatternFlowIpv4TosPrecedence) PatternFlowIpv4TosPrecedence { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosPrecedence struct { + obj *patternFlowIpv4TosPrecedence +} + +type marshalPatternFlowIpv4TosPrecedence interface { + // ToProto marshals PatternFlowIpv4TosPrecedence to protobuf object *otg.PatternFlowIpv4TosPrecedence + ToProto() (*otg.PatternFlowIpv4TosPrecedence, error) + // ToPbText marshals PatternFlowIpv4TosPrecedence to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosPrecedence to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosPrecedence to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosPrecedence struct { + obj *patternFlowIpv4TosPrecedence +} + +type unMarshalPatternFlowIpv4TosPrecedence interface { + // FromProto unmarshals PatternFlowIpv4TosPrecedence from protobuf object *otg.PatternFlowIpv4TosPrecedence + FromProto(msg *otg.PatternFlowIpv4TosPrecedence) (PatternFlowIpv4TosPrecedence, error) + // FromPbText unmarshals PatternFlowIpv4TosPrecedence from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosPrecedence from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosPrecedence from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosPrecedence) Marshal() marshalPatternFlowIpv4TosPrecedence { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosPrecedence{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosPrecedence) Unmarshal() unMarshalPatternFlowIpv4TosPrecedence { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosPrecedence{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosPrecedence) ToProto() (*otg.PatternFlowIpv4TosPrecedence, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosPrecedence) FromProto(msg *otg.PatternFlowIpv4TosPrecedence) (PatternFlowIpv4TosPrecedence, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosPrecedence) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosPrecedence) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosPrecedence) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosPrecedence) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosPrecedence) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosPrecedence) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosPrecedence) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosPrecedence) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosPrecedence) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosPrecedence) Clone() (PatternFlowIpv4TosPrecedence, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosPrecedence() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4TosPrecedence) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4TosPrecedence is precedence +type PatternFlowIpv4TosPrecedence interface { + Validation + // msg marshals PatternFlowIpv4TosPrecedence to protobuf object *otg.PatternFlowIpv4TosPrecedence + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosPrecedence + // setMsg unmarshals PatternFlowIpv4TosPrecedence from protobuf object *otg.PatternFlowIpv4TosPrecedence + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosPrecedence) PatternFlowIpv4TosPrecedence + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosPrecedence + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosPrecedence + // validate validates PatternFlowIpv4TosPrecedence + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosPrecedence, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4TosPrecedenceChoiceEnum, set in PatternFlowIpv4TosPrecedence + Choice() PatternFlowIpv4TosPrecedenceChoiceEnum + // setChoice assigns PatternFlowIpv4TosPrecedenceChoiceEnum provided by user to PatternFlowIpv4TosPrecedence + setChoice(value PatternFlowIpv4TosPrecedenceChoiceEnum) PatternFlowIpv4TosPrecedence + // HasChoice checks if Choice has been set in PatternFlowIpv4TosPrecedence + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4TosPrecedence. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4TosPrecedence + SetValue(value uint32) PatternFlowIpv4TosPrecedence + // HasValue checks if Value has been set in PatternFlowIpv4TosPrecedence + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4TosPrecedence. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4TosPrecedence + SetValues(value []uint32) PatternFlowIpv4TosPrecedence + // Increment returns PatternFlowIpv4TosPrecedenceCounter, set in PatternFlowIpv4TosPrecedence. + // PatternFlowIpv4TosPrecedenceCounter is integer counter pattern + Increment() PatternFlowIpv4TosPrecedenceCounter + // SetIncrement assigns PatternFlowIpv4TosPrecedenceCounter provided by user to PatternFlowIpv4TosPrecedence. + // PatternFlowIpv4TosPrecedenceCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4TosPrecedenceCounter) PatternFlowIpv4TosPrecedence + // HasIncrement checks if Increment has been set in PatternFlowIpv4TosPrecedence + HasIncrement() bool + // Decrement returns PatternFlowIpv4TosPrecedenceCounter, set in PatternFlowIpv4TosPrecedence. + // PatternFlowIpv4TosPrecedenceCounter is integer counter pattern + Decrement() PatternFlowIpv4TosPrecedenceCounter + // SetDecrement assigns PatternFlowIpv4TosPrecedenceCounter provided by user to PatternFlowIpv4TosPrecedence. + // PatternFlowIpv4TosPrecedenceCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4TosPrecedenceCounter) PatternFlowIpv4TosPrecedence + // HasDecrement checks if Decrement has been set in PatternFlowIpv4TosPrecedence + HasDecrement() bool + // MetricTags returns PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIterIter, set in PatternFlowIpv4TosPrecedence + MetricTags() PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter + setNil() +} + +type PatternFlowIpv4TosPrecedenceChoiceEnum string + +// Enum of Choice on PatternFlowIpv4TosPrecedence +var PatternFlowIpv4TosPrecedenceChoice = struct { + VALUE PatternFlowIpv4TosPrecedenceChoiceEnum + VALUES PatternFlowIpv4TosPrecedenceChoiceEnum + INCREMENT PatternFlowIpv4TosPrecedenceChoiceEnum + DECREMENT PatternFlowIpv4TosPrecedenceChoiceEnum +}{ + VALUE: PatternFlowIpv4TosPrecedenceChoiceEnum("value"), + VALUES: PatternFlowIpv4TosPrecedenceChoiceEnum("values"), + INCREMENT: PatternFlowIpv4TosPrecedenceChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4TosPrecedenceChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4TosPrecedence) Choice() PatternFlowIpv4TosPrecedenceChoiceEnum { + return PatternFlowIpv4TosPrecedenceChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4TosPrecedence) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4TosPrecedence) setChoice(value PatternFlowIpv4TosPrecedenceChoiceEnum) PatternFlowIpv4TosPrecedence { + intValue, ok := otg.PatternFlowIpv4TosPrecedence_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4TosPrecedenceChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4TosPrecedence_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4TosPrecedenceChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4TosPrecedenceChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4TosPrecedenceChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4TosPrecedenceCounter().msg() + } + + if value == PatternFlowIpv4TosPrecedenceChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4TosPrecedenceCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TosPrecedence) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4TosPrecedenceChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TosPrecedence) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4TosPrecedence object +func (obj *patternFlowIpv4TosPrecedence) SetValue(value uint32) PatternFlowIpv4TosPrecedence { + obj.setChoice(PatternFlowIpv4TosPrecedenceChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4TosPrecedence) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4TosPrecedence object +func (obj *patternFlowIpv4TosPrecedence) SetValues(value []uint32) PatternFlowIpv4TosPrecedence { + obj.setChoice(PatternFlowIpv4TosPrecedenceChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4TosPrecedenceCounter +func (obj *patternFlowIpv4TosPrecedence) Increment() PatternFlowIpv4TosPrecedenceCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4TosPrecedenceChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4TosPrecedenceCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4TosPrecedenceCounter +func (obj *patternFlowIpv4TosPrecedence) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4TosPrecedenceCounter value in the PatternFlowIpv4TosPrecedence object +func (obj *patternFlowIpv4TosPrecedence) SetIncrement(value PatternFlowIpv4TosPrecedenceCounter) PatternFlowIpv4TosPrecedence { + obj.setChoice(PatternFlowIpv4TosPrecedenceChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TosPrecedenceCounter +func (obj *patternFlowIpv4TosPrecedence) Decrement() PatternFlowIpv4TosPrecedenceCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4TosPrecedenceChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4TosPrecedenceCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TosPrecedenceCounter +func (obj *patternFlowIpv4TosPrecedence) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4TosPrecedenceCounter value in the PatternFlowIpv4TosPrecedence object +func (obj *patternFlowIpv4TosPrecedence) SetDecrement(value PatternFlowIpv4TosPrecedenceCounter) PatternFlowIpv4TosPrecedence { + obj.setChoice(PatternFlowIpv4TosPrecedenceChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4TosPrecedenceMetricTag +func (obj *patternFlowIpv4TosPrecedence) MetricTags() PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4TosPrecedenceMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter struct { + obj *patternFlowIpv4TosPrecedence + patternFlowIpv4TosPrecedenceMetricTagSlice []PatternFlowIpv4TosPrecedenceMetricTag + fieldPtr *[]*otg.PatternFlowIpv4TosPrecedenceMetricTag +} + +func newPatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter(ptr *[]*otg.PatternFlowIpv4TosPrecedenceMetricTag) PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter { + return &patternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter interface { + setMsg(*patternFlowIpv4TosPrecedence) PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter + Items() []PatternFlowIpv4TosPrecedenceMetricTag + Add() PatternFlowIpv4TosPrecedenceMetricTag + Append(items ...PatternFlowIpv4TosPrecedenceMetricTag) PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter + Set(index int, newObj PatternFlowIpv4TosPrecedenceMetricTag) PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter + Clear() PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter + clearHolderSlice() PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter + appendHolderSlice(item PatternFlowIpv4TosPrecedenceMetricTag) PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter +} + +func (obj *patternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter) setMsg(msg *patternFlowIpv4TosPrecedence) PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4TosPrecedenceMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter) Items() []PatternFlowIpv4TosPrecedenceMetricTag { + return obj.patternFlowIpv4TosPrecedenceMetricTagSlice +} + +func (obj *patternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter) Add() PatternFlowIpv4TosPrecedenceMetricTag { + newObj := &otg.PatternFlowIpv4TosPrecedenceMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4TosPrecedenceMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4TosPrecedenceMetricTagSlice = append(obj.patternFlowIpv4TosPrecedenceMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter) Append(items ...PatternFlowIpv4TosPrecedenceMetricTag) PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4TosPrecedenceMetricTagSlice = append(obj.patternFlowIpv4TosPrecedenceMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter) Set(index int, newObj PatternFlowIpv4TosPrecedenceMetricTag) PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4TosPrecedenceMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter) Clear() PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4TosPrecedenceMetricTag{} + obj.patternFlowIpv4TosPrecedenceMetricTagSlice = []PatternFlowIpv4TosPrecedenceMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter) clearHolderSlice() PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter { + if len(obj.patternFlowIpv4TosPrecedenceMetricTagSlice) > 0 { + obj.patternFlowIpv4TosPrecedenceMetricTagSlice = []PatternFlowIpv4TosPrecedenceMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter) appendHolderSlice(item PatternFlowIpv4TosPrecedenceMetricTag) PatternFlowIpv4TosPrecedencePatternFlowIpv4TosPrecedenceMetricTagIter { + obj.patternFlowIpv4TosPrecedenceMetricTagSlice = append(obj.patternFlowIpv4TosPrecedenceMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4TosPrecedence) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosPrecedence.Value <= 7 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4TosPrecedence.Values <= 7 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4TosPrecedenceMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4TosPrecedence) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4TosPrecedenceChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4TosPrecedenceChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4TosPrecedenceChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4TosPrecedenceChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4TosPrecedenceChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4TosPrecedenceChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4TosPrecedence") + } + } else { + intVal := otg.PatternFlowIpv4TosPrecedence_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4TosPrecedence_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_precedence_counter.go b/gosnappi/pattern_flow_ipv4_tos_precedence_counter.go new file mode 100644 index 00000000..e0c2482f --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_precedence_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosPrecedenceCounter ***** +type patternFlowIpv4TosPrecedenceCounter struct { + validation + obj *otg.PatternFlowIpv4TosPrecedenceCounter + marshaller marshalPatternFlowIpv4TosPrecedenceCounter + unMarshaller unMarshalPatternFlowIpv4TosPrecedenceCounter +} + +func NewPatternFlowIpv4TosPrecedenceCounter() PatternFlowIpv4TosPrecedenceCounter { + obj := patternFlowIpv4TosPrecedenceCounter{obj: &otg.PatternFlowIpv4TosPrecedenceCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosPrecedenceCounter) msg() *otg.PatternFlowIpv4TosPrecedenceCounter { + return obj.obj +} + +func (obj *patternFlowIpv4TosPrecedenceCounter) setMsg(msg *otg.PatternFlowIpv4TosPrecedenceCounter) PatternFlowIpv4TosPrecedenceCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosPrecedenceCounter struct { + obj *patternFlowIpv4TosPrecedenceCounter +} + +type marshalPatternFlowIpv4TosPrecedenceCounter interface { + // ToProto marshals PatternFlowIpv4TosPrecedenceCounter to protobuf object *otg.PatternFlowIpv4TosPrecedenceCounter + ToProto() (*otg.PatternFlowIpv4TosPrecedenceCounter, error) + // ToPbText marshals PatternFlowIpv4TosPrecedenceCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosPrecedenceCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosPrecedenceCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosPrecedenceCounter struct { + obj *patternFlowIpv4TosPrecedenceCounter +} + +type unMarshalPatternFlowIpv4TosPrecedenceCounter interface { + // FromProto unmarshals PatternFlowIpv4TosPrecedenceCounter from protobuf object *otg.PatternFlowIpv4TosPrecedenceCounter + FromProto(msg *otg.PatternFlowIpv4TosPrecedenceCounter) (PatternFlowIpv4TosPrecedenceCounter, error) + // FromPbText unmarshals PatternFlowIpv4TosPrecedenceCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosPrecedenceCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosPrecedenceCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosPrecedenceCounter) Marshal() marshalPatternFlowIpv4TosPrecedenceCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosPrecedenceCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosPrecedenceCounter) Unmarshal() unMarshalPatternFlowIpv4TosPrecedenceCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosPrecedenceCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosPrecedenceCounter) ToProto() (*otg.PatternFlowIpv4TosPrecedenceCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosPrecedenceCounter) FromProto(msg *otg.PatternFlowIpv4TosPrecedenceCounter) (PatternFlowIpv4TosPrecedenceCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosPrecedenceCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosPrecedenceCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosPrecedenceCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosPrecedenceCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosPrecedenceCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosPrecedenceCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosPrecedenceCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosPrecedenceCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosPrecedenceCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosPrecedenceCounter) Clone() (PatternFlowIpv4TosPrecedenceCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosPrecedenceCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TosPrecedenceCounter is integer counter pattern +type PatternFlowIpv4TosPrecedenceCounter interface { + Validation + // msg marshals PatternFlowIpv4TosPrecedenceCounter to protobuf object *otg.PatternFlowIpv4TosPrecedenceCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosPrecedenceCounter + // setMsg unmarshals PatternFlowIpv4TosPrecedenceCounter from protobuf object *otg.PatternFlowIpv4TosPrecedenceCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosPrecedenceCounter) PatternFlowIpv4TosPrecedenceCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosPrecedenceCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosPrecedenceCounter + // validate validates PatternFlowIpv4TosPrecedenceCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosPrecedenceCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4TosPrecedenceCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4TosPrecedenceCounter + SetStart(value uint32) PatternFlowIpv4TosPrecedenceCounter + // HasStart checks if Start has been set in PatternFlowIpv4TosPrecedenceCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4TosPrecedenceCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4TosPrecedenceCounter + SetStep(value uint32) PatternFlowIpv4TosPrecedenceCounter + // HasStep checks if Step has been set in PatternFlowIpv4TosPrecedenceCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4TosPrecedenceCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4TosPrecedenceCounter + SetCount(value uint32) PatternFlowIpv4TosPrecedenceCounter + // HasCount checks if Count has been set in PatternFlowIpv4TosPrecedenceCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TosPrecedenceCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TosPrecedenceCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4TosPrecedenceCounter object +func (obj *patternFlowIpv4TosPrecedenceCounter) SetStart(value uint32) PatternFlowIpv4TosPrecedenceCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TosPrecedenceCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TosPrecedenceCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4TosPrecedenceCounter object +func (obj *patternFlowIpv4TosPrecedenceCounter) SetStep(value uint32) PatternFlowIpv4TosPrecedenceCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TosPrecedenceCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TosPrecedenceCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4TosPrecedenceCounter object +func (obj *patternFlowIpv4TosPrecedenceCounter) SetCount(value uint32) PatternFlowIpv4TosPrecedenceCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4TosPrecedenceCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosPrecedenceCounter.Start <= 7 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosPrecedenceCounter.Step <= 7 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosPrecedenceCounter.Count <= 7 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4TosPrecedenceCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_precedence_metric_tag.go b/gosnappi/pattern_flow_ipv4_tos_precedence_metric_tag.go new file mode 100644 index 00000000..549d462d --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_precedence_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosPrecedenceMetricTag ***** +type patternFlowIpv4TosPrecedenceMetricTag struct { + validation + obj *otg.PatternFlowIpv4TosPrecedenceMetricTag + marshaller marshalPatternFlowIpv4TosPrecedenceMetricTag + unMarshaller unMarshalPatternFlowIpv4TosPrecedenceMetricTag +} + +func NewPatternFlowIpv4TosPrecedenceMetricTag() PatternFlowIpv4TosPrecedenceMetricTag { + obj := patternFlowIpv4TosPrecedenceMetricTag{obj: &otg.PatternFlowIpv4TosPrecedenceMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosPrecedenceMetricTag) msg() *otg.PatternFlowIpv4TosPrecedenceMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4TosPrecedenceMetricTag) setMsg(msg *otg.PatternFlowIpv4TosPrecedenceMetricTag) PatternFlowIpv4TosPrecedenceMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosPrecedenceMetricTag struct { + obj *patternFlowIpv4TosPrecedenceMetricTag +} + +type marshalPatternFlowIpv4TosPrecedenceMetricTag interface { + // ToProto marshals PatternFlowIpv4TosPrecedenceMetricTag to protobuf object *otg.PatternFlowIpv4TosPrecedenceMetricTag + ToProto() (*otg.PatternFlowIpv4TosPrecedenceMetricTag, error) + // ToPbText marshals PatternFlowIpv4TosPrecedenceMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosPrecedenceMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosPrecedenceMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosPrecedenceMetricTag struct { + obj *patternFlowIpv4TosPrecedenceMetricTag +} + +type unMarshalPatternFlowIpv4TosPrecedenceMetricTag interface { + // FromProto unmarshals PatternFlowIpv4TosPrecedenceMetricTag from protobuf object *otg.PatternFlowIpv4TosPrecedenceMetricTag + FromProto(msg *otg.PatternFlowIpv4TosPrecedenceMetricTag) (PatternFlowIpv4TosPrecedenceMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4TosPrecedenceMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosPrecedenceMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosPrecedenceMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosPrecedenceMetricTag) Marshal() marshalPatternFlowIpv4TosPrecedenceMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosPrecedenceMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosPrecedenceMetricTag) Unmarshal() unMarshalPatternFlowIpv4TosPrecedenceMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosPrecedenceMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosPrecedenceMetricTag) ToProto() (*otg.PatternFlowIpv4TosPrecedenceMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosPrecedenceMetricTag) FromProto(msg *otg.PatternFlowIpv4TosPrecedenceMetricTag) (PatternFlowIpv4TosPrecedenceMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosPrecedenceMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosPrecedenceMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosPrecedenceMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosPrecedenceMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosPrecedenceMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosPrecedenceMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosPrecedenceMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosPrecedenceMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosPrecedenceMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosPrecedenceMetricTag) Clone() (PatternFlowIpv4TosPrecedenceMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosPrecedenceMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TosPrecedenceMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4TosPrecedenceMetricTag interface { + Validation + // msg marshals PatternFlowIpv4TosPrecedenceMetricTag to protobuf object *otg.PatternFlowIpv4TosPrecedenceMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosPrecedenceMetricTag + // setMsg unmarshals PatternFlowIpv4TosPrecedenceMetricTag from protobuf object *otg.PatternFlowIpv4TosPrecedenceMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosPrecedenceMetricTag) PatternFlowIpv4TosPrecedenceMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosPrecedenceMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosPrecedenceMetricTag + // validate validates PatternFlowIpv4TosPrecedenceMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosPrecedenceMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4TosPrecedenceMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4TosPrecedenceMetricTag + SetName(value string) PatternFlowIpv4TosPrecedenceMetricTag + // Offset returns uint32, set in PatternFlowIpv4TosPrecedenceMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4TosPrecedenceMetricTag + SetOffset(value uint32) PatternFlowIpv4TosPrecedenceMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4TosPrecedenceMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4TosPrecedenceMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4TosPrecedenceMetricTag + SetLength(value uint32) PatternFlowIpv4TosPrecedenceMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4TosPrecedenceMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4TosPrecedenceMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4TosPrecedenceMetricTag object +func (obj *patternFlowIpv4TosPrecedenceMetricTag) SetName(value string) PatternFlowIpv4TosPrecedenceMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TosPrecedenceMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TosPrecedenceMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4TosPrecedenceMetricTag object +func (obj *patternFlowIpv4TosPrecedenceMetricTag) SetOffset(value uint32) PatternFlowIpv4TosPrecedenceMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TosPrecedenceMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TosPrecedenceMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4TosPrecedenceMetricTag object +func (obj *patternFlowIpv4TosPrecedenceMetricTag) SetLength(value uint32) PatternFlowIpv4TosPrecedenceMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4TosPrecedenceMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4TosPrecedenceMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 2 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosPrecedenceMetricTag.Offset <= 2 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4TosPrecedenceMetricTag.Length <= 3 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4TosPrecedenceMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(3) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_reliability.go b/gosnappi/pattern_flow_ipv4_tos_reliability.go new file mode 100644 index 00000000..6bb0cd28 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_reliability.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosReliability ***** +type patternFlowIpv4TosReliability struct { + validation + obj *otg.PatternFlowIpv4TosReliability + marshaller marshalPatternFlowIpv4TosReliability + unMarshaller unMarshalPatternFlowIpv4TosReliability + incrementHolder PatternFlowIpv4TosReliabilityCounter + decrementHolder PatternFlowIpv4TosReliabilityCounter + metricTagsHolder PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter +} + +func NewPatternFlowIpv4TosReliability() PatternFlowIpv4TosReliability { + obj := patternFlowIpv4TosReliability{obj: &otg.PatternFlowIpv4TosReliability{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosReliability) msg() *otg.PatternFlowIpv4TosReliability { + return obj.obj +} + +func (obj *patternFlowIpv4TosReliability) setMsg(msg *otg.PatternFlowIpv4TosReliability) PatternFlowIpv4TosReliability { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosReliability struct { + obj *patternFlowIpv4TosReliability +} + +type marshalPatternFlowIpv4TosReliability interface { + // ToProto marshals PatternFlowIpv4TosReliability to protobuf object *otg.PatternFlowIpv4TosReliability + ToProto() (*otg.PatternFlowIpv4TosReliability, error) + // ToPbText marshals PatternFlowIpv4TosReliability to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosReliability to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosReliability to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosReliability struct { + obj *patternFlowIpv4TosReliability +} + +type unMarshalPatternFlowIpv4TosReliability interface { + // FromProto unmarshals PatternFlowIpv4TosReliability from protobuf object *otg.PatternFlowIpv4TosReliability + FromProto(msg *otg.PatternFlowIpv4TosReliability) (PatternFlowIpv4TosReliability, error) + // FromPbText unmarshals PatternFlowIpv4TosReliability from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosReliability from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosReliability from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosReliability) Marshal() marshalPatternFlowIpv4TosReliability { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosReliability{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosReliability) Unmarshal() unMarshalPatternFlowIpv4TosReliability { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosReliability{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosReliability) ToProto() (*otg.PatternFlowIpv4TosReliability, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosReliability) FromProto(msg *otg.PatternFlowIpv4TosReliability) (PatternFlowIpv4TosReliability, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosReliability) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosReliability) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosReliability) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosReliability) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosReliability) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosReliability) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosReliability) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosReliability) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosReliability) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosReliability) Clone() (PatternFlowIpv4TosReliability, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosReliability() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4TosReliability) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4TosReliability is reliability +type PatternFlowIpv4TosReliability interface { + Validation + // msg marshals PatternFlowIpv4TosReliability to protobuf object *otg.PatternFlowIpv4TosReliability + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosReliability + // setMsg unmarshals PatternFlowIpv4TosReliability from protobuf object *otg.PatternFlowIpv4TosReliability + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosReliability) PatternFlowIpv4TosReliability + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosReliability + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosReliability + // validate validates PatternFlowIpv4TosReliability + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosReliability, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4TosReliabilityChoiceEnum, set in PatternFlowIpv4TosReliability + Choice() PatternFlowIpv4TosReliabilityChoiceEnum + // setChoice assigns PatternFlowIpv4TosReliabilityChoiceEnum provided by user to PatternFlowIpv4TosReliability + setChoice(value PatternFlowIpv4TosReliabilityChoiceEnum) PatternFlowIpv4TosReliability + // HasChoice checks if Choice has been set in PatternFlowIpv4TosReliability + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4TosReliability. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4TosReliability + SetValue(value uint32) PatternFlowIpv4TosReliability + // HasValue checks if Value has been set in PatternFlowIpv4TosReliability + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4TosReliability. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4TosReliability + SetValues(value []uint32) PatternFlowIpv4TosReliability + // Increment returns PatternFlowIpv4TosReliabilityCounter, set in PatternFlowIpv4TosReliability. + // PatternFlowIpv4TosReliabilityCounter is integer counter pattern + Increment() PatternFlowIpv4TosReliabilityCounter + // SetIncrement assigns PatternFlowIpv4TosReliabilityCounter provided by user to PatternFlowIpv4TosReliability. + // PatternFlowIpv4TosReliabilityCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4TosReliabilityCounter) PatternFlowIpv4TosReliability + // HasIncrement checks if Increment has been set in PatternFlowIpv4TosReliability + HasIncrement() bool + // Decrement returns PatternFlowIpv4TosReliabilityCounter, set in PatternFlowIpv4TosReliability. + // PatternFlowIpv4TosReliabilityCounter is integer counter pattern + Decrement() PatternFlowIpv4TosReliabilityCounter + // SetDecrement assigns PatternFlowIpv4TosReliabilityCounter provided by user to PatternFlowIpv4TosReliability. + // PatternFlowIpv4TosReliabilityCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4TosReliabilityCounter) PatternFlowIpv4TosReliability + // HasDecrement checks if Decrement has been set in PatternFlowIpv4TosReliability + HasDecrement() bool + // MetricTags returns PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIterIter, set in PatternFlowIpv4TosReliability + MetricTags() PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter + setNil() +} + +type PatternFlowIpv4TosReliabilityChoiceEnum string + +// Enum of Choice on PatternFlowIpv4TosReliability +var PatternFlowIpv4TosReliabilityChoice = struct { + VALUE PatternFlowIpv4TosReliabilityChoiceEnum + VALUES PatternFlowIpv4TosReliabilityChoiceEnum + INCREMENT PatternFlowIpv4TosReliabilityChoiceEnum + DECREMENT PatternFlowIpv4TosReliabilityChoiceEnum +}{ + VALUE: PatternFlowIpv4TosReliabilityChoiceEnum("value"), + VALUES: PatternFlowIpv4TosReliabilityChoiceEnum("values"), + INCREMENT: PatternFlowIpv4TosReliabilityChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4TosReliabilityChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4TosReliability) Choice() PatternFlowIpv4TosReliabilityChoiceEnum { + return PatternFlowIpv4TosReliabilityChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4TosReliability) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4TosReliability) setChoice(value PatternFlowIpv4TosReliabilityChoiceEnum) PatternFlowIpv4TosReliability { + intValue, ok := otg.PatternFlowIpv4TosReliability_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4TosReliabilityChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4TosReliability_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4TosReliabilityChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4TosReliabilityChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4TosReliabilityChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4TosReliabilityCounter().msg() + } + + if value == PatternFlowIpv4TosReliabilityChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4TosReliabilityCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TosReliability) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4TosReliabilityChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TosReliability) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4TosReliability object +func (obj *patternFlowIpv4TosReliability) SetValue(value uint32) PatternFlowIpv4TosReliability { + obj.setChoice(PatternFlowIpv4TosReliabilityChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4TosReliability) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4TosReliability object +func (obj *patternFlowIpv4TosReliability) SetValues(value []uint32) PatternFlowIpv4TosReliability { + obj.setChoice(PatternFlowIpv4TosReliabilityChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4TosReliabilityCounter +func (obj *patternFlowIpv4TosReliability) Increment() PatternFlowIpv4TosReliabilityCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4TosReliabilityChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4TosReliabilityCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4TosReliabilityCounter +func (obj *patternFlowIpv4TosReliability) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4TosReliabilityCounter value in the PatternFlowIpv4TosReliability object +func (obj *patternFlowIpv4TosReliability) SetIncrement(value PatternFlowIpv4TosReliabilityCounter) PatternFlowIpv4TosReliability { + obj.setChoice(PatternFlowIpv4TosReliabilityChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TosReliabilityCounter +func (obj *patternFlowIpv4TosReliability) Decrement() PatternFlowIpv4TosReliabilityCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4TosReliabilityChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4TosReliabilityCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TosReliabilityCounter +func (obj *patternFlowIpv4TosReliability) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4TosReliabilityCounter value in the PatternFlowIpv4TosReliability object +func (obj *patternFlowIpv4TosReliability) SetDecrement(value PatternFlowIpv4TosReliabilityCounter) PatternFlowIpv4TosReliability { + obj.setChoice(PatternFlowIpv4TosReliabilityChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4TosReliabilityMetricTag +func (obj *patternFlowIpv4TosReliability) MetricTags() PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4TosReliabilityMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter struct { + obj *patternFlowIpv4TosReliability + patternFlowIpv4TosReliabilityMetricTagSlice []PatternFlowIpv4TosReliabilityMetricTag + fieldPtr *[]*otg.PatternFlowIpv4TosReliabilityMetricTag +} + +func newPatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter(ptr *[]*otg.PatternFlowIpv4TosReliabilityMetricTag) PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter { + return &patternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter interface { + setMsg(*patternFlowIpv4TosReliability) PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter + Items() []PatternFlowIpv4TosReliabilityMetricTag + Add() PatternFlowIpv4TosReliabilityMetricTag + Append(items ...PatternFlowIpv4TosReliabilityMetricTag) PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter + Set(index int, newObj PatternFlowIpv4TosReliabilityMetricTag) PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter + Clear() PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter + clearHolderSlice() PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter + appendHolderSlice(item PatternFlowIpv4TosReliabilityMetricTag) PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter +} + +func (obj *patternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter) setMsg(msg *patternFlowIpv4TosReliability) PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4TosReliabilityMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter) Items() []PatternFlowIpv4TosReliabilityMetricTag { + return obj.patternFlowIpv4TosReliabilityMetricTagSlice +} + +func (obj *patternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter) Add() PatternFlowIpv4TosReliabilityMetricTag { + newObj := &otg.PatternFlowIpv4TosReliabilityMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4TosReliabilityMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4TosReliabilityMetricTagSlice = append(obj.patternFlowIpv4TosReliabilityMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter) Append(items ...PatternFlowIpv4TosReliabilityMetricTag) PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4TosReliabilityMetricTagSlice = append(obj.patternFlowIpv4TosReliabilityMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter) Set(index int, newObj PatternFlowIpv4TosReliabilityMetricTag) PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4TosReliabilityMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter) Clear() PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4TosReliabilityMetricTag{} + obj.patternFlowIpv4TosReliabilityMetricTagSlice = []PatternFlowIpv4TosReliabilityMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter) clearHolderSlice() PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter { + if len(obj.patternFlowIpv4TosReliabilityMetricTagSlice) > 0 { + obj.patternFlowIpv4TosReliabilityMetricTagSlice = []PatternFlowIpv4TosReliabilityMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter) appendHolderSlice(item PatternFlowIpv4TosReliabilityMetricTag) PatternFlowIpv4TosReliabilityPatternFlowIpv4TosReliabilityMetricTagIter { + obj.patternFlowIpv4TosReliabilityMetricTagSlice = append(obj.patternFlowIpv4TosReliabilityMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4TosReliability) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosReliability.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4TosReliability.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4TosReliabilityMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4TosReliability) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4TosReliabilityChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4TosReliabilityChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4TosReliabilityChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4TosReliabilityChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4TosReliabilityChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4TosReliabilityChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4TosReliability") + } + } else { + intVal := otg.PatternFlowIpv4TosReliability_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4TosReliability_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_reliability_counter.go b/gosnappi/pattern_flow_ipv4_tos_reliability_counter.go new file mode 100644 index 00000000..f8274654 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_reliability_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosReliabilityCounter ***** +type patternFlowIpv4TosReliabilityCounter struct { + validation + obj *otg.PatternFlowIpv4TosReliabilityCounter + marshaller marshalPatternFlowIpv4TosReliabilityCounter + unMarshaller unMarshalPatternFlowIpv4TosReliabilityCounter +} + +func NewPatternFlowIpv4TosReliabilityCounter() PatternFlowIpv4TosReliabilityCounter { + obj := patternFlowIpv4TosReliabilityCounter{obj: &otg.PatternFlowIpv4TosReliabilityCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosReliabilityCounter) msg() *otg.PatternFlowIpv4TosReliabilityCounter { + return obj.obj +} + +func (obj *patternFlowIpv4TosReliabilityCounter) setMsg(msg *otg.PatternFlowIpv4TosReliabilityCounter) PatternFlowIpv4TosReliabilityCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosReliabilityCounter struct { + obj *patternFlowIpv4TosReliabilityCounter +} + +type marshalPatternFlowIpv4TosReliabilityCounter interface { + // ToProto marshals PatternFlowIpv4TosReliabilityCounter to protobuf object *otg.PatternFlowIpv4TosReliabilityCounter + ToProto() (*otg.PatternFlowIpv4TosReliabilityCounter, error) + // ToPbText marshals PatternFlowIpv4TosReliabilityCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosReliabilityCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosReliabilityCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosReliabilityCounter struct { + obj *patternFlowIpv4TosReliabilityCounter +} + +type unMarshalPatternFlowIpv4TosReliabilityCounter interface { + // FromProto unmarshals PatternFlowIpv4TosReliabilityCounter from protobuf object *otg.PatternFlowIpv4TosReliabilityCounter + FromProto(msg *otg.PatternFlowIpv4TosReliabilityCounter) (PatternFlowIpv4TosReliabilityCounter, error) + // FromPbText unmarshals PatternFlowIpv4TosReliabilityCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosReliabilityCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosReliabilityCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosReliabilityCounter) Marshal() marshalPatternFlowIpv4TosReliabilityCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosReliabilityCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosReliabilityCounter) Unmarshal() unMarshalPatternFlowIpv4TosReliabilityCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosReliabilityCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosReliabilityCounter) ToProto() (*otg.PatternFlowIpv4TosReliabilityCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosReliabilityCounter) FromProto(msg *otg.PatternFlowIpv4TosReliabilityCounter) (PatternFlowIpv4TosReliabilityCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosReliabilityCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosReliabilityCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosReliabilityCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosReliabilityCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosReliabilityCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosReliabilityCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosReliabilityCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosReliabilityCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosReliabilityCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosReliabilityCounter) Clone() (PatternFlowIpv4TosReliabilityCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosReliabilityCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TosReliabilityCounter is integer counter pattern +type PatternFlowIpv4TosReliabilityCounter interface { + Validation + // msg marshals PatternFlowIpv4TosReliabilityCounter to protobuf object *otg.PatternFlowIpv4TosReliabilityCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosReliabilityCounter + // setMsg unmarshals PatternFlowIpv4TosReliabilityCounter from protobuf object *otg.PatternFlowIpv4TosReliabilityCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosReliabilityCounter) PatternFlowIpv4TosReliabilityCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosReliabilityCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosReliabilityCounter + // validate validates PatternFlowIpv4TosReliabilityCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosReliabilityCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4TosReliabilityCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4TosReliabilityCounter + SetStart(value uint32) PatternFlowIpv4TosReliabilityCounter + // HasStart checks if Start has been set in PatternFlowIpv4TosReliabilityCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4TosReliabilityCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4TosReliabilityCounter + SetStep(value uint32) PatternFlowIpv4TosReliabilityCounter + // HasStep checks if Step has been set in PatternFlowIpv4TosReliabilityCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4TosReliabilityCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4TosReliabilityCounter + SetCount(value uint32) PatternFlowIpv4TosReliabilityCounter + // HasCount checks if Count has been set in PatternFlowIpv4TosReliabilityCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TosReliabilityCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TosReliabilityCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4TosReliabilityCounter object +func (obj *patternFlowIpv4TosReliabilityCounter) SetStart(value uint32) PatternFlowIpv4TosReliabilityCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TosReliabilityCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TosReliabilityCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4TosReliabilityCounter object +func (obj *patternFlowIpv4TosReliabilityCounter) SetStep(value uint32) PatternFlowIpv4TosReliabilityCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TosReliabilityCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TosReliabilityCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4TosReliabilityCounter object +func (obj *patternFlowIpv4TosReliabilityCounter) SetCount(value uint32) PatternFlowIpv4TosReliabilityCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4TosReliabilityCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosReliabilityCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosReliabilityCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosReliabilityCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4TosReliabilityCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_reliability_metric_tag.go b/gosnappi/pattern_flow_ipv4_tos_reliability_metric_tag.go new file mode 100644 index 00000000..69711eed --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_reliability_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosReliabilityMetricTag ***** +type patternFlowIpv4TosReliabilityMetricTag struct { + validation + obj *otg.PatternFlowIpv4TosReliabilityMetricTag + marshaller marshalPatternFlowIpv4TosReliabilityMetricTag + unMarshaller unMarshalPatternFlowIpv4TosReliabilityMetricTag +} + +func NewPatternFlowIpv4TosReliabilityMetricTag() PatternFlowIpv4TosReliabilityMetricTag { + obj := patternFlowIpv4TosReliabilityMetricTag{obj: &otg.PatternFlowIpv4TosReliabilityMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosReliabilityMetricTag) msg() *otg.PatternFlowIpv4TosReliabilityMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4TosReliabilityMetricTag) setMsg(msg *otg.PatternFlowIpv4TosReliabilityMetricTag) PatternFlowIpv4TosReliabilityMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosReliabilityMetricTag struct { + obj *patternFlowIpv4TosReliabilityMetricTag +} + +type marshalPatternFlowIpv4TosReliabilityMetricTag interface { + // ToProto marshals PatternFlowIpv4TosReliabilityMetricTag to protobuf object *otg.PatternFlowIpv4TosReliabilityMetricTag + ToProto() (*otg.PatternFlowIpv4TosReliabilityMetricTag, error) + // ToPbText marshals PatternFlowIpv4TosReliabilityMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosReliabilityMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosReliabilityMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosReliabilityMetricTag struct { + obj *patternFlowIpv4TosReliabilityMetricTag +} + +type unMarshalPatternFlowIpv4TosReliabilityMetricTag interface { + // FromProto unmarshals PatternFlowIpv4TosReliabilityMetricTag from protobuf object *otg.PatternFlowIpv4TosReliabilityMetricTag + FromProto(msg *otg.PatternFlowIpv4TosReliabilityMetricTag) (PatternFlowIpv4TosReliabilityMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4TosReliabilityMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosReliabilityMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosReliabilityMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosReliabilityMetricTag) Marshal() marshalPatternFlowIpv4TosReliabilityMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosReliabilityMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosReliabilityMetricTag) Unmarshal() unMarshalPatternFlowIpv4TosReliabilityMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosReliabilityMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosReliabilityMetricTag) ToProto() (*otg.PatternFlowIpv4TosReliabilityMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosReliabilityMetricTag) FromProto(msg *otg.PatternFlowIpv4TosReliabilityMetricTag) (PatternFlowIpv4TosReliabilityMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosReliabilityMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosReliabilityMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosReliabilityMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosReliabilityMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosReliabilityMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosReliabilityMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosReliabilityMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosReliabilityMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosReliabilityMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosReliabilityMetricTag) Clone() (PatternFlowIpv4TosReliabilityMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosReliabilityMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TosReliabilityMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4TosReliabilityMetricTag interface { + Validation + // msg marshals PatternFlowIpv4TosReliabilityMetricTag to protobuf object *otg.PatternFlowIpv4TosReliabilityMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosReliabilityMetricTag + // setMsg unmarshals PatternFlowIpv4TosReliabilityMetricTag from protobuf object *otg.PatternFlowIpv4TosReliabilityMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosReliabilityMetricTag) PatternFlowIpv4TosReliabilityMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosReliabilityMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosReliabilityMetricTag + // validate validates PatternFlowIpv4TosReliabilityMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosReliabilityMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4TosReliabilityMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4TosReliabilityMetricTag + SetName(value string) PatternFlowIpv4TosReliabilityMetricTag + // Offset returns uint32, set in PatternFlowIpv4TosReliabilityMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4TosReliabilityMetricTag + SetOffset(value uint32) PatternFlowIpv4TosReliabilityMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4TosReliabilityMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4TosReliabilityMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4TosReliabilityMetricTag + SetLength(value uint32) PatternFlowIpv4TosReliabilityMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4TosReliabilityMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4TosReliabilityMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4TosReliabilityMetricTag object +func (obj *patternFlowIpv4TosReliabilityMetricTag) SetName(value string) PatternFlowIpv4TosReliabilityMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TosReliabilityMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TosReliabilityMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4TosReliabilityMetricTag object +func (obj *patternFlowIpv4TosReliabilityMetricTag) SetOffset(value uint32) PatternFlowIpv4TosReliabilityMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TosReliabilityMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TosReliabilityMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4TosReliabilityMetricTag object +func (obj *patternFlowIpv4TosReliabilityMetricTag) SetLength(value uint32) PatternFlowIpv4TosReliabilityMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4TosReliabilityMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4TosReliabilityMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosReliabilityMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4TosReliabilityMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4TosReliabilityMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_throughput.go b/gosnappi/pattern_flow_ipv4_tos_throughput.go new file mode 100644 index 00000000..6ba234de --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_throughput.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosThroughput ***** +type patternFlowIpv4TosThroughput struct { + validation + obj *otg.PatternFlowIpv4TosThroughput + marshaller marshalPatternFlowIpv4TosThroughput + unMarshaller unMarshalPatternFlowIpv4TosThroughput + incrementHolder PatternFlowIpv4TosThroughputCounter + decrementHolder PatternFlowIpv4TosThroughputCounter + metricTagsHolder PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter +} + +func NewPatternFlowIpv4TosThroughput() PatternFlowIpv4TosThroughput { + obj := patternFlowIpv4TosThroughput{obj: &otg.PatternFlowIpv4TosThroughput{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosThroughput) msg() *otg.PatternFlowIpv4TosThroughput { + return obj.obj +} + +func (obj *patternFlowIpv4TosThroughput) setMsg(msg *otg.PatternFlowIpv4TosThroughput) PatternFlowIpv4TosThroughput { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosThroughput struct { + obj *patternFlowIpv4TosThroughput +} + +type marshalPatternFlowIpv4TosThroughput interface { + // ToProto marshals PatternFlowIpv4TosThroughput to protobuf object *otg.PatternFlowIpv4TosThroughput + ToProto() (*otg.PatternFlowIpv4TosThroughput, error) + // ToPbText marshals PatternFlowIpv4TosThroughput to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosThroughput to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosThroughput to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosThroughput struct { + obj *patternFlowIpv4TosThroughput +} + +type unMarshalPatternFlowIpv4TosThroughput interface { + // FromProto unmarshals PatternFlowIpv4TosThroughput from protobuf object *otg.PatternFlowIpv4TosThroughput + FromProto(msg *otg.PatternFlowIpv4TosThroughput) (PatternFlowIpv4TosThroughput, error) + // FromPbText unmarshals PatternFlowIpv4TosThroughput from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosThroughput from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosThroughput from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosThroughput) Marshal() marshalPatternFlowIpv4TosThroughput { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosThroughput{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosThroughput) Unmarshal() unMarshalPatternFlowIpv4TosThroughput { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosThroughput{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosThroughput) ToProto() (*otg.PatternFlowIpv4TosThroughput, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosThroughput) FromProto(msg *otg.PatternFlowIpv4TosThroughput) (PatternFlowIpv4TosThroughput, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosThroughput) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosThroughput) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosThroughput) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosThroughput) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosThroughput) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosThroughput) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosThroughput) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosThroughput) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosThroughput) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosThroughput) Clone() (PatternFlowIpv4TosThroughput, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosThroughput() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4TosThroughput) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4TosThroughput is throughput +type PatternFlowIpv4TosThroughput interface { + Validation + // msg marshals PatternFlowIpv4TosThroughput to protobuf object *otg.PatternFlowIpv4TosThroughput + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosThroughput + // setMsg unmarshals PatternFlowIpv4TosThroughput from protobuf object *otg.PatternFlowIpv4TosThroughput + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosThroughput) PatternFlowIpv4TosThroughput + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosThroughput + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosThroughput + // validate validates PatternFlowIpv4TosThroughput + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosThroughput, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4TosThroughputChoiceEnum, set in PatternFlowIpv4TosThroughput + Choice() PatternFlowIpv4TosThroughputChoiceEnum + // setChoice assigns PatternFlowIpv4TosThroughputChoiceEnum provided by user to PatternFlowIpv4TosThroughput + setChoice(value PatternFlowIpv4TosThroughputChoiceEnum) PatternFlowIpv4TosThroughput + // HasChoice checks if Choice has been set in PatternFlowIpv4TosThroughput + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4TosThroughput. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4TosThroughput + SetValue(value uint32) PatternFlowIpv4TosThroughput + // HasValue checks if Value has been set in PatternFlowIpv4TosThroughput + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4TosThroughput. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4TosThroughput + SetValues(value []uint32) PatternFlowIpv4TosThroughput + // Increment returns PatternFlowIpv4TosThroughputCounter, set in PatternFlowIpv4TosThroughput. + // PatternFlowIpv4TosThroughputCounter is integer counter pattern + Increment() PatternFlowIpv4TosThroughputCounter + // SetIncrement assigns PatternFlowIpv4TosThroughputCounter provided by user to PatternFlowIpv4TosThroughput. + // PatternFlowIpv4TosThroughputCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4TosThroughputCounter) PatternFlowIpv4TosThroughput + // HasIncrement checks if Increment has been set in PatternFlowIpv4TosThroughput + HasIncrement() bool + // Decrement returns PatternFlowIpv4TosThroughputCounter, set in PatternFlowIpv4TosThroughput. + // PatternFlowIpv4TosThroughputCounter is integer counter pattern + Decrement() PatternFlowIpv4TosThroughputCounter + // SetDecrement assigns PatternFlowIpv4TosThroughputCounter provided by user to PatternFlowIpv4TosThroughput. + // PatternFlowIpv4TosThroughputCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4TosThroughputCounter) PatternFlowIpv4TosThroughput + // HasDecrement checks if Decrement has been set in PatternFlowIpv4TosThroughput + HasDecrement() bool + // MetricTags returns PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIterIter, set in PatternFlowIpv4TosThroughput + MetricTags() PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter + setNil() +} + +type PatternFlowIpv4TosThroughputChoiceEnum string + +// Enum of Choice on PatternFlowIpv4TosThroughput +var PatternFlowIpv4TosThroughputChoice = struct { + VALUE PatternFlowIpv4TosThroughputChoiceEnum + VALUES PatternFlowIpv4TosThroughputChoiceEnum + INCREMENT PatternFlowIpv4TosThroughputChoiceEnum + DECREMENT PatternFlowIpv4TosThroughputChoiceEnum +}{ + VALUE: PatternFlowIpv4TosThroughputChoiceEnum("value"), + VALUES: PatternFlowIpv4TosThroughputChoiceEnum("values"), + INCREMENT: PatternFlowIpv4TosThroughputChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4TosThroughputChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4TosThroughput) Choice() PatternFlowIpv4TosThroughputChoiceEnum { + return PatternFlowIpv4TosThroughputChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4TosThroughput) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4TosThroughput) setChoice(value PatternFlowIpv4TosThroughputChoiceEnum) PatternFlowIpv4TosThroughput { + intValue, ok := otg.PatternFlowIpv4TosThroughput_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4TosThroughputChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4TosThroughput_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4TosThroughputChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4TosThroughputChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4TosThroughputChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4TosThroughputCounter().msg() + } + + if value == PatternFlowIpv4TosThroughputChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4TosThroughputCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TosThroughput) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4TosThroughputChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TosThroughput) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4TosThroughput object +func (obj *patternFlowIpv4TosThroughput) SetValue(value uint32) PatternFlowIpv4TosThroughput { + obj.setChoice(PatternFlowIpv4TosThroughputChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4TosThroughput) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4TosThroughput object +func (obj *patternFlowIpv4TosThroughput) SetValues(value []uint32) PatternFlowIpv4TosThroughput { + obj.setChoice(PatternFlowIpv4TosThroughputChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4TosThroughputCounter +func (obj *patternFlowIpv4TosThroughput) Increment() PatternFlowIpv4TosThroughputCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4TosThroughputChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4TosThroughputCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4TosThroughputCounter +func (obj *patternFlowIpv4TosThroughput) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4TosThroughputCounter value in the PatternFlowIpv4TosThroughput object +func (obj *patternFlowIpv4TosThroughput) SetIncrement(value PatternFlowIpv4TosThroughputCounter) PatternFlowIpv4TosThroughput { + obj.setChoice(PatternFlowIpv4TosThroughputChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TosThroughputCounter +func (obj *patternFlowIpv4TosThroughput) Decrement() PatternFlowIpv4TosThroughputCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4TosThroughputChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4TosThroughputCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TosThroughputCounter +func (obj *patternFlowIpv4TosThroughput) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4TosThroughputCounter value in the PatternFlowIpv4TosThroughput object +func (obj *patternFlowIpv4TosThroughput) SetDecrement(value PatternFlowIpv4TosThroughputCounter) PatternFlowIpv4TosThroughput { + obj.setChoice(PatternFlowIpv4TosThroughputChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4TosThroughputMetricTag +func (obj *patternFlowIpv4TosThroughput) MetricTags() PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4TosThroughputMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter struct { + obj *patternFlowIpv4TosThroughput + patternFlowIpv4TosThroughputMetricTagSlice []PatternFlowIpv4TosThroughputMetricTag + fieldPtr *[]*otg.PatternFlowIpv4TosThroughputMetricTag +} + +func newPatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter(ptr *[]*otg.PatternFlowIpv4TosThroughputMetricTag) PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter { + return &patternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter interface { + setMsg(*patternFlowIpv4TosThroughput) PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter + Items() []PatternFlowIpv4TosThroughputMetricTag + Add() PatternFlowIpv4TosThroughputMetricTag + Append(items ...PatternFlowIpv4TosThroughputMetricTag) PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter + Set(index int, newObj PatternFlowIpv4TosThroughputMetricTag) PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter + Clear() PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter + clearHolderSlice() PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter + appendHolderSlice(item PatternFlowIpv4TosThroughputMetricTag) PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter +} + +func (obj *patternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter) setMsg(msg *patternFlowIpv4TosThroughput) PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4TosThroughputMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter) Items() []PatternFlowIpv4TosThroughputMetricTag { + return obj.patternFlowIpv4TosThroughputMetricTagSlice +} + +func (obj *patternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter) Add() PatternFlowIpv4TosThroughputMetricTag { + newObj := &otg.PatternFlowIpv4TosThroughputMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4TosThroughputMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4TosThroughputMetricTagSlice = append(obj.patternFlowIpv4TosThroughputMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter) Append(items ...PatternFlowIpv4TosThroughputMetricTag) PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4TosThroughputMetricTagSlice = append(obj.patternFlowIpv4TosThroughputMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter) Set(index int, newObj PatternFlowIpv4TosThroughputMetricTag) PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4TosThroughputMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter) Clear() PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4TosThroughputMetricTag{} + obj.patternFlowIpv4TosThroughputMetricTagSlice = []PatternFlowIpv4TosThroughputMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter) clearHolderSlice() PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter { + if len(obj.patternFlowIpv4TosThroughputMetricTagSlice) > 0 { + obj.patternFlowIpv4TosThroughputMetricTagSlice = []PatternFlowIpv4TosThroughputMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter) appendHolderSlice(item PatternFlowIpv4TosThroughputMetricTag) PatternFlowIpv4TosThroughputPatternFlowIpv4TosThroughputMetricTagIter { + obj.patternFlowIpv4TosThroughputMetricTagSlice = append(obj.patternFlowIpv4TosThroughputMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4TosThroughput) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosThroughput.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4TosThroughput.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4TosThroughputMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4TosThroughput) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4TosThroughputChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4TosThroughputChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4TosThroughputChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4TosThroughputChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4TosThroughputChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4TosThroughputChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4TosThroughput") + } + } else { + intVal := otg.PatternFlowIpv4TosThroughput_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4TosThroughput_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_throughput_counter.go b/gosnappi/pattern_flow_ipv4_tos_throughput_counter.go new file mode 100644 index 00000000..69c48d39 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_throughput_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosThroughputCounter ***** +type patternFlowIpv4TosThroughputCounter struct { + validation + obj *otg.PatternFlowIpv4TosThroughputCounter + marshaller marshalPatternFlowIpv4TosThroughputCounter + unMarshaller unMarshalPatternFlowIpv4TosThroughputCounter +} + +func NewPatternFlowIpv4TosThroughputCounter() PatternFlowIpv4TosThroughputCounter { + obj := patternFlowIpv4TosThroughputCounter{obj: &otg.PatternFlowIpv4TosThroughputCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosThroughputCounter) msg() *otg.PatternFlowIpv4TosThroughputCounter { + return obj.obj +} + +func (obj *patternFlowIpv4TosThroughputCounter) setMsg(msg *otg.PatternFlowIpv4TosThroughputCounter) PatternFlowIpv4TosThroughputCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosThroughputCounter struct { + obj *patternFlowIpv4TosThroughputCounter +} + +type marshalPatternFlowIpv4TosThroughputCounter interface { + // ToProto marshals PatternFlowIpv4TosThroughputCounter to protobuf object *otg.PatternFlowIpv4TosThroughputCounter + ToProto() (*otg.PatternFlowIpv4TosThroughputCounter, error) + // ToPbText marshals PatternFlowIpv4TosThroughputCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosThroughputCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosThroughputCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosThroughputCounter struct { + obj *patternFlowIpv4TosThroughputCounter +} + +type unMarshalPatternFlowIpv4TosThroughputCounter interface { + // FromProto unmarshals PatternFlowIpv4TosThroughputCounter from protobuf object *otg.PatternFlowIpv4TosThroughputCounter + FromProto(msg *otg.PatternFlowIpv4TosThroughputCounter) (PatternFlowIpv4TosThroughputCounter, error) + // FromPbText unmarshals PatternFlowIpv4TosThroughputCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosThroughputCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosThroughputCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosThroughputCounter) Marshal() marshalPatternFlowIpv4TosThroughputCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosThroughputCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosThroughputCounter) Unmarshal() unMarshalPatternFlowIpv4TosThroughputCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosThroughputCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosThroughputCounter) ToProto() (*otg.PatternFlowIpv4TosThroughputCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosThroughputCounter) FromProto(msg *otg.PatternFlowIpv4TosThroughputCounter) (PatternFlowIpv4TosThroughputCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosThroughputCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosThroughputCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosThroughputCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosThroughputCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosThroughputCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosThroughputCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosThroughputCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosThroughputCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosThroughputCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosThroughputCounter) Clone() (PatternFlowIpv4TosThroughputCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosThroughputCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TosThroughputCounter is integer counter pattern +type PatternFlowIpv4TosThroughputCounter interface { + Validation + // msg marshals PatternFlowIpv4TosThroughputCounter to protobuf object *otg.PatternFlowIpv4TosThroughputCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosThroughputCounter + // setMsg unmarshals PatternFlowIpv4TosThroughputCounter from protobuf object *otg.PatternFlowIpv4TosThroughputCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosThroughputCounter) PatternFlowIpv4TosThroughputCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosThroughputCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosThroughputCounter + // validate validates PatternFlowIpv4TosThroughputCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosThroughputCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4TosThroughputCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4TosThroughputCounter + SetStart(value uint32) PatternFlowIpv4TosThroughputCounter + // HasStart checks if Start has been set in PatternFlowIpv4TosThroughputCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4TosThroughputCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4TosThroughputCounter + SetStep(value uint32) PatternFlowIpv4TosThroughputCounter + // HasStep checks if Step has been set in PatternFlowIpv4TosThroughputCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4TosThroughputCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4TosThroughputCounter + SetCount(value uint32) PatternFlowIpv4TosThroughputCounter + // HasCount checks if Count has been set in PatternFlowIpv4TosThroughputCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TosThroughputCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TosThroughputCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4TosThroughputCounter object +func (obj *patternFlowIpv4TosThroughputCounter) SetStart(value uint32) PatternFlowIpv4TosThroughputCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TosThroughputCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TosThroughputCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4TosThroughputCounter object +func (obj *patternFlowIpv4TosThroughputCounter) SetStep(value uint32) PatternFlowIpv4TosThroughputCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TosThroughputCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TosThroughputCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4TosThroughputCounter object +func (obj *patternFlowIpv4TosThroughputCounter) SetCount(value uint32) PatternFlowIpv4TosThroughputCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4TosThroughputCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosThroughputCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosThroughputCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosThroughputCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4TosThroughputCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_throughput_metric_tag.go b/gosnappi/pattern_flow_ipv4_tos_throughput_metric_tag.go new file mode 100644 index 00000000..8c5df93b --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_throughput_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosThroughputMetricTag ***** +type patternFlowIpv4TosThroughputMetricTag struct { + validation + obj *otg.PatternFlowIpv4TosThroughputMetricTag + marshaller marshalPatternFlowIpv4TosThroughputMetricTag + unMarshaller unMarshalPatternFlowIpv4TosThroughputMetricTag +} + +func NewPatternFlowIpv4TosThroughputMetricTag() PatternFlowIpv4TosThroughputMetricTag { + obj := patternFlowIpv4TosThroughputMetricTag{obj: &otg.PatternFlowIpv4TosThroughputMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosThroughputMetricTag) msg() *otg.PatternFlowIpv4TosThroughputMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4TosThroughputMetricTag) setMsg(msg *otg.PatternFlowIpv4TosThroughputMetricTag) PatternFlowIpv4TosThroughputMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosThroughputMetricTag struct { + obj *patternFlowIpv4TosThroughputMetricTag +} + +type marshalPatternFlowIpv4TosThroughputMetricTag interface { + // ToProto marshals PatternFlowIpv4TosThroughputMetricTag to protobuf object *otg.PatternFlowIpv4TosThroughputMetricTag + ToProto() (*otg.PatternFlowIpv4TosThroughputMetricTag, error) + // ToPbText marshals PatternFlowIpv4TosThroughputMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosThroughputMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosThroughputMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosThroughputMetricTag struct { + obj *patternFlowIpv4TosThroughputMetricTag +} + +type unMarshalPatternFlowIpv4TosThroughputMetricTag interface { + // FromProto unmarshals PatternFlowIpv4TosThroughputMetricTag from protobuf object *otg.PatternFlowIpv4TosThroughputMetricTag + FromProto(msg *otg.PatternFlowIpv4TosThroughputMetricTag) (PatternFlowIpv4TosThroughputMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4TosThroughputMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosThroughputMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosThroughputMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosThroughputMetricTag) Marshal() marshalPatternFlowIpv4TosThroughputMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosThroughputMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosThroughputMetricTag) Unmarshal() unMarshalPatternFlowIpv4TosThroughputMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosThroughputMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosThroughputMetricTag) ToProto() (*otg.PatternFlowIpv4TosThroughputMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosThroughputMetricTag) FromProto(msg *otg.PatternFlowIpv4TosThroughputMetricTag) (PatternFlowIpv4TosThroughputMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosThroughputMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosThroughputMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosThroughputMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosThroughputMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosThroughputMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosThroughputMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosThroughputMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosThroughputMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosThroughputMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosThroughputMetricTag) Clone() (PatternFlowIpv4TosThroughputMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosThroughputMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TosThroughputMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4TosThroughputMetricTag interface { + Validation + // msg marshals PatternFlowIpv4TosThroughputMetricTag to protobuf object *otg.PatternFlowIpv4TosThroughputMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosThroughputMetricTag + // setMsg unmarshals PatternFlowIpv4TosThroughputMetricTag from protobuf object *otg.PatternFlowIpv4TosThroughputMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosThroughputMetricTag) PatternFlowIpv4TosThroughputMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosThroughputMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosThroughputMetricTag + // validate validates PatternFlowIpv4TosThroughputMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosThroughputMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4TosThroughputMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4TosThroughputMetricTag + SetName(value string) PatternFlowIpv4TosThroughputMetricTag + // Offset returns uint32, set in PatternFlowIpv4TosThroughputMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4TosThroughputMetricTag + SetOffset(value uint32) PatternFlowIpv4TosThroughputMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4TosThroughputMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4TosThroughputMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4TosThroughputMetricTag + SetLength(value uint32) PatternFlowIpv4TosThroughputMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4TosThroughputMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4TosThroughputMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4TosThroughputMetricTag object +func (obj *patternFlowIpv4TosThroughputMetricTag) SetName(value string) PatternFlowIpv4TosThroughputMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TosThroughputMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TosThroughputMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4TosThroughputMetricTag object +func (obj *patternFlowIpv4TosThroughputMetricTag) SetOffset(value uint32) PatternFlowIpv4TosThroughputMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TosThroughputMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TosThroughputMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4TosThroughputMetricTag object +func (obj *patternFlowIpv4TosThroughputMetricTag) SetLength(value uint32) PatternFlowIpv4TosThroughputMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4TosThroughputMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4TosThroughputMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosThroughputMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4TosThroughputMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4TosThroughputMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_unused.go b/gosnappi/pattern_flow_ipv4_tos_unused.go new file mode 100644 index 00000000..4dec3ffa --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_unused.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosUnused ***** +type patternFlowIpv4TosUnused struct { + validation + obj *otg.PatternFlowIpv4TosUnused + marshaller marshalPatternFlowIpv4TosUnused + unMarshaller unMarshalPatternFlowIpv4TosUnused + incrementHolder PatternFlowIpv4TosUnusedCounter + decrementHolder PatternFlowIpv4TosUnusedCounter + metricTagsHolder PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter +} + +func NewPatternFlowIpv4TosUnused() PatternFlowIpv4TosUnused { + obj := patternFlowIpv4TosUnused{obj: &otg.PatternFlowIpv4TosUnused{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosUnused) msg() *otg.PatternFlowIpv4TosUnused { + return obj.obj +} + +func (obj *patternFlowIpv4TosUnused) setMsg(msg *otg.PatternFlowIpv4TosUnused) PatternFlowIpv4TosUnused { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosUnused struct { + obj *patternFlowIpv4TosUnused +} + +type marshalPatternFlowIpv4TosUnused interface { + // ToProto marshals PatternFlowIpv4TosUnused to protobuf object *otg.PatternFlowIpv4TosUnused + ToProto() (*otg.PatternFlowIpv4TosUnused, error) + // ToPbText marshals PatternFlowIpv4TosUnused to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosUnused to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosUnused to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosUnused struct { + obj *patternFlowIpv4TosUnused +} + +type unMarshalPatternFlowIpv4TosUnused interface { + // FromProto unmarshals PatternFlowIpv4TosUnused from protobuf object *otg.PatternFlowIpv4TosUnused + FromProto(msg *otg.PatternFlowIpv4TosUnused) (PatternFlowIpv4TosUnused, error) + // FromPbText unmarshals PatternFlowIpv4TosUnused from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosUnused from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosUnused from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosUnused) Marshal() marshalPatternFlowIpv4TosUnused { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosUnused{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosUnused) Unmarshal() unMarshalPatternFlowIpv4TosUnused { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosUnused{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosUnused) ToProto() (*otg.PatternFlowIpv4TosUnused, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosUnused) FromProto(msg *otg.PatternFlowIpv4TosUnused) (PatternFlowIpv4TosUnused, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosUnused) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosUnused) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosUnused) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosUnused) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosUnused) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosUnused) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosUnused) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosUnused) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosUnused) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosUnused) Clone() (PatternFlowIpv4TosUnused, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosUnused() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4TosUnused) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4TosUnused is unused +type PatternFlowIpv4TosUnused interface { + Validation + // msg marshals PatternFlowIpv4TosUnused to protobuf object *otg.PatternFlowIpv4TosUnused + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosUnused + // setMsg unmarshals PatternFlowIpv4TosUnused from protobuf object *otg.PatternFlowIpv4TosUnused + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosUnused) PatternFlowIpv4TosUnused + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosUnused + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosUnused + // validate validates PatternFlowIpv4TosUnused + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosUnused, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4TosUnusedChoiceEnum, set in PatternFlowIpv4TosUnused + Choice() PatternFlowIpv4TosUnusedChoiceEnum + // setChoice assigns PatternFlowIpv4TosUnusedChoiceEnum provided by user to PatternFlowIpv4TosUnused + setChoice(value PatternFlowIpv4TosUnusedChoiceEnum) PatternFlowIpv4TosUnused + // HasChoice checks if Choice has been set in PatternFlowIpv4TosUnused + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4TosUnused. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4TosUnused + SetValue(value uint32) PatternFlowIpv4TosUnused + // HasValue checks if Value has been set in PatternFlowIpv4TosUnused + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4TosUnused. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4TosUnused + SetValues(value []uint32) PatternFlowIpv4TosUnused + // Increment returns PatternFlowIpv4TosUnusedCounter, set in PatternFlowIpv4TosUnused. + // PatternFlowIpv4TosUnusedCounter is integer counter pattern + Increment() PatternFlowIpv4TosUnusedCounter + // SetIncrement assigns PatternFlowIpv4TosUnusedCounter provided by user to PatternFlowIpv4TosUnused. + // PatternFlowIpv4TosUnusedCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4TosUnusedCounter) PatternFlowIpv4TosUnused + // HasIncrement checks if Increment has been set in PatternFlowIpv4TosUnused + HasIncrement() bool + // Decrement returns PatternFlowIpv4TosUnusedCounter, set in PatternFlowIpv4TosUnused. + // PatternFlowIpv4TosUnusedCounter is integer counter pattern + Decrement() PatternFlowIpv4TosUnusedCounter + // SetDecrement assigns PatternFlowIpv4TosUnusedCounter provided by user to PatternFlowIpv4TosUnused. + // PatternFlowIpv4TosUnusedCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4TosUnusedCounter) PatternFlowIpv4TosUnused + // HasDecrement checks if Decrement has been set in PatternFlowIpv4TosUnused + HasDecrement() bool + // MetricTags returns PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIterIter, set in PatternFlowIpv4TosUnused + MetricTags() PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter + setNil() +} + +type PatternFlowIpv4TosUnusedChoiceEnum string + +// Enum of Choice on PatternFlowIpv4TosUnused +var PatternFlowIpv4TosUnusedChoice = struct { + VALUE PatternFlowIpv4TosUnusedChoiceEnum + VALUES PatternFlowIpv4TosUnusedChoiceEnum + INCREMENT PatternFlowIpv4TosUnusedChoiceEnum + DECREMENT PatternFlowIpv4TosUnusedChoiceEnum +}{ + VALUE: PatternFlowIpv4TosUnusedChoiceEnum("value"), + VALUES: PatternFlowIpv4TosUnusedChoiceEnum("values"), + INCREMENT: PatternFlowIpv4TosUnusedChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4TosUnusedChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4TosUnused) Choice() PatternFlowIpv4TosUnusedChoiceEnum { + return PatternFlowIpv4TosUnusedChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4TosUnused) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4TosUnused) setChoice(value PatternFlowIpv4TosUnusedChoiceEnum) PatternFlowIpv4TosUnused { + intValue, ok := otg.PatternFlowIpv4TosUnused_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4TosUnusedChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4TosUnused_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4TosUnusedChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4TosUnusedChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4TosUnusedChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4TosUnusedCounter().msg() + } + + if value == PatternFlowIpv4TosUnusedChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4TosUnusedCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TosUnused) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4TosUnusedChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TosUnused) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4TosUnused object +func (obj *patternFlowIpv4TosUnused) SetValue(value uint32) PatternFlowIpv4TosUnused { + obj.setChoice(PatternFlowIpv4TosUnusedChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4TosUnused) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4TosUnused object +func (obj *patternFlowIpv4TosUnused) SetValues(value []uint32) PatternFlowIpv4TosUnused { + obj.setChoice(PatternFlowIpv4TosUnusedChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4TosUnusedCounter +func (obj *patternFlowIpv4TosUnused) Increment() PatternFlowIpv4TosUnusedCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4TosUnusedChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4TosUnusedCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4TosUnusedCounter +func (obj *patternFlowIpv4TosUnused) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4TosUnusedCounter value in the PatternFlowIpv4TosUnused object +func (obj *patternFlowIpv4TosUnused) SetIncrement(value PatternFlowIpv4TosUnusedCounter) PatternFlowIpv4TosUnused { + obj.setChoice(PatternFlowIpv4TosUnusedChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TosUnusedCounter +func (obj *patternFlowIpv4TosUnused) Decrement() PatternFlowIpv4TosUnusedCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4TosUnusedChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4TosUnusedCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TosUnusedCounter +func (obj *patternFlowIpv4TosUnused) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4TosUnusedCounter value in the PatternFlowIpv4TosUnused object +func (obj *patternFlowIpv4TosUnused) SetDecrement(value PatternFlowIpv4TosUnusedCounter) PatternFlowIpv4TosUnused { + obj.setChoice(PatternFlowIpv4TosUnusedChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4TosUnusedMetricTag +func (obj *patternFlowIpv4TosUnused) MetricTags() PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4TosUnusedMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter struct { + obj *patternFlowIpv4TosUnused + patternFlowIpv4TosUnusedMetricTagSlice []PatternFlowIpv4TosUnusedMetricTag + fieldPtr *[]*otg.PatternFlowIpv4TosUnusedMetricTag +} + +func newPatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter(ptr *[]*otg.PatternFlowIpv4TosUnusedMetricTag) PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter { + return &patternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter interface { + setMsg(*patternFlowIpv4TosUnused) PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter + Items() []PatternFlowIpv4TosUnusedMetricTag + Add() PatternFlowIpv4TosUnusedMetricTag + Append(items ...PatternFlowIpv4TosUnusedMetricTag) PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter + Set(index int, newObj PatternFlowIpv4TosUnusedMetricTag) PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter + Clear() PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter + clearHolderSlice() PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter + appendHolderSlice(item PatternFlowIpv4TosUnusedMetricTag) PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter +} + +func (obj *patternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter) setMsg(msg *patternFlowIpv4TosUnused) PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4TosUnusedMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter) Items() []PatternFlowIpv4TosUnusedMetricTag { + return obj.patternFlowIpv4TosUnusedMetricTagSlice +} + +func (obj *patternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter) Add() PatternFlowIpv4TosUnusedMetricTag { + newObj := &otg.PatternFlowIpv4TosUnusedMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4TosUnusedMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4TosUnusedMetricTagSlice = append(obj.patternFlowIpv4TosUnusedMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter) Append(items ...PatternFlowIpv4TosUnusedMetricTag) PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4TosUnusedMetricTagSlice = append(obj.patternFlowIpv4TosUnusedMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter) Set(index int, newObj PatternFlowIpv4TosUnusedMetricTag) PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4TosUnusedMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter) Clear() PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4TosUnusedMetricTag{} + obj.patternFlowIpv4TosUnusedMetricTagSlice = []PatternFlowIpv4TosUnusedMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter) clearHolderSlice() PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter { + if len(obj.patternFlowIpv4TosUnusedMetricTagSlice) > 0 { + obj.patternFlowIpv4TosUnusedMetricTagSlice = []PatternFlowIpv4TosUnusedMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter) appendHolderSlice(item PatternFlowIpv4TosUnusedMetricTag) PatternFlowIpv4TosUnusedPatternFlowIpv4TosUnusedMetricTagIter { + obj.patternFlowIpv4TosUnusedMetricTagSlice = append(obj.patternFlowIpv4TosUnusedMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4TosUnused) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosUnused.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4TosUnused.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4TosUnusedMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4TosUnused) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4TosUnusedChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4TosUnusedChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4TosUnusedChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4TosUnusedChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4TosUnusedChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4TosUnusedChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4TosUnused") + } + } else { + intVal := otg.PatternFlowIpv4TosUnused_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4TosUnused_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_unused_counter.go b/gosnappi/pattern_flow_ipv4_tos_unused_counter.go new file mode 100644 index 00000000..c140897d --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_unused_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosUnusedCounter ***** +type patternFlowIpv4TosUnusedCounter struct { + validation + obj *otg.PatternFlowIpv4TosUnusedCounter + marshaller marshalPatternFlowIpv4TosUnusedCounter + unMarshaller unMarshalPatternFlowIpv4TosUnusedCounter +} + +func NewPatternFlowIpv4TosUnusedCounter() PatternFlowIpv4TosUnusedCounter { + obj := patternFlowIpv4TosUnusedCounter{obj: &otg.PatternFlowIpv4TosUnusedCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosUnusedCounter) msg() *otg.PatternFlowIpv4TosUnusedCounter { + return obj.obj +} + +func (obj *patternFlowIpv4TosUnusedCounter) setMsg(msg *otg.PatternFlowIpv4TosUnusedCounter) PatternFlowIpv4TosUnusedCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosUnusedCounter struct { + obj *patternFlowIpv4TosUnusedCounter +} + +type marshalPatternFlowIpv4TosUnusedCounter interface { + // ToProto marshals PatternFlowIpv4TosUnusedCounter to protobuf object *otg.PatternFlowIpv4TosUnusedCounter + ToProto() (*otg.PatternFlowIpv4TosUnusedCounter, error) + // ToPbText marshals PatternFlowIpv4TosUnusedCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosUnusedCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosUnusedCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosUnusedCounter struct { + obj *patternFlowIpv4TosUnusedCounter +} + +type unMarshalPatternFlowIpv4TosUnusedCounter interface { + // FromProto unmarshals PatternFlowIpv4TosUnusedCounter from protobuf object *otg.PatternFlowIpv4TosUnusedCounter + FromProto(msg *otg.PatternFlowIpv4TosUnusedCounter) (PatternFlowIpv4TosUnusedCounter, error) + // FromPbText unmarshals PatternFlowIpv4TosUnusedCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosUnusedCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosUnusedCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosUnusedCounter) Marshal() marshalPatternFlowIpv4TosUnusedCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosUnusedCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosUnusedCounter) Unmarshal() unMarshalPatternFlowIpv4TosUnusedCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosUnusedCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosUnusedCounter) ToProto() (*otg.PatternFlowIpv4TosUnusedCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosUnusedCounter) FromProto(msg *otg.PatternFlowIpv4TosUnusedCounter) (PatternFlowIpv4TosUnusedCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosUnusedCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosUnusedCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosUnusedCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosUnusedCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosUnusedCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosUnusedCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosUnusedCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosUnusedCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosUnusedCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosUnusedCounter) Clone() (PatternFlowIpv4TosUnusedCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosUnusedCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TosUnusedCounter is integer counter pattern +type PatternFlowIpv4TosUnusedCounter interface { + Validation + // msg marshals PatternFlowIpv4TosUnusedCounter to protobuf object *otg.PatternFlowIpv4TosUnusedCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosUnusedCounter + // setMsg unmarshals PatternFlowIpv4TosUnusedCounter from protobuf object *otg.PatternFlowIpv4TosUnusedCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosUnusedCounter) PatternFlowIpv4TosUnusedCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosUnusedCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosUnusedCounter + // validate validates PatternFlowIpv4TosUnusedCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosUnusedCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4TosUnusedCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4TosUnusedCounter + SetStart(value uint32) PatternFlowIpv4TosUnusedCounter + // HasStart checks if Start has been set in PatternFlowIpv4TosUnusedCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4TosUnusedCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4TosUnusedCounter + SetStep(value uint32) PatternFlowIpv4TosUnusedCounter + // HasStep checks if Step has been set in PatternFlowIpv4TosUnusedCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4TosUnusedCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4TosUnusedCounter + SetCount(value uint32) PatternFlowIpv4TosUnusedCounter + // HasCount checks if Count has been set in PatternFlowIpv4TosUnusedCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TosUnusedCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TosUnusedCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4TosUnusedCounter object +func (obj *patternFlowIpv4TosUnusedCounter) SetStart(value uint32) PatternFlowIpv4TosUnusedCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TosUnusedCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TosUnusedCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4TosUnusedCounter object +func (obj *patternFlowIpv4TosUnusedCounter) SetStep(value uint32) PatternFlowIpv4TosUnusedCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TosUnusedCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TosUnusedCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4TosUnusedCounter object +func (obj *patternFlowIpv4TosUnusedCounter) SetCount(value uint32) PatternFlowIpv4TosUnusedCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4TosUnusedCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosUnusedCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosUnusedCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosUnusedCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4TosUnusedCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_tos_unused_metric_tag.go b/gosnappi/pattern_flow_ipv4_tos_unused_metric_tag.go new file mode 100644 index 00000000..10a38833 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_tos_unused_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TosUnusedMetricTag ***** +type patternFlowIpv4TosUnusedMetricTag struct { + validation + obj *otg.PatternFlowIpv4TosUnusedMetricTag + marshaller marshalPatternFlowIpv4TosUnusedMetricTag + unMarshaller unMarshalPatternFlowIpv4TosUnusedMetricTag +} + +func NewPatternFlowIpv4TosUnusedMetricTag() PatternFlowIpv4TosUnusedMetricTag { + obj := patternFlowIpv4TosUnusedMetricTag{obj: &otg.PatternFlowIpv4TosUnusedMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TosUnusedMetricTag) msg() *otg.PatternFlowIpv4TosUnusedMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4TosUnusedMetricTag) setMsg(msg *otg.PatternFlowIpv4TosUnusedMetricTag) PatternFlowIpv4TosUnusedMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TosUnusedMetricTag struct { + obj *patternFlowIpv4TosUnusedMetricTag +} + +type marshalPatternFlowIpv4TosUnusedMetricTag interface { + // ToProto marshals PatternFlowIpv4TosUnusedMetricTag to protobuf object *otg.PatternFlowIpv4TosUnusedMetricTag + ToProto() (*otg.PatternFlowIpv4TosUnusedMetricTag, error) + // ToPbText marshals PatternFlowIpv4TosUnusedMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TosUnusedMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TosUnusedMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TosUnusedMetricTag struct { + obj *patternFlowIpv4TosUnusedMetricTag +} + +type unMarshalPatternFlowIpv4TosUnusedMetricTag interface { + // FromProto unmarshals PatternFlowIpv4TosUnusedMetricTag from protobuf object *otg.PatternFlowIpv4TosUnusedMetricTag + FromProto(msg *otg.PatternFlowIpv4TosUnusedMetricTag) (PatternFlowIpv4TosUnusedMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4TosUnusedMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TosUnusedMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TosUnusedMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TosUnusedMetricTag) Marshal() marshalPatternFlowIpv4TosUnusedMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TosUnusedMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TosUnusedMetricTag) Unmarshal() unMarshalPatternFlowIpv4TosUnusedMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TosUnusedMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TosUnusedMetricTag) ToProto() (*otg.PatternFlowIpv4TosUnusedMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TosUnusedMetricTag) FromProto(msg *otg.PatternFlowIpv4TosUnusedMetricTag) (PatternFlowIpv4TosUnusedMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TosUnusedMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TosUnusedMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TosUnusedMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosUnusedMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TosUnusedMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TosUnusedMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TosUnusedMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosUnusedMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TosUnusedMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TosUnusedMetricTag) Clone() (PatternFlowIpv4TosUnusedMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TosUnusedMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TosUnusedMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4TosUnusedMetricTag interface { + Validation + // msg marshals PatternFlowIpv4TosUnusedMetricTag to protobuf object *otg.PatternFlowIpv4TosUnusedMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TosUnusedMetricTag + // setMsg unmarshals PatternFlowIpv4TosUnusedMetricTag from protobuf object *otg.PatternFlowIpv4TosUnusedMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TosUnusedMetricTag) PatternFlowIpv4TosUnusedMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4TosUnusedMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TosUnusedMetricTag + // validate validates PatternFlowIpv4TosUnusedMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TosUnusedMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4TosUnusedMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4TosUnusedMetricTag + SetName(value string) PatternFlowIpv4TosUnusedMetricTag + // Offset returns uint32, set in PatternFlowIpv4TosUnusedMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4TosUnusedMetricTag + SetOffset(value uint32) PatternFlowIpv4TosUnusedMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4TosUnusedMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4TosUnusedMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4TosUnusedMetricTag + SetLength(value uint32) PatternFlowIpv4TosUnusedMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4TosUnusedMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4TosUnusedMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4TosUnusedMetricTag object +func (obj *patternFlowIpv4TosUnusedMetricTag) SetName(value string) PatternFlowIpv4TosUnusedMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TosUnusedMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TosUnusedMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4TosUnusedMetricTag object +func (obj *patternFlowIpv4TosUnusedMetricTag) SetOffset(value uint32) PatternFlowIpv4TosUnusedMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TosUnusedMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TosUnusedMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4TosUnusedMetricTag object +func (obj *patternFlowIpv4TosUnusedMetricTag) SetLength(value uint32) PatternFlowIpv4TosUnusedMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4TosUnusedMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4TosUnusedMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TosUnusedMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4TosUnusedMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4TosUnusedMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_total_length.go b/gosnappi/pattern_flow_ipv4_total_length.go new file mode 100644 index 00000000..6a90c1a9 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_total_length.go @@ -0,0 +1,712 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TotalLength ***** +type patternFlowIpv4TotalLength struct { + validation + obj *otg.PatternFlowIpv4TotalLength + marshaller marshalPatternFlowIpv4TotalLength + unMarshaller unMarshalPatternFlowIpv4TotalLength + incrementHolder PatternFlowIpv4TotalLengthCounter + decrementHolder PatternFlowIpv4TotalLengthCounter + metricTagsHolder PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter +} + +func NewPatternFlowIpv4TotalLength() PatternFlowIpv4TotalLength { + obj := patternFlowIpv4TotalLength{obj: &otg.PatternFlowIpv4TotalLength{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TotalLength) msg() *otg.PatternFlowIpv4TotalLength { + return obj.obj +} + +func (obj *patternFlowIpv4TotalLength) setMsg(msg *otg.PatternFlowIpv4TotalLength) PatternFlowIpv4TotalLength { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TotalLength struct { + obj *patternFlowIpv4TotalLength +} + +type marshalPatternFlowIpv4TotalLength interface { + // ToProto marshals PatternFlowIpv4TotalLength to protobuf object *otg.PatternFlowIpv4TotalLength + ToProto() (*otg.PatternFlowIpv4TotalLength, error) + // ToPbText marshals PatternFlowIpv4TotalLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TotalLength to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TotalLength to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TotalLength struct { + obj *patternFlowIpv4TotalLength +} + +type unMarshalPatternFlowIpv4TotalLength interface { + // FromProto unmarshals PatternFlowIpv4TotalLength from protobuf object *otg.PatternFlowIpv4TotalLength + FromProto(msg *otg.PatternFlowIpv4TotalLength) (PatternFlowIpv4TotalLength, error) + // FromPbText unmarshals PatternFlowIpv4TotalLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TotalLength from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TotalLength from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TotalLength) Marshal() marshalPatternFlowIpv4TotalLength { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TotalLength{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TotalLength) Unmarshal() unMarshalPatternFlowIpv4TotalLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TotalLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TotalLength) ToProto() (*otg.PatternFlowIpv4TotalLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TotalLength) FromProto(msg *otg.PatternFlowIpv4TotalLength) (PatternFlowIpv4TotalLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TotalLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TotalLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TotalLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TotalLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TotalLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TotalLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TotalLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TotalLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TotalLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TotalLength) Clone() (PatternFlowIpv4TotalLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TotalLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4TotalLength) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4TotalLength is total length +type PatternFlowIpv4TotalLength interface { + Validation + // msg marshals PatternFlowIpv4TotalLength to protobuf object *otg.PatternFlowIpv4TotalLength + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TotalLength + // setMsg unmarshals PatternFlowIpv4TotalLength from protobuf object *otg.PatternFlowIpv4TotalLength + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TotalLength) PatternFlowIpv4TotalLength + // provides marshal interface + Marshal() marshalPatternFlowIpv4TotalLength + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TotalLength + // validate validates PatternFlowIpv4TotalLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TotalLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4TotalLengthChoiceEnum, set in PatternFlowIpv4TotalLength + Choice() PatternFlowIpv4TotalLengthChoiceEnum + // setChoice assigns PatternFlowIpv4TotalLengthChoiceEnum provided by user to PatternFlowIpv4TotalLength + setChoice(value PatternFlowIpv4TotalLengthChoiceEnum) PatternFlowIpv4TotalLength + // HasChoice checks if Choice has been set in PatternFlowIpv4TotalLength + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4TotalLength. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4TotalLength + SetValue(value uint32) PatternFlowIpv4TotalLength + // HasValue checks if Value has been set in PatternFlowIpv4TotalLength + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4TotalLength. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4TotalLength + SetValues(value []uint32) PatternFlowIpv4TotalLength + // Auto returns uint32, set in PatternFlowIpv4TotalLength. + Auto() uint32 + // HasAuto checks if Auto has been set in PatternFlowIpv4TotalLength + HasAuto() bool + // Increment returns PatternFlowIpv4TotalLengthCounter, set in PatternFlowIpv4TotalLength. + // PatternFlowIpv4TotalLengthCounter is integer counter pattern + Increment() PatternFlowIpv4TotalLengthCounter + // SetIncrement assigns PatternFlowIpv4TotalLengthCounter provided by user to PatternFlowIpv4TotalLength. + // PatternFlowIpv4TotalLengthCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4TotalLengthCounter) PatternFlowIpv4TotalLength + // HasIncrement checks if Increment has been set in PatternFlowIpv4TotalLength + HasIncrement() bool + // Decrement returns PatternFlowIpv4TotalLengthCounter, set in PatternFlowIpv4TotalLength. + // PatternFlowIpv4TotalLengthCounter is integer counter pattern + Decrement() PatternFlowIpv4TotalLengthCounter + // SetDecrement assigns PatternFlowIpv4TotalLengthCounter provided by user to PatternFlowIpv4TotalLength. + // PatternFlowIpv4TotalLengthCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4TotalLengthCounter) PatternFlowIpv4TotalLength + // HasDecrement checks if Decrement has been set in PatternFlowIpv4TotalLength + HasDecrement() bool + // MetricTags returns PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIterIter, set in PatternFlowIpv4TotalLength + MetricTags() PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter + setNil() +} + +type PatternFlowIpv4TotalLengthChoiceEnum string + +// Enum of Choice on PatternFlowIpv4TotalLength +var PatternFlowIpv4TotalLengthChoice = struct { + VALUE PatternFlowIpv4TotalLengthChoiceEnum + VALUES PatternFlowIpv4TotalLengthChoiceEnum + AUTO PatternFlowIpv4TotalLengthChoiceEnum + INCREMENT PatternFlowIpv4TotalLengthChoiceEnum + DECREMENT PatternFlowIpv4TotalLengthChoiceEnum +}{ + VALUE: PatternFlowIpv4TotalLengthChoiceEnum("value"), + VALUES: PatternFlowIpv4TotalLengthChoiceEnum("values"), + AUTO: PatternFlowIpv4TotalLengthChoiceEnum("auto"), + INCREMENT: PatternFlowIpv4TotalLengthChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4TotalLengthChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4TotalLength) Choice() PatternFlowIpv4TotalLengthChoiceEnum { + return PatternFlowIpv4TotalLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4TotalLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4TotalLength) setChoice(value PatternFlowIpv4TotalLengthChoiceEnum) PatternFlowIpv4TotalLength { + intValue, ok := otg.PatternFlowIpv4TotalLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4TotalLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4TotalLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Auto = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4TotalLengthChoice.VALUE { + defaultValue := uint32(46) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4TotalLengthChoice.VALUES { + defaultValue := []uint32{46} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4TotalLengthChoice.AUTO { + defaultValue := uint32(46) + obj.obj.Auto = &defaultValue + } + + if value == PatternFlowIpv4TotalLengthChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4TotalLengthCounter().msg() + } + + if value == PatternFlowIpv4TotalLengthChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4TotalLengthCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TotalLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4TotalLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4TotalLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4TotalLength object +func (obj *patternFlowIpv4TotalLength) SetValue(value uint32) PatternFlowIpv4TotalLength { + obj.setChoice(PatternFlowIpv4TotalLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4TotalLength) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{46}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4TotalLength object +func (obj *patternFlowIpv4TotalLength) SetValues(value []uint32) PatternFlowIpv4TotalLength { + obj.setChoice(PatternFlowIpv4TotalLengthChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowIpv4TotalLength) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowIpv4TotalLengthChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowIpv4TotalLength) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Increment returns a PatternFlowIpv4TotalLengthCounter +func (obj *patternFlowIpv4TotalLength) Increment() PatternFlowIpv4TotalLengthCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4TotalLengthChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4TotalLengthCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4TotalLengthCounter +func (obj *patternFlowIpv4TotalLength) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4TotalLengthCounter value in the PatternFlowIpv4TotalLength object +func (obj *patternFlowIpv4TotalLength) SetIncrement(value PatternFlowIpv4TotalLengthCounter) PatternFlowIpv4TotalLength { + obj.setChoice(PatternFlowIpv4TotalLengthChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TotalLengthCounter +func (obj *patternFlowIpv4TotalLength) Decrement() PatternFlowIpv4TotalLengthCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4TotalLengthChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4TotalLengthCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4TotalLengthCounter +func (obj *patternFlowIpv4TotalLength) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4TotalLengthCounter value in the PatternFlowIpv4TotalLength object +func (obj *patternFlowIpv4TotalLength) SetDecrement(value PatternFlowIpv4TotalLengthCounter) PatternFlowIpv4TotalLength { + obj.setChoice(PatternFlowIpv4TotalLengthChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4TotalLengthMetricTag +func (obj *patternFlowIpv4TotalLength) MetricTags() PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4TotalLengthMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter struct { + obj *patternFlowIpv4TotalLength + patternFlowIpv4TotalLengthMetricTagSlice []PatternFlowIpv4TotalLengthMetricTag + fieldPtr *[]*otg.PatternFlowIpv4TotalLengthMetricTag +} + +func newPatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter(ptr *[]*otg.PatternFlowIpv4TotalLengthMetricTag) PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter { + return &patternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter interface { + setMsg(*patternFlowIpv4TotalLength) PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter + Items() []PatternFlowIpv4TotalLengthMetricTag + Add() PatternFlowIpv4TotalLengthMetricTag + Append(items ...PatternFlowIpv4TotalLengthMetricTag) PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter + Set(index int, newObj PatternFlowIpv4TotalLengthMetricTag) PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter + Clear() PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter + clearHolderSlice() PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter + appendHolderSlice(item PatternFlowIpv4TotalLengthMetricTag) PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter +} + +func (obj *patternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter) setMsg(msg *patternFlowIpv4TotalLength) PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4TotalLengthMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter) Items() []PatternFlowIpv4TotalLengthMetricTag { + return obj.patternFlowIpv4TotalLengthMetricTagSlice +} + +func (obj *patternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter) Add() PatternFlowIpv4TotalLengthMetricTag { + newObj := &otg.PatternFlowIpv4TotalLengthMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4TotalLengthMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4TotalLengthMetricTagSlice = append(obj.patternFlowIpv4TotalLengthMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter) Append(items ...PatternFlowIpv4TotalLengthMetricTag) PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4TotalLengthMetricTagSlice = append(obj.patternFlowIpv4TotalLengthMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter) Set(index int, newObj PatternFlowIpv4TotalLengthMetricTag) PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4TotalLengthMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter) Clear() PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4TotalLengthMetricTag{} + obj.patternFlowIpv4TotalLengthMetricTagSlice = []PatternFlowIpv4TotalLengthMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter) clearHolderSlice() PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter { + if len(obj.patternFlowIpv4TotalLengthMetricTagSlice) > 0 { + obj.patternFlowIpv4TotalLengthMetricTagSlice = []PatternFlowIpv4TotalLengthMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter) appendHolderSlice(item PatternFlowIpv4TotalLengthMetricTag) PatternFlowIpv4TotalLengthPatternFlowIpv4TotalLengthMetricTagIter { + obj.patternFlowIpv4TotalLengthMetricTagSlice = append(obj.patternFlowIpv4TotalLengthMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4TotalLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TotalLength.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4TotalLength.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Auto != nil { + + if *obj.obj.Auto > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TotalLength.Auto <= 65535 but Got %d", *obj.obj.Auto)) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4TotalLengthMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4TotalLength) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4TotalLengthChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4TotalLengthChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4TotalLengthChoice.VALUES + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowIpv4TotalLengthChoice.AUTO + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4TotalLengthChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4TotalLengthChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4TotalLengthChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4TotalLength") + } + } else { + intVal := otg.PatternFlowIpv4TotalLength_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4TotalLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_total_length_counter.go b/gosnappi/pattern_flow_ipv4_total_length_counter.go new file mode 100644 index 00000000..a08dd3de --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_total_length_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TotalLengthCounter ***** +type patternFlowIpv4TotalLengthCounter struct { + validation + obj *otg.PatternFlowIpv4TotalLengthCounter + marshaller marshalPatternFlowIpv4TotalLengthCounter + unMarshaller unMarshalPatternFlowIpv4TotalLengthCounter +} + +func NewPatternFlowIpv4TotalLengthCounter() PatternFlowIpv4TotalLengthCounter { + obj := patternFlowIpv4TotalLengthCounter{obj: &otg.PatternFlowIpv4TotalLengthCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TotalLengthCounter) msg() *otg.PatternFlowIpv4TotalLengthCounter { + return obj.obj +} + +func (obj *patternFlowIpv4TotalLengthCounter) setMsg(msg *otg.PatternFlowIpv4TotalLengthCounter) PatternFlowIpv4TotalLengthCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TotalLengthCounter struct { + obj *patternFlowIpv4TotalLengthCounter +} + +type marshalPatternFlowIpv4TotalLengthCounter interface { + // ToProto marshals PatternFlowIpv4TotalLengthCounter to protobuf object *otg.PatternFlowIpv4TotalLengthCounter + ToProto() (*otg.PatternFlowIpv4TotalLengthCounter, error) + // ToPbText marshals PatternFlowIpv4TotalLengthCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TotalLengthCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TotalLengthCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TotalLengthCounter struct { + obj *patternFlowIpv4TotalLengthCounter +} + +type unMarshalPatternFlowIpv4TotalLengthCounter interface { + // FromProto unmarshals PatternFlowIpv4TotalLengthCounter from protobuf object *otg.PatternFlowIpv4TotalLengthCounter + FromProto(msg *otg.PatternFlowIpv4TotalLengthCounter) (PatternFlowIpv4TotalLengthCounter, error) + // FromPbText unmarshals PatternFlowIpv4TotalLengthCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TotalLengthCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TotalLengthCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TotalLengthCounter) Marshal() marshalPatternFlowIpv4TotalLengthCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TotalLengthCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TotalLengthCounter) Unmarshal() unMarshalPatternFlowIpv4TotalLengthCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TotalLengthCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TotalLengthCounter) ToProto() (*otg.PatternFlowIpv4TotalLengthCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TotalLengthCounter) FromProto(msg *otg.PatternFlowIpv4TotalLengthCounter) (PatternFlowIpv4TotalLengthCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TotalLengthCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TotalLengthCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TotalLengthCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TotalLengthCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TotalLengthCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TotalLengthCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TotalLengthCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TotalLengthCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TotalLengthCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TotalLengthCounter) Clone() (PatternFlowIpv4TotalLengthCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TotalLengthCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TotalLengthCounter is integer counter pattern +type PatternFlowIpv4TotalLengthCounter interface { + Validation + // msg marshals PatternFlowIpv4TotalLengthCounter to protobuf object *otg.PatternFlowIpv4TotalLengthCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TotalLengthCounter + // setMsg unmarshals PatternFlowIpv4TotalLengthCounter from protobuf object *otg.PatternFlowIpv4TotalLengthCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TotalLengthCounter) PatternFlowIpv4TotalLengthCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4TotalLengthCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TotalLengthCounter + // validate validates PatternFlowIpv4TotalLengthCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TotalLengthCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4TotalLengthCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4TotalLengthCounter + SetStart(value uint32) PatternFlowIpv4TotalLengthCounter + // HasStart checks if Start has been set in PatternFlowIpv4TotalLengthCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4TotalLengthCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4TotalLengthCounter + SetStep(value uint32) PatternFlowIpv4TotalLengthCounter + // HasStep checks if Step has been set in PatternFlowIpv4TotalLengthCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4TotalLengthCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4TotalLengthCounter + SetCount(value uint32) PatternFlowIpv4TotalLengthCounter + // HasCount checks if Count has been set in PatternFlowIpv4TotalLengthCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TotalLengthCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4TotalLengthCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4TotalLengthCounter object +func (obj *patternFlowIpv4TotalLengthCounter) SetStart(value uint32) PatternFlowIpv4TotalLengthCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TotalLengthCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4TotalLengthCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4TotalLengthCounter object +func (obj *patternFlowIpv4TotalLengthCounter) SetStep(value uint32) PatternFlowIpv4TotalLengthCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TotalLengthCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4TotalLengthCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4TotalLengthCounter object +func (obj *patternFlowIpv4TotalLengthCounter) SetCount(value uint32) PatternFlowIpv4TotalLengthCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4TotalLengthCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TotalLengthCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TotalLengthCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TotalLengthCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4TotalLengthCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(46) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_total_length_metric_tag.go b/gosnappi/pattern_flow_ipv4_total_length_metric_tag.go new file mode 100644 index 00000000..0e7550d2 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_total_length_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4TotalLengthMetricTag ***** +type patternFlowIpv4TotalLengthMetricTag struct { + validation + obj *otg.PatternFlowIpv4TotalLengthMetricTag + marshaller marshalPatternFlowIpv4TotalLengthMetricTag + unMarshaller unMarshalPatternFlowIpv4TotalLengthMetricTag +} + +func NewPatternFlowIpv4TotalLengthMetricTag() PatternFlowIpv4TotalLengthMetricTag { + obj := patternFlowIpv4TotalLengthMetricTag{obj: &otg.PatternFlowIpv4TotalLengthMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4TotalLengthMetricTag) msg() *otg.PatternFlowIpv4TotalLengthMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4TotalLengthMetricTag) setMsg(msg *otg.PatternFlowIpv4TotalLengthMetricTag) PatternFlowIpv4TotalLengthMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4TotalLengthMetricTag struct { + obj *patternFlowIpv4TotalLengthMetricTag +} + +type marshalPatternFlowIpv4TotalLengthMetricTag interface { + // ToProto marshals PatternFlowIpv4TotalLengthMetricTag to protobuf object *otg.PatternFlowIpv4TotalLengthMetricTag + ToProto() (*otg.PatternFlowIpv4TotalLengthMetricTag, error) + // ToPbText marshals PatternFlowIpv4TotalLengthMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4TotalLengthMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4TotalLengthMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4TotalLengthMetricTag struct { + obj *patternFlowIpv4TotalLengthMetricTag +} + +type unMarshalPatternFlowIpv4TotalLengthMetricTag interface { + // FromProto unmarshals PatternFlowIpv4TotalLengthMetricTag from protobuf object *otg.PatternFlowIpv4TotalLengthMetricTag + FromProto(msg *otg.PatternFlowIpv4TotalLengthMetricTag) (PatternFlowIpv4TotalLengthMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4TotalLengthMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4TotalLengthMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4TotalLengthMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4TotalLengthMetricTag) Marshal() marshalPatternFlowIpv4TotalLengthMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4TotalLengthMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4TotalLengthMetricTag) Unmarshal() unMarshalPatternFlowIpv4TotalLengthMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4TotalLengthMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4TotalLengthMetricTag) ToProto() (*otg.PatternFlowIpv4TotalLengthMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4TotalLengthMetricTag) FromProto(msg *otg.PatternFlowIpv4TotalLengthMetricTag) (PatternFlowIpv4TotalLengthMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4TotalLengthMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4TotalLengthMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4TotalLengthMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TotalLengthMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4TotalLengthMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4TotalLengthMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4TotalLengthMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TotalLengthMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4TotalLengthMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4TotalLengthMetricTag) Clone() (PatternFlowIpv4TotalLengthMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4TotalLengthMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4TotalLengthMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4TotalLengthMetricTag interface { + Validation + // msg marshals PatternFlowIpv4TotalLengthMetricTag to protobuf object *otg.PatternFlowIpv4TotalLengthMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4TotalLengthMetricTag + // setMsg unmarshals PatternFlowIpv4TotalLengthMetricTag from protobuf object *otg.PatternFlowIpv4TotalLengthMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4TotalLengthMetricTag) PatternFlowIpv4TotalLengthMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4TotalLengthMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4TotalLengthMetricTag + // validate validates PatternFlowIpv4TotalLengthMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4TotalLengthMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4TotalLengthMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4TotalLengthMetricTag + SetName(value string) PatternFlowIpv4TotalLengthMetricTag + // Offset returns uint32, set in PatternFlowIpv4TotalLengthMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4TotalLengthMetricTag + SetOffset(value uint32) PatternFlowIpv4TotalLengthMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4TotalLengthMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4TotalLengthMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4TotalLengthMetricTag + SetLength(value uint32) PatternFlowIpv4TotalLengthMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4TotalLengthMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4TotalLengthMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4TotalLengthMetricTag object +func (obj *patternFlowIpv4TotalLengthMetricTag) SetName(value string) PatternFlowIpv4TotalLengthMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TotalLengthMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4TotalLengthMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4TotalLengthMetricTag object +func (obj *patternFlowIpv4TotalLengthMetricTag) SetOffset(value uint32) PatternFlowIpv4TotalLengthMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TotalLengthMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4TotalLengthMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4TotalLengthMetricTag object +func (obj *patternFlowIpv4TotalLengthMetricTag) SetLength(value uint32) PatternFlowIpv4TotalLengthMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4TotalLengthMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4TotalLengthMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4TotalLengthMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4TotalLengthMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4TotalLengthMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_version.go b/gosnappi/pattern_flow_ipv4_version.go new file mode 100644 index 00000000..3f6d3ff2 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_version.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4Version ***** +type patternFlowIpv4Version struct { + validation + obj *otg.PatternFlowIpv4Version + marshaller marshalPatternFlowIpv4Version + unMarshaller unMarshalPatternFlowIpv4Version + incrementHolder PatternFlowIpv4VersionCounter + decrementHolder PatternFlowIpv4VersionCounter + metricTagsHolder PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter +} + +func NewPatternFlowIpv4Version() PatternFlowIpv4Version { + obj := patternFlowIpv4Version{obj: &otg.PatternFlowIpv4Version{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4Version) msg() *otg.PatternFlowIpv4Version { + return obj.obj +} + +func (obj *patternFlowIpv4Version) setMsg(msg *otg.PatternFlowIpv4Version) PatternFlowIpv4Version { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4Version struct { + obj *patternFlowIpv4Version +} + +type marshalPatternFlowIpv4Version interface { + // ToProto marshals PatternFlowIpv4Version to protobuf object *otg.PatternFlowIpv4Version + ToProto() (*otg.PatternFlowIpv4Version, error) + // ToPbText marshals PatternFlowIpv4Version to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4Version to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4Version to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4Version struct { + obj *patternFlowIpv4Version +} + +type unMarshalPatternFlowIpv4Version interface { + // FromProto unmarshals PatternFlowIpv4Version from protobuf object *otg.PatternFlowIpv4Version + FromProto(msg *otg.PatternFlowIpv4Version) (PatternFlowIpv4Version, error) + // FromPbText unmarshals PatternFlowIpv4Version from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4Version from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4Version from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4Version) Marshal() marshalPatternFlowIpv4Version { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4Version{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4Version) Unmarshal() unMarshalPatternFlowIpv4Version { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4Version{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4Version) ToProto() (*otg.PatternFlowIpv4Version, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4Version) FromProto(msg *otg.PatternFlowIpv4Version) (PatternFlowIpv4Version, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4Version) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4Version) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4Version) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4Version) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4Version) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4Version) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4Version) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4Version) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4Version) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4Version) Clone() (PatternFlowIpv4Version, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4Version() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv4Version) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv4Version is version +type PatternFlowIpv4Version interface { + Validation + // msg marshals PatternFlowIpv4Version to protobuf object *otg.PatternFlowIpv4Version + // and doesn't set defaults + msg() *otg.PatternFlowIpv4Version + // setMsg unmarshals PatternFlowIpv4Version from protobuf object *otg.PatternFlowIpv4Version + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4Version) PatternFlowIpv4Version + // provides marshal interface + Marshal() marshalPatternFlowIpv4Version + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4Version + // validate validates PatternFlowIpv4Version + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4Version, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv4VersionChoiceEnum, set in PatternFlowIpv4Version + Choice() PatternFlowIpv4VersionChoiceEnum + // setChoice assigns PatternFlowIpv4VersionChoiceEnum provided by user to PatternFlowIpv4Version + setChoice(value PatternFlowIpv4VersionChoiceEnum) PatternFlowIpv4Version + // HasChoice checks if Choice has been set in PatternFlowIpv4Version + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv4Version. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv4Version + SetValue(value uint32) PatternFlowIpv4Version + // HasValue checks if Value has been set in PatternFlowIpv4Version + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv4Version. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv4Version + SetValues(value []uint32) PatternFlowIpv4Version + // Increment returns PatternFlowIpv4VersionCounter, set in PatternFlowIpv4Version. + // PatternFlowIpv4VersionCounter is integer counter pattern + Increment() PatternFlowIpv4VersionCounter + // SetIncrement assigns PatternFlowIpv4VersionCounter provided by user to PatternFlowIpv4Version. + // PatternFlowIpv4VersionCounter is integer counter pattern + SetIncrement(value PatternFlowIpv4VersionCounter) PatternFlowIpv4Version + // HasIncrement checks if Increment has been set in PatternFlowIpv4Version + HasIncrement() bool + // Decrement returns PatternFlowIpv4VersionCounter, set in PatternFlowIpv4Version. + // PatternFlowIpv4VersionCounter is integer counter pattern + Decrement() PatternFlowIpv4VersionCounter + // SetDecrement assigns PatternFlowIpv4VersionCounter provided by user to PatternFlowIpv4Version. + // PatternFlowIpv4VersionCounter is integer counter pattern + SetDecrement(value PatternFlowIpv4VersionCounter) PatternFlowIpv4Version + // HasDecrement checks if Decrement has been set in PatternFlowIpv4Version + HasDecrement() bool + // MetricTags returns PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIterIter, set in PatternFlowIpv4Version + MetricTags() PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter + setNil() +} + +type PatternFlowIpv4VersionChoiceEnum string + +// Enum of Choice on PatternFlowIpv4Version +var PatternFlowIpv4VersionChoice = struct { + VALUE PatternFlowIpv4VersionChoiceEnum + VALUES PatternFlowIpv4VersionChoiceEnum + INCREMENT PatternFlowIpv4VersionChoiceEnum + DECREMENT PatternFlowIpv4VersionChoiceEnum +}{ + VALUE: PatternFlowIpv4VersionChoiceEnum("value"), + VALUES: PatternFlowIpv4VersionChoiceEnum("values"), + INCREMENT: PatternFlowIpv4VersionChoiceEnum("increment"), + DECREMENT: PatternFlowIpv4VersionChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv4Version) Choice() PatternFlowIpv4VersionChoiceEnum { + return PatternFlowIpv4VersionChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv4Version) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv4Version) setChoice(value PatternFlowIpv4VersionChoiceEnum) PatternFlowIpv4Version { + intValue, ok := otg.PatternFlowIpv4Version_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv4VersionChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv4Version_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv4VersionChoice.VALUE { + defaultValue := uint32(4) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv4VersionChoice.VALUES { + defaultValue := []uint32{4} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv4VersionChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv4VersionCounter().msg() + } + + if value == PatternFlowIpv4VersionChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv4VersionCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4Version) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv4VersionChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv4Version) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv4Version object +func (obj *patternFlowIpv4Version) SetValue(value uint32) PatternFlowIpv4Version { + obj.setChoice(PatternFlowIpv4VersionChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv4Version) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{4}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv4Version object +func (obj *patternFlowIpv4Version) SetValues(value []uint32) PatternFlowIpv4Version { + obj.setChoice(PatternFlowIpv4VersionChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv4VersionCounter +func (obj *patternFlowIpv4Version) Increment() PatternFlowIpv4VersionCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv4VersionChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv4VersionCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv4VersionCounter +func (obj *patternFlowIpv4Version) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv4VersionCounter value in the PatternFlowIpv4Version object +func (obj *patternFlowIpv4Version) SetIncrement(value PatternFlowIpv4VersionCounter) PatternFlowIpv4Version { + obj.setChoice(PatternFlowIpv4VersionChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv4VersionCounter +func (obj *patternFlowIpv4Version) Decrement() PatternFlowIpv4VersionCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv4VersionChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv4VersionCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv4VersionCounter +func (obj *patternFlowIpv4Version) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv4VersionCounter value in the PatternFlowIpv4Version object +func (obj *patternFlowIpv4Version) SetDecrement(value PatternFlowIpv4VersionCounter) PatternFlowIpv4Version { + obj.setChoice(PatternFlowIpv4VersionChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv4VersionMetricTag +func (obj *patternFlowIpv4Version) MetricTags() PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv4VersionMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter struct { + obj *patternFlowIpv4Version + patternFlowIpv4VersionMetricTagSlice []PatternFlowIpv4VersionMetricTag + fieldPtr *[]*otg.PatternFlowIpv4VersionMetricTag +} + +func newPatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter(ptr *[]*otg.PatternFlowIpv4VersionMetricTag) PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter { + return &patternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter interface { + setMsg(*patternFlowIpv4Version) PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter + Items() []PatternFlowIpv4VersionMetricTag + Add() PatternFlowIpv4VersionMetricTag + Append(items ...PatternFlowIpv4VersionMetricTag) PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter + Set(index int, newObj PatternFlowIpv4VersionMetricTag) PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter + Clear() PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter + clearHolderSlice() PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter + appendHolderSlice(item PatternFlowIpv4VersionMetricTag) PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter +} + +func (obj *patternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter) setMsg(msg *patternFlowIpv4Version) PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv4VersionMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter) Items() []PatternFlowIpv4VersionMetricTag { + return obj.patternFlowIpv4VersionMetricTagSlice +} + +func (obj *patternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter) Add() PatternFlowIpv4VersionMetricTag { + newObj := &otg.PatternFlowIpv4VersionMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv4VersionMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv4VersionMetricTagSlice = append(obj.patternFlowIpv4VersionMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter) Append(items ...PatternFlowIpv4VersionMetricTag) PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv4VersionMetricTagSlice = append(obj.patternFlowIpv4VersionMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter) Set(index int, newObj PatternFlowIpv4VersionMetricTag) PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv4VersionMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter) Clear() PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv4VersionMetricTag{} + obj.patternFlowIpv4VersionMetricTagSlice = []PatternFlowIpv4VersionMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter) clearHolderSlice() PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter { + if len(obj.patternFlowIpv4VersionMetricTagSlice) > 0 { + obj.patternFlowIpv4VersionMetricTagSlice = []PatternFlowIpv4VersionMetricTag{} + } + return obj +} +func (obj *patternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter) appendHolderSlice(item PatternFlowIpv4VersionMetricTag) PatternFlowIpv4VersionPatternFlowIpv4VersionMetricTagIter { + obj.patternFlowIpv4VersionMetricTagSlice = append(obj.patternFlowIpv4VersionMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv4Version) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4Version.Value <= 15 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv4Version.Values <= 15 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv4VersionMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv4Version) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv4VersionChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv4VersionChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv4VersionChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv4VersionChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv4VersionChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv4VersionChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv4Version") + } + } else { + intVal := otg.PatternFlowIpv4Version_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv4Version_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv4_version_counter.go b/gosnappi/pattern_flow_ipv4_version_counter.go new file mode 100644 index 00000000..ec9e1a64 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_version_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4VersionCounter ***** +type patternFlowIpv4VersionCounter struct { + validation + obj *otg.PatternFlowIpv4VersionCounter + marshaller marshalPatternFlowIpv4VersionCounter + unMarshaller unMarshalPatternFlowIpv4VersionCounter +} + +func NewPatternFlowIpv4VersionCounter() PatternFlowIpv4VersionCounter { + obj := patternFlowIpv4VersionCounter{obj: &otg.PatternFlowIpv4VersionCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4VersionCounter) msg() *otg.PatternFlowIpv4VersionCounter { + return obj.obj +} + +func (obj *patternFlowIpv4VersionCounter) setMsg(msg *otg.PatternFlowIpv4VersionCounter) PatternFlowIpv4VersionCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4VersionCounter struct { + obj *patternFlowIpv4VersionCounter +} + +type marshalPatternFlowIpv4VersionCounter interface { + // ToProto marshals PatternFlowIpv4VersionCounter to protobuf object *otg.PatternFlowIpv4VersionCounter + ToProto() (*otg.PatternFlowIpv4VersionCounter, error) + // ToPbText marshals PatternFlowIpv4VersionCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4VersionCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4VersionCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4VersionCounter struct { + obj *patternFlowIpv4VersionCounter +} + +type unMarshalPatternFlowIpv4VersionCounter interface { + // FromProto unmarshals PatternFlowIpv4VersionCounter from protobuf object *otg.PatternFlowIpv4VersionCounter + FromProto(msg *otg.PatternFlowIpv4VersionCounter) (PatternFlowIpv4VersionCounter, error) + // FromPbText unmarshals PatternFlowIpv4VersionCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4VersionCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4VersionCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4VersionCounter) Marshal() marshalPatternFlowIpv4VersionCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4VersionCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4VersionCounter) Unmarshal() unMarshalPatternFlowIpv4VersionCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4VersionCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4VersionCounter) ToProto() (*otg.PatternFlowIpv4VersionCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4VersionCounter) FromProto(msg *otg.PatternFlowIpv4VersionCounter) (PatternFlowIpv4VersionCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4VersionCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4VersionCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4VersionCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4VersionCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4VersionCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4VersionCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4VersionCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4VersionCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4VersionCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4VersionCounter) Clone() (PatternFlowIpv4VersionCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4VersionCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4VersionCounter is integer counter pattern +type PatternFlowIpv4VersionCounter interface { + Validation + // msg marshals PatternFlowIpv4VersionCounter to protobuf object *otg.PatternFlowIpv4VersionCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv4VersionCounter + // setMsg unmarshals PatternFlowIpv4VersionCounter from protobuf object *otg.PatternFlowIpv4VersionCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4VersionCounter) PatternFlowIpv4VersionCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv4VersionCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4VersionCounter + // validate validates PatternFlowIpv4VersionCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4VersionCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv4VersionCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv4VersionCounter + SetStart(value uint32) PatternFlowIpv4VersionCounter + // HasStart checks if Start has been set in PatternFlowIpv4VersionCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv4VersionCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv4VersionCounter + SetStep(value uint32) PatternFlowIpv4VersionCounter + // HasStep checks if Step has been set in PatternFlowIpv4VersionCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv4VersionCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv4VersionCounter + SetCount(value uint32) PatternFlowIpv4VersionCounter + // HasCount checks if Count has been set in PatternFlowIpv4VersionCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4VersionCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv4VersionCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv4VersionCounter object +func (obj *patternFlowIpv4VersionCounter) SetStart(value uint32) PatternFlowIpv4VersionCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4VersionCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv4VersionCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv4VersionCounter object +func (obj *patternFlowIpv4VersionCounter) SetStep(value uint32) PatternFlowIpv4VersionCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4VersionCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv4VersionCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv4VersionCounter object +func (obj *patternFlowIpv4VersionCounter) SetCount(value uint32) PatternFlowIpv4VersionCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv4VersionCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4VersionCounter.Start <= 15 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4VersionCounter.Step <= 15 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4VersionCounter.Count <= 15 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv4VersionCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(4) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv4_version_metric_tag.go b/gosnappi/pattern_flow_ipv4_version_metric_tag.go new file mode 100644 index 00000000..97692140 --- /dev/null +++ b/gosnappi/pattern_flow_ipv4_version_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv4VersionMetricTag ***** +type patternFlowIpv4VersionMetricTag struct { + validation + obj *otg.PatternFlowIpv4VersionMetricTag + marshaller marshalPatternFlowIpv4VersionMetricTag + unMarshaller unMarshalPatternFlowIpv4VersionMetricTag +} + +func NewPatternFlowIpv4VersionMetricTag() PatternFlowIpv4VersionMetricTag { + obj := patternFlowIpv4VersionMetricTag{obj: &otg.PatternFlowIpv4VersionMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv4VersionMetricTag) msg() *otg.PatternFlowIpv4VersionMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv4VersionMetricTag) setMsg(msg *otg.PatternFlowIpv4VersionMetricTag) PatternFlowIpv4VersionMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv4VersionMetricTag struct { + obj *patternFlowIpv4VersionMetricTag +} + +type marshalPatternFlowIpv4VersionMetricTag interface { + // ToProto marshals PatternFlowIpv4VersionMetricTag to protobuf object *otg.PatternFlowIpv4VersionMetricTag + ToProto() (*otg.PatternFlowIpv4VersionMetricTag, error) + // ToPbText marshals PatternFlowIpv4VersionMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv4VersionMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv4VersionMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv4VersionMetricTag struct { + obj *patternFlowIpv4VersionMetricTag +} + +type unMarshalPatternFlowIpv4VersionMetricTag interface { + // FromProto unmarshals PatternFlowIpv4VersionMetricTag from protobuf object *otg.PatternFlowIpv4VersionMetricTag + FromProto(msg *otg.PatternFlowIpv4VersionMetricTag) (PatternFlowIpv4VersionMetricTag, error) + // FromPbText unmarshals PatternFlowIpv4VersionMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv4VersionMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv4VersionMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv4VersionMetricTag) Marshal() marshalPatternFlowIpv4VersionMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv4VersionMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv4VersionMetricTag) Unmarshal() unMarshalPatternFlowIpv4VersionMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv4VersionMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv4VersionMetricTag) ToProto() (*otg.PatternFlowIpv4VersionMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv4VersionMetricTag) FromProto(msg *otg.PatternFlowIpv4VersionMetricTag) (PatternFlowIpv4VersionMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv4VersionMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv4VersionMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv4VersionMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4VersionMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv4VersionMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv4VersionMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv4VersionMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv4VersionMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv4VersionMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv4VersionMetricTag) Clone() (PatternFlowIpv4VersionMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv4VersionMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv4VersionMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv4VersionMetricTag interface { + Validation + // msg marshals PatternFlowIpv4VersionMetricTag to protobuf object *otg.PatternFlowIpv4VersionMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv4VersionMetricTag + // setMsg unmarshals PatternFlowIpv4VersionMetricTag from protobuf object *otg.PatternFlowIpv4VersionMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv4VersionMetricTag) PatternFlowIpv4VersionMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv4VersionMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv4VersionMetricTag + // validate validates PatternFlowIpv4VersionMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv4VersionMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv4VersionMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv4VersionMetricTag + SetName(value string) PatternFlowIpv4VersionMetricTag + // Offset returns uint32, set in PatternFlowIpv4VersionMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv4VersionMetricTag + SetOffset(value uint32) PatternFlowIpv4VersionMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv4VersionMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv4VersionMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv4VersionMetricTag + SetLength(value uint32) PatternFlowIpv4VersionMetricTag + // HasLength checks if Length has been set in PatternFlowIpv4VersionMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv4VersionMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv4VersionMetricTag object +func (obj *patternFlowIpv4VersionMetricTag) SetName(value string) PatternFlowIpv4VersionMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4VersionMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv4VersionMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv4VersionMetricTag object +func (obj *patternFlowIpv4VersionMetricTag) SetOffset(value uint32) PatternFlowIpv4VersionMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4VersionMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv4VersionMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv4VersionMetricTag object +func (obj *patternFlowIpv4VersionMetricTag) SetLength(value uint32) PatternFlowIpv4VersionMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv4VersionMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv4VersionMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv4VersionMetricTag.Offset <= 3 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 4 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv4VersionMetricTag.Length <= 4 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv4VersionMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(4) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_dst.go b/gosnappi/pattern_flow_ipv6_dst.go new file mode 100644 index 00000000..d6346fe9 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_dst.go @@ -0,0 +1,701 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6Dst ***** +type patternFlowIpv6Dst struct { + validation + obj *otg.PatternFlowIpv6Dst + marshaller marshalPatternFlowIpv6Dst + unMarshaller unMarshalPatternFlowIpv6Dst + incrementHolder PatternFlowIpv6DstCounter + decrementHolder PatternFlowIpv6DstCounter + metricTagsHolder PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter + autoHolder FlowIpv6Auto +} + +func NewPatternFlowIpv6Dst() PatternFlowIpv6Dst { + obj := patternFlowIpv6Dst{obj: &otg.PatternFlowIpv6Dst{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6Dst) msg() *otg.PatternFlowIpv6Dst { + return obj.obj +} + +func (obj *patternFlowIpv6Dst) setMsg(msg *otg.PatternFlowIpv6Dst) PatternFlowIpv6Dst { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6Dst struct { + obj *patternFlowIpv6Dst +} + +type marshalPatternFlowIpv6Dst interface { + // ToProto marshals PatternFlowIpv6Dst to protobuf object *otg.PatternFlowIpv6Dst + ToProto() (*otg.PatternFlowIpv6Dst, error) + // ToPbText marshals PatternFlowIpv6Dst to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6Dst to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6Dst to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6Dst struct { + obj *patternFlowIpv6Dst +} + +type unMarshalPatternFlowIpv6Dst interface { + // FromProto unmarshals PatternFlowIpv6Dst from protobuf object *otg.PatternFlowIpv6Dst + FromProto(msg *otg.PatternFlowIpv6Dst) (PatternFlowIpv6Dst, error) + // FromPbText unmarshals PatternFlowIpv6Dst from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6Dst from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6Dst from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6Dst) Marshal() marshalPatternFlowIpv6Dst { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6Dst{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6Dst) Unmarshal() unMarshalPatternFlowIpv6Dst { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6Dst{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6Dst) ToProto() (*otg.PatternFlowIpv6Dst, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6Dst) FromProto(msg *otg.PatternFlowIpv6Dst) (PatternFlowIpv6Dst, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6Dst) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6Dst) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6Dst) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6Dst) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6Dst) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6Dst) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6Dst) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6Dst) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6Dst) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6Dst) Clone() (PatternFlowIpv6Dst, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6Dst() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv6Dst) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.autoHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv6Dst is destination address +type PatternFlowIpv6Dst interface { + Validation + // msg marshals PatternFlowIpv6Dst to protobuf object *otg.PatternFlowIpv6Dst + // and doesn't set defaults + msg() *otg.PatternFlowIpv6Dst + // setMsg unmarshals PatternFlowIpv6Dst from protobuf object *otg.PatternFlowIpv6Dst + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6Dst) PatternFlowIpv6Dst + // provides marshal interface + Marshal() marshalPatternFlowIpv6Dst + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6Dst + // validate validates PatternFlowIpv6Dst + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6Dst, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv6DstChoiceEnum, set in PatternFlowIpv6Dst + Choice() PatternFlowIpv6DstChoiceEnum + // setChoice assigns PatternFlowIpv6DstChoiceEnum provided by user to PatternFlowIpv6Dst + setChoice(value PatternFlowIpv6DstChoiceEnum) PatternFlowIpv6Dst + // HasChoice checks if Choice has been set in PatternFlowIpv6Dst + HasChoice() bool + // Value returns string, set in PatternFlowIpv6Dst. + Value() string + // SetValue assigns string provided by user to PatternFlowIpv6Dst + SetValue(value string) PatternFlowIpv6Dst + // HasValue checks if Value has been set in PatternFlowIpv6Dst + HasValue() bool + // Values returns []string, set in PatternFlowIpv6Dst. + Values() []string + // SetValues assigns []string provided by user to PatternFlowIpv6Dst + SetValues(value []string) PatternFlowIpv6Dst + // Increment returns PatternFlowIpv6DstCounter, set in PatternFlowIpv6Dst. + // PatternFlowIpv6DstCounter is ipv6 counter pattern + Increment() PatternFlowIpv6DstCounter + // SetIncrement assigns PatternFlowIpv6DstCounter provided by user to PatternFlowIpv6Dst. + // PatternFlowIpv6DstCounter is ipv6 counter pattern + SetIncrement(value PatternFlowIpv6DstCounter) PatternFlowIpv6Dst + // HasIncrement checks if Increment has been set in PatternFlowIpv6Dst + HasIncrement() bool + // Decrement returns PatternFlowIpv6DstCounter, set in PatternFlowIpv6Dst. + // PatternFlowIpv6DstCounter is ipv6 counter pattern + Decrement() PatternFlowIpv6DstCounter + // SetDecrement assigns PatternFlowIpv6DstCounter provided by user to PatternFlowIpv6Dst. + // PatternFlowIpv6DstCounter is ipv6 counter pattern + SetDecrement(value PatternFlowIpv6DstCounter) PatternFlowIpv6Dst + // HasDecrement checks if Decrement has been set in PatternFlowIpv6Dst + HasDecrement() bool + // MetricTags returns PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIterIter, set in PatternFlowIpv6Dst + MetricTags() PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter + // Auto returns FlowIpv6Auto, set in PatternFlowIpv6Dst. + // FlowIpv6Auto is the OTG implementation can provide a system generated, value for this property. + Auto() FlowIpv6Auto + // HasAuto checks if Auto has been set in PatternFlowIpv6Dst + HasAuto() bool + setNil() +} + +type PatternFlowIpv6DstChoiceEnum string + +// Enum of Choice on PatternFlowIpv6Dst +var PatternFlowIpv6DstChoice = struct { + VALUE PatternFlowIpv6DstChoiceEnum + VALUES PatternFlowIpv6DstChoiceEnum + INCREMENT PatternFlowIpv6DstChoiceEnum + DECREMENT PatternFlowIpv6DstChoiceEnum + AUTO PatternFlowIpv6DstChoiceEnum +}{ + VALUE: PatternFlowIpv6DstChoiceEnum("value"), + VALUES: PatternFlowIpv6DstChoiceEnum("values"), + INCREMENT: PatternFlowIpv6DstChoiceEnum("increment"), + DECREMENT: PatternFlowIpv6DstChoiceEnum("decrement"), + AUTO: PatternFlowIpv6DstChoiceEnum("auto"), +} + +func (obj *patternFlowIpv6Dst) Choice() PatternFlowIpv6DstChoiceEnum { + return PatternFlowIpv6DstChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv6Dst) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv6Dst) setChoice(value PatternFlowIpv6DstChoiceEnum) PatternFlowIpv6Dst { + intValue, ok := otg.PatternFlowIpv6Dst_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv6DstChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv6Dst_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Auto = nil + obj.autoHolder = nil + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv6DstChoice.VALUE { + defaultValue := "::0" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv6DstChoice.VALUES { + defaultValue := []string{"::0"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv6DstChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv6DstCounter().msg() + } + + if value == PatternFlowIpv6DstChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv6DstCounter().msg() + } + + if value == PatternFlowIpv6DstChoice.AUTO { + obj.obj.Auto = NewFlowIpv6Auto().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowIpv6Dst) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv6DstChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowIpv6Dst) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowIpv6Dst object +func (obj *patternFlowIpv6Dst) SetValue(value string) PatternFlowIpv6Dst { + obj.setChoice(PatternFlowIpv6DstChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowIpv6Dst) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"::0"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowIpv6Dst object +func (obj *patternFlowIpv6Dst) SetValues(value []string) PatternFlowIpv6Dst { + obj.setChoice(PatternFlowIpv6DstChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv6DstCounter +func (obj *patternFlowIpv6Dst) Increment() PatternFlowIpv6DstCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv6DstChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv6DstCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv6DstCounter +func (obj *patternFlowIpv6Dst) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv6DstCounter value in the PatternFlowIpv6Dst object +func (obj *patternFlowIpv6Dst) SetIncrement(value PatternFlowIpv6DstCounter) PatternFlowIpv6Dst { + obj.setChoice(PatternFlowIpv6DstChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv6DstCounter +func (obj *patternFlowIpv6Dst) Decrement() PatternFlowIpv6DstCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv6DstChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv6DstCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv6DstCounter +func (obj *patternFlowIpv6Dst) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv6DstCounter value in the PatternFlowIpv6Dst object +func (obj *patternFlowIpv6Dst) SetDecrement(value PatternFlowIpv6DstCounter) PatternFlowIpv6Dst { + obj.setChoice(PatternFlowIpv6DstChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv6DstMetricTag +func (obj *patternFlowIpv6Dst) MetricTags() PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv6DstMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv6DstPatternFlowIpv6DstMetricTagIter struct { + obj *patternFlowIpv6Dst + patternFlowIpv6DstMetricTagSlice []PatternFlowIpv6DstMetricTag + fieldPtr *[]*otg.PatternFlowIpv6DstMetricTag +} + +func newPatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter(ptr *[]*otg.PatternFlowIpv6DstMetricTag) PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter { + return &patternFlowIpv6DstPatternFlowIpv6DstMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter interface { + setMsg(*patternFlowIpv6Dst) PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter + Items() []PatternFlowIpv6DstMetricTag + Add() PatternFlowIpv6DstMetricTag + Append(items ...PatternFlowIpv6DstMetricTag) PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter + Set(index int, newObj PatternFlowIpv6DstMetricTag) PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter + Clear() PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter + clearHolderSlice() PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter + appendHolderSlice(item PatternFlowIpv6DstMetricTag) PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter +} + +func (obj *patternFlowIpv6DstPatternFlowIpv6DstMetricTagIter) setMsg(msg *patternFlowIpv6Dst) PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv6DstMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv6DstPatternFlowIpv6DstMetricTagIter) Items() []PatternFlowIpv6DstMetricTag { + return obj.patternFlowIpv6DstMetricTagSlice +} + +func (obj *patternFlowIpv6DstPatternFlowIpv6DstMetricTagIter) Add() PatternFlowIpv6DstMetricTag { + newObj := &otg.PatternFlowIpv6DstMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv6DstMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv6DstMetricTagSlice = append(obj.patternFlowIpv6DstMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv6DstPatternFlowIpv6DstMetricTagIter) Append(items ...PatternFlowIpv6DstMetricTag) PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv6DstMetricTagSlice = append(obj.patternFlowIpv6DstMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv6DstPatternFlowIpv6DstMetricTagIter) Set(index int, newObj PatternFlowIpv6DstMetricTag) PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv6DstMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv6DstPatternFlowIpv6DstMetricTagIter) Clear() PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv6DstMetricTag{} + obj.patternFlowIpv6DstMetricTagSlice = []PatternFlowIpv6DstMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6DstPatternFlowIpv6DstMetricTagIter) clearHolderSlice() PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter { + if len(obj.patternFlowIpv6DstMetricTagSlice) > 0 { + obj.patternFlowIpv6DstMetricTagSlice = []PatternFlowIpv6DstMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6DstPatternFlowIpv6DstMetricTagIter) appendHolderSlice(item PatternFlowIpv6DstMetricTag) PatternFlowIpv6DstPatternFlowIpv6DstMetricTagIter { + obj.patternFlowIpv6DstMetricTagSlice = append(obj.patternFlowIpv6DstMetricTagSlice, item) + return obj +} + +// description is TBD +// Auto returns a FlowIpv6Auto +func (obj *patternFlowIpv6Dst) Auto() FlowIpv6Auto { + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowIpv6DstChoice.AUTO) + } + if obj.autoHolder == nil { + obj.autoHolder = &flowIpv6Auto{obj: obj.obj.Auto} + } + return obj.autoHolder +} + +// description is TBD +// Auto returns a FlowIpv6Auto +func (obj *patternFlowIpv6Dst) HasAuto() bool { + return obj.obj.Auto != nil +} + +func (obj *patternFlowIpv6Dst) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv6(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv6Dst.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateIpv6Slice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv6Dst.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv6DstMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Auto != nil { + + obj.Auto().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowIpv6Dst) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv6DstChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv6DstChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv6DstChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv6DstChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv6DstChoice.DECREMENT + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowIpv6DstChoice.AUTO + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv6DstChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv6Dst") + } + } else { + intVal := otg.PatternFlowIpv6Dst_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv6Dst_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv6_dst_counter.go b/gosnappi/pattern_flow_ipv6_dst_counter.go new file mode 100644 index 00000000..024e1531 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_dst_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6DstCounter ***** +type patternFlowIpv6DstCounter struct { + validation + obj *otg.PatternFlowIpv6DstCounter + marshaller marshalPatternFlowIpv6DstCounter + unMarshaller unMarshalPatternFlowIpv6DstCounter +} + +func NewPatternFlowIpv6DstCounter() PatternFlowIpv6DstCounter { + obj := patternFlowIpv6DstCounter{obj: &otg.PatternFlowIpv6DstCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6DstCounter) msg() *otg.PatternFlowIpv6DstCounter { + return obj.obj +} + +func (obj *patternFlowIpv6DstCounter) setMsg(msg *otg.PatternFlowIpv6DstCounter) PatternFlowIpv6DstCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6DstCounter struct { + obj *patternFlowIpv6DstCounter +} + +type marshalPatternFlowIpv6DstCounter interface { + // ToProto marshals PatternFlowIpv6DstCounter to protobuf object *otg.PatternFlowIpv6DstCounter + ToProto() (*otg.PatternFlowIpv6DstCounter, error) + // ToPbText marshals PatternFlowIpv6DstCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6DstCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6DstCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6DstCounter struct { + obj *patternFlowIpv6DstCounter +} + +type unMarshalPatternFlowIpv6DstCounter interface { + // FromProto unmarshals PatternFlowIpv6DstCounter from protobuf object *otg.PatternFlowIpv6DstCounter + FromProto(msg *otg.PatternFlowIpv6DstCounter) (PatternFlowIpv6DstCounter, error) + // FromPbText unmarshals PatternFlowIpv6DstCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6DstCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6DstCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6DstCounter) Marshal() marshalPatternFlowIpv6DstCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6DstCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6DstCounter) Unmarshal() unMarshalPatternFlowIpv6DstCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6DstCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6DstCounter) ToProto() (*otg.PatternFlowIpv6DstCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6DstCounter) FromProto(msg *otg.PatternFlowIpv6DstCounter) (PatternFlowIpv6DstCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6DstCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6DstCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6DstCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6DstCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6DstCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6DstCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6DstCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6DstCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6DstCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6DstCounter) Clone() (PatternFlowIpv6DstCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6DstCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6DstCounter is ipv6 counter pattern +type PatternFlowIpv6DstCounter interface { + Validation + // msg marshals PatternFlowIpv6DstCounter to protobuf object *otg.PatternFlowIpv6DstCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv6DstCounter + // setMsg unmarshals PatternFlowIpv6DstCounter from protobuf object *otg.PatternFlowIpv6DstCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6DstCounter) PatternFlowIpv6DstCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv6DstCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6DstCounter + // validate validates PatternFlowIpv6DstCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6DstCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowIpv6DstCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowIpv6DstCounter + SetStart(value string) PatternFlowIpv6DstCounter + // HasStart checks if Start has been set in PatternFlowIpv6DstCounter + HasStart() bool + // Step returns string, set in PatternFlowIpv6DstCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowIpv6DstCounter + SetStep(value string) PatternFlowIpv6DstCounter + // HasStep checks if Step has been set in PatternFlowIpv6DstCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv6DstCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv6DstCounter + SetCount(value uint32) PatternFlowIpv6DstCounter + // HasCount checks if Count has been set in PatternFlowIpv6DstCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowIpv6DstCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowIpv6DstCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowIpv6DstCounter object +func (obj *patternFlowIpv6DstCounter) SetStart(value string) PatternFlowIpv6DstCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowIpv6DstCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowIpv6DstCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowIpv6DstCounter object +func (obj *patternFlowIpv6DstCounter) SetStep(value string) PatternFlowIpv6DstCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6DstCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6DstCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv6DstCounter object +func (obj *patternFlowIpv6DstCounter) SetCount(value uint32) PatternFlowIpv6DstCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv6DstCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateIpv6(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv6DstCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateIpv6(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv6DstCounter.Step")) + } + + } + +} + +func (obj *patternFlowIpv6DstCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("::0") + } + if obj.obj.Step == nil { + obj.SetStep("::1") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_dst_metric_tag.go b/gosnappi/pattern_flow_ipv6_dst_metric_tag.go new file mode 100644 index 00000000..0a75d61c --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_dst_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6DstMetricTag ***** +type patternFlowIpv6DstMetricTag struct { + validation + obj *otg.PatternFlowIpv6DstMetricTag + marshaller marshalPatternFlowIpv6DstMetricTag + unMarshaller unMarshalPatternFlowIpv6DstMetricTag +} + +func NewPatternFlowIpv6DstMetricTag() PatternFlowIpv6DstMetricTag { + obj := patternFlowIpv6DstMetricTag{obj: &otg.PatternFlowIpv6DstMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6DstMetricTag) msg() *otg.PatternFlowIpv6DstMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv6DstMetricTag) setMsg(msg *otg.PatternFlowIpv6DstMetricTag) PatternFlowIpv6DstMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6DstMetricTag struct { + obj *patternFlowIpv6DstMetricTag +} + +type marshalPatternFlowIpv6DstMetricTag interface { + // ToProto marshals PatternFlowIpv6DstMetricTag to protobuf object *otg.PatternFlowIpv6DstMetricTag + ToProto() (*otg.PatternFlowIpv6DstMetricTag, error) + // ToPbText marshals PatternFlowIpv6DstMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6DstMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6DstMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6DstMetricTag struct { + obj *patternFlowIpv6DstMetricTag +} + +type unMarshalPatternFlowIpv6DstMetricTag interface { + // FromProto unmarshals PatternFlowIpv6DstMetricTag from protobuf object *otg.PatternFlowIpv6DstMetricTag + FromProto(msg *otg.PatternFlowIpv6DstMetricTag) (PatternFlowIpv6DstMetricTag, error) + // FromPbText unmarshals PatternFlowIpv6DstMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6DstMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6DstMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6DstMetricTag) Marshal() marshalPatternFlowIpv6DstMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6DstMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6DstMetricTag) Unmarshal() unMarshalPatternFlowIpv6DstMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6DstMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6DstMetricTag) ToProto() (*otg.PatternFlowIpv6DstMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6DstMetricTag) FromProto(msg *otg.PatternFlowIpv6DstMetricTag) (PatternFlowIpv6DstMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6DstMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6DstMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6DstMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6DstMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6DstMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6DstMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6DstMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6DstMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6DstMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6DstMetricTag) Clone() (PatternFlowIpv6DstMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6DstMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6DstMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv6DstMetricTag interface { + Validation + // msg marshals PatternFlowIpv6DstMetricTag to protobuf object *otg.PatternFlowIpv6DstMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv6DstMetricTag + // setMsg unmarshals PatternFlowIpv6DstMetricTag from protobuf object *otg.PatternFlowIpv6DstMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6DstMetricTag) PatternFlowIpv6DstMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv6DstMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6DstMetricTag + // validate validates PatternFlowIpv6DstMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6DstMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv6DstMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv6DstMetricTag + SetName(value string) PatternFlowIpv6DstMetricTag + // Offset returns uint32, set in PatternFlowIpv6DstMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv6DstMetricTag + SetOffset(value uint32) PatternFlowIpv6DstMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv6DstMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv6DstMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv6DstMetricTag + SetLength(value uint32) PatternFlowIpv6DstMetricTag + // HasLength checks if Length has been set in PatternFlowIpv6DstMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv6DstMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv6DstMetricTag object +func (obj *patternFlowIpv6DstMetricTag) SetName(value string) PatternFlowIpv6DstMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6DstMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6DstMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv6DstMetricTag object +func (obj *patternFlowIpv6DstMetricTag) SetOffset(value uint32) PatternFlowIpv6DstMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6DstMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6DstMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv6DstMetricTag object +func (obj *patternFlowIpv6DstMetricTag) SetLength(value uint32) PatternFlowIpv6DstMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv6DstMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv6DstMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 127 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6DstMetricTag.Offset <= 127 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv6DstMetricTag.Length <= 128 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv6DstMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(128) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_flow_label.go b/gosnappi/pattern_flow_ipv6_flow_label.go new file mode 100644 index 00000000..921c0927 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_flow_label.go @@ -0,0 +1,719 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6FlowLabel ***** +type patternFlowIpv6FlowLabel struct { + validation + obj *otg.PatternFlowIpv6FlowLabel + marshaller marshalPatternFlowIpv6FlowLabel + unMarshaller unMarshalPatternFlowIpv6FlowLabel + incrementHolder PatternFlowIpv6FlowLabelCounter + decrementHolder PatternFlowIpv6FlowLabelCounter + metricTagsHolder PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter + randomHolder PatternFlowIpv6FlowLabelRandom +} + +func NewPatternFlowIpv6FlowLabel() PatternFlowIpv6FlowLabel { + obj := patternFlowIpv6FlowLabel{obj: &otg.PatternFlowIpv6FlowLabel{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6FlowLabel) msg() *otg.PatternFlowIpv6FlowLabel { + return obj.obj +} + +func (obj *patternFlowIpv6FlowLabel) setMsg(msg *otg.PatternFlowIpv6FlowLabel) PatternFlowIpv6FlowLabel { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6FlowLabel struct { + obj *patternFlowIpv6FlowLabel +} + +type marshalPatternFlowIpv6FlowLabel interface { + // ToProto marshals PatternFlowIpv6FlowLabel to protobuf object *otg.PatternFlowIpv6FlowLabel + ToProto() (*otg.PatternFlowIpv6FlowLabel, error) + // ToPbText marshals PatternFlowIpv6FlowLabel to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6FlowLabel to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6FlowLabel to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6FlowLabel struct { + obj *patternFlowIpv6FlowLabel +} + +type unMarshalPatternFlowIpv6FlowLabel interface { + // FromProto unmarshals PatternFlowIpv6FlowLabel from protobuf object *otg.PatternFlowIpv6FlowLabel + FromProto(msg *otg.PatternFlowIpv6FlowLabel) (PatternFlowIpv6FlowLabel, error) + // FromPbText unmarshals PatternFlowIpv6FlowLabel from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6FlowLabel from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6FlowLabel from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6FlowLabel) Marshal() marshalPatternFlowIpv6FlowLabel { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6FlowLabel{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6FlowLabel) Unmarshal() unMarshalPatternFlowIpv6FlowLabel { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6FlowLabel{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6FlowLabel) ToProto() (*otg.PatternFlowIpv6FlowLabel, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabel) FromProto(msg *otg.PatternFlowIpv6FlowLabel) (PatternFlowIpv6FlowLabel, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6FlowLabel) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabel) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6FlowLabel) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabel) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6FlowLabel) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabel) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6FlowLabel) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6FlowLabel) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6FlowLabel) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6FlowLabel) Clone() (PatternFlowIpv6FlowLabel, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6FlowLabel() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv6FlowLabel) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.randomHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv6FlowLabel is flow label +type PatternFlowIpv6FlowLabel interface { + Validation + // msg marshals PatternFlowIpv6FlowLabel to protobuf object *otg.PatternFlowIpv6FlowLabel + // and doesn't set defaults + msg() *otg.PatternFlowIpv6FlowLabel + // setMsg unmarshals PatternFlowIpv6FlowLabel from protobuf object *otg.PatternFlowIpv6FlowLabel + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6FlowLabel) PatternFlowIpv6FlowLabel + // provides marshal interface + Marshal() marshalPatternFlowIpv6FlowLabel + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6FlowLabel + // validate validates PatternFlowIpv6FlowLabel + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6FlowLabel, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv6FlowLabelChoiceEnum, set in PatternFlowIpv6FlowLabel + Choice() PatternFlowIpv6FlowLabelChoiceEnum + // setChoice assigns PatternFlowIpv6FlowLabelChoiceEnum provided by user to PatternFlowIpv6FlowLabel + setChoice(value PatternFlowIpv6FlowLabelChoiceEnum) PatternFlowIpv6FlowLabel + // HasChoice checks if Choice has been set in PatternFlowIpv6FlowLabel + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv6FlowLabel. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv6FlowLabel + SetValue(value uint32) PatternFlowIpv6FlowLabel + // HasValue checks if Value has been set in PatternFlowIpv6FlowLabel + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv6FlowLabel. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv6FlowLabel + SetValues(value []uint32) PatternFlowIpv6FlowLabel + // Increment returns PatternFlowIpv6FlowLabelCounter, set in PatternFlowIpv6FlowLabel. + // PatternFlowIpv6FlowLabelCounter is integer counter pattern + Increment() PatternFlowIpv6FlowLabelCounter + // SetIncrement assigns PatternFlowIpv6FlowLabelCounter provided by user to PatternFlowIpv6FlowLabel. + // PatternFlowIpv6FlowLabelCounter is integer counter pattern + SetIncrement(value PatternFlowIpv6FlowLabelCounter) PatternFlowIpv6FlowLabel + // HasIncrement checks if Increment has been set in PatternFlowIpv6FlowLabel + HasIncrement() bool + // Decrement returns PatternFlowIpv6FlowLabelCounter, set in PatternFlowIpv6FlowLabel. + // PatternFlowIpv6FlowLabelCounter is integer counter pattern + Decrement() PatternFlowIpv6FlowLabelCounter + // SetDecrement assigns PatternFlowIpv6FlowLabelCounter provided by user to PatternFlowIpv6FlowLabel. + // PatternFlowIpv6FlowLabelCounter is integer counter pattern + SetDecrement(value PatternFlowIpv6FlowLabelCounter) PatternFlowIpv6FlowLabel + // HasDecrement checks if Decrement has been set in PatternFlowIpv6FlowLabel + HasDecrement() bool + // MetricTags returns PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIterIter, set in PatternFlowIpv6FlowLabel + MetricTags() PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter + // Random returns PatternFlowIpv6FlowLabelRandom, set in PatternFlowIpv6FlowLabel. + // PatternFlowIpv6FlowLabelRandom is integer random pattern + Random() PatternFlowIpv6FlowLabelRandom + // SetRandom assigns PatternFlowIpv6FlowLabelRandom provided by user to PatternFlowIpv6FlowLabel. + // PatternFlowIpv6FlowLabelRandom is integer random pattern + SetRandom(value PatternFlowIpv6FlowLabelRandom) PatternFlowIpv6FlowLabel + // HasRandom checks if Random has been set in PatternFlowIpv6FlowLabel + HasRandom() bool + setNil() +} + +type PatternFlowIpv6FlowLabelChoiceEnum string + +// Enum of Choice on PatternFlowIpv6FlowLabel +var PatternFlowIpv6FlowLabelChoice = struct { + VALUE PatternFlowIpv6FlowLabelChoiceEnum + VALUES PatternFlowIpv6FlowLabelChoiceEnum + INCREMENT PatternFlowIpv6FlowLabelChoiceEnum + DECREMENT PatternFlowIpv6FlowLabelChoiceEnum + RANDOM PatternFlowIpv6FlowLabelChoiceEnum +}{ + VALUE: PatternFlowIpv6FlowLabelChoiceEnum("value"), + VALUES: PatternFlowIpv6FlowLabelChoiceEnum("values"), + INCREMENT: PatternFlowIpv6FlowLabelChoiceEnum("increment"), + DECREMENT: PatternFlowIpv6FlowLabelChoiceEnum("decrement"), + RANDOM: PatternFlowIpv6FlowLabelChoiceEnum("random"), +} + +func (obj *patternFlowIpv6FlowLabel) Choice() PatternFlowIpv6FlowLabelChoiceEnum { + return PatternFlowIpv6FlowLabelChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv6FlowLabel) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv6FlowLabel) setChoice(value PatternFlowIpv6FlowLabelChoiceEnum) PatternFlowIpv6FlowLabel { + intValue, ok := otg.PatternFlowIpv6FlowLabel_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv6FlowLabelChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv6FlowLabel_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Random = nil + obj.randomHolder = nil + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv6FlowLabelChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv6FlowLabelChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv6FlowLabelChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv6FlowLabelCounter().msg() + } + + if value == PatternFlowIpv6FlowLabelChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv6FlowLabelCounter().msg() + } + + if value == PatternFlowIpv6FlowLabelChoice.RANDOM { + obj.obj.Random = NewPatternFlowIpv6FlowLabelRandom().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv6FlowLabel) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv6FlowLabelChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv6FlowLabel) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv6FlowLabel object +func (obj *patternFlowIpv6FlowLabel) SetValue(value uint32) PatternFlowIpv6FlowLabel { + obj.setChoice(PatternFlowIpv6FlowLabelChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv6FlowLabel) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv6FlowLabel object +func (obj *patternFlowIpv6FlowLabel) SetValues(value []uint32) PatternFlowIpv6FlowLabel { + obj.setChoice(PatternFlowIpv6FlowLabelChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv6FlowLabelCounter +func (obj *patternFlowIpv6FlowLabel) Increment() PatternFlowIpv6FlowLabelCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv6FlowLabelChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv6FlowLabelCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv6FlowLabelCounter +func (obj *patternFlowIpv6FlowLabel) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv6FlowLabelCounter value in the PatternFlowIpv6FlowLabel object +func (obj *patternFlowIpv6FlowLabel) SetIncrement(value PatternFlowIpv6FlowLabelCounter) PatternFlowIpv6FlowLabel { + obj.setChoice(PatternFlowIpv6FlowLabelChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv6FlowLabelCounter +func (obj *patternFlowIpv6FlowLabel) Decrement() PatternFlowIpv6FlowLabelCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv6FlowLabelChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv6FlowLabelCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv6FlowLabelCounter +func (obj *patternFlowIpv6FlowLabel) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv6FlowLabelCounter value in the PatternFlowIpv6FlowLabel object +func (obj *patternFlowIpv6FlowLabel) SetDecrement(value PatternFlowIpv6FlowLabelCounter) PatternFlowIpv6FlowLabel { + obj.setChoice(PatternFlowIpv6FlowLabelChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv6FlowLabelMetricTag +func (obj *patternFlowIpv6FlowLabel) MetricTags() PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv6FlowLabelMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter struct { + obj *patternFlowIpv6FlowLabel + patternFlowIpv6FlowLabelMetricTagSlice []PatternFlowIpv6FlowLabelMetricTag + fieldPtr *[]*otg.PatternFlowIpv6FlowLabelMetricTag +} + +func newPatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter(ptr *[]*otg.PatternFlowIpv6FlowLabelMetricTag) PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter { + return &patternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter interface { + setMsg(*patternFlowIpv6FlowLabel) PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter + Items() []PatternFlowIpv6FlowLabelMetricTag + Add() PatternFlowIpv6FlowLabelMetricTag + Append(items ...PatternFlowIpv6FlowLabelMetricTag) PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter + Set(index int, newObj PatternFlowIpv6FlowLabelMetricTag) PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter + Clear() PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter + clearHolderSlice() PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter + appendHolderSlice(item PatternFlowIpv6FlowLabelMetricTag) PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter +} + +func (obj *patternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter) setMsg(msg *patternFlowIpv6FlowLabel) PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv6FlowLabelMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter) Items() []PatternFlowIpv6FlowLabelMetricTag { + return obj.patternFlowIpv6FlowLabelMetricTagSlice +} + +func (obj *patternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter) Add() PatternFlowIpv6FlowLabelMetricTag { + newObj := &otg.PatternFlowIpv6FlowLabelMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv6FlowLabelMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv6FlowLabelMetricTagSlice = append(obj.patternFlowIpv6FlowLabelMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter) Append(items ...PatternFlowIpv6FlowLabelMetricTag) PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv6FlowLabelMetricTagSlice = append(obj.patternFlowIpv6FlowLabelMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter) Set(index int, newObj PatternFlowIpv6FlowLabelMetricTag) PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv6FlowLabelMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter) Clear() PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv6FlowLabelMetricTag{} + obj.patternFlowIpv6FlowLabelMetricTagSlice = []PatternFlowIpv6FlowLabelMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter) clearHolderSlice() PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter { + if len(obj.patternFlowIpv6FlowLabelMetricTagSlice) > 0 { + obj.patternFlowIpv6FlowLabelMetricTagSlice = []PatternFlowIpv6FlowLabelMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter) appendHolderSlice(item PatternFlowIpv6FlowLabelMetricTag) PatternFlowIpv6FlowLabelPatternFlowIpv6FlowLabelMetricTagIter { + obj.patternFlowIpv6FlowLabelMetricTagSlice = append(obj.patternFlowIpv6FlowLabelMetricTagSlice, item) + return obj +} + +// description is TBD +// Random returns a PatternFlowIpv6FlowLabelRandom +func (obj *patternFlowIpv6FlowLabel) Random() PatternFlowIpv6FlowLabelRandom { + if obj.obj.Random == nil { + obj.setChoice(PatternFlowIpv6FlowLabelChoice.RANDOM) + } + if obj.randomHolder == nil { + obj.randomHolder = &patternFlowIpv6FlowLabelRandom{obj: obj.obj.Random} + } + return obj.randomHolder +} + +// description is TBD +// Random returns a PatternFlowIpv6FlowLabelRandom +func (obj *patternFlowIpv6FlowLabel) HasRandom() bool { + return obj.obj.Random != nil +} + +// description is TBD +// SetRandom sets the PatternFlowIpv6FlowLabelRandom value in the PatternFlowIpv6FlowLabel object +func (obj *patternFlowIpv6FlowLabel) SetRandom(value PatternFlowIpv6FlowLabelRandom) PatternFlowIpv6FlowLabel { + obj.setChoice(PatternFlowIpv6FlowLabelChoice.RANDOM) + obj.randomHolder = nil + obj.obj.Random = value.msg() + + return obj +} + +func (obj *patternFlowIpv6FlowLabel) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6FlowLabel.Value <= 1048575 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv6FlowLabel.Values <= 1048575 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv6FlowLabelMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Random != nil { + + obj.Random().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowIpv6FlowLabel) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv6FlowLabelChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv6FlowLabelChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv6FlowLabelChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv6FlowLabelChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv6FlowLabelChoice.DECREMENT + } + + if obj.obj.Random != nil { + choices_set += 1 + choice = PatternFlowIpv6FlowLabelChoice.RANDOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv6FlowLabelChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv6FlowLabel") + } + } else { + intVal := otg.PatternFlowIpv6FlowLabel_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv6FlowLabel_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv6_flow_label_counter.go b/gosnappi/pattern_flow_ipv6_flow_label_counter.go new file mode 100644 index 00000000..f1f8788a --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_flow_label_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6FlowLabelCounter ***** +type patternFlowIpv6FlowLabelCounter struct { + validation + obj *otg.PatternFlowIpv6FlowLabelCounter + marshaller marshalPatternFlowIpv6FlowLabelCounter + unMarshaller unMarshalPatternFlowIpv6FlowLabelCounter +} + +func NewPatternFlowIpv6FlowLabelCounter() PatternFlowIpv6FlowLabelCounter { + obj := patternFlowIpv6FlowLabelCounter{obj: &otg.PatternFlowIpv6FlowLabelCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6FlowLabelCounter) msg() *otg.PatternFlowIpv6FlowLabelCounter { + return obj.obj +} + +func (obj *patternFlowIpv6FlowLabelCounter) setMsg(msg *otg.PatternFlowIpv6FlowLabelCounter) PatternFlowIpv6FlowLabelCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6FlowLabelCounter struct { + obj *patternFlowIpv6FlowLabelCounter +} + +type marshalPatternFlowIpv6FlowLabelCounter interface { + // ToProto marshals PatternFlowIpv6FlowLabelCounter to protobuf object *otg.PatternFlowIpv6FlowLabelCounter + ToProto() (*otg.PatternFlowIpv6FlowLabelCounter, error) + // ToPbText marshals PatternFlowIpv6FlowLabelCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6FlowLabelCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6FlowLabelCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6FlowLabelCounter struct { + obj *patternFlowIpv6FlowLabelCounter +} + +type unMarshalPatternFlowIpv6FlowLabelCounter interface { + // FromProto unmarshals PatternFlowIpv6FlowLabelCounter from protobuf object *otg.PatternFlowIpv6FlowLabelCounter + FromProto(msg *otg.PatternFlowIpv6FlowLabelCounter) (PatternFlowIpv6FlowLabelCounter, error) + // FromPbText unmarshals PatternFlowIpv6FlowLabelCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6FlowLabelCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6FlowLabelCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6FlowLabelCounter) Marshal() marshalPatternFlowIpv6FlowLabelCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6FlowLabelCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6FlowLabelCounter) Unmarshal() unMarshalPatternFlowIpv6FlowLabelCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6FlowLabelCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6FlowLabelCounter) ToProto() (*otg.PatternFlowIpv6FlowLabelCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabelCounter) FromProto(msg *otg.PatternFlowIpv6FlowLabelCounter) (PatternFlowIpv6FlowLabelCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6FlowLabelCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabelCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6FlowLabelCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabelCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6FlowLabelCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabelCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6FlowLabelCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6FlowLabelCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6FlowLabelCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6FlowLabelCounter) Clone() (PatternFlowIpv6FlowLabelCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6FlowLabelCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6FlowLabelCounter is integer counter pattern +type PatternFlowIpv6FlowLabelCounter interface { + Validation + // msg marshals PatternFlowIpv6FlowLabelCounter to protobuf object *otg.PatternFlowIpv6FlowLabelCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv6FlowLabelCounter + // setMsg unmarshals PatternFlowIpv6FlowLabelCounter from protobuf object *otg.PatternFlowIpv6FlowLabelCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6FlowLabelCounter) PatternFlowIpv6FlowLabelCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv6FlowLabelCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6FlowLabelCounter + // validate validates PatternFlowIpv6FlowLabelCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6FlowLabelCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv6FlowLabelCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv6FlowLabelCounter + SetStart(value uint32) PatternFlowIpv6FlowLabelCounter + // HasStart checks if Start has been set in PatternFlowIpv6FlowLabelCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv6FlowLabelCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv6FlowLabelCounter + SetStep(value uint32) PatternFlowIpv6FlowLabelCounter + // HasStep checks if Step has been set in PatternFlowIpv6FlowLabelCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv6FlowLabelCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv6FlowLabelCounter + SetCount(value uint32) PatternFlowIpv6FlowLabelCounter + // HasCount checks if Count has been set in PatternFlowIpv6FlowLabelCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv6FlowLabelCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv6FlowLabelCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv6FlowLabelCounter object +func (obj *patternFlowIpv6FlowLabelCounter) SetStart(value uint32) PatternFlowIpv6FlowLabelCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv6FlowLabelCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv6FlowLabelCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv6FlowLabelCounter object +func (obj *patternFlowIpv6FlowLabelCounter) SetStep(value uint32) PatternFlowIpv6FlowLabelCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6FlowLabelCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6FlowLabelCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv6FlowLabelCounter object +func (obj *patternFlowIpv6FlowLabelCounter) SetCount(value uint32) PatternFlowIpv6FlowLabelCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv6FlowLabelCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6FlowLabelCounter.Start <= 1048575 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6FlowLabelCounter.Step <= 1048575 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6FlowLabelCounter.Count <= 1048575 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv6FlowLabelCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_flow_label_metric_tag.go b/gosnappi/pattern_flow_ipv6_flow_label_metric_tag.go new file mode 100644 index 00000000..c2530b64 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_flow_label_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6FlowLabelMetricTag ***** +type patternFlowIpv6FlowLabelMetricTag struct { + validation + obj *otg.PatternFlowIpv6FlowLabelMetricTag + marshaller marshalPatternFlowIpv6FlowLabelMetricTag + unMarshaller unMarshalPatternFlowIpv6FlowLabelMetricTag +} + +func NewPatternFlowIpv6FlowLabelMetricTag() PatternFlowIpv6FlowLabelMetricTag { + obj := patternFlowIpv6FlowLabelMetricTag{obj: &otg.PatternFlowIpv6FlowLabelMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6FlowLabelMetricTag) msg() *otg.PatternFlowIpv6FlowLabelMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv6FlowLabelMetricTag) setMsg(msg *otg.PatternFlowIpv6FlowLabelMetricTag) PatternFlowIpv6FlowLabelMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6FlowLabelMetricTag struct { + obj *patternFlowIpv6FlowLabelMetricTag +} + +type marshalPatternFlowIpv6FlowLabelMetricTag interface { + // ToProto marshals PatternFlowIpv6FlowLabelMetricTag to protobuf object *otg.PatternFlowIpv6FlowLabelMetricTag + ToProto() (*otg.PatternFlowIpv6FlowLabelMetricTag, error) + // ToPbText marshals PatternFlowIpv6FlowLabelMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6FlowLabelMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6FlowLabelMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6FlowLabelMetricTag struct { + obj *patternFlowIpv6FlowLabelMetricTag +} + +type unMarshalPatternFlowIpv6FlowLabelMetricTag interface { + // FromProto unmarshals PatternFlowIpv6FlowLabelMetricTag from protobuf object *otg.PatternFlowIpv6FlowLabelMetricTag + FromProto(msg *otg.PatternFlowIpv6FlowLabelMetricTag) (PatternFlowIpv6FlowLabelMetricTag, error) + // FromPbText unmarshals PatternFlowIpv6FlowLabelMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6FlowLabelMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6FlowLabelMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6FlowLabelMetricTag) Marshal() marshalPatternFlowIpv6FlowLabelMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6FlowLabelMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6FlowLabelMetricTag) Unmarshal() unMarshalPatternFlowIpv6FlowLabelMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6FlowLabelMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6FlowLabelMetricTag) ToProto() (*otg.PatternFlowIpv6FlowLabelMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabelMetricTag) FromProto(msg *otg.PatternFlowIpv6FlowLabelMetricTag) (PatternFlowIpv6FlowLabelMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6FlowLabelMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabelMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6FlowLabelMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabelMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6FlowLabelMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabelMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6FlowLabelMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6FlowLabelMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6FlowLabelMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6FlowLabelMetricTag) Clone() (PatternFlowIpv6FlowLabelMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6FlowLabelMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6FlowLabelMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv6FlowLabelMetricTag interface { + Validation + // msg marshals PatternFlowIpv6FlowLabelMetricTag to protobuf object *otg.PatternFlowIpv6FlowLabelMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv6FlowLabelMetricTag + // setMsg unmarshals PatternFlowIpv6FlowLabelMetricTag from protobuf object *otg.PatternFlowIpv6FlowLabelMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6FlowLabelMetricTag) PatternFlowIpv6FlowLabelMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv6FlowLabelMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6FlowLabelMetricTag + // validate validates PatternFlowIpv6FlowLabelMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6FlowLabelMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv6FlowLabelMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv6FlowLabelMetricTag + SetName(value string) PatternFlowIpv6FlowLabelMetricTag + // Offset returns uint32, set in PatternFlowIpv6FlowLabelMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv6FlowLabelMetricTag + SetOffset(value uint32) PatternFlowIpv6FlowLabelMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv6FlowLabelMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv6FlowLabelMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv6FlowLabelMetricTag + SetLength(value uint32) PatternFlowIpv6FlowLabelMetricTag + // HasLength checks if Length has been set in PatternFlowIpv6FlowLabelMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv6FlowLabelMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv6FlowLabelMetricTag object +func (obj *patternFlowIpv6FlowLabelMetricTag) SetName(value string) PatternFlowIpv6FlowLabelMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6FlowLabelMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6FlowLabelMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv6FlowLabelMetricTag object +func (obj *patternFlowIpv6FlowLabelMetricTag) SetOffset(value uint32) PatternFlowIpv6FlowLabelMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6FlowLabelMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6FlowLabelMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv6FlowLabelMetricTag object +func (obj *patternFlowIpv6FlowLabelMetricTag) SetLength(value uint32) PatternFlowIpv6FlowLabelMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv6FlowLabelMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv6FlowLabelMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 19 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6FlowLabelMetricTag.Offset <= 19 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 20 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv6FlowLabelMetricTag.Length <= 20 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv6FlowLabelMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(20) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_flow_label_random.go b/gosnappi/pattern_flow_ipv6_flow_label_random.go new file mode 100644 index 00000000..4421ea41 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_flow_label_random.go @@ -0,0 +1,422 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6FlowLabelRandom ***** +type patternFlowIpv6FlowLabelRandom struct { + validation + obj *otg.PatternFlowIpv6FlowLabelRandom + marshaller marshalPatternFlowIpv6FlowLabelRandom + unMarshaller unMarshalPatternFlowIpv6FlowLabelRandom +} + +func NewPatternFlowIpv6FlowLabelRandom() PatternFlowIpv6FlowLabelRandom { + obj := patternFlowIpv6FlowLabelRandom{obj: &otg.PatternFlowIpv6FlowLabelRandom{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6FlowLabelRandom) msg() *otg.PatternFlowIpv6FlowLabelRandom { + return obj.obj +} + +func (obj *patternFlowIpv6FlowLabelRandom) setMsg(msg *otg.PatternFlowIpv6FlowLabelRandom) PatternFlowIpv6FlowLabelRandom { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6FlowLabelRandom struct { + obj *patternFlowIpv6FlowLabelRandom +} + +type marshalPatternFlowIpv6FlowLabelRandom interface { + // ToProto marshals PatternFlowIpv6FlowLabelRandom to protobuf object *otg.PatternFlowIpv6FlowLabelRandom + ToProto() (*otg.PatternFlowIpv6FlowLabelRandom, error) + // ToPbText marshals PatternFlowIpv6FlowLabelRandom to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6FlowLabelRandom to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6FlowLabelRandom to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6FlowLabelRandom struct { + obj *patternFlowIpv6FlowLabelRandom +} + +type unMarshalPatternFlowIpv6FlowLabelRandom interface { + // FromProto unmarshals PatternFlowIpv6FlowLabelRandom from protobuf object *otg.PatternFlowIpv6FlowLabelRandom + FromProto(msg *otg.PatternFlowIpv6FlowLabelRandom) (PatternFlowIpv6FlowLabelRandom, error) + // FromPbText unmarshals PatternFlowIpv6FlowLabelRandom from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6FlowLabelRandom from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6FlowLabelRandom from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6FlowLabelRandom) Marshal() marshalPatternFlowIpv6FlowLabelRandom { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6FlowLabelRandom{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6FlowLabelRandom) Unmarshal() unMarshalPatternFlowIpv6FlowLabelRandom { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6FlowLabelRandom{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6FlowLabelRandom) ToProto() (*otg.PatternFlowIpv6FlowLabelRandom, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabelRandom) FromProto(msg *otg.PatternFlowIpv6FlowLabelRandom) (PatternFlowIpv6FlowLabelRandom, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6FlowLabelRandom) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabelRandom) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6FlowLabelRandom) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabelRandom) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6FlowLabelRandom) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6FlowLabelRandom) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6FlowLabelRandom) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6FlowLabelRandom) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6FlowLabelRandom) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6FlowLabelRandom) Clone() (PatternFlowIpv6FlowLabelRandom, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6FlowLabelRandom() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6FlowLabelRandom is integer random pattern +type PatternFlowIpv6FlowLabelRandom interface { + Validation + // msg marshals PatternFlowIpv6FlowLabelRandom to protobuf object *otg.PatternFlowIpv6FlowLabelRandom + // and doesn't set defaults + msg() *otg.PatternFlowIpv6FlowLabelRandom + // setMsg unmarshals PatternFlowIpv6FlowLabelRandom from protobuf object *otg.PatternFlowIpv6FlowLabelRandom + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6FlowLabelRandom) PatternFlowIpv6FlowLabelRandom + // provides marshal interface + Marshal() marshalPatternFlowIpv6FlowLabelRandom + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6FlowLabelRandom + // validate validates PatternFlowIpv6FlowLabelRandom + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6FlowLabelRandom, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Min returns uint32, set in PatternFlowIpv6FlowLabelRandom. + Min() uint32 + // SetMin assigns uint32 provided by user to PatternFlowIpv6FlowLabelRandom + SetMin(value uint32) PatternFlowIpv6FlowLabelRandom + // HasMin checks if Min has been set in PatternFlowIpv6FlowLabelRandom + HasMin() bool + // Max returns uint32, set in PatternFlowIpv6FlowLabelRandom. + Max() uint32 + // SetMax assigns uint32 provided by user to PatternFlowIpv6FlowLabelRandom + SetMax(value uint32) PatternFlowIpv6FlowLabelRandom + // HasMax checks if Max has been set in PatternFlowIpv6FlowLabelRandom + HasMax() bool + // Seed returns uint32, set in PatternFlowIpv6FlowLabelRandom. + Seed() uint32 + // SetSeed assigns uint32 provided by user to PatternFlowIpv6FlowLabelRandom + SetSeed(value uint32) PatternFlowIpv6FlowLabelRandom + // HasSeed checks if Seed has been set in PatternFlowIpv6FlowLabelRandom + HasSeed() bool + // Count returns uint32, set in PatternFlowIpv6FlowLabelRandom. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv6FlowLabelRandom + SetCount(value uint32) PatternFlowIpv6FlowLabelRandom + // HasCount checks if Count has been set in PatternFlowIpv6FlowLabelRandom + HasCount() bool +} + +// The minimum possible value generated by the random value generator. +// Min returns a uint32 +func (obj *patternFlowIpv6FlowLabelRandom) Min() uint32 { + + return *obj.obj.Min + +} + +// The minimum possible value generated by the random value generator. +// Min returns a uint32 +func (obj *patternFlowIpv6FlowLabelRandom) HasMin() bool { + return obj.obj.Min != nil +} + +// The minimum possible value generated by the random value generator. +// SetMin sets the uint32 value in the PatternFlowIpv6FlowLabelRandom object +func (obj *patternFlowIpv6FlowLabelRandom) SetMin(value uint32) PatternFlowIpv6FlowLabelRandom { + + obj.obj.Min = &value + return obj +} + +// The maximum possible value generated by the random value generator. +// Max returns a uint32 +func (obj *patternFlowIpv6FlowLabelRandom) Max() uint32 { + + return *obj.obj.Max + +} + +// The maximum possible value generated by the random value generator. +// Max returns a uint32 +func (obj *patternFlowIpv6FlowLabelRandom) HasMax() bool { + return obj.obj.Max != nil +} + +// The maximum possible value generated by the random value generator. +// SetMax sets the uint32 value in the PatternFlowIpv6FlowLabelRandom object +func (obj *patternFlowIpv6FlowLabelRandom) SetMax(value uint32) PatternFlowIpv6FlowLabelRandom { + + obj.obj.Max = &value + return obj +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// Seed returns a uint32 +func (obj *patternFlowIpv6FlowLabelRandom) Seed() uint32 { + + return *obj.obj.Seed + +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// Seed returns a uint32 +func (obj *patternFlowIpv6FlowLabelRandom) HasSeed() bool { + return obj.obj.Seed != nil +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// SetSeed sets the uint32 value in the PatternFlowIpv6FlowLabelRandom object +func (obj *patternFlowIpv6FlowLabelRandom) SetSeed(value uint32) PatternFlowIpv6FlowLabelRandom { + + obj.obj.Seed = &value + return obj +} + +// The total number of values to be generated by the random value generator. +// Count returns a uint32 +func (obj *patternFlowIpv6FlowLabelRandom) Count() uint32 { + + return *obj.obj.Count + +} + +// The total number of values to be generated by the random value generator. +// Count returns a uint32 +func (obj *patternFlowIpv6FlowLabelRandom) HasCount() bool { + return obj.obj.Count != nil +} + +// The total number of values to be generated by the random value generator. +// SetCount sets the uint32 value in the PatternFlowIpv6FlowLabelRandom object +func (obj *patternFlowIpv6FlowLabelRandom) SetCount(value uint32) PatternFlowIpv6FlowLabelRandom { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv6FlowLabelRandom) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Min != nil { + + if *obj.obj.Min > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6FlowLabelRandom.Min <= 1048575 but Got %d", *obj.obj.Min)) + } + + } + + if obj.obj.Max != nil { + + if *obj.obj.Max > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6FlowLabelRandom.Max <= 1048575 but Got %d", *obj.obj.Max)) + } + + } + +} + +func (obj *patternFlowIpv6FlowLabelRandom) setDefault() { + if obj.obj.Min == nil { + obj.SetMin(0) + } + if obj.obj.Max == nil { + obj.SetMax(1048575) + } + if obj.obj.Seed == nil { + obj.SetSeed(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_hop_limit.go b/gosnappi/pattern_flow_ipv6_hop_limit.go new file mode 100644 index 00000000..e71099b8 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_hop_limit.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6HopLimit ***** +type patternFlowIpv6HopLimit struct { + validation + obj *otg.PatternFlowIpv6HopLimit + marshaller marshalPatternFlowIpv6HopLimit + unMarshaller unMarshalPatternFlowIpv6HopLimit + incrementHolder PatternFlowIpv6HopLimitCounter + decrementHolder PatternFlowIpv6HopLimitCounter + metricTagsHolder PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter +} + +func NewPatternFlowIpv6HopLimit() PatternFlowIpv6HopLimit { + obj := patternFlowIpv6HopLimit{obj: &otg.PatternFlowIpv6HopLimit{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6HopLimit) msg() *otg.PatternFlowIpv6HopLimit { + return obj.obj +} + +func (obj *patternFlowIpv6HopLimit) setMsg(msg *otg.PatternFlowIpv6HopLimit) PatternFlowIpv6HopLimit { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6HopLimit struct { + obj *patternFlowIpv6HopLimit +} + +type marshalPatternFlowIpv6HopLimit interface { + // ToProto marshals PatternFlowIpv6HopLimit to protobuf object *otg.PatternFlowIpv6HopLimit + ToProto() (*otg.PatternFlowIpv6HopLimit, error) + // ToPbText marshals PatternFlowIpv6HopLimit to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6HopLimit to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6HopLimit to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6HopLimit struct { + obj *patternFlowIpv6HopLimit +} + +type unMarshalPatternFlowIpv6HopLimit interface { + // FromProto unmarshals PatternFlowIpv6HopLimit from protobuf object *otg.PatternFlowIpv6HopLimit + FromProto(msg *otg.PatternFlowIpv6HopLimit) (PatternFlowIpv6HopLimit, error) + // FromPbText unmarshals PatternFlowIpv6HopLimit from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6HopLimit from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6HopLimit from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6HopLimit) Marshal() marshalPatternFlowIpv6HopLimit { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6HopLimit{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6HopLimit) Unmarshal() unMarshalPatternFlowIpv6HopLimit { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6HopLimit{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6HopLimit) ToProto() (*otg.PatternFlowIpv6HopLimit, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6HopLimit) FromProto(msg *otg.PatternFlowIpv6HopLimit) (PatternFlowIpv6HopLimit, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6HopLimit) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6HopLimit) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6HopLimit) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6HopLimit) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6HopLimit) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6HopLimit) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6HopLimit) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6HopLimit) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6HopLimit) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6HopLimit) Clone() (PatternFlowIpv6HopLimit, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6HopLimit() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv6HopLimit) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv6HopLimit is hop limit +type PatternFlowIpv6HopLimit interface { + Validation + // msg marshals PatternFlowIpv6HopLimit to protobuf object *otg.PatternFlowIpv6HopLimit + // and doesn't set defaults + msg() *otg.PatternFlowIpv6HopLimit + // setMsg unmarshals PatternFlowIpv6HopLimit from protobuf object *otg.PatternFlowIpv6HopLimit + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6HopLimit) PatternFlowIpv6HopLimit + // provides marshal interface + Marshal() marshalPatternFlowIpv6HopLimit + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6HopLimit + // validate validates PatternFlowIpv6HopLimit + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6HopLimit, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv6HopLimitChoiceEnum, set in PatternFlowIpv6HopLimit + Choice() PatternFlowIpv6HopLimitChoiceEnum + // setChoice assigns PatternFlowIpv6HopLimitChoiceEnum provided by user to PatternFlowIpv6HopLimit + setChoice(value PatternFlowIpv6HopLimitChoiceEnum) PatternFlowIpv6HopLimit + // HasChoice checks if Choice has been set in PatternFlowIpv6HopLimit + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv6HopLimit. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv6HopLimit + SetValue(value uint32) PatternFlowIpv6HopLimit + // HasValue checks if Value has been set in PatternFlowIpv6HopLimit + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv6HopLimit. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv6HopLimit + SetValues(value []uint32) PatternFlowIpv6HopLimit + // Increment returns PatternFlowIpv6HopLimitCounter, set in PatternFlowIpv6HopLimit. + // PatternFlowIpv6HopLimitCounter is integer counter pattern + Increment() PatternFlowIpv6HopLimitCounter + // SetIncrement assigns PatternFlowIpv6HopLimitCounter provided by user to PatternFlowIpv6HopLimit. + // PatternFlowIpv6HopLimitCounter is integer counter pattern + SetIncrement(value PatternFlowIpv6HopLimitCounter) PatternFlowIpv6HopLimit + // HasIncrement checks if Increment has been set in PatternFlowIpv6HopLimit + HasIncrement() bool + // Decrement returns PatternFlowIpv6HopLimitCounter, set in PatternFlowIpv6HopLimit. + // PatternFlowIpv6HopLimitCounter is integer counter pattern + Decrement() PatternFlowIpv6HopLimitCounter + // SetDecrement assigns PatternFlowIpv6HopLimitCounter provided by user to PatternFlowIpv6HopLimit. + // PatternFlowIpv6HopLimitCounter is integer counter pattern + SetDecrement(value PatternFlowIpv6HopLimitCounter) PatternFlowIpv6HopLimit + // HasDecrement checks if Decrement has been set in PatternFlowIpv6HopLimit + HasDecrement() bool + // MetricTags returns PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIterIter, set in PatternFlowIpv6HopLimit + MetricTags() PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter + setNil() +} + +type PatternFlowIpv6HopLimitChoiceEnum string + +// Enum of Choice on PatternFlowIpv6HopLimit +var PatternFlowIpv6HopLimitChoice = struct { + VALUE PatternFlowIpv6HopLimitChoiceEnum + VALUES PatternFlowIpv6HopLimitChoiceEnum + INCREMENT PatternFlowIpv6HopLimitChoiceEnum + DECREMENT PatternFlowIpv6HopLimitChoiceEnum +}{ + VALUE: PatternFlowIpv6HopLimitChoiceEnum("value"), + VALUES: PatternFlowIpv6HopLimitChoiceEnum("values"), + INCREMENT: PatternFlowIpv6HopLimitChoiceEnum("increment"), + DECREMENT: PatternFlowIpv6HopLimitChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv6HopLimit) Choice() PatternFlowIpv6HopLimitChoiceEnum { + return PatternFlowIpv6HopLimitChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv6HopLimit) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv6HopLimit) setChoice(value PatternFlowIpv6HopLimitChoiceEnum) PatternFlowIpv6HopLimit { + intValue, ok := otg.PatternFlowIpv6HopLimit_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv6HopLimitChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv6HopLimit_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv6HopLimitChoice.VALUE { + defaultValue := uint32(64) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv6HopLimitChoice.VALUES { + defaultValue := []uint32{64} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv6HopLimitChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv6HopLimitCounter().msg() + } + + if value == PatternFlowIpv6HopLimitChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv6HopLimitCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv6HopLimit) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv6HopLimitChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv6HopLimit) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv6HopLimit object +func (obj *patternFlowIpv6HopLimit) SetValue(value uint32) PatternFlowIpv6HopLimit { + obj.setChoice(PatternFlowIpv6HopLimitChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv6HopLimit) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{64}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv6HopLimit object +func (obj *patternFlowIpv6HopLimit) SetValues(value []uint32) PatternFlowIpv6HopLimit { + obj.setChoice(PatternFlowIpv6HopLimitChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv6HopLimitCounter +func (obj *patternFlowIpv6HopLimit) Increment() PatternFlowIpv6HopLimitCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv6HopLimitChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv6HopLimitCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv6HopLimitCounter +func (obj *patternFlowIpv6HopLimit) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv6HopLimitCounter value in the PatternFlowIpv6HopLimit object +func (obj *patternFlowIpv6HopLimit) SetIncrement(value PatternFlowIpv6HopLimitCounter) PatternFlowIpv6HopLimit { + obj.setChoice(PatternFlowIpv6HopLimitChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv6HopLimitCounter +func (obj *patternFlowIpv6HopLimit) Decrement() PatternFlowIpv6HopLimitCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv6HopLimitChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv6HopLimitCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv6HopLimitCounter +func (obj *patternFlowIpv6HopLimit) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv6HopLimitCounter value in the PatternFlowIpv6HopLimit object +func (obj *patternFlowIpv6HopLimit) SetDecrement(value PatternFlowIpv6HopLimitCounter) PatternFlowIpv6HopLimit { + obj.setChoice(PatternFlowIpv6HopLimitChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv6HopLimitMetricTag +func (obj *patternFlowIpv6HopLimit) MetricTags() PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv6HopLimitMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter struct { + obj *patternFlowIpv6HopLimit + patternFlowIpv6HopLimitMetricTagSlice []PatternFlowIpv6HopLimitMetricTag + fieldPtr *[]*otg.PatternFlowIpv6HopLimitMetricTag +} + +func newPatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter(ptr *[]*otg.PatternFlowIpv6HopLimitMetricTag) PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter { + return &patternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter interface { + setMsg(*patternFlowIpv6HopLimit) PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter + Items() []PatternFlowIpv6HopLimitMetricTag + Add() PatternFlowIpv6HopLimitMetricTag + Append(items ...PatternFlowIpv6HopLimitMetricTag) PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter + Set(index int, newObj PatternFlowIpv6HopLimitMetricTag) PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter + Clear() PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter + clearHolderSlice() PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter + appendHolderSlice(item PatternFlowIpv6HopLimitMetricTag) PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter +} + +func (obj *patternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter) setMsg(msg *patternFlowIpv6HopLimit) PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv6HopLimitMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter) Items() []PatternFlowIpv6HopLimitMetricTag { + return obj.patternFlowIpv6HopLimitMetricTagSlice +} + +func (obj *patternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter) Add() PatternFlowIpv6HopLimitMetricTag { + newObj := &otg.PatternFlowIpv6HopLimitMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv6HopLimitMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv6HopLimitMetricTagSlice = append(obj.patternFlowIpv6HopLimitMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter) Append(items ...PatternFlowIpv6HopLimitMetricTag) PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv6HopLimitMetricTagSlice = append(obj.patternFlowIpv6HopLimitMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter) Set(index int, newObj PatternFlowIpv6HopLimitMetricTag) PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv6HopLimitMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter) Clear() PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv6HopLimitMetricTag{} + obj.patternFlowIpv6HopLimitMetricTagSlice = []PatternFlowIpv6HopLimitMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter) clearHolderSlice() PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter { + if len(obj.patternFlowIpv6HopLimitMetricTagSlice) > 0 { + obj.patternFlowIpv6HopLimitMetricTagSlice = []PatternFlowIpv6HopLimitMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter) appendHolderSlice(item PatternFlowIpv6HopLimitMetricTag) PatternFlowIpv6HopLimitPatternFlowIpv6HopLimitMetricTagIter { + obj.patternFlowIpv6HopLimitMetricTagSlice = append(obj.patternFlowIpv6HopLimitMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv6HopLimit) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6HopLimit.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv6HopLimit.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv6HopLimitMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv6HopLimit) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv6HopLimitChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv6HopLimitChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv6HopLimitChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv6HopLimitChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv6HopLimitChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv6HopLimitChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv6HopLimit") + } + } else { + intVal := otg.PatternFlowIpv6HopLimit_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv6HopLimit_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv6_hop_limit_counter.go b/gosnappi/pattern_flow_ipv6_hop_limit_counter.go new file mode 100644 index 00000000..351d9ad5 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_hop_limit_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6HopLimitCounter ***** +type patternFlowIpv6HopLimitCounter struct { + validation + obj *otg.PatternFlowIpv6HopLimitCounter + marshaller marshalPatternFlowIpv6HopLimitCounter + unMarshaller unMarshalPatternFlowIpv6HopLimitCounter +} + +func NewPatternFlowIpv6HopLimitCounter() PatternFlowIpv6HopLimitCounter { + obj := patternFlowIpv6HopLimitCounter{obj: &otg.PatternFlowIpv6HopLimitCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6HopLimitCounter) msg() *otg.PatternFlowIpv6HopLimitCounter { + return obj.obj +} + +func (obj *patternFlowIpv6HopLimitCounter) setMsg(msg *otg.PatternFlowIpv6HopLimitCounter) PatternFlowIpv6HopLimitCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6HopLimitCounter struct { + obj *patternFlowIpv6HopLimitCounter +} + +type marshalPatternFlowIpv6HopLimitCounter interface { + // ToProto marshals PatternFlowIpv6HopLimitCounter to protobuf object *otg.PatternFlowIpv6HopLimitCounter + ToProto() (*otg.PatternFlowIpv6HopLimitCounter, error) + // ToPbText marshals PatternFlowIpv6HopLimitCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6HopLimitCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6HopLimitCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6HopLimitCounter struct { + obj *patternFlowIpv6HopLimitCounter +} + +type unMarshalPatternFlowIpv6HopLimitCounter interface { + // FromProto unmarshals PatternFlowIpv6HopLimitCounter from protobuf object *otg.PatternFlowIpv6HopLimitCounter + FromProto(msg *otg.PatternFlowIpv6HopLimitCounter) (PatternFlowIpv6HopLimitCounter, error) + // FromPbText unmarshals PatternFlowIpv6HopLimitCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6HopLimitCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6HopLimitCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6HopLimitCounter) Marshal() marshalPatternFlowIpv6HopLimitCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6HopLimitCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6HopLimitCounter) Unmarshal() unMarshalPatternFlowIpv6HopLimitCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6HopLimitCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6HopLimitCounter) ToProto() (*otg.PatternFlowIpv6HopLimitCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6HopLimitCounter) FromProto(msg *otg.PatternFlowIpv6HopLimitCounter) (PatternFlowIpv6HopLimitCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6HopLimitCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6HopLimitCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6HopLimitCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6HopLimitCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6HopLimitCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6HopLimitCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6HopLimitCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6HopLimitCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6HopLimitCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6HopLimitCounter) Clone() (PatternFlowIpv6HopLimitCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6HopLimitCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6HopLimitCounter is integer counter pattern +type PatternFlowIpv6HopLimitCounter interface { + Validation + // msg marshals PatternFlowIpv6HopLimitCounter to protobuf object *otg.PatternFlowIpv6HopLimitCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv6HopLimitCounter + // setMsg unmarshals PatternFlowIpv6HopLimitCounter from protobuf object *otg.PatternFlowIpv6HopLimitCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6HopLimitCounter) PatternFlowIpv6HopLimitCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv6HopLimitCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6HopLimitCounter + // validate validates PatternFlowIpv6HopLimitCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6HopLimitCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv6HopLimitCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv6HopLimitCounter + SetStart(value uint32) PatternFlowIpv6HopLimitCounter + // HasStart checks if Start has been set in PatternFlowIpv6HopLimitCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv6HopLimitCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv6HopLimitCounter + SetStep(value uint32) PatternFlowIpv6HopLimitCounter + // HasStep checks if Step has been set in PatternFlowIpv6HopLimitCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv6HopLimitCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv6HopLimitCounter + SetCount(value uint32) PatternFlowIpv6HopLimitCounter + // HasCount checks if Count has been set in PatternFlowIpv6HopLimitCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv6HopLimitCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv6HopLimitCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv6HopLimitCounter object +func (obj *patternFlowIpv6HopLimitCounter) SetStart(value uint32) PatternFlowIpv6HopLimitCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv6HopLimitCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv6HopLimitCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv6HopLimitCounter object +func (obj *patternFlowIpv6HopLimitCounter) SetStep(value uint32) PatternFlowIpv6HopLimitCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6HopLimitCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6HopLimitCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv6HopLimitCounter object +func (obj *patternFlowIpv6HopLimitCounter) SetCount(value uint32) PatternFlowIpv6HopLimitCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv6HopLimitCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6HopLimitCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6HopLimitCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6HopLimitCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv6HopLimitCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(64) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_hop_limit_metric_tag.go b/gosnappi/pattern_flow_ipv6_hop_limit_metric_tag.go new file mode 100644 index 00000000..b1d8a9d0 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_hop_limit_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6HopLimitMetricTag ***** +type patternFlowIpv6HopLimitMetricTag struct { + validation + obj *otg.PatternFlowIpv6HopLimitMetricTag + marshaller marshalPatternFlowIpv6HopLimitMetricTag + unMarshaller unMarshalPatternFlowIpv6HopLimitMetricTag +} + +func NewPatternFlowIpv6HopLimitMetricTag() PatternFlowIpv6HopLimitMetricTag { + obj := patternFlowIpv6HopLimitMetricTag{obj: &otg.PatternFlowIpv6HopLimitMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6HopLimitMetricTag) msg() *otg.PatternFlowIpv6HopLimitMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv6HopLimitMetricTag) setMsg(msg *otg.PatternFlowIpv6HopLimitMetricTag) PatternFlowIpv6HopLimitMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6HopLimitMetricTag struct { + obj *patternFlowIpv6HopLimitMetricTag +} + +type marshalPatternFlowIpv6HopLimitMetricTag interface { + // ToProto marshals PatternFlowIpv6HopLimitMetricTag to protobuf object *otg.PatternFlowIpv6HopLimitMetricTag + ToProto() (*otg.PatternFlowIpv6HopLimitMetricTag, error) + // ToPbText marshals PatternFlowIpv6HopLimitMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6HopLimitMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6HopLimitMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6HopLimitMetricTag struct { + obj *patternFlowIpv6HopLimitMetricTag +} + +type unMarshalPatternFlowIpv6HopLimitMetricTag interface { + // FromProto unmarshals PatternFlowIpv6HopLimitMetricTag from protobuf object *otg.PatternFlowIpv6HopLimitMetricTag + FromProto(msg *otg.PatternFlowIpv6HopLimitMetricTag) (PatternFlowIpv6HopLimitMetricTag, error) + // FromPbText unmarshals PatternFlowIpv6HopLimitMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6HopLimitMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6HopLimitMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6HopLimitMetricTag) Marshal() marshalPatternFlowIpv6HopLimitMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6HopLimitMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6HopLimitMetricTag) Unmarshal() unMarshalPatternFlowIpv6HopLimitMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6HopLimitMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6HopLimitMetricTag) ToProto() (*otg.PatternFlowIpv6HopLimitMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6HopLimitMetricTag) FromProto(msg *otg.PatternFlowIpv6HopLimitMetricTag) (PatternFlowIpv6HopLimitMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6HopLimitMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6HopLimitMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6HopLimitMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6HopLimitMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6HopLimitMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6HopLimitMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6HopLimitMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6HopLimitMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6HopLimitMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6HopLimitMetricTag) Clone() (PatternFlowIpv6HopLimitMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6HopLimitMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6HopLimitMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv6HopLimitMetricTag interface { + Validation + // msg marshals PatternFlowIpv6HopLimitMetricTag to protobuf object *otg.PatternFlowIpv6HopLimitMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv6HopLimitMetricTag + // setMsg unmarshals PatternFlowIpv6HopLimitMetricTag from protobuf object *otg.PatternFlowIpv6HopLimitMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6HopLimitMetricTag) PatternFlowIpv6HopLimitMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv6HopLimitMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6HopLimitMetricTag + // validate validates PatternFlowIpv6HopLimitMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6HopLimitMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv6HopLimitMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv6HopLimitMetricTag + SetName(value string) PatternFlowIpv6HopLimitMetricTag + // Offset returns uint32, set in PatternFlowIpv6HopLimitMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv6HopLimitMetricTag + SetOffset(value uint32) PatternFlowIpv6HopLimitMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv6HopLimitMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv6HopLimitMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv6HopLimitMetricTag + SetLength(value uint32) PatternFlowIpv6HopLimitMetricTag + // HasLength checks if Length has been set in PatternFlowIpv6HopLimitMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv6HopLimitMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv6HopLimitMetricTag object +func (obj *patternFlowIpv6HopLimitMetricTag) SetName(value string) PatternFlowIpv6HopLimitMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6HopLimitMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6HopLimitMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv6HopLimitMetricTag object +func (obj *patternFlowIpv6HopLimitMetricTag) SetOffset(value uint32) PatternFlowIpv6HopLimitMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6HopLimitMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6HopLimitMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv6HopLimitMetricTag object +func (obj *patternFlowIpv6HopLimitMetricTag) SetLength(value uint32) PatternFlowIpv6HopLimitMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv6HopLimitMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv6HopLimitMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6HopLimitMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv6HopLimitMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv6HopLimitMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_next_header.go b/gosnappi/pattern_flow_ipv6_next_header.go new file mode 100644 index 00000000..16289e7c --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_next_header.go @@ -0,0 +1,712 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6NextHeader ***** +type patternFlowIpv6NextHeader struct { + validation + obj *otg.PatternFlowIpv6NextHeader + marshaller marshalPatternFlowIpv6NextHeader + unMarshaller unMarshalPatternFlowIpv6NextHeader + incrementHolder PatternFlowIpv6NextHeaderCounter + decrementHolder PatternFlowIpv6NextHeaderCounter + metricTagsHolder PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter +} + +func NewPatternFlowIpv6NextHeader() PatternFlowIpv6NextHeader { + obj := patternFlowIpv6NextHeader{obj: &otg.PatternFlowIpv6NextHeader{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6NextHeader) msg() *otg.PatternFlowIpv6NextHeader { + return obj.obj +} + +func (obj *patternFlowIpv6NextHeader) setMsg(msg *otg.PatternFlowIpv6NextHeader) PatternFlowIpv6NextHeader { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6NextHeader struct { + obj *patternFlowIpv6NextHeader +} + +type marshalPatternFlowIpv6NextHeader interface { + // ToProto marshals PatternFlowIpv6NextHeader to protobuf object *otg.PatternFlowIpv6NextHeader + ToProto() (*otg.PatternFlowIpv6NextHeader, error) + // ToPbText marshals PatternFlowIpv6NextHeader to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6NextHeader to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6NextHeader to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6NextHeader struct { + obj *patternFlowIpv6NextHeader +} + +type unMarshalPatternFlowIpv6NextHeader interface { + // FromProto unmarshals PatternFlowIpv6NextHeader from protobuf object *otg.PatternFlowIpv6NextHeader + FromProto(msg *otg.PatternFlowIpv6NextHeader) (PatternFlowIpv6NextHeader, error) + // FromPbText unmarshals PatternFlowIpv6NextHeader from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6NextHeader from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6NextHeader from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6NextHeader) Marshal() marshalPatternFlowIpv6NextHeader { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6NextHeader{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6NextHeader) Unmarshal() unMarshalPatternFlowIpv6NextHeader { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6NextHeader{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6NextHeader) ToProto() (*otg.PatternFlowIpv6NextHeader, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6NextHeader) FromProto(msg *otg.PatternFlowIpv6NextHeader) (PatternFlowIpv6NextHeader, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6NextHeader) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6NextHeader) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6NextHeader) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6NextHeader) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6NextHeader) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6NextHeader) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6NextHeader) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6NextHeader) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6NextHeader) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6NextHeader) Clone() (PatternFlowIpv6NextHeader, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6NextHeader() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv6NextHeader) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv6NextHeader is next header +type PatternFlowIpv6NextHeader interface { + Validation + // msg marshals PatternFlowIpv6NextHeader to protobuf object *otg.PatternFlowIpv6NextHeader + // and doesn't set defaults + msg() *otg.PatternFlowIpv6NextHeader + // setMsg unmarshals PatternFlowIpv6NextHeader from protobuf object *otg.PatternFlowIpv6NextHeader + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6NextHeader) PatternFlowIpv6NextHeader + // provides marshal interface + Marshal() marshalPatternFlowIpv6NextHeader + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6NextHeader + // validate validates PatternFlowIpv6NextHeader + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6NextHeader, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv6NextHeaderChoiceEnum, set in PatternFlowIpv6NextHeader + Choice() PatternFlowIpv6NextHeaderChoiceEnum + // setChoice assigns PatternFlowIpv6NextHeaderChoiceEnum provided by user to PatternFlowIpv6NextHeader + setChoice(value PatternFlowIpv6NextHeaderChoiceEnum) PatternFlowIpv6NextHeader + // HasChoice checks if Choice has been set in PatternFlowIpv6NextHeader + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv6NextHeader. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv6NextHeader + SetValue(value uint32) PatternFlowIpv6NextHeader + // HasValue checks if Value has been set in PatternFlowIpv6NextHeader + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv6NextHeader. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv6NextHeader + SetValues(value []uint32) PatternFlowIpv6NextHeader + // Auto returns uint32, set in PatternFlowIpv6NextHeader. + Auto() uint32 + // HasAuto checks if Auto has been set in PatternFlowIpv6NextHeader + HasAuto() bool + // Increment returns PatternFlowIpv6NextHeaderCounter, set in PatternFlowIpv6NextHeader. + // PatternFlowIpv6NextHeaderCounter is integer counter pattern + Increment() PatternFlowIpv6NextHeaderCounter + // SetIncrement assigns PatternFlowIpv6NextHeaderCounter provided by user to PatternFlowIpv6NextHeader. + // PatternFlowIpv6NextHeaderCounter is integer counter pattern + SetIncrement(value PatternFlowIpv6NextHeaderCounter) PatternFlowIpv6NextHeader + // HasIncrement checks if Increment has been set in PatternFlowIpv6NextHeader + HasIncrement() bool + // Decrement returns PatternFlowIpv6NextHeaderCounter, set in PatternFlowIpv6NextHeader. + // PatternFlowIpv6NextHeaderCounter is integer counter pattern + Decrement() PatternFlowIpv6NextHeaderCounter + // SetDecrement assigns PatternFlowIpv6NextHeaderCounter provided by user to PatternFlowIpv6NextHeader. + // PatternFlowIpv6NextHeaderCounter is integer counter pattern + SetDecrement(value PatternFlowIpv6NextHeaderCounter) PatternFlowIpv6NextHeader + // HasDecrement checks if Decrement has been set in PatternFlowIpv6NextHeader + HasDecrement() bool + // MetricTags returns PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIterIter, set in PatternFlowIpv6NextHeader + MetricTags() PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter + setNil() +} + +type PatternFlowIpv6NextHeaderChoiceEnum string + +// Enum of Choice on PatternFlowIpv6NextHeader +var PatternFlowIpv6NextHeaderChoice = struct { + VALUE PatternFlowIpv6NextHeaderChoiceEnum + VALUES PatternFlowIpv6NextHeaderChoiceEnum + AUTO PatternFlowIpv6NextHeaderChoiceEnum + INCREMENT PatternFlowIpv6NextHeaderChoiceEnum + DECREMENT PatternFlowIpv6NextHeaderChoiceEnum +}{ + VALUE: PatternFlowIpv6NextHeaderChoiceEnum("value"), + VALUES: PatternFlowIpv6NextHeaderChoiceEnum("values"), + AUTO: PatternFlowIpv6NextHeaderChoiceEnum("auto"), + INCREMENT: PatternFlowIpv6NextHeaderChoiceEnum("increment"), + DECREMENT: PatternFlowIpv6NextHeaderChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv6NextHeader) Choice() PatternFlowIpv6NextHeaderChoiceEnum { + return PatternFlowIpv6NextHeaderChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv6NextHeader) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv6NextHeader) setChoice(value PatternFlowIpv6NextHeaderChoiceEnum) PatternFlowIpv6NextHeader { + intValue, ok := otg.PatternFlowIpv6NextHeader_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv6NextHeaderChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv6NextHeader_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Auto = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv6NextHeaderChoice.VALUE { + defaultValue := uint32(59) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv6NextHeaderChoice.VALUES { + defaultValue := []uint32{59} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv6NextHeaderChoice.AUTO { + defaultValue := uint32(59) + obj.obj.Auto = &defaultValue + } + + if value == PatternFlowIpv6NextHeaderChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv6NextHeaderCounter().msg() + } + + if value == PatternFlowIpv6NextHeaderChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv6NextHeaderCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv6NextHeader) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv6NextHeaderChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv6NextHeader) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv6NextHeader object +func (obj *patternFlowIpv6NextHeader) SetValue(value uint32) PatternFlowIpv6NextHeader { + obj.setChoice(PatternFlowIpv6NextHeaderChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv6NextHeader) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{59}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv6NextHeader object +func (obj *patternFlowIpv6NextHeader) SetValues(value []uint32) PatternFlowIpv6NextHeader { + obj.setChoice(PatternFlowIpv6NextHeaderChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowIpv6NextHeader) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowIpv6NextHeaderChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowIpv6NextHeader) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Increment returns a PatternFlowIpv6NextHeaderCounter +func (obj *patternFlowIpv6NextHeader) Increment() PatternFlowIpv6NextHeaderCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv6NextHeaderChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv6NextHeaderCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv6NextHeaderCounter +func (obj *patternFlowIpv6NextHeader) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv6NextHeaderCounter value in the PatternFlowIpv6NextHeader object +func (obj *patternFlowIpv6NextHeader) SetIncrement(value PatternFlowIpv6NextHeaderCounter) PatternFlowIpv6NextHeader { + obj.setChoice(PatternFlowIpv6NextHeaderChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv6NextHeaderCounter +func (obj *patternFlowIpv6NextHeader) Decrement() PatternFlowIpv6NextHeaderCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv6NextHeaderChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv6NextHeaderCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv6NextHeaderCounter +func (obj *patternFlowIpv6NextHeader) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv6NextHeaderCounter value in the PatternFlowIpv6NextHeader object +func (obj *patternFlowIpv6NextHeader) SetDecrement(value PatternFlowIpv6NextHeaderCounter) PatternFlowIpv6NextHeader { + obj.setChoice(PatternFlowIpv6NextHeaderChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv6NextHeaderMetricTag +func (obj *patternFlowIpv6NextHeader) MetricTags() PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv6NextHeaderMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter struct { + obj *patternFlowIpv6NextHeader + patternFlowIpv6NextHeaderMetricTagSlice []PatternFlowIpv6NextHeaderMetricTag + fieldPtr *[]*otg.PatternFlowIpv6NextHeaderMetricTag +} + +func newPatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter(ptr *[]*otg.PatternFlowIpv6NextHeaderMetricTag) PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter { + return &patternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter interface { + setMsg(*patternFlowIpv6NextHeader) PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter + Items() []PatternFlowIpv6NextHeaderMetricTag + Add() PatternFlowIpv6NextHeaderMetricTag + Append(items ...PatternFlowIpv6NextHeaderMetricTag) PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter + Set(index int, newObj PatternFlowIpv6NextHeaderMetricTag) PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter + Clear() PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter + clearHolderSlice() PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter + appendHolderSlice(item PatternFlowIpv6NextHeaderMetricTag) PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter +} + +func (obj *patternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter) setMsg(msg *patternFlowIpv6NextHeader) PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv6NextHeaderMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter) Items() []PatternFlowIpv6NextHeaderMetricTag { + return obj.patternFlowIpv6NextHeaderMetricTagSlice +} + +func (obj *patternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter) Add() PatternFlowIpv6NextHeaderMetricTag { + newObj := &otg.PatternFlowIpv6NextHeaderMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv6NextHeaderMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv6NextHeaderMetricTagSlice = append(obj.patternFlowIpv6NextHeaderMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter) Append(items ...PatternFlowIpv6NextHeaderMetricTag) PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv6NextHeaderMetricTagSlice = append(obj.patternFlowIpv6NextHeaderMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter) Set(index int, newObj PatternFlowIpv6NextHeaderMetricTag) PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv6NextHeaderMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter) Clear() PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv6NextHeaderMetricTag{} + obj.patternFlowIpv6NextHeaderMetricTagSlice = []PatternFlowIpv6NextHeaderMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter) clearHolderSlice() PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter { + if len(obj.patternFlowIpv6NextHeaderMetricTagSlice) > 0 { + obj.patternFlowIpv6NextHeaderMetricTagSlice = []PatternFlowIpv6NextHeaderMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter) appendHolderSlice(item PatternFlowIpv6NextHeaderMetricTag) PatternFlowIpv6NextHeaderPatternFlowIpv6NextHeaderMetricTagIter { + obj.patternFlowIpv6NextHeaderMetricTagSlice = append(obj.patternFlowIpv6NextHeaderMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv6NextHeader) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6NextHeader.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv6NextHeader.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Auto != nil { + + if *obj.obj.Auto > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6NextHeader.Auto <= 255 but Got %d", *obj.obj.Auto)) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv6NextHeaderMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv6NextHeader) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv6NextHeaderChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv6NextHeaderChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv6NextHeaderChoice.VALUES + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowIpv6NextHeaderChoice.AUTO + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv6NextHeaderChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv6NextHeaderChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv6NextHeaderChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv6NextHeader") + } + } else { + intVal := otg.PatternFlowIpv6NextHeader_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv6NextHeader_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv6_next_header_counter.go b/gosnappi/pattern_flow_ipv6_next_header_counter.go new file mode 100644 index 00000000..28eb1216 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_next_header_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6NextHeaderCounter ***** +type patternFlowIpv6NextHeaderCounter struct { + validation + obj *otg.PatternFlowIpv6NextHeaderCounter + marshaller marshalPatternFlowIpv6NextHeaderCounter + unMarshaller unMarshalPatternFlowIpv6NextHeaderCounter +} + +func NewPatternFlowIpv6NextHeaderCounter() PatternFlowIpv6NextHeaderCounter { + obj := patternFlowIpv6NextHeaderCounter{obj: &otg.PatternFlowIpv6NextHeaderCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6NextHeaderCounter) msg() *otg.PatternFlowIpv6NextHeaderCounter { + return obj.obj +} + +func (obj *patternFlowIpv6NextHeaderCounter) setMsg(msg *otg.PatternFlowIpv6NextHeaderCounter) PatternFlowIpv6NextHeaderCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6NextHeaderCounter struct { + obj *patternFlowIpv6NextHeaderCounter +} + +type marshalPatternFlowIpv6NextHeaderCounter interface { + // ToProto marshals PatternFlowIpv6NextHeaderCounter to protobuf object *otg.PatternFlowIpv6NextHeaderCounter + ToProto() (*otg.PatternFlowIpv6NextHeaderCounter, error) + // ToPbText marshals PatternFlowIpv6NextHeaderCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6NextHeaderCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6NextHeaderCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6NextHeaderCounter struct { + obj *patternFlowIpv6NextHeaderCounter +} + +type unMarshalPatternFlowIpv6NextHeaderCounter interface { + // FromProto unmarshals PatternFlowIpv6NextHeaderCounter from protobuf object *otg.PatternFlowIpv6NextHeaderCounter + FromProto(msg *otg.PatternFlowIpv6NextHeaderCounter) (PatternFlowIpv6NextHeaderCounter, error) + // FromPbText unmarshals PatternFlowIpv6NextHeaderCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6NextHeaderCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6NextHeaderCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6NextHeaderCounter) Marshal() marshalPatternFlowIpv6NextHeaderCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6NextHeaderCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6NextHeaderCounter) Unmarshal() unMarshalPatternFlowIpv6NextHeaderCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6NextHeaderCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6NextHeaderCounter) ToProto() (*otg.PatternFlowIpv6NextHeaderCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6NextHeaderCounter) FromProto(msg *otg.PatternFlowIpv6NextHeaderCounter) (PatternFlowIpv6NextHeaderCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6NextHeaderCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6NextHeaderCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6NextHeaderCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6NextHeaderCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6NextHeaderCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6NextHeaderCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6NextHeaderCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6NextHeaderCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6NextHeaderCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6NextHeaderCounter) Clone() (PatternFlowIpv6NextHeaderCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6NextHeaderCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6NextHeaderCounter is integer counter pattern +type PatternFlowIpv6NextHeaderCounter interface { + Validation + // msg marshals PatternFlowIpv6NextHeaderCounter to protobuf object *otg.PatternFlowIpv6NextHeaderCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv6NextHeaderCounter + // setMsg unmarshals PatternFlowIpv6NextHeaderCounter from protobuf object *otg.PatternFlowIpv6NextHeaderCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6NextHeaderCounter) PatternFlowIpv6NextHeaderCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv6NextHeaderCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6NextHeaderCounter + // validate validates PatternFlowIpv6NextHeaderCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6NextHeaderCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv6NextHeaderCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv6NextHeaderCounter + SetStart(value uint32) PatternFlowIpv6NextHeaderCounter + // HasStart checks if Start has been set in PatternFlowIpv6NextHeaderCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv6NextHeaderCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv6NextHeaderCounter + SetStep(value uint32) PatternFlowIpv6NextHeaderCounter + // HasStep checks if Step has been set in PatternFlowIpv6NextHeaderCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv6NextHeaderCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv6NextHeaderCounter + SetCount(value uint32) PatternFlowIpv6NextHeaderCounter + // HasCount checks if Count has been set in PatternFlowIpv6NextHeaderCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv6NextHeaderCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv6NextHeaderCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv6NextHeaderCounter object +func (obj *patternFlowIpv6NextHeaderCounter) SetStart(value uint32) PatternFlowIpv6NextHeaderCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv6NextHeaderCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv6NextHeaderCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv6NextHeaderCounter object +func (obj *patternFlowIpv6NextHeaderCounter) SetStep(value uint32) PatternFlowIpv6NextHeaderCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6NextHeaderCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6NextHeaderCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv6NextHeaderCounter object +func (obj *patternFlowIpv6NextHeaderCounter) SetCount(value uint32) PatternFlowIpv6NextHeaderCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv6NextHeaderCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6NextHeaderCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6NextHeaderCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6NextHeaderCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv6NextHeaderCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(59) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_next_header_metric_tag.go b/gosnappi/pattern_flow_ipv6_next_header_metric_tag.go new file mode 100644 index 00000000..ccb404d2 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_next_header_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6NextHeaderMetricTag ***** +type patternFlowIpv6NextHeaderMetricTag struct { + validation + obj *otg.PatternFlowIpv6NextHeaderMetricTag + marshaller marshalPatternFlowIpv6NextHeaderMetricTag + unMarshaller unMarshalPatternFlowIpv6NextHeaderMetricTag +} + +func NewPatternFlowIpv6NextHeaderMetricTag() PatternFlowIpv6NextHeaderMetricTag { + obj := patternFlowIpv6NextHeaderMetricTag{obj: &otg.PatternFlowIpv6NextHeaderMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6NextHeaderMetricTag) msg() *otg.PatternFlowIpv6NextHeaderMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv6NextHeaderMetricTag) setMsg(msg *otg.PatternFlowIpv6NextHeaderMetricTag) PatternFlowIpv6NextHeaderMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6NextHeaderMetricTag struct { + obj *patternFlowIpv6NextHeaderMetricTag +} + +type marshalPatternFlowIpv6NextHeaderMetricTag interface { + // ToProto marshals PatternFlowIpv6NextHeaderMetricTag to protobuf object *otg.PatternFlowIpv6NextHeaderMetricTag + ToProto() (*otg.PatternFlowIpv6NextHeaderMetricTag, error) + // ToPbText marshals PatternFlowIpv6NextHeaderMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6NextHeaderMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6NextHeaderMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6NextHeaderMetricTag struct { + obj *patternFlowIpv6NextHeaderMetricTag +} + +type unMarshalPatternFlowIpv6NextHeaderMetricTag interface { + // FromProto unmarshals PatternFlowIpv6NextHeaderMetricTag from protobuf object *otg.PatternFlowIpv6NextHeaderMetricTag + FromProto(msg *otg.PatternFlowIpv6NextHeaderMetricTag) (PatternFlowIpv6NextHeaderMetricTag, error) + // FromPbText unmarshals PatternFlowIpv6NextHeaderMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6NextHeaderMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6NextHeaderMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6NextHeaderMetricTag) Marshal() marshalPatternFlowIpv6NextHeaderMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6NextHeaderMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6NextHeaderMetricTag) Unmarshal() unMarshalPatternFlowIpv6NextHeaderMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6NextHeaderMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6NextHeaderMetricTag) ToProto() (*otg.PatternFlowIpv6NextHeaderMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6NextHeaderMetricTag) FromProto(msg *otg.PatternFlowIpv6NextHeaderMetricTag) (PatternFlowIpv6NextHeaderMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6NextHeaderMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6NextHeaderMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6NextHeaderMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6NextHeaderMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6NextHeaderMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6NextHeaderMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6NextHeaderMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6NextHeaderMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6NextHeaderMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6NextHeaderMetricTag) Clone() (PatternFlowIpv6NextHeaderMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6NextHeaderMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6NextHeaderMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv6NextHeaderMetricTag interface { + Validation + // msg marshals PatternFlowIpv6NextHeaderMetricTag to protobuf object *otg.PatternFlowIpv6NextHeaderMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv6NextHeaderMetricTag + // setMsg unmarshals PatternFlowIpv6NextHeaderMetricTag from protobuf object *otg.PatternFlowIpv6NextHeaderMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6NextHeaderMetricTag) PatternFlowIpv6NextHeaderMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv6NextHeaderMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6NextHeaderMetricTag + // validate validates PatternFlowIpv6NextHeaderMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6NextHeaderMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv6NextHeaderMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv6NextHeaderMetricTag + SetName(value string) PatternFlowIpv6NextHeaderMetricTag + // Offset returns uint32, set in PatternFlowIpv6NextHeaderMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv6NextHeaderMetricTag + SetOffset(value uint32) PatternFlowIpv6NextHeaderMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv6NextHeaderMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv6NextHeaderMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv6NextHeaderMetricTag + SetLength(value uint32) PatternFlowIpv6NextHeaderMetricTag + // HasLength checks if Length has been set in PatternFlowIpv6NextHeaderMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv6NextHeaderMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv6NextHeaderMetricTag object +func (obj *patternFlowIpv6NextHeaderMetricTag) SetName(value string) PatternFlowIpv6NextHeaderMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6NextHeaderMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6NextHeaderMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv6NextHeaderMetricTag object +func (obj *patternFlowIpv6NextHeaderMetricTag) SetOffset(value uint32) PatternFlowIpv6NextHeaderMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6NextHeaderMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6NextHeaderMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv6NextHeaderMetricTag object +func (obj *patternFlowIpv6NextHeaderMetricTag) SetLength(value uint32) PatternFlowIpv6NextHeaderMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv6NextHeaderMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv6NextHeaderMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6NextHeaderMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv6NextHeaderMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv6NextHeaderMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_payload_length.go b/gosnappi/pattern_flow_ipv6_payload_length.go new file mode 100644 index 00000000..de24fc7f --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_payload_length.go @@ -0,0 +1,712 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6PayloadLength ***** +type patternFlowIpv6PayloadLength struct { + validation + obj *otg.PatternFlowIpv6PayloadLength + marshaller marshalPatternFlowIpv6PayloadLength + unMarshaller unMarshalPatternFlowIpv6PayloadLength + incrementHolder PatternFlowIpv6PayloadLengthCounter + decrementHolder PatternFlowIpv6PayloadLengthCounter + metricTagsHolder PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter +} + +func NewPatternFlowIpv6PayloadLength() PatternFlowIpv6PayloadLength { + obj := patternFlowIpv6PayloadLength{obj: &otg.PatternFlowIpv6PayloadLength{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6PayloadLength) msg() *otg.PatternFlowIpv6PayloadLength { + return obj.obj +} + +func (obj *patternFlowIpv6PayloadLength) setMsg(msg *otg.PatternFlowIpv6PayloadLength) PatternFlowIpv6PayloadLength { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6PayloadLength struct { + obj *patternFlowIpv6PayloadLength +} + +type marshalPatternFlowIpv6PayloadLength interface { + // ToProto marshals PatternFlowIpv6PayloadLength to protobuf object *otg.PatternFlowIpv6PayloadLength + ToProto() (*otg.PatternFlowIpv6PayloadLength, error) + // ToPbText marshals PatternFlowIpv6PayloadLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6PayloadLength to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6PayloadLength to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6PayloadLength struct { + obj *patternFlowIpv6PayloadLength +} + +type unMarshalPatternFlowIpv6PayloadLength interface { + // FromProto unmarshals PatternFlowIpv6PayloadLength from protobuf object *otg.PatternFlowIpv6PayloadLength + FromProto(msg *otg.PatternFlowIpv6PayloadLength) (PatternFlowIpv6PayloadLength, error) + // FromPbText unmarshals PatternFlowIpv6PayloadLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6PayloadLength from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6PayloadLength from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6PayloadLength) Marshal() marshalPatternFlowIpv6PayloadLength { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6PayloadLength{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6PayloadLength) Unmarshal() unMarshalPatternFlowIpv6PayloadLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6PayloadLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6PayloadLength) ToProto() (*otg.PatternFlowIpv6PayloadLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6PayloadLength) FromProto(msg *otg.PatternFlowIpv6PayloadLength) (PatternFlowIpv6PayloadLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6PayloadLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6PayloadLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6PayloadLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6PayloadLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6PayloadLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6PayloadLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6PayloadLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6PayloadLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6PayloadLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6PayloadLength) Clone() (PatternFlowIpv6PayloadLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6PayloadLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv6PayloadLength) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv6PayloadLength is payload length +type PatternFlowIpv6PayloadLength interface { + Validation + // msg marshals PatternFlowIpv6PayloadLength to protobuf object *otg.PatternFlowIpv6PayloadLength + // and doesn't set defaults + msg() *otg.PatternFlowIpv6PayloadLength + // setMsg unmarshals PatternFlowIpv6PayloadLength from protobuf object *otg.PatternFlowIpv6PayloadLength + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6PayloadLength) PatternFlowIpv6PayloadLength + // provides marshal interface + Marshal() marshalPatternFlowIpv6PayloadLength + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6PayloadLength + // validate validates PatternFlowIpv6PayloadLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6PayloadLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv6PayloadLengthChoiceEnum, set in PatternFlowIpv6PayloadLength + Choice() PatternFlowIpv6PayloadLengthChoiceEnum + // setChoice assigns PatternFlowIpv6PayloadLengthChoiceEnum provided by user to PatternFlowIpv6PayloadLength + setChoice(value PatternFlowIpv6PayloadLengthChoiceEnum) PatternFlowIpv6PayloadLength + // HasChoice checks if Choice has been set in PatternFlowIpv6PayloadLength + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv6PayloadLength. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv6PayloadLength + SetValue(value uint32) PatternFlowIpv6PayloadLength + // HasValue checks if Value has been set in PatternFlowIpv6PayloadLength + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv6PayloadLength. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv6PayloadLength + SetValues(value []uint32) PatternFlowIpv6PayloadLength + // Auto returns uint32, set in PatternFlowIpv6PayloadLength. + Auto() uint32 + // HasAuto checks if Auto has been set in PatternFlowIpv6PayloadLength + HasAuto() bool + // Increment returns PatternFlowIpv6PayloadLengthCounter, set in PatternFlowIpv6PayloadLength. + // PatternFlowIpv6PayloadLengthCounter is integer counter pattern + Increment() PatternFlowIpv6PayloadLengthCounter + // SetIncrement assigns PatternFlowIpv6PayloadLengthCounter provided by user to PatternFlowIpv6PayloadLength. + // PatternFlowIpv6PayloadLengthCounter is integer counter pattern + SetIncrement(value PatternFlowIpv6PayloadLengthCounter) PatternFlowIpv6PayloadLength + // HasIncrement checks if Increment has been set in PatternFlowIpv6PayloadLength + HasIncrement() bool + // Decrement returns PatternFlowIpv6PayloadLengthCounter, set in PatternFlowIpv6PayloadLength. + // PatternFlowIpv6PayloadLengthCounter is integer counter pattern + Decrement() PatternFlowIpv6PayloadLengthCounter + // SetDecrement assigns PatternFlowIpv6PayloadLengthCounter provided by user to PatternFlowIpv6PayloadLength. + // PatternFlowIpv6PayloadLengthCounter is integer counter pattern + SetDecrement(value PatternFlowIpv6PayloadLengthCounter) PatternFlowIpv6PayloadLength + // HasDecrement checks if Decrement has been set in PatternFlowIpv6PayloadLength + HasDecrement() bool + // MetricTags returns PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIterIter, set in PatternFlowIpv6PayloadLength + MetricTags() PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter + setNil() +} + +type PatternFlowIpv6PayloadLengthChoiceEnum string + +// Enum of Choice on PatternFlowIpv6PayloadLength +var PatternFlowIpv6PayloadLengthChoice = struct { + VALUE PatternFlowIpv6PayloadLengthChoiceEnum + VALUES PatternFlowIpv6PayloadLengthChoiceEnum + AUTO PatternFlowIpv6PayloadLengthChoiceEnum + INCREMENT PatternFlowIpv6PayloadLengthChoiceEnum + DECREMENT PatternFlowIpv6PayloadLengthChoiceEnum +}{ + VALUE: PatternFlowIpv6PayloadLengthChoiceEnum("value"), + VALUES: PatternFlowIpv6PayloadLengthChoiceEnum("values"), + AUTO: PatternFlowIpv6PayloadLengthChoiceEnum("auto"), + INCREMENT: PatternFlowIpv6PayloadLengthChoiceEnum("increment"), + DECREMENT: PatternFlowIpv6PayloadLengthChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv6PayloadLength) Choice() PatternFlowIpv6PayloadLengthChoiceEnum { + return PatternFlowIpv6PayloadLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv6PayloadLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv6PayloadLength) setChoice(value PatternFlowIpv6PayloadLengthChoiceEnum) PatternFlowIpv6PayloadLength { + intValue, ok := otg.PatternFlowIpv6PayloadLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv6PayloadLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv6PayloadLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Auto = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv6PayloadLengthChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv6PayloadLengthChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv6PayloadLengthChoice.AUTO { + defaultValue := uint32(0) + obj.obj.Auto = &defaultValue + } + + if value == PatternFlowIpv6PayloadLengthChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv6PayloadLengthCounter().msg() + } + + if value == PatternFlowIpv6PayloadLengthChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv6PayloadLengthCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv6PayloadLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv6PayloadLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv6PayloadLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv6PayloadLength object +func (obj *patternFlowIpv6PayloadLength) SetValue(value uint32) PatternFlowIpv6PayloadLength { + obj.setChoice(PatternFlowIpv6PayloadLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv6PayloadLength) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv6PayloadLength object +func (obj *patternFlowIpv6PayloadLength) SetValues(value []uint32) PatternFlowIpv6PayloadLength { + obj.setChoice(PatternFlowIpv6PayloadLengthChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowIpv6PayloadLength) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowIpv6PayloadLengthChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowIpv6PayloadLength) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Increment returns a PatternFlowIpv6PayloadLengthCounter +func (obj *patternFlowIpv6PayloadLength) Increment() PatternFlowIpv6PayloadLengthCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv6PayloadLengthChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv6PayloadLengthCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv6PayloadLengthCounter +func (obj *patternFlowIpv6PayloadLength) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv6PayloadLengthCounter value in the PatternFlowIpv6PayloadLength object +func (obj *patternFlowIpv6PayloadLength) SetIncrement(value PatternFlowIpv6PayloadLengthCounter) PatternFlowIpv6PayloadLength { + obj.setChoice(PatternFlowIpv6PayloadLengthChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv6PayloadLengthCounter +func (obj *patternFlowIpv6PayloadLength) Decrement() PatternFlowIpv6PayloadLengthCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv6PayloadLengthChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv6PayloadLengthCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv6PayloadLengthCounter +func (obj *patternFlowIpv6PayloadLength) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv6PayloadLengthCounter value in the PatternFlowIpv6PayloadLength object +func (obj *patternFlowIpv6PayloadLength) SetDecrement(value PatternFlowIpv6PayloadLengthCounter) PatternFlowIpv6PayloadLength { + obj.setChoice(PatternFlowIpv6PayloadLengthChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv6PayloadLengthMetricTag +func (obj *patternFlowIpv6PayloadLength) MetricTags() PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv6PayloadLengthMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter struct { + obj *patternFlowIpv6PayloadLength + patternFlowIpv6PayloadLengthMetricTagSlice []PatternFlowIpv6PayloadLengthMetricTag + fieldPtr *[]*otg.PatternFlowIpv6PayloadLengthMetricTag +} + +func newPatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter(ptr *[]*otg.PatternFlowIpv6PayloadLengthMetricTag) PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter { + return &patternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter interface { + setMsg(*patternFlowIpv6PayloadLength) PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter + Items() []PatternFlowIpv6PayloadLengthMetricTag + Add() PatternFlowIpv6PayloadLengthMetricTag + Append(items ...PatternFlowIpv6PayloadLengthMetricTag) PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter + Set(index int, newObj PatternFlowIpv6PayloadLengthMetricTag) PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter + Clear() PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter + clearHolderSlice() PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter + appendHolderSlice(item PatternFlowIpv6PayloadLengthMetricTag) PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter +} + +func (obj *patternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter) setMsg(msg *patternFlowIpv6PayloadLength) PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv6PayloadLengthMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter) Items() []PatternFlowIpv6PayloadLengthMetricTag { + return obj.patternFlowIpv6PayloadLengthMetricTagSlice +} + +func (obj *patternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter) Add() PatternFlowIpv6PayloadLengthMetricTag { + newObj := &otg.PatternFlowIpv6PayloadLengthMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv6PayloadLengthMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv6PayloadLengthMetricTagSlice = append(obj.patternFlowIpv6PayloadLengthMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter) Append(items ...PatternFlowIpv6PayloadLengthMetricTag) PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv6PayloadLengthMetricTagSlice = append(obj.patternFlowIpv6PayloadLengthMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter) Set(index int, newObj PatternFlowIpv6PayloadLengthMetricTag) PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv6PayloadLengthMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter) Clear() PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv6PayloadLengthMetricTag{} + obj.patternFlowIpv6PayloadLengthMetricTagSlice = []PatternFlowIpv6PayloadLengthMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter) clearHolderSlice() PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter { + if len(obj.patternFlowIpv6PayloadLengthMetricTagSlice) > 0 { + obj.patternFlowIpv6PayloadLengthMetricTagSlice = []PatternFlowIpv6PayloadLengthMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter) appendHolderSlice(item PatternFlowIpv6PayloadLengthMetricTag) PatternFlowIpv6PayloadLengthPatternFlowIpv6PayloadLengthMetricTagIter { + obj.patternFlowIpv6PayloadLengthMetricTagSlice = append(obj.patternFlowIpv6PayloadLengthMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv6PayloadLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6PayloadLength.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv6PayloadLength.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Auto != nil { + + if *obj.obj.Auto > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6PayloadLength.Auto <= 65535 but Got %d", *obj.obj.Auto)) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv6PayloadLengthMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv6PayloadLength) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv6PayloadLengthChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv6PayloadLengthChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv6PayloadLengthChoice.VALUES + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowIpv6PayloadLengthChoice.AUTO + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv6PayloadLengthChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv6PayloadLengthChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv6PayloadLengthChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv6PayloadLength") + } + } else { + intVal := otg.PatternFlowIpv6PayloadLength_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv6PayloadLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv6_payload_length_counter.go b/gosnappi/pattern_flow_ipv6_payload_length_counter.go new file mode 100644 index 00000000..f92bb2a9 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_payload_length_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6PayloadLengthCounter ***** +type patternFlowIpv6PayloadLengthCounter struct { + validation + obj *otg.PatternFlowIpv6PayloadLengthCounter + marshaller marshalPatternFlowIpv6PayloadLengthCounter + unMarshaller unMarshalPatternFlowIpv6PayloadLengthCounter +} + +func NewPatternFlowIpv6PayloadLengthCounter() PatternFlowIpv6PayloadLengthCounter { + obj := patternFlowIpv6PayloadLengthCounter{obj: &otg.PatternFlowIpv6PayloadLengthCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6PayloadLengthCounter) msg() *otg.PatternFlowIpv6PayloadLengthCounter { + return obj.obj +} + +func (obj *patternFlowIpv6PayloadLengthCounter) setMsg(msg *otg.PatternFlowIpv6PayloadLengthCounter) PatternFlowIpv6PayloadLengthCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6PayloadLengthCounter struct { + obj *patternFlowIpv6PayloadLengthCounter +} + +type marshalPatternFlowIpv6PayloadLengthCounter interface { + // ToProto marshals PatternFlowIpv6PayloadLengthCounter to protobuf object *otg.PatternFlowIpv6PayloadLengthCounter + ToProto() (*otg.PatternFlowIpv6PayloadLengthCounter, error) + // ToPbText marshals PatternFlowIpv6PayloadLengthCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6PayloadLengthCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6PayloadLengthCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6PayloadLengthCounter struct { + obj *patternFlowIpv6PayloadLengthCounter +} + +type unMarshalPatternFlowIpv6PayloadLengthCounter interface { + // FromProto unmarshals PatternFlowIpv6PayloadLengthCounter from protobuf object *otg.PatternFlowIpv6PayloadLengthCounter + FromProto(msg *otg.PatternFlowIpv6PayloadLengthCounter) (PatternFlowIpv6PayloadLengthCounter, error) + // FromPbText unmarshals PatternFlowIpv6PayloadLengthCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6PayloadLengthCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6PayloadLengthCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6PayloadLengthCounter) Marshal() marshalPatternFlowIpv6PayloadLengthCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6PayloadLengthCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6PayloadLengthCounter) Unmarshal() unMarshalPatternFlowIpv6PayloadLengthCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6PayloadLengthCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6PayloadLengthCounter) ToProto() (*otg.PatternFlowIpv6PayloadLengthCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6PayloadLengthCounter) FromProto(msg *otg.PatternFlowIpv6PayloadLengthCounter) (PatternFlowIpv6PayloadLengthCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6PayloadLengthCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6PayloadLengthCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6PayloadLengthCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6PayloadLengthCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6PayloadLengthCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6PayloadLengthCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6PayloadLengthCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6PayloadLengthCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6PayloadLengthCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6PayloadLengthCounter) Clone() (PatternFlowIpv6PayloadLengthCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6PayloadLengthCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6PayloadLengthCounter is integer counter pattern +type PatternFlowIpv6PayloadLengthCounter interface { + Validation + // msg marshals PatternFlowIpv6PayloadLengthCounter to protobuf object *otg.PatternFlowIpv6PayloadLengthCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv6PayloadLengthCounter + // setMsg unmarshals PatternFlowIpv6PayloadLengthCounter from protobuf object *otg.PatternFlowIpv6PayloadLengthCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6PayloadLengthCounter) PatternFlowIpv6PayloadLengthCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv6PayloadLengthCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6PayloadLengthCounter + // validate validates PatternFlowIpv6PayloadLengthCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6PayloadLengthCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv6PayloadLengthCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv6PayloadLengthCounter + SetStart(value uint32) PatternFlowIpv6PayloadLengthCounter + // HasStart checks if Start has been set in PatternFlowIpv6PayloadLengthCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv6PayloadLengthCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv6PayloadLengthCounter + SetStep(value uint32) PatternFlowIpv6PayloadLengthCounter + // HasStep checks if Step has been set in PatternFlowIpv6PayloadLengthCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv6PayloadLengthCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv6PayloadLengthCounter + SetCount(value uint32) PatternFlowIpv6PayloadLengthCounter + // HasCount checks if Count has been set in PatternFlowIpv6PayloadLengthCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv6PayloadLengthCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv6PayloadLengthCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv6PayloadLengthCounter object +func (obj *patternFlowIpv6PayloadLengthCounter) SetStart(value uint32) PatternFlowIpv6PayloadLengthCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv6PayloadLengthCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv6PayloadLengthCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv6PayloadLengthCounter object +func (obj *patternFlowIpv6PayloadLengthCounter) SetStep(value uint32) PatternFlowIpv6PayloadLengthCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6PayloadLengthCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6PayloadLengthCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv6PayloadLengthCounter object +func (obj *patternFlowIpv6PayloadLengthCounter) SetCount(value uint32) PatternFlowIpv6PayloadLengthCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv6PayloadLengthCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6PayloadLengthCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6PayloadLengthCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6PayloadLengthCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv6PayloadLengthCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_payload_length_metric_tag.go b/gosnappi/pattern_flow_ipv6_payload_length_metric_tag.go new file mode 100644 index 00000000..0e25d464 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_payload_length_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6PayloadLengthMetricTag ***** +type patternFlowIpv6PayloadLengthMetricTag struct { + validation + obj *otg.PatternFlowIpv6PayloadLengthMetricTag + marshaller marshalPatternFlowIpv6PayloadLengthMetricTag + unMarshaller unMarshalPatternFlowIpv6PayloadLengthMetricTag +} + +func NewPatternFlowIpv6PayloadLengthMetricTag() PatternFlowIpv6PayloadLengthMetricTag { + obj := patternFlowIpv6PayloadLengthMetricTag{obj: &otg.PatternFlowIpv6PayloadLengthMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6PayloadLengthMetricTag) msg() *otg.PatternFlowIpv6PayloadLengthMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv6PayloadLengthMetricTag) setMsg(msg *otg.PatternFlowIpv6PayloadLengthMetricTag) PatternFlowIpv6PayloadLengthMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6PayloadLengthMetricTag struct { + obj *patternFlowIpv6PayloadLengthMetricTag +} + +type marshalPatternFlowIpv6PayloadLengthMetricTag interface { + // ToProto marshals PatternFlowIpv6PayloadLengthMetricTag to protobuf object *otg.PatternFlowIpv6PayloadLengthMetricTag + ToProto() (*otg.PatternFlowIpv6PayloadLengthMetricTag, error) + // ToPbText marshals PatternFlowIpv6PayloadLengthMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6PayloadLengthMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6PayloadLengthMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6PayloadLengthMetricTag struct { + obj *patternFlowIpv6PayloadLengthMetricTag +} + +type unMarshalPatternFlowIpv6PayloadLengthMetricTag interface { + // FromProto unmarshals PatternFlowIpv6PayloadLengthMetricTag from protobuf object *otg.PatternFlowIpv6PayloadLengthMetricTag + FromProto(msg *otg.PatternFlowIpv6PayloadLengthMetricTag) (PatternFlowIpv6PayloadLengthMetricTag, error) + // FromPbText unmarshals PatternFlowIpv6PayloadLengthMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6PayloadLengthMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6PayloadLengthMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6PayloadLengthMetricTag) Marshal() marshalPatternFlowIpv6PayloadLengthMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6PayloadLengthMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6PayloadLengthMetricTag) Unmarshal() unMarshalPatternFlowIpv6PayloadLengthMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6PayloadLengthMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6PayloadLengthMetricTag) ToProto() (*otg.PatternFlowIpv6PayloadLengthMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6PayloadLengthMetricTag) FromProto(msg *otg.PatternFlowIpv6PayloadLengthMetricTag) (PatternFlowIpv6PayloadLengthMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6PayloadLengthMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6PayloadLengthMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6PayloadLengthMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6PayloadLengthMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6PayloadLengthMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6PayloadLengthMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6PayloadLengthMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6PayloadLengthMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6PayloadLengthMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6PayloadLengthMetricTag) Clone() (PatternFlowIpv6PayloadLengthMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6PayloadLengthMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6PayloadLengthMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv6PayloadLengthMetricTag interface { + Validation + // msg marshals PatternFlowIpv6PayloadLengthMetricTag to protobuf object *otg.PatternFlowIpv6PayloadLengthMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv6PayloadLengthMetricTag + // setMsg unmarshals PatternFlowIpv6PayloadLengthMetricTag from protobuf object *otg.PatternFlowIpv6PayloadLengthMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6PayloadLengthMetricTag) PatternFlowIpv6PayloadLengthMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv6PayloadLengthMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6PayloadLengthMetricTag + // validate validates PatternFlowIpv6PayloadLengthMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6PayloadLengthMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv6PayloadLengthMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv6PayloadLengthMetricTag + SetName(value string) PatternFlowIpv6PayloadLengthMetricTag + // Offset returns uint32, set in PatternFlowIpv6PayloadLengthMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv6PayloadLengthMetricTag + SetOffset(value uint32) PatternFlowIpv6PayloadLengthMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv6PayloadLengthMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv6PayloadLengthMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv6PayloadLengthMetricTag + SetLength(value uint32) PatternFlowIpv6PayloadLengthMetricTag + // HasLength checks if Length has been set in PatternFlowIpv6PayloadLengthMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv6PayloadLengthMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv6PayloadLengthMetricTag object +func (obj *patternFlowIpv6PayloadLengthMetricTag) SetName(value string) PatternFlowIpv6PayloadLengthMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6PayloadLengthMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6PayloadLengthMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv6PayloadLengthMetricTag object +func (obj *patternFlowIpv6PayloadLengthMetricTag) SetOffset(value uint32) PatternFlowIpv6PayloadLengthMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6PayloadLengthMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6PayloadLengthMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv6PayloadLengthMetricTag object +func (obj *patternFlowIpv6PayloadLengthMetricTag) SetLength(value uint32) PatternFlowIpv6PayloadLengthMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv6PayloadLengthMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv6PayloadLengthMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6PayloadLengthMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv6PayloadLengthMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv6PayloadLengthMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_src.go b/gosnappi/pattern_flow_ipv6_src.go new file mode 100644 index 00000000..0ba31e3f --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_src.go @@ -0,0 +1,701 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6Src ***** +type patternFlowIpv6Src struct { + validation + obj *otg.PatternFlowIpv6Src + marshaller marshalPatternFlowIpv6Src + unMarshaller unMarshalPatternFlowIpv6Src + incrementHolder PatternFlowIpv6SrcCounter + decrementHolder PatternFlowIpv6SrcCounter + metricTagsHolder PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter + autoHolder FlowIpv6Auto +} + +func NewPatternFlowIpv6Src() PatternFlowIpv6Src { + obj := patternFlowIpv6Src{obj: &otg.PatternFlowIpv6Src{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6Src) msg() *otg.PatternFlowIpv6Src { + return obj.obj +} + +func (obj *patternFlowIpv6Src) setMsg(msg *otg.PatternFlowIpv6Src) PatternFlowIpv6Src { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6Src struct { + obj *patternFlowIpv6Src +} + +type marshalPatternFlowIpv6Src interface { + // ToProto marshals PatternFlowIpv6Src to protobuf object *otg.PatternFlowIpv6Src + ToProto() (*otg.PatternFlowIpv6Src, error) + // ToPbText marshals PatternFlowIpv6Src to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6Src to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6Src to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6Src struct { + obj *patternFlowIpv6Src +} + +type unMarshalPatternFlowIpv6Src interface { + // FromProto unmarshals PatternFlowIpv6Src from protobuf object *otg.PatternFlowIpv6Src + FromProto(msg *otg.PatternFlowIpv6Src) (PatternFlowIpv6Src, error) + // FromPbText unmarshals PatternFlowIpv6Src from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6Src from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6Src from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6Src) Marshal() marshalPatternFlowIpv6Src { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6Src{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6Src) Unmarshal() unMarshalPatternFlowIpv6Src { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6Src{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6Src) ToProto() (*otg.PatternFlowIpv6Src, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6Src) FromProto(msg *otg.PatternFlowIpv6Src) (PatternFlowIpv6Src, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6Src) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6Src) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6Src) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6Src) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6Src) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6Src) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6Src) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6Src) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6Src) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6Src) Clone() (PatternFlowIpv6Src, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6Src() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv6Src) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.autoHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv6Src is source address +type PatternFlowIpv6Src interface { + Validation + // msg marshals PatternFlowIpv6Src to protobuf object *otg.PatternFlowIpv6Src + // and doesn't set defaults + msg() *otg.PatternFlowIpv6Src + // setMsg unmarshals PatternFlowIpv6Src from protobuf object *otg.PatternFlowIpv6Src + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6Src) PatternFlowIpv6Src + // provides marshal interface + Marshal() marshalPatternFlowIpv6Src + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6Src + // validate validates PatternFlowIpv6Src + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6Src, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv6SrcChoiceEnum, set in PatternFlowIpv6Src + Choice() PatternFlowIpv6SrcChoiceEnum + // setChoice assigns PatternFlowIpv6SrcChoiceEnum provided by user to PatternFlowIpv6Src + setChoice(value PatternFlowIpv6SrcChoiceEnum) PatternFlowIpv6Src + // HasChoice checks if Choice has been set in PatternFlowIpv6Src + HasChoice() bool + // Value returns string, set in PatternFlowIpv6Src. + Value() string + // SetValue assigns string provided by user to PatternFlowIpv6Src + SetValue(value string) PatternFlowIpv6Src + // HasValue checks if Value has been set in PatternFlowIpv6Src + HasValue() bool + // Values returns []string, set in PatternFlowIpv6Src. + Values() []string + // SetValues assigns []string provided by user to PatternFlowIpv6Src + SetValues(value []string) PatternFlowIpv6Src + // Increment returns PatternFlowIpv6SrcCounter, set in PatternFlowIpv6Src. + // PatternFlowIpv6SrcCounter is ipv6 counter pattern + Increment() PatternFlowIpv6SrcCounter + // SetIncrement assigns PatternFlowIpv6SrcCounter provided by user to PatternFlowIpv6Src. + // PatternFlowIpv6SrcCounter is ipv6 counter pattern + SetIncrement(value PatternFlowIpv6SrcCounter) PatternFlowIpv6Src + // HasIncrement checks if Increment has been set in PatternFlowIpv6Src + HasIncrement() bool + // Decrement returns PatternFlowIpv6SrcCounter, set in PatternFlowIpv6Src. + // PatternFlowIpv6SrcCounter is ipv6 counter pattern + Decrement() PatternFlowIpv6SrcCounter + // SetDecrement assigns PatternFlowIpv6SrcCounter provided by user to PatternFlowIpv6Src. + // PatternFlowIpv6SrcCounter is ipv6 counter pattern + SetDecrement(value PatternFlowIpv6SrcCounter) PatternFlowIpv6Src + // HasDecrement checks if Decrement has been set in PatternFlowIpv6Src + HasDecrement() bool + // MetricTags returns PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIterIter, set in PatternFlowIpv6Src + MetricTags() PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter + // Auto returns FlowIpv6Auto, set in PatternFlowIpv6Src. + // FlowIpv6Auto is the OTG implementation can provide a system generated, value for this property. + Auto() FlowIpv6Auto + // HasAuto checks if Auto has been set in PatternFlowIpv6Src + HasAuto() bool + setNil() +} + +type PatternFlowIpv6SrcChoiceEnum string + +// Enum of Choice on PatternFlowIpv6Src +var PatternFlowIpv6SrcChoice = struct { + VALUE PatternFlowIpv6SrcChoiceEnum + VALUES PatternFlowIpv6SrcChoiceEnum + INCREMENT PatternFlowIpv6SrcChoiceEnum + DECREMENT PatternFlowIpv6SrcChoiceEnum + AUTO PatternFlowIpv6SrcChoiceEnum +}{ + VALUE: PatternFlowIpv6SrcChoiceEnum("value"), + VALUES: PatternFlowIpv6SrcChoiceEnum("values"), + INCREMENT: PatternFlowIpv6SrcChoiceEnum("increment"), + DECREMENT: PatternFlowIpv6SrcChoiceEnum("decrement"), + AUTO: PatternFlowIpv6SrcChoiceEnum("auto"), +} + +func (obj *patternFlowIpv6Src) Choice() PatternFlowIpv6SrcChoiceEnum { + return PatternFlowIpv6SrcChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv6Src) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv6Src) setChoice(value PatternFlowIpv6SrcChoiceEnum) PatternFlowIpv6Src { + intValue, ok := otg.PatternFlowIpv6Src_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv6SrcChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv6Src_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Auto = nil + obj.autoHolder = nil + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv6SrcChoice.VALUE { + defaultValue := "::0" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv6SrcChoice.VALUES { + defaultValue := []string{"::0"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv6SrcChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv6SrcCounter().msg() + } + + if value == PatternFlowIpv6SrcChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv6SrcCounter().msg() + } + + if value == PatternFlowIpv6SrcChoice.AUTO { + obj.obj.Auto = NewFlowIpv6Auto().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowIpv6Src) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv6SrcChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowIpv6Src) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowIpv6Src object +func (obj *patternFlowIpv6Src) SetValue(value string) PatternFlowIpv6Src { + obj.setChoice(PatternFlowIpv6SrcChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowIpv6Src) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"::0"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowIpv6Src object +func (obj *patternFlowIpv6Src) SetValues(value []string) PatternFlowIpv6Src { + obj.setChoice(PatternFlowIpv6SrcChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv6SrcCounter +func (obj *patternFlowIpv6Src) Increment() PatternFlowIpv6SrcCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv6SrcChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv6SrcCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv6SrcCounter +func (obj *patternFlowIpv6Src) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv6SrcCounter value in the PatternFlowIpv6Src object +func (obj *patternFlowIpv6Src) SetIncrement(value PatternFlowIpv6SrcCounter) PatternFlowIpv6Src { + obj.setChoice(PatternFlowIpv6SrcChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv6SrcCounter +func (obj *patternFlowIpv6Src) Decrement() PatternFlowIpv6SrcCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv6SrcChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv6SrcCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv6SrcCounter +func (obj *patternFlowIpv6Src) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv6SrcCounter value in the PatternFlowIpv6Src object +func (obj *patternFlowIpv6Src) SetDecrement(value PatternFlowIpv6SrcCounter) PatternFlowIpv6Src { + obj.setChoice(PatternFlowIpv6SrcChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv6SrcMetricTag +func (obj *patternFlowIpv6Src) MetricTags() PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv6SrcMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter struct { + obj *patternFlowIpv6Src + patternFlowIpv6SrcMetricTagSlice []PatternFlowIpv6SrcMetricTag + fieldPtr *[]*otg.PatternFlowIpv6SrcMetricTag +} + +func newPatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter(ptr *[]*otg.PatternFlowIpv6SrcMetricTag) PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter { + return &patternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter interface { + setMsg(*patternFlowIpv6Src) PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter + Items() []PatternFlowIpv6SrcMetricTag + Add() PatternFlowIpv6SrcMetricTag + Append(items ...PatternFlowIpv6SrcMetricTag) PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter + Set(index int, newObj PatternFlowIpv6SrcMetricTag) PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter + Clear() PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter + clearHolderSlice() PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter + appendHolderSlice(item PatternFlowIpv6SrcMetricTag) PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter +} + +func (obj *patternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter) setMsg(msg *patternFlowIpv6Src) PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv6SrcMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter) Items() []PatternFlowIpv6SrcMetricTag { + return obj.patternFlowIpv6SrcMetricTagSlice +} + +func (obj *patternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter) Add() PatternFlowIpv6SrcMetricTag { + newObj := &otg.PatternFlowIpv6SrcMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv6SrcMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv6SrcMetricTagSlice = append(obj.patternFlowIpv6SrcMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter) Append(items ...PatternFlowIpv6SrcMetricTag) PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv6SrcMetricTagSlice = append(obj.patternFlowIpv6SrcMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter) Set(index int, newObj PatternFlowIpv6SrcMetricTag) PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv6SrcMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter) Clear() PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv6SrcMetricTag{} + obj.patternFlowIpv6SrcMetricTagSlice = []PatternFlowIpv6SrcMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter) clearHolderSlice() PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter { + if len(obj.patternFlowIpv6SrcMetricTagSlice) > 0 { + obj.patternFlowIpv6SrcMetricTagSlice = []PatternFlowIpv6SrcMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter) appendHolderSlice(item PatternFlowIpv6SrcMetricTag) PatternFlowIpv6SrcPatternFlowIpv6SrcMetricTagIter { + obj.patternFlowIpv6SrcMetricTagSlice = append(obj.patternFlowIpv6SrcMetricTagSlice, item) + return obj +} + +// description is TBD +// Auto returns a FlowIpv6Auto +func (obj *patternFlowIpv6Src) Auto() FlowIpv6Auto { + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowIpv6SrcChoice.AUTO) + } + if obj.autoHolder == nil { + obj.autoHolder = &flowIpv6Auto{obj: obj.obj.Auto} + } + return obj.autoHolder +} + +// description is TBD +// Auto returns a FlowIpv6Auto +func (obj *patternFlowIpv6Src) HasAuto() bool { + return obj.obj.Auto != nil +} + +func (obj *patternFlowIpv6Src) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv6(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv6Src.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateIpv6Slice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv6Src.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv6SrcMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Auto != nil { + + obj.Auto().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowIpv6Src) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv6SrcChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv6SrcChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv6SrcChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv6SrcChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv6SrcChoice.DECREMENT + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowIpv6SrcChoice.AUTO + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv6SrcChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv6Src") + } + } else { + intVal := otg.PatternFlowIpv6Src_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv6Src_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv6_src_counter.go b/gosnappi/pattern_flow_ipv6_src_counter.go new file mode 100644 index 00000000..3c8ae424 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_src_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6SrcCounter ***** +type patternFlowIpv6SrcCounter struct { + validation + obj *otg.PatternFlowIpv6SrcCounter + marshaller marshalPatternFlowIpv6SrcCounter + unMarshaller unMarshalPatternFlowIpv6SrcCounter +} + +func NewPatternFlowIpv6SrcCounter() PatternFlowIpv6SrcCounter { + obj := patternFlowIpv6SrcCounter{obj: &otg.PatternFlowIpv6SrcCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6SrcCounter) msg() *otg.PatternFlowIpv6SrcCounter { + return obj.obj +} + +func (obj *patternFlowIpv6SrcCounter) setMsg(msg *otg.PatternFlowIpv6SrcCounter) PatternFlowIpv6SrcCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6SrcCounter struct { + obj *patternFlowIpv6SrcCounter +} + +type marshalPatternFlowIpv6SrcCounter interface { + // ToProto marshals PatternFlowIpv6SrcCounter to protobuf object *otg.PatternFlowIpv6SrcCounter + ToProto() (*otg.PatternFlowIpv6SrcCounter, error) + // ToPbText marshals PatternFlowIpv6SrcCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6SrcCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6SrcCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6SrcCounter struct { + obj *patternFlowIpv6SrcCounter +} + +type unMarshalPatternFlowIpv6SrcCounter interface { + // FromProto unmarshals PatternFlowIpv6SrcCounter from protobuf object *otg.PatternFlowIpv6SrcCounter + FromProto(msg *otg.PatternFlowIpv6SrcCounter) (PatternFlowIpv6SrcCounter, error) + // FromPbText unmarshals PatternFlowIpv6SrcCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6SrcCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6SrcCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6SrcCounter) Marshal() marshalPatternFlowIpv6SrcCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6SrcCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6SrcCounter) Unmarshal() unMarshalPatternFlowIpv6SrcCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6SrcCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6SrcCounter) ToProto() (*otg.PatternFlowIpv6SrcCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6SrcCounter) FromProto(msg *otg.PatternFlowIpv6SrcCounter) (PatternFlowIpv6SrcCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6SrcCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6SrcCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6SrcCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6SrcCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6SrcCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6SrcCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6SrcCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6SrcCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6SrcCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6SrcCounter) Clone() (PatternFlowIpv6SrcCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6SrcCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6SrcCounter is ipv6 counter pattern +type PatternFlowIpv6SrcCounter interface { + Validation + // msg marshals PatternFlowIpv6SrcCounter to protobuf object *otg.PatternFlowIpv6SrcCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv6SrcCounter + // setMsg unmarshals PatternFlowIpv6SrcCounter from protobuf object *otg.PatternFlowIpv6SrcCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6SrcCounter) PatternFlowIpv6SrcCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv6SrcCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6SrcCounter + // validate validates PatternFlowIpv6SrcCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6SrcCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowIpv6SrcCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowIpv6SrcCounter + SetStart(value string) PatternFlowIpv6SrcCounter + // HasStart checks if Start has been set in PatternFlowIpv6SrcCounter + HasStart() bool + // Step returns string, set in PatternFlowIpv6SrcCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowIpv6SrcCounter + SetStep(value string) PatternFlowIpv6SrcCounter + // HasStep checks if Step has been set in PatternFlowIpv6SrcCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv6SrcCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv6SrcCounter + SetCount(value uint32) PatternFlowIpv6SrcCounter + // HasCount checks if Count has been set in PatternFlowIpv6SrcCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowIpv6SrcCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowIpv6SrcCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowIpv6SrcCounter object +func (obj *patternFlowIpv6SrcCounter) SetStart(value string) PatternFlowIpv6SrcCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowIpv6SrcCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowIpv6SrcCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowIpv6SrcCounter object +func (obj *patternFlowIpv6SrcCounter) SetStep(value string) PatternFlowIpv6SrcCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6SrcCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6SrcCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv6SrcCounter object +func (obj *patternFlowIpv6SrcCounter) SetCount(value uint32) PatternFlowIpv6SrcCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv6SrcCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateIpv6(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv6SrcCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateIpv6(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowIpv6SrcCounter.Step")) + } + + } + +} + +func (obj *patternFlowIpv6SrcCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("::0") + } + if obj.obj.Step == nil { + obj.SetStep("::1") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_src_metric_tag.go b/gosnappi/pattern_flow_ipv6_src_metric_tag.go new file mode 100644 index 00000000..e4efd717 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_src_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6SrcMetricTag ***** +type patternFlowIpv6SrcMetricTag struct { + validation + obj *otg.PatternFlowIpv6SrcMetricTag + marshaller marshalPatternFlowIpv6SrcMetricTag + unMarshaller unMarshalPatternFlowIpv6SrcMetricTag +} + +func NewPatternFlowIpv6SrcMetricTag() PatternFlowIpv6SrcMetricTag { + obj := patternFlowIpv6SrcMetricTag{obj: &otg.PatternFlowIpv6SrcMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6SrcMetricTag) msg() *otg.PatternFlowIpv6SrcMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv6SrcMetricTag) setMsg(msg *otg.PatternFlowIpv6SrcMetricTag) PatternFlowIpv6SrcMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6SrcMetricTag struct { + obj *patternFlowIpv6SrcMetricTag +} + +type marshalPatternFlowIpv6SrcMetricTag interface { + // ToProto marshals PatternFlowIpv6SrcMetricTag to protobuf object *otg.PatternFlowIpv6SrcMetricTag + ToProto() (*otg.PatternFlowIpv6SrcMetricTag, error) + // ToPbText marshals PatternFlowIpv6SrcMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6SrcMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6SrcMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6SrcMetricTag struct { + obj *patternFlowIpv6SrcMetricTag +} + +type unMarshalPatternFlowIpv6SrcMetricTag interface { + // FromProto unmarshals PatternFlowIpv6SrcMetricTag from protobuf object *otg.PatternFlowIpv6SrcMetricTag + FromProto(msg *otg.PatternFlowIpv6SrcMetricTag) (PatternFlowIpv6SrcMetricTag, error) + // FromPbText unmarshals PatternFlowIpv6SrcMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6SrcMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6SrcMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6SrcMetricTag) Marshal() marshalPatternFlowIpv6SrcMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6SrcMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6SrcMetricTag) Unmarshal() unMarshalPatternFlowIpv6SrcMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6SrcMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6SrcMetricTag) ToProto() (*otg.PatternFlowIpv6SrcMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6SrcMetricTag) FromProto(msg *otg.PatternFlowIpv6SrcMetricTag) (PatternFlowIpv6SrcMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6SrcMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6SrcMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6SrcMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6SrcMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6SrcMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6SrcMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6SrcMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6SrcMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6SrcMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6SrcMetricTag) Clone() (PatternFlowIpv6SrcMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6SrcMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6SrcMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv6SrcMetricTag interface { + Validation + // msg marshals PatternFlowIpv6SrcMetricTag to protobuf object *otg.PatternFlowIpv6SrcMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv6SrcMetricTag + // setMsg unmarshals PatternFlowIpv6SrcMetricTag from protobuf object *otg.PatternFlowIpv6SrcMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6SrcMetricTag) PatternFlowIpv6SrcMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv6SrcMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6SrcMetricTag + // validate validates PatternFlowIpv6SrcMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6SrcMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv6SrcMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv6SrcMetricTag + SetName(value string) PatternFlowIpv6SrcMetricTag + // Offset returns uint32, set in PatternFlowIpv6SrcMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv6SrcMetricTag + SetOffset(value uint32) PatternFlowIpv6SrcMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv6SrcMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv6SrcMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv6SrcMetricTag + SetLength(value uint32) PatternFlowIpv6SrcMetricTag + // HasLength checks if Length has been set in PatternFlowIpv6SrcMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv6SrcMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv6SrcMetricTag object +func (obj *patternFlowIpv6SrcMetricTag) SetName(value string) PatternFlowIpv6SrcMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6SrcMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6SrcMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv6SrcMetricTag object +func (obj *patternFlowIpv6SrcMetricTag) SetOffset(value uint32) PatternFlowIpv6SrcMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6SrcMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6SrcMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv6SrcMetricTag object +func (obj *patternFlowIpv6SrcMetricTag) SetLength(value uint32) PatternFlowIpv6SrcMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv6SrcMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv6SrcMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 127 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6SrcMetricTag.Offset <= 127 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv6SrcMetricTag.Length <= 128 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv6SrcMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(128) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_traffic_class.go b/gosnappi/pattern_flow_ipv6_traffic_class.go new file mode 100644 index 00000000..8af2010d --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_traffic_class.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6TrafficClass ***** +type patternFlowIpv6TrafficClass struct { + validation + obj *otg.PatternFlowIpv6TrafficClass + marshaller marshalPatternFlowIpv6TrafficClass + unMarshaller unMarshalPatternFlowIpv6TrafficClass + incrementHolder PatternFlowIpv6TrafficClassCounter + decrementHolder PatternFlowIpv6TrafficClassCounter + metricTagsHolder PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter +} + +func NewPatternFlowIpv6TrafficClass() PatternFlowIpv6TrafficClass { + obj := patternFlowIpv6TrafficClass{obj: &otg.PatternFlowIpv6TrafficClass{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6TrafficClass) msg() *otg.PatternFlowIpv6TrafficClass { + return obj.obj +} + +func (obj *patternFlowIpv6TrafficClass) setMsg(msg *otg.PatternFlowIpv6TrafficClass) PatternFlowIpv6TrafficClass { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6TrafficClass struct { + obj *patternFlowIpv6TrafficClass +} + +type marshalPatternFlowIpv6TrafficClass interface { + // ToProto marshals PatternFlowIpv6TrafficClass to protobuf object *otg.PatternFlowIpv6TrafficClass + ToProto() (*otg.PatternFlowIpv6TrafficClass, error) + // ToPbText marshals PatternFlowIpv6TrafficClass to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6TrafficClass to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6TrafficClass to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6TrafficClass struct { + obj *patternFlowIpv6TrafficClass +} + +type unMarshalPatternFlowIpv6TrafficClass interface { + // FromProto unmarshals PatternFlowIpv6TrafficClass from protobuf object *otg.PatternFlowIpv6TrafficClass + FromProto(msg *otg.PatternFlowIpv6TrafficClass) (PatternFlowIpv6TrafficClass, error) + // FromPbText unmarshals PatternFlowIpv6TrafficClass from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6TrafficClass from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6TrafficClass from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6TrafficClass) Marshal() marshalPatternFlowIpv6TrafficClass { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6TrafficClass{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6TrafficClass) Unmarshal() unMarshalPatternFlowIpv6TrafficClass { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6TrafficClass{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6TrafficClass) ToProto() (*otg.PatternFlowIpv6TrafficClass, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6TrafficClass) FromProto(msg *otg.PatternFlowIpv6TrafficClass) (PatternFlowIpv6TrafficClass, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6TrafficClass) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6TrafficClass) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6TrafficClass) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6TrafficClass) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6TrafficClass) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6TrafficClass) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6TrafficClass) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6TrafficClass) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6TrafficClass) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6TrafficClass) Clone() (PatternFlowIpv6TrafficClass, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6TrafficClass() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv6TrafficClass) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv6TrafficClass is traffic class +type PatternFlowIpv6TrafficClass interface { + Validation + // msg marshals PatternFlowIpv6TrafficClass to protobuf object *otg.PatternFlowIpv6TrafficClass + // and doesn't set defaults + msg() *otg.PatternFlowIpv6TrafficClass + // setMsg unmarshals PatternFlowIpv6TrafficClass from protobuf object *otg.PatternFlowIpv6TrafficClass + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6TrafficClass) PatternFlowIpv6TrafficClass + // provides marshal interface + Marshal() marshalPatternFlowIpv6TrafficClass + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6TrafficClass + // validate validates PatternFlowIpv6TrafficClass + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6TrafficClass, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv6TrafficClassChoiceEnum, set in PatternFlowIpv6TrafficClass + Choice() PatternFlowIpv6TrafficClassChoiceEnum + // setChoice assigns PatternFlowIpv6TrafficClassChoiceEnum provided by user to PatternFlowIpv6TrafficClass + setChoice(value PatternFlowIpv6TrafficClassChoiceEnum) PatternFlowIpv6TrafficClass + // HasChoice checks if Choice has been set in PatternFlowIpv6TrafficClass + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv6TrafficClass. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv6TrafficClass + SetValue(value uint32) PatternFlowIpv6TrafficClass + // HasValue checks if Value has been set in PatternFlowIpv6TrafficClass + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv6TrafficClass. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv6TrafficClass + SetValues(value []uint32) PatternFlowIpv6TrafficClass + // Increment returns PatternFlowIpv6TrafficClassCounter, set in PatternFlowIpv6TrafficClass. + // PatternFlowIpv6TrafficClassCounter is integer counter pattern + Increment() PatternFlowIpv6TrafficClassCounter + // SetIncrement assigns PatternFlowIpv6TrafficClassCounter provided by user to PatternFlowIpv6TrafficClass. + // PatternFlowIpv6TrafficClassCounter is integer counter pattern + SetIncrement(value PatternFlowIpv6TrafficClassCounter) PatternFlowIpv6TrafficClass + // HasIncrement checks if Increment has been set in PatternFlowIpv6TrafficClass + HasIncrement() bool + // Decrement returns PatternFlowIpv6TrafficClassCounter, set in PatternFlowIpv6TrafficClass. + // PatternFlowIpv6TrafficClassCounter is integer counter pattern + Decrement() PatternFlowIpv6TrafficClassCounter + // SetDecrement assigns PatternFlowIpv6TrafficClassCounter provided by user to PatternFlowIpv6TrafficClass. + // PatternFlowIpv6TrafficClassCounter is integer counter pattern + SetDecrement(value PatternFlowIpv6TrafficClassCounter) PatternFlowIpv6TrafficClass + // HasDecrement checks if Decrement has been set in PatternFlowIpv6TrafficClass + HasDecrement() bool + // MetricTags returns PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIterIter, set in PatternFlowIpv6TrafficClass + MetricTags() PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter + setNil() +} + +type PatternFlowIpv6TrafficClassChoiceEnum string + +// Enum of Choice on PatternFlowIpv6TrafficClass +var PatternFlowIpv6TrafficClassChoice = struct { + VALUE PatternFlowIpv6TrafficClassChoiceEnum + VALUES PatternFlowIpv6TrafficClassChoiceEnum + INCREMENT PatternFlowIpv6TrafficClassChoiceEnum + DECREMENT PatternFlowIpv6TrafficClassChoiceEnum +}{ + VALUE: PatternFlowIpv6TrafficClassChoiceEnum("value"), + VALUES: PatternFlowIpv6TrafficClassChoiceEnum("values"), + INCREMENT: PatternFlowIpv6TrafficClassChoiceEnum("increment"), + DECREMENT: PatternFlowIpv6TrafficClassChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv6TrafficClass) Choice() PatternFlowIpv6TrafficClassChoiceEnum { + return PatternFlowIpv6TrafficClassChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv6TrafficClass) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv6TrafficClass) setChoice(value PatternFlowIpv6TrafficClassChoiceEnum) PatternFlowIpv6TrafficClass { + intValue, ok := otg.PatternFlowIpv6TrafficClass_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv6TrafficClassChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv6TrafficClass_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv6TrafficClassChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv6TrafficClassChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv6TrafficClassChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv6TrafficClassCounter().msg() + } + + if value == PatternFlowIpv6TrafficClassChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv6TrafficClassCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv6TrafficClass) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv6TrafficClassChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv6TrafficClass) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv6TrafficClass object +func (obj *patternFlowIpv6TrafficClass) SetValue(value uint32) PatternFlowIpv6TrafficClass { + obj.setChoice(PatternFlowIpv6TrafficClassChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv6TrafficClass) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv6TrafficClass object +func (obj *patternFlowIpv6TrafficClass) SetValues(value []uint32) PatternFlowIpv6TrafficClass { + obj.setChoice(PatternFlowIpv6TrafficClassChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv6TrafficClassCounter +func (obj *patternFlowIpv6TrafficClass) Increment() PatternFlowIpv6TrafficClassCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv6TrafficClassChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv6TrafficClassCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv6TrafficClassCounter +func (obj *patternFlowIpv6TrafficClass) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv6TrafficClassCounter value in the PatternFlowIpv6TrafficClass object +func (obj *patternFlowIpv6TrafficClass) SetIncrement(value PatternFlowIpv6TrafficClassCounter) PatternFlowIpv6TrafficClass { + obj.setChoice(PatternFlowIpv6TrafficClassChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv6TrafficClassCounter +func (obj *patternFlowIpv6TrafficClass) Decrement() PatternFlowIpv6TrafficClassCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv6TrafficClassChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv6TrafficClassCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv6TrafficClassCounter +func (obj *patternFlowIpv6TrafficClass) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv6TrafficClassCounter value in the PatternFlowIpv6TrafficClass object +func (obj *patternFlowIpv6TrafficClass) SetDecrement(value PatternFlowIpv6TrafficClassCounter) PatternFlowIpv6TrafficClass { + obj.setChoice(PatternFlowIpv6TrafficClassChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv6TrafficClassMetricTag +func (obj *patternFlowIpv6TrafficClass) MetricTags() PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv6TrafficClassMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter struct { + obj *patternFlowIpv6TrafficClass + patternFlowIpv6TrafficClassMetricTagSlice []PatternFlowIpv6TrafficClassMetricTag + fieldPtr *[]*otg.PatternFlowIpv6TrafficClassMetricTag +} + +func newPatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter(ptr *[]*otg.PatternFlowIpv6TrafficClassMetricTag) PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter { + return &patternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter interface { + setMsg(*patternFlowIpv6TrafficClass) PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter + Items() []PatternFlowIpv6TrafficClassMetricTag + Add() PatternFlowIpv6TrafficClassMetricTag + Append(items ...PatternFlowIpv6TrafficClassMetricTag) PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter + Set(index int, newObj PatternFlowIpv6TrafficClassMetricTag) PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter + Clear() PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter + clearHolderSlice() PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter + appendHolderSlice(item PatternFlowIpv6TrafficClassMetricTag) PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter +} + +func (obj *patternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter) setMsg(msg *patternFlowIpv6TrafficClass) PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv6TrafficClassMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter) Items() []PatternFlowIpv6TrafficClassMetricTag { + return obj.patternFlowIpv6TrafficClassMetricTagSlice +} + +func (obj *patternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter) Add() PatternFlowIpv6TrafficClassMetricTag { + newObj := &otg.PatternFlowIpv6TrafficClassMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv6TrafficClassMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv6TrafficClassMetricTagSlice = append(obj.patternFlowIpv6TrafficClassMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter) Append(items ...PatternFlowIpv6TrafficClassMetricTag) PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv6TrafficClassMetricTagSlice = append(obj.patternFlowIpv6TrafficClassMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter) Set(index int, newObj PatternFlowIpv6TrafficClassMetricTag) PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv6TrafficClassMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter) Clear() PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv6TrafficClassMetricTag{} + obj.patternFlowIpv6TrafficClassMetricTagSlice = []PatternFlowIpv6TrafficClassMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter) clearHolderSlice() PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter { + if len(obj.patternFlowIpv6TrafficClassMetricTagSlice) > 0 { + obj.patternFlowIpv6TrafficClassMetricTagSlice = []PatternFlowIpv6TrafficClassMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter) appendHolderSlice(item PatternFlowIpv6TrafficClassMetricTag) PatternFlowIpv6TrafficClassPatternFlowIpv6TrafficClassMetricTagIter { + obj.patternFlowIpv6TrafficClassMetricTagSlice = append(obj.patternFlowIpv6TrafficClassMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv6TrafficClass) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6TrafficClass.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv6TrafficClass.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv6TrafficClassMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv6TrafficClass) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv6TrafficClassChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv6TrafficClassChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv6TrafficClassChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv6TrafficClassChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv6TrafficClassChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv6TrafficClassChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv6TrafficClass") + } + } else { + intVal := otg.PatternFlowIpv6TrafficClass_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv6TrafficClass_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv6_traffic_class_counter.go b/gosnappi/pattern_flow_ipv6_traffic_class_counter.go new file mode 100644 index 00000000..d193b0de --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_traffic_class_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6TrafficClassCounter ***** +type patternFlowIpv6TrafficClassCounter struct { + validation + obj *otg.PatternFlowIpv6TrafficClassCounter + marshaller marshalPatternFlowIpv6TrafficClassCounter + unMarshaller unMarshalPatternFlowIpv6TrafficClassCounter +} + +func NewPatternFlowIpv6TrafficClassCounter() PatternFlowIpv6TrafficClassCounter { + obj := patternFlowIpv6TrafficClassCounter{obj: &otg.PatternFlowIpv6TrafficClassCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6TrafficClassCounter) msg() *otg.PatternFlowIpv6TrafficClassCounter { + return obj.obj +} + +func (obj *patternFlowIpv6TrafficClassCounter) setMsg(msg *otg.PatternFlowIpv6TrafficClassCounter) PatternFlowIpv6TrafficClassCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6TrafficClassCounter struct { + obj *patternFlowIpv6TrafficClassCounter +} + +type marshalPatternFlowIpv6TrafficClassCounter interface { + // ToProto marshals PatternFlowIpv6TrafficClassCounter to protobuf object *otg.PatternFlowIpv6TrafficClassCounter + ToProto() (*otg.PatternFlowIpv6TrafficClassCounter, error) + // ToPbText marshals PatternFlowIpv6TrafficClassCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6TrafficClassCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6TrafficClassCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6TrafficClassCounter struct { + obj *patternFlowIpv6TrafficClassCounter +} + +type unMarshalPatternFlowIpv6TrafficClassCounter interface { + // FromProto unmarshals PatternFlowIpv6TrafficClassCounter from protobuf object *otg.PatternFlowIpv6TrafficClassCounter + FromProto(msg *otg.PatternFlowIpv6TrafficClassCounter) (PatternFlowIpv6TrafficClassCounter, error) + // FromPbText unmarshals PatternFlowIpv6TrafficClassCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6TrafficClassCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6TrafficClassCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6TrafficClassCounter) Marshal() marshalPatternFlowIpv6TrafficClassCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6TrafficClassCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6TrafficClassCounter) Unmarshal() unMarshalPatternFlowIpv6TrafficClassCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6TrafficClassCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6TrafficClassCounter) ToProto() (*otg.PatternFlowIpv6TrafficClassCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6TrafficClassCounter) FromProto(msg *otg.PatternFlowIpv6TrafficClassCounter) (PatternFlowIpv6TrafficClassCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6TrafficClassCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6TrafficClassCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6TrafficClassCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6TrafficClassCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6TrafficClassCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6TrafficClassCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6TrafficClassCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6TrafficClassCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6TrafficClassCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6TrafficClassCounter) Clone() (PatternFlowIpv6TrafficClassCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6TrafficClassCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6TrafficClassCounter is integer counter pattern +type PatternFlowIpv6TrafficClassCounter interface { + Validation + // msg marshals PatternFlowIpv6TrafficClassCounter to protobuf object *otg.PatternFlowIpv6TrafficClassCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv6TrafficClassCounter + // setMsg unmarshals PatternFlowIpv6TrafficClassCounter from protobuf object *otg.PatternFlowIpv6TrafficClassCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6TrafficClassCounter) PatternFlowIpv6TrafficClassCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv6TrafficClassCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6TrafficClassCounter + // validate validates PatternFlowIpv6TrafficClassCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6TrafficClassCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv6TrafficClassCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv6TrafficClassCounter + SetStart(value uint32) PatternFlowIpv6TrafficClassCounter + // HasStart checks if Start has been set in PatternFlowIpv6TrafficClassCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv6TrafficClassCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv6TrafficClassCounter + SetStep(value uint32) PatternFlowIpv6TrafficClassCounter + // HasStep checks if Step has been set in PatternFlowIpv6TrafficClassCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv6TrafficClassCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv6TrafficClassCounter + SetCount(value uint32) PatternFlowIpv6TrafficClassCounter + // HasCount checks if Count has been set in PatternFlowIpv6TrafficClassCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv6TrafficClassCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv6TrafficClassCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv6TrafficClassCounter object +func (obj *patternFlowIpv6TrafficClassCounter) SetStart(value uint32) PatternFlowIpv6TrafficClassCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv6TrafficClassCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv6TrafficClassCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv6TrafficClassCounter object +func (obj *patternFlowIpv6TrafficClassCounter) SetStep(value uint32) PatternFlowIpv6TrafficClassCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6TrafficClassCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6TrafficClassCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv6TrafficClassCounter object +func (obj *patternFlowIpv6TrafficClassCounter) SetCount(value uint32) PatternFlowIpv6TrafficClassCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv6TrafficClassCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6TrafficClassCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6TrafficClassCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6TrafficClassCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv6TrafficClassCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_traffic_class_metric_tag.go b/gosnappi/pattern_flow_ipv6_traffic_class_metric_tag.go new file mode 100644 index 00000000..6f9a71d3 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_traffic_class_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6TrafficClassMetricTag ***** +type patternFlowIpv6TrafficClassMetricTag struct { + validation + obj *otg.PatternFlowIpv6TrafficClassMetricTag + marshaller marshalPatternFlowIpv6TrafficClassMetricTag + unMarshaller unMarshalPatternFlowIpv6TrafficClassMetricTag +} + +func NewPatternFlowIpv6TrafficClassMetricTag() PatternFlowIpv6TrafficClassMetricTag { + obj := patternFlowIpv6TrafficClassMetricTag{obj: &otg.PatternFlowIpv6TrafficClassMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6TrafficClassMetricTag) msg() *otg.PatternFlowIpv6TrafficClassMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv6TrafficClassMetricTag) setMsg(msg *otg.PatternFlowIpv6TrafficClassMetricTag) PatternFlowIpv6TrafficClassMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6TrafficClassMetricTag struct { + obj *patternFlowIpv6TrafficClassMetricTag +} + +type marshalPatternFlowIpv6TrafficClassMetricTag interface { + // ToProto marshals PatternFlowIpv6TrafficClassMetricTag to protobuf object *otg.PatternFlowIpv6TrafficClassMetricTag + ToProto() (*otg.PatternFlowIpv6TrafficClassMetricTag, error) + // ToPbText marshals PatternFlowIpv6TrafficClassMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6TrafficClassMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6TrafficClassMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6TrafficClassMetricTag struct { + obj *patternFlowIpv6TrafficClassMetricTag +} + +type unMarshalPatternFlowIpv6TrafficClassMetricTag interface { + // FromProto unmarshals PatternFlowIpv6TrafficClassMetricTag from protobuf object *otg.PatternFlowIpv6TrafficClassMetricTag + FromProto(msg *otg.PatternFlowIpv6TrafficClassMetricTag) (PatternFlowIpv6TrafficClassMetricTag, error) + // FromPbText unmarshals PatternFlowIpv6TrafficClassMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6TrafficClassMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6TrafficClassMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6TrafficClassMetricTag) Marshal() marshalPatternFlowIpv6TrafficClassMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6TrafficClassMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6TrafficClassMetricTag) Unmarshal() unMarshalPatternFlowIpv6TrafficClassMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6TrafficClassMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6TrafficClassMetricTag) ToProto() (*otg.PatternFlowIpv6TrafficClassMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6TrafficClassMetricTag) FromProto(msg *otg.PatternFlowIpv6TrafficClassMetricTag) (PatternFlowIpv6TrafficClassMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6TrafficClassMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6TrafficClassMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6TrafficClassMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6TrafficClassMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6TrafficClassMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6TrafficClassMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6TrafficClassMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6TrafficClassMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6TrafficClassMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6TrafficClassMetricTag) Clone() (PatternFlowIpv6TrafficClassMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6TrafficClassMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6TrafficClassMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv6TrafficClassMetricTag interface { + Validation + // msg marshals PatternFlowIpv6TrafficClassMetricTag to protobuf object *otg.PatternFlowIpv6TrafficClassMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv6TrafficClassMetricTag + // setMsg unmarshals PatternFlowIpv6TrafficClassMetricTag from protobuf object *otg.PatternFlowIpv6TrafficClassMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6TrafficClassMetricTag) PatternFlowIpv6TrafficClassMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv6TrafficClassMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6TrafficClassMetricTag + // validate validates PatternFlowIpv6TrafficClassMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6TrafficClassMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv6TrafficClassMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv6TrafficClassMetricTag + SetName(value string) PatternFlowIpv6TrafficClassMetricTag + // Offset returns uint32, set in PatternFlowIpv6TrafficClassMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv6TrafficClassMetricTag + SetOffset(value uint32) PatternFlowIpv6TrafficClassMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv6TrafficClassMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv6TrafficClassMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv6TrafficClassMetricTag + SetLength(value uint32) PatternFlowIpv6TrafficClassMetricTag + // HasLength checks if Length has been set in PatternFlowIpv6TrafficClassMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv6TrafficClassMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv6TrafficClassMetricTag object +func (obj *patternFlowIpv6TrafficClassMetricTag) SetName(value string) PatternFlowIpv6TrafficClassMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6TrafficClassMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6TrafficClassMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv6TrafficClassMetricTag object +func (obj *patternFlowIpv6TrafficClassMetricTag) SetOffset(value uint32) PatternFlowIpv6TrafficClassMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6TrafficClassMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6TrafficClassMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv6TrafficClassMetricTag object +func (obj *patternFlowIpv6TrafficClassMetricTag) SetLength(value uint32) PatternFlowIpv6TrafficClassMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv6TrafficClassMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv6TrafficClassMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6TrafficClassMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv6TrafficClassMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv6TrafficClassMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_version.go b/gosnappi/pattern_flow_ipv6_version.go new file mode 100644 index 00000000..12ff05df --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_version.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6Version ***** +type patternFlowIpv6Version struct { + validation + obj *otg.PatternFlowIpv6Version + marshaller marshalPatternFlowIpv6Version + unMarshaller unMarshalPatternFlowIpv6Version + incrementHolder PatternFlowIpv6VersionCounter + decrementHolder PatternFlowIpv6VersionCounter + metricTagsHolder PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter +} + +func NewPatternFlowIpv6Version() PatternFlowIpv6Version { + obj := patternFlowIpv6Version{obj: &otg.PatternFlowIpv6Version{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6Version) msg() *otg.PatternFlowIpv6Version { + return obj.obj +} + +func (obj *patternFlowIpv6Version) setMsg(msg *otg.PatternFlowIpv6Version) PatternFlowIpv6Version { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6Version struct { + obj *patternFlowIpv6Version +} + +type marshalPatternFlowIpv6Version interface { + // ToProto marshals PatternFlowIpv6Version to protobuf object *otg.PatternFlowIpv6Version + ToProto() (*otg.PatternFlowIpv6Version, error) + // ToPbText marshals PatternFlowIpv6Version to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6Version to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6Version to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6Version struct { + obj *patternFlowIpv6Version +} + +type unMarshalPatternFlowIpv6Version interface { + // FromProto unmarshals PatternFlowIpv6Version from protobuf object *otg.PatternFlowIpv6Version + FromProto(msg *otg.PatternFlowIpv6Version) (PatternFlowIpv6Version, error) + // FromPbText unmarshals PatternFlowIpv6Version from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6Version from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6Version from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6Version) Marshal() marshalPatternFlowIpv6Version { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6Version{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6Version) Unmarshal() unMarshalPatternFlowIpv6Version { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6Version{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6Version) ToProto() (*otg.PatternFlowIpv6Version, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6Version) FromProto(msg *otg.PatternFlowIpv6Version) (PatternFlowIpv6Version, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6Version) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6Version) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6Version) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6Version) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6Version) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6Version) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6Version) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6Version) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6Version) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6Version) Clone() (PatternFlowIpv6Version, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6Version() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowIpv6Version) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowIpv6Version is version number +type PatternFlowIpv6Version interface { + Validation + // msg marshals PatternFlowIpv6Version to protobuf object *otg.PatternFlowIpv6Version + // and doesn't set defaults + msg() *otg.PatternFlowIpv6Version + // setMsg unmarshals PatternFlowIpv6Version from protobuf object *otg.PatternFlowIpv6Version + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6Version) PatternFlowIpv6Version + // provides marshal interface + Marshal() marshalPatternFlowIpv6Version + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6Version + // validate validates PatternFlowIpv6Version + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6Version, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowIpv6VersionChoiceEnum, set in PatternFlowIpv6Version + Choice() PatternFlowIpv6VersionChoiceEnum + // setChoice assigns PatternFlowIpv6VersionChoiceEnum provided by user to PatternFlowIpv6Version + setChoice(value PatternFlowIpv6VersionChoiceEnum) PatternFlowIpv6Version + // HasChoice checks if Choice has been set in PatternFlowIpv6Version + HasChoice() bool + // Value returns uint32, set in PatternFlowIpv6Version. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowIpv6Version + SetValue(value uint32) PatternFlowIpv6Version + // HasValue checks if Value has been set in PatternFlowIpv6Version + HasValue() bool + // Values returns []uint32, set in PatternFlowIpv6Version. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowIpv6Version + SetValues(value []uint32) PatternFlowIpv6Version + // Increment returns PatternFlowIpv6VersionCounter, set in PatternFlowIpv6Version. + // PatternFlowIpv6VersionCounter is integer counter pattern + Increment() PatternFlowIpv6VersionCounter + // SetIncrement assigns PatternFlowIpv6VersionCounter provided by user to PatternFlowIpv6Version. + // PatternFlowIpv6VersionCounter is integer counter pattern + SetIncrement(value PatternFlowIpv6VersionCounter) PatternFlowIpv6Version + // HasIncrement checks if Increment has been set in PatternFlowIpv6Version + HasIncrement() bool + // Decrement returns PatternFlowIpv6VersionCounter, set in PatternFlowIpv6Version. + // PatternFlowIpv6VersionCounter is integer counter pattern + Decrement() PatternFlowIpv6VersionCounter + // SetDecrement assigns PatternFlowIpv6VersionCounter provided by user to PatternFlowIpv6Version. + // PatternFlowIpv6VersionCounter is integer counter pattern + SetDecrement(value PatternFlowIpv6VersionCounter) PatternFlowIpv6Version + // HasDecrement checks if Decrement has been set in PatternFlowIpv6Version + HasDecrement() bool + // MetricTags returns PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIterIter, set in PatternFlowIpv6Version + MetricTags() PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter + setNil() +} + +type PatternFlowIpv6VersionChoiceEnum string + +// Enum of Choice on PatternFlowIpv6Version +var PatternFlowIpv6VersionChoice = struct { + VALUE PatternFlowIpv6VersionChoiceEnum + VALUES PatternFlowIpv6VersionChoiceEnum + INCREMENT PatternFlowIpv6VersionChoiceEnum + DECREMENT PatternFlowIpv6VersionChoiceEnum +}{ + VALUE: PatternFlowIpv6VersionChoiceEnum("value"), + VALUES: PatternFlowIpv6VersionChoiceEnum("values"), + INCREMENT: PatternFlowIpv6VersionChoiceEnum("increment"), + DECREMENT: PatternFlowIpv6VersionChoiceEnum("decrement"), +} + +func (obj *patternFlowIpv6Version) Choice() PatternFlowIpv6VersionChoiceEnum { + return PatternFlowIpv6VersionChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowIpv6Version) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowIpv6Version) setChoice(value PatternFlowIpv6VersionChoiceEnum) PatternFlowIpv6Version { + intValue, ok := otg.PatternFlowIpv6Version_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowIpv6VersionChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowIpv6Version_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowIpv6VersionChoice.VALUE { + defaultValue := uint32(6) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowIpv6VersionChoice.VALUES { + defaultValue := []uint32{6} + obj.obj.Values = defaultValue + } + + if value == PatternFlowIpv6VersionChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowIpv6VersionCounter().msg() + } + + if value == PatternFlowIpv6VersionChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowIpv6VersionCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv6Version) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowIpv6VersionChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowIpv6Version) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowIpv6Version object +func (obj *patternFlowIpv6Version) SetValue(value uint32) PatternFlowIpv6Version { + obj.setChoice(PatternFlowIpv6VersionChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowIpv6Version) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{6}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowIpv6Version object +func (obj *patternFlowIpv6Version) SetValues(value []uint32) PatternFlowIpv6Version { + obj.setChoice(PatternFlowIpv6VersionChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowIpv6VersionCounter +func (obj *patternFlowIpv6Version) Increment() PatternFlowIpv6VersionCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowIpv6VersionChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowIpv6VersionCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowIpv6VersionCounter +func (obj *patternFlowIpv6Version) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowIpv6VersionCounter value in the PatternFlowIpv6Version object +func (obj *patternFlowIpv6Version) SetIncrement(value PatternFlowIpv6VersionCounter) PatternFlowIpv6Version { + obj.setChoice(PatternFlowIpv6VersionChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowIpv6VersionCounter +func (obj *patternFlowIpv6Version) Decrement() PatternFlowIpv6VersionCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowIpv6VersionChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowIpv6VersionCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowIpv6VersionCounter +func (obj *patternFlowIpv6Version) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowIpv6VersionCounter value in the PatternFlowIpv6Version object +func (obj *patternFlowIpv6Version) SetDecrement(value PatternFlowIpv6VersionCounter) PatternFlowIpv6Version { + obj.setChoice(PatternFlowIpv6VersionChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowIpv6VersionMetricTag +func (obj *patternFlowIpv6Version) MetricTags() PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowIpv6VersionMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter struct { + obj *patternFlowIpv6Version + patternFlowIpv6VersionMetricTagSlice []PatternFlowIpv6VersionMetricTag + fieldPtr *[]*otg.PatternFlowIpv6VersionMetricTag +} + +func newPatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter(ptr *[]*otg.PatternFlowIpv6VersionMetricTag) PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter { + return &patternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter interface { + setMsg(*patternFlowIpv6Version) PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter + Items() []PatternFlowIpv6VersionMetricTag + Add() PatternFlowIpv6VersionMetricTag + Append(items ...PatternFlowIpv6VersionMetricTag) PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter + Set(index int, newObj PatternFlowIpv6VersionMetricTag) PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter + Clear() PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter + clearHolderSlice() PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter + appendHolderSlice(item PatternFlowIpv6VersionMetricTag) PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter +} + +func (obj *patternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter) setMsg(msg *patternFlowIpv6Version) PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowIpv6VersionMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter) Items() []PatternFlowIpv6VersionMetricTag { + return obj.patternFlowIpv6VersionMetricTagSlice +} + +func (obj *patternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter) Add() PatternFlowIpv6VersionMetricTag { + newObj := &otg.PatternFlowIpv6VersionMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowIpv6VersionMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowIpv6VersionMetricTagSlice = append(obj.patternFlowIpv6VersionMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter) Append(items ...PatternFlowIpv6VersionMetricTag) PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowIpv6VersionMetricTagSlice = append(obj.patternFlowIpv6VersionMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter) Set(index int, newObj PatternFlowIpv6VersionMetricTag) PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowIpv6VersionMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter) Clear() PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowIpv6VersionMetricTag{} + obj.patternFlowIpv6VersionMetricTagSlice = []PatternFlowIpv6VersionMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter) clearHolderSlice() PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter { + if len(obj.patternFlowIpv6VersionMetricTagSlice) > 0 { + obj.patternFlowIpv6VersionMetricTagSlice = []PatternFlowIpv6VersionMetricTag{} + } + return obj +} +func (obj *patternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter) appendHolderSlice(item PatternFlowIpv6VersionMetricTag) PatternFlowIpv6VersionPatternFlowIpv6VersionMetricTagIter { + obj.patternFlowIpv6VersionMetricTagSlice = append(obj.patternFlowIpv6VersionMetricTagSlice, item) + return obj +} + +func (obj *patternFlowIpv6Version) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6Version.Value <= 15 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowIpv6Version.Values <= 15 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowIpv6VersionMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowIpv6Version) setDefault() { + var choices_set int = 0 + var choice PatternFlowIpv6VersionChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowIpv6VersionChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowIpv6VersionChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowIpv6VersionChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowIpv6VersionChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowIpv6VersionChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowIpv6Version") + } + } else { + intVal := otg.PatternFlowIpv6Version_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowIpv6Version_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ipv6_version_counter.go b/gosnappi/pattern_flow_ipv6_version_counter.go new file mode 100644 index 00000000..8993e32e --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_version_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6VersionCounter ***** +type patternFlowIpv6VersionCounter struct { + validation + obj *otg.PatternFlowIpv6VersionCounter + marshaller marshalPatternFlowIpv6VersionCounter + unMarshaller unMarshalPatternFlowIpv6VersionCounter +} + +func NewPatternFlowIpv6VersionCounter() PatternFlowIpv6VersionCounter { + obj := patternFlowIpv6VersionCounter{obj: &otg.PatternFlowIpv6VersionCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6VersionCounter) msg() *otg.PatternFlowIpv6VersionCounter { + return obj.obj +} + +func (obj *patternFlowIpv6VersionCounter) setMsg(msg *otg.PatternFlowIpv6VersionCounter) PatternFlowIpv6VersionCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6VersionCounter struct { + obj *patternFlowIpv6VersionCounter +} + +type marshalPatternFlowIpv6VersionCounter interface { + // ToProto marshals PatternFlowIpv6VersionCounter to protobuf object *otg.PatternFlowIpv6VersionCounter + ToProto() (*otg.PatternFlowIpv6VersionCounter, error) + // ToPbText marshals PatternFlowIpv6VersionCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6VersionCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6VersionCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6VersionCounter struct { + obj *patternFlowIpv6VersionCounter +} + +type unMarshalPatternFlowIpv6VersionCounter interface { + // FromProto unmarshals PatternFlowIpv6VersionCounter from protobuf object *otg.PatternFlowIpv6VersionCounter + FromProto(msg *otg.PatternFlowIpv6VersionCounter) (PatternFlowIpv6VersionCounter, error) + // FromPbText unmarshals PatternFlowIpv6VersionCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6VersionCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6VersionCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6VersionCounter) Marshal() marshalPatternFlowIpv6VersionCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6VersionCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6VersionCounter) Unmarshal() unMarshalPatternFlowIpv6VersionCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6VersionCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6VersionCounter) ToProto() (*otg.PatternFlowIpv6VersionCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6VersionCounter) FromProto(msg *otg.PatternFlowIpv6VersionCounter) (PatternFlowIpv6VersionCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6VersionCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6VersionCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6VersionCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6VersionCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6VersionCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6VersionCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6VersionCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6VersionCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6VersionCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6VersionCounter) Clone() (PatternFlowIpv6VersionCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6VersionCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6VersionCounter is integer counter pattern +type PatternFlowIpv6VersionCounter interface { + Validation + // msg marshals PatternFlowIpv6VersionCounter to protobuf object *otg.PatternFlowIpv6VersionCounter + // and doesn't set defaults + msg() *otg.PatternFlowIpv6VersionCounter + // setMsg unmarshals PatternFlowIpv6VersionCounter from protobuf object *otg.PatternFlowIpv6VersionCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6VersionCounter) PatternFlowIpv6VersionCounter + // provides marshal interface + Marshal() marshalPatternFlowIpv6VersionCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6VersionCounter + // validate validates PatternFlowIpv6VersionCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6VersionCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowIpv6VersionCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowIpv6VersionCounter + SetStart(value uint32) PatternFlowIpv6VersionCounter + // HasStart checks if Start has been set in PatternFlowIpv6VersionCounter + HasStart() bool + // Step returns uint32, set in PatternFlowIpv6VersionCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowIpv6VersionCounter + SetStep(value uint32) PatternFlowIpv6VersionCounter + // HasStep checks if Step has been set in PatternFlowIpv6VersionCounter + HasStep() bool + // Count returns uint32, set in PatternFlowIpv6VersionCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowIpv6VersionCounter + SetCount(value uint32) PatternFlowIpv6VersionCounter + // HasCount checks if Count has been set in PatternFlowIpv6VersionCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv6VersionCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowIpv6VersionCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowIpv6VersionCounter object +func (obj *patternFlowIpv6VersionCounter) SetStart(value uint32) PatternFlowIpv6VersionCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv6VersionCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowIpv6VersionCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowIpv6VersionCounter object +func (obj *patternFlowIpv6VersionCounter) SetStep(value uint32) PatternFlowIpv6VersionCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6VersionCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowIpv6VersionCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowIpv6VersionCounter object +func (obj *patternFlowIpv6VersionCounter) SetCount(value uint32) PatternFlowIpv6VersionCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowIpv6VersionCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6VersionCounter.Start <= 15 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6VersionCounter.Step <= 15 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6VersionCounter.Count <= 15 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowIpv6VersionCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(6) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ipv6_version_metric_tag.go b/gosnappi/pattern_flow_ipv6_version_metric_tag.go new file mode 100644 index 00000000..e7ea99f0 --- /dev/null +++ b/gosnappi/pattern_flow_ipv6_version_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowIpv6VersionMetricTag ***** +type patternFlowIpv6VersionMetricTag struct { + validation + obj *otg.PatternFlowIpv6VersionMetricTag + marshaller marshalPatternFlowIpv6VersionMetricTag + unMarshaller unMarshalPatternFlowIpv6VersionMetricTag +} + +func NewPatternFlowIpv6VersionMetricTag() PatternFlowIpv6VersionMetricTag { + obj := patternFlowIpv6VersionMetricTag{obj: &otg.PatternFlowIpv6VersionMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowIpv6VersionMetricTag) msg() *otg.PatternFlowIpv6VersionMetricTag { + return obj.obj +} + +func (obj *patternFlowIpv6VersionMetricTag) setMsg(msg *otg.PatternFlowIpv6VersionMetricTag) PatternFlowIpv6VersionMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowIpv6VersionMetricTag struct { + obj *patternFlowIpv6VersionMetricTag +} + +type marshalPatternFlowIpv6VersionMetricTag interface { + // ToProto marshals PatternFlowIpv6VersionMetricTag to protobuf object *otg.PatternFlowIpv6VersionMetricTag + ToProto() (*otg.PatternFlowIpv6VersionMetricTag, error) + // ToPbText marshals PatternFlowIpv6VersionMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowIpv6VersionMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowIpv6VersionMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowIpv6VersionMetricTag struct { + obj *patternFlowIpv6VersionMetricTag +} + +type unMarshalPatternFlowIpv6VersionMetricTag interface { + // FromProto unmarshals PatternFlowIpv6VersionMetricTag from protobuf object *otg.PatternFlowIpv6VersionMetricTag + FromProto(msg *otg.PatternFlowIpv6VersionMetricTag) (PatternFlowIpv6VersionMetricTag, error) + // FromPbText unmarshals PatternFlowIpv6VersionMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowIpv6VersionMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowIpv6VersionMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowIpv6VersionMetricTag) Marshal() marshalPatternFlowIpv6VersionMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowIpv6VersionMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowIpv6VersionMetricTag) Unmarshal() unMarshalPatternFlowIpv6VersionMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowIpv6VersionMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowIpv6VersionMetricTag) ToProto() (*otg.PatternFlowIpv6VersionMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowIpv6VersionMetricTag) FromProto(msg *otg.PatternFlowIpv6VersionMetricTag) (PatternFlowIpv6VersionMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowIpv6VersionMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowIpv6VersionMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowIpv6VersionMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6VersionMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowIpv6VersionMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowIpv6VersionMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowIpv6VersionMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowIpv6VersionMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowIpv6VersionMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowIpv6VersionMetricTag) Clone() (PatternFlowIpv6VersionMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowIpv6VersionMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowIpv6VersionMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowIpv6VersionMetricTag interface { + Validation + // msg marshals PatternFlowIpv6VersionMetricTag to protobuf object *otg.PatternFlowIpv6VersionMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowIpv6VersionMetricTag + // setMsg unmarshals PatternFlowIpv6VersionMetricTag from protobuf object *otg.PatternFlowIpv6VersionMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowIpv6VersionMetricTag) PatternFlowIpv6VersionMetricTag + // provides marshal interface + Marshal() marshalPatternFlowIpv6VersionMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowIpv6VersionMetricTag + // validate validates PatternFlowIpv6VersionMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowIpv6VersionMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowIpv6VersionMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowIpv6VersionMetricTag + SetName(value string) PatternFlowIpv6VersionMetricTag + // Offset returns uint32, set in PatternFlowIpv6VersionMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowIpv6VersionMetricTag + SetOffset(value uint32) PatternFlowIpv6VersionMetricTag + // HasOffset checks if Offset has been set in PatternFlowIpv6VersionMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowIpv6VersionMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowIpv6VersionMetricTag + SetLength(value uint32) PatternFlowIpv6VersionMetricTag + // HasLength checks if Length has been set in PatternFlowIpv6VersionMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowIpv6VersionMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowIpv6VersionMetricTag object +func (obj *patternFlowIpv6VersionMetricTag) SetName(value string) PatternFlowIpv6VersionMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6VersionMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowIpv6VersionMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowIpv6VersionMetricTag object +func (obj *patternFlowIpv6VersionMetricTag) SetOffset(value uint32) PatternFlowIpv6VersionMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6VersionMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowIpv6VersionMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowIpv6VersionMetricTag object +func (obj *patternFlowIpv6VersionMetricTag) SetLength(value uint32) PatternFlowIpv6VersionMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowIpv6VersionMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowIpv6VersionMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowIpv6VersionMetricTag.Offset <= 3 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 4 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowIpv6VersionMetricTag.Length <= 4 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowIpv6VersionMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(4) + } + +} diff --git a/gosnappi/pattern_flow_mpls_bottom_of_stack.go b/gosnappi/pattern_flow_mpls_bottom_of_stack.go new file mode 100644 index 00000000..18f5f1a5 --- /dev/null +++ b/gosnappi/pattern_flow_mpls_bottom_of_stack.go @@ -0,0 +1,712 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowMplsBottomOfStack ***** +type patternFlowMplsBottomOfStack struct { + validation + obj *otg.PatternFlowMplsBottomOfStack + marshaller marshalPatternFlowMplsBottomOfStack + unMarshaller unMarshalPatternFlowMplsBottomOfStack + incrementHolder PatternFlowMplsBottomOfStackCounter + decrementHolder PatternFlowMplsBottomOfStackCounter + metricTagsHolder PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter +} + +func NewPatternFlowMplsBottomOfStack() PatternFlowMplsBottomOfStack { + obj := patternFlowMplsBottomOfStack{obj: &otg.PatternFlowMplsBottomOfStack{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowMplsBottomOfStack) msg() *otg.PatternFlowMplsBottomOfStack { + return obj.obj +} + +func (obj *patternFlowMplsBottomOfStack) setMsg(msg *otg.PatternFlowMplsBottomOfStack) PatternFlowMplsBottomOfStack { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowMplsBottomOfStack struct { + obj *patternFlowMplsBottomOfStack +} + +type marshalPatternFlowMplsBottomOfStack interface { + // ToProto marshals PatternFlowMplsBottomOfStack to protobuf object *otg.PatternFlowMplsBottomOfStack + ToProto() (*otg.PatternFlowMplsBottomOfStack, error) + // ToPbText marshals PatternFlowMplsBottomOfStack to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowMplsBottomOfStack to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowMplsBottomOfStack to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowMplsBottomOfStack struct { + obj *patternFlowMplsBottomOfStack +} + +type unMarshalPatternFlowMplsBottomOfStack interface { + // FromProto unmarshals PatternFlowMplsBottomOfStack from protobuf object *otg.PatternFlowMplsBottomOfStack + FromProto(msg *otg.PatternFlowMplsBottomOfStack) (PatternFlowMplsBottomOfStack, error) + // FromPbText unmarshals PatternFlowMplsBottomOfStack from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowMplsBottomOfStack from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowMplsBottomOfStack from JSON text + FromJson(value string) error +} + +func (obj *patternFlowMplsBottomOfStack) Marshal() marshalPatternFlowMplsBottomOfStack { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowMplsBottomOfStack{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowMplsBottomOfStack) Unmarshal() unMarshalPatternFlowMplsBottomOfStack { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowMplsBottomOfStack{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowMplsBottomOfStack) ToProto() (*otg.PatternFlowMplsBottomOfStack, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowMplsBottomOfStack) FromProto(msg *otg.PatternFlowMplsBottomOfStack) (PatternFlowMplsBottomOfStack, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowMplsBottomOfStack) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowMplsBottomOfStack) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowMplsBottomOfStack) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsBottomOfStack) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowMplsBottomOfStack) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsBottomOfStack) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowMplsBottomOfStack) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowMplsBottomOfStack) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowMplsBottomOfStack) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowMplsBottomOfStack) Clone() (PatternFlowMplsBottomOfStack, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowMplsBottomOfStack() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowMplsBottomOfStack) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowMplsBottomOfStack is bottom of stack +type PatternFlowMplsBottomOfStack interface { + Validation + // msg marshals PatternFlowMplsBottomOfStack to protobuf object *otg.PatternFlowMplsBottomOfStack + // and doesn't set defaults + msg() *otg.PatternFlowMplsBottomOfStack + // setMsg unmarshals PatternFlowMplsBottomOfStack from protobuf object *otg.PatternFlowMplsBottomOfStack + // and doesn't set defaults + setMsg(*otg.PatternFlowMplsBottomOfStack) PatternFlowMplsBottomOfStack + // provides marshal interface + Marshal() marshalPatternFlowMplsBottomOfStack + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowMplsBottomOfStack + // validate validates PatternFlowMplsBottomOfStack + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowMplsBottomOfStack, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowMplsBottomOfStackChoiceEnum, set in PatternFlowMplsBottomOfStack + Choice() PatternFlowMplsBottomOfStackChoiceEnum + // setChoice assigns PatternFlowMplsBottomOfStackChoiceEnum provided by user to PatternFlowMplsBottomOfStack + setChoice(value PatternFlowMplsBottomOfStackChoiceEnum) PatternFlowMplsBottomOfStack + // HasChoice checks if Choice has been set in PatternFlowMplsBottomOfStack + HasChoice() bool + // Value returns uint32, set in PatternFlowMplsBottomOfStack. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowMplsBottomOfStack + SetValue(value uint32) PatternFlowMplsBottomOfStack + // HasValue checks if Value has been set in PatternFlowMplsBottomOfStack + HasValue() bool + // Values returns []uint32, set in PatternFlowMplsBottomOfStack. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowMplsBottomOfStack + SetValues(value []uint32) PatternFlowMplsBottomOfStack + // Auto returns uint32, set in PatternFlowMplsBottomOfStack. + Auto() uint32 + // HasAuto checks if Auto has been set in PatternFlowMplsBottomOfStack + HasAuto() bool + // Increment returns PatternFlowMplsBottomOfStackCounter, set in PatternFlowMplsBottomOfStack. + // PatternFlowMplsBottomOfStackCounter is integer counter pattern + Increment() PatternFlowMplsBottomOfStackCounter + // SetIncrement assigns PatternFlowMplsBottomOfStackCounter provided by user to PatternFlowMplsBottomOfStack. + // PatternFlowMplsBottomOfStackCounter is integer counter pattern + SetIncrement(value PatternFlowMplsBottomOfStackCounter) PatternFlowMplsBottomOfStack + // HasIncrement checks if Increment has been set in PatternFlowMplsBottomOfStack + HasIncrement() bool + // Decrement returns PatternFlowMplsBottomOfStackCounter, set in PatternFlowMplsBottomOfStack. + // PatternFlowMplsBottomOfStackCounter is integer counter pattern + Decrement() PatternFlowMplsBottomOfStackCounter + // SetDecrement assigns PatternFlowMplsBottomOfStackCounter provided by user to PatternFlowMplsBottomOfStack. + // PatternFlowMplsBottomOfStackCounter is integer counter pattern + SetDecrement(value PatternFlowMplsBottomOfStackCounter) PatternFlowMplsBottomOfStack + // HasDecrement checks if Decrement has been set in PatternFlowMplsBottomOfStack + HasDecrement() bool + // MetricTags returns PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIterIter, set in PatternFlowMplsBottomOfStack + MetricTags() PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter + setNil() +} + +type PatternFlowMplsBottomOfStackChoiceEnum string + +// Enum of Choice on PatternFlowMplsBottomOfStack +var PatternFlowMplsBottomOfStackChoice = struct { + VALUE PatternFlowMplsBottomOfStackChoiceEnum + VALUES PatternFlowMplsBottomOfStackChoiceEnum + AUTO PatternFlowMplsBottomOfStackChoiceEnum + INCREMENT PatternFlowMplsBottomOfStackChoiceEnum + DECREMENT PatternFlowMplsBottomOfStackChoiceEnum +}{ + VALUE: PatternFlowMplsBottomOfStackChoiceEnum("value"), + VALUES: PatternFlowMplsBottomOfStackChoiceEnum("values"), + AUTO: PatternFlowMplsBottomOfStackChoiceEnum("auto"), + INCREMENT: PatternFlowMplsBottomOfStackChoiceEnum("increment"), + DECREMENT: PatternFlowMplsBottomOfStackChoiceEnum("decrement"), +} + +func (obj *patternFlowMplsBottomOfStack) Choice() PatternFlowMplsBottomOfStackChoiceEnum { + return PatternFlowMplsBottomOfStackChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowMplsBottomOfStack) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowMplsBottomOfStack) setChoice(value PatternFlowMplsBottomOfStackChoiceEnum) PatternFlowMplsBottomOfStack { + intValue, ok := otg.PatternFlowMplsBottomOfStack_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowMplsBottomOfStackChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowMplsBottomOfStack_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Auto = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowMplsBottomOfStackChoice.VALUE { + defaultValue := uint32(1) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowMplsBottomOfStackChoice.VALUES { + defaultValue := []uint32{1} + obj.obj.Values = defaultValue + } + + if value == PatternFlowMplsBottomOfStackChoice.AUTO { + defaultValue := uint32(1) + obj.obj.Auto = &defaultValue + } + + if value == PatternFlowMplsBottomOfStackChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowMplsBottomOfStackCounter().msg() + } + + if value == PatternFlowMplsBottomOfStackChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowMplsBottomOfStackCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowMplsBottomOfStack) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowMplsBottomOfStackChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowMplsBottomOfStack) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowMplsBottomOfStack object +func (obj *patternFlowMplsBottomOfStack) SetValue(value uint32) PatternFlowMplsBottomOfStack { + obj.setChoice(PatternFlowMplsBottomOfStackChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowMplsBottomOfStack) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{1}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowMplsBottomOfStack object +func (obj *patternFlowMplsBottomOfStack) SetValues(value []uint32) PatternFlowMplsBottomOfStack { + obj.setChoice(PatternFlowMplsBottomOfStackChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowMplsBottomOfStack) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowMplsBottomOfStackChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowMplsBottomOfStack) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Increment returns a PatternFlowMplsBottomOfStackCounter +func (obj *patternFlowMplsBottomOfStack) Increment() PatternFlowMplsBottomOfStackCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowMplsBottomOfStackChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowMplsBottomOfStackCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowMplsBottomOfStackCounter +func (obj *patternFlowMplsBottomOfStack) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowMplsBottomOfStackCounter value in the PatternFlowMplsBottomOfStack object +func (obj *patternFlowMplsBottomOfStack) SetIncrement(value PatternFlowMplsBottomOfStackCounter) PatternFlowMplsBottomOfStack { + obj.setChoice(PatternFlowMplsBottomOfStackChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowMplsBottomOfStackCounter +func (obj *patternFlowMplsBottomOfStack) Decrement() PatternFlowMplsBottomOfStackCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowMplsBottomOfStackChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowMplsBottomOfStackCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowMplsBottomOfStackCounter +func (obj *patternFlowMplsBottomOfStack) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowMplsBottomOfStackCounter value in the PatternFlowMplsBottomOfStack object +func (obj *patternFlowMplsBottomOfStack) SetDecrement(value PatternFlowMplsBottomOfStackCounter) PatternFlowMplsBottomOfStack { + obj.setChoice(PatternFlowMplsBottomOfStackChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowMplsBottomOfStackMetricTag +func (obj *patternFlowMplsBottomOfStack) MetricTags() PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowMplsBottomOfStackMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter struct { + obj *patternFlowMplsBottomOfStack + patternFlowMplsBottomOfStackMetricTagSlice []PatternFlowMplsBottomOfStackMetricTag + fieldPtr *[]*otg.PatternFlowMplsBottomOfStackMetricTag +} + +func newPatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter(ptr *[]*otg.PatternFlowMplsBottomOfStackMetricTag) PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter { + return &patternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter interface { + setMsg(*patternFlowMplsBottomOfStack) PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter + Items() []PatternFlowMplsBottomOfStackMetricTag + Add() PatternFlowMplsBottomOfStackMetricTag + Append(items ...PatternFlowMplsBottomOfStackMetricTag) PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter + Set(index int, newObj PatternFlowMplsBottomOfStackMetricTag) PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter + Clear() PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter + clearHolderSlice() PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter + appendHolderSlice(item PatternFlowMplsBottomOfStackMetricTag) PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter +} + +func (obj *patternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter) setMsg(msg *patternFlowMplsBottomOfStack) PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowMplsBottomOfStackMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter) Items() []PatternFlowMplsBottomOfStackMetricTag { + return obj.patternFlowMplsBottomOfStackMetricTagSlice +} + +func (obj *patternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter) Add() PatternFlowMplsBottomOfStackMetricTag { + newObj := &otg.PatternFlowMplsBottomOfStackMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowMplsBottomOfStackMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowMplsBottomOfStackMetricTagSlice = append(obj.patternFlowMplsBottomOfStackMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter) Append(items ...PatternFlowMplsBottomOfStackMetricTag) PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowMplsBottomOfStackMetricTagSlice = append(obj.patternFlowMplsBottomOfStackMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter) Set(index int, newObj PatternFlowMplsBottomOfStackMetricTag) PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowMplsBottomOfStackMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter) Clear() PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowMplsBottomOfStackMetricTag{} + obj.patternFlowMplsBottomOfStackMetricTagSlice = []PatternFlowMplsBottomOfStackMetricTag{} + } + return obj +} +func (obj *patternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter) clearHolderSlice() PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter { + if len(obj.patternFlowMplsBottomOfStackMetricTagSlice) > 0 { + obj.patternFlowMplsBottomOfStackMetricTagSlice = []PatternFlowMplsBottomOfStackMetricTag{} + } + return obj +} +func (obj *patternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter) appendHolderSlice(item PatternFlowMplsBottomOfStackMetricTag) PatternFlowMplsBottomOfStackPatternFlowMplsBottomOfStackMetricTagIter { + obj.patternFlowMplsBottomOfStackMetricTagSlice = append(obj.patternFlowMplsBottomOfStackMetricTagSlice, item) + return obj +} + +func (obj *patternFlowMplsBottomOfStack) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsBottomOfStack.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowMplsBottomOfStack.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Auto != nil { + + if *obj.obj.Auto > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsBottomOfStack.Auto <= 1 but Got %d", *obj.obj.Auto)) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowMplsBottomOfStackMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowMplsBottomOfStack) setDefault() { + var choices_set int = 0 + var choice PatternFlowMplsBottomOfStackChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowMplsBottomOfStackChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowMplsBottomOfStackChoice.VALUES + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowMplsBottomOfStackChoice.AUTO + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowMplsBottomOfStackChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowMplsBottomOfStackChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowMplsBottomOfStackChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowMplsBottomOfStack") + } + } else { + intVal := otg.PatternFlowMplsBottomOfStack_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowMplsBottomOfStack_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_mpls_bottom_of_stack_counter.go b/gosnappi/pattern_flow_mpls_bottom_of_stack_counter.go new file mode 100644 index 00000000..6491f406 --- /dev/null +++ b/gosnappi/pattern_flow_mpls_bottom_of_stack_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowMplsBottomOfStackCounter ***** +type patternFlowMplsBottomOfStackCounter struct { + validation + obj *otg.PatternFlowMplsBottomOfStackCounter + marshaller marshalPatternFlowMplsBottomOfStackCounter + unMarshaller unMarshalPatternFlowMplsBottomOfStackCounter +} + +func NewPatternFlowMplsBottomOfStackCounter() PatternFlowMplsBottomOfStackCounter { + obj := patternFlowMplsBottomOfStackCounter{obj: &otg.PatternFlowMplsBottomOfStackCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowMplsBottomOfStackCounter) msg() *otg.PatternFlowMplsBottomOfStackCounter { + return obj.obj +} + +func (obj *patternFlowMplsBottomOfStackCounter) setMsg(msg *otg.PatternFlowMplsBottomOfStackCounter) PatternFlowMplsBottomOfStackCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowMplsBottomOfStackCounter struct { + obj *patternFlowMplsBottomOfStackCounter +} + +type marshalPatternFlowMplsBottomOfStackCounter interface { + // ToProto marshals PatternFlowMplsBottomOfStackCounter to protobuf object *otg.PatternFlowMplsBottomOfStackCounter + ToProto() (*otg.PatternFlowMplsBottomOfStackCounter, error) + // ToPbText marshals PatternFlowMplsBottomOfStackCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowMplsBottomOfStackCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowMplsBottomOfStackCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowMplsBottomOfStackCounter struct { + obj *patternFlowMplsBottomOfStackCounter +} + +type unMarshalPatternFlowMplsBottomOfStackCounter interface { + // FromProto unmarshals PatternFlowMplsBottomOfStackCounter from protobuf object *otg.PatternFlowMplsBottomOfStackCounter + FromProto(msg *otg.PatternFlowMplsBottomOfStackCounter) (PatternFlowMplsBottomOfStackCounter, error) + // FromPbText unmarshals PatternFlowMplsBottomOfStackCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowMplsBottomOfStackCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowMplsBottomOfStackCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowMplsBottomOfStackCounter) Marshal() marshalPatternFlowMplsBottomOfStackCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowMplsBottomOfStackCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowMplsBottomOfStackCounter) Unmarshal() unMarshalPatternFlowMplsBottomOfStackCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowMplsBottomOfStackCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowMplsBottomOfStackCounter) ToProto() (*otg.PatternFlowMplsBottomOfStackCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowMplsBottomOfStackCounter) FromProto(msg *otg.PatternFlowMplsBottomOfStackCounter) (PatternFlowMplsBottomOfStackCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowMplsBottomOfStackCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowMplsBottomOfStackCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowMplsBottomOfStackCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsBottomOfStackCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowMplsBottomOfStackCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsBottomOfStackCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowMplsBottomOfStackCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowMplsBottomOfStackCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowMplsBottomOfStackCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowMplsBottomOfStackCounter) Clone() (PatternFlowMplsBottomOfStackCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowMplsBottomOfStackCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowMplsBottomOfStackCounter is integer counter pattern +type PatternFlowMplsBottomOfStackCounter interface { + Validation + // msg marshals PatternFlowMplsBottomOfStackCounter to protobuf object *otg.PatternFlowMplsBottomOfStackCounter + // and doesn't set defaults + msg() *otg.PatternFlowMplsBottomOfStackCounter + // setMsg unmarshals PatternFlowMplsBottomOfStackCounter from protobuf object *otg.PatternFlowMplsBottomOfStackCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowMplsBottomOfStackCounter) PatternFlowMplsBottomOfStackCounter + // provides marshal interface + Marshal() marshalPatternFlowMplsBottomOfStackCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowMplsBottomOfStackCounter + // validate validates PatternFlowMplsBottomOfStackCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowMplsBottomOfStackCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowMplsBottomOfStackCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowMplsBottomOfStackCounter + SetStart(value uint32) PatternFlowMplsBottomOfStackCounter + // HasStart checks if Start has been set in PatternFlowMplsBottomOfStackCounter + HasStart() bool + // Step returns uint32, set in PatternFlowMplsBottomOfStackCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowMplsBottomOfStackCounter + SetStep(value uint32) PatternFlowMplsBottomOfStackCounter + // HasStep checks if Step has been set in PatternFlowMplsBottomOfStackCounter + HasStep() bool + // Count returns uint32, set in PatternFlowMplsBottomOfStackCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowMplsBottomOfStackCounter + SetCount(value uint32) PatternFlowMplsBottomOfStackCounter + // HasCount checks if Count has been set in PatternFlowMplsBottomOfStackCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowMplsBottomOfStackCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowMplsBottomOfStackCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowMplsBottomOfStackCounter object +func (obj *patternFlowMplsBottomOfStackCounter) SetStart(value uint32) PatternFlowMplsBottomOfStackCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowMplsBottomOfStackCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowMplsBottomOfStackCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowMplsBottomOfStackCounter object +func (obj *patternFlowMplsBottomOfStackCounter) SetStep(value uint32) PatternFlowMplsBottomOfStackCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowMplsBottomOfStackCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowMplsBottomOfStackCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowMplsBottomOfStackCounter object +func (obj *patternFlowMplsBottomOfStackCounter) SetCount(value uint32) PatternFlowMplsBottomOfStackCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowMplsBottomOfStackCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsBottomOfStackCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsBottomOfStackCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsBottomOfStackCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowMplsBottomOfStackCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_mpls_bottom_of_stack_metric_tag.go b/gosnappi/pattern_flow_mpls_bottom_of_stack_metric_tag.go new file mode 100644 index 00000000..851a284d --- /dev/null +++ b/gosnappi/pattern_flow_mpls_bottom_of_stack_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowMplsBottomOfStackMetricTag ***** +type patternFlowMplsBottomOfStackMetricTag struct { + validation + obj *otg.PatternFlowMplsBottomOfStackMetricTag + marshaller marshalPatternFlowMplsBottomOfStackMetricTag + unMarshaller unMarshalPatternFlowMplsBottomOfStackMetricTag +} + +func NewPatternFlowMplsBottomOfStackMetricTag() PatternFlowMplsBottomOfStackMetricTag { + obj := patternFlowMplsBottomOfStackMetricTag{obj: &otg.PatternFlowMplsBottomOfStackMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowMplsBottomOfStackMetricTag) msg() *otg.PatternFlowMplsBottomOfStackMetricTag { + return obj.obj +} + +func (obj *patternFlowMplsBottomOfStackMetricTag) setMsg(msg *otg.PatternFlowMplsBottomOfStackMetricTag) PatternFlowMplsBottomOfStackMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowMplsBottomOfStackMetricTag struct { + obj *patternFlowMplsBottomOfStackMetricTag +} + +type marshalPatternFlowMplsBottomOfStackMetricTag interface { + // ToProto marshals PatternFlowMplsBottomOfStackMetricTag to protobuf object *otg.PatternFlowMplsBottomOfStackMetricTag + ToProto() (*otg.PatternFlowMplsBottomOfStackMetricTag, error) + // ToPbText marshals PatternFlowMplsBottomOfStackMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowMplsBottomOfStackMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowMplsBottomOfStackMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowMplsBottomOfStackMetricTag struct { + obj *patternFlowMplsBottomOfStackMetricTag +} + +type unMarshalPatternFlowMplsBottomOfStackMetricTag interface { + // FromProto unmarshals PatternFlowMplsBottomOfStackMetricTag from protobuf object *otg.PatternFlowMplsBottomOfStackMetricTag + FromProto(msg *otg.PatternFlowMplsBottomOfStackMetricTag) (PatternFlowMplsBottomOfStackMetricTag, error) + // FromPbText unmarshals PatternFlowMplsBottomOfStackMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowMplsBottomOfStackMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowMplsBottomOfStackMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowMplsBottomOfStackMetricTag) Marshal() marshalPatternFlowMplsBottomOfStackMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowMplsBottomOfStackMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowMplsBottomOfStackMetricTag) Unmarshal() unMarshalPatternFlowMplsBottomOfStackMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowMplsBottomOfStackMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowMplsBottomOfStackMetricTag) ToProto() (*otg.PatternFlowMplsBottomOfStackMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowMplsBottomOfStackMetricTag) FromProto(msg *otg.PatternFlowMplsBottomOfStackMetricTag) (PatternFlowMplsBottomOfStackMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowMplsBottomOfStackMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowMplsBottomOfStackMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowMplsBottomOfStackMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsBottomOfStackMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowMplsBottomOfStackMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsBottomOfStackMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowMplsBottomOfStackMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowMplsBottomOfStackMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowMplsBottomOfStackMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowMplsBottomOfStackMetricTag) Clone() (PatternFlowMplsBottomOfStackMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowMplsBottomOfStackMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowMplsBottomOfStackMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowMplsBottomOfStackMetricTag interface { + Validation + // msg marshals PatternFlowMplsBottomOfStackMetricTag to protobuf object *otg.PatternFlowMplsBottomOfStackMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowMplsBottomOfStackMetricTag + // setMsg unmarshals PatternFlowMplsBottomOfStackMetricTag from protobuf object *otg.PatternFlowMplsBottomOfStackMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowMplsBottomOfStackMetricTag) PatternFlowMplsBottomOfStackMetricTag + // provides marshal interface + Marshal() marshalPatternFlowMplsBottomOfStackMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowMplsBottomOfStackMetricTag + // validate validates PatternFlowMplsBottomOfStackMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowMplsBottomOfStackMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowMplsBottomOfStackMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowMplsBottomOfStackMetricTag + SetName(value string) PatternFlowMplsBottomOfStackMetricTag + // Offset returns uint32, set in PatternFlowMplsBottomOfStackMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowMplsBottomOfStackMetricTag + SetOffset(value uint32) PatternFlowMplsBottomOfStackMetricTag + // HasOffset checks if Offset has been set in PatternFlowMplsBottomOfStackMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowMplsBottomOfStackMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowMplsBottomOfStackMetricTag + SetLength(value uint32) PatternFlowMplsBottomOfStackMetricTag + // HasLength checks if Length has been set in PatternFlowMplsBottomOfStackMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowMplsBottomOfStackMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowMplsBottomOfStackMetricTag object +func (obj *patternFlowMplsBottomOfStackMetricTag) SetName(value string) PatternFlowMplsBottomOfStackMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowMplsBottomOfStackMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowMplsBottomOfStackMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowMplsBottomOfStackMetricTag object +func (obj *patternFlowMplsBottomOfStackMetricTag) SetOffset(value uint32) PatternFlowMplsBottomOfStackMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowMplsBottomOfStackMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowMplsBottomOfStackMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowMplsBottomOfStackMetricTag object +func (obj *patternFlowMplsBottomOfStackMetricTag) SetLength(value uint32) PatternFlowMplsBottomOfStackMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowMplsBottomOfStackMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowMplsBottomOfStackMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsBottomOfStackMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowMplsBottomOfStackMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowMplsBottomOfStackMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_mpls_label.go b/gosnappi/pattern_flow_mpls_label.go new file mode 100644 index 00000000..109d0544 --- /dev/null +++ b/gosnappi/pattern_flow_mpls_label.go @@ -0,0 +1,712 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowMplsLabel ***** +type patternFlowMplsLabel struct { + validation + obj *otg.PatternFlowMplsLabel + marshaller marshalPatternFlowMplsLabel + unMarshaller unMarshalPatternFlowMplsLabel + incrementHolder PatternFlowMplsLabelCounter + decrementHolder PatternFlowMplsLabelCounter + metricTagsHolder PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter +} + +func NewPatternFlowMplsLabel() PatternFlowMplsLabel { + obj := patternFlowMplsLabel{obj: &otg.PatternFlowMplsLabel{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowMplsLabel) msg() *otg.PatternFlowMplsLabel { + return obj.obj +} + +func (obj *patternFlowMplsLabel) setMsg(msg *otg.PatternFlowMplsLabel) PatternFlowMplsLabel { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowMplsLabel struct { + obj *patternFlowMplsLabel +} + +type marshalPatternFlowMplsLabel interface { + // ToProto marshals PatternFlowMplsLabel to protobuf object *otg.PatternFlowMplsLabel + ToProto() (*otg.PatternFlowMplsLabel, error) + // ToPbText marshals PatternFlowMplsLabel to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowMplsLabel to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowMplsLabel to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowMplsLabel struct { + obj *patternFlowMplsLabel +} + +type unMarshalPatternFlowMplsLabel interface { + // FromProto unmarshals PatternFlowMplsLabel from protobuf object *otg.PatternFlowMplsLabel + FromProto(msg *otg.PatternFlowMplsLabel) (PatternFlowMplsLabel, error) + // FromPbText unmarshals PatternFlowMplsLabel from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowMplsLabel from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowMplsLabel from JSON text + FromJson(value string) error +} + +func (obj *patternFlowMplsLabel) Marshal() marshalPatternFlowMplsLabel { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowMplsLabel{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowMplsLabel) Unmarshal() unMarshalPatternFlowMplsLabel { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowMplsLabel{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowMplsLabel) ToProto() (*otg.PatternFlowMplsLabel, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowMplsLabel) FromProto(msg *otg.PatternFlowMplsLabel) (PatternFlowMplsLabel, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowMplsLabel) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowMplsLabel) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowMplsLabel) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsLabel) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowMplsLabel) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsLabel) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowMplsLabel) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowMplsLabel) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowMplsLabel) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowMplsLabel) Clone() (PatternFlowMplsLabel, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowMplsLabel() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowMplsLabel) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowMplsLabel is label of routers +type PatternFlowMplsLabel interface { + Validation + // msg marshals PatternFlowMplsLabel to protobuf object *otg.PatternFlowMplsLabel + // and doesn't set defaults + msg() *otg.PatternFlowMplsLabel + // setMsg unmarshals PatternFlowMplsLabel from protobuf object *otg.PatternFlowMplsLabel + // and doesn't set defaults + setMsg(*otg.PatternFlowMplsLabel) PatternFlowMplsLabel + // provides marshal interface + Marshal() marshalPatternFlowMplsLabel + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowMplsLabel + // validate validates PatternFlowMplsLabel + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowMplsLabel, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowMplsLabelChoiceEnum, set in PatternFlowMplsLabel + Choice() PatternFlowMplsLabelChoiceEnum + // setChoice assigns PatternFlowMplsLabelChoiceEnum provided by user to PatternFlowMplsLabel + setChoice(value PatternFlowMplsLabelChoiceEnum) PatternFlowMplsLabel + // HasChoice checks if Choice has been set in PatternFlowMplsLabel + HasChoice() bool + // Value returns uint32, set in PatternFlowMplsLabel. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowMplsLabel + SetValue(value uint32) PatternFlowMplsLabel + // HasValue checks if Value has been set in PatternFlowMplsLabel + HasValue() bool + // Values returns []uint32, set in PatternFlowMplsLabel. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowMplsLabel + SetValues(value []uint32) PatternFlowMplsLabel + // Auto returns uint32, set in PatternFlowMplsLabel. + Auto() uint32 + // HasAuto checks if Auto has been set in PatternFlowMplsLabel + HasAuto() bool + // Increment returns PatternFlowMplsLabelCounter, set in PatternFlowMplsLabel. + // PatternFlowMplsLabelCounter is integer counter pattern + Increment() PatternFlowMplsLabelCounter + // SetIncrement assigns PatternFlowMplsLabelCounter provided by user to PatternFlowMplsLabel. + // PatternFlowMplsLabelCounter is integer counter pattern + SetIncrement(value PatternFlowMplsLabelCounter) PatternFlowMplsLabel + // HasIncrement checks if Increment has been set in PatternFlowMplsLabel + HasIncrement() bool + // Decrement returns PatternFlowMplsLabelCounter, set in PatternFlowMplsLabel. + // PatternFlowMplsLabelCounter is integer counter pattern + Decrement() PatternFlowMplsLabelCounter + // SetDecrement assigns PatternFlowMplsLabelCounter provided by user to PatternFlowMplsLabel. + // PatternFlowMplsLabelCounter is integer counter pattern + SetDecrement(value PatternFlowMplsLabelCounter) PatternFlowMplsLabel + // HasDecrement checks if Decrement has been set in PatternFlowMplsLabel + HasDecrement() bool + // MetricTags returns PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIterIter, set in PatternFlowMplsLabel + MetricTags() PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter + setNil() +} + +type PatternFlowMplsLabelChoiceEnum string + +// Enum of Choice on PatternFlowMplsLabel +var PatternFlowMplsLabelChoice = struct { + VALUE PatternFlowMplsLabelChoiceEnum + VALUES PatternFlowMplsLabelChoiceEnum + AUTO PatternFlowMplsLabelChoiceEnum + INCREMENT PatternFlowMplsLabelChoiceEnum + DECREMENT PatternFlowMplsLabelChoiceEnum +}{ + VALUE: PatternFlowMplsLabelChoiceEnum("value"), + VALUES: PatternFlowMplsLabelChoiceEnum("values"), + AUTO: PatternFlowMplsLabelChoiceEnum("auto"), + INCREMENT: PatternFlowMplsLabelChoiceEnum("increment"), + DECREMENT: PatternFlowMplsLabelChoiceEnum("decrement"), +} + +func (obj *patternFlowMplsLabel) Choice() PatternFlowMplsLabelChoiceEnum { + return PatternFlowMplsLabelChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowMplsLabel) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowMplsLabel) setChoice(value PatternFlowMplsLabelChoiceEnum) PatternFlowMplsLabel { + intValue, ok := otg.PatternFlowMplsLabel_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowMplsLabelChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowMplsLabel_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Auto = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowMplsLabelChoice.VALUE { + defaultValue := uint32(16) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowMplsLabelChoice.VALUES { + defaultValue := []uint32{16} + obj.obj.Values = defaultValue + } + + if value == PatternFlowMplsLabelChoice.AUTO { + defaultValue := uint32(16) + obj.obj.Auto = &defaultValue + } + + if value == PatternFlowMplsLabelChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowMplsLabelCounter().msg() + } + + if value == PatternFlowMplsLabelChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowMplsLabelCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowMplsLabel) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowMplsLabelChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowMplsLabel) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowMplsLabel object +func (obj *patternFlowMplsLabel) SetValue(value uint32) PatternFlowMplsLabel { + obj.setChoice(PatternFlowMplsLabelChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowMplsLabel) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{16}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowMplsLabel object +func (obj *patternFlowMplsLabel) SetValues(value []uint32) PatternFlowMplsLabel { + obj.setChoice(PatternFlowMplsLabelChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowMplsLabel) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowMplsLabelChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowMplsLabel) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Increment returns a PatternFlowMplsLabelCounter +func (obj *patternFlowMplsLabel) Increment() PatternFlowMplsLabelCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowMplsLabelChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowMplsLabelCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowMplsLabelCounter +func (obj *patternFlowMplsLabel) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowMplsLabelCounter value in the PatternFlowMplsLabel object +func (obj *patternFlowMplsLabel) SetIncrement(value PatternFlowMplsLabelCounter) PatternFlowMplsLabel { + obj.setChoice(PatternFlowMplsLabelChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowMplsLabelCounter +func (obj *patternFlowMplsLabel) Decrement() PatternFlowMplsLabelCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowMplsLabelChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowMplsLabelCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowMplsLabelCounter +func (obj *patternFlowMplsLabel) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowMplsLabelCounter value in the PatternFlowMplsLabel object +func (obj *patternFlowMplsLabel) SetDecrement(value PatternFlowMplsLabelCounter) PatternFlowMplsLabel { + obj.setChoice(PatternFlowMplsLabelChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowMplsLabelMetricTag +func (obj *patternFlowMplsLabel) MetricTags() PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowMplsLabelMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowMplsLabelPatternFlowMplsLabelMetricTagIter struct { + obj *patternFlowMplsLabel + patternFlowMplsLabelMetricTagSlice []PatternFlowMplsLabelMetricTag + fieldPtr *[]*otg.PatternFlowMplsLabelMetricTag +} + +func newPatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter(ptr *[]*otg.PatternFlowMplsLabelMetricTag) PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter { + return &patternFlowMplsLabelPatternFlowMplsLabelMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter interface { + setMsg(*patternFlowMplsLabel) PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter + Items() []PatternFlowMplsLabelMetricTag + Add() PatternFlowMplsLabelMetricTag + Append(items ...PatternFlowMplsLabelMetricTag) PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter + Set(index int, newObj PatternFlowMplsLabelMetricTag) PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter + Clear() PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter + clearHolderSlice() PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter + appendHolderSlice(item PatternFlowMplsLabelMetricTag) PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter +} + +func (obj *patternFlowMplsLabelPatternFlowMplsLabelMetricTagIter) setMsg(msg *patternFlowMplsLabel) PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowMplsLabelMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowMplsLabelPatternFlowMplsLabelMetricTagIter) Items() []PatternFlowMplsLabelMetricTag { + return obj.patternFlowMplsLabelMetricTagSlice +} + +func (obj *patternFlowMplsLabelPatternFlowMplsLabelMetricTagIter) Add() PatternFlowMplsLabelMetricTag { + newObj := &otg.PatternFlowMplsLabelMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowMplsLabelMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowMplsLabelMetricTagSlice = append(obj.patternFlowMplsLabelMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowMplsLabelPatternFlowMplsLabelMetricTagIter) Append(items ...PatternFlowMplsLabelMetricTag) PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowMplsLabelMetricTagSlice = append(obj.patternFlowMplsLabelMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowMplsLabelPatternFlowMplsLabelMetricTagIter) Set(index int, newObj PatternFlowMplsLabelMetricTag) PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowMplsLabelMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowMplsLabelPatternFlowMplsLabelMetricTagIter) Clear() PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowMplsLabelMetricTag{} + obj.patternFlowMplsLabelMetricTagSlice = []PatternFlowMplsLabelMetricTag{} + } + return obj +} +func (obj *patternFlowMplsLabelPatternFlowMplsLabelMetricTagIter) clearHolderSlice() PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter { + if len(obj.patternFlowMplsLabelMetricTagSlice) > 0 { + obj.patternFlowMplsLabelMetricTagSlice = []PatternFlowMplsLabelMetricTag{} + } + return obj +} +func (obj *patternFlowMplsLabelPatternFlowMplsLabelMetricTagIter) appendHolderSlice(item PatternFlowMplsLabelMetricTag) PatternFlowMplsLabelPatternFlowMplsLabelMetricTagIter { + obj.patternFlowMplsLabelMetricTagSlice = append(obj.patternFlowMplsLabelMetricTagSlice, item) + return obj +} + +func (obj *patternFlowMplsLabel) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsLabel.Value <= 1048575 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowMplsLabel.Values <= 1048575 but Got %d", item)) + } + + } + + } + + if obj.obj.Auto != nil { + + if *obj.obj.Auto > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsLabel.Auto <= 1048575 but Got %d", *obj.obj.Auto)) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowMplsLabelMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowMplsLabel) setDefault() { + var choices_set int = 0 + var choice PatternFlowMplsLabelChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowMplsLabelChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowMplsLabelChoice.VALUES + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowMplsLabelChoice.AUTO + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowMplsLabelChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowMplsLabelChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowMplsLabelChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowMplsLabel") + } + } else { + intVal := otg.PatternFlowMplsLabel_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowMplsLabel_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_mpls_label_counter.go b/gosnappi/pattern_flow_mpls_label_counter.go new file mode 100644 index 00000000..1f79cebe --- /dev/null +++ b/gosnappi/pattern_flow_mpls_label_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowMplsLabelCounter ***** +type patternFlowMplsLabelCounter struct { + validation + obj *otg.PatternFlowMplsLabelCounter + marshaller marshalPatternFlowMplsLabelCounter + unMarshaller unMarshalPatternFlowMplsLabelCounter +} + +func NewPatternFlowMplsLabelCounter() PatternFlowMplsLabelCounter { + obj := patternFlowMplsLabelCounter{obj: &otg.PatternFlowMplsLabelCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowMplsLabelCounter) msg() *otg.PatternFlowMplsLabelCounter { + return obj.obj +} + +func (obj *patternFlowMplsLabelCounter) setMsg(msg *otg.PatternFlowMplsLabelCounter) PatternFlowMplsLabelCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowMplsLabelCounter struct { + obj *patternFlowMplsLabelCounter +} + +type marshalPatternFlowMplsLabelCounter interface { + // ToProto marshals PatternFlowMplsLabelCounter to protobuf object *otg.PatternFlowMplsLabelCounter + ToProto() (*otg.PatternFlowMplsLabelCounter, error) + // ToPbText marshals PatternFlowMplsLabelCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowMplsLabelCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowMplsLabelCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowMplsLabelCounter struct { + obj *patternFlowMplsLabelCounter +} + +type unMarshalPatternFlowMplsLabelCounter interface { + // FromProto unmarshals PatternFlowMplsLabelCounter from protobuf object *otg.PatternFlowMplsLabelCounter + FromProto(msg *otg.PatternFlowMplsLabelCounter) (PatternFlowMplsLabelCounter, error) + // FromPbText unmarshals PatternFlowMplsLabelCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowMplsLabelCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowMplsLabelCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowMplsLabelCounter) Marshal() marshalPatternFlowMplsLabelCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowMplsLabelCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowMplsLabelCounter) Unmarshal() unMarshalPatternFlowMplsLabelCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowMplsLabelCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowMplsLabelCounter) ToProto() (*otg.PatternFlowMplsLabelCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowMplsLabelCounter) FromProto(msg *otg.PatternFlowMplsLabelCounter) (PatternFlowMplsLabelCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowMplsLabelCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowMplsLabelCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowMplsLabelCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsLabelCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowMplsLabelCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsLabelCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowMplsLabelCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowMplsLabelCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowMplsLabelCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowMplsLabelCounter) Clone() (PatternFlowMplsLabelCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowMplsLabelCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowMplsLabelCounter is integer counter pattern +type PatternFlowMplsLabelCounter interface { + Validation + // msg marshals PatternFlowMplsLabelCounter to protobuf object *otg.PatternFlowMplsLabelCounter + // and doesn't set defaults + msg() *otg.PatternFlowMplsLabelCounter + // setMsg unmarshals PatternFlowMplsLabelCounter from protobuf object *otg.PatternFlowMplsLabelCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowMplsLabelCounter) PatternFlowMplsLabelCounter + // provides marshal interface + Marshal() marshalPatternFlowMplsLabelCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowMplsLabelCounter + // validate validates PatternFlowMplsLabelCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowMplsLabelCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowMplsLabelCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowMplsLabelCounter + SetStart(value uint32) PatternFlowMplsLabelCounter + // HasStart checks if Start has been set in PatternFlowMplsLabelCounter + HasStart() bool + // Step returns uint32, set in PatternFlowMplsLabelCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowMplsLabelCounter + SetStep(value uint32) PatternFlowMplsLabelCounter + // HasStep checks if Step has been set in PatternFlowMplsLabelCounter + HasStep() bool + // Count returns uint32, set in PatternFlowMplsLabelCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowMplsLabelCounter + SetCount(value uint32) PatternFlowMplsLabelCounter + // HasCount checks if Count has been set in PatternFlowMplsLabelCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowMplsLabelCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowMplsLabelCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowMplsLabelCounter object +func (obj *patternFlowMplsLabelCounter) SetStart(value uint32) PatternFlowMplsLabelCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowMplsLabelCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowMplsLabelCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowMplsLabelCounter object +func (obj *patternFlowMplsLabelCounter) SetStep(value uint32) PatternFlowMplsLabelCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowMplsLabelCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowMplsLabelCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowMplsLabelCounter object +func (obj *patternFlowMplsLabelCounter) SetCount(value uint32) PatternFlowMplsLabelCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowMplsLabelCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsLabelCounter.Start <= 1048575 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsLabelCounter.Step <= 1048575 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsLabelCounter.Count <= 1048575 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowMplsLabelCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(16) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_mpls_label_metric_tag.go b/gosnappi/pattern_flow_mpls_label_metric_tag.go new file mode 100644 index 00000000..b4565019 --- /dev/null +++ b/gosnappi/pattern_flow_mpls_label_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowMplsLabelMetricTag ***** +type patternFlowMplsLabelMetricTag struct { + validation + obj *otg.PatternFlowMplsLabelMetricTag + marshaller marshalPatternFlowMplsLabelMetricTag + unMarshaller unMarshalPatternFlowMplsLabelMetricTag +} + +func NewPatternFlowMplsLabelMetricTag() PatternFlowMplsLabelMetricTag { + obj := patternFlowMplsLabelMetricTag{obj: &otg.PatternFlowMplsLabelMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowMplsLabelMetricTag) msg() *otg.PatternFlowMplsLabelMetricTag { + return obj.obj +} + +func (obj *patternFlowMplsLabelMetricTag) setMsg(msg *otg.PatternFlowMplsLabelMetricTag) PatternFlowMplsLabelMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowMplsLabelMetricTag struct { + obj *patternFlowMplsLabelMetricTag +} + +type marshalPatternFlowMplsLabelMetricTag interface { + // ToProto marshals PatternFlowMplsLabelMetricTag to protobuf object *otg.PatternFlowMplsLabelMetricTag + ToProto() (*otg.PatternFlowMplsLabelMetricTag, error) + // ToPbText marshals PatternFlowMplsLabelMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowMplsLabelMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowMplsLabelMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowMplsLabelMetricTag struct { + obj *patternFlowMplsLabelMetricTag +} + +type unMarshalPatternFlowMplsLabelMetricTag interface { + // FromProto unmarshals PatternFlowMplsLabelMetricTag from protobuf object *otg.PatternFlowMplsLabelMetricTag + FromProto(msg *otg.PatternFlowMplsLabelMetricTag) (PatternFlowMplsLabelMetricTag, error) + // FromPbText unmarshals PatternFlowMplsLabelMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowMplsLabelMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowMplsLabelMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowMplsLabelMetricTag) Marshal() marshalPatternFlowMplsLabelMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowMplsLabelMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowMplsLabelMetricTag) Unmarshal() unMarshalPatternFlowMplsLabelMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowMplsLabelMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowMplsLabelMetricTag) ToProto() (*otg.PatternFlowMplsLabelMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowMplsLabelMetricTag) FromProto(msg *otg.PatternFlowMplsLabelMetricTag) (PatternFlowMplsLabelMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowMplsLabelMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowMplsLabelMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowMplsLabelMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsLabelMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowMplsLabelMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsLabelMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowMplsLabelMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowMplsLabelMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowMplsLabelMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowMplsLabelMetricTag) Clone() (PatternFlowMplsLabelMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowMplsLabelMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowMplsLabelMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowMplsLabelMetricTag interface { + Validation + // msg marshals PatternFlowMplsLabelMetricTag to protobuf object *otg.PatternFlowMplsLabelMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowMplsLabelMetricTag + // setMsg unmarshals PatternFlowMplsLabelMetricTag from protobuf object *otg.PatternFlowMplsLabelMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowMplsLabelMetricTag) PatternFlowMplsLabelMetricTag + // provides marshal interface + Marshal() marshalPatternFlowMplsLabelMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowMplsLabelMetricTag + // validate validates PatternFlowMplsLabelMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowMplsLabelMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowMplsLabelMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowMplsLabelMetricTag + SetName(value string) PatternFlowMplsLabelMetricTag + // Offset returns uint32, set in PatternFlowMplsLabelMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowMplsLabelMetricTag + SetOffset(value uint32) PatternFlowMplsLabelMetricTag + // HasOffset checks if Offset has been set in PatternFlowMplsLabelMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowMplsLabelMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowMplsLabelMetricTag + SetLength(value uint32) PatternFlowMplsLabelMetricTag + // HasLength checks if Length has been set in PatternFlowMplsLabelMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowMplsLabelMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowMplsLabelMetricTag object +func (obj *patternFlowMplsLabelMetricTag) SetName(value string) PatternFlowMplsLabelMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowMplsLabelMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowMplsLabelMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowMplsLabelMetricTag object +func (obj *patternFlowMplsLabelMetricTag) SetOffset(value uint32) PatternFlowMplsLabelMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowMplsLabelMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowMplsLabelMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowMplsLabelMetricTag object +func (obj *patternFlowMplsLabelMetricTag) SetLength(value uint32) PatternFlowMplsLabelMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowMplsLabelMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowMplsLabelMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 19 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsLabelMetricTag.Offset <= 19 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 20 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowMplsLabelMetricTag.Length <= 20 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowMplsLabelMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(20) + } + +} diff --git a/gosnappi/pattern_flow_mpls_time_to_live.go b/gosnappi/pattern_flow_mpls_time_to_live.go new file mode 100644 index 00000000..9c487092 --- /dev/null +++ b/gosnappi/pattern_flow_mpls_time_to_live.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowMplsTimeToLive ***** +type patternFlowMplsTimeToLive struct { + validation + obj *otg.PatternFlowMplsTimeToLive + marshaller marshalPatternFlowMplsTimeToLive + unMarshaller unMarshalPatternFlowMplsTimeToLive + incrementHolder PatternFlowMplsTimeToLiveCounter + decrementHolder PatternFlowMplsTimeToLiveCounter + metricTagsHolder PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter +} + +func NewPatternFlowMplsTimeToLive() PatternFlowMplsTimeToLive { + obj := patternFlowMplsTimeToLive{obj: &otg.PatternFlowMplsTimeToLive{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowMplsTimeToLive) msg() *otg.PatternFlowMplsTimeToLive { + return obj.obj +} + +func (obj *patternFlowMplsTimeToLive) setMsg(msg *otg.PatternFlowMplsTimeToLive) PatternFlowMplsTimeToLive { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowMplsTimeToLive struct { + obj *patternFlowMplsTimeToLive +} + +type marshalPatternFlowMplsTimeToLive interface { + // ToProto marshals PatternFlowMplsTimeToLive to protobuf object *otg.PatternFlowMplsTimeToLive + ToProto() (*otg.PatternFlowMplsTimeToLive, error) + // ToPbText marshals PatternFlowMplsTimeToLive to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowMplsTimeToLive to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowMplsTimeToLive to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowMplsTimeToLive struct { + obj *patternFlowMplsTimeToLive +} + +type unMarshalPatternFlowMplsTimeToLive interface { + // FromProto unmarshals PatternFlowMplsTimeToLive from protobuf object *otg.PatternFlowMplsTimeToLive + FromProto(msg *otg.PatternFlowMplsTimeToLive) (PatternFlowMplsTimeToLive, error) + // FromPbText unmarshals PatternFlowMplsTimeToLive from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowMplsTimeToLive from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowMplsTimeToLive from JSON text + FromJson(value string) error +} + +func (obj *patternFlowMplsTimeToLive) Marshal() marshalPatternFlowMplsTimeToLive { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowMplsTimeToLive{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowMplsTimeToLive) Unmarshal() unMarshalPatternFlowMplsTimeToLive { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowMplsTimeToLive{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowMplsTimeToLive) ToProto() (*otg.PatternFlowMplsTimeToLive, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowMplsTimeToLive) FromProto(msg *otg.PatternFlowMplsTimeToLive) (PatternFlowMplsTimeToLive, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowMplsTimeToLive) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowMplsTimeToLive) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowMplsTimeToLive) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsTimeToLive) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowMplsTimeToLive) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsTimeToLive) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowMplsTimeToLive) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowMplsTimeToLive) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowMplsTimeToLive) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowMplsTimeToLive) Clone() (PatternFlowMplsTimeToLive, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowMplsTimeToLive() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowMplsTimeToLive) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowMplsTimeToLive is time to live +type PatternFlowMplsTimeToLive interface { + Validation + // msg marshals PatternFlowMplsTimeToLive to protobuf object *otg.PatternFlowMplsTimeToLive + // and doesn't set defaults + msg() *otg.PatternFlowMplsTimeToLive + // setMsg unmarshals PatternFlowMplsTimeToLive from protobuf object *otg.PatternFlowMplsTimeToLive + // and doesn't set defaults + setMsg(*otg.PatternFlowMplsTimeToLive) PatternFlowMplsTimeToLive + // provides marshal interface + Marshal() marshalPatternFlowMplsTimeToLive + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowMplsTimeToLive + // validate validates PatternFlowMplsTimeToLive + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowMplsTimeToLive, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowMplsTimeToLiveChoiceEnum, set in PatternFlowMplsTimeToLive + Choice() PatternFlowMplsTimeToLiveChoiceEnum + // setChoice assigns PatternFlowMplsTimeToLiveChoiceEnum provided by user to PatternFlowMplsTimeToLive + setChoice(value PatternFlowMplsTimeToLiveChoiceEnum) PatternFlowMplsTimeToLive + // HasChoice checks if Choice has been set in PatternFlowMplsTimeToLive + HasChoice() bool + // Value returns uint32, set in PatternFlowMplsTimeToLive. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowMplsTimeToLive + SetValue(value uint32) PatternFlowMplsTimeToLive + // HasValue checks if Value has been set in PatternFlowMplsTimeToLive + HasValue() bool + // Values returns []uint32, set in PatternFlowMplsTimeToLive. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowMplsTimeToLive + SetValues(value []uint32) PatternFlowMplsTimeToLive + // Increment returns PatternFlowMplsTimeToLiveCounter, set in PatternFlowMplsTimeToLive. + // PatternFlowMplsTimeToLiveCounter is integer counter pattern + Increment() PatternFlowMplsTimeToLiveCounter + // SetIncrement assigns PatternFlowMplsTimeToLiveCounter provided by user to PatternFlowMplsTimeToLive. + // PatternFlowMplsTimeToLiveCounter is integer counter pattern + SetIncrement(value PatternFlowMplsTimeToLiveCounter) PatternFlowMplsTimeToLive + // HasIncrement checks if Increment has been set in PatternFlowMplsTimeToLive + HasIncrement() bool + // Decrement returns PatternFlowMplsTimeToLiveCounter, set in PatternFlowMplsTimeToLive. + // PatternFlowMplsTimeToLiveCounter is integer counter pattern + Decrement() PatternFlowMplsTimeToLiveCounter + // SetDecrement assigns PatternFlowMplsTimeToLiveCounter provided by user to PatternFlowMplsTimeToLive. + // PatternFlowMplsTimeToLiveCounter is integer counter pattern + SetDecrement(value PatternFlowMplsTimeToLiveCounter) PatternFlowMplsTimeToLive + // HasDecrement checks if Decrement has been set in PatternFlowMplsTimeToLive + HasDecrement() bool + // MetricTags returns PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIterIter, set in PatternFlowMplsTimeToLive + MetricTags() PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter + setNil() +} + +type PatternFlowMplsTimeToLiveChoiceEnum string + +// Enum of Choice on PatternFlowMplsTimeToLive +var PatternFlowMplsTimeToLiveChoice = struct { + VALUE PatternFlowMplsTimeToLiveChoiceEnum + VALUES PatternFlowMplsTimeToLiveChoiceEnum + INCREMENT PatternFlowMplsTimeToLiveChoiceEnum + DECREMENT PatternFlowMplsTimeToLiveChoiceEnum +}{ + VALUE: PatternFlowMplsTimeToLiveChoiceEnum("value"), + VALUES: PatternFlowMplsTimeToLiveChoiceEnum("values"), + INCREMENT: PatternFlowMplsTimeToLiveChoiceEnum("increment"), + DECREMENT: PatternFlowMplsTimeToLiveChoiceEnum("decrement"), +} + +func (obj *patternFlowMplsTimeToLive) Choice() PatternFlowMplsTimeToLiveChoiceEnum { + return PatternFlowMplsTimeToLiveChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowMplsTimeToLive) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowMplsTimeToLive) setChoice(value PatternFlowMplsTimeToLiveChoiceEnum) PatternFlowMplsTimeToLive { + intValue, ok := otg.PatternFlowMplsTimeToLive_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowMplsTimeToLiveChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowMplsTimeToLive_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowMplsTimeToLiveChoice.VALUE { + defaultValue := uint32(64) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowMplsTimeToLiveChoice.VALUES { + defaultValue := []uint32{64} + obj.obj.Values = defaultValue + } + + if value == PatternFlowMplsTimeToLiveChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowMplsTimeToLiveCounter().msg() + } + + if value == PatternFlowMplsTimeToLiveChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowMplsTimeToLiveCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowMplsTimeToLive) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowMplsTimeToLiveChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowMplsTimeToLive) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowMplsTimeToLive object +func (obj *patternFlowMplsTimeToLive) SetValue(value uint32) PatternFlowMplsTimeToLive { + obj.setChoice(PatternFlowMplsTimeToLiveChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowMplsTimeToLive) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{64}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowMplsTimeToLive object +func (obj *patternFlowMplsTimeToLive) SetValues(value []uint32) PatternFlowMplsTimeToLive { + obj.setChoice(PatternFlowMplsTimeToLiveChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowMplsTimeToLiveCounter +func (obj *patternFlowMplsTimeToLive) Increment() PatternFlowMplsTimeToLiveCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowMplsTimeToLiveChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowMplsTimeToLiveCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowMplsTimeToLiveCounter +func (obj *patternFlowMplsTimeToLive) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowMplsTimeToLiveCounter value in the PatternFlowMplsTimeToLive object +func (obj *patternFlowMplsTimeToLive) SetIncrement(value PatternFlowMplsTimeToLiveCounter) PatternFlowMplsTimeToLive { + obj.setChoice(PatternFlowMplsTimeToLiveChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowMplsTimeToLiveCounter +func (obj *patternFlowMplsTimeToLive) Decrement() PatternFlowMplsTimeToLiveCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowMplsTimeToLiveChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowMplsTimeToLiveCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowMplsTimeToLiveCounter +func (obj *patternFlowMplsTimeToLive) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowMplsTimeToLiveCounter value in the PatternFlowMplsTimeToLive object +func (obj *patternFlowMplsTimeToLive) SetDecrement(value PatternFlowMplsTimeToLiveCounter) PatternFlowMplsTimeToLive { + obj.setChoice(PatternFlowMplsTimeToLiveChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowMplsTimeToLiveMetricTag +func (obj *patternFlowMplsTimeToLive) MetricTags() PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowMplsTimeToLiveMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter struct { + obj *patternFlowMplsTimeToLive + patternFlowMplsTimeToLiveMetricTagSlice []PatternFlowMplsTimeToLiveMetricTag + fieldPtr *[]*otg.PatternFlowMplsTimeToLiveMetricTag +} + +func newPatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter(ptr *[]*otg.PatternFlowMplsTimeToLiveMetricTag) PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter { + return &patternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter interface { + setMsg(*patternFlowMplsTimeToLive) PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter + Items() []PatternFlowMplsTimeToLiveMetricTag + Add() PatternFlowMplsTimeToLiveMetricTag + Append(items ...PatternFlowMplsTimeToLiveMetricTag) PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter + Set(index int, newObj PatternFlowMplsTimeToLiveMetricTag) PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter + Clear() PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter + clearHolderSlice() PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter + appendHolderSlice(item PatternFlowMplsTimeToLiveMetricTag) PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter +} + +func (obj *patternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter) setMsg(msg *patternFlowMplsTimeToLive) PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowMplsTimeToLiveMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter) Items() []PatternFlowMplsTimeToLiveMetricTag { + return obj.patternFlowMplsTimeToLiveMetricTagSlice +} + +func (obj *patternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter) Add() PatternFlowMplsTimeToLiveMetricTag { + newObj := &otg.PatternFlowMplsTimeToLiveMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowMplsTimeToLiveMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowMplsTimeToLiveMetricTagSlice = append(obj.patternFlowMplsTimeToLiveMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter) Append(items ...PatternFlowMplsTimeToLiveMetricTag) PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowMplsTimeToLiveMetricTagSlice = append(obj.patternFlowMplsTimeToLiveMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter) Set(index int, newObj PatternFlowMplsTimeToLiveMetricTag) PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowMplsTimeToLiveMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter) Clear() PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowMplsTimeToLiveMetricTag{} + obj.patternFlowMplsTimeToLiveMetricTagSlice = []PatternFlowMplsTimeToLiveMetricTag{} + } + return obj +} +func (obj *patternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter) clearHolderSlice() PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter { + if len(obj.patternFlowMplsTimeToLiveMetricTagSlice) > 0 { + obj.patternFlowMplsTimeToLiveMetricTagSlice = []PatternFlowMplsTimeToLiveMetricTag{} + } + return obj +} +func (obj *patternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter) appendHolderSlice(item PatternFlowMplsTimeToLiveMetricTag) PatternFlowMplsTimeToLivePatternFlowMplsTimeToLiveMetricTagIter { + obj.patternFlowMplsTimeToLiveMetricTagSlice = append(obj.patternFlowMplsTimeToLiveMetricTagSlice, item) + return obj +} + +func (obj *patternFlowMplsTimeToLive) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsTimeToLive.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowMplsTimeToLive.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowMplsTimeToLiveMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowMplsTimeToLive) setDefault() { + var choices_set int = 0 + var choice PatternFlowMplsTimeToLiveChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowMplsTimeToLiveChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowMplsTimeToLiveChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowMplsTimeToLiveChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowMplsTimeToLiveChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowMplsTimeToLiveChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowMplsTimeToLive") + } + } else { + intVal := otg.PatternFlowMplsTimeToLive_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowMplsTimeToLive_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_mpls_time_to_live_counter.go b/gosnappi/pattern_flow_mpls_time_to_live_counter.go new file mode 100644 index 00000000..e54e1ddf --- /dev/null +++ b/gosnappi/pattern_flow_mpls_time_to_live_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowMplsTimeToLiveCounter ***** +type patternFlowMplsTimeToLiveCounter struct { + validation + obj *otg.PatternFlowMplsTimeToLiveCounter + marshaller marshalPatternFlowMplsTimeToLiveCounter + unMarshaller unMarshalPatternFlowMplsTimeToLiveCounter +} + +func NewPatternFlowMplsTimeToLiveCounter() PatternFlowMplsTimeToLiveCounter { + obj := patternFlowMplsTimeToLiveCounter{obj: &otg.PatternFlowMplsTimeToLiveCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowMplsTimeToLiveCounter) msg() *otg.PatternFlowMplsTimeToLiveCounter { + return obj.obj +} + +func (obj *patternFlowMplsTimeToLiveCounter) setMsg(msg *otg.PatternFlowMplsTimeToLiveCounter) PatternFlowMplsTimeToLiveCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowMplsTimeToLiveCounter struct { + obj *patternFlowMplsTimeToLiveCounter +} + +type marshalPatternFlowMplsTimeToLiveCounter interface { + // ToProto marshals PatternFlowMplsTimeToLiveCounter to protobuf object *otg.PatternFlowMplsTimeToLiveCounter + ToProto() (*otg.PatternFlowMplsTimeToLiveCounter, error) + // ToPbText marshals PatternFlowMplsTimeToLiveCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowMplsTimeToLiveCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowMplsTimeToLiveCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowMplsTimeToLiveCounter struct { + obj *patternFlowMplsTimeToLiveCounter +} + +type unMarshalPatternFlowMplsTimeToLiveCounter interface { + // FromProto unmarshals PatternFlowMplsTimeToLiveCounter from protobuf object *otg.PatternFlowMplsTimeToLiveCounter + FromProto(msg *otg.PatternFlowMplsTimeToLiveCounter) (PatternFlowMplsTimeToLiveCounter, error) + // FromPbText unmarshals PatternFlowMplsTimeToLiveCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowMplsTimeToLiveCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowMplsTimeToLiveCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowMplsTimeToLiveCounter) Marshal() marshalPatternFlowMplsTimeToLiveCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowMplsTimeToLiveCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowMplsTimeToLiveCounter) Unmarshal() unMarshalPatternFlowMplsTimeToLiveCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowMplsTimeToLiveCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowMplsTimeToLiveCounter) ToProto() (*otg.PatternFlowMplsTimeToLiveCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowMplsTimeToLiveCounter) FromProto(msg *otg.PatternFlowMplsTimeToLiveCounter) (PatternFlowMplsTimeToLiveCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowMplsTimeToLiveCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowMplsTimeToLiveCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowMplsTimeToLiveCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsTimeToLiveCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowMplsTimeToLiveCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsTimeToLiveCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowMplsTimeToLiveCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowMplsTimeToLiveCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowMplsTimeToLiveCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowMplsTimeToLiveCounter) Clone() (PatternFlowMplsTimeToLiveCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowMplsTimeToLiveCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowMplsTimeToLiveCounter is integer counter pattern +type PatternFlowMplsTimeToLiveCounter interface { + Validation + // msg marshals PatternFlowMplsTimeToLiveCounter to protobuf object *otg.PatternFlowMplsTimeToLiveCounter + // and doesn't set defaults + msg() *otg.PatternFlowMplsTimeToLiveCounter + // setMsg unmarshals PatternFlowMplsTimeToLiveCounter from protobuf object *otg.PatternFlowMplsTimeToLiveCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowMplsTimeToLiveCounter) PatternFlowMplsTimeToLiveCounter + // provides marshal interface + Marshal() marshalPatternFlowMplsTimeToLiveCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowMplsTimeToLiveCounter + // validate validates PatternFlowMplsTimeToLiveCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowMplsTimeToLiveCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowMplsTimeToLiveCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowMplsTimeToLiveCounter + SetStart(value uint32) PatternFlowMplsTimeToLiveCounter + // HasStart checks if Start has been set in PatternFlowMplsTimeToLiveCounter + HasStart() bool + // Step returns uint32, set in PatternFlowMplsTimeToLiveCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowMplsTimeToLiveCounter + SetStep(value uint32) PatternFlowMplsTimeToLiveCounter + // HasStep checks if Step has been set in PatternFlowMplsTimeToLiveCounter + HasStep() bool + // Count returns uint32, set in PatternFlowMplsTimeToLiveCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowMplsTimeToLiveCounter + SetCount(value uint32) PatternFlowMplsTimeToLiveCounter + // HasCount checks if Count has been set in PatternFlowMplsTimeToLiveCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowMplsTimeToLiveCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowMplsTimeToLiveCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowMplsTimeToLiveCounter object +func (obj *patternFlowMplsTimeToLiveCounter) SetStart(value uint32) PatternFlowMplsTimeToLiveCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowMplsTimeToLiveCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowMplsTimeToLiveCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowMplsTimeToLiveCounter object +func (obj *patternFlowMplsTimeToLiveCounter) SetStep(value uint32) PatternFlowMplsTimeToLiveCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowMplsTimeToLiveCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowMplsTimeToLiveCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowMplsTimeToLiveCounter object +func (obj *patternFlowMplsTimeToLiveCounter) SetCount(value uint32) PatternFlowMplsTimeToLiveCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowMplsTimeToLiveCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsTimeToLiveCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsTimeToLiveCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsTimeToLiveCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowMplsTimeToLiveCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(64) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_mpls_time_to_live_metric_tag.go b/gosnappi/pattern_flow_mpls_time_to_live_metric_tag.go new file mode 100644 index 00000000..8454f753 --- /dev/null +++ b/gosnappi/pattern_flow_mpls_time_to_live_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowMplsTimeToLiveMetricTag ***** +type patternFlowMplsTimeToLiveMetricTag struct { + validation + obj *otg.PatternFlowMplsTimeToLiveMetricTag + marshaller marshalPatternFlowMplsTimeToLiveMetricTag + unMarshaller unMarshalPatternFlowMplsTimeToLiveMetricTag +} + +func NewPatternFlowMplsTimeToLiveMetricTag() PatternFlowMplsTimeToLiveMetricTag { + obj := patternFlowMplsTimeToLiveMetricTag{obj: &otg.PatternFlowMplsTimeToLiveMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowMplsTimeToLiveMetricTag) msg() *otg.PatternFlowMplsTimeToLiveMetricTag { + return obj.obj +} + +func (obj *patternFlowMplsTimeToLiveMetricTag) setMsg(msg *otg.PatternFlowMplsTimeToLiveMetricTag) PatternFlowMplsTimeToLiveMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowMplsTimeToLiveMetricTag struct { + obj *patternFlowMplsTimeToLiveMetricTag +} + +type marshalPatternFlowMplsTimeToLiveMetricTag interface { + // ToProto marshals PatternFlowMplsTimeToLiveMetricTag to protobuf object *otg.PatternFlowMplsTimeToLiveMetricTag + ToProto() (*otg.PatternFlowMplsTimeToLiveMetricTag, error) + // ToPbText marshals PatternFlowMplsTimeToLiveMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowMplsTimeToLiveMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowMplsTimeToLiveMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowMplsTimeToLiveMetricTag struct { + obj *patternFlowMplsTimeToLiveMetricTag +} + +type unMarshalPatternFlowMplsTimeToLiveMetricTag interface { + // FromProto unmarshals PatternFlowMplsTimeToLiveMetricTag from protobuf object *otg.PatternFlowMplsTimeToLiveMetricTag + FromProto(msg *otg.PatternFlowMplsTimeToLiveMetricTag) (PatternFlowMplsTimeToLiveMetricTag, error) + // FromPbText unmarshals PatternFlowMplsTimeToLiveMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowMplsTimeToLiveMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowMplsTimeToLiveMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowMplsTimeToLiveMetricTag) Marshal() marshalPatternFlowMplsTimeToLiveMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowMplsTimeToLiveMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowMplsTimeToLiveMetricTag) Unmarshal() unMarshalPatternFlowMplsTimeToLiveMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowMplsTimeToLiveMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowMplsTimeToLiveMetricTag) ToProto() (*otg.PatternFlowMplsTimeToLiveMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowMplsTimeToLiveMetricTag) FromProto(msg *otg.PatternFlowMplsTimeToLiveMetricTag) (PatternFlowMplsTimeToLiveMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowMplsTimeToLiveMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowMplsTimeToLiveMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowMplsTimeToLiveMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsTimeToLiveMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowMplsTimeToLiveMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsTimeToLiveMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowMplsTimeToLiveMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowMplsTimeToLiveMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowMplsTimeToLiveMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowMplsTimeToLiveMetricTag) Clone() (PatternFlowMplsTimeToLiveMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowMplsTimeToLiveMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowMplsTimeToLiveMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowMplsTimeToLiveMetricTag interface { + Validation + // msg marshals PatternFlowMplsTimeToLiveMetricTag to protobuf object *otg.PatternFlowMplsTimeToLiveMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowMplsTimeToLiveMetricTag + // setMsg unmarshals PatternFlowMplsTimeToLiveMetricTag from protobuf object *otg.PatternFlowMplsTimeToLiveMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowMplsTimeToLiveMetricTag) PatternFlowMplsTimeToLiveMetricTag + // provides marshal interface + Marshal() marshalPatternFlowMplsTimeToLiveMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowMplsTimeToLiveMetricTag + // validate validates PatternFlowMplsTimeToLiveMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowMplsTimeToLiveMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowMplsTimeToLiveMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowMplsTimeToLiveMetricTag + SetName(value string) PatternFlowMplsTimeToLiveMetricTag + // Offset returns uint32, set in PatternFlowMplsTimeToLiveMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowMplsTimeToLiveMetricTag + SetOffset(value uint32) PatternFlowMplsTimeToLiveMetricTag + // HasOffset checks if Offset has been set in PatternFlowMplsTimeToLiveMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowMplsTimeToLiveMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowMplsTimeToLiveMetricTag + SetLength(value uint32) PatternFlowMplsTimeToLiveMetricTag + // HasLength checks if Length has been set in PatternFlowMplsTimeToLiveMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowMplsTimeToLiveMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowMplsTimeToLiveMetricTag object +func (obj *patternFlowMplsTimeToLiveMetricTag) SetName(value string) PatternFlowMplsTimeToLiveMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowMplsTimeToLiveMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowMplsTimeToLiveMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowMplsTimeToLiveMetricTag object +func (obj *patternFlowMplsTimeToLiveMetricTag) SetOffset(value uint32) PatternFlowMplsTimeToLiveMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowMplsTimeToLiveMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowMplsTimeToLiveMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowMplsTimeToLiveMetricTag object +func (obj *patternFlowMplsTimeToLiveMetricTag) SetLength(value uint32) PatternFlowMplsTimeToLiveMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowMplsTimeToLiveMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowMplsTimeToLiveMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsTimeToLiveMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowMplsTimeToLiveMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowMplsTimeToLiveMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_mpls_traffic_class.go b/gosnappi/pattern_flow_mpls_traffic_class.go new file mode 100644 index 00000000..7e4046fb --- /dev/null +++ b/gosnappi/pattern_flow_mpls_traffic_class.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowMplsTrafficClass ***** +type patternFlowMplsTrafficClass struct { + validation + obj *otg.PatternFlowMplsTrafficClass + marshaller marshalPatternFlowMplsTrafficClass + unMarshaller unMarshalPatternFlowMplsTrafficClass + incrementHolder PatternFlowMplsTrafficClassCounter + decrementHolder PatternFlowMplsTrafficClassCounter + metricTagsHolder PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter +} + +func NewPatternFlowMplsTrafficClass() PatternFlowMplsTrafficClass { + obj := patternFlowMplsTrafficClass{obj: &otg.PatternFlowMplsTrafficClass{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowMplsTrafficClass) msg() *otg.PatternFlowMplsTrafficClass { + return obj.obj +} + +func (obj *patternFlowMplsTrafficClass) setMsg(msg *otg.PatternFlowMplsTrafficClass) PatternFlowMplsTrafficClass { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowMplsTrafficClass struct { + obj *patternFlowMplsTrafficClass +} + +type marshalPatternFlowMplsTrafficClass interface { + // ToProto marshals PatternFlowMplsTrafficClass to protobuf object *otg.PatternFlowMplsTrafficClass + ToProto() (*otg.PatternFlowMplsTrafficClass, error) + // ToPbText marshals PatternFlowMplsTrafficClass to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowMplsTrafficClass to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowMplsTrafficClass to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowMplsTrafficClass struct { + obj *patternFlowMplsTrafficClass +} + +type unMarshalPatternFlowMplsTrafficClass interface { + // FromProto unmarshals PatternFlowMplsTrafficClass from protobuf object *otg.PatternFlowMplsTrafficClass + FromProto(msg *otg.PatternFlowMplsTrafficClass) (PatternFlowMplsTrafficClass, error) + // FromPbText unmarshals PatternFlowMplsTrafficClass from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowMplsTrafficClass from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowMplsTrafficClass from JSON text + FromJson(value string) error +} + +func (obj *patternFlowMplsTrafficClass) Marshal() marshalPatternFlowMplsTrafficClass { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowMplsTrafficClass{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowMplsTrafficClass) Unmarshal() unMarshalPatternFlowMplsTrafficClass { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowMplsTrafficClass{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowMplsTrafficClass) ToProto() (*otg.PatternFlowMplsTrafficClass, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowMplsTrafficClass) FromProto(msg *otg.PatternFlowMplsTrafficClass) (PatternFlowMplsTrafficClass, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowMplsTrafficClass) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowMplsTrafficClass) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowMplsTrafficClass) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsTrafficClass) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowMplsTrafficClass) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsTrafficClass) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowMplsTrafficClass) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowMplsTrafficClass) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowMplsTrafficClass) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowMplsTrafficClass) Clone() (PatternFlowMplsTrafficClass, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowMplsTrafficClass() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowMplsTrafficClass) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowMplsTrafficClass is traffic class +type PatternFlowMplsTrafficClass interface { + Validation + // msg marshals PatternFlowMplsTrafficClass to protobuf object *otg.PatternFlowMplsTrafficClass + // and doesn't set defaults + msg() *otg.PatternFlowMplsTrafficClass + // setMsg unmarshals PatternFlowMplsTrafficClass from protobuf object *otg.PatternFlowMplsTrafficClass + // and doesn't set defaults + setMsg(*otg.PatternFlowMplsTrafficClass) PatternFlowMplsTrafficClass + // provides marshal interface + Marshal() marshalPatternFlowMplsTrafficClass + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowMplsTrafficClass + // validate validates PatternFlowMplsTrafficClass + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowMplsTrafficClass, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowMplsTrafficClassChoiceEnum, set in PatternFlowMplsTrafficClass + Choice() PatternFlowMplsTrafficClassChoiceEnum + // setChoice assigns PatternFlowMplsTrafficClassChoiceEnum provided by user to PatternFlowMplsTrafficClass + setChoice(value PatternFlowMplsTrafficClassChoiceEnum) PatternFlowMplsTrafficClass + // HasChoice checks if Choice has been set in PatternFlowMplsTrafficClass + HasChoice() bool + // Value returns uint32, set in PatternFlowMplsTrafficClass. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowMplsTrafficClass + SetValue(value uint32) PatternFlowMplsTrafficClass + // HasValue checks if Value has been set in PatternFlowMplsTrafficClass + HasValue() bool + // Values returns []uint32, set in PatternFlowMplsTrafficClass. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowMplsTrafficClass + SetValues(value []uint32) PatternFlowMplsTrafficClass + // Increment returns PatternFlowMplsTrafficClassCounter, set in PatternFlowMplsTrafficClass. + // PatternFlowMplsTrafficClassCounter is integer counter pattern + Increment() PatternFlowMplsTrafficClassCounter + // SetIncrement assigns PatternFlowMplsTrafficClassCounter provided by user to PatternFlowMplsTrafficClass. + // PatternFlowMplsTrafficClassCounter is integer counter pattern + SetIncrement(value PatternFlowMplsTrafficClassCounter) PatternFlowMplsTrafficClass + // HasIncrement checks if Increment has been set in PatternFlowMplsTrafficClass + HasIncrement() bool + // Decrement returns PatternFlowMplsTrafficClassCounter, set in PatternFlowMplsTrafficClass. + // PatternFlowMplsTrafficClassCounter is integer counter pattern + Decrement() PatternFlowMplsTrafficClassCounter + // SetDecrement assigns PatternFlowMplsTrafficClassCounter provided by user to PatternFlowMplsTrafficClass. + // PatternFlowMplsTrafficClassCounter is integer counter pattern + SetDecrement(value PatternFlowMplsTrafficClassCounter) PatternFlowMplsTrafficClass + // HasDecrement checks if Decrement has been set in PatternFlowMplsTrafficClass + HasDecrement() bool + // MetricTags returns PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIterIter, set in PatternFlowMplsTrafficClass + MetricTags() PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter + setNil() +} + +type PatternFlowMplsTrafficClassChoiceEnum string + +// Enum of Choice on PatternFlowMplsTrafficClass +var PatternFlowMplsTrafficClassChoice = struct { + VALUE PatternFlowMplsTrafficClassChoiceEnum + VALUES PatternFlowMplsTrafficClassChoiceEnum + INCREMENT PatternFlowMplsTrafficClassChoiceEnum + DECREMENT PatternFlowMplsTrafficClassChoiceEnum +}{ + VALUE: PatternFlowMplsTrafficClassChoiceEnum("value"), + VALUES: PatternFlowMplsTrafficClassChoiceEnum("values"), + INCREMENT: PatternFlowMplsTrafficClassChoiceEnum("increment"), + DECREMENT: PatternFlowMplsTrafficClassChoiceEnum("decrement"), +} + +func (obj *patternFlowMplsTrafficClass) Choice() PatternFlowMplsTrafficClassChoiceEnum { + return PatternFlowMplsTrafficClassChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowMplsTrafficClass) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowMplsTrafficClass) setChoice(value PatternFlowMplsTrafficClassChoiceEnum) PatternFlowMplsTrafficClass { + intValue, ok := otg.PatternFlowMplsTrafficClass_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowMplsTrafficClassChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowMplsTrafficClass_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowMplsTrafficClassChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowMplsTrafficClassChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowMplsTrafficClassChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowMplsTrafficClassCounter().msg() + } + + if value == PatternFlowMplsTrafficClassChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowMplsTrafficClassCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowMplsTrafficClass) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowMplsTrafficClassChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowMplsTrafficClass) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowMplsTrafficClass object +func (obj *patternFlowMplsTrafficClass) SetValue(value uint32) PatternFlowMplsTrafficClass { + obj.setChoice(PatternFlowMplsTrafficClassChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowMplsTrafficClass) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowMplsTrafficClass object +func (obj *patternFlowMplsTrafficClass) SetValues(value []uint32) PatternFlowMplsTrafficClass { + obj.setChoice(PatternFlowMplsTrafficClassChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowMplsTrafficClassCounter +func (obj *patternFlowMplsTrafficClass) Increment() PatternFlowMplsTrafficClassCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowMplsTrafficClassChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowMplsTrafficClassCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowMplsTrafficClassCounter +func (obj *patternFlowMplsTrafficClass) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowMplsTrafficClassCounter value in the PatternFlowMplsTrafficClass object +func (obj *patternFlowMplsTrafficClass) SetIncrement(value PatternFlowMplsTrafficClassCounter) PatternFlowMplsTrafficClass { + obj.setChoice(PatternFlowMplsTrafficClassChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowMplsTrafficClassCounter +func (obj *patternFlowMplsTrafficClass) Decrement() PatternFlowMplsTrafficClassCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowMplsTrafficClassChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowMplsTrafficClassCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowMplsTrafficClassCounter +func (obj *patternFlowMplsTrafficClass) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowMplsTrafficClassCounter value in the PatternFlowMplsTrafficClass object +func (obj *patternFlowMplsTrafficClass) SetDecrement(value PatternFlowMplsTrafficClassCounter) PatternFlowMplsTrafficClass { + obj.setChoice(PatternFlowMplsTrafficClassChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowMplsTrafficClassMetricTag +func (obj *patternFlowMplsTrafficClass) MetricTags() PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowMplsTrafficClassMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter struct { + obj *patternFlowMplsTrafficClass + patternFlowMplsTrafficClassMetricTagSlice []PatternFlowMplsTrafficClassMetricTag + fieldPtr *[]*otg.PatternFlowMplsTrafficClassMetricTag +} + +func newPatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter(ptr *[]*otg.PatternFlowMplsTrafficClassMetricTag) PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter { + return &patternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter interface { + setMsg(*patternFlowMplsTrafficClass) PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter + Items() []PatternFlowMplsTrafficClassMetricTag + Add() PatternFlowMplsTrafficClassMetricTag + Append(items ...PatternFlowMplsTrafficClassMetricTag) PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter + Set(index int, newObj PatternFlowMplsTrafficClassMetricTag) PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter + Clear() PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter + clearHolderSlice() PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter + appendHolderSlice(item PatternFlowMplsTrafficClassMetricTag) PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter +} + +func (obj *patternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter) setMsg(msg *patternFlowMplsTrafficClass) PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowMplsTrafficClassMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter) Items() []PatternFlowMplsTrafficClassMetricTag { + return obj.patternFlowMplsTrafficClassMetricTagSlice +} + +func (obj *patternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter) Add() PatternFlowMplsTrafficClassMetricTag { + newObj := &otg.PatternFlowMplsTrafficClassMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowMplsTrafficClassMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowMplsTrafficClassMetricTagSlice = append(obj.patternFlowMplsTrafficClassMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter) Append(items ...PatternFlowMplsTrafficClassMetricTag) PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowMplsTrafficClassMetricTagSlice = append(obj.patternFlowMplsTrafficClassMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter) Set(index int, newObj PatternFlowMplsTrafficClassMetricTag) PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowMplsTrafficClassMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter) Clear() PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowMplsTrafficClassMetricTag{} + obj.patternFlowMplsTrafficClassMetricTagSlice = []PatternFlowMplsTrafficClassMetricTag{} + } + return obj +} +func (obj *patternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter) clearHolderSlice() PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter { + if len(obj.patternFlowMplsTrafficClassMetricTagSlice) > 0 { + obj.patternFlowMplsTrafficClassMetricTagSlice = []PatternFlowMplsTrafficClassMetricTag{} + } + return obj +} +func (obj *patternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter) appendHolderSlice(item PatternFlowMplsTrafficClassMetricTag) PatternFlowMplsTrafficClassPatternFlowMplsTrafficClassMetricTagIter { + obj.patternFlowMplsTrafficClassMetricTagSlice = append(obj.patternFlowMplsTrafficClassMetricTagSlice, item) + return obj +} + +func (obj *patternFlowMplsTrafficClass) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsTrafficClass.Value <= 7 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowMplsTrafficClass.Values <= 7 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowMplsTrafficClassMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowMplsTrafficClass) setDefault() { + var choices_set int = 0 + var choice PatternFlowMplsTrafficClassChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowMplsTrafficClassChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowMplsTrafficClassChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowMplsTrafficClassChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowMplsTrafficClassChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowMplsTrafficClassChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowMplsTrafficClass") + } + } else { + intVal := otg.PatternFlowMplsTrafficClass_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowMplsTrafficClass_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_mpls_traffic_class_counter.go b/gosnappi/pattern_flow_mpls_traffic_class_counter.go new file mode 100644 index 00000000..5266e3ab --- /dev/null +++ b/gosnappi/pattern_flow_mpls_traffic_class_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowMplsTrafficClassCounter ***** +type patternFlowMplsTrafficClassCounter struct { + validation + obj *otg.PatternFlowMplsTrafficClassCounter + marshaller marshalPatternFlowMplsTrafficClassCounter + unMarshaller unMarshalPatternFlowMplsTrafficClassCounter +} + +func NewPatternFlowMplsTrafficClassCounter() PatternFlowMplsTrafficClassCounter { + obj := patternFlowMplsTrafficClassCounter{obj: &otg.PatternFlowMplsTrafficClassCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowMplsTrafficClassCounter) msg() *otg.PatternFlowMplsTrafficClassCounter { + return obj.obj +} + +func (obj *patternFlowMplsTrafficClassCounter) setMsg(msg *otg.PatternFlowMplsTrafficClassCounter) PatternFlowMplsTrafficClassCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowMplsTrafficClassCounter struct { + obj *patternFlowMplsTrafficClassCounter +} + +type marshalPatternFlowMplsTrafficClassCounter interface { + // ToProto marshals PatternFlowMplsTrafficClassCounter to protobuf object *otg.PatternFlowMplsTrafficClassCounter + ToProto() (*otg.PatternFlowMplsTrafficClassCounter, error) + // ToPbText marshals PatternFlowMplsTrafficClassCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowMplsTrafficClassCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowMplsTrafficClassCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowMplsTrafficClassCounter struct { + obj *patternFlowMplsTrafficClassCounter +} + +type unMarshalPatternFlowMplsTrafficClassCounter interface { + // FromProto unmarshals PatternFlowMplsTrafficClassCounter from protobuf object *otg.PatternFlowMplsTrafficClassCounter + FromProto(msg *otg.PatternFlowMplsTrafficClassCounter) (PatternFlowMplsTrafficClassCounter, error) + // FromPbText unmarshals PatternFlowMplsTrafficClassCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowMplsTrafficClassCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowMplsTrafficClassCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowMplsTrafficClassCounter) Marshal() marshalPatternFlowMplsTrafficClassCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowMplsTrafficClassCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowMplsTrafficClassCounter) Unmarshal() unMarshalPatternFlowMplsTrafficClassCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowMplsTrafficClassCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowMplsTrafficClassCounter) ToProto() (*otg.PatternFlowMplsTrafficClassCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowMplsTrafficClassCounter) FromProto(msg *otg.PatternFlowMplsTrafficClassCounter) (PatternFlowMplsTrafficClassCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowMplsTrafficClassCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowMplsTrafficClassCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowMplsTrafficClassCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsTrafficClassCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowMplsTrafficClassCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsTrafficClassCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowMplsTrafficClassCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowMplsTrafficClassCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowMplsTrafficClassCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowMplsTrafficClassCounter) Clone() (PatternFlowMplsTrafficClassCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowMplsTrafficClassCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowMplsTrafficClassCounter is integer counter pattern +type PatternFlowMplsTrafficClassCounter interface { + Validation + // msg marshals PatternFlowMplsTrafficClassCounter to protobuf object *otg.PatternFlowMplsTrafficClassCounter + // and doesn't set defaults + msg() *otg.PatternFlowMplsTrafficClassCounter + // setMsg unmarshals PatternFlowMplsTrafficClassCounter from protobuf object *otg.PatternFlowMplsTrafficClassCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowMplsTrafficClassCounter) PatternFlowMplsTrafficClassCounter + // provides marshal interface + Marshal() marshalPatternFlowMplsTrafficClassCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowMplsTrafficClassCounter + // validate validates PatternFlowMplsTrafficClassCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowMplsTrafficClassCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowMplsTrafficClassCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowMplsTrafficClassCounter + SetStart(value uint32) PatternFlowMplsTrafficClassCounter + // HasStart checks if Start has been set in PatternFlowMplsTrafficClassCounter + HasStart() bool + // Step returns uint32, set in PatternFlowMplsTrafficClassCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowMplsTrafficClassCounter + SetStep(value uint32) PatternFlowMplsTrafficClassCounter + // HasStep checks if Step has been set in PatternFlowMplsTrafficClassCounter + HasStep() bool + // Count returns uint32, set in PatternFlowMplsTrafficClassCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowMplsTrafficClassCounter + SetCount(value uint32) PatternFlowMplsTrafficClassCounter + // HasCount checks if Count has been set in PatternFlowMplsTrafficClassCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowMplsTrafficClassCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowMplsTrafficClassCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowMplsTrafficClassCounter object +func (obj *patternFlowMplsTrafficClassCounter) SetStart(value uint32) PatternFlowMplsTrafficClassCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowMplsTrafficClassCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowMplsTrafficClassCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowMplsTrafficClassCounter object +func (obj *patternFlowMplsTrafficClassCounter) SetStep(value uint32) PatternFlowMplsTrafficClassCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowMplsTrafficClassCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowMplsTrafficClassCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowMplsTrafficClassCounter object +func (obj *patternFlowMplsTrafficClassCounter) SetCount(value uint32) PatternFlowMplsTrafficClassCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowMplsTrafficClassCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsTrafficClassCounter.Start <= 7 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsTrafficClassCounter.Step <= 7 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsTrafficClassCounter.Count <= 7 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowMplsTrafficClassCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_mpls_traffic_class_metric_tag.go b/gosnappi/pattern_flow_mpls_traffic_class_metric_tag.go new file mode 100644 index 00000000..f0b1cc09 --- /dev/null +++ b/gosnappi/pattern_flow_mpls_traffic_class_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowMplsTrafficClassMetricTag ***** +type patternFlowMplsTrafficClassMetricTag struct { + validation + obj *otg.PatternFlowMplsTrafficClassMetricTag + marshaller marshalPatternFlowMplsTrafficClassMetricTag + unMarshaller unMarshalPatternFlowMplsTrafficClassMetricTag +} + +func NewPatternFlowMplsTrafficClassMetricTag() PatternFlowMplsTrafficClassMetricTag { + obj := patternFlowMplsTrafficClassMetricTag{obj: &otg.PatternFlowMplsTrafficClassMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowMplsTrafficClassMetricTag) msg() *otg.PatternFlowMplsTrafficClassMetricTag { + return obj.obj +} + +func (obj *patternFlowMplsTrafficClassMetricTag) setMsg(msg *otg.PatternFlowMplsTrafficClassMetricTag) PatternFlowMplsTrafficClassMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowMplsTrafficClassMetricTag struct { + obj *patternFlowMplsTrafficClassMetricTag +} + +type marshalPatternFlowMplsTrafficClassMetricTag interface { + // ToProto marshals PatternFlowMplsTrafficClassMetricTag to protobuf object *otg.PatternFlowMplsTrafficClassMetricTag + ToProto() (*otg.PatternFlowMplsTrafficClassMetricTag, error) + // ToPbText marshals PatternFlowMplsTrafficClassMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowMplsTrafficClassMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowMplsTrafficClassMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowMplsTrafficClassMetricTag struct { + obj *patternFlowMplsTrafficClassMetricTag +} + +type unMarshalPatternFlowMplsTrafficClassMetricTag interface { + // FromProto unmarshals PatternFlowMplsTrafficClassMetricTag from protobuf object *otg.PatternFlowMplsTrafficClassMetricTag + FromProto(msg *otg.PatternFlowMplsTrafficClassMetricTag) (PatternFlowMplsTrafficClassMetricTag, error) + // FromPbText unmarshals PatternFlowMplsTrafficClassMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowMplsTrafficClassMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowMplsTrafficClassMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowMplsTrafficClassMetricTag) Marshal() marshalPatternFlowMplsTrafficClassMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowMplsTrafficClassMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowMplsTrafficClassMetricTag) Unmarshal() unMarshalPatternFlowMplsTrafficClassMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowMplsTrafficClassMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowMplsTrafficClassMetricTag) ToProto() (*otg.PatternFlowMplsTrafficClassMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowMplsTrafficClassMetricTag) FromProto(msg *otg.PatternFlowMplsTrafficClassMetricTag) (PatternFlowMplsTrafficClassMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowMplsTrafficClassMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowMplsTrafficClassMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowMplsTrafficClassMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsTrafficClassMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowMplsTrafficClassMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowMplsTrafficClassMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowMplsTrafficClassMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowMplsTrafficClassMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowMplsTrafficClassMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowMplsTrafficClassMetricTag) Clone() (PatternFlowMplsTrafficClassMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowMplsTrafficClassMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowMplsTrafficClassMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowMplsTrafficClassMetricTag interface { + Validation + // msg marshals PatternFlowMplsTrafficClassMetricTag to protobuf object *otg.PatternFlowMplsTrafficClassMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowMplsTrafficClassMetricTag + // setMsg unmarshals PatternFlowMplsTrafficClassMetricTag from protobuf object *otg.PatternFlowMplsTrafficClassMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowMplsTrafficClassMetricTag) PatternFlowMplsTrafficClassMetricTag + // provides marshal interface + Marshal() marshalPatternFlowMplsTrafficClassMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowMplsTrafficClassMetricTag + // validate validates PatternFlowMplsTrafficClassMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowMplsTrafficClassMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowMplsTrafficClassMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowMplsTrafficClassMetricTag + SetName(value string) PatternFlowMplsTrafficClassMetricTag + // Offset returns uint32, set in PatternFlowMplsTrafficClassMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowMplsTrafficClassMetricTag + SetOffset(value uint32) PatternFlowMplsTrafficClassMetricTag + // HasOffset checks if Offset has been set in PatternFlowMplsTrafficClassMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowMplsTrafficClassMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowMplsTrafficClassMetricTag + SetLength(value uint32) PatternFlowMplsTrafficClassMetricTag + // HasLength checks if Length has been set in PatternFlowMplsTrafficClassMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowMplsTrafficClassMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowMplsTrafficClassMetricTag object +func (obj *patternFlowMplsTrafficClassMetricTag) SetName(value string) PatternFlowMplsTrafficClassMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowMplsTrafficClassMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowMplsTrafficClassMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowMplsTrafficClassMetricTag object +func (obj *patternFlowMplsTrafficClassMetricTag) SetOffset(value uint32) PatternFlowMplsTrafficClassMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowMplsTrafficClassMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowMplsTrafficClassMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowMplsTrafficClassMetricTag object +func (obj *patternFlowMplsTrafficClassMetricTag) SetLength(value uint32) PatternFlowMplsTrafficClassMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowMplsTrafficClassMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowMplsTrafficClassMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 2 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowMplsTrafficClassMetricTag.Offset <= 2 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowMplsTrafficClassMetricTag.Length <= 3 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowMplsTrafficClassMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(3) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_class_enable_vector.go b/gosnappi/pattern_flow_pfc_pause_class_enable_vector.go new file mode 100644 index 00000000..8efb459b --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_class_enable_vector.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseClassEnableVector ***** +type patternFlowPfcPauseClassEnableVector struct { + validation + obj *otg.PatternFlowPfcPauseClassEnableVector + marshaller marshalPatternFlowPfcPauseClassEnableVector + unMarshaller unMarshalPatternFlowPfcPauseClassEnableVector + incrementHolder PatternFlowPfcPauseClassEnableVectorCounter + decrementHolder PatternFlowPfcPauseClassEnableVectorCounter + metricTagsHolder PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter +} + +func NewPatternFlowPfcPauseClassEnableVector() PatternFlowPfcPauseClassEnableVector { + obj := patternFlowPfcPauseClassEnableVector{obj: &otg.PatternFlowPfcPauseClassEnableVector{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseClassEnableVector) msg() *otg.PatternFlowPfcPauseClassEnableVector { + return obj.obj +} + +func (obj *patternFlowPfcPauseClassEnableVector) setMsg(msg *otg.PatternFlowPfcPauseClassEnableVector) PatternFlowPfcPauseClassEnableVector { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseClassEnableVector struct { + obj *patternFlowPfcPauseClassEnableVector +} + +type marshalPatternFlowPfcPauseClassEnableVector interface { + // ToProto marshals PatternFlowPfcPauseClassEnableVector to protobuf object *otg.PatternFlowPfcPauseClassEnableVector + ToProto() (*otg.PatternFlowPfcPauseClassEnableVector, error) + // ToPbText marshals PatternFlowPfcPauseClassEnableVector to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseClassEnableVector to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseClassEnableVector to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseClassEnableVector struct { + obj *patternFlowPfcPauseClassEnableVector +} + +type unMarshalPatternFlowPfcPauseClassEnableVector interface { + // FromProto unmarshals PatternFlowPfcPauseClassEnableVector from protobuf object *otg.PatternFlowPfcPauseClassEnableVector + FromProto(msg *otg.PatternFlowPfcPauseClassEnableVector) (PatternFlowPfcPauseClassEnableVector, error) + // FromPbText unmarshals PatternFlowPfcPauseClassEnableVector from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseClassEnableVector from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseClassEnableVector from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseClassEnableVector) Marshal() marshalPatternFlowPfcPauseClassEnableVector { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseClassEnableVector{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseClassEnableVector) Unmarshal() unMarshalPatternFlowPfcPauseClassEnableVector { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseClassEnableVector{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseClassEnableVector) ToProto() (*otg.PatternFlowPfcPauseClassEnableVector, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseClassEnableVector) FromProto(msg *otg.PatternFlowPfcPauseClassEnableVector) (PatternFlowPfcPauseClassEnableVector, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseClassEnableVector) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseClassEnableVector) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseClassEnableVector) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseClassEnableVector) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseClassEnableVector) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseClassEnableVector) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseClassEnableVector) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseClassEnableVector) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseClassEnableVector) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseClassEnableVector) Clone() (PatternFlowPfcPauseClassEnableVector, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseClassEnableVector() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPfcPauseClassEnableVector) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPfcPauseClassEnableVector is destination +type PatternFlowPfcPauseClassEnableVector interface { + Validation + // msg marshals PatternFlowPfcPauseClassEnableVector to protobuf object *otg.PatternFlowPfcPauseClassEnableVector + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseClassEnableVector + // setMsg unmarshals PatternFlowPfcPauseClassEnableVector from protobuf object *otg.PatternFlowPfcPauseClassEnableVector + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseClassEnableVector) PatternFlowPfcPauseClassEnableVector + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseClassEnableVector + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseClassEnableVector + // validate validates PatternFlowPfcPauseClassEnableVector + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseClassEnableVector, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPfcPauseClassEnableVectorChoiceEnum, set in PatternFlowPfcPauseClassEnableVector + Choice() PatternFlowPfcPauseClassEnableVectorChoiceEnum + // setChoice assigns PatternFlowPfcPauseClassEnableVectorChoiceEnum provided by user to PatternFlowPfcPauseClassEnableVector + setChoice(value PatternFlowPfcPauseClassEnableVectorChoiceEnum) PatternFlowPfcPauseClassEnableVector + // HasChoice checks if Choice has been set in PatternFlowPfcPauseClassEnableVector + HasChoice() bool + // Value returns uint32, set in PatternFlowPfcPauseClassEnableVector. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowPfcPauseClassEnableVector + SetValue(value uint32) PatternFlowPfcPauseClassEnableVector + // HasValue checks if Value has been set in PatternFlowPfcPauseClassEnableVector + HasValue() bool + // Values returns []uint32, set in PatternFlowPfcPauseClassEnableVector. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowPfcPauseClassEnableVector + SetValues(value []uint32) PatternFlowPfcPauseClassEnableVector + // Increment returns PatternFlowPfcPauseClassEnableVectorCounter, set in PatternFlowPfcPauseClassEnableVector. + // PatternFlowPfcPauseClassEnableVectorCounter is integer counter pattern + Increment() PatternFlowPfcPauseClassEnableVectorCounter + // SetIncrement assigns PatternFlowPfcPauseClassEnableVectorCounter provided by user to PatternFlowPfcPauseClassEnableVector. + // PatternFlowPfcPauseClassEnableVectorCounter is integer counter pattern + SetIncrement(value PatternFlowPfcPauseClassEnableVectorCounter) PatternFlowPfcPauseClassEnableVector + // HasIncrement checks if Increment has been set in PatternFlowPfcPauseClassEnableVector + HasIncrement() bool + // Decrement returns PatternFlowPfcPauseClassEnableVectorCounter, set in PatternFlowPfcPauseClassEnableVector. + // PatternFlowPfcPauseClassEnableVectorCounter is integer counter pattern + Decrement() PatternFlowPfcPauseClassEnableVectorCounter + // SetDecrement assigns PatternFlowPfcPauseClassEnableVectorCounter provided by user to PatternFlowPfcPauseClassEnableVector. + // PatternFlowPfcPauseClassEnableVectorCounter is integer counter pattern + SetDecrement(value PatternFlowPfcPauseClassEnableVectorCounter) PatternFlowPfcPauseClassEnableVector + // HasDecrement checks if Decrement has been set in PatternFlowPfcPauseClassEnableVector + HasDecrement() bool + // MetricTags returns PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIterIter, set in PatternFlowPfcPauseClassEnableVector + MetricTags() PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter + setNil() +} + +type PatternFlowPfcPauseClassEnableVectorChoiceEnum string + +// Enum of Choice on PatternFlowPfcPauseClassEnableVector +var PatternFlowPfcPauseClassEnableVectorChoice = struct { + VALUE PatternFlowPfcPauseClassEnableVectorChoiceEnum + VALUES PatternFlowPfcPauseClassEnableVectorChoiceEnum + INCREMENT PatternFlowPfcPauseClassEnableVectorChoiceEnum + DECREMENT PatternFlowPfcPauseClassEnableVectorChoiceEnum +}{ + VALUE: PatternFlowPfcPauseClassEnableVectorChoiceEnum("value"), + VALUES: PatternFlowPfcPauseClassEnableVectorChoiceEnum("values"), + INCREMENT: PatternFlowPfcPauseClassEnableVectorChoiceEnum("increment"), + DECREMENT: PatternFlowPfcPauseClassEnableVectorChoiceEnum("decrement"), +} + +func (obj *patternFlowPfcPauseClassEnableVector) Choice() PatternFlowPfcPauseClassEnableVectorChoiceEnum { + return PatternFlowPfcPauseClassEnableVectorChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPfcPauseClassEnableVector) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPfcPauseClassEnableVector) setChoice(value PatternFlowPfcPauseClassEnableVectorChoiceEnum) PatternFlowPfcPauseClassEnableVector { + intValue, ok := otg.PatternFlowPfcPauseClassEnableVector_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPfcPauseClassEnableVectorChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPfcPauseClassEnableVector_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPfcPauseClassEnableVectorChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPfcPauseClassEnableVectorChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPfcPauseClassEnableVectorChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowPfcPauseClassEnableVectorCounter().msg() + } + + if value == PatternFlowPfcPauseClassEnableVectorChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPfcPauseClassEnableVectorCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPauseClassEnableVector) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPfcPauseClassEnableVectorChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPauseClassEnableVector) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowPfcPauseClassEnableVector object +func (obj *patternFlowPfcPauseClassEnableVector) SetValue(value uint32) PatternFlowPfcPauseClassEnableVector { + obj.setChoice(PatternFlowPfcPauseClassEnableVectorChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowPfcPauseClassEnableVector) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowPfcPauseClassEnableVector object +func (obj *patternFlowPfcPauseClassEnableVector) SetValues(value []uint32) PatternFlowPfcPauseClassEnableVector { + obj.setChoice(PatternFlowPfcPauseClassEnableVectorChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPfcPauseClassEnableVectorCounter +func (obj *patternFlowPfcPauseClassEnableVector) Increment() PatternFlowPfcPauseClassEnableVectorCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPfcPauseClassEnableVectorChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPfcPauseClassEnableVectorCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPfcPauseClassEnableVectorCounter +func (obj *patternFlowPfcPauseClassEnableVector) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPfcPauseClassEnableVectorCounter value in the PatternFlowPfcPauseClassEnableVector object +func (obj *patternFlowPfcPauseClassEnableVector) SetIncrement(value PatternFlowPfcPauseClassEnableVectorCounter) PatternFlowPfcPauseClassEnableVector { + obj.setChoice(PatternFlowPfcPauseClassEnableVectorChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPfcPauseClassEnableVectorCounter +func (obj *patternFlowPfcPauseClassEnableVector) Decrement() PatternFlowPfcPauseClassEnableVectorCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPfcPauseClassEnableVectorChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPfcPauseClassEnableVectorCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPfcPauseClassEnableVectorCounter +func (obj *patternFlowPfcPauseClassEnableVector) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPfcPauseClassEnableVectorCounter value in the PatternFlowPfcPauseClassEnableVector object +func (obj *patternFlowPfcPauseClassEnableVector) SetDecrement(value PatternFlowPfcPauseClassEnableVectorCounter) PatternFlowPfcPauseClassEnableVector { + obj.setChoice(PatternFlowPfcPauseClassEnableVectorChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPfcPauseClassEnableVectorMetricTag +func (obj *patternFlowPfcPauseClassEnableVector) MetricTags() PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPfcPauseClassEnableVectorMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter struct { + obj *patternFlowPfcPauseClassEnableVector + patternFlowPfcPauseClassEnableVectorMetricTagSlice []PatternFlowPfcPauseClassEnableVectorMetricTag + fieldPtr *[]*otg.PatternFlowPfcPauseClassEnableVectorMetricTag +} + +func newPatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter(ptr *[]*otg.PatternFlowPfcPauseClassEnableVectorMetricTag) PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter { + return &patternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter interface { + setMsg(*patternFlowPfcPauseClassEnableVector) PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter + Items() []PatternFlowPfcPauseClassEnableVectorMetricTag + Add() PatternFlowPfcPauseClassEnableVectorMetricTag + Append(items ...PatternFlowPfcPauseClassEnableVectorMetricTag) PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter + Set(index int, newObj PatternFlowPfcPauseClassEnableVectorMetricTag) PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter + Clear() PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter + clearHolderSlice() PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter + appendHolderSlice(item PatternFlowPfcPauseClassEnableVectorMetricTag) PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter +} + +func (obj *patternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter) setMsg(msg *patternFlowPfcPauseClassEnableVector) PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPfcPauseClassEnableVectorMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter) Items() []PatternFlowPfcPauseClassEnableVectorMetricTag { + return obj.patternFlowPfcPauseClassEnableVectorMetricTagSlice +} + +func (obj *patternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter) Add() PatternFlowPfcPauseClassEnableVectorMetricTag { + newObj := &otg.PatternFlowPfcPauseClassEnableVectorMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPfcPauseClassEnableVectorMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPfcPauseClassEnableVectorMetricTagSlice = append(obj.patternFlowPfcPauseClassEnableVectorMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter) Append(items ...PatternFlowPfcPauseClassEnableVectorMetricTag) PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPfcPauseClassEnableVectorMetricTagSlice = append(obj.patternFlowPfcPauseClassEnableVectorMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter) Set(index int, newObj PatternFlowPfcPauseClassEnableVectorMetricTag) PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPfcPauseClassEnableVectorMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter) Clear() PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPfcPauseClassEnableVectorMetricTag{} + obj.patternFlowPfcPauseClassEnableVectorMetricTagSlice = []PatternFlowPfcPauseClassEnableVectorMetricTag{} + } + return obj +} +func (obj *patternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter) clearHolderSlice() PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter { + if len(obj.patternFlowPfcPauseClassEnableVectorMetricTagSlice) > 0 { + obj.patternFlowPfcPauseClassEnableVectorMetricTagSlice = []PatternFlowPfcPauseClassEnableVectorMetricTag{} + } + return obj +} +func (obj *patternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter) appendHolderSlice(item PatternFlowPfcPauseClassEnableVectorMetricTag) PatternFlowPfcPauseClassEnableVectorPatternFlowPfcPauseClassEnableVectorMetricTagIter { + obj.patternFlowPfcPauseClassEnableVectorMetricTagSlice = append(obj.patternFlowPfcPauseClassEnableVectorMetricTagSlice, item) + return obj +} + +func (obj *patternFlowPfcPauseClassEnableVector) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseClassEnableVector.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowPfcPauseClassEnableVector.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPfcPauseClassEnableVectorMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPfcPauseClassEnableVector) setDefault() { + var choices_set int = 0 + var choice PatternFlowPfcPauseClassEnableVectorChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPfcPauseClassEnableVectorChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPfcPauseClassEnableVectorChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPfcPauseClassEnableVectorChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPfcPauseClassEnableVectorChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPfcPauseClassEnableVectorChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPfcPauseClassEnableVector") + } + } else { + intVal := otg.PatternFlowPfcPauseClassEnableVector_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPfcPauseClassEnableVector_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_class_enable_vector_counter.go b/gosnappi/pattern_flow_pfc_pause_class_enable_vector_counter.go new file mode 100644 index 00000000..f9728e5d --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_class_enable_vector_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseClassEnableVectorCounter ***** +type patternFlowPfcPauseClassEnableVectorCounter struct { + validation + obj *otg.PatternFlowPfcPauseClassEnableVectorCounter + marshaller marshalPatternFlowPfcPauseClassEnableVectorCounter + unMarshaller unMarshalPatternFlowPfcPauseClassEnableVectorCounter +} + +func NewPatternFlowPfcPauseClassEnableVectorCounter() PatternFlowPfcPauseClassEnableVectorCounter { + obj := patternFlowPfcPauseClassEnableVectorCounter{obj: &otg.PatternFlowPfcPauseClassEnableVectorCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseClassEnableVectorCounter) msg() *otg.PatternFlowPfcPauseClassEnableVectorCounter { + return obj.obj +} + +func (obj *patternFlowPfcPauseClassEnableVectorCounter) setMsg(msg *otg.PatternFlowPfcPauseClassEnableVectorCounter) PatternFlowPfcPauseClassEnableVectorCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseClassEnableVectorCounter struct { + obj *patternFlowPfcPauseClassEnableVectorCounter +} + +type marshalPatternFlowPfcPauseClassEnableVectorCounter interface { + // ToProto marshals PatternFlowPfcPauseClassEnableVectorCounter to protobuf object *otg.PatternFlowPfcPauseClassEnableVectorCounter + ToProto() (*otg.PatternFlowPfcPauseClassEnableVectorCounter, error) + // ToPbText marshals PatternFlowPfcPauseClassEnableVectorCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseClassEnableVectorCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseClassEnableVectorCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseClassEnableVectorCounter struct { + obj *patternFlowPfcPauseClassEnableVectorCounter +} + +type unMarshalPatternFlowPfcPauseClassEnableVectorCounter interface { + // FromProto unmarshals PatternFlowPfcPauseClassEnableVectorCounter from protobuf object *otg.PatternFlowPfcPauseClassEnableVectorCounter + FromProto(msg *otg.PatternFlowPfcPauseClassEnableVectorCounter) (PatternFlowPfcPauseClassEnableVectorCounter, error) + // FromPbText unmarshals PatternFlowPfcPauseClassEnableVectorCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseClassEnableVectorCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseClassEnableVectorCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseClassEnableVectorCounter) Marshal() marshalPatternFlowPfcPauseClassEnableVectorCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseClassEnableVectorCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseClassEnableVectorCounter) Unmarshal() unMarshalPatternFlowPfcPauseClassEnableVectorCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseClassEnableVectorCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseClassEnableVectorCounter) ToProto() (*otg.PatternFlowPfcPauseClassEnableVectorCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseClassEnableVectorCounter) FromProto(msg *otg.PatternFlowPfcPauseClassEnableVectorCounter) (PatternFlowPfcPauseClassEnableVectorCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseClassEnableVectorCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseClassEnableVectorCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseClassEnableVectorCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseClassEnableVectorCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseClassEnableVectorCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseClassEnableVectorCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseClassEnableVectorCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseClassEnableVectorCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseClassEnableVectorCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseClassEnableVectorCounter) Clone() (PatternFlowPfcPauseClassEnableVectorCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseClassEnableVectorCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPauseClassEnableVectorCounter is integer counter pattern +type PatternFlowPfcPauseClassEnableVectorCounter interface { + Validation + // msg marshals PatternFlowPfcPauseClassEnableVectorCounter to protobuf object *otg.PatternFlowPfcPauseClassEnableVectorCounter + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseClassEnableVectorCounter + // setMsg unmarshals PatternFlowPfcPauseClassEnableVectorCounter from protobuf object *otg.PatternFlowPfcPauseClassEnableVectorCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseClassEnableVectorCounter) PatternFlowPfcPauseClassEnableVectorCounter + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseClassEnableVectorCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseClassEnableVectorCounter + // validate validates PatternFlowPfcPauseClassEnableVectorCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseClassEnableVectorCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowPfcPauseClassEnableVectorCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowPfcPauseClassEnableVectorCounter + SetStart(value uint32) PatternFlowPfcPauseClassEnableVectorCounter + // HasStart checks if Start has been set in PatternFlowPfcPauseClassEnableVectorCounter + HasStart() bool + // Step returns uint32, set in PatternFlowPfcPauseClassEnableVectorCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowPfcPauseClassEnableVectorCounter + SetStep(value uint32) PatternFlowPfcPauseClassEnableVectorCounter + // HasStep checks if Step has been set in PatternFlowPfcPauseClassEnableVectorCounter + HasStep() bool + // Count returns uint32, set in PatternFlowPfcPauseClassEnableVectorCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPfcPauseClassEnableVectorCounter + SetCount(value uint32) PatternFlowPfcPauseClassEnableVectorCounter + // HasCount checks if Count has been set in PatternFlowPfcPauseClassEnableVectorCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPauseClassEnableVectorCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPauseClassEnableVectorCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowPfcPauseClassEnableVectorCounter object +func (obj *patternFlowPfcPauseClassEnableVectorCounter) SetStart(value uint32) PatternFlowPfcPauseClassEnableVectorCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPauseClassEnableVectorCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPauseClassEnableVectorCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowPfcPauseClassEnableVectorCounter object +func (obj *patternFlowPfcPauseClassEnableVectorCounter) SetStep(value uint32) PatternFlowPfcPauseClassEnableVectorCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPauseClassEnableVectorCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPauseClassEnableVectorCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPfcPauseClassEnableVectorCounter object +func (obj *patternFlowPfcPauseClassEnableVectorCounter) SetCount(value uint32) PatternFlowPfcPauseClassEnableVectorCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPfcPauseClassEnableVectorCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseClassEnableVectorCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseClassEnableVectorCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseClassEnableVectorCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowPfcPauseClassEnableVectorCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_class_enable_vector_metric_tag.go b/gosnappi/pattern_flow_pfc_pause_class_enable_vector_metric_tag.go new file mode 100644 index 00000000..bf458b25 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_class_enable_vector_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseClassEnableVectorMetricTag ***** +type patternFlowPfcPauseClassEnableVectorMetricTag struct { + validation + obj *otg.PatternFlowPfcPauseClassEnableVectorMetricTag + marshaller marshalPatternFlowPfcPauseClassEnableVectorMetricTag + unMarshaller unMarshalPatternFlowPfcPauseClassEnableVectorMetricTag +} + +func NewPatternFlowPfcPauseClassEnableVectorMetricTag() PatternFlowPfcPauseClassEnableVectorMetricTag { + obj := patternFlowPfcPauseClassEnableVectorMetricTag{obj: &otg.PatternFlowPfcPauseClassEnableVectorMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) msg() *otg.PatternFlowPfcPauseClassEnableVectorMetricTag { + return obj.obj +} + +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) setMsg(msg *otg.PatternFlowPfcPauseClassEnableVectorMetricTag) PatternFlowPfcPauseClassEnableVectorMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseClassEnableVectorMetricTag struct { + obj *patternFlowPfcPauseClassEnableVectorMetricTag +} + +type marshalPatternFlowPfcPauseClassEnableVectorMetricTag interface { + // ToProto marshals PatternFlowPfcPauseClassEnableVectorMetricTag to protobuf object *otg.PatternFlowPfcPauseClassEnableVectorMetricTag + ToProto() (*otg.PatternFlowPfcPauseClassEnableVectorMetricTag, error) + // ToPbText marshals PatternFlowPfcPauseClassEnableVectorMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseClassEnableVectorMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseClassEnableVectorMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseClassEnableVectorMetricTag struct { + obj *patternFlowPfcPauseClassEnableVectorMetricTag +} + +type unMarshalPatternFlowPfcPauseClassEnableVectorMetricTag interface { + // FromProto unmarshals PatternFlowPfcPauseClassEnableVectorMetricTag from protobuf object *otg.PatternFlowPfcPauseClassEnableVectorMetricTag + FromProto(msg *otg.PatternFlowPfcPauseClassEnableVectorMetricTag) (PatternFlowPfcPauseClassEnableVectorMetricTag, error) + // FromPbText unmarshals PatternFlowPfcPauseClassEnableVectorMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseClassEnableVectorMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseClassEnableVectorMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) Marshal() marshalPatternFlowPfcPauseClassEnableVectorMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseClassEnableVectorMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) Unmarshal() unMarshalPatternFlowPfcPauseClassEnableVectorMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseClassEnableVectorMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseClassEnableVectorMetricTag) ToProto() (*otg.PatternFlowPfcPauseClassEnableVectorMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseClassEnableVectorMetricTag) FromProto(msg *otg.PatternFlowPfcPauseClassEnableVectorMetricTag) (PatternFlowPfcPauseClassEnableVectorMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseClassEnableVectorMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseClassEnableVectorMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseClassEnableVectorMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseClassEnableVectorMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseClassEnableVectorMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseClassEnableVectorMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) Clone() (PatternFlowPfcPauseClassEnableVectorMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseClassEnableVectorMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPauseClassEnableVectorMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPfcPauseClassEnableVectorMetricTag interface { + Validation + // msg marshals PatternFlowPfcPauseClassEnableVectorMetricTag to protobuf object *otg.PatternFlowPfcPauseClassEnableVectorMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseClassEnableVectorMetricTag + // setMsg unmarshals PatternFlowPfcPauseClassEnableVectorMetricTag from protobuf object *otg.PatternFlowPfcPauseClassEnableVectorMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseClassEnableVectorMetricTag) PatternFlowPfcPauseClassEnableVectorMetricTag + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseClassEnableVectorMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseClassEnableVectorMetricTag + // validate validates PatternFlowPfcPauseClassEnableVectorMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseClassEnableVectorMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPfcPauseClassEnableVectorMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPfcPauseClassEnableVectorMetricTag + SetName(value string) PatternFlowPfcPauseClassEnableVectorMetricTag + // Offset returns uint32, set in PatternFlowPfcPauseClassEnableVectorMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPfcPauseClassEnableVectorMetricTag + SetOffset(value uint32) PatternFlowPfcPauseClassEnableVectorMetricTag + // HasOffset checks if Offset has been set in PatternFlowPfcPauseClassEnableVectorMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPfcPauseClassEnableVectorMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPfcPauseClassEnableVectorMetricTag + SetLength(value uint32) PatternFlowPfcPauseClassEnableVectorMetricTag + // HasLength checks if Length has been set in PatternFlowPfcPauseClassEnableVectorMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPfcPauseClassEnableVectorMetricTag object +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) SetName(value string) PatternFlowPfcPauseClassEnableVectorMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPfcPauseClassEnableVectorMetricTag object +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) SetOffset(value uint32) PatternFlowPfcPauseClassEnableVectorMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPfcPauseClassEnableVectorMetricTag object +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) SetLength(value uint32) PatternFlowPfcPauseClassEnableVectorMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPfcPauseClassEnableVectorMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseClassEnableVectorMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPfcPauseClassEnableVectorMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPfcPauseClassEnableVectorMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_control_op_code.go b/gosnappi/pattern_flow_pfc_pause_control_op_code.go new file mode 100644 index 00000000..f8dd7eff --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_control_op_code.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseControlOpCode ***** +type patternFlowPfcPauseControlOpCode struct { + validation + obj *otg.PatternFlowPfcPauseControlOpCode + marshaller marshalPatternFlowPfcPauseControlOpCode + unMarshaller unMarshalPatternFlowPfcPauseControlOpCode + incrementHolder PatternFlowPfcPauseControlOpCodeCounter + decrementHolder PatternFlowPfcPauseControlOpCodeCounter + metricTagsHolder PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter +} + +func NewPatternFlowPfcPauseControlOpCode() PatternFlowPfcPauseControlOpCode { + obj := patternFlowPfcPauseControlOpCode{obj: &otg.PatternFlowPfcPauseControlOpCode{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseControlOpCode) msg() *otg.PatternFlowPfcPauseControlOpCode { + return obj.obj +} + +func (obj *patternFlowPfcPauseControlOpCode) setMsg(msg *otg.PatternFlowPfcPauseControlOpCode) PatternFlowPfcPauseControlOpCode { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseControlOpCode struct { + obj *patternFlowPfcPauseControlOpCode +} + +type marshalPatternFlowPfcPauseControlOpCode interface { + // ToProto marshals PatternFlowPfcPauseControlOpCode to protobuf object *otg.PatternFlowPfcPauseControlOpCode + ToProto() (*otg.PatternFlowPfcPauseControlOpCode, error) + // ToPbText marshals PatternFlowPfcPauseControlOpCode to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseControlOpCode to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseControlOpCode to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseControlOpCode struct { + obj *patternFlowPfcPauseControlOpCode +} + +type unMarshalPatternFlowPfcPauseControlOpCode interface { + // FromProto unmarshals PatternFlowPfcPauseControlOpCode from protobuf object *otg.PatternFlowPfcPauseControlOpCode + FromProto(msg *otg.PatternFlowPfcPauseControlOpCode) (PatternFlowPfcPauseControlOpCode, error) + // FromPbText unmarshals PatternFlowPfcPauseControlOpCode from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseControlOpCode from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseControlOpCode from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseControlOpCode) Marshal() marshalPatternFlowPfcPauseControlOpCode { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseControlOpCode{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseControlOpCode) Unmarshal() unMarshalPatternFlowPfcPauseControlOpCode { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseControlOpCode{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseControlOpCode) ToProto() (*otg.PatternFlowPfcPauseControlOpCode, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseControlOpCode) FromProto(msg *otg.PatternFlowPfcPauseControlOpCode) (PatternFlowPfcPauseControlOpCode, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseControlOpCode) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseControlOpCode) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseControlOpCode) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseControlOpCode) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseControlOpCode) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseControlOpCode) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseControlOpCode) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseControlOpCode) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseControlOpCode) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseControlOpCode) Clone() (PatternFlowPfcPauseControlOpCode, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseControlOpCode() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPfcPauseControlOpCode) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPfcPauseControlOpCode is control operation code +type PatternFlowPfcPauseControlOpCode interface { + Validation + // msg marshals PatternFlowPfcPauseControlOpCode to protobuf object *otg.PatternFlowPfcPauseControlOpCode + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseControlOpCode + // setMsg unmarshals PatternFlowPfcPauseControlOpCode from protobuf object *otg.PatternFlowPfcPauseControlOpCode + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseControlOpCode) PatternFlowPfcPauseControlOpCode + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseControlOpCode + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseControlOpCode + // validate validates PatternFlowPfcPauseControlOpCode + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseControlOpCode, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPfcPauseControlOpCodeChoiceEnum, set in PatternFlowPfcPauseControlOpCode + Choice() PatternFlowPfcPauseControlOpCodeChoiceEnum + // setChoice assigns PatternFlowPfcPauseControlOpCodeChoiceEnum provided by user to PatternFlowPfcPauseControlOpCode + setChoice(value PatternFlowPfcPauseControlOpCodeChoiceEnum) PatternFlowPfcPauseControlOpCode + // HasChoice checks if Choice has been set in PatternFlowPfcPauseControlOpCode + HasChoice() bool + // Value returns uint32, set in PatternFlowPfcPauseControlOpCode. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowPfcPauseControlOpCode + SetValue(value uint32) PatternFlowPfcPauseControlOpCode + // HasValue checks if Value has been set in PatternFlowPfcPauseControlOpCode + HasValue() bool + // Values returns []uint32, set in PatternFlowPfcPauseControlOpCode. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowPfcPauseControlOpCode + SetValues(value []uint32) PatternFlowPfcPauseControlOpCode + // Increment returns PatternFlowPfcPauseControlOpCodeCounter, set in PatternFlowPfcPauseControlOpCode. + // PatternFlowPfcPauseControlOpCodeCounter is integer counter pattern + Increment() PatternFlowPfcPauseControlOpCodeCounter + // SetIncrement assigns PatternFlowPfcPauseControlOpCodeCounter provided by user to PatternFlowPfcPauseControlOpCode. + // PatternFlowPfcPauseControlOpCodeCounter is integer counter pattern + SetIncrement(value PatternFlowPfcPauseControlOpCodeCounter) PatternFlowPfcPauseControlOpCode + // HasIncrement checks if Increment has been set in PatternFlowPfcPauseControlOpCode + HasIncrement() bool + // Decrement returns PatternFlowPfcPauseControlOpCodeCounter, set in PatternFlowPfcPauseControlOpCode. + // PatternFlowPfcPauseControlOpCodeCounter is integer counter pattern + Decrement() PatternFlowPfcPauseControlOpCodeCounter + // SetDecrement assigns PatternFlowPfcPauseControlOpCodeCounter provided by user to PatternFlowPfcPauseControlOpCode. + // PatternFlowPfcPauseControlOpCodeCounter is integer counter pattern + SetDecrement(value PatternFlowPfcPauseControlOpCodeCounter) PatternFlowPfcPauseControlOpCode + // HasDecrement checks if Decrement has been set in PatternFlowPfcPauseControlOpCode + HasDecrement() bool + // MetricTags returns PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIterIter, set in PatternFlowPfcPauseControlOpCode + MetricTags() PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter + setNil() +} + +type PatternFlowPfcPauseControlOpCodeChoiceEnum string + +// Enum of Choice on PatternFlowPfcPauseControlOpCode +var PatternFlowPfcPauseControlOpCodeChoice = struct { + VALUE PatternFlowPfcPauseControlOpCodeChoiceEnum + VALUES PatternFlowPfcPauseControlOpCodeChoiceEnum + INCREMENT PatternFlowPfcPauseControlOpCodeChoiceEnum + DECREMENT PatternFlowPfcPauseControlOpCodeChoiceEnum +}{ + VALUE: PatternFlowPfcPauseControlOpCodeChoiceEnum("value"), + VALUES: PatternFlowPfcPauseControlOpCodeChoiceEnum("values"), + INCREMENT: PatternFlowPfcPauseControlOpCodeChoiceEnum("increment"), + DECREMENT: PatternFlowPfcPauseControlOpCodeChoiceEnum("decrement"), +} + +func (obj *patternFlowPfcPauseControlOpCode) Choice() PatternFlowPfcPauseControlOpCodeChoiceEnum { + return PatternFlowPfcPauseControlOpCodeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPfcPauseControlOpCode) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPfcPauseControlOpCode) setChoice(value PatternFlowPfcPauseControlOpCodeChoiceEnum) PatternFlowPfcPauseControlOpCode { + intValue, ok := otg.PatternFlowPfcPauseControlOpCode_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPfcPauseControlOpCodeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPfcPauseControlOpCode_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPfcPauseControlOpCodeChoice.VALUE { + defaultValue := uint32(257) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPfcPauseControlOpCodeChoice.VALUES { + defaultValue := []uint32{257} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPfcPauseControlOpCodeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowPfcPauseControlOpCodeCounter().msg() + } + + if value == PatternFlowPfcPauseControlOpCodeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPfcPauseControlOpCodeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPauseControlOpCode) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPfcPauseControlOpCodeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPauseControlOpCode) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowPfcPauseControlOpCode object +func (obj *patternFlowPfcPauseControlOpCode) SetValue(value uint32) PatternFlowPfcPauseControlOpCode { + obj.setChoice(PatternFlowPfcPauseControlOpCodeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowPfcPauseControlOpCode) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{257}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowPfcPauseControlOpCode object +func (obj *patternFlowPfcPauseControlOpCode) SetValues(value []uint32) PatternFlowPfcPauseControlOpCode { + obj.setChoice(PatternFlowPfcPauseControlOpCodeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPfcPauseControlOpCodeCounter +func (obj *patternFlowPfcPauseControlOpCode) Increment() PatternFlowPfcPauseControlOpCodeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPfcPauseControlOpCodeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPfcPauseControlOpCodeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPfcPauseControlOpCodeCounter +func (obj *patternFlowPfcPauseControlOpCode) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPfcPauseControlOpCodeCounter value in the PatternFlowPfcPauseControlOpCode object +func (obj *patternFlowPfcPauseControlOpCode) SetIncrement(value PatternFlowPfcPauseControlOpCodeCounter) PatternFlowPfcPauseControlOpCode { + obj.setChoice(PatternFlowPfcPauseControlOpCodeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPfcPauseControlOpCodeCounter +func (obj *patternFlowPfcPauseControlOpCode) Decrement() PatternFlowPfcPauseControlOpCodeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPfcPauseControlOpCodeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPfcPauseControlOpCodeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPfcPauseControlOpCodeCounter +func (obj *patternFlowPfcPauseControlOpCode) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPfcPauseControlOpCodeCounter value in the PatternFlowPfcPauseControlOpCode object +func (obj *patternFlowPfcPauseControlOpCode) SetDecrement(value PatternFlowPfcPauseControlOpCodeCounter) PatternFlowPfcPauseControlOpCode { + obj.setChoice(PatternFlowPfcPauseControlOpCodeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPfcPauseControlOpCodeMetricTag +func (obj *patternFlowPfcPauseControlOpCode) MetricTags() PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPfcPauseControlOpCodeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter struct { + obj *patternFlowPfcPauseControlOpCode + patternFlowPfcPauseControlOpCodeMetricTagSlice []PatternFlowPfcPauseControlOpCodeMetricTag + fieldPtr *[]*otg.PatternFlowPfcPauseControlOpCodeMetricTag +} + +func newPatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter(ptr *[]*otg.PatternFlowPfcPauseControlOpCodeMetricTag) PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter { + return &patternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter interface { + setMsg(*patternFlowPfcPauseControlOpCode) PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter + Items() []PatternFlowPfcPauseControlOpCodeMetricTag + Add() PatternFlowPfcPauseControlOpCodeMetricTag + Append(items ...PatternFlowPfcPauseControlOpCodeMetricTag) PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter + Set(index int, newObj PatternFlowPfcPauseControlOpCodeMetricTag) PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter + Clear() PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter + clearHolderSlice() PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter + appendHolderSlice(item PatternFlowPfcPauseControlOpCodeMetricTag) PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter +} + +func (obj *patternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter) setMsg(msg *patternFlowPfcPauseControlOpCode) PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPfcPauseControlOpCodeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter) Items() []PatternFlowPfcPauseControlOpCodeMetricTag { + return obj.patternFlowPfcPauseControlOpCodeMetricTagSlice +} + +func (obj *patternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter) Add() PatternFlowPfcPauseControlOpCodeMetricTag { + newObj := &otg.PatternFlowPfcPauseControlOpCodeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPfcPauseControlOpCodeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPfcPauseControlOpCodeMetricTagSlice = append(obj.patternFlowPfcPauseControlOpCodeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter) Append(items ...PatternFlowPfcPauseControlOpCodeMetricTag) PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPfcPauseControlOpCodeMetricTagSlice = append(obj.patternFlowPfcPauseControlOpCodeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter) Set(index int, newObj PatternFlowPfcPauseControlOpCodeMetricTag) PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPfcPauseControlOpCodeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter) Clear() PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPfcPauseControlOpCodeMetricTag{} + obj.patternFlowPfcPauseControlOpCodeMetricTagSlice = []PatternFlowPfcPauseControlOpCodeMetricTag{} + } + return obj +} +func (obj *patternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter) clearHolderSlice() PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter { + if len(obj.patternFlowPfcPauseControlOpCodeMetricTagSlice) > 0 { + obj.patternFlowPfcPauseControlOpCodeMetricTagSlice = []PatternFlowPfcPauseControlOpCodeMetricTag{} + } + return obj +} +func (obj *patternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter) appendHolderSlice(item PatternFlowPfcPauseControlOpCodeMetricTag) PatternFlowPfcPauseControlOpCodePatternFlowPfcPauseControlOpCodeMetricTagIter { + obj.patternFlowPfcPauseControlOpCodeMetricTagSlice = append(obj.patternFlowPfcPauseControlOpCodeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowPfcPauseControlOpCode) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseControlOpCode.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowPfcPauseControlOpCode.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPfcPauseControlOpCodeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPfcPauseControlOpCode) setDefault() { + var choices_set int = 0 + var choice PatternFlowPfcPauseControlOpCodeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPfcPauseControlOpCodeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPfcPauseControlOpCodeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPfcPauseControlOpCodeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPfcPauseControlOpCodeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPfcPauseControlOpCodeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPfcPauseControlOpCode") + } + } else { + intVal := otg.PatternFlowPfcPauseControlOpCode_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPfcPauseControlOpCode_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_control_op_code_counter.go b/gosnappi/pattern_flow_pfc_pause_control_op_code_counter.go new file mode 100644 index 00000000..85262210 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_control_op_code_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseControlOpCodeCounter ***** +type patternFlowPfcPauseControlOpCodeCounter struct { + validation + obj *otg.PatternFlowPfcPauseControlOpCodeCounter + marshaller marshalPatternFlowPfcPauseControlOpCodeCounter + unMarshaller unMarshalPatternFlowPfcPauseControlOpCodeCounter +} + +func NewPatternFlowPfcPauseControlOpCodeCounter() PatternFlowPfcPauseControlOpCodeCounter { + obj := patternFlowPfcPauseControlOpCodeCounter{obj: &otg.PatternFlowPfcPauseControlOpCodeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseControlOpCodeCounter) msg() *otg.PatternFlowPfcPauseControlOpCodeCounter { + return obj.obj +} + +func (obj *patternFlowPfcPauseControlOpCodeCounter) setMsg(msg *otg.PatternFlowPfcPauseControlOpCodeCounter) PatternFlowPfcPauseControlOpCodeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseControlOpCodeCounter struct { + obj *patternFlowPfcPauseControlOpCodeCounter +} + +type marshalPatternFlowPfcPauseControlOpCodeCounter interface { + // ToProto marshals PatternFlowPfcPauseControlOpCodeCounter to protobuf object *otg.PatternFlowPfcPauseControlOpCodeCounter + ToProto() (*otg.PatternFlowPfcPauseControlOpCodeCounter, error) + // ToPbText marshals PatternFlowPfcPauseControlOpCodeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseControlOpCodeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseControlOpCodeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseControlOpCodeCounter struct { + obj *patternFlowPfcPauseControlOpCodeCounter +} + +type unMarshalPatternFlowPfcPauseControlOpCodeCounter interface { + // FromProto unmarshals PatternFlowPfcPauseControlOpCodeCounter from protobuf object *otg.PatternFlowPfcPauseControlOpCodeCounter + FromProto(msg *otg.PatternFlowPfcPauseControlOpCodeCounter) (PatternFlowPfcPauseControlOpCodeCounter, error) + // FromPbText unmarshals PatternFlowPfcPauseControlOpCodeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseControlOpCodeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseControlOpCodeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseControlOpCodeCounter) Marshal() marshalPatternFlowPfcPauseControlOpCodeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseControlOpCodeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseControlOpCodeCounter) Unmarshal() unMarshalPatternFlowPfcPauseControlOpCodeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseControlOpCodeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseControlOpCodeCounter) ToProto() (*otg.PatternFlowPfcPauseControlOpCodeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseControlOpCodeCounter) FromProto(msg *otg.PatternFlowPfcPauseControlOpCodeCounter) (PatternFlowPfcPauseControlOpCodeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseControlOpCodeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseControlOpCodeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseControlOpCodeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseControlOpCodeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseControlOpCodeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseControlOpCodeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseControlOpCodeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseControlOpCodeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseControlOpCodeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseControlOpCodeCounter) Clone() (PatternFlowPfcPauseControlOpCodeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseControlOpCodeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPauseControlOpCodeCounter is integer counter pattern +type PatternFlowPfcPauseControlOpCodeCounter interface { + Validation + // msg marshals PatternFlowPfcPauseControlOpCodeCounter to protobuf object *otg.PatternFlowPfcPauseControlOpCodeCounter + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseControlOpCodeCounter + // setMsg unmarshals PatternFlowPfcPauseControlOpCodeCounter from protobuf object *otg.PatternFlowPfcPauseControlOpCodeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseControlOpCodeCounter) PatternFlowPfcPauseControlOpCodeCounter + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseControlOpCodeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseControlOpCodeCounter + // validate validates PatternFlowPfcPauseControlOpCodeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseControlOpCodeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowPfcPauseControlOpCodeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowPfcPauseControlOpCodeCounter + SetStart(value uint32) PatternFlowPfcPauseControlOpCodeCounter + // HasStart checks if Start has been set in PatternFlowPfcPauseControlOpCodeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowPfcPauseControlOpCodeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowPfcPauseControlOpCodeCounter + SetStep(value uint32) PatternFlowPfcPauseControlOpCodeCounter + // HasStep checks if Step has been set in PatternFlowPfcPauseControlOpCodeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowPfcPauseControlOpCodeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPfcPauseControlOpCodeCounter + SetCount(value uint32) PatternFlowPfcPauseControlOpCodeCounter + // HasCount checks if Count has been set in PatternFlowPfcPauseControlOpCodeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPauseControlOpCodeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPauseControlOpCodeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowPfcPauseControlOpCodeCounter object +func (obj *patternFlowPfcPauseControlOpCodeCounter) SetStart(value uint32) PatternFlowPfcPauseControlOpCodeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPauseControlOpCodeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPauseControlOpCodeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowPfcPauseControlOpCodeCounter object +func (obj *patternFlowPfcPauseControlOpCodeCounter) SetStep(value uint32) PatternFlowPfcPauseControlOpCodeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPauseControlOpCodeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPauseControlOpCodeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPfcPauseControlOpCodeCounter object +func (obj *patternFlowPfcPauseControlOpCodeCounter) SetCount(value uint32) PatternFlowPfcPauseControlOpCodeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPfcPauseControlOpCodeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseControlOpCodeCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseControlOpCodeCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseControlOpCodeCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowPfcPauseControlOpCodeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(257) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_control_op_code_metric_tag.go b/gosnappi/pattern_flow_pfc_pause_control_op_code_metric_tag.go new file mode 100644 index 00000000..4c2fc4b3 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_control_op_code_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseControlOpCodeMetricTag ***** +type patternFlowPfcPauseControlOpCodeMetricTag struct { + validation + obj *otg.PatternFlowPfcPauseControlOpCodeMetricTag + marshaller marshalPatternFlowPfcPauseControlOpCodeMetricTag + unMarshaller unMarshalPatternFlowPfcPauseControlOpCodeMetricTag +} + +func NewPatternFlowPfcPauseControlOpCodeMetricTag() PatternFlowPfcPauseControlOpCodeMetricTag { + obj := patternFlowPfcPauseControlOpCodeMetricTag{obj: &otg.PatternFlowPfcPauseControlOpCodeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) msg() *otg.PatternFlowPfcPauseControlOpCodeMetricTag { + return obj.obj +} + +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) setMsg(msg *otg.PatternFlowPfcPauseControlOpCodeMetricTag) PatternFlowPfcPauseControlOpCodeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseControlOpCodeMetricTag struct { + obj *patternFlowPfcPauseControlOpCodeMetricTag +} + +type marshalPatternFlowPfcPauseControlOpCodeMetricTag interface { + // ToProto marshals PatternFlowPfcPauseControlOpCodeMetricTag to protobuf object *otg.PatternFlowPfcPauseControlOpCodeMetricTag + ToProto() (*otg.PatternFlowPfcPauseControlOpCodeMetricTag, error) + // ToPbText marshals PatternFlowPfcPauseControlOpCodeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseControlOpCodeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseControlOpCodeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseControlOpCodeMetricTag struct { + obj *patternFlowPfcPauseControlOpCodeMetricTag +} + +type unMarshalPatternFlowPfcPauseControlOpCodeMetricTag interface { + // FromProto unmarshals PatternFlowPfcPauseControlOpCodeMetricTag from protobuf object *otg.PatternFlowPfcPauseControlOpCodeMetricTag + FromProto(msg *otg.PatternFlowPfcPauseControlOpCodeMetricTag) (PatternFlowPfcPauseControlOpCodeMetricTag, error) + // FromPbText unmarshals PatternFlowPfcPauseControlOpCodeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseControlOpCodeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseControlOpCodeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) Marshal() marshalPatternFlowPfcPauseControlOpCodeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseControlOpCodeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) Unmarshal() unMarshalPatternFlowPfcPauseControlOpCodeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseControlOpCodeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseControlOpCodeMetricTag) ToProto() (*otg.PatternFlowPfcPauseControlOpCodeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseControlOpCodeMetricTag) FromProto(msg *otg.PatternFlowPfcPauseControlOpCodeMetricTag) (PatternFlowPfcPauseControlOpCodeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseControlOpCodeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseControlOpCodeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseControlOpCodeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseControlOpCodeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseControlOpCodeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseControlOpCodeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) Clone() (PatternFlowPfcPauseControlOpCodeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseControlOpCodeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPauseControlOpCodeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPfcPauseControlOpCodeMetricTag interface { + Validation + // msg marshals PatternFlowPfcPauseControlOpCodeMetricTag to protobuf object *otg.PatternFlowPfcPauseControlOpCodeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseControlOpCodeMetricTag + // setMsg unmarshals PatternFlowPfcPauseControlOpCodeMetricTag from protobuf object *otg.PatternFlowPfcPauseControlOpCodeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseControlOpCodeMetricTag) PatternFlowPfcPauseControlOpCodeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseControlOpCodeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseControlOpCodeMetricTag + // validate validates PatternFlowPfcPauseControlOpCodeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseControlOpCodeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPfcPauseControlOpCodeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPfcPauseControlOpCodeMetricTag + SetName(value string) PatternFlowPfcPauseControlOpCodeMetricTag + // Offset returns uint32, set in PatternFlowPfcPauseControlOpCodeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPfcPauseControlOpCodeMetricTag + SetOffset(value uint32) PatternFlowPfcPauseControlOpCodeMetricTag + // HasOffset checks if Offset has been set in PatternFlowPfcPauseControlOpCodeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPfcPauseControlOpCodeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPfcPauseControlOpCodeMetricTag + SetLength(value uint32) PatternFlowPfcPauseControlOpCodeMetricTag + // HasLength checks if Length has been set in PatternFlowPfcPauseControlOpCodeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPfcPauseControlOpCodeMetricTag object +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) SetName(value string) PatternFlowPfcPauseControlOpCodeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPfcPauseControlOpCodeMetricTag object +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) SetOffset(value uint32) PatternFlowPfcPauseControlOpCodeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPfcPauseControlOpCodeMetricTag object +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) SetLength(value uint32) PatternFlowPfcPauseControlOpCodeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPfcPauseControlOpCodeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseControlOpCodeMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPfcPauseControlOpCodeMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPfcPauseControlOpCodeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_dst.go b/gosnappi/pattern_flow_pfc_pause_dst.go new file mode 100644 index 00000000..a4eab4d6 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_dst.go @@ -0,0 +1,658 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseDst ***** +type patternFlowPfcPauseDst struct { + validation + obj *otg.PatternFlowPfcPauseDst + marshaller marshalPatternFlowPfcPauseDst + unMarshaller unMarshalPatternFlowPfcPauseDst + incrementHolder PatternFlowPfcPauseDstCounter + decrementHolder PatternFlowPfcPauseDstCounter + metricTagsHolder PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter +} + +func NewPatternFlowPfcPauseDst() PatternFlowPfcPauseDst { + obj := patternFlowPfcPauseDst{obj: &otg.PatternFlowPfcPauseDst{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseDst) msg() *otg.PatternFlowPfcPauseDst { + return obj.obj +} + +func (obj *patternFlowPfcPauseDst) setMsg(msg *otg.PatternFlowPfcPauseDst) PatternFlowPfcPauseDst { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseDst struct { + obj *patternFlowPfcPauseDst +} + +type marshalPatternFlowPfcPauseDst interface { + // ToProto marshals PatternFlowPfcPauseDst to protobuf object *otg.PatternFlowPfcPauseDst + ToProto() (*otg.PatternFlowPfcPauseDst, error) + // ToPbText marshals PatternFlowPfcPauseDst to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseDst to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseDst to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseDst struct { + obj *patternFlowPfcPauseDst +} + +type unMarshalPatternFlowPfcPauseDst interface { + // FromProto unmarshals PatternFlowPfcPauseDst from protobuf object *otg.PatternFlowPfcPauseDst + FromProto(msg *otg.PatternFlowPfcPauseDst) (PatternFlowPfcPauseDst, error) + // FromPbText unmarshals PatternFlowPfcPauseDst from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseDst from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseDst from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseDst) Marshal() marshalPatternFlowPfcPauseDst { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseDst{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseDst) Unmarshal() unMarshalPatternFlowPfcPauseDst { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseDst{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseDst) ToProto() (*otg.PatternFlowPfcPauseDst, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseDst) FromProto(msg *otg.PatternFlowPfcPauseDst) (PatternFlowPfcPauseDst, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseDst) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseDst) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseDst) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseDst) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseDst) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseDst) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseDst) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseDst) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseDst) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseDst) Clone() (PatternFlowPfcPauseDst, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseDst() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPfcPauseDst) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPfcPauseDst is destination MAC address +type PatternFlowPfcPauseDst interface { + Validation + // msg marshals PatternFlowPfcPauseDst to protobuf object *otg.PatternFlowPfcPauseDst + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseDst + // setMsg unmarshals PatternFlowPfcPauseDst from protobuf object *otg.PatternFlowPfcPauseDst + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseDst) PatternFlowPfcPauseDst + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseDst + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseDst + // validate validates PatternFlowPfcPauseDst + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseDst, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPfcPauseDstChoiceEnum, set in PatternFlowPfcPauseDst + Choice() PatternFlowPfcPauseDstChoiceEnum + // setChoice assigns PatternFlowPfcPauseDstChoiceEnum provided by user to PatternFlowPfcPauseDst + setChoice(value PatternFlowPfcPauseDstChoiceEnum) PatternFlowPfcPauseDst + // HasChoice checks if Choice has been set in PatternFlowPfcPauseDst + HasChoice() bool + // Value returns string, set in PatternFlowPfcPauseDst. + Value() string + // SetValue assigns string provided by user to PatternFlowPfcPauseDst + SetValue(value string) PatternFlowPfcPauseDst + // HasValue checks if Value has been set in PatternFlowPfcPauseDst + HasValue() bool + // Values returns []string, set in PatternFlowPfcPauseDst. + Values() []string + // SetValues assigns []string provided by user to PatternFlowPfcPauseDst + SetValues(value []string) PatternFlowPfcPauseDst + // Increment returns PatternFlowPfcPauseDstCounter, set in PatternFlowPfcPauseDst. + // PatternFlowPfcPauseDstCounter is mac counter pattern + Increment() PatternFlowPfcPauseDstCounter + // SetIncrement assigns PatternFlowPfcPauseDstCounter provided by user to PatternFlowPfcPauseDst. + // PatternFlowPfcPauseDstCounter is mac counter pattern + SetIncrement(value PatternFlowPfcPauseDstCounter) PatternFlowPfcPauseDst + // HasIncrement checks if Increment has been set in PatternFlowPfcPauseDst + HasIncrement() bool + // Decrement returns PatternFlowPfcPauseDstCounter, set in PatternFlowPfcPauseDst. + // PatternFlowPfcPauseDstCounter is mac counter pattern + Decrement() PatternFlowPfcPauseDstCounter + // SetDecrement assigns PatternFlowPfcPauseDstCounter provided by user to PatternFlowPfcPauseDst. + // PatternFlowPfcPauseDstCounter is mac counter pattern + SetDecrement(value PatternFlowPfcPauseDstCounter) PatternFlowPfcPauseDst + // HasDecrement checks if Decrement has been set in PatternFlowPfcPauseDst + HasDecrement() bool + // MetricTags returns PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIterIter, set in PatternFlowPfcPauseDst + MetricTags() PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter + setNil() +} + +type PatternFlowPfcPauseDstChoiceEnum string + +// Enum of Choice on PatternFlowPfcPauseDst +var PatternFlowPfcPauseDstChoice = struct { + VALUE PatternFlowPfcPauseDstChoiceEnum + VALUES PatternFlowPfcPauseDstChoiceEnum + INCREMENT PatternFlowPfcPauseDstChoiceEnum + DECREMENT PatternFlowPfcPauseDstChoiceEnum +}{ + VALUE: PatternFlowPfcPauseDstChoiceEnum("value"), + VALUES: PatternFlowPfcPauseDstChoiceEnum("values"), + INCREMENT: PatternFlowPfcPauseDstChoiceEnum("increment"), + DECREMENT: PatternFlowPfcPauseDstChoiceEnum("decrement"), +} + +func (obj *patternFlowPfcPauseDst) Choice() PatternFlowPfcPauseDstChoiceEnum { + return PatternFlowPfcPauseDstChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPfcPauseDst) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPfcPauseDst) setChoice(value PatternFlowPfcPauseDstChoiceEnum) PatternFlowPfcPauseDst { + intValue, ok := otg.PatternFlowPfcPauseDst_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPfcPauseDstChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPfcPauseDst_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPfcPauseDstChoice.VALUE { + defaultValue := "01:80:c2:00:00:01" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPfcPauseDstChoice.VALUES { + defaultValue := []string{"01:80:c2:00:00:01"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPfcPauseDstChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowPfcPauseDstCounter().msg() + } + + if value == PatternFlowPfcPauseDstChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPfcPauseDstCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowPfcPauseDst) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPfcPauseDstChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowPfcPauseDst) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowPfcPauseDst object +func (obj *patternFlowPfcPauseDst) SetValue(value string) PatternFlowPfcPauseDst { + obj.setChoice(PatternFlowPfcPauseDstChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowPfcPauseDst) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"01:80:c2:00:00:01"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowPfcPauseDst object +func (obj *patternFlowPfcPauseDst) SetValues(value []string) PatternFlowPfcPauseDst { + obj.setChoice(PatternFlowPfcPauseDstChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPfcPauseDstCounter +func (obj *patternFlowPfcPauseDst) Increment() PatternFlowPfcPauseDstCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPfcPauseDstChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPfcPauseDstCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPfcPauseDstCounter +func (obj *patternFlowPfcPauseDst) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPfcPauseDstCounter value in the PatternFlowPfcPauseDst object +func (obj *patternFlowPfcPauseDst) SetIncrement(value PatternFlowPfcPauseDstCounter) PatternFlowPfcPauseDst { + obj.setChoice(PatternFlowPfcPauseDstChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPfcPauseDstCounter +func (obj *patternFlowPfcPauseDst) Decrement() PatternFlowPfcPauseDstCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPfcPauseDstChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPfcPauseDstCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPfcPauseDstCounter +func (obj *patternFlowPfcPauseDst) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPfcPauseDstCounter value in the PatternFlowPfcPauseDst object +func (obj *patternFlowPfcPauseDst) SetDecrement(value PatternFlowPfcPauseDstCounter) PatternFlowPfcPauseDst { + obj.setChoice(PatternFlowPfcPauseDstChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPfcPauseDstMetricTag +func (obj *patternFlowPfcPauseDst) MetricTags() PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPfcPauseDstMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter struct { + obj *patternFlowPfcPauseDst + patternFlowPfcPauseDstMetricTagSlice []PatternFlowPfcPauseDstMetricTag + fieldPtr *[]*otg.PatternFlowPfcPauseDstMetricTag +} + +func newPatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter(ptr *[]*otg.PatternFlowPfcPauseDstMetricTag) PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter { + return &patternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter interface { + setMsg(*patternFlowPfcPauseDst) PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter + Items() []PatternFlowPfcPauseDstMetricTag + Add() PatternFlowPfcPauseDstMetricTag + Append(items ...PatternFlowPfcPauseDstMetricTag) PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter + Set(index int, newObj PatternFlowPfcPauseDstMetricTag) PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter + Clear() PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter + clearHolderSlice() PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter + appendHolderSlice(item PatternFlowPfcPauseDstMetricTag) PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter +} + +func (obj *patternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter) setMsg(msg *patternFlowPfcPauseDst) PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPfcPauseDstMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter) Items() []PatternFlowPfcPauseDstMetricTag { + return obj.patternFlowPfcPauseDstMetricTagSlice +} + +func (obj *patternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter) Add() PatternFlowPfcPauseDstMetricTag { + newObj := &otg.PatternFlowPfcPauseDstMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPfcPauseDstMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPfcPauseDstMetricTagSlice = append(obj.patternFlowPfcPauseDstMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter) Append(items ...PatternFlowPfcPauseDstMetricTag) PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPfcPauseDstMetricTagSlice = append(obj.patternFlowPfcPauseDstMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter) Set(index int, newObj PatternFlowPfcPauseDstMetricTag) PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPfcPauseDstMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter) Clear() PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPfcPauseDstMetricTag{} + obj.patternFlowPfcPauseDstMetricTagSlice = []PatternFlowPfcPauseDstMetricTag{} + } + return obj +} +func (obj *patternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter) clearHolderSlice() PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter { + if len(obj.patternFlowPfcPauseDstMetricTagSlice) > 0 { + obj.patternFlowPfcPauseDstMetricTagSlice = []PatternFlowPfcPauseDstMetricTag{} + } + return obj +} +func (obj *patternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter) appendHolderSlice(item PatternFlowPfcPauseDstMetricTag) PatternFlowPfcPauseDstPatternFlowPfcPauseDstMetricTagIter { + obj.patternFlowPfcPauseDstMetricTagSlice = append(obj.patternFlowPfcPauseDstMetricTagSlice, item) + return obj +} + +func (obj *patternFlowPfcPauseDst) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateMac(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowPfcPauseDst.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateMacSlice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowPfcPauseDst.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPfcPauseDstMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPfcPauseDst) setDefault() { + var choices_set int = 0 + var choice PatternFlowPfcPauseDstChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPfcPauseDstChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPfcPauseDstChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPfcPauseDstChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPfcPauseDstChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPfcPauseDstChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPfcPauseDst") + } + } else { + intVal := otg.PatternFlowPfcPauseDst_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPfcPauseDst_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_dst_counter.go b/gosnappi/pattern_flow_pfc_pause_dst_counter.go new file mode 100644 index 00000000..acaa86ed --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_dst_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseDstCounter ***** +type patternFlowPfcPauseDstCounter struct { + validation + obj *otg.PatternFlowPfcPauseDstCounter + marshaller marshalPatternFlowPfcPauseDstCounter + unMarshaller unMarshalPatternFlowPfcPauseDstCounter +} + +func NewPatternFlowPfcPauseDstCounter() PatternFlowPfcPauseDstCounter { + obj := patternFlowPfcPauseDstCounter{obj: &otg.PatternFlowPfcPauseDstCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseDstCounter) msg() *otg.PatternFlowPfcPauseDstCounter { + return obj.obj +} + +func (obj *patternFlowPfcPauseDstCounter) setMsg(msg *otg.PatternFlowPfcPauseDstCounter) PatternFlowPfcPauseDstCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseDstCounter struct { + obj *patternFlowPfcPauseDstCounter +} + +type marshalPatternFlowPfcPauseDstCounter interface { + // ToProto marshals PatternFlowPfcPauseDstCounter to protobuf object *otg.PatternFlowPfcPauseDstCounter + ToProto() (*otg.PatternFlowPfcPauseDstCounter, error) + // ToPbText marshals PatternFlowPfcPauseDstCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseDstCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseDstCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseDstCounter struct { + obj *patternFlowPfcPauseDstCounter +} + +type unMarshalPatternFlowPfcPauseDstCounter interface { + // FromProto unmarshals PatternFlowPfcPauseDstCounter from protobuf object *otg.PatternFlowPfcPauseDstCounter + FromProto(msg *otg.PatternFlowPfcPauseDstCounter) (PatternFlowPfcPauseDstCounter, error) + // FromPbText unmarshals PatternFlowPfcPauseDstCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseDstCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseDstCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseDstCounter) Marshal() marshalPatternFlowPfcPauseDstCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseDstCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseDstCounter) Unmarshal() unMarshalPatternFlowPfcPauseDstCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseDstCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseDstCounter) ToProto() (*otg.PatternFlowPfcPauseDstCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseDstCounter) FromProto(msg *otg.PatternFlowPfcPauseDstCounter) (PatternFlowPfcPauseDstCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseDstCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseDstCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseDstCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseDstCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseDstCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseDstCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseDstCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseDstCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseDstCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseDstCounter) Clone() (PatternFlowPfcPauseDstCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseDstCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPauseDstCounter is mac counter pattern +type PatternFlowPfcPauseDstCounter interface { + Validation + // msg marshals PatternFlowPfcPauseDstCounter to protobuf object *otg.PatternFlowPfcPauseDstCounter + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseDstCounter + // setMsg unmarshals PatternFlowPfcPauseDstCounter from protobuf object *otg.PatternFlowPfcPauseDstCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseDstCounter) PatternFlowPfcPauseDstCounter + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseDstCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseDstCounter + // validate validates PatternFlowPfcPauseDstCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseDstCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowPfcPauseDstCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowPfcPauseDstCounter + SetStart(value string) PatternFlowPfcPauseDstCounter + // HasStart checks if Start has been set in PatternFlowPfcPauseDstCounter + HasStart() bool + // Step returns string, set in PatternFlowPfcPauseDstCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowPfcPauseDstCounter + SetStep(value string) PatternFlowPfcPauseDstCounter + // HasStep checks if Step has been set in PatternFlowPfcPauseDstCounter + HasStep() bool + // Count returns uint32, set in PatternFlowPfcPauseDstCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPfcPauseDstCounter + SetCount(value uint32) PatternFlowPfcPauseDstCounter + // HasCount checks if Count has been set in PatternFlowPfcPauseDstCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowPfcPauseDstCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowPfcPauseDstCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowPfcPauseDstCounter object +func (obj *patternFlowPfcPauseDstCounter) SetStart(value string) PatternFlowPfcPauseDstCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowPfcPauseDstCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowPfcPauseDstCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowPfcPauseDstCounter object +func (obj *patternFlowPfcPauseDstCounter) SetStep(value string) PatternFlowPfcPauseDstCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPauseDstCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPauseDstCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPfcPauseDstCounter object +func (obj *patternFlowPfcPauseDstCounter) SetCount(value uint32) PatternFlowPfcPauseDstCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPfcPauseDstCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateMac(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowPfcPauseDstCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateMac(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowPfcPauseDstCounter.Step")) + } + + } + +} + +func (obj *patternFlowPfcPauseDstCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("01:80:c2:00:00:01") + } + if obj.obj.Step == nil { + obj.SetStep("00:00:00:00:00:01") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_dst_metric_tag.go b/gosnappi/pattern_flow_pfc_pause_dst_metric_tag.go new file mode 100644 index 00000000..67a90a8f --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_dst_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseDstMetricTag ***** +type patternFlowPfcPauseDstMetricTag struct { + validation + obj *otg.PatternFlowPfcPauseDstMetricTag + marshaller marshalPatternFlowPfcPauseDstMetricTag + unMarshaller unMarshalPatternFlowPfcPauseDstMetricTag +} + +func NewPatternFlowPfcPauseDstMetricTag() PatternFlowPfcPauseDstMetricTag { + obj := patternFlowPfcPauseDstMetricTag{obj: &otg.PatternFlowPfcPauseDstMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseDstMetricTag) msg() *otg.PatternFlowPfcPauseDstMetricTag { + return obj.obj +} + +func (obj *patternFlowPfcPauseDstMetricTag) setMsg(msg *otg.PatternFlowPfcPauseDstMetricTag) PatternFlowPfcPauseDstMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseDstMetricTag struct { + obj *patternFlowPfcPauseDstMetricTag +} + +type marshalPatternFlowPfcPauseDstMetricTag interface { + // ToProto marshals PatternFlowPfcPauseDstMetricTag to protobuf object *otg.PatternFlowPfcPauseDstMetricTag + ToProto() (*otg.PatternFlowPfcPauseDstMetricTag, error) + // ToPbText marshals PatternFlowPfcPauseDstMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseDstMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseDstMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseDstMetricTag struct { + obj *patternFlowPfcPauseDstMetricTag +} + +type unMarshalPatternFlowPfcPauseDstMetricTag interface { + // FromProto unmarshals PatternFlowPfcPauseDstMetricTag from protobuf object *otg.PatternFlowPfcPauseDstMetricTag + FromProto(msg *otg.PatternFlowPfcPauseDstMetricTag) (PatternFlowPfcPauseDstMetricTag, error) + // FromPbText unmarshals PatternFlowPfcPauseDstMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseDstMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseDstMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseDstMetricTag) Marshal() marshalPatternFlowPfcPauseDstMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseDstMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseDstMetricTag) Unmarshal() unMarshalPatternFlowPfcPauseDstMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseDstMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseDstMetricTag) ToProto() (*otg.PatternFlowPfcPauseDstMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseDstMetricTag) FromProto(msg *otg.PatternFlowPfcPauseDstMetricTag) (PatternFlowPfcPauseDstMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseDstMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseDstMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseDstMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseDstMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseDstMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseDstMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseDstMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseDstMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseDstMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseDstMetricTag) Clone() (PatternFlowPfcPauseDstMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseDstMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPauseDstMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPfcPauseDstMetricTag interface { + Validation + // msg marshals PatternFlowPfcPauseDstMetricTag to protobuf object *otg.PatternFlowPfcPauseDstMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseDstMetricTag + // setMsg unmarshals PatternFlowPfcPauseDstMetricTag from protobuf object *otg.PatternFlowPfcPauseDstMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseDstMetricTag) PatternFlowPfcPauseDstMetricTag + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseDstMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseDstMetricTag + // validate validates PatternFlowPfcPauseDstMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseDstMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPfcPauseDstMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPfcPauseDstMetricTag + SetName(value string) PatternFlowPfcPauseDstMetricTag + // Offset returns uint32, set in PatternFlowPfcPauseDstMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPfcPauseDstMetricTag + SetOffset(value uint32) PatternFlowPfcPauseDstMetricTag + // HasOffset checks if Offset has been set in PatternFlowPfcPauseDstMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPfcPauseDstMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPfcPauseDstMetricTag + SetLength(value uint32) PatternFlowPfcPauseDstMetricTag + // HasLength checks if Length has been set in PatternFlowPfcPauseDstMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPfcPauseDstMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPfcPauseDstMetricTag object +func (obj *patternFlowPfcPauseDstMetricTag) SetName(value string) PatternFlowPfcPauseDstMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPauseDstMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPauseDstMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPfcPauseDstMetricTag object +func (obj *patternFlowPfcPauseDstMetricTag) SetOffset(value uint32) PatternFlowPfcPauseDstMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPauseDstMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPauseDstMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPfcPauseDstMetricTag object +func (obj *patternFlowPfcPauseDstMetricTag) SetLength(value uint32) PatternFlowPfcPauseDstMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPfcPauseDstMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPfcPauseDstMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 47 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseDstMetricTag.Offset <= 47 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 48 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPfcPauseDstMetricTag.Length <= 48 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPfcPauseDstMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(48) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_ether_type.go b/gosnappi/pattern_flow_pfc_pause_ether_type.go new file mode 100644 index 00000000..de9dac1d --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_ether_type.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseEtherType ***** +type patternFlowPfcPauseEtherType struct { + validation + obj *otg.PatternFlowPfcPauseEtherType + marshaller marshalPatternFlowPfcPauseEtherType + unMarshaller unMarshalPatternFlowPfcPauseEtherType + incrementHolder PatternFlowPfcPauseEtherTypeCounter + decrementHolder PatternFlowPfcPauseEtherTypeCounter + metricTagsHolder PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter +} + +func NewPatternFlowPfcPauseEtherType() PatternFlowPfcPauseEtherType { + obj := patternFlowPfcPauseEtherType{obj: &otg.PatternFlowPfcPauseEtherType{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseEtherType) msg() *otg.PatternFlowPfcPauseEtherType { + return obj.obj +} + +func (obj *patternFlowPfcPauseEtherType) setMsg(msg *otg.PatternFlowPfcPauseEtherType) PatternFlowPfcPauseEtherType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseEtherType struct { + obj *patternFlowPfcPauseEtherType +} + +type marshalPatternFlowPfcPauseEtherType interface { + // ToProto marshals PatternFlowPfcPauseEtherType to protobuf object *otg.PatternFlowPfcPauseEtherType + ToProto() (*otg.PatternFlowPfcPauseEtherType, error) + // ToPbText marshals PatternFlowPfcPauseEtherType to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseEtherType to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseEtherType to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseEtherType struct { + obj *patternFlowPfcPauseEtherType +} + +type unMarshalPatternFlowPfcPauseEtherType interface { + // FromProto unmarshals PatternFlowPfcPauseEtherType from protobuf object *otg.PatternFlowPfcPauseEtherType + FromProto(msg *otg.PatternFlowPfcPauseEtherType) (PatternFlowPfcPauseEtherType, error) + // FromPbText unmarshals PatternFlowPfcPauseEtherType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseEtherType from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseEtherType from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseEtherType) Marshal() marshalPatternFlowPfcPauseEtherType { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseEtherType{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseEtherType) Unmarshal() unMarshalPatternFlowPfcPauseEtherType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseEtherType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseEtherType) ToProto() (*otg.PatternFlowPfcPauseEtherType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseEtherType) FromProto(msg *otg.PatternFlowPfcPauseEtherType) (PatternFlowPfcPauseEtherType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseEtherType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseEtherType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseEtherType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseEtherType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseEtherType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseEtherType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseEtherType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseEtherType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseEtherType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseEtherType) Clone() (PatternFlowPfcPauseEtherType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseEtherType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPfcPauseEtherType) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPfcPauseEtherType is ethernet type +type PatternFlowPfcPauseEtherType interface { + Validation + // msg marshals PatternFlowPfcPauseEtherType to protobuf object *otg.PatternFlowPfcPauseEtherType + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseEtherType + // setMsg unmarshals PatternFlowPfcPauseEtherType from protobuf object *otg.PatternFlowPfcPauseEtherType + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseEtherType) PatternFlowPfcPauseEtherType + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseEtherType + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseEtherType + // validate validates PatternFlowPfcPauseEtherType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseEtherType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPfcPauseEtherTypeChoiceEnum, set in PatternFlowPfcPauseEtherType + Choice() PatternFlowPfcPauseEtherTypeChoiceEnum + // setChoice assigns PatternFlowPfcPauseEtherTypeChoiceEnum provided by user to PatternFlowPfcPauseEtherType + setChoice(value PatternFlowPfcPauseEtherTypeChoiceEnum) PatternFlowPfcPauseEtherType + // HasChoice checks if Choice has been set in PatternFlowPfcPauseEtherType + HasChoice() bool + // Value returns uint32, set in PatternFlowPfcPauseEtherType. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowPfcPauseEtherType + SetValue(value uint32) PatternFlowPfcPauseEtherType + // HasValue checks if Value has been set in PatternFlowPfcPauseEtherType + HasValue() bool + // Values returns []uint32, set in PatternFlowPfcPauseEtherType. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowPfcPauseEtherType + SetValues(value []uint32) PatternFlowPfcPauseEtherType + // Increment returns PatternFlowPfcPauseEtherTypeCounter, set in PatternFlowPfcPauseEtherType. + // PatternFlowPfcPauseEtherTypeCounter is integer counter pattern + Increment() PatternFlowPfcPauseEtherTypeCounter + // SetIncrement assigns PatternFlowPfcPauseEtherTypeCounter provided by user to PatternFlowPfcPauseEtherType. + // PatternFlowPfcPauseEtherTypeCounter is integer counter pattern + SetIncrement(value PatternFlowPfcPauseEtherTypeCounter) PatternFlowPfcPauseEtherType + // HasIncrement checks if Increment has been set in PatternFlowPfcPauseEtherType + HasIncrement() bool + // Decrement returns PatternFlowPfcPauseEtherTypeCounter, set in PatternFlowPfcPauseEtherType. + // PatternFlowPfcPauseEtherTypeCounter is integer counter pattern + Decrement() PatternFlowPfcPauseEtherTypeCounter + // SetDecrement assigns PatternFlowPfcPauseEtherTypeCounter provided by user to PatternFlowPfcPauseEtherType. + // PatternFlowPfcPauseEtherTypeCounter is integer counter pattern + SetDecrement(value PatternFlowPfcPauseEtherTypeCounter) PatternFlowPfcPauseEtherType + // HasDecrement checks if Decrement has been set in PatternFlowPfcPauseEtherType + HasDecrement() bool + // MetricTags returns PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIterIter, set in PatternFlowPfcPauseEtherType + MetricTags() PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter + setNil() +} + +type PatternFlowPfcPauseEtherTypeChoiceEnum string + +// Enum of Choice on PatternFlowPfcPauseEtherType +var PatternFlowPfcPauseEtherTypeChoice = struct { + VALUE PatternFlowPfcPauseEtherTypeChoiceEnum + VALUES PatternFlowPfcPauseEtherTypeChoiceEnum + INCREMENT PatternFlowPfcPauseEtherTypeChoiceEnum + DECREMENT PatternFlowPfcPauseEtherTypeChoiceEnum +}{ + VALUE: PatternFlowPfcPauseEtherTypeChoiceEnum("value"), + VALUES: PatternFlowPfcPauseEtherTypeChoiceEnum("values"), + INCREMENT: PatternFlowPfcPauseEtherTypeChoiceEnum("increment"), + DECREMENT: PatternFlowPfcPauseEtherTypeChoiceEnum("decrement"), +} + +func (obj *patternFlowPfcPauseEtherType) Choice() PatternFlowPfcPauseEtherTypeChoiceEnum { + return PatternFlowPfcPauseEtherTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPfcPauseEtherType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPfcPauseEtherType) setChoice(value PatternFlowPfcPauseEtherTypeChoiceEnum) PatternFlowPfcPauseEtherType { + intValue, ok := otg.PatternFlowPfcPauseEtherType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPfcPauseEtherTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPfcPauseEtherType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPfcPauseEtherTypeChoice.VALUE { + defaultValue := uint32(34824) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPfcPauseEtherTypeChoice.VALUES { + defaultValue := []uint32{34824} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPfcPauseEtherTypeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowPfcPauseEtherTypeCounter().msg() + } + + if value == PatternFlowPfcPauseEtherTypeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPfcPauseEtherTypeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPauseEtherType) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPfcPauseEtherTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPauseEtherType) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowPfcPauseEtherType object +func (obj *patternFlowPfcPauseEtherType) SetValue(value uint32) PatternFlowPfcPauseEtherType { + obj.setChoice(PatternFlowPfcPauseEtherTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowPfcPauseEtherType) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{34824}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowPfcPauseEtherType object +func (obj *patternFlowPfcPauseEtherType) SetValues(value []uint32) PatternFlowPfcPauseEtherType { + obj.setChoice(PatternFlowPfcPauseEtherTypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPfcPauseEtherTypeCounter +func (obj *patternFlowPfcPauseEtherType) Increment() PatternFlowPfcPauseEtherTypeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPfcPauseEtherTypeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPfcPauseEtherTypeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPfcPauseEtherTypeCounter +func (obj *patternFlowPfcPauseEtherType) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPfcPauseEtherTypeCounter value in the PatternFlowPfcPauseEtherType object +func (obj *patternFlowPfcPauseEtherType) SetIncrement(value PatternFlowPfcPauseEtherTypeCounter) PatternFlowPfcPauseEtherType { + obj.setChoice(PatternFlowPfcPauseEtherTypeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPfcPauseEtherTypeCounter +func (obj *patternFlowPfcPauseEtherType) Decrement() PatternFlowPfcPauseEtherTypeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPfcPauseEtherTypeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPfcPauseEtherTypeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPfcPauseEtherTypeCounter +func (obj *patternFlowPfcPauseEtherType) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPfcPauseEtherTypeCounter value in the PatternFlowPfcPauseEtherType object +func (obj *patternFlowPfcPauseEtherType) SetDecrement(value PatternFlowPfcPauseEtherTypeCounter) PatternFlowPfcPauseEtherType { + obj.setChoice(PatternFlowPfcPauseEtherTypeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPfcPauseEtherTypeMetricTag +func (obj *patternFlowPfcPauseEtherType) MetricTags() PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPfcPauseEtherTypeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter struct { + obj *patternFlowPfcPauseEtherType + patternFlowPfcPauseEtherTypeMetricTagSlice []PatternFlowPfcPauseEtherTypeMetricTag + fieldPtr *[]*otg.PatternFlowPfcPauseEtherTypeMetricTag +} + +func newPatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter(ptr *[]*otg.PatternFlowPfcPauseEtherTypeMetricTag) PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter { + return &patternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter interface { + setMsg(*patternFlowPfcPauseEtherType) PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter + Items() []PatternFlowPfcPauseEtherTypeMetricTag + Add() PatternFlowPfcPauseEtherTypeMetricTag + Append(items ...PatternFlowPfcPauseEtherTypeMetricTag) PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter + Set(index int, newObj PatternFlowPfcPauseEtherTypeMetricTag) PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter + Clear() PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter + clearHolderSlice() PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter + appendHolderSlice(item PatternFlowPfcPauseEtherTypeMetricTag) PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter +} + +func (obj *patternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter) setMsg(msg *patternFlowPfcPauseEtherType) PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPfcPauseEtherTypeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter) Items() []PatternFlowPfcPauseEtherTypeMetricTag { + return obj.patternFlowPfcPauseEtherTypeMetricTagSlice +} + +func (obj *patternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter) Add() PatternFlowPfcPauseEtherTypeMetricTag { + newObj := &otg.PatternFlowPfcPauseEtherTypeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPfcPauseEtherTypeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPfcPauseEtherTypeMetricTagSlice = append(obj.patternFlowPfcPauseEtherTypeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter) Append(items ...PatternFlowPfcPauseEtherTypeMetricTag) PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPfcPauseEtherTypeMetricTagSlice = append(obj.patternFlowPfcPauseEtherTypeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter) Set(index int, newObj PatternFlowPfcPauseEtherTypeMetricTag) PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPfcPauseEtherTypeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter) Clear() PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPfcPauseEtherTypeMetricTag{} + obj.patternFlowPfcPauseEtherTypeMetricTagSlice = []PatternFlowPfcPauseEtherTypeMetricTag{} + } + return obj +} +func (obj *patternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter) clearHolderSlice() PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter { + if len(obj.patternFlowPfcPauseEtherTypeMetricTagSlice) > 0 { + obj.patternFlowPfcPauseEtherTypeMetricTagSlice = []PatternFlowPfcPauseEtherTypeMetricTag{} + } + return obj +} +func (obj *patternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter) appendHolderSlice(item PatternFlowPfcPauseEtherTypeMetricTag) PatternFlowPfcPauseEtherTypePatternFlowPfcPauseEtherTypeMetricTagIter { + obj.patternFlowPfcPauseEtherTypeMetricTagSlice = append(obj.patternFlowPfcPauseEtherTypeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowPfcPauseEtherType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseEtherType.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowPfcPauseEtherType.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPfcPauseEtherTypeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPfcPauseEtherType) setDefault() { + var choices_set int = 0 + var choice PatternFlowPfcPauseEtherTypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPfcPauseEtherTypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPfcPauseEtherTypeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPfcPauseEtherTypeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPfcPauseEtherTypeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPfcPauseEtherTypeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPfcPauseEtherType") + } + } else { + intVal := otg.PatternFlowPfcPauseEtherType_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPfcPauseEtherType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_ether_type_counter.go b/gosnappi/pattern_flow_pfc_pause_ether_type_counter.go new file mode 100644 index 00000000..836d62b5 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_ether_type_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseEtherTypeCounter ***** +type patternFlowPfcPauseEtherTypeCounter struct { + validation + obj *otg.PatternFlowPfcPauseEtherTypeCounter + marshaller marshalPatternFlowPfcPauseEtherTypeCounter + unMarshaller unMarshalPatternFlowPfcPauseEtherTypeCounter +} + +func NewPatternFlowPfcPauseEtherTypeCounter() PatternFlowPfcPauseEtherTypeCounter { + obj := patternFlowPfcPauseEtherTypeCounter{obj: &otg.PatternFlowPfcPauseEtherTypeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseEtherTypeCounter) msg() *otg.PatternFlowPfcPauseEtherTypeCounter { + return obj.obj +} + +func (obj *patternFlowPfcPauseEtherTypeCounter) setMsg(msg *otg.PatternFlowPfcPauseEtherTypeCounter) PatternFlowPfcPauseEtherTypeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseEtherTypeCounter struct { + obj *patternFlowPfcPauseEtherTypeCounter +} + +type marshalPatternFlowPfcPauseEtherTypeCounter interface { + // ToProto marshals PatternFlowPfcPauseEtherTypeCounter to protobuf object *otg.PatternFlowPfcPauseEtherTypeCounter + ToProto() (*otg.PatternFlowPfcPauseEtherTypeCounter, error) + // ToPbText marshals PatternFlowPfcPauseEtherTypeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseEtherTypeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseEtherTypeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseEtherTypeCounter struct { + obj *patternFlowPfcPauseEtherTypeCounter +} + +type unMarshalPatternFlowPfcPauseEtherTypeCounter interface { + // FromProto unmarshals PatternFlowPfcPauseEtherTypeCounter from protobuf object *otg.PatternFlowPfcPauseEtherTypeCounter + FromProto(msg *otg.PatternFlowPfcPauseEtherTypeCounter) (PatternFlowPfcPauseEtherTypeCounter, error) + // FromPbText unmarshals PatternFlowPfcPauseEtherTypeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseEtherTypeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseEtherTypeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseEtherTypeCounter) Marshal() marshalPatternFlowPfcPauseEtherTypeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseEtherTypeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseEtherTypeCounter) Unmarshal() unMarshalPatternFlowPfcPauseEtherTypeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseEtherTypeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseEtherTypeCounter) ToProto() (*otg.PatternFlowPfcPauseEtherTypeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseEtherTypeCounter) FromProto(msg *otg.PatternFlowPfcPauseEtherTypeCounter) (PatternFlowPfcPauseEtherTypeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseEtherTypeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseEtherTypeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseEtherTypeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseEtherTypeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseEtherTypeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseEtherTypeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseEtherTypeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseEtherTypeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseEtherTypeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseEtherTypeCounter) Clone() (PatternFlowPfcPauseEtherTypeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseEtherTypeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPauseEtherTypeCounter is integer counter pattern +type PatternFlowPfcPauseEtherTypeCounter interface { + Validation + // msg marshals PatternFlowPfcPauseEtherTypeCounter to protobuf object *otg.PatternFlowPfcPauseEtherTypeCounter + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseEtherTypeCounter + // setMsg unmarshals PatternFlowPfcPauseEtherTypeCounter from protobuf object *otg.PatternFlowPfcPauseEtherTypeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseEtherTypeCounter) PatternFlowPfcPauseEtherTypeCounter + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseEtherTypeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseEtherTypeCounter + // validate validates PatternFlowPfcPauseEtherTypeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseEtherTypeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowPfcPauseEtherTypeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowPfcPauseEtherTypeCounter + SetStart(value uint32) PatternFlowPfcPauseEtherTypeCounter + // HasStart checks if Start has been set in PatternFlowPfcPauseEtherTypeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowPfcPauseEtherTypeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowPfcPauseEtherTypeCounter + SetStep(value uint32) PatternFlowPfcPauseEtherTypeCounter + // HasStep checks if Step has been set in PatternFlowPfcPauseEtherTypeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowPfcPauseEtherTypeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPfcPauseEtherTypeCounter + SetCount(value uint32) PatternFlowPfcPauseEtherTypeCounter + // HasCount checks if Count has been set in PatternFlowPfcPauseEtherTypeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPauseEtherTypeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPauseEtherTypeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowPfcPauseEtherTypeCounter object +func (obj *patternFlowPfcPauseEtherTypeCounter) SetStart(value uint32) PatternFlowPfcPauseEtherTypeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPauseEtherTypeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPauseEtherTypeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowPfcPauseEtherTypeCounter object +func (obj *patternFlowPfcPauseEtherTypeCounter) SetStep(value uint32) PatternFlowPfcPauseEtherTypeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPauseEtherTypeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPauseEtherTypeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPfcPauseEtherTypeCounter object +func (obj *patternFlowPfcPauseEtherTypeCounter) SetCount(value uint32) PatternFlowPfcPauseEtherTypeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPfcPauseEtherTypeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseEtherTypeCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseEtherTypeCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseEtherTypeCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowPfcPauseEtherTypeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(34824) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_ether_type_metric_tag.go b/gosnappi/pattern_flow_pfc_pause_ether_type_metric_tag.go new file mode 100644 index 00000000..f5ea2f1b --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_ether_type_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseEtherTypeMetricTag ***** +type patternFlowPfcPauseEtherTypeMetricTag struct { + validation + obj *otg.PatternFlowPfcPauseEtherTypeMetricTag + marshaller marshalPatternFlowPfcPauseEtherTypeMetricTag + unMarshaller unMarshalPatternFlowPfcPauseEtherTypeMetricTag +} + +func NewPatternFlowPfcPauseEtherTypeMetricTag() PatternFlowPfcPauseEtherTypeMetricTag { + obj := patternFlowPfcPauseEtherTypeMetricTag{obj: &otg.PatternFlowPfcPauseEtherTypeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseEtherTypeMetricTag) msg() *otg.PatternFlowPfcPauseEtherTypeMetricTag { + return obj.obj +} + +func (obj *patternFlowPfcPauseEtherTypeMetricTag) setMsg(msg *otg.PatternFlowPfcPauseEtherTypeMetricTag) PatternFlowPfcPauseEtherTypeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseEtherTypeMetricTag struct { + obj *patternFlowPfcPauseEtherTypeMetricTag +} + +type marshalPatternFlowPfcPauseEtherTypeMetricTag interface { + // ToProto marshals PatternFlowPfcPauseEtherTypeMetricTag to protobuf object *otg.PatternFlowPfcPauseEtherTypeMetricTag + ToProto() (*otg.PatternFlowPfcPauseEtherTypeMetricTag, error) + // ToPbText marshals PatternFlowPfcPauseEtherTypeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseEtherTypeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseEtherTypeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseEtherTypeMetricTag struct { + obj *patternFlowPfcPauseEtherTypeMetricTag +} + +type unMarshalPatternFlowPfcPauseEtherTypeMetricTag interface { + // FromProto unmarshals PatternFlowPfcPauseEtherTypeMetricTag from protobuf object *otg.PatternFlowPfcPauseEtherTypeMetricTag + FromProto(msg *otg.PatternFlowPfcPauseEtherTypeMetricTag) (PatternFlowPfcPauseEtherTypeMetricTag, error) + // FromPbText unmarshals PatternFlowPfcPauseEtherTypeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseEtherTypeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseEtherTypeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseEtherTypeMetricTag) Marshal() marshalPatternFlowPfcPauseEtherTypeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseEtherTypeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseEtherTypeMetricTag) Unmarshal() unMarshalPatternFlowPfcPauseEtherTypeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseEtherTypeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseEtherTypeMetricTag) ToProto() (*otg.PatternFlowPfcPauseEtherTypeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseEtherTypeMetricTag) FromProto(msg *otg.PatternFlowPfcPauseEtherTypeMetricTag) (PatternFlowPfcPauseEtherTypeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseEtherTypeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseEtherTypeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseEtherTypeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseEtherTypeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseEtherTypeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseEtherTypeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseEtherTypeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseEtherTypeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseEtherTypeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseEtherTypeMetricTag) Clone() (PatternFlowPfcPauseEtherTypeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseEtherTypeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPauseEtherTypeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPfcPauseEtherTypeMetricTag interface { + Validation + // msg marshals PatternFlowPfcPauseEtherTypeMetricTag to protobuf object *otg.PatternFlowPfcPauseEtherTypeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseEtherTypeMetricTag + // setMsg unmarshals PatternFlowPfcPauseEtherTypeMetricTag from protobuf object *otg.PatternFlowPfcPauseEtherTypeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseEtherTypeMetricTag) PatternFlowPfcPauseEtherTypeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseEtherTypeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseEtherTypeMetricTag + // validate validates PatternFlowPfcPauseEtherTypeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseEtherTypeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPfcPauseEtherTypeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPfcPauseEtherTypeMetricTag + SetName(value string) PatternFlowPfcPauseEtherTypeMetricTag + // Offset returns uint32, set in PatternFlowPfcPauseEtherTypeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPfcPauseEtherTypeMetricTag + SetOffset(value uint32) PatternFlowPfcPauseEtherTypeMetricTag + // HasOffset checks if Offset has been set in PatternFlowPfcPauseEtherTypeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPfcPauseEtherTypeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPfcPauseEtherTypeMetricTag + SetLength(value uint32) PatternFlowPfcPauseEtherTypeMetricTag + // HasLength checks if Length has been set in PatternFlowPfcPauseEtherTypeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPfcPauseEtherTypeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPfcPauseEtherTypeMetricTag object +func (obj *patternFlowPfcPauseEtherTypeMetricTag) SetName(value string) PatternFlowPfcPauseEtherTypeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPauseEtherTypeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPauseEtherTypeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPfcPauseEtherTypeMetricTag object +func (obj *patternFlowPfcPauseEtherTypeMetricTag) SetOffset(value uint32) PatternFlowPfcPauseEtherTypeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPauseEtherTypeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPauseEtherTypeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPfcPauseEtherTypeMetricTag object +func (obj *patternFlowPfcPauseEtherTypeMetricTag) SetLength(value uint32) PatternFlowPfcPauseEtherTypeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPfcPauseEtherTypeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPfcPauseEtherTypeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseEtherTypeMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPfcPauseEtherTypeMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPfcPauseEtherTypeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class0.go b/gosnappi/pattern_flow_pfc_pause_pause_class0.go new file mode 100644 index 00000000..59b6b542 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class0.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass0 ***** +type patternFlowPfcPausePauseClass0 struct { + validation + obj *otg.PatternFlowPfcPausePauseClass0 + marshaller marshalPatternFlowPfcPausePauseClass0 + unMarshaller unMarshalPatternFlowPfcPausePauseClass0 + incrementHolder PatternFlowPfcPausePauseClass0Counter + decrementHolder PatternFlowPfcPausePauseClass0Counter + metricTagsHolder PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter +} + +func NewPatternFlowPfcPausePauseClass0() PatternFlowPfcPausePauseClass0 { + obj := patternFlowPfcPausePauseClass0{obj: &otg.PatternFlowPfcPausePauseClass0{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass0) msg() *otg.PatternFlowPfcPausePauseClass0 { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass0) setMsg(msg *otg.PatternFlowPfcPausePauseClass0) PatternFlowPfcPausePauseClass0 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass0 struct { + obj *patternFlowPfcPausePauseClass0 +} + +type marshalPatternFlowPfcPausePauseClass0 interface { + // ToProto marshals PatternFlowPfcPausePauseClass0 to protobuf object *otg.PatternFlowPfcPausePauseClass0 + ToProto() (*otg.PatternFlowPfcPausePauseClass0, error) + // ToPbText marshals PatternFlowPfcPausePauseClass0 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass0 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass0 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass0 struct { + obj *patternFlowPfcPausePauseClass0 +} + +type unMarshalPatternFlowPfcPausePauseClass0 interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass0 from protobuf object *otg.PatternFlowPfcPausePauseClass0 + FromProto(msg *otg.PatternFlowPfcPausePauseClass0) (PatternFlowPfcPausePauseClass0, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass0 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass0 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass0 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass0) Marshal() marshalPatternFlowPfcPausePauseClass0 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass0{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass0) Unmarshal() unMarshalPatternFlowPfcPausePauseClass0 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass0{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass0) ToProto() (*otg.PatternFlowPfcPausePauseClass0, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass0) FromProto(msg *otg.PatternFlowPfcPausePauseClass0) (PatternFlowPfcPausePauseClass0, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass0) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass0) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass0) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass0) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass0) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass0) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass0) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass0) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass0) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass0) Clone() (PatternFlowPfcPausePauseClass0, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass0() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPfcPausePauseClass0) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPfcPausePauseClass0 is pause class 0 +type PatternFlowPfcPausePauseClass0 interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass0 to protobuf object *otg.PatternFlowPfcPausePauseClass0 + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass0 + // setMsg unmarshals PatternFlowPfcPausePauseClass0 from protobuf object *otg.PatternFlowPfcPausePauseClass0 + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass0) PatternFlowPfcPausePauseClass0 + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass0 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass0 + // validate validates PatternFlowPfcPausePauseClass0 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass0, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPfcPausePauseClass0ChoiceEnum, set in PatternFlowPfcPausePauseClass0 + Choice() PatternFlowPfcPausePauseClass0ChoiceEnum + // setChoice assigns PatternFlowPfcPausePauseClass0ChoiceEnum provided by user to PatternFlowPfcPausePauseClass0 + setChoice(value PatternFlowPfcPausePauseClass0ChoiceEnum) PatternFlowPfcPausePauseClass0 + // HasChoice checks if Choice has been set in PatternFlowPfcPausePauseClass0 + HasChoice() bool + // Value returns uint32, set in PatternFlowPfcPausePauseClass0. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowPfcPausePauseClass0 + SetValue(value uint32) PatternFlowPfcPausePauseClass0 + // HasValue checks if Value has been set in PatternFlowPfcPausePauseClass0 + HasValue() bool + // Values returns []uint32, set in PatternFlowPfcPausePauseClass0. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowPfcPausePauseClass0 + SetValues(value []uint32) PatternFlowPfcPausePauseClass0 + // Increment returns PatternFlowPfcPausePauseClass0Counter, set in PatternFlowPfcPausePauseClass0. + // PatternFlowPfcPausePauseClass0Counter is integer counter pattern + Increment() PatternFlowPfcPausePauseClass0Counter + // SetIncrement assigns PatternFlowPfcPausePauseClass0Counter provided by user to PatternFlowPfcPausePauseClass0. + // PatternFlowPfcPausePauseClass0Counter is integer counter pattern + SetIncrement(value PatternFlowPfcPausePauseClass0Counter) PatternFlowPfcPausePauseClass0 + // HasIncrement checks if Increment has been set in PatternFlowPfcPausePauseClass0 + HasIncrement() bool + // Decrement returns PatternFlowPfcPausePauseClass0Counter, set in PatternFlowPfcPausePauseClass0. + // PatternFlowPfcPausePauseClass0Counter is integer counter pattern + Decrement() PatternFlowPfcPausePauseClass0Counter + // SetDecrement assigns PatternFlowPfcPausePauseClass0Counter provided by user to PatternFlowPfcPausePauseClass0. + // PatternFlowPfcPausePauseClass0Counter is integer counter pattern + SetDecrement(value PatternFlowPfcPausePauseClass0Counter) PatternFlowPfcPausePauseClass0 + // HasDecrement checks if Decrement has been set in PatternFlowPfcPausePauseClass0 + HasDecrement() bool + // MetricTags returns PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIterIter, set in PatternFlowPfcPausePauseClass0 + MetricTags() PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter + setNil() +} + +type PatternFlowPfcPausePauseClass0ChoiceEnum string + +// Enum of Choice on PatternFlowPfcPausePauseClass0 +var PatternFlowPfcPausePauseClass0Choice = struct { + VALUE PatternFlowPfcPausePauseClass0ChoiceEnum + VALUES PatternFlowPfcPausePauseClass0ChoiceEnum + INCREMENT PatternFlowPfcPausePauseClass0ChoiceEnum + DECREMENT PatternFlowPfcPausePauseClass0ChoiceEnum +}{ + VALUE: PatternFlowPfcPausePauseClass0ChoiceEnum("value"), + VALUES: PatternFlowPfcPausePauseClass0ChoiceEnum("values"), + INCREMENT: PatternFlowPfcPausePauseClass0ChoiceEnum("increment"), + DECREMENT: PatternFlowPfcPausePauseClass0ChoiceEnum("decrement"), +} + +func (obj *patternFlowPfcPausePauseClass0) Choice() PatternFlowPfcPausePauseClass0ChoiceEnum { + return PatternFlowPfcPausePauseClass0ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPfcPausePauseClass0) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPfcPausePauseClass0) setChoice(value PatternFlowPfcPausePauseClass0ChoiceEnum) PatternFlowPfcPausePauseClass0 { + intValue, ok := otg.PatternFlowPfcPausePauseClass0_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPfcPausePauseClass0ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPfcPausePauseClass0_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPfcPausePauseClass0Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPfcPausePauseClass0Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPfcPausePauseClass0Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowPfcPausePauseClass0Counter().msg() + } + + if value == PatternFlowPfcPausePauseClass0Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPfcPausePauseClass0Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass0) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPfcPausePauseClass0Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass0) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowPfcPausePauseClass0 object +func (obj *patternFlowPfcPausePauseClass0) SetValue(value uint32) PatternFlowPfcPausePauseClass0 { + obj.setChoice(PatternFlowPfcPausePauseClass0Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowPfcPausePauseClass0) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowPfcPausePauseClass0 object +func (obj *patternFlowPfcPausePauseClass0) SetValues(value []uint32) PatternFlowPfcPausePauseClass0 { + obj.setChoice(PatternFlowPfcPausePauseClass0Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass0Counter +func (obj *patternFlowPfcPausePauseClass0) Increment() PatternFlowPfcPausePauseClass0Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPfcPausePauseClass0Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPfcPausePauseClass0Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass0Counter +func (obj *patternFlowPfcPausePauseClass0) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPfcPausePauseClass0Counter value in the PatternFlowPfcPausePauseClass0 object +func (obj *patternFlowPfcPausePauseClass0) SetIncrement(value PatternFlowPfcPausePauseClass0Counter) PatternFlowPfcPausePauseClass0 { + obj.setChoice(PatternFlowPfcPausePauseClass0Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass0Counter +func (obj *patternFlowPfcPausePauseClass0) Decrement() PatternFlowPfcPausePauseClass0Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPfcPausePauseClass0Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPfcPausePauseClass0Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass0Counter +func (obj *patternFlowPfcPausePauseClass0) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPfcPausePauseClass0Counter value in the PatternFlowPfcPausePauseClass0 object +func (obj *patternFlowPfcPausePauseClass0) SetDecrement(value PatternFlowPfcPausePauseClass0Counter) PatternFlowPfcPausePauseClass0 { + obj.setChoice(PatternFlowPfcPausePauseClass0Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPfcPausePauseClass0MetricTag +func (obj *patternFlowPfcPausePauseClass0) MetricTags() PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPfcPausePauseClass0MetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter struct { + obj *patternFlowPfcPausePauseClass0 + patternFlowPfcPausePauseClass0MetricTagSlice []PatternFlowPfcPausePauseClass0MetricTag + fieldPtr *[]*otg.PatternFlowPfcPausePauseClass0MetricTag +} + +func newPatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter(ptr *[]*otg.PatternFlowPfcPausePauseClass0MetricTag) PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter { + return &patternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter interface { + setMsg(*patternFlowPfcPausePauseClass0) PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter + Items() []PatternFlowPfcPausePauseClass0MetricTag + Add() PatternFlowPfcPausePauseClass0MetricTag + Append(items ...PatternFlowPfcPausePauseClass0MetricTag) PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter + Set(index int, newObj PatternFlowPfcPausePauseClass0MetricTag) PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter + Clear() PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter + clearHolderSlice() PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter + appendHolderSlice(item PatternFlowPfcPausePauseClass0MetricTag) PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter +} + +func (obj *patternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter) setMsg(msg *patternFlowPfcPausePauseClass0) PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPfcPausePauseClass0MetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter) Items() []PatternFlowPfcPausePauseClass0MetricTag { + return obj.patternFlowPfcPausePauseClass0MetricTagSlice +} + +func (obj *patternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter) Add() PatternFlowPfcPausePauseClass0MetricTag { + newObj := &otg.PatternFlowPfcPausePauseClass0MetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPfcPausePauseClass0MetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPfcPausePauseClass0MetricTagSlice = append(obj.patternFlowPfcPausePauseClass0MetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter) Append(items ...PatternFlowPfcPausePauseClass0MetricTag) PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPfcPausePauseClass0MetricTagSlice = append(obj.patternFlowPfcPausePauseClass0MetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter) Set(index int, newObj PatternFlowPfcPausePauseClass0MetricTag) PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPfcPausePauseClass0MetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter) Clear() PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPfcPausePauseClass0MetricTag{} + obj.patternFlowPfcPausePauseClass0MetricTagSlice = []PatternFlowPfcPausePauseClass0MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter) clearHolderSlice() PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter { + if len(obj.patternFlowPfcPausePauseClass0MetricTagSlice) > 0 { + obj.patternFlowPfcPausePauseClass0MetricTagSlice = []PatternFlowPfcPausePauseClass0MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter) appendHolderSlice(item PatternFlowPfcPausePauseClass0MetricTag) PatternFlowPfcPausePauseClass0PatternFlowPfcPausePauseClass0MetricTagIter { + obj.patternFlowPfcPausePauseClass0MetricTagSlice = append(obj.patternFlowPfcPausePauseClass0MetricTagSlice, item) + return obj +} + +func (obj *patternFlowPfcPausePauseClass0) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass0.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowPfcPausePauseClass0.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPfcPausePauseClass0MetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass0) setDefault() { + var choices_set int = 0 + var choice PatternFlowPfcPausePauseClass0ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass0Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass0Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass0Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass0Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPfcPausePauseClass0Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPfcPausePauseClass0") + } + } else { + intVal := otg.PatternFlowPfcPausePauseClass0_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPfcPausePauseClass0_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class0_counter.go b/gosnappi/pattern_flow_pfc_pause_pause_class0_counter.go new file mode 100644 index 00000000..8891cd7f --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class0_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass0Counter ***** +type patternFlowPfcPausePauseClass0Counter struct { + validation + obj *otg.PatternFlowPfcPausePauseClass0Counter + marshaller marshalPatternFlowPfcPausePauseClass0Counter + unMarshaller unMarshalPatternFlowPfcPausePauseClass0Counter +} + +func NewPatternFlowPfcPausePauseClass0Counter() PatternFlowPfcPausePauseClass0Counter { + obj := patternFlowPfcPausePauseClass0Counter{obj: &otg.PatternFlowPfcPausePauseClass0Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass0Counter) msg() *otg.PatternFlowPfcPausePauseClass0Counter { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass0Counter) setMsg(msg *otg.PatternFlowPfcPausePauseClass0Counter) PatternFlowPfcPausePauseClass0Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass0Counter struct { + obj *patternFlowPfcPausePauseClass0Counter +} + +type marshalPatternFlowPfcPausePauseClass0Counter interface { + // ToProto marshals PatternFlowPfcPausePauseClass0Counter to protobuf object *otg.PatternFlowPfcPausePauseClass0Counter + ToProto() (*otg.PatternFlowPfcPausePauseClass0Counter, error) + // ToPbText marshals PatternFlowPfcPausePauseClass0Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass0Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass0Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass0Counter struct { + obj *patternFlowPfcPausePauseClass0Counter +} + +type unMarshalPatternFlowPfcPausePauseClass0Counter interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass0Counter from protobuf object *otg.PatternFlowPfcPausePauseClass0Counter + FromProto(msg *otg.PatternFlowPfcPausePauseClass0Counter) (PatternFlowPfcPausePauseClass0Counter, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass0Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass0Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass0Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass0Counter) Marshal() marshalPatternFlowPfcPausePauseClass0Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass0Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass0Counter) Unmarshal() unMarshalPatternFlowPfcPausePauseClass0Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass0Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass0Counter) ToProto() (*otg.PatternFlowPfcPausePauseClass0Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass0Counter) FromProto(msg *otg.PatternFlowPfcPausePauseClass0Counter) (PatternFlowPfcPausePauseClass0Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass0Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass0Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass0Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass0Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass0Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass0Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass0Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass0Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass0Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass0Counter) Clone() (PatternFlowPfcPausePauseClass0Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass0Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass0Counter is integer counter pattern +type PatternFlowPfcPausePauseClass0Counter interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass0Counter to protobuf object *otg.PatternFlowPfcPausePauseClass0Counter + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass0Counter + // setMsg unmarshals PatternFlowPfcPausePauseClass0Counter from protobuf object *otg.PatternFlowPfcPausePauseClass0Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass0Counter) PatternFlowPfcPausePauseClass0Counter + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass0Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass0Counter + // validate validates PatternFlowPfcPausePauseClass0Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass0Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowPfcPausePauseClass0Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowPfcPausePauseClass0Counter + SetStart(value uint32) PatternFlowPfcPausePauseClass0Counter + // HasStart checks if Start has been set in PatternFlowPfcPausePauseClass0Counter + HasStart() bool + // Step returns uint32, set in PatternFlowPfcPausePauseClass0Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowPfcPausePauseClass0Counter + SetStep(value uint32) PatternFlowPfcPausePauseClass0Counter + // HasStep checks if Step has been set in PatternFlowPfcPausePauseClass0Counter + HasStep() bool + // Count returns uint32, set in PatternFlowPfcPausePauseClass0Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPfcPausePauseClass0Counter + SetCount(value uint32) PatternFlowPfcPausePauseClass0Counter + // HasCount checks if Count has been set in PatternFlowPfcPausePauseClass0Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass0Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass0Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowPfcPausePauseClass0Counter object +func (obj *patternFlowPfcPausePauseClass0Counter) SetStart(value uint32) PatternFlowPfcPausePauseClass0Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass0Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass0Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowPfcPausePauseClass0Counter object +func (obj *patternFlowPfcPausePauseClass0Counter) SetStep(value uint32) PatternFlowPfcPausePauseClass0Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass0Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass0Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPfcPausePauseClass0Counter object +func (obj *patternFlowPfcPausePauseClass0Counter) SetCount(value uint32) PatternFlowPfcPausePauseClass0Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass0Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass0Counter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass0Counter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass0Counter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass0Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class0_metric_tag.go b/gosnappi/pattern_flow_pfc_pause_pause_class0_metric_tag.go new file mode 100644 index 00000000..9be0240e --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class0_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass0MetricTag ***** +type patternFlowPfcPausePauseClass0MetricTag struct { + validation + obj *otg.PatternFlowPfcPausePauseClass0MetricTag + marshaller marshalPatternFlowPfcPausePauseClass0MetricTag + unMarshaller unMarshalPatternFlowPfcPausePauseClass0MetricTag +} + +func NewPatternFlowPfcPausePauseClass0MetricTag() PatternFlowPfcPausePauseClass0MetricTag { + obj := patternFlowPfcPausePauseClass0MetricTag{obj: &otg.PatternFlowPfcPausePauseClass0MetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass0MetricTag) msg() *otg.PatternFlowPfcPausePauseClass0MetricTag { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass0MetricTag) setMsg(msg *otg.PatternFlowPfcPausePauseClass0MetricTag) PatternFlowPfcPausePauseClass0MetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass0MetricTag struct { + obj *patternFlowPfcPausePauseClass0MetricTag +} + +type marshalPatternFlowPfcPausePauseClass0MetricTag interface { + // ToProto marshals PatternFlowPfcPausePauseClass0MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass0MetricTag + ToProto() (*otg.PatternFlowPfcPausePauseClass0MetricTag, error) + // ToPbText marshals PatternFlowPfcPausePauseClass0MetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass0MetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass0MetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass0MetricTag struct { + obj *patternFlowPfcPausePauseClass0MetricTag +} + +type unMarshalPatternFlowPfcPausePauseClass0MetricTag interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass0MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass0MetricTag + FromProto(msg *otg.PatternFlowPfcPausePauseClass0MetricTag) (PatternFlowPfcPausePauseClass0MetricTag, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass0MetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass0MetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass0MetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass0MetricTag) Marshal() marshalPatternFlowPfcPausePauseClass0MetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass0MetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass0MetricTag) Unmarshal() unMarshalPatternFlowPfcPausePauseClass0MetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass0MetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass0MetricTag) ToProto() (*otg.PatternFlowPfcPausePauseClass0MetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass0MetricTag) FromProto(msg *otg.PatternFlowPfcPausePauseClass0MetricTag) (PatternFlowPfcPausePauseClass0MetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass0MetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass0MetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass0MetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass0MetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass0MetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass0MetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass0MetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass0MetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass0MetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass0MetricTag) Clone() (PatternFlowPfcPausePauseClass0MetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass0MetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass0MetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPfcPausePauseClass0MetricTag interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass0MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass0MetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass0MetricTag + // setMsg unmarshals PatternFlowPfcPausePauseClass0MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass0MetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass0MetricTag) PatternFlowPfcPausePauseClass0MetricTag + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass0MetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass0MetricTag + // validate validates PatternFlowPfcPausePauseClass0MetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass0MetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPfcPausePauseClass0MetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPfcPausePauseClass0MetricTag + SetName(value string) PatternFlowPfcPausePauseClass0MetricTag + // Offset returns uint32, set in PatternFlowPfcPausePauseClass0MetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPfcPausePauseClass0MetricTag + SetOffset(value uint32) PatternFlowPfcPausePauseClass0MetricTag + // HasOffset checks if Offset has been set in PatternFlowPfcPausePauseClass0MetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPfcPausePauseClass0MetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPfcPausePauseClass0MetricTag + SetLength(value uint32) PatternFlowPfcPausePauseClass0MetricTag + // HasLength checks if Length has been set in PatternFlowPfcPausePauseClass0MetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPfcPausePauseClass0MetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPfcPausePauseClass0MetricTag object +func (obj *patternFlowPfcPausePauseClass0MetricTag) SetName(value string) PatternFlowPfcPausePauseClass0MetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass0MetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass0MetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPfcPausePauseClass0MetricTag object +func (obj *patternFlowPfcPausePauseClass0MetricTag) SetOffset(value uint32) PatternFlowPfcPausePauseClass0MetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass0MetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass0MetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPfcPausePauseClass0MetricTag object +func (obj *patternFlowPfcPausePauseClass0MetricTag) SetLength(value uint32) PatternFlowPfcPausePauseClass0MetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass0MetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPfcPausePauseClass0MetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass0MetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPfcPausePauseClass0MetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass0MetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class1.go b/gosnappi/pattern_flow_pfc_pause_pause_class1.go new file mode 100644 index 00000000..7b7b35df --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class1.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass1 ***** +type patternFlowPfcPausePauseClass1 struct { + validation + obj *otg.PatternFlowPfcPausePauseClass1 + marshaller marshalPatternFlowPfcPausePauseClass1 + unMarshaller unMarshalPatternFlowPfcPausePauseClass1 + incrementHolder PatternFlowPfcPausePauseClass1Counter + decrementHolder PatternFlowPfcPausePauseClass1Counter + metricTagsHolder PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter +} + +func NewPatternFlowPfcPausePauseClass1() PatternFlowPfcPausePauseClass1 { + obj := patternFlowPfcPausePauseClass1{obj: &otg.PatternFlowPfcPausePauseClass1{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass1) msg() *otg.PatternFlowPfcPausePauseClass1 { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass1) setMsg(msg *otg.PatternFlowPfcPausePauseClass1) PatternFlowPfcPausePauseClass1 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass1 struct { + obj *patternFlowPfcPausePauseClass1 +} + +type marshalPatternFlowPfcPausePauseClass1 interface { + // ToProto marshals PatternFlowPfcPausePauseClass1 to protobuf object *otg.PatternFlowPfcPausePauseClass1 + ToProto() (*otg.PatternFlowPfcPausePauseClass1, error) + // ToPbText marshals PatternFlowPfcPausePauseClass1 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass1 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass1 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass1 struct { + obj *patternFlowPfcPausePauseClass1 +} + +type unMarshalPatternFlowPfcPausePauseClass1 interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass1 from protobuf object *otg.PatternFlowPfcPausePauseClass1 + FromProto(msg *otg.PatternFlowPfcPausePauseClass1) (PatternFlowPfcPausePauseClass1, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass1 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass1 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass1 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass1) Marshal() marshalPatternFlowPfcPausePauseClass1 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass1{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass1) Unmarshal() unMarshalPatternFlowPfcPausePauseClass1 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass1{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass1) ToProto() (*otg.PatternFlowPfcPausePauseClass1, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass1) FromProto(msg *otg.PatternFlowPfcPausePauseClass1) (PatternFlowPfcPausePauseClass1, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass1) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass1) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass1) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass1) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass1) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass1) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass1) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass1) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass1) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass1) Clone() (PatternFlowPfcPausePauseClass1, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass1() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPfcPausePauseClass1) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPfcPausePauseClass1 is pause class 1 +type PatternFlowPfcPausePauseClass1 interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass1 to protobuf object *otg.PatternFlowPfcPausePauseClass1 + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass1 + // setMsg unmarshals PatternFlowPfcPausePauseClass1 from protobuf object *otg.PatternFlowPfcPausePauseClass1 + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass1) PatternFlowPfcPausePauseClass1 + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass1 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass1 + // validate validates PatternFlowPfcPausePauseClass1 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass1, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPfcPausePauseClass1ChoiceEnum, set in PatternFlowPfcPausePauseClass1 + Choice() PatternFlowPfcPausePauseClass1ChoiceEnum + // setChoice assigns PatternFlowPfcPausePauseClass1ChoiceEnum provided by user to PatternFlowPfcPausePauseClass1 + setChoice(value PatternFlowPfcPausePauseClass1ChoiceEnum) PatternFlowPfcPausePauseClass1 + // HasChoice checks if Choice has been set in PatternFlowPfcPausePauseClass1 + HasChoice() bool + // Value returns uint32, set in PatternFlowPfcPausePauseClass1. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowPfcPausePauseClass1 + SetValue(value uint32) PatternFlowPfcPausePauseClass1 + // HasValue checks if Value has been set in PatternFlowPfcPausePauseClass1 + HasValue() bool + // Values returns []uint32, set in PatternFlowPfcPausePauseClass1. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowPfcPausePauseClass1 + SetValues(value []uint32) PatternFlowPfcPausePauseClass1 + // Increment returns PatternFlowPfcPausePauseClass1Counter, set in PatternFlowPfcPausePauseClass1. + // PatternFlowPfcPausePauseClass1Counter is integer counter pattern + Increment() PatternFlowPfcPausePauseClass1Counter + // SetIncrement assigns PatternFlowPfcPausePauseClass1Counter provided by user to PatternFlowPfcPausePauseClass1. + // PatternFlowPfcPausePauseClass1Counter is integer counter pattern + SetIncrement(value PatternFlowPfcPausePauseClass1Counter) PatternFlowPfcPausePauseClass1 + // HasIncrement checks if Increment has been set in PatternFlowPfcPausePauseClass1 + HasIncrement() bool + // Decrement returns PatternFlowPfcPausePauseClass1Counter, set in PatternFlowPfcPausePauseClass1. + // PatternFlowPfcPausePauseClass1Counter is integer counter pattern + Decrement() PatternFlowPfcPausePauseClass1Counter + // SetDecrement assigns PatternFlowPfcPausePauseClass1Counter provided by user to PatternFlowPfcPausePauseClass1. + // PatternFlowPfcPausePauseClass1Counter is integer counter pattern + SetDecrement(value PatternFlowPfcPausePauseClass1Counter) PatternFlowPfcPausePauseClass1 + // HasDecrement checks if Decrement has been set in PatternFlowPfcPausePauseClass1 + HasDecrement() bool + // MetricTags returns PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIterIter, set in PatternFlowPfcPausePauseClass1 + MetricTags() PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter + setNil() +} + +type PatternFlowPfcPausePauseClass1ChoiceEnum string + +// Enum of Choice on PatternFlowPfcPausePauseClass1 +var PatternFlowPfcPausePauseClass1Choice = struct { + VALUE PatternFlowPfcPausePauseClass1ChoiceEnum + VALUES PatternFlowPfcPausePauseClass1ChoiceEnum + INCREMENT PatternFlowPfcPausePauseClass1ChoiceEnum + DECREMENT PatternFlowPfcPausePauseClass1ChoiceEnum +}{ + VALUE: PatternFlowPfcPausePauseClass1ChoiceEnum("value"), + VALUES: PatternFlowPfcPausePauseClass1ChoiceEnum("values"), + INCREMENT: PatternFlowPfcPausePauseClass1ChoiceEnum("increment"), + DECREMENT: PatternFlowPfcPausePauseClass1ChoiceEnum("decrement"), +} + +func (obj *patternFlowPfcPausePauseClass1) Choice() PatternFlowPfcPausePauseClass1ChoiceEnum { + return PatternFlowPfcPausePauseClass1ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPfcPausePauseClass1) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPfcPausePauseClass1) setChoice(value PatternFlowPfcPausePauseClass1ChoiceEnum) PatternFlowPfcPausePauseClass1 { + intValue, ok := otg.PatternFlowPfcPausePauseClass1_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPfcPausePauseClass1ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPfcPausePauseClass1_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPfcPausePauseClass1Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPfcPausePauseClass1Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPfcPausePauseClass1Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowPfcPausePauseClass1Counter().msg() + } + + if value == PatternFlowPfcPausePauseClass1Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPfcPausePauseClass1Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass1) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPfcPausePauseClass1Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass1) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowPfcPausePauseClass1 object +func (obj *patternFlowPfcPausePauseClass1) SetValue(value uint32) PatternFlowPfcPausePauseClass1 { + obj.setChoice(PatternFlowPfcPausePauseClass1Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowPfcPausePauseClass1) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowPfcPausePauseClass1 object +func (obj *patternFlowPfcPausePauseClass1) SetValues(value []uint32) PatternFlowPfcPausePauseClass1 { + obj.setChoice(PatternFlowPfcPausePauseClass1Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass1Counter +func (obj *patternFlowPfcPausePauseClass1) Increment() PatternFlowPfcPausePauseClass1Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPfcPausePauseClass1Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPfcPausePauseClass1Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass1Counter +func (obj *patternFlowPfcPausePauseClass1) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPfcPausePauseClass1Counter value in the PatternFlowPfcPausePauseClass1 object +func (obj *patternFlowPfcPausePauseClass1) SetIncrement(value PatternFlowPfcPausePauseClass1Counter) PatternFlowPfcPausePauseClass1 { + obj.setChoice(PatternFlowPfcPausePauseClass1Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass1Counter +func (obj *patternFlowPfcPausePauseClass1) Decrement() PatternFlowPfcPausePauseClass1Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPfcPausePauseClass1Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPfcPausePauseClass1Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass1Counter +func (obj *patternFlowPfcPausePauseClass1) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPfcPausePauseClass1Counter value in the PatternFlowPfcPausePauseClass1 object +func (obj *patternFlowPfcPausePauseClass1) SetDecrement(value PatternFlowPfcPausePauseClass1Counter) PatternFlowPfcPausePauseClass1 { + obj.setChoice(PatternFlowPfcPausePauseClass1Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPfcPausePauseClass1MetricTag +func (obj *patternFlowPfcPausePauseClass1) MetricTags() PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPfcPausePauseClass1MetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter struct { + obj *patternFlowPfcPausePauseClass1 + patternFlowPfcPausePauseClass1MetricTagSlice []PatternFlowPfcPausePauseClass1MetricTag + fieldPtr *[]*otg.PatternFlowPfcPausePauseClass1MetricTag +} + +func newPatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter(ptr *[]*otg.PatternFlowPfcPausePauseClass1MetricTag) PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter { + return &patternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter interface { + setMsg(*patternFlowPfcPausePauseClass1) PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter + Items() []PatternFlowPfcPausePauseClass1MetricTag + Add() PatternFlowPfcPausePauseClass1MetricTag + Append(items ...PatternFlowPfcPausePauseClass1MetricTag) PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter + Set(index int, newObj PatternFlowPfcPausePauseClass1MetricTag) PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter + Clear() PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter + clearHolderSlice() PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter + appendHolderSlice(item PatternFlowPfcPausePauseClass1MetricTag) PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter +} + +func (obj *patternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter) setMsg(msg *patternFlowPfcPausePauseClass1) PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPfcPausePauseClass1MetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter) Items() []PatternFlowPfcPausePauseClass1MetricTag { + return obj.patternFlowPfcPausePauseClass1MetricTagSlice +} + +func (obj *patternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter) Add() PatternFlowPfcPausePauseClass1MetricTag { + newObj := &otg.PatternFlowPfcPausePauseClass1MetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPfcPausePauseClass1MetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPfcPausePauseClass1MetricTagSlice = append(obj.patternFlowPfcPausePauseClass1MetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter) Append(items ...PatternFlowPfcPausePauseClass1MetricTag) PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPfcPausePauseClass1MetricTagSlice = append(obj.patternFlowPfcPausePauseClass1MetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter) Set(index int, newObj PatternFlowPfcPausePauseClass1MetricTag) PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPfcPausePauseClass1MetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter) Clear() PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPfcPausePauseClass1MetricTag{} + obj.patternFlowPfcPausePauseClass1MetricTagSlice = []PatternFlowPfcPausePauseClass1MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter) clearHolderSlice() PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter { + if len(obj.patternFlowPfcPausePauseClass1MetricTagSlice) > 0 { + obj.patternFlowPfcPausePauseClass1MetricTagSlice = []PatternFlowPfcPausePauseClass1MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter) appendHolderSlice(item PatternFlowPfcPausePauseClass1MetricTag) PatternFlowPfcPausePauseClass1PatternFlowPfcPausePauseClass1MetricTagIter { + obj.patternFlowPfcPausePauseClass1MetricTagSlice = append(obj.patternFlowPfcPausePauseClass1MetricTagSlice, item) + return obj +} + +func (obj *patternFlowPfcPausePauseClass1) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass1.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowPfcPausePauseClass1.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPfcPausePauseClass1MetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass1) setDefault() { + var choices_set int = 0 + var choice PatternFlowPfcPausePauseClass1ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass1Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass1Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass1Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass1Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPfcPausePauseClass1Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPfcPausePauseClass1") + } + } else { + intVal := otg.PatternFlowPfcPausePauseClass1_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPfcPausePauseClass1_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class1_counter.go b/gosnappi/pattern_flow_pfc_pause_pause_class1_counter.go new file mode 100644 index 00000000..a5d154d3 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class1_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass1Counter ***** +type patternFlowPfcPausePauseClass1Counter struct { + validation + obj *otg.PatternFlowPfcPausePauseClass1Counter + marshaller marshalPatternFlowPfcPausePauseClass1Counter + unMarshaller unMarshalPatternFlowPfcPausePauseClass1Counter +} + +func NewPatternFlowPfcPausePauseClass1Counter() PatternFlowPfcPausePauseClass1Counter { + obj := patternFlowPfcPausePauseClass1Counter{obj: &otg.PatternFlowPfcPausePauseClass1Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass1Counter) msg() *otg.PatternFlowPfcPausePauseClass1Counter { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass1Counter) setMsg(msg *otg.PatternFlowPfcPausePauseClass1Counter) PatternFlowPfcPausePauseClass1Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass1Counter struct { + obj *patternFlowPfcPausePauseClass1Counter +} + +type marshalPatternFlowPfcPausePauseClass1Counter interface { + // ToProto marshals PatternFlowPfcPausePauseClass1Counter to protobuf object *otg.PatternFlowPfcPausePauseClass1Counter + ToProto() (*otg.PatternFlowPfcPausePauseClass1Counter, error) + // ToPbText marshals PatternFlowPfcPausePauseClass1Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass1Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass1Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass1Counter struct { + obj *patternFlowPfcPausePauseClass1Counter +} + +type unMarshalPatternFlowPfcPausePauseClass1Counter interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass1Counter from protobuf object *otg.PatternFlowPfcPausePauseClass1Counter + FromProto(msg *otg.PatternFlowPfcPausePauseClass1Counter) (PatternFlowPfcPausePauseClass1Counter, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass1Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass1Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass1Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass1Counter) Marshal() marshalPatternFlowPfcPausePauseClass1Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass1Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass1Counter) Unmarshal() unMarshalPatternFlowPfcPausePauseClass1Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass1Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass1Counter) ToProto() (*otg.PatternFlowPfcPausePauseClass1Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass1Counter) FromProto(msg *otg.PatternFlowPfcPausePauseClass1Counter) (PatternFlowPfcPausePauseClass1Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass1Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass1Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass1Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass1Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass1Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass1Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass1Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass1Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass1Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass1Counter) Clone() (PatternFlowPfcPausePauseClass1Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass1Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass1Counter is integer counter pattern +type PatternFlowPfcPausePauseClass1Counter interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass1Counter to protobuf object *otg.PatternFlowPfcPausePauseClass1Counter + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass1Counter + // setMsg unmarshals PatternFlowPfcPausePauseClass1Counter from protobuf object *otg.PatternFlowPfcPausePauseClass1Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass1Counter) PatternFlowPfcPausePauseClass1Counter + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass1Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass1Counter + // validate validates PatternFlowPfcPausePauseClass1Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass1Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowPfcPausePauseClass1Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowPfcPausePauseClass1Counter + SetStart(value uint32) PatternFlowPfcPausePauseClass1Counter + // HasStart checks if Start has been set in PatternFlowPfcPausePauseClass1Counter + HasStart() bool + // Step returns uint32, set in PatternFlowPfcPausePauseClass1Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowPfcPausePauseClass1Counter + SetStep(value uint32) PatternFlowPfcPausePauseClass1Counter + // HasStep checks if Step has been set in PatternFlowPfcPausePauseClass1Counter + HasStep() bool + // Count returns uint32, set in PatternFlowPfcPausePauseClass1Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPfcPausePauseClass1Counter + SetCount(value uint32) PatternFlowPfcPausePauseClass1Counter + // HasCount checks if Count has been set in PatternFlowPfcPausePauseClass1Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass1Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass1Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowPfcPausePauseClass1Counter object +func (obj *patternFlowPfcPausePauseClass1Counter) SetStart(value uint32) PatternFlowPfcPausePauseClass1Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass1Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass1Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowPfcPausePauseClass1Counter object +func (obj *patternFlowPfcPausePauseClass1Counter) SetStep(value uint32) PatternFlowPfcPausePauseClass1Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass1Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass1Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPfcPausePauseClass1Counter object +func (obj *patternFlowPfcPausePauseClass1Counter) SetCount(value uint32) PatternFlowPfcPausePauseClass1Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass1Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass1Counter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass1Counter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass1Counter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass1Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class1_metric_tag.go b/gosnappi/pattern_flow_pfc_pause_pause_class1_metric_tag.go new file mode 100644 index 00000000..dd878414 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class1_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass1MetricTag ***** +type patternFlowPfcPausePauseClass1MetricTag struct { + validation + obj *otg.PatternFlowPfcPausePauseClass1MetricTag + marshaller marshalPatternFlowPfcPausePauseClass1MetricTag + unMarshaller unMarshalPatternFlowPfcPausePauseClass1MetricTag +} + +func NewPatternFlowPfcPausePauseClass1MetricTag() PatternFlowPfcPausePauseClass1MetricTag { + obj := patternFlowPfcPausePauseClass1MetricTag{obj: &otg.PatternFlowPfcPausePauseClass1MetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass1MetricTag) msg() *otg.PatternFlowPfcPausePauseClass1MetricTag { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass1MetricTag) setMsg(msg *otg.PatternFlowPfcPausePauseClass1MetricTag) PatternFlowPfcPausePauseClass1MetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass1MetricTag struct { + obj *patternFlowPfcPausePauseClass1MetricTag +} + +type marshalPatternFlowPfcPausePauseClass1MetricTag interface { + // ToProto marshals PatternFlowPfcPausePauseClass1MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass1MetricTag + ToProto() (*otg.PatternFlowPfcPausePauseClass1MetricTag, error) + // ToPbText marshals PatternFlowPfcPausePauseClass1MetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass1MetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass1MetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass1MetricTag struct { + obj *patternFlowPfcPausePauseClass1MetricTag +} + +type unMarshalPatternFlowPfcPausePauseClass1MetricTag interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass1MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass1MetricTag + FromProto(msg *otg.PatternFlowPfcPausePauseClass1MetricTag) (PatternFlowPfcPausePauseClass1MetricTag, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass1MetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass1MetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass1MetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass1MetricTag) Marshal() marshalPatternFlowPfcPausePauseClass1MetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass1MetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass1MetricTag) Unmarshal() unMarshalPatternFlowPfcPausePauseClass1MetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass1MetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass1MetricTag) ToProto() (*otg.PatternFlowPfcPausePauseClass1MetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass1MetricTag) FromProto(msg *otg.PatternFlowPfcPausePauseClass1MetricTag) (PatternFlowPfcPausePauseClass1MetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass1MetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass1MetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass1MetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass1MetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass1MetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass1MetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass1MetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass1MetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass1MetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass1MetricTag) Clone() (PatternFlowPfcPausePauseClass1MetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass1MetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass1MetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPfcPausePauseClass1MetricTag interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass1MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass1MetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass1MetricTag + // setMsg unmarshals PatternFlowPfcPausePauseClass1MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass1MetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass1MetricTag) PatternFlowPfcPausePauseClass1MetricTag + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass1MetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass1MetricTag + // validate validates PatternFlowPfcPausePauseClass1MetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass1MetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPfcPausePauseClass1MetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPfcPausePauseClass1MetricTag + SetName(value string) PatternFlowPfcPausePauseClass1MetricTag + // Offset returns uint32, set in PatternFlowPfcPausePauseClass1MetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPfcPausePauseClass1MetricTag + SetOffset(value uint32) PatternFlowPfcPausePauseClass1MetricTag + // HasOffset checks if Offset has been set in PatternFlowPfcPausePauseClass1MetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPfcPausePauseClass1MetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPfcPausePauseClass1MetricTag + SetLength(value uint32) PatternFlowPfcPausePauseClass1MetricTag + // HasLength checks if Length has been set in PatternFlowPfcPausePauseClass1MetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPfcPausePauseClass1MetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPfcPausePauseClass1MetricTag object +func (obj *patternFlowPfcPausePauseClass1MetricTag) SetName(value string) PatternFlowPfcPausePauseClass1MetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass1MetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass1MetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPfcPausePauseClass1MetricTag object +func (obj *patternFlowPfcPausePauseClass1MetricTag) SetOffset(value uint32) PatternFlowPfcPausePauseClass1MetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass1MetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass1MetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPfcPausePauseClass1MetricTag object +func (obj *patternFlowPfcPausePauseClass1MetricTag) SetLength(value uint32) PatternFlowPfcPausePauseClass1MetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass1MetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPfcPausePauseClass1MetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass1MetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPfcPausePauseClass1MetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass1MetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class2.go b/gosnappi/pattern_flow_pfc_pause_pause_class2.go new file mode 100644 index 00000000..7847611b --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class2.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass2 ***** +type patternFlowPfcPausePauseClass2 struct { + validation + obj *otg.PatternFlowPfcPausePauseClass2 + marshaller marshalPatternFlowPfcPausePauseClass2 + unMarshaller unMarshalPatternFlowPfcPausePauseClass2 + incrementHolder PatternFlowPfcPausePauseClass2Counter + decrementHolder PatternFlowPfcPausePauseClass2Counter + metricTagsHolder PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter +} + +func NewPatternFlowPfcPausePauseClass2() PatternFlowPfcPausePauseClass2 { + obj := patternFlowPfcPausePauseClass2{obj: &otg.PatternFlowPfcPausePauseClass2{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass2) msg() *otg.PatternFlowPfcPausePauseClass2 { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass2) setMsg(msg *otg.PatternFlowPfcPausePauseClass2) PatternFlowPfcPausePauseClass2 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass2 struct { + obj *patternFlowPfcPausePauseClass2 +} + +type marshalPatternFlowPfcPausePauseClass2 interface { + // ToProto marshals PatternFlowPfcPausePauseClass2 to protobuf object *otg.PatternFlowPfcPausePauseClass2 + ToProto() (*otg.PatternFlowPfcPausePauseClass2, error) + // ToPbText marshals PatternFlowPfcPausePauseClass2 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass2 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass2 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass2 struct { + obj *patternFlowPfcPausePauseClass2 +} + +type unMarshalPatternFlowPfcPausePauseClass2 interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass2 from protobuf object *otg.PatternFlowPfcPausePauseClass2 + FromProto(msg *otg.PatternFlowPfcPausePauseClass2) (PatternFlowPfcPausePauseClass2, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass2 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass2 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass2 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass2) Marshal() marshalPatternFlowPfcPausePauseClass2 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass2{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass2) Unmarshal() unMarshalPatternFlowPfcPausePauseClass2 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass2{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass2) ToProto() (*otg.PatternFlowPfcPausePauseClass2, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass2) FromProto(msg *otg.PatternFlowPfcPausePauseClass2) (PatternFlowPfcPausePauseClass2, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass2) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass2) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass2) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass2) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass2) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass2) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass2) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass2) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass2) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass2) Clone() (PatternFlowPfcPausePauseClass2, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass2() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPfcPausePauseClass2) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPfcPausePauseClass2 is pause class 2 +type PatternFlowPfcPausePauseClass2 interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass2 to protobuf object *otg.PatternFlowPfcPausePauseClass2 + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass2 + // setMsg unmarshals PatternFlowPfcPausePauseClass2 from protobuf object *otg.PatternFlowPfcPausePauseClass2 + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass2) PatternFlowPfcPausePauseClass2 + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass2 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass2 + // validate validates PatternFlowPfcPausePauseClass2 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass2, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPfcPausePauseClass2ChoiceEnum, set in PatternFlowPfcPausePauseClass2 + Choice() PatternFlowPfcPausePauseClass2ChoiceEnum + // setChoice assigns PatternFlowPfcPausePauseClass2ChoiceEnum provided by user to PatternFlowPfcPausePauseClass2 + setChoice(value PatternFlowPfcPausePauseClass2ChoiceEnum) PatternFlowPfcPausePauseClass2 + // HasChoice checks if Choice has been set in PatternFlowPfcPausePauseClass2 + HasChoice() bool + // Value returns uint32, set in PatternFlowPfcPausePauseClass2. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowPfcPausePauseClass2 + SetValue(value uint32) PatternFlowPfcPausePauseClass2 + // HasValue checks if Value has been set in PatternFlowPfcPausePauseClass2 + HasValue() bool + // Values returns []uint32, set in PatternFlowPfcPausePauseClass2. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowPfcPausePauseClass2 + SetValues(value []uint32) PatternFlowPfcPausePauseClass2 + // Increment returns PatternFlowPfcPausePauseClass2Counter, set in PatternFlowPfcPausePauseClass2. + // PatternFlowPfcPausePauseClass2Counter is integer counter pattern + Increment() PatternFlowPfcPausePauseClass2Counter + // SetIncrement assigns PatternFlowPfcPausePauseClass2Counter provided by user to PatternFlowPfcPausePauseClass2. + // PatternFlowPfcPausePauseClass2Counter is integer counter pattern + SetIncrement(value PatternFlowPfcPausePauseClass2Counter) PatternFlowPfcPausePauseClass2 + // HasIncrement checks if Increment has been set in PatternFlowPfcPausePauseClass2 + HasIncrement() bool + // Decrement returns PatternFlowPfcPausePauseClass2Counter, set in PatternFlowPfcPausePauseClass2. + // PatternFlowPfcPausePauseClass2Counter is integer counter pattern + Decrement() PatternFlowPfcPausePauseClass2Counter + // SetDecrement assigns PatternFlowPfcPausePauseClass2Counter provided by user to PatternFlowPfcPausePauseClass2. + // PatternFlowPfcPausePauseClass2Counter is integer counter pattern + SetDecrement(value PatternFlowPfcPausePauseClass2Counter) PatternFlowPfcPausePauseClass2 + // HasDecrement checks if Decrement has been set in PatternFlowPfcPausePauseClass2 + HasDecrement() bool + // MetricTags returns PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIterIter, set in PatternFlowPfcPausePauseClass2 + MetricTags() PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter + setNil() +} + +type PatternFlowPfcPausePauseClass2ChoiceEnum string + +// Enum of Choice on PatternFlowPfcPausePauseClass2 +var PatternFlowPfcPausePauseClass2Choice = struct { + VALUE PatternFlowPfcPausePauseClass2ChoiceEnum + VALUES PatternFlowPfcPausePauseClass2ChoiceEnum + INCREMENT PatternFlowPfcPausePauseClass2ChoiceEnum + DECREMENT PatternFlowPfcPausePauseClass2ChoiceEnum +}{ + VALUE: PatternFlowPfcPausePauseClass2ChoiceEnum("value"), + VALUES: PatternFlowPfcPausePauseClass2ChoiceEnum("values"), + INCREMENT: PatternFlowPfcPausePauseClass2ChoiceEnum("increment"), + DECREMENT: PatternFlowPfcPausePauseClass2ChoiceEnum("decrement"), +} + +func (obj *patternFlowPfcPausePauseClass2) Choice() PatternFlowPfcPausePauseClass2ChoiceEnum { + return PatternFlowPfcPausePauseClass2ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPfcPausePauseClass2) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPfcPausePauseClass2) setChoice(value PatternFlowPfcPausePauseClass2ChoiceEnum) PatternFlowPfcPausePauseClass2 { + intValue, ok := otg.PatternFlowPfcPausePauseClass2_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPfcPausePauseClass2ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPfcPausePauseClass2_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPfcPausePauseClass2Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPfcPausePauseClass2Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPfcPausePauseClass2Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowPfcPausePauseClass2Counter().msg() + } + + if value == PatternFlowPfcPausePauseClass2Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPfcPausePauseClass2Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass2) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPfcPausePauseClass2Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass2) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowPfcPausePauseClass2 object +func (obj *patternFlowPfcPausePauseClass2) SetValue(value uint32) PatternFlowPfcPausePauseClass2 { + obj.setChoice(PatternFlowPfcPausePauseClass2Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowPfcPausePauseClass2) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowPfcPausePauseClass2 object +func (obj *patternFlowPfcPausePauseClass2) SetValues(value []uint32) PatternFlowPfcPausePauseClass2 { + obj.setChoice(PatternFlowPfcPausePauseClass2Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass2Counter +func (obj *patternFlowPfcPausePauseClass2) Increment() PatternFlowPfcPausePauseClass2Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPfcPausePauseClass2Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPfcPausePauseClass2Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass2Counter +func (obj *patternFlowPfcPausePauseClass2) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPfcPausePauseClass2Counter value in the PatternFlowPfcPausePauseClass2 object +func (obj *patternFlowPfcPausePauseClass2) SetIncrement(value PatternFlowPfcPausePauseClass2Counter) PatternFlowPfcPausePauseClass2 { + obj.setChoice(PatternFlowPfcPausePauseClass2Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass2Counter +func (obj *patternFlowPfcPausePauseClass2) Decrement() PatternFlowPfcPausePauseClass2Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPfcPausePauseClass2Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPfcPausePauseClass2Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass2Counter +func (obj *patternFlowPfcPausePauseClass2) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPfcPausePauseClass2Counter value in the PatternFlowPfcPausePauseClass2 object +func (obj *patternFlowPfcPausePauseClass2) SetDecrement(value PatternFlowPfcPausePauseClass2Counter) PatternFlowPfcPausePauseClass2 { + obj.setChoice(PatternFlowPfcPausePauseClass2Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPfcPausePauseClass2MetricTag +func (obj *patternFlowPfcPausePauseClass2) MetricTags() PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPfcPausePauseClass2MetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter struct { + obj *patternFlowPfcPausePauseClass2 + patternFlowPfcPausePauseClass2MetricTagSlice []PatternFlowPfcPausePauseClass2MetricTag + fieldPtr *[]*otg.PatternFlowPfcPausePauseClass2MetricTag +} + +func newPatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter(ptr *[]*otg.PatternFlowPfcPausePauseClass2MetricTag) PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter { + return &patternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter interface { + setMsg(*patternFlowPfcPausePauseClass2) PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter + Items() []PatternFlowPfcPausePauseClass2MetricTag + Add() PatternFlowPfcPausePauseClass2MetricTag + Append(items ...PatternFlowPfcPausePauseClass2MetricTag) PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter + Set(index int, newObj PatternFlowPfcPausePauseClass2MetricTag) PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter + Clear() PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter + clearHolderSlice() PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter + appendHolderSlice(item PatternFlowPfcPausePauseClass2MetricTag) PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter +} + +func (obj *patternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter) setMsg(msg *patternFlowPfcPausePauseClass2) PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPfcPausePauseClass2MetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter) Items() []PatternFlowPfcPausePauseClass2MetricTag { + return obj.patternFlowPfcPausePauseClass2MetricTagSlice +} + +func (obj *patternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter) Add() PatternFlowPfcPausePauseClass2MetricTag { + newObj := &otg.PatternFlowPfcPausePauseClass2MetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPfcPausePauseClass2MetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPfcPausePauseClass2MetricTagSlice = append(obj.patternFlowPfcPausePauseClass2MetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter) Append(items ...PatternFlowPfcPausePauseClass2MetricTag) PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPfcPausePauseClass2MetricTagSlice = append(obj.patternFlowPfcPausePauseClass2MetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter) Set(index int, newObj PatternFlowPfcPausePauseClass2MetricTag) PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPfcPausePauseClass2MetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter) Clear() PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPfcPausePauseClass2MetricTag{} + obj.patternFlowPfcPausePauseClass2MetricTagSlice = []PatternFlowPfcPausePauseClass2MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter) clearHolderSlice() PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter { + if len(obj.patternFlowPfcPausePauseClass2MetricTagSlice) > 0 { + obj.patternFlowPfcPausePauseClass2MetricTagSlice = []PatternFlowPfcPausePauseClass2MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter) appendHolderSlice(item PatternFlowPfcPausePauseClass2MetricTag) PatternFlowPfcPausePauseClass2PatternFlowPfcPausePauseClass2MetricTagIter { + obj.patternFlowPfcPausePauseClass2MetricTagSlice = append(obj.patternFlowPfcPausePauseClass2MetricTagSlice, item) + return obj +} + +func (obj *patternFlowPfcPausePauseClass2) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass2.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowPfcPausePauseClass2.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPfcPausePauseClass2MetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass2) setDefault() { + var choices_set int = 0 + var choice PatternFlowPfcPausePauseClass2ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass2Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass2Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass2Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass2Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPfcPausePauseClass2Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPfcPausePauseClass2") + } + } else { + intVal := otg.PatternFlowPfcPausePauseClass2_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPfcPausePauseClass2_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class2_counter.go b/gosnappi/pattern_flow_pfc_pause_pause_class2_counter.go new file mode 100644 index 00000000..df4012ba --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class2_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass2Counter ***** +type patternFlowPfcPausePauseClass2Counter struct { + validation + obj *otg.PatternFlowPfcPausePauseClass2Counter + marshaller marshalPatternFlowPfcPausePauseClass2Counter + unMarshaller unMarshalPatternFlowPfcPausePauseClass2Counter +} + +func NewPatternFlowPfcPausePauseClass2Counter() PatternFlowPfcPausePauseClass2Counter { + obj := patternFlowPfcPausePauseClass2Counter{obj: &otg.PatternFlowPfcPausePauseClass2Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass2Counter) msg() *otg.PatternFlowPfcPausePauseClass2Counter { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass2Counter) setMsg(msg *otg.PatternFlowPfcPausePauseClass2Counter) PatternFlowPfcPausePauseClass2Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass2Counter struct { + obj *patternFlowPfcPausePauseClass2Counter +} + +type marshalPatternFlowPfcPausePauseClass2Counter interface { + // ToProto marshals PatternFlowPfcPausePauseClass2Counter to protobuf object *otg.PatternFlowPfcPausePauseClass2Counter + ToProto() (*otg.PatternFlowPfcPausePauseClass2Counter, error) + // ToPbText marshals PatternFlowPfcPausePauseClass2Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass2Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass2Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass2Counter struct { + obj *patternFlowPfcPausePauseClass2Counter +} + +type unMarshalPatternFlowPfcPausePauseClass2Counter interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass2Counter from protobuf object *otg.PatternFlowPfcPausePauseClass2Counter + FromProto(msg *otg.PatternFlowPfcPausePauseClass2Counter) (PatternFlowPfcPausePauseClass2Counter, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass2Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass2Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass2Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass2Counter) Marshal() marshalPatternFlowPfcPausePauseClass2Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass2Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass2Counter) Unmarshal() unMarshalPatternFlowPfcPausePauseClass2Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass2Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass2Counter) ToProto() (*otg.PatternFlowPfcPausePauseClass2Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass2Counter) FromProto(msg *otg.PatternFlowPfcPausePauseClass2Counter) (PatternFlowPfcPausePauseClass2Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass2Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass2Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass2Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass2Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass2Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass2Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass2Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass2Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass2Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass2Counter) Clone() (PatternFlowPfcPausePauseClass2Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass2Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass2Counter is integer counter pattern +type PatternFlowPfcPausePauseClass2Counter interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass2Counter to protobuf object *otg.PatternFlowPfcPausePauseClass2Counter + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass2Counter + // setMsg unmarshals PatternFlowPfcPausePauseClass2Counter from protobuf object *otg.PatternFlowPfcPausePauseClass2Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass2Counter) PatternFlowPfcPausePauseClass2Counter + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass2Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass2Counter + // validate validates PatternFlowPfcPausePauseClass2Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass2Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowPfcPausePauseClass2Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowPfcPausePauseClass2Counter + SetStart(value uint32) PatternFlowPfcPausePauseClass2Counter + // HasStart checks if Start has been set in PatternFlowPfcPausePauseClass2Counter + HasStart() bool + // Step returns uint32, set in PatternFlowPfcPausePauseClass2Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowPfcPausePauseClass2Counter + SetStep(value uint32) PatternFlowPfcPausePauseClass2Counter + // HasStep checks if Step has been set in PatternFlowPfcPausePauseClass2Counter + HasStep() bool + // Count returns uint32, set in PatternFlowPfcPausePauseClass2Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPfcPausePauseClass2Counter + SetCount(value uint32) PatternFlowPfcPausePauseClass2Counter + // HasCount checks if Count has been set in PatternFlowPfcPausePauseClass2Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass2Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass2Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowPfcPausePauseClass2Counter object +func (obj *patternFlowPfcPausePauseClass2Counter) SetStart(value uint32) PatternFlowPfcPausePauseClass2Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass2Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass2Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowPfcPausePauseClass2Counter object +func (obj *patternFlowPfcPausePauseClass2Counter) SetStep(value uint32) PatternFlowPfcPausePauseClass2Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass2Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass2Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPfcPausePauseClass2Counter object +func (obj *patternFlowPfcPausePauseClass2Counter) SetCount(value uint32) PatternFlowPfcPausePauseClass2Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass2Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass2Counter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass2Counter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass2Counter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass2Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class2_metric_tag.go b/gosnappi/pattern_flow_pfc_pause_pause_class2_metric_tag.go new file mode 100644 index 00000000..e57c971c --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class2_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass2MetricTag ***** +type patternFlowPfcPausePauseClass2MetricTag struct { + validation + obj *otg.PatternFlowPfcPausePauseClass2MetricTag + marshaller marshalPatternFlowPfcPausePauseClass2MetricTag + unMarshaller unMarshalPatternFlowPfcPausePauseClass2MetricTag +} + +func NewPatternFlowPfcPausePauseClass2MetricTag() PatternFlowPfcPausePauseClass2MetricTag { + obj := patternFlowPfcPausePauseClass2MetricTag{obj: &otg.PatternFlowPfcPausePauseClass2MetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass2MetricTag) msg() *otg.PatternFlowPfcPausePauseClass2MetricTag { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass2MetricTag) setMsg(msg *otg.PatternFlowPfcPausePauseClass2MetricTag) PatternFlowPfcPausePauseClass2MetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass2MetricTag struct { + obj *patternFlowPfcPausePauseClass2MetricTag +} + +type marshalPatternFlowPfcPausePauseClass2MetricTag interface { + // ToProto marshals PatternFlowPfcPausePauseClass2MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass2MetricTag + ToProto() (*otg.PatternFlowPfcPausePauseClass2MetricTag, error) + // ToPbText marshals PatternFlowPfcPausePauseClass2MetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass2MetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass2MetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass2MetricTag struct { + obj *patternFlowPfcPausePauseClass2MetricTag +} + +type unMarshalPatternFlowPfcPausePauseClass2MetricTag interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass2MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass2MetricTag + FromProto(msg *otg.PatternFlowPfcPausePauseClass2MetricTag) (PatternFlowPfcPausePauseClass2MetricTag, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass2MetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass2MetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass2MetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass2MetricTag) Marshal() marshalPatternFlowPfcPausePauseClass2MetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass2MetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass2MetricTag) Unmarshal() unMarshalPatternFlowPfcPausePauseClass2MetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass2MetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass2MetricTag) ToProto() (*otg.PatternFlowPfcPausePauseClass2MetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass2MetricTag) FromProto(msg *otg.PatternFlowPfcPausePauseClass2MetricTag) (PatternFlowPfcPausePauseClass2MetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass2MetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass2MetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass2MetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass2MetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass2MetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass2MetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass2MetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass2MetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass2MetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass2MetricTag) Clone() (PatternFlowPfcPausePauseClass2MetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass2MetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass2MetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPfcPausePauseClass2MetricTag interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass2MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass2MetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass2MetricTag + // setMsg unmarshals PatternFlowPfcPausePauseClass2MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass2MetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass2MetricTag) PatternFlowPfcPausePauseClass2MetricTag + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass2MetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass2MetricTag + // validate validates PatternFlowPfcPausePauseClass2MetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass2MetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPfcPausePauseClass2MetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPfcPausePauseClass2MetricTag + SetName(value string) PatternFlowPfcPausePauseClass2MetricTag + // Offset returns uint32, set in PatternFlowPfcPausePauseClass2MetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPfcPausePauseClass2MetricTag + SetOffset(value uint32) PatternFlowPfcPausePauseClass2MetricTag + // HasOffset checks if Offset has been set in PatternFlowPfcPausePauseClass2MetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPfcPausePauseClass2MetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPfcPausePauseClass2MetricTag + SetLength(value uint32) PatternFlowPfcPausePauseClass2MetricTag + // HasLength checks if Length has been set in PatternFlowPfcPausePauseClass2MetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPfcPausePauseClass2MetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPfcPausePauseClass2MetricTag object +func (obj *patternFlowPfcPausePauseClass2MetricTag) SetName(value string) PatternFlowPfcPausePauseClass2MetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass2MetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass2MetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPfcPausePauseClass2MetricTag object +func (obj *patternFlowPfcPausePauseClass2MetricTag) SetOffset(value uint32) PatternFlowPfcPausePauseClass2MetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass2MetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass2MetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPfcPausePauseClass2MetricTag object +func (obj *patternFlowPfcPausePauseClass2MetricTag) SetLength(value uint32) PatternFlowPfcPausePauseClass2MetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass2MetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPfcPausePauseClass2MetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass2MetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPfcPausePauseClass2MetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass2MetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class3.go b/gosnappi/pattern_flow_pfc_pause_pause_class3.go new file mode 100644 index 00000000..ec94728b --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class3.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass3 ***** +type patternFlowPfcPausePauseClass3 struct { + validation + obj *otg.PatternFlowPfcPausePauseClass3 + marshaller marshalPatternFlowPfcPausePauseClass3 + unMarshaller unMarshalPatternFlowPfcPausePauseClass3 + incrementHolder PatternFlowPfcPausePauseClass3Counter + decrementHolder PatternFlowPfcPausePauseClass3Counter + metricTagsHolder PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter +} + +func NewPatternFlowPfcPausePauseClass3() PatternFlowPfcPausePauseClass3 { + obj := patternFlowPfcPausePauseClass3{obj: &otg.PatternFlowPfcPausePauseClass3{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass3) msg() *otg.PatternFlowPfcPausePauseClass3 { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass3) setMsg(msg *otg.PatternFlowPfcPausePauseClass3) PatternFlowPfcPausePauseClass3 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass3 struct { + obj *patternFlowPfcPausePauseClass3 +} + +type marshalPatternFlowPfcPausePauseClass3 interface { + // ToProto marshals PatternFlowPfcPausePauseClass3 to protobuf object *otg.PatternFlowPfcPausePauseClass3 + ToProto() (*otg.PatternFlowPfcPausePauseClass3, error) + // ToPbText marshals PatternFlowPfcPausePauseClass3 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass3 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass3 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass3 struct { + obj *patternFlowPfcPausePauseClass3 +} + +type unMarshalPatternFlowPfcPausePauseClass3 interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass3 from protobuf object *otg.PatternFlowPfcPausePauseClass3 + FromProto(msg *otg.PatternFlowPfcPausePauseClass3) (PatternFlowPfcPausePauseClass3, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass3 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass3 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass3 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass3) Marshal() marshalPatternFlowPfcPausePauseClass3 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass3{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass3) Unmarshal() unMarshalPatternFlowPfcPausePauseClass3 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass3{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass3) ToProto() (*otg.PatternFlowPfcPausePauseClass3, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass3) FromProto(msg *otg.PatternFlowPfcPausePauseClass3) (PatternFlowPfcPausePauseClass3, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass3) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass3) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass3) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass3) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass3) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass3) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass3) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass3) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass3) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass3) Clone() (PatternFlowPfcPausePauseClass3, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass3() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPfcPausePauseClass3) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPfcPausePauseClass3 is pause class 3 +type PatternFlowPfcPausePauseClass3 interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass3 to protobuf object *otg.PatternFlowPfcPausePauseClass3 + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass3 + // setMsg unmarshals PatternFlowPfcPausePauseClass3 from protobuf object *otg.PatternFlowPfcPausePauseClass3 + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass3) PatternFlowPfcPausePauseClass3 + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass3 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass3 + // validate validates PatternFlowPfcPausePauseClass3 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass3, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPfcPausePauseClass3ChoiceEnum, set in PatternFlowPfcPausePauseClass3 + Choice() PatternFlowPfcPausePauseClass3ChoiceEnum + // setChoice assigns PatternFlowPfcPausePauseClass3ChoiceEnum provided by user to PatternFlowPfcPausePauseClass3 + setChoice(value PatternFlowPfcPausePauseClass3ChoiceEnum) PatternFlowPfcPausePauseClass3 + // HasChoice checks if Choice has been set in PatternFlowPfcPausePauseClass3 + HasChoice() bool + // Value returns uint32, set in PatternFlowPfcPausePauseClass3. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowPfcPausePauseClass3 + SetValue(value uint32) PatternFlowPfcPausePauseClass3 + // HasValue checks if Value has been set in PatternFlowPfcPausePauseClass3 + HasValue() bool + // Values returns []uint32, set in PatternFlowPfcPausePauseClass3. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowPfcPausePauseClass3 + SetValues(value []uint32) PatternFlowPfcPausePauseClass3 + // Increment returns PatternFlowPfcPausePauseClass3Counter, set in PatternFlowPfcPausePauseClass3. + // PatternFlowPfcPausePauseClass3Counter is integer counter pattern + Increment() PatternFlowPfcPausePauseClass3Counter + // SetIncrement assigns PatternFlowPfcPausePauseClass3Counter provided by user to PatternFlowPfcPausePauseClass3. + // PatternFlowPfcPausePauseClass3Counter is integer counter pattern + SetIncrement(value PatternFlowPfcPausePauseClass3Counter) PatternFlowPfcPausePauseClass3 + // HasIncrement checks if Increment has been set in PatternFlowPfcPausePauseClass3 + HasIncrement() bool + // Decrement returns PatternFlowPfcPausePauseClass3Counter, set in PatternFlowPfcPausePauseClass3. + // PatternFlowPfcPausePauseClass3Counter is integer counter pattern + Decrement() PatternFlowPfcPausePauseClass3Counter + // SetDecrement assigns PatternFlowPfcPausePauseClass3Counter provided by user to PatternFlowPfcPausePauseClass3. + // PatternFlowPfcPausePauseClass3Counter is integer counter pattern + SetDecrement(value PatternFlowPfcPausePauseClass3Counter) PatternFlowPfcPausePauseClass3 + // HasDecrement checks if Decrement has been set in PatternFlowPfcPausePauseClass3 + HasDecrement() bool + // MetricTags returns PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIterIter, set in PatternFlowPfcPausePauseClass3 + MetricTags() PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter + setNil() +} + +type PatternFlowPfcPausePauseClass3ChoiceEnum string + +// Enum of Choice on PatternFlowPfcPausePauseClass3 +var PatternFlowPfcPausePauseClass3Choice = struct { + VALUE PatternFlowPfcPausePauseClass3ChoiceEnum + VALUES PatternFlowPfcPausePauseClass3ChoiceEnum + INCREMENT PatternFlowPfcPausePauseClass3ChoiceEnum + DECREMENT PatternFlowPfcPausePauseClass3ChoiceEnum +}{ + VALUE: PatternFlowPfcPausePauseClass3ChoiceEnum("value"), + VALUES: PatternFlowPfcPausePauseClass3ChoiceEnum("values"), + INCREMENT: PatternFlowPfcPausePauseClass3ChoiceEnum("increment"), + DECREMENT: PatternFlowPfcPausePauseClass3ChoiceEnum("decrement"), +} + +func (obj *patternFlowPfcPausePauseClass3) Choice() PatternFlowPfcPausePauseClass3ChoiceEnum { + return PatternFlowPfcPausePauseClass3ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPfcPausePauseClass3) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPfcPausePauseClass3) setChoice(value PatternFlowPfcPausePauseClass3ChoiceEnum) PatternFlowPfcPausePauseClass3 { + intValue, ok := otg.PatternFlowPfcPausePauseClass3_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPfcPausePauseClass3ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPfcPausePauseClass3_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPfcPausePauseClass3Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPfcPausePauseClass3Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPfcPausePauseClass3Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowPfcPausePauseClass3Counter().msg() + } + + if value == PatternFlowPfcPausePauseClass3Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPfcPausePauseClass3Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass3) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPfcPausePauseClass3Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass3) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowPfcPausePauseClass3 object +func (obj *patternFlowPfcPausePauseClass3) SetValue(value uint32) PatternFlowPfcPausePauseClass3 { + obj.setChoice(PatternFlowPfcPausePauseClass3Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowPfcPausePauseClass3) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowPfcPausePauseClass3 object +func (obj *patternFlowPfcPausePauseClass3) SetValues(value []uint32) PatternFlowPfcPausePauseClass3 { + obj.setChoice(PatternFlowPfcPausePauseClass3Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass3Counter +func (obj *patternFlowPfcPausePauseClass3) Increment() PatternFlowPfcPausePauseClass3Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPfcPausePauseClass3Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPfcPausePauseClass3Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass3Counter +func (obj *patternFlowPfcPausePauseClass3) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPfcPausePauseClass3Counter value in the PatternFlowPfcPausePauseClass3 object +func (obj *patternFlowPfcPausePauseClass3) SetIncrement(value PatternFlowPfcPausePauseClass3Counter) PatternFlowPfcPausePauseClass3 { + obj.setChoice(PatternFlowPfcPausePauseClass3Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass3Counter +func (obj *patternFlowPfcPausePauseClass3) Decrement() PatternFlowPfcPausePauseClass3Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPfcPausePauseClass3Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPfcPausePauseClass3Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass3Counter +func (obj *patternFlowPfcPausePauseClass3) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPfcPausePauseClass3Counter value in the PatternFlowPfcPausePauseClass3 object +func (obj *patternFlowPfcPausePauseClass3) SetDecrement(value PatternFlowPfcPausePauseClass3Counter) PatternFlowPfcPausePauseClass3 { + obj.setChoice(PatternFlowPfcPausePauseClass3Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPfcPausePauseClass3MetricTag +func (obj *patternFlowPfcPausePauseClass3) MetricTags() PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPfcPausePauseClass3MetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter struct { + obj *patternFlowPfcPausePauseClass3 + patternFlowPfcPausePauseClass3MetricTagSlice []PatternFlowPfcPausePauseClass3MetricTag + fieldPtr *[]*otg.PatternFlowPfcPausePauseClass3MetricTag +} + +func newPatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter(ptr *[]*otg.PatternFlowPfcPausePauseClass3MetricTag) PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter { + return &patternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter interface { + setMsg(*patternFlowPfcPausePauseClass3) PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter + Items() []PatternFlowPfcPausePauseClass3MetricTag + Add() PatternFlowPfcPausePauseClass3MetricTag + Append(items ...PatternFlowPfcPausePauseClass3MetricTag) PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter + Set(index int, newObj PatternFlowPfcPausePauseClass3MetricTag) PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter + Clear() PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter + clearHolderSlice() PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter + appendHolderSlice(item PatternFlowPfcPausePauseClass3MetricTag) PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter +} + +func (obj *patternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter) setMsg(msg *patternFlowPfcPausePauseClass3) PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPfcPausePauseClass3MetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter) Items() []PatternFlowPfcPausePauseClass3MetricTag { + return obj.patternFlowPfcPausePauseClass3MetricTagSlice +} + +func (obj *patternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter) Add() PatternFlowPfcPausePauseClass3MetricTag { + newObj := &otg.PatternFlowPfcPausePauseClass3MetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPfcPausePauseClass3MetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPfcPausePauseClass3MetricTagSlice = append(obj.patternFlowPfcPausePauseClass3MetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter) Append(items ...PatternFlowPfcPausePauseClass3MetricTag) PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPfcPausePauseClass3MetricTagSlice = append(obj.patternFlowPfcPausePauseClass3MetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter) Set(index int, newObj PatternFlowPfcPausePauseClass3MetricTag) PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPfcPausePauseClass3MetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter) Clear() PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPfcPausePauseClass3MetricTag{} + obj.patternFlowPfcPausePauseClass3MetricTagSlice = []PatternFlowPfcPausePauseClass3MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter) clearHolderSlice() PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter { + if len(obj.patternFlowPfcPausePauseClass3MetricTagSlice) > 0 { + obj.patternFlowPfcPausePauseClass3MetricTagSlice = []PatternFlowPfcPausePauseClass3MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter) appendHolderSlice(item PatternFlowPfcPausePauseClass3MetricTag) PatternFlowPfcPausePauseClass3PatternFlowPfcPausePauseClass3MetricTagIter { + obj.patternFlowPfcPausePauseClass3MetricTagSlice = append(obj.patternFlowPfcPausePauseClass3MetricTagSlice, item) + return obj +} + +func (obj *patternFlowPfcPausePauseClass3) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass3.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowPfcPausePauseClass3.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPfcPausePauseClass3MetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass3) setDefault() { + var choices_set int = 0 + var choice PatternFlowPfcPausePauseClass3ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass3Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass3Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass3Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass3Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPfcPausePauseClass3Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPfcPausePauseClass3") + } + } else { + intVal := otg.PatternFlowPfcPausePauseClass3_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPfcPausePauseClass3_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class3_counter.go b/gosnappi/pattern_flow_pfc_pause_pause_class3_counter.go new file mode 100644 index 00000000..296e2e7d --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class3_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass3Counter ***** +type patternFlowPfcPausePauseClass3Counter struct { + validation + obj *otg.PatternFlowPfcPausePauseClass3Counter + marshaller marshalPatternFlowPfcPausePauseClass3Counter + unMarshaller unMarshalPatternFlowPfcPausePauseClass3Counter +} + +func NewPatternFlowPfcPausePauseClass3Counter() PatternFlowPfcPausePauseClass3Counter { + obj := patternFlowPfcPausePauseClass3Counter{obj: &otg.PatternFlowPfcPausePauseClass3Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass3Counter) msg() *otg.PatternFlowPfcPausePauseClass3Counter { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass3Counter) setMsg(msg *otg.PatternFlowPfcPausePauseClass3Counter) PatternFlowPfcPausePauseClass3Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass3Counter struct { + obj *patternFlowPfcPausePauseClass3Counter +} + +type marshalPatternFlowPfcPausePauseClass3Counter interface { + // ToProto marshals PatternFlowPfcPausePauseClass3Counter to protobuf object *otg.PatternFlowPfcPausePauseClass3Counter + ToProto() (*otg.PatternFlowPfcPausePauseClass3Counter, error) + // ToPbText marshals PatternFlowPfcPausePauseClass3Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass3Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass3Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass3Counter struct { + obj *patternFlowPfcPausePauseClass3Counter +} + +type unMarshalPatternFlowPfcPausePauseClass3Counter interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass3Counter from protobuf object *otg.PatternFlowPfcPausePauseClass3Counter + FromProto(msg *otg.PatternFlowPfcPausePauseClass3Counter) (PatternFlowPfcPausePauseClass3Counter, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass3Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass3Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass3Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass3Counter) Marshal() marshalPatternFlowPfcPausePauseClass3Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass3Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass3Counter) Unmarshal() unMarshalPatternFlowPfcPausePauseClass3Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass3Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass3Counter) ToProto() (*otg.PatternFlowPfcPausePauseClass3Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass3Counter) FromProto(msg *otg.PatternFlowPfcPausePauseClass3Counter) (PatternFlowPfcPausePauseClass3Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass3Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass3Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass3Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass3Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass3Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass3Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass3Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass3Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass3Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass3Counter) Clone() (PatternFlowPfcPausePauseClass3Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass3Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass3Counter is integer counter pattern +type PatternFlowPfcPausePauseClass3Counter interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass3Counter to protobuf object *otg.PatternFlowPfcPausePauseClass3Counter + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass3Counter + // setMsg unmarshals PatternFlowPfcPausePauseClass3Counter from protobuf object *otg.PatternFlowPfcPausePauseClass3Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass3Counter) PatternFlowPfcPausePauseClass3Counter + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass3Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass3Counter + // validate validates PatternFlowPfcPausePauseClass3Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass3Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowPfcPausePauseClass3Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowPfcPausePauseClass3Counter + SetStart(value uint32) PatternFlowPfcPausePauseClass3Counter + // HasStart checks if Start has been set in PatternFlowPfcPausePauseClass3Counter + HasStart() bool + // Step returns uint32, set in PatternFlowPfcPausePauseClass3Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowPfcPausePauseClass3Counter + SetStep(value uint32) PatternFlowPfcPausePauseClass3Counter + // HasStep checks if Step has been set in PatternFlowPfcPausePauseClass3Counter + HasStep() bool + // Count returns uint32, set in PatternFlowPfcPausePauseClass3Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPfcPausePauseClass3Counter + SetCount(value uint32) PatternFlowPfcPausePauseClass3Counter + // HasCount checks if Count has been set in PatternFlowPfcPausePauseClass3Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass3Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass3Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowPfcPausePauseClass3Counter object +func (obj *patternFlowPfcPausePauseClass3Counter) SetStart(value uint32) PatternFlowPfcPausePauseClass3Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass3Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass3Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowPfcPausePauseClass3Counter object +func (obj *patternFlowPfcPausePauseClass3Counter) SetStep(value uint32) PatternFlowPfcPausePauseClass3Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass3Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass3Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPfcPausePauseClass3Counter object +func (obj *patternFlowPfcPausePauseClass3Counter) SetCount(value uint32) PatternFlowPfcPausePauseClass3Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass3Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass3Counter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass3Counter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass3Counter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass3Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class3_metric_tag.go b/gosnappi/pattern_flow_pfc_pause_pause_class3_metric_tag.go new file mode 100644 index 00000000..c1c9e655 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class3_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass3MetricTag ***** +type patternFlowPfcPausePauseClass3MetricTag struct { + validation + obj *otg.PatternFlowPfcPausePauseClass3MetricTag + marshaller marshalPatternFlowPfcPausePauseClass3MetricTag + unMarshaller unMarshalPatternFlowPfcPausePauseClass3MetricTag +} + +func NewPatternFlowPfcPausePauseClass3MetricTag() PatternFlowPfcPausePauseClass3MetricTag { + obj := patternFlowPfcPausePauseClass3MetricTag{obj: &otg.PatternFlowPfcPausePauseClass3MetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass3MetricTag) msg() *otg.PatternFlowPfcPausePauseClass3MetricTag { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass3MetricTag) setMsg(msg *otg.PatternFlowPfcPausePauseClass3MetricTag) PatternFlowPfcPausePauseClass3MetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass3MetricTag struct { + obj *patternFlowPfcPausePauseClass3MetricTag +} + +type marshalPatternFlowPfcPausePauseClass3MetricTag interface { + // ToProto marshals PatternFlowPfcPausePauseClass3MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass3MetricTag + ToProto() (*otg.PatternFlowPfcPausePauseClass3MetricTag, error) + // ToPbText marshals PatternFlowPfcPausePauseClass3MetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass3MetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass3MetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass3MetricTag struct { + obj *patternFlowPfcPausePauseClass3MetricTag +} + +type unMarshalPatternFlowPfcPausePauseClass3MetricTag interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass3MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass3MetricTag + FromProto(msg *otg.PatternFlowPfcPausePauseClass3MetricTag) (PatternFlowPfcPausePauseClass3MetricTag, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass3MetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass3MetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass3MetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass3MetricTag) Marshal() marshalPatternFlowPfcPausePauseClass3MetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass3MetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass3MetricTag) Unmarshal() unMarshalPatternFlowPfcPausePauseClass3MetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass3MetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass3MetricTag) ToProto() (*otg.PatternFlowPfcPausePauseClass3MetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass3MetricTag) FromProto(msg *otg.PatternFlowPfcPausePauseClass3MetricTag) (PatternFlowPfcPausePauseClass3MetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass3MetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass3MetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass3MetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass3MetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass3MetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass3MetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass3MetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass3MetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass3MetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass3MetricTag) Clone() (PatternFlowPfcPausePauseClass3MetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass3MetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass3MetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPfcPausePauseClass3MetricTag interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass3MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass3MetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass3MetricTag + // setMsg unmarshals PatternFlowPfcPausePauseClass3MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass3MetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass3MetricTag) PatternFlowPfcPausePauseClass3MetricTag + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass3MetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass3MetricTag + // validate validates PatternFlowPfcPausePauseClass3MetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass3MetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPfcPausePauseClass3MetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPfcPausePauseClass3MetricTag + SetName(value string) PatternFlowPfcPausePauseClass3MetricTag + // Offset returns uint32, set in PatternFlowPfcPausePauseClass3MetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPfcPausePauseClass3MetricTag + SetOffset(value uint32) PatternFlowPfcPausePauseClass3MetricTag + // HasOffset checks if Offset has been set in PatternFlowPfcPausePauseClass3MetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPfcPausePauseClass3MetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPfcPausePauseClass3MetricTag + SetLength(value uint32) PatternFlowPfcPausePauseClass3MetricTag + // HasLength checks if Length has been set in PatternFlowPfcPausePauseClass3MetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPfcPausePauseClass3MetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPfcPausePauseClass3MetricTag object +func (obj *patternFlowPfcPausePauseClass3MetricTag) SetName(value string) PatternFlowPfcPausePauseClass3MetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass3MetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass3MetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPfcPausePauseClass3MetricTag object +func (obj *patternFlowPfcPausePauseClass3MetricTag) SetOffset(value uint32) PatternFlowPfcPausePauseClass3MetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass3MetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass3MetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPfcPausePauseClass3MetricTag object +func (obj *patternFlowPfcPausePauseClass3MetricTag) SetLength(value uint32) PatternFlowPfcPausePauseClass3MetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass3MetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPfcPausePauseClass3MetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass3MetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPfcPausePauseClass3MetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass3MetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class4.go b/gosnappi/pattern_flow_pfc_pause_pause_class4.go new file mode 100644 index 00000000..020fc9de --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class4.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass4 ***** +type patternFlowPfcPausePauseClass4 struct { + validation + obj *otg.PatternFlowPfcPausePauseClass4 + marshaller marshalPatternFlowPfcPausePauseClass4 + unMarshaller unMarshalPatternFlowPfcPausePauseClass4 + incrementHolder PatternFlowPfcPausePauseClass4Counter + decrementHolder PatternFlowPfcPausePauseClass4Counter + metricTagsHolder PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter +} + +func NewPatternFlowPfcPausePauseClass4() PatternFlowPfcPausePauseClass4 { + obj := patternFlowPfcPausePauseClass4{obj: &otg.PatternFlowPfcPausePauseClass4{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass4) msg() *otg.PatternFlowPfcPausePauseClass4 { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass4) setMsg(msg *otg.PatternFlowPfcPausePauseClass4) PatternFlowPfcPausePauseClass4 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass4 struct { + obj *patternFlowPfcPausePauseClass4 +} + +type marshalPatternFlowPfcPausePauseClass4 interface { + // ToProto marshals PatternFlowPfcPausePauseClass4 to protobuf object *otg.PatternFlowPfcPausePauseClass4 + ToProto() (*otg.PatternFlowPfcPausePauseClass4, error) + // ToPbText marshals PatternFlowPfcPausePauseClass4 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass4 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass4 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass4 struct { + obj *patternFlowPfcPausePauseClass4 +} + +type unMarshalPatternFlowPfcPausePauseClass4 interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass4 from protobuf object *otg.PatternFlowPfcPausePauseClass4 + FromProto(msg *otg.PatternFlowPfcPausePauseClass4) (PatternFlowPfcPausePauseClass4, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass4 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass4 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass4 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass4) Marshal() marshalPatternFlowPfcPausePauseClass4 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass4{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass4) Unmarshal() unMarshalPatternFlowPfcPausePauseClass4 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass4{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass4) ToProto() (*otg.PatternFlowPfcPausePauseClass4, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass4) FromProto(msg *otg.PatternFlowPfcPausePauseClass4) (PatternFlowPfcPausePauseClass4, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass4) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass4) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass4) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass4) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass4) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass4) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass4) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass4) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass4) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass4) Clone() (PatternFlowPfcPausePauseClass4, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass4() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPfcPausePauseClass4) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPfcPausePauseClass4 is pause class 4 +type PatternFlowPfcPausePauseClass4 interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass4 to protobuf object *otg.PatternFlowPfcPausePauseClass4 + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass4 + // setMsg unmarshals PatternFlowPfcPausePauseClass4 from protobuf object *otg.PatternFlowPfcPausePauseClass4 + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass4) PatternFlowPfcPausePauseClass4 + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass4 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass4 + // validate validates PatternFlowPfcPausePauseClass4 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass4, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPfcPausePauseClass4ChoiceEnum, set in PatternFlowPfcPausePauseClass4 + Choice() PatternFlowPfcPausePauseClass4ChoiceEnum + // setChoice assigns PatternFlowPfcPausePauseClass4ChoiceEnum provided by user to PatternFlowPfcPausePauseClass4 + setChoice(value PatternFlowPfcPausePauseClass4ChoiceEnum) PatternFlowPfcPausePauseClass4 + // HasChoice checks if Choice has been set in PatternFlowPfcPausePauseClass4 + HasChoice() bool + // Value returns uint32, set in PatternFlowPfcPausePauseClass4. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowPfcPausePauseClass4 + SetValue(value uint32) PatternFlowPfcPausePauseClass4 + // HasValue checks if Value has been set in PatternFlowPfcPausePauseClass4 + HasValue() bool + // Values returns []uint32, set in PatternFlowPfcPausePauseClass4. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowPfcPausePauseClass4 + SetValues(value []uint32) PatternFlowPfcPausePauseClass4 + // Increment returns PatternFlowPfcPausePauseClass4Counter, set in PatternFlowPfcPausePauseClass4. + // PatternFlowPfcPausePauseClass4Counter is integer counter pattern + Increment() PatternFlowPfcPausePauseClass4Counter + // SetIncrement assigns PatternFlowPfcPausePauseClass4Counter provided by user to PatternFlowPfcPausePauseClass4. + // PatternFlowPfcPausePauseClass4Counter is integer counter pattern + SetIncrement(value PatternFlowPfcPausePauseClass4Counter) PatternFlowPfcPausePauseClass4 + // HasIncrement checks if Increment has been set in PatternFlowPfcPausePauseClass4 + HasIncrement() bool + // Decrement returns PatternFlowPfcPausePauseClass4Counter, set in PatternFlowPfcPausePauseClass4. + // PatternFlowPfcPausePauseClass4Counter is integer counter pattern + Decrement() PatternFlowPfcPausePauseClass4Counter + // SetDecrement assigns PatternFlowPfcPausePauseClass4Counter provided by user to PatternFlowPfcPausePauseClass4. + // PatternFlowPfcPausePauseClass4Counter is integer counter pattern + SetDecrement(value PatternFlowPfcPausePauseClass4Counter) PatternFlowPfcPausePauseClass4 + // HasDecrement checks if Decrement has been set in PatternFlowPfcPausePauseClass4 + HasDecrement() bool + // MetricTags returns PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIterIter, set in PatternFlowPfcPausePauseClass4 + MetricTags() PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter + setNil() +} + +type PatternFlowPfcPausePauseClass4ChoiceEnum string + +// Enum of Choice on PatternFlowPfcPausePauseClass4 +var PatternFlowPfcPausePauseClass4Choice = struct { + VALUE PatternFlowPfcPausePauseClass4ChoiceEnum + VALUES PatternFlowPfcPausePauseClass4ChoiceEnum + INCREMENT PatternFlowPfcPausePauseClass4ChoiceEnum + DECREMENT PatternFlowPfcPausePauseClass4ChoiceEnum +}{ + VALUE: PatternFlowPfcPausePauseClass4ChoiceEnum("value"), + VALUES: PatternFlowPfcPausePauseClass4ChoiceEnum("values"), + INCREMENT: PatternFlowPfcPausePauseClass4ChoiceEnum("increment"), + DECREMENT: PatternFlowPfcPausePauseClass4ChoiceEnum("decrement"), +} + +func (obj *patternFlowPfcPausePauseClass4) Choice() PatternFlowPfcPausePauseClass4ChoiceEnum { + return PatternFlowPfcPausePauseClass4ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPfcPausePauseClass4) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPfcPausePauseClass4) setChoice(value PatternFlowPfcPausePauseClass4ChoiceEnum) PatternFlowPfcPausePauseClass4 { + intValue, ok := otg.PatternFlowPfcPausePauseClass4_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPfcPausePauseClass4ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPfcPausePauseClass4_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPfcPausePauseClass4Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPfcPausePauseClass4Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPfcPausePauseClass4Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowPfcPausePauseClass4Counter().msg() + } + + if value == PatternFlowPfcPausePauseClass4Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPfcPausePauseClass4Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass4) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPfcPausePauseClass4Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass4) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowPfcPausePauseClass4 object +func (obj *patternFlowPfcPausePauseClass4) SetValue(value uint32) PatternFlowPfcPausePauseClass4 { + obj.setChoice(PatternFlowPfcPausePauseClass4Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowPfcPausePauseClass4) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowPfcPausePauseClass4 object +func (obj *patternFlowPfcPausePauseClass4) SetValues(value []uint32) PatternFlowPfcPausePauseClass4 { + obj.setChoice(PatternFlowPfcPausePauseClass4Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass4Counter +func (obj *patternFlowPfcPausePauseClass4) Increment() PatternFlowPfcPausePauseClass4Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPfcPausePauseClass4Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPfcPausePauseClass4Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass4Counter +func (obj *patternFlowPfcPausePauseClass4) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPfcPausePauseClass4Counter value in the PatternFlowPfcPausePauseClass4 object +func (obj *patternFlowPfcPausePauseClass4) SetIncrement(value PatternFlowPfcPausePauseClass4Counter) PatternFlowPfcPausePauseClass4 { + obj.setChoice(PatternFlowPfcPausePauseClass4Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass4Counter +func (obj *patternFlowPfcPausePauseClass4) Decrement() PatternFlowPfcPausePauseClass4Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPfcPausePauseClass4Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPfcPausePauseClass4Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass4Counter +func (obj *patternFlowPfcPausePauseClass4) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPfcPausePauseClass4Counter value in the PatternFlowPfcPausePauseClass4 object +func (obj *patternFlowPfcPausePauseClass4) SetDecrement(value PatternFlowPfcPausePauseClass4Counter) PatternFlowPfcPausePauseClass4 { + obj.setChoice(PatternFlowPfcPausePauseClass4Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPfcPausePauseClass4MetricTag +func (obj *patternFlowPfcPausePauseClass4) MetricTags() PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPfcPausePauseClass4MetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter struct { + obj *patternFlowPfcPausePauseClass4 + patternFlowPfcPausePauseClass4MetricTagSlice []PatternFlowPfcPausePauseClass4MetricTag + fieldPtr *[]*otg.PatternFlowPfcPausePauseClass4MetricTag +} + +func newPatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter(ptr *[]*otg.PatternFlowPfcPausePauseClass4MetricTag) PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter { + return &patternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter interface { + setMsg(*patternFlowPfcPausePauseClass4) PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter + Items() []PatternFlowPfcPausePauseClass4MetricTag + Add() PatternFlowPfcPausePauseClass4MetricTag + Append(items ...PatternFlowPfcPausePauseClass4MetricTag) PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter + Set(index int, newObj PatternFlowPfcPausePauseClass4MetricTag) PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter + Clear() PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter + clearHolderSlice() PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter + appendHolderSlice(item PatternFlowPfcPausePauseClass4MetricTag) PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter +} + +func (obj *patternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter) setMsg(msg *patternFlowPfcPausePauseClass4) PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPfcPausePauseClass4MetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter) Items() []PatternFlowPfcPausePauseClass4MetricTag { + return obj.patternFlowPfcPausePauseClass4MetricTagSlice +} + +func (obj *patternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter) Add() PatternFlowPfcPausePauseClass4MetricTag { + newObj := &otg.PatternFlowPfcPausePauseClass4MetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPfcPausePauseClass4MetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPfcPausePauseClass4MetricTagSlice = append(obj.patternFlowPfcPausePauseClass4MetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter) Append(items ...PatternFlowPfcPausePauseClass4MetricTag) PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPfcPausePauseClass4MetricTagSlice = append(obj.patternFlowPfcPausePauseClass4MetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter) Set(index int, newObj PatternFlowPfcPausePauseClass4MetricTag) PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPfcPausePauseClass4MetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter) Clear() PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPfcPausePauseClass4MetricTag{} + obj.patternFlowPfcPausePauseClass4MetricTagSlice = []PatternFlowPfcPausePauseClass4MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter) clearHolderSlice() PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter { + if len(obj.patternFlowPfcPausePauseClass4MetricTagSlice) > 0 { + obj.patternFlowPfcPausePauseClass4MetricTagSlice = []PatternFlowPfcPausePauseClass4MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter) appendHolderSlice(item PatternFlowPfcPausePauseClass4MetricTag) PatternFlowPfcPausePauseClass4PatternFlowPfcPausePauseClass4MetricTagIter { + obj.patternFlowPfcPausePauseClass4MetricTagSlice = append(obj.patternFlowPfcPausePauseClass4MetricTagSlice, item) + return obj +} + +func (obj *patternFlowPfcPausePauseClass4) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass4.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowPfcPausePauseClass4.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPfcPausePauseClass4MetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass4) setDefault() { + var choices_set int = 0 + var choice PatternFlowPfcPausePauseClass4ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass4Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass4Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass4Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass4Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPfcPausePauseClass4Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPfcPausePauseClass4") + } + } else { + intVal := otg.PatternFlowPfcPausePauseClass4_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPfcPausePauseClass4_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class4_counter.go b/gosnappi/pattern_flow_pfc_pause_pause_class4_counter.go new file mode 100644 index 00000000..3a8f819f --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class4_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass4Counter ***** +type patternFlowPfcPausePauseClass4Counter struct { + validation + obj *otg.PatternFlowPfcPausePauseClass4Counter + marshaller marshalPatternFlowPfcPausePauseClass4Counter + unMarshaller unMarshalPatternFlowPfcPausePauseClass4Counter +} + +func NewPatternFlowPfcPausePauseClass4Counter() PatternFlowPfcPausePauseClass4Counter { + obj := patternFlowPfcPausePauseClass4Counter{obj: &otg.PatternFlowPfcPausePauseClass4Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass4Counter) msg() *otg.PatternFlowPfcPausePauseClass4Counter { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass4Counter) setMsg(msg *otg.PatternFlowPfcPausePauseClass4Counter) PatternFlowPfcPausePauseClass4Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass4Counter struct { + obj *patternFlowPfcPausePauseClass4Counter +} + +type marshalPatternFlowPfcPausePauseClass4Counter interface { + // ToProto marshals PatternFlowPfcPausePauseClass4Counter to protobuf object *otg.PatternFlowPfcPausePauseClass4Counter + ToProto() (*otg.PatternFlowPfcPausePauseClass4Counter, error) + // ToPbText marshals PatternFlowPfcPausePauseClass4Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass4Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass4Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass4Counter struct { + obj *patternFlowPfcPausePauseClass4Counter +} + +type unMarshalPatternFlowPfcPausePauseClass4Counter interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass4Counter from protobuf object *otg.PatternFlowPfcPausePauseClass4Counter + FromProto(msg *otg.PatternFlowPfcPausePauseClass4Counter) (PatternFlowPfcPausePauseClass4Counter, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass4Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass4Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass4Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass4Counter) Marshal() marshalPatternFlowPfcPausePauseClass4Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass4Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass4Counter) Unmarshal() unMarshalPatternFlowPfcPausePauseClass4Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass4Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass4Counter) ToProto() (*otg.PatternFlowPfcPausePauseClass4Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass4Counter) FromProto(msg *otg.PatternFlowPfcPausePauseClass4Counter) (PatternFlowPfcPausePauseClass4Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass4Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass4Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass4Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass4Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass4Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass4Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass4Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass4Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass4Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass4Counter) Clone() (PatternFlowPfcPausePauseClass4Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass4Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass4Counter is integer counter pattern +type PatternFlowPfcPausePauseClass4Counter interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass4Counter to protobuf object *otg.PatternFlowPfcPausePauseClass4Counter + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass4Counter + // setMsg unmarshals PatternFlowPfcPausePauseClass4Counter from protobuf object *otg.PatternFlowPfcPausePauseClass4Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass4Counter) PatternFlowPfcPausePauseClass4Counter + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass4Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass4Counter + // validate validates PatternFlowPfcPausePauseClass4Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass4Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowPfcPausePauseClass4Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowPfcPausePauseClass4Counter + SetStart(value uint32) PatternFlowPfcPausePauseClass4Counter + // HasStart checks if Start has been set in PatternFlowPfcPausePauseClass4Counter + HasStart() bool + // Step returns uint32, set in PatternFlowPfcPausePauseClass4Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowPfcPausePauseClass4Counter + SetStep(value uint32) PatternFlowPfcPausePauseClass4Counter + // HasStep checks if Step has been set in PatternFlowPfcPausePauseClass4Counter + HasStep() bool + // Count returns uint32, set in PatternFlowPfcPausePauseClass4Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPfcPausePauseClass4Counter + SetCount(value uint32) PatternFlowPfcPausePauseClass4Counter + // HasCount checks if Count has been set in PatternFlowPfcPausePauseClass4Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass4Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass4Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowPfcPausePauseClass4Counter object +func (obj *patternFlowPfcPausePauseClass4Counter) SetStart(value uint32) PatternFlowPfcPausePauseClass4Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass4Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass4Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowPfcPausePauseClass4Counter object +func (obj *patternFlowPfcPausePauseClass4Counter) SetStep(value uint32) PatternFlowPfcPausePauseClass4Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass4Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass4Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPfcPausePauseClass4Counter object +func (obj *patternFlowPfcPausePauseClass4Counter) SetCount(value uint32) PatternFlowPfcPausePauseClass4Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass4Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass4Counter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass4Counter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass4Counter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass4Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class4_metric_tag.go b/gosnappi/pattern_flow_pfc_pause_pause_class4_metric_tag.go new file mode 100644 index 00000000..658750fe --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class4_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass4MetricTag ***** +type patternFlowPfcPausePauseClass4MetricTag struct { + validation + obj *otg.PatternFlowPfcPausePauseClass4MetricTag + marshaller marshalPatternFlowPfcPausePauseClass4MetricTag + unMarshaller unMarshalPatternFlowPfcPausePauseClass4MetricTag +} + +func NewPatternFlowPfcPausePauseClass4MetricTag() PatternFlowPfcPausePauseClass4MetricTag { + obj := patternFlowPfcPausePauseClass4MetricTag{obj: &otg.PatternFlowPfcPausePauseClass4MetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass4MetricTag) msg() *otg.PatternFlowPfcPausePauseClass4MetricTag { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass4MetricTag) setMsg(msg *otg.PatternFlowPfcPausePauseClass4MetricTag) PatternFlowPfcPausePauseClass4MetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass4MetricTag struct { + obj *patternFlowPfcPausePauseClass4MetricTag +} + +type marshalPatternFlowPfcPausePauseClass4MetricTag interface { + // ToProto marshals PatternFlowPfcPausePauseClass4MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass4MetricTag + ToProto() (*otg.PatternFlowPfcPausePauseClass4MetricTag, error) + // ToPbText marshals PatternFlowPfcPausePauseClass4MetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass4MetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass4MetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass4MetricTag struct { + obj *patternFlowPfcPausePauseClass4MetricTag +} + +type unMarshalPatternFlowPfcPausePauseClass4MetricTag interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass4MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass4MetricTag + FromProto(msg *otg.PatternFlowPfcPausePauseClass4MetricTag) (PatternFlowPfcPausePauseClass4MetricTag, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass4MetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass4MetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass4MetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass4MetricTag) Marshal() marshalPatternFlowPfcPausePauseClass4MetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass4MetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass4MetricTag) Unmarshal() unMarshalPatternFlowPfcPausePauseClass4MetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass4MetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass4MetricTag) ToProto() (*otg.PatternFlowPfcPausePauseClass4MetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass4MetricTag) FromProto(msg *otg.PatternFlowPfcPausePauseClass4MetricTag) (PatternFlowPfcPausePauseClass4MetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass4MetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass4MetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass4MetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass4MetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass4MetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass4MetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass4MetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass4MetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass4MetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass4MetricTag) Clone() (PatternFlowPfcPausePauseClass4MetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass4MetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass4MetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPfcPausePauseClass4MetricTag interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass4MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass4MetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass4MetricTag + // setMsg unmarshals PatternFlowPfcPausePauseClass4MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass4MetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass4MetricTag) PatternFlowPfcPausePauseClass4MetricTag + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass4MetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass4MetricTag + // validate validates PatternFlowPfcPausePauseClass4MetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass4MetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPfcPausePauseClass4MetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPfcPausePauseClass4MetricTag + SetName(value string) PatternFlowPfcPausePauseClass4MetricTag + // Offset returns uint32, set in PatternFlowPfcPausePauseClass4MetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPfcPausePauseClass4MetricTag + SetOffset(value uint32) PatternFlowPfcPausePauseClass4MetricTag + // HasOffset checks if Offset has been set in PatternFlowPfcPausePauseClass4MetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPfcPausePauseClass4MetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPfcPausePauseClass4MetricTag + SetLength(value uint32) PatternFlowPfcPausePauseClass4MetricTag + // HasLength checks if Length has been set in PatternFlowPfcPausePauseClass4MetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPfcPausePauseClass4MetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPfcPausePauseClass4MetricTag object +func (obj *patternFlowPfcPausePauseClass4MetricTag) SetName(value string) PatternFlowPfcPausePauseClass4MetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass4MetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass4MetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPfcPausePauseClass4MetricTag object +func (obj *patternFlowPfcPausePauseClass4MetricTag) SetOffset(value uint32) PatternFlowPfcPausePauseClass4MetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass4MetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass4MetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPfcPausePauseClass4MetricTag object +func (obj *patternFlowPfcPausePauseClass4MetricTag) SetLength(value uint32) PatternFlowPfcPausePauseClass4MetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass4MetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPfcPausePauseClass4MetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass4MetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPfcPausePauseClass4MetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass4MetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class5.go b/gosnappi/pattern_flow_pfc_pause_pause_class5.go new file mode 100644 index 00000000..2f7e56d6 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class5.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass5 ***** +type patternFlowPfcPausePauseClass5 struct { + validation + obj *otg.PatternFlowPfcPausePauseClass5 + marshaller marshalPatternFlowPfcPausePauseClass5 + unMarshaller unMarshalPatternFlowPfcPausePauseClass5 + incrementHolder PatternFlowPfcPausePauseClass5Counter + decrementHolder PatternFlowPfcPausePauseClass5Counter + metricTagsHolder PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter +} + +func NewPatternFlowPfcPausePauseClass5() PatternFlowPfcPausePauseClass5 { + obj := patternFlowPfcPausePauseClass5{obj: &otg.PatternFlowPfcPausePauseClass5{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass5) msg() *otg.PatternFlowPfcPausePauseClass5 { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass5) setMsg(msg *otg.PatternFlowPfcPausePauseClass5) PatternFlowPfcPausePauseClass5 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass5 struct { + obj *patternFlowPfcPausePauseClass5 +} + +type marshalPatternFlowPfcPausePauseClass5 interface { + // ToProto marshals PatternFlowPfcPausePauseClass5 to protobuf object *otg.PatternFlowPfcPausePauseClass5 + ToProto() (*otg.PatternFlowPfcPausePauseClass5, error) + // ToPbText marshals PatternFlowPfcPausePauseClass5 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass5 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass5 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass5 struct { + obj *patternFlowPfcPausePauseClass5 +} + +type unMarshalPatternFlowPfcPausePauseClass5 interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass5 from protobuf object *otg.PatternFlowPfcPausePauseClass5 + FromProto(msg *otg.PatternFlowPfcPausePauseClass5) (PatternFlowPfcPausePauseClass5, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass5 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass5 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass5 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass5) Marshal() marshalPatternFlowPfcPausePauseClass5 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass5{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass5) Unmarshal() unMarshalPatternFlowPfcPausePauseClass5 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass5{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass5) ToProto() (*otg.PatternFlowPfcPausePauseClass5, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass5) FromProto(msg *otg.PatternFlowPfcPausePauseClass5) (PatternFlowPfcPausePauseClass5, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass5) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass5) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass5) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass5) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass5) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass5) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass5) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass5) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass5) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass5) Clone() (PatternFlowPfcPausePauseClass5, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass5() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPfcPausePauseClass5) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPfcPausePauseClass5 is pause class 5 +type PatternFlowPfcPausePauseClass5 interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass5 to protobuf object *otg.PatternFlowPfcPausePauseClass5 + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass5 + // setMsg unmarshals PatternFlowPfcPausePauseClass5 from protobuf object *otg.PatternFlowPfcPausePauseClass5 + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass5) PatternFlowPfcPausePauseClass5 + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass5 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass5 + // validate validates PatternFlowPfcPausePauseClass5 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass5, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPfcPausePauseClass5ChoiceEnum, set in PatternFlowPfcPausePauseClass5 + Choice() PatternFlowPfcPausePauseClass5ChoiceEnum + // setChoice assigns PatternFlowPfcPausePauseClass5ChoiceEnum provided by user to PatternFlowPfcPausePauseClass5 + setChoice(value PatternFlowPfcPausePauseClass5ChoiceEnum) PatternFlowPfcPausePauseClass5 + // HasChoice checks if Choice has been set in PatternFlowPfcPausePauseClass5 + HasChoice() bool + // Value returns uint32, set in PatternFlowPfcPausePauseClass5. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowPfcPausePauseClass5 + SetValue(value uint32) PatternFlowPfcPausePauseClass5 + // HasValue checks if Value has been set in PatternFlowPfcPausePauseClass5 + HasValue() bool + // Values returns []uint32, set in PatternFlowPfcPausePauseClass5. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowPfcPausePauseClass5 + SetValues(value []uint32) PatternFlowPfcPausePauseClass5 + // Increment returns PatternFlowPfcPausePauseClass5Counter, set in PatternFlowPfcPausePauseClass5. + // PatternFlowPfcPausePauseClass5Counter is integer counter pattern + Increment() PatternFlowPfcPausePauseClass5Counter + // SetIncrement assigns PatternFlowPfcPausePauseClass5Counter provided by user to PatternFlowPfcPausePauseClass5. + // PatternFlowPfcPausePauseClass5Counter is integer counter pattern + SetIncrement(value PatternFlowPfcPausePauseClass5Counter) PatternFlowPfcPausePauseClass5 + // HasIncrement checks if Increment has been set in PatternFlowPfcPausePauseClass5 + HasIncrement() bool + // Decrement returns PatternFlowPfcPausePauseClass5Counter, set in PatternFlowPfcPausePauseClass5. + // PatternFlowPfcPausePauseClass5Counter is integer counter pattern + Decrement() PatternFlowPfcPausePauseClass5Counter + // SetDecrement assigns PatternFlowPfcPausePauseClass5Counter provided by user to PatternFlowPfcPausePauseClass5. + // PatternFlowPfcPausePauseClass5Counter is integer counter pattern + SetDecrement(value PatternFlowPfcPausePauseClass5Counter) PatternFlowPfcPausePauseClass5 + // HasDecrement checks if Decrement has been set in PatternFlowPfcPausePauseClass5 + HasDecrement() bool + // MetricTags returns PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIterIter, set in PatternFlowPfcPausePauseClass5 + MetricTags() PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter + setNil() +} + +type PatternFlowPfcPausePauseClass5ChoiceEnum string + +// Enum of Choice on PatternFlowPfcPausePauseClass5 +var PatternFlowPfcPausePauseClass5Choice = struct { + VALUE PatternFlowPfcPausePauseClass5ChoiceEnum + VALUES PatternFlowPfcPausePauseClass5ChoiceEnum + INCREMENT PatternFlowPfcPausePauseClass5ChoiceEnum + DECREMENT PatternFlowPfcPausePauseClass5ChoiceEnum +}{ + VALUE: PatternFlowPfcPausePauseClass5ChoiceEnum("value"), + VALUES: PatternFlowPfcPausePauseClass5ChoiceEnum("values"), + INCREMENT: PatternFlowPfcPausePauseClass5ChoiceEnum("increment"), + DECREMENT: PatternFlowPfcPausePauseClass5ChoiceEnum("decrement"), +} + +func (obj *patternFlowPfcPausePauseClass5) Choice() PatternFlowPfcPausePauseClass5ChoiceEnum { + return PatternFlowPfcPausePauseClass5ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPfcPausePauseClass5) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPfcPausePauseClass5) setChoice(value PatternFlowPfcPausePauseClass5ChoiceEnum) PatternFlowPfcPausePauseClass5 { + intValue, ok := otg.PatternFlowPfcPausePauseClass5_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPfcPausePauseClass5ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPfcPausePauseClass5_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPfcPausePauseClass5Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPfcPausePauseClass5Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPfcPausePauseClass5Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowPfcPausePauseClass5Counter().msg() + } + + if value == PatternFlowPfcPausePauseClass5Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPfcPausePauseClass5Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass5) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPfcPausePauseClass5Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass5) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowPfcPausePauseClass5 object +func (obj *patternFlowPfcPausePauseClass5) SetValue(value uint32) PatternFlowPfcPausePauseClass5 { + obj.setChoice(PatternFlowPfcPausePauseClass5Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowPfcPausePauseClass5) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowPfcPausePauseClass5 object +func (obj *patternFlowPfcPausePauseClass5) SetValues(value []uint32) PatternFlowPfcPausePauseClass5 { + obj.setChoice(PatternFlowPfcPausePauseClass5Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass5Counter +func (obj *patternFlowPfcPausePauseClass5) Increment() PatternFlowPfcPausePauseClass5Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPfcPausePauseClass5Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPfcPausePauseClass5Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass5Counter +func (obj *patternFlowPfcPausePauseClass5) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPfcPausePauseClass5Counter value in the PatternFlowPfcPausePauseClass5 object +func (obj *patternFlowPfcPausePauseClass5) SetIncrement(value PatternFlowPfcPausePauseClass5Counter) PatternFlowPfcPausePauseClass5 { + obj.setChoice(PatternFlowPfcPausePauseClass5Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass5Counter +func (obj *patternFlowPfcPausePauseClass5) Decrement() PatternFlowPfcPausePauseClass5Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPfcPausePauseClass5Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPfcPausePauseClass5Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass5Counter +func (obj *patternFlowPfcPausePauseClass5) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPfcPausePauseClass5Counter value in the PatternFlowPfcPausePauseClass5 object +func (obj *patternFlowPfcPausePauseClass5) SetDecrement(value PatternFlowPfcPausePauseClass5Counter) PatternFlowPfcPausePauseClass5 { + obj.setChoice(PatternFlowPfcPausePauseClass5Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPfcPausePauseClass5MetricTag +func (obj *patternFlowPfcPausePauseClass5) MetricTags() PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPfcPausePauseClass5MetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter struct { + obj *patternFlowPfcPausePauseClass5 + patternFlowPfcPausePauseClass5MetricTagSlice []PatternFlowPfcPausePauseClass5MetricTag + fieldPtr *[]*otg.PatternFlowPfcPausePauseClass5MetricTag +} + +func newPatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter(ptr *[]*otg.PatternFlowPfcPausePauseClass5MetricTag) PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter { + return &patternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter interface { + setMsg(*patternFlowPfcPausePauseClass5) PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter + Items() []PatternFlowPfcPausePauseClass5MetricTag + Add() PatternFlowPfcPausePauseClass5MetricTag + Append(items ...PatternFlowPfcPausePauseClass5MetricTag) PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter + Set(index int, newObj PatternFlowPfcPausePauseClass5MetricTag) PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter + Clear() PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter + clearHolderSlice() PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter + appendHolderSlice(item PatternFlowPfcPausePauseClass5MetricTag) PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter +} + +func (obj *patternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter) setMsg(msg *patternFlowPfcPausePauseClass5) PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPfcPausePauseClass5MetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter) Items() []PatternFlowPfcPausePauseClass5MetricTag { + return obj.patternFlowPfcPausePauseClass5MetricTagSlice +} + +func (obj *patternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter) Add() PatternFlowPfcPausePauseClass5MetricTag { + newObj := &otg.PatternFlowPfcPausePauseClass5MetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPfcPausePauseClass5MetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPfcPausePauseClass5MetricTagSlice = append(obj.patternFlowPfcPausePauseClass5MetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter) Append(items ...PatternFlowPfcPausePauseClass5MetricTag) PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPfcPausePauseClass5MetricTagSlice = append(obj.patternFlowPfcPausePauseClass5MetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter) Set(index int, newObj PatternFlowPfcPausePauseClass5MetricTag) PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPfcPausePauseClass5MetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter) Clear() PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPfcPausePauseClass5MetricTag{} + obj.patternFlowPfcPausePauseClass5MetricTagSlice = []PatternFlowPfcPausePauseClass5MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter) clearHolderSlice() PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter { + if len(obj.patternFlowPfcPausePauseClass5MetricTagSlice) > 0 { + obj.patternFlowPfcPausePauseClass5MetricTagSlice = []PatternFlowPfcPausePauseClass5MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter) appendHolderSlice(item PatternFlowPfcPausePauseClass5MetricTag) PatternFlowPfcPausePauseClass5PatternFlowPfcPausePauseClass5MetricTagIter { + obj.patternFlowPfcPausePauseClass5MetricTagSlice = append(obj.patternFlowPfcPausePauseClass5MetricTagSlice, item) + return obj +} + +func (obj *patternFlowPfcPausePauseClass5) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass5.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowPfcPausePauseClass5.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPfcPausePauseClass5MetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass5) setDefault() { + var choices_set int = 0 + var choice PatternFlowPfcPausePauseClass5ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass5Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass5Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass5Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass5Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPfcPausePauseClass5Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPfcPausePauseClass5") + } + } else { + intVal := otg.PatternFlowPfcPausePauseClass5_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPfcPausePauseClass5_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class5_counter.go b/gosnappi/pattern_flow_pfc_pause_pause_class5_counter.go new file mode 100644 index 00000000..5ee96401 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class5_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass5Counter ***** +type patternFlowPfcPausePauseClass5Counter struct { + validation + obj *otg.PatternFlowPfcPausePauseClass5Counter + marshaller marshalPatternFlowPfcPausePauseClass5Counter + unMarshaller unMarshalPatternFlowPfcPausePauseClass5Counter +} + +func NewPatternFlowPfcPausePauseClass5Counter() PatternFlowPfcPausePauseClass5Counter { + obj := patternFlowPfcPausePauseClass5Counter{obj: &otg.PatternFlowPfcPausePauseClass5Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass5Counter) msg() *otg.PatternFlowPfcPausePauseClass5Counter { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass5Counter) setMsg(msg *otg.PatternFlowPfcPausePauseClass5Counter) PatternFlowPfcPausePauseClass5Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass5Counter struct { + obj *patternFlowPfcPausePauseClass5Counter +} + +type marshalPatternFlowPfcPausePauseClass5Counter interface { + // ToProto marshals PatternFlowPfcPausePauseClass5Counter to protobuf object *otg.PatternFlowPfcPausePauseClass5Counter + ToProto() (*otg.PatternFlowPfcPausePauseClass5Counter, error) + // ToPbText marshals PatternFlowPfcPausePauseClass5Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass5Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass5Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass5Counter struct { + obj *patternFlowPfcPausePauseClass5Counter +} + +type unMarshalPatternFlowPfcPausePauseClass5Counter interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass5Counter from protobuf object *otg.PatternFlowPfcPausePauseClass5Counter + FromProto(msg *otg.PatternFlowPfcPausePauseClass5Counter) (PatternFlowPfcPausePauseClass5Counter, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass5Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass5Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass5Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass5Counter) Marshal() marshalPatternFlowPfcPausePauseClass5Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass5Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass5Counter) Unmarshal() unMarshalPatternFlowPfcPausePauseClass5Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass5Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass5Counter) ToProto() (*otg.PatternFlowPfcPausePauseClass5Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass5Counter) FromProto(msg *otg.PatternFlowPfcPausePauseClass5Counter) (PatternFlowPfcPausePauseClass5Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass5Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass5Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass5Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass5Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass5Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass5Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass5Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass5Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass5Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass5Counter) Clone() (PatternFlowPfcPausePauseClass5Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass5Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass5Counter is integer counter pattern +type PatternFlowPfcPausePauseClass5Counter interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass5Counter to protobuf object *otg.PatternFlowPfcPausePauseClass5Counter + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass5Counter + // setMsg unmarshals PatternFlowPfcPausePauseClass5Counter from protobuf object *otg.PatternFlowPfcPausePauseClass5Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass5Counter) PatternFlowPfcPausePauseClass5Counter + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass5Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass5Counter + // validate validates PatternFlowPfcPausePauseClass5Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass5Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowPfcPausePauseClass5Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowPfcPausePauseClass5Counter + SetStart(value uint32) PatternFlowPfcPausePauseClass5Counter + // HasStart checks if Start has been set in PatternFlowPfcPausePauseClass5Counter + HasStart() bool + // Step returns uint32, set in PatternFlowPfcPausePauseClass5Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowPfcPausePauseClass5Counter + SetStep(value uint32) PatternFlowPfcPausePauseClass5Counter + // HasStep checks if Step has been set in PatternFlowPfcPausePauseClass5Counter + HasStep() bool + // Count returns uint32, set in PatternFlowPfcPausePauseClass5Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPfcPausePauseClass5Counter + SetCount(value uint32) PatternFlowPfcPausePauseClass5Counter + // HasCount checks if Count has been set in PatternFlowPfcPausePauseClass5Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass5Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass5Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowPfcPausePauseClass5Counter object +func (obj *patternFlowPfcPausePauseClass5Counter) SetStart(value uint32) PatternFlowPfcPausePauseClass5Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass5Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass5Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowPfcPausePauseClass5Counter object +func (obj *patternFlowPfcPausePauseClass5Counter) SetStep(value uint32) PatternFlowPfcPausePauseClass5Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass5Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass5Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPfcPausePauseClass5Counter object +func (obj *patternFlowPfcPausePauseClass5Counter) SetCount(value uint32) PatternFlowPfcPausePauseClass5Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass5Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass5Counter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass5Counter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass5Counter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass5Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class5_metric_tag.go b/gosnappi/pattern_flow_pfc_pause_pause_class5_metric_tag.go new file mode 100644 index 00000000..452edd00 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class5_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass5MetricTag ***** +type patternFlowPfcPausePauseClass5MetricTag struct { + validation + obj *otg.PatternFlowPfcPausePauseClass5MetricTag + marshaller marshalPatternFlowPfcPausePauseClass5MetricTag + unMarshaller unMarshalPatternFlowPfcPausePauseClass5MetricTag +} + +func NewPatternFlowPfcPausePauseClass5MetricTag() PatternFlowPfcPausePauseClass5MetricTag { + obj := patternFlowPfcPausePauseClass5MetricTag{obj: &otg.PatternFlowPfcPausePauseClass5MetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass5MetricTag) msg() *otg.PatternFlowPfcPausePauseClass5MetricTag { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass5MetricTag) setMsg(msg *otg.PatternFlowPfcPausePauseClass5MetricTag) PatternFlowPfcPausePauseClass5MetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass5MetricTag struct { + obj *patternFlowPfcPausePauseClass5MetricTag +} + +type marshalPatternFlowPfcPausePauseClass5MetricTag interface { + // ToProto marshals PatternFlowPfcPausePauseClass5MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass5MetricTag + ToProto() (*otg.PatternFlowPfcPausePauseClass5MetricTag, error) + // ToPbText marshals PatternFlowPfcPausePauseClass5MetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass5MetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass5MetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass5MetricTag struct { + obj *patternFlowPfcPausePauseClass5MetricTag +} + +type unMarshalPatternFlowPfcPausePauseClass5MetricTag interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass5MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass5MetricTag + FromProto(msg *otg.PatternFlowPfcPausePauseClass5MetricTag) (PatternFlowPfcPausePauseClass5MetricTag, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass5MetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass5MetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass5MetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass5MetricTag) Marshal() marshalPatternFlowPfcPausePauseClass5MetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass5MetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass5MetricTag) Unmarshal() unMarshalPatternFlowPfcPausePauseClass5MetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass5MetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass5MetricTag) ToProto() (*otg.PatternFlowPfcPausePauseClass5MetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass5MetricTag) FromProto(msg *otg.PatternFlowPfcPausePauseClass5MetricTag) (PatternFlowPfcPausePauseClass5MetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass5MetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass5MetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass5MetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass5MetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass5MetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass5MetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass5MetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass5MetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass5MetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass5MetricTag) Clone() (PatternFlowPfcPausePauseClass5MetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass5MetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass5MetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPfcPausePauseClass5MetricTag interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass5MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass5MetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass5MetricTag + // setMsg unmarshals PatternFlowPfcPausePauseClass5MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass5MetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass5MetricTag) PatternFlowPfcPausePauseClass5MetricTag + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass5MetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass5MetricTag + // validate validates PatternFlowPfcPausePauseClass5MetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass5MetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPfcPausePauseClass5MetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPfcPausePauseClass5MetricTag + SetName(value string) PatternFlowPfcPausePauseClass5MetricTag + // Offset returns uint32, set in PatternFlowPfcPausePauseClass5MetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPfcPausePauseClass5MetricTag + SetOffset(value uint32) PatternFlowPfcPausePauseClass5MetricTag + // HasOffset checks if Offset has been set in PatternFlowPfcPausePauseClass5MetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPfcPausePauseClass5MetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPfcPausePauseClass5MetricTag + SetLength(value uint32) PatternFlowPfcPausePauseClass5MetricTag + // HasLength checks if Length has been set in PatternFlowPfcPausePauseClass5MetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPfcPausePauseClass5MetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPfcPausePauseClass5MetricTag object +func (obj *patternFlowPfcPausePauseClass5MetricTag) SetName(value string) PatternFlowPfcPausePauseClass5MetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass5MetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass5MetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPfcPausePauseClass5MetricTag object +func (obj *patternFlowPfcPausePauseClass5MetricTag) SetOffset(value uint32) PatternFlowPfcPausePauseClass5MetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass5MetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass5MetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPfcPausePauseClass5MetricTag object +func (obj *patternFlowPfcPausePauseClass5MetricTag) SetLength(value uint32) PatternFlowPfcPausePauseClass5MetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass5MetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPfcPausePauseClass5MetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass5MetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPfcPausePauseClass5MetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass5MetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class6.go b/gosnappi/pattern_flow_pfc_pause_pause_class6.go new file mode 100644 index 00000000..36645b93 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class6.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass6 ***** +type patternFlowPfcPausePauseClass6 struct { + validation + obj *otg.PatternFlowPfcPausePauseClass6 + marshaller marshalPatternFlowPfcPausePauseClass6 + unMarshaller unMarshalPatternFlowPfcPausePauseClass6 + incrementHolder PatternFlowPfcPausePauseClass6Counter + decrementHolder PatternFlowPfcPausePauseClass6Counter + metricTagsHolder PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter +} + +func NewPatternFlowPfcPausePauseClass6() PatternFlowPfcPausePauseClass6 { + obj := patternFlowPfcPausePauseClass6{obj: &otg.PatternFlowPfcPausePauseClass6{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass6) msg() *otg.PatternFlowPfcPausePauseClass6 { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass6) setMsg(msg *otg.PatternFlowPfcPausePauseClass6) PatternFlowPfcPausePauseClass6 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass6 struct { + obj *patternFlowPfcPausePauseClass6 +} + +type marshalPatternFlowPfcPausePauseClass6 interface { + // ToProto marshals PatternFlowPfcPausePauseClass6 to protobuf object *otg.PatternFlowPfcPausePauseClass6 + ToProto() (*otg.PatternFlowPfcPausePauseClass6, error) + // ToPbText marshals PatternFlowPfcPausePauseClass6 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass6 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass6 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass6 struct { + obj *patternFlowPfcPausePauseClass6 +} + +type unMarshalPatternFlowPfcPausePauseClass6 interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass6 from protobuf object *otg.PatternFlowPfcPausePauseClass6 + FromProto(msg *otg.PatternFlowPfcPausePauseClass6) (PatternFlowPfcPausePauseClass6, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass6 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass6 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass6 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass6) Marshal() marshalPatternFlowPfcPausePauseClass6 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass6{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass6) Unmarshal() unMarshalPatternFlowPfcPausePauseClass6 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass6{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass6) ToProto() (*otg.PatternFlowPfcPausePauseClass6, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass6) FromProto(msg *otg.PatternFlowPfcPausePauseClass6) (PatternFlowPfcPausePauseClass6, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass6) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass6) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass6) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass6) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass6) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass6) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass6) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass6) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass6) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass6) Clone() (PatternFlowPfcPausePauseClass6, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass6() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPfcPausePauseClass6) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPfcPausePauseClass6 is pause class 6 +type PatternFlowPfcPausePauseClass6 interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass6 to protobuf object *otg.PatternFlowPfcPausePauseClass6 + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass6 + // setMsg unmarshals PatternFlowPfcPausePauseClass6 from protobuf object *otg.PatternFlowPfcPausePauseClass6 + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass6) PatternFlowPfcPausePauseClass6 + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass6 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass6 + // validate validates PatternFlowPfcPausePauseClass6 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass6, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPfcPausePauseClass6ChoiceEnum, set in PatternFlowPfcPausePauseClass6 + Choice() PatternFlowPfcPausePauseClass6ChoiceEnum + // setChoice assigns PatternFlowPfcPausePauseClass6ChoiceEnum provided by user to PatternFlowPfcPausePauseClass6 + setChoice(value PatternFlowPfcPausePauseClass6ChoiceEnum) PatternFlowPfcPausePauseClass6 + // HasChoice checks if Choice has been set in PatternFlowPfcPausePauseClass6 + HasChoice() bool + // Value returns uint32, set in PatternFlowPfcPausePauseClass6. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowPfcPausePauseClass6 + SetValue(value uint32) PatternFlowPfcPausePauseClass6 + // HasValue checks if Value has been set in PatternFlowPfcPausePauseClass6 + HasValue() bool + // Values returns []uint32, set in PatternFlowPfcPausePauseClass6. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowPfcPausePauseClass6 + SetValues(value []uint32) PatternFlowPfcPausePauseClass6 + // Increment returns PatternFlowPfcPausePauseClass6Counter, set in PatternFlowPfcPausePauseClass6. + // PatternFlowPfcPausePauseClass6Counter is integer counter pattern + Increment() PatternFlowPfcPausePauseClass6Counter + // SetIncrement assigns PatternFlowPfcPausePauseClass6Counter provided by user to PatternFlowPfcPausePauseClass6. + // PatternFlowPfcPausePauseClass6Counter is integer counter pattern + SetIncrement(value PatternFlowPfcPausePauseClass6Counter) PatternFlowPfcPausePauseClass6 + // HasIncrement checks if Increment has been set in PatternFlowPfcPausePauseClass6 + HasIncrement() bool + // Decrement returns PatternFlowPfcPausePauseClass6Counter, set in PatternFlowPfcPausePauseClass6. + // PatternFlowPfcPausePauseClass6Counter is integer counter pattern + Decrement() PatternFlowPfcPausePauseClass6Counter + // SetDecrement assigns PatternFlowPfcPausePauseClass6Counter provided by user to PatternFlowPfcPausePauseClass6. + // PatternFlowPfcPausePauseClass6Counter is integer counter pattern + SetDecrement(value PatternFlowPfcPausePauseClass6Counter) PatternFlowPfcPausePauseClass6 + // HasDecrement checks if Decrement has been set in PatternFlowPfcPausePauseClass6 + HasDecrement() bool + // MetricTags returns PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIterIter, set in PatternFlowPfcPausePauseClass6 + MetricTags() PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter + setNil() +} + +type PatternFlowPfcPausePauseClass6ChoiceEnum string + +// Enum of Choice on PatternFlowPfcPausePauseClass6 +var PatternFlowPfcPausePauseClass6Choice = struct { + VALUE PatternFlowPfcPausePauseClass6ChoiceEnum + VALUES PatternFlowPfcPausePauseClass6ChoiceEnum + INCREMENT PatternFlowPfcPausePauseClass6ChoiceEnum + DECREMENT PatternFlowPfcPausePauseClass6ChoiceEnum +}{ + VALUE: PatternFlowPfcPausePauseClass6ChoiceEnum("value"), + VALUES: PatternFlowPfcPausePauseClass6ChoiceEnum("values"), + INCREMENT: PatternFlowPfcPausePauseClass6ChoiceEnum("increment"), + DECREMENT: PatternFlowPfcPausePauseClass6ChoiceEnum("decrement"), +} + +func (obj *patternFlowPfcPausePauseClass6) Choice() PatternFlowPfcPausePauseClass6ChoiceEnum { + return PatternFlowPfcPausePauseClass6ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPfcPausePauseClass6) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPfcPausePauseClass6) setChoice(value PatternFlowPfcPausePauseClass6ChoiceEnum) PatternFlowPfcPausePauseClass6 { + intValue, ok := otg.PatternFlowPfcPausePauseClass6_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPfcPausePauseClass6ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPfcPausePauseClass6_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPfcPausePauseClass6Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPfcPausePauseClass6Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPfcPausePauseClass6Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowPfcPausePauseClass6Counter().msg() + } + + if value == PatternFlowPfcPausePauseClass6Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPfcPausePauseClass6Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass6) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPfcPausePauseClass6Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass6) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowPfcPausePauseClass6 object +func (obj *patternFlowPfcPausePauseClass6) SetValue(value uint32) PatternFlowPfcPausePauseClass6 { + obj.setChoice(PatternFlowPfcPausePauseClass6Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowPfcPausePauseClass6) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowPfcPausePauseClass6 object +func (obj *patternFlowPfcPausePauseClass6) SetValues(value []uint32) PatternFlowPfcPausePauseClass6 { + obj.setChoice(PatternFlowPfcPausePauseClass6Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass6Counter +func (obj *patternFlowPfcPausePauseClass6) Increment() PatternFlowPfcPausePauseClass6Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPfcPausePauseClass6Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPfcPausePauseClass6Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass6Counter +func (obj *patternFlowPfcPausePauseClass6) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPfcPausePauseClass6Counter value in the PatternFlowPfcPausePauseClass6 object +func (obj *patternFlowPfcPausePauseClass6) SetIncrement(value PatternFlowPfcPausePauseClass6Counter) PatternFlowPfcPausePauseClass6 { + obj.setChoice(PatternFlowPfcPausePauseClass6Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass6Counter +func (obj *patternFlowPfcPausePauseClass6) Decrement() PatternFlowPfcPausePauseClass6Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPfcPausePauseClass6Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPfcPausePauseClass6Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass6Counter +func (obj *patternFlowPfcPausePauseClass6) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPfcPausePauseClass6Counter value in the PatternFlowPfcPausePauseClass6 object +func (obj *patternFlowPfcPausePauseClass6) SetDecrement(value PatternFlowPfcPausePauseClass6Counter) PatternFlowPfcPausePauseClass6 { + obj.setChoice(PatternFlowPfcPausePauseClass6Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPfcPausePauseClass6MetricTag +func (obj *patternFlowPfcPausePauseClass6) MetricTags() PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPfcPausePauseClass6MetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter struct { + obj *patternFlowPfcPausePauseClass6 + patternFlowPfcPausePauseClass6MetricTagSlice []PatternFlowPfcPausePauseClass6MetricTag + fieldPtr *[]*otg.PatternFlowPfcPausePauseClass6MetricTag +} + +func newPatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter(ptr *[]*otg.PatternFlowPfcPausePauseClass6MetricTag) PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter { + return &patternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter interface { + setMsg(*patternFlowPfcPausePauseClass6) PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter + Items() []PatternFlowPfcPausePauseClass6MetricTag + Add() PatternFlowPfcPausePauseClass6MetricTag + Append(items ...PatternFlowPfcPausePauseClass6MetricTag) PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter + Set(index int, newObj PatternFlowPfcPausePauseClass6MetricTag) PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter + Clear() PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter + clearHolderSlice() PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter + appendHolderSlice(item PatternFlowPfcPausePauseClass6MetricTag) PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter +} + +func (obj *patternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter) setMsg(msg *patternFlowPfcPausePauseClass6) PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPfcPausePauseClass6MetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter) Items() []PatternFlowPfcPausePauseClass6MetricTag { + return obj.patternFlowPfcPausePauseClass6MetricTagSlice +} + +func (obj *patternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter) Add() PatternFlowPfcPausePauseClass6MetricTag { + newObj := &otg.PatternFlowPfcPausePauseClass6MetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPfcPausePauseClass6MetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPfcPausePauseClass6MetricTagSlice = append(obj.patternFlowPfcPausePauseClass6MetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter) Append(items ...PatternFlowPfcPausePauseClass6MetricTag) PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPfcPausePauseClass6MetricTagSlice = append(obj.patternFlowPfcPausePauseClass6MetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter) Set(index int, newObj PatternFlowPfcPausePauseClass6MetricTag) PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPfcPausePauseClass6MetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter) Clear() PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPfcPausePauseClass6MetricTag{} + obj.patternFlowPfcPausePauseClass6MetricTagSlice = []PatternFlowPfcPausePauseClass6MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter) clearHolderSlice() PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter { + if len(obj.patternFlowPfcPausePauseClass6MetricTagSlice) > 0 { + obj.patternFlowPfcPausePauseClass6MetricTagSlice = []PatternFlowPfcPausePauseClass6MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter) appendHolderSlice(item PatternFlowPfcPausePauseClass6MetricTag) PatternFlowPfcPausePauseClass6PatternFlowPfcPausePauseClass6MetricTagIter { + obj.patternFlowPfcPausePauseClass6MetricTagSlice = append(obj.patternFlowPfcPausePauseClass6MetricTagSlice, item) + return obj +} + +func (obj *patternFlowPfcPausePauseClass6) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass6.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowPfcPausePauseClass6.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPfcPausePauseClass6MetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass6) setDefault() { + var choices_set int = 0 + var choice PatternFlowPfcPausePauseClass6ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass6Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass6Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass6Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass6Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPfcPausePauseClass6Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPfcPausePauseClass6") + } + } else { + intVal := otg.PatternFlowPfcPausePauseClass6_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPfcPausePauseClass6_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class6_counter.go b/gosnappi/pattern_flow_pfc_pause_pause_class6_counter.go new file mode 100644 index 00000000..47023254 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class6_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass6Counter ***** +type patternFlowPfcPausePauseClass6Counter struct { + validation + obj *otg.PatternFlowPfcPausePauseClass6Counter + marshaller marshalPatternFlowPfcPausePauseClass6Counter + unMarshaller unMarshalPatternFlowPfcPausePauseClass6Counter +} + +func NewPatternFlowPfcPausePauseClass6Counter() PatternFlowPfcPausePauseClass6Counter { + obj := patternFlowPfcPausePauseClass6Counter{obj: &otg.PatternFlowPfcPausePauseClass6Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass6Counter) msg() *otg.PatternFlowPfcPausePauseClass6Counter { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass6Counter) setMsg(msg *otg.PatternFlowPfcPausePauseClass6Counter) PatternFlowPfcPausePauseClass6Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass6Counter struct { + obj *patternFlowPfcPausePauseClass6Counter +} + +type marshalPatternFlowPfcPausePauseClass6Counter interface { + // ToProto marshals PatternFlowPfcPausePauseClass6Counter to protobuf object *otg.PatternFlowPfcPausePauseClass6Counter + ToProto() (*otg.PatternFlowPfcPausePauseClass6Counter, error) + // ToPbText marshals PatternFlowPfcPausePauseClass6Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass6Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass6Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass6Counter struct { + obj *patternFlowPfcPausePauseClass6Counter +} + +type unMarshalPatternFlowPfcPausePauseClass6Counter interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass6Counter from protobuf object *otg.PatternFlowPfcPausePauseClass6Counter + FromProto(msg *otg.PatternFlowPfcPausePauseClass6Counter) (PatternFlowPfcPausePauseClass6Counter, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass6Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass6Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass6Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass6Counter) Marshal() marshalPatternFlowPfcPausePauseClass6Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass6Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass6Counter) Unmarshal() unMarshalPatternFlowPfcPausePauseClass6Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass6Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass6Counter) ToProto() (*otg.PatternFlowPfcPausePauseClass6Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass6Counter) FromProto(msg *otg.PatternFlowPfcPausePauseClass6Counter) (PatternFlowPfcPausePauseClass6Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass6Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass6Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass6Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass6Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass6Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass6Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass6Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass6Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass6Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass6Counter) Clone() (PatternFlowPfcPausePauseClass6Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass6Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass6Counter is integer counter pattern +type PatternFlowPfcPausePauseClass6Counter interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass6Counter to protobuf object *otg.PatternFlowPfcPausePauseClass6Counter + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass6Counter + // setMsg unmarshals PatternFlowPfcPausePauseClass6Counter from protobuf object *otg.PatternFlowPfcPausePauseClass6Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass6Counter) PatternFlowPfcPausePauseClass6Counter + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass6Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass6Counter + // validate validates PatternFlowPfcPausePauseClass6Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass6Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowPfcPausePauseClass6Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowPfcPausePauseClass6Counter + SetStart(value uint32) PatternFlowPfcPausePauseClass6Counter + // HasStart checks if Start has been set in PatternFlowPfcPausePauseClass6Counter + HasStart() bool + // Step returns uint32, set in PatternFlowPfcPausePauseClass6Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowPfcPausePauseClass6Counter + SetStep(value uint32) PatternFlowPfcPausePauseClass6Counter + // HasStep checks if Step has been set in PatternFlowPfcPausePauseClass6Counter + HasStep() bool + // Count returns uint32, set in PatternFlowPfcPausePauseClass6Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPfcPausePauseClass6Counter + SetCount(value uint32) PatternFlowPfcPausePauseClass6Counter + // HasCount checks if Count has been set in PatternFlowPfcPausePauseClass6Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass6Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass6Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowPfcPausePauseClass6Counter object +func (obj *patternFlowPfcPausePauseClass6Counter) SetStart(value uint32) PatternFlowPfcPausePauseClass6Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass6Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass6Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowPfcPausePauseClass6Counter object +func (obj *patternFlowPfcPausePauseClass6Counter) SetStep(value uint32) PatternFlowPfcPausePauseClass6Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass6Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass6Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPfcPausePauseClass6Counter object +func (obj *patternFlowPfcPausePauseClass6Counter) SetCount(value uint32) PatternFlowPfcPausePauseClass6Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass6Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass6Counter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass6Counter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass6Counter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass6Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class6_metric_tag.go b/gosnappi/pattern_flow_pfc_pause_pause_class6_metric_tag.go new file mode 100644 index 00000000..eb4a0371 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class6_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass6MetricTag ***** +type patternFlowPfcPausePauseClass6MetricTag struct { + validation + obj *otg.PatternFlowPfcPausePauseClass6MetricTag + marshaller marshalPatternFlowPfcPausePauseClass6MetricTag + unMarshaller unMarshalPatternFlowPfcPausePauseClass6MetricTag +} + +func NewPatternFlowPfcPausePauseClass6MetricTag() PatternFlowPfcPausePauseClass6MetricTag { + obj := patternFlowPfcPausePauseClass6MetricTag{obj: &otg.PatternFlowPfcPausePauseClass6MetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass6MetricTag) msg() *otg.PatternFlowPfcPausePauseClass6MetricTag { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass6MetricTag) setMsg(msg *otg.PatternFlowPfcPausePauseClass6MetricTag) PatternFlowPfcPausePauseClass6MetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass6MetricTag struct { + obj *patternFlowPfcPausePauseClass6MetricTag +} + +type marshalPatternFlowPfcPausePauseClass6MetricTag interface { + // ToProto marshals PatternFlowPfcPausePauseClass6MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass6MetricTag + ToProto() (*otg.PatternFlowPfcPausePauseClass6MetricTag, error) + // ToPbText marshals PatternFlowPfcPausePauseClass6MetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass6MetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass6MetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass6MetricTag struct { + obj *patternFlowPfcPausePauseClass6MetricTag +} + +type unMarshalPatternFlowPfcPausePauseClass6MetricTag interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass6MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass6MetricTag + FromProto(msg *otg.PatternFlowPfcPausePauseClass6MetricTag) (PatternFlowPfcPausePauseClass6MetricTag, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass6MetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass6MetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass6MetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass6MetricTag) Marshal() marshalPatternFlowPfcPausePauseClass6MetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass6MetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass6MetricTag) Unmarshal() unMarshalPatternFlowPfcPausePauseClass6MetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass6MetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass6MetricTag) ToProto() (*otg.PatternFlowPfcPausePauseClass6MetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass6MetricTag) FromProto(msg *otg.PatternFlowPfcPausePauseClass6MetricTag) (PatternFlowPfcPausePauseClass6MetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass6MetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass6MetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass6MetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass6MetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass6MetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass6MetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass6MetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass6MetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass6MetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass6MetricTag) Clone() (PatternFlowPfcPausePauseClass6MetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass6MetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass6MetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPfcPausePauseClass6MetricTag interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass6MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass6MetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass6MetricTag + // setMsg unmarshals PatternFlowPfcPausePauseClass6MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass6MetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass6MetricTag) PatternFlowPfcPausePauseClass6MetricTag + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass6MetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass6MetricTag + // validate validates PatternFlowPfcPausePauseClass6MetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass6MetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPfcPausePauseClass6MetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPfcPausePauseClass6MetricTag + SetName(value string) PatternFlowPfcPausePauseClass6MetricTag + // Offset returns uint32, set in PatternFlowPfcPausePauseClass6MetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPfcPausePauseClass6MetricTag + SetOffset(value uint32) PatternFlowPfcPausePauseClass6MetricTag + // HasOffset checks if Offset has been set in PatternFlowPfcPausePauseClass6MetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPfcPausePauseClass6MetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPfcPausePauseClass6MetricTag + SetLength(value uint32) PatternFlowPfcPausePauseClass6MetricTag + // HasLength checks if Length has been set in PatternFlowPfcPausePauseClass6MetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPfcPausePauseClass6MetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPfcPausePauseClass6MetricTag object +func (obj *patternFlowPfcPausePauseClass6MetricTag) SetName(value string) PatternFlowPfcPausePauseClass6MetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass6MetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass6MetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPfcPausePauseClass6MetricTag object +func (obj *patternFlowPfcPausePauseClass6MetricTag) SetOffset(value uint32) PatternFlowPfcPausePauseClass6MetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass6MetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass6MetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPfcPausePauseClass6MetricTag object +func (obj *patternFlowPfcPausePauseClass6MetricTag) SetLength(value uint32) PatternFlowPfcPausePauseClass6MetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass6MetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPfcPausePauseClass6MetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass6MetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPfcPausePauseClass6MetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass6MetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class7.go b/gosnappi/pattern_flow_pfc_pause_pause_class7.go new file mode 100644 index 00000000..feceb320 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class7.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass7 ***** +type patternFlowPfcPausePauseClass7 struct { + validation + obj *otg.PatternFlowPfcPausePauseClass7 + marshaller marshalPatternFlowPfcPausePauseClass7 + unMarshaller unMarshalPatternFlowPfcPausePauseClass7 + incrementHolder PatternFlowPfcPausePauseClass7Counter + decrementHolder PatternFlowPfcPausePauseClass7Counter + metricTagsHolder PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter +} + +func NewPatternFlowPfcPausePauseClass7() PatternFlowPfcPausePauseClass7 { + obj := patternFlowPfcPausePauseClass7{obj: &otg.PatternFlowPfcPausePauseClass7{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass7) msg() *otg.PatternFlowPfcPausePauseClass7 { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass7) setMsg(msg *otg.PatternFlowPfcPausePauseClass7) PatternFlowPfcPausePauseClass7 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass7 struct { + obj *patternFlowPfcPausePauseClass7 +} + +type marshalPatternFlowPfcPausePauseClass7 interface { + // ToProto marshals PatternFlowPfcPausePauseClass7 to protobuf object *otg.PatternFlowPfcPausePauseClass7 + ToProto() (*otg.PatternFlowPfcPausePauseClass7, error) + // ToPbText marshals PatternFlowPfcPausePauseClass7 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass7 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass7 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass7 struct { + obj *patternFlowPfcPausePauseClass7 +} + +type unMarshalPatternFlowPfcPausePauseClass7 interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass7 from protobuf object *otg.PatternFlowPfcPausePauseClass7 + FromProto(msg *otg.PatternFlowPfcPausePauseClass7) (PatternFlowPfcPausePauseClass7, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass7 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass7 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass7 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass7) Marshal() marshalPatternFlowPfcPausePauseClass7 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass7{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass7) Unmarshal() unMarshalPatternFlowPfcPausePauseClass7 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass7{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass7) ToProto() (*otg.PatternFlowPfcPausePauseClass7, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass7) FromProto(msg *otg.PatternFlowPfcPausePauseClass7) (PatternFlowPfcPausePauseClass7, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass7) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass7) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass7) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass7) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass7) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass7) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass7) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass7) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass7) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass7) Clone() (PatternFlowPfcPausePauseClass7, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass7() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPfcPausePauseClass7) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPfcPausePauseClass7 is pause class 7 +type PatternFlowPfcPausePauseClass7 interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass7 to protobuf object *otg.PatternFlowPfcPausePauseClass7 + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass7 + // setMsg unmarshals PatternFlowPfcPausePauseClass7 from protobuf object *otg.PatternFlowPfcPausePauseClass7 + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass7) PatternFlowPfcPausePauseClass7 + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass7 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass7 + // validate validates PatternFlowPfcPausePauseClass7 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass7, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPfcPausePauseClass7ChoiceEnum, set in PatternFlowPfcPausePauseClass7 + Choice() PatternFlowPfcPausePauseClass7ChoiceEnum + // setChoice assigns PatternFlowPfcPausePauseClass7ChoiceEnum provided by user to PatternFlowPfcPausePauseClass7 + setChoice(value PatternFlowPfcPausePauseClass7ChoiceEnum) PatternFlowPfcPausePauseClass7 + // HasChoice checks if Choice has been set in PatternFlowPfcPausePauseClass7 + HasChoice() bool + // Value returns uint32, set in PatternFlowPfcPausePauseClass7. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowPfcPausePauseClass7 + SetValue(value uint32) PatternFlowPfcPausePauseClass7 + // HasValue checks if Value has been set in PatternFlowPfcPausePauseClass7 + HasValue() bool + // Values returns []uint32, set in PatternFlowPfcPausePauseClass7. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowPfcPausePauseClass7 + SetValues(value []uint32) PatternFlowPfcPausePauseClass7 + // Increment returns PatternFlowPfcPausePauseClass7Counter, set in PatternFlowPfcPausePauseClass7. + // PatternFlowPfcPausePauseClass7Counter is integer counter pattern + Increment() PatternFlowPfcPausePauseClass7Counter + // SetIncrement assigns PatternFlowPfcPausePauseClass7Counter provided by user to PatternFlowPfcPausePauseClass7. + // PatternFlowPfcPausePauseClass7Counter is integer counter pattern + SetIncrement(value PatternFlowPfcPausePauseClass7Counter) PatternFlowPfcPausePauseClass7 + // HasIncrement checks if Increment has been set in PatternFlowPfcPausePauseClass7 + HasIncrement() bool + // Decrement returns PatternFlowPfcPausePauseClass7Counter, set in PatternFlowPfcPausePauseClass7. + // PatternFlowPfcPausePauseClass7Counter is integer counter pattern + Decrement() PatternFlowPfcPausePauseClass7Counter + // SetDecrement assigns PatternFlowPfcPausePauseClass7Counter provided by user to PatternFlowPfcPausePauseClass7. + // PatternFlowPfcPausePauseClass7Counter is integer counter pattern + SetDecrement(value PatternFlowPfcPausePauseClass7Counter) PatternFlowPfcPausePauseClass7 + // HasDecrement checks if Decrement has been set in PatternFlowPfcPausePauseClass7 + HasDecrement() bool + // MetricTags returns PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIterIter, set in PatternFlowPfcPausePauseClass7 + MetricTags() PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter + setNil() +} + +type PatternFlowPfcPausePauseClass7ChoiceEnum string + +// Enum of Choice on PatternFlowPfcPausePauseClass7 +var PatternFlowPfcPausePauseClass7Choice = struct { + VALUE PatternFlowPfcPausePauseClass7ChoiceEnum + VALUES PatternFlowPfcPausePauseClass7ChoiceEnum + INCREMENT PatternFlowPfcPausePauseClass7ChoiceEnum + DECREMENT PatternFlowPfcPausePauseClass7ChoiceEnum +}{ + VALUE: PatternFlowPfcPausePauseClass7ChoiceEnum("value"), + VALUES: PatternFlowPfcPausePauseClass7ChoiceEnum("values"), + INCREMENT: PatternFlowPfcPausePauseClass7ChoiceEnum("increment"), + DECREMENT: PatternFlowPfcPausePauseClass7ChoiceEnum("decrement"), +} + +func (obj *patternFlowPfcPausePauseClass7) Choice() PatternFlowPfcPausePauseClass7ChoiceEnum { + return PatternFlowPfcPausePauseClass7ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPfcPausePauseClass7) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPfcPausePauseClass7) setChoice(value PatternFlowPfcPausePauseClass7ChoiceEnum) PatternFlowPfcPausePauseClass7 { + intValue, ok := otg.PatternFlowPfcPausePauseClass7_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPfcPausePauseClass7ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPfcPausePauseClass7_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPfcPausePauseClass7Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPfcPausePauseClass7Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPfcPausePauseClass7Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowPfcPausePauseClass7Counter().msg() + } + + if value == PatternFlowPfcPausePauseClass7Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPfcPausePauseClass7Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass7) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPfcPausePauseClass7Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPfcPausePauseClass7) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowPfcPausePauseClass7 object +func (obj *patternFlowPfcPausePauseClass7) SetValue(value uint32) PatternFlowPfcPausePauseClass7 { + obj.setChoice(PatternFlowPfcPausePauseClass7Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowPfcPausePauseClass7) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowPfcPausePauseClass7 object +func (obj *patternFlowPfcPausePauseClass7) SetValues(value []uint32) PatternFlowPfcPausePauseClass7 { + obj.setChoice(PatternFlowPfcPausePauseClass7Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass7Counter +func (obj *patternFlowPfcPausePauseClass7) Increment() PatternFlowPfcPausePauseClass7Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPfcPausePauseClass7Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPfcPausePauseClass7Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPfcPausePauseClass7Counter +func (obj *patternFlowPfcPausePauseClass7) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPfcPausePauseClass7Counter value in the PatternFlowPfcPausePauseClass7 object +func (obj *patternFlowPfcPausePauseClass7) SetIncrement(value PatternFlowPfcPausePauseClass7Counter) PatternFlowPfcPausePauseClass7 { + obj.setChoice(PatternFlowPfcPausePauseClass7Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass7Counter +func (obj *patternFlowPfcPausePauseClass7) Decrement() PatternFlowPfcPausePauseClass7Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPfcPausePauseClass7Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPfcPausePauseClass7Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPfcPausePauseClass7Counter +func (obj *patternFlowPfcPausePauseClass7) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPfcPausePauseClass7Counter value in the PatternFlowPfcPausePauseClass7 object +func (obj *patternFlowPfcPausePauseClass7) SetDecrement(value PatternFlowPfcPausePauseClass7Counter) PatternFlowPfcPausePauseClass7 { + obj.setChoice(PatternFlowPfcPausePauseClass7Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPfcPausePauseClass7MetricTag +func (obj *patternFlowPfcPausePauseClass7) MetricTags() PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPfcPausePauseClass7MetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter struct { + obj *patternFlowPfcPausePauseClass7 + patternFlowPfcPausePauseClass7MetricTagSlice []PatternFlowPfcPausePauseClass7MetricTag + fieldPtr *[]*otg.PatternFlowPfcPausePauseClass7MetricTag +} + +func newPatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter(ptr *[]*otg.PatternFlowPfcPausePauseClass7MetricTag) PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter { + return &patternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter interface { + setMsg(*patternFlowPfcPausePauseClass7) PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter + Items() []PatternFlowPfcPausePauseClass7MetricTag + Add() PatternFlowPfcPausePauseClass7MetricTag + Append(items ...PatternFlowPfcPausePauseClass7MetricTag) PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter + Set(index int, newObj PatternFlowPfcPausePauseClass7MetricTag) PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter + Clear() PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter + clearHolderSlice() PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter + appendHolderSlice(item PatternFlowPfcPausePauseClass7MetricTag) PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter +} + +func (obj *patternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter) setMsg(msg *patternFlowPfcPausePauseClass7) PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPfcPausePauseClass7MetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter) Items() []PatternFlowPfcPausePauseClass7MetricTag { + return obj.patternFlowPfcPausePauseClass7MetricTagSlice +} + +func (obj *patternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter) Add() PatternFlowPfcPausePauseClass7MetricTag { + newObj := &otg.PatternFlowPfcPausePauseClass7MetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPfcPausePauseClass7MetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPfcPausePauseClass7MetricTagSlice = append(obj.patternFlowPfcPausePauseClass7MetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter) Append(items ...PatternFlowPfcPausePauseClass7MetricTag) PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPfcPausePauseClass7MetricTagSlice = append(obj.patternFlowPfcPausePauseClass7MetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter) Set(index int, newObj PatternFlowPfcPausePauseClass7MetricTag) PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPfcPausePauseClass7MetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter) Clear() PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPfcPausePauseClass7MetricTag{} + obj.patternFlowPfcPausePauseClass7MetricTagSlice = []PatternFlowPfcPausePauseClass7MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter) clearHolderSlice() PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter { + if len(obj.patternFlowPfcPausePauseClass7MetricTagSlice) > 0 { + obj.patternFlowPfcPausePauseClass7MetricTagSlice = []PatternFlowPfcPausePauseClass7MetricTag{} + } + return obj +} +func (obj *patternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter) appendHolderSlice(item PatternFlowPfcPausePauseClass7MetricTag) PatternFlowPfcPausePauseClass7PatternFlowPfcPausePauseClass7MetricTagIter { + obj.patternFlowPfcPausePauseClass7MetricTagSlice = append(obj.patternFlowPfcPausePauseClass7MetricTagSlice, item) + return obj +} + +func (obj *patternFlowPfcPausePauseClass7) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass7.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowPfcPausePauseClass7.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPfcPausePauseClass7MetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass7) setDefault() { + var choices_set int = 0 + var choice PatternFlowPfcPausePauseClass7ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass7Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass7Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass7Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPfcPausePauseClass7Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPfcPausePauseClass7Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPfcPausePauseClass7") + } + } else { + intVal := otg.PatternFlowPfcPausePauseClass7_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPfcPausePauseClass7_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class7_counter.go b/gosnappi/pattern_flow_pfc_pause_pause_class7_counter.go new file mode 100644 index 00000000..fbc235c3 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class7_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass7Counter ***** +type patternFlowPfcPausePauseClass7Counter struct { + validation + obj *otg.PatternFlowPfcPausePauseClass7Counter + marshaller marshalPatternFlowPfcPausePauseClass7Counter + unMarshaller unMarshalPatternFlowPfcPausePauseClass7Counter +} + +func NewPatternFlowPfcPausePauseClass7Counter() PatternFlowPfcPausePauseClass7Counter { + obj := patternFlowPfcPausePauseClass7Counter{obj: &otg.PatternFlowPfcPausePauseClass7Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass7Counter) msg() *otg.PatternFlowPfcPausePauseClass7Counter { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass7Counter) setMsg(msg *otg.PatternFlowPfcPausePauseClass7Counter) PatternFlowPfcPausePauseClass7Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass7Counter struct { + obj *patternFlowPfcPausePauseClass7Counter +} + +type marshalPatternFlowPfcPausePauseClass7Counter interface { + // ToProto marshals PatternFlowPfcPausePauseClass7Counter to protobuf object *otg.PatternFlowPfcPausePauseClass7Counter + ToProto() (*otg.PatternFlowPfcPausePauseClass7Counter, error) + // ToPbText marshals PatternFlowPfcPausePauseClass7Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass7Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass7Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass7Counter struct { + obj *patternFlowPfcPausePauseClass7Counter +} + +type unMarshalPatternFlowPfcPausePauseClass7Counter interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass7Counter from protobuf object *otg.PatternFlowPfcPausePauseClass7Counter + FromProto(msg *otg.PatternFlowPfcPausePauseClass7Counter) (PatternFlowPfcPausePauseClass7Counter, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass7Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass7Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass7Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass7Counter) Marshal() marshalPatternFlowPfcPausePauseClass7Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass7Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass7Counter) Unmarshal() unMarshalPatternFlowPfcPausePauseClass7Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass7Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass7Counter) ToProto() (*otg.PatternFlowPfcPausePauseClass7Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass7Counter) FromProto(msg *otg.PatternFlowPfcPausePauseClass7Counter) (PatternFlowPfcPausePauseClass7Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass7Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass7Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass7Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass7Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass7Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass7Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass7Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass7Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass7Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass7Counter) Clone() (PatternFlowPfcPausePauseClass7Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass7Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass7Counter is integer counter pattern +type PatternFlowPfcPausePauseClass7Counter interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass7Counter to protobuf object *otg.PatternFlowPfcPausePauseClass7Counter + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass7Counter + // setMsg unmarshals PatternFlowPfcPausePauseClass7Counter from protobuf object *otg.PatternFlowPfcPausePauseClass7Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass7Counter) PatternFlowPfcPausePauseClass7Counter + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass7Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass7Counter + // validate validates PatternFlowPfcPausePauseClass7Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass7Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowPfcPausePauseClass7Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowPfcPausePauseClass7Counter + SetStart(value uint32) PatternFlowPfcPausePauseClass7Counter + // HasStart checks if Start has been set in PatternFlowPfcPausePauseClass7Counter + HasStart() bool + // Step returns uint32, set in PatternFlowPfcPausePauseClass7Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowPfcPausePauseClass7Counter + SetStep(value uint32) PatternFlowPfcPausePauseClass7Counter + // HasStep checks if Step has been set in PatternFlowPfcPausePauseClass7Counter + HasStep() bool + // Count returns uint32, set in PatternFlowPfcPausePauseClass7Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPfcPausePauseClass7Counter + SetCount(value uint32) PatternFlowPfcPausePauseClass7Counter + // HasCount checks if Count has been set in PatternFlowPfcPausePauseClass7Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass7Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPfcPausePauseClass7Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowPfcPausePauseClass7Counter object +func (obj *patternFlowPfcPausePauseClass7Counter) SetStart(value uint32) PatternFlowPfcPausePauseClass7Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass7Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPfcPausePauseClass7Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowPfcPausePauseClass7Counter object +func (obj *patternFlowPfcPausePauseClass7Counter) SetStep(value uint32) PatternFlowPfcPausePauseClass7Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass7Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPausePauseClass7Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPfcPausePauseClass7Counter object +func (obj *patternFlowPfcPausePauseClass7Counter) SetCount(value uint32) PatternFlowPfcPausePauseClass7Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass7Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass7Counter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass7Counter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass7Counter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass7Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_pause_class7_metric_tag.go b/gosnappi/pattern_flow_pfc_pause_pause_class7_metric_tag.go new file mode 100644 index 00000000..2452b078 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_pause_class7_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPausePauseClass7MetricTag ***** +type patternFlowPfcPausePauseClass7MetricTag struct { + validation + obj *otg.PatternFlowPfcPausePauseClass7MetricTag + marshaller marshalPatternFlowPfcPausePauseClass7MetricTag + unMarshaller unMarshalPatternFlowPfcPausePauseClass7MetricTag +} + +func NewPatternFlowPfcPausePauseClass7MetricTag() PatternFlowPfcPausePauseClass7MetricTag { + obj := patternFlowPfcPausePauseClass7MetricTag{obj: &otg.PatternFlowPfcPausePauseClass7MetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPausePauseClass7MetricTag) msg() *otg.PatternFlowPfcPausePauseClass7MetricTag { + return obj.obj +} + +func (obj *patternFlowPfcPausePauseClass7MetricTag) setMsg(msg *otg.PatternFlowPfcPausePauseClass7MetricTag) PatternFlowPfcPausePauseClass7MetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPausePauseClass7MetricTag struct { + obj *patternFlowPfcPausePauseClass7MetricTag +} + +type marshalPatternFlowPfcPausePauseClass7MetricTag interface { + // ToProto marshals PatternFlowPfcPausePauseClass7MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass7MetricTag + ToProto() (*otg.PatternFlowPfcPausePauseClass7MetricTag, error) + // ToPbText marshals PatternFlowPfcPausePauseClass7MetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPausePauseClass7MetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPausePauseClass7MetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPausePauseClass7MetricTag struct { + obj *patternFlowPfcPausePauseClass7MetricTag +} + +type unMarshalPatternFlowPfcPausePauseClass7MetricTag interface { + // FromProto unmarshals PatternFlowPfcPausePauseClass7MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass7MetricTag + FromProto(msg *otg.PatternFlowPfcPausePauseClass7MetricTag) (PatternFlowPfcPausePauseClass7MetricTag, error) + // FromPbText unmarshals PatternFlowPfcPausePauseClass7MetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPausePauseClass7MetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPausePauseClass7MetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPausePauseClass7MetricTag) Marshal() marshalPatternFlowPfcPausePauseClass7MetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPausePauseClass7MetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPausePauseClass7MetricTag) Unmarshal() unMarshalPatternFlowPfcPausePauseClass7MetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPausePauseClass7MetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPausePauseClass7MetricTag) ToProto() (*otg.PatternFlowPfcPausePauseClass7MetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass7MetricTag) FromProto(msg *otg.PatternFlowPfcPausePauseClass7MetricTag) (PatternFlowPfcPausePauseClass7MetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPausePauseClass7MetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass7MetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPausePauseClass7MetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass7MetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPausePauseClass7MetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPausePauseClass7MetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPausePauseClass7MetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass7MetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPausePauseClass7MetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPausePauseClass7MetricTag) Clone() (PatternFlowPfcPausePauseClass7MetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPausePauseClass7MetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPausePauseClass7MetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPfcPausePauseClass7MetricTag interface { + Validation + // msg marshals PatternFlowPfcPausePauseClass7MetricTag to protobuf object *otg.PatternFlowPfcPausePauseClass7MetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPfcPausePauseClass7MetricTag + // setMsg unmarshals PatternFlowPfcPausePauseClass7MetricTag from protobuf object *otg.PatternFlowPfcPausePauseClass7MetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPausePauseClass7MetricTag) PatternFlowPfcPausePauseClass7MetricTag + // provides marshal interface + Marshal() marshalPatternFlowPfcPausePauseClass7MetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPausePauseClass7MetricTag + // validate validates PatternFlowPfcPausePauseClass7MetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPausePauseClass7MetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPfcPausePauseClass7MetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPfcPausePauseClass7MetricTag + SetName(value string) PatternFlowPfcPausePauseClass7MetricTag + // Offset returns uint32, set in PatternFlowPfcPausePauseClass7MetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPfcPausePauseClass7MetricTag + SetOffset(value uint32) PatternFlowPfcPausePauseClass7MetricTag + // HasOffset checks if Offset has been set in PatternFlowPfcPausePauseClass7MetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPfcPausePauseClass7MetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPfcPausePauseClass7MetricTag + SetLength(value uint32) PatternFlowPfcPausePauseClass7MetricTag + // HasLength checks if Length has been set in PatternFlowPfcPausePauseClass7MetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPfcPausePauseClass7MetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPfcPausePauseClass7MetricTag object +func (obj *patternFlowPfcPausePauseClass7MetricTag) SetName(value string) PatternFlowPfcPausePauseClass7MetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass7MetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPausePauseClass7MetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPfcPausePauseClass7MetricTag object +func (obj *patternFlowPfcPausePauseClass7MetricTag) SetOffset(value uint32) PatternFlowPfcPausePauseClass7MetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass7MetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPausePauseClass7MetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPfcPausePauseClass7MetricTag object +func (obj *patternFlowPfcPausePauseClass7MetricTag) SetLength(value uint32) PatternFlowPfcPausePauseClass7MetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPfcPausePauseClass7MetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPfcPausePauseClass7MetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPausePauseClass7MetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPfcPausePauseClass7MetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPfcPausePauseClass7MetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_src.go b/gosnappi/pattern_flow_pfc_pause_src.go new file mode 100644 index 00000000..680da33a --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_src.go @@ -0,0 +1,658 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseSrc ***** +type patternFlowPfcPauseSrc struct { + validation + obj *otg.PatternFlowPfcPauseSrc + marshaller marshalPatternFlowPfcPauseSrc + unMarshaller unMarshalPatternFlowPfcPauseSrc + incrementHolder PatternFlowPfcPauseSrcCounter + decrementHolder PatternFlowPfcPauseSrcCounter + metricTagsHolder PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter +} + +func NewPatternFlowPfcPauseSrc() PatternFlowPfcPauseSrc { + obj := patternFlowPfcPauseSrc{obj: &otg.PatternFlowPfcPauseSrc{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseSrc) msg() *otg.PatternFlowPfcPauseSrc { + return obj.obj +} + +func (obj *patternFlowPfcPauseSrc) setMsg(msg *otg.PatternFlowPfcPauseSrc) PatternFlowPfcPauseSrc { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseSrc struct { + obj *patternFlowPfcPauseSrc +} + +type marshalPatternFlowPfcPauseSrc interface { + // ToProto marshals PatternFlowPfcPauseSrc to protobuf object *otg.PatternFlowPfcPauseSrc + ToProto() (*otg.PatternFlowPfcPauseSrc, error) + // ToPbText marshals PatternFlowPfcPauseSrc to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseSrc to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseSrc to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseSrc struct { + obj *patternFlowPfcPauseSrc +} + +type unMarshalPatternFlowPfcPauseSrc interface { + // FromProto unmarshals PatternFlowPfcPauseSrc from protobuf object *otg.PatternFlowPfcPauseSrc + FromProto(msg *otg.PatternFlowPfcPauseSrc) (PatternFlowPfcPauseSrc, error) + // FromPbText unmarshals PatternFlowPfcPauseSrc from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseSrc from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseSrc from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseSrc) Marshal() marshalPatternFlowPfcPauseSrc { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseSrc{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseSrc) Unmarshal() unMarshalPatternFlowPfcPauseSrc { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseSrc{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseSrc) ToProto() (*otg.PatternFlowPfcPauseSrc, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseSrc) FromProto(msg *otg.PatternFlowPfcPauseSrc) (PatternFlowPfcPauseSrc, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseSrc) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseSrc) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseSrc) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseSrc) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseSrc) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseSrc) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseSrc) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseSrc) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseSrc) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseSrc) Clone() (PatternFlowPfcPauseSrc, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseSrc() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPfcPauseSrc) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPfcPauseSrc is source MAC address +type PatternFlowPfcPauseSrc interface { + Validation + // msg marshals PatternFlowPfcPauseSrc to protobuf object *otg.PatternFlowPfcPauseSrc + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseSrc + // setMsg unmarshals PatternFlowPfcPauseSrc from protobuf object *otg.PatternFlowPfcPauseSrc + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseSrc) PatternFlowPfcPauseSrc + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseSrc + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseSrc + // validate validates PatternFlowPfcPauseSrc + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseSrc, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPfcPauseSrcChoiceEnum, set in PatternFlowPfcPauseSrc + Choice() PatternFlowPfcPauseSrcChoiceEnum + // setChoice assigns PatternFlowPfcPauseSrcChoiceEnum provided by user to PatternFlowPfcPauseSrc + setChoice(value PatternFlowPfcPauseSrcChoiceEnum) PatternFlowPfcPauseSrc + // HasChoice checks if Choice has been set in PatternFlowPfcPauseSrc + HasChoice() bool + // Value returns string, set in PatternFlowPfcPauseSrc. + Value() string + // SetValue assigns string provided by user to PatternFlowPfcPauseSrc + SetValue(value string) PatternFlowPfcPauseSrc + // HasValue checks if Value has been set in PatternFlowPfcPauseSrc + HasValue() bool + // Values returns []string, set in PatternFlowPfcPauseSrc. + Values() []string + // SetValues assigns []string provided by user to PatternFlowPfcPauseSrc + SetValues(value []string) PatternFlowPfcPauseSrc + // Increment returns PatternFlowPfcPauseSrcCounter, set in PatternFlowPfcPauseSrc. + // PatternFlowPfcPauseSrcCounter is mac counter pattern + Increment() PatternFlowPfcPauseSrcCounter + // SetIncrement assigns PatternFlowPfcPauseSrcCounter provided by user to PatternFlowPfcPauseSrc. + // PatternFlowPfcPauseSrcCounter is mac counter pattern + SetIncrement(value PatternFlowPfcPauseSrcCounter) PatternFlowPfcPauseSrc + // HasIncrement checks if Increment has been set in PatternFlowPfcPauseSrc + HasIncrement() bool + // Decrement returns PatternFlowPfcPauseSrcCounter, set in PatternFlowPfcPauseSrc. + // PatternFlowPfcPauseSrcCounter is mac counter pattern + Decrement() PatternFlowPfcPauseSrcCounter + // SetDecrement assigns PatternFlowPfcPauseSrcCounter provided by user to PatternFlowPfcPauseSrc. + // PatternFlowPfcPauseSrcCounter is mac counter pattern + SetDecrement(value PatternFlowPfcPauseSrcCounter) PatternFlowPfcPauseSrc + // HasDecrement checks if Decrement has been set in PatternFlowPfcPauseSrc + HasDecrement() bool + // MetricTags returns PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIterIter, set in PatternFlowPfcPauseSrc + MetricTags() PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter + setNil() +} + +type PatternFlowPfcPauseSrcChoiceEnum string + +// Enum of Choice on PatternFlowPfcPauseSrc +var PatternFlowPfcPauseSrcChoice = struct { + VALUE PatternFlowPfcPauseSrcChoiceEnum + VALUES PatternFlowPfcPauseSrcChoiceEnum + INCREMENT PatternFlowPfcPauseSrcChoiceEnum + DECREMENT PatternFlowPfcPauseSrcChoiceEnum +}{ + VALUE: PatternFlowPfcPauseSrcChoiceEnum("value"), + VALUES: PatternFlowPfcPauseSrcChoiceEnum("values"), + INCREMENT: PatternFlowPfcPauseSrcChoiceEnum("increment"), + DECREMENT: PatternFlowPfcPauseSrcChoiceEnum("decrement"), +} + +func (obj *patternFlowPfcPauseSrc) Choice() PatternFlowPfcPauseSrcChoiceEnum { + return PatternFlowPfcPauseSrcChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPfcPauseSrc) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPfcPauseSrc) setChoice(value PatternFlowPfcPauseSrcChoiceEnum) PatternFlowPfcPauseSrc { + intValue, ok := otg.PatternFlowPfcPauseSrc_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPfcPauseSrcChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPfcPauseSrc_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPfcPauseSrcChoice.VALUE { + defaultValue := "00:00:00:00:00:00" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPfcPauseSrcChoice.VALUES { + defaultValue := []string{"00:00:00:00:00:00"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPfcPauseSrcChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowPfcPauseSrcCounter().msg() + } + + if value == PatternFlowPfcPauseSrcChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPfcPauseSrcCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowPfcPauseSrc) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPfcPauseSrcChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowPfcPauseSrc) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowPfcPauseSrc object +func (obj *patternFlowPfcPauseSrc) SetValue(value string) PatternFlowPfcPauseSrc { + obj.setChoice(PatternFlowPfcPauseSrcChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowPfcPauseSrc) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"00:00:00:00:00:00"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowPfcPauseSrc object +func (obj *patternFlowPfcPauseSrc) SetValues(value []string) PatternFlowPfcPauseSrc { + obj.setChoice(PatternFlowPfcPauseSrcChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPfcPauseSrcCounter +func (obj *patternFlowPfcPauseSrc) Increment() PatternFlowPfcPauseSrcCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPfcPauseSrcChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPfcPauseSrcCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPfcPauseSrcCounter +func (obj *patternFlowPfcPauseSrc) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPfcPauseSrcCounter value in the PatternFlowPfcPauseSrc object +func (obj *patternFlowPfcPauseSrc) SetIncrement(value PatternFlowPfcPauseSrcCounter) PatternFlowPfcPauseSrc { + obj.setChoice(PatternFlowPfcPauseSrcChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPfcPauseSrcCounter +func (obj *patternFlowPfcPauseSrc) Decrement() PatternFlowPfcPauseSrcCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPfcPauseSrcChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPfcPauseSrcCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPfcPauseSrcCounter +func (obj *patternFlowPfcPauseSrc) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPfcPauseSrcCounter value in the PatternFlowPfcPauseSrc object +func (obj *patternFlowPfcPauseSrc) SetDecrement(value PatternFlowPfcPauseSrcCounter) PatternFlowPfcPauseSrc { + obj.setChoice(PatternFlowPfcPauseSrcChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPfcPauseSrcMetricTag +func (obj *patternFlowPfcPauseSrc) MetricTags() PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPfcPauseSrcMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter struct { + obj *patternFlowPfcPauseSrc + patternFlowPfcPauseSrcMetricTagSlice []PatternFlowPfcPauseSrcMetricTag + fieldPtr *[]*otg.PatternFlowPfcPauseSrcMetricTag +} + +func newPatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter(ptr *[]*otg.PatternFlowPfcPauseSrcMetricTag) PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter { + return &patternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter interface { + setMsg(*patternFlowPfcPauseSrc) PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter + Items() []PatternFlowPfcPauseSrcMetricTag + Add() PatternFlowPfcPauseSrcMetricTag + Append(items ...PatternFlowPfcPauseSrcMetricTag) PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter + Set(index int, newObj PatternFlowPfcPauseSrcMetricTag) PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter + Clear() PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter + clearHolderSlice() PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter + appendHolderSlice(item PatternFlowPfcPauseSrcMetricTag) PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter +} + +func (obj *patternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter) setMsg(msg *patternFlowPfcPauseSrc) PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPfcPauseSrcMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter) Items() []PatternFlowPfcPauseSrcMetricTag { + return obj.patternFlowPfcPauseSrcMetricTagSlice +} + +func (obj *patternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter) Add() PatternFlowPfcPauseSrcMetricTag { + newObj := &otg.PatternFlowPfcPauseSrcMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPfcPauseSrcMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPfcPauseSrcMetricTagSlice = append(obj.patternFlowPfcPauseSrcMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter) Append(items ...PatternFlowPfcPauseSrcMetricTag) PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPfcPauseSrcMetricTagSlice = append(obj.patternFlowPfcPauseSrcMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter) Set(index int, newObj PatternFlowPfcPauseSrcMetricTag) PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPfcPauseSrcMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter) Clear() PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPfcPauseSrcMetricTag{} + obj.patternFlowPfcPauseSrcMetricTagSlice = []PatternFlowPfcPauseSrcMetricTag{} + } + return obj +} +func (obj *patternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter) clearHolderSlice() PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter { + if len(obj.patternFlowPfcPauseSrcMetricTagSlice) > 0 { + obj.patternFlowPfcPauseSrcMetricTagSlice = []PatternFlowPfcPauseSrcMetricTag{} + } + return obj +} +func (obj *patternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter) appendHolderSlice(item PatternFlowPfcPauseSrcMetricTag) PatternFlowPfcPauseSrcPatternFlowPfcPauseSrcMetricTagIter { + obj.patternFlowPfcPauseSrcMetricTagSlice = append(obj.patternFlowPfcPauseSrcMetricTagSlice, item) + return obj +} + +func (obj *patternFlowPfcPauseSrc) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateMac(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowPfcPauseSrc.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateMacSlice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowPfcPauseSrc.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPfcPauseSrcMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPfcPauseSrc) setDefault() { + var choices_set int = 0 + var choice PatternFlowPfcPauseSrcChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPfcPauseSrcChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPfcPauseSrcChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPfcPauseSrcChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPfcPauseSrcChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPfcPauseSrcChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPfcPauseSrc") + } + } else { + intVal := otg.PatternFlowPfcPauseSrc_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPfcPauseSrc_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_src_counter.go b/gosnappi/pattern_flow_pfc_pause_src_counter.go new file mode 100644 index 00000000..2e8c9abf --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_src_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseSrcCounter ***** +type patternFlowPfcPauseSrcCounter struct { + validation + obj *otg.PatternFlowPfcPauseSrcCounter + marshaller marshalPatternFlowPfcPauseSrcCounter + unMarshaller unMarshalPatternFlowPfcPauseSrcCounter +} + +func NewPatternFlowPfcPauseSrcCounter() PatternFlowPfcPauseSrcCounter { + obj := patternFlowPfcPauseSrcCounter{obj: &otg.PatternFlowPfcPauseSrcCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseSrcCounter) msg() *otg.PatternFlowPfcPauseSrcCounter { + return obj.obj +} + +func (obj *patternFlowPfcPauseSrcCounter) setMsg(msg *otg.PatternFlowPfcPauseSrcCounter) PatternFlowPfcPauseSrcCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseSrcCounter struct { + obj *patternFlowPfcPauseSrcCounter +} + +type marshalPatternFlowPfcPauseSrcCounter interface { + // ToProto marshals PatternFlowPfcPauseSrcCounter to protobuf object *otg.PatternFlowPfcPauseSrcCounter + ToProto() (*otg.PatternFlowPfcPauseSrcCounter, error) + // ToPbText marshals PatternFlowPfcPauseSrcCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseSrcCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseSrcCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseSrcCounter struct { + obj *patternFlowPfcPauseSrcCounter +} + +type unMarshalPatternFlowPfcPauseSrcCounter interface { + // FromProto unmarshals PatternFlowPfcPauseSrcCounter from protobuf object *otg.PatternFlowPfcPauseSrcCounter + FromProto(msg *otg.PatternFlowPfcPauseSrcCounter) (PatternFlowPfcPauseSrcCounter, error) + // FromPbText unmarshals PatternFlowPfcPauseSrcCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseSrcCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseSrcCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseSrcCounter) Marshal() marshalPatternFlowPfcPauseSrcCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseSrcCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseSrcCounter) Unmarshal() unMarshalPatternFlowPfcPauseSrcCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseSrcCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseSrcCounter) ToProto() (*otg.PatternFlowPfcPauseSrcCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseSrcCounter) FromProto(msg *otg.PatternFlowPfcPauseSrcCounter) (PatternFlowPfcPauseSrcCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseSrcCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseSrcCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseSrcCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseSrcCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseSrcCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseSrcCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseSrcCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseSrcCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseSrcCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseSrcCounter) Clone() (PatternFlowPfcPauseSrcCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseSrcCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPauseSrcCounter is mac counter pattern +type PatternFlowPfcPauseSrcCounter interface { + Validation + // msg marshals PatternFlowPfcPauseSrcCounter to protobuf object *otg.PatternFlowPfcPauseSrcCounter + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseSrcCounter + // setMsg unmarshals PatternFlowPfcPauseSrcCounter from protobuf object *otg.PatternFlowPfcPauseSrcCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseSrcCounter) PatternFlowPfcPauseSrcCounter + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseSrcCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseSrcCounter + // validate validates PatternFlowPfcPauseSrcCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseSrcCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowPfcPauseSrcCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowPfcPauseSrcCounter + SetStart(value string) PatternFlowPfcPauseSrcCounter + // HasStart checks if Start has been set in PatternFlowPfcPauseSrcCounter + HasStart() bool + // Step returns string, set in PatternFlowPfcPauseSrcCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowPfcPauseSrcCounter + SetStep(value string) PatternFlowPfcPauseSrcCounter + // HasStep checks if Step has been set in PatternFlowPfcPauseSrcCounter + HasStep() bool + // Count returns uint32, set in PatternFlowPfcPauseSrcCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPfcPauseSrcCounter + SetCount(value uint32) PatternFlowPfcPauseSrcCounter + // HasCount checks if Count has been set in PatternFlowPfcPauseSrcCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowPfcPauseSrcCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowPfcPauseSrcCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowPfcPauseSrcCounter object +func (obj *patternFlowPfcPauseSrcCounter) SetStart(value string) PatternFlowPfcPauseSrcCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowPfcPauseSrcCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowPfcPauseSrcCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowPfcPauseSrcCounter object +func (obj *patternFlowPfcPauseSrcCounter) SetStep(value string) PatternFlowPfcPauseSrcCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPauseSrcCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPfcPauseSrcCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPfcPauseSrcCounter object +func (obj *patternFlowPfcPauseSrcCounter) SetCount(value uint32) PatternFlowPfcPauseSrcCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPfcPauseSrcCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateMac(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowPfcPauseSrcCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateMac(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowPfcPauseSrcCounter.Step")) + } + + } + +} + +func (obj *patternFlowPfcPauseSrcCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("00:00:00:00:00:00") + } + if obj.obj.Step == nil { + obj.SetStep("00:00:00:00:00:01") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_pfc_pause_src_metric_tag.go b/gosnappi/pattern_flow_pfc_pause_src_metric_tag.go new file mode 100644 index 00000000..afbda394 --- /dev/null +++ b/gosnappi/pattern_flow_pfc_pause_src_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPfcPauseSrcMetricTag ***** +type patternFlowPfcPauseSrcMetricTag struct { + validation + obj *otg.PatternFlowPfcPauseSrcMetricTag + marshaller marshalPatternFlowPfcPauseSrcMetricTag + unMarshaller unMarshalPatternFlowPfcPauseSrcMetricTag +} + +func NewPatternFlowPfcPauseSrcMetricTag() PatternFlowPfcPauseSrcMetricTag { + obj := patternFlowPfcPauseSrcMetricTag{obj: &otg.PatternFlowPfcPauseSrcMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPfcPauseSrcMetricTag) msg() *otg.PatternFlowPfcPauseSrcMetricTag { + return obj.obj +} + +func (obj *patternFlowPfcPauseSrcMetricTag) setMsg(msg *otg.PatternFlowPfcPauseSrcMetricTag) PatternFlowPfcPauseSrcMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPfcPauseSrcMetricTag struct { + obj *patternFlowPfcPauseSrcMetricTag +} + +type marshalPatternFlowPfcPauseSrcMetricTag interface { + // ToProto marshals PatternFlowPfcPauseSrcMetricTag to protobuf object *otg.PatternFlowPfcPauseSrcMetricTag + ToProto() (*otg.PatternFlowPfcPauseSrcMetricTag, error) + // ToPbText marshals PatternFlowPfcPauseSrcMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPfcPauseSrcMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPfcPauseSrcMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPfcPauseSrcMetricTag struct { + obj *patternFlowPfcPauseSrcMetricTag +} + +type unMarshalPatternFlowPfcPauseSrcMetricTag interface { + // FromProto unmarshals PatternFlowPfcPauseSrcMetricTag from protobuf object *otg.PatternFlowPfcPauseSrcMetricTag + FromProto(msg *otg.PatternFlowPfcPauseSrcMetricTag) (PatternFlowPfcPauseSrcMetricTag, error) + // FromPbText unmarshals PatternFlowPfcPauseSrcMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPfcPauseSrcMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPfcPauseSrcMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPfcPauseSrcMetricTag) Marshal() marshalPatternFlowPfcPauseSrcMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPfcPauseSrcMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPfcPauseSrcMetricTag) Unmarshal() unMarshalPatternFlowPfcPauseSrcMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPfcPauseSrcMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPfcPauseSrcMetricTag) ToProto() (*otg.PatternFlowPfcPauseSrcMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPfcPauseSrcMetricTag) FromProto(msg *otg.PatternFlowPfcPauseSrcMetricTag) (PatternFlowPfcPauseSrcMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPfcPauseSrcMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPfcPauseSrcMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPfcPauseSrcMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseSrcMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPfcPauseSrcMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPfcPauseSrcMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPfcPauseSrcMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseSrcMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPfcPauseSrcMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPfcPauseSrcMetricTag) Clone() (PatternFlowPfcPauseSrcMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPfcPauseSrcMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPfcPauseSrcMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPfcPauseSrcMetricTag interface { + Validation + // msg marshals PatternFlowPfcPauseSrcMetricTag to protobuf object *otg.PatternFlowPfcPauseSrcMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPfcPauseSrcMetricTag + // setMsg unmarshals PatternFlowPfcPauseSrcMetricTag from protobuf object *otg.PatternFlowPfcPauseSrcMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPfcPauseSrcMetricTag) PatternFlowPfcPauseSrcMetricTag + // provides marshal interface + Marshal() marshalPatternFlowPfcPauseSrcMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPfcPauseSrcMetricTag + // validate validates PatternFlowPfcPauseSrcMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPfcPauseSrcMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPfcPauseSrcMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPfcPauseSrcMetricTag + SetName(value string) PatternFlowPfcPauseSrcMetricTag + // Offset returns uint32, set in PatternFlowPfcPauseSrcMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPfcPauseSrcMetricTag + SetOffset(value uint32) PatternFlowPfcPauseSrcMetricTag + // HasOffset checks if Offset has been set in PatternFlowPfcPauseSrcMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPfcPauseSrcMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPfcPauseSrcMetricTag + SetLength(value uint32) PatternFlowPfcPauseSrcMetricTag + // HasLength checks if Length has been set in PatternFlowPfcPauseSrcMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPfcPauseSrcMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPfcPauseSrcMetricTag object +func (obj *patternFlowPfcPauseSrcMetricTag) SetName(value string) PatternFlowPfcPauseSrcMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPauseSrcMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPfcPauseSrcMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPfcPauseSrcMetricTag object +func (obj *patternFlowPfcPauseSrcMetricTag) SetOffset(value uint32) PatternFlowPfcPauseSrcMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPauseSrcMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPfcPauseSrcMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPfcPauseSrcMetricTag object +func (obj *patternFlowPfcPauseSrcMetricTag) SetLength(value uint32) PatternFlowPfcPauseSrcMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPfcPauseSrcMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPfcPauseSrcMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 47 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPfcPauseSrcMetricTag.Offset <= 47 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 48 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPfcPauseSrcMetricTag.Length <= 48 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPfcPauseSrcMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(48) + } + +} diff --git a/gosnappi/pattern_flow_ppp_address.go b/gosnappi/pattern_flow_ppp_address.go new file mode 100644 index 00000000..343d2329 --- /dev/null +++ b/gosnappi/pattern_flow_ppp_address.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPppAddress ***** +type patternFlowPppAddress struct { + validation + obj *otg.PatternFlowPppAddress + marshaller marshalPatternFlowPppAddress + unMarshaller unMarshalPatternFlowPppAddress + incrementHolder PatternFlowPppAddressCounter + decrementHolder PatternFlowPppAddressCounter + metricTagsHolder PatternFlowPppAddressPatternFlowPppAddressMetricTagIter +} + +func NewPatternFlowPppAddress() PatternFlowPppAddress { + obj := patternFlowPppAddress{obj: &otg.PatternFlowPppAddress{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPppAddress) msg() *otg.PatternFlowPppAddress { + return obj.obj +} + +func (obj *patternFlowPppAddress) setMsg(msg *otg.PatternFlowPppAddress) PatternFlowPppAddress { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPppAddress struct { + obj *patternFlowPppAddress +} + +type marshalPatternFlowPppAddress interface { + // ToProto marshals PatternFlowPppAddress to protobuf object *otg.PatternFlowPppAddress + ToProto() (*otg.PatternFlowPppAddress, error) + // ToPbText marshals PatternFlowPppAddress to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPppAddress to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPppAddress to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPppAddress struct { + obj *patternFlowPppAddress +} + +type unMarshalPatternFlowPppAddress interface { + // FromProto unmarshals PatternFlowPppAddress from protobuf object *otg.PatternFlowPppAddress + FromProto(msg *otg.PatternFlowPppAddress) (PatternFlowPppAddress, error) + // FromPbText unmarshals PatternFlowPppAddress from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPppAddress from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPppAddress from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPppAddress) Marshal() marshalPatternFlowPppAddress { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPppAddress{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPppAddress) Unmarshal() unMarshalPatternFlowPppAddress { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPppAddress{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPppAddress) ToProto() (*otg.PatternFlowPppAddress, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPppAddress) FromProto(msg *otg.PatternFlowPppAddress) (PatternFlowPppAddress, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPppAddress) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPppAddress) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPppAddress) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppAddress) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPppAddress) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppAddress) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPppAddress) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPppAddress) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPppAddress) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPppAddress) Clone() (PatternFlowPppAddress, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPppAddress() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPppAddress) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPppAddress is pPP address +type PatternFlowPppAddress interface { + Validation + // msg marshals PatternFlowPppAddress to protobuf object *otg.PatternFlowPppAddress + // and doesn't set defaults + msg() *otg.PatternFlowPppAddress + // setMsg unmarshals PatternFlowPppAddress from protobuf object *otg.PatternFlowPppAddress + // and doesn't set defaults + setMsg(*otg.PatternFlowPppAddress) PatternFlowPppAddress + // provides marshal interface + Marshal() marshalPatternFlowPppAddress + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPppAddress + // validate validates PatternFlowPppAddress + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPppAddress, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPppAddressChoiceEnum, set in PatternFlowPppAddress + Choice() PatternFlowPppAddressChoiceEnum + // setChoice assigns PatternFlowPppAddressChoiceEnum provided by user to PatternFlowPppAddress + setChoice(value PatternFlowPppAddressChoiceEnum) PatternFlowPppAddress + // HasChoice checks if Choice has been set in PatternFlowPppAddress + HasChoice() bool + // Value returns uint32, set in PatternFlowPppAddress. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowPppAddress + SetValue(value uint32) PatternFlowPppAddress + // HasValue checks if Value has been set in PatternFlowPppAddress + HasValue() bool + // Values returns []uint32, set in PatternFlowPppAddress. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowPppAddress + SetValues(value []uint32) PatternFlowPppAddress + // Increment returns PatternFlowPppAddressCounter, set in PatternFlowPppAddress. + // PatternFlowPppAddressCounter is integer counter pattern + Increment() PatternFlowPppAddressCounter + // SetIncrement assigns PatternFlowPppAddressCounter provided by user to PatternFlowPppAddress. + // PatternFlowPppAddressCounter is integer counter pattern + SetIncrement(value PatternFlowPppAddressCounter) PatternFlowPppAddress + // HasIncrement checks if Increment has been set in PatternFlowPppAddress + HasIncrement() bool + // Decrement returns PatternFlowPppAddressCounter, set in PatternFlowPppAddress. + // PatternFlowPppAddressCounter is integer counter pattern + Decrement() PatternFlowPppAddressCounter + // SetDecrement assigns PatternFlowPppAddressCounter provided by user to PatternFlowPppAddress. + // PatternFlowPppAddressCounter is integer counter pattern + SetDecrement(value PatternFlowPppAddressCounter) PatternFlowPppAddress + // HasDecrement checks if Decrement has been set in PatternFlowPppAddress + HasDecrement() bool + // MetricTags returns PatternFlowPppAddressPatternFlowPppAddressMetricTagIterIter, set in PatternFlowPppAddress + MetricTags() PatternFlowPppAddressPatternFlowPppAddressMetricTagIter + setNil() +} + +type PatternFlowPppAddressChoiceEnum string + +// Enum of Choice on PatternFlowPppAddress +var PatternFlowPppAddressChoice = struct { + VALUE PatternFlowPppAddressChoiceEnum + VALUES PatternFlowPppAddressChoiceEnum + INCREMENT PatternFlowPppAddressChoiceEnum + DECREMENT PatternFlowPppAddressChoiceEnum +}{ + VALUE: PatternFlowPppAddressChoiceEnum("value"), + VALUES: PatternFlowPppAddressChoiceEnum("values"), + INCREMENT: PatternFlowPppAddressChoiceEnum("increment"), + DECREMENT: PatternFlowPppAddressChoiceEnum("decrement"), +} + +func (obj *patternFlowPppAddress) Choice() PatternFlowPppAddressChoiceEnum { + return PatternFlowPppAddressChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPppAddress) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPppAddress) setChoice(value PatternFlowPppAddressChoiceEnum) PatternFlowPppAddress { + intValue, ok := otg.PatternFlowPppAddress_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPppAddressChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPppAddress_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPppAddressChoice.VALUE { + defaultValue := uint32(255) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPppAddressChoice.VALUES { + defaultValue := []uint32{255} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPppAddressChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowPppAddressCounter().msg() + } + + if value == PatternFlowPppAddressChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPppAddressCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPppAddress) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPppAddressChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPppAddress) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowPppAddress object +func (obj *patternFlowPppAddress) SetValue(value uint32) PatternFlowPppAddress { + obj.setChoice(PatternFlowPppAddressChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowPppAddress) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{255}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowPppAddress object +func (obj *patternFlowPppAddress) SetValues(value []uint32) PatternFlowPppAddress { + obj.setChoice(PatternFlowPppAddressChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPppAddressCounter +func (obj *patternFlowPppAddress) Increment() PatternFlowPppAddressCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPppAddressChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPppAddressCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPppAddressCounter +func (obj *patternFlowPppAddress) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPppAddressCounter value in the PatternFlowPppAddress object +func (obj *patternFlowPppAddress) SetIncrement(value PatternFlowPppAddressCounter) PatternFlowPppAddress { + obj.setChoice(PatternFlowPppAddressChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPppAddressCounter +func (obj *patternFlowPppAddress) Decrement() PatternFlowPppAddressCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPppAddressChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPppAddressCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPppAddressCounter +func (obj *patternFlowPppAddress) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPppAddressCounter value in the PatternFlowPppAddress object +func (obj *patternFlowPppAddress) SetDecrement(value PatternFlowPppAddressCounter) PatternFlowPppAddress { + obj.setChoice(PatternFlowPppAddressChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPppAddressMetricTag +func (obj *patternFlowPppAddress) MetricTags() PatternFlowPppAddressPatternFlowPppAddressMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPppAddressMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPppAddressPatternFlowPppAddressMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPppAddressPatternFlowPppAddressMetricTagIter struct { + obj *patternFlowPppAddress + patternFlowPppAddressMetricTagSlice []PatternFlowPppAddressMetricTag + fieldPtr *[]*otg.PatternFlowPppAddressMetricTag +} + +func newPatternFlowPppAddressPatternFlowPppAddressMetricTagIter(ptr *[]*otg.PatternFlowPppAddressMetricTag) PatternFlowPppAddressPatternFlowPppAddressMetricTagIter { + return &patternFlowPppAddressPatternFlowPppAddressMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPppAddressPatternFlowPppAddressMetricTagIter interface { + setMsg(*patternFlowPppAddress) PatternFlowPppAddressPatternFlowPppAddressMetricTagIter + Items() []PatternFlowPppAddressMetricTag + Add() PatternFlowPppAddressMetricTag + Append(items ...PatternFlowPppAddressMetricTag) PatternFlowPppAddressPatternFlowPppAddressMetricTagIter + Set(index int, newObj PatternFlowPppAddressMetricTag) PatternFlowPppAddressPatternFlowPppAddressMetricTagIter + Clear() PatternFlowPppAddressPatternFlowPppAddressMetricTagIter + clearHolderSlice() PatternFlowPppAddressPatternFlowPppAddressMetricTagIter + appendHolderSlice(item PatternFlowPppAddressMetricTag) PatternFlowPppAddressPatternFlowPppAddressMetricTagIter +} + +func (obj *patternFlowPppAddressPatternFlowPppAddressMetricTagIter) setMsg(msg *patternFlowPppAddress) PatternFlowPppAddressPatternFlowPppAddressMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPppAddressMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPppAddressPatternFlowPppAddressMetricTagIter) Items() []PatternFlowPppAddressMetricTag { + return obj.patternFlowPppAddressMetricTagSlice +} + +func (obj *patternFlowPppAddressPatternFlowPppAddressMetricTagIter) Add() PatternFlowPppAddressMetricTag { + newObj := &otg.PatternFlowPppAddressMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPppAddressMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPppAddressMetricTagSlice = append(obj.patternFlowPppAddressMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPppAddressPatternFlowPppAddressMetricTagIter) Append(items ...PatternFlowPppAddressMetricTag) PatternFlowPppAddressPatternFlowPppAddressMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPppAddressMetricTagSlice = append(obj.patternFlowPppAddressMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPppAddressPatternFlowPppAddressMetricTagIter) Set(index int, newObj PatternFlowPppAddressMetricTag) PatternFlowPppAddressPatternFlowPppAddressMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPppAddressMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPppAddressPatternFlowPppAddressMetricTagIter) Clear() PatternFlowPppAddressPatternFlowPppAddressMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPppAddressMetricTag{} + obj.patternFlowPppAddressMetricTagSlice = []PatternFlowPppAddressMetricTag{} + } + return obj +} +func (obj *patternFlowPppAddressPatternFlowPppAddressMetricTagIter) clearHolderSlice() PatternFlowPppAddressPatternFlowPppAddressMetricTagIter { + if len(obj.patternFlowPppAddressMetricTagSlice) > 0 { + obj.patternFlowPppAddressMetricTagSlice = []PatternFlowPppAddressMetricTag{} + } + return obj +} +func (obj *patternFlowPppAddressPatternFlowPppAddressMetricTagIter) appendHolderSlice(item PatternFlowPppAddressMetricTag) PatternFlowPppAddressPatternFlowPppAddressMetricTagIter { + obj.patternFlowPppAddressMetricTagSlice = append(obj.patternFlowPppAddressMetricTagSlice, item) + return obj +} + +func (obj *patternFlowPppAddress) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppAddress.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowPppAddress.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPppAddressMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPppAddress) setDefault() { + var choices_set int = 0 + var choice PatternFlowPppAddressChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPppAddressChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPppAddressChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPppAddressChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPppAddressChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPppAddressChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPppAddress") + } + } else { + intVal := otg.PatternFlowPppAddress_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPppAddress_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ppp_address_counter.go b/gosnappi/pattern_flow_ppp_address_counter.go new file mode 100644 index 00000000..25e96f89 --- /dev/null +++ b/gosnappi/pattern_flow_ppp_address_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPppAddressCounter ***** +type patternFlowPppAddressCounter struct { + validation + obj *otg.PatternFlowPppAddressCounter + marshaller marshalPatternFlowPppAddressCounter + unMarshaller unMarshalPatternFlowPppAddressCounter +} + +func NewPatternFlowPppAddressCounter() PatternFlowPppAddressCounter { + obj := patternFlowPppAddressCounter{obj: &otg.PatternFlowPppAddressCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPppAddressCounter) msg() *otg.PatternFlowPppAddressCounter { + return obj.obj +} + +func (obj *patternFlowPppAddressCounter) setMsg(msg *otg.PatternFlowPppAddressCounter) PatternFlowPppAddressCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPppAddressCounter struct { + obj *patternFlowPppAddressCounter +} + +type marshalPatternFlowPppAddressCounter interface { + // ToProto marshals PatternFlowPppAddressCounter to protobuf object *otg.PatternFlowPppAddressCounter + ToProto() (*otg.PatternFlowPppAddressCounter, error) + // ToPbText marshals PatternFlowPppAddressCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPppAddressCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPppAddressCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPppAddressCounter struct { + obj *patternFlowPppAddressCounter +} + +type unMarshalPatternFlowPppAddressCounter interface { + // FromProto unmarshals PatternFlowPppAddressCounter from protobuf object *otg.PatternFlowPppAddressCounter + FromProto(msg *otg.PatternFlowPppAddressCounter) (PatternFlowPppAddressCounter, error) + // FromPbText unmarshals PatternFlowPppAddressCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPppAddressCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPppAddressCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPppAddressCounter) Marshal() marshalPatternFlowPppAddressCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPppAddressCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPppAddressCounter) Unmarshal() unMarshalPatternFlowPppAddressCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPppAddressCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPppAddressCounter) ToProto() (*otg.PatternFlowPppAddressCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPppAddressCounter) FromProto(msg *otg.PatternFlowPppAddressCounter) (PatternFlowPppAddressCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPppAddressCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPppAddressCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPppAddressCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppAddressCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPppAddressCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppAddressCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPppAddressCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPppAddressCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPppAddressCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPppAddressCounter) Clone() (PatternFlowPppAddressCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPppAddressCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPppAddressCounter is integer counter pattern +type PatternFlowPppAddressCounter interface { + Validation + // msg marshals PatternFlowPppAddressCounter to protobuf object *otg.PatternFlowPppAddressCounter + // and doesn't set defaults + msg() *otg.PatternFlowPppAddressCounter + // setMsg unmarshals PatternFlowPppAddressCounter from protobuf object *otg.PatternFlowPppAddressCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowPppAddressCounter) PatternFlowPppAddressCounter + // provides marshal interface + Marshal() marshalPatternFlowPppAddressCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPppAddressCounter + // validate validates PatternFlowPppAddressCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPppAddressCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowPppAddressCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowPppAddressCounter + SetStart(value uint32) PatternFlowPppAddressCounter + // HasStart checks if Start has been set in PatternFlowPppAddressCounter + HasStart() bool + // Step returns uint32, set in PatternFlowPppAddressCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowPppAddressCounter + SetStep(value uint32) PatternFlowPppAddressCounter + // HasStep checks if Step has been set in PatternFlowPppAddressCounter + HasStep() bool + // Count returns uint32, set in PatternFlowPppAddressCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPppAddressCounter + SetCount(value uint32) PatternFlowPppAddressCounter + // HasCount checks if Count has been set in PatternFlowPppAddressCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPppAddressCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPppAddressCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowPppAddressCounter object +func (obj *patternFlowPppAddressCounter) SetStart(value uint32) PatternFlowPppAddressCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPppAddressCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPppAddressCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowPppAddressCounter object +func (obj *patternFlowPppAddressCounter) SetStep(value uint32) PatternFlowPppAddressCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPppAddressCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPppAddressCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPppAddressCounter object +func (obj *patternFlowPppAddressCounter) SetCount(value uint32) PatternFlowPppAddressCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPppAddressCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppAddressCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppAddressCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppAddressCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowPppAddressCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(255) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ppp_address_metric_tag.go b/gosnappi/pattern_flow_ppp_address_metric_tag.go new file mode 100644 index 00000000..f58ee7af --- /dev/null +++ b/gosnappi/pattern_flow_ppp_address_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPppAddressMetricTag ***** +type patternFlowPppAddressMetricTag struct { + validation + obj *otg.PatternFlowPppAddressMetricTag + marshaller marshalPatternFlowPppAddressMetricTag + unMarshaller unMarshalPatternFlowPppAddressMetricTag +} + +func NewPatternFlowPppAddressMetricTag() PatternFlowPppAddressMetricTag { + obj := patternFlowPppAddressMetricTag{obj: &otg.PatternFlowPppAddressMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPppAddressMetricTag) msg() *otg.PatternFlowPppAddressMetricTag { + return obj.obj +} + +func (obj *patternFlowPppAddressMetricTag) setMsg(msg *otg.PatternFlowPppAddressMetricTag) PatternFlowPppAddressMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPppAddressMetricTag struct { + obj *patternFlowPppAddressMetricTag +} + +type marshalPatternFlowPppAddressMetricTag interface { + // ToProto marshals PatternFlowPppAddressMetricTag to protobuf object *otg.PatternFlowPppAddressMetricTag + ToProto() (*otg.PatternFlowPppAddressMetricTag, error) + // ToPbText marshals PatternFlowPppAddressMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPppAddressMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPppAddressMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPppAddressMetricTag struct { + obj *patternFlowPppAddressMetricTag +} + +type unMarshalPatternFlowPppAddressMetricTag interface { + // FromProto unmarshals PatternFlowPppAddressMetricTag from protobuf object *otg.PatternFlowPppAddressMetricTag + FromProto(msg *otg.PatternFlowPppAddressMetricTag) (PatternFlowPppAddressMetricTag, error) + // FromPbText unmarshals PatternFlowPppAddressMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPppAddressMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPppAddressMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPppAddressMetricTag) Marshal() marshalPatternFlowPppAddressMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPppAddressMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPppAddressMetricTag) Unmarshal() unMarshalPatternFlowPppAddressMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPppAddressMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPppAddressMetricTag) ToProto() (*otg.PatternFlowPppAddressMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPppAddressMetricTag) FromProto(msg *otg.PatternFlowPppAddressMetricTag) (PatternFlowPppAddressMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPppAddressMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPppAddressMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPppAddressMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppAddressMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPppAddressMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppAddressMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPppAddressMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPppAddressMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPppAddressMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPppAddressMetricTag) Clone() (PatternFlowPppAddressMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPppAddressMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPppAddressMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPppAddressMetricTag interface { + Validation + // msg marshals PatternFlowPppAddressMetricTag to protobuf object *otg.PatternFlowPppAddressMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPppAddressMetricTag + // setMsg unmarshals PatternFlowPppAddressMetricTag from protobuf object *otg.PatternFlowPppAddressMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPppAddressMetricTag) PatternFlowPppAddressMetricTag + // provides marshal interface + Marshal() marshalPatternFlowPppAddressMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPppAddressMetricTag + // validate validates PatternFlowPppAddressMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPppAddressMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPppAddressMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPppAddressMetricTag + SetName(value string) PatternFlowPppAddressMetricTag + // Offset returns uint32, set in PatternFlowPppAddressMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPppAddressMetricTag + SetOffset(value uint32) PatternFlowPppAddressMetricTag + // HasOffset checks if Offset has been set in PatternFlowPppAddressMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPppAddressMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPppAddressMetricTag + SetLength(value uint32) PatternFlowPppAddressMetricTag + // HasLength checks if Length has been set in PatternFlowPppAddressMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPppAddressMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPppAddressMetricTag object +func (obj *patternFlowPppAddressMetricTag) SetName(value string) PatternFlowPppAddressMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPppAddressMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPppAddressMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPppAddressMetricTag object +func (obj *patternFlowPppAddressMetricTag) SetOffset(value uint32) PatternFlowPppAddressMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPppAddressMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPppAddressMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPppAddressMetricTag object +func (obj *patternFlowPppAddressMetricTag) SetLength(value uint32) PatternFlowPppAddressMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPppAddressMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPppAddressMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppAddressMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPppAddressMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPppAddressMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_ppp_control.go b/gosnappi/pattern_flow_ppp_control.go new file mode 100644 index 00000000..f65d3cb4 --- /dev/null +++ b/gosnappi/pattern_flow_ppp_control.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPppControl ***** +type patternFlowPppControl struct { + validation + obj *otg.PatternFlowPppControl + marshaller marshalPatternFlowPppControl + unMarshaller unMarshalPatternFlowPppControl + incrementHolder PatternFlowPppControlCounter + decrementHolder PatternFlowPppControlCounter + metricTagsHolder PatternFlowPppControlPatternFlowPppControlMetricTagIter +} + +func NewPatternFlowPppControl() PatternFlowPppControl { + obj := patternFlowPppControl{obj: &otg.PatternFlowPppControl{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPppControl) msg() *otg.PatternFlowPppControl { + return obj.obj +} + +func (obj *patternFlowPppControl) setMsg(msg *otg.PatternFlowPppControl) PatternFlowPppControl { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPppControl struct { + obj *patternFlowPppControl +} + +type marshalPatternFlowPppControl interface { + // ToProto marshals PatternFlowPppControl to protobuf object *otg.PatternFlowPppControl + ToProto() (*otg.PatternFlowPppControl, error) + // ToPbText marshals PatternFlowPppControl to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPppControl to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPppControl to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPppControl struct { + obj *patternFlowPppControl +} + +type unMarshalPatternFlowPppControl interface { + // FromProto unmarshals PatternFlowPppControl from protobuf object *otg.PatternFlowPppControl + FromProto(msg *otg.PatternFlowPppControl) (PatternFlowPppControl, error) + // FromPbText unmarshals PatternFlowPppControl from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPppControl from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPppControl from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPppControl) Marshal() marshalPatternFlowPppControl { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPppControl{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPppControl) Unmarshal() unMarshalPatternFlowPppControl { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPppControl{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPppControl) ToProto() (*otg.PatternFlowPppControl, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPppControl) FromProto(msg *otg.PatternFlowPppControl) (PatternFlowPppControl, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPppControl) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPppControl) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPppControl) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppControl) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPppControl) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppControl) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPppControl) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPppControl) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPppControl) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPppControl) Clone() (PatternFlowPppControl, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPppControl() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPppControl) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPppControl is pPP control +type PatternFlowPppControl interface { + Validation + // msg marshals PatternFlowPppControl to protobuf object *otg.PatternFlowPppControl + // and doesn't set defaults + msg() *otg.PatternFlowPppControl + // setMsg unmarshals PatternFlowPppControl from protobuf object *otg.PatternFlowPppControl + // and doesn't set defaults + setMsg(*otg.PatternFlowPppControl) PatternFlowPppControl + // provides marshal interface + Marshal() marshalPatternFlowPppControl + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPppControl + // validate validates PatternFlowPppControl + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPppControl, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPppControlChoiceEnum, set in PatternFlowPppControl + Choice() PatternFlowPppControlChoiceEnum + // setChoice assigns PatternFlowPppControlChoiceEnum provided by user to PatternFlowPppControl + setChoice(value PatternFlowPppControlChoiceEnum) PatternFlowPppControl + // HasChoice checks if Choice has been set in PatternFlowPppControl + HasChoice() bool + // Value returns uint32, set in PatternFlowPppControl. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowPppControl + SetValue(value uint32) PatternFlowPppControl + // HasValue checks if Value has been set in PatternFlowPppControl + HasValue() bool + // Values returns []uint32, set in PatternFlowPppControl. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowPppControl + SetValues(value []uint32) PatternFlowPppControl + // Increment returns PatternFlowPppControlCounter, set in PatternFlowPppControl. + // PatternFlowPppControlCounter is integer counter pattern + Increment() PatternFlowPppControlCounter + // SetIncrement assigns PatternFlowPppControlCounter provided by user to PatternFlowPppControl. + // PatternFlowPppControlCounter is integer counter pattern + SetIncrement(value PatternFlowPppControlCounter) PatternFlowPppControl + // HasIncrement checks if Increment has been set in PatternFlowPppControl + HasIncrement() bool + // Decrement returns PatternFlowPppControlCounter, set in PatternFlowPppControl. + // PatternFlowPppControlCounter is integer counter pattern + Decrement() PatternFlowPppControlCounter + // SetDecrement assigns PatternFlowPppControlCounter provided by user to PatternFlowPppControl. + // PatternFlowPppControlCounter is integer counter pattern + SetDecrement(value PatternFlowPppControlCounter) PatternFlowPppControl + // HasDecrement checks if Decrement has been set in PatternFlowPppControl + HasDecrement() bool + // MetricTags returns PatternFlowPppControlPatternFlowPppControlMetricTagIterIter, set in PatternFlowPppControl + MetricTags() PatternFlowPppControlPatternFlowPppControlMetricTagIter + setNil() +} + +type PatternFlowPppControlChoiceEnum string + +// Enum of Choice on PatternFlowPppControl +var PatternFlowPppControlChoice = struct { + VALUE PatternFlowPppControlChoiceEnum + VALUES PatternFlowPppControlChoiceEnum + INCREMENT PatternFlowPppControlChoiceEnum + DECREMENT PatternFlowPppControlChoiceEnum +}{ + VALUE: PatternFlowPppControlChoiceEnum("value"), + VALUES: PatternFlowPppControlChoiceEnum("values"), + INCREMENT: PatternFlowPppControlChoiceEnum("increment"), + DECREMENT: PatternFlowPppControlChoiceEnum("decrement"), +} + +func (obj *patternFlowPppControl) Choice() PatternFlowPppControlChoiceEnum { + return PatternFlowPppControlChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPppControl) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPppControl) setChoice(value PatternFlowPppControlChoiceEnum) PatternFlowPppControl { + intValue, ok := otg.PatternFlowPppControl_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPppControlChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPppControl_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPppControlChoice.VALUE { + defaultValue := uint32(3) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPppControlChoice.VALUES { + defaultValue := []uint32{3} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPppControlChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowPppControlCounter().msg() + } + + if value == PatternFlowPppControlChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPppControlCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPppControl) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPppControlChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPppControl) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowPppControl object +func (obj *patternFlowPppControl) SetValue(value uint32) PatternFlowPppControl { + obj.setChoice(PatternFlowPppControlChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowPppControl) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{3}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowPppControl object +func (obj *patternFlowPppControl) SetValues(value []uint32) PatternFlowPppControl { + obj.setChoice(PatternFlowPppControlChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowPppControlCounter +func (obj *patternFlowPppControl) Increment() PatternFlowPppControlCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPppControlChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPppControlCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPppControlCounter +func (obj *patternFlowPppControl) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPppControlCounter value in the PatternFlowPppControl object +func (obj *patternFlowPppControl) SetIncrement(value PatternFlowPppControlCounter) PatternFlowPppControl { + obj.setChoice(PatternFlowPppControlChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPppControlCounter +func (obj *patternFlowPppControl) Decrement() PatternFlowPppControlCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPppControlChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPppControlCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPppControlCounter +func (obj *patternFlowPppControl) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPppControlCounter value in the PatternFlowPppControl object +func (obj *patternFlowPppControl) SetDecrement(value PatternFlowPppControlCounter) PatternFlowPppControl { + obj.setChoice(PatternFlowPppControlChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPppControlMetricTag +func (obj *patternFlowPppControl) MetricTags() PatternFlowPppControlPatternFlowPppControlMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPppControlMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPppControlPatternFlowPppControlMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPppControlPatternFlowPppControlMetricTagIter struct { + obj *patternFlowPppControl + patternFlowPppControlMetricTagSlice []PatternFlowPppControlMetricTag + fieldPtr *[]*otg.PatternFlowPppControlMetricTag +} + +func newPatternFlowPppControlPatternFlowPppControlMetricTagIter(ptr *[]*otg.PatternFlowPppControlMetricTag) PatternFlowPppControlPatternFlowPppControlMetricTagIter { + return &patternFlowPppControlPatternFlowPppControlMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPppControlPatternFlowPppControlMetricTagIter interface { + setMsg(*patternFlowPppControl) PatternFlowPppControlPatternFlowPppControlMetricTagIter + Items() []PatternFlowPppControlMetricTag + Add() PatternFlowPppControlMetricTag + Append(items ...PatternFlowPppControlMetricTag) PatternFlowPppControlPatternFlowPppControlMetricTagIter + Set(index int, newObj PatternFlowPppControlMetricTag) PatternFlowPppControlPatternFlowPppControlMetricTagIter + Clear() PatternFlowPppControlPatternFlowPppControlMetricTagIter + clearHolderSlice() PatternFlowPppControlPatternFlowPppControlMetricTagIter + appendHolderSlice(item PatternFlowPppControlMetricTag) PatternFlowPppControlPatternFlowPppControlMetricTagIter +} + +func (obj *patternFlowPppControlPatternFlowPppControlMetricTagIter) setMsg(msg *patternFlowPppControl) PatternFlowPppControlPatternFlowPppControlMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPppControlMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPppControlPatternFlowPppControlMetricTagIter) Items() []PatternFlowPppControlMetricTag { + return obj.patternFlowPppControlMetricTagSlice +} + +func (obj *patternFlowPppControlPatternFlowPppControlMetricTagIter) Add() PatternFlowPppControlMetricTag { + newObj := &otg.PatternFlowPppControlMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPppControlMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPppControlMetricTagSlice = append(obj.patternFlowPppControlMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPppControlPatternFlowPppControlMetricTagIter) Append(items ...PatternFlowPppControlMetricTag) PatternFlowPppControlPatternFlowPppControlMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPppControlMetricTagSlice = append(obj.patternFlowPppControlMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPppControlPatternFlowPppControlMetricTagIter) Set(index int, newObj PatternFlowPppControlMetricTag) PatternFlowPppControlPatternFlowPppControlMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPppControlMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPppControlPatternFlowPppControlMetricTagIter) Clear() PatternFlowPppControlPatternFlowPppControlMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPppControlMetricTag{} + obj.patternFlowPppControlMetricTagSlice = []PatternFlowPppControlMetricTag{} + } + return obj +} +func (obj *patternFlowPppControlPatternFlowPppControlMetricTagIter) clearHolderSlice() PatternFlowPppControlPatternFlowPppControlMetricTagIter { + if len(obj.patternFlowPppControlMetricTagSlice) > 0 { + obj.patternFlowPppControlMetricTagSlice = []PatternFlowPppControlMetricTag{} + } + return obj +} +func (obj *patternFlowPppControlPatternFlowPppControlMetricTagIter) appendHolderSlice(item PatternFlowPppControlMetricTag) PatternFlowPppControlPatternFlowPppControlMetricTagIter { + obj.patternFlowPppControlMetricTagSlice = append(obj.patternFlowPppControlMetricTagSlice, item) + return obj +} + +func (obj *patternFlowPppControl) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppControl.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowPppControl.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPppControlMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPppControl) setDefault() { + var choices_set int = 0 + var choice PatternFlowPppControlChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPppControlChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPppControlChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPppControlChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPppControlChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPppControlChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPppControl") + } + } else { + intVal := otg.PatternFlowPppControl_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPppControl_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ppp_control_counter.go b/gosnappi/pattern_flow_ppp_control_counter.go new file mode 100644 index 00000000..60ef8bbb --- /dev/null +++ b/gosnappi/pattern_flow_ppp_control_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPppControlCounter ***** +type patternFlowPppControlCounter struct { + validation + obj *otg.PatternFlowPppControlCounter + marshaller marshalPatternFlowPppControlCounter + unMarshaller unMarshalPatternFlowPppControlCounter +} + +func NewPatternFlowPppControlCounter() PatternFlowPppControlCounter { + obj := patternFlowPppControlCounter{obj: &otg.PatternFlowPppControlCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPppControlCounter) msg() *otg.PatternFlowPppControlCounter { + return obj.obj +} + +func (obj *patternFlowPppControlCounter) setMsg(msg *otg.PatternFlowPppControlCounter) PatternFlowPppControlCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPppControlCounter struct { + obj *patternFlowPppControlCounter +} + +type marshalPatternFlowPppControlCounter interface { + // ToProto marshals PatternFlowPppControlCounter to protobuf object *otg.PatternFlowPppControlCounter + ToProto() (*otg.PatternFlowPppControlCounter, error) + // ToPbText marshals PatternFlowPppControlCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPppControlCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPppControlCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPppControlCounter struct { + obj *patternFlowPppControlCounter +} + +type unMarshalPatternFlowPppControlCounter interface { + // FromProto unmarshals PatternFlowPppControlCounter from protobuf object *otg.PatternFlowPppControlCounter + FromProto(msg *otg.PatternFlowPppControlCounter) (PatternFlowPppControlCounter, error) + // FromPbText unmarshals PatternFlowPppControlCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPppControlCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPppControlCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPppControlCounter) Marshal() marshalPatternFlowPppControlCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPppControlCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPppControlCounter) Unmarshal() unMarshalPatternFlowPppControlCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPppControlCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPppControlCounter) ToProto() (*otg.PatternFlowPppControlCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPppControlCounter) FromProto(msg *otg.PatternFlowPppControlCounter) (PatternFlowPppControlCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPppControlCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPppControlCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPppControlCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppControlCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPppControlCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppControlCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPppControlCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPppControlCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPppControlCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPppControlCounter) Clone() (PatternFlowPppControlCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPppControlCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPppControlCounter is integer counter pattern +type PatternFlowPppControlCounter interface { + Validation + // msg marshals PatternFlowPppControlCounter to protobuf object *otg.PatternFlowPppControlCounter + // and doesn't set defaults + msg() *otg.PatternFlowPppControlCounter + // setMsg unmarshals PatternFlowPppControlCounter from protobuf object *otg.PatternFlowPppControlCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowPppControlCounter) PatternFlowPppControlCounter + // provides marshal interface + Marshal() marshalPatternFlowPppControlCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPppControlCounter + // validate validates PatternFlowPppControlCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPppControlCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowPppControlCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowPppControlCounter + SetStart(value uint32) PatternFlowPppControlCounter + // HasStart checks if Start has been set in PatternFlowPppControlCounter + HasStart() bool + // Step returns uint32, set in PatternFlowPppControlCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowPppControlCounter + SetStep(value uint32) PatternFlowPppControlCounter + // HasStep checks if Step has been set in PatternFlowPppControlCounter + HasStep() bool + // Count returns uint32, set in PatternFlowPppControlCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPppControlCounter + SetCount(value uint32) PatternFlowPppControlCounter + // HasCount checks if Count has been set in PatternFlowPppControlCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPppControlCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPppControlCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowPppControlCounter object +func (obj *patternFlowPppControlCounter) SetStart(value uint32) PatternFlowPppControlCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPppControlCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPppControlCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowPppControlCounter object +func (obj *patternFlowPppControlCounter) SetStep(value uint32) PatternFlowPppControlCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPppControlCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPppControlCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPppControlCounter object +func (obj *patternFlowPppControlCounter) SetCount(value uint32) PatternFlowPppControlCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPppControlCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppControlCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppControlCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppControlCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowPppControlCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(3) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ppp_control_metric_tag.go b/gosnappi/pattern_flow_ppp_control_metric_tag.go new file mode 100644 index 00000000..a928cb33 --- /dev/null +++ b/gosnappi/pattern_flow_ppp_control_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPppControlMetricTag ***** +type patternFlowPppControlMetricTag struct { + validation + obj *otg.PatternFlowPppControlMetricTag + marshaller marshalPatternFlowPppControlMetricTag + unMarshaller unMarshalPatternFlowPppControlMetricTag +} + +func NewPatternFlowPppControlMetricTag() PatternFlowPppControlMetricTag { + obj := patternFlowPppControlMetricTag{obj: &otg.PatternFlowPppControlMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPppControlMetricTag) msg() *otg.PatternFlowPppControlMetricTag { + return obj.obj +} + +func (obj *patternFlowPppControlMetricTag) setMsg(msg *otg.PatternFlowPppControlMetricTag) PatternFlowPppControlMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPppControlMetricTag struct { + obj *patternFlowPppControlMetricTag +} + +type marshalPatternFlowPppControlMetricTag interface { + // ToProto marshals PatternFlowPppControlMetricTag to protobuf object *otg.PatternFlowPppControlMetricTag + ToProto() (*otg.PatternFlowPppControlMetricTag, error) + // ToPbText marshals PatternFlowPppControlMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPppControlMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPppControlMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPppControlMetricTag struct { + obj *patternFlowPppControlMetricTag +} + +type unMarshalPatternFlowPppControlMetricTag interface { + // FromProto unmarshals PatternFlowPppControlMetricTag from protobuf object *otg.PatternFlowPppControlMetricTag + FromProto(msg *otg.PatternFlowPppControlMetricTag) (PatternFlowPppControlMetricTag, error) + // FromPbText unmarshals PatternFlowPppControlMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPppControlMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPppControlMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPppControlMetricTag) Marshal() marshalPatternFlowPppControlMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPppControlMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPppControlMetricTag) Unmarshal() unMarshalPatternFlowPppControlMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPppControlMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPppControlMetricTag) ToProto() (*otg.PatternFlowPppControlMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPppControlMetricTag) FromProto(msg *otg.PatternFlowPppControlMetricTag) (PatternFlowPppControlMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPppControlMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPppControlMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPppControlMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppControlMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPppControlMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppControlMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPppControlMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPppControlMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPppControlMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPppControlMetricTag) Clone() (PatternFlowPppControlMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPppControlMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPppControlMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPppControlMetricTag interface { + Validation + // msg marshals PatternFlowPppControlMetricTag to protobuf object *otg.PatternFlowPppControlMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPppControlMetricTag + // setMsg unmarshals PatternFlowPppControlMetricTag from protobuf object *otg.PatternFlowPppControlMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPppControlMetricTag) PatternFlowPppControlMetricTag + // provides marshal interface + Marshal() marshalPatternFlowPppControlMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPppControlMetricTag + // validate validates PatternFlowPppControlMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPppControlMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPppControlMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPppControlMetricTag + SetName(value string) PatternFlowPppControlMetricTag + // Offset returns uint32, set in PatternFlowPppControlMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPppControlMetricTag + SetOffset(value uint32) PatternFlowPppControlMetricTag + // HasOffset checks if Offset has been set in PatternFlowPppControlMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPppControlMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPppControlMetricTag + SetLength(value uint32) PatternFlowPppControlMetricTag + // HasLength checks if Length has been set in PatternFlowPppControlMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPppControlMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPppControlMetricTag object +func (obj *patternFlowPppControlMetricTag) SetName(value string) PatternFlowPppControlMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPppControlMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPppControlMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPppControlMetricTag object +func (obj *patternFlowPppControlMetricTag) SetOffset(value uint32) PatternFlowPppControlMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPppControlMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPppControlMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPppControlMetricTag object +func (obj *patternFlowPppControlMetricTag) SetLength(value uint32) PatternFlowPppControlMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPppControlMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPppControlMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppControlMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPppControlMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPppControlMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_ppp_protocol_type.go b/gosnappi/pattern_flow_ppp_protocol_type.go new file mode 100644 index 00000000..b407fdac --- /dev/null +++ b/gosnappi/pattern_flow_ppp_protocol_type.go @@ -0,0 +1,712 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPppProtocolType ***** +type patternFlowPppProtocolType struct { + validation + obj *otg.PatternFlowPppProtocolType + marshaller marshalPatternFlowPppProtocolType + unMarshaller unMarshalPatternFlowPppProtocolType + incrementHolder PatternFlowPppProtocolTypeCounter + decrementHolder PatternFlowPppProtocolTypeCounter + metricTagsHolder PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter +} + +func NewPatternFlowPppProtocolType() PatternFlowPppProtocolType { + obj := patternFlowPppProtocolType{obj: &otg.PatternFlowPppProtocolType{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPppProtocolType) msg() *otg.PatternFlowPppProtocolType { + return obj.obj +} + +func (obj *patternFlowPppProtocolType) setMsg(msg *otg.PatternFlowPppProtocolType) PatternFlowPppProtocolType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPppProtocolType struct { + obj *patternFlowPppProtocolType +} + +type marshalPatternFlowPppProtocolType interface { + // ToProto marshals PatternFlowPppProtocolType to protobuf object *otg.PatternFlowPppProtocolType + ToProto() (*otg.PatternFlowPppProtocolType, error) + // ToPbText marshals PatternFlowPppProtocolType to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPppProtocolType to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPppProtocolType to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPppProtocolType struct { + obj *patternFlowPppProtocolType +} + +type unMarshalPatternFlowPppProtocolType interface { + // FromProto unmarshals PatternFlowPppProtocolType from protobuf object *otg.PatternFlowPppProtocolType + FromProto(msg *otg.PatternFlowPppProtocolType) (PatternFlowPppProtocolType, error) + // FromPbText unmarshals PatternFlowPppProtocolType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPppProtocolType from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPppProtocolType from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPppProtocolType) Marshal() marshalPatternFlowPppProtocolType { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPppProtocolType{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPppProtocolType) Unmarshal() unMarshalPatternFlowPppProtocolType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPppProtocolType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPppProtocolType) ToProto() (*otg.PatternFlowPppProtocolType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPppProtocolType) FromProto(msg *otg.PatternFlowPppProtocolType) (PatternFlowPppProtocolType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPppProtocolType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPppProtocolType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPppProtocolType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppProtocolType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPppProtocolType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppProtocolType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPppProtocolType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPppProtocolType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPppProtocolType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPppProtocolType) Clone() (PatternFlowPppProtocolType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPppProtocolType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowPppProtocolType) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowPppProtocolType is pPP protocol type +type PatternFlowPppProtocolType interface { + Validation + // msg marshals PatternFlowPppProtocolType to protobuf object *otg.PatternFlowPppProtocolType + // and doesn't set defaults + msg() *otg.PatternFlowPppProtocolType + // setMsg unmarshals PatternFlowPppProtocolType from protobuf object *otg.PatternFlowPppProtocolType + // and doesn't set defaults + setMsg(*otg.PatternFlowPppProtocolType) PatternFlowPppProtocolType + // provides marshal interface + Marshal() marshalPatternFlowPppProtocolType + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPppProtocolType + // validate validates PatternFlowPppProtocolType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPppProtocolType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowPppProtocolTypeChoiceEnum, set in PatternFlowPppProtocolType + Choice() PatternFlowPppProtocolTypeChoiceEnum + // setChoice assigns PatternFlowPppProtocolTypeChoiceEnum provided by user to PatternFlowPppProtocolType + setChoice(value PatternFlowPppProtocolTypeChoiceEnum) PatternFlowPppProtocolType + // HasChoice checks if Choice has been set in PatternFlowPppProtocolType + HasChoice() bool + // Value returns uint32, set in PatternFlowPppProtocolType. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowPppProtocolType + SetValue(value uint32) PatternFlowPppProtocolType + // HasValue checks if Value has been set in PatternFlowPppProtocolType + HasValue() bool + // Values returns []uint32, set in PatternFlowPppProtocolType. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowPppProtocolType + SetValues(value []uint32) PatternFlowPppProtocolType + // Auto returns uint32, set in PatternFlowPppProtocolType. + Auto() uint32 + // HasAuto checks if Auto has been set in PatternFlowPppProtocolType + HasAuto() bool + // Increment returns PatternFlowPppProtocolTypeCounter, set in PatternFlowPppProtocolType. + // PatternFlowPppProtocolTypeCounter is integer counter pattern + Increment() PatternFlowPppProtocolTypeCounter + // SetIncrement assigns PatternFlowPppProtocolTypeCounter provided by user to PatternFlowPppProtocolType. + // PatternFlowPppProtocolTypeCounter is integer counter pattern + SetIncrement(value PatternFlowPppProtocolTypeCounter) PatternFlowPppProtocolType + // HasIncrement checks if Increment has been set in PatternFlowPppProtocolType + HasIncrement() bool + // Decrement returns PatternFlowPppProtocolTypeCounter, set in PatternFlowPppProtocolType. + // PatternFlowPppProtocolTypeCounter is integer counter pattern + Decrement() PatternFlowPppProtocolTypeCounter + // SetDecrement assigns PatternFlowPppProtocolTypeCounter provided by user to PatternFlowPppProtocolType. + // PatternFlowPppProtocolTypeCounter is integer counter pattern + SetDecrement(value PatternFlowPppProtocolTypeCounter) PatternFlowPppProtocolType + // HasDecrement checks if Decrement has been set in PatternFlowPppProtocolType + HasDecrement() bool + // MetricTags returns PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIterIter, set in PatternFlowPppProtocolType + MetricTags() PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter + setNil() +} + +type PatternFlowPppProtocolTypeChoiceEnum string + +// Enum of Choice on PatternFlowPppProtocolType +var PatternFlowPppProtocolTypeChoice = struct { + VALUE PatternFlowPppProtocolTypeChoiceEnum + VALUES PatternFlowPppProtocolTypeChoiceEnum + AUTO PatternFlowPppProtocolTypeChoiceEnum + INCREMENT PatternFlowPppProtocolTypeChoiceEnum + DECREMENT PatternFlowPppProtocolTypeChoiceEnum +}{ + VALUE: PatternFlowPppProtocolTypeChoiceEnum("value"), + VALUES: PatternFlowPppProtocolTypeChoiceEnum("values"), + AUTO: PatternFlowPppProtocolTypeChoiceEnum("auto"), + INCREMENT: PatternFlowPppProtocolTypeChoiceEnum("increment"), + DECREMENT: PatternFlowPppProtocolTypeChoiceEnum("decrement"), +} + +func (obj *patternFlowPppProtocolType) Choice() PatternFlowPppProtocolTypeChoiceEnum { + return PatternFlowPppProtocolTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowPppProtocolType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowPppProtocolType) setChoice(value PatternFlowPppProtocolTypeChoiceEnum) PatternFlowPppProtocolType { + intValue, ok := otg.PatternFlowPppProtocolType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowPppProtocolTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowPppProtocolType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Auto = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowPppProtocolTypeChoice.VALUE { + defaultValue := uint32(33) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowPppProtocolTypeChoice.VALUES { + defaultValue := []uint32{33} + obj.obj.Values = defaultValue + } + + if value == PatternFlowPppProtocolTypeChoice.AUTO { + defaultValue := uint32(33) + obj.obj.Auto = &defaultValue + } + + if value == PatternFlowPppProtocolTypeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowPppProtocolTypeCounter().msg() + } + + if value == PatternFlowPppProtocolTypeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowPppProtocolTypeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPppProtocolType) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowPppProtocolTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowPppProtocolType) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowPppProtocolType object +func (obj *patternFlowPppProtocolType) SetValue(value uint32) PatternFlowPppProtocolType { + obj.setChoice(PatternFlowPppProtocolTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowPppProtocolType) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{33}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowPppProtocolType object +func (obj *patternFlowPppProtocolType) SetValues(value []uint32) PatternFlowPppProtocolType { + obj.setChoice(PatternFlowPppProtocolTypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowPppProtocolType) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowPppProtocolTypeChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowPppProtocolType) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Increment returns a PatternFlowPppProtocolTypeCounter +func (obj *patternFlowPppProtocolType) Increment() PatternFlowPppProtocolTypeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowPppProtocolTypeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowPppProtocolTypeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowPppProtocolTypeCounter +func (obj *patternFlowPppProtocolType) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowPppProtocolTypeCounter value in the PatternFlowPppProtocolType object +func (obj *patternFlowPppProtocolType) SetIncrement(value PatternFlowPppProtocolTypeCounter) PatternFlowPppProtocolType { + obj.setChoice(PatternFlowPppProtocolTypeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowPppProtocolTypeCounter +func (obj *patternFlowPppProtocolType) Decrement() PatternFlowPppProtocolTypeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowPppProtocolTypeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowPppProtocolTypeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowPppProtocolTypeCounter +func (obj *patternFlowPppProtocolType) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowPppProtocolTypeCounter value in the PatternFlowPppProtocolType object +func (obj *patternFlowPppProtocolType) SetDecrement(value PatternFlowPppProtocolTypeCounter) PatternFlowPppProtocolType { + obj.setChoice(PatternFlowPppProtocolTypeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowPppProtocolTypeMetricTag +func (obj *patternFlowPppProtocolType) MetricTags() PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowPppProtocolTypeMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter struct { + obj *patternFlowPppProtocolType + patternFlowPppProtocolTypeMetricTagSlice []PatternFlowPppProtocolTypeMetricTag + fieldPtr *[]*otg.PatternFlowPppProtocolTypeMetricTag +} + +func newPatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter(ptr *[]*otg.PatternFlowPppProtocolTypeMetricTag) PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter { + return &patternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter interface { + setMsg(*patternFlowPppProtocolType) PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter + Items() []PatternFlowPppProtocolTypeMetricTag + Add() PatternFlowPppProtocolTypeMetricTag + Append(items ...PatternFlowPppProtocolTypeMetricTag) PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter + Set(index int, newObj PatternFlowPppProtocolTypeMetricTag) PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter + Clear() PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter + clearHolderSlice() PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter + appendHolderSlice(item PatternFlowPppProtocolTypeMetricTag) PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter +} + +func (obj *patternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter) setMsg(msg *patternFlowPppProtocolType) PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowPppProtocolTypeMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter) Items() []PatternFlowPppProtocolTypeMetricTag { + return obj.patternFlowPppProtocolTypeMetricTagSlice +} + +func (obj *patternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter) Add() PatternFlowPppProtocolTypeMetricTag { + newObj := &otg.PatternFlowPppProtocolTypeMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowPppProtocolTypeMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowPppProtocolTypeMetricTagSlice = append(obj.patternFlowPppProtocolTypeMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter) Append(items ...PatternFlowPppProtocolTypeMetricTag) PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowPppProtocolTypeMetricTagSlice = append(obj.patternFlowPppProtocolTypeMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter) Set(index int, newObj PatternFlowPppProtocolTypeMetricTag) PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowPppProtocolTypeMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter) Clear() PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowPppProtocolTypeMetricTag{} + obj.patternFlowPppProtocolTypeMetricTagSlice = []PatternFlowPppProtocolTypeMetricTag{} + } + return obj +} +func (obj *patternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter) clearHolderSlice() PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter { + if len(obj.patternFlowPppProtocolTypeMetricTagSlice) > 0 { + obj.patternFlowPppProtocolTypeMetricTagSlice = []PatternFlowPppProtocolTypeMetricTag{} + } + return obj +} +func (obj *patternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter) appendHolderSlice(item PatternFlowPppProtocolTypeMetricTag) PatternFlowPppProtocolTypePatternFlowPppProtocolTypeMetricTagIter { + obj.patternFlowPppProtocolTypeMetricTagSlice = append(obj.patternFlowPppProtocolTypeMetricTagSlice, item) + return obj +} + +func (obj *patternFlowPppProtocolType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppProtocolType.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowPppProtocolType.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Auto != nil { + + if *obj.obj.Auto > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppProtocolType.Auto <= 65535 but Got %d", *obj.obj.Auto)) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowPppProtocolTypeMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowPppProtocolType) setDefault() { + var choices_set int = 0 + var choice PatternFlowPppProtocolTypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowPppProtocolTypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowPppProtocolTypeChoice.VALUES + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowPppProtocolTypeChoice.AUTO + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowPppProtocolTypeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowPppProtocolTypeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowPppProtocolTypeChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowPppProtocolType") + } + } else { + intVal := otg.PatternFlowPppProtocolType_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowPppProtocolType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_ppp_protocol_type_counter.go b/gosnappi/pattern_flow_ppp_protocol_type_counter.go new file mode 100644 index 00000000..d9733dc1 --- /dev/null +++ b/gosnappi/pattern_flow_ppp_protocol_type_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPppProtocolTypeCounter ***** +type patternFlowPppProtocolTypeCounter struct { + validation + obj *otg.PatternFlowPppProtocolTypeCounter + marshaller marshalPatternFlowPppProtocolTypeCounter + unMarshaller unMarshalPatternFlowPppProtocolTypeCounter +} + +func NewPatternFlowPppProtocolTypeCounter() PatternFlowPppProtocolTypeCounter { + obj := patternFlowPppProtocolTypeCounter{obj: &otg.PatternFlowPppProtocolTypeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPppProtocolTypeCounter) msg() *otg.PatternFlowPppProtocolTypeCounter { + return obj.obj +} + +func (obj *patternFlowPppProtocolTypeCounter) setMsg(msg *otg.PatternFlowPppProtocolTypeCounter) PatternFlowPppProtocolTypeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPppProtocolTypeCounter struct { + obj *patternFlowPppProtocolTypeCounter +} + +type marshalPatternFlowPppProtocolTypeCounter interface { + // ToProto marshals PatternFlowPppProtocolTypeCounter to protobuf object *otg.PatternFlowPppProtocolTypeCounter + ToProto() (*otg.PatternFlowPppProtocolTypeCounter, error) + // ToPbText marshals PatternFlowPppProtocolTypeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPppProtocolTypeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPppProtocolTypeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPppProtocolTypeCounter struct { + obj *patternFlowPppProtocolTypeCounter +} + +type unMarshalPatternFlowPppProtocolTypeCounter interface { + // FromProto unmarshals PatternFlowPppProtocolTypeCounter from protobuf object *otg.PatternFlowPppProtocolTypeCounter + FromProto(msg *otg.PatternFlowPppProtocolTypeCounter) (PatternFlowPppProtocolTypeCounter, error) + // FromPbText unmarshals PatternFlowPppProtocolTypeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPppProtocolTypeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPppProtocolTypeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPppProtocolTypeCounter) Marshal() marshalPatternFlowPppProtocolTypeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPppProtocolTypeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPppProtocolTypeCounter) Unmarshal() unMarshalPatternFlowPppProtocolTypeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPppProtocolTypeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPppProtocolTypeCounter) ToProto() (*otg.PatternFlowPppProtocolTypeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPppProtocolTypeCounter) FromProto(msg *otg.PatternFlowPppProtocolTypeCounter) (PatternFlowPppProtocolTypeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPppProtocolTypeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPppProtocolTypeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPppProtocolTypeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppProtocolTypeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPppProtocolTypeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppProtocolTypeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPppProtocolTypeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPppProtocolTypeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPppProtocolTypeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPppProtocolTypeCounter) Clone() (PatternFlowPppProtocolTypeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPppProtocolTypeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPppProtocolTypeCounter is integer counter pattern +type PatternFlowPppProtocolTypeCounter interface { + Validation + // msg marshals PatternFlowPppProtocolTypeCounter to protobuf object *otg.PatternFlowPppProtocolTypeCounter + // and doesn't set defaults + msg() *otg.PatternFlowPppProtocolTypeCounter + // setMsg unmarshals PatternFlowPppProtocolTypeCounter from protobuf object *otg.PatternFlowPppProtocolTypeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowPppProtocolTypeCounter) PatternFlowPppProtocolTypeCounter + // provides marshal interface + Marshal() marshalPatternFlowPppProtocolTypeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPppProtocolTypeCounter + // validate validates PatternFlowPppProtocolTypeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPppProtocolTypeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowPppProtocolTypeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowPppProtocolTypeCounter + SetStart(value uint32) PatternFlowPppProtocolTypeCounter + // HasStart checks if Start has been set in PatternFlowPppProtocolTypeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowPppProtocolTypeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowPppProtocolTypeCounter + SetStep(value uint32) PatternFlowPppProtocolTypeCounter + // HasStep checks if Step has been set in PatternFlowPppProtocolTypeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowPppProtocolTypeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowPppProtocolTypeCounter + SetCount(value uint32) PatternFlowPppProtocolTypeCounter + // HasCount checks if Count has been set in PatternFlowPppProtocolTypeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPppProtocolTypeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowPppProtocolTypeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowPppProtocolTypeCounter object +func (obj *patternFlowPppProtocolTypeCounter) SetStart(value uint32) PatternFlowPppProtocolTypeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPppProtocolTypeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowPppProtocolTypeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowPppProtocolTypeCounter object +func (obj *patternFlowPppProtocolTypeCounter) SetStep(value uint32) PatternFlowPppProtocolTypeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPppProtocolTypeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowPppProtocolTypeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowPppProtocolTypeCounter object +func (obj *patternFlowPppProtocolTypeCounter) SetCount(value uint32) PatternFlowPppProtocolTypeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowPppProtocolTypeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppProtocolTypeCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppProtocolTypeCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppProtocolTypeCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowPppProtocolTypeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(33) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_ppp_protocol_type_metric_tag.go b/gosnappi/pattern_flow_ppp_protocol_type_metric_tag.go new file mode 100644 index 00000000..3de3b9ec --- /dev/null +++ b/gosnappi/pattern_flow_ppp_protocol_type_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowPppProtocolTypeMetricTag ***** +type patternFlowPppProtocolTypeMetricTag struct { + validation + obj *otg.PatternFlowPppProtocolTypeMetricTag + marshaller marshalPatternFlowPppProtocolTypeMetricTag + unMarshaller unMarshalPatternFlowPppProtocolTypeMetricTag +} + +func NewPatternFlowPppProtocolTypeMetricTag() PatternFlowPppProtocolTypeMetricTag { + obj := patternFlowPppProtocolTypeMetricTag{obj: &otg.PatternFlowPppProtocolTypeMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowPppProtocolTypeMetricTag) msg() *otg.PatternFlowPppProtocolTypeMetricTag { + return obj.obj +} + +func (obj *patternFlowPppProtocolTypeMetricTag) setMsg(msg *otg.PatternFlowPppProtocolTypeMetricTag) PatternFlowPppProtocolTypeMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowPppProtocolTypeMetricTag struct { + obj *patternFlowPppProtocolTypeMetricTag +} + +type marshalPatternFlowPppProtocolTypeMetricTag interface { + // ToProto marshals PatternFlowPppProtocolTypeMetricTag to protobuf object *otg.PatternFlowPppProtocolTypeMetricTag + ToProto() (*otg.PatternFlowPppProtocolTypeMetricTag, error) + // ToPbText marshals PatternFlowPppProtocolTypeMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowPppProtocolTypeMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowPppProtocolTypeMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowPppProtocolTypeMetricTag struct { + obj *patternFlowPppProtocolTypeMetricTag +} + +type unMarshalPatternFlowPppProtocolTypeMetricTag interface { + // FromProto unmarshals PatternFlowPppProtocolTypeMetricTag from protobuf object *otg.PatternFlowPppProtocolTypeMetricTag + FromProto(msg *otg.PatternFlowPppProtocolTypeMetricTag) (PatternFlowPppProtocolTypeMetricTag, error) + // FromPbText unmarshals PatternFlowPppProtocolTypeMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowPppProtocolTypeMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowPppProtocolTypeMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowPppProtocolTypeMetricTag) Marshal() marshalPatternFlowPppProtocolTypeMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowPppProtocolTypeMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowPppProtocolTypeMetricTag) Unmarshal() unMarshalPatternFlowPppProtocolTypeMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowPppProtocolTypeMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowPppProtocolTypeMetricTag) ToProto() (*otg.PatternFlowPppProtocolTypeMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowPppProtocolTypeMetricTag) FromProto(msg *otg.PatternFlowPppProtocolTypeMetricTag) (PatternFlowPppProtocolTypeMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowPppProtocolTypeMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowPppProtocolTypeMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowPppProtocolTypeMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppProtocolTypeMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowPppProtocolTypeMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowPppProtocolTypeMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowPppProtocolTypeMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowPppProtocolTypeMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowPppProtocolTypeMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowPppProtocolTypeMetricTag) Clone() (PatternFlowPppProtocolTypeMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowPppProtocolTypeMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowPppProtocolTypeMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowPppProtocolTypeMetricTag interface { + Validation + // msg marshals PatternFlowPppProtocolTypeMetricTag to protobuf object *otg.PatternFlowPppProtocolTypeMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowPppProtocolTypeMetricTag + // setMsg unmarshals PatternFlowPppProtocolTypeMetricTag from protobuf object *otg.PatternFlowPppProtocolTypeMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowPppProtocolTypeMetricTag) PatternFlowPppProtocolTypeMetricTag + // provides marshal interface + Marshal() marshalPatternFlowPppProtocolTypeMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowPppProtocolTypeMetricTag + // validate validates PatternFlowPppProtocolTypeMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowPppProtocolTypeMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowPppProtocolTypeMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowPppProtocolTypeMetricTag + SetName(value string) PatternFlowPppProtocolTypeMetricTag + // Offset returns uint32, set in PatternFlowPppProtocolTypeMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowPppProtocolTypeMetricTag + SetOffset(value uint32) PatternFlowPppProtocolTypeMetricTag + // HasOffset checks if Offset has been set in PatternFlowPppProtocolTypeMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowPppProtocolTypeMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowPppProtocolTypeMetricTag + SetLength(value uint32) PatternFlowPppProtocolTypeMetricTag + // HasLength checks if Length has been set in PatternFlowPppProtocolTypeMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowPppProtocolTypeMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowPppProtocolTypeMetricTag object +func (obj *patternFlowPppProtocolTypeMetricTag) SetName(value string) PatternFlowPppProtocolTypeMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPppProtocolTypeMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowPppProtocolTypeMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowPppProtocolTypeMetricTag object +func (obj *patternFlowPppProtocolTypeMetricTag) SetOffset(value uint32) PatternFlowPppProtocolTypeMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPppProtocolTypeMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowPppProtocolTypeMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowPppProtocolTypeMetricTag object +func (obj *patternFlowPppProtocolTypeMetricTag) SetLength(value uint32) PatternFlowPppProtocolTypeMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowPppProtocolTypeMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowPppProtocolTypeMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowPppProtocolTypeMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowPppProtocolTypeMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowPppProtocolTypeMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_as_number_l_bit.go b/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_as_number_l_bit.go new file mode 100644 index 00000000..5300a186 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_as_number_l_bit.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathExplicitRouteType1ASNumberLBit ***** +type patternFlowRSVPPathExplicitRouteType1ASNumberLBit struct { + validation + obj *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + marshaller marshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBit + unMarshaller unMarshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBit + incrementHolder PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + decrementHolder PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter +} + +func NewPatternFlowRSVPPathExplicitRouteType1ASNumberLBit() PatternFlowRSVPPathExplicitRouteType1ASNumberLBit { + obj := patternFlowRSVPPathExplicitRouteType1ASNumberLBit{obj: &otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) msg() *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit { + return obj.obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) setMsg(msg *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) PatternFlowRSVPPathExplicitRouteType1ASNumberLBit { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBit struct { + obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit +} + +type marshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBit interface { + // ToProto marshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBit to protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + ToProto() (*otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit, error) + // ToPbText marshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBit to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBit to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBit to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBit struct { + obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit +} + +type unMarshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBit interface { + // FromProto unmarshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBit from protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + FromProto(msg *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) (PatternFlowRSVPPathExplicitRouteType1ASNumberLBit, error) + // FromPbText unmarshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBit from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBit from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBit from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) Marshal() marshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBit { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBit{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) Unmarshal() unMarshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBit { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBit{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBit) ToProto() (*otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBit) FromProto(msg *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) (PatternFlowRSVPPathExplicitRouteType1ASNumberLBit, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBit) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBit) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBit) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBit) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBit) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBit) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) Clone() (PatternFlowRSVPPathExplicitRouteType1ASNumberLBit, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathExplicitRouteType1ASNumberLBit() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathExplicitRouteType1ASNumberLBit is the L bit is an attribute of the subobject. The L bit is set if the subobject represents a loose hop in the explicit route. If the bit is not set, the subobject represents a strict hop in the explicit route. +type PatternFlowRSVPPathExplicitRouteType1ASNumberLBit interface { + Validation + // msg marshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBit to protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + // setMsg unmarshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBit from protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit) PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBit + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBit + // validate validates PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathExplicitRouteType1ASNumberLBit, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum, set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + Choice() PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum + // setChoice assigns PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum provided by user to PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + setChoice(value PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum) PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + // HasChoice checks if Choice has been set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBit. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + SetValue(value uint32) PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + // HasValue checks if Value has been set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBit. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + SetValues(value []uint32) PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + // Increment returns PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter, set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBit. + // PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter is integer counter pattern + Increment() PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + // SetIncrement assigns PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter provided by user to PatternFlowRSVPPathExplicitRouteType1ASNumberLBit. + // PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter, set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBit. + // PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter is integer counter pattern + Decrement() PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + // SetDecrement assigns PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter provided by user to PatternFlowRSVPPathExplicitRouteType1ASNumberLBit. + // PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBit + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathExplicitRouteType1ASNumberLBit +var PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice = struct { + VALUE PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum + VALUES PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum + INCREMENT PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum + DECREMENT PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum +}{ + VALUE: PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum("value"), + VALUES: PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) Choice() PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum { + return PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) setChoice(value PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum) PatternFlowRSVPPathExplicitRouteType1ASNumberLBit { + intValue, ok := otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter().msg() + } + + if value == PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathExplicitRouteType1ASNumberLBit object +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) SetValue(value uint32) PatternFlowRSVPPathExplicitRouteType1ASNumberLBit { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathExplicitRouteType1ASNumberLBit object +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) SetValues(value []uint32) PatternFlowRSVPPathExplicitRouteType1ASNumberLBit { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) Increment() PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter value in the PatternFlowRSVPPathExplicitRouteType1ASNumberLBit object +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) SetIncrement(value PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) PatternFlowRSVPPathExplicitRouteType1ASNumberLBit { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) Decrement() PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter value in the PatternFlowRSVPPathExplicitRouteType1ASNumberLBit object +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) SetDecrement(value PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) PatternFlowRSVPPathExplicitRouteType1ASNumberLBit { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathExplicitRouteType1ASNumberLBit.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBit) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1ASNumberLBitChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathExplicitRouteType1ASNumberLBit") + } + } else { + intVal := otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_as_number_l_bit_counter.go b/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_as_number_l_bit_counter.go new file mode 100644 index 00000000..7ec0f593 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_as_number_l_bit_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter ***** +type patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter struct { + validation + obj *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + marshaller marshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + unMarshaller unMarshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter +} + +func NewPatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter() PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter { + obj := patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter{obj: &otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) msg() *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) setMsg(msg *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter struct { + obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter +} + +type marshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter interface { + // ToProto marshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter to protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + ToProto() (*otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter, error) + // ToPbText marshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter struct { + obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter +} + +type unMarshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter interface { + // FromProto unmarshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter from protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + FromProto(msg *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) (PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) Marshal() marshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) Unmarshal() unMarshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) ToProto() (*otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) FromProto(msg *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) (PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) Clone() (PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter is integer counter pattern +type PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter interface { + Validation + // msg marshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter to protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + // setMsg unmarshals PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter from protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + // validate validates PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + SetStart(value uint32) PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + SetStep(value uint32) PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + SetCount(value uint32) PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter object +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) SetStart(value uint32) PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter object +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) SetStep(value uint32) PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter object +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) SetCount(value uint32) PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathExplicitRouteType1ASNumberLBitCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_ipv4_prefix_ipv4_address.go b/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_ipv4_prefix_ipv4_address.go new file mode 100644 index 00000000..bbdb0735 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_ipv4_prefix_ipv4_address.go @@ -0,0 +1,553 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address ***** +type patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address struct { + validation + obj *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + marshaller marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + unMarshaller unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + incrementHolder PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + decrementHolder PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter +} + +func NewPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address { + obj := patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address{obj: &otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) msg() *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address { + return obj.obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) setMsg(msg *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address struct { + obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address +} + +type marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address interface { + // ToProto marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address to protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + ToProto() (*otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address, error) + // ToPbText marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address struct { + obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address +} + +type unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address interface { + // FromProto unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address from protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + FromProto(msg *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address, error) + // FromPbText unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) Marshal() marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) Unmarshal() unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) ToProto() (*otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) FromProto(msg *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) Clone() (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address is this IPv4 address is treated as a prefix based on the prefix length value below. Bits beyond the prefix are ignored on receipt and SHOULD be set to zero on transmission. +type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address interface { + Validation + // msg marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address to protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + // setMsg unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address from protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + // validate validates PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + Choice() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum + // setChoice assigns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + setChoice(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + // HasChoice checks if Choice has been set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + HasChoice() bool + // Value returns string, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address. + Value() string + // SetValue assigns string provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + SetValue(value string) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + // HasValue checks if Value has been set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + HasValue() bool + // Values returns []string, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address. + Values() []string + // SetValues assigns []string provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + SetValues(value []string) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + // Increment returns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address. + // PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter is ipv4 counter pattern + Increment() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + // SetIncrement assigns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address. + // PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter is ipv4 counter pattern + SetIncrement(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address. + // PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter is ipv4 counter pattern + Decrement() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + // SetDecrement assigns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address. + // PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter is ipv4 counter pattern + SetDecrement(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address +var PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice = struct { + VALUE PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum + VALUES PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum + INCREMENT PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum + DECREMENT PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum +}{ + VALUE: PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum("value"), + VALUES: PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) Choice() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum { + return PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) setChoice(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address { + intValue, ok := otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.VALUE { + defaultValue := "0.0.0.0" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.VALUES { + defaultValue := []string{"0.0.0.0"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter().msg() + } + + if value == PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address object +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) SetValue(value string) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"0.0.0.0"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address object +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) SetValues(value []string) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) Increment() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter value in the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address object +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) SetIncrement(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) Decrement() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter value in the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address object +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) SetDecrement(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv4(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateIpv4Slice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address") + } + } else { + intVal := otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_ipv4_prefix_ipv4_address_counter.go b/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_ipv4_prefix_ipv4_address_counter.go new file mode 100644 index 00000000..41352d5d --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_ipv4_prefix_ipv4_address_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter ***** +type patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter struct { + validation + obj *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + marshaller marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + unMarshaller unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter +} + +func NewPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter { + obj := patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter{obj: &otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) msg() *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) setMsg(msg *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter struct { + obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter +} + +type marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter interface { + // ToProto marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter to protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + ToProto() (*otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter, error) + // ToPbText marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter struct { + obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter +} + +type unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter interface { + // FromProto unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter from protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + FromProto(msg *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) Marshal() marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) Unmarshal() unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) ToProto() (*otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) FromProto(msg *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) Clone() (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter is ipv4 counter pattern +type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter interface { + Validation + // msg marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter to protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + // setMsg unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter from protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + // validate validates PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + SetStart(value string) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + HasStart() bool + // Step returns string, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + SetStep(value string) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + SetCount(value uint32) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter object +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) SetStart(value string) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter object +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) SetStep(value string) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter object +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) SetCount(value uint32) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateIpv4(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateIpv4(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter.Step")) + } + + } + +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4AddressCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("0.0.0.0") + } + if obj.obj.Step == nil { + obj.SetStep("0.0.0.1") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_ipv4_prefix_l_bit.go b/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_ipv4_prefix_l_bit.go new file mode 100644 index 00000000..b9df0d4d --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_ipv4_prefix_l_bit.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit ***** +type patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit struct { + validation + obj *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + marshaller marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + unMarshaller unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + incrementHolder PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + decrementHolder PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter +} + +func NewPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit { + obj := patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit{obj: &otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) msg() *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit { + return obj.obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) setMsg(msg *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit struct { + obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit +} + +type marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit interface { + // ToProto marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit to protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + ToProto() (*otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit, error) + // ToPbText marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit struct { + obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit +} + +type unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit interface { + // FromProto unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit from protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + FromProto(msg *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit, error) + // FromPbText unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) Marshal() marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) Unmarshal() unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) ToProto() (*otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) FromProto(msg *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) Clone() (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit is the L bit is an attribute of the subobject. The L bit is set if the subobject represents a loose hop in the explicit route. If the bit is not set, the subobject represents a strict hop in the explicit route. +type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit interface { + Validation + // msg marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit to protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + // setMsg unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit from protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + // validate validates PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + Choice() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum + // setChoice assigns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + setChoice(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + // HasChoice checks if Choice has been set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + SetValue(value uint32) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + // HasValue checks if Value has been set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + SetValues(value []uint32) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + // Increment returns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit. + // PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter is integer counter pattern + Increment() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + // SetIncrement assigns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit. + // PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit. + // PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter is integer counter pattern + Decrement() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + // SetDecrement assigns PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit. + // PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit +var PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice = struct { + VALUE PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum + VALUES PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum + INCREMENT PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum + DECREMENT PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum +}{ + VALUE: PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum("value"), + VALUES: PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) Choice() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum { + return PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) setChoice(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit { + intValue, ok := otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter().msg() + } + + if value == PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit object +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) SetValue(value uint32) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit object +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) SetValues(value []uint32) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) Increment() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter value in the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit object +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) SetIncrement(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) Decrement() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter value in the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit object +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) SetDecrement(value PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit") + } + } else { + intVal := otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_ipv4_prefix_l_bit_counter.go b/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_ipv4_prefix_l_bit_counter.go new file mode 100644 index 00000000..1347218d --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_explicit_route_type1_ipv4_prefix_l_bit_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter ***** +type patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter struct { + validation + obj *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + marshaller marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + unMarshaller unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter +} + +func NewPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter() PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter { + obj := patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter{obj: &otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) msg() *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) setMsg(msg *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter struct { + obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter +} + +type marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter interface { + // ToProto marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter to protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + ToProto() (*otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter, error) + // ToPbText marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter struct { + obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter +} + +type unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter interface { + // FromProto unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter from protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + FromProto(msg *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) Marshal() marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) Unmarshal() unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) ToProto() (*otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) FromProto(msg *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) Clone() (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter is integer counter pattern +type PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter interface { + Validation + // msg marshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter to protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + // setMsg unmarshals PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter from protobuf object *otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + // validate validates PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + SetStart(value uint32) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + SetStep(value uint32) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + SetCount(value uint32) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter object +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) SetStart(value uint32) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter object +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) SetStep(value uint32) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter object +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) SetCount(value uint32) PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBitCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_label_request_without_label_range_l3_pid.go b/gosnappi/pattern_flow_rsvp_path_label_request_without_label_range_l3_pid.go new file mode 100644 index 00000000..c0836330 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_label_request_without_label_range_l3_pid.go @@ -0,0 +1,554 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid ***** +type patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid struct { + validation + obj *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + marshaller marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + unMarshaller unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + incrementHolder PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + decrementHolder PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter +} + +func NewPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid() PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid { + obj := patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid{obj: &otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) msg() *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid { + return obj.obj +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) setMsg(msg *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid struct { + obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid +} + +type marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid interface { + // ToProto marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid to protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + ToProto() (*otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid, error) + // ToPbText marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid struct { + obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid +} + +type unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid interface { + // FromProto unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid from protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + FromProto(msg *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) (PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid, error) + // FromPbText unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) Marshal() marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) Unmarshal() unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) ToProto() (*otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) FromProto(msg *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) (PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) Clone() (PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid is an identifier of the layer 3 protocol using this path. Standard Ethertype values are used e.g. The default value of 2048 ( 0x0800 ) represents Ethertype for IPv4. +type PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid interface { + Validation + // msg marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid to protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + // setMsg unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid from protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + // validate validates PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + Choice() PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum + // setChoice assigns PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + setChoice(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + // HasChoice checks if Choice has been set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + SetValue(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + // HasValue checks if Value has been set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + SetValues(value []uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + // Increment returns PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid. + Increment() PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + // SetIncrement assigns PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid. + SetIncrement(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid. + Decrement() PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + // SetDecrement assigns PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid. + SetDecrement(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid +var PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice = struct { + VALUE PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum + VALUES PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum + INCREMENT PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum + DECREMENT PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum +}{ + VALUE: PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum("value"), + VALUES: PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) Choice() PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum { + return PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) setChoice(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid { + intValue, ok := otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.VALUE { + defaultValue := uint32(2048) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.VALUES { + defaultValue := []uint32{2048} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter().msg() + } + + if value == PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid object +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) SetValue(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{2048}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid object +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) SetValues(value []uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) Increment() PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter value in the PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid object +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) SetIncrement(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) Decrement() PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter value in the PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid object +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) SetDecrement(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid") + } + } else { + intVal := otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3Pid_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_label_request_without_label_range_l3_pid_counter.go b/gosnappi/pattern_flow_rsvp_path_label_request_without_label_range_l3_pid_counter.go new file mode 100644 index 00000000..9cf35295 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_label_request_without_label_range_l3_pid_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter ***** +type patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter struct { + validation + obj *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + marshaller marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + unMarshaller unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter +} + +func NewPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter() PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter { + obj := patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter{obj: &otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) msg() *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) setMsg(msg *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter struct { + obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter +} + +type marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter interface { + // ToProto marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter to protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + ToProto() (*otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter, error) + // ToPbText marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter struct { + obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter +} + +type unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter interface { + // FromProto unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter from protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + FromProto(msg *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) (PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) Marshal() marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) Unmarshal() unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) ToProto() (*otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) FromProto(msg *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) (PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) Clone() (PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter is integer counter pattern +type PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter interface { + Validation + // msg marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter to protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + // setMsg unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter from protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + // validate validates PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + SetStart(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + SetStep(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + SetCount(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter object +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) SetStart(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter object +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) SetStep(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter object +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) SetCount(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeL3PidCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(2048) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_label_request_without_label_range_reserved.go b/gosnappi/pattern_flow_rsvp_path_label_request_without_label_range_reserved.go new file mode 100644 index 00000000..835d10d0 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_label_request_without_label_range_reserved.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved ***** +type patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved struct { + validation + obj *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + marshaller marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + unMarshaller unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + incrementHolder PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + decrementHolder PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter +} + +func NewPatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved() PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved { + obj := patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved{obj: &otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) msg() *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved { + return obj.obj +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) setMsg(msg *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved struct { + obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved +} + +type marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved interface { + // ToProto marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved to protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + ToProto() (*otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved, error) + // ToPbText marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved struct { + obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved +} + +type unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved interface { + // FromProto unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved from protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + FromProto(msg *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) (PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved, error) + // FromPbText unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) Marshal() marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) Unmarshal() unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) ToProto() (*otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) FromProto(msg *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) (PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) Clone() (PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved is this field is reserved. It MUST be set to zero on transmission and MUST be ignored on receipt. +type PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved interface { + Validation + // msg marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved to protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + // setMsg unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved from protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + // validate validates PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + Choice() PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum + // setChoice assigns PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + setChoice(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + // HasChoice checks if Choice has been set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + SetValue(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + // HasValue checks if Value has been set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + SetValues(value []uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + // Increment returns PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved. + // PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter is integer counter pattern + Increment() PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + // SetIncrement assigns PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved. + // PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved. + // PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter is integer counter pattern + Decrement() PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + // SetDecrement assigns PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved. + // PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved +var PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice = struct { + VALUE PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum + VALUES PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum + INCREMENT PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum + DECREMENT PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum +}{ + VALUE: PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum("value"), + VALUES: PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) Choice() PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum { + return PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) setChoice(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved { + intValue, ok := otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter().msg() + } + + if value == PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved object +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) SetValue(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved object +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) SetValues(value []uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) Increment() PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter value in the PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved object +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) SetIncrement(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) Decrement() PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter value in the PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved object +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) SetDecrement(value PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReserved) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved") + } + } else { + intVal := otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_label_request_without_label_range_reserved_counter.go b/gosnappi/pattern_flow_rsvp_path_label_request_without_label_range_reserved_counter.go new file mode 100644 index 00000000..d0284d08 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_label_request_without_label_range_reserved_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter ***** +type patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter struct { + validation + obj *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + marshaller marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + unMarshaller unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter +} + +func NewPatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter() PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter { + obj := patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter{obj: &otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) msg() *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) setMsg(msg *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter struct { + obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter +} + +type marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter interface { + // ToProto marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter to protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + ToProto() (*otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter, error) + // ToPbText marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter struct { + obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter +} + +type unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter interface { + // FromProto unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter from protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + FromProto(msg *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) (PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) Marshal() marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) Unmarshal() unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) ToProto() (*otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) FromProto(msg *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) (PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) Clone() (PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter is integer counter pattern +type PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter interface { + Validation + // msg marshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter to protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + // setMsg unmarshals PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter from protobuf object *otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + // validate validates PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + SetStart(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + SetStep(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + SetCount(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter object +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) SetStart(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter object +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) SetStep(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter object +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) SetCount(value uint32) PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathLabelRequestWithoutLabelRangeReservedCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_objects_custom_type.go b/gosnappi/pattern_flow_rsvp_path_objects_custom_type.go new file mode 100644 index 00000000..5ebc769a --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_objects_custom_type.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathObjectsCustomType ***** +type patternFlowRSVPPathObjectsCustomType struct { + validation + obj *otg.PatternFlowRSVPPathObjectsCustomType + marshaller marshalPatternFlowRSVPPathObjectsCustomType + unMarshaller unMarshalPatternFlowRSVPPathObjectsCustomType + incrementHolder PatternFlowRSVPPathObjectsCustomTypeCounter + decrementHolder PatternFlowRSVPPathObjectsCustomTypeCounter +} + +func NewPatternFlowRSVPPathObjectsCustomType() PatternFlowRSVPPathObjectsCustomType { + obj := patternFlowRSVPPathObjectsCustomType{obj: &otg.PatternFlowRSVPPathObjectsCustomType{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathObjectsCustomType) msg() *otg.PatternFlowRSVPPathObjectsCustomType { + return obj.obj +} + +func (obj *patternFlowRSVPPathObjectsCustomType) setMsg(msg *otg.PatternFlowRSVPPathObjectsCustomType) PatternFlowRSVPPathObjectsCustomType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathObjectsCustomType struct { + obj *patternFlowRSVPPathObjectsCustomType +} + +type marshalPatternFlowRSVPPathObjectsCustomType interface { + // ToProto marshals PatternFlowRSVPPathObjectsCustomType to protobuf object *otg.PatternFlowRSVPPathObjectsCustomType + ToProto() (*otg.PatternFlowRSVPPathObjectsCustomType, error) + // ToPbText marshals PatternFlowRSVPPathObjectsCustomType to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathObjectsCustomType to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathObjectsCustomType to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathObjectsCustomType struct { + obj *patternFlowRSVPPathObjectsCustomType +} + +type unMarshalPatternFlowRSVPPathObjectsCustomType interface { + // FromProto unmarshals PatternFlowRSVPPathObjectsCustomType from protobuf object *otg.PatternFlowRSVPPathObjectsCustomType + FromProto(msg *otg.PatternFlowRSVPPathObjectsCustomType) (PatternFlowRSVPPathObjectsCustomType, error) + // FromPbText unmarshals PatternFlowRSVPPathObjectsCustomType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathObjectsCustomType from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathObjectsCustomType from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathObjectsCustomType) Marshal() marshalPatternFlowRSVPPathObjectsCustomType { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathObjectsCustomType{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathObjectsCustomType) Unmarshal() unMarshalPatternFlowRSVPPathObjectsCustomType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathObjectsCustomType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathObjectsCustomType) ToProto() (*otg.PatternFlowRSVPPathObjectsCustomType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathObjectsCustomType) FromProto(msg *otg.PatternFlowRSVPPathObjectsCustomType) (PatternFlowRSVPPathObjectsCustomType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathObjectsCustomType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathObjectsCustomType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathObjectsCustomType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathObjectsCustomType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathObjectsCustomType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathObjectsCustomType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathObjectsCustomType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathObjectsCustomType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathObjectsCustomType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathObjectsCustomType) Clone() (PatternFlowRSVPPathObjectsCustomType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathObjectsCustomType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathObjectsCustomType) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathObjectsCustomType is user defined object type. +type PatternFlowRSVPPathObjectsCustomType interface { + Validation + // msg marshals PatternFlowRSVPPathObjectsCustomType to protobuf object *otg.PatternFlowRSVPPathObjectsCustomType + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathObjectsCustomType + // setMsg unmarshals PatternFlowRSVPPathObjectsCustomType from protobuf object *otg.PatternFlowRSVPPathObjectsCustomType + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathObjectsCustomType) PatternFlowRSVPPathObjectsCustomType + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathObjectsCustomType + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathObjectsCustomType + // validate validates PatternFlowRSVPPathObjectsCustomType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathObjectsCustomType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathObjectsCustomTypeChoiceEnum, set in PatternFlowRSVPPathObjectsCustomType + Choice() PatternFlowRSVPPathObjectsCustomTypeChoiceEnum + // setChoice assigns PatternFlowRSVPPathObjectsCustomTypeChoiceEnum provided by user to PatternFlowRSVPPathObjectsCustomType + setChoice(value PatternFlowRSVPPathObjectsCustomTypeChoiceEnum) PatternFlowRSVPPathObjectsCustomType + // HasChoice checks if Choice has been set in PatternFlowRSVPPathObjectsCustomType + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathObjectsCustomType. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathObjectsCustomType + SetValue(value uint32) PatternFlowRSVPPathObjectsCustomType + // HasValue checks if Value has been set in PatternFlowRSVPPathObjectsCustomType + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathObjectsCustomType. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathObjectsCustomType + SetValues(value []uint32) PatternFlowRSVPPathObjectsCustomType + // Increment returns PatternFlowRSVPPathObjectsCustomTypeCounter, set in PatternFlowRSVPPathObjectsCustomType. + // PatternFlowRSVPPathObjectsCustomTypeCounter is integer counter pattern + Increment() PatternFlowRSVPPathObjectsCustomTypeCounter + // SetIncrement assigns PatternFlowRSVPPathObjectsCustomTypeCounter provided by user to PatternFlowRSVPPathObjectsCustomType. + // PatternFlowRSVPPathObjectsCustomTypeCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathObjectsCustomTypeCounter) PatternFlowRSVPPathObjectsCustomType + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathObjectsCustomType + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathObjectsCustomTypeCounter, set in PatternFlowRSVPPathObjectsCustomType. + // PatternFlowRSVPPathObjectsCustomTypeCounter is integer counter pattern + Decrement() PatternFlowRSVPPathObjectsCustomTypeCounter + // SetDecrement assigns PatternFlowRSVPPathObjectsCustomTypeCounter provided by user to PatternFlowRSVPPathObjectsCustomType. + // PatternFlowRSVPPathObjectsCustomTypeCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathObjectsCustomTypeCounter) PatternFlowRSVPPathObjectsCustomType + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathObjectsCustomType + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathObjectsCustomTypeChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathObjectsCustomType +var PatternFlowRSVPPathObjectsCustomTypeChoice = struct { + VALUE PatternFlowRSVPPathObjectsCustomTypeChoiceEnum + VALUES PatternFlowRSVPPathObjectsCustomTypeChoiceEnum + INCREMENT PatternFlowRSVPPathObjectsCustomTypeChoiceEnum + DECREMENT PatternFlowRSVPPathObjectsCustomTypeChoiceEnum +}{ + VALUE: PatternFlowRSVPPathObjectsCustomTypeChoiceEnum("value"), + VALUES: PatternFlowRSVPPathObjectsCustomTypeChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathObjectsCustomTypeChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathObjectsCustomTypeChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathObjectsCustomType) Choice() PatternFlowRSVPPathObjectsCustomTypeChoiceEnum { + return PatternFlowRSVPPathObjectsCustomTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathObjectsCustomType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathObjectsCustomType) setChoice(value PatternFlowRSVPPathObjectsCustomTypeChoiceEnum) PatternFlowRSVPPathObjectsCustomType { + intValue, ok := otg.PatternFlowRSVPPathObjectsCustomType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathObjectsCustomTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathObjectsCustomType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathObjectsCustomTypeChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathObjectsCustomTypeChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathObjectsCustomTypeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathObjectsCustomTypeCounter().msg() + } + + if value == PatternFlowRSVPPathObjectsCustomTypeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathObjectsCustomTypeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathObjectsCustomType) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathObjectsCustomTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathObjectsCustomType) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathObjectsCustomType object +func (obj *patternFlowRSVPPathObjectsCustomType) SetValue(value uint32) PatternFlowRSVPPathObjectsCustomType { + obj.setChoice(PatternFlowRSVPPathObjectsCustomTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathObjectsCustomType) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathObjectsCustomType object +func (obj *patternFlowRSVPPathObjectsCustomType) SetValues(value []uint32) PatternFlowRSVPPathObjectsCustomType { + obj.setChoice(PatternFlowRSVPPathObjectsCustomTypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathObjectsCustomTypeCounter +func (obj *patternFlowRSVPPathObjectsCustomType) Increment() PatternFlowRSVPPathObjectsCustomTypeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathObjectsCustomTypeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathObjectsCustomTypeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathObjectsCustomTypeCounter +func (obj *patternFlowRSVPPathObjectsCustomType) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathObjectsCustomTypeCounter value in the PatternFlowRSVPPathObjectsCustomType object +func (obj *patternFlowRSVPPathObjectsCustomType) SetIncrement(value PatternFlowRSVPPathObjectsCustomTypeCounter) PatternFlowRSVPPathObjectsCustomType { + obj.setChoice(PatternFlowRSVPPathObjectsCustomTypeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathObjectsCustomTypeCounter +func (obj *patternFlowRSVPPathObjectsCustomType) Decrement() PatternFlowRSVPPathObjectsCustomTypeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathObjectsCustomTypeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathObjectsCustomTypeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathObjectsCustomTypeCounter +func (obj *patternFlowRSVPPathObjectsCustomType) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathObjectsCustomTypeCounter value in the PatternFlowRSVPPathObjectsCustomType object +func (obj *patternFlowRSVPPathObjectsCustomType) SetDecrement(value PatternFlowRSVPPathObjectsCustomTypeCounter) PatternFlowRSVPPathObjectsCustomType { + obj.setChoice(PatternFlowRSVPPathObjectsCustomTypeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathObjectsCustomType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathObjectsCustomType.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathObjectsCustomType.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathObjectsCustomType) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathObjectsCustomTypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathObjectsCustomTypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathObjectsCustomTypeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathObjectsCustomTypeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathObjectsCustomTypeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathObjectsCustomTypeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathObjectsCustomType") + } + } else { + intVal := otg.PatternFlowRSVPPathObjectsCustomType_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathObjectsCustomType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_objects_custom_type_counter.go b/gosnappi/pattern_flow_rsvp_path_objects_custom_type_counter.go new file mode 100644 index 00000000..473f07db --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_objects_custom_type_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathObjectsCustomTypeCounter ***** +type patternFlowRSVPPathObjectsCustomTypeCounter struct { + validation + obj *otg.PatternFlowRSVPPathObjectsCustomTypeCounter + marshaller marshalPatternFlowRSVPPathObjectsCustomTypeCounter + unMarshaller unMarshalPatternFlowRSVPPathObjectsCustomTypeCounter +} + +func NewPatternFlowRSVPPathObjectsCustomTypeCounter() PatternFlowRSVPPathObjectsCustomTypeCounter { + obj := patternFlowRSVPPathObjectsCustomTypeCounter{obj: &otg.PatternFlowRSVPPathObjectsCustomTypeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) msg() *otg.PatternFlowRSVPPathObjectsCustomTypeCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) setMsg(msg *otg.PatternFlowRSVPPathObjectsCustomTypeCounter) PatternFlowRSVPPathObjectsCustomTypeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathObjectsCustomTypeCounter struct { + obj *patternFlowRSVPPathObjectsCustomTypeCounter +} + +type marshalPatternFlowRSVPPathObjectsCustomTypeCounter interface { + // ToProto marshals PatternFlowRSVPPathObjectsCustomTypeCounter to protobuf object *otg.PatternFlowRSVPPathObjectsCustomTypeCounter + ToProto() (*otg.PatternFlowRSVPPathObjectsCustomTypeCounter, error) + // ToPbText marshals PatternFlowRSVPPathObjectsCustomTypeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathObjectsCustomTypeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathObjectsCustomTypeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathObjectsCustomTypeCounter struct { + obj *patternFlowRSVPPathObjectsCustomTypeCounter +} + +type unMarshalPatternFlowRSVPPathObjectsCustomTypeCounter interface { + // FromProto unmarshals PatternFlowRSVPPathObjectsCustomTypeCounter from protobuf object *otg.PatternFlowRSVPPathObjectsCustomTypeCounter + FromProto(msg *otg.PatternFlowRSVPPathObjectsCustomTypeCounter) (PatternFlowRSVPPathObjectsCustomTypeCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathObjectsCustomTypeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathObjectsCustomTypeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathObjectsCustomTypeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) Marshal() marshalPatternFlowRSVPPathObjectsCustomTypeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathObjectsCustomTypeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) Unmarshal() unMarshalPatternFlowRSVPPathObjectsCustomTypeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathObjectsCustomTypeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathObjectsCustomTypeCounter) ToProto() (*otg.PatternFlowRSVPPathObjectsCustomTypeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathObjectsCustomTypeCounter) FromProto(msg *otg.PatternFlowRSVPPathObjectsCustomTypeCounter) (PatternFlowRSVPPathObjectsCustomTypeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathObjectsCustomTypeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathObjectsCustomTypeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathObjectsCustomTypeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathObjectsCustomTypeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathObjectsCustomTypeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathObjectsCustomTypeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) Clone() (PatternFlowRSVPPathObjectsCustomTypeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathObjectsCustomTypeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathObjectsCustomTypeCounter is integer counter pattern +type PatternFlowRSVPPathObjectsCustomTypeCounter interface { + Validation + // msg marshals PatternFlowRSVPPathObjectsCustomTypeCounter to protobuf object *otg.PatternFlowRSVPPathObjectsCustomTypeCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathObjectsCustomTypeCounter + // setMsg unmarshals PatternFlowRSVPPathObjectsCustomTypeCounter from protobuf object *otg.PatternFlowRSVPPathObjectsCustomTypeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathObjectsCustomTypeCounter) PatternFlowRSVPPathObjectsCustomTypeCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathObjectsCustomTypeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathObjectsCustomTypeCounter + // validate validates PatternFlowRSVPPathObjectsCustomTypeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathObjectsCustomTypeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathObjectsCustomTypeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathObjectsCustomTypeCounter + SetStart(value uint32) PatternFlowRSVPPathObjectsCustomTypeCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathObjectsCustomTypeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathObjectsCustomTypeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathObjectsCustomTypeCounter + SetStep(value uint32) PatternFlowRSVPPathObjectsCustomTypeCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathObjectsCustomTypeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathObjectsCustomTypeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathObjectsCustomTypeCounter + SetCount(value uint32) PatternFlowRSVPPathObjectsCustomTypeCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathObjectsCustomTypeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathObjectsCustomTypeCounter object +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) SetStart(value uint32) PatternFlowRSVPPathObjectsCustomTypeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathObjectsCustomTypeCounter object +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) SetStep(value uint32) PatternFlowRSVPPathObjectsCustomTypeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathObjectsCustomTypeCounter object +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) SetCount(value uint32) PatternFlowRSVPPathObjectsCustomTypeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathObjectsCustomTypeCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathObjectsCustomTypeCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathObjectsCustomTypeCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathObjectsCustomTypeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_record_route_type1_ipv4_address_ipv4_address.go b/gosnappi/pattern_flow_rsvp_path_record_route_type1_ipv4_address_ipv4_address.go new file mode 100644 index 00000000..b35de500 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_record_route_type1_ipv4_address_ipv4_address.go @@ -0,0 +1,553 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address ***** +type patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address struct { + validation + obj *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + marshaller marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + unMarshaller unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + incrementHolder PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + decrementHolder PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter +} + +func NewPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address() PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address { + obj := patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address{obj: &otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) msg() *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address { + return obj.obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) setMsg(msg *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address struct { + obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address +} + +type marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address interface { + // ToProto marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address to protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + ToProto() (*otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address, error) + // ToPbText marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address struct { + obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address +} + +type unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address interface { + // FromProto unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address from protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + FromProto(msg *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) (PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address, error) + // FromPbText unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) Marshal() marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) Unmarshal() unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) ToProto() (*otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) FromProto(msg *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) (PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) Clone() (PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address is a 32-bit unicast, host address. Any network-reachable interface address is allowed here. Illegal addresses, such as certain loopback addresses, SHOULD NOT be used. +type PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address interface { + Validation + // msg marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address to protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + // setMsg unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address from protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + // validate validates PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + Choice() PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum + // setChoice assigns PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + setChoice(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + // HasChoice checks if Choice has been set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + HasChoice() bool + // Value returns string, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address. + Value() string + // SetValue assigns string provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + SetValue(value string) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + // HasValue checks if Value has been set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + HasValue() bool + // Values returns []string, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address. + Values() []string + // SetValues assigns []string provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + SetValues(value []string) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + // Increment returns PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address. + // PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter is ipv4 counter pattern + Increment() PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + // SetIncrement assigns PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address. + // PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter is ipv4 counter pattern + SetIncrement(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address. + // PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter is ipv4 counter pattern + Decrement() PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + // SetDecrement assigns PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address. + // PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter is ipv4 counter pattern + SetDecrement(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address +var PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice = struct { + VALUE PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum + VALUES PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum + INCREMENT PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum + DECREMENT PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum +}{ + VALUE: PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum("value"), + VALUES: PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) Choice() PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum { + return PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) setChoice(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address { + intValue, ok := otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.VALUE { + defaultValue := "0.0.0.0" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.VALUES { + defaultValue := []string{"0.0.0.0"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter().msg() + } + + if value == PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address object +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) SetValue(value string) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"0.0.0.0"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address object +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) SetValues(value []string) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) Increment() PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter value in the PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address object +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) SetIncrement(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) Decrement() PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter value in the PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address object +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) SetDecrement(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv4(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateIpv4Slice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address") + } + } else { + intVal := otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_record_route_type1_ipv4_address_ipv4_address_counter.go b/gosnappi/pattern_flow_rsvp_path_record_route_type1_ipv4_address_ipv4_address_counter.go new file mode 100644 index 00000000..208fd7d4 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_record_route_type1_ipv4_address_ipv4_address_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter ***** +type patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter struct { + validation + obj *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + marshaller marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + unMarshaller unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter +} + +func NewPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter() PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter { + obj := patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter{obj: &otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) msg() *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) setMsg(msg *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter struct { + obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter +} + +type marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter interface { + // ToProto marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter to protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + ToProto() (*otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter, error) + // ToPbText marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter struct { + obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter +} + +type unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter interface { + // FromProto unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter from protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + FromProto(msg *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) (PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) Marshal() marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) Unmarshal() unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) ToProto() (*otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) FromProto(msg *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) (PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) Clone() (PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter is ipv4 counter pattern +type PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter interface { + Validation + // msg marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter to protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + // setMsg unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter from protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + // validate validates PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + SetStart(value string) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + HasStart() bool + // Step returns string, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + SetStep(value string) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + SetCount(value uint32) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter object +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) SetStart(value string) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter object +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) SetStep(value string) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter object +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) SetCount(value uint32) PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateIpv4(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateIpv4(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter.Step")) + } + + } + +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("0.0.0.0") + } + if obj.obj.Step == nil { + obj.SetStep("0.0.0.1") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_record_route_type1_ipv4_address_prefix_length.go b/gosnappi/pattern_flow_rsvp_path_record_route_type1_ipv4_address_prefix_length.go new file mode 100644 index 00000000..851c8312 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_record_route_type1_ipv4_address_prefix_length.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength ***** +type patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength struct { + validation + obj *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + marshaller marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + unMarshaller unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + incrementHolder PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + decrementHolder PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter +} + +func NewPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength() PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength { + obj := patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength{obj: &otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) msg() *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength { + return obj.obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) setMsg(msg *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength struct { + obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength +} + +type marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength interface { + // ToProto marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength to protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + ToProto() (*otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength, error) + // ToPbText marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength struct { + obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength +} + +type unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength interface { + // FromProto unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength from protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + FromProto(msg *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) (PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength, error) + // FromPbText unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) Marshal() marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) Unmarshal() unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) ToProto() (*otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) FromProto(msg *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) (PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) Clone() (PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength is prefix-length of IPv4 address. +type PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength interface { + Validation + // msg marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength to protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + // setMsg unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength from protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + // validate validates PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + Choice() PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum + // setChoice assigns PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + setChoice(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + // HasChoice checks if Choice has been set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + SetValue(value uint32) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + // HasValue checks if Value has been set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + SetValues(value []uint32) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + // Increment returns PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength. + // PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter is integer counter pattern + Increment() PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + // SetIncrement assigns PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength. + // PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength. + // PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter is integer counter pattern + Decrement() PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + // SetDecrement assigns PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength. + // PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength +var PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice = struct { + VALUE PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum + VALUES PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum + INCREMENT PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum + DECREMENT PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum +}{ + VALUE: PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum("value"), + VALUES: PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) Choice() PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum { + return PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) setChoice(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength { + intValue, ok := otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.VALUE { + defaultValue := uint32(32) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.VALUES { + defaultValue := []uint32{32} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter().msg() + } + + if value == PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength object +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) SetValue(value uint32) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{32}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength object +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) SetValues(value []uint32) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) Increment() PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter value in the PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength object +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) SetIncrement(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) Decrement() PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter value in the PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength object +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) SetDecrement(value PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength") + } + } else { + intVal := otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_record_route_type1_ipv4_address_prefix_length_counter.go b/gosnappi/pattern_flow_rsvp_path_record_route_type1_ipv4_address_prefix_length_counter.go new file mode 100644 index 00000000..88047e0a --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_record_route_type1_ipv4_address_prefix_length_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter ***** +type patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter struct { + validation + obj *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + marshaller marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + unMarshaller unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter +} + +func NewPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter() PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter { + obj := patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter{obj: &otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) msg() *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) setMsg(msg *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter struct { + obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter +} + +type marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter interface { + // ToProto marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter to protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + ToProto() (*otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter, error) + // ToPbText marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter struct { + obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter +} + +type unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter interface { + // FromProto unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter from protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + FromProto(msg *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) (PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) Marshal() marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) Unmarshal() unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) ToProto() (*otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) FromProto(msg *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) (PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) Clone() (PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter is integer counter pattern +type PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter interface { + Validation + // msg marshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter to protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + // setMsg unmarshals PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter from protobuf object *otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + // validate validates PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + SetStart(value uint32) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + SetStep(value uint32) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + SetCount(value uint32) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter object +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) SetStart(value uint32) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter object +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) SetStep(value uint32) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter object +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) SetCount(value uint32) PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(32) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_record_route_type1_label_c_type.go b/gosnappi/pattern_flow_rsvp_path_record_route_type1_label_c_type.go new file mode 100644 index 00000000..593682bf --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_record_route_type1_label_c_type.go @@ -0,0 +1,439 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathRecordRouteType1LabelCType ***** +type patternFlowRSVPPathRecordRouteType1LabelCType struct { + validation + obj *otg.PatternFlowRSVPPathRecordRouteType1LabelCType + marshaller marshalPatternFlowRSVPPathRecordRouteType1LabelCType + unMarshaller unMarshalPatternFlowRSVPPathRecordRouteType1LabelCType +} + +func NewPatternFlowRSVPPathRecordRouteType1LabelCType() PatternFlowRSVPPathRecordRouteType1LabelCType { + obj := patternFlowRSVPPathRecordRouteType1LabelCType{obj: &otg.PatternFlowRSVPPathRecordRouteType1LabelCType{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) msg() *otg.PatternFlowRSVPPathRecordRouteType1LabelCType { + return obj.obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) setMsg(msg *otg.PatternFlowRSVPPathRecordRouteType1LabelCType) PatternFlowRSVPPathRecordRouteType1LabelCType { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathRecordRouteType1LabelCType struct { + obj *patternFlowRSVPPathRecordRouteType1LabelCType +} + +type marshalPatternFlowRSVPPathRecordRouteType1LabelCType interface { + // ToProto marshals PatternFlowRSVPPathRecordRouteType1LabelCType to protobuf object *otg.PatternFlowRSVPPathRecordRouteType1LabelCType + ToProto() (*otg.PatternFlowRSVPPathRecordRouteType1LabelCType, error) + // ToPbText marshals PatternFlowRSVPPathRecordRouteType1LabelCType to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathRecordRouteType1LabelCType to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathRecordRouteType1LabelCType to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathRecordRouteType1LabelCType struct { + obj *patternFlowRSVPPathRecordRouteType1LabelCType +} + +type unMarshalPatternFlowRSVPPathRecordRouteType1LabelCType interface { + // FromProto unmarshals PatternFlowRSVPPathRecordRouteType1LabelCType from protobuf object *otg.PatternFlowRSVPPathRecordRouteType1LabelCType + FromProto(msg *otg.PatternFlowRSVPPathRecordRouteType1LabelCType) (PatternFlowRSVPPathRecordRouteType1LabelCType, error) + // FromPbText unmarshals PatternFlowRSVPPathRecordRouteType1LabelCType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathRecordRouteType1LabelCType from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathRecordRouteType1LabelCType from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) Marshal() marshalPatternFlowRSVPPathRecordRouteType1LabelCType { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathRecordRouteType1LabelCType{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) Unmarshal() unMarshalPatternFlowRSVPPathRecordRouteType1LabelCType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathRecordRouteType1LabelCType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1LabelCType) ToProto() (*otg.PatternFlowRSVPPathRecordRouteType1LabelCType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1LabelCType) FromProto(msg *otg.PatternFlowRSVPPathRecordRouteType1LabelCType) (PatternFlowRSVPPathRecordRouteType1LabelCType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1LabelCType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1LabelCType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1LabelCType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1LabelCType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1LabelCType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1LabelCType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) Clone() (PatternFlowRSVPPathRecordRouteType1LabelCType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathRecordRouteType1LabelCType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathRecordRouteType1LabelCType is the C-Type of the included Label Object. Copied from the Label object. +type PatternFlowRSVPPathRecordRouteType1LabelCType interface { + Validation + // msg marshals PatternFlowRSVPPathRecordRouteType1LabelCType to protobuf object *otg.PatternFlowRSVPPathRecordRouteType1LabelCType + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathRecordRouteType1LabelCType + // setMsg unmarshals PatternFlowRSVPPathRecordRouteType1LabelCType from protobuf object *otg.PatternFlowRSVPPathRecordRouteType1LabelCType + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathRecordRouteType1LabelCType) PatternFlowRSVPPathRecordRouteType1LabelCType + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathRecordRouteType1LabelCType + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathRecordRouteType1LabelCType + // validate validates PatternFlowRSVPPathRecordRouteType1LabelCType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathRecordRouteType1LabelCType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathRecordRouteType1LabelCTypeChoiceEnum, set in PatternFlowRSVPPathRecordRouteType1LabelCType + Choice() PatternFlowRSVPPathRecordRouteType1LabelCTypeChoiceEnum + // setChoice assigns PatternFlowRSVPPathRecordRouteType1LabelCTypeChoiceEnum provided by user to PatternFlowRSVPPathRecordRouteType1LabelCType + setChoice(value PatternFlowRSVPPathRecordRouteType1LabelCTypeChoiceEnum) PatternFlowRSVPPathRecordRouteType1LabelCType + // HasChoice checks if Choice has been set in PatternFlowRSVPPathRecordRouteType1LabelCType + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathRecordRouteType1LabelCType. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathRecordRouteType1LabelCType + SetValue(value uint32) PatternFlowRSVPPathRecordRouteType1LabelCType + // HasValue checks if Value has been set in PatternFlowRSVPPathRecordRouteType1LabelCType + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathRecordRouteType1LabelCType. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathRecordRouteType1LabelCType + SetValues(value []uint32) PatternFlowRSVPPathRecordRouteType1LabelCType +} + +type PatternFlowRSVPPathRecordRouteType1LabelCTypeChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathRecordRouteType1LabelCType +var PatternFlowRSVPPathRecordRouteType1LabelCTypeChoice = struct { + VALUE PatternFlowRSVPPathRecordRouteType1LabelCTypeChoiceEnum + VALUES PatternFlowRSVPPathRecordRouteType1LabelCTypeChoiceEnum +}{ + VALUE: PatternFlowRSVPPathRecordRouteType1LabelCTypeChoiceEnum("value"), + VALUES: PatternFlowRSVPPathRecordRouteType1LabelCTypeChoiceEnum("values"), +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) Choice() PatternFlowRSVPPathRecordRouteType1LabelCTypeChoiceEnum { + return PatternFlowRSVPPathRecordRouteType1LabelCTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) setChoice(value PatternFlowRSVPPathRecordRouteType1LabelCTypeChoiceEnum) PatternFlowRSVPPathRecordRouteType1LabelCType { + intValue, ok := otg.PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathRecordRouteType1LabelCTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathRecordRouteType1LabelCTypeChoice.VALUE { + defaultValue := uint32(1) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathRecordRouteType1LabelCTypeChoice.VALUES { + defaultValue := []uint32{1} + obj.obj.Values = defaultValue + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1LabelCTypeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathRecordRouteType1LabelCType object +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) SetValue(value uint32) PatternFlowRSVPPathRecordRouteType1LabelCType { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1LabelCTypeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{1}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathRecordRouteType1LabelCType object +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) SetValues(value []uint32) PatternFlowRSVPPathRecordRouteType1LabelCType { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1LabelCTypeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathRecordRouteType1LabelCType.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathRecordRouteType1LabelCType.Values <= 255 but Got %d", item)) + } + + } + + } + +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelCType) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathRecordRouteType1LabelCTypeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathRecordRouteType1LabelCTypeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathRecordRouteType1LabelCTypeChoice.VALUES + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1LabelCTypeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathRecordRouteType1LabelCType") + } + } else { + intVal := otg.PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathRecordRouteType1LabelCType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_record_route_type1_label_flags.go b/gosnappi/pattern_flow_rsvp_path_record_route_type1_label_flags.go new file mode 100644 index 00000000..9eaeae0a --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_record_route_type1_label_flags.go @@ -0,0 +1,439 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathRecordRouteType1LabelFlags ***** +type patternFlowRSVPPathRecordRouteType1LabelFlags struct { + validation + obj *otg.PatternFlowRSVPPathRecordRouteType1LabelFlags + marshaller marshalPatternFlowRSVPPathRecordRouteType1LabelFlags + unMarshaller unMarshalPatternFlowRSVPPathRecordRouteType1LabelFlags +} + +func NewPatternFlowRSVPPathRecordRouteType1LabelFlags() PatternFlowRSVPPathRecordRouteType1LabelFlags { + obj := patternFlowRSVPPathRecordRouteType1LabelFlags{obj: &otg.PatternFlowRSVPPathRecordRouteType1LabelFlags{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) msg() *otg.PatternFlowRSVPPathRecordRouteType1LabelFlags { + return obj.obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) setMsg(msg *otg.PatternFlowRSVPPathRecordRouteType1LabelFlags) PatternFlowRSVPPathRecordRouteType1LabelFlags { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathRecordRouteType1LabelFlags struct { + obj *patternFlowRSVPPathRecordRouteType1LabelFlags +} + +type marshalPatternFlowRSVPPathRecordRouteType1LabelFlags interface { + // ToProto marshals PatternFlowRSVPPathRecordRouteType1LabelFlags to protobuf object *otg.PatternFlowRSVPPathRecordRouteType1LabelFlags + ToProto() (*otg.PatternFlowRSVPPathRecordRouteType1LabelFlags, error) + // ToPbText marshals PatternFlowRSVPPathRecordRouteType1LabelFlags to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathRecordRouteType1LabelFlags to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathRecordRouteType1LabelFlags to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathRecordRouteType1LabelFlags struct { + obj *patternFlowRSVPPathRecordRouteType1LabelFlags +} + +type unMarshalPatternFlowRSVPPathRecordRouteType1LabelFlags interface { + // FromProto unmarshals PatternFlowRSVPPathRecordRouteType1LabelFlags from protobuf object *otg.PatternFlowRSVPPathRecordRouteType1LabelFlags + FromProto(msg *otg.PatternFlowRSVPPathRecordRouteType1LabelFlags) (PatternFlowRSVPPathRecordRouteType1LabelFlags, error) + // FromPbText unmarshals PatternFlowRSVPPathRecordRouteType1LabelFlags from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathRecordRouteType1LabelFlags from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathRecordRouteType1LabelFlags from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) Marshal() marshalPatternFlowRSVPPathRecordRouteType1LabelFlags { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathRecordRouteType1LabelFlags{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) Unmarshal() unMarshalPatternFlowRSVPPathRecordRouteType1LabelFlags { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathRecordRouteType1LabelFlags{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1LabelFlags) ToProto() (*otg.PatternFlowRSVPPathRecordRouteType1LabelFlags, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1LabelFlags) FromProto(msg *otg.PatternFlowRSVPPathRecordRouteType1LabelFlags) (PatternFlowRSVPPathRecordRouteType1LabelFlags, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1LabelFlags) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1LabelFlags) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1LabelFlags) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1LabelFlags) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathRecordRouteType1LabelFlags) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRecordRouteType1LabelFlags) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) Clone() (PatternFlowRSVPPathRecordRouteType1LabelFlags, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathRecordRouteType1LabelFlags() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathRecordRouteType1LabelFlags is 0x01 = Global label. This flag indicates that the label will be understood if received on any interface. +type PatternFlowRSVPPathRecordRouteType1LabelFlags interface { + Validation + // msg marshals PatternFlowRSVPPathRecordRouteType1LabelFlags to protobuf object *otg.PatternFlowRSVPPathRecordRouteType1LabelFlags + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathRecordRouteType1LabelFlags + // setMsg unmarshals PatternFlowRSVPPathRecordRouteType1LabelFlags from protobuf object *otg.PatternFlowRSVPPathRecordRouteType1LabelFlags + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathRecordRouteType1LabelFlags) PatternFlowRSVPPathRecordRouteType1LabelFlags + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathRecordRouteType1LabelFlags + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathRecordRouteType1LabelFlags + // validate validates PatternFlowRSVPPathRecordRouteType1LabelFlags + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathRecordRouteType1LabelFlags, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathRecordRouteType1LabelFlagsChoiceEnum, set in PatternFlowRSVPPathRecordRouteType1LabelFlags + Choice() PatternFlowRSVPPathRecordRouteType1LabelFlagsChoiceEnum + // setChoice assigns PatternFlowRSVPPathRecordRouteType1LabelFlagsChoiceEnum provided by user to PatternFlowRSVPPathRecordRouteType1LabelFlags + setChoice(value PatternFlowRSVPPathRecordRouteType1LabelFlagsChoiceEnum) PatternFlowRSVPPathRecordRouteType1LabelFlags + // HasChoice checks if Choice has been set in PatternFlowRSVPPathRecordRouteType1LabelFlags + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathRecordRouteType1LabelFlags. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathRecordRouteType1LabelFlags + SetValue(value uint32) PatternFlowRSVPPathRecordRouteType1LabelFlags + // HasValue checks if Value has been set in PatternFlowRSVPPathRecordRouteType1LabelFlags + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathRecordRouteType1LabelFlags. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathRecordRouteType1LabelFlags + SetValues(value []uint32) PatternFlowRSVPPathRecordRouteType1LabelFlags +} + +type PatternFlowRSVPPathRecordRouteType1LabelFlagsChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathRecordRouteType1LabelFlags +var PatternFlowRSVPPathRecordRouteType1LabelFlagsChoice = struct { + VALUE PatternFlowRSVPPathRecordRouteType1LabelFlagsChoiceEnum + VALUES PatternFlowRSVPPathRecordRouteType1LabelFlagsChoiceEnum +}{ + VALUE: PatternFlowRSVPPathRecordRouteType1LabelFlagsChoiceEnum("value"), + VALUES: PatternFlowRSVPPathRecordRouteType1LabelFlagsChoiceEnum("values"), +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) Choice() PatternFlowRSVPPathRecordRouteType1LabelFlagsChoiceEnum { + return PatternFlowRSVPPathRecordRouteType1LabelFlagsChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) setChoice(value PatternFlowRSVPPathRecordRouteType1LabelFlagsChoiceEnum) PatternFlowRSVPPathRecordRouteType1LabelFlags { + intValue, ok := otg.PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathRecordRouteType1LabelFlagsChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathRecordRouteType1LabelFlagsChoice.VALUE { + defaultValue := uint32(1) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathRecordRouteType1LabelFlagsChoice.VALUES { + defaultValue := []uint32{1} + obj.obj.Values = defaultValue + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1LabelFlagsChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathRecordRouteType1LabelFlags object +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) SetValue(value uint32) PatternFlowRSVPPathRecordRouteType1LabelFlags { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1LabelFlagsChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{1}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathRecordRouteType1LabelFlags object +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) SetValues(value []uint32) PatternFlowRSVPPathRecordRouteType1LabelFlags { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1LabelFlagsChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathRecordRouteType1LabelFlags.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathRecordRouteType1LabelFlags.Values <= 255 but Got %d", item)) + } + + } + + } + +} + +func (obj *patternFlowRSVPPathRecordRouteType1LabelFlags) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathRecordRouteType1LabelFlagsChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathRecordRouteType1LabelFlagsChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathRecordRouteType1LabelFlagsChoice.VALUES + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathRecordRouteType1LabelFlagsChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathRecordRouteType1LabelFlags") + } + } else { + intVal := otg.PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathRecordRouteType1LabelFlags_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_rsvp_hop_ipv4_ipv4_address.go b/gosnappi/pattern_flow_rsvp_path_rsvp_hop_ipv4_ipv4_address.go new file mode 100644 index 00000000..ccd33e78 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_rsvp_hop_ipv4_ipv4_address.go @@ -0,0 +1,553 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathRsvpHopIpv4Ipv4Address ***** +type patternFlowRSVPPathRsvpHopIpv4Ipv4Address struct { + validation + obj *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + marshaller marshalPatternFlowRSVPPathRsvpHopIpv4Ipv4Address + unMarshaller unMarshalPatternFlowRSVPPathRsvpHopIpv4Ipv4Address + incrementHolder PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + decrementHolder PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter +} + +func NewPatternFlowRSVPPathRsvpHopIpv4Ipv4Address() PatternFlowRSVPPathRsvpHopIpv4Ipv4Address { + obj := patternFlowRSVPPathRsvpHopIpv4Ipv4Address{obj: &otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) msg() *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address { + return obj.obj +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) setMsg(msg *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) PatternFlowRSVPPathRsvpHopIpv4Ipv4Address { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathRsvpHopIpv4Ipv4Address struct { + obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address +} + +type marshalPatternFlowRSVPPathRsvpHopIpv4Ipv4Address interface { + // ToProto marshals PatternFlowRSVPPathRsvpHopIpv4Ipv4Address to protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + ToProto() (*otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address, error) + // ToPbText marshals PatternFlowRSVPPathRsvpHopIpv4Ipv4Address to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathRsvpHopIpv4Ipv4Address to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathRsvpHopIpv4Ipv4Address to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathRsvpHopIpv4Ipv4Address struct { + obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address +} + +type unMarshalPatternFlowRSVPPathRsvpHopIpv4Ipv4Address interface { + // FromProto unmarshals PatternFlowRSVPPathRsvpHopIpv4Ipv4Address from protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + FromProto(msg *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) (PatternFlowRSVPPathRsvpHopIpv4Ipv4Address, error) + // FromPbText unmarshals PatternFlowRSVPPathRsvpHopIpv4Ipv4Address from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathRsvpHopIpv4Ipv4Address from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathRsvpHopIpv4Ipv4Address from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) Marshal() marshalPatternFlowRSVPPathRsvpHopIpv4Ipv4Address { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathRsvpHopIpv4Ipv4Address{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) Unmarshal() unMarshalPatternFlowRSVPPathRsvpHopIpv4Ipv4Address { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathRsvpHopIpv4Ipv4Address{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4Ipv4Address) ToProto() (*otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4Ipv4Address) FromProto(msg *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) (PatternFlowRSVPPathRsvpHopIpv4Ipv4Address, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4Ipv4Address) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4Ipv4Address) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4Ipv4Address) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4Ipv4Address) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4Ipv4Address) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4Ipv4Address) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) Clone() (PatternFlowRSVPPathRsvpHopIpv4Ipv4Address, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathRsvpHopIpv4Ipv4Address() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathRsvpHopIpv4Ipv4Address is the IPv4 address of the interface through which the last RSVP-knowledgeable hop forwarded this message. +type PatternFlowRSVPPathRsvpHopIpv4Ipv4Address interface { + Validation + // msg marshals PatternFlowRSVPPathRsvpHopIpv4Ipv4Address to protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + // setMsg unmarshals PatternFlowRSVPPathRsvpHopIpv4Ipv4Address from protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address) PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathRsvpHopIpv4Ipv4Address + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathRsvpHopIpv4Ipv4Address + // validate validates PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathRsvpHopIpv4Ipv4Address, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum, set in PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + Choice() PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum + // setChoice assigns PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum provided by user to PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + setChoice(value PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum) PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + // HasChoice checks if Choice has been set in PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + HasChoice() bool + // Value returns string, set in PatternFlowRSVPPathRsvpHopIpv4Ipv4Address. + Value() string + // SetValue assigns string provided by user to PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + SetValue(value string) PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + // HasValue checks if Value has been set in PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + HasValue() bool + // Values returns []string, set in PatternFlowRSVPPathRsvpHopIpv4Ipv4Address. + Values() []string + // SetValues assigns []string provided by user to PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + SetValues(value []string) PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + // Increment returns PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter, set in PatternFlowRSVPPathRsvpHopIpv4Ipv4Address. + // PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter is ipv4 counter pattern + Increment() PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + // SetIncrement assigns PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter provided by user to PatternFlowRSVPPathRsvpHopIpv4Ipv4Address. + // PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter is ipv4 counter pattern + SetIncrement(value PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter, set in PatternFlowRSVPPathRsvpHopIpv4Ipv4Address. + // PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter is ipv4 counter pattern + Decrement() PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + // SetDecrement assigns PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter provided by user to PatternFlowRSVPPathRsvpHopIpv4Ipv4Address. + // PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter is ipv4 counter pattern + SetDecrement(value PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathRsvpHopIpv4Ipv4Address + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathRsvpHopIpv4Ipv4Address +var PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice = struct { + VALUE PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum + VALUES PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum + INCREMENT PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum + DECREMENT PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum +}{ + VALUE: PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum("value"), + VALUES: PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) Choice() PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum { + return PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) setChoice(value PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum) PatternFlowRSVPPathRsvpHopIpv4Ipv4Address { + intValue, ok := otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.VALUE { + defaultValue := "0.0.0.0" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.VALUES { + defaultValue := []string{"0.0.0.0"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter().msg() + } + + if value == PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowRSVPPathRsvpHopIpv4Ipv4Address object +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) SetValue(value string) PatternFlowRSVPPathRsvpHopIpv4Ipv4Address { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"0.0.0.0"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowRSVPPathRsvpHopIpv4Ipv4Address object +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) SetValues(value []string) PatternFlowRSVPPathRsvpHopIpv4Ipv4Address { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) Increment() PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter value in the PatternFlowRSVPPathRsvpHopIpv4Ipv4Address object +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) SetIncrement(value PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) PatternFlowRSVPPathRsvpHopIpv4Ipv4Address { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) Decrement() PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter value in the PatternFlowRSVPPathRsvpHopIpv4Ipv4Address object +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) SetDecrement(value PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) PatternFlowRSVPPathRsvpHopIpv4Ipv4Address { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv4(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateIpv4Slice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathRsvpHopIpv4Ipv4Address.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4Address) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathRsvpHopIpv4Ipv4Address") + } + } else { + intVal := otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_rsvp_hop_ipv4_ipv4_address_counter.go b/gosnappi/pattern_flow_rsvp_path_rsvp_hop_ipv4_ipv4_address_counter.go new file mode 100644 index 00000000..57b2241f --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_rsvp_hop_ipv4_ipv4_address_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter ***** +type patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter struct { + validation + obj *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + marshaller marshalPatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + unMarshaller unMarshalPatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter +} + +func NewPatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter() PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter { + obj := patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter{obj: &otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) msg() *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) setMsg(msg *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter struct { + obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter +} + +type marshalPatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter interface { + // ToProto marshals PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter to protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + ToProto() (*otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter, error) + // ToPbText marshals PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter struct { + obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter +} + +type unMarshalPatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter interface { + // FromProto unmarshals PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter from protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + FromProto(msg *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) (PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) Marshal() marshalPatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) Unmarshal() unMarshalPatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) ToProto() (*otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) FromProto(msg *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) (PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) Clone() (PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter is ipv4 counter pattern +type PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter interface { + Validation + // msg marshals PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter to protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + // setMsg unmarshals PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter from protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + // validate validates PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + SetStart(value string) PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + HasStart() bool + // Step returns string, set in PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + SetStep(value string) PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + SetCount(value uint32) PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter object +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) SetStart(value string) PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter object +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) SetStep(value string) PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter object +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) SetCount(value uint32) PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateIpv4(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateIpv4(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter.Step")) + } + + } + +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4Ipv4AddressCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("0.0.0.0") + } + if obj.obj.Step == nil { + obj.SetStep("0.0.0.1") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_rsvp_hop_ipv4_logical_interface_handle.go b/gosnappi/pattern_flow_rsvp_path_rsvp_hop_ipv4_logical_interface_handle.go new file mode 100644 index 00000000..0fc2f8ee --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_rsvp_hop_ipv4_logical_interface_handle.go @@ -0,0 +1,535 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle ***** +type patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle struct { + validation + obj *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + marshaller marshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + unMarshaller unMarshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + incrementHolder PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + decrementHolder PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter +} + +func NewPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle() PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle { + obj := patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle{obj: &otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) msg() *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle { + return obj.obj +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) setMsg(msg *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle struct { + obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle +} + +type marshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle interface { + // ToProto marshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle to protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + ToProto() (*otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle, error) + // ToPbText marshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle struct { + obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle +} + +type unMarshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle interface { + // FromProto unmarshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle from protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + FromProto(msg *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) (PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle, error) + // FromPbText unmarshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) Marshal() marshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) Unmarshal() unMarshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) ToProto() (*otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) FromProto(msg *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) (PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) Clone() (PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle is logical Interface Handle (LIH) is used to distinguish logical outgoing interfaces. A node receiving an LIH in a Path message saves its value and returns it in the HOP objects of subsequent Resv messages sent to the node that originated the LIH. The LIH should be identically zero if there is no logical interface handle. +type PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle interface { + Validation + // msg marshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle to protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + // setMsg unmarshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle from protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + // validate validates PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum, set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + Choice() PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum + // setChoice assigns PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum provided by user to PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + setChoice(value PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + // HasChoice checks if Choice has been set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + SetValue(value uint32) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + // HasValue checks if Value has been set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + SetValues(value []uint32) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + // Increment returns PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter, set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle. + // PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter is integer counter pattern + Increment() PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + // SetIncrement assigns PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter provided by user to PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle. + // PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter, set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle. + // PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter is integer counter pattern + Decrement() PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + // SetDecrement assigns PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter provided by user to PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle. + // PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle +var PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice = struct { + VALUE PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum + VALUES PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum + INCREMENT PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum + DECREMENT PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum +}{ + VALUE: PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum("value"), + VALUES: PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) Choice() PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum { + return PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) setChoice(value PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle { + intValue, ok := otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter().msg() + } + + if value == PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle object +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) SetValue(value uint32) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle object +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) SetValues(value []uint32) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) Increment() PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter value in the PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle object +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) SetIncrement(value PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) Decrement() PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter value in the PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle object +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) SetDecrement(value PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle") + } + } else { + intVal := otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_rsvp_hop_ipv4_logical_interface_handle_counter.go b/gosnappi/pattern_flow_rsvp_path_rsvp_hop_ipv4_logical_interface_handle_counter.go new file mode 100644 index 00000000..2f366c97 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_rsvp_hop_ipv4_logical_interface_handle_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter ***** +type patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter struct { + validation + obj *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + marshaller marshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + unMarshaller unMarshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter +} + +func NewPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter() PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter { + obj := patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter{obj: &otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) msg() *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) setMsg(msg *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter struct { + obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter +} + +type marshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter interface { + // ToProto marshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter to protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + ToProto() (*otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter, error) + // ToPbText marshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter struct { + obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter +} + +type unMarshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter interface { + // FromProto unmarshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter from protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + FromProto(msg *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) (PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) Marshal() marshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) Unmarshal() unMarshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) ToProto() (*otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) FromProto(msg *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) (PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) Clone() (PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter is integer counter pattern +type PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter interface { + Validation + // msg marshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter to protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + // setMsg unmarshals PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter from protobuf object *otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + // validate validates PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + SetStart(value uint32) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + SetStep(value uint32) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + SetCount(value uint32) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter object +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) SetStart(value uint32) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter object +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) SetStep(value uint32) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter object +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) SetCount(value uint32) PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandleCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_ipv4_tunnel_sender_address.go b/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_ipv4_tunnel_sender_address.go new file mode 100644 index 00000000..9469f553 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_ipv4_tunnel_sender_address.go @@ -0,0 +1,553 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress ***** +type patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress struct { + validation + obj *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + marshaller marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + unMarshaller unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + incrementHolder PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + decrementHolder PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter +} + +func NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress { + obj := patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress{obj: &otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) msg() *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) setMsg(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress struct { + obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress +} + +type marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress interface { + // ToProto marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress to protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + ToProto() (*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress, error) + // ToPbText marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress struct { + obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress +} + +type unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress from protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + FromProto(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) Marshal() marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) Unmarshal() unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) ToProto() (*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) FromProto(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) Clone() (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress is iPv4 address for a sender node. +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress to protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + // setMsg unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress from protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + // validate validates PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + Choice() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + setChoice(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + HasChoice() bool + // Value returns string, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress. + Value() string + // SetValue assigns string provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + SetValue(value string) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + HasValue() bool + // Values returns []string, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress. + Values() []string + // SetValues assigns []string provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + SetValues(value []string) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + // Increment returns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter is ipv4 counter pattern + Increment() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + // SetIncrement assigns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter is ipv4 counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter is ipv4 counter pattern + Decrement() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + // SetDecrement assigns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter is ipv4 counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress +var PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice = struct { + VALUE PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum + VALUES PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) Choice() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum { + return PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) setChoice(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress { + intValue, ok := otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.VALUE { + defaultValue := "0.0.0.0" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.VALUES { + defaultValue := []string{"0.0.0.0"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter().msg() + } + + if value == PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) SetValue(value string) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"0.0.0.0"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) SetValues(value []string) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) Increment() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) SetIncrement(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) Decrement() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) SetDecrement(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv4(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateIpv4Slice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_ipv4_tunnel_sender_address_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_ipv4_tunnel_sender_address_counter.go new file mode 100644 index 00000000..e6dfe349 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_ipv4_tunnel_sender_address_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter ***** +type patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + marshaller marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + unMarshaller unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter +} + +func NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter { + obj := patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter{obj: &otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) msg() *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) setMsg(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter struct { + obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter +} + +type marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter interface { + // ToProto marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter to protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + ToProto() (*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter struct { + obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter +} + +type unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter from protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + FromProto(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) Marshal() marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) ToProto() (*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) FromProto(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) Clone() (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter is ipv4 counter pattern +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter to protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + // setMsg unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter from protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + // validate validates PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + SetStart(value string) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + HasStart() bool + // Step returns string, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + SetStep(value string) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + SetCount(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) SetStart(value string) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) SetStep(value string) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) SetCount(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateIpv4(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateIpv4(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter.Step")) + } + + } + +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddressCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("0.0.0.0") + } + if obj.obj.Step == nil { + obj.SetStep("0.0.0.1") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_lsp_id.go b/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_lsp_id.go new file mode 100644 index 00000000..a63239af --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_lsp_id.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId ***** +type patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId struct { + validation + obj *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + marshaller marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + unMarshaller unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + incrementHolder PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + decrementHolder PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter +} + +func NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId { + obj := patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId{obj: &otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) msg() *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) setMsg(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId struct { + obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId +} + +type marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId interface { + // ToProto marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId to protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + ToProto() (*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId, error) + // ToPbText marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId struct { + obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId +} + +type unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId from protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + FromProto(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) Marshal() marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) Unmarshal() unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) ToProto() (*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) FromProto(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) Clone() (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId is a 16-bit identifier used in the SENDER_TEMPLATE that can be changed to allow a sender to share resources with itself. +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId to protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + // setMsg unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId from protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + // validate validates PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + Choice() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + setChoice(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + SetValue(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + SetValues(value []uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + // Increment returns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter is integer counter pattern + Increment() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + // SetIncrement assigns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + // SetDecrement assigns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId +var PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice = struct { + VALUE PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum + VALUES PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) Choice() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum { + return PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) setChoice(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId { + intValue, ok := otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.VALUE { + defaultValue := uint32(1) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.VALUES { + defaultValue := []uint32{1} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter().msg() + } + + if value == PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) SetValue(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{1}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) SetValues(value []uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) Increment() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) SetIncrement(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) Decrement() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) SetDecrement(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_lsp_id_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_lsp_id_counter.go new file mode 100644 index 00000000..b23cef53 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_lsp_id_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter ***** +type patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + marshaller marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + unMarshaller unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter +} + +func NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter { + obj := patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter{obj: &otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) msg() *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) setMsg(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter struct { + obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter +} + +type marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter interface { + // ToProto marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter to protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + ToProto() (*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter struct { + obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter +} + +type unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter from protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + FromProto(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) Marshal() marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) ToProto() (*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) FromProto(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) Clone() (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter is integer counter pattern +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter to protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + // setMsg unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter from protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + // validate validates PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + SetStart(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + SetStep(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + SetCount(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) SetStart(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) SetStep(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) SetCount(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4LspIdCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_reserved.go b/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_reserved.go new file mode 100644 index 00000000..0208e855 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_reserved.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved ***** +type patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved struct { + validation + obj *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + marshaller marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + unMarshaller unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + incrementHolder PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + decrementHolder PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter +} + +func NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved { + obj := patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved{obj: &otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) msg() *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) setMsg(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved struct { + obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved +} + +type marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved interface { + // ToProto marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved to protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + ToProto() (*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved, error) + // ToPbText marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved struct { + obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved +} + +type unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved from protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + FromProto(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) Marshal() marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) Unmarshal() unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) ToProto() (*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) FromProto(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) Clone() (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved is reserved field, MUST be zero. +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved to protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + // setMsg unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved from protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + // validate validates PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + Choice() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + setChoice(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + SetValue(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + SetValues(value []uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + // Increment returns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter is integer counter pattern + Increment() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + // SetIncrement assigns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + // SetDecrement assigns PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved. + // PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved +var PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice = struct { + VALUE PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum + VALUES PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) Choice() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum { + return PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) setChoice(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved { + intValue, ok := otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter().msg() + } + + if value == PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) SetValue(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) SetValues(value []uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) Increment() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) SetIncrement(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) Decrement() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) SetDecrement(value PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_reserved_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_reserved_counter.go new file mode 100644 index 00000000..f1437b5c --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_template_lsp_tunnel_ipv4_reserved_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter ***** +type patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + marshaller marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + unMarshaller unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter +} + +func NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter() PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter { + obj := patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter{obj: &otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) msg() *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) setMsg(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter struct { + obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter +} + +type marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter interface { + // ToProto marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter to protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + ToProto() (*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter struct { + obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter +} + +type unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter from protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + FromProto(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) Marshal() marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) ToProto() (*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) FromProto(msg *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) Clone() (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter is integer counter pattern +type PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter to protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + // setMsg unmarshals PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter from protobuf object *otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + // validate validates PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + SetStart(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + SetStep(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + SetCount(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) SetStart(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) SetStep(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter object +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) SetCount(value uint32) PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathSenderTemplateLspTunnelIpv4ReservedCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_length_of_service_data.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_length_of_service_data.go new file mode 100644 index 00000000..09a754f3 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_length_of_service_data.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData ***** +type patternFlowRSVPPathSenderTspecIntServLengthOfServiceData struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + marshaller marshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + incrementHolder PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + decrementHolder PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServLengthOfServiceData() PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData { + obj := patternFlowRSVPPathSenderTspecIntServLengthOfServiceData{obj: &otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) msg() *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceData struct { + obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData +} + +type marshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceData interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceData struct { + obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceData interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) (PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceData { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceData{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceData { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceData{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) (PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) Clone() (PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServLengthOfServiceData() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData is length of service data, 6 words not including per-service header. +type PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + // validate validates PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum, set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + Choice() PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum provided by user to PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + setChoice(value PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + // Increment returns PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter, set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData. + // PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter is integer counter pattern + Increment() PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + // SetIncrement assigns PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter provided by user to PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData. + // PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter, set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData. + // PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + // SetDecrement assigns PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter provided by user to PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData. + // PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData +var PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice = struct { + VALUE PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum + VALUES PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) Choice() PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum { + return PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) setChoice(value PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData { + intValue, ok := otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.VALUE { + defaultValue := uint32(6) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.VALUES { + defaultValue := []uint32{6} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter().msg() + } + + if value == PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData object +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{6}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData object +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) Increment() PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter value in the PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData object +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) SetIncrement(value PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) Decrement() PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter value in the PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData object +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) SetDecrement(value PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceData) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_length_of_service_data_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_length_of_service_data_counter.go new file mode 100644 index 00000000..74415e78 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_length_of_service_data_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter ***** +type patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + marshaller marshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter() PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter { + obj := patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter{obj: &otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) msg() *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter +} + +type marshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) (PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) (PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) Clone() (PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter is integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + // validate validates PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(6) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_maximum_packet_size.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_maximum_packet_size.go new file mode 100644 index 00000000..6d21b7ba --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_maximum_packet_size.go @@ -0,0 +1,535 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize ***** +type patternFlowRSVPPathSenderTspecIntServMaximumPacketSize struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + marshaller marshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + incrementHolder PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + decrementHolder PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServMaximumPacketSize() PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize { + obj := patternFlowRSVPPathSenderTspecIntServMaximumPacketSize{obj: &otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) msg() *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSize struct { + obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize +} + +type marshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSize interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSize struct { + obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSize interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) (PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSize { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSize{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSize { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSize{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) (PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) Clone() (PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServMaximumPacketSize() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize is the maximum packet size parameter should be set to the size of the largest packet the application might wish to generate. This value must, by definition, be equal to or larger than the value of The minimum policed unit. +type PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + // validate validates PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum, set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + Choice() PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum provided by user to PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + setChoice(value PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + // Increment returns PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter, set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize. + // PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter is integer counter pattern + Increment() PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + // SetIncrement assigns PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter provided by user to PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize. + // PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter, set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize. + // PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + // SetDecrement assigns PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter provided by user to PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize. + // PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize +var PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice = struct { + VALUE PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum + VALUES PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) Choice() PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum { + return PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) setChoice(value PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize { + intValue, ok := otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter().msg() + } + + if value == PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize object +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize object +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) Increment() PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter value in the PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize object +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) SetIncrement(value PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) Decrement() PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter value in the PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize object +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) SetDecrement(value PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSize) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_maximum_packet_size_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_maximum_packet_size_counter.go new file mode 100644 index 00000000..476792b7 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_maximum_packet_size_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter ***** +type patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + marshaller marshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter() PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter { + obj := patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter{obj: &otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) msg() *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter +} + +type marshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) (PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) (PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) Clone() (PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter is integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + // validate validates PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_minimum_policed_unit.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_minimum_policed_unit.go new file mode 100644 index 00000000..7fbcb4c9 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_minimum_policed_unit.go @@ -0,0 +1,535 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit ***** +type patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + marshaller marshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + incrementHolder PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + decrementHolder PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit() PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit { + obj := patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit{obj: &otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) msg() *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit struct { + obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit +} + +type marshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit struct { + obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) (PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) (PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) Clone() (PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit is the minimum policed unit parameter should generally be set equal to the size of the smallest packet generated by the application. +type PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + // validate validates PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum, set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + Choice() PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum provided by user to PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + setChoice(value PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + // Increment returns PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter, set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit. + // PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter is integer counter pattern + Increment() PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + // SetIncrement assigns PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter provided by user to PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit. + // PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter, set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit. + // PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + // SetDecrement assigns PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter provided by user to PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit. + // PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit +var PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice = struct { + VALUE PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum + VALUES PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) Choice() PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum { + return PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) setChoice(value PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit { + intValue, ok := otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter().msg() + } + + if value == PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit object +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit object +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) Increment() PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter value in the PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit object +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) SetIncrement(value PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) Decrement() PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter value in the PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit object +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) SetDecrement(value PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_minimum_policed_unit_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_minimum_policed_unit_counter.go new file mode 100644 index 00000000..40743587 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_minimum_policed_unit_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter ***** +type patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + marshaller marshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter() PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter { + obj := patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter{obj: &otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) msg() *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter +} + +type marshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) (PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) (PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) Clone() (PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter is integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + // validate validates PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_overall_length.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_overall_length.go new file mode 100644 index 00000000..3b8c637f --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_overall_length.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServOverallLength ***** +type patternFlowRSVPPathSenderTspecIntServOverallLength struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServOverallLength + marshaller marshalPatternFlowRSVPPathSenderTspecIntServOverallLength + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServOverallLength + incrementHolder PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + decrementHolder PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServOverallLength() PatternFlowRSVPPathSenderTspecIntServOverallLength { + obj := patternFlowRSVPPathSenderTspecIntServOverallLength{obj: &otg.PatternFlowRSVPPathSenderTspecIntServOverallLength{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) msg() *otg.PatternFlowRSVPPathSenderTspecIntServOverallLength { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServOverallLength) PatternFlowRSVPPathSenderTspecIntServOverallLength { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServOverallLength struct { + obj *patternFlowRSVPPathSenderTspecIntServOverallLength +} + +type marshalPatternFlowRSVPPathSenderTspecIntServOverallLength interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServOverallLength to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServOverallLength + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServOverallLength, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServOverallLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServOverallLength to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServOverallLength to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServOverallLength struct { + obj *patternFlowRSVPPathSenderTspecIntServOverallLength +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServOverallLength interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServOverallLength from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServOverallLength + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServOverallLength) (PatternFlowRSVPPathSenderTspecIntServOverallLength, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServOverallLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServOverallLength from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServOverallLength from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServOverallLength { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServOverallLength{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServOverallLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServOverallLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServOverallLength) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServOverallLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServOverallLength) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServOverallLength) (PatternFlowRSVPPathSenderTspecIntServOverallLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServOverallLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServOverallLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServOverallLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServOverallLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServOverallLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServOverallLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) Clone() (PatternFlowRSVPPathSenderTspecIntServOverallLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServOverallLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTspecIntServOverallLength is overall length (7 words not including header). +type PatternFlowRSVPPathSenderTspecIntServOverallLength interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServOverallLength to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServOverallLength + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServOverallLength + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServOverallLength from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServOverallLength + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServOverallLength) PatternFlowRSVPPathSenderTspecIntServOverallLength + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServOverallLength + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServOverallLength + // validate validates PatternFlowRSVPPathSenderTspecIntServOverallLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServOverallLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum, set in PatternFlowRSVPPathSenderTspecIntServOverallLength + Choice() PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum provided by user to PatternFlowRSVPPathSenderTspecIntServOverallLength + setChoice(value PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum) PatternFlowRSVPPathSenderTspecIntServOverallLength + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTspecIntServOverallLength + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSenderTspecIntServOverallLength. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServOverallLength + SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServOverallLength + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTspecIntServOverallLength + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSenderTspecIntServOverallLength. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServOverallLength + SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServOverallLength + // Increment returns PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter, set in PatternFlowRSVPPathSenderTspecIntServOverallLength. + // PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter is integer counter pattern + Increment() PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + // SetIncrement assigns PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter provided by user to PatternFlowRSVPPathSenderTspecIntServOverallLength. + // PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) PatternFlowRSVPPathSenderTspecIntServOverallLength + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTspecIntServOverallLength + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter, set in PatternFlowRSVPPathSenderTspecIntServOverallLength. + // PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + // SetDecrement assigns PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter provided by user to PatternFlowRSVPPathSenderTspecIntServOverallLength. + // PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) PatternFlowRSVPPathSenderTspecIntServOverallLength + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTspecIntServOverallLength + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTspecIntServOverallLength +var PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice = struct { + VALUE PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum + VALUES PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) Choice() PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum { + return PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) setChoice(value PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum) PatternFlowRSVPPathSenderTspecIntServOverallLength { + intValue, ok := otg.PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.VALUE { + defaultValue := uint32(7) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.VALUES { + defaultValue := []uint32{7} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTspecIntServOverallLengthCounter().msg() + } + + if value == PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTspecIntServOverallLengthCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServOverallLength object +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServOverallLength { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{7}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSenderTspecIntServOverallLength object +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServOverallLength { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) Increment() PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTspecIntServOverallLengthCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter value in the PatternFlowRSVPPathSenderTspecIntServOverallLength object +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) SetIncrement(value PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) PatternFlowRSVPPathSenderTspecIntServOverallLength { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) Decrement() PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTspecIntServOverallLengthCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter value in the PatternFlowRSVPPathSenderTspecIntServOverallLength object +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) SetDecrement(value PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) PatternFlowRSVPPathSenderTspecIntServOverallLength { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServOverallLength.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathSenderTspecIntServOverallLength.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLength) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTspecIntServOverallLengthChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServOverallLengthChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTspecIntServOverallLength") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServOverallLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_overall_length_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_overall_length_counter.go new file mode 100644 index 00000000..dddb895c --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_overall_length_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter ***** +type patternFlowRSVPPathSenderTspecIntServOverallLengthCounter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + marshaller marshalPatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServOverallLengthCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServOverallLengthCounter() PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter { + obj := patternFlowRSVPPathSenderTspecIntServOverallLengthCounter{obj: &otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) msg() *otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServOverallLengthCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter +} + +type marshalPatternFlowRSVPPathSenderTspecIntServOverallLengthCounter interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServOverallLengthCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServOverallLengthCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) (PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServOverallLengthCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServOverallLengthCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServOverallLengthCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServOverallLengthCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) (PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) Clone() (PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServOverallLengthCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter is integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter) PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + // validate validates PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServOverallLengthCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(7) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter127_flag.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter127_flag.go new file mode 100644 index 00000000..8213ae10 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter127_flag.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServParameter127Flag ***** +type patternFlowRSVPPathSenderTspecIntServParameter127Flag struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag + marshaller marshalPatternFlowRSVPPathSenderTspecIntServParameter127Flag + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127Flag + incrementHolder PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + decrementHolder PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServParameter127Flag() PatternFlowRSVPPathSenderTspecIntServParameter127Flag { + obj := patternFlowRSVPPathSenderTspecIntServParameter127Flag{obj: &otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) msg() *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag) PatternFlowRSVPPathSenderTspecIntServParameter127Flag { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServParameter127Flag struct { + obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag +} + +type marshalPatternFlowRSVPPathSenderTspecIntServParameter127Flag interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServParameter127Flag to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServParameter127Flag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServParameter127Flag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServParameter127Flag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127Flag struct { + obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127Flag interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127Flag from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag) (PatternFlowRSVPPathSenderTspecIntServParameter127Flag, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127Flag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127Flag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127Flag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServParameter127Flag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServParameter127Flag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127Flag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127Flag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127Flag) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127Flag) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag) (PatternFlowRSVPPathSenderTspecIntServParameter127Flag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127Flag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127Flag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127Flag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127Flag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127Flag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127Flag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) Clone() (PatternFlowRSVPPathSenderTspecIntServParameter127Flag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServParameter127Flag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTspecIntServParameter127Flag is parameter 127 flags (none set) +type PatternFlowRSVPPathSenderTspecIntServParameter127Flag interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServParameter127Flag to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127Flag from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag) PatternFlowRSVPPathSenderTspecIntServParameter127Flag + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServParameter127Flag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127Flag + // validate validates PatternFlowRSVPPathSenderTspecIntServParameter127Flag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServParameter127Flag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum, set in PatternFlowRSVPPathSenderTspecIntServParameter127Flag + Choice() PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127Flag + setChoice(value PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum) PatternFlowRSVPPathSenderTspecIntServParameter127Flag + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTspecIntServParameter127Flag + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSenderTspecIntServParameter127Flag. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127Flag + SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127Flag + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTspecIntServParameter127Flag + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSenderTspecIntServParameter127Flag. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127Flag + SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServParameter127Flag + // Increment returns PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter, set in PatternFlowRSVPPathSenderTspecIntServParameter127Flag. + // PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter is integer counter pattern + Increment() PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + // SetIncrement assigns PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127Flag. + // PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) PatternFlowRSVPPathSenderTspecIntServParameter127Flag + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTspecIntServParameter127Flag + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter, set in PatternFlowRSVPPathSenderTspecIntServParameter127Flag. + // PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + // SetDecrement assigns PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127Flag. + // PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) PatternFlowRSVPPathSenderTspecIntServParameter127Flag + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTspecIntServParameter127Flag + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTspecIntServParameter127Flag +var PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice = struct { + VALUE PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum + VALUES PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) Choice() PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum { + return PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) setChoice(value PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum) PatternFlowRSVPPathSenderTspecIntServParameter127Flag { + intValue, ok := otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter().msg() + } + + if value == PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameter127Flag object +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127Flag { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameter127Flag object +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServParameter127Flag { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) Increment() PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter value in the PatternFlowRSVPPathSenderTspecIntServParameter127Flag object +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) SetIncrement(value PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) PatternFlowRSVPPathSenderTspecIntServParameter127Flag { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) Decrement() PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter value in the PatternFlowRSVPPathSenderTspecIntServParameter127Flag object +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) SetDecrement(value PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) PatternFlowRSVPPathSenderTspecIntServParameter127Flag { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServParameter127Flag.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathSenderTspecIntServParameter127Flag.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Flag) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127FlagChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTspecIntServParameter127Flag") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter127_flag_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter127_flag_counter.go new file mode 100644 index 00000000..c67fc565 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter127_flag_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter ***** +type patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + marshaller marshalPatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter() PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter { + obj := patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter{obj: &otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) msg() *otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter +} + +type marshalPatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) (PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) (PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) Clone() (PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter is integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + // validate validates PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServParameter127FlagCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127FlagCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter127_length.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter127_length.go new file mode 100644 index 00000000..15513070 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter127_length.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServParameter127Length ***** +type patternFlowRSVPPathSenderTspecIntServParameter127Length struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length + marshaller marshalPatternFlowRSVPPathSenderTspecIntServParameter127Length + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127Length + incrementHolder PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + decrementHolder PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServParameter127Length() PatternFlowRSVPPathSenderTspecIntServParameter127Length { + obj := patternFlowRSVPPathSenderTspecIntServParameter127Length{obj: &otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) msg() *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length) PatternFlowRSVPPathSenderTspecIntServParameter127Length { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServParameter127Length struct { + obj *patternFlowRSVPPathSenderTspecIntServParameter127Length +} + +type marshalPatternFlowRSVPPathSenderTspecIntServParameter127Length interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServParameter127Length to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServParameter127Length to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServParameter127Length to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServParameter127Length to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127Length struct { + obj *patternFlowRSVPPathSenderTspecIntServParameter127Length +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127Length interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127Length from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length) (PatternFlowRSVPPathSenderTspecIntServParameter127Length, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127Length from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127Length from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127Length from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServParameter127Length { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServParameter127Length{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127Length { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127Length{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127Length) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127Length) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length) (PatternFlowRSVPPathSenderTspecIntServParameter127Length, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127Length) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127Length) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127Length) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127Length) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127Length) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127Length) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) Clone() (PatternFlowRSVPPathSenderTspecIntServParameter127Length, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServParameter127Length() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTspecIntServParameter127Length is parameter 127 length, 5 words not including per-service header +type PatternFlowRSVPPathSenderTspecIntServParameter127Length interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServParameter127Length to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127Length from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length) PatternFlowRSVPPathSenderTspecIntServParameter127Length + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServParameter127Length + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127Length + // validate validates PatternFlowRSVPPathSenderTspecIntServParameter127Length + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServParameter127Length, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum, set in PatternFlowRSVPPathSenderTspecIntServParameter127Length + Choice() PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127Length + setChoice(value PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum) PatternFlowRSVPPathSenderTspecIntServParameter127Length + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTspecIntServParameter127Length + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSenderTspecIntServParameter127Length. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127Length + SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127Length + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTspecIntServParameter127Length + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSenderTspecIntServParameter127Length. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127Length + SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServParameter127Length + // Increment returns PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter, set in PatternFlowRSVPPathSenderTspecIntServParameter127Length. + // PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter is integer counter pattern + Increment() PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + // SetIncrement assigns PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127Length. + // PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) PatternFlowRSVPPathSenderTspecIntServParameter127Length + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTspecIntServParameter127Length + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter, set in PatternFlowRSVPPathSenderTspecIntServParameter127Length. + // PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + // SetDecrement assigns PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127Length. + // PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) PatternFlowRSVPPathSenderTspecIntServParameter127Length + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTspecIntServParameter127Length + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTspecIntServParameter127Length +var PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice = struct { + VALUE PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum + VALUES PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) Choice() PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum { + return PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) setChoice(value PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum) PatternFlowRSVPPathSenderTspecIntServParameter127Length { + intValue, ok := otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.VALUE { + defaultValue := uint32(5) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.VALUES { + defaultValue := []uint32{5} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter().msg() + } + + if value == PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameter127Length object +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127Length { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{5}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameter127Length object +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServParameter127Length { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) Increment() PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter value in the PatternFlowRSVPPathSenderTspecIntServParameter127Length object +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) SetIncrement(value PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) PatternFlowRSVPPathSenderTspecIntServParameter127Length { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) Decrement() PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter value in the PatternFlowRSVPPathSenderTspecIntServParameter127Length object +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) SetDecrement(value PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) PatternFlowRSVPPathSenderTspecIntServParameter127Length { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServParameter127Length.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathSenderTspecIntServParameter127Length.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127Length) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameter127LengthChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTspecIntServParameter127Length") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter127_length_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter127_length_counter.go new file mode 100644 index 00000000..7b810e0d --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter127_length_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter ***** +type patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + marshaller marshalPatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter() PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter { + obj := patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter{obj: &otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) msg() *otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter +} + +type marshalPatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) (PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) (PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) Clone() (PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter is integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + // validate validates PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameter127LengthCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(5) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter_id_token_bucket_tspec.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter_id_token_bucket_tspec.go new file mode 100644 index 00000000..43ef3c89 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter_id_token_bucket_tspec.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec ***** +type patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + marshaller marshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + incrementHolder PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + decrementHolder PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec() PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec { + obj := patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec{obj: &otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) msg() *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec struct { + obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec +} + +type marshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec struct { + obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) (PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) (PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) Clone() (PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec is parameter ID, parameter 127 (Token Bucket TSpec) +type PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + // validate validates PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum, set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + Choice() PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum provided by user to PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + setChoice(value PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + // Increment returns PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter, set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec. + // PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter is integer counter pattern + Increment() PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + // SetIncrement assigns PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter provided by user to PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec. + // PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter, set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec. + // PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + // SetDecrement assigns PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter provided by user to PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec. + // PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec +var PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice = struct { + VALUE PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum + VALUES PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) Choice() PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum { + return PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) setChoice(value PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec { + intValue, ok := otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.VALUE { + defaultValue := uint32(127) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.VALUES { + defaultValue := []uint32{127} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter().msg() + } + + if value == PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec object +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{127}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec object +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) Increment() PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter value in the PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec object +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) SetIncrement(value PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) Decrement() PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter value in the PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec object +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) SetDecrement(value PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter_id_token_bucket_tspec_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter_id_token_bucket_tspec_counter.go new file mode 100644 index 00000000..a9773782 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_parameter_id_token_bucket_tspec_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter ***** +type patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + marshaller marshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter() PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter { + obj := patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter{obj: &otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) msg() *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter +} + +type marshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) (PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) (PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) Clone() (PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter is integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + // validate validates PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(127) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_reserved1.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_reserved1.go new file mode 100644 index 00000000..e41a4b62 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_reserved1.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServReserved1 ***** +type patternFlowRSVPPathSenderTspecIntServReserved1 struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServReserved1 + marshaller marshalPatternFlowRSVPPathSenderTspecIntServReserved1 + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServReserved1 + incrementHolder PatternFlowRSVPPathSenderTspecIntServReserved1Counter + decrementHolder PatternFlowRSVPPathSenderTspecIntServReserved1Counter +} + +func NewPatternFlowRSVPPathSenderTspecIntServReserved1() PatternFlowRSVPPathSenderTspecIntServReserved1 { + obj := patternFlowRSVPPathSenderTspecIntServReserved1{obj: &otg.PatternFlowRSVPPathSenderTspecIntServReserved1{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) msg() *otg.PatternFlowRSVPPathSenderTspecIntServReserved1 { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServReserved1) PatternFlowRSVPPathSenderTspecIntServReserved1 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServReserved1 struct { + obj *patternFlowRSVPPathSenderTspecIntServReserved1 +} + +type marshalPatternFlowRSVPPathSenderTspecIntServReserved1 interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServReserved1 to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved1 + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServReserved1, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServReserved1 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServReserved1 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServReserved1 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServReserved1 struct { + obj *patternFlowRSVPPathSenderTspecIntServReserved1 +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServReserved1 interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServReserved1 from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved1 + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServReserved1) (PatternFlowRSVPPathSenderTspecIntServReserved1, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServReserved1 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServReserved1 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServReserved1 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServReserved1 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServReserved1{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServReserved1 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServReserved1{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved1) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServReserved1, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved1) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServReserved1) (PatternFlowRSVPPathSenderTspecIntServReserved1, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved1) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved1) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved1) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved1) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved1) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved1) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) Clone() (PatternFlowRSVPPathSenderTspecIntServReserved1, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServReserved1() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTspecIntServReserved1 is reserved. +type PatternFlowRSVPPathSenderTspecIntServReserved1 interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServReserved1 to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved1 + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServReserved1 + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServReserved1 from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved1 + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServReserved1) PatternFlowRSVPPathSenderTspecIntServReserved1 + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServReserved1 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServReserved1 + // validate validates PatternFlowRSVPPathSenderTspecIntServReserved1 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServReserved1, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum, set in PatternFlowRSVPPathSenderTspecIntServReserved1 + Choice() PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum provided by user to PatternFlowRSVPPathSenderTspecIntServReserved1 + setChoice(value PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum) PatternFlowRSVPPathSenderTspecIntServReserved1 + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTspecIntServReserved1 + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSenderTspecIntServReserved1. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServReserved1 + SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved1 + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTspecIntServReserved1 + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSenderTspecIntServReserved1. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServReserved1 + SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServReserved1 + // Increment returns PatternFlowRSVPPathSenderTspecIntServReserved1Counter, set in PatternFlowRSVPPathSenderTspecIntServReserved1. + // PatternFlowRSVPPathSenderTspecIntServReserved1Counter is integer counter pattern + Increment() PatternFlowRSVPPathSenderTspecIntServReserved1Counter + // SetIncrement assigns PatternFlowRSVPPathSenderTspecIntServReserved1Counter provided by user to PatternFlowRSVPPathSenderTspecIntServReserved1. + // PatternFlowRSVPPathSenderTspecIntServReserved1Counter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTspecIntServReserved1Counter) PatternFlowRSVPPathSenderTspecIntServReserved1 + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTspecIntServReserved1 + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTspecIntServReserved1Counter, set in PatternFlowRSVPPathSenderTspecIntServReserved1. + // PatternFlowRSVPPathSenderTspecIntServReserved1Counter is integer counter pattern + Decrement() PatternFlowRSVPPathSenderTspecIntServReserved1Counter + // SetDecrement assigns PatternFlowRSVPPathSenderTspecIntServReserved1Counter provided by user to PatternFlowRSVPPathSenderTspecIntServReserved1. + // PatternFlowRSVPPathSenderTspecIntServReserved1Counter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTspecIntServReserved1Counter) PatternFlowRSVPPathSenderTspecIntServReserved1 + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTspecIntServReserved1 + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTspecIntServReserved1 +var PatternFlowRSVPPathSenderTspecIntServReserved1Choice = struct { + VALUE PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum + VALUES PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) Choice() PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum { + return PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) setChoice(value PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum) PatternFlowRSVPPathSenderTspecIntServReserved1 { + intValue, ok := otg.PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTspecIntServReserved1Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServReserved1Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServReserved1Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTspecIntServReserved1Counter().msg() + } + + if value == PatternFlowRSVPPathSenderTspecIntServReserved1Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTspecIntServReserved1Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved1Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServReserved1 object +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved1 { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved1Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSenderTspecIntServReserved1 object +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServReserved1 { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved1Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServReserved1Counter +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) Increment() PatternFlowRSVPPathSenderTspecIntServReserved1Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved1Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTspecIntServReserved1Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServReserved1Counter +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTspecIntServReserved1Counter value in the PatternFlowRSVPPathSenderTspecIntServReserved1 object +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) SetIncrement(value PatternFlowRSVPPathSenderTspecIntServReserved1Counter) PatternFlowRSVPPathSenderTspecIntServReserved1 { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved1Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServReserved1Counter +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) Decrement() PatternFlowRSVPPathSenderTspecIntServReserved1Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved1Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTspecIntServReserved1Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServReserved1Counter +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTspecIntServReserved1Counter value in the PatternFlowRSVPPathSenderTspecIntServReserved1 object +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) SetDecrement(value PatternFlowRSVPPathSenderTspecIntServReserved1Counter) PatternFlowRSVPPathSenderTspecIntServReserved1 { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved1Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServReserved1.Value <= 4095 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathSenderTspecIntServReserved1.Values <= 4095 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTspecIntServReserved1ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServReserved1Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServReserved1Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServReserved1Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServReserved1Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved1Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTspecIntServReserved1") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServReserved1_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_reserved1_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_reserved1_counter.go new file mode 100644 index 00000000..3be67fa8 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_reserved1_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServReserved1Counter ***** +type patternFlowRSVPPathSenderTspecIntServReserved1Counter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter + marshaller marshalPatternFlowRSVPPathSenderTspecIntServReserved1Counter + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServReserved1Counter +} + +func NewPatternFlowRSVPPathSenderTspecIntServReserved1Counter() PatternFlowRSVPPathSenderTspecIntServReserved1Counter { + obj := patternFlowRSVPPathSenderTspecIntServReserved1Counter{obj: &otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) msg() *otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter) PatternFlowRSVPPathSenderTspecIntServReserved1Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServReserved1Counter struct { + obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter +} + +type marshalPatternFlowRSVPPathSenderTspecIntServReserved1Counter interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServReserved1Counter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServReserved1Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServReserved1Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServReserved1Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServReserved1Counter struct { + obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServReserved1Counter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServReserved1Counter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter) (PatternFlowRSVPPathSenderTspecIntServReserved1Counter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServReserved1Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServReserved1Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServReserved1Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServReserved1Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServReserved1Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServReserved1Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServReserved1Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved1Counter) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved1Counter) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter) (PatternFlowRSVPPathSenderTspecIntServReserved1Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved1Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved1Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved1Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved1Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved1Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved1Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) Clone() (PatternFlowRSVPPathSenderTspecIntServReserved1Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServReserved1Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTspecIntServReserved1Counter is integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServReserved1Counter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServReserved1Counter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServReserved1Counter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServReserved1Counter) PatternFlowRSVPPathSenderTspecIntServReserved1Counter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServReserved1Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServReserved1Counter + // validate validates PatternFlowRSVPPathSenderTspecIntServReserved1Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServReserved1Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSenderTspecIntServReserved1Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServReserved1Counter + SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved1Counter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTspecIntServReserved1Counter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSenderTspecIntServReserved1Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServReserved1Counter + SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved1Counter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTspecIntServReserved1Counter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTspecIntServReserved1Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServReserved1Counter + SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved1Counter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTspecIntServReserved1Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServReserved1Counter object +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved1Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServReserved1Counter object +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved1Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServReserved1Counter object +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved1Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServReserved1Counter.Start <= 4095 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServReserved1Counter.Step <= 4095 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServReserved1Counter.Count <= 4095 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved1Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_reserved2.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_reserved2.go new file mode 100644 index 00000000..1a4fa3a5 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_reserved2.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServReserved2 ***** +type patternFlowRSVPPathSenderTspecIntServReserved2 struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServReserved2 + marshaller marshalPatternFlowRSVPPathSenderTspecIntServReserved2 + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServReserved2 + incrementHolder PatternFlowRSVPPathSenderTspecIntServReserved2Counter + decrementHolder PatternFlowRSVPPathSenderTspecIntServReserved2Counter +} + +func NewPatternFlowRSVPPathSenderTspecIntServReserved2() PatternFlowRSVPPathSenderTspecIntServReserved2 { + obj := patternFlowRSVPPathSenderTspecIntServReserved2{obj: &otg.PatternFlowRSVPPathSenderTspecIntServReserved2{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) msg() *otg.PatternFlowRSVPPathSenderTspecIntServReserved2 { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServReserved2) PatternFlowRSVPPathSenderTspecIntServReserved2 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServReserved2 struct { + obj *patternFlowRSVPPathSenderTspecIntServReserved2 +} + +type marshalPatternFlowRSVPPathSenderTspecIntServReserved2 interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServReserved2 to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved2 + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServReserved2, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServReserved2 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServReserved2 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServReserved2 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServReserved2 struct { + obj *patternFlowRSVPPathSenderTspecIntServReserved2 +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServReserved2 interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServReserved2 from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved2 + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServReserved2) (PatternFlowRSVPPathSenderTspecIntServReserved2, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServReserved2 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServReserved2 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServReserved2 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServReserved2 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServReserved2{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServReserved2 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServReserved2{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved2) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServReserved2, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved2) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServReserved2) (PatternFlowRSVPPathSenderTspecIntServReserved2, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved2) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved2) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved2) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved2) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved2) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved2) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) Clone() (PatternFlowRSVPPathSenderTspecIntServReserved2, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServReserved2() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTspecIntServReserved2 is reserved. +type PatternFlowRSVPPathSenderTspecIntServReserved2 interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServReserved2 to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved2 + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServReserved2 + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServReserved2 from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved2 + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServReserved2) PatternFlowRSVPPathSenderTspecIntServReserved2 + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServReserved2 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServReserved2 + // validate validates PatternFlowRSVPPathSenderTspecIntServReserved2 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServReserved2, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum, set in PatternFlowRSVPPathSenderTspecIntServReserved2 + Choice() PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum provided by user to PatternFlowRSVPPathSenderTspecIntServReserved2 + setChoice(value PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum) PatternFlowRSVPPathSenderTspecIntServReserved2 + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTspecIntServReserved2 + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSenderTspecIntServReserved2. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServReserved2 + SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved2 + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTspecIntServReserved2 + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSenderTspecIntServReserved2. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServReserved2 + SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServReserved2 + // Increment returns PatternFlowRSVPPathSenderTspecIntServReserved2Counter, set in PatternFlowRSVPPathSenderTspecIntServReserved2. + // PatternFlowRSVPPathSenderTspecIntServReserved2Counter is integer counter pattern + Increment() PatternFlowRSVPPathSenderTspecIntServReserved2Counter + // SetIncrement assigns PatternFlowRSVPPathSenderTspecIntServReserved2Counter provided by user to PatternFlowRSVPPathSenderTspecIntServReserved2. + // PatternFlowRSVPPathSenderTspecIntServReserved2Counter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTspecIntServReserved2Counter) PatternFlowRSVPPathSenderTspecIntServReserved2 + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTspecIntServReserved2 + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTspecIntServReserved2Counter, set in PatternFlowRSVPPathSenderTspecIntServReserved2. + // PatternFlowRSVPPathSenderTspecIntServReserved2Counter is integer counter pattern + Decrement() PatternFlowRSVPPathSenderTspecIntServReserved2Counter + // SetDecrement assigns PatternFlowRSVPPathSenderTspecIntServReserved2Counter provided by user to PatternFlowRSVPPathSenderTspecIntServReserved2. + // PatternFlowRSVPPathSenderTspecIntServReserved2Counter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTspecIntServReserved2Counter) PatternFlowRSVPPathSenderTspecIntServReserved2 + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTspecIntServReserved2 + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTspecIntServReserved2 +var PatternFlowRSVPPathSenderTspecIntServReserved2Choice = struct { + VALUE PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum + VALUES PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) Choice() PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum { + return PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) setChoice(value PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum) PatternFlowRSVPPathSenderTspecIntServReserved2 { + intValue, ok := otg.PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTspecIntServReserved2Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServReserved2Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServReserved2Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTspecIntServReserved2Counter().msg() + } + + if value == PatternFlowRSVPPathSenderTspecIntServReserved2Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTspecIntServReserved2Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved2Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServReserved2 object +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved2 { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved2Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSenderTspecIntServReserved2 object +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServReserved2 { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved2Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServReserved2Counter +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) Increment() PatternFlowRSVPPathSenderTspecIntServReserved2Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved2Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTspecIntServReserved2Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServReserved2Counter +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTspecIntServReserved2Counter value in the PatternFlowRSVPPathSenderTspecIntServReserved2 object +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) SetIncrement(value PatternFlowRSVPPathSenderTspecIntServReserved2Counter) PatternFlowRSVPPathSenderTspecIntServReserved2 { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved2Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServReserved2Counter +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) Decrement() PatternFlowRSVPPathSenderTspecIntServReserved2Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved2Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTspecIntServReserved2Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServReserved2Counter +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTspecIntServReserved2Counter value in the PatternFlowRSVPPathSenderTspecIntServReserved2 object +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) SetDecrement(value PatternFlowRSVPPathSenderTspecIntServReserved2Counter) PatternFlowRSVPPathSenderTspecIntServReserved2 { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved2Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 127 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServReserved2.Value <= 127 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 127 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathSenderTspecIntServReserved2.Values <= 127 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTspecIntServReserved2ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServReserved2Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServReserved2Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServReserved2Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServReserved2Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServReserved2Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTspecIntServReserved2") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServReserved2_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_reserved2_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_reserved2_counter.go new file mode 100644 index 00000000..e01444b8 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_reserved2_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServReserved2Counter ***** +type patternFlowRSVPPathSenderTspecIntServReserved2Counter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter + marshaller marshalPatternFlowRSVPPathSenderTspecIntServReserved2Counter + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServReserved2Counter +} + +func NewPatternFlowRSVPPathSenderTspecIntServReserved2Counter() PatternFlowRSVPPathSenderTspecIntServReserved2Counter { + obj := patternFlowRSVPPathSenderTspecIntServReserved2Counter{obj: &otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) msg() *otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter) PatternFlowRSVPPathSenderTspecIntServReserved2Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServReserved2Counter struct { + obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter +} + +type marshalPatternFlowRSVPPathSenderTspecIntServReserved2Counter interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServReserved2Counter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServReserved2Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServReserved2Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServReserved2Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServReserved2Counter struct { + obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServReserved2Counter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServReserved2Counter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter) (PatternFlowRSVPPathSenderTspecIntServReserved2Counter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServReserved2Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServReserved2Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServReserved2Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServReserved2Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServReserved2Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServReserved2Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServReserved2Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved2Counter) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved2Counter) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter) (PatternFlowRSVPPathSenderTspecIntServReserved2Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved2Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved2Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved2Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved2Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServReserved2Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServReserved2Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) Clone() (PatternFlowRSVPPathSenderTspecIntServReserved2Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServReserved2Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTspecIntServReserved2Counter is integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServReserved2Counter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServReserved2Counter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServReserved2Counter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter) PatternFlowRSVPPathSenderTspecIntServReserved2Counter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServReserved2Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServReserved2Counter + // validate validates PatternFlowRSVPPathSenderTspecIntServReserved2Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServReserved2Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSenderTspecIntServReserved2Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServReserved2Counter + SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved2Counter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTspecIntServReserved2Counter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSenderTspecIntServReserved2Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServReserved2Counter + SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved2Counter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTspecIntServReserved2Counter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTspecIntServReserved2Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServReserved2Counter + SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved2Counter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTspecIntServReserved2Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServReserved2Counter object +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved2Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServReserved2Counter object +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved2Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServReserved2Counter object +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServReserved2Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 127 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServReserved2Counter.Start <= 127 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 127 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServReserved2Counter.Step <= 127 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 127 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServReserved2Counter.Count <= 127 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServReserved2Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_service_header.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_service_header.go new file mode 100644 index 00000000..71ea962a --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_service_header.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServServiceHeader ***** +type patternFlowRSVPPathSenderTspecIntServServiceHeader struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader + marshaller marshalPatternFlowRSVPPathSenderTspecIntServServiceHeader + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServServiceHeader + incrementHolder PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + decrementHolder PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServServiceHeader() PatternFlowRSVPPathSenderTspecIntServServiceHeader { + obj := patternFlowRSVPPathSenderTspecIntServServiceHeader{obj: &otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) msg() *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader) PatternFlowRSVPPathSenderTspecIntServServiceHeader { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServServiceHeader struct { + obj *patternFlowRSVPPathSenderTspecIntServServiceHeader +} + +type marshalPatternFlowRSVPPathSenderTspecIntServServiceHeader interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServServiceHeader to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServServiceHeader to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServServiceHeader to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServServiceHeader to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServServiceHeader struct { + obj *patternFlowRSVPPathSenderTspecIntServServiceHeader +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServServiceHeader interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServServiceHeader from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader) (PatternFlowRSVPPathSenderTspecIntServServiceHeader, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServServiceHeader from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServServiceHeader from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServServiceHeader from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServServiceHeader { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServServiceHeader{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServServiceHeader { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServServiceHeader{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServServiceHeader) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServServiceHeader) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader) (PatternFlowRSVPPathSenderTspecIntServServiceHeader, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServServiceHeader) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServServiceHeader) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServServiceHeader) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServServiceHeader) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServServiceHeader) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServServiceHeader) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) Clone() (PatternFlowRSVPPathSenderTspecIntServServiceHeader, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServServiceHeader() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTspecIntServServiceHeader is service header, service number - '1' (Generic information) if in a PATH message. +type PatternFlowRSVPPathSenderTspecIntServServiceHeader interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServServiceHeader to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServServiceHeader from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader) PatternFlowRSVPPathSenderTspecIntServServiceHeader + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServServiceHeader + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServServiceHeader + // validate validates PatternFlowRSVPPathSenderTspecIntServServiceHeader + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServServiceHeader, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum, set in PatternFlowRSVPPathSenderTspecIntServServiceHeader + Choice() PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum provided by user to PatternFlowRSVPPathSenderTspecIntServServiceHeader + setChoice(value PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum) PatternFlowRSVPPathSenderTspecIntServServiceHeader + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTspecIntServServiceHeader + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSenderTspecIntServServiceHeader. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServServiceHeader + SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServServiceHeader + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTspecIntServServiceHeader + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSenderTspecIntServServiceHeader. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServServiceHeader + SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServServiceHeader + // Increment returns PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter, set in PatternFlowRSVPPathSenderTspecIntServServiceHeader. + // PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter is integer counter pattern + Increment() PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + // SetIncrement assigns PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter provided by user to PatternFlowRSVPPathSenderTspecIntServServiceHeader. + // PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) PatternFlowRSVPPathSenderTspecIntServServiceHeader + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTspecIntServServiceHeader + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter, set in PatternFlowRSVPPathSenderTspecIntServServiceHeader. + // PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + // SetDecrement assigns PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter provided by user to PatternFlowRSVPPathSenderTspecIntServServiceHeader. + // PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) PatternFlowRSVPPathSenderTspecIntServServiceHeader + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTspecIntServServiceHeader + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTspecIntServServiceHeader +var PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice = struct { + VALUE PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum + VALUES PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) Choice() PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum { + return PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) setChoice(value PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum) PatternFlowRSVPPathSenderTspecIntServServiceHeader { + intValue, ok := otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.VALUE { + defaultValue := uint32(1) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.VALUES { + defaultValue := []uint32{1} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter().msg() + } + + if value == PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServServiceHeader object +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServServiceHeader { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{1}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSenderTspecIntServServiceHeader object +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServServiceHeader { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) Increment() PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter value in the PatternFlowRSVPPathSenderTspecIntServServiceHeader object +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) SetIncrement(value PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) PatternFlowRSVPPathSenderTspecIntServServiceHeader { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) Decrement() PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter value in the PatternFlowRSVPPathSenderTspecIntServServiceHeader object +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) SetDecrement(value PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) PatternFlowRSVPPathSenderTspecIntServServiceHeader { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServServiceHeader.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathSenderTspecIntServServiceHeader.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeader) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServServiceHeaderChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTspecIntServServiceHeader") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_service_header_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_service_header_counter.go new file mode 100644 index 00000000..d07d7358 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_service_header_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter ***** +type patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + marshaller marshalPatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter() PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter { + obj := patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter{obj: &otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) msg() *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter +} + +type marshalPatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) (PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) (PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) Clone() (PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter is integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + // validate validates PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServServiceHeaderCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_version.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_version.go new file mode 100644 index 00000000..abd78795 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_version.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServVersion ***** +type patternFlowRSVPPathSenderTspecIntServVersion struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServVersion + marshaller marshalPatternFlowRSVPPathSenderTspecIntServVersion + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServVersion + incrementHolder PatternFlowRSVPPathSenderTspecIntServVersionCounter + decrementHolder PatternFlowRSVPPathSenderTspecIntServVersionCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServVersion() PatternFlowRSVPPathSenderTspecIntServVersion { + obj := patternFlowRSVPPathSenderTspecIntServVersion{obj: &otg.PatternFlowRSVPPathSenderTspecIntServVersion{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) msg() *otg.PatternFlowRSVPPathSenderTspecIntServVersion { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServVersion) PatternFlowRSVPPathSenderTspecIntServVersion { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServVersion struct { + obj *patternFlowRSVPPathSenderTspecIntServVersion +} + +type marshalPatternFlowRSVPPathSenderTspecIntServVersion interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServVersion to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServVersion + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServVersion, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServVersion to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServVersion to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServVersion to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServVersion struct { + obj *patternFlowRSVPPathSenderTspecIntServVersion +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServVersion interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServVersion from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServVersion + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServVersion) (PatternFlowRSVPPathSenderTspecIntServVersion, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServVersion from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServVersion from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServVersion from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServVersion { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServVersion{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServVersion { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServVersion{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServVersion) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServVersion, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServVersion) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServVersion) (PatternFlowRSVPPathSenderTspecIntServVersion, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServVersion) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServVersion) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServVersion) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServVersion) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServVersion) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServVersion) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) Clone() (PatternFlowRSVPPathSenderTspecIntServVersion, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServVersion() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTspecIntServVersion is message format version number. +type PatternFlowRSVPPathSenderTspecIntServVersion interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServVersion to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServVersion + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServVersion + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServVersion from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServVersion + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServVersion) PatternFlowRSVPPathSenderTspecIntServVersion + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServVersion + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServVersion + // validate validates PatternFlowRSVPPathSenderTspecIntServVersion + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServVersion, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum, set in PatternFlowRSVPPathSenderTspecIntServVersion + Choice() PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum provided by user to PatternFlowRSVPPathSenderTspecIntServVersion + setChoice(value PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum) PatternFlowRSVPPathSenderTspecIntServVersion + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTspecIntServVersion + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSenderTspecIntServVersion. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServVersion + SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServVersion + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTspecIntServVersion + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSenderTspecIntServVersion. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServVersion + SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServVersion + // Increment returns PatternFlowRSVPPathSenderTspecIntServVersionCounter, set in PatternFlowRSVPPathSenderTspecIntServVersion. + // PatternFlowRSVPPathSenderTspecIntServVersionCounter is integer counter pattern + Increment() PatternFlowRSVPPathSenderTspecIntServVersionCounter + // SetIncrement assigns PatternFlowRSVPPathSenderTspecIntServVersionCounter provided by user to PatternFlowRSVPPathSenderTspecIntServVersion. + // PatternFlowRSVPPathSenderTspecIntServVersionCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTspecIntServVersionCounter) PatternFlowRSVPPathSenderTspecIntServVersion + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTspecIntServVersion + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTspecIntServVersionCounter, set in PatternFlowRSVPPathSenderTspecIntServVersion. + // PatternFlowRSVPPathSenderTspecIntServVersionCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSenderTspecIntServVersionCounter + // SetDecrement assigns PatternFlowRSVPPathSenderTspecIntServVersionCounter provided by user to PatternFlowRSVPPathSenderTspecIntServVersion. + // PatternFlowRSVPPathSenderTspecIntServVersionCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTspecIntServVersionCounter) PatternFlowRSVPPathSenderTspecIntServVersion + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTspecIntServVersion + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTspecIntServVersion +var PatternFlowRSVPPathSenderTspecIntServVersionChoice = struct { + VALUE PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum + VALUES PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) Choice() PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum { + return PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) setChoice(value PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum) PatternFlowRSVPPathSenderTspecIntServVersion { + intValue, ok := otg.PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTspecIntServVersionChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServVersionChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServVersionChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTspecIntServVersionCounter().msg() + } + + if value == PatternFlowRSVPPathSenderTspecIntServVersionChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTspecIntServVersionCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServVersionChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServVersion object +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServVersion { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServVersionChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSenderTspecIntServVersion object +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServVersion { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServVersionChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServVersionCounter +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) Increment() PatternFlowRSVPPathSenderTspecIntServVersionCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServVersionChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTspecIntServVersionCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServVersionCounter +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTspecIntServVersionCounter value in the PatternFlowRSVPPathSenderTspecIntServVersion object +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) SetIncrement(value PatternFlowRSVPPathSenderTspecIntServVersionCounter) PatternFlowRSVPPathSenderTspecIntServVersion { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServVersionChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServVersionCounter +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) Decrement() PatternFlowRSVPPathSenderTspecIntServVersionCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServVersionChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTspecIntServVersionCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServVersionCounter +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTspecIntServVersionCounter value in the PatternFlowRSVPPathSenderTspecIntServVersion object +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) SetDecrement(value PatternFlowRSVPPathSenderTspecIntServVersionCounter) PatternFlowRSVPPathSenderTspecIntServVersion { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServVersionChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServVersion.Value <= 15 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathSenderTspecIntServVersion.Values <= 15 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersion) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTspecIntServVersionChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServVersionChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServVersionChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServVersionChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServVersionChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServVersionChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTspecIntServVersion") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServVersion_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_version_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_version_counter.go new file mode 100644 index 00000000..18f2ab46 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_version_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServVersionCounter ***** +type patternFlowRSVPPathSenderTspecIntServVersionCounter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter + marshaller marshalPatternFlowRSVPPathSenderTspecIntServVersionCounter + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServVersionCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServVersionCounter() PatternFlowRSVPPathSenderTspecIntServVersionCounter { + obj := patternFlowRSVPPathSenderTspecIntServVersionCounter{obj: &otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) msg() *otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter) PatternFlowRSVPPathSenderTspecIntServVersionCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServVersionCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServVersionCounter +} + +type marshalPatternFlowRSVPPathSenderTspecIntServVersionCounter interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServVersionCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServVersionCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServVersionCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServVersionCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServVersionCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServVersionCounter +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServVersionCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServVersionCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter) (PatternFlowRSVPPathSenderTspecIntServVersionCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServVersionCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServVersionCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServVersionCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServVersionCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServVersionCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServVersionCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServVersionCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServVersionCounter) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServVersionCounter) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter) (PatternFlowRSVPPathSenderTspecIntServVersionCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServVersionCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServVersionCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServVersionCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServVersionCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServVersionCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServVersionCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) Clone() (PatternFlowRSVPPathSenderTspecIntServVersionCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServVersionCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTspecIntServVersionCounter is integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServVersionCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServVersionCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServVersionCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServVersionCounter) PatternFlowRSVPPathSenderTspecIntServVersionCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServVersionCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServVersionCounter + // validate validates PatternFlowRSVPPathSenderTspecIntServVersionCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServVersionCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSenderTspecIntServVersionCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServVersionCounter + SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServVersionCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTspecIntServVersionCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSenderTspecIntServVersionCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServVersionCounter + SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServVersionCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTspecIntServVersionCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTspecIntServVersionCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServVersionCounter + SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServVersionCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTspecIntServVersionCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServVersionCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServVersionCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServVersionCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServVersionCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServVersionCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServVersionCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServVersionCounter.Start <= 15 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServVersionCounter.Step <= 15 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServVersionCounter.Count <= 15 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServVersionCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_zero_bit.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_zero_bit.go new file mode 100644 index 00000000..c337d45c --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_zero_bit.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServZeroBit ***** +type patternFlowRSVPPathSenderTspecIntServZeroBit struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServZeroBit + marshaller marshalPatternFlowRSVPPathSenderTspecIntServZeroBit + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServZeroBit + incrementHolder PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + decrementHolder PatternFlowRSVPPathSenderTspecIntServZeroBitCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServZeroBit() PatternFlowRSVPPathSenderTspecIntServZeroBit { + obj := patternFlowRSVPPathSenderTspecIntServZeroBit{obj: &otg.PatternFlowRSVPPathSenderTspecIntServZeroBit{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) msg() *otg.PatternFlowRSVPPathSenderTspecIntServZeroBit { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServZeroBit) PatternFlowRSVPPathSenderTspecIntServZeroBit { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServZeroBit struct { + obj *patternFlowRSVPPathSenderTspecIntServZeroBit +} + +type marshalPatternFlowRSVPPathSenderTspecIntServZeroBit interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServZeroBit to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServZeroBit + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServZeroBit, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServZeroBit to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServZeroBit to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServZeroBit to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServZeroBit struct { + obj *patternFlowRSVPPathSenderTspecIntServZeroBit +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServZeroBit interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServZeroBit from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServZeroBit + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServZeroBit) (PatternFlowRSVPPathSenderTspecIntServZeroBit, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServZeroBit from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServZeroBit from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServZeroBit from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServZeroBit { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServZeroBit{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServZeroBit { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServZeroBit{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServZeroBit) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServZeroBit, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServZeroBit) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServZeroBit) (PatternFlowRSVPPathSenderTspecIntServZeroBit, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServZeroBit) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServZeroBit) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServZeroBit) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServZeroBit) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServZeroBit) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServZeroBit) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) Clone() (PatternFlowRSVPPathSenderTspecIntServZeroBit, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServZeroBit() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSenderTspecIntServZeroBit is mUST be 0. +type PatternFlowRSVPPathSenderTspecIntServZeroBit interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServZeroBit to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServZeroBit + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServZeroBit + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServZeroBit from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServZeroBit + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServZeroBit) PatternFlowRSVPPathSenderTspecIntServZeroBit + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServZeroBit + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServZeroBit + // validate validates PatternFlowRSVPPathSenderTspecIntServZeroBit + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServZeroBit, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum, set in PatternFlowRSVPPathSenderTspecIntServZeroBit + Choice() PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum + // setChoice assigns PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum provided by user to PatternFlowRSVPPathSenderTspecIntServZeroBit + setChoice(value PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum) PatternFlowRSVPPathSenderTspecIntServZeroBit + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSenderTspecIntServZeroBit + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSenderTspecIntServZeroBit. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServZeroBit + SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServZeroBit + // HasValue checks if Value has been set in PatternFlowRSVPPathSenderTspecIntServZeroBit + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSenderTspecIntServZeroBit. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServZeroBit + SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServZeroBit + // Increment returns PatternFlowRSVPPathSenderTspecIntServZeroBitCounter, set in PatternFlowRSVPPathSenderTspecIntServZeroBit. + // PatternFlowRSVPPathSenderTspecIntServZeroBitCounter is integer counter pattern + Increment() PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + // SetIncrement assigns PatternFlowRSVPPathSenderTspecIntServZeroBitCounter provided by user to PatternFlowRSVPPathSenderTspecIntServZeroBit. + // PatternFlowRSVPPathSenderTspecIntServZeroBitCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) PatternFlowRSVPPathSenderTspecIntServZeroBit + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSenderTspecIntServZeroBit + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSenderTspecIntServZeroBitCounter, set in PatternFlowRSVPPathSenderTspecIntServZeroBit. + // PatternFlowRSVPPathSenderTspecIntServZeroBitCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + // SetDecrement assigns PatternFlowRSVPPathSenderTspecIntServZeroBitCounter provided by user to PatternFlowRSVPPathSenderTspecIntServZeroBit. + // PatternFlowRSVPPathSenderTspecIntServZeroBitCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) PatternFlowRSVPPathSenderTspecIntServZeroBit + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSenderTspecIntServZeroBit + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSenderTspecIntServZeroBit +var PatternFlowRSVPPathSenderTspecIntServZeroBitChoice = struct { + VALUE PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum + VALUES PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum + INCREMENT PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum + DECREMENT PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) Choice() PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum { + return PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) setChoice(value PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum) PatternFlowRSVPPathSenderTspecIntServZeroBit { + intValue, ok := otg.PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSenderTspecIntServZeroBitCounter().msg() + } + + if value == PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSenderTspecIntServZeroBitCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServZeroBit object +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) SetValue(value uint32) PatternFlowRSVPPathSenderTspecIntServZeroBit { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSenderTspecIntServZeroBit object +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) SetValues(value []uint32) PatternFlowRSVPPathSenderTspecIntServZeroBit { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServZeroBitCounter +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) Increment() PatternFlowRSVPPathSenderTspecIntServZeroBitCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSenderTspecIntServZeroBitCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSenderTspecIntServZeroBitCounter +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSenderTspecIntServZeroBitCounter value in the PatternFlowRSVPPathSenderTspecIntServZeroBit object +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) SetIncrement(value PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) PatternFlowRSVPPathSenderTspecIntServZeroBit { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServZeroBitCounter +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) Decrement() PatternFlowRSVPPathSenderTspecIntServZeroBitCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSenderTspecIntServZeroBitCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSenderTspecIntServZeroBitCounter +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSenderTspecIntServZeroBitCounter value in the PatternFlowRSVPPathSenderTspecIntServZeroBit object +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) SetDecrement(value PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) PatternFlowRSVPPathSenderTspecIntServZeroBit { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServZeroBit.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathSenderTspecIntServZeroBit.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBit) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSenderTspecIntServZeroBitChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSenderTspecIntServZeroBitChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSenderTspecIntServZeroBit") + } + } else { + intVal := otg.PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSenderTspecIntServZeroBit_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_zero_bit_counter.go b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_zero_bit_counter.go new file mode 100644 index 00000000..0ba53d28 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_sender_tspec_int_serv_zero_bit_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSenderTspecIntServZeroBitCounter ***** +type patternFlowRSVPPathSenderTspecIntServZeroBitCounter struct { + validation + obj *otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + marshaller marshalPatternFlowRSVPPathSenderTspecIntServZeroBitCounter + unMarshaller unMarshalPatternFlowRSVPPathSenderTspecIntServZeroBitCounter +} + +func NewPatternFlowRSVPPathSenderTspecIntServZeroBitCounter() PatternFlowRSVPPathSenderTspecIntServZeroBitCounter { + obj := patternFlowRSVPPathSenderTspecIntServZeroBitCounter{obj: &otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) msg() *otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) setMsg(msg *otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) PatternFlowRSVPPathSenderTspecIntServZeroBitCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSenderTspecIntServZeroBitCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter +} + +type marshalPatternFlowRSVPPathSenderTspecIntServZeroBitCounter interface { + // ToProto marshals PatternFlowRSVPPathSenderTspecIntServZeroBitCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter, error) + // ToPbText marshals PatternFlowRSVPPathSenderTspecIntServZeroBitCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSenderTspecIntServZeroBitCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSenderTspecIntServZeroBitCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSenderTspecIntServZeroBitCounter struct { + obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter +} + +type unMarshalPatternFlowRSVPPathSenderTspecIntServZeroBitCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSenderTspecIntServZeroBitCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) (PatternFlowRSVPPathSenderTspecIntServZeroBitCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSenderTspecIntServZeroBitCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSenderTspecIntServZeroBitCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSenderTspecIntServZeroBitCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) Marshal() marshalPatternFlowRSVPPathSenderTspecIntServZeroBitCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSenderTspecIntServZeroBitCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServZeroBitCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSenderTspecIntServZeroBitCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServZeroBitCounter) ToProto() (*otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServZeroBitCounter) FromProto(msg *otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) (PatternFlowRSVPPathSenderTspecIntServZeroBitCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServZeroBitCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServZeroBitCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServZeroBitCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServZeroBitCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSenderTspecIntServZeroBitCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSenderTspecIntServZeroBitCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) Clone() (PatternFlowRSVPPathSenderTspecIntServZeroBitCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSenderTspecIntServZeroBitCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSenderTspecIntServZeroBitCounter is integer counter pattern +type PatternFlowRSVPPathSenderTspecIntServZeroBitCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSenderTspecIntServZeroBitCounter to protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + // setMsg unmarshals PatternFlowRSVPPathSenderTspecIntServZeroBitCounter from protobuf object *otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter) PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSenderTspecIntServZeroBitCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSenderTspecIntServZeroBitCounter + // validate validates PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSenderTspecIntServZeroBitCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSenderTspecIntServZeroBitCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSenderTspecIntServZeroBitCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSenderTspecIntServZeroBitCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSenderTspecIntServZeroBitCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServZeroBitCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) SetStart(value uint32) PatternFlowRSVPPathSenderTspecIntServZeroBitCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServZeroBitCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) SetStep(value uint32) PatternFlowRSVPPathSenderTspecIntServZeroBitCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSenderTspecIntServZeroBitCounter object +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) SetCount(value uint32) PatternFlowRSVPPathSenderTspecIntServZeroBitCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServZeroBitCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServZeroBitCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSenderTspecIntServZeroBitCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathSenderTspecIntServZeroBitCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_session_ext_tunnel_id_as_integer.go b/gosnappi/pattern_flow_rsvp_path_session_ext_tunnel_id_as_integer.go new file mode 100644 index 00000000..b8688755 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_session_ext_tunnel_id_as_integer.go @@ -0,0 +1,535 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSessionExtTunnelIdAsInteger ***** +type patternFlowRSVPPathSessionExtTunnelIdAsInteger struct { + validation + obj *otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger + marshaller marshalPatternFlowRSVPPathSessionExtTunnelIdAsInteger + unMarshaller unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsInteger + incrementHolder PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + decrementHolder PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter +} + +func NewPatternFlowRSVPPathSessionExtTunnelIdAsInteger() PatternFlowRSVPPathSessionExtTunnelIdAsInteger { + obj := patternFlowRSVPPathSessionExtTunnelIdAsInteger{obj: &otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) msg() *otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger { + return obj.obj +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) setMsg(msg *otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger) PatternFlowRSVPPathSessionExtTunnelIdAsInteger { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSessionExtTunnelIdAsInteger struct { + obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger +} + +type marshalPatternFlowRSVPPathSessionExtTunnelIdAsInteger interface { + // ToProto marshals PatternFlowRSVPPathSessionExtTunnelIdAsInteger to protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger + ToProto() (*otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger, error) + // ToPbText marshals PatternFlowRSVPPathSessionExtTunnelIdAsInteger to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSessionExtTunnelIdAsInteger to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSessionExtTunnelIdAsInteger to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsInteger struct { + obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger +} + +type unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsInteger interface { + // FromProto unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsInteger from protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger + FromProto(msg *otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger) (PatternFlowRSVPPathSessionExtTunnelIdAsInteger, error) + // FromPbText unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsInteger from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsInteger from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsInteger from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) Marshal() marshalPatternFlowRSVPPathSessionExtTunnelIdAsInteger { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSessionExtTunnelIdAsInteger{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) Unmarshal() unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsInteger { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsInteger{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsInteger) ToProto() (*otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsInteger) FromProto(msg *otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger) (PatternFlowRSVPPathSessionExtTunnelIdAsInteger, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsInteger) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsInteger) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsInteger) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsInteger) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsInteger) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsInteger) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) Clone() (PatternFlowRSVPPathSessionExtTunnelIdAsInteger, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSessionExtTunnelIdAsInteger() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSessionExtTunnelIdAsInteger is tBD +type PatternFlowRSVPPathSessionExtTunnelIdAsInteger interface { + Validation + // msg marshals PatternFlowRSVPPathSessionExtTunnelIdAsInteger to protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger + // setMsg unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsInteger from protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger) PatternFlowRSVPPathSessionExtTunnelIdAsInteger + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSessionExtTunnelIdAsInteger + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsInteger + // validate validates PatternFlowRSVPPathSessionExtTunnelIdAsInteger + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSessionExtTunnelIdAsInteger, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum, set in PatternFlowRSVPPathSessionExtTunnelIdAsInteger + Choice() PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum + // setChoice assigns PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsInteger + setChoice(value PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum) PatternFlowRSVPPathSessionExtTunnelIdAsInteger + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSessionExtTunnelIdAsInteger + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSessionExtTunnelIdAsInteger. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsInteger + SetValue(value uint32) PatternFlowRSVPPathSessionExtTunnelIdAsInteger + // HasValue checks if Value has been set in PatternFlowRSVPPathSessionExtTunnelIdAsInteger + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSessionExtTunnelIdAsInteger. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsInteger + SetValues(value []uint32) PatternFlowRSVPPathSessionExtTunnelIdAsInteger + // Increment returns PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter, set in PatternFlowRSVPPathSessionExtTunnelIdAsInteger. + // PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter is integer counter pattern + Increment() PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + // SetIncrement assigns PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsInteger. + // PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) PatternFlowRSVPPathSessionExtTunnelIdAsInteger + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSessionExtTunnelIdAsInteger + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter, set in PatternFlowRSVPPathSessionExtTunnelIdAsInteger. + // PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + // SetDecrement assigns PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsInteger. + // PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) PatternFlowRSVPPathSessionExtTunnelIdAsInteger + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSessionExtTunnelIdAsInteger + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSessionExtTunnelIdAsInteger +var PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice = struct { + VALUE PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum + VALUES PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum + INCREMENT PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum + DECREMENT PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) Choice() PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum { + return PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) setChoice(value PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum) PatternFlowRSVPPathSessionExtTunnelIdAsInteger { + intValue, ok := otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter().msg() + } + + if value == PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSessionExtTunnelIdAsInteger object +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) SetValue(value uint32) PatternFlowRSVPPathSessionExtTunnelIdAsInteger { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSessionExtTunnelIdAsInteger object +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) SetValues(value []uint32) PatternFlowRSVPPathSessionExtTunnelIdAsInteger { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) Increment() PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter value in the PatternFlowRSVPPathSessionExtTunnelIdAsInteger object +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) SetIncrement(value PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) PatternFlowRSVPPathSessionExtTunnelIdAsInteger { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) Decrement() PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter value in the PatternFlowRSVPPathSessionExtTunnelIdAsInteger object +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) SetDecrement(value PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) PatternFlowRSVPPathSessionExtTunnelIdAsInteger { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsInteger) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIntegerChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSessionExtTunnelIdAsInteger") + } + } else { + intVal := otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_session_ext_tunnel_id_as_integer_counter.go b/gosnappi/pattern_flow_rsvp_path_session_ext_tunnel_id_as_integer_counter.go new file mode 100644 index 00000000..73cbb8fc --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_session_ext_tunnel_id_as_integer_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter ***** +type patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter struct { + validation + obj *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + marshaller marshalPatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + unMarshaller unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter +} + +func NewPatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter() PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter { + obj := patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter{obj: &otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) msg() *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) setMsg(msg *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter struct { + obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter +} + +type marshalPatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter interface { + // ToProto marshals PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter to protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + ToProto() (*otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter, error) + // ToPbText marshals PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter struct { + obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter +} + +type unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter from protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + FromProto(msg *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) (PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) Marshal() marshalPatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) Unmarshal() unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) ToProto() (*otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) FromProto(msg *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) (PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) Clone() (PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter is integer counter pattern +type PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter to protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + // setMsg unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter from protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + // validate validates PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + SetStart(value uint32) PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + SetStep(value uint32) PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + SetCount(value uint32) PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter object +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) SetStart(value uint32) PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter object +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) SetStep(value uint32) PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter object +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) SetCount(value uint32) PatternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIntegerCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_session_ext_tunnel_id_as_ipv4.go b/gosnappi/pattern_flow_rsvp_path_session_ext_tunnel_id_as_ipv4.go new file mode 100644 index 00000000..8e6bb95d --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_session_ext_tunnel_id_as_ipv4.go @@ -0,0 +1,553 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 ***** +type patternFlowRSVPPathSessionExtTunnelIdAsIpv4 struct { + validation + obj *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + marshaller marshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + unMarshaller unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + incrementHolder PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + decrementHolder PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter +} + +func NewPatternFlowRSVPPathSessionExtTunnelIdAsIpv4() PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 { + obj := patternFlowRSVPPathSessionExtTunnelIdAsIpv4{obj: &otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) msg() *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 { + return obj.obj +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) setMsg(msg *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4 struct { + obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4 +} + +type marshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4 interface { + // ToProto marshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 to protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + ToProto() (*otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4, error) + // ToPbText marshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4 struct { + obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4 +} + +type unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4 interface { + // FromProto unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 from protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + FromProto(msg *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) (PatternFlowRSVPPathSessionExtTunnelIdAsIpv4, error) + // FromPbText unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) Marshal() marshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) Unmarshal() unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4) ToProto() (*otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4) FromProto(msg *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) (PatternFlowRSVPPathSessionExtTunnelIdAsIpv4, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) Clone() (PatternFlowRSVPPathSessionExtTunnelIdAsIpv4, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSessionExtTunnelIdAsIpv4() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 is iPv4 address of the ingress endpoint for the tunnel. +type PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 interface { + Validation + // msg marshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 to protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + // setMsg unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 from protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + // validate validates PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSessionExtTunnelIdAsIpv4, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum, set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + Choice() PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum + // setChoice assigns PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + setChoice(value PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + HasChoice() bool + // Value returns string, set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4. + Value() string + // SetValue assigns string provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + SetValue(value string) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + // HasValue checks if Value has been set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + HasValue() bool + // Values returns []string, set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4. + Values() []string + // SetValues assigns []string provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + SetValues(value []string) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + // Increment returns PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter, set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4. + // PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter is ipv4 counter pattern + Increment() PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + // SetIncrement assigns PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsIpv4. + // PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter is ipv4 counter pattern + SetIncrement(value PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter, set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4. + // PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter is ipv4 counter pattern + Decrement() PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + // SetDecrement assigns PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsIpv4. + // PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter is ipv4 counter pattern + SetDecrement(value PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 +var PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice = struct { + VALUE PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum + VALUES PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum + INCREMENT PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum + DECREMENT PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) Choice() PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum { + return PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) setChoice(value PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 { + intValue, ok := otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.VALUE { + defaultValue := "0.0.0.0" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.VALUES { + defaultValue := []string{"0.0.0.0"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter().msg() + } + + if value == PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 object +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) SetValue(value string) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"0.0.0.0"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 object +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) SetValues(value []string) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) Increment() PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter value in the PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 object +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) SetIncrement(value PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) Decrement() PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter value in the PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 object +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) SetDecrement(value PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4 { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv4(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateIpv4Slice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathSessionExtTunnelIdAsIpv4.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSessionExtTunnelIdAsIpv4ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4") + } + } else { + intVal := otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_session_ext_tunnel_id_as_ipv4_counter.go b/gosnappi/pattern_flow_rsvp_path_session_ext_tunnel_id_as_ipv4_counter.go new file mode 100644 index 00000000..064e6a5e --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_session_ext_tunnel_id_as_ipv4_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter ***** +type patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter struct { + validation + obj *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + marshaller marshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + unMarshaller unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter +} + +func NewPatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter() PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter { + obj := patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter{obj: &otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) msg() *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) setMsg(msg *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter struct { + obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter +} + +type marshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter interface { + // ToProto marshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter to protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + ToProto() (*otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter, error) + // ToPbText marshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter struct { + obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter +} + +type unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter interface { + // FromProto unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter from protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + FromProto(msg *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) (PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter, error) + // FromPbText unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) Marshal() marshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) Unmarshal() unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) ToProto() (*otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) FromProto(msg *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) (PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) Clone() (PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter is ipv4 counter pattern +type PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter interface { + Validation + // msg marshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter to protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + // setMsg unmarshals PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter from protobuf object *otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + // validate validates PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter. + Start() string + // SetStart assigns string provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + SetStart(value string) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + // HasStart checks if Start has been set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + HasStart() bool + // Step returns string, set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter. + Step() string + // SetStep assigns string provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + SetStep(value string) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + // HasStep checks if Step has been set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + SetCount(value uint32) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + // HasCount checks if Count has been set in PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter object +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) SetStart(value string) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter object +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) SetStep(value string) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter object +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) SetCount(value uint32) PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateIpv4(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateIpv4(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter.Step")) + } + + } + +} + +func (obj *patternFlowRSVPPathSessionExtTunnelIdAsIpv4Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("0.0.0.0") + } + if obj.obj.Step == nil { + obj.SetStep("0.0.0.1") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_ipv4_tunnel_end_point_address.go b/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_ipv4_tunnel_end_point_address.go new file mode 100644 index 00000000..61ac961a --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_ipv4_tunnel_end_point_address.go @@ -0,0 +1,553 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress ***** +type patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress struct { + validation + obj *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + marshaller marshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + unMarshaller unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + incrementHolder PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + decrementHolder PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter +} + +func NewPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress() PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress { + obj := patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress{obj: &otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) msg() *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress { + return obj.obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) setMsg(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress struct { + obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress +} + +type marshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress interface { + // ToProto marshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress to protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + ToProto() (*otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress, error) + // ToPbText marshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress struct { + obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress +} + +type unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress interface { + // FromProto unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress from protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + FromProto(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) (PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress, error) + // FromPbText unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) Marshal() marshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) Unmarshal() unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) ToProto() (*otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) FromProto(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) (PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) Clone() (PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress is iPv4 address of the egress node for the tunnel. +type PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress interface { + Validation + // msg marshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress to protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + // setMsg unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress from protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + // validate validates PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum, set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + Choice() PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum + // setChoice assigns PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + setChoice(value PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + HasChoice() bool + // Value returns string, set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress. + Value() string + // SetValue assigns string provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + SetValue(value string) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + // HasValue checks if Value has been set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + HasValue() bool + // Values returns []string, set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress. + Values() []string + // SetValues assigns []string provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + SetValues(value []string) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + // Increment returns PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter, set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress. + // PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter is ipv4 counter pattern + Increment() PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + // SetIncrement assigns PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress. + // PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter is ipv4 counter pattern + SetIncrement(value PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter, set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress. + // PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter is ipv4 counter pattern + Decrement() PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + // SetDecrement assigns PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress. + // PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter is ipv4 counter pattern + SetDecrement(value PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress +var PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice = struct { + VALUE PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum + VALUES PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum + INCREMENT PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum + DECREMENT PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) Choice() PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum { + return PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) setChoice(value PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress { + intValue, ok := otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.VALUE { + defaultValue := "0.0.0.0" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.VALUES { + defaultValue := []string{"0.0.0.0"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter().msg() + } + + if value == PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) SetValue(value string) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"0.0.0.0"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) SetValues(value []string) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) Increment() PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter value in the PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) SetIncrement(value PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) Decrement() PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter value in the PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) SetDecrement(value PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv4(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateIpv4Slice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress") + } + } else { + intVal := otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_ipv4_tunnel_end_point_address_counter.go b/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_ipv4_tunnel_end_point_address_counter.go new file mode 100644 index 00000000..842df7fc --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_ipv4_tunnel_end_point_address_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter ***** +type patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter struct { + validation + obj *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + marshaller marshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + unMarshaller unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter +} + +func NewPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter() PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter { + obj := patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter{obj: &otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) msg() *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) setMsg(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter struct { + obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter +} + +type marshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter interface { + // ToProto marshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter to protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + ToProto() (*otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter, error) + // ToPbText marshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter struct { + obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter +} + +type unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter from protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + FromProto(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) (PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) Marshal() marshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) Unmarshal() unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) ToProto() (*otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) FromProto(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) (PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) Clone() (PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter is ipv4 counter pattern +type PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter to protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + // setMsg unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter from protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + // validate validates PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + SetStart(value string) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + HasStart() bool + // Step returns string, set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + SetStep(value string) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + SetCount(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) SetStart(value string) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) SetStep(value string) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) SetCount(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateIpv4(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateIpv4(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter.Step")) + } + + } + +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddressCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("0.0.0.0") + } + if obj.obj.Step == nil { + obj.SetStep("0.0.0.1") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_reserved.go b/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_reserved.go new file mode 100644 index 00000000..ee87d1c6 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_reserved.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSessionLspTunnelIpv4Reserved ***** +type patternFlowRSVPPathSessionLspTunnelIpv4Reserved struct { + validation + obj *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + marshaller marshalPatternFlowRSVPPathSessionLspTunnelIpv4Reserved + unMarshaller unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4Reserved + incrementHolder PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + decrementHolder PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter +} + +func NewPatternFlowRSVPPathSessionLspTunnelIpv4Reserved() PatternFlowRSVPPathSessionLspTunnelIpv4Reserved { + obj := patternFlowRSVPPathSessionLspTunnelIpv4Reserved{obj: &otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) msg() *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved { + return obj.obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) setMsg(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) PatternFlowRSVPPathSessionLspTunnelIpv4Reserved { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSessionLspTunnelIpv4Reserved struct { + obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved +} + +type marshalPatternFlowRSVPPathSessionLspTunnelIpv4Reserved interface { + // ToProto marshals PatternFlowRSVPPathSessionLspTunnelIpv4Reserved to protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + ToProto() (*otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved, error) + // ToPbText marshals PatternFlowRSVPPathSessionLspTunnelIpv4Reserved to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSessionLspTunnelIpv4Reserved to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSessionLspTunnelIpv4Reserved to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Reserved struct { + obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved +} + +type unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4Reserved interface { + // FromProto unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Reserved from protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + FromProto(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) (PatternFlowRSVPPathSessionLspTunnelIpv4Reserved, error) + // FromPbText unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Reserved from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Reserved from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Reserved from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) Marshal() marshalPatternFlowRSVPPathSessionLspTunnelIpv4Reserved { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSessionLspTunnelIpv4Reserved{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) Unmarshal() unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4Reserved { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Reserved{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4Reserved) ToProto() (*otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Reserved) FromProto(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) (PatternFlowRSVPPathSessionLspTunnelIpv4Reserved, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4Reserved) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Reserved) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4Reserved) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Reserved) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4Reserved) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4Reserved) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) Clone() (PatternFlowRSVPPathSessionLspTunnelIpv4Reserved, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSessionLspTunnelIpv4Reserved() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSessionLspTunnelIpv4Reserved is reserved field, MUST be zero. +type PatternFlowRSVPPathSessionLspTunnelIpv4Reserved interface { + Validation + // msg marshals PatternFlowRSVPPathSessionLspTunnelIpv4Reserved to protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + // setMsg unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4Reserved from protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved) PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSessionLspTunnelIpv4Reserved + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4Reserved + // validate validates PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSessionLspTunnelIpv4Reserved, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum, set in PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + Choice() PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum + // setChoice assigns PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + setChoice(value PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum) PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSessionLspTunnelIpv4Reserved. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + SetValue(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + // HasValue checks if Value has been set in PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSessionLspTunnelIpv4Reserved. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + SetValues(value []uint32) PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + // Increment returns PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter, set in PatternFlowRSVPPathSessionLspTunnelIpv4Reserved. + // PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter is integer counter pattern + Increment() PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + // SetIncrement assigns PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4Reserved. + // PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter, set in PatternFlowRSVPPathSessionLspTunnelIpv4Reserved. + // PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + // SetDecrement assigns PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4Reserved. + // PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSessionLspTunnelIpv4Reserved + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSessionLspTunnelIpv4Reserved +var PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice = struct { + VALUE PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum + VALUES PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum + INCREMENT PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum + DECREMENT PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) Choice() PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum { + return PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) setChoice(value PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum) PatternFlowRSVPPathSessionLspTunnelIpv4Reserved { + intValue, ok := otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter().msg() + } + + if value == PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSessionLspTunnelIpv4Reserved object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) SetValue(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4Reserved { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSessionLspTunnelIpv4Reserved object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) SetValues(value []uint32) PatternFlowRSVPPathSessionLspTunnelIpv4Reserved { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) Increment() PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter value in the PatternFlowRSVPPathSessionLspTunnelIpv4Reserved object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) SetIncrement(value PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) PatternFlowRSVPPathSessionLspTunnelIpv4Reserved { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) Decrement() PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter value in the PatternFlowRSVPPathSessionLspTunnelIpv4Reserved object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) SetDecrement(value PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) PatternFlowRSVPPathSessionLspTunnelIpv4Reserved { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathSessionLspTunnelIpv4Reserved.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4Reserved) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4ReservedChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSessionLspTunnelIpv4Reserved") + } + } else { + intVal := otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_reserved_counter.go b/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_reserved_counter.go new file mode 100644 index 00000000..f0846502 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_reserved_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter ***** +type patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter struct { + validation + obj *otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + marshaller marshalPatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + unMarshaller unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter +} + +func NewPatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter() PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter { + obj := patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter{obj: &otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) msg() *otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) setMsg(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter struct { + obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter +} + +type marshalPatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter interface { + // ToProto marshals PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter to protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + ToProto() (*otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter, error) + // ToPbText marshals PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter struct { + obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter +} + +type unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter from protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + FromProto(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) (PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) Marshal() marshalPatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) Unmarshal() unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) ToProto() (*otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) FromProto(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) (PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) Clone() (PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter is integer counter pattern +type PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter to protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + // setMsg unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter from protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + // validate validates PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + SetStart(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + SetStep(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + SetCount(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) SetStart(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) SetStep(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) SetCount(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4ReservedCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_tunnel_id.go b/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_tunnel_id.go new file mode 100644 index 00000000..b79a16d5 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_tunnel_id.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId ***** +type patternFlowRSVPPathSessionLspTunnelIpv4TunnelId struct { + validation + obj *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + marshaller marshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + unMarshaller unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + incrementHolder PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + decrementHolder PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter +} + +func NewPatternFlowRSVPPathSessionLspTunnelIpv4TunnelId() PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId { + obj := patternFlowRSVPPathSessionLspTunnelIpv4TunnelId{obj: &otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) msg() *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId { + return obj.obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) setMsg(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelId struct { + obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId +} + +type marshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelId interface { + // ToProto marshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId to protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + ToProto() (*otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId, error) + // ToPbText marshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelId struct { + obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId +} + +type unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelId interface { + // FromProto unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId from protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + FromProto(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) (PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId, error) + // FromPbText unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) Marshal() marshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelId { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelId{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) Unmarshal() unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelId { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelId{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) ToProto() (*otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) FromProto(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) (PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) Clone() (PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSessionLspTunnelIpv4TunnelId() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId is a 16-bit identifier used in the SESSION that remains constant over the life of the tunnel. +type PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId interface { + Validation + // msg marshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId to protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + // setMsg unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId from protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + // validate validates PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum, set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + Choice() PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum + // setChoice assigns PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + setChoice(value PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + // HasChoice checks if Choice has been set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + SetValue(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + // HasValue checks if Value has been set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + SetValues(value []uint32) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + // Increment returns PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter, set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId. + // PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter is integer counter pattern + Increment() PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + // SetIncrement assigns PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId. + // PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter, set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId. + // PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter is integer counter pattern + Decrement() PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + // SetDecrement assigns PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId. + // PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId +var PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice = struct { + VALUE PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum + VALUES PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum + INCREMENT PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum + DECREMENT PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum +}{ + VALUE: PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum("value"), + VALUES: PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) Choice() PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum { + return PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) setChoice(value PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId { + intValue, ok := otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.VALUE { + defaultValue := uint32(1) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.VALUES { + defaultValue := []uint32{1} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter().msg() + } + + if value == PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) SetValue(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{1}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) SetValues(value []uint32) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) Increment() PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter value in the PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) SetIncrement(value PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) Decrement() PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter value in the PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) SetDecrement(value PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelId) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId") + } + } else { + intVal := otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_tunnel_id_counter.go b/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_tunnel_id_counter.go new file mode 100644 index 00000000..fe53686d --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_session_lsp_tunnel_ipv4_tunnel_id_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter ***** +type patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter struct { + validation + obj *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + marshaller marshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + unMarshaller unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter +} + +func NewPatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter() PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter { + obj := patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter{obj: &otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) msg() *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) setMsg(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter struct { + obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter +} + +type marshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter interface { + // ToProto marshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter to protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + ToProto() (*otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter, error) + // ToPbText marshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter struct { + obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter +} + +type unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter interface { + // FromProto unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter from protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + FromProto(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) (PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) Marshal() marshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) Unmarshal() unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) ToProto() (*otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) FromProto(msg *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) (PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) Clone() (PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter is integer counter pattern +type PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter interface { + Validation + // msg marshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter to protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + // setMsg unmarshals PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter from protobuf object *otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + // validate validates PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + SetStart(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + SetStep(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + SetCount(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) SetStart(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) SetStep(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter object +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) SetCount(value uint32) PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRSVPPathSessionLspTunnelIpv4TunnelIdCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_time_values_type1_refresh_period_r.go b/gosnappi/pattern_flow_rsvp_path_time_values_type1_refresh_period_r.go new file mode 100644 index 00000000..b715d25f --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_time_values_type1_refresh_period_r.go @@ -0,0 +1,535 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathTimeValuesType1RefreshPeriodR ***** +type patternFlowRSVPPathTimeValuesType1RefreshPeriodR struct { + validation + obj *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + marshaller marshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodR + unMarshaller unMarshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodR + incrementHolder PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + decrementHolder PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter +} + +func NewPatternFlowRSVPPathTimeValuesType1RefreshPeriodR() PatternFlowRSVPPathTimeValuesType1RefreshPeriodR { + obj := patternFlowRSVPPathTimeValuesType1RefreshPeriodR{obj: &otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) msg() *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR { + return obj.obj +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) setMsg(msg *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) PatternFlowRSVPPathTimeValuesType1RefreshPeriodR { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodR struct { + obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR +} + +type marshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodR interface { + // ToProto marshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodR to protobuf object *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + ToProto() (*otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR, error) + // ToPbText marshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodR to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodR to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodR to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodR struct { + obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR +} + +type unMarshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodR interface { + // FromProto unmarshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodR from protobuf object *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + FromProto(msg *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) (PatternFlowRSVPPathTimeValuesType1RefreshPeriodR, error) + // FromPbText unmarshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodR from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodR from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodR from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) Marshal() marshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodR { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodR{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) Unmarshal() unMarshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodR { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodR{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodR) ToProto() (*otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodR) FromProto(msg *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) (PatternFlowRSVPPathTimeValuesType1RefreshPeriodR, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodR) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodR) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodR) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodR) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodR) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodR) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) Clone() (PatternFlowRSVPPathTimeValuesType1RefreshPeriodR, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathTimeValuesType1RefreshPeriodR() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRSVPPathTimeValuesType1RefreshPeriodR is the refresh timeout period R used to generate this message;in milliseconds. +type PatternFlowRSVPPathTimeValuesType1RefreshPeriodR interface { + Validation + // msg marshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodR to protobuf object *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + // setMsg unmarshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodR from protobuf object *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR) PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodR + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodR + // validate validates PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathTimeValuesType1RefreshPeriodR, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum, set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + Choice() PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum + // setChoice assigns PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum provided by user to PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + setChoice(value PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum) PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + // HasChoice checks if Choice has been set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + HasChoice() bool + // Value returns uint32, set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodR. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + SetValue(value uint32) PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + // HasValue checks if Value has been set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + HasValue() bool + // Values returns []uint32, set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodR. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + SetValues(value []uint32) PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + // Increment returns PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter, set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodR. + // PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter is integer counter pattern + Increment() PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + // SetIncrement assigns PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter provided by user to PatternFlowRSVPPathTimeValuesType1RefreshPeriodR. + // PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter is integer counter pattern + SetIncrement(value PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + // HasIncrement checks if Increment has been set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + HasIncrement() bool + // Decrement returns PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter, set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodR. + // PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter is integer counter pattern + Decrement() PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + // SetDecrement assigns PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter provided by user to PatternFlowRSVPPathTimeValuesType1RefreshPeriodR. + // PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter is integer counter pattern + SetDecrement(value PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + // HasDecrement checks if Decrement has been set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodR + HasDecrement() bool + setNil() +} + +type PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum string + +// Enum of Choice on PatternFlowRSVPPathTimeValuesType1RefreshPeriodR +var PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice = struct { + VALUE PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum + VALUES PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum + INCREMENT PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum + DECREMENT PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum +}{ + VALUE: PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum("value"), + VALUES: PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum("values"), + INCREMENT: PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum("increment"), + DECREMENT: PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum("decrement"), +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) Choice() PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum { + return PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) setChoice(value PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum) PatternFlowRSVPPathTimeValuesType1RefreshPeriodR { + intValue, ok := otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.VALUE { + defaultValue := uint32(30000) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.VALUES { + defaultValue := []uint32{30000} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter().msg() + } + + if value == PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRSVPPathTimeValuesType1RefreshPeriodR object +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) SetValue(value uint32) PatternFlowRSVPPathTimeValuesType1RefreshPeriodR { + obj.setChoice(PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{30000}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRSVPPathTimeValuesType1RefreshPeriodR object +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) SetValues(value []uint32) PatternFlowRSVPPathTimeValuesType1RefreshPeriodR { + obj.setChoice(PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) Increment() PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter value in the PatternFlowRSVPPathTimeValuesType1RefreshPeriodR object +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) SetIncrement(value PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) PatternFlowRSVPPathTimeValuesType1RefreshPeriodR { + obj.setChoice(PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) Decrement() PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter value in the PatternFlowRSVPPathTimeValuesType1RefreshPeriodR object +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) SetDecrement(value PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) PatternFlowRSVPPathTimeValuesType1RefreshPeriodR { + obj.setChoice(PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodR) setDefault() { + var choices_set int = 0 + var choice PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRSVPPathTimeValuesType1RefreshPeriodRChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRSVPPathTimeValuesType1RefreshPeriodR") + } + } else { + intVal := otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_path_time_values_type1_refresh_period_r_counter.go b/gosnappi/pattern_flow_rsvp_path_time_values_type1_refresh_period_r_counter.go new file mode 100644 index 00000000..83b363e5 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_path_time_values_type1_refresh_period_r_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter ***** +type patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter struct { + validation + obj *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + marshaller marshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + unMarshaller unMarshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter +} + +func NewPatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter() PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter { + obj := patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter{obj: &otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) msg() *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter { + return obj.obj +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) setMsg(msg *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter struct { + obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter +} + +type marshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter interface { + // ToProto marshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter to protobuf object *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + ToProto() (*otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter, error) + // ToPbText marshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter struct { + obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter +} + +type unMarshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter interface { + // FromProto unmarshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter from protobuf object *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + FromProto(msg *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) (PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter, error) + // FromPbText unmarshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) Marshal() marshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) Unmarshal() unMarshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) ToProto() (*otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) FromProto(msg *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) (PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) Clone() (PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter is integer counter pattern +type PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter interface { + Validation + // msg marshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter to protobuf object *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + // and doesn't set defaults + msg() *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + // setMsg unmarshals PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter from protobuf object *otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + // provides marshal interface + Marshal() marshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + // validate validates PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + SetStart(value uint32) PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + // HasStart checks if Start has been set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + SetStep(value uint32) PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + // HasStep checks if Step has been set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + SetCount(value uint32) PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + // HasCount checks if Count has been set in PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter object +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) SetStart(value uint32) PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter object +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) SetStep(value uint32) PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter object +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) SetCount(value uint32) PatternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowRSVPPathTimeValuesType1RefreshPeriodRCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(30000) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_reserved.go b/gosnappi/pattern_flow_rsvp_reserved.go new file mode 100644 index 00000000..a7fa6f74 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_reserved.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRsvpReserved ***** +type patternFlowRsvpReserved struct { + validation + obj *otg.PatternFlowRsvpReserved + marshaller marshalPatternFlowRsvpReserved + unMarshaller unMarshalPatternFlowRsvpReserved + incrementHolder PatternFlowRsvpReservedCounter + decrementHolder PatternFlowRsvpReservedCounter +} + +func NewPatternFlowRsvpReserved() PatternFlowRsvpReserved { + obj := patternFlowRsvpReserved{obj: &otg.PatternFlowRsvpReserved{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRsvpReserved) msg() *otg.PatternFlowRsvpReserved { + return obj.obj +} + +func (obj *patternFlowRsvpReserved) setMsg(msg *otg.PatternFlowRsvpReserved) PatternFlowRsvpReserved { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRsvpReserved struct { + obj *patternFlowRsvpReserved +} + +type marshalPatternFlowRsvpReserved interface { + // ToProto marshals PatternFlowRsvpReserved to protobuf object *otg.PatternFlowRsvpReserved + ToProto() (*otg.PatternFlowRsvpReserved, error) + // ToPbText marshals PatternFlowRsvpReserved to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRsvpReserved to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRsvpReserved to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRsvpReserved struct { + obj *patternFlowRsvpReserved +} + +type unMarshalPatternFlowRsvpReserved interface { + // FromProto unmarshals PatternFlowRsvpReserved from protobuf object *otg.PatternFlowRsvpReserved + FromProto(msg *otg.PatternFlowRsvpReserved) (PatternFlowRsvpReserved, error) + // FromPbText unmarshals PatternFlowRsvpReserved from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRsvpReserved from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRsvpReserved from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRsvpReserved) Marshal() marshalPatternFlowRsvpReserved { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRsvpReserved{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRsvpReserved) Unmarshal() unMarshalPatternFlowRsvpReserved { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRsvpReserved{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRsvpReserved) ToProto() (*otg.PatternFlowRsvpReserved, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRsvpReserved) FromProto(msg *otg.PatternFlowRsvpReserved) (PatternFlowRsvpReserved, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRsvpReserved) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRsvpReserved) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRsvpReserved) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRsvpReserved) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRsvpReserved) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRsvpReserved) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRsvpReserved) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRsvpReserved) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRsvpReserved) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRsvpReserved) Clone() (PatternFlowRsvpReserved, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRsvpReserved() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRsvpReserved) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRsvpReserved is reserved +type PatternFlowRsvpReserved interface { + Validation + // msg marshals PatternFlowRsvpReserved to protobuf object *otg.PatternFlowRsvpReserved + // and doesn't set defaults + msg() *otg.PatternFlowRsvpReserved + // setMsg unmarshals PatternFlowRsvpReserved from protobuf object *otg.PatternFlowRsvpReserved + // and doesn't set defaults + setMsg(*otg.PatternFlowRsvpReserved) PatternFlowRsvpReserved + // provides marshal interface + Marshal() marshalPatternFlowRsvpReserved + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRsvpReserved + // validate validates PatternFlowRsvpReserved + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRsvpReserved, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRsvpReservedChoiceEnum, set in PatternFlowRsvpReserved + Choice() PatternFlowRsvpReservedChoiceEnum + // setChoice assigns PatternFlowRsvpReservedChoiceEnum provided by user to PatternFlowRsvpReserved + setChoice(value PatternFlowRsvpReservedChoiceEnum) PatternFlowRsvpReserved + // HasChoice checks if Choice has been set in PatternFlowRsvpReserved + HasChoice() bool + // Value returns uint32, set in PatternFlowRsvpReserved. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRsvpReserved + SetValue(value uint32) PatternFlowRsvpReserved + // HasValue checks if Value has been set in PatternFlowRsvpReserved + HasValue() bool + // Values returns []uint32, set in PatternFlowRsvpReserved. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRsvpReserved + SetValues(value []uint32) PatternFlowRsvpReserved + // Increment returns PatternFlowRsvpReservedCounter, set in PatternFlowRsvpReserved. + // PatternFlowRsvpReservedCounter is integer counter pattern + Increment() PatternFlowRsvpReservedCounter + // SetIncrement assigns PatternFlowRsvpReservedCounter provided by user to PatternFlowRsvpReserved. + // PatternFlowRsvpReservedCounter is integer counter pattern + SetIncrement(value PatternFlowRsvpReservedCounter) PatternFlowRsvpReserved + // HasIncrement checks if Increment has been set in PatternFlowRsvpReserved + HasIncrement() bool + // Decrement returns PatternFlowRsvpReservedCounter, set in PatternFlowRsvpReserved. + // PatternFlowRsvpReservedCounter is integer counter pattern + Decrement() PatternFlowRsvpReservedCounter + // SetDecrement assigns PatternFlowRsvpReservedCounter provided by user to PatternFlowRsvpReserved. + // PatternFlowRsvpReservedCounter is integer counter pattern + SetDecrement(value PatternFlowRsvpReservedCounter) PatternFlowRsvpReserved + // HasDecrement checks if Decrement has been set in PatternFlowRsvpReserved + HasDecrement() bool + setNil() +} + +type PatternFlowRsvpReservedChoiceEnum string + +// Enum of Choice on PatternFlowRsvpReserved +var PatternFlowRsvpReservedChoice = struct { + VALUE PatternFlowRsvpReservedChoiceEnum + VALUES PatternFlowRsvpReservedChoiceEnum + INCREMENT PatternFlowRsvpReservedChoiceEnum + DECREMENT PatternFlowRsvpReservedChoiceEnum +}{ + VALUE: PatternFlowRsvpReservedChoiceEnum("value"), + VALUES: PatternFlowRsvpReservedChoiceEnum("values"), + INCREMENT: PatternFlowRsvpReservedChoiceEnum("increment"), + DECREMENT: PatternFlowRsvpReservedChoiceEnum("decrement"), +} + +func (obj *patternFlowRsvpReserved) Choice() PatternFlowRsvpReservedChoiceEnum { + return PatternFlowRsvpReservedChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRsvpReserved) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRsvpReserved) setChoice(value PatternFlowRsvpReservedChoiceEnum) PatternFlowRsvpReserved { + intValue, ok := otg.PatternFlowRsvpReserved_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRsvpReservedChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRsvpReserved_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRsvpReservedChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRsvpReservedChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRsvpReservedChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRsvpReservedCounter().msg() + } + + if value == PatternFlowRsvpReservedChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRsvpReservedCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRsvpReserved) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRsvpReservedChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRsvpReserved) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRsvpReserved object +func (obj *patternFlowRsvpReserved) SetValue(value uint32) PatternFlowRsvpReserved { + obj.setChoice(PatternFlowRsvpReservedChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRsvpReserved) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRsvpReserved object +func (obj *patternFlowRsvpReserved) SetValues(value []uint32) PatternFlowRsvpReserved { + obj.setChoice(PatternFlowRsvpReservedChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRsvpReservedCounter +func (obj *patternFlowRsvpReserved) Increment() PatternFlowRsvpReservedCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRsvpReservedChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRsvpReservedCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRsvpReservedCounter +func (obj *patternFlowRsvpReserved) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRsvpReservedCounter value in the PatternFlowRsvpReserved object +func (obj *patternFlowRsvpReserved) SetIncrement(value PatternFlowRsvpReservedCounter) PatternFlowRsvpReserved { + obj.setChoice(PatternFlowRsvpReservedChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRsvpReservedCounter +func (obj *patternFlowRsvpReserved) Decrement() PatternFlowRsvpReservedCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRsvpReservedChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRsvpReservedCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRsvpReservedCounter +func (obj *patternFlowRsvpReserved) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRsvpReservedCounter value in the PatternFlowRsvpReserved object +func (obj *patternFlowRsvpReserved) SetDecrement(value PatternFlowRsvpReservedCounter) PatternFlowRsvpReserved { + obj.setChoice(PatternFlowRsvpReservedChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRsvpReserved) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRsvpReserved.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRsvpReserved.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRsvpReserved) setDefault() { + var choices_set int = 0 + var choice PatternFlowRsvpReservedChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRsvpReservedChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRsvpReservedChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRsvpReservedChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRsvpReservedChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRsvpReservedChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRsvpReserved") + } + } else { + intVal := otg.PatternFlowRsvpReserved_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRsvpReserved_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_reserved_counter.go b/gosnappi/pattern_flow_rsvp_reserved_counter.go new file mode 100644 index 00000000..739b4de8 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_reserved_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRsvpReservedCounter ***** +type patternFlowRsvpReservedCounter struct { + validation + obj *otg.PatternFlowRsvpReservedCounter + marshaller marshalPatternFlowRsvpReservedCounter + unMarshaller unMarshalPatternFlowRsvpReservedCounter +} + +func NewPatternFlowRsvpReservedCounter() PatternFlowRsvpReservedCounter { + obj := patternFlowRsvpReservedCounter{obj: &otg.PatternFlowRsvpReservedCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRsvpReservedCounter) msg() *otg.PatternFlowRsvpReservedCounter { + return obj.obj +} + +func (obj *patternFlowRsvpReservedCounter) setMsg(msg *otg.PatternFlowRsvpReservedCounter) PatternFlowRsvpReservedCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRsvpReservedCounter struct { + obj *patternFlowRsvpReservedCounter +} + +type marshalPatternFlowRsvpReservedCounter interface { + // ToProto marshals PatternFlowRsvpReservedCounter to protobuf object *otg.PatternFlowRsvpReservedCounter + ToProto() (*otg.PatternFlowRsvpReservedCounter, error) + // ToPbText marshals PatternFlowRsvpReservedCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRsvpReservedCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRsvpReservedCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRsvpReservedCounter struct { + obj *patternFlowRsvpReservedCounter +} + +type unMarshalPatternFlowRsvpReservedCounter interface { + // FromProto unmarshals PatternFlowRsvpReservedCounter from protobuf object *otg.PatternFlowRsvpReservedCounter + FromProto(msg *otg.PatternFlowRsvpReservedCounter) (PatternFlowRsvpReservedCounter, error) + // FromPbText unmarshals PatternFlowRsvpReservedCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRsvpReservedCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRsvpReservedCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRsvpReservedCounter) Marshal() marshalPatternFlowRsvpReservedCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRsvpReservedCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRsvpReservedCounter) Unmarshal() unMarshalPatternFlowRsvpReservedCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRsvpReservedCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRsvpReservedCounter) ToProto() (*otg.PatternFlowRsvpReservedCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRsvpReservedCounter) FromProto(msg *otg.PatternFlowRsvpReservedCounter) (PatternFlowRsvpReservedCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRsvpReservedCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRsvpReservedCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRsvpReservedCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRsvpReservedCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRsvpReservedCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRsvpReservedCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRsvpReservedCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRsvpReservedCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRsvpReservedCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRsvpReservedCounter) Clone() (PatternFlowRsvpReservedCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRsvpReservedCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRsvpReservedCounter is integer counter pattern +type PatternFlowRsvpReservedCounter interface { + Validation + // msg marshals PatternFlowRsvpReservedCounter to protobuf object *otg.PatternFlowRsvpReservedCounter + // and doesn't set defaults + msg() *otg.PatternFlowRsvpReservedCounter + // setMsg unmarshals PatternFlowRsvpReservedCounter from protobuf object *otg.PatternFlowRsvpReservedCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRsvpReservedCounter) PatternFlowRsvpReservedCounter + // provides marshal interface + Marshal() marshalPatternFlowRsvpReservedCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRsvpReservedCounter + // validate validates PatternFlowRsvpReservedCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRsvpReservedCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRsvpReservedCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRsvpReservedCounter + SetStart(value uint32) PatternFlowRsvpReservedCounter + // HasStart checks if Start has been set in PatternFlowRsvpReservedCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRsvpReservedCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRsvpReservedCounter + SetStep(value uint32) PatternFlowRsvpReservedCounter + // HasStep checks if Step has been set in PatternFlowRsvpReservedCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRsvpReservedCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRsvpReservedCounter + SetCount(value uint32) PatternFlowRsvpReservedCounter + // HasCount checks if Count has been set in PatternFlowRsvpReservedCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRsvpReservedCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRsvpReservedCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRsvpReservedCounter object +func (obj *patternFlowRsvpReservedCounter) SetStart(value uint32) PatternFlowRsvpReservedCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRsvpReservedCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRsvpReservedCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRsvpReservedCounter object +func (obj *patternFlowRsvpReservedCounter) SetStep(value uint32) PatternFlowRsvpReservedCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRsvpReservedCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRsvpReservedCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRsvpReservedCounter object +func (obj *patternFlowRsvpReservedCounter) SetCount(value uint32) PatternFlowRsvpReservedCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRsvpReservedCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRsvpReservedCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRsvpReservedCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRsvpReservedCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRsvpReservedCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_rsvp_rsvp_checksum.go b/gosnappi/pattern_flow_rsvp_rsvp_checksum.go new file mode 100644 index 00000000..12d98b57 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_rsvp_checksum.go @@ -0,0 +1,434 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRsvpRsvpChecksum ***** +type patternFlowRsvpRsvpChecksum struct { + validation + obj *otg.PatternFlowRsvpRsvpChecksum + marshaller marshalPatternFlowRsvpRsvpChecksum + unMarshaller unMarshalPatternFlowRsvpRsvpChecksum +} + +func NewPatternFlowRsvpRsvpChecksum() PatternFlowRsvpRsvpChecksum { + obj := patternFlowRsvpRsvpChecksum{obj: &otg.PatternFlowRsvpRsvpChecksum{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRsvpRsvpChecksum) msg() *otg.PatternFlowRsvpRsvpChecksum { + return obj.obj +} + +func (obj *patternFlowRsvpRsvpChecksum) setMsg(msg *otg.PatternFlowRsvpRsvpChecksum) PatternFlowRsvpRsvpChecksum { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRsvpRsvpChecksum struct { + obj *patternFlowRsvpRsvpChecksum +} + +type marshalPatternFlowRsvpRsvpChecksum interface { + // ToProto marshals PatternFlowRsvpRsvpChecksum to protobuf object *otg.PatternFlowRsvpRsvpChecksum + ToProto() (*otg.PatternFlowRsvpRsvpChecksum, error) + // ToPbText marshals PatternFlowRsvpRsvpChecksum to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRsvpRsvpChecksum to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRsvpRsvpChecksum to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRsvpRsvpChecksum struct { + obj *patternFlowRsvpRsvpChecksum +} + +type unMarshalPatternFlowRsvpRsvpChecksum interface { + // FromProto unmarshals PatternFlowRsvpRsvpChecksum from protobuf object *otg.PatternFlowRsvpRsvpChecksum + FromProto(msg *otg.PatternFlowRsvpRsvpChecksum) (PatternFlowRsvpRsvpChecksum, error) + // FromPbText unmarshals PatternFlowRsvpRsvpChecksum from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRsvpRsvpChecksum from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRsvpRsvpChecksum from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRsvpRsvpChecksum) Marshal() marshalPatternFlowRsvpRsvpChecksum { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRsvpRsvpChecksum{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRsvpRsvpChecksum) Unmarshal() unMarshalPatternFlowRsvpRsvpChecksum { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRsvpRsvpChecksum{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRsvpRsvpChecksum) ToProto() (*otg.PatternFlowRsvpRsvpChecksum, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRsvpRsvpChecksum) FromProto(msg *otg.PatternFlowRsvpRsvpChecksum) (PatternFlowRsvpRsvpChecksum, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRsvpRsvpChecksum) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRsvpRsvpChecksum) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRsvpRsvpChecksum) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRsvpRsvpChecksum) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRsvpRsvpChecksum) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRsvpRsvpChecksum) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRsvpRsvpChecksum) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRsvpRsvpChecksum) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRsvpRsvpChecksum) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRsvpRsvpChecksum) Clone() (PatternFlowRsvpRsvpChecksum, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRsvpRsvpChecksum() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRsvpRsvpChecksum is the one's complement of the one's complement sum of the message, with the checksum field replaced by zero for the purpose of computing the checksum. An all-zero value means that no checksum was transmitted. +type PatternFlowRsvpRsvpChecksum interface { + Validation + // msg marshals PatternFlowRsvpRsvpChecksum to protobuf object *otg.PatternFlowRsvpRsvpChecksum + // and doesn't set defaults + msg() *otg.PatternFlowRsvpRsvpChecksum + // setMsg unmarshals PatternFlowRsvpRsvpChecksum from protobuf object *otg.PatternFlowRsvpRsvpChecksum + // and doesn't set defaults + setMsg(*otg.PatternFlowRsvpRsvpChecksum) PatternFlowRsvpRsvpChecksum + // provides marshal interface + Marshal() marshalPatternFlowRsvpRsvpChecksum + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRsvpRsvpChecksum + // validate validates PatternFlowRsvpRsvpChecksum + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRsvpRsvpChecksum, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRsvpRsvpChecksumChoiceEnum, set in PatternFlowRsvpRsvpChecksum + Choice() PatternFlowRsvpRsvpChecksumChoiceEnum + // setChoice assigns PatternFlowRsvpRsvpChecksumChoiceEnum provided by user to PatternFlowRsvpRsvpChecksum + setChoice(value PatternFlowRsvpRsvpChecksumChoiceEnum) PatternFlowRsvpRsvpChecksum + // HasChoice checks if Choice has been set in PatternFlowRsvpRsvpChecksum + HasChoice() bool + // Generated returns PatternFlowRsvpRsvpChecksumGeneratedEnum, set in PatternFlowRsvpRsvpChecksum + Generated() PatternFlowRsvpRsvpChecksumGeneratedEnum + // SetGenerated assigns PatternFlowRsvpRsvpChecksumGeneratedEnum provided by user to PatternFlowRsvpRsvpChecksum + SetGenerated(value PatternFlowRsvpRsvpChecksumGeneratedEnum) PatternFlowRsvpRsvpChecksum + // HasGenerated checks if Generated has been set in PatternFlowRsvpRsvpChecksum + HasGenerated() bool + // Custom returns uint32, set in PatternFlowRsvpRsvpChecksum. + Custom() uint32 + // SetCustom assigns uint32 provided by user to PatternFlowRsvpRsvpChecksum + SetCustom(value uint32) PatternFlowRsvpRsvpChecksum + // HasCustom checks if Custom has been set in PatternFlowRsvpRsvpChecksum + HasCustom() bool +} + +type PatternFlowRsvpRsvpChecksumChoiceEnum string + +// Enum of Choice on PatternFlowRsvpRsvpChecksum +var PatternFlowRsvpRsvpChecksumChoice = struct { + GENERATED PatternFlowRsvpRsvpChecksumChoiceEnum + CUSTOM PatternFlowRsvpRsvpChecksumChoiceEnum +}{ + GENERATED: PatternFlowRsvpRsvpChecksumChoiceEnum("generated"), + CUSTOM: PatternFlowRsvpRsvpChecksumChoiceEnum("custom"), +} + +func (obj *patternFlowRsvpRsvpChecksum) Choice() PatternFlowRsvpRsvpChecksumChoiceEnum { + return PatternFlowRsvpRsvpChecksumChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The type of checksum +// Choice returns a string +func (obj *patternFlowRsvpRsvpChecksum) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRsvpRsvpChecksum) setChoice(value PatternFlowRsvpRsvpChecksumChoiceEnum) PatternFlowRsvpRsvpChecksum { + intValue, ok := otg.PatternFlowRsvpRsvpChecksum_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRsvpRsvpChecksumChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRsvpRsvpChecksum_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.obj.Generated = otg.PatternFlowRsvpRsvpChecksum_Generated_unspecified.Enum() + return obj +} + +type PatternFlowRsvpRsvpChecksumGeneratedEnum string + +// Enum of Generated on PatternFlowRsvpRsvpChecksum +var PatternFlowRsvpRsvpChecksumGenerated = struct { + GOOD PatternFlowRsvpRsvpChecksumGeneratedEnum + BAD PatternFlowRsvpRsvpChecksumGeneratedEnum +}{ + GOOD: PatternFlowRsvpRsvpChecksumGeneratedEnum("good"), + BAD: PatternFlowRsvpRsvpChecksumGeneratedEnum("bad"), +} + +func (obj *patternFlowRsvpRsvpChecksum) Generated() PatternFlowRsvpRsvpChecksumGeneratedEnum { + return PatternFlowRsvpRsvpChecksumGeneratedEnum(obj.obj.Generated.Enum().String()) +} + +// A system generated checksum value +// Generated returns a string +func (obj *patternFlowRsvpRsvpChecksum) HasGenerated() bool { + return obj.obj.Generated != nil +} + +func (obj *patternFlowRsvpRsvpChecksum) SetGenerated(value PatternFlowRsvpRsvpChecksumGeneratedEnum) PatternFlowRsvpRsvpChecksum { + intValue, ok := otg.PatternFlowRsvpRsvpChecksum_Generated_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRsvpRsvpChecksumGeneratedEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRsvpRsvpChecksum_Generated_Enum(intValue) + obj.obj.Generated = &enumValue + + return obj +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowRsvpRsvpChecksum) Custom() uint32 { + + if obj.obj.Custom == nil { + obj.setChoice(PatternFlowRsvpRsvpChecksumChoice.CUSTOM) + } + + return *obj.obj.Custom + +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowRsvpRsvpChecksum) HasCustom() bool { + return obj.obj.Custom != nil +} + +// A custom checksum value +// SetCustom sets the uint32 value in the PatternFlowRsvpRsvpChecksum object +func (obj *patternFlowRsvpRsvpChecksum) SetCustom(value uint32) PatternFlowRsvpRsvpChecksum { + obj.setChoice(PatternFlowRsvpRsvpChecksumChoice.CUSTOM) + obj.obj.Custom = &value + return obj +} + +func (obj *patternFlowRsvpRsvpChecksum) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Custom != nil { + + if *obj.obj.Custom > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRsvpRsvpChecksum.Custom <= 65535 but Got %d", *obj.obj.Custom)) + } + + } + +} + +func (obj *patternFlowRsvpRsvpChecksum) setDefault() { + var choices_set int = 0 + var choice PatternFlowRsvpRsvpChecksumChoiceEnum + + if obj.obj.Generated != nil && obj.obj.Generated.Number() != 0 { + choices_set += 1 + choice = PatternFlowRsvpRsvpChecksumChoice.GENERATED + } + + if obj.obj.Custom != nil { + choices_set += 1 + choice = PatternFlowRsvpRsvpChecksumChoice.CUSTOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRsvpRsvpChecksumChoice.GENERATED) + if obj.obj.Generated.Number() == 0 { + obj.SetGenerated(PatternFlowRsvpRsvpChecksumGenerated.GOOD) + + } + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRsvpRsvpChecksum") + } + } else { + intVal := otg.PatternFlowRsvpRsvpChecksum_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRsvpRsvpChecksum_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_time_to_live.go b/gosnappi/pattern_flow_rsvp_time_to_live.go new file mode 100644 index 00000000..13b58f67 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_time_to_live.go @@ -0,0 +1,558 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRsvpTimeToLive ***** +type patternFlowRsvpTimeToLive struct { + validation + obj *otg.PatternFlowRsvpTimeToLive + marshaller marshalPatternFlowRsvpTimeToLive + unMarshaller unMarshalPatternFlowRsvpTimeToLive + incrementHolder PatternFlowRsvpTimeToLiveCounter + decrementHolder PatternFlowRsvpTimeToLiveCounter +} + +func NewPatternFlowRsvpTimeToLive() PatternFlowRsvpTimeToLive { + obj := patternFlowRsvpTimeToLive{obj: &otg.PatternFlowRsvpTimeToLive{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRsvpTimeToLive) msg() *otg.PatternFlowRsvpTimeToLive { + return obj.obj +} + +func (obj *patternFlowRsvpTimeToLive) setMsg(msg *otg.PatternFlowRsvpTimeToLive) PatternFlowRsvpTimeToLive { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRsvpTimeToLive struct { + obj *patternFlowRsvpTimeToLive +} + +type marshalPatternFlowRsvpTimeToLive interface { + // ToProto marshals PatternFlowRsvpTimeToLive to protobuf object *otg.PatternFlowRsvpTimeToLive + ToProto() (*otg.PatternFlowRsvpTimeToLive, error) + // ToPbText marshals PatternFlowRsvpTimeToLive to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRsvpTimeToLive to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRsvpTimeToLive to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRsvpTimeToLive struct { + obj *patternFlowRsvpTimeToLive +} + +type unMarshalPatternFlowRsvpTimeToLive interface { + // FromProto unmarshals PatternFlowRsvpTimeToLive from protobuf object *otg.PatternFlowRsvpTimeToLive + FromProto(msg *otg.PatternFlowRsvpTimeToLive) (PatternFlowRsvpTimeToLive, error) + // FromPbText unmarshals PatternFlowRsvpTimeToLive from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRsvpTimeToLive from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRsvpTimeToLive from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRsvpTimeToLive) Marshal() marshalPatternFlowRsvpTimeToLive { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRsvpTimeToLive{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRsvpTimeToLive) Unmarshal() unMarshalPatternFlowRsvpTimeToLive { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRsvpTimeToLive{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRsvpTimeToLive) ToProto() (*otg.PatternFlowRsvpTimeToLive, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRsvpTimeToLive) FromProto(msg *otg.PatternFlowRsvpTimeToLive) (PatternFlowRsvpTimeToLive, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRsvpTimeToLive) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRsvpTimeToLive) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRsvpTimeToLive) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRsvpTimeToLive) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRsvpTimeToLive) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRsvpTimeToLive) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRsvpTimeToLive) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRsvpTimeToLive) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRsvpTimeToLive) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRsvpTimeToLive) Clone() (PatternFlowRsvpTimeToLive, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRsvpTimeToLive() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowRsvpTimeToLive) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowRsvpTimeToLive is the IP time-to-live(TTL) value with which the message was sent. +type PatternFlowRsvpTimeToLive interface { + Validation + // msg marshals PatternFlowRsvpTimeToLive to protobuf object *otg.PatternFlowRsvpTimeToLive + // and doesn't set defaults + msg() *otg.PatternFlowRsvpTimeToLive + // setMsg unmarshals PatternFlowRsvpTimeToLive from protobuf object *otg.PatternFlowRsvpTimeToLive + // and doesn't set defaults + setMsg(*otg.PatternFlowRsvpTimeToLive) PatternFlowRsvpTimeToLive + // provides marshal interface + Marshal() marshalPatternFlowRsvpTimeToLive + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRsvpTimeToLive + // validate validates PatternFlowRsvpTimeToLive + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRsvpTimeToLive, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowRsvpTimeToLiveChoiceEnum, set in PatternFlowRsvpTimeToLive + Choice() PatternFlowRsvpTimeToLiveChoiceEnum + // setChoice assigns PatternFlowRsvpTimeToLiveChoiceEnum provided by user to PatternFlowRsvpTimeToLive + setChoice(value PatternFlowRsvpTimeToLiveChoiceEnum) PatternFlowRsvpTimeToLive + // HasChoice checks if Choice has been set in PatternFlowRsvpTimeToLive + HasChoice() bool + // Value returns uint32, set in PatternFlowRsvpTimeToLive. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowRsvpTimeToLive + SetValue(value uint32) PatternFlowRsvpTimeToLive + // HasValue checks if Value has been set in PatternFlowRsvpTimeToLive + HasValue() bool + // Values returns []uint32, set in PatternFlowRsvpTimeToLive. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowRsvpTimeToLive + SetValues(value []uint32) PatternFlowRsvpTimeToLive + // Increment returns PatternFlowRsvpTimeToLiveCounter, set in PatternFlowRsvpTimeToLive. + // PatternFlowRsvpTimeToLiveCounter is integer counter pattern + Increment() PatternFlowRsvpTimeToLiveCounter + // SetIncrement assigns PatternFlowRsvpTimeToLiveCounter provided by user to PatternFlowRsvpTimeToLive. + // PatternFlowRsvpTimeToLiveCounter is integer counter pattern + SetIncrement(value PatternFlowRsvpTimeToLiveCounter) PatternFlowRsvpTimeToLive + // HasIncrement checks if Increment has been set in PatternFlowRsvpTimeToLive + HasIncrement() bool + // Decrement returns PatternFlowRsvpTimeToLiveCounter, set in PatternFlowRsvpTimeToLive. + // PatternFlowRsvpTimeToLiveCounter is integer counter pattern + Decrement() PatternFlowRsvpTimeToLiveCounter + // SetDecrement assigns PatternFlowRsvpTimeToLiveCounter provided by user to PatternFlowRsvpTimeToLive. + // PatternFlowRsvpTimeToLiveCounter is integer counter pattern + SetDecrement(value PatternFlowRsvpTimeToLiveCounter) PatternFlowRsvpTimeToLive + // HasDecrement checks if Decrement has been set in PatternFlowRsvpTimeToLive + HasDecrement() bool + setNil() +} + +type PatternFlowRsvpTimeToLiveChoiceEnum string + +// Enum of Choice on PatternFlowRsvpTimeToLive +var PatternFlowRsvpTimeToLiveChoice = struct { + VALUE PatternFlowRsvpTimeToLiveChoiceEnum + VALUES PatternFlowRsvpTimeToLiveChoiceEnum + INCREMENT PatternFlowRsvpTimeToLiveChoiceEnum + DECREMENT PatternFlowRsvpTimeToLiveChoiceEnum +}{ + VALUE: PatternFlowRsvpTimeToLiveChoiceEnum("value"), + VALUES: PatternFlowRsvpTimeToLiveChoiceEnum("values"), + INCREMENT: PatternFlowRsvpTimeToLiveChoiceEnum("increment"), + DECREMENT: PatternFlowRsvpTimeToLiveChoiceEnum("decrement"), +} + +func (obj *patternFlowRsvpTimeToLive) Choice() PatternFlowRsvpTimeToLiveChoiceEnum { + return PatternFlowRsvpTimeToLiveChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowRsvpTimeToLive) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowRsvpTimeToLive) setChoice(value PatternFlowRsvpTimeToLiveChoiceEnum) PatternFlowRsvpTimeToLive { + intValue, ok := otg.PatternFlowRsvpTimeToLive_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowRsvpTimeToLiveChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowRsvpTimeToLive_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowRsvpTimeToLiveChoice.VALUE { + defaultValue := uint32(64) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowRsvpTimeToLiveChoice.VALUES { + defaultValue := []uint32{64} + obj.obj.Values = defaultValue + } + + if value == PatternFlowRsvpTimeToLiveChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowRsvpTimeToLiveCounter().msg() + } + + if value == PatternFlowRsvpTimeToLiveChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowRsvpTimeToLiveCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRsvpTimeToLive) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowRsvpTimeToLiveChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowRsvpTimeToLive) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowRsvpTimeToLive object +func (obj *patternFlowRsvpTimeToLive) SetValue(value uint32) PatternFlowRsvpTimeToLive { + obj.setChoice(PatternFlowRsvpTimeToLiveChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowRsvpTimeToLive) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{64}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowRsvpTimeToLive object +func (obj *patternFlowRsvpTimeToLive) SetValues(value []uint32) PatternFlowRsvpTimeToLive { + obj.setChoice(PatternFlowRsvpTimeToLiveChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowRsvpTimeToLiveCounter +func (obj *patternFlowRsvpTimeToLive) Increment() PatternFlowRsvpTimeToLiveCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowRsvpTimeToLiveChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowRsvpTimeToLiveCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowRsvpTimeToLiveCounter +func (obj *patternFlowRsvpTimeToLive) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowRsvpTimeToLiveCounter value in the PatternFlowRsvpTimeToLive object +func (obj *patternFlowRsvpTimeToLive) SetIncrement(value PatternFlowRsvpTimeToLiveCounter) PatternFlowRsvpTimeToLive { + obj.setChoice(PatternFlowRsvpTimeToLiveChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowRsvpTimeToLiveCounter +func (obj *patternFlowRsvpTimeToLive) Decrement() PatternFlowRsvpTimeToLiveCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowRsvpTimeToLiveChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowRsvpTimeToLiveCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowRsvpTimeToLiveCounter +func (obj *patternFlowRsvpTimeToLive) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowRsvpTimeToLiveCounter value in the PatternFlowRsvpTimeToLive object +func (obj *patternFlowRsvpTimeToLive) SetDecrement(value PatternFlowRsvpTimeToLiveCounter) PatternFlowRsvpTimeToLive { + obj.setChoice(PatternFlowRsvpTimeToLiveChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowRsvpTimeToLive) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRsvpTimeToLive.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowRsvpTimeToLive.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowRsvpTimeToLive) setDefault() { + var choices_set int = 0 + var choice PatternFlowRsvpTimeToLiveChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowRsvpTimeToLiveChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowRsvpTimeToLiveChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowRsvpTimeToLiveChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowRsvpTimeToLiveChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowRsvpTimeToLiveChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowRsvpTimeToLive") + } + } else { + intVal := otg.PatternFlowRsvpTimeToLive_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowRsvpTimeToLive_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_rsvp_time_to_live_counter.go b/gosnappi/pattern_flow_rsvp_time_to_live_counter.go new file mode 100644 index 00000000..7e4e6640 --- /dev/null +++ b/gosnappi/pattern_flow_rsvp_time_to_live_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowRsvpTimeToLiveCounter ***** +type patternFlowRsvpTimeToLiveCounter struct { + validation + obj *otg.PatternFlowRsvpTimeToLiveCounter + marshaller marshalPatternFlowRsvpTimeToLiveCounter + unMarshaller unMarshalPatternFlowRsvpTimeToLiveCounter +} + +func NewPatternFlowRsvpTimeToLiveCounter() PatternFlowRsvpTimeToLiveCounter { + obj := patternFlowRsvpTimeToLiveCounter{obj: &otg.PatternFlowRsvpTimeToLiveCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowRsvpTimeToLiveCounter) msg() *otg.PatternFlowRsvpTimeToLiveCounter { + return obj.obj +} + +func (obj *patternFlowRsvpTimeToLiveCounter) setMsg(msg *otg.PatternFlowRsvpTimeToLiveCounter) PatternFlowRsvpTimeToLiveCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowRsvpTimeToLiveCounter struct { + obj *patternFlowRsvpTimeToLiveCounter +} + +type marshalPatternFlowRsvpTimeToLiveCounter interface { + // ToProto marshals PatternFlowRsvpTimeToLiveCounter to protobuf object *otg.PatternFlowRsvpTimeToLiveCounter + ToProto() (*otg.PatternFlowRsvpTimeToLiveCounter, error) + // ToPbText marshals PatternFlowRsvpTimeToLiveCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowRsvpTimeToLiveCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowRsvpTimeToLiveCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowRsvpTimeToLiveCounter struct { + obj *patternFlowRsvpTimeToLiveCounter +} + +type unMarshalPatternFlowRsvpTimeToLiveCounter interface { + // FromProto unmarshals PatternFlowRsvpTimeToLiveCounter from protobuf object *otg.PatternFlowRsvpTimeToLiveCounter + FromProto(msg *otg.PatternFlowRsvpTimeToLiveCounter) (PatternFlowRsvpTimeToLiveCounter, error) + // FromPbText unmarshals PatternFlowRsvpTimeToLiveCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowRsvpTimeToLiveCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowRsvpTimeToLiveCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowRsvpTimeToLiveCounter) Marshal() marshalPatternFlowRsvpTimeToLiveCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowRsvpTimeToLiveCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowRsvpTimeToLiveCounter) Unmarshal() unMarshalPatternFlowRsvpTimeToLiveCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowRsvpTimeToLiveCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowRsvpTimeToLiveCounter) ToProto() (*otg.PatternFlowRsvpTimeToLiveCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowRsvpTimeToLiveCounter) FromProto(msg *otg.PatternFlowRsvpTimeToLiveCounter) (PatternFlowRsvpTimeToLiveCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowRsvpTimeToLiveCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowRsvpTimeToLiveCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowRsvpTimeToLiveCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRsvpTimeToLiveCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowRsvpTimeToLiveCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowRsvpTimeToLiveCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowRsvpTimeToLiveCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowRsvpTimeToLiveCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowRsvpTimeToLiveCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowRsvpTimeToLiveCounter) Clone() (PatternFlowRsvpTimeToLiveCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowRsvpTimeToLiveCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowRsvpTimeToLiveCounter is integer counter pattern +type PatternFlowRsvpTimeToLiveCounter interface { + Validation + // msg marshals PatternFlowRsvpTimeToLiveCounter to protobuf object *otg.PatternFlowRsvpTimeToLiveCounter + // and doesn't set defaults + msg() *otg.PatternFlowRsvpTimeToLiveCounter + // setMsg unmarshals PatternFlowRsvpTimeToLiveCounter from protobuf object *otg.PatternFlowRsvpTimeToLiveCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowRsvpTimeToLiveCounter) PatternFlowRsvpTimeToLiveCounter + // provides marshal interface + Marshal() marshalPatternFlowRsvpTimeToLiveCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowRsvpTimeToLiveCounter + // validate validates PatternFlowRsvpTimeToLiveCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowRsvpTimeToLiveCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowRsvpTimeToLiveCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowRsvpTimeToLiveCounter + SetStart(value uint32) PatternFlowRsvpTimeToLiveCounter + // HasStart checks if Start has been set in PatternFlowRsvpTimeToLiveCounter + HasStart() bool + // Step returns uint32, set in PatternFlowRsvpTimeToLiveCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowRsvpTimeToLiveCounter + SetStep(value uint32) PatternFlowRsvpTimeToLiveCounter + // HasStep checks if Step has been set in PatternFlowRsvpTimeToLiveCounter + HasStep() bool + // Count returns uint32, set in PatternFlowRsvpTimeToLiveCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowRsvpTimeToLiveCounter + SetCount(value uint32) PatternFlowRsvpTimeToLiveCounter + // HasCount checks if Count has been set in PatternFlowRsvpTimeToLiveCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRsvpTimeToLiveCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowRsvpTimeToLiveCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowRsvpTimeToLiveCounter object +func (obj *patternFlowRsvpTimeToLiveCounter) SetStart(value uint32) PatternFlowRsvpTimeToLiveCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRsvpTimeToLiveCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowRsvpTimeToLiveCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowRsvpTimeToLiveCounter object +func (obj *patternFlowRsvpTimeToLiveCounter) SetStep(value uint32) PatternFlowRsvpTimeToLiveCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRsvpTimeToLiveCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowRsvpTimeToLiveCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowRsvpTimeToLiveCounter object +func (obj *patternFlowRsvpTimeToLiveCounter) SetCount(value uint32) PatternFlowRsvpTimeToLiveCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowRsvpTimeToLiveCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRsvpTimeToLiveCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRsvpTimeToLiveCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowRsvpTimeToLiveCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowRsvpTimeToLiveCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(64) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_max_repetitions.go b/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_max_repetitions.go new file mode 100644 index 00000000..b3f0df8a --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_max_repetitions.go @@ -0,0 +1,531 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CBulkPDUMaxRepetitions ***** +type patternFlowSnmpv2CBulkPDUMaxRepetitions struct { + validation + obj *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions + marshaller marshalPatternFlowSnmpv2CBulkPDUMaxRepetitions + unMarshaller unMarshalPatternFlowSnmpv2CBulkPDUMaxRepetitions + incrementHolder PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + decrementHolder PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter +} + +func NewPatternFlowSnmpv2CBulkPDUMaxRepetitions() PatternFlowSnmpv2CBulkPDUMaxRepetitions { + obj := patternFlowSnmpv2CBulkPDUMaxRepetitions{obj: &otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) msg() *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions { + return obj.obj +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) setMsg(msg *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions) PatternFlowSnmpv2CBulkPDUMaxRepetitions { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CBulkPDUMaxRepetitions struct { + obj *patternFlowSnmpv2CBulkPDUMaxRepetitions +} + +type marshalPatternFlowSnmpv2CBulkPDUMaxRepetitions interface { + // ToProto marshals PatternFlowSnmpv2CBulkPDUMaxRepetitions to protobuf object *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions + ToProto() (*otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions, error) + // ToPbText marshals PatternFlowSnmpv2CBulkPDUMaxRepetitions to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CBulkPDUMaxRepetitions to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CBulkPDUMaxRepetitions to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CBulkPDUMaxRepetitions struct { + obj *patternFlowSnmpv2CBulkPDUMaxRepetitions +} + +type unMarshalPatternFlowSnmpv2CBulkPDUMaxRepetitions interface { + // FromProto unmarshals PatternFlowSnmpv2CBulkPDUMaxRepetitions from protobuf object *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions + FromProto(msg *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions) (PatternFlowSnmpv2CBulkPDUMaxRepetitions, error) + // FromPbText unmarshals PatternFlowSnmpv2CBulkPDUMaxRepetitions from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CBulkPDUMaxRepetitions from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CBulkPDUMaxRepetitions from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) Marshal() marshalPatternFlowSnmpv2CBulkPDUMaxRepetitions { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CBulkPDUMaxRepetitions{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) Unmarshal() unMarshalPatternFlowSnmpv2CBulkPDUMaxRepetitions { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CBulkPDUMaxRepetitions{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CBulkPDUMaxRepetitions) ToProto() (*otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDUMaxRepetitions) FromProto(msg *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions) (PatternFlowSnmpv2CBulkPDUMaxRepetitions, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CBulkPDUMaxRepetitions) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDUMaxRepetitions) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CBulkPDUMaxRepetitions) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDUMaxRepetitions) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CBulkPDUMaxRepetitions) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDUMaxRepetitions) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) Clone() (PatternFlowSnmpv2CBulkPDUMaxRepetitions, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CBulkPDUMaxRepetitions() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowSnmpv2CBulkPDUMaxRepetitions is a maximum of max_repetitions variable bindings are requested in the Response-PDU for each of the remaining variable bindings in the GetBulkRequest after the non_repeaters variable bindings. +type PatternFlowSnmpv2CBulkPDUMaxRepetitions interface { + Validation + // msg marshals PatternFlowSnmpv2CBulkPDUMaxRepetitions to protobuf object *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions + // setMsg unmarshals PatternFlowSnmpv2CBulkPDUMaxRepetitions from protobuf object *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions) PatternFlowSnmpv2CBulkPDUMaxRepetitions + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CBulkPDUMaxRepetitions + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CBulkPDUMaxRepetitions + // validate validates PatternFlowSnmpv2CBulkPDUMaxRepetitions + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CBulkPDUMaxRepetitions, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum, set in PatternFlowSnmpv2CBulkPDUMaxRepetitions + Choice() PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum + // setChoice assigns PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum provided by user to PatternFlowSnmpv2CBulkPDUMaxRepetitions + setChoice(value PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum) PatternFlowSnmpv2CBulkPDUMaxRepetitions + // HasChoice checks if Choice has been set in PatternFlowSnmpv2CBulkPDUMaxRepetitions + HasChoice() bool + // Value returns uint32, set in PatternFlowSnmpv2CBulkPDUMaxRepetitions. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowSnmpv2CBulkPDUMaxRepetitions + SetValue(value uint32) PatternFlowSnmpv2CBulkPDUMaxRepetitions + // HasValue checks if Value has been set in PatternFlowSnmpv2CBulkPDUMaxRepetitions + HasValue() bool + // Values returns []uint32, set in PatternFlowSnmpv2CBulkPDUMaxRepetitions. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowSnmpv2CBulkPDUMaxRepetitions + SetValues(value []uint32) PatternFlowSnmpv2CBulkPDUMaxRepetitions + // Increment returns PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter, set in PatternFlowSnmpv2CBulkPDUMaxRepetitions. + Increment() PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + // SetIncrement assigns PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter provided by user to PatternFlowSnmpv2CBulkPDUMaxRepetitions. + SetIncrement(value PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) PatternFlowSnmpv2CBulkPDUMaxRepetitions + // HasIncrement checks if Increment has been set in PatternFlowSnmpv2CBulkPDUMaxRepetitions + HasIncrement() bool + // Decrement returns PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter, set in PatternFlowSnmpv2CBulkPDUMaxRepetitions. + Decrement() PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + // SetDecrement assigns PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter provided by user to PatternFlowSnmpv2CBulkPDUMaxRepetitions. + SetDecrement(value PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) PatternFlowSnmpv2CBulkPDUMaxRepetitions + // HasDecrement checks if Decrement has been set in PatternFlowSnmpv2CBulkPDUMaxRepetitions + HasDecrement() bool + setNil() +} + +type PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum string + +// Enum of Choice on PatternFlowSnmpv2CBulkPDUMaxRepetitions +var PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice = struct { + VALUE PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum + VALUES PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum + INCREMENT PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum + DECREMENT PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum +}{ + VALUE: PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum("value"), + VALUES: PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum("values"), + INCREMENT: PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum("increment"), + DECREMENT: PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum("decrement"), +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) Choice() PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum { + return PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) setChoice(value PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum) PatternFlowSnmpv2CBulkPDUMaxRepetitions { + intValue, ok := otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter().msg() + } + + if value == PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowSnmpv2CBulkPDUMaxRepetitions object +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) SetValue(value uint32) PatternFlowSnmpv2CBulkPDUMaxRepetitions { + obj.setChoice(PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowSnmpv2CBulkPDUMaxRepetitions object +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) SetValues(value []uint32) PatternFlowSnmpv2CBulkPDUMaxRepetitions { + obj.setChoice(PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) Increment() PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter value in the PatternFlowSnmpv2CBulkPDUMaxRepetitions object +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) SetIncrement(value PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) PatternFlowSnmpv2CBulkPDUMaxRepetitions { + obj.setChoice(PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) Decrement() PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter value in the PatternFlowSnmpv2CBulkPDUMaxRepetitions object +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) SetDecrement(value PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) PatternFlowSnmpv2CBulkPDUMaxRepetitions { + obj.setChoice(PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitions) setDefault() { + var choices_set int = 0 + var choice PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowSnmpv2CBulkPDUMaxRepetitionsChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowSnmpv2CBulkPDUMaxRepetitions") + } + } else { + intVal := otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowSnmpv2CBulkPDUMaxRepetitions_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_max_repetitions_counter.go b/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_max_repetitions_counter.go new file mode 100644 index 00000000..4501fed1 --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_max_repetitions_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter ***** +type patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter struct { + validation + obj *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + marshaller marshalPatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + unMarshaller unMarshalPatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter +} + +func NewPatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter() PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter { + obj := patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter{obj: &otg.PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) msg() *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter { + return obj.obj +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) setMsg(msg *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter struct { + obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter +} + +type marshalPatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter interface { + // ToProto marshals PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter to protobuf object *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + ToProto() (*otg.PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter, error) + // ToPbText marshals PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter struct { + obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter +} + +type unMarshalPatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter interface { + // FromProto unmarshals PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter from protobuf object *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + FromProto(msg *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) (PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter, error) + // FromPbText unmarshals PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) Marshal() marshalPatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) Unmarshal() unMarshalPatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) ToProto() (*otg.PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) FromProto(msg *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) (PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) Clone() (PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter is integer counter pattern +type PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter interface { + Validation + // msg marshals PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter to protobuf object *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + // setMsg unmarshals PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter from protobuf object *otg.PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + // validate validates PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + SetStart(value uint32) PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + // HasStart checks if Start has been set in PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + HasStart() bool + // Step returns uint32, set in PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + SetStep(value uint32) PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + // HasStep checks if Step has been set in PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + HasStep() bool + // Count returns uint32, set in PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + SetCount(value uint32) PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + // HasCount checks if Count has been set in PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter object +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) SetStart(value uint32) PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter object +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) SetStep(value uint32) PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter object +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) SetCount(value uint32) PatternFlowSnmpv2CBulkPDUMaxRepetitionsCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowSnmpv2CBulkPDUMaxRepetitionsCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_non_repeaters.go b/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_non_repeaters.go new file mode 100644 index 00000000..90a39a2d --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_non_repeaters.go @@ -0,0 +1,416 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CBulkPDUNonRepeaters ***** +type patternFlowSnmpv2CBulkPDUNonRepeaters struct { + validation + obj *otg.PatternFlowSnmpv2CBulkPDUNonRepeaters + marshaller marshalPatternFlowSnmpv2CBulkPDUNonRepeaters + unMarshaller unMarshalPatternFlowSnmpv2CBulkPDUNonRepeaters +} + +func NewPatternFlowSnmpv2CBulkPDUNonRepeaters() PatternFlowSnmpv2CBulkPDUNonRepeaters { + obj := patternFlowSnmpv2CBulkPDUNonRepeaters{obj: &otg.PatternFlowSnmpv2CBulkPDUNonRepeaters{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) msg() *otg.PatternFlowSnmpv2CBulkPDUNonRepeaters { + return obj.obj +} + +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) setMsg(msg *otg.PatternFlowSnmpv2CBulkPDUNonRepeaters) PatternFlowSnmpv2CBulkPDUNonRepeaters { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CBulkPDUNonRepeaters struct { + obj *patternFlowSnmpv2CBulkPDUNonRepeaters +} + +type marshalPatternFlowSnmpv2CBulkPDUNonRepeaters interface { + // ToProto marshals PatternFlowSnmpv2CBulkPDUNonRepeaters to protobuf object *otg.PatternFlowSnmpv2CBulkPDUNonRepeaters + ToProto() (*otg.PatternFlowSnmpv2CBulkPDUNonRepeaters, error) + // ToPbText marshals PatternFlowSnmpv2CBulkPDUNonRepeaters to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CBulkPDUNonRepeaters to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CBulkPDUNonRepeaters to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CBulkPDUNonRepeaters struct { + obj *patternFlowSnmpv2CBulkPDUNonRepeaters +} + +type unMarshalPatternFlowSnmpv2CBulkPDUNonRepeaters interface { + // FromProto unmarshals PatternFlowSnmpv2CBulkPDUNonRepeaters from protobuf object *otg.PatternFlowSnmpv2CBulkPDUNonRepeaters + FromProto(msg *otg.PatternFlowSnmpv2CBulkPDUNonRepeaters) (PatternFlowSnmpv2CBulkPDUNonRepeaters, error) + // FromPbText unmarshals PatternFlowSnmpv2CBulkPDUNonRepeaters from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CBulkPDUNonRepeaters from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CBulkPDUNonRepeaters from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) Marshal() marshalPatternFlowSnmpv2CBulkPDUNonRepeaters { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CBulkPDUNonRepeaters{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) Unmarshal() unMarshalPatternFlowSnmpv2CBulkPDUNonRepeaters { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CBulkPDUNonRepeaters{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CBulkPDUNonRepeaters) ToProto() (*otg.PatternFlowSnmpv2CBulkPDUNonRepeaters, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDUNonRepeaters) FromProto(msg *otg.PatternFlowSnmpv2CBulkPDUNonRepeaters) (PatternFlowSnmpv2CBulkPDUNonRepeaters, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CBulkPDUNonRepeaters) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDUNonRepeaters) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CBulkPDUNonRepeaters) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDUNonRepeaters) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CBulkPDUNonRepeaters) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDUNonRepeaters) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) Clone() (PatternFlowSnmpv2CBulkPDUNonRepeaters, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CBulkPDUNonRepeaters() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowSnmpv2CBulkPDUNonRepeaters is one variable binding in the Response-PDU is requested for the first non_repeaters variable bindings in the GetBulkRequest. +type PatternFlowSnmpv2CBulkPDUNonRepeaters interface { + Validation + // msg marshals PatternFlowSnmpv2CBulkPDUNonRepeaters to protobuf object *otg.PatternFlowSnmpv2CBulkPDUNonRepeaters + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CBulkPDUNonRepeaters + // setMsg unmarshals PatternFlowSnmpv2CBulkPDUNonRepeaters from protobuf object *otg.PatternFlowSnmpv2CBulkPDUNonRepeaters + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CBulkPDUNonRepeaters) PatternFlowSnmpv2CBulkPDUNonRepeaters + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CBulkPDUNonRepeaters + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CBulkPDUNonRepeaters + // validate validates PatternFlowSnmpv2CBulkPDUNonRepeaters + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CBulkPDUNonRepeaters, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowSnmpv2CBulkPDUNonRepeatersChoiceEnum, set in PatternFlowSnmpv2CBulkPDUNonRepeaters + Choice() PatternFlowSnmpv2CBulkPDUNonRepeatersChoiceEnum + // setChoice assigns PatternFlowSnmpv2CBulkPDUNonRepeatersChoiceEnum provided by user to PatternFlowSnmpv2CBulkPDUNonRepeaters + setChoice(value PatternFlowSnmpv2CBulkPDUNonRepeatersChoiceEnum) PatternFlowSnmpv2CBulkPDUNonRepeaters + // HasChoice checks if Choice has been set in PatternFlowSnmpv2CBulkPDUNonRepeaters + HasChoice() bool + // Value returns uint32, set in PatternFlowSnmpv2CBulkPDUNonRepeaters. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowSnmpv2CBulkPDUNonRepeaters + SetValue(value uint32) PatternFlowSnmpv2CBulkPDUNonRepeaters + // HasValue checks if Value has been set in PatternFlowSnmpv2CBulkPDUNonRepeaters + HasValue() bool + // Values returns []uint32, set in PatternFlowSnmpv2CBulkPDUNonRepeaters. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowSnmpv2CBulkPDUNonRepeaters + SetValues(value []uint32) PatternFlowSnmpv2CBulkPDUNonRepeaters +} + +type PatternFlowSnmpv2CBulkPDUNonRepeatersChoiceEnum string + +// Enum of Choice on PatternFlowSnmpv2CBulkPDUNonRepeaters +var PatternFlowSnmpv2CBulkPDUNonRepeatersChoice = struct { + VALUE PatternFlowSnmpv2CBulkPDUNonRepeatersChoiceEnum + VALUES PatternFlowSnmpv2CBulkPDUNonRepeatersChoiceEnum +}{ + VALUE: PatternFlowSnmpv2CBulkPDUNonRepeatersChoiceEnum("value"), + VALUES: PatternFlowSnmpv2CBulkPDUNonRepeatersChoiceEnum("values"), +} + +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) Choice() PatternFlowSnmpv2CBulkPDUNonRepeatersChoiceEnum { + return PatternFlowSnmpv2CBulkPDUNonRepeatersChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) setChoice(value PatternFlowSnmpv2CBulkPDUNonRepeatersChoiceEnum) PatternFlowSnmpv2CBulkPDUNonRepeaters { + intValue, ok := otg.PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowSnmpv2CBulkPDUNonRepeatersChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowSnmpv2CBulkPDUNonRepeatersChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowSnmpv2CBulkPDUNonRepeatersChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowSnmpv2CBulkPDUNonRepeatersChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowSnmpv2CBulkPDUNonRepeaters object +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) SetValue(value uint32) PatternFlowSnmpv2CBulkPDUNonRepeaters { + obj.setChoice(PatternFlowSnmpv2CBulkPDUNonRepeatersChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowSnmpv2CBulkPDUNonRepeaters object +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) SetValues(value []uint32) PatternFlowSnmpv2CBulkPDUNonRepeaters { + obj.setChoice(PatternFlowSnmpv2CBulkPDUNonRepeatersChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowSnmpv2CBulkPDUNonRepeaters) setDefault() { + var choices_set int = 0 + var choice PatternFlowSnmpv2CBulkPDUNonRepeatersChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CBulkPDUNonRepeatersChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowSnmpv2CBulkPDUNonRepeatersChoice.VALUES + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowSnmpv2CBulkPDUNonRepeatersChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowSnmpv2CBulkPDUNonRepeaters") + } + } else { + intVal := otg.PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowSnmpv2CBulkPDUNonRepeaters_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_request_id.go b/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_request_id.go new file mode 100644 index 00000000..e364bf4c --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_request_id.go @@ -0,0 +1,536 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CBulkPDURequestId ***** +type patternFlowSnmpv2CBulkPDURequestId struct { + validation + obj *otg.PatternFlowSnmpv2CBulkPDURequestId + marshaller marshalPatternFlowSnmpv2CBulkPDURequestId + unMarshaller unMarshalPatternFlowSnmpv2CBulkPDURequestId + incrementHolder PatternFlowSnmpv2CBulkPDURequestIdCounter + decrementHolder PatternFlowSnmpv2CBulkPDURequestIdCounter +} + +func NewPatternFlowSnmpv2CBulkPDURequestId() PatternFlowSnmpv2CBulkPDURequestId { + obj := patternFlowSnmpv2CBulkPDURequestId{obj: &otg.PatternFlowSnmpv2CBulkPDURequestId{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CBulkPDURequestId) msg() *otg.PatternFlowSnmpv2CBulkPDURequestId { + return obj.obj +} + +func (obj *patternFlowSnmpv2CBulkPDURequestId) setMsg(msg *otg.PatternFlowSnmpv2CBulkPDURequestId) PatternFlowSnmpv2CBulkPDURequestId { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CBulkPDURequestId struct { + obj *patternFlowSnmpv2CBulkPDURequestId +} + +type marshalPatternFlowSnmpv2CBulkPDURequestId interface { + // ToProto marshals PatternFlowSnmpv2CBulkPDURequestId to protobuf object *otg.PatternFlowSnmpv2CBulkPDURequestId + ToProto() (*otg.PatternFlowSnmpv2CBulkPDURequestId, error) + // ToPbText marshals PatternFlowSnmpv2CBulkPDURequestId to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CBulkPDURequestId to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CBulkPDURequestId to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CBulkPDURequestId struct { + obj *patternFlowSnmpv2CBulkPDURequestId +} + +type unMarshalPatternFlowSnmpv2CBulkPDURequestId interface { + // FromProto unmarshals PatternFlowSnmpv2CBulkPDURequestId from protobuf object *otg.PatternFlowSnmpv2CBulkPDURequestId + FromProto(msg *otg.PatternFlowSnmpv2CBulkPDURequestId) (PatternFlowSnmpv2CBulkPDURequestId, error) + // FromPbText unmarshals PatternFlowSnmpv2CBulkPDURequestId from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CBulkPDURequestId from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CBulkPDURequestId from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CBulkPDURequestId) Marshal() marshalPatternFlowSnmpv2CBulkPDURequestId { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CBulkPDURequestId{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CBulkPDURequestId) Unmarshal() unMarshalPatternFlowSnmpv2CBulkPDURequestId { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CBulkPDURequestId{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CBulkPDURequestId) ToProto() (*otg.PatternFlowSnmpv2CBulkPDURequestId, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDURequestId) FromProto(msg *otg.PatternFlowSnmpv2CBulkPDURequestId) (PatternFlowSnmpv2CBulkPDURequestId, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CBulkPDURequestId) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDURequestId) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CBulkPDURequestId) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDURequestId) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CBulkPDURequestId) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDURequestId) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CBulkPDURequestId) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CBulkPDURequestId) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CBulkPDURequestId) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CBulkPDURequestId) Clone() (PatternFlowSnmpv2CBulkPDURequestId, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CBulkPDURequestId() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowSnmpv2CBulkPDURequestId) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowSnmpv2CBulkPDURequestId is identifies a particular SNMP request. +// This index is echoed back in the response from the SNMP agent, +// allowing the SNMP manager to match an incoming response to the appropriate request. +// +// - Encoding of this field follows ASN.1 X.690(section 8.3) specification. +// Refer: http://www.itu.int/ITU-T/asn1 +type PatternFlowSnmpv2CBulkPDURequestId interface { + Validation + // msg marshals PatternFlowSnmpv2CBulkPDURequestId to protobuf object *otg.PatternFlowSnmpv2CBulkPDURequestId + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CBulkPDURequestId + // setMsg unmarshals PatternFlowSnmpv2CBulkPDURequestId from protobuf object *otg.PatternFlowSnmpv2CBulkPDURequestId + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CBulkPDURequestId) PatternFlowSnmpv2CBulkPDURequestId + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CBulkPDURequestId + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CBulkPDURequestId + // validate validates PatternFlowSnmpv2CBulkPDURequestId + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CBulkPDURequestId, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum, set in PatternFlowSnmpv2CBulkPDURequestId + Choice() PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum + // setChoice assigns PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum provided by user to PatternFlowSnmpv2CBulkPDURequestId + setChoice(value PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum) PatternFlowSnmpv2CBulkPDURequestId + // HasChoice checks if Choice has been set in PatternFlowSnmpv2CBulkPDURequestId + HasChoice() bool + // Value returns int32, set in PatternFlowSnmpv2CBulkPDURequestId. + Value() int32 + // SetValue assigns int32 provided by user to PatternFlowSnmpv2CBulkPDURequestId + SetValue(value int32) PatternFlowSnmpv2CBulkPDURequestId + // HasValue checks if Value has been set in PatternFlowSnmpv2CBulkPDURequestId + HasValue() bool + // Values returns []int32, set in PatternFlowSnmpv2CBulkPDURequestId. + Values() []int32 + // SetValues assigns []int32 provided by user to PatternFlowSnmpv2CBulkPDURequestId + SetValues(value []int32) PatternFlowSnmpv2CBulkPDURequestId + // Increment returns PatternFlowSnmpv2CBulkPDURequestIdCounter, set in PatternFlowSnmpv2CBulkPDURequestId. + Increment() PatternFlowSnmpv2CBulkPDURequestIdCounter + // SetIncrement assigns PatternFlowSnmpv2CBulkPDURequestIdCounter provided by user to PatternFlowSnmpv2CBulkPDURequestId. + SetIncrement(value PatternFlowSnmpv2CBulkPDURequestIdCounter) PatternFlowSnmpv2CBulkPDURequestId + // HasIncrement checks if Increment has been set in PatternFlowSnmpv2CBulkPDURequestId + HasIncrement() bool + // Decrement returns PatternFlowSnmpv2CBulkPDURequestIdCounter, set in PatternFlowSnmpv2CBulkPDURequestId. + Decrement() PatternFlowSnmpv2CBulkPDURequestIdCounter + // SetDecrement assigns PatternFlowSnmpv2CBulkPDURequestIdCounter provided by user to PatternFlowSnmpv2CBulkPDURequestId. + SetDecrement(value PatternFlowSnmpv2CBulkPDURequestIdCounter) PatternFlowSnmpv2CBulkPDURequestId + // HasDecrement checks if Decrement has been set in PatternFlowSnmpv2CBulkPDURequestId + HasDecrement() bool + setNil() +} + +type PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum string + +// Enum of Choice on PatternFlowSnmpv2CBulkPDURequestId +var PatternFlowSnmpv2CBulkPDURequestIdChoice = struct { + VALUE PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum + VALUES PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum + INCREMENT PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum + DECREMENT PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum +}{ + VALUE: PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum("value"), + VALUES: PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum("values"), + INCREMENT: PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum("increment"), + DECREMENT: PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum("decrement"), +} + +func (obj *patternFlowSnmpv2CBulkPDURequestId) Choice() PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum { + return PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowSnmpv2CBulkPDURequestId) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowSnmpv2CBulkPDURequestId) setChoice(value PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum) PatternFlowSnmpv2CBulkPDURequestId { + intValue, ok := otg.PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowSnmpv2CBulkPDURequestIdChoice.VALUE { + defaultValue := int32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowSnmpv2CBulkPDURequestIdChoice.VALUES { + defaultValue := []int32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowSnmpv2CBulkPDURequestIdChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowSnmpv2CBulkPDURequestIdCounter().msg() + } + + if value == PatternFlowSnmpv2CBulkPDURequestIdChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowSnmpv2CBulkPDURequestIdCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a int32 +func (obj *patternFlowSnmpv2CBulkPDURequestId) Value() int32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowSnmpv2CBulkPDURequestIdChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a int32 +func (obj *patternFlowSnmpv2CBulkPDURequestId) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the int32 value in the PatternFlowSnmpv2CBulkPDURequestId object +func (obj *patternFlowSnmpv2CBulkPDURequestId) SetValue(value int32) PatternFlowSnmpv2CBulkPDURequestId { + obj.setChoice(PatternFlowSnmpv2CBulkPDURequestIdChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []int32 +func (obj *patternFlowSnmpv2CBulkPDURequestId) Values() []int32 { + if obj.obj.Values == nil { + obj.SetValues([]int32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []int32 value in the PatternFlowSnmpv2CBulkPDURequestId object +func (obj *patternFlowSnmpv2CBulkPDURequestId) SetValues(value []int32) PatternFlowSnmpv2CBulkPDURequestId { + obj.setChoice(PatternFlowSnmpv2CBulkPDURequestIdChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]int32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CBulkPDURequestIdCounter +func (obj *patternFlowSnmpv2CBulkPDURequestId) Increment() PatternFlowSnmpv2CBulkPDURequestIdCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowSnmpv2CBulkPDURequestIdChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowSnmpv2CBulkPDURequestIdCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CBulkPDURequestIdCounter +func (obj *patternFlowSnmpv2CBulkPDURequestId) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowSnmpv2CBulkPDURequestIdCounter value in the PatternFlowSnmpv2CBulkPDURequestId object +func (obj *patternFlowSnmpv2CBulkPDURequestId) SetIncrement(value PatternFlowSnmpv2CBulkPDURequestIdCounter) PatternFlowSnmpv2CBulkPDURequestId { + obj.setChoice(PatternFlowSnmpv2CBulkPDURequestIdChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CBulkPDURequestIdCounter +func (obj *patternFlowSnmpv2CBulkPDURequestId) Decrement() PatternFlowSnmpv2CBulkPDURequestIdCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowSnmpv2CBulkPDURequestIdChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowSnmpv2CBulkPDURequestIdCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CBulkPDURequestIdCounter +func (obj *patternFlowSnmpv2CBulkPDURequestId) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowSnmpv2CBulkPDURequestIdCounter value in the PatternFlowSnmpv2CBulkPDURequestId object +func (obj *patternFlowSnmpv2CBulkPDURequestId) SetDecrement(value PatternFlowSnmpv2CBulkPDURequestIdCounter) PatternFlowSnmpv2CBulkPDURequestId { + obj.setChoice(PatternFlowSnmpv2CBulkPDURequestIdChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowSnmpv2CBulkPDURequestId) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowSnmpv2CBulkPDURequestId) setDefault() { + var choices_set int = 0 + var choice PatternFlowSnmpv2CBulkPDURequestIdChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CBulkPDURequestIdChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowSnmpv2CBulkPDURequestIdChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CBulkPDURequestIdChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CBulkPDURequestIdChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowSnmpv2CBulkPDURequestIdChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowSnmpv2CBulkPDURequestId") + } + } else { + intVal := otg.PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowSnmpv2CBulkPDURequestId_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_request_id_counter.go b/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_request_id_counter.go new file mode 100644 index 00000000..6df2930f --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_bulk_pdu_request_id_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CBulkPDURequestIdCounter ***** +type patternFlowSnmpv2CBulkPDURequestIdCounter struct { + validation + obj *otg.PatternFlowSnmpv2CBulkPDURequestIdCounter + marshaller marshalPatternFlowSnmpv2CBulkPDURequestIdCounter + unMarshaller unMarshalPatternFlowSnmpv2CBulkPDURequestIdCounter +} + +func NewPatternFlowSnmpv2CBulkPDURequestIdCounter() PatternFlowSnmpv2CBulkPDURequestIdCounter { + obj := patternFlowSnmpv2CBulkPDURequestIdCounter{obj: &otg.PatternFlowSnmpv2CBulkPDURequestIdCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) msg() *otg.PatternFlowSnmpv2CBulkPDURequestIdCounter { + return obj.obj +} + +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) setMsg(msg *otg.PatternFlowSnmpv2CBulkPDURequestIdCounter) PatternFlowSnmpv2CBulkPDURequestIdCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CBulkPDURequestIdCounter struct { + obj *patternFlowSnmpv2CBulkPDURequestIdCounter +} + +type marshalPatternFlowSnmpv2CBulkPDURequestIdCounter interface { + // ToProto marshals PatternFlowSnmpv2CBulkPDURequestIdCounter to protobuf object *otg.PatternFlowSnmpv2CBulkPDURequestIdCounter + ToProto() (*otg.PatternFlowSnmpv2CBulkPDURequestIdCounter, error) + // ToPbText marshals PatternFlowSnmpv2CBulkPDURequestIdCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CBulkPDURequestIdCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CBulkPDURequestIdCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CBulkPDURequestIdCounter struct { + obj *patternFlowSnmpv2CBulkPDURequestIdCounter +} + +type unMarshalPatternFlowSnmpv2CBulkPDURequestIdCounter interface { + // FromProto unmarshals PatternFlowSnmpv2CBulkPDURequestIdCounter from protobuf object *otg.PatternFlowSnmpv2CBulkPDURequestIdCounter + FromProto(msg *otg.PatternFlowSnmpv2CBulkPDURequestIdCounter) (PatternFlowSnmpv2CBulkPDURequestIdCounter, error) + // FromPbText unmarshals PatternFlowSnmpv2CBulkPDURequestIdCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CBulkPDURequestIdCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CBulkPDURequestIdCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) Marshal() marshalPatternFlowSnmpv2CBulkPDURequestIdCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CBulkPDURequestIdCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) Unmarshal() unMarshalPatternFlowSnmpv2CBulkPDURequestIdCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CBulkPDURequestIdCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CBulkPDURequestIdCounter) ToProto() (*otg.PatternFlowSnmpv2CBulkPDURequestIdCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDURequestIdCounter) FromProto(msg *otg.PatternFlowSnmpv2CBulkPDURequestIdCounter) (PatternFlowSnmpv2CBulkPDURequestIdCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CBulkPDURequestIdCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDURequestIdCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CBulkPDURequestIdCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDURequestIdCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CBulkPDURequestIdCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CBulkPDURequestIdCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) Clone() (PatternFlowSnmpv2CBulkPDURequestIdCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CBulkPDURequestIdCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowSnmpv2CBulkPDURequestIdCounter is integer counter pattern +type PatternFlowSnmpv2CBulkPDURequestIdCounter interface { + Validation + // msg marshals PatternFlowSnmpv2CBulkPDURequestIdCounter to protobuf object *otg.PatternFlowSnmpv2CBulkPDURequestIdCounter + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CBulkPDURequestIdCounter + // setMsg unmarshals PatternFlowSnmpv2CBulkPDURequestIdCounter from protobuf object *otg.PatternFlowSnmpv2CBulkPDURequestIdCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CBulkPDURequestIdCounter) PatternFlowSnmpv2CBulkPDURequestIdCounter + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CBulkPDURequestIdCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CBulkPDURequestIdCounter + // validate validates PatternFlowSnmpv2CBulkPDURequestIdCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CBulkPDURequestIdCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns int32, set in PatternFlowSnmpv2CBulkPDURequestIdCounter. + Start() int32 + // SetStart assigns int32 provided by user to PatternFlowSnmpv2CBulkPDURequestIdCounter + SetStart(value int32) PatternFlowSnmpv2CBulkPDURequestIdCounter + // HasStart checks if Start has been set in PatternFlowSnmpv2CBulkPDURequestIdCounter + HasStart() bool + // Step returns int32, set in PatternFlowSnmpv2CBulkPDURequestIdCounter. + Step() int32 + // SetStep assigns int32 provided by user to PatternFlowSnmpv2CBulkPDURequestIdCounter + SetStep(value int32) PatternFlowSnmpv2CBulkPDURequestIdCounter + // HasStep checks if Step has been set in PatternFlowSnmpv2CBulkPDURequestIdCounter + HasStep() bool + // Count returns int32, set in PatternFlowSnmpv2CBulkPDURequestIdCounter. + Count() int32 + // SetCount assigns int32 provided by user to PatternFlowSnmpv2CBulkPDURequestIdCounter + SetCount(value int32) PatternFlowSnmpv2CBulkPDURequestIdCounter + // HasCount checks if Count has been set in PatternFlowSnmpv2CBulkPDURequestIdCounter + HasCount() bool +} + +// description is TBD +// Start returns a int32 +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) Start() int32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a int32 +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the int32 value in the PatternFlowSnmpv2CBulkPDURequestIdCounter object +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) SetStart(value int32) PatternFlowSnmpv2CBulkPDURequestIdCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a int32 +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) Step() int32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a int32 +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the int32 value in the PatternFlowSnmpv2CBulkPDURequestIdCounter object +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) SetStep(value int32) PatternFlowSnmpv2CBulkPDURequestIdCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a int32 +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) Count() int32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a int32 +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the int32 value in the PatternFlowSnmpv2CBulkPDURequestIdCounter object +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) SetCount(value int32) PatternFlowSnmpv2CBulkPDURequestIdCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowSnmpv2CBulkPDURequestIdCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_big_counter_value.go b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_big_counter_value.go new file mode 100644 index 00000000..1e50ce2c --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_big_counter_value.go @@ -0,0 +1,531 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CVariableBindingValueBigCounterValue ***** +type patternFlowSnmpv2CVariableBindingValueBigCounterValue struct { + validation + obj *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue + marshaller marshalPatternFlowSnmpv2CVariableBindingValueBigCounterValue + unMarshaller unMarshalPatternFlowSnmpv2CVariableBindingValueBigCounterValue + incrementHolder PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + decrementHolder PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter +} + +func NewPatternFlowSnmpv2CVariableBindingValueBigCounterValue() PatternFlowSnmpv2CVariableBindingValueBigCounterValue { + obj := patternFlowSnmpv2CVariableBindingValueBigCounterValue{obj: &otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) msg() *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue { + return obj.obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) setMsg(msg *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue) PatternFlowSnmpv2CVariableBindingValueBigCounterValue { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CVariableBindingValueBigCounterValue struct { + obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue +} + +type marshalPatternFlowSnmpv2CVariableBindingValueBigCounterValue interface { + // ToProto marshals PatternFlowSnmpv2CVariableBindingValueBigCounterValue to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue + ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue, error) + // ToPbText marshals PatternFlowSnmpv2CVariableBindingValueBigCounterValue to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CVariableBindingValueBigCounterValue to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CVariableBindingValueBigCounterValue to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CVariableBindingValueBigCounterValue struct { + obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue +} + +type unMarshalPatternFlowSnmpv2CVariableBindingValueBigCounterValue interface { + // FromProto unmarshals PatternFlowSnmpv2CVariableBindingValueBigCounterValue from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue + FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue) (PatternFlowSnmpv2CVariableBindingValueBigCounterValue, error) + // FromPbText unmarshals PatternFlowSnmpv2CVariableBindingValueBigCounterValue from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CVariableBindingValueBigCounterValue from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CVariableBindingValueBigCounterValue from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) Marshal() marshalPatternFlowSnmpv2CVariableBindingValueBigCounterValue { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CVariableBindingValueBigCounterValue{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueBigCounterValue { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CVariableBindingValueBigCounterValue{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueBigCounterValue) ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueBigCounterValue) FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue) (PatternFlowSnmpv2CVariableBindingValueBigCounterValue, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueBigCounterValue) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueBigCounterValue) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueBigCounterValue) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueBigCounterValue) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueBigCounterValue) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueBigCounterValue) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) Clone() (PatternFlowSnmpv2CVariableBindingValueBigCounterValue, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CVariableBindingValueBigCounterValue() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowSnmpv2CVariableBindingValueBigCounterValue is big counter returned for the requested OID. +type PatternFlowSnmpv2CVariableBindingValueBigCounterValue interface { + Validation + // msg marshals PatternFlowSnmpv2CVariableBindingValueBigCounterValue to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue + // setMsg unmarshals PatternFlowSnmpv2CVariableBindingValueBigCounterValue from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue) PatternFlowSnmpv2CVariableBindingValueBigCounterValue + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CVariableBindingValueBigCounterValue + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueBigCounterValue + // validate validates PatternFlowSnmpv2CVariableBindingValueBigCounterValue + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CVariableBindingValueBigCounterValue, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum, set in PatternFlowSnmpv2CVariableBindingValueBigCounterValue + Choice() PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum + // setChoice assigns PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum provided by user to PatternFlowSnmpv2CVariableBindingValueBigCounterValue + setChoice(value PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum) PatternFlowSnmpv2CVariableBindingValueBigCounterValue + // HasChoice checks if Choice has been set in PatternFlowSnmpv2CVariableBindingValueBigCounterValue + HasChoice() bool + // Value returns uint64, set in PatternFlowSnmpv2CVariableBindingValueBigCounterValue. + Value() uint64 + // SetValue assigns uint64 provided by user to PatternFlowSnmpv2CVariableBindingValueBigCounterValue + SetValue(value uint64) PatternFlowSnmpv2CVariableBindingValueBigCounterValue + // HasValue checks if Value has been set in PatternFlowSnmpv2CVariableBindingValueBigCounterValue + HasValue() bool + // Values returns []uint64, set in PatternFlowSnmpv2CVariableBindingValueBigCounterValue. + Values() []uint64 + // SetValues assigns []uint64 provided by user to PatternFlowSnmpv2CVariableBindingValueBigCounterValue + SetValues(value []uint64) PatternFlowSnmpv2CVariableBindingValueBigCounterValue + // Increment returns PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter, set in PatternFlowSnmpv2CVariableBindingValueBigCounterValue. + Increment() PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + // SetIncrement assigns PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter provided by user to PatternFlowSnmpv2CVariableBindingValueBigCounterValue. + SetIncrement(value PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) PatternFlowSnmpv2CVariableBindingValueBigCounterValue + // HasIncrement checks if Increment has been set in PatternFlowSnmpv2CVariableBindingValueBigCounterValue + HasIncrement() bool + // Decrement returns PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter, set in PatternFlowSnmpv2CVariableBindingValueBigCounterValue. + Decrement() PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + // SetDecrement assigns PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter provided by user to PatternFlowSnmpv2CVariableBindingValueBigCounterValue. + SetDecrement(value PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) PatternFlowSnmpv2CVariableBindingValueBigCounterValue + // HasDecrement checks if Decrement has been set in PatternFlowSnmpv2CVariableBindingValueBigCounterValue + HasDecrement() bool + setNil() +} + +type PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum string + +// Enum of Choice on PatternFlowSnmpv2CVariableBindingValueBigCounterValue +var PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice = struct { + VALUE PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum + VALUES PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum + INCREMENT PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum + DECREMENT PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum +}{ + VALUE: PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum("value"), + VALUES: PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum("values"), + INCREMENT: PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum("increment"), + DECREMENT: PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum("decrement"), +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) Choice() PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum { + return PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) setChoice(value PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum) PatternFlowSnmpv2CVariableBindingValueBigCounterValue { + intValue, ok := otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.VALUE { + defaultValue := uint64(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.VALUES { + defaultValue := []uint64{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter().msg() + } + + if value == PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint64 +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) Value() uint64 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint64 +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint64 value in the PatternFlowSnmpv2CVariableBindingValueBigCounterValue object +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) SetValue(value uint64) PatternFlowSnmpv2CVariableBindingValueBigCounterValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint64 +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) Values() []uint64 { + if obj.obj.Values == nil { + obj.SetValues([]uint64{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint64 value in the PatternFlowSnmpv2CVariableBindingValueBigCounterValue object +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) SetValues(value []uint64) PatternFlowSnmpv2CVariableBindingValueBigCounterValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint64, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) Increment() PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter value in the PatternFlowSnmpv2CVariableBindingValueBigCounterValue object +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) SetIncrement(value PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) PatternFlowSnmpv2CVariableBindingValueBigCounterValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) Decrement() PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter value in the PatternFlowSnmpv2CVariableBindingValueBigCounterValue object +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) SetDecrement(value PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) PatternFlowSnmpv2CVariableBindingValueBigCounterValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValue) setDefault() { + var choices_set int = 0 + var choice PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueBigCounterValueChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowSnmpv2CVariableBindingValueBigCounterValue") + } + } else { + intVal := otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValue_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_big_counter_value_counter.go b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_big_counter_value_counter.go new file mode 100644 index 00000000..201a73a7 --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_big_counter_value_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter ***** +type patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter struct { + validation + obj *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + marshaller marshalPatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + unMarshaller unMarshalPatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter +} + +func NewPatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter() PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter { + obj := patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter{obj: &otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) msg() *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter { + return obj.obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) setMsg(msg *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter struct { + obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter +} + +type marshalPatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter interface { + // ToProto marshals PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter, error) + // ToPbText marshals PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter struct { + obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter +} + +type unMarshalPatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter interface { + // FromProto unmarshals PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) (PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter, error) + // FromPbText unmarshals PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) Marshal() marshalPatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) (PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) Clone() (PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter is integer counter pattern +type PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter interface { + Validation + // msg marshals PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + // setMsg unmarshals PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + // validate validates PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint64, set in PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter. + Start() uint64 + // SetStart assigns uint64 provided by user to PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + SetStart(value uint64) PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + // HasStart checks if Start has been set in PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + HasStart() bool + // Step returns uint64, set in PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter. + Step() uint64 + // SetStep assigns uint64 provided by user to PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + SetStep(value uint64) PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + // HasStep checks if Step has been set in PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + HasStep() bool + // Count returns uint64, set in PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter. + Count() uint64 + // SetCount assigns uint64 provided by user to PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + SetCount(value uint64) PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + // HasCount checks if Count has been set in PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint64 +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) Start() uint64 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint64 +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint64 value in the PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) SetStart(value uint64) PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint64 +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) Step() uint64 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint64 +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint64 value in the PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) SetStep(value uint64) PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint64 +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) Count() uint64 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint64 +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint64 value in the PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) SetCount(value uint64) PatternFlowSnmpv2CVariableBindingValueBigCounterValueCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowSnmpv2CVariableBindingValueBigCounterValueCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_counter_value.go b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_counter_value.go new file mode 100644 index 00000000..06dd8710 --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_counter_value.go @@ -0,0 +1,531 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CVariableBindingValueCounterValue ***** +type patternFlowSnmpv2CVariableBindingValueCounterValue struct { + validation + obj *otg.PatternFlowSnmpv2CVariableBindingValueCounterValue + marshaller marshalPatternFlowSnmpv2CVariableBindingValueCounterValue + unMarshaller unMarshalPatternFlowSnmpv2CVariableBindingValueCounterValue + incrementHolder PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + decrementHolder PatternFlowSnmpv2CVariableBindingValueCounterValueCounter +} + +func NewPatternFlowSnmpv2CVariableBindingValueCounterValue() PatternFlowSnmpv2CVariableBindingValueCounterValue { + obj := patternFlowSnmpv2CVariableBindingValueCounterValue{obj: &otg.PatternFlowSnmpv2CVariableBindingValueCounterValue{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) msg() *otg.PatternFlowSnmpv2CVariableBindingValueCounterValue { + return obj.obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) setMsg(msg *otg.PatternFlowSnmpv2CVariableBindingValueCounterValue) PatternFlowSnmpv2CVariableBindingValueCounterValue { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CVariableBindingValueCounterValue struct { + obj *patternFlowSnmpv2CVariableBindingValueCounterValue +} + +type marshalPatternFlowSnmpv2CVariableBindingValueCounterValue interface { + // ToProto marshals PatternFlowSnmpv2CVariableBindingValueCounterValue to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueCounterValue + ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueCounterValue, error) + // ToPbText marshals PatternFlowSnmpv2CVariableBindingValueCounterValue to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CVariableBindingValueCounterValue to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CVariableBindingValueCounterValue to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CVariableBindingValueCounterValue struct { + obj *patternFlowSnmpv2CVariableBindingValueCounterValue +} + +type unMarshalPatternFlowSnmpv2CVariableBindingValueCounterValue interface { + // FromProto unmarshals PatternFlowSnmpv2CVariableBindingValueCounterValue from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueCounterValue + FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueCounterValue) (PatternFlowSnmpv2CVariableBindingValueCounterValue, error) + // FromPbText unmarshals PatternFlowSnmpv2CVariableBindingValueCounterValue from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CVariableBindingValueCounterValue from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CVariableBindingValueCounterValue from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) Marshal() marshalPatternFlowSnmpv2CVariableBindingValueCounterValue { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CVariableBindingValueCounterValue{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueCounterValue { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CVariableBindingValueCounterValue{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueCounterValue) ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueCounterValue, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueCounterValue) FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueCounterValue) (PatternFlowSnmpv2CVariableBindingValueCounterValue, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueCounterValue) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueCounterValue) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueCounterValue) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueCounterValue) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueCounterValue) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueCounterValue) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) Clone() (PatternFlowSnmpv2CVariableBindingValueCounterValue, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CVariableBindingValueCounterValue() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowSnmpv2CVariableBindingValueCounterValue is counter returned for the requested OID. +type PatternFlowSnmpv2CVariableBindingValueCounterValue interface { + Validation + // msg marshals PatternFlowSnmpv2CVariableBindingValueCounterValue to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueCounterValue + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CVariableBindingValueCounterValue + // setMsg unmarshals PatternFlowSnmpv2CVariableBindingValueCounterValue from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueCounterValue + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CVariableBindingValueCounterValue) PatternFlowSnmpv2CVariableBindingValueCounterValue + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CVariableBindingValueCounterValue + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueCounterValue + // validate validates PatternFlowSnmpv2CVariableBindingValueCounterValue + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CVariableBindingValueCounterValue, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum, set in PatternFlowSnmpv2CVariableBindingValueCounterValue + Choice() PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum + // setChoice assigns PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum provided by user to PatternFlowSnmpv2CVariableBindingValueCounterValue + setChoice(value PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum) PatternFlowSnmpv2CVariableBindingValueCounterValue + // HasChoice checks if Choice has been set in PatternFlowSnmpv2CVariableBindingValueCounterValue + HasChoice() bool + // Value returns uint32, set in PatternFlowSnmpv2CVariableBindingValueCounterValue. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueCounterValue + SetValue(value uint32) PatternFlowSnmpv2CVariableBindingValueCounterValue + // HasValue checks if Value has been set in PatternFlowSnmpv2CVariableBindingValueCounterValue + HasValue() bool + // Values returns []uint32, set in PatternFlowSnmpv2CVariableBindingValueCounterValue. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueCounterValue + SetValues(value []uint32) PatternFlowSnmpv2CVariableBindingValueCounterValue + // Increment returns PatternFlowSnmpv2CVariableBindingValueCounterValueCounter, set in PatternFlowSnmpv2CVariableBindingValueCounterValue. + Increment() PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + // SetIncrement assigns PatternFlowSnmpv2CVariableBindingValueCounterValueCounter provided by user to PatternFlowSnmpv2CVariableBindingValueCounterValue. + SetIncrement(value PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) PatternFlowSnmpv2CVariableBindingValueCounterValue + // HasIncrement checks if Increment has been set in PatternFlowSnmpv2CVariableBindingValueCounterValue + HasIncrement() bool + // Decrement returns PatternFlowSnmpv2CVariableBindingValueCounterValueCounter, set in PatternFlowSnmpv2CVariableBindingValueCounterValue. + Decrement() PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + // SetDecrement assigns PatternFlowSnmpv2CVariableBindingValueCounterValueCounter provided by user to PatternFlowSnmpv2CVariableBindingValueCounterValue. + SetDecrement(value PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) PatternFlowSnmpv2CVariableBindingValueCounterValue + // HasDecrement checks if Decrement has been set in PatternFlowSnmpv2CVariableBindingValueCounterValue + HasDecrement() bool + setNil() +} + +type PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum string + +// Enum of Choice on PatternFlowSnmpv2CVariableBindingValueCounterValue +var PatternFlowSnmpv2CVariableBindingValueCounterValueChoice = struct { + VALUE PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum + VALUES PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum + INCREMENT PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum + DECREMENT PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum +}{ + VALUE: PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum("value"), + VALUES: PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum("values"), + INCREMENT: PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum("increment"), + DECREMENT: PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum("decrement"), +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) Choice() PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum { + return PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) setChoice(value PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum) PatternFlowSnmpv2CVariableBindingValueCounterValue { + intValue, ok := otg.PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowSnmpv2CVariableBindingValueCounterValueCounter().msg() + } + + if value == PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowSnmpv2CVariableBindingValueCounterValueCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowSnmpv2CVariableBindingValueCounterValue object +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) SetValue(value uint32) PatternFlowSnmpv2CVariableBindingValueCounterValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowSnmpv2CVariableBindingValueCounterValue object +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) SetValues(value []uint32) PatternFlowSnmpv2CVariableBindingValueCounterValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CVariableBindingValueCounterValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) Increment() PatternFlowSnmpv2CVariableBindingValueCounterValueCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowSnmpv2CVariableBindingValueCounterValueCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CVariableBindingValueCounterValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowSnmpv2CVariableBindingValueCounterValueCounter value in the PatternFlowSnmpv2CVariableBindingValueCounterValue object +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) SetIncrement(value PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) PatternFlowSnmpv2CVariableBindingValueCounterValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CVariableBindingValueCounterValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) Decrement() PatternFlowSnmpv2CVariableBindingValueCounterValueCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowSnmpv2CVariableBindingValueCounterValueCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CVariableBindingValueCounterValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowSnmpv2CVariableBindingValueCounterValueCounter value in the PatternFlowSnmpv2CVariableBindingValueCounterValue object +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) SetDecrement(value PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) PatternFlowSnmpv2CVariableBindingValueCounterValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValue) setDefault() { + var choices_set int = 0 + var choice PatternFlowSnmpv2CVariableBindingValueCounterValueChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueCounterValueChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowSnmpv2CVariableBindingValueCounterValue") + } + } else { + intVal := otg.PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowSnmpv2CVariableBindingValueCounterValue_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_counter_value_counter.go b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_counter_value_counter.go new file mode 100644 index 00000000..2dad6c14 --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_counter_value_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CVariableBindingValueCounterValueCounter ***** +type patternFlowSnmpv2CVariableBindingValueCounterValueCounter struct { + validation + obj *otg.PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + marshaller marshalPatternFlowSnmpv2CVariableBindingValueCounterValueCounter + unMarshaller unMarshalPatternFlowSnmpv2CVariableBindingValueCounterValueCounter +} + +func NewPatternFlowSnmpv2CVariableBindingValueCounterValueCounter() PatternFlowSnmpv2CVariableBindingValueCounterValueCounter { + obj := patternFlowSnmpv2CVariableBindingValueCounterValueCounter{obj: &otg.PatternFlowSnmpv2CVariableBindingValueCounterValueCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) msg() *otg.PatternFlowSnmpv2CVariableBindingValueCounterValueCounter { + return obj.obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) setMsg(msg *otg.PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) PatternFlowSnmpv2CVariableBindingValueCounterValueCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CVariableBindingValueCounterValueCounter struct { + obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter +} + +type marshalPatternFlowSnmpv2CVariableBindingValueCounterValueCounter interface { + // ToProto marshals PatternFlowSnmpv2CVariableBindingValueCounterValueCounter to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueCounterValueCounter, error) + // ToPbText marshals PatternFlowSnmpv2CVariableBindingValueCounterValueCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CVariableBindingValueCounterValueCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CVariableBindingValueCounterValueCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CVariableBindingValueCounterValueCounter struct { + obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter +} + +type unMarshalPatternFlowSnmpv2CVariableBindingValueCounterValueCounter interface { + // FromProto unmarshals PatternFlowSnmpv2CVariableBindingValueCounterValueCounter from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) (PatternFlowSnmpv2CVariableBindingValueCounterValueCounter, error) + // FromPbText unmarshals PatternFlowSnmpv2CVariableBindingValueCounterValueCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CVariableBindingValueCounterValueCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CVariableBindingValueCounterValueCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) Marshal() marshalPatternFlowSnmpv2CVariableBindingValueCounterValueCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CVariableBindingValueCounterValueCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueCounterValueCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CVariableBindingValueCounterValueCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueCounterValueCounter) ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueCounterValueCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueCounterValueCounter) FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) (PatternFlowSnmpv2CVariableBindingValueCounterValueCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueCounterValueCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueCounterValueCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueCounterValueCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueCounterValueCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueCounterValueCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueCounterValueCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) Clone() (PatternFlowSnmpv2CVariableBindingValueCounterValueCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CVariableBindingValueCounterValueCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowSnmpv2CVariableBindingValueCounterValueCounter is integer counter pattern +type PatternFlowSnmpv2CVariableBindingValueCounterValueCounter interface { + Validation + // msg marshals PatternFlowSnmpv2CVariableBindingValueCounterValueCounter to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + // setMsg unmarshals PatternFlowSnmpv2CVariableBindingValueCounterValueCounter from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CVariableBindingValueCounterValueCounter) PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CVariableBindingValueCounterValueCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueCounterValueCounter + // validate validates PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CVariableBindingValueCounterValueCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowSnmpv2CVariableBindingValueCounterValueCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + SetStart(value uint32) PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + // HasStart checks if Start has been set in PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + HasStart() bool + // Step returns uint32, set in PatternFlowSnmpv2CVariableBindingValueCounterValueCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + SetStep(value uint32) PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + // HasStep checks if Step has been set in PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + HasStep() bool + // Count returns uint32, set in PatternFlowSnmpv2CVariableBindingValueCounterValueCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + SetCount(value uint32) PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + // HasCount checks if Count has been set in PatternFlowSnmpv2CVariableBindingValueCounterValueCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowSnmpv2CVariableBindingValueCounterValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) SetStart(value uint32) PatternFlowSnmpv2CVariableBindingValueCounterValueCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowSnmpv2CVariableBindingValueCounterValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) SetStep(value uint32) PatternFlowSnmpv2CVariableBindingValueCounterValueCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowSnmpv2CVariableBindingValueCounterValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) SetCount(value uint32) PatternFlowSnmpv2CVariableBindingValueCounterValueCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowSnmpv2CVariableBindingValueCounterValueCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_integer_value.go b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_integer_value.go new file mode 100644 index 00000000..37690938 --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_integer_value.go @@ -0,0 +1,531 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CVariableBindingValueIntegerValue ***** +type patternFlowSnmpv2CVariableBindingValueIntegerValue struct { + validation + obj *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue + marshaller marshalPatternFlowSnmpv2CVariableBindingValueIntegerValue + unMarshaller unMarshalPatternFlowSnmpv2CVariableBindingValueIntegerValue + incrementHolder PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + decrementHolder PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter +} + +func NewPatternFlowSnmpv2CVariableBindingValueIntegerValue() PatternFlowSnmpv2CVariableBindingValueIntegerValue { + obj := patternFlowSnmpv2CVariableBindingValueIntegerValue{obj: &otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) msg() *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue { + return obj.obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) setMsg(msg *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue) PatternFlowSnmpv2CVariableBindingValueIntegerValue { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CVariableBindingValueIntegerValue struct { + obj *patternFlowSnmpv2CVariableBindingValueIntegerValue +} + +type marshalPatternFlowSnmpv2CVariableBindingValueIntegerValue interface { + // ToProto marshals PatternFlowSnmpv2CVariableBindingValueIntegerValue to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue + ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue, error) + // ToPbText marshals PatternFlowSnmpv2CVariableBindingValueIntegerValue to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CVariableBindingValueIntegerValue to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CVariableBindingValueIntegerValue to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CVariableBindingValueIntegerValue struct { + obj *patternFlowSnmpv2CVariableBindingValueIntegerValue +} + +type unMarshalPatternFlowSnmpv2CVariableBindingValueIntegerValue interface { + // FromProto unmarshals PatternFlowSnmpv2CVariableBindingValueIntegerValue from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue + FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue) (PatternFlowSnmpv2CVariableBindingValueIntegerValue, error) + // FromPbText unmarshals PatternFlowSnmpv2CVariableBindingValueIntegerValue from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CVariableBindingValueIntegerValue from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CVariableBindingValueIntegerValue from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) Marshal() marshalPatternFlowSnmpv2CVariableBindingValueIntegerValue { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CVariableBindingValueIntegerValue{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueIntegerValue { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CVariableBindingValueIntegerValue{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIntegerValue) ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIntegerValue) FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue) (PatternFlowSnmpv2CVariableBindingValueIntegerValue, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIntegerValue) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIntegerValue) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIntegerValue) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIntegerValue) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIntegerValue) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIntegerValue) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) Clone() (PatternFlowSnmpv2CVariableBindingValueIntegerValue, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CVariableBindingValueIntegerValue() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowSnmpv2CVariableBindingValueIntegerValue is integer value returned for the requested OID. +type PatternFlowSnmpv2CVariableBindingValueIntegerValue interface { + Validation + // msg marshals PatternFlowSnmpv2CVariableBindingValueIntegerValue to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue + // setMsg unmarshals PatternFlowSnmpv2CVariableBindingValueIntegerValue from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue) PatternFlowSnmpv2CVariableBindingValueIntegerValue + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CVariableBindingValueIntegerValue + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueIntegerValue + // validate validates PatternFlowSnmpv2CVariableBindingValueIntegerValue + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CVariableBindingValueIntegerValue, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum, set in PatternFlowSnmpv2CVariableBindingValueIntegerValue + Choice() PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum + // setChoice assigns PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum provided by user to PatternFlowSnmpv2CVariableBindingValueIntegerValue + setChoice(value PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum) PatternFlowSnmpv2CVariableBindingValueIntegerValue + // HasChoice checks if Choice has been set in PatternFlowSnmpv2CVariableBindingValueIntegerValue + HasChoice() bool + // Value returns int32, set in PatternFlowSnmpv2CVariableBindingValueIntegerValue. + Value() int32 + // SetValue assigns int32 provided by user to PatternFlowSnmpv2CVariableBindingValueIntegerValue + SetValue(value int32) PatternFlowSnmpv2CVariableBindingValueIntegerValue + // HasValue checks if Value has been set in PatternFlowSnmpv2CVariableBindingValueIntegerValue + HasValue() bool + // Values returns []int32, set in PatternFlowSnmpv2CVariableBindingValueIntegerValue. + Values() []int32 + // SetValues assigns []int32 provided by user to PatternFlowSnmpv2CVariableBindingValueIntegerValue + SetValues(value []int32) PatternFlowSnmpv2CVariableBindingValueIntegerValue + // Increment returns PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter, set in PatternFlowSnmpv2CVariableBindingValueIntegerValue. + Increment() PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + // SetIncrement assigns PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter provided by user to PatternFlowSnmpv2CVariableBindingValueIntegerValue. + SetIncrement(value PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) PatternFlowSnmpv2CVariableBindingValueIntegerValue + // HasIncrement checks if Increment has been set in PatternFlowSnmpv2CVariableBindingValueIntegerValue + HasIncrement() bool + // Decrement returns PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter, set in PatternFlowSnmpv2CVariableBindingValueIntegerValue. + Decrement() PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + // SetDecrement assigns PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter provided by user to PatternFlowSnmpv2CVariableBindingValueIntegerValue. + SetDecrement(value PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) PatternFlowSnmpv2CVariableBindingValueIntegerValue + // HasDecrement checks if Decrement has been set in PatternFlowSnmpv2CVariableBindingValueIntegerValue + HasDecrement() bool + setNil() +} + +type PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum string + +// Enum of Choice on PatternFlowSnmpv2CVariableBindingValueIntegerValue +var PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice = struct { + VALUE PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum + VALUES PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum + INCREMENT PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum + DECREMENT PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum +}{ + VALUE: PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum("value"), + VALUES: PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum("values"), + INCREMENT: PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum("increment"), + DECREMENT: PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum("decrement"), +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) Choice() PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum { + return PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) setChoice(value PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum) PatternFlowSnmpv2CVariableBindingValueIntegerValue { + intValue, ok := otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.VALUE { + defaultValue := int32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.VALUES { + defaultValue := []int32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowSnmpv2CVariableBindingValueIntegerValueCounter().msg() + } + + if value == PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowSnmpv2CVariableBindingValueIntegerValueCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a int32 +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) Value() int32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a int32 +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the int32 value in the PatternFlowSnmpv2CVariableBindingValueIntegerValue object +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) SetValue(value int32) PatternFlowSnmpv2CVariableBindingValueIntegerValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []int32 +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) Values() []int32 { + if obj.obj.Values == nil { + obj.SetValues([]int32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []int32 value in the PatternFlowSnmpv2CVariableBindingValueIntegerValue object +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) SetValues(value []int32) PatternFlowSnmpv2CVariableBindingValueIntegerValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]int32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) Increment() PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowSnmpv2CVariableBindingValueIntegerValueCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter value in the PatternFlowSnmpv2CVariableBindingValueIntegerValue object +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) SetIncrement(value PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) PatternFlowSnmpv2CVariableBindingValueIntegerValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) Decrement() PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowSnmpv2CVariableBindingValueIntegerValueCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter value in the PatternFlowSnmpv2CVariableBindingValueIntegerValue object +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) SetDecrement(value PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) PatternFlowSnmpv2CVariableBindingValueIntegerValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValue) setDefault() { + var choices_set int = 0 + var choice PatternFlowSnmpv2CVariableBindingValueIntegerValueChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIntegerValueChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowSnmpv2CVariableBindingValueIntegerValue") + } + } else { + intVal := otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowSnmpv2CVariableBindingValueIntegerValue_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_integer_value_counter.go b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_integer_value_counter.go new file mode 100644 index 00000000..9413a4a6 --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_integer_value_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter ***** +type patternFlowSnmpv2CVariableBindingValueIntegerValueCounter struct { + validation + obj *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + marshaller marshalPatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + unMarshaller unMarshalPatternFlowSnmpv2CVariableBindingValueIntegerValueCounter +} + +func NewPatternFlowSnmpv2CVariableBindingValueIntegerValueCounter() PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter { + obj := patternFlowSnmpv2CVariableBindingValueIntegerValueCounter{obj: &otg.PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) msg() *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter { + return obj.obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) setMsg(msg *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CVariableBindingValueIntegerValueCounter struct { + obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter +} + +type marshalPatternFlowSnmpv2CVariableBindingValueIntegerValueCounter interface { + // ToProto marshals PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter, error) + // ToPbText marshals PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CVariableBindingValueIntegerValueCounter struct { + obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter +} + +type unMarshalPatternFlowSnmpv2CVariableBindingValueIntegerValueCounter interface { + // FromProto unmarshals PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) (PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter, error) + // FromPbText unmarshals PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) Marshal() marshalPatternFlowSnmpv2CVariableBindingValueIntegerValueCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CVariableBindingValueIntegerValueCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueIntegerValueCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CVariableBindingValueIntegerValueCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) (PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) Clone() (PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CVariableBindingValueIntegerValueCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter is integer counter pattern +type PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter interface { + Validation + // msg marshals PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + // setMsg unmarshals PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter) PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + // validate validates PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns int32, set in PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter. + Start() int32 + // SetStart assigns int32 provided by user to PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + SetStart(value int32) PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + // HasStart checks if Start has been set in PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + HasStart() bool + // Step returns int32, set in PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter. + Step() int32 + // SetStep assigns int32 provided by user to PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + SetStep(value int32) PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + // HasStep checks if Step has been set in PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + HasStep() bool + // Count returns int32, set in PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter. + Count() int32 + // SetCount assigns int32 provided by user to PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + SetCount(value int32) PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + // HasCount checks if Count has been set in PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter + HasCount() bool +} + +// description is TBD +// Start returns a int32 +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) Start() int32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a int32 +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the int32 value in the PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) SetStart(value int32) PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a int32 +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) Step() int32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a int32 +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the int32 value in the PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) SetStep(value int32) PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a int32 +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) Count() int32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a int32 +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the int32 value in the PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) SetCount(value int32) PatternFlowSnmpv2CVariableBindingValueIntegerValueCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIntegerValueCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_ip_address_value.go b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_ip_address_value.go new file mode 100644 index 00000000..611456e6 --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_ip_address_value.go @@ -0,0 +1,549 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CVariableBindingValueIpAddressValue ***** +type patternFlowSnmpv2CVariableBindingValueIpAddressValue struct { + validation + obj *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue + marshaller marshalPatternFlowSnmpv2CVariableBindingValueIpAddressValue + unMarshaller unMarshalPatternFlowSnmpv2CVariableBindingValueIpAddressValue + incrementHolder PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + decrementHolder PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter +} + +func NewPatternFlowSnmpv2CVariableBindingValueIpAddressValue() PatternFlowSnmpv2CVariableBindingValueIpAddressValue { + obj := patternFlowSnmpv2CVariableBindingValueIpAddressValue{obj: &otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) msg() *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue { + return obj.obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) setMsg(msg *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue) PatternFlowSnmpv2CVariableBindingValueIpAddressValue { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CVariableBindingValueIpAddressValue struct { + obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue +} + +type marshalPatternFlowSnmpv2CVariableBindingValueIpAddressValue interface { + // ToProto marshals PatternFlowSnmpv2CVariableBindingValueIpAddressValue to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue + ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue, error) + // ToPbText marshals PatternFlowSnmpv2CVariableBindingValueIpAddressValue to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CVariableBindingValueIpAddressValue to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CVariableBindingValueIpAddressValue to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CVariableBindingValueIpAddressValue struct { + obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue +} + +type unMarshalPatternFlowSnmpv2CVariableBindingValueIpAddressValue interface { + // FromProto unmarshals PatternFlowSnmpv2CVariableBindingValueIpAddressValue from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue + FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue) (PatternFlowSnmpv2CVariableBindingValueIpAddressValue, error) + // FromPbText unmarshals PatternFlowSnmpv2CVariableBindingValueIpAddressValue from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CVariableBindingValueIpAddressValue from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CVariableBindingValueIpAddressValue from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) Marshal() marshalPatternFlowSnmpv2CVariableBindingValueIpAddressValue { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CVariableBindingValueIpAddressValue{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueIpAddressValue { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CVariableBindingValueIpAddressValue{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIpAddressValue) ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIpAddressValue) FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue) (PatternFlowSnmpv2CVariableBindingValueIpAddressValue, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIpAddressValue) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIpAddressValue) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIpAddressValue) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIpAddressValue) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIpAddressValue) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIpAddressValue) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) Clone() (PatternFlowSnmpv2CVariableBindingValueIpAddressValue, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CVariableBindingValueIpAddressValue() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowSnmpv2CVariableBindingValueIpAddressValue is iPv4 address returned for the requested OID. +type PatternFlowSnmpv2CVariableBindingValueIpAddressValue interface { + Validation + // msg marshals PatternFlowSnmpv2CVariableBindingValueIpAddressValue to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue + // setMsg unmarshals PatternFlowSnmpv2CVariableBindingValueIpAddressValue from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue) PatternFlowSnmpv2CVariableBindingValueIpAddressValue + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CVariableBindingValueIpAddressValue + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueIpAddressValue + // validate validates PatternFlowSnmpv2CVariableBindingValueIpAddressValue + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CVariableBindingValueIpAddressValue, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum, set in PatternFlowSnmpv2CVariableBindingValueIpAddressValue + Choice() PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum + // setChoice assigns PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum provided by user to PatternFlowSnmpv2CVariableBindingValueIpAddressValue + setChoice(value PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum) PatternFlowSnmpv2CVariableBindingValueIpAddressValue + // HasChoice checks if Choice has been set in PatternFlowSnmpv2CVariableBindingValueIpAddressValue + HasChoice() bool + // Value returns string, set in PatternFlowSnmpv2CVariableBindingValueIpAddressValue. + Value() string + // SetValue assigns string provided by user to PatternFlowSnmpv2CVariableBindingValueIpAddressValue + SetValue(value string) PatternFlowSnmpv2CVariableBindingValueIpAddressValue + // HasValue checks if Value has been set in PatternFlowSnmpv2CVariableBindingValueIpAddressValue + HasValue() bool + // Values returns []string, set in PatternFlowSnmpv2CVariableBindingValueIpAddressValue. + Values() []string + // SetValues assigns []string provided by user to PatternFlowSnmpv2CVariableBindingValueIpAddressValue + SetValues(value []string) PatternFlowSnmpv2CVariableBindingValueIpAddressValue + // Increment returns PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter, set in PatternFlowSnmpv2CVariableBindingValueIpAddressValue. + Increment() PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + // SetIncrement assigns PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter provided by user to PatternFlowSnmpv2CVariableBindingValueIpAddressValue. + SetIncrement(value PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) PatternFlowSnmpv2CVariableBindingValueIpAddressValue + // HasIncrement checks if Increment has been set in PatternFlowSnmpv2CVariableBindingValueIpAddressValue + HasIncrement() bool + // Decrement returns PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter, set in PatternFlowSnmpv2CVariableBindingValueIpAddressValue. + Decrement() PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + // SetDecrement assigns PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter provided by user to PatternFlowSnmpv2CVariableBindingValueIpAddressValue. + SetDecrement(value PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) PatternFlowSnmpv2CVariableBindingValueIpAddressValue + // HasDecrement checks if Decrement has been set in PatternFlowSnmpv2CVariableBindingValueIpAddressValue + HasDecrement() bool + setNil() +} + +type PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum string + +// Enum of Choice on PatternFlowSnmpv2CVariableBindingValueIpAddressValue +var PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice = struct { + VALUE PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum + VALUES PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum + INCREMENT PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum + DECREMENT PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum +}{ + VALUE: PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum("value"), + VALUES: PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum("values"), + INCREMENT: PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum("increment"), + DECREMENT: PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum("decrement"), +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) Choice() PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum { + return PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) setChoice(value PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum) PatternFlowSnmpv2CVariableBindingValueIpAddressValue { + intValue, ok := otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.VALUE { + defaultValue := "0.0.0.0" + obj.obj.Value = &defaultValue + } + + if value == PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.VALUES { + defaultValue := []string{"0.0.0.0"} + obj.obj.Values = defaultValue + } + + if value == PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter().msg() + } + + if value == PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a string +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) Value() string { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a string +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the string value in the PatternFlowSnmpv2CVariableBindingValueIpAddressValue object +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) SetValue(value string) PatternFlowSnmpv2CVariableBindingValueIpAddressValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []string +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) Values() []string { + if obj.obj.Values == nil { + obj.SetValues([]string{"0.0.0.0"}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []string value in the PatternFlowSnmpv2CVariableBindingValueIpAddressValue object +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) SetValues(value []string) PatternFlowSnmpv2CVariableBindingValueIpAddressValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]string, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) Increment() PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter value in the PatternFlowSnmpv2CVariableBindingValueIpAddressValue object +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) SetIncrement(value PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) PatternFlowSnmpv2CVariableBindingValueIpAddressValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) Decrement() PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter value in the PatternFlowSnmpv2CVariableBindingValueIpAddressValue object +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) SetDecrement(value PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) PatternFlowSnmpv2CVariableBindingValueIpAddressValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + err := obj.validateIpv4(obj.Value()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowSnmpv2CVariableBindingValueIpAddressValue.Value")) + } + + } + + if obj.obj.Values != nil { + + err := obj.validateIpv4Slice(obj.Values()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowSnmpv2CVariableBindingValueIpAddressValue.Values")) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValue) setDefault() { + var choices_set int = 0 + var choice PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueIpAddressValueChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowSnmpv2CVariableBindingValueIpAddressValue") + } + } else { + intVal := otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValue_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_ip_address_value_counter.go b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_ip_address_value_counter.go new file mode 100644 index 00000000..d47f94ce --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_ip_address_value_counter.go @@ -0,0 +1,389 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter ***** +type patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter struct { + validation + obj *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + marshaller marshalPatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + unMarshaller unMarshalPatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter +} + +func NewPatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter() PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter { + obj := patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter{obj: &otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) msg() *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter { + return obj.obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) setMsg(msg *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter struct { + obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter +} + +type marshalPatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter interface { + // ToProto marshals PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter, error) + // ToPbText marshals PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter struct { + obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter +} + +type unMarshalPatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter interface { + // FromProto unmarshals PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) (PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter, error) + // FromPbText unmarshals PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) Marshal() marshalPatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) (PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) Clone() (PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter is ipv4 counter pattern +type PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter interface { + Validation + // msg marshals PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + // setMsg unmarshals PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + // validate validates PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns string, set in PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter. + Start() string + // SetStart assigns string provided by user to PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + SetStart(value string) PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + // HasStart checks if Start has been set in PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + HasStart() bool + // Step returns string, set in PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter. + Step() string + // SetStep assigns string provided by user to PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + SetStep(value string) PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + // HasStep checks if Step has been set in PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + HasStep() bool + // Count returns uint32, set in PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + SetCount(value uint32) PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + // HasCount checks if Count has been set in PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter + HasCount() bool +} + +// description is TBD +// Start returns a string +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) Start() string { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a string +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the string value in the PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) SetStart(value string) PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a string +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) Step() string { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a string +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the string value in the PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) SetStep(value string) PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) SetCount(value uint32) PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + err := obj.validateIpv4(obj.Start()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter.Start")) + } + + } + + if obj.obj.Step != nil { + + err := obj.validateIpv4(obj.Step()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on PatternFlowSnmpv2CVariableBindingValueIpAddressValueCounter.Step")) + } + + } + +} + +func (obj *patternFlowSnmpv2CVariableBindingValueIpAddressValueCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart("0.0.0.0") + } + if obj.obj.Step == nil { + obj.SetStep("0.0.0.1") + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_timeticks_value.go b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_timeticks_value.go new file mode 100644 index 00000000..6fdb5e44 --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_timeticks_value.go @@ -0,0 +1,531 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CVariableBindingValueTimeticksValue ***** +type patternFlowSnmpv2CVariableBindingValueTimeticksValue struct { + validation + obj *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue + marshaller marshalPatternFlowSnmpv2CVariableBindingValueTimeticksValue + unMarshaller unMarshalPatternFlowSnmpv2CVariableBindingValueTimeticksValue + incrementHolder PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + decrementHolder PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter +} + +func NewPatternFlowSnmpv2CVariableBindingValueTimeticksValue() PatternFlowSnmpv2CVariableBindingValueTimeticksValue { + obj := patternFlowSnmpv2CVariableBindingValueTimeticksValue{obj: &otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) msg() *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue { + return obj.obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) setMsg(msg *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue) PatternFlowSnmpv2CVariableBindingValueTimeticksValue { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CVariableBindingValueTimeticksValue struct { + obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue +} + +type marshalPatternFlowSnmpv2CVariableBindingValueTimeticksValue interface { + // ToProto marshals PatternFlowSnmpv2CVariableBindingValueTimeticksValue to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue + ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue, error) + // ToPbText marshals PatternFlowSnmpv2CVariableBindingValueTimeticksValue to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CVariableBindingValueTimeticksValue to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CVariableBindingValueTimeticksValue to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CVariableBindingValueTimeticksValue struct { + obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue +} + +type unMarshalPatternFlowSnmpv2CVariableBindingValueTimeticksValue interface { + // FromProto unmarshals PatternFlowSnmpv2CVariableBindingValueTimeticksValue from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue + FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue) (PatternFlowSnmpv2CVariableBindingValueTimeticksValue, error) + // FromPbText unmarshals PatternFlowSnmpv2CVariableBindingValueTimeticksValue from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CVariableBindingValueTimeticksValue from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CVariableBindingValueTimeticksValue from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) Marshal() marshalPatternFlowSnmpv2CVariableBindingValueTimeticksValue { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CVariableBindingValueTimeticksValue{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueTimeticksValue { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CVariableBindingValueTimeticksValue{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueTimeticksValue) ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueTimeticksValue) FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue) (PatternFlowSnmpv2CVariableBindingValueTimeticksValue, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueTimeticksValue) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueTimeticksValue) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueTimeticksValue) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueTimeticksValue) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueTimeticksValue) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueTimeticksValue) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) Clone() (PatternFlowSnmpv2CVariableBindingValueTimeticksValue, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CVariableBindingValueTimeticksValue() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowSnmpv2CVariableBindingValueTimeticksValue is timeticks returned for the requested OID. +type PatternFlowSnmpv2CVariableBindingValueTimeticksValue interface { + Validation + // msg marshals PatternFlowSnmpv2CVariableBindingValueTimeticksValue to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue + // setMsg unmarshals PatternFlowSnmpv2CVariableBindingValueTimeticksValue from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue) PatternFlowSnmpv2CVariableBindingValueTimeticksValue + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CVariableBindingValueTimeticksValue + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueTimeticksValue + // validate validates PatternFlowSnmpv2CVariableBindingValueTimeticksValue + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CVariableBindingValueTimeticksValue, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum, set in PatternFlowSnmpv2CVariableBindingValueTimeticksValue + Choice() PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum + // setChoice assigns PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum provided by user to PatternFlowSnmpv2CVariableBindingValueTimeticksValue + setChoice(value PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum) PatternFlowSnmpv2CVariableBindingValueTimeticksValue + // HasChoice checks if Choice has been set in PatternFlowSnmpv2CVariableBindingValueTimeticksValue + HasChoice() bool + // Value returns uint32, set in PatternFlowSnmpv2CVariableBindingValueTimeticksValue. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueTimeticksValue + SetValue(value uint32) PatternFlowSnmpv2CVariableBindingValueTimeticksValue + // HasValue checks if Value has been set in PatternFlowSnmpv2CVariableBindingValueTimeticksValue + HasValue() bool + // Values returns []uint32, set in PatternFlowSnmpv2CVariableBindingValueTimeticksValue. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueTimeticksValue + SetValues(value []uint32) PatternFlowSnmpv2CVariableBindingValueTimeticksValue + // Increment returns PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter, set in PatternFlowSnmpv2CVariableBindingValueTimeticksValue. + Increment() PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + // SetIncrement assigns PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter provided by user to PatternFlowSnmpv2CVariableBindingValueTimeticksValue. + SetIncrement(value PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) PatternFlowSnmpv2CVariableBindingValueTimeticksValue + // HasIncrement checks if Increment has been set in PatternFlowSnmpv2CVariableBindingValueTimeticksValue + HasIncrement() bool + // Decrement returns PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter, set in PatternFlowSnmpv2CVariableBindingValueTimeticksValue. + Decrement() PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + // SetDecrement assigns PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter provided by user to PatternFlowSnmpv2CVariableBindingValueTimeticksValue. + SetDecrement(value PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) PatternFlowSnmpv2CVariableBindingValueTimeticksValue + // HasDecrement checks if Decrement has been set in PatternFlowSnmpv2CVariableBindingValueTimeticksValue + HasDecrement() bool + setNil() +} + +type PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum string + +// Enum of Choice on PatternFlowSnmpv2CVariableBindingValueTimeticksValue +var PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice = struct { + VALUE PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum + VALUES PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum + INCREMENT PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum + DECREMENT PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum +}{ + VALUE: PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum("value"), + VALUES: PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum("values"), + INCREMENT: PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum("increment"), + DECREMENT: PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum("decrement"), +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) Choice() PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum { + return PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) setChoice(value PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum) PatternFlowSnmpv2CVariableBindingValueTimeticksValue { + intValue, ok := otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter().msg() + } + + if value == PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowSnmpv2CVariableBindingValueTimeticksValue object +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) SetValue(value uint32) PatternFlowSnmpv2CVariableBindingValueTimeticksValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowSnmpv2CVariableBindingValueTimeticksValue object +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) SetValues(value []uint32) PatternFlowSnmpv2CVariableBindingValueTimeticksValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) Increment() PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter value in the PatternFlowSnmpv2CVariableBindingValueTimeticksValue object +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) SetIncrement(value PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) PatternFlowSnmpv2CVariableBindingValueTimeticksValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) Decrement() PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter value in the PatternFlowSnmpv2CVariableBindingValueTimeticksValue object +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) SetDecrement(value PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) PatternFlowSnmpv2CVariableBindingValueTimeticksValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValue) setDefault() { + var choices_set int = 0 + var choice PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueTimeticksValueChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowSnmpv2CVariableBindingValueTimeticksValue") + } + } else { + intVal := otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValue_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_timeticks_value_counter.go b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_timeticks_value_counter.go new file mode 100644 index 00000000..c9cdb909 --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_timeticks_value_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter ***** +type patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter struct { + validation + obj *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + marshaller marshalPatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + unMarshaller unMarshalPatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter +} + +func NewPatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter() PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter { + obj := patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter{obj: &otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) msg() *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter { + return obj.obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) setMsg(msg *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter struct { + obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter +} + +type marshalPatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter interface { + // ToProto marshals PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter, error) + // ToPbText marshals PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter struct { + obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter +} + +type unMarshalPatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter interface { + // FromProto unmarshals PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) (PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter, error) + // FromPbText unmarshals PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) Marshal() marshalPatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) (PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) Clone() (PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter is integer counter pattern +type PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter interface { + Validation + // msg marshals PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + // setMsg unmarshals PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + // validate validates PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + SetStart(value uint32) PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + // HasStart checks if Start has been set in PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + HasStart() bool + // Step returns uint32, set in PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + SetStep(value uint32) PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + // HasStep checks if Step has been set in PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + HasStep() bool + // Count returns uint32, set in PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + SetCount(value uint32) PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + // HasCount checks if Count has been set in PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) SetStart(value uint32) PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) SetStep(value uint32) PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) SetCount(value uint32) PatternFlowSnmpv2CVariableBindingValueTimeticksValueCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowSnmpv2CVariableBindingValueTimeticksValueCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_unsigned_integer_value.go b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_unsigned_integer_value.go new file mode 100644 index 00000000..ede2f18c --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_unsigned_integer_value.go @@ -0,0 +1,531 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue ***** +type patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue struct { + validation + obj *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + marshaller marshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + unMarshaller unMarshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + incrementHolder PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + decrementHolder PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter +} + +func NewPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue() PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue { + obj := patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue{obj: &otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) msg() *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue { + return obj.obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) setMsg(msg *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue struct { + obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue +} + +type marshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue interface { + // ToProto marshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue, error) + // ToPbText marshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue struct { + obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue +} + +type unMarshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue interface { + // FromProto unmarshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) (PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue, error) + // FromPbText unmarshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) Marshal() marshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) (PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) Clone() (PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue is unsigned integer value returned for the requested OID. +type PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue interface { + Validation + // msg marshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + // setMsg unmarshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + // validate validates PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum, set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + Choice() PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum + // setChoice assigns PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum provided by user to PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + setChoice(value PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + // HasChoice checks if Choice has been set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + HasChoice() bool + // Value returns uint32, set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + SetValue(value uint32) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + // HasValue checks if Value has been set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + HasValue() bool + // Values returns []uint32, set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + SetValues(value []uint32) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + // Increment returns PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter, set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue. + Increment() PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + // SetIncrement assigns PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter provided by user to PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue. + SetIncrement(value PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + // HasIncrement checks if Increment has been set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + HasIncrement() bool + // Decrement returns PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter, set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue. + Decrement() PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + // SetDecrement assigns PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter provided by user to PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue. + SetDecrement(value PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + // HasDecrement checks if Decrement has been set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue + HasDecrement() bool + setNil() +} + +type PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum string + +// Enum of Choice on PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue +var PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice = struct { + VALUE PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum + VALUES PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum + INCREMENT PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum + DECREMENT PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum +}{ + VALUE: PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum("value"), + VALUES: PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum("values"), + INCREMENT: PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum("increment"), + DECREMENT: PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum("decrement"), +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) Choice() PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum { + return PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) setChoice(value PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue { + intValue, ok := otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter().msg() + } + + if value == PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue object +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) SetValue(value uint32) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue object +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) SetValues(value []uint32) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) Increment() PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter value in the PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue object +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) SetIncrement(value PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) Decrement() PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter value in the PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue object +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) SetDecrement(value PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue) setDefault() { + var choices_set int = 0 + var choice PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue") + } + } else { + intVal := otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValue_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_unsigned_integer_value_counter.go b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_unsigned_integer_value_counter.go new file mode 100644 index 00000000..131086ff --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_variable_binding_value_unsigned_integer_value_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter ***** +type patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter struct { + validation + obj *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + marshaller marshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + unMarshaller unMarshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter +} + +func NewPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter() PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter { + obj := patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter{obj: &otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) msg() *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter { + return obj.obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) setMsg(msg *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter struct { + obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter +} + +type marshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter interface { + // ToProto marshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter, error) + // ToPbText marshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter struct { + obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter +} + +type unMarshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter interface { + // FromProto unmarshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) (PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter, error) + // FromPbText unmarshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) Marshal() marshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) ToProto() (*otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) FromProto(msg *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) (PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) Clone() (PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter is integer counter pattern +type PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter interface { + Validation + // msg marshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter to protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + // setMsg unmarshals PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter from protobuf object *otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + // validate validates PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + SetStart(value uint32) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + // HasStart checks if Start has been set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + HasStart() bool + // Step returns uint32, set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + SetStep(value uint32) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + // HasStep checks if Step has been set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + HasStep() bool + // Count returns uint32, set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + SetCount(value uint32) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + // HasCount checks if Count has been set in PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) SetStart(value uint32) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) SetStep(value uint32) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter object +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) SetCount(value uint32) PatternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowSnmpv2CVariableBindingValueUnsignedIntegerValueCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_version.go b/gosnappi/pattern_flow_snmpv2_c_version.go new file mode 100644 index 00000000..28b27638 --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_version.go @@ -0,0 +1,554 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CVersion ***** +type patternFlowSnmpv2CVersion struct { + validation + obj *otg.PatternFlowSnmpv2CVersion + marshaller marshalPatternFlowSnmpv2CVersion + unMarshaller unMarshalPatternFlowSnmpv2CVersion + incrementHolder PatternFlowSnmpv2CVersionCounter + decrementHolder PatternFlowSnmpv2CVersionCounter +} + +func NewPatternFlowSnmpv2CVersion() PatternFlowSnmpv2CVersion { + obj := patternFlowSnmpv2CVersion{obj: &otg.PatternFlowSnmpv2CVersion{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CVersion) msg() *otg.PatternFlowSnmpv2CVersion { + return obj.obj +} + +func (obj *patternFlowSnmpv2CVersion) setMsg(msg *otg.PatternFlowSnmpv2CVersion) PatternFlowSnmpv2CVersion { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CVersion struct { + obj *patternFlowSnmpv2CVersion +} + +type marshalPatternFlowSnmpv2CVersion interface { + // ToProto marshals PatternFlowSnmpv2CVersion to protobuf object *otg.PatternFlowSnmpv2CVersion + ToProto() (*otg.PatternFlowSnmpv2CVersion, error) + // ToPbText marshals PatternFlowSnmpv2CVersion to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CVersion to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CVersion to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CVersion struct { + obj *patternFlowSnmpv2CVersion +} + +type unMarshalPatternFlowSnmpv2CVersion interface { + // FromProto unmarshals PatternFlowSnmpv2CVersion from protobuf object *otg.PatternFlowSnmpv2CVersion + FromProto(msg *otg.PatternFlowSnmpv2CVersion) (PatternFlowSnmpv2CVersion, error) + // FromPbText unmarshals PatternFlowSnmpv2CVersion from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CVersion from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CVersion from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CVersion) Marshal() marshalPatternFlowSnmpv2CVersion { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CVersion{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CVersion) Unmarshal() unMarshalPatternFlowSnmpv2CVersion { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CVersion{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CVersion) ToProto() (*otg.PatternFlowSnmpv2CVersion, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVersion) FromProto(msg *otg.PatternFlowSnmpv2CVersion) (PatternFlowSnmpv2CVersion, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CVersion) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVersion) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CVersion) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVersion) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CVersion) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVersion) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CVersion) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVersion) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVersion) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CVersion) Clone() (PatternFlowSnmpv2CVersion, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CVersion() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowSnmpv2CVersion) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowSnmpv2CVersion is version +type PatternFlowSnmpv2CVersion interface { + Validation + // msg marshals PatternFlowSnmpv2CVersion to protobuf object *otg.PatternFlowSnmpv2CVersion + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CVersion + // setMsg unmarshals PatternFlowSnmpv2CVersion from protobuf object *otg.PatternFlowSnmpv2CVersion + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CVersion) PatternFlowSnmpv2CVersion + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CVersion + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CVersion + // validate validates PatternFlowSnmpv2CVersion + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CVersion, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowSnmpv2CVersionChoiceEnum, set in PatternFlowSnmpv2CVersion + Choice() PatternFlowSnmpv2CVersionChoiceEnum + // setChoice assigns PatternFlowSnmpv2CVersionChoiceEnum provided by user to PatternFlowSnmpv2CVersion + setChoice(value PatternFlowSnmpv2CVersionChoiceEnum) PatternFlowSnmpv2CVersion + // HasChoice checks if Choice has been set in PatternFlowSnmpv2CVersion + HasChoice() bool + // Value returns uint32, set in PatternFlowSnmpv2CVersion. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowSnmpv2CVersion + SetValue(value uint32) PatternFlowSnmpv2CVersion + // HasValue checks if Value has been set in PatternFlowSnmpv2CVersion + HasValue() bool + // Values returns []uint32, set in PatternFlowSnmpv2CVersion. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowSnmpv2CVersion + SetValues(value []uint32) PatternFlowSnmpv2CVersion + // Increment returns PatternFlowSnmpv2CVersionCounter, set in PatternFlowSnmpv2CVersion. + Increment() PatternFlowSnmpv2CVersionCounter + // SetIncrement assigns PatternFlowSnmpv2CVersionCounter provided by user to PatternFlowSnmpv2CVersion. + SetIncrement(value PatternFlowSnmpv2CVersionCounter) PatternFlowSnmpv2CVersion + // HasIncrement checks if Increment has been set in PatternFlowSnmpv2CVersion + HasIncrement() bool + // Decrement returns PatternFlowSnmpv2CVersionCounter, set in PatternFlowSnmpv2CVersion. + Decrement() PatternFlowSnmpv2CVersionCounter + // SetDecrement assigns PatternFlowSnmpv2CVersionCounter provided by user to PatternFlowSnmpv2CVersion. + SetDecrement(value PatternFlowSnmpv2CVersionCounter) PatternFlowSnmpv2CVersion + // HasDecrement checks if Decrement has been set in PatternFlowSnmpv2CVersion + HasDecrement() bool + setNil() +} + +type PatternFlowSnmpv2CVersionChoiceEnum string + +// Enum of Choice on PatternFlowSnmpv2CVersion +var PatternFlowSnmpv2CVersionChoice = struct { + VALUE PatternFlowSnmpv2CVersionChoiceEnum + VALUES PatternFlowSnmpv2CVersionChoiceEnum + INCREMENT PatternFlowSnmpv2CVersionChoiceEnum + DECREMENT PatternFlowSnmpv2CVersionChoiceEnum +}{ + VALUE: PatternFlowSnmpv2CVersionChoiceEnum("value"), + VALUES: PatternFlowSnmpv2CVersionChoiceEnum("values"), + INCREMENT: PatternFlowSnmpv2CVersionChoiceEnum("increment"), + DECREMENT: PatternFlowSnmpv2CVersionChoiceEnum("decrement"), +} + +func (obj *patternFlowSnmpv2CVersion) Choice() PatternFlowSnmpv2CVersionChoiceEnum { + return PatternFlowSnmpv2CVersionChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowSnmpv2CVersion) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowSnmpv2CVersion) setChoice(value PatternFlowSnmpv2CVersionChoiceEnum) PatternFlowSnmpv2CVersion { + intValue, ok := otg.PatternFlowSnmpv2CVersion_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowSnmpv2CVersionChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowSnmpv2CVersion_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowSnmpv2CVersionChoice.VALUE { + defaultValue := uint32(1) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowSnmpv2CVersionChoice.VALUES { + defaultValue := []uint32{1} + obj.obj.Values = defaultValue + } + + if value == PatternFlowSnmpv2CVersionChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowSnmpv2CVersionCounter().msg() + } + + if value == PatternFlowSnmpv2CVersionChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowSnmpv2CVersionCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowSnmpv2CVersion) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowSnmpv2CVersionChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowSnmpv2CVersion) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowSnmpv2CVersion object +func (obj *patternFlowSnmpv2CVersion) SetValue(value uint32) PatternFlowSnmpv2CVersion { + obj.setChoice(PatternFlowSnmpv2CVersionChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowSnmpv2CVersion) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{1}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowSnmpv2CVersion object +func (obj *patternFlowSnmpv2CVersion) SetValues(value []uint32) PatternFlowSnmpv2CVersion { + obj.setChoice(PatternFlowSnmpv2CVersionChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CVersionCounter +func (obj *patternFlowSnmpv2CVersion) Increment() PatternFlowSnmpv2CVersionCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowSnmpv2CVersionChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowSnmpv2CVersionCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CVersionCounter +func (obj *patternFlowSnmpv2CVersion) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowSnmpv2CVersionCounter value in the PatternFlowSnmpv2CVersion object +func (obj *patternFlowSnmpv2CVersion) SetIncrement(value PatternFlowSnmpv2CVersionCounter) PatternFlowSnmpv2CVersion { + obj.setChoice(PatternFlowSnmpv2CVersionChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CVersionCounter +func (obj *patternFlowSnmpv2CVersion) Decrement() PatternFlowSnmpv2CVersionCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowSnmpv2CVersionChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowSnmpv2CVersionCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CVersionCounter +func (obj *patternFlowSnmpv2CVersion) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowSnmpv2CVersionCounter value in the PatternFlowSnmpv2CVersion object +func (obj *patternFlowSnmpv2CVersion) SetDecrement(value PatternFlowSnmpv2CVersionCounter) PatternFlowSnmpv2CVersion { + obj.setChoice(PatternFlowSnmpv2CVersionChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowSnmpv2CVersion) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowSnmpv2CVersion.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowSnmpv2CVersion.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowSnmpv2CVersion) setDefault() { + var choices_set int = 0 + var choice PatternFlowSnmpv2CVersionChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVersionChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowSnmpv2CVersionChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVersionChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CVersionChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowSnmpv2CVersionChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowSnmpv2CVersion") + } + } else { + intVal := otg.PatternFlowSnmpv2CVersion_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowSnmpv2CVersion_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_c_version_counter.go b/gosnappi/pattern_flow_snmpv2_c_version_counter.go new file mode 100644 index 00000000..0b68a43b --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_c_version_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CVersionCounter ***** +type patternFlowSnmpv2CVersionCounter struct { + validation + obj *otg.PatternFlowSnmpv2CVersionCounter + marshaller marshalPatternFlowSnmpv2CVersionCounter + unMarshaller unMarshalPatternFlowSnmpv2CVersionCounter +} + +func NewPatternFlowSnmpv2CVersionCounter() PatternFlowSnmpv2CVersionCounter { + obj := patternFlowSnmpv2CVersionCounter{obj: &otg.PatternFlowSnmpv2CVersionCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CVersionCounter) msg() *otg.PatternFlowSnmpv2CVersionCounter { + return obj.obj +} + +func (obj *patternFlowSnmpv2CVersionCounter) setMsg(msg *otg.PatternFlowSnmpv2CVersionCounter) PatternFlowSnmpv2CVersionCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CVersionCounter struct { + obj *patternFlowSnmpv2CVersionCounter +} + +type marshalPatternFlowSnmpv2CVersionCounter interface { + // ToProto marshals PatternFlowSnmpv2CVersionCounter to protobuf object *otg.PatternFlowSnmpv2CVersionCounter + ToProto() (*otg.PatternFlowSnmpv2CVersionCounter, error) + // ToPbText marshals PatternFlowSnmpv2CVersionCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CVersionCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CVersionCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CVersionCounter struct { + obj *patternFlowSnmpv2CVersionCounter +} + +type unMarshalPatternFlowSnmpv2CVersionCounter interface { + // FromProto unmarshals PatternFlowSnmpv2CVersionCounter from protobuf object *otg.PatternFlowSnmpv2CVersionCounter + FromProto(msg *otg.PatternFlowSnmpv2CVersionCounter) (PatternFlowSnmpv2CVersionCounter, error) + // FromPbText unmarshals PatternFlowSnmpv2CVersionCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CVersionCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CVersionCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CVersionCounter) Marshal() marshalPatternFlowSnmpv2CVersionCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CVersionCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CVersionCounter) Unmarshal() unMarshalPatternFlowSnmpv2CVersionCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CVersionCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CVersionCounter) ToProto() (*otg.PatternFlowSnmpv2CVersionCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVersionCounter) FromProto(msg *otg.PatternFlowSnmpv2CVersionCounter) (PatternFlowSnmpv2CVersionCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CVersionCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVersionCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CVersionCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVersionCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CVersionCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CVersionCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CVersionCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVersionCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CVersionCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CVersionCounter) Clone() (PatternFlowSnmpv2CVersionCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CVersionCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowSnmpv2CVersionCounter is integer counter pattern +type PatternFlowSnmpv2CVersionCounter interface { + Validation + // msg marshals PatternFlowSnmpv2CVersionCounter to protobuf object *otg.PatternFlowSnmpv2CVersionCounter + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CVersionCounter + // setMsg unmarshals PatternFlowSnmpv2CVersionCounter from protobuf object *otg.PatternFlowSnmpv2CVersionCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CVersionCounter) PatternFlowSnmpv2CVersionCounter + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CVersionCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CVersionCounter + // validate validates PatternFlowSnmpv2CVersionCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CVersionCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowSnmpv2CVersionCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowSnmpv2CVersionCounter + SetStart(value uint32) PatternFlowSnmpv2CVersionCounter + // HasStart checks if Start has been set in PatternFlowSnmpv2CVersionCounter + HasStart() bool + // Step returns uint32, set in PatternFlowSnmpv2CVersionCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowSnmpv2CVersionCounter + SetStep(value uint32) PatternFlowSnmpv2CVersionCounter + // HasStep checks if Step has been set in PatternFlowSnmpv2CVersionCounter + HasStep() bool + // Count returns uint32, set in PatternFlowSnmpv2CVersionCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowSnmpv2CVersionCounter + SetCount(value uint32) PatternFlowSnmpv2CVersionCounter + // HasCount checks if Count has been set in PatternFlowSnmpv2CVersionCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowSnmpv2CVersionCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowSnmpv2CVersionCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowSnmpv2CVersionCounter object +func (obj *patternFlowSnmpv2CVersionCounter) SetStart(value uint32) PatternFlowSnmpv2CVersionCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowSnmpv2CVersionCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowSnmpv2CVersionCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowSnmpv2CVersionCounter object +func (obj *patternFlowSnmpv2CVersionCounter) SetStep(value uint32) PatternFlowSnmpv2CVersionCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowSnmpv2CVersionCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowSnmpv2CVersionCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowSnmpv2CVersionCounter object +func (obj *patternFlowSnmpv2CVersionCounter) SetCount(value uint32) PatternFlowSnmpv2CVersionCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowSnmpv2CVersionCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowSnmpv2CVersionCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowSnmpv2CVersionCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowSnmpv2CVersionCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowSnmpv2CVersionCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_cpdu_error_index.go b/gosnappi/pattern_flow_snmpv2_cpdu_error_index.go new file mode 100644 index 00000000..dd67ce4b --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_cpdu_error_index.go @@ -0,0 +1,531 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CPDUErrorIndex ***** +type patternFlowSnmpv2CPDUErrorIndex struct { + validation + obj *otg.PatternFlowSnmpv2CPDUErrorIndex + marshaller marshalPatternFlowSnmpv2CPDUErrorIndex + unMarshaller unMarshalPatternFlowSnmpv2CPDUErrorIndex + incrementHolder PatternFlowSnmpv2CPDUErrorIndexCounter + decrementHolder PatternFlowSnmpv2CPDUErrorIndexCounter +} + +func NewPatternFlowSnmpv2CPDUErrorIndex() PatternFlowSnmpv2CPDUErrorIndex { + obj := patternFlowSnmpv2CPDUErrorIndex{obj: &otg.PatternFlowSnmpv2CPDUErrorIndex{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CPDUErrorIndex) msg() *otg.PatternFlowSnmpv2CPDUErrorIndex { + return obj.obj +} + +func (obj *patternFlowSnmpv2CPDUErrorIndex) setMsg(msg *otg.PatternFlowSnmpv2CPDUErrorIndex) PatternFlowSnmpv2CPDUErrorIndex { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CPDUErrorIndex struct { + obj *patternFlowSnmpv2CPDUErrorIndex +} + +type marshalPatternFlowSnmpv2CPDUErrorIndex interface { + // ToProto marshals PatternFlowSnmpv2CPDUErrorIndex to protobuf object *otg.PatternFlowSnmpv2CPDUErrorIndex + ToProto() (*otg.PatternFlowSnmpv2CPDUErrorIndex, error) + // ToPbText marshals PatternFlowSnmpv2CPDUErrorIndex to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CPDUErrorIndex to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CPDUErrorIndex to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CPDUErrorIndex struct { + obj *patternFlowSnmpv2CPDUErrorIndex +} + +type unMarshalPatternFlowSnmpv2CPDUErrorIndex interface { + // FromProto unmarshals PatternFlowSnmpv2CPDUErrorIndex from protobuf object *otg.PatternFlowSnmpv2CPDUErrorIndex + FromProto(msg *otg.PatternFlowSnmpv2CPDUErrorIndex) (PatternFlowSnmpv2CPDUErrorIndex, error) + // FromPbText unmarshals PatternFlowSnmpv2CPDUErrorIndex from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CPDUErrorIndex from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CPDUErrorIndex from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CPDUErrorIndex) Marshal() marshalPatternFlowSnmpv2CPDUErrorIndex { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CPDUErrorIndex{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CPDUErrorIndex) Unmarshal() unMarshalPatternFlowSnmpv2CPDUErrorIndex { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CPDUErrorIndex{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CPDUErrorIndex) ToProto() (*otg.PatternFlowSnmpv2CPDUErrorIndex, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDUErrorIndex) FromProto(msg *otg.PatternFlowSnmpv2CPDUErrorIndex) (PatternFlowSnmpv2CPDUErrorIndex, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CPDUErrorIndex) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDUErrorIndex) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CPDUErrorIndex) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDUErrorIndex) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CPDUErrorIndex) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDUErrorIndex) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CPDUErrorIndex) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CPDUErrorIndex) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CPDUErrorIndex) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CPDUErrorIndex) Clone() (PatternFlowSnmpv2CPDUErrorIndex, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CPDUErrorIndex() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowSnmpv2CPDUErrorIndex) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowSnmpv2CPDUErrorIndex is when Error Status is non-zero, this field contains a pointer that specifies which object generated the error. Always zero in a request. +type PatternFlowSnmpv2CPDUErrorIndex interface { + Validation + // msg marshals PatternFlowSnmpv2CPDUErrorIndex to protobuf object *otg.PatternFlowSnmpv2CPDUErrorIndex + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CPDUErrorIndex + // setMsg unmarshals PatternFlowSnmpv2CPDUErrorIndex from protobuf object *otg.PatternFlowSnmpv2CPDUErrorIndex + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CPDUErrorIndex) PatternFlowSnmpv2CPDUErrorIndex + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CPDUErrorIndex + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CPDUErrorIndex + // validate validates PatternFlowSnmpv2CPDUErrorIndex + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CPDUErrorIndex, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowSnmpv2CPDUErrorIndexChoiceEnum, set in PatternFlowSnmpv2CPDUErrorIndex + Choice() PatternFlowSnmpv2CPDUErrorIndexChoiceEnum + // setChoice assigns PatternFlowSnmpv2CPDUErrorIndexChoiceEnum provided by user to PatternFlowSnmpv2CPDUErrorIndex + setChoice(value PatternFlowSnmpv2CPDUErrorIndexChoiceEnum) PatternFlowSnmpv2CPDUErrorIndex + // HasChoice checks if Choice has been set in PatternFlowSnmpv2CPDUErrorIndex + HasChoice() bool + // Value returns uint32, set in PatternFlowSnmpv2CPDUErrorIndex. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowSnmpv2CPDUErrorIndex + SetValue(value uint32) PatternFlowSnmpv2CPDUErrorIndex + // HasValue checks if Value has been set in PatternFlowSnmpv2CPDUErrorIndex + HasValue() bool + // Values returns []uint32, set in PatternFlowSnmpv2CPDUErrorIndex. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowSnmpv2CPDUErrorIndex + SetValues(value []uint32) PatternFlowSnmpv2CPDUErrorIndex + // Increment returns PatternFlowSnmpv2CPDUErrorIndexCounter, set in PatternFlowSnmpv2CPDUErrorIndex. + Increment() PatternFlowSnmpv2CPDUErrorIndexCounter + // SetIncrement assigns PatternFlowSnmpv2CPDUErrorIndexCounter provided by user to PatternFlowSnmpv2CPDUErrorIndex. + SetIncrement(value PatternFlowSnmpv2CPDUErrorIndexCounter) PatternFlowSnmpv2CPDUErrorIndex + // HasIncrement checks if Increment has been set in PatternFlowSnmpv2CPDUErrorIndex + HasIncrement() bool + // Decrement returns PatternFlowSnmpv2CPDUErrorIndexCounter, set in PatternFlowSnmpv2CPDUErrorIndex. + Decrement() PatternFlowSnmpv2CPDUErrorIndexCounter + // SetDecrement assigns PatternFlowSnmpv2CPDUErrorIndexCounter provided by user to PatternFlowSnmpv2CPDUErrorIndex. + SetDecrement(value PatternFlowSnmpv2CPDUErrorIndexCounter) PatternFlowSnmpv2CPDUErrorIndex + // HasDecrement checks if Decrement has been set in PatternFlowSnmpv2CPDUErrorIndex + HasDecrement() bool + setNil() +} + +type PatternFlowSnmpv2CPDUErrorIndexChoiceEnum string + +// Enum of Choice on PatternFlowSnmpv2CPDUErrorIndex +var PatternFlowSnmpv2CPDUErrorIndexChoice = struct { + VALUE PatternFlowSnmpv2CPDUErrorIndexChoiceEnum + VALUES PatternFlowSnmpv2CPDUErrorIndexChoiceEnum + INCREMENT PatternFlowSnmpv2CPDUErrorIndexChoiceEnum + DECREMENT PatternFlowSnmpv2CPDUErrorIndexChoiceEnum +}{ + VALUE: PatternFlowSnmpv2CPDUErrorIndexChoiceEnum("value"), + VALUES: PatternFlowSnmpv2CPDUErrorIndexChoiceEnum("values"), + INCREMENT: PatternFlowSnmpv2CPDUErrorIndexChoiceEnum("increment"), + DECREMENT: PatternFlowSnmpv2CPDUErrorIndexChoiceEnum("decrement"), +} + +func (obj *patternFlowSnmpv2CPDUErrorIndex) Choice() PatternFlowSnmpv2CPDUErrorIndexChoiceEnum { + return PatternFlowSnmpv2CPDUErrorIndexChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowSnmpv2CPDUErrorIndex) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowSnmpv2CPDUErrorIndex) setChoice(value PatternFlowSnmpv2CPDUErrorIndexChoiceEnum) PatternFlowSnmpv2CPDUErrorIndex { + intValue, ok := otg.PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowSnmpv2CPDUErrorIndexChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowSnmpv2CPDUErrorIndexChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowSnmpv2CPDUErrorIndexChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowSnmpv2CPDUErrorIndexChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowSnmpv2CPDUErrorIndexCounter().msg() + } + + if value == PatternFlowSnmpv2CPDUErrorIndexChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowSnmpv2CPDUErrorIndexCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowSnmpv2CPDUErrorIndex) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowSnmpv2CPDUErrorIndexChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowSnmpv2CPDUErrorIndex) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowSnmpv2CPDUErrorIndex object +func (obj *patternFlowSnmpv2CPDUErrorIndex) SetValue(value uint32) PatternFlowSnmpv2CPDUErrorIndex { + obj.setChoice(PatternFlowSnmpv2CPDUErrorIndexChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowSnmpv2CPDUErrorIndex) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowSnmpv2CPDUErrorIndex object +func (obj *patternFlowSnmpv2CPDUErrorIndex) SetValues(value []uint32) PatternFlowSnmpv2CPDUErrorIndex { + obj.setChoice(PatternFlowSnmpv2CPDUErrorIndexChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CPDUErrorIndexCounter +func (obj *patternFlowSnmpv2CPDUErrorIndex) Increment() PatternFlowSnmpv2CPDUErrorIndexCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowSnmpv2CPDUErrorIndexChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowSnmpv2CPDUErrorIndexCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CPDUErrorIndexCounter +func (obj *patternFlowSnmpv2CPDUErrorIndex) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowSnmpv2CPDUErrorIndexCounter value in the PatternFlowSnmpv2CPDUErrorIndex object +func (obj *patternFlowSnmpv2CPDUErrorIndex) SetIncrement(value PatternFlowSnmpv2CPDUErrorIndexCounter) PatternFlowSnmpv2CPDUErrorIndex { + obj.setChoice(PatternFlowSnmpv2CPDUErrorIndexChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CPDUErrorIndexCounter +func (obj *patternFlowSnmpv2CPDUErrorIndex) Decrement() PatternFlowSnmpv2CPDUErrorIndexCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowSnmpv2CPDUErrorIndexChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowSnmpv2CPDUErrorIndexCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CPDUErrorIndexCounter +func (obj *patternFlowSnmpv2CPDUErrorIndex) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowSnmpv2CPDUErrorIndexCounter value in the PatternFlowSnmpv2CPDUErrorIndex object +func (obj *patternFlowSnmpv2CPDUErrorIndex) SetDecrement(value PatternFlowSnmpv2CPDUErrorIndexCounter) PatternFlowSnmpv2CPDUErrorIndex { + obj.setChoice(PatternFlowSnmpv2CPDUErrorIndexChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowSnmpv2CPDUErrorIndex) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowSnmpv2CPDUErrorIndex) setDefault() { + var choices_set int = 0 + var choice PatternFlowSnmpv2CPDUErrorIndexChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CPDUErrorIndexChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowSnmpv2CPDUErrorIndexChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CPDUErrorIndexChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CPDUErrorIndexChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowSnmpv2CPDUErrorIndexChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowSnmpv2CPDUErrorIndex") + } + } else { + intVal := otg.PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowSnmpv2CPDUErrorIndex_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_cpdu_error_index_counter.go b/gosnappi/pattern_flow_snmpv2_cpdu_error_index_counter.go new file mode 100644 index 00000000..753e9f1b --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_cpdu_error_index_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CPDUErrorIndexCounter ***** +type patternFlowSnmpv2CPDUErrorIndexCounter struct { + validation + obj *otg.PatternFlowSnmpv2CPDUErrorIndexCounter + marshaller marshalPatternFlowSnmpv2CPDUErrorIndexCounter + unMarshaller unMarshalPatternFlowSnmpv2CPDUErrorIndexCounter +} + +func NewPatternFlowSnmpv2CPDUErrorIndexCounter() PatternFlowSnmpv2CPDUErrorIndexCounter { + obj := patternFlowSnmpv2CPDUErrorIndexCounter{obj: &otg.PatternFlowSnmpv2CPDUErrorIndexCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) msg() *otg.PatternFlowSnmpv2CPDUErrorIndexCounter { + return obj.obj +} + +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) setMsg(msg *otg.PatternFlowSnmpv2CPDUErrorIndexCounter) PatternFlowSnmpv2CPDUErrorIndexCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CPDUErrorIndexCounter struct { + obj *patternFlowSnmpv2CPDUErrorIndexCounter +} + +type marshalPatternFlowSnmpv2CPDUErrorIndexCounter interface { + // ToProto marshals PatternFlowSnmpv2CPDUErrorIndexCounter to protobuf object *otg.PatternFlowSnmpv2CPDUErrorIndexCounter + ToProto() (*otg.PatternFlowSnmpv2CPDUErrorIndexCounter, error) + // ToPbText marshals PatternFlowSnmpv2CPDUErrorIndexCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CPDUErrorIndexCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CPDUErrorIndexCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CPDUErrorIndexCounter struct { + obj *patternFlowSnmpv2CPDUErrorIndexCounter +} + +type unMarshalPatternFlowSnmpv2CPDUErrorIndexCounter interface { + // FromProto unmarshals PatternFlowSnmpv2CPDUErrorIndexCounter from protobuf object *otg.PatternFlowSnmpv2CPDUErrorIndexCounter + FromProto(msg *otg.PatternFlowSnmpv2CPDUErrorIndexCounter) (PatternFlowSnmpv2CPDUErrorIndexCounter, error) + // FromPbText unmarshals PatternFlowSnmpv2CPDUErrorIndexCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CPDUErrorIndexCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CPDUErrorIndexCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) Marshal() marshalPatternFlowSnmpv2CPDUErrorIndexCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CPDUErrorIndexCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) Unmarshal() unMarshalPatternFlowSnmpv2CPDUErrorIndexCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CPDUErrorIndexCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CPDUErrorIndexCounter) ToProto() (*otg.PatternFlowSnmpv2CPDUErrorIndexCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDUErrorIndexCounter) FromProto(msg *otg.PatternFlowSnmpv2CPDUErrorIndexCounter) (PatternFlowSnmpv2CPDUErrorIndexCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CPDUErrorIndexCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDUErrorIndexCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CPDUErrorIndexCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDUErrorIndexCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CPDUErrorIndexCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDUErrorIndexCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) Clone() (PatternFlowSnmpv2CPDUErrorIndexCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CPDUErrorIndexCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowSnmpv2CPDUErrorIndexCounter is integer counter pattern +type PatternFlowSnmpv2CPDUErrorIndexCounter interface { + Validation + // msg marshals PatternFlowSnmpv2CPDUErrorIndexCounter to protobuf object *otg.PatternFlowSnmpv2CPDUErrorIndexCounter + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CPDUErrorIndexCounter + // setMsg unmarshals PatternFlowSnmpv2CPDUErrorIndexCounter from protobuf object *otg.PatternFlowSnmpv2CPDUErrorIndexCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CPDUErrorIndexCounter) PatternFlowSnmpv2CPDUErrorIndexCounter + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CPDUErrorIndexCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CPDUErrorIndexCounter + // validate validates PatternFlowSnmpv2CPDUErrorIndexCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CPDUErrorIndexCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowSnmpv2CPDUErrorIndexCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowSnmpv2CPDUErrorIndexCounter + SetStart(value uint32) PatternFlowSnmpv2CPDUErrorIndexCounter + // HasStart checks if Start has been set in PatternFlowSnmpv2CPDUErrorIndexCounter + HasStart() bool + // Step returns uint32, set in PatternFlowSnmpv2CPDUErrorIndexCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowSnmpv2CPDUErrorIndexCounter + SetStep(value uint32) PatternFlowSnmpv2CPDUErrorIndexCounter + // HasStep checks if Step has been set in PatternFlowSnmpv2CPDUErrorIndexCounter + HasStep() bool + // Count returns uint32, set in PatternFlowSnmpv2CPDUErrorIndexCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowSnmpv2CPDUErrorIndexCounter + SetCount(value uint32) PatternFlowSnmpv2CPDUErrorIndexCounter + // HasCount checks if Count has been set in PatternFlowSnmpv2CPDUErrorIndexCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowSnmpv2CPDUErrorIndexCounter object +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) SetStart(value uint32) PatternFlowSnmpv2CPDUErrorIndexCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowSnmpv2CPDUErrorIndexCounter object +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) SetStep(value uint32) PatternFlowSnmpv2CPDUErrorIndexCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowSnmpv2CPDUErrorIndexCounter object +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) SetCount(value uint32) PatternFlowSnmpv2CPDUErrorIndexCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowSnmpv2CPDUErrorIndexCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_cpdu_request_id.go b/gosnappi/pattern_flow_snmpv2_cpdu_request_id.go new file mode 100644 index 00000000..b59149a1 --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_cpdu_request_id.go @@ -0,0 +1,536 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CPDURequestId ***** +type patternFlowSnmpv2CPDURequestId struct { + validation + obj *otg.PatternFlowSnmpv2CPDURequestId + marshaller marshalPatternFlowSnmpv2CPDURequestId + unMarshaller unMarshalPatternFlowSnmpv2CPDURequestId + incrementHolder PatternFlowSnmpv2CPDURequestIdCounter + decrementHolder PatternFlowSnmpv2CPDURequestIdCounter +} + +func NewPatternFlowSnmpv2CPDURequestId() PatternFlowSnmpv2CPDURequestId { + obj := patternFlowSnmpv2CPDURequestId{obj: &otg.PatternFlowSnmpv2CPDURequestId{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CPDURequestId) msg() *otg.PatternFlowSnmpv2CPDURequestId { + return obj.obj +} + +func (obj *patternFlowSnmpv2CPDURequestId) setMsg(msg *otg.PatternFlowSnmpv2CPDURequestId) PatternFlowSnmpv2CPDURequestId { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CPDURequestId struct { + obj *patternFlowSnmpv2CPDURequestId +} + +type marshalPatternFlowSnmpv2CPDURequestId interface { + // ToProto marshals PatternFlowSnmpv2CPDURequestId to protobuf object *otg.PatternFlowSnmpv2CPDURequestId + ToProto() (*otg.PatternFlowSnmpv2CPDURequestId, error) + // ToPbText marshals PatternFlowSnmpv2CPDURequestId to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CPDURequestId to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CPDURequestId to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CPDURequestId struct { + obj *patternFlowSnmpv2CPDURequestId +} + +type unMarshalPatternFlowSnmpv2CPDURequestId interface { + // FromProto unmarshals PatternFlowSnmpv2CPDURequestId from protobuf object *otg.PatternFlowSnmpv2CPDURequestId + FromProto(msg *otg.PatternFlowSnmpv2CPDURequestId) (PatternFlowSnmpv2CPDURequestId, error) + // FromPbText unmarshals PatternFlowSnmpv2CPDURequestId from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CPDURequestId from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CPDURequestId from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CPDURequestId) Marshal() marshalPatternFlowSnmpv2CPDURequestId { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CPDURequestId{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CPDURequestId) Unmarshal() unMarshalPatternFlowSnmpv2CPDURequestId { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CPDURequestId{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CPDURequestId) ToProto() (*otg.PatternFlowSnmpv2CPDURequestId, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDURequestId) FromProto(msg *otg.PatternFlowSnmpv2CPDURequestId) (PatternFlowSnmpv2CPDURequestId, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CPDURequestId) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDURequestId) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CPDURequestId) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDURequestId) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CPDURequestId) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDURequestId) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CPDURequestId) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CPDURequestId) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CPDURequestId) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CPDURequestId) Clone() (PatternFlowSnmpv2CPDURequestId, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CPDURequestId() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowSnmpv2CPDURequestId) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowSnmpv2CPDURequestId is identifies a particular SNMP request. +// This index is echoed back in the response from the SNMP agent, +// allowing the SNMP manager to match an incoming response to the appropriate request. +// +// - Encoding of this field follows ASN.1 X.690(section 8.3) specification. +// Refer: http://www.itu.int/ITU-T/asn1 +type PatternFlowSnmpv2CPDURequestId interface { + Validation + // msg marshals PatternFlowSnmpv2CPDURequestId to protobuf object *otg.PatternFlowSnmpv2CPDURequestId + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CPDURequestId + // setMsg unmarshals PatternFlowSnmpv2CPDURequestId from protobuf object *otg.PatternFlowSnmpv2CPDURequestId + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CPDURequestId) PatternFlowSnmpv2CPDURequestId + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CPDURequestId + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CPDURequestId + // validate validates PatternFlowSnmpv2CPDURequestId + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CPDURequestId, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowSnmpv2CPDURequestIdChoiceEnum, set in PatternFlowSnmpv2CPDURequestId + Choice() PatternFlowSnmpv2CPDURequestIdChoiceEnum + // setChoice assigns PatternFlowSnmpv2CPDURequestIdChoiceEnum provided by user to PatternFlowSnmpv2CPDURequestId + setChoice(value PatternFlowSnmpv2CPDURequestIdChoiceEnum) PatternFlowSnmpv2CPDURequestId + // HasChoice checks if Choice has been set in PatternFlowSnmpv2CPDURequestId + HasChoice() bool + // Value returns int32, set in PatternFlowSnmpv2CPDURequestId. + Value() int32 + // SetValue assigns int32 provided by user to PatternFlowSnmpv2CPDURequestId + SetValue(value int32) PatternFlowSnmpv2CPDURequestId + // HasValue checks if Value has been set in PatternFlowSnmpv2CPDURequestId + HasValue() bool + // Values returns []int32, set in PatternFlowSnmpv2CPDURequestId. + Values() []int32 + // SetValues assigns []int32 provided by user to PatternFlowSnmpv2CPDURequestId + SetValues(value []int32) PatternFlowSnmpv2CPDURequestId + // Increment returns PatternFlowSnmpv2CPDURequestIdCounter, set in PatternFlowSnmpv2CPDURequestId. + Increment() PatternFlowSnmpv2CPDURequestIdCounter + // SetIncrement assigns PatternFlowSnmpv2CPDURequestIdCounter provided by user to PatternFlowSnmpv2CPDURequestId. + SetIncrement(value PatternFlowSnmpv2CPDURequestIdCounter) PatternFlowSnmpv2CPDURequestId + // HasIncrement checks if Increment has been set in PatternFlowSnmpv2CPDURequestId + HasIncrement() bool + // Decrement returns PatternFlowSnmpv2CPDURequestIdCounter, set in PatternFlowSnmpv2CPDURequestId. + Decrement() PatternFlowSnmpv2CPDURequestIdCounter + // SetDecrement assigns PatternFlowSnmpv2CPDURequestIdCounter provided by user to PatternFlowSnmpv2CPDURequestId. + SetDecrement(value PatternFlowSnmpv2CPDURequestIdCounter) PatternFlowSnmpv2CPDURequestId + // HasDecrement checks if Decrement has been set in PatternFlowSnmpv2CPDURequestId + HasDecrement() bool + setNil() +} + +type PatternFlowSnmpv2CPDURequestIdChoiceEnum string + +// Enum of Choice on PatternFlowSnmpv2CPDURequestId +var PatternFlowSnmpv2CPDURequestIdChoice = struct { + VALUE PatternFlowSnmpv2CPDURequestIdChoiceEnum + VALUES PatternFlowSnmpv2CPDURequestIdChoiceEnum + INCREMENT PatternFlowSnmpv2CPDURequestIdChoiceEnum + DECREMENT PatternFlowSnmpv2CPDURequestIdChoiceEnum +}{ + VALUE: PatternFlowSnmpv2CPDURequestIdChoiceEnum("value"), + VALUES: PatternFlowSnmpv2CPDURequestIdChoiceEnum("values"), + INCREMENT: PatternFlowSnmpv2CPDURequestIdChoiceEnum("increment"), + DECREMENT: PatternFlowSnmpv2CPDURequestIdChoiceEnum("decrement"), +} + +func (obj *patternFlowSnmpv2CPDURequestId) Choice() PatternFlowSnmpv2CPDURequestIdChoiceEnum { + return PatternFlowSnmpv2CPDURequestIdChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowSnmpv2CPDURequestId) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowSnmpv2CPDURequestId) setChoice(value PatternFlowSnmpv2CPDURequestIdChoiceEnum) PatternFlowSnmpv2CPDURequestId { + intValue, ok := otg.PatternFlowSnmpv2CPDURequestId_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowSnmpv2CPDURequestIdChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowSnmpv2CPDURequestId_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowSnmpv2CPDURequestIdChoice.VALUE { + defaultValue := int32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowSnmpv2CPDURequestIdChoice.VALUES { + defaultValue := []int32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowSnmpv2CPDURequestIdChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowSnmpv2CPDURequestIdCounter().msg() + } + + if value == PatternFlowSnmpv2CPDURequestIdChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowSnmpv2CPDURequestIdCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a int32 +func (obj *patternFlowSnmpv2CPDURequestId) Value() int32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowSnmpv2CPDURequestIdChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a int32 +func (obj *patternFlowSnmpv2CPDURequestId) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the int32 value in the PatternFlowSnmpv2CPDURequestId object +func (obj *patternFlowSnmpv2CPDURequestId) SetValue(value int32) PatternFlowSnmpv2CPDURequestId { + obj.setChoice(PatternFlowSnmpv2CPDURequestIdChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []int32 +func (obj *patternFlowSnmpv2CPDURequestId) Values() []int32 { + if obj.obj.Values == nil { + obj.SetValues([]int32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []int32 value in the PatternFlowSnmpv2CPDURequestId object +func (obj *patternFlowSnmpv2CPDURequestId) SetValues(value []int32) PatternFlowSnmpv2CPDURequestId { + obj.setChoice(PatternFlowSnmpv2CPDURequestIdChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]int32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CPDURequestIdCounter +func (obj *patternFlowSnmpv2CPDURequestId) Increment() PatternFlowSnmpv2CPDURequestIdCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowSnmpv2CPDURequestIdChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowSnmpv2CPDURequestIdCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowSnmpv2CPDURequestIdCounter +func (obj *patternFlowSnmpv2CPDURequestId) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowSnmpv2CPDURequestIdCounter value in the PatternFlowSnmpv2CPDURequestId object +func (obj *patternFlowSnmpv2CPDURequestId) SetIncrement(value PatternFlowSnmpv2CPDURequestIdCounter) PatternFlowSnmpv2CPDURequestId { + obj.setChoice(PatternFlowSnmpv2CPDURequestIdChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CPDURequestIdCounter +func (obj *patternFlowSnmpv2CPDURequestId) Decrement() PatternFlowSnmpv2CPDURequestIdCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowSnmpv2CPDURequestIdChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowSnmpv2CPDURequestIdCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowSnmpv2CPDURequestIdCounter +func (obj *patternFlowSnmpv2CPDURequestId) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowSnmpv2CPDURequestIdCounter value in the PatternFlowSnmpv2CPDURequestId object +func (obj *patternFlowSnmpv2CPDURequestId) SetDecrement(value PatternFlowSnmpv2CPDURequestIdCounter) PatternFlowSnmpv2CPDURequestId { + obj.setChoice(PatternFlowSnmpv2CPDURequestIdChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +func (obj *patternFlowSnmpv2CPDURequestId) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowSnmpv2CPDURequestId) setDefault() { + var choices_set int = 0 + var choice PatternFlowSnmpv2CPDURequestIdChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CPDURequestIdChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowSnmpv2CPDURequestIdChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CPDURequestIdChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowSnmpv2CPDURequestIdChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowSnmpv2CPDURequestIdChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowSnmpv2CPDURequestId") + } + } else { + intVal := otg.PatternFlowSnmpv2CPDURequestId_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowSnmpv2CPDURequestId_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_snmpv2_cpdu_request_id_counter.go b/gosnappi/pattern_flow_snmpv2_cpdu_request_id_counter.go new file mode 100644 index 00000000..2a49db1e --- /dev/null +++ b/gosnappi/pattern_flow_snmpv2_cpdu_request_id_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowSnmpv2CPDURequestIdCounter ***** +type patternFlowSnmpv2CPDURequestIdCounter struct { + validation + obj *otg.PatternFlowSnmpv2CPDURequestIdCounter + marshaller marshalPatternFlowSnmpv2CPDURequestIdCounter + unMarshaller unMarshalPatternFlowSnmpv2CPDURequestIdCounter +} + +func NewPatternFlowSnmpv2CPDURequestIdCounter() PatternFlowSnmpv2CPDURequestIdCounter { + obj := patternFlowSnmpv2CPDURequestIdCounter{obj: &otg.PatternFlowSnmpv2CPDURequestIdCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowSnmpv2CPDURequestIdCounter) msg() *otg.PatternFlowSnmpv2CPDURequestIdCounter { + return obj.obj +} + +func (obj *patternFlowSnmpv2CPDURequestIdCounter) setMsg(msg *otg.PatternFlowSnmpv2CPDURequestIdCounter) PatternFlowSnmpv2CPDURequestIdCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowSnmpv2CPDURequestIdCounter struct { + obj *patternFlowSnmpv2CPDURequestIdCounter +} + +type marshalPatternFlowSnmpv2CPDURequestIdCounter interface { + // ToProto marshals PatternFlowSnmpv2CPDURequestIdCounter to protobuf object *otg.PatternFlowSnmpv2CPDURequestIdCounter + ToProto() (*otg.PatternFlowSnmpv2CPDURequestIdCounter, error) + // ToPbText marshals PatternFlowSnmpv2CPDURequestIdCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowSnmpv2CPDURequestIdCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowSnmpv2CPDURequestIdCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowSnmpv2CPDURequestIdCounter struct { + obj *patternFlowSnmpv2CPDURequestIdCounter +} + +type unMarshalPatternFlowSnmpv2CPDURequestIdCounter interface { + // FromProto unmarshals PatternFlowSnmpv2CPDURequestIdCounter from protobuf object *otg.PatternFlowSnmpv2CPDURequestIdCounter + FromProto(msg *otg.PatternFlowSnmpv2CPDURequestIdCounter) (PatternFlowSnmpv2CPDURequestIdCounter, error) + // FromPbText unmarshals PatternFlowSnmpv2CPDURequestIdCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowSnmpv2CPDURequestIdCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowSnmpv2CPDURequestIdCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowSnmpv2CPDURequestIdCounter) Marshal() marshalPatternFlowSnmpv2CPDURequestIdCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowSnmpv2CPDURequestIdCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowSnmpv2CPDURequestIdCounter) Unmarshal() unMarshalPatternFlowSnmpv2CPDURequestIdCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowSnmpv2CPDURequestIdCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowSnmpv2CPDURequestIdCounter) ToProto() (*otg.PatternFlowSnmpv2CPDURequestIdCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDURequestIdCounter) FromProto(msg *otg.PatternFlowSnmpv2CPDURequestIdCounter) (PatternFlowSnmpv2CPDURequestIdCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowSnmpv2CPDURequestIdCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDURequestIdCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowSnmpv2CPDURequestIdCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDURequestIdCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowSnmpv2CPDURequestIdCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowSnmpv2CPDURequestIdCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowSnmpv2CPDURequestIdCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CPDURequestIdCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowSnmpv2CPDURequestIdCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowSnmpv2CPDURequestIdCounter) Clone() (PatternFlowSnmpv2CPDURequestIdCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowSnmpv2CPDURequestIdCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowSnmpv2CPDURequestIdCounter is integer counter pattern +type PatternFlowSnmpv2CPDURequestIdCounter interface { + Validation + // msg marshals PatternFlowSnmpv2CPDURequestIdCounter to protobuf object *otg.PatternFlowSnmpv2CPDURequestIdCounter + // and doesn't set defaults + msg() *otg.PatternFlowSnmpv2CPDURequestIdCounter + // setMsg unmarshals PatternFlowSnmpv2CPDURequestIdCounter from protobuf object *otg.PatternFlowSnmpv2CPDURequestIdCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowSnmpv2CPDURequestIdCounter) PatternFlowSnmpv2CPDURequestIdCounter + // provides marshal interface + Marshal() marshalPatternFlowSnmpv2CPDURequestIdCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowSnmpv2CPDURequestIdCounter + // validate validates PatternFlowSnmpv2CPDURequestIdCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowSnmpv2CPDURequestIdCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns int32, set in PatternFlowSnmpv2CPDURequestIdCounter. + Start() int32 + // SetStart assigns int32 provided by user to PatternFlowSnmpv2CPDURequestIdCounter + SetStart(value int32) PatternFlowSnmpv2CPDURequestIdCounter + // HasStart checks if Start has been set in PatternFlowSnmpv2CPDURequestIdCounter + HasStart() bool + // Step returns int32, set in PatternFlowSnmpv2CPDURequestIdCounter. + Step() int32 + // SetStep assigns int32 provided by user to PatternFlowSnmpv2CPDURequestIdCounter + SetStep(value int32) PatternFlowSnmpv2CPDURequestIdCounter + // HasStep checks if Step has been set in PatternFlowSnmpv2CPDURequestIdCounter + HasStep() bool + // Count returns int32, set in PatternFlowSnmpv2CPDURequestIdCounter. + Count() int32 + // SetCount assigns int32 provided by user to PatternFlowSnmpv2CPDURequestIdCounter + SetCount(value int32) PatternFlowSnmpv2CPDURequestIdCounter + // HasCount checks if Count has been set in PatternFlowSnmpv2CPDURequestIdCounter + HasCount() bool +} + +// description is TBD +// Start returns a int32 +func (obj *patternFlowSnmpv2CPDURequestIdCounter) Start() int32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a int32 +func (obj *patternFlowSnmpv2CPDURequestIdCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the int32 value in the PatternFlowSnmpv2CPDURequestIdCounter object +func (obj *patternFlowSnmpv2CPDURequestIdCounter) SetStart(value int32) PatternFlowSnmpv2CPDURequestIdCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a int32 +func (obj *patternFlowSnmpv2CPDURequestIdCounter) Step() int32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a int32 +func (obj *patternFlowSnmpv2CPDURequestIdCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the int32 value in the PatternFlowSnmpv2CPDURequestIdCounter object +func (obj *patternFlowSnmpv2CPDURequestIdCounter) SetStep(value int32) PatternFlowSnmpv2CPDURequestIdCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a int32 +func (obj *patternFlowSnmpv2CPDURequestIdCounter) Count() int32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a int32 +func (obj *patternFlowSnmpv2CPDURequestIdCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the int32 value in the PatternFlowSnmpv2CPDURequestIdCounter object +func (obj *patternFlowSnmpv2CPDURequestIdCounter) SetCount(value int32) PatternFlowSnmpv2CPDURequestIdCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowSnmpv2CPDURequestIdCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowSnmpv2CPDURequestIdCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ack_num.go b/gosnappi/pattern_flow_tcp_ack_num.go new file mode 100644 index 00000000..25fde4f2 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ack_num.go @@ -0,0 +1,640 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpAckNum ***** +type patternFlowTcpAckNum struct { + validation + obj *otg.PatternFlowTcpAckNum + marshaller marshalPatternFlowTcpAckNum + unMarshaller unMarshalPatternFlowTcpAckNum + incrementHolder PatternFlowTcpAckNumCounter + decrementHolder PatternFlowTcpAckNumCounter + metricTagsHolder PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter +} + +func NewPatternFlowTcpAckNum() PatternFlowTcpAckNum { + obj := patternFlowTcpAckNum{obj: &otg.PatternFlowTcpAckNum{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpAckNum) msg() *otg.PatternFlowTcpAckNum { + return obj.obj +} + +func (obj *patternFlowTcpAckNum) setMsg(msg *otg.PatternFlowTcpAckNum) PatternFlowTcpAckNum { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpAckNum struct { + obj *patternFlowTcpAckNum +} + +type marshalPatternFlowTcpAckNum interface { + // ToProto marshals PatternFlowTcpAckNum to protobuf object *otg.PatternFlowTcpAckNum + ToProto() (*otg.PatternFlowTcpAckNum, error) + // ToPbText marshals PatternFlowTcpAckNum to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpAckNum to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpAckNum to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpAckNum struct { + obj *patternFlowTcpAckNum +} + +type unMarshalPatternFlowTcpAckNum interface { + // FromProto unmarshals PatternFlowTcpAckNum from protobuf object *otg.PatternFlowTcpAckNum + FromProto(msg *otg.PatternFlowTcpAckNum) (PatternFlowTcpAckNum, error) + // FromPbText unmarshals PatternFlowTcpAckNum from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpAckNum from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpAckNum from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpAckNum) Marshal() marshalPatternFlowTcpAckNum { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpAckNum{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpAckNum) Unmarshal() unMarshalPatternFlowTcpAckNum { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpAckNum{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpAckNum) ToProto() (*otg.PatternFlowTcpAckNum, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpAckNum) FromProto(msg *otg.PatternFlowTcpAckNum) (PatternFlowTcpAckNum, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpAckNum) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpAckNum) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpAckNum) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpAckNum) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpAckNum) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpAckNum) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpAckNum) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpAckNum) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpAckNum) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpAckNum) Clone() (PatternFlowTcpAckNum, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpAckNum() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpAckNum) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpAckNum is acknowledgement number +type PatternFlowTcpAckNum interface { + Validation + // msg marshals PatternFlowTcpAckNum to protobuf object *otg.PatternFlowTcpAckNum + // and doesn't set defaults + msg() *otg.PatternFlowTcpAckNum + // setMsg unmarshals PatternFlowTcpAckNum from protobuf object *otg.PatternFlowTcpAckNum + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpAckNum) PatternFlowTcpAckNum + // provides marshal interface + Marshal() marshalPatternFlowTcpAckNum + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpAckNum + // validate validates PatternFlowTcpAckNum + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpAckNum, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpAckNumChoiceEnum, set in PatternFlowTcpAckNum + Choice() PatternFlowTcpAckNumChoiceEnum + // setChoice assigns PatternFlowTcpAckNumChoiceEnum provided by user to PatternFlowTcpAckNum + setChoice(value PatternFlowTcpAckNumChoiceEnum) PatternFlowTcpAckNum + // HasChoice checks if Choice has been set in PatternFlowTcpAckNum + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpAckNum. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpAckNum + SetValue(value uint32) PatternFlowTcpAckNum + // HasValue checks if Value has been set in PatternFlowTcpAckNum + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpAckNum. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpAckNum + SetValues(value []uint32) PatternFlowTcpAckNum + // Increment returns PatternFlowTcpAckNumCounter, set in PatternFlowTcpAckNum. + // PatternFlowTcpAckNumCounter is integer counter pattern + Increment() PatternFlowTcpAckNumCounter + // SetIncrement assigns PatternFlowTcpAckNumCounter provided by user to PatternFlowTcpAckNum. + // PatternFlowTcpAckNumCounter is integer counter pattern + SetIncrement(value PatternFlowTcpAckNumCounter) PatternFlowTcpAckNum + // HasIncrement checks if Increment has been set in PatternFlowTcpAckNum + HasIncrement() bool + // Decrement returns PatternFlowTcpAckNumCounter, set in PatternFlowTcpAckNum. + // PatternFlowTcpAckNumCounter is integer counter pattern + Decrement() PatternFlowTcpAckNumCounter + // SetDecrement assigns PatternFlowTcpAckNumCounter provided by user to PatternFlowTcpAckNum. + // PatternFlowTcpAckNumCounter is integer counter pattern + SetDecrement(value PatternFlowTcpAckNumCounter) PatternFlowTcpAckNum + // HasDecrement checks if Decrement has been set in PatternFlowTcpAckNum + HasDecrement() bool + // MetricTags returns PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIterIter, set in PatternFlowTcpAckNum + MetricTags() PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter + setNil() +} + +type PatternFlowTcpAckNumChoiceEnum string + +// Enum of Choice on PatternFlowTcpAckNum +var PatternFlowTcpAckNumChoice = struct { + VALUE PatternFlowTcpAckNumChoiceEnum + VALUES PatternFlowTcpAckNumChoiceEnum + INCREMENT PatternFlowTcpAckNumChoiceEnum + DECREMENT PatternFlowTcpAckNumChoiceEnum +}{ + VALUE: PatternFlowTcpAckNumChoiceEnum("value"), + VALUES: PatternFlowTcpAckNumChoiceEnum("values"), + INCREMENT: PatternFlowTcpAckNumChoiceEnum("increment"), + DECREMENT: PatternFlowTcpAckNumChoiceEnum("decrement"), +} + +func (obj *patternFlowTcpAckNum) Choice() PatternFlowTcpAckNumChoiceEnum { + return PatternFlowTcpAckNumChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpAckNum) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpAckNum) setChoice(value PatternFlowTcpAckNumChoiceEnum) PatternFlowTcpAckNum { + intValue, ok := otg.PatternFlowTcpAckNum_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpAckNumChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpAckNum_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpAckNumChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpAckNumChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpAckNumChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpAckNumCounter().msg() + } + + if value == PatternFlowTcpAckNumChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpAckNumCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpAckNum) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpAckNumChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpAckNum) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpAckNum object +func (obj *patternFlowTcpAckNum) SetValue(value uint32) PatternFlowTcpAckNum { + obj.setChoice(PatternFlowTcpAckNumChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpAckNum) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpAckNum object +func (obj *patternFlowTcpAckNum) SetValues(value []uint32) PatternFlowTcpAckNum { + obj.setChoice(PatternFlowTcpAckNumChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpAckNumCounter +func (obj *patternFlowTcpAckNum) Increment() PatternFlowTcpAckNumCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpAckNumChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpAckNumCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpAckNumCounter +func (obj *patternFlowTcpAckNum) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpAckNumCounter value in the PatternFlowTcpAckNum object +func (obj *patternFlowTcpAckNum) SetIncrement(value PatternFlowTcpAckNumCounter) PatternFlowTcpAckNum { + obj.setChoice(PatternFlowTcpAckNumChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpAckNumCounter +func (obj *patternFlowTcpAckNum) Decrement() PatternFlowTcpAckNumCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpAckNumChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpAckNumCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpAckNumCounter +func (obj *patternFlowTcpAckNum) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpAckNumCounter value in the PatternFlowTcpAckNum object +func (obj *patternFlowTcpAckNum) SetDecrement(value PatternFlowTcpAckNumCounter) PatternFlowTcpAckNum { + obj.setChoice(PatternFlowTcpAckNumChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpAckNumMetricTag +func (obj *patternFlowTcpAckNum) MetricTags() PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpAckNumMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter struct { + obj *patternFlowTcpAckNum + patternFlowTcpAckNumMetricTagSlice []PatternFlowTcpAckNumMetricTag + fieldPtr *[]*otg.PatternFlowTcpAckNumMetricTag +} + +func newPatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter(ptr *[]*otg.PatternFlowTcpAckNumMetricTag) PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter { + return &patternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter interface { + setMsg(*patternFlowTcpAckNum) PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter + Items() []PatternFlowTcpAckNumMetricTag + Add() PatternFlowTcpAckNumMetricTag + Append(items ...PatternFlowTcpAckNumMetricTag) PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter + Set(index int, newObj PatternFlowTcpAckNumMetricTag) PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter + Clear() PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter + clearHolderSlice() PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter + appendHolderSlice(item PatternFlowTcpAckNumMetricTag) PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter +} + +func (obj *patternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter) setMsg(msg *patternFlowTcpAckNum) PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpAckNumMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter) Items() []PatternFlowTcpAckNumMetricTag { + return obj.patternFlowTcpAckNumMetricTagSlice +} + +func (obj *patternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter) Add() PatternFlowTcpAckNumMetricTag { + newObj := &otg.PatternFlowTcpAckNumMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpAckNumMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpAckNumMetricTagSlice = append(obj.patternFlowTcpAckNumMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter) Append(items ...PatternFlowTcpAckNumMetricTag) PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpAckNumMetricTagSlice = append(obj.patternFlowTcpAckNumMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter) Set(index int, newObj PatternFlowTcpAckNumMetricTag) PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpAckNumMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter) Clear() PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpAckNumMetricTag{} + obj.patternFlowTcpAckNumMetricTagSlice = []PatternFlowTcpAckNumMetricTag{} + } + return obj +} +func (obj *patternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter) clearHolderSlice() PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter { + if len(obj.patternFlowTcpAckNumMetricTagSlice) > 0 { + obj.patternFlowTcpAckNumMetricTagSlice = []PatternFlowTcpAckNumMetricTag{} + } + return obj +} +func (obj *patternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter) appendHolderSlice(item PatternFlowTcpAckNumMetricTag) PatternFlowTcpAckNumPatternFlowTcpAckNumMetricTagIter { + obj.patternFlowTcpAckNumMetricTagSlice = append(obj.patternFlowTcpAckNumMetricTagSlice, item) + return obj +} + +func (obj *patternFlowTcpAckNum) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpAckNumMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowTcpAckNum) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpAckNumChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpAckNumChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpAckNumChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpAckNumChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpAckNumChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpAckNumChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpAckNum") + } + } else { + intVal := otg.PatternFlowTcpAckNum_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpAckNum_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_ack_num_counter.go b/gosnappi/pattern_flow_tcp_ack_num_counter.go new file mode 100644 index 00000000..ec8ec19a --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ack_num_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpAckNumCounter ***** +type patternFlowTcpAckNumCounter struct { + validation + obj *otg.PatternFlowTcpAckNumCounter + marshaller marshalPatternFlowTcpAckNumCounter + unMarshaller unMarshalPatternFlowTcpAckNumCounter +} + +func NewPatternFlowTcpAckNumCounter() PatternFlowTcpAckNumCounter { + obj := patternFlowTcpAckNumCounter{obj: &otg.PatternFlowTcpAckNumCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpAckNumCounter) msg() *otg.PatternFlowTcpAckNumCounter { + return obj.obj +} + +func (obj *patternFlowTcpAckNumCounter) setMsg(msg *otg.PatternFlowTcpAckNumCounter) PatternFlowTcpAckNumCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpAckNumCounter struct { + obj *patternFlowTcpAckNumCounter +} + +type marshalPatternFlowTcpAckNumCounter interface { + // ToProto marshals PatternFlowTcpAckNumCounter to protobuf object *otg.PatternFlowTcpAckNumCounter + ToProto() (*otg.PatternFlowTcpAckNumCounter, error) + // ToPbText marshals PatternFlowTcpAckNumCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpAckNumCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpAckNumCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpAckNumCounter struct { + obj *patternFlowTcpAckNumCounter +} + +type unMarshalPatternFlowTcpAckNumCounter interface { + // FromProto unmarshals PatternFlowTcpAckNumCounter from protobuf object *otg.PatternFlowTcpAckNumCounter + FromProto(msg *otg.PatternFlowTcpAckNumCounter) (PatternFlowTcpAckNumCounter, error) + // FromPbText unmarshals PatternFlowTcpAckNumCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpAckNumCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpAckNumCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpAckNumCounter) Marshal() marshalPatternFlowTcpAckNumCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpAckNumCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpAckNumCounter) Unmarshal() unMarshalPatternFlowTcpAckNumCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpAckNumCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpAckNumCounter) ToProto() (*otg.PatternFlowTcpAckNumCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpAckNumCounter) FromProto(msg *otg.PatternFlowTcpAckNumCounter) (PatternFlowTcpAckNumCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpAckNumCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpAckNumCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpAckNumCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpAckNumCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpAckNumCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpAckNumCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpAckNumCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpAckNumCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpAckNumCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpAckNumCounter) Clone() (PatternFlowTcpAckNumCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpAckNumCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpAckNumCounter is integer counter pattern +type PatternFlowTcpAckNumCounter interface { + Validation + // msg marshals PatternFlowTcpAckNumCounter to protobuf object *otg.PatternFlowTcpAckNumCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpAckNumCounter + // setMsg unmarshals PatternFlowTcpAckNumCounter from protobuf object *otg.PatternFlowTcpAckNumCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpAckNumCounter) PatternFlowTcpAckNumCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpAckNumCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpAckNumCounter + // validate validates PatternFlowTcpAckNumCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpAckNumCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpAckNumCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpAckNumCounter + SetStart(value uint32) PatternFlowTcpAckNumCounter + // HasStart checks if Start has been set in PatternFlowTcpAckNumCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpAckNumCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpAckNumCounter + SetStep(value uint32) PatternFlowTcpAckNumCounter + // HasStep checks if Step has been set in PatternFlowTcpAckNumCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpAckNumCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpAckNumCounter + SetCount(value uint32) PatternFlowTcpAckNumCounter + // HasCount checks if Count has been set in PatternFlowTcpAckNumCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpAckNumCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpAckNumCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpAckNumCounter object +func (obj *patternFlowTcpAckNumCounter) SetStart(value uint32) PatternFlowTcpAckNumCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpAckNumCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpAckNumCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpAckNumCounter object +func (obj *patternFlowTcpAckNumCounter) SetStep(value uint32) PatternFlowTcpAckNumCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpAckNumCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpAckNumCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpAckNumCounter object +func (obj *patternFlowTcpAckNumCounter) SetCount(value uint32) PatternFlowTcpAckNumCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpAckNumCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowTcpAckNumCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ack_num_metric_tag.go b/gosnappi/pattern_flow_tcp_ack_num_metric_tag.go new file mode 100644 index 00000000..b7dc562d --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ack_num_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpAckNumMetricTag ***** +type patternFlowTcpAckNumMetricTag struct { + validation + obj *otg.PatternFlowTcpAckNumMetricTag + marshaller marshalPatternFlowTcpAckNumMetricTag + unMarshaller unMarshalPatternFlowTcpAckNumMetricTag +} + +func NewPatternFlowTcpAckNumMetricTag() PatternFlowTcpAckNumMetricTag { + obj := patternFlowTcpAckNumMetricTag{obj: &otg.PatternFlowTcpAckNumMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpAckNumMetricTag) msg() *otg.PatternFlowTcpAckNumMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpAckNumMetricTag) setMsg(msg *otg.PatternFlowTcpAckNumMetricTag) PatternFlowTcpAckNumMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpAckNumMetricTag struct { + obj *patternFlowTcpAckNumMetricTag +} + +type marshalPatternFlowTcpAckNumMetricTag interface { + // ToProto marshals PatternFlowTcpAckNumMetricTag to protobuf object *otg.PatternFlowTcpAckNumMetricTag + ToProto() (*otg.PatternFlowTcpAckNumMetricTag, error) + // ToPbText marshals PatternFlowTcpAckNumMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpAckNumMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpAckNumMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpAckNumMetricTag struct { + obj *patternFlowTcpAckNumMetricTag +} + +type unMarshalPatternFlowTcpAckNumMetricTag interface { + // FromProto unmarshals PatternFlowTcpAckNumMetricTag from protobuf object *otg.PatternFlowTcpAckNumMetricTag + FromProto(msg *otg.PatternFlowTcpAckNumMetricTag) (PatternFlowTcpAckNumMetricTag, error) + // FromPbText unmarshals PatternFlowTcpAckNumMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpAckNumMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpAckNumMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpAckNumMetricTag) Marshal() marshalPatternFlowTcpAckNumMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpAckNumMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpAckNumMetricTag) Unmarshal() unMarshalPatternFlowTcpAckNumMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpAckNumMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpAckNumMetricTag) ToProto() (*otg.PatternFlowTcpAckNumMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpAckNumMetricTag) FromProto(msg *otg.PatternFlowTcpAckNumMetricTag) (PatternFlowTcpAckNumMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpAckNumMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpAckNumMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpAckNumMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpAckNumMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpAckNumMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpAckNumMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpAckNumMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpAckNumMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpAckNumMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpAckNumMetricTag) Clone() (PatternFlowTcpAckNumMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpAckNumMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpAckNumMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpAckNumMetricTag interface { + Validation + // msg marshals PatternFlowTcpAckNumMetricTag to protobuf object *otg.PatternFlowTcpAckNumMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpAckNumMetricTag + // setMsg unmarshals PatternFlowTcpAckNumMetricTag from protobuf object *otg.PatternFlowTcpAckNumMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpAckNumMetricTag) PatternFlowTcpAckNumMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpAckNumMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpAckNumMetricTag + // validate validates PatternFlowTcpAckNumMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpAckNumMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpAckNumMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpAckNumMetricTag + SetName(value string) PatternFlowTcpAckNumMetricTag + // Offset returns uint32, set in PatternFlowTcpAckNumMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpAckNumMetricTag + SetOffset(value uint32) PatternFlowTcpAckNumMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpAckNumMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpAckNumMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpAckNumMetricTag + SetLength(value uint32) PatternFlowTcpAckNumMetricTag + // HasLength checks if Length has been set in PatternFlowTcpAckNumMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpAckNumMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpAckNumMetricTag object +func (obj *patternFlowTcpAckNumMetricTag) SetName(value string) PatternFlowTcpAckNumMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpAckNumMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpAckNumMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpAckNumMetricTag object +func (obj *patternFlowTcpAckNumMetricTag) SetOffset(value uint32) PatternFlowTcpAckNumMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpAckNumMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpAckNumMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpAckNumMetricTag object +func (obj *patternFlowTcpAckNumMetricTag) SetLength(value uint32) PatternFlowTcpAckNumMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpAckNumMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpAckNumMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpAckNumMetricTag.Offset <= 31 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpAckNumMetricTag.Length <= 32 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpAckNumMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(32) + } + +} diff --git a/gosnappi/pattern_flow_tcp_checksum.go b/gosnappi/pattern_flow_tcp_checksum.go new file mode 100644 index 00000000..293db4db --- /dev/null +++ b/gosnappi/pattern_flow_tcp_checksum.go @@ -0,0 +1,434 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpChecksum ***** +type patternFlowTcpChecksum struct { + validation + obj *otg.PatternFlowTcpChecksum + marshaller marshalPatternFlowTcpChecksum + unMarshaller unMarshalPatternFlowTcpChecksum +} + +func NewPatternFlowTcpChecksum() PatternFlowTcpChecksum { + obj := patternFlowTcpChecksum{obj: &otg.PatternFlowTcpChecksum{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpChecksum) msg() *otg.PatternFlowTcpChecksum { + return obj.obj +} + +func (obj *patternFlowTcpChecksum) setMsg(msg *otg.PatternFlowTcpChecksum) PatternFlowTcpChecksum { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpChecksum struct { + obj *patternFlowTcpChecksum +} + +type marshalPatternFlowTcpChecksum interface { + // ToProto marshals PatternFlowTcpChecksum to protobuf object *otg.PatternFlowTcpChecksum + ToProto() (*otg.PatternFlowTcpChecksum, error) + // ToPbText marshals PatternFlowTcpChecksum to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpChecksum to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpChecksum to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpChecksum struct { + obj *patternFlowTcpChecksum +} + +type unMarshalPatternFlowTcpChecksum interface { + // FromProto unmarshals PatternFlowTcpChecksum from protobuf object *otg.PatternFlowTcpChecksum + FromProto(msg *otg.PatternFlowTcpChecksum) (PatternFlowTcpChecksum, error) + // FromPbText unmarshals PatternFlowTcpChecksum from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpChecksum from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpChecksum from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpChecksum) Marshal() marshalPatternFlowTcpChecksum { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpChecksum{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpChecksum) Unmarshal() unMarshalPatternFlowTcpChecksum { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpChecksum{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpChecksum) ToProto() (*otg.PatternFlowTcpChecksum, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpChecksum) FromProto(msg *otg.PatternFlowTcpChecksum) (PatternFlowTcpChecksum, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpChecksum) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpChecksum) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpChecksum) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpChecksum) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpChecksum) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpChecksum) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpChecksum) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpChecksum) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpChecksum) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpChecksum) Clone() (PatternFlowTcpChecksum, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpChecksum() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpChecksum is the one's complement of the one's complement sum of all 16 bit words in header and text. An all-zero value means that no checksum will be transmitted. While computing the checksum, the checksum field itself is replaced with zeros. +type PatternFlowTcpChecksum interface { + Validation + // msg marshals PatternFlowTcpChecksum to protobuf object *otg.PatternFlowTcpChecksum + // and doesn't set defaults + msg() *otg.PatternFlowTcpChecksum + // setMsg unmarshals PatternFlowTcpChecksum from protobuf object *otg.PatternFlowTcpChecksum + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpChecksum) PatternFlowTcpChecksum + // provides marshal interface + Marshal() marshalPatternFlowTcpChecksum + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpChecksum + // validate validates PatternFlowTcpChecksum + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpChecksum, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpChecksumChoiceEnum, set in PatternFlowTcpChecksum + Choice() PatternFlowTcpChecksumChoiceEnum + // setChoice assigns PatternFlowTcpChecksumChoiceEnum provided by user to PatternFlowTcpChecksum + setChoice(value PatternFlowTcpChecksumChoiceEnum) PatternFlowTcpChecksum + // HasChoice checks if Choice has been set in PatternFlowTcpChecksum + HasChoice() bool + // Generated returns PatternFlowTcpChecksumGeneratedEnum, set in PatternFlowTcpChecksum + Generated() PatternFlowTcpChecksumGeneratedEnum + // SetGenerated assigns PatternFlowTcpChecksumGeneratedEnum provided by user to PatternFlowTcpChecksum + SetGenerated(value PatternFlowTcpChecksumGeneratedEnum) PatternFlowTcpChecksum + // HasGenerated checks if Generated has been set in PatternFlowTcpChecksum + HasGenerated() bool + // Custom returns uint32, set in PatternFlowTcpChecksum. + Custom() uint32 + // SetCustom assigns uint32 provided by user to PatternFlowTcpChecksum + SetCustom(value uint32) PatternFlowTcpChecksum + // HasCustom checks if Custom has been set in PatternFlowTcpChecksum + HasCustom() bool +} + +type PatternFlowTcpChecksumChoiceEnum string + +// Enum of Choice on PatternFlowTcpChecksum +var PatternFlowTcpChecksumChoice = struct { + GENERATED PatternFlowTcpChecksumChoiceEnum + CUSTOM PatternFlowTcpChecksumChoiceEnum +}{ + GENERATED: PatternFlowTcpChecksumChoiceEnum("generated"), + CUSTOM: PatternFlowTcpChecksumChoiceEnum("custom"), +} + +func (obj *patternFlowTcpChecksum) Choice() PatternFlowTcpChecksumChoiceEnum { + return PatternFlowTcpChecksumChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The type of checksum +// Choice returns a string +func (obj *patternFlowTcpChecksum) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpChecksum) setChoice(value PatternFlowTcpChecksumChoiceEnum) PatternFlowTcpChecksum { + intValue, ok := otg.PatternFlowTcpChecksum_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpChecksumChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpChecksum_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.obj.Generated = otg.PatternFlowTcpChecksum_Generated_unspecified.Enum() + return obj +} + +type PatternFlowTcpChecksumGeneratedEnum string + +// Enum of Generated on PatternFlowTcpChecksum +var PatternFlowTcpChecksumGenerated = struct { + GOOD PatternFlowTcpChecksumGeneratedEnum + BAD PatternFlowTcpChecksumGeneratedEnum +}{ + GOOD: PatternFlowTcpChecksumGeneratedEnum("good"), + BAD: PatternFlowTcpChecksumGeneratedEnum("bad"), +} + +func (obj *patternFlowTcpChecksum) Generated() PatternFlowTcpChecksumGeneratedEnum { + return PatternFlowTcpChecksumGeneratedEnum(obj.obj.Generated.Enum().String()) +} + +// A system generated checksum value +// Generated returns a string +func (obj *patternFlowTcpChecksum) HasGenerated() bool { + return obj.obj.Generated != nil +} + +func (obj *patternFlowTcpChecksum) SetGenerated(value PatternFlowTcpChecksumGeneratedEnum) PatternFlowTcpChecksum { + intValue, ok := otg.PatternFlowTcpChecksum_Generated_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpChecksumGeneratedEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpChecksum_Generated_Enum(intValue) + obj.obj.Generated = &enumValue + + return obj +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowTcpChecksum) Custom() uint32 { + + if obj.obj.Custom == nil { + obj.setChoice(PatternFlowTcpChecksumChoice.CUSTOM) + } + + return *obj.obj.Custom + +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowTcpChecksum) HasCustom() bool { + return obj.obj.Custom != nil +} + +// A custom checksum value +// SetCustom sets the uint32 value in the PatternFlowTcpChecksum object +func (obj *patternFlowTcpChecksum) SetCustom(value uint32) PatternFlowTcpChecksum { + obj.setChoice(PatternFlowTcpChecksumChoice.CUSTOM) + obj.obj.Custom = &value + return obj +} + +func (obj *patternFlowTcpChecksum) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Custom != nil { + + if *obj.obj.Custom > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpChecksum.Custom <= 65535 but Got %d", *obj.obj.Custom)) + } + + } + +} + +func (obj *patternFlowTcpChecksum) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpChecksumChoiceEnum + + if obj.obj.Generated != nil && obj.obj.Generated.Number() != 0 { + choices_set += 1 + choice = PatternFlowTcpChecksumChoice.GENERATED + } + + if obj.obj.Custom != nil { + choices_set += 1 + choice = PatternFlowTcpChecksumChoice.CUSTOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpChecksumChoice.GENERATED) + if obj.obj.Generated.Number() == 0 { + obj.SetGenerated(PatternFlowTcpChecksumGenerated.GOOD) + + } + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpChecksum") + } + } else { + intVal := otg.PatternFlowTcpChecksum_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpChecksum_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_ack.go b/gosnappi/pattern_flow_tcp_ctl_ack.go new file mode 100644 index 00000000..a880b381 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_ack.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlAck ***** +type patternFlowTcpCtlAck struct { + validation + obj *otg.PatternFlowTcpCtlAck + marshaller marshalPatternFlowTcpCtlAck + unMarshaller unMarshalPatternFlowTcpCtlAck + incrementHolder PatternFlowTcpCtlAckCounter + decrementHolder PatternFlowTcpCtlAckCounter + metricTagsHolder PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter +} + +func NewPatternFlowTcpCtlAck() PatternFlowTcpCtlAck { + obj := patternFlowTcpCtlAck{obj: &otg.PatternFlowTcpCtlAck{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlAck) msg() *otg.PatternFlowTcpCtlAck { + return obj.obj +} + +func (obj *patternFlowTcpCtlAck) setMsg(msg *otg.PatternFlowTcpCtlAck) PatternFlowTcpCtlAck { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlAck struct { + obj *patternFlowTcpCtlAck +} + +type marshalPatternFlowTcpCtlAck interface { + // ToProto marshals PatternFlowTcpCtlAck to protobuf object *otg.PatternFlowTcpCtlAck + ToProto() (*otg.PatternFlowTcpCtlAck, error) + // ToPbText marshals PatternFlowTcpCtlAck to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlAck to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlAck to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlAck struct { + obj *patternFlowTcpCtlAck +} + +type unMarshalPatternFlowTcpCtlAck interface { + // FromProto unmarshals PatternFlowTcpCtlAck from protobuf object *otg.PatternFlowTcpCtlAck + FromProto(msg *otg.PatternFlowTcpCtlAck) (PatternFlowTcpCtlAck, error) + // FromPbText unmarshals PatternFlowTcpCtlAck from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlAck from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlAck from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlAck) Marshal() marshalPatternFlowTcpCtlAck { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlAck{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlAck) Unmarshal() unMarshalPatternFlowTcpCtlAck { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlAck{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlAck) ToProto() (*otg.PatternFlowTcpCtlAck, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlAck) FromProto(msg *otg.PatternFlowTcpCtlAck) (PatternFlowTcpCtlAck, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlAck) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlAck) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlAck) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlAck) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlAck) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlAck) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlAck) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlAck) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlAck) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlAck) Clone() (PatternFlowTcpCtlAck, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlAck() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpCtlAck) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpCtlAck is a value of 1 indicates that the ackknowledgment field is significant. +type PatternFlowTcpCtlAck interface { + Validation + // msg marshals PatternFlowTcpCtlAck to protobuf object *otg.PatternFlowTcpCtlAck + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlAck + // setMsg unmarshals PatternFlowTcpCtlAck from protobuf object *otg.PatternFlowTcpCtlAck + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlAck) PatternFlowTcpCtlAck + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlAck + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlAck + // validate validates PatternFlowTcpCtlAck + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlAck, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpCtlAckChoiceEnum, set in PatternFlowTcpCtlAck + Choice() PatternFlowTcpCtlAckChoiceEnum + // setChoice assigns PatternFlowTcpCtlAckChoiceEnum provided by user to PatternFlowTcpCtlAck + setChoice(value PatternFlowTcpCtlAckChoiceEnum) PatternFlowTcpCtlAck + // HasChoice checks if Choice has been set in PatternFlowTcpCtlAck + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpCtlAck. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpCtlAck + SetValue(value uint32) PatternFlowTcpCtlAck + // HasValue checks if Value has been set in PatternFlowTcpCtlAck + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpCtlAck. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpCtlAck + SetValues(value []uint32) PatternFlowTcpCtlAck + // Increment returns PatternFlowTcpCtlAckCounter, set in PatternFlowTcpCtlAck. + // PatternFlowTcpCtlAckCounter is integer counter pattern + Increment() PatternFlowTcpCtlAckCounter + // SetIncrement assigns PatternFlowTcpCtlAckCounter provided by user to PatternFlowTcpCtlAck. + // PatternFlowTcpCtlAckCounter is integer counter pattern + SetIncrement(value PatternFlowTcpCtlAckCounter) PatternFlowTcpCtlAck + // HasIncrement checks if Increment has been set in PatternFlowTcpCtlAck + HasIncrement() bool + // Decrement returns PatternFlowTcpCtlAckCounter, set in PatternFlowTcpCtlAck. + // PatternFlowTcpCtlAckCounter is integer counter pattern + Decrement() PatternFlowTcpCtlAckCounter + // SetDecrement assigns PatternFlowTcpCtlAckCounter provided by user to PatternFlowTcpCtlAck. + // PatternFlowTcpCtlAckCounter is integer counter pattern + SetDecrement(value PatternFlowTcpCtlAckCounter) PatternFlowTcpCtlAck + // HasDecrement checks if Decrement has been set in PatternFlowTcpCtlAck + HasDecrement() bool + // MetricTags returns PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIterIter, set in PatternFlowTcpCtlAck + MetricTags() PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter + setNil() +} + +type PatternFlowTcpCtlAckChoiceEnum string + +// Enum of Choice on PatternFlowTcpCtlAck +var PatternFlowTcpCtlAckChoice = struct { + VALUE PatternFlowTcpCtlAckChoiceEnum + VALUES PatternFlowTcpCtlAckChoiceEnum + INCREMENT PatternFlowTcpCtlAckChoiceEnum + DECREMENT PatternFlowTcpCtlAckChoiceEnum +}{ + VALUE: PatternFlowTcpCtlAckChoiceEnum("value"), + VALUES: PatternFlowTcpCtlAckChoiceEnum("values"), + INCREMENT: PatternFlowTcpCtlAckChoiceEnum("increment"), + DECREMENT: PatternFlowTcpCtlAckChoiceEnum("decrement"), +} + +func (obj *patternFlowTcpCtlAck) Choice() PatternFlowTcpCtlAckChoiceEnum { + return PatternFlowTcpCtlAckChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpCtlAck) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpCtlAck) setChoice(value PatternFlowTcpCtlAckChoiceEnum) PatternFlowTcpCtlAck { + intValue, ok := otg.PatternFlowTcpCtlAck_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpCtlAckChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpCtlAck_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpCtlAckChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpCtlAckChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpCtlAckChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpCtlAckCounter().msg() + } + + if value == PatternFlowTcpCtlAckChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpCtlAckCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpCtlAck) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpCtlAckChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpCtlAck) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpCtlAck object +func (obj *patternFlowTcpCtlAck) SetValue(value uint32) PatternFlowTcpCtlAck { + obj.setChoice(PatternFlowTcpCtlAckChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpCtlAck) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpCtlAck object +func (obj *patternFlowTcpCtlAck) SetValues(value []uint32) PatternFlowTcpCtlAck { + obj.setChoice(PatternFlowTcpCtlAckChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpCtlAckCounter +func (obj *patternFlowTcpCtlAck) Increment() PatternFlowTcpCtlAckCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpCtlAckChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpCtlAckCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpCtlAckCounter +func (obj *patternFlowTcpCtlAck) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpCtlAckCounter value in the PatternFlowTcpCtlAck object +func (obj *patternFlowTcpCtlAck) SetIncrement(value PatternFlowTcpCtlAckCounter) PatternFlowTcpCtlAck { + obj.setChoice(PatternFlowTcpCtlAckChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpCtlAckCounter +func (obj *patternFlowTcpCtlAck) Decrement() PatternFlowTcpCtlAckCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpCtlAckChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpCtlAckCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpCtlAckCounter +func (obj *patternFlowTcpCtlAck) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpCtlAckCounter value in the PatternFlowTcpCtlAck object +func (obj *patternFlowTcpCtlAck) SetDecrement(value PatternFlowTcpCtlAckCounter) PatternFlowTcpCtlAck { + obj.setChoice(PatternFlowTcpCtlAckChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpCtlAckMetricTag +func (obj *patternFlowTcpCtlAck) MetricTags() PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpCtlAckMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter struct { + obj *patternFlowTcpCtlAck + patternFlowTcpCtlAckMetricTagSlice []PatternFlowTcpCtlAckMetricTag + fieldPtr *[]*otg.PatternFlowTcpCtlAckMetricTag +} + +func newPatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter(ptr *[]*otg.PatternFlowTcpCtlAckMetricTag) PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter { + return &patternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter interface { + setMsg(*patternFlowTcpCtlAck) PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter + Items() []PatternFlowTcpCtlAckMetricTag + Add() PatternFlowTcpCtlAckMetricTag + Append(items ...PatternFlowTcpCtlAckMetricTag) PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter + Set(index int, newObj PatternFlowTcpCtlAckMetricTag) PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter + Clear() PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter + clearHolderSlice() PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter + appendHolderSlice(item PatternFlowTcpCtlAckMetricTag) PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter +} + +func (obj *patternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter) setMsg(msg *patternFlowTcpCtlAck) PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpCtlAckMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter) Items() []PatternFlowTcpCtlAckMetricTag { + return obj.patternFlowTcpCtlAckMetricTagSlice +} + +func (obj *patternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter) Add() PatternFlowTcpCtlAckMetricTag { + newObj := &otg.PatternFlowTcpCtlAckMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpCtlAckMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpCtlAckMetricTagSlice = append(obj.patternFlowTcpCtlAckMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter) Append(items ...PatternFlowTcpCtlAckMetricTag) PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpCtlAckMetricTagSlice = append(obj.patternFlowTcpCtlAckMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter) Set(index int, newObj PatternFlowTcpCtlAckMetricTag) PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpCtlAckMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter) Clear() PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpCtlAckMetricTag{} + obj.patternFlowTcpCtlAckMetricTagSlice = []PatternFlowTcpCtlAckMetricTag{} + } + return obj +} +func (obj *patternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter) clearHolderSlice() PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter { + if len(obj.patternFlowTcpCtlAckMetricTagSlice) > 0 { + obj.patternFlowTcpCtlAckMetricTagSlice = []PatternFlowTcpCtlAckMetricTag{} + } + return obj +} +func (obj *patternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter) appendHolderSlice(item PatternFlowTcpCtlAckMetricTag) PatternFlowTcpCtlAckPatternFlowTcpCtlAckMetricTagIter { + obj.patternFlowTcpCtlAckMetricTagSlice = append(obj.patternFlowTcpCtlAckMetricTagSlice, item) + return obj +} + +func (obj *patternFlowTcpCtlAck) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlAck.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowTcpCtlAck.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpCtlAckMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowTcpCtlAck) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpCtlAckChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpCtlAckChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpCtlAckChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpCtlAckChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpCtlAckChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpCtlAckChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpCtlAck") + } + } else { + intVal := otg.PatternFlowTcpCtlAck_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpCtlAck_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_ack_counter.go b/gosnappi/pattern_flow_tcp_ctl_ack_counter.go new file mode 100644 index 00000000..5cd36639 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_ack_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlAckCounter ***** +type patternFlowTcpCtlAckCounter struct { + validation + obj *otg.PatternFlowTcpCtlAckCounter + marshaller marshalPatternFlowTcpCtlAckCounter + unMarshaller unMarshalPatternFlowTcpCtlAckCounter +} + +func NewPatternFlowTcpCtlAckCounter() PatternFlowTcpCtlAckCounter { + obj := patternFlowTcpCtlAckCounter{obj: &otg.PatternFlowTcpCtlAckCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlAckCounter) msg() *otg.PatternFlowTcpCtlAckCounter { + return obj.obj +} + +func (obj *patternFlowTcpCtlAckCounter) setMsg(msg *otg.PatternFlowTcpCtlAckCounter) PatternFlowTcpCtlAckCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlAckCounter struct { + obj *patternFlowTcpCtlAckCounter +} + +type marshalPatternFlowTcpCtlAckCounter interface { + // ToProto marshals PatternFlowTcpCtlAckCounter to protobuf object *otg.PatternFlowTcpCtlAckCounter + ToProto() (*otg.PatternFlowTcpCtlAckCounter, error) + // ToPbText marshals PatternFlowTcpCtlAckCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlAckCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlAckCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlAckCounter struct { + obj *patternFlowTcpCtlAckCounter +} + +type unMarshalPatternFlowTcpCtlAckCounter interface { + // FromProto unmarshals PatternFlowTcpCtlAckCounter from protobuf object *otg.PatternFlowTcpCtlAckCounter + FromProto(msg *otg.PatternFlowTcpCtlAckCounter) (PatternFlowTcpCtlAckCounter, error) + // FromPbText unmarshals PatternFlowTcpCtlAckCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlAckCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlAckCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlAckCounter) Marshal() marshalPatternFlowTcpCtlAckCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlAckCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlAckCounter) Unmarshal() unMarshalPatternFlowTcpCtlAckCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlAckCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlAckCounter) ToProto() (*otg.PatternFlowTcpCtlAckCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlAckCounter) FromProto(msg *otg.PatternFlowTcpCtlAckCounter) (PatternFlowTcpCtlAckCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlAckCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlAckCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlAckCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlAckCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlAckCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlAckCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlAckCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlAckCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlAckCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlAckCounter) Clone() (PatternFlowTcpCtlAckCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlAckCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpCtlAckCounter is integer counter pattern +type PatternFlowTcpCtlAckCounter interface { + Validation + // msg marshals PatternFlowTcpCtlAckCounter to protobuf object *otg.PatternFlowTcpCtlAckCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlAckCounter + // setMsg unmarshals PatternFlowTcpCtlAckCounter from protobuf object *otg.PatternFlowTcpCtlAckCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlAckCounter) PatternFlowTcpCtlAckCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlAckCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlAckCounter + // validate validates PatternFlowTcpCtlAckCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlAckCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpCtlAckCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpCtlAckCounter + SetStart(value uint32) PatternFlowTcpCtlAckCounter + // HasStart checks if Start has been set in PatternFlowTcpCtlAckCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpCtlAckCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpCtlAckCounter + SetStep(value uint32) PatternFlowTcpCtlAckCounter + // HasStep checks if Step has been set in PatternFlowTcpCtlAckCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpCtlAckCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpCtlAckCounter + SetCount(value uint32) PatternFlowTcpCtlAckCounter + // HasCount checks if Count has been set in PatternFlowTcpCtlAckCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpCtlAckCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpCtlAckCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpCtlAckCounter object +func (obj *patternFlowTcpCtlAckCounter) SetStart(value uint32) PatternFlowTcpCtlAckCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpCtlAckCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpCtlAckCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpCtlAckCounter object +func (obj *patternFlowTcpCtlAckCounter) SetStep(value uint32) PatternFlowTcpCtlAckCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpCtlAckCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpCtlAckCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpCtlAckCounter object +func (obj *patternFlowTcpCtlAckCounter) SetCount(value uint32) PatternFlowTcpCtlAckCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpCtlAckCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlAckCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlAckCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlAckCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowTcpCtlAckCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_ack_metric_tag.go b/gosnappi/pattern_flow_tcp_ctl_ack_metric_tag.go new file mode 100644 index 00000000..6d9c8889 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_ack_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlAckMetricTag ***** +type patternFlowTcpCtlAckMetricTag struct { + validation + obj *otg.PatternFlowTcpCtlAckMetricTag + marshaller marshalPatternFlowTcpCtlAckMetricTag + unMarshaller unMarshalPatternFlowTcpCtlAckMetricTag +} + +func NewPatternFlowTcpCtlAckMetricTag() PatternFlowTcpCtlAckMetricTag { + obj := patternFlowTcpCtlAckMetricTag{obj: &otg.PatternFlowTcpCtlAckMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlAckMetricTag) msg() *otg.PatternFlowTcpCtlAckMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpCtlAckMetricTag) setMsg(msg *otg.PatternFlowTcpCtlAckMetricTag) PatternFlowTcpCtlAckMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlAckMetricTag struct { + obj *patternFlowTcpCtlAckMetricTag +} + +type marshalPatternFlowTcpCtlAckMetricTag interface { + // ToProto marshals PatternFlowTcpCtlAckMetricTag to protobuf object *otg.PatternFlowTcpCtlAckMetricTag + ToProto() (*otg.PatternFlowTcpCtlAckMetricTag, error) + // ToPbText marshals PatternFlowTcpCtlAckMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlAckMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlAckMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlAckMetricTag struct { + obj *patternFlowTcpCtlAckMetricTag +} + +type unMarshalPatternFlowTcpCtlAckMetricTag interface { + // FromProto unmarshals PatternFlowTcpCtlAckMetricTag from protobuf object *otg.PatternFlowTcpCtlAckMetricTag + FromProto(msg *otg.PatternFlowTcpCtlAckMetricTag) (PatternFlowTcpCtlAckMetricTag, error) + // FromPbText unmarshals PatternFlowTcpCtlAckMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlAckMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlAckMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlAckMetricTag) Marshal() marshalPatternFlowTcpCtlAckMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlAckMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlAckMetricTag) Unmarshal() unMarshalPatternFlowTcpCtlAckMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlAckMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlAckMetricTag) ToProto() (*otg.PatternFlowTcpCtlAckMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlAckMetricTag) FromProto(msg *otg.PatternFlowTcpCtlAckMetricTag) (PatternFlowTcpCtlAckMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlAckMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlAckMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlAckMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlAckMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlAckMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlAckMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlAckMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlAckMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlAckMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlAckMetricTag) Clone() (PatternFlowTcpCtlAckMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlAckMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpCtlAckMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpCtlAckMetricTag interface { + Validation + // msg marshals PatternFlowTcpCtlAckMetricTag to protobuf object *otg.PatternFlowTcpCtlAckMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlAckMetricTag + // setMsg unmarshals PatternFlowTcpCtlAckMetricTag from protobuf object *otg.PatternFlowTcpCtlAckMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlAckMetricTag) PatternFlowTcpCtlAckMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlAckMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlAckMetricTag + // validate validates PatternFlowTcpCtlAckMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlAckMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpCtlAckMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpCtlAckMetricTag + SetName(value string) PatternFlowTcpCtlAckMetricTag + // Offset returns uint32, set in PatternFlowTcpCtlAckMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpCtlAckMetricTag + SetOffset(value uint32) PatternFlowTcpCtlAckMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpCtlAckMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpCtlAckMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpCtlAckMetricTag + SetLength(value uint32) PatternFlowTcpCtlAckMetricTag + // HasLength checks if Length has been set in PatternFlowTcpCtlAckMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpCtlAckMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpCtlAckMetricTag object +func (obj *patternFlowTcpCtlAckMetricTag) SetName(value string) PatternFlowTcpCtlAckMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpCtlAckMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpCtlAckMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpCtlAckMetricTag object +func (obj *patternFlowTcpCtlAckMetricTag) SetOffset(value uint32) PatternFlowTcpCtlAckMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpCtlAckMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpCtlAckMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpCtlAckMetricTag object +func (obj *patternFlowTcpCtlAckMetricTag) SetLength(value uint32) PatternFlowTcpCtlAckMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpCtlAckMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpCtlAckMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlAckMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpCtlAckMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpCtlAckMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_fin.go b/gosnappi/pattern_flow_tcp_ctl_fin.go new file mode 100644 index 00000000..d2178041 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_fin.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlFin ***** +type patternFlowTcpCtlFin struct { + validation + obj *otg.PatternFlowTcpCtlFin + marshaller marshalPatternFlowTcpCtlFin + unMarshaller unMarshalPatternFlowTcpCtlFin + incrementHolder PatternFlowTcpCtlFinCounter + decrementHolder PatternFlowTcpCtlFinCounter + metricTagsHolder PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter +} + +func NewPatternFlowTcpCtlFin() PatternFlowTcpCtlFin { + obj := patternFlowTcpCtlFin{obj: &otg.PatternFlowTcpCtlFin{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlFin) msg() *otg.PatternFlowTcpCtlFin { + return obj.obj +} + +func (obj *patternFlowTcpCtlFin) setMsg(msg *otg.PatternFlowTcpCtlFin) PatternFlowTcpCtlFin { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlFin struct { + obj *patternFlowTcpCtlFin +} + +type marshalPatternFlowTcpCtlFin interface { + // ToProto marshals PatternFlowTcpCtlFin to protobuf object *otg.PatternFlowTcpCtlFin + ToProto() (*otg.PatternFlowTcpCtlFin, error) + // ToPbText marshals PatternFlowTcpCtlFin to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlFin to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlFin to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlFin struct { + obj *patternFlowTcpCtlFin +} + +type unMarshalPatternFlowTcpCtlFin interface { + // FromProto unmarshals PatternFlowTcpCtlFin from protobuf object *otg.PatternFlowTcpCtlFin + FromProto(msg *otg.PatternFlowTcpCtlFin) (PatternFlowTcpCtlFin, error) + // FromPbText unmarshals PatternFlowTcpCtlFin from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlFin from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlFin from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlFin) Marshal() marshalPatternFlowTcpCtlFin { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlFin{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlFin) Unmarshal() unMarshalPatternFlowTcpCtlFin { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlFin{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlFin) ToProto() (*otg.PatternFlowTcpCtlFin, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlFin) FromProto(msg *otg.PatternFlowTcpCtlFin) (PatternFlowTcpCtlFin, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlFin) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlFin) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlFin) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlFin) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlFin) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlFin) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlFin) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlFin) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlFin) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlFin) Clone() (PatternFlowTcpCtlFin, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlFin() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpCtlFin) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpCtlFin is last packet from the sender. +type PatternFlowTcpCtlFin interface { + Validation + // msg marshals PatternFlowTcpCtlFin to protobuf object *otg.PatternFlowTcpCtlFin + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlFin + // setMsg unmarshals PatternFlowTcpCtlFin from protobuf object *otg.PatternFlowTcpCtlFin + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlFin) PatternFlowTcpCtlFin + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlFin + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlFin + // validate validates PatternFlowTcpCtlFin + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlFin, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpCtlFinChoiceEnum, set in PatternFlowTcpCtlFin + Choice() PatternFlowTcpCtlFinChoiceEnum + // setChoice assigns PatternFlowTcpCtlFinChoiceEnum provided by user to PatternFlowTcpCtlFin + setChoice(value PatternFlowTcpCtlFinChoiceEnum) PatternFlowTcpCtlFin + // HasChoice checks if Choice has been set in PatternFlowTcpCtlFin + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpCtlFin. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpCtlFin + SetValue(value uint32) PatternFlowTcpCtlFin + // HasValue checks if Value has been set in PatternFlowTcpCtlFin + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpCtlFin. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpCtlFin + SetValues(value []uint32) PatternFlowTcpCtlFin + // Increment returns PatternFlowTcpCtlFinCounter, set in PatternFlowTcpCtlFin. + // PatternFlowTcpCtlFinCounter is integer counter pattern + Increment() PatternFlowTcpCtlFinCounter + // SetIncrement assigns PatternFlowTcpCtlFinCounter provided by user to PatternFlowTcpCtlFin. + // PatternFlowTcpCtlFinCounter is integer counter pattern + SetIncrement(value PatternFlowTcpCtlFinCounter) PatternFlowTcpCtlFin + // HasIncrement checks if Increment has been set in PatternFlowTcpCtlFin + HasIncrement() bool + // Decrement returns PatternFlowTcpCtlFinCounter, set in PatternFlowTcpCtlFin. + // PatternFlowTcpCtlFinCounter is integer counter pattern + Decrement() PatternFlowTcpCtlFinCounter + // SetDecrement assigns PatternFlowTcpCtlFinCounter provided by user to PatternFlowTcpCtlFin. + // PatternFlowTcpCtlFinCounter is integer counter pattern + SetDecrement(value PatternFlowTcpCtlFinCounter) PatternFlowTcpCtlFin + // HasDecrement checks if Decrement has been set in PatternFlowTcpCtlFin + HasDecrement() bool + // MetricTags returns PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIterIter, set in PatternFlowTcpCtlFin + MetricTags() PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter + setNil() +} + +type PatternFlowTcpCtlFinChoiceEnum string + +// Enum of Choice on PatternFlowTcpCtlFin +var PatternFlowTcpCtlFinChoice = struct { + VALUE PatternFlowTcpCtlFinChoiceEnum + VALUES PatternFlowTcpCtlFinChoiceEnum + INCREMENT PatternFlowTcpCtlFinChoiceEnum + DECREMENT PatternFlowTcpCtlFinChoiceEnum +}{ + VALUE: PatternFlowTcpCtlFinChoiceEnum("value"), + VALUES: PatternFlowTcpCtlFinChoiceEnum("values"), + INCREMENT: PatternFlowTcpCtlFinChoiceEnum("increment"), + DECREMENT: PatternFlowTcpCtlFinChoiceEnum("decrement"), +} + +func (obj *patternFlowTcpCtlFin) Choice() PatternFlowTcpCtlFinChoiceEnum { + return PatternFlowTcpCtlFinChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpCtlFin) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpCtlFin) setChoice(value PatternFlowTcpCtlFinChoiceEnum) PatternFlowTcpCtlFin { + intValue, ok := otg.PatternFlowTcpCtlFin_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpCtlFinChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpCtlFin_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpCtlFinChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpCtlFinChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpCtlFinChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpCtlFinCounter().msg() + } + + if value == PatternFlowTcpCtlFinChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpCtlFinCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpCtlFin) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpCtlFinChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpCtlFin) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpCtlFin object +func (obj *patternFlowTcpCtlFin) SetValue(value uint32) PatternFlowTcpCtlFin { + obj.setChoice(PatternFlowTcpCtlFinChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpCtlFin) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpCtlFin object +func (obj *patternFlowTcpCtlFin) SetValues(value []uint32) PatternFlowTcpCtlFin { + obj.setChoice(PatternFlowTcpCtlFinChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpCtlFinCounter +func (obj *patternFlowTcpCtlFin) Increment() PatternFlowTcpCtlFinCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpCtlFinChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpCtlFinCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpCtlFinCounter +func (obj *patternFlowTcpCtlFin) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpCtlFinCounter value in the PatternFlowTcpCtlFin object +func (obj *patternFlowTcpCtlFin) SetIncrement(value PatternFlowTcpCtlFinCounter) PatternFlowTcpCtlFin { + obj.setChoice(PatternFlowTcpCtlFinChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpCtlFinCounter +func (obj *patternFlowTcpCtlFin) Decrement() PatternFlowTcpCtlFinCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpCtlFinChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpCtlFinCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpCtlFinCounter +func (obj *patternFlowTcpCtlFin) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpCtlFinCounter value in the PatternFlowTcpCtlFin object +func (obj *patternFlowTcpCtlFin) SetDecrement(value PatternFlowTcpCtlFinCounter) PatternFlowTcpCtlFin { + obj.setChoice(PatternFlowTcpCtlFinChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpCtlFinMetricTag +func (obj *patternFlowTcpCtlFin) MetricTags() PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpCtlFinMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter struct { + obj *patternFlowTcpCtlFin + patternFlowTcpCtlFinMetricTagSlice []PatternFlowTcpCtlFinMetricTag + fieldPtr *[]*otg.PatternFlowTcpCtlFinMetricTag +} + +func newPatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter(ptr *[]*otg.PatternFlowTcpCtlFinMetricTag) PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter { + return &patternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter interface { + setMsg(*patternFlowTcpCtlFin) PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter + Items() []PatternFlowTcpCtlFinMetricTag + Add() PatternFlowTcpCtlFinMetricTag + Append(items ...PatternFlowTcpCtlFinMetricTag) PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter + Set(index int, newObj PatternFlowTcpCtlFinMetricTag) PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter + Clear() PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter + clearHolderSlice() PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter + appendHolderSlice(item PatternFlowTcpCtlFinMetricTag) PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter +} + +func (obj *patternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter) setMsg(msg *patternFlowTcpCtlFin) PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpCtlFinMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter) Items() []PatternFlowTcpCtlFinMetricTag { + return obj.patternFlowTcpCtlFinMetricTagSlice +} + +func (obj *patternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter) Add() PatternFlowTcpCtlFinMetricTag { + newObj := &otg.PatternFlowTcpCtlFinMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpCtlFinMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpCtlFinMetricTagSlice = append(obj.patternFlowTcpCtlFinMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter) Append(items ...PatternFlowTcpCtlFinMetricTag) PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpCtlFinMetricTagSlice = append(obj.patternFlowTcpCtlFinMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter) Set(index int, newObj PatternFlowTcpCtlFinMetricTag) PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpCtlFinMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter) Clear() PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpCtlFinMetricTag{} + obj.patternFlowTcpCtlFinMetricTagSlice = []PatternFlowTcpCtlFinMetricTag{} + } + return obj +} +func (obj *patternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter) clearHolderSlice() PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter { + if len(obj.patternFlowTcpCtlFinMetricTagSlice) > 0 { + obj.patternFlowTcpCtlFinMetricTagSlice = []PatternFlowTcpCtlFinMetricTag{} + } + return obj +} +func (obj *patternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter) appendHolderSlice(item PatternFlowTcpCtlFinMetricTag) PatternFlowTcpCtlFinPatternFlowTcpCtlFinMetricTagIter { + obj.patternFlowTcpCtlFinMetricTagSlice = append(obj.patternFlowTcpCtlFinMetricTagSlice, item) + return obj +} + +func (obj *patternFlowTcpCtlFin) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlFin.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowTcpCtlFin.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpCtlFinMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowTcpCtlFin) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpCtlFinChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpCtlFinChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpCtlFinChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpCtlFinChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpCtlFinChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpCtlFinChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpCtlFin") + } + } else { + intVal := otg.PatternFlowTcpCtlFin_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpCtlFin_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_fin_counter.go b/gosnappi/pattern_flow_tcp_ctl_fin_counter.go new file mode 100644 index 00000000..cd4d08a3 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_fin_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlFinCounter ***** +type patternFlowTcpCtlFinCounter struct { + validation + obj *otg.PatternFlowTcpCtlFinCounter + marshaller marshalPatternFlowTcpCtlFinCounter + unMarshaller unMarshalPatternFlowTcpCtlFinCounter +} + +func NewPatternFlowTcpCtlFinCounter() PatternFlowTcpCtlFinCounter { + obj := patternFlowTcpCtlFinCounter{obj: &otg.PatternFlowTcpCtlFinCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlFinCounter) msg() *otg.PatternFlowTcpCtlFinCounter { + return obj.obj +} + +func (obj *patternFlowTcpCtlFinCounter) setMsg(msg *otg.PatternFlowTcpCtlFinCounter) PatternFlowTcpCtlFinCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlFinCounter struct { + obj *patternFlowTcpCtlFinCounter +} + +type marshalPatternFlowTcpCtlFinCounter interface { + // ToProto marshals PatternFlowTcpCtlFinCounter to protobuf object *otg.PatternFlowTcpCtlFinCounter + ToProto() (*otg.PatternFlowTcpCtlFinCounter, error) + // ToPbText marshals PatternFlowTcpCtlFinCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlFinCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlFinCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlFinCounter struct { + obj *patternFlowTcpCtlFinCounter +} + +type unMarshalPatternFlowTcpCtlFinCounter interface { + // FromProto unmarshals PatternFlowTcpCtlFinCounter from protobuf object *otg.PatternFlowTcpCtlFinCounter + FromProto(msg *otg.PatternFlowTcpCtlFinCounter) (PatternFlowTcpCtlFinCounter, error) + // FromPbText unmarshals PatternFlowTcpCtlFinCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlFinCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlFinCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlFinCounter) Marshal() marshalPatternFlowTcpCtlFinCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlFinCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlFinCounter) Unmarshal() unMarshalPatternFlowTcpCtlFinCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlFinCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlFinCounter) ToProto() (*otg.PatternFlowTcpCtlFinCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlFinCounter) FromProto(msg *otg.PatternFlowTcpCtlFinCounter) (PatternFlowTcpCtlFinCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlFinCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlFinCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlFinCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlFinCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlFinCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlFinCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlFinCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlFinCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlFinCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlFinCounter) Clone() (PatternFlowTcpCtlFinCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlFinCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpCtlFinCounter is integer counter pattern +type PatternFlowTcpCtlFinCounter interface { + Validation + // msg marshals PatternFlowTcpCtlFinCounter to protobuf object *otg.PatternFlowTcpCtlFinCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlFinCounter + // setMsg unmarshals PatternFlowTcpCtlFinCounter from protobuf object *otg.PatternFlowTcpCtlFinCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlFinCounter) PatternFlowTcpCtlFinCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlFinCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlFinCounter + // validate validates PatternFlowTcpCtlFinCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlFinCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpCtlFinCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpCtlFinCounter + SetStart(value uint32) PatternFlowTcpCtlFinCounter + // HasStart checks if Start has been set in PatternFlowTcpCtlFinCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpCtlFinCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpCtlFinCounter + SetStep(value uint32) PatternFlowTcpCtlFinCounter + // HasStep checks if Step has been set in PatternFlowTcpCtlFinCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpCtlFinCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpCtlFinCounter + SetCount(value uint32) PatternFlowTcpCtlFinCounter + // HasCount checks if Count has been set in PatternFlowTcpCtlFinCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpCtlFinCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpCtlFinCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpCtlFinCounter object +func (obj *patternFlowTcpCtlFinCounter) SetStart(value uint32) PatternFlowTcpCtlFinCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpCtlFinCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpCtlFinCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpCtlFinCounter object +func (obj *patternFlowTcpCtlFinCounter) SetStep(value uint32) PatternFlowTcpCtlFinCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpCtlFinCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpCtlFinCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpCtlFinCounter object +func (obj *patternFlowTcpCtlFinCounter) SetCount(value uint32) PatternFlowTcpCtlFinCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpCtlFinCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlFinCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlFinCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlFinCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowTcpCtlFinCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_fin_metric_tag.go b/gosnappi/pattern_flow_tcp_ctl_fin_metric_tag.go new file mode 100644 index 00000000..c74b62b9 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_fin_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlFinMetricTag ***** +type patternFlowTcpCtlFinMetricTag struct { + validation + obj *otg.PatternFlowTcpCtlFinMetricTag + marshaller marshalPatternFlowTcpCtlFinMetricTag + unMarshaller unMarshalPatternFlowTcpCtlFinMetricTag +} + +func NewPatternFlowTcpCtlFinMetricTag() PatternFlowTcpCtlFinMetricTag { + obj := patternFlowTcpCtlFinMetricTag{obj: &otg.PatternFlowTcpCtlFinMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlFinMetricTag) msg() *otg.PatternFlowTcpCtlFinMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpCtlFinMetricTag) setMsg(msg *otg.PatternFlowTcpCtlFinMetricTag) PatternFlowTcpCtlFinMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlFinMetricTag struct { + obj *patternFlowTcpCtlFinMetricTag +} + +type marshalPatternFlowTcpCtlFinMetricTag interface { + // ToProto marshals PatternFlowTcpCtlFinMetricTag to protobuf object *otg.PatternFlowTcpCtlFinMetricTag + ToProto() (*otg.PatternFlowTcpCtlFinMetricTag, error) + // ToPbText marshals PatternFlowTcpCtlFinMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlFinMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlFinMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlFinMetricTag struct { + obj *patternFlowTcpCtlFinMetricTag +} + +type unMarshalPatternFlowTcpCtlFinMetricTag interface { + // FromProto unmarshals PatternFlowTcpCtlFinMetricTag from protobuf object *otg.PatternFlowTcpCtlFinMetricTag + FromProto(msg *otg.PatternFlowTcpCtlFinMetricTag) (PatternFlowTcpCtlFinMetricTag, error) + // FromPbText unmarshals PatternFlowTcpCtlFinMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlFinMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlFinMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlFinMetricTag) Marshal() marshalPatternFlowTcpCtlFinMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlFinMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlFinMetricTag) Unmarshal() unMarshalPatternFlowTcpCtlFinMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlFinMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlFinMetricTag) ToProto() (*otg.PatternFlowTcpCtlFinMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlFinMetricTag) FromProto(msg *otg.PatternFlowTcpCtlFinMetricTag) (PatternFlowTcpCtlFinMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlFinMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlFinMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlFinMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlFinMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlFinMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlFinMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlFinMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlFinMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlFinMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlFinMetricTag) Clone() (PatternFlowTcpCtlFinMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlFinMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpCtlFinMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpCtlFinMetricTag interface { + Validation + // msg marshals PatternFlowTcpCtlFinMetricTag to protobuf object *otg.PatternFlowTcpCtlFinMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlFinMetricTag + // setMsg unmarshals PatternFlowTcpCtlFinMetricTag from protobuf object *otg.PatternFlowTcpCtlFinMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlFinMetricTag) PatternFlowTcpCtlFinMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlFinMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlFinMetricTag + // validate validates PatternFlowTcpCtlFinMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlFinMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpCtlFinMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpCtlFinMetricTag + SetName(value string) PatternFlowTcpCtlFinMetricTag + // Offset returns uint32, set in PatternFlowTcpCtlFinMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpCtlFinMetricTag + SetOffset(value uint32) PatternFlowTcpCtlFinMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpCtlFinMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpCtlFinMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpCtlFinMetricTag + SetLength(value uint32) PatternFlowTcpCtlFinMetricTag + // HasLength checks if Length has been set in PatternFlowTcpCtlFinMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpCtlFinMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpCtlFinMetricTag object +func (obj *patternFlowTcpCtlFinMetricTag) SetName(value string) PatternFlowTcpCtlFinMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpCtlFinMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpCtlFinMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpCtlFinMetricTag object +func (obj *patternFlowTcpCtlFinMetricTag) SetOffset(value uint32) PatternFlowTcpCtlFinMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpCtlFinMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpCtlFinMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpCtlFinMetricTag object +func (obj *patternFlowTcpCtlFinMetricTag) SetLength(value uint32) PatternFlowTcpCtlFinMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpCtlFinMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpCtlFinMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlFinMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpCtlFinMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpCtlFinMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_psh.go b/gosnappi/pattern_flow_tcp_ctl_psh.go new file mode 100644 index 00000000..b0a571d3 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_psh.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlPsh ***** +type patternFlowTcpCtlPsh struct { + validation + obj *otg.PatternFlowTcpCtlPsh + marshaller marshalPatternFlowTcpCtlPsh + unMarshaller unMarshalPatternFlowTcpCtlPsh + incrementHolder PatternFlowTcpCtlPshCounter + decrementHolder PatternFlowTcpCtlPshCounter + metricTagsHolder PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter +} + +func NewPatternFlowTcpCtlPsh() PatternFlowTcpCtlPsh { + obj := patternFlowTcpCtlPsh{obj: &otg.PatternFlowTcpCtlPsh{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlPsh) msg() *otg.PatternFlowTcpCtlPsh { + return obj.obj +} + +func (obj *patternFlowTcpCtlPsh) setMsg(msg *otg.PatternFlowTcpCtlPsh) PatternFlowTcpCtlPsh { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlPsh struct { + obj *patternFlowTcpCtlPsh +} + +type marshalPatternFlowTcpCtlPsh interface { + // ToProto marshals PatternFlowTcpCtlPsh to protobuf object *otg.PatternFlowTcpCtlPsh + ToProto() (*otg.PatternFlowTcpCtlPsh, error) + // ToPbText marshals PatternFlowTcpCtlPsh to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlPsh to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlPsh to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlPsh struct { + obj *patternFlowTcpCtlPsh +} + +type unMarshalPatternFlowTcpCtlPsh interface { + // FromProto unmarshals PatternFlowTcpCtlPsh from protobuf object *otg.PatternFlowTcpCtlPsh + FromProto(msg *otg.PatternFlowTcpCtlPsh) (PatternFlowTcpCtlPsh, error) + // FromPbText unmarshals PatternFlowTcpCtlPsh from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlPsh from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlPsh from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlPsh) Marshal() marshalPatternFlowTcpCtlPsh { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlPsh{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlPsh) Unmarshal() unMarshalPatternFlowTcpCtlPsh { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlPsh{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlPsh) ToProto() (*otg.PatternFlowTcpCtlPsh, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlPsh) FromProto(msg *otg.PatternFlowTcpCtlPsh) (PatternFlowTcpCtlPsh, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlPsh) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlPsh) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlPsh) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlPsh) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlPsh) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlPsh) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlPsh) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlPsh) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlPsh) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlPsh) Clone() (PatternFlowTcpCtlPsh, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlPsh() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpCtlPsh) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpCtlPsh is asks to push the buffered data to the receiving application. +type PatternFlowTcpCtlPsh interface { + Validation + // msg marshals PatternFlowTcpCtlPsh to protobuf object *otg.PatternFlowTcpCtlPsh + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlPsh + // setMsg unmarshals PatternFlowTcpCtlPsh from protobuf object *otg.PatternFlowTcpCtlPsh + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlPsh) PatternFlowTcpCtlPsh + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlPsh + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlPsh + // validate validates PatternFlowTcpCtlPsh + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlPsh, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpCtlPshChoiceEnum, set in PatternFlowTcpCtlPsh + Choice() PatternFlowTcpCtlPshChoiceEnum + // setChoice assigns PatternFlowTcpCtlPshChoiceEnum provided by user to PatternFlowTcpCtlPsh + setChoice(value PatternFlowTcpCtlPshChoiceEnum) PatternFlowTcpCtlPsh + // HasChoice checks if Choice has been set in PatternFlowTcpCtlPsh + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpCtlPsh. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpCtlPsh + SetValue(value uint32) PatternFlowTcpCtlPsh + // HasValue checks if Value has been set in PatternFlowTcpCtlPsh + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpCtlPsh. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpCtlPsh + SetValues(value []uint32) PatternFlowTcpCtlPsh + // Increment returns PatternFlowTcpCtlPshCounter, set in PatternFlowTcpCtlPsh. + // PatternFlowTcpCtlPshCounter is integer counter pattern + Increment() PatternFlowTcpCtlPshCounter + // SetIncrement assigns PatternFlowTcpCtlPshCounter provided by user to PatternFlowTcpCtlPsh. + // PatternFlowTcpCtlPshCounter is integer counter pattern + SetIncrement(value PatternFlowTcpCtlPshCounter) PatternFlowTcpCtlPsh + // HasIncrement checks if Increment has been set in PatternFlowTcpCtlPsh + HasIncrement() bool + // Decrement returns PatternFlowTcpCtlPshCounter, set in PatternFlowTcpCtlPsh. + // PatternFlowTcpCtlPshCounter is integer counter pattern + Decrement() PatternFlowTcpCtlPshCounter + // SetDecrement assigns PatternFlowTcpCtlPshCounter provided by user to PatternFlowTcpCtlPsh. + // PatternFlowTcpCtlPshCounter is integer counter pattern + SetDecrement(value PatternFlowTcpCtlPshCounter) PatternFlowTcpCtlPsh + // HasDecrement checks if Decrement has been set in PatternFlowTcpCtlPsh + HasDecrement() bool + // MetricTags returns PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIterIter, set in PatternFlowTcpCtlPsh + MetricTags() PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter + setNil() +} + +type PatternFlowTcpCtlPshChoiceEnum string + +// Enum of Choice on PatternFlowTcpCtlPsh +var PatternFlowTcpCtlPshChoice = struct { + VALUE PatternFlowTcpCtlPshChoiceEnum + VALUES PatternFlowTcpCtlPshChoiceEnum + INCREMENT PatternFlowTcpCtlPshChoiceEnum + DECREMENT PatternFlowTcpCtlPshChoiceEnum +}{ + VALUE: PatternFlowTcpCtlPshChoiceEnum("value"), + VALUES: PatternFlowTcpCtlPshChoiceEnum("values"), + INCREMENT: PatternFlowTcpCtlPshChoiceEnum("increment"), + DECREMENT: PatternFlowTcpCtlPshChoiceEnum("decrement"), +} + +func (obj *patternFlowTcpCtlPsh) Choice() PatternFlowTcpCtlPshChoiceEnum { + return PatternFlowTcpCtlPshChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpCtlPsh) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpCtlPsh) setChoice(value PatternFlowTcpCtlPshChoiceEnum) PatternFlowTcpCtlPsh { + intValue, ok := otg.PatternFlowTcpCtlPsh_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpCtlPshChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpCtlPsh_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpCtlPshChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpCtlPshChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpCtlPshChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpCtlPshCounter().msg() + } + + if value == PatternFlowTcpCtlPshChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpCtlPshCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpCtlPsh) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpCtlPshChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpCtlPsh) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpCtlPsh object +func (obj *patternFlowTcpCtlPsh) SetValue(value uint32) PatternFlowTcpCtlPsh { + obj.setChoice(PatternFlowTcpCtlPshChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpCtlPsh) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpCtlPsh object +func (obj *patternFlowTcpCtlPsh) SetValues(value []uint32) PatternFlowTcpCtlPsh { + obj.setChoice(PatternFlowTcpCtlPshChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpCtlPshCounter +func (obj *patternFlowTcpCtlPsh) Increment() PatternFlowTcpCtlPshCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpCtlPshChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpCtlPshCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpCtlPshCounter +func (obj *patternFlowTcpCtlPsh) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpCtlPshCounter value in the PatternFlowTcpCtlPsh object +func (obj *patternFlowTcpCtlPsh) SetIncrement(value PatternFlowTcpCtlPshCounter) PatternFlowTcpCtlPsh { + obj.setChoice(PatternFlowTcpCtlPshChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpCtlPshCounter +func (obj *patternFlowTcpCtlPsh) Decrement() PatternFlowTcpCtlPshCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpCtlPshChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpCtlPshCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpCtlPshCounter +func (obj *patternFlowTcpCtlPsh) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpCtlPshCounter value in the PatternFlowTcpCtlPsh object +func (obj *patternFlowTcpCtlPsh) SetDecrement(value PatternFlowTcpCtlPshCounter) PatternFlowTcpCtlPsh { + obj.setChoice(PatternFlowTcpCtlPshChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpCtlPshMetricTag +func (obj *patternFlowTcpCtlPsh) MetricTags() PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpCtlPshMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter struct { + obj *patternFlowTcpCtlPsh + patternFlowTcpCtlPshMetricTagSlice []PatternFlowTcpCtlPshMetricTag + fieldPtr *[]*otg.PatternFlowTcpCtlPshMetricTag +} + +func newPatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter(ptr *[]*otg.PatternFlowTcpCtlPshMetricTag) PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter { + return &patternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter interface { + setMsg(*patternFlowTcpCtlPsh) PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter + Items() []PatternFlowTcpCtlPshMetricTag + Add() PatternFlowTcpCtlPshMetricTag + Append(items ...PatternFlowTcpCtlPshMetricTag) PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter + Set(index int, newObj PatternFlowTcpCtlPshMetricTag) PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter + Clear() PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter + clearHolderSlice() PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter + appendHolderSlice(item PatternFlowTcpCtlPshMetricTag) PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter +} + +func (obj *patternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter) setMsg(msg *patternFlowTcpCtlPsh) PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpCtlPshMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter) Items() []PatternFlowTcpCtlPshMetricTag { + return obj.patternFlowTcpCtlPshMetricTagSlice +} + +func (obj *patternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter) Add() PatternFlowTcpCtlPshMetricTag { + newObj := &otg.PatternFlowTcpCtlPshMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpCtlPshMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpCtlPshMetricTagSlice = append(obj.patternFlowTcpCtlPshMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter) Append(items ...PatternFlowTcpCtlPshMetricTag) PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpCtlPshMetricTagSlice = append(obj.patternFlowTcpCtlPshMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter) Set(index int, newObj PatternFlowTcpCtlPshMetricTag) PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpCtlPshMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter) Clear() PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpCtlPshMetricTag{} + obj.patternFlowTcpCtlPshMetricTagSlice = []PatternFlowTcpCtlPshMetricTag{} + } + return obj +} +func (obj *patternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter) clearHolderSlice() PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter { + if len(obj.patternFlowTcpCtlPshMetricTagSlice) > 0 { + obj.patternFlowTcpCtlPshMetricTagSlice = []PatternFlowTcpCtlPshMetricTag{} + } + return obj +} +func (obj *patternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter) appendHolderSlice(item PatternFlowTcpCtlPshMetricTag) PatternFlowTcpCtlPshPatternFlowTcpCtlPshMetricTagIter { + obj.patternFlowTcpCtlPshMetricTagSlice = append(obj.patternFlowTcpCtlPshMetricTagSlice, item) + return obj +} + +func (obj *patternFlowTcpCtlPsh) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlPsh.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowTcpCtlPsh.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpCtlPshMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowTcpCtlPsh) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpCtlPshChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpCtlPshChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpCtlPshChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpCtlPshChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpCtlPshChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpCtlPshChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpCtlPsh") + } + } else { + intVal := otg.PatternFlowTcpCtlPsh_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpCtlPsh_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_psh_counter.go b/gosnappi/pattern_flow_tcp_ctl_psh_counter.go new file mode 100644 index 00000000..eced55ab --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_psh_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlPshCounter ***** +type patternFlowTcpCtlPshCounter struct { + validation + obj *otg.PatternFlowTcpCtlPshCounter + marshaller marshalPatternFlowTcpCtlPshCounter + unMarshaller unMarshalPatternFlowTcpCtlPshCounter +} + +func NewPatternFlowTcpCtlPshCounter() PatternFlowTcpCtlPshCounter { + obj := patternFlowTcpCtlPshCounter{obj: &otg.PatternFlowTcpCtlPshCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlPshCounter) msg() *otg.PatternFlowTcpCtlPshCounter { + return obj.obj +} + +func (obj *patternFlowTcpCtlPshCounter) setMsg(msg *otg.PatternFlowTcpCtlPshCounter) PatternFlowTcpCtlPshCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlPshCounter struct { + obj *patternFlowTcpCtlPshCounter +} + +type marshalPatternFlowTcpCtlPshCounter interface { + // ToProto marshals PatternFlowTcpCtlPshCounter to protobuf object *otg.PatternFlowTcpCtlPshCounter + ToProto() (*otg.PatternFlowTcpCtlPshCounter, error) + // ToPbText marshals PatternFlowTcpCtlPshCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlPshCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlPshCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlPshCounter struct { + obj *patternFlowTcpCtlPshCounter +} + +type unMarshalPatternFlowTcpCtlPshCounter interface { + // FromProto unmarshals PatternFlowTcpCtlPshCounter from protobuf object *otg.PatternFlowTcpCtlPshCounter + FromProto(msg *otg.PatternFlowTcpCtlPshCounter) (PatternFlowTcpCtlPshCounter, error) + // FromPbText unmarshals PatternFlowTcpCtlPshCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlPshCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlPshCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlPshCounter) Marshal() marshalPatternFlowTcpCtlPshCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlPshCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlPshCounter) Unmarshal() unMarshalPatternFlowTcpCtlPshCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlPshCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlPshCounter) ToProto() (*otg.PatternFlowTcpCtlPshCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlPshCounter) FromProto(msg *otg.PatternFlowTcpCtlPshCounter) (PatternFlowTcpCtlPshCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlPshCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlPshCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlPshCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlPshCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlPshCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlPshCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlPshCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlPshCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlPshCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlPshCounter) Clone() (PatternFlowTcpCtlPshCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlPshCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpCtlPshCounter is integer counter pattern +type PatternFlowTcpCtlPshCounter interface { + Validation + // msg marshals PatternFlowTcpCtlPshCounter to protobuf object *otg.PatternFlowTcpCtlPshCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlPshCounter + // setMsg unmarshals PatternFlowTcpCtlPshCounter from protobuf object *otg.PatternFlowTcpCtlPshCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlPshCounter) PatternFlowTcpCtlPshCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlPshCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlPshCounter + // validate validates PatternFlowTcpCtlPshCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlPshCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpCtlPshCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpCtlPshCounter + SetStart(value uint32) PatternFlowTcpCtlPshCounter + // HasStart checks if Start has been set in PatternFlowTcpCtlPshCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpCtlPshCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpCtlPshCounter + SetStep(value uint32) PatternFlowTcpCtlPshCounter + // HasStep checks if Step has been set in PatternFlowTcpCtlPshCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpCtlPshCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpCtlPshCounter + SetCount(value uint32) PatternFlowTcpCtlPshCounter + // HasCount checks if Count has been set in PatternFlowTcpCtlPshCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpCtlPshCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpCtlPshCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpCtlPshCounter object +func (obj *patternFlowTcpCtlPshCounter) SetStart(value uint32) PatternFlowTcpCtlPshCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpCtlPshCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpCtlPshCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpCtlPshCounter object +func (obj *patternFlowTcpCtlPshCounter) SetStep(value uint32) PatternFlowTcpCtlPshCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpCtlPshCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpCtlPshCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpCtlPshCounter object +func (obj *patternFlowTcpCtlPshCounter) SetCount(value uint32) PatternFlowTcpCtlPshCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpCtlPshCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlPshCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlPshCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlPshCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowTcpCtlPshCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_psh_metric_tag.go b/gosnappi/pattern_flow_tcp_ctl_psh_metric_tag.go new file mode 100644 index 00000000..4c80f53b --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_psh_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlPshMetricTag ***** +type patternFlowTcpCtlPshMetricTag struct { + validation + obj *otg.PatternFlowTcpCtlPshMetricTag + marshaller marshalPatternFlowTcpCtlPshMetricTag + unMarshaller unMarshalPatternFlowTcpCtlPshMetricTag +} + +func NewPatternFlowTcpCtlPshMetricTag() PatternFlowTcpCtlPshMetricTag { + obj := patternFlowTcpCtlPshMetricTag{obj: &otg.PatternFlowTcpCtlPshMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlPshMetricTag) msg() *otg.PatternFlowTcpCtlPshMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpCtlPshMetricTag) setMsg(msg *otg.PatternFlowTcpCtlPshMetricTag) PatternFlowTcpCtlPshMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlPshMetricTag struct { + obj *patternFlowTcpCtlPshMetricTag +} + +type marshalPatternFlowTcpCtlPshMetricTag interface { + // ToProto marshals PatternFlowTcpCtlPshMetricTag to protobuf object *otg.PatternFlowTcpCtlPshMetricTag + ToProto() (*otg.PatternFlowTcpCtlPshMetricTag, error) + // ToPbText marshals PatternFlowTcpCtlPshMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlPshMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlPshMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlPshMetricTag struct { + obj *patternFlowTcpCtlPshMetricTag +} + +type unMarshalPatternFlowTcpCtlPshMetricTag interface { + // FromProto unmarshals PatternFlowTcpCtlPshMetricTag from protobuf object *otg.PatternFlowTcpCtlPshMetricTag + FromProto(msg *otg.PatternFlowTcpCtlPshMetricTag) (PatternFlowTcpCtlPshMetricTag, error) + // FromPbText unmarshals PatternFlowTcpCtlPshMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlPshMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlPshMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlPshMetricTag) Marshal() marshalPatternFlowTcpCtlPshMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlPshMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlPshMetricTag) Unmarshal() unMarshalPatternFlowTcpCtlPshMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlPshMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlPshMetricTag) ToProto() (*otg.PatternFlowTcpCtlPshMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlPshMetricTag) FromProto(msg *otg.PatternFlowTcpCtlPshMetricTag) (PatternFlowTcpCtlPshMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlPshMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlPshMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlPshMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlPshMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlPshMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlPshMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlPshMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlPshMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlPshMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlPshMetricTag) Clone() (PatternFlowTcpCtlPshMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlPshMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpCtlPshMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpCtlPshMetricTag interface { + Validation + // msg marshals PatternFlowTcpCtlPshMetricTag to protobuf object *otg.PatternFlowTcpCtlPshMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlPshMetricTag + // setMsg unmarshals PatternFlowTcpCtlPshMetricTag from protobuf object *otg.PatternFlowTcpCtlPshMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlPshMetricTag) PatternFlowTcpCtlPshMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlPshMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlPshMetricTag + // validate validates PatternFlowTcpCtlPshMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlPshMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpCtlPshMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpCtlPshMetricTag + SetName(value string) PatternFlowTcpCtlPshMetricTag + // Offset returns uint32, set in PatternFlowTcpCtlPshMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpCtlPshMetricTag + SetOffset(value uint32) PatternFlowTcpCtlPshMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpCtlPshMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpCtlPshMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpCtlPshMetricTag + SetLength(value uint32) PatternFlowTcpCtlPshMetricTag + // HasLength checks if Length has been set in PatternFlowTcpCtlPshMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpCtlPshMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpCtlPshMetricTag object +func (obj *patternFlowTcpCtlPshMetricTag) SetName(value string) PatternFlowTcpCtlPshMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpCtlPshMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpCtlPshMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpCtlPshMetricTag object +func (obj *patternFlowTcpCtlPshMetricTag) SetOffset(value uint32) PatternFlowTcpCtlPshMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpCtlPshMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpCtlPshMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpCtlPshMetricTag object +func (obj *patternFlowTcpCtlPshMetricTag) SetLength(value uint32) PatternFlowTcpCtlPshMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpCtlPshMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpCtlPshMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlPshMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpCtlPshMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpCtlPshMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_rst.go b/gosnappi/pattern_flow_tcp_ctl_rst.go new file mode 100644 index 00000000..467da200 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_rst.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlRst ***** +type patternFlowTcpCtlRst struct { + validation + obj *otg.PatternFlowTcpCtlRst + marshaller marshalPatternFlowTcpCtlRst + unMarshaller unMarshalPatternFlowTcpCtlRst + incrementHolder PatternFlowTcpCtlRstCounter + decrementHolder PatternFlowTcpCtlRstCounter + metricTagsHolder PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter +} + +func NewPatternFlowTcpCtlRst() PatternFlowTcpCtlRst { + obj := patternFlowTcpCtlRst{obj: &otg.PatternFlowTcpCtlRst{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlRst) msg() *otg.PatternFlowTcpCtlRst { + return obj.obj +} + +func (obj *patternFlowTcpCtlRst) setMsg(msg *otg.PatternFlowTcpCtlRst) PatternFlowTcpCtlRst { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlRst struct { + obj *patternFlowTcpCtlRst +} + +type marshalPatternFlowTcpCtlRst interface { + // ToProto marshals PatternFlowTcpCtlRst to protobuf object *otg.PatternFlowTcpCtlRst + ToProto() (*otg.PatternFlowTcpCtlRst, error) + // ToPbText marshals PatternFlowTcpCtlRst to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlRst to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlRst to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlRst struct { + obj *patternFlowTcpCtlRst +} + +type unMarshalPatternFlowTcpCtlRst interface { + // FromProto unmarshals PatternFlowTcpCtlRst from protobuf object *otg.PatternFlowTcpCtlRst + FromProto(msg *otg.PatternFlowTcpCtlRst) (PatternFlowTcpCtlRst, error) + // FromPbText unmarshals PatternFlowTcpCtlRst from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlRst from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlRst from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlRst) Marshal() marshalPatternFlowTcpCtlRst { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlRst{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlRst) Unmarshal() unMarshalPatternFlowTcpCtlRst { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlRst{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlRst) ToProto() (*otg.PatternFlowTcpCtlRst, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlRst) FromProto(msg *otg.PatternFlowTcpCtlRst) (PatternFlowTcpCtlRst, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlRst) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlRst) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlRst) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlRst) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlRst) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlRst) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlRst) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlRst) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlRst) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlRst) Clone() (PatternFlowTcpCtlRst, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlRst() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpCtlRst) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpCtlRst is reset the connection. +type PatternFlowTcpCtlRst interface { + Validation + // msg marshals PatternFlowTcpCtlRst to protobuf object *otg.PatternFlowTcpCtlRst + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlRst + // setMsg unmarshals PatternFlowTcpCtlRst from protobuf object *otg.PatternFlowTcpCtlRst + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlRst) PatternFlowTcpCtlRst + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlRst + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlRst + // validate validates PatternFlowTcpCtlRst + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlRst, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpCtlRstChoiceEnum, set in PatternFlowTcpCtlRst + Choice() PatternFlowTcpCtlRstChoiceEnum + // setChoice assigns PatternFlowTcpCtlRstChoiceEnum provided by user to PatternFlowTcpCtlRst + setChoice(value PatternFlowTcpCtlRstChoiceEnum) PatternFlowTcpCtlRst + // HasChoice checks if Choice has been set in PatternFlowTcpCtlRst + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpCtlRst. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpCtlRst + SetValue(value uint32) PatternFlowTcpCtlRst + // HasValue checks if Value has been set in PatternFlowTcpCtlRst + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpCtlRst. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpCtlRst + SetValues(value []uint32) PatternFlowTcpCtlRst + // Increment returns PatternFlowTcpCtlRstCounter, set in PatternFlowTcpCtlRst. + // PatternFlowTcpCtlRstCounter is integer counter pattern + Increment() PatternFlowTcpCtlRstCounter + // SetIncrement assigns PatternFlowTcpCtlRstCounter provided by user to PatternFlowTcpCtlRst. + // PatternFlowTcpCtlRstCounter is integer counter pattern + SetIncrement(value PatternFlowTcpCtlRstCounter) PatternFlowTcpCtlRst + // HasIncrement checks if Increment has been set in PatternFlowTcpCtlRst + HasIncrement() bool + // Decrement returns PatternFlowTcpCtlRstCounter, set in PatternFlowTcpCtlRst. + // PatternFlowTcpCtlRstCounter is integer counter pattern + Decrement() PatternFlowTcpCtlRstCounter + // SetDecrement assigns PatternFlowTcpCtlRstCounter provided by user to PatternFlowTcpCtlRst. + // PatternFlowTcpCtlRstCounter is integer counter pattern + SetDecrement(value PatternFlowTcpCtlRstCounter) PatternFlowTcpCtlRst + // HasDecrement checks if Decrement has been set in PatternFlowTcpCtlRst + HasDecrement() bool + // MetricTags returns PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIterIter, set in PatternFlowTcpCtlRst + MetricTags() PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter + setNil() +} + +type PatternFlowTcpCtlRstChoiceEnum string + +// Enum of Choice on PatternFlowTcpCtlRst +var PatternFlowTcpCtlRstChoice = struct { + VALUE PatternFlowTcpCtlRstChoiceEnum + VALUES PatternFlowTcpCtlRstChoiceEnum + INCREMENT PatternFlowTcpCtlRstChoiceEnum + DECREMENT PatternFlowTcpCtlRstChoiceEnum +}{ + VALUE: PatternFlowTcpCtlRstChoiceEnum("value"), + VALUES: PatternFlowTcpCtlRstChoiceEnum("values"), + INCREMENT: PatternFlowTcpCtlRstChoiceEnum("increment"), + DECREMENT: PatternFlowTcpCtlRstChoiceEnum("decrement"), +} + +func (obj *patternFlowTcpCtlRst) Choice() PatternFlowTcpCtlRstChoiceEnum { + return PatternFlowTcpCtlRstChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpCtlRst) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpCtlRst) setChoice(value PatternFlowTcpCtlRstChoiceEnum) PatternFlowTcpCtlRst { + intValue, ok := otg.PatternFlowTcpCtlRst_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpCtlRstChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpCtlRst_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpCtlRstChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpCtlRstChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpCtlRstChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpCtlRstCounter().msg() + } + + if value == PatternFlowTcpCtlRstChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpCtlRstCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpCtlRst) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpCtlRstChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpCtlRst) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpCtlRst object +func (obj *patternFlowTcpCtlRst) SetValue(value uint32) PatternFlowTcpCtlRst { + obj.setChoice(PatternFlowTcpCtlRstChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpCtlRst) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpCtlRst object +func (obj *patternFlowTcpCtlRst) SetValues(value []uint32) PatternFlowTcpCtlRst { + obj.setChoice(PatternFlowTcpCtlRstChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpCtlRstCounter +func (obj *patternFlowTcpCtlRst) Increment() PatternFlowTcpCtlRstCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpCtlRstChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpCtlRstCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpCtlRstCounter +func (obj *patternFlowTcpCtlRst) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpCtlRstCounter value in the PatternFlowTcpCtlRst object +func (obj *patternFlowTcpCtlRst) SetIncrement(value PatternFlowTcpCtlRstCounter) PatternFlowTcpCtlRst { + obj.setChoice(PatternFlowTcpCtlRstChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpCtlRstCounter +func (obj *patternFlowTcpCtlRst) Decrement() PatternFlowTcpCtlRstCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpCtlRstChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpCtlRstCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpCtlRstCounter +func (obj *patternFlowTcpCtlRst) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpCtlRstCounter value in the PatternFlowTcpCtlRst object +func (obj *patternFlowTcpCtlRst) SetDecrement(value PatternFlowTcpCtlRstCounter) PatternFlowTcpCtlRst { + obj.setChoice(PatternFlowTcpCtlRstChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpCtlRstMetricTag +func (obj *patternFlowTcpCtlRst) MetricTags() PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpCtlRstMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter struct { + obj *patternFlowTcpCtlRst + patternFlowTcpCtlRstMetricTagSlice []PatternFlowTcpCtlRstMetricTag + fieldPtr *[]*otg.PatternFlowTcpCtlRstMetricTag +} + +func newPatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter(ptr *[]*otg.PatternFlowTcpCtlRstMetricTag) PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter { + return &patternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter interface { + setMsg(*patternFlowTcpCtlRst) PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter + Items() []PatternFlowTcpCtlRstMetricTag + Add() PatternFlowTcpCtlRstMetricTag + Append(items ...PatternFlowTcpCtlRstMetricTag) PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter + Set(index int, newObj PatternFlowTcpCtlRstMetricTag) PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter + Clear() PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter + clearHolderSlice() PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter + appendHolderSlice(item PatternFlowTcpCtlRstMetricTag) PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter +} + +func (obj *patternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter) setMsg(msg *patternFlowTcpCtlRst) PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpCtlRstMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter) Items() []PatternFlowTcpCtlRstMetricTag { + return obj.patternFlowTcpCtlRstMetricTagSlice +} + +func (obj *patternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter) Add() PatternFlowTcpCtlRstMetricTag { + newObj := &otg.PatternFlowTcpCtlRstMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpCtlRstMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpCtlRstMetricTagSlice = append(obj.patternFlowTcpCtlRstMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter) Append(items ...PatternFlowTcpCtlRstMetricTag) PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpCtlRstMetricTagSlice = append(obj.patternFlowTcpCtlRstMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter) Set(index int, newObj PatternFlowTcpCtlRstMetricTag) PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpCtlRstMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter) Clear() PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpCtlRstMetricTag{} + obj.patternFlowTcpCtlRstMetricTagSlice = []PatternFlowTcpCtlRstMetricTag{} + } + return obj +} +func (obj *patternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter) clearHolderSlice() PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter { + if len(obj.patternFlowTcpCtlRstMetricTagSlice) > 0 { + obj.patternFlowTcpCtlRstMetricTagSlice = []PatternFlowTcpCtlRstMetricTag{} + } + return obj +} +func (obj *patternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter) appendHolderSlice(item PatternFlowTcpCtlRstMetricTag) PatternFlowTcpCtlRstPatternFlowTcpCtlRstMetricTagIter { + obj.patternFlowTcpCtlRstMetricTagSlice = append(obj.patternFlowTcpCtlRstMetricTagSlice, item) + return obj +} + +func (obj *patternFlowTcpCtlRst) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlRst.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowTcpCtlRst.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpCtlRstMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowTcpCtlRst) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpCtlRstChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpCtlRstChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpCtlRstChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpCtlRstChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpCtlRstChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpCtlRstChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpCtlRst") + } + } else { + intVal := otg.PatternFlowTcpCtlRst_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpCtlRst_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_rst_counter.go b/gosnappi/pattern_flow_tcp_ctl_rst_counter.go new file mode 100644 index 00000000..088f6530 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_rst_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlRstCounter ***** +type patternFlowTcpCtlRstCounter struct { + validation + obj *otg.PatternFlowTcpCtlRstCounter + marshaller marshalPatternFlowTcpCtlRstCounter + unMarshaller unMarshalPatternFlowTcpCtlRstCounter +} + +func NewPatternFlowTcpCtlRstCounter() PatternFlowTcpCtlRstCounter { + obj := patternFlowTcpCtlRstCounter{obj: &otg.PatternFlowTcpCtlRstCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlRstCounter) msg() *otg.PatternFlowTcpCtlRstCounter { + return obj.obj +} + +func (obj *patternFlowTcpCtlRstCounter) setMsg(msg *otg.PatternFlowTcpCtlRstCounter) PatternFlowTcpCtlRstCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlRstCounter struct { + obj *patternFlowTcpCtlRstCounter +} + +type marshalPatternFlowTcpCtlRstCounter interface { + // ToProto marshals PatternFlowTcpCtlRstCounter to protobuf object *otg.PatternFlowTcpCtlRstCounter + ToProto() (*otg.PatternFlowTcpCtlRstCounter, error) + // ToPbText marshals PatternFlowTcpCtlRstCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlRstCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlRstCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlRstCounter struct { + obj *patternFlowTcpCtlRstCounter +} + +type unMarshalPatternFlowTcpCtlRstCounter interface { + // FromProto unmarshals PatternFlowTcpCtlRstCounter from protobuf object *otg.PatternFlowTcpCtlRstCounter + FromProto(msg *otg.PatternFlowTcpCtlRstCounter) (PatternFlowTcpCtlRstCounter, error) + // FromPbText unmarshals PatternFlowTcpCtlRstCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlRstCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlRstCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlRstCounter) Marshal() marshalPatternFlowTcpCtlRstCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlRstCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlRstCounter) Unmarshal() unMarshalPatternFlowTcpCtlRstCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlRstCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlRstCounter) ToProto() (*otg.PatternFlowTcpCtlRstCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlRstCounter) FromProto(msg *otg.PatternFlowTcpCtlRstCounter) (PatternFlowTcpCtlRstCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlRstCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlRstCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlRstCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlRstCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlRstCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlRstCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlRstCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlRstCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlRstCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlRstCounter) Clone() (PatternFlowTcpCtlRstCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlRstCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpCtlRstCounter is integer counter pattern +type PatternFlowTcpCtlRstCounter interface { + Validation + // msg marshals PatternFlowTcpCtlRstCounter to protobuf object *otg.PatternFlowTcpCtlRstCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlRstCounter + // setMsg unmarshals PatternFlowTcpCtlRstCounter from protobuf object *otg.PatternFlowTcpCtlRstCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlRstCounter) PatternFlowTcpCtlRstCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlRstCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlRstCounter + // validate validates PatternFlowTcpCtlRstCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlRstCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpCtlRstCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpCtlRstCounter + SetStart(value uint32) PatternFlowTcpCtlRstCounter + // HasStart checks if Start has been set in PatternFlowTcpCtlRstCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpCtlRstCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpCtlRstCounter + SetStep(value uint32) PatternFlowTcpCtlRstCounter + // HasStep checks if Step has been set in PatternFlowTcpCtlRstCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpCtlRstCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpCtlRstCounter + SetCount(value uint32) PatternFlowTcpCtlRstCounter + // HasCount checks if Count has been set in PatternFlowTcpCtlRstCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpCtlRstCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpCtlRstCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpCtlRstCounter object +func (obj *patternFlowTcpCtlRstCounter) SetStart(value uint32) PatternFlowTcpCtlRstCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpCtlRstCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpCtlRstCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpCtlRstCounter object +func (obj *patternFlowTcpCtlRstCounter) SetStep(value uint32) PatternFlowTcpCtlRstCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpCtlRstCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpCtlRstCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpCtlRstCounter object +func (obj *patternFlowTcpCtlRstCounter) SetCount(value uint32) PatternFlowTcpCtlRstCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpCtlRstCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlRstCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlRstCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlRstCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowTcpCtlRstCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_rst_metric_tag.go b/gosnappi/pattern_flow_tcp_ctl_rst_metric_tag.go new file mode 100644 index 00000000..5ba282cb --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_rst_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlRstMetricTag ***** +type patternFlowTcpCtlRstMetricTag struct { + validation + obj *otg.PatternFlowTcpCtlRstMetricTag + marshaller marshalPatternFlowTcpCtlRstMetricTag + unMarshaller unMarshalPatternFlowTcpCtlRstMetricTag +} + +func NewPatternFlowTcpCtlRstMetricTag() PatternFlowTcpCtlRstMetricTag { + obj := patternFlowTcpCtlRstMetricTag{obj: &otg.PatternFlowTcpCtlRstMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlRstMetricTag) msg() *otg.PatternFlowTcpCtlRstMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpCtlRstMetricTag) setMsg(msg *otg.PatternFlowTcpCtlRstMetricTag) PatternFlowTcpCtlRstMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlRstMetricTag struct { + obj *patternFlowTcpCtlRstMetricTag +} + +type marshalPatternFlowTcpCtlRstMetricTag interface { + // ToProto marshals PatternFlowTcpCtlRstMetricTag to protobuf object *otg.PatternFlowTcpCtlRstMetricTag + ToProto() (*otg.PatternFlowTcpCtlRstMetricTag, error) + // ToPbText marshals PatternFlowTcpCtlRstMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlRstMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlRstMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlRstMetricTag struct { + obj *patternFlowTcpCtlRstMetricTag +} + +type unMarshalPatternFlowTcpCtlRstMetricTag interface { + // FromProto unmarshals PatternFlowTcpCtlRstMetricTag from protobuf object *otg.PatternFlowTcpCtlRstMetricTag + FromProto(msg *otg.PatternFlowTcpCtlRstMetricTag) (PatternFlowTcpCtlRstMetricTag, error) + // FromPbText unmarshals PatternFlowTcpCtlRstMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlRstMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlRstMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlRstMetricTag) Marshal() marshalPatternFlowTcpCtlRstMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlRstMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlRstMetricTag) Unmarshal() unMarshalPatternFlowTcpCtlRstMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlRstMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlRstMetricTag) ToProto() (*otg.PatternFlowTcpCtlRstMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlRstMetricTag) FromProto(msg *otg.PatternFlowTcpCtlRstMetricTag) (PatternFlowTcpCtlRstMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlRstMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlRstMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlRstMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlRstMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlRstMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlRstMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlRstMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlRstMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlRstMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlRstMetricTag) Clone() (PatternFlowTcpCtlRstMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlRstMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpCtlRstMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpCtlRstMetricTag interface { + Validation + // msg marshals PatternFlowTcpCtlRstMetricTag to protobuf object *otg.PatternFlowTcpCtlRstMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlRstMetricTag + // setMsg unmarshals PatternFlowTcpCtlRstMetricTag from protobuf object *otg.PatternFlowTcpCtlRstMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlRstMetricTag) PatternFlowTcpCtlRstMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlRstMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlRstMetricTag + // validate validates PatternFlowTcpCtlRstMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlRstMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpCtlRstMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpCtlRstMetricTag + SetName(value string) PatternFlowTcpCtlRstMetricTag + // Offset returns uint32, set in PatternFlowTcpCtlRstMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpCtlRstMetricTag + SetOffset(value uint32) PatternFlowTcpCtlRstMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpCtlRstMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpCtlRstMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpCtlRstMetricTag + SetLength(value uint32) PatternFlowTcpCtlRstMetricTag + // HasLength checks if Length has been set in PatternFlowTcpCtlRstMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpCtlRstMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpCtlRstMetricTag object +func (obj *patternFlowTcpCtlRstMetricTag) SetName(value string) PatternFlowTcpCtlRstMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpCtlRstMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpCtlRstMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpCtlRstMetricTag object +func (obj *patternFlowTcpCtlRstMetricTag) SetOffset(value uint32) PatternFlowTcpCtlRstMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpCtlRstMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpCtlRstMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpCtlRstMetricTag object +func (obj *patternFlowTcpCtlRstMetricTag) SetLength(value uint32) PatternFlowTcpCtlRstMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpCtlRstMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpCtlRstMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlRstMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpCtlRstMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpCtlRstMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_syn.go b/gosnappi/pattern_flow_tcp_ctl_syn.go new file mode 100644 index 00000000..83446229 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_syn.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlSyn ***** +type patternFlowTcpCtlSyn struct { + validation + obj *otg.PatternFlowTcpCtlSyn + marshaller marshalPatternFlowTcpCtlSyn + unMarshaller unMarshalPatternFlowTcpCtlSyn + incrementHolder PatternFlowTcpCtlSynCounter + decrementHolder PatternFlowTcpCtlSynCounter + metricTagsHolder PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter +} + +func NewPatternFlowTcpCtlSyn() PatternFlowTcpCtlSyn { + obj := patternFlowTcpCtlSyn{obj: &otg.PatternFlowTcpCtlSyn{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlSyn) msg() *otg.PatternFlowTcpCtlSyn { + return obj.obj +} + +func (obj *patternFlowTcpCtlSyn) setMsg(msg *otg.PatternFlowTcpCtlSyn) PatternFlowTcpCtlSyn { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlSyn struct { + obj *patternFlowTcpCtlSyn +} + +type marshalPatternFlowTcpCtlSyn interface { + // ToProto marshals PatternFlowTcpCtlSyn to protobuf object *otg.PatternFlowTcpCtlSyn + ToProto() (*otg.PatternFlowTcpCtlSyn, error) + // ToPbText marshals PatternFlowTcpCtlSyn to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlSyn to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlSyn to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlSyn struct { + obj *patternFlowTcpCtlSyn +} + +type unMarshalPatternFlowTcpCtlSyn interface { + // FromProto unmarshals PatternFlowTcpCtlSyn from protobuf object *otg.PatternFlowTcpCtlSyn + FromProto(msg *otg.PatternFlowTcpCtlSyn) (PatternFlowTcpCtlSyn, error) + // FromPbText unmarshals PatternFlowTcpCtlSyn from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlSyn from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlSyn from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlSyn) Marshal() marshalPatternFlowTcpCtlSyn { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlSyn{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlSyn) Unmarshal() unMarshalPatternFlowTcpCtlSyn { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlSyn{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlSyn) ToProto() (*otg.PatternFlowTcpCtlSyn, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlSyn) FromProto(msg *otg.PatternFlowTcpCtlSyn) (PatternFlowTcpCtlSyn, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlSyn) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlSyn) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlSyn) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlSyn) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlSyn) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlSyn) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlSyn) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlSyn) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlSyn) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlSyn) Clone() (PatternFlowTcpCtlSyn, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlSyn() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpCtlSyn) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpCtlSyn is synchronize sequenece numbers. +type PatternFlowTcpCtlSyn interface { + Validation + // msg marshals PatternFlowTcpCtlSyn to protobuf object *otg.PatternFlowTcpCtlSyn + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlSyn + // setMsg unmarshals PatternFlowTcpCtlSyn from protobuf object *otg.PatternFlowTcpCtlSyn + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlSyn) PatternFlowTcpCtlSyn + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlSyn + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlSyn + // validate validates PatternFlowTcpCtlSyn + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlSyn, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpCtlSynChoiceEnum, set in PatternFlowTcpCtlSyn + Choice() PatternFlowTcpCtlSynChoiceEnum + // setChoice assigns PatternFlowTcpCtlSynChoiceEnum provided by user to PatternFlowTcpCtlSyn + setChoice(value PatternFlowTcpCtlSynChoiceEnum) PatternFlowTcpCtlSyn + // HasChoice checks if Choice has been set in PatternFlowTcpCtlSyn + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpCtlSyn. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpCtlSyn + SetValue(value uint32) PatternFlowTcpCtlSyn + // HasValue checks if Value has been set in PatternFlowTcpCtlSyn + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpCtlSyn. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpCtlSyn + SetValues(value []uint32) PatternFlowTcpCtlSyn + // Increment returns PatternFlowTcpCtlSynCounter, set in PatternFlowTcpCtlSyn. + // PatternFlowTcpCtlSynCounter is integer counter pattern + Increment() PatternFlowTcpCtlSynCounter + // SetIncrement assigns PatternFlowTcpCtlSynCounter provided by user to PatternFlowTcpCtlSyn. + // PatternFlowTcpCtlSynCounter is integer counter pattern + SetIncrement(value PatternFlowTcpCtlSynCounter) PatternFlowTcpCtlSyn + // HasIncrement checks if Increment has been set in PatternFlowTcpCtlSyn + HasIncrement() bool + // Decrement returns PatternFlowTcpCtlSynCounter, set in PatternFlowTcpCtlSyn. + // PatternFlowTcpCtlSynCounter is integer counter pattern + Decrement() PatternFlowTcpCtlSynCounter + // SetDecrement assigns PatternFlowTcpCtlSynCounter provided by user to PatternFlowTcpCtlSyn. + // PatternFlowTcpCtlSynCounter is integer counter pattern + SetDecrement(value PatternFlowTcpCtlSynCounter) PatternFlowTcpCtlSyn + // HasDecrement checks if Decrement has been set in PatternFlowTcpCtlSyn + HasDecrement() bool + // MetricTags returns PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIterIter, set in PatternFlowTcpCtlSyn + MetricTags() PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter + setNil() +} + +type PatternFlowTcpCtlSynChoiceEnum string + +// Enum of Choice on PatternFlowTcpCtlSyn +var PatternFlowTcpCtlSynChoice = struct { + VALUE PatternFlowTcpCtlSynChoiceEnum + VALUES PatternFlowTcpCtlSynChoiceEnum + INCREMENT PatternFlowTcpCtlSynChoiceEnum + DECREMENT PatternFlowTcpCtlSynChoiceEnum +}{ + VALUE: PatternFlowTcpCtlSynChoiceEnum("value"), + VALUES: PatternFlowTcpCtlSynChoiceEnum("values"), + INCREMENT: PatternFlowTcpCtlSynChoiceEnum("increment"), + DECREMENT: PatternFlowTcpCtlSynChoiceEnum("decrement"), +} + +func (obj *patternFlowTcpCtlSyn) Choice() PatternFlowTcpCtlSynChoiceEnum { + return PatternFlowTcpCtlSynChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpCtlSyn) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpCtlSyn) setChoice(value PatternFlowTcpCtlSynChoiceEnum) PatternFlowTcpCtlSyn { + intValue, ok := otg.PatternFlowTcpCtlSyn_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpCtlSynChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpCtlSyn_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpCtlSynChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpCtlSynChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpCtlSynChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpCtlSynCounter().msg() + } + + if value == PatternFlowTcpCtlSynChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpCtlSynCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpCtlSyn) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpCtlSynChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpCtlSyn) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpCtlSyn object +func (obj *patternFlowTcpCtlSyn) SetValue(value uint32) PatternFlowTcpCtlSyn { + obj.setChoice(PatternFlowTcpCtlSynChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpCtlSyn) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpCtlSyn object +func (obj *patternFlowTcpCtlSyn) SetValues(value []uint32) PatternFlowTcpCtlSyn { + obj.setChoice(PatternFlowTcpCtlSynChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpCtlSynCounter +func (obj *patternFlowTcpCtlSyn) Increment() PatternFlowTcpCtlSynCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpCtlSynChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpCtlSynCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpCtlSynCounter +func (obj *patternFlowTcpCtlSyn) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpCtlSynCounter value in the PatternFlowTcpCtlSyn object +func (obj *patternFlowTcpCtlSyn) SetIncrement(value PatternFlowTcpCtlSynCounter) PatternFlowTcpCtlSyn { + obj.setChoice(PatternFlowTcpCtlSynChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpCtlSynCounter +func (obj *patternFlowTcpCtlSyn) Decrement() PatternFlowTcpCtlSynCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpCtlSynChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpCtlSynCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpCtlSynCounter +func (obj *patternFlowTcpCtlSyn) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpCtlSynCounter value in the PatternFlowTcpCtlSyn object +func (obj *patternFlowTcpCtlSyn) SetDecrement(value PatternFlowTcpCtlSynCounter) PatternFlowTcpCtlSyn { + obj.setChoice(PatternFlowTcpCtlSynChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpCtlSynMetricTag +func (obj *patternFlowTcpCtlSyn) MetricTags() PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpCtlSynMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter struct { + obj *patternFlowTcpCtlSyn + patternFlowTcpCtlSynMetricTagSlice []PatternFlowTcpCtlSynMetricTag + fieldPtr *[]*otg.PatternFlowTcpCtlSynMetricTag +} + +func newPatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter(ptr *[]*otg.PatternFlowTcpCtlSynMetricTag) PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter { + return &patternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter interface { + setMsg(*patternFlowTcpCtlSyn) PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter + Items() []PatternFlowTcpCtlSynMetricTag + Add() PatternFlowTcpCtlSynMetricTag + Append(items ...PatternFlowTcpCtlSynMetricTag) PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter + Set(index int, newObj PatternFlowTcpCtlSynMetricTag) PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter + Clear() PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter + clearHolderSlice() PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter + appendHolderSlice(item PatternFlowTcpCtlSynMetricTag) PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter +} + +func (obj *patternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter) setMsg(msg *patternFlowTcpCtlSyn) PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpCtlSynMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter) Items() []PatternFlowTcpCtlSynMetricTag { + return obj.patternFlowTcpCtlSynMetricTagSlice +} + +func (obj *patternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter) Add() PatternFlowTcpCtlSynMetricTag { + newObj := &otg.PatternFlowTcpCtlSynMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpCtlSynMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpCtlSynMetricTagSlice = append(obj.patternFlowTcpCtlSynMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter) Append(items ...PatternFlowTcpCtlSynMetricTag) PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpCtlSynMetricTagSlice = append(obj.patternFlowTcpCtlSynMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter) Set(index int, newObj PatternFlowTcpCtlSynMetricTag) PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpCtlSynMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter) Clear() PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpCtlSynMetricTag{} + obj.patternFlowTcpCtlSynMetricTagSlice = []PatternFlowTcpCtlSynMetricTag{} + } + return obj +} +func (obj *patternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter) clearHolderSlice() PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter { + if len(obj.patternFlowTcpCtlSynMetricTagSlice) > 0 { + obj.patternFlowTcpCtlSynMetricTagSlice = []PatternFlowTcpCtlSynMetricTag{} + } + return obj +} +func (obj *patternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter) appendHolderSlice(item PatternFlowTcpCtlSynMetricTag) PatternFlowTcpCtlSynPatternFlowTcpCtlSynMetricTagIter { + obj.patternFlowTcpCtlSynMetricTagSlice = append(obj.patternFlowTcpCtlSynMetricTagSlice, item) + return obj +} + +func (obj *patternFlowTcpCtlSyn) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlSyn.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowTcpCtlSyn.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpCtlSynMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowTcpCtlSyn) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpCtlSynChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpCtlSynChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpCtlSynChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpCtlSynChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpCtlSynChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpCtlSynChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpCtlSyn") + } + } else { + intVal := otg.PatternFlowTcpCtlSyn_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpCtlSyn_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_syn_counter.go b/gosnappi/pattern_flow_tcp_ctl_syn_counter.go new file mode 100644 index 00000000..3539f039 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_syn_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlSynCounter ***** +type patternFlowTcpCtlSynCounter struct { + validation + obj *otg.PatternFlowTcpCtlSynCounter + marshaller marshalPatternFlowTcpCtlSynCounter + unMarshaller unMarshalPatternFlowTcpCtlSynCounter +} + +func NewPatternFlowTcpCtlSynCounter() PatternFlowTcpCtlSynCounter { + obj := patternFlowTcpCtlSynCounter{obj: &otg.PatternFlowTcpCtlSynCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlSynCounter) msg() *otg.PatternFlowTcpCtlSynCounter { + return obj.obj +} + +func (obj *patternFlowTcpCtlSynCounter) setMsg(msg *otg.PatternFlowTcpCtlSynCounter) PatternFlowTcpCtlSynCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlSynCounter struct { + obj *patternFlowTcpCtlSynCounter +} + +type marshalPatternFlowTcpCtlSynCounter interface { + // ToProto marshals PatternFlowTcpCtlSynCounter to protobuf object *otg.PatternFlowTcpCtlSynCounter + ToProto() (*otg.PatternFlowTcpCtlSynCounter, error) + // ToPbText marshals PatternFlowTcpCtlSynCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlSynCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlSynCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlSynCounter struct { + obj *patternFlowTcpCtlSynCounter +} + +type unMarshalPatternFlowTcpCtlSynCounter interface { + // FromProto unmarshals PatternFlowTcpCtlSynCounter from protobuf object *otg.PatternFlowTcpCtlSynCounter + FromProto(msg *otg.PatternFlowTcpCtlSynCounter) (PatternFlowTcpCtlSynCounter, error) + // FromPbText unmarshals PatternFlowTcpCtlSynCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlSynCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlSynCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlSynCounter) Marshal() marshalPatternFlowTcpCtlSynCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlSynCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlSynCounter) Unmarshal() unMarshalPatternFlowTcpCtlSynCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlSynCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlSynCounter) ToProto() (*otg.PatternFlowTcpCtlSynCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlSynCounter) FromProto(msg *otg.PatternFlowTcpCtlSynCounter) (PatternFlowTcpCtlSynCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlSynCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlSynCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlSynCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlSynCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlSynCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlSynCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlSynCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlSynCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlSynCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlSynCounter) Clone() (PatternFlowTcpCtlSynCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlSynCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpCtlSynCounter is integer counter pattern +type PatternFlowTcpCtlSynCounter interface { + Validation + // msg marshals PatternFlowTcpCtlSynCounter to protobuf object *otg.PatternFlowTcpCtlSynCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlSynCounter + // setMsg unmarshals PatternFlowTcpCtlSynCounter from protobuf object *otg.PatternFlowTcpCtlSynCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlSynCounter) PatternFlowTcpCtlSynCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlSynCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlSynCounter + // validate validates PatternFlowTcpCtlSynCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlSynCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpCtlSynCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpCtlSynCounter + SetStart(value uint32) PatternFlowTcpCtlSynCounter + // HasStart checks if Start has been set in PatternFlowTcpCtlSynCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpCtlSynCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpCtlSynCounter + SetStep(value uint32) PatternFlowTcpCtlSynCounter + // HasStep checks if Step has been set in PatternFlowTcpCtlSynCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpCtlSynCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpCtlSynCounter + SetCount(value uint32) PatternFlowTcpCtlSynCounter + // HasCount checks if Count has been set in PatternFlowTcpCtlSynCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpCtlSynCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpCtlSynCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpCtlSynCounter object +func (obj *patternFlowTcpCtlSynCounter) SetStart(value uint32) PatternFlowTcpCtlSynCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpCtlSynCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpCtlSynCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpCtlSynCounter object +func (obj *patternFlowTcpCtlSynCounter) SetStep(value uint32) PatternFlowTcpCtlSynCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpCtlSynCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpCtlSynCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpCtlSynCounter object +func (obj *patternFlowTcpCtlSynCounter) SetCount(value uint32) PatternFlowTcpCtlSynCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpCtlSynCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlSynCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlSynCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlSynCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowTcpCtlSynCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_syn_metric_tag.go b/gosnappi/pattern_flow_tcp_ctl_syn_metric_tag.go new file mode 100644 index 00000000..4db8adf7 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_syn_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlSynMetricTag ***** +type patternFlowTcpCtlSynMetricTag struct { + validation + obj *otg.PatternFlowTcpCtlSynMetricTag + marshaller marshalPatternFlowTcpCtlSynMetricTag + unMarshaller unMarshalPatternFlowTcpCtlSynMetricTag +} + +func NewPatternFlowTcpCtlSynMetricTag() PatternFlowTcpCtlSynMetricTag { + obj := patternFlowTcpCtlSynMetricTag{obj: &otg.PatternFlowTcpCtlSynMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlSynMetricTag) msg() *otg.PatternFlowTcpCtlSynMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpCtlSynMetricTag) setMsg(msg *otg.PatternFlowTcpCtlSynMetricTag) PatternFlowTcpCtlSynMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlSynMetricTag struct { + obj *patternFlowTcpCtlSynMetricTag +} + +type marshalPatternFlowTcpCtlSynMetricTag interface { + // ToProto marshals PatternFlowTcpCtlSynMetricTag to protobuf object *otg.PatternFlowTcpCtlSynMetricTag + ToProto() (*otg.PatternFlowTcpCtlSynMetricTag, error) + // ToPbText marshals PatternFlowTcpCtlSynMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlSynMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlSynMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlSynMetricTag struct { + obj *patternFlowTcpCtlSynMetricTag +} + +type unMarshalPatternFlowTcpCtlSynMetricTag interface { + // FromProto unmarshals PatternFlowTcpCtlSynMetricTag from protobuf object *otg.PatternFlowTcpCtlSynMetricTag + FromProto(msg *otg.PatternFlowTcpCtlSynMetricTag) (PatternFlowTcpCtlSynMetricTag, error) + // FromPbText unmarshals PatternFlowTcpCtlSynMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlSynMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlSynMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlSynMetricTag) Marshal() marshalPatternFlowTcpCtlSynMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlSynMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlSynMetricTag) Unmarshal() unMarshalPatternFlowTcpCtlSynMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlSynMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlSynMetricTag) ToProto() (*otg.PatternFlowTcpCtlSynMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlSynMetricTag) FromProto(msg *otg.PatternFlowTcpCtlSynMetricTag) (PatternFlowTcpCtlSynMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlSynMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlSynMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlSynMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlSynMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlSynMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlSynMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlSynMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlSynMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlSynMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlSynMetricTag) Clone() (PatternFlowTcpCtlSynMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlSynMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpCtlSynMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpCtlSynMetricTag interface { + Validation + // msg marshals PatternFlowTcpCtlSynMetricTag to protobuf object *otg.PatternFlowTcpCtlSynMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlSynMetricTag + // setMsg unmarshals PatternFlowTcpCtlSynMetricTag from protobuf object *otg.PatternFlowTcpCtlSynMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlSynMetricTag) PatternFlowTcpCtlSynMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlSynMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlSynMetricTag + // validate validates PatternFlowTcpCtlSynMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlSynMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpCtlSynMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpCtlSynMetricTag + SetName(value string) PatternFlowTcpCtlSynMetricTag + // Offset returns uint32, set in PatternFlowTcpCtlSynMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpCtlSynMetricTag + SetOffset(value uint32) PatternFlowTcpCtlSynMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpCtlSynMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpCtlSynMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpCtlSynMetricTag + SetLength(value uint32) PatternFlowTcpCtlSynMetricTag + // HasLength checks if Length has been set in PatternFlowTcpCtlSynMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpCtlSynMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpCtlSynMetricTag object +func (obj *patternFlowTcpCtlSynMetricTag) SetName(value string) PatternFlowTcpCtlSynMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpCtlSynMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpCtlSynMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpCtlSynMetricTag object +func (obj *patternFlowTcpCtlSynMetricTag) SetOffset(value uint32) PatternFlowTcpCtlSynMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpCtlSynMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpCtlSynMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpCtlSynMetricTag object +func (obj *patternFlowTcpCtlSynMetricTag) SetLength(value uint32) PatternFlowTcpCtlSynMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpCtlSynMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpCtlSynMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlSynMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpCtlSynMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpCtlSynMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_urg.go b/gosnappi/pattern_flow_tcp_ctl_urg.go new file mode 100644 index 00000000..bc61450b --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_urg.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlUrg ***** +type patternFlowTcpCtlUrg struct { + validation + obj *otg.PatternFlowTcpCtlUrg + marshaller marshalPatternFlowTcpCtlUrg + unMarshaller unMarshalPatternFlowTcpCtlUrg + incrementHolder PatternFlowTcpCtlUrgCounter + decrementHolder PatternFlowTcpCtlUrgCounter + metricTagsHolder PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter +} + +func NewPatternFlowTcpCtlUrg() PatternFlowTcpCtlUrg { + obj := patternFlowTcpCtlUrg{obj: &otg.PatternFlowTcpCtlUrg{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlUrg) msg() *otg.PatternFlowTcpCtlUrg { + return obj.obj +} + +func (obj *patternFlowTcpCtlUrg) setMsg(msg *otg.PatternFlowTcpCtlUrg) PatternFlowTcpCtlUrg { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlUrg struct { + obj *patternFlowTcpCtlUrg +} + +type marshalPatternFlowTcpCtlUrg interface { + // ToProto marshals PatternFlowTcpCtlUrg to protobuf object *otg.PatternFlowTcpCtlUrg + ToProto() (*otg.PatternFlowTcpCtlUrg, error) + // ToPbText marshals PatternFlowTcpCtlUrg to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlUrg to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlUrg to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlUrg struct { + obj *patternFlowTcpCtlUrg +} + +type unMarshalPatternFlowTcpCtlUrg interface { + // FromProto unmarshals PatternFlowTcpCtlUrg from protobuf object *otg.PatternFlowTcpCtlUrg + FromProto(msg *otg.PatternFlowTcpCtlUrg) (PatternFlowTcpCtlUrg, error) + // FromPbText unmarshals PatternFlowTcpCtlUrg from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlUrg from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlUrg from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlUrg) Marshal() marshalPatternFlowTcpCtlUrg { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlUrg{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlUrg) Unmarshal() unMarshalPatternFlowTcpCtlUrg { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlUrg{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlUrg) ToProto() (*otg.PatternFlowTcpCtlUrg, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlUrg) FromProto(msg *otg.PatternFlowTcpCtlUrg) (PatternFlowTcpCtlUrg, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlUrg) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlUrg) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlUrg) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlUrg) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlUrg) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlUrg) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlUrg) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlUrg) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlUrg) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlUrg) Clone() (PatternFlowTcpCtlUrg, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlUrg() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpCtlUrg) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpCtlUrg is a value of 1 indicates that the urgent pointer field is significant. +type PatternFlowTcpCtlUrg interface { + Validation + // msg marshals PatternFlowTcpCtlUrg to protobuf object *otg.PatternFlowTcpCtlUrg + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlUrg + // setMsg unmarshals PatternFlowTcpCtlUrg from protobuf object *otg.PatternFlowTcpCtlUrg + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlUrg) PatternFlowTcpCtlUrg + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlUrg + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlUrg + // validate validates PatternFlowTcpCtlUrg + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlUrg, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpCtlUrgChoiceEnum, set in PatternFlowTcpCtlUrg + Choice() PatternFlowTcpCtlUrgChoiceEnum + // setChoice assigns PatternFlowTcpCtlUrgChoiceEnum provided by user to PatternFlowTcpCtlUrg + setChoice(value PatternFlowTcpCtlUrgChoiceEnum) PatternFlowTcpCtlUrg + // HasChoice checks if Choice has been set in PatternFlowTcpCtlUrg + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpCtlUrg. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpCtlUrg + SetValue(value uint32) PatternFlowTcpCtlUrg + // HasValue checks if Value has been set in PatternFlowTcpCtlUrg + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpCtlUrg. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpCtlUrg + SetValues(value []uint32) PatternFlowTcpCtlUrg + // Increment returns PatternFlowTcpCtlUrgCounter, set in PatternFlowTcpCtlUrg. + // PatternFlowTcpCtlUrgCounter is integer counter pattern + Increment() PatternFlowTcpCtlUrgCounter + // SetIncrement assigns PatternFlowTcpCtlUrgCounter provided by user to PatternFlowTcpCtlUrg. + // PatternFlowTcpCtlUrgCounter is integer counter pattern + SetIncrement(value PatternFlowTcpCtlUrgCounter) PatternFlowTcpCtlUrg + // HasIncrement checks if Increment has been set in PatternFlowTcpCtlUrg + HasIncrement() bool + // Decrement returns PatternFlowTcpCtlUrgCounter, set in PatternFlowTcpCtlUrg. + // PatternFlowTcpCtlUrgCounter is integer counter pattern + Decrement() PatternFlowTcpCtlUrgCounter + // SetDecrement assigns PatternFlowTcpCtlUrgCounter provided by user to PatternFlowTcpCtlUrg. + // PatternFlowTcpCtlUrgCounter is integer counter pattern + SetDecrement(value PatternFlowTcpCtlUrgCounter) PatternFlowTcpCtlUrg + // HasDecrement checks if Decrement has been set in PatternFlowTcpCtlUrg + HasDecrement() bool + // MetricTags returns PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIterIter, set in PatternFlowTcpCtlUrg + MetricTags() PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter + setNil() +} + +type PatternFlowTcpCtlUrgChoiceEnum string + +// Enum of Choice on PatternFlowTcpCtlUrg +var PatternFlowTcpCtlUrgChoice = struct { + VALUE PatternFlowTcpCtlUrgChoiceEnum + VALUES PatternFlowTcpCtlUrgChoiceEnum + INCREMENT PatternFlowTcpCtlUrgChoiceEnum + DECREMENT PatternFlowTcpCtlUrgChoiceEnum +}{ + VALUE: PatternFlowTcpCtlUrgChoiceEnum("value"), + VALUES: PatternFlowTcpCtlUrgChoiceEnum("values"), + INCREMENT: PatternFlowTcpCtlUrgChoiceEnum("increment"), + DECREMENT: PatternFlowTcpCtlUrgChoiceEnum("decrement"), +} + +func (obj *patternFlowTcpCtlUrg) Choice() PatternFlowTcpCtlUrgChoiceEnum { + return PatternFlowTcpCtlUrgChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpCtlUrg) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpCtlUrg) setChoice(value PatternFlowTcpCtlUrgChoiceEnum) PatternFlowTcpCtlUrg { + intValue, ok := otg.PatternFlowTcpCtlUrg_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpCtlUrgChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpCtlUrg_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpCtlUrgChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpCtlUrgChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpCtlUrgChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpCtlUrgCounter().msg() + } + + if value == PatternFlowTcpCtlUrgChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpCtlUrgCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpCtlUrg) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpCtlUrgChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpCtlUrg) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpCtlUrg object +func (obj *patternFlowTcpCtlUrg) SetValue(value uint32) PatternFlowTcpCtlUrg { + obj.setChoice(PatternFlowTcpCtlUrgChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpCtlUrg) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpCtlUrg object +func (obj *patternFlowTcpCtlUrg) SetValues(value []uint32) PatternFlowTcpCtlUrg { + obj.setChoice(PatternFlowTcpCtlUrgChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpCtlUrgCounter +func (obj *patternFlowTcpCtlUrg) Increment() PatternFlowTcpCtlUrgCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpCtlUrgChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpCtlUrgCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpCtlUrgCounter +func (obj *patternFlowTcpCtlUrg) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpCtlUrgCounter value in the PatternFlowTcpCtlUrg object +func (obj *patternFlowTcpCtlUrg) SetIncrement(value PatternFlowTcpCtlUrgCounter) PatternFlowTcpCtlUrg { + obj.setChoice(PatternFlowTcpCtlUrgChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpCtlUrgCounter +func (obj *patternFlowTcpCtlUrg) Decrement() PatternFlowTcpCtlUrgCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpCtlUrgChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpCtlUrgCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpCtlUrgCounter +func (obj *patternFlowTcpCtlUrg) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpCtlUrgCounter value in the PatternFlowTcpCtlUrg object +func (obj *patternFlowTcpCtlUrg) SetDecrement(value PatternFlowTcpCtlUrgCounter) PatternFlowTcpCtlUrg { + obj.setChoice(PatternFlowTcpCtlUrgChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpCtlUrgMetricTag +func (obj *patternFlowTcpCtlUrg) MetricTags() PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpCtlUrgMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter struct { + obj *patternFlowTcpCtlUrg + patternFlowTcpCtlUrgMetricTagSlice []PatternFlowTcpCtlUrgMetricTag + fieldPtr *[]*otg.PatternFlowTcpCtlUrgMetricTag +} + +func newPatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter(ptr *[]*otg.PatternFlowTcpCtlUrgMetricTag) PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter { + return &patternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter interface { + setMsg(*patternFlowTcpCtlUrg) PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter + Items() []PatternFlowTcpCtlUrgMetricTag + Add() PatternFlowTcpCtlUrgMetricTag + Append(items ...PatternFlowTcpCtlUrgMetricTag) PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter + Set(index int, newObj PatternFlowTcpCtlUrgMetricTag) PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter + Clear() PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter + clearHolderSlice() PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter + appendHolderSlice(item PatternFlowTcpCtlUrgMetricTag) PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter +} + +func (obj *patternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter) setMsg(msg *patternFlowTcpCtlUrg) PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpCtlUrgMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter) Items() []PatternFlowTcpCtlUrgMetricTag { + return obj.patternFlowTcpCtlUrgMetricTagSlice +} + +func (obj *patternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter) Add() PatternFlowTcpCtlUrgMetricTag { + newObj := &otg.PatternFlowTcpCtlUrgMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpCtlUrgMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpCtlUrgMetricTagSlice = append(obj.patternFlowTcpCtlUrgMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter) Append(items ...PatternFlowTcpCtlUrgMetricTag) PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpCtlUrgMetricTagSlice = append(obj.patternFlowTcpCtlUrgMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter) Set(index int, newObj PatternFlowTcpCtlUrgMetricTag) PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpCtlUrgMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter) Clear() PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpCtlUrgMetricTag{} + obj.patternFlowTcpCtlUrgMetricTagSlice = []PatternFlowTcpCtlUrgMetricTag{} + } + return obj +} +func (obj *patternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter) clearHolderSlice() PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter { + if len(obj.patternFlowTcpCtlUrgMetricTagSlice) > 0 { + obj.patternFlowTcpCtlUrgMetricTagSlice = []PatternFlowTcpCtlUrgMetricTag{} + } + return obj +} +func (obj *patternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter) appendHolderSlice(item PatternFlowTcpCtlUrgMetricTag) PatternFlowTcpCtlUrgPatternFlowTcpCtlUrgMetricTagIter { + obj.patternFlowTcpCtlUrgMetricTagSlice = append(obj.patternFlowTcpCtlUrgMetricTagSlice, item) + return obj +} + +func (obj *patternFlowTcpCtlUrg) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlUrg.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowTcpCtlUrg.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpCtlUrgMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowTcpCtlUrg) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpCtlUrgChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpCtlUrgChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpCtlUrgChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpCtlUrgChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpCtlUrgChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpCtlUrgChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpCtlUrg") + } + } else { + intVal := otg.PatternFlowTcpCtlUrg_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpCtlUrg_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_urg_counter.go b/gosnappi/pattern_flow_tcp_ctl_urg_counter.go new file mode 100644 index 00000000..ae3ac109 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_urg_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlUrgCounter ***** +type patternFlowTcpCtlUrgCounter struct { + validation + obj *otg.PatternFlowTcpCtlUrgCounter + marshaller marshalPatternFlowTcpCtlUrgCounter + unMarshaller unMarshalPatternFlowTcpCtlUrgCounter +} + +func NewPatternFlowTcpCtlUrgCounter() PatternFlowTcpCtlUrgCounter { + obj := patternFlowTcpCtlUrgCounter{obj: &otg.PatternFlowTcpCtlUrgCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlUrgCounter) msg() *otg.PatternFlowTcpCtlUrgCounter { + return obj.obj +} + +func (obj *patternFlowTcpCtlUrgCounter) setMsg(msg *otg.PatternFlowTcpCtlUrgCounter) PatternFlowTcpCtlUrgCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlUrgCounter struct { + obj *patternFlowTcpCtlUrgCounter +} + +type marshalPatternFlowTcpCtlUrgCounter interface { + // ToProto marshals PatternFlowTcpCtlUrgCounter to protobuf object *otg.PatternFlowTcpCtlUrgCounter + ToProto() (*otg.PatternFlowTcpCtlUrgCounter, error) + // ToPbText marshals PatternFlowTcpCtlUrgCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlUrgCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlUrgCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlUrgCounter struct { + obj *patternFlowTcpCtlUrgCounter +} + +type unMarshalPatternFlowTcpCtlUrgCounter interface { + // FromProto unmarshals PatternFlowTcpCtlUrgCounter from protobuf object *otg.PatternFlowTcpCtlUrgCounter + FromProto(msg *otg.PatternFlowTcpCtlUrgCounter) (PatternFlowTcpCtlUrgCounter, error) + // FromPbText unmarshals PatternFlowTcpCtlUrgCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlUrgCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlUrgCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlUrgCounter) Marshal() marshalPatternFlowTcpCtlUrgCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlUrgCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlUrgCounter) Unmarshal() unMarshalPatternFlowTcpCtlUrgCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlUrgCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlUrgCounter) ToProto() (*otg.PatternFlowTcpCtlUrgCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlUrgCounter) FromProto(msg *otg.PatternFlowTcpCtlUrgCounter) (PatternFlowTcpCtlUrgCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlUrgCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlUrgCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlUrgCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlUrgCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlUrgCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlUrgCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlUrgCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlUrgCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlUrgCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlUrgCounter) Clone() (PatternFlowTcpCtlUrgCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlUrgCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpCtlUrgCounter is integer counter pattern +type PatternFlowTcpCtlUrgCounter interface { + Validation + // msg marshals PatternFlowTcpCtlUrgCounter to protobuf object *otg.PatternFlowTcpCtlUrgCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlUrgCounter + // setMsg unmarshals PatternFlowTcpCtlUrgCounter from protobuf object *otg.PatternFlowTcpCtlUrgCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlUrgCounter) PatternFlowTcpCtlUrgCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlUrgCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlUrgCounter + // validate validates PatternFlowTcpCtlUrgCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlUrgCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpCtlUrgCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpCtlUrgCounter + SetStart(value uint32) PatternFlowTcpCtlUrgCounter + // HasStart checks if Start has been set in PatternFlowTcpCtlUrgCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpCtlUrgCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpCtlUrgCounter + SetStep(value uint32) PatternFlowTcpCtlUrgCounter + // HasStep checks if Step has been set in PatternFlowTcpCtlUrgCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpCtlUrgCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpCtlUrgCounter + SetCount(value uint32) PatternFlowTcpCtlUrgCounter + // HasCount checks if Count has been set in PatternFlowTcpCtlUrgCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpCtlUrgCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpCtlUrgCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpCtlUrgCounter object +func (obj *patternFlowTcpCtlUrgCounter) SetStart(value uint32) PatternFlowTcpCtlUrgCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpCtlUrgCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpCtlUrgCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpCtlUrgCounter object +func (obj *patternFlowTcpCtlUrgCounter) SetStep(value uint32) PatternFlowTcpCtlUrgCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpCtlUrgCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpCtlUrgCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpCtlUrgCounter object +func (obj *patternFlowTcpCtlUrgCounter) SetCount(value uint32) PatternFlowTcpCtlUrgCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpCtlUrgCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlUrgCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlUrgCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlUrgCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowTcpCtlUrgCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ctl_urg_metric_tag.go b/gosnappi/pattern_flow_tcp_ctl_urg_metric_tag.go new file mode 100644 index 00000000..7bfee731 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ctl_urg_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpCtlUrgMetricTag ***** +type patternFlowTcpCtlUrgMetricTag struct { + validation + obj *otg.PatternFlowTcpCtlUrgMetricTag + marshaller marshalPatternFlowTcpCtlUrgMetricTag + unMarshaller unMarshalPatternFlowTcpCtlUrgMetricTag +} + +func NewPatternFlowTcpCtlUrgMetricTag() PatternFlowTcpCtlUrgMetricTag { + obj := patternFlowTcpCtlUrgMetricTag{obj: &otg.PatternFlowTcpCtlUrgMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpCtlUrgMetricTag) msg() *otg.PatternFlowTcpCtlUrgMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpCtlUrgMetricTag) setMsg(msg *otg.PatternFlowTcpCtlUrgMetricTag) PatternFlowTcpCtlUrgMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpCtlUrgMetricTag struct { + obj *patternFlowTcpCtlUrgMetricTag +} + +type marshalPatternFlowTcpCtlUrgMetricTag interface { + // ToProto marshals PatternFlowTcpCtlUrgMetricTag to protobuf object *otg.PatternFlowTcpCtlUrgMetricTag + ToProto() (*otg.PatternFlowTcpCtlUrgMetricTag, error) + // ToPbText marshals PatternFlowTcpCtlUrgMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpCtlUrgMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpCtlUrgMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpCtlUrgMetricTag struct { + obj *patternFlowTcpCtlUrgMetricTag +} + +type unMarshalPatternFlowTcpCtlUrgMetricTag interface { + // FromProto unmarshals PatternFlowTcpCtlUrgMetricTag from protobuf object *otg.PatternFlowTcpCtlUrgMetricTag + FromProto(msg *otg.PatternFlowTcpCtlUrgMetricTag) (PatternFlowTcpCtlUrgMetricTag, error) + // FromPbText unmarshals PatternFlowTcpCtlUrgMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpCtlUrgMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpCtlUrgMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpCtlUrgMetricTag) Marshal() marshalPatternFlowTcpCtlUrgMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpCtlUrgMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpCtlUrgMetricTag) Unmarshal() unMarshalPatternFlowTcpCtlUrgMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpCtlUrgMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpCtlUrgMetricTag) ToProto() (*otg.PatternFlowTcpCtlUrgMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpCtlUrgMetricTag) FromProto(msg *otg.PatternFlowTcpCtlUrgMetricTag) (PatternFlowTcpCtlUrgMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpCtlUrgMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpCtlUrgMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpCtlUrgMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlUrgMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpCtlUrgMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpCtlUrgMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpCtlUrgMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlUrgMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpCtlUrgMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpCtlUrgMetricTag) Clone() (PatternFlowTcpCtlUrgMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpCtlUrgMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpCtlUrgMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpCtlUrgMetricTag interface { + Validation + // msg marshals PatternFlowTcpCtlUrgMetricTag to protobuf object *otg.PatternFlowTcpCtlUrgMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpCtlUrgMetricTag + // setMsg unmarshals PatternFlowTcpCtlUrgMetricTag from protobuf object *otg.PatternFlowTcpCtlUrgMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpCtlUrgMetricTag) PatternFlowTcpCtlUrgMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpCtlUrgMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpCtlUrgMetricTag + // validate validates PatternFlowTcpCtlUrgMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpCtlUrgMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpCtlUrgMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpCtlUrgMetricTag + SetName(value string) PatternFlowTcpCtlUrgMetricTag + // Offset returns uint32, set in PatternFlowTcpCtlUrgMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpCtlUrgMetricTag + SetOffset(value uint32) PatternFlowTcpCtlUrgMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpCtlUrgMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpCtlUrgMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpCtlUrgMetricTag + SetLength(value uint32) PatternFlowTcpCtlUrgMetricTag + // HasLength checks if Length has been set in PatternFlowTcpCtlUrgMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpCtlUrgMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpCtlUrgMetricTag object +func (obj *patternFlowTcpCtlUrgMetricTag) SetName(value string) PatternFlowTcpCtlUrgMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpCtlUrgMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpCtlUrgMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpCtlUrgMetricTag object +func (obj *patternFlowTcpCtlUrgMetricTag) SetOffset(value uint32) PatternFlowTcpCtlUrgMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpCtlUrgMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpCtlUrgMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpCtlUrgMetricTag object +func (obj *patternFlowTcpCtlUrgMetricTag) SetLength(value uint32) PatternFlowTcpCtlUrgMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpCtlUrgMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpCtlUrgMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpCtlUrgMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpCtlUrgMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpCtlUrgMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_data_offset.go b/gosnappi/pattern_flow_tcp_data_offset.go new file mode 100644 index 00000000..0b1cc4f4 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_data_offset.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpDataOffset ***** +type patternFlowTcpDataOffset struct { + validation + obj *otg.PatternFlowTcpDataOffset + marshaller marshalPatternFlowTcpDataOffset + unMarshaller unMarshalPatternFlowTcpDataOffset + incrementHolder PatternFlowTcpDataOffsetCounter + decrementHolder PatternFlowTcpDataOffsetCounter + metricTagsHolder PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter +} + +func NewPatternFlowTcpDataOffset() PatternFlowTcpDataOffset { + obj := patternFlowTcpDataOffset{obj: &otg.PatternFlowTcpDataOffset{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpDataOffset) msg() *otg.PatternFlowTcpDataOffset { + return obj.obj +} + +func (obj *patternFlowTcpDataOffset) setMsg(msg *otg.PatternFlowTcpDataOffset) PatternFlowTcpDataOffset { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpDataOffset struct { + obj *patternFlowTcpDataOffset +} + +type marshalPatternFlowTcpDataOffset interface { + // ToProto marshals PatternFlowTcpDataOffset to protobuf object *otg.PatternFlowTcpDataOffset + ToProto() (*otg.PatternFlowTcpDataOffset, error) + // ToPbText marshals PatternFlowTcpDataOffset to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpDataOffset to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpDataOffset to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpDataOffset struct { + obj *patternFlowTcpDataOffset +} + +type unMarshalPatternFlowTcpDataOffset interface { + // FromProto unmarshals PatternFlowTcpDataOffset from protobuf object *otg.PatternFlowTcpDataOffset + FromProto(msg *otg.PatternFlowTcpDataOffset) (PatternFlowTcpDataOffset, error) + // FromPbText unmarshals PatternFlowTcpDataOffset from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpDataOffset from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpDataOffset from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpDataOffset) Marshal() marshalPatternFlowTcpDataOffset { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpDataOffset{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpDataOffset) Unmarshal() unMarshalPatternFlowTcpDataOffset { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpDataOffset{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpDataOffset) ToProto() (*otg.PatternFlowTcpDataOffset, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpDataOffset) FromProto(msg *otg.PatternFlowTcpDataOffset) (PatternFlowTcpDataOffset, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpDataOffset) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpDataOffset) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpDataOffset) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpDataOffset) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpDataOffset) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpDataOffset) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpDataOffset) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpDataOffset) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpDataOffset) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpDataOffset) Clone() (PatternFlowTcpDataOffset, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpDataOffset() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpDataOffset) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpDataOffset is the number of 32 bit words in the TCP header. This indicates where the data begins. +type PatternFlowTcpDataOffset interface { + Validation + // msg marshals PatternFlowTcpDataOffset to protobuf object *otg.PatternFlowTcpDataOffset + // and doesn't set defaults + msg() *otg.PatternFlowTcpDataOffset + // setMsg unmarshals PatternFlowTcpDataOffset from protobuf object *otg.PatternFlowTcpDataOffset + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpDataOffset) PatternFlowTcpDataOffset + // provides marshal interface + Marshal() marshalPatternFlowTcpDataOffset + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpDataOffset + // validate validates PatternFlowTcpDataOffset + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpDataOffset, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpDataOffsetChoiceEnum, set in PatternFlowTcpDataOffset + Choice() PatternFlowTcpDataOffsetChoiceEnum + // setChoice assigns PatternFlowTcpDataOffsetChoiceEnum provided by user to PatternFlowTcpDataOffset + setChoice(value PatternFlowTcpDataOffsetChoiceEnum) PatternFlowTcpDataOffset + // HasChoice checks if Choice has been set in PatternFlowTcpDataOffset + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpDataOffset. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpDataOffset + SetValue(value uint32) PatternFlowTcpDataOffset + // HasValue checks if Value has been set in PatternFlowTcpDataOffset + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpDataOffset. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpDataOffset + SetValues(value []uint32) PatternFlowTcpDataOffset + // Increment returns PatternFlowTcpDataOffsetCounter, set in PatternFlowTcpDataOffset. + // PatternFlowTcpDataOffsetCounter is integer counter pattern + Increment() PatternFlowTcpDataOffsetCounter + // SetIncrement assigns PatternFlowTcpDataOffsetCounter provided by user to PatternFlowTcpDataOffset. + // PatternFlowTcpDataOffsetCounter is integer counter pattern + SetIncrement(value PatternFlowTcpDataOffsetCounter) PatternFlowTcpDataOffset + // HasIncrement checks if Increment has been set in PatternFlowTcpDataOffset + HasIncrement() bool + // Decrement returns PatternFlowTcpDataOffsetCounter, set in PatternFlowTcpDataOffset. + // PatternFlowTcpDataOffsetCounter is integer counter pattern + Decrement() PatternFlowTcpDataOffsetCounter + // SetDecrement assigns PatternFlowTcpDataOffsetCounter provided by user to PatternFlowTcpDataOffset. + // PatternFlowTcpDataOffsetCounter is integer counter pattern + SetDecrement(value PatternFlowTcpDataOffsetCounter) PatternFlowTcpDataOffset + // HasDecrement checks if Decrement has been set in PatternFlowTcpDataOffset + HasDecrement() bool + // MetricTags returns PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIterIter, set in PatternFlowTcpDataOffset + MetricTags() PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter + setNil() +} + +type PatternFlowTcpDataOffsetChoiceEnum string + +// Enum of Choice on PatternFlowTcpDataOffset +var PatternFlowTcpDataOffsetChoice = struct { + VALUE PatternFlowTcpDataOffsetChoiceEnum + VALUES PatternFlowTcpDataOffsetChoiceEnum + INCREMENT PatternFlowTcpDataOffsetChoiceEnum + DECREMENT PatternFlowTcpDataOffsetChoiceEnum +}{ + VALUE: PatternFlowTcpDataOffsetChoiceEnum("value"), + VALUES: PatternFlowTcpDataOffsetChoiceEnum("values"), + INCREMENT: PatternFlowTcpDataOffsetChoiceEnum("increment"), + DECREMENT: PatternFlowTcpDataOffsetChoiceEnum("decrement"), +} + +func (obj *patternFlowTcpDataOffset) Choice() PatternFlowTcpDataOffsetChoiceEnum { + return PatternFlowTcpDataOffsetChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpDataOffset) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpDataOffset) setChoice(value PatternFlowTcpDataOffsetChoiceEnum) PatternFlowTcpDataOffset { + intValue, ok := otg.PatternFlowTcpDataOffset_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpDataOffsetChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpDataOffset_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpDataOffsetChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpDataOffsetChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpDataOffsetChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpDataOffsetCounter().msg() + } + + if value == PatternFlowTcpDataOffsetChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpDataOffsetCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpDataOffset) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpDataOffsetChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpDataOffset) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpDataOffset object +func (obj *patternFlowTcpDataOffset) SetValue(value uint32) PatternFlowTcpDataOffset { + obj.setChoice(PatternFlowTcpDataOffsetChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpDataOffset) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpDataOffset object +func (obj *patternFlowTcpDataOffset) SetValues(value []uint32) PatternFlowTcpDataOffset { + obj.setChoice(PatternFlowTcpDataOffsetChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpDataOffsetCounter +func (obj *patternFlowTcpDataOffset) Increment() PatternFlowTcpDataOffsetCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpDataOffsetChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpDataOffsetCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpDataOffsetCounter +func (obj *patternFlowTcpDataOffset) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpDataOffsetCounter value in the PatternFlowTcpDataOffset object +func (obj *patternFlowTcpDataOffset) SetIncrement(value PatternFlowTcpDataOffsetCounter) PatternFlowTcpDataOffset { + obj.setChoice(PatternFlowTcpDataOffsetChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpDataOffsetCounter +func (obj *patternFlowTcpDataOffset) Decrement() PatternFlowTcpDataOffsetCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpDataOffsetChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpDataOffsetCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpDataOffsetCounter +func (obj *patternFlowTcpDataOffset) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpDataOffsetCounter value in the PatternFlowTcpDataOffset object +func (obj *patternFlowTcpDataOffset) SetDecrement(value PatternFlowTcpDataOffsetCounter) PatternFlowTcpDataOffset { + obj.setChoice(PatternFlowTcpDataOffsetChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpDataOffsetMetricTag +func (obj *patternFlowTcpDataOffset) MetricTags() PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpDataOffsetMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter struct { + obj *patternFlowTcpDataOffset + patternFlowTcpDataOffsetMetricTagSlice []PatternFlowTcpDataOffsetMetricTag + fieldPtr *[]*otg.PatternFlowTcpDataOffsetMetricTag +} + +func newPatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter(ptr *[]*otg.PatternFlowTcpDataOffsetMetricTag) PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter { + return &patternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter interface { + setMsg(*patternFlowTcpDataOffset) PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter + Items() []PatternFlowTcpDataOffsetMetricTag + Add() PatternFlowTcpDataOffsetMetricTag + Append(items ...PatternFlowTcpDataOffsetMetricTag) PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter + Set(index int, newObj PatternFlowTcpDataOffsetMetricTag) PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter + Clear() PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter + clearHolderSlice() PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter + appendHolderSlice(item PatternFlowTcpDataOffsetMetricTag) PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter +} + +func (obj *patternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter) setMsg(msg *patternFlowTcpDataOffset) PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpDataOffsetMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter) Items() []PatternFlowTcpDataOffsetMetricTag { + return obj.patternFlowTcpDataOffsetMetricTagSlice +} + +func (obj *patternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter) Add() PatternFlowTcpDataOffsetMetricTag { + newObj := &otg.PatternFlowTcpDataOffsetMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpDataOffsetMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpDataOffsetMetricTagSlice = append(obj.patternFlowTcpDataOffsetMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter) Append(items ...PatternFlowTcpDataOffsetMetricTag) PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpDataOffsetMetricTagSlice = append(obj.patternFlowTcpDataOffsetMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter) Set(index int, newObj PatternFlowTcpDataOffsetMetricTag) PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpDataOffsetMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter) Clear() PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpDataOffsetMetricTag{} + obj.patternFlowTcpDataOffsetMetricTagSlice = []PatternFlowTcpDataOffsetMetricTag{} + } + return obj +} +func (obj *patternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter) clearHolderSlice() PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter { + if len(obj.patternFlowTcpDataOffsetMetricTagSlice) > 0 { + obj.patternFlowTcpDataOffsetMetricTagSlice = []PatternFlowTcpDataOffsetMetricTag{} + } + return obj +} +func (obj *patternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter) appendHolderSlice(item PatternFlowTcpDataOffsetMetricTag) PatternFlowTcpDataOffsetPatternFlowTcpDataOffsetMetricTagIter { + obj.patternFlowTcpDataOffsetMetricTagSlice = append(obj.patternFlowTcpDataOffsetMetricTagSlice, item) + return obj +} + +func (obj *patternFlowTcpDataOffset) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpDataOffset.Value <= 15 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowTcpDataOffset.Values <= 15 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpDataOffsetMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowTcpDataOffset) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpDataOffsetChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpDataOffsetChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpDataOffsetChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpDataOffsetChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpDataOffsetChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpDataOffsetChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpDataOffset") + } + } else { + intVal := otg.PatternFlowTcpDataOffset_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpDataOffset_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_data_offset_counter.go b/gosnappi/pattern_flow_tcp_data_offset_counter.go new file mode 100644 index 00000000..da68bc2f --- /dev/null +++ b/gosnappi/pattern_flow_tcp_data_offset_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpDataOffsetCounter ***** +type patternFlowTcpDataOffsetCounter struct { + validation + obj *otg.PatternFlowTcpDataOffsetCounter + marshaller marshalPatternFlowTcpDataOffsetCounter + unMarshaller unMarshalPatternFlowTcpDataOffsetCounter +} + +func NewPatternFlowTcpDataOffsetCounter() PatternFlowTcpDataOffsetCounter { + obj := patternFlowTcpDataOffsetCounter{obj: &otg.PatternFlowTcpDataOffsetCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpDataOffsetCounter) msg() *otg.PatternFlowTcpDataOffsetCounter { + return obj.obj +} + +func (obj *patternFlowTcpDataOffsetCounter) setMsg(msg *otg.PatternFlowTcpDataOffsetCounter) PatternFlowTcpDataOffsetCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpDataOffsetCounter struct { + obj *patternFlowTcpDataOffsetCounter +} + +type marshalPatternFlowTcpDataOffsetCounter interface { + // ToProto marshals PatternFlowTcpDataOffsetCounter to protobuf object *otg.PatternFlowTcpDataOffsetCounter + ToProto() (*otg.PatternFlowTcpDataOffsetCounter, error) + // ToPbText marshals PatternFlowTcpDataOffsetCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpDataOffsetCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpDataOffsetCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpDataOffsetCounter struct { + obj *patternFlowTcpDataOffsetCounter +} + +type unMarshalPatternFlowTcpDataOffsetCounter interface { + // FromProto unmarshals PatternFlowTcpDataOffsetCounter from protobuf object *otg.PatternFlowTcpDataOffsetCounter + FromProto(msg *otg.PatternFlowTcpDataOffsetCounter) (PatternFlowTcpDataOffsetCounter, error) + // FromPbText unmarshals PatternFlowTcpDataOffsetCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpDataOffsetCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpDataOffsetCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpDataOffsetCounter) Marshal() marshalPatternFlowTcpDataOffsetCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpDataOffsetCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpDataOffsetCounter) Unmarshal() unMarshalPatternFlowTcpDataOffsetCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpDataOffsetCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpDataOffsetCounter) ToProto() (*otg.PatternFlowTcpDataOffsetCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpDataOffsetCounter) FromProto(msg *otg.PatternFlowTcpDataOffsetCounter) (PatternFlowTcpDataOffsetCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpDataOffsetCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpDataOffsetCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpDataOffsetCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpDataOffsetCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpDataOffsetCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpDataOffsetCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpDataOffsetCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpDataOffsetCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpDataOffsetCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpDataOffsetCounter) Clone() (PatternFlowTcpDataOffsetCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpDataOffsetCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpDataOffsetCounter is integer counter pattern +type PatternFlowTcpDataOffsetCounter interface { + Validation + // msg marshals PatternFlowTcpDataOffsetCounter to protobuf object *otg.PatternFlowTcpDataOffsetCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpDataOffsetCounter + // setMsg unmarshals PatternFlowTcpDataOffsetCounter from protobuf object *otg.PatternFlowTcpDataOffsetCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpDataOffsetCounter) PatternFlowTcpDataOffsetCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpDataOffsetCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpDataOffsetCounter + // validate validates PatternFlowTcpDataOffsetCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpDataOffsetCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpDataOffsetCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpDataOffsetCounter + SetStart(value uint32) PatternFlowTcpDataOffsetCounter + // HasStart checks if Start has been set in PatternFlowTcpDataOffsetCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpDataOffsetCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpDataOffsetCounter + SetStep(value uint32) PatternFlowTcpDataOffsetCounter + // HasStep checks if Step has been set in PatternFlowTcpDataOffsetCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpDataOffsetCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpDataOffsetCounter + SetCount(value uint32) PatternFlowTcpDataOffsetCounter + // HasCount checks if Count has been set in PatternFlowTcpDataOffsetCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpDataOffsetCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpDataOffsetCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpDataOffsetCounter object +func (obj *patternFlowTcpDataOffsetCounter) SetStart(value uint32) PatternFlowTcpDataOffsetCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpDataOffsetCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpDataOffsetCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpDataOffsetCounter object +func (obj *patternFlowTcpDataOffsetCounter) SetStep(value uint32) PatternFlowTcpDataOffsetCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpDataOffsetCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpDataOffsetCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpDataOffsetCounter object +func (obj *patternFlowTcpDataOffsetCounter) SetCount(value uint32) PatternFlowTcpDataOffsetCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpDataOffsetCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpDataOffsetCounter.Start <= 15 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpDataOffsetCounter.Step <= 15 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpDataOffsetCounter.Count <= 15 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowTcpDataOffsetCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_data_offset_metric_tag.go b/gosnappi/pattern_flow_tcp_data_offset_metric_tag.go new file mode 100644 index 00000000..44711d7f --- /dev/null +++ b/gosnappi/pattern_flow_tcp_data_offset_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpDataOffsetMetricTag ***** +type patternFlowTcpDataOffsetMetricTag struct { + validation + obj *otg.PatternFlowTcpDataOffsetMetricTag + marshaller marshalPatternFlowTcpDataOffsetMetricTag + unMarshaller unMarshalPatternFlowTcpDataOffsetMetricTag +} + +func NewPatternFlowTcpDataOffsetMetricTag() PatternFlowTcpDataOffsetMetricTag { + obj := patternFlowTcpDataOffsetMetricTag{obj: &otg.PatternFlowTcpDataOffsetMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpDataOffsetMetricTag) msg() *otg.PatternFlowTcpDataOffsetMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpDataOffsetMetricTag) setMsg(msg *otg.PatternFlowTcpDataOffsetMetricTag) PatternFlowTcpDataOffsetMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpDataOffsetMetricTag struct { + obj *patternFlowTcpDataOffsetMetricTag +} + +type marshalPatternFlowTcpDataOffsetMetricTag interface { + // ToProto marshals PatternFlowTcpDataOffsetMetricTag to protobuf object *otg.PatternFlowTcpDataOffsetMetricTag + ToProto() (*otg.PatternFlowTcpDataOffsetMetricTag, error) + // ToPbText marshals PatternFlowTcpDataOffsetMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpDataOffsetMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpDataOffsetMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpDataOffsetMetricTag struct { + obj *patternFlowTcpDataOffsetMetricTag +} + +type unMarshalPatternFlowTcpDataOffsetMetricTag interface { + // FromProto unmarshals PatternFlowTcpDataOffsetMetricTag from protobuf object *otg.PatternFlowTcpDataOffsetMetricTag + FromProto(msg *otg.PatternFlowTcpDataOffsetMetricTag) (PatternFlowTcpDataOffsetMetricTag, error) + // FromPbText unmarshals PatternFlowTcpDataOffsetMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpDataOffsetMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpDataOffsetMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpDataOffsetMetricTag) Marshal() marshalPatternFlowTcpDataOffsetMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpDataOffsetMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpDataOffsetMetricTag) Unmarshal() unMarshalPatternFlowTcpDataOffsetMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpDataOffsetMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpDataOffsetMetricTag) ToProto() (*otg.PatternFlowTcpDataOffsetMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpDataOffsetMetricTag) FromProto(msg *otg.PatternFlowTcpDataOffsetMetricTag) (PatternFlowTcpDataOffsetMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpDataOffsetMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpDataOffsetMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpDataOffsetMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpDataOffsetMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpDataOffsetMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpDataOffsetMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpDataOffsetMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpDataOffsetMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpDataOffsetMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpDataOffsetMetricTag) Clone() (PatternFlowTcpDataOffsetMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpDataOffsetMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpDataOffsetMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpDataOffsetMetricTag interface { + Validation + // msg marshals PatternFlowTcpDataOffsetMetricTag to protobuf object *otg.PatternFlowTcpDataOffsetMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpDataOffsetMetricTag + // setMsg unmarshals PatternFlowTcpDataOffsetMetricTag from protobuf object *otg.PatternFlowTcpDataOffsetMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpDataOffsetMetricTag) PatternFlowTcpDataOffsetMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpDataOffsetMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpDataOffsetMetricTag + // validate validates PatternFlowTcpDataOffsetMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpDataOffsetMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpDataOffsetMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpDataOffsetMetricTag + SetName(value string) PatternFlowTcpDataOffsetMetricTag + // Offset returns uint32, set in PatternFlowTcpDataOffsetMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpDataOffsetMetricTag + SetOffset(value uint32) PatternFlowTcpDataOffsetMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpDataOffsetMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpDataOffsetMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpDataOffsetMetricTag + SetLength(value uint32) PatternFlowTcpDataOffsetMetricTag + // HasLength checks if Length has been set in PatternFlowTcpDataOffsetMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpDataOffsetMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpDataOffsetMetricTag object +func (obj *patternFlowTcpDataOffsetMetricTag) SetName(value string) PatternFlowTcpDataOffsetMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpDataOffsetMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpDataOffsetMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpDataOffsetMetricTag object +func (obj *patternFlowTcpDataOffsetMetricTag) SetOffset(value uint32) PatternFlowTcpDataOffsetMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpDataOffsetMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpDataOffsetMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpDataOffsetMetricTag object +func (obj *patternFlowTcpDataOffsetMetricTag) SetLength(value uint32) PatternFlowTcpDataOffsetMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpDataOffsetMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpDataOffsetMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpDataOffsetMetricTag.Offset <= 3 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 4 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpDataOffsetMetricTag.Length <= 4 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpDataOffsetMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(4) + } + +} diff --git a/gosnappi/pattern_flow_tcp_dst_port.go b/gosnappi/pattern_flow_tcp_dst_port.go new file mode 100644 index 00000000..987d2118 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_dst_port.go @@ -0,0 +1,719 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpDstPort ***** +type patternFlowTcpDstPort struct { + validation + obj *otg.PatternFlowTcpDstPort + marshaller marshalPatternFlowTcpDstPort + unMarshaller unMarshalPatternFlowTcpDstPort + incrementHolder PatternFlowTcpDstPortCounter + decrementHolder PatternFlowTcpDstPortCounter + metricTagsHolder PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter + randomHolder PatternFlowTcpDstPortRandom +} + +func NewPatternFlowTcpDstPort() PatternFlowTcpDstPort { + obj := patternFlowTcpDstPort{obj: &otg.PatternFlowTcpDstPort{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpDstPort) msg() *otg.PatternFlowTcpDstPort { + return obj.obj +} + +func (obj *patternFlowTcpDstPort) setMsg(msg *otg.PatternFlowTcpDstPort) PatternFlowTcpDstPort { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpDstPort struct { + obj *patternFlowTcpDstPort +} + +type marshalPatternFlowTcpDstPort interface { + // ToProto marshals PatternFlowTcpDstPort to protobuf object *otg.PatternFlowTcpDstPort + ToProto() (*otg.PatternFlowTcpDstPort, error) + // ToPbText marshals PatternFlowTcpDstPort to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpDstPort to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpDstPort to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpDstPort struct { + obj *patternFlowTcpDstPort +} + +type unMarshalPatternFlowTcpDstPort interface { + // FromProto unmarshals PatternFlowTcpDstPort from protobuf object *otg.PatternFlowTcpDstPort + FromProto(msg *otg.PatternFlowTcpDstPort) (PatternFlowTcpDstPort, error) + // FromPbText unmarshals PatternFlowTcpDstPort from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpDstPort from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpDstPort from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpDstPort) Marshal() marshalPatternFlowTcpDstPort { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpDstPort{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpDstPort) Unmarshal() unMarshalPatternFlowTcpDstPort { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpDstPort{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpDstPort) ToProto() (*otg.PatternFlowTcpDstPort, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpDstPort) FromProto(msg *otg.PatternFlowTcpDstPort) (PatternFlowTcpDstPort, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpDstPort) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpDstPort) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpDstPort) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpDstPort) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpDstPort) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpDstPort) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpDstPort) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpDstPort) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpDstPort) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpDstPort) Clone() (PatternFlowTcpDstPort, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpDstPort() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpDstPort) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.randomHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpDstPort is destination port +type PatternFlowTcpDstPort interface { + Validation + // msg marshals PatternFlowTcpDstPort to protobuf object *otg.PatternFlowTcpDstPort + // and doesn't set defaults + msg() *otg.PatternFlowTcpDstPort + // setMsg unmarshals PatternFlowTcpDstPort from protobuf object *otg.PatternFlowTcpDstPort + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpDstPort) PatternFlowTcpDstPort + // provides marshal interface + Marshal() marshalPatternFlowTcpDstPort + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpDstPort + // validate validates PatternFlowTcpDstPort + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpDstPort, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpDstPortChoiceEnum, set in PatternFlowTcpDstPort + Choice() PatternFlowTcpDstPortChoiceEnum + // setChoice assigns PatternFlowTcpDstPortChoiceEnum provided by user to PatternFlowTcpDstPort + setChoice(value PatternFlowTcpDstPortChoiceEnum) PatternFlowTcpDstPort + // HasChoice checks if Choice has been set in PatternFlowTcpDstPort + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpDstPort. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpDstPort + SetValue(value uint32) PatternFlowTcpDstPort + // HasValue checks if Value has been set in PatternFlowTcpDstPort + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpDstPort. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpDstPort + SetValues(value []uint32) PatternFlowTcpDstPort + // Increment returns PatternFlowTcpDstPortCounter, set in PatternFlowTcpDstPort. + // PatternFlowTcpDstPortCounter is integer counter pattern + Increment() PatternFlowTcpDstPortCounter + // SetIncrement assigns PatternFlowTcpDstPortCounter provided by user to PatternFlowTcpDstPort. + // PatternFlowTcpDstPortCounter is integer counter pattern + SetIncrement(value PatternFlowTcpDstPortCounter) PatternFlowTcpDstPort + // HasIncrement checks if Increment has been set in PatternFlowTcpDstPort + HasIncrement() bool + // Decrement returns PatternFlowTcpDstPortCounter, set in PatternFlowTcpDstPort. + // PatternFlowTcpDstPortCounter is integer counter pattern + Decrement() PatternFlowTcpDstPortCounter + // SetDecrement assigns PatternFlowTcpDstPortCounter provided by user to PatternFlowTcpDstPort. + // PatternFlowTcpDstPortCounter is integer counter pattern + SetDecrement(value PatternFlowTcpDstPortCounter) PatternFlowTcpDstPort + // HasDecrement checks if Decrement has been set in PatternFlowTcpDstPort + HasDecrement() bool + // MetricTags returns PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIterIter, set in PatternFlowTcpDstPort + MetricTags() PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter + // Random returns PatternFlowTcpDstPortRandom, set in PatternFlowTcpDstPort. + // PatternFlowTcpDstPortRandom is integer random pattern + Random() PatternFlowTcpDstPortRandom + // SetRandom assigns PatternFlowTcpDstPortRandom provided by user to PatternFlowTcpDstPort. + // PatternFlowTcpDstPortRandom is integer random pattern + SetRandom(value PatternFlowTcpDstPortRandom) PatternFlowTcpDstPort + // HasRandom checks if Random has been set in PatternFlowTcpDstPort + HasRandom() bool + setNil() +} + +type PatternFlowTcpDstPortChoiceEnum string + +// Enum of Choice on PatternFlowTcpDstPort +var PatternFlowTcpDstPortChoice = struct { + VALUE PatternFlowTcpDstPortChoiceEnum + VALUES PatternFlowTcpDstPortChoiceEnum + INCREMENT PatternFlowTcpDstPortChoiceEnum + DECREMENT PatternFlowTcpDstPortChoiceEnum + RANDOM PatternFlowTcpDstPortChoiceEnum +}{ + VALUE: PatternFlowTcpDstPortChoiceEnum("value"), + VALUES: PatternFlowTcpDstPortChoiceEnum("values"), + INCREMENT: PatternFlowTcpDstPortChoiceEnum("increment"), + DECREMENT: PatternFlowTcpDstPortChoiceEnum("decrement"), + RANDOM: PatternFlowTcpDstPortChoiceEnum("random"), +} + +func (obj *patternFlowTcpDstPort) Choice() PatternFlowTcpDstPortChoiceEnum { + return PatternFlowTcpDstPortChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpDstPort) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpDstPort) setChoice(value PatternFlowTcpDstPortChoiceEnum) PatternFlowTcpDstPort { + intValue, ok := otg.PatternFlowTcpDstPort_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpDstPortChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpDstPort_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Random = nil + obj.randomHolder = nil + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpDstPortChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpDstPortChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpDstPortChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpDstPortCounter().msg() + } + + if value == PatternFlowTcpDstPortChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpDstPortCounter().msg() + } + + if value == PatternFlowTcpDstPortChoice.RANDOM { + obj.obj.Random = NewPatternFlowTcpDstPortRandom().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpDstPort) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpDstPortChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpDstPort) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpDstPort object +func (obj *patternFlowTcpDstPort) SetValue(value uint32) PatternFlowTcpDstPort { + obj.setChoice(PatternFlowTcpDstPortChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpDstPort) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpDstPort object +func (obj *patternFlowTcpDstPort) SetValues(value []uint32) PatternFlowTcpDstPort { + obj.setChoice(PatternFlowTcpDstPortChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpDstPortCounter +func (obj *patternFlowTcpDstPort) Increment() PatternFlowTcpDstPortCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpDstPortChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpDstPortCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpDstPortCounter +func (obj *patternFlowTcpDstPort) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpDstPortCounter value in the PatternFlowTcpDstPort object +func (obj *patternFlowTcpDstPort) SetIncrement(value PatternFlowTcpDstPortCounter) PatternFlowTcpDstPort { + obj.setChoice(PatternFlowTcpDstPortChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpDstPortCounter +func (obj *patternFlowTcpDstPort) Decrement() PatternFlowTcpDstPortCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpDstPortChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpDstPortCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpDstPortCounter +func (obj *patternFlowTcpDstPort) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpDstPortCounter value in the PatternFlowTcpDstPort object +func (obj *patternFlowTcpDstPort) SetDecrement(value PatternFlowTcpDstPortCounter) PatternFlowTcpDstPort { + obj.setChoice(PatternFlowTcpDstPortChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpDstPortMetricTag +func (obj *patternFlowTcpDstPort) MetricTags() PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpDstPortMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter struct { + obj *patternFlowTcpDstPort + patternFlowTcpDstPortMetricTagSlice []PatternFlowTcpDstPortMetricTag + fieldPtr *[]*otg.PatternFlowTcpDstPortMetricTag +} + +func newPatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter(ptr *[]*otg.PatternFlowTcpDstPortMetricTag) PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter { + return &patternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter interface { + setMsg(*patternFlowTcpDstPort) PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter + Items() []PatternFlowTcpDstPortMetricTag + Add() PatternFlowTcpDstPortMetricTag + Append(items ...PatternFlowTcpDstPortMetricTag) PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter + Set(index int, newObj PatternFlowTcpDstPortMetricTag) PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter + Clear() PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter + clearHolderSlice() PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter + appendHolderSlice(item PatternFlowTcpDstPortMetricTag) PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter +} + +func (obj *patternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter) setMsg(msg *patternFlowTcpDstPort) PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpDstPortMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter) Items() []PatternFlowTcpDstPortMetricTag { + return obj.patternFlowTcpDstPortMetricTagSlice +} + +func (obj *patternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter) Add() PatternFlowTcpDstPortMetricTag { + newObj := &otg.PatternFlowTcpDstPortMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpDstPortMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpDstPortMetricTagSlice = append(obj.patternFlowTcpDstPortMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter) Append(items ...PatternFlowTcpDstPortMetricTag) PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpDstPortMetricTagSlice = append(obj.patternFlowTcpDstPortMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter) Set(index int, newObj PatternFlowTcpDstPortMetricTag) PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpDstPortMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter) Clear() PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpDstPortMetricTag{} + obj.patternFlowTcpDstPortMetricTagSlice = []PatternFlowTcpDstPortMetricTag{} + } + return obj +} +func (obj *patternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter) clearHolderSlice() PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter { + if len(obj.patternFlowTcpDstPortMetricTagSlice) > 0 { + obj.patternFlowTcpDstPortMetricTagSlice = []PatternFlowTcpDstPortMetricTag{} + } + return obj +} +func (obj *patternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter) appendHolderSlice(item PatternFlowTcpDstPortMetricTag) PatternFlowTcpDstPortPatternFlowTcpDstPortMetricTagIter { + obj.patternFlowTcpDstPortMetricTagSlice = append(obj.patternFlowTcpDstPortMetricTagSlice, item) + return obj +} + +// description is TBD +// Random returns a PatternFlowTcpDstPortRandom +func (obj *patternFlowTcpDstPort) Random() PatternFlowTcpDstPortRandom { + if obj.obj.Random == nil { + obj.setChoice(PatternFlowTcpDstPortChoice.RANDOM) + } + if obj.randomHolder == nil { + obj.randomHolder = &patternFlowTcpDstPortRandom{obj: obj.obj.Random} + } + return obj.randomHolder +} + +// description is TBD +// Random returns a PatternFlowTcpDstPortRandom +func (obj *patternFlowTcpDstPort) HasRandom() bool { + return obj.obj.Random != nil +} + +// description is TBD +// SetRandom sets the PatternFlowTcpDstPortRandom value in the PatternFlowTcpDstPort object +func (obj *patternFlowTcpDstPort) SetRandom(value PatternFlowTcpDstPortRandom) PatternFlowTcpDstPort { + obj.setChoice(PatternFlowTcpDstPortChoice.RANDOM) + obj.randomHolder = nil + obj.obj.Random = value.msg() + + return obj +} + +func (obj *patternFlowTcpDstPort) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpDstPort.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowTcpDstPort.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpDstPortMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Random != nil { + + obj.Random().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowTcpDstPort) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpDstPortChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpDstPortChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpDstPortChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpDstPortChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpDstPortChoice.DECREMENT + } + + if obj.obj.Random != nil { + choices_set += 1 + choice = PatternFlowTcpDstPortChoice.RANDOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpDstPortChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpDstPort") + } + } else { + intVal := otg.PatternFlowTcpDstPort_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpDstPort_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_dst_port_counter.go b/gosnappi/pattern_flow_tcp_dst_port_counter.go new file mode 100644 index 00000000..139d0aee --- /dev/null +++ b/gosnappi/pattern_flow_tcp_dst_port_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpDstPortCounter ***** +type patternFlowTcpDstPortCounter struct { + validation + obj *otg.PatternFlowTcpDstPortCounter + marshaller marshalPatternFlowTcpDstPortCounter + unMarshaller unMarshalPatternFlowTcpDstPortCounter +} + +func NewPatternFlowTcpDstPortCounter() PatternFlowTcpDstPortCounter { + obj := patternFlowTcpDstPortCounter{obj: &otg.PatternFlowTcpDstPortCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpDstPortCounter) msg() *otg.PatternFlowTcpDstPortCounter { + return obj.obj +} + +func (obj *patternFlowTcpDstPortCounter) setMsg(msg *otg.PatternFlowTcpDstPortCounter) PatternFlowTcpDstPortCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpDstPortCounter struct { + obj *patternFlowTcpDstPortCounter +} + +type marshalPatternFlowTcpDstPortCounter interface { + // ToProto marshals PatternFlowTcpDstPortCounter to protobuf object *otg.PatternFlowTcpDstPortCounter + ToProto() (*otg.PatternFlowTcpDstPortCounter, error) + // ToPbText marshals PatternFlowTcpDstPortCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpDstPortCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpDstPortCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpDstPortCounter struct { + obj *patternFlowTcpDstPortCounter +} + +type unMarshalPatternFlowTcpDstPortCounter interface { + // FromProto unmarshals PatternFlowTcpDstPortCounter from protobuf object *otg.PatternFlowTcpDstPortCounter + FromProto(msg *otg.PatternFlowTcpDstPortCounter) (PatternFlowTcpDstPortCounter, error) + // FromPbText unmarshals PatternFlowTcpDstPortCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpDstPortCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpDstPortCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpDstPortCounter) Marshal() marshalPatternFlowTcpDstPortCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpDstPortCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpDstPortCounter) Unmarshal() unMarshalPatternFlowTcpDstPortCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpDstPortCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpDstPortCounter) ToProto() (*otg.PatternFlowTcpDstPortCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpDstPortCounter) FromProto(msg *otg.PatternFlowTcpDstPortCounter) (PatternFlowTcpDstPortCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpDstPortCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpDstPortCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpDstPortCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpDstPortCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpDstPortCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpDstPortCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpDstPortCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpDstPortCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpDstPortCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpDstPortCounter) Clone() (PatternFlowTcpDstPortCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpDstPortCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpDstPortCounter is integer counter pattern +type PatternFlowTcpDstPortCounter interface { + Validation + // msg marshals PatternFlowTcpDstPortCounter to protobuf object *otg.PatternFlowTcpDstPortCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpDstPortCounter + // setMsg unmarshals PatternFlowTcpDstPortCounter from protobuf object *otg.PatternFlowTcpDstPortCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpDstPortCounter) PatternFlowTcpDstPortCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpDstPortCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpDstPortCounter + // validate validates PatternFlowTcpDstPortCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpDstPortCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpDstPortCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpDstPortCounter + SetStart(value uint32) PatternFlowTcpDstPortCounter + // HasStart checks if Start has been set in PatternFlowTcpDstPortCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpDstPortCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpDstPortCounter + SetStep(value uint32) PatternFlowTcpDstPortCounter + // HasStep checks if Step has been set in PatternFlowTcpDstPortCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpDstPortCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpDstPortCounter + SetCount(value uint32) PatternFlowTcpDstPortCounter + // HasCount checks if Count has been set in PatternFlowTcpDstPortCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpDstPortCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpDstPortCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpDstPortCounter object +func (obj *patternFlowTcpDstPortCounter) SetStart(value uint32) PatternFlowTcpDstPortCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpDstPortCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpDstPortCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpDstPortCounter object +func (obj *patternFlowTcpDstPortCounter) SetStep(value uint32) PatternFlowTcpDstPortCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpDstPortCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpDstPortCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpDstPortCounter object +func (obj *patternFlowTcpDstPortCounter) SetCount(value uint32) PatternFlowTcpDstPortCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpDstPortCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpDstPortCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpDstPortCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpDstPortCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowTcpDstPortCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_dst_port_metric_tag.go b/gosnappi/pattern_flow_tcp_dst_port_metric_tag.go new file mode 100644 index 00000000..635c1bb4 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_dst_port_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpDstPortMetricTag ***** +type patternFlowTcpDstPortMetricTag struct { + validation + obj *otg.PatternFlowTcpDstPortMetricTag + marshaller marshalPatternFlowTcpDstPortMetricTag + unMarshaller unMarshalPatternFlowTcpDstPortMetricTag +} + +func NewPatternFlowTcpDstPortMetricTag() PatternFlowTcpDstPortMetricTag { + obj := patternFlowTcpDstPortMetricTag{obj: &otg.PatternFlowTcpDstPortMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpDstPortMetricTag) msg() *otg.PatternFlowTcpDstPortMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpDstPortMetricTag) setMsg(msg *otg.PatternFlowTcpDstPortMetricTag) PatternFlowTcpDstPortMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpDstPortMetricTag struct { + obj *patternFlowTcpDstPortMetricTag +} + +type marshalPatternFlowTcpDstPortMetricTag interface { + // ToProto marshals PatternFlowTcpDstPortMetricTag to protobuf object *otg.PatternFlowTcpDstPortMetricTag + ToProto() (*otg.PatternFlowTcpDstPortMetricTag, error) + // ToPbText marshals PatternFlowTcpDstPortMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpDstPortMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpDstPortMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpDstPortMetricTag struct { + obj *patternFlowTcpDstPortMetricTag +} + +type unMarshalPatternFlowTcpDstPortMetricTag interface { + // FromProto unmarshals PatternFlowTcpDstPortMetricTag from protobuf object *otg.PatternFlowTcpDstPortMetricTag + FromProto(msg *otg.PatternFlowTcpDstPortMetricTag) (PatternFlowTcpDstPortMetricTag, error) + // FromPbText unmarshals PatternFlowTcpDstPortMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpDstPortMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpDstPortMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpDstPortMetricTag) Marshal() marshalPatternFlowTcpDstPortMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpDstPortMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpDstPortMetricTag) Unmarshal() unMarshalPatternFlowTcpDstPortMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpDstPortMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpDstPortMetricTag) ToProto() (*otg.PatternFlowTcpDstPortMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpDstPortMetricTag) FromProto(msg *otg.PatternFlowTcpDstPortMetricTag) (PatternFlowTcpDstPortMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpDstPortMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpDstPortMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpDstPortMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpDstPortMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpDstPortMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpDstPortMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpDstPortMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpDstPortMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpDstPortMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpDstPortMetricTag) Clone() (PatternFlowTcpDstPortMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpDstPortMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpDstPortMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpDstPortMetricTag interface { + Validation + // msg marshals PatternFlowTcpDstPortMetricTag to protobuf object *otg.PatternFlowTcpDstPortMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpDstPortMetricTag + // setMsg unmarshals PatternFlowTcpDstPortMetricTag from protobuf object *otg.PatternFlowTcpDstPortMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpDstPortMetricTag) PatternFlowTcpDstPortMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpDstPortMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpDstPortMetricTag + // validate validates PatternFlowTcpDstPortMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpDstPortMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpDstPortMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpDstPortMetricTag + SetName(value string) PatternFlowTcpDstPortMetricTag + // Offset returns uint32, set in PatternFlowTcpDstPortMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpDstPortMetricTag + SetOffset(value uint32) PatternFlowTcpDstPortMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpDstPortMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpDstPortMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpDstPortMetricTag + SetLength(value uint32) PatternFlowTcpDstPortMetricTag + // HasLength checks if Length has been set in PatternFlowTcpDstPortMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpDstPortMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpDstPortMetricTag object +func (obj *patternFlowTcpDstPortMetricTag) SetName(value string) PatternFlowTcpDstPortMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpDstPortMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpDstPortMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpDstPortMetricTag object +func (obj *patternFlowTcpDstPortMetricTag) SetOffset(value uint32) PatternFlowTcpDstPortMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpDstPortMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpDstPortMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpDstPortMetricTag object +func (obj *patternFlowTcpDstPortMetricTag) SetLength(value uint32) PatternFlowTcpDstPortMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpDstPortMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpDstPortMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpDstPortMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpDstPortMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpDstPortMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_tcp_dst_port_random.go b/gosnappi/pattern_flow_tcp_dst_port_random.go new file mode 100644 index 00000000..b65d7e8e --- /dev/null +++ b/gosnappi/pattern_flow_tcp_dst_port_random.go @@ -0,0 +1,422 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpDstPortRandom ***** +type patternFlowTcpDstPortRandom struct { + validation + obj *otg.PatternFlowTcpDstPortRandom + marshaller marshalPatternFlowTcpDstPortRandom + unMarshaller unMarshalPatternFlowTcpDstPortRandom +} + +func NewPatternFlowTcpDstPortRandom() PatternFlowTcpDstPortRandom { + obj := patternFlowTcpDstPortRandom{obj: &otg.PatternFlowTcpDstPortRandom{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpDstPortRandom) msg() *otg.PatternFlowTcpDstPortRandom { + return obj.obj +} + +func (obj *patternFlowTcpDstPortRandom) setMsg(msg *otg.PatternFlowTcpDstPortRandom) PatternFlowTcpDstPortRandom { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpDstPortRandom struct { + obj *patternFlowTcpDstPortRandom +} + +type marshalPatternFlowTcpDstPortRandom interface { + // ToProto marshals PatternFlowTcpDstPortRandom to protobuf object *otg.PatternFlowTcpDstPortRandom + ToProto() (*otg.PatternFlowTcpDstPortRandom, error) + // ToPbText marshals PatternFlowTcpDstPortRandom to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpDstPortRandom to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpDstPortRandom to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpDstPortRandom struct { + obj *patternFlowTcpDstPortRandom +} + +type unMarshalPatternFlowTcpDstPortRandom interface { + // FromProto unmarshals PatternFlowTcpDstPortRandom from protobuf object *otg.PatternFlowTcpDstPortRandom + FromProto(msg *otg.PatternFlowTcpDstPortRandom) (PatternFlowTcpDstPortRandom, error) + // FromPbText unmarshals PatternFlowTcpDstPortRandom from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpDstPortRandom from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpDstPortRandom from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpDstPortRandom) Marshal() marshalPatternFlowTcpDstPortRandom { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpDstPortRandom{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpDstPortRandom) Unmarshal() unMarshalPatternFlowTcpDstPortRandom { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpDstPortRandom{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpDstPortRandom) ToProto() (*otg.PatternFlowTcpDstPortRandom, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpDstPortRandom) FromProto(msg *otg.PatternFlowTcpDstPortRandom) (PatternFlowTcpDstPortRandom, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpDstPortRandom) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpDstPortRandom) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpDstPortRandom) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpDstPortRandom) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpDstPortRandom) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpDstPortRandom) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpDstPortRandom) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpDstPortRandom) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpDstPortRandom) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpDstPortRandom) Clone() (PatternFlowTcpDstPortRandom, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpDstPortRandom() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpDstPortRandom is integer random pattern +type PatternFlowTcpDstPortRandom interface { + Validation + // msg marshals PatternFlowTcpDstPortRandom to protobuf object *otg.PatternFlowTcpDstPortRandom + // and doesn't set defaults + msg() *otg.PatternFlowTcpDstPortRandom + // setMsg unmarshals PatternFlowTcpDstPortRandom from protobuf object *otg.PatternFlowTcpDstPortRandom + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpDstPortRandom) PatternFlowTcpDstPortRandom + // provides marshal interface + Marshal() marshalPatternFlowTcpDstPortRandom + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpDstPortRandom + // validate validates PatternFlowTcpDstPortRandom + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpDstPortRandom, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Min returns uint32, set in PatternFlowTcpDstPortRandom. + Min() uint32 + // SetMin assigns uint32 provided by user to PatternFlowTcpDstPortRandom + SetMin(value uint32) PatternFlowTcpDstPortRandom + // HasMin checks if Min has been set in PatternFlowTcpDstPortRandom + HasMin() bool + // Max returns uint32, set in PatternFlowTcpDstPortRandom. + Max() uint32 + // SetMax assigns uint32 provided by user to PatternFlowTcpDstPortRandom + SetMax(value uint32) PatternFlowTcpDstPortRandom + // HasMax checks if Max has been set in PatternFlowTcpDstPortRandom + HasMax() bool + // Seed returns uint32, set in PatternFlowTcpDstPortRandom. + Seed() uint32 + // SetSeed assigns uint32 provided by user to PatternFlowTcpDstPortRandom + SetSeed(value uint32) PatternFlowTcpDstPortRandom + // HasSeed checks if Seed has been set in PatternFlowTcpDstPortRandom + HasSeed() bool + // Count returns uint32, set in PatternFlowTcpDstPortRandom. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpDstPortRandom + SetCount(value uint32) PatternFlowTcpDstPortRandom + // HasCount checks if Count has been set in PatternFlowTcpDstPortRandom + HasCount() bool +} + +// The minimum possible value generated by the random value generator. +// Min returns a uint32 +func (obj *patternFlowTcpDstPortRandom) Min() uint32 { + + return *obj.obj.Min + +} + +// The minimum possible value generated by the random value generator. +// Min returns a uint32 +func (obj *patternFlowTcpDstPortRandom) HasMin() bool { + return obj.obj.Min != nil +} + +// The minimum possible value generated by the random value generator. +// SetMin sets the uint32 value in the PatternFlowTcpDstPortRandom object +func (obj *patternFlowTcpDstPortRandom) SetMin(value uint32) PatternFlowTcpDstPortRandom { + + obj.obj.Min = &value + return obj +} + +// The maximum possible value generated by the random value generator. +// Max returns a uint32 +func (obj *patternFlowTcpDstPortRandom) Max() uint32 { + + return *obj.obj.Max + +} + +// The maximum possible value generated by the random value generator. +// Max returns a uint32 +func (obj *patternFlowTcpDstPortRandom) HasMax() bool { + return obj.obj.Max != nil +} + +// The maximum possible value generated by the random value generator. +// SetMax sets the uint32 value in the PatternFlowTcpDstPortRandom object +func (obj *patternFlowTcpDstPortRandom) SetMax(value uint32) PatternFlowTcpDstPortRandom { + + obj.obj.Max = &value + return obj +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// Seed returns a uint32 +func (obj *patternFlowTcpDstPortRandom) Seed() uint32 { + + return *obj.obj.Seed + +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// Seed returns a uint32 +func (obj *patternFlowTcpDstPortRandom) HasSeed() bool { + return obj.obj.Seed != nil +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// SetSeed sets the uint32 value in the PatternFlowTcpDstPortRandom object +func (obj *patternFlowTcpDstPortRandom) SetSeed(value uint32) PatternFlowTcpDstPortRandom { + + obj.obj.Seed = &value + return obj +} + +// The total number of values to be generated by the random value generator. +// Count returns a uint32 +func (obj *patternFlowTcpDstPortRandom) Count() uint32 { + + return *obj.obj.Count + +} + +// The total number of values to be generated by the random value generator. +// Count returns a uint32 +func (obj *patternFlowTcpDstPortRandom) HasCount() bool { + return obj.obj.Count != nil +} + +// The total number of values to be generated by the random value generator. +// SetCount sets the uint32 value in the PatternFlowTcpDstPortRandom object +func (obj *patternFlowTcpDstPortRandom) SetCount(value uint32) PatternFlowTcpDstPortRandom { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpDstPortRandom) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Min != nil { + + if *obj.obj.Min > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpDstPortRandom.Min <= 65535 but Got %d", *obj.obj.Min)) + } + + } + + if obj.obj.Max != nil { + + if *obj.obj.Max > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpDstPortRandom.Max <= 65535 but Got %d", *obj.obj.Max)) + } + + } + +} + +func (obj *patternFlowTcpDstPortRandom) setDefault() { + if obj.obj.Min == nil { + obj.SetMin(0) + } + if obj.obj.Max == nil { + obj.SetMax(65535) + } + if obj.obj.Seed == nil { + obj.SetSeed(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ecn_cwr.go b/gosnappi/pattern_flow_tcp_ecn_cwr.go new file mode 100644 index 00000000..285edc5d --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ecn_cwr.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpEcnCwr ***** +type patternFlowTcpEcnCwr struct { + validation + obj *otg.PatternFlowTcpEcnCwr + marshaller marshalPatternFlowTcpEcnCwr + unMarshaller unMarshalPatternFlowTcpEcnCwr + incrementHolder PatternFlowTcpEcnCwrCounter + decrementHolder PatternFlowTcpEcnCwrCounter + metricTagsHolder PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter +} + +func NewPatternFlowTcpEcnCwr() PatternFlowTcpEcnCwr { + obj := patternFlowTcpEcnCwr{obj: &otg.PatternFlowTcpEcnCwr{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpEcnCwr) msg() *otg.PatternFlowTcpEcnCwr { + return obj.obj +} + +func (obj *patternFlowTcpEcnCwr) setMsg(msg *otg.PatternFlowTcpEcnCwr) PatternFlowTcpEcnCwr { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpEcnCwr struct { + obj *patternFlowTcpEcnCwr +} + +type marshalPatternFlowTcpEcnCwr interface { + // ToProto marshals PatternFlowTcpEcnCwr to protobuf object *otg.PatternFlowTcpEcnCwr + ToProto() (*otg.PatternFlowTcpEcnCwr, error) + // ToPbText marshals PatternFlowTcpEcnCwr to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpEcnCwr to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpEcnCwr to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpEcnCwr struct { + obj *patternFlowTcpEcnCwr +} + +type unMarshalPatternFlowTcpEcnCwr interface { + // FromProto unmarshals PatternFlowTcpEcnCwr from protobuf object *otg.PatternFlowTcpEcnCwr + FromProto(msg *otg.PatternFlowTcpEcnCwr) (PatternFlowTcpEcnCwr, error) + // FromPbText unmarshals PatternFlowTcpEcnCwr from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpEcnCwr from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpEcnCwr from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpEcnCwr) Marshal() marshalPatternFlowTcpEcnCwr { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpEcnCwr{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpEcnCwr) Unmarshal() unMarshalPatternFlowTcpEcnCwr { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpEcnCwr{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpEcnCwr) ToProto() (*otg.PatternFlowTcpEcnCwr, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpEcnCwr) FromProto(msg *otg.PatternFlowTcpEcnCwr) (PatternFlowTcpEcnCwr, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpEcnCwr) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpEcnCwr) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpEcnCwr) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnCwr) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpEcnCwr) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnCwr) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpEcnCwr) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnCwr) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnCwr) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpEcnCwr) Clone() (PatternFlowTcpEcnCwr, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpEcnCwr() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpEcnCwr) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpEcnCwr is explicit congestion notification, congestion window reduced. +type PatternFlowTcpEcnCwr interface { + Validation + // msg marshals PatternFlowTcpEcnCwr to protobuf object *otg.PatternFlowTcpEcnCwr + // and doesn't set defaults + msg() *otg.PatternFlowTcpEcnCwr + // setMsg unmarshals PatternFlowTcpEcnCwr from protobuf object *otg.PatternFlowTcpEcnCwr + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpEcnCwr) PatternFlowTcpEcnCwr + // provides marshal interface + Marshal() marshalPatternFlowTcpEcnCwr + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpEcnCwr + // validate validates PatternFlowTcpEcnCwr + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpEcnCwr, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpEcnCwrChoiceEnum, set in PatternFlowTcpEcnCwr + Choice() PatternFlowTcpEcnCwrChoiceEnum + // setChoice assigns PatternFlowTcpEcnCwrChoiceEnum provided by user to PatternFlowTcpEcnCwr + setChoice(value PatternFlowTcpEcnCwrChoiceEnum) PatternFlowTcpEcnCwr + // HasChoice checks if Choice has been set in PatternFlowTcpEcnCwr + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpEcnCwr. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpEcnCwr + SetValue(value uint32) PatternFlowTcpEcnCwr + // HasValue checks if Value has been set in PatternFlowTcpEcnCwr + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpEcnCwr. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpEcnCwr + SetValues(value []uint32) PatternFlowTcpEcnCwr + // Increment returns PatternFlowTcpEcnCwrCounter, set in PatternFlowTcpEcnCwr. + // PatternFlowTcpEcnCwrCounter is integer counter pattern + Increment() PatternFlowTcpEcnCwrCounter + // SetIncrement assigns PatternFlowTcpEcnCwrCounter provided by user to PatternFlowTcpEcnCwr. + // PatternFlowTcpEcnCwrCounter is integer counter pattern + SetIncrement(value PatternFlowTcpEcnCwrCounter) PatternFlowTcpEcnCwr + // HasIncrement checks if Increment has been set in PatternFlowTcpEcnCwr + HasIncrement() bool + // Decrement returns PatternFlowTcpEcnCwrCounter, set in PatternFlowTcpEcnCwr. + // PatternFlowTcpEcnCwrCounter is integer counter pattern + Decrement() PatternFlowTcpEcnCwrCounter + // SetDecrement assigns PatternFlowTcpEcnCwrCounter provided by user to PatternFlowTcpEcnCwr. + // PatternFlowTcpEcnCwrCounter is integer counter pattern + SetDecrement(value PatternFlowTcpEcnCwrCounter) PatternFlowTcpEcnCwr + // HasDecrement checks if Decrement has been set in PatternFlowTcpEcnCwr + HasDecrement() bool + // MetricTags returns PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIterIter, set in PatternFlowTcpEcnCwr + MetricTags() PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter + setNil() +} + +type PatternFlowTcpEcnCwrChoiceEnum string + +// Enum of Choice on PatternFlowTcpEcnCwr +var PatternFlowTcpEcnCwrChoice = struct { + VALUE PatternFlowTcpEcnCwrChoiceEnum + VALUES PatternFlowTcpEcnCwrChoiceEnum + INCREMENT PatternFlowTcpEcnCwrChoiceEnum + DECREMENT PatternFlowTcpEcnCwrChoiceEnum +}{ + VALUE: PatternFlowTcpEcnCwrChoiceEnum("value"), + VALUES: PatternFlowTcpEcnCwrChoiceEnum("values"), + INCREMENT: PatternFlowTcpEcnCwrChoiceEnum("increment"), + DECREMENT: PatternFlowTcpEcnCwrChoiceEnum("decrement"), +} + +func (obj *patternFlowTcpEcnCwr) Choice() PatternFlowTcpEcnCwrChoiceEnum { + return PatternFlowTcpEcnCwrChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpEcnCwr) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpEcnCwr) setChoice(value PatternFlowTcpEcnCwrChoiceEnum) PatternFlowTcpEcnCwr { + intValue, ok := otg.PatternFlowTcpEcnCwr_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpEcnCwrChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpEcnCwr_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpEcnCwrChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpEcnCwrChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpEcnCwrChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpEcnCwrCounter().msg() + } + + if value == PatternFlowTcpEcnCwrChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpEcnCwrCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpEcnCwr) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpEcnCwrChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpEcnCwr) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpEcnCwr object +func (obj *patternFlowTcpEcnCwr) SetValue(value uint32) PatternFlowTcpEcnCwr { + obj.setChoice(PatternFlowTcpEcnCwrChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpEcnCwr) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpEcnCwr object +func (obj *patternFlowTcpEcnCwr) SetValues(value []uint32) PatternFlowTcpEcnCwr { + obj.setChoice(PatternFlowTcpEcnCwrChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpEcnCwrCounter +func (obj *patternFlowTcpEcnCwr) Increment() PatternFlowTcpEcnCwrCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpEcnCwrChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpEcnCwrCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpEcnCwrCounter +func (obj *patternFlowTcpEcnCwr) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpEcnCwrCounter value in the PatternFlowTcpEcnCwr object +func (obj *patternFlowTcpEcnCwr) SetIncrement(value PatternFlowTcpEcnCwrCounter) PatternFlowTcpEcnCwr { + obj.setChoice(PatternFlowTcpEcnCwrChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpEcnCwrCounter +func (obj *patternFlowTcpEcnCwr) Decrement() PatternFlowTcpEcnCwrCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpEcnCwrChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpEcnCwrCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpEcnCwrCounter +func (obj *patternFlowTcpEcnCwr) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpEcnCwrCounter value in the PatternFlowTcpEcnCwr object +func (obj *patternFlowTcpEcnCwr) SetDecrement(value PatternFlowTcpEcnCwrCounter) PatternFlowTcpEcnCwr { + obj.setChoice(PatternFlowTcpEcnCwrChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpEcnCwrMetricTag +func (obj *patternFlowTcpEcnCwr) MetricTags() PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpEcnCwrMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter struct { + obj *patternFlowTcpEcnCwr + patternFlowTcpEcnCwrMetricTagSlice []PatternFlowTcpEcnCwrMetricTag + fieldPtr *[]*otg.PatternFlowTcpEcnCwrMetricTag +} + +func newPatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter(ptr *[]*otg.PatternFlowTcpEcnCwrMetricTag) PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter { + return &patternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter interface { + setMsg(*patternFlowTcpEcnCwr) PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter + Items() []PatternFlowTcpEcnCwrMetricTag + Add() PatternFlowTcpEcnCwrMetricTag + Append(items ...PatternFlowTcpEcnCwrMetricTag) PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter + Set(index int, newObj PatternFlowTcpEcnCwrMetricTag) PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter + Clear() PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter + clearHolderSlice() PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter + appendHolderSlice(item PatternFlowTcpEcnCwrMetricTag) PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter +} + +func (obj *patternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter) setMsg(msg *patternFlowTcpEcnCwr) PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpEcnCwrMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter) Items() []PatternFlowTcpEcnCwrMetricTag { + return obj.patternFlowTcpEcnCwrMetricTagSlice +} + +func (obj *patternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter) Add() PatternFlowTcpEcnCwrMetricTag { + newObj := &otg.PatternFlowTcpEcnCwrMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpEcnCwrMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpEcnCwrMetricTagSlice = append(obj.patternFlowTcpEcnCwrMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter) Append(items ...PatternFlowTcpEcnCwrMetricTag) PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpEcnCwrMetricTagSlice = append(obj.patternFlowTcpEcnCwrMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter) Set(index int, newObj PatternFlowTcpEcnCwrMetricTag) PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpEcnCwrMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter) Clear() PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpEcnCwrMetricTag{} + obj.patternFlowTcpEcnCwrMetricTagSlice = []PatternFlowTcpEcnCwrMetricTag{} + } + return obj +} +func (obj *patternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter) clearHolderSlice() PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter { + if len(obj.patternFlowTcpEcnCwrMetricTagSlice) > 0 { + obj.patternFlowTcpEcnCwrMetricTagSlice = []PatternFlowTcpEcnCwrMetricTag{} + } + return obj +} +func (obj *patternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter) appendHolderSlice(item PatternFlowTcpEcnCwrMetricTag) PatternFlowTcpEcnCwrPatternFlowTcpEcnCwrMetricTagIter { + obj.patternFlowTcpEcnCwrMetricTagSlice = append(obj.patternFlowTcpEcnCwrMetricTagSlice, item) + return obj +} + +func (obj *patternFlowTcpEcnCwr) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnCwr.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowTcpEcnCwr.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpEcnCwrMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowTcpEcnCwr) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpEcnCwrChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpEcnCwrChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpEcnCwrChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpEcnCwrChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpEcnCwrChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpEcnCwrChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpEcnCwr") + } + } else { + intVal := otg.PatternFlowTcpEcnCwr_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpEcnCwr_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_ecn_cwr_counter.go b/gosnappi/pattern_flow_tcp_ecn_cwr_counter.go new file mode 100644 index 00000000..5840841a --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ecn_cwr_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpEcnCwrCounter ***** +type patternFlowTcpEcnCwrCounter struct { + validation + obj *otg.PatternFlowTcpEcnCwrCounter + marshaller marshalPatternFlowTcpEcnCwrCounter + unMarshaller unMarshalPatternFlowTcpEcnCwrCounter +} + +func NewPatternFlowTcpEcnCwrCounter() PatternFlowTcpEcnCwrCounter { + obj := patternFlowTcpEcnCwrCounter{obj: &otg.PatternFlowTcpEcnCwrCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpEcnCwrCounter) msg() *otg.PatternFlowTcpEcnCwrCounter { + return obj.obj +} + +func (obj *patternFlowTcpEcnCwrCounter) setMsg(msg *otg.PatternFlowTcpEcnCwrCounter) PatternFlowTcpEcnCwrCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpEcnCwrCounter struct { + obj *patternFlowTcpEcnCwrCounter +} + +type marshalPatternFlowTcpEcnCwrCounter interface { + // ToProto marshals PatternFlowTcpEcnCwrCounter to protobuf object *otg.PatternFlowTcpEcnCwrCounter + ToProto() (*otg.PatternFlowTcpEcnCwrCounter, error) + // ToPbText marshals PatternFlowTcpEcnCwrCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpEcnCwrCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpEcnCwrCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpEcnCwrCounter struct { + obj *patternFlowTcpEcnCwrCounter +} + +type unMarshalPatternFlowTcpEcnCwrCounter interface { + // FromProto unmarshals PatternFlowTcpEcnCwrCounter from protobuf object *otg.PatternFlowTcpEcnCwrCounter + FromProto(msg *otg.PatternFlowTcpEcnCwrCounter) (PatternFlowTcpEcnCwrCounter, error) + // FromPbText unmarshals PatternFlowTcpEcnCwrCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpEcnCwrCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpEcnCwrCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpEcnCwrCounter) Marshal() marshalPatternFlowTcpEcnCwrCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpEcnCwrCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpEcnCwrCounter) Unmarshal() unMarshalPatternFlowTcpEcnCwrCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpEcnCwrCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpEcnCwrCounter) ToProto() (*otg.PatternFlowTcpEcnCwrCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpEcnCwrCounter) FromProto(msg *otg.PatternFlowTcpEcnCwrCounter) (PatternFlowTcpEcnCwrCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpEcnCwrCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpEcnCwrCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpEcnCwrCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnCwrCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpEcnCwrCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnCwrCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpEcnCwrCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnCwrCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnCwrCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpEcnCwrCounter) Clone() (PatternFlowTcpEcnCwrCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpEcnCwrCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpEcnCwrCounter is integer counter pattern +type PatternFlowTcpEcnCwrCounter interface { + Validation + // msg marshals PatternFlowTcpEcnCwrCounter to protobuf object *otg.PatternFlowTcpEcnCwrCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpEcnCwrCounter + // setMsg unmarshals PatternFlowTcpEcnCwrCounter from protobuf object *otg.PatternFlowTcpEcnCwrCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpEcnCwrCounter) PatternFlowTcpEcnCwrCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpEcnCwrCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpEcnCwrCounter + // validate validates PatternFlowTcpEcnCwrCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpEcnCwrCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpEcnCwrCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpEcnCwrCounter + SetStart(value uint32) PatternFlowTcpEcnCwrCounter + // HasStart checks if Start has been set in PatternFlowTcpEcnCwrCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpEcnCwrCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpEcnCwrCounter + SetStep(value uint32) PatternFlowTcpEcnCwrCounter + // HasStep checks if Step has been set in PatternFlowTcpEcnCwrCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpEcnCwrCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpEcnCwrCounter + SetCount(value uint32) PatternFlowTcpEcnCwrCounter + // HasCount checks if Count has been set in PatternFlowTcpEcnCwrCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpEcnCwrCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpEcnCwrCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpEcnCwrCounter object +func (obj *patternFlowTcpEcnCwrCounter) SetStart(value uint32) PatternFlowTcpEcnCwrCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpEcnCwrCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpEcnCwrCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpEcnCwrCounter object +func (obj *patternFlowTcpEcnCwrCounter) SetStep(value uint32) PatternFlowTcpEcnCwrCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpEcnCwrCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpEcnCwrCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpEcnCwrCounter object +func (obj *patternFlowTcpEcnCwrCounter) SetCount(value uint32) PatternFlowTcpEcnCwrCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpEcnCwrCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnCwrCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnCwrCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnCwrCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowTcpEcnCwrCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ecn_cwr_metric_tag.go b/gosnappi/pattern_flow_tcp_ecn_cwr_metric_tag.go new file mode 100644 index 00000000..32d7e304 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ecn_cwr_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpEcnCwrMetricTag ***** +type patternFlowTcpEcnCwrMetricTag struct { + validation + obj *otg.PatternFlowTcpEcnCwrMetricTag + marshaller marshalPatternFlowTcpEcnCwrMetricTag + unMarshaller unMarshalPatternFlowTcpEcnCwrMetricTag +} + +func NewPatternFlowTcpEcnCwrMetricTag() PatternFlowTcpEcnCwrMetricTag { + obj := patternFlowTcpEcnCwrMetricTag{obj: &otg.PatternFlowTcpEcnCwrMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpEcnCwrMetricTag) msg() *otg.PatternFlowTcpEcnCwrMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpEcnCwrMetricTag) setMsg(msg *otg.PatternFlowTcpEcnCwrMetricTag) PatternFlowTcpEcnCwrMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpEcnCwrMetricTag struct { + obj *patternFlowTcpEcnCwrMetricTag +} + +type marshalPatternFlowTcpEcnCwrMetricTag interface { + // ToProto marshals PatternFlowTcpEcnCwrMetricTag to protobuf object *otg.PatternFlowTcpEcnCwrMetricTag + ToProto() (*otg.PatternFlowTcpEcnCwrMetricTag, error) + // ToPbText marshals PatternFlowTcpEcnCwrMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpEcnCwrMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpEcnCwrMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpEcnCwrMetricTag struct { + obj *patternFlowTcpEcnCwrMetricTag +} + +type unMarshalPatternFlowTcpEcnCwrMetricTag interface { + // FromProto unmarshals PatternFlowTcpEcnCwrMetricTag from protobuf object *otg.PatternFlowTcpEcnCwrMetricTag + FromProto(msg *otg.PatternFlowTcpEcnCwrMetricTag) (PatternFlowTcpEcnCwrMetricTag, error) + // FromPbText unmarshals PatternFlowTcpEcnCwrMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpEcnCwrMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpEcnCwrMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpEcnCwrMetricTag) Marshal() marshalPatternFlowTcpEcnCwrMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpEcnCwrMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpEcnCwrMetricTag) Unmarshal() unMarshalPatternFlowTcpEcnCwrMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpEcnCwrMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpEcnCwrMetricTag) ToProto() (*otg.PatternFlowTcpEcnCwrMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpEcnCwrMetricTag) FromProto(msg *otg.PatternFlowTcpEcnCwrMetricTag) (PatternFlowTcpEcnCwrMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpEcnCwrMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpEcnCwrMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpEcnCwrMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnCwrMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpEcnCwrMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnCwrMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpEcnCwrMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnCwrMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnCwrMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpEcnCwrMetricTag) Clone() (PatternFlowTcpEcnCwrMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpEcnCwrMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpEcnCwrMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpEcnCwrMetricTag interface { + Validation + // msg marshals PatternFlowTcpEcnCwrMetricTag to protobuf object *otg.PatternFlowTcpEcnCwrMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpEcnCwrMetricTag + // setMsg unmarshals PatternFlowTcpEcnCwrMetricTag from protobuf object *otg.PatternFlowTcpEcnCwrMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpEcnCwrMetricTag) PatternFlowTcpEcnCwrMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpEcnCwrMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpEcnCwrMetricTag + // validate validates PatternFlowTcpEcnCwrMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpEcnCwrMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpEcnCwrMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpEcnCwrMetricTag + SetName(value string) PatternFlowTcpEcnCwrMetricTag + // Offset returns uint32, set in PatternFlowTcpEcnCwrMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpEcnCwrMetricTag + SetOffset(value uint32) PatternFlowTcpEcnCwrMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpEcnCwrMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpEcnCwrMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpEcnCwrMetricTag + SetLength(value uint32) PatternFlowTcpEcnCwrMetricTag + // HasLength checks if Length has been set in PatternFlowTcpEcnCwrMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpEcnCwrMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpEcnCwrMetricTag object +func (obj *patternFlowTcpEcnCwrMetricTag) SetName(value string) PatternFlowTcpEcnCwrMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpEcnCwrMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpEcnCwrMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpEcnCwrMetricTag object +func (obj *patternFlowTcpEcnCwrMetricTag) SetOffset(value uint32) PatternFlowTcpEcnCwrMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpEcnCwrMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpEcnCwrMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpEcnCwrMetricTag object +func (obj *patternFlowTcpEcnCwrMetricTag) SetLength(value uint32) PatternFlowTcpEcnCwrMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpEcnCwrMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpEcnCwrMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnCwrMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpEcnCwrMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpEcnCwrMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ecn_echo.go b/gosnappi/pattern_flow_tcp_ecn_echo.go new file mode 100644 index 00000000..b726bb47 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ecn_echo.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpEcnEcho ***** +type patternFlowTcpEcnEcho struct { + validation + obj *otg.PatternFlowTcpEcnEcho + marshaller marshalPatternFlowTcpEcnEcho + unMarshaller unMarshalPatternFlowTcpEcnEcho + incrementHolder PatternFlowTcpEcnEchoCounter + decrementHolder PatternFlowTcpEcnEchoCounter + metricTagsHolder PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter +} + +func NewPatternFlowTcpEcnEcho() PatternFlowTcpEcnEcho { + obj := patternFlowTcpEcnEcho{obj: &otg.PatternFlowTcpEcnEcho{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpEcnEcho) msg() *otg.PatternFlowTcpEcnEcho { + return obj.obj +} + +func (obj *patternFlowTcpEcnEcho) setMsg(msg *otg.PatternFlowTcpEcnEcho) PatternFlowTcpEcnEcho { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpEcnEcho struct { + obj *patternFlowTcpEcnEcho +} + +type marshalPatternFlowTcpEcnEcho interface { + // ToProto marshals PatternFlowTcpEcnEcho to protobuf object *otg.PatternFlowTcpEcnEcho + ToProto() (*otg.PatternFlowTcpEcnEcho, error) + // ToPbText marshals PatternFlowTcpEcnEcho to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpEcnEcho to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpEcnEcho to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpEcnEcho struct { + obj *patternFlowTcpEcnEcho +} + +type unMarshalPatternFlowTcpEcnEcho interface { + // FromProto unmarshals PatternFlowTcpEcnEcho from protobuf object *otg.PatternFlowTcpEcnEcho + FromProto(msg *otg.PatternFlowTcpEcnEcho) (PatternFlowTcpEcnEcho, error) + // FromPbText unmarshals PatternFlowTcpEcnEcho from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpEcnEcho from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpEcnEcho from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpEcnEcho) Marshal() marshalPatternFlowTcpEcnEcho { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpEcnEcho{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpEcnEcho) Unmarshal() unMarshalPatternFlowTcpEcnEcho { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpEcnEcho{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpEcnEcho) ToProto() (*otg.PatternFlowTcpEcnEcho, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpEcnEcho) FromProto(msg *otg.PatternFlowTcpEcnEcho) (PatternFlowTcpEcnEcho, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpEcnEcho) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpEcnEcho) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpEcnEcho) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnEcho) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpEcnEcho) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnEcho) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpEcnEcho) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnEcho) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnEcho) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpEcnEcho) Clone() (PatternFlowTcpEcnEcho, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpEcnEcho() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpEcnEcho) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpEcnEcho is explicit congestion notification, echo. 1 indicates the peer is ecn capable. 0 indicates that a packet with ipv4.ecn = 11 in the ip header was received during normal transmission. +type PatternFlowTcpEcnEcho interface { + Validation + // msg marshals PatternFlowTcpEcnEcho to protobuf object *otg.PatternFlowTcpEcnEcho + // and doesn't set defaults + msg() *otg.PatternFlowTcpEcnEcho + // setMsg unmarshals PatternFlowTcpEcnEcho from protobuf object *otg.PatternFlowTcpEcnEcho + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpEcnEcho) PatternFlowTcpEcnEcho + // provides marshal interface + Marshal() marshalPatternFlowTcpEcnEcho + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpEcnEcho + // validate validates PatternFlowTcpEcnEcho + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpEcnEcho, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpEcnEchoChoiceEnum, set in PatternFlowTcpEcnEcho + Choice() PatternFlowTcpEcnEchoChoiceEnum + // setChoice assigns PatternFlowTcpEcnEchoChoiceEnum provided by user to PatternFlowTcpEcnEcho + setChoice(value PatternFlowTcpEcnEchoChoiceEnum) PatternFlowTcpEcnEcho + // HasChoice checks if Choice has been set in PatternFlowTcpEcnEcho + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpEcnEcho. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpEcnEcho + SetValue(value uint32) PatternFlowTcpEcnEcho + // HasValue checks if Value has been set in PatternFlowTcpEcnEcho + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpEcnEcho. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpEcnEcho + SetValues(value []uint32) PatternFlowTcpEcnEcho + // Increment returns PatternFlowTcpEcnEchoCounter, set in PatternFlowTcpEcnEcho. + // PatternFlowTcpEcnEchoCounter is integer counter pattern + Increment() PatternFlowTcpEcnEchoCounter + // SetIncrement assigns PatternFlowTcpEcnEchoCounter provided by user to PatternFlowTcpEcnEcho. + // PatternFlowTcpEcnEchoCounter is integer counter pattern + SetIncrement(value PatternFlowTcpEcnEchoCounter) PatternFlowTcpEcnEcho + // HasIncrement checks if Increment has been set in PatternFlowTcpEcnEcho + HasIncrement() bool + // Decrement returns PatternFlowTcpEcnEchoCounter, set in PatternFlowTcpEcnEcho. + // PatternFlowTcpEcnEchoCounter is integer counter pattern + Decrement() PatternFlowTcpEcnEchoCounter + // SetDecrement assigns PatternFlowTcpEcnEchoCounter provided by user to PatternFlowTcpEcnEcho. + // PatternFlowTcpEcnEchoCounter is integer counter pattern + SetDecrement(value PatternFlowTcpEcnEchoCounter) PatternFlowTcpEcnEcho + // HasDecrement checks if Decrement has been set in PatternFlowTcpEcnEcho + HasDecrement() bool + // MetricTags returns PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIterIter, set in PatternFlowTcpEcnEcho + MetricTags() PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter + setNil() +} + +type PatternFlowTcpEcnEchoChoiceEnum string + +// Enum of Choice on PatternFlowTcpEcnEcho +var PatternFlowTcpEcnEchoChoice = struct { + VALUE PatternFlowTcpEcnEchoChoiceEnum + VALUES PatternFlowTcpEcnEchoChoiceEnum + INCREMENT PatternFlowTcpEcnEchoChoiceEnum + DECREMENT PatternFlowTcpEcnEchoChoiceEnum +}{ + VALUE: PatternFlowTcpEcnEchoChoiceEnum("value"), + VALUES: PatternFlowTcpEcnEchoChoiceEnum("values"), + INCREMENT: PatternFlowTcpEcnEchoChoiceEnum("increment"), + DECREMENT: PatternFlowTcpEcnEchoChoiceEnum("decrement"), +} + +func (obj *patternFlowTcpEcnEcho) Choice() PatternFlowTcpEcnEchoChoiceEnum { + return PatternFlowTcpEcnEchoChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpEcnEcho) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpEcnEcho) setChoice(value PatternFlowTcpEcnEchoChoiceEnum) PatternFlowTcpEcnEcho { + intValue, ok := otg.PatternFlowTcpEcnEcho_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpEcnEchoChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpEcnEcho_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpEcnEchoChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpEcnEchoChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpEcnEchoChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpEcnEchoCounter().msg() + } + + if value == PatternFlowTcpEcnEchoChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpEcnEchoCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpEcnEcho) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpEcnEchoChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpEcnEcho) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpEcnEcho object +func (obj *patternFlowTcpEcnEcho) SetValue(value uint32) PatternFlowTcpEcnEcho { + obj.setChoice(PatternFlowTcpEcnEchoChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpEcnEcho) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpEcnEcho object +func (obj *patternFlowTcpEcnEcho) SetValues(value []uint32) PatternFlowTcpEcnEcho { + obj.setChoice(PatternFlowTcpEcnEchoChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpEcnEchoCounter +func (obj *patternFlowTcpEcnEcho) Increment() PatternFlowTcpEcnEchoCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpEcnEchoChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpEcnEchoCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpEcnEchoCounter +func (obj *patternFlowTcpEcnEcho) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpEcnEchoCounter value in the PatternFlowTcpEcnEcho object +func (obj *patternFlowTcpEcnEcho) SetIncrement(value PatternFlowTcpEcnEchoCounter) PatternFlowTcpEcnEcho { + obj.setChoice(PatternFlowTcpEcnEchoChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpEcnEchoCounter +func (obj *patternFlowTcpEcnEcho) Decrement() PatternFlowTcpEcnEchoCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpEcnEchoChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpEcnEchoCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpEcnEchoCounter +func (obj *patternFlowTcpEcnEcho) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpEcnEchoCounter value in the PatternFlowTcpEcnEcho object +func (obj *patternFlowTcpEcnEcho) SetDecrement(value PatternFlowTcpEcnEchoCounter) PatternFlowTcpEcnEcho { + obj.setChoice(PatternFlowTcpEcnEchoChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpEcnEchoMetricTag +func (obj *patternFlowTcpEcnEcho) MetricTags() PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpEcnEchoMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter struct { + obj *patternFlowTcpEcnEcho + patternFlowTcpEcnEchoMetricTagSlice []PatternFlowTcpEcnEchoMetricTag + fieldPtr *[]*otg.PatternFlowTcpEcnEchoMetricTag +} + +func newPatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter(ptr *[]*otg.PatternFlowTcpEcnEchoMetricTag) PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter { + return &patternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter interface { + setMsg(*patternFlowTcpEcnEcho) PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter + Items() []PatternFlowTcpEcnEchoMetricTag + Add() PatternFlowTcpEcnEchoMetricTag + Append(items ...PatternFlowTcpEcnEchoMetricTag) PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter + Set(index int, newObj PatternFlowTcpEcnEchoMetricTag) PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter + Clear() PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter + clearHolderSlice() PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter + appendHolderSlice(item PatternFlowTcpEcnEchoMetricTag) PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter +} + +func (obj *patternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter) setMsg(msg *patternFlowTcpEcnEcho) PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpEcnEchoMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter) Items() []PatternFlowTcpEcnEchoMetricTag { + return obj.patternFlowTcpEcnEchoMetricTagSlice +} + +func (obj *patternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter) Add() PatternFlowTcpEcnEchoMetricTag { + newObj := &otg.PatternFlowTcpEcnEchoMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpEcnEchoMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpEcnEchoMetricTagSlice = append(obj.patternFlowTcpEcnEchoMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter) Append(items ...PatternFlowTcpEcnEchoMetricTag) PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpEcnEchoMetricTagSlice = append(obj.patternFlowTcpEcnEchoMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter) Set(index int, newObj PatternFlowTcpEcnEchoMetricTag) PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpEcnEchoMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter) Clear() PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpEcnEchoMetricTag{} + obj.patternFlowTcpEcnEchoMetricTagSlice = []PatternFlowTcpEcnEchoMetricTag{} + } + return obj +} +func (obj *patternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter) clearHolderSlice() PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter { + if len(obj.patternFlowTcpEcnEchoMetricTagSlice) > 0 { + obj.patternFlowTcpEcnEchoMetricTagSlice = []PatternFlowTcpEcnEchoMetricTag{} + } + return obj +} +func (obj *patternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter) appendHolderSlice(item PatternFlowTcpEcnEchoMetricTag) PatternFlowTcpEcnEchoPatternFlowTcpEcnEchoMetricTagIter { + obj.patternFlowTcpEcnEchoMetricTagSlice = append(obj.patternFlowTcpEcnEchoMetricTagSlice, item) + return obj +} + +func (obj *patternFlowTcpEcnEcho) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnEcho.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowTcpEcnEcho.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpEcnEchoMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowTcpEcnEcho) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpEcnEchoChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpEcnEchoChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpEcnEchoChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpEcnEchoChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpEcnEchoChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpEcnEchoChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpEcnEcho") + } + } else { + intVal := otg.PatternFlowTcpEcnEcho_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpEcnEcho_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_ecn_echo_counter.go b/gosnappi/pattern_flow_tcp_ecn_echo_counter.go new file mode 100644 index 00000000..6ffc16ef --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ecn_echo_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpEcnEchoCounter ***** +type patternFlowTcpEcnEchoCounter struct { + validation + obj *otg.PatternFlowTcpEcnEchoCounter + marshaller marshalPatternFlowTcpEcnEchoCounter + unMarshaller unMarshalPatternFlowTcpEcnEchoCounter +} + +func NewPatternFlowTcpEcnEchoCounter() PatternFlowTcpEcnEchoCounter { + obj := patternFlowTcpEcnEchoCounter{obj: &otg.PatternFlowTcpEcnEchoCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpEcnEchoCounter) msg() *otg.PatternFlowTcpEcnEchoCounter { + return obj.obj +} + +func (obj *patternFlowTcpEcnEchoCounter) setMsg(msg *otg.PatternFlowTcpEcnEchoCounter) PatternFlowTcpEcnEchoCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpEcnEchoCounter struct { + obj *patternFlowTcpEcnEchoCounter +} + +type marshalPatternFlowTcpEcnEchoCounter interface { + // ToProto marshals PatternFlowTcpEcnEchoCounter to protobuf object *otg.PatternFlowTcpEcnEchoCounter + ToProto() (*otg.PatternFlowTcpEcnEchoCounter, error) + // ToPbText marshals PatternFlowTcpEcnEchoCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpEcnEchoCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpEcnEchoCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpEcnEchoCounter struct { + obj *patternFlowTcpEcnEchoCounter +} + +type unMarshalPatternFlowTcpEcnEchoCounter interface { + // FromProto unmarshals PatternFlowTcpEcnEchoCounter from protobuf object *otg.PatternFlowTcpEcnEchoCounter + FromProto(msg *otg.PatternFlowTcpEcnEchoCounter) (PatternFlowTcpEcnEchoCounter, error) + // FromPbText unmarshals PatternFlowTcpEcnEchoCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpEcnEchoCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpEcnEchoCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpEcnEchoCounter) Marshal() marshalPatternFlowTcpEcnEchoCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpEcnEchoCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpEcnEchoCounter) Unmarshal() unMarshalPatternFlowTcpEcnEchoCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpEcnEchoCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpEcnEchoCounter) ToProto() (*otg.PatternFlowTcpEcnEchoCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpEcnEchoCounter) FromProto(msg *otg.PatternFlowTcpEcnEchoCounter) (PatternFlowTcpEcnEchoCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpEcnEchoCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpEcnEchoCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpEcnEchoCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnEchoCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpEcnEchoCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnEchoCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpEcnEchoCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnEchoCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnEchoCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpEcnEchoCounter) Clone() (PatternFlowTcpEcnEchoCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpEcnEchoCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpEcnEchoCounter is integer counter pattern +type PatternFlowTcpEcnEchoCounter interface { + Validation + // msg marshals PatternFlowTcpEcnEchoCounter to protobuf object *otg.PatternFlowTcpEcnEchoCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpEcnEchoCounter + // setMsg unmarshals PatternFlowTcpEcnEchoCounter from protobuf object *otg.PatternFlowTcpEcnEchoCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpEcnEchoCounter) PatternFlowTcpEcnEchoCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpEcnEchoCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpEcnEchoCounter + // validate validates PatternFlowTcpEcnEchoCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpEcnEchoCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpEcnEchoCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpEcnEchoCounter + SetStart(value uint32) PatternFlowTcpEcnEchoCounter + // HasStart checks if Start has been set in PatternFlowTcpEcnEchoCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpEcnEchoCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpEcnEchoCounter + SetStep(value uint32) PatternFlowTcpEcnEchoCounter + // HasStep checks if Step has been set in PatternFlowTcpEcnEchoCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpEcnEchoCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpEcnEchoCounter + SetCount(value uint32) PatternFlowTcpEcnEchoCounter + // HasCount checks if Count has been set in PatternFlowTcpEcnEchoCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpEcnEchoCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpEcnEchoCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpEcnEchoCounter object +func (obj *patternFlowTcpEcnEchoCounter) SetStart(value uint32) PatternFlowTcpEcnEchoCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpEcnEchoCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpEcnEchoCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpEcnEchoCounter object +func (obj *patternFlowTcpEcnEchoCounter) SetStep(value uint32) PatternFlowTcpEcnEchoCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpEcnEchoCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpEcnEchoCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpEcnEchoCounter object +func (obj *patternFlowTcpEcnEchoCounter) SetCount(value uint32) PatternFlowTcpEcnEchoCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpEcnEchoCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnEchoCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnEchoCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnEchoCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowTcpEcnEchoCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ecn_echo_metric_tag.go b/gosnappi/pattern_flow_tcp_ecn_echo_metric_tag.go new file mode 100644 index 00000000..89f278a8 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ecn_echo_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpEcnEchoMetricTag ***** +type patternFlowTcpEcnEchoMetricTag struct { + validation + obj *otg.PatternFlowTcpEcnEchoMetricTag + marshaller marshalPatternFlowTcpEcnEchoMetricTag + unMarshaller unMarshalPatternFlowTcpEcnEchoMetricTag +} + +func NewPatternFlowTcpEcnEchoMetricTag() PatternFlowTcpEcnEchoMetricTag { + obj := patternFlowTcpEcnEchoMetricTag{obj: &otg.PatternFlowTcpEcnEchoMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpEcnEchoMetricTag) msg() *otg.PatternFlowTcpEcnEchoMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpEcnEchoMetricTag) setMsg(msg *otg.PatternFlowTcpEcnEchoMetricTag) PatternFlowTcpEcnEchoMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpEcnEchoMetricTag struct { + obj *patternFlowTcpEcnEchoMetricTag +} + +type marshalPatternFlowTcpEcnEchoMetricTag interface { + // ToProto marshals PatternFlowTcpEcnEchoMetricTag to protobuf object *otg.PatternFlowTcpEcnEchoMetricTag + ToProto() (*otg.PatternFlowTcpEcnEchoMetricTag, error) + // ToPbText marshals PatternFlowTcpEcnEchoMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpEcnEchoMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpEcnEchoMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpEcnEchoMetricTag struct { + obj *patternFlowTcpEcnEchoMetricTag +} + +type unMarshalPatternFlowTcpEcnEchoMetricTag interface { + // FromProto unmarshals PatternFlowTcpEcnEchoMetricTag from protobuf object *otg.PatternFlowTcpEcnEchoMetricTag + FromProto(msg *otg.PatternFlowTcpEcnEchoMetricTag) (PatternFlowTcpEcnEchoMetricTag, error) + // FromPbText unmarshals PatternFlowTcpEcnEchoMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpEcnEchoMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpEcnEchoMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpEcnEchoMetricTag) Marshal() marshalPatternFlowTcpEcnEchoMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpEcnEchoMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpEcnEchoMetricTag) Unmarshal() unMarshalPatternFlowTcpEcnEchoMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpEcnEchoMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpEcnEchoMetricTag) ToProto() (*otg.PatternFlowTcpEcnEchoMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpEcnEchoMetricTag) FromProto(msg *otg.PatternFlowTcpEcnEchoMetricTag) (PatternFlowTcpEcnEchoMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpEcnEchoMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpEcnEchoMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpEcnEchoMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnEchoMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpEcnEchoMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnEchoMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpEcnEchoMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnEchoMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnEchoMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpEcnEchoMetricTag) Clone() (PatternFlowTcpEcnEchoMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpEcnEchoMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpEcnEchoMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpEcnEchoMetricTag interface { + Validation + // msg marshals PatternFlowTcpEcnEchoMetricTag to protobuf object *otg.PatternFlowTcpEcnEchoMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpEcnEchoMetricTag + // setMsg unmarshals PatternFlowTcpEcnEchoMetricTag from protobuf object *otg.PatternFlowTcpEcnEchoMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpEcnEchoMetricTag) PatternFlowTcpEcnEchoMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpEcnEchoMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpEcnEchoMetricTag + // validate validates PatternFlowTcpEcnEchoMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpEcnEchoMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpEcnEchoMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpEcnEchoMetricTag + SetName(value string) PatternFlowTcpEcnEchoMetricTag + // Offset returns uint32, set in PatternFlowTcpEcnEchoMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpEcnEchoMetricTag + SetOffset(value uint32) PatternFlowTcpEcnEchoMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpEcnEchoMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpEcnEchoMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpEcnEchoMetricTag + SetLength(value uint32) PatternFlowTcpEcnEchoMetricTag + // HasLength checks if Length has been set in PatternFlowTcpEcnEchoMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpEcnEchoMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpEcnEchoMetricTag object +func (obj *patternFlowTcpEcnEchoMetricTag) SetName(value string) PatternFlowTcpEcnEchoMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpEcnEchoMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpEcnEchoMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpEcnEchoMetricTag object +func (obj *patternFlowTcpEcnEchoMetricTag) SetOffset(value uint32) PatternFlowTcpEcnEchoMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpEcnEchoMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpEcnEchoMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpEcnEchoMetricTag object +func (obj *patternFlowTcpEcnEchoMetricTag) SetLength(value uint32) PatternFlowTcpEcnEchoMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpEcnEchoMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpEcnEchoMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnEchoMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpEcnEchoMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpEcnEchoMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ecn_ns.go b/gosnappi/pattern_flow_tcp_ecn_ns.go new file mode 100644 index 00000000..f44ebca9 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ecn_ns.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpEcnNs ***** +type patternFlowTcpEcnNs struct { + validation + obj *otg.PatternFlowTcpEcnNs + marshaller marshalPatternFlowTcpEcnNs + unMarshaller unMarshalPatternFlowTcpEcnNs + incrementHolder PatternFlowTcpEcnNsCounter + decrementHolder PatternFlowTcpEcnNsCounter + metricTagsHolder PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter +} + +func NewPatternFlowTcpEcnNs() PatternFlowTcpEcnNs { + obj := patternFlowTcpEcnNs{obj: &otg.PatternFlowTcpEcnNs{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpEcnNs) msg() *otg.PatternFlowTcpEcnNs { + return obj.obj +} + +func (obj *patternFlowTcpEcnNs) setMsg(msg *otg.PatternFlowTcpEcnNs) PatternFlowTcpEcnNs { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpEcnNs struct { + obj *patternFlowTcpEcnNs +} + +type marshalPatternFlowTcpEcnNs interface { + // ToProto marshals PatternFlowTcpEcnNs to protobuf object *otg.PatternFlowTcpEcnNs + ToProto() (*otg.PatternFlowTcpEcnNs, error) + // ToPbText marshals PatternFlowTcpEcnNs to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpEcnNs to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpEcnNs to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpEcnNs struct { + obj *patternFlowTcpEcnNs +} + +type unMarshalPatternFlowTcpEcnNs interface { + // FromProto unmarshals PatternFlowTcpEcnNs from protobuf object *otg.PatternFlowTcpEcnNs + FromProto(msg *otg.PatternFlowTcpEcnNs) (PatternFlowTcpEcnNs, error) + // FromPbText unmarshals PatternFlowTcpEcnNs from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpEcnNs from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpEcnNs from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpEcnNs) Marshal() marshalPatternFlowTcpEcnNs { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpEcnNs{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpEcnNs) Unmarshal() unMarshalPatternFlowTcpEcnNs { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpEcnNs{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpEcnNs) ToProto() (*otg.PatternFlowTcpEcnNs, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpEcnNs) FromProto(msg *otg.PatternFlowTcpEcnNs) (PatternFlowTcpEcnNs, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpEcnNs) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpEcnNs) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpEcnNs) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnNs) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpEcnNs) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnNs) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpEcnNs) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnNs) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnNs) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpEcnNs) Clone() (PatternFlowTcpEcnNs, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpEcnNs() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpEcnNs) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpEcnNs is explicit congestion notification, concealment protection. +type PatternFlowTcpEcnNs interface { + Validation + // msg marshals PatternFlowTcpEcnNs to protobuf object *otg.PatternFlowTcpEcnNs + // and doesn't set defaults + msg() *otg.PatternFlowTcpEcnNs + // setMsg unmarshals PatternFlowTcpEcnNs from protobuf object *otg.PatternFlowTcpEcnNs + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpEcnNs) PatternFlowTcpEcnNs + // provides marshal interface + Marshal() marshalPatternFlowTcpEcnNs + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpEcnNs + // validate validates PatternFlowTcpEcnNs + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpEcnNs, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpEcnNsChoiceEnum, set in PatternFlowTcpEcnNs + Choice() PatternFlowTcpEcnNsChoiceEnum + // setChoice assigns PatternFlowTcpEcnNsChoiceEnum provided by user to PatternFlowTcpEcnNs + setChoice(value PatternFlowTcpEcnNsChoiceEnum) PatternFlowTcpEcnNs + // HasChoice checks if Choice has been set in PatternFlowTcpEcnNs + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpEcnNs. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpEcnNs + SetValue(value uint32) PatternFlowTcpEcnNs + // HasValue checks if Value has been set in PatternFlowTcpEcnNs + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpEcnNs. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpEcnNs + SetValues(value []uint32) PatternFlowTcpEcnNs + // Increment returns PatternFlowTcpEcnNsCounter, set in PatternFlowTcpEcnNs. + // PatternFlowTcpEcnNsCounter is integer counter pattern + Increment() PatternFlowTcpEcnNsCounter + // SetIncrement assigns PatternFlowTcpEcnNsCounter provided by user to PatternFlowTcpEcnNs. + // PatternFlowTcpEcnNsCounter is integer counter pattern + SetIncrement(value PatternFlowTcpEcnNsCounter) PatternFlowTcpEcnNs + // HasIncrement checks if Increment has been set in PatternFlowTcpEcnNs + HasIncrement() bool + // Decrement returns PatternFlowTcpEcnNsCounter, set in PatternFlowTcpEcnNs. + // PatternFlowTcpEcnNsCounter is integer counter pattern + Decrement() PatternFlowTcpEcnNsCounter + // SetDecrement assigns PatternFlowTcpEcnNsCounter provided by user to PatternFlowTcpEcnNs. + // PatternFlowTcpEcnNsCounter is integer counter pattern + SetDecrement(value PatternFlowTcpEcnNsCounter) PatternFlowTcpEcnNs + // HasDecrement checks if Decrement has been set in PatternFlowTcpEcnNs + HasDecrement() bool + // MetricTags returns PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIterIter, set in PatternFlowTcpEcnNs + MetricTags() PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter + setNil() +} + +type PatternFlowTcpEcnNsChoiceEnum string + +// Enum of Choice on PatternFlowTcpEcnNs +var PatternFlowTcpEcnNsChoice = struct { + VALUE PatternFlowTcpEcnNsChoiceEnum + VALUES PatternFlowTcpEcnNsChoiceEnum + INCREMENT PatternFlowTcpEcnNsChoiceEnum + DECREMENT PatternFlowTcpEcnNsChoiceEnum +}{ + VALUE: PatternFlowTcpEcnNsChoiceEnum("value"), + VALUES: PatternFlowTcpEcnNsChoiceEnum("values"), + INCREMENT: PatternFlowTcpEcnNsChoiceEnum("increment"), + DECREMENT: PatternFlowTcpEcnNsChoiceEnum("decrement"), +} + +func (obj *patternFlowTcpEcnNs) Choice() PatternFlowTcpEcnNsChoiceEnum { + return PatternFlowTcpEcnNsChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpEcnNs) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpEcnNs) setChoice(value PatternFlowTcpEcnNsChoiceEnum) PatternFlowTcpEcnNs { + intValue, ok := otg.PatternFlowTcpEcnNs_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpEcnNsChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpEcnNs_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpEcnNsChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpEcnNsChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpEcnNsChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpEcnNsCounter().msg() + } + + if value == PatternFlowTcpEcnNsChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpEcnNsCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpEcnNs) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpEcnNsChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpEcnNs) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpEcnNs object +func (obj *patternFlowTcpEcnNs) SetValue(value uint32) PatternFlowTcpEcnNs { + obj.setChoice(PatternFlowTcpEcnNsChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpEcnNs) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpEcnNs object +func (obj *patternFlowTcpEcnNs) SetValues(value []uint32) PatternFlowTcpEcnNs { + obj.setChoice(PatternFlowTcpEcnNsChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpEcnNsCounter +func (obj *patternFlowTcpEcnNs) Increment() PatternFlowTcpEcnNsCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpEcnNsChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpEcnNsCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpEcnNsCounter +func (obj *patternFlowTcpEcnNs) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpEcnNsCounter value in the PatternFlowTcpEcnNs object +func (obj *patternFlowTcpEcnNs) SetIncrement(value PatternFlowTcpEcnNsCounter) PatternFlowTcpEcnNs { + obj.setChoice(PatternFlowTcpEcnNsChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpEcnNsCounter +func (obj *patternFlowTcpEcnNs) Decrement() PatternFlowTcpEcnNsCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpEcnNsChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpEcnNsCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpEcnNsCounter +func (obj *patternFlowTcpEcnNs) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpEcnNsCounter value in the PatternFlowTcpEcnNs object +func (obj *patternFlowTcpEcnNs) SetDecrement(value PatternFlowTcpEcnNsCounter) PatternFlowTcpEcnNs { + obj.setChoice(PatternFlowTcpEcnNsChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpEcnNsMetricTag +func (obj *patternFlowTcpEcnNs) MetricTags() PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpEcnNsMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter struct { + obj *patternFlowTcpEcnNs + patternFlowTcpEcnNsMetricTagSlice []PatternFlowTcpEcnNsMetricTag + fieldPtr *[]*otg.PatternFlowTcpEcnNsMetricTag +} + +func newPatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter(ptr *[]*otg.PatternFlowTcpEcnNsMetricTag) PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter { + return &patternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter interface { + setMsg(*patternFlowTcpEcnNs) PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter + Items() []PatternFlowTcpEcnNsMetricTag + Add() PatternFlowTcpEcnNsMetricTag + Append(items ...PatternFlowTcpEcnNsMetricTag) PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter + Set(index int, newObj PatternFlowTcpEcnNsMetricTag) PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter + Clear() PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter + clearHolderSlice() PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter + appendHolderSlice(item PatternFlowTcpEcnNsMetricTag) PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter +} + +func (obj *patternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter) setMsg(msg *patternFlowTcpEcnNs) PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpEcnNsMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter) Items() []PatternFlowTcpEcnNsMetricTag { + return obj.patternFlowTcpEcnNsMetricTagSlice +} + +func (obj *patternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter) Add() PatternFlowTcpEcnNsMetricTag { + newObj := &otg.PatternFlowTcpEcnNsMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpEcnNsMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpEcnNsMetricTagSlice = append(obj.patternFlowTcpEcnNsMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter) Append(items ...PatternFlowTcpEcnNsMetricTag) PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpEcnNsMetricTagSlice = append(obj.patternFlowTcpEcnNsMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter) Set(index int, newObj PatternFlowTcpEcnNsMetricTag) PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpEcnNsMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter) Clear() PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpEcnNsMetricTag{} + obj.patternFlowTcpEcnNsMetricTagSlice = []PatternFlowTcpEcnNsMetricTag{} + } + return obj +} +func (obj *patternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter) clearHolderSlice() PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter { + if len(obj.patternFlowTcpEcnNsMetricTagSlice) > 0 { + obj.patternFlowTcpEcnNsMetricTagSlice = []PatternFlowTcpEcnNsMetricTag{} + } + return obj +} +func (obj *patternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter) appendHolderSlice(item PatternFlowTcpEcnNsMetricTag) PatternFlowTcpEcnNsPatternFlowTcpEcnNsMetricTagIter { + obj.patternFlowTcpEcnNsMetricTagSlice = append(obj.patternFlowTcpEcnNsMetricTagSlice, item) + return obj +} + +func (obj *patternFlowTcpEcnNs) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnNs.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowTcpEcnNs.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpEcnNsMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowTcpEcnNs) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpEcnNsChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpEcnNsChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpEcnNsChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpEcnNsChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpEcnNsChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpEcnNsChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpEcnNs") + } + } else { + intVal := otg.PatternFlowTcpEcnNs_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpEcnNs_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_ecn_ns_counter.go b/gosnappi/pattern_flow_tcp_ecn_ns_counter.go new file mode 100644 index 00000000..ccb661c3 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ecn_ns_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpEcnNsCounter ***** +type patternFlowTcpEcnNsCounter struct { + validation + obj *otg.PatternFlowTcpEcnNsCounter + marshaller marshalPatternFlowTcpEcnNsCounter + unMarshaller unMarshalPatternFlowTcpEcnNsCounter +} + +func NewPatternFlowTcpEcnNsCounter() PatternFlowTcpEcnNsCounter { + obj := patternFlowTcpEcnNsCounter{obj: &otg.PatternFlowTcpEcnNsCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpEcnNsCounter) msg() *otg.PatternFlowTcpEcnNsCounter { + return obj.obj +} + +func (obj *patternFlowTcpEcnNsCounter) setMsg(msg *otg.PatternFlowTcpEcnNsCounter) PatternFlowTcpEcnNsCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpEcnNsCounter struct { + obj *patternFlowTcpEcnNsCounter +} + +type marshalPatternFlowTcpEcnNsCounter interface { + // ToProto marshals PatternFlowTcpEcnNsCounter to protobuf object *otg.PatternFlowTcpEcnNsCounter + ToProto() (*otg.PatternFlowTcpEcnNsCounter, error) + // ToPbText marshals PatternFlowTcpEcnNsCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpEcnNsCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpEcnNsCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpEcnNsCounter struct { + obj *patternFlowTcpEcnNsCounter +} + +type unMarshalPatternFlowTcpEcnNsCounter interface { + // FromProto unmarshals PatternFlowTcpEcnNsCounter from protobuf object *otg.PatternFlowTcpEcnNsCounter + FromProto(msg *otg.PatternFlowTcpEcnNsCounter) (PatternFlowTcpEcnNsCounter, error) + // FromPbText unmarshals PatternFlowTcpEcnNsCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpEcnNsCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpEcnNsCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpEcnNsCounter) Marshal() marshalPatternFlowTcpEcnNsCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpEcnNsCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpEcnNsCounter) Unmarshal() unMarshalPatternFlowTcpEcnNsCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpEcnNsCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpEcnNsCounter) ToProto() (*otg.PatternFlowTcpEcnNsCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpEcnNsCounter) FromProto(msg *otg.PatternFlowTcpEcnNsCounter) (PatternFlowTcpEcnNsCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpEcnNsCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpEcnNsCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpEcnNsCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnNsCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpEcnNsCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnNsCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpEcnNsCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnNsCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnNsCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpEcnNsCounter) Clone() (PatternFlowTcpEcnNsCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpEcnNsCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpEcnNsCounter is integer counter pattern +type PatternFlowTcpEcnNsCounter interface { + Validation + // msg marshals PatternFlowTcpEcnNsCounter to protobuf object *otg.PatternFlowTcpEcnNsCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpEcnNsCounter + // setMsg unmarshals PatternFlowTcpEcnNsCounter from protobuf object *otg.PatternFlowTcpEcnNsCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpEcnNsCounter) PatternFlowTcpEcnNsCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpEcnNsCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpEcnNsCounter + // validate validates PatternFlowTcpEcnNsCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpEcnNsCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpEcnNsCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpEcnNsCounter + SetStart(value uint32) PatternFlowTcpEcnNsCounter + // HasStart checks if Start has been set in PatternFlowTcpEcnNsCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpEcnNsCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpEcnNsCounter + SetStep(value uint32) PatternFlowTcpEcnNsCounter + // HasStep checks if Step has been set in PatternFlowTcpEcnNsCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpEcnNsCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpEcnNsCounter + SetCount(value uint32) PatternFlowTcpEcnNsCounter + // HasCount checks if Count has been set in PatternFlowTcpEcnNsCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpEcnNsCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpEcnNsCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpEcnNsCounter object +func (obj *patternFlowTcpEcnNsCounter) SetStart(value uint32) PatternFlowTcpEcnNsCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpEcnNsCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpEcnNsCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpEcnNsCounter object +func (obj *patternFlowTcpEcnNsCounter) SetStep(value uint32) PatternFlowTcpEcnNsCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpEcnNsCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpEcnNsCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpEcnNsCounter object +func (obj *patternFlowTcpEcnNsCounter) SetCount(value uint32) PatternFlowTcpEcnNsCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpEcnNsCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnNsCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnNsCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnNsCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowTcpEcnNsCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_ecn_ns_metric_tag.go b/gosnappi/pattern_flow_tcp_ecn_ns_metric_tag.go new file mode 100644 index 00000000..add72ca2 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_ecn_ns_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpEcnNsMetricTag ***** +type patternFlowTcpEcnNsMetricTag struct { + validation + obj *otg.PatternFlowTcpEcnNsMetricTag + marshaller marshalPatternFlowTcpEcnNsMetricTag + unMarshaller unMarshalPatternFlowTcpEcnNsMetricTag +} + +func NewPatternFlowTcpEcnNsMetricTag() PatternFlowTcpEcnNsMetricTag { + obj := patternFlowTcpEcnNsMetricTag{obj: &otg.PatternFlowTcpEcnNsMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpEcnNsMetricTag) msg() *otg.PatternFlowTcpEcnNsMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpEcnNsMetricTag) setMsg(msg *otg.PatternFlowTcpEcnNsMetricTag) PatternFlowTcpEcnNsMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpEcnNsMetricTag struct { + obj *patternFlowTcpEcnNsMetricTag +} + +type marshalPatternFlowTcpEcnNsMetricTag interface { + // ToProto marshals PatternFlowTcpEcnNsMetricTag to protobuf object *otg.PatternFlowTcpEcnNsMetricTag + ToProto() (*otg.PatternFlowTcpEcnNsMetricTag, error) + // ToPbText marshals PatternFlowTcpEcnNsMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpEcnNsMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpEcnNsMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpEcnNsMetricTag struct { + obj *patternFlowTcpEcnNsMetricTag +} + +type unMarshalPatternFlowTcpEcnNsMetricTag interface { + // FromProto unmarshals PatternFlowTcpEcnNsMetricTag from protobuf object *otg.PatternFlowTcpEcnNsMetricTag + FromProto(msg *otg.PatternFlowTcpEcnNsMetricTag) (PatternFlowTcpEcnNsMetricTag, error) + // FromPbText unmarshals PatternFlowTcpEcnNsMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpEcnNsMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpEcnNsMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpEcnNsMetricTag) Marshal() marshalPatternFlowTcpEcnNsMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpEcnNsMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpEcnNsMetricTag) Unmarshal() unMarshalPatternFlowTcpEcnNsMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpEcnNsMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpEcnNsMetricTag) ToProto() (*otg.PatternFlowTcpEcnNsMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpEcnNsMetricTag) FromProto(msg *otg.PatternFlowTcpEcnNsMetricTag) (PatternFlowTcpEcnNsMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpEcnNsMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpEcnNsMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpEcnNsMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnNsMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpEcnNsMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpEcnNsMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpEcnNsMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnNsMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpEcnNsMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpEcnNsMetricTag) Clone() (PatternFlowTcpEcnNsMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpEcnNsMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpEcnNsMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpEcnNsMetricTag interface { + Validation + // msg marshals PatternFlowTcpEcnNsMetricTag to protobuf object *otg.PatternFlowTcpEcnNsMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpEcnNsMetricTag + // setMsg unmarshals PatternFlowTcpEcnNsMetricTag from protobuf object *otg.PatternFlowTcpEcnNsMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpEcnNsMetricTag) PatternFlowTcpEcnNsMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpEcnNsMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpEcnNsMetricTag + // validate validates PatternFlowTcpEcnNsMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpEcnNsMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpEcnNsMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpEcnNsMetricTag + SetName(value string) PatternFlowTcpEcnNsMetricTag + // Offset returns uint32, set in PatternFlowTcpEcnNsMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpEcnNsMetricTag + SetOffset(value uint32) PatternFlowTcpEcnNsMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpEcnNsMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpEcnNsMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpEcnNsMetricTag + SetLength(value uint32) PatternFlowTcpEcnNsMetricTag + // HasLength checks if Length has been set in PatternFlowTcpEcnNsMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpEcnNsMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpEcnNsMetricTag object +func (obj *patternFlowTcpEcnNsMetricTag) SetName(value string) PatternFlowTcpEcnNsMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpEcnNsMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpEcnNsMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpEcnNsMetricTag object +func (obj *patternFlowTcpEcnNsMetricTag) SetOffset(value uint32) PatternFlowTcpEcnNsMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpEcnNsMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpEcnNsMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpEcnNsMetricTag object +func (obj *patternFlowTcpEcnNsMetricTag) SetLength(value uint32) PatternFlowTcpEcnNsMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpEcnNsMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpEcnNsMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpEcnNsMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpEcnNsMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpEcnNsMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_seq_num.go b/gosnappi/pattern_flow_tcp_seq_num.go new file mode 100644 index 00000000..b5bd1618 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_seq_num.go @@ -0,0 +1,640 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpSeqNum ***** +type patternFlowTcpSeqNum struct { + validation + obj *otg.PatternFlowTcpSeqNum + marshaller marshalPatternFlowTcpSeqNum + unMarshaller unMarshalPatternFlowTcpSeqNum + incrementHolder PatternFlowTcpSeqNumCounter + decrementHolder PatternFlowTcpSeqNumCounter + metricTagsHolder PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter +} + +func NewPatternFlowTcpSeqNum() PatternFlowTcpSeqNum { + obj := patternFlowTcpSeqNum{obj: &otg.PatternFlowTcpSeqNum{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpSeqNum) msg() *otg.PatternFlowTcpSeqNum { + return obj.obj +} + +func (obj *patternFlowTcpSeqNum) setMsg(msg *otg.PatternFlowTcpSeqNum) PatternFlowTcpSeqNum { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpSeqNum struct { + obj *patternFlowTcpSeqNum +} + +type marshalPatternFlowTcpSeqNum interface { + // ToProto marshals PatternFlowTcpSeqNum to protobuf object *otg.PatternFlowTcpSeqNum + ToProto() (*otg.PatternFlowTcpSeqNum, error) + // ToPbText marshals PatternFlowTcpSeqNum to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpSeqNum to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpSeqNum to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpSeqNum struct { + obj *patternFlowTcpSeqNum +} + +type unMarshalPatternFlowTcpSeqNum interface { + // FromProto unmarshals PatternFlowTcpSeqNum from protobuf object *otg.PatternFlowTcpSeqNum + FromProto(msg *otg.PatternFlowTcpSeqNum) (PatternFlowTcpSeqNum, error) + // FromPbText unmarshals PatternFlowTcpSeqNum from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpSeqNum from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpSeqNum from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpSeqNum) Marshal() marshalPatternFlowTcpSeqNum { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpSeqNum{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpSeqNum) Unmarshal() unMarshalPatternFlowTcpSeqNum { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpSeqNum{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpSeqNum) ToProto() (*otg.PatternFlowTcpSeqNum, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpSeqNum) FromProto(msg *otg.PatternFlowTcpSeqNum) (PatternFlowTcpSeqNum, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpSeqNum) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpSeqNum) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpSeqNum) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpSeqNum) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpSeqNum) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpSeqNum) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpSeqNum) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpSeqNum) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpSeqNum) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpSeqNum) Clone() (PatternFlowTcpSeqNum, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpSeqNum() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpSeqNum) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpSeqNum is sequence number +type PatternFlowTcpSeqNum interface { + Validation + // msg marshals PatternFlowTcpSeqNum to protobuf object *otg.PatternFlowTcpSeqNum + // and doesn't set defaults + msg() *otg.PatternFlowTcpSeqNum + // setMsg unmarshals PatternFlowTcpSeqNum from protobuf object *otg.PatternFlowTcpSeqNum + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpSeqNum) PatternFlowTcpSeqNum + // provides marshal interface + Marshal() marshalPatternFlowTcpSeqNum + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpSeqNum + // validate validates PatternFlowTcpSeqNum + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpSeqNum, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpSeqNumChoiceEnum, set in PatternFlowTcpSeqNum + Choice() PatternFlowTcpSeqNumChoiceEnum + // setChoice assigns PatternFlowTcpSeqNumChoiceEnum provided by user to PatternFlowTcpSeqNum + setChoice(value PatternFlowTcpSeqNumChoiceEnum) PatternFlowTcpSeqNum + // HasChoice checks if Choice has been set in PatternFlowTcpSeqNum + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpSeqNum. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpSeqNum + SetValue(value uint32) PatternFlowTcpSeqNum + // HasValue checks if Value has been set in PatternFlowTcpSeqNum + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpSeqNum. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpSeqNum + SetValues(value []uint32) PatternFlowTcpSeqNum + // Increment returns PatternFlowTcpSeqNumCounter, set in PatternFlowTcpSeqNum. + // PatternFlowTcpSeqNumCounter is integer counter pattern + Increment() PatternFlowTcpSeqNumCounter + // SetIncrement assigns PatternFlowTcpSeqNumCounter provided by user to PatternFlowTcpSeqNum. + // PatternFlowTcpSeqNumCounter is integer counter pattern + SetIncrement(value PatternFlowTcpSeqNumCounter) PatternFlowTcpSeqNum + // HasIncrement checks if Increment has been set in PatternFlowTcpSeqNum + HasIncrement() bool + // Decrement returns PatternFlowTcpSeqNumCounter, set in PatternFlowTcpSeqNum. + // PatternFlowTcpSeqNumCounter is integer counter pattern + Decrement() PatternFlowTcpSeqNumCounter + // SetDecrement assigns PatternFlowTcpSeqNumCounter provided by user to PatternFlowTcpSeqNum. + // PatternFlowTcpSeqNumCounter is integer counter pattern + SetDecrement(value PatternFlowTcpSeqNumCounter) PatternFlowTcpSeqNum + // HasDecrement checks if Decrement has been set in PatternFlowTcpSeqNum + HasDecrement() bool + // MetricTags returns PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIterIter, set in PatternFlowTcpSeqNum + MetricTags() PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter + setNil() +} + +type PatternFlowTcpSeqNumChoiceEnum string + +// Enum of Choice on PatternFlowTcpSeqNum +var PatternFlowTcpSeqNumChoice = struct { + VALUE PatternFlowTcpSeqNumChoiceEnum + VALUES PatternFlowTcpSeqNumChoiceEnum + INCREMENT PatternFlowTcpSeqNumChoiceEnum + DECREMENT PatternFlowTcpSeqNumChoiceEnum +}{ + VALUE: PatternFlowTcpSeqNumChoiceEnum("value"), + VALUES: PatternFlowTcpSeqNumChoiceEnum("values"), + INCREMENT: PatternFlowTcpSeqNumChoiceEnum("increment"), + DECREMENT: PatternFlowTcpSeqNumChoiceEnum("decrement"), +} + +func (obj *patternFlowTcpSeqNum) Choice() PatternFlowTcpSeqNumChoiceEnum { + return PatternFlowTcpSeqNumChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpSeqNum) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpSeqNum) setChoice(value PatternFlowTcpSeqNumChoiceEnum) PatternFlowTcpSeqNum { + intValue, ok := otg.PatternFlowTcpSeqNum_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpSeqNumChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpSeqNum_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpSeqNumChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpSeqNumChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpSeqNumChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpSeqNumCounter().msg() + } + + if value == PatternFlowTcpSeqNumChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpSeqNumCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpSeqNum) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpSeqNumChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpSeqNum) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpSeqNum object +func (obj *patternFlowTcpSeqNum) SetValue(value uint32) PatternFlowTcpSeqNum { + obj.setChoice(PatternFlowTcpSeqNumChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpSeqNum) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpSeqNum object +func (obj *patternFlowTcpSeqNum) SetValues(value []uint32) PatternFlowTcpSeqNum { + obj.setChoice(PatternFlowTcpSeqNumChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpSeqNumCounter +func (obj *patternFlowTcpSeqNum) Increment() PatternFlowTcpSeqNumCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpSeqNumChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpSeqNumCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpSeqNumCounter +func (obj *patternFlowTcpSeqNum) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpSeqNumCounter value in the PatternFlowTcpSeqNum object +func (obj *patternFlowTcpSeqNum) SetIncrement(value PatternFlowTcpSeqNumCounter) PatternFlowTcpSeqNum { + obj.setChoice(PatternFlowTcpSeqNumChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpSeqNumCounter +func (obj *patternFlowTcpSeqNum) Decrement() PatternFlowTcpSeqNumCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpSeqNumChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpSeqNumCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpSeqNumCounter +func (obj *patternFlowTcpSeqNum) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpSeqNumCounter value in the PatternFlowTcpSeqNum object +func (obj *patternFlowTcpSeqNum) SetDecrement(value PatternFlowTcpSeqNumCounter) PatternFlowTcpSeqNum { + obj.setChoice(PatternFlowTcpSeqNumChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpSeqNumMetricTag +func (obj *patternFlowTcpSeqNum) MetricTags() PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpSeqNumMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter struct { + obj *patternFlowTcpSeqNum + patternFlowTcpSeqNumMetricTagSlice []PatternFlowTcpSeqNumMetricTag + fieldPtr *[]*otg.PatternFlowTcpSeqNumMetricTag +} + +func newPatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter(ptr *[]*otg.PatternFlowTcpSeqNumMetricTag) PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter { + return &patternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter interface { + setMsg(*patternFlowTcpSeqNum) PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter + Items() []PatternFlowTcpSeqNumMetricTag + Add() PatternFlowTcpSeqNumMetricTag + Append(items ...PatternFlowTcpSeqNumMetricTag) PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter + Set(index int, newObj PatternFlowTcpSeqNumMetricTag) PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter + Clear() PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter + clearHolderSlice() PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter + appendHolderSlice(item PatternFlowTcpSeqNumMetricTag) PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter +} + +func (obj *patternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter) setMsg(msg *patternFlowTcpSeqNum) PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpSeqNumMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter) Items() []PatternFlowTcpSeqNumMetricTag { + return obj.patternFlowTcpSeqNumMetricTagSlice +} + +func (obj *patternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter) Add() PatternFlowTcpSeqNumMetricTag { + newObj := &otg.PatternFlowTcpSeqNumMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpSeqNumMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpSeqNumMetricTagSlice = append(obj.patternFlowTcpSeqNumMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter) Append(items ...PatternFlowTcpSeqNumMetricTag) PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpSeqNumMetricTagSlice = append(obj.patternFlowTcpSeqNumMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter) Set(index int, newObj PatternFlowTcpSeqNumMetricTag) PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpSeqNumMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter) Clear() PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpSeqNumMetricTag{} + obj.patternFlowTcpSeqNumMetricTagSlice = []PatternFlowTcpSeqNumMetricTag{} + } + return obj +} +func (obj *patternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter) clearHolderSlice() PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter { + if len(obj.patternFlowTcpSeqNumMetricTagSlice) > 0 { + obj.patternFlowTcpSeqNumMetricTagSlice = []PatternFlowTcpSeqNumMetricTag{} + } + return obj +} +func (obj *patternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter) appendHolderSlice(item PatternFlowTcpSeqNumMetricTag) PatternFlowTcpSeqNumPatternFlowTcpSeqNumMetricTagIter { + obj.patternFlowTcpSeqNumMetricTagSlice = append(obj.patternFlowTcpSeqNumMetricTagSlice, item) + return obj +} + +func (obj *patternFlowTcpSeqNum) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpSeqNumMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowTcpSeqNum) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpSeqNumChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpSeqNumChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpSeqNumChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpSeqNumChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpSeqNumChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpSeqNumChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpSeqNum") + } + } else { + intVal := otg.PatternFlowTcpSeqNum_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpSeqNum_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_seq_num_counter.go b/gosnappi/pattern_flow_tcp_seq_num_counter.go new file mode 100644 index 00000000..ad62b46b --- /dev/null +++ b/gosnappi/pattern_flow_tcp_seq_num_counter.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpSeqNumCounter ***** +type patternFlowTcpSeqNumCounter struct { + validation + obj *otg.PatternFlowTcpSeqNumCounter + marshaller marshalPatternFlowTcpSeqNumCounter + unMarshaller unMarshalPatternFlowTcpSeqNumCounter +} + +func NewPatternFlowTcpSeqNumCounter() PatternFlowTcpSeqNumCounter { + obj := patternFlowTcpSeqNumCounter{obj: &otg.PatternFlowTcpSeqNumCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpSeqNumCounter) msg() *otg.PatternFlowTcpSeqNumCounter { + return obj.obj +} + +func (obj *patternFlowTcpSeqNumCounter) setMsg(msg *otg.PatternFlowTcpSeqNumCounter) PatternFlowTcpSeqNumCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpSeqNumCounter struct { + obj *patternFlowTcpSeqNumCounter +} + +type marshalPatternFlowTcpSeqNumCounter interface { + // ToProto marshals PatternFlowTcpSeqNumCounter to protobuf object *otg.PatternFlowTcpSeqNumCounter + ToProto() (*otg.PatternFlowTcpSeqNumCounter, error) + // ToPbText marshals PatternFlowTcpSeqNumCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpSeqNumCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpSeqNumCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpSeqNumCounter struct { + obj *patternFlowTcpSeqNumCounter +} + +type unMarshalPatternFlowTcpSeqNumCounter interface { + // FromProto unmarshals PatternFlowTcpSeqNumCounter from protobuf object *otg.PatternFlowTcpSeqNumCounter + FromProto(msg *otg.PatternFlowTcpSeqNumCounter) (PatternFlowTcpSeqNumCounter, error) + // FromPbText unmarshals PatternFlowTcpSeqNumCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpSeqNumCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpSeqNumCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpSeqNumCounter) Marshal() marshalPatternFlowTcpSeqNumCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpSeqNumCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpSeqNumCounter) Unmarshal() unMarshalPatternFlowTcpSeqNumCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpSeqNumCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpSeqNumCounter) ToProto() (*otg.PatternFlowTcpSeqNumCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpSeqNumCounter) FromProto(msg *otg.PatternFlowTcpSeqNumCounter) (PatternFlowTcpSeqNumCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpSeqNumCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpSeqNumCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpSeqNumCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpSeqNumCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpSeqNumCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpSeqNumCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpSeqNumCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpSeqNumCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpSeqNumCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpSeqNumCounter) Clone() (PatternFlowTcpSeqNumCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpSeqNumCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpSeqNumCounter is integer counter pattern +type PatternFlowTcpSeqNumCounter interface { + Validation + // msg marshals PatternFlowTcpSeqNumCounter to protobuf object *otg.PatternFlowTcpSeqNumCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpSeqNumCounter + // setMsg unmarshals PatternFlowTcpSeqNumCounter from protobuf object *otg.PatternFlowTcpSeqNumCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpSeqNumCounter) PatternFlowTcpSeqNumCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpSeqNumCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpSeqNumCounter + // validate validates PatternFlowTcpSeqNumCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpSeqNumCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpSeqNumCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpSeqNumCounter + SetStart(value uint32) PatternFlowTcpSeqNumCounter + // HasStart checks if Start has been set in PatternFlowTcpSeqNumCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpSeqNumCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpSeqNumCounter + SetStep(value uint32) PatternFlowTcpSeqNumCounter + // HasStep checks if Step has been set in PatternFlowTcpSeqNumCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpSeqNumCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpSeqNumCounter + SetCount(value uint32) PatternFlowTcpSeqNumCounter + // HasCount checks if Count has been set in PatternFlowTcpSeqNumCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpSeqNumCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpSeqNumCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpSeqNumCounter object +func (obj *patternFlowTcpSeqNumCounter) SetStart(value uint32) PatternFlowTcpSeqNumCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpSeqNumCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpSeqNumCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpSeqNumCounter object +func (obj *patternFlowTcpSeqNumCounter) SetStep(value uint32) PatternFlowTcpSeqNumCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpSeqNumCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpSeqNumCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpSeqNumCounter object +func (obj *patternFlowTcpSeqNumCounter) SetCount(value uint32) PatternFlowTcpSeqNumCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpSeqNumCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *patternFlowTcpSeqNumCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_seq_num_metric_tag.go b/gosnappi/pattern_flow_tcp_seq_num_metric_tag.go new file mode 100644 index 00000000..89bc780f --- /dev/null +++ b/gosnappi/pattern_flow_tcp_seq_num_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpSeqNumMetricTag ***** +type patternFlowTcpSeqNumMetricTag struct { + validation + obj *otg.PatternFlowTcpSeqNumMetricTag + marshaller marshalPatternFlowTcpSeqNumMetricTag + unMarshaller unMarshalPatternFlowTcpSeqNumMetricTag +} + +func NewPatternFlowTcpSeqNumMetricTag() PatternFlowTcpSeqNumMetricTag { + obj := patternFlowTcpSeqNumMetricTag{obj: &otg.PatternFlowTcpSeqNumMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpSeqNumMetricTag) msg() *otg.PatternFlowTcpSeqNumMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpSeqNumMetricTag) setMsg(msg *otg.PatternFlowTcpSeqNumMetricTag) PatternFlowTcpSeqNumMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpSeqNumMetricTag struct { + obj *patternFlowTcpSeqNumMetricTag +} + +type marshalPatternFlowTcpSeqNumMetricTag interface { + // ToProto marshals PatternFlowTcpSeqNumMetricTag to protobuf object *otg.PatternFlowTcpSeqNumMetricTag + ToProto() (*otg.PatternFlowTcpSeqNumMetricTag, error) + // ToPbText marshals PatternFlowTcpSeqNumMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpSeqNumMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpSeqNumMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpSeqNumMetricTag struct { + obj *patternFlowTcpSeqNumMetricTag +} + +type unMarshalPatternFlowTcpSeqNumMetricTag interface { + // FromProto unmarshals PatternFlowTcpSeqNumMetricTag from protobuf object *otg.PatternFlowTcpSeqNumMetricTag + FromProto(msg *otg.PatternFlowTcpSeqNumMetricTag) (PatternFlowTcpSeqNumMetricTag, error) + // FromPbText unmarshals PatternFlowTcpSeqNumMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpSeqNumMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpSeqNumMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpSeqNumMetricTag) Marshal() marshalPatternFlowTcpSeqNumMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpSeqNumMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpSeqNumMetricTag) Unmarshal() unMarshalPatternFlowTcpSeqNumMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpSeqNumMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpSeqNumMetricTag) ToProto() (*otg.PatternFlowTcpSeqNumMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpSeqNumMetricTag) FromProto(msg *otg.PatternFlowTcpSeqNumMetricTag) (PatternFlowTcpSeqNumMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpSeqNumMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpSeqNumMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpSeqNumMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpSeqNumMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpSeqNumMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpSeqNumMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpSeqNumMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpSeqNumMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpSeqNumMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpSeqNumMetricTag) Clone() (PatternFlowTcpSeqNumMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpSeqNumMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpSeqNumMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpSeqNumMetricTag interface { + Validation + // msg marshals PatternFlowTcpSeqNumMetricTag to protobuf object *otg.PatternFlowTcpSeqNumMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpSeqNumMetricTag + // setMsg unmarshals PatternFlowTcpSeqNumMetricTag from protobuf object *otg.PatternFlowTcpSeqNumMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpSeqNumMetricTag) PatternFlowTcpSeqNumMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpSeqNumMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpSeqNumMetricTag + // validate validates PatternFlowTcpSeqNumMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpSeqNumMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpSeqNumMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpSeqNumMetricTag + SetName(value string) PatternFlowTcpSeqNumMetricTag + // Offset returns uint32, set in PatternFlowTcpSeqNumMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpSeqNumMetricTag + SetOffset(value uint32) PatternFlowTcpSeqNumMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpSeqNumMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpSeqNumMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpSeqNumMetricTag + SetLength(value uint32) PatternFlowTcpSeqNumMetricTag + // HasLength checks if Length has been set in PatternFlowTcpSeqNumMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpSeqNumMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpSeqNumMetricTag object +func (obj *patternFlowTcpSeqNumMetricTag) SetName(value string) PatternFlowTcpSeqNumMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpSeqNumMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpSeqNumMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpSeqNumMetricTag object +func (obj *patternFlowTcpSeqNumMetricTag) SetOffset(value uint32) PatternFlowTcpSeqNumMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpSeqNumMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpSeqNumMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpSeqNumMetricTag object +func (obj *patternFlowTcpSeqNumMetricTag) SetLength(value uint32) PatternFlowTcpSeqNumMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpSeqNumMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpSeqNumMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 31 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpSeqNumMetricTag.Offset <= 31 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpSeqNumMetricTag.Length <= 32 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpSeqNumMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(32) + } + +} diff --git a/gosnappi/pattern_flow_tcp_src_port.go b/gosnappi/pattern_flow_tcp_src_port.go new file mode 100644 index 00000000..011e0a7f --- /dev/null +++ b/gosnappi/pattern_flow_tcp_src_port.go @@ -0,0 +1,719 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpSrcPort ***** +type patternFlowTcpSrcPort struct { + validation + obj *otg.PatternFlowTcpSrcPort + marshaller marshalPatternFlowTcpSrcPort + unMarshaller unMarshalPatternFlowTcpSrcPort + incrementHolder PatternFlowTcpSrcPortCounter + decrementHolder PatternFlowTcpSrcPortCounter + metricTagsHolder PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter + randomHolder PatternFlowTcpSrcPortRandom +} + +func NewPatternFlowTcpSrcPort() PatternFlowTcpSrcPort { + obj := patternFlowTcpSrcPort{obj: &otg.PatternFlowTcpSrcPort{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpSrcPort) msg() *otg.PatternFlowTcpSrcPort { + return obj.obj +} + +func (obj *patternFlowTcpSrcPort) setMsg(msg *otg.PatternFlowTcpSrcPort) PatternFlowTcpSrcPort { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpSrcPort struct { + obj *patternFlowTcpSrcPort +} + +type marshalPatternFlowTcpSrcPort interface { + // ToProto marshals PatternFlowTcpSrcPort to protobuf object *otg.PatternFlowTcpSrcPort + ToProto() (*otg.PatternFlowTcpSrcPort, error) + // ToPbText marshals PatternFlowTcpSrcPort to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpSrcPort to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpSrcPort to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpSrcPort struct { + obj *patternFlowTcpSrcPort +} + +type unMarshalPatternFlowTcpSrcPort interface { + // FromProto unmarshals PatternFlowTcpSrcPort from protobuf object *otg.PatternFlowTcpSrcPort + FromProto(msg *otg.PatternFlowTcpSrcPort) (PatternFlowTcpSrcPort, error) + // FromPbText unmarshals PatternFlowTcpSrcPort from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpSrcPort from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpSrcPort from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpSrcPort) Marshal() marshalPatternFlowTcpSrcPort { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpSrcPort{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpSrcPort) Unmarshal() unMarshalPatternFlowTcpSrcPort { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpSrcPort{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpSrcPort) ToProto() (*otg.PatternFlowTcpSrcPort, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpSrcPort) FromProto(msg *otg.PatternFlowTcpSrcPort) (PatternFlowTcpSrcPort, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpSrcPort) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpSrcPort) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpSrcPort) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpSrcPort) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpSrcPort) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpSrcPort) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpSrcPort) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpSrcPort) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpSrcPort) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpSrcPort) Clone() (PatternFlowTcpSrcPort, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpSrcPort() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpSrcPort) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.randomHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpSrcPort is source port +type PatternFlowTcpSrcPort interface { + Validation + // msg marshals PatternFlowTcpSrcPort to protobuf object *otg.PatternFlowTcpSrcPort + // and doesn't set defaults + msg() *otg.PatternFlowTcpSrcPort + // setMsg unmarshals PatternFlowTcpSrcPort from protobuf object *otg.PatternFlowTcpSrcPort + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpSrcPort) PatternFlowTcpSrcPort + // provides marshal interface + Marshal() marshalPatternFlowTcpSrcPort + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpSrcPort + // validate validates PatternFlowTcpSrcPort + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpSrcPort, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpSrcPortChoiceEnum, set in PatternFlowTcpSrcPort + Choice() PatternFlowTcpSrcPortChoiceEnum + // setChoice assigns PatternFlowTcpSrcPortChoiceEnum provided by user to PatternFlowTcpSrcPort + setChoice(value PatternFlowTcpSrcPortChoiceEnum) PatternFlowTcpSrcPort + // HasChoice checks if Choice has been set in PatternFlowTcpSrcPort + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpSrcPort. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpSrcPort + SetValue(value uint32) PatternFlowTcpSrcPort + // HasValue checks if Value has been set in PatternFlowTcpSrcPort + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpSrcPort. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpSrcPort + SetValues(value []uint32) PatternFlowTcpSrcPort + // Increment returns PatternFlowTcpSrcPortCounter, set in PatternFlowTcpSrcPort. + // PatternFlowTcpSrcPortCounter is integer counter pattern + Increment() PatternFlowTcpSrcPortCounter + // SetIncrement assigns PatternFlowTcpSrcPortCounter provided by user to PatternFlowTcpSrcPort. + // PatternFlowTcpSrcPortCounter is integer counter pattern + SetIncrement(value PatternFlowTcpSrcPortCounter) PatternFlowTcpSrcPort + // HasIncrement checks if Increment has been set in PatternFlowTcpSrcPort + HasIncrement() bool + // Decrement returns PatternFlowTcpSrcPortCounter, set in PatternFlowTcpSrcPort. + // PatternFlowTcpSrcPortCounter is integer counter pattern + Decrement() PatternFlowTcpSrcPortCounter + // SetDecrement assigns PatternFlowTcpSrcPortCounter provided by user to PatternFlowTcpSrcPort. + // PatternFlowTcpSrcPortCounter is integer counter pattern + SetDecrement(value PatternFlowTcpSrcPortCounter) PatternFlowTcpSrcPort + // HasDecrement checks if Decrement has been set in PatternFlowTcpSrcPort + HasDecrement() bool + // MetricTags returns PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIterIter, set in PatternFlowTcpSrcPort + MetricTags() PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter + // Random returns PatternFlowTcpSrcPortRandom, set in PatternFlowTcpSrcPort. + // PatternFlowTcpSrcPortRandom is integer random pattern + Random() PatternFlowTcpSrcPortRandom + // SetRandom assigns PatternFlowTcpSrcPortRandom provided by user to PatternFlowTcpSrcPort. + // PatternFlowTcpSrcPortRandom is integer random pattern + SetRandom(value PatternFlowTcpSrcPortRandom) PatternFlowTcpSrcPort + // HasRandom checks if Random has been set in PatternFlowTcpSrcPort + HasRandom() bool + setNil() +} + +type PatternFlowTcpSrcPortChoiceEnum string + +// Enum of Choice on PatternFlowTcpSrcPort +var PatternFlowTcpSrcPortChoice = struct { + VALUE PatternFlowTcpSrcPortChoiceEnum + VALUES PatternFlowTcpSrcPortChoiceEnum + INCREMENT PatternFlowTcpSrcPortChoiceEnum + DECREMENT PatternFlowTcpSrcPortChoiceEnum + RANDOM PatternFlowTcpSrcPortChoiceEnum +}{ + VALUE: PatternFlowTcpSrcPortChoiceEnum("value"), + VALUES: PatternFlowTcpSrcPortChoiceEnum("values"), + INCREMENT: PatternFlowTcpSrcPortChoiceEnum("increment"), + DECREMENT: PatternFlowTcpSrcPortChoiceEnum("decrement"), + RANDOM: PatternFlowTcpSrcPortChoiceEnum("random"), +} + +func (obj *patternFlowTcpSrcPort) Choice() PatternFlowTcpSrcPortChoiceEnum { + return PatternFlowTcpSrcPortChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpSrcPort) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpSrcPort) setChoice(value PatternFlowTcpSrcPortChoiceEnum) PatternFlowTcpSrcPort { + intValue, ok := otg.PatternFlowTcpSrcPort_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpSrcPortChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpSrcPort_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Random = nil + obj.randomHolder = nil + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpSrcPortChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpSrcPortChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpSrcPortChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpSrcPortCounter().msg() + } + + if value == PatternFlowTcpSrcPortChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpSrcPortCounter().msg() + } + + if value == PatternFlowTcpSrcPortChoice.RANDOM { + obj.obj.Random = NewPatternFlowTcpSrcPortRandom().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpSrcPort) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpSrcPortChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpSrcPort) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpSrcPort object +func (obj *patternFlowTcpSrcPort) SetValue(value uint32) PatternFlowTcpSrcPort { + obj.setChoice(PatternFlowTcpSrcPortChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpSrcPort) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpSrcPort object +func (obj *patternFlowTcpSrcPort) SetValues(value []uint32) PatternFlowTcpSrcPort { + obj.setChoice(PatternFlowTcpSrcPortChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpSrcPortCounter +func (obj *patternFlowTcpSrcPort) Increment() PatternFlowTcpSrcPortCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpSrcPortChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpSrcPortCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpSrcPortCounter +func (obj *patternFlowTcpSrcPort) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpSrcPortCounter value in the PatternFlowTcpSrcPort object +func (obj *patternFlowTcpSrcPort) SetIncrement(value PatternFlowTcpSrcPortCounter) PatternFlowTcpSrcPort { + obj.setChoice(PatternFlowTcpSrcPortChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpSrcPortCounter +func (obj *patternFlowTcpSrcPort) Decrement() PatternFlowTcpSrcPortCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpSrcPortChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpSrcPortCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpSrcPortCounter +func (obj *patternFlowTcpSrcPort) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpSrcPortCounter value in the PatternFlowTcpSrcPort object +func (obj *patternFlowTcpSrcPort) SetDecrement(value PatternFlowTcpSrcPortCounter) PatternFlowTcpSrcPort { + obj.setChoice(PatternFlowTcpSrcPortChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpSrcPortMetricTag +func (obj *patternFlowTcpSrcPort) MetricTags() PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpSrcPortMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter struct { + obj *patternFlowTcpSrcPort + patternFlowTcpSrcPortMetricTagSlice []PatternFlowTcpSrcPortMetricTag + fieldPtr *[]*otg.PatternFlowTcpSrcPortMetricTag +} + +func newPatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter(ptr *[]*otg.PatternFlowTcpSrcPortMetricTag) PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter { + return &patternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter interface { + setMsg(*patternFlowTcpSrcPort) PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter + Items() []PatternFlowTcpSrcPortMetricTag + Add() PatternFlowTcpSrcPortMetricTag + Append(items ...PatternFlowTcpSrcPortMetricTag) PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter + Set(index int, newObj PatternFlowTcpSrcPortMetricTag) PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter + Clear() PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter + clearHolderSlice() PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter + appendHolderSlice(item PatternFlowTcpSrcPortMetricTag) PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter +} + +func (obj *patternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter) setMsg(msg *patternFlowTcpSrcPort) PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpSrcPortMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter) Items() []PatternFlowTcpSrcPortMetricTag { + return obj.patternFlowTcpSrcPortMetricTagSlice +} + +func (obj *patternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter) Add() PatternFlowTcpSrcPortMetricTag { + newObj := &otg.PatternFlowTcpSrcPortMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpSrcPortMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpSrcPortMetricTagSlice = append(obj.patternFlowTcpSrcPortMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter) Append(items ...PatternFlowTcpSrcPortMetricTag) PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpSrcPortMetricTagSlice = append(obj.patternFlowTcpSrcPortMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter) Set(index int, newObj PatternFlowTcpSrcPortMetricTag) PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpSrcPortMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter) Clear() PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpSrcPortMetricTag{} + obj.patternFlowTcpSrcPortMetricTagSlice = []PatternFlowTcpSrcPortMetricTag{} + } + return obj +} +func (obj *patternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter) clearHolderSlice() PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter { + if len(obj.patternFlowTcpSrcPortMetricTagSlice) > 0 { + obj.patternFlowTcpSrcPortMetricTagSlice = []PatternFlowTcpSrcPortMetricTag{} + } + return obj +} +func (obj *patternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter) appendHolderSlice(item PatternFlowTcpSrcPortMetricTag) PatternFlowTcpSrcPortPatternFlowTcpSrcPortMetricTagIter { + obj.patternFlowTcpSrcPortMetricTagSlice = append(obj.patternFlowTcpSrcPortMetricTagSlice, item) + return obj +} + +// description is TBD +// Random returns a PatternFlowTcpSrcPortRandom +func (obj *patternFlowTcpSrcPort) Random() PatternFlowTcpSrcPortRandom { + if obj.obj.Random == nil { + obj.setChoice(PatternFlowTcpSrcPortChoice.RANDOM) + } + if obj.randomHolder == nil { + obj.randomHolder = &patternFlowTcpSrcPortRandom{obj: obj.obj.Random} + } + return obj.randomHolder +} + +// description is TBD +// Random returns a PatternFlowTcpSrcPortRandom +func (obj *patternFlowTcpSrcPort) HasRandom() bool { + return obj.obj.Random != nil +} + +// description is TBD +// SetRandom sets the PatternFlowTcpSrcPortRandom value in the PatternFlowTcpSrcPort object +func (obj *patternFlowTcpSrcPort) SetRandom(value PatternFlowTcpSrcPortRandom) PatternFlowTcpSrcPort { + obj.setChoice(PatternFlowTcpSrcPortChoice.RANDOM) + obj.randomHolder = nil + obj.obj.Random = value.msg() + + return obj +} + +func (obj *patternFlowTcpSrcPort) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpSrcPort.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowTcpSrcPort.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpSrcPortMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Random != nil { + + obj.Random().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowTcpSrcPort) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpSrcPortChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpSrcPortChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpSrcPortChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpSrcPortChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpSrcPortChoice.DECREMENT + } + + if obj.obj.Random != nil { + choices_set += 1 + choice = PatternFlowTcpSrcPortChoice.RANDOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpSrcPortChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpSrcPort") + } + } else { + intVal := otg.PatternFlowTcpSrcPort_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpSrcPort_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_src_port_counter.go b/gosnappi/pattern_flow_tcp_src_port_counter.go new file mode 100644 index 00000000..8fd9f769 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_src_port_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpSrcPortCounter ***** +type patternFlowTcpSrcPortCounter struct { + validation + obj *otg.PatternFlowTcpSrcPortCounter + marshaller marshalPatternFlowTcpSrcPortCounter + unMarshaller unMarshalPatternFlowTcpSrcPortCounter +} + +func NewPatternFlowTcpSrcPortCounter() PatternFlowTcpSrcPortCounter { + obj := patternFlowTcpSrcPortCounter{obj: &otg.PatternFlowTcpSrcPortCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpSrcPortCounter) msg() *otg.PatternFlowTcpSrcPortCounter { + return obj.obj +} + +func (obj *patternFlowTcpSrcPortCounter) setMsg(msg *otg.PatternFlowTcpSrcPortCounter) PatternFlowTcpSrcPortCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpSrcPortCounter struct { + obj *patternFlowTcpSrcPortCounter +} + +type marshalPatternFlowTcpSrcPortCounter interface { + // ToProto marshals PatternFlowTcpSrcPortCounter to protobuf object *otg.PatternFlowTcpSrcPortCounter + ToProto() (*otg.PatternFlowTcpSrcPortCounter, error) + // ToPbText marshals PatternFlowTcpSrcPortCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpSrcPortCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpSrcPortCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpSrcPortCounter struct { + obj *patternFlowTcpSrcPortCounter +} + +type unMarshalPatternFlowTcpSrcPortCounter interface { + // FromProto unmarshals PatternFlowTcpSrcPortCounter from protobuf object *otg.PatternFlowTcpSrcPortCounter + FromProto(msg *otg.PatternFlowTcpSrcPortCounter) (PatternFlowTcpSrcPortCounter, error) + // FromPbText unmarshals PatternFlowTcpSrcPortCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpSrcPortCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpSrcPortCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpSrcPortCounter) Marshal() marshalPatternFlowTcpSrcPortCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpSrcPortCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpSrcPortCounter) Unmarshal() unMarshalPatternFlowTcpSrcPortCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpSrcPortCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpSrcPortCounter) ToProto() (*otg.PatternFlowTcpSrcPortCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpSrcPortCounter) FromProto(msg *otg.PatternFlowTcpSrcPortCounter) (PatternFlowTcpSrcPortCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpSrcPortCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpSrcPortCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpSrcPortCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpSrcPortCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpSrcPortCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpSrcPortCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpSrcPortCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpSrcPortCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpSrcPortCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpSrcPortCounter) Clone() (PatternFlowTcpSrcPortCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpSrcPortCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpSrcPortCounter is integer counter pattern +type PatternFlowTcpSrcPortCounter interface { + Validation + // msg marshals PatternFlowTcpSrcPortCounter to protobuf object *otg.PatternFlowTcpSrcPortCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpSrcPortCounter + // setMsg unmarshals PatternFlowTcpSrcPortCounter from protobuf object *otg.PatternFlowTcpSrcPortCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpSrcPortCounter) PatternFlowTcpSrcPortCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpSrcPortCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpSrcPortCounter + // validate validates PatternFlowTcpSrcPortCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpSrcPortCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpSrcPortCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpSrcPortCounter + SetStart(value uint32) PatternFlowTcpSrcPortCounter + // HasStart checks if Start has been set in PatternFlowTcpSrcPortCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpSrcPortCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpSrcPortCounter + SetStep(value uint32) PatternFlowTcpSrcPortCounter + // HasStep checks if Step has been set in PatternFlowTcpSrcPortCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpSrcPortCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpSrcPortCounter + SetCount(value uint32) PatternFlowTcpSrcPortCounter + // HasCount checks if Count has been set in PatternFlowTcpSrcPortCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpSrcPortCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpSrcPortCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpSrcPortCounter object +func (obj *patternFlowTcpSrcPortCounter) SetStart(value uint32) PatternFlowTcpSrcPortCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpSrcPortCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpSrcPortCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpSrcPortCounter object +func (obj *patternFlowTcpSrcPortCounter) SetStep(value uint32) PatternFlowTcpSrcPortCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpSrcPortCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpSrcPortCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpSrcPortCounter object +func (obj *patternFlowTcpSrcPortCounter) SetCount(value uint32) PatternFlowTcpSrcPortCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpSrcPortCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpSrcPortCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpSrcPortCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpSrcPortCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowTcpSrcPortCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_src_port_metric_tag.go b/gosnappi/pattern_flow_tcp_src_port_metric_tag.go new file mode 100644 index 00000000..c149e3a3 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_src_port_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpSrcPortMetricTag ***** +type patternFlowTcpSrcPortMetricTag struct { + validation + obj *otg.PatternFlowTcpSrcPortMetricTag + marshaller marshalPatternFlowTcpSrcPortMetricTag + unMarshaller unMarshalPatternFlowTcpSrcPortMetricTag +} + +func NewPatternFlowTcpSrcPortMetricTag() PatternFlowTcpSrcPortMetricTag { + obj := patternFlowTcpSrcPortMetricTag{obj: &otg.PatternFlowTcpSrcPortMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpSrcPortMetricTag) msg() *otg.PatternFlowTcpSrcPortMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpSrcPortMetricTag) setMsg(msg *otg.PatternFlowTcpSrcPortMetricTag) PatternFlowTcpSrcPortMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpSrcPortMetricTag struct { + obj *patternFlowTcpSrcPortMetricTag +} + +type marshalPatternFlowTcpSrcPortMetricTag interface { + // ToProto marshals PatternFlowTcpSrcPortMetricTag to protobuf object *otg.PatternFlowTcpSrcPortMetricTag + ToProto() (*otg.PatternFlowTcpSrcPortMetricTag, error) + // ToPbText marshals PatternFlowTcpSrcPortMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpSrcPortMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpSrcPortMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpSrcPortMetricTag struct { + obj *patternFlowTcpSrcPortMetricTag +} + +type unMarshalPatternFlowTcpSrcPortMetricTag interface { + // FromProto unmarshals PatternFlowTcpSrcPortMetricTag from protobuf object *otg.PatternFlowTcpSrcPortMetricTag + FromProto(msg *otg.PatternFlowTcpSrcPortMetricTag) (PatternFlowTcpSrcPortMetricTag, error) + // FromPbText unmarshals PatternFlowTcpSrcPortMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpSrcPortMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpSrcPortMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpSrcPortMetricTag) Marshal() marshalPatternFlowTcpSrcPortMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpSrcPortMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpSrcPortMetricTag) Unmarshal() unMarshalPatternFlowTcpSrcPortMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpSrcPortMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpSrcPortMetricTag) ToProto() (*otg.PatternFlowTcpSrcPortMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpSrcPortMetricTag) FromProto(msg *otg.PatternFlowTcpSrcPortMetricTag) (PatternFlowTcpSrcPortMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpSrcPortMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpSrcPortMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpSrcPortMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpSrcPortMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpSrcPortMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpSrcPortMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpSrcPortMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpSrcPortMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpSrcPortMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpSrcPortMetricTag) Clone() (PatternFlowTcpSrcPortMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpSrcPortMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpSrcPortMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpSrcPortMetricTag interface { + Validation + // msg marshals PatternFlowTcpSrcPortMetricTag to protobuf object *otg.PatternFlowTcpSrcPortMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpSrcPortMetricTag + // setMsg unmarshals PatternFlowTcpSrcPortMetricTag from protobuf object *otg.PatternFlowTcpSrcPortMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpSrcPortMetricTag) PatternFlowTcpSrcPortMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpSrcPortMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpSrcPortMetricTag + // validate validates PatternFlowTcpSrcPortMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpSrcPortMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpSrcPortMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpSrcPortMetricTag + SetName(value string) PatternFlowTcpSrcPortMetricTag + // Offset returns uint32, set in PatternFlowTcpSrcPortMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpSrcPortMetricTag + SetOffset(value uint32) PatternFlowTcpSrcPortMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpSrcPortMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpSrcPortMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpSrcPortMetricTag + SetLength(value uint32) PatternFlowTcpSrcPortMetricTag + // HasLength checks if Length has been set in PatternFlowTcpSrcPortMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpSrcPortMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpSrcPortMetricTag object +func (obj *patternFlowTcpSrcPortMetricTag) SetName(value string) PatternFlowTcpSrcPortMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpSrcPortMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpSrcPortMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpSrcPortMetricTag object +func (obj *patternFlowTcpSrcPortMetricTag) SetOffset(value uint32) PatternFlowTcpSrcPortMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpSrcPortMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpSrcPortMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpSrcPortMetricTag object +func (obj *patternFlowTcpSrcPortMetricTag) SetLength(value uint32) PatternFlowTcpSrcPortMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpSrcPortMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpSrcPortMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpSrcPortMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpSrcPortMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpSrcPortMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_tcp_src_port_random.go b/gosnappi/pattern_flow_tcp_src_port_random.go new file mode 100644 index 00000000..a3bf88a1 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_src_port_random.go @@ -0,0 +1,422 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpSrcPortRandom ***** +type patternFlowTcpSrcPortRandom struct { + validation + obj *otg.PatternFlowTcpSrcPortRandom + marshaller marshalPatternFlowTcpSrcPortRandom + unMarshaller unMarshalPatternFlowTcpSrcPortRandom +} + +func NewPatternFlowTcpSrcPortRandom() PatternFlowTcpSrcPortRandom { + obj := patternFlowTcpSrcPortRandom{obj: &otg.PatternFlowTcpSrcPortRandom{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpSrcPortRandom) msg() *otg.PatternFlowTcpSrcPortRandom { + return obj.obj +} + +func (obj *patternFlowTcpSrcPortRandom) setMsg(msg *otg.PatternFlowTcpSrcPortRandom) PatternFlowTcpSrcPortRandom { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpSrcPortRandom struct { + obj *patternFlowTcpSrcPortRandom +} + +type marshalPatternFlowTcpSrcPortRandom interface { + // ToProto marshals PatternFlowTcpSrcPortRandom to protobuf object *otg.PatternFlowTcpSrcPortRandom + ToProto() (*otg.PatternFlowTcpSrcPortRandom, error) + // ToPbText marshals PatternFlowTcpSrcPortRandom to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpSrcPortRandom to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpSrcPortRandom to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpSrcPortRandom struct { + obj *patternFlowTcpSrcPortRandom +} + +type unMarshalPatternFlowTcpSrcPortRandom interface { + // FromProto unmarshals PatternFlowTcpSrcPortRandom from protobuf object *otg.PatternFlowTcpSrcPortRandom + FromProto(msg *otg.PatternFlowTcpSrcPortRandom) (PatternFlowTcpSrcPortRandom, error) + // FromPbText unmarshals PatternFlowTcpSrcPortRandom from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpSrcPortRandom from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpSrcPortRandom from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpSrcPortRandom) Marshal() marshalPatternFlowTcpSrcPortRandom { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpSrcPortRandom{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpSrcPortRandom) Unmarshal() unMarshalPatternFlowTcpSrcPortRandom { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpSrcPortRandom{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpSrcPortRandom) ToProto() (*otg.PatternFlowTcpSrcPortRandom, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpSrcPortRandom) FromProto(msg *otg.PatternFlowTcpSrcPortRandom) (PatternFlowTcpSrcPortRandom, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpSrcPortRandom) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpSrcPortRandom) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpSrcPortRandom) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpSrcPortRandom) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpSrcPortRandom) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpSrcPortRandom) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpSrcPortRandom) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpSrcPortRandom) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpSrcPortRandom) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpSrcPortRandom) Clone() (PatternFlowTcpSrcPortRandom, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpSrcPortRandom() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpSrcPortRandom is integer random pattern +type PatternFlowTcpSrcPortRandom interface { + Validation + // msg marshals PatternFlowTcpSrcPortRandom to protobuf object *otg.PatternFlowTcpSrcPortRandom + // and doesn't set defaults + msg() *otg.PatternFlowTcpSrcPortRandom + // setMsg unmarshals PatternFlowTcpSrcPortRandom from protobuf object *otg.PatternFlowTcpSrcPortRandom + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpSrcPortRandom) PatternFlowTcpSrcPortRandom + // provides marshal interface + Marshal() marshalPatternFlowTcpSrcPortRandom + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpSrcPortRandom + // validate validates PatternFlowTcpSrcPortRandom + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpSrcPortRandom, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Min returns uint32, set in PatternFlowTcpSrcPortRandom. + Min() uint32 + // SetMin assigns uint32 provided by user to PatternFlowTcpSrcPortRandom + SetMin(value uint32) PatternFlowTcpSrcPortRandom + // HasMin checks if Min has been set in PatternFlowTcpSrcPortRandom + HasMin() bool + // Max returns uint32, set in PatternFlowTcpSrcPortRandom. + Max() uint32 + // SetMax assigns uint32 provided by user to PatternFlowTcpSrcPortRandom + SetMax(value uint32) PatternFlowTcpSrcPortRandom + // HasMax checks if Max has been set in PatternFlowTcpSrcPortRandom + HasMax() bool + // Seed returns uint32, set in PatternFlowTcpSrcPortRandom. + Seed() uint32 + // SetSeed assigns uint32 provided by user to PatternFlowTcpSrcPortRandom + SetSeed(value uint32) PatternFlowTcpSrcPortRandom + // HasSeed checks if Seed has been set in PatternFlowTcpSrcPortRandom + HasSeed() bool + // Count returns uint32, set in PatternFlowTcpSrcPortRandom. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpSrcPortRandom + SetCount(value uint32) PatternFlowTcpSrcPortRandom + // HasCount checks if Count has been set in PatternFlowTcpSrcPortRandom + HasCount() bool +} + +// The minimum possible value generated by the random value generator. +// Min returns a uint32 +func (obj *patternFlowTcpSrcPortRandom) Min() uint32 { + + return *obj.obj.Min + +} + +// The minimum possible value generated by the random value generator. +// Min returns a uint32 +func (obj *patternFlowTcpSrcPortRandom) HasMin() bool { + return obj.obj.Min != nil +} + +// The minimum possible value generated by the random value generator. +// SetMin sets the uint32 value in the PatternFlowTcpSrcPortRandom object +func (obj *patternFlowTcpSrcPortRandom) SetMin(value uint32) PatternFlowTcpSrcPortRandom { + + obj.obj.Min = &value + return obj +} + +// The maximum possible value generated by the random value generator. +// Max returns a uint32 +func (obj *patternFlowTcpSrcPortRandom) Max() uint32 { + + return *obj.obj.Max + +} + +// The maximum possible value generated by the random value generator. +// Max returns a uint32 +func (obj *patternFlowTcpSrcPortRandom) HasMax() bool { + return obj.obj.Max != nil +} + +// The maximum possible value generated by the random value generator. +// SetMax sets the uint32 value in the PatternFlowTcpSrcPortRandom object +func (obj *patternFlowTcpSrcPortRandom) SetMax(value uint32) PatternFlowTcpSrcPortRandom { + + obj.obj.Max = &value + return obj +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// Seed returns a uint32 +func (obj *patternFlowTcpSrcPortRandom) Seed() uint32 { + + return *obj.obj.Seed + +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// Seed returns a uint32 +func (obj *patternFlowTcpSrcPortRandom) HasSeed() bool { + return obj.obj.Seed != nil +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// SetSeed sets the uint32 value in the PatternFlowTcpSrcPortRandom object +func (obj *patternFlowTcpSrcPortRandom) SetSeed(value uint32) PatternFlowTcpSrcPortRandom { + + obj.obj.Seed = &value + return obj +} + +// The total number of values to be generated by the random value generator. +// Count returns a uint32 +func (obj *patternFlowTcpSrcPortRandom) Count() uint32 { + + return *obj.obj.Count + +} + +// The total number of values to be generated by the random value generator. +// Count returns a uint32 +func (obj *patternFlowTcpSrcPortRandom) HasCount() bool { + return obj.obj.Count != nil +} + +// The total number of values to be generated by the random value generator. +// SetCount sets the uint32 value in the PatternFlowTcpSrcPortRandom object +func (obj *patternFlowTcpSrcPortRandom) SetCount(value uint32) PatternFlowTcpSrcPortRandom { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpSrcPortRandom) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Min != nil { + + if *obj.obj.Min > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpSrcPortRandom.Min <= 65535 but Got %d", *obj.obj.Min)) + } + + } + + if obj.obj.Max != nil { + + if *obj.obj.Max > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpSrcPortRandom.Max <= 65535 but Got %d", *obj.obj.Max)) + } + + } + +} + +func (obj *patternFlowTcpSrcPortRandom) setDefault() { + if obj.obj.Min == nil { + obj.SetMin(0) + } + if obj.obj.Max == nil { + obj.SetMax(65535) + } + if obj.obj.Seed == nil { + obj.SetSeed(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_window.go b/gosnappi/pattern_flow_tcp_window.go new file mode 100644 index 00000000..dc32a439 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_window.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpWindow ***** +type patternFlowTcpWindow struct { + validation + obj *otg.PatternFlowTcpWindow + marshaller marshalPatternFlowTcpWindow + unMarshaller unMarshalPatternFlowTcpWindow + incrementHolder PatternFlowTcpWindowCounter + decrementHolder PatternFlowTcpWindowCounter + metricTagsHolder PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter +} + +func NewPatternFlowTcpWindow() PatternFlowTcpWindow { + obj := patternFlowTcpWindow{obj: &otg.PatternFlowTcpWindow{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpWindow) msg() *otg.PatternFlowTcpWindow { + return obj.obj +} + +func (obj *patternFlowTcpWindow) setMsg(msg *otg.PatternFlowTcpWindow) PatternFlowTcpWindow { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpWindow struct { + obj *patternFlowTcpWindow +} + +type marshalPatternFlowTcpWindow interface { + // ToProto marshals PatternFlowTcpWindow to protobuf object *otg.PatternFlowTcpWindow + ToProto() (*otg.PatternFlowTcpWindow, error) + // ToPbText marshals PatternFlowTcpWindow to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpWindow to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpWindow to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpWindow struct { + obj *patternFlowTcpWindow +} + +type unMarshalPatternFlowTcpWindow interface { + // FromProto unmarshals PatternFlowTcpWindow from protobuf object *otg.PatternFlowTcpWindow + FromProto(msg *otg.PatternFlowTcpWindow) (PatternFlowTcpWindow, error) + // FromPbText unmarshals PatternFlowTcpWindow from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpWindow from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpWindow from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpWindow) Marshal() marshalPatternFlowTcpWindow { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpWindow{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpWindow) Unmarshal() unMarshalPatternFlowTcpWindow { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpWindow{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpWindow) ToProto() (*otg.PatternFlowTcpWindow, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpWindow) FromProto(msg *otg.PatternFlowTcpWindow) (PatternFlowTcpWindow, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpWindow) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpWindow) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpWindow) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpWindow) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpWindow) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpWindow) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpWindow) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpWindow) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpWindow) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpWindow) Clone() (PatternFlowTcpWindow, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpWindow() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowTcpWindow) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowTcpWindow is tcp connection window. +type PatternFlowTcpWindow interface { + Validation + // msg marshals PatternFlowTcpWindow to protobuf object *otg.PatternFlowTcpWindow + // and doesn't set defaults + msg() *otg.PatternFlowTcpWindow + // setMsg unmarshals PatternFlowTcpWindow from protobuf object *otg.PatternFlowTcpWindow + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpWindow) PatternFlowTcpWindow + // provides marshal interface + Marshal() marshalPatternFlowTcpWindow + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpWindow + // validate validates PatternFlowTcpWindow + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpWindow, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowTcpWindowChoiceEnum, set in PatternFlowTcpWindow + Choice() PatternFlowTcpWindowChoiceEnum + // setChoice assigns PatternFlowTcpWindowChoiceEnum provided by user to PatternFlowTcpWindow + setChoice(value PatternFlowTcpWindowChoiceEnum) PatternFlowTcpWindow + // HasChoice checks if Choice has been set in PatternFlowTcpWindow + HasChoice() bool + // Value returns uint32, set in PatternFlowTcpWindow. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowTcpWindow + SetValue(value uint32) PatternFlowTcpWindow + // HasValue checks if Value has been set in PatternFlowTcpWindow + HasValue() bool + // Values returns []uint32, set in PatternFlowTcpWindow. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowTcpWindow + SetValues(value []uint32) PatternFlowTcpWindow + // Increment returns PatternFlowTcpWindowCounter, set in PatternFlowTcpWindow. + // PatternFlowTcpWindowCounter is integer counter pattern + Increment() PatternFlowTcpWindowCounter + // SetIncrement assigns PatternFlowTcpWindowCounter provided by user to PatternFlowTcpWindow. + // PatternFlowTcpWindowCounter is integer counter pattern + SetIncrement(value PatternFlowTcpWindowCounter) PatternFlowTcpWindow + // HasIncrement checks if Increment has been set in PatternFlowTcpWindow + HasIncrement() bool + // Decrement returns PatternFlowTcpWindowCounter, set in PatternFlowTcpWindow. + // PatternFlowTcpWindowCounter is integer counter pattern + Decrement() PatternFlowTcpWindowCounter + // SetDecrement assigns PatternFlowTcpWindowCounter provided by user to PatternFlowTcpWindow. + // PatternFlowTcpWindowCounter is integer counter pattern + SetDecrement(value PatternFlowTcpWindowCounter) PatternFlowTcpWindow + // HasDecrement checks if Decrement has been set in PatternFlowTcpWindow + HasDecrement() bool + // MetricTags returns PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIterIter, set in PatternFlowTcpWindow + MetricTags() PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter + setNil() +} + +type PatternFlowTcpWindowChoiceEnum string + +// Enum of Choice on PatternFlowTcpWindow +var PatternFlowTcpWindowChoice = struct { + VALUE PatternFlowTcpWindowChoiceEnum + VALUES PatternFlowTcpWindowChoiceEnum + INCREMENT PatternFlowTcpWindowChoiceEnum + DECREMENT PatternFlowTcpWindowChoiceEnum +}{ + VALUE: PatternFlowTcpWindowChoiceEnum("value"), + VALUES: PatternFlowTcpWindowChoiceEnum("values"), + INCREMENT: PatternFlowTcpWindowChoiceEnum("increment"), + DECREMENT: PatternFlowTcpWindowChoiceEnum("decrement"), +} + +func (obj *patternFlowTcpWindow) Choice() PatternFlowTcpWindowChoiceEnum { + return PatternFlowTcpWindowChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowTcpWindow) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowTcpWindow) setChoice(value PatternFlowTcpWindowChoiceEnum) PatternFlowTcpWindow { + intValue, ok := otg.PatternFlowTcpWindow_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowTcpWindowChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowTcpWindow_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowTcpWindowChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowTcpWindowChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowTcpWindowChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowTcpWindowCounter().msg() + } + + if value == PatternFlowTcpWindowChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowTcpWindowCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpWindow) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowTcpWindowChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowTcpWindow) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowTcpWindow object +func (obj *patternFlowTcpWindow) SetValue(value uint32) PatternFlowTcpWindow { + obj.setChoice(PatternFlowTcpWindowChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowTcpWindow) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowTcpWindow object +func (obj *patternFlowTcpWindow) SetValues(value []uint32) PatternFlowTcpWindow { + obj.setChoice(PatternFlowTcpWindowChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowTcpWindowCounter +func (obj *patternFlowTcpWindow) Increment() PatternFlowTcpWindowCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowTcpWindowChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowTcpWindowCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowTcpWindowCounter +func (obj *patternFlowTcpWindow) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowTcpWindowCounter value in the PatternFlowTcpWindow object +func (obj *patternFlowTcpWindow) SetIncrement(value PatternFlowTcpWindowCounter) PatternFlowTcpWindow { + obj.setChoice(PatternFlowTcpWindowChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowTcpWindowCounter +func (obj *patternFlowTcpWindow) Decrement() PatternFlowTcpWindowCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowTcpWindowChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowTcpWindowCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowTcpWindowCounter +func (obj *patternFlowTcpWindow) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowTcpWindowCounter value in the PatternFlowTcpWindow object +func (obj *patternFlowTcpWindow) SetDecrement(value PatternFlowTcpWindowCounter) PatternFlowTcpWindow { + obj.setChoice(PatternFlowTcpWindowChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowTcpWindowMetricTag +func (obj *patternFlowTcpWindow) MetricTags() PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowTcpWindowMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowTcpWindowPatternFlowTcpWindowMetricTagIter struct { + obj *patternFlowTcpWindow + patternFlowTcpWindowMetricTagSlice []PatternFlowTcpWindowMetricTag + fieldPtr *[]*otg.PatternFlowTcpWindowMetricTag +} + +func newPatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter(ptr *[]*otg.PatternFlowTcpWindowMetricTag) PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter { + return &patternFlowTcpWindowPatternFlowTcpWindowMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter interface { + setMsg(*patternFlowTcpWindow) PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter + Items() []PatternFlowTcpWindowMetricTag + Add() PatternFlowTcpWindowMetricTag + Append(items ...PatternFlowTcpWindowMetricTag) PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter + Set(index int, newObj PatternFlowTcpWindowMetricTag) PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter + Clear() PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter + clearHolderSlice() PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter + appendHolderSlice(item PatternFlowTcpWindowMetricTag) PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter +} + +func (obj *patternFlowTcpWindowPatternFlowTcpWindowMetricTagIter) setMsg(msg *patternFlowTcpWindow) PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowTcpWindowMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowTcpWindowPatternFlowTcpWindowMetricTagIter) Items() []PatternFlowTcpWindowMetricTag { + return obj.patternFlowTcpWindowMetricTagSlice +} + +func (obj *patternFlowTcpWindowPatternFlowTcpWindowMetricTagIter) Add() PatternFlowTcpWindowMetricTag { + newObj := &otg.PatternFlowTcpWindowMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowTcpWindowMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowTcpWindowMetricTagSlice = append(obj.patternFlowTcpWindowMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowTcpWindowPatternFlowTcpWindowMetricTagIter) Append(items ...PatternFlowTcpWindowMetricTag) PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowTcpWindowMetricTagSlice = append(obj.patternFlowTcpWindowMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowTcpWindowPatternFlowTcpWindowMetricTagIter) Set(index int, newObj PatternFlowTcpWindowMetricTag) PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowTcpWindowMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowTcpWindowPatternFlowTcpWindowMetricTagIter) Clear() PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowTcpWindowMetricTag{} + obj.patternFlowTcpWindowMetricTagSlice = []PatternFlowTcpWindowMetricTag{} + } + return obj +} +func (obj *patternFlowTcpWindowPatternFlowTcpWindowMetricTagIter) clearHolderSlice() PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter { + if len(obj.patternFlowTcpWindowMetricTagSlice) > 0 { + obj.patternFlowTcpWindowMetricTagSlice = []PatternFlowTcpWindowMetricTag{} + } + return obj +} +func (obj *patternFlowTcpWindowPatternFlowTcpWindowMetricTagIter) appendHolderSlice(item PatternFlowTcpWindowMetricTag) PatternFlowTcpWindowPatternFlowTcpWindowMetricTagIter { + obj.patternFlowTcpWindowMetricTagSlice = append(obj.patternFlowTcpWindowMetricTagSlice, item) + return obj +} + +func (obj *patternFlowTcpWindow) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpWindow.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowTcpWindow.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowTcpWindowMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowTcpWindow) setDefault() { + var choices_set int = 0 + var choice PatternFlowTcpWindowChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowTcpWindowChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowTcpWindowChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowTcpWindowChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowTcpWindowChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowTcpWindowChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowTcpWindow") + } + } else { + intVal := otg.PatternFlowTcpWindow_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowTcpWindow_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_tcp_window_counter.go b/gosnappi/pattern_flow_tcp_window_counter.go new file mode 100644 index 00000000..6efdfc64 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_window_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpWindowCounter ***** +type patternFlowTcpWindowCounter struct { + validation + obj *otg.PatternFlowTcpWindowCounter + marshaller marshalPatternFlowTcpWindowCounter + unMarshaller unMarshalPatternFlowTcpWindowCounter +} + +func NewPatternFlowTcpWindowCounter() PatternFlowTcpWindowCounter { + obj := patternFlowTcpWindowCounter{obj: &otg.PatternFlowTcpWindowCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpWindowCounter) msg() *otg.PatternFlowTcpWindowCounter { + return obj.obj +} + +func (obj *patternFlowTcpWindowCounter) setMsg(msg *otg.PatternFlowTcpWindowCounter) PatternFlowTcpWindowCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpWindowCounter struct { + obj *patternFlowTcpWindowCounter +} + +type marshalPatternFlowTcpWindowCounter interface { + // ToProto marshals PatternFlowTcpWindowCounter to protobuf object *otg.PatternFlowTcpWindowCounter + ToProto() (*otg.PatternFlowTcpWindowCounter, error) + // ToPbText marshals PatternFlowTcpWindowCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpWindowCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpWindowCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpWindowCounter struct { + obj *patternFlowTcpWindowCounter +} + +type unMarshalPatternFlowTcpWindowCounter interface { + // FromProto unmarshals PatternFlowTcpWindowCounter from protobuf object *otg.PatternFlowTcpWindowCounter + FromProto(msg *otg.PatternFlowTcpWindowCounter) (PatternFlowTcpWindowCounter, error) + // FromPbText unmarshals PatternFlowTcpWindowCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpWindowCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpWindowCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpWindowCounter) Marshal() marshalPatternFlowTcpWindowCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpWindowCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpWindowCounter) Unmarshal() unMarshalPatternFlowTcpWindowCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpWindowCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpWindowCounter) ToProto() (*otg.PatternFlowTcpWindowCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpWindowCounter) FromProto(msg *otg.PatternFlowTcpWindowCounter) (PatternFlowTcpWindowCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpWindowCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpWindowCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpWindowCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpWindowCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpWindowCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpWindowCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpWindowCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpWindowCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpWindowCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpWindowCounter) Clone() (PatternFlowTcpWindowCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpWindowCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpWindowCounter is integer counter pattern +type PatternFlowTcpWindowCounter interface { + Validation + // msg marshals PatternFlowTcpWindowCounter to protobuf object *otg.PatternFlowTcpWindowCounter + // and doesn't set defaults + msg() *otg.PatternFlowTcpWindowCounter + // setMsg unmarshals PatternFlowTcpWindowCounter from protobuf object *otg.PatternFlowTcpWindowCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpWindowCounter) PatternFlowTcpWindowCounter + // provides marshal interface + Marshal() marshalPatternFlowTcpWindowCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpWindowCounter + // validate validates PatternFlowTcpWindowCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpWindowCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowTcpWindowCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowTcpWindowCounter + SetStart(value uint32) PatternFlowTcpWindowCounter + // HasStart checks if Start has been set in PatternFlowTcpWindowCounter + HasStart() bool + // Step returns uint32, set in PatternFlowTcpWindowCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowTcpWindowCounter + SetStep(value uint32) PatternFlowTcpWindowCounter + // HasStep checks if Step has been set in PatternFlowTcpWindowCounter + HasStep() bool + // Count returns uint32, set in PatternFlowTcpWindowCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowTcpWindowCounter + SetCount(value uint32) PatternFlowTcpWindowCounter + // HasCount checks if Count has been set in PatternFlowTcpWindowCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpWindowCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowTcpWindowCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowTcpWindowCounter object +func (obj *patternFlowTcpWindowCounter) SetStart(value uint32) PatternFlowTcpWindowCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpWindowCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowTcpWindowCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowTcpWindowCounter object +func (obj *patternFlowTcpWindowCounter) SetStep(value uint32) PatternFlowTcpWindowCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpWindowCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowTcpWindowCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowTcpWindowCounter object +func (obj *patternFlowTcpWindowCounter) SetCount(value uint32) PatternFlowTcpWindowCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowTcpWindowCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpWindowCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpWindowCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpWindowCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowTcpWindowCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_tcp_window_metric_tag.go b/gosnappi/pattern_flow_tcp_window_metric_tag.go new file mode 100644 index 00000000..6b324fa6 --- /dev/null +++ b/gosnappi/pattern_flow_tcp_window_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowTcpWindowMetricTag ***** +type patternFlowTcpWindowMetricTag struct { + validation + obj *otg.PatternFlowTcpWindowMetricTag + marshaller marshalPatternFlowTcpWindowMetricTag + unMarshaller unMarshalPatternFlowTcpWindowMetricTag +} + +func NewPatternFlowTcpWindowMetricTag() PatternFlowTcpWindowMetricTag { + obj := patternFlowTcpWindowMetricTag{obj: &otg.PatternFlowTcpWindowMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowTcpWindowMetricTag) msg() *otg.PatternFlowTcpWindowMetricTag { + return obj.obj +} + +func (obj *patternFlowTcpWindowMetricTag) setMsg(msg *otg.PatternFlowTcpWindowMetricTag) PatternFlowTcpWindowMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowTcpWindowMetricTag struct { + obj *patternFlowTcpWindowMetricTag +} + +type marshalPatternFlowTcpWindowMetricTag interface { + // ToProto marshals PatternFlowTcpWindowMetricTag to protobuf object *otg.PatternFlowTcpWindowMetricTag + ToProto() (*otg.PatternFlowTcpWindowMetricTag, error) + // ToPbText marshals PatternFlowTcpWindowMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowTcpWindowMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowTcpWindowMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowTcpWindowMetricTag struct { + obj *patternFlowTcpWindowMetricTag +} + +type unMarshalPatternFlowTcpWindowMetricTag interface { + // FromProto unmarshals PatternFlowTcpWindowMetricTag from protobuf object *otg.PatternFlowTcpWindowMetricTag + FromProto(msg *otg.PatternFlowTcpWindowMetricTag) (PatternFlowTcpWindowMetricTag, error) + // FromPbText unmarshals PatternFlowTcpWindowMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowTcpWindowMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowTcpWindowMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowTcpWindowMetricTag) Marshal() marshalPatternFlowTcpWindowMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowTcpWindowMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowTcpWindowMetricTag) Unmarshal() unMarshalPatternFlowTcpWindowMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowTcpWindowMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowTcpWindowMetricTag) ToProto() (*otg.PatternFlowTcpWindowMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowTcpWindowMetricTag) FromProto(msg *otg.PatternFlowTcpWindowMetricTag) (PatternFlowTcpWindowMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowTcpWindowMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowTcpWindowMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowTcpWindowMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpWindowMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowTcpWindowMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowTcpWindowMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowTcpWindowMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowTcpWindowMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowTcpWindowMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowTcpWindowMetricTag) Clone() (PatternFlowTcpWindowMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowTcpWindowMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowTcpWindowMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowTcpWindowMetricTag interface { + Validation + // msg marshals PatternFlowTcpWindowMetricTag to protobuf object *otg.PatternFlowTcpWindowMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowTcpWindowMetricTag + // setMsg unmarshals PatternFlowTcpWindowMetricTag from protobuf object *otg.PatternFlowTcpWindowMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowTcpWindowMetricTag) PatternFlowTcpWindowMetricTag + // provides marshal interface + Marshal() marshalPatternFlowTcpWindowMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowTcpWindowMetricTag + // validate validates PatternFlowTcpWindowMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowTcpWindowMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowTcpWindowMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowTcpWindowMetricTag + SetName(value string) PatternFlowTcpWindowMetricTag + // Offset returns uint32, set in PatternFlowTcpWindowMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowTcpWindowMetricTag + SetOffset(value uint32) PatternFlowTcpWindowMetricTag + // HasOffset checks if Offset has been set in PatternFlowTcpWindowMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowTcpWindowMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowTcpWindowMetricTag + SetLength(value uint32) PatternFlowTcpWindowMetricTag + // HasLength checks if Length has been set in PatternFlowTcpWindowMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowTcpWindowMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowTcpWindowMetricTag object +func (obj *patternFlowTcpWindowMetricTag) SetName(value string) PatternFlowTcpWindowMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpWindowMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowTcpWindowMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowTcpWindowMetricTag object +func (obj *patternFlowTcpWindowMetricTag) SetOffset(value uint32) PatternFlowTcpWindowMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpWindowMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowTcpWindowMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowTcpWindowMetricTag object +func (obj *patternFlowTcpWindowMetricTag) SetLength(value uint32) PatternFlowTcpWindowMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowTcpWindowMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowTcpWindowMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowTcpWindowMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowTcpWindowMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowTcpWindowMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_udp_checksum.go b/gosnappi/pattern_flow_udp_checksum.go new file mode 100644 index 00000000..dd0d7cea --- /dev/null +++ b/gosnappi/pattern_flow_udp_checksum.go @@ -0,0 +1,434 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowUdpChecksum ***** +type patternFlowUdpChecksum struct { + validation + obj *otg.PatternFlowUdpChecksum + marshaller marshalPatternFlowUdpChecksum + unMarshaller unMarshalPatternFlowUdpChecksum +} + +func NewPatternFlowUdpChecksum() PatternFlowUdpChecksum { + obj := patternFlowUdpChecksum{obj: &otg.PatternFlowUdpChecksum{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowUdpChecksum) msg() *otg.PatternFlowUdpChecksum { + return obj.obj +} + +func (obj *patternFlowUdpChecksum) setMsg(msg *otg.PatternFlowUdpChecksum) PatternFlowUdpChecksum { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowUdpChecksum struct { + obj *patternFlowUdpChecksum +} + +type marshalPatternFlowUdpChecksum interface { + // ToProto marshals PatternFlowUdpChecksum to protobuf object *otg.PatternFlowUdpChecksum + ToProto() (*otg.PatternFlowUdpChecksum, error) + // ToPbText marshals PatternFlowUdpChecksum to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowUdpChecksum to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowUdpChecksum to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowUdpChecksum struct { + obj *patternFlowUdpChecksum +} + +type unMarshalPatternFlowUdpChecksum interface { + // FromProto unmarshals PatternFlowUdpChecksum from protobuf object *otg.PatternFlowUdpChecksum + FromProto(msg *otg.PatternFlowUdpChecksum) (PatternFlowUdpChecksum, error) + // FromPbText unmarshals PatternFlowUdpChecksum from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowUdpChecksum from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowUdpChecksum from JSON text + FromJson(value string) error +} + +func (obj *patternFlowUdpChecksum) Marshal() marshalPatternFlowUdpChecksum { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowUdpChecksum{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowUdpChecksum) Unmarshal() unMarshalPatternFlowUdpChecksum { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowUdpChecksum{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowUdpChecksum) ToProto() (*otg.PatternFlowUdpChecksum, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowUdpChecksum) FromProto(msg *otg.PatternFlowUdpChecksum) (PatternFlowUdpChecksum, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowUdpChecksum) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowUdpChecksum) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowUdpChecksum) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpChecksum) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowUdpChecksum) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpChecksum) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowUdpChecksum) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowUdpChecksum) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowUdpChecksum) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowUdpChecksum) Clone() (PatternFlowUdpChecksum, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowUdpChecksum() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowUdpChecksum is uDP checksum +type PatternFlowUdpChecksum interface { + Validation + // msg marshals PatternFlowUdpChecksum to protobuf object *otg.PatternFlowUdpChecksum + // and doesn't set defaults + msg() *otg.PatternFlowUdpChecksum + // setMsg unmarshals PatternFlowUdpChecksum from protobuf object *otg.PatternFlowUdpChecksum + // and doesn't set defaults + setMsg(*otg.PatternFlowUdpChecksum) PatternFlowUdpChecksum + // provides marshal interface + Marshal() marshalPatternFlowUdpChecksum + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowUdpChecksum + // validate validates PatternFlowUdpChecksum + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowUdpChecksum, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowUdpChecksumChoiceEnum, set in PatternFlowUdpChecksum + Choice() PatternFlowUdpChecksumChoiceEnum + // setChoice assigns PatternFlowUdpChecksumChoiceEnum provided by user to PatternFlowUdpChecksum + setChoice(value PatternFlowUdpChecksumChoiceEnum) PatternFlowUdpChecksum + // HasChoice checks if Choice has been set in PatternFlowUdpChecksum + HasChoice() bool + // Generated returns PatternFlowUdpChecksumGeneratedEnum, set in PatternFlowUdpChecksum + Generated() PatternFlowUdpChecksumGeneratedEnum + // SetGenerated assigns PatternFlowUdpChecksumGeneratedEnum provided by user to PatternFlowUdpChecksum + SetGenerated(value PatternFlowUdpChecksumGeneratedEnum) PatternFlowUdpChecksum + // HasGenerated checks if Generated has been set in PatternFlowUdpChecksum + HasGenerated() bool + // Custom returns uint32, set in PatternFlowUdpChecksum. + Custom() uint32 + // SetCustom assigns uint32 provided by user to PatternFlowUdpChecksum + SetCustom(value uint32) PatternFlowUdpChecksum + // HasCustom checks if Custom has been set in PatternFlowUdpChecksum + HasCustom() bool +} + +type PatternFlowUdpChecksumChoiceEnum string + +// Enum of Choice on PatternFlowUdpChecksum +var PatternFlowUdpChecksumChoice = struct { + GENERATED PatternFlowUdpChecksumChoiceEnum + CUSTOM PatternFlowUdpChecksumChoiceEnum +}{ + GENERATED: PatternFlowUdpChecksumChoiceEnum("generated"), + CUSTOM: PatternFlowUdpChecksumChoiceEnum("custom"), +} + +func (obj *patternFlowUdpChecksum) Choice() PatternFlowUdpChecksumChoiceEnum { + return PatternFlowUdpChecksumChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// The type of checksum +// Choice returns a string +func (obj *patternFlowUdpChecksum) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowUdpChecksum) setChoice(value PatternFlowUdpChecksumChoiceEnum) PatternFlowUdpChecksum { + intValue, ok := otg.PatternFlowUdpChecksum_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowUdpChecksumChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowUdpChecksum_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Custom = nil + obj.obj.Generated = otg.PatternFlowUdpChecksum_Generated_unspecified.Enum() + return obj +} + +type PatternFlowUdpChecksumGeneratedEnum string + +// Enum of Generated on PatternFlowUdpChecksum +var PatternFlowUdpChecksumGenerated = struct { + GOOD PatternFlowUdpChecksumGeneratedEnum + BAD PatternFlowUdpChecksumGeneratedEnum +}{ + GOOD: PatternFlowUdpChecksumGeneratedEnum("good"), + BAD: PatternFlowUdpChecksumGeneratedEnum("bad"), +} + +func (obj *patternFlowUdpChecksum) Generated() PatternFlowUdpChecksumGeneratedEnum { + return PatternFlowUdpChecksumGeneratedEnum(obj.obj.Generated.Enum().String()) +} + +// A system generated checksum value +// Generated returns a string +func (obj *patternFlowUdpChecksum) HasGenerated() bool { + return obj.obj.Generated != nil +} + +func (obj *patternFlowUdpChecksum) SetGenerated(value PatternFlowUdpChecksumGeneratedEnum) PatternFlowUdpChecksum { + intValue, ok := otg.PatternFlowUdpChecksum_Generated_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowUdpChecksumGeneratedEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowUdpChecksum_Generated_Enum(intValue) + obj.obj.Generated = &enumValue + + return obj +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowUdpChecksum) Custom() uint32 { + + if obj.obj.Custom == nil { + obj.setChoice(PatternFlowUdpChecksumChoice.CUSTOM) + } + + return *obj.obj.Custom + +} + +// A custom checksum value +// Custom returns a uint32 +func (obj *patternFlowUdpChecksum) HasCustom() bool { + return obj.obj.Custom != nil +} + +// A custom checksum value +// SetCustom sets the uint32 value in the PatternFlowUdpChecksum object +func (obj *patternFlowUdpChecksum) SetCustom(value uint32) PatternFlowUdpChecksum { + obj.setChoice(PatternFlowUdpChecksumChoice.CUSTOM) + obj.obj.Custom = &value + return obj +} + +func (obj *patternFlowUdpChecksum) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Custom != nil { + + if *obj.obj.Custom > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpChecksum.Custom <= 65535 but Got %d", *obj.obj.Custom)) + } + + } + +} + +func (obj *patternFlowUdpChecksum) setDefault() { + var choices_set int = 0 + var choice PatternFlowUdpChecksumChoiceEnum + + if obj.obj.Generated != nil && obj.obj.Generated.Number() != 0 { + choices_set += 1 + choice = PatternFlowUdpChecksumChoice.GENERATED + } + + if obj.obj.Custom != nil { + choices_set += 1 + choice = PatternFlowUdpChecksumChoice.CUSTOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowUdpChecksumChoice.GENERATED) + if obj.obj.Generated.Number() == 0 { + obj.SetGenerated(PatternFlowUdpChecksumGenerated.GOOD) + + } + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowUdpChecksum") + } + } else { + intVal := otg.PatternFlowUdpChecksum_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowUdpChecksum_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_udp_dst_port.go b/gosnappi/pattern_flow_udp_dst_port.go new file mode 100644 index 00000000..6fdce343 --- /dev/null +++ b/gosnappi/pattern_flow_udp_dst_port.go @@ -0,0 +1,719 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowUdpDstPort ***** +type patternFlowUdpDstPort struct { + validation + obj *otg.PatternFlowUdpDstPort + marshaller marshalPatternFlowUdpDstPort + unMarshaller unMarshalPatternFlowUdpDstPort + incrementHolder PatternFlowUdpDstPortCounter + decrementHolder PatternFlowUdpDstPortCounter + metricTagsHolder PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter + randomHolder PatternFlowUdpDstPortRandom +} + +func NewPatternFlowUdpDstPort() PatternFlowUdpDstPort { + obj := patternFlowUdpDstPort{obj: &otg.PatternFlowUdpDstPort{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowUdpDstPort) msg() *otg.PatternFlowUdpDstPort { + return obj.obj +} + +func (obj *patternFlowUdpDstPort) setMsg(msg *otg.PatternFlowUdpDstPort) PatternFlowUdpDstPort { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowUdpDstPort struct { + obj *patternFlowUdpDstPort +} + +type marshalPatternFlowUdpDstPort interface { + // ToProto marshals PatternFlowUdpDstPort to protobuf object *otg.PatternFlowUdpDstPort + ToProto() (*otg.PatternFlowUdpDstPort, error) + // ToPbText marshals PatternFlowUdpDstPort to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowUdpDstPort to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowUdpDstPort to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowUdpDstPort struct { + obj *patternFlowUdpDstPort +} + +type unMarshalPatternFlowUdpDstPort interface { + // FromProto unmarshals PatternFlowUdpDstPort from protobuf object *otg.PatternFlowUdpDstPort + FromProto(msg *otg.PatternFlowUdpDstPort) (PatternFlowUdpDstPort, error) + // FromPbText unmarshals PatternFlowUdpDstPort from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowUdpDstPort from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowUdpDstPort from JSON text + FromJson(value string) error +} + +func (obj *patternFlowUdpDstPort) Marshal() marshalPatternFlowUdpDstPort { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowUdpDstPort{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowUdpDstPort) Unmarshal() unMarshalPatternFlowUdpDstPort { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowUdpDstPort{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowUdpDstPort) ToProto() (*otg.PatternFlowUdpDstPort, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowUdpDstPort) FromProto(msg *otg.PatternFlowUdpDstPort) (PatternFlowUdpDstPort, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowUdpDstPort) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowUdpDstPort) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowUdpDstPort) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpDstPort) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowUdpDstPort) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpDstPort) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowUdpDstPort) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowUdpDstPort) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowUdpDstPort) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowUdpDstPort) Clone() (PatternFlowUdpDstPort, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowUdpDstPort() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowUdpDstPort) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.randomHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowUdpDstPort is destination port +type PatternFlowUdpDstPort interface { + Validation + // msg marshals PatternFlowUdpDstPort to protobuf object *otg.PatternFlowUdpDstPort + // and doesn't set defaults + msg() *otg.PatternFlowUdpDstPort + // setMsg unmarshals PatternFlowUdpDstPort from protobuf object *otg.PatternFlowUdpDstPort + // and doesn't set defaults + setMsg(*otg.PatternFlowUdpDstPort) PatternFlowUdpDstPort + // provides marshal interface + Marshal() marshalPatternFlowUdpDstPort + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowUdpDstPort + // validate validates PatternFlowUdpDstPort + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowUdpDstPort, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowUdpDstPortChoiceEnum, set in PatternFlowUdpDstPort + Choice() PatternFlowUdpDstPortChoiceEnum + // setChoice assigns PatternFlowUdpDstPortChoiceEnum provided by user to PatternFlowUdpDstPort + setChoice(value PatternFlowUdpDstPortChoiceEnum) PatternFlowUdpDstPort + // HasChoice checks if Choice has been set in PatternFlowUdpDstPort + HasChoice() bool + // Value returns uint32, set in PatternFlowUdpDstPort. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowUdpDstPort + SetValue(value uint32) PatternFlowUdpDstPort + // HasValue checks if Value has been set in PatternFlowUdpDstPort + HasValue() bool + // Values returns []uint32, set in PatternFlowUdpDstPort. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowUdpDstPort + SetValues(value []uint32) PatternFlowUdpDstPort + // Increment returns PatternFlowUdpDstPortCounter, set in PatternFlowUdpDstPort. + // PatternFlowUdpDstPortCounter is integer counter pattern + Increment() PatternFlowUdpDstPortCounter + // SetIncrement assigns PatternFlowUdpDstPortCounter provided by user to PatternFlowUdpDstPort. + // PatternFlowUdpDstPortCounter is integer counter pattern + SetIncrement(value PatternFlowUdpDstPortCounter) PatternFlowUdpDstPort + // HasIncrement checks if Increment has been set in PatternFlowUdpDstPort + HasIncrement() bool + // Decrement returns PatternFlowUdpDstPortCounter, set in PatternFlowUdpDstPort. + // PatternFlowUdpDstPortCounter is integer counter pattern + Decrement() PatternFlowUdpDstPortCounter + // SetDecrement assigns PatternFlowUdpDstPortCounter provided by user to PatternFlowUdpDstPort. + // PatternFlowUdpDstPortCounter is integer counter pattern + SetDecrement(value PatternFlowUdpDstPortCounter) PatternFlowUdpDstPort + // HasDecrement checks if Decrement has been set in PatternFlowUdpDstPort + HasDecrement() bool + // MetricTags returns PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIterIter, set in PatternFlowUdpDstPort + MetricTags() PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter + // Random returns PatternFlowUdpDstPortRandom, set in PatternFlowUdpDstPort. + // PatternFlowUdpDstPortRandom is integer random pattern + Random() PatternFlowUdpDstPortRandom + // SetRandom assigns PatternFlowUdpDstPortRandom provided by user to PatternFlowUdpDstPort. + // PatternFlowUdpDstPortRandom is integer random pattern + SetRandom(value PatternFlowUdpDstPortRandom) PatternFlowUdpDstPort + // HasRandom checks if Random has been set in PatternFlowUdpDstPort + HasRandom() bool + setNil() +} + +type PatternFlowUdpDstPortChoiceEnum string + +// Enum of Choice on PatternFlowUdpDstPort +var PatternFlowUdpDstPortChoice = struct { + VALUE PatternFlowUdpDstPortChoiceEnum + VALUES PatternFlowUdpDstPortChoiceEnum + INCREMENT PatternFlowUdpDstPortChoiceEnum + DECREMENT PatternFlowUdpDstPortChoiceEnum + RANDOM PatternFlowUdpDstPortChoiceEnum +}{ + VALUE: PatternFlowUdpDstPortChoiceEnum("value"), + VALUES: PatternFlowUdpDstPortChoiceEnum("values"), + INCREMENT: PatternFlowUdpDstPortChoiceEnum("increment"), + DECREMENT: PatternFlowUdpDstPortChoiceEnum("decrement"), + RANDOM: PatternFlowUdpDstPortChoiceEnum("random"), +} + +func (obj *patternFlowUdpDstPort) Choice() PatternFlowUdpDstPortChoiceEnum { + return PatternFlowUdpDstPortChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowUdpDstPort) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowUdpDstPort) setChoice(value PatternFlowUdpDstPortChoiceEnum) PatternFlowUdpDstPort { + intValue, ok := otg.PatternFlowUdpDstPort_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowUdpDstPortChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowUdpDstPort_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Random = nil + obj.randomHolder = nil + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowUdpDstPortChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowUdpDstPortChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowUdpDstPortChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowUdpDstPortCounter().msg() + } + + if value == PatternFlowUdpDstPortChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowUdpDstPortCounter().msg() + } + + if value == PatternFlowUdpDstPortChoice.RANDOM { + obj.obj.Random = NewPatternFlowUdpDstPortRandom().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowUdpDstPort) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowUdpDstPortChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowUdpDstPort) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowUdpDstPort object +func (obj *patternFlowUdpDstPort) SetValue(value uint32) PatternFlowUdpDstPort { + obj.setChoice(PatternFlowUdpDstPortChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowUdpDstPort) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowUdpDstPort object +func (obj *patternFlowUdpDstPort) SetValues(value []uint32) PatternFlowUdpDstPort { + obj.setChoice(PatternFlowUdpDstPortChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowUdpDstPortCounter +func (obj *patternFlowUdpDstPort) Increment() PatternFlowUdpDstPortCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowUdpDstPortChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowUdpDstPortCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowUdpDstPortCounter +func (obj *patternFlowUdpDstPort) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowUdpDstPortCounter value in the PatternFlowUdpDstPort object +func (obj *patternFlowUdpDstPort) SetIncrement(value PatternFlowUdpDstPortCounter) PatternFlowUdpDstPort { + obj.setChoice(PatternFlowUdpDstPortChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowUdpDstPortCounter +func (obj *patternFlowUdpDstPort) Decrement() PatternFlowUdpDstPortCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowUdpDstPortChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowUdpDstPortCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowUdpDstPortCounter +func (obj *patternFlowUdpDstPort) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowUdpDstPortCounter value in the PatternFlowUdpDstPort object +func (obj *patternFlowUdpDstPort) SetDecrement(value PatternFlowUdpDstPortCounter) PatternFlowUdpDstPort { + obj.setChoice(PatternFlowUdpDstPortChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowUdpDstPortMetricTag +func (obj *patternFlowUdpDstPort) MetricTags() PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowUdpDstPortMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter struct { + obj *patternFlowUdpDstPort + patternFlowUdpDstPortMetricTagSlice []PatternFlowUdpDstPortMetricTag + fieldPtr *[]*otg.PatternFlowUdpDstPortMetricTag +} + +func newPatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter(ptr *[]*otg.PatternFlowUdpDstPortMetricTag) PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter { + return &patternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter interface { + setMsg(*patternFlowUdpDstPort) PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter + Items() []PatternFlowUdpDstPortMetricTag + Add() PatternFlowUdpDstPortMetricTag + Append(items ...PatternFlowUdpDstPortMetricTag) PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter + Set(index int, newObj PatternFlowUdpDstPortMetricTag) PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter + Clear() PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter + clearHolderSlice() PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter + appendHolderSlice(item PatternFlowUdpDstPortMetricTag) PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter +} + +func (obj *patternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter) setMsg(msg *patternFlowUdpDstPort) PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowUdpDstPortMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter) Items() []PatternFlowUdpDstPortMetricTag { + return obj.patternFlowUdpDstPortMetricTagSlice +} + +func (obj *patternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter) Add() PatternFlowUdpDstPortMetricTag { + newObj := &otg.PatternFlowUdpDstPortMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowUdpDstPortMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowUdpDstPortMetricTagSlice = append(obj.patternFlowUdpDstPortMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter) Append(items ...PatternFlowUdpDstPortMetricTag) PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowUdpDstPortMetricTagSlice = append(obj.patternFlowUdpDstPortMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter) Set(index int, newObj PatternFlowUdpDstPortMetricTag) PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowUdpDstPortMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter) Clear() PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowUdpDstPortMetricTag{} + obj.patternFlowUdpDstPortMetricTagSlice = []PatternFlowUdpDstPortMetricTag{} + } + return obj +} +func (obj *patternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter) clearHolderSlice() PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter { + if len(obj.patternFlowUdpDstPortMetricTagSlice) > 0 { + obj.patternFlowUdpDstPortMetricTagSlice = []PatternFlowUdpDstPortMetricTag{} + } + return obj +} +func (obj *patternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter) appendHolderSlice(item PatternFlowUdpDstPortMetricTag) PatternFlowUdpDstPortPatternFlowUdpDstPortMetricTagIter { + obj.patternFlowUdpDstPortMetricTagSlice = append(obj.patternFlowUdpDstPortMetricTagSlice, item) + return obj +} + +// description is TBD +// Random returns a PatternFlowUdpDstPortRandom +func (obj *patternFlowUdpDstPort) Random() PatternFlowUdpDstPortRandom { + if obj.obj.Random == nil { + obj.setChoice(PatternFlowUdpDstPortChoice.RANDOM) + } + if obj.randomHolder == nil { + obj.randomHolder = &patternFlowUdpDstPortRandom{obj: obj.obj.Random} + } + return obj.randomHolder +} + +// description is TBD +// Random returns a PatternFlowUdpDstPortRandom +func (obj *patternFlowUdpDstPort) HasRandom() bool { + return obj.obj.Random != nil +} + +// description is TBD +// SetRandom sets the PatternFlowUdpDstPortRandom value in the PatternFlowUdpDstPort object +func (obj *patternFlowUdpDstPort) SetRandom(value PatternFlowUdpDstPortRandom) PatternFlowUdpDstPort { + obj.setChoice(PatternFlowUdpDstPortChoice.RANDOM) + obj.randomHolder = nil + obj.obj.Random = value.msg() + + return obj +} + +func (obj *patternFlowUdpDstPort) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpDstPort.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowUdpDstPort.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowUdpDstPortMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Random != nil { + + obj.Random().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowUdpDstPort) setDefault() { + var choices_set int = 0 + var choice PatternFlowUdpDstPortChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowUdpDstPortChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowUdpDstPortChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowUdpDstPortChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowUdpDstPortChoice.DECREMENT + } + + if obj.obj.Random != nil { + choices_set += 1 + choice = PatternFlowUdpDstPortChoice.RANDOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowUdpDstPortChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowUdpDstPort") + } + } else { + intVal := otg.PatternFlowUdpDstPort_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowUdpDstPort_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_udp_dst_port_counter.go b/gosnappi/pattern_flow_udp_dst_port_counter.go new file mode 100644 index 00000000..51ae8aa4 --- /dev/null +++ b/gosnappi/pattern_flow_udp_dst_port_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowUdpDstPortCounter ***** +type patternFlowUdpDstPortCounter struct { + validation + obj *otg.PatternFlowUdpDstPortCounter + marshaller marshalPatternFlowUdpDstPortCounter + unMarshaller unMarshalPatternFlowUdpDstPortCounter +} + +func NewPatternFlowUdpDstPortCounter() PatternFlowUdpDstPortCounter { + obj := patternFlowUdpDstPortCounter{obj: &otg.PatternFlowUdpDstPortCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowUdpDstPortCounter) msg() *otg.PatternFlowUdpDstPortCounter { + return obj.obj +} + +func (obj *patternFlowUdpDstPortCounter) setMsg(msg *otg.PatternFlowUdpDstPortCounter) PatternFlowUdpDstPortCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowUdpDstPortCounter struct { + obj *patternFlowUdpDstPortCounter +} + +type marshalPatternFlowUdpDstPortCounter interface { + // ToProto marshals PatternFlowUdpDstPortCounter to protobuf object *otg.PatternFlowUdpDstPortCounter + ToProto() (*otg.PatternFlowUdpDstPortCounter, error) + // ToPbText marshals PatternFlowUdpDstPortCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowUdpDstPortCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowUdpDstPortCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowUdpDstPortCounter struct { + obj *patternFlowUdpDstPortCounter +} + +type unMarshalPatternFlowUdpDstPortCounter interface { + // FromProto unmarshals PatternFlowUdpDstPortCounter from protobuf object *otg.PatternFlowUdpDstPortCounter + FromProto(msg *otg.PatternFlowUdpDstPortCounter) (PatternFlowUdpDstPortCounter, error) + // FromPbText unmarshals PatternFlowUdpDstPortCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowUdpDstPortCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowUdpDstPortCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowUdpDstPortCounter) Marshal() marshalPatternFlowUdpDstPortCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowUdpDstPortCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowUdpDstPortCounter) Unmarshal() unMarshalPatternFlowUdpDstPortCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowUdpDstPortCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowUdpDstPortCounter) ToProto() (*otg.PatternFlowUdpDstPortCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowUdpDstPortCounter) FromProto(msg *otg.PatternFlowUdpDstPortCounter) (PatternFlowUdpDstPortCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowUdpDstPortCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowUdpDstPortCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowUdpDstPortCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpDstPortCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowUdpDstPortCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpDstPortCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowUdpDstPortCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowUdpDstPortCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowUdpDstPortCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowUdpDstPortCounter) Clone() (PatternFlowUdpDstPortCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowUdpDstPortCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowUdpDstPortCounter is integer counter pattern +type PatternFlowUdpDstPortCounter interface { + Validation + // msg marshals PatternFlowUdpDstPortCounter to protobuf object *otg.PatternFlowUdpDstPortCounter + // and doesn't set defaults + msg() *otg.PatternFlowUdpDstPortCounter + // setMsg unmarshals PatternFlowUdpDstPortCounter from protobuf object *otg.PatternFlowUdpDstPortCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowUdpDstPortCounter) PatternFlowUdpDstPortCounter + // provides marshal interface + Marshal() marshalPatternFlowUdpDstPortCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowUdpDstPortCounter + // validate validates PatternFlowUdpDstPortCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowUdpDstPortCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowUdpDstPortCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowUdpDstPortCounter + SetStart(value uint32) PatternFlowUdpDstPortCounter + // HasStart checks if Start has been set in PatternFlowUdpDstPortCounter + HasStart() bool + // Step returns uint32, set in PatternFlowUdpDstPortCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowUdpDstPortCounter + SetStep(value uint32) PatternFlowUdpDstPortCounter + // HasStep checks if Step has been set in PatternFlowUdpDstPortCounter + HasStep() bool + // Count returns uint32, set in PatternFlowUdpDstPortCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowUdpDstPortCounter + SetCount(value uint32) PatternFlowUdpDstPortCounter + // HasCount checks if Count has been set in PatternFlowUdpDstPortCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowUdpDstPortCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowUdpDstPortCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowUdpDstPortCounter object +func (obj *patternFlowUdpDstPortCounter) SetStart(value uint32) PatternFlowUdpDstPortCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowUdpDstPortCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowUdpDstPortCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowUdpDstPortCounter object +func (obj *patternFlowUdpDstPortCounter) SetStep(value uint32) PatternFlowUdpDstPortCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowUdpDstPortCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowUdpDstPortCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowUdpDstPortCounter object +func (obj *patternFlowUdpDstPortCounter) SetCount(value uint32) PatternFlowUdpDstPortCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowUdpDstPortCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpDstPortCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpDstPortCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpDstPortCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowUdpDstPortCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_udp_dst_port_metric_tag.go b/gosnappi/pattern_flow_udp_dst_port_metric_tag.go new file mode 100644 index 00000000..bf85fb90 --- /dev/null +++ b/gosnappi/pattern_flow_udp_dst_port_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowUdpDstPortMetricTag ***** +type patternFlowUdpDstPortMetricTag struct { + validation + obj *otg.PatternFlowUdpDstPortMetricTag + marshaller marshalPatternFlowUdpDstPortMetricTag + unMarshaller unMarshalPatternFlowUdpDstPortMetricTag +} + +func NewPatternFlowUdpDstPortMetricTag() PatternFlowUdpDstPortMetricTag { + obj := patternFlowUdpDstPortMetricTag{obj: &otg.PatternFlowUdpDstPortMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowUdpDstPortMetricTag) msg() *otg.PatternFlowUdpDstPortMetricTag { + return obj.obj +} + +func (obj *patternFlowUdpDstPortMetricTag) setMsg(msg *otg.PatternFlowUdpDstPortMetricTag) PatternFlowUdpDstPortMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowUdpDstPortMetricTag struct { + obj *patternFlowUdpDstPortMetricTag +} + +type marshalPatternFlowUdpDstPortMetricTag interface { + // ToProto marshals PatternFlowUdpDstPortMetricTag to protobuf object *otg.PatternFlowUdpDstPortMetricTag + ToProto() (*otg.PatternFlowUdpDstPortMetricTag, error) + // ToPbText marshals PatternFlowUdpDstPortMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowUdpDstPortMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowUdpDstPortMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowUdpDstPortMetricTag struct { + obj *patternFlowUdpDstPortMetricTag +} + +type unMarshalPatternFlowUdpDstPortMetricTag interface { + // FromProto unmarshals PatternFlowUdpDstPortMetricTag from protobuf object *otg.PatternFlowUdpDstPortMetricTag + FromProto(msg *otg.PatternFlowUdpDstPortMetricTag) (PatternFlowUdpDstPortMetricTag, error) + // FromPbText unmarshals PatternFlowUdpDstPortMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowUdpDstPortMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowUdpDstPortMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowUdpDstPortMetricTag) Marshal() marshalPatternFlowUdpDstPortMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowUdpDstPortMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowUdpDstPortMetricTag) Unmarshal() unMarshalPatternFlowUdpDstPortMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowUdpDstPortMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowUdpDstPortMetricTag) ToProto() (*otg.PatternFlowUdpDstPortMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowUdpDstPortMetricTag) FromProto(msg *otg.PatternFlowUdpDstPortMetricTag) (PatternFlowUdpDstPortMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowUdpDstPortMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowUdpDstPortMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowUdpDstPortMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpDstPortMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowUdpDstPortMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpDstPortMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowUdpDstPortMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowUdpDstPortMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowUdpDstPortMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowUdpDstPortMetricTag) Clone() (PatternFlowUdpDstPortMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowUdpDstPortMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowUdpDstPortMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowUdpDstPortMetricTag interface { + Validation + // msg marshals PatternFlowUdpDstPortMetricTag to protobuf object *otg.PatternFlowUdpDstPortMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowUdpDstPortMetricTag + // setMsg unmarshals PatternFlowUdpDstPortMetricTag from protobuf object *otg.PatternFlowUdpDstPortMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowUdpDstPortMetricTag) PatternFlowUdpDstPortMetricTag + // provides marshal interface + Marshal() marshalPatternFlowUdpDstPortMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowUdpDstPortMetricTag + // validate validates PatternFlowUdpDstPortMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowUdpDstPortMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowUdpDstPortMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowUdpDstPortMetricTag + SetName(value string) PatternFlowUdpDstPortMetricTag + // Offset returns uint32, set in PatternFlowUdpDstPortMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowUdpDstPortMetricTag + SetOffset(value uint32) PatternFlowUdpDstPortMetricTag + // HasOffset checks if Offset has been set in PatternFlowUdpDstPortMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowUdpDstPortMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowUdpDstPortMetricTag + SetLength(value uint32) PatternFlowUdpDstPortMetricTag + // HasLength checks if Length has been set in PatternFlowUdpDstPortMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowUdpDstPortMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowUdpDstPortMetricTag object +func (obj *patternFlowUdpDstPortMetricTag) SetName(value string) PatternFlowUdpDstPortMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowUdpDstPortMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowUdpDstPortMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowUdpDstPortMetricTag object +func (obj *patternFlowUdpDstPortMetricTag) SetOffset(value uint32) PatternFlowUdpDstPortMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowUdpDstPortMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowUdpDstPortMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowUdpDstPortMetricTag object +func (obj *patternFlowUdpDstPortMetricTag) SetLength(value uint32) PatternFlowUdpDstPortMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowUdpDstPortMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowUdpDstPortMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpDstPortMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowUdpDstPortMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowUdpDstPortMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_udp_dst_port_random.go b/gosnappi/pattern_flow_udp_dst_port_random.go new file mode 100644 index 00000000..bfbbd856 --- /dev/null +++ b/gosnappi/pattern_flow_udp_dst_port_random.go @@ -0,0 +1,422 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowUdpDstPortRandom ***** +type patternFlowUdpDstPortRandom struct { + validation + obj *otg.PatternFlowUdpDstPortRandom + marshaller marshalPatternFlowUdpDstPortRandom + unMarshaller unMarshalPatternFlowUdpDstPortRandom +} + +func NewPatternFlowUdpDstPortRandom() PatternFlowUdpDstPortRandom { + obj := patternFlowUdpDstPortRandom{obj: &otg.PatternFlowUdpDstPortRandom{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowUdpDstPortRandom) msg() *otg.PatternFlowUdpDstPortRandom { + return obj.obj +} + +func (obj *patternFlowUdpDstPortRandom) setMsg(msg *otg.PatternFlowUdpDstPortRandom) PatternFlowUdpDstPortRandom { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowUdpDstPortRandom struct { + obj *patternFlowUdpDstPortRandom +} + +type marshalPatternFlowUdpDstPortRandom interface { + // ToProto marshals PatternFlowUdpDstPortRandom to protobuf object *otg.PatternFlowUdpDstPortRandom + ToProto() (*otg.PatternFlowUdpDstPortRandom, error) + // ToPbText marshals PatternFlowUdpDstPortRandom to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowUdpDstPortRandom to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowUdpDstPortRandom to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowUdpDstPortRandom struct { + obj *patternFlowUdpDstPortRandom +} + +type unMarshalPatternFlowUdpDstPortRandom interface { + // FromProto unmarshals PatternFlowUdpDstPortRandom from protobuf object *otg.PatternFlowUdpDstPortRandom + FromProto(msg *otg.PatternFlowUdpDstPortRandom) (PatternFlowUdpDstPortRandom, error) + // FromPbText unmarshals PatternFlowUdpDstPortRandom from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowUdpDstPortRandom from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowUdpDstPortRandom from JSON text + FromJson(value string) error +} + +func (obj *patternFlowUdpDstPortRandom) Marshal() marshalPatternFlowUdpDstPortRandom { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowUdpDstPortRandom{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowUdpDstPortRandom) Unmarshal() unMarshalPatternFlowUdpDstPortRandom { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowUdpDstPortRandom{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowUdpDstPortRandom) ToProto() (*otg.PatternFlowUdpDstPortRandom, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowUdpDstPortRandom) FromProto(msg *otg.PatternFlowUdpDstPortRandom) (PatternFlowUdpDstPortRandom, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowUdpDstPortRandom) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowUdpDstPortRandom) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowUdpDstPortRandom) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpDstPortRandom) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowUdpDstPortRandom) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpDstPortRandom) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowUdpDstPortRandom) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowUdpDstPortRandom) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowUdpDstPortRandom) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowUdpDstPortRandom) Clone() (PatternFlowUdpDstPortRandom, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowUdpDstPortRandom() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowUdpDstPortRandom is integer random pattern +type PatternFlowUdpDstPortRandom interface { + Validation + // msg marshals PatternFlowUdpDstPortRandom to protobuf object *otg.PatternFlowUdpDstPortRandom + // and doesn't set defaults + msg() *otg.PatternFlowUdpDstPortRandom + // setMsg unmarshals PatternFlowUdpDstPortRandom from protobuf object *otg.PatternFlowUdpDstPortRandom + // and doesn't set defaults + setMsg(*otg.PatternFlowUdpDstPortRandom) PatternFlowUdpDstPortRandom + // provides marshal interface + Marshal() marshalPatternFlowUdpDstPortRandom + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowUdpDstPortRandom + // validate validates PatternFlowUdpDstPortRandom + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowUdpDstPortRandom, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Min returns uint32, set in PatternFlowUdpDstPortRandom. + Min() uint32 + // SetMin assigns uint32 provided by user to PatternFlowUdpDstPortRandom + SetMin(value uint32) PatternFlowUdpDstPortRandom + // HasMin checks if Min has been set in PatternFlowUdpDstPortRandom + HasMin() bool + // Max returns uint32, set in PatternFlowUdpDstPortRandom. + Max() uint32 + // SetMax assigns uint32 provided by user to PatternFlowUdpDstPortRandom + SetMax(value uint32) PatternFlowUdpDstPortRandom + // HasMax checks if Max has been set in PatternFlowUdpDstPortRandom + HasMax() bool + // Seed returns uint32, set in PatternFlowUdpDstPortRandom. + Seed() uint32 + // SetSeed assigns uint32 provided by user to PatternFlowUdpDstPortRandom + SetSeed(value uint32) PatternFlowUdpDstPortRandom + // HasSeed checks if Seed has been set in PatternFlowUdpDstPortRandom + HasSeed() bool + // Count returns uint32, set in PatternFlowUdpDstPortRandom. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowUdpDstPortRandom + SetCount(value uint32) PatternFlowUdpDstPortRandom + // HasCount checks if Count has been set in PatternFlowUdpDstPortRandom + HasCount() bool +} + +// The minimum possible value generated by the random value generator. +// Min returns a uint32 +func (obj *patternFlowUdpDstPortRandom) Min() uint32 { + + return *obj.obj.Min + +} + +// The minimum possible value generated by the random value generator. +// Min returns a uint32 +func (obj *patternFlowUdpDstPortRandom) HasMin() bool { + return obj.obj.Min != nil +} + +// The minimum possible value generated by the random value generator. +// SetMin sets the uint32 value in the PatternFlowUdpDstPortRandom object +func (obj *patternFlowUdpDstPortRandom) SetMin(value uint32) PatternFlowUdpDstPortRandom { + + obj.obj.Min = &value + return obj +} + +// The maximum possible value generated by the random value generator. +// Max returns a uint32 +func (obj *patternFlowUdpDstPortRandom) Max() uint32 { + + return *obj.obj.Max + +} + +// The maximum possible value generated by the random value generator. +// Max returns a uint32 +func (obj *patternFlowUdpDstPortRandom) HasMax() bool { + return obj.obj.Max != nil +} + +// The maximum possible value generated by the random value generator. +// SetMax sets the uint32 value in the PatternFlowUdpDstPortRandom object +func (obj *patternFlowUdpDstPortRandom) SetMax(value uint32) PatternFlowUdpDstPortRandom { + + obj.obj.Max = &value + return obj +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// Seed returns a uint32 +func (obj *patternFlowUdpDstPortRandom) Seed() uint32 { + + return *obj.obj.Seed + +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// Seed returns a uint32 +func (obj *patternFlowUdpDstPortRandom) HasSeed() bool { + return obj.obj.Seed != nil +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// SetSeed sets the uint32 value in the PatternFlowUdpDstPortRandom object +func (obj *patternFlowUdpDstPortRandom) SetSeed(value uint32) PatternFlowUdpDstPortRandom { + + obj.obj.Seed = &value + return obj +} + +// The total number of values to be generated by the random value generator. +// Count returns a uint32 +func (obj *patternFlowUdpDstPortRandom) Count() uint32 { + + return *obj.obj.Count + +} + +// The total number of values to be generated by the random value generator. +// Count returns a uint32 +func (obj *patternFlowUdpDstPortRandom) HasCount() bool { + return obj.obj.Count != nil +} + +// The total number of values to be generated by the random value generator. +// SetCount sets the uint32 value in the PatternFlowUdpDstPortRandom object +func (obj *patternFlowUdpDstPortRandom) SetCount(value uint32) PatternFlowUdpDstPortRandom { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowUdpDstPortRandom) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Min != nil { + + if *obj.obj.Min > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpDstPortRandom.Min <= 65535 but Got %d", *obj.obj.Min)) + } + + } + + if obj.obj.Max != nil { + + if *obj.obj.Max > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpDstPortRandom.Max <= 65535 but Got %d", *obj.obj.Max)) + } + + } + +} + +func (obj *patternFlowUdpDstPortRandom) setDefault() { + if obj.obj.Min == nil { + obj.SetMin(0) + } + if obj.obj.Max == nil { + obj.SetMax(65535) + } + if obj.obj.Seed == nil { + obj.SetSeed(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_udp_length.go b/gosnappi/pattern_flow_udp_length.go new file mode 100644 index 00000000..07facbbe --- /dev/null +++ b/gosnappi/pattern_flow_udp_length.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowUdpLength ***** +type patternFlowUdpLength struct { + validation + obj *otg.PatternFlowUdpLength + marshaller marshalPatternFlowUdpLength + unMarshaller unMarshalPatternFlowUdpLength + incrementHolder PatternFlowUdpLengthCounter + decrementHolder PatternFlowUdpLengthCounter + metricTagsHolder PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter +} + +func NewPatternFlowUdpLength() PatternFlowUdpLength { + obj := patternFlowUdpLength{obj: &otg.PatternFlowUdpLength{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowUdpLength) msg() *otg.PatternFlowUdpLength { + return obj.obj +} + +func (obj *patternFlowUdpLength) setMsg(msg *otg.PatternFlowUdpLength) PatternFlowUdpLength { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowUdpLength struct { + obj *patternFlowUdpLength +} + +type marshalPatternFlowUdpLength interface { + // ToProto marshals PatternFlowUdpLength to protobuf object *otg.PatternFlowUdpLength + ToProto() (*otg.PatternFlowUdpLength, error) + // ToPbText marshals PatternFlowUdpLength to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowUdpLength to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowUdpLength to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowUdpLength struct { + obj *patternFlowUdpLength +} + +type unMarshalPatternFlowUdpLength interface { + // FromProto unmarshals PatternFlowUdpLength from protobuf object *otg.PatternFlowUdpLength + FromProto(msg *otg.PatternFlowUdpLength) (PatternFlowUdpLength, error) + // FromPbText unmarshals PatternFlowUdpLength from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowUdpLength from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowUdpLength from JSON text + FromJson(value string) error +} + +func (obj *patternFlowUdpLength) Marshal() marshalPatternFlowUdpLength { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowUdpLength{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowUdpLength) Unmarshal() unMarshalPatternFlowUdpLength { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowUdpLength{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowUdpLength) ToProto() (*otg.PatternFlowUdpLength, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowUdpLength) FromProto(msg *otg.PatternFlowUdpLength) (PatternFlowUdpLength, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowUdpLength) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowUdpLength) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowUdpLength) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpLength) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowUdpLength) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpLength) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowUdpLength) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowUdpLength) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowUdpLength) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowUdpLength) Clone() (PatternFlowUdpLength, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowUdpLength() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowUdpLength) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowUdpLength is length +type PatternFlowUdpLength interface { + Validation + // msg marshals PatternFlowUdpLength to protobuf object *otg.PatternFlowUdpLength + // and doesn't set defaults + msg() *otg.PatternFlowUdpLength + // setMsg unmarshals PatternFlowUdpLength from protobuf object *otg.PatternFlowUdpLength + // and doesn't set defaults + setMsg(*otg.PatternFlowUdpLength) PatternFlowUdpLength + // provides marshal interface + Marshal() marshalPatternFlowUdpLength + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowUdpLength + // validate validates PatternFlowUdpLength + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowUdpLength, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowUdpLengthChoiceEnum, set in PatternFlowUdpLength + Choice() PatternFlowUdpLengthChoiceEnum + // setChoice assigns PatternFlowUdpLengthChoiceEnum provided by user to PatternFlowUdpLength + setChoice(value PatternFlowUdpLengthChoiceEnum) PatternFlowUdpLength + // HasChoice checks if Choice has been set in PatternFlowUdpLength + HasChoice() bool + // Value returns uint32, set in PatternFlowUdpLength. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowUdpLength + SetValue(value uint32) PatternFlowUdpLength + // HasValue checks if Value has been set in PatternFlowUdpLength + HasValue() bool + // Values returns []uint32, set in PatternFlowUdpLength. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowUdpLength + SetValues(value []uint32) PatternFlowUdpLength + // Increment returns PatternFlowUdpLengthCounter, set in PatternFlowUdpLength. + // PatternFlowUdpLengthCounter is integer counter pattern + Increment() PatternFlowUdpLengthCounter + // SetIncrement assigns PatternFlowUdpLengthCounter provided by user to PatternFlowUdpLength. + // PatternFlowUdpLengthCounter is integer counter pattern + SetIncrement(value PatternFlowUdpLengthCounter) PatternFlowUdpLength + // HasIncrement checks if Increment has been set in PatternFlowUdpLength + HasIncrement() bool + // Decrement returns PatternFlowUdpLengthCounter, set in PatternFlowUdpLength. + // PatternFlowUdpLengthCounter is integer counter pattern + Decrement() PatternFlowUdpLengthCounter + // SetDecrement assigns PatternFlowUdpLengthCounter provided by user to PatternFlowUdpLength. + // PatternFlowUdpLengthCounter is integer counter pattern + SetDecrement(value PatternFlowUdpLengthCounter) PatternFlowUdpLength + // HasDecrement checks if Decrement has been set in PatternFlowUdpLength + HasDecrement() bool + // MetricTags returns PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIterIter, set in PatternFlowUdpLength + MetricTags() PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter + setNil() +} + +type PatternFlowUdpLengthChoiceEnum string + +// Enum of Choice on PatternFlowUdpLength +var PatternFlowUdpLengthChoice = struct { + VALUE PatternFlowUdpLengthChoiceEnum + VALUES PatternFlowUdpLengthChoiceEnum + INCREMENT PatternFlowUdpLengthChoiceEnum + DECREMENT PatternFlowUdpLengthChoiceEnum +}{ + VALUE: PatternFlowUdpLengthChoiceEnum("value"), + VALUES: PatternFlowUdpLengthChoiceEnum("values"), + INCREMENT: PatternFlowUdpLengthChoiceEnum("increment"), + DECREMENT: PatternFlowUdpLengthChoiceEnum("decrement"), +} + +func (obj *patternFlowUdpLength) Choice() PatternFlowUdpLengthChoiceEnum { + return PatternFlowUdpLengthChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowUdpLength) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowUdpLength) setChoice(value PatternFlowUdpLengthChoiceEnum) PatternFlowUdpLength { + intValue, ok := otg.PatternFlowUdpLength_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowUdpLengthChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowUdpLength_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowUdpLengthChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowUdpLengthChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowUdpLengthChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowUdpLengthCounter().msg() + } + + if value == PatternFlowUdpLengthChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowUdpLengthCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowUdpLength) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowUdpLengthChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowUdpLength) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowUdpLength object +func (obj *patternFlowUdpLength) SetValue(value uint32) PatternFlowUdpLength { + obj.setChoice(PatternFlowUdpLengthChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowUdpLength) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowUdpLength object +func (obj *patternFlowUdpLength) SetValues(value []uint32) PatternFlowUdpLength { + obj.setChoice(PatternFlowUdpLengthChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowUdpLengthCounter +func (obj *patternFlowUdpLength) Increment() PatternFlowUdpLengthCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowUdpLengthChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowUdpLengthCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowUdpLengthCounter +func (obj *patternFlowUdpLength) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowUdpLengthCounter value in the PatternFlowUdpLength object +func (obj *patternFlowUdpLength) SetIncrement(value PatternFlowUdpLengthCounter) PatternFlowUdpLength { + obj.setChoice(PatternFlowUdpLengthChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowUdpLengthCounter +func (obj *patternFlowUdpLength) Decrement() PatternFlowUdpLengthCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowUdpLengthChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowUdpLengthCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowUdpLengthCounter +func (obj *patternFlowUdpLength) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowUdpLengthCounter value in the PatternFlowUdpLength object +func (obj *patternFlowUdpLength) SetDecrement(value PatternFlowUdpLengthCounter) PatternFlowUdpLength { + obj.setChoice(PatternFlowUdpLengthChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowUdpLengthMetricTag +func (obj *patternFlowUdpLength) MetricTags() PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowUdpLengthMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowUdpLengthPatternFlowUdpLengthMetricTagIter struct { + obj *patternFlowUdpLength + patternFlowUdpLengthMetricTagSlice []PatternFlowUdpLengthMetricTag + fieldPtr *[]*otg.PatternFlowUdpLengthMetricTag +} + +func newPatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter(ptr *[]*otg.PatternFlowUdpLengthMetricTag) PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter { + return &patternFlowUdpLengthPatternFlowUdpLengthMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter interface { + setMsg(*patternFlowUdpLength) PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter + Items() []PatternFlowUdpLengthMetricTag + Add() PatternFlowUdpLengthMetricTag + Append(items ...PatternFlowUdpLengthMetricTag) PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter + Set(index int, newObj PatternFlowUdpLengthMetricTag) PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter + Clear() PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter + clearHolderSlice() PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter + appendHolderSlice(item PatternFlowUdpLengthMetricTag) PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter +} + +func (obj *patternFlowUdpLengthPatternFlowUdpLengthMetricTagIter) setMsg(msg *patternFlowUdpLength) PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowUdpLengthMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowUdpLengthPatternFlowUdpLengthMetricTagIter) Items() []PatternFlowUdpLengthMetricTag { + return obj.patternFlowUdpLengthMetricTagSlice +} + +func (obj *patternFlowUdpLengthPatternFlowUdpLengthMetricTagIter) Add() PatternFlowUdpLengthMetricTag { + newObj := &otg.PatternFlowUdpLengthMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowUdpLengthMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowUdpLengthMetricTagSlice = append(obj.patternFlowUdpLengthMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowUdpLengthPatternFlowUdpLengthMetricTagIter) Append(items ...PatternFlowUdpLengthMetricTag) PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowUdpLengthMetricTagSlice = append(obj.patternFlowUdpLengthMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowUdpLengthPatternFlowUdpLengthMetricTagIter) Set(index int, newObj PatternFlowUdpLengthMetricTag) PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowUdpLengthMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowUdpLengthPatternFlowUdpLengthMetricTagIter) Clear() PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowUdpLengthMetricTag{} + obj.patternFlowUdpLengthMetricTagSlice = []PatternFlowUdpLengthMetricTag{} + } + return obj +} +func (obj *patternFlowUdpLengthPatternFlowUdpLengthMetricTagIter) clearHolderSlice() PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter { + if len(obj.patternFlowUdpLengthMetricTagSlice) > 0 { + obj.patternFlowUdpLengthMetricTagSlice = []PatternFlowUdpLengthMetricTag{} + } + return obj +} +func (obj *patternFlowUdpLengthPatternFlowUdpLengthMetricTagIter) appendHolderSlice(item PatternFlowUdpLengthMetricTag) PatternFlowUdpLengthPatternFlowUdpLengthMetricTagIter { + obj.patternFlowUdpLengthMetricTagSlice = append(obj.patternFlowUdpLengthMetricTagSlice, item) + return obj +} + +func (obj *patternFlowUdpLength) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpLength.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowUdpLength.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowUdpLengthMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowUdpLength) setDefault() { + var choices_set int = 0 + var choice PatternFlowUdpLengthChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowUdpLengthChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowUdpLengthChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowUdpLengthChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowUdpLengthChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowUdpLengthChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowUdpLength") + } + } else { + intVal := otg.PatternFlowUdpLength_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowUdpLength_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_udp_length_counter.go b/gosnappi/pattern_flow_udp_length_counter.go new file mode 100644 index 00000000..606f2552 --- /dev/null +++ b/gosnappi/pattern_flow_udp_length_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowUdpLengthCounter ***** +type patternFlowUdpLengthCounter struct { + validation + obj *otg.PatternFlowUdpLengthCounter + marshaller marshalPatternFlowUdpLengthCounter + unMarshaller unMarshalPatternFlowUdpLengthCounter +} + +func NewPatternFlowUdpLengthCounter() PatternFlowUdpLengthCounter { + obj := patternFlowUdpLengthCounter{obj: &otg.PatternFlowUdpLengthCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowUdpLengthCounter) msg() *otg.PatternFlowUdpLengthCounter { + return obj.obj +} + +func (obj *patternFlowUdpLengthCounter) setMsg(msg *otg.PatternFlowUdpLengthCounter) PatternFlowUdpLengthCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowUdpLengthCounter struct { + obj *patternFlowUdpLengthCounter +} + +type marshalPatternFlowUdpLengthCounter interface { + // ToProto marshals PatternFlowUdpLengthCounter to protobuf object *otg.PatternFlowUdpLengthCounter + ToProto() (*otg.PatternFlowUdpLengthCounter, error) + // ToPbText marshals PatternFlowUdpLengthCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowUdpLengthCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowUdpLengthCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowUdpLengthCounter struct { + obj *patternFlowUdpLengthCounter +} + +type unMarshalPatternFlowUdpLengthCounter interface { + // FromProto unmarshals PatternFlowUdpLengthCounter from protobuf object *otg.PatternFlowUdpLengthCounter + FromProto(msg *otg.PatternFlowUdpLengthCounter) (PatternFlowUdpLengthCounter, error) + // FromPbText unmarshals PatternFlowUdpLengthCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowUdpLengthCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowUdpLengthCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowUdpLengthCounter) Marshal() marshalPatternFlowUdpLengthCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowUdpLengthCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowUdpLengthCounter) Unmarshal() unMarshalPatternFlowUdpLengthCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowUdpLengthCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowUdpLengthCounter) ToProto() (*otg.PatternFlowUdpLengthCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowUdpLengthCounter) FromProto(msg *otg.PatternFlowUdpLengthCounter) (PatternFlowUdpLengthCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowUdpLengthCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowUdpLengthCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowUdpLengthCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpLengthCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowUdpLengthCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpLengthCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowUdpLengthCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowUdpLengthCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowUdpLengthCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowUdpLengthCounter) Clone() (PatternFlowUdpLengthCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowUdpLengthCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowUdpLengthCounter is integer counter pattern +type PatternFlowUdpLengthCounter interface { + Validation + // msg marshals PatternFlowUdpLengthCounter to protobuf object *otg.PatternFlowUdpLengthCounter + // and doesn't set defaults + msg() *otg.PatternFlowUdpLengthCounter + // setMsg unmarshals PatternFlowUdpLengthCounter from protobuf object *otg.PatternFlowUdpLengthCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowUdpLengthCounter) PatternFlowUdpLengthCounter + // provides marshal interface + Marshal() marshalPatternFlowUdpLengthCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowUdpLengthCounter + // validate validates PatternFlowUdpLengthCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowUdpLengthCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowUdpLengthCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowUdpLengthCounter + SetStart(value uint32) PatternFlowUdpLengthCounter + // HasStart checks if Start has been set in PatternFlowUdpLengthCounter + HasStart() bool + // Step returns uint32, set in PatternFlowUdpLengthCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowUdpLengthCounter + SetStep(value uint32) PatternFlowUdpLengthCounter + // HasStep checks if Step has been set in PatternFlowUdpLengthCounter + HasStep() bool + // Count returns uint32, set in PatternFlowUdpLengthCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowUdpLengthCounter + SetCount(value uint32) PatternFlowUdpLengthCounter + // HasCount checks if Count has been set in PatternFlowUdpLengthCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowUdpLengthCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowUdpLengthCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowUdpLengthCounter object +func (obj *patternFlowUdpLengthCounter) SetStart(value uint32) PatternFlowUdpLengthCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowUdpLengthCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowUdpLengthCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowUdpLengthCounter object +func (obj *patternFlowUdpLengthCounter) SetStep(value uint32) PatternFlowUdpLengthCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowUdpLengthCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowUdpLengthCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowUdpLengthCounter object +func (obj *patternFlowUdpLengthCounter) SetCount(value uint32) PatternFlowUdpLengthCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowUdpLengthCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpLengthCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpLengthCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpLengthCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowUdpLengthCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_udp_length_metric_tag.go b/gosnappi/pattern_flow_udp_length_metric_tag.go new file mode 100644 index 00000000..ccaf598f --- /dev/null +++ b/gosnappi/pattern_flow_udp_length_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowUdpLengthMetricTag ***** +type patternFlowUdpLengthMetricTag struct { + validation + obj *otg.PatternFlowUdpLengthMetricTag + marshaller marshalPatternFlowUdpLengthMetricTag + unMarshaller unMarshalPatternFlowUdpLengthMetricTag +} + +func NewPatternFlowUdpLengthMetricTag() PatternFlowUdpLengthMetricTag { + obj := patternFlowUdpLengthMetricTag{obj: &otg.PatternFlowUdpLengthMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowUdpLengthMetricTag) msg() *otg.PatternFlowUdpLengthMetricTag { + return obj.obj +} + +func (obj *patternFlowUdpLengthMetricTag) setMsg(msg *otg.PatternFlowUdpLengthMetricTag) PatternFlowUdpLengthMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowUdpLengthMetricTag struct { + obj *patternFlowUdpLengthMetricTag +} + +type marshalPatternFlowUdpLengthMetricTag interface { + // ToProto marshals PatternFlowUdpLengthMetricTag to protobuf object *otg.PatternFlowUdpLengthMetricTag + ToProto() (*otg.PatternFlowUdpLengthMetricTag, error) + // ToPbText marshals PatternFlowUdpLengthMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowUdpLengthMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowUdpLengthMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowUdpLengthMetricTag struct { + obj *patternFlowUdpLengthMetricTag +} + +type unMarshalPatternFlowUdpLengthMetricTag interface { + // FromProto unmarshals PatternFlowUdpLengthMetricTag from protobuf object *otg.PatternFlowUdpLengthMetricTag + FromProto(msg *otg.PatternFlowUdpLengthMetricTag) (PatternFlowUdpLengthMetricTag, error) + // FromPbText unmarshals PatternFlowUdpLengthMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowUdpLengthMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowUdpLengthMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowUdpLengthMetricTag) Marshal() marshalPatternFlowUdpLengthMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowUdpLengthMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowUdpLengthMetricTag) Unmarshal() unMarshalPatternFlowUdpLengthMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowUdpLengthMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowUdpLengthMetricTag) ToProto() (*otg.PatternFlowUdpLengthMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowUdpLengthMetricTag) FromProto(msg *otg.PatternFlowUdpLengthMetricTag) (PatternFlowUdpLengthMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowUdpLengthMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowUdpLengthMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowUdpLengthMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpLengthMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowUdpLengthMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpLengthMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowUdpLengthMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowUdpLengthMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowUdpLengthMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowUdpLengthMetricTag) Clone() (PatternFlowUdpLengthMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowUdpLengthMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowUdpLengthMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowUdpLengthMetricTag interface { + Validation + // msg marshals PatternFlowUdpLengthMetricTag to protobuf object *otg.PatternFlowUdpLengthMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowUdpLengthMetricTag + // setMsg unmarshals PatternFlowUdpLengthMetricTag from protobuf object *otg.PatternFlowUdpLengthMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowUdpLengthMetricTag) PatternFlowUdpLengthMetricTag + // provides marshal interface + Marshal() marshalPatternFlowUdpLengthMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowUdpLengthMetricTag + // validate validates PatternFlowUdpLengthMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowUdpLengthMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowUdpLengthMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowUdpLengthMetricTag + SetName(value string) PatternFlowUdpLengthMetricTag + // Offset returns uint32, set in PatternFlowUdpLengthMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowUdpLengthMetricTag + SetOffset(value uint32) PatternFlowUdpLengthMetricTag + // HasOffset checks if Offset has been set in PatternFlowUdpLengthMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowUdpLengthMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowUdpLengthMetricTag + SetLength(value uint32) PatternFlowUdpLengthMetricTag + // HasLength checks if Length has been set in PatternFlowUdpLengthMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowUdpLengthMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowUdpLengthMetricTag object +func (obj *patternFlowUdpLengthMetricTag) SetName(value string) PatternFlowUdpLengthMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowUdpLengthMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowUdpLengthMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowUdpLengthMetricTag object +func (obj *patternFlowUdpLengthMetricTag) SetOffset(value uint32) PatternFlowUdpLengthMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowUdpLengthMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowUdpLengthMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowUdpLengthMetricTag object +func (obj *patternFlowUdpLengthMetricTag) SetLength(value uint32) PatternFlowUdpLengthMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowUdpLengthMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowUdpLengthMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpLengthMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowUdpLengthMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowUdpLengthMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_udp_src_port.go b/gosnappi/pattern_flow_udp_src_port.go new file mode 100644 index 00000000..86c04bd6 --- /dev/null +++ b/gosnappi/pattern_flow_udp_src_port.go @@ -0,0 +1,719 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowUdpSrcPort ***** +type patternFlowUdpSrcPort struct { + validation + obj *otg.PatternFlowUdpSrcPort + marshaller marshalPatternFlowUdpSrcPort + unMarshaller unMarshalPatternFlowUdpSrcPort + incrementHolder PatternFlowUdpSrcPortCounter + decrementHolder PatternFlowUdpSrcPortCounter + metricTagsHolder PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter + randomHolder PatternFlowUdpSrcPortRandom +} + +func NewPatternFlowUdpSrcPort() PatternFlowUdpSrcPort { + obj := patternFlowUdpSrcPort{obj: &otg.PatternFlowUdpSrcPort{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowUdpSrcPort) msg() *otg.PatternFlowUdpSrcPort { + return obj.obj +} + +func (obj *patternFlowUdpSrcPort) setMsg(msg *otg.PatternFlowUdpSrcPort) PatternFlowUdpSrcPort { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowUdpSrcPort struct { + obj *patternFlowUdpSrcPort +} + +type marshalPatternFlowUdpSrcPort interface { + // ToProto marshals PatternFlowUdpSrcPort to protobuf object *otg.PatternFlowUdpSrcPort + ToProto() (*otg.PatternFlowUdpSrcPort, error) + // ToPbText marshals PatternFlowUdpSrcPort to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowUdpSrcPort to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowUdpSrcPort to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowUdpSrcPort struct { + obj *patternFlowUdpSrcPort +} + +type unMarshalPatternFlowUdpSrcPort interface { + // FromProto unmarshals PatternFlowUdpSrcPort from protobuf object *otg.PatternFlowUdpSrcPort + FromProto(msg *otg.PatternFlowUdpSrcPort) (PatternFlowUdpSrcPort, error) + // FromPbText unmarshals PatternFlowUdpSrcPort from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowUdpSrcPort from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowUdpSrcPort from JSON text + FromJson(value string) error +} + +func (obj *patternFlowUdpSrcPort) Marshal() marshalPatternFlowUdpSrcPort { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowUdpSrcPort{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowUdpSrcPort) Unmarshal() unMarshalPatternFlowUdpSrcPort { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowUdpSrcPort{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowUdpSrcPort) ToProto() (*otg.PatternFlowUdpSrcPort, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowUdpSrcPort) FromProto(msg *otg.PatternFlowUdpSrcPort) (PatternFlowUdpSrcPort, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowUdpSrcPort) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowUdpSrcPort) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowUdpSrcPort) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpSrcPort) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowUdpSrcPort) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpSrcPort) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowUdpSrcPort) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowUdpSrcPort) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowUdpSrcPort) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowUdpSrcPort) Clone() (PatternFlowUdpSrcPort, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowUdpSrcPort() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowUdpSrcPort) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.randomHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowUdpSrcPort is source port +type PatternFlowUdpSrcPort interface { + Validation + // msg marshals PatternFlowUdpSrcPort to protobuf object *otg.PatternFlowUdpSrcPort + // and doesn't set defaults + msg() *otg.PatternFlowUdpSrcPort + // setMsg unmarshals PatternFlowUdpSrcPort from protobuf object *otg.PatternFlowUdpSrcPort + // and doesn't set defaults + setMsg(*otg.PatternFlowUdpSrcPort) PatternFlowUdpSrcPort + // provides marshal interface + Marshal() marshalPatternFlowUdpSrcPort + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowUdpSrcPort + // validate validates PatternFlowUdpSrcPort + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowUdpSrcPort, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowUdpSrcPortChoiceEnum, set in PatternFlowUdpSrcPort + Choice() PatternFlowUdpSrcPortChoiceEnum + // setChoice assigns PatternFlowUdpSrcPortChoiceEnum provided by user to PatternFlowUdpSrcPort + setChoice(value PatternFlowUdpSrcPortChoiceEnum) PatternFlowUdpSrcPort + // HasChoice checks if Choice has been set in PatternFlowUdpSrcPort + HasChoice() bool + // Value returns uint32, set in PatternFlowUdpSrcPort. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowUdpSrcPort + SetValue(value uint32) PatternFlowUdpSrcPort + // HasValue checks if Value has been set in PatternFlowUdpSrcPort + HasValue() bool + // Values returns []uint32, set in PatternFlowUdpSrcPort. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowUdpSrcPort + SetValues(value []uint32) PatternFlowUdpSrcPort + // Increment returns PatternFlowUdpSrcPortCounter, set in PatternFlowUdpSrcPort. + // PatternFlowUdpSrcPortCounter is integer counter pattern + Increment() PatternFlowUdpSrcPortCounter + // SetIncrement assigns PatternFlowUdpSrcPortCounter provided by user to PatternFlowUdpSrcPort. + // PatternFlowUdpSrcPortCounter is integer counter pattern + SetIncrement(value PatternFlowUdpSrcPortCounter) PatternFlowUdpSrcPort + // HasIncrement checks if Increment has been set in PatternFlowUdpSrcPort + HasIncrement() bool + // Decrement returns PatternFlowUdpSrcPortCounter, set in PatternFlowUdpSrcPort. + // PatternFlowUdpSrcPortCounter is integer counter pattern + Decrement() PatternFlowUdpSrcPortCounter + // SetDecrement assigns PatternFlowUdpSrcPortCounter provided by user to PatternFlowUdpSrcPort. + // PatternFlowUdpSrcPortCounter is integer counter pattern + SetDecrement(value PatternFlowUdpSrcPortCounter) PatternFlowUdpSrcPort + // HasDecrement checks if Decrement has been set in PatternFlowUdpSrcPort + HasDecrement() bool + // MetricTags returns PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIterIter, set in PatternFlowUdpSrcPort + MetricTags() PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter + // Random returns PatternFlowUdpSrcPortRandom, set in PatternFlowUdpSrcPort. + // PatternFlowUdpSrcPortRandom is integer random pattern + Random() PatternFlowUdpSrcPortRandom + // SetRandom assigns PatternFlowUdpSrcPortRandom provided by user to PatternFlowUdpSrcPort. + // PatternFlowUdpSrcPortRandom is integer random pattern + SetRandom(value PatternFlowUdpSrcPortRandom) PatternFlowUdpSrcPort + // HasRandom checks if Random has been set in PatternFlowUdpSrcPort + HasRandom() bool + setNil() +} + +type PatternFlowUdpSrcPortChoiceEnum string + +// Enum of Choice on PatternFlowUdpSrcPort +var PatternFlowUdpSrcPortChoice = struct { + VALUE PatternFlowUdpSrcPortChoiceEnum + VALUES PatternFlowUdpSrcPortChoiceEnum + INCREMENT PatternFlowUdpSrcPortChoiceEnum + DECREMENT PatternFlowUdpSrcPortChoiceEnum + RANDOM PatternFlowUdpSrcPortChoiceEnum +}{ + VALUE: PatternFlowUdpSrcPortChoiceEnum("value"), + VALUES: PatternFlowUdpSrcPortChoiceEnum("values"), + INCREMENT: PatternFlowUdpSrcPortChoiceEnum("increment"), + DECREMENT: PatternFlowUdpSrcPortChoiceEnum("decrement"), + RANDOM: PatternFlowUdpSrcPortChoiceEnum("random"), +} + +func (obj *patternFlowUdpSrcPort) Choice() PatternFlowUdpSrcPortChoiceEnum { + return PatternFlowUdpSrcPortChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowUdpSrcPort) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowUdpSrcPort) setChoice(value PatternFlowUdpSrcPortChoiceEnum) PatternFlowUdpSrcPort { + intValue, ok := otg.PatternFlowUdpSrcPort_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowUdpSrcPortChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowUdpSrcPort_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Random = nil + obj.randomHolder = nil + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowUdpSrcPortChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowUdpSrcPortChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowUdpSrcPortChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowUdpSrcPortCounter().msg() + } + + if value == PatternFlowUdpSrcPortChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowUdpSrcPortCounter().msg() + } + + if value == PatternFlowUdpSrcPortChoice.RANDOM { + obj.obj.Random = NewPatternFlowUdpSrcPortRandom().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowUdpSrcPort) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowUdpSrcPortChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowUdpSrcPort) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowUdpSrcPort object +func (obj *patternFlowUdpSrcPort) SetValue(value uint32) PatternFlowUdpSrcPort { + obj.setChoice(PatternFlowUdpSrcPortChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowUdpSrcPort) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowUdpSrcPort object +func (obj *patternFlowUdpSrcPort) SetValues(value []uint32) PatternFlowUdpSrcPort { + obj.setChoice(PatternFlowUdpSrcPortChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowUdpSrcPortCounter +func (obj *patternFlowUdpSrcPort) Increment() PatternFlowUdpSrcPortCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowUdpSrcPortChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowUdpSrcPortCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowUdpSrcPortCounter +func (obj *patternFlowUdpSrcPort) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowUdpSrcPortCounter value in the PatternFlowUdpSrcPort object +func (obj *patternFlowUdpSrcPort) SetIncrement(value PatternFlowUdpSrcPortCounter) PatternFlowUdpSrcPort { + obj.setChoice(PatternFlowUdpSrcPortChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowUdpSrcPortCounter +func (obj *patternFlowUdpSrcPort) Decrement() PatternFlowUdpSrcPortCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowUdpSrcPortChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowUdpSrcPortCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowUdpSrcPortCounter +func (obj *patternFlowUdpSrcPort) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowUdpSrcPortCounter value in the PatternFlowUdpSrcPort object +func (obj *patternFlowUdpSrcPort) SetDecrement(value PatternFlowUdpSrcPortCounter) PatternFlowUdpSrcPort { + obj.setChoice(PatternFlowUdpSrcPortChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowUdpSrcPortMetricTag +func (obj *patternFlowUdpSrcPort) MetricTags() PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowUdpSrcPortMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter struct { + obj *patternFlowUdpSrcPort + patternFlowUdpSrcPortMetricTagSlice []PatternFlowUdpSrcPortMetricTag + fieldPtr *[]*otg.PatternFlowUdpSrcPortMetricTag +} + +func newPatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter(ptr *[]*otg.PatternFlowUdpSrcPortMetricTag) PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter { + return &patternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter interface { + setMsg(*patternFlowUdpSrcPort) PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter + Items() []PatternFlowUdpSrcPortMetricTag + Add() PatternFlowUdpSrcPortMetricTag + Append(items ...PatternFlowUdpSrcPortMetricTag) PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter + Set(index int, newObj PatternFlowUdpSrcPortMetricTag) PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter + Clear() PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter + clearHolderSlice() PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter + appendHolderSlice(item PatternFlowUdpSrcPortMetricTag) PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter +} + +func (obj *patternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter) setMsg(msg *patternFlowUdpSrcPort) PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowUdpSrcPortMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter) Items() []PatternFlowUdpSrcPortMetricTag { + return obj.patternFlowUdpSrcPortMetricTagSlice +} + +func (obj *patternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter) Add() PatternFlowUdpSrcPortMetricTag { + newObj := &otg.PatternFlowUdpSrcPortMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowUdpSrcPortMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowUdpSrcPortMetricTagSlice = append(obj.patternFlowUdpSrcPortMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter) Append(items ...PatternFlowUdpSrcPortMetricTag) PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowUdpSrcPortMetricTagSlice = append(obj.patternFlowUdpSrcPortMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter) Set(index int, newObj PatternFlowUdpSrcPortMetricTag) PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowUdpSrcPortMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter) Clear() PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowUdpSrcPortMetricTag{} + obj.patternFlowUdpSrcPortMetricTagSlice = []PatternFlowUdpSrcPortMetricTag{} + } + return obj +} +func (obj *patternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter) clearHolderSlice() PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter { + if len(obj.patternFlowUdpSrcPortMetricTagSlice) > 0 { + obj.patternFlowUdpSrcPortMetricTagSlice = []PatternFlowUdpSrcPortMetricTag{} + } + return obj +} +func (obj *patternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter) appendHolderSlice(item PatternFlowUdpSrcPortMetricTag) PatternFlowUdpSrcPortPatternFlowUdpSrcPortMetricTagIter { + obj.patternFlowUdpSrcPortMetricTagSlice = append(obj.patternFlowUdpSrcPortMetricTagSlice, item) + return obj +} + +// description is TBD +// Random returns a PatternFlowUdpSrcPortRandom +func (obj *patternFlowUdpSrcPort) Random() PatternFlowUdpSrcPortRandom { + if obj.obj.Random == nil { + obj.setChoice(PatternFlowUdpSrcPortChoice.RANDOM) + } + if obj.randomHolder == nil { + obj.randomHolder = &patternFlowUdpSrcPortRandom{obj: obj.obj.Random} + } + return obj.randomHolder +} + +// description is TBD +// Random returns a PatternFlowUdpSrcPortRandom +func (obj *patternFlowUdpSrcPort) HasRandom() bool { + return obj.obj.Random != nil +} + +// description is TBD +// SetRandom sets the PatternFlowUdpSrcPortRandom value in the PatternFlowUdpSrcPort object +func (obj *patternFlowUdpSrcPort) SetRandom(value PatternFlowUdpSrcPortRandom) PatternFlowUdpSrcPort { + obj.setChoice(PatternFlowUdpSrcPortChoice.RANDOM) + obj.randomHolder = nil + obj.obj.Random = value.msg() + + return obj +} + +func (obj *patternFlowUdpSrcPort) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpSrcPort.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowUdpSrcPort.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowUdpSrcPortMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + + if obj.obj.Random != nil { + + obj.Random().validateObj(vObj, set_default) + } + +} + +func (obj *patternFlowUdpSrcPort) setDefault() { + var choices_set int = 0 + var choice PatternFlowUdpSrcPortChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowUdpSrcPortChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowUdpSrcPortChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowUdpSrcPortChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowUdpSrcPortChoice.DECREMENT + } + + if obj.obj.Random != nil { + choices_set += 1 + choice = PatternFlowUdpSrcPortChoice.RANDOM + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowUdpSrcPortChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowUdpSrcPort") + } + } else { + intVal := otg.PatternFlowUdpSrcPort_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowUdpSrcPort_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_udp_src_port_counter.go b/gosnappi/pattern_flow_udp_src_port_counter.go new file mode 100644 index 00000000..f3770157 --- /dev/null +++ b/gosnappi/pattern_flow_udp_src_port_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowUdpSrcPortCounter ***** +type patternFlowUdpSrcPortCounter struct { + validation + obj *otg.PatternFlowUdpSrcPortCounter + marshaller marshalPatternFlowUdpSrcPortCounter + unMarshaller unMarshalPatternFlowUdpSrcPortCounter +} + +func NewPatternFlowUdpSrcPortCounter() PatternFlowUdpSrcPortCounter { + obj := patternFlowUdpSrcPortCounter{obj: &otg.PatternFlowUdpSrcPortCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowUdpSrcPortCounter) msg() *otg.PatternFlowUdpSrcPortCounter { + return obj.obj +} + +func (obj *patternFlowUdpSrcPortCounter) setMsg(msg *otg.PatternFlowUdpSrcPortCounter) PatternFlowUdpSrcPortCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowUdpSrcPortCounter struct { + obj *patternFlowUdpSrcPortCounter +} + +type marshalPatternFlowUdpSrcPortCounter interface { + // ToProto marshals PatternFlowUdpSrcPortCounter to protobuf object *otg.PatternFlowUdpSrcPortCounter + ToProto() (*otg.PatternFlowUdpSrcPortCounter, error) + // ToPbText marshals PatternFlowUdpSrcPortCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowUdpSrcPortCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowUdpSrcPortCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowUdpSrcPortCounter struct { + obj *patternFlowUdpSrcPortCounter +} + +type unMarshalPatternFlowUdpSrcPortCounter interface { + // FromProto unmarshals PatternFlowUdpSrcPortCounter from protobuf object *otg.PatternFlowUdpSrcPortCounter + FromProto(msg *otg.PatternFlowUdpSrcPortCounter) (PatternFlowUdpSrcPortCounter, error) + // FromPbText unmarshals PatternFlowUdpSrcPortCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowUdpSrcPortCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowUdpSrcPortCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowUdpSrcPortCounter) Marshal() marshalPatternFlowUdpSrcPortCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowUdpSrcPortCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowUdpSrcPortCounter) Unmarshal() unMarshalPatternFlowUdpSrcPortCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowUdpSrcPortCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowUdpSrcPortCounter) ToProto() (*otg.PatternFlowUdpSrcPortCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowUdpSrcPortCounter) FromProto(msg *otg.PatternFlowUdpSrcPortCounter) (PatternFlowUdpSrcPortCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowUdpSrcPortCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowUdpSrcPortCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowUdpSrcPortCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpSrcPortCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowUdpSrcPortCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpSrcPortCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowUdpSrcPortCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowUdpSrcPortCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowUdpSrcPortCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowUdpSrcPortCounter) Clone() (PatternFlowUdpSrcPortCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowUdpSrcPortCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowUdpSrcPortCounter is integer counter pattern +type PatternFlowUdpSrcPortCounter interface { + Validation + // msg marshals PatternFlowUdpSrcPortCounter to protobuf object *otg.PatternFlowUdpSrcPortCounter + // and doesn't set defaults + msg() *otg.PatternFlowUdpSrcPortCounter + // setMsg unmarshals PatternFlowUdpSrcPortCounter from protobuf object *otg.PatternFlowUdpSrcPortCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowUdpSrcPortCounter) PatternFlowUdpSrcPortCounter + // provides marshal interface + Marshal() marshalPatternFlowUdpSrcPortCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowUdpSrcPortCounter + // validate validates PatternFlowUdpSrcPortCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowUdpSrcPortCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowUdpSrcPortCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowUdpSrcPortCounter + SetStart(value uint32) PatternFlowUdpSrcPortCounter + // HasStart checks if Start has been set in PatternFlowUdpSrcPortCounter + HasStart() bool + // Step returns uint32, set in PatternFlowUdpSrcPortCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowUdpSrcPortCounter + SetStep(value uint32) PatternFlowUdpSrcPortCounter + // HasStep checks if Step has been set in PatternFlowUdpSrcPortCounter + HasStep() bool + // Count returns uint32, set in PatternFlowUdpSrcPortCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowUdpSrcPortCounter + SetCount(value uint32) PatternFlowUdpSrcPortCounter + // HasCount checks if Count has been set in PatternFlowUdpSrcPortCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowUdpSrcPortCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowUdpSrcPortCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowUdpSrcPortCounter object +func (obj *patternFlowUdpSrcPortCounter) SetStart(value uint32) PatternFlowUdpSrcPortCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowUdpSrcPortCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowUdpSrcPortCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowUdpSrcPortCounter object +func (obj *patternFlowUdpSrcPortCounter) SetStep(value uint32) PatternFlowUdpSrcPortCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowUdpSrcPortCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowUdpSrcPortCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowUdpSrcPortCounter object +func (obj *patternFlowUdpSrcPortCounter) SetCount(value uint32) PatternFlowUdpSrcPortCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowUdpSrcPortCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpSrcPortCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpSrcPortCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpSrcPortCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowUdpSrcPortCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_udp_src_port_metric_tag.go b/gosnappi/pattern_flow_udp_src_port_metric_tag.go new file mode 100644 index 00000000..783c16bc --- /dev/null +++ b/gosnappi/pattern_flow_udp_src_port_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowUdpSrcPortMetricTag ***** +type patternFlowUdpSrcPortMetricTag struct { + validation + obj *otg.PatternFlowUdpSrcPortMetricTag + marshaller marshalPatternFlowUdpSrcPortMetricTag + unMarshaller unMarshalPatternFlowUdpSrcPortMetricTag +} + +func NewPatternFlowUdpSrcPortMetricTag() PatternFlowUdpSrcPortMetricTag { + obj := patternFlowUdpSrcPortMetricTag{obj: &otg.PatternFlowUdpSrcPortMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowUdpSrcPortMetricTag) msg() *otg.PatternFlowUdpSrcPortMetricTag { + return obj.obj +} + +func (obj *patternFlowUdpSrcPortMetricTag) setMsg(msg *otg.PatternFlowUdpSrcPortMetricTag) PatternFlowUdpSrcPortMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowUdpSrcPortMetricTag struct { + obj *patternFlowUdpSrcPortMetricTag +} + +type marshalPatternFlowUdpSrcPortMetricTag interface { + // ToProto marshals PatternFlowUdpSrcPortMetricTag to protobuf object *otg.PatternFlowUdpSrcPortMetricTag + ToProto() (*otg.PatternFlowUdpSrcPortMetricTag, error) + // ToPbText marshals PatternFlowUdpSrcPortMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowUdpSrcPortMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowUdpSrcPortMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowUdpSrcPortMetricTag struct { + obj *patternFlowUdpSrcPortMetricTag +} + +type unMarshalPatternFlowUdpSrcPortMetricTag interface { + // FromProto unmarshals PatternFlowUdpSrcPortMetricTag from protobuf object *otg.PatternFlowUdpSrcPortMetricTag + FromProto(msg *otg.PatternFlowUdpSrcPortMetricTag) (PatternFlowUdpSrcPortMetricTag, error) + // FromPbText unmarshals PatternFlowUdpSrcPortMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowUdpSrcPortMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowUdpSrcPortMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowUdpSrcPortMetricTag) Marshal() marshalPatternFlowUdpSrcPortMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowUdpSrcPortMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowUdpSrcPortMetricTag) Unmarshal() unMarshalPatternFlowUdpSrcPortMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowUdpSrcPortMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowUdpSrcPortMetricTag) ToProto() (*otg.PatternFlowUdpSrcPortMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowUdpSrcPortMetricTag) FromProto(msg *otg.PatternFlowUdpSrcPortMetricTag) (PatternFlowUdpSrcPortMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowUdpSrcPortMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowUdpSrcPortMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowUdpSrcPortMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpSrcPortMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowUdpSrcPortMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpSrcPortMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowUdpSrcPortMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowUdpSrcPortMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowUdpSrcPortMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowUdpSrcPortMetricTag) Clone() (PatternFlowUdpSrcPortMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowUdpSrcPortMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowUdpSrcPortMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowUdpSrcPortMetricTag interface { + Validation + // msg marshals PatternFlowUdpSrcPortMetricTag to protobuf object *otg.PatternFlowUdpSrcPortMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowUdpSrcPortMetricTag + // setMsg unmarshals PatternFlowUdpSrcPortMetricTag from protobuf object *otg.PatternFlowUdpSrcPortMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowUdpSrcPortMetricTag) PatternFlowUdpSrcPortMetricTag + // provides marshal interface + Marshal() marshalPatternFlowUdpSrcPortMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowUdpSrcPortMetricTag + // validate validates PatternFlowUdpSrcPortMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowUdpSrcPortMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowUdpSrcPortMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowUdpSrcPortMetricTag + SetName(value string) PatternFlowUdpSrcPortMetricTag + // Offset returns uint32, set in PatternFlowUdpSrcPortMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowUdpSrcPortMetricTag + SetOffset(value uint32) PatternFlowUdpSrcPortMetricTag + // HasOffset checks if Offset has been set in PatternFlowUdpSrcPortMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowUdpSrcPortMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowUdpSrcPortMetricTag + SetLength(value uint32) PatternFlowUdpSrcPortMetricTag + // HasLength checks if Length has been set in PatternFlowUdpSrcPortMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowUdpSrcPortMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowUdpSrcPortMetricTag object +func (obj *patternFlowUdpSrcPortMetricTag) SetName(value string) PatternFlowUdpSrcPortMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowUdpSrcPortMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowUdpSrcPortMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowUdpSrcPortMetricTag object +func (obj *patternFlowUdpSrcPortMetricTag) SetOffset(value uint32) PatternFlowUdpSrcPortMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowUdpSrcPortMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowUdpSrcPortMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowUdpSrcPortMetricTag object +func (obj *patternFlowUdpSrcPortMetricTag) SetLength(value uint32) PatternFlowUdpSrcPortMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowUdpSrcPortMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowUdpSrcPortMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpSrcPortMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowUdpSrcPortMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowUdpSrcPortMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_udp_src_port_random.go b/gosnappi/pattern_flow_udp_src_port_random.go new file mode 100644 index 00000000..1db16a2c --- /dev/null +++ b/gosnappi/pattern_flow_udp_src_port_random.go @@ -0,0 +1,422 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowUdpSrcPortRandom ***** +type patternFlowUdpSrcPortRandom struct { + validation + obj *otg.PatternFlowUdpSrcPortRandom + marshaller marshalPatternFlowUdpSrcPortRandom + unMarshaller unMarshalPatternFlowUdpSrcPortRandom +} + +func NewPatternFlowUdpSrcPortRandom() PatternFlowUdpSrcPortRandom { + obj := patternFlowUdpSrcPortRandom{obj: &otg.PatternFlowUdpSrcPortRandom{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowUdpSrcPortRandom) msg() *otg.PatternFlowUdpSrcPortRandom { + return obj.obj +} + +func (obj *patternFlowUdpSrcPortRandom) setMsg(msg *otg.PatternFlowUdpSrcPortRandom) PatternFlowUdpSrcPortRandom { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowUdpSrcPortRandom struct { + obj *patternFlowUdpSrcPortRandom +} + +type marshalPatternFlowUdpSrcPortRandom interface { + // ToProto marshals PatternFlowUdpSrcPortRandom to protobuf object *otg.PatternFlowUdpSrcPortRandom + ToProto() (*otg.PatternFlowUdpSrcPortRandom, error) + // ToPbText marshals PatternFlowUdpSrcPortRandom to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowUdpSrcPortRandom to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowUdpSrcPortRandom to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowUdpSrcPortRandom struct { + obj *patternFlowUdpSrcPortRandom +} + +type unMarshalPatternFlowUdpSrcPortRandom interface { + // FromProto unmarshals PatternFlowUdpSrcPortRandom from protobuf object *otg.PatternFlowUdpSrcPortRandom + FromProto(msg *otg.PatternFlowUdpSrcPortRandom) (PatternFlowUdpSrcPortRandom, error) + // FromPbText unmarshals PatternFlowUdpSrcPortRandom from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowUdpSrcPortRandom from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowUdpSrcPortRandom from JSON text + FromJson(value string) error +} + +func (obj *patternFlowUdpSrcPortRandom) Marshal() marshalPatternFlowUdpSrcPortRandom { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowUdpSrcPortRandom{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowUdpSrcPortRandom) Unmarshal() unMarshalPatternFlowUdpSrcPortRandom { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowUdpSrcPortRandom{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowUdpSrcPortRandom) ToProto() (*otg.PatternFlowUdpSrcPortRandom, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowUdpSrcPortRandom) FromProto(msg *otg.PatternFlowUdpSrcPortRandom) (PatternFlowUdpSrcPortRandom, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowUdpSrcPortRandom) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowUdpSrcPortRandom) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowUdpSrcPortRandom) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpSrcPortRandom) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowUdpSrcPortRandom) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowUdpSrcPortRandom) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowUdpSrcPortRandom) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowUdpSrcPortRandom) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowUdpSrcPortRandom) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowUdpSrcPortRandom) Clone() (PatternFlowUdpSrcPortRandom, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowUdpSrcPortRandom() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowUdpSrcPortRandom is integer random pattern +type PatternFlowUdpSrcPortRandom interface { + Validation + // msg marshals PatternFlowUdpSrcPortRandom to protobuf object *otg.PatternFlowUdpSrcPortRandom + // and doesn't set defaults + msg() *otg.PatternFlowUdpSrcPortRandom + // setMsg unmarshals PatternFlowUdpSrcPortRandom from protobuf object *otg.PatternFlowUdpSrcPortRandom + // and doesn't set defaults + setMsg(*otg.PatternFlowUdpSrcPortRandom) PatternFlowUdpSrcPortRandom + // provides marshal interface + Marshal() marshalPatternFlowUdpSrcPortRandom + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowUdpSrcPortRandom + // validate validates PatternFlowUdpSrcPortRandom + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowUdpSrcPortRandom, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Min returns uint32, set in PatternFlowUdpSrcPortRandom. + Min() uint32 + // SetMin assigns uint32 provided by user to PatternFlowUdpSrcPortRandom + SetMin(value uint32) PatternFlowUdpSrcPortRandom + // HasMin checks if Min has been set in PatternFlowUdpSrcPortRandom + HasMin() bool + // Max returns uint32, set in PatternFlowUdpSrcPortRandom. + Max() uint32 + // SetMax assigns uint32 provided by user to PatternFlowUdpSrcPortRandom + SetMax(value uint32) PatternFlowUdpSrcPortRandom + // HasMax checks if Max has been set in PatternFlowUdpSrcPortRandom + HasMax() bool + // Seed returns uint32, set in PatternFlowUdpSrcPortRandom. + Seed() uint32 + // SetSeed assigns uint32 provided by user to PatternFlowUdpSrcPortRandom + SetSeed(value uint32) PatternFlowUdpSrcPortRandom + // HasSeed checks if Seed has been set in PatternFlowUdpSrcPortRandom + HasSeed() bool + // Count returns uint32, set in PatternFlowUdpSrcPortRandom. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowUdpSrcPortRandom + SetCount(value uint32) PatternFlowUdpSrcPortRandom + // HasCount checks if Count has been set in PatternFlowUdpSrcPortRandom + HasCount() bool +} + +// The minimum possible value generated by the random value generator. +// Min returns a uint32 +func (obj *patternFlowUdpSrcPortRandom) Min() uint32 { + + return *obj.obj.Min + +} + +// The minimum possible value generated by the random value generator. +// Min returns a uint32 +func (obj *patternFlowUdpSrcPortRandom) HasMin() bool { + return obj.obj.Min != nil +} + +// The minimum possible value generated by the random value generator. +// SetMin sets the uint32 value in the PatternFlowUdpSrcPortRandom object +func (obj *patternFlowUdpSrcPortRandom) SetMin(value uint32) PatternFlowUdpSrcPortRandom { + + obj.obj.Min = &value + return obj +} + +// The maximum possible value generated by the random value generator. +// Max returns a uint32 +func (obj *patternFlowUdpSrcPortRandom) Max() uint32 { + + return *obj.obj.Max + +} + +// The maximum possible value generated by the random value generator. +// Max returns a uint32 +func (obj *patternFlowUdpSrcPortRandom) HasMax() bool { + return obj.obj.Max != nil +} + +// The maximum possible value generated by the random value generator. +// SetMax sets the uint32 value in the PatternFlowUdpSrcPortRandom object +func (obj *patternFlowUdpSrcPortRandom) SetMax(value uint32) PatternFlowUdpSrcPortRandom { + + obj.obj.Max = &value + return obj +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// Seed returns a uint32 +func (obj *patternFlowUdpSrcPortRandom) Seed() uint32 { + + return *obj.obj.Seed + +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// Seed returns a uint32 +func (obj *patternFlowUdpSrcPortRandom) HasSeed() bool { + return obj.obj.Seed != nil +} + +// The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). +// SetSeed sets the uint32 value in the PatternFlowUdpSrcPortRandom object +func (obj *patternFlowUdpSrcPortRandom) SetSeed(value uint32) PatternFlowUdpSrcPortRandom { + + obj.obj.Seed = &value + return obj +} + +// The total number of values to be generated by the random value generator. +// Count returns a uint32 +func (obj *patternFlowUdpSrcPortRandom) Count() uint32 { + + return *obj.obj.Count + +} + +// The total number of values to be generated by the random value generator. +// Count returns a uint32 +func (obj *patternFlowUdpSrcPortRandom) HasCount() bool { + return obj.obj.Count != nil +} + +// The total number of values to be generated by the random value generator. +// SetCount sets the uint32 value in the PatternFlowUdpSrcPortRandom object +func (obj *patternFlowUdpSrcPortRandom) SetCount(value uint32) PatternFlowUdpSrcPortRandom { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowUdpSrcPortRandom) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Min != nil { + + if *obj.obj.Min > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpSrcPortRandom.Min <= 65535 but Got %d", *obj.obj.Min)) + } + + } + + if obj.obj.Max != nil { + + if *obj.obj.Max > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowUdpSrcPortRandom.Max <= 65535 but Got %d", *obj.obj.Max)) + } + + } + +} + +func (obj *patternFlowUdpSrcPortRandom) setDefault() { + if obj.obj.Min == nil { + obj.SetMin(0) + } + if obj.obj.Max == nil { + obj.SetMax(65535) + } + if obj.obj.Seed == nil { + obj.SetSeed(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_vlan_cfi.go b/gosnappi/pattern_flow_vlan_cfi.go new file mode 100644 index 00000000..d0bb6631 --- /dev/null +++ b/gosnappi/pattern_flow_vlan_cfi.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVlanCfi ***** +type patternFlowVlanCfi struct { + validation + obj *otg.PatternFlowVlanCfi + marshaller marshalPatternFlowVlanCfi + unMarshaller unMarshalPatternFlowVlanCfi + incrementHolder PatternFlowVlanCfiCounter + decrementHolder PatternFlowVlanCfiCounter + metricTagsHolder PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter +} + +func NewPatternFlowVlanCfi() PatternFlowVlanCfi { + obj := patternFlowVlanCfi{obj: &otg.PatternFlowVlanCfi{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVlanCfi) msg() *otg.PatternFlowVlanCfi { + return obj.obj +} + +func (obj *patternFlowVlanCfi) setMsg(msg *otg.PatternFlowVlanCfi) PatternFlowVlanCfi { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVlanCfi struct { + obj *patternFlowVlanCfi +} + +type marshalPatternFlowVlanCfi interface { + // ToProto marshals PatternFlowVlanCfi to protobuf object *otg.PatternFlowVlanCfi + ToProto() (*otg.PatternFlowVlanCfi, error) + // ToPbText marshals PatternFlowVlanCfi to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVlanCfi to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVlanCfi to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVlanCfi struct { + obj *patternFlowVlanCfi +} + +type unMarshalPatternFlowVlanCfi interface { + // FromProto unmarshals PatternFlowVlanCfi from protobuf object *otg.PatternFlowVlanCfi + FromProto(msg *otg.PatternFlowVlanCfi) (PatternFlowVlanCfi, error) + // FromPbText unmarshals PatternFlowVlanCfi from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVlanCfi from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVlanCfi from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVlanCfi) Marshal() marshalPatternFlowVlanCfi { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVlanCfi{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVlanCfi) Unmarshal() unMarshalPatternFlowVlanCfi { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVlanCfi{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVlanCfi) ToProto() (*otg.PatternFlowVlanCfi, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVlanCfi) FromProto(msg *otg.PatternFlowVlanCfi) (PatternFlowVlanCfi, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVlanCfi) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVlanCfi) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVlanCfi) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanCfi) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVlanCfi) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanCfi) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVlanCfi) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVlanCfi) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVlanCfi) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVlanCfi) Clone() (PatternFlowVlanCfi, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVlanCfi() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowVlanCfi) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowVlanCfi is canonical format indicator or drop elegible indicator +type PatternFlowVlanCfi interface { + Validation + // msg marshals PatternFlowVlanCfi to protobuf object *otg.PatternFlowVlanCfi + // and doesn't set defaults + msg() *otg.PatternFlowVlanCfi + // setMsg unmarshals PatternFlowVlanCfi from protobuf object *otg.PatternFlowVlanCfi + // and doesn't set defaults + setMsg(*otg.PatternFlowVlanCfi) PatternFlowVlanCfi + // provides marshal interface + Marshal() marshalPatternFlowVlanCfi + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVlanCfi + // validate validates PatternFlowVlanCfi + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVlanCfi, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowVlanCfiChoiceEnum, set in PatternFlowVlanCfi + Choice() PatternFlowVlanCfiChoiceEnum + // setChoice assigns PatternFlowVlanCfiChoiceEnum provided by user to PatternFlowVlanCfi + setChoice(value PatternFlowVlanCfiChoiceEnum) PatternFlowVlanCfi + // HasChoice checks if Choice has been set in PatternFlowVlanCfi + HasChoice() bool + // Value returns uint32, set in PatternFlowVlanCfi. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowVlanCfi + SetValue(value uint32) PatternFlowVlanCfi + // HasValue checks if Value has been set in PatternFlowVlanCfi + HasValue() bool + // Values returns []uint32, set in PatternFlowVlanCfi. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowVlanCfi + SetValues(value []uint32) PatternFlowVlanCfi + // Increment returns PatternFlowVlanCfiCounter, set in PatternFlowVlanCfi. + // PatternFlowVlanCfiCounter is integer counter pattern + Increment() PatternFlowVlanCfiCounter + // SetIncrement assigns PatternFlowVlanCfiCounter provided by user to PatternFlowVlanCfi. + // PatternFlowVlanCfiCounter is integer counter pattern + SetIncrement(value PatternFlowVlanCfiCounter) PatternFlowVlanCfi + // HasIncrement checks if Increment has been set in PatternFlowVlanCfi + HasIncrement() bool + // Decrement returns PatternFlowVlanCfiCounter, set in PatternFlowVlanCfi. + // PatternFlowVlanCfiCounter is integer counter pattern + Decrement() PatternFlowVlanCfiCounter + // SetDecrement assigns PatternFlowVlanCfiCounter provided by user to PatternFlowVlanCfi. + // PatternFlowVlanCfiCounter is integer counter pattern + SetDecrement(value PatternFlowVlanCfiCounter) PatternFlowVlanCfi + // HasDecrement checks if Decrement has been set in PatternFlowVlanCfi + HasDecrement() bool + // MetricTags returns PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIterIter, set in PatternFlowVlanCfi + MetricTags() PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter + setNil() +} + +type PatternFlowVlanCfiChoiceEnum string + +// Enum of Choice on PatternFlowVlanCfi +var PatternFlowVlanCfiChoice = struct { + VALUE PatternFlowVlanCfiChoiceEnum + VALUES PatternFlowVlanCfiChoiceEnum + INCREMENT PatternFlowVlanCfiChoiceEnum + DECREMENT PatternFlowVlanCfiChoiceEnum +}{ + VALUE: PatternFlowVlanCfiChoiceEnum("value"), + VALUES: PatternFlowVlanCfiChoiceEnum("values"), + INCREMENT: PatternFlowVlanCfiChoiceEnum("increment"), + DECREMENT: PatternFlowVlanCfiChoiceEnum("decrement"), +} + +func (obj *patternFlowVlanCfi) Choice() PatternFlowVlanCfiChoiceEnum { + return PatternFlowVlanCfiChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowVlanCfi) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowVlanCfi) setChoice(value PatternFlowVlanCfiChoiceEnum) PatternFlowVlanCfi { + intValue, ok := otg.PatternFlowVlanCfi_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowVlanCfiChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowVlanCfi_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowVlanCfiChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowVlanCfiChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowVlanCfiChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowVlanCfiCounter().msg() + } + + if value == PatternFlowVlanCfiChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowVlanCfiCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVlanCfi) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowVlanCfiChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVlanCfi) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowVlanCfi object +func (obj *patternFlowVlanCfi) SetValue(value uint32) PatternFlowVlanCfi { + obj.setChoice(PatternFlowVlanCfiChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowVlanCfi) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowVlanCfi object +func (obj *patternFlowVlanCfi) SetValues(value []uint32) PatternFlowVlanCfi { + obj.setChoice(PatternFlowVlanCfiChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowVlanCfiCounter +func (obj *patternFlowVlanCfi) Increment() PatternFlowVlanCfiCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowVlanCfiChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowVlanCfiCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowVlanCfiCounter +func (obj *patternFlowVlanCfi) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowVlanCfiCounter value in the PatternFlowVlanCfi object +func (obj *patternFlowVlanCfi) SetIncrement(value PatternFlowVlanCfiCounter) PatternFlowVlanCfi { + obj.setChoice(PatternFlowVlanCfiChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowVlanCfiCounter +func (obj *patternFlowVlanCfi) Decrement() PatternFlowVlanCfiCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowVlanCfiChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowVlanCfiCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowVlanCfiCounter +func (obj *patternFlowVlanCfi) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowVlanCfiCounter value in the PatternFlowVlanCfi object +func (obj *patternFlowVlanCfi) SetDecrement(value PatternFlowVlanCfiCounter) PatternFlowVlanCfi { + obj.setChoice(PatternFlowVlanCfiChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowVlanCfiMetricTag +func (obj *patternFlowVlanCfi) MetricTags() PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowVlanCfiMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowVlanCfiPatternFlowVlanCfiMetricTagIter struct { + obj *patternFlowVlanCfi + patternFlowVlanCfiMetricTagSlice []PatternFlowVlanCfiMetricTag + fieldPtr *[]*otg.PatternFlowVlanCfiMetricTag +} + +func newPatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter(ptr *[]*otg.PatternFlowVlanCfiMetricTag) PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter { + return &patternFlowVlanCfiPatternFlowVlanCfiMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter interface { + setMsg(*patternFlowVlanCfi) PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter + Items() []PatternFlowVlanCfiMetricTag + Add() PatternFlowVlanCfiMetricTag + Append(items ...PatternFlowVlanCfiMetricTag) PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter + Set(index int, newObj PatternFlowVlanCfiMetricTag) PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter + Clear() PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter + clearHolderSlice() PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter + appendHolderSlice(item PatternFlowVlanCfiMetricTag) PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter +} + +func (obj *patternFlowVlanCfiPatternFlowVlanCfiMetricTagIter) setMsg(msg *patternFlowVlanCfi) PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowVlanCfiMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowVlanCfiPatternFlowVlanCfiMetricTagIter) Items() []PatternFlowVlanCfiMetricTag { + return obj.patternFlowVlanCfiMetricTagSlice +} + +func (obj *patternFlowVlanCfiPatternFlowVlanCfiMetricTagIter) Add() PatternFlowVlanCfiMetricTag { + newObj := &otg.PatternFlowVlanCfiMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowVlanCfiMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowVlanCfiMetricTagSlice = append(obj.patternFlowVlanCfiMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowVlanCfiPatternFlowVlanCfiMetricTagIter) Append(items ...PatternFlowVlanCfiMetricTag) PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowVlanCfiMetricTagSlice = append(obj.patternFlowVlanCfiMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowVlanCfiPatternFlowVlanCfiMetricTagIter) Set(index int, newObj PatternFlowVlanCfiMetricTag) PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowVlanCfiMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowVlanCfiPatternFlowVlanCfiMetricTagIter) Clear() PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowVlanCfiMetricTag{} + obj.patternFlowVlanCfiMetricTagSlice = []PatternFlowVlanCfiMetricTag{} + } + return obj +} +func (obj *patternFlowVlanCfiPatternFlowVlanCfiMetricTagIter) clearHolderSlice() PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter { + if len(obj.patternFlowVlanCfiMetricTagSlice) > 0 { + obj.patternFlowVlanCfiMetricTagSlice = []PatternFlowVlanCfiMetricTag{} + } + return obj +} +func (obj *patternFlowVlanCfiPatternFlowVlanCfiMetricTagIter) appendHolderSlice(item PatternFlowVlanCfiMetricTag) PatternFlowVlanCfiPatternFlowVlanCfiMetricTagIter { + obj.patternFlowVlanCfiMetricTagSlice = append(obj.patternFlowVlanCfiMetricTagSlice, item) + return obj +} + +func (obj *patternFlowVlanCfi) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanCfi.Value <= 1 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowVlanCfi.Values <= 1 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowVlanCfiMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowVlanCfi) setDefault() { + var choices_set int = 0 + var choice PatternFlowVlanCfiChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowVlanCfiChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowVlanCfiChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowVlanCfiChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowVlanCfiChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowVlanCfiChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowVlanCfi") + } + } else { + intVal := otg.PatternFlowVlanCfi_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowVlanCfi_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_vlan_cfi_counter.go b/gosnappi/pattern_flow_vlan_cfi_counter.go new file mode 100644 index 00000000..370eaf37 --- /dev/null +++ b/gosnappi/pattern_flow_vlan_cfi_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVlanCfiCounter ***** +type patternFlowVlanCfiCounter struct { + validation + obj *otg.PatternFlowVlanCfiCounter + marshaller marshalPatternFlowVlanCfiCounter + unMarshaller unMarshalPatternFlowVlanCfiCounter +} + +func NewPatternFlowVlanCfiCounter() PatternFlowVlanCfiCounter { + obj := patternFlowVlanCfiCounter{obj: &otg.PatternFlowVlanCfiCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVlanCfiCounter) msg() *otg.PatternFlowVlanCfiCounter { + return obj.obj +} + +func (obj *patternFlowVlanCfiCounter) setMsg(msg *otg.PatternFlowVlanCfiCounter) PatternFlowVlanCfiCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVlanCfiCounter struct { + obj *patternFlowVlanCfiCounter +} + +type marshalPatternFlowVlanCfiCounter interface { + // ToProto marshals PatternFlowVlanCfiCounter to protobuf object *otg.PatternFlowVlanCfiCounter + ToProto() (*otg.PatternFlowVlanCfiCounter, error) + // ToPbText marshals PatternFlowVlanCfiCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVlanCfiCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVlanCfiCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVlanCfiCounter struct { + obj *patternFlowVlanCfiCounter +} + +type unMarshalPatternFlowVlanCfiCounter interface { + // FromProto unmarshals PatternFlowVlanCfiCounter from protobuf object *otg.PatternFlowVlanCfiCounter + FromProto(msg *otg.PatternFlowVlanCfiCounter) (PatternFlowVlanCfiCounter, error) + // FromPbText unmarshals PatternFlowVlanCfiCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVlanCfiCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVlanCfiCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVlanCfiCounter) Marshal() marshalPatternFlowVlanCfiCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVlanCfiCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVlanCfiCounter) Unmarshal() unMarshalPatternFlowVlanCfiCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVlanCfiCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVlanCfiCounter) ToProto() (*otg.PatternFlowVlanCfiCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVlanCfiCounter) FromProto(msg *otg.PatternFlowVlanCfiCounter) (PatternFlowVlanCfiCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVlanCfiCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVlanCfiCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVlanCfiCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanCfiCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVlanCfiCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanCfiCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVlanCfiCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVlanCfiCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVlanCfiCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVlanCfiCounter) Clone() (PatternFlowVlanCfiCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVlanCfiCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVlanCfiCounter is integer counter pattern +type PatternFlowVlanCfiCounter interface { + Validation + // msg marshals PatternFlowVlanCfiCounter to protobuf object *otg.PatternFlowVlanCfiCounter + // and doesn't set defaults + msg() *otg.PatternFlowVlanCfiCounter + // setMsg unmarshals PatternFlowVlanCfiCounter from protobuf object *otg.PatternFlowVlanCfiCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowVlanCfiCounter) PatternFlowVlanCfiCounter + // provides marshal interface + Marshal() marshalPatternFlowVlanCfiCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVlanCfiCounter + // validate validates PatternFlowVlanCfiCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVlanCfiCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowVlanCfiCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowVlanCfiCounter + SetStart(value uint32) PatternFlowVlanCfiCounter + // HasStart checks if Start has been set in PatternFlowVlanCfiCounter + HasStart() bool + // Step returns uint32, set in PatternFlowVlanCfiCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowVlanCfiCounter + SetStep(value uint32) PatternFlowVlanCfiCounter + // HasStep checks if Step has been set in PatternFlowVlanCfiCounter + HasStep() bool + // Count returns uint32, set in PatternFlowVlanCfiCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowVlanCfiCounter + SetCount(value uint32) PatternFlowVlanCfiCounter + // HasCount checks if Count has been set in PatternFlowVlanCfiCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVlanCfiCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVlanCfiCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowVlanCfiCounter object +func (obj *patternFlowVlanCfiCounter) SetStart(value uint32) PatternFlowVlanCfiCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVlanCfiCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVlanCfiCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowVlanCfiCounter object +func (obj *patternFlowVlanCfiCounter) SetStep(value uint32) PatternFlowVlanCfiCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVlanCfiCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVlanCfiCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowVlanCfiCounter object +func (obj *patternFlowVlanCfiCounter) SetCount(value uint32) PatternFlowVlanCfiCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowVlanCfiCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanCfiCounter.Start <= 1 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanCfiCounter.Step <= 1 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanCfiCounter.Count <= 1 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowVlanCfiCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_vlan_cfi_metric_tag.go b/gosnappi/pattern_flow_vlan_cfi_metric_tag.go new file mode 100644 index 00000000..f3976ac3 --- /dev/null +++ b/gosnappi/pattern_flow_vlan_cfi_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVlanCfiMetricTag ***** +type patternFlowVlanCfiMetricTag struct { + validation + obj *otg.PatternFlowVlanCfiMetricTag + marshaller marshalPatternFlowVlanCfiMetricTag + unMarshaller unMarshalPatternFlowVlanCfiMetricTag +} + +func NewPatternFlowVlanCfiMetricTag() PatternFlowVlanCfiMetricTag { + obj := patternFlowVlanCfiMetricTag{obj: &otg.PatternFlowVlanCfiMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVlanCfiMetricTag) msg() *otg.PatternFlowVlanCfiMetricTag { + return obj.obj +} + +func (obj *patternFlowVlanCfiMetricTag) setMsg(msg *otg.PatternFlowVlanCfiMetricTag) PatternFlowVlanCfiMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVlanCfiMetricTag struct { + obj *patternFlowVlanCfiMetricTag +} + +type marshalPatternFlowVlanCfiMetricTag interface { + // ToProto marshals PatternFlowVlanCfiMetricTag to protobuf object *otg.PatternFlowVlanCfiMetricTag + ToProto() (*otg.PatternFlowVlanCfiMetricTag, error) + // ToPbText marshals PatternFlowVlanCfiMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVlanCfiMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVlanCfiMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVlanCfiMetricTag struct { + obj *patternFlowVlanCfiMetricTag +} + +type unMarshalPatternFlowVlanCfiMetricTag interface { + // FromProto unmarshals PatternFlowVlanCfiMetricTag from protobuf object *otg.PatternFlowVlanCfiMetricTag + FromProto(msg *otg.PatternFlowVlanCfiMetricTag) (PatternFlowVlanCfiMetricTag, error) + // FromPbText unmarshals PatternFlowVlanCfiMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVlanCfiMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVlanCfiMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVlanCfiMetricTag) Marshal() marshalPatternFlowVlanCfiMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVlanCfiMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVlanCfiMetricTag) Unmarshal() unMarshalPatternFlowVlanCfiMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVlanCfiMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVlanCfiMetricTag) ToProto() (*otg.PatternFlowVlanCfiMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVlanCfiMetricTag) FromProto(msg *otg.PatternFlowVlanCfiMetricTag) (PatternFlowVlanCfiMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVlanCfiMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVlanCfiMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVlanCfiMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanCfiMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVlanCfiMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanCfiMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVlanCfiMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVlanCfiMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVlanCfiMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVlanCfiMetricTag) Clone() (PatternFlowVlanCfiMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVlanCfiMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVlanCfiMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowVlanCfiMetricTag interface { + Validation + // msg marshals PatternFlowVlanCfiMetricTag to protobuf object *otg.PatternFlowVlanCfiMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowVlanCfiMetricTag + // setMsg unmarshals PatternFlowVlanCfiMetricTag from protobuf object *otg.PatternFlowVlanCfiMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowVlanCfiMetricTag) PatternFlowVlanCfiMetricTag + // provides marshal interface + Marshal() marshalPatternFlowVlanCfiMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVlanCfiMetricTag + // validate validates PatternFlowVlanCfiMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVlanCfiMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowVlanCfiMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowVlanCfiMetricTag + SetName(value string) PatternFlowVlanCfiMetricTag + // Offset returns uint32, set in PatternFlowVlanCfiMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowVlanCfiMetricTag + SetOffset(value uint32) PatternFlowVlanCfiMetricTag + // HasOffset checks if Offset has been set in PatternFlowVlanCfiMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowVlanCfiMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowVlanCfiMetricTag + SetLength(value uint32) PatternFlowVlanCfiMetricTag + // HasLength checks if Length has been set in PatternFlowVlanCfiMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowVlanCfiMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowVlanCfiMetricTag object +func (obj *patternFlowVlanCfiMetricTag) SetName(value string) PatternFlowVlanCfiMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVlanCfiMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVlanCfiMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowVlanCfiMetricTag object +func (obj *patternFlowVlanCfiMetricTag) SetOffset(value uint32) PatternFlowVlanCfiMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVlanCfiMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVlanCfiMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowVlanCfiMetricTag object +func (obj *patternFlowVlanCfiMetricTag) SetLength(value uint32) PatternFlowVlanCfiMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowVlanCfiMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowVlanCfiMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 0 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanCfiMetricTag.Offset <= 0 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 1 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowVlanCfiMetricTag.Length <= 1 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowVlanCfiMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(1) + } + +} diff --git a/gosnappi/pattern_flow_vlan_id.go b/gosnappi/pattern_flow_vlan_id.go new file mode 100644 index 00000000..8cb8bf53 --- /dev/null +++ b/gosnappi/pattern_flow_vlan_id.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVlanId ***** +type patternFlowVlanId struct { + validation + obj *otg.PatternFlowVlanId + marshaller marshalPatternFlowVlanId + unMarshaller unMarshalPatternFlowVlanId + incrementHolder PatternFlowVlanIdCounter + decrementHolder PatternFlowVlanIdCounter + metricTagsHolder PatternFlowVlanIdPatternFlowVlanIdMetricTagIter +} + +func NewPatternFlowVlanId() PatternFlowVlanId { + obj := patternFlowVlanId{obj: &otg.PatternFlowVlanId{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVlanId) msg() *otg.PatternFlowVlanId { + return obj.obj +} + +func (obj *patternFlowVlanId) setMsg(msg *otg.PatternFlowVlanId) PatternFlowVlanId { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVlanId struct { + obj *patternFlowVlanId +} + +type marshalPatternFlowVlanId interface { + // ToProto marshals PatternFlowVlanId to protobuf object *otg.PatternFlowVlanId + ToProto() (*otg.PatternFlowVlanId, error) + // ToPbText marshals PatternFlowVlanId to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVlanId to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVlanId to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVlanId struct { + obj *patternFlowVlanId +} + +type unMarshalPatternFlowVlanId interface { + // FromProto unmarshals PatternFlowVlanId from protobuf object *otg.PatternFlowVlanId + FromProto(msg *otg.PatternFlowVlanId) (PatternFlowVlanId, error) + // FromPbText unmarshals PatternFlowVlanId from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVlanId from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVlanId from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVlanId) Marshal() marshalPatternFlowVlanId { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVlanId{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVlanId) Unmarshal() unMarshalPatternFlowVlanId { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVlanId{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVlanId) ToProto() (*otg.PatternFlowVlanId, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVlanId) FromProto(msg *otg.PatternFlowVlanId) (PatternFlowVlanId, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVlanId) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVlanId) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVlanId) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanId) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVlanId) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanId) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVlanId) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVlanId) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVlanId) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVlanId) Clone() (PatternFlowVlanId, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVlanId() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowVlanId) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowVlanId is vlan identifier +type PatternFlowVlanId interface { + Validation + // msg marshals PatternFlowVlanId to protobuf object *otg.PatternFlowVlanId + // and doesn't set defaults + msg() *otg.PatternFlowVlanId + // setMsg unmarshals PatternFlowVlanId from protobuf object *otg.PatternFlowVlanId + // and doesn't set defaults + setMsg(*otg.PatternFlowVlanId) PatternFlowVlanId + // provides marshal interface + Marshal() marshalPatternFlowVlanId + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVlanId + // validate validates PatternFlowVlanId + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVlanId, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowVlanIdChoiceEnum, set in PatternFlowVlanId + Choice() PatternFlowVlanIdChoiceEnum + // setChoice assigns PatternFlowVlanIdChoiceEnum provided by user to PatternFlowVlanId + setChoice(value PatternFlowVlanIdChoiceEnum) PatternFlowVlanId + // HasChoice checks if Choice has been set in PatternFlowVlanId + HasChoice() bool + // Value returns uint32, set in PatternFlowVlanId. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowVlanId + SetValue(value uint32) PatternFlowVlanId + // HasValue checks if Value has been set in PatternFlowVlanId + HasValue() bool + // Values returns []uint32, set in PatternFlowVlanId. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowVlanId + SetValues(value []uint32) PatternFlowVlanId + // Increment returns PatternFlowVlanIdCounter, set in PatternFlowVlanId. + // PatternFlowVlanIdCounter is integer counter pattern + Increment() PatternFlowVlanIdCounter + // SetIncrement assigns PatternFlowVlanIdCounter provided by user to PatternFlowVlanId. + // PatternFlowVlanIdCounter is integer counter pattern + SetIncrement(value PatternFlowVlanIdCounter) PatternFlowVlanId + // HasIncrement checks if Increment has been set in PatternFlowVlanId + HasIncrement() bool + // Decrement returns PatternFlowVlanIdCounter, set in PatternFlowVlanId. + // PatternFlowVlanIdCounter is integer counter pattern + Decrement() PatternFlowVlanIdCounter + // SetDecrement assigns PatternFlowVlanIdCounter provided by user to PatternFlowVlanId. + // PatternFlowVlanIdCounter is integer counter pattern + SetDecrement(value PatternFlowVlanIdCounter) PatternFlowVlanId + // HasDecrement checks if Decrement has been set in PatternFlowVlanId + HasDecrement() bool + // MetricTags returns PatternFlowVlanIdPatternFlowVlanIdMetricTagIterIter, set in PatternFlowVlanId + MetricTags() PatternFlowVlanIdPatternFlowVlanIdMetricTagIter + setNil() +} + +type PatternFlowVlanIdChoiceEnum string + +// Enum of Choice on PatternFlowVlanId +var PatternFlowVlanIdChoice = struct { + VALUE PatternFlowVlanIdChoiceEnum + VALUES PatternFlowVlanIdChoiceEnum + INCREMENT PatternFlowVlanIdChoiceEnum + DECREMENT PatternFlowVlanIdChoiceEnum +}{ + VALUE: PatternFlowVlanIdChoiceEnum("value"), + VALUES: PatternFlowVlanIdChoiceEnum("values"), + INCREMENT: PatternFlowVlanIdChoiceEnum("increment"), + DECREMENT: PatternFlowVlanIdChoiceEnum("decrement"), +} + +func (obj *patternFlowVlanId) Choice() PatternFlowVlanIdChoiceEnum { + return PatternFlowVlanIdChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowVlanId) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowVlanId) setChoice(value PatternFlowVlanIdChoiceEnum) PatternFlowVlanId { + intValue, ok := otg.PatternFlowVlanId_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowVlanIdChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowVlanId_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowVlanIdChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowVlanIdChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowVlanIdChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowVlanIdCounter().msg() + } + + if value == PatternFlowVlanIdChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowVlanIdCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVlanId) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowVlanIdChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVlanId) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowVlanId object +func (obj *patternFlowVlanId) SetValue(value uint32) PatternFlowVlanId { + obj.setChoice(PatternFlowVlanIdChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowVlanId) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowVlanId object +func (obj *patternFlowVlanId) SetValues(value []uint32) PatternFlowVlanId { + obj.setChoice(PatternFlowVlanIdChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowVlanIdCounter +func (obj *patternFlowVlanId) Increment() PatternFlowVlanIdCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowVlanIdChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowVlanIdCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowVlanIdCounter +func (obj *patternFlowVlanId) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowVlanIdCounter value in the PatternFlowVlanId object +func (obj *patternFlowVlanId) SetIncrement(value PatternFlowVlanIdCounter) PatternFlowVlanId { + obj.setChoice(PatternFlowVlanIdChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowVlanIdCounter +func (obj *patternFlowVlanId) Decrement() PatternFlowVlanIdCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowVlanIdChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowVlanIdCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowVlanIdCounter +func (obj *patternFlowVlanId) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowVlanIdCounter value in the PatternFlowVlanId object +func (obj *patternFlowVlanId) SetDecrement(value PatternFlowVlanIdCounter) PatternFlowVlanId { + obj.setChoice(PatternFlowVlanIdChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowVlanIdMetricTag +func (obj *patternFlowVlanId) MetricTags() PatternFlowVlanIdPatternFlowVlanIdMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowVlanIdMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowVlanIdPatternFlowVlanIdMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowVlanIdPatternFlowVlanIdMetricTagIter struct { + obj *patternFlowVlanId + patternFlowVlanIdMetricTagSlice []PatternFlowVlanIdMetricTag + fieldPtr *[]*otg.PatternFlowVlanIdMetricTag +} + +func newPatternFlowVlanIdPatternFlowVlanIdMetricTagIter(ptr *[]*otg.PatternFlowVlanIdMetricTag) PatternFlowVlanIdPatternFlowVlanIdMetricTagIter { + return &patternFlowVlanIdPatternFlowVlanIdMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowVlanIdPatternFlowVlanIdMetricTagIter interface { + setMsg(*patternFlowVlanId) PatternFlowVlanIdPatternFlowVlanIdMetricTagIter + Items() []PatternFlowVlanIdMetricTag + Add() PatternFlowVlanIdMetricTag + Append(items ...PatternFlowVlanIdMetricTag) PatternFlowVlanIdPatternFlowVlanIdMetricTagIter + Set(index int, newObj PatternFlowVlanIdMetricTag) PatternFlowVlanIdPatternFlowVlanIdMetricTagIter + Clear() PatternFlowVlanIdPatternFlowVlanIdMetricTagIter + clearHolderSlice() PatternFlowVlanIdPatternFlowVlanIdMetricTagIter + appendHolderSlice(item PatternFlowVlanIdMetricTag) PatternFlowVlanIdPatternFlowVlanIdMetricTagIter +} + +func (obj *patternFlowVlanIdPatternFlowVlanIdMetricTagIter) setMsg(msg *patternFlowVlanId) PatternFlowVlanIdPatternFlowVlanIdMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowVlanIdMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowVlanIdPatternFlowVlanIdMetricTagIter) Items() []PatternFlowVlanIdMetricTag { + return obj.patternFlowVlanIdMetricTagSlice +} + +func (obj *patternFlowVlanIdPatternFlowVlanIdMetricTagIter) Add() PatternFlowVlanIdMetricTag { + newObj := &otg.PatternFlowVlanIdMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowVlanIdMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowVlanIdMetricTagSlice = append(obj.patternFlowVlanIdMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowVlanIdPatternFlowVlanIdMetricTagIter) Append(items ...PatternFlowVlanIdMetricTag) PatternFlowVlanIdPatternFlowVlanIdMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowVlanIdMetricTagSlice = append(obj.patternFlowVlanIdMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowVlanIdPatternFlowVlanIdMetricTagIter) Set(index int, newObj PatternFlowVlanIdMetricTag) PatternFlowVlanIdPatternFlowVlanIdMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowVlanIdMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowVlanIdPatternFlowVlanIdMetricTagIter) Clear() PatternFlowVlanIdPatternFlowVlanIdMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowVlanIdMetricTag{} + obj.patternFlowVlanIdMetricTagSlice = []PatternFlowVlanIdMetricTag{} + } + return obj +} +func (obj *patternFlowVlanIdPatternFlowVlanIdMetricTagIter) clearHolderSlice() PatternFlowVlanIdPatternFlowVlanIdMetricTagIter { + if len(obj.patternFlowVlanIdMetricTagSlice) > 0 { + obj.patternFlowVlanIdMetricTagSlice = []PatternFlowVlanIdMetricTag{} + } + return obj +} +func (obj *patternFlowVlanIdPatternFlowVlanIdMetricTagIter) appendHolderSlice(item PatternFlowVlanIdMetricTag) PatternFlowVlanIdPatternFlowVlanIdMetricTagIter { + obj.patternFlowVlanIdMetricTagSlice = append(obj.patternFlowVlanIdMetricTagSlice, item) + return obj +} + +func (obj *patternFlowVlanId) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanId.Value <= 4095 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowVlanId.Values <= 4095 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowVlanIdMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowVlanId) setDefault() { + var choices_set int = 0 + var choice PatternFlowVlanIdChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowVlanIdChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowVlanIdChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowVlanIdChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowVlanIdChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowVlanIdChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowVlanId") + } + } else { + intVal := otg.PatternFlowVlanId_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowVlanId_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_vlan_id_counter.go b/gosnappi/pattern_flow_vlan_id_counter.go new file mode 100644 index 00000000..0a1a71e9 --- /dev/null +++ b/gosnappi/pattern_flow_vlan_id_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVlanIdCounter ***** +type patternFlowVlanIdCounter struct { + validation + obj *otg.PatternFlowVlanIdCounter + marshaller marshalPatternFlowVlanIdCounter + unMarshaller unMarshalPatternFlowVlanIdCounter +} + +func NewPatternFlowVlanIdCounter() PatternFlowVlanIdCounter { + obj := patternFlowVlanIdCounter{obj: &otg.PatternFlowVlanIdCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVlanIdCounter) msg() *otg.PatternFlowVlanIdCounter { + return obj.obj +} + +func (obj *patternFlowVlanIdCounter) setMsg(msg *otg.PatternFlowVlanIdCounter) PatternFlowVlanIdCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVlanIdCounter struct { + obj *patternFlowVlanIdCounter +} + +type marshalPatternFlowVlanIdCounter interface { + // ToProto marshals PatternFlowVlanIdCounter to protobuf object *otg.PatternFlowVlanIdCounter + ToProto() (*otg.PatternFlowVlanIdCounter, error) + // ToPbText marshals PatternFlowVlanIdCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVlanIdCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVlanIdCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVlanIdCounter struct { + obj *patternFlowVlanIdCounter +} + +type unMarshalPatternFlowVlanIdCounter interface { + // FromProto unmarshals PatternFlowVlanIdCounter from protobuf object *otg.PatternFlowVlanIdCounter + FromProto(msg *otg.PatternFlowVlanIdCounter) (PatternFlowVlanIdCounter, error) + // FromPbText unmarshals PatternFlowVlanIdCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVlanIdCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVlanIdCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVlanIdCounter) Marshal() marshalPatternFlowVlanIdCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVlanIdCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVlanIdCounter) Unmarshal() unMarshalPatternFlowVlanIdCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVlanIdCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVlanIdCounter) ToProto() (*otg.PatternFlowVlanIdCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVlanIdCounter) FromProto(msg *otg.PatternFlowVlanIdCounter) (PatternFlowVlanIdCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVlanIdCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVlanIdCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVlanIdCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanIdCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVlanIdCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanIdCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVlanIdCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVlanIdCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVlanIdCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVlanIdCounter) Clone() (PatternFlowVlanIdCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVlanIdCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVlanIdCounter is integer counter pattern +type PatternFlowVlanIdCounter interface { + Validation + // msg marshals PatternFlowVlanIdCounter to protobuf object *otg.PatternFlowVlanIdCounter + // and doesn't set defaults + msg() *otg.PatternFlowVlanIdCounter + // setMsg unmarshals PatternFlowVlanIdCounter from protobuf object *otg.PatternFlowVlanIdCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowVlanIdCounter) PatternFlowVlanIdCounter + // provides marshal interface + Marshal() marshalPatternFlowVlanIdCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVlanIdCounter + // validate validates PatternFlowVlanIdCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVlanIdCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowVlanIdCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowVlanIdCounter + SetStart(value uint32) PatternFlowVlanIdCounter + // HasStart checks if Start has been set in PatternFlowVlanIdCounter + HasStart() bool + // Step returns uint32, set in PatternFlowVlanIdCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowVlanIdCounter + SetStep(value uint32) PatternFlowVlanIdCounter + // HasStep checks if Step has been set in PatternFlowVlanIdCounter + HasStep() bool + // Count returns uint32, set in PatternFlowVlanIdCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowVlanIdCounter + SetCount(value uint32) PatternFlowVlanIdCounter + // HasCount checks if Count has been set in PatternFlowVlanIdCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVlanIdCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVlanIdCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowVlanIdCounter object +func (obj *patternFlowVlanIdCounter) SetStart(value uint32) PatternFlowVlanIdCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVlanIdCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVlanIdCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowVlanIdCounter object +func (obj *patternFlowVlanIdCounter) SetStep(value uint32) PatternFlowVlanIdCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVlanIdCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVlanIdCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowVlanIdCounter object +func (obj *patternFlowVlanIdCounter) SetCount(value uint32) PatternFlowVlanIdCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowVlanIdCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanIdCounter.Start <= 4095 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanIdCounter.Step <= 4095 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 4095 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanIdCounter.Count <= 4095 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowVlanIdCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_vlan_id_metric_tag.go b/gosnappi/pattern_flow_vlan_id_metric_tag.go new file mode 100644 index 00000000..330c3214 --- /dev/null +++ b/gosnappi/pattern_flow_vlan_id_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVlanIdMetricTag ***** +type patternFlowVlanIdMetricTag struct { + validation + obj *otg.PatternFlowVlanIdMetricTag + marshaller marshalPatternFlowVlanIdMetricTag + unMarshaller unMarshalPatternFlowVlanIdMetricTag +} + +func NewPatternFlowVlanIdMetricTag() PatternFlowVlanIdMetricTag { + obj := patternFlowVlanIdMetricTag{obj: &otg.PatternFlowVlanIdMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVlanIdMetricTag) msg() *otg.PatternFlowVlanIdMetricTag { + return obj.obj +} + +func (obj *patternFlowVlanIdMetricTag) setMsg(msg *otg.PatternFlowVlanIdMetricTag) PatternFlowVlanIdMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVlanIdMetricTag struct { + obj *patternFlowVlanIdMetricTag +} + +type marshalPatternFlowVlanIdMetricTag interface { + // ToProto marshals PatternFlowVlanIdMetricTag to protobuf object *otg.PatternFlowVlanIdMetricTag + ToProto() (*otg.PatternFlowVlanIdMetricTag, error) + // ToPbText marshals PatternFlowVlanIdMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVlanIdMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVlanIdMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVlanIdMetricTag struct { + obj *patternFlowVlanIdMetricTag +} + +type unMarshalPatternFlowVlanIdMetricTag interface { + // FromProto unmarshals PatternFlowVlanIdMetricTag from protobuf object *otg.PatternFlowVlanIdMetricTag + FromProto(msg *otg.PatternFlowVlanIdMetricTag) (PatternFlowVlanIdMetricTag, error) + // FromPbText unmarshals PatternFlowVlanIdMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVlanIdMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVlanIdMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVlanIdMetricTag) Marshal() marshalPatternFlowVlanIdMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVlanIdMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVlanIdMetricTag) Unmarshal() unMarshalPatternFlowVlanIdMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVlanIdMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVlanIdMetricTag) ToProto() (*otg.PatternFlowVlanIdMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVlanIdMetricTag) FromProto(msg *otg.PatternFlowVlanIdMetricTag) (PatternFlowVlanIdMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVlanIdMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVlanIdMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVlanIdMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanIdMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVlanIdMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanIdMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVlanIdMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVlanIdMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVlanIdMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVlanIdMetricTag) Clone() (PatternFlowVlanIdMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVlanIdMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVlanIdMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowVlanIdMetricTag interface { + Validation + // msg marshals PatternFlowVlanIdMetricTag to protobuf object *otg.PatternFlowVlanIdMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowVlanIdMetricTag + // setMsg unmarshals PatternFlowVlanIdMetricTag from protobuf object *otg.PatternFlowVlanIdMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowVlanIdMetricTag) PatternFlowVlanIdMetricTag + // provides marshal interface + Marshal() marshalPatternFlowVlanIdMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVlanIdMetricTag + // validate validates PatternFlowVlanIdMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVlanIdMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowVlanIdMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowVlanIdMetricTag + SetName(value string) PatternFlowVlanIdMetricTag + // Offset returns uint32, set in PatternFlowVlanIdMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowVlanIdMetricTag + SetOffset(value uint32) PatternFlowVlanIdMetricTag + // HasOffset checks if Offset has been set in PatternFlowVlanIdMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowVlanIdMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowVlanIdMetricTag + SetLength(value uint32) PatternFlowVlanIdMetricTag + // HasLength checks if Length has been set in PatternFlowVlanIdMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowVlanIdMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowVlanIdMetricTag object +func (obj *patternFlowVlanIdMetricTag) SetName(value string) PatternFlowVlanIdMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVlanIdMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVlanIdMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowVlanIdMetricTag object +func (obj *patternFlowVlanIdMetricTag) SetOffset(value uint32) PatternFlowVlanIdMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVlanIdMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVlanIdMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowVlanIdMetricTag object +func (obj *patternFlowVlanIdMetricTag) SetLength(value uint32) PatternFlowVlanIdMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowVlanIdMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowVlanIdMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 11 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanIdMetricTag.Offset <= 11 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 12 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowVlanIdMetricTag.Length <= 12 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowVlanIdMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(12) + } + +} diff --git a/gosnappi/pattern_flow_vlan_priority.go b/gosnappi/pattern_flow_vlan_priority.go new file mode 100644 index 00000000..5e9ea667 --- /dev/null +++ b/gosnappi/pattern_flow_vlan_priority.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVlanPriority ***** +type patternFlowVlanPriority struct { + validation + obj *otg.PatternFlowVlanPriority + marshaller marshalPatternFlowVlanPriority + unMarshaller unMarshalPatternFlowVlanPriority + incrementHolder PatternFlowVlanPriorityCounter + decrementHolder PatternFlowVlanPriorityCounter + metricTagsHolder PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter +} + +func NewPatternFlowVlanPriority() PatternFlowVlanPriority { + obj := patternFlowVlanPriority{obj: &otg.PatternFlowVlanPriority{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVlanPriority) msg() *otg.PatternFlowVlanPriority { + return obj.obj +} + +func (obj *patternFlowVlanPriority) setMsg(msg *otg.PatternFlowVlanPriority) PatternFlowVlanPriority { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVlanPriority struct { + obj *patternFlowVlanPriority +} + +type marshalPatternFlowVlanPriority interface { + // ToProto marshals PatternFlowVlanPriority to protobuf object *otg.PatternFlowVlanPriority + ToProto() (*otg.PatternFlowVlanPriority, error) + // ToPbText marshals PatternFlowVlanPriority to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVlanPriority to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVlanPriority to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVlanPriority struct { + obj *patternFlowVlanPriority +} + +type unMarshalPatternFlowVlanPriority interface { + // FromProto unmarshals PatternFlowVlanPriority from protobuf object *otg.PatternFlowVlanPriority + FromProto(msg *otg.PatternFlowVlanPriority) (PatternFlowVlanPriority, error) + // FromPbText unmarshals PatternFlowVlanPriority from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVlanPriority from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVlanPriority from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVlanPriority) Marshal() marshalPatternFlowVlanPriority { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVlanPriority{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVlanPriority) Unmarshal() unMarshalPatternFlowVlanPriority { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVlanPriority{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVlanPriority) ToProto() (*otg.PatternFlowVlanPriority, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVlanPriority) FromProto(msg *otg.PatternFlowVlanPriority) (PatternFlowVlanPriority, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVlanPriority) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVlanPriority) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVlanPriority) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanPriority) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVlanPriority) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanPriority) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVlanPriority) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVlanPriority) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVlanPriority) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVlanPriority) Clone() (PatternFlowVlanPriority, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVlanPriority() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowVlanPriority) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowVlanPriority is priority code point +type PatternFlowVlanPriority interface { + Validation + // msg marshals PatternFlowVlanPriority to protobuf object *otg.PatternFlowVlanPriority + // and doesn't set defaults + msg() *otg.PatternFlowVlanPriority + // setMsg unmarshals PatternFlowVlanPriority from protobuf object *otg.PatternFlowVlanPriority + // and doesn't set defaults + setMsg(*otg.PatternFlowVlanPriority) PatternFlowVlanPriority + // provides marshal interface + Marshal() marshalPatternFlowVlanPriority + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVlanPriority + // validate validates PatternFlowVlanPriority + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVlanPriority, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowVlanPriorityChoiceEnum, set in PatternFlowVlanPriority + Choice() PatternFlowVlanPriorityChoiceEnum + // setChoice assigns PatternFlowVlanPriorityChoiceEnum provided by user to PatternFlowVlanPriority + setChoice(value PatternFlowVlanPriorityChoiceEnum) PatternFlowVlanPriority + // HasChoice checks if Choice has been set in PatternFlowVlanPriority + HasChoice() bool + // Value returns uint32, set in PatternFlowVlanPriority. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowVlanPriority + SetValue(value uint32) PatternFlowVlanPriority + // HasValue checks if Value has been set in PatternFlowVlanPriority + HasValue() bool + // Values returns []uint32, set in PatternFlowVlanPriority. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowVlanPriority + SetValues(value []uint32) PatternFlowVlanPriority + // Increment returns PatternFlowVlanPriorityCounter, set in PatternFlowVlanPriority. + // PatternFlowVlanPriorityCounter is integer counter pattern + Increment() PatternFlowVlanPriorityCounter + // SetIncrement assigns PatternFlowVlanPriorityCounter provided by user to PatternFlowVlanPriority. + // PatternFlowVlanPriorityCounter is integer counter pattern + SetIncrement(value PatternFlowVlanPriorityCounter) PatternFlowVlanPriority + // HasIncrement checks if Increment has been set in PatternFlowVlanPriority + HasIncrement() bool + // Decrement returns PatternFlowVlanPriorityCounter, set in PatternFlowVlanPriority. + // PatternFlowVlanPriorityCounter is integer counter pattern + Decrement() PatternFlowVlanPriorityCounter + // SetDecrement assigns PatternFlowVlanPriorityCounter provided by user to PatternFlowVlanPriority. + // PatternFlowVlanPriorityCounter is integer counter pattern + SetDecrement(value PatternFlowVlanPriorityCounter) PatternFlowVlanPriority + // HasDecrement checks if Decrement has been set in PatternFlowVlanPriority + HasDecrement() bool + // MetricTags returns PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIterIter, set in PatternFlowVlanPriority + MetricTags() PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter + setNil() +} + +type PatternFlowVlanPriorityChoiceEnum string + +// Enum of Choice on PatternFlowVlanPriority +var PatternFlowVlanPriorityChoice = struct { + VALUE PatternFlowVlanPriorityChoiceEnum + VALUES PatternFlowVlanPriorityChoiceEnum + INCREMENT PatternFlowVlanPriorityChoiceEnum + DECREMENT PatternFlowVlanPriorityChoiceEnum +}{ + VALUE: PatternFlowVlanPriorityChoiceEnum("value"), + VALUES: PatternFlowVlanPriorityChoiceEnum("values"), + INCREMENT: PatternFlowVlanPriorityChoiceEnum("increment"), + DECREMENT: PatternFlowVlanPriorityChoiceEnum("decrement"), +} + +func (obj *patternFlowVlanPriority) Choice() PatternFlowVlanPriorityChoiceEnum { + return PatternFlowVlanPriorityChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowVlanPriority) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowVlanPriority) setChoice(value PatternFlowVlanPriorityChoiceEnum) PatternFlowVlanPriority { + intValue, ok := otg.PatternFlowVlanPriority_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowVlanPriorityChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowVlanPriority_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowVlanPriorityChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowVlanPriorityChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowVlanPriorityChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowVlanPriorityCounter().msg() + } + + if value == PatternFlowVlanPriorityChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowVlanPriorityCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVlanPriority) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowVlanPriorityChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVlanPriority) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowVlanPriority object +func (obj *patternFlowVlanPriority) SetValue(value uint32) PatternFlowVlanPriority { + obj.setChoice(PatternFlowVlanPriorityChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowVlanPriority) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowVlanPriority object +func (obj *patternFlowVlanPriority) SetValues(value []uint32) PatternFlowVlanPriority { + obj.setChoice(PatternFlowVlanPriorityChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowVlanPriorityCounter +func (obj *patternFlowVlanPriority) Increment() PatternFlowVlanPriorityCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowVlanPriorityChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowVlanPriorityCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowVlanPriorityCounter +func (obj *patternFlowVlanPriority) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowVlanPriorityCounter value in the PatternFlowVlanPriority object +func (obj *patternFlowVlanPriority) SetIncrement(value PatternFlowVlanPriorityCounter) PatternFlowVlanPriority { + obj.setChoice(PatternFlowVlanPriorityChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowVlanPriorityCounter +func (obj *patternFlowVlanPriority) Decrement() PatternFlowVlanPriorityCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowVlanPriorityChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowVlanPriorityCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowVlanPriorityCounter +func (obj *patternFlowVlanPriority) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowVlanPriorityCounter value in the PatternFlowVlanPriority object +func (obj *patternFlowVlanPriority) SetDecrement(value PatternFlowVlanPriorityCounter) PatternFlowVlanPriority { + obj.setChoice(PatternFlowVlanPriorityChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowVlanPriorityMetricTag +func (obj *patternFlowVlanPriority) MetricTags() PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowVlanPriorityMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter struct { + obj *patternFlowVlanPriority + patternFlowVlanPriorityMetricTagSlice []PatternFlowVlanPriorityMetricTag + fieldPtr *[]*otg.PatternFlowVlanPriorityMetricTag +} + +func newPatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter(ptr *[]*otg.PatternFlowVlanPriorityMetricTag) PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter { + return &patternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter interface { + setMsg(*patternFlowVlanPriority) PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter + Items() []PatternFlowVlanPriorityMetricTag + Add() PatternFlowVlanPriorityMetricTag + Append(items ...PatternFlowVlanPriorityMetricTag) PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter + Set(index int, newObj PatternFlowVlanPriorityMetricTag) PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter + Clear() PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter + clearHolderSlice() PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter + appendHolderSlice(item PatternFlowVlanPriorityMetricTag) PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter +} + +func (obj *patternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter) setMsg(msg *patternFlowVlanPriority) PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowVlanPriorityMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter) Items() []PatternFlowVlanPriorityMetricTag { + return obj.patternFlowVlanPriorityMetricTagSlice +} + +func (obj *patternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter) Add() PatternFlowVlanPriorityMetricTag { + newObj := &otg.PatternFlowVlanPriorityMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowVlanPriorityMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowVlanPriorityMetricTagSlice = append(obj.patternFlowVlanPriorityMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter) Append(items ...PatternFlowVlanPriorityMetricTag) PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowVlanPriorityMetricTagSlice = append(obj.patternFlowVlanPriorityMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter) Set(index int, newObj PatternFlowVlanPriorityMetricTag) PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowVlanPriorityMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter) Clear() PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowVlanPriorityMetricTag{} + obj.patternFlowVlanPriorityMetricTagSlice = []PatternFlowVlanPriorityMetricTag{} + } + return obj +} +func (obj *patternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter) clearHolderSlice() PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter { + if len(obj.patternFlowVlanPriorityMetricTagSlice) > 0 { + obj.patternFlowVlanPriorityMetricTagSlice = []PatternFlowVlanPriorityMetricTag{} + } + return obj +} +func (obj *patternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter) appendHolderSlice(item PatternFlowVlanPriorityMetricTag) PatternFlowVlanPriorityPatternFlowVlanPriorityMetricTagIter { + obj.patternFlowVlanPriorityMetricTagSlice = append(obj.patternFlowVlanPriorityMetricTagSlice, item) + return obj +} + +func (obj *patternFlowVlanPriority) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanPriority.Value <= 7 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowVlanPriority.Values <= 7 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowVlanPriorityMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowVlanPriority) setDefault() { + var choices_set int = 0 + var choice PatternFlowVlanPriorityChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowVlanPriorityChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowVlanPriorityChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowVlanPriorityChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowVlanPriorityChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowVlanPriorityChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowVlanPriority") + } + } else { + intVal := otg.PatternFlowVlanPriority_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowVlanPriority_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_vlan_priority_counter.go b/gosnappi/pattern_flow_vlan_priority_counter.go new file mode 100644 index 00000000..f0f0a740 --- /dev/null +++ b/gosnappi/pattern_flow_vlan_priority_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVlanPriorityCounter ***** +type patternFlowVlanPriorityCounter struct { + validation + obj *otg.PatternFlowVlanPriorityCounter + marshaller marshalPatternFlowVlanPriorityCounter + unMarshaller unMarshalPatternFlowVlanPriorityCounter +} + +func NewPatternFlowVlanPriorityCounter() PatternFlowVlanPriorityCounter { + obj := patternFlowVlanPriorityCounter{obj: &otg.PatternFlowVlanPriorityCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVlanPriorityCounter) msg() *otg.PatternFlowVlanPriorityCounter { + return obj.obj +} + +func (obj *patternFlowVlanPriorityCounter) setMsg(msg *otg.PatternFlowVlanPriorityCounter) PatternFlowVlanPriorityCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVlanPriorityCounter struct { + obj *patternFlowVlanPriorityCounter +} + +type marshalPatternFlowVlanPriorityCounter interface { + // ToProto marshals PatternFlowVlanPriorityCounter to protobuf object *otg.PatternFlowVlanPriorityCounter + ToProto() (*otg.PatternFlowVlanPriorityCounter, error) + // ToPbText marshals PatternFlowVlanPriorityCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVlanPriorityCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVlanPriorityCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVlanPriorityCounter struct { + obj *patternFlowVlanPriorityCounter +} + +type unMarshalPatternFlowVlanPriorityCounter interface { + // FromProto unmarshals PatternFlowVlanPriorityCounter from protobuf object *otg.PatternFlowVlanPriorityCounter + FromProto(msg *otg.PatternFlowVlanPriorityCounter) (PatternFlowVlanPriorityCounter, error) + // FromPbText unmarshals PatternFlowVlanPriorityCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVlanPriorityCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVlanPriorityCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVlanPriorityCounter) Marshal() marshalPatternFlowVlanPriorityCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVlanPriorityCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVlanPriorityCounter) Unmarshal() unMarshalPatternFlowVlanPriorityCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVlanPriorityCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVlanPriorityCounter) ToProto() (*otg.PatternFlowVlanPriorityCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVlanPriorityCounter) FromProto(msg *otg.PatternFlowVlanPriorityCounter) (PatternFlowVlanPriorityCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVlanPriorityCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVlanPriorityCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVlanPriorityCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanPriorityCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVlanPriorityCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanPriorityCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVlanPriorityCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVlanPriorityCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVlanPriorityCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVlanPriorityCounter) Clone() (PatternFlowVlanPriorityCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVlanPriorityCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVlanPriorityCounter is integer counter pattern +type PatternFlowVlanPriorityCounter interface { + Validation + // msg marshals PatternFlowVlanPriorityCounter to protobuf object *otg.PatternFlowVlanPriorityCounter + // and doesn't set defaults + msg() *otg.PatternFlowVlanPriorityCounter + // setMsg unmarshals PatternFlowVlanPriorityCounter from protobuf object *otg.PatternFlowVlanPriorityCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowVlanPriorityCounter) PatternFlowVlanPriorityCounter + // provides marshal interface + Marshal() marshalPatternFlowVlanPriorityCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVlanPriorityCounter + // validate validates PatternFlowVlanPriorityCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVlanPriorityCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowVlanPriorityCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowVlanPriorityCounter + SetStart(value uint32) PatternFlowVlanPriorityCounter + // HasStart checks if Start has been set in PatternFlowVlanPriorityCounter + HasStart() bool + // Step returns uint32, set in PatternFlowVlanPriorityCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowVlanPriorityCounter + SetStep(value uint32) PatternFlowVlanPriorityCounter + // HasStep checks if Step has been set in PatternFlowVlanPriorityCounter + HasStep() bool + // Count returns uint32, set in PatternFlowVlanPriorityCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowVlanPriorityCounter + SetCount(value uint32) PatternFlowVlanPriorityCounter + // HasCount checks if Count has been set in PatternFlowVlanPriorityCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVlanPriorityCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVlanPriorityCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowVlanPriorityCounter object +func (obj *patternFlowVlanPriorityCounter) SetStart(value uint32) PatternFlowVlanPriorityCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVlanPriorityCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVlanPriorityCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowVlanPriorityCounter object +func (obj *patternFlowVlanPriorityCounter) SetStep(value uint32) PatternFlowVlanPriorityCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVlanPriorityCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVlanPriorityCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowVlanPriorityCounter object +func (obj *patternFlowVlanPriorityCounter) SetCount(value uint32) PatternFlowVlanPriorityCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowVlanPriorityCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanPriorityCounter.Start <= 7 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanPriorityCounter.Step <= 7 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanPriorityCounter.Count <= 7 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowVlanPriorityCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_vlan_priority_metric_tag.go b/gosnappi/pattern_flow_vlan_priority_metric_tag.go new file mode 100644 index 00000000..7d6a726c --- /dev/null +++ b/gosnappi/pattern_flow_vlan_priority_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVlanPriorityMetricTag ***** +type patternFlowVlanPriorityMetricTag struct { + validation + obj *otg.PatternFlowVlanPriorityMetricTag + marshaller marshalPatternFlowVlanPriorityMetricTag + unMarshaller unMarshalPatternFlowVlanPriorityMetricTag +} + +func NewPatternFlowVlanPriorityMetricTag() PatternFlowVlanPriorityMetricTag { + obj := patternFlowVlanPriorityMetricTag{obj: &otg.PatternFlowVlanPriorityMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVlanPriorityMetricTag) msg() *otg.PatternFlowVlanPriorityMetricTag { + return obj.obj +} + +func (obj *patternFlowVlanPriorityMetricTag) setMsg(msg *otg.PatternFlowVlanPriorityMetricTag) PatternFlowVlanPriorityMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVlanPriorityMetricTag struct { + obj *patternFlowVlanPriorityMetricTag +} + +type marshalPatternFlowVlanPriorityMetricTag interface { + // ToProto marshals PatternFlowVlanPriorityMetricTag to protobuf object *otg.PatternFlowVlanPriorityMetricTag + ToProto() (*otg.PatternFlowVlanPriorityMetricTag, error) + // ToPbText marshals PatternFlowVlanPriorityMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVlanPriorityMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVlanPriorityMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVlanPriorityMetricTag struct { + obj *patternFlowVlanPriorityMetricTag +} + +type unMarshalPatternFlowVlanPriorityMetricTag interface { + // FromProto unmarshals PatternFlowVlanPriorityMetricTag from protobuf object *otg.PatternFlowVlanPriorityMetricTag + FromProto(msg *otg.PatternFlowVlanPriorityMetricTag) (PatternFlowVlanPriorityMetricTag, error) + // FromPbText unmarshals PatternFlowVlanPriorityMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVlanPriorityMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVlanPriorityMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVlanPriorityMetricTag) Marshal() marshalPatternFlowVlanPriorityMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVlanPriorityMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVlanPriorityMetricTag) Unmarshal() unMarshalPatternFlowVlanPriorityMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVlanPriorityMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVlanPriorityMetricTag) ToProto() (*otg.PatternFlowVlanPriorityMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVlanPriorityMetricTag) FromProto(msg *otg.PatternFlowVlanPriorityMetricTag) (PatternFlowVlanPriorityMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVlanPriorityMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVlanPriorityMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVlanPriorityMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanPriorityMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVlanPriorityMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanPriorityMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVlanPriorityMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVlanPriorityMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVlanPriorityMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVlanPriorityMetricTag) Clone() (PatternFlowVlanPriorityMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVlanPriorityMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVlanPriorityMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowVlanPriorityMetricTag interface { + Validation + // msg marshals PatternFlowVlanPriorityMetricTag to protobuf object *otg.PatternFlowVlanPriorityMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowVlanPriorityMetricTag + // setMsg unmarshals PatternFlowVlanPriorityMetricTag from protobuf object *otg.PatternFlowVlanPriorityMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowVlanPriorityMetricTag) PatternFlowVlanPriorityMetricTag + // provides marshal interface + Marshal() marshalPatternFlowVlanPriorityMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVlanPriorityMetricTag + // validate validates PatternFlowVlanPriorityMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVlanPriorityMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowVlanPriorityMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowVlanPriorityMetricTag + SetName(value string) PatternFlowVlanPriorityMetricTag + // Offset returns uint32, set in PatternFlowVlanPriorityMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowVlanPriorityMetricTag + SetOffset(value uint32) PatternFlowVlanPriorityMetricTag + // HasOffset checks if Offset has been set in PatternFlowVlanPriorityMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowVlanPriorityMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowVlanPriorityMetricTag + SetLength(value uint32) PatternFlowVlanPriorityMetricTag + // HasLength checks if Length has been set in PatternFlowVlanPriorityMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowVlanPriorityMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowVlanPriorityMetricTag object +func (obj *patternFlowVlanPriorityMetricTag) SetName(value string) PatternFlowVlanPriorityMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVlanPriorityMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVlanPriorityMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowVlanPriorityMetricTag object +func (obj *patternFlowVlanPriorityMetricTag) SetOffset(value uint32) PatternFlowVlanPriorityMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVlanPriorityMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVlanPriorityMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowVlanPriorityMetricTag object +func (obj *patternFlowVlanPriorityMetricTag) SetLength(value uint32) PatternFlowVlanPriorityMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowVlanPriorityMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowVlanPriorityMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 2 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanPriorityMetricTag.Offset <= 2 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 3 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowVlanPriorityMetricTag.Length <= 3 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowVlanPriorityMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(3) + } + +} diff --git a/gosnappi/pattern_flow_vlan_tpid.go b/gosnappi/pattern_flow_vlan_tpid.go new file mode 100644 index 00000000..b8fbb785 --- /dev/null +++ b/gosnappi/pattern_flow_vlan_tpid.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVlanTpid ***** +type patternFlowVlanTpid struct { + validation + obj *otg.PatternFlowVlanTpid + marshaller marshalPatternFlowVlanTpid + unMarshaller unMarshalPatternFlowVlanTpid + incrementHolder PatternFlowVlanTpidCounter + decrementHolder PatternFlowVlanTpidCounter + metricTagsHolder PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter +} + +func NewPatternFlowVlanTpid() PatternFlowVlanTpid { + obj := patternFlowVlanTpid{obj: &otg.PatternFlowVlanTpid{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVlanTpid) msg() *otg.PatternFlowVlanTpid { + return obj.obj +} + +func (obj *patternFlowVlanTpid) setMsg(msg *otg.PatternFlowVlanTpid) PatternFlowVlanTpid { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVlanTpid struct { + obj *patternFlowVlanTpid +} + +type marshalPatternFlowVlanTpid interface { + // ToProto marshals PatternFlowVlanTpid to protobuf object *otg.PatternFlowVlanTpid + ToProto() (*otg.PatternFlowVlanTpid, error) + // ToPbText marshals PatternFlowVlanTpid to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVlanTpid to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVlanTpid to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVlanTpid struct { + obj *patternFlowVlanTpid +} + +type unMarshalPatternFlowVlanTpid interface { + // FromProto unmarshals PatternFlowVlanTpid from protobuf object *otg.PatternFlowVlanTpid + FromProto(msg *otg.PatternFlowVlanTpid) (PatternFlowVlanTpid, error) + // FromPbText unmarshals PatternFlowVlanTpid from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVlanTpid from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVlanTpid from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVlanTpid) Marshal() marshalPatternFlowVlanTpid { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVlanTpid{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVlanTpid) Unmarshal() unMarshalPatternFlowVlanTpid { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVlanTpid{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVlanTpid) ToProto() (*otg.PatternFlowVlanTpid, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVlanTpid) FromProto(msg *otg.PatternFlowVlanTpid) (PatternFlowVlanTpid, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVlanTpid) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVlanTpid) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVlanTpid) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanTpid) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVlanTpid) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanTpid) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVlanTpid) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVlanTpid) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVlanTpid) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVlanTpid) Clone() (PatternFlowVlanTpid, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVlanTpid() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowVlanTpid) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowVlanTpid is protocol identifier +type PatternFlowVlanTpid interface { + Validation + // msg marshals PatternFlowVlanTpid to protobuf object *otg.PatternFlowVlanTpid + // and doesn't set defaults + msg() *otg.PatternFlowVlanTpid + // setMsg unmarshals PatternFlowVlanTpid from protobuf object *otg.PatternFlowVlanTpid + // and doesn't set defaults + setMsg(*otg.PatternFlowVlanTpid) PatternFlowVlanTpid + // provides marshal interface + Marshal() marshalPatternFlowVlanTpid + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVlanTpid + // validate validates PatternFlowVlanTpid + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVlanTpid, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowVlanTpidChoiceEnum, set in PatternFlowVlanTpid + Choice() PatternFlowVlanTpidChoiceEnum + // setChoice assigns PatternFlowVlanTpidChoiceEnum provided by user to PatternFlowVlanTpid + setChoice(value PatternFlowVlanTpidChoiceEnum) PatternFlowVlanTpid + // HasChoice checks if Choice has been set in PatternFlowVlanTpid + HasChoice() bool + // Value returns uint32, set in PatternFlowVlanTpid. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowVlanTpid + SetValue(value uint32) PatternFlowVlanTpid + // HasValue checks if Value has been set in PatternFlowVlanTpid + HasValue() bool + // Values returns []uint32, set in PatternFlowVlanTpid. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowVlanTpid + SetValues(value []uint32) PatternFlowVlanTpid + // Increment returns PatternFlowVlanTpidCounter, set in PatternFlowVlanTpid. + // PatternFlowVlanTpidCounter is integer counter pattern + Increment() PatternFlowVlanTpidCounter + // SetIncrement assigns PatternFlowVlanTpidCounter provided by user to PatternFlowVlanTpid. + // PatternFlowVlanTpidCounter is integer counter pattern + SetIncrement(value PatternFlowVlanTpidCounter) PatternFlowVlanTpid + // HasIncrement checks if Increment has been set in PatternFlowVlanTpid + HasIncrement() bool + // Decrement returns PatternFlowVlanTpidCounter, set in PatternFlowVlanTpid. + // PatternFlowVlanTpidCounter is integer counter pattern + Decrement() PatternFlowVlanTpidCounter + // SetDecrement assigns PatternFlowVlanTpidCounter provided by user to PatternFlowVlanTpid. + // PatternFlowVlanTpidCounter is integer counter pattern + SetDecrement(value PatternFlowVlanTpidCounter) PatternFlowVlanTpid + // HasDecrement checks if Decrement has been set in PatternFlowVlanTpid + HasDecrement() bool + // MetricTags returns PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIterIter, set in PatternFlowVlanTpid + MetricTags() PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter + setNil() +} + +type PatternFlowVlanTpidChoiceEnum string + +// Enum of Choice on PatternFlowVlanTpid +var PatternFlowVlanTpidChoice = struct { + VALUE PatternFlowVlanTpidChoiceEnum + VALUES PatternFlowVlanTpidChoiceEnum + INCREMENT PatternFlowVlanTpidChoiceEnum + DECREMENT PatternFlowVlanTpidChoiceEnum +}{ + VALUE: PatternFlowVlanTpidChoiceEnum("value"), + VALUES: PatternFlowVlanTpidChoiceEnum("values"), + INCREMENT: PatternFlowVlanTpidChoiceEnum("increment"), + DECREMENT: PatternFlowVlanTpidChoiceEnum("decrement"), +} + +func (obj *patternFlowVlanTpid) Choice() PatternFlowVlanTpidChoiceEnum { + return PatternFlowVlanTpidChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowVlanTpid) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowVlanTpid) setChoice(value PatternFlowVlanTpidChoiceEnum) PatternFlowVlanTpid { + intValue, ok := otg.PatternFlowVlanTpid_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowVlanTpidChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowVlanTpid_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowVlanTpidChoice.VALUE { + defaultValue := uint32(65535) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowVlanTpidChoice.VALUES { + defaultValue := []uint32{65535} + obj.obj.Values = defaultValue + } + + if value == PatternFlowVlanTpidChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowVlanTpidCounter().msg() + } + + if value == PatternFlowVlanTpidChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowVlanTpidCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVlanTpid) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowVlanTpidChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVlanTpid) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowVlanTpid object +func (obj *patternFlowVlanTpid) SetValue(value uint32) PatternFlowVlanTpid { + obj.setChoice(PatternFlowVlanTpidChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowVlanTpid) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{65535}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowVlanTpid object +func (obj *patternFlowVlanTpid) SetValues(value []uint32) PatternFlowVlanTpid { + obj.setChoice(PatternFlowVlanTpidChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowVlanTpidCounter +func (obj *patternFlowVlanTpid) Increment() PatternFlowVlanTpidCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowVlanTpidChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowVlanTpidCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowVlanTpidCounter +func (obj *patternFlowVlanTpid) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowVlanTpidCounter value in the PatternFlowVlanTpid object +func (obj *patternFlowVlanTpid) SetIncrement(value PatternFlowVlanTpidCounter) PatternFlowVlanTpid { + obj.setChoice(PatternFlowVlanTpidChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowVlanTpidCounter +func (obj *patternFlowVlanTpid) Decrement() PatternFlowVlanTpidCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowVlanTpidChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowVlanTpidCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowVlanTpidCounter +func (obj *patternFlowVlanTpid) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowVlanTpidCounter value in the PatternFlowVlanTpid object +func (obj *patternFlowVlanTpid) SetDecrement(value PatternFlowVlanTpidCounter) PatternFlowVlanTpid { + obj.setChoice(PatternFlowVlanTpidChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowVlanTpidMetricTag +func (obj *patternFlowVlanTpid) MetricTags() PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowVlanTpidMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowVlanTpidPatternFlowVlanTpidMetricTagIter struct { + obj *patternFlowVlanTpid + patternFlowVlanTpidMetricTagSlice []PatternFlowVlanTpidMetricTag + fieldPtr *[]*otg.PatternFlowVlanTpidMetricTag +} + +func newPatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter(ptr *[]*otg.PatternFlowVlanTpidMetricTag) PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter { + return &patternFlowVlanTpidPatternFlowVlanTpidMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter interface { + setMsg(*patternFlowVlanTpid) PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter + Items() []PatternFlowVlanTpidMetricTag + Add() PatternFlowVlanTpidMetricTag + Append(items ...PatternFlowVlanTpidMetricTag) PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter + Set(index int, newObj PatternFlowVlanTpidMetricTag) PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter + Clear() PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter + clearHolderSlice() PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter + appendHolderSlice(item PatternFlowVlanTpidMetricTag) PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter +} + +func (obj *patternFlowVlanTpidPatternFlowVlanTpidMetricTagIter) setMsg(msg *patternFlowVlanTpid) PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowVlanTpidMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowVlanTpidPatternFlowVlanTpidMetricTagIter) Items() []PatternFlowVlanTpidMetricTag { + return obj.patternFlowVlanTpidMetricTagSlice +} + +func (obj *patternFlowVlanTpidPatternFlowVlanTpidMetricTagIter) Add() PatternFlowVlanTpidMetricTag { + newObj := &otg.PatternFlowVlanTpidMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowVlanTpidMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowVlanTpidMetricTagSlice = append(obj.patternFlowVlanTpidMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowVlanTpidPatternFlowVlanTpidMetricTagIter) Append(items ...PatternFlowVlanTpidMetricTag) PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowVlanTpidMetricTagSlice = append(obj.patternFlowVlanTpidMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowVlanTpidPatternFlowVlanTpidMetricTagIter) Set(index int, newObj PatternFlowVlanTpidMetricTag) PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowVlanTpidMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowVlanTpidPatternFlowVlanTpidMetricTagIter) Clear() PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowVlanTpidMetricTag{} + obj.patternFlowVlanTpidMetricTagSlice = []PatternFlowVlanTpidMetricTag{} + } + return obj +} +func (obj *patternFlowVlanTpidPatternFlowVlanTpidMetricTagIter) clearHolderSlice() PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter { + if len(obj.patternFlowVlanTpidMetricTagSlice) > 0 { + obj.patternFlowVlanTpidMetricTagSlice = []PatternFlowVlanTpidMetricTag{} + } + return obj +} +func (obj *patternFlowVlanTpidPatternFlowVlanTpidMetricTagIter) appendHolderSlice(item PatternFlowVlanTpidMetricTag) PatternFlowVlanTpidPatternFlowVlanTpidMetricTagIter { + obj.patternFlowVlanTpidMetricTagSlice = append(obj.patternFlowVlanTpidMetricTagSlice, item) + return obj +} + +func (obj *patternFlowVlanTpid) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanTpid.Value <= 65535 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowVlanTpid.Values <= 65535 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowVlanTpidMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowVlanTpid) setDefault() { + var choices_set int = 0 + var choice PatternFlowVlanTpidChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowVlanTpidChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowVlanTpidChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowVlanTpidChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowVlanTpidChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowVlanTpidChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowVlanTpid") + } + } else { + intVal := otg.PatternFlowVlanTpid_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowVlanTpid_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_vlan_tpid_counter.go b/gosnappi/pattern_flow_vlan_tpid_counter.go new file mode 100644 index 00000000..187d079f --- /dev/null +++ b/gosnappi/pattern_flow_vlan_tpid_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVlanTpidCounter ***** +type patternFlowVlanTpidCounter struct { + validation + obj *otg.PatternFlowVlanTpidCounter + marshaller marshalPatternFlowVlanTpidCounter + unMarshaller unMarshalPatternFlowVlanTpidCounter +} + +func NewPatternFlowVlanTpidCounter() PatternFlowVlanTpidCounter { + obj := patternFlowVlanTpidCounter{obj: &otg.PatternFlowVlanTpidCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVlanTpidCounter) msg() *otg.PatternFlowVlanTpidCounter { + return obj.obj +} + +func (obj *patternFlowVlanTpidCounter) setMsg(msg *otg.PatternFlowVlanTpidCounter) PatternFlowVlanTpidCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVlanTpidCounter struct { + obj *patternFlowVlanTpidCounter +} + +type marshalPatternFlowVlanTpidCounter interface { + // ToProto marshals PatternFlowVlanTpidCounter to protobuf object *otg.PatternFlowVlanTpidCounter + ToProto() (*otg.PatternFlowVlanTpidCounter, error) + // ToPbText marshals PatternFlowVlanTpidCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVlanTpidCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVlanTpidCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVlanTpidCounter struct { + obj *patternFlowVlanTpidCounter +} + +type unMarshalPatternFlowVlanTpidCounter interface { + // FromProto unmarshals PatternFlowVlanTpidCounter from protobuf object *otg.PatternFlowVlanTpidCounter + FromProto(msg *otg.PatternFlowVlanTpidCounter) (PatternFlowVlanTpidCounter, error) + // FromPbText unmarshals PatternFlowVlanTpidCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVlanTpidCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVlanTpidCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVlanTpidCounter) Marshal() marshalPatternFlowVlanTpidCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVlanTpidCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVlanTpidCounter) Unmarshal() unMarshalPatternFlowVlanTpidCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVlanTpidCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVlanTpidCounter) ToProto() (*otg.PatternFlowVlanTpidCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVlanTpidCounter) FromProto(msg *otg.PatternFlowVlanTpidCounter) (PatternFlowVlanTpidCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVlanTpidCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVlanTpidCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVlanTpidCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanTpidCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVlanTpidCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanTpidCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVlanTpidCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVlanTpidCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVlanTpidCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVlanTpidCounter) Clone() (PatternFlowVlanTpidCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVlanTpidCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVlanTpidCounter is integer counter pattern +type PatternFlowVlanTpidCounter interface { + Validation + // msg marshals PatternFlowVlanTpidCounter to protobuf object *otg.PatternFlowVlanTpidCounter + // and doesn't set defaults + msg() *otg.PatternFlowVlanTpidCounter + // setMsg unmarshals PatternFlowVlanTpidCounter from protobuf object *otg.PatternFlowVlanTpidCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowVlanTpidCounter) PatternFlowVlanTpidCounter + // provides marshal interface + Marshal() marshalPatternFlowVlanTpidCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVlanTpidCounter + // validate validates PatternFlowVlanTpidCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVlanTpidCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowVlanTpidCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowVlanTpidCounter + SetStart(value uint32) PatternFlowVlanTpidCounter + // HasStart checks if Start has been set in PatternFlowVlanTpidCounter + HasStart() bool + // Step returns uint32, set in PatternFlowVlanTpidCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowVlanTpidCounter + SetStep(value uint32) PatternFlowVlanTpidCounter + // HasStep checks if Step has been set in PatternFlowVlanTpidCounter + HasStep() bool + // Count returns uint32, set in PatternFlowVlanTpidCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowVlanTpidCounter + SetCount(value uint32) PatternFlowVlanTpidCounter + // HasCount checks if Count has been set in PatternFlowVlanTpidCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVlanTpidCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVlanTpidCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowVlanTpidCounter object +func (obj *patternFlowVlanTpidCounter) SetStart(value uint32) PatternFlowVlanTpidCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVlanTpidCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVlanTpidCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowVlanTpidCounter object +func (obj *patternFlowVlanTpidCounter) SetStep(value uint32) PatternFlowVlanTpidCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVlanTpidCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVlanTpidCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowVlanTpidCounter object +func (obj *patternFlowVlanTpidCounter) SetCount(value uint32) PatternFlowVlanTpidCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowVlanTpidCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanTpidCounter.Start <= 65535 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanTpidCounter.Step <= 65535 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanTpidCounter.Count <= 65535 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowVlanTpidCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(65535) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_vlan_tpid_metric_tag.go b/gosnappi/pattern_flow_vlan_tpid_metric_tag.go new file mode 100644 index 00000000..dbdfec55 --- /dev/null +++ b/gosnappi/pattern_flow_vlan_tpid_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVlanTpidMetricTag ***** +type patternFlowVlanTpidMetricTag struct { + validation + obj *otg.PatternFlowVlanTpidMetricTag + marshaller marshalPatternFlowVlanTpidMetricTag + unMarshaller unMarshalPatternFlowVlanTpidMetricTag +} + +func NewPatternFlowVlanTpidMetricTag() PatternFlowVlanTpidMetricTag { + obj := patternFlowVlanTpidMetricTag{obj: &otg.PatternFlowVlanTpidMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVlanTpidMetricTag) msg() *otg.PatternFlowVlanTpidMetricTag { + return obj.obj +} + +func (obj *patternFlowVlanTpidMetricTag) setMsg(msg *otg.PatternFlowVlanTpidMetricTag) PatternFlowVlanTpidMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVlanTpidMetricTag struct { + obj *patternFlowVlanTpidMetricTag +} + +type marshalPatternFlowVlanTpidMetricTag interface { + // ToProto marshals PatternFlowVlanTpidMetricTag to protobuf object *otg.PatternFlowVlanTpidMetricTag + ToProto() (*otg.PatternFlowVlanTpidMetricTag, error) + // ToPbText marshals PatternFlowVlanTpidMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVlanTpidMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVlanTpidMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVlanTpidMetricTag struct { + obj *patternFlowVlanTpidMetricTag +} + +type unMarshalPatternFlowVlanTpidMetricTag interface { + // FromProto unmarshals PatternFlowVlanTpidMetricTag from protobuf object *otg.PatternFlowVlanTpidMetricTag + FromProto(msg *otg.PatternFlowVlanTpidMetricTag) (PatternFlowVlanTpidMetricTag, error) + // FromPbText unmarshals PatternFlowVlanTpidMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVlanTpidMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVlanTpidMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVlanTpidMetricTag) Marshal() marshalPatternFlowVlanTpidMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVlanTpidMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVlanTpidMetricTag) Unmarshal() unMarshalPatternFlowVlanTpidMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVlanTpidMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVlanTpidMetricTag) ToProto() (*otg.PatternFlowVlanTpidMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVlanTpidMetricTag) FromProto(msg *otg.PatternFlowVlanTpidMetricTag) (PatternFlowVlanTpidMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVlanTpidMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVlanTpidMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVlanTpidMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanTpidMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVlanTpidMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVlanTpidMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVlanTpidMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVlanTpidMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVlanTpidMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVlanTpidMetricTag) Clone() (PatternFlowVlanTpidMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVlanTpidMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVlanTpidMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowVlanTpidMetricTag interface { + Validation + // msg marshals PatternFlowVlanTpidMetricTag to protobuf object *otg.PatternFlowVlanTpidMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowVlanTpidMetricTag + // setMsg unmarshals PatternFlowVlanTpidMetricTag from protobuf object *otg.PatternFlowVlanTpidMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowVlanTpidMetricTag) PatternFlowVlanTpidMetricTag + // provides marshal interface + Marshal() marshalPatternFlowVlanTpidMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVlanTpidMetricTag + // validate validates PatternFlowVlanTpidMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVlanTpidMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowVlanTpidMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowVlanTpidMetricTag + SetName(value string) PatternFlowVlanTpidMetricTag + // Offset returns uint32, set in PatternFlowVlanTpidMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowVlanTpidMetricTag + SetOffset(value uint32) PatternFlowVlanTpidMetricTag + // HasOffset checks if Offset has been set in PatternFlowVlanTpidMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowVlanTpidMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowVlanTpidMetricTag + SetLength(value uint32) PatternFlowVlanTpidMetricTag + // HasLength checks if Length has been set in PatternFlowVlanTpidMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowVlanTpidMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowVlanTpidMetricTag object +func (obj *patternFlowVlanTpidMetricTag) SetName(value string) PatternFlowVlanTpidMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVlanTpidMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVlanTpidMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowVlanTpidMetricTag object +func (obj *patternFlowVlanTpidMetricTag) SetOffset(value uint32) PatternFlowVlanTpidMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVlanTpidMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVlanTpidMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowVlanTpidMetricTag object +func (obj *patternFlowVlanTpidMetricTag) SetLength(value uint32) PatternFlowVlanTpidMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowVlanTpidMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowVlanTpidMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 15 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVlanTpidMetricTag.Offset <= 15 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowVlanTpidMetricTag.Length <= 16 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowVlanTpidMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(16) + } + +} diff --git a/gosnappi/pattern_flow_vxlan_flags.go b/gosnappi/pattern_flow_vxlan_flags.go new file mode 100644 index 00000000..6825bae1 --- /dev/null +++ b/gosnappi/pattern_flow_vxlan_flags.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVxlanFlags ***** +type patternFlowVxlanFlags struct { + validation + obj *otg.PatternFlowVxlanFlags + marshaller marshalPatternFlowVxlanFlags + unMarshaller unMarshalPatternFlowVxlanFlags + incrementHolder PatternFlowVxlanFlagsCounter + decrementHolder PatternFlowVxlanFlagsCounter + metricTagsHolder PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter +} + +func NewPatternFlowVxlanFlags() PatternFlowVxlanFlags { + obj := patternFlowVxlanFlags{obj: &otg.PatternFlowVxlanFlags{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVxlanFlags) msg() *otg.PatternFlowVxlanFlags { + return obj.obj +} + +func (obj *patternFlowVxlanFlags) setMsg(msg *otg.PatternFlowVxlanFlags) PatternFlowVxlanFlags { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVxlanFlags struct { + obj *patternFlowVxlanFlags +} + +type marshalPatternFlowVxlanFlags interface { + // ToProto marshals PatternFlowVxlanFlags to protobuf object *otg.PatternFlowVxlanFlags + ToProto() (*otg.PatternFlowVxlanFlags, error) + // ToPbText marshals PatternFlowVxlanFlags to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVxlanFlags to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVxlanFlags to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVxlanFlags struct { + obj *patternFlowVxlanFlags +} + +type unMarshalPatternFlowVxlanFlags interface { + // FromProto unmarshals PatternFlowVxlanFlags from protobuf object *otg.PatternFlowVxlanFlags + FromProto(msg *otg.PatternFlowVxlanFlags) (PatternFlowVxlanFlags, error) + // FromPbText unmarshals PatternFlowVxlanFlags from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVxlanFlags from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVxlanFlags from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVxlanFlags) Marshal() marshalPatternFlowVxlanFlags { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVxlanFlags{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVxlanFlags) Unmarshal() unMarshalPatternFlowVxlanFlags { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVxlanFlags{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVxlanFlags) ToProto() (*otg.PatternFlowVxlanFlags, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVxlanFlags) FromProto(msg *otg.PatternFlowVxlanFlags) (PatternFlowVxlanFlags, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVxlanFlags) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVxlanFlags) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVxlanFlags) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanFlags) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVxlanFlags) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanFlags) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVxlanFlags) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVxlanFlags) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVxlanFlags) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVxlanFlags) Clone() (PatternFlowVxlanFlags, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVxlanFlags() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowVxlanFlags) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowVxlanFlags is flags field with a bit format of RRRRIRRR. The I flag MUST be set to 1 for a valid vxlan network id (VNI). The other 7 bits (designated "R") are reserved fields and MUST be set to zero on transmission and ignored on receipt. +type PatternFlowVxlanFlags interface { + Validation + // msg marshals PatternFlowVxlanFlags to protobuf object *otg.PatternFlowVxlanFlags + // and doesn't set defaults + msg() *otg.PatternFlowVxlanFlags + // setMsg unmarshals PatternFlowVxlanFlags from protobuf object *otg.PatternFlowVxlanFlags + // and doesn't set defaults + setMsg(*otg.PatternFlowVxlanFlags) PatternFlowVxlanFlags + // provides marshal interface + Marshal() marshalPatternFlowVxlanFlags + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVxlanFlags + // validate validates PatternFlowVxlanFlags + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVxlanFlags, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowVxlanFlagsChoiceEnum, set in PatternFlowVxlanFlags + Choice() PatternFlowVxlanFlagsChoiceEnum + // setChoice assigns PatternFlowVxlanFlagsChoiceEnum provided by user to PatternFlowVxlanFlags + setChoice(value PatternFlowVxlanFlagsChoiceEnum) PatternFlowVxlanFlags + // HasChoice checks if Choice has been set in PatternFlowVxlanFlags + HasChoice() bool + // Value returns uint32, set in PatternFlowVxlanFlags. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowVxlanFlags + SetValue(value uint32) PatternFlowVxlanFlags + // HasValue checks if Value has been set in PatternFlowVxlanFlags + HasValue() bool + // Values returns []uint32, set in PatternFlowVxlanFlags. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowVxlanFlags + SetValues(value []uint32) PatternFlowVxlanFlags + // Increment returns PatternFlowVxlanFlagsCounter, set in PatternFlowVxlanFlags. + // PatternFlowVxlanFlagsCounter is integer counter pattern + Increment() PatternFlowVxlanFlagsCounter + // SetIncrement assigns PatternFlowVxlanFlagsCounter provided by user to PatternFlowVxlanFlags. + // PatternFlowVxlanFlagsCounter is integer counter pattern + SetIncrement(value PatternFlowVxlanFlagsCounter) PatternFlowVxlanFlags + // HasIncrement checks if Increment has been set in PatternFlowVxlanFlags + HasIncrement() bool + // Decrement returns PatternFlowVxlanFlagsCounter, set in PatternFlowVxlanFlags. + // PatternFlowVxlanFlagsCounter is integer counter pattern + Decrement() PatternFlowVxlanFlagsCounter + // SetDecrement assigns PatternFlowVxlanFlagsCounter provided by user to PatternFlowVxlanFlags. + // PatternFlowVxlanFlagsCounter is integer counter pattern + SetDecrement(value PatternFlowVxlanFlagsCounter) PatternFlowVxlanFlags + // HasDecrement checks if Decrement has been set in PatternFlowVxlanFlags + HasDecrement() bool + // MetricTags returns PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIterIter, set in PatternFlowVxlanFlags + MetricTags() PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter + setNil() +} + +type PatternFlowVxlanFlagsChoiceEnum string + +// Enum of Choice on PatternFlowVxlanFlags +var PatternFlowVxlanFlagsChoice = struct { + VALUE PatternFlowVxlanFlagsChoiceEnum + VALUES PatternFlowVxlanFlagsChoiceEnum + INCREMENT PatternFlowVxlanFlagsChoiceEnum + DECREMENT PatternFlowVxlanFlagsChoiceEnum +}{ + VALUE: PatternFlowVxlanFlagsChoiceEnum("value"), + VALUES: PatternFlowVxlanFlagsChoiceEnum("values"), + INCREMENT: PatternFlowVxlanFlagsChoiceEnum("increment"), + DECREMENT: PatternFlowVxlanFlagsChoiceEnum("decrement"), +} + +func (obj *patternFlowVxlanFlags) Choice() PatternFlowVxlanFlagsChoiceEnum { + return PatternFlowVxlanFlagsChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowVxlanFlags) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowVxlanFlags) setChoice(value PatternFlowVxlanFlagsChoiceEnum) PatternFlowVxlanFlags { + intValue, ok := otg.PatternFlowVxlanFlags_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowVxlanFlagsChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowVxlanFlags_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowVxlanFlagsChoice.VALUE { + defaultValue := uint32(8) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowVxlanFlagsChoice.VALUES { + defaultValue := []uint32{8} + obj.obj.Values = defaultValue + } + + if value == PatternFlowVxlanFlagsChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowVxlanFlagsCounter().msg() + } + + if value == PatternFlowVxlanFlagsChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowVxlanFlagsCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVxlanFlags) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowVxlanFlagsChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVxlanFlags) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowVxlanFlags object +func (obj *patternFlowVxlanFlags) SetValue(value uint32) PatternFlowVxlanFlags { + obj.setChoice(PatternFlowVxlanFlagsChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowVxlanFlags) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{8}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowVxlanFlags object +func (obj *patternFlowVxlanFlags) SetValues(value []uint32) PatternFlowVxlanFlags { + obj.setChoice(PatternFlowVxlanFlagsChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowVxlanFlagsCounter +func (obj *patternFlowVxlanFlags) Increment() PatternFlowVxlanFlagsCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowVxlanFlagsChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowVxlanFlagsCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowVxlanFlagsCounter +func (obj *patternFlowVxlanFlags) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowVxlanFlagsCounter value in the PatternFlowVxlanFlags object +func (obj *patternFlowVxlanFlags) SetIncrement(value PatternFlowVxlanFlagsCounter) PatternFlowVxlanFlags { + obj.setChoice(PatternFlowVxlanFlagsChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowVxlanFlagsCounter +func (obj *patternFlowVxlanFlags) Decrement() PatternFlowVxlanFlagsCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowVxlanFlagsChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowVxlanFlagsCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowVxlanFlagsCounter +func (obj *patternFlowVxlanFlags) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowVxlanFlagsCounter value in the PatternFlowVxlanFlags object +func (obj *patternFlowVxlanFlags) SetDecrement(value PatternFlowVxlanFlagsCounter) PatternFlowVxlanFlags { + obj.setChoice(PatternFlowVxlanFlagsChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowVxlanFlagsMetricTag +func (obj *patternFlowVxlanFlags) MetricTags() PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowVxlanFlagsMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter struct { + obj *patternFlowVxlanFlags + patternFlowVxlanFlagsMetricTagSlice []PatternFlowVxlanFlagsMetricTag + fieldPtr *[]*otg.PatternFlowVxlanFlagsMetricTag +} + +func newPatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter(ptr *[]*otg.PatternFlowVxlanFlagsMetricTag) PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter { + return &patternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter interface { + setMsg(*patternFlowVxlanFlags) PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter + Items() []PatternFlowVxlanFlagsMetricTag + Add() PatternFlowVxlanFlagsMetricTag + Append(items ...PatternFlowVxlanFlagsMetricTag) PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter + Set(index int, newObj PatternFlowVxlanFlagsMetricTag) PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter + Clear() PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter + clearHolderSlice() PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter + appendHolderSlice(item PatternFlowVxlanFlagsMetricTag) PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter +} + +func (obj *patternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter) setMsg(msg *patternFlowVxlanFlags) PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowVxlanFlagsMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter) Items() []PatternFlowVxlanFlagsMetricTag { + return obj.patternFlowVxlanFlagsMetricTagSlice +} + +func (obj *patternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter) Add() PatternFlowVxlanFlagsMetricTag { + newObj := &otg.PatternFlowVxlanFlagsMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowVxlanFlagsMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowVxlanFlagsMetricTagSlice = append(obj.patternFlowVxlanFlagsMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter) Append(items ...PatternFlowVxlanFlagsMetricTag) PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowVxlanFlagsMetricTagSlice = append(obj.patternFlowVxlanFlagsMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter) Set(index int, newObj PatternFlowVxlanFlagsMetricTag) PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowVxlanFlagsMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter) Clear() PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowVxlanFlagsMetricTag{} + obj.patternFlowVxlanFlagsMetricTagSlice = []PatternFlowVxlanFlagsMetricTag{} + } + return obj +} +func (obj *patternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter) clearHolderSlice() PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter { + if len(obj.patternFlowVxlanFlagsMetricTagSlice) > 0 { + obj.patternFlowVxlanFlagsMetricTagSlice = []PatternFlowVxlanFlagsMetricTag{} + } + return obj +} +func (obj *patternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter) appendHolderSlice(item PatternFlowVxlanFlagsMetricTag) PatternFlowVxlanFlagsPatternFlowVxlanFlagsMetricTagIter { + obj.patternFlowVxlanFlagsMetricTagSlice = append(obj.patternFlowVxlanFlagsMetricTagSlice, item) + return obj +} + +func (obj *patternFlowVxlanFlags) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanFlags.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowVxlanFlags.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowVxlanFlagsMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowVxlanFlags) setDefault() { + var choices_set int = 0 + var choice PatternFlowVxlanFlagsChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowVxlanFlagsChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowVxlanFlagsChoice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowVxlanFlagsChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowVxlanFlagsChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowVxlanFlagsChoice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowVxlanFlags") + } + } else { + intVal := otg.PatternFlowVxlanFlags_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowVxlanFlags_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_vxlan_flags_counter.go b/gosnappi/pattern_flow_vxlan_flags_counter.go new file mode 100644 index 00000000..b29afc08 --- /dev/null +++ b/gosnappi/pattern_flow_vxlan_flags_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVxlanFlagsCounter ***** +type patternFlowVxlanFlagsCounter struct { + validation + obj *otg.PatternFlowVxlanFlagsCounter + marshaller marshalPatternFlowVxlanFlagsCounter + unMarshaller unMarshalPatternFlowVxlanFlagsCounter +} + +func NewPatternFlowVxlanFlagsCounter() PatternFlowVxlanFlagsCounter { + obj := patternFlowVxlanFlagsCounter{obj: &otg.PatternFlowVxlanFlagsCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVxlanFlagsCounter) msg() *otg.PatternFlowVxlanFlagsCounter { + return obj.obj +} + +func (obj *patternFlowVxlanFlagsCounter) setMsg(msg *otg.PatternFlowVxlanFlagsCounter) PatternFlowVxlanFlagsCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVxlanFlagsCounter struct { + obj *patternFlowVxlanFlagsCounter +} + +type marshalPatternFlowVxlanFlagsCounter interface { + // ToProto marshals PatternFlowVxlanFlagsCounter to protobuf object *otg.PatternFlowVxlanFlagsCounter + ToProto() (*otg.PatternFlowVxlanFlagsCounter, error) + // ToPbText marshals PatternFlowVxlanFlagsCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVxlanFlagsCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVxlanFlagsCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVxlanFlagsCounter struct { + obj *patternFlowVxlanFlagsCounter +} + +type unMarshalPatternFlowVxlanFlagsCounter interface { + // FromProto unmarshals PatternFlowVxlanFlagsCounter from protobuf object *otg.PatternFlowVxlanFlagsCounter + FromProto(msg *otg.PatternFlowVxlanFlagsCounter) (PatternFlowVxlanFlagsCounter, error) + // FromPbText unmarshals PatternFlowVxlanFlagsCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVxlanFlagsCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVxlanFlagsCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVxlanFlagsCounter) Marshal() marshalPatternFlowVxlanFlagsCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVxlanFlagsCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVxlanFlagsCounter) Unmarshal() unMarshalPatternFlowVxlanFlagsCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVxlanFlagsCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVxlanFlagsCounter) ToProto() (*otg.PatternFlowVxlanFlagsCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVxlanFlagsCounter) FromProto(msg *otg.PatternFlowVxlanFlagsCounter) (PatternFlowVxlanFlagsCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVxlanFlagsCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVxlanFlagsCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVxlanFlagsCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanFlagsCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVxlanFlagsCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanFlagsCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVxlanFlagsCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVxlanFlagsCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVxlanFlagsCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVxlanFlagsCounter) Clone() (PatternFlowVxlanFlagsCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVxlanFlagsCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVxlanFlagsCounter is integer counter pattern +type PatternFlowVxlanFlagsCounter interface { + Validation + // msg marshals PatternFlowVxlanFlagsCounter to protobuf object *otg.PatternFlowVxlanFlagsCounter + // and doesn't set defaults + msg() *otg.PatternFlowVxlanFlagsCounter + // setMsg unmarshals PatternFlowVxlanFlagsCounter from protobuf object *otg.PatternFlowVxlanFlagsCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowVxlanFlagsCounter) PatternFlowVxlanFlagsCounter + // provides marshal interface + Marshal() marshalPatternFlowVxlanFlagsCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVxlanFlagsCounter + // validate validates PatternFlowVxlanFlagsCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVxlanFlagsCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowVxlanFlagsCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowVxlanFlagsCounter + SetStart(value uint32) PatternFlowVxlanFlagsCounter + // HasStart checks if Start has been set in PatternFlowVxlanFlagsCounter + HasStart() bool + // Step returns uint32, set in PatternFlowVxlanFlagsCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowVxlanFlagsCounter + SetStep(value uint32) PatternFlowVxlanFlagsCounter + // HasStep checks if Step has been set in PatternFlowVxlanFlagsCounter + HasStep() bool + // Count returns uint32, set in PatternFlowVxlanFlagsCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowVxlanFlagsCounter + SetCount(value uint32) PatternFlowVxlanFlagsCounter + // HasCount checks if Count has been set in PatternFlowVxlanFlagsCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVxlanFlagsCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVxlanFlagsCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowVxlanFlagsCounter object +func (obj *patternFlowVxlanFlagsCounter) SetStart(value uint32) PatternFlowVxlanFlagsCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVxlanFlagsCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVxlanFlagsCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowVxlanFlagsCounter object +func (obj *patternFlowVxlanFlagsCounter) SetStep(value uint32) PatternFlowVxlanFlagsCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVxlanFlagsCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVxlanFlagsCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowVxlanFlagsCounter object +func (obj *patternFlowVxlanFlagsCounter) SetCount(value uint32) PatternFlowVxlanFlagsCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowVxlanFlagsCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanFlagsCounter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanFlagsCounter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanFlagsCounter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowVxlanFlagsCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(8) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_vxlan_flags_metric_tag.go b/gosnappi/pattern_flow_vxlan_flags_metric_tag.go new file mode 100644 index 00000000..476cfd6e --- /dev/null +++ b/gosnappi/pattern_flow_vxlan_flags_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVxlanFlagsMetricTag ***** +type patternFlowVxlanFlagsMetricTag struct { + validation + obj *otg.PatternFlowVxlanFlagsMetricTag + marshaller marshalPatternFlowVxlanFlagsMetricTag + unMarshaller unMarshalPatternFlowVxlanFlagsMetricTag +} + +func NewPatternFlowVxlanFlagsMetricTag() PatternFlowVxlanFlagsMetricTag { + obj := patternFlowVxlanFlagsMetricTag{obj: &otg.PatternFlowVxlanFlagsMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVxlanFlagsMetricTag) msg() *otg.PatternFlowVxlanFlagsMetricTag { + return obj.obj +} + +func (obj *patternFlowVxlanFlagsMetricTag) setMsg(msg *otg.PatternFlowVxlanFlagsMetricTag) PatternFlowVxlanFlagsMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVxlanFlagsMetricTag struct { + obj *patternFlowVxlanFlagsMetricTag +} + +type marshalPatternFlowVxlanFlagsMetricTag interface { + // ToProto marshals PatternFlowVxlanFlagsMetricTag to protobuf object *otg.PatternFlowVxlanFlagsMetricTag + ToProto() (*otg.PatternFlowVxlanFlagsMetricTag, error) + // ToPbText marshals PatternFlowVxlanFlagsMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVxlanFlagsMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVxlanFlagsMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVxlanFlagsMetricTag struct { + obj *patternFlowVxlanFlagsMetricTag +} + +type unMarshalPatternFlowVxlanFlagsMetricTag interface { + // FromProto unmarshals PatternFlowVxlanFlagsMetricTag from protobuf object *otg.PatternFlowVxlanFlagsMetricTag + FromProto(msg *otg.PatternFlowVxlanFlagsMetricTag) (PatternFlowVxlanFlagsMetricTag, error) + // FromPbText unmarshals PatternFlowVxlanFlagsMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVxlanFlagsMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVxlanFlagsMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVxlanFlagsMetricTag) Marshal() marshalPatternFlowVxlanFlagsMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVxlanFlagsMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVxlanFlagsMetricTag) Unmarshal() unMarshalPatternFlowVxlanFlagsMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVxlanFlagsMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVxlanFlagsMetricTag) ToProto() (*otg.PatternFlowVxlanFlagsMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVxlanFlagsMetricTag) FromProto(msg *otg.PatternFlowVxlanFlagsMetricTag) (PatternFlowVxlanFlagsMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVxlanFlagsMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVxlanFlagsMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVxlanFlagsMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanFlagsMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVxlanFlagsMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanFlagsMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVxlanFlagsMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVxlanFlagsMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVxlanFlagsMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVxlanFlagsMetricTag) Clone() (PatternFlowVxlanFlagsMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVxlanFlagsMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVxlanFlagsMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowVxlanFlagsMetricTag interface { + Validation + // msg marshals PatternFlowVxlanFlagsMetricTag to protobuf object *otg.PatternFlowVxlanFlagsMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowVxlanFlagsMetricTag + // setMsg unmarshals PatternFlowVxlanFlagsMetricTag from protobuf object *otg.PatternFlowVxlanFlagsMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowVxlanFlagsMetricTag) PatternFlowVxlanFlagsMetricTag + // provides marshal interface + Marshal() marshalPatternFlowVxlanFlagsMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVxlanFlagsMetricTag + // validate validates PatternFlowVxlanFlagsMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVxlanFlagsMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowVxlanFlagsMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowVxlanFlagsMetricTag + SetName(value string) PatternFlowVxlanFlagsMetricTag + // Offset returns uint32, set in PatternFlowVxlanFlagsMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowVxlanFlagsMetricTag + SetOffset(value uint32) PatternFlowVxlanFlagsMetricTag + // HasOffset checks if Offset has been set in PatternFlowVxlanFlagsMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowVxlanFlagsMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowVxlanFlagsMetricTag + SetLength(value uint32) PatternFlowVxlanFlagsMetricTag + // HasLength checks if Length has been set in PatternFlowVxlanFlagsMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowVxlanFlagsMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowVxlanFlagsMetricTag object +func (obj *patternFlowVxlanFlagsMetricTag) SetName(value string) PatternFlowVxlanFlagsMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVxlanFlagsMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVxlanFlagsMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowVxlanFlagsMetricTag object +func (obj *patternFlowVxlanFlagsMetricTag) SetOffset(value uint32) PatternFlowVxlanFlagsMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVxlanFlagsMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVxlanFlagsMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowVxlanFlagsMetricTag object +func (obj *patternFlowVxlanFlagsMetricTag) SetLength(value uint32) PatternFlowVxlanFlagsMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowVxlanFlagsMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowVxlanFlagsMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanFlagsMetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowVxlanFlagsMetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowVxlanFlagsMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_vxlan_reserved0.go b/gosnappi/pattern_flow_vxlan_reserved0.go new file mode 100644 index 00000000..ceeca14d --- /dev/null +++ b/gosnappi/pattern_flow_vxlan_reserved0.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVxlanReserved0 ***** +type patternFlowVxlanReserved0 struct { + validation + obj *otg.PatternFlowVxlanReserved0 + marshaller marshalPatternFlowVxlanReserved0 + unMarshaller unMarshalPatternFlowVxlanReserved0 + incrementHolder PatternFlowVxlanReserved0Counter + decrementHolder PatternFlowVxlanReserved0Counter + metricTagsHolder PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter +} + +func NewPatternFlowVxlanReserved0() PatternFlowVxlanReserved0 { + obj := patternFlowVxlanReserved0{obj: &otg.PatternFlowVxlanReserved0{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVxlanReserved0) msg() *otg.PatternFlowVxlanReserved0 { + return obj.obj +} + +func (obj *patternFlowVxlanReserved0) setMsg(msg *otg.PatternFlowVxlanReserved0) PatternFlowVxlanReserved0 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVxlanReserved0 struct { + obj *patternFlowVxlanReserved0 +} + +type marshalPatternFlowVxlanReserved0 interface { + // ToProto marshals PatternFlowVxlanReserved0 to protobuf object *otg.PatternFlowVxlanReserved0 + ToProto() (*otg.PatternFlowVxlanReserved0, error) + // ToPbText marshals PatternFlowVxlanReserved0 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVxlanReserved0 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVxlanReserved0 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVxlanReserved0 struct { + obj *patternFlowVxlanReserved0 +} + +type unMarshalPatternFlowVxlanReserved0 interface { + // FromProto unmarshals PatternFlowVxlanReserved0 from protobuf object *otg.PatternFlowVxlanReserved0 + FromProto(msg *otg.PatternFlowVxlanReserved0) (PatternFlowVxlanReserved0, error) + // FromPbText unmarshals PatternFlowVxlanReserved0 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVxlanReserved0 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVxlanReserved0 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVxlanReserved0) Marshal() marshalPatternFlowVxlanReserved0 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVxlanReserved0{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVxlanReserved0) Unmarshal() unMarshalPatternFlowVxlanReserved0 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVxlanReserved0{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVxlanReserved0) ToProto() (*otg.PatternFlowVxlanReserved0, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVxlanReserved0) FromProto(msg *otg.PatternFlowVxlanReserved0) (PatternFlowVxlanReserved0, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVxlanReserved0) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVxlanReserved0) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVxlanReserved0) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanReserved0) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVxlanReserved0) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanReserved0) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVxlanReserved0) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVxlanReserved0) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVxlanReserved0) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVxlanReserved0) Clone() (PatternFlowVxlanReserved0, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVxlanReserved0() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowVxlanReserved0) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowVxlanReserved0 is reserved field +type PatternFlowVxlanReserved0 interface { + Validation + // msg marshals PatternFlowVxlanReserved0 to protobuf object *otg.PatternFlowVxlanReserved0 + // and doesn't set defaults + msg() *otg.PatternFlowVxlanReserved0 + // setMsg unmarshals PatternFlowVxlanReserved0 from protobuf object *otg.PatternFlowVxlanReserved0 + // and doesn't set defaults + setMsg(*otg.PatternFlowVxlanReserved0) PatternFlowVxlanReserved0 + // provides marshal interface + Marshal() marshalPatternFlowVxlanReserved0 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVxlanReserved0 + // validate validates PatternFlowVxlanReserved0 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVxlanReserved0, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowVxlanReserved0ChoiceEnum, set in PatternFlowVxlanReserved0 + Choice() PatternFlowVxlanReserved0ChoiceEnum + // setChoice assigns PatternFlowVxlanReserved0ChoiceEnum provided by user to PatternFlowVxlanReserved0 + setChoice(value PatternFlowVxlanReserved0ChoiceEnum) PatternFlowVxlanReserved0 + // HasChoice checks if Choice has been set in PatternFlowVxlanReserved0 + HasChoice() bool + // Value returns uint32, set in PatternFlowVxlanReserved0. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowVxlanReserved0 + SetValue(value uint32) PatternFlowVxlanReserved0 + // HasValue checks if Value has been set in PatternFlowVxlanReserved0 + HasValue() bool + // Values returns []uint32, set in PatternFlowVxlanReserved0. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowVxlanReserved0 + SetValues(value []uint32) PatternFlowVxlanReserved0 + // Increment returns PatternFlowVxlanReserved0Counter, set in PatternFlowVxlanReserved0. + // PatternFlowVxlanReserved0Counter is integer counter pattern + Increment() PatternFlowVxlanReserved0Counter + // SetIncrement assigns PatternFlowVxlanReserved0Counter provided by user to PatternFlowVxlanReserved0. + // PatternFlowVxlanReserved0Counter is integer counter pattern + SetIncrement(value PatternFlowVxlanReserved0Counter) PatternFlowVxlanReserved0 + // HasIncrement checks if Increment has been set in PatternFlowVxlanReserved0 + HasIncrement() bool + // Decrement returns PatternFlowVxlanReserved0Counter, set in PatternFlowVxlanReserved0. + // PatternFlowVxlanReserved0Counter is integer counter pattern + Decrement() PatternFlowVxlanReserved0Counter + // SetDecrement assigns PatternFlowVxlanReserved0Counter provided by user to PatternFlowVxlanReserved0. + // PatternFlowVxlanReserved0Counter is integer counter pattern + SetDecrement(value PatternFlowVxlanReserved0Counter) PatternFlowVxlanReserved0 + // HasDecrement checks if Decrement has been set in PatternFlowVxlanReserved0 + HasDecrement() bool + // MetricTags returns PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIterIter, set in PatternFlowVxlanReserved0 + MetricTags() PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter + setNil() +} + +type PatternFlowVxlanReserved0ChoiceEnum string + +// Enum of Choice on PatternFlowVxlanReserved0 +var PatternFlowVxlanReserved0Choice = struct { + VALUE PatternFlowVxlanReserved0ChoiceEnum + VALUES PatternFlowVxlanReserved0ChoiceEnum + INCREMENT PatternFlowVxlanReserved0ChoiceEnum + DECREMENT PatternFlowVxlanReserved0ChoiceEnum +}{ + VALUE: PatternFlowVxlanReserved0ChoiceEnum("value"), + VALUES: PatternFlowVxlanReserved0ChoiceEnum("values"), + INCREMENT: PatternFlowVxlanReserved0ChoiceEnum("increment"), + DECREMENT: PatternFlowVxlanReserved0ChoiceEnum("decrement"), +} + +func (obj *patternFlowVxlanReserved0) Choice() PatternFlowVxlanReserved0ChoiceEnum { + return PatternFlowVxlanReserved0ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowVxlanReserved0) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowVxlanReserved0) setChoice(value PatternFlowVxlanReserved0ChoiceEnum) PatternFlowVxlanReserved0 { + intValue, ok := otg.PatternFlowVxlanReserved0_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowVxlanReserved0ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowVxlanReserved0_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowVxlanReserved0Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowVxlanReserved0Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowVxlanReserved0Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowVxlanReserved0Counter().msg() + } + + if value == PatternFlowVxlanReserved0Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowVxlanReserved0Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVxlanReserved0) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowVxlanReserved0Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVxlanReserved0) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowVxlanReserved0 object +func (obj *patternFlowVxlanReserved0) SetValue(value uint32) PatternFlowVxlanReserved0 { + obj.setChoice(PatternFlowVxlanReserved0Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowVxlanReserved0) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowVxlanReserved0 object +func (obj *patternFlowVxlanReserved0) SetValues(value []uint32) PatternFlowVxlanReserved0 { + obj.setChoice(PatternFlowVxlanReserved0Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowVxlanReserved0Counter +func (obj *patternFlowVxlanReserved0) Increment() PatternFlowVxlanReserved0Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowVxlanReserved0Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowVxlanReserved0Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowVxlanReserved0Counter +func (obj *patternFlowVxlanReserved0) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowVxlanReserved0Counter value in the PatternFlowVxlanReserved0 object +func (obj *patternFlowVxlanReserved0) SetIncrement(value PatternFlowVxlanReserved0Counter) PatternFlowVxlanReserved0 { + obj.setChoice(PatternFlowVxlanReserved0Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowVxlanReserved0Counter +func (obj *patternFlowVxlanReserved0) Decrement() PatternFlowVxlanReserved0Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowVxlanReserved0Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowVxlanReserved0Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowVxlanReserved0Counter +func (obj *patternFlowVxlanReserved0) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowVxlanReserved0Counter value in the PatternFlowVxlanReserved0 object +func (obj *patternFlowVxlanReserved0) SetDecrement(value PatternFlowVxlanReserved0Counter) PatternFlowVxlanReserved0 { + obj.setChoice(PatternFlowVxlanReserved0Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowVxlanReserved0MetricTag +func (obj *patternFlowVxlanReserved0) MetricTags() PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowVxlanReserved0MetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter struct { + obj *patternFlowVxlanReserved0 + patternFlowVxlanReserved0MetricTagSlice []PatternFlowVxlanReserved0MetricTag + fieldPtr *[]*otg.PatternFlowVxlanReserved0MetricTag +} + +func newPatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter(ptr *[]*otg.PatternFlowVxlanReserved0MetricTag) PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter { + return &patternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter{fieldPtr: ptr} +} + +type PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter interface { + setMsg(*patternFlowVxlanReserved0) PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter + Items() []PatternFlowVxlanReserved0MetricTag + Add() PatternFlowVxlanReserved0MetricTag + Append(items ...PatternFlowVxlanReserved0MetricTag) PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter + Set(index int, newObj PatternFlowVxlanReserved0MetricTag) PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter + Clear() PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter + clearHolderSlice() PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter + appendHolderSlice(item PatternFlowVxlanReserved0MetricTag) PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter +} + +func (obj *patternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter) setMsg(msg *patternFlowVxlanReserved0) PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowVxlanReserved0MetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter) Items() []PatternFlowVxlanReserved0MetricTag { + return obj.patternFlowVxlanReserved0MetricTagSlice +} + +func (obj *patternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter) Add() PatternFlowVxlanReserved0MetricTag { + newObj := &otg.PatternFlowVxlanReserved0MetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowVxlanReserved0MetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowVxlanReserved0MetricTagSlice = append(obj.patternFlowVxlanReserved0MetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter) Append(items ...PatternFlowVxlanReserved0MetricTag) PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowVxlanReserved0MetricTagSlice = append(obj.patternFlowVxlanReserved0MetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter) Set(index int, newObj PatternFlowVxlanReserved0MetricTag) PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowVxlanReserved0MetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter) Clear() PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowVxlanReserved0MetricTag{} + obj.patternFlowVxlanReserved0MetricTagSlice = []PatternFlowVxlanReserved0MetricTag{} + } + return obj +} +func (obj *patternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter) clearHolderSlice() PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter { + if len(obj.patternFlowVxlanReserved0MetricTagSlice) > 0 { + obj.patternFlowVxlanReserved0MetricTagSlice = []PatternFlowVxlanReserved0MetricTag{} + } + return obj +} +func (obj *patternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter) appendHolderSlice(item PatternFlowVxlanReserved0MetricTag) PatternFlowVxlanReserved0PatternFlowVxlanReserved0MetricTagIter { + obj.patternFlowVxlanReserved0MetricTagSlice = append(obj.patternFlowVxlanReserved0MetricTagSlice, item) + return obj +} + +func (obj *patternFlowVxlanReserved0) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanReserved0.Value <= 16777215 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowVxlanReserved0.Values <= 16777215 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowVxlanReserved0MetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowVxlanReserved0) setDefault() { + var choices_set int = 0 + var choice PatternFlowVxlanReserved0ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowVxlanReserved0Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowVxlanReserved0Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowVxlanReserved0Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowVxlanReserved0Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowVxlanReserved0Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowVxlanReserved0") + } + } else { + intVal := otg.PatternFlowVxlanReserved0_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowVxlanReserved0_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_vxlan_reserved0_counter.go b/gosnappi/pattern_flow_vxlan_reserved0_counter.go new file mode 100644 index 00000000..17394c70 --- /dev/null +++ b/gosnappi/pattern_flow_vxlan_reserved0_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVxlanReserved0Counter ***** +type patternFlowVxlanReserved0Counter struct { + validation + obj *otg.PatternFlowVxlanReserved0Counter + marshaller marshalPatternFlowVxlanReserved0Counter + unMarshaller unMarshalPatternFlowVxlanReserved0Counter +} + +func NewPatternFlowVxlanReserved0Counter() PatternFlowVxlanReserved0Counter { + obj := patternFlowVxlanReserved0Counter{obj: &otg.PatternFlowVxlanReserved0Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVxlanReserved0Counter) msg() *otg.PatternFlowVxlanReserved0Counter { + return obj.obj +} + +func (obj *patternFlowVxlanReserved0Counter) setMsg(msg *otg.PatternFlowVxlanReserved0Counter) PatternFlowVxlanReserved0Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVxlanReserved0Counter struct { + obj *patternFlowVxlanReserved0Counter +} + +type marshalPatternFlowVxlanReserved0Counter interface { + // ToProto marshals PatternFlowVxlanReserved0Counter to protobuf object *otg.PatternFlowVxlanReserved0Counter + ToProto() (*otg.PatternFlowVxlanReserved0Counter, error) + // ToPbText marshals PatternFlowVxlanReserved0Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVxlanReserved0Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVxlanReserved0Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVxlanReserved0Counter struct { + obj *patternFlowVxlanReserved0Counter +} + +type unMarshalPatternFlowVxlanReserved0Counter interface { + // FromProto unmarshals PatternFlowVxlanReserved0Counter from protobuf object *otg.PatternFlowVxlanReserved0Counter + FromProto(msg *otg.PatternFlowVxlanReserved0Counter) (PatternFlowVxlanReserved0Counter, error) + // FromPbText unmarshals PatternFlowVxlanReserved0Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVxlanReserved0Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVxlanReserved0Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVxlanReserved0Counter) Marshal() marshalPatternFlowVxlanReserved0Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVxlanReserved0Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVxlanReserved0Counter) Unmarshal() unMarshalPatternFlowVxlanReserved0Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVxlanReserved0Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVxlanReserved0Counter) ToProto() (*otg.PatternFlowVxlanReserved0Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVxlanReserved0Counter) FromProto(msg *otg.PatternFlowVxlanReserved0Counter) (PatternFlowVxlanReserved0Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVxlanReserved0Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVxlanReserved0Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVxlanReserved0Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanReserved0Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVxlanReserved0Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanReserved0Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVxlanReserved0Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVxlanReserved0Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVxlanReserved0Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVxlanReserved0Counter) Clone() (PatternFlowVxlanReserved0Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVxlanReserved0Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVxlanReserved0Counter is integer counter pattern +type PatternFlowVxlanReserved0Counter interface { + Validation + // msg marshals PatternFlowVxlanReserved0Counter to protobuf object *otg.PatternFlowVxlanReserved0Counter + // and doesn't set defaults + msg() *otg.PatternFlowVxlanReserved0Counter + // setMsg unmarshals PatternFlowVxlanReserved0Counter from protobuf object *otg.PatternFlowVxlanReserved0Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowVxlanReserved0Counter) PatternFlowVxlanReserved0Counter + // provides marshal interface + Marshal() marshalPatternFlowVxlanReserved0Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVxlanReserved0Counter + // validate validates PatternFlowVxlanReserved0Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVxlanReserved0Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowVxlanReserved0Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowVxlanReserved0Counter + SetStart(value uint32) PatternFlowVxlanReserved0Counter + // HasStart checks if Start has been set in PatternFlowVxlanReserved0Counter + HasStart() bool + // Step returns uint32, set in PatternFlowVxlanReserved0Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowVxlanReserved0Counter + SetStep(value uint32) PatternFlowVxlanReserved0Counter + // HasStep checks if Step has been set in PatternFlowVxlanReserved0Counter + HasStep() bool + // Count returns uint32, set in PatternFlowVxlanReserved0Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowVxlanReserved0Counter + SetCount(value uint32) PatternFlowVxlanReserved0Counter + // HasCount checks if Count has been set in PatternFlowVxlanReserved0Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVxlanReserved0Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVxlanReserved0Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowVxlanReserved0Counter object +func (obj *patternFlowVxlanReserved0Counter) SetStart(value uint32) PatternFlowVxlanReserved0Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVxlanReserved0Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVxlanReserved0Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowVxlanReserved0Counter object +func (obj *patternFlowVxlanReserved0Counter) SetStep(value uint32) PatternFlowVxlanReserved0Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVxlanReserved0Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVxlanReserved0Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowVxlanReserved0Counter object +func (obj *patternFlowVxlanReserved0Counter) SetCount(value uint32) PatternFlowVxlanReserved0Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowVxlanReserved0Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanReserved0Counter.Start <= 16777215 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanReserved0Counter.Step <= 16777215 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanReserved0Counter.Count <= 16777215 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowVxlanReserved0Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_vxlan_reserved0_metric_tag.go b/gosnappi/pattern_flow_vxlan_reserved0_metric_tag.go new file mode 100644 index 00000000..cdd29a97 --- /dev/null +++ b/gosnappi/pattern_flow_vxlan_reserved0_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVxlanReserved0MetricTag ***** +type patternFlowVxlanReserved0MetricTag struct { + validation + obj *otg.PatternFlowVxlanReserved0MetricTag + marshaller marshalPatternFlowVxlanReserved0MetricTag + unMarshaller unMarshalPatternFlowVxlanReserved0MetricTag +} + +func NewPatternFlowVxlanReserved0MetricTag() PatternFlowVxlanReserved0MetricTag { + obj := patternFlowVxlanReserved0MetricTag{obj: &otg.PatternFlowVxlanReserved0MetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVxlanReserved0MetricTag) msg() *otg.PatternFlowVxlanReserved0MetricTag { + return obj.obj +} + +func (obj *patternFlowVxlanReserved0MetricTag) setMsg(msg *otg.PatternFlowVxlanReserved0MetricTag) PatternFlowVxlanReserved0MetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVxlanReserved0MetricTag struct { + obj *patternFlowVxlanReserved0MetricTag +} + +type marshalPatternFlowVxlanReserved0MetricTag interface { + // ToProto marshals PatternFlowVxlanReserved0MetricTag to protobuf object *otg.PatternFlowVxlanReserved0MetricTag + ToProto() (*otg.PatternFlowVxlanReserved0MetricTag, error) + // ToPbText marshals PatternFlowVxlanReserved0MetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVxlanReserved0MetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVxlanReserved0MetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVxlanReserved0MetricTag struct { + obj *patternFlowVxlanReserved0MetricTag +} + +type unMarshalPatternFlowVxlanReserved0MetricTag interface { + // FromProto unmarshals PatternFlowVxlanReserved0MetricTag from protobuf object *otg.PatternFlowVxlanReserved0MetricTag + FromProto(msg *otg.PatternFlowVxlanReserved0MetricTag) (PatternFlowVxlanReserved0MetricTag, error) + // FromPbText unmarshals PatternFlowVxlanReserved0MetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVxlanReserved0MetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVxlanReserved0MetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVxlanReserved0MetricTag) Marshal() marshalPatternFlowVxlanReserved0MetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVxlanReserved0MetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVxlanReserved0MetricTag) Unmarshal() unMarshalPatternFlowVxlanReserved0MetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVxlanReserved0MetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVxlanReserved0MetricTag) ToProto() (*otg.PatternFlowVxlanReserved0MetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVxlanReserved0MetricTag) FromProto(msg *otg.PatternFlowVxlanReserved0MetricTag) (PatternFlowVxlanReserved0MetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVxlanReserved0MetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVxlanReserved0MetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVxlanReserved0MetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanReserved0MetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVxlanReserved0MetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanReserved0MetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVxlanReserved0MetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVxlanReserved0MetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVxlanReserved0MetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVxlanReserved0MetricTag) Clone() (PatternFlowVxlanReserved0MetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVxlanReserved0MetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVxlanReserved0MetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowVxlanReserved0MetricTag interface { + Validation + // msg marshals PatternFlowVxlanReserved0MetricTag to protobuf object *otg.PatternFlowVxlanReserved0MetricTag + // and doesn't set defaults + msg() *otg.PatternFlowVxlanReserved0MetricTag + // setMsg unmarshals PatternFlowVxlanReserved0MetricTag from protobuf object *otg.PatternFlowVxlanReserved0MetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowVxlanReserved0MetricTag) PatternFlowVxlanReserved0MetricTag + // provides marshal interface + Marshal() marshalPatternFlowVxlanReserved0MetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVxlanReserved0MetricTag + // validate validates PatternFlowVxlanReserved0MetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVxlanReserved0MetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowVxlanReserved0MetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowVxlanReserved0MetricTag + SetName(value string) PatternFlowVxlanReserved0MetricTag + // Offset returns uint32, set in PatternFlowVxlanReserved0MetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowVxlanReserved0MetricTag + SetOffset(value uint32) PatternFlowVxlanReserved0MetricTag + // HasOffset checks if Offset has been set in PatternFlowVxlanReserved0MetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowVxlanReserved0MetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowVxlanReserved0MetricTag + SetLength(value uint32) PatternFlowVxlanReserved0MetricTag + // HasLength checks if Length has been set in PatternFlowVxlanReserved0MetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowVxlanReserved0MetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowVxlanReserved0MetricTag object +func (obj *patternFlowVxlanReserved0MetricTag) SetName(value string) PatternFlowVxlanReserved0MetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVxlanReserved0MetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVxlanReserved0MetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowVxlanReserved0MetricTag object +func (obj *patternFlowVxlanReserved0MetricTag) SetOffset(value uint32) PatternFlowVxlanReserved0MetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVxlanReserved0MetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVxlanReserved0MetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowVxlanReserved0MetricTag object +func (obj *patternFlowVxlanReserved0MetricTag) SetLength(value uint32) PatternFlowVxlanReserved0MetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowVxlanReserved0MetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowVxlanReserved0MetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 23 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanReserved0MetricTag.Offset <= 23 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 24 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowVxlanReserved0MetricTag.Length <= 24 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowVxlanReserved0MetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(24) + } + +} diff --git a/gosnappi/pattern_flow_vxlan_reserved1.go b/gosnappi/pattern_flow_vxlan_reserved1.go new file mode 100644 index 00000000..ad6da0d7 --- /dev/null +++ b/gosnappi/pattern_flow_vxlan_reserved1.go @@ -0,0 +1,663 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVxlanReserved1 ***** +type patternFlowVxlanReserved1 struct { + validation + obj *otg.PatternFlowVxlanReserved1 + marshaller marshalPatternFlowVxlanReserved1 + unMarshaller unMarshalPatternFlowVxlanReserved1 + incrementHolder PatternFlowVxlanReserved1Counter + decrementHolder PatternFlowVxlanReserved1Counter + metricTagsHolder PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter +} + +func NewPatternFlowVxlanReserved1() PatternFlowVxlanReserved1 { + obj := patternFlowVxlanReserved1{obj: &otg.PatternFlowVxlanReserved1{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVxlanReserved1) msg() *otg.PatternFlowVxlanReserved1 { + return obj.obj +} + +func (obj *patternFlowVxlanReserved1) setMsg(msg *otg.PatternFlowVxlanReserved1) PatternFlowVxlanReserved1 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVxlanReserved1 struct { + obj *patternFlowVxlanReserved1 +} + +type marshalPatternFlowVxlanReserved1 interface { + // ToProto marshals PatternFlowVxlanReserved1 to protobuf object *otg.PatternFlowVxlanReserved1 + ToProto() (*otg.PatternFlowVxlanReserved1, error) + // ToPbText marshals PatternFlowVxlanReserved1 to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVxlanReserved1 to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVxlanReserved1 to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVxlanReserved1 struct { + obj *patternFlowVxlanReserved1 +} + +type unMarshalPatternFlowVxlanReserved1 interface { + // FromProto unmarshals PatternFlowVxlanReserved1 from protobuf object *otg.PatternFlowVxlanReserved1 + FromProto(msg *otg.PatternFlowVxlanReserved1) (PatternFlowVxlanReserved1, error) + // FromPbText unmarshals PatternFlowVxlanReserved1 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVxlanReserved1 from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVxlanReserved1 from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVxlanReserved1) Marshal() marshalPatternFlowVxlanReserved1 { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVxlanReserved1{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVxlanReserved1) Unmarshal() unMarshalPatternFlowVxlanReserved1 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVxlanReserved1{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVxlanReserved1) ToProto() (*otg.PatternFlowVxlanReserved1, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVxlanReserved1) FromProto(msg *otg.PatternFlowVxlanReserved1) (PatternFlowVxlanReserved1, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVxlanReserved1) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVxlanReserved1) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVxlanReserved1) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanReserved1) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVxlanReserved1) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanReserved1) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVxlanReserved1) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVxlanReserved1) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVxlanReserved1) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVxlanReserved1) Clone() (PatternFlowVxlanReserved1, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVxlanReserved1() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowVxlanReserved1) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowVxlanReserved1 is reserved field +type PatternFlowVxlanReserved1 interface { + Validation + // msg marshals PatternFlowVxlanReserved1 to protobuf object *otg.PatternFlowVxlanReserved1 + // and doesn't set defaults + msg() *otg.PatternFlowVxlanReserved1 + // setMsg unmarshals PatternFlowVxlanReserved1 from protobuf object *otg.PatternFlowVxlanReserved1 + // and doesn't set defaults + setMsg(*otg.PatternFlowVxlanReserved1) PatternFlowVxlanReserved1 + // provides marshal interface + Marshal() marshalPatternFlowVxlanReserved1 + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVxlanReserved1 + // validate validates PatternFlowVxlanReserved1 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVxlanReserved1, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowVxlanReserved1ChoiceEnum, set in PatternFlowVxlanReserved1 + Choice() PatternFlowVxlanReserved1ChoiceEnum + // setChoice assigns PatternFlowVxlanReserved1ChoiceEnum provided by user to PatternFlowVxlanReserved1 + setChoice(value PatternFlowVxlanReserved1ChoiceEnum) PatternFlowVxlanReserved1 + // HasChoice checks if Choice has been set in PatternFlowVxlanReserved1 + HasChoice() bool + // Value returns uint32, set in PatternFlowVxlanReserved1. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowVxlanReserved1 + SetValue(value uint32) PatternFlowVxlanReserved1 + // HasValue checks if Value has been set in PatternFlowVxlanReserved1 + HasValue() bool + // Values returns []uint32, set in PatternFlowVxlanReserved1. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowVxlanReserved1 + SetValues(value []uint32) PatternFlowVxlanReserved1 + // Increment returns PatternFlowVxlanReserved1Counter, set in PatternFlowVxlanReserved1. + // PatternFlowVxlanReserved1Counter is integer counter pattern + Increment() PatternFlowVxlanReserved1Counter + // SetIncrement assigns PatternFlowVxlanReserved1Counter provided by user to PatternFlowVxlanReserved1. + // PatternFlowVxlanReserved1Counter is integer counter pattern + SetIncrement(value PatternFlowVxlanReserved1Counter) PatternFlowVxlanReserved1 + // HasIncrement checks if Increment has been set in PatternFlowVxlanReserved1 + HasIncrement() bool + // Decrement returns PatternFlowVxlanReserved1Counter, set in PatternFlowVxlanReserved1. + // PatternFlowVxlanReserved1Counter is integer counter pattern + Decrement() PatternFlowVxlanReserved1Counter + // SetDecrement assigns PatternFlowVxlanReserved1Counter provided by user to PatternFlowVxlanReserved1. + // PatternFlowVxlanReserved1Counter is integer counter pattern + SetDecrement(value PatternFlowVxlanReserved1Counter) PatternFlowVxlanReserved1 + // HasDecrement checks if Decrement has been set in PatternFlowVxlanReserved1 + HasDecrement() bool + // MetricTags returns PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIterIter, set in PatternFlowVxlanReserved1 + MetricTags() PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter + setNil() +} + +type PatternFlowVxlanReserved1ChoiceEnum string + +// Enum of Choice on PatternFlowVxlanReserved1 +var PatternFlowVxlanReserved1Choice = struct { + VALUE PatternFlowVxlanReserved1ChoiceEnum + VALUES PatternFlowVxlanReserved1ChoiceEnum + INCREMENT PatternFlowVxlanReserved1ChoiceEnum + DECREMENT PatternFlowVxlanReserved1ChoiceEnum +}{ + VALUE: PatternFlowVxlanReserved1ChoiceEnum("value"), + VALUES: PatternFlowVxlanReserved1ChoiceEnum("values"), + INCREMENT: PatternFlowVxlanReserved1ChoiceEnum("increment"), + DECREMENT: PatternFlowVxlanReserved1ChoiceEnum("decrement"), +} + +func (obj *patternFlowVxlanReserved1) Choice() PatternFlowVxlanReserved1ChoiceEnum { + return PatternFlowVxlanReserved1ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowVxlanReserved1) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowVxlanReserved1) setChoice(value PatternFlowVxlanReserved1ChoiceEnum) PatternFlowVxlanReserved1 { + intValue, ok := otg.PatternFlowVxlanReserved1_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowVxlanReserved1ChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowVxlanReserved1_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowVxlanReserved1Choice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowVxlanReserved1Choice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowVxlanReserved1Choice.INCREMENT { + obj.obj.Increment = NewPatternFlowVxlanReserved1Counter().msg() + } + + if value == PatternFlowVxlanReserved1Choice.DECREMENT { + obj.obj.Decrement = NewPatternFlowVxlanReserved1Counter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVxlanReserved1) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowVxlanReserved1Choice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVxlanReserved1) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowVxlanReserved1 object +func (obj *patternFlowVxlanReserved1) SetValue(value uint32) PatternFlowVxlanReserved1 { + obj.setChoice(PatternFlowVxlanReserved1Choice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowVxlanReserved1) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowVxlanReserved1 object +func (obj *patternFlowVxlanReserved1) SetValues(value []uint32) PatternFlowVxlanReserved1 { + obj.setChoice(PatternFlowVxlanReserved1Choice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// description is TBD +// Increment returns a PatternFlowVxlanReserved1Counter +func (obj *patternFlowVxlanReserved1) Increment() PatternFlowVxlanReserved1Counter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowVxlanReserved1Choice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowVxlanReserved1Counter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowVxlanReserved1Counter +func (obj *patternFlowVxlanReserved1) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowVxlanReserved1Counter value in the PatternFlowVxlanReserved1 object +func (obj *patternFlowVxlanReserved1) SetIncrement(value PatternFlowVxlanReserved1Counter) PatternFlowVxlanReserved1 { + obj.setChoice(PatternFlowVxlanReserved1Choice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowVxlanReserved1Counter +func (obj *patternFlowVxlanReserved1) Decrement() PatternFlowVxlanReserved1Counter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowVxlanReserved1Choice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowVxlanReserved1Counter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowVxlanReserved1Counter +func (obj *patternFlowVxlanReserved1) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowVxlanReserved1Counter value in the PatternFlowVxlanReserved1 object +func (obj *patternFlowVxlanReserved1) SetDecrement(value PatternFlowVxlanReserved1Counter) PatternFlowVxlanReserved1 { + obj.setChoice(PatternFlowVxlanReserved1Choice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowVxlanReserved1MetricTag +func (obj *patternFlowVxlanReserved1) MetricTags() PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowVxlanReserved1MetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter struct { + obj *patternFlowVxlanReserved1 + patternFlowVxlanReserved1MetricTagSlice []PatternFlowVxlanReserved1MetricTag + fieldPtr *[]*otg.PatternFlowVxlanReserved1MetricTag +} + +func newPatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter(ptr *[]*otg.PatternFlowVxlanReserved1MetricTag) PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter { + return &patternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter{fieldPtr: ptr} +} + +type PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter interface { + setMsg(*patternFlowVxlanReserved1) PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter + Items() []PatternFlowVxlanReserved1MetricTag + Add() PatternFlowVxlanReserved1MetricTag + Append(items ...PatternFlowVxlanReserved1MetricTag) PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter + Set(index int, newObj PatternFlowVxlanReserved1MetricTag) PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter + Clear() PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter + clearHolderSlice() PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter + appendHolderSlice(item PatternFlowVxlanReserved1MetricTag) PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter +} + +func (obj *patternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter) setMsg(msg *patternFlowVxlanReserved1) PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowVxlanReserved1MetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter) Items() []PatternFlowVxlanReserved1MetricTag { + return obj.patternFlowVxlanReserved1MetricTagSlice +} + +func (obj *patternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter) Add() PatternFlowVxlanReserved1MetricTag { + newObj := &otg.PatternFlowVxlanReserved1MetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowVxlanReserved1MetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowVxlanReserved1MetricTagSlice = append(obj.patternFlowVxlanReserved1MetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter) Append(items ...PatternFlowVxlanReserved1MetricTag) PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowVxlanReserved1MetricTagSlice = append(obj.patternFlowVxlanReserved1MetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter) Set(index int, newObj PatternFlowVxlanReserved1MetricTag) PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowVxlanReserved1MetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter) Clear() PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowVxlanReserved1MetricTag{} + obj.patternFlowVxlanReserved1MetricTagSlice = []PatternFlowVxlanReserved1MetricTag{} + } + return obj +} +func (obj *patternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter) clearHolderSlice() PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter { + if len(obj.patternFlowVxlanReserved1MetricTagSlice) > 0 { + obj.patternFlowVxlanReserved1MetricTagSlice = []PatternFlowVxlanReserved1MetricTag{} + } + return obj +} +func (obj *patternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter) appendHolderSlice(item PatternFlowVxlanReserved1MetricTag) PatternFlowVxlanReserved1PatternFlowVxlanReserved1MetricTagIter { + obj.patternFlowVxlanReserved1MetricTagSlice = append(obj.patternFlowVxlanReserved1MetricTagSlice, item) + return obj +} + +func (obj *patternFlowVxlanReserved1) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanReserved1.Value <= 255 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowVxlanReserved1.Values <= 255 but Got %d", item)) + } + + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowVxlanReserved1MetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowVxlanReserved1) setDefault() { + var choices_set int = 0 + var choice PatternFlowVxlanReserved1ChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowVxlanReserved1Choice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowVxlanReserved1Choice.VALUES + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowVxlanReserved1Choice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowVxlanReserved1Choice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowVxlanReserved1Choice.VALUE) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowVxlanReserved1") + } + } else { + intVal := otg.PatternFlowVxlanReserved1_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowVxlanReserved1_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_vxlan_reserved1_counter.go b/gosnappi/pattern_flow_vxlan_reserved1_counter.go new file mode 100644 index 00000000..260ddae3 --- /dev/null +++ b/gosnappi/pattern_flow_vxlan_reserved1_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVxlanReserved1Counter ***** +type patternFlowVxlanReserved1Counter struct { + validation + obj *otg.PatternFlowVxlanReserved1Counter + marshaller marshalPatternFlowVxlanReserved1Counter + unMarshaller unMarshalPatternFlowVxlanReserved1Counter +} + +func NewPatternFlowVxlanReserved1Counter() PatternFlowVxlanReserved1Counter { + obj := patternFlowVxlanReserved1Counter{obj: &otg.PatternFlowVxlanReserved1Counter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVxlanReserved1Counter) msg() *otg.PatternFlowVxlanReserved1Counter { + return obj.obj +} + +func (obj *patternFlowVxlanReserved1Counter) setMsg(msg *otg.PatternFlowVxlanReserved1Counter) PatternFlowVxlanReserved1Counter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVxlanReserved1Counter struct { + obj *patternFlowVxlanReserved1Counter +} + +type marshalPatternFlowVxlanReserved1Counter interface { + // ToProto marshals PatternFlowVxlanReserved1Counter to protobuf object *otg.PatternFlowVxlanReserved1Counter + ToProto() (*otg.PatternFlowVxlanReserved1Counter, error) + // ToPbText marshals PatternFlowVxlanReserved1Counter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVxlanReserved1Counter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVxlanReserved1Counter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVxlanReserved1Counter struct { + obj *patternFlowVxlanReserved1Counter +} + +type unMarshalPatternFlowVxlanReserved1Counter interface { + // FromProto unmarshals PatternFlowVxlanReserved1Counter from protobuf object *otg.PatternFlowVxlanReserved1Counter + FromProto(msg *otg.PatternFlowVxlanReserved1Counter) (PatternFlowVxlanReserved1Counter, error) + // FromPbText unmarshals PatternFlowVxlanReserved1Counter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVxlanReserved1Counter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVxlanReserved1Counter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVxlanReserved1Counter) Marshal() marshalPatternFlowVxlanReserved1Counter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVxlanReserved1Counter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVxlanReserved1Counter) Unmarshal() unMarshalPatternFlowVxlanReserved1Counter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVxlanReserved1Counter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVxlanReserved1Counter) ToProto() (*otg.PatternFlowVxlanReserved1Counter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVxlanReserved1Counter) FromProto(msg *otg.PatternFlowVxlanReserved1Counter) (PatternFlowVxlanReserved1Counter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVxlanReserved1Counter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVxlanReserved1Counter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVxlanReserved1Counter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanReserved1Counter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVxlanReserved1Counter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanReserved1Counter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVxlanReserved1Counter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVxlanReserved1Counter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVxlanReserved1Counter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVxlanReserved1Counter) Clone() (PatternFlowVxlanReserved1Counter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVxlanReserved1Counter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVxlanReserved1Counter is integer counter pattern +type PatternFlowVxlanReserved1Counter interface { + Validation + // msg marshals PatternFlowVxlanReserved1Counter to protobuf object *otg.PatternFlowVxlanReserved1Counter + // and doesn't set defaults + msg() *otg.PatternFlowVxlanReserved1Counter + // setMsg unmarshals PatternFlowVxlanReserved1Counter from protobuf object *otg.PatternFlowVxlanReserved1Counter + // and doesn't set defaults + setMsg(*otg.PatternFlowVxlanReserved1Counter) PatternFlowVxlanReserved1Counter + // provides marshal interface + Marshal() marshalPatternFlowVxlanReserved1Counter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVxlanReserved1Counter + // validate validates PatternFlowVxlanReserved1Counter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVxlanReserved1Counter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowVxlanReserved1Counter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowVxlanReserved1Counter + SetStart(value uint32) PatternFlowVxlanReserved1Counter + // HasStart checks if Start has been set in PatternFlowVxlanReserved1Counter + HasStart() bool + // Step returns uint32, set in PatternFlowVxlanReserved1Counter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowVxlanReserved1Counter + SetStep(value uint32) PatternFlowVxlanReserved1Counter + // HasStep checks if Step has been set in PatternFlowVxlanReserved1Counter + HasStep() bool + // Count returns uint32, set in PatternFlowVxlanReserved1Counter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowVxlanReserved1Counter + SetCount(value uint32) PatternFlowVxlanReserved1Counter + // HasCount checks if Count has been set in PatternFlowVxlanReserved1Counter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVxlanReserved1Counter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVxlanReserved1Counter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowVxlanReserved1Counter object +func (obj *patternFlowVxlanReserved1Counter) SetStart(value uint32) PatternFlowVxlanReserved1Counter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVxlanReserved1Counter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVxlanReserved1Counter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowVxlanReserved1Counter object +func (obj *patternFlowVxlanReserved1Counter) SetStep(value uint32) PatternFlowVxlanReserved1Counter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVxlanReserved1Counter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVxlanReserved1Counter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowVxlanReserved1Counter object +func (obj *patternFlowVxlanReserved1Counter) SetCount(value uint32) PatternFlowVxlanReserved1Counter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowVxlanReserved1Counter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanReserved1Counter.Start <= 255 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanReserved1Counter.Step <= 255 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanReserved1Counter.Count <= 255 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowVxlanReserved1Counter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_vxlan_reserved1_metric_tag.go b/gosnappi/pattern_flow_vxlan_reserved1_metric_tag.go new file mode 100644 index 00000000..1a9ae0b0 --- /dev/null +++ b/gosnappi/pattern_flow_vxlan_reserved1_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVxlanReserved1MetricTag ***** +type patternFlowVxlanReserved1MetricTag struct { + validation + obj *otg.PatternFlowVxlanReserved1MetricTag + marshaller marshalPatternFlowVxlanReserved1MetricTag + unMarshaller unMarshalPatternFlowVxlanReserved1MetricTag +} + +func NewPatternFlowVxlanReserved1MetricTag() PatternFlowVxlanReserved1MetricTag { + obj := patternFlowVxlanReserved1MetricTag{obj: &otg.PatternFlowVxlanReserved1MetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVxlanReserved1MetricTag) msg() *otg.PatternFlowVxlanReserved1MetricTag { + return obj.obj +} + +func (obj *patternFlowVxlanReserved1MetricTag) setMsg(msg *otg.PatternFlowVxlanReserved1MetricTag) PatternFlowVxlanReserved1MetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVxlanReserved1MetricTag struct { + obj *patternFlowVxlanReserved1MetricTag +} + +type marshalPatternFlowVxlanReserved1MetricTag interface { + // ToProto marshals PatternFlowVxlanReserved1MetricTag to protobuf object *otg.PatternFlowVxlanReserved1MetricTag + ToProto() (*otg.PatternFlowVxlanReserved1MetricTag, error) + // ToPbText marshals PatternFlowVxlanReserved1MetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVxlanReserved1MetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVxlanReserved1MetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVxlanReserved1MetricTag struct { + obj *patternFlowVxlanReserved1MetricTag +} + +type unMarshalPatternFlowVxlanReserved1MetricTag interface { + // FromProto unmarshals PatternFlowVxlanReserved1MetricTag from protobuf object *otg.PatternFlowVxlanReserved1MetricTag + FromProto(msg *otg.PatternFlowVxlanReserved1MetricTag) (PatternFlowVxlanReserved1MetricTag, error) + // FromPbText unmarshals PatternFlowVxlanReserved1MetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVxlanReserved1MetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVxlanReserved1MetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVxlanReserved1MetricTag) Marshal() marshalPatternFlowVxlanReserved1MetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVxlanReserved1MetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVxlanReserved1MetricTag) Unmarshal() unMarshalPatternFlowVxlanReserved1MetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVxlanReserved1MetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVxlanReserved1MetricTag) ToProto() (*otg.PatternFlowVxlanReserved1MetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVxlanReserved1MetricTag) FromProto(msg *otg.PatternFlowVxlanReserved1MetricTag) (PatternFlowVxlanReserved1MetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVxlanReserved1MetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVxlanReserved1MetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVxlanReserved1MetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanReserved1MetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVxlanReserved1MetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanReserved1MetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVxlanReserved1MetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVxlanReserved1MetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVxlanReserved1MetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVxlanReserved1MetricTag) Clone() (PatternFlowVxlanReserved1MetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVxlanReserved1MetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVxlanReserved1MetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowVxlanReserved1MetricTag interface { + Validation + // msg marshals PatternFlowVxlanReserved1MetricTag to protobuf object *otg.PatternFlowVxlanReserved1MetricTag + // and doesn't set defaults + msg() *otg.PatternFlowVxlanReserved1MetricTag + // setMsg unmarshals PatternFlowVxlanReserved1MetricTag from protobuf object *otg.PatternFlowVxlanReserved1MetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowVxlanReserved1MetricTag) PatternFlowVxlanReserved1MetricTag + // provides marshal interface + Marshal() marshalPatternFlowVxlanReserved1MetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVxlanReserved1MetricTag + // validate validates PatternFlowVxlanReserved1MetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVxlanReserved1MetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowVxlanReserved1MetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowVxlanReserved1MetricTag + SetName(value string) PatternFlowVxlanReserved1MetricTag + // Offset returns uint32, set in PatternFlowVxlanReserved1MetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowVxlanReserved1MetricTag + SetOffset(value uint32) PatternFlowVxlanReserved1MetricTag + // HasOffset checks if Offset has been set in PatternFlowVxlanReserved1MetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowVxlanReserved1MetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowVxlanReserved1MetricTag + SetLength(value uint32) PatternFlowVxlanReserved1MetricTag + // HasLength checks if Length has been set in PatternFlowVxlanReserved1MetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowVxlanReserved1MetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowVxlanReserved1MetricTag object +func (obj *patternFlowVxlanReserved1MetricTag) SetName(value string) PatternFlowVxlanReserved1MetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVxlanReserved1MetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVxlanReserved1MetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowVxlanReserved1MetricTag object +func (obj *patternFlowVxlanReserved1MetricTag) SetOffset(value uint32) PatternFlowVxlanReserved1MetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVxlanReserved1MetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVxlanReserved1MetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowVxlanReserved1MetricTag object +func (obj *patternFlowVxlanReserved1MetricTag) SetLength(value uint32) PatternFlowVxlanReserved1MetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowVxlanReserved1MetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowVxlanReserved1MetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanReserved1MetricTag.Offset <= 7 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowVxlanReserved1MetricTag.Length <= 8 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowVxlanReserved1MetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(8) + } + +} diff --git a/gosnappi/pattern_flow_vxlan_vni.go b/gosnappi/pattern_flow_vxlan_vni.go new file mode 100644 index 00000000..17ae9567 --- /dev/null +++ b/gosnappi/pattern_flow_vxlan_vni.go @@ -0,0 +1,712 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVxlanVni ***** +type patternFlowVxlanVni struct { + validation + obj *otg.PatternFlowVxlanVni + marshaller marshalPatternFlowVxlanVni + unMarshaller unMarshalPatternFlowVxlanVni + incrementHolder PatternFlowVxlanVniCounter + decrementHolder PatternFlowVxlanVniCounter + metricTagsHolder PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter +} + +func NewPatternFlowVxlanVni() PatternFlowVxlanVni { + obj := patternFlowVxlanVni{obj: &otg.PatternFlowVxlanVni{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVxlanVni) msg() *otg.PatternFlowVxlanVni { + return obj.obj +} + +func (obj *patternFlowVxlanVni) setMsg(msg *otg.PatternFlowVxlanVni) PatternFlowVxlanVni { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVxlanVni struct { + obj *patternFlowVxlanVni +} + +type marshalPatternFlowVxlanVni interface { + // ToProto marshals PatternFlowVxlanVni to protobuf object *otg.PatternFlowVxlanVni + ToProto() (*otg.PatternFlowVxlanVni, error) + // ToPbText marshals PatternFlowVxlanVni to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVxlanVni to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVxlanVni to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVxlanVni struct { + obj *patternFlowVxlanVni +} + +type unMarshalPatternFlowVxlanVni interface { + // FromProto unmarshals PatternFlowVxlanVni from protobuf object *otg.PatternFlowVxlanVni + FromProto(msg *otg.PatternFlowVxlanVni) (PatternFlowVxlanVni, error) + // FromPbText unmarshals PatternFlowVxlanVni from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVxlanVni from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVxlanVni from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVxlanVni) Marshal() marshalPatternFlowVxlanVni { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVxlanVni{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVxlanVni) Unmarshal() unMarshalPatternFlowVxlanVni { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVxlanVni{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVxlanVni) ToProto() (*otg.PatternFlowVxlanVni, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVxlanVni) FromProto(msg *otg.PatternFlowVxlanVni) (PatternFlowVxlanVni, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVxlanVni) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVxlanVni) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVxlanVni) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanVni) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVxlanVni) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanVni) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVxlanVni) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVxlanVni) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVxlanVni) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVxlanVni) Clone() (PatternFlowVxlanVni, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVxlanVni() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *patternFlowVxlanVni) setNil() { + obj.incrementHolder = nil + obj.decrementHolder = nil + obj.metricTagsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// PatternFlowVxlanVni is vXLAN network id +type PatternFlowVxlanVni interface { + Validation + // msg marshals PatternFlowVxlanVni to protobuf object *otg.PatternFlowVxlanVni + // and doesn't set defaults + msg() *otg.PatternFlowVxlanVni + // setMsg unmarshals PatternFlowVxlanVni from protobuf object *otg.PatternFlowVxlanVni + // and doesn't set defaults + setMsg(*otg.PatternFlowVxlanVni) PatternFlowVxlanVni + // provides marshal interface + Marshal() marshalPatternFlowVxlanVni + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVxlanVni + // validate validates PatternFlowVxlanVni + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVxlanVni, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns PatternFlowVxlanVniChoiceEnum, set in PatternFlowVxlanVni + Choice() PatternFlowVxlanVniChoiceEnum + // setChoice assigns PatternFlowVxlanVniChoiceEnum provided by user to PatternFlowVxlanVni + setChoice(value PatternFlowVxlanVniChoiceEnum) PatternFlowVxlanVni + // HasChoice checks if Choice has been set in PatternFlowVxlanVni + HasChoice() bool + // Value returns uint32, set in PatternFlowVxlanVni. + Value() uint32 + // SetValue assigns uint32 provided by user to PatternFlowVxlanVni + SetValue(value uint32) PatternFlowVxlanVni + // HasValue checks if Value has been set in PatternFlowVxlanVni + HasValue() bool + // Values returns []uint32, set in PatternFlowVxlanVni. + Values() []uint32 + // SetValues assigns []uint32 provided by user to PatternFlowVxlanVni + SetValues(value []uint32) PatternFlowVxlanVni + // Auto returns uint32, set in PatternFlowVxlanVni. + Auto() uint32 + // HasAuto checks if Auto has been set in PatternFlowVxlanVni + HasAuto() bool + // Increment returns PatternFlowVxlanVniCounter, set in PatternFlowVxlanVni. + // PatternFlowVxlanVniCounter is integer counter pattern + Increment() PatternFlowVxlanVniCounter + // SetIncrement assigns PatternFlowVxlanVniCounter provided by user to PatternFlowVxlanVni. + // PatternFlowVxlanVniCounter is integer counter pattern + SetIncrement(value PatternFlowVxlanVniCounter) PatternFlowVxlanVni + // HasIncrement checks if Increment has been set in PatternFlowVxlanVni + HasIncrement() bool + // Decrement returns PatternFlowVxlanVniCounter, set in PatternFlowVxlanVni. + // PatternFlowVxlanVniCounter is integer counter pattern + Decrement() PatternFlowVxlanVniCounter + // SetDecrement assigns PatternFlowVxlanVniCounter provided by user to PatternFlowVxlanVni. + // PatternFlowVxlanVniCounter is integer counter pattern + SetDecrement(value PatternFlowVxlanVniCounter) PatternFlowVxlanVni + // HasDecrement checks if Decrement has been set in PatternFlowVxlanVni + HasDecrement() bool + // MetricTags returns PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIterIter, set in PatternFlowVxlanVni + MetricTags() PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter + setNil() +} + +type PatternFlowVxlanVniChoiceEnum string + +// Enum of Choice on PatternFlowVxlanVni +var PatternFlowVxlanVniChoice = struct { + VALUE PatternFlowVxlanVniChoiceEnum + VALUES PatternFlowVxlanVniChoiceEnum + AUTO PatternFlowVxlanVniChoiceEnum + INCREMENT PatternFlowVxlanVniChoiceEnum + DECREMENT PatternFlowVxlanVniChoiceEnum +}{ + VALUE: PatternFlowVxlanVniChoiceEnum("value"), + VALUES: PatternFlowVxlanVniChoiceEnum("values"), + AUTO: PatternFlowVxlanVniChoiceEnum("auto"), + INCREMENT: PatternFlowVxlanVniChoiceEnum("increment"), + DECREMENT: PatternFlowVxlanVniChoiceEnum("decrement"), +} + +func (obj *patternFlowVxlanVni) Choice() PatternFlowVxlanVniChoiceEnum { + return PatternFlowVxlanVniChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *patternFlowVxlanVni) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *patternFlowVxlanVni) setChoice(value PatternFlowVxlanVniChoiceEnum) PatternFlowVxlanVni { + intValue, ok := otg.PatternFlowVxlanVni_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PatternFlowVxlanVniChoiceEnum", string(value))) + return obj + } + enumValue := otg.PatternFlowVxlanVni_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Decrement = nil + obj.decrementHolder = nil + obj.obj.Increment = nil + obj.incrementHolder = nil + obj.obj.Auto = nil + obj.obj.Values = nil + obj.obj.Value = nil + + if value == PatternFlowVxlanVniChoice.VALUE { + defaultValue := uint32(0) + obj.obj.Value = &defaultValue + } + + if value == PatternFlowVxlanVniChoice.VALUES { + defaultValue := []uint32{0} + obj.obj.Values = defaultValue + } + + if value == PatternFlowVxlanVniChoice.AUTO { + defaultValue := uint32(0) + obj.obj.Auto = &defaultValue + } + + if value == PatternFlowVxlanVniChoice.INCREMENT { + obj.obj.Increment = NewPatternFlowVxlanVniCounter().msg() + } + + if value == PatternFlowVxlanVniChoice.DECREMENT { + obj.obj.Decrement = NewPatternFlowVxlanVniCounter().msg() + } + + return obj +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVxlanVni) Value() uint32 { + + if obj.obj.Value == nil { + obj.setChoice(PatternFlowVxlanVniChoice.VALUE) + } + + return *obj.obj.Value + +} + +// description is TBD +// Value returns a uint32 +func (obj *patternFlowVxlanVni) HasValue() bool { + return obj.obj.Value != nil +} + +// description is TBD +// SetValue sets the uint32 value in the PatternFlowVxlanVni object +func (obj *patternFlowVxlanVni) SetValue(value uint32) PatternFlowVxlanVni { + obj.setChoice(PatternFlowVxlanVniChoice.VALUE) + obj.obj.Value = &value + return obj +} + +// description is TBD +// Values returns a []uint32 +func (obj *patternFlowVxlanVni) Values() []uint32 { + if obj.obj.Values == nil { + obj.SetValues([]uint32{0}) + } + return obj.obj.Values +} + +// description is TBD +// SetValues sets the []uint32 value in the PatternFlowVxlanVni object +func (obj *patternFlowVxlanVni) SetValues(value []uint32) PatternFlowVxlanVni { + obj.setChoice(PatternFlowVxlanVniChoice.VALUES) + if obj.obj.Values == nil { + obj.obj.Values = make([]uint32, 0) + } + obj.obj.Values = value + + return obj +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowVxlanVni) Auto() uint32 { + + if obj.obj.Auto == nil { + obj.setChoice(PatternFlowVxlanVniChoice.AUTO) + } + + return *obj.obj.Auto + +} + +// The OTG implementation can provide a system generated +// value for this property. If the OTG is unable to generate a value +// the default value must be used. +// Auto returns a uint32 +func (obj *patternFlowVxlanVni) HasAuto() bool { + return obj.obj.Auto != nil +} + +// description is TBD +// Increment returns a PatternFlowVxlanVniCounter +func (obj *patternFlowVxlanVni) Increment() PatternFlowVxlanVniCounter { + if obj.obj.Increment == nil { + obj.setChoice(PatternFlowVxlanVniChoice.INCREMENT) + } + if obj.incrementHolder == nil { + obj.incrementHolder = &patternFlowVxlanVniCounter{obj: obj.obj.Increment} + } + return obj.incrementHolder +} + +// description is TBD +// Increment returns a PatternFlowVxlanVniCounter +func (obj *patternFlowVxlanVni) HasIncrement() bool { + return obj.obj.Increment != nil +} + +// description is TBD +// SetIncrement sets the PatternFlowVxlanVniCounter value in the PatternFlowVxlanVni object +func (obj *patternFlowVxlanVni) SetIncrement(value PatternFlowVxlanVniCounter) PatternFlowVxlanVni { + obj.setChoice(PatternFlowVxlanVniChoice.INCREMENT) + obj.incrementHolder = nil + obj.obj.Increment = value.msg() + + return obj +} + +// description is TBD +// Decrement returns a PatternFlowVxlanVniCounter +func (obj *patternFlowVxlanVni) Decrement() PatternFlowVxlanVniCounter { + if obj.obj.Decrement == nil { + obj.setChoice(PatternFlowVxlanVniChoice.DECREMENT) + } + if obj.decrementHolder == nil { + obj.decrementHolder = &patternFlowVxlanVniCounter{obj: obj.obj.Decrement} + } + return obj.decrementHolder +} + +// description is TBD +// Decrement returns a PatternFlowVxlanVniCounter +func (obj *patternFlowVxlanVni) HasDecrement() bool { + return obj.obj.Decrement != nil +} + +// description is TBD +// SetDecrement sets the PatternFlowVxlanVniCounter value in the PatternFlowVxlanVni object +func (obj *patternFlowVxlanVni) SetDecrement(value PatternFlowVxlanVniCounter) PatternFlowVxlanVni { + obj.setChoice(PatternFlowVxlanVniChoice.DECREMENT) + obj.decrementHolder = nil + obj.obj.Decrement = value.msg() + + return obj +} + +// One or more metric tags can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +// MetricTags returns a []PatternFlowVxlanVniMetricTag +func (obj *patternFlowVxlanVni) MetricTags() PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter { + if len(obj.obj.MetricTags) == 0 { + obj.obj.MetricTags = []*otg.PatternFlowVxlanVniMetricTag{} + } + if obj.metricTagsHolder == nil { + obj.metricTagsHolder = newPatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter(&obj.obj.MetricTags).setMsg(obj) + } + return obj.metricTagsHolder +} + +type patternFlowVxlanVniPatternFlowVxlanVniMetricTagIter struct { + obj *patternFlowVxlanVni + patternFlowVxlanVniMetricTagSlice []PatternFlowVxlanVniMetricTag + fieldPtr *[]*otg.PatternFlowVxlanVniMetricTag +} + +func newPatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter(ptr *[]*otg.PatternFlowVxlanVniMetricTag) PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter { + return &patternFlowVxlanVniPatternFlowVxlanVniMetricTagIter{fieldPtr: ptr} +} + +type PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter interface { + setMsg(*patternFlowVxlanVni) PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter + Items() []PatternFlowVxlanVniMetricTag + Add() PatternFlowVxlanVniMetricTag + Append(items ...PatternFlowVxlanVniMetricTag) PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter + Set(index int, newObj PatternFlowVxlanVniMetricTag) PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter + Clear() PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter + clearHolderSlice() PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter + appendHolderSlice(item PatternFlowVxlanVniMetricTag) PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter +} + +func (obj *patternFlowVxlanVniPatternFlowVxlanVniMetricTagIter) setMsg(msg *patternFlowVxlanVni) PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&patternFlowVxlanVniMetricTag{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *patternFlowVxlanVniPatternFlowVxlanVniMetricTagIter) Items() []PatternFlowVxlanVniMetricTag { + return obj.patternFlowVxlanVniMetricTagSlice +} + +func (obj *patternFlowVxlanVniPatternFlowVxlanVniMetricTagIter) Add() PatternFlowVxlanVniMetricTag { + newObj := &otg.PatternFlowVxlanVniMetricTag{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &patternFlowVxlanVniMetricTag{obj: newObj} + newLibObj.setDefault() + obj.patternFlowVxlanVniMetricTagSlice = append(obj.patternFlowVxlanVniMetricTagSlice, newLibObj) + return newLibObj +} + +func (obj *patternFlowVxlanVniPatternFlowVxlanVniMetricTagIter) Append(items ...PatternFlowVxlanVniMetricTag) PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.patternFlowVxlanVniMetricTagSlice = append(obj.patternFlowVxlanVniMetricTagSlice, item) + } + return obj +} + +func (obj *patternFlowVxlanVniPatternFlowVxlanVniMetricTagIter) Set(index int, newObj PatternFlowVxlanVniMetricTag) PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.patternFlowVxlanVniMetricTagSlice[index] = newObj + return obj +} +func (obj *patternFlowVxlanVniPatternFlowVxlanVniMetricTagIter) Clear() PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.PatternFlowVxlanVniMetricTag{} + obj.patternFlowVxlanVniMetricTagSlice = []PatternFlowVxlanVniMetricTag{} + } + return obj +} +func (obj *patternFlowVxlanVniPatternFlowVxlanVniMetricTagIter) clearHolderSlice() PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter { + if len(obj.patternFlowVxlanVniMetricTagSlice) > 0 { + obj.patternFlowVxlanVniMetricTagSlice = []PatternFlowVxlanVniMetricTag{} + } + return obj +} +func (obj *patternFlowVxlanVniPatternFlowVxlanVniMetricTagIter) appendHolderSlice(item PatternFlowVxlanVniMetricTag) PatternFlowVxlanVniPatternFlowVxlanVniMetricTagIter { + obj.patternFlowVxlanVniMetricTagSlice = append(obj.patternFlowVxlanVniMetricTagSlice, item) + return obj +} + +func (obj *patternFlowVxlanVni) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Value != nil { + + if *obj.obj.Value > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanVni.Value <= 16777215 but Got %d", *obj.obj.Value)) + } + + } + + if obj.obj.Values != nil { + + for _, item := range obj.obj.Values { + if item > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("min(uint32) <= PatternFlowVxlanVni.Values <= 16777215 but Got %d", item)) + } + + } + + } + + if obj.obj.Auto != nil { + + if *obj.obj.Auto > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanVni.Auto <= 16777215 but Got %d", *obj.obj.Auto)) + } + + } + + if obj.obj.Increment != nil { + + obj.Increment().validateObj(vObj, set_default) + } + + if obj.obj.Decrement != nil { + + obj.Decrement().validateObj(vObj, set_default) + } + + if len(obj.obj.MetricTags) != 0 { + + if set_default { + obj.MetricTags().clearHolderSlice() + for _, item := range obj.obj.MetricTags { + obj.MetricTags().appendHolderSlice(&patternFlowVxlanVniMetricTag{obj: item}) + } + } + for _, item := range obj.MetricTags().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *patternFlowVxlanVni) setDefault() { + var choices_set int = 0 + var choice PatternFlowVxlanVniChoiceEnum + + if obj.obj.Value != nil { + choices_set += 1 + choice = PatternFlowVxlanVniChoice.VALUE + } + + if len(obj.obj.Values) > 0 { + choices_set += 1 + choice = PatternFlowVxlanVniChoice.VALUES + } + + if obj.obj.Auto != nil { + choices_set += 1 + choice = PatternFlowVxlanVniChoice.AUTO + } + + if obj.obj.Increment != nil { + choices_set += 1 + choice = PatternFlowVxlanVniChoice.INCREMENT + } + + if obj.obj.Decrement != nil { + choices_set += 1 + choice = PatternFlowVxlanVniChoice.DECREMENT + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(PatternFlowVxlanVniChoice.AUTO) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in PatternFlowVxlanVni") + } + } else { + intVal := otg.PatternFlowVxlanVni_Choice_Enum_value[string(choice)] + enumValue := otg.PatternFlowVxlanVni_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/pattern_flow_vxlan_vni_counter.go b/gosnappi/pattern_flow_vxlan_vni_counter.go new file mode 100644 index 00000000..5a381749 --- /dev/null +++ b/gosnappi/pattern_flow_vxlan_vni_counter.go @@ -0,0 +1,401 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVxlanVniCounter ***** +type patternFlowVxlanVniCounter struct { + validation + obj *otg.PatternFlowVxlanVniCounter + marshaller marshalPatternFlowVxlanVniCounter + unMarshaller unMarshalPatternFlowVxlanVniCounter +} + +func NewPatternFlowVxlanVniCounter() PatternFlowVxlanVniCounter { + obj := patternFlowVxlanVniCounter{obj: &otg.PatternFlowVxlanVniCounter{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVxlanVniCounter) msg() *otg.PatternFlowVxlanVniCounter { + return obj.obj +} + +func (obj *patternFlowVxlanVniCounter) setMsg(msg *otg.PatternFlowVxlanVniCounter) PatternFlowVxlanVniCounter { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVxlanVniCounter struct { + obj *patternFlowVxlanVniCounter +} + +type marshalPatternFlowVxlanVniCounter interface { + // ToProto marshals PatternFlowVxlanVniCounter to protobuf object *otg.PatternFlowVxlanVniCounter + ToProto() (*otg.PatternFlowVxlanVniCounter, error) + // ToPbText marshals PatternFlowVxlanVniCounter to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVxlanVniCounter to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVxlanVniCounter to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVxlanVniCounter struct { + obj *patternFlowVxlanVniCounter +} + +type unMarshalPatternFlowVxlanVniCounter interface { + // FromProto unmarshals PatternFlowVxlanVniCounter from protobuf object *otg.PatternFlowVxlanVniCounter + FromProto(msg *otg.PatternFlowVxlanVniCounter) (PatternFlowVxlanVniCounter, error) + // FromPbText unmarshals PatternFlowVxlanVniCounter from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVxlanVniCounter from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVxlanVniCounter from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVxlanVniCounter) Marshal() marshalPatternFlowVxlanVniCounter { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVxlanVniCounter{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVxlanVniCounter) Unmarshal() unMarshalPatternFlowVxlanVniCounter { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVxlanVniCounter{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVxlanVniCounter) ToProto() (*otg.PatternFlowVxlanVniCounter, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVxlanVniCounter) FromProto(msg *otg.PatternFlowVxlanVniCounter) (PatternFlowVxlanVniCounter, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVxlanVniCounter) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVxlanVniCounter) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVxlanVniCounter) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanVniCounter) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVxlanVniCounter) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanVniCounter) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVxlanVniCounter) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVxlanVniCounter) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVxlanVniCounter) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVxlanVniCounter) Clone() (PatternFlowVxlanVniCounter, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVxlanVniCounter() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVxlanVniCounter is integer counter pattern +type PatternFlowVxlanVniCounter interface { + Validation + // msg marshals PatternFlowVxlanVniCounter to protobuf object *otg.PatternFlowVxlanVniCounter + // and doesn't set defaults + msg() *otg.PatternFlowVxlanVniCounter + // setMsg unmarshals PatternFlowVxlanVniCounter from protobuf object *otg.PatternFlowVxlanVniCounter + // and doesn't set defaults + setMsg(*otg.PatternFlowVxlanVniCounter) PatternFlowVxlanVniCounter + // provides marshal interface + Marshal() marshalPatternFlowVxlanVniCounter + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVxlanVniCounter + // validate validates PatternFlowVxlanVniCounter + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVxlanVniCounter, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Start returns uint32, set in PatternFlowVxlanVniCounter. + Start() uint32 + // SetStart assigns uint32 provided by user to PatternFlowVxlanVniCounter + SetStart(value uint32) PatternFlowVxlanVniCounter + // HasStart checks if Start has been set in PatternFlowVxlanVniCounter + HasStart() bool + // Step returns uint32, set in PatternFlowVxlanVniCounter. + Step() uint32 + // SetStep assigns uint32 provided by user to PatternFlowVxlanVniCounter + SetStep(value uint32) PatternFlowVxlanVniCounter + // HasStep checks if Step has been set in PatternFlowVxlanVniCounter + HasStep() bool + // Count returns uint32, set in PatternFlowVxlanVniCounter. + Count() uint32 + // SetCount assigns uint32 provided by user to PatternFlowVxlanVniCounter + SetCount(value uint32) PatternFlowVxlanVniCounter + // HasCount checks if Count has been set in PatternFlowVxlanVniCounter + HasCount() bool +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVxlanVniCounter) Start() uint32 { + + return *obj.obj.Start + +} + +// description is TBD +// Start returns a uint32 +func (obj *patternFlowVxlanVniCounter) HasStart() bool { + return obj.obj.Start != nil +} + +// description is TBD +// SetStart sets the uint32 value in the PatternFlowVxlanVniCounter object +func (obj *patternFlowVxlanVniCounter) SetStart(value uint32) PatternFlowVxlanVniCounter { + + obj.obj.Start = &value + return obj +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVxlanVniCounter) Step() uint32 { + + return *obj.obj.Step + +} + +// description is TBD +// Step returns a uint32 +func (obj *patternFlowVxlanVniCounter) HasStep() bool { + return obj.obj.Step != nil +} + +// description is TBD +// SetStep sets the uint32 value in the PatternFlowVxlanVniCounter object +func (obj *patternFlowVxlanVniCounter) SetStep(value uint32) PatternFlowVxlanVniCounter { + + obj.obj.Step = &value + return obj +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVxlanVniCounter) Count() uint32 { + + return *obj.obj.Count + +} + +// description is TBD +// Count returns a uint32 +func (obj *patternFlowVxlanVniCounter) HasCount() bool { + return obj.obj.Count != nil +} + +// description is TBD +// SetCount sets the uint32 value in the PatternFlowVxlanVniCounter object +func (obj *patternFlowVxlanVniCounter) SetCount(value uint32) PatternFlowVxlanVniCounter { + + obj.obj.Count = &value + return obj +} + +func (obj *patternFlowVxlanVniCounter) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Start != nil { + + if *obj.obj.Start > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanVniCounter.Start <= 16777215 but Got %d", *obj.obj.Start)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanVniCounter.Step <= 16777215 but Got %d", *obj.obj.Step)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanVniCounter.Count <= 16777215 but Got %d", *obj.obj.Count)) + } + + } + +} + +func (obj *patternFlowVxlanVniCounter) setDefault() { + if obj.obj.Start == nil { + obj.SetStart(0) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + +} diff --git a/gosnappi/pattern_flow_vxlan_vni_metric_tag.go b/gosnappi/pattern_flow_vxlan_vni_metric_tag.go new file mode 100644 index 00000000..1c67c848 --- /dev/null +++ b/gosnappi/pattern_flow_vxlan_vni_metric_tag.go @@ -0,0 +1,385 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PatternFlowVxlanVniMetricTag ***** +type patternFlowVxlanVniMetricTag struct { + validation + obj *otg.PatternFlowVxlanVniMetricTag + marshaller marshalPatternFlowVxlanVniMetricTag + unMarshaller unMarshalPatternFlowVxlanVniMetricTag +} + +func NewPatternFlowVxlanVniMetricTag() PatternFlowVxlanVniMetricTag { + obj := patternFlowVxlanVniMetricTag{obj: &otg.PatternFlowVxlanVniMetricTag{}} + obj.setDefault() + return &obj +} + +func (obj *patternFlowVxlanVniMetricTag) msg() *otg.PatternFlowVxlanVniMetricTag { + return obj.obj +} + +func (obj *patternFlowVxlanVniMetricTag) setMsg(msg *otg.PatternFlowVxlanVniMetricTag) PatternFlowVxlanVniMetricTag { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalpatternFlowVxlanVniMetricTag struct { + obj *patternFlowVxlanVniMetricTag +} + +type marshalPatternFlowVxlanVniMetricTag interface { + // ToProto marshals PatternFlowVxlanVniMetricTag to protobuf object *otg.PatternFlowVxlanVniMetricTag + ToProto() (*otg.PatternFlowVxlanVniMetricTag, error) + // ToPbText marshals PatternFlowVxlanVniMetricTag to protobuf text + ToPbText() (string, error) + // ToYaml marshals PatternFlowVxlanVniMetricTag to YAML text + ToYaml() (string, error) + // ToJson marshals PatternFlowVxlanVniMetricTag to JSON text + ToJson() (string, error) +} + +type unMarshalpatternFlowVxlanVniMetricTag struct { + obj *patternFlowVxlanVniMetricTag +} + +type unMarshalPatternFlowVxlanVniMetricTag interface { + // FromProto unmarshals PatternFlowVxlanVniMetricTag from protobuf object *otg.PatternFlowVxlanVniMetricTag + FromProto(msg *otg.PatternFlowVxlanVniMetricTag) (PatternFlowVxlanVniMetricTag, error) + // FromPbText unmarshals PatternFlowVxlanVniMetricTag from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PatternFlowVxlanVniMetricTag from YAML text + FromYaml(value string) error + // FromJson unmarshals PatternFlowVxlanVniMetricTag from JSON text + FromJson(value string) error +} + +func (obj *patternFlowVxlanVniMetricTag) Marshal() marshalPatternFlowVxlanVniMetricTag { + if obj.marshaller == nil { + obj.marshaller = &marshalpatternFlowVxlanVniMetricTag{obj: obj} + } + return obj.marshaller +} + +func (obj *patternFlowVxlanVniMetricTag) Unmarshal() unMarshalPatternFlowVxlanVniMetricTag { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalpatternFlowVxlanVniMetricTag{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalpatternFlowVxlanVniMetricTag) ToProto() (*otg.PatternFlowVxlanVniMetricTag, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalpatternFlowVxlanVniMetricTag) FromProto(msg *otg.PatternFlowVxlanVniMetricTag) (PatternFlowVxlanVniMetricTag, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalpatternFlowVxlanVniMetricTag) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalpatternFlowVxlanVniMetricTag) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalpatternFlowVxlanVniMetricTag) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanVniMetricTag) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalpatternFlowVxlanVniMetricTag) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalpatternFlowVxlanVniMetricTag) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *patternFlowVxlanVniMetricTag) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *patternFlowVxlanVniMetricTag) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *patternFlowVxlanVniMetricTag) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *patternFlowVxlanVniMetricTag) Clone() (PatternFlowVxlanVniMetricTag, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPatternFlowVxlanVniMetricTag() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PatternFlowVxlanVniMetricTag is metric tag can be used to enable tracking portion of or all bits in a corresponding header field for metrics per each applicable value. These would appear as tagged metrics in corresponding flow metrics. +type PatternFlowVxlanVniMetricTag interface { + Validation + // msg marshals PatternFlowVxlanVniMetricTag to protobuf object *otg.PatternFlowVxlanVniMetricTag + // and doesn't set defaults + msg() *otg.PatternFlowVxlanVniMetricTag + // setMsg unmarshals PatternFlowVxlanVniMetricTag from protobuf object *otg.PatternFlowVxlanVniMetricTag + // and doesn't set defaults + setMsg(*otg.PatternFlowVxlanVniMetricTag) PatternFlowVxlanVniMetricTag + // provides marshal interface + Marshal() marshalPatternFlowVxlanVniMetricTag + // provides unmarshal interface + Unmarshal() unMarshalPatternFlowVxlanVniMetricTag + // validate validates PatternFlowVxlanVniMetricTag + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PatternFlowVxlanVniMetricTag, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PatternFlowVxlanVniMetricTag. + Name() string + // SetName assigns string provided by user to PatternFlowVxlanVniMetricTag + SetName(value string) PatternFlowVxlanVniMetricTag + // Offset returns uint32, set in PatternFlowVxlanVniMetricTag. + Offset() uint32 + // SetOffset assigns uint32 provided by user to PatternFlowVxlanVniMetricTag + SetOffset(value uint32) PatternFlowVxlanVniMetricTag + // HasOffset checks if Offset has been set in PatternFlowVxlanVniMetricTag + HasOffset() bool + // Length returns uint32, set in PatternFlowVxlanVniMetricTag. + Length() uint32 + // SetLength assigns uint32 provided by user to PatternFlowVxlanVniMetricTag + SetLength(value uint32) PatternFlowVxlanVniMetricTag + // HasLength checks if Length has been set in PatternFlowVxlanVniMetricTag + HasLength() bool +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// Name returns a string +func (obj *patternFlowVxlanVniMetricTag) Name() string { + + return *obj.obj.Name + +} + +// Name used to identify the metrics associated with the values applicable for configured offset and length inside corresponding header field +// SetName sets the string value in the PatternFlowVxlanVniMetricTag object +func (obj *patternFlowVxlanVniMetricTag) SetName(value string) PatternFlowVxlanVniMetricTag { + + obj.obj.Name = &value + return obj +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVxlanVniMetricTag) Offset() uint32 { + + return *obj.obj.Offset + +} + +// Offset in bits relative to start of corresponding header field +// Offset returns a uint32 +func (obj *patternFlowVxlanVniMetricTag) HasOffset() bool { + return obj.obj.Offset != nil +} + +// Offset in bits relative to start of corresponding header field +// SetOffset sets the uint32 value in the PatternFlowVxlanVniMetricTag object +func (obj *patternFlowVxlanVniMetricTag) SetOffset(value uint32) PatternFlowVxlanVniMetricTag { + + obj.obj.Offset = &value + return obj +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVxlanVniMetricTag) Length() uint32 { + + return *obj.obj.Length + +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// Length returns a uint32 +func (obj *patternFlowVxlanVniMetricTag) HasLength() bool { + return obj.obj.Length != nil +} + +// Number of bits to track for metrics starting from configured offset of corresponding header field +// SetLength sets the uint32 value in the PatternFlowVxlanVniMetricTag object +func (obj *patternFlowVxlanVniMetricTag) SetLength(value uint32) PatternFlowVxlanVniMetricTag { + + obj.obj.Length = &value + return obj +} + +func (obj *patternFlowVxlanVniMetricTag) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface PatternFlowVxlanVniMetricTag") + } + + if obj.obj.Offset != nil { + + if *obj.obj.Offset > 23 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= PatternFlowVxlanVniMetricTag.Offset <= 23 but Got %d", *obj.obj.Offset)) + } + + } + + if obj.obj.Length != nil { + + if *obj.obj.Length < 1 || *obj.obj.Length > 24 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= PatternFlowVxlanVniMetricTag.Length <= 24 but Got %d", *obj.obj.Length)) + } + + } + +} + +func (obj *patternFlowVxlanVniMetricTag) setDefault() { + if obj.obj.Offset == nil { + obj.SetOffset(0) + } + if obj.obj.Length == nil { + obj.SetLength(24) + } + +} diff --git a/gosnappi/port.go b/gosnappi/port.go new file mode 100644 index 00000000..620e7e1b --- /dev/null +++ b/gosnappi/port.go @@ -0,0 +1,354 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Port ***** +type port struct { + validation + obj *otg.Port + marshaller marshalPort + unMarshaller unMarshalPort +} + +func NewPort() Port { + obj := port{obj: &otg.Port{}} + obj.setDefault() + return &obj +} + +func (obj *port) msg() *otg.Port { + return obj.obj +} + +func (obj *port) setMsg(msg *otg.Port) Port { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalport struct { + obj *port +} + +type marshalPort interface { + // ToProto marshals Port to protobuf object *otg.Port + ToProto() (*otg.Port, error) + // ToPbText marshals Port to protobuf text + ToPbText() (string, error) + // ToYaml marshals Port to YAML text + ToYaml() (string, error) + // ToJson marshals Port to JSON text + ToJson() (string, error) +} + +type unMarshalport struct { + obj *port +} + +type unMarshalPort interface { + // FromProto unmarshals Port from protobuf object *otg.Port + FromProto(msg *otg.Port) (Port, error) + // FromPbText unmarshals Port from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Port from YAML text + FromYaml(value string) error + // FromJson unmarshals Port from JSON text + FromJson(value string) error +} + +func (obj *port) Marshal() marshalPort { + if obj.marshaller == nil { + obj.marshaller = &marshalport{obj: obj} + } + return obj.marshaller +} + +func (obj *port) Unmarshal() unMarshalPort { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalport{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalport) ToProto() (*otg.Port, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalport) FromProto(msg *otg.Port) (Port, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalport) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalport) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalport) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalport) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalport) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalport) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *port) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *port) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *port) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *port) Clone() (Port, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPort() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Port is an abstract test port. +type Port interface { + Validation + // msg marshals Port to protobuf object *otg.Port + // and doesn't set defaults + msg() *otg.Port + // setMsg unmarshals Port from protobuf object *otg.Port + // and doesn't set defaults + setMsg(*otg.Port) Port + // provides marshal interface + Marshal() marshalPort + // provides unmarshal interface + Unmarshal() unMarshalPort + // validate validates Port + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Port, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Location returns string, set in Port. + Location() string + // SetLocation assigns string provided by user to Port + SetLocation(value string) Port + // HasLocation checks if Location has been set in Port + HasLocation() bool + // Name returns string, set in Port. + Name() string + // SetName assigns string provided by user to Port + SetName(value string) Port +} + +// The location of a test port. It is the endpoint where packets will emit from. +// Test port locations can be the following: +// - physical appliance with multiple ports +// - physical chassis with multiple cards and ports +// - local interface +// - virtual machine, docker container, kubernetes cluster +// +// The test port location format is implementation specific. Use the /results/capabilities API to determine what formats an implementation supports for the location property. +// Get the configured location state by using the /results/port API. +// Location returns a string +func (obj *port) Location() string { + + return *obj.obj.Location + +} + +// The location of a test port. It is the endpoint where packets will emit from. +// Test port locations can be the following: +// - physical appliance with multiple ports +// - physical chassis with multiple cards and ports +// - local interface +// - virtual machine, docker container, kubernetes cluster +// +// The test port location format is implementation specific. Use the /results/capabilities API to determine what formats an implementation supports for the location property. +// Get the configured location state by using the /results/port API. +// Location returns a string +func (obj *port) HasLocation() bool { + return obj.obj.Location != nil +} + +// The location of a test port. It is the endpoint where packets will emit from. +// Test port locations can be the following: +// - physical appliance with multiple ports +// - physical chassis with multiple cards and ports +// - local interface +// - virtual machine, docker container, kubernetes cluster +// +// The test port location format is implementation specific. Use the /results/capabilities API to determine what formats an implementation supports for the location property. +// Get the configured location state by using the /results/port API. +// SetLocation sets the string value in the Port object +func (obj *port) SetLocation(value string) Port { + + obj.obj.Location = &value + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *port) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the Port object +func (obj *port) SetName(value string) Port { + + obj.obj.Name = &value + return obj +} + +func (obj *port) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface Port") + } +} + +func (obj *port) setDefault() { + +} diff --git a/gosnappi/port_metric.go b/gosnappi/port_metric.go new file mode 100644 index 00000000..c03a394c --- /dev/null +++ b/gosnappi/port_metric.go @@ -0,0 +1,699 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PortMetric ***** +type portMetric struct { + validation + obj *otg.PortMetric + marshaller marshalPortMetric + unMarshaller unMarshalPortMetric +} + +func NewPortMetric() PortMetric { + obj := portMetric{obj: &otg.PortMetric{}} + obj.setDefault() + return &obj +} + +func (obj *portMetric) msg() *otg.PortMetric { + return obj.obj +} + +func (obj *portMetric) setMsg(msg *otg.PortMetric) PortMetric { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalportMetric struct { + obj *portMetric +} + +type marshalPortMetric interface { + // ToProto marshals PortMetric to protobuf object *otg.PortMetric + ToProto() (*otg.PortMetric, error) + // ToPbText marshals PortMetric to protobuf text + ToPbText() (string, error) + // ToYaml marshals PortMetric to YAML text + ToYaml() (string, error) + // ToJson marshals PortMetric to JSON text + ToJson() (string, error) +} + +type unMarshalportMetric struct { + obj *portMetric +} + +type unMarshalPortMetric interface { + // FromProto unmarshals PortMetric from protobuf object *otg.PortMetric + FromProto(msg *otg.PortMetric) (PortMetric, error) + // FromPbText unmarshals PortMetric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PortMetric from YAML text + FromYaml(value string) error + // FromJson unmarshals PortMetric from JSON text + FromJson(value string) error +} + +func (obj *portMetric) Marshal() marshalPortMetric { + if obj.marshaller == nil { + obj.marshaller = &marshalportMetric{obj: obj} + } + return obj.marshaller +} + +func (obj *portMetric) Unmarshal() unMarshalPortMetric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalportMetric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalportMetric) ToProto() (*otg.PortMetric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalportMetric) FromProto(msg *otg.PortMetric) (PortMetric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalportMetric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalportMetric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalportMetric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalportMetric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalportMetric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalportMetric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *portMetric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *portMetric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *portMetric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *portMetric) Clone() (PortMetric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPortMetric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PortMetric is description is TBD +type PortMetric interface { + Validation + // msg marshals PortMetric to protobuf object *otg.PortMetric + // and doesn't set defaults + msg() *otg.PortMetric + // setMsg unmarshals PortMetric from protobuf object *otg.PortMetric + // and doesn't set defaults + setMsg(*otg.PortMetric) PortMetric + // provides marshal interface + Marshal() marshalPortMetric + // provides unmarshal interface + Unmarshal() unMarshalPortMetric + // validate validates PortMetric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PortMetric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in PortMetric. + Name() string + // SetName assigns string provided by user to PortMetric + SetName(value string) PortMetric + // HasName checks if Name has been set in PortMetric + HasName() bool + // Location returns string, set in PortMetric. + Location() string + // SetLocation assigns string provided by user to PortMetric + SetLocation(value string) PortMetric + // HasLocation checks if Location has been set in PortMetric + HasLocation() bool + // Link returns PortMetricLinkEnum, set in PortMetric + Link() PortMetricLinkEnum + // SetLink assigns PortMetricLinkEnum provided by user to PortMetric + SetLink(value PortMetricLinkEnum) PortMetric + // HasLink checks if Link has been set in PortMetric + HasLink() bool + // Capture returns PortMetricCaptureEnum, set in PortMetric + Capture() PortMetricCaptureEnum + // SetCapture assigns PortMetricCaptureEnum provided by user to PortMetric + SetCapture(value PortMetricCaptureEnum) PortMetric + // HasCapture checks if Capture has been set in PortMetric + HasCapture() bool + // FramesTx returns uint64, set in PortMetric. + FramesTx() uint64 + // SetFramesTx assigns uint64 provided by user to PortMetric + SetFramesTx(value uint64) PortMetric + // HasFramesTx checks if FramesTx has been set in PortMetric + HasFramesTx() bool + // FramesRx returns uint64, set in PortMetric. + FramesRx() uint64 + // SetFramesRx assigns uint64 provided by user to PortMetric + SetFramesRx(value uint64) PortMetric + // HasFramesRx checks if FramesRx has been set in PortMetric + HasFramesRx() bool + // BytesTx returns uint64, set in PortMetric. + BytesTx() uint64 + // SetBytesTx assigns uint64 provided by user to PortMetric + SetBytesTx(value uint64) PortMetric + // HasBytesTx checks if BytesTx has been set in PortMetric + HasBytesTx() bool + // BytesRx returns uint64, set in PortMetric. + BytesRx() uint64 + // SetBytesRx assigns uint64 provided by user to PortMetric + SetBytesRx(value uint64) PortMetric + // HasBytesRx checks if BytesRx has been set in PortMetric + HasBytesRx() bool + // FramesTxRate returns float32, set in PortMetric. + FramesTxRate() float32 + // SetFramesTxRate assigns float32 provided by user to PortMetric + SetFramesTxRate(value float32) PortMetric + // HasFramesTxRate checks if FramesTxRate has been set in PortMetric + HasFramesTxRate() bool + // FramesRxRate returns float32, set in PortMetric. + FramesRxRate() float32 + // SetFramesRxRate assigns float32 provided by user to PortMetric + SetFramesRxRate(value float32) PortMetric + // HasFramesRxRate checks if FramesRxRate has been set in PortMetric + HasFramesRxRate() bool + // BytesTxRate returns float32, set in PortMetric. + BytesTxRate() float32 + // SetBytesTxRate assigns float32 provided by user to PortMetric + SetBytesTxRate(value float32) PortMetric + // HasBytesTxRate checks if BytesTxRate has been set in PortMetric + HasBytesTxRate() bool + // BytesRxRate returns float32, set in PortMetric. + BytesRxRate() float32 + // SetBytesRxRate assigns float32 provided by user to PortMetric + SetBytesRxRate(value float32) PortMetric + // HasBytesRxRate checks if BytesRxRate has been set in PortMetric + HasBytesRxRate() bool + // Transmit returns PortMetricTransmitEnum, set in PortMetric + Transmit() PortMetricTransmitEnum + // SetTransmit assigns PortMetricTransmitEnum provided by user to PortMetric + SetTransmit(value PortMetricTransmitEnum) PortMetric + // HasTransmit checks if Transmit has been set in PortMetric + HasTransmit() bool +} + +// The name of a configured port +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// Name returns a string +func (obj *portMetric) Name() string { + + return *obj.obj.Name + +} + +// The name of a configured port +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// Name returns a string +func (obj *portMetric) HasName() bool { + return obj.obj.Name != nil +} + +// The name of a configured port +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// SetName sets the string value in the PortMetric object +func (obj *portMetric) SetName(value string) PortMetric { + + obj.obj.Name = &value + return obj +} + +// The state of the connection to the test port location. The format should be the configured port location along with any custom connection state message. +// Location returns a string +func (obj *portMetric) Location() string { + + return *obj.obj.Location + +} + +// The state of the connection to the test port location. The format should be the configured port location along with any custom connection state message. +// Location returns a string +func (obj *portMetric) HasLocation() bool { + return obj.obj.Location != nil +} + +// The state of the connection to the test port location. The format should be the configured port location along with any custom connection state message. +// SetLocation sets the string value in the PortMetric object +func (obj *portMetric) SetLocation(value string) PortMetric { + + obj.obj.Location = &value + return obj +} + +type PortMetricLinkEnum string + +// Enum of Link on PortMetric +var PortMetricLink = struct { + UP PortMetricLinkEnum + DOWN PortMetricLinkEnum +}{ + UP: PortMetricLinkEnum("up"), + DOWN: PortMetricLinkEnum("down"), +} + +func (obj *portMetric) Link() PortMetricLinkEnum { + return PortMetricLinkEnum(obj.obj.Link.Enum().String()) +} + +// The state of the test port link The string can be up, down or a custom error message. +// Link returns a string +func (obj *portMetric) HasLink() bool { + return obj.obj.Link != nil +} + +func (obj *portMetric) SetLink(value PortMetricLinkEnum) PortMetric { + intValue, ok := otg.PortMetric_Link_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PortMetricLinkEnum", string(value))) + return obj + } + enumValue := otg.PortMetric_Link_Enum(intValue) + obj.obj.Link = &enumValue + + return obj +} + +type PortMetricCaptureEnum string + +// Enum of Capture on PortMetric +var PortMetricCapture = struct { + STARTED PortMetricCaptureEnum + STOPPED PortMetricCaptureEnum +}{ + STARTED: PortMetricCaptureEnum("started"), + STOPPED: PortMetricCaptureEnum("stopped"), +} + +func (obj *portMetric) Capture() PortMetricCaptureEnum { + return PortMetricCaptureEnum(obj.obj.Capture.Enum().String()) +} + +// The state of the test port capture infrastructure. The string can be started, stopped or a custom error message. +// Capture returns a string +func (obj *portMetric) HasCapture() bool { + return obj.obj.Capture != nil +} + +func (obj *portMetric) SetCapture(value PortMetricCaptureEnum) PortMetric { + intValue, ok := otg.PortMetric_Capture_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PortMetricCaptureEnum", string(value))) + return obj + } + enumValue := otg.PortMetric_Capture_Enum(intValue) + obj.obj.Capture = &enumValue + + return obj +} + +// The current total number of frames transmitted +// FramesTx returns a uint64 +func (obj *portMetric) FramesTx() uint64 { + + return *obj.obj.FramesTx + +} + +// The current total number of frames transmitted +// FramesTx returns a uint64 +func (obj *portMetric) HasFramesTx() bool { + return obj.obj.FramesTx != nil +} + +// The current total number of frames transmitted +// SetFramesTx sets the uint64 value in the PortMetric object +func (obj *portMetric) SetFramesTx(value uint64) PortMetric { + + obj.obj.FramesTx = &value + return obj +} + +// The current total number of valid frames received +// FramesRx returns a uint64 +func (obj *portMetric) FramesRx() uint64 { + + return *obj.obj.FramesRx + +} + +// The current total number of valid frames received +// FramesRx returns a uint64 +func (obj *portMetric) HasFramesRx() bool { + return obj.obj.FramesRx != nil +} + +// The current total number of valid frames received +// SetFramesRx sets the uint64 value in the PortMetric object +func (obj *portMetric) SetFramesRx(value uint64) PortMetric { + + obj.obj.FramesRx = &value + return obj +} + +// The current total number of bytes transmitted +// BytesTx returns a uint64 +func (obj *portMetric) BytesTx() uint64 { + + return *obj.obj.BytesTx + +} + +// The current total number of bytes transmitted +// BytesTx returns a uint64 +func (obj *portMetric) HasBytesTx() bool { + return obj.obj.BytesTx != nil +} + +// The current total number of bytes transmitted +// SetBytesTx sets the uint64 value in the PortMetric object +func (obj *portMetric) SetBytesTx(value uint64) PortMetric { + + obj.obj.BytesTx = &value + return obj +} + +// The current total number of valid bytes received +// BytesRx returns a uint64 +func (obj *portMetric) BytesRx() uint64 { + + return *obj.obj.BytesRx + +} + +// The current total number of valid bytes received +// BytesRx returns a uint64 +func (obj *portMetric) HasBytesRx() bool { + return obj.obj.BytesRx != nil +} + +// The current total number of valid bytes received +// SetBytesRx sets the uint64 value in the PortMetric object +func (obj *portMetric) SetBytesRx(value uint64) PortMetric { + + obj.obj.BytesRx = &value + return obj +} + +// The current rate of frames transmitted +// FramesTxRate returns a float32 +func (obj *portMetric) FramesTxRate() float32 { + + return *obj.obj.FramesTxRate + +} + +// The current rate of frames transmitted +// FramesTxRate returns a float32 +func (obj *portMetric) HasFramesTxRate() bool { + return obj.obj.FramesTxRate != nil +} + +// The current rate of frames transmitted +// SetFramesTxRate sets the float32 value in the PortMetric object +func (obj *portMetric) SetFramesTxRate(value float32) PortMetric { + + obj.obj.FramesTxRate = &value + return obj +} + +// The current rate of valid frames received +// FramesRxRate returns a float32 +func (obj *portMetric) FramesRxRate() float32 { + + return *obj.obj.FramesRxRate + +} + +// The current rate of valid frames received +// FramesRxRate returns a float32 +func (obj *portMetric) HasFramesRxRate() bool { + return obj.obj.FramesRxRate != nil +} + +// The current rate of valid frames received +// SetFramesRxRate sets the float32 value in the PortMetric object +func (obj *portMetric) SetFramesRxRate(value float32) PortMetric { + + obj.obj.FramesRxRate = &value + return obj +} + +// The current rate of bytes transmitted +// BytesTxRate returns a float32 +func (obj *portMetric) BytesTxRate() float32 { + + return *obj.obj.BytesTxRate + +} + +// The current rate of bytes transmitted +// BytesTxRate returns a float32 +func (obj *portMetric) HasBytesTxRate() bool { + return obj.obj.BytesTxRate != nil +} + +// The current rate of bytes transmitted +// SetBytesTxRate sets the float32 value in the PortMetric object +func (obj *portMetric) SetBytesTxRate(value float32) PortMetric { + + obj.obj.BytesTxRate = &value + return obj +} + +// The current rate of bytes received +// BytesRxRate returns a float32 +func (obj *portMetric) BytesRxRate() float32 { + + return *obj.obj.BytesRxRate + +} + +// The current rate of bytes received +// BytesRxRate returns a float32 +func (obj *portMetric) HasBytesRxRate() bool { + return obj.obj.BytesRxRate != nil +} + +// The current rate of bytes received +// SetBytesRxRate sets the float32 value in the PortMetric object +func (obj *portMetric) SetBytesRxRate(value float32) PortMetric { + + obj.obj.BytesRxRate = &value + return obj +} + +type PortMetricTransmitEnum string + +// Enum of Transmit on PortMetric +var PortMetricTransmit = struct { + STARTED PortMetricTransmitEnum + STOPPED PortMetricTransmitEnum +}{ + STARTED: PortMetricTransmitEnum("started"), + STOPPED: PortMetricTransmitEnum("stopped"), +} + +func (obj *portMetric) Transmit() PortMetricTransmitEnum { + return PortMetricTransmitEnum(obj.obj.Transmit.Enum().String()) +} + +// The transmit state of the flow. +// Transmit returns a string +func (obj *portMetric) HasTransmit() bool { + return obj.obj.Transmit != nil +} + +func (obj *portMetric) SetTransmit(value PortMetricTransmitEnum) PortMetric { + intValue, ok := otg.PortMetric_Transmit_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on PortMetricTransmitEnum", string(value))) + return obj + } + enumValue := otg.PortMetric_Transmit_Enum(intValue) + obj.obj.Transmit = &enumValue + + return obj +} + +func (obj *portMetric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *portMetric) setDefault() { + +} diff --git a/gosnappi/port_metrics_request.go b/gosnappi/port_metrics_request.go new file mode 100644 index 00000000..254415cd --- /dev/null +++ b/gosnappi/port_metrics_request.go @@ -0,0 +1,373 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PortMetricsRequest ***** +type portMetricsRequest struct { + validation + obj *otg.PortMetricsRequest + marshaller marshalPortMetricsRequest + unMarshaller unMarshalPortMetricsRequest +} + +func NewPortMetricsRequest() PortMetricsRequest { + obj := portMetricsRequest{obj: &otg.PortMetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *portMetricsRequest) msg() *otg.PortMetricsRequest { + return obj.obj +} + +func (obj *portMetricsRequest) setMsg(msg *otg.PortMetricsRequest) PortMetricsRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalportMetricsRequest struct { + obj *portMetricsRequest +} + +type marshalPortMetricsRequest interface { + // ToProto marshals PortMetricsRequest to protobuf object *otg.PortMetricsRequest + ToProto() (*otg.PortMetricsRequest, error) + // ToPbText marshals PortMetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals PortMetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals PortMetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshalportMetricsRequest struct { + obj *portMetricsRequest +} + +type unMarshalPortMetricsRequest interface { + // FromProto unmarshals PortMetricsRequest from protobuf object *otg.PortMetricsRequest + FromProto(msg *otg.PortMetricsRequest) (PortMetricsRequest, error) + // FromPbText unmarshals PortMetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PortMetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals PortMetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *portMetricsRequest) Marshal() marshalPortMetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalportMetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *portMetricsRequest) Unmarshal() unMarshalPortMetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalportMetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalportMetricsRequest) ToProto() (*otg.PortMetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalportMetricsRequest) FromProto(msg *otg.PortMetricsRequest) (PortMetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalportMetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalportMetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalportMetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalportMetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalportMetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalportMetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *portMetricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *portMetricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *portMetricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *portMetricsRequest) Clone() (PortMetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPortMetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PortMetricsRequest is the port result request to the traffic generator +type PortMetricsRequest interface { + Validation + // msg marshals PortMetricsRequest to protobuf object *otg.PortMetricsRequest + // and doesn't set defaults + msg() *otg.PortMetricsRequest + // setMsg unmarshals PortMetricsRequest from protobuf object *otg.PortMetricsRequest + // and doesn't set defaults + setMsg(*otg.PortMetricsRequest) PortMetricsRequest + // provides marshal interface + Marshal() marshalPortMetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalPortMetricsRequest + // validate validates PortMetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PortMetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PortNames returns []string, set in PortMetricsRequest. + PortNames() []string + // SetPortNames assigns []string provided by user to PortMetricsRequest + SetPortNames(value []string) PortMetricsRequest + // ColumnNames returns []PortMetricsRequestColumnNamesEnum, set in PortMetricsRequest + ColumnNames() []PortMetricsRequestColumnNamesEnum + // SetColumnNames assigns []PortMetricsRequestColumnNamesEnum provided by user to PortMetricsRequest + SetColumnNames(value []PortMetricsRequestColumnNamesEnum) PortMetricsRequest +} + +// The names of objects to return results for. An empty list will return all port row results. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// PortNames returns a []string +func (obj *portMetricsRequest) PortNames() []string { + if obj.obj.PortNames == nil { + obj.obj.PortNames = make([]string, 0) + } + return obj.obj.PortNames +} + +// The names of objects to return results for. An empty list will return all port row results. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// SetPortNames sets the []string value in the PortMetricsRequest object +func (obj *portMetricsRequest) SetPortNames(value []string) PortMetricsRequest { + + if obj.obj.PortNames == nil { + obj.obj.PortNames = make([]string, 0) + } + obj.obj.PortNames = value + + return obj +} + +type PortMetricsRequestColumnNamesEnum string + +// Enum of ColumnNames on PortMetricsRequest +var PortMetricsRequestColumnNames = struct { + TRANSMIT PortMetricsRequestColumnNamesEnum + LOCATION PortMetricsRequestColumnNamesEnum + LINK PortMetricsRequestColumnNamesEnum + CAPTURE PortMetricsRequestColumnNamesEnum + FRAMES_TX PortMetricsRequestColumnNamesEnum + FRAMES_RX PortMetricsRequestColumnNamesEnum + BYTES_TX PortMetricsRequestColumnNamesEnum + BYTES_RX PortMetricsRequestColumnNamesEnum + FRAMES_TX_RATE PortMetricsRequestColumnNamesEnum + FRAMES_RX_RATE PortMetricsRequestColumnNamesEnum + BYTES_TX_RATE PortMetricsRequestColumnNamesEnum + BYTES_RX_RATE PortMetricsRequestColumnNamesEnum +}{ + TRANSMIT: PortMetricsRequestColumnNamesEnum("transmit"), + LOCATION: PortMetricsRequestColumnNamesEnum("location"), + LINK: PortMetricsRequestColumnNamesEnum("link"), + CAPTURE: PortMetricsRequestColumnNamesEnum("capture"), + FRAMES_TX: PortMetricsRequestColumnNamesEnum("frames_tx"), + FRAMES_RX: PortMetricsRequestColumnNamesEnum("frames_rx"), + BYTES_TX: PortMetricsRequestColumnNamesEnum("bytes_tx"), + BYTES_RX: PortMetricsRequestColumnNamesEnum("bytes_rx"), + FRAMES_TX_RATE: PortMetricsRequestColumnNamesEnum("frames_tx_rate"), + FRAMES_RX_RATE: PortMetricsRequestColumnNamesEnum("frames_rx_rate"), + BYTES_TX_RATE: PortMetricsRequestColumnNamesEnum("bytes_tx_rate"), + BYTES_RX_RATE: PortMetricsRequestColumnNamesEnum("bytes_rx_rate"), +} + +func (obj *portMetricsRequest) ColumnNames() []PortMetricsRequestColumnNamesEnum { + items := []PortMetricsRequestColumnNamesEnum{} + for _, item := range obj.obj.ColumnNames { + items = append(items, PortMetricsRequestColumnNamesEnum(item.String())) + } + return items +} + +// The list of column names that the returned result set will contain. If the list is empty then all columns will be returned. The name of the port cannot be excluded. +// SetColumnNames sets the []string value in the PortMetricsRequest object +func (obj *portMetricsRequest) SetColumnNames(value []PortMetricsRequestColumnNamesEnum) PortMetricsRequest { + + items := []otg.PortMetricsRequest_ColumnNames_Enum{} + for _, item := range value { + intValue := otg.PortMetricsRequest_ColumnNames_Enum_value[string(item)] + items = append(items, otg.PortMetricsRequest_ColumnNames_Enum(intValue)) + } + obj.obj.ColumnNames = items + return obj +} + +func (obj *portMetricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *portMetricsRequest) setDefault() { + +} diff --git a/gosnappi/port_options.go b/gosnappi/port_options.go new file mode 100644 index 00000000..92d3c3d3 --- /dev/null +++ b/gosnappi/port_options.go @@ -0,0 +1,309 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** PortOptions ***** +type portOptions struct { + validation + obj *otg.PortOptions + marshaller marshalPortOptions + unMarshaller unMarshalPortOptions +} + +func NewPortOptions() PortOptions { + obj := portOptions{obj: &otg.PortOptions{}} + obj.setDefault() + return &obj +} + +func (obj *portOptions) msg() *otg.PortOptions { + return obj.obj +} + +func (obj *portOptions) setMsg(msg *otg.PortOptions) PortOptions { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalportOptions struct { + obj *portOptions +} + +type marshalPortOptions interface { + // ToProto marshals PortOptions to protobuf object *otg.PortOptions + ToProto() (*otg.PortOptions, error) + // ToPbText marshals PortOptions to protobuf text + ToPbText() (string, error) + // ToYaml marshals PortOptions to YAML text + ToYaml() (string, error) + // ToJson marshals PortOptions to JSON text + ToJson() (string, error) +} + +type unMarshalportOptions struct { + obj *portOptions +} + +type unMarshalPortOptions interface { + // FromProto unmarshals PortOptions from protobuf object *otg.PortOptions + FromProto(msg *otg.PortOptions) (PortOptions, error) + // FromPbText unmarshals PortOptions from protobuf text + FromPbText(value string) error + // FromYaml unmarshals PortOptions from YAML text + FromYaml(value string) error + // FromJson unmarshals PortOptions from JSON text + FromJson(value string) error +} + +func (obj *portOptions) Marshal() marshalPortOptions { + if obj.marshaller == nil { + obj.marshaller = &marshalportOptions{obj: obj} + } + return obj.marshaller +} + +func (obj *portOptions) Unmarshal() unMarshalPortOptions { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalportOptions{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalportOptions) ToProto() (*otg.PortOptions, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalportOptions) FromProto(msg *otg.PortOptions) (PortOptions, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalportOptions) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalportOptions) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalportOptions) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalportOptions) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalportOptions) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalportOptions) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *portOptions) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *portOptions) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *portOptions) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *portOptions) Clone() (PortOptions, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewPortOptions() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// PortOptions is common port options that apply to all configured Port objects. +type PortOptions interface { + Validation + // msg marshals PortOptions to protobuf object *otg.PortOptions + // and doesn't set defaults + msg() *otg.PortOptions + // setMsg unmarshals PortOptions from protobuf object *otg.PortOptions + // and doesn't set defaults + setMsg(*otg.PortOptions) PortOptions + // provides marshal interface + Marshal() marshalPortOptions + // provides unmarshal interface + Unmarshal() unMarshalPortOptions + // validate validates PortOptions + validate() error + // A stringer function + String() string + // Clones the object + Clone() (PortOptions, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LocationPreemption returns bool, set in PortOptions. + LocationPreemption() bool + // SetLocationPreemption assigns bool provided by user to PortOptions + SetLocationPreemption(value bool) PortOptions + // HasLocationPreemption checks if LocationPreemption has been set in PortOptions + HasLocationPreemption() bool +} + +// Preempt all the test port locations as defined by the Port.Port.properties.location. If the test ports defined by their location values are in use and this value is true, the test ports will be preempted. +// LocationPreemption returns a bool +func (obj *portOptions) LocationPreemption() bool { + + return *obj.obj.LocationPreemption + +} + +// Preempt all the test port locations as defined by the Port.Port.properties.location. If the test ports defined by their location values are in use and this value is true, the test ports will be preempted. +// LocationPreemption returns a bool +func (obj *portOptions) HasLocationPreemption() bool { + return obj.obj.LocationPreemption != nil +} + +// Preempt all the test port locations as defined by the Port.Port.properties.location. If the test ports defined by their location values are in use and this value is true, the test ports will be preempted. +// SetLocationPreemption sets the bool value in the PortOptions object +func (obj *portOptions) SetLocationPreemption(value bool) PortOptions { + + obj.obj.LocationPreemption = &value + return obj +} + +func (obj *portOptions) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *portOptions) setDefault() { + if obj.obj.LocationPreemption == nil { + obj.SetLocationPreemption(false) + } + +} diff --git a/gosnappi/protocol_options.go b/gosnappi/protocol_options.go new file mode 100644 index 00000000..552a1c08 --- /dev/null +++ b/gosnappi/protocol_options.go @@ -0,0 +1,309 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ProtocolOptions ***** +type protocolOptions struct { + validation + obj *otg.ProtocolOptions + marshaller marshalProtocolOptions + unMarshaller unMarshalProtocolOptions +} + +func NewProtocolOptions() ProtocolOptions { + obj := protocolOptions{obj: &otg.ProtocolOptions{}} + obj.setDefault() + return &obj +} + +func (obj *protocolOptions) msg() *otg.ProtocolOptions { + return obj.obj +} + +func (obj *protocolOptions) setMsg(msg *otg.ProtocolOptions) ProtocolOptions { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalprotocolOptions struct { + obj *protocolOptions +} + +type marshalProtocolOptions interface { + // ToProto marshals ProtocolOptions to protobuf object *otg.ProtocolOptions + ToProto() (*otg.ProtocolOptions, error) + // ToPbText marshals ProtocolOptions to protobuf text + ToPbText() (string, error) + // ToYaml marshals ProtocolOptions to YAML text + ToYaml() (string, error) + // ToJson marshals ProtocolOptions to JSON text + ToJson() (string, error) +} + +type unMarshalprotocolOptions struct { + obj *protocolOptions +} + +type unMarshalProtocolOptions interface { + // FromProto unmarshals ProtocolOptions from protobuf object *otg.ProtocolOptions + FromProto(msg *otg.ProtocolOptions) (ProtocolOptions, error) + // FromPbText unmarshals ProtocolOptions from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ProtocolOptions from YAML text + FromYaml(value string) error + // FromJson unmarshals ProtocolOptions from JSON text + FromJson(value string) error +} + +func (obj *protocolOptions) Marshal() marshalProtocolOptions { + if obj.marshaller == nil { + obj.marshaller = &marshalprotocolOptions{obj: obj} + } + return obj.marshaller +} + +func (obj *protocolOptions) Unmarshal() unMarshalProtocolOptions { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalprotocolOptions{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalprotocolOptions) ToProto() (*otg.ProtocolOptions, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalprotocolOptions) FromProto(msg *otg.ProtocolOptions) (ProtocolOptions, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalprotocolOptions) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalprotocolOptions) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalprotocolOptions) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalprotocolOptions) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalprotocolOptions) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalprotocolOptions) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *protocolOptions) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *protocolOptions) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *protocolOptions) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *protocolOptions) Clone() (ProtocolOptions, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewProtocolOptions() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ProtocolOptions is common options that apply to all configured protocols and interfaces. +type ProtocolOptions interface { + Validation + // msg marshals ProtocolOptions to protobuf object *otg.ProtocolOptions + // and doesn't set defaults + msg() *otg.ProtocolOptions + // setMsg unmarshals ProtocolOptions from protobuf object *otg.ProtocolOptions + // and doesn't set defaults + setMsg(*otg.ProtocolOptions) ProtocolOptions + // provides marshal interface + Marshal() marshalProtocolOptions + // provides unmarshal interface + Unmarshal() unMarshalProtocolOptions + // validate validates ProtocolOptions + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ProtocolOptions, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // AutoStartAll returns bool, set in ProtocolOptions. + AutoStartAll() bool + // SetAutoStartAll assigns bool provided by user to ProtocolOptions + SetAutoStartAll(value bool) ProtocolOptions + // HasAutoStartAll checks if AutoStartAll has been set in ProtocolOptions + HasAutoStartAll() bool +} + +// When set to true, all underlying resources for configured protocols and interfaces shall be created and corresponding protocol session negotiation shall be initiated. Otherwise, when set to false, corresponding protocol session negotiation will need to be initiated using a separate set_protocol_state API call. +// AutoStartAll returns a bool +func (obj *protocolOptions) AutoStartAll() bool { + + return *obj.obj.AutoStartAll + +} + +// When set to true, all underlying resources for configured protocols and interfaces shall be created and corresponding protocol session negotiation shall be initiated. Otherwise, when set to false, corresponding protocol session negotiation will need to be initiated using a separate set_protocol_state API call. +// AutoStartAll returns a bool +func (obj *protocolOptions) HasAutoStartAll() bool { + return obj.obj.AutoStartAll != nil +} + +// When set to true, all underlying resources for configured protocols and interfaces shall be created and corresponding protocol session negotiation shall be initiated. Otherwise, when set to false, corresponding protocol session negotiation will need to be initiated using a separate set_protocol_state API call. +// SetAutoStartAll sets the bool value in the ProtocolOptions object +func (obj *protocolOptions) SetAutoStartAll(value bool) ProtocolOptions { + + obj.obj.AutoStartAll = &value + return obj +} + +func (obj *protocolOptions) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *protocolOptions) setDefault() { + if obj.obj.AutoStartAll == nil { + obj.SetAutoStartAll(true) + } + +} diff --git a/gosnappi/result_bgp_as_path.go b/gosnappi/result_bgp_as_path.go new file mode 100644 index 00000000..1b5c8a04 --- /dev/null +++ b/gosnappi/result_bgp_as_path.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultBgpAsPath ***** +type resultBgpAsPath struct { + validation + obj *otg.ResultBgpAsPath + marshaller marshalResultBgpAsPath + unMarshaller unMarshalResultBgpAsPath + segmentsHolder ResultBgpAsPathResultBgpAsPathSegmentIter +} + +func NewResultBgpAsPath() ResultBgpAsPath { + obj := resultBgpAsPath{obj: &otg.ResultBgpAsPath{}} + obj.setDefault() + return &obj +} + +func (obj *resultBgpAsPath) msg() *otg.ResultBgpAsPath { + return obj.obj +} + +func (obj *resultBgpAsPath) setMsg(msg *otg.ResultBgpAsPath) ResultBgpAsPath { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultBgpAsPath struct { + obj *resultBgpAsPath +} + +type marshalResultBgpAsPath interface { + // ToProto marshals ResultBgpAsPath to protobuf object *otg.ResultBgpAsPath + ToProto() (*otg.ResultBgpAsPath, error) + // ToPbText marshals ResultBgpAsPath to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultBgpAsPath to YAML text + ToYaml() (string, error) + // ToJson marshals ResultBgpAsPath to JSON text + ToJson() (string, error) +} + +type unMarshalresultBgpAsPath struct { + obj *resultBgpAsPath +} + +type unMarshalResultBgpAsPath interface { + // FromProto unmarshals ResultBgpAsPath from protobuf object *otg.ResultBgpAsPath + FromProto(msg *otg.ResultBgpAsPath) (ResultBgpAsPath, error) + // FromPbText unmarshals ResultBgpAsPath from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultBgpAsPath from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultBgpAsPath from JSON text + FromJson(value string) error +} + +func (obj *resultBgpAsPath) Marshal() marshalResultBgpAsPath { + if obj.marshaller == nil { + obj.marshaller = &marshalresultBgpAsPath{obj: obj} + } + return obj.marshaller +} + +func (obj *resultBgpAsPath) Unmarshal() unMarshalResultBgpAsPath { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultBgpAsPath{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultBgpAsPath) ToProto() (*otg.ResultBgpAsPath, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultBgpAsPath) FromProto(msg *otg.ResultBgpAsPath) (ResultBgpAsPath, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultBgpAsPath) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultBgpAsPath) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultBgpAsPath) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultBgpAsPath) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultBgpAsPath) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultBgpAsPath) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultBgpAsPath) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultBgpAsPath) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultBgpAsPath) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultBgpAsPath) Clone() (ResultBgpAsPath, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultBgpAsPath() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *resultBgpAsPath) setNil() { + obj.segmentsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ResultBgpAsPath is this attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. +type ResultBgpAsPath interface { + Validation + // msg marshals ResultBgpAsPath to protobuf object *otg.ResultBgpAsPath + // and doesn't set defaults + msg() *otg.ResultBgpAsPath + // setMsg unmarshals ResultBgpAsPath from protobuf object *otg.ResultBgpAsPath + // and doesn't set defaults + setMsg(*otg.ResultBgpAsPath) ResultBgpAsPath + // provides marshal interface + Marshal() marshalResultBgpAsPath + // provides unmarshal interface + Unmarshal() unMarshalResultBgpAsPath + // validate validates ResultBgpAsPath + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultBgpAsPath, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Segments returns ResultBgpAsPathResultBgpAsPathSegmentIterIter, set in ResultBgpAsPath + Segments() ResultBgpAsPathResultBgpAsPathSegmentIter + setNil() +} + +// AS Path segments present in the received AS Path attribute. +// Segments returns a []ResultBgpAsPathSegment +func (obj *resultBgpAsPath) Segments() ResultBgpAsPathResultBgpAsPathSegmentIter { + if len(obj.obj.Segments) == 0 { + obj.obj.Segments = []*otg.ResultBgpAsPathSegment{} + } + if obj.segmentsHolder == nil { + obj.segmentsHolder = newResultBgpAsPathResultBgpAsPathSegmentIter(&obj.obj.Segments).setMsg(obj) + } + return obj.segmentsHolder +} + +type resultBgpAsPathResultBgpAsPathSegmentIter struct { + obj *resultBgpAsPath + resultBgpAsPathSegmentSlice []ResultBgpAsPathSegment + fieldPtr *[]*otg.ResultBgpAsPathSegment +} + +func newResultBgpAsPathResultBgpAsPathSegmentIter(ptr *[]*otg.ResultBgpAsPathSegment) ResultBgpAsPathResultBgpAsPathSegmentIter { + return &resultBgpAsPathResultBgpAsPathSegmentIter{fieldPtr: ptr} +} + +type ResultBgpAsPathResultBgpAsPathSegmentIter interface { + setMsg(*resultBgpAsPath) ResultBgpAsPathResultBgpAsPathSegmentIter + Items() []ResultBgpAsPathSegment + Add() ResultBgpAsPathSegment + Append(items ...ResultBgpAsPathSegment) ResultBgpAsPathResultBgpAsPathSegmentIter + Set(index int, newObj ResultBgpAsPathSegment) ResultBgpAsPathResultBgpAsPathSegmentIter + Clear() ResultBgpAsPathResultBgpAsPathSegmentIter + clearHolderSlice() ResultBgpAsPathResultBgpAsPathSegmentIter + appendHolderSlice(item ResultBgpAsPathSegment) ResultBgpAsPathResultBgpAsPathSegmentIter +} + +func (obj *resultBgpAsPathResultBgpAsPathSegmentIter) setMsg(msg *resultBgpAsPath) ResultBgpAsPathResultBgpAsPathSegmentIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&resultBgpAsPathSegment{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *resultBgpAsPathResultBgpAsPathSegmentIter) Items() []ResultBgpAsPathSegment { + return obj.resultBgpAsPathSegmentSlice +} + +func (obj *resultBgpAsPathResultBgpAsPathSegmentIter) Add() ResultBgpAsPathSegment { + newObj := &otg.ResultBgpAsPathSegment{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &resultBgpAsPathSegment{obj: newObj} + newLibObj.setDefault() + obj.resultBgpAsPathSegmentSlice = append(obj.resultBgpAsPathSegmentSlice, newLibObj) + return newLibObj +} + +func (obj *resultBgpAsPathResultBgpAsPathSegmentIter) Append(items ...ResultBgpAsPathSegment) ResultBgpAsPathResultBgpAsPathSegmentIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.resultBgpAsPathSegmentSlice = append(obj.resultBgpAsPathSegmentSlice, item) + } + return obj +} + +func (obj *resultBgpAsPathResultBgpAsPathSegmentIter) Set(index int, newObj ResultBgpAsPathSegment) ResultBgpAsPathResultBgpAsPathSegmentIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.resultBgpAsPathSegmentSlice[index] = newObj + return obj +} +func (obj *resultBgpAsPathResultBgpAsPathSegmentIter) Clear() ResultBgpAsPathResultBgpAsPathSegmentIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.ResultBgpAsPathSegment{} + obj.resultBgpAsPathSegmentSlice = []ResultBgpAsPathSegment{} + } + return obj +} +func (obj *resultBgpAsPathResultBgpAsPathSegmentIter) clearHolderSlice() ResultBgpAsPathResultBgpAsPathSegmentIter { + if len(obj.resultBgpAsPathSegmentSlice) > 0 { + obj.resultBgpAsPathSegmentSlice = []ResultBgpAsPathSegment{} + } + return obj +} +func (obj *resultBgpAsPathResultBgpAsPathSegmentIter) appendHolderSlice(item ResultBgpAsPathSegment) ResultBgpAsPathResultBgpAsPathSegmentIter { + obj.resultBgpAsPathSegmentSlice = append(obj.resultBgpAsPathSegmentSlice, item) + return obj +} + +func (obj *resultBgpAsPath) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Segments) != 0 { + + if set_default { + obj.Segments().clearHolderSlice() + for _, item := range obj.obj.Segments { + obj.Segments().appendHolderSlice(&resultBgpAsPathSegment{obj: item}) + } + } + for _, item := range obj.Segments().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *resultBgpAsPath) setDefault() { + +} diff --git a/gosnappi/result_bgp_as_path_segment.go b/gosnappi/result_bgp_as_path_segment.go new file mode 100644 index 00000000..94b9df01 --- /dev/null +++ b/gosnappi/result_bgp_as_path_segment.go @@ -0,0 +1,348 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultBgpAsPathSegment ***** +type resultBgpAsPathSegment struct { + validation + obj *otg.ResultBgpAsPathSegment + marshaller marshalResultBgpAsPathSegment + unMarshaller unMarshalResultBgpAsPathSegment +} + +func NewResultBgpAsPathSegment() ResultBgpAsPathSegment { + obj := resultBgpAsPathSegment{obj: &otg.ResultBgpAsPathSegment{}} + obj.setDefault() + return &obj +} + +func (obj *resultBgpAsPathSegment) msg() *otg.ResultBgpAsPathSegment { + return obj.obj +} + +func (obj *resultBgpAsPathSegment) setMsg(msg *otg.ResultBgpAsPathSegment) ResultBgpAsPathSegment { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultBgpAsPathSegment struct { + obj *resultBgpAsPathSegment +} + +type marshalResultBgpAsPathSegment interface { + // ToProto marshals ResultBgpAsPathSegment to protobuf object *otg.ResultBgpAsPathSegment + ToProto() (*otg.ResultBgpAsPathSegment, error) + // ToPbText marshals ResultBgpAsPathSegment to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultBgpAsPathSegment to YAML text + ToYaml() (string, error) + // ToJson marshals ResultBgpAsPathSegment to JSON text + ToJson() (string, error) +} + +type unMarshalresultBgpAsPathSegment struct { + obj *resultBgpAsPathSegment +} + +type unMarshalResultBgpAsPathSegment interface { + // FromProto unmarshals ResultBgpAsPathSegment from protobuf object *otg.ResultBgpAsPathSegment + FromProto(msg *otg.ResultBgpAsPathSegment) (ResultBgpAsPathSegment, error) + // FromPbText unmarshals ResultBgpAsPathSegment from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultBgpAsPathSegment from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultBgpAsPathSegment from JSON text + FromJson(value string) error +} + +func (obj *resultBgpAsPathSegment) Marshal() marshalResultBgpAsPathSegment { + if obj.marshaller == nil { + obj.marshaller = &marshalresultBgpAsPathSegment{obj: obj} + } + return obj.marshaller +} + +func (obj *resultBgpAsPathSegment) Unmarshal() unMarshalResultBgpAsPathSegment { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultBgpAsPathSegment{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultBgpAsPathSegment) ToProto() (*otg.ResultBgpAsPathSegment, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultBgpAsPathSegment) FromProto(msg *otg.ResultBgpAsPathSegment) (ResultBgpAsPathSegment, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultBgpAsPathSegment) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultBgpAsPathSegment) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultBgpAsPathSegment) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultBgpAsPathSegment) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultBgpAsPathSegment) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultBgpAsPathSegment) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultBgpAsPathSegment) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultBgpAsPathSegment) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultBgpAsPathSegment) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultBgpAsPathSegment) Clone() (ResultBgpAsPathSegment, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultBgpAsPathSegment() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ResultBgpAsPathSegment is configuration for a single BGP AS path segment +type ResultBgpAsPathSegment interface { + Validation + // msg marshals ResultBgpAsPathSegment to protobuf object *otg.ResultBgpAsPathSegment + // and doesn't set defaults + msg() *otg.ResultBgpAsPathSegment + // setMsg unmarshals ResultBgpAsPathSegment from protobuf object *otg.ResultBgpAsPathSegment + // and doesn't set defaults + setMsg(*otg.ResultBgpAsPathSegment) ResultBgpAsPathSegment + // provides marshal interface + Marshal() marshalResultBgpAsPathSegment + // provides unmarshal interface + Unmarshal() unMarshalResultBgpAsPathSegment + // validate validates ResultBgpAsPathSegment + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultBgpAsPathSegment, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns ResultBgpAsPathSegmentTypeEnum, set in ResultBgpAsPathSegment + Type() ResultBgpAsPathSegmentTypeEnum + // SetType assigns ResultBgpAsPathSegmentTypeEnum provided by user to ResultBgpAsPathSegment + SetType(value ResultBgpAsPathSegmentTypeEnum) ResultBgpAsPathSegment + // HasType checks if Type has been set in ResultBgpAsPathSegment + HasType() bool + // AsNumbers returns []uint32, set in ResultBgpAsPathSegment. + AsNumbers() []uint32 + // SetAsNumbers assigns []uint32 provided by user to ResultBgpAsPathSegment + SetAsNumbers(value []uint32) ResultBgpAsPathSegment +} + +type ResultBgpAsPathSegmentTypeEnum string + +// Enum of Type on ResultBgpAsPathSegment +var ResultBgpAsPathSegmentType = struct { + AS_SEQ ResultBgpAsPathSegmentTypeEnum + AS_SET ResultBgpAsPathSegmentTypeEnum + AS_CONFED_SEQ ResultBgpAsPathSegmentTypeEnum + AS_CONFED_SET ResultBgpAsPathSegmentTypeEnum +}{ + AS_SEQ: ResultBgpAsPathSegmentTypeEnum("as_seq"), + AS_SET: ResultBgpAsPathSegmentTypeEnum("as_set"), + AS_CONFED_SEQ: ResultBgpAsPathSegmentTypeEnum("as_confed_seq"), + AS_CONFED_SET: ResultBgpAsPathSegmentTypeEnum("as_confed_set"), +} + +func (obj *resultBgpAsPathSegment) Type() ResultBgpAsPathSegmentTypeEnum { + return ResultBgpAsPathSegmentTypeEnum(obj.obj.Type.Enum().String()) +} + +// AS sequence is the most common type of AS_PATH, it contains the list of ASNs starting with the most recent ASN being added read from left to right. +// The other three AS_PATH types are used for Confederations - AS_SET is the type of AS_PATH attribute that summarizes routes using using the aggregate-address command, allowing AS_PATHs to be summarized in the update as well. - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most recent ASN to be added reading left to right - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent in BGP Updates. +// Type returns a string +func (obj *resultBgpAsPathSegment) HasType() bool { + return obj.obj.Type != nil +} + +func (obj *resultBgpAsPathSegment) SetType(value ResultBgpAsPathSegmentTypeEnum) ResultBgpAsPathSegment { + intValue, ok := otg.ResultBgpAsPathSegment_Type_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ResultBgpAsPathSegmentTypeEnum", string(value))) + return obj + } + enumValue := otg.ResultBgpAsPathSegment_Type_Enum(intValue) + obj.obj.Type = &enumValue + + return obj +} + +// The AS numbers in this AS path segment. +// AsNumbers returns a []uint32 +func (obj *resultBgpAsPathSegment) AsNumbers() []uint32 { + if obj.obj.AsNumbers == nil { + obj.obj.AsNumbers = make([]uint32, 0) + } + return obj.obj.AsNumbers +} + +// The AS numbers in this AS path segment. +// SetAsNumbers sets the []uint32 value in the ResultBgpAsPathSegment object +func (obj *resultBgpAsPathSegment) SetAsNumbers(value []uint32) ResultBgpAsPathSegment { + + if obj.obj.AsNumbers == nil { + obj.obj.AsNumbers = make([]uint32, 0) + } + obj.obj.AsNumbers = value + + return obj +} + +func (obj *resultBgpAsPathSegment) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *resultBgpAsPathSegment) setDefault() { + +} diff --git a/gosnappi/result_bgp_community.go b/gosnappi/result_bgp_community.go new file mode 100644 index 00000000..add08e88 --- /dev/null +++ b/gosnappi/result_bgp_community.go @@ -0,0 +1,402 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultBgpCommunity ***** +type resultBgpCommunity struct { + validation + obj *otg.ResultBgpCommunity + marshaller marshalResultBgpCommunity + unMarshaller unMarshalResultBgpCommunity +} + +func NewResultBgpCommunity() ResultBgpCommunity { + obj := resultBgpCommunity{obj: &otg.ResultBgpCommunity{}} + obj.setDefault() + return &obj +} + +func (obj *resultBgpCommunity) msg() *otg.ResultBgpCommunity { + return obj.obj +} + +func (obj *resultBgpCommunity) setMsg(msg *otg.ResultBgpCommunity) ResultBgpCommunity { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultBgpCommunity struct { + obj *resultBgpCommunity +} + +type marshalResultBgpCommunity interface { + // ToProto marshals ResultBgpCommunity to protobuf object *otg.ResultBgpCommunity + ToProto() (*otg.ResultBgpCommunity, error) + // ToPbText marshals ResultBgpCommunity to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultBgpCommunity to YAML text + ToYaml() (string, error) + // ToJson marshals ResultBgpCommunity to JSON text + ToJson() (string, error) +} + +type unMarshalresultBgpCommunity struct { + obj *resultBgpCommunity +} + +type unMarshalResultBgpCommunity interface { + // FromProto unmarshals ResultBgpCommunity from protobuf object *otg.ResultBgpCommunity + FromProto(msg *otg.ResultBgpCommunity) (ResultBgpCommunity, error) + // FromPbText unmarshals ResultBgpCommunity from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultBgpCommunity from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultBgpCommunity from JSON text + FromJson(value string) error +} + +func (obj *resultBgpCommunity) Marshal() marshalResultBgpCommunity { + if obj.marshaller == nil { + obj.marshaller = &marshalresultBgpCommunity{obj: obj} + } + return obj.marshaller +} + +func (obj *resultBgpCommunity) Unmarshal() unMarshalResultBgpCommunity { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultBgpCommunity{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultBgpCommunity) ToProto() (*otg.ResultBgpCommunity, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultBgpCommunity) FromProto(msg *otg.ResultBgpCommunity) (ResultBgpCommunity, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultBgpCommunity) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultBgpCommunity) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultBgpCommunity) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultBgpCommunity) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultBgpCommunity) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultBgpCommunity) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultBgpCommunity) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultBgpCommunity) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultBgpCommunity) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultBgpCommunity) Clone() (ResultBgpCommunity, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultBgpCommunity() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ResultBgpCommunity is bGP communities provide additional capability for tagging routes and for modifying BGP routing policy on upstream and downstream routers. BGP community is a 32-bit number which is broken into 16-bit AS number and a 16-bit custom value. +type ResultBgpCommunity interface { + Validation + // msg marshals ResultBgpCommunity to protobuf object *otg.ResultBgpCommunity + // and doesn't set defaults + msg() *otg.ResultBgpCommunity + // setMsg unmarshals ResultBgpCommunity from protobuf object *otg.ResultBgpCommunity + // and doesn't set defaults + setMsg(*otg.ResultBgpCommunity) ResultBgpCommunity + // provides marshal interface + Marshal() marshalResultBgpCommunity + // provides unmarshal interface + Unmarshal() unMarshalResultBgpCommunity + // validate validates ResultBgpCommunity + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultBgpCommunity, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns ResultBgpCommunityTypeEnum, set in ResultBgpCommunity + Type() ResultBgpCommunityTypeEnum + // SetType assigns ResultBgpCommunityTypeEnum provided by user to ResultBgpCommunity + SetType(value ResultBgpCommunityTypeEnum) ResultBgpCommunity + // HasType checks if Type has been set in ResultBgpCommunity + HasType() bool + // AsNumber returns uint32, set in ResultBgpCommunity. + AsNumber() uint32 + // SetAsNumber assigns uint32 provided by user to ResultBgpCommunity + SetAsNumber(value uint32) ResultBgpCommunity + // HasAsNumber checks if AsNumber has been set in ResultBgpCommunity + HasAsNumber() bool + // AsCustom returns uint32, set in ResultBgpCommunity. + AsCustom() uint32 + // SetAsCustom assigns uint32 provided by user to ResultBgpCommunity + SetAsCustom(value uint32) ResultBgpCommunity + // HasAsCustom checks if AsCustom has been set in ResultBgpCommunity + HasAsCustom() bool +} + +type ResultBgpCommunityTypeEnum string + +// Enum of Type on ResultBgpCommunity +var ResultBgpCommunityType = struct { + MANUAL_AS_NUMBER ResultBgpCommunityTypeEnum + NO_EXPORT ResultBgpCommunityTypeEnum + NO_ADVERTISED ResultBgpCommunityTypeEnum + NO_EXPORT_SUBCONFED ResultBgpCommunityTypeEnum + LLGR_STALE ResultBgpCommunityTypeEnum + NO_LLGR ResultBgpCommunityTypeEnum +}{ + MANUAL_AS_NUMBER: ResultBgpCommunityTypeEnum("manual_as_number"), + NO_EXPORT: ResultBgpCommunityTypeEnum("no_export"), + NO_ADVERTISED: ResultBgpCommunityTypeEnum("no_advertised"), + NO_EXPORT_SUBCONFED: ResultBgpCommunityTypeEnum("no_export_subconfed"), + LLGR_STALE: ResultBgpCommunityTypeEnum("llgr_stale"), + NO_LLGR: ResultBgpCommunityTypeEnum("no_llgr"), +} + +func (obj *resultBgpCommunity) Type() ResultBgpCommunityTypeEnum { + return ResultBgpCommunityTypeEnum(obj.obj.Type.Enum().String()) +} + +// The type of community AS number. If community type is manual_as_number then as_number and as_custom will be available. +// Type returns a string +func (obj *resultBgpCommunity) HasType() bool { + return obj.obj.Type != nil +} + +func (obj *resultBgpCommunity) SetType(value ResultBgpCommunityTypeEnum) ResultBgpCommunity { + intValue, ok := otg.ResultBgpCommunity_Type_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ResultBgpCommunityTypeEnum", string(value))) + return obj + } + enumValue := otg.ResultBgpCommunity_Type_Enum(intValue) + obj.obj.Type = &enumValue + + return obj +} + +// First two octets of 32 bit community AS number. +// AsNumber returns a uint32 +func (obj *resultBgpCommunity) AsNumber() uint32 { + + return *obj.obj.AsNumber + +} + +// First two octets of 32 bit community AS number. +// AsNumber returns a uint32 +func (obj *resultBgpCommunity) HasAsNumber() bool { + return obj.obj.AsNumber != nil +} + +// First two octets of 32 bit community AS number. +// SetAsNumber sets the uint32 value in the ResultBgpCommunity object +func (obj *resultBgpCommunity) SetAsNumber(value uint32) ResultBgpCommunity { + + obj.obj.AsNumber = &value + return obj +} + +// Last two octets of the community value. +// AsCustom returns a uint32 +func (obj *resultBgpCommunity) AsCustom() uint32 { + + return *obj.obj.AsCustom + +} + +// Last two octets of the community value. +// AsCustom returns a uint32 +func (obj *resultBgpCommunity) HasAsCustom() bool { + return obj.obj.AsCustom != nil +} + +// Last two octets of the community value. +// SetAsCustom sets the uint32 value in the ResultBgpCommunity object +func (obj *resultBgpCommunity) SetAsCustom(value uint32) ResultBgpCommunity { + + obj.obj.AsCustom = &value + return obj +} + +func (obj *resultBgpCommunity) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.AsNumber != nil { + + if *obj.obj.AsNumber > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= ResultBgpCommunity.AsNumber <= 65535 but Got %d", *obj.obj.AsNumber)) + } + + } + + if obj.obj.AsCustom != nil { + + if *obj.obj.AsCustom > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= ResultBgpCommunity.AsCustom <= 65535 but Got %d", *obj.obj.AsCustom)) + } + + } + +} + +func (obj *resultBgpCommunity) setDefault() { + +} diff --git a/gosnappi/result_extended_community.go b/gosnappi/result_extended_community.go new file mode 100644 index 00000000..38fbfc93 --- /dev/null +++ b/gosnappi/result_extended_community.go @@ -0,0 +1,376 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunity ***** +type resultExtendedCommunity struct { + validation + obj *otg.ResultExtendedCommunity + marshaller marshalResultExtendedCommunity + unMarshaller unMarshalResultExtendedCommunity + structuredHolder ResultExtendedCommunityStructured +} + +func NewResultExtendedCommunity() ResultExtendedCommunity { + obj := resultExtendedCommunity{obj: &otg.ResultExtendedCommunity{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunity) msg() *otg.ResultExtendedCommunity { + return obj.obj +} + +func (obj *resultExtendedCommunity) setMsg(msg *otg.ResultExtendedCommunity) ResultExtendedCommunity { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunity struct { + obj *resultExtendedCommunity +} + +type marshalResultExtendedCommunity interface { + // ToProto marshals ResultExtendedCommunity to protobuf object *otg.ResultExtendedCommunity + ToProto() (*otg.ResultExtendedCommunity, error) + // ToPbText marshals ResultExtendedCommunity to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunity to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunity to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunity struct { + obj *resultExtendedCommunity +} + +type unMarshalResultExtendedCommunity interface { + // FromProto unmarshals ResultExtendedCommunity from protobuf object *otg.ResultExtendedCommunity + FromProto(msg *otg.ResultExtendedCommunity) (ResultExtendedCommunity, error) + // FromPbText unmarshals ResultExtendedCommunity from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunity from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunity from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunity) Marshal() marshalResultExtendedCommunity { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunity{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunity) Unmarshal() unMarshalResultExtendedCommunity { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunity{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunity) ToProto() (*otg.ResultExtendedCommunity, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunity) FromProto(msg *otg.ResultExtendedCommunity) (ResultExtendedCommunity, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunity) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunity) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunity) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunity) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunity) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunity) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunity) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunity) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunity) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunity) Clone() (ResultExtendedCommunity, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunity() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *resultExtendedCommunity) setNil() { + obj.structuredHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ResultExtendedCommunity is each received Extended Community attribute is available for retrieval in two forms. Support of the 'raw' format in which all 8 bytes (16 hex characters) is always present and available for use. In addition, if supported by the implementation, the Extended Community attribute may also be retrieved in the 'structured' format which is an optional field. +type ResultExtendedCommunity interface { + Validation + // msg marshals ResultExtendedCommunity to protobuf object *otg.ResultExtendedCommunity + // and doesn't set defaults + msg() *otg.ResultExtendedCommunity + // setMsg unmarshals ResultExtendedCommunity from protobuf object *otg.ResultExtendedCommunity + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunity) ResultExtendedCommunity + // provides marshal interface + Marshal() marshalResultExtendedCommunity + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunity + // validate validates ResultExtendedCommunity + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunity, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Raw returns string, set in ResultExtendedCommunity. + Raw() string + // SetRaw assigns string provided by user to ResultExtendedCommunity + SetRaw(value string) ResultExtendedCommunity + // HasRaw checks if Raw has been set in ResultExtendedCommunity + HasRaw() bool + // Structured returns ResultExtendedCommunityStructured, set in ResultExtendedCommunity. + // ResultExtendedCommunityStructured is the Extended Communities Attribute is a optional BGP attribute,defined in RFC4360 with the Type Code 16. + // Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. + // An extended community is an 8-bytes value. It is divided into two main parts. The first 2 bytes of the community encode a type and optonal sub-type field. + // The last 6 bytes (or 7 bytes for types without a sub-type) carry a unique set of data in a format defined by the type and optional sub-type field. + // Extended communities provide a larger range for grouping or categorizing communities. + Structured() ResultExtendedCommunityStructured + // SetStructured assigns ResultExtendedCommunityStructured provided by user to ResultExtendedCommunity. + // ResultExtendedCommunityStructured is the Extended Communities Attribute is a optional BGP attribute,defined in RFC4360 with the Type Code 16. + // Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. + // An extended community is an 8-bytes value. It is divided into two main parts. The first 2 bytes of the community encode a type and optonal sub-type field. + // The last 6 bytes (or 7 bytes for types without a sub-type) carry a unique set of data in a format defined by the type and optional sub-type field. + // Extended communities provide a larger range for grouping or categorizing communities. + SetStructured(value ResultExtendedCommunityStructured) ResultExtendedCommunity + // HasStructured checks if Structured has been set in ResultExtendedCommunity + HasStructured() bool + setNil() +} + +// The raw byte contents of the 8 bytes received in the Extended Community as 16 hex characters. +// Raw returns a string +func (obj *resultExtendedCommunity) Raw() string { + + return *obj.obj.Raw + +} + +// The raw byte contents of the 8 bytes received in the Extended Community as 16 hex characters. +// Raw returns a string +func (obj *resultExtendedCommunity) HasRaw() bool { + return obj.obj.Raw != nil +} + +// The raw byte contents of the 8 bytes received in the Extended Community as 16 hex characters. +// SetRaw sets the string value in the ResultExtendedCommunity object +func (obj *resultExtendedCommunity) SetRaw(value string) ResultExtendedCommunity { + + obj.obj.Raw = &value + return obj +} + +// description is TBD +// Structured returns a ResultExtendedCommunityStructured +func (obj *resultExtendedCommunity) Structured() ResultExtendedCommunityStructured { + if obj.obj.Structured == nil { + obj.obj.Structured = NewResultExtendedCommunityStructured().msg() + } + if obj.structuredHolder == nil { + obj.structuredHolder = &resultExtendedCommunityStructured{obj: obj.obj.Structured} + } + return obj.structuredHolder +} + +// description is TBD +// Structured returns a ResultExtendedCommunityStructured +func (obj *resultExtendedCommunity) HasStructured() bool { + return obj.obj.Structured != nil +} + +// description is TBD +// SetStructured sets the ResultExtendedCommunityStructured value in the ResultExtendedCommunity object +func (obj *resultExtendedCommunity) SetStructured(value ResultExtendedCommunityStructured) ResultExtendedCommunity { + + obj.structuredHolder = nil + obj.obj.Structured = value.msg() + + return obj +} + +func (obj *resultExtendedCommunity) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Raw != nil { + + if len(*obj.obj.Raw) > 16 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "None <= length of ResultExtendedCommunity.Raw <= 16 but Got %d", + len(*obj.obj.Raw))) + } + + } + + if obj.obj.Structured != nil { + + obj.Structured().validateObj(vObj, set_default) + } + +} + +func (obj *resultExtendedCommunity) setDefault() { + +} diff --git a/gosnappi/result_extended_community_non_transitive2_octet_as_type.go b/gosnappi/result_extended_community_non_transitive2_octet_as_type.go new file mode 100644 index 00000000..e707f746 --- /dev/null +++ b/gosnappi/result_extended_community_non_transitive2_octet_as_type.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityNonTransitive2OctetAsType ***** +type resultExtendedCommunityNonTransitive2OctetAsType struct { + validation + obj *otg.ResultExtendedCommunityNonTransitive2OctetAsType + marshaller marshalResultExtendedCommunityNonTransitive2OctetAsType + unMarshaller unMarshalResultExtendedCommunityNonTransitive2OctetAsType + linkBandwidthSubtypeHolder ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth +} + +func NewResultExtendedCommunityNonTransitive2OctetAsType() ResultExtendedCommunityNonTransitive2OctetAsType { + obj := resultExtendedCommunityNonTransitive2OctetAsType{obj: &otg.ResultExtendedCommunityNonTransitive2OctetAsType{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) msg() *otg.ResultExtendedCommunityNonTransitive2OctetAsType { + return obj.obj +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) setMsg(msg *otg.ResultExtendedCommunityNonTransitive2OctetAsType) ResultExtendedCommunityNonTransitive2OctetAsType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityNonTransitive2OctetAsType struct { + obj *resultExtendedCommunityNonTransitive2OctetAsType +} + +type marshalResultExtendedCommunityNonTransitive2OctetAsType interface { + // ToProto marshals ResultExtendedCommunityNonTransitive2OctetAsType to protobuf object *otg.ResultExtendedCommunityNonTransitive2OctetAsType + ToProto() (*otg.ResultExtendedCommunityNonTransitive2OctetAsType, error) + // ToPbText marshals ResultExtendedCommunityNonTransitive2OctetAsType to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityNonTransitive2OctetAsType to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityNonTransitive2OctetAsType to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityNonTransitive2OctetAsType struct { + obj *resultExtendedCommunityNonTransitive2OctetAsType +} + +type unMarshalResultExtendedCommunityNonTransitive2OctetAsType interface { + // FromProto unmarshals ResultExtendedCommunityNonTransitive2OctetAsType from protobuf object *otg.ResultExtendedCommunityNonTransitive2OctetAsType + FromProto(msg *otg.ResultExtendedCommunityNonTransitive2OctetAsType) (ResultExtendedCommunityNonTransitive2OctetAsType, error) + // FromPbText unmarshals ResultExtendedCommunityNonTransitive2OctetAsType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityNonTransitive2OctetAsType from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityNonTransitive2OctetAsType from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) Marshal() marshalResultExtendedCommunityNonTransitive2OctetAsType { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityNonTransitive2OctetAsType{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) Unmarshal() unMarshalResultExtendedCommunityNonTransitive2OctetAsType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityNonTransitive2OctetAsType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityNonTransitive2OctetAsType) ToProto() (*otg.ResultExtendedCommunityNonTransitive2OctetAsType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityNonTransitive2OctetAsType) FromProto(msg *otg.ResultExtendedCommunityNonTransitive2OctetAsType) (ResultExtendedCommunityNonTransitive2OctetAsType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityNonTransitive2OctetAsType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityNonTransitive2OctetAsType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityNonTransitive2OctetAsType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityNonTransitive2OctetAsType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityNonTransitive2OctetAsType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityNonTransitive2OctetAsType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) Clone() (ResultExtendedCommunityNonTransitive2OctetAsType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityNonTransitive2OctetAsType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) setNil() { + obj.linkBandwidthSubtypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ResultExtendedCommunityNonTransitive2OctetAsType is the Non-Transitive Two-Octet AS-Specific Extended Community is sent as type 0x40. +type ResultExtendedCommunityNonTransitive2OctetAsType interface { + Validation + // msg marshals ResultExtendedCommunityNonTransitive2OctetAsType to protobuf object *otg.ResultExtendedCommunityNonTransitive2OctetAsType + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityNonTransitive2OctetAsType + // setMsg unmarshals ResultExtendedCommunityNonTransitive2OctetAsType from protobuf object *otg.ResultExtendedCommunityNonTransitive2OctetAsType + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityNonTransitive2OctetAsType) ResultExtendedCommunityNonTransitive2OctetAsType + // provides marshal interface + Marshal() marshalResultExtendedCommunityNonTransitive2OctetAsType + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityNonTransitive2OctetAsType + // validate validates ResultExtendedCommunityNonTransitive2OctetAsType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityNonTransitive2OctetAsType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ResultExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum, set in ResultExtendedCommunityNonTransitive2OctetAsType + Choice() ResultExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum + // setChoice assigns ResultExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum provided by user to ResultExtendedCommunityNonTransitive2OctetAsType + setChoice(value ResultExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum) ResultExtendedCommunityNonTransitive2OctetAsType + // HasChoice checks if Choice has been set in ResultExtendedCommunityNonTransitive2OctetAsType + HasChoice() bool + // LinkBandwidthSubtype returns ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth, set in ResultExtendedCommunityNonTransitive2OctetAsType. + // ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth is the Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. It is sent with sub-type as 0x04. + LinkBandwidthSubtype() ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // SetLinkBandwidthSubtype assigns ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth provided by user to ResultExtendedCommunityNonTransitive2OctetAsType. + // ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth is the Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. It is sent with sub-type as 0x04. + SetLinkBandwidthSubtype(value ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ResultExtendedCommunityNonTransitive2OctetAsType + // HasLinkBandwidthSubtype checks if LinkBandwidthSubtype has been set in ResultExtendedCommunityNonTransitive2OctetAsType + HasLinkBandwidthSubtype() bool + setNil() +} + +type ResultExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum string + +// Enum of Choice on ResultExtendedCommunityNonTransitive2OctetAsType +var ResultExtendedCommunityNonTransitive2OctetAsTypeChoice = struct { + LINK_BANDWIDTH_SUBTYPE ResultExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum +}{ + LINK_BANDWIDTH_SUBTYPE: ResultExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum("link_bandwidth_subtype"), +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) Choice() ResultExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum { + return ResultExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) setChoice(value ResultExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum) ResultExtendedCommunityNonTransitive2OctetAsType { + intValue, ok := otg.ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ResultExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.LinkBandwidthSubtype = nil + obj.linkBandwidthSubtypeHolder = nil + + if value == ResultExtendedCommunityNonTransitive2OctetAsTypeChoice.LINK_BANDWIDTH_SUBTYPE { + obj.obj.LinkBandwidthSubtype = NewResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth().msg() + } + + return obj +} + +// description is TBD +// LinkBandwidthSubtype returns a ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) LinkBandwidthSubtype() ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + if obj.obj.LinkBandwidthSubtype == nil { + obj.setChoice(ResultExtendedCommunityNonTransitive2OctetAsTypeChoice.LINK_BANDWIDTH_SUBTYPE) + } + if obj.linkBandwidthSubtypeHolder == nil { + obj.linkBandwidthSubtypeHolder = &resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth{obj: obj.obj.LinkBandwidthSubtype} + } + return obj.linkBandwidthSubtypeHolder +} + +// description is TBD +// LinkBandwidthSubtype returns a ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) HasLinkBandwidthSubtype() bool { + return obj.obj.LinkBandwidthSubtype != nil +} + +// description is TBD +// SetLinkBandwidthSubtype sets the ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth value in the ResultExtendedCommunityNonTransitive2OctetAsType object +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) SetLinkBandwidthSubtype(value ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ResultExtendedCommunityNonTransitive2OctetAsType { + obj.setChoice(ResultExtendedCommunityNonTransitive2OctetAsTypeChoice.LINK_BANDWIDTH_SUBTYPE) + obj.linkBandwidthSubtypeHolder = nil + obj.obj.LinkBandwidthSubtype = value.msg() + + return obj +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.LinkBandwidthSubtype != nil { + + obj.LinkBandwidthSubtype().validateObj(vObj, set_default) + } + +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsType) setDefault() { + var choices_set int = 0 + var choice ResultExtendedCommunityNonTransitive2OctetAsTypeChoiceEnum + + if obj.obj.LinkBandwidthSubtype != nil { + choices_set += 1 + choice = ResultExtendedCommunityNonTransitive2OctetAsTypeChoice.LINK_BANDWIDTH_SUBTYPE + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ResultExtendedCommunityNonTransitive2OctetAsType") + } + } else { + intVal := otg.ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum_value[string(choice)] + enumValue := otg.ResultExtendedCommunityNonTransitive2OctetAsType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/result_extended_community_non_transitive2_octet_as_type_link_bandwidth.go b/gosnappi/result_extended_community_non_transitive2_octet_as_type_link_bandwidth.go new file mode 100644 index 00000000..166be8d8 --- /dev/null +++ b/gosnappi/result_extended_community_non_transitive2_octet_as_type_link_bandwidth.go @@ -0,0 +1,344 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth ***** +type resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth struct { + validation + obj *otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + marshaller marshalResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + unMarshaller unMarshalResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth +} + +func NewResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth() ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + obj := resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth{obj: &otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) msg() *otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + return obj.obj +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) setMsg(msg *otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth struct { + obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth +} + +type marshalResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth interface { + // ToProto marshals ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth to protobuf object *otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + ToProto() (*otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth, error) + // ToPbText marshals ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth struct { + obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth +} + +type unMarshalResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth interface { + // FromProto unmarshals ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth from protobuf object *otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + FromProto(msg *otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) (ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth, error) + // FromPbText unmarshals ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Marshal() marshalResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Unmarshal() unMarshalResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ToProto() (*otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) FromProto(msg *otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) (ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Clone() (ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth is the Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. It is sent with sub-type as 0x04. +type ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth interface { + Validation + // msg marshals ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth to protobuf object *otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // setMsg unmarshals ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth from protobuf object *otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // provides marshal interface + Marshal() marshalResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // validate validates ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Global2ByteAs returns uint32, set in ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth. + Global2ByteAs() uint32 + // SetGlobal2ByteAs assigns uint32 provided by user to ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + SetGlobal2ByteAs(value uint32) ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // HasGlobal2ByteAs checks if Global2ByteAs has been set in ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + HasGlobal2ByteAs() bool + // Bandwidth returns float32, set in ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth. + Bandwidth() float32 + // SetBandwidth assigns float32 provided by user to ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + SetBandwidth(value float32) ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + // HasBandwidth checks if Bandwidth has been set in ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth + HasBandwidth() bool +} + +// The value of the Global Administrator subfield should represent the Autonomous System of the router that attaches the Link Bandwidth Community. If four octet AS numbering scheme is used, AS_TRANS (23456) should be used. +// Global2ByteAs returns a uint32 +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Global2ByteAs() uint32 { + + return *obj.obj.Global_2ByteAs + +} + +// The value of the Global Administrator subfield should represent the Autonomous System of the router that attaches the Link Bandwidth Community. If four octet AS numbering scheme is used, AS_TRANS (23456) should be used. +// Global2ByteAs returns a uint32 +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) HasGlobal2ByteAs() bool { + return obj.obj.Global_2ByteAs != nil +} + +// The value of the Global Administrator subfield should represent the Autonomous System of the router that attaches the Link Bandwidth Community. If four octet AS numbering scheme is used, AS_TRANS (23456) should be used. +// SetGlobal2ByteAs sets the uint32 value in the ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth object +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) SetGlobal2ByteAs(value uint32) ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + + obj.obj.Global_2ByteAs = &value + return obj +} + +// Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and 1 Mbps is 1000 Kbps per second ) +// Bandwidth returns a float32 +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) Bandwidth() float32 { + + return *obj.obj.Bandwidth + +} + +// Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and 1 Mbps is 1000 Kbps per second ) +// Bandwidth returns a float32 +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) HasBandwidth() bool { + return obj.obj.Bandwidth != nil +} + +// Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and 1 Mbps is 1000 Kbps per second ) +// SetBandwidth sets the float32 value in the ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth object +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) SetBandwidth(value float32) ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth { + + obj.obj.Bandwidth = &value + return obj +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Global_2ByteAs != nil { + + if *obj.obj.Global_2ByteAs > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth.Global_2ByteAs <= 65535 but Got %d", *obj.obj.Global_2ByteAs)) + } + + } + +} + +func (obj *resultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth) setDefault() { + +} diff --git a/gosnappi/result_extended_community_structured.go b/gosnappi/result_extended_community_structured.go new file mode 100644 index 00000000..2b321a62 --- /dev/null +++ b/gosnappi/result_extended_community_structured.go @@ -0,0 +1,618 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityStructured ***** +type resultExtendedCommunityStructured struct { + validation + obj *otg.ResultExtendedCommunityStructured + marshaller marshalResultExtendedCommunityStructured + unMarshaller unMarshalResultExtendedCommunityStructured + transitive_2OctetAsTypeHolder ResultExtendedCommunityTransitive2OctetAsType + transitiveIpv4AddressTypeHolder ResultExtendedCommunityTransitiveIpv4AddressType + transitive_4OctetAsTypeHolder ResultExtendedCommunityTransitive4OctetAsType + transitiveOpaqueTypeHolder ResultExtendedCommunityTransitiveOpaqueType + nonTransitive_2OctetAsTypeHolder ResultExtendedCommunityNonTransitive2OctetAsType +} + +func NewResultExtendedCommunityStructured() ResultExtendedCommunityStructured { + obj := resultExtendedCommunityStructured{obj: &otg.ResultExtendedCommunityStructured{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityStructured) msg() *otg.ResultExtendedCommunityStructured { + return obj.obj +} + +func (obj *resultExtendedCommunityStructured) setMsg(msg *otg.ResultExtendedCommunityStructured) ResultExtendedCommunityStructured { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityStructured struct { + obj *resultExtendedCommunityStructured +} + +type marshalResultExtendedCommunityStructured interface { + // ToProto marshals ResultExtendedCommunityStructured to protobuf object *otg.ResultExtendedCommunityStructured + ToProto() (*otg.ResultExtendedCommunityStructured, error) + // ToPbText marshals ResultExtendedCommunityStructured to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityStructured to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityStructured to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityStructured struct { + obj *resultExtendedCommunityStructured +} + +type unMarshalResultExtendedCommunityStructured interface { + // FromProto unmarshals ResultExtendedCommunityStructured from protobuf object *otg.ResultExtendedCommunityStructured + FromProto(msg *otg.ResultExtendedCommunityStructured) (ResultExtendedCommunityStructured, error) + // FromPbText unmarshals ResultExtendedCommunityStructured from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityStructured from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityStructured from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityStructured) Marshal() marshalResultExtendedCommunityStructured { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityStructured{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityStructured) Unmarshal() unMarshalResultExtendedCommunityStructured { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityStructured{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityStructured) ToProto() (*otg.ResultExtendedCommunityStructured, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityStructured) FromProto(msg *otg.ResultExtendedCommunityStructured) (ResultExtendedCommunityStructured, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityStructured) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityStructured) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityStructured) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityStructured) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityStructured) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityStructured) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityStructured) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityStructured) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityStructured) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityStructured) Clone() (ResultExtendedCommunityStructured, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityStructured() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *resultExtendedCommunityStructured) setNil() { + obj.transitive_2OctetAsTypeHolder = nil + obj.transitiveIpv4AddressTypeHolder = nil + obj.transitive_4OctetAsTypeHolder = nil + obj.transitiveOpaqueTypeHolder = nil + obj.nonTransitive_2OctetAsTypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ResultExtendedCommunityStructured is the Extended Communities Attribute is a optional BGP attribute,defined in RFC4360 with the Type Code 16. +// Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. +// An extended community is an 8-bytes value. It is divided into two main parts. The first 2 bytes of the community encode a type and optonal sub-type field. +// The last 6 bytes (or 7 bytes for types without a sub-type) carry a unique set of data in a format defined by the type and optional sub-type field. +// Extended communities provide a larger range for grouping or categorizing communities. +type ResultExtendedCommunityStructured interface { + Validation + // msg marshals ResultExtendedCommunityStructured to protobuf object *otg.ResultExtendedCommunityStructured + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityStructured + // setMsg unmarshals ResultExtendedCommunityStructured from protobuf object *otg.ResultExtendedCommunityStructured + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityStructured) ResultExtendedCommunityStructured + // provides marshal interface + Marshal() marshalResultExtendedCommunityStructured + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityStructured + // validate validates ResultExtendedCommunityStructured + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityStructured, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ResultExtendedCommunityStructuredChoiceEnum, set in ResultExtendedCommunityStructured + Choice() ResultExtendedCommunityStructuredChoiceEnum + // setChoice assigns ResultExtendedCommunityStructuredChoiceEnum provided by user to ResultExtendedCommunityStructured + setChoice(value ResultExtendedCommunityStructuredChoiceEnum) ResultExtendedCommunityStructured + // HasChoice checks if Choice has been set in ResultExtendedCommunityStructured + HasChoice() bool + // Transitive2OctetAsType returns ResultExtendedCommunityTransitive2OctetAsType, set in ResultExtendedCommunityStructured. + // ResultExtendedCommunityTransitive2OctetAsType is the Transitive Two-Octet AS-Specific Extended Community is sent as type 0x00 . + Transitive2OctetAsType() ResultExtendedCommunityTransitive2OctetAsType + // SetTransitive2OctetAsType assigns ResultExtendedCommunityTransitive2OctetAsType provided by user to ResultExtendedCommunityStructured. + // ResultExtendedCommunityTransitive2OctetAsType is the Transitive Two-Octet AS-Specific Extended Community is sent as type 0x00 . + SetTransitive2OctetAsType(value ResultExtendedCommunityTransitive2OctetAsType) ResultExtendedCommunityStructured + // HasTransitive2OctetAsType checks if Transitive2OctetAsType has been set in ResultExtendedCommunityStructured + HasTransitive2OctetAsType() bool + // TransitiveIpv4AddressType returns ResultExtendedCommunityTransitiveIpv4AddressType, set in ResultExtendedCommunityStructured. + // ResultExtendedCommunityTransitiveIpv4AddressType is the Transitive IPv4 Address Specific Extended Community is sent as type 0x01. + TransitiveIpv4AddressType() ResultExtendedCommunityTransitiveIpv4AddressType + // SetTransitiveIpv4AddressType assigns ResultExtendedCommunityTransitiveIpv4AddressType provided by user to ResultExtendedCommunityStructured. + // ResultExtendedCommunityTransitiveIpv4AddressType is the Transitive IPv4 Address Specific Extended Community is sent as type 0x01. + SetTransitiveIpv4AddressType(value ResultExtendedCommunityTransitiveIpv4AddressType) ResultExtendedCommunityStructured + // HasTransitiveIpv4AddressType checks if TransitiveIpv4AddressType has been set in ResultExtendedCommunityStructured + HasTransitiveIpv4AddressType() bool + // Transitive4OctetAsType returns ResultExtendedCommunityTransitive4OctetAsType, set in ResultExtendedCommunityStructured. + // ResultExtendedCommunityTransitive4OctetAsType is the Transitive Four-Octet AS-Specific Extended Community is sent as type 0x02. It is defined in RFC 5668. + Transitive4OctetAsType() ResultExtendedCommunityTransitive4OctetAsType + // SetTransitive4OctetAsType assigns ResultExtendedCommunityTransitive4OctetAsType provided by user to ResultExtendedCommunityStructured. + // ResultExtendedCommunityTransitive4OctetAsType is the Transitive Four-Octet AS-Specific Extended Community is sent as type 0x02. It is defined in RFC 5668. + SetTransitive4OctetAsType(value ResultExtendedCommunityTransitive4OctetAsType) ResultExtendedCommunityStructured + // HasTransitive4OctetAsType checks if Transitive4OctetAsType has been set in ResultExtendedCommunityStructured + HasTransitive4OctetAsType() bool + // TransitiveOpaqueType returns ResultExtendedCommunityTransitiveOpaqueType, set in ResultExtendedCommunityStructured. + // ResultExtendedCommunityTransitiveOpaqueType is the Transitive Opaque Extended Community is sent as type 0x03. + TransitiveOpaqueType() ResultExtendedCommunityTransitiveOpaqueType + // SetTransitiveOpaqueType assigns ResultExtendedCommunityTransitiveOpaqueType provided by user to ResultExtendedCommunityStructured. + // ResultExtendedCommunityTransitiveOpaqueType is the Transitive Opaque Extended Community is sent as type 0x03. + SetTransitiveOpaqueType(value ResultExtendedCommunityTransitiveOpaqueType) ResultExtendedCommunityStructured + // HasTransitiveOpaqueType checks if TransitiveOpaqueType has been set in ResultExtendedCommunityStructured + HasTransitiveOpaqueType() bool + // NonTransitive2OctetAsType returns ResultExtendedCommunityNonTransitive2OctetAsType, set in ResultExtendedCommunityStructured. + // ResultExtendedCommunityNonTransitive2OctetAsType is the Non-Transitive Two-Octet AS-Specific Extended Community is sent as type 0x40. + NonTransitive2OctetAsType() ResultExtendedCommunityNonTransitive2OctetAsType + // SetNonTransitive2OctetAsType assigns ResultExtendedCommunityNonTransitive2OctetAsType provided by user to ResultExtendedCommunityStructured. + // ResultExtendedCommunityNonTransitive2OctetAsType is the Non-Transitive Two-Octet AS-Specific Extended Community is sent as type 0x40. + SetNonTransitive2OctetAsType(value ResultExtendedCommunityNonTransitive2OctetAsType) ResultExtendedCommunityStructured + // HasNonTransitive2OctetAsType checks if NonTransitive2OctetAsType has been set in ResultExtendedCommunityStructured + HasNonTransitive2OctetAsType() bool + setNil() +} + +type ResultExtendedCommunityStructuredChoiceEnum string + +// Enum of Choice on ResultExtendedCommunityStructured +var ResultExtendedCommunityStructuredChoice = struct { + TRANSITIVE_2OCTET_AS_TYPE ResultExtendedCommunityStructuredChoiceEnum + TRANSITIVE_IPV4_ADDRESS_TYPE ResultExtendedCommunityStructuredChoiceEnum + TRANSITIVE_4OCTET_AS_TYPE ResultExtendedCommunityStructuredChoiceEnum + TRANSITIVE_OPAQUE_TYPE ResultExtendedCommunityStructuredChoiceEnum + NON_TRANSITIVE_2OCTET_AS_TYPE ResultExtendedCommunityStructuredChoiceEnum +}{ + TRANSITIVE_2OCTET_AS_TYPE: ResultExtendedCommunityStructuredChoiceEnum("transitive_2octet_as_type"), + TRANSITIVE_IPV4_ADDRESS_TYPE: ResultExtendedCommunityStructuredChoiceEnum("transitive_ipv4_address_type"), + TRANSITIVE_4OCTET_AS_TYPE: ResultExtendedCommunityStructuredChoiceEnum("transitive_4octet_as_type"), + TRANSITIVE_OPAQUE_TYPE: ResultExtendedCommunityStructuredChoiceEnum("transitive_opaque_type"), + NON_TRANSITIVE_2OCTET_AS_TYPE: ResultExtendedCommunityStructuredChoiceEnum("non_transitive_2octet_as_type"), +} + +func (obj *resultExtendedCommunityStructured) Choice() ResultExtendedCommunityStructuredChoiceEnum { + return ResultExtendedCommunityStructuredChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *resultExtendedCommunityStructured) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *resultExtendedCommunityStructured) setChoice(value ResultExtendedCommunityStructuredChoiceEnum) ResultExtendedCommunityStructured { + intValue, ok := otg.ResultExtendedCommunityStructured_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ResultExtendedCommunityStructuredChoiceEnum", string(value))) + return obj + } + enumValue := otg.ResultExtendedCommunityStructured_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.NonTransitive_2OctetAsType = nil + obj.nonTransitive_2OctetAsTypeHolder = nil + obj.obj.TransitiveOpaqueType = nil + obj.transitiveOpaqueTypeHolder = nil + obj.obj.Transitive_4OctetAsType = nil + obj.transitive_4OctetAsTypeHolder = nil + obj.obj.TransitiveIpv4AddressType = nil + obj.transitiveIpv4AddressTypeHolder = nil + obj.obj.Transitive_2OctetAsType = nil + obj.transitive_2OctetAsTypeHolder = nil + + if value == ResultExtendedCommunityStructuredChoice.TRANSITIVE_2OCTET_AS_TYPE { + obj.obj.Transitive_2OctetAsType = NewResultExtendedCommunityTransitive2OctetAsType().msg() + } + + if value == ResultExtendedCommunityStructuredChoice.TRANSITIVE_IPV4_ADDRESS_TYPE { + obj.obj.TransitiveIpv4AddressType = NewResultExtendedCommunityTransitiveIpv4AddressType().msg() + } + + if value == ResultExtendedCommunityStructuredChoice.TRANSITIVE_4OCTET_AS_TYPE { + obj.obj.Transitive_4OctetAsType = NewResultExtendedCommunityTransitive4OctetAsType().msg() + } + + if value == ResultExtendedCommunityStructuredChoice.TRANSITIVE_OPAQUE_TYPE { + obj.obj.TransitiveOpaqueType = NewResultExtendedCommunityTransitiveOpaqueType().msg() + } + + if value == ResultExtendedCommunityStructuredChoice.NON_TRANSITIVE_2OCTET_AS_TYPE { + obj.obj.NonTransitive_2OctetAsType = NewResultExtendedCommunityNonTransitive2OctetAsType().msg() + } + + return obj +} + +// description is TBD +// Transitive2OctetAsType returns a ResultExtendedCommunityTransitive2OctetAsType +func (obj *resultExtendedCommunityStructured) Transitive2OctetAsType() ResultExtendedCommunityTransitive2OctetAsType { + if obj.obj.Transitive_2OctetAsType == nil { + obj.setChoice(ResultExtendedCommunityStructuredChoice.TRANSITIVE_2OCTET_AS_TYPE) + } + if obj.transitive_2OctetAsTypeHolder == nil { + obj.transitive_2OctetAsTypeHolder = &resultExtendedCommunityTransitive2OctetAsType{obj: obj.obj.Transitive_2OctetAsType} + } + return obj.transitive_2OctetAsTypeHolder +} + +// description is TBD +// Transitive2OctetAsType returns a ResultExtendedCommunityTransitive2OctetAsType +func (obj *resultExtendedCommunityStructured) HasTransitive2OctetAsType() bool { + return obj.obj.Transitive_2OctetAsType != nil +} + +// description is TBD +// SetTransitive2OctetAsType sets the ResultExtendedCommunityTransitive2OctetAsType value in the ResultExtendedCommunityStructured object +func (obj *resultExtendedCommunityStructured) SetTransitive2OctetAsType(value ResultExtendedCommunityTransitive2OctetAsType) ResultExtendedCommunityStructured { + obj.setChoice(ResultExtendedCommunityStructuredChoice.TRANSITIVE_2OCTET_AS_TYPE) + obj.transitive_2OctetAsTypeHolder = nil + obj.obj.Transitive_2OctetAsType = value.msg() + + return obj +} + +// description is TBD +// TransitiveIpv4AddressType returns a ResultExtendedCommunityTransitiveIpv4AddressType +func (obj *resultExtendedCommunityStructured) TransitiveIpv4AddressType() ResultExtendedCommunityTransitiveIpv4AddressType { + if obj.obj.TransitiveIpv4AddressType == nil { + obj.setChoice(ResultExtendedCommunityStructuredChoice.TRANSITIVE_IPV4_ADDRESS_TYPE) + } + if obj.transitiveIpv4AddressTypeHolder == nil { + obj.transitiveIpv4AddressTypeHolder = &resultExtendedCommunityTransitiveIpv4AddressType{obj: obj.obj.TransitiveIpv4AddressType} + } + return obj.transitiveIpv4AddressTypeHolder +} + +// description is TBD +// TransitiveIpv4AddressType returns a ResultExtendedCommunityTransitiveIpv4AddressType +func (obj *resultExtendedCommunityStructured) HasTransitiveIpv4AddressType() bool { + return obj.obj.TransitiveIpv4AddressType != nil +} + +// description is TBD +// SetTransitiveIpv4AddressType sets the ResultExtendedCommunityTransitiveIpv4AddressType value in the ResultExtendedCommunityStructured object +func (obj *resultExtendedCommunityStructured) SetTransitiveIpv4AddressType(value ResultExtendedCommunityTransitiveIpv4AddressType) ResultExtendedCommunityStructured { + obj.setChoice(ResultExtendedCommunityStructuredChoice.TRANSITIVE_IPV4_ADDRESS_TYPE) + obj.transitiveIpv4AddressTypeHolder = nil + obj.obj.TransitiveIpv4AddressType = value.msg() + + return obj +} + +// description is TBD +// Transitive4OctetAsType returns a ResultExtendedCommunityTransitive4OctetAsType +func (obj *resultExtendedCommunityStructured) Transitive4OctetAsType() ResultExtendedCommunityTransitive4OctetAsType { + if obj.obj.Transitive_4OctetAsType == nil { + obj.setChoice(ResultExtendedCommunityStructuredChoice.TRANSITIVE_4OCTET_AS_TYPE) + } + if obj.transitive_4OctetAsTypeHolder == nil { + obj.transitive_4OctetAsTypeHolder = &resultExtendedCommunityTransitive4OctetAsType{obj: obj.obj.Transitive_4OctetAsType} + } + return obj.transitive_4OctetAsTypeHolder +} + +// description is TBD +// Transitive4OctetAsType returns a ResultExtendedCommunityTransitive4OctetAsType +func (obj *resultExtendedCommunityStructured) HasTransitive4OctetAsType() bool { + return obj.obj.Transitive_4OctetAsType != nil +} + +// description is TBD +// SetTransitive4OctetAsType sets the ResultExtendedCommunityTransitive4OctetAsType value in the ResultExtendedCommunityStructured object +func (obj *resultExtendedCommunityStructured) SetTransitive4OctetAsType(value ResultExtendedCommunityTransitive4OctetAsType) ResultExtendedCommunityStructured { + obj.setChoice(ResultExtendedCommunityStructuredChoice.TRANSITIVE_4OCTET_AS_TYPE) + obj.transitive_4OctetAsTypeHolder = nil + obj.obj.Transitive_4OctetAsType = value.msg() + + return obj +} + +// description is TBD +// TransitiveOpaqueType returns a ResultExtendedCommunityTransitiveOpaqueType +func (obj *resultExtendedCommunityStructured) TransitiveOpaqueType() ResultExtendedCommunityTransitiveOpaqueType { + if obj.obj.TransitiveOpaqueType == nil { + obj.setChoice(ResultExtendedCommunityStructuredChoice.TRANSITIVE_OPAQUE_TYPE) + } + if obj.transitiveOpaqueTypeHolder == nil { + obj.transitiveOpaqueTypeHolder = &resultExtendedCommunityTransitiveOpaqueType{obj: obj.obj.TransitiveOpaqueType} + } + return obj.transitiveOpaqueTypeHolder +} + +// description is TBD +// TransitiveOpaqueType returns a ResultExtendedCommunityTransitiveOpaqueType +func (obj *resultExtendedCommunityStructured) HasTransitiveOpaqueType() bool { + return obj.obj.TransitiveOpaqueType != nil +} + +// description is TBD +// SetTransitiveOpaqueType sets the ResultExtendedCommunityTransitiveOpaqueType value in the ResultExtendedCommunityStructured object +func (obj *resultExtendedCommunityStructured) SetTransitiveOpaqueType(value ResultExtendedCommunityTransitiveOpaqueType) ResultExtendedCommunityStructured { + obj.setChoice(ResultExtendedCommunityStructuredChoice.TRANSITIVE_OPAQUE_TYPE) + obj.transitiveOpaqueTypeHolder = nil + obj.obj.TransitiveOpaqueType = value.msg() + + return obj +} + +// description is TBD +// NonTransitive2OctetAsType returns a ResultExtendedCommunityNonTransitive2OctetAsType +func (obj *resultExtendedCommunityStructured) NonTransitive2OctetAsType() ResultExtendedCommunityNonTransitive2OctetAsType { + if obj.obj.NonTransitive_2OctetAsType == nil { + obj.setChoice(ResultExtendedCommunityStructuredChoice.NON_TRANSITIVE_2OCTET_AS_TYPE) + } + if obj.nonTransitive_2OctetAsTypeHolder == nil { + obj.nonTransitive_2OctetAsTypeHolder = &resultExtendedCommunityNonTransitive2OctetAsType{obj: obj.obj.NonTransitive_2OctetAsType} + } + return obj.nonTransitive_2OctetAsTypeHolder +} + +// description is TBD +// NonTransitive2OctetAsType returns a ResultExtendedCommunityNonTransitive2OctetAsType +func (obj *resultExtendedCommunityStructured) HasNonTransitive2OctetAsType() bool { + return obj.obj.NonTransitive_2OctetAsType != nil +} + +// description is TBD +// SetNonTransitive2OctetAsType sets the ResultExtendedCommunityNonTransitive2OctetAsType value in the ResultExtendedCommunityStructured object +func (obj *resultExtendedCommunityStructured) SetNonTransitive2OctetAsType(value ResultExtendedCommunityNonTransitive2OctetAsType) ResultExtendedCommunityStructured { + obj.setChoice(ResultExtendedCommunityStructuredChoice.NON_TRANSITIVE_2OCTET_AS_TYPE) + obj.nonTransitive_2OctetAsTypeHolder = nil + obj.obj.NonTransitive_2OctetAsType = value.msg() + + return obj +} + +func (obj *resultExtendedCommunityStructured) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Transitive_2OctetAsType != nil { + + obj.Transitive2OctetAsType().validateObj(vObj, set_default) + } + + if obj.obj.TransitiveIpv4AddressType != nil { + + obj.TransitiveIpv4AddressType().validateObj(vObj, set_default) + } + + if obj.obj.Transitive_4OctetAsType != nil { + + obj.Transitive4OctetAsType().validateObj(vObj, set_default) + } + + if obj.obj.TransitiveOpaqueType != nil { + + obj.TransitiveOpaqueType().validateObj(vObj, set_default) + } + + if obj.obj.NonTransitive_2OctetAsType != nil { + + obj.NonTransitive2OctetAsType().validateObj(vObj, set_default) + } + +} + +func (obj *resultExtendedCommunityStructured) setDefault() { + var choices_set int = 0 + var choice ResultExtendedCommunityStructuredChoiceEnum + + if obj.obj.TransitiveIpv4AddressType != nil { + choices_set += 1 + choice = ResultExtendedCommunityStructuredChoice.TRANSITIVE_IPV4_ADDRESS_TYPE + } + + if obj.obj.TransitiveOpaqueType != nil { + choices_set += 1 + choice = ResultExtendedCommunityStructuredChoice.TRANSITIVE_OPAQUE_TYPE + } + + if obj.obj.Transitive_2OctetAsType != nil { + choices_set += 1 + choice = ResultExtendedCommunityStructuredChoice.TRANSITIVE_2OCTET_AS_TYPE + } + + if obj.obj.Transitive_4OctetAsType != nil { + choices_set += 1 + choice = ResultExtendedCommunityStructuredChoice.TRANSITIVE_4OCTET_AS_TYPE + } + + if obj.obj.NonTransitive_2OctetAsType != nil { + choices_set += 1 + choice = ResultExtendedCommunityStructuredChoice.NON_TRANSITIVE_2OCTET_AS_TYPE + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ResultExtendedCommunityStructured") + } + } else { + intVal := otg.ResultExtendedCommunityStructured_Choice_Enum_value[string(choice)] + enumValue := otg.ResultExtendedCommunityStructured_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/result_extended_community_transitive2_octet_as_type.go b/gosnappi/result_extended_community_transitive2_octet_as_type.go new file mode 100644 index 00000000..9a4fd923 --- /dev/null +++ b/gosnappi/result_extended_community_transitive2_octet_as_type.go @@ -0,0 +1,446 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityTransitive2OctetAsType ***** +type resultExtendedCommunityTransitive2OctetAsType struct { + validation + obj *otg.ResultExtendedCommunityTransitive2OctetAsType + marshaller marshalResultExtendedCommunityTransitive2OctetAsType + unMarshaller unMarshalResultExtendedCommunityTransitive2OctetAsType + routeTargetSubtypeHolder ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + routeOriginSubtypeHolder ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin +} + +func NewResultExtendedCommunityTransitive2OctetAsType() ResultExtendedCommunityTransitive2OctetAsType { + obj := resultExtendedCommunityTransitive2OctetAsType{obj: &otg.ResultExtendedCommunityTransitive2OctetAsType{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityTransitive2OctetAsType) msg() *otg.ResultExtendedCommunityTransitive2OctetAsType { + return obj.obj +} + +func (obj *resultExtendedCommunityTransitive2OctetAsType) setMsg(msg *otg.ResultExtendedCommunityTransitive2OctetAsType) ResultExtendedCommunityTransitive2OctetAsType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityTransitive2OctetAsType struct { + obj *resultExtendedCommunityTransitive2OctetAsType +} + +type marshalResultExtendedCommunityTransitive2OctetAsType interface { + // ToProto marshals ResultExtendedCommunityTransitive2OctetAsType to protobuf object *otg.ResultExtendedCommunityTransitive2OctetAsType + ToProto() (*otg.ResultExtendedCommunityTransitive2OctetAsType, error) + // ToPbText marshals ResultExtendedCommunityTransitive2OctetAsType to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityTransitive2OctetAsType to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityTransitive2OctetAsType to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityTransitive2OctetAsType struct { + obj *resultExtendedCommunityTransitive2OctetAsType +} + +type unMarshalResultExtendedCommunityTransitive2OctetAsType interface { + // FromProto unmarshals ResultExtendedCommunityTransitive2OctetAsType from protobuf object *otg.ResultExtendedCommunityTransitive2OctetAsType + FromProto(msg *otg.ResultExtendedCommunityTransitive2OctetAsType) (ResultExtendedCommunityTransitive2OctetAsType, error) + // FromPbText unmarshals ResultExtendedCommunityTransitive2OctetAsType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityTransitive2OctetAsType from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityTransitive2OctetAsType from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityTransitive2OctetAsType) Marshal() marshalResultExtendedCommunityTransitive2OctetAsType { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityTransitive2OctetAsType{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityTransitive2OctetAsType) Unmarshal() unMarshalResultExtendedCommunityTransitive2OctetAsType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityTransitive2OctetAsType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityTransitive2OctetAsType) ToProto() (*otg.ResultExtendedCommunityTransitive2OctetAsType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive2OctetAsType) FromProto(msg *otg.ResultExtendedCommunityTransitive2OctetAsType) (ResultExtendedCommunityTransitive2OctetAsType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityTransitive2OctetAsType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive2OctetAsType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityTransitive2OctetAsType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive2OctetAsType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityTransitive2OctetAsType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive2OctetAsType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityTransitive2OctetAsType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitive2OctetAsType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitive2OctetAsType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityTransitive2OctetAsType) Clone() (ResultExtendedCommunityTransitive2OctetAsType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityTransitive2OctetAsType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *resultExtendedCommunityTransitive2OctetAsType) setNil() { + obj.routeTargetSubtypeHolder = nil + obj.routeOriginSubtypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ResultExtendedCommunityTransitive2OctetAsType is the Transitive Two-Octet AS-Specific Extended Community is sent as type 0x00 . +type ResultExtendedCommunityTransitive2OctetAsType interface { + Validation + // msg marshals ResultExtendedCommunityTransitive2OctetAsType to protobuf object *otg.ResultExtendedCommunityTransitive2OctetAsType + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityTransitive2OctetAsType + // setMsg unmarshals ResultExtendedCommunityTransitive2OctetAsType from protobuf object *otg.ResultExtendedCommunityTransitive2OctetAsType + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityTransitive2OctetAsType) ResultExtendedCommunityTransitive2OctetAsType + // provides marshal interface + Marshal() marshalResultExtendedCommunityTransitive2OctetAsType + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityTransitive2OctetAsType + // validate validates ResultExtendedCommunityTransitive2OctetAsType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityTransitive2OctetAsType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ResultExtendedCommunityTransitive2OctetAsTypeChoiceEnum, set in ResultExtendedCommunityTransitive2OctetAsType + Choice() ResultExtendedCommunityTransitive2OctetAsTypeChoiceEnum + // setChoice assigns ResultExtendedCommunityTransitive2OctetAsTypeChoiceEnum provided by user to ResultExtendedCommunityTransitive2OctetAsType + setChoice(value ResultExtendedCommunityTransitive2OctetAsTypeChoiceEnum) ResultExtendedCommunityTransitive2OctetAsType + // HasChoice checks if Choice has been set in ResultExtendedCommunityTransitive2OctetAsType + HasChoice() bool + // RouteTargetSubtype returns ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget, set in ResultExtendedCommunityTransitive2OctetAsType. + // ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP Update message. It is sent with sub-type as 0x02. + RouteTargetSubtype() ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + // SetRouteTargetSubtype assigns ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget provided by user to ResultExtendedCommunityTransitive2OctetAsType. + // ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP Update message. It is sent with sub-type as 0x02. + SetRouteTargetSubtype(value ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget) ResultExtendedCommunityTransitive2OctetAsType + // HasRouteTargetSubtype checks if RouteTargetSubtype has been set in ResultExtendedCommunityTransitive2OctetAsType + HasRouteTargetSubtype() bool + // RouteOriginSubtype returns ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin, set in ResultExtendedCommunityTransitive2OctetAsType. + // ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03 . + RouteOriginSubtype() ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // SetRouteOriginSubtype assigns ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin provided by user to ResultExtendedCommunityTransitive2OctetAsType. + // ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03 . + SetRouteOriginSubtype(value ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ResultExtendedCommunityTransitive2OctetAsType + // HasRouteOriginSubtype checks if RouteOriginSubtype has been set in ResultExtendedCommunityTransitive2OctetAsType + HasRouteOriginSubtype() bool + setNil() +} + +type ResultExtendedCommunityTransitive2OctetAsTypeChoiceEnum string + +// Enum of Choice on ResultExtendedCommunityTransitive2OctetAsType +var ResultExtendedCommunityTransitive2OctetAsTypeChoice = struct { + ROUTE_TARGET_SUBTYPE ResultExtendedCommunityTransitive2OctetAsTypeChoiceEnum + ROUTE_ORIGIN_SUBTYPE ResultExtendedCommunityTransitive2OctetAsTypeChoiceEnum +}{ + ROUTE_TARGET_SUBTYPE: ResultExtendedCommunityTransitive2OctetAsTypeChoiceEnum("route_target_subtype"), + ROUTE_ORIGIN_SUBTYPE: ResultExtendedCommunityTransitive2OctetAsTypeChoiceEnum("route_origin_subtype"), +} + +func (obj *resultExtendedCommunityTransitive2OctetAsType) Choice() ResultExtendedCommunityTransitive2OctetAsTypeChoiceEnum { + return ResultExtendedCommunityTransitive2OctetAsTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *resultExtendedCommunityTransitive2OctetAsType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *resultExtendedCommunityTransitive2OctetAsType) setChoice(value ResultExtendedCommunityTransitive2OctetAsTypeChoiceEnum) ResultExtendedCommunityTransitive2OctetAsType { + intValue, ok := otg.ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ResultExtendedCommunityTransitive2OctetAsTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.RouteOriginSubtype = nil + obj.routeOriginSubtypeHolder = nil + obj.obj.RouteTargetSubtype = nil + obj.routeTargetSubtypeHolder = nil + + if value == ResultExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE { + obj.obj.RouteTargetSubtype = NewResultExtendedCommunityTransitive2OctetAsTypeRouteTarget().msg() + } + + if value == ResultExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE { + obj.obj.RouteOriginSubtype = NewResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin().msg() + } + + return obj +} + +// description is TBD +// RouteTargetSubtype returns a ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget +func (obj *resultExtendedCommunityTransitive2OctetAsType) RouteTargetSubtype() ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget { + if obj.obj.RouteTargetSubtype == nil { + obj.setChoice(ResultExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE) + } + if obj.routeTargetSubtypeHolder == nil { + obj.routeTargetSubtypeHolder = &resultExtendedCommunityTransitive2OctetAsTypeRouteTarget{obj: obj.obj.RouteTargetSubtype} + } + return obj.routeTargetSubtypeHolder +} + +// description is TBD +// RouteTargetSubtype returns a ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget +func (obj *resultExtendedCommunityTransitive2OctetAsType) HasRouteTargetSubtype() bool { + return obj.obj.RouteTargetSubtype != nil +} + +// description is TBD +// SetRouteTargetSubtype sets the ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget value in the ResultExtendedCommunityTransitive2OctetAsType object +func (obj *resultExtendedCommunityTransitive2OctetAsType) SetRouteTargetSubtype(value ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget) ResultExtendedCommunityTransitive2OctetAsType { + obj.setChoice(ResultExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE) + obj.routeTargetSubtypeHolder = nil + obj.obj.RouteTargetSubtype = value.msg() + + return obj +} + +// description is TBD +// RouteOriginSubtype returns a ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin +func (obj *resultExtendedCommunityTransitive2OctetAsType) RouteOriginSubtype() ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + if obj.obj.RouteOriginSubtype == nil { + obj.setChoice(ResultExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE) + } + if obj.routeOriginSubtypeHolder == nil { + obj.routeOriginSubtypeHolder = &resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin{obj: obj.obj.RouteOriginSubtype} + } + return obj.routeOriginSubtypeHolder +} + +// description is TBD +// RouteOriginSubtype returns a ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin +func (obj *resultExtendedCommunityTransitive2OctetAsType) HasRouteOriginSubtype() bool { + return obj.obj.RouteOriginSubtype != nil +} + +// description is TBD +// SetRouteOriginSubtype sets the ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin value in the ResultExtendedCommunityTransitive2OctetAsType object +func (obj *resultExtendedCommunityTransitive2OctetAsType) SetRouteOriginSubtype(value ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ResultExtendedCommunityTransitive2OctetAsType { + obj.setChoice(ResultExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE) + obj.routeOriginSubtypeHolder = nil + obj.obj.RouteOriginSubtype = value.msg() + + return obj +} + +func (obj *resultExtendedCommunityTransitive2OctetAsType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RouteTargetSubtype != nil { + + obj.RouteTargetSubtype().validateObj(vObj, set_default) + } + + if obj.obj.RouteOriginSubtype != nil { + + obj.RouteOriginSubtype().validateObj(vObj, set_default) + } + +} + +func (obj *resultExtendedCommunityTransitive2OctetAsType) setDefault() { + var choices_set int = 0 + var choice ResultExtendedCommunityTransitive2OctetAsTypeChoiceEnum + + if obj.obj.RouteTargetSubtype != nil { + choices_set += 1 + choice = ResultExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE + } + + if obj.obj.RouteOriginSubtype != nil { + choices_set += 1 + choice = ResultExtendedCommunityTransitive2OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ResultExtendedCommunityTransitive2OctetAsType") + } + } else { + intVal := otg.ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum_value[string(choice)] + enumValue := otg.ResultExtendedCommunityTransitive2OctetAsType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/result_extended_community_transitive2_octet_as_type_route_origin.go b/gosnappi/result_extended_community_transitive2_octet_as_type_route_origin.go new file mode 100644 index 00000000..d8c076d0 --- /dev/null +++ b/gosnappi/result_extended_community_transitive2_octet_as_type_route_origin.go @@ -0,0 +1,344 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin ***** +type resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin struct { + validation + obj *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + marshaller marshalResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + unMarshaller unMarshalResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin +} + +func NewResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin() ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + obj := resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin{obj: &otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) msg() *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + return obj.obj +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) setMsg(msg *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityTransitive2OctetAsTypeRouteOrigin struct { + obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin +} + +type marshalResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin interface { + // ToProto marshals ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin to protobuf object *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + ToProto() (*otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin, error) + // ToPbText marshals ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityTransitive2OctetAsTypeRouteOrigin struct { + obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin +} + +type unMarshalResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin interface { + // FromProto unmarshals ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin from protobuf object *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + FromProto(msg *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) (ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin, error) + // FromPbText unmarshals ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Marshal() marshalResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityTransitive2OctetAsTypeRouteOrigin{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Unmarshal() unMarshalResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityTransitive2OctetAsTypeRouteOrigin{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ToProto() (*otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) FromProto(msg *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) (ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Clone() (ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03 . +type ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin interface { + Validation + // msg marshals ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin to protobuf object *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // setMsg unmarshals ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin from protobuf object *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // provides marshal interface + Marshal() marshalResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // validate validates ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Global2ByteAs returns uint32, set in ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin. + Global2ByteAs() uint32 + // SetGlobal2ByteAs assigns uint32 provided by user to ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + SetGlobal2ByteAs(value uint32) ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // HasGlobal2ByteAs checks if Global2ByteAs has been set in ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + HasGlobal2ByteAs() bool + // Local4ByteAdmin returns uint32, set in ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin. + Local4ByteAdmin() uint32 + // SetLocal4ByteAdmin assigns uint32 provided by user to ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + SetLocal4ByteAdmin(value uint32) ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + // HasLocal4ByteAdmin checks if Local4ByteAdmin has been set in ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin + HasLocal4ByteAdmin() bool +} + +// The two octet IANA assigned AS value assigned to the Autonomous System. +// Global2ByteAs returns a uint32 +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Global2ByteAs() uint32 { + + return *obj.obj.Global_2ByteAs + +} + +// The two octet IANA assigned AS value assigned to the Autonomous System. +// Global2ByteAs returns a uint32 +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) HasGlobal2ByteAs() bool { + return obj.obj.Global_2ByteAs != nil +} + +// The two octet IANA assigned AS value assigned to the Autonomous System. +// SetGlobal2ByteAs sets the uint32 value in the ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin object +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) SetGlobal2ByteAs(value uint32) ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + + obj.obj.Global_2ByteAs = &value + return obj +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local4ByteAdmin returns a uint32 +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) Local4ByteAdmin() uint32 { + + return *obj.obj.Local_4ByteAdmin + +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local4ByteAdmin returns a uint32 +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) HasLocal4ByteAdmin() bool { + return obj.obj.Local_4ByteAdmin != nil +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// SetLocal4ByteAdmin sets the uint32 value in the ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin object +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) SetLocal4ByteAdmin(value uint32) ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin { + + obj.obj.Local_4ByteAdmin = &value + return obj +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Global_2ByteAs != nil { + + if *obj.obj.Global_2ByteAs > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin.Global_2ByteAs <= 65535 but Got %d", *obj.obj.Global_2ByteAs)) + } + + } + +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteOrigin) setDefault() { + +} diff --git a/gosnappi/result_extended_community_transitive2_octet_as_type_route_target.go b/gosnappi/result_extended_community_transitive2_octet_as_type_route_target.go new file mode 100644 index 00000000..f6830bce --- /dev/null +++ b/gosnappi/result_extended_community_transitive2_octet_as_type_route_target.go @@ -0,0 +1,344 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget ***** +type resultExtendedCommunityTransitive2OctetAsTypeRouteTarget struct { + validation + obj *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + marshaller marshalResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + unMarshaller unMarshalResultExtendedCommunityTransitive2OctetAsTypeRouteTarget +} + +func NewResultExtendedCommunityTransitive2OctetAsTypeRouteTarget() ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget { + obj := resultExtendedCommunityTransitive2OctetAsTypeRouteTarget{obj: &otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) msg() *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget { + return obj.obj +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) setMsg(msg *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget) ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityTransitive2OctetAsTypeRouteTarget struct { + obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget +} + +type marshalResultExtendedCommunityTransitive2OctetAsTypeRouteTarget interface { + // ToProto marshals ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget to protobuf object *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + ToProto() (*otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget, error) + // ToPbText marshals ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityTransitive2OctetAsTypeRouteTarget struct { + obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget +} + +type unMarshalResultExtendedCommunityTransitive2OctetAsTypeRouteTarget interface { + // FromProto unmarshals ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget from protobuf object *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + FromProto(msg *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget) (ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget, error) + // FromPbText unmarshals ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) Marshal() marshalResultExtendedCommunityTransitive2OctetAsTypeRouteTarget { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityTransitive2OctetAsTypeRouteTarget{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) Unmarshal() unMarshalResultExtendedCommunityTransitive2OctetAsTypeRouteTarget { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityTransitive2OctetAsTypeRouteTarget{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityTransitive2OctetAsTypeRouteTarget) ToProto() (*otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive2OctetAsTypeRouteTarget) FromProto(msg *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget) (ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityTransitive2OctetAsTypeRouteTarget) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive2OctetAsTypeRouteTarget) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityTransitive2OctetAsTypeRouteTarget) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive2OctetAsTypeRouteTarget) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityTransitive2OctetAsTypeRouteTarget) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive2OctetAsTypeRouteTarget) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) Clone() (ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityTransitive2OctetAsTypeRouteTarget() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP Update message. It is sent with sub-type as 0x02. +type ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget interface { + Validation + // msg marshals ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget to protobuf object *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + // setMsg unmarshals ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget from protobuf object *otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget) ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + // provides marshal interface + Marshal() marshalResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + // validate validates ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Global2ByteAs returns uint32, set in ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget. + Global2ByteAs() uint32 + // SetGlobal2ByteAs assigns uint32 provided by user to ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + SetGlobal2ByteAs(value uint32) ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + // HasGlobal2ByteAs checks if Global2ByteAs has been set in ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + HasGlobal2ByteAs() bool + // Local4ByteAdmin returns uint32, set in ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget. + Local4ByteAdmin() uint32 + // SetLocal4ByteAdmin assigns uint32 provided by user to ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + SetLocal4ByteAdmin(value uint32) ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + // HasLocal4ByteAdmin checks if Local4ByteAdmin has been set in ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget + HasLocal4ByteAdmin() bool +} + +// The two octet IANA assigned AS value assigned to the Autonomous System. +// Global2ByteAs returns a uint32 +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) Global2ByteAs() uint32 { + + return *obj.obj.Global_2ByteAs + +} + +// The two octet IANA assigned AS value assigned to the Autonomous System. +// Global2ByteAs returns a uint32 +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) HasGlobal2ByteAs() bool { + return obj.obj.Global_2ByteAs != nil +} + +// The two octet IANA assigned AS value assigned to the Autonomous System. +// SetGlobal2ByteAs sets the uint32 value in the ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget object +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) SetGlobal2ByteAs(value uint32) ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget { + + obj.obj.Global_2ByteAs = &value + return obj +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local4ByteAdmin returns a uint32 +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) Local4ByteAdmin() uint32 { + + return *obj.obj.Local_4ByteAdmin + +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local4ByteAdmin returns a uint32 +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) HasLocal4ByteAdmin() bool { + return obj.obj.Local_4ByteAdmin != nil +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// SetLocal4ByteAdmin sets the uint32 value in the ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget object +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) SetLocal4ByteAdmin(value uint32) ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget { + + obj.obj.Local_4ByteAdmin = &value + return obj +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Global_2ByteAs != nil { + + if *obj.obj.Global_2ByteAs > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget.Global_2ByteAs <= 65535 but Got %d", *obj.obj.Global_2ByteAs)) + } + + } + +} + +func (obj *resultExtendedCommunityTransitive2OctetAsTypeRouteTarget) setDefault() { + +} diff --git a/gosnappi/result_extended_community_transitive4_octet_as_type.go b/gosnappi/result_extended_community_transitive4_octet_as_type.go new file mode 100644 index 00000000..213689d0 --- /dev/null +++ b/gosnappi/result_extended_community_transitive4_octet_as_type.go @@ -0,0 +1,446 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityTransitive4OctetAsType ***** +type resultExtendedCommunityTransitive4OctetAsType struct { + validation + obj *otg.ResultExtendedCommunityTransitive4OctetAsType + marshaller marshalResultExtendedCommunityTransitive4OctetAsType + unMarshaller unMarshalResultExtendedCommunityTransitive4OctetAsType + routeTargetSubtypeHolder ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + routeOriginSubtypeHolder ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin +} + +func NewResultExtendedCommunityTransitive4OctetAsType() ResultExtendedCommunityTransitive4OctetAsType { + obj := resultExtendedCommunityTransitive4OctetAsType{obj: &otg.ResultExtendedCommunityTransitive4OctetAsType{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityTransitive4OctetAsType) msg() *otg.ResultExtendedCommunityTransitive4OctetAsType { + return obj.obj +} + +func (obj *resultExtendedCommunityTransitive4OctetAsType) setMsg(msg *otg.ResultExtendedCommunityTransitive4OctetAsType) ResultExtendedCommunityTransitive4OctetAsType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityTransitive4OctetAsType struct { + obj *resultExtendedCommunityTransitive4OctetAsType +} + +type marshalResultExtendedCommunityTransitive4OctetAsType interface { + // ToProto marshals ResultExtendedCommunityTransitive4OctetAsType to protobuf object *otg.ResultExtendedCommunityTransitive4OctetAsType + ToProto() (*otg.ResultExtendedCommunityTransitive4OctetAsType, error) + // ToPbText marshals ResultExtendedCommunityTransitive4OctetAsType to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityTransitive4OctetAsType to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityTransitive4OctetAsType to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityTransitive4OctetAsType struct { + obj *resultExtendedCommunityTransitive4OctetAsType +} + +type unMarshalResultExtendedCommunityTransitive4OctetAsType interface { + // FromProto unmarshals ResultExtendedCommunityTransitive4OctetAsType from protobuf object *otg.ResultExtendedCommunityTransitive4OctetAsType + FromProto(msg *otg.ResultExtendedCommunityTransitive4OctetAsType) (ResultExtendedCommunityTransitive4OctetAsType, error) + // FromPbText unmarshals ResultExtendedCommunityTransitive4OctetAsType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityTransitive4OctetAsType from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityTransitive4OctetAsType from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityTransitive4OctetAsType) Marshal() marshalResultExtendedCommunityTransitive4OctetAsType { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityTransitive4OctetAsType{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityTransitive4OctetAsType) Unmarshal() unMarshalResultExtendedCommunityTransitive4OctetAsType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityTransitive4OctetAsType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityTransitive4OctetAsType) ToProto() (*otg.ResultExtendedCommunityTransitive4OctetAsType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive4OctetAsType) FromProto(msg *otg.ResultExtendedCommunityTransitive4OctetAsType) (ResultExtendedCommunityTransitive4OctetAsType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityTransitive4OctetAsType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive4OctetAsType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityTransitive4OctetAsType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive4OctetAsType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityTransitive4OctetAsType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive4OctetAsType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityTransitive4OctetAsType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitive4OctetAsType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitive4OctetAsType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityTransitive4OctetAsType) Clone() (ResultExtendedCommunityTransitive4OctetAsType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityTransitive4OctetAsType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *resultExtendedCommunityTransitive4OctetAsType) setNil() { + obj.routeTargetSubtypeHolder = nil + obj.routeOriginSubtypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ResultExtendedCommunityTransitive4OctetAsType is the Transitive Four-Octet AS-Specific Extended Community is sent as type 0x02. It is defined in RFC 5668. +type ResultExtendedCommunityTransitive4OctetAsType interface { + Validation + // msg marshals ResultExtendedCommunityTransitive4OctetAsType to protobuf object *otg.ResultExtendedCommunityTransitive4OctetAsType + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityTransitive4OctetAsType + // setMsg unmarshals ResultExtendedCommunityTransitive4OctetAsType from protobuf object *otg.ResultExtendedCommunityTransitive4OctetAsType + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityTransitive4OctetAsType) ResultExtendedCommunityTransitive4OctetAsType + // provides marshal interface + Marshal() marshalResultExtendedCommunityTransitive4OctetAsType + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityTransitive4OctetAsType + // validate validates ResultExtendedCommunityTransitive4OctetAsType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityTransitive4OctetAsType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ResultExtendedCommunityTransitive4OctetAsTypeChoiceEnum, set in ResultExtendedCommunityTransitive4OctetAsType + Choice() ResultExtendedCommunityTransitive4OctetAsTypeChoiceEnum + // setChoice assigns ResultExtendedCommunityTransitive4OctetAsTypeChoiceEnum provided by user to ResultExtendedCommunityTransitive4OctetAsType + setChoice(value ResultExtendedCommunityTransitive4OctetAsTypeChoiceEnum) ResultExtendedCommunityTransitive4OctetAsType + // HasChoice checks if Choice has been set in ResultExtendedCommunityTransitive4OctetAsType + HasChoice() bool + // RouteTargetSubtype returns ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget, set in ResultExtendedCommunityTransitive4OctetAsType. + // ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02 + RouteTargetSubtype() ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + // SetRouteTargetSubtype assigns ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget provided by user to ResultExtendedCommunityTransitive4OctetAsType. + // ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02 + SetRouteTargetSubtype(value ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget) ResultExtendedCommunityTransitive4OctetAsType + // HasRouteTargetSubtype checks if RouteTargetSubtype has been set in ResultExtendedCommunityTransitive4OctetAsType + HasRouteTargetSubtype() bool + // RouteOriginSubtype returns ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin, set in ResultExtendedCommunityTransitive4OctetAsType. + // ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03. + RouteOriginSubtype() ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // SetRouteOriginSubtype assigns ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin provided by user to ResultExtendedCommunityTransitive4OctetAsType. + // ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03. + SetRouteOriginSubtype(value ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ResultExtendedCommunityTransitive4OctetAsType + // HasRouteOriginSubtype checks if RouteOriginSubtype has been set in ResultExtendedCommunityTransitive4OctetAsType + HasRouteOriginSubtype() bool + setNil() +} + +type ResultExtendedCommunityTransitive4OctetAsTypeChoiceEnum string + +// Enum of Choice on ResultExtendedCommunityTransitive4OctetAsType +var ResultExtendedCommunityTransitive4OctetAsTypeChoice = struct { + ROUTE_TARGET_SUBTYPE ResultExtendedCommunityTransitive4OctetAsTypeChoiceEnum + ROUTE_ORIGIN_SUBTYPE ResultExtendedCommunityTransitive4OctetAsTypeChoiceEnum +}{ + ROUTE_TARGET_SUBTYPE: ResultExtendedCommunityTransitive4OctetAsTypeChoiceEnum("route_target_subtype"), + ROUTE_ORIGIN_SUBTYPE: ResultExtendedCommunityTransitive4OctetAsTypeChoiceEnum("route_origin_subtype"), +} + +func (obj *resultExtendedCommunityTransitive4OctetAsType) Choice() ResultExtendedCommunityTransitive4OctetAsTypeChoiceEnum { + return ResultExtendedCommunityTransitive4OctetAsTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *resultExtendedCommunityTransitive4OctetAsType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *resultExtendedCommunityTransitive4OctetAsType) setChoice(value ResultExtendedCommunityTransitive4OctetAsTypeChoiceEnum) ResultExtendedCommunityTransitive4OctetAsType { + intValue, ok := otg.ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ResultExtendedCommunityTransitive4OctetAsTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.RouteOriginSubtype = nil + obj.routeOriginSubtypeHolder = nil + obj.obj.RouteTargetSubtype = nil + obj.routeTargetSubtypeHolder = nil + + if value == ResultExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE { + obj.obj.RouteTargetSubtype = NewResultExtendedCommunityTransitive4OctetAsTypeRouteTarget().msg() + } + + if value == ResultExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE { + obj.obj.RouteOriginSubtype = NewResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin().msg() + } + + return obj +} + +// description is TBD +// RouteTargetSubtype returns a ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget +func (obj *resultExtendedCommunityTransitive4OctetAsType) RouteTargetSubtype() ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget { + if obj.obj.RouteTargetSubtype == nil { + obj.setChoice(ResultExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE) + } + if obj.routeTargetSubtypeHolder == nil { + obj.routeTargetSubtypeHolder = &resultExtendedCommunityTransitive4OctetAsTypeRouteTarget{obj: obj.obj.RouteTargetSubtype} + } + return obj.routeTargetSubtypeHolder +} + +// description is TBD +// RouteTargetSubtype returns a ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget +func (obj *resultExtendedCommunityTransitive4OctetAsType) HasRouteTargetSubtype() bool { + return obj.obj.RouteTargetSubtype != nil +} + +// description is TBD +// SetRouteTargetSubtype sets the ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget value in the ResultExtendedCommunityTransitive4OctetAsType object +func (obj *resultExtendedCommunityTransitive4OctetAsType) SetRouteTargetSubtype(value ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget) ResultExtendedCommunityTransitive4OctetAsType { + obj.setChoice(ResultExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE) + obj.routeTargetSubtypeHolder = nil + obj.obj.RouteTargetSubtype = value.msg() + + return obj +} + +// description is TBD +// RouteOriginSubtype returns a ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin +func (obj *resultExtendedCommunityTransitive4OctetAsType) RouteOriginSubtype() ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + if obj.obj.RouteOriginSubtype == nil { + obj.setChoice(ResultExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE) + } + if obj.routeOriginSubtypeHolder == nil { + obj.routeOriginSubtypeHolder = &resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin{obj: obj.obj.RouteOriginSubtype} + } + return obj.routeOriginSubtypeHolder +} + +// description is TBD +// RouteOriginSubtype returns a ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin +func (obj *resultExtendedCommunityTransitive4OctetAsType) HasRouteOriginSubtype() bool { + return obj.obj.RouteOriginSubtype != nil +} + +// description is TBD +// SetRouteOriginSubtype sets the ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin value in the ResultExtendedCommunityTransitive4OctetAsType object +func (obj *resultExtendedCommunityTransitive4OctetAsType) SetRouteOriginSubtype(value ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ResultExtendedCommunityTransitive4OctetAsType { + obj.setChoice(ResultExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE) + obj.routeOriginSubtypeHolder = nil + obj.obj.RouteOriginSubtype = value.msg() + + return obj +} + +func (obj *resultExtendedCommunityTransitive4OctetAsType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RouteTargetSubtype != nil { + + obj.RouteTargetSubtype().validateObj(vObj, set_default) + } + + if obj.obj.RouteOriginSubtype != nil { + + obj.RouteOriginSubtype().validateObj(vObj, set_default) + } + +} + +func (obj *resultExtendedCommunityTransitive4OctetAsType) setDefault() { + var choices_set int = 0 + var choice ResultExtendedCommunityTransitive4OctetAsTypeChoiceEnum + + if obj.obj.RouteTargetSubtype != nil { + choices_set += 1 + choice = ResultExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_TARGET_SUBTYPE + } + + if obj.obj.RouteOriginSubtype != nil { + choices_set += 1 + choice = ResultExtendedCommunityTransitive4OctetAsTypeChoice.ROUTE_ORIGIN_SUBTYPE + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ResultExtendedCommunityTransitive4OctetAsType") + } + } else { + intVal := otg.ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum_value[string(choice)] + enumValue := otg.ResultExtendedCommunityTransitive4OctetAsType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/result_extended_community_transitive4_octet_as_type_route_origin.go b/gosnappi/result_extended_community_transitive4_octet_as_type_route_origin.go new file mode 100644 index 00000000..6e139fec --- /dev/null +++ b/gosnappi/result_extended_community_transitive4_octet_as_type_route_origin.go @@ -0,0 +1,344 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin ***** +type resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin struct { + validation + obj *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + marshaller marshalResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + unMarshaller unMarshalResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin +} + +func NewResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin() ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + obj := resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin{obj: &otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) msg() *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + return obj.obj +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) setMsg(msg *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityTransitive4OctetAsTypeRouteOrigin struct { + obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin +} + +type marshalResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin interface { + // ToProto marshals ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin to protobuf object *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + ToProto() (*otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin, error) + // ToPbText marshals ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityTransitive4OctetAsTypeRouteOrigin struct { + obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin +} + +type unMarshalResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin interface { + // FromProto unmarshals ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin from protobuf object *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + FromProto(msg *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) (ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin, error) + // FromPbText unmarshals ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Marshal() marshalResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityTransitive4OctetAsTypeRouteOrigin{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Unmarshal() unMarshalResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityTransitive4OctetAsTypeRouteOrigin{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ToProto() (*otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) FromProto(msg *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) (ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Clone() (ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03. +type ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin interface { + Validation + // msg marshals ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin to protobuf object *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // setMsg unmarshals ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin from protobuf object *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // provides marshal interface + Marshal() marshalResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // validate validates ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Global4ByteAs returns uint32, set in ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin. + Global4ByteAs() uint32 + // SetGlobal4ByteAs assigns uint32 provided by user to ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + SetGlobal4ByteAs(value uint32) ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // HasGlobal4ByteAs checks if Global4ByteAs has been set in ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + HasGlobal4ByteAs() bool + // Local2ByteAdmin returns uint32, set in ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin. + Local2ByteAdmin() uint32 + // SetLocal2ByteAdmin assigns uint32 provided by user to ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + SetLocal2ByteAdmin(value uint32) ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + // HasLocal2ByteAdmin checks if Local2ByteAdmin has been set in ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin + HasLocal2ByteAdmin() bool +} + +// The four octet IANA assigned AS value assigned to the Autonomous System. +// Global4ByteAs returns a uint32 +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Global4ByteAs() uint32 { + + return *obj.obj.Global_4ByteAs + +} + +// The four octet IANA assigned AS value assigned to the Autonomous System. +// Global4ByteAs returns a uint32 +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) HasGlobal4ByteAs() bool { + return obj.obj.Global_4ByteAs != nil +} + +// The four octet IANA assigned AS value assigned to the Autonomous System. +// SetGlobal4ByteAs sets the uint32 value in the ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin object +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) SetGlobal4ByteAs(value uint32) ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + + obj.obj.Global_4ByteAs = &value + return obj +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) Local2ByteAdmin() uint32 { + + return *obj.obj.Local_2ByteAdmin + +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) HasLocal2ByteAdmin() bool { + return obj.obj.Local_2ByteAdmin != nil +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// SetLocal2ByteAdmin sets the uint32 value in the ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin object +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) SetLocal2ByteAdmin(value uint32) ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin { + + obj.obj.Local_2ByteAdmin = &value + return obj +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Local_2ByteAdmin != nil { + + if *obj.obj.Local_2ByteAdmin > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin.Local_2ByteAdmin <= 65535 but Got %d", *obj.obj.Local_2ByteAdmin)) + } + + } + +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteOrigin) setDefault() { + +} diff --git a/gosnappi/result_extended_community_transitive4_octet_as_type_route_target.go b/gosnappi/result_extended_community_transitive4_octet_as_type_route_target.go new file mode 100644 index 00000000..46c8519a --- /dev/null +++ b/gosnappi/result_extended_community_transitive4_octet_as_type_route_target.go @@ -0,0 +1,344 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget ***** +type resultExtendedCommunityTransitive4OctetAsTypeRouteTarget struct { + validation + obj *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + marshaller marshalResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + unMarshaller unMarshalResultExtendedCommunityTransitive4OctetAsTypeRouteTarget +} + +func NewResultExtendedCommunityTransitive4OctetAsTypeRouteTarget() ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget { + obj := resultExtendedCommunityTransitive4OctetAsTypeRouteTarget{obj: &otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) msg() *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget { + return obj.obj +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) setMsg(msg *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget) ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityTransitive4OctetAsTypeRouteTarget struct { + obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget +} + +type marshalResultExtendedCommunityTransitive4OctetAsTypeRouteTarget interface { + // ToProto marshals ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget to protobuf object *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + ToProto() (*otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget, error) + // ToPbText marshals ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityTransitive4OctetAsTypeRouteTarget struct { + obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget +} + +type unMarshalResultExtendedCommunityTransitive4OctetAsTypeRouteTarget interface { + // FromProto unmarshals ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget from protobuf object *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + FromProto(msg *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget) (ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget, error) + // FromPbText unmarshals ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) Marshal() marshalResultExtendedCommunityTransitive4OctetAsTypeRouteTarget { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityTransitive4OctetAsTypeRouteTarget{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) Unmarshal() unMarshalResultExtendedCommunityTransitive4OctetAsTypeRouteTarget { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityTransitive4OctetAsTypeRouteTarget{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityTransitive4OctetAsTypeRouteTarget) ToProto() (*otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive4OctetAsTypeRouteTarget) FromProto(msg *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget) (ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityTransitive4OctetAsTypeRouteTarget) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive4OctetAsTypeRouteTarget) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityTransitive4OctetAsTypeRouteTarget) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive4OctetAsTypeRouteTarget) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityTransitive4OctetAsTypeRouteTarget) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitive4OctetAsTypeRouteTarget) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) Clone() (ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityTransitive4OctetAsTypeRouteTarget() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02 +type ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget interface { + Validation + // msg marshals ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget to protobuf object *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + // setMsg unmarshals ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget from protobuf object *otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget) ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + // provides marshal interface + Marshal() marshalResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + // validate validates ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Global4ByteAs returns uint32, set in ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget. + Global4ByteAs() uint32 + // SetGlobal4ByteAs assigns uint32 provided by user to ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + SetGlobal4ByteAs(value uint32) ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + // HasGlobal4ByteAs checks if Global4ByteAs has been set in ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + HasGlobal4ByteAs() bool + // Local2ByteAdmin returns uint32, set in ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget. + Local2ByteAdmin() uint32 + // SetLocal2ByteAdmin assigns uint32 provided by user to ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + SetLocal2ByteAdmin(value uint32) ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + // HasLocal2ByteAdmin checks if Local2ByteAdmin has been set in ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget + HasLocal2ByteAdmin() bool +} + +// The four octet IANA assigned AS value assigned to the Autonomous System. +// Global4ByteAs returns a uint32 +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) Global4ByteAs() uint32 { + + return *obj.obj.Global_4ByteAs + +} + +// The four octet IANA assigned AS value assigned to the Autonomous System. +// Global4ByteAs returns a uint32 +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) HasGlobal4ByteAs() bool { + return obj.obj.Global_4ByteAs != nil +} + +// The four octet IANA assigned AS value assigned to the Autonomous System. +// SetGlobal4ByteAs sets the uint32 value in the ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget object +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) SetGlobal4ByteAs(value uint32) ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget { + + obj.obj.Global_4ByteAs = &value + return obj +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) Local2ByteAdmin() uint32 { + + return *obj.obj.Local_2ByteAdmin + +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) HasLocal2ByteAdmin() bool { + return obj.obj.Local_2ByteAdmin != nil +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// SetLocal2ByteAdmin sets the uint32 value in the ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget object +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) SetLocal2ByteAdmin(value uint32) ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget { + + obj.obj.Local_2ByteAdmin = &value + return obj +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Local_2ByteAdmin != nil { + + if *obj.obj.Local_2ByteAdmin > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget.Local_2ByteAdmin <= 65535 but Got %d", *obj.obj.Local_2ByteAdmin)) + } + + } + +} + +func (obj *resultExtendedCommunityTransitive4OctetAsTypeRouteTarget) setDefault() { + +} diff --git a/gosnappi/result_extended_community_transitive_ipv4_address_type.go b/gosnappi/result_extended_community_transitive_ipv4_address_type.go new file mode 100644 index 00000000..a912e3bf --- /dev/null +++ b/gosnappi/result_extended_community_transitive_ipv4_address_type.go @@ -0,0 +1,446 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityTransitiveIpv4AddressType ***** +type resultExtendedCommunityTransitiveIpv4AddressType struct { + validation + obj *otg.ResultExtendedCommunityTransitiveIpv4AddressType + marshaller marshalResultExtendedCommunityTransitiveIpv4AddressType + unMarshaller unMarshalResultExtendedCommunityTransitiveIpv4AddressType + routeTargetSubtypeHolder ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + routeOriginSubtypeHolder ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin +} + +func NewResultExtendedCommunityTransitiveIpv4AddressType() ResultExtendedCommunityTransitiveIpv4AddressType { + obj := resultExtendedCommunityTransitiveIpv4AddressType{obj: &otg.ResultExtendedCommunityTransitiveIpv4AddressType{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) msg() *otg.ResultExtendedCommunityTransitiveIpv4AddressType { + return obj.obj +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) setMsg(msg *otg.ResultExtendedCommunityTransitiveIpv4AddressType) ResultExtendedCommunityTransitiveIpv4AddressType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityTransitiveIpv4AddressType struct { + obj *resultExtendedCommunityTransitiveIpv4AddressType +} + +type marshalResultExtendedCommunityTransitiveIpv4AddressType interface { + // ToProto marshals ResultExtendedCommunityTransitiveIpv4AddressType to protobuf object *otg.ResultExtendedCommunityTransitiveIpv4AddressType + ToProto() (*otg.ResultExtendedCommunityTransitiveIpv4AddressType, error) + // ToPbText marshals ResultExtendedCommunityTransitiveIpv4AddressType to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityTransitiveIpv4AddressType to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityTransitiveIpv4AddressType to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityTransitiveIpv4AddressType struct { + obj *resultExtendedCommunityTransitiveIpv4AddressType +} + +type unMarshalResultExtendedCommunityTransitiveIpv4AddressType interface { + // FromProto unmarshals ResultExtendedCommunityTransitiveIpv4AddressType from protobuf object *otg.ResultExtendedCommunityTransitiveIpv4AddressType + FromProto(msg *otg.ResultExtendedCommunityTransitiveIpv4AddressType) (ResultExtendedCommunityTransitiveIpv4AddressType, error) + // FromPbText unmarshals ResultExtendedCommunityTransitiveIpv4AddressType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityTransitiveIpv4AddressType from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityTransitiveIpv4AddressType from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) Marshal() marshalResultExtendedCommunityTransitiveIpv4AddressType { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityTransitiveIpv4AddressType{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) Unmarshal() unMarshalResultExtendedCommunityTransitiveIpv4AddressType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityTransitiveIpv4AddressType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityTransitiveIpv4AddressType) ToProto() (*otg.ResultExtendedCommunityTransitiveIpv4AddressType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveIpv4AddressType) FromProto(msg *otg.ResultExtendedCommunityTransitiveIpv4AddressType) (ResultExtendedCommunityTransitiveIpv4AddressType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityTransitiveIpv4AddressType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveIpv4AddressType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityTransitiveIpv4AddressType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveIpv4AddressType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityTransitiveIpv4AddressType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveIpv4AddressType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) Clone() (ResultExtendedCommunityTransitiveIpv4AddressType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityTransitiveIpv4AddressType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) setNil() { + obj.routeTargetSubtypeHolder = nil + obj.routeOriginSubtypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ResultExtendedCommunityTransitiveIpv4AddressType is the Transitive IPv4 Address Specific Extended Community is sent as type 0x01. +type ResultExtendedCommunityTransitiveIpv4AddressType interface { + Validation + // msg marshals ResultExtendedCommunityTransitiveIpv4AddressType to protobuf object *otg.ResultExtendedCommunityTransitiveIpv4AddressType + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityTransitiveIpv4AddressType + // setMsg unmarshals ResultExtendedCommunityTransitiveIpv4AddressType from protobuf object *otg.ResultExtendedCommunityTransitiveIpv4AddressType + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityTransitiveIpv4AddressType) ResultExtendedCommunityTransitiveIpv4AddressType + // provides marshal interface + Marshal() marshalResultExtendedCommunityTransitiveIpv4AddressType + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityTransitiveIpv4AddressType + // validate validates ResultExtendedCommunityTransitiveIpv4AddressType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityTransitiveIpv4AddressType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ResultExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum, set in ResultExtendedCommunityTransitiveIpv4AddressType + Choice() ResultExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum + // setChoice assigns ResultExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum provided by user to ResultExtendedCommunityTransitiveIpv4AddressType + setChoice(value ResultExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum) ResultExtendedCommunityTransitiveIpv4AddressType + // HasChoice checks if Choice has been set in ResultExtendedCommunityTransitiveIpv4AddressType + HasChoice() bool + // RouteTargetSubtype returns ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget, set in ResultExtendedCommunityTransitiveIpv4AddressType. + // ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02. + RouteTargetSubtype() ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // SetRouteTargetSubtype assigns ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget provided by user to ResultExtendedCommunityTransitiveIpv4AddressType. + // ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02. + SetRouteTargetSubtype(value ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ResultExtendedCommunityTransitiveIpv4AddressType + // HasRouteTargetSubtype checks if RouteTargetSubtype has been set in ResultExtendedCommunityTransitiveIpv4AddressType + HasRouteTargetSubtype() bool + // RouteOriginSubtype returns ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin, set in ResultExtendedCommunityTransitiveIpv4AddressType. + // ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP It is sent with sub-type as 0x03. + RouteOriginSubtype() ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // SetRouteOriginSubtype assigns ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin provided by user to ResultExtendedCommunityTransitiveIpv4AddressType. + // ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP It is sent with sub-type as 0x03. + SetRouteOriginSubtype(value ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ResultExtendedCommunityTransitiveIpv4AddressType + // HasRouteOriginSubtype checks if RouteOriginSubtype has been set in ResultExtendedCommunityTransitiveIpv4AddressType + HasRouteOriginSubtype() bool + setNil() +} + +type ResultExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum string + +// Enum of Choice on ResultExtendedCommunityTransitiveIpv4AddressType +var ResultExtendedCommunityTransitiveIpv4AddressTypeChoice = struct { + ROUTE_TARGET_SUBTYPE ResultExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum + ROUTE_ORIGIN_SUBTYPE ResultExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum +}{ + ROUTE_TARGET_SUBTYPE: ResultExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum("route_target_subtype"), + ROUTE_ORIGIN_SUBTYPE: ResultExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum("route_origin_subtype"), +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) Choice() ResultExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum { + return ResultExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) setChoice(value ResultExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum) ResultExtendedCommunityTransitiveIpv4AddressType { + intValue, ok := otg.ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ResultExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.RouteOriginSubtype = nil + obj.routeOriginSubtypeHolder = nil + obj.obj.RouteTargetSubtype = nil + obj.routeTargetSubtypeHolder = nil + + if value == ResultExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_TARGET_SUBTYPE { + obj.obj.RouteTargetSubtype = NewResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget().msg() + } + + if value == ResultExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_ORIGIN_SUBTYPE { + obj.obj.RouteOriginSubtype = NewResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin().msg() + } + + return obj +} + +// description is TBD +// RouteTargetSubtype returns a ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) RouteTargetSubtype() ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + if obj.obj.RouteTargetSubtype == nil { + obj.setChoice(ResultExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_TARGET_SUBTYPE) + } + if obj.routeTargetSubtypeHolder == nil { + obj.routeTargetSubtypeHolder = &resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget{obj: obj.obj.RouteTargetSubtype} + } + return obj.routeTargetSubtypeHolder +} + +// description is TBD +// RouteTargetSubtype returns a ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) HasRouteTargetSubtype() bool { + return obj.obj.RouteTargetSubtype != nil +} + +// description is TBD +// SetRouteTargetSubtype sets the ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget value in the ResultExtendedCommunityTransitiveIpv4AddressType object +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) SetRouteTargetSubtype(value ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ResultExtendedCommunityTransitiveIpv4AddressType { + obj.setChoice(ResultExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_TARGET_SUBTYPE) + obj.routeTargetSubtypeHolder = nil + obj.obj.RouteTargetSubtype = value.msg() + + return obj +} + +// description is TBD +// RouteOriginSubtype returns a ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) RouteOriginSubtype() ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + if obj.obj.RouteOriginSubtype == nil { + obj.setChoice(ResultExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_ORIGIN_SUBTYPE) + } + if obj.routeOriginSubtypeHolder == nil { + obj.routeOriginSubtypeHolder = &resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin{obj: obj.obj.RouteOriginSubtype} + } + return obj.routeOriginSubtypeHolder +} + +// description is TBD +// RouteOriginSubtype returns a ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) HasRouteOriginSubtype() bool { + return obj.obj.RouteOriginSubtype != nil +} + +// description is TBD +// SetRouteOriginSubtype sets the ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin value in the ResultExtendedCommunityTransitiveIpv4AddressType object +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) SetRouteOriginSubtype(value ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ResultExtendedCommunityTransitiveIpv4AddressType { + obj.setChoice(ResultExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_ORIGIN_SUBTYPE) + obj.routeOriginSubtypeHolder = nil + obj.obj.RouteOriginSubtype = value.msg() + + return obj +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RouteTargetSubtype != nil { + + obj.RouteTargetSubtype().validateObj(vObj, set_default) + } + + if obj.obj.RouteOriginSubtype != nil { + + obj.RouteOriginSubtype().validateObj(vObj, set_default) + } + +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressType) setDefault() { + var choices_set int = 0 + var choice ResultExtendedCommunityTransitiveIpv4AddressTypeChoiceEnum + + if obj.obj.RouteTargetSubtype != nil { + choices_set += 1 + choice = ResultExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_TARGET_SUBTYPE + } + + if obj.obj.RouteOriginSubtype != nil { + choices_set += 1 + choice = ResultExtendedCommunityTransitiveIpv4AddressTypeChoice.ROUTE_ORIGIN_SUBTYPE + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ResultExtendedCommunityTransitiveIpv4AddressType") + } + } else { + intVal := otg.ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum_value[string(choice)] + enumValue := otg.ResultExtendedCommunityTransitiveIpv4AddressType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/result_extended_community_transitive_ipv4_address_type_route_origin.go b/gosnappi/result_extended_community_transitive_ipv4_address_type_route_origin.go new file mode 100644 index 00000000..019ea03c --- /dev/null +++ b/gosnappi/result_extended_community_transitive_ipv4_address_type_route_origin.go @@ -0,0 +1,353 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin ***** +type resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin struct { + validation + obj *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + marshaller marshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + unMarshaller unMarshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin +} + +func NewResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin() ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + obj := resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin{obj: &otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) msg() *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + return obj.obj +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) setMsg(msg *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin struct { + obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin +} + +type marshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin interface { + // ToProto marshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin to protobuf object *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + ToProto() (*otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin, error) + // ToPbText marshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin struct { + obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin +} + +type unMarshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin interface { + // FromProto unmarshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin from protobuf object *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + FromProto(msg *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) (ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin, error) + // FromPbText unmarshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Marshal() marshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Unmarshal() unMarshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ToProto() (*otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) FromProto(msg *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) (ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Clone() (ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin is the Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP It is sent with sub-type as 0x03. +type ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin interface { + Validation + // msg marshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin to protobuf object *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // setMsg unmarshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin from protobuf object *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // provides marshal interface + Marshal() marshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // validate validates ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // GlobalIpv4Admin returns string, set in ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin. + GlobalIpv4Admin() string + // SetGlobalIpv4Admin assigns string provided by user to ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + SetGlobalIpv4Admin(value string) ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // HasGlobalIpv4Admin checks if GlobalIpv4Admin has been set in ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + HasGlobalIpv4Admin() bool + // Local2ByteAdmin returns uint32, set in ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin. + Local2ByteAdmin() uint32 + // SetLocal2ByteAdmin assigns uint32 provided by user to ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + SetLocal2ByteAdmin(value uint32) ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + // HasLocal2ByteAdmin checks if Local2ByteAdmin has been set in ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin + HasLocal2ByteAdmin() bool +} + +// An IPv4 unicast address assigned by one of the Internet registries. +// GlobalIpv4Admin returns a string +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) GlobalIpv4Admin() string { + + return *obj.obj.GlobalIpv4Admin + +} + +// An IPv4 unicast address assigned by one of the Internet registries. +// GlobalIpv4Admin returns a string +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) HasGlobalIpv4Admin() bool { + return obj.obj.GlobalIpv4Admin != nil +} + +// An IPv4 unicast address assigned by one of the Internet registries. +// SetGlobalIpv4Admin sets the string value in the ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin object +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) SetGlobalIpv4Admin(value string) ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + + obj.obj.GlobalIpv4Admin = &value + return obj +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) Local2ByteAdmin() uint32 { + + return *obj.obj.Local_2ByteAdmin + +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) HasLocal2ByteAdmin() bool { + return obj.obj.Local_2ByteAdmin != nil +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// SetLocal2ByteAdmin sets the uint32 value in the ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin object +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) SetLocal2ByteAdmin(value uint32) ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin { + + obj.obj.Local_2ByteAdmin = &value + return obj +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.GlobalIpv4Admin != nil { + + err := obj.validateIpv4(obj.GlobalIpv4Admin()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin.GlobalIpv4Admin")) + } + + } + + if obj.obj.Local_2ByteAdmin != nil { + + if *obj.obj.Local_2ByteAdmin > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin.Local_2ByteAdmin <= 65535 but Got %d", *obj.obj.Local_2ByteAdmin)) + } + + } + +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin) setDefault() { + +} diff --git a/gosnappi/result_extended_community_transitive_ipv4_address_type_route_target.go b/gosnappi/result_extended_community_transitive_ipv4_address_type_route_target.go new file mode 100644 index 00000000..b1f68076 --- /dev/null +++ b/gosnappi/result_extended_community_transitive_ipv4_address_type_route_target.go @@ -0,0 +1,353 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget ***** +type resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget struct { + validation + obj *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + marshaller marshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + unMarshaller unMarshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget +} + +func NewResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget() ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + obj := resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget{obj: &otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) msg() *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + return obj.obj +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) setMsg(msg *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget struct { + obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget +} + +type marshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget interface { + // ToProto marshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget to protobuf object *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + ToProto() (*otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget, error) + // ToPbText marshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget struct { + obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget +} + +type unMarshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget interface { + // FromProto unmarshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget from protobuf object *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + FromProto(msg *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) (ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget, error) + // FromPbText unmarshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Marshal() marshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Unmarshal() unMarshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ToProto() (*otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) FromProto(msg *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) (ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Clone() (ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget is the Route Target Community identifies one or more routers that may receive a set of routes (that carry this Community) carried by BGP. It is sent with sub-type as 0x02. +type ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget interface { + Validation + // msg marshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget to protobuf object *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // setMsg unmarshals ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget from protobuf object *otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // provides marshal interface + Marshal() marshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // validate validates ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // GlobalIpv4Admin returns string, set in ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget. + GlobalIpv4Admin() string + // SetGlobalIpv4Admin assigns string provided by user to ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + SetGlobalIpv4Admin(value string) ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // HasGlobalIpv4Admin checks if GlobalIpv4Admin has been set in ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + HasGlobalIpv4Admin() bool + // Local2ByteAdmin returns uint32, set in ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget. + Local2ByteAdmin() uint32 + // SetLocal2ByteAdmin assigns uint32 provided by user to ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + SetLocal2ByteAdmin(value uint32) ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + // HasLocal2ByteAdmin checks if Local2ByteAdmin has been set in ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget + HasLocal2ByteAdmin() bool +} + +// An IPv4 unicast address assigned by one of the Internet registries. +// GlobalIpv4Admin returns a string +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) GlobalIpv4Admin() string { + + return *obj.obj.GlobalIpv4Admin + +} + +// An IPv4 unicast address assigned by one of the Internet registries. +// GlobalIpv4Admin returns a string +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) HasGlobalIpv4Admin() bool { + return obj.obj.GlobalIpv4Admin != nil +} + +// An IPv4 unicast address assigned by one of the Internet registries. +// SetGlobalIpv4Admin sets the string value in the ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget object +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) SetGlobalIpv4Admin(value string) ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + + obj.obj.GlobalIpv4Admin = &value + return obj +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) Local2ByteAdmin() uint32 { + + return *obj.obj.Local_2ByteAdmin + +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// Local2ByteAdmin returns a uint32 +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) HasLocal2ByteAdmin() bool { + return obj.obj.Local_2ByteAdmin != nil +} + +// The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. +// SetLocal2ByteAdmin sets the uint32 value in the ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget object +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) SetLocal2ByteAdmin(value uint32) ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget { + + obj.obj.Local_2ByteAdmin = &value + return obj +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.GlobalIpv4Admin != nil { + + err := obj.validateIpv4(obj.GlobalIpv4Admin()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget.GlobalIpv4Admin")) + } + + } + + if obj.obj.Local_2ByteAdmin != nil { + + if *obj.obj.Local_2ByteAdmin > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget.Local_2ByteAdmin <= 65535 but Got %d", *obj.obj.Local_2ByteAdmin)) + } + + } + +} + +func (obj *resultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget) setDefault() { + +} diff --git a/gosnappi/result_extended_community_transitive_opaque_type.go b/gosnappi/result_extended_community_transitive_opaque_type.go new file mode 100644 index 00000000..168325d2 --- /dev/null +++ b/gosnappi/result_extended_community_transitive_opaque_type.go @@ -0,0 +1,446 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityTransitiveOpaqueType ***** +type resultExtendedCommunityTransitiveOpaqueType struct { + validation + obj *otg.ResultExtendedCommunityTransitiveOpaqueType + marshaller marshalResultExtendedCommunityTransitiveOpaqueType + unMarshaller unMarshalResultExtendedCommunityTransitiveOpaqueType + colorSubtypeHolder ResultExtendedCommunityTransitiveOpaqueTypeColor + encapsulationSubtypeHolder ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation +} + +func NewResultExtendedCommunityTransitiveOpaqueType() ResultExtendedCommunityTransitiveOpaqueType { + obj := resultExtendedCommunityTransitiveOpaqueType{obj: &otg.ResultExtendedCommunityTransitiveOpaqueType{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityTransitiveOpaqueType) msg() *otg.ResultExtendedCommunityTransitiveOpaqueType { + return obj.obj +} + +func (obj *resultExtendedCommunityTransitiveOpaqueType) setMsg(msg *otg.ResultExtendedCommunityTransitiveOpaqueType) ResultExtendedCommunityTransitiveOpaqueType { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityTransitiveOpaqueType struct { + obj *resultExtendedCommunityTransitiveOpaqueType +} + +type marshalResultExtendedCommunityTransitiveOpaqueType interface { + // ToProto marshals ResultExtendedCommunityTransitiveOpaqueType to protobuf object *otg.ResultExtendedCommunityTransitiveOpaqueType + ToProto() (*otg.ResultExtendedCommunityTransitiveOpaqueType, error) + // ToPbText marshals ResultExtendedCommunityTransitiveOpaqueType to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityTransitiveOpaqueType to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityTransitiveOpaqueType to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityTransitiveOpaqueType struct { + obj *resultExtendedCommunityTransitiveOpaqueType +} + +type unMarshalResultExtendedCommunityTransitiveOpaqueType interface { + // FromProto unmarshals ResultExtendedCommunityTransitiveOpaqueType from protobuf object *otg.ResultExtendedCommunityTransitiveOpaqueType + FromProto(msg *otg.ResultExtendedCommunityTransitiveOpaqueType) (ResultExtendedCommunityTransitiveOpaqueType, error) + // FromPbText unmarshals ResultExtendedCommunityTransitiveOpaqueType from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityTransitiveOpaqueType from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityTransitiveOpaqueType from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityTransitiveOpaqueType) Marshal() marshalResultExtendedCommunityTransitiveOpaqueType { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityTransitiveOpaqueType{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityTransitiveOpaqueType) Unmarshal() unMarshalResultExtendedCommunityTransitiveOpaqueType { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityTransitiveOpaqueType{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityTransitiveOpaqueType) ToProto() (*otg.ResultExtendedCommunityTransitiveOpaqueType, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveOpaqueType) FromProto(msg *otg.ResultExtendedCommunityTransitiveOpaqueType) (ResultExtendedCommunityTransitiveOpaqueType, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityTransitiveOpaqueType) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveOpaqueType) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityTransitiveOpaqueType) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveOpaqueType) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityTransitiveOpaqueType) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveOpaqueType) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityTransitiveOpaqueType) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitiveOpaqueType) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitiveOpaqueType) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityTransitiveOpaqueType) Clone() (ResultExtendedCommunityTransitiveOpaqueType, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityTransitiveOpaqueType() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *resultExtendedCommunityTransitiveOpaqueType) setNil() { + obj.colorSubtypeHolder = nil + obj.encapsulationSubtypeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// ResultExtendedCommunityTransitiveOpaqueType is the Transitive Opaque Extended Community is sent as type 0x03. +type ResultExtendedCommunityTransitiveOpaqueType interface { + Validation + // msg marshals ResultExtendedCommunityTransitiveOpaqueType to protobuf object *otg.ResultExtendedCommunityTransitiveOpaqueType + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityTransitiveOpaqueType + // setMsg unmarshals ResultExtendedCommunityTransitiveOpaqueType from protobuf object *otg.ResultExtendedCommunityTransitiveOpaqueType + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityTransitiveOpaqueType) ResultExtendedCommunityTransitiveOpaqueType + // provides marshal interface + Marshal() marshalResultExtendedCommunityTransitiveOpaqueType + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityTransitiveOpaqueType + // validate validates ResultExtendedCommunityTransitiveOpaqueType + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityTransitiveOpaqueType, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns ResultExtendedCommunityTransitiveOpaqueTypeChoiceEnum, set in ResultExtendedCommunityTransitiveOpaqueType + Choice() ResultExtendedCommunityTransitiveOpaqueTypeChoiceEnum + // setChoice assigns ResultExtendedCommunityTransitiveOpaqueTypeChoiceEnum provided by user to ResultExtendedCommunityTransitiveOpaqueType + setChoice(value ResultExtendedCommunityTransitiveOpaqueTypeChoiceEnum) ResultExtendedCommunityTransitiveOpaqueType + // HasChoice checks if Choice has been set in ResultExtendedCommunityTransitiveOpaqueType + HasChoice() bool + // ColorSubtype returns ResultExtendedCommunityTransitiveOpaqueTypeColor, set in ResultExtendedCommunityTransitiveOpaqueType. + // ResultExtendedCommunityTransitiveOpaqueTypeColor is the Color Community contains locally administrator defined 'color' value which is used in conjunction with Encapsulation attribute to decide whether a data packet can be transmitted on a certain tunnel or not. It is defined in RFC9012 and sent with sub-type as 0x0b. + ColorSubtype() ResultExtendedCommunityTransitiveOpaqueTypeColor + // SetColorSubtype assigns ResultExtendedCommunityTransitiveOpaqueTypeColor provided by user to ResultExtendedCommunityTransitiveOpaqueType. + // ResultExtendedCommunityTransitiveOpaqueTypeColor is the Color Community contains locally administrator defined 'color' value which is used in conjunction with Encapsulation attribute to decide whether a data packet can be transmitted on a certain tunnel or not. It is defined in RFC9012 and sent with sub-type as 0x0b. + SetColorSubtype(value ResultExtendedCommunityTransitiveOpaqueTypeColor) ResultExtendedCommunityTransitiveOpaqueType + // HasColorSubtype checks if ColorSubtype has been set in ResultExtendedCommunityTransitiveOpaqueType + HasColorSubtype() bool + // EncapsulationSubtype returns ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation, set in ResultExtendedCommunityTransitiveOpaqueType. + // ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation is this identifies the type of tunneling technology being signalled. It is defined in RFC9012 and sent with sub-type as 0x0c. + EncapsulationSubtype() ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + // SetEncapsulationSubtype assigns ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation provided by user to ResultExtendedCommunityTransitiveOpaqueType. + // ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation is this identifies the type of tunneling technology being signalled. It is defined in RFC9012 and sent with sub-type as 0x0c. + SetEncapsulationSubtype(value ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation) ResultExtendedCommunityTransitiveOpaqueType + // HasEncapsulationSubtype checks if EncapsulationSubtype has been set in ResultExtendedCommunityTransitiveOpaqueType + HasEncapsulationSubtype() bool + setNil() +} + +type ResultExtendedCommunityTransitiveOpaqueTypeChoiceEnum string + +// Enum of Choice on ResultExtendedCommunityTransitiveOpaqueType +var ResultExtendedCommunityTransitiveOpaqueTypeChoice = struct { + COLOR_SUBTYPE ResultExtendedCommunityTransitiveOpaqueTypeChoiceEnum + ENCAPSULATION_SUBTYPE ResultExtendedCommunityTransitiveOpaqueTypeChoiceEnum +}{ + COLOR_SUBTYPE: ResultExtendedCommunityTransitiveOpaqueTypeChoiceEnum("color_subtype"), + ENCAPSULATION_SUBTYPE: ResultExtendedCommunityTransitiveOpaqueTypeChoiceEnum("encapsulation_subtype"), +} + +func (obj *resultExtendedCommunityTransitiveOpaqueType) Choice() ResultExtendedCommunityTransitiveOpaqueTypeChoiceEnum { + return ResultExtendedCommunityTransitiveOpaqueTypeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *resultExtendedCommunityTransitiveOpaqueType) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *resultExtendedCommunityTransitiveOpaqueType) setChoice(value ResultExtendedCommunityTransitiveOpaqueTypeChoiceEnum) ResultExtendedCommunityTransitiveOpaqueType { + intValue, ok := otg.ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on ResultExtendedCommunityTransitiveOpaqueTypeChoiceEnum", string(value))) + return obj + } + enumValue := otg.ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.EncapsulationSubtype = nil + obj.encapsulationSubtypeHolder = nil + obj.obj.ColorSubtype = nil + obj.colorSubtypeHolder = nil + + if value == ResultExtendedCommunityTransitiveOpaqueTypeChoice.COLOR_SUBTYPE { + obj.obj.ColorSubtype = NewResultExtendedCommunityTransitiveOpaqueTypeColor().msg() + } + + if value == ResultExtendedCommunityTransitiveOpaqueTypeChoice.ENCAPSULATION_SUBTYPE { + obj.obj.EncapsulationSubtype = NewResultExtendedCommunityTransitiveOpaqueTypeEncapsulation().msg() + } + + return obj +} + +// description is TBD +// ColorSubtype returns a ResultExtendedCommunityTransitiveOpaqueTypeColor +func (obj *resultExtendedCommunityTransitiveOpaqueType) ColorSubtype() ResultExtendedCommunityTransitiveOpaqueTypeColor { + if obj.obj.ColorSubtype == nil { + obj.setChoice(ResultExtendedCommunityTransitiveOpaqueTypeChoice.COLOR_SUBTYPE) + } + if obj.colorSubtypeHolder == nil { + obj.colorSubtypeHolder = &resultExtendedCommunityTransitiveOpaqueTypeColor{obj: obj.obj.ColorSubtype} + } + return obj.colorSubtypeHolder +} + +// description is TBD +// ColorSubtype returns a ResultExtendedCommunityTransitiveOpaqueTypeColor +func (obj *resultExtendedCommunityTransitiveOpaqueType) HasColorSubtype() bool { + return obj.obj.ColorSubtype != nil +} + +// description is TBD +// SetColorSubtype sets the ResultExtendedCommunityTransitiveOpaqueTypeColor value in the ResultExtendedCommunityTransitiveOpaqueType object +func (obj *resultExtendedCommunityTransitiveOpaqueType) SetColorSubtype(value ResultExtendedCommunityTransitiveOpaqueTypeColor) ResultExtendedCommunityTransitiveOpaqueType { + obj.setChoice(ResultExtendedCommunityTransitiveOpaqueTypeChoice.COLOR_SUBTYPE) + obj.colorSubtypeHolder = nil + obj.obj.ColorSubtype = value.msg() + + return obj +} + +// description is TBD +// EncapsulationSubtype returns a ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation +func (obj *resultExtendedCommunityTransitiveOpaqueType) EncapsulationSubtype() ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation { + if obj.obj.EncapsulationSubtype == nil { + obj.setChoice(ResultExtendedCommunityTransitiveOpaqueTypeChoice.ENCAPSULATION_SUBTYPE) + } + if obj.encapsulationSubtypeHolder == nil { + obj.encapsulationSubtypeHolder = &resultExtendedCommunityTransitiveOpaqueTypeEncapsulation{obj: obj.obj.EncapsulationSubtype} + } + return obj.encapsulationSubtypeHolder +} + +// description is TBD +// EncapsulationSubtype returns a ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation +func (obj *resultExtendedCommunityTransitiveOpaqueType) HasEncapsulationSubtype() bool { + return obj.obj.EncapsulationSubtype != nil +} + +// description is TBD +// SetEncapsulationSubtype sets the ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation value in the ResultExtendedCommunityTransitiveOpaqueType object +func (obj *resultExtendedCommunityTransitiveOpaqueType) SetEncapsulationSubtype(value ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation) ResultExtendedCommunityTransitiveOpaqueType { + obj.setChoice(ResultExtendedCommunityTransitiveOpaqueTypeChoice.ENCAPSULATION_SUBTYPE) + obj.encapsulationSubtypeHolder = nil + obj.obj.EncapsulationSubtype = value.msg() + + return obj +} + +func (obj *resultExtendedCommunityTransitiveOpaqueType) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.ColorSubtype != nil { + + obj.ColorSubtype().validateObj(vObj, set_default) + } + + if obj.obj.EncapsulationSubtype != nil { + + obj.EncapsulationSubtype().validateObj(vObj, set_default) + } + +} + +func (obj *resultExtendedCommunityTransitiveOpaqueType) setDefault() { + var choices_set int = 0 + var choice ResultExtendedCommunityTransitiveOpaqueTypeChoiceEnum + + if obj.obj.ColorSubtype != nil { + choices_set += 1 + choice = ResultExtendedCommunityTransitiveOpaqueTypeChoice.COLOR_SUBTYPE + } + + if obj.obj.EncapsulationSubtype != nil { + choices_set += 1 + choice = ResultExtendedCommunityTransitiveOpaqueTypeChoice.ENCAPSULATION_SUBTYPE + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in ResultExtendedCommunityTransitiveOpaqueType") + } + } else { + intVal := otg.ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum_value[string(choice)] + enumValue := otg.ResultExtendedCommunityTransitiveOpaqueType_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/result_extended_community_transitive_opaque_type_color.go b/gosnappi/result_extended_community_transitive_opaque_type_color.go new file mode 100644 index 00000000..0390936a --- /dev/null +++ b/gosnappi/result_extended_community_transitive_opaque_type_color.go @@ -0,0 +1,347 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityTransitiveOpaqueTypeColor ***** +type resultExtendedCommunityTransitiveOpaqueTypeColor struct { + validation + obj *otg.ResultExtendedCommunityTransitiveOpaqueTypeColor + marshaller marshalResultExtendedCommunityTransitiveOpaqueTypeColor + unMarshaller unMarshalResultExtendedCommunityTransitiveOpaqueTypeColor +} + +func NewResultExtendedCommunityTransitiveOpaqueTypeColor() ResultExtendedCommunityTransitiveOpaqueTypeColor { + obj := resultExtendedCommunityTransitiveOpaqueTypeColor{obj: &otg.ResultExtendedCommunityTransitiveOpaqueTypeColor{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) msg() *otg.ResultExtendedCommunityTransitiveOpaqueTypeColor { + return obj.obj +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) setMsg(msg *otg.ResultExtendedCommunityTransitiveOpaqueTypeColor) ResultExtendedCommunityTransitiveOpaqueTypeColor { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityTransitiveOpaqueTypeColor struct { + obj *resultExtendedCommunityTransitiveOpaqueTypeColor +} + +type marshalResultExtendedCommunityTransitiveOpaqueTypeColor interface { + // ToProto marshals ResultExtendedCommunityTransitiveOpaqueTypeColor to protobuf object *otg.ResultExtendedCommunityTransitiveOpaqueTypeColor + ToProto() (*otg.ResultExtendedCommunityTransitiveOpaqueTypeColor, error) + // ToPbText marshals ResultExtendedCommunityTransitiveOpaqueTypeColor to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityTransitiveOpaqueTypeColor to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityTransitiveOpaqueTypeColor to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityTransitiveOpaqueTypeColor struct { + obj *resultExtendedCommunityTransitiveOpaqueTypeColor +} + +type unMarshalResultExtendedCommunityTransitiveOpaqueTypeColor interface { + // FromProto unmarshals ResultExtendedCommunityTransitiveOpaqueTypeColor from protobuf object *otg.ResultExtendedCommunityTransitiveOpaqueTypeColor + FromProto(msg *otg.ResultExtendedCommunityTransitiveOpaqueTypeColor) (ResultExtendedCommunityTransitiveOpaqueTypeColor, error) + // FromPbText unmarshals ResultExtendedCommunityTransitiveOpaqueTypeColor from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityTransitiveOpaqueTypeColor from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityTransitiveOpaqueTypeColor from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) Marshal() marshalResultExtendedCommunityTransitiveOpaqueTypeColor { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityTransitiveOpaqueTypeColor{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) Unmarshal() unMarshalResultExtendedCommunityTransitiveOpaqueTypeColor { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityTransitiveOpaqueTypeColor{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityTransitiveOpaqueTypeColor) ToProto() (*otg.ResultExtendedCommunityTransitiveOpaqueTypeColor, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveOpaqueTypeColor) FromProto(msg *otg.ResultExtendedCommunityTransitiveOpaqueTypeColor) (ResultExtendedCommunityTransitiveOpaqueTypeColor, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityTransitiveOpaqueTypeColor) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveOpaqueTypeColor) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityTransitiveOpaqueTypeColor) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveOpaqueTypeColor) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityTransitiveOpaqueTypeColor) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveOpaqueTypeColor) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) Clone() (ResultExtendedCommunityTransitiveOpaqueTypeColor, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityTransitiveOpaqueTypeColor() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ResultExtendedCommunityTransitiveOpaqueTypeColor is the Color Community contains locally administrator defined 'color' value which is used in conjunction with Encapsulation attribute to decide whether a data packet can be transmitted on a certain tunnel or not. It is defined in RFC9012 and sent with sub-type as 0x0b. +type ResultExtendedCommunityTransitiveOpaqueTypeColor interface { + Validation + // msg marshals ResultExtendedCommunityTransitiveOpaqueTypeColor to protobuf object *otg.ResultExtendedCommunityTransitiveOpaqueTypeColor + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityTransitiveOpaqueTypeColor + // setMsg unmarshals ResultExtendedCommunityTransitiveOpaqueTypeColor from protobuf object *otg.ResultExtendedCommunityTransitiveOpaqueTypeColor + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityTransitiveOpaqueTypeColor) ResultExtendedCommunityTransitiveOpaqueTypeColor + // provides marshal interface + Marshal() marshalResultExtendedCommunityTransitiveOpaqueTypeColor + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityTransitiveOpaqueTypeColor + // validate validates ResultExtendedCommunityTransitiveOpaqueTypeColor + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityTransitiveOpaqueTypeColor, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Flags returns uint32, set in ResultExtendedCommunityTransitiveOpaqueTypeColor. + Flags() uint32 + // SetFlags assigns uint32 provided by user to ResultExtendedCommunityTransitiveOpaqueTypeColor + SetFlags(value uint32) ResultExtendedCommunityTransitiveOpaqueTypeColor + // HasFlags checks if Flags has been set in ResultExtendedCommunityTransitiveOpaqueTypeColor + HasFlags() bool + // Color returns uint32, set in ResultExtendedCommunityTransitiveOpaqueTypeColor. + Color() uint32 + // SetColor assigns uint32 provided by user to ResultExtendedCommunityTransitiveOpaqueTypeColor + SetColor(value uint32) ResultExtendedCommunityTransitiveOpaqueTypeColor + // HasColor checks if Color has been set in ResultExtendedCommunityTransitiveOpaqueTypeColor + HasColor() bool +} + +// Two octet flag values. +// Flags returns a uint32 +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) Flags() uint32 { + + return *obj.obj.Flags + +} + +// Two octet flag values. +// Flags returns a uint32 +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) HasFlags() bool { + return obj.obj.Flags != nil +} + +// Two octet flag values. +// SetFlags sets the uint32 value in the ResultExtendedCommunityTransitiveOpaqueTypeColor object +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) SetFlags(value uint32) ResultExtendedCommunityTransitiveOpaqueTypeColor { + + obj.obj.Flags = &value + return obj +} + +// The color value is user defined and configured locally and used to determine whether a data packet can be transmitted on a certain tunnel or not +// in conjunction with the Encapsulation attribute. It is defined in RFC9012. +// Color returns a uint32 +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) Color() uint32 { + + return *obj.obj.Color + +} + +// The color value is user defined and configured locally and used to determine whether a data packet can be transmitted on a certain tunnel or not +// in conjunction with the Encapsulation attribute. It is defined in RFC9012. +// Color returns a uint32 +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) HasColor() bool { + return obj.obj.Color != nil +} + +// The color value is user defined and configured locally and used to determine whether a data packet can be transmitted on a certain tunnel or not +// in conjunction with the Encapsulation attribute. It is defined in RFC9012. +// SetColor sets the uint32 value in the ResultExtendedCommunityTransitiveOpaqueTypeColor object +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) SetColor(value uint32) ResultExtendedCommunityTransitiveOpaqueTypeColor { + + obj.obj.Color = &value + return obj +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Flags != nil { + + if *obj.obj.Flags > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= ResultExtendedCommunityTransitiveOpaqueTypeColor.Flags <= 65535 but Got %d", *obj.obj.Flags)) + } + + } + +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeColor) setDefault() { + +} diff --git a/gosnappi/result_extended_community_transitive_opaque_type_encapsulation.go b/gosnappi/result_extended_community_transitive_opaque_type_encapsulation.go new file mode 100644 index 00000000..ea889de1 --- /dev/null +++ b/gosnappi/result_extended_community_transitive_opaque_type_encapsulation.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation ***** +type resultExtendedCommunityTransitiveOpaqueTypeEncapsulation struct { + validation + obj *otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + marshaller marshalResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + unMarshaller unMarshalResultExtendedCommunityTransitiveOpaqueTypeEncapsulation +} + +func NewResultExtendedCommunityTransitiveOpaqueTypeEncapsulation() ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation { + obj := resultExtendedCommunityTransitiveOpaqueTypeEncapsulation{obj: &otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation{}} + obj.setDefault() + return &obj +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) msg() *otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation { + return obj.obj +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) setMsg(msg *otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation) ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalresultExtendedCommunityTransitiveOpaqueTypeEncapsulation struct { + obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation +} + +type marshalResultExtendedCommunityTransitiveOpaqueTypeEncapsulation interface { + // ToProto marshals ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation to protobuf object *otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + ToProto() (*otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation, error) + // ToPbText marshals ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation to protobuf text + ToPbText() (string, error) + // ToYaml marshals ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation to YAML text + ToYaml() (string, error) + // ToJson marshals ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation to JSON text + ToJson() (string, error) +} + +type unMarshalresultExtendedCommunityTransitiveOpaqueTypeEncapsulation struct { + obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation +} + +type unMarshalResultExtendedCommunityTransitiveOpaqueTypeEncapsulation interface { + // FromProto unmarshals ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation from protobuf object *otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + FromProto(msg *otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation) (ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation, error) + // FromPbText unmarshals ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation from protobuf text + FromPbText(value string) error + // FromYaml unmarshals ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation from YAML text + FromYaml(value string) error + // FromJson unmarshals ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation from JSON text + FromJson(value string) error +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) Marshal() marshalResultExtendedCommunityTransitiveOpaqueTypeEncapsulation { + if obj.marshaller == nil { + obj.marshaller = &marshalresultExtendedCommunityTransitiveOpaqueTypeEncapsulation{obj: obj} + } + return obj.marshaller +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) Unmarshal() unMarshalResultExtendedCommunityTransitiveOpaqueTypeEncapsulation { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalresultExtendedCommunityTransitiveOpaqueTypeEncapsulation{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalresultExtendedCommunityTransitiveOpaqueTypeEncapsulation) ToProto() (*otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveOpaqueTypeEncapsulation) FromProto(msg *otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation) (ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalresultExtendedCommunityTransitiveOpaqueTypeEncapsulation) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveOpaqueTypeEncapsulation) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalresultExtendedCommunityTransitiveOpaqueTypeEncapsulation) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveOpaqueTypeEncapsulation) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalresultExtendedCommunityTransitiveOpaqueTypeEncapsulation) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalresultExtendedCommunityTransitiveOpaqueTypeEncapsulation) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) Clone() (ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewResultExtendedCommunityTransitiveOpaqueTypeEncapsulation() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation is this identifies the type of tunneling technology being signalled. It is defined in RFC9012 and sent with sub-type as 0x0c. +type ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation interface { + Validation + // msg marshals ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation to protobuf object *otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + // and doesn't set defaults + msg() *otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + // setMsg unmarshals ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation from protobuf object *otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + // and doesn't set defaults + setMsg(*otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation) ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + // provides marshal interface + Marshal() marshalResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + // provides unmarshal interface + Unmarshal() unMarshalResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + // validate validates ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + validate() error + // A stringer function + String() string + // Clones the object + Clone() (ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Reserved returns uint32, set in ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation. + Reserved() uint32 + // SetReserved assigns uint32 provided by user to ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + SetReserved(value uint32) ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + // HasReserved checks if Reserved has been set in ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + HasReserved() bool + // TunnelType returns uint32, set in ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation. + TunnelType() uint32 + // SetTunnelType assigns uint32 provided by user to ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + SetTunnelType(value uint32) ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + // HasTunnelType checks if TunnelType has been set in ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation + HasTunnelType() bool +} + +// Four bytes of reserved values. Normally set to 0 on transmit and ignored on receive. +// Reserved returns a uint32 +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) Reserved() uint32 { + + return *obj.obj.Reserved + +} + +// Four bytes of reserved values. Normally set to 0 on transmit and ignored on receive. +// Reserved returns a uint32 +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) HasReserved() bool { + return obj.obj.Reserved != nil +} + +// Four bytes of reserved values. Normally set to 0 on transmit and ignored on receive. +// SetReserved sets the uint32 value in the ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation object +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) SetReserved(value uint32) ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation { + + obj.obj.Reserved = &value + return obj +} + +// Identifies the type of tunneling technology being signalled. Initially defined in RFC5512 and extended in RFC9012. +// Some of the important tunnel types include +// - 1 L2TPv3 over IP [RFC9012], +// - 2 GRE [RFC9012], +// - 7 IP in IP [RFC9012], +// - 8 VXLAN Encapsulation [RFC8365], +// - 9 NVGRE Encapsulation [RFC8365], +// - 10 MPLS Encapsulation [RFC8365], +// - 15 SR TE Policy Type [draft-ietf-idr-segment-routing-te-policy], +// - 19 Geneve Encapsulation [RFC8926] +// TunnelType returns a uint32 +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) TunnelType() uint32 { + + return *obj.obj.TunnelType + +} + +// Identifies the type of tunneling technology being signalled. Initially defined in RFC5512 and extended in RFC9012. +// Some of the important tunnel types include +// - 1 L2TPv3 over IP [RFC9012], +// - 2 GRE [RFC9012], +// - 7 IP in IP [RFC9012], +// - 8 VXLAN Encapsulation [RFC8365], +// - 9 NVGRE Encapsulation [RFC8365], +// - 10 MPLS Encapsulation [RFC8365], +// - 15 SR TE Policy Type [draft-ietf-idr-segment-routing-te-policy], +// - 19 Geneve Encapsulation [RFC8926] +// TunnelType returns a uint32 +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) HasTunnelType() bool { + return obj.obj.TunnelType != nil +} + +// Identifies the type of tunneling technology being signalled. Initially defined in RFC5512 and extended in RFC9012. +// Some of the important tunnel types include +// - 1 L2TPv3 over IP [RFC9012], +// - 2 GRE [RFC9012], +// - 7 IP in IP [RFC9012], +// - 8 VXLAN Encapsulation [RFC8365], +// - 9 NVGRE Encapsulation [RFC8365], +// - 10 MPLS Encapsulation [RFC8365], +// - 15 SR TE Policy Type [draft-ietf-idr-segment-routing-te-policy], +// - 19 Geneve Encapsulation [RFC8926] +// SetTunnelType sets the uint32 value in the ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation object +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) SetTunnelType(value uint32) ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation { + + obj.obj.TunnelType = &value + return obj +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.TunnelType != nil { + + if *obj.obj.TunnelType > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation.TunnelType <= 65535 but Got %d", *obj.obj.TunnelType)) + } + + } + +} + +func (obj *resultExtendedCommunityTransitiveOpaqueTypeEncapsulation) setDefault() { + +} diff --git a/gosnappi/rsvp_ero.go b/gosnappi/rsvp_ero.go new file mode 100644 index 00000000..72500694 --- /dev/null +++ b/gosnappi/rsvp_ero.go @@ -0,0 +1,477 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpEro ***** +type rsvpEro struct { + validation + obj *otg.RsvpEro + marshaller marshalRsvpEro + unMarshaller unMarshalRsvpEro + subobjectsHolder RsvpEroRsvpEroSubobjectIter +} + +func NewRsvpEro() RsvpEro { + obj := rsvpEro{obj: &otg.RsvpEro{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpEro) msg() *otg.RsvpEro { + return obj.obj +} + +func (obj *rsvpEro) setMsg(msg *otg.RsvpEro) RsvpEro { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpEro struct { + obj *rsvpEro +} + +type marshalRsvpEro interface { + // ToProto marshals RsvpEro to protobuf object *otg.RsvpEro + ToProto() (*otg.RsvpEro, error) + // ToPbText marshals RsvpEro to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpEro to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpEro to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpEro struct { + obj *rsvpEro +} + +type unMarshalRsvpEro interface { + // FromProto unmarshals RsvpEro from protobuf object *otg.RsvpEro + FromProto(msg *otg.RsvpEro) (RsvpEro, error) + // FromPbText unmarshals RsvpEro from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpEro from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpEro from JSON text + FromJson(value string) error +} + +func (obj *rsvpEro) Marshal() marshalRsvpEro { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpEro{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpEro) Unmarshal() unMarshalRsvpEro { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpEro{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpEro) ToProto() (*otg.RsvpEro, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpEro) FromProto(msg *otg.RsvpEro) (RsvpEro, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpEro) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpEro) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpEro) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpEro) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpEro) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpEro) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpEro) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpEro) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpEro) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpEro) Clone() (RsvpEro, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpEro() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *rsvpEro) setNil() { + obj.subobjectsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// RsvpEro is configuration for the optional RSVP-TE explicit route object(ERO) object included in Path Messages. +type RsvpEro interface { + Validation + // msg marshals RsvpEro to protobuf object *otg.RsvpEro + // and doesn't set defaults + msg() *otg.RsvpEro + // setMsg unmarshals RsvpEro from protobuf object *otg.RsvpEro + // and doesn't set defaults + setMsg(*otg.RsvpEro) RsvpEro + // provides marshal interface + Marshal() marshalRsvpEro + // provides unmarshal interface + Unmarshal() unMarshalRsvpEro + // validate validates RsvpEro + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpEro, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PrependNeighborIp returns RsvpEroPrependNeighborIpEnum, set in RsvpEro + PrependNeighborIp() RsvpEroPrependNeighborIpEnum + // SetPrependNeighborIp assigns RsvpEroPrependNeighborIpEnum provided by user to RsvpEro + SetPrependNeighborIp(value RsvpEroPrependNeighborIpEnum) RsvpEro + // HasPrependNeighborIp checks if PrependNeighborIp has been set in RsvpEro + HasPrependNeighborIp() bool + // PrefixLength returns uint32, set in RsvpEro. + PrefixLength() uint32 + // SetPrefixLength assigns uint32 provided by user to RsvpEro + SetPrefixLength(value uint32) RsvpEro + // HasPrefixLength checks if PrefixLength has been set in RsvpEro + HasPrefixLength() bool + // Subobjects returns RsvpEroRsvpEroSubobjectIterIter, set in RsvpEro + Subobjects() RsvpEroRsvpEroSubobjectIter + setNil() +} + +type RsvpEroPrependNeighborIpEnum string + +// Enum of PrependNeighborIp on RsvpEro +var RsvpEroPrependNeighborIp = struct { + DONT_PREPEND RsvpEroPrependNeighborIpEnum + PREPEND_LOOSE RsvpEroPrependNeighborIpEnum + PREPEND_STRICT RsvpEroPrependNeighborIpEnum +}{ + DONT_PREPEND: RsvpEroPrependNeighborIpEnum("dont_prepend"), + PREPEND_LOOSE: RsvpEroPrependNeighborIpEnum("prepend_loose"), + PREPEND_STRICT: RsvpEroPrependNeighborIpEnum("prepend_strict"), +} + +func (obj *rsvpEro) PrependNeighborIp() RsvpEroPrependNeighborIpEnum { + return RsvpEroPrependNeighborIpEnum(obj.obj.PrependNeighborIp.Enum().String()) +} + +// Determines whether the IP address of the RSVP neighbor should be added as an ERO sub-object. If it is to be included, it can be included as a Loose hop or as a Strict hop. +// PrependNeighborIp returns a string +func (obj *rsvpEro) HasPrependNeighborIp() bool { + return obj.obj.PrependNeighborIp != nil +} + +func (obj *rsvpEro) SetPrependNeighborIp(value RsvpEroPrependNeighborIpEnum) RsvpEro { + intValue, ok := otg.RsvpEro_PrependNeighborIp_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on RsvpEroPrependNeighborIpEnum", string(value))) + return obj + } + enumValue := otg.RsvpEro_PrependNeighborIp_Enum(intValue) + obj.obj.PrependNeighborIp = &enumValue + + return obj +} + +// If prepend_egress_ip is set to one of 'prepend_loose' or 'prepend_strict', then set this value as the prefix length of the ERO sub-object containing egress IP address. +// PrefixLength returns a uint32 +func (obj *rsvpEro) PrefixLength() uint32 { + + return *obj.obj.PrefixLength + +} + +// If prepend_egress_ip is set to one of 'prepend_loose' or 'prepend_strict', then set this value as the prefix length of the ERO sub-object containing egress IP address. +// PrefixLength returns a uint32 +func (obj *rsvpEro) HasPrefixLength() bool { + return obj.obj.PrefixLength != nil +} + +// If prepend_egress_ip is set to one of 'prepend_loose' or 'prepend_strict', then set this value as the prefix length of the ERO sub-object containing egress IP address. +// SetPrefixLength sets the uint32 value in the RsvpEro object +func (obj *rsvpEro) SetPrefixLength(value uint32) RsvpEro { + + obj.obj.PrefixLength = &value + return obj +} + +// Array of sub-objects to be included in the ERO. These sub-objects contain the intermediate hops to be traversed by the LSP while being forwarded towards the egress endpoint. These sub-objects are included after the optional sub-object containing IP address of egress endpoint of the LSP (when present). +// Subobjects returns a []RsvpEroSubobject +func (obj *rsvpEro) Subobjects() RsvpEroRsvpEroSubobjectIter { + if len(obj.obj.Subobjects) == 0 { + obj.obj.Subobjects = []*otg.RsvpEroSubobject{} + } + if obj.subobjectsHolder == nil { + obj.subobjectsHolder = newRsvpEroRsvpEroSubobjectIter(&obj.obj.Subobjects).setMsg(obj) + } + return obj.subobjectsHolder +} + +type rsvpEroRsvpEroSubobjectIter struct { + obj *rsvpEro + rsvpEroSubobjectSlice []RsvpEroSubobject + fieldPtr *[]*otg.RsvpEroSubobject +} + +func newRsvpEroRsvpEroSubobjectIter(ptr *[]*otg.RsvpEroSubobject) RsvpEroRsvpEroSubobjectIter { + return &rsvpEroRsvpEroSubobjectIter{fieldPtr: ptr} +} + +type RsvpEroRsvpEroSubobjectIter interface { + setMsg(*rsvpEro) RsvpEroRsvpEroSubobjectIter + Items() []RsvpEroSubobject + Add() RsvpEroSubobject + Append(items ...RsvpEroSubobject) RsvpEroRsvpEroSubobjectIter + Set(index int, newObj RsvpEroSubobject) RsvpEroRsvpEroSubobjectIter + Clear() RsvpEroRsvpEroSubobjectIter + clearHolderSlice() RsvpEroRsvpEroSubobjectIter + appendHolderSlice(item RsvpEroSubobject) RsvpEroRsvpEroSubobjectIter +} + +func (obj *rsvpEroRsvpEroSubobjectIter) setMsg(msg *rsvpEro) RsvpEroRsvpEroSubobjectIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&rsvpEroSubobject{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *rsvpEroRsvpEroSubobjectIter) Items() []RsvpEroSubobject { + return obj.rsvpEroSubobjectSlice +} + +func (obj *rsvpEroRsvpEroSubobjectIter) Add() RsvpEroSubobject { + newObj := &otg.RsvpEroSubobject{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &rsvpEroSubobject{obj: newObj} + newLibObj.setDefault() + obj.rsvpEroSubobjectSlice = append(obj.rsvpEroSubobjectSlice, newLibObj) + return newLibObj +} + +func (obj *rsvpEroRsvpEroSubobjectIter) Append(items ...RsvpEroSubobject) RsvpEroRsvpEroSubobjectIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.rsvpEroSubobjectSlice = append(obj.rsvpEroSubobjectSlice, item) + } + return obj +} + +func (obj *rsvpEroRsvpEroSubobjectIter) Set(index int, newObj RsvpEroSubobject) RsvpEroRsvpEroSubobjectIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.rsvpEroSubobjectSlice[index] = newObj + return obj +} +func (obj *rsvpEroRsvpEroSubobjectIter) Clear() RsvpEroRsvpEroSubobjectIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.RsvpEroSubobject{} + obj.rsvpEroSubobjectSlice = []RsvpEroSubobject{} + } + return obj +} +func (obj *rsvpEroRsvpEroSubobjectIter) clearHolderSlice() RsvpEroRsvpEroSubobjectIter { + if len(obj.rsvpEroSubobjectSlice) > 0 { + obj.rsvpEroSubobjectSlice = []RsvpEroSubobject{} + } + return obj +} +func (obj *rsvpEroRsvpEroSubobjectIter) appendHolderSlice(item RsvpEroSubobject) RsvpEroRsvpEroSubobjectIter { + obj.rsvpEroSubobjectSlice = append(obj.rsvpEroSubobjectSlice, item) + return obj +} + +func (obj *rsvpEro) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.PrefixLength != nil { + + if *obj.obj.PrefixLength > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpEro.PrefixLength <= 32 but Got %d", *obj.obj.PrefixLength)) + } + + } + + if len(obj.obj.Subobjects) != 0 { + + if set_default { + obj.Subobjects().clearHolderSlice() + for _, item := range obj.obj.Subobjects { + obj.Subobjects().appendHolderSlice(&rsvpEroSubobject{obj: item}) + } + } + for _, item := range obj.Subobjects().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *rsvpEro) setDefault() { + if obj.obj.PrependNeighborIp == nil { + obj.SetPrependNeighborIp(RsvpEroPrependNeighborIp.PREPEND_LOOSE) + + } + if obj.obj.PrefixLength == nil { + obj.SetPrefixLength(32) + } + +} diff --git a/gosnappi/rsvp_ero_subobject.go b/gosnappi/rsvp_ero_subobject.go new file mode 100644 index 00000000..5b540627 --- /dev/null +++ b/gosnappi/rsvp_ero_subobject.go @@ -0,0 +1,488 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpEroSubobject ***** +type rsvpEroSubobject struct { + validation + obj *otg.RsvpEroSubobject + marshaller marshalRsvpEroSubobject + unMarshaller unMarshalRsvpEroSubobject +} + +func NewRsvpEroSubobject() RsvpEroSubobject { + obj := rsvpEroSubobject{obj: &otg.RsvpEroSubobject{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpEroSubobject) msg() *otg.RsvpEroSubobject { + return obj.obj +} + +func (obj *rsvpEroSubobject) setMsg(msg *otg.RsvpEroSubobject) RsvpEroSubobject { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpEroSubobject struct { + obj *rsvpEroSubobject +} + +type marshalRsvpEroSubobject interface { + // ToProto marshals RsvpEroSubobject to protobuf object *otg.RsvpEroSubobject + ToProto() (*otg.RsvpEroSubobject, error) + // ToPbText marshals RsvpEroSubobject to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpEroSubobject to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpEroSubobject to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpEroSubobject struct { + obj *rsvpEroSubobject +} + +type unMarshalRsvpEroSubobject interface { + // FromProto unmarshals RsvpEroSubobject from protobuf object *otg.RsvpEroSubobject + FromProto(msg *otg.RsvpEroSubobject) (RsvpEroSubobject, error) + // FromPbText unmarshals RsvpEroSubobject from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpEroSubobject from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpEroSubobject from JSON text + FromJson(value string) error +} + +func (obj *rsvpEroSubobject) Marshal() marshalRsvpEroSubobject { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpEroSubobject{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpEroSubobject) Unmarshal() unMarshalRsvpEroSubobject { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpEroSubobject{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpEroSubobject) ToProto() (*otg.RsvpEroSubobject, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpEroSubobject) FromProto(msg *otg.RsvpEroSubobject) (RsvpEroSubobject, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpEroSubobject) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpEroSubobject) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpEroSubobject) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpEroSubobject) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpEroSubobject) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpEroSubobject) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpEroSubobject) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpEroSubobject) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpEroSubobject) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpEroSubobject) Clone() (RsvpEroSubobject, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpEroSubobject() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// RsvpEroSubobject is configuration for the ERO sub-object. +type RsvpEroSubobject interface { + Validation + // msg marshals RsvpEroSubobject to protobuf object *otg.RsvpEroSubobject + // and doesn't set defaults + msg() *otg.RsvpEroSubobject + // setMsg unmarshals RsvpEroSubobject from protobuf object *otg.RsvpEroSubobject + // and doesn't set defaults + setMsg(*otg.RsvpEroSubobject) RsvpEroSubobject + // provides marshal interface + Marshal() marshalRsvpEroSubobject + // provides unmarshal interface + Unmarshal() unMarshalRsvpEroSubobject + // validate validates RsvpEroSubobject + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpEroSubobject, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Type returns RsvpEroSubobjectTypeEnum, set in RsvpEroSubobject + Type() RsvpEroSubobjectTypeEnum + // SetType assigns RsvpEroSubobjectTypeEnum provided by user to RsvpEroSubobject + SetType(value RsvpEroSubobjectTypeEnum) RsvpEroSubobject + // HasType checks if Type has been set in RsvpEroSubobject + HasType() bool + // Ipv4Address returns string, set in RsvpEroSubobject. + Ipv4Address() string + // SetIpv4Address assigns string provided by user to RsvpEroSubobject + SetIpv4Address(value string) RsvpEroSubobject + // HasIpv4Address checks if Ipv4Address has been set in RsvpEroSubobject + HasIpv4Address() bool + // PrefixLength returns uint32, set in RsvpEroSubobject. + PrefixLength() uint32 + // SetPrefixLength assigns uint32 provided by user to RsvpEroSubobject + SetPrefixLength(value uint32) RsvpEroSubobject + // HasPrefixLength checks if PrefixLength has been set in RsvpEroSubobject + HasPrefixLength() bool + // AsNumber returns uint32, set in RsvpEroSubobject. + AsNumber() uint32 + // SetAsNumber assigns uint32 provided by user to RsvpEroSubobject + SetAsNumber(value uint32) RsvpEroSubobject + // HasAsNumber checks if AsNumber has been set in RsvpEroSubobject + HasAsNumber() bool + // HopType returns RsvpEroSubobjectHopTypeEnum, set in RsvpEroSubobject + HopType() RsvpEroSubobjectHopTypeEnum + // SetHopType assigns RsvpEroSubobjectHopTypeEnum provided by user to RsvpEroSubobject + SetHopType(value RsvpEroSubobjectHopTypeEnum) RsvpEroSubobject + // HasHopType checks if HopType has been set in RsvpEroSubobject + HasHopType() bool +} + +type RsvpEroSubobjectTypeEnum string + +// Enum of Type on RsvpEroSubobject +var RsvpEroSubobjectType = struct { + IPV4 RsvpEroSubobjectTypeEnum + AS_NUMBER RsvpEroSubobjectTypeEnum +}{ + IPV4: RsvpEroSubobjectTypeEnum("ipv4"), + AS_NUMBER: RsvpEroSubobjectTypeEnum("as_number"), +} + +func (obj *rsvpEroSubobject) Type() RsvpEroSubobjectTypeEnum { + return RsvpEroSubobjectTypeEnum(obj.obj.Type.Enum().String()) +} + +// The type of the ERO sub-object, one of IPv4 Address or AS Number. +// Type returns a string +func (obj *rsvpEroSubobject) HasType() bool { + return obj.obj.Type != nil +} + +func (obj *rsvpEroSubobject) SetType(value RsvpEroSubobjectTypeEnum) RsvpEroSubobject { + intValue, ok := otg.RsvpEroSubobject_Type_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on RsvpEroSubobjectTypeEnum", string(value))) + return obj + } + enumValue := otg.RsvpEroSubobject_Type_Enum(intValue) + obj.obj.Type = &enumValue + + return obj +} + +// IPv4 address that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'ipv4'. +// Ipv4Address returns a string +func (obj *rsvpEroSubobject) Ipv4Address() string { + + return *obj.obj.Ipv4Address + +} + +// IPv4 address that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'ipv4'. +// Ipv4Address returns a string +func (obj *rsvpEroSubobject) HasIpv4Address() bool { + return obj.obj.Ipv4Address != nil +} + +// IPv4 address that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'ipv4'. +// SetIpv4Address sets the string value in the RsvpEroSubobject object +func (obj *rsvpEroSubobject) SetIpv4Address(value string) RsvpEroSubobject { + + obj.obj.Ipv4Address = &value + return obj +} + +// Prefix length for the IPv4 address in the ERO sub-object. This field is applicable only if the value of 'type' is set to 'ipv4'. +// PrefixLength returns a uint32 +func (obj *rsvpEroSubobject) PrefixLength() uint32 { + + return *obj.obj.PrefixLength + +} + +// Prefix length for the IPv4 address in the ERO sub-object. This field is applicable only if the value of 'type' is set to 'ipv4'. +// PrefixLength returns a uint32 +func (obj *rsvpEroSubobject) HasPrefixLength() bool { + return obj.obj.PrefixLength != nil +} + +// Prefix length for the IPv4 address in the ERO sub-object. This field is applicable only if the value of 'type' is set to 'ipv4'. +// SetPrefixLength sets the uint32 value in the RsvpEroSubobject object +func (obj *rsvpEroSubobject) SetPrefixLength(value uint32) RsvpEroSubobject { + + obj.obj.PrefixLength = &value + return obj +} + +// Autonomous System number to be set in the ERO sub-object that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'as_number'. Note that as per RFC3209, 4-byte AS encoding is not supported. +// AsNumber returns a uint32 +func (obj *rsvpEroSubobject) AsNumber() uint32 { + + return *obj.obj.AsNumber + +} + +// Autonomous System number to be set in the ERO sub-object that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'as_number'. Note that as per RFC3209, 4-byte AS encoding is not supported. +// AsNumber returns a uint32 +func (obj *rsvpEroSubobject) HasAsNumber() bool { + return obj.obj.AsNumber != nil +} + +// Autonomous System number to be set in the ERO sub-object that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'as_number'. Note that as per RFC3209, 4-byte AS encoding is not supported. +// SetAsNumber sets the uint32 value in the RsvpEroSubobject object +func (obj *rsvpEroSubobject) SetAsNumber(value uint32) RsvpEroSubobject { + + obj.obj.AsNumber = &value + return obj +} + +type RsvpEroSubobjectHopTypeEnum string + +// Enum of HopType on RsvpEroSubobject +var RsvpEroSubobjectHopType = struct { + STRICT RsvpEroSubobjectHopTypeEnum + LOOSE RsvpEroSubobjectHopTypeEnum +}{ + STRICT: RsvpEroSubobjectHopTypeEnum("strict"), + LOOSE: RsvpEroSubobjectHopTypeEnum("loose"), +} + +func (obj *rsvpEroSubobject) HopType() RsvpEroSubobjectHopTypeEnum { + return RsvpEroSubobjectHopTypeEnum(obj.obj.HopType.Enum().String()) +} + +// The hop type of the ERO sub-object, one of Strict or Loose. +// HopType returns a string +func (obj *rsvpEroSubobject) HasHopType() bool { + return obj.obj.HopType != nil +} + +func (obj *rsvpEroSubobject) SetHopType(value RsvpEroSubobjectHopTypeEnum) RsvpEroSubobject { + intValue, ok := otg.RsvpEroSubobject_HopType_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on RsvpEroSubobjectHopTypeEnum", string(value))) + return obj + } + enumValue := otg.RsvpEroSubobject_HopType_Enum(intValue) + obj.obj.HopType = &enumValue + + return obj +} + +func (obj *rsvpEroSubobject) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv4Address != nil { + + err := obj.validateIpv4(obj.Ipv4Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on RsvpEroSubobject.Ipv4Address")) + } + + } + + if obj.obj.PrefixLength != nil { + + if *obj.obj.PrefixLength > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpEroSubobject.PrefixLength <= 32 but Got %d", *obj.obj.PrefixLength)) + } + + } + + if obj.obj.AsNumber != nil { + + if *obj.obj.AsNumber > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpEroSubobject.AsNumber <= 65535 but Got %d", *obj.obj.AsNumber)) + } + + } + +} + +func (obj *rsvpEroSubobject) setDefault() { + if obj.obj.Type == nil { + obj.SetType(RsvpEroSubobjectType.IPV4) + + } + if obj.obj.Ipv4Address == nil { + obj.SetIpv4Address("0.0.0.0") + } + if obj.obj.PrefixLength == nil { + obj.SetPrefixLength(32) + } + if obj.obj.AsNumber == nil { + obj.SetAsNumber(0) + } + if obj.obj.HopType == nil { + obj.SetHopType(RsvpEroSubobjectHopType.LOOSE) + + } + +} diff --git a/gosnappi/rsvp_fast_reroute.go b/gosnappi/rsvp_fast_reroute.go new file mode 100644 index 00000000..35ebb432 --- /dev/null +++ b/gosnappi/rsvp_fast_reroute.go @@ -0,0 +1,623 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpFastReroute ***** +type rsvpFastReroute struct { + validation + obj *otg.RsvpFastReroute + marshaller marshalRsvpFastReroute + unMarshaller unMarshalRsvpFastReroute +} + +func NewRsvpFastReroute() RsvpFastReroute { + obj := rsvpFastReroute{obj: &otg.RsvpFastReroute{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpFastReroute) msg() *otg.RsvpFastReroute { + return obj.obj +} + +func (obj *rsvpFastReroute) setMsg(msg *otg.RsvpFastReroute) RsvpFastReroute { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpFastReroute struct { + obj *rsvpFastReroute +} + +type marshalRsvpFastReroute interface { + // ToProto marshals RsvpFastReroute to protobuf object *otg.RsvpFastReroute + ToProto() (*otg.RsvpFastReroute, error) + // ToPbText marshals RsvpFastReroute to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpFastReroute to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpFastReroute to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpFastReroute struct { + obj *rsvpFastReroute +} + +type unMarshalRsvpFastReroute interface { + // FromProto unmarshals RsvpFastReroute from protobuf object *otg.RsvpFastReroute + FromProto(msg *otg.RsvpFastReroute) (RsvpFastReroute, error) + // FromPbText unmarshals RsvpFastReroute from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpFastReroute from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpFastReroute from JSON text + FromJson(value string) error +} + +func (obj *rsvpFastReroute) Marshal() marshalRsvpFastReroute { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpFastReroute{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpFastReroute) Unmarshal() unMarshalRsvpFastReroute { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpFastReroute{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpFastReroute) ToProto() (*otg.RsvpFastReroute, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpFastReroute) FromProto(msg *otg.RsvpFastReroute) (RsvpFastReroute, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpFastReroute) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpFastReroute) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpFastReroute) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpFastReroute) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpFastReroute) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpFastReroute) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpFastReroute) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpFastReroute) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpFastReroute) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpFastReroute) Clone() (RsvpFastReroute, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpFastReroute() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// RsvpFastReroute is configuration for the optional RSVP-TE FAST_REROUTE object included in Path Messages as defined in RFC4090. +type RsvpFastReroute interface { + Validation + // msg marshals RsvpFastReroute to protobuf object *otg.RsvpFastReroute + // and doesn't set defaults + msg() *otg.RsvpFastReroute + // setMsg unmarshals RsvpFastReroute from protobuf object *otg.RsvpFastReroute + // and doesn't set defaults + setMsg(*otg.RsvpFastReroute) RsvpFastReroute + // provides marshal interface + Marshal() marshalRsvpFastReroute + // provides unmarshal interface + Unmarshal() unMarshalRsvpFastReroute + // validate validates RsvpFastReroute + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpFastReroute, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // SetupPriority returns uint32, set in RsvpFastReroute. + SetupPriority() uint32 + // SetSetupPriority assigns uint32 provided by user to RsvpFastReroute + SetSetupPriority(value uint32) RsvpFastReroute + // HasSetupPriority checks if SetupPriority has been set in RsvpFastReroute + HasSetupPriority() bool + // HoldingPriority returns uint32, set in RsvpFastReroute. + HoldingPriority() uint32 + // SetHoldingPriority assigns uint32 provided by user to RsvpFastReroute + SetHoldingPriority(value uint32) RsvpFastReroute + // HasHoldingPriority checks if HoldingPriority has been set in RsvpFastReroute + HasHoldingPriority() bool + // HopLimit returns uint32, set in RsvpFastReroute. + HopLimit() uint32 + // SetHopLimit assigns uint32 provided by user to RsvpFastReroute + SetHopLimit(value uint32) RsvpFastReroute + // HasHopLimit checks if HopLimit has been set in RsvpFastReroute + HasHopLimit() bool + // Bandwidth returns float32, set in RsvpFastReroute. + Bandwidth() float32 + // SetBandwidth assigns float32 provided by user to RsvpFastReroute + SetBandwidth(value float32) RsvpFastReroute + // HasBandwidth checks if Bandwidth has been set in RsvpFastReroute + HasBandwidth() bool + // ExcludeAny returns string, set in RsvpFastReroute. + ExcludeAny() string + // SetExcludeAny assigns string provided by user to RsvpFastReroute + SetExcludeAny(value string) RsvpFastReroute + // HasExcludeAny checks if ExcludeAny has been set in RsvpFastReroute + HasExcludeAny() bool + // IncludeAny returns string, set in RsvpFastReroute. + IncludeAny() string + // SetIncludeAny assigns string provided by user to RsvpFastReroute + SetIncludeAny(value string) RsvpFastReroute + // HasIncludeAny checks if IncludeAny has been set in RsvpFastReroute + HasIncludeAny() bool + // IncludeAll returns string, set in RsvpFastReroute. + IncludeAll() string + // SetIncludeAll assigns string provided by user to RsvpFastReroute + SetIncludeAll(value string) RsvpFastReroute + // HasIncludeAll checks if IncludeAll has been set in RsvpFastReroute + HasIncludeAll() bool + // OneToOneBackupDesired returns bool, set in RsvpFastReroute. + OneToOneBackupDesired() bool + // SetOneToOneBackupDesired assigns bool provided by user to RsvpFastReroute + SetOneToOneBackupDesired(value bool) RsvpFastReroute + // HasOneToOneBackupDesired checks if OneToOneBackupDesired has been set in RsvpFastReroute + HasOneToOneBackupDesired() bool + // FacilityBackupDesired returns bool, set in RsvpFastReroute. + FacilityBackupDesired() bool + // SetFacilityBackupDesired assigns bool provided by user to RsvpFastReroute + SetFacilityBackupDesired(value bool) RsvpFastReroute + // HasFacilityBackupDesired checks if FacilityBackupDesired has been set in RsvpFastReroute + HasFacilityBackupDesired() bool +} + +// Specifies the value of the Setup Priority field. This controls whether the backup LSP should pre-empt existing LSP that is setup with certain Holding Priority. While setting up a backup LSP, preemption of existing LSP can happen if resource limitation is encountered (e.g bandwidth availability). +// SetupPriority returns a uint32 +func (obj *rsvpFastReroute) SetupPriority() uint32 { + + return *obj.obj.SetupPriority + +} + +// Specifies the value of the Setup Priority field. This controls whether the backup LSP should pre-empt existing LSP that is setup with certain Holding Priority. While setting up a backup LSP, preemption of existing LSP can happen if resource limitation is encountered (e.g bandwidth availability). +// SetupPriority returns a uint32 +func (obj *rsvpFastReroute) HasSetupPriority() bool { + return obj.obj.SetupPriority != nil +} + +// Specifies the value of the Setup Priority field. This controls whether the backup LSP should pre-empt existing LSP that is setup with certain Holding Priority. While setting up a backup LSP, preemption of existing LSP can happen if resource limitation is encountered (e.g bandwidth availability). +// SetSetupPriority sets the uint32 value in the RsvpFastReroute object +func (obj *rsvpFastReroute) SetSetupPriority(value uint32) RsvpFastReroute { + + obj.obj.SetupPriority = &value + return obj +} + +// Specifies the value of the Holding Priority field. This controls whether a new LSP being created with certain Setup Priority should pre-empt this LSP set up with this Holding Priority. While setting up a new LSP, preemption of existing LSP can happen if resource limitation is encountered (e.g bandwidth availability). +// HoldingPriority returns a uint32 +func (obj *rsvpFastReroute) HoldingPriority() uint32 { + + return *obj.obj.HoldingPriority + +} + +// Specifies the value of the Holding Priority field. This controls whether a new LSP being created with certain Setup Priority should pre-empt this LSP set up with this Holding Priority. While setting up a new LSP, preemption of existing LSP can happen if resource limitation is encountered (e.g bandwidth availability). +// HoldingPriority returns a uint32 +func (obj *rsvpFastReroute) HasHoldingPriority() bool { + return obj.obj.HoldingPriority != nil +} + +// Specifies the value of the Holding Priority field. This controls whether a new LSP being created with certain Setup Priority should pre-empt this LSP set up with this Holding Priority. While setting up a new LSP, preemption of existing LSP can happen if resource limitation is encountered (e.g bandwidth availability). +// SetHoldingPriority sets the uint32 value in the RsvpFastReroute object +func (obj *rsvpFastReroute) SetHoldingPriority(value uint32) RsvpFastReroute { + + obj.obj.HoldingPriority = &value + return obj +} + +// Specifies the value of the Hop Limit field. This controls the maximum number of hops the LSP should traverse to reach the LSP end-point. +// HopLimit returns a uint32 +func (obj *rsvpFastReroute) HopLimit() uint32 { + + return *obj.obj.HopLimit + +} + +// Specifies the value of the Hop Limit field. This controls the maximum number of hops the LSP should traverse to reach the LSP end-point. +// HopLimit returns a uint32 +func (obj *rsvpFastReroute) HasHopLimit() bool { + return obj.obj.HopLimit != nil +} + +// Specifies the value of the Hop Limit field. This controls the maximum number of hops the LSP should traverse to reach the LSP end-point. +// SetHopLimit sets the uint32 value in the RsvpFastReroute object +func (obj *rsvpFastReroute) SetHopLimit(value uint32) RsvpFastReroute { + + obj.obj.HopLimit = &value + return obj +} + +// Specifies the value of the Bandwidth field as a 32-bit IEEE floating point integer, in bytes per second, as desired for the LSP. +// Bandwidth returns a float32 +func (obj *rsvpFastReroute) Bandwidth() float32 { + + return *obj.obj.Bandwidth + +} + +// Specifies the value of the Bandwidth field as a 32-bit IEEE floating point integer, in bytes per second, as desired for the LSP. +// Bandwidth returns a float32 +func (obj *rsvpFastReroute) HasBandwidth() bool { + return obj.obj.Bandwidth != nil +} + +// Specifies the value of the Bandwidth field as a 32-bit IEEE floating point integer, in bytes per second, as desired for the LSP. +// SetBandwidth sets the float32 value in the RsvpFastReroute object +func (obj *rsvpFastReroute) SetBandwidth(value float32) RsvpFastReroute { + + obj.obj.Bandwidth = &value + return obj +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link unacceptable. A null set (all bits set to zero) doesn't render the link unacceptable. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// ExcludeAny returns a string +func (obj *rsvpFastReroute) ExcludeAny() string { + + return *obj.obj.ExcludeAny + +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link unacceptable. A null set (all bits set to zero) doesn't render the link unacceptable. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// ExcludeAny returns a string +func (obj *rsvpFastReroute) HasExcludeAny() bool { + return obj.obj.ExcludeAny != nil +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link unacceptable. A null set (all bits set to zero) doesn't render the link unacceptable. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// SetExcludeAny sets the string value in the RsvpFastReroute object +func (obj *rsvpFastReroute) SetExcludeAny(value string) RsvpFastReroute { + + obj.obj.ExcludeAny = &value + return obj +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// IncludeAny returns a string +func (obj *rsvpFastReroute) IncludeAny() string { + + return *obj.obj.IncludeAny + +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// IncludeAny returns a string +func (obj *rsvpFastReroute) HasIncludeAny() bool { + return obj.obj.IncludeAny != nil +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// SetIncludeAny sets the string value in the RsvpFastReroute object +func (obj *rsvpFastReroute) SetIncludeAny(value string) RsvpFastReroute { + + obj.obj.IncludeAny = &value + return obj +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel all of which must be present for a link to be acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// IncludeAll returns a string +func (obj *rsvpFastReroute) IncludeAll() string { + + return *obj.obj.IncludeAll + +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel all of which must be present for a link to be acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// IncludeAll returns a string +func (obj *rsvpFastReroute) HasIncludeAll() bool { + return obj.obj.IncludeAll != nil +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel all of which must be present for a link to be acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// SetIncludeAll sets the string value in the RsvpFastReroute object +func (obj *rsvpFastReroute) SetIncludeAll(value string) RsvpFastReroute { + + obj.obj.IncludeAll = &value + return obj +} + +// Requests protection via the one-to-one backup method. +// OneToOneBackupDesired returns a bool +func (obj *rsvpFastReroute) OneToOneBackupDesired() bool { + + return *obj.obj.OneToOneBackupDesired + +} + +// Requests protection via the one-to-one backup method. +// OneToOneBackupDesired returns a bool +func (obj *rsvpFastReroute) HasOneToOneBackupDesired() bool { + return obj.obj.OneToOneBackupDesired != nil +} + +// Requests protection via the one-to-one backup method. +// SetOneToOneBackupDesired sets the bool value in the RsvpFastReroute object +func (obj *rsvpFastReroute) SetOneToOneBackupDesired(value bool) RsvpFastReroute { + + obj.obj.OneToOneBackupDesired = &value + return obj +} + +// Requests protection via the facility backup method. +// FacilityBackupDesired returns a bool +func (obj *rsvpFastReroute) FacilityBackupDesired() bool { + + return *obj.obj.FacilityBackupDesired + +} + +// Requests protection via the facility backup method. +// FacilityBackupDesired returns a bool +func (obj *rsvpFastReroute) HasFacilityBackupDesired() bool { + return obj.obj.FacilityBackupDesired != nil +} + +// Requests protection via the facility backup method. +// SetFacilityBackupDesired sets the bool value in the RsvpFastReroute object +func (obj *rsvpFastReroute) SetFacilityBackupDesired(value bool) RsvpFastReroute { + + obj.obj.FacilityBackupDesired = &value + return obj +} + +func (obj *rsvpFastReroute) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.SetupPriority != nil { + + if *obj.obj.SetupPriority > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpFastReroute.SetupPriority <= 7 but Got %d", *obj.obj.SetupPriority)) + } + + } + + if obj.obj.HoldingPriority != nil { + + if *obj.obj.HoldingPriority > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpFastReroute.HoldingPriority <= 7 but Got %d", *obj.obj.HoldingPriority)) + } + + } + + if obj.obj.HopLimit != nil { + + if *obj.obj.HopLimit > 255 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpFastReroute.HopLimit <= 255 but Got %d", *obj.obj.HopLimit)) + } + + } + + if obj.obj.ExcludeAny != nil { + + if len(*obj.obj.ExcludeAny) < 0 || len(*obj.obj.ExcludeAny) > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of RsvpFastReroute.ExcludeAny <= 8 but Got %d", + len(*obj.obj.ExcludeAny))) + } + + } + + if obj.obj.IncludeAny != nil { + + if len(*obj.obj.IncludeAny) < 0 || len(*obj.obj.IncludeAny) > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of RsvpFastReroute.IncludeAny <= 8 but Got %d", + len(*obj.obj.IncludeAny))) + } + + } + + if obj.obj.IncludeAll != nil { + + if len(*obj.obj.IncludeAll) < 0 || len(*obj.obj.IncludeAll) > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of RsvpFastReroute.IncludeAll <= 8 but Got %d", + len(*obj.obj.IncludeAll))) + } + + } + +} + +func (obj *rsvpFastReroute) setDefault() { + if obj.obj.SetupPriority == nil { + obj.SetSetupPriority(7) + } + if obj.obj.HoldingPriority == nil { + obj.SetHoldingPriority(7) + } + if obj.obj.HopLimit == nil { + obj.SetHopLimit(3) + } + if obj.obj.Bandwidth == nil { + obj.SetBandwidth(0) + } + if obj.obj.ExcludeAny == nil { + obj.SetExcludeAny("0") + } + if obj.obj.IncludeAny == nil { + obj.SetIncludeAny("0") + } + if obj.obj.IncludeAll == nil { + obj.SetIncludeAll("0") + } + if obj.obj.OneToOneBackupDesired == nil { + obj.SetOneToOneBackupDesired(false) + } + if obj.obj.FacilityBackupDesired == nil { + obj.SetFacilityBackupDesired(false) + } + +} diff --git a/gosnappi/rsvp_i_pv4_lsp_state.go b/gosnappi/rsvp_i_pv4_lsp_state.go new file mode 100644 index 00000000..a5d22194 --- /dev/null +++ b/gosnappi/rsvp_i_pv4_lsp_state.go @@ -0,0 +1,612 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpIPv4LspState ***** +type rsvpIPv4LspState struct { + validation + obj *otg.RsvpIPv4LspState + marshaller marshalRsvpIPv4LspState + unMarshaller unMarshalRsvpIPv4LspState + lspHolder RsvpLspState + rrosHolder RsvpIPv4LspStateRsvpLspIpv4RroIter + erosHolder RsvpIPv4LspStateRsvpLspIpv4EroIter +} + +func NewRsvpIPv4LspState() RsvpIPv4LspState { + obj := rsvpIPv4LspState{obj: &otg.RsvpIPv4LspState{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpIPv4LspState) msg() *otg.RsvpIPv4LspState { + return obj.obj +} + +func (obj *rsvpIPv4LspState) setMsg(msg *otg.RsvpIPv4LspState) RsvpIPv4LspState { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpIPv4LspState struct { + obj *rsvpIPv4LspState +} + +type marshalRsvpIPv4LspState interface { + // ToProto marshals RsvpIPv4LspState to protobuf object *otg.RsvpIPv4LspState + ToProto() (*otg.RsvpIPv4LspState, error) + // ToPbText marshals RsvpIPv4LspState to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpIPv4LspState to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpIPv4LspState to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpIPv4LspState struct { + obj *rsvpIPv4LspState +} + +type unMarshalRsvpIPv4LspState interface { + // FromProto unmarshals RsvpIPv4LspState from protobuf object *otg.RsvpIPv4LspState + FromProto(msg *otg.RsvpIPv4LspState) (RsvpIPv4LspState, error) + // FromPbText unmarshals RsvpIPv4LspState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpIPv4LspState from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpIPv4LspState from JSON text + FromJson(value string) error +} + +func (obj *rsvpIPv4LspState) Marshal() marshalRsvpIPv4LspState { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpIPv4LspState{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpIPv4LspState) Unmarshal() unMarshalRsvpIPv4LspState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpIPv4LspState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpIPv4LspState) ToProto() (*otg.RsvpIPv4LspState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpIPv4LspState) FromProto(msg *otg.RsvpIPv4LspState) (RsvpIPv4LspState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpIPv4LspState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpIPv4LspState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpIPv4LspState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpIPv4LspState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpIPv4LspState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpIPv4LspState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpIPv4LspState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpIPv4LspState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpIPv4LspState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpIPv4LspState) Clone() (RsvpIPv4LspState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpIPv4LspState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *rsvpIPv4LspState) setNil() { + obj.lspHolder = nil + obj.rrosHolder = nil + obj.erosHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// RsvpIPv4LspState is iPv4 RSVP-TE Discovered LSPs. +type RsvpIPv4LspState interface { + Validation + // msg marshals RsvpIPv4LspState to protobuf object *otg.RsvpIPv4LspState + // and doesn't set defaults + msg() *otg.RsvpIPv4LspState + // setMsg unmarshals RsvpIPv4LspState from protobuf object *otg.RsvpIPv4LspState + // and doesn't set defaults + setMsg(*otg.RsvpIPv4LspState) RsvpIPv4LspState + // provides marshal interface + Marshal() marshalRsvpIPv4LspState + // provides unmarshal interface + Unmarshal() unMarshalRsvpIPv4LspState + // validate validates RsvpIPv4LspState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpIPv4LspState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // SourceAddress returns string, set in RsvpIPv4LspState. + SourceAddress() string + // SetSourceAddress assigns string provided by user to RsvpIPv4LspState + SetSourceAddress(value string) RsvpIPv4LspState + // HasSourceAddress checks if SourceAddress has been set in RsvpIPv4LspState + HasSourceAddress() bool + // DestinationAddress returns string, set in RsvpIPv4LspState. + DestinationAddress() string + // SetDestinationAddress assigns string provided by user to RsvpIPv4LspState + SetDestinationAddress(value string) RsvpIPv4LspState + // HasDestinationAddress checks if DestinationAddress has been set in RsvpIPv4LspState + HasDestinationAddress() bool + // Lsp returns RsvpLspState, set in RsvpIPv4LspState. + // RsvpLspState is iPv4 RSVP-TE Discovered LSPs. + Lsp() RsvpLspState + // SetLsp assigns RsvpLspState provided by user to RsvpIPv4LspState. + // RsvpLspState is iPv4 RSVP-TE Discovered LSPs. + SetLsp(value RsvpLspState) RsvpIPv4LspState + // HasLsp checks if Lsp has been set in RsvpIPv4LspState + HasLsp() bool + // Rros returns RsvpIPv4LspStateRsvpLspIpv4RroIterIter, set in RsvpIPv4LspState + Rros() RsvpIPv4LspStateRsvpLspIpv4RroIter + // Eros returns RsvpIPv4LspStateRsvpLspIpv4EroIterIter, set in RsvpIPv4LspState + Eros() RsvpIPv4LspStateRsvpLspIpv4EroIter + setNil() +} + +// The origin IPv4 address of RSVP session. +// SourceAddress returns a string +func (obj *rsvpIPv4LspState) SourceAddress() string { + + return *obj.obj.SourceAddress + +} + +// The origin IPv4 address of RSVP session. +// SourceAddress returns a string +func (obj *rsvpIPv4LspState) HasSourceAddress() bool { + return obj.obj.SourceAddress != nil +} + +// The origin IPv4 address of RSVP session. +// SetSourceAddress sets the string value in the RsvpIPv4LspState object +func (obj *rsvpIPv4LspState) SetSourceAddress(value string) RsvpIPv4LspState { + + obj.obj.SourceAddress = &value + return obj +} + +// The IPv4 destination address of RSVP session. +// DestinationAddress returns a string +func (obj *rsvpIPv4LspState) DestinationAddress() string { + + return *obj.obj.DestinationAddress + +} + +// The IPv4 destination address of RSVP session. +// DestinationAddress returns a string +func (obj *rsvpIPv4LspState) HasDestinationAddress() bool { + return obj.obj.DestinationAddress != nil +} + +// The IPv4 destination address of RSVP session. +// SetDestinationAddress sets the string value in the RsvpIPv4LspState object +func (obj *rsvpIPv4LspState) SetDestinationAddress(value string) RsvpIPv4LspState { + + obj.obj.DestinationAddress = &value + return obj +} + +// It refers to the RSVP LSP properties. +// Lsp returns a RsvpLspState +func (obj *rsvpIPv4LspState) Lsp() RsvpLspState { + if obj.obj.Lsp == nil { + obj.obj.Lsp = NewRsvpLspState().msg() + } + if obj.lspHolder == nil { + obj.lspHolder = &rsvpLspState{obj: obj.obj.Lsp} + } + return obj.lspHolder +} + +// It refers to the RSVP LSP properties. +// Lsp returns a RsvpLspState +func (obj *rsvpIPv4LspState) HasLsp() bool { + return obj.obj.Lsp != nil +} + +// It refers to the RSVP LSP properties. +// SetLsp sets the RsvpLspState value in the RsvpIPv4LspState object +func (obj *rsvpIPv4LspState) SetLsp(value RsvpLspState) RsvpIPv4LspState { + + obj.lspHolder = nil + obj.obj.Lsp = value.msg() + + return obj +} + +// It refers to RSVP RRO objects container. +// Rros returns a []RsvpLspIpv4Rro +func (obj *rsvpIPv4LspState) Rros() RsvpIPv4LspStateRsvpLspIpv4RroIter { + if len(obj.obj.Rros) == 0 { + obj.obj.Rros = []*otg.RsvpLspIpv4Rro{} + } + if obj.rrosHolder == nil { + obj.rrosHolder = newRsvpIPv4LspStateRsvpLspIpv4RroIter(&obj.obj.Rros).setMsg(obj) + } + return obj.rrosHolder +} + +type rsvpIPv4LspStateRsvpLspIpv4RroIter struct { + obj *rsvpIPv4LspState + rsvpLspIpv4RroSlice []RsvpLspIpv4Rro + fieldPtr *[]*otg.RsvpLspIpv4Rro +} + +func newRsvpIPv4LspStateRsvpLspIpv4RroIter(ptr *[]*otg.RsvpLspIpv4Rro) RsvpIPv4LspStateRsvpLspIpv4RroIter { + return &rsvpIPv4LspStateRsvpLspIpv4RroIter{fieldPtr: ptr} +} + +type RsvpIPv4LspStateRsvpLspIpv4RroIter interface { + setMsg(*rsvpIPv4LspState) RsvpIPv4LspStateRsvpLspIpv4RroIter + Items() []RsvpLspIpv4Rro + Add() RsvpLspIpv4Rro + Append(items ...RsvpLspIpv4Rro) RsvpIPv4LspStateRsvpLspIpv4RroIter + Set(index int, newObj RsvpLspIpv4Rro) RsvpIPv4LspStateRsvpLspIpv4RroIter + Clear() RsvpIPv4LspStateRsvpLspIpv4RroIter + clearHolderSlice() RsvpIPv4LspStateRsvpLspIpv4RroIter + appendHolderSlice(item RsvpLspIpv4Rro) RsvpIPv4LspStateRsvpLspIpv4RroIter +} + +func (obj *rsvpIPv4LspStateRsvpLspIpv4RroIter) setMsg(msg *rsvpIPv4LspState) RsvpIPv4LspStateRsvpLspIpv4RroIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&rsvpLspIpv4Rro{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *rsvpIPv4LspStateRsvpLspIpv4RroIter) Items() []RsvpLspIpv4Rro { + return obj.rsvpLspIpv4RroSlice +} + +func (obj *rsvpIPv4LspStateRsvpLspIpv4RroIter) Add() RsvpLspIpv4Rro { + newObj := &otg.RsvpLspIpv4Rro{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &rsvpLspIpv4Rro{obj: newObj} + newLibObj.setDefault() + obj.rsvpLspIpv4RroSlice = append(obj.rsvpLspIpv4RroSlice, newLibObj) + return newLibObj +} + +func (obj *rsvpIPv4LspStateRsvpLspIpv4RroIter) Append(items ...RsvpLspIpv4Rro) RsvpIPv4LspStateRsvpLspIpv4RroIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.rsvpLspIpv4RroSlice = append(obj.rsvpLspIpv4RroSlice, item) + } + return obj +} + +func (obj *rsvpIPv4LspStateRsvpLspIpv4RroIter) Set(index int, newObj RsvpLspIpv4Rro) RsvpIPv4LspStateRsvpLspIpv4RroIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.rsvpLspIpv4RroSlice[index] = newObj + return obj +} +func (obj *rsvpIPv4LspStateRsvpLspIpv4RroIter) Clear() RsvpIPv4LspStateRsvpLspIpv4RroIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.RsvpLspIpv4Rro{} + obj.rsvpLspIpv4RroSlice = []RsvpLspIpv4Rro{} + } + return obj +} +func (obj *rsvpIPv4LspStateRsvpLspIpv4RroIter) clearHolderSlice() RsvpIPv4LspStateRsvpLspIpv4RroIter { + if len(obj.rsvpLspIpv4RroSlice) > 0 { + obj.rsvpLspIpv4RroSlice = []RsvpLspIpv4Rro{} + } + return obj +} +func (obj *rsvpIPv4LspStateRsvpLspIpv4RroIter) appendHolderSlice(item RsvpLspIpv4Rro) RsvpIPv4LspStateRsvpLspIpv4RroIter { + obj.rsvpLspIpv4RroSlice = append(obj.rsvpLspIpv4RroSlice, item) + return obj +} + +// It refers to RSVP ERO objects container. +// Eros returns a []RsvpLspIpv4Ero +func (obj *rsvpIPv4LspState) Eros() RsvpIPv4LspStateRsvpLspIpv4EroIter { + if len(obj.obj.Eros) == 0 { + obj.obj.Eros = []*otg.RsvpLspIpv4Ero{} + } + if obj.erosHolder == nil { + obj.erosHolder = newRsvpIPv4LspStateRsvpLspIpv4EroIter(&obj.obj.Eros).setMsg(obj) + } + return obj.erosHolder +} + +type rsvpIPv4LspStateRsvpLspIpv4EroIter struct { + obj *rsvpIPv4LspState + rsvpLspIpv4EroSlice []RsvpLspIpv4Ero + fieldPtr *[]*otg.RsvpLspIpv4Ero +} + +func newRsvpIPv4LspStateRsvpLspIpv4EroIter(ptr *[]*otg.RsvpLspIpv4Ero) RsvpIPv4LspStateRsvpLspIpv4EroIter { + return &rsvpIPv4LspStateRsvpLspIpv4EroIter{fieldPtr: ptr} +} + +type RsvpIPv4LspStateRsvpLspIpv4EroIter interface { + setMsg(*rsvpIPv4LspState) RsvpIPv4LspStateRsvpLspIpv4EroIter + Items() []RsvpLspIpv4Ero + Add() RsvpLspIpv4Ero + Append(items ...RsvpLspIpv4Ero) RsvpIPv4LspStateRsvpLspIpv4EroIter + Set(index int, newObj RsvpLspIpv4Ero) RsvpIPv4LspStateRsvpLspIpv4EroIter + Clear() RsvpIPv4LspStateRsvpLspIpv4EroIter + clearHolderSlice() RsvpIPv4LspStateRsvpLspIpv4EroIter + appendHolderSlice(item RsvpLspIpv4Ero) RsvpIPv4LspStateRsvpLspIpv4EroIter +} + +func (obj *rsvpIPv4LspStateRsvpLspIpv4EroIter) setMsg(msg *rsvpIPv4LspState) RsvpIPv4LspStateRsvpLspIpv4EroIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&rsvpLspIpv4Ero{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *rsvpIPv4LspStateRsvpLspIpv4EroIter) Items() []RsvpLspIpv4Ero { + return obj.rsvpLspIpv4EroSlice +} + +func (obj *rsvpIPv4LspStateRsvpLspIpv4EroIter) Add() RsvpLspIpv4Ero { + newObj := &otg.RsvpLspIpv4Ero{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &rsvpLspIpv4Ero{obj: newObj} + newLibObj.setDefault() + obj.rsvpLspIpv4EroSlice = append(obj.rsvpLspIpv4EroSlice, newLibObj) + return newLibObj +} + +func (obj *rsvpIPv4LspStateRsvpLspIpv4EroIter) Append(items ...RsvpLspIpv4Ero) RsvpIPv4LspStateRsvpLspIpv4EroIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.rsvpLspIpv4EroSlice = append(obj.rsvpLspIpv4EroSlice, item) + } + return obj +} + +func (obj *rsvpIPv4LspStateRsvpLspIpv4EroIter) Set(index int, newObj RsvpLspIpv4Ero) RsvpIPv4LspStateRsvpLspIpv4EroIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.rsvpLspIpv4EroSlice[index] = newObj + return obj +} +func (obj *rsvpIPv4LspStateRsvpLspIpv4EroIter) Clear() RsvpIPv4LspStateRsvpLspIpv4EroIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.RsvpLspIpv4Ero{} + obj.rsvpLspIpv4EroSlice = []RsvpLspIpv4Ero{} + } + return obj +} +func (obj *rsvpIPv4LspStateRsvpLspIpv4EroIter) clearHolderSlice() RsvpIPv4LspStateRsvpLspIpv4EroIter { + if len(obj.rsvpLspIpv4EroSlice) > 0 { + obj.rsvpLspIpv4EroSlice = []RsvpLspIpv4Ero{} + } + return obj +} +func (obj *rsvpIPv4LspStateRsvpLspIpv4EroIter) appendHolderSlice(item RsvpLspIpv4Ero) RsvpIPv4LspStateRsvpLspIpv4EroIter { + obj.rsvpLspIpv4EroSlice = append(obj.rsvpLspIpv4EroSlice, item) + return obj +} + +func (obj *rsvpIPv4LspState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.SourceAddress != nil { + + err := obj.validateIpv4(obj.SourceAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on RsvpIPv4LspState.SourceAddress")) + } + + } + + if obj.obj.DestinationAddress != nil { + + err := obj.validateIpv4(obj.DestinationAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on RsvpIPv4LspState.DestinationAddress")) + } + + } + + if obj.obj.Lsp != nil { + + obj.Lsp().validateObj(vObj, set_default) + } + + if len(obj.obj.Rros) != 0 { + + if set_default { + obj.Rros().clearHolderSlice() + for _, item := range obj.obj.Rros { + obj.Rros().appendHolderSlice(&rsvpLspIpv4Rro{obj: item}) + } + } + for _, item := range obj.Rros().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Eros) != 0 { + + if set_default { + obj.Eros().clearHolderSlice() + for _, item := range obj.obj.Eros { + obj.Eros().appendHolderSlice(&rsvpLspIpv4Ero{obj: item}) + } + } + for _, item := range obj.Eros().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *rsvpIPv4LspState) setDefault() { + +} diff --git a/gosnappi/rsvp_ipv4_interface.go b/gosnappi/rsvp_ipv4_interface.go new file mode 100644 index 00000000..1f8ccd8d --- /dev/null +++ b/gosnappi/rsvp_ipv4_interface.go @@ -0,0 +1,689 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpIpv4Interface ***** +type rsvpIpv4Interface struct { + validation + obj *otg.RsvpIpv4Interface + marshaller marshalRsvpIpv4Interface + unMarshaller unMarshalRsvpIpv4Interface +} + +func NewRsvpIpv4Interface() RsvpIpv4Interface { + obj := rsvpIpv4Interface{obj: &otg.RsvpIpv4Interface{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpIpv4Interface) msg() *otg.RsvpIpv4Interface { + return obj.obj +} + +func (obj *rsvpIpv4Interface) setMsg(msg *otg.RsvpIpv4Interface) RsvpIpv4Interface { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpIpv4Interface struct { + obj *rsvpIpv4Interface +} + +type marshalRsvpIpv4Interface interface { + // ToProto marshals RsvpIpv4Interface to protobuf object *otg.RsvpIpv4Interface + ToProto() (*otg.RsvpIpv4Interface, error) + // ToPbText marshals RsvpIpv4Interface to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpIpv4Interface to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpIpv4Interface to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpIpv4Interface struct { + obj *rsvpIpv4Interface +} + +type unMarshalRsvpIpv4Interface interface { + // FromProto unmarshals RsvpIpv4Interface from protobuf object *otg.RsvpIpv4Interface + FromProto(msg *otg.RsvpIpv4Interface) (RsvpIpv4Interface, error) + // FromPbText unmarshals RsvpIpv4Interface from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpIpv4Interface from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpIpv4Interface from JSON text + FromJson(value string) error +} + +func (obj *rsvpIpv4Interface) Marshal() marshalRsvpIpv4Interface { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpIpv4Interface{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpIpv4Interface) Unmarshal() unMarshalRsvpIpv4Interface { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpIpv4Interface{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpIpv4Interface) ToProto() (*otg.RsvpIpv4Interface, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpIpv4Interface) FromProto(msg *otg.RsvpIpv4Interface) (RsvpIpv4Interface, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpIpv4Interface) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpIpv4Interface) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpIpv4Interface) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpIpv4Interface) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpIpv4Interface) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpIpv4Interface) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpIpv4Interface) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpIpv4Interface) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpIpv4Interface) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpIpv4Interface) Clone() (RsvpIpv4Interface, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpIpv4Interface() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// RsvpIpv4Interface is configuration for RSVP Interface. +type RsvpIpv4Interface interface { + Validation + // msg marshals RsvpIpv4Interface to protobuf object *otg.RsvpIpv4Interface + // and doesn't set defaults + msg() *otg.RsvpIpv4Interface + // setMsg unmarshals RsvpIpv4Interface from protobuf object *otg.RsvpIpv4Interface + // and doesn't set defaults + setMsg(*otg.RsvpIpv4Interface) RsvpIpv4Interface + // provides marshal interface + Marshal() marshalRsvpIpv4Interface + // provides unmarshal interface + Unmarshal() unMarshalRsvpIpv4Interface + // validate validates RsvpIpv4Interface + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpIpv4Interface, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv4Name returns string, set in RsvpIpv4Interface. + Ipv4Name() string + // SetIpv4Name assigns string provided by user to RsvpIpv4Interface + SetIpv4Name(value string) RsvpIpv4Interface + // NeighborIp returns string, set in RsvpIpv4Interface. + NeighborIp() string + // SetNeighborIp assigns string provided by user to RsvpIpv4Interface + SetNeighborIp(value string) RsvpIpv4Interface + // LabelSpaceStart returns uint32, set in RsvpIpv4Interface. + LabelSpaceStart() uint32 + // SetLabelSpaceStart assigns uint32 provided by user to RsvpIpv4Interface + SetLabelSpaceStart(value uint32) RsvpIpv4Interface + // HasLabelSpaceStart checks if LabelSpaceStart has been set in RsvpIpv4Interface + HasLabelSpaceStart() bool + // LabelSpaceEnd returns uint32, set in RsvpIpv4Interface. + LabelSpaceEnd() uint32 + // SetLabelSpaceEnd assigns uint32 provided by user to RsvpIpv4Interface + SetLabelSpaceEnd(value uint32) RsvpIpv4Interface + // HasLabelSpaceEnd checks if LabelSpaceEnd has been set in RsvpIpv4Interface + HasLabelSpaceEnd() bool + // EnableRefreshReduction returns bool, set in RsvpIpv4Interface. + EnableRefreshReduction() bool + // SetEnableRefreshReduction assigns bool provided by user to RsvpIpv4Interface + SetEnableRefreshReduction(value bool) RsvpIpv4Interface + // HasEnableRefreshReduction checks if EnableRefreshReduction has been set in RsvpIpv4Interface + HasEnableRefreshReduction() bool + // SummaryRefreshInterval returns uint32, set in RsvpIpv4Interface. + SummaryRefreshInterval() uint32 + // SetSummaryRefreshInterval assigns uint32 provided by user to RsvpIpv4Interface + SetSummaryRefreshInterval(value uint32) RsvpIpv4Interface + // HasSummaryRefreshInterval checks if SummaryRefreshInterval has been set in RsvpIpv4Interface + HasSummaryRefreshInterval() bool + // SendBundle returns bool, set in RsvpIpv4Interface. + SendBundle() bool + // SetSendBundle assigns bool provided by user to RsvpIpv4Interface + SetSendBundle(value bool) RsvpIpv4Interface + // HasSendBundle checks if SendBundle has been set in RsvpIpv4Interface + HasSendBundle() bool + // BundleThreshold returns uint32, set in RsvpIpv4Interface. + BundleThreshold() uint32 + // SetBundleThreshold assigns uint32 provided by user to RsvpIpv4Interface + SetBundleThreshold(value uint32) RsvpIpv4Interface + // HasBundleThreshold checks if BundleThreshold has been set in RsvpIpv4Interface + HasBundleThreshold() bool + // EnableHello returns bool, set in RsvpIpv4Interface. + EnableHello() bool + // SetEnableHello assigns bool provided by user to RsvpIpv4Interface + SetEnableHello(value bool) RsvpIpv4Interface + // HasEnableHello checks if EnableHello has been set in RsvpIpv4Interface + HasEnableHello() bool + // HelloInterval returns uint32, set in RsvpIpv4Interface. + HelloInterval() uint32 + // SetHelloInterval assigns uint32 provided by user to RsvpIpv4Interface + SetHelloInterval(value uint32) RsvpIpv4Interface + // HasHelloInterval checks if HelloInterval has been set in RsvpIpv4Interface + HasHelloInterval() bool + // TimeoutMultiplier returns uint32, set in RsvpIpv4Interface. + TimeoutMultiplier() uint32 + // SetTimeoutMultiplier assigns uint32 provided by user to RsvpIpv4Interface + SetTimeoutMultiplier(value uint32) RsvpIpv4Interface + // HasTimeoutMultiplier checks if TimeoutMultiplier has been set in RsvpIpv4Interface + HasTimeoutMultiplier() bool +} + +// The globally unique name of the IPv4 interface connected to the DUT. This name must match the "name" field of the "ipv4_addresses" on top which this RSVP interface is configured. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// Ipv4Name returns a string +func (obj *rsvpIpv4Interface) Ipv4Name() string { + + return *obj.obj.Ipv4Name + +} + +// The globally unique name of the IPv4 interface connected to the DUT. This name must match the "name" field of the "ipv4_addresses" on top which this RSVP interface is configured. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// +// SetIpv4Name sets the string value in the RsvpIpv4Interface object +func (obj *rsvpIpv4Interface) SetIpv4Name(value string) RsvpIpv4Interface { + + obj.obj.Ipv4Name = &value + return obj +} + +// IPv4 address of the RSVP neighbor on this interface. +// NeighborIp returns a string +func (obj *rsvpIpv4Interface) NeighborIp() string { + + return *obj.obj.NeighborIp + +} + +// IPv4 address of the RSVP neighbor on this interface. +// SetNeighborIp sets the string value in the RsvpIpv4Interface object +func (obj *rsvpIpv4Interface) SetNeighborIp(value string) RsvpIpv4Interface { + + obj.obj.NeighborIp = &value + return obj +} + +// The user-defined label space start value. The LSPs for which this router acts as a egress are assigned labels from this label pool.The"label_space_start" and "label_space_end" together defines this label-pool. +// LabelSpaceStart returns a uint32 +func (obj *rsvpIpv4Interface) LabelSpaceStart() uint32 { + + return *obj.obj.LabelSpaceStart + +} + +// The user-defined label space start value. The LSPs for which this router acts as a egress are assigned labels from this label pool.The"label_space_start" and "label_space_end" together defines this label-pool. +// LabelSpaceStart returns a uint32 +func (obj *rsvpIpv4Interface) HasLabelSpaceStart() bool { + return obj.obj.LabelSpaceStart != nil +} + +// The user-defined label space start value. The LSPs for which this router acts as a egress are assigned labels from this label pool.The"label_space_start" and "label_space_end" together defines this label-pool. +// SetLabelSpaceStart sets the uint32 value in the RsvpIpv4Interface object +func (obj *rsvpIpv4Interface) SetLabelSpaceStart(value uint32) RsvpIpv4Interface { + + obj.obj.LabelSpaceStart = &value + return obj +} + +// The user-defined label space end value.The last label value that can be assigned to the LSPs for which this router acts as egress. +// LabelSpaceEnd returns a uint32 +func (obj *rsvpIpv4Interface) LabelSpaceEnd() uint32 { + + return *obj.obj.LabelSpaceEnd + +} + +// The user-defined label space end value.The last label value that can be assigned to the LSPs for which this router acts as egress. +// LabelSpaceEnd returns a uint32 +func (obj *rsvpIpv4Interface) HasLabelSpaceEnd() bool { + return obj.obj.LabelSpaceEnd != nil +} + +// The user-defined label space end value.The last label value that can be assigned to the LSPs for which this router acts as egress. +// SetLabelSpaceEnd sets the uint32 value in the RsvpIpv4Interface object +func (obj *rsvpIpv4Interface) SetLabelSpaceEnd(value uint32) RsvpIpv4Interface { + + obj.obj.LabelSpaceEnd = &value + return obj +} + +// Enables sending of Refresh Reduction as described in RFC2961. +// EnableRefreshReduction returns a bool +func (obj *rsvpIpv4Interface) EnableRefreshReduction() bool { + + return *obj.obj.EnableRefreshReduction + +} + +// Enables sending of Refresh Reduction as described in RFC2961. +// EnableRefreshReduction returns a bool +func (obj *rsvpIpv4Interface) HasEnableRefreshReduction() bool { + return obj.obj.EnableRefreshReduction != nil +} + +// Enables sending of Refresh Reduction as described in RFC2961. +// SetEnableRefreshReduction sets the bool value in the RsvpIpv4Interface object +func (obj *rsvpIpv4Interface) SetEnableRefreshReduction(value bool) RsvpIpv4Interface { + + obj.obj.EnableRefreshReduction = &value + return obj +} + +// The number of seconds between transmissions of successive Summary Refreshes. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. +// SummaryRefreshInterval returns a uint32 +func (obj *rsvpIpv4Interface) SummaryRefreshInterval() uint32 { + + return *obj.obj.SummaryRefreshInterval + +} + +// The number of seconds between transmissions of successive Summary Refreshes. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. +// SummaryRefreshInterval returns a uint32 +func (obj *rsvpIpv4Interface) HasSummaryRefreshInterval() bool { + return obj.obj.SummaryRefreshInterval != nil +} + +// The number of seconds between transmissions of successive Summary Refreshes. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. +// SetSummaryRefreshInterval sets the uint32 value in the RsvpIpv4Interface object +func (obj *rsvpIpv4Interface) SetSummaryRefreshInterval(value uint32) RsvpIpv4Interface { + + obj.obj.SummaryRefreshInterval = &value + return obj +} + +// Enables aggregration of different RSVP messages within a single PDU. +// SendBundle returns a bool +func (obj *rsvpIpv4Interface) SendBundle() bool { + + return *obj.obj.SendBundle + +} + +// Enables aggregration of different RSVP messages within a single PDU. +// SendBundle returns a bool +func (obj *rsvpIpv4Interface) HasSendBundle() bool { + return obj.obj.SendBundle != nil +} + +// Enables aggregration of different RSVP messages within a single PDU. +// SetSendBundle sets the bool value in the RsvpIpv4Interface object +func (obj *rsvpIpv4Interface) SetSendBundle(value bool) RsvpIpv4Interface { + + obj.obj.SendBundle = &value + return obj +} + +// The number of milliseconds to wait after which RSVP will bundle different RSVP messages and transmit Bundle messages. +// BundleThreshold returns a uint32 +func (obj *rsvpIpv4Interface) BundleThreshold() uint32 { + + return *obj.obj.BundleThreshold + +} + +// The number of milliseconds to wait after which RSVP will bundle different RSVP messages and transmit Bundle messages. +// BundleThreshold returns a uint32 +func (obj *rsvpIpv4Interface) HasBundleThreshold() bool { + return obj.obj.BundleThreshold != nil +} + +// The number of milliseconds to wait after which RSVP will bundle different RSVP messages and transmit Bundle messages. +// SetBundleThreshold sets the uint32 value in the RsvpIpv4Interface object +func (obj *rsvpIpv4Interface) SetBundleThreshold(value uint32) RsvpIpv4Interface { + + obj.obj.BundleThreshold = &value + return obj +} + +// Enables sending of Hello Messages as per RFC3209. +// EnableHello returns a bool +func (obj *rsvpIpv4Interface) EnableHello() bool { + + return *obj.obj.EnableHello + +} + +// Enables sending of Hello Messages as per RFC3209. +// EnableHello returns a bool +func (obj *rsvpIpv4Interface) HasEnableHello() bool { + return obj.obj.EnableHello != nil +} + +// Enables sending of Hello Messages as per RFC3209. +// SetEnableHello sets the bool value in the RsvpIpv4Interface object +func (obj *rsvpIpv4Interface) SetEnableHello(value bool) RsvpIpv4Interface { + + obj.obj.EnableHello = &value + return obj +} + +// If enable_hello is set to 'true', this specifies the minimum hello interval in seconds at which successive Hello Messages are sent as per RFC3209. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. +// HelloInterval returns a uint32 +func (obj *rsvpIpv4Interface) HelloInterval() uint32 { + + return *obj.obj.HelloInterval + +} + +// If enable_hello is set to 'true', this specifies the minimum hello interval in seconds at which successive Hello Messages are sent as per RFC3209. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. +// HelloInterval returns a uint32 +func (obj *rsvpIpv4Interface) HasHelloInterval() bool { + return obj.obj.HelloInterval != nil +} + +// If enable_hello is set to 'true', this specifies the minimum hello interval in seconds at which successive Hello Messages are sent as per RFC3209. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. +// SetHelloInterval sets the uint32 value in the RsvpIpv4Interface object +func (obj *rsvpIpv4Interface) SetHelloInterval(value uint32) RsvpIpv4Interface { + + obj.obj.HelloInterval = &value + return obj +} + +// The number of missed hellos after which the node should consider RSVP Neighbor to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. +// TimeoutMultiplier returns a uint32 +func (obj *rsvpIpv4Interface) TimeoutMultiplier() uint32 { + + return *obj.obj.TimeoutMultiplier + +} + +// The number of missed hellos after which the node should consider RSVP Neighbor to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. +// TimeoutMultiplier returns a uint32 +func (obj *rsvpIpv4Interface) HasTimeoutMultiplier() bool { + return obj.obj.TimeoutMultiplier != nil +} + +// The number of missed hellos after which the node should consider RSVP Neighbor to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. +// SetTimeoutMultiplier sets the uint32 value in the RsvpIpv4Interface object +func (obj *rsvpIpv4Interface) SetTimeoutMultiplier(value uint32) RsvpIpv4Interface { + + obj.obj.TimeoutMultiplier = &value + return obj +} + +func (obj *rsvpIpv4Interface) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Ipv4Name is required + if obj.obj.Ipv4Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv4Name is required field on interface RsvpIpv4Interface") + } + + // NeighborIp is required + if obj.obj.NeighborIp == nil { + vObj.validationErrors = append(vObj.validationErrors, "NeighborIp is required field on interface RsvpIpv4Interface") + } + if obj.obj.NeighborIp != nil { + + err := obj.validateIpv4(obj.NeighborIp()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on RsvpIpv4Interface.NeighborIp")) + } + + } + + if obj.obj.LabelSpaceStart != nil { + + if *obj.obj.LabelSpaceStart > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpIpv4Interface.LabelSpaceStart <= 1048575 but Got %d", *obj.obj.LabelSpaceStart)) + } + + } + + if obj.obj.LabelSpaceEnd != nil { + + if *obj.obj.LabelSpaceEnd > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpIpv4Interface.LabelSpaceEnd <= 1048575 but Got %d", *obj.obj.LabelSpaceEnd)) + } + + } + + if obj.obj.SummaryRefreshInterval != nil { + + if *obj.obj.SummaryRefreshInterval > 3600 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpIpv4Interface.SummaryRefreshInterval <= 3600 but Got %d", *obj.obj.SummaryRefreshInterval)) + } + + } + + if obj.obj.BundleThreshold != nil { + + if *obj.obj.BundleThreshold > 1000 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpIpv4Interface.BundleThreshold <= 1000 but Got %d", *obj.obj.BundleThreshold)) + } + + } + + if obj.obj.HelloInterval != nil { + + if *obj.obj.HelloInterval > 3600 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpIpv4Interface.HelloInterval <= 3600 but Got %d", *obj.obj.HelloInterval)) + } + + } + + if obj.obj.TimeoutMultiplier != nil { + + if *obj.obj.TimeoutMultiplier > 10 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpIpv4Interface.TimeoutMultiplier <= 10 but Got %d", *obj.obj.TimeoutMultiplier)) + } + + } + +} + +func (obj *rsvpIpv4Interface) setDefault() { + if obj.obj.LabelSpaceStart == nil { + obj.SetLabelSpaceStart(1000) + } + if obj.obj.LabelSpaceEnd == nil { + obj.SetLabelSpaceEnd(100000) + } + if obj.obj.EnableRefreshReduction == nil { + obj.SetEnableRefreshReduction(false) + } + if obj.obj.SummaryRefreshInterval == nil { + obj.SetSummaryRefreshInterval(30) + } + if obj.obj.SendBundle == nil { + obj.SetSendBundle(false) + } + if obj.obj.BundleThreshold == nil { + obj.SetBundleThreshold(50) + } + if obj.obj.EnableHello == nil { + obj.SetEnableHello(false) + } + if obj.obj.HelloInterval == nil { + obj.SetHelloInterval(9) + } + if obj.obj.TimeoutMultiplier == nil { + obj.SetTimeoutMultiplier(3) + } + +} diff --git a/gosnappi/rsvp_lsp_ipv4_ero.go b/gosnappi/rsvp_lsp_ipv4_ero.go new file mode 100644 index 00000000..9ffeaff0 --- /dev/null +++ b/gosnappi/rsvp_lsp_ipv4_ero.go @@ -0,0 +1,391 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpLspIpv4Ero ***** +type rsvpLspIpv4Ero struct { + validation + obj *otg.RsvpLspIpv4Ero + marshaller marshalRsvpLspIpv4Ero + unMarshaller unMarshalRsvpLspIpv4Ero +} + +func NewRsvpLspIpv4Ero() RsvpLspIpv4Ero { + obj := rsvpLspIpv4Ero{obj: &otg.RsvpLspIpv4Ero{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpLspIpv4Ero) msg() *otg.RsvpLspIpv4Ero { + return obj.obj +} + +func (obj *rsvpLspIpv4Ero) setMsg(msg *otg.RsvpLspIpv4Ero) RsvpLspIpv4Ero { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpLspIpv4Ero struct { + obj *rsvpLspIpv4Ero +} + +type marshalRsvpLspIpv4Ero interface { + // ToProto marshals RsvpLspIpv4Ero to protobuf object *otg.RsvpLspIpv4Ero + ToProto() (*otg.RsvpLspIpv4Ero, error) + // ToPbText marshals RsvpLspIpv4Ero to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpLspIpv4Ero to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpLspIpv4Ero to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpLspIpv4Ero struct { + obj *rsvpLspIpv4Ero +} + +type unMarshalRsvpLspIpv4Ero interface { + // FromProto unmarshals RsvpLspIpv4Ero from protobuf object *otg.RsvpLspIpv4Ero + FromProto(msg *otg.RsvpLspIpv4Ero) (RsvpLspIpv4Ero, error) + // FromPbText unmarshals RsvpLspIpv4Ero from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpLspIpv4Ero from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpLspIpv4Ero from JSON text + FromJson(value string) error +} + +func (obj *rsvpLspIpv4Ero) Marshal() marshalRsvpLspIpv4Ero { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpLspIpv4Ero{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpLspIpv4Ero) Unmarshal() unMarshalRsvpLspIpv4Ero { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpLspIpv4Ero{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpLspIpv4Ero) ToProto() (*otg.RsvpLspIpv4Ero, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpLspIpv4Ero) FromProto(msg *otg.RsvpLspIpv4Ero) (RsvpLspIpv4Ero, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpLspIpv4Ero) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpLspIpv4Ero) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpLspIpv4Ero) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspIpv4Ero) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpLspIpv4Ero) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspIpv4Ero) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpLspIpv4Ero) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpLspIpv4Ero) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpLspIpv4Ero) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpLspIpv4Ero) Clone() (RsvpLspIpv4Ero, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpLspIpv4Ero() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// RsvpLspIpv4Ero is this contains the list of sub-objects included in the Explicit Route Object(ERO) object send in the PATH message from the ingress. These sub-objects contain the intermediate hops to be traversed by the LSP while being forwarded towards the egress endpoint. +type RsvpLspIpv4Ero interface { + Validation + // msg marshals RsvpLspIpv4Ero to protobuf object *otg.RsvpLspIpv4Ero + // and doesn't set defaults + msg() *otg.RsvpLspIpv4Ero + // setMsg unmarshals RsvpLspIpv4Ero from protobuf object *otg.RsvpLspIpv4Ero + // and doesn't set defaults + setMsg(*otg.RsvpLspIpv4Ero) RsvpLspIpv4Ero + // provides marshal interface + Marshal() marshalRsvpLspIpv4Ero + // provides unmarshal interface + Unmarshal() unMarshalRsvpLspIpv4Ero + // validate validates RsvpLspIpv4Ero + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpLspIpv4Ero, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Prefix returns string, set in RsvpLspIpv4Ero. + Prefix() string + // SetPrefix assigns string provided by user to RsvpLspIpv4Ero + SetPrefix(value string) RsvpLspIpv4Ero + // HasPrefix checks if Prefix has been set in RsvpLspIpv4Ero + HasPrefix() bool + // Asn returns uint32, set in RsvpLspIpv4Ero. + Asn() uint32 + // SetAsn assigns uint32 provided by user to RsvpLspIpv4Ero + SetAsn(value uint32) RsvpLspIpv4Ero + // HasAsn checks if Asn has been set in RsvpLspIpv4Ero + HasAsn() bool + // Type returns RsvpLspIpv4EroTypeEnum, set in RsvpLspIpv4Ero + Type() RsvpLspIpv4EroTypeEnum + // SetType assigns RsvpLspIpv4EroTypeEnum provided by user to RsvpLspIpv4Ero + SetType(value RsvpLspIpv4EroTypeEnum) RsvpLspIpv4Ero + // HasType checks if Type has been set in RsvpLspIpv4Ero + HasType() bool +} + +// The IPv4 prefix indicated by the ERO. Specified only when the ERO hop is an IPv4 prefix. +// Prefix returns a string +func (obj *rsvpLspIpv4Ero) Prefix() string { + + return *obj.obj.Prefix + +} + +// The IPv4 prefix indicated by the ERO. Specified only when the ERO hop is an IPv4 prefix. +// Prefix returns a string +func (obj *rsvpLspIpv4Ero) HasPrefix() bool { + return obj.obj.Prefix != nil +} + +// The IPv4 prefix indicated by the ERO. Specified only when the ERO hop is an IPv4 prefix. +// SetPrefix sets the string value in the RsvpLspIpv4Ero object +func (obj *rsvpLspIpv4Ero) SetPrefix(value string) RsvpLspIpv4Ero { + + obj.obj.Prefix = &value + return obj +} + +// The autonomous system number indicated by the ERO. Specified only when the ERO hop is an 2 or 4-byte AS number. +// Asn returns a uint32 +func (obj *rsvpLspIpv4Ero) Asn() uint32 { + + return *obj.obj.Asn + +} + +// The autonomous system number indicated by the ERO. Specified only when the ERO hop is an 2 or 4-byte AS number. +// Asn returns a uint32 +func (obj *rsvpLspIpv4Ero) HasAsn() bool { + return obj.obj.Asn != nil +} + +// The autonomous system number indicated by the ERO. Specified only when the ERO hop is an 2 or 4-byte AS number. +// SetAsn sets the uint32 value in the RsvpLspIpv4Ero object +func (obj *rsvpLspIpv4Ero) SetAsn(value uint32) RsvpLspIpv4Ero { + + obj.obj.Asn = &value + return obj +} + +type RsvpLspIpv4EroTypeEnum string + +// Enum of Type on RsvpLspIpv4Ero +var RsvpLspIpv4EroType = struct { + IPV4 RsvpLspIpv4EroTypeEnum + IPV6 RsvpLspIpv4EroTypeEnum + ASN RsvpLspIpv4EroTypeEnum + ASN4 RsvpLspIpv4EroTypeEnum + LABEL RsvpLspIpv4EroTypeEnum + UNNUMBERED_INTERFACE RsvpLspIpv4EroTypeEnum +}{ + IPV4: RsvpLspIpv4EroTypeEnum("ipv4"), + IPV6: RsvpLspIpv4EroTypeEnum("ipv6"), + ASN: RsvpLspIpv4EroTypeEnum("asn"), + ASN4: RsvpLspIpv4EroTypeEnum("asn4"), + LABEL: RsvpLspIpv4EroTypeEnum("label"), + UNNUMBERED_INTERFACE: RsvpLspIpv4EroTypeEnum("unnumbered_interface"), +} + +func (obj *rsvpLspIpv4Ero) Type() RsvpLspIpv4EroTypeEnum { + return RsvpLspIpv4EroTypeEnum(obj.obj.Type.Enum().String()) +} + +// The type indicated by the ERO. +// Type returns a string +func (obj *rsvpLspIpv4Ero) HasType() bool { + return obj.obj.Type != nil +} + +func (obj *rsvpLspIpv4Ero) SetType(value RsvpLspIpv4EroTypeEnum) RsvpLspIpv4Ero { + intValue, ok := otg.RsvpLspIpv4Ero_Type_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on RsvpLspIpv4EroTypeEnum", string(value))) + return obj + } + enumValue := otg.RsvpLspIpv4Ero_Type_Enum(intValue) + obj.obj.Type = &enumValue + + return obj +} + +func (obj *rsvpLspIpv4Ero) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Prefix != nil { + + err := obj.validateIpv4(obj.Prefix()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on RsvpLspIpv4Ero.Prefix")) + } + + } + +} + +func (obj *rsvpLspIpv4Ero) setDefault() { + +} diff --git a/gosnappi/rsvp_lsp_ipv4_interface.go b/gosnappi/rsvp_lsp_ipv4_interface.go new file mode 100644 index 00000000..3c01ee7d --- /dev/null +++ b/gosnappi/rsvp_lsp_ipv4_interface.go @@ -0,0 +1,476 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpLspIpv4Interface ***** +type rsvpLspIpv4Interface struct { + validation + obj *otg.RsvpLspIpv4Interface + marshaller marshalRsvpLspIpv4Interface + unMarshaller unMarshalRsvpLspIpv4Interface + p2PEgressIpv4LspsHolder RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + p2PIngressIpv4LspsHolder RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter +} + +func NewRsvpLspIpv4Interface() RsvpLspIpv4Interface { + obj := rsvpLspIpv4Interface{obj: &otg.RsvpLspIpv4Interface{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpLspIpv4Interface) msg() *otg.RsvpLspIpv4Interface { + return obj.obj +} + +func (obj *rsvpLspIpv4Interface) setMsg(msg *otg.RsvpLspIpv4Interface) RsvpLspIpv4Interface { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpLspIpv4Interface struct { + obj *rsvpLspIpv4Interface +} + +type marshalRsvpLspIpv4Interface interface { + // ToProto marshals RsvpLspIpv4Interface to protobuf object *otg.RsvpLspIpv4Interface + ToProto() (*otg.RsvpLspIpv4Interface, error) + // ToPbText marshals RsvpLspIpv4Interface to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpLspIpv4Interface to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpLspIpv4Interface to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpLspIpv4Interface struct { + obj *rsvpLspIpv4Interface +} + +type unMarshalRsvpLspIpv4Interface interface { + // FromProto unmarshals RsvpLspIpv4Interface from protobuf object *otg.RsvpLspIpv4Interface + FromProto(msg *otg.RsvpLspIpv4Interface) (RsvpLspIpv4Interface, error) + // FromPbText unmarshals RsvpLspIpv4Interface from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpLspIpv4Interface from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpLspIpv4Interface from JSON text + FromJson(value string) error +} + +func (obj *rsvpLspIpv4Interface) Marshal() marshalRsvpLspIpv4Interface { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpLspIpv4Interface{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpLspIpv4Interface) Unmarshal() unMarshalRsvpLspIpv4Interface { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpLspIpv4Interface{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpLspIpv4Interface) ToProto() (*otg.RsvpLspIpv4Interface, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpLspIpv4Interface) FromProto(msg *otg.RsvpLspIpv4Interface) (RsvpLspIpv4Interface, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpLspIpv4Interface) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpLspIpv4Interface) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpLspIpv4Interface) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspIpv4Interface) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpLspIpv4Interface) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspIpv4Interface) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpLspIpv4Interface) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpLspIpv4Interface) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpLspIpv4Interface) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpLspIpv4Interface) Clone() (RsvpLspIpv4Interface, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpLspIpv4Interface() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *rsvpLspIpv4Interface) setNil() { + obj.p2PEgressIpv4LspsHolder = nil + obj.p2PIngressIpv4LspsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// RsvpLspIpv4Interface is configuration for RSVP LSP IPv4 Interface. +type RsvpLspIpv4Interface interface { + Validation + // msg marshals RsvpLspIpv4Interface to protobuf object *otg.RsvpLspIpv4Interface + // and doesn't set defaults + msg() *otg.RsvpLspIpv4Interface + // setMsg unmarshals RsvpLspIpv4Interface from protobuf object *otg.RsvpLspIpv4Interface + // and doesn't set defaults + setMsg(*otg.RsvpLspIpv4Interface) RsvpLspIpv4Interface + // provides marshal interface + Marshal() marshalRsvpLspIpv4Interface + // provides unmarshal interface + Unmarshal() unMarshalRsvpLspIpv4Interface + // validate validates RsvpLspIpv4Interface + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpLspIpv4Interface, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Ipv4Name returns string, set in RsvpLspIpv4Interface. + Ipv4Name() string + // SetIpv4Name assigns string provided by user to RsvpLspIpv4Interface + SetIpv4Name(value string) RsvpLspIpv4Interface + // P2PEgressIpv4Lsps returns RsvpLspIpv4InterfaceP2PEgressIpv4Lsp, set in RsvpLspIpv4Interface. + // RsvpLspIpv4InterfaceP2PEgressIpv4Lsp is configuration for RSVP Egress Point-to-Point(P2P) IPv4 LSPs. + P2PEgressIpv4Lsps() RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + // SetP2PEgressIpv4Lsps assigns RsvpLspIpv4InterfaceP2PEgressIpv4Lsp provided by user to RsvpLspIpv4Interface. + // RsvpLspIpv4InterfaceP2PEgressIpv4Lsp is configuration for RSVP Egress Point-to-Point(P2P) IPv4 LSPs. + SetP2PEgressIpv4Lsps(value RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) RsvpLspIpv4Interface + // HasP2PEgressIpv4Lsps checks if P2PEgressIpv4Lsps has been set in RsvpLspIpv4Interface + HasP2PEgressIpv4Lsps() bool + // P2PIngressIpv4Lsps returns RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIterIter, set in RsvpLspIpv4Interface + P2PIngressIpv4Lsps() RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter + setNil() +} + +// The globally unique name of the IPv4 or Loopback IPv4 interface acting as the RSVP ingress and egress endpoint for the LSPs configured on this interface. This must match the "name" field of either "ipv4_addresses" or "ipv4_loopbacks" on which this LSP interface is configured. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv4Loopback/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv4Loopback/properties/name +// +// Ipv4Name returns a string +func (obj *rsvpLspIpv4Interface) Ipv4Name() string { + + return *obj.obj.Ipv4Name + +} + +// The globally unique name of the IPv4 or Loopback IPv4 interface acting as the RSVP ingress and egress endpoint for the LSPs configured on this interface. This must match the "name" field of either "ipv4_addresses" or "ipv4_loopbacks" on which this LSP interface is configured. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv4Loopback/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv4Loopback/properties/name +// +// SetIpv4Name sets the string value in the RsvpLspIpv4Interface object +func (obj *rsvpLspIpv4Interface) SetIpv4Name(value string) RsvpLspIpv4Interface { + + obj.obj.Ipv4Name = &value + return obj +} + +// Contains properties of Tail(Egress) LSPs. +// P2PEgressIpv4Lsps returns a RsvpLspIpv4InterfaceP2PEgressIpv4Lsp +func (obj *rsvpLspIpv4Interface) P2PEgressIpv4Lsps() RsvpLspIpv4InterfaceP2PEgressIpv4Lsp { + if obj.obj.P2PEgressIpv4Lsps == nil { + obj.obj.P2PEgressIpv4Lsps = NewRsvpLspIpv4InterfaceP2PEgressIpv4Lsp().msg() + } + if obj.p2PEgressIpv4LspsHolder == nil { + obj.p2PEgressIpv4LspsHolder = &rsvpLspIpv4InterfaceP2PEgressIpv4Lsp{obj: obj.obj.P2PEgressIpv4Lsps} + } + return obj.p2PEgressIpv4LspsHolder +} + +// Contains properties of Tail(Egress) LSPs. +// P2PEgressIpv4Lsps returns a RsvpLspIpv4InterfaceP2PEgressIpv4Lsp +func (obj *rsvpLspIpv4Interface) HasP2PEgressIpv4Lsps() bool { + return obj.obj.P2PEgressIpv4Lsps != nil +} + +// Contains properties of Tail(Egress) LSPs. +// SetP2PEgressIpv4Lsps sets the RsvpLspIpv4InterfaceP2PEgressIpv4Lsp value in the RsvpLspIpv4Interface object +func (obj *rsvpLspIpv4Interface) SetP2PEgressIpv4Lsps(value RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) RsvpLspIpv4Interface { + + obj.p2PEgressIpv4LspsHolder = nil + obj.obj.P2PEgressIpv4Lsps = value.msg() + + return obj +} + +// Array of point-to-point RSVP-TE P2P LSPs originating from this interface. +// P2PIngressIpv4Lsps returns a []RsvpLspIpv4InterfaceP2PIngressIpv4Lsp +func (obj *rsvpLspIpv4Interface) P2PIngressIpv4Lsps() RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter { + if len(obj.obj.P2PIngressIpv4Lsps) == 0 { + obj.obj.P2PIngressIpv4Lsps = []*otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp{} + } + if obj.p2PIngressIpv4LspsHolder == nil { + obj.p2PIngressIpv4LspsHolder = newRsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter(&obj.obj.P2PIngressIpv4Lsps).setMsg(obj) + } + return obj.p2PIngressIpv4LspsHolder +} + +type rsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter struct { + obj *rsvpLspIpv4Interface + rsvpLspIpv4InterfaceP2PIngressIpv4LspSlice []RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + fieldPtr *[]*otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp +} + +func newRsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter(ptr *[]*otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter { + return &rsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter{fieldPtr: ptr} +} + +type RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter interface { + setMsg(*rsvpLspIpv4Interface) RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter + Items() []RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + Add() RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + Append(items ...RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter + Set(index int, newObj RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter + Clear() RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter + clearHolderSlice() RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter + appendHolderSlice(item RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter +} + +func (obj *rsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter) setMsg(msg *rsvpLspIpv4Interface) RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&rsvpLspIpv4InterfaceP2PIngressIpv4Lsp{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *rsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter) Items() []RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + return obj.rsvpLspIpv4InterfaceP2PIngressIpv4LspSlice +} + +func (obj *rsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter) Add() RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + newObj := &otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &rsvpLspIpv4InterfaceP2PIngressIpv4Lsp{obj: newObj} + newLibObj.setDefault() + obj.rsvpLspIpv4InterfaceP2PIngressIpv4LspSlice = append(obj.rsvpLspIpv4InterfaceP2PIngressIpv4LspSlice, newLibObj) + return newLibObj +} + +func (obj *rsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter) Append(items ...RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.rsvpLspIpv4InterfaceP2PIngressIpv4LspSlice = append(obj.rsvpLspIpv4InterfaceP2PIngressIpv4LspSlice, item) + } + return obj +} + +func (obj *rsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter) Set(index int, newObj RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.rsvpLspIpv4InterfaceP2PIngressIpv4LspSlice[index] = newObj + return obj +} +func (obj *rsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter) Clear() RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp{} + obj.rsvpLspIpv4InterfaceP2PIngressIpv4LspSlice = []RsvpLspIpv4InterfaceP2PIngressIpv4Lsp{} + } + return obj +} +func (obj *rsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter) clearHolderSlice() RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter { + if len(obj.rsvpLspIpv4InterfaceP2PIngressIpv4LspSlice) > 0 { + obj.rsvpLspIpv4InterfaceP2PIngressIpv4LspSlice = []RsvpLspIpv4InterfaceP2PIngressIpv4Lsp{} + } + return obj +} +func (obj *rsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter) appendHolderSlice(item RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) RsvpLspIpv4InterfaceRsvpLspIpv4InterfaceP2PIngressIpv4LspIter { + obj.rsvpLspIpv4InterfaceP2PIngressIpv4LspSlice = append(obj.rsvpLspIpv4InterfaceP2PIngressIpv4LspSlice, item) + return obj +} + +func (obj *rsvpLspIpv4Interface) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Ipv4Name is required + if obj.obj.Ipv4Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Ipv4Name is required field on interface RsvpLspIpv4Interface") + } + + if obj.obj.P2PEgressIpv4Lsps != nil { + + obj.P2PEgressIpv4Lsps().validateObj(vObj, set_default) + } + + if len(obj.obj.P2PIngressIpv4Lsps) != 0 { + + if set_default { + obj.P2PIngressIpv4Lsps().clearHolderSlice() + for _, item := range obj.obj.P2PIngressIpv4Lsps { + obj.P2PIngressIpv4Lsps().appendHolderSlice(&rsvpLspIpv4InterfaceP2PIngressIpv4Lsp{obj: item}) + } + } + for _, item := range obj.P2PIngressIpv4Lsps().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *rsvpLspIpv4Interface) setDefault() { + +} diff --git a/gosnappi/rsvp_lsp_ipv4_interface_p2p_egress_ipv4_lsp.go b/gosnappi/rsvp_lsp_ipv4_interface_p2p_egress_ipv4_lsp.go new file mode 100644 index 00000000..a2cdfe52 --- /dev/null +++ b/gosnappi/rsvp_lsp_ipv4_interface_p2p_egress_ipv4_lsp.go @@ -0,0 +1,503 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpLspIpv4InterfaceP2PEgressIpv4Lsp ***** +type rsvpLspIpv4InterfaceP2PEgressIpv4Lsp struct { + validation + obj *otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + marshaller marshalRsvpLspIpv4InterfaceP2PEgressIpv4Lsp + unMarshaller unMarshalRsvpLspIpv4InterfaceP2PEgressIpv4Lsp +} + +func NewRsvpLspIpv4InterfaceP2PEgressIpv4Lsp() RsvpLspIpv4InterfaceP2PEgressIpv4Lsp { + obj := rsvpLspIpv4InterfaceP2PEgressIpv4Lsp{obj: &otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) msg() *otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp { + return obj.obj +} + +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) setMsg(msg *otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) RsvpLspIpv4InterfaceP2PEgressIpv4Lsp { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpLspIpv4InterfaceP2PEgressIpv4Lsp struct { + obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp +} + +type marshalRsvpLspIpv4InterfaceP2PEgressIpv4Lsp interface { + // ToProto marshals RsvpLspIpv4InterfaceP2PEgressIpv4Lsp to protobuf object *otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + ToProto() (*otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp, error) + // ToPbText marshals RsvpLspIpv4InterfaceP2PEgressIpv4Lsp to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpLspIpv4InterfaceP2PEgressIpv4Lsp to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpLspIpv4InterfaceP2PEgressIpv4Lsp to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpLspIpv4InterfaceP2PEgressIpv4Lsp struct { + obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp +} + +type unMarshalRsvpLspIpv4InterfaceP2PEgressIpv4Lsp interface { + // FromProto unmarshals RsvpLspIpv4InterfaceP2PEgressIpv4Lsp from protobuf object *otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + FromProto(msg *otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) (RsvpLspIpv4InterfaceP2PEgressIpv4Lsp, error) + // FromPbText unmarshals RsvpLspIpv4InterfaceP2PEgressIpv4Lsp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpLspIpv4InterfaceP2PEgressIpv4Lsp from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpLspIpv4InterfaceP2PEgressIpv4Lsp from JSON text + FromJson(value string) error +} + +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) Marshal() marshalRsvpLspIpv4InterfaceP2PEgressIpv4Lsp { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpLspIpv4InterfaceP2PEgressIpv4Lsp{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) Unmarshal() unMarshalRsvpLspIpv4InterfaceP2PEgressIpv4Lsp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpLspIpv4InterfaceP2PEgressIpv4Lsp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpLspIpv4InterfaceP2PEgressIpv4Lsp) ToProto() (*otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpLspIpv4InterfaceP2PEgressIpv4Lsp) FromProto(msg *otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) (RsvpLspIpv4InterfaceP2PEgressIpv4Lsp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpLspIpv4InterfaceP2PEgressIpv4Lsp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpLspIpv4InterfaceP2PEgressIpv4Lsp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpLspIpv4InterfaceP2PEgressIpv4Lsp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspIpv4InterfaceP2PEgressIpv4Lsp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpLspIpv4InterfaceP2PEgressIpv4Lsp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspIpv4InterfaceP2PEgressIpv4Lsp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) Clone() (RsvpLspIpv4InterfaceP2PEgressIpv4Lsp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpLspIpv4InterfaceP2PEgressIpv4Lsp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// RsvpLspIpv4InterfaceP2PEgressIpv4Lsp is configuration for RSVP Egress Point-to-Point(P2P) IPv4 LSPs. +type RsvpLspIpv4InterfaceP2PEgressIpv4Lsp interface { + Validation + // msg marshals RsvpLspIpv4InterfaceP2PEgressIpv4Lsp to protobuf object *otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + // and doesn't set defaults + msg() *otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + // setMsg unmarshals RsvpLspIpv4InterfaceP2PEgressIpv4Lsp from protobuf object *otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + // and doesn't set defaults + setMsg(*otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp) RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + // provides marshal interface + Marshal() marshalRsvpLspIpv4InterfaceP2PEgressIpv4Lsp + // provides unmarshal interface + Unmarshal() unMarshalRsvpLspIpv4InterfaceP2PEgressIpv4Lsp + // validate validates RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpLspIpv4InterfaceP2PEgressIpv4Lsp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in RsvpLspIpv4InterfaceP2PEgressIpv4Lsp. + Name() string + // SetName assigns string provided by user to RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + SetName(value string) RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + // RefreshInterval returns uint32, set in RsvpLspIpv4InterfaceP2PEgressIpv4Lsp. + RefreshInterval() uint32 + // SetRefreshInterval assigns uint32 provided by user to RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + SetRefreshInterval(value uint32) RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + // HasRefreshInterval checks if RefreshInterval has been set in RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + HasRefreshInterval() bool + // TimeoutMultiplier returns uint32, set in RsvpLspIpv4InterfaceP2PEgressIpv4Lsp. + TimeoutMultiplier() uint32 + // SetTimeoutMultiplier assigns uint32 provided by user to RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + SetTimeoutMultiplier(value uint32) RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + // HasTimeoutMultiplier checks if TimeoutMultiplier has been set in RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + HasTimeoutMultiplier() bool + // ReservationStyle returns RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum, set in RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + ReservationStyle() RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum + // SetReservationStyle assigns RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum provided by user to RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + SetReservationStyle(value RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum) RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + // HasReservationStyle checks if ReservationStyle has been set in RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + HasReservationStyle() bool + // EnableFixedLabel returns bool, set in RsvpLspIpv4InterfaceP2PEgressIpv4Lsp. + EnableFixedLabel() bool + // SetEnableFixedLabel assigns bool provided by user to RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + SetEnableFixedLabel(value bool) RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + // HasEnableFixedLabel checks if EnableFixedLabel has been set in RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + HasEnableFixedLabel() bool + // FixedLabelValue returns uint32, set in RsvpLspIpv4InterfaceP2PEgressIpv4Lsp. + FixedLabelValue() uint32 + // SetFixedLabelValue assigns uint32 provided by user to RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + SetFixedLabelValue(value uint32) RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + // HasFixedLabelValue checks if FixedLabelValue has been set in RsvpLspIpv4InterfaceP2PEgressIpv4Lsp + HasFixedLabelValue() bool +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the RsvpLspIpv4InterfaceP2PEgressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) SetName(value string) RsvpLspIpv4InterfaceP2PEgressIpv4Lsp { + + obj.obj.Name = &value + return obj +} + +// The time in seconds between successive transmissions of RESV Refreshes. The actual refresh interval is jittered by upto 50%. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. +// RefreshInterval returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) RefreshInterval() uint32 { + + return *obj.obj.RefreshInterval + +} + +// The time in seconds between successive transmissions of RESV Refreshes. The actual refresh interval is jittered by upto 50%. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. +// RefreshInterval returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) HasRefreshInterval() bool { + return obj.obj.RefreshInterval != nil +} + +// The time in seconds between successive transmissions of RESV Refreshes. The actual refresh interval is jittered by upto 50%. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. +// SetRefreshInterval sets the uint32 value in the RsvpLspIpv4InterfaceP2PEgressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) SetRefreshInterval(value uint32) RsvpLspIpv4InterfaceP2PEgressIpv4Lsp { + + obj.obj.RefreshInterval = &value + return obj +} + +// The number of missed PATH refreshes after which a recieving node should consider the LSP state to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. +// TimeoutMultiplier returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) TimeoutMultiplier() uint32 { + + return *obj.obj.TimeoutMultiplier + +} + +// The number of missed PATH refreshes after which a recieving node should consider the LSP state to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. +// TimeoutMultiplier returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) HasTimeoutMultiplier() bool { + return obj.obj.TimeoutMultiplier != nil +} + +// The number of missed PATH refreshes after which a recieving node should consider the LSP state to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. +// SetTimeoutMultiplier sets the uint32 value in the RsvpLspIpv4InterfaceP2PEgressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) SetTimeoutMultiplier(value uint32) RsvpLspIpv4InterfaceP2PEgressIpv4Lsp { + + obj.obj.TimeoutMultiplier = &value + return obj +} + +type RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum string + +// Enum of ReservationStyle on RsvpLspIpv4InterfaceP2PEgressIpv4Lsp +var RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyle = struct { + SHARED_EXPLICIT RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum + FIXED_FILTER RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum + AUTO RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum +}{ + SHARED_EXPLICIT: RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum("shared_explicit"), + FIXED_FILTER: RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum("fixed_filter"), + AUTO: RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum("auto"), +} + +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) ReservationStyle() RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum { + return RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum(obj.obj.ReservationStyle.Enum().String()) +} + +// It determines how RSVP-TE enabled network devices set up reservations along the path between an end-to-end QOS-enabled connection. If 'auto' is enabled, the style is chosen based on whether the incoming Path has 'SE Desired' flag set. Otherwise, the style is chosen based on the value selected for this attribute. +// ReservationStyle returns a string +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) HasReservationStyle() bool { + return obj.obj.ReservationStyle != nil +} + +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) SetReservationStyle(value RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum) RsvpLspIpv4InterfaceP2PEgressIpv4Lsp { + intValue, ok := otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyleEnum", string(value))) + return obj + } + enumValue := otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp_ReservationStyle_Enum(intValue) + obj.obj.ReservationStyle = &enumValue + + return obj +} + +// If enabled, a specific fixed label will be advertised by the egress or tail end for all Path messages received by this egress. This can be leveraged to advertise Explicit or Implicit null labels. +// EnableFixedLabel returns a bool +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) EnableFixedLabel() bool { + + return *obj.obj.EnableFixedLabel + +} + +// If enabled, a specific fixed label will be advertised by the egress or tail end for all Path messages received by this egress. This can be leveraged to advertise Explicit or Implicit null labels. +// EnableFixedLabel returns a bool +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) HasEnableFixedLabel() bool { + return obj.obj.EnableFixedLabel != nil +} + +// If enabled, a specific fixed label will be advertised by the egress or tail end for all Path messages received by this egress. This can be leveraged to advertise Explicit or Implicit null labels. +// SetEnableFixedLabel sets the bool value in the RsvpLspIpv4InterfaceP2PEgressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) SetEnableFixedLabel(value bool) RsvpLspIpv4InterfaceP2PEgressIpv4Lsp { + + obj.obj.EnableFixedLabel = &value + return obj +} + +// The fixed label value as advertised by egress in RESV message. Applicable only if 'fixed_label' is set to 'true'. Special values are '0 - IPv4 Explicit NULL', '2 - IPv6 Explicit NULL' and '3 - Implicit NULL'. Outside of this, labels are expected to have a minimum value of 16. +// FixedLabelValue returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) FixedLabelValue() uint32 { + + return *obj.obj.FixedLabelValue + +} + +// The fixed label value as advertised by egress in RESV message. Applicable only if 'fixed_label' is set to 'true'. Special values are '0 - IPv4 Explicit NULL', '2 - IPv6 Explicit NULL' and '3 - Implicit NULL'. Outside of this, labels are expected to have a minimum value of 16. +// FixedLabelValue returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) HasFixedLabelValue() bool { + return obj.obj.FixedLabelValue != nil +} + +// The fixed label value as advertised by egress in RESV message. Applicable only if 'fixed_label' is set to 'true'. Special values are '0 - IPv4 Explicit NULL', '2 - IPv6 Explicit NULL' and '3 - Implicit NULL'. Outside of this, labels are expected to have a minimum value of 16. +// SetFixedLabelValue sets the uint32 value in the RsvpLspIpv4InterfaceP2PEgressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) SetFixedLabelValue(value uint32) RsvpLspIpv4InterfaceP2PEgressIpv4Lsp { + + obj.obj.FixedLabelValue = &value + return obj +} + +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface RsvpLspIpv4InterfaceP2PEgressIpv4Lsp") + } + + if obj.obj.RefreshInterval != nil { + + if *obj.obj.RefreshInterval > 3600 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.RefreshInterval <= 3600 but Got %d", *obj.obj.RefreshInterval)) + } + + } + + if obj.obj.TimeoutMultiplier != nil { + + if *obj.obj.TimeoutMultiplier > 10 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.TimeoutMultiplier <= 10 but Got %d", *obj.obj.TimeoutMultiplier)) + } + + } + + if obj.obj.FixedLabelValue != nil { + + if *obj.obj.FixedLabelValue > 1048575 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.FixedLabelValue <= 1048575 but Got %d", *obj.obj.FixedLabelValue)) + } + + } + +} + +func (obj *rsvpLspIpv4InterfaceP2PEgressIpv4Lsp) setDefault() { + if obj.obj.RefreshInterval == nil { + obj.SetRefreshInterval(30) + } + if obj.obj.TimeoutMultiplier == nil { + obj.SetTimeoutMultiplier(3) + } + if obj.obj.ReservationStyle == nil { + obj.SetReservationStyle(RsvpLspIpv4InterfaceP2PEgressIpv4LspReservationStyle.SHARED_EXPLICIT) + + } + if obj.obj.EnableFixedLabel == nil { + obj.SetEnableFixedLabel(false) + } + if obj.obj.FixedLabelValue == nil { + obj.SetFixedLabelValue(0) + } + +} diff --git a/gosnappi/rsvp_lsp_ipv4_interface_p2p_ingress_ipv4_lsp.go b/gosnappi/rsvp_lsp_ipv4_interface_p2p_ingress_ipv4_lsp.go new file mode 100644 index 00000000..cda29704 --- /dev/null +++ b/gosnappi/rsvp_lsp_ipv4_interface_p2p_ingress_ipv4_lsp.go @@ -0,0 +1,767 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpLspIpv4InterfaceP2PIngressIpv4Lsp ***** +type rsvpLspIpv4InterfaceP2PIngressIpv4Lsp struct { + validation + obj *otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + marshaller marshalRsvpLspIpv4InterfaceP2PIngressIpv4Lsp + unMarshaller unMarshalRsvpLspIpv4InterfaceP2PIngressIpv4Lsp + sessionAttributeHolder RsvpSessionAttribute + tspecHolder RsvpTspec + fastRerouteHolder RsvpFastReroute + eroHolder RsvpEro +} + +func NewRsvpLspIpv4InterfaceP2PIngressIpv4Lsp() RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + obj := rsvpLspIpv4InterfaceP2PIngressIpv4Lsp{obj: &otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) msg() *otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + return obj.obj +} + +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) setMsg(msg *otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpLspIpv4InterfaceP2PIngressIpv4Lsp struct { + obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp +} + +type marshalRsvpLspIpv4InterfaceP2PIngressIpv4Lsp interface { + // ToProto marshals RsvpLspIpv4InterfaceP2PIngressIpv4Lsp to protobuf object *otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + ToProto() (*otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp, error) + // ToPbText marshals RsvpLspIpv4InterfaceP2PIngressIpv4Lsp to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpLspIpv4InterfaceP2PIngressIpv4Lsp to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpLspIpv4InterfaceP2PIngressIpv4Lsp to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpLspIpv4InterfaceP2PIngressIpv4Lsp struct { + obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp +} + +type unMarshalRsvpLspIpv4InterfaceP2PIngressIpv4Lsp interface { + // FromProto unmarshals RsvpLspIpv4InterfaceP2PIngressIpv4Lsp from protobuf object *otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + FromProto(msg *otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) (RsvpLspIpv4InterfaceP2PIngressIpv4Lsp, error) + // FromPbText unmarshals RsvpLspIpv4InterfaceP2PIngressIpv4Lsp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpLspIpv4InterfaceP2PIngressIpv4Lsp from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpLspIpv4InterfaceP2PIngressIpv4Lsp from JSON text + FromJson(value string) error +} + +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) Marshal() marshalRsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpLspIpv4InterfaceP2PIngressIpv4Lsp{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) Unmarshal() unMarshalRsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpLspIpv4InterfaceP2PIngressIpv4Lsp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpLspIpv4InterfaceP2PIngressIpv4Lsp) ToProto() (*otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpLspIpv4InterfaceP2PIngressIpv4Lsp) FromProto(msg *otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) (RsvpLspIpv4InterfaceP2PIngressIpv4Lsp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpLspIpv4InterfaceP2PIngressIpv4Lsp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpLspIpv4InterfaceP2PIngressIpv4Lsp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpLspIpv4InterfaceP2PIngressIpv4Lsp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspIpv4InterfaceP2PIngressIpv4Lsp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpLspIpv4InterfaceP2PIngressIpv4Lsp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspIpv4InterfaceP2PIngressIpv4Lsp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) Clone() (RsvpLspIpv4InterfaceP2PIngressIpv4Lsp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpLspIpv4InterfaceP2PIngressIpv4Lsp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) setNil() { + obj.sessionAttributeHolder = nil + obj.tspecHolder = nil + obj.fastRerouteHolder = nil + obj.eroHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// RsvpLspIpv4InterfaceP2PIngressIpv4Lsp is configuration for an RSVP Ingress point-to-point LSP. +type RsvpLspIpv4InterfaceP2PIngressIpv4Lsp interface { + Validation + // msg marshals RsvpLspIpv4InterfaceP2PIngressIpv4Lsp to protobuf object *otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // and doesn't set defaults + msg() *otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // setMsg unmarshals RsvpLspIpv4InterfaceP2PIngressIpv4Lsp from protobuf object *otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // and doesn't set defaults + setMsg(*otg.RsvpLspIpv4InterfaceP2PIngressIpv4Lsp) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // provides marshal interface + Marshal() marshalRsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // provides unmarshal interface + Unmarshal() unMarshalRsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // validate validates RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpLspIpv4InterfaceP2PIngressIpv4Lsp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + Name() string + // SetName assigns string provided by user to RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + SetName(value string) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // RemoteAddress returns string, set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + RemoteAddress() string + // SetRemoteAddress assigns string provided by user to RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + SetRemoteAddress(value string) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // TunnelId returns uint32, set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + TunnelId() uint32 + // SetTunnelId assigns uint32 provided by user to RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + SetTunnelId(value uint32) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // HasTunnelId checks if TunnelId has been set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + HasTunnelId() bool + // LspId returns uint32, set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + LspId() uint32 + // SetLspId assigns uint32 provided by user to RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + SetLspId(value uint32) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // HasLspId checks if LspId has been set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + HasLspId() bool + // RefreshInterval returns uint32, set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + RefreshInterval() uint32 + // SetRefreshInterval assigns uint32 provided by user to RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + SetRefreshInterval(value uint32) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // HasRefreshInterval checks if RefreshInterval has been set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + HasRefreshInterval() bool + // TimeoutMultiplier returns uint32, set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + TimeoutMultiplier() uint32 + // SetTimeoutMultiplier assigns uint32 provided by user to RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + SetTimeoutMultiplier(value uint32) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // HasTimeoutMultiplier checks if TimeoutMultiplier has been set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + HasTimeoutMultiplier() bool + // BackupLspId returns uint32, set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + BackupLspId() uint32 + // SetBackupLspId assigns uint32 provided by user to RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + SetBackupLspId(value uint32) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // HasBackupLspId checks if BackupLspId has been set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + HasBackupLspId() bool + // LspSwitchoverDelay returns uint32, set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + LspSwitchoverDelay() uint32 + // SetLspSwitchoverDelay assigns uint32 provided by user to RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + SetLspSwitchoverDelay(value uint32) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // HasLspSwitchoverDelay checks if LspSwitchoverDelay has been set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + HasLspSwitchoverDelay() bool + // SessionAttribute returns RsvpSessionAttribute, set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + // RsvpSessionAttribute is configuration for RSVP-TE SESSION_ATTRIBUTE object included in Path Messages as defined in RFC3209. The bandwidth_protection_desired and node_protection_desired flags are defined in RFC4090 (Fast Reroute). + SessionAttribute() RsvpSessionAttribute + // SetSessionAttribute assigns RsvpSessionAttribute provided by user to RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + // RsvpSessionAttribute is configuration for RSVP-TE SESSION_ATTRIBUTE object included in Path Messages as defined in RFC3209. The bandwidth_protection_desired and node_protection_desired flags are defined in RFC4090 (Fast Reroute). + SetSessionAttribute(value RsvpSessionAttribute) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // HasSessionAttribute checks if SessionAttribute has been set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + HasSessionAttribute() bool + // Tspec returns RsvpTspec, set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + // RsvpTspec is configuration for RSVP-TE TSPEC object included in Path Messages. The usage of these parameters is defined in RFC2215. + Tspec() RsvpTspec + // SetTspec assigns RsvpTspec provided by user to RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + // RsvpTspec is configuration for RSVP-TE TSPEC object included in Path Messages. The usage of these parameters is defined in RFC2215. + SetTspec(value RsvpTspec) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // HasTspec checks if Tspec has been set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + HasTspec() bool + // FastReroute returns RsvpFastReroute, set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + // RsvpFastReroute is configuration for the optional RSVP-TE FAST_REROUTE object included in Path Messages as defined in RFC4090. + FastReroute() RsvpFastReroute + // SetFastReroute assigns RsvpFastReroute provided by user to RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + // RsvpFastReroute is configuration for the optional RSVP-TE FAST_REROUTE object included in Path Messages as defined in RFC4090. + SetFastReroute(value RsvpFastReroute) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // HasFastReroute checks if FastReroute has been set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + HasFastReroute() bool + // Ero returns RsvpEro, set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + // RsvpEro is configuration for the optional RSVP-TE explicit route object(ERO) object included in Path Messages. + Ero() RsvpEro + // SetEro assigns RsvpEro provided by user to RsvpLspIpv4InterfaceP2PIngressIpv4Lsp. + // RsvpEro is configuration for the optional RSVP-TE explicit route object(ERO) object included in Path Messages. + SetEro(value RsvpEro) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + // HasEro checks if Ero has been set in RsvpLspIpv4InterfaceP2PIngressIpv4Lsp + HasEro() bool + setNil() +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the RsvpLspIpv4InterfaceP2PIngressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) SetName(value string) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + + obj.obj.Name = &value + return obj +} + +// IPv4 address of the remote endpoint of the LSP. +// RemoteAddress returns a string +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) RemoteAddress() string { + + return *obj.obj.RemoteAddress + +} + +// IPv4 address of the remote endpoint of the LSP. +// SetRemoteAddress sets the string value in the RsvpLspIpv4InterfaceP2PIngressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) SetRemoteAddress(value string) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + + obj.obj.RemoteAddress = &value + return obj +} + +// The Tunnel ID of the RSVP LSP. Carried in the SESSION object in Path Messages. +// TunnelId returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) TunnelId() uint32 { + + return *obj.obj.TunnelId + +} + +// The Tunnel ID of the RSVP LSP. Carried in the SESSION object in Path Messages. +// TunnelId returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) HasTunnelId() bool { + return obj.obj.TunnelId != nil +} + +// The Tunnel ID of the RSVP LSP. Carried in the SESSION object in Path Messages. +// SetTunnelId sets the uint32 value in the RsvpLspIpv4InterfaceP2PIngressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) SetTunnelId(value uint32) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + + obj.obj.TunnelId = &value + return obj +} + +// The LSP ID of the RSVP LSP. Carried in the SENDER_TEMPLATE object in Path Messages. +// LspId returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) LspId() uint32 { + + return *obj.obj.LspId + +} + +// The LSP ID of the RSVP LSP. Carried in the SENDER_TEMPLATE object in Path Messages. +// LspId returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) HasLspId() bool { + return obj.obj.LspId != nil +} + +// The LSP ID of the RSVP LSP. Carried in the SENDER_TEMPLATE object in Path Messages. +// SetLspId sets the uint32 value in the RsvpLspIpv4InterfaceP2PIngressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) SetLspId(value uint32) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + + obj.obj.LspId = &value + return obj +} + +// The time in seconds between successive transmissions of PATH Refreshes. The actual refresh interval is jittered by upto 50%. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. +// RefreshInterval returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) RefreshInterval() uint32 { + + return *obj.obj.RefreshInterval + +} + +// The time in seconds between successive transmissions of PATH Refreshes. The actual refresh interval is jittered by upto 50%. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. +// RefreshInterval returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) HasRefreshInterval() bool { + return obj.obj.RefreshInterval != nil +} + +// The time in seconds between successive transmissions of PATH Refreshes. The actual refresh interval is jittered by upto 50%. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. +// SetRefreshInterval sets the uint32 value in the RsvpLspIpv4InterfaceP2PIngressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) SetRefreshInterval(value uint32) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + + obj.obj.RefreshInterval = &value + return obj +} + +// The number of missed RESV refreshes after which a recieving node should consider the LSP state to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. +// TimeoutMultiplier returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) TimeoutMultiplier() uint32 { + + return *obj.obj.TimeoutMultiplier + +} + +// The number of missed RESV refreshes after which a recieving node should consider the LSP state to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. +// TimeoutMultiplier returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) HasTimeoutMultiplier() bool { + return obj.obj.TimeoutMultiplier != nil +} + +// The number of missed RESV refreshes after which a recieving node should consider the LSP state to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. +// SetTimeoutMultiplier sets the uint32 value in the RsvpLspIpv4InterfaceP2PIngressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) SetTimeoutMultiplier(value uint32) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + + obj.obj.TimeoutMultiplier = &value + return obj +} + +// The LSP id that will be used when creating a Make-Before-Break LSP when the active LSP is using lsp_id. If the active LSP on which Make-Before-Break is being done is using the backup_lsp_id, the new LSP created will toggle to use the lsp_id instead. +// BackupLspId returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) BackupLspId() uint32 { + + return *obj.obj.BackupLspId + +} + +// The LSP id that will be used when creating a Make-Before-Break LSP when the active LSP is using lsp_id. If the active LSP on which Make-Before-Break is being done is using the backup_lsp_id, the new LSP created will toggle to use the lsp_id instead. +// BackupLspId returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) HasBackupLspId() bool { + return obj.obj.BackupLspId != nil +} + +// The LSP id that will be used when creating a Make-Before-Break LSP when the active LSP is using lsp_id. If the active LSP on which Make-Before-Break is being done is using the backup_lsp_id, the new LSP created will toggle to use the lsp_id instead. +// SetBackupLspId sets the uint32 value in the RsvpLspIpv4InterfaceP2PIngressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) SetBackupLspId(value uint32) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + + obj.obj.BackupLspId = &value + return obj +} + +// The amount of delay in milliseconds that an implementation should wait for before switching traffic to the new LSP created after a Make-Before-Break is done on an LSP. The default value is 0 which means to switch immediately. An implementation should support a minimum delay value of at least 50ms . There is no specification specified maximum value. Setting maximum allowed value to 1 minute. If a delay value is supplied which is lesser than the minimum delay value supported, a warning should be provided indicating that the minimum value of LSP switchover delay is automatically increased to the supported minimum value. This warning should be included in the list of warnings in the 'Response.Warning' attribute sent in the SetConfig 'Success' Response. +// LspSwitchoverDelay returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) LspSwitchoverDelay() uint32 { + + return *obj.obj.LspSwitchoverDelay + +} + +// The amount of delay in milliseconds that an implementation should wait for before switching traffic to the new LSP created after a Make-Before-Break is done on an LSP. The default value is 0 which means to switch immediately. An implementation should support a minimum delay value of at least 50ms . There is no specification specified maximum value. Setting maximum allowed value to 1 minute. If a delay value is supplied which is lesser than the minimum delay value supported, a warning should be provided indicating that the minimum value of LSP switchover delay is automatically increased to the supported minimum value. This warning should be included in the list of warnings in the 'Response.Warning' attribute sent in the SetConfig 'Success' Response. +// LspSwitchoverDelay returns a uint32 +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) HasLspSwitchoverDelay() bool { + return obj.obj.LspSwitchoverDelay != nil +} + +// The amount of delay in milliseconds that an implementation should wait for before switching traffic to the new LSP created after a Make-Before-Break is done on an LSP. The default value is 0 which means to switch immediately. An implementation should support a minimum delay value of at least 50ms . There is no specification specified maximum value. Setting maximum allowed value to 1 minute. If a delay value is supplied which is lesser than the minimum delay value supported, a warning should be provided indicating that the minimum value of LSP switchover delay is automatically increased to the supported minimum value. This warning should be included in the list of warnings in the 'Response.Warning' attribute sent in the SetConfig 'Success' Response. +// SetLspSwitchoverDelay sets the uint32 value in the RsvpLspIpv4InterfaceP2PIngressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) SetLspSwitchoverDelay(value uint32) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + + obj.obj.LspSwitchoverDelay = &value + return obj +} + +// This contains the values of the fields to be included in the SESSION_ATTRIBUTE object in the Path Message sent for the LSP. +// SessionAttribute returns a RsvpSessionAttribute +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) SessionAttribute() RsvpSessionAttribute { + if obj.obj.SessionAttribute == nil { + obj.obj.SessionAttribute = NewRsvpSessionAttribute().msg() + } + if obj.sessionAttributeHolder == nil { + obj.sessionAttributeHolder = &rsvpSessionAttribute{obj: obj.obj.SessionAttribute} + } + return obj.sessionAttributeHolder +} + +// This contains the values of the fields to be included in the SESSION_ATTRIBUTE object in the Path Message sent for the LSP. +// SessionAttribute returns a RsvpSessionAttribute +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) HasSessionAttribute() bool { + return obj.obj.SessionAttribute != nil +} + +// This contains the values of the fields to be included in the SESSION_ATTRIBUTE object in the Path Message sent for the LSP. +// SetSessionAttribute sets the RsvpSessionAttribute value in the RsvpLspIpv4InterfaceP2PIngressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) SetSessionAttribute(value RsvpSessionAttribute) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + + obj.sessionAttributeHolder = nil + obj.obj.SessionAttribute = value.msg() + + return obj +} + +// This contains the values of the fields to be included in the TSPEC object in the Path Message sent for the LSP. +// Tspec returns a RsvpTspec +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) Tspec() RsvpTspec { + if obj.obj.Tspec == nil { + obj.obj.Tspec = NewRsvpTspec().msg() + } + if obj.tspecHolder == nil { + obj.tspecHolder = &rsvpTspec{obj: obj.obj.Tspec} + } + return obj.tspecHolder +} + +// This contains the values of the fields to be included in the TSPEC object in the Path Message sent for the LSP. +// Tspec returns a RsvpTspec +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) HasTspec() bool { + return obj.obj.Tspec != nil +} + +// This contains the values of the fields to be included in the TSPEC object in the Path Message sent for the LSP. +// SetTspec sets the RsvpTspec value in the RsvpLspIpv4InterfaceP2PIngressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) SetTspec(value RsvpTspec) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + + obj.tspecHolder = nil + obj.obj.Tspec = value.msg() + + return obj +} + +// This contains the values of the fields to be included in the FAST_REROUTE object in the Path Message sent for the LSP. +// This is an optional object . If this attribute is not included , the FAST_REROUTE object will not be included. +// FastReroute returns a RsvpFastReroute +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) FastReroute() RsvpFastReroute { + if obj.obj.FastReroute == nil { + obj.obj.FastReroute = NewRsvpFastReroute().msg() + } + if obj.fastRerouteHolder == nil { + obj.fastRerouteHolder = &rsvpFastReroute{obj: obj.obj.FastReroute} + } + return obj.fastRerouteHolder +} + +// This contains the values of the fields to be included in the FAST_REROUTE object in the Path Message sent for the LSP. +// This is an optional object . If this attribute is not included , the FAST_REROUTE object will not be included. +// FastReroute returns a RsvpFastReroute +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) HasFastReroute() bool { + return obj.obj.FastReroute != nil +} + +// This contains the values of the fields to be included in the FAST_REROUTE object in the Path Message sent for the LSP. +// This is an optional object . If this attribute is not included , the FAST_REROUTE object will not be included. +// SetFastReroute sets the RsvpFastReroute value in the RsvpLspIpv4InterfaceP2PIngressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) SetFastReroute(value RsvpFastReroute) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + + obj.fastRerouteHolder = nil + obj.obj.FastReroute = value.msg() + + return obj +} + +// This contains the values of the fields to be included in the ERO object in the Path Message sent for the LSP. +// This is an optional object . If this attribute is not included , the ERO object will not be included. +// Ero returns a RsvpEro +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) Ero() RsvpEro { + if obj.obj.Ero == nil { + obj.obj.Ero = NewRsvpEro().msg() + } + if obj.eroHolder == nil { + obj.eroHolder = &rsvpEro{obj: obj.obj.Ero} + } + return obj.eroHolder +} + +// This contains the values of the fields to be included in the ERO object in the Path Message sent for the LSP. +// This is an optional object . If this attribute is not included , the ERO object will not be included. +// Ero returns a RsvpEro +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) HasEro() bool { + return obj.obj.Ero != nil +} + +// This contains the values of the fields to be included in the ERO object in the Path Message sent for the LSP. +// This is an optional object . If this attribute is not included , the ERO object will not be included. +// SetEro sets the RsvpEro value in the RsvpLspIpv4InterfaceP2PIngressIpv4Lsp object +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) SetEro(value RsvpEro) RsvpLspIpv4InterfaceP2PIngressIpv4Lsp { + + obj.eroHolder = nil + obj.obj.Ero = value.msg() + + return obj +} + +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface RsvpLspIpv4InterfaceP2PIngressIpv4Lsp") + } + + // RemoteAddress is required + if obj.obj.RemoteAddress == nil { + vObj.validationErrors = append(vObj.validationErrors, "RemoteAddress is required field on interface RsvpLspIpv4InterfaceP2PIngressIpv4Lsp") + } + if obj.obj.RemoteAddress != nil { + + err := obj.validateIpv4(obj.RemoteAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.RemoteAddress")) + } + + } + + if obj.obj.TunnelId != nil { + + if *obj.obj.TunnelId < 1 || *obj.obj.TunnelId > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.TunnelId <= 65535 but Got %d", *obj.obj.TunnelId)) + } + + } + + if obj.obj.LspId != nil { + + if *obj.obj.LspId < 1 || *obj.obj.LspId > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.LspId <= 65535 but Got %d", *obj.obj.LspId)) + } + + } + + if obj.obj.RefreshInterval != nil { + + if *obj.obj.RefreshInterval < 1 || *obj.obj.RefreshInterval > 3600 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.RefreshInterval <= 3600 but Got %d", *obj.obj.RefreshInterval)) + } + + } + + if obj.obj.TimeoutMultiplier != nil { + + if *obj.obj.TimeoutMultiplier < 1 || *obj.obj.TimeoutMultiplier > 10 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.TimeoutMultiplier <= 10 but Got %d", *obj.obj.TimeoutMultiplier)) + } + + } + + if obj.obj.BackupLspId != nil { + + if *obj.obj.BackupLspId < 1 || *obj.obj.BackupLspId > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.BackupLspId <= 65535 but Got %d", *obj.obj.BackupLspId)) + } + + } + + if obj.obj.LspSwitchoverDelay != nil { + + if *obj.obj.LspSwitchoverDelay > 60000 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpLspIpv4InterfaceP2PIngressIpv4Lsp.LspSwitchoverDelay <= 60000 but Got %d", *obj.obj.LspSwitchoverDelay)) + } + + } + + if obj.obj.SessionAttribute != nil { + + obj.SessionAttribute().validateObj(vObj, set_default) + } + + if obj.obj.Tspec != nil { + + obj.Tspec().validateObj(vObj, set_default) + } + + if obj.obj.FastReroute != nil { + + obj.FastReroute().validateObj(vObj, set_default) + } + + if obj.obj.Ero != nil { + + obj.Ero().validateObj(vObj, set_default) + } + +} + +func (obj *rsvpLspIpv4InterfaceP2PIngressIpv4Lsp) setDefault() { + if obj.obj.TunnelId == nil { + obj.SetTunnelId(1) + } + if obj.obj.LspId == nil { + obj.SetLspId(1) + } + if obj.obj.RefreshInterval == nil { + obj.SetRefreshInterval(30) + } + if obj.obj.TimeoutMultiplier == nil { + obj.SetTimeoutMultiplier(3) + } + if obj.obj.BackupLspId == nil { + obj.SetBackupLspId(2) + } + if obj.obj.LspSwitchoverDelay == nil { + obj.SetLspSwitchoverDelay(0) + } + +} diff --git a/gosnappi/rsvp_lsp_ipv4_rro.go b/gosnappi/rsvp_lsp_ipv4_rro.go new file mode 100644 index 00000000..1d32a836 --- /dev/null +++ b/gosnappi/rsvp_lsp_ipv4_rro.go @@ -0,0 +1,343 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpLspIpv4Rro ***** +type rsvpLspIpv4Rro struct { + validation + obj *otg.RsvpLspIpv4Rro + marshaller marshalRsvpLspIpv4Rro + unMarshaller unMarshalRsvpLspIpv4Rro +} + +func NewRsvpLspIpv4Rro() RsvpLspIpv4Rro { + obj := rsvpLspIpv4Rro{obj: &otg.RsvpLspIpv4Rro{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpLspIpv4Rro) msg() *otg.RsvpLspIpv4Rro { + return obj.obj +} + +func (obj *rsvpLspIpv4Rro) setMsg(msg *otg.RsvpLspIpv4Rro) RsvpLspIpv4Rro { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpLspIpv4Rro struct { + obj *rsvpLspIpv4Rro +} + +type marshalRsvpLspIpv4Rro interface { + // ToProto marshals RsvpLspIpv4Rro to protobuf object *otg.RsvpLspIpv4Rro + ToProto() (*otg.RsvpLspIpv4Rro, error) + // ToPbText marshals RsvpLspIpv4Rro to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpLspIpv4Rro to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpLspIpv4Rro to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpLspIpv4Rro struct { + obj *rsvpLspIpv4Rro +} + +type unMarshalRsvpLspIpv4Rro interface { + // FromProto unmarshals RsvpLspIpv4Rro from protobuf object *otg.RsvpLspIpv4Rro + FromProto(msg *otg.RsvpLspIpv4Rro) (RsvpLspIpv4Rro, error) + // FromPbText unmarshals RsvpLspIpv4Rro from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpLspIpv4Rro from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpLspIpv4Rro from JSON text + FromJson(value string) error +} + +func (obj *rsvpLspIpv4Rro) Marshal() marshalRsvpLspIpv4Rro { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpLspIpv4Rro{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpLspIpv4Rro) Unmarshal() unMarshalRsvpLspIpv4Rro { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpLspIpv4Rro{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpLspIpv4Rro) ToProto() (*otg.RsvpLspIpv4Rro, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpLspIpv4Rro) FromProto(msg *otg.RsvpLspIpv4Rro) (RsvpLspIpv4Rro, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpLspIpv4Rro) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpLspIpv4Rro) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpLspIpv4Rro) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspIpv4Rro) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpLspIpv4Rro) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspIpv4Rro) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpLspIpv4Rro) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpLspIpv4Rro) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpLspIpv4Rro) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpLspIpv4Rro) Clone() (RsvpLspIpv4Rro, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpLspIpv4Rro() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// RsvpLspIpv4Rro is this contains the list of Record Route Object(RRO) objects associated with the traffic engineering tunnel. The Record Route Object(RRO) is used in RSVP-TE to record the route traversed by the LSP. The RRO might be present in both Path message and Resv message, the RRO stores the IP addresses of the routers that the traffic engineering tunnel traversed and also the label generated and distributed by the routers. The RROs in the Resv message mirrors that of the Path message, the only difference is that the RRO in a Resv message records the path information in the reverse direction. +type RsvpLspIpv4Rro interface { + Validation + // msg marshals RsvpLspIpv4Rro to protobuf object *otg.RsvpLspIpv4Rro + // and doesn't set defaults + msg() *otg.RsvpLspIpv4Rro + // setMsg unmarshals RsvpLspIpv4Rro from protobuf object *otg.RsvpLspIpv4Rro + // and doesn't set defaults + setMsg(*otg.RsvpLspIpv4Rro) RsvpLspIpv4Rro + // provides marshal interface + Marshal() marshalRsvpLspIpv4Rro + // provides unmarshal interface + Unmarshal() unMarshalRsvpLspIpv4Rro + // validate validates RsvpLspIpv4Rro + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpLspIpv4Rro, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Address returns string, set in RsvpLspIpv4Rro. + Address() string + // SetAddress assigns string provided by user to RsvpLspIpv4Rro + SetAddress(value string) RsvpLspIpv4Rro + // HasAddress checks if Address has been set in RsvpLspIpv4Rro + HasAddress() bool + // ReportedLabel returns uint32, set in RsvpLspIpv4Rro. + ReportedLabel() uint32 + // SetReportedLabel assigns uint32 provided by user to RsvpLspIpv4Rro + SetReportedLabel(value uint32) RsvpLspIpv4Rro + // HasReportedLabel checks if ReportedLabel has been set in RsvpLspIpv4Rro + HasReportedLabel() bool +} + +// The IPv4 addresses of the routers that the traffic engineering tunnel traversed. +// Address returns a string +func (obj *rsvpLspIpv4Rro) Address() string { + + return *obj.obj.Address + +} + +// The IPv4 addresses of the routers that the traffic engineering tunnel traversed. +// Address returns a string +func (obj *rsvpLspIpv4Rro) HasAddress() bool { + return obj.obj.Address != nil +} + +// The IPv4 addresses of the routers that the traffic engineering tunnel traversed. +// SetAddress sets the string value in the RsvpLspIpv4Rro object +func (obj *rsvpLspIpv4Rro) SetAddress(value string) RsvpLspIpv4Rro { + + obj.obj.Address = &value + return obj +} + +// Label reported for RRO hop. When the Label_Recording flag is set in the Session Attribute object, nodes doing route recording should include the Label Record subobject containing the reported label. +// ReportedLabel returns a uint32 +func (obj *rsvpLspIpv4Rro) ReportedLabel() uint32 { + + return *obj.obj.ReportedLabel + +} + +// Label reported for RRO hop. When the Label_Recording flag is set in the Session Attribute object, nodes doing route recording should include the Label Record subobject containing the reported label. +// ReportedLabel returns a uint32 +func (obj *rsvpLspIpv4Rro) HasReportedLabel() bool { + return obj.obj.ReportedLabel != nil +} + +// Label reported for RRO hop. When the Label_Recording flag is set in the Session Attribute object, nodes doing route recording should include the Label Record subobject containing the reported label. +// SetReportedLabel sets the uint32 value in the RsvpLspIpv4Rro object +func (obj *rsvpLspIpv4Rro) SetReportedLabel(value uint32) RsvpLspIpv4Rro { + + obj.obj.ReportedLabel = &value + return obj +} + +func (obj *rsvpLspIpv4Rro) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Address != nil { + + err := obj.validateIpv4(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on RsvpLspIpv4Rro.Address")) + } + + } + +} + +func (obj *rsvpLspIpv4Rro) setDefault() { + +} diff --git a/gosnappi/rsvp_lsp_state.go b/gosnappi/rsvp_lsp_state.go new file mode 100644 index 00000000..ef48dd0c --- /dev/null +++ b/gosnappi/rsvp_lsp_state.go @@ -0,0 +1,528 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpLspState ***** +type rsvpLspState struct { + validation + obj *otg.RsvpLspState + marshaller marshalRsvpLspState + unMarshaller unMarshalRsvpLspState +} + +func NewRsvpLspState() RsvpLspState { + obj := rsvpLspState{obj: &otg.RsvpLspState{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpLspState) msg() *otg.RsvpLspState { + return obj.obj +} + +func (obj *rsvpLspState) setMsg(msg *otg.RsvpLspState) RsvpLspState { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpLspState struct { + obj *rsvpLspState +} + +type marshalRsvpLspState interface { + // ToProto marshals RsvpLspState to protobuf object *otg.RsvpLspState + ToProto() (*otg.RsvpLspState, error) + // ToPbText marshals RsvpLspState to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpLspState to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpLspState to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpLspState struct { + obj *rsvpLspState +} + +type unMarshalRsvpLspState interface { + // FromProto unmarshals RsvpLspState from protobuf object *otg.RsvpLspState + FromProto(msg *otg.RsvpLspState) (RsvpLspState, error) + // FromPbText unmarshals RsvpLspState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpLspState from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpLspState from JSON text + FromJson(value string) error +} + +func (obj *rsvpLspState) Marshal() marshalRsvpLspState { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpLspState{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpLspState) Unmarshal() unMarshalRsvpLspState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpLspState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpLspState) ToProto() (*otg.RsvpLspState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpLspState) FromProto(msg *otg.RsvpLspState) (RsvpLspState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpLspState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpLspState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpLspState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpLspState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpLspState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpLspState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpLspState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpLspState) Clone() (RsvpLspState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpLspState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// RsvpLspState is iPv4 RSVP-TE Discovered LSPs. +type RsvpLspState interface { + Validation + // msg marshals RsvpLspState to protobuf object *otg.RsvpLspState + // and doesn't set defaults + msg() *otg.RsvpLspState + // setMsg unmarshals RsvpLspState from protobuf object *otg.RsvpLspState + // and doesn't set defaults + setMsg(*otg.RsvpLspState) RsvpLspState + // provides marshal interface + Marshal() marshalRsvpLspState + // provides unmarshal interface + Unmarshal() unMarshalRsvpLspState + // validate validates RsvpLspState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpLspState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // TunnelId returns uint32, set in RsvpLspState. + TunnelId() uint32 + // SetTunnelId assigns uint32 provided by user to RsvpLspState + SetTunnelId(value uint32) RsvpLspState + // HasTunnelId checks if TunnelId has been set in RsvpLspState + HasTunnelId() bool + // LspId returns uint32, set in RsvpLspState. + LspId() uint32 + // SetLspId assigns uint32 provided by user to RsvpLspState + SetLspId(value uint32) RsvpLspState + // HasLspId checks if LspId has been set in RsvpLspState + HasLspId() bool + // SessionName returns string, set in RsvpLspState. + SessionName() string + // SetSessionName assigns string provided by user to RsvpLspState + SetSessionName(value string) RsvpLspState + // HasSessionName checks if SessionName has been set in RsvpLspState + HasSessionName() bool + // LabelIn returns uint32, set in RsvpLspState. + LabelIn() uint32 + // SetLabelIn assigns uint32 provided by user to RsvpLspState + SetLabelIn(value uint32) RsvpLspState + // HasLabelIn checks if LabelIn has been set in RsvpLspState + HasLabelIn() bool + // LabelOut returns uint32, set in RsvpLspState. + LabelOut() uint32 + // SetLabelOut assigns uint32 provided by user to RsvpLspState + SetLabelOut(value uint32) RsvpLspState + // HasLabelOut checks if LabelOut has been set in RsvpLspState + HasLabelOut() bool + // SessionStatus returns RsvpLspStateSessionStatusEnum, set in RsvpLspState + SessionStatus() RsvpLspStateSessionStatusEnum + // SetSessionStatus assigns RsvpLspStateSessionStatusEnum provided by user to RsvpLspState + SetSessionStatus(value RsvpLspStateSessionStatusEnum) RsvpLspState + // HasSessionStatus checks if SessionStatus has been set in RsvpLspState + HasSessionStatus() bool + // LastFlapReason returns RsvpLspStateLastFlapReasonEnum, set in RsvpLspState + LastFlapReason() RsvpLspStateLastFlapReasonEnum + // SetLastFlapReason assigns RsvpLspStateLastFlapReasonEnum provided by user to RsvpLspState + SetLastFlapReason(value RsvpLspStateLastFlapReasonEnum) RsvpLspState + // HasLastFlapReason checks if LastFlapReason has been set in RsvpLspState + HasLastFlapReason() bool + // UpTime returns uint64, set in RsvpLspState. + UpTime() uint64 + // SetUpTime assigns uint64 provided by user to RsvpLspState + SetUpTime(value uint64) RsvpLspState + // HasUpTime checks if UpTime has been set in RsvpLspState + HasUpTime() bool +} + +// The tunnel id of RSVP session which acts as an identifier that remains constant over the life of the tunnel. +// TunnelId returns a uint32 +func (obj *rsvpLspState) TunnelId() uint32 { + + return *obj.obj.TunnelId + +} + +// The tunnel id of RSVP session which acts as an identifier that remains constant over the life of the tunnel. +// TunnelId returns a uint32 +func (obj *rsvpLspState) HasTunnelId() bool { + return obj.obj.TunnelId != nil +} + +// The tunnel id of RSVP session which acts as an identifier that remains constant over the life of the tunnel. +// SetTunnelId sets the uint32 value in the RsvpLspState object +func (obj *rsvpLspState) SetTunnelId(value uint32) RsvpLspState { + + obj.obj.TunnelId = &value + return obj +} + +// The lsp-id of RSVP session which acts as a differentiator for two lsps originating from the same headend, commonly used to distinguish RSVP sessions during make before break operations. +// LspId returns a uint32 +func (obj *rsvpLspState) LspId() uint32 { + + return *obj.obj.LspId + +} + +// The lsp-id of RSVP session which acts as a differentiator for two lsps originating from the same headend, commonly used to distinguish RSVP sessions during make before break operations. +// LspId returns a uint32 +func (obj *rsvpLspState) HasLspId() bool { + return obj.obj.LspId != nil +} + +// The lsp-id of RSVP session which acts as a differentiator for two lsps originating from the same headend, commonly used to distinguish RSVP sessions during make before break operations. +// SetLspId sets the uint32 value in the RsvpLspState object +func (obj *rsvpLspState) SetLspId(value uint32) RsvpLspState { + + obj.obj.LspId = &value + return obj +} + +// The value of RSVP-TE Session Name field of the Session Attribute object. +// SessionName returns a string +func (obj *rsvpLspState) SessionName() string { + + return *obj.obj.SessionName + +} + +// The value of RSVP-TE Session Name field of the Session Attribute object. +// SessionName returns a string +func (obj *rsvpLspState) HasSessionName() bool { + return obj.obj.SessionName != nil +} + +// The value of RSVP-TE Session Name field of the Session Attribute object. +// SetSessionName sets the string value in the RsvpLspState object +func (obj *rsvpLspState) SetSessionName(value string) RsvpLspState { + + obj.obj.SessionName = &value + return obj +} + +// The label received by RSVP-TE ingress. +// LabelIn returns a uint32 +func (obj *rsvpLspState) LabelIn() uint32 { + + return *obj.obj.LabelIn + +} + +// The label received by RSVP-TE ingress. +// LabelIn returns a uint32 +func (obj *rsvpLspState) HasLabelIn() bool { + return obj.obj.LabelIn != nil +} + +// The label received by RSVP-TE ingress. +// SetLabelIn sets the uint32 value in the RsvpLspState object +func (obj *rsvpLspState) SetLabelIn(value uint32) RsvpLspState { + + obj.obj.LabelIn = &value + return obj +} + +// The label assigned by RSVP-TE egress. +// LabelOut returns a uint32 +func (obj *rsvpLspState) LabelOut() uint32 { + + return *obj.obj.LabelOut + +} + +// The label assigned by RSVP-TE egress. +// LabelOut returns a uint32 +func (obj *rsvpLspState) HasLabelOut() bool { + return obj.obj.LabelOut != nil +} + +// The label assigned by RSVP-TE egress. +// SetLabelOut sets the uint32 value in the RsvpLspState object +func (obj *rsvpLspState) SetLabelOut(value uint32) RsvpLspState { + + obj.obj.LabelOut = &value + return obj +} + +type RsvpLspStateSessionStatusEnum string + +// Enum of SessionStatus on RsvpLspState +var RsvpLspStateSessionStatus = struct { + UP RsvpLspStateSessionStatusEnum + DOWN RsvpLspStateSessionStatusEnum +}{ + UP: RsvpLspStateSessionStatusEnum("up"), + DOWN: RsvpLspStateSessionStatusEnum("down"), +} + +func (obj *rsvpLspState) SessionStatus() RsvpLspStateSessionStatusEnum { + return RsvpLspStateSessionStatusEnum(obj.obj.SessionStatus.Enum().String()) +} + +// Operational state of the RSVP LSP. +// SessionStatus returns a string +func (obj *rsvpLspState) HasSessionStatus() bool { + return obj.obj.SessionStatus != nil +} + +func (obj *rsvpLspState) SetSessionStatus(value RsvpLspStateSessionStatusEnum) RsvpLspState { + intValue, ok := otg.RsvpLspState_SessionStatus_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on RsvpLspStateSessionStatusEnum", string(value))) + return obj + } + enumValue := otg.RsvpLspState_SessionStatus_Enum(intValue) + obj.obj.SessionStatus = &enumValue + + return obj +} + +type RsvpLspStateLastFlapReasonEnum string + +// Enum of LastFlapReason on RsvpLspState +var RsvpLspStateLastFlapReason = struct { + RESV_TEAR RsvpLspStateLastFlapReasonEnum + PATH_TEAR RsvpLspStateLastFlapReasonEnum + PATH_TIMEOUT RsvpLspStateLastFlapReasonEnum +}{ + RESV_TEAR: RsvpLspStateLastFlapReasonEnum("resv_tear"), + PATH_TEAR: RsvpLspStateLastFlapReasonEnum("path_tear"), + PATH_TIMEOUT: RsvpLspStateLastFlapReasonEnum("path_timeout"), +} + +func (obj *rsvpLspState) LastFlapReason() RsvpLspStateLastFlapReasonEnum { + return RsvpLspStateLastFlapReasonEnum(obj.obj.LastFlapReason.Enum().String()) +} + +// The reason for the last flap of this RSVP session. +// LastFlapReason returns a string +func (obj *rsvpLspState) HasLastFlapReason() bool { + return obj.obj.LastFlapReason != nil +} + +func (obj *rsvpLspState) SetLastFlapReason(value RsvpLspStateLastFlapReasonEnum) RsvpLspState { + intValue, ok := otg.RsvpLspState_LastFlapReason_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on RsvpLspStateLastFlapReasonEnum", string(value))) + return obj + } + enumValue := otg.RsvpLspState_LastFlapReason_Enum(intValue) + obj.obj.LastFlapReason = &enumValue + + return obj +} + +// The tunnel UP time in milli seconds. If the tunnel is DOWN the UP time will be zero. +// UpTime returns a uint64 +func (obj *rsvpLspState) UpTime() uint64 { + + return *obj.obj.UpTime + +} + +// The tunnel UP time in milli seconds. If the tunnel is DOWN the UP time will be zero. +// UpTime returns a uint64 +func (obj *rsvpLspState) HasUpTime() bool { + return obj.obj.UpTime != nil +} + +// The tunnel UP time in milli seconds. If the tunnel is DOWN the UP time will be zero. +// SetUpTime sets the uint64 value in the RsvpLspState object +func (obj *rsvpLspState) SetUpTime(value uint64) RsvpLspState { + + obj.obj.UpTime = &value + return obj +} + +func (obj *rsvpLspState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *rsvpLspState) setDefault() { + +} diff --git a/gosnappi/rsvp_lsps_state.go b/gosnappi/rsvp_lsps_state.go new file mode 100644 index 00000000..6189adfb --- /dev/null +++ b/gosnappi/rsvp_lsps_state.go @@ -0,0 +1,418 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpLspsState ***** +type rsvpLspsState struct { + validation + obj *otg.RsvpLspsState + marshaller marshalRsvpLspsState + unMarshaller unMarshalRsvpLspsState + ipv4LspsHolder RsvpLspsStateRsvpIPv4LspStateIter +} + +func NewRsvpLspsState() RsvpLspsState { + obj := rsvpLspsState{obj: &otg.RsvpLspsState{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpLspsState) msg() *otg.RsvpLspsState { + return obj.obj +} + +func (obj *rsvpLspsState) setMsg(msg *otg.RsvpLspsState) RsvpLspsState { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpLspsState struct { + obj *rsvpLspsState +} + +type marshalRsvpLspsState interface { + // ToProto marshals RsvpLspsState to protobuf object *otg.RsvpLspsState + ToProto() (*otg.RsvpLspsState, error) + // ToPbText marshals RsvpLspsState to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpLspsState to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpLspsState to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpLspsState struct { + obj *rsvpLspsState +} + +type unMarshalRsvpLspsState interface { + // FromProto unmarshals RsvpLspsState from protobuf object *otg.RsvpLspsState + FromProto(msg *otg.RsvpLspsState) (RsvpLspsState, error) + // FromPbText unmarshals RsvpLspsState from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpLspsState from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpLspsState from JSON text + FromJson(value string) error +} + +func (obj *rsvpLspsState) Marshal() marshalRsvpLspsState { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpLspsState{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpLspsState) Unmarshal() unMarshalRsvpLspsState { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpLspsState{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpLspsState) ToProto() (*otg.RsvpLspsState, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpLspsState) FromProto(msg *otg.RsvpLspsState) (RsvpLspsState, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpLspsState) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpLspsState) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpLspsState) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspsState) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpLspsState) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspsState) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpLspsState) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpLspsState) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpLspsState) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpLspsState) Clone() (RsvpLspsState, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpLspsState() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *rsvpLspsState) setNil() { + obj.ipv4LspsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// RsvpLspsState is discovered IPv4 Point-to-Point LSPs of a RSVP-TE router. +type RsvpLspsState interface { + Validation + // msg marshals RsvpLspsState to protobuf object *otg.RsvpLspsState + // and doesn't set defaults + msg() *otg.RsvpLspsState + // setMsg unmarshals RsvpLspsState from protobuf object *otg.RsvpLspsState + // and doesn't set defaults + setMsg(*otg.RsvpLspsState) RsvpLspsState + // provides marshal interface + Marshal() marshalRsvpLspsState + // provides unmarshal interface + Unmarshal() unMarshalRsvpLspsState + // validate validates RsvpLspsState + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpLspsState, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RsvpRouterName returns string, set in RsvpLspsState. + RsvpRouterName() string + // SetRsvpRouterName assigns string provided by user to RsvpLspsState + SetRsvpRouterName(value string) RsvpLspsState + // HasRsvpRouterName checks if RsvpRouterName has been set in RsvpLspsState + HasRsvpRouterName() bool + // Ipv4Lsps returns RsvpLspsStateRsvpIPv4LspStateIterIter, set in RsvpLspsState + Ipv4Lsps() RsvpLspsStateRsvpIPv4LspStateIter + setNil() +} + +// The name of the RSVP-TE Router. +// RsvpRouterName returns a string +func (obj *rsvpLspsState) RsvpRouterName() string { + + return *obj.obj.RsvpRouterName + +} + +// The name of the RSVP-TE Router. +// RsvpRouterName returns a string +func (obj *rsvpLspsState) HasRsvpRouterName() bool { + return obj.obj.RsvpRouterName != nil +} + +// The name of the RSVP-TE Router. +// SetRsvpRouterName sets the string value in the RsvpLspsState object +func (obj *rsvpLspsState) SetRsvpRouterName(value string) RsvpLspsState { + + obj.obj.RsvpRouterName = &value + return obj +} + +// IPv4 Point-to-Point RSVP-TE Discovered LSPs. +// Ipv4Lsps returns a []RsvpIPv4LspState +func (obj *rsvpLspsState) Ipv4Lsps() RsvpLspsStateRsvpIPv4LspStateIter { + if len(obj.obj.Ipv4Lsps) == 0 { + obj.obj.Ipv4Lsps = []*otg.RsvpIPv4LspState{} + } + if obj.ipv4LspsHolder == nil { + obj.ipv4LspsHolder = newRsvpLspsStateRsvpIPv4LspStateIter(&obj.obj.Ipv4Lsps).setMsg(obj) + } + return obj.ipv4LspsHolder +} + +type rsvpLspsStateRsvpIPv4LspStateIter struct { + obj *rsvpLspsState + rsvpIPv4LspStateSlice []RsvpIPv4LspState + fieldPtr *[]*otg.RsvpIPv4LspState +} + +func newRsvpLspsStateRsvpIPv4LspStateIter(ptr *[]*otg.RsvpIPv4LspState) RsvpLspsStateRsvpIPv4LspStateIter { + return &rsvpLspsStateRsvpIPv4LspStateIter{fieldPtr: ptr} +} + +type RsvpLspsStateRsvpIPv4LspStateIter interface { + setMsg(*rsvpLspsState) RsvpLspsStateRsvpIPv4LspStateIter + Items() []RsvpIPv4LspState + Add() RsvpIPv4LspState + Append(items ...RsvpIPv4LspState) RsvpLspsStateRsvpIPv4LspStateIter + Set(index int, newObj RsvpIPv4LspState) RsvpLspsStateRsvpIPv4LspStateIter + Clear() RsvpLspsStateRsvpIPv4LspStateIter + clearHolderSlice() RsvpLspsStateRsvpIPv4LspStateIter + appendHolderSlice(item RsvpIPv4LspState) RsvpLspsStateRsvpIPv4LspStateIter +} + +func (obj *rsvpLspsStateRsvpIPv4LspStateIter) setMsg(msg *rsvpLspsState) RsvpLspsStateRsvpIPv4LspStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&rsvpIPv4LspState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *rsvpLspsStateRsvpIPv4LspStateIter) Items() []RsvpIPv4LspState { + return obj.rsvpIPv4LspStateSlice +} + +func (obj *rsvpLspsStateRsvpIPv4LspStateIter) Add() RsvpIPv4LspState { + newObj := &otg.RsvpIPv4LspState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &rsvpIPv4LspState{obj: newObj} + newLibObj.setDefault() + obj.rsvpIPv4LspStateSlice = append(obj.rsvpIPv4LspStateSlice, newLibObj) + return newLibObj +} + +func (obj *rsvpLspsStateRsvpIPv4LspStateIter) Append(items ...RsvpIPv4LspState) RsvpLspsStateRsvpIPv4LspStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.rsvpIPv4LspStateSlice = append(obj.rsvpIPv4LspStateSlice, item) + } + return obj +} + +func (obj *rsvpLspsStateRsvpIPv4LspStateIter) Set(index int, newObj RsvpIPv4LspState) RsvpLspsStateRsvpIPv4LspStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.rsvpIPv4LspStateSlice[index] = newObj + return obj +} +func (obj *rsvpLspsStateRsvpIPv4LspStateIter) Clear() RsvpLspsStateRsvpIPv4LspStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.RsvpIPv4LspState{} + obj.rsvpIPv4LspStateSlice = []RsvpIPv4LspState{} + } + return obj +} +func (obj *rsvpLspsStateRsvpIPv4LspStateIter) clearHolderSlice() RsvpLspsStateRsvpIPv4LspStateIter { + if len(obj.rsvpIPv4LspStateSlice) > 0 { + obj.rsvpIPv4LspStateSlice = []RsvpIPv4LspState{} + } + return obj +} +func (obj *rsvpLspsStateRsvpIPv4LspStateIter) appendHolderSlice(item RsvpIPv4LspState) RsvpLspsStateRsvpIPv4LspStateIter { + obj.rsvpIPv4LspStateSlice = append(obj.rsvpIPv4LspStateSlice, item) + return obj +} + +func (obj *rsvpLspsState) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Ipv4Lsps) != 0 { + + if set_default { + obj.Ipv4Lsps().clearHolderSlice() + for _, item := range obj.obj.Ipv4Lsps { + obj.Ipv4Lsps().appendHolderSlice(&rsvpIPv4LspState{obj: item}) + } + } + for _, item := range obj.Ipv4Lsps().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *rsvpLspsState) setDefault() { + +} diff --git a/gosnappi/rsvp_lsps_state_request.go b/gosnappi/rsvp_lsps_state_request.go new file mode 100644 index 00000000..99828c9c --- /dev/null +++ b/gosnappi/rsvp_lsps_state_request.go @@ -0,0 +1,317 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpLspsStateRequest ***** +type rsvpLspsStateRequest struct { + validation + obj *otg.RsvpLspsStateRequest + marshaller marshalRsvpLspsStateRequest + unMarshaller unMarshalRsvpLspsStateRequest +} + +func NewRsvpLspsStateRequest() RsvpLspsStateRequest { + obj := rsvpLspsStateRequest{obj: &otg.RsvpLspsStateRequest{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpLspsStateRequest) msg() *otg.RsvpLspsStateRequest { + return obj.obj +} + +func (obj *rsvpLspsStateRequest) setMsg(msg *otg.RsvpLspsStateRequest) RsvpLspsStateRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpLspsStateRequest struct { + obj *rsvpLspsStateRequest +} + +type marshalRsvpLspsStateRequest interface { + // ToProto marshals RsvpLspsStateRequest to protobuf object *otg.RsvpLspsStateRequest + ToProto() (*otg.RsvpLspsStateRequest, error) + // ToPbText marshals RsvpLspsStateRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpLspsStateRequest to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpLspsStateRequest to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpLspsStateRequest struct { + obj *rsvpLspsStateRequest +} + +type unMarshalRsvpLspsStateRequest interface { + // FromProto unmarshals RsvpLspsStateRequest from protobuf object *otg.RsvpLspsStateRequest + FromProto(msg *otg.RsvpLspsStateRequest) (RsvpLspsStateRequest, error) + // FromPbText unmarshals RsvpLspsStateRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpLspsStateRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpLspsStateRequest from JSON text + FromJson(value string) error +} + +func (obj *rsvpLspsStateRequest) Marshal() marshalRsvpLspsStateRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpLspsStateRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpLspsStateRequest) Unmarshal() unMarshalRsvpLspsStateRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpLspsStateRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpLspsStateRequest) ToProto() (*otg.RsvpLspsStateRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpLspsStateRequest) FromProto(msg *otg.RsvpLspsStateRequest) (RsvpLspsStateRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpLspsStateRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpLspsStateRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpLspsStateRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspsStateRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpLspsStateRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpLspsStateRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpLspsStateRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpLspsStateRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpLspsStateRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpLspsStateRequest) Clone() (RsvpLspsStateRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpLspsStateRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// RsvpLspsStateRequest is the request to retrieve RSVP Label Switched Path (LSP) information learned by the router. +type RsvpLspsStateRequest interface { + Validation + // msg marshals RsvpLspsStateRequest to protobuf object *otg.RsvpLspsStateRequest + // and doesn't set defaults + msg() *otg.RsvpLspsStateRequest + // setMsg unmarshals RsvpLspsStateRequest from protobuf object *otg.RsvpLspsStateRequest + // and doesn't set defaults + setMsg(*otg.RsvpLspsStateRequest) RsvpLspsStateRequest + // provides marshal interface + Marshal() marshalRsvpLspsStateRequest + // provides unmarshal interface + Unmarshal() unMarshalRsvpLspsStateRequest + // validate validates RsvpLspsStateRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpLspsStateRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RsvpRouterNames returns []string, set in RsvpLspsStateRequest. + RsvpRouterNames() []string + // SetRsvpRouterNames assigns []string provided by user to RsvpLspsStateRequest + SetRsvpRouterNames(value []string) RsvpLspsStateRequest +} + +// The names of RSVP-TE routers for which learned information is requested. An empty list will return results for all RSVP=TE routers. +// +// x-constraint: +// - /components/schemas/Device.Rsvp/properties/name +// +// x-constraint: +// - /components/schemas/Device.Rsvp/properties/name +// +// RsvpRouterNames returns a []string +func (obj *rsvpLspsStateRequest) RsvpRouterNames() []string { + if obj.obj.RsvpRouterNames == nil { + obj.obj.RsvpRouterNames = make([]string, 0) + } + return obj.obj.RsvpRouterNames +} + +// The names of RSVP-TE routers for which learned information is requested. An empty list will return results for all RSVP=TE routers. +// +// x-constraint: +// - /components/schemas/Device.Rsvp/properties/name +// +// x-constraint: +// - /components/schemas/Device.Rsvp/properties/name +// +// SetRsvpRouterNames sets the []string value in the RsvpLspsStateRequest object +func (obj *rsvpLspsStateRequest) SetRsvpRouterNames(value []string) RsvpLspsStateRequest { + + if obj.obj.RsvpRouterNames == nil { + obj.obj.RsvpRouterNames = make([]string, 0) + } + obj.obj.RsvpRouterNames = value + + return obj +} + +func (obj *rsvpLspsStateRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *rsvpLspsStateRequest) setDefault() { + +} diff --git a/gosnappi/rsvp_metric.go b/gosnappi/rsvp_metric.go new file mode 100644 index 00000000..3efc0753 --- /dev/null +++ b/gosnappi/rsvp_metric.go @@ -0,0 +1,1146 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpMetric ***** +type rsvpMetric struct { + validation + obj *otg.RsvpMetric + marshaller marshalRsvpMetric + unMarshaller unMarshalRsvpMetric +} + +func NewRsvpMetric() RsvpMetric { + obj := rsvpMetric{obj: &otg.RsvpMetric{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpMetric) msg() *otg.RsvpMetric { + return obj.obj +} + +func (obj *rsvpMetric) setMsg(msg *otg.RsvpMetric) RsvpMetric { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpMetric struct { + obj *rsvpMetric +} + +type marshalRsvpMetric interface { + // ToProto marshals RsvpMetric to protobuf object *otg.RsvpMetric + ToProto() (*otg.RsvpMetric, error) + // ToPbText marshals RsvpMetric to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpMetric to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpMetric to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpMetric struct { + obj *rsvpMetric +} + +type unMarshalRsvpMetric interface { + // FromProto unmarshals RsvpMetric from protobuf object *otg.RsvpMetric + FromProto(msg *otg.RsvpMetric) (RsvpMetric, error) + // FromPbText unmarshals RsvpMetric from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpMetric from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpMetric from JSON text + FromJson(value string) error +} + +func (obj *rsvpMetric) Marshal() marshalRsvpMetric { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpMetric{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpMetric) Unmarshal() unMarshalRsvpMetric { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpMetric{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpMetric) ToProto() (*otg.RsvpMetric, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpMetric) FromProto(msg *otg.RsvpMetric) (RsvpMetric, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpMetric) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpMetric) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpMetric) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpMetric) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpMetric) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpMetric) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpMetric) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpMetric) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpMetric) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpMetric) Clone() (RsvpMetric, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpMetric() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// RsvpMetric is rSVP-TE per router statistics information. +type RsvpMetric interface { + Validation + // msg marshals RsvpMetric to protobuf object *otg.RsvpMetric + // and doesn't set defaults + msg() *otg.RsvpMetric + // setMsg unmarshals RsvpMetric from protobuf object *otg.RsvpMetric + // and doesn't set defaults + setMsg(*otg.RsvpMetric) RsvpMetric + // provides marshal interface + Marshal() marshalRsvpMetric + // provides unmarshal interface + Unmarshal() unMarshalRsvpMetric + // validate validates RsvpMetric + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpMetric, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Name returns string, set in RsvpMetric. + Name() string + // SetName assigns string provided by user to RsvpMetric + SetName(value string) RsvpMetric + // HasName checks if Name has been set in RsvpMetric + HasName() bool + // IngressP2PLspsConfigured returns uint32, set in RsvpMetric. + IngressP2PLspsConfigured() uint32 + // SetIngressP2PLspsConfigured assigns uint32 provided by user to RsvpMetric + SetIngressP2PLspsConfigured(value uint32) RsvpMetric + // HasIngressP2PLspsConfigured checks if IngressP2PLspsConfigured has been set in RsvpMetric + HasIngressP2PLspsConfigured() bool + // IngressP2PLspsUp returns uint32, set in RsvpMetric. + IngressP2PLspsUp() uint32 + // SetIngressP2PLspsUp assigns uint32 provided by user to RsvpMetric + SetIngressP2PLspsUp(value uint32) RsvpMetric + // HasIngressP2PLspsUp checks if IngressP2PLspsUp has been set in RsvpMetric + HasIngressP2PLspsUp() bool + // EgressP2PLspsUp returns uint32, set in RsvpMetric. + EgressP2PLspsUp() uint32 + // SetEgressP2PLspsUp assigns uint32 provided by user to RsvpMetric + SetEgressP2PLspsUp(value uint32) RsvpMetric + // HasEgressP2PLspsUp checks if EgressP2PLspsUp has been set in RsvpMetric + HasEgressP2PLspsUp() bool + // LspFlapCount returns uint64, set in RsvpMetric. + LspFlapCount() uint64 + // SetLspFlapCount assigns uint64 provided by user to RsvpMetric + SetLspFlapCount(value uint64) RsvpMetric + // HasLspFlapCount checks if LspFlapCount has been set in RsvpMetric + HasLspFlapCount() bool + // PathsTx returns uint64, set in RsvpMetric. + PathsTx() uint64 + // SetPathsTx assigns uint64 provided by user to RsvpMetric + SetPathsTx(value uint64) RsvpMetric + // HasPathsTx checks if PathsTx has been set in RsvpMetric + HasPathsTx() bool + // PathsRx returns uint64, set in RsvpMetric. + PathsRx() uint64 + // SetPathsRx assigns uint64 provided by user to RsvpMetric + SetPathsRx(value uint64) RsvpMetric + // HasPathsRx checks if PathsRx has been set in RsvpMetric + HasPathsRx() bool + // ResvsTx returns uint64, set in RsvpMetric. + ResvsTx() uint64 + // SetResvsTx assigns uint64 provided by user to RsvpMetric + SetResvsTx(value uint64) RsvpMetric + // HasResvsTx checks if ResvsTx has been set in RsvpMetric + HasResvsTx() bool + // ResvsRx returns uint64, set in RsvpMetric. + ResvsRx() uint64 + // SetResvsRx assigns uint64 provided by user to RsvpMetric + SetResvsRx(value uint64) RsvpMetric + // HasResvsRx checks if ResvsRx has been set in RsvpMetric + HasResvsRx() bool + // PathTearsTx returns uint64, set in RsvpMetric. + PathTearsTx() uint64 + // SetPathTearsTx assigns uint64 provided by user to RsvpMetric + SetPathTearsTx(value uint64) RsvpMetric + // HasPathTearsTx checks if PathTearsTx has been set in RsvpMetric + HasPathTearsTx() bool + // PathTearsRx returns uint64, set in RsvpMetric. + PathTearsRx() uint64 + // SetPathTearsRx assigns uint64 provided by user to RsvpMetric + SetPathTearsRx(value uint64) RsvpMetric + // HasPathTearsRx checks if PathTearsRx has been set in RsvpMetric + HasPathTearsRx() bool + // ResvTearsTx returns uint64, set in RsvpMetric. + ResvTearsTx() uint64 + // SetResvTearsTx assigns uint64 provided by user to RsvpMetric + SetResvTearsTx(value uint64) RsvpMetric + // HasResvTearsTx checks if ResvTearsTx has been set in RsvpMetric + HasResvTearsTx() bool + // ResvTearsRx returns uint64, set in RsvpMetric. + ResvTearsRx() uint64 + // SetResvTearsRx assigns uint64 provided by user to RsvpMetric + SetResvTearsRx(value uint64) RsvpMetric + // HasResvTearsRx checks if ResvTearsRx has been set in RsvpMetric + HasResvTearsRx() bool + // PathErrorsTx returns uint64, set in RsvpMetric. + PathErrorsTx() uint64 + // SetPathErrorsTx assigns uint64 provided by user to RsvpMetric + SetPathErrorsTx(value uint64) RsvpMetric + // HasPathErrorsTx checks if PathErrorsTx has been set in RsvpMetric + HasPathErrorsTx() bool + // PathErrorsRx returns uint64, set in RsvpMetric. + PathErrorsRx() uint64 + // SetPathErrorsRx assigns uint64 provided by user to RsvpMetric + SetPathErrorsRx(value uint64) RsvpMetric + // HasPathErrorsRx checks if PathErrorsRx has been set in RsvpMetric + HasPathErrorsRx() bool + // ResvErrorsTx returns uint64, set in RsvpMetric. + ResvErrorsTx() uint64 + // SetResvErrorsTx assigns uint64 provided by user to RsvpMetric + SetResvErrorsTx(value uint64) RsvpMetric + // HasResvErrorsTx checks if ResvErrorsTx has been set in RsvpMetric + HasResvErrorsTx() bool + // ResvErrorsRx returns uint64, set in RsvpMetric. + ResvErrorsRx() uint64 + // SetResvErrorsRx assigns uint64 provided by user to RsvpMetric + SetResvErrorsRx(value uint64) RsvpMetric + // HasResvErrorsRx checks if ResvErrorsRx has been set in RsvpMetric + HasResvErrorsRx() bool + // ResvConfTx returns uint64, set in RsvpMetric. + ResvConfTx() uint64 + // SetResvConfTx assigns uint64 provided by user to RsvpMetric + SetResvConfTx(value uint64) RsvpMetric + // HasResvConfTx checks if ResvConfTx has been set in RsvpMetric + HasResvConfTx() bool + // ResvConfRx returns uint64, set in RsvpMetric. + ResvConfRx() uint64 + // SetResvConfRx assigns uint64 provided by user to RsvpMetric + SetResvConfRx(value uint64) RsvpMetric + // HasResvConfRx checks if ResvConfRx has been set in RsvpMetric + HasResvConfRx() bool + // HellosTx returns uint64, set in RsvpMetric. + HellosTx() uint64 + // SetHellosTx assigns uint64 provided by user to RsvpMetric + SetHellosTx(value uint64) RsvpMetric + // HasHellosTx checks if HellosTx has been set in RsvpMetric + HasHellosTx() bool + // HellosRx returns uint64, set in RsvpMetric. + HellosRx() uint64 + // SetHellosRx assigns uint64 provided by user to RsvpMetric + SetHellosRx(value uint64) RsvpMetric + // HasHellosRx checks if HellosRx has been set in RsvpMetric + HasHellosRx() bool + // AcksTx returns uint64, set in RsvpMetric. + AcksTx() uint64 + // SetAcksTx assigns uint64 provided by user to RsvpMetric + SetAcksTx(value uint64) RsvpMetric + // HasAcksTx checks if AcksTx has been set in RsvpMetric + HasAcksTx() bool + // AcksRx returns uint64, set in RsvpMetric. + AcksRx() uint64 + // SetAcksRx assigns uint64 provided by user to RsvpMetric + SetAcksRx(value uint64) RsvpMetric + // HasAcksRx checks if AcksRx has been set in RsvpMetric + HasAcksRx() bool + // NacksTx returns uint64, set in RsvpMetric. + NacksTx() uint64 + // SetNacksTx assigns uint64 provided by user to RsvpMetric + SetNacksTx(value uint64) RsvpMetric + // HasNacksTx checks if NacksTx has been set in RsvpMetric + HasNacksTx() bool + // NacksRx returns uint64, set in RsvpMetric. + NacksRx() uint64 + // SetNacksRx assigns uint64 provided by user to RsvpMetric + SetNacksRx(value uint64) RsvpMetric + // HasNacksRx checks if NacksRx has been set in RsvpMetric + HasNacksRx() bool + // SrefreshTx returns uint64, set in RsvpMetric. + SrefreshTx() uint64 + // SetSrefreshTx assigns uint64 provided by user to RsvpMetric + SetSrefreshTx(value uint64) RsvpMetric + // HasSrefreshTx checks if SrefreshTx has been set in RsvpMetric + HasSrefreshTx() bool + // SrefreshRx returns uint64, set in RsvpMetric. + SrefreshRx() uint64 + // SetSrefreshRx assigns uint64 provided by user to RsvpMetric + SetSrefreshRx(value uint64) RsvpMetric + // HasSrefreshRx checks if SrefreshRx has been set in RsvpMetric + HasSrefreshRx() bool + // BundleTx returns uint64, set in RsvpMetric. + BundleTx() uint64 + // SetBundleTx assigns uint64 provided by user to RsvpMetric + SetBundleTx(value uint64) RsvpMetric + // HasBundleTx checks if BundleTx has been set in RsvpMetric + HasBundleTx() bool + // BundleRx returns uint64, set in RsvpMetric. + BundleRx() uint64 + // SetBundleRx assigns uint64 provided by user to RsvpMetric + SetBundleRx(value uint64) RsvpMetric + // HasBundleRx checks if BundleRx has been set in RsvpMetric + HasBundleRx() bool + // PathReevaluationRequestTx returns uint64, set in RsvpMetric. + PathReevaluationRequestTx() uint64 + // SetPathReevaluationRequestTx assigns uint64 provided by user to RsvpMetric + SetPathReevaluationRequestTx(value uint64) RsvpMetric + // HasPathReevaluationRequestTx checks if PathReevaluationRequestTx has been set in RsvpMetric + HasPathReevaluationRequestTx() bool + // PathReoptimizations returns uint64, set in RsvpMetric. + PathReoptimizations() uint64 + // SetPathReoptimizations assigns uint64 provided by user to RsvpMetric + SetPathReoptimizations(value uint64) RsvpMetric + // HasPathReoptimizations checks if PathReoptimizations has been set in RsvpMetric + HasPathReoptimizations() bool +} + +// The name of a configured RSVP router. +// Name returns a string +func (obj *rsvpMetric) Name() string { + + return *obj.obj.Name + +} + +// The name of a configured RSVP router. +// Name returns a string +func (obj *rsvpMetric) HasName() bool { + return obj.obj.Name != nil +} + +// The name of a configured RSVP router. +// SetName sets the string value in the RsvpMetric object +func (obj *rsvpMetric) SetName(value string) RsvpMetric { + + obj.obj.Name = &value + return obj +} + +// The number of ingress point-to-point LSPs configured or transiting through the RSVP router which have been initated from the test port. +// IngressP2PLspsConfigured returns a uint32 +func (obj *rsvpMetric) IngressP2PLspsConfigured() uint32 { + + return *obj.obj.IngressP2PLspsConfigured + +} + +// The number of ingress point-to-point LSPs configured or transiting through the RSVP router which have been initated from the test port. +// IngressP2PLspsConfigured returns a uint32 +func (obj *rsvpMetric) HasIngressP2PLspsConfigured() bool { + return obj.obj.IngressP2PLspsConfigured != nil +} + +// The number of ingress point-to-point LSPs configured or transiting through the RSVP router which have been initated from the test port. +// SetIngressP2PLspsConfigured sets the uint32 value in the RsvpMetric object +func (obj *rsvpMetric) SetIngressP2PLspsConfigured(value uint32) RsvpMetric { + + obj.obj.IngressP2PLspsConfigured = &value + return obj +} + +// The number of ingress point-to-point LSPs for which Resv has been received and is currently up. +// IngressP2PLspsUp returns a uint32 +func (obj *rsvpMetric) IngressP2PLspsUp() uint32 { + + return *obj.obj.IngressP2PLspsUp + +} + +// The number of ingress point-to-point LSPs for which Resv has been received and is currently up. +// IngressP2PLspsUp returns a uint32 +func (obj *rsvpMetric) HasIngressP2PLspsUp() bool { + return obj.obj.IngressP2PLspsUp != nil +} + +// The number of ingress point-to-point LSPs for which Resv has been received and is currently up. +// SetIngressP2PLspsUp sets the uint32 value in the RsvpMetric object +func (obj *rsvpMetric) SetIngressP2PLspsUp(value uint32) RsvpMetric { + + obj.obj.IngressP2PLspsUp = &value + return obj +} + +// The number of egress point-to-point LSPs for which Path requests were successfully processed and is currently up. +// EgressP2PLspsUp returns a uint32 +func (obj *rsvpMetric) EgressP2PLspsUp() uint32 { + + return *obj.obj.EgressP2PLspsUp + +} + +// The number of egress point-to-point LSPs for which Path requests were successfully processed and is currently up. +// EgressP2PLspsUp returns a uint32 +func (obj *rsvpMetric) HasEgressP2PLspsUp() bool { + return obj.obj.EgressP2PLspsUp != nil +} + +// The number of egress point-to-point LSPs for which Path requests were successfully processed and is currently up. +// SetEgressP2PLspsUp sets the uint32 value in the RsvpMetric object +func (obj *rsvpMetric) SetEgressP2PLspsUp(value uint32) RsvpMetric { + + obj.obj.EgressP2PLspsUp = &value + return obj +} + +// The number of times an LSP went from up to down state either because it timed out while waiting for Refreshes or a PathTear or ResvTear message was received which caused the LSP to flap. +// LspFlapCount returns a uint64 +func (obj *rsvpMetric) LspFlapCount() uint64 { + + return *obj.obj.LspFlapCount + +} + +// The number of times an LSP went from up to down state either because it timed out while waiting for Refreshes or a PathTear or ResvTear message was received which caused the LSP to flap. +// LspFlapCount returns a uint64 +func (obj *rsvpMetric) HasLspFlapCount() bool { + return obj.obj.LspFlapCount != nil +} + +// The number of times an LSP went from up to down state either because it timed out while waiting for Refreshes or a PathTear or ResvTear message was received which caused the LSP to flap. +// SetLspFlapCount sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetLspFlapCount(value uint64) RsvpMetric { + + obj.obj.LspFlapCount = &value + return obj +} + +// The number of Path messages sent by this RSVP router. +// PathsTx returns a uint64 +func (obj *rsvpMetric) PathsTx() uint64 { + + return *obj.obj.PathsTx + +} + +// The number of Path messages sent by this RSVP router. +// PathsTx returns a uint64 +func (obj *rsvpMetric) HasPathsTx() bool { + return obj.obj.PathsTx != nil +} + +// The number of Path messages sent by this RSVP router. +// SetPathsTx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetPathsTx(value uint64) RsvpMetric { + + obj.obj.PathsTx = &value + return obj +} + +// The number of Path messages received by this RSVP router. +// PathsRx returns a uint64 +func (obj *rsvpMetric) PathsRx() uint64 { + + return *obj.obj.PathsRx + +} + +// The number of Path messages received by this RSVP router. +// PathsRx returns a uint64 +func (obj *rsvpMetric) HasPathsRx() bool { + return obj.obj.PathsRx != nil +} + +// The number of Path messages received by this RSVP router. +// SetPathsRx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetPathsRx(value uint64) RsvpMetric { + + obj.obj.PathsRx = &value + return obj +} + +// The number of Resv messages sent by this RSVP router. +// ResvsTx returns a uint64 +func (obj *rsvpMetric) ResvsTx() uint64 { + + return *obj.obj.ResvsTx + +} + +// The number of Resv messages sent by this RSVP router. +// ResvsTx returns a uint64 +func (obj *rsvpMetric) HasResvsTx() bool { + return obj.obj.ResvsTx != nil +} + +// The number of Resv messages sent by this RSVP router. +// SetResvsTx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetResvsTx(value uint64) RsvpMetric { + + obj.obj.ResvsTx = &value + return obj +} + +// The number of Resv messages received by this RSVP router. +// ResvsRx returns a uint64 +func (obj *rsvpMetric) ResvsRx() uint64 { + + return *obj.obj.ResvsRx + +} + +// The number of Resv messages received by this RSVP router. +// ResvsRx returns a uint64 +func (obj *rsvpMetric) HasResvsRx() bool { + return obj.obj.ResvsRx != nil +} + +// The number of Resv messages received by this RSVP router. +// SetResvsRx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetResvsRx(value uint64) RsvpMetric { + + obj.obj.ResvsRx = &value + return obj +} + +// The number of Path Tear messages sent by this RSVP router. +// PathTearsTx returns a uint64 +func (obj *rsvpMetric) PathTearsTx() uint64 { + + return *obj.obj.PathTearsTx + +} + +// The number of Path Tear messages sent by this RSVP router. +// PathTearsTx returns a uint64 +func (obj *rsvpMetric) HasPathTearsTx() bool { + return obj.obj.PathTearsTx != nil +} + +// The number of Path Tear messages sent by this RSVP router. +// SetPathTearsTx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetPathTearsTx(value uint64) RsvpMetric { + + obj.obj.PathTearsTx = &value + return obj +} + +// The number of Path Tear messages received by this RSVP router. +// PathTearsRx returns a uint64 +func (obj *rsvpMetric) PathTearsRx() uint64 { + + return *obj.obj.PathTearsRx + +} + +// The number of Path Tear messages received by this RSVP router. +// PathTearsRx returns a uint64 +func (obj *rsvpMetric) HasPathTearsRx() bool { + return obj.obj.PathTearsRx != nil +} + +// The number of Path Tear messages received by this RSVP router. +// SetPathTearsRx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetPathTearsRx(value uint64) RsvpMetric { + + obj.obj.PathTearsRx = &value + return obj +} + +// The number of Resv Tear messages sent by this RSVP router. +// ResvTearsTx returns a uint64 +func (obj *rsvpMetric) ResvTearsTx() uint64 { + + return *obj.obj.ResvTearsTx + +} + +// The number of Resv Tear messages sent by this RSVP router. +// ResvTearsTx returns a uint64 +func (obj *rsvpMetric) HasResvTearsTx() bool { + return obj.obj.ResvTearsTx != nil +} + +// The number of Resv Tear messages sent by this RSVP router. +// SetResvTearsTx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetResvTearsTx(value uint64) RsvpMetric { + + obj.obj.ResvTearsTx = &value + return obj +} + +// The number of Resv Tear messages received by this RSVP router. +// ResvTearsRx returns a uint64 +func (obj *rsvpMetric) ResvTearsRx() uint64 { + + return *obj.obj.ResvTearsRx + +} + +// The number of Resv Tear messages received by this RSVP router. +// ResvTearsRx returns a uint64 +func (obj *rsvpMetric) HasResvTearsRx() bool { + return obj.obj.ResvTearsRx != nil +} + +// The number of Resv Tear messages received by this RSVP router. +// SetResvTearsRx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetResvTearsRx(value uint64) RsvpMetric { + + obj.obj.ResvTearsRx = &value + return obj +} + +// The number of Path Error messages sent by this RSVP router. +// PathErrorsTx returns a uint64 +func (obj *rsvpMetric) PathErrorsTx() uint64 { + + return *obj.obj.PathErrorsTx + +} + +// The number of Path Error messages sent by this RSVP router. +// PathErrorsTx returns a uint64 +func (obj *rsvpMetric) HasPathErrorsTx() bool { + return obj.obj.PathErrorsTx != nil +} + +// The number of Path Error messages sent by this RSVP router. +// SetPathErrorsTx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetPathErrorsTx(value uint64) RsvpMetric { + + obj.obj.PathErrorsTx = &value + return obj +} + +// The number of Path Error messages received by this RSVP router. +// PathErrorsRx returns a uint64 +func (obj *rsvpMetric) PathErrorsRx() uint64 { + + return *obj.obj.PathErrorsRx + +} + +// The number of Path Error messages received by this RSVP router. +// PathErrorsRx returns a uint64 +func (obj *rsvpMetric) HasPathErrorsRx() bool { + return obj.obj.PathErrorsRx != nil +} + +// The number of Path Error messages received by this RSVP router. +// SetPathErrorsRx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetPathErrorsRx(value uint64) RsvpMetric { + + obj.obj.PathErrorsRx = &value + return obj +} + +// The number of Resv Error messages sent by this RSVP router. +// ResvErrorsTx returns a uint64 +func (obj *rsvpMetric) ResvErrorsTx() uint64 { + + return *obj.obj.ResvErrorsTx + +} + +// The number of Resv Error messages sent by this RSVP router. +// ResvErrorsTx returns a uint64 +func (obj *rsvpMetric) HasResvErrorsTx() bool { + return obj.obj.ResvErrorsTx != nil +} + +// The number of Resv Error messages sent by this RSVP router. +// SetResvErrorsTx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetResvErrorsTx(value uint64) RsvpMetric { + + obj.obj.ResvErrorsTx = &value + return obj +} + +// The number of Resv Error messages received by this RSVP router. +// ResvErrorsRx returns a uint64 +func (obj *rsvpMetric) ResvErrorsRx() uint64 { + + return *obj.obj.ResvErrorsRx + +} + +// The number of Resv Error messages received by this RSVP router. +// ResvErrorsRx returns a uint64 +func (obj *rsvpMetric) HasResvErrorsRx() bool { + return obj.obj.ResvErrorsRx != nil +} + +// The number of Resv Error messages received by this RSVP router. +// SetResvErrorsRx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetResvErrorsRx(value uint64) RsvpMetric { + + obj.obj.ResvErrorsRx = &value + return obj +} + +// The number of ResvConf messages sent by this RSVP router. +// ResvConfTx returns a uint64 +func (obj *rsvpMetric) ResvConfTx() uint64 { + + return *obj.obj.ResvConfTx + +} + +// The number of ResvConf messages sent by this RSVP router. +// ResvConfTx returns a uint64 +func (obj *rsvpMetric) HasResvConfTx() bool { + return obj.obj.ResvConfTx != nil +} + +// The number of ResvConf messages sent by this RSVP router. +// SetResvConfTx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetResvConfTx(value uint64) RsvpMetric { + + obj.obj.ResvConfTx = &value + return obj +} + +// The number of ResvConf messages received by this RSVP router. +// ResvConfRx returns a uint64 +func (obj *rsvpMetric) ResvConfRx() uint64 { + + return *obj.obj.ResvConfRx + +} + +// The number of ResvConf messages received by this RSVP router. +// ResvConfRx returns a uint64 +func (obj *rsvpMetric) HasResvConfRx() bool { + return obj.obj.ResvConfRx != nil +} + +// The number of ResvConf messages received by this RSVP router. +// SetResvConfRx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetResvConfRx(value uint64) RsvpMetric { + + obj.obj.ResvConfRx = &value + return obj +} + +// The number of Hello messages sent by this RSVP router. +// HellosTx returns a uint64 +func (obj *rsvpMetric) HellosTx() uint64 { + + return *obj.obj.HellosTx + +} + +// The number of Hello messages sent by this RSVP router. +// HellosTx returns a uint64 +func (obj *rsvpMetric) HasHellosTx() bool { + return obj.obj.HellosTx != nil +} + +// The number of Hello messages sent by this RSVP router. +// SetHellosTx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetHellosTx(value uint64) RsvpMetric { + + obj.obj.HellosTx = &value + return obj +} + +// The number of Hello messages received by this RSVP router. +// HellosRx returns a uint64 +func (obj *rsvpMetric) HellosRx() uint64 { + + return *obj.obj.HellosRx + +} + +// The number of Hello messages received by this RSVP router. +// HellosRx returns a uint64 +func (obj *rsvpMetric) HasHellosRx() bool { + return obj.obj.HellosRx != nil +} + +// The number of Hello messages received by this RSVP router. +// SetHellosRx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetHellosRx(value uint64) RsvpMetric { + + obj.obj.HellosRx = &value + return obj +} + +// The number of Ack messages sent by this RSVP router. +// AcksTx returns a uint64 +func (obj *rsvpMetric) AcksTx() uint64 { + + return *obj.obj.AcksTx + +} + +// The number of Ack messages sent by this RSVP router. +// AcksTx returns a uint64 +func (obj *rsvpMetric) HasAcksTx() bool { + return obj.obj.AcksTx != nil +} + +// The number of Ack messages sent by this RSVP router. +// SetAcksTx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetAcksTx(value uint64) RsvpMetric { + + obj.obj.AcksTx = &value + return obj +} + +// The number of Ack messages received by this RSVP router. +// AcksRx returns a uint64 +func (obj *rsvpMetric) AcksRx() uint64 { + + return *obj.obj.AcksRx + +} + +// The number of Ack messages received by this RSVP router. +// AcksRx returns a uint64 +func (obj *rsvpMetric) HasAcksRx() bool { + return obj.obj.AcksRx != nil +} + +// The number of Ack messages received by this RSVP router. +// SetAcksRx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetAcksRx(value uint64) RsvpMetric { + + obj.obj.AcksRx = &value + return obj +} + +// The number of Nack messages sent by this RSVP router. +// NacksTx returns a uint64 +func (obj *rsvpMetric) NacksTx() uint64 { + + return *obj.obj.NacksTx + +} + +// The number of Nack messages sent by this RSVP router. +// NacksTx returns a uint64 +func (obj *rsvpMetric) HasNacksTx() bool { + return obj.obj.NacksTx != nil +} + +// The number of Nack messages sent by this RSVP router. +// SetNacksTx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetNacksTx(value uint64) RsvpMetric { + + obj.obj.NacksTx = &value + return obj +} + +// The number of Nack messages received by this RSVP router. +// NacksRx returns a uint64 +func (obj *rsvpMetric) NacksRx() uint64 { + + return *obj.obj.NacksRx + +} + +// The number of Nack messages received by this RSVP router. +// NacksRx returns a uint64 +func (obj *rsvpMetric) HasNacksRx() bool { + return obj.obj.NacksRx != nil +} + +// The number of Nack messages received by this RSVP router. +// SetNacksRx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetNacksRx(value uint64) RsvpMetric { + + obj.obj.NacksRx = &value + return obj +} + +// The number of SRefresh messages sent by this RSVP router. +// SrefreshTx returns a uint64 +func (obj *rsvpMetric) SrefreshTx() uint64 { + + return *obj.obj.SrefreshTx + +} + +// The number of SRefresh messages sent by this RSVP router. +// SrefreshTx returns a uint64 +func (obj *rsvpMetric) HasSrefreshTx() bool { + return obj.obj.SrefreshTx != nil +} + +// The number of SRefresh messages sent by this RSVP router. +// SetSrefreshTx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetSrefreshTx(value uint64) RsvpMetric { + + obj.obj.SrefreshTx = &value + return obj +} + +// The number of SRefresh messages received by this RSVP router. +// SrefreshRx returns a uint64 +func (obj *rsvpMetric) SrefreshRx() uint64 { + + return *obj.obj.SrefreshRx + +} + +// The number of SRefresh messages received by this RSVP router. +// SrefreshRx returns a uint64 +func (obj *rsvpMetric) HasSrefreshRx() bool { + return obj.obj.SrefreshRx != nil +} + +// The number of SRefresh messages received by this RSVP router. +// SetSrefreshRx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetSrefreshRx(value uint64) RsvpMetric { + + obj.obj.SrefreshRx = &value + return obj +} + +// The number of Bundle messages sent by this RSVP router. +// BundleTx returns a uint64 +func (obj *rsvpMetric) BundleTx() uint64 { + + return *obj.obj.BundleTx + +} + +// The number of Bundle messages sent by this RSVP router. +// BundleTx returns a uint64 +func (obj *rsvpMetric) HasBundleTx() bool { + return obj.obj.BundleTx != nil +} + +// The number of Bundle messages sent by this RSVP router. +// SetBundleTx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetBundleTx(value uint64) RsvpMetric { + + obj.obj.BundleTx = &value + return obj +} + +// The number of Bundle messages received by this RSVP router. +// BundleRx returns a uint64 +func (obj *rsvpMetric) BundleRx() uint64 { + + return *obj.obj.BundleRx + +} + +// The number of Bundle messages received by this RSVP router. +// BundleRx returns a uint64 +func (obj *rsvpMetric) HasBundleRx() bool { + return obj.obj.BundleRx != nil +} + +// The number of Bundle messages received by this RSVP router. +// SetBundleRx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetBundleRx(value uint64) RsvpMetric { + + obj.obj.BundleRx = &value + return obj +} + +// The number of Path messages with Path Re-evaluation Request enabled sent by this RSVP router. +// PathReevaluationRequestTx returns a uint64 +func (obj *rsvpMetric) PathReevaluationRequestTx() uint64 { + + return *obj.obj.PathReevaluationRequestTx + +} + +// The number of Path messages with Path Re-evaluation Request enabled sent by this RSVP router. +// PathReevaluationRequestTx returns a uint64 +func (obj *rsvpMetric) HasPathReevaluationRequestTx() bool { + return obj.obj.PathReevaluationRequestTx != nil +} + +// The number of Path messages with Path Re-evaluation Request enabled sent by this RSVP router. +// SetPathReevaluationRequestTx sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetPathReevaluationRequestTx(value uint64) RsvpMetric { + + obj.obj.PathReevaluationRequestTx = &value + return obj +} + +// The number of successfully completed Make-Before-Break operations on LSPs on this RSVP router. +// PathReoptimizations returns a uint64 +func (obj *rsvpMetric) PathReoptimizations() uint64 { + + return *obj.obj.PathReoptimizations + +} + +// The number of successfully completed Make-Before-Break operations on LSPs on this RSVP router. +// PathReoptimizations returns a uint64 +func (obj *rsvpMetric) HasPathReoptimizations() bool { + return obj.obj.PathReoptimizations != nil +} + +// The number of successfully completed Make-Before-Break operations on LSPs on this RSVP router. +// SetPathReoptimizations sets the uint64 value in the RsvpMetric object +func (obj *rsvpMetric) SetPathReoptimizations(value uint64) RsvpMetric { + + obj.obj.PathReoptimizations = &value + return obj +} + +func (obj *rsvpMetric) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *rsvpMetric) setDefault() { + +} diff --git a/gosnappi/rsvp_metrics_request.go b/gosnappi/rsvp_metrics_request.go new file mode 100644 index 00000000..eb703d8e --- /dev/null +++ b/gosnappi/rsvp_metrics_request.go @@ -0,0 +1,409 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpMetricsRequest ***** +type rsvpMetricsRequest struct { + validation + obj *otg.RsvpMetricsRequest + marshaller marshalRsvpMetricsRequest + unMarshaller unMarshalRsvpMetricsRequest +} + +func NewRsvpMetricsRequest() RsvpMetricsRequest { + obj := rsvpMetricsRequest{obj: &otg.RsvpMetricsRequest{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpMetricsRequest) msg() *otg.RsvpMetricsRequest { + return obj.obj +} + +func (obj *rsvpMetricsRequest) setMsg(msg *otg.RsvpMetricsRequest) RsvpMetricsRequest { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpMetricsRequest struct { + obj *rsvpMetricsRequest +} + +type marshalRsvpMetricsRequest interface { + // ToProto marshals RsvpMetricsRequest to protobuf object *otg.RsvpMetricsRequest + ToProto() (*otg.RsvpMetricsRequest, error) + // ToPbText marshals RsvpMetricsRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpMetricsRequest to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpMetricsRequest to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpMetricsRequest struct { + obj *rsvpMetricsRequest +} + +type unMarshalRsvpMetricsRequest interface { + // FromProto unmarshals RsvpMetricsRequest from protobuf object *otg.RsvpMetricsRequest + FromProto(msg *otg.RsvpMetricsRequest) (RsvpMetricsRequest, error) + // FromPbText unmarshals RsvpMetricsRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpMetricsRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpMetricsRequest from JSON text + FromJson(value string) error +} + +func (obj *rsvpMetricsRequest) Marshal() marshalRsvpMetricsRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpMetricsRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpMetricsRequest) Unmarshal() unMarshalRsvpMetricsRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpMetricsRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpMetricsRequest) ToProto() (*otg.RsvpMetricsRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpMetricsRequest) FromProto(msg *otg.RsvpMetricsRequest) (RsvpMetricsRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpMetricsRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpMetricsRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpMetricsRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpMetricsRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpMetricsRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpMetricsRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpMetricsRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpMetricsRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpMetricsRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpMetricsRequest) Clone() (RsvpMetricsRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpMetricsRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// RsvpMetricsRequest is the request to retrieve RSVP-TE per Router metrics/statistics. +type RsvpMetricsRequest interface { + Validation + // msg marshals RsvpMetricsRequest to protobuf object *otg.RsvpMetricsRequest + // and doesn't set defaults + msg() *otg.RsvpMetricsRequest + // setMsg unmarshals RsvpMetricsRequest from protobuf object *otg.RsvpMetricsRequest + // and doesn't set defaults + setMsg(*otg.RsvpMetricsRequest) RsvpMetricsRequest + // provides marshal interface + Marshal() marshalRsvpMetricsRequest + // provides unmarshal interface + Unmarshal() unMarshalRsvpMetricsRequest + // validate validates RsvpMetricsRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpMetricsRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RouterNames returns []string, set in RsvpMetricsRequest. + RouterNames() []string + // SetRouterNames assigns []string provided by user to RsvpMetricsRequest + SetRouterNames(value []string) RsvpMetricsRequest + // ColumnNames returns []RsvpMetricsRequestColumnNamesEnum, set in RsvpMetricsRequest + ColumnNames() []RsvpMetricsRequestColumnNamesEnum + // SetColumnNames assigns []RsvpMetricsRequestColumnNamesEnum provided by user to RsvpMetricsRequest + SetColumnNames(value []RsvpMetricsRequestColumnNamesEnum) RsvpMetricsRequest +} + +// The names of RSVP-TE Routers to return results for. An empty list as input will return results for all RSVP-TE routers. +// +// x-constraint: +// - /components/schemas/Device.Rsvp/properties/name +// +// x-constraint: +// - /components/schemas/Device.Rsvp/properties/name +// +// RouterNames returns a []string +func (obj *rsvpMetricsRequest) RouterNames() []string { + if obj.obj.RouterNames == nil { + obj.obj.RouterNames = make([]string, 0) + } + return obj.obj.RouterNames +} + +// The names of RSVP-TE Routers to return results for. An empty list as input will return results for all RSVP-TE routers. +// +// x-constraint: +// - /components/schemas/Device.Rsvp/properties/name +// +// x-constraint: +// - /components/schemas/Device.Rsvp/properties/name +// +// SetRouterNames sets the []string value in the RsvpMetricsRequest object +func (obj *rsvpMetricsRequest) SetRouterNames(value []string) RsvpMetricsRequest { + + if obj.obj.RouterNames == nil { + obj.obj.RouterNames = make([]string, 0) + } + obj.obj.RouterNames = value + + return obj +} + +type RsvpMetricsRequestColumnNamesEnum string + +// Enum of ColumnNames on RsvpMetricsRequest +var RsvpMetricsRequestColumnNames = struct { + INGRESS_P2P_LSPS_CONFIGURED RsvpMetricsRequestColumnNamesEnum + INGRESS_P2P_LSPS_UP RsvpMetricsRequestColumnNamesEnum + EGRESS_P2P_LSPS_UP RsvpMetricsRequestColumnNamesEnum + LSP_FLAP_COUNT RsvpMetricsRequestColumnNamesEnum + PATHS_TX RsvpMetricsRequestColumnNamesEnum + PATHS_RX RsvpMetricsRequestColumnNamesEnum + RESVS_TX RsvpMetricsRequestColumnNamesEnum + RESVS_RX RsvpMetricsRequestColumnNamesEnum + PATH_TEARS_TX RsvpMetricsRequestColumnNamesEnum + PATH_TEARS_RX RsvpMetricsRequestColumnNamesEnum + RESV_TEARS_TX RsvpMetricsRequestColumnNamesEnum + RESV_TEARS_RX RsvpMetricsRequestColumnNamesEnum + PATH_ERRORS_TX RsvpMetricsRequestColumnNamesEnum + PATH_ERRORS_RX RsvpMetricsRequestColumnNamesEnum + RESV_ERRORS_TX RsvpMetricsRequestColumnNamesEnum + RESV_ERRORS_RX RsvpMetricsRequestColumnNamesEnum + RESV_CONF_TX RsvpMetricsRequestColumnNamesEnum + RESV_CONF_RX RsvpMetricsRequestColumnNamesEnum + HELLOS_TX RsvpMetricsRequestColumnNamesEnum + HELLOS_RX RsvpMetricsRequestColumnNamesEnum + ACKS_TX RsvpMetricsRequestColumnNamesEnum + ACKS_RX RsvpMetricsRequestColumnNamesEnum + NACKS_TX RsvpMetricsRequestColumnNamesEnum + NACKS_RX RsvpMetricsRequestColumnNamesEnum + SREFRESH_TX RsvpMetricsRequestColumnNamesEnum + SREFRESH_RX RsvpMetricsRequestColumnNamesEnum + BUNDLE_TX RsvpMetricsRequestColumnNamesEnum + BUNDLE_RX RsvpMetricsRequestColumnNamesEnum + PATH_REEVALUATION_REQUEST_TX RsvpMetricsRequestColumnNamesEnum + PATH_REOPTIMIZATIONS RsvpMetricsRequestColumnNamesEnum +}{ + INGRESS_P2P_LSPS_CONFIGURED: RsvpMetricsRequestColumnNamesEnum("ingress_p2p_lsps_configured"), + INGRESS_P2P_LSPS_UP: RsvpMetricsRequestColumnNamesEnum("ingress_p2p_lsps_up"), + EGRESS_P2P_LSPS_UP: RsvpMetricsRequestColumnNamesEnum("egress_p2p_lsps_up"), + LSP_FLAP_COUNT: RsvpMetricsRequestColumnNamesEnum("lsp_flap_count"), + PATHS_TX: RsvpMetricsRequestColumnNamesEnum("paths_tx"), + PATHS_RX: RsvpMetricsRequestColumnNamesEnum("paths_rx"), + RESVS_TX: RsvpMetricsRequestColumnNamesEnum("resvs_tx"), + RESVS_RX: RsvpMetricsRequestColumnNamesEnum("resvs_rx"), + PATH_TEARS_TX: RsvpMetricsRequestColumnNamesEnum("path_tears_tx"), + PATH_TEARS_RX: RsvpMetricsRequestColumnNamesEnum("path_tears_rx"), + RESV_TEARS_TX: RsvpMetricsRequestColumnNamesEnum("resv_tears_tx"), + RESV_TEARS_RX: RsvpMetricsRequestColumnNamesEnum("resv_tears_rx"), + PATH_ERRORS_TX: RsvpMetricsRequestColumnNamesEnum("path_errors_tx"), + PATH_ERRORS_RX: RsvpMetricsRequestColumnNamesEnum("path_errors_rx"), + RESV_ERRORS_TX: RsvpMetricsRequestColumnNamesEnum("resv_errors_tx"), + RESV_ERRORS_RX: RsvpMetricsRequestColumnNamesEnum("resv_errors_rx"), + RESV_CONF_TX: RsvpMetricsRequestColumnNamesEnum("resv_conf_tx"), + RESV_CONF_RX: RsvpMetricsRequestColumnNamesEnum("resv_conf_rx"), + HELLOS_TX: RsvpMetricsRequestColumnNamesEnum("hellos_tx"), + HELLOS_RX: RsvpMetricsRequestColumnNamesEnum("hellos_rx"), + ACKS_TX: RsvpMetricsRequestColumnNamesEnum("acks_tx"), + ACKS_RX: RsvpMetricsRequestColumnNamesEnum("acks_rx"), + NACKS_TX: RsvpMetricsRequestColumnNamesEnum("nacks_tx"), + NACKS_RX: RsvpMetricsRequestColumnNamesEnum("nacks_rx"), + SREFRESH_TX: RsvpMetricsRequestColumnNamesEnum("srefresh_tx"), + SREFRESH_RX: RsvpMetricsRequestColumnNamesEnum("srefresh_rx"), + BUNDLE_TX: RsvpMetricsRequestColumnNamesEnum("bundle_tx"), + BUNDLE_RX: RsvpMetricsRequestColumnNamesEnum("bundle_rx"), + PATH_REEVALUATION_REQUEST_TX: RsvpMetricsRequestColumnNamesEnum("path_reevaluation_request_tx"), + PATH_REOPTIMIZATIONS: RsvpMetricsRequestColumnNamesEnum("path_reoptimizations"), +} + +func (obj *rsvpMetricsRequest) ColumnNames() []RsvpMetricsRequestColumnNamesEnum { + items := []RsvpMetricsRequestColumnNamesEnum{} + for _, item := range obj.obj.ColumnNames { + items = append(items, RsvpMetricsRequestColumnNamesEnum(item.String())) + } + return items +} + +// The list of column names that the returned result set will contain. If the input list is empty then all columns will be returned except for any result_groups. +// SetColumnNames sets the []string value in the RsvpMetricsRequest object +func (obj *rsvpMetricsRequest) SetColumnNames(value []RsvpMetricsRequestColumnNamesEnum) RsvpMetricsRequest { + + items := []otg.RsvpMetricsRequest_ColumnNames_Enum{} + for _, item := range value { + intValue := otg.RsvpMetricsRequest_ColumnNames_Enum_value[string(item)] + items = append(items, otg.RsvpMetricsRequest_ColumnNames_Enum(intValue)) + } + obj.obj.ColumnNames = items + return obj +} + +func (obj *rsvpMetricsRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *rsvpMetricsRequest) setDefault() { + +} diff --git a/gosnappi/rsvp_resource_affinities.go b/gosnappi/rsvp_resource_affinities.go new file mode 100644 index 00000000..2693df24 --- /dev/null +++ b/gosnappi/rsvp_resource_affinities.go @@ -0,0 +1,409 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpResourceAffinities ***** +type rsvpResourceAffinities struct { + validation + obj *otg.RsvpResourceAffinities + marshaller marshalRsvpResourceAffinities + unMarshaller unMarshalRsvpResourceAffinities +} + +func NewRsvpResourceAffinities() RsvpResourceAffinities { + obj := rsvpResourceAffinities{obj: &otg.RsvpResourceAffinities{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpResourceAffinities) msg() *otg.RsvpResourceAffinities { + return obj.obj +} + +func (obj *rsvpResourceAffinities) setMsg(msg *otg.RsvpResourceAffinities) RsvpResourceAffinities { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpResourceAffinities struct { + obj *rsvpResourceAffinities +} + +type marshalRsvpResourceAffinities interface { + // ToProto marshals RsvpResourceAffinities to protobuf object *otg.RsvpResourceAffinities + ToProto() (*otg.RsvpResourceAffinities, error) + // ToPbText marshals RsvpResourceAffinities to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpResourceAffinities to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpResourceAffinities to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpResourceAffinities struct { + obj *rsvpResourceAffinities +} + +type unMarshalRsvpResourceAffinities interface { + // FromProto unmarshals RsvpResourceAffinities from protobuf object *otg.RsvpResourceAffinities + FromProto(msg *otg.RsvpResourceAffinities) (RsvpResourceAffinities, error) + // FromPbText unmarshals RsvpResourceAffinities from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpResourceAffinities from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpResourceAffinities from JSON text + FromJson(value string) error +} + +func (obj *rsvpResourceAffinities) Marshal() marshalRsvpResourceAffinities { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpResourceAffinities{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpResourceAffinities) Unmarshal() unMarshalRsvpResourceAffinities { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpResourceAffinities{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpResourceAffinities) ToProto() (*otg.RsvpResourceAffinities, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpResourceAffinities) FromProto(msg *otg.RsvpResourceAffinities) (RsvpResourceAffinities, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpResourceAffinities) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpResourceAffinities) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpResourceAffinities) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpResourceAffinities) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpResourceAffinities) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpResourceAffinities) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpResourceAffinities) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpResourceAffinities) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpResourceAffinities) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpResourceAffinities) Clone() (RsvpResourceAffinities, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpResourceAffinities() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// RsvpResourceAffinities is this is an optional object. If included, the extended SESSION_ATTRIBUTE object is sent in the Path message containing +// the additional fields included in this object. This contains a set of three bitmaps using which further constraints can be +// set on the path calculated for the LSP based on the Admin Group settings in the IGP (e.g ISIS or OSPF interface). +type RsvpResourceAffinities interface { + Validation + // msg marshals RsvpResourceAffinities to protobuf object *otg.RsvpResourceAffinities + // and doesn't set defaults + msg() *otg.RsvpResourceAffinities + // setMsg unmarshals RsvpResourceAffinities from protobuf object *otg.RsvpResourceAffinities + // and doesn't set defaults + setMsg(*otg.RsvpResourceAffinities) RsvpResourceAffinities + // provides marshal interface + Marshal() marshalRsvpResourceAffinities + // provides unmarshal interface + Unmarshal() unMarshalRsvpResourceAffinities + // validate validates RsvpResourceAffinities + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpResourceAffinities, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ExcludeAny returns string, set in RsvpResourceAffinities. + ExcludeAny() string + // SetExcludeAny assigns string provided by user to RsvpResourceAffinities + SetExcludeAny(value string) RsvpResourceAffinities + // HasExcludeAny checks if ExcludeAny has been set in RsvpResourceAffinities + HasExcludeAny() bool + // IncludeAny returns string, set in RsvpResourceAffinities. + IncludeAny() string + // SetIncludeAny assigns string provided by user to RsvpResourceAffinities + SetIncludeAny(value string) RsvpResourceAffinities + // HasIncludeAny checks if IncludeAny has been set in RsvpResourceAffinities + HasIncludeAny() bool + // IncludeAll returns string, set in RsvpResourceAffinities. + IncludeAll() string + // SetIncludeAll assigns string provided by user to RsvpResourceAffinities + SetIncludeAll(value string) RsvpResourceAffinities + // HasIncludeAll checks if IncludeAll has been set in RsvpResourceAffinities + HasIncludeAll() bool +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link unacceptable. A null set (all bits set to zero) doesn't render the link unacceptable. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// ExcludeAny returns a string +func (obj *rsvpResourceAffinities) ExcludeAny() string { + + return *obj.obj.ExcludeAny + +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link unacceptable. A null set (all bits set to zero) doesn't render the link unacceptable. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// ExcludeAny returns a string +func (obj *rsvpResourceAffinities) HasExcludeAny() bool { + return obj.obj.ExcludeAny != nil +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link unacceptable. A null set (all bits set to zero) doesn't render the link unacceptable. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// SetExcludeAny sets the string value in the RsvpResourceAffinities object +func (obj *rsvpResourceAffinities) SetExcludeAny(value string) RsvpResourceAffinities { + + obj.obj.ExcludeAny = &value + return obj +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// IncludeAny returns a string +func (obj *rsvpResourceAffinities) IncludeAny() string { + + return *obj.obj.IncludeAny + +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// IncludeAny returns a string +func (obj *rsvpResourceAffinities) HasIncludeAny() bool { + return obj.obj.IncludeAny != nil +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel any of which renders a link acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// SetIncludeAny sets the string value in the RsvpResourceAffinities object +func (obj *rsvpResourceAffinities) SetIncludeAny(value string) RsvpResourceAffinities { + + obj.obj.IncludeAny = &value + return obj +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel all of which must be present for a link to be acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// IncludeAll returns a string +func (obj *rsvpResourceAffinities) IncludeAll() string { + + return *obj.obj.IncludeAll + +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel all of which must be present for a link to be acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// IncludeAll returns a string +func (obj *rsvpResourceAffinities) HasIncludeAll() bool { + return obj.obj.IncludeAll != nil +} + +// A 32-bit vector representing a set of attribute filters associated with a tunnel all of which must be present for a link to be acceptable. A null set (all bits set to zero) automatically passes. The most significant byte in the hex-string is the farthest to the left in the byte sequence. Leading zero bytes in the configured value may be omitted for brevity. +// SetIncludeAll sets the string value in the RsvpResourceAffinities object +func (obj *rsvpResourceAffinities) SetIncludeAll(value string) RsvpResourceAffinities { + + obj.obj.IncludeAll = &value + return obj +} + +func (obj *rsvpResourceAffinities) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.ExcludeAny != nil { + + if len(*obj.obj.ExcludeAny) < 0 || len(*obj.obj.ExcludeAny) > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of RsvpResourceAffinities.ExcludeAny <= 8 but Got %d", + len(*obj.obj.ExcludeAny))) + } + + } + + if obj.obj.IncludeAny != nil { + + if len(*obj.obj.IncludeAny) < 0 || len(*obj.obj.IncludeAny) > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of RsvpResourceAffinities.IncludeAny <= 8 but Got %d", + len(*obj.obj.IncludeAny))) + } + + } + + if obj.obj.IncludeAll != nil { + + if len(*obj.obj.IncludeAll) < 0 || len(*obj.obj.IncludeAll) > 8 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of RsvpResourceAffinities.IncludeAll <= 8 but Got %d", + len(*obj.obj.IncludeAll))) + } + + } + +} + +func (obj *rsvpResourceAffinities) setDefault() { + if obj.obj.ExcludeAny == nil { + obj.SetExcludeAny("0") + } + if obj.obj.IncludeAny == nil { + obj.SetIncludeAny("0") + } + if obj.obj.IncludeAll == nil { + obj.SetIncludeAll("0") + } + +} diff --git a/gosnappi/rsvp_session_attribute.go b/gosnappi/rsvp_session_attribute.go new file mode 100644 index 00000000..d1dc8251 --- /dev/null +++ b/gosnappi/rsvp_session_attribute.go @@ -0,0 +1,646 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpSessionAttribute ***** +type rsvpSessionAttribute struct { + validation + obj *otg.RsvpSessionAttribute + marshaller marshalRsvpSessionAttribute + unMarshaller unMarshalRsvpSessionAttribute + resourceAffinitiesHolder RsvpResourceAffinities +} + +func NewRsvpSessionAttribute() RsvpSessionAttribute { + obj := rsvpSessionAttribute{obj: &otg.RsvpSessionAttribute{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpSessionAttribute) msg() *otg.RsvpSessionAttribute { + return obj.obj +} + +func (obj *rsvpSessionAttribute) setMsg(msg *otg.RsvpSessionAttribute) RsvpSessionAttribute { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpSessionAttribute struct { + obj *rsvpSessionAttribute +} + +type marshalRsvpSessionAttribute interface { + // ToProto marshals RsvpSessionAttribute to protobuf object *otg.RsvpSessionAttribute + ToProto() (*otg.RsvpSessionAttribute, error) + // ToPbText marshals RsvpSessionAttribute to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpSessionAttribute to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpSessionAttribute to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpSessionAttribute struct { + obj *rsvpSessionAttribute +} + +type unMarshalRsvpSessionAttribute interface { + // FromProto unmarshals RsvpSessionAttribute from protobuf object *otg.RsvpSessionAttribute + FromProto(msg *otg.RsvpSessionAttribute) (RsvpSessionAttribute, error) + // FromPbText unmarshals RsvpSessionAttribute from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpSessionAttribute from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpSessionAttribute from JSON text + FromJson(value string) error +} + +func (obj *rsvpSessionAttribute) Marshal() marshalRsvpSessionAttribute { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpSessionAttribute{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpSessionAttribute) Unmarshal() unMarshalRsvpSessionAttribute { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpSessionAttribute{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpSessionAttribute) ToProto() (*otg.RsvpSessionAttribute, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpSessionAttribute) FromProto(msg *otg.RsvpSessionAttribute) (RsvpSessionAttribute, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpSessionAttribute) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpSessionAttribute) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpSessionAttribute) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpSessionAttribute) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpSessionAttribute) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpSessionAttribute) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpSessionAttribute) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpSessionAttribute) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpSessionAttribute) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpSessionAttribute) Clone() (RsvpSessionAttribute, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpSessionAttribute() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *rsvpSessionAttribute) setNil() { + obj.resourceAffinitiesHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// RsvpSessionAttribute is configuration for RSVP-TE SESSION_ATTRIBUTE object included in Path Messages as defined in RFC3209. The bandwidth_protection_desired and node_protection_desired flags are defined in RFC4090 (Fast Reroute). +type RsvpSessionAttribute interface { + Validation + // msg marshals RsvpSessionAttribute to protobuf object *otg.RsvpSessionAttribute + // and doesn't set defaults + msg() *otg.RsvpSessionAttribute + // setMsg unmarshals RsvpSessionAttribute from protobuf object *otg.RsvpSessionAttribute + // and doesn't set defaults + setMsg(*otg.RsvpSessionAttribute) RsvpSessionAttribute + // provides marshal interface + Marshal() marshalRsvpSessionAttribute + // provides unmarshal interface + Unmarshal() unMarshalRsvpSessionAttribute + // validate validates RsvpSessionAttribute + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpSessionAttribute, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // AutoGenerateSessionName returns bool, set in RsvpSessionAttribute. + AutoGenerateSessionName() bool + // SetAutoGenerateSessionName assigns bool provided by user to RsvpSessionAttribute + SetAutoGenerateSessionName(value bool) RsvpSessionAttribute + // HasAutoGenerateSessionName checks if AutoGenerateSessionName has been set in RsvpSessionAttribute + HasAutoGenerateSessionName() bool + // SessionName returns string, set in RsvpSessionAttribute. + SessionName() string + // SetSessionName assigns string provided by user to RsvpSessionAttribute + SetSessionName(value string) RsvpSessionAttribute + // HasSessionName checks if SessionName has been set in RsvpSessionAttribute + HasSessionName() bool + // SetupPriority returns uint32, set in RsvpSessionAttribute. + SetupPriority() uint32 + // SetSetupPriority assigns uint32 provided by user to RsvpSessionAttribute + SetSetupPriority(value uint32) RsvpSessionAttribute + // HasSetupPriority checks if SetupPriority has been set in RsvpSessionAttribute + HasSetupPriority() bool + // HoldingPriority returns uint32, set in RsvpSessionAttribute. + HoldingPriority() uint32 + // SetHoldingPriority assigns uint32 provided by user to RsvpSessionAttribute + SetHoldingPriority(value uint32) RsvpSessionAttribute + // HasHoldingPriority checks if HoldingPriority has been set in RsvpSessionAttribute + HasHoldingPriority() bool + // LocalProtectionDesired returns bool, set in RsvpSessionAttribute. + LocalProtectionDesired() bool + // SetLocalProtectionDesired assigns bool provided by user to RsvpSessionAttribute + SetLocalProtectionDesired(value bool) RsvpSessionAttribute + // HasLocalProtectionDesired checks if LocalProtectionDesired has been set in RsvpSessionAttribute + HasLocalProtectionDesired() bool + // LabelRecordingDesired returns bool, set in RsvpSessionAttribute. + LabelRecordingDesired() bool + // SetLabelRecordingDesired assigns bool provided by user to RsvpSessionAttribute + SetLabelRecordingDesired(value bool) RsvpSessionAttribute + // HasLabelRecordingDesired checks if LabelRecordingDesired has been set in RsvpSessionAttribute + HasLabelRecordingDesired() bool + // SeStyleDesired returns bool, set in RsvpSessionAttribute. + SeStyleDesired() bool + // SetSeStyleDesired assigns bool provided by user to RsvpSessionAttribute + SetSeStyleDesired(value bool) RsvpSessionAttribute + // HasSeStyleDesired checks if SeStyleDesired has been set in RsvpSessionAttribute + HasSeStyleDesired() bool + // BandwidthProtectionDesired returns bool, set in RsvpSessionAttribute. + BandwidthProtectionDesired() bool + // SetBandwidthProtectionDesired assigns bool provided by user to RsvpSessionAttribute + SetBandwidthProtectionDesired(value bool) RsvpSessionAttribute + // HasBandwidthProtectionDesired checks if BandwidthProtectionDesired has been set in RsvpSessionAttribute + HasBandwidthProtectionDesired() bool + // NodeProtectionDesired returns bool, set in RsvpSessionAttribute. + NodeProtectionDesired() bool + // SetNodeProtectionDesired assigns bool provided by user to RsvpSessionAttribute + SetNodeProtectionDesired(value bool) RsvpSessionAttribute + // HasNodeProtectionDesired checks if NodeProtectionDesired has been set in RsvpSessionAttribute + HasNodeProtectionDesired() bool + // ResourceAffinities returns RsvpResourceAffinities, set in RsvpSessionAttribute. + // RsvpResourceAffinities is this is an optional object. If included, the extended SESSION_ATTRIBUTE object is sent in the Path message containing + // the additional fields included in this object. This contains a set of three bitmaps using which further constraints can be + // set on the path calculated for the LSP based on the Admin Group settings in the IGP (e.g ISIS or OSPF interface). + ResourceAffinities() RsvpResourceAffinities + // SetResourceAffinities assigns RsvpResourceAffinities provided by user to RsvpSessionAttribute. + // RsvpResourceAffinities is this is an optional object. If included, the extended SESSION_ATTRIBUTE object is sent in the Path message containing + // the additional fields included in this object. This contains a set of three bitmaps using which further constraints can be + // set on the path calculated for the LSP based on the Admin Group settings in the IGP (e.g ISIS or OSPF interface). + SetResourceAffinities(value RsvpResourceAffinities) RsvpSessionAttribute + // HasResourceAffinities checks if ResourceAffinities has been set in RsvpSessionAttribute + HasResourceAffinities() bool + setNil() +} + +// If this is enabled, an auto-generated Session Name is included in the SESSION_ATTRIBUTE object in the Path Message for this LSP. +// AutoGenerateSessionName returns a bool +func (obj *rsvpSessionAttribute) AutoGenerateSessionName() bool { + + return *obj.obj.AutoGenerateSessionName + +} + +// If this is enabled, an auto-generated Session Name is included in the SESSION_ATTRIBUTE object in the Path Message for this LSP. +// AutoGenerateSessionName returns a bool +func (obj *rsvpSessionAttribute) HasAutoGenerateSessionName() bool { + return obj.obj.AutoGenerateSessionName != nil +} + +// If this is enabled, an auto-generated Session Name is included in the SESSION_ATTRIBUTE object in the Path Message for this LSP. +// SetAutoGenerateSessionName sets the bool value in the RsvpSessionAttribute object +func (obj *rsvpSessionAttribute) SetAutoGenerateSessionName(value bool) RsvpSessionAttribute { + + obj.obj.AutoGenerateSessionName = &value + return obj +} + +// If auto_generate_session_name is set to 'false', then the value of this field is used to fill the Session Name field of the SESSION_ATTRIBUTE object in the Path Message for this LSP. It is suggested to include the Local IP, Remote IP, Tunnel ID and LSP ID in the auto-generated Session Name to ensure uniqueness of the name in the test. The maximum length of session name is 254 bytes. +// SessionName returns a string +func (obj *rsvpSessionAttribute) SessionName() string { + + return *obj.obj.SessionName + +} + +// If auto_generate_session_name is set to 'false', then the value of this field is used to fill the Session Name field of the SESSION_ATTRIBUTE object in the Path Message for this LSP. It is suggested to include the Local IP, Remote IP, Tunnel ID and LSP ID in the auto-generated Session Name to ensure uniqueness of the name in the test. The maximum length of session name is 254 bytes. +// SessionName returns a string +func (obj *rsvpSessionAttribute) HasSessionName() bool { + return obj.obj.SessionName != nil +} + +// If auto_generate_session_name is set to 'false', then the value of this field is used to fill the Session Name field of the SESSION_ATTRIBUTE object in the Path Message for this LSP. It is suggested to include the Local IP, Remote IP, Tunnel ID and LSP ID in the auto-generated Session Name to ensure uniqueness of the name in the test. The maximum length of session name is 254 bytes. +// SetSessionName sets the string value in the RsvpSessionAttribute object +func (obj *rsvpSessionAttribute) SetSessionName(value string) RsvpSessionAttribute { + + obj.obj.SessionName = &value + return obj +} + +// Specifies the value of the Setup Priority field. This controls whether the LSP should pre-empt existing LSP setup with certain Holding Priority if resource limitation is encountered when setting up the LSP. (e.g. bandwidth availability). The value 0 is the highest priority while 7 is the lowest. +// SetupPriority returns a uint32 +func (obj *rsvpSessionAttribute) SetupPriority() uint32 { + + return *obj.obj.SetupPriority + +} + +// Specifies the value of the Setup Priority field. This controls whether the LSP should pre-empt existing LSP setup with certain Holding Priority if resource limitation is encountered when setting up the LSP. (e.g. bandwidth availability). The value 0 is the highest priority while 7 is the lowest. +// SetupPriority returns a uint32 +func (obj *rsvpSessionAttribute) HasSetupPriority() bool { + return obj.obj.SetupPriority != nil +} + +// Specifies the value of the Setup Priority field. This controls whether the LSP should pre-empt existing LSP setup with certain Holding Priority if resource limitation is encountered when setting up the LSP. (e.g. bandwidth availability). The value 0 is the highest priority while 7 is the lowest. +// SetSetupPriority sets the uint32 value in the RsvpSessionAttribute object +func (obj *rsvpSessionAttribute) SetSetupPriority(value uint32) RsvpSessionAttribute { + + obj.obj.SetupPriority = &value + return obj +} + +// Specifies the value of the Holding Priority field. This controls whether a new LSP being created with certain Setup Priority should pre-empt this LSP if resource limitation is encountered when setting up the LSP. (e.g. bandwidth availability). The value 0 is the highest priority while 7 is the lowest. +// HoldingPriority returns a uint32 +func (obj *rsvpSessionAttribute) HoldingPriority() uint32 { + + return *obj.obj.HoldingPriority + +} + +// Specifies the value of the Holding Priority field. This controls whether a new LSP being created with certain Setup Priority should pre-empt this LSP if resource limitation is encountered when setting up the LSP. (e.g. bandwidth availability). The value 0 is the highest priority while 7 is the lowest. +// HoldingPriority returns a uint32 +func (obj *rsvpSessionAttribute) HasHoldingPriority() bool { + return obj.obj.HoldingPriority != nil +} + +// Specifies the value of the Holding Priority field. This controls whether a new LSP being created with certain Setup Priority should pre-empt this LSP if resource limitation is encountered when setting up the LSP. (e.g. bandwidth availability). The value 0 is the highest priority while 7 is the lowest. +// SetHoldingPriority sets the uint32 value in the RsvpSessionAttribute object +func (obj *rsvpSessionAttribute) SetHoldingPriority(value uint32) RsvpSessionAttribute { + + obj.obj.HoldingPriority = &value + return obj +} + +// This flag permits transit routers to use a local repair mechanism which may result in violation of the explicit route object. When a fault is detected on an adjacent downstream link or node, a transit router can reroute traffic for fast service restoration. +// LocalProtectionDesired returns a bool +func (obj *rsvpSessionAttribute) LocalProtectionDesired() bool { + + return *obj.obj.LocalProtectionDesired + +} + +// This flag permits transit routers to use a local repair mechanism which may result in violation of the explicit route object. When a fault is detected on an adjacent downstream link or node, a transit router can reroute traffic for fast service restoration. +// LocalProtectionDesired returns a bool +func (obj *rsvpSessionAttribute) HasLocalProtectionDesired() bool { + return obj.obj.LocalProtectionDesired != nil +} + +// This flag permits transit routers to use a local repair mechanism which may result in violation of the explicit route object. When a fault is detected on an adjacent downstream link or node, a transit router can reroute traffic for fast service restoration. +// SetLocalProtectionDesired sets the bool value in the RsvpSessionAttribute object +func (obj *rsvpSessionAttribute) SetLocalProtectionDesired(value bool) RsvpSessionAttribute { + + obj.obj.LocalProtectionDesired = &value + return obj +} + +// This flag indicates that label information should be included when doing a route record. +// LabelRecordingDesired returns a bool +func (obj *rsvpSessionAttribute) LabelRecordingDesired() bool { + + return *obj.obj.LabelRecordingDesired + +} + +// This flag indicates that label information should be included when doing a route record. +// LabelRecordingDesired returns a bool +func (obj *rsvpSessionAttribute) HasLabelRecordingDesired() bool { + return obj.obj.LabelRecordingDesired != nil +} + +// This flag indicates that label information should be included when doing a route record. +// SetLabelRecordingDesired sets the bool value in the RsvpSessionAttribute object +func (obj *rsvpSessionAttribute) SetLabelRecordingDesired(value bool) RsvpSessionAttribute { + + obj.obj.LabelRecordingDesired = &value + return obj +} + +// This flag indicates that the tunnel ingress node may choose to reroute this tunnel without tearing it down. A tunnel egress node SHOULD use the Shared Explicit(SE) Style when responding with a Resv message. +// SeStyleDesired returns a bool +func (obj *rsvpSessionAttribute) SeStyleDesired() bool { + + return *obj.obj.SeStyleDesired + +} + +// This flag indicates that the tunnel ingress node may choose to reroute this tunnel without tearing it down. A tunnel egress node SHOULD use the Shared Explicit(SE) Style when responding with a Resv message. +// SeStyleDesired returns a bool +func (obj *rsvpSessionAttribute) HasSeStyleDesired() bool { + return obj.obj.SeStyleDesired != nil +} + +// This flag indicates that the tunnel ingress node may choose to reroute this tunnel without tearing it down. A tunnel egress node SHOULD use the Shared Explicit(SE) Style when responding with a Resv message. +// SetSeStyleDesired sets the bool value in the RsvpSessionAttribute object +func (obj *rsvpSessionAttribute) SetSeStyleDesired(value bool) RsvpSessionAttribute { + + obj.obj.SeStyleDesired = &value + return obj +} + +// This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs along the protected LSP path that a backup path with a bandwidth guarantee is desired. This bandwidth has to be guaranteed for the protected LSP, if no FAST_REROUTE object is included in the PATH message. If a FAST_REROUTE object is present in the Path message, then the bandwidth specified therein is to be guaranteed. +// BandwidthProtectionDesired returns a bool +func (obj *rsvpSessionAttribute) BandwidthProtectionDesired() bool { + + return *obj.obj.BandwidthProtectionDesired + +} + +// This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs along the protected LSP path that a backup path with a bandwidth guarantee is desired. This bandwidth has to be guaranteed for the protected LSP, if no FAST_REROUTE object is included in the PATH message. If a FAST_REROUTE object is present in the Path message, then the bandwidth specified therein is to be guaranteed. +// BandwidthProtectionDesired returns a bool +func (obj *rsvpSessionAttribute) HasBandwidthProtectionDesired() bool { + return obj.obj.BandwidthProtectionDesired != nil +} + +// This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs along the protected LSP path that a backup path with a bandwidth guarantee is desired. This bandwidth has to be guaranteed for the protected LSP, if no FAST_REROUTE object is included in the PATH message. If a FAST_REROUTE object is present in the Path message, then the bandwidth specified therein is to be guaranteed. +// SetBandwidthProtectionDesired sets the bool value in the RsvpSessionAttribute object +func (obj *rsvpSessionAttribute) SetBandwidthProtectionDesired(value bool) RsvpSessionAttribute { + + obj.obj.BandwidthProtectionDesired = &value + return obj +} + +// This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs along a protected LSP path that it is desired to have a backup path that bypasses at least the next node of the protected LSP. +// NodeProtectionDesired returns a bool +func (obj *rsvpSessionAttribute) NodeProtectionDesired() bool { + + return *obj.obj.NodeProtectionDesired + +} + +// This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs along a protected LSP path that it is desired to have a backup path that bypasses at least the next node of the protected LSP. +// NodeProtectionDesired returns a bool +func (obj *rsvpSessionAttribute) HasNodeProtectionDesired() bool { + return obj.obj.NodeProtectionDesired != nil +} + +// This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs along a protected LSP path that it is desired to have a backup path that bypasses at least the next node of the protected LSP. +// SetNodeProtectionDesired sets the bool value in the RsvpSessionAttribute object +func (obj *rsvpSessionAttribute) SetNodeProtectionDesired(value bool) RsvpSessionAttribute { + + obj.obj.NodeProtectionDesired = &value + return obj +} + +// This is an optional object. If included the extended SESSION_ATTRIBUTE object is sent in the Path message containing +// the additional fields included in this object. This contains a set of three bitmaps using which further constraints can be +// set on the path calculated for the LSP based on the Admin Group settings in the IGP (e.g ISIS or OSPF interface). +// ResourceAffinities returns a RsvpResourceAffinities +func (obj *rsvpSessionAttribute) ResourceAffinities() RsvpResourceAffinities { + if obj.obj.ResourceAffinities == nil { + obj.obj.ResourceAffinities = NewRsvpResourceAffinities().msg() + } + if obj.resourceAffinitiesHolder == nil { + obj.resourceAffinitiesHolder = &rsvpResourceAffinities{obj: obj.obj.ResourceAffinities} + } + return obj.resourceAffinitiesHolder +} + +// This is an optional object. If included the extended SESSION_ATTRIBUTE object is sent in the Path message containing +// the additional fields included in this object. This contains a set of three bitmaps using which further constraints can be +// set on the path calculated for the LSP based on the Admin Group settings in the IGP (e.g ISIS or OSPF interface). +// ResourceAffinities returns a RsvpResourceAffinities +func (obj *rsvpSessionAttribute) HasResourceAffinities() bool { + return obj.obj.ResourceAffinities != nil +} + +// This is an optional object. If included the extended SESSION_ATTRIBUTE object is sent in the Path message containing +// the additional fields included in this object. This contains a set of three bitmaps using which further constraints can be +// set on the path calculated for the LSP based on the Admin Group settings in the IGP (e.g ISIS or OSPF interface). +// SetResourceAffinities sets the RsvpResourceAffinities value in the RsvpSessionAttribute object +func (obj *rsvpSessionAttribute) SetResourceAffinities(value RsvpResourceAffinities) RsvpSessionAttribute { + + obj.resourceAffinitiesHolder = nil + obj.obj.ResourceAffinities = value.msg() + + return obj +} + +func (obj *rsvpSessionAttribute) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.SessionName != nil { + + if len(*obj.obj.SessionName) < 0 || len(*obj.obj.SessionName) > 254 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf( + "0 <= length of RsvpSessionAttribute.SessionName <= 254 but Got %d", + len(*obj.obj.SessionName))) + } + + } + + if obj.obj.SetupPriority != nil { + + if *obj.obj.SetupPriority > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpSessionAttribute.SetupPriority <= 7 but Got %d", *obj.obj.SetupPriority)) + } + + } + + if obj.obj.HoldingPriority != nil { + + if *obj.obj.HoldingPriority > 7 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpSessionAttribute.HoldingPriority <= 7 but Got %d", *obj.obj.HoldingPriority)) + } + + } + + if obj.obj.ResourceAffinities != nil { + + obj.ResourceAffinities().validateObj(vObj, set_default) + } + +} + +func (obj *rsvpSessionAttribute) setDefault() { + if obj.obj.AutoGenerateSessionName == nil { + obj.SetAutoGenerateSessionName(true) + } + if obj.obj.SetupPriority == nil { + obj.SetSetupPriority(7) + } + if obj.obj.HoldingPriority == nil { + obj.SetHoldingPriority(7) + } + if obj.obj.LocalProtectionDesired == nil { + obj.SetLocalProtectionDesired(false) + } + if obj.obj.LabelRecordingDesired == nil { + obj.SetLabelRecordingDesired(false) + } + if obj.obj.SeStyleDesired == nil { + obj.SetSeStyleDesired(false) + } + if obj.obj.BandwidthProtectionDesired == nil { + obj.SetBandwidthProtectionDesired(false) + } + if obj.obj.NodeProtectionDesired == nil { + obj.SetNodeProtectionDesired(false) + } + +} diff --git a/gosnappi/rsvp_tspec.go b/gosnappi/rsvp_tspec.go new file mode 100644 index 00000000..f02175b3 --- /dev/null +++ b/gosnappi/rsvp_tspec.go @@ -0,0 +1,453 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** RsvpTspec ***** +type rsvpTspec struct { + validation + obj *otg.RsvpTspec + marshaller marshalRsvpTspec + unMarshaller unMarshalRsvpTspec +} + +func NewRsvpTspec() RsvpTspec { + obj := rsvpTspec{obj: &otg.RsvpTspec{}} + obj.setDefault() + return &obj +} + +func (obj *rsvpTspec) msg() *otg.RsvpTspec { + return obj.obj +} + +func (obj *rsvpTspec) setMsg(msg *otg.RsvpTspec) RsvpTspec { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalrsvpTspec struct { + obj *rsvpTspec +} + +type marshalRsvpTspec interface { + // ToProto marshals RsvpTspec to protobuf object *otg.RsvpTspec + ToProto() (*otg.RsvpTspec, error) + // ToPbText marshals RsvpTspec to protobuf text + ToPbText() (string, error) + // ToYaml marshals RsvpTspec to YAML text + ToYaml() (string, error) + // ToJson marshals RsvpTspec to JSON text + ToJson() (string, error) +} + +type unMarshalrsvpTspec struct { + obj *rsvpTspec +} + +type unMarshalRsvpTspec interface { + // FromProto unmarshals RsvpTspec from protobuf object *otg.RsvpTspec + FromProto(msg *otg.RsvpTspec) (RsvpTspec, error) + // FromPbText unmarshals RsvpTspec from protobuf text + FromPbText(value string) error + // FromYaml unmarshals RsvpTspec from YAML text + FromYaml(value string) error + // FromJson unmarshals RsvpTspec from JSON text + FromJson(value string) error +} + +func (obj *rsvpTspec) Marshal() marshalRsvpTspec { + if obj.marshaller == nil { + obj.marshaller = &marshalrsvpTspec{obj: obj} + } + return obj.marshaller +} + +func (obj *rsvpTspec) Unmarshal() unMarshalRsvpTspec { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalrsvpTspec{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalrsvpTspec) ToProto() (*otg.RsvpTspec, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalrsvpTspec) FromProto(msg *otg.RsvpTspec) (RsvpTspec, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalrsvpTspec) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalrsvpTspec) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalrsvpTspec) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpTspec) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalrsvpTspec) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalrsvpTspec) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *rsvpTspec) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *rsvpTspec) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *rsvpTspec) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *rsvpTspec) Clone() (RsvpTspec, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewRsvpTspec() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// RsvpTspec is configuration for RSVP-TE TSPEC object included in Path Messages. The usage of these parameters is defined in RFC2215. +type RsvpTspec interface { + Validation + // msg marshals RsvpTspec to protobuf object *otg.RsvpTspec + // and doesn't set defaults + msg() *otg.RsvpTspec + // setMsg unmarshals RsvpTspec from protobuf object *otg.RsvpTspec + // and doesn't set defaults + setMsg(*otg.RsvpTspec) RsvpTspec + // provides marshal interface + Marshal() marshalRsvpTspec + // provides unmarshal interface + Unmarshal() unMarshalRsvpTspec + // validate validates RsvpTspec + validate() error + // A stringer function + String() string + // Clones the object + Clone() (RsvpTspec, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // TokenBucketRate returns float32, set in RsvpTspec. + TokenBucketRate() float32 + // SetTokenBucketRate assigns float32 provided by user to RsvpTspec + SetTokenBucketRate(value float32) RsvpTspec + // HasTokenBucketRate checks if TokenBucketRate has been set in RsvpTspec + HasTokenBucketRate() bool + // TokenBucketSize returns float32, set in RsvpTspec. + TokenBucketSize() float32 + // SetTokenBucketSize assigns float32 provided by user to RsvpTspec + SetTokenBucketSize(value float32) RsvpTspec + // HasTokenBucketSize checks if TokenBucketSize has been set in RsvpTspec + HasTokenBucketSize() bool + // PeakDataRate returns float32, set in RsvpTspec. + PeakDataRate() float32 + // SetPeakDataRate assigns float32 provided by user to RsvpTspec + SetPeakDataRate(value float32) RsvpTspec + // HasPeakDataRate checks if PeakDataRate has been set in RsvpTspec + HasPeakDataRate() bool + // MinimumPolicedUnit returns uint32, set in RsvpTspec. + MinimumPolicedUnit() uint32 + // SetMinimumPolicedUnit assigns uint32 provided by user to RsvpTspec + SetMinimumPolicedUnit(value uint32) RsvpTspec + // HasMinimumPolicedUnit checks if MinimumPolicedUnit has been set in RsvpTspec + HasMinimumPolicedUnit() bool + // MaximumPolicedUnit returns uint32, set in RsvpTspec. + MaximumPolicedUnit() uint32 + // SetMaximumPolicedUnit assigns uint32 provided by user to RsvpTspec + SetMaximumPolicedUnit(value uint32) RsvpTspec + // HasMaximumPolicedUnit checks if MaximumPolicedUnit has been set in RsvpTspec + HasMaximumPolicedUnit() bool +} + +// The rate of the traffic to be carried in this LSP in bytes per second. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. +// TokenBucketRate returns a float32 +func (obj *rsvpTspec) TokenBucketRate() float32 { + + return *obj.obj.TokenBucketRate + +} + +// The rate of the traffic to be carried in this LSP in bytes per second. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. +// TokenBucketRate returns a float32 +func (obj *rsvpTspec) HasTokenBucketRate() bool { + return obj.obj.TokenBucketRate != nil +} + +// The rate of the traffic to be carried in this LSP in bytes per second. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. +// SetTokenBucketRate sets the float32 value in the RsvpTspec object +func (obj *rsvpTspec) SetTokenBucketRate(value float32) RsvpTspec { + + obj.obj.TokenBucketRate = &value + return obj +} + +// The depth of the token bucket in bytes used to specify the Token Bucket characteristics of the traffic to be carried in the LSP. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. +// TokenBucketSize returns a float32 +func (obj *rsvpTspec) TokenBucketSize() float32 { + + return *obj.obj.TokenBucketSize + +} + +// The depth of the token bucket in bytes used to specify the Token Bucket characteristics of the traffic to be carried in the LSP. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. +// TokenBucketSize returns a float32 +func (obj *rsvpTspec) HasTokenBucketSize() bool { + return obj.obj.TokenBucketSize != nil +} + +// The depth of the token bucket in bytes used to specify the Token Bucket characteristics of the traffic to be carried in the LSP. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. +// SetTokenBucketSize sets the float32 value in the RsvpTspec object +func (obj *rsvpTspec) SetTokenBucketSize(value float32) RsvpTspec { + + obj.obj.TokenBucketSize = &value + return obj +} + +// The peak data rate of the traffic in bytes per second used to specify the Token Bucket characteristics of the traffic to be carried in the LSP. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. +// PeakDataRate returns a float32 +func (obj *rsvpTspec) PeakDataRate() float32 { + + return *obj.obj.PeakDataRate + +} + +// The peak data rate of the traffic in bytes per second used to specify the Token Bucket characteristics of the traffic to be carried in the LSP. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. +// PeakDataRate returns a float32 +func (obj *rsvpTspec) HasPeakDataRate() bool { + return obj.obj.PeakDataRate != nil +} + +// The peak data rate of the traffic in bytes per second used to specify the Token Bucket characteristics of the traffic to be carried in the LSP. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. +// SetPeakDataRate sets the float32 value in the RsvpTspec object +func (obj *rsvpTspec) SetPeakDataRate(value float32) RsvpTspec { + + obj.obj.PeakDataRate = &value + return obj +} + +// Specifies the minium length of packet frames that will be policed. +// MinimumPolicedUnit returns a uint32 +func (obj *rsvpTspec) MinimumPolicedUnit() uint32 { + + return *obj.obj.MinimumPolicedUnit + +} + +// Specifies the minium length of packet frames that will be policed. +// MinimumPolicedUnit returns a uint32 +func (obj *rsvpTspec) HasMinimumPolicedUnit() bool { + return obj.obj.MinimumPolicedUnit != nil +} + +// Specifies the minium length of packet frames that will be policed. +// SetMinimumPolicedUnit sets the uint32 value in the RsvpTspec object +func (obj *rsvpTspec) SetMinimumPolicedUnit(value uint32) RsvpTspec { + + obj.obj.MinimumPolicedUnit = &value + return obj +} + +// Specifies the maximum length of packet frames that will be policed. +// MaximumPolicedUnit returns a uint32 +func (obj *rsvpTspec) MaximumPolicedUnit() uint32 { + + return *obj.obj.MaximumPolicedUnit + +} + +// Specifies the maximum length of packet frames that will be policed. +// MaximumPolicedUnit returns a uint32 +func (obj *rsvpTspec) HasMaximumPolicedUnit() bool { + return obj.obj.MaximumPolicedUnit != nil +} + +// Specifies the maximum length of packet frames that will be policed. +// SetMaximumPolicedUnit sets the uint32 value in the RsvpTspec object +func (obj *rsvpTspec) SetMaximumPolicedUnit(value uint32) RsvpTspec { + + obj.obj.MaximumPolicedUnit = &value + return obj +} + +func (obj *rsvpTspec) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.MinimumPolicedUnit != nil { + + if *obj.obj.MinimumPolicedUnit > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpTspec.MinimumPolicedUnit <= 65535 but Got %d", *obj.obj.MinimumPolicedUnit)) + } + + } + + if obj.obj.MaximumPolicedUnit != nil { + + if *obj.obj.MaximumPolicedUnit > 65535 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= RsvpTspec.MaximumPolicedUnit <= 65535 but Got %d", *obj.obj.MaximumPolicedUnit)) + } + + } + +} + +func (obj *rsvpTspec) setDefault() { + if obj.obj.TokenBucketRate == nil { + obj.SetTokenBucketRate(0) + } + if obj.obj.TokenBucketSize == nil { + obj.SetTokenBucketSize(0) + } + if obj.obj.PeakDataRate == nil { + obj.SetPeakDataRate(0) + } + if obj.obj.MinimumPolicedUnit == nil { + obj.SetMinimumPolicedUnit(0) + } + if obj.obj.MaximumPolicedUnit == nil { + obj.SetMaximumPolicedUnit(0) + } + +} diff --git a/gosnappi/set_config_response.go b/gosnappi/set_config_response.go new file mode 100644 index 00000000..b78b6751 --- /dev/null +++ b/gosnappi/set_config_response.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** SetConfigResponse ***** +type setConfigResponse struct { + validation + obj *otg.SetConfigResponse + marshaller marshalSetConfigResponse + unMarshaller unMarshalSetConfigResponse + warningHolder Warning +} + +func NewSetConfigResponse() SetConfigResponse { + obj := setConfigResponse{obj: &otg.SetConfigResponse{}} + obj.setDefault() + return &obj +} + +func (obj *setConfigResponse) msg() *otg.SetConfigResponse { + return obj.obj +} + +func (obj *setConfigResponse) setMsg(msg *otg.SetConfigResponse) SetConfigResponse { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalsetConfigResponse struct { + obj *setConfigResponse +} + +type marshalSetConfigResponse interface { + // ToProto marshals SetConfigResponse to protobuf object *otg.SetConfigResponse + ToProto() (*otg.SetConfigResponse, error) + // ToPbText marshals SetConfigResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals SetConfigResponse to YAML text + ToYaml() (string, error) + // ToJson marshals SetConfigResponse to JSON text + ToJson() (string, error) +} + +type unMarshalsetConfigResponse struct { + obj *setConfigResponse +} + +type unMarshalSetConfigResponse interface { + // FromProto unmarshals SetConfigResponse from protobuf object *otg.SetConfigResponse + FromProto(msg *otg.SetConfigResponse) (SetConfigResponse, error) + // FromPbText unmarshals SetConfigResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals SetConfigResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals SetConfigResponse from JSON text + FromJson(value string) error +} + +func (obj *setConfigResponse) Marshal() marshalSetConfigResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalsetConfigResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *setConfigResponse) Unmarshal() unMarshalSetConfigResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalsetConfigResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalsetConfigResponse) ToProto() (*otg.SetConfigResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalsetConfigResponse) FromProto(msg *otg.SetConfigResponse) (SetConfigResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalsetConfigResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalsetConfigResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalsetConfigResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalsetConfigResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalsetConfigResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalsetConfigResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *setConfigResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *setConfigResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *setConfigResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *setConfigResponse) Clone() (SetConfigResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewSetConfigResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *setConfigResponse) setNil() { + obj.warningHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// SetConfigResponse is description is TBD +type SetConfigResponse interface { + Validation + // msg marshals SetConfigResponse to protobuf object *otg.SetConfigResponse + // and doesn't set defaults + msg() *otg.SetConfigResponse + // setMsg unmarshals SetConfigResponse from protobuf object *otg.SetConfigResponse + // and doesn't set defaults + setMsg(*otg.SetConfigResponse) SetConfigResponse + // provides marshal interface + Marshal() marshalSetConfigResponse + // provides unmarshal interface + Unmarshal() unMarshalSetConfigResponse + // validate validates SetConfigResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (SetConfigResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Warning returns Warning, set in SetConfigResponse. + // Warning is a list of warnings that have occurred while executing the request. + Warning() Warning + // SetWarning assigns Warning provided by user to SetConfigResponse. + // Warning is a list of warnings that have occurred while executing the request. + SetWarning(value Warning) SetConfigResponse + // HasWarning checks if Warning has been set in SetConfigResponse + HasWarning() bool + setNil() +} + +// description is TBD +// Warning returns a Warning +func (obj *setConfigResponse) Warning() Warning { + if obj.obj.Warning == nil { + obj.obj.Warning = NewWarning().msg() + } + if obj.warningHolder == nil { + obj.warningHolder = &warning{obj: obj.obj.Warning} + } + return obj.warningHolder +} + +// description is TBD +// Warning returns a Warning +func (obj *setConfigResponse) HasWarning() bool { + return obj.obj.Warning != nil +} + +// description is TBD +// SetWarning sets the Warning value in the SetConfigResponse object +func (obj *setConfigResponse) SetWarning(value Warning) SetConfigResponse { + + obj.warningHolder = nil + obj.obj.Warning = value.msg() + + return obj +} + +func (obj *setConfigResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Warning != nil { + + obj.Warning().validateObj(vObj, set_default) + } + +} + +func (obj *setConfigResponse) setDefault() { + +} diff --git a/gosnappi/set_control_action_response.go b/gosnappi/set_control_action_response.go new file mode 100644 index 00000000..f855c711 --- /dev/null +++ b/gosnappi/set_control_action_response.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** SetControlActionResponse ***** +type setControlActionResponse struct { + validation + obj *otg.SetControlActionResponse + marshaller marshalSetControlActionResponse + unMarshaller unMarshalSetControlActionResponse + controlActionResponseHolder ControlActionResponse +} + +func NewSetControlActionResponse() SetControlActionResponse { + obj := setControlActionResponse{obj: &otg.SetControlActionResponse{}} + obj.setDefault() + return &obj +} + +func (obj *setControlActionResponse) msg() *otg.SetControlActionResponse { + return obj.obj +} + +func (obj *setControlActionResponse) setMsg(msg *otg.SetControlActionResponse) SetControlActionResponse { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalsetControlActionResponse struct { + obj *setControlActionResponse +} + +type marshalSetControlActionResponse interface { + // ToProto marshals SetControlActionResponse to protobuf object *otg.SetControlActionResponse + ToProto() (*otg.SetControlActionResponse, error) + // ToPbText marshals SetControlActionResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals SetControlActionResponse to YAML text + ToYaml() (string, error) + // ToJson marshals SetControlActionResponse to JSON text + ToJson() (string, error) +} + +type unMarshalsetControlActionResponse struct { + obj *setControlActionResponse +} + +type unMarshalSetControlActionResponse interface { + // FromProto unmarshals SetControlActionResponse from protobuf object *otg.SetControlActionResponse + FromProto(msg *otg.SetControlActionResponse) (SetControlActionResponse, error) + // FromPbText unmarshals SetControlActionResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals SetControlActionResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals SetControlActionResponse from JSON text + FromJson(value string) error +} + +func (obj *setControlActionResponse) Marshal() marshalSetControlActionResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalsetControlActionResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *setControlActionResponse) Unmarshal() unMarshalSetControlActionResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalsetControlActionResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalsetControlActionResponse) ToProto() (*otg.SetControlActionResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalsetControlActionResponse) FromProto(msg *otg.SetControlActionResponse) (SetControlActionResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalsetControlActionResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalsetControlActionResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalsetControlActionResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalsetControlActionResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalsetControlActionResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalsetControlActionResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *setControlActionResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *setControlActionResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *setControlActionResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *setControlActionResponse) Clone() (SetControlActionResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewSetControlActionResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *setControlActionResponse) setNil() { + obj.controlActionResponseHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// SetControlActionResponse is description is TBD +type SetControlActionResponse interface { + Validation + // msg marshals SetControlActionResponse to protobuf object *otg.SetControlActionResponse + // and doesn't set defaults + msg() *otg.SetControlActionResponse + // setMsg unmarshals SetControlActionResponse from protobuf object *otg.SetControlActionResponse + // and doesn't set defaults + setMsg(*otg.SetControlActionResponse) SetControlActionResponse + // provides marshal interface + Marshal() marshalSetControlActionResponse + // provides unmarshal interface + Unmarshal() unMarshalSetControlActionResponse + // validate validates SetControlActionResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (SetControlActionResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ControlActionResponse returns ControlActionResponse, set in SetControlActionResponse. + // ControlActionResponse is response for action triggered against configured resources along with warnings. + ControlActionResponse() ControlActionResponse + // SetControlActionResponse assigns ControlActionResponse provided by user to SetControlActionResponse. + // ControlActionResponse is response for action triggered against configured resources along with warnings. + SetControlActionResponse(value ControlActionResponse) SetControlActionResponse + // HasControlActionResponse checks if ControlActionResponse has been set in SetControlActionResponse + HasControlActionResponse() bool + setNil() +} + +// description is TBD +// ControlActionResponse returns a ControlActionResponse +func (obj *setControlActionResponse) ControlActionResponse() ControlActionResponse { + if obj.obj.ControlActionResponse == nil { + obj.obj.ControlActionResponse = NewControlActionResponse().msg() + } + if obj.controlActionResponseHolder == nil { + obj.controlActionResponseHolder = &controlActionResponse{obj: obj.obj.ControlActionResponse} + } + return obj.controlActionResponseHolder +} + +// description is TBD +// ControlActionResponse returns a ControlActionResponse +func (obj *setControlActionResponse) HasControlActionResponse() bool { + return obj.obj.ControlActionResponse != nil +} + +// description is TBD +// SetControlActionResponse sets the ControlActionResponse value in the SetControlActionResponse object +func (obj *setControlActionResponse) SetControlActionResponse(value ControlActionResponse) SetControlActionResponse { + + obj.controlActionResponseHolder = nil + obj.obj.ControlActionResponse = value.msg() + + return obj +} + +func (obj *setControlActionResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.ControlActionResponse != nil { + + obj.ControlActionResponse().validateObj(vObj, set_default) + } + +} + +func (obj *setControlActionResponse) setDefault() { + +} diff --git a/gosnappi/set_control_state_response.go b/gosnappi/set_control_state_response.go new file mode 100644 index 00000000..8fb04c16 --- /dev/null +++ b/gosnappi/set_control_state_response.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** SetControlStateResponse ***** +type setControlStateResponse struct { + validation + obj *otg.SetControlStateResponse + marshaller marshalSetControlStateResponse + unMarshaller unMarshalSetControlStateResponse + warningHolder Warning +} + +func NewSetControlStateResponse() SetControlStateResponse { + obj := setControlStateResponse{obj: &otg.SetControlStateResponse{}} + obj.setDefault() + return &obj +} + +func (obj *setControlStateResponse) msg() *otg.SetControlStateResponse { + return obj.obj +} + +func (obj *setControlStateResponse) setMsg(msg *otg.SetControlStateResponse) SetControlStateResponse { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalsetControlStateResponse struct { + obj *setControlStateResponse +} + +type marshalSetControlStateResponse interface { + // ToProto marshals SetControlStateResponse to protobuf object *otg.SetControlStateResponse + ToProto() (*otg.SetControlStateResponse, error) + // ToPbText marshals SetControlStateResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals SetControlStateResponse to YAML text + ToYaml() (string, error) + // ToJson marshals SetControlStateResponse to JSON text + ToJson() (string, error) +} + +type unMarshalsetControlStateResponse struct { + obj *setControlStateResponse +} + +type unMarshalSetControlStateResponse interface { + // FromProto unmarshals SetControlStateResponse from protobuf object *otg.SetControlStateResponse + FromProto(msg *otg.SetControlStateResponse) (SetControlStateResponse, error) + // FromPbText unmarshals SetControlStateResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals SetControlStateResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals SetControlStateResponse from JSON text + FromJson(value string) error +} + +func (obj *setControlStateResponse) Marshal() marshalSetControlStateResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalsetControlStateResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *setControlStateResponse) Unmarshal() unMarshalSetControlStateResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalsetControlStateResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalsetControlStateResponse) ToProto() (*otg.SetControlStateResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalsetControlStateResponse) FromProto(msg *otg.SetControlStateResponse) (SetControlStateResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalsetControlStateResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalsetControlStateResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalsetControlStateResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalsetControlStateResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalsetControlStateResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalsetControlStateResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *setControlStateResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *setControlStateResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *setControlStateResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *setControlStateResponse) Clone() (SetControlStateResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewSetControlStateResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *setControlStateResponse) setNil() { + obj.warningHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// SetControlStateResponse is description is TBD +type SetControlStateResponse interface { + Validation + // msg marshals SetControlStateResponse to protobuf object *otg.SetControlStateResponse + // and doesn't set defaults + msg() *otg.SetControlStateResponse + // setMsg unmarshals SetControlStateResponse from protobuf object *otg.SetControlStateResponse + // and doesn't set defaults + setMsg(*otg.SetControlStateResponse) SetControlStateResponse + // provides marshal interface + Marshal() marshalSetControlStateResponse + // provides unmarshal interface + Unmarshal() unMarshalSetControlStateResponse + // validate validates SetControlStateResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (SetControlStateResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Warning returns Warning, set in SetControlStateResponse. + // Warning is a list of warnings that have occurred while executing the request. + Warning() Warning + // SetWarning assigns Warning provided by user to SetControlStateResponse. + // Warning is a list of warnings that have occurred while executing the request. + SetWarning(value Warning) SetControlStateResponse + // HasWarning checks if Warning has been set in SetControlStateResponse + HasWarning() bool + setNil() +} + +// description is TBD +// Warning returns a Warning +func (obj *setControlStateResponse) Warning() Warning { + if obj.obj.Warning == nil { + obj.obj.Warning = NewWarning().msg() + } + if obj.warningHolder == nil { + obj.warningHolder = &warning{obj: obj.obj.Warning} + } + return obj.warningHolder +} + +// description is TBD +// Warning returns a Warning +func (obj *setControlStateResponse) HasWarning() bool { + return obj.obj.Warning != nil +} + +// description is TBD +// SetWarning sets the Warning value in the SetControlStateResponse object +func (obj *setControlStateResponse) SetWarning(value Warning) SetControlStateResponse { + + obj.warningHolder = nil + obj.obj.Warning = value.msg() + + return obj +} + +func (obj *setControlStateResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Warning != nil { + + obj.Warning().validateObj(vObj, set_default) + } + +} + +func (obj *setControlStateResponse) setDefault() { + +} diff --git a/gosnappi/state_port.go b/gosnappi/state_port.go new file mode 100644 index 00000000..a1640044 --- /dev/null +++ b/gosnappi/state_port.go @@ -0,0 +1,443 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StatePort ***** +type statePort struct { + validation + obj *otg.StatePort + marshaller marshalStatePort + unMarshaller unMarshalStatePort + linkHolder StatePortLink + captureHolder StatePortCapture +} + +func NewStatePort() StatePort { + obj := statePort{obj: &otg.StatePort{}} + obj.setDefault() + return &obj +} + +func (obj *statePort) msg() *otg.StatePort { + return obj.obj +} + +func (obj *statePort) setMsg(msg *otg.StatePort) StatePort { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstatePort struct { + obj *statePort +} + +type marshalStatePort interface { + // ToProto marshals StatePort to protobuf object *otg.StatePort + ToProto() (*otg.StatePort, error) + // ToPbText marshals StatePort to protobuf text + ToPbText() (string, error) + // ToYaml marshals StatePort to YAML text + ToYaml() (string, error) + // ToJson marshals StatePort to JSON text + ToJson() (string, error) +} + +type unMarshalstatePort struct { + obj *statePort +} + +type unMarshalStatePort interface { + // FromProto unmarshals StatePort from protobuf object *otg.StatePort + FromProto(msg *otg.StatePort) (StatePort, error) + // FromPbText unmarshals StatePort from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StatePort from YAML text + FromYaml(value string) error + // FromJson unmarshals StatePort from JSON text + FromJson(value string) error +} + +func (obj *statePort) Marshal() marshalStatePort { + if obj.marshaller == nil { + obj.marshaller = &marshalstatePort{obj: obj} + } + return obj.marshaller +} + +func (obj *statePort) Unmarshal() unMarshalStatePort { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstatePort{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstatePort) ToProto() (*otg.StatePort, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstatePort) FromProto(msg *otg.StatePort) (StatePort, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstatePort) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstatePort) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstatePort) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstatePort) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstatePort) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstatePort) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *statePort) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *statePort) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *statePort) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *statePort) Clone() (StatePort, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStatePort() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *statePort) setNil() { + obj.linkHolder = nil + obj.captureHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// StatePort is states associated with configured ports. +type StatePort interface { + Validation + // msg marshals StatePort to protobuf object *otg.StatePort + // and doesn't set defaults + msg() *otg.StatePort + // setMsg unmarshals StatePort from protobuf object *otg.StatePort + // and doesn't set defaults + setMsg(*otg.StatePort) StatePort + // provides marshal interface + Marshal() marshalStatePort + // provides unmarshal interface + Unmarshal() unMarshalStatePort + // validate validates StatePort + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StatePort, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns StatePortChoiceEnum, set in StatePort + Choice() StatePortChoiceEnum + // setChoice assigns StatePortChoiceEnum provided by user to StatePort + setChoice(value StatePortChoiceEnum) StatePort + // Link returns StatePortLink, set in StatePort. + // StatePortLink is sets the link of configured ports. + Link() StatePortLink + // SetLink assigns StatePortLink provided by user to StatePort. + // StatePortLink is sets the link of configured ports. + SetLink(value StatePortLink) StatePort + // HasLink checks if Link has been set in StatePort + HasLink() bool + // Capture returns StatePortCapture, set in StatePort. + // StatePortCapture is sets the capture state of configured ports + Capture() StatePortCapture + // SetCapture assigns StatePortCapture provided by user to StatePort. + // StatePortCapture is sets the capture state of configured ports + SetCapture(value StatePortCapture) StatePort + // HasCapture checks if Capture has been set in StatePort + HasCapture() bool + setNil() +} + +type StatePortChoiceEnum string + +// Enum of Choice on StatePort +var StatePortChoice = struct { + LINK StatePortChoiceEnum + CAPTURE StatePortChoiceEnum +}{ + LINK: StatePortChoiceEnum("link"), + CAPTURE: StatePortChoiceEnum("capture"), +} + +func (obj *statePort) Choice() StatePortChoiceEnum { + return StatePortChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *statePort) setChoice(value StatePortChoiceEnum) StatePort { + intValue, ok := otg.StatePort_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StatePortChoiceEnum", string(value))) + return obj + } + enumValue := otg.StatePort_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Capture = nil + obj.captureHolder = nil + obj.obj.Link = nil + obj.linkHolder = nil + + if value == StatePortChoice.LINK { + obj.obj.Link = NewStatePortLink().msg() + } + + if value == StatePortChoice.CAPTURE { + obj.obj.Capture = NewStatePortCapture().msg() + } + + return obj +} + +// description is TBD +// Link returns a StatePortLink +func (obj *statePort) Link() StatePortLink { + if obj.obj.Link == nil { + obj.setChoice(StatePortChoice.LINK) + } + if obj.linkHolder == nil { + obj.linkHolder = &statePortLink{obj: obj.obj.Link} + } + return obj.linkHolder +} + +// description is TBD +// Link returns a StatePortLink +func (obj *statePort) HasLink() bool { + return obj.obj.Link != nil +} + +// description is TBD +// SetLink sets the StatePortLink value in the StatePort object +func (obj *statePort) SetLink(value StatePortLink) StatePort { + obj.setChoice(StatePortChoice.LINK) + obj.linkHolder = nil + obj.obj.Link = value.msg() + + return obj +} + +// description is TBD +// Capture returns a StatePortCapture +func (obj *statePort) Capture() StatePortCapture { + if obj.obj.Capture == nil { + obj.setChoice(StatePortChoice.CAPTURE) + } + if obj.captureHolder == nil { + obj.captureHolder = &statePortCapture{obj: obj.obj.Capture} + } + return obj.captureHolder +} + +// description is TBD +// Capture returns a StatePortCapture +func (obj *statePort) HasCapture() bool { + return obj.obj.Capture != nil +} + +// description is TBD +// SetCapture sets the StatePortCapture value in the StatePort object +func (obj *statePort) SetCapture(value StatePortCapture) StatePort { + obj.setChoice(StatePortChoice.CAPTURE) + obj.captureHolder = nil + obj.obj.Capture = value.msg() + + return obj +} + +func (obj *statePort) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface StatePort") + } + + if obj.obj.Link != nil { + + obj.Link().validateObj(vObj, set_default) + } + + if obj.obj.Capture != nil { + + obj.Capture().validateObj(vObj, set_default) + } + +} + +func (obj *statePort) setDefault() { + var choices_set int = 0 + var choice StatePortChoiceEnum + + if obj.obj.Link != nil { + choices_set += 1 + choice = StatePortChoice.LINK + } + + if obj.obj.Capture != nil { + choices_set += 1 + choice = StatePortChoice.CAPTURE + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in StatePort") + } + } else { + intVal := otg.StatePort_Choice_Enum_value[string(choice)] + enumValue := otg.StatePort_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/state_port_capture.go b/gosnappi/state_port_capture.go new file mode 100644 index 00000000..11da66e4 --- /dev/null +++ b/gosnappi/state_port_capture.go @@ -0,0 +1,355 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StatePortCapture ***** +type statePortCapture struct { + validation + obj *otg.StatePortCapture + marshaller marshalStatePortCapture + unMarshaller unMarshalStatePortCapture +} + +func NewStatePortCapture() StatePortCapture { + obj := statePortCapture{obj: &otg.StatePortCapture{}} + obj.setDefault() + return &obj +} + +func (obj *statePortCapture) msg() *otg.StatePortCapture { + return obj.obj +} + +func (obj *statePortCapture) setMsg(msg *otg.StatePortCapture) StatePortCapture { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstatePortCapture struct { + obj *statePortCapture +} + +type marshalStatePortCapture interface { + // ToProto marshals StatePortCapture to protobuf object *otg.StatePortCapture + ToProto() (*otg.StatePortCapture, error) + // ToPbText marshals StatePortCapture to protobuf text + ToPbText() (string, error) + // ToYaml marshals StatePortCapture to YAML text + ToYaml() (string, error) + // ToJson marshals StatePortCapture to JSON text + ToJson() (string, error) +} + +type unMarshalstatePortCapture struct { + obj *statePortCapture +} + +type unMarshalStatePortCapture interface { + // FromProto unmarshals StatePortCapture from protobuf object *otg.StatePortCapture + FromProto(msg *otg.StatePortCapture) (StatePortCapture, error) + // FromPbText unmarshals StatePortCapture from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StatePortCapture from YAML text + FromYaml(value string) error + // FromJson unmarshals StatePortCapture from JSON text + FromJson(value string) error +} + +func (obj *statePortCapture) Marshal() marshalStatePortCapture { + if obj.marshaller == nil { + obj.marshaller = &marshalstatePortCapture{obj: obj} + } + return obj.marshaller +} + +func (obj *statePortCapture) Unmarshal() unMarshalStatePortCapture { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstatePortCapture{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstatePortCapture) ToProto() (*otg.StatePortCapture, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstatePortCapture) FromProto(msg *otg.StatePortCapture) (StatePortCapture, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstatePortCapture) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstatePortCapture) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstatePortCapture) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstatePortCapture) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstatePortCapture) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstatePortCapture) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *statePortCapture) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *statePortCapture) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *statePortCapture) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *statePortCapture) Clone() (StatePortCapture, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStatePortCapture() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// StatePortCapture is sets the capture state of configured ports +type StatePortCapture interface { + Validation + // msg marshals StatePortCapture to protobuf object *otg.StatePortCapture + // and doesn't set defaults + msg() *otg.StatePortCapture + // setMsg unmarshals StatePortCapture from protobuf object *otg.StatePortCapture + // and doesn't set defaults + setMsg(*otg.StatePortCapture) StatePortCapture + // provides marshal interface + Marshal() marshalStatePortCapture + // provides unmarshal interface + Unmarshal() unMarshalStatePortCapture + // validate validates StatePortCapture + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StatePortCapture, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PortNames returns []string, set in StatePortCapture. + PortNames() []string + // SetPortNames assigns []string provided by user to StatePortCapture + SetPortNames(value []string) StatePortCapture + // State returns StatePortCaptureStateEnum, set in StatePortCapture + State() StatePortCaptureStateEnum + // SetState assigns StatePortCaptureStateEnum provided by user to StatePortCapture + SetState(value StatePortCaptureStateEnum) StatePortCapture +} + +// The names of ports to which the capture state will be applied to. If the list of port_names is empty or null the state will be applied to all configured ports. +// If the list is not empty any port that is not included in the list of port_names MUST be ignored and not included in the state change. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// PortNames returns a []string +func (obj *statePortCapture) PortNames() []string { + if obj.obj.PortNames == nil { + obj.obj.PortNames = make([]string, 0) + } + return obj.obj.PortNames +} + +// The names of ports to which the capture state will be applied to. If the list of port_names is empty or null the state will be applied to all configured ports. +// If the list is not empty any port that is not included in the list of port_names MUST be ignored and not included in the state change. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// SetPortNames sets the []string value in the StatePortCapture object +func (obj *statePortCapture) SetPortNames(value []string) StatePortCapture { + + if obj.obj.PortNames == nil { + obj.obj.PortNames = make([]string, 0) + } + obj.obj.PortNames = value + + return obj +} + +type StatePortCaptureStateEnum string + +// Enum of State on StatePortCapture +var StatePortCaptureState = struct { + START StatePortCaptureStateEnum + STOP StatePortCaptureStateEnum +}{ + START: StatePortCaptureStateEnum("start"), + STOP: StatePortCaptureStateEnum("stop"), +} + +func (obj *statePortCapture) State() StatePortCaptureStateEnum { + return StatePortCaptureStateEnum(obj.obj.State.Enum().String()) +} + +func (obj *statePortCapture) SetState(value StatePortCaptureStateEnum) StatePortCapture { + intValue, ok := otg.StatePortCapture_State_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StatePortCaptureStateEnum", string(value))) + return obj + } + enumValue := otg.StatePortCapture_State_Enum(intValue) + obj.obj.State = &enumValue + + return obj +} + +func (obj *statePortCapture) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // State is required + if obj.obj.State == nil { + vObj.validationErrors = append(vObj.validationErrors, "State is required field on interface StatePortCapture") + } +} + +func (obj *statePortCapture) setDefault() { + +} diff --git a/gosnappi/state_port_link.go b/gosnappi/state_port_link.go new file mode 100644 index 00000000..ce76a379 --- /dev/null +++ b/gosnappi/state_port_link.go @@ -0,0 +1,353 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StatePortLink ***** +type statePortLink struct { + validation + obj *otg.StatePortLink + marshaller marshalStatePortLink + unMarshaller unMarshalStatePortLink +} + +func NewStatePortLink() StatePortLink { + obj := statePortLink{obj: &otg.StatePortLink{}} + obj.setDefault() + return &obj +} + +func (obj *statePortLink) msg() *otg.StatePortLink { + return obj.obj +} + +func (obj *statePortLink) setMsg(msg *otg.StatePortLink) StatePortLink { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstatePortLink struct { + obj *statePortLink +} + +type marshalStatePortLink interface { + // ToProto marshals StatePortLink to protobuf object *otg.StatePortLink + ToProto() (*otg.StatePortLink, error) + // ToPbText marshals StatePortLink to protobuf text + ToPbText() (string, error) + // ToYaml marshals StatePortLink to YAML text + ToYaml() (string, error) + // ToJson marshals StatePortLink to JSON text + ToJson() (string, error) +} + +type unMarshalstatePortLink struct { + obj *statePortLink +} + +type unMarshalStatePortLink interface { + // FromProto unmarshals StatePortLink from protobuf object *otg.StatePortLink + FromProto(msg *otg.StatePortLink) (StatePortLink, error) + // FromPbText unmarshals StatePortLink from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StatePortLink from YAML text + FromYaml(value string) error + // FromJson unmarshals StatePortLink from JSON text + FromJson(value string) error +} + +func (obj *statePortLink) Marshal() marshalStatePortLink { + if obj.marshaller == nil { + obj.marshaller = &marshalstatePortLink{obj: obj} + } + return obj.marshaller +} + +func (obj *statePortLink) Unmarshal() unMarshalStatePortLink { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstatePortLink{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstatePortLink) ToProto() (*otg.StatePortLink, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstatePortLink) FromProto(msg *otg.StatePortLink) (StatePortLink, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstatePortLink) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstatePortLink) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstatePortLink) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstatePortLink) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstatePortLink) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstatePortLink) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *statePortLink) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *statePortLink) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *statePortLink) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *statePortLink) Clone() (StatePortLink, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStatePortLink() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// StatePortLink is sets the link of configured ports. +type StatePortLink interface { + Validation + // msg marshals StatePortLink to protobuf object *otg.StatePortLink + // and doesn't set defaults + msg() *otg.StatePortLink + // setMsg unmarshals StatePortLink from protobuf object *otg.StatePortLink + // and doesn't set defaults + setMsg(*otg.StatePortLink) StatePortLink + // provides marshal interface + Marshal() marshalStatePortLink + // provides unmarshal interface + Unmarshal() unMarshalStatePortLink + // validate validates StatePortLink + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StatePortLink, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PortNames returns []string, set in StatePortLink. + PortNames() []string + // SetPortNames assigns []string provided by user to StatePortLink + SetPortNames(value []string) StatePortLink + // State returns StatePortLinkStateEnum, set in StatePortLink + State() StatePortLinkStateEnum + // SetState assigns StatePortLinkStateEnum provided by user to StatePortLink + SetState(value StatePortLinkStateEnum) StatePortLink +} + +// The names of target ports. An empty or null list will target all ports. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// PortNames returns a []string +func (obj *statePortLink) PortNames() []string { + if obj.obj.PortNames == nil { + obj.obj.PortNames = make([]string, 0) + } + return obj.obj.PortNames +} + +// The names of target ports. An empty or null list will target all ports. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// SetPortNames sets the []string value in the StatePortLink object +func (obj *statePortLink) SetPortNames(value []string) StatePortLink { + + if obj.obj.PortNames == nil { + obj.obj.PortNames = make([]string, 0) + } + obj.obj.PortNames = value + + return obj +} + +type StatePortLinkStateEnum string + +// Enum of State on StatePortLink +var StatePortLinkState = struct { + UP StatePortLinkStateEnum + DOWN StatePortLinkStateEnum +}{ + UP: StatePortLinkStateEnum("up"), + DOWN: StatePortLinkStateEnum("down"), +} + +func (obj *statePortLink) State() StatePortLinkStateEnum { + return StatePortLinkStateEnum(obj.obj.State.Enum().String()) +} + +func (obj *statePortLink) SetState(value StatePortLinkStateEnum) StatePortLink { + intValue, ok := otg.StatePortLink_State_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StatePortLinkStateEnum", string(value))) + return obj + } + enumValue := otg.StatePortLink_State_Enum(intValue) + obj.obj.State = &enumValue + + return obj +} + +func (obj *statePortLink) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // State is required + if obj.obj.State == nil { + vObj.validationErrors = append(vObj.validationErrors, "State is required field on interface StatePortLink") + } +} + +func (obj *statePortLink) setDefault() { + +} diff --git a/gosnappi/state_protocol.go b/gosnappi/state_protocol.go new file mode 100644 index 00000000..2588a9f2 --- /dev/null +++ b/gosnappi/state_protocol.go @@ -0,0 +1,669 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StateProtocol ***** +type stateProtocol struct { + validation + obj *otg.StateProtocol + marshaller marshalStateProtocol + unMarshaller unMarshalStateProtocol + allHolder StateProtocolAll + routeHolder StateProtocolRoute + lacpHolder StateProtocolLacp + bgpHolder StateProtocolBgp + isisHolder StateProtocolIsis + ospfv2Holder StateProtocolOspfv2 +} + +func NewStateProtocol() StateProtocol { + obj := stateProtocol{obj: &otg.StateProtocol{}} + obj.setDefault() + return &obj +} + +func (obj *stateProtocol) msg() *otg.StateProtocol { + return obj.obj +} + +func (obj *stateProtocol) setMsg(msg *otg.StateProtocol) StateProtocol { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstateProtocol struct { + obj *stateProtocol +} + +type marshalStateProtocol interface { + // ToProto marshals StateProtocol to protobuf object *otg.StateProtocol + ToProto() (*otg.StateProtocol, error) + // ToPbText marshals StateProtocol to protobuf text + ToPbText() (string, error) + // ToYaml marshals StateProtocol to YAML text + ToYaml() (string, error) + // ToJson marshals StateProtocol to JSON text + ToJson() (string, error) +} + +type unMarshalstateProtocol struct { + obj *stateProtocol +} + +type unMarshalStateProtocol interface { + // FromProto unmarshals StateProtocol from protobuf object *otg.StateProtocol + FromProto(msg *otg.StateProtocol) (StateProtocol, error) + // FromPbText unmarshals StateProtocol from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StateProtocol from YAML text + FromYaml(value string) error + // FromJson unmarshals StateProtocol from JSON text + FromJson(value string) error +} + +func (obj *stateProtocol) Marshal() marshalStateProtocol { + if obj.marshaller == nil { + obj.marshaller = &marshalstateProtocol{obj: obj} + } + return obj.marshaller +} + +func (obj *stateProtocol) Unmarshal() unMarshalStateProtocol { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstateProtocol{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstateProtocol) ToProto() (*otg.StateProtocol, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstateProtocol) FromProto(msg *otg.StateProtocol) (StateProtocol, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstateProtocol) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstateProtocol) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstateProtocol) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocol) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstateProtocol) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocol) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *stateProtocol) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *stateProtocol) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *stateProtocol) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *stateProtocol) Clone() (StateProtocol, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStateProtocol() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *stateProtocol) setNil() { + obj.allHolder = nil + obj.routeHolder = nil + obj.lacpHolder = nil + obj.bgpHolder = nil + obj.isisHolder = nil + obj.ospfv2Holder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// StateProtocol is states associated with protocols on configured resources. +type StateProtocol interface { + Validation + // msg marshals StateProtocol to protobuf object *otg.StateProtocol + // and doesn't set defaults + msg() *otg.StateProtocol + // setMsg unmarshals StateProtocol from protobuf object *otg.StateProtocol + // and doesn't set defaults + setMsg(*otg.StateProtocol) StateProtocol + // provides marshal interface + Marshal() marshalStateProtocol + // provides unmarshal interface + Unmarshal() unMarshalStateProtocol + // validate validates StateProtocol + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StateProtocol, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns StateProtocolChoiceEnum, set in StateProtocol + Choice() StateProtocolChoiceEnum + // setChoice assigns StateProtocolChoiceEnum provided by user to StateProtocol + setChoice(value StateProtocolChoiceEnum) StateProtocol + // All returns StateProtocolAll, set in StateProtocol. + // StateProtocolAll is sets all configured protocols to `start` or `stop` state. + // Setting protocol state to `start` shall be a no-op if preceding `set_config` API call was made with `config.options.protocol_options.auto_start_all` set to `true` or if all the configured protocols are already started. + All() StateProtocolAll + // SetAll assigns StateProtocolAll provided by user to StateProtocol. + // StateProtocolAll is sets all configured protocols to `start` or `stop` state. + // Setting protocol state to `start` shall be a no-op if preceding `set_config` API call was made with `config.options.protocol_options.auto_start_all` set to `true` or if all the configured protocols are already started. + SetAll(value StateProtocolAll) StateProtocol + // HasAll checks if All has been set in StateProtocol + HasAll() bool + // Route returns StateProtocolRoute, set in StateProtocol. + // StateProtocolRoute is sets the state of configured routes + Route() StateProtocolRoute + // SetRoute assigns StateProtocolRoute provided by user to StateProtocol. + // StateProtocolRoute is sets the state of configured routes + SetRoute(value StateProtocolRoute) StateProtocol + // HasRoute checks if Route has been set in StateProtocol + HasRoute() bool + // Lacp returns StateProtocolLacp, set in StateProtocol. + // StateProtocolLacp is sets state of configured LACP + Lacp() StateProtocolLacp + // SetLacp assigns StateProtocolLacp provided by user to StateProtocol. + // StateProtocolLacp is sets state of configured LACP + SetLacp(value StateProtocolLacp) StateProtocol + // HasLacp checks if Lacp has been set in StateProtocol + HasLacp() bool + // Bgp returns StateProtocolBgp, set in StateProtocol. + // StateProtocolBgp is sets state of configured BGP peers. + Bgp() StateProtocolBgp + // SetBgp assigns StateProtocolBgp provided by user to StateProtocol. + // StateProtocolBgp is sets state of configured BGP peers. + SetBgp(value StateProtocolBgp) StateProtocol + // HasBgp checks if Bgp has been set in StateProtocol + HasBgp() bool + // Isis returns StateProtocolIsis, set in StateProtocol. + // StateProtocolIsis is sets state of configured ISIS routers. + Isis() StateProtocolIsis + // SetIsis assigns StateProtocolIsis provided by user to StateProtocol. + // StateProtocolIsis is sets state of configured ISIS routers. + SetIsis(value StateProtocolIsis) StateProtocol + // HasIsis checks if Isis has been set in StateProtocol + HasIsis() bool + // Ospfv2 returns StateProtocolOspfv2, set in StateProtocol. + // StateProtocolOspfv2 is sets state of configured OSPFv2 routers. + Ospfv2() StateProtocolOspfv2 + // SetOspfv2 assigns StateProtocolOspfv2 provided by user to StateProtocol. + // StateProtocolOspfv2 is sets state of configured OSPFv2 routers. + SetOspfv2(value StateProtocolOspfv2) StateProtocol + // HasOspfv2 checks if Ospfv2 has been set in StateProtocol + HasOspfv2() bool + setNil() +} + +type StateProtocolChoiceEnum string + +// Enum of Choice on StateProtocol +var StateProtocolChoice = struct { + ALL StateProtocolChoiceEnum + ROUTE StateProtocolChoiceEnum + LACP StateProtocolChoiceEnum + BGP StateProtocolChoiceEnum + ISIS StateProtocolChoiceEnum + OSPFV2 StateProtocolChoiceEnum +}{ + ALL: StateProtocolChoiceEnum("all"), + ROUTE: StateProtocolChoiceEnum("route"), + LACP: StateProtocolChoiceEnum("lacp"), + BGP: StateProtocolChoiceEnum("bgp"), + ISIS: StateProtocolChoiceEnum("isis"), + OSPFV2: StateProtocolChoiceEnum("ospfv2"), +} + +func (obj *stateProtocol) Choice() StateProtocolChoiceEnum { + return StateProtocolChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *stateProtocol) setChoice(value StateProtocolChoiceEnum) StateProtocol { + intValue, ok := otg.StateProtocol_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StateProtocolChoiceEnum", string(value))) + return obj + } + enumValue := otg.StateProtocol_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ospfv2 = nil + obj.ospfv2Holder = nil + obj.obj.Isis = nil + obj.isisHolder = nil + obj.obj.Bgp = nil + obj.bgpHolder = nil + obj.obj.Lacp = nil + obj.lacpHolder = nil + obj.obj.Route = nil + obj.routeHolder = nil + obj.obj.All = nil + obj.allHolder = nil + + if value == StateProtocolChoice.ALL { + obj.obj.All = NewStateProtocolAll().msg() + } + + if value == StateProtocolChoice.ROUTE { + obj.obj.Route = NewStateProtocolRoute().msg() + } + + if value == StateProtocolChoice.LACP { + obj.obj.Lacp = NewStateProtocolLacp().msg() + } + + if value == StateProtocolChoice.BGP { + obj.obj.Bgp = NewStateProtocolBgp().msg() + } + + if value == StateProtocolChoice.ISIS { + obj.obj.Isis = NewStateProtocolIsis().msg() + } + + if value == StateProtocolChoice.OSPFV2 { + obj.obj.Ospfv2 = NewStateProtocolOspfv2().msg() + } + + return obj +} + +// description is TBD +// All returns a StateProtocolAll +func (obj *stateProtocol) All() StateProtocolAll { + if obj.obj.All == nil { + obj.setChoice(StateProtocolChoice.ALL) + } + if obj.allHolder == nil { + obj.allHolder = &stateProtocolAll{obj: obj.obj.All} + } + return obj.allHolder +} + +// description is TBD +// All returns a StateProtocolAll +func (obj *stateProtocol) HasAll() bool { + return obj.obj.All != nil +} + +// description is TBD +// SetAll sets the StateProtocolAll value in the StateProtocol object +func (obj *stateProtocol) SetAll(value StateProtocolAll) StateProtocol { + obj.setChoice(StateProtocolChoice.ALL) + obj.allHolder = nil + obj.obj.All = value.msg() + + return obj +} + +// description is TBD +// Route returns a StateProtocolRoute +func (obj *stateProtocol) Route() StateProtocolRoute { + if obj.obj.Route == nil { + obj.setChoice(StateProtocolChoice.ROUTE) + } + if obj.routeHolder == nil { + obj.routeHolder = &stateProtocolRoute{obj: obj.obj.Route} + } + return obj.routeHolder +} + +// description is TBD +// Route returns a StateProtocolRoute +func (obj *stateProtocol) HasRoute() bool { + return obj.obj.Route != nil +} + +// description is TBD +// SetRoute sets the StateProtocolRoute value in the StateProtocol object +func (obj *stateProtocol) SetRoute(value StateProtocolRoute) StateProtocol { + obj.setChoice(StateProtocolChoice.ROUTE) + obj.routeHolder = nil + obj.obj.Route = value.msg() + + return obj +} + +// description is TBD +// Lacp returns a StateProtocolLacp +func (obj *stateProtocol) Lacp() StateProtocolLacp { + if obj.obj.Lacp == nil { + obj.setChoice(StateProtocolChoice.LACP) + } + if obj.lacpHolder == nil { + obj.lacpHolder = &stateProtocolLacp{obj: obj.obj.Lacp} + } + return obj.lacpHolder +} + +// description is TBD +// Lacp returns a StateProtocolLacp +func (obj *stateProtocol) HasLacp() bool { + return obj.obj.Lacp != nil +} + +// description is TBD +// SetLacp sets the StateProtocolLacp value in the StateProtocol object +func (obj *stateProtocol) SetLacp(value StateProtocolLacp) StateProtocol { + obj.setChoice(StateProtocolChoice.LACP) + obj.lacpHolder = nil + obj.obj.Lacp = value.msg() + + return obj +} + +// description is TBD +// Bgp returns a StateProtocolBgp +func (obj *stateProtocol) Bgp() StateProtocolBgp { + if obj.obj.Bgp == nil { + obj.setChoice(StateProtocolChoice.BGP) + } + if obj.bgpHolder == nil { + obj.bgpHolder = &stateProtocolBgp{obj: obj.obj.Bgp} + } + return obj.bgpHolder +} + +// description is TBD +// Bgp returns a StateProtocolBgp +func (obj *stateProtocol) HasBgp() bool { + return obj.obj.Bgp != nil +} + +// description is TBD +// SetBgp sets the StateProtocolBgp value in the StateProtocol object +func (obj *stateProtocol) SetBgp(value StateProtocolBgp) StateProtocol { + obj.setChoice(StateProtocolChoice.BGP) + obj.bgpHolder = nil + obj.obj.Bgp = value.msg() + + return obj +} + +// description is TBD +// Isis returns a StateProtocolIsis +func (obj *stateProtocol) Isis() StateProtocolIsis { + if obj.obj.Isis == nil { + obj.setChoice(StateProtocolChoice.ISIS) + } + if obj.isisHolder == nil { + obj.isisHolder = &stateProtocolIsis{obj: obj.obj.Isis} + } + return obj.isisHolder +} + +// description is TBD +// Isis returns a StateProtocolIsis +func (obj *stateProtocol) HasIsis() bool { + return obj.obj.Isis != nil +} + +// description is TBD +// SetIsis sets the StateProtocolIsis value in the StateProtocol object +func (obj *stateProtocol) SetIsis(value StateProtocolIsis) StateProtocol { + obj.setChoice(StateProtocolChoice.ISIS) + obj.isisHolder = nil + obj.obj.Isis = value.msg() + + return obj +} + +// description is TBD +// Ospfv2 returns a StateProtocolOspfv2 +func (obj *stateProtocol) Ospfv2() StateProtocolOspfv2 { + if obj.obj.Ospfv2 == nil { + obj.setChoice(StateProtocolChoice.OSPFV2) + } + if obj.ospfv2Holder == nil { + obj.ospfv2Holder = &stateProtocolOspfv2{obj: obj.obj.Ospfv2} + } + return obj.ospfv2Holder +} + +// description is TBD +// Ospfv2 returns a StateProtocolOspfv2 +func (obj *stateProtocol) HasOspfv2() bool { + return obj.obj.Ospfv2 != nil +} + +// description is TBD +// SetOspfv2 sets the StateProtocolOspfv2 value in the StateProtocol object +func (obj *stateProtocol) SetOspfv2(value StateProtocolOspfv2) StateProtocol { + obj.setChoice(StateProtocolChoice.OSPFV2) + obj.ospfv2Holder = nil + obj.obj.Ospfv2 = value.msg() + + return obj +} + +func (obj *stateProtocol) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface StateProtocol") + } + + if obj.obj.All != nil { + + obj.All().validateObj(vObj, set_default) + } + + if obj.obj.Route != nil { + + obj.Route().validateObj(vObj, set_default) + } + + if obj.obj.Lacp != nil { + + obj.Lacp().validateObj(vObj, set_default) + } + + if obj.obj.Bgp != nil { + + obj.Bgp().validateObj(vObj, set_default) + } + + if obj.obj.Isis != nil { + + obj.Isis().validateObj(vObj, set_default) + } + + if obj.obj.Ospfv2 != nil { + + obj.Ospfv2().validateObj(vObj, set_default) + } + +} + +func (obj *stateProtocol) setDefault() { + var choices_set int = 0 + var choice StateProtocolChoiceEnum + + if obj.obj.All != nil { + choices_set += 1 + choice = StateProtocolChoice.ALL + } + + if obj.obj.Route != nil { + choices_set += 1 + choice = StateProtocolChoice.ROUTE + } + + if obj.obj.Lacp != nil { + choices_set += 1 + choice = StateProtocolChoice.LACP + } + + if obj.obj.Bgp != nil { + choices_set += 1 + choice = StateProtocolChoice.BGP + } + + if obj.obj.Isis != nil { + choices_set += 1 + choice = StateProtocolChoice.ISIS + } + + if obj.obj.Ospfv2 != nil { + choices_set += 1 + choice = StateProtocolChoice.OSPFV2 + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in StateProtocol") + } + } else { + intVal := otg.StateProtocol_Choice_Enum_value[string(choice)] + enumValue := otg.StateProtocol_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/state_protocol_all.go b/gosnappi/state_protocol_all.go new file mode 100644 index 00000000..d0a1c18b --- /dev/null +++ b/gosnappi/state_protocol_all.go @@ -0,0 +1,315 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StateProtocolAll ***** +type stateProtocolAll struct { + validation + obj *otg.StateProtocolAll + marshaller marshalStateProtocolAll + unMarshaller unMarshalStateProtocolAll +} + +func NewStateProtocolAll() StateProtocolAll { + obj := stateProtocolAll{obj: &otg.StateProtocolAll{}} + obj.setDefault() + return &obj +} + +func (obj *stateProtocolAll) msg() *otg.StateProtocolAll { + return obj.obj +} + +func (obj *stateProtocolAll) setMsg(msg *otg.StateProtocolAll) StateProtocolAll { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstateProtocolAll struct { + obj *stateProtocolAll +} + +type marshalStateProtocolAll interface { + // ToProto marshals StateProtocolAll to protobuf object *otg.StateProtocolAll + ToProto() (*otg.StateProtocolAll, error) + // ToPbText marshals StateProtocolAll to protobuf text + ToPbText() (string, error) + // ToYaml marshals StateProtocolAll to YAML text + ToYaml() (string, error) + // ToJson marshals StateProtocolAll to JSON text + ToJson() (string, error) +} + +type unMarshalstateProtocolAll struct { + obj *stateProtocolAll +} + +type unMarshalStateProtocolAll interface { + // FromProto unmarshals StateProtocolAll from protobuf object *otg.StateProtocolAll + FromProto(msg *otg.StateProtocolAll) (StateProtocolAll, error) + // FromPbText unmarshals StateProtocolAll from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StateProtocolAll from YAML text + FromYaml(value string) error + // FromJson unmarshals StateProtocolAll from JSON text + FromJson(value string) error +} + +func (obj *stateProtocolAll) Marshal() marshalStateProtocolAll { + if obj.marshaller == nil { + obj.marshaller = &marshalstateProtocolAll{obj: obj} + } + return obj.marshaller +} + +func (obj *stateProtocolAll) Unmarshal() unMarshalStateProtocolAll { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstateProtocolAll{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstateProtocolAll) ToProto() (*otg.StateProtocolAll, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstateProtocolAll) FromProto(msg *otg.StateProtocolAll) (StateProtocolAll, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstateProtocolAll) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstateProtocolAll) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstateProtocolAll) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolAll) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstateProtocolAll) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolAll) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *stateProtocolAll) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *stateProtocolAll) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *stateProtocolAll) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *stateProtocolAll) Clone() (StateProtocolAll, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStateProtocolAll() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// StateProtocolAll is sets all configured protocols to `start` or `stop` state. +// Setting protocol state to `start` shall be a no-op if preceding `set_config` API call was made with `config.options.protocol_options.auto_start_all` set to `true` or if all the configured protocols are already started. +type StateProtocolAll interface { + Validation + // msg marshals StateProtocolAll to protobuf object *otg.StateProtocolAll + // and doesn't set defaults + msg() *otg.StateProtocolAll + // setMsg unmarshals StateProtocolAll from protobuf object *otg.StateProtocolAll + // and doesn't set defaults + setMsg(*otg.StateProtocolAll) StateProtocolAll + // provides marshal interface + Marshal() marshalStateProtocolAll + // provides unmarshal interface + Unmarshal() unMarshalStateProtocolAll + // validate validates StateProtocolAll + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StateProtocolAll, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // State returns StateProtocolAllStateEnum, set in StateProtocolAll + State() StateProtocolAllStateEnum + // SetState assigns StateProtocolAllStateEnum provided by user to StateProtocolAll + SetState(value StateProtocolAllStateEnum) StateProtocolAll +} + +type StateProtocolAllStateEnum string + +// Enum of State on StateProtocolAll +var StateProtocolAllState = struct { + START StateProtocolAllStateEnum + STOP StateProtocolAllStateEnum +}{ + START: StateProtocolAllStateEnum("start"), + STOP: StateProtocolAllStateEnum("stop"), +} + +func (obj *stateProtocolAll) State() StateProtocolAllStateEnum { + return StateProtocolAllStateEnum(obj.obj.State.Enum().String()) +} + +func (obj *stateProtocolAll) SetState(value StateProtocolAllStateEnum) StateProtocolAll { + intValue, ok := otg.StateProtocolAll_State_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StateProtocolAllStateEnum", string(value))) + return obj + } + enumValue := otg.StateProtocolAll_State_Enum(intValue) + obj.obj.State = &enumValue + + return obj +} + +func (obj *stateProtocolAll) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // State is required + if obj.obj.State == nil { + vObj.validationErrors = append(vObj.validationErrors, "State is required field on interface StateProtocolAll") + } +} + +func (obj *stateProtocolAll) setDefault() { + +} diff --git a/gosnappi/state_protocol_bgp.go b/gosnappi/state_protocol_bgp.go new file mode 100644 index 00000000..844ad134 --- /dev/null +++ b/gosnappi/state_protocol_bgp.go @@ -0,0 +1,387 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StateProtocolBgp ***** +type stateProtocolBgp struct { + validation + obj *otg.StateProtocolBgp + marshaller marshalStateProtocolBgp + unMarshaller unMarshalStateProtocolBgp + peersHolder StateProtocolBgpPeers +} + +func NewStateProtocolBgp() StateProtocolBgp { + obj := stateProtocolBgp{obj: &otg.StateProtocolBgp{}} + obj.setDefault() + return &obj +} + +func (obj *stateProtocolBgp) msg() *otg.StateProtocolBgp { + return obj.obj +} + +func (obj *stateProtocolBgp) setMsg(msg *otg.StateProtocolBgp) StateProtocolBgp { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstateProtocolBgp struct { + obj *stateProtocolBgp +} + +type marshalStateProtocolBgp interface { + // ToProto marshals StateProtocolBgp to protobuf object *otg.StateProtocolBgp + ToProto() (*otg.StateProtocolBgp, error) + // ToPbText marshals StateProtocolBgp to protobuf text + ToPbText() (string, error) + // ToYaml marshals StateProtocolBgp to YAML text + ToYaml() (string, error) + // ToJson marshals StateProtocolBgp to JSON text + ToJson() (string, error) +} + +type unMarshalstateProtocolBgp struct { + obj *stateProtocolBgp +} + +type unMarshalStateProtocolBgp interface { + // FromProto unmarshals StateProtocolBgp from protobuf object *otg.StateProtocolBgp + FromProto(msg *otg.StateProtocolBgp) (StateProtocolBgp, error) + // FromPbText unmarshals StateProtocolBgp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StateProtocolBgp from YAML text + FromYaml(value string) error + // FromJson unmarshals StateProtocolBgp from JSON text + FromJson(value string) error +} + +func (obj *stateProtocolBgp) Marshal() marshalStateProtocolBgp { + if obj.marshaller == nil { + obj.marshaller = &marshalstateProtocolBgp{obj: obj} + } + return obj.marshaller +} + +func (obj *stateProtocolBgp) Unmarshal() unMarshalStateProtocolBgp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstateProtocolBgp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstateProtocolBgp) ToProto() (*otg.StateProtocolBgp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstateProtocolBgp) FromProto(msg *otg.StateProtocolBgp) (StateProtocolBgp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstateProtocolBgp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstateProtocolBgp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstateProtocolBgp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolBgp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstateProtocolBgp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolBgp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *stateProtocolBgp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *stateProtocolBgp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *stateProtocolBgp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *stateProtocolBgp) Clone() (StateProtocolBgp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStateProtocolBgp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *stateProtocolBgp) setNil() { + obj.peersHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// StateProtocolBgp is sets state of configured BGP peers. +type StateProtocolBgp interface { + Validation + // msg marshals StateProtocolBgp to protobuf object *otg.StateProtocolBgp + // and doesn't set defaults + msg() *otg.StateProtocolBgp + // setMsg unmarshals StateProtocolBgp from protobuf object *otg.StateProtocolBgp + // and doesn't set defaults + setMsg(*otg.StateProtocolBgp) StateProtocolBgp + // provides marshal interface + Marshal() marshalStateProtocolBgp + // provides unmarshal interface + Unmarshal() unMarshalStateProtocolBgp + // validate validates StateProtocolBgp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StateProtocolBgp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns StateProtocolBgpChoiceEnum, set in StateProtocolBgp + Choice() StateProtocolBgpChoiceEnum + // setChoice assigns StateProtocolBgpChoiceEnum provided by user to StateProtocolBgp + setChoice(value StateProtocolBgpChoiceEnum) StateProtocolBgp + // Peers returns StateProtocolBgpPeers, set in StateProtocolBgp. + // StateProtocolBgpPeers is sets state of configured BGP peers. + Peers() StateProtocolBgpPeers + // SetPeers assigns StateProtocolBgpPeers provided by user to StateProtocolBgp. + // StateProtocolBgpPeers is sets state of configured BGP peers. + SetPeers(value StateProtocolBgpPeers) StateProtocolBgp + // HasPeers checks if Peers has been set in StateProtocolBgp + HasPeers() bool + setNil() +} + +type StateProtocolBgpChoiceEnum string + +// Enum of Choice on StateProtocolBgp +var StateProtocolBgpChoice = struct { + PEERS StateProtocolBgpChoiceEnum +}{ + PEERS: StateProtocolBgpChoiceEnum("peers"), +} + +func (obj *stateProtocolBgp) Choice() StateProtocolBgpChoiceEnum { + return StateProtocolBgpChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *stateProtocolBgp) setChoice(value StateProtocolBgpChoiceEnum) StateProtocolBgp { + intValue, ok := otg.StateProtocolBgp_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StateProtocolBgpChoiceEnum", string(value))) + return obj + } + enumValue := otg.StateProtocolBgp_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Peers = nil + obj.peersHolder = nil + + if value == StateProtocolBgpChoice.PEERS { + obj.obj.Peers = NewStateProtocolBgpPeers().msg() + } + + return obj +} + +// description is TBD +// Peers returns a StateProtocolBgpPeers +func (obj *stateProtocolBgp) Peers() StateProtocolBgpPeers { + if obj.obj.Peers == nil { + obj.setChoice(StateProtocolBgpChoice.PEERS) + } + if obj.peersHolder == nil { + obj.peersHolder = &stateProtocolBgpPeers{obj: obj.obj.Peers} + } + return obj.peersHolder +} + +// description is TBD +// Peers returns a StateProtocolBgpPeers +func (obj *stateProtocolBgp) HasPeers() bool { + return obj.obj.Peers != nil +} + +// description is TBD +// SetPeers sets the StateProtocolBgpPeers value in the StateProtocolBgp object +func (obj *stateProtocolBgp) SetPeers(value StateProtocolBgpPeers) StateProtocolBgp { + obj.setChoice(StateProtocolBgpChoice.PEERS) + obj.peersHolder = nil + obj.obj.Peers = value.msg() + + return obj +} + +func (obj *stateProtocolBgp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface StateProtocolBgp") + } + + if obj.obj.Peers != nil { + + obj.Peers().validateObj(vObj, set_default) + } + +} + +func (obj *stateProtocolBgp) setDefault() { + var choices_set int = 0 + var choice StateProtocolBgpChoiceEnum + + if obj.obj.Peers != nil { + choices_set += 1 + choice = StateProtocolBgpChoice.PEERS + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in StateProtocolBgp") + } + } else { + intVal := otg.StateProtocolBgp_Choice_Enum_value[string(choice)] + enumValue := otg.StateProtocolBgp_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/state_protocol_bgp_peers.go b/gosnappi/state_protocol_bgp_peers.go new file mode 100644 index 00000000..4765569f --- /dev/null +++ b/gosnappi/state_protocol_bgp_peers.go @@ -0,0 +1,357 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StateProtocolBgpPeers ***** +type stateProtocolBgpPeers struct { + validation + obj *otg.StateProtocolBgpPeers + marshaller marshalStateProtocolBgpPeers + unMarshaller unMarshalStateProtocolBgpPeers +} + +func NewStateProtocolBgpPeers() StateProtocolBgpPeers { + obj := stateProtocolBgpPeers{obj: &otg.StateProtocolBgpPeers{}} + obj.setDefault() + return &obj +} + +func (obj *stateProtocolBgpPeers) msg() *otg.StateProtocolBgpPeers { + return obj.obj +} + +func (obj *stateProtocolBgpPeers) setMsg(msg *otg.StateProtocolBgpPeers) StateProtocolBgpPeers { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstateProtocolBgpPeers struct { + obj *stateProtocolBgpPeers +} + +type marshalStateProtocolBgpPeers interface { + // ToProto marshals StateProtocolBgpPeers to protobuf object *otg.StateProtocolBgpPeers + ToProto() (*otg.StateProtocolBgpPeers, error) + // ToPbText marshals StateProtocolBgpPeers to protobuf text + ToPbText() (string, error) + // ToYaml marshals StateProtocolBgpPeers to YAML text + ToYaml() (string, error) + // ToJson marshals StateProtocolBgpPeers to JSON text + ToJson() (string, error) +} + +type unMarshalstateProtocolBgpPeers struct { + obj *stateProtocolBgpPeers +} + +type unMarshalStateProtocolBgpPeers interface { + // FromProto unmarshals StateProtocolBgpPeers from protobuf object *otg.StateProtocolBgpPeers + FromProto(msg *otg.StateProtocolBgpPeers) (StateProtocolBgpPeers, error) + // FromPbText unmarshals StateProtocolBgpPeers from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StateProtocolBgpPeers from YAML text + FromYaml(value string) error + // FromJson unmarshals StateProtocolBgpPeers from JSON text + FromJson(value string) error +} + +func (obj *stateProtocolBgpPeers) Marshal() marshalStateProtocolBgpPeers { + if obj.marshaller == nil { + obj.marshaller = &marshalstateProtocolBgpPeers{obj: obj} + } + return obj.marshaller +} + +func (obj *stateProtocolBgpPeers) Unmarshal() unMarshalStateProtocolBgpPeers { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstateProtocolBgpPeers{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstateProtocolBgpPeers) ToProto() (*otg.StateProtocolBgpPeers, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstateProtocolBgpPeers) FromProto(msg *otg.StateProtocolBgpPeers) (StateProtocolBgpPeers, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstateProtocolBgpPeers) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstateProtocolBgpPeers) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstateProtocolBgpPeers) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolBgpPeers) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstateProtocolBgpPeers) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolBgpPeers) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *stateProtocolBgpPeers) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *stateProtocolBgpPeers) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *stateProtocolBgpPeers) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *stateProtocolBgpPeers) Clone() (StateProtocolBgpPeers, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStateProtocolBgpPeers() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// StateProtocolBgpPeers is sets state of configured BGP peers. +type StateProtocolBgpPeers interface { + Validation + // msg marshals StateProtocolBgpPeers to protobuf object *otg.StateProtocolBgpPeers + // and doesn't set defaults + msg() *otg.StateProtocolBgpPeers + // setMsg unmarshals StateProtocolBgpPeers from protobuf object *otg.StateProtocolBgpPeers + // and doesn't set defaults + setMsg(*otg.StateProtocolBgpPeers) StateProtocolBgpPeers + // provides marshal interface + Marshal() marshalStateProtocolBgpPeers + // provides unmarshal interface + Unmarshal() unMarshalStateProtocolBgpPeers + // validate validates StateProtocolBgpPeers + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StateProtocolBgpPeers, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // PeerNames returns []string, set in StateProtocolBgpPeers. + PeerNames() []string + // SetPeerNames assigns []string provided by user to StateProtocolBgpPeers + SetPeerNames(value []string) StateProtocolBgpPeers + // State returns StateProtocolBgpPeersStateEnum, set in StateProtocolBgpPeers + State() StateProtocolBgpPeersStateEnum + // SetState assigns StateProtocolBgpPeersStateEnum provided by user to StateProtocolBgpPeers + SetState(value StateProtocolBgpPeersStateEnum) StateProtocolBgpPeers +} + +// The names of BGP peers for which the state has to be applied. An empty or null list will control all BGP peers. +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// PeerNames returns a []string +func (obj *stateProtocolBgpPeers) PeerNames() []string { + if obj.obj.PeerNames == nil { + obj.obj.PeerNames = make([]string, 0) + } + return obj.obj.PeerNames +} + +// The names of BGP peers for which the state has to be applied. An empty or null list will control all BGP peers. +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// x-constraint: +// - /components/schemas/Bgp.V4Peer/properties/name +// - /components/schemas/Bgp.V6Peer/properties/name +// +// SetPeerNames sets the []string value in the StateProtocolBgpPeers object +func (obj *stateProtocolBgpPeers) SetPeerNames(value []string) StateProtocolBgpPeers { + + if obj.obj.PeerNames == nil { + obj.obj.PeerNames = make([]string, 0) + } + obj.obj.PeerNames = value + + return obj +} + +type StateProtocolBgpPeersStateEnum string + +// Enum of State on StateProtocolBgpPeers +var StateProtocolBgpPeersState = struct { + UP StateProtocolBgpPeersStateEnum + DOWN StateProtocolBgpPeersStateEnum +}{ + UP: StateProtocolBgpPeersStateEnum("up"), + DOWN: StateProtocolBgpPeersStateEnum("down"), +} + +func (obj *stateProtocolBgpPeers) State() StateProtocolBgpPeersStateEnum { + return StateProtocolBgpPeersStateEnum(obj.obj.State.Enum().String()) +} + +func (obj *stateProtocolBgpPeers) SetState(value StateProtocolBgpPeersStateEnum) StateProtocolBgpPeers { + intValue, ok := otg.StateProtocolBgpPeers_State_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StateProtocolBgpPeersStateEnum", string(value))) + return obj + } + enumValue := otg.StateProtocolBgpPeers_State_Enum(intValue) + obj.obj.State = &enumValue + + return obj +} + +func (obj *stateProtocolBgpPeers) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // State is required + if obj.obj.State == nil { + vObj.validationErrors = append(vObj.validationErrors, "State is required field on interface StateProtocolBgpPeers") + } +} + +func (obj *stateProtocolBgpPeers) setDefault() { + +} diff --git a/gosnappi/state_protocol_isis.go b/gosnappi/state_protocol_isis.go new file mode 100644 index 00000000..5bfcedcc --- /dev/null +++ b/gosnappi/state_protocol_isis.go @@ -0,0 +1,387 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StateProtocolIsis ***** +type stateProtocolIsis struct { + validation + obj *otg.StateProtocolIsis + marshaller marshalStateProtocolIsis + unMarshaller unMarshalStateProtocolIsis + routersHolder StateProtocolIsisRouters +} + +func NewStateProtocolIsis() StateProtocolIsis { + obj := stateProtocolIsis{obj: &otg.StateProtocolIsis{}} + obj.setDefault() + return &obj +} + +func (obj *stateProtocolIsis) msg() *otg.StateProtocolIsis { + return obj.obj +} + +func (obj *stateProtocolIsis) setMsg(msg *otg.StateProtocolIsis) StateProtocolIsis { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstateProtocolIsis struct { + obj *stateProtocolIsis +} + +type marshalStateProtocolIsis interface { + // ToProto marshals StateProtocolIsis to protobuf object *otg.StateProtocolIsis + ToProto() (*otg.StateProtocolIsis, error) + // ToPbText marshals StateProtocolIsis to protobuf text + ToPbText() (string, error) + // ToYaml marshals StateProtocolIsis to YAML text + ToYaml() (string, error) + // ToJson marshals StateProtocolIsis to JSON text + ToJson() (string, error) +} + +type unMarshalstateProtocolIsis struct { + obj *stateProtocolIsis +} + +type unMarshalStateProtocolIsis interface { + // FromProto unmarshals StateProtocolIsis from protobuf object *otg.StateProtocolIsis + FromProto(msg *otg.StateProtocolIsis) (StateProtocolIsis, error) + // FromPbText unmarshals StateProtocolIsis from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StateProtocolIsis from YAML text + FromYaml(value string) error + // FromJson unmarshals StateProtocolIsis from JSON text + FromJson(value string) error +} + +func (obj *stateProtocolIsis) Marshal() marshalStateProtocolIsis { + if obj.marshaller == nil { + obj.marshaller = &marshalstateProtocolIsis{obj: obj} + } + return obj.marshaller +} + +func (obj *stateProtocolIsis) Unmarshal() unMarshalStateProtocolIsis { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstateProtocolIsis{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstateProtocolIsis) ToProto() (*otg.StateProtocolIsis, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstateProtocolIsis) FromProto(msg *otg.StateProtocolIsis) (StateProtocolIsis, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstateProtocolIsis) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstateProtocolIsis) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstateProtocolIsis) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolIsis) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstateProtocolIsis) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolIsis) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *stateProtocolIsis) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *stateProtocolIsis) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *stateProtocolIsis) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *stateProtocolIsis) Clone() (StateProtocolIsis, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStateProtocolIsis() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *stateProtocolIsis) setNil() { + obj.routersHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// StateProtocolIsis is sets state of configured ISIS routers. +type StateProtocolIsis interface { + Validation + // msg marshals StateProtocolIsis to protobuf object *otg.StateProtocolIsis + // and doesn't set defaults + msg() *otg.StateProtocolIsis + // setMsg unmarshals StateProtocolIsis from protobuf object *otg.StateProtocolIsis + // and doesn't set defaults + setMsg(*otg.StateProtocolIsis) StateProtocolIsis + // provides marshal interface + Marshal() marshalStateProtocolIsis + // provides unmarshal interface + Unmarshal() unMarshalStateProtocolIsis + // validate validates StateProtocolIsis + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StateProtocolIsis, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns StateProtocolIsisChoiceEnum, set in StateProtocolIsis + Choice() StateProtocolIsisChoiceEnum + // setChoice assigns StateProtocolIsisChoiceEnum provided by user to StateProtocolIsis + setChoice(value StateProtocolIsisChoiceEnum) StateProtocolIsis + // Routers returns StateProtocolIsisRouters, set in StateProtocolIsis. + // StateProtocolIsisRouters is sets state of configured ISIS routers. + Routers() StateProtocolIsisRouters + // SetRouters assigns StateProtocolIsisRouters provided by user to StateProtocolIsis. + // StateProtocolIsisRouters is sets state of configured ISIS routers. + SetRouters(value StateProtocolIsisRouters) StateProtocolIsis + // HasRouters checks if Routers has been set in StateProtocolIsis + HasRouters() bool + setNil() +} + +type StateProtocolIsisChoiceEnum string + +// Enum of Choice on StateProtocolIsis +var StateProtocolIsisChoice = struct { + ROUTERS StateProtocolIsisChoiceEnum +}{ + ROUTERS: StateProtocolIsisChoiceEnum("routers"), +} + +func (obj *stateProtocolIsis) Choice() StateProtocolIsisChoiceEnum { + return StateProtocolIsisChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *stateProtocolIsis) setChoice(value StateProtocolIsisChoiceEnum) StateProtocolIsis { + intValue, ok := otg.StateProtocolIsis_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StateProtocolIsisChoiceEnum", string(value))) + return obj + } + enumValue := otg.StateProtocolIsis_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Routers = nil + obj.routersHolder = nil + + if value == StateProtocolIsisChoice.ROUTERS { + obj.obj.Routers = NewStateProtocolIsisRouters().msg() + } + + return obj +} + +// description is TBD +// Routers returns a StateProtocolIsisRouters +func (obj *stateProtocolIsis) Routers() StateProtocolIsisRouters { + if obj.obj.Routers == nil { + obj.setChoice(StateProtocolIsisChoice.ROUTERS) + } + if obj.routersHolder == nil { + obj.routersHolder = &stateProtocolIsisRouters{obj: obj.obj.Routers} + } + return obj.routersHolder +} + +// description is TBD +// Routers returns a StateProtocolIsisRouters +func (obj *stateProtocolIsis) HasRouters() bool { + return obj.obj.Routers != nil +} + +// description is TBD +// SetRouters sets the StateProtocolIsisRouters value in the StateProtocolIsis object +func (obj *stateProtocolIsis) SetRouters(value StateProtocolIsisRouters) StateProtocolIsis { + obj.setChoice(StateProtocolIsisChoice.ROUTERS) + obj.routersHolder = nil + obj.obj.Routers = value.msg() + + return obj +} + +func (obj *stateProtocolIsis) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface StateProtocolIsis") + } + + if obj.obj.Routers != nil { + + obj.Routers().validateObj(vObj, set_default) + } + +} + +func (obj *stateProtocolIsis) setDefault() { + var choices_set int = 0 + var choice StateProtocolIsisChoiceEnum + + if obj.obj.Routers != nil { + choices_set += 1 + choice = StateProtocolIsisChoice.ROUTERS + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in StateProtocolIsis") + } + } else { + intVal := otg.StateProtocolIsis_Choice_Enum_value[string(choice)] + enumValue := otg.StateProtocolIsis_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/state_protocol_isis_routers.go b/gosnappi/state_protocol_isis_routers.go new file mode 100644 index 00000000..09abbe34 --- /dev/null +++ b/gosnappi/state_protocol_isis_routers.go @@ -0,0 +1,353 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StateProtocolIsisRouters ***** +type stateProtocolIsisRouters struct { + validation + obj *otg.StateProtocolIsisRouters + marshaller marshalStateProtocolIsisRouters + unMarshaller unMarshalStateProtocolIsisRouters +} + +func NewStateProtocolIsisRouters() StateProtocolIsisRouters { + obj := stateProtocolIsisRouters{obj: &otg.StateProtocolIsisRouters{}} + obj.setDefault() + return &obj +} + +func (obj *stateProtocolIsisRouters) msg() *otg.StateProtocolIsisRouters { + return obj.obj +} + +func (obj *stateProtocolIsisRouters) setMsg(msg *otg.StateProtocolIsisRouters) StateProtocolIsisRouters { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstateProtocolIsisRouters struct { + obj *stateProtocolIsisRouters +} + +type marshalStateProtocolIsisRouters interface { + // ToProto marshals StateProtocolIsisRouters to protobuf object *otg.StateProtocolIsisRouters + ToProto() (*otg.StateProtocolIsisRouters, error) + // ToPbText marshals StateProtocolIsisRouters to protobuf text + ToPbText() (string, error) + // ToYaml marshals StateProtocolIsisRouters to YAML text + ToYaml() (string, error) + // ToJson marshals StateProtocolIsisRouters to JSON text + ToJson() (string, error) +} + +type unMarshalstateProtocolIsisRouters struct { + obj *stateProtocolIsisRouters +} + +type unMarshalStateProtocolIsisRouters interface { + // FromProto unmarshals StateProtocolIsisRouters from protobuf object *otg.StateProtocolIsisRouters + FromProto(msg *otg.StateProtocolIsisRouters) (StateProtocolIsisRouters, error) + // FromPbText unmarshals StateProtocolIsisRouters from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StateProtocolIsisRouters from YAML text + FromYaml(value string) error + // FromJson unmarshals StateProtocolIsisRouters from JSON text + FromJson(value string) error +} + +func (obj *stateProtocolIsisRouters) Marshal() marshalStateProtocolIsisRouters { + if obj.marshaller == nil { + obj.marshaller = &marshalstateProtocolIsisRouters{obj: obj} + } + return obj.marshaller +} + +func (obj *stateProtocolIsisRouters) Unmarshal() unMarshalStateProtocolIsisRouters { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstateProtocolIsisRouters{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstateProtocolIsisRouters) ToProto() (*otg.StateProtocolIsisRouters, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstateProtocolIsisRouters) FromProto(msg *otg.StateProtocolIsisRouters) (StateProtocolIsisRouters, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstateProtocolIsisRouters) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstateProtocolIsisRouters) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstateProtocolIsisRouters) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolIsisRouters) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstateProtocolIsisRouters) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolIsisRouters) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *stateProtocolIsisRouters) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *stateProtocolIsisRouters) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *stateProtocolIsisRouters) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *stateProtocolIsisRouters) Clone() (StateProtocolIsisRouters, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStateProtocolIsisRouters() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// StateProtocolIsisRouters is sets state of configured ISIS routers. +type StateProtocolIsisRouters interface { + Validation + // msg marshals StateProtocolIsisRouters to protobuf object *otg.StateProtocolIsisRouters + // and doesn't set defaults + msg() *otg.StateProtocolIsisRouters + // setMsg unmarshals StateProtocolIsisRouters from protobuf object *otg.StateProtocolIsisRouters + // and doesn't set defaults + setMsg(*otg.StateProtocolIsisRouters) StateProtocolIsisRouters + // provides marshal interface + Marshal() marshalStateProtocolIsisRouters + // provides unmarshal interface + Unmarshal() unMarshalStateProtocolIsisRouters + // validate validates StateProtocolIsisRouters + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StateProtocolIsisRouters, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RouterNames returns []string, set in StateProtocolIsisRouters. + RouterNames() []string + // SetRouterNames assigns []string provided by user to StateProtocolIsisRouters + SetRouterNames(value []string) StateProtocolIsisRouters + // State returns StateProtocolIsisRoutersStateEnum, set in StateProtocolIsisRouters + State() StateProtocolIsisRoutersStateEnum + // SetState assigns StateProtocolIsisRoutersStateEnum provided by user to StateProtocolIsisRouters + SetState(value StateProtocolIsisRoutersStateEnum) StateProtocolIsisRouters +} + +// The names of ISIS routers for which the state has to be applied. An empty or null list will control all ISIS routers. +// +// x-constraint: +// - /components/schemas/Device.IsisRouter/properties/name +// +// x-constraint: +// - /components/schemas/Device.IsisRouter/properties/name +// +// RouterNames returns a []string +func (obj *stateProtocolIsisRouters) RouterNames() []string { + if obj.obj.RouterNames == nil { + obj.obj.RouterNames = make([]string, 0) + } + return obj.obj.RouterNames +} + +// The names of ISIS routers for which the state has to be applied. An empty or null list will control all ISIS routers. +// +// x-constraint: +// - /components/schemas/Device.IsisRouter/properties/name +// +// x-constraint: +// - /components/schemas/Device.IsisRouter/properties/name +// +// SetRouterNames sets the []string value in the StateProtocolIsisRouters object +func (obj *stateProtocolIsisRouters) SetRouterNames(value []string) StateProtocolIsisRouters { + + if obj.obj.RouterNames == nil { + obj.obj.RouterNames = make([]string, 0) + } + obj.obj.RouterNames = value + + return obj +} + +type StateProtocolIsisRoutersStateEnum string + +// Enum of State on StateProtocolIsisRouters +var StateProtocolIsisRoutersState = struct { + UP StateProtocolIsisRoutersStateEnum + DOWN StateProtocolIsisRoutersStateEnum +}{ + UP: StateProtocolIsisRoutersStateEnum("up"), + DOWN: StateProtocolIsisRoutersStateEnum("down"), +} + +func (obj *stateProtocolIsisRouters) State() StateProtocolIsisRoutersStateEnum { + return StateProtocolIsisRoutersStateEnum(obj.obj.State.Enum().String()) +} + +func (obj *stateProtocolIsisRouters) SetState(value StateProtocolIsisRoutersStateEnum) StateProtocolIsisRouters { + intValue, ok := otg.StateProtocolIsisRouters_State_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StateProtocolIsisRoutersStateEnum", string(value))) + return obj + } + enumValue := otg.StateProtocolIsisRouters_State_Enum(intValue) + obj.obj.State = &enumValue + + return obj +} + +func (obj *stateProtocolIsisRouters) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // State is required + if obj.obj.State == nil { + vObj.validationErrors = append(vObj.validationErrors, "State is required field on interface StateProtocolIsisRouters") + } +} + +func (obj *stateProtocolIsisRouters) setDefault() { + +} diff --git a/gosnappi/state_protocol_lacp.go b/gosnappi/state_protocol_lacp.go new file mode 100644 index 00000000..da775e20 --- /dev/null +++ b/gosnappi/state_protocol_lacp.go @@ -0,0 +1,443 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StateProtocolLacp ***** +type stateProtocolLacp struct { + validation + obj *otg.StateProtocolLacp + marshaller marshalStateProtocolLacp + unMarshaller unMarshalStateProtocolLacp + adminHolder StateProtocolLacpAdmin + memberPortsHolder StateProtocolLacpMemberPorts +} + +func NewStateProtocolLacp() StateProtocolLacp { + obj := stateProtocolLacp{obj: &otg.StateProtocolLacp{}} + obj.setDefault() + return &obj +} + +func (obj *stateProtocolLacp) msg() *otg.StateProtocolLacp { + return obj.obj +} + +func (obj *stateProtocolLacp) setMsg(msg *otg.StateProtocolLacp) StateProtocolLacp { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstateProtocolLacp struct { + obj *stateProtocolLacp +} + +type marshalStateProtocolLacp interface { + // ToProto marshals StateProtocolLacp to protobuf object *otg.StateProtocolLacp + ToProto() (*otg.StateProtocolLacp, error) + // ToPbText marshals StateProtocolLacp to protobuf text + ToPbText() (string, error) + // ToYaml marshals StateProtocolLacp to YAML text + ToYaml() (string, error) + // ToJson marshals StateProtocolLacp to JSON text + ToJson() (string, error) +} + +type unMarshalstateProtocolLacp struct { + obj *stateProtocolLacp +} + +type unMarshalStateProtocolLacp interface { + // FromProto unmarshals StateProtocolLacp from protobuf object *otg.StateProtocolLacp + FromProto(msg *otg.StateProtocolLacp) (StateProtocolLacp, error) + // FromPbText unmarshals StateProtocolLacp from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StateProtocolLacp from YAML text + FromYaml(value string) error + // FromJson unmarshals StateProtocolLacp from JSON text + FromJson(value string) error +} + +func (obj *stateProtocolLacp) Marshal() marshalStateProtocolLacp { + if obj.marshaller == nil { + obj.marshaller = &marshalstateProtocolLacp{obj: obj} + } + return obj.marshaller +} + +func (obj *stateProtocolLacp) Unmarshal() unMarshalStateProtocolLacp { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstateProtocolLacp{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstateProtocolLacp) ToProto() (*otg.StateProtocolLacp, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstateProtocolLacp) FromProto(msg *otg.StateProtocolLacp) (StateProtocolLacp, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstateProtocolLacp) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstateProtocolLacp) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstateProtocolLacp) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolLacp) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstateProtocolLacp) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolLacp) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *stateProtocolLacp) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *stateProtocolLacp) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *stateProtocolLacp) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *stateProtocolLacp) Clone() (StateProtocolLacp, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStateProtocolLacp() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *stateProtocolLacp) setNil() { + obj.adminHolder = nil + obj.memberPortsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// StateProtocolLacp is sets state of configured LACP +type StateProtocolLacp interface { + Validation + // msg marshals StateProtocolLacp to protobuf object *otg.StateProtocolLacp + // and doesn't set defaults + msg() *otg.StateProtocolLacp + // setMsg unmarshals StateProtocolLacp from protobuf object *otg.StateProtocolLacp + // and doesn't set defaults + setMsg(*otg.StateProtocolLacp) StateProtocolLacp + // provides marshal interface + Marshal() marshalStateProtocolLacp + // provides unmarshal interface + Unmarshal() unMarshalStateProtocolLacp + // validate validates StateProtocolLacp + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StateProtocolLacp, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns StateProtocolLacpChoiceEnum, set in StateProtocolLacp + Choice() StateProtocolLacpChoiceEnum + // setChoice assigns StateProtocolLacpChoiceEnum provided by user to StateProtocolLacp + setChoice(value StateProtocolLacpChoiceEnum) StateProtocolLacp + // Admin returns StateProtocolLacpAdmin, set in StateProtocolLacp. + // StateProtocolLacpAdmin is sets admin state of LACP configured on LAG members + Admin() StateProtocolLacpAdmin + // SetAdmin assigns StateProtocolLacpAdmin provided by user to StateProtocolLacp. + // StateProtocolLacpAdmin is sets admin state of LACP configured on LAG members + SetAdmin(value StateProtocolLacpAdmin) StateProtocolLacp + // HasAdmin checks if Admin has been set in StateProtocolLacp + HasAdmin() bool + // MemberPorts returns StateProtocolLacpMemberPorts, set in StateProtocolLacp. + // StateProtocolLacpMemberPorts is sets state of LACP member ports configured on LAG. + MemberPorts() StateProtocolLacpMemberPorts + // SetMemberPorts assigns StateProtocolLacpMemberPorts provided by user to StateProtocolLacp. + // StateProtocolLacpMemberPorts is sets state of LACP member ports configured on LAG. + SetMemberPorts(value StateProtocolLacpMemberPorts) StateProtocolLacp + // HasMemberPorts checks if MemberPorts has been set in StateProtocolLacp + HasMemberPorts() bool + setNil() +} + +type StateProtocolLacpChoiceEnum string + +// Enum of Choice on StateProtocolLacp +var StateProtocolLacpChoice = struct { + ADMIN StateProtocolLacpChoiceEnum + MEMBER_PORTS StateProtocolLacpChoiceEnum +}{ + ADMIN: StateProtocolLacpChoiceEnum("admin"), + MEMBER_PORTS: StateProtocolLacpChoiceEnum("member_ports"), +} + +func (obj *stateProtocolLacp) Choice() StateProtocolLacpChoiceEnum { + return StateProtocolLacpChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *stateProtocolLacp) setChoice(value StateProtocolLacpChoiceEnum) StateProtocolLacp { + intValue, ok := otg.StateProtocolLacp_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StateProtocolLacpChoiceEnum", string(value))) + return obj + } + enumValue := otg.StateProtocolLacp_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.MemberPorts = nil + obj.memberPortsHolder = nil + obj.obj.Admin = nil + obj.adminHolder = nil + + if value == StateProtocolLacpChoice.ADMIN { + obj.obj.Admin = NewStateProtocolLacpAdmin().msg() + } + + if value == StateProtocolLacpChoice.MEMBER_PORTS { + obj.obj.MemberPorts = NewStateProtocolLacpMemberPorts().msg() + } + + return obj +} + +// description is TBD +// Admin returns a StateProtocolLacpAdmin +func (obj *stateProtocolLacp) Admin() StateProtocolLacpAdmin { + if obj.obj.Admin == nil { + obj.setChoice(StateProtocolLacpChoice.ADMIN) + } + if obj.adminHolder == nil { + obj.adminHolder = &stateProtocolLacpAdmin{obj: obj.obj.Admin} + } + return obj.adminHolder +} + +// description is TBD +// Admin returns a StateProtocolLacpAdmin +func (obj *stateProtocolLacp) HasAdmin() bool { + return obj.obj.Admin != nil +} + +// description is TBD +// SetAdmin sets the StateProtocolLacpAdmin value in the StateProtocolLacp object +func (obj *stateProtocolLacp) SetAdmin(value StateProtocolLacpAdmin) StateProtocolLacp { + obj.setChoice(StateProtocolLacpChoice.ADMIN) + obj.adminHolder = nil + obj.obj.Admin = value.msg() + + return obj +} + +// description is TBD +// MemberPorts returns a StateProtocolLacpMemberPorts +func (obj *stateProtocolLacp) MemberPorts() StateProtocolLacpMemberPorts { + if obj.obj.MemberPorts == nil { + obj.setChoice(StateProtocolLacpChoice.MEMBER_PORTS) + } + if obj.memberPortsHolder == nil { + obj.memberPortsHolder = &stateProtocolLacpMemberPorts{obj: obj.obj.MemberPorts} + } + return obj.memberPortsHolder +} + +// description is TBD +// MemberPorts returns a StateProtocolLacpMemberPorts +func (obj *stateProtocolLacp) HasMemberPorts() bool { + return obj.obj.MemberPorts != nil +} + +// description is TBD +// SetMemberPorts sets the StateProtocolLacpMemberPorts value in the StateProtocolLacp object +func (obj *stateProtocolLacp) SetMemberPorts(value StateProtocolLacpMemberPorts) StateProtocolLacp { + obj.setChoice(StateProtocolLacpChoice.MEMBER_PORTS) + obj.memberPortsHolder = nil + obj.obj.MemberPorts = value.msg() + + return obj +} + +func (obj *stateProtocolLacp) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface StateProtocolLacp") + } + + if obj.obj.Admin != nil { + + obj.Admin().validateObj(vObj, set_default) + } + + if obj.obj.MemberPorts != nil { + + obj.MemberPorts().validateObj(vObj, set_default) + } + +} + +func (obj *stateProtocolLacp) setDefault() { + var choices_set int = 0 + var choice StateProtocolLacpChoiceEnum + + if obj.obj.Admin != nil { + choices_set += 1 + choice = StateProtocolLacpChoice.ADMIN + } + + if obj.obj.MemberPorts != nil { + choices_set += 1 + choice = StateProtocolLacpChoice.MEMBER_PORTS + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in StateProtocolLacp") + } + } else { + intVal := otg.StateProtocolLacp_Choice_Enum_value[string(choice)] + enumValue := otg.StateProtocolLacp_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/state_protocol_lacp_admin.go b/gosnappi/state_protocol_lacp_admin.go new file mode 100644 index 00000000..1b9df76f --- /dev/null +++ b/gosnappi/state_protocol_lacp_admin.go @@ -0,0 +1,353 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StateProtocolLacpAdmin ***** +type stateProtocolLacpAdmin struct { + validation + obj *otg.StateProtocolLacpAdmin + marshaller marshalStateProtocolLacpAdmin + unMarshaller unMarshalStateProtocolLacpAdmin +} + +func NewStateProtocolLacpAdmin() StateProtocolLacpAdmin { + obj := stateProtocolLacpAdmin{obj: &otg.StateProtocolLacpAdmin{}} + obj.setDefault() + return &obj +} + +func (obj *stateProtocolLacpAdmin) msg() *otg.StateProtocolLacpAdmin { + return obj.obj +} + +func (obj *stateProtocolLacpAdmin) setMsg(msg *otg.StateProtocolLacpAdmin) StateProtocolLacpAdmin { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstateProtocolLacpAdmin struct { + obj *stateProtocolLacpAdmin +} + +type marshalStateProtocolLacpAdmin interface { + // ToProto marshals StateProtocolLacpAdmin to protobuf object *otg.StateProtocolLacpAdmin + ToProto() (*otg.StateProtocolLacpAdmin, error) + // ToPbText marshals StateProtocolLacpAdmin to protobuf text + ToPbText() (string, error) + // ToYaml marshals StateProtocolLacpAdmin to YAML text + ToYaml() (string, error) + // ToJson marshals StateProtocolLacpAdmin to JSON text + ToJson() (string, error) +} + +type unMarshalstateProtocolLacpAdmin struct { + obj *stateProtocolLacpAdmin +} + +type unMarshalStateProtocolLacpAdmin interface { + // FromProto unmarshals StateProtocolLacpAdmin from protobuf object *otg.StateProtocolLacpAdmin + FromProto(msg *otg.StateProtocolLacpAdmin) (StateProtocolLacpAdmin, error) + // FromPbText unmarshals StateProtocolLacpAdmin from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StateProtocolLacpAdmin from YAML text + FromYaml(value string) error + // FromJson unmarshals StateProtocolLacpAdmin from JSON text + FromJson(value string) error +} + +func (obj *stateProtocolLacpAdmin) Marshal() marshalStateProtocolLacpAdmin { + if obj.marshaller == nil { + obj.marshaller = &marshalstateProtocolLacpAdmin{obj: obj} + } + return obj.marshaller +} + +func (obj *stateProtocolLacpAdmin) Unmarshal() unMarshalStateProtocolLacpAdmin { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstateProtocolLacpAdmin{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstateProtocolLacpAdmin) ToProto() (*otg.StateProtocolLacpAdmin, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstateProtocolLacpAdmin) FromProto(msg *otg.StateProtocolLacpAdmin) (StateProtocolLacpAdmin, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstateProtocolLacpAdmin) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstateProtocolLacpAdmin) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstateProtocolLacpAdmin) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolLacpAdmin) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstateProtocolLacpAdmin) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolLacpAdmin) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *stateProtocolLacpAdmin) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *stateProtocolLacpAdmin) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *stateProtocolLacpAdmin) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *stateProtocolLacpAdmin) Clone() (StateProtocolLacpAdmin, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStateProtocolLacpAdmin() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// StateProtocolLacpAdmin is sets admin state of LACP configured on LAG members +type StateProtocolLacpAdmin interface { + Validation + // msg marshals StateProtocolLacpAdmin to protobuf object *otg.StateProtocolLacpAdmin + // and doesn't set defaults + msg() *otg.StateProtocolLacpAdmin + // setMsg unmarshals StateProtocolLacpAdmin from protobuf object *otg.StateProtocolLacpAdmin + // and doesn't set defaults + setMsg(*otg.StateProtocolLacpAdmin) StateProtocolLacpAdmin + // provides marshal interface + Marshal() marshalStateProtocolLacpAdmin + // provides unmarshal interface + Unmarshal() unMarshalStateProtocolLacpAdmin + // validate validates StateProtocolLacpAdmin + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StateProtocolLacpAdmin, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LagMemberNames returns []string, set in StateProtocolLacpAdmin. + LagMemberNames() []string + // SetLagMemberNames assigns []string provided by user to StateProtocolLacpAdmin + SetLagMemberNames(value []string) StateProtocolLacpAdmin + // State returns StateProtocolLacpAdminStateEnum, set in StateProtocolLacpAdmin + State() StateProtocolLacpAdminStateEnum + // SetState assigns StateProtocolLacpAdminStateEnum provided by user to StateProtocolLacpAdmin + SetState(value StateProtocolLacpAdminStateEnum) StateProtocolLacpAdmin +} + +// The names of LAG members (ports) for which the state has to be applied. An empty or null list will control all LAG members. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// LagMemberNames returns a []string +func (obj *stateProtocolLacpAdmin) LagMemberNames() []string { + if obj.obj.LagMemberNames == nil { + obj.obj.LagMemberNames = make([]string, 0) + } + return obj.obj.LagMemberNames +} + +// The names of LAG members (ports) for which the state has to be applied. An empty or null list will control all LAG members. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// SetLagMemberNames sets the []string value in the StateProtocolLacpAdmin object +func (obj *stateProtocolLacpAdmin) SetLagMemberNames(value []string) StateProtocolLacpAdmin { + + if obj.obj.LagMemberNames == nil { + obj.obj.LagMemberNames = make([]string, 0) + } + obj.obj.LagMemberNames = value + + return obj +} + +type StateProtocolLacpAdminStateEnum string + +// Enum of State on StateProtocolLacpAdmin +var StateProtocolLacpAdminState = struct { + UP StateProtocolLacpAdminStateEnum + DOWN StateProtocolLacpAdminStateEnum +}{ + UP: StateProtocolLacpAdminStateEnum("up"), + DOWN: StateProtocolLacpAdminStateEnum("down"), +} + +func (obj *stateProtocolLacpAdmin) State() StateProtocolLacpAdminStateEnum { + return StateProtocolLacpAdminStateEnum(obj.obj.State.Enum().String()) +} + +func (obj *stateProtocolLacpAdmin) SetState(value StateProtocolLacpAdminStateEnum) StateProtocolLacpAdmin { + intValue, ok := otg.StateProtocolLacpAdmin_State_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StateProtocolLacpAdminStateEnum", string(value))) + return obj + } + enumValue := otg.StateProtocolLacpAdmin_State_Enum(intValue) + obj.obj.State = &enumValue + + return obj +} + +func (obj *stateProtocolLacpAdmin) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // State is required + if obj.obj.State == nil { + vObj.validationErrors = append(vObj.validationErrors, "State is required field on interface StateProtocolLacpAdmin") + } +} + +func (obj *stateProtocolLacpAdmin) setDefault() { + +} diff --git a/gosnappi/state_protocol_lacp_member_ports.go b/gosnappi/state_protocol_lacp_member_ports.go new file mode 100644 index 00000000..20137ab1 --- /dev/null +++ b/gosnappi/state_protocol_lacp_member_ports.go @@ -0,0 +1,353 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StateProtocolLacpMemberPorts ***** +type stateProtocolLacpMemberPorts struct { + validation + obj *otg.StateProtocolLacpMemberPorts + marshaller marshalStateProtocolLacpMemberPorts + unMarshaller unMarshalStateProtocolLacpMemberPorts +} + +func NewStateProtocolLacpMemberPorts() StateProtocolLacpMemberPorts { + obj := stateProtocolLacpMemberPorts{obj: &otg.StateProtocolLacpMemberPorts{}} + obj.setDefault() + return &obj +} + +func (obj *stateProtocolLacpMemberPorts) msg() *otg.StateProtocolLacpMemberPorts { + return obj.obj +} + +func (obj *stateProtocolLacpMemberPorts) setMsg(msg *otg.StateProtocolLacpMemberPorts) StateProtocolLacpMemberPorts { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstateProtocolLacpMemberPorts struct { + obj *stateProtocolLacpMemberPorts +} + +type marshalStateProtocolLacpMemberPorts interface { + // ToProto marshals StateProtocolLacpMemberPorts to protobuf object *otg.StateProtocolLacpMemberPorts + ToProto() (*otg.StateProtocolLacpMemberPorts, error) + // ToPbText marshals StateProtocolLacpMemberPorts to protobuf text + ToPbText() (string, error) + // ToYaml marshals StateProtocolLacpMemberPorts to YAML text + ToYaml() (string, error) + // ToJson marshals StateProtocolLacpMemberPorts to JSON text + ToJson() (string, error) +} + +type unMarshalstateProtocolLacpMemberPorts struct { + obj *stateProtocolLacpMemberPorts +} + +type unMarshalStateProtocolLacpMemberPorts interface { + // FromProto unmarshals StateProtocolLacpMemberPorts from protobuf object *otg.StateProtocolLacpMemberPorts + FromProto(msg *otg.StateProtocolLacpMemberPorts) (StateProtocolLacpMemberPorts, error) + // FromPbText unmarshals StateProtocolLacpMemberPorts from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StateProtocolLacpMemberPorts from YAML text + FromYaml(value string) error + // FromJson unmarshals StateProtocolLacpMemberPorts from JSON text + FromJson(value string) error +} + +func (obj *stateProtocolLacpMemberPorts) Marshal() marshalStateProtocolLacpMemberPorts { + if obj.marshaller == nil { + obj.marshaller = &marshalstateProtocolLacpMemberPorts{obj: obj} + } + return obj.marshaller +} + +func (obj *stateProtocolLacpMemberPorts) Unmarshal() unMarshalStateProtocolLacpMemberPorts { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstateProtocolLacpMemberPorts{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstateProtocolLacpMemberPorts) ToProto() (*otg.StateProtocolLacpMemberPorts, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstateProtocolLacpMemberPorts) FromProto(msg *otg.StateProtocolLacpMemberPorts) (StateProtocolLacpMemberPorts, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstateProtocolLacpMemberPorts) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstateProtocolLacpMemberPorts) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstateProtocolLacpMemberPorts) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolLacpMemberPorts) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstateProtocolLacpMemberPorts) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolLacpMemberPorts) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *stateProtocolLacpMemberPorts) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *stateProtocolLacpMemberPorts) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *stateProtocolLacpMemberPorts) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *stateProtocolLacpMemberPorts) Clone() (StateProtocolLacpMemberPorts, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStateProtocolLacpMemberPorts() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// StateProtocolLacpMemberPorts is sets state of LACP member ports configured on LAG. +type StateProtocolLacpMemberPorts interface { + Validation + // msg marshals StateProtocolLacpMemberPorts to protobuf object *otg.StateProtocolLacpMemberPorts + // and doesn't set defaults + msg() *otg.StateProtocolLacpMemberPorts + // setMsg unmarshals StateProtocolLacpMemberPorts from protobuf object *otg.StateProtocolLacpMemberPorts + // and doesn't set defaults + setMsg(*otg.StateProtocolLacpMemberPorts) StateProtocolLacpMemberPorts + // provides marshal interface + Marshal() marshalStateProtocolLacpMemberPorts + // provides unmarshal interface + Unmarshal() unMarshalStateProtocolLacpMemberPorts + // validate validates StateProtocolLacpMemberPorts + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StateProtocolLacpMemberPorts, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // LagMemberNames returns []string, set in StateProtocolLacpMemberPorts. + LagMemberNames() []string + // SetLagMemberNames assigns []string provided by user to StateProtocolLacpMemberPorts + SetLagMemberNames(value []string) StateProtocolLacpMemberPorts + // State returns StateProtocolLacpMemberPortsStateEnum, set in StateProtocolLacpMemberPorts + State() StateProtocolLacpMemberPortsStateEnum + // SetState assigns StateProtocolLacpMemberPortsStateEnum provided by user to StateProtocolLacpMemberPorts + SetState(value StateProtocolLacpMemberPortsStateEnum) StateProtocolLacpMemberPorts +} + +// The names of LAG members (ports) for which the state has to be applied. An empty or null list will control all LAG members. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// LagMemberNames returns a []string +func (obj *stateProtocolLacpMemberPorts) LagMemberNames() []string { + if obj.obj.LagMemberNames == nil { + obj.obj.LagMemberNames = make([]string, 0) + } + return obj.obj.LagMemberNames +} + +// The names of LAG members (ports) for which the state has to be applied. An empty or null list will control all LAG members. +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// x-constraint: +// - /components/schemas/Port/properties/name +// +// SetLagMemberNames sets the []string value in the StateProtocolLacpMemberPorts object +func (obj *stateProtocolLacpMemberPorts) SetLagMemberNames(value []string) StateProtocolLacpMemberPorts { + + if obj.obj.LagMemberNames == nil { + obj.obj.LagMemberNames = make([]string, 0) + } + obj.obj.LagMemberNames = value + + return obj +} + +type StateProtocolLacpMemberPortsStateEnum string + +// Enum of State on StateProtocolLacpMemberPorts +var StateProtocolLacpMemberPortsState = struct { + UP StateProtocolLacpMemberPortsStateEnum + DOWN StateProtocolLacpMemberPortsStateEnum +}{ + UP: StateProtocolLacpMemberPortsStateEnum("up"), + DOWN: StateProtocolLacpMemberPortsStateEnum("down"), +} + +func (obj *stateProtocolLacpMemberPorts) State() StateProtocolLacpMemberPortsStateEnum { + return StateProtocolLacpMemberPortsStateEnum(obj.obj.State.Enum().String()) +} + +func (obj *stateProtocolLacpMemberPorts) SetState(value StateProtocolLacpMemberPortsStateEnum) StateProtocolLacpMemberPorts { + intValue, ok := otg.StateProtocolLacpMemberPorts_State_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StateProtocolLacpMemberPortsStateEnum", string(value))) + return obj + } + enumValue := otg.StateProtocolLacpMemberPorts_State_Enum(intValue) + obj.obj.State = &enumValue + + return obj +} + +func (obj *stateProtocolLacpMemberPorts) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // State is required + if obj.obj.State == nil { + vObj.validationErrors = append(vObj.validationErrors, "State is required field on interface StateProtocolLacpMemberPorts") + } +} + +func (obj *stateProtocolLacpMemberPorts) setDefault() { + +} diff --git a/gosnappi/state_protocol_ospfv2.go b/gosnappi/state_protocol_ospfv2.go new file mode 100644 index 00000000..9d47d83d --- /dev/null +++ b/gosnappi/state_protocol_ospfv2.go @@ -0,0 +1,387 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StateProtocolOspfv2 ***** +type stateProtocolOspfv2 struct { + validation + obj *otg.StateProtocolOspfv2 + marshaller marshalStateProtocolOspfv2 + unMarshaller unMarshalStateProtocolOspfv2 + routersHolder StateProtocolOspfv2Routers +} + +func NewStateProtocolOspfv2() StateProtocolOspfv2 { + obj := stateProtocolOspfv2{obj: &otg.StateProtocolOspfv2{}} + obj.setDefault() + return &obj +} + +func (obj *stateProtocolOspfv2) msg() *otg.StateProtocolOspfv2 { + return obj.obj +} + +func (obj *stateProtocolOspfv2) setMsg(msg *otg.StateProtocolOspfv2) StateProtocolOspfv2 { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstateProtocolOspfv2 struct { + obj *stateProtocolOspfv2 +} + +type marshalStateProtocolOspfv2 interface { + // ToProto marshals StateProtocolOspfv2 to protobuf object *otg.StateProtocolOspfv2 + ToProto() (*otg.StateProtocolOspfv2, error) + // ToPbText marshals StateProtocolOspfv2 to protobuf text + ToPbText() (string, error) + // ToYaml marshals StateProtocolOspfv2 to YAML text + ToYaml() (string, error) + // ToJson marshals StateProtocolOspfv2 to JSON text + ToJson() (string, error) +} + +type unMarshalstateProtocolOspfv2 struct { + obj *stateProtocolOspfv2 +} + +type unMarshalStateProtocolOspfv2 interface { + // FromProto unmarshals StateProtocolOspfv2 from protobuf object *otg.StateProtocolOspfv2 + FromProto(msg *otg.StateProtocolOspfv2) (StateProtocolOspfv2, error) + // FromPbText unmarshals StateProtocolOspfv2 from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StateProtocolOspfv2 from YAML text + FromYaml(value string) error + // FromJson unmarshals StateProtocolOspfv2 from JSON text + FromJson(value string) error +} + +func (obj *stateProtocolOspfv2) Marshal() marshalStateProtocolOspfv2 { + if obj.marshaller == nil { + obj.marshaller = &marshalstateProtocolOspfv2{obj: obj} + } + return obj.marshaller +} + +func (obj *stateProtocolOspfv2) Unmarshal() unMarshalStateProtocolOspfv2 { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstateProtocolOspfv2{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstateProtocolOspfv2) ToProto() (*otg.StateProtocolOspfv2, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstateProtocolOspfv2) FromProto(msg *otg.StateProtocolOspfv2) (StateProtocolOspfv2, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstateProtocolOspfv2) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstateProtocolOspfv2) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstateProtocolOspfv2) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolOspfv2) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstateProtocolOspfv2) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolOspfv2) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *stateProtocolOspfv2) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *stateProtocolOspfv2) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *stateProtocolOspfv2) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *stateProtocolOspfv2) Clone() (StateProtocolOspfv2, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStateProtocolOspfv2() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *stateProtocolOspfv2) setNil() { + obj.routersHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// StateProtocolOspfv2 is sets state of configured OSPFv2 routers. +type StateProtocolOspfv2 interface { + Validation + // msg marshals StateProtocolOspfv2 to protobuf object *otg.StateProtocolOspfv2 + // and doesn't set defaults + msg() *otg.StateProtocolOspfv2 + // setMsg unmarshals StateProtocolOspfv2 from protobuf object *otg.StateProtocolOspfv2 + // and doesn't set defaults + setMsg(*otg.StateProtocolOspfv2) StateProtocolOspfv2 + // provides marshal interface + Marshal() marshalStateProtocolOspfv2 + // provides unmarshal interface + Unmarshal() unMarshalStateProtocolOspfv2 + // validate validates StateProtocolOspfv2 + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StateProtocolOspfv2, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns StateProtocolOspfv2ChoiceEnum, set in StateProtocolOspfv2 + Choice() StateProtocolOspfv2ChoiceEnum + // setChoice assigns StateProtocolOspfv2ChoiceEnum provided by user to StateProtocolOspfv2 + setChoice(value StateProtocolOspfv2ChoiceEnum) StateProtocolOspfv2 + // Routers returns StateProtocolOspfv2Routers, set in StateProtocolOspfv2. + // StateProtocolOspfv2Routers is sets state of configured OSPFv2 routers. + Routers() StateProtocolOspfv2Routers + // SetRouters assigns StateProtocolOspfv2Routers provided by user to StateProtocolOspfv2. + // StateProtocolOspfv2Routers is sets state of configured OSPFv2 routers. + SetRouters(value StateProtocolOspfv2Routers) StateProtocolOspfv2 + // HasRouters checks if Routers has been set in StateProtocolOspfv2 + HasRouters() bool + setNil() +} + +type StateProtocolOspfv2ChoiceEnum string + +// Enum of Choice on StateProtocolOspfv2 +var StateProtocolOspfv2Choice = struct { + ROUTERS StateProtocolOspfv2ChoiceEnum +}{ + ROUTERS: StateProtocolOspfv2ChoiceEnum("routers"), +} + +func (obj *stateProtocolOspfv2) Choice() StateProtocolOspfv2ChoiceEnum { + return StateProtocolOspfv2ChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *stateProtocolOspfv2) setChoice(value StateProtocolOspfv2ChoiceEnum) StateProtocolOspfv2 { + intValue, ok := otg.StateProtocolOspfv2_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StateProtocolOspfv2ChoiceEnum", string(value))) + return obj + } + enumValue := otg.StateProtocolOspfv2_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Routers = nil + obj.routersHolder = nil + + if value == StateProtocolOspfv2Choice.ROUTERS { + obj.obj.Routers = NewStateProtocolOspfv2Routers().msg() + } + + return obj +} + +// description is TBD +// Routers returns a StateProtocolOspfv2Routers +func (obj *stateProtocolOspfv2) Routers() StateProtocolOspfv2Routers { + if obj.obj.Routers == nil { + obj.setChoice(StateProtocolOspfv2Choice.ROUTERS) + } + if obj.routersHolder == nil { + obj.routersHolder = &stateProtocolOspfv2Routers{obj: obj.obj.Routers} + } + return obj.routersHolder +} + +// description is TBD +// Routers returns a StateProtocolOspfv2Routers +func (obj *stateProtocolOspfv2) HasRouters() bool { + return obj.obj.Routers != nil +} + +// description is TBD +// SetRouters sets the StateProtocolOspfv2Routers value in the StateProtocolOspfv2 object +func (obj *stateProtocolOspfv2) SetRouters(value StateProtocolOspfv2Routers) StateProtocolOspfv2 { + obj.setChoice(StateProtocolOspfv2Choice.ROUTERS) + obj.routersHolder = nil + obj.obj.Routers = value.msg() + + return obj +} + +func (obj *stateProtocolOspfv2) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface StateProtocolOspfv2") + } + + if obj.obj.Routers != nil { + + obj.Routers().validateObj(vObj, set_default) + } + +} + +func (obj *stateProtocolOspfv2) setDefault() { + var choices_set int = 0 + var choice StateProtocolOspfv2ChoiceEnum + + if obj.obj.Routers != nil { + choices_set += 1 + choice = StateProtocolOspfv2Choice.ROUTERS + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in StateProtocolOspfv2") + } + } else { + intVal := otg.StateProtocolOspfv2_Choice_Enum_value[string(choice)] + enumValue := otg.StateProtocolOspfv2_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/state_protocol_ospfv2_routers.go b/gosnappi/state_protocol_ospfv2_routers.go new file mode 100644 index 00000000..173032f0 --- /dev/null +++ b/gosnappi/state_protocol_ospfv2_routers.go @@ -0,0 +1,353 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StateProtocolOspfv2Routers ***** +type stateProtocolOspfv2Routers struct { + validation + obj *otg.StateProtocolOspfv2Routers + marshaller marshalStateProtocolOspfv2Routers + unMarshaller unMarshalStateProtocolOspfv2Routers +} + +func NewStateProtocolOspfv2Routers() StateProtocolOspfv2Routers { + obj := stateProtocolOspfv2Routers{obj: &otg.StateProtocolOspfv2Routers{}} + obj.setDefault() + return &obj +} + +func (obj *stateProtocolOspfv2Routers) msg() *otg.StateProtocolOspfv2Routers { + return obj.obj +} + +func (obj *stateProtocolOspfv2Routers) setMsg(msg *otg.StateProtocolOspfv2Routers) StateProtocolOspfv2Routers { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstateProtocolOspfv2Routers struct { + obj *stateProtocolOspfv2Routers +} + +type marshalStateProtocolOspfv2Routers interface { + // ToProto marshals StateProtocolOspfv2Routers to protobuf object *otg.StateProtocolOspfv2Routers + ToProto() (*otg.StateProtocolOspfv2Routers, error) + // ToPbText marshals StateProtocolOspfv2Routers to protobuf text + ToPbText() (string, error) + // ToYaml marshals StateProtocolOspfv2Routers to YAML text + ToYaml() (string, error) + // ToJson marshals StateProtocolOspfv2Routers to JSON text + ToJson() (string, error) +} + +type unMarshalstateProtocolOspfv2Routers struct { + obj *stateProtocolOspfv2Routers +} + +type unMarshalStateProtocolOspfv2Routers interface { + // FromProto unmarshals StateProtocolOspfv2Routers from protobuf object *otg.StateProtocolOspfv2Routers + FromProto(msg *otg.StateProtocolOspfv2Routers) (StateProtocolOspfv2Routers, error) + // FromPbText unmarshals StateProtocolOspfv2Routers from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StateProtocolOspfv2Routers from YAML text + FromYaml(value string) error + // FromJson unmarshals StateProtocolOspfv2Routers from JSON text + FromJson(value string) error +} + +func (obj *stateProtocolOspfv2Routers) Marshal() marshalStateProtocolOspfv2Routers { + if obj.marshaller == nil { + obj.marshaller = &marshalstateProtocolOspfv2Routers{obj: obj} + } + return obj.marshaller +} + +func (obj *stateProtocolOspfv2Routers) Unmarshal() unMarshalStateProtocolOspfv2Routers { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstateProtocolOspfv2Routers{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstateProtocolOspfv2Routers) ToProto() (*otg.StateProtocolOspfv2Routers, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstateProtocolOspfv2Routers) FromProto(msg *otg.StateProtocolOspfv2Routers) (StateProtocolOspfv2Routers, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstateProtocolOspfv2Routers) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstateProtocolOspfv2Routers) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstateProtocolOspfv2Routers) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolOspfv2Routers) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstateProtocolOspfv2Routers) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolOspfv2Routers) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *stateProtocolOspfv2Routers) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *stateProtocolOspfv2Routers) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *stateProtocolOspfv2Routers) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *stateProtocolOspfv2Routers) Clone() (StateProtocolOspfv2Routers, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStateProtocolOspfv2Routers() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// StateProtocolOspfv2Routers is sets state of configured OSPFv2 routers. +type StateProtocolOspfv2Routers interface { + Validation + // msg marshals StateProtocolOspfv2Routers to protobuf object *otg.StateProtocolOspfv2Routers + // and doesn't set defaults + msg() *otg.StateProtocolOspfv2Routers + // setMsg unmarshals StateProtocolOspfv2Routers from protobuf object *otg.StateProtocolOspfv2Routers + // and doesn't set defaults + setMsg(*otg.StateProtocolOspfv2Routers) StateProtocolOspfv2Routers + // provides marshal interface + Marshal() marshalStateProtocolOspfv2Routers + // provides unmarshal interface + Unmarshal() unMarshalStateProtocolOspfv2Routers + // validate validates StateProtocolOspfv2Routers + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StateProtocolOspfv2Routers, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RouterNames returns []string, set in StateProtocolOspfv2Routers. + RouterNames() []string + // SetRouterNames assigns []string provided by user to StateProtocolOspfv2Routers + SetRouterNames(value []string) StateProtocolOspfv2Routers + // State returns StateProtocolOspfv2RoutersStateEnum, set in StateProtocolOspfv2Routers + State() StateProtocolOspfv2RoutersStateEnum + // SetState assigns StateProtocolOspfv2RoutersStateEnum provided by user to StateProtocolOspfv2Routers + SetState(value StateProtocolOspfv2RoutersStateEnum) StateProtocolOspfv2Routers +} + +// The names of OSPFv2 routers for which the state has to be applied. An empty or null list will control all OSPFv2 routers. +// +// x-constraint: +// - /components/schemas/Device.Ospfv2/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ospfv2/properties/name +// +// RouterNames returns a []string +func (obj *stateProtocolOspfv2Routers) RouterNames() []string { + if obj.obj.RouterNames == nil { + obj.obj.RouterNames = make([]string, 0) + } + return obj.obj.RouterNames +} + +// The names of OSPFv2 routers for which the state has to be applied. An empty or null list will control all OSPFv2 routers. +// +// x-constraint: +// - /components/schemas/Device.Ospfv2/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ospfv2/properties/name +// +// SetRouterNames sets the []string value in the StateProtocolOspfv2Routers object +func (obj *stateProtocolOspfv2Routers) SetRouterNames(value []string) StateProtocolOspfv2Routers { + + if obj.obj.RouterNames == nil { + obj.obj.RouterNames = make([]string, 0) + } + obj.obj.RouterNames = value + + return obj +} + +type StateProtocolOspfv2RoutersStateEnum string + +// Enum of State on StateProtocolOspfv2Routers +var StateProtocolOspfv2RoutersState = struct { + UP StateProtocolOspfv2RoutersStateEnum + DOWN StateProtocolOspfv2RoutersStateEnum +}{ + UP: StateProtocolOspfv2RoutersStateEnum("up"), + DOWN: StateProtocolOspfv2RoutersStateEnum("down"), +} + +func (obj *stateProtocolOspfv2Routers) State() StateProtocolOspfv2RoutersStateEnum { + return StateProtocolOspfv2RoutersStateEnum(obj.obj.State.Enum().String()) +} + +func (obj *stateProtocolOspfv2Routers) SetState(value StateProtocolOspfv2RoutersStateEnum) StateProtocolOspfv2Routers { + intValue, ok := otg.StateProtocolOspfv2Routers_State_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StateProtocolOspfv2RoutersStateEnum", string(value))) + return obj + } + enumValue := otg.StateProtocolOspfv2Routers_State_Enum(intValue) + obj.obj.State = &enumValue + + return obj +} + +func (obj *stateProtocolOspfv2Routers) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // State is required + if obj.obj.State == nil { + vObj.validationErrors = append(vObj.validationErrors, "State is required field on interface StateProtocolOspfv2Routers") + } +} + +func (obj *stateProtocolOspfv2Routers) setDefault() { + +} diff --git a/gosnappi/state_protocol_route.go b/gosnappi/state_protocol_route.go new file mode 100644 index 00000000..677e3d39 --- /dev/null +++ b/gosnappi/state_protocol_route.go @@ -0,0 +1,369 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StateProtocolRoute ***** +type stateProtocolRoute struct { + validation + obj *otg.StateProtocolRoute + marshaller marshalStateProtocolRoute + unMarshaller unMarshalStateProtocolRoute +} + +func NewStateProtocolRoute() StateProtocolRoute { + obj := stateProtocolRoute{obj: &otg.StateProtocolRoute{}} + obj.setDefault() + return &obj +} + +func (obj *stateProtocolRoute) msg() *otg.StateProtocolRoute { + return obj.obj +} + +func (obj *stateProtocolRoute) setMsg(msg *otg.StateProtocolRoute) StateProtocolRoute { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstateProtocolRoute struct { + obj *stateProtocolRoute +} + +type marshalStateProtocolRoute interface { + // ToProto marshals StateProtocolRoute to protobuf object *otg.StateProtocolRoute + ToProto() (*otg.StateProtocolRoute, error) + // ToPbText marshals StateProtocolRoute to protobuf text + ToPbText() (string, error) + // ToYaml marshals StateProtocolRoute to YAML text + ToYaml() (string, error) + // ToJson marshals StateProtocolRoute to JSON text + ToJson() (string, error) +} + +type unMarshalstateProtocolRoute struct { + obj *stateProtocolRoute +} + +type unMarshalStateProtocolRoute interface { + // FromProto unmarshals StateProtocolRoute from protobuf object *otg.StateProtocolRoute + FromProto(msg *otg.StateProtocolRoute) (StateProtocolRoute, error) + // FromPbText unmarshals StateProtocolRoute from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StateProtocolRoute from YAML text + FromYaml(value string) error + // FromJson unmarshals StateProtocolRoute from JSON text + FromJson(value string) error +} + +func (obj *stateProtocolRoute) Marshal() marshalStateProtocolRoute { + if obj.marshaller == nil { + obj.marshaller = &marshalstateProtocolRoute{obj: obj} + } + return obj.marshaller +} + +func (obj *stateProtocolRoute) Unmarshal() unMarshalStateProtocolRoute { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstateProtocolRoute{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstateProtocolRoute) ToProto() (*otg.StateProtocolRoute, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstateProtocolRoute) FromProto(msg *otg.StateProtocolRoute) (StateProtocolRoute, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstateProtocolRoute) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstateProtocolRoute) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstateProtocolRoute) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolRoute) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstateProtocolRoute) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateProtocolRoute) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *stateProtocolRoute) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *stateProtocolRoute) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *stateProtocolRoute) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *stateProtocolRoute) Clone() (StateProtocolRoute, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStateProtocolRoute() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// StateProtocolRoute is sets the state of configured routes +type StateProtocolRoute interface { + Validation + // msg marshals StateProtocolRoute to protobuf object *otg.StateProtocolRoute + // and doesn't set defaults + msg() *otg.StateProtocolRoute + // setMsg unmarshals StateProtocolRoute from protobuf object *otg.StateProtocolRoute + // and doesn't set defaults + setMsg(*otg.StateProtocolRoute) StateProtocolRoute + // provides marshal interface + Marshal() marshalStateProtocolRoute + // provides unmarshal interface + Unmarshal() unMarshalStateProtocolRoute + // validate validates StateProtocolRoute + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StateProtocolRoute, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Names returns []string, set in StateProtocolRoute. + Names() []string + // SetNames assigns []string provided by user to StateProtocolRoute + SetNames(value []string) StateProtocolRoute + // State returns StateProtocolRouteStateEnum, set in StateProtocolRoute + State() StateProtocolRouteStateEnum + // SetState assigns StateProtocolRouteStateEnum provided by user to StateProtocolRoute + SetState(value StateProtocolRouteStateEnum) StateProtocolRoute +} + +// The names of device route objects to control. If no names are specified then all route objects that match the x-constraint will be affected. +// +// x-constraint: +// - /components/schemas/Bgp.V4RouteRange/properties/name +// - /components/schemas/Bgp.V6RouteRange/properties/name +// - /components/schemas/Isis.V4RouteRange/properties/name +// - /components/schemas/Isis.V6RouteRange/properties/name +// - /components/schemas/Ospfv2.V4RouteRange/properties/name +// +// x-constraint: +// - /components/schemas/Bgp.V4RouteRange/properties/name +// - /components/schemas/Bgp.V6RouteRange/properties/name +// - /components/schemas/Isis.V4RouteRange/properties/name +// - /components/schemas/Isis.V6RouteRange/properties/name +// - /components/schemas/Ospfv2.V4RouteRange/properties/name +// +// Names returns a []string +func (obj *stateProtocolRoute) Names() []string { + if obj.obj.Names == nil { + obj.obj.Names = make([]string, 0) + } + return obj.obj.Names +} + +// The names of device route objects to control. If no names are specified then all route objects that match the x-constraint will be affected. +// +// x-constraint: +// - /components/schemas/Bgp.V4RouteRange/properties/name +// - /components/schemas/Bgp.V6RouteRange/properties/name +// - /components/schemas/Isis.V4RouteRange/properties/name +// - /components/schemas/Isis.V6RouteRange/properties/name +// - /components/schemas/Ospfv2.V4RouteRange/properties/name +// +// x-constraint: +// - /components/schemas/Bgp.V4RouteRange/properties/name +// - /components/schemas/Bgp.V6RouteRange/properties/name +// - /components/schemas/Isis.V4RouteRange/properties/name +// - /components/schemas/Isis.V6RouteRange/properties/name +// - /components/schemas/Ospfv2.V4RouteRange/properties/name +// +// SetNames sets the []string value in the StateProtocolRoute object +func (obj *stateProtocolRoute) SetNames(value []string) StateProtocolRoute { + + if obj.obj.Names == nil { + obj.obj.Names = make([]string, 0) + } + obj.obj.Names = value + + return obj +} + +type StateProtocolRouteStateEnum string + +// Enum of State on StateProtocolRoute +var StateProtocolRouteState = struct { + WITHDRAW StateProtocolRouteStateEnum + ADVERTISE StateProtocolRouteStateEnum +}{ + WITHDRAW: StateProtocolRouteStateEnum("withdraw"), + ADVERTISE: StateProtocolRouteStateEnum("advertise"), +} + +func (obj *stateProtocolRoute) State() StateProtocolRouteStateEnum { + return StateProtocolRouteStateEnum(obj.obj.State.Enum().String()) +} + +func (obj *stateProtocolRoute) SetState(value StateProtocolRouteStateEnum) StateProtocolRoute { + intValue, ok := otg.StateProtocolRoute_State_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StateProtocolRouteStateEnum", string(value))) + return obj + } + enumValue := otg.StateProtocolRoute_State_Enum(intValue) + obj.obj.State = &enumValue + + return obj +} + +func (obj *stateProtocolRoute) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // State is required + if obj.obj.State == nil { + vObj.validationErrors = append(vObj.validationErrors, "State is required field on interface StateProtocolRoute") + } +} + +func (obj *stateProtocolRoute) setDefault() { + +} diff --git a/gosnappi/state_traffic.go b/gosnappi/state_traffic.go new file mode 100644 index 00000000..6d25f083 --- /dev/null +++ b/gosnappi/state_traffic.go @@ -0,0 +1,387 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StateTraffic ***** +type stateTraffic struct { + validation + obj *otg.StateTraffic + marshaller marshalStateTraffic + unMarshaller unMarshalStateTraffic + flowTransmitHolder StateTrafficFlowTransmit +} + +func NewStateTraffic() StateTraffic { + obj := stateTraffic{obj: &otg.StateTraffic{}} + obj.setDefault() + return &obj +} + +func (obj *stateTraffic) msg() *otg.StateTraffic { + return obj.obj +} + +func (obj *stateTraffic) setMsg(msg *otg.StateTraffic) StateTraffic { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstateTraffic struct { + obj *stateTraffic +} + +type marshalStateTraffic interface { + // ToProto marshals StateTraffic to protobuf object *otg.StateTraffic + ToProto() (*otg.StateTraffic, error) + // ToPbText marshals StateTraffic to protobuf text + ToPbText() (string, error) + // ToYaml marshals StateTraffic to YAML text + ToYaml() (string, error) + // ToJson marshals StateTraffic to JSON text + ToJson() (string, error) +} + +type unMarshalstateTraffic struct { + obj *stateTraffic +} + +type unMarshalStateTraffic interface { + // FromProto unmarshals StateTraffic from protobuf object *otg.StateTraffic + FromProto(msg *otg.StateTraffic) (StateTraffic, error) + // FromPbText unmarshals StateTraffic from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StateTraffic from YAML text + FromYaml(value string) error + // FromJson unmarshals StateTraffic from JSON text + FromJson(value string) error +} + +func (obj *stateTraffic) Marshal() marshalStateTraffic { + if obj.marshaller == nil { + obj.marshaller = &marshalstateTraffic{obj: obj} + } + return obj.marshaller +} + +func (obj *stateTraffic) Unmarshal() unMarshalStateTraffic { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstateTraffic{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstateTraffic) ToProto() (*otg.StateTraffic, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstateTraffic) FromProto(msg *otg.StateTraffic) (StateTraffic, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstateTraffic) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstateTraffic) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstateTraffic) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateTraffic) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstateTraffic) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateTraffic) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *stateTraffic) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *stateTraffic) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *stateTraffic) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *stateTraffic) Clone() (StateTraffic, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStateTraffic() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *stateTraffic) setNil() { + obj.flowTransmitHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// StateTraffic is states associated with configured flows +type StateTraffic interface { + Validation + // msg marshals StateTraffic to protobuf object *otg.StateTraffic + // and doesn't set defaults + msg() *otg.StateTraffic + // setMsg unmarshals StateTraffic from protobuf object *otg.StateTraffic + // and doesn't set defaults + setMsg(*otg.StateTraffic) StateTraffic + // provides marshal interface + Marshal() marshalStateTraffic + // provides unmarshal interface + Unmarshal() unMarshalStateTraffic + // validate validates StateTraffic + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StateTraffic, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns StateTrafficChoiceEnum, set in StateTraffic + Choice() StateTrafficChoiceEnum + // setChoice assigns StateTrafficChoiceEnum provided by user to StateTraffic + setChoice(value StateTrafficChoiceEnum) StateTraffic + // FlowTransmit returns StateTrafficFlowTransmit, set in StateTraffic. + // StateTrafficFlowTransmit is provides state control of flow transmission. + FlowTransmit() StateTrafficFlowTransmit + // SetFlowTransmit assigns StateTrafficFlowTransmit provided by user to StateTraffic. + // StateTrafficFlowTransmit is provides state control of flow transmission. + SetFlowTransmit(value StateTrafficFlowTransmit) StateTraffic + // HasFlowTransmit checks if FlowTransmit has been set in StateTraffic + HasFlowTransmit() bool + setNil() +} + +type StateTrafficChoiceEnum string + +// Enum of Choice on StateTraffic +var StateTrafficChoice = struct { + FLOW_TRANSMIT StateTrafficChoiceEnum +}{ + FLOW_TRANSMIT: StateTrafficChoiceEnum("flow_transmit"), +} + +func (obj *stateTraffic) Choice() StateTrafficChoiceEnum { + return StateTrafficChoiceEnum(obj.obj.Choice.Enum().String()) +} + +func (obj *stateTraffic) setChoice(value StateTrafficChoiceEnum) StateTraffic { + intValue, ok := otg.StateTraffic_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StateTrafficChoiceEnum", string(value))) + return obj + } + enumValue := otg.StateTraffic_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.FlowTransmit = nil + obj.flowTransmitHolder = nil + + if value == StateTrafficChoice.FLOW_TRANSMIT { + obj.obj.FlowTransmit = NewStateTrafficFlowTransmit().msg() + } + + return obj +} + +// description is TBD +// FlowTransmit returns a StateTrafficFlowTransmit +func (obj *stateTraffic) FlowTransmit() StateTrafficFlowTransmit { + if obj.obj.FlowTransmit == nil { + obj.setChoice(StateTrafficChoice.FLOW_TRANSMIT) + } + if obj.flowTransmitHolder == nil { + obj.flowTransmitHolder = &stateTrafficFlowTransmit{obj: obj.obj.FlowTransmit} + } + return obj.flowTransmitHolder +} + +// description is TBD +// FlowTransmit returns a StateTrafficFlowTransmit +func (obj *stateTraffic) HasFlowTransmit() bool { + return obj.obj.FlowTransmit != nil +} + +// description is TBD +// SetFlowTransmit sets the StateTrafficFlowTransmit value in the StateTraffic object +func (obj *stateTraffic) SetFlowTransmit(value StateTrafficFlowTransmit) StateTraffic { + obj.setChoice(StateTrafficChoice.FLOW_TRANSMIT) + obj.flowTransmitHolder = nil + obj.obj.FlowTransmit = value.msg() + + return obj +} + +func (obj *stateTraffic) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Choice is required + if obj.obj.Choice == nil { + vObj.validationErrors = append(vObj.validationErrors, "Choice is required field on interface StateTraffic") + } + + if obj.obj.FlowTransmit != nil { + + obj.FlowTransmit().validateObj(vObj, set_default) + } + +} + +func (obj *stateTraffic) setDefault() { + var choices_set int = 0 + var choice StateTrafficChoiceEnum + + if obj.obj.FlowTransmit != nil { + choices_set += 1 + choice = StateTrafficChoice.FLOW_TRANSMIT + } + if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in StateTraffic") + } + } else { + intVal := otg.StateTraffic_Choice_Enum_value[string(choice)] + enumValue := otg.StateTraffic_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/state_traffic_flow_transmit.go b/gosnappi/state_traffic_flow_transmit.go new file mode 100644 index 00000000..500df684 --- /dev/null +++ b/gosnappi/state_traffic_flow_transmit.go @@ -0,0 +1,359 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StateTrafficFlowTransmit ***** +type stateTrafficFlowTransmit struct { + validation + obj *otg.StateTrafficFlowTransmit + marshaller marshalStateTrafficFlowTransmit + unMarshaller unMarshalStateTrafficFlowTransmit +} + +func NewStateTrafficFlowTransmit() StateTrafficFlowTransmit { + obj := stateTrafficFlowTransmit{obj: &otg.StateTrafficFlowTransmit{}} + obj.setDefault() + return &obj +} + +func (obj *stateTrafficFlowTransmit) msg() *otg.StateTrafficFlowTransmit { + return obj.obj +} + +func (obj *stateTrafficFlowTransmit) setMsg(msg *otg.StateTrafficFlowTransmit) StateTrafficFlowTransmit { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstateTrafficFlowTransmit struct { + obj *stateTrafficFlowTransmit +} + +type marshalStateTrafficFlowTransmit interface { + // ToProto marshals StateTrafficFlowTransmit to protobuf object *otg.StateTrafficFlowTransmit + ToProto() (*otg.StateTrafficFlowTransmit, error) + // ToPbText marshals StateTrafficFlowTransmit to protobuf text + ToPbText() (string, error) + // ToYaml marshals StateTrafficFlowTransmit to YAML text + ToYaml() (string, error) + // ToJson marshals StateTrafficFlowTransmit to JSON text + ToJson() (string, error) +} + +type unMarshalstateTrafficFlowTransmit struct { + obj *stateTrafficFlowTransmit +} + +type unMarshalStateTrafficFlowTransmit interface { + // FromProto unmarshals StateTrafficFlowTransmit from protobuf object *otg.StateTrafficFlowTransmit + FromProto(msg *otg.StateTrafficFlowTransmit) (StateTrafficFlowTransmit, error) + // FromPbText unmarshals StateTrafficFlowTransmit from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StateTrafficFlowTransmit from YAML text + FromYaml(value string) error + // FromJson unmarshals StateTrafficFlowTransmit from JSON text + FromJson(value string) error +} + +func (obj *stateTrafficFlowTransmit) Marshal() marshalStateTrafficFlowTransmit { + if obj.marshaller == nil { + obj.marshaller = &marshalstateTrafficFlowTransmit{obj: obj} + } + return obj.marshaller +} + +func (obj *stateTrafficFlowTransmit) Unmarshal() unMarshalStateTrafficFlowTransmit { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstateTrafficFlowTransmit{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstateTrafficFlowTransmit) ToProto() (*otg.StateTrafficFlowTransmit, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstateTrafficFlowTransmit) FromProto(msg *otg.StateTrafficFlowTransmit) (StateTrafficFlowTransmit, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstateTrafficFlowTransmit) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstateTrafficFlowTransmit) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstateTrafficFlowTransmit) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateTrafficFlowTransmit) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstateTrafficFlowTransmit) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstateTrafficFlowTransmit) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *stateTrafficFlowTransmit) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *stateTrafficFlowTransmit) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *stateTrafficFlowTransmit) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *stateTrafficFlowTransmit) Clone() (StateTrafficFlowTransmit, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStateTrafficFlowTransmit() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// StateTrafficFlowTransmit is provides state control of flow transmission. +type StateTrafficFlowTransmit interface { + Validation + // msg marshals StateTrafficFlowTransmit to protobuf object *otg.StateTrafficFlowTransmit + // and doesn't set defaults + msg() *otg.StateTrafficFlowTransmit + // setMsg unmarshals StateTrafficFlowTransmit from protobuf object *otg.StateTrafficFlowTransmit + // and doesn't set defaults + setMsg(*otg.StateTrafficFlowTransmit) StateTrafficFlowTransmit + // provides marshal interface + Marshal() marshalStateTrafficFlowTransmit + // provides unmarshal interface + Unmarshal() unMarshalStateTrafficFlowTransmit + // validate validates StateTrafficFlowTransmit + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StateTrafficFlowTransmit, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // FlowNames returns []string, set in StateTrafficFlowTransmit. + FlowNames() []string + // SetFlowNames assigns []string provided by user to StateTrafficFlowTransmit + SetFlowNames(value []string) StateTrafficFlowTransmit + // State returns StateTrafficFlowTransmitStateEnum, set in StateTrafficFlowTransmit + State() StateTrafficFlowTransmitStateEnum + // SetState assigns StateTrafficFlowTransmitStateEnum provided by user to StateTrafficFlowTransmit + SetState(value StateTrafficFlowTransmitStateEnum) StateTrafficFlowTransmit +} + +// The names of flows to which the transmit state will be applied to. If the list of flow_names is empty or null the state will be applied to all configured flows. +// If the list is not empty any flow that is not included in the list of flow_names MUST be ignored and not included in the state change. +// +// x-constraint: +// - /components/schemas/Flow/properties/name +// +// x-constraint: +// - /components/schemas/Flow/properties/name +// +// FlowNames returns a []string +func (obj *stateTrafficFlowTransmit) FlowNames() []string { + if obj.obj.FlowNames == nil { + obj.obj.FlowNames = make([]string, 0) + } + return obj.obj.FlowNames +} + +// The names of flows to which the transmit state will be applied to. If the list of flow_names is empty or null the state will be applied to all configured flows. +// If the list is not empty any flow that is not included in the list of flow_names MUST be ignored and not included in the state change. +// +// x-constraint: +// - /components/schemas/Flow/properties/name +// +// x-constraint: +// - /components/schemas/Flow/properties/name +// +// SetFlowNames sets the []string value in the StateTrafficFlowTransmit object +func (obj *stateTrafficFlowTransmit) SetFlowNames(value []string) StateTrafficFlowTransmit { + + if obj.obj.FlowNames == nil { + obj.obj.FlowNames = make([]string, 0) + } + obj.obj.FlowNames = value + + return obj +} + +type StateTrafficFlowTransmitStateEnum string + +// Enum of State on StateTrafficFlowTransmit +var StateTrafficFlowTransmitState = struct { + START StateTrafficFlowTransmitStateEnum + STOP StateTrafficFlowTransmitStateEnum + PAUSE StateTrafficFlowTransmitStateEnum + RESUME StateTrafficFlowTransmitStateEnum +}{ + START: StateTrafficFlowTransmitStateEnum("start"), + STOP: StateTrafficFlowTransmitStateEnum("stop"), + PAUSE: StateTrafficFlowTransmitStateEnum("pause"), + RESUME: StateTrafficFlowTransmitStateEnum("resume"), +} + +func (obj *stateTrafficFlowTransmit) State() StateTrafficFlowTransmitStateEnum { + return StateTrafficFlowTransmitStateEnum(obj.obj.State.Enum().String()) +} + +func (obj *stateTrafficFlowTransmit) SetState(value StateTrafficFlowTransmitStateEnum) StateTrafficFlowTransmit { + intValue, ok := otg.StateTrafficFlowTransmit_State_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StateTrafficFlowTransmitStateEnum", string(value))) + return obj + } + enumValue := otg.StateTrafficFlowTransmit_State_Enum(intValue) + obj.obj.State = &enumValue + + return obj +} + +func (obj *stateTrafficFlowTransmit) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // State is required + if obj.obj.State == nil { + vObj.validationErrors = append(vObj.validationErrors, "State is required field on interface StateTrafficFlowTransmit") + } +} + +func (obj *stateTrafficFlowTransmit) setDefault() { + +} diff --git a/gosnappi/states_request.go b/gosnappi/states_request.go new file mode 100644 index 00000000..c115bf19 --- /dev/null +++ b/gosnappi/states_request.go @@ -0,0 +1,956 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StatesRequest ***** +type statesRequest struct { + validation + obj *otg.StatesRequest + marshaller marshalStatesRequest + unMarshaller unMarshalStatesRequest + ipv4NeighborsHolder Neighborsv4StatesRequest + ipv6NeighborsHolder Neighborsv6StatesRequest + bgpPrefixesHolder BgpPrefixStateRequest + isisLspsHolder IsisLspsStateRequest + lldpNeighborsHolder LldpNeighborsStateRequest + rsvpLspsHolder RsvpLspsStateRequest + dhcpv4InterfacesHolder Dhcpv4InterfaceStateRequest + dhcpv4LeasesHolder Dhcpv4LeaseStateRequest + dhcpv6InterfacesHolder Dhcpv6InterfaceStateRequest + dhcpv6LeasesHolder Dhcpv6LeaseStateRequest + ospfv2LsasHolder Ospfv2LsasStateRequest +} + +func NewStatesRequest() StatesRequest { + obj := statesRequest{obj: &otg.StatesRequest{}} + obj.setDefault() + return &obj +} + +func (obj *statesRequest) msg() *otg.StatesRequest { + return obj.obj +} + +func (obj *statesRequest) setMsg(msg *otg.StatesRequest) StatesRequest { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstatesRequest struct { + obj *statesRequest +} + +type marshalStatesRequest interface { + // ToProto marshals StatesRequest to protobuf object *otg.StatesRequest + ToProto() (*otg.StatesRequest, error) + // ToPbText marshals StatesRequest to protobuf text + ToPbText() (string, error) + // ToYaml marshals StatesRequest to YAML text + ToYaml() (string, error) + // ToJson marshals StatesRequest to JSON text + ToJson() (string, error) +} + +type unMarshalstatesRequest struct { + obj *statesRequest +} + +type unMarshalStatesRequest interface { + // FromProto unmarshals StatesRequest from protobuf object *otg.StatesRequest + FromProto(msg *otg.StatesRequest) (StatesRequest, error) + // FromPbText unmarshals StatesRequest from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StatesRequest from YAML text + FromYaml(value string) error + // FromJson unmarshals StatesRequest from JSON text + FromJson(value string) error +} + +func (obj *statesRequest) Marshal() marshalStatesRequest { + if obj.marshaller == nil { + obj.marshaller = &marshalstatesRequest{obj: obj} + } + return obj.marshaller +} + +func (obj *statesRequest) Unmarshal() unMarshalStatesRequest { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstatesRequest{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstatesRequest) ToProto() (*otg.StatesRequest, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstatesRequest) FromProto(msg *otg.StatesRequest) (StatesRequest, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstatesRequest) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstatesRequest) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstatesRequest) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstatesRequest) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstatesRequest) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstatesRequest) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *statesRequest) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *statesRequest) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *statesRequest) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *statesRequest) Clone() (StatesRequest, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStatesRequest() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *statesRequest) setNil() { + obj.ipv4NeighborsHolder = nil + obj.ipv6NeighborsHolder = nil + obj.bgpPrefixesHolder = nil + obj.isisLspsHolder = nil + obj.lldpNeighborsHolder = nil + obj.rsvpLspsHolder = nil + obj.dhcpv4InterfacesHolder = nil + obj.dhcpv4LeasesHolder = nil + obj.dhcpv6InterfacesHolder = nil + obj.dhcpv6LeasesHolder = nil + obj.ospfv2LsasHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// StatesRequest is request to traffic generator for states of choice +type StatesRequest interface { + Validation + // msg marshals StatesRequest to protobuf object *otg.StatesRequest + // and doesn't set defaults + msg() *otg.StatesRequest + // setMsg unmarshals StatesRequest from protobuf object *otg.StatesRequest + // and doesn't set defaults + setMsg(*otg.StatesRequest) StatesRequest + // provides marshal interface + Marshal() marshalStatesRequest + // provides unmarshal interface + Unmarshal() unMarshalStatesRequest + // validate validates StatesRequest + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StatesRequest, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns StatesRequestChoiceEnum, set in StatesRequest + Choice() StatesRequestChoiceEnum + // setChoice assigns StatesRequestChoiceEnum provided by user to StatesRequest + setChoice(value StatesRequestChoiceEnum) StatesRequest + // HasChoice checks if Choice has been set in StatesRequest + HasChoice() bool + // Ipv4Neighbors returns Neighborsv4StatesRequest, set in StatesRequest. + // Neighborsv4StatesRequest is the request to retrieve IPv4 Neighbor state (ARP cache entries) of a network interface(s). + Ipv4Neighbors() Neighborsv4StatesRequest + // SetIpv4Neighbors assigns Neighborsv4StatesRequest provided by user to StatesRequest. + // Neighborsv4StatesRequest is the request to retrieve IPv4 Neighbor state (ARP cache entries) of a network interface(s). + SetIpv4Neighbors(value Neighborsv4StatesRequest) StatesRequest + // HasIpv4Neighbors checks if Ipv4Neighbors has been set in StatesRequest + HasIpv4Neighbors() bool + // Ipv6Neighbors returns Neighborsv6StatesRequest, set in StatesRequest. + // Neighborsv6StatesRequest is the request to retrieve IPv6 Neighbor state (NDISC cache entries) of a network interface(s). + Ipv6Neighbors() Neighborsv6StatesRequest + // SetIpv6Neighbors assigns Neighborsv6StatesRequest provided by user to StatesRequest. + // Neighborsv6StatesRequest is the request to retrieve IPv6 Neighbor state (NDISC cache entries) of a network interface(s). + SetIpv6Neighbors(value Neighborsv6StatesRequest) StatesRequest + // HasIpv6Neighbors checks if Ipv6Neighbors has been set in StatesRequest + HasIpv6Neighbors() bool + // BgpPrefixes returns BgpPrefixStateRequest, set in StatesRequest. + // BgpPrefixStateRequest is the request to retrieve BGP peer prefix information. + BgpPrefixes() BgpPrefixStateRequest + // SetBgpPrefixes assigns BgpPrefixStateRequest provided by user to StatesRequest. + // BgpPrefixStateRequest is the request to retrieve BGP peer prefix information. + SetBgpPrefixes(value BgpPrefixStateRequest) StatesRequest + // HasBgpPrefixes checks if BgpPrefixes has been set in StatesRequest + HasBgpPrefixes() bool + // IsisLsps returns IsisLspsStateRequest, set in StatesRequest. + // IsisLspsStateRequest is the request to retrieve ISIS Link State PDU (LSP) information learned by the router. + IsisLsps() IsisLspsStateRequest + // SetIsisLsps assigns IsisLspsStateRequest provided by user to StatesRequest. + // IsisLspsStateRequest is the request to retrieve ISIS Link State PDU (LSP) information learned by the router. + SetIsisLsps(value IsisLspsStateRequest) StatesRequest + // HasIsisLsps checks if IsisLsps has been set in StatesRequest + HasIsisLsps() bool + // LldpNeighbors returns LldpNeighborsStateRequest, set in StatesRequest. + // LldpNeighborsStateRequest is the request to retrieve LLDP neighbor information for a given instance. + LldpNeighbors() LldpNeighborsStateRequest + // SetLldpNeighbors assigns LldpNeighborsStateRequest provided by user to StatesRequest. + // LldpNeighborsStateRequest is the request to retrieve LLDP neighbor information for a given instance. + SetLldpNeighbors(value LldpNeighborsStateRequest) StatesRequest + // HasLldpNeighbors checks if LldpNeighbors has been set in StatesRequest + HasLldpNeighbors() bool + // RsvpLsps returns RsvpLspsStateRequest, set in StatesRequest. + // RsvpLspsStateRequest is the request to retrieve RSVP Label Switched Path (LSP) information learned by the router. + RsvpLsps() RsvpLspsStateRequest + // SetRsvpLsps assigns RsvpLspsStateRequest provided by user to StatesRequest. + // RsvpLspsStateRequest is the request to retrieve RSVP Label Switched Path (LSP) information learned by the router. + SetRsvpLsps(value RsvpLspsStateRequest) StatesRequest + // HasRsvpLsps checks if RsvpLsps has been set in StatesRequest + HasRsvpLsps() bool + // Dhcpv4Interfaces returns Dhcpv4InterfaceStateRequest, set in StatesRequest. + // Dhcpv4InterfaceStateRequest is the request for assigned IPv4 address information associated with DHCP Client sessions. + Dhcpv4Interfaces() Dhcpv4InterfaceStateRequest + // SetDhcpv4Interfaces assigns Dhcpv4InterfaceStateRequest provided by user to StatesRequest. + // Dhcpv4InterfaceStateRequest is the request for assigned IPv4 address information associated with DHCP Client sessions. + SetDhcpv4Interfaces(value Dhcpv4InterfaceStateRequest) StatesRequest + // HasDhcpv4Interfaces checks if Dhcpv4Interfaces has been set in StatesRequest + HasDhcpv4Interfaces() bool + // Dhcpv4Leases returns Dhcpv4LeaseStateRequest, set in StatesRequest. + // Dhcpv4LeaseStateRequest is the request to retrieve DHCP Server host allocated status. + Dhcpv4Leases() Dhcpv4LeaseStateRequest + // SetDhcpv4Leases assigns Dhcpv4LeaseStateRequest provided by user to StatesRequest. + // Dhcpv4LeaseStateRequest is the request to retrieve DHCP Server host allocated status. + SetDhcpv4Leases(value Dhcpv4LeaseStateRequest) StatesRequest + // HasDhcpv4Leases checks if Dhcpv4Leases has been set in StatesRequest + HasDhcpv4Leases() bool + // Dhcpv6Interfaces returns Dhcpv6InterfaceStateRequest, set in StatesRequest. + // Dhcpv6InterfaceStateRequest is the request for assigned IPv6 address information associated with DHCP Client sessions. + Dhcpv6Interfaces() Dhcpv6InterfaceStateRequest + // SetDhcpv6Interfaces assigns Dhcpv6InterfaceStateRequest provided by user to StatesRequest. + // Dhcpv6InterfaceStateRequest is the request for assigned IPv6 address information associated with DHCP Client sessions. + SetDhcpv6Interfaces(value Dhcpv6InterfaceStateRequest) StatesRequest + // HasDhcpv6Interfaces checks if Dhcpv6Interfaces has been set in StatesRequest + HasDhcpv6Interfaces() bool + // Dhcpv6Leases returns Dhcpv6LeaseStateRequest, set in StatesRequest. + // Dhcpv6LeaseStateRequest is the request to retrieve DHCP Server host allocated status. + Dhcpv6Leases() Dhcpv6LeaseStateRequest + // SetDhcpv6Leases assigns Dhcpv6LeaseStateRequest provided by user to StatesRequest. + // Dhcpv6LeaseStateRequest is the request to retrieve DHCP Server host allocated status. + SetDhcpv6Leases(value Dhcpv6LeaseStateRequest) StatesRequest + // HasDhcpv6Leases checks if Dhcpv6Leases has been set in StatesRequest + HasDhcpv6Leases() bool + // Ospfv2Lsas returns Ospfv2LsasStateRequest, set in StatesRequest. + // Ospfv2LsasStateRequest is the request to retrieve OSPFv2 Link State Advertisements (LSA) information learned by the routers. + Ospfv2Lsas() Ospfv2LsasStateRequest + // SetOspfv2Lsas assigns Ospfv2LsasStateRequest provided by user to StatesRequest. + // Ospfv2LsasStateRequest is the request to retrieve OSPFv2 Link State Advertisements (LSA) information learned by the routers. + SetOspfv2Lsas(value Ospfv2LsasStateRequest) StatesRequest + // HasOspfv2Lsas checks if Ospfv2Lsas has been set in StatesRequest + HasOspfv2Lsas() bool + setNil() +} + +type StatesRequestChoiceEnum string + +// Enum of Choice on StatesRequest +var StatesRequestChoice = struct { + IPV4_NEIGHBORS StatesRequestChoiceEnum + IPV6_NEIGHBORS StatesRequestChoiceEnum + BGP_PREFIXES StatesRequestChoiceEnum + ISIS_LSPS StatesRequestChoiceEnum + LLDP_NEIGHBORS StatesRequestChoiceEnum + RSVP_LSPS StatesRequestChoiceEnum + DHCPV4_INTERFACES StatesRequestChoiceEnum + DHCPV4_LEASES StatesRequestChoiceEnum + DHCPV6_INTERFACES StatesRequestChoiceEnum + DHCPV6_LEASES StatesRequestChoiceEnum + OSPFV2_LSAS StatesRequestChoiceEnum +}{ + IPV4_NEIGHBORS: StatesRequestChoiceEnum("ipv4_neighbors"), + IPV6_NEIGHBORS: StatesRequestChoiceEnum("ipv6_neighbors"), + BGP_PREFIXES: StatesRequestChoiceEnum("bgp_prefixes"), + ISIS_LSPS: StatesRequestChoiceEnum("isis_lsps"), + LLDP_NEIGHBORS: StatesRequestChoiceEnum("lldp_neighbors"), + RSVP_LSPS: StatesRequestChoiceEnum("rsvp_lsps"), + DHCPV4_INTERFACES: StatesRequestChoiceEnum("dhcpv4_interfaces"), + DHCPV4_LEASES: StatesRequestChoiceEnum("dhcpv4_leases"), + DHCPV6_INTERFACES: StatesRequestChoiceEnum("dhcpv6_interfaces"), + DHCPV6_LEASES: StatesRequestChoiceEnum("dhcpv6_leases"), + OSPFV2_LSAS: StatesRequestChoiceEnum("ospfv2_lsas"), +} + +func (obj *statesRequest) Choice() StatesRequestChoiceEnum { + return StatesRequestChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *statesRequest) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *statesRequest) setChoice(value StatesRequestChoiceEnum) StatesRequest { + intValue, ok := otg.StatesRequest_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StatesRequestChoiceEnum", string(value))) + return obj + } + enumValue := otg.StatesRequest_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ospfv2Lsas = nil + obj.ospfv2LsasHolder = nil + obj.obj.Dhcpv6Leases = nil + obj.dhcpv6LeasesHolder = nil + obj.obj.Dhcpv6Interfaces = nil + obj.dhcpv6InterfacesHolder = nil + obj.obj.Dhcpv4Leases = nil + obj.dhcpv4LeasesHolder = nil + obj.obj.Dhcpv4Interfaces = nil + obj.dhcpv4InterfacesHolder = nil + obj.obj.RsvpLsps = nil + obj.rsvpLspsHolder = nil + obj.obj.LldpNeighbors = nil + obj.lldpNeighborsHolder = nil + obj.obj.IsisLsps = nil + obj.isisLspsHolder = nil + obj.obj.BgpPrefixes = nil + obj.bgpPrefixesHolder = nil + obj.obj.Ipv6Neighbors = nil + obj.ipv6NeighborsHolder = nil + obj.obj.Ipv4Neighbors = nil + obj.ipv4NeighborsHolder = nil + + if value == StatesRequestChoice.IPV4_NEIGHBORS { + obj.obj.Ipv4Neighbors = NewNeighborsv4StatesRequest().msg() + } + + if value == StatesRequestChoice.IPV6_NEIGHBORS { + obj.obj.Ipv6Neighbors = NewNeighborsv6StatesRequest().msg() + } + + if value == StatesRequestChoice.BGP_PREFIXES { + obj.obj.BgpPrefixes = NewBgpPrefixStateRequest().msg() + } + + if value == StatesRequestChoice.ISIS_LSPS { + obj.obj.IsisLsps = NewIsisLspsStateRequest().msg() + } + + if value == StatesRequestChoice.LLDP_NEIGHBORS { + obj.obj.LldpNeighbors = NewLldpNeighborsStateRequest().msg() + } + + if value == StatesRequestChoice.RSVP_LSPS { + obj.obj.RsvpLsps = NewRsvpLspsStateRequest().msg() + } + + if value == StatesRequestChoice.DHCPV4_INTERFACES { + obj.obj.Dhcpv4Interfaces = NewDhcpv4InterfaceStateRequest().msg() + } + + if value == StatesRequestChoice.DHCPV4_LEASES { + obj.obj.Dhcpv4Leases = NewDhcpv4LeaseStateRequest().msg() + } + + if value == StatesRequestChoice.DHCPV6_INTERFACES { + obj.obj.Dhcpv6Interfaces = NewDhcpv6InterfaceStateRequest().msg() + } + + if value == StatesRequestChoice.DHCPV6_LEASES { + obj.obj.Dhcpv6Leases = NewDhcpv6LeaseStateRequest().msg() + } + + if value == StatesRequestChoice.OSPFV2_LSAS { + obj.obj.Ospfv2Lsas = NewOspfv2LsasStateRequest().msg() + } + + return obj +} + +// description is TBD +// Ipv4Neighbors returns a Neighborsv4StatesRequest +func (obj *statesRequest) Ipv4Neighbors() Neighborsv4StatesRequest { + if obj.obj.Ipv4Neighbors == nil { + obj.setChoice(StatesRequestChoice.IPV4_NEIGHBORS) + } + if obj.ipv4NeighborsHolder == nil { + obj.ipv4NeighborsHolder = &neighborsv4StatesRequest{obj: obj.obj.Ipv4Neighbors} + } + return obj.ipv4NeighborsHolder +} + +// description is TBD +// Ipv4Neighbors returns a Neighborsv4StatesRequest +func (obj *statesRequest) HasIpv4Neighbors() bool { + return obj.obj.Ipv4Neighbors != nil +} + +// description is TBD +// SetIpv4Neighbors sets the Neighborsv4StatesRequest value in the StatesRequest object +func (obj *statesRequest) SetIpv4Neighbors(value Neighborsv4StatesRequest) StatesRequest { + obj.setChoice(StatesRequestChoice.IPV4_NEIGHBORS) + obj.ipv4NeighborsHolder = nil + obj.obj.Ipv4Neighbors = value.msg() + + return obj +} + +// description is TBD +// Ipv6Neighbors returns a Neighborsv6StatesRequest +func (obj *statesRequest) Ipv6Neighbors() Neighborsv6StatesRequest { + if obj.obj.Ipv6Neighbors == nil { + obj.setChoice(StatesRequestChoice.IPV6_NEIGHBORS) + } + if obj.ipv6NeighborsHolder == nil { + obj.ipv6NeighborsHolder = &neighborsv6StatesRequest{obj: obj.obj.Ipv6Neighbors} + } + return obj.ipv6NeighborsHolder +} + +// description is TBD +// Ipv6Neighbors returns a Neighborsv6StatesRequest +func (obj *statesRequest) HasIpv6Neighbors() bool { + return obj.obj.Ipv6Neighbors != nil +} + +// description is TBD +// SetIpv6Neighbors sets the Neighborsv6StatesRequest value in the StatesRequest object +func (obj *statesRequest) SetIpv6Neighbors(value Neighborsv6StatesRequest) StatesRequest { + obj.setChoice(StatesRequestChoice.IPV6_NEIGHBORS) + obj.ipv6NeighborsHolder = nil + obj.obj.Ipv6Neighbors = value.msg() + + return obj +} + +// description is TBD +// BgpPrefixes returns a BgpPrefixStateRequest +func (obj *statesRequest) BgpPrefixes() BgpPrefixStateRequest { + if obj.obj.BgpPrefixes == nil { + obj.setChoice(StatesRequestChoice.BGP_PREFIXES) + } + if obj.bgpPrefixesHolder == nil { + obj.bgpPrefixesHolder = &bgpPrefixStateRequest{obj: obj.obj.BgpPrefixes} + } + return obj.bgpPrefixesHolder +} + +// description is TBD +// BgpPrefixes returns a BgpPrefixStateRequest +func (obj *statesRequest) HasBgpPrefixes() bool { + return obj.obj.BgpPrefixes != nil +} + +// description is TBD +// SetBgpPrefixes sets the BgpPrefixStateRequest value in the StatesRequest object +func (obj *statesRequest) SetBgpPrefixes(value BgpPrefixStateRequest) StatesRequest { + obj.setChoice(StatesRequestChoice.BGP_PREFIXES) + obj.bgpPrefixesHolder = nil + obj.obj.BgpPrefixes = value.msg() + + return obj +} + +// description is TBD +// IsisLsps returns a IsisLspsStateRequest +func (obj *statesRequest) IsisLsps() IsisLspsStateRequest { + if obj.obj.IsisLsps == nil { + obj.setChoice(StatesRequestChoice.ISIS_LSPS) + } + if obj.isisLspsHolder == nil { + obj.isisLspsHolder = &isisLspsStateRequest{obj: obj.obj.IsisLsps} + } + return obj.isisLspsHolder +} + +// description is TBD +// IsisLsps returns a IsisLspsStateRequest +func (obj *statesRequest) HasIsisLsps() bool { + return obj.obj.IsisLsps != nil +} + +// description is TBD +// SetIsisLsps sets the IsisLspsStateRequest value in the StatesRequest object +func (obj *statesRequest) SetIsisLsps(value IsisLspsStateRequest) StatesRequest { + obj.setChoice(StatesRequestChoice.ISIS_LSPS) + obj.isisLspsHolder = nil + obj.obj.IsisLsps = value.msg() + + return obj +} + +// description is TBD +// LldpNeighbors returns a LldpNeighborsStateRequest +func (obj *statesRequest) LldpNeighbors() LldpNeighborsStateRequest { + if obj.obj.LldpNeighbors == nil { + obj.setChoice(StatesRequestChoice.LLDP_NEIGHBORS) + } + if obj.lldpNeighborsHolder == nil { + obj.lldpNeighborsHolder = &lldpNeighborsStateRequest{obj: obj.obj.LldpNeighbors} + } + return obj.lldpNeighborsHolder +} + +// description is TBD +// LldpNeighbors returns a LldpNeighborsStateRequest +func (obj *statesRequest) HasLldpNeighbors() bool { + return obj.obj.LldpNeighbors != nil +} + +// description is TBD +// SetLldpNeighbors sets the LldpNeighborsStateRequest value in the StatesRequest object +func (obj *statesRequest) SetLldpNeighbors(value LldpNeighborsStateRequest) StatesRequest { + obj.setChoice(StatesRequestChoice.LLDP_NEIGHBORS) + obj.lldpNeighborsHolder = nil + obj.obj.LldpNeighbors = value.msg() + + return obj +} + +// description is TBD +// RsvpLsps returns a RsvpLspsStateRequest +func (obj *statesRequest) RsvpLsps() RsvpLspsStateRequest { + if obj.obj.RsvpLsps == nil { + obj.setChoice(StatesRequestChoice.RSVP_LSPS) + } + if obj.rsvpLspsHolder == nil { + obj.rsvpLspsHolder = &rsvpLspsStateRequest{obj: obj.obj.RsvpLsps} + } + return obj.rsvpLspsHolder +} + +// description is TBD +// RsvpLsps returns a RsvpLspsStateRequest +func (obj *statesRequest) HasRsvpLsps() bool { + return obj.obj.RsvpLsps != nil +} + +// description is TBD +// SetRsvpLsps sets the RsvpLspsStateRequest value in the StatesRequest object +func (obj *statesRequest) SetRsvpLsps(value RsvpLspsStateRequest) StatesRequest { + obj.setChoice(StatesRequestChoice.RSVP_LSPS) + obj.rsvpLspsHolder = nil + obj.obj.RsvpLsps = value.msg() + + return obj +} + +// description is TBD +// Dhcpv4Interfaces returns a Dhcpv4InterfaceStateRequest +func (obj *statesRequest) Dhcpv4Interfaces() Dhcpv4InterfaceStateRequest { + if obj.obj.Dhcpv4Interfaces == nil { + obj.setChoice(StatesRequestChoice.DHCPV4_INTERFACES) + } + if obj.dhcpv4InterfacesHolder == nil { + obj.dhcpv4InterfacesHolder = &dhcpv4InterfaceStateRequest{obj: obj.obj.Dhcpv4Interfaces} + } + return obj.dhcpv4InterfacesHolder +} + +// description is TBD +// Dhcpv4Interfaces returns a Dhcpv4InterfaceStateRequest +func (obj *statesRequest) HasDhcpv4Interfaces() bool { + return obj.obj.Dhcpv4Interfaces != nil +} + +// description is TBD +// SetDhcpv4Interfaces sets the Dhcpv4InterfaceStateRequest value in the StatesRequest object +func (obj *statesRequest) SetDhcpv4Interfaces(value Dhcpv4InterfaceStateRequest) StatesRequest { + obj.setChoice(StatesRequestChoice.DHCPV4_INTERFACES) + obj.dhcpv4InterfacesHolder = nil + obj.obj.Dhcpv4Interfaces = value.msg() + + return obj +} + +// description is TBD +// Dhcpv4Leases returns a Dhcpv4LeaseStateRequest +func (obj *statesRequest) Dhcpv4Leases() Dhcpv4LeaseStateRequest { + if obj.obj.Dhcpv4Leases == nil { + obj.setChoice(StatesRequestChoice.DHCPV4_LEASES) + } + if obj.dhcpv4LeasesHolder == nil { + obj.dhcpv4LeasesHolder = &dhcpv4LeaseStateRequest{obj: obj.obj.Dhcpv4Leases} + } + return obj.dhcpv4LeasesHolder +} + +// description is TBD +// Dhcpv4Leases returns a Dhcpv4LeaseStateRequest +func (obj *statesRequest) HasDhcpv4Leases() bool { + return obj.obj.Dhcpv4Leases != nil +} + +// description is TBD +// SetDhcpv4Leases sets the Dhcpv4LeaseStateRequest value in the StatesRequest object +func (obj *statesRequest) SetDhcpv4Leases(value Dhcpv4LeaseStateRequest) StatesRequest { + obj.setChoice(StatesRequestChoice.DHCPV4_LEASES) + obj.dhcpv4LeasesHolder = nil + obj.obj.Dhcpv4Leases = value.msg() + + return obj +} + +// description is TBD +// Dhcpv6Interfaces returns a Dhcpv6InterfaceStateRequest +func (obj *statesRequest) Dhcpv6Interfaces() Dhcpv6InterfaceStateRequest { + if obj.obj.Dhcpv6Interfaces == nil { + obj.setChoice(StatesRequestChoice.DHCPV6_INTERFACES) + } + if obj.dhcpv6InterfacesHolder == nil { + obj.dhcpv6InterfacesHolder = &dhcpv6InterfaceStateRequest{obj: obj.obj.Dhcpv6Interfaces} + } + return obj.dhcpv6InterfacesHolder +} + +// description is TBD +// Dhcpv6Interfaces returns a Dhcpv6InterfaceStateRequest +func (obj *statesRequest) HasDhcpv6Interfaces() bool { + return obj.obj.Dhcpv6Interfaces != nil +} + +// description is TBD +// SetDhcpv6Interfaces sets the Dhcpv6InterfaceStateRequest value in the StatesRequest object +func (obj *statesRequest) SetDhcpv6Interfaces(value Dhcpv6InterfaceStateRequest) StatesRequest { + obj.setChoice(StatesRequestChoice.DHCPV6_INTERFACES) + obj.dhcpv6InterfacesHolder = nil + obj.obj.Dhcpv6Interfaces = value.msg() + + return obj +} + +// description is TBD +// Dhcpv6Leases returns a Dhcpv6LeaseStateRequest +func (obj *statesRequest) Dhcpv6Leases() Dhcpv6LeaseStateRequest { + if obj.obj.Dhcpv6Leases == nil { + obj.setChoice(StatesRequestChoice.DHCPV6_LEASES) + } + if obj.dhcpv6LeasesHolder == nil { + obj.dhcpv6LeasesHolder = &dhcpv6LeaseStateRequest{obj: obj.obj.Dhcpv6Leases} + } + return obj.dhcpv6LeasesHolder +} + +// description is TBD +// Dhcpv6Leases returns a Dhcpv6LeaseStateRequest +func (obj *statesRequest) HasDhcpv6Leases() bool { + return obj.obj.Dhcpv6Leases != nil +} + +// description is TBD +// SetDhcpv6Leases sets the Dhcpv6LeaseStateRequest value in the StatesRequest object +func (obj *statesRequest) SetDhcpv6Leases(value Dhcpv6LeaseStateRequest) StatesRequest { + obj.setChoice(StatesRequestChoice.DHCPV6_LEASES) + obj.dhcpv6LeasesHolder = nil + obj.obj.Dhcpv6Leases = value.msg() + + return obj +} + +// description is TBD +// Ospfv2Lsas returns a Ospfv2LsasStateRequest +func (obj *statesRequest) Ospfv2Lsas() Ospfv2LsasStateRequest { + if obj.obj.Ospfv2Lsas == nil { + obj.setChoice(StatesRequestChoice.OSPFV2_LSAS) + } + if obj.ospfv2LsasHolder == nil { + obj.ospfv2LsasHolder = &ospfv2LsasStateRequest{obj: obj.obj.Ospfv2Lsas} + } + return obj.ospfv2LsasHolder +} + +// description is TBD +// Ospfv2Lsas returns a Ospfv2LsasStateRequest +func (obj *statesRequest) HasOspfv2Lsas() bool { + return obj.obj.Ospfv2Lsas != nil +} + +// description is TBD +// SetOspfv2Lsas sets the Ospfv2LsasStateRequest value in the StatesRequest object +func (obj *statesRequest) SetOspfv2Lsas(value Ospfv2LsasStateRequest) StatesRequest { + obj.setChoice(StatesRequestChoice.OSPFV2_LSAS) + obj.ospfv2LsasHolder = nil + obj.obj.Ospfv2Lsas = value.msg() + + return obj +} + +func (obj *statesRequest) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Ipv4Neighbors != nil { + + obj.Ipv4Neighbors().validateObj(vObj, set_default) + } + + if obj.obj.Ipv6Neighbors != nil { + + obj.Ipv6Neighbors().validateObj(vObj, set_default) + } + + if obj.obj.BgpPrefixes != nil { + + obj.BgpPrefixes().validateObj(vObj, set_default) + } + + if obj.obj.IsisLsps != nil { + + obj.IsisLsps().validateObj(vObj, set_default) + } + + if obj.obj.LldpNeighbors != nil { + + obj.LldpNeighbors().validateObj(vObj, set_default) + } + + if obj.obj.RsvpLsps != nil { + + obj.RsvpLsps().validateObj(vObj, set_default) + } + + if obj.obj.Dhcpv4Interfaces != nil { + + obj.Dhcpv4Interfaces().validateObj(vObj, set_default) + } + + if obj.obj.Dhcpv4Leases != nil { + + obj.Dhcpv4Leases().validateObj(vObj, set_default) + } + + if obj.obj.Dhcpv6Interfaces != nil { + + obj.Dhcpv6Interfaces().validateObj(vObj, set_default) + } + + if obj.obj.Dhcpv6Leases != nil { + + obj.Dhcpv6Leases().validateObj(vObj, set_default) + } + + if obj.obj.Ospfv2Lsas != nil { + + obj.Ospfv2Lsas().validateObj(vObj, set_default) + } + +} + +func (obj *statesRequest) setDefault() { + var choices_set int = 0 + var choice StatesRequestChoiceEnum + + if obj.obj.Ipv4Neighbors != nil { + choices_set += 1 + choice = StatesRequestChoice.IPV4_NEIGHBORS + } + + if obj.obj.Ipv6Neighbors != nil { + choices_set += 1 + choice = StatesRequestChoice.IPV6_NEIGHBORS + } + + if obj.obj.BgpPrefixes != nil { + choices_set += 1 + choice = StatesRequestChoice.BGP_PREFIXES + } + + if obj.obj.IsisLsps != nil { + choices_set += 1 + choice = StatesRequestChoice.ISIS_LSPS + } + + if obj.obj.LldpNeighbors != nil { + choices_set += 1 + choice = StatesRequestChoice.LLDP_NEIGHBORS + } + + if obj.obj.RsvpLsps != nil { + choices_set += 1 + choice = StatesRequestChoice.RSVP_LSPS + } + + if obj.obj.Dhcpv4Interfaces != nil { + choices_set += 1 + choice = StatesRequestChoice.DHCPV4_INTERFACES + } + + if obj.obj.Dhcpv4Leases != nil { + choices_set += 1 + choice = StatesRequestChoice.DHCPV4_LEASES + } + + if obj.obj.Dhcpv6Interfaces != nil { + choices_set += 1 + choice = StatesRequestChoice.DHCPV6_INTERFACES + } + + if obj.obj.Dhcpv6Leases != nil { + choices_set += 1 + choice = StatesRequestChoice.DHCPV6_LEASES + } + + if obj.obj.Ospfv2Lsas != nil { + choices_set += 1 + choice = StatesRequestChoice.OSPFV2_LSAS + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(StatesRequestChoice.IPV4_NEIGHBORS) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in StatesRequest") + } + } else { + intVal := otg.StatesRequest_Choice_Enum_value[string(choice)] + enumValue := otg.StatesRequest_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/states_response.go b/gosnappi/states_response.go new file mode 100644 index 00000000..e38d5368 --- /dev/null +++ b/gosnappi/states_response.go @@ -0,0 +1,1638 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** StatesResponse ***** +type statesResponse struct { + validation + obj *otg.StatesResponse + marshaller marshalStatesResponse + unMarshaller unMarshalStatesResponse + ipv4NeighborsHolder StatesResponseNeighborsv4StateIter + ipv6NeighborsHolder StatesResponseNeighborsv6StateIter + bgpPrefixesHolder StatesResponseBgpPrefixesStateIter + isisLspsHolder StatesResponseIsisLspsStateIter + lldpNeighborsHolder StatesResponseLldpNeighborsStateIter + rsvpLspsHolder StatesResponseRsvpLspsStateIter + dhcpv4InterfacesHolder StatesResponseDhcpv4InterfaceStateIter + dhcpv4LeasesHolder StatesResponseDhcpv4LeasesStateIter + dhcpv6InterfacesHolder StatesResponseDhcpv6InterfaceStateIter + dhcpv6LeasesHolder StatesResponseDhcpv6LeasesStateIter + ospfv2LsasHolder StatesResponseOspfv2LsaStateIter +} + +func NewStatesResponse() StatesResponse { + obj := statesResponse{obj: &otg.StatesResponse{}} + obj.setDefault() + return &obj +} + +func (obj *statesResponse) msg() *otg.StatesResponse { + return obj.obj +} + +func (obj *statesResponse) setMsg(msg *otg.StatesResponse) StatesResponse { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalstatesResponse struct { + obj *statesResponse +} + +type marshalStatesResponse interface { + // ToProto marshals StatesResponse to protobuf object *otg.StatesResponse + ToProto() (*otg.StatesResponse, error) + // ToPbText marshals StatesResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals StatesResponse to YAML text + ToYaml() (string, error) + // ToJson marshals StatesResponse to JSON text + ToJson() (string, error) +} + +type unMarshalstatesResponse struct { + obj *statesResponse +} + +type unMarshalStatesResponse interface { + // FromProto unmarshals StatesResponse from protobuf object *otg.StatesResponse + FromProto(msg *otg.StatesResponse) (StatesResponse, error) + // FromPbText unmarshals StatesResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals StatesResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals StatesResponse from JSON text + FromJson(value string) error +} + +func (obj *statesResponse) Marshal() marshalStatesResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalstatesResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *statesResponse) Unmarshal() unMarshalStatesResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalstatesResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalstatesResponse) ToProto() (*otg.StatesResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalstatesResponse) FromProto(msg *otg.StatesResponse) (StatesResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalstatesResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalstatesResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalstatesResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstatesResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalstatesResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalstatesResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *statesResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *statesResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *statesResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *statesResponse) Clone() (StatesResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewStatesResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *statesResponse) setNil() { + obj.ipv4NeighborsHolder = nil + obj.ipv6NeighborsHolder = nil + obj.bgpPrefixesHolder = nil + obj.isisLspsHolder = nil + obj.lldpNeighborsHolder = nil + obj.rsvpLspsHolder = nil + obj.dhcpv4InterfacesHolder = nil + obj.dhcpv4LeasesHolder = nil + obj.dhcpv6InterfacesHolder = nil + obj.dhcpv6LeasesHolder = nil + obj.ospfv2LsasHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// StatesResponse is response containing chosen traffic generator states +type StatesResponse interface { + Validation + // msg marshals StatesResponse to protobuf object *otg.StatesResponse + // and doesn't set defaults + msg() *otg.StatesResponse + // setMsg unmarshals StatesResponse from protobuf object *otg.StatesResponse + // and doesn't set defaults + setMsg(*otg.StatesResponse) StatesResponse + // provides marshal interface + Marshal() marshalStatesResponse + // provides unmarshal interface + Unmarshal() unMarshalStatesResponse + // validate validates StatesResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (StatesResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns StatesResponseChoiceEnum, set in StatesResponse + Choice() StatesResponseChoiceEnum + // setChoice assigns StatesResponseChoiceEnum provided by user to StatesResponse + setChoice(value StatesResponseChoiceEnum) StatesResponse + // HasChoice checks if Choice has been set in StatesResponse + HasChoice() bool + // Ipv4Neighbors returns StatesResponseNeighborsv4StateIterIter, set in StatesResponse + Ipv4Neighbors() StatesResponseNeighborsv4StateIter + // Ipv6Neighbors returns StatesResponseNeighborsv6StateIterIter, set in StatesResponse + Ipv6Neighbors() StatesResponseNeighborsv6StateIter + // BgpPrefixes returns StatesResponseBgpPrefixesStateIterIter, set in StatesResponse + BgpPrefixes() StatesResponseBgpPrefixesStateIter + // IsisLsps returns StatesResponseIsisLspsStateIterIter, set in StatesResponse + IsisLsps() StatesResponseIsisLspsStateIter + // LldpNeighbors returns StatesResponseLldpNeighborsStateIterIter, set in StatesResponse + LldpNeighbors() StatesResponseLldpNeighborsStateIter + // RsvpLsps returns StatesResponseRsvpLspsStateIterIter, set in StatesResponse + RsvpLsps() StatesResponseRsvpLspsStateIter + // Dhcpv4Interfaces returns StatesResponseDhcpv4InterfaceStateIterIter, set in StatesResponse + Dhcpv4Interfaces() StatesResponseDhcpv4InterfaceStateIter + // Dhcpv4Leases returns StatesResponseDhcpv4LeasesStateIterIter, set in StatesResponse + Dhcpv4Leases() StatesResponseDhcpv4LeasesStateIter + // Dhcpv6Interfaces returns StatesResponseDhcpv6InterfaceStateIterIter, set in StatesResponse + Dhcpv6Interfaces() StatesResponseDhcpv6InterfaceStateIter + // Dhcpv6Leases returns StatesResponseDhcpv6LeasesStateIterIter, set in StatesResponse + Dhcpv6Leases() StatesResponseDhcpv6LeasesStateIter + // Ospfv2Lsas returns StatesResponseOspfv2LsaStateIterIter, set in StatesResponse + Ospfv2Lsas() StatesResponseOspfv2LsaStateIter + setNil() +} + +type StatesResponseChoiceEnum string + +// Enum of Choice on StatesResponse +var StatesResponseChoice = struct { + IPV4_NEIGHBORS StatesResponseChoiceEnum + IPV6_NEIGHBORS StatesResponseChoiceEnum + BGP_PREFIXES StatesResponseChoiceEnum + ISIS_LSPS StatesResponseChoiceEnum + LLDP_NEIGHBORS StatesResponseChoiceEnum + RSVP_LSPS StatesResponseChoiceEnum + DHCPV4_INTERFACES StatesResponseChoiceEnum + DHCPV4_LEASES StatesResponseChoiceEnum + DHCPV6_INTERFACES StatesResponseChoiceEnum + DHCPV6_LEASES StatesResponseChoiceEnum + OSPFV2_LSAS StatesResponseChoiceEnum +}{ + IPV4_NEIGHBORS: StatesResponseChoiceEnum("ipv4_neighbors"), + IPV6_NEIGHBORS: StatesResponseChoiceEnum("ipv6_neighbors"), + BGP_PREFIXES: StatesResponseChoiceEnum("bgp_prefixes"), + ISIS_LSPS: StatesResponseChoiceEnum("isis_lsps"), + LLDP_NEIGHBORS: StatesResponseChoiceEnum("lldp_neighbors"), + RSVP_LSPS: StatesResponseChoiceEnum("rsvp_lsps"), + DHCPV4_INTERFACES: StatesResponseChoiceEnum("dhcpv4_interfaces"), + DHCPV4_LEASES: StatesResponseChoiceEnum("dhcpv4_leases"), + DHCPV6_INTERFACES: StatesResponseChoiceEnum("dhcpv6_interfaces"), + DHCPV6_LEASES: StatesResponseChoiceEnum("dhcpv6_leases"), + OSPFV2_LSAS: StatesResponseChoiceEnum("ospfv2_lsas"), +} + +func (obj *statesResponse) Choice() StatesResponseChoiceEnum { + return StatesResponseChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// description is TBD +// Choice returns a string +func (obj *statesResponse) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *statesResponse) setChoice(value StatesResponseChoiceEnum) StatesResponse { + intValue, ok := otg.StatesResponse_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on StatesResponseChoiceEnum", string(value))) + return obj + } + enumValue := otg.StatesResponse_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Ospfv2Lsas = nil + obj.ospfv2LsasHolder = nil + obj.obj.Dhcpv6Leases = nil + obj.dhcpv6LeasesHolder = nil + obj.obj.Dhcpv6Interfaces = nil + obj.dhcpv6InterfacesHolder = nil + obj.obj.Dhcpv4Leases = nil + obj.dhcpv4LeasesHolder = nil + obj.obj.Dhcpv4Interfaces = nil + obj.dhcpv4InterfacesHolder = nil + obj.obj.RsvpLsps = nil + obj.rsvpLspsHolder = nil + obj.obj.LldpNeighbors = nil + obj.lldpNeighborsHolder = nil + obj.obj.IsisLsps = nil + obj.isisLspsHolder = nil + obj.obj.BgpPrefixes = nil + obj.bgpPrefixesHolder = nil + obj.obj.Ipv6Neighbors = nil + obj.ipv6NeighborsHolder = nil + obj.obj.Ipv4Neighbors = nil + obj.ipv4NeighborsHolder = nil + + if value == StatesResponseChoice.IPV4_NEIGHBORS { + obj.obj.Ipv4Neighbors = []*otg.Neighborsv4State{} + } + + if value == StatesResponseChoice.IPV6_NEIGHBORS { + obj.obj.Ipv6Neighbors = []*otg.Neighborsv6State{} + } + + if value == StatesResponseChoice.BGP_PREFIXES { + obj.obj.BgpPrefixes = []*otg.BgpPrefixesState{} + } + + if value == StatesResponseChoice.ISIS_LSPS { + obj.obj.IsisLsps = []*otg.IsisLspsState{} + } + + if value == StatesResponseChoice.LLDP_NEIGHBORS { + obj.obj.LldpNeighbors = []*otg.LldpNeighborsState{} + } + + if value == StatesResponseChoice.RSVP_LSPS { + obj.obj.RsvpLsps = []*otg.RsvpLspsState{} + } + + if value == StatesResponseChoice.DHCPV4_INTERFACES { + obj.obj.Dhcpv4Interfaces = []*otg.Dhcpv4InterfaceState{} + } + + if value == StatesResponseChoice.DHCPV4_LEASES { + obj.obj.Dhcpv4Leases = []*otg.Dhcpv4LeasesState{} + } + + if value == StatesResponseChoice.DHCPV6_INTERFACES { + obj.obj.Dhcpv6Interfaces = []*otg.Dhcpv6InterfaceState{} + } + + if value == StatesResponseChoice.DHCPV6_LEASES { + obj.obj.Dhcpv6Leases = []*otg.Dhcpv6LeasesState{} + } + + if value == StatesResponseChoice.OSPFV2_LSAS { + obj.obj.Ospfv2Lsas = []*otg.Ospfv2LsaState{} + } + + return obj +} + +// description is TBD +// Ipv4Neighbors returns a []Neighborsv4State +func (obj *statesResponse) Ipv4Neighbors() StatesResponseNeighborsv4StateIter { + if len(obj.obj.Ipv4Neighbors) == 0 { + obj.setChoice(StatesResponseChoice.IPV4_NEIGHBORS) + } + if obj.ipv4NeighborsHolder == nil { + obj.ipv4NeighborsHolder = newStatesResponseNeighborsv4StateIter(&obj.obj.Ipv4Neighbors).setMsg(obj) + } + return obj.ipv4NeighborsHolder +} + +type statesResponseNeighborsv4StateIter struct { + obj *statesResponse + neighborsv4StateSlice []Neighborsv4State + fieldPtr *[]*otg.Neighborsv4State +} + +func newStatesResponseNeighborsv4StateIter(ptr *[]*otg.Neighborsv4State) StatesResponseNeighborsv4StateIter { + return &statesResponseNeighborsv4StateIter{fieldPtr: ptr} +} + +type StatesResponseNeighborsv4StateIter interface { + setMsg(*statesResponse) StatesResponseNeighborsv4StateIter + Items() []Neighborsv4State + Add() Neighborsv4State + Append(items ...Neighborsv4State) StatesResponseNeighborsv4StateIter + Set(index int, newObj Neighborsv4State) StatesResponseNeighborsv4StateIter + Clear() StatesResponseNeighborsv4StateIter + clearHolderSlice() StatesResponseNeighborsv4StateIter + appendHolderSlice(item Neighborsv4State) StatesResponseNeighborsv4StateIter +} + +func (obj *statesResponseNeighborsv4StateIter) setMsg(msg *statesResponse) StatesResponseNeighborsv4StateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&neighborsv4State{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *statesResponseNeighborsv4StateIter) Items() []Neighborsv4State { + return obj.neighborsv4StateSlice +} + +func (obj *statesResponseNeighborsv4StateIter) Add() Neighborsv4State { + newObj := &otg.Neighborsv4State{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &neighborsv4State{obj: newObj} + newLibObj.setDefault() + obj.neighborsv4StateSlice = append(obj.neighborsv4StateSlice, newLibObj) + return newLibObj +} + +func (obj *statesResponseNeighborsv4StateIter) Append(items ...Neighborsv4State) StatesResponseNeighborsv4StateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.neighborsv4StateSlice = append(obj.neighborsv4StateSlice, item) + } + return obj +} + +func (obj *statesResponseNeighborsv4StateIter) Set(index int, newObj Neighborsv4State) StatesResponseNeighborsv4StateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.neighborsv4StateSlice[index] = newObj + return obj +} +func (obj *statesResponseNeighborsv4StateIter) Clear() StatesResponseNeighborsv4StateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Neighborsv4State{} + obj.neighborsv4StateSlice = []Neighborsv4State{} + } + return obj +} +func (obj *statesResponseNeighborsv4StateIter) clearHolderSlice() StatesResponseNeighborsv4StateIter { + if len(obj.neighborsv4StateSlice) > 0 { + obj.neighborsv4StateSlice = []Neighborsv4State{} + } + return obj +} +func (obj *statesResponseNeighborsv4StateIter) appendHolderSlice(item Neighborsv4State) StatesResponseNeighborsv4StateIter { + obj.neighborsv4StateSlice = append(obj.neighborsv4StateSlice, item) + return obj +} + +// description is TBD +// Ipv6Neighbors returns a []Neighborsv6State +func (obj *statesResponse) Ipv6Neighbors() StatesResponseNeighborsv6StateIter { + if len(obj.obj.Ipv6Neighbors) == 0 { + obj.setChoice(StatesResponseChoice.IPV6_NEIGHBORS) + } + if obj.ipv6NeighborsHolder == nil { + obj.ipv6NeighborsHolder = newStatesResponseNeighborsv6StateIter(&obj.obj.Ipv6Neighbors).setMsg(obj) + } + return obj.ipv6NeighborsHolder +} + +type statesResponseNeighborsv6StateIter struct { + obj *statesResponse + neighborsv6StateSlice []Neighborsv6State + fieldPtr *[]*otg.Neighborsv6State +} + +func newStatesResponseNeighborsv6StateIter(ptr *[]*otg.Neighborsv6State) StatesResponseNeighborsv6StateIter { + return &statesResponseNeighborsv6StateIter{fieldPtr: ptr} +} + +type StatesResponseNeighborsv6StateIter interface { + setMsg(*statesResponse) StatesResponseNeighborsv6StateIter + Items() []Neighborsv6State + Add() Neighborsv6State + Append(items ...Neighborsv6State) StatesResponseNeighborsv6StateIter + Set(index int, newObj Neighborsv6State) StatesResponseNeighborsv6StateIter + Clear() StatesResponseNeighborsv6StateIter + clearHolderSlice() StatesResponseNeighborsv6StateIter + appendHolderSlice(item Neighborsv6State) StatesResponseNeighborsv6StateIter +} + +func (obj *statesResponseNeighborsv6StateIter) setMsg(msg *statesResponse) StatesResponseNeighborsv6StateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&neighborsv6State{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *statesResponseNeighborsv6StateIter) Items() []Neighborsv6State { + return obj.neighborsv6StateSlice +} + +func (obj *statesResponseNeighborsv6StateIter) Add() Neighborsv6State { + newObj := &otg.Neighborsv6State{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &neighborsv6State{obj: newObj} + newLibObj.setDefault() + obj.neighborsv6StateSlice = append(obj.neighborsv6StateSlice, newLibObj) + return newLibObj +} + +func (obj *statesResponseNeighborsv6StateIter) Append(items ...Neighborsv6State) StatesResponseNeighborsv6StateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.neighborsv6StateSlice = append(obj.neighborsv6StateSlice, item) + } + return obj +} + +func (obj *statesResponseNeighborsv6StateIter) Set(index int, newObj Neighborsv6State) StatesResponseNeighborsv6StateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.neighborsv6StateSlice[index] = newObj + return obj +} +func (obj *statesResponseNeighborsv6StateIter) Clear() StatesResponseNeighborsv6StateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Neighborsv6State{} + obj.neighborsv6StateSlice = []Neighborsv6State{} + } + return obj +} +func (obj *statesResponseNeighborsv6StateIter) clearHolderSlice() StatesResponseNeighborsv6StateIter { + if len(obj.neighborsv6StateSlice) > 0 { + obj.neighborsv6StateSlice = []Neighborsv6State{} + } + return obj +} +func (obj *statesResponseNeighborsv6StateIter) appendHolderSlice(item Neighborsv6State) StatesResponseNeighborsv6StateIter { + obj.neighborsv6StateSlice = append(obj.neighborsv6StateSlice, item) + return obj +} + +// description is TBD +// BgpPrefixes returns a []BgpPrefixesState +func (obj *statesResponse) BgpPrefixes() StatesResponseBgpPrefixesStateIter { + if len(obj.obj.BgpPrefixes) == 0 { + obj.setChoice(StatesResponseChoice.BGP_PREFIXES) + } + if obj.bgpPrefixesHolder == nil { + obj.bgpPrefixesHolder = newStatesResponseBgpPrefixesStateIter(&obj.obj.BgpPrefixes).setMsg(obj) + } + return obj.bgpPrefixesHolder +} + +type statesResponseBgpPrefixesStateIter struct { + obj *statesResponse + bgpPrefixesStateSlice []BgpPrefixesState + fieldPtr *[]*otg.BgpPrefixesState +} + +func newStatesResponseBgpPrefixesStateIter(ptr *[]*otg.BgpPrefixesState) StatesResponseBgpPrefixesStateIter { + return &statesResponseBgpPrefixesStateIter{fieldPtr: ptr} +} + +type StatesResponseBgpPrefixesStateIter interface { + setMsg(*statesResponse) StatesResponseBgpPrefixesStateIter + Items() []BgpPrefixesState + Add() BgpPrefixesState + Append(items ...BgpPrefixesState) StatesResponseBgpPrefixesStateIter + Set(index int, newObj BgpPrefixesState) StatesResponseBgpPrefixesStateIter + Clear() StatesResponseBgpPrefixesStateIter + clearHolderSlice() StatesResponseBgpPrefixesStateIter + appendHolderSlice(item BgpPrefixesState) StatesResponseBgpPrefixesStateIter +} + +func (obj *statesResponseBgpPrefixesStateIter) setMsg(msg *statesResponse) StatesResponseBgpPrefixesStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&bgpPrefixesState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *statesResponseBgpPrefixesStateIter) Items() []BgpPrefixesState { + return obj.bgpPrefixesStateSlice +} + +func (obj *statesResponseBgpPrefixesStateIter) Add() BgpPrefixesState { + newObj := &otg.BgpPrefixesState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &bgpPrefixesState{obj: newObj} + newLibObj.setDefault() + obj.bgpPrefixesStateSlice = append(obj.bgpPrefixesStateSlice, newLibObj) + return newLibObj +} + +func (obj *statesResponseBgpPrefixesStateIter) Append(items ...BgpPrefixesState) StatesResponseBgpPrefixesStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.bgpPrefixesStateSlice = append(obj.bgpPrefixesStateSlice, item) + } + return obj +} + +func (obj *statesResponseBgpPrefixesStateIter) Set(index int, newObj BgpPrefixesState) StatesResponseBgpPrefixesStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.bgpPrefixesStateSlice[index] = newObj + return obj +} +func (obj *statesResponseBgpPrefixesStateIter) Clear() StatesResponseBgpPrefixesStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.BgpPrefixesState{} + obj.bgpPrefixesStateSlice = []BgpPrefixesState{} + } + return obj +} +func (obj *statesResponseBgpPrefixesStateIter) clearHolderSlice() StatesResponseBgpPrefixesStateIter { + if len(obj.bgpPrefixesStateSlice) > 0 { + obj.bgpPrefixesStateSlice = []BgpPrefixesState{} + } + return obj +} +func (obj *statesResponseBgpPrefixesStateIter) appendHolderSlice(item BgpPrefixesState) StatesResponseBgpPrefixesStateIter { + obj.bgpPrefixesStateSlice = append(obj.bgpPrefixesStateSlice, item) + return obj +} + +// description is TBD +// IsisLsps returns a []IsisLspsState +func (obj *statesResponse) IsisLsps() StatesResponseIsisLspsStateIter { + if len(obj.obj.IsisLsps) == 0 { + obj.setChoice(StatesResponseChoice.ISIS_LSPS) + } + if obj.isisLspsHolder == nil { + obj.isisLspsHolder = newStatesResponseIsisLspsStateIter(&obj.obj.IsisLsps).setMsg(obj) + } + return obj.isisLspsHolder +} + +type statesResponseIsisLspsStateIter struct { + obj *statesResponse + isisLspsStateSlice []IsisLspsState + fieldPtr *[]*otg.IsisLspsState +} + +func newStatesResponseIsisLspsStateIter(ptr *[]*otg.IsisLspsState) StatesResponseIsisLspsStateIter { + return &statesResponseIsisLspsStateIter{fieldPtr: ptr} +} + +type StatesResponseIsisLspsStateIter interface { + setMsg(*statesResponse) StatesResponseIsisLspsStateIter + Items() []IsisLspsState + Add() IsisLspsState + Append(items ...IsisLspsState) StatesResponseIsisLspsStateIter + Set(index int, newObj IsisLspsState) StatesResponseIsisLspsStateIter + Clear() StatesResponseIsisLspsStateIter + clearHolderSlice() StatesResponseIsisLspsStateIter + appendHolderSlice(item IsisLspsState) StatesResponseIsisLspsStateIter +} + +func (obj *statesResponseIsisLspsStateIter) setMsg(msg *statesResponse) StatesResponseIsisLspsStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&isisLspsState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *statesResponseIsisLspsStateIter) Items() []IsisLspsState { + return obj.isisLspsStateSlice +} + +func (obj *statesResponseIsisLspsStateIter) Add() IsisLspsState { + newObj := &otg.IsisLspsState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &isisLspsState{obj: newObj} + newLibObj.setDefault() + obj.isisLspsStateSlice = append(obj.isisLspsStateSlice, newLibObj) + return newLibObj +} + +func (obj *statesResponseIsisLspsStateIter) Append(items ...IsisLspsState) StatesResponseIsisLspsStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.isisLspsStateSlice = append(obj.isisLspsStateSlice, item) + } + return obj +} + +func (obj *statesResponseIsisLspsStateIter) Set(index int, newObj IsisLspsState) StatesResponseIsisLspsStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.isisLspsStateSlice[index] = newObj + return obj +} +func (obj *statesResponseIsisLspsStateIter) Clear() StatesResponseIsisLspsStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.IsisLspsState{} + obj.isisLspsStateSlice = []IsisLspsState{} + } + return obj +} +func (obj *statesResponseIsisLspsStateIter) clearHolderSlice() StatesResponseIsisLspsStateIter { + if len(obj.isisLspsStateSlice) > 0 { + obj.isisLspsStateSlice = []IsisLspsState{} + } + return obj +} +func (obj *statesResponseIsisLspsStateIter) appendHolderSlice(item IsisLspsState) StatesResponseIsisLspsStateIter { + obj.isisLspsStateSlice = append(obj.isisLspsStateSlice, item) + return obj +} + +// description is TBD +// LldpNeighbors returns a []LldpNeighborsState +func (obj *statesResponse) LldpNeighbors() StatesResponseLldpNeighborsStateIter { + if len(obj.obj.LldpNeighbors) == 0 { + obj.setChoice(StatesResponseChoice.LLDP_NEIGHBORS) + } + if obj.lldpNeighborsHolder == nil { + obj.lldpNeighborsHolder = newStatesResponseLldpNeighborsStateIter(&obj.obj.LldpNeighbors).setMsg(obj) + } + return obj.lldpNeighborsHolder +} + +type statesResponseLldpNeighborsStateIter struct { + obj *statesResponse + lldpNeighborsStateSlice []LldpNeighborsState + fieldPtr *[]*otg.LldpNeighborsState +} + +func newStatesResponseLldpNeighborsStateIter(ptr *[]*otg.LldpNeighborsState) StatesResponseLldpNeighborsStateIter { + return &statesResponseLldpNeighborsStateIter{fieldPtr: ptr} +} + +type StatesResponseLldpNeighborsStateIter interface { + setMsg(*statesResponse) StatesResponseLldpNeighborsStateIter + Items() []LldpNeighborsState + Add() LldpNeighborsState + Append(items ...LldpNeighborsState) StatesResponseLldpNeighborsStateIter + Set(index int, newObj LldpNeighborsState) StatesResponseLldpNeighborsStateIter + Clear() StatesResponseLldpNeighborsStateIter + clearHolderSlice() StatesResponseLldpNeighborsStateIter + appendHolderSlice(item LldpNeighborsState) StatesResponseLldpNeighborsStateIter +} + +func (obj *statesResponseLldpNeighborsStateIter) setMsg(msg *statesResponse) StatesResponseLldpNeighborsStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&lldpNeighborsState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *statesResponseLldpNeighborsStateIter) Items() []LldpNeighborsState { + return obj.lldpNeighborsStateSlice +} + +func (obj *statesResponseLldpNeighborsStateIter) Add() LldpNeighborsState { + newObj := &otg.LldpNeighborsState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &lldpNeighborsState{obj: newObj} + newLibObj.setDefault() + obj.lldpNeighborsStateSlice = append(obj.lldpNeighborsStateSlice, newLibObj) + return newLibObj +} + +func (obj *statesResponseLldpNeighborsStateIter) Append(items ...LldpNeighborsState) StatesResponseLldpNeighborsStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.lldpNeighborsStateSlice = append(obj.lldpNeighborsStateSlice, item) + } + return obj +} + +func (obj *statesResponseLldpNeighborsStateIter) Set(index int, newObj LldpNeighborsState) StatesResponseLldpNeighborsStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.lldpNeighborsStateSlice[index] = newObj + return obj +} +func (obj *statesResponseLldpNeighborsStateIter) Clear() StatesResponseLldpNeighborsStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.LldpNeighborsState{} + obj.lldpNeighborsStateSlice = []LldpNeighborsState{} + } + return obj +} +func (obj *statesResponseLldpNeighborsStateIter) clearHolderSlice() StatesResponseLldpNeighborsStateIter { + if len(obj.lldpNeighborsStateSlice) > 0 { + obj.lldpNeighborsStateSlice = []LldpNeighborsState{} + } + return obj +} +func (obj *statesResponseLldpNeighborsStateIter) appendHolderSlice(item LldpNeighborsState) StatesResponseLldpNeighborsStateIter { + obj.lldpNeighborsStateSlice = append(obj.lldpNeighborsStateSlice, item) + return obj +} + +// description is TBD +// RsvpLsps returns a []RsvpLspsState +func (obj *statesResponse) RsvpLsps() StatesResponseRsvpLspsStateIter { + if len(obj.obj.RsvpLsps) == 0 { + obj.setChoice(StatesResponseChoice.RSVP_LSPS) + } + if obj.rsvpLspsHolder == nil { + obj.rsvpLspsHolder = newStatesResponseRsvpLspsStateIter(&obj.obj.RsvpLsps).setMsg(obj) + } + return obj.rsvpLspsHolder +} + +type statesResponseRsvpLspsStateIter struct { + obj *statesResponse + rsvpLspsStateSlice []RsvpLspsState + fieldPtr *[]*otg.RsvpLspsState +} + +func newStatesResponseRsvpLspsStateIter(ptr *[]*otg.RsvpLspsState) StatesResponseRsvpLspsStateIter { + return &statesResponseRsvpLspsStateIter{fieldPtr: ptr} +} + +type StatesResponseRsvpLspsStateIter interface { + setMsg(*statesResponse) StatesResponseRsvpLspsStateIter + Items() []RsvpLspsState + Add() RsvpLspsState + Append(items ...RsvpLspsState) StatesResponseRsvpLspsStateIter + Set(index int, newObj RsvpLspsState) StatesResponseRsvpLspsStateIter + Clear() StatesResponseRsvpLspsStateIter + clearHolderSlice() StatesResponseRsvpLspsStateIter + appendHolderSlice(item RsvpLspsState) StatesResponseRsvpLspsStateIter +} + +func (obj *statesResponseRsvpLspsStateIter) setMsg(msg *statesResponse) StatesResponseRsvpLspsStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&rsvpLspsState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *statesResponseRsvpLspsStateIter) Items() []RsvpLspsState { + return obj.rsvpLspsStateSlice +} + +func (obj *statesResponseRsvpLspsStateIter) Add() RsvpLspsState { + newObj := &otg.RsvpLspsState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &rsvpLspsState{obj: newObj} + newLibObj.setDefault() + obj.rsvpLspsStateSlice = append(obj.rsvpLspsStateSlice, newLibObj) + return newLibObj +} + +func (obj *statesResponseRsvpLspsStateIter) Append(items ...RsvpLspsState) StatesResponseRsvpLspsStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.rsvpLspsStateSlice = append(obj.rsvpLspsStateSlice, item) + } + return obj +} + +func (obj *statesResponseRsvpLspsStateIter) Set(index int, newObj RsvpLspsState) StatesResponseRsvpLspsStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.rsvpLspsStateSlice[index] = newObj + return obj +} +func (obj *statesResponseRsvpLspsStateIter) Clear() StatesResponseRsvpLspsStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.RsvpLspsState{} + obj.rsvpLspsStateSlice = []RsvpLspsState{} + } + return obj +} +func (obj *statesResponseRsvpLspsStateIter) clearHolderSlice() StatesResponseRsvpLspsStateIter { + if len(obj.rsvpLspsStateSlice) > 0 { + obj.rsvpLspsStateSlice = []RsvpLspsState{} + } + return obj +} +func (obj *statesResponseRsvpLspsStateIter) appendHolderSlice(item RsvpLspsState) StatesResponseRsvpLspsStateIter { + obj.rsvpLspsStateSlice = append(obj.rsvpLspsStateSlice, item) + return obj +} + +// description is TBD +// Dhcpv4Interfaces returns a []Dhcpv4InterfaceState +func (obj *statesResponse) Dhcpv4Interfaces() StatesResponseDhcpv4InterfaceStateIter { + if len(obj.obj.Dhcpv4Interfaces) == 0 { + obj.setChoice(StatesResponseChoice.DHCPV4_INTERFACES) + } + if obj.dhcpv4InterfacesHolder == nil { + obj.dhcpv4InterfacesHolder = newStatesResponseDhcpv4InterfaceStateIter(&obj.obj.Dhcpv4Interfaces).setMsg(obj) + } + return obj.dhcpv4InterfacesHolder +} + +type statesResponseDhcpv4InterfaceStateIter struct { + obj *statesResponse + dhcpv4InterfaceStateSlice []Dhcpv4InterfaceState + fieldPtr *[]*otg.Dhcpv4InterfaceState +} + +func newStatesResponseDhcpv4InterfaceStateIter(ptr *[]*otg.Dhcpv4InterfaceState) StatesResponseDhcpv4InterfaceStateIter { + return &statesResponseDhcpv4InterfaceStateIter{fieldPtr: ptr} +} + +type StatesResponseDhcpv4InterfaceStateIter interface { + setMsg(*statesResponse) StatesResponseDhcpv4InterfaceStateIter + Items() []Dhcpv4InterfaceState + Add() Dhcpv4InterfaceState + Append(items ...Dhcpv4InterfaceState) StatesResponseDhcpv4InterfaceStateIter + Set(index int, newObj Dhcpv4InterfaceState) StatesResponseDhcpv4InterfaceStateIter + Clear() StatesResponseDhcpv4InterfaceStateIter + clearHolderSlice() StatesResponseDhcpv4InterfaceStateIter + appendHolderSlice(item Dhcpv4InterfaceState) StatesResponseDhcpv4InterfaceStateIter +} + +func (obj *statesResponseDhcpv4InterfaceStateIter) setMsg(msg *statesResponse) StatesResponseDhcpv4InterfaceStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv4InterfaceState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *statesResponseDhcpv4InterfaceStateIter) Items() []Dhcpv4InterfaceState { + return obj.dhcpv4InterfaceStateSlice +} + +func (obj *statesResponseDhcpv4InterfaceStateIter) Add() Dhcpv4InterfaceState { + newObj := &otg.Dhcpv4InterfaceState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv4InterfaceState{obj: newObj} + newLibObj.setDefault() + obj.dhcpv4InterfaceStateSlice = append(obj.dhcpv4InterfaceStateSlice, newLibObj) + return newLibObj +} + +func (obj *statesResponseDhcpv4InterfaceStateIter) Append(items ...Dhcpv4InterfaceState) StatesResponseDhcpv4InterfaceStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv4InterfaceStateSlice = append(obj.dhcpv4InterfaceStateSlice, item) + } + return obj +} + +func (obj *statesResponseDhcpv4InterfaceStateIter) Set(index int, newObj Dhcpv4InterfaceState) StatesResponseDhcpv4InterfaceStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv4InterfaceStateSlice[index] = newObj + return obj +} +func (obj *statesResponseDhcpv4InterfaceStateIter) Clear() StatesResponseDhcpv4InterfaceStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv4InterfaceState{} + obj.dhcpv4InterfaceStateSlice = []Dhcpv4InterfaceState{} + } + return obj +} +func (obj *statesResponseDhcpv4InterfaceStateIter) clearHolderSlice() StatesResponseDhcpv4InterfaceStateIter { + if len(obj.dhcpv4InterfaceStateSlice) > 0 { + obj.dhcpv4InterfaceStateSlice = []Dhcpv4InterfaceState{} + } + return obj +} +func (obj *statesResponseDhcpv4InterfaceStateIter) appendHolderSlice(item Dhcpv4InterfaceState) StatesResponseDhcpv4InterfaceStateIter { + obj.dhcpv4InterfaceStateSlice = append(obj.dhcpv4InterfaceStateSlice, item) + return obj +} + +// description is TBD +// Dhcpv4Leases returns a []Dhcpv4LeasesState +func (obj *statesResponse) Dhcpv4Leases() StatesResponseDhcpv4LeasesStateIter { + if len(obj.obj.Dhcpv4Leases) == 0 { + obj.setChoice(StatesResponseChoice.DHCPV4_LEASES) + } + if obj.dhcpv4LeasesHolder == nil { + obj.dhcpv4LeasesHolder = newStatesResponseDhcpv4LeasesStateIter(&obj.obj.Dhcpv4Leases).setMsg(obj) + } + return obj.dhcpv4LeasesHolder +} + +type statesResponseDhcpv4LeasesStateIter struct { + obj *statesResponse + dhcpv4LeasesStateSlice []Dhcpv4LeasesState + fieldPtr *[]*otg.Dhcpv4LeasesState +} + +func newStatesResponseDhcpv4LeasesStateIter(ptr *[]*otg.Dhcpv4LeasesState) StatesResponseDhcpv4LeasesStateIter { + return &statesResponseDhcpv4LeasesStateIter{fieldPtr: ptr} +} + +type StatesResponseDhcpv4LeasesStateIter interface { + setMsg(*statesResponse) StatesResponseDhcpv4LeasesStateIter + Items() []Dhcpv4LeasesState + Add() Dhcpv4LeasesState + Append(items ...Dhcpv4LeasesState) StatesResponseDhcpv4LeasesStateIter + Set(index int, newObj Dhcpv4LeasesState) StatesResponseDhcpv4LeasesStateIter + Clear() StatesResponseDhcpv4LeasesStateIter + clearHolderSlice() StatesResponseDhcpv4LeasesStateIter + appendHolderSlice(item Dhcpv4LeasesState) StatesResponseDhcpv4LeasesStateIter +} + +func (obj *statesResponseDhcpv4LeasesStateIter) setMsg(msg *statesResponse) StatesResponseDhcpv4LeasesStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv4LeasesState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *statesResponseDhcpv4LeasesStateIter) Items() []Dhcpv4LeasesState { + return obj.dhcpv4LeasesStateSlice +} + +func (obj *statesResponseDhcpv4LeasesStateIter) Add() Dhcpv4LeasesState { + newObj := &otg.Dhcpv4LeasesState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv4LeasesState{obj: newObj} + newLibObj.setDefault() + obj.dhcpv4LeasesStateSlice = append(obj.dhcpv4LeasesStateSlice, newLibObj) + return newLibObj +} + +func (obj *statesResponseDhcpv4LeasesStateIter) Append(items ...Dhcpv4LeasesState) StatesResponseDhcpv4LeasesStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv4LeasesStateSlice = append(obj.dhcpv4LeasesStateSlice, item) + } + return obj +} + +func (obj *statesResponseDhcpv4LeasesStateIter) Set(index int, newObj Dhcpv4LeasesState) StatesResponseDhcpv4LeasesStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv4LeasesStateSlice[index] = newObj + return obj +} +func (obj *statesResponseDhcpv4LeasesStateIter) Clear() StatesResponseDhcpv4LeasesStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv4LeasesState{} + obj.dhcpv4LeasesStateSlice = []Dhcpv4LeasesState{} + } + return obj +} +func (obj *statesResponseDhcpv4LeasesStateIter) clearHolderSlice() StatesResponseDhcpv4LeasesStateIter { + if len(obj.dhcpv4LeasesStateSlice) > 0 { + obj.dhcpv4LeasesStateSlice = []Dhcpv4LeasesState{} + } + return obj +} +func (obj *statesResponseDhcpv4LeasesStateIter) appendHolderSlice(item Dhcpv4LeasesState) StatesResponseDhcpv4LeasesStateIter { + obj.dhcpv4LeasesStateSlice = append(obj.dhcpv4LeasesStateSlice, item) + return obj +} + +// description is TBD +// Dhcpv6Interfaces returns a []Dhcpv6InterfaceState +func (obj *statesResponse) Dhcpv6Interfaces() StatesResponseDhcpv6InterfaceStateIter { + if len(obj.obj.Dhcpv6Interfaces) == 0 { + obj.setChoice(StatesResponseChoice.DHCPV6_INTERFACES) + } + if obj.dhcpv6InterfacesHolder == nil { + obj.dhcpv6InterfacesHolder = newStatesResponseDhcpv6InterfaceStateIter(&obj.obj.Dhcpv6Interfaces).setMsg(obj) + } + return obj.dhcpv6InterfacesHolder +} + +type statesResponseDhcpv6InterfaceStateIter struct { + obj *statesResponse + dhcpv6InterfaceStateSlice []Dhcpv6InterfaceState + fieldPtr *[]*otg.Dhcpv6InterfaceState +} + +func newStatesResponseDhcpv6InterfaceStateIter(ptr *[]*otg.Dhcpv6InterfaceState) StatesResponseDhcpv6InterfaceStateIter { + return &statesResponseDhcpv6InterfaceStateIter{fieldPtr: ptr} +} + +type StatesResponseDhcpv6InterfaceStateIter interface { + setMsg(*statesResponse) StatesResponseDhcpv6InterfaceStateIter + Items() []Dhcpv6InterfaceState + Add() Dhcpv6InterfaceState + Append(items ...Dhcpv6InterfaceState) StatesResponseDhcpv6InterfaceStateIter + Set(index int, newObj Dhcpv6InterfaceState) StatesResponseDhcpv6InterfaceStateIter + Clear() StatesResponseDhcpv6InterfaceStateIter + clearHolderSlice() StatesResponseDhcpv6InterfaceStateIter + appendHolderSlice(item Dhcpv6InterfaceState) StatesResponseDhcpv6InterfaceStateIter +} + +func (obj *statesResponseDhcpv6InterfaceStateIter) setMsg(msg *statesResponse) StatesResponseDhcpv6InterfaceStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv6InterfaceState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *statesResponseDhcpv6InterfaceStateIter) Items() []Dhcpv6InterfaceState { + return obj.dhcpv6InterfaceStateSlice +} + +func (obj *statesResponseDhcpv6InterfaceStateIter) Add() Dhcpv6InterfaceState { + newObj := &otg.Dhcpv6InterfaceState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv6InterfaceState{obj: newObj} + newLibObj.setDefault() + obj.dhcpv6InterfaceStateSlice = append(obj.dhcpv6InterfaceStateSlice, newLibObj) + return newLibObj +} + +func (obj *statesResponseDhcpv6InterfaceStateIter) Append(items ...Dhcpv6InterfaceState) StatesResponseDhcpv6InterfaceStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv6InterfaceStateSlice = append(obj.dhcpv6InterfaceStateSlice, item) + } + return obj +} + +func (obj *statesResponseDhcpv6InterfaceStateIter) Set(index int, newObj Dhcpv6InterfaceState) StatesResponseDhcpv6InterfaceStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv6InterfaceStateSlice[index] = newObj + return obj +} +func (obj *statesResponseDhcpv6InterfaceStateIter) Clear() StatesResponseDhcpv6InterfaceStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv6InterfaceState{} + obj.dhcpv6InterfaceStateSlice = []Dhcpv6InterfaceState{} + } + return obj +} +func (obj *statesResponseDhcpv6InterfaceStateIter) clearHolderSlice() StatesResponseDhcpv6InterfaceStateIter { + if len(obj.dhcpv6InterfaceStateSlice) > 0 { + obj.dhcpv6InterfaceStateSlice = []Dhcpv6InterfaceState{} + } + return obj +} +func (obj *statesResponseDhcpv6InterfaceStateIter) appendHolderSlice(item Dhcpv6InterfaceState) StatesResponseDhcpv6InterfaceStateIter { + obj.dhcpv6InterfaceStateSlice = append(obj.dhcpv6InterfaceStateSlice, item) + return obj +} + +// description is TBD +// Dhcpv6Leases returns a []Dhcpv6LeasesState +func (obj *statesResponse) Dhcpv6Leases() StatesResponseDhcpv6LeasesStateIter { + if len(obj.obj.Dhcpv6Leases) == 0 { + obj.setChoice(StatesResponseChoice.DHCPV6_LEASES) + } + if obj.dhcpv6LeasesHolder == nil { + obj.dhcpv6LeasesHolder = newStatesResponseDhcpv6LeasesStateIter(&obj.obj.Dhcpv6Leases).setMsg(obj) + } + return obj.dhcpv6LeasesHolder +} + +type statesResponseDhcpv6LeasesStateIter struct { + obj *statesResponse + dhcpv6LeasesStateSlice []Dhcpv6LeasesState + fieldPtr *[]*otg.Dhcpv6LeasesState +} + +func newStatesResponseDhcpv6LeasesStateIter(ptr *[]*otg.Dhcpv6LeasesState) StatesResponseDhcpv6LeasesStateIter { + return &statesResponseDhcpv6LeasesStateIter{fieldPtr: ptr} +} + +type StatesResponseDhcpv6LeasesStateIter interface { + setMsg(*statesResponse) StatesResponseDhcpv6LeasesStateIter + Items() []Dhcpv6LeasesState + Add() Dhcpv6LeasesState + Append(items ...Dhcpv6LeasesState) StatesResponseDhcpv6LeasesStateIter + Set(index int, newObj Dhcpv6LeasesState) StatesResponseDhcpv6LeasesStateIter + Clear() StatesResponseDhcpv6LeasesStateIter + clearHolderSlice() StatesResponseDhcpv6LeasesStateIter + appendHolderSlice(item Dhcpv6LeasesState) StatesResponseDhcpv6LeasesStateIter +} + +func (obj *statesResponseDhcpv6LeasesStateIter) setMsg(msg *statesResponse) StatesResponseDhcpv6LeasesStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&dhcpv6LeasesState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *statesResponseDhcpv6LeasesStateIter) Items() []Dhcpv6LeasesState { + return obj.dhcpv6LeasesStateSlice +} + +func (obj *statesResponseDhcpv6LeasesStateIter) Add() Dhcpv6LeasesState { + newObj := &otg.Dhcpv6LeasesState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &dhcpv6LeasesState{obj: newObj} + newLibObj.setDefault() + obj.dhcpv6LeasesStateSlice = append(obj.dhcpv6LeasesStateSlice, newLibObj) + return newLibObj +} + +func (obj *statesResponseDhcpv6LeasesStateIter) Append(items ...Dhcpv6LeasesState) StatesResponseDhcpv6LeasesStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.dhcpv6LeasesStateSlice = append(obj.dhcpv6LeasesStateSlice, item) + } + return obj +} + +func (obj *statesResponseDhcpv6LeasesStateIter) Set(index int, newObj Dhcpv6LeasesState) StatesResponseDhcpv6LeasesStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.dhcpv6LeasesStateSlice[index] = newObj + return obj +} +func (obj *statesResponseDhcpv6LeasesStateIter) Clear() StatesResponseDhcpv6LeasesStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Dhcpv6LeasesState{} + obj.dhcpv6LeasesStateSlice = []Dhcpv6LeasesState{} + } + return obj +} +func (obj *statesResponseDhcpv6LeasesStateIter) clearHolderSlice() StatesResponseDhcpv6LeasesStateIter { + if len(obj.dhcpv6LeasesStateSlice) > 0 { + obj.dhcpv6LeasesStateSlice = []Dhcpv6LeasesState{} + } + return obj +} +func (obj *statesResponseDhcpv6LeasesStateIter) appendHolderSlice(item Dhcpv6LeasesState) StatesResponseDhcpv6LeasesStateIter { + obj.dhcpv6LeasesStateSlice = append(obj.dhcpv6LeasesStateSlice, item) + return obj +} + +// description is TBD +// Ospfv2Lsas returns a []Ospfv2LsaState +func (obj *statesResponse) Ospfv2Lsas() StatesResponseOspfv2LsaStateIter { + if len(obj.obj.Ospfv2Lsas) == 0 { + obj.setChoice(StatesResponseChoice.OSPFV2_LSAS) + } + if obj.ospfv2LsasHolder == nil { + obj.ospfv2LsasHolder = newStatesResponseOspfv2LsaStateIter(&obj.obj.Ospfv2Lsas).setMsg(obj) + } + return obj.ospfv2LsasHolder +} + +type statesResponseOspfv2LsaStateIter struct { + obj *statesResponse + ospfv2LsaStateSlice []Ospfv2LsaState + fieldPtr *[]*otg.Ospfv2LsaState +} + +func newStatesResponseOspfv2LsaStateIter(ptr *[]*otg.Ospfv2LsaState) StatesResponseOspfv2LsaStateIter { + return &statesResponseOspfv2LsaStateIter{fieldPtr: ptr} +} + +type StatesResponseOspfv2LsaStateIter interface { + setMsg(*statesResponse) StatesResponseOspfv2LsaStateIter + Items() []Ospfv2LsaState + Add() Ospfv2LsaState + Append(items ...Ospfv2LsaState) StatesResponseOspfv2LsaStateIter + Set(index int, newObj Ospfv2LsaState) StatesResponseOspfv2LsaStateIter + Clear() StatesResponseOspfv2LsaStateIter + clearHolderSlice() StatesResponseOspfv2LsaStateIter + appendHolderSlice(item Ospfv2LsaState) StatesResponseOspfv2LsaStateIter +} + +func (obj *statesResponseOspfv2LsaStateIter) setMsg(msg *statesResponse) StatesResponseOspfv2LsaStateIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&ospfv2LsaState{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *statesResponseOspfv2LsaStateIter) Items() []Ospfv2LsaState { + return obj.ospfv2LsaStateSlice +} + +func (obj *statesResponseOspfv2LsaStateIter) Add() Ospfv2LsaState { + newObj := &otg.Ospfv2LsaState{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &ospfv2LsaState{obj: newObj} + newLibObj.setDefault() + obj.ospfv2LsaStateSlice = append(obj.ospfv2LsaStateSlice, newLibObj) + return newLibObj +} + +func (obj *statesResponseOspfv2LsaStateIter) Append(items ...Ospfv2LsaState) StatesResponseOspfv2LsaStateIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.ospfv2LsaStateSlice = append(obj.ospfv2LsaStateSlice, item) + } + return obj +} + +func (obj *statesResponseOspfv2LsaStateIter) Set(index int, newObj Ospfv2LsaState) StatesResponseOspfv2LsaStateIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.ospfv2LsaStateSlice[index] = newObj + return obj +} +func (obj *statesResponseOspfv2LsaStateIter) Clear() StatesResponseOspfv2LsaStateIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.Ospfv2LsaState{} + obj.ospfv2LsaStateSlice = []Ospfv2LsaState{} + } + return obj +} +func (obj *statesResponseOspfv2LsaStateIter) clearHolderSlice() StatesResponseOspfv2LsaStateIter { + if len(obj.ospfv2LsaStateSlice) > 0 { + obj.ospfv2LsaStateSlice = []Ospfv2LsaState{} + } + return obj +} +func (obj *statesResponseOspfv2LsaStateIter) appendHolderSlice(item Ospfv2LsaState) StatesResponseOspfv2LsaStateIter { + obj.ospfv2LsaStateSlice = append(obj.ospfv2LsaStateSlice, item) + return obj +} + +func (obj *statesResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Ipv4Neighbors) != 0 { + + if set_default { + obj.Ipv4Neighbors().clearHolderSlice() + for _, item := range obj.obj.Ipv4Neighbors { + obj.Ipv4Neighbors().appendHolderSlice(&neighborsv4State{obj: item}) + } + } + for _, item := range obj.Ipv4Neighbors().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ipv6Neighbors) != 0 { + + if set_default { + obj.Ipv6Neighbors().clearHolderSlice() + for _, item := range obj.obj.Ipv6Neighbors { + obj.Ipv6Neighbors().appendHolderSlice(&neighborsv6State{obj: item}) + } + } + for _, item := range obj.Ipv6Neighbors().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.BgpPrefixes) != 0 { + + if set_default { + obj.BgpPrefixes().clearHolderSlice() + for _, item := range obj.obj.BgpPrefixes { + obj.BgpPrefixes().appendHolderSlice(&bgpPrefixesState{obj: item}) + } + } + for _, item := range obj.BgpPrefixes().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.IsisLsps) != 0 { + + if set_default { + obj.IsisLsps().clearHolderSlice() + for _, item := range obj.obj.IsisLsps { + obj.IsisLsps().appendHolderSlice(&isisLspsState{obj: item}) + } + } + for _, item := range obj.IsisLsps().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.LldpNeighbors) != 0 { + + if set_default { + obj.LldpNeighbors().clearHolderSlice() + for _, item := range obj.obj.LldpNeighbors { + obj.LldpNeighbors().appendHolderSlice(&lldpNeighborsState{obj: item}) + } + } + for _, item := range obj.LldpNeighbors().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.RsvpLsps) != 0 { + + if set_default { + obj.RsvpLsps().clearHolderSlice() + for _, item := range obj.obj.RsvpLsps { + obj.RsvpLsps().appendHolderSlice(&rsvpLspsState{obj: item}) + } + } + for _, item := range obj.RsvpLsps().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Dhcpv4Interfaces) != 0 { + + if set_default { + obj.Dhcpv4Interfaces().clearHolderSlice() + for _, item := range obj.obj.Dhcpv4Interfaces { + obj.Dhcpv4Interfaces().appendHolderSlice(&dhcpv4InterfaceState{obj: item}) + } + } + for _, item := range obj.Dhcpv4Interfaces().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Dhcpv4Leases) != 0 { + + if set_default { + obj.Dhcpv4Leases().clearHolderSlice() + for _, item := range obj.obj.Dhcpv4Leases { + obj.Dhcpv4Leases().appendHolderSlice(&dhcpv4LeasesState{obj: item}) + } + } + for _, item := range obj.Dhcpv4Leases().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Dhcpv6Interfaces) != 0 { + + if set_default { + obj.Dhcpv6Interfaces().clearHolderSlice() + for _, item := range obj.obj.Dhcpv6Interfaces { + obj.Dhcpv6Interfaces().appendHolderSlice(&dhcpv6InterfaceState{obj: item}) + } + } + for _, item := range obj.Dhcpv6Interfaces().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Dhcpv6Leases) != 0 { + + if set_default { + obj.Dhcpv6Leases().clearHolderSlice() + for _, item := range obj.obj.Dhcpv6Leases { + obj.Dhcpv6Leases().appendHolderSlice(&dhcpv6LeasesState{obj: item}) + } + } + for _, item := range obj.Dhcpv6Leases().Items() { + item.validateObj(vObj, set_default) + } + + } + + if len(obj.obj.Ospfv2Lsas) != 0 { + + if set_default { + obj.Ospfv2Lsas().clearHolderSlice() + for _, item := range obj.obj.Ospfv2Lsas { + obj.Ospfv2Lsas().appendHolderSlice(&ospfv2LsaState{obj: item}) + } + } + for _, item := range obj.Ospfv2Lsas().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *statesResponse) setDefault() { + var choices_set int = 0 + var choice StatesResponseChoiceEnum + + if len(obj.obj.Ipv4Neighbors) > 0 { + choices_set += 1 + choice = StatesResponseChoice.IPV4_NEIGHBORS + } + + if len(obj.obj.Ipv6Neighbors) > 0 { + choices_set += 1 + choice = StatesResponseChoice.IPV6_NEIGHBORS + } + + if len(obj.obj.BgpPrefixes) > 0 { + choices_set += 1 + choice = StatesResponseChoice.BGP_PREFIXES + } + + if len(obj.obj.IsisLsps) > 0 { + choices_set += 1 + choice = StatesResponseChoice.ISIS_LSPS + } + + if len(obj.obj.LldpNeighbors) > 0 { + choices_set += 1 + choice = StatesResponseChoice.LLDP_NEIGHBORS + } + + if len(obj.obj.RsvpLsps) > 0 { + choices_set += 1 + choice = StatesResponseChoice.RSVP_LSPS + } + + if len(obj.obj.Dhcpv4Interfaces) > 0 { + choices_set += 1 + choice = StatesResponseChoice.DHCPV4_INTERFACES + } + + if len(obj.obj.Dhcpv4Leases) > 0 { + choices_set += 1 + choice = StatesResponseChoice.DHCPV4_LEASES + } + + if len(obj.obj.Dhcpv6Interfaces) > 0 { + choices_set += 1 + choice = StatesResponseChoice.DHCPV6_INTERFACES + } + + if len(obj.obj.Dhcpv6Leases) > 0 { + choices_set += 1 + choice = StatesResponseChoice.DHCPV6_LEASES + } + + if len(obj.obj.Ospfv2Lsas) > 0 { + choices_set += 1 + choice = StatesResponseChoice.OSPFV2_LSAS + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(StatesResponseChoice.IPV4_NEIGHBORS) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in StatesResponse") + } + } else { + intVal := otg.StatesResponse_Choice_Enum_value[string(choice)] + enumValue := otg.StatesResponse_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/update_config_response.go b/gosnappi/update_config_response.go new file mode 100644 index 00000000..cd41964a --- /dev/null +++ b/gosnappi/update_config_response.go @@ -0,0 +1,328 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** UpdateConfigResponse ***** +type updateConfigResponse struct { + validation + obj *otg.UpdateConfigResponse + marshaller marshalUpdateConfigResponse + unMarshaller unMarshalUpdateConfigResponse + warningHolder Warning +} + +func NewUpdateConfigResponse() UpdateConfigResponse { + obj := updateConfigResponse{obj: &otg.UpdateConfigResponse{}} + obj.setDefault() + return &obj +} + +func (obj *updateConfigResponse) msg() *otg.UpdateConfigResponse { + return obj.obj +} + +func (obj *updateConfigResponse) setMsg(msg *otg.UpdateConfigResponse) UpdateConfigResponse { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalupdateConfigResponse struct { + obj *updateConfigResponse +} + +type marshalUpdateConfigResponse interface { + // ToProto marshals UpdateConfigResponse to protobuf object *otg.UpdateConfigResponse + ToProto() (*otg.UpdateConfigResponse, error) + // ToPbText marshals UpdateConfigResponse to protobuf text + ToPbText() (string, error) + // ToYaml marshals UpdateConfigResponse to YAML text + ToYaml() (string, error) + // ToJson marshals UpdateConfigResponse to JSON text + ToJson() (string, error) +} + +type unMarshalupdateConfigResponse struct { + obj *updateConfigResponse +} + +type unMarshalUpdateConfigResponse interface { + // FromProto unmarshals UpdateConfigResponse from protobuf object *otg.UpdateConfigResponse + FromProto(msg *otg.UpdateConfigResponse) (UpdateConfigResponse, error) + // FromPbText unmarshals UpdateConfigResponse from protobuf text + FromPbText(value string) error + // FromYaml unmarshals UpdateConfigResponse from YAML text + FromYaml(value string) error + // FromJson unmarshals UpdateConfigResponse from JSON text + FromJson(value string) error +} + +func (obj *updateConfigResponse) Marshal() marshalUpdateConfigResponse { + if obj.marshaller == nil { + obj.marshaller = &marshalupdateConfigResponse{obj: obj} + } + return obj.marshaller +} + +func (obj *updateConfigResponse) Unmarshal() unMarshalUpdateConfigResponse { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalupdateConfigResponse{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalupdateConfigResponse) ToProto() (*otg.UpdateConfigResponse, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalupdateConfigResponse) FromProto(msg *otg.UpdateConfigResponse) (UpdateConfigResponse, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalupdateConfigResponse) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalupdateConfigResponse) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalupdateConfigResponse) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalupdateConfigResponse) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalupdateConfigResponse) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalupdateConfigResponse) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *updateConfigResponse) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *updateConfigResponse) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *updateConfigResponse) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *updateConfigResponse) Clone() (UpdateConfigResponse, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewUpdateConfigResponse() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *updateConfigResponse) setNil() { + obj.warningHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// UpdateConfigResponse is description is TBD +type UpdateConfigResponse interface { + Validation + // msg marshals UpdateConfigResponse to protobuf object *otg.UpdateConfigResponse + // and doesn't set defaults + msg() *otg.UpdateConfigResponse + // setMsg unmarshals UpdateConfigResponse from protobuf object *otg.UpdateConfigResponse + // and doesn't set defaults + setMsg(*otg.UpdateConfigResponse) UpdateConfigResponse + // provides marshal interface + Marshal() marshalUpdateConfigResponse + // provides unmarshal interface + Unmarshal() unMarshalUpdateConfigResponse + // validate validates UpdateConfigResponse + validate() error + // A stringer function + String() string + // Clones the object + Clone() (UpdateConfigResponse, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Warning returns Warning, set in UpdateConfigResponse. + // Warning is a list of warnings that have occurred while executing the request. + Warning() Warning + // SetWarning assigns Warning provided by user to UpdateConfigResponse. + // Warning is a list of warnings that have occurred while executing the request. + SetWarning(value Warning) UpdateConfigResponse + // HasWarning checks if Warning has been set in UpdateConfigResponse + HasWarning() bool + setNil() +} + +// description is TBD +// Warning returns a Warning +func (obj *updateConfigResponse) Warning() Warning { + if obj.obj.Warning == nil { + obj.obj.Warning = NewWarning().msg() + } + if obj.warningHolder == nil { + obj.warningHolder = &warning{obj: obj.obj.Warning} + } + return obj.warningHolder +} + +// description is TBD +// Warning returns a Warning +func (obj *updateConfigResponse) HasWarning() bool { + return obj.obj.Warning != nil +} + +// description is TBD +// SetWarning sets the Warning value in the UpdateConfigResponse object +func (obj *updateConfigResponse) SetWarning(value Warning) UpdateConfigResponse { + + obj.warningHolder = nil + obj.obj.Warning = value.msg() + + return obj +} + +func (obj *updateConfigResponse) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Warning != nil { + + obj.Warning().validateObj(vObj, set_default) + } + +} + +func (obj *updateConfigResponse) setDefault() { + +} diff --git a/gosnappi/v4_route_address.go b/gosnappi/v4_route_address.go new file mode 100644 index 00000000..85945ee3 --- /dev/null +++ b/gosnappi/v4_route_address.go @@ -0,0 +1,434 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** V4RouteAddress ***** +type v4RouteAddress struct { + validation + obj *otg.V4RouteAddress + marshaller marshalV4RouteAddress + unMarshaller unMarshalV4RouteAddress +} + +func NewV4RouteAddress() V4RouteAddress { + obj := v4RouteAddress{obj: &otg.V4RouteAddress{}} + obj.setDefault() + return &obj +} + +func (obj *v4RouteAddress) msg() *otg.V4RouteAddress { + return obj.obj +} + +func (obj *v4RouteAddress) setMsg(msg *otg.V4RouteAddress) V4RouteAddress { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalv4RouteAddress struct { + obj *v4RouteAddress +} + +type marshalV4RouteAddress interface { + // ToProto marshals V4RouteAddress to protobuf object *otg.V4RouteAddress + ToProto() (*otg.V4RouteAddress, error) + // ToPbText marshals V4RouteAddress to protobuf text + ToPbText() (string, error) + // ToYaml marshals V4RouteAddress to YAML text + ToYaml() (string, error) + // ToJson marshals V4RouteAddress to JSON text + ToJson() (string, error) +} + +type unMarshalv4RouteAddress struct { + obj *v4RouteAddress +} + +type unMarshalV4RouteAddress interface { + // FromProto unmarshals V4RouteAddress from protobuf object *otg.V4RouteAddress + FromProto(msg *otg.V4RouteAddress) (V4RouteAddress, error) + // FromPbText unmarshals V4RouteAddress from protobuf text + FromPbText(value string) error + // FromYaml unmarshals V4RouteAddress from YAML text + FromYaml(value string) error + // FromJson unmarshals V4RouteAddress from JSON text + FromJson(value string) error +} + +func (obj *v4RouteAddress) Marshal() marshalV4RouteAddress { + if obj.marshaller == nil { + obj.marshaller = &marshalv4RouteAddress{obj: obj} + } + return obj.marshaller +} + +func (obj *v4RouteAddress) Unmarshal() unMarshalV4RouteAddress { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalv4RouteAddress{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalv4RouteAddress) ToProto() (*otg.V4RouteAddress, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalv4RouteAddress) FromProto(msg *otg.V4RouteAddress) (V4RouteAddress, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalv4RouteAddress) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalv4RouteAddress) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalv4RouteAddress) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalv4RouteAddress) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalv4RouteAddress) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalv4RouteAddress) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *v4RouteAddress) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *v4RouteAddress) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *v4RouteAddress) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *v4RouteAddress) Clone() (V4RouteAddress, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewV4RouteAddress() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// V4RouteAddress is a container for IPv4 route addresses. +type V4RouteAddress interface { + Validation + // msg marshals V4RouteAddress to protobuf object *otg.V4RouteAddress + // and doesn't set defaults + msg() *otg.V4RouteAddress + // setMsg unmarshals V4RouteAddress from protobuf object *otg.V4RouteAddress + // and doesn't set defaults + setMsg(*otg.V4RouteAddress) V4RouteAddress + // provides marshal interface + Marshal() marshalV4RouteAddress + // provides unmarshal interface + Unmarshal() unMarshalV4RouteAddress + // validate validates V4RouteAddress + validate() error + // A stringer function + String() string + // Clones the object + Clone() (V4RouteAddress, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Address returns string, set in V4RouteAddress. + Address() string + // SetAddress assigns string provided by user to V4RouteAddress + SetAddress(value string) V4RouteAddress + // Prefix returns uint32, set in V4RouteAddress. + Prefix() uint32 + // SetPrefix assigns uint32 provided by user to V4RouteAddress + SetPrefix(value uint32) V4RouteAddress + // HasPrefix checks if Prefix has been set in V4RouteAddress + HasPrefix() bool + // Count returns uint32, set in V4RouteAddress. + Count() uint32 + // SetCount assigns uint32 provided by user to V4RouteAddress + SetCount(value uint32) V4RouteAddress + // HasCount checks if Count has been set in V4RouteAddress + HasCount() bool + // Step returns uint32, set in V4RouteAddress. + Step() uint32 + // SetStep assigns uint32 provided by user to V4RouteAddress + SetStep(value uint32) V4RouteAddress + // HasStep checks if Step has been set in V4RouteAddress + HasStep() bool +} + +// The starting address of the network. +// Address returns a string +func (obj *v4RouteAddress) Address() string { + + return *obj.obj.Address + +} + +// The starting address of the network. +// SetAddress sets the string value in the V4RouteAddress object +func (obj *v4RouteAddress) SetAddress(value string) V4RouteAddress { + + obj.obj.Address = &value + return obj +} + +// The IPv4 network prefix length to be applied to the address. +// Prefix returns a uint32 +func (obj *v4RouteAddress) Prefix() uint32 { + + return *obj.obj.Prefix + +} + +// The IPv4 network prefix length to be applied to the address. +// Prefix returns a uint32 +func (obj *v4RouteAddress) HasPrefix() bool { + return obj.obj.Prefix != nil +} + +// The IPv4 network prefix length to be applied to the address. +// SetPrefix sets the uint32 value in the V4RouteAddress object +func (obj *v4RouteAddress) SetPrefix(value uint32) V4RouteAddress { + + obj.obj.Prefix = &value + return obj +} + +// The total number of addresses in the range. +// Count returns a uint32 +func (obj *v4RouteAddress) Count() uint32 { + + return *obj.obj.Count + +} + +// The total number of addresses in the range. +// Count returns a uint32 +func (obj *v4RouteAddress) HasCount() bool { + return obj.obj.Count != nil +} + +// The total number of addresses in the range. +// SetCount sets the uint32 value in the V4RouteAddress object +func (obj *v4RouteAddress) SetCount(value uint32) V4RouteAddress { + + obj.obj.Count = &value + return obj +} + +// Increments the network address prefixes within a route range where multiple routes are present. The value is incremented according to the Prefix Length and Step. +// Step returns a uint32 +func (obj *v4RouteAddress) Step() uint32 { + + return *obj.obj.Step + +} + +// Increments the network address prefixes within a route range where multiple routes are present. The value is incremented according to the Prefix Length and Step. +// Step returns a uint32 +func (obj *v4RouteAddress) HasStep() bool { + return obj.obj.Step != nil +} + +// Increments the network address prefixes within a route range where multiple routes are present. The value is incremented according to the Prefix Length and Step. +// SetStep sets the uint32 value in the V4RouteAddress object +func (obj *v4RouteAddress) SetStep(value uint32) V4RouteAddress { + + obj.obj.Step = &value + return obj +} + +func (obj *v4RouteAddress) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Address is required + if obj.obj.Address == nil { + vObj.validationErrors = append(vObj.validationErrors, "Address is required field on interface V4RouteAddress") + } + if obj.obj.Address != nil { + + err := obj.validateIpv4(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on V4RouteAddress.Address")) + } + + } + + if obj.obj.Prefix != nil { + + if *obj.obj.Prefix > 32 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= V4RouteAddress.Prefix <= 32 but Got %d", *obj.obj.Prefix)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count < 1 || *obj.obj.Count > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= V4RouteAddress.Count <= 4294967295 but Got %d", *obj.obj.Count)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step < 1 || *obj.obj.Step > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= V4RouteAddress.Step <= 4294967295 but Got %d", *obj.obj.Step)) + } + + } + +} + +func (obj *v4RouteAddress) setDefault() { + if obj.obj.Prefix == nil { + obj.SetPrefix(24) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + +} diff --git a/gosnappi/v6_route_address.go b/gosnappi/v6_route_address.go new file mode 100644 index 00000000..b1195771 --- /dev/null +++ b/gosnappi/v6_route_address.go @@ -0,0 +1,434 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** V6RouteAddress ***** +type v6RouteAddress struct { + validation + obj *otg.V6RouteAddress + marshaller marshalV6RouteAddress + unMarshaller unMarshalV6RouteAddress +} + +func NewV6RouteAddress() V6RouteAddress { + obj := v6RouteAddress{obj: &otg.V6RouteAddress{}} + obj.setDefault() + return &obj +} + +func (obj *v6RouteAddress) msg() *otg.V6RouteAddress { + return obj.obj +} + +func (obj *v6RouteAddress) setMsg(msg *otg.V6RouteAddress) V6RouteAddress { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalv6RouteAddress struct { + obj *v6RouteAddress +} + +type marshalV6RouteAddress interface { + // ToProto marshals V6RouteAddress to protobuf object *otg.V6RouteAddress + ToProto() (*otg.V6RouteAddress, error) + // ToPbText marshals V6RouteAddress to protobuf text + ToPbText() (string, error) + // ToYaml marshals V6RouteAddress to YAML text + ToYaml() (string, error) + // ToJson marshals V6RouteAddress to JSON text + ToJson() (string, error) +} + +type unMarshalv6RouteAddress struct { + obj *v6RouteAddress +} + +type unMarshalV6RouteAddress interface { + // FromProto unmarshals V6RouteAddress from protobuf object *otg.V6RouteAddress + FromProto(msg *otg.V6RouteAddress) (V6RouteAddress, error) + // FromPbText unmarshals V6RouteAddress from protobuf text + FromPbText(value string) error + // FromYaml unmarshals V6RouteAddress from YAML text + FromYaml(value string) error + // FromJson unmarshals V6RouteAddress from JSON text + FromJson(value string) error +} + +func (obj *v6RouteAddress) Marshal() marshalV6RouteAddress { + if obj.marshaller == nil { + obj.marshaller = &marshalv6RouteAddress{obj: obj} + } + return obj.marshaller +} + +func (obj *v6RouteAddress) Unmarshal() unMarshalV6RouteAddress { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalv6RouteAddress{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalv6RouteAddress) ToProto() (*otg.V6RouteAddress, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalv6RouteAddress) FromProto(msg *otg.V6RouteAddress) (V6RouteAddress, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalv6RouteAddress) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalv6RouteAddress) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalv6RouteAddress) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalv6RouteAddress) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalv6RouteAddress) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalv6RouteAddress) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *v6RouteAddress) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *v6RouteAddress) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *v6RouteAddress) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *v6RouteAddress) Clone() (V6RouteAddress, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewV6RouteAddress() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// V6RouteAddress is a container for IPv6 route addresses. +type V6RouteAddress interface { + Validation + // msg marshals V6RouteAddress to protobuf object *otg.V6RouteAddress + // and doesn't set defaults + msg() *otg.V6RouteAddress + // setMsg unmarshals V6RouteAddress from protobuf object *otg.V6RouteAddress + // and doesn't set defaults + setMsg(*otg.V6RouteAddress) V6RouteAddress + // provides marshal interface + Marshal() marshalV6RouteAddress + // provides unmarshal interface + Unmarshal() unMarshalV6RouteAddress + // validate validates V6RouteAddress + validate() error + // A stringer function + String() string + // Clones the object + Clone() (V6RouteAddress, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Address returns string, set in V6RouteAddress. + Address() string + // SetAddress assigns string provided by user to V6RouteAddress + SetAddress(value string) V6RouteAddress + // Prefix returns uint32, set in V6RouteAddress. + Prefix() uint32 + // SetPrefix assigns uint32 provided by user to V6RouteAddress + SetPrefix(value uint32) V6RouteAddress + // HasPrefix checks if Prefix has been set in V6RouteAddress + HasPrefix() bool + // Count returns uint32, set in V6RouteAddress. + Count() uint32 + // SetCount assigns uint32 provided by user to V6RouteAddress + SetCount(value uint32) V6RouteAddress + // HasCount checks if Count has been set in V6RouteAddress + HasCount() bool + // Step returns uint32, set in V6RouteAddress. + Step() uint32 + // SetStep assigns uint32 provided by user to V6RouteAddress + SetStep(value uint32) V6RouteAddress + // HasStep checks if Step has been set in V6RouteAddress + HasStep() bool +} + +// The starting address of the network. +// Address returns a string +func (obj *v6RouteAddress) Address() string { + + return *obj.obj.Address + +} + +// The starting address of the network. +// SetAddress sets the string value in the V6RouteAddress object +func (obj *v6RouteAddress) SetAddress(value string) V6RouteAddress { + + obj.obj.Address = &value + return obj +} + +// The IPv6 network prefix length to be applied to the address. +// Prefix returns a uint32 +func (obj *v6RouteAddress) Prefix() uint32 { + + return *obj.obj.Prefix + +} + +// The IPv6 network prefix length to be applied to the address. +// Prefix returns a uint32 +func (obj *v6RouteAddress) HasPrefix() bool { + return obj.obj.Prefix != nil +} + +// The IPv6 network prefix length to be applied to the address. +// SetPrefix sets the uint32 value in the V6RouteAddress object +func (obj *v6RouteAddress) SetPrefix(value uint32) V6RouteAddress { + + obj.obj.Prefix = &value + return obj +} + +// The total number of addresses in the range. +// Count returns a uint32 +func (obj *v6RouteAddress) Count() uint32 { + + return *obj.obj.Count + +} + +// The total number of addresses in the range. +// Count returns a uint32 +func (obj *v6RouteAddress) HasCount() bool { + return obj.obj.Count != nil +} + +// The total number of addresses in the range. +// SetCount sets the uint32 value in the V6RouteAddress object +func (obj *v6RouteAddress) SetCount(value uint32) V6RouteAddress { + + obj.obj.Count = &value + return obj +} + +// Increments the network address prefixes within a route range where multiple routes are present. The value is incremented according to the Prefix Length and Step. +// Step returns a uint32 +func (obj *v6RouteAddress) Step() uint32 { + + return *obj.obj.Step + +} + +// Increments the network address prefixes within a route range where multiple routes are present. The value is incremented according to the Prefix Length and Step. +// Step returns a uint32 +func (obj *v6RouteAddress) HasStep() bool { + return obj.obj.Step != nil +} + +// Increments the network address prefixes within a route range where multiple routes are present. The value is incremented according to the Prefix Length and Step. +// SetStep sets the uint32 value in the V6RouteAddress object +func (obj *v6RouteAddress) SetStep(value uint32) V6RouteAddress { + + obj.obj.Step = &value + return obj +} + +func (obj *v6RouteAddress) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // Address is required + if obj.obj.Address == nil { + vObj.validationErrors = append(vObj.validationErrors, "Address is required field on interface V6RouteAddress") + } + if obj.obj.Address != nil { + + err := obj.validateIpv6(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on V6RouteAddress.Address")) + } + + } + + if obj.obj.Prefix != nil { + + if *obj.obj.Prefix > 128 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("0 <= V6RouteAddress.Prefix <= 128 but Got %d", *obj.obj.Prefix)) + } + + } + + if obj.obj.Count != nil { + + if *obj.obj.Count < 1 || *obj.obj.Count > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= V6RouteAddress.Count <= 4294967295 but Got %d", *obj.obj.Count)) + } + + } + + if obj.obj.Step != nil { + + if *obj.obj.Step < 1 || *obj.obj.Step > 4294967295 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= V6RouteAddress.Step <= 4294967295 but Got %d", *obj.obj.Step)) + } + + } + +} + +func (obj *v6RouteAddress) setDefault() { + if obj.obj.Prefix == nil { + obj.SetPrefix(64) + } + if obj.obj.Count == nil { + obj.SetCount(1) + } + if obj.obj.Step == nil { + obj.SetStep(1) + } + +} diff --git a/gosnappi/version.go b/gosnappi/version.go new file mode 100644 index 00000000..38b80778 --- /dev/null +++ b/gosnappi/version.go @@ -0,0 +1,371 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Version ***** +type version struct { + validation + obj *otg.Version + marshaller marshalVersion + unMarshaller unMarshalVersion +} + +func NewVersion() Version { + obj := version{obj: &otg.Version{}} + obj.setDefault() + return &obj +} + +func (obj *version) msg() *otg.Version { + return obj.obj +} + +func (obj *version) setMsg(msg *otg.Version) Version { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalversion struct { + obj *version +} + +type marshalVersion interface { + // ToProto marshals Version to protobuf object *otg.Version + ToProto() (*otg.Version, error) + // ToPbText marshals Version to protobuf text + ToPbText() (string, error) + // ToYaml marshals Version to YAML text + ToYaml() (string, error) + // ToJson marshals Version to JSON text + ToJson() (string, error) +} + +type unMarshalversion struct { + obj *version +} + +type unMarshalVersion interface { + // FromProto unmarshals Version from protobuf object *otg.Version + FromProto(msg *otg.Version) (Version, error) + // FromPbText unmarshals Version from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Version from YAML text + FromYaml(value string) error + // FromJson unmarshals Version from JSON text + FromJson(value string) error +} + +func (obj *version) Marshal() marshalVersion { + if obj.marshaller == nil { + obj.marshaller = &marshalversion{obj: obj} + } + return obj.marshaller +} + +func (obj *version) Unmarshal() unMarshalVersion { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalversion{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalversion) ToProto() (*otg.Version, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalversion) FromProto(msg *otg.Version) (Version, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalversion) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalversion) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalversion) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalversion) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalversion) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalversion) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *version) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *version) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *version) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *version) Clone() (Version, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewVersion() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Version is version details +type Version interface { + Validation + // msg marshals Version to protobuf object *otg.Version + // and doesn't set defaults + msg() *otg.Version + // setMsg unmarshals Version from protobuf object *otg.Version + // and doesn't set defaults + setMsg(*otg.Version) Version + // provides marshal interface + Marshal() marshalVersion + // provides unmarshal interface + Unmarshal() unMarshalVersion + // validate validates Version + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Version, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // ApiSpecVersion returns string, set in Version. + ApiSpecVersion() string + // SetApiSpecVersion assigns string provided by user to Version + SetApiSpecVersion(value string) Version + // HasApiSpecVersion checks if ApiSpecVersion has been set in Version + HasApiSpecVersion() bool + // SdkVersion returns string, set in Version. + SdkVersion() string + // SetSdkVersion assigns string provided by user to Version + SetSdkVersion(value string) Version + // HasSdkVersion checks if SdkVersion has been set in Version + HasSdkVersion() bool + // AppVersion returns string, set in Version. + AppVersion() string + // SetAppVersion assigns string provided by user to Version + SetAppVersion(value string) Version + // HasAppVersion checks if AppVersion has been set in Version + HasAppVersion() bool +} + +// Version of API specification +// ApiSpecVersion returns a string +func (obj *version) ApiSpecVersion() string { + + return *obj.obj.ApiSpecVersion + +} + +// Version of API specification +// ApiSpecVersion returns a string +func (obj *version) HasApiSpecVersion() bool { + return obj.obj.ApiSpecVersion != nil +} + +// Version of API specification +// SetApiSpecVersion sets the string value in the Version object +func (obj *version) SetApiSpecVersion(value string) Version { + + obj.obj.ApiSpecVersion = &value + return obj +} + +// Version of SDK generated from API specification +// SdkVersion returns a string +func (obj *version) SdkVersion() string { + + return *obj.obj.SdkVersion + +} + +// Version of SDK generated from API specification +// SdkVersion returns a string +func (obj *version) HasSdkVersion() bool { + return obj.obj.SdkVersion != nil +} + +// Version of SDK generated from API specification +// SetSdkVersion sets the string value in the Version object +func (obj *version) SetSdkVersion(value string) Version { + + obj.obj.SdkVersion = &value + return obj +} + +// Version of application consuming or serving the API +// AppVersion returns a string +func (obj *version) AppVersion() string { + + return *obj.obj.AppVersion + +} + +// Version of application consuming or serving the API +// AppVersion returns a string +func (obj *version) HasAppVersion() bool { + return obj.obj.AppVersion != nil +} + +// Version of application consuming or serving the API +// SetAppVersion sets the string value in the Version object +func (obj *version) SetAppVersion(value string) Version { + + obj.obj.AppVersion = &value + return obj +} + +func (obj *version) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *version) setDefault() { + if obj.obj.ApiSpecVersion == nil { + obj.SetApiSpecVersion("") + } + if obj.obj.SdkVersion == nil { + obj.SetSdkVersion("") + } + if obj.obj.AppVersion == nil { + obj.SetAppVersion("") + } + +} diff --git a/gosnappi/vxlan_tunnel_destination_ip_mode_unicast_arp_suppression_cache.go b/gosnappi/vxlan_tunnel_destination_ip_mode_unicast_arp_suppression_cache.go new file mode 100644 index 00000000..a3d924bd --- /dev/null +++ b/gosnappi/vxlan_tunnel_destination_ip_mode_unicast_arp_suppression_cache.go @@ -0,0 +1,352 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** VxlanTunnelDestinationIPModeUnicastArpSuppressionCache ***** +type vxlanTunnelDestinationIPModeUnicastArpSuppressionCache struct { + validation + obj *otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + marshaller marshalVxlanTunnelDestinationIPModeUnicastArpSuppressionCache + unMarshaller unMarshalVxlanTunnelDestinationIPModeUnicastArpSuppressionCache +} + +func NewVxlanTunnelDestinationIPModeUnicastArpSuppressionCache() VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { + obj := vxlanTunnelDestinationIPModeUnicastArpSuppressionCache{obj: &otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache{}} + obj.setDefault() + return &obj +} + +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) msg() *otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { + return obj.obj +} + +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) setMsg(msg *otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalvxlanTunnelDestinationIPModeUnicastArpSuppressionCache struct { + obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache +} + +type marshalVxlanTunnelDestinationIPModeUnicastArpSuppressionCache interface { + // ToProto marshals VxlanTunnelDestinationIPModeUnicastArpSuppressionCache to protobuf object *otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + ToProto() (*otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache, error) + // ToPbText marshals VxlanTunnelDestinationIPModeUnicastArpSuppressionCache to protobuf text + ToPbText() (string, error) + // ToYaml marshals VxlanTunnelDestinationIPModeUnicastArpSuppressionCache to YAML text + ToYaml() (string, error) + // ToJson marshals VxlanTunnelDestinationIPModeUnicastArpSuppressionCache to JSON text + ToJson() (string, error) +} + +type unMarshalvxlanTunnelDestinationIPModeUnicastArpSuppressionCache struct { + obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache +} + +type unMarshalVxlanTunnelDestinationIPModeUnicastArpSuppressionCache interface { + // FromProto unmarshals VxlanTunnelDestinationIPModeUnicastArpSuppressionCache from protobuf object *otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + FromProto(msg *otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) (VxlanTunnelDestinationIPModeUnicastArpSuppressionCache, error) + // FromPbText unmarshals VxlanTunnelDestinationIPModeUnicastArpSuppressionCache from protobuf text + FromPbText(value string) error + // FromYaml unmarshals VxlanTunnelDestinationIPModeUnicastArpSuppressionCache from YAML text + FromYaml(value string) error + // FromJson unmarshals VxlanTunnelDestinationIPModeUnicastArpSuppressionCache from JSON text + FromJson(value string) error +} + +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) Marshal() marshalVxlanTunnelDestinationIPModeUnicastArpSuppressionCache { + if obj.marshaller == nil { + obj.marshaller = &marshalvxlanTunnelDestinationIPModeUnicastArpSuppressionCache{obj: obj} + } + return obj.marshaller +} + +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) Unmarshal() unMarshalVxlanTunnelDestinationIPModeUnicastArpSuppressionCache { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalvxlanTunnelDestinationIPModeUnicastArpSuppressionCache{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalvxlanTunnelDestinationIPModeUnicastArpSuppressionCache) ToProto() (*otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalvxlanTunnelDestinationIPModeUnicastArpSuppressionCache) FromProto(msg *otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) (VxlanTunnelDestinationIPModeUnicastArpSuppressionCache, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalvxlanTunnelDestinationIPModeUnicastArpSuppressionCache) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalvxlanTunnelDestinationIPModeUnicastArpSuppressionCache) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalvxlanTunnelDestinationIPModeUnicastArpSuppressionCache) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanTunnelDestinationIPModeUnicastArpSuppressionCache) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalvxlanTunnelDestinationIPModeUnicastArpSuppressionCache) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanTunnelDestinationIPModeUnicastArpSuppressionCache) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) Clone() (VxlanTunnelDestinationIPModeUnicastArpSuppressionCache, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewVxlanTunnelDestinationIPModeUnicastArpSuppressionCache() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// VxlanTunnelDestinationIPModeUnicastArpSuppressionCache is each VTEP maintains an ARP suppression cache table for known IP hosts and their associated MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request for another end-host IP address, its local VTEP intercepts the ARP request and checks for the ARP-resolved IP address in its ARP suppression cache table. If it finds a match, the local VTEP sends an ARP response on behalf of the remote end host. +type VxlanTunnelDestinationIPModeUnicastArpSuppressionCache interface { + Validation + // msg marshals VxlanTunnelDestinationIPModeUnicastArpSuppressionCache to protobuf object *otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + // and doesn't set defaults + msg() *otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + // setMsg unmarshals VxlanTunnelDestinationIPModeUnicastArpSuppressionCache from protobuf object *otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + // and doesn't set defaults + setMsg(*otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + // provides marshal interface + Marshal() marshalVxlanTunnelDestinationIPModeUnicastArpSuppressionCache + // provides unmarshal interface + Unmarshal() unMarshalVxlanTunnelDestinationIPModeUnicastArpSuppressionCache + // validate validates VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + validate() error + // A stringer function + String() string + // Clones the object + Clone() (VxlanTunnelDestinationIPModeUnicastArpSuppressionCache, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RemoteVmMac returns string, set in VxlanTunnelDestinationIPModeUnicastArpSuppressionCache. + RemoteVmMac() string + // SetRemoteVmMac assigns string provided by user to VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + SetRemoteVmMac(value string) VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + // HasRemoteVmMac checks if RemoteVmMac has been set in VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + HasRemoteVmMac() bool + // RemoteVmIpv4 returns string, set in VxlanTunnelDestinationIPModeUnicastArpSuppressionCache. + RemoteVmIpv4() string + // SetRemoteVmIpv4 assigns string provided by user to VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + SetRemoteVmIpv4(value string) VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + // HasRemoteVmIpv4 checks if RemoteVmIpv4 has been set in VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + HasRemoteVmIpv4() bool +} + +// Remote VM MAC address bound to Remote VM IPv4 address +// RemoteVmMac returns a string +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) RemoteVmMac() string { + + return *obj.obj.RemoteVmMac + +} + +// Remote VM MAC address bound to Remote VM IPv4 address +// RemoteVmMac returns a string +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) HasRemoteVmMac() bool { + return obj.obj.RemoteVmMac != nil +} + +// Remote VM MAC address bound to Remote VM IPv4 address +// SetRemoteVmMac sets the string value in the VxlanTunnelDestinationIPModeUnicastArpSuppressionCache object +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) SetRemoteVmMac(value string) VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { + + obj.obj.RemoteVmMac = &value + return obj +} + +// Remote VM IPv4 address +// RemoteVmIpv4 returns a string +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) RemoteVmIpv4() string { + + return *obj.obj.RemoteVmIpv4 + +} + +// Remote VM IPv4 address +// RemoteVmIpv4 returns a string +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) HasRemoteVmIpv4() bool { + return obj.obj.RemoteVmIpv4 != nil +} + +// Remote VM IPv4 address +// SetRemoteVmIpv4 sets the string value in the VxlanTunnelDestinationIPModeUnicastArpSuppressionCache object +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) SetRemoteVmIpv4(value string) VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { + + obj.obj.RemoteVmIpv4 = &value + return obj +} + +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RemoteVmMac != nil { + + err := obj.validateMac(obj.RemoteVmMac()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on VxlanTunnelDestinationIPModeUnicastArpSuppressionCache.RemoteVmMac")) + } + + } + + if obj.obj.RemoteVmIpv4 != nil { + + err := obj.validateIpv4(obj.RemoteVmIpv4()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on VxlanTunnelDestinationIPModeUnicastArpSuppressionCache.RemoteVmIpv4")) + } + + } + +} + +func (obj *vxlanTunnelDestinationIPModeUnicastArpSuppressionCache) setDefault() { + +} diff --git a/gosnappi/vxlan_v4_tunnel.go b/gosnappi/vxlan_v4_tunnel.go new file mode 100644 index 00000000..02c7fb24 --- /dev/null +++ b/gosnappi/vxlan_v4_tunnel.go @@ -0,0 +1,431 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** VxlanV4Tunnel ***** +type vxlanV4Tunnel struct { + validation + obj *otg.VxlanV4Tunnel + marshaller marshalVxlanV4Tunnel + unMarshaller unMarshalVxlanV4Tunnel + destinationIpModeHolder VxlanV4TunnelDestinationIPMode +} + +func NewVxlanV4Tunnel() VxlanV4Tunnel { + obj := vxlanV4Tunnel{obj: &otg.VxlanV4Tunnel{}} + obj.setDefault() + return &obj +} + +func (obj *vxlanV4Tunnel) msg() *otg.VxlanV4Tunnel { + return obj.obj +} + +func (obj *vxlanV4Tunnel) setMsg(msg *otg.VxlanV4Tunnel) VxlanV4Tunnel { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalvxlanV4Tunnel struct { + obj *vxlanV4Tunnel +} + +type marshalVxlanV4Tunnel interface { + // ToProto marshals VxlanV4Tunnel to protobuf object *otg.VxlanV4Tunnel + ToProto() (*otg.VxlanV4Tunnel, error) + // ToPbText marshals VxlanV4Tunnel to protobuf text + ToPbText() (string, error) + // ToYaml marshals VxlanV4Tunnel to YAML text + ToYaml() (string, error) + // ToJson marshals VxlanV4Tunnel to JSON text + ToJson() (string, error) +} + +type unMarshalvxlanV4Tunnel struct { + obj *vxlanV4Tunnel +} + +type unMarshalVxlanV4Tunnel interface { + // FromProto unmarshals VxlanV4Tunnel from protobuf object *otg.VxlanV4Tunnel + FromProto(msg *otg.VxlanV4Tunnel) (VxlanV4Tunnel, error) + // FromPbText unmarshals VxlanV4Tunnel from protobuf text + FromPbText(value string) error + // FromYaml unmarshals VxlanV4Tunnel from YAML text + FromYaml(value string) error + // FromJson unmarshals VxlanV4Tunnel from JSON text + FromJson(value string) error +} + +func (obj *vxlanV4Tunnel) Marshal() marshalVxlanV4Tunnel { + if obj.marshaller == nil { + obj.marshaller = &marshalvxlanV4Tunnel{obj: obj} + } + return obj.marshaller +} + +func (obj *vxlanV4Tunnel) Unmarshal() unMarshalVxlanV4Tunnel { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalvxlanV4Tunnel{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalvxlanV4Tunnel) ToProto() (*otg.VxlanV4Tunnel, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalvxlanV4Tunnel) FromProto(msg *otg.VxlanV4Tunnel) (VxlanV4Tunnel, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalvxlanV4Tunnel) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalvxlanV4Tunnel) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalvxlanV4Tunnel) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV4Tunnel) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalvxlanV4Tunnel) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV4Tunnel) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *vxlanV4Tunnel) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *vxlanV4Tunnel) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *vxlanV4Tunnel) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *vxlanV4Tunnel) Clone() (VxlanV4Tunnel, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewVxlanV4Tunnel() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *vxlanV4Tunnel) setNil() { + obj.destinationIpModeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// VxlanV4Tunnel is configuration and operational state parameters relating to IPv4 VXLAN tunnel end-point interface. +type VxlanV4Tunnel interface { + Validation + // msg marshals VxlanV4Tunnel to protobuf object *otg.VxlanV4Tunnel + // and doesn't set defaults + msg() *otg.VxlanV4Tunnel + // setMsg unmarshals VxlanV4Tunnel from protobuf object *otg.VxlanV4Tunnel + // and doesn't set defaults + setMsg(*otg.VxlanV4Tunnel) VxlanV4Tunnel + // provides marshal interface + Marshal() marshalVxlanV4Tunnel + // provides unmarshal interface + Unmarshal() unMarshalVxlanV4Tunnel + // validate validates VxlanV4Tunnel + validate() error + // A stringer function + String() string + // Clones the object + Clone() (VxlanV4Tunnel, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // SourceInterface returns string, set in VxlanV4Tunnel. + SourceInterface() string + // SetSourceInterface assigns string provided by user to VxlanV4Tunnel + SetSourceInterface(value string) VxlanV4Tunnel + // DestinationIpMode returns VxlanV4TunnelDestinationIPMode, set in VxlanV4Tunnel. + // VxlanV4TunnelDestinationIPMode is communication mode between the VTEPs, either unicast or multicast. + DestinationIpMode() VxlanV4TunnelDestinationIPMode + // SetDestinationIpMode assigns VxlanV4TunnelDestinationIPMode provided by user to VxlanV4Tunnel. + // VxlanV4TunnelDestinationIPMode is communication mode between the VTEPs, either unicast or multicast. + SetDestinationIpMode(value VxlanV4TunnelDestinationIPMode) VxlanV4Tunnel + // HasDestinationIpMode checks if DestinationIpMode has been set in VxlanV4Tunnel + HasDestinationIpMode() bool + // Vni returns uint32, set in VxlanV4Tunnel. + Vni() uint32 + // SetVni assigns uint32 provided by user to VxlanV4Tunnel + SetVni(value uint32) VxlanV4Tunnel + // Name returns string, set in VxlanV4Tunnel. + Name() string + // SetName assigns string provided by user to VxlanV4Tunnel + SetName(value string) VxlanV4Tunnel + setNil() +} + +// Determines the source interface. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv4Loopback/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv4Loopback/properties/name +// +// SourceInterface returns a string +func (obj *vxlanV4Tunnel) SourceInterface() string { + + return *obj.obj.SourceInterface + +} + +// Determines the source interface. +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv4Loopback/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv4/properties/name +// - /components/schemas/Device.Ipv4Loopback/properties/name +// +// SetSourceInterface sets the string value in the VxlanV4Tunnel object +func (obj *vxlanV4Tunnel) SetSourceInterface(value string) VxlanV4Tunnel { + + obj.obj.SourceInterface = &value + return obj +} + +// description is TBD +// DestinationIpMode returns a VxlanV4TunnelDestinationIPMode +func (obj *vxlanV4Tunnel) DestinationIpMode() VxlanV4TunnelDestinationIPMode { + if obj.obj.DestinationIpMode == nil { + obj.obj.DestinationIpMode = NewVxlanV4TunnelDestinationIPMode().msg() + } + if obj.destinationIpModeHolder == nil { + obj.destinationIpModeHolder = &vxlanV4TunnelDestinationIPMode{obj: obj.obj.DestinationIpMode} + } + return obj.destinationIpModeHolder +} + +// description is TBD +// DestinationIpMode returns a VxlanV4TunnelDestinationIPMode +func (obj *vxlanV4Tunnel) HasDestinationIpMode() bool { + return obj.obj.DestinationIpMode != nil +} + +// description is TBD +// SetDestinationIpMode sets the VxlanV4TunnelDestinationIPMode value in the VxlanV4Tunnel object +func (obj *vxlanV4Tunnel) SetDestinationIpMode(value VxlanV4TunnelDestinationIPMode) VxlanV4Tunnel { + + obj.destinationIpModeHolder = nil + obj.obj.DestinationIpMode = value.msg() + + return obj +} + +// VXLAN Network Identifier (VNI) to distinguish network instances on the wire +// Vni returns a uint32 +func (obj *vxlanV4Tunnel) Vni() uint32 { + + return *obj.obj.Vni + +} + +// VXLAN Network Identifier (VNI) to distinguish network instances on the wire +// SetVni sets the uint32 value in the VxlanV4Tunnel object +func (obj *vxlanV4Tunnel) SetVni(value uint32) VxlanV4Tunnel { + + obj.obj.Vni = &value + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *vxlanV4Tunnel) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the VxlanV4Tunnel object +func (obj *vxlanV4Tunnel) SetName(value string) VxlanV4Tunnel { + + obj.obj.Name = &value + return obj +} + +func (obj *vxlanV4Tunnel) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // SourceInterface is required + if obj.obj.SourceInterface == nil { + vObj.validationErrors = append(vObj.validationErrors, "SourceInterface is required field on interface VxlanV4Tunnel") + } + + if obj.obj.DestinationIpMode != nil { + + obj.DestinationIpMode().validateObj(vObj, set_default) + } + + // Vni is required + if obj.obj.Vni == nil { + vObj.validationErrors = append(vObj.validationErrors, "Vni is required field on interface VxlanV4Tunnel") + } + if obj.obj.Vni != nil { + + if *obj.obj.Vni < 1 || *obj.obj.Vni > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= VxlanV4Tunnel.Vni <= 16777215 but Got %d", *obj.obj.Vni)) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface VxlanV4Tunnel") + } +} + +func (obj *vxlanV4Tunnel) setDefault() { + +} diff --git a/gosnappi/vxlan_v4_tunnel_destination_ip_mode.go b/gosnappi/vxlan_v4_tunnel_destination_ip_mode.go new file mode 100644 index 00000000..adff9c96 --- /dev/null +++ b/gosnappi/vxlan_v4_tunnel_destination_ip_mode.go @@ -0,0 +1,452 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** VxlanV4TunnelDestinationIPMode ***** +type vxlanV4TunnelDestinationIPMode struct { + validation + obj *otg.VxlanV4TunnelDestinationIPMode + marshaller marshalVxlanV4TunnelDestinationIPMode + unMarshaller unMarshalVxlanV4TunnelDestinationIPMode + unicastHolder VxlanV4TunnelDestinationIPModeUnicast + multicastHolder VxlanV4TunnelDestinationIPModeMulticast +} + +func NewVxlanV4TunnelDestinationIPMode() VxlanV4TunnelDestinationIPMode { + obj := vxlanV4TunnelDestinationIPMode{obj: &otg.VxlanV4TunnelDestinationIPMode{}} + obj.setDefault() + return &obj +} + +func (obj *vxlanV4TunnelDestinationIPMode) msg() *otg.VxlanV4TunnelDestinationIPMode { + return obj.obj +} + +func (obj *vxlanV4TunnelDestinationIPMode) setMsg(msg *otg.VxlanV4TunnelDestinationIPMode) VxlanV4TunnelDestinationIPMode { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalvxlanV4TunnelDestinationIPMode struct { + obj *vxlanV4TunnelDestinationIPMode +} + +type marshalVxlanV4TunnelDestinationIPMode interface { + // ToProto marshals VxlanV4TunnelDestinationIPMode to protobuf object *otg.VxlanV4TunnelDestinationIPMode + ToProto() (*otg.VxlanV4TunnelDestinationIPMode, error) + // ToPbText marshals VxlanV4TunnelDestinationIPMode to protobuf text + ToPbText() (string, error) + // ToYaml marshals VxlanV4TunnelDestinationIPMode to YAML text + ToYaml() (string, error) + // ToJson marshals VxlanV4TunnelDestinationIPMode to JSON text + ToJson() (string, error) +} + +type unMarshalvxlanV4TunnelDestinationIPMode struct { + obj *vxlanV4TunnelDestinationIPMode +} + +type unMarshalVxlanV4TunnelDestinationIPMode interface { + // FromProto unmarshals VxlanV4TunnelDestinationIPMode from protobuf object *otg.VxlanV4TunnelDestinationIPMode + FromProto(msg *otg.VxlanV4TunnelDestinationIPMode) (VxlanV4TunnelDestinationIPMode, error) + // FromPbText unmarshals VxlanV4TunnelDestinationIPMode from protobuf text + FromPbText(value string) error + // FromYaml unmarshals VxlanV4TunnelDestinationIPMode from YAML text + FromYaml(value string) error + // FromJson unmarshals VxlanV4TunnelDestinationIPMode from JSON text + FromJson(value string) error +} + +func (obj *vxlanV4TunnelDestinationIPMode) Marshal() marshalVxlanV4TunnelDestinationIPMode { + if obj.marshaller == nil { + obj.marshaller = &marshalvxlanV4TunnelDestinationIPMode{obj: obj} + } + return obj.marshaller +} + +func (obj *vxlanV4TunnelDestinationIPMode) Unmarshal() unMarshalVxlanV4TunnelDestinationIPMode { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalvxlanV4TunnelDestinationIPMode{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalvxlanV4TunnelDestinationIPMode) ToProto() (*otg.VxlanV4TunnelDestinationIPMode, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPMode) FromProto(msg *otg.VxlanV4TunnelDestinationIPMode) (VxlanV4TunnelDestinationIPMode, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalvxlanV4TunnelDestinationIPMode) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPMode) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalvxlanV4TunnelDestinationIPMode) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPMode) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalvxlanV4TunnelDestinationIPMode) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPMode) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *vxlanV4TunnelDestinationIPMode) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *vxlanV4TunnelDestinationIPMode) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *vxlanV4TunnelDestinationIPMode) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *vxlanV4TunnelDestinationIPMode) Clone() (VxlanV4TunnelDestinationIPMode, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewVxlanV4TunnelDestinationIPMode() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *vxlanV4TunnelDestinationIPMode) setNil() { + obj.unicastHolder = nil + obj.multicastHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// VxlanV4TunnelDestinationIPMode is communication mode between the VTEPs, either unicast or multicast. +type VxlanV4TunnelDestinationIPMode interface { + Validation + // msg marshals VxlanV4TunnelDestinationIPMode to protobuf object *otg.VxlanV4TunnelDestinationIPMode + // and doesn't set defaults + msg() *otg.VxlanV4TunnelDestinationIPMode + // setMsg unmarshals VxlanV4TunnelDestinationIPMode from protobuf object *otg.VxlanV4TunnelDestinationIPMode + // and doesn't set defaults + setMsg(*otg.VxlanV4TunnelDestinationIPMode) VxlanV4TunnelDestinationIPMode + // provides marshal interface + Marshal() marshalVxlanV4TunnelDestinationIPMode + // provides unmarshal interface + Unmarshal() unMarshalVxlanV4TunnelDestinationIPMode + // validate validates VxlanV4TunnelDestinationIPMode + validate() error + // A stringer function + String() string + // Clones the object + Clone() (VxlanV4TunnelDestinationIPMode, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns VxlanV4TunnelDestinationIPModeChoiceEnum, set in VxlanV4TunnelDestinationIPMode + Choice() VxlanV4TunnelDestinationIPModeChoiceEnum + // setChoice assigns VxlanV4TunnelDestinationIPModeChoiceEnum provided by user to VxlanV4TunnelDestinationIPMode + setChoice(value VxlanV4TunnelDestinationIPModeChoiceEnum) VxlanV4TunnelDestinationIPMode + // HasChoice checks if Choice has been set in VxlanV4TunnelDestinationIPMode + HasChoice() bool + // Unicast returns VxlanV4TunnelDestinationIPModeUnicast, set in VxlanV4TunnelDestinationIPMode. + // VxlanV4TunnelDestinationIPModeUnicast is description is TBD + Unicast() VxlanV4TunnelDestinationIPModeUnicast + // SetUnicast assigns VxlanV4TunnelDestinationIPModeUnicast provided by user to VxlanV4TunnelDestinationIPMode. + // VxlanV4TunnelDestinationIPModeUnicast is description is TBD + SetUnicast(value VxlanV4TunnelDestinationIPModeUnicast) VxlanV4TunnelDestinationIPMode + // HasUnicast checks if Unicast has been set in VxlanV4TunnelDestinationIPMode + HasUnicast() bool + // Multicast returns VxlanV4TunnelDestinationIPModeMulticast, set in VxlanV4TunnelDestinationIPMode. + // VxlanV4TunnelDestinationIPModeMulticast is multicast Group address for member VNI(VXLAN Network Identifier) + Multicast() VxlanV4TunnelDestinationIPModeMulticast + // SetMulticast assigns VxlanV4TunnelDestinationIPModeMulticast provided by user to VxlanV4TunnelDestinationIPMode. + // VxlanV4TunnelDestinationIPModeMulticast is multicast Group address for member VNI(VXLAN Network Identifier) + SetMulticast(value VxlanV4TunnelDestinationIPModeMulticast) VxlanV4TunnelDestinationIPMode + // HasMulticast checks if Multicast has been set in VxlanV4TunnelDestinationIPMode + HasMulticast() bool + setNil() +} + +type VxlanV4TunnelDestinationIPModeChoiceEnum string + +// Enum of Choice on VxlanV4TunnelDestinationIPMode +var VxlanV4TunnelDestinationIPModeChoice = struct { + UNICAST VxlanV4TunnelDestinationIPModeChoiceEnum + MULTICAST VxlanV4TunnelDestinationIPModeChoiceEnum +}{ + UNICAST: VxlanV4TunnelDestinationIPModeChoiceEnum("unicast"), + MULTICAST: VxlanV4TunnelDestinationIPModeChoiceEnum("multicast"), +} + +func (obj *vxlanV4TunnelDestinationIPMode) Choice() VxlanV4TunnelDestinationIPModeChoiceEnum { + return VxlanV4TunnelDestinationIPModeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// unicast or multicast +// Choice returns a string +func (obj *vxlanV4TunnelDestinationIPMode) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *vxlanV4TunnelDestinationIPMode) setChoice(value VxlanV4TunnelDestinationIPModeChoiceEnum) VxlanV4TunnelDestinationIPMode { + intValue, ok := otg.VxlanV4TunnelDestinationIPMode_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on VxlanV4TunnelDestinationIPModeChoiceEnum", string(value))) + return obj + } + enumValue := otg.VxlanV4TunnelDestinationIPMode_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Multicast = nil + obj.multicastHolder = nil + obj.obj.Unicast = nil + obj.unicastHolder = nil + + if value == VxlanV4TunnelDestinationIPModeChoice.UNICAST { + obj.obj.Unicast = NewVxlanV4TunnelDestinationIPModeUnicast().msg() + } + + if value == VxlanV4TunnelDestinationIPModeChoice.MULTICAST { + obj.obj.Multicast = NewVxlanV4TunnelDestinationIPModeMulticast().msg() + } + + return obj +} + +// description is TBD +// Unicast returns a VxlanV4TunnelDestinationIPModeUnicast +func (obj *vxlanV4TunnelDestinationIPMode) Unicast() VxlanV4TunnelDestinationIPModeUnicast { + if obj.obj.Unicast == nil { + obj.setChoice(VxlanV4TunnelDestinationIPModeChoice.UNICAST) + } + if obj.unicastHolder == nil { + obj.unicastHolder = &vxlanV4TunnelDestinationIPModeUnicast{obj: obj.obj.Unicast} + } + return obj.unicastHolder +} + +// description is TBD +// Unicast returns a VxlanV4TunnelDestinationIPModeUnicast +func (obj *vxlanV4TunnelDestinationIPMode) HasUnicast() bool { + return obj.obj.Unicast != nil +} + +// description is TBD +// SetUnicast sets the VxlanV4TunnelDestinationIPModeUnicast value in the VxlanV4TunnelDestinationIPMode object +func (obj *vxlanV4TunnelDestinationIPMode) SetUnicast(value VxlanV4TunnelDestinationIPModeUnicast) VxlanV4TunnelDestinationIPMode { + obj.setChoice(VxlanV4TunnelDestinationIPModeChoice.UNICAST) + obj.unicastHolder = nil + obj.obj.Unicast = value.msg() + + return obj +} + +// description is TBD +// Multicast returns a VxlanV4TunnelDestinationIPModeMulticast +func (obj *vxlanV4TunnelDestinationIPMode) Multicast() VxlanV4TunnelDestinationIPModeMulticast { + if obj.obj.Multicast == nil { + obj.setChoice(VxlanV4TunnelDestinationIPModeChoice.MULTICAST) + } + if obj.multicastHolder == nil { + obj.multicastHolder = &vxlanV4TunnelDestinationIPModeMulticast{obj: obj.obj.Multicast} + } + return obj.multicastHolder +} + +// description is TBD +// Multicast returns a VxlanV4TunnelDestinationIPModeMulticast +func (obj *vxlanV4TunnelDestinationIPMode) HasMulticast() bool { + return obj.obj.Multicast != nil +} + +// description is TBD +// SetMulticast sets the VxlanV4TunnelDestinationIPModeMulticast value in the VxlanV4TunnelDestinationIPMode object +func (obj *vxlanV4TunnelDestinationIPMode) SetMulticast(value VxlanV4TunnelDestinationIPModeMulticast) VxlanV4TunnelDestinationIPMode { + obj.setChoice(VxlanV4TunnelDestinationIPModeChoice.MULTICAST) + obj.multicastHolder = nil + obj.obj.Multicast = value.msg() + + return obj +} + +func (obj *vxlanV4TunnelDestinationIPMode) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Unicast != nil { + + obj.Unicast().validateObj(vObj, set_default) + } + + if obj.obj.Multicast != nil { + + obj.Multicast().validateObj(vObj, set_default) + } + +} + +func (obj *vxlanV4TunnelDestinationIPMode) setDefault() { + var choices_set int = 0 + var choice VxlanV4TunnelDestinationIPModeChoiceEnum + + if obj.obj.Unicast != nil { + choices_set += 1 + choice = VxlanV4TunnelDestinationIPModeChoice.UNICAST + } + + if obj.obj.Multicast != nil { + choices_set += 1 + choice = VxlanV4TunnelDestinationIPModeChoice.MULTICAST + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(VxlanV4TunnelDestinationIPModeChoice.MULTICAST) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in VxlanV4TunnelDestinationIPMode") + } + } else { + intVal := otg.VxlanV4TunnelDestinationIPMode_Choice_Enum_value[string(choice)] + enumValue := otg.VxlanV4TunnelDestinationIPMode_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/vxlan_v4_tunnel_destination_ip_mode_multicast.go b/gosnappi/vxlan_v4_tunnel_destination_ip_mode_multicast.go new file mode 100644 index 00000000..f69ad643 --- /dev/null +++ b/gosnappi/vxlan_v4_tunnel_destination_ip_mode_multicast.go @@ -0,0 +1,315 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** VxlanV4TunnelDestinationIPModeMulticast ***** +type vxlanV4TunnelDestinationIPModeMulticast struct { + validation + obj *otg.VxlanV4TunnelDestinationIPModeMulticast + marshaller marshalVxlanV4TunnelDestinationIPModeMulticast + unMarshaller unMarshalVxlanV4TunnelDestinationIPModeMulticast +} + +func NewVxlanV4TunnelDestinationIPModeMulticast() VxlanV4TunnelDestinationIPModeMulticast { + obj := vxlanV4TunnelDestinationIPModeMulticast{obj: &otg.VxlanV4TunnelDestinationIPModeMulticast{}} + obj.setDefault() + return &obj +} + +func (obj *vxlanV4TunnelDestinationIPModeMulticast) msg() *otg.VxlanV4TunnelDestinationIPModeMulticast { + return obj.obj +} + +func (obj *vxlanV4TunnelDestinationIPModeMulticast) setMsg(msg *otg.VxlanV4TunnelDestinationIPModeMulticast) VxlanV4TunnelDestinationIPModeMulticast { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalvxlanV4TunnelDestinationIPModeMulticast struct { + obj *vxlanV4TunnelDestinationIPModeMulticast +} + +type marshalVxlanV4TunnelDestinationIPModeMulticast interface { + // ToProto marshals VxlanV4TunnelDestinationIPModeMulticast to protobuf object *otg.VxlanV4TunnelDestinationIPModeMulticast + ToProto() (*otg.VxlanV4TunnelDestinationIPModeMulticast, error) + // ToPbText marshals VxlanV4TunnelDestinationIPModeMulticast to protobuf text + ToPbText() (string, error) + // ToYaml marshals VxlanV4TunnelDestinationIPModeMulticast to YAML text + ToYaml() (string, error) + // ToJson marshals VxlanV4TunnelDestinationIPModeMulticast to JSON text + ToJson() (string, error) +} + +type unMarshalvxlanV4TunnelDestinationIPModeMulticast struct { + obj *vxlanV4TunnelDestinationIPModeMulticast +} + +type unMarshalVxlanV4TunnelDestinationIPModeMulticast interface { + // FromProto unmarshals VxlanV4TunnelDestinationIPModeMulticast from protobuf object *otg.VxlanV4TunnelDestinationIPModeMulticast + FromProto(msg *otg.VxlanV4TunnelDestinationIPModeMulticast) (VxlanV4TunnelDestinationIPModeMulticast, error) + // FromPbText unmarshals VxlanV4TunnelDestinationIPModeMulticast from protobuf text + FromPbText(value string) error + // FromYaml unmarshals VxlanV4TunnelDestinationIPModeMulticast from YAML text + FromYaml(value string) error + // FromJson unmarshals VxlanV4TunnelDestinationIPModeMulticast from JSON text + FromJson(value string) error +} + +func (obj *vxlanV4TunnelDestinationIPModeMulticast) Marshal() marshalVxlanV4TunnelDestinationIPModeMulticast { + if obj.marshaller == nil { + obj.marshaller = &marshalvxlanV4TunnelDestinationIPModeMulticast{obj: obj} + } + return obj.marshaller +} + +func (obj *vxlanV4TunnelDestinationIPModeMulticast) Unmarshal() unMarshalVxlanV4TunnelDestinationIPModeMulticast { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalvxlanV4TunnelDestinationIPModeMulticast{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalvxlanV4TunnelDestinationIPModeMulticast) ToProto() (*otg.VxlanV4TunnelDestinationIPModeMulticast, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPModeMulticast) FromProto(msg *otg.VxlanV4TunnelDestinationIPModeMulticast) (VxlanV4TunnelDestinationIPModeMulticast, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalvxlanV4TunnelDestinationIPModeMulticast) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPModeMulticast) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalvxlanV4TunnelDestinationIPModeMulticast) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPModeMulticast) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalvxlanV4TunnelDestinationIPModeMulticast) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPModeMulticast) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *vxlanV4TunnelDestinationIPModeMulticast) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *vxlanV4TunnelDestinationIPModeMulticast) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *vxlanV4TunnelDestinationIPModeMulticast) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *vxlanV4TunnelDestinationIPModeMulticast) Clone() (VxlanV4TunnelDestinationIPModeMulticast, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewVxlanV4TunnelDestinationIPModeMulticast() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// VxlanV4TunnelDestinationIPModeMulticast is multicast Group address for member VNI(VXLAN Network Identifier) +type VxlanV4TunnelDestinationIPModeMulticast interface { + Validation + // msg marshals VxlanV4TunnelDestinationIPModeMulticast to protobuf object *otg.VxlanV4TunnelDestinationIPModeMulticast + // and doesn't set defaults + msg() *otg.VxlanV4TunnelDestinationIPModeMulticast + // setMsg unmarshals VxlanV4TunnelDestinationIPModeMulticast from protobuf object *otg.VxlanV4TunnelDestinationIPModeMulticast + // and doesn't set defaults + setMsg(*otg.VxlanV4TunnelDestinationIPModeMulticast) VxlanV4TunnelDestinationIPModeMulticast + // provides marshal interface + Marshal() marshalVxlanV4TunnelDestinationIPModeMulticast + // provides unmarshal interface + Unmarshal() unMarshalVxlanV4TunnelDestinationIPModeMulticast + // validate validates VxlanV4TunnelDestinationIPModeMulticast + validate() error + // A stringer function + String() string + // Clones the object + Clone() (VxlanV4TunnelDestinationIPModeMulticast, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Address returns string, set in VxlanV4TunnelDestinationIPModeMulticast. + Address() string + // SetAddress assigns string provided by user to VxlanV4TunnelDestinationIPModeMulticast + SetAddress(value string) VxlanV4TunnelDestinationIPModeMulticast + // HasAddress checks if Address has been set in VxlanV4TunnelDestinationIPModeMulticast + HasAddress() bool +} + +// IPv4 Multicast address +// Address returns a string +func (obj *vxlanV4TunnelDestinationIPModeMulticast) Address() string { + + return *obj.obj.Address + +} + +// IPv4 Multicast address +// Address returns a string +func (obj *vxlanV4TunnelDestinationIPModeMulticast) HasAddress() bool { + return obj.obj.Address != nil +} + +// IPv4 Multicast address +// SetAddress sets the string value in the VxlanV4TunnelDestinationIPModeMulticast object +func (obj *vxlanV4TunnelDestinationIPModeMulticast) SetAddress(value string) VxlanV4TunnelDestinationIPModeMulticast { + + obj.obj.Address = &value + return obj +} + +func (obj *vxlanV4TunnelDestinationIPModeMulticast) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Address != nil { + + err := obj.validateIpv4(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on VxlanV4TunnelDestinationIPModeMulticast.Address")) + } + + } + +} + +func (obj *vxlanV4TunnelDestinationIPModeMulticast) setDefault() { + +} diff --git a/gosnappi/vxlan_v4_tunnel_destination_ip_mode_unicast.go b/gosnappi/vxlan_v4_tunnel_destination_ip_mode_unicast.go new file mode 100644 index 00000000..5495818d --- /dev/null +++ b/gosnappi/vxlan_v4_tunnel_destination_ip_mode_unicast.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** VxlanV4TunnelDestinationIPModeUnicast ***** +type vxlanV4TunnelDestinationIPModeUnicast struct { + validation + obj *otg.VxlanV4TunnelDestinationIPModeUnicast + marshaller marshalVxlanV4TunnelDestinationIPModeUnicast + unMarshaller unMarshalVxlanV4TunnelDestinationIPModeUnicast + vtepsHolder VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter +} + +func NewVxlanV4TunnelDestinationIPModeUnicast() VxlanV4TunnelDestinationIPModeUnicast { + obj := vxlanV4TunnelDestinationIPModeUnicast{obj: &otg.VxlanV4TunnelDestinationIPModeUnicast{}} + obj.setDefault() + return &obj +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicast) msg() *otg.VxlanV4TunnelDestinationIPModeUnicast { + return obj.obj +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicast) setMsg(msg *otg.VxlanV4TunnelDestinationIPModeUnicast) VxlanV4TunnelDestinationIPModeUnicast { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalvxlanV4TunnelDestinationIPModeUnicast struct { + obj *vxlanV4TunnelDestinationIPModeUnicast +} + +type marshalVxlanV4TunnelDestinationIPModeUnicast interface { + // ToProto marshals VxlanV4TunnelDestinationIPModeUnicast to protobuf object *otg.VxlanV4TunnelDestinationIPModeUnicast + ToProto() (*otg.VxlanV4TunnelDestinationIPModeUnicast, error) + // ToPbText marshals VxlanV4TunnelDestinationIPModeUnicast to protobuf text + ToPbText() (string, error) + // ToYaml marshals VxlanV4TunnelDestinationIPModeUnicast to YAML text + ToYaml() (string, error) + // ToJson marshals VxlanV4TunnelDestinationIPModeUnicast to JSON text + ToJson() (string, error) +} + +type unMarshalvxlanV4TunnelDestinationIPModeUnicast struct { + obj *vxlanV4TunnelDestinationIPModeUnicast +} + +type unMarshalVxlanV4TunnelDestinationIPModeUnicast interface { + // FromProto unmarshals VxlanV4TunnelDestinationIPModeUnicast from protobuf object *otg.VxlanV4TunnelDestinationIPModeUnicast + FromProto(msg *otg.VxlanV4TunnelDestinationIPModeUnicast) (VxlanV4TunnelDestinationIPModeUnicast, error) + // FromPbText unmarshals VxlanV4TunnelDestinationIPModeUnicast from protobuf text + FromPbText(value string) error + // FromYaml unmarshals VxlanV4TunnelDestinationIPModeUnicast from YAML text + FromYaml(value string) error + // FromJson unmarshals VxlanV4TunnelDestinationIPModeUnicast from JSON text + FromJson(value string) error +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicast) Marshal() marshalVxlanV4TunnelDestinationIPModeUnicast { + if obj.marshaller == nil { + obj.marshaller = &marshalvxlanV4TunnelDestinationIPModeUnicast{obj: obj} + } + return obj.marshaller +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicast) Unmarshal() unMarshalVxlanV4TunnelDestinationIPModeUnicast { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalvxlanV4TunnelDestinationIPModeUnicast{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalvxlanV4TunnelDestinationIPModeUnicast) ToProto() (*otg.VxlanV4TunnelDestinationIPModeUnicast, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPModeUnicast) FromProto(msg *otg.VxlanV4TunnelDestinationIPModeUnicast) (VxlanV4TunnelDestinationIPModeUnicast, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalvxlanV4TunnelDestinationIPModeUnicast) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPModeUnicast) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalvxlanV4TunnelDestinationIPModeUnicast) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPModeUnicast) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalvxlanV4TunnelDestinationIPModeUnicast) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPModeUnicast) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicast) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicast) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicast) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicast) Clone() (VxlanV4TunnelDestinationIPModeUnicast, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewVxlanV4TunnelDestinationIPModeUnicast() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicast) setNil() { + obj.vtepsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// VxlanV4TunnelDestinationIPModeUnicast is description is TBD +type VxlanV4TunnelDestinationIPModeUnicast interface { + Validation + // msg marshals VxlanV4TunnelDestinationIPModeUnicast to protobuf object *otg.VxlanV4TunnelDestinationIPModeUnicast + // and doesn't set defaults + msg() *otg.VxlanV4TunnelDestinationIPModeUnicast + // setMsg unmarshals VxlanV4TunnelDestinationIPModeUnicast from protobuf object *otg.VxlanV4TunnelDestinationIPModeUnicast + // and doesn't set defaults + setMsg(*otg.VxlanV4TunnelDestinationIPModeUnicast) VxlanV4TunnelDestinationIPModeUnicast + // provides marshal interface + Marshal() marshalVxlanV4TunnelDestinationIPModeUnicast + // provides unmarshal interface + Unmarshal() unMarshalVxlanV4TunnelDestinationIPModeUnicast + // validate validates VxlanV4TunnelDestinationIPModeUnicast + validate() error + // A stringer function + String() string + // Clones the object + Clone() (VxlanV4TunnelDestinationIPModeUnicast, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Vteps returns VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIterIter, set in VxlanV4TunnelDestinationIPModeUnicast + Vteps() VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter + setNil() +} + +// List of VTEPs for member VNI(VXLAN Network Identifier) +// Vteps returns a []VxlanV4TunnelDestinationIPModeUnicastVtep +func (obj *vxlanV4TunnelDestinationIPModeUnicast) Vteps() VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter { + if len(obj.obj.Vteps) == 0 { + obj.obj.Vteps = []*otg.VxlanV4TunnelDestinationIPModeUnicastVtep{} + } + if obj.vtepsHolder == nil { + obj.vtepsHolder = newVxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter(&obj.obj.Vteps).setMsg(obj) + } + return obj.vtepsHolder +} + +type vxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter struct { + obj *vxlanV4TunnelDestinationIPModeUnicast + vxlanV4TunnelDestinationIPModeUnicastVtepSlice []VxlanV4TunnelDestinationIPModeUnicastVtep + fieldPtr *[]*otg.VxlanV4TunnelDestinationIPModeUnicastVtep +} + +func newVxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter(ptr *[]*otg.VxlanV4TunnelDestinationIPModeUnicastVtep) VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter { + return &vxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter{fieldPtr: ptr} +} + +type VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter interface { + setMsg(*vxlanV4TunnelDestinationIPModeUnicast) VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter + Items() []VxlanV4TunnelDestinationIPModeUnicastVtep + Add() VxlanV4TunnelDestinationIPModeUnicastVtep + Append(items ...VxlanV4TunnelDestinationIPModeUnicastVtep) VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter + Set(index int, newObj VxlanV4TunnelDestinationIPModeUnicastVtep) VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter + Clear() VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter + clearHolderSlice() VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter + appendHolderSlice(item VxlanV4TunnelDestinationIPModeUnicastVtep) VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter) setMsg(msg *vxlanV4TunnelDestinationIPModeUnicast) VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&vxlanV4TunnelDestinationIPModeUnicastVtep{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter) Items() []VxlanV4TunnelDestinationIPModeUnicastVtep { + return obj.vxlanV4TunnelDestinationIPModeUnicastVtepSlice +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter) Add() VxlanV4TunnelDestinationIPModeUnicastVtep { + newObj := &otg.VxlanV4TunnelDestinationIPModeUnicastVtep{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &vxlanV4TunnelDestinationIPModeUnicastVtep{obj: newObj} + newLibObj.setDefault() + obj.vxlanV4TunnelDestinationIPModeUnicastVtepSlice = append(obj.vxlanV4TunnelDestinationIPModeUnicastVtepSlice, newLibObj) + return newLibObj +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter) Append(items ...VxlanV4TunnelDestinationIPModeUnicastVtep) VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.vxlanV4TunnelDestinationIPModeUnicastVtepSlice = append(obj.vxlanV4TunnelDestinationIPModeUnicastVtepSlice, item) + } + return obj +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter) Set(index int, newObj VxlanV4TunnelDestinationIPModeUnicastVtep) VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.vxlanV4TunnelDestinationIPModeUnicastVtepSlice[index] = newObj + return obj +} +func (obj *vxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter) Clear() VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.VxlanV4TunnelDestinationIPModeUnicastVtep{} + obj.vxlanV4TunnelDestinationIPModeUnicastVtepSlice = []VxlanV4TunnelDestinationIPModeUnicastVtep{} + } + return obj +} +func (obj *vxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter) clearHolderSlice() VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter { + if len(obj.vxlanV4TunnelDestinationIPModeUnicastVtepSlice) > 0 { + obj.vxlanV4TunnelDestinationIPModeUnicastVtepSlice = []VxlanV4TunnelDestinationIPModeUnicastVtep{} + } + return obj +} +func (obj *vxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter) appendHolderSlice(item VxlanV4TunnelDestinationIPModeUnicastVtep) VxlanV4TunnelDestinationIPModeUnicastVxlanV4TunnelDestinationIPModeUnicastVtepIter { + obj.vxlanV4TunnelDestinationIPModeUnicastVtepSlice = append(obj.vxlanV4TunnelDestinationIPModeUnicastVtepSlice, item) + return obj +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicast) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Vteps) != 0 { + + if set_default { + obj.Vteps().clearHolderSlice() + for _, item := range obj.obj.Vteps { + obj.Vteps().appendHolderSlice(&vxlanV4TunnelDestinationIPModeUnicastVtep{obj: item}) + } + } + for _, item := range obj.Vteps().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicast) setDefault() { + +} diff --git a/gosnappi/vxlan_v4_tunnel_destination_ip_mode_unicast_vtep.go b/gosnappi/vxlan_v4_tunnel_destination_ip_mode_unicast_vtep.go new file mode 100644 index 00000000..53f0be11 --- /dev/null +++ b/gosnappi/vxlan_v4_tunnel_destination_ip_mode_unicast_vtep.go @@ -0,0 +1,427 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** VxlanV4TunnelDestinationIPModeUnicastVtep ***** +type vxlanV4TunnelDestinationIPModeUnicastVtep struct { + validation + obj *otg.VxlanV4TunnelDestinationIPModeUnicastVtep + marshaller marshalVxlanV4TunnelDestinationIPModeUnicastVtep + unMarshaller unMarshalVxlanV4TunnelDestinationIPModeUnicastVtep + arpSuppressionCacheHolder VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter +} + +func NewVxlanV4TunnelDestinationIPModeUnicastVtep() VxlanV4TunnelDestinationIPModeUnicastVtep { + obj := vxlanV4TunnelDestinationIPModeUnicastVtep{obj: &otg.VxlanV4TunnelDestinationIPModeUnicastVtep{}} + obj.setDefault() + return &obj +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) msg() *otg.VxlanV4TunnelDestinationIPModeUnicastVtep { + return obj.obj +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) setMsg(msg *otg.VxlanV4TunnelDestinationIPModeUnicastVtep) VxlanV4TunnelDestinationIPModeUnicastVtep { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalvxlanV4TunnelDestinationIPModeUnicastVtep struct { + obj *vxlanV4TunnelDestinationIPModeUnicastVtep +} + +type marshalVxlanV4TunnelDestinationIPModeUnicastVtep interface { + // ToProto marshals VxlanV4TunnelDestinationIPModeUnicastVtep to protobuf object *otg.VxlanV4TunnelDestinationIPModeUnicastVtep + ToProto() (*otg.VxlanV4TunnelDestinationIPModeUnicastVtep, error) + // ToPbText marshals VxlanV4TunnelDestinationIPModeUnicastVtep to protobuf text + ToPbText() (string, error) + // ToYaml marshals VxlanV4TunnelDestinationIPModeUnicastVtep to YAML text + ToYaml() (string, error) + // ToJson marshals VxlanV4TunnelDestinationIPModeUnicastVtep to JSON text + ToJson() (string, error) +} + +type unMarshalvxlanV4TunnelDestinationIPModeUnicastVtep struct { + obj *vxlanV4TunnelDestinationIPModeUnicastVtep +} + +type unMarshalVxlanV4TunnelDestinationIPModeUnicastVtep interface { + // FromProto unmarshals VxlanV4TunnelDestinationIPModeUnicastVtep from protobuf object *otg.VxlanV4TunnelDestinationIPModeUnicastVtep + FromProto(msg *otg.VxlanV4TunnelDestinationIPModeUnicastVtep) (VxlanV4TunnelDestinationIPModeUnicastVtep, error) + // FromPbText unmarshals VxlanV4TunnelDestinationIPModeUnicastVtep from protobuf text + FromPbText(value string) error + // FromYaml unmarshals VxlanV4TunnelDestinationIPModeUnicastVtep from YAML text + FromYaml(value string) error + // FromJson unmarshals VxlanV4TunnelDestinationIPModeUnicastVtep from JSON text + FromJson(value string) error +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) Marshal() marshalVxlanV4TunnelDestinationIPModeUnicastVtep { + if obj.marshaller == nil { + obj.marshaller = &marshalvxlanV4TunnelDestinationIPModeUnicastVtep{obj: obj} + } + return obj.marshaller +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) Unmarshal() unMarshalVxlanV4TunnelDestinationIPModeUnicastVtep { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalvxlanV4TunnelDestinationIPModeUnicastVtep{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalvxlanV4TunnelDestinationIPModeUnicastVtep) ToProto() (*otg.VxlanV4TunnelDestinationIPModeUnicastVtep, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPModeUnicastVtep) FromProto(msg *otg.VxlanV4TunnelDestinationIPModeUnicastVtep) (VxlanV4TunnelDestinationIPModeUnicastVtep, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalvxlanV4TunnelDestinationIPModeUnicastVtep) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPModeUnicastVtep) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalvxlanV4TunnelDestinationIPModeUnicastVtep) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPModeUnicastVtep) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalvxlanV4TunnelDestinationIPModeUnicastVtep) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV4TunnelDestinationIPModeUnicastVtep) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) Clone() (VxlanV4TunnelDestinationIPModeUnicastVtep, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewVxlanV4TunnelDestinationIPModeUnicastVtep() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) setNil() { + obj.arpSuppressionCacheHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// VxlanV4TunnelDestinationIPModeUnicastVtep is vTEP (VXLAN Tunnel End Point (VTEP)) parameters +type VxlanV4TunnelDestinationIPModeUnicastVtep interface { + Validation + // msg marshals VxlanV4TunnelDestinationIPModeUnicastVtep to protobuf object *otg.VxlanV4TunnelDestinationIPModeUnicastVtep + // and doesn't set defaults + msg() *otg.VxlanV4TunnelDestinationIPModeUnicastVtep + // setMsg unmarshals VxlanV4TunnelDestinationIPModeUnicastVtep from protobuf object *otg.VxlanV4TunnelDestinationIPModeUnicastVtep + // and doesn't set defaults + setMsg(*otg.VxlanV4TunnelDestinationIPModeUnicastVtep) VxlanV4TunnelDestinationIPModeUnicastVtep + // provides marshal interface + Marshal() marshalVxlanV4TunnelDestinationIPModeUnicastVtep + // provides unmarshal interface + Unmarshal() unMarshalVxlanV4TunnelDestinationIPModeUnicastVtep + // validate validates VxlanV4TunnelDestinationIPModeUnicastVtep + validate() error + // A stringer function + String() string + // Clones the object + Clone() (VxlanV4TunnelDestinationIPModeUnicastVtep, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RemoteVtepAddress returns string, set in VxlanV4TunnelDestinationIPModeUnicastVtep. + RemoteVtepAddress() string + // SetRemoteVtepAddress assigns string provided by user to VxlanV4TunnelDestinationIPModeUnicastVtep + SetRemoteVtepAddress(value string) VxlanV4TunnelDestinationIPModeUnicastVtep + // HasRemoteVtepAddress checks if RemoteVtepAddress has been set in VxlanV4TunnelDestinationIPModeUnicastVtep + HasRemoteVtepAddress() bool + // ArpSuppressionCache returns VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIterIter, set in VxlanV4TunnelDestinationIPModeUnicastVtep + ArpSuppressionCache() VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter + setNil() +} + +// Remote VXLAN Tunnel End Point address +// RemoteVtepAddress returns a string +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) RemoteVtepAddress() string { + + return *obj.obj.RemoteVtepAddress + +} + +// Remote VXLAN Tunnel End Point address +// RemoteVtepAddress returns a string +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) HasRemoteVtepAddress() bool { + return obj.obj.RemoteVtepAddress != nil +} + +// Remote VXLAN Tunnel End Point address +// SetRemoteVtepAddress sets the string value in the VxlanV4TunnelDestinationIPModeUnicastVtep object +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) SetRemoteVtepAddress(value string) VxlanV4TunnelDestinationIPModeUnicastVtep { + + obj.obj.RemoteVtepAddress = &value + return obj +} + +// Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request for another end-host IP address, its local VTEP intercepts the ARP request and checks for the ARP-resolved IP address in its ARP suppression cache table. If it finds a match, the local VTEP sends an ARP response on behalf of the remote end host. +// ArpSuppressionCache returns a []VxlanTunnelDestinationIPModeUnicastArpSuppressionCache +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) ArpSuppressionCache() VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + if len(obj.obj.ArpSuppressionCache) == 0 { + obj.obj.ArpSuppressionCache = []*otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache{} + } + if obj.arpSuppressionCacheHolder == nil { + obj.arpSuppressionCacheHolder = newVxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter(&obj.obj.ArpSuppressionCache).setMsg(obj) + } + return obj.arpSuppressionCacheHolder +} + +type vxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter struct { + obj *vxlanV4TunnelDestinationIPModeUnicastVtep + vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice []VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + fieldPtr *[]*otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache +} + +func newVxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter(ptr *[]*otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + return &vxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter{fieldPtr: ptr} +} + +type VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter interface { + setMsg(*vxlanV4TunnelDestinationIPModeUnicastVtep) VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter + Items() []VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + Add() VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + Append(items ...VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter + Set(index int, newObj VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter + Clear() VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter + clearHolderSlice() VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter + appendHolderSlice(item VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) setMsg(msg *vxlanV4TunnelDestinationIPModeUnicastVtep) VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&vxlanTunnelDestinationIPModeUnicastArpSuppressionCache{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) Items() []VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { + return obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) Add() VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { + newObj := &otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &vxlanTunnelDestinationIPModeUnicastArpSuppressionCache{obj: newObj} + newLibObj.setDefault() + obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice = append(obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice, newLibObj) + return newLibObj +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) Append(items ...VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice = append(obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice, item) + } + return obj +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) Set(index int, newObj VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice[index] = newObj + return obj +} +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) Clear() VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache{} + obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice = []VxlanTunnelDestinationIPModeUnicastArpSuppressionCache{} + } + return obj +} +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) clearHolderSlice() VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + if len(obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice) > 0 { + obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice = []VxlanTunnelDestinationIPModeUnicastArpSuppressionCache{} + } + return obj +} +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) appendHolderSlice(item VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanV4TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice = append(obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice, item) + return obj +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RemoteVtepAddress != nil { + + err := obj.validateIpv4(obj.RemoteVtepAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on VxlanV4TunnelDestinationIPModeUnicastVtep.RemoteVtepAddress")) + } + + } + + if len(obj.obj.ArpSuppressionCache) != 0 { + + if set_default { + obj.ArpSuppressionCache().clearHolderSlice() + for _, item := range obj.obj.ArpSuppressionCache { + obj.ArpSuppressionCache().appendHolderSlice(&vxlanTunnelDestinationIPModeUnicastArpSuppressionCache{obj: item}) + } + } + for _, item := range obj.ArpSuppressionCache().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *vxlanV4TunnelDestinationIPModeUnicastVtep) setDefault() { + +} diff --git a/gosnappi/vxlan_v6_tunnel.go b/gosnappi/vxlan_v6_tunnel.go new file mode 100644 index 00000000..b1516190 --- /dev/null +++ b/gosnappi/vxlan_v6_tunnel.go @@ -0,0 +1,431 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** VxlanV6Tunnel ***** +type vxlanV6Tunnel struct { + validation + obj *otg.VxlanV6Tunnel + marshaller marshalVxlanV6Tunnel + unMarshaller unMarshalVxlanV6Tunnel + destinationIpModeHolder VxlanV6TunnelDestinationIPMode +} + +func NewVxlanV6Tunnel() VxlanV6Tunnel { + obj := vxlanV6Tunnel{obj: &otg.VxlanV6Tunnel{}} + obj.setDefault() + return &obj +} + +func (obj *vxlanV6Tunnel) msg() *otg.VxlanV6Tunnel { + return obj.obj +} + +func (obj *vxlanV6Tunnel) setMsg(msg *otg.VxlanV6Tunnel) VxlanV6Tunnel { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalvxlanV6Tunnel struct { + obj *vxlanV6Tunnel +} + +type marshalVxlanV6Tunnel interface { + // ToProto marshals VxlanV6Tunnel to protobuf object *otg.VxlanV6Tunnel + ToProto() (*otg.VxlanV6Tunnel, error) + // ToPbText marshals VxlanV6Tunnel to protobuf text + ToPbText() (string, error) + // ToYaml marshals VxlanV6Tunnel to YAML text + ToYaml() (string, error) + // ToJson marshals VxlanV6Tunnel to JSON text + ToJson() (string, error) +} + +type unMarshalvxlanV6Tunnel struct { + obj *vxlanV6Tunnel +} + +type unMarshalVxlanV6Tunnel interface { + // FromProto unmarshals VxlanV6Tunnel from protobuf object *otg.VxlanV6Tunnel + FromProto(msg *otg.VxlanV6Tunnel) (VxlanV6Tunnel, error) + // FromPbText unmarshals VxlanV6Tunnel from protobuf text + FromPbText(value string) error + // FromYaml unmarshals VxlanV6Tunnel from YAML text + FromYaml(value string) error + // FromJson unmarshals VxlanV6Tunnel from JSON text + FromJson(value string) error +} + +func (obj *vxlanV6Tunnel) Marshal() marshalVxlanV6Tunnel { + if obj.marshaller == nil { + obj.marshaller = &marshalvxlanV6Tunnel{obj: obj} + } + return obj.marshaller +} + +func (obj *vxlanV6Tunnel) Unmarshal() unMarshalVxlanV6Tunnel { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalvxlanV6Tunnel{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalvxlanV6Tunnel) ToProto() (*otg.VxlanV6Tunnel, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalvxlanV6Tunnel) FromProto(msg *otg.VxlanV6Tunnel) (VxlanV6Tunnel, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalvxlanV6Tunnel) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalvxlanV6Tunnel) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalvxlanV6Tunnel) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV6Tunnel) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalvxlanV6Tunnel) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV6Tunnel) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *vxlanV6Tunnel) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *vxlanV6Tunnel) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *vxlanV6Tunnel) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *vxlanV6Tunnel) Clone() (VxlanV6Tunnel, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewVxlanV6Tunnel() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *vxlanV6Tunnel) setNil() { + obj.destinationIpModeHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// VxlanV6Tunnel is configuration and operational state parameters relating to IPv6 VXLAN tunnel end-point interface. +type VxlanV6Tunnel interface { + Validation + // msg marshals VxlanV6Tunnel to protobuf object *otg.VxlanV6Tunnel + // and doesn't set defaults + msg() *otg.VxlanV6Tunnel + // setMsg unmarshals VxlanV6Tunnel from protobuf object *otg.VxlanV6Tunnel + // and doesn't set defaults + setMsg(*otg.VxlanV6Tunnel) VxlanV6Tunnel + // provides marshal interface + Marshal() marshalVxlanV6Tunnel + // provides unmarshal interface + Unmarshal() unMarshalVxlanV6Tunnel + // validate validates VxlanV6Tunnel + validate() error + // A stringer function + String() string + // Clones the object + Clone() (VxlanV6Tunnel, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // SourceInterface returns string, set in VxlanV6Tunnel. + SourceInterface() string + // SetSourceInterface assigns string provided by user to VxlanV6Tunnel + SetSourceInterface(value string) VxlanV6Tunnel + // DestinationIpMode returns VxlanV6TunnelDestinationIPMode, set in VxlanV6Tunnel. + // VxlanV6TunnelDestinationIPMode is communication mode between the VTEPs, either unicast or multicast. + DestinationIpMode() VxlanV6TunnelDestinationIPMode + // SetDestinationIpMode assigns VxlanV6TunnelDestinationIPMode provided by user to VxlanV6Tunnel. + // VxlanV6TunnelDestinationIPMode is communication mode between the VTEPs, either unicast or multicast. + SetDestinationIpMode(value VxlanV6TunnelDestinationIPMode) VxlanV6Tunnel + // HasDestinationIpMode checks if DestinationIpMode has been set in VxlanV6Tunnel + HasDestinationIpMode() bool + // Vni returns uint32, set in VxlanV6Tunnel. + Vni() uint32 + // SetVni assigns uint32 provided by user to VxlanV6Tunnel + SetVni(value uint32) VxlanV6Tunnel + // Name returns string, set in VxlanV6Tunnel. + Name() string + // SetName assigns string provided by user to VxlanV6Tunnel + SetName(value string) VxlanV6Tunnel + setNil() +} + +// Determines the source interface. +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Device.Ipv6Loopback/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Device.Ipv6Loopback/properties/name +// +// SourceInterface returns a string +func (obj *vxlanV6Tunnel) SourceInterface() string { + + return *obj.obj.SourceInterface + +} + +// Determines the source interface. +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Device.Ipv6Loopback/properties/name +// +// x-constraint: +// - /components/schemas/Device.Ipv6/properties/name +// - /components/schemas/Device.Ipv6Loopback/properties/name +// +// SetSourceInterface sets the string value in the VxlanV6Tunnel object +func (obj *vxlanV6Tunnel) SetSourceInterface(value string) VxlanV6Tunnel { + + obj.obj.SourceInterface = &value + return obj +} + +// description is TBD +// DestinationIpMode returns a VxlanV6TunnelDestinationIPMode +func (obj *vxlanV6Tunnel) DestinationIpMode() VxlanV6TunnelDestinationIPMode { + if obj.obj.DestinationIpMode == nil { + obj.obj.DestinationIpMode = NewVxlanV6TunnelDestinationIPMode().msg() + } + if obj.destinationIpModeHolder == nil { + obj.destinationIpModeHolder = &vxlanV6TunnelDestinationIPMode{obj: obj.obj.DestinationIpMode} + } + return obj.destinationIpModeHolder +} + +// description is TBD +// DestinationIpMode returns a VxlanV6TunnelDestinationIPMode +func (obj *vxlanV6Tunnel) HasDestinationIpMode() bool { + return obj.obj.DestinationIpMode != nil +} + +// description is TBD +// SetDestinationIpMode sets the VxlanV6TunnelDestinationIPMode value in the VxlanV6Tunnel object +func (obj *vxlanV6Tunnel) SetDestinationIpMode(value VxlanV6TunnelDestinationIPMode) VxlanV6Tunnel { + + obj.destinationIpModeHolder = nil + obj.obj.DestinationIpMode = value.msg() + + return obj +} + +// VXLAN Network Identifier (VNI) to distinguish network instances on the wire +// Vni returns a uint32 +func (obj *vxlanV6Tunnel) Vni() uint32 { + + return *obj.obj.Vni + +} + +// VXLAN Network Identifier (VNI) to distinguish network instances on the wire +// SetVni sets the uint32 value in the VxlanV6Tunnel object +func (obj *vxlanV6Tunnel) SetVni(value uint32) VxlanV6Tunnel { + + obj.obj.Vni = &value + return obj +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Name returns a string +func (obj *vxlanV6Tunnel) Name() string { + + return *obj.obj.Name + +} + +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// Globally unique name of an object. It also serves as the primary key for arrays of objects. +// SetName sets the string value in the VxlanV6Tunnel object +func (obj *vxlanV6Tunnel) SetName(value string) VxlanV6Tunnel { + + obj.obj.Name = &value + return obj +} + +func (obj *vxlanV6Tunnel) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + // SourceInterface is required + if obj.obj.SourceInterface == nil { + vObj.validationErrors = append(vObj.validationErrors, "SourceInterface is required field on interface VxlanV6Tunnel") + } + + if obj.obj.DestinationIpMode != nil { + + obj.DestinationIpMode().validateObj(vObj, set_default) + } + + // Vni is required + if obj.obj.Vni == nil { + vObj.validationErrors = append(vObj.validationErrors, "Vni is required field on interface VxlanV6Tunnel") + } + if obj.obj.Vni != nil { + + if *obj.obj.Vni < 1 || *obj.obj.Vni > 16777215 { + vObj.validationErrors = append( + vObj.validationErrors, + fmt.Sprintf("1 <= VxlanV6Tunnel.Vni <= 16777215 but Got %d", *obj.obj.Vni)) + } + + } + + // Name is required + if obj.obj.Name == nil { + vObj.validationErrors = append(vObj.validationErrors, "Name is required field on interface VxlanV6Tunnel") + } +} + +func (obj *vxlanV6Tunnel) setDefault() { + +} diff --git a/gosnappi/vxlan_v6_tunnel_destination_ip_mode.go b/gosnappi/vxlan_v6_tunnel_destination_ip_mode.go new file mode 100644 index 00000000..63bb6842 --- /dev/null +++ b/gosnappi/vxlan_v6_tunnel_destination_ip_mode.go @@ -0,0 +1,452 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** VxlanV6TunnelDestinationIPMode ***** +type vxlanV6TunnelDestinationIPMode struct { + validation + obj *otg.VxlanV6TunnelDestinationIPMode + marshaller marshalVxlanV6TunnelDestinationIPMode + unMarshaller unMarshalVxlanV6TunnelDestinationIPMode + unicastHolder VxlanV6TunnelDestinationIPModeUnicast + multicastHolder VxlanV6TunnelDestinationIPModeMulticast +} + +func NewVxlanV6TunnelDestinationIPMode() VxlanV6TunnelDestinationIPMode { + obj := vxlanV6TunnelDestinationIPMode{obj: &otg.VxlanV6TunnelDestinationIPMode{}} + obj.setDefault() + return &obj +} + +func (obj *vxlanV6TunnelDestinationIPMode) msg() *otg.VxlanV6TunnelDestinationIPMode { + return obj.obj +} + +func (obj *vxlanV6TunnelDestinationIPMode) setMsg(msg *otg.VxlanV6TunnelDestinationIPMode) VxlanV6TunnelDestinationIPMode { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalvxlanV6TunnelDestinationIPMode struct { + obj *vxlanV6TunnelDestinationIPMode +} + +type marshalVxlanV6TunnelDestinationIPMode interface { + // ToProto marshals VxlanV6TunnelDestinationIPMode to protobuf object *otg.VxlanV6TunnelDestinationIPMode + ToProto() (*otg.VxlanV6TunnelDestinationIPMode, error) + // ToPbText marshals VxlanV6TunnelDestinationIPMode to protobuf text + ToPbText() (string, error) + // ToYaml marshals VxlanV6TunnelDestinationIPMode to YAML text + ToYaml() (string, error) + // ToJson marshals VxlanV6TunnelDestinationIPMode to JSON text + ToJson() (string, error) +} + +type unMarshalvxlanV6TunnelDestinationIPMode struct { + obj *vxlanV6TunnelDestinationIPMode +} + +type unMarshalVxlanV6TunnelDestinationIPMode interface { + // FromProto unmarshals VxlanV6TunnelDestinationIPMode from protobuf object *otg.VxlanV6TunnelDestinationIPMode + FromProto(msg *otg.VxlanV6TunnelDestinationIPMode) (VxlanV6TunnelDestinationIPMode, error) + // FromPbText unmarshals VxlanV6TunnelDestinationIPMode from protobuf text + FromPbText(value string) error + // FromYaml unmarshals VxlanV6TunnelDestinationIPMode from YAML text + FromYaml(value string) error + // FromJson unmarshals VxlanV6TunnelDestinationIPMode from JSON text + FromJson(value string) error +} + +func (obj *vxlanV6TunnelDestinationIPMode) Marshal() marshalVxlanV6TunnelDestinationIPMode { + if obj.marshaller == nil { + obj.marshaller = &marshalvxlanV6TunnelDestinationIPMode{obj: obj} + } + return obj.marshaller +} + +func (obj *vxlanV6TunnelDestinationIPMode) Unmarshal() unMarshalVxlanV6TunnelDestinationIPMode { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalvxlanV6TunnelDestinationIPMode{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalvxlanV6TunnelDestinationIPMode) ToProto() (*otg.VxlanV6TunnelDestinationIPMode, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPMode) FromProto(msg *otg.VxlanV6TunnelDestinationIPMode) (VxlanV6TunnelDestinationIPMode, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalvxlanV6TunnelDestinationIPMode) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPMode) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalvxlanV6TunnelDestinationIPMode) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPMode) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalvxlanV6TunnelDestinationIPMode) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPMode) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *vxlanV6TunnelDestinationIPMode) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *vxlanV6TunnelDestinationIPMode) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *vxlanV6TunnelDestinationIPMode) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *vxlanV6TunnelDestinationIPMode) Clone() (VxlanV6TunnelDestinationIPMode, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewVxlanV6TunnelDestinationIPMode() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *vxlanV6TunnelDestinationIPMode) setNil() { + obj.unicastHolder = nil + obj.multicastHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// VxlanV6TunnelDestinationIPMode is communication mode between the VTEPs, either unicast or multicast. +type VxlanV6TunnelDestinationIPMode interface { + Validation + // msg marshals VxlanV6TunnelDestinationIPMode to protobuf object *otg.VxlanV6TunnelDestinationIPMode + // and doesn't set defaults + msg() *otg.VxlanV6TunnelDestinationIPMode + // setMsg unmarshals VxlanV6TunnelDestinationIPMode from protobuf object *otg.VxlanV6TunnelDestinationIPMode + // and doesn't set defaults + setMsg(*otg.VxlanV6TunnelDestinationIPMode) VxlanV6TunnelDestinationIPMode + // provides marshal interface + Marshal() marshalVxlanV6TunnelDestinationIPMode + // provides unmarshal interface + Unmarshal() unMarshalVxlanV6TunnelDestinationIPMode + // validate validates VxlanV6TunnelDestinationIPMode + validate() error + // A stringer function + String() string + // Clones the object + Clone() (VxlanV6TunnelDestinationIPMode, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Choice returns VxlanV6TunnelDestinationIPModeChoiceEnum, set in VxlanV6TunnelDestinationIPMode + Choice() VxlanV6TunnelDestinationIPModeChoiceEnum + // setChoice assigns VxlanV6TunnelDestinationIPModeChoiceEnum provided by user to VxlanV6TunnelDestinationIPMode + setChoice(value VxlanV6TunnelDestinationIPModeChoiceEnum) VxlanV6TunnelDestinationIPMode + // HasChoice checks if Choice has been set in VxlanV6TunnelDestinationIPMode + HasChoice() bool + // Unicast returns VxlanV6TunnelDestinationIPModeUnicast, set in VxlanV6TunnelDestinationIPMode. + // VxlanV6TunnelDestinationIPModeUnicast is description is TBD + Unicast() VxlanV6TunnelDestinationIPModeUnicast + // SetUnicast assigns VxlanV6TunnelDestinationIPModeUnicast provided by user to VxlanV6TunnelDestinationIPMode. + // VxlanV6TunnelDestinationIPModeUnicast is description is TBD + SetUnicast(value VxlanV6TunnelDestinationIPModeUnicast) VxlanV6TunnelDestinationIPMode + // HasUnicast checks if Unicast has been set in VxlanV6TunnelDestinationIPMode + HasUnicast() bool + // Multicast returns VxlanV6TunnelDestinationIPModeMulticast, set in VxlanV6TunnelDestinationIPMode. + // VxlanV6TunnelDestinationIPModeMulticast is multicast Group address for member VNI(VXLAN Network Identifier) + Multicast() VxlanV6TunnelDestinationIPModeMulticast + // SetMulticast assigns VxlanV6TunnelDestinationIPModeMulticast provided by user to VxlanV6TunnelDestinationIPMode. + // VxlanV6TunnelDestinationIPModeMulticast is multicast Group address for member VNI(VXLAN Network Identifier) + SetMulticast(value VxlanV6TunnelDestinationIPModeMulticast) VxlanV6TunnelDestinationIPMode + // HasMulticast checks if Multicast has been set in VxlanV6TunnelDestinationIPMode + HasMulticast() bool + setNil() +} + +type VxlanV6TunnelDestinationIPModeChoiceEnum string + +// Enum of Choice on VxlanV6TunnelDestinationIPMode +var VxlanV6TunnelDestinationIPModeChoice = struct { + UNICAST VxlanV6TunnelDestinationIPModeChoiceEnum + MULTICAST VxlanV6TunnelDestinationIPModeChoiceEnum +}{ + UNICAST: VxlanV6TunnelDestinationIPModeChoiceEnum("unicast"), + MULTICAST: VxlanV6TunnelDestinationIPModeChoiceEnum("multicast"), +} + +func (obj *vxlanV6TunnelDestinationIPMode) Choice() VxlanV6TunnelDestinationIPModeChoiceEnum { + return VxlanV6TunnelDestinationIPModeChoiceEnum(obj.obj.Choice.Enum().String()) +} + +// unicast or multicast +// Choice returns a string +func (obj *vxlanV6TunnelDestinationIPMode) HasChoice() bool { + return obj.obj.Choice != nil +} + +func (obj *vxlanV6TunnelDestinationIPMode) setChoice(value VxlanV6TunnelDestinationIPModeChoiceEnum) VxlanV6TunnelDestinationIPMode { + intValue, ok := otg.VxlanV6TunnelDestinationIPMode_Choice_Enum_value[string(value)] + if !ok { + obj.validationErrors = append(obj.validationErrors, fmt.Sprintf( + "%s is not a valid choice on VxlanV6TunnelDestinationIPModeChoiceEnum", string(value))) + return obj + } + enumValue := otg.VxlanV6TunnelDestinationIPMode_Choice_Enum(intValue) + obj.obj.Choice = &enumValue + obj.obj.Multicast = nil + obj.multicastHolder = nil + obj.obj.Unicast = nil + obj.unicastHolder = nil + + if value == VxlanV6TunnelDestinationIPModeChoice.UNICAST { + obj.obj.Unicast = NewVxlanV6TunnelDestinationIPModeUnicast().msg() + } + + if value == VxlanV6TunnelDestinationIPModeChoice.MULTICAST { + obj.obj.Multicast = NewVxlanV6TunnelDestinationIPModeMulticast().msg() + } + + return obj +} + +// description is TBD +// Unicast returns a VxlanV6TunnelDestinationIPModeUnicast +func (obj *vxlanV6TunnelDestinationIPMode) Unicast() VxlanV6TunnelDestinationIPModeUnicast { + if obj.obj.Unicast == nil { + obj.setChoice(VxlanV6TunnelDestinationIPModeChoice.UNICAST) + } + if obj.unicastHolder == nil { + obj.unicastHolder = &vxlanV6TunnelDestinationIPModeUnicast{obj: obj.obj.Unicast} + } + return obj.unicastHolder +} + +// description is TBD +// Unicast returns a VxlanV6TunnelDestinationIPModeUnicast +func (obj *vxlanV6TunnelDestinationIPMode) HasUnicast() bool { + return obj.obj.Unicast != nil +} + +// description is TBD +// SetUnicast sets the VxlanV6TunnelDestinationIPModeUnicast value in the VxlanV6TunnelDestinationIPMode object +func (obj *vxlanV6TunnelDestinationIPMode) SetUnicast(value VxlanV6TunnelDestinationIPModeUnicast) VxlanV6TunnelDestinationIPMode { + obj.setChoice(VxlanV6TunnelDestinationIPModeChoice.UNICAST) + obj.unicastHolder = nil + obj.obj.Unicast = value.msg() + + return obj +} + +// description is TBD +// Multicast returns a VxlanV6TunnelDestinationIPModeMulticast +func (obj *vxlanV6TunnelDestinationIPMode) Multicast() VxlanV6TunnelDestinationIPModeMulticast { + if obj.obj.Multicast == nil { + obj.setChoice(VxlanV6TunnelDestinationIPModeChoice.MULTICAST) + } + if obj.multicastHolder == nil { + obj.multicastHolder = &vxlanV6TunnelDestinationIPModeMulticast{obj: obj.obj.Multicast} + } + return obj.multicastHolder +} + +// description is TBD +// Multicast returns a VxlanV6TunnelDestinationIPModeMulticast +func (obj *vxlanV6TunnelDestinationIPMode) HasMulticast() bool { + return obj.obj.Multicast != nil +} + +// description is TBD +// SetMulticast sets the VxlanV6TunnelDestinationIPModeMulticast value in the VxlanV6TunnelDestinationIPMode object +func (obj *vxlanV6TunnelDestinationIPMode) SetMulticast(value VxlanV6TunnelDestinationIPModeMulticast) VxlanV6TunnelDestinationIPMode { + obj.setChoice(VxlanV6TunnelDestinationIPModeChoice.MULTICAST) + obj.multicastHolder = nil + obj.obj.Multicast = value.msg() + + return obj +} + +func (obj *vxlanV6TunnelDestinationIPMode) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Unicast != nil { + + obj.Unicast().validateObj(vObj, set_default) + } + + if obj.obj.Multicast != nil { + + obj.Multicast().validateObj(vObj, set_default) + } + +} + +func (obj *vxlanV6TunnelDestinationIPMode) setDefault() { + var choices_set int = 0 + var choice VxlanV6TunnelDestinationIPModeChoiceEnum + + if obj.obj.Unicast != nil { + choices_set += 1 + choice = VxlanV6TunnelDestinationIPModeChoice.UNICAST + } + + if obj.obj.Multicast != nil { + choices_set += 1 + choice = VxlanV6TunnelDestinationIPModeChoice.MULTICAST + } + if choices_set == 0 { + if obj.obj.Choice == nil { + obj.setChoice(VxlanV6TunnelDestinationIPModeChoice.MULTICAST) + + } + + } else if choices_set == 1 && choice != "" { + if obj.obj.Choice != nil { + if obj.Choice() != choice { + obj.validationErrors = append(obj.validationErrors, "choice not matching with property in VxlanV6TunnelDestinationIPMode") + } + } else { + intVal := otg.VxlanV6TunnelDestinationIPMode_Choice_Enum_value[string(choice)] + enumValue := otg.VxlanV6TunnelDestinationIPMode_Choice_Enum(intVal) + obj.obj.Choice = &enumValue + } + } + +} diff --git a/gosnappi/vxlan_v6_tunnel_destination_ip_mode_multicast.go b/gosnappi/vxlan_v6_tunnel_destination_ip_mode_multicast.go new file mode 100644 index 00000000..22ecec3d --- /dev/null +++ b/gosnappi/vxlan_v6_tunnel_destination_ip_mode_multicast.go @@ -0,0 +1,315 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** VxlanV6TunnelDestinationIPModeMulticast ***** +type vxlanV6TunnelDestinationIPModeMulticast struct { + validation + obj *otg.VxlanV6TunnelDestinationIPModeMulticast + marshaller marshalVxlanV6TunnelDestinationIPModeMulticast + unMarshaller unMarshalVxlanV6TunnelDestinationIPModeMulticast +} + +func NewVxlanV6TunnelDestinationIPModeMulticast() VxlanV6TunnelDestinationIPModeMulticast { + obj := vxlanV6TunnelDestinationIPModeMulticast{obj: &otg.VxlanV6TunnelDestinationIPModeMulticast{}} + obj.setDefault() + return &obj +} + +func (obj *vxlanV6TunnelDestinationIPModeMulticast) msg() *otg.VxlanV6TunnelDestinationIPModeMulticast { + return obj.obj +} + +func (obj *vxlanV6TunnelDestinationIPModeMulticast) setMsg(msg *otg.VxlanV6TunnelDestinationIPModeMulticast) VxlanV6TunnelDestinationIPModeMulticast { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalvxlanV6TunnelDestinationIPModeMulticast struct { + obj *vxlanV6TunnelDestinationIPModeMulticast +} + +type marshalVxlanV6TunnelDestinationIPModeMulticast interface { + // ToProto marshals VxlanV6TunnelDestinationIPModeMulticast to protobuf object *otg.VxlanV6TunnelDestinationIPModeMulticast + ToProto() (*otg.VxlanV6TunnelDestinationIPModeMulticast, error) + // ToPbText marshals VxlanV6TunnelDestinationIPModeMulticast to protobuf text + ToPbText() (string, error) + // ToYaml marshals VxlanV6TunnelDestinationIPModeMulticast to YAML text + ToYaml() (string, error) + // ToJson marshals VxlanV6TunnelDestinationIPModeMulticast to JSON text + ToJson() (string, error) +} + +type unMarshalvxlanV6TunnelDestinationIPModeMulticast struct { + obj *vxlanV6TunnelDestinationIPModeMulticast +} + +type unMarshalVxlanV6TunnelDestinationIPModeMulticast interface { + // FromProto unmarshals VxlanV6TunnelDestinationIPModeMulticast from protobuf object *otg.VxlanV6TunnelDestinationIPModeMulticast + FromProto(msg *otg.VxlanV6TunnelDestinationIPModeMulticast) (VxlanV6TunnelDestinationIPModeMulticast, error) + // FromPbText unmarshals VxlanV6TunnelDestinationIPModeMulticast from protobuf text + FromPbText(value string) error + // FromYaml unmarshals VxlanV6TunnelDestinationIPModeMulticast from YAML text + FromYaml(value string) error + // FromJson unmarshals VxlanV6TunnelDestinationIPModeMulticast from JSON text + FromJson(value string) error +} + +func (obj *vxlanV6TunnelDestinationIPModeMulticast) Marshal() marshalVxlanV6TunnelDestinationIPModeMulticast { + if obj.marshaller == nil { + obj.marshaller = &marshalvxlanV6TunnelDestinationIPModeMulticast{obj: obj} + } + return obj.marshaller +} + +func (obj *vxlanV6TunnelDestinationIPModeMulticast) Unmarshal() unMarshalVxlanV6TunnelDestinationIPModeMulticast { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalvxlanV6TunnelDestinationIPModeMulticast{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalvxlanV6TunnelDestinationIPModeMulticast) ToProto() (*otg.VxlanV6TunnelDestinationIPModeMulticast, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPModeMulticast) FromProto(msg *otg.VxlanV6TunnelDestinationIPModeMulticast) (VxlanV6TunnelDestinationIPModeMulticast, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalvxlanV6TunnelDestinationIPModeMulticast) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPModeMulticast) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalvxlanV6TunnelDestinationIPModeMulticast) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPModeMulticast) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalvxlanV6TunnelDestinationIPModeMulticast) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPModeMulticast) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *vxlanV6TunnelDestinationIPModeMulticast) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *vxlanV6TunnelDestinationIPModeMulticast) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *vxlanV6TunnelDestinationIPModeMulticast) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *vxlanV6TunnelDestinationIPModeMulticast) Clone() (VxlanV6TunnelDestinationIPModeMulticast, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewVxlanV6TunnelDestinationIPModeMulticast() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// VxlanV6TunnelDestinationIPModeMulticast is multicast Group address for member VNI(VXLAN Network Identifier) +type VxlanV6TunnelDestinationIPModeMulticast interface { + Validation + // msg marshals VxlanV6TunnelDestinationIPModeMulticast to protobuf object *otg.VxlanV6TunnelDestinationIPModeMulticast + // and doesn't set defaults + msg() *otg.VxlanV6TunnelDestinationIPModeMulticast + // setMsg unmarshals VxlanV6TunnelDestinationIPModeMulticast from protobuf object *otg.VxlanV6TunnelDestinationIPModeMulticast + // and doesn't set defaults + setMsg(*otg.VxlanV6TunnelDestinationIPModeMulticast) VxlanV6TunnelDestinationIPModeMulticast + // provides marshal interface + Marshal() marshalVxlanV6TunnelDestinationIPModeMulticast + // provides unmarshal interface + Unmarshal() unMarshalVxlanV6TunnelDestinationIPModeMulticast + // validate validates VxlanV6TunnelDestinationIPModeMulticast + validate() error + // A stringer function + String() string + // Clones the object + Clone() (VxlanV6TunnelDestinationIPModeMulticast, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Address returns string, set in VxlanV6TunnelDestinationIPModeMulticast. + Address() string + // SetAddress assigns string provided by user to VxlanV6TunnelDestinationIPModeMulticast + SetAddress(value string) VxlanV6TunnelDestinationIPModeMulticast + // HasAddress checks if Address has been set in VxlanV6TunnelDestinationIPModeMulticast + HasAddress() bool +} + +// IPv6 Multicast address +// Address returns a string +func (obj *vxlanV6TunnelDestinationIPModeMulticast) Address() string { + + return *obj.obj.Address + +} + +// IPv6 Multicast address +// Address returns a string +func (obj *vxlanV6TunnelDestinationIPModeMulticast) HasAddress() bool { + return obj.obj.Address != nil +} + +// IPv6 Multicast address +// SetAddress sets the string value in the VxlanV6TunnelDestinationIPModeMulticast object +func (obj *vxlanV6TunnelDestinationIPModeMulticast) SetAddress(value string) VxlanV6TunnelDestinationIPModeMulticast { + + obj.obj.Address = &value + return obj +} + +func (obj *vxlanV6TunnelDestinationIPModeMulticast) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.Address != nil { + + err := obj.validateIpv6(obj.Address()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on VxlanV6TunnelDestinationIPModeMulticast.Address")) + } + + } + +} + +func (obj *vxlanV6TunnelDestinationIPModeMulticast) setDefault() { + +} diff --git a/gosnappi/vxlan_v6_tunnel_destination_ip_mode_unicast.go b/gosnappi/vxlan_v6_tunnel_destination_ip_mode_unicast.go new file mode 100644 index 00000000..530ec0e4 --- /dev/null +++ b/gosnappi/vxlan_v6_tunnel_destination_ip_mode_unicast.go @@ -0,0 +1,390 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** VxlanV6TunnelDestinationIPModeUnicast ***** +type vxlanV6TunnelDestinationIPModeUnicast struct { + validation + obj *otg.VxlanV6TunnelDestinationIPModeUnicast + marshaller marshalVxlanV6TunnelDestinationIPModeUnicast + unMarshaller unMarshalVxlanV6TunnelDestinationIPModeUnicast + vtepsHolder VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter +} + +func NewVxlanV6TunnelDestinationIPModeUnicast() VxlanV6TunnelDestinationIPModeUnicast { + obj := vxlanV6TunnelDestinationIPModeUnicast{obj: &otg.VxlanV6TunnelDestinationIPModeUnicast{}} + obj.setDefault() + return &obj +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicast) msg() *otg.VxlanV6TunnelDestinationIPModeUnicast { + return obj.obj +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicast) setMsg(msg *otg.VxlanV6TunnelDestinationIPModeUnicast) VxlanV6TunnelDestinationIPModeUnicast { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalvxlanV6TunnelDestinationIPModeUnicast struct { + obj *vxlanV6TunnelDestinationIPModeUnicast +} + +type marshalVxlanV6TunnelDestinationIPModeUnicast interface { + // ToProto marshals VxlanV6TunnelDestinationIPModeUnicast to protobuf object *otg.VxlanV6TunnelDestinationIPModeUnicast + ToProto() (*otg.VxlanV6TunnelDestinationIPModeUnicast, error) + // ToPbText marshals VxlanV6TunnelDestinationIPModeUnicast to protobuf text + ToPbText() (string, error) + // ToYaml marshals VxlanV6TunnelDestinationIPModeUnicast to YAML text + ToYaml() (string, error) + // ToJson marshals VxlanV6TunnelDestinationIPModeUnicast to JSON text + ToJson() (string, error) +} + +type unMarshalvxlanV6TunnelDestinationIPModeUnicast struct { + obj *vxlanV6TunnelDestinationIPModeUnicast +} + +type unMarshalVxlanV6TunnelDestinationIPModeUnicast interface { + // FromProto unmarshals VxlanV6TunnelDestinationIPModeUnicast from protobuf object *otg.VxlanV6TunnelDestinationIPModeUnicast + FromProto(msg *otg.VxlanV6TunnelDestinationIPModeUnicast) (VxlanV6TunnelDestinationIPModeUnicast, error) + // FromPbText unmarshals VxlanV6TunnelDestinationIPModeUnicast from protobuf text + FromPbText(value string) error + // FromYaml unmarshals VxlanV6TunnelDestinationIPModeUnicast from YAML text + FromYaml(value string) error + // FromJson unmarshals VxlanV6TunnelDestinationIPModeUnicast from JSON text + FromJson(value string) error +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicast) Marshal() marshalVxlanV6TunnelDestinationIPModeUnicast { + if obj.marshaller == nil { + obj.marshaller = &marshalvxlanV6TunnelDestinationIPModeUnicast{obj: obj} + } + return obj.marshaller +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicast) Unmarshal() unMarshalVxlanV6TunnelDestinationIPModeUnicast { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalvxlanV6TunnelDestinationIPModeUnicast{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalvxlanV6TunnelDestinationIPModeUnicast) ToProto() (*otg.VxlanV6TunnelDestinationIPModeUnicast, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPModeUnicast) FromProto(msg *otg.VxlanV6TunnelDestinationIPModeUnicast) (VxlanV6TunnelDestinationIPModeUnicast, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalvxlanV6TunnelDestinationIPModeUnicast) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPModeUnicast) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalvxlanV6TunnelDestinationIPModeUnicast) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPModeUnicast) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalvxlanV6TunnelDestinationIPModeUnicast) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPModeUnicast) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicast) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicast) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicast) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicast) Clone() (VxlanV6TunnelDestinationIPModeUnicast, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewVxlanV6TunnelDestinationIPModeUnicast() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicast) setNil() { + obj.vtepsHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// VxlanV6TunnelDestinationIPModeUnicast is description is TBD +type VxlanV6TunnelDestinationIPModeUnicast interface { + Validation + // msg marshals VxlanV6TunnelDestinationIPModeUnicast to protobuf object *otg.VxlanV6TunnelDestinationIPModeUnicast + // and doesn't set defaults + msg() *otg.VxlanV6TunnelDestinationIPModeUnicast + // setMsg unmarshals VxlanV6TunnelDestinationIPModeUnicast from protobuf object *otg.VxlanV6TunnelDestinationIPModeUnicast + // and doesn't set defaults + setMsg(*otg.VxlanV6TunnelDestinationIPModeUnicast) VxlanV6TunnelDestinationIPModeUnicast + // provides marshal interface + Marshal() marshalVxlanV6TunnelDestinationIPModeUnicast + // provides unmarshal interface + Unmarshal() unMarshalVxlanV6TunnelDestinationIPModeUnicast + // validate validates VxlanV6TunnelDestinationIPModeUnicast + validate() error + // A stringer function + String() string + // Clones the object + Clone() (VxlanV6TunnelDestinationIPModeUnicast, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Vteps returns VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIterIter, set in VxlanV6TunnelDestinationIPModeUnicast + Vteps() VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter + setNil() +} + +// List of VTEPs for member VNI(VXLAN Network Identifier) +// Vteps returns a []VxlanV6TunnelDestinationIPModeUnicastVtep +func (obj *vxlanV6TunnelDestinationIPModeUnicast) Vteps() VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter { + if len(obj.obj.Vteps) == 0 { + obj.obj.Vteps = []*otg.VxlanV6TunnelDestinationIPModeUnicastVtep{} + } + if obj.vtepsHolder == nil { + obj.vtepsHolder = newVxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter(&obj.obj.Vteps).setMsg(obj) + } + return obj.vtepsHolder +} + +type vxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter struct { + obj *vxlanV6TunnelDestinationIPModeUnicast + vxlanV6TunnelDestinationIPModeUnicastVtepSlice []VxlanV6TunnelDestinationIPModeUnicastVtep + fieldPtr *[]*otg.VxlanV6TunnelDestinationIPModeUnicastVtep +} + +func newVxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter(ptr *[]*otg.VxlanV6TunnelDestinationIPModeUnicastVtep) VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter { + return &vxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter{fieldPtr: ptr} +} + +type VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter interface { + setMsg(*vxlanV6TunnelDestinationIPModeUnicast) VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter + Items() []VxlanV6TunnelDestinationIPModeUnicastVtep + Add() VxlanV6TunnelDestinationIPModeUnicastVtep + Append(items ...VxlanV6TunnelDestinationIPModeUnicastVtep) VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter + Set(index int, newObj VxlanV6TunnelDestinationIPModeUnicastVtep) VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter + Clear() VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter + clearHolderSlice() VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter + appendHolderSlice(item VxlanV6TunnelDestinationIPModeUnicastVtep) VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter) setMsg(msg *vxlanV6TunnelDestinationIPModeUnicast) VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&vxlanV6TunnelDestinationIPModeUnicastVtep{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter) Items() []VxlanV6TunnelDestinationIPModeUnicastVtep { + return obj.vxlanV6TunnelDestinationIPModeUnicastVtepSlice +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter) Add() VxlanV6TunnelDestinationIPModeUnicastVtep { + newObj := &otg.VxlanV6TunnelDestinationIPModeUnicastVtep{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &vxlanV6TunnelDestinationIPModeUnicastVtep{obj: newObj} + newLibObj.setDefault() + obj.vxlanV6TunnelDestinationIPModeUnicastVtepSlice = append(obj.vxlanV6TunnelDestinationIPModeUnicastVtepSlice, newLibObj) + return newLibObj +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter) Append(items ...VxlanV6TunnelDestinationIPModeUnicastVtep) VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.vxlanV6TunnelDestinationIPModeUnicastVtepSlice = append(obj.vxlanV6TunnelDestinationIPModeUnicastVtepSlice, item) + } + return obj +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter) Set(index int, newObj VxlanV6TunnelDestinationIPModeUnicastVtep) VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.vxlanV6TunnelDestinationIPModeUnicastVtepSlice[index] = newObj + return obj +} +func (obj *vxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter) Clear() VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.VxlanV6TunnelDestinationIPModeUnicastVtep{} + obj.vxlanV6TunnelDestinationIPModeUnicastVtepSlice = []VxlanV6TunnelDestinationIPModeUnicastVtep{} + } + return obj +} +func (obj *vxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter) clearHolderSlice() VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter { + if len(obj.vxlanV6TunnelDestinationIPModeUnicastVtepSlice) > 0 { + obj.vxlanV6TunnelDestinationIPModeUnicastVtepSlice = []VxlanV6TunnelDestinationIPModeUnicastVtep{} + } + return obj +} +func (obj *vxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter) appendHolderSlice(item VxlanV6TunnelDestinationIPModeUnicastVtep) VxlanV6TunnelDestinationIPModeUnicastVxlanV6TunnelDestinationIPModeUnicastVtepIter { + obj.vxlanV6TunnelDestinationIPModeUnicastVtepSlice = append(obj.vxlanV6TunnelDestinationIPModeUnicastVtepSlice, item) + return obj +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicast) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if len(obj.obj.Vteps) != 0 { + + if set_default { + obj.Vteps().clearHolderSlice() + for _, item := range obj.obj.Vteps { + obj.Vteps().appendHolderSlice(&vxlanV6TunnelDestinationIPModeUnicastVtep{obj: item}) + } + } + for _, item := range obj.Vteps().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicast) setDefault() { + +} diff --git a/gosnappi/vxlan_v6_tunnel_destination_ip_mode_unicast_vtep.go b/gosnappi/vxlan_v6_tunnel_destination_ip_mode_unicast_vtep.go new file mode 100644 index 00000000..781cf82e --- /dev/null +++ b/gosnappi/vxlan_v6_tunnel_destination_ip_mode_unicast_vtep.go @@ -0,0 +1,427 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** VxlanV6TunnelDestinationIPModeUnicastVtep ***** +type vxlanV6TunnelDestinationIPModeUnicastVtep struct { + validation + obj *otg.VxlanV6TunnelDestinationIPModeUnicastVtep + marshaller marshalVxlanV6TunnelDestinationIPModeUnicastVtep + unMarshaller unMarshalVxlanV6TunnelDestinationIPModeUnicastVtep + arpSuppressionCacheHolder VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter +} + +func NewVxlanV6TunnelDestinationIPModeUnicastVtep() VxlanV6TunnelDestinationIPModeUnicastVtep { + obj := vxlanV6TunnelDestinationIPModeUnicastVtep{obj: &otg.VxlanV6TunnelDestinationIPModeUnicastVtep{}} + obj.setDefault() + return &obj +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) msg() *otg.VxlanV6TunnelDestinationIPModeUnicastVtep { + return obj.obj +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) setMsg(msg *otg.VxlanV6TunnelDestinationIPModeUnicastVtep) VxlanV6TunnelDestinationIPModeUnicastVtep { + obj.setNil() + proto.Merge(obj.obj, msg) + return obj +} + +type marshalvxlanV6TunnelDestinationIPModeUnicastVtep struct { + obj *vxlanV6TunnelDestinationIPModeUnicastVtep +} + +type marshalVxlanV6TunnelDestinationIPModeUnicastVtep interface { + // ToProto marshals VxlanV6TunnelDestinationIPModeUnicastVtep to protobuf object *otg.VxlanV6TunnelDestinationIPModeUnicastVtep + ToProto() (*otg.VxlanV6TunnelDestinationIPModeUnicastVtep, error) + // ToPbText marshals VxlanV6TunnelDestinationIPModeUnicastVtep to protobuf text + ToPbText() (string, error) + // ToYaml marshals VxlanV6TunnelDestinationIPModeUnicastVtep to YAML text + ToYaml() (string, error) + // ToJson marshals VxlanV6TunnelDestinationIPModeUnicastVtep to JSON text + ToJson() (string, error) +} + +type unMarshalvxlanV6TunnelDestinationIPModeUnicastVtep struct { + obj *vxlanV6TunnelDestinationIPModeUnicastVtep +} + +type unMarshalVxlanV6TunnelDestinationIPModeUnicastVtep interface { + // FromProto unmarshals VxlanV6TunnelDestinationIPModeUnicastVtep from protobuf object *otg.VxlanV6TunnelDestinationIPModeUnicastVtep + FromProto(msg *otg.VxlanV6TunnelDestinationIPModeUnicastVtep) (VxlanV6TunnelDestinationIPModeUnicastVtep, error) + // FromPbText unmarshals VxlanV6TunnelDestinationIPModeUnicastVtep from protobuf text + FromPbText(value string) error + // FromYaml unmarshals VxlanV6TunnelDestinationIPModeUnicastVtep from YAML text + FromYaml(value string) error + // FromJson unmarshals VxlanV6TunnelDestinationIPModeUnicastVtep from JSON text + FromJson(value string) error +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) Marshal() marshalVxlanV6TunnelDestinationIPModeUnicastVtep { + if obj.marshaller == nil { + obj.marshaller = &marshalvxlanV6TunnelDestinationIPModeUnicastVtep{obj: obj} + } + return obj.marshaller +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) Unmarshal() unMarshalVxlanV6TunnelDestinationIPModeUnicastVtep { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalvxlanV6TunnelDestinationIPModeUnicastVtep{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalvxlanV6TunnelDestinationIPModeUnicastVtep) ToProto() (*otg.VxlanV6TunnelDestinationIPModeUnicastVtep, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPModeUnicastVtep) FromProto(msg *otg.VxlanV6TunnelDestinationIPModeUnicastVtep) (VxlanV6TunnelDestinationIPModeUnicastVtep, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalvxlanV6TunnelDestinationIPModeUnicastVtep) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPModeUnicastVtep) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalvxlanV6TunnelDestinationIPModeUnicastVtep) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPModeUnicastVtep) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalvxlanV6TunnelDestinationIPModeUnicastVtep) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalvxlanV6TunnelDestinationIPModeUnicastVtep) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + m.obj.setNil() + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) Clone() (VxlanV6TunnelDestinationIPModeUnicastVtep, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewVxlanV6TunnelDestinationIPModeUnicastVtep() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) setNil() { + obj.arpSuppressionCacheHolder = nil + obj.validationErrors = nil + obj.warnings = nil + obj.constraints = make(map[string]map[string]Constraints) +} + +// VxlanV6TunnelDestinationIPModeUnicastVtep is vTEP (VXLAN Tunnel End Point (VTEP)) parameters +type VxlanV6TunnelDestinationIPModeUnicastVtep interface { + Validation + // msg marshals VxlanV6TunnelDestinationIPModeUnicastVtep to protobuf object *otg.VxlanV6TunnelDestinationIPModeUnicastVtep + // and doesn't set defaults + msg() *otg.VxlanV6TunnelDestinationIPModeUnicastVtep + // setMsg unmarshals VxlanV6TunnelDestinationIPModeUnicastVtep from protobuf object *otg.VxlanV6TunnelDestinationIPModeUnicastVtep + // and doesn't set defaults + setMsg(*otg.VxlanV6TunnelDestinationIPModeUnicastVtep) VxlanV6TunnelDestinationIPModeUnicastVtep + // provides marshal interface + Marshal() marshalVxlanV6TunnelDestinationIPModeUnicastVtep + // provides unmarshal interface + Unmarshal() unMarshalVxlanV6TunnelDestinationIPModeUnicastVtep + // validate validates VxlanV6TunnelDestinationIPModeUnicastVtep + validate() error + // A stringer function + String() string + // Clones the object + Clone() (VxlanV6TunnelDestinationIPModeUnicastVtep, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // RemoteVtepAddress returns string, set in VxlanV6TunnelDestinationIPModeUnicastVtep. + RemoteVtepAddress() string + // SetRemoteVtepAddress assigns string provided by user to VxlanV6TunnelDestinationIPModeUnicastVtep + SetRemoteVtepAddress(value string) VxlanV6TunnelDestinationIPModeUnicastVtep + // HasRemoteVtepAddress checks if RemoteVtepAddress has been set in VxlanV6TunnelDestinationIPModeUnicastVtep + HasRemoteVtepAddress() bool + // ArpSuppressionCache returns VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIterIter, set in VxlanV6TunnelDestinationIPModeUnicastVtep + ArpSuppressionCache() VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter + setNil() +} + +// Remote VXLAN Tunnel End Point address +// RemoteVtepAddress returns a string +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) RemoteVtepAddress() string { + + return *obj.obj.RemoteVtepAddress + +} + +// Remote VXLAN Tunnel End Point address +// RemoteVtepAddress returns a string +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) HasRemoteVtepAddress() bool { + return obj.obj.RemoteVtepAddress != nil +} + +// Remote VXLAN Tunnel End Point address +// SetRemoteVtepAddress sets the string value in the VxlanV6TunnelDestinationIPModeUnicastVtep object +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) SetRemoteVtepAddress(value string) VxlanV6TunnelDestinationIPModeUnicastVtep { + + obj.obj.RemoteVtepAddress = &value + return obj +} + +// Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request for another end-host IP address, its local VTEP intercepts the ARP request and checks for the ARP-resolved IP address in its ARP suppression cache table. If it finds a match, the local VTEP sends an ARP response on behalf of the remote end host. +// ArpSuppressionCache returns a []VxlanTunnelDestinationIPModeUnicastArpSuppressionCache +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) ArpSuppressionCache() VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + if len(obj.obj.ArpSuppressionCache) == 0 { + obj.obj.ArpSuppressionCache = []*otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache{} + } + if obj.arpSuppressionCacheHolder == nil { + obj.arpSuppressionCacheHolder = newVxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter(&obj.obj.ArpSuppressionCache).setMsg(obj) + } + return obj.arpSuppressionCacheHolder +} + +type vxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter struct { + obj *vxlanV6TunnelDestinationIPModeUnicastVtep + vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice []VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + fieldPtr *[]*otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache +} + +func newVxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter(ptr *[]*otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + return &vxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter{fieldPtr: ptr} +} + +type VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter interface { + setMsg(*vxlanV6TunnelDestinationIPModeUnicastVtep) VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter + Items() []VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + Add() VxlanTunnelDestinationIPModeUnicastArpSuppressionCache + Append(items ...VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter + Set(index int, newObj VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter + Clear() VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter + clearHolderSlice() VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter + appendHolderSlice(item VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) setMsg(msg *vxlanV6TunnelDestinationIPModeUnicastVtep) VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + obj.clearHolderSlice() + for _, val := range *obj.fieldPtr { + obj.appendHolderSlice(&vxlanTunnelDestinationIPModeUnicastArpSuppressionCache{obj: val}) + } + obj.obj = msg + return obj +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) Items() []VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { + return obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) Add() VxlanTunnelDestinationIPModeUnicastArpSuppressionCache { + newObj := &otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache{} + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + newLibObj := &vxlanTunnelDestinationIPModeUnicastArpSuppressionCache{obj: newObj} + newLibObj.setDefault() + obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice = append(obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice, newLibObj) + return newLibObj +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) Append(items ...VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + for _, item := range items { + newObj := item.msg() + *obj.fieldPtr = append(*obj.fieldPtr, newObj) + obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice = append(obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice, item) + } + return obj +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) Set(index int, newObj VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + (*obj.fieldPtr)[index] = newObj.msg() + obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice[index] = newObj + return obj +} +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) Clear() VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + if len(*obj.fieldPtr) > 0 { + *obj.fieldPtr = []*otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCache{} + obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice = []VxlanTunnelDestinationIPModeUnicastArpSuppressionCache{} + } + return obj +} +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) clearHolderSlice() VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + if len(obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice) > 0 { + obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice = []VxlanTunnelDestinationIPModeUnicastArpSuppressionCache{} + } + return obj +} +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter) appendHolderSlice(item VxlanTunnelDestinationIPModeUnicastArpSuppressionCache) VxlanV6TunnelDestinationIPModeUnicastVtepVxlanTunnelDestinationIPModeUnicastArpSuppressionCacheIter { + obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice = append(obj.vxlanTunnelDestinationIPModeUnicastArpSuppressionCacheSlice, item) + return obj +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + + if obj.obj.RemoteVtepAddress != nil { + + err := obj.validateIpv6(obj.RemoteVtepAddress()) + if err != nil { + vObj.validationErrors = append(vObj.validationErrors, fmt.Sprintf("%s %s", err.Error(), "on VxlanV6TunnelDestinationIPModeUnicastVtep.RemoteVtepAddress")) + } + + } + + if len(obj.obj.ArpSuppressionCache) != 0 { + + if set_default { + obj.ArpSuppressionCache().clearHolderSlice() + for _, item := range obj.obj.ArpSuppressionCache { + obj.ArpSuppressionCache().appendHolderSlice(&vxlanTunnelDestinationIPModeUnicastArpSuppressionCache{obj: item}) + } + } + for _, item := range obj.ArpSuppressionCache().Items() { + item.validateObj(vObj, set_default) + } + + } + +} + +func (obj *vxlanV6TunnelDestinationIPModeUnicastVtep) setDefault() { + +} diff --git a/gosnappi/warning.go b/gosnappi/warning.go new file mode 100644 index 00000000..074cd0f1 --- /dev/null +++ b/gosnappi/warning.go @@ -0,0 +1,305 @@ +package gosnappi + +import ( + "fmt" + "strings" + + "github.com/ghodss/yaml" + otg "github.com/open-traffic-generator/snappi/gosnappi/otg" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +// ***** Warning ***** +type warning struct { + validation + obj *otg.Warning + marshaller marshalWarning + unMarshaller unMarshalWarning +} + +func NewWarning() Warning { + obj := warning{obj: &otg.Warning{}} + obj.setDefault() + return &obj +} + +func (obj *warning) msg() *otg.Warning { + return obj.obj +} + +func (obj *warning) setMsg(msg *otg.Warning) Warning { + + proto.Merge(obj.obj, msg) + return obj +} + +type marshalwarning struct { + obj *warning +} + +type marshalWarning interface { + // ToProto marshals Warning to protobuf object *otg.Warning + ToProto() (*otg.Warning, error) + // ToPbText marshals Warning to protobuf text + ToPbText() (string, error) + // ToYaml marshals Warning to YAML text + ToYaml() (string, error) + // ToJson marshals Warning to JSON text + ToJson() (string, error) +} + +type unMarshalwarning struct { + obj *warning +} + +type unMarshalWarning interface { + // FromProto unmarshals Warning from protobuf object *otg.Warning + FromProto(msg *otg.Warning) (Warning, error) + // FromPbText unmarshals Warning from protobuf text + FromPbText(value string) error + // FromYaml unmarshals Warning from YAML text + FromYaml(value string) error + // FromJson unmarshals Warning from JSON text + FromJson(value string) error +} + +func (obj *warning) Marshal() marshalWarning { + if obj.marshaller == nil { + obj.marshaller = &marshalwarning{obj: obj} + } + return obj.marshaller +} + +func (obj *warning) Unmarshal() unMarshalWarning { + if obj.unMarshaller == nil { + obj.unMarshaller = &unMarshalwarning{obj: obj} + } + return obj.unMarshaller +} + +func (m *marshalwarning) ToProto() (*otg.Warning, error) { + err := m.obj.validateToAndFrom() + if err != nil { + return nil, err + } + return m.obj.msg(), nil +} + +func (m *unMarshalwarning) FromProto(msg *otg.Warning) (Warning, error) { + newObj := m.obj.setMsg(msg) + err := newObj.validateToAndFrom() + if err != nil { + return nil, err + } + return newObj, nil +} + +func (m *marshalwarning) ToPbText() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + protoMarshal, err := proto.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(protoMarshal), nil +} + +func (m *unMarshalwarning) FromPbText(value string) error { + retObj := proto.Unmarshal([]byte(value), m.obj.msg()) + if retObj != nil { + return retObj + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return retObj +} + +func (m *marshalwarning) ToYaml() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + data, err = yaml.JSONToYAML(data) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalwarning) FromYaml(value string) error { + if value == "" { + value = "{}" + } + data, err := yaml.YAMLToJSON([]byte(value)) + if err != nil { + return err + } + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + uError := opts.Unmarshal([]byte(data), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return vErr + } + return nil +} + +func (m *marshalwarning) ToJson() (string, error) { + vErr := m.obj.validateToAndFrom() + if vErr != nil { + return "", vErr + } + opts := protojson.MarshalOptions{ + UseProtoNames: true, + AllowPartial: true, + EmitUnpopulated: false, + Indent: " ", + } + data, err := opts.Marshal(m.obj.msg()) + if err != nil { + return "", err + } + return string(data), nil +} + +func (m *unMarshalwarning) FromJson(value string) error { + opts := protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + if value == "" { + value = "{}" + } + uError := opts.Unmarshal([]byte(value), m.obj.msg()) + if uError != nil { + return fmt.Errorf("unmarshal error %s", strings.Replace( + uError.Error(), "\u00a0", " ", -1)[7:]) + } + + err := m.obj.validateToAndFrom() + if err != nil { + return err + } + return nil +} + +func (obj *warning) validateToAndFrom() error { + // emptyVars() + obj.validateObj(&obj.validation, true) + return obj.validationResult() +} + +func (obj *warning) validate() error { + // emptyVars() + obj.validateObj(&obj.validation, false) + return obj.validationResult() +} + +func (obj *warning) String() string { + str, err := obj.Marshal().ToYaml() + if err != nil { + return err.Error() + } + return str +} + +func (obj *warning) Clone() (Warning, error) { + vErr := obj.validate() + if vErr != nil { + return nil, vErr + } + newObj := NewWarning() + data, err := proto.Marshal(obj.msg()) + if err != nil { + return nil, err + } + pbErr := proto.Unmarshal(data, newObj.msg()) + if pbErr != nil { + return nil, pbErr + } + return newObj, nil +} + +// Warning is a list of warnings that have occurred while executing the request. +type Warning interface { + Validation + // msg marshals Warning to protobuf object *otg.Warning + // and doesn't set defaults + msg() *otg.Warning + // setMsg unmarshals Warning from protobuf object *otg.Warning + // and doesn't set defaults + setMsg(*otg.Warning) Warning + // provides marshal interface + Marshal() marshalWarning + // provides unmarshal interface + Unmarshal() unMarshalWarning + // validate validates Warning + validate() error + // A stringer function + String() string + // Clones the object + Clone() (Warning, error) + validateToAndFrom() error + validateObj(vObj *validation, set_default bool) + setDefault() + // Warnings returns []string, set in Warning. + Warnings() []string + // SetWarnings assigns []string provided by user to Warning + SetWarnings(value []string) Warning +} + +// A list of any system specific warnings that have occurred while +// executing the request. +// Warnings returns a []string +func (obj *warning) Warnings() []string { + if obj.obj.Warnings == nil { + obj.obj.Warnings = make([]string, 0) + } + return obj.obj.Warnings +} + +// A list of any system specific warnings that have occurred while +// executing the request. +// SetWarnings sets the []string value in the Warning object +func (obj *warning) SetWarnings(value []string) Warning { + + if obj.obj.Warnings == nil { + obj.obj.Warnings = make([]string, 0) + } + obj.obj.Warnings = value + + return obj +} + +func (obj *warning) validateObj(vObj *validation, set_default bool) { + if set_default { + obj.setDefault() + } + +} + +func (obj *warning) setDefault() { + +} diff --git a/setup.py b/setup.py index be425c8e..8310da2a 100644 --- a/setup.py +++ b/setup.py @@ -46,9 +46,8 @@ python_requires=">=2.7, <4", install_requires=install_requires, extras_require={ - "ixnetwork": ["snappi_ixnetwork==0.9.1"], + "ixnetwork": ["snappi_ixnetwork==1.13.0"], "trex": ["snappi_trex"], - "convergence": ["snappi_convergence==0.4.1"], "testing": ["pytest", "flask"], "telemetry": ["opentelemetry-api==1.17.0 ; python_version >= '3.7'", "opentelemetry-sdk ; python_version >= '3.7'", diff --git a/snappi/__init__.py b/snappi/__init__.py index 1af1c054..fc2bceb8 100644 --- a/snappi/__init__.py +++ b/snappi/__init__.py @@ -31,12 +31,44 @@ from .snappi import Device from .snappi import DeviceEthernet from .snappi import EthernetConnection +from .snappi import EthernetSimulatedLink from .snappi import DeviceIpv4 from .snappi import DeviceIpv4GatewayMAC from .snappi import DeviceIpv4Iter from .snappi import DeviceIpv6 from .snappi import DeviceIpv6GatewayMAC from .snappi import DeviceIpv6Iter +from .snappi import DeviceDhcpv4client +from .snappi import Dhcpv4ClientParams +from .snappi import DeviceDhcpv4clientIter +from .snappi import DeviceDhcpv6client +from .snappi import DeviceDhcpv6clientIaType +from .snappi import DeviceDhcpv6clientIaTimeValue +from .snappi import DeviceDhcpv6clientDuidType +from .snappi import DeviceDhcpv6clientNoDuid +from .snappi import DeviceDhcpv6clientDuidValue +from .snappi import DeviceDhcpv6ClientOptionsRequest +from .snappi import Dhcpv6ClientOptionsOptionsRequest +from .snappi import Dhcpv6ClientOptionsCustom +from .snappi import Dhcpv6ClientOptionsOptionsRequestIter +from .snappi import Dhcpv6ClientOptionsIncludedMessages +from .snappi import Dhcpv6ClientOptionsMessageType +from .snappi import Dhcpv6ClientOptionsMessageTypeIter +from .snappi import DeviceDhcpv6ClientOptions +from .snappi import Dhcpv6ClientOptionsServerIdentifier +from .snappi import Dhcpv6ClientOptionsDuidLlt +from .snappi import Dhcpv6ClientOptionsLinkLayerAddress +from .snappi import Dhcpv6ClientOptionsDuidEn +from .snappi import Dhcpv6ClientOptionsDuidLl +from .snappi import Dhcpv6ClientOptionsDuidUuid +from .snappi import Dhcpv6ClientOptionsDuidUuidVersion +from .snappi import Dhcpv6ClientOptionsDuidUuidVariant +from .snappi import Dhcpv6ClientOptionsVendorClass +from .snappi import Dhcpv6ClientOptionsVendorInfo +from .snappi import Dhcpv6OptionsVendorSpecificOptions +from .snappi import Dhcpv6OptionsVendorSpecificOptionsIter +from .snappi import Dhcpv6ClientOptionsFqdn +from .snappi import DeviceDhcpv6clientIter from .snappi import DeviceEthernetIter from .snappi import DeviceIpv4Loopback from .snappi import DeviceIpv4LoopbackIter @@ -176,12 +208,46 @@ from .snappi import BgpAttributesCustomCommunity from .snappi import BgpAttributesCommunityIter from .snappi import BgpAttributesOriginatorId +from .snappi import BgpAttributesTunnelEncapsulation +from .snappi import BgpAttributesSegmentRoutingPolicy +from .snappi import BgpAttributesBsid +from .snappi import BgpAttributesBsidMpls +from .snappi import BgpAttributesSidMpls +from .snappi import BgpAttributesBsidSrv6 +from .snappi import BgpAttributesSrv6Bsid +from .snappi import BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure +from .snappi import BgpAttributesSrv6BsidIter +from .snappi import BgpAttributesSrPolicyPreference +from .snappi import BgpAttributesSrPolicyPriority +from .snappi import BgpAttributesSrPolicyPolicyName +from .snappi import BgpAttributesSrPolicyPolicyCandidateName +from .snappi import BgpAttributesSrPolicyExplicitNullPolicy +from .snappi import BgpAttributesSrPolicySegmentList +from .snappi import BgpAttributesSegmentRoutingPolicySegmentListWeight +from .snappi import BgpAttributesSegmentRoutingPolicySegmentListSegment +from .snappi import BgpAttributesSegmentRoutingPolicyTypeA +from .snappi import BgpAttributesSegmentRoutingPolicyTypeFlags +from .snappi import BgpAttributesSegmentRoutingPolicyTypeB +from .snappi import BgpAttributesSegmentRoutingPolicyTypeC +from .snappi import BgpAttributesSegmentRoutingPolicyTypeD +from .snappi import BgpAttributesSegmentRoutingPolicyTypeE +from .snappi import BgpAttributesSegmentRoutingPolicyTypeF +from .snappi import BgpAttributesSegmentRoutingPolicyTypeG +from .snappi import BgpAttributesSegmentRoutingPolicyTypeH +from .snappi import BgpAttributesSegmentRoutingPolicyTypeI +from .snappi import BgpAttributesSidSrv6 +from .snappi import BgpAttributesSegmentRoutingPolicyTypeJ +from .snappi import BgpAttributesSegmentRoutingPolicyTypeK +from .snappi import BgpAttributesSegmentRoutingPolicySegmentListSegmentIter +from .snappi import BgpAttributesSrPolicySegmentListIter from .snappi import BgpAttributesMpReachNlri from .snappi import BgpOneIpv4NLRIPrefix from .snappi import BgpNLRIPrefixPathId from .snappi import BgpOneIpv4NLRIPrefixIter from .snappi import BgpOneIpv6NLRIPrefix from .snappi import BgpOneIpv6NLRIPrefixIter +from .snappi import BgpIpv4SrPolicyNLRIPrefix +from .snappi import BgpIpv6SrPolicyNLRIPrefix from .snappi import BgpAttributesMpUnreachNlri from .snappi import BgpOneTraditionalNlriPrefix from .snappi import BgpOneTraditionalNlriPrefixIter @@ -235,6 +301,55 @@ from .snappi import RsvpEroSubobjectIter from .snappi import RsvpLspIpv4InterfaceP2PIngressIpv4LspIter from .snappi import RsvpLspIpv4InterfaceIter +from .snappi import DeviceDhcpServer +from .snappi import DhcpServerV4 +from .snappi import DhcpServerV4Pool +from .snappi import DhcpServerV4PoolOption +from .snappi import DhcpServerV4PoolIter +from .snappi import DhcpServerV4Iter +from .snappi import DhcpServerV6 +from .snappi import DhcpV6ServerLease +from .snappi import Dhcpv6ServerIaType +from .snappi import Dhcpv6ServerPoolInfo +from .snappi import Dhcpv6ServerIapdPoolInfo +from .snappi import Dhcpv6ServerIanapdPoolInfo +from .snappi import DhcpV6ServerLeaseIter +from .snappi import Dhcpv6ServerOptions +from .snappi import DhcpV6ServerDns +from .snappi import DhcpV6ServerSecondaryDns +from .snappi import DhcpV6ServerSecondaryDnsIter +from .snappi import Dhcpv6ServerOptionsVendorInfo +from .snappi import Dhcpv6ServerOptionsIncludedMessages +from .snappi import Dhcpv6ServerOptionsMessageType +from .snappi import Dhcpv6ServerOptionsMessageTypeIter +from .snappi import Dhcpv6ServerOptionsBootfileUrl +from .snappi import Dhcpv6ServerOptionsBootFileParams +from .snappi import Dhcpv6ServerOptionsBootFileParamsIter +from .snappi import DhcpServerV6Iter +from .snappi import DeviceOspfv2Router +from .snappi import Ospfv2RouterId +from .snappi import Ospfv2GracefulRestart +from .snappi import Ospfv2Options +from .snappi import Ospfv2Interface +from .snappi import Ospfv2InterfaceArea +from .snappi import Ospfv2InterfaceNetworkType +from .snappi import Ospfv2InterfaceNeighbor +from .snappi import Ospfv2InterfaceNeighborIter +from .snappi import Ospfv2InterfaceAuthentication +from .snappi import Ospfv2AuthenticationMd5 +from .snappi import Ospfv2AuthenticationMd5Iter +from .snappi import Ospfv2InterfaceAdvanced +from .snappi import Ospfv2InterfaceLinkProtection +from .snappi import Ospfv2InterfaceIter +from .snappi import Ospfv2V4RouteRange +from .snappi import Ospfv2V4RRRouteOrigin +from .snappi import Ospfv2V4RRIntraArea +from .snappi import Ospfv2V4RRExtdPrefixFlags +from .snappi import Ospfv2V4RRInterArea +from .snappi import Ospfv2V4RRExternalType1 +from .snappi import Ospfv2V4RRExternalType2 +from .snappi import Ospfv2V4RRNssaExternal +from .snappi import Ospfv2V4RouteRangeIter from .snappi import DeviceIter from .snappi import Flow from .snappi import FlowTxRx @@ -380,10 +495,13 @@ from .snappi import PatternFlowIpv4SrcCounter from .snappi import PatternFlowIpv4SrcMetricTag from .snappi import PatternFlowIpv4SrcMetricTagIter +from .snappi import FlowIpv4Auto +from .snappi import PatternFlowIpv4SrcRandom from .snappi import PatternFlowIpv4Dst from .snappi import PatternFlowIpv4DstCounter from .snappi import PatternFlowIpv4DstMetricTag from .snappi import PatternFlowIpv4DstMetricTagIter +from .snappi import PatternFlowIpv4DstRandom from .snappi import FlowIpv4Options from .snappi import FlowIpv4OptionsCustom from .snappi import FlowIpv4OptionsCustomType @@ -408,6 +526,7 @@ from .snappi import PatternFlowIpv6FlowLabelCounter from .snappi import PatternFlowIpv6FlowLabelMetricTag from .snappi import PatternFlowIpv6FlowLabelMetricTagIter +from .snappi import PatternFlowIpv6FlowLabelRandom from .snappi import PatternFlowIpv6PayloadLength from .snappi import PatternFlowIpv6PayloadLengthCounter from .snappi import PatternFlowIpv6PayloadLengthMetricTag @@ -424,6 +543,7 @@ from .snappi import PatternFlowIpv6SrcCounter from .snappi import PatternFlowIpv6SrcMetricTag from .snappi import PatternFlowIpv6SrcMetricTagIter +from .snappi import FlowIpv6Auto from .snappi import PatternFlowIpv6Dst from .snappi import PatternFlowIpv6DstCounter from .snappi import PatternFlowIpv6DstMetricTag @@ -507,10 +627,12 @@ from .snappi import PatternFlowTcpSrcPortCounter from .snappi import PatternFlowTcpSrcPortMetricTag from .snappi import PatternFlowTcpSrcPortMetricTagIter +from .snappi import PatternFlowTcpSrcPortRandom from .snappi import PatternFlowTcpDstPort from .snappi import PatternFlowTcpDstPortCounter from .snappi import PatternFlowTcpDstPortMetricTag from .snappi import PatternFlowTcpDstPortMetricTagIter +from .snappi import PatternFlowTcpDstPortRandom from .snappi import PatternFlowTcpSeqNum from .snappi import PatternFlowTcpSeqNumCounter from .snappi import PatternFlowTcpSeqNumMetricTag @@ -563,15 +685,18 @@ from .snappi import PatternFlowTcpWindowCounter from .snappi import PatternFlowTcpWindowMetricTag from .snappi import PatternFlowTcpWindowMetricTagIter +from .snappi import PatternFlowTcpChecksum from .snappi import FlowUdp from .snappi import PatternFlowUdpSrcPort from .snappi import PatternFlowUdpSrcPortCounter from .snappi import PatternFlowUdpSrcPortMetricTag from .snappi import PatternFlowUdpSrcPortMetricTagIter +from .snappi import PatternFlowUdpSrcPortRandom from .snappi import PatternFlowUdpDstPort from .snappi import PatternFlowUdpDstPortCounter from .snappi import PatternFlowUdpDstPortMetricTag from .snappi import PatternFlowUdpDstPortMetricTagIter +from .snappi import PatternFlowUdpDstPortRandom from .snappi import PatternFlowUdpLength from .snappi import PatternFlowUdpLengthCounter from .snappi import PatternFlowUdpLengthMetricTag @@ -1012,6 +1137,9 @@ from .snappi import LldpPortId from .snappi import LldpPortInterfaceNameSubType from .snappi import LldpSystemName +from .snappi import LldpOrgInfo +from .snappi import LldpOrgInfoType +from .snappi import LldpOrgInfoIter from .snappi import LldpIter from .snappi import Warning from .snappi import Error @@ -1031,6 +1159,8 @@ from .snappi import StateProtocolBgpPeers from .snappi import StateProtocolIsis from .snappi import StateProtocolIsisRouters +from .snappi import StateProtocolOspfv2 +from .snappi import StateProtocolOspfv2Routers from .snappi import StateTraffic from .snappi import StateTrafficFlowTransmit from .snappi import ControlAction @@ -1053,6 +1183,7 @@ from .snappi import DeviceBgpFiniteStateMachineError from .snappi import DeviceBgpCustomError from .snappi import ActionProtocolBgpInitiateGracefulRestart +from .snappi import ActionProtocolBgpGracefulRestartNotification from .snappi import ControlActionResponse from .snappi import ActionResponse from .snappi import ActionResponseProtocol @@ -1077,6 +1208,11 @@ from .snappi import LacpMetricsRequest from .snappi import LldpMetricsRequest from .snappi import RsvpMetricsRequest +from .snappi import Dhcpv4ClientMetricsRequest +from .snappi import Dhcpv4ServerMetricsRequest +from .snappi import Dhcpv6ClientMetricsRequest +from .snappi import Dhcpv6ServerMetricsRequest +from .snappi import Ospfv2MetricsRequest from .snappi import MetricsResponse from .snappi import PortMetric from .snappi import PortMetricIter @@ -1103,6 +1239,16 @@ from .snappi import LldpMetricIter from .snappi import RsvpMetric from .snappi import RsvpMetricIter +from .snappi import Dhcpv4ClientMetric +from .snappi import Dhcpv4ClientMetricIter +from .snappi import Dhcpv4ServerMetric +from .snappi import Dhcpv4ServerMetricIter +from .snappi import Dhcpv6ClientMetric +from .snappi import Dhcpv6ClientMetricIter +from .snappi import Dhcpv6ServerMetric +from .snappi import Dhcpv6ServerMetricIter +from .snappi import Ospfv2Metric +from .snappi import Ospfv2MetricIter from .snappi import StatesRequest from .snappi import Neighborsv4StatesRequest from .snappi import Neighborsv6StatesRequest @@ -1114,6 +1260,11 @@ from .snappi import IsisLspsStateRequest from .snappi import LldpNeighborsStateRequest from .snappi import RsvpLspsStateRequest +from .snappi import Dhcpv4InterfaceStateRequest +from .snappi import Dhcpv4LeaseStateRequest +from .snappi import Dhcpv6InterfaceStateRequest +from .snappi import Dhcpv6LeaseStateRequest +from .snappi import Ospfv2LsasStateRequest from .snappi import StatesResponse from .snappi import Neighborsv4State from .snappi import Neighborsv4StateIter @@ -1123,6 +1274,23 @@ from .snappi import BgpPrefixIpv4UnicastState from .snappi import ResultBgpCommunity from .snappi import ResultBgpCommunityIter +from .snappi import ResultExtendedCommunity +from .snappi import ResultExtendedCommunityStructured +from .snappi import ResultExtendedCommunityTransitive2OctetAsType +from .snappi import ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget +from .snappi import ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin +from .snappi import ResultExtendedCommunityTransitiveIpv4AddressType +from .snappi import ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget +from .snappi import ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin +from .snappi import ResultExtendedCommunityTransitive4OctetAsType +from .snappi import ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget +from .snappi import ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin +from .snappi import ResultExtendedCommunityTransitiveOpaqueType +from .snappi import ResultExtendedCommunityTransitiveOpaqueTypeColor +from .snappi import ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation +from .snappi import ResultExtendedCommunityNonTransitive2OctetAsType +from .snappi import ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth +from .snappi import ResultExtendedCommunityIter from .snappi import ResultBgpAsPath from .snappi import ResultBgpAsPathSegment from .snappi import ResultBgpAsPathSegmentIter @@ -1174,6 +1342,41 @@ from .snappi import RsvpLspIpv4EroIter from .snappi import RsvpIPv4LspStateIter from .snappi import RsvpLspsStateIter +from .snappi import Dhcpv4InterfaceState +from .snappi import Dhcpv4InterfaceStateIter +from .snappi import Dhcpv4LeasesState +from .snappi import Dhcpv4LeaseState +from .snappi import Dhcpv4LeaseStateIter +from .snappi import Dhcpv4LeasesStateIter +from .snappi import Dhcpv6InterfaceState +from .snappi import Dhcpv6InterfaceIapd +from .snappi import Dhcpv6InterfaceIapdIter +from .snappi import Dhcpv6InterfaceIa +from .snappi import Dhcpv6InterfaceIaIter +from .snappi import Dhcpv6InterfaceStateIter +from .snappi import Dhcpv6LeasesState +from .snappi import Dhcpv6ServerLeaseState +from .snappi import Dhcpv6ServerLeaseStateIter +from .snappi import Dhcpv6LeasesStateIter +from .snappi import Ospfv2LsaState +from .snappi import Ospfv2RouterLsa +from .snappi import Ospfv2LsaHeader +from .snappi import Ospfv2Link +from .snappi import Ospfv2LinkIter +from .snappi import Ospfv2RouterLsaIter +from .snappi import Ospfv2NetworkLsa +from .snappi import Ospfv2NetworkLsaIter +from .snappi import Ospfv2NetworkSummaryLsa +from .snappi import Ospfv2NetworkSummaryLsaIter +from .snappi import Ospfv2SummaryAsLsa +from .snappi import Ospfv2SummaryAsLsaIter +from .snappi import Ospfv2ExternalAsLsa +from .snappi import Ospfv2ExternalAsLsaIter +from .snappi import Ospfv2NssaLsa +from .snappi import Ospfv2NssaLsaIter +from .snappi import Ospfv2OpaqueLsa +from .snappi import Ospfv2OpaqueLsaIter +from .snappi import Ospfv2LsaStateIter from .snappi import CaptureRequest from .snappi import Version from .snappi import Api diff --git a/snappi/docs/openapi.yaml b/snappi/docs/openapi.yaml index e5457cea..ce11df7f 100644 --- a/snappi/docs/openapi.yaml +++ b/snappi/docs/openapi.yaml @@ -7,7 +7,7 @@ info: \ issue](https://github.com/open-traffic-generator/models/issues) in the models\ \ repository\n- [fork the models repository](https://github.com/open-traffic-generator/models)\ \ and submit a PR" - version: 1.1.0 + version: 1.17.0 contact: url: https://github.com/open-traffic-generator/models license: @@ -530,12 +530,11 @@ components: Base Ethernet interface. type: object required: - - mac - name properties: mac: description: |- - Media Access Control address. + Media Access Control address.The implementation should ensure that the 'mac' field is explicitly configured by the user for all types of interfaces as denoted by 'connection' attribute except 'simulated_link' where 'mac' is not mandatory. type: string format: mac x-field-uid: 1 @@ -563,7 +562,7 @@ components: x-unique: global Device.Ethernet: description: |- - An Ethernet interface with IPv4 and IPv6 addresses. + An Ethernet interface with IPv4 and IPv6 addresses. The implementation should ensure that the 'mac' field is explicitly configured by the user for all types of interfaces as denoted by 'connection' attribute except 'simulated_link' where MAC is not mandatory. type: object properties: connection: @@ -588,7 +587,7 @@ components: mac: x-field-uid: 5 description: |- - Media Access Control address. + Media Access Control address.The implementation should ensure that the 'mac' field is explicitly configured by the user for all types of interfaces as denoted by 'connection' attribute except 'simulated_link' where 'mac' is not mandatory. type: string format: mac mtu: @@ -613,17 +612,29 @@ components: type: string pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ x-unique: global + dhcpv4_interfaces: + description: "List of DHCPv4 Clients Configuration. " + type: array + items: + $ref: '#/components/schemas/Device.Dhcpv4client' + x-field-uid: 9 + dhcpv6_interfaces: + description: |- + List of DHCPv6 Clients Configuration. + type: array + items: + $ref: '#/components/schemas/Device.Dhcpv6client' + x-field-uid: 10 required: - - mac - name Ethernet.Connection: description: |- - Ethernet interface connection to a port, LAG or VXLAN tunnel. + Ethernet interface connection to a port, LAG, VXLAN tunnel or a Simulated Internal Link used to create simulated topologies behind an emulated router. type: object properties: choice: description: |- - port_name, lag_name or vxlan_name + port_name, lag_name, vxlan_name or simulated_link type: string x-field-uid: 1 x-enum: @@ -633,10 +644,13 @@ components: x-field-uid: 2 vxlan_name: x-field-uid: 3 + simulated_link: + x-field-uid: 4 enum: - port_name - lag_name - vxlan_name + - simulated_link port_name: description: | Name of the port that the Ethernet interface is configured on. @@ -682,6 +696,58 @@ components: - '#/components/schemas/Vxlan.V4Tunnel/properties/name' - '#/components/schemas/Vxlan.V6Tunnel/properties/name' x-field-uid: 4 + simulated_link: + x-field-uid: 5 + $ref: '#/components/schemas/Ethernet.SimulatedLink' + Ethernet.SimulatedLink: + description: |- + Details of the internal link which can be used to create simulated device topologies behind an emulated router. MAC, VLAN and MTU information for the internal links are not used for purposes of emulating Simulated Topologies ( e.g. by ISIS Emulated Router behind which this is configured ) + type: object + properties: + remote_simulated_link: + type: string + description: "Name of the remote end of the simulated interface which also\ + \ must be a simulated_link on a device which might be acting either as\ + \ an unconnected device in a simulated topology \n( all ethernet links\ + \ of type simulated_link ) or an emulated device connected to the Device\ + \ Under Test (has at atleast one ethernet interface with connection to\ + \ the port or\n lag connected to the DUT)\n\nx-constraint:\n- #/components/schemas/Device.Ethernet/properties/name\n\ + \n\nx-constraint:\n- #/components/schemas/Device.Ethernet/properties/name\n" + x-constraint: + - '#/components/schemas/Device.Ethernet/properties/name' + x-field-uid: 1 + link_type: + description: "By default, simulated links are treated as Primary links ,\ + \ which means that the intention is for connected device to advertise\ + \ this and full topology of devices connected to it.\ne.g. when advertised\ + \ as ISIS Simulated Topology.\n\nAll simulated links inside one topology\ + \ subset would normally can point to only other unconnected devices in\ + \ the same topology or to the 'root' emulated device.\nIf a link is designated\ + \ as secondary , only that link information will be advertised by the\ + \ IGP e.g. ISIS , and not the entire topology behind it.\nThe optional\ + \ secondary option allows emulation of external link scenarios where a\ + \ simulated device (e.g. part of a ISIS simulated topology ) is advertised\ + \ as reachable part of the topology \nby the emulated router behind which\ + \ this is configured , as well as the other end of the secondary link\ + \ which could be \n- 1) either a simulated device behind a different emulated\ + \ router.\n- 2) or an emulated router on same or different port.\nThis\ + \ allows emulation of scenarios where one device/router is emulated to\ + \ be reachable from different Emulated Routers connected to the Device\ + \ Under Test. (e.g. for FRR scenarios)\n\nIf an implementation does not\ + \ support multiple primary links from same simulated topology i.e. full\ + \ topology advertised via multiple emulated routers, it should return\ + \ an error \nduring set_config operation with such a topology." + type: string + default: primary + x-enum: + primary: + x-field-uid: 1 + secondary: + x-field-uid: 2 + x-field-uid: 2 + enum: + - primary + - secondary Device.Vlan: description: |- Emulated VLAN protocol. @@ -947,3341 +1013,3661 @@ components: format: mac default: 00:00:00:00:00:00 x-field-uid: 3 - Layer1: + Device.Dhcpv4client: description: |- - A container for layer1 settings. + Configuration for emulated DHCPv4 Client on a single Interface. https://www.rfc-editor.org/rfc/rfc2131.html type: object required: - - port_names - name properties: - port_names: - description: "A list of unique names of port objects that will share the\n\ - choice settings. \n\nx-constraint:\n- /components/schemas/Port/properties/name\n\ - \n\nx-constraint:\n- /components/schemas/Port/properties/name\n" - type: array - items: - type: string - x-constraint: - - /components/schemas/Port/properties/name + name: x-field-uid: 1 - speed: description: |- - Set the speed if supported. When no speed is explicitly set, the current - speed of underlying test interface shall be assumed. + Globally unique name of an object. It also serves as the primary key for arrays of objects. type: string - x-field-uid: 2 - x-enum: - speed_10_fd_mbps: - x-field-uid: 1 - speed_10_hd_mbps: - x-field-uid: 2 - speed_100_fd_mbps: - x-field-uid: 3 - speed_100_hd_mbps: - x-field-uid: 4 - speed_1_gbps: - x-field-uid: 5 - speed_10_gbps: - x-field-uid: 6 - speed_25_gbps: - x-field-uid: 7 - speed_40_gbps: - x-field-uid: 8 - speed_50_gbps: - x-field-uid: 9 - speed_100_gbps: - x-field-uid: 10 - speed_200_gbps: - x-field-uid: 11 - speed_400_gbps: - x-field-uid: 12 - speed_800_gbps: - x-field-uid: 13 - enum: - - speed_10_fd_mbps - - speed_10_hd_mbps - - speed_100_fd_mbps - - speed_100_hd_mbps - - speed_1_gbps - - speed_10_gbps - - speed_25_gbps - - speed_40_gbps - - speed_50_gbps - - speed_100_gbps - - speed_200_gbps - - speed_400_gbps - - speed_800_gbps - media: + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + choice: description: |- - Set the type of media for test interface if supported. When no media - type is explicitly set, the current media type of underlying test - interface shall be assumed. + The client receives one or more DHCPOFFER messages from one or more servers and client may choose to wait for multiple responses. + The client chooses one server from which to request configuration + parameters, based on the configuration parameters offered in the DHCPOFFER messages. + - first_server: if selected, the subnet accepts the IP addresses offered by the first server to respond with an offer of IP addresses. + - server_address: The address of the DHCP server from which the subnet will accept IP addresses. type: string - x-field-uid: 3 + default: first_server + x-field-uid: 2 x-enum: - copper: + first_server: x-field-uid: 1 - fiber: + server_address: x-field-uid: 2 - sgmii: - x-field-uid: 3 enum: - - copper - - fiber - - sgmii - promiscuous: + - first_server + - server_address + server_address: description: |- - Enable promiscuous mode on test interface. A warning shall be raised if - this field is set to `true`, even when it's not supported, ignoring - the setting altogether. - type: boolean - default: true + The address of the DHCP server. + type: string + format: ipv4 x-field-uid: 4 - mtu: + broadcast: description: |- - Set the maximum transmission unit size. A warning shall be raised if - the specified value is valid but not supported, ignoring the setting altogether. - type: integer - format: uint32 - minimum: 64 - maximum: 9000 - default: 1500 + If the broadcast bit is set, then the server and relay agent broadcast DHCPOFFER and DHCPACK messages. + type: boolean + default: false x-field-uid: 5 - ieee_media_defaults: + parameters_request_list: description: |- - Under Review: This field is currently under review for pending exploration on use cases - - Under Review: This field is currently under review for pending exploration on use cases - - Set to true to override the auto_negotiate, link_training - and rs_fec settings for gigabit ethernet interfaces. - type: boolean + Optional parameters field request list of DHCPv4 Client. + $ref: '#/components/schemas/Dhcpv4Client.Params' x-field-uid: 6 - x-status: - status: under-review - information: This field is currently under review for pending exploration - on use cases - auto_negotiate: - description: |- - Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists. - - Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists. - - Enable/disable auto negotiation. - type: boolean - x-field-uid: 7 - x-status: - status: under-review - information: This field is currently under review for pending exploration - on use cases, given that a separate configuration called `AutoNegotiation` - already exists. - auto_negotiation: - $ref: '#/components/schemas/Layer1.AutoNegotiation' - x-field-uid: 8 - flow_control: - $ref: '#/components/schemas/Layer1.FlowControl' - x-field-uid: 9 - name: - x-field-uid: 10 - description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - Layer1.AutoNegotiation: + Dhcpv4Client.Params: description: |- - Configuration for auto negotiation settings + Configuration Parameter request list by emulated DHCPv4 Client. type: object properties: - advertise_1000_mbps: - description: |- - If auto_negotiate is true and the interface supports this option - then this speed will be advertised. + subnet_mask: + description: "Request for the subnet mask option specifies the client's\ + \ subnet mask as per RFC950. " type: boolean default: true x-field-uid: 1 - advertise_100_fd_mbps: + router: description: |- - If auto_negotiate is true and the interface supports this option - then this speed will be advertised. + Request for the router option that specifies a list of IP addresses for routers on the client's subnet. type: boolean default: true x-field-uid: 2 - advertise_100_hd_mbps: + renewal_timer: description: |- - If auto_negotiate is true and the interface supports this option - then this speed will be advertised. + Request for the renewal timer, T1. When the timer expires, the client transitions from the BOUND state to the RENEWING state. type: boolean - default: true + default: false x-field-uid: 3 - advertise_10_fd_mbps: + rebinding_timer: description: |- - If auto_negotiate is true and the interface supports this option - then this speed will be advertised. + Request for the rebinding timer (T2). When expires, the client transitions to the REBINDING state. type: boolean - default: true + default: false x-field-uid: 4 - advertise_10_hd_mbps: + Device.Dhcpv6client: + description: |- + Configuration for emulated DHCPv6 Client on a single Interface. If the DHCPv6 Client receives one or more DHCPv6 ADVERTISE messages from one or more servers then the client chooses one server from which to request configuration parameters, based on the configuration parameters offered by the server in the DHCPv6 ADVERTISE messages. If all configuration parameters match then the first server will be chosen. https://www.rfc-editor.org/rfc/rfc8415.html + type: object + required: + - name + properties: + name: + x-field-uid: 1 description: |- - If auto_negotiate is true and the interface supports this option - then this speed will be advertised. - type: boolean - default: true - x-field-uid: 5 - link_training: + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + rapid_commit: description: |- - Enable/disable gigabit ethernet link training. + If Rapid Commit is set, client initiates Rapid Commit two-message exchange by including Rapid Commit option in Solicit message. type: boolean default: false - x-field-uid: 6 - rs_fec: + x-field-uid: 2 + ia_type: + description: "Each IA has an associated IAID. Differnet IA options represent\ + \ different types of IPv6 addresses and parameters \naccepted by DHCPv6\ + \ clients each used in different context by an IPv6 node." + $ref: '#/components/schemas/Device.Dhcpv6client.IaType' + x-field-uid: 3 + duid_type: description: |- - Enable/disable gigabit ethernet reed solomon forward error correction (RS FEC). - type: boolean - default: false - x-field-uid: 7 - Layer1.FlowControl: + Each DHCP client and server has a DUID. DHCP clients and servers use DUIDs to identify each other. + $ref: '#/components/schemas/Device.Dhcpv6client.DuidType' + x-field-uid: 4 + options_request: + description: |- + The options requested by a client from a server in the options request option. + $ref: '#/components/schemas/Device.Dhcpv6Client.OptionsRequest' + x-field-uid: 5 + options: + description: |- + Optional DHCPv4 Client options that are sent in Dhcp client messages. + $ref: '#/components/schemas/Device.Dhcpv6Client.Options' + x-field-uid: 6 + Device.Dhcpv6Client.OptionsRequest: description: |- - A container for layer1 receive flow control settings. - To enable flow control settings on ports this object must be a valid - object not a null value. + DHCP client options, these configured options are sent in Dhcp client messages. type: object + required: + - request + - associated_dhcp_messages properties: - directed_address: + request: description: |- - The 48bit mac address that the layer1 port names will listen on - for a directed pause. - type: string - format: mac - default: 01:80:C2:00:00:01 + List of options requested by a client from a server. + type: array + items: + $ref: '#/components/schemas/Dhcpv6ClientOptions.OptionsRequest' + x-field-uid: 1 + associated_dhcp_messages: + description: |- + The list of dhcpv6 client messages where this option is included. + $ref: '#/components/schemas/Dhcpv6ClientOptions.IncludedMessages' + x-field-uid: 2 + Device.Dhcpv6Client.Options: + description: |- + DHCP client options, these configured options are sent in Dhcp client messages. + type: object + properties: + server_identifier: + description: "A client uses multicast to reach all servers or an individual\ + \ server. An individual server is indicated by \nspecifying that server's\ + \ DUID in a Server Identifier option in the client's message (all servers\ + \ will receive \nthis message but only the indicated server will respond).\ + \ All servers are indicated by not supplying this option. " + $ref: '#/components/schemas/Dhcpv6ClientOptions.ServerIdentifier' x-field-uid: 1 + vendor_class: + description: "The vendor class option is used by a client to identify the\ + \ vendor that manufactured the hardware on which \nthe client is running.\ + \ The information contained in the data area of this option is contained\ + \ in one or more \nopaque fields that identify details of the hardware\ + \ configuration." + $ref: '#/components/schemas/Dhcpv6ClientOptions.VendorClass' + x-field-uid: 2 + vendor_info: + description: |- + This option is used by clients to exchange vendor-specific information with servers. + $ref: '#/components/schemas/Dhcpv6ClientOptions.VendorInfo' + x-field-uid: 3 + fqdn: + description: "DHCPv6 server needs to know the FQDN of the client for the\ + \ addresses for the client's IA_NA bindings in order to \nupdate the IPv6-address-to-FQDN\ + \ mapping. This option allows the client to convey its FQDN to the server.\ + \ The Client \nFQDN option also contains Flags that DHCPv6 clients and\ + \ servers use to negotiate who does which update." + $ref: '#/components/schemas/Dhcpv6ClientOptions.Fqdn' + x-field-uid: 4 + Device.Dhcpv6client.IaType: + type: object + properties: choice: description: |- - The type of priority flow control. + Identity Association: Each IA has an associated IAID. IA_NA and IA_TA options represent different types of IPv6 addresses and parameters accepted by DHCPv6 clients each used in different context by an IPv6 node. IA_NA is the Identity Association for Non-temporary Addresses option. IA_TA is the Identity Association for Temporary Addresses option. IA_PD and IA_NAPD options represent one or more IPv6 prefix and parameters. IA_PD is the Identity Association for Prefix Delegation and IA_NAPD s the Identity Association for Temporary Prefix Delegation. type: string - default: ieee_802_1qbb - x-field-uid: 2 + default: iana + x-field-uid: 1 x-enum: - ieee_802_1qbb: + iana: x-field-uid: 1 - ieee_802_3x: + iata: x-field-uid: 2 + iapd: + x-field-uid: 3 + ianapd: + x-field-uid: 4 enum: - - ieee_802_1qbb - - ieee_802_3x - ieee_802_1qbb: - $ref: '#/components/schemas/Layer1.Ieee8021qbb' + - iana + - iata + - iapd + - ianapd + iana: + $ref: '#/components/schemas/Device.Dhcpv6client.IaTimeValue' + x-field-uid: 2 + iapd: + $ref: '#/components/schemas/Device.Dhcpv6client.IaTimeValue' x-field-uid: 3 - ieee_802_3x: - $ref: '#/components/schemas/Layer1.Ieee8023x' + ianapd: + $ref: '#/components/schemas/Device.Dhcpv6client.IaTimeValue' x-field-uid: 4 - Layer1.Ieee8023x: + Device.Dhcpv6client.IaTimeValue: description: |- - A container for ieee 802.3x rx pause settings - type: object - Layer1.Ieee8021qbb: - description: "These settings enhance the existing 802.3x pause priority capabilities\ - \ \nto enable flow control based on 802.1p priorities (classes of service). " + The container for the suggested times at which the client contacts the server or any available server. type: object properties: - pfc_delay: - description: "The upper limit on the transmit time of a queue after receiving\ - \ a \nmessage to pause a specified priority.\nA value of 0 or null indicates\ - \ that pfc delay will not be enabled. " + t1: + description: |- + The suggested time at which the client contacts the server from which the addresses were obtained to extend the lifetimes of the addresses assigned. T1 is a time duration relative to the current time expressed in units of seconds. If set to 0 server will ignore it. If the maximum value is specified it means infinite time. type: integer format: uint32 - default: 0 - maximum: 65535 + maximum: 4294967295 + default: 302400 x-field-uid: 1 - pfc_class_0: + t2: description: |- - The valid values are null, 0 - 7. - A null value indicates there is no setting for this pfc class. + The suggested time at which the client contacts any available server to extend the lifetimes of the addresses assigned. T2 is a time duration relative to the current time expressed in units of seconds. If set to 0 server will ignore it. If the maximum value is specified it means infinite time type: integer format: uint32 - maximum: 7 - default: 0 + maximum: 4294967295 + default: 483840 x-field-uid: 2 - pfc_class_1: + Device.Dhcpv6client.DuidType: + type: object + properties: + choice: description: |- - The valid values are null, 0 - 7. - A null value indicates there is no setting for this pfc class. - type: integer - format: uint32 - maximum: 7 - default: 1 + Each DHCP client and server has a DUID. DHCP clients use DUIDs to identify a server in messages where a server needs to be identified. + type: string + default: llt + x-field-uid: 1 + x-enum: + llt: + x-field-uid: 1 + en: + x-field-uid: 2 + ll: + x-field-uid: 3 + enum: + - llt + - en + - ll + llt: + $ref: '#/components/schemas/Device.Dhcpv6client.NoDuid' + x-field-uid: 2 + en: + $ref: '#/components/schemas/Device.Dhcpv6client.DuidValue' x-field-uid: 3 - pfc_class_2: - description: |- - The valid values are null, 0 - 7. - A null value indicates there is no setting for this pfc class. - type: integer - format: uint32 - maximum: 7 - default: 2 + ll: + $ref: '#/components/schemas/Device.Dhcpv6client.NoDuid' x-field-uid: 4 - pfc_class_3: - description: |- - The valid values are null, 0 - 7. - A null value indicates there is no setting for this pfc class. - type: integer - format: uint32 - maximum: 7 - default: 3 - x-field-uid: 5 - pfc_class_4: + Device.Dhcpv6client.DuidValue: + description: |- + The container for the DUID-EN. This consists of the 4-octet vendor's registered Private Enterprise Number as maintained by IANA [IANA-PEN] followed by a unique identifier assigned by the vendor. + type: object + properties: + enterprise_id: description: |- - The valid values are null, 0 - 7. - A null value indicates there is no setting for this pfc class. + 4-octet vendor's registered Private Enterprise Number as maintained by IANA [IANA-PEN]. type: integer format: uint32 - maximum: 7 - default: 4 - x-field-uid: 6 - pfc_class_5: + minimum: 1 + maximum: 2147483647 + default: 10 + x-field-uid: 1 + vendor_id: description: |- - The valid values are null, 0 - 7. - A null value indicates there is no setting for this pfc class. + Unique identifier assigned by the vendor. type: integer format: uint32 - maximum: 7 - default: 5 - x-field-uid: 7 - pfc_class_6: + minimum: 1 + maximum: 2147483647 + default: 10 + x-field-uid: 2 + Device.Dhcpv6client.NoDuid: + description: |- + The container for DUID-LL and DUID-LLT. + type: object + Dhcpv6ClientOptions.ServerIdentifier: + type: object + properties: + choice: description: |- - The valid values are null, 0 - 7. - A null value indicates there is no setting for this pfc class. + The Identifier option is used to carry a DUID. The option code is 2. The server identifier identifies a server. This option is used when client wants to contact a particular server. + type: string + default: duid_ll + x-field-uid: 1 + x-enum: + duid_llt: + x-field-uid: 1 + duid_en: + x-field-uid: 2 + duid_ll: + x-field-uid: 3 + duid_uuid: + x-field-uid: 4 + enum: + - duid_llt + - duid_en + - duid_ll + - duid_uuid + duid_llt: + $ref: '#/components/schemas/Dhcpv6ClientOptions.DuidLlt' + x-field-uid: 2 + duid_en: + $ref: '#/components/schemas/Dhcpv6ClientOptions.DuidEn' + x-field-uid: 3 + duid_ll: + $ref: '#/components/schemas/Dhcpv6ClientOptions.DuidLl' + x-field-uid: 4 + duid_uuid: + $ref: '#/components/schemas/Dhcpv6ClientOptions.DuidUuid' + x-field-uid: 5 + Dhcpv6ClientOptions.DuidLlt: + description: |- + DUID based on Link Layer address plus time. Hardware Type will be auto assigned to ethernet type. + type: object + required: + - time + - link_layer_address + properties: + time: + description: "The time value is the time that the DUID is generated represented\ + \ in seconds since midnight (UTC), January 1, \n2000, modulo 2^32. The\ + \ DUID generatation time will the current time when dhcpv6 client contacts\ + \ the server. " type: integer format: uint32 - maximum: 7 - default: 6 - x-field-uid: 8 - pfc_class_7: - description: |- - The valid values are null, 0 - 7. - A null value indicates there is no setting for this pfc class. + x-field-uid: 1 + link_layer_address: + description: "The link-layer address is stored in canonical form, as described\ + \ in RFC 2464. " + $ref: '#/components/schemas/Dhcpv6ClientOptions.LinkLayerAddress' + x-field-uid: 2 + Dhcpv6ClientOptions.DuidEn: + description: |- + DUID assigned by vendor based on enterprise number. + type: object + required: + - enterprise_number + - identifier + properties: + enterprise_number: + description: "Vendor's registered private enterprise number as maintained\ + \ by IANA. " type: integer format: uint32 - maximum: 7 - default: 7 - x-field-uid: 9 - Capture: - x-status: - status: under_review - information: There may be changes in filter configuration + maximum: 4294967295 + x-field-uid: 1 + identifier: + description: "The unique identifier assigned by the vendor. " + type: string + format: hex + minLength: 1 + maxLength: 8 + x-field-uid: 2 + Dhcpv6ClientOptions.DuidLl: description: |- - Under Review: There may be changes in filter configuration - - Under Review: There may be changes in filter configuration - - Configuration for capture settings. + DUID based on Link Layer address. Hardware Type will be auto assigned to ethernet type. type: object required: - - port_names - - name + - link_layer_address properties: - port_names: - description: | - The unique names of ports that the capture settings will apply to. Port_names cannot be duplicated between capture objects. - - x-constraint: - - /components/schemas/Port/properties/name - - - x-constraint: - - /components/schemas/Port/properties/name - type: array - items: - type: string - x-constraint: - - /components/schemas/Port/properties/name + link_layer_address: + description: "The link-layer address is stored in canonical form, as described\ + \ in RFC 2464. " + $ref: '#/components/schemas/Dhcpv6ClientOptions.LinkLayerAddress' x-field-uid: 1 - filters: - description: |- - A list of filters to apply to the capturing ports. If no filters are specified then all packets will be captured. A capture can have multiple filters. The number of filters supported is determined by the implementation which can be retrieved using the capabilities API. - When multiple filters are specified the capture implementation must && (and) all the filters. - type: array - items: - $ref: '#/components/schemas/Capture.Filter' + Dhcpv6ClientOptions.DuidUuid: + description: |- + DUID embedded a Universally Unique IDentifier (UUID). A UUID is an identifier that is unique across both space and time, with respect to the space of all UUIDs. + type: object + properties: + version: + description: "The version number is in the most significant 4 bits of the\ + \ timestamp (bits 4 through 7 of the time_hi_and_version field). \ + \ " + $ref: '#/components/schemas/Dhcpv6ClientOptions.DuidUuidVersion' + x-field-uid: 1 + variant: + description: "The variant field determines the layout of the UUID. It is\ + \ multiplexed with clock_seq_hi_and_reserved. " + $ref: '#/components/schemas/Dhcpv6ClientOptions.DuidUuidVariant' x-field-uid: 2 - overwrite: - description: |- - Overwrite the capture buffer. - type: boolean - default: true + time_low: + description: "The low field of the timestamp. " + type: integer + format: uint32 + default: 0 x-field-uid: 3 - packet_size: - description: |- - The maximum size of each captured packet. If no value is specified or it is null then the entire packet will be captured. + time_mid: + description: "The middle field of the timestamp. " type: integer format: uint32 + default: 0 maximum: 65535 x-field-uid: 4 - format: + time_hi_and_version: + description: "The high field of the timestamp multiplexed with the version\ + \ number. " + type: integer + format: uint32 + default: 0 + maximum: 4095 + x-field-uid: 5 + clock_seq_hi_and_reserved: + description: "The high field of the clock sequence multiplexed with the\ + \ variant. " + type: integer + format: uint32 + default: 0 + maximum: 31 + x-field-uid: 6 + clock_seq_low: + description: "The low field of the clock sequence. " + type: integer + format: uint32 + default: 0 + maximum: 127 + x-field-uid: 7 + node: + description: "The spatially unique node identifier. " + type: string + format: mac + default: 00:00:00:00:00:00 + x-field-uid: 8 + Dhcpv6ClientOptions.DuidUuidVersion: + description: |- + The version number is in the most significant 4 bits of the timestamp (bits 4 through 7 of the time_hi_and_version field). + type: object + properties: + choice: description: |- - The format of the capture file. + The version values are from 1 to 5 in the most significant 4 bits of the timestamp (bits 4 through 7 of the time_hi_and_version field). type: string - default: pcap - x-field-uid: 5 + default: v_1 + x-field-uid: 1 x-enum: - pcap: + v_1: x-field-uid: 1 - pcapng: + v_2: x-field-uid: 2 + v_3: + x-field-uid: 3 + v_4: + x-field-uid: 4 + v_5: + x-field-uid: 5 enum: - - pcap - - pcapng - name: - x-field-uid: 6 + - v_1 + - v_2 + - v_3 + - v_4 + - v_5 + Dhcpv6ClientOptions.DuidUuidVariant: + description: |- + The variant field determines the layout of the UUID. That is, the interpretation of all other bits in the UUID depends on the setting of the bits in the variant field). + type: object + properties: + choice: description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. + The current variants are ncs, dce,microsoft guid and reserved. type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - Capture.Filter: + default: ncs + x-field-uid: 1 + x-enum: + ncs: + x-field-uid: 1 + dce: + x-field-uid: 2 + guid: + x-field-uid: 3 + var_reserved: + x-field-uid: 4 + enum: + - ncs + - dce + - guid + - var_reserved + Dhcpv6ClientOptions.LinkLayerAddress: description: |- - Configuration for capture filters + The link-layer address configured in DUID llt or DUID ll. type: object + required: + - value properties: - choice: + value: description: |- - The type of capture filter. + The MAC address that becomes part of DUID llt or DUID ll. type: string - default: custom + format: mac + x-field-uid: 3 + Dhcpv6ClientOptions.OptionsRequest: + type: object + properties: + choice: + description: "The Option Request option is used to identify a list of options\ + \ in a message between a client and a server. The option code is 6. -\ + \ Vendor_specific information option, requested by clients for vendor-specific\ + \ informations from servers. - DNS Recursive Name Server Option, requested\ + \ by clients to get the list ofIPv6 addresses of DNS recursive name \n\ + \ servers to which DNS queries may be sent by the client resolver in\ + \ order of preference.\n- Client FQDN option - indicates whether the client\ + \ or the DHCP server should update DNS with the AAAA record \n corresponding\ + \ to the assigned IPv6 address and the FQDN provided in this option. The\ + \ DHCP server always updates \n the PTR record.\n- bootfile_url, if client\ + \ is configured for network booting then the client must use this option\ + \ to obtain the boot \n file url from the server.\n- sztp. Securely provision\ + \ a networking device when it is booting in a factory-default state." + type: string + default: vendor_information x-field-uid: 1 x-enum: - custom: + vendor_information: x-field-uid: 1 - ethernet: + name_servers: x-field-uid: 2 - vlan: + fqdn: x-field-uid: 3 - ipv4: + bootfile_url: x-field-uid: 4 - ipv6: + sztp: x-field-uid: 5 + custom: + x-field-uid: 6 enum: + - vendor_information + - name_servers + - fqdn + - bootfile_url + - sztp - custom - - ethernet - - vlan - - ipv4 - - ipv6 custom: - description: |- - Offset from last filter in the list. If no filters are present it is offset from position 0. Multiple custom filters can be present, the length of each custom filter is the length of the value being filtered. - $ref: '#/components/schemas/Capture.Custom' + $ref: '#/components/schemas/Dhcpv6ClientOptions.Custom' x-field-uid: 2 - ethernet: - $ref: '#/components/schemas/Capture.Ethernet' - x-field-uid: 3 - vlan: - $ref: '#/components/schemas/Capture.Vlan' - x-field-uid: 4 - ipv4: - $ref: '#/components/schemas/Capture.Ipv4' - x-field-uid: 5 - ipv6: - $ref: '#/components/schemas/Capture.Ipv6' - x-field-uid: 6 - Capture.Custom: + Dhcpv6ClientOptions.Custom: + description: |- + The Custom option is used to provide a not so well known option in the message between a client and a server. + type: object + required: + - type properties: - offset: + type: description: |- - The bit offset of field to filter on + The type of the Custom option TLV. type: integer format: uint32 + maximum: 65535 x-field-uid: 1 - bit_length: + Dhcpv6ClientOptions.VendorClass: + description: |- + This option is used by a client to identify the vendor that manufactured the hardware on which the client is running. The option code is 16. + type: object + required: + - enterprise_number + - class_data + - associated_dhcp_messages + properties: + enterprise_number: description: |- - The bit length of field to filter on + The vendor's registered Enterprise Number as registered with IANA. type: integer format: uint32 - default: 8 + maximum: 4294967295 + x-field-uid: 1 + class_data: + description: |- + The opaque data representing the hardware configuration of the host on which the client is running. Examples of class data instances might include the version of the operating system the client is running or the amount of memory installed on the client. + type: array + items: + type: string x-field-uid: 2 - value: + associated_dhcp_messages: + description: |- + The dhcpv6 client messages where this option is included. + $ref: '#/components/schemas/Dhcpv6ClientOptions.IncludedMessages' x-field-uid: 3 - type: string - format: hex - default: '00' - mask: - x-field-uid: 4 - type: string - format: hex - default: '00' - negate: - x-field-uid: 5 - type: boolean - default: false - type: object - Capture.Field: + Dhcpv6ClientOptions.IncludedMessages: + description: |- + The dhcpv6 client messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 client messages, else based on the selection in particular Dhcpv6 client messages the option will be included. type: object properties: - value: + choice: + description: |- + The client message name where the option is included, by default it is all. type: string - format: hex - default: '00' + default: all x-field-uid: 1 - mask: + x-enum: + all: + x-field-uid: 1 + msg_types: + x-field-uid: 2 + enum: + - all + - msg_types + msg_types: + description: |- + User must specify the Dhcpv6 message type. + type: array + items: + $ref: '#/components/schemas/Dhcpv6ClientOptions.MessageType' + x-field-uid: 2 + Dhcpv6ClientOptions.MessageType: + description: |- + The dhcpv6 client messages where the option will be included. + type: object + properties: + choice: + description: |- + The client message name where the option is included, by default it is all. type: string - format: hex - default: '00' + default: solicit + x-field-uid: 1 + x-enum: + solicit: + x-field-uid: 1 + request: + x-field-uid: 2 + inform_request: + x-field-uid: 3 + release: + x-field-uid: 4 + renew: + x-field-uid: 5 + rebind: + x-field-uid: 6 + enum: + - solicit + - request + - inform_request + - release + - renew + - rebind + Dhcpv6ClientOptions.VendorInfo: + description: |- + This option is used by clients to exchange vendor-specific information. The option code is 17. + type: object + required: + - enterprise_number + - option_data + - associated_dhcp_messages + properties: + enterprise_number: + description: |- + The vendor's registered Enterprise Number as registered with IANA. + type: integer + format: uint32 + maximum: 4294967295 + x-field-uid: 1 + option_data: + description: |- + An opaque object of octets,interpreted by vendor-specific code on the clients and servers. + type: array + items: + $ref: '#/components/schemas/Dhcpv6Options.VendorSpecificOptions' x-field-uid: 2 - negate: - type: boolean - default: false + associated_dhcp_messages: + description: |- + The list of dhcpv6 client messages where this option is included. + $ref: '#/components/schemas/Dhcpv6ClientOptions.IncludedMessages' x-field-uid: 3 - Capture.Ethernet: + Dhcpv6ServerOptions.VendorInfo: + description: |- + This option is used by servers to exchange vendor-specific information. The option code is 17. type: object + required: + - enterprise_number + - option_data + - associated_dhcp_messages properties: - src: - $ref: '#/components/schemas/Capture.Field' + enterprise_number: + description: |- + The vendor's registered Enterprise Number as registered with IANA. + type: integer + format: uint32 + maximum: 4294967295 x-field-uid: 1 - dst: - $ref: '#/components/schemas/Capture.Field' + option_data: + description: |- + An opaque object of octets,interpreted by vendor-specific code on the clients and servers. + type: array + items: + $ref: '#/components/schemas/Dhcpv6Options.VendorSpecificOptions' x-field-uid: 2 - ether_type: - $ref: '#/components/schemas/Capture.Field' + associated_dhcp_messages: + description: |- + The list of dhcpv6 client messages where this option is included. + $ref: '#/components/schemas/Dhcpv6ServerOptions.IncludedMessages' x-field-uid: 3 - pfc_queue: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 4 - Capture.Vlan: + Dhcpv6ServerOptions.IncludedMessages: + description: |- + The dhcpv6 server messages where the option will be included. If all is selected the selected option will be added in the all the Dhcpv6 server messages, else based on the selection in particular Dhcpv6 server messages the option will be included. type: object properties: - priority: - $ref: '#/components/schemas/Capture.Field' + choice: + description: |- + The server message name where the option is included, by default it is all. + type: string + default: all x-field-uid: 1 - cfi: - $ref: '#/components/schemas/Capture.Field' + x-enum: + all: + x-field-uid: 1 + msg_types: + x-field-uid: 2 + enum: + - all + - msg_types + msg_types: + description: |- + User must specify the Dhcpv6 message type. + type: array + items: + $ref: '#/components/schemas/Dhcpv6ServerOptions.MessageType' x-field-uid: 2 - id: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 3 - protocol: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 4 - Capture.Ipv4: + Dhcpv6ServerOptions.MessageType: + description: |- + The dhcpv6 server messages where the option will be included. type: object properties: - version: - $ref: '#/components/schemas/Capture.Field' + choice: + description: |- + The server message name where the option is included, by default it is all. + type: string + default: advertise x-field-uid: 1 - header_length: - $ref: '#/components/schemas/Capture.Field' + x-enum: + advertise: + x-field-uid: 1 + reply: + x-field-uid: 2 + re_configure: + x-field-uid: 3 + enum: + - advertise + - reply + - re_configure + Dhcpv6Options.VendorSpecificOptions: + description: |- + The encapsulated vendor-specific options field is encoded as a sequence of code/length/value fields of identical format to the DHCP options field. The option codes are defined by the vendor identified in the enterprise-number field and are not managed by IANA. + type: object + required: + - code + - data + properties: + code: + description: |- + The code for the encapsulated option. + type: integer + format: uint32 + maximum: 65535 + x-field-uid: 1 + data: + description: |- + The data for the encapsulated option. + type: string x-field-uid: 2 - priority: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 3 - total_length: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 4 - identification: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 5 - reserved: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 6 - dont_fragment: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 7 - more_fragments: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 8 - fragment_offset: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 9 - time_to_live: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 10 - protocol: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 11 - header_checksum: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 12 - src: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 13 - dst: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 14 - Capture.Ipv6: + Dhcpv6ClientOptions.Fqdn: + description: |- + DHCPv6 server needs to know the FQDN of the client for the addresses for the client's IA_NA bindings in order to update the IPv6-address-to-FQDN mapping. This option allows the client to convey its FQDN to the server. The Client FQDN option also contains Flags that DHCPv6 clients and servers use to negotiate who does which updates. The option code is 39. type: object + required: + - domain_name properties: - version: - $ref: '#/components/schemas/Capture.Field' + flag_s: + description: |- + The "S" bit indicates whether the server should or should not perform the AAAA RR (FQDN-to-address) DNS updates. A client sets the bit to 0 to indicate that the server should not perform the updates and 1 to indicate that the server should perform the updates. The state of the bit in the reply from the server indicates the action to be taken by the server. If it is 1, the server has taken responsibility for AAAA RR updates for the FQDN. + type: boolean + default: true x-field-uid: 1 - traffic_class: - $ref: '#/components/schemas/Capture.Field' + flag_o: + description: |- + The "O" bit indicates whether the server has overridden the client's preference for the "S" bit. A client must set this bit to 0. A server must set this bit to 1 if the "S" bit in its reply to the client does not match the "S" bit received from the client. + type: boolean + default: false x-field-uid: 2 - flow_label: - $ref: '#/components/schemas/Capture.Field' + flag_n: + description: |- + The "N" bit indicates whether the server should not perform any DNS updates. A client sets this bit to 0 to request that the server should perform updates (the PTR RR and possibly the AAAA RR based on the "S" bit) or to 1 to request that the server should not perform any DNS updates. A server sets the "N" bit to indicate whether the server shall (0) or shall not (1) perform DNS updates. If the "N" bit is 1, the "S" bit MUST be 0. + type: boolean + default: false x-field-uid: 3 - payload_length: - $ref: '#/components/schemas/Capture.Field' + domain_name: + description: |- + The Domain Name part of the option carries all or part of the FQDN of a DHCPv6 client. A client MAY also leave the Domain Name field empty if it desires the server to provide a name. A fully qualified domain name (FQDN) is the complete address of an internet host or computer. It provides its exact location within the domain name system (DNS) by specifying the hostname, domain name and top-level domain (TLD). An FQDN isn't the same as a URL but rather is a part of it that fully identifies the server to which the request is addressed. An FQDN doesn't carry the TCP/IP protocol information, such as Hypertext Transfer Protocol (HTTP) or Hypertext Transfer Protocol Secure (HTTPS), which is always used at the beginning of a URL. Therefore, adding the prefix http:// or https:// to the FQDN turns it into a full URL. One example can be microsoft.com. + type: string x-field-uid: 4 - next_header: - $ref: '#/components/schemas/Capture.Field' + associated_dhcp_messages: + description: |- + The list of dhcpv6 client messages where this option is included. + $ref: '#/components/schemas/Dhcpv6ClientOptions.IncludedMessages' x-field-uid: 5 - hop_limit: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 6 - src: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 7 - dst: - $ref: '#/components/schemas/Capture.Field' - x-field-uid: 8 - Device: + Dhcpv6ServerOptions.BootfileUrl: description: |- - A container for emulated interfaces, loopback interfaces and protocol configurations. + The server sends this option to inform the client about a URL to a boot file. This information is required for booting over the network includes the details about the server on which the boot files can be found, the protocol to be used for the download (for example,HTTP or TFTP, and the path and name of the boot file on the server. The option code is 59. The URL will contain the network communication protocol, a subdomain, a domain name, and its extension. If the host in the URL is expressed using an IPv6 address rather than a domain name, the address in the URL then must be enclosed in "[" and "]" characters, conforming to [RFC3986]. Eg of a boot file url can be "tftp://[xxxx:xxxx:xxxx:xxxx::xxxx]/mboot.efi". type: object + required: + - url properties: - ethernets: + url: description: |- - Ethernet configuration for one or more emulated network interfaces. - type: array - items: - $ref: '#/components/schemas/Device.Ethernet' + The URL for the boot file. It must comply with STD 66 format. + type: string x-field-uid: 1 - ipv4_loopbacks: + bootfile_params: description: |- - IPv4 Loopback interface that can be attached to an Ethernet in the same device or to an Ethernet in another device. + They are used to specify parameters for the boot file (similar to the command line arguments in most modern operating systems). For example, these parameters could be used to specify the root file system of the OS kernel, or the location from which a second-stage boot-loader program can download its configuration file. type: array items: - $ref: '#/components/schemas/Device.Ipv4Loopback' + $ref: '#/components/schemas/Dhcpv6ServerOptions.BootFileParams' x-field-uid: 2 - ipv6_loopbacks: + associated_dhcp_messages: description: |- - IPv6 Loopback interface that can be attached to an Ethernet in the same device or to an Ethernet in another device. - type: array - items: - $ref: '#/components/schemas/Device.Ipv6Loopback' + The list of dhcpv6 client messages where this option is included. + $ref: '#/components/schemas/Dhcpv6ServerOptions.IncludedMessages' x-field-uid: 3 - isis: - description: |- - The properties of an IS-IS router and its children, such as IS-IS interfaces and route ranges. - $ref: '#/components/schemas/Device.IsisRouter' - x-field-uid: 4 - bgp: - description: |- - The properties of BGP router and its children, such as BGPv4, BGPv6 peers and their route ranges. - $ref: '#/components/schemas/Device.BgpRouter' - x-field-uid: 5 - vxlan: + Dhcpv6ServerOptions.BootFileParams: + description: |- + The option code is 60. They are used to specify parameters for the boot file (similar to the command line arguments in most modern operating systems). For example, these parameters could be used to specify the root file system of the OS kernel, or the location from which a second-stage boot-loader program can download its configuration file. + type: object + required: + - parameter + properties: + parameter: description: |- - Configuration of VXLAN tunnel interfaces RFC Ref: https://datatracker.ietf.org/doc/html/rfc7348 - $ref: '#/components/schemas/Device.Vxlan' - x-field-uid: 6 - name: - x-field-uid: 7 - description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. + UTF-8 strings are parameters needed for booting, e.g., kernel parameters. type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - rsvp: - description: |- - The properties of an RSVP router and its children. - $ref: '#/components/schemas/Device.Rsvp' - x-field-uid: 8 - required: - - name - Protocol.Options: - description: "Common options that apply to all configured protocols and interfaces. " - type: object - properties: - auto_start_all: - description: |- - When set to true, all underlying resources for configured protocols and interfaces shall be created and corresponding protocol session negotiation shall be initiated. Otherwise, when set to false, corresponding protocol session negotiation will need to be initiated using a separate set_protocol_state API call. - type: boolean - default: true x-field-uid: 1 - Device.IsisRouter: + Layer1: description: |- - A container of properties for an ISIS router and its interfaces. + A container for layer1 settings. type: object required: - - system_id - - interfaces + - port_names - name properties: - instance: - description: |- - This contains the properties of a Multi-Instance-capable routers or MI-RTR. Each router can emulate one ISIS instance at a time. - $ref: '#/components/schemas/Device.IsisMultiInstance' + port_names: + description: "A list of unique names of port objects that will share the\n\ + choice settings. \n\nx-constraint:\n- /components/schemas/Port/properties/name\n\ + \n\nx-constraint:\n- /components/schemas/Port/properties/name\n" + type: array + items: + type: string + x-constraint: + - /components/schemas/Port/properties/name x-field-uid: 1 - system_id: + speed: description: |- - The System ID for this emulated ISIS router, e.g. "640100010000". + Set the speed if supported. When no speed is explicitly set, the current + speed of underlying test interface shall be assumed. type: string - format: hex x-field-uid: 2 - interfaces: + x-enum: + speed_10_fd_mbps: + x-field-uid: 1 + speed_10_hd_mbps: + x-field-uid: 2 + speed_100_fd_mbps: + x-field-uid: 3 + speed_100_hd_mbps: + x-field-uid: 4 + speed_1_gbps: + x-field-uid: 5 + speed_10_gbps: + x-field-uid: 6 + speed_25_gbps: + x-field-uid: 7 + speed_40_gbps: + x-field-uid: 8 + speed_50_gbps: + x-field-uid: 9 + speed_100_gbps: + x-field-uid: 10 + speed_200_gbps: + x-field-uid: 11 + speed_400_gbps: + x-field-uid: 12 + speed_800_gbps: + x-field-uid: 13 + enum: + - speed_10_fd_mbps + - speed_10_hd_mbps + - speed_100_fd_mbps + - speed_100_hd_mbps + - speed_1_gbps + - speed_10_gbps + - speed_25_gbps + - speed_40_gbps + - speed_50_gbps + - speed_100_gbps + - speed_200_gbps + - speed_400_gbps + - speed_800_gbps + media: description: |- - List of ISIS interfaces for this router. - type: array - items: - $ref: '#/components/schemas/Isis.Interface' + Set the type of media for test interface if supported. When no media + type is explicitly set, the current media type of underlying test + interface shall be assumed. + type: string x-field-uid: 3 - basic: - description: "Contains basic properties of an ISIS Router. " - $ref: '#/components/schemas/Isis.Basic' + x-enum: + copper: + x-field-uid: 1 + fiber: + x-field-uid: 2 + sgmii: + x-field-uid: 3 + enum: + - copper + - fiber + - sgmii + promiscuous: + description: |- + Enable promiscuous mode on test interface. A warning shall be raised if + this field is set to `true`, even when it's not supported, ignoring + the setting altogether. + type: boolean + default: true x-field-uid: 4 - advanced: + mtu: description: |- - Contains advance properties of an ISIS Router.. - $ref: '#/components/schemas/Isis.Advanced' + Set the maximum transmission unit size. A warning shall be raised if + the specified value is valid but not supported, ignoring the setting altogether. + type: integer + format: uint32 + minimum: 64 + maximum: 9000 + default: 1500 x-field-uid: 5 - router_auth: + ieee_media_defaults: description: |- - ISIS Router authentication properties. - $ref: '#/components/schemas/Isis.Authentication' + Under Review: This field is currently under review for pending exploration on use cases + + Under Review: This field is currently under review for pending exploration on use cases + + Set to true to override the auto_negotiate, link_training + and rs_fec settings for gigabit ethernet interfaces. + type: boolean x-field-uid: 6 - v4_routes: + x-status: + status: under-review + information: This field is currently under review for pending exploration + on use cases + auto_negotiate: description: |- - Emulated ISIS IPv4 routes. - type: array - items: - $ref: '#/components/schemas/Isis.V4RouteRange' + Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists. + + Under Review: This field is currently under review for pending exploration on use cases, given that a separate configuration called `AutoNegotiation` already exists. + + Enable/disable auto negotiation. + type: boolean x-field-uid: 7 - v6_routes: - description: |- - Emulated ISIS IPv6 routes. - type: array - items: - $ref: '#/components/schemas/Isis.V6RouteRange' + x-status: + status: under-review + information: This field is currently under review for pending exploration + on use cases, given that a separate configuration called `AutoNegotiation` + already exists. + auto_negotiation: + $ref: '#/components/schemas/Layer1.AutoNegotiation' x-field-uid: 8 - name: + flow_control: + $ref: '#/components/schemas/Layer1.FlowControl' x-field-uid: 9 + name: + x-field-uid: 10 description: |- Globally unique name of an object. It also serves as the primary key for arrays of objects. type: string pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ x-unique: global - Device.IsisMultiInstance: - description: "This container properties of an Multi-Instance-capable router\ - \ (MI-RTR). " + Layer1.AutoNegotiation: + description: |- + Configuration for auto negotiation settings type: object properties: - iid: + advertise_1000_mbps: description: |- - Instance Identifier (IID) TLV will associate a PDU with an ISIS instance by using a unique 16-bit number and including one or more Instance-Specific Topology Identifiers (ITIDs). - type: integer - format: uint32 - default: 1 - maximum: 65535 + If auto_negotiate is true and the interface supports this option + then this speed will be advertised. + type: boolean + default: true x-field-uid: 1 - itids: + advertise_100_fd_mbps: description: |- - This contains one or more ITIDs that will be advertised in IID TLV. - type: array - items: - type: integer - format: uint32 - default: 0 - maximum: 65535 + If auto_negotiate is true and the interface supports this option + then this speed will be advertised. + type: boolean + default: true x-field-uid: 2 - Isis.Interface: + advertise_100_hd_mbps: + description: |- + If auto_negotiate is true and the interface supports this option + then this speed will be advertised. + type: boolean + default: true + x-field-uid: 3 + advertise_10_fd_mbps: + description: |- + If auto_negotiate is true and the interface supports this option + then this speed will be advertised. + type: boolean + default: true + x-field-uid: 4 + advertise_10_hd_mbps: + description: |- + If auto_negotiate is true and the interface supports this option + then this speed will be advertised. + type: boolean + default: true + x-field-uid: 5 + link_training: + description: |- + Enable/disable gigabit ethernet link training. + type: boolean + default: false + x-field-uid: 6 + rs_fec: + description: |- + Enable/disable gigabit ethernet reed solomon forward error correction (RS FEC). + type: boolean + default: false + x-field-uid: 7 + Layer1.FlowControl: description: |- - Configuration for single ISIS interface. + A container for layer1 receive flow control settings. + To enable flow control settings on ports this object must be a valid + object not a null value. type: object - required: - - eth_name - - name properties: - eth_name: - description: "The unique name of the Ethernet interface on which ISIS is\ - \ running. Two ISIS interfaces cannot share the same Ethernet. \ - \ \n\nx-constraint:\n- /components/schemas/Device.Ethernet/properties/name\n\ - \n\nx-constraint:\n- /components/schemas/Device.Ethernet/properties/name\n" + directed_address: + description: |- + The 48bit mac address that the layer1 port names will listen on + for a directed pause. type: string - x-constraint: - - /components/schemas/Device.Ethernet/properties/name + format: mac + default: 01:80:C2:00:00:01 x-field-uid: 1 - metric: + choice: description: |- - The default metric cost for the interface. - type: integer - format: uint32 - maximum: 16777215 - default: 10 - x-field-uid: 2 - network_type: - description: "The type of network link. " + The type of priority flow control. type: string - default: broadcast - x-field-uid: 3 + default: ieee_802_1qbb + x-field-uid: 2 x-enum: - broadcast: + ieee_802_1qbb: x-field-uid: 1 - point_to_point: + ieee_802_3x: x-field-uid: 2 enum: - - broadcast - - point_to_point - level_type: - description: "This indicates whether this router is participating in Level-1\ - \ (L1), \nLevel-2 (L2) or both L1 and L2 domains on this interface." - type: string - default: level_2 + - ieee_802_1qbb + - ieee_802_3x + ieee_802_1qbb: + $ref: '#/components/schemas/Layer1.Ieee8021qbb' + x-field-uid: 3 + ieee_802_3x: + $ref: '#/components/schemas/Layer1.Ieee8023x' x-field-uid: 4 - x-enum: - level_1: - x-field-uid: 1 - level_2: - x-field-uid: 2 - level_1_2: - x-field-uid: 3 - enum: - - level_1 - - level_2 - - level_1_2 - l1_settings: - description: |- - Settings of Level 1 Hello. - $ref: '#/components/schemas/IsisInterface.Level' - x-field-uid: 5 - l2_settings: - description: |- - Settings of Level 2 Hello. - $ref: '#/components/schemas/IsisInterface.Level' - x-field-uid: 6 - multi_topology_ids: - description: |- - Contains the properties of multiple topologies. - type: array - items: - $ref: '#/components/schemas/Isis.MT' - x-field-uid: 7 - traffic_engineering: - description: |- - Contains a list of Traffic Engineering attributes. - type: array - items: - $ref: '#/components/schemas/LinkState.TE' - x-field-uid: 8 - authentication: - description: |- - The Circuit authentication method used for the interfaces on this emulated ISIS v4/v6 router. - $ref: '#/components/schemas/IsisInterface.Authentication' - x-field-uid: 9 - advanced: - description: |- - Optional container for advanced interface properties. - $ref: '#/components/schemas/IsisInterface.Advanced' - x-field-uid: 10 - link_protection: - description: |- - Link protection on the ISIS link between two interfaces. - $ref: '#/components/schemas/IsisInterface.LinkProtection' - x-field-uid: 11 - srlg_values: - description: |- - This contains list of SRLG values for the link between two interfaces. - type: array - items: - type: integer - format: uint32 - maximum: 16777215 - default: 0 - x-field-uid: 12 - name: - x-field-uid: 13 - description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - IsisInterface.Level: + Layer1.Ieee8023x: description: |- - Configuration for the properties of Level 1 Hello. + A container for ieee 802.3x rx pause settings type: object - properties: - priority: - description: |- - The Priority setting in Level 1 LAN Hellos for Designated Router election. - type: integer - format: uint32 - default: 0 - x-field-uid: 1 - hello_interval: - description: |- - The Hello interval for Level 1 Hello messages, in seconds. - type: integer - format: uint32 - default: 10 - x-field-uid: 2 - dead_interval: - description: |- - The Dead (Holding Time) interval for Level 1 Hello messages, in seconds. - type: integer - format: uint32 - default: 30 - x-field-uid: 3 - Isis.MT: - description: |- - Configuration of properties per interface per topology when multiple topologies are configured in an ISIS router. - in a ISIS router. + Layer1.Ieee8021qbb: + description: "These settings enhance the existing 802.3x pause priority capabilities\ + \ \nto enable flow control based on 802.1p priorities (classes of service). " type: object properties: - mt_id: - description: |- - The Multi Topology ID for one of the topologies supported on the ISIS interface. + pfc_delay: + description: "The upper limit on the transmit time of a queue after receiving\ + \ a \nmessage to pause a specified priority.\nA value of 0 or null indicates\ + \ that pfc delay will not be enabled. " type: integer format: uint32 - maximum: 65535 default: 0 + maximum: 65535 x-field-uid: 1 - link_metric: - description: |- - Specifies the link metric for this topology on the ISIS interface. - type: integer - format: uint32 - default: 10 - maximum: 16777215 - x-field-uid: 2 - LinkState.TE: - description: |- - A container for Traffic Engineering properties on a interface. - type: object - properties: - administrative_group: - description: "The Administrative group sub-TLV (sub-TLV 3). It is a 4-octet\ - \ \nuser-defined bit mask used to assign administrative group numbers\ - \ \nto the interface, for use in assigning colors and resource classes.\ - \ \nEach set bit corresponds to a single administrative group for this\ - \ \ninterface. The settings translate into Group numbers, which range\ - \ \nfrom 0 to 31 (integers)." - type: string - format: hex - default: '00000000' - x-field-uid: 1 - metric_level: + pfc_class_0: description: |- - The user-assigned link metric for Traffic Engineering. + The valid values are null, 0 - 7. + A null value indicates there is no setting for this pfc class. type: integer format: uint32 + maximum: 7 default: 0 x-field-uid: 2 - max_bandwith: - description: "The maximum link bandwidth (sub-TLV 9) in bytes/sec allowed\ - \ for this \nlink for a direction." + pfc_class_1: + description: |- + The valid values are null, 0 - 7. + A null value indicates there is no setting for this pfc class. type: integer format: uint32 - default: 125000000 + maximum: 7 + default: 1 x-field-uid: 3 - max_reservable_bandwidth: - description: "The maximum link bandwidth (sub-TLV 10) in bytes/sec allowed\ - \ for this \nlink in a direction." + pfc_class_2: + description: |- + The valid values are null, 0 - 7. + A null value indicates there is no setting for this pfc class. type: integer format: uint32 - default: 125000000 + maximum: 7 + default: 2 x-field-uid: 4 - priority_bandwidths: - description: |- - Configuration of bandwidths of priority 0 through priority 7. - $ref: '#/components/schemas/LinkState.priorityBandwidths' - x-field-uid: 5 - LinkState.priorityBandwidths: - description: "Specifies the amount of bandwidth that can be reserved with a\ - \ setup priority of 0 \nthrough 7, arranged in increasing order with priority\ - \ 0 having highest priority. \nIn ISIS, this is sent in sub-TLV (11) of Extended\ - \ IS Reachability TLV. " - type: object - properties: - pb0: + pfc_class_3: description: |- - Specifies the amount of bandwidth that can be reserved for the Priority 0. + The valid values are null, 0 - 7. + A null value indicates there is no setting for this pfc class. type: integer format: uint32 - default: 125000000 - x-field-uid: 1 - pb1: + maximum: 7 + default: 3 + x-field-uid: 5 + pfc_class_4: description: |- - Specifies the amount of bandwidth that can be reserved for the Priority 1. + The valid values are null, 0 - 7. + A null value indicates there is no setting for this pfc class. type: integer format: uint32 - default: 125000000 - x-field-uid: 2 - pb2: + maximum: 7 + default: 4 + x-field-uid: 6 + pfc_class_5: description: |- - Specify the amount of bandwidth that can be reserved for the Priority 2. + The valid values are null, 0 - 7. + A null value indicates there is no setting for this pfc class. type: integer format: uint32 - default: 125000000 - x-field-uid: 3 - pb3: + maximum: 7 + default: 5 + x-field-uid: 7 + pfc_class_6: description: |- - Specifies the amount of bandwidth that can be reserved for the Priority 3. + The valid values are null, 0 - 7. + A null value indicates there is no setting for this pfc class. type: integer format: uint32 - default: 125000000 - x-field-uid: 4 - pb4: + maximum: 7 + default: 6 + x-field-uid: 8 + pfc_class_7: description: |- - Specifies the amount of bandwidth that can be reserved for the Priority 4. + The valid values are null, 0 - 7. + A null value indicates there is no setting for this pfc class. type: integer format: uint32 - default: 125000000 - x-field-uid: 5 - pb5: + maximum: 7 + default: 7 + x-field-uid: 9 + Capture: + x-status: + status: under_review + information: There may be changes in filter configuration + description: |- + Under Review: There may be changes in filter configuration + + Under Review: There may be changes in filter configuration + + Configuration for capture settings. + type: object + required: + - port_names + - name + properties: + port_names: + description: | + The unique names of ports that the capture settings will apply to. Port_names cannot be duplicated between capture objects. + + x-constraint: + - /components/schemas/Port/properties/name + + + x-constraint: + - /components/schemas/Port/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Port/properties/name + x-field-uid: 1 + filters: description: |- - Specifies the amount of bandwidth that can be reserved for the Priority 5. - type: integer - format: uint32 - default: 125000000 - x-field-uid: 6 - pb6: + A list of filters to apply to the capturing ports. If no filters are specified then all packets will be captured. A capture can have multiple filters. The number of filters supported is determined by the implementation which can be retrieved using the capabilities API. + When multiple filters are specified the capture implementation must && (and) all the filters. + type: array + items: + $ref: '#/components/schemas/Capture.Filter' + x-field-uid: 2 + overwrite: description: |- - Specifies the amount of bandwidth that can be reserved for the Priority 6. - type: integer - format: uint32 - default: 125000000 - x-field-uid: 7 - pb7: + Overwrite the capture buffer. + type: boolean + default: true + x-field-uid: 3 + packet_size: description: |- - Specifies the amount of bandwidth that can be reserved for the Priority 7. + The maximum size of each captured packet. If no value is specified or it is null then the entire packet will be captured. type: integer format: uint32 - default: 125000000 - x-field-uid: 8 - IsisInterface.Authentication: - description: |- - Optional container for circuit authentication properties. - type: object - required: - - auth_type - properties: - auth_type: + maximum: 65535 + x-field-uid: 4 + format: description: |- - The circuit authentication method. + The format of the capture file. type: string - x-field-uid: 1 + default: pcap + x-field-uid: 5 x-enum: - md5: + pcap: x-field-uid: 1 - password: + pcapng: x-field-uid: 2 enum: - - md5 - - password - md5: - description: |- - MD5 key to be used for authentication. - type: string - minLength: 0 - maxLength: 255 - x-field-uid: 2 - password: + - pcap + - pcapng + name: + x-field-uid: 6 description: |- - The password, in clear text, to be used for Authentication. + Globally unique name of an object. It also serves as the primary key for arrays of objects. type: string - minLength: 0 - maxLength: 255 - x-field-uid: 3 - IsisInterface.Advanced: + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + Capture.Filter: description: |- - Optional container for advanced interface properties. + Configuration for capture filters type: object properties: - auto_adjust_mtu: - description: "If a padded Hello message is received on the interface, the\ - \ length of \nthe Hello packets sent out on that interface is adjusted\ - \ to match." - type: boolean - default: true + choice: + description: |- + The type of capture filter. + type: string + default: custom x-field-uid: 1 - auto_adjust_area: - description: "If a Level 1 Hello is received on this emulated router for\ - \ an area \nnot currently in its area list, an area from the received\ - \ Hello is \nadded to that list. This ensures an area match for all future\ - \ \nLevel 1 Hellos from the source L1 router." - type: boolean - default: true + x-enum: + custom: + x-field-uid: 1 + ethernet: + x-field-uid: 2 + vlan: + x-field-uid: 3 + ipv4: + x-field-uid: 4 + ipv6: + x-field-uid: 5 + enum: + - custom + - ethernet + - vlan + - ipv4 + - ipv6 + custom: + description: |- + Offset from last filter in the list. If no filters are present it is offset from position 0. Multiple custom filters can be present, the length of each custom filter is the length of the value being filtered. + $ref: '#/components/schemas/Capture.Custom' x-field-uid: 2 - auto_adjust_supported_protocols: - description: "If a Hello message listing supported protocols is received\ - \ on this \nemulated router, the supported protocols advertised by this\ - \ router \nare changed to match exactly." - type: boolean - default: false + ethernet: + $ref: '#/components/schemas/Capture.Ethernet' x-field-uid: 3 - enable_3way_handshake: - description: |- - If it is true, the Point-to-Point circuit will include 3-way TLV in its Point-to-Point IIH and attempt to establish the adjacency as specified in RFC 5303. This field is not applicable if network_type is set to 'broadcast' type in ISIS interface. - type: boolean - default: true + vlan: + $ref: '#/components/schemas/Capture.Vlan' x-field-uid: 4 - p2p_hellos_to_unicast_mac: - description: "If it is true, the Point-to-Point Hello messages will be sent\ - \ to the unicast MAC address. " - type: boolean - default: false + ipv4: + $ref: '#/components/schemas/Capture.Ipv4' x-field-uid: 5 - IsisInterface.LinkProtection: - description: |- - Optional container for the link protection sub TLV (type 20). - type: object + ipv6: + $ref: '#/components/schemas/Capture.Ipv6' + x-field-uid: 6 + Capture.Custom: properties: - extra_traffic: + offset: description: |- - Enable this to protect other link or links. LSPs on a link of this type are lost - if any of the links fail. - type: boolean - default: false + The bit offset of field to filter on + type: integer + format: uint32 x-field-uid: 1 - unprotected: - description: "Enabling this signifies that there is no other link protecting\ - \ this \nlink. LSPs on a link of this type are lost if the link fails." - type: boolean - default: false + bit_length: + description: |- + The bit length of field to filter on + type: integer + format: uint32 + default: 8 x-field-uid: 2 - shared: - description: "Enable this to share the Extra Traffic links between one or\ - \ more \nlinks of type Shared.There are one or more disjoint links of\ - \ type \nExtra Traffic that are protecting this link." - type: boolean - default: false + value: x-field-uid: 3 - dedicated_1_to_1: - description: "Enabling this signifies that there is one dedicated disjoint\ - \ link \nof type Extra Traffic that is protecting this link." - type: boolean - default: false + type: string + format: hex + default: '00' + mask: x-field-uid: 4 - dedicated_1_plus_1: - description: "Enabling this signifies that a dedicated disjoint link is\ - \ protecting \nthis link. However, the protecting link is not advertised\ - \ in the \nlink state database and is therefore not available for the\ - \ routing \nof LSPs." - type: boolean - default: false + type: string + format: hex + default: '00' + negate: x-field-uid: 5 - enhanced: - description: "Enabling this signifies that a protection scheme that is more\ - \ \nreliable than Dedicated 1+1." - type: boolean - default: false - x-field-uid: 6 - reserved_40: - description: "This is a Protection Scheme with value 0x40. " type: boolean default: false - x-field-uid: 7 - reserved_80: - description: "This is a Protection Scheme with value 0x80. " - type: boolean - default: false - x-field-uid: 8 - Isis.Basic: - description: |- - This contains ISIS router basic properties. + type: object + Capture.Field: type: object properties: - ipv4_te_router_id: - description: "IPv4 Traffic Engineering(TE) router id. This address should\ - \ be configured as an IPv4 Loopback address in 'ipv4_loopbacks' in the\ - \ Device. " + value: type: string - format: ipv4 + format: hex + default: '00' x-field-uid: 1 - hostname: - description: |- - Host name for the router. The host name is transmitted in all the packets sent from the router. + mask: type: string - x-field-uid: 2 - enable_wide_metric: - description: |- - When set to true, it allows sending of more detailed metric information for the routes using 32-bit wide values using TLV 135 IP reachability and more detailed reachability information for IS reachability by using TLV 22. The detailed usage is described in RFC3784. - type: boolean - default: true - x-field-uid: 3 - learned_lsp_filter: - description: |- - Configuration for controlling storage of ISIS learned LSPs are received from the neighbors. + format: hex + default: '00' + x-field-uid: 2 + negate: type: boolean default: false + x-field-uid: 3 + Capture.Ethernet: + type: object + properties: + src: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 1 + dst: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 2 + ether_type: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 3 + pfc_queue: + $ref: '#/components/schemas/Capture.Field' x-field-uid: 4 - Isis.Advanced: + Capture.Vlan: + type: object + properties: + priority: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 1 + cfi: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 2 + id: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 3 + protocol: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 4 + Capture.Ipv4: + type: object + properties: + version: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 1 + header_length: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 2 + priority: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 3 + total_length: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 4 + identification: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 5 + reserved: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 6 + dont_fragment: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 7 + more_fragments: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 8 + fragment_offset: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 9 + time_to_live: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 10 + protocol: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 11 + header_checksum: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 12 + src: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 13 + dst: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 14 + Capture.Ipv6: + type: object + properties: + version: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 1 + traffic_class: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 2 + flow_label: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 3 + payload_length: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 4 + next_header: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 5 + hop_limit: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 6 + src: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 7 + dst: + $ref: '#/components/schemas/Capture.Field' + x-field-uid: 8 + Device: description: |- - Contains ISIS router advanced properties. + A container for emulated or simulated interfaces, loopback interfaces and protocol configurations. type: object properties: - enable_hello_padding: + ethernets: description: |- - It enables padding of Hello message to MTU size. - type: boolean - default: true + Ethernet configuration for one or more emulated or simulated network interfaces. + type: array + items: + $ref: '#/components/schemas/Device.Ethernet' x-field-uid: 1 - max_area_addresses: - description: "The Number of Area Addresses permitted, with a valid range\ - \ from 0 to 254. A zero indicates a maximum of 3 addresses. " - type: integer - format: uint32 - maximum: 254 - default: 3 + ipv4_loopbacks: + description: |- + IPv4 Loopback interface that can be attached to an Ethernet in the same device or to an Ethernet in another device. + type: array + items: + $ref: '#/components/schemas/Device.Ipv4Loopback' x-field-uid: 2 - area_addresses: + ipv6_loopbacks: description: |- - Its combination of the ISP and HO-DSP.Usually all nodes within an area have the same area address. If no area addresses are configured, a default area of "490001" will be advertised. + IPv6 Loopback interface that can be attached to an Ethernet in the same device or to an Ethernet in another device. type: array items: - type: string - format: hex + $ref: '#/components/schemas/Device.Ipv6Loopback' x-field-uid: 3 - lsp_refresh_rate: + isis: description: |- - The rate at which LSPs are re-sent in seconds. - type: integer - format: uint32 - default: 600 - maximum: 65535 + The properties of an IS-IS router and its children, such as IS-IS interfaces and route ranges. + $ref: '#/components/schemas/Device.IsisRouter' x-field-uid: 4 - lsp_lifetime: + bgp: description: |- - The MaxAge for retaining a learned LSP on this router in seconds. - type: integer - format: uint32 - default: 1200 - maximum: 65535 + The properties of BGP router and its children, such as BGPv4, BGPv6 peers and their route ranges. + $ref: '#/components/schemas/Device.BgpRouter' x-field-uid: 5 - psnp_interval: + vxlan: description: |- - The number of milliseconds between transmissions of Partial Sequence Number PDU. - type: integer - format: uint32 - maximum: 60000 - default: 2000 + Configuration of VXLAN tunnel interfaces RFC Ref: https://datatracker.ietf.org/doc/html/rfc7348 + $ref: '#/components/schemas/Device.Vxlan' x-field-uid: 6 - csnp_interval: - description: |- - The number of milliseconds between transmissions of Partial Sequence Number PDU. - type: integer - format: uint32 - minimum: 1 - maximum: 65535000 - default: 10000 + name: x-field-uid: 7 - max_lsp_size: description: |- - The maximum size in bytes of any LSP that can be transmitted over a link of equal or less than maximum MTU size. - type: integer - format: uint32 - minimum: 64 - maximum: 9216 - default: 1492 + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + rsvp: + description: |- + The properties of an RSVP router and its children. + $ref: '#/components/schemas/Device.Rsvp' x-field-uid: 8 - lsp_mgroup_min_trans_interval: + dhcp_server: description: |- - The number of seconds between transmissions of LSPs/MGROUP-PDUs. - type: integer - format: uint32 - minimum: 1 - maximum: 60000 - default: 5000 + The properties of DHCP Server and its children, such as DHCPv4, DHCPv6 servers. + $ref: '#/components/schemas/Device.DhcpServer' x-field-uid: 9 - enable_attached_bit: + ospfv2: description: |- - If the Attached bit is enabled, it indicates that the ISIS router is attached to another area or the Level 2 backbone. The purpose of an Attached-Bit is to accomplish Inter-Area Routing. When an L1/L2 router is connected to more than one area, it sets the Attached-bit on its L1 LSP. This can cause a default route ( 0.0.0.0/0 ) to be installed by the receiving router. - type: boolean - default: true + Configuration for OSPFv2 router. + $ref: '#/components/schemas/Device.Ospfv2Router' x-field-uid: 10 - Isis.Authentication: - description: |- - This contains ISIS Area/Domain authentication properties. + required: + - name + Protocol.Options: + description: "Common options that apply to all configured protocols and interfaces. " type: object properties: - ignore_receive_md5: + auto_start_all: description: |- - Do not verify MD5 checksum in received LSPs. + When set to true, all underlying resources for configured protocols and interfaces shall be created and corresponding protocol session negotiation shall be initiated. Otherwise, when set to false, corresponding protocol session negotiation will need to be initiated using a separate set_protocol_state API call. type: boolean default: true x-field-uid: 1 - area_auth: - description: |- - The Area authentication method used for the emulated ISIS router. - This is used for L1 LSPs. - $ref: '#/components/schemas/Isis.AuthenticationBase' - x-field-uid: 2 - domain_auth: - description: |- - The Domain authentication method used for the emulated ISIS router. - This is used for L2 LSPs. - $ref: '#/components/schemas/Isis.AuthenticationBase' - x-field-uid: 3 - Isis.AuthenticationBase: + Device.IsisRouter: description: |- - Optional container for ISIS authentication properties. + A container of properties for an ISIS router and its interfaces. type: object required: - - auth_type + - system_id + - interfaces + - name properties: - auth_type: + instance: description: |- - The authentication method. - type: string + This contains the properties of a Multi-Instance-capable routers or MI-RTR. Each router can emulate one ISIS instance at a time. + $ref: '#/components/schemas/Device.IsisMultiInstance' x-field-uid: 1 - x-enum: - md5: - x-field-uid: 1 - password: - x-field-uid: 2 - enum: - - md5 - - password - md5: + system_id: description: |- - Authentication as an MD5 key. + The System ID for this emulated ISIS router, e.g. "640100010000". type: string - minLength: 0 - maxLength: 255 + format: hex x-field-uid: 2 - password: + interfaces: description: |- - Authentication as a clear text password. - type: string - minLength: 0 - maxLength: 255 + List of ISIS interfaces for this router. + type: array + items: + $ref: '#/components/schemas/Isis.Interface' x-field-uid: 3 - Isis.V4RouteRange: - description: |- - Emulated ISIS IPv4 routes. + basic: + description: "Contains basic properties of an ISIS Router. " + $ref: '#/components/schemas/Isis.Basic' + x-field-uid: 4 + advanced: + description: |- + Contains advance properties of an ISIS Router.. + $ref: '#/components/schemas/Isis.Advanced' + x-field-uid: 5 + router_auth: + description: |- + ISIS Router authentication properties. + $ref: '#/components/schemas/Isis.Authentication' + x-field-uid: 6 + v4_routes: + description: |- + Emulated ISIS IPv4 routes. + type: array + items: + $ref: '#/components/schemas/Isis.V4RouteRange' + x-field-uid: 7 + v6_routes: + description: |- + Emulated ISIS IPv6 routes. + type: array + items: + $ref: '#/components/schemas/Isis.V6RouteRange' + x-field-uid: 8 + name: + x-field-uid: 9 + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + Device.IsisMultiInstance: + description: "This container properties of an Multi-Instance-capable router\ + \ (MI-RTR). " type: object properties: - addresses: + iid: description: |- - A list of group of IPv4 route addresses. + Instance Identifier (IID) TLV will associate a PDU with an ISIS instance by using a unique 16-bit number and including one or more Instance-Specific Topology Identifiers (ITIDs). + type: integer + format: uint32 + default: 1 + maximum: 65535 + x-field-uid: 1 + itids: + description: |- + This contains one or more ITIDs that will be advertised in IID TLV. type: array items: - $ref: '#/components/schemas/V4RouteAddress' - x-field-uid: 1 - link_metric: + type: integer + format: uint32 + default: 0 + maximum: 65535 x-field-uid: 2 + Isis.Interface: + description: |- + Configuration for single ISIS interface. + type: object + required: + - eth_name + - name + properties: + eth_name: + description: | + The unique name of the Ethernet interface on which ISIS is running. Two ISIS interfaces cannot share the same Ethernet. The underlying Ethernet Interface can an emulated or simulated interface. A simulated ethernet interface can be assumed to be connected by a primary (internal to a simulated topology) or a secondary link (connected to a device behind a different simulated topology). + + x-constraint: + - /components/schemas/Device.Ethernet/properties/name + + + x-constraint: + - /components/schemas/Device.Ethernet/properties/name + type: string + x-constraint: + - /components/schemas/Device.Ethernet/properties/name + x-field-uid: 1 + metric: description: |- - The user-defined metric associated with this route range. + The default metric cost for the interface. type: integer format: uint32 - default: 0 - minimum: 0 maximum: 16777215 - origin_type: - x-field-uid: 3 - description: "The origin of the advertised route-internal or external to\ - \ the ISIS area. Options include the following: \n Internal-for intra-area\ - \ routes, through Level 1 LSPs. \n External-for inter-area routes redistributed\ - \ within L1, through Level\n1 LSPs." + default: 10 + x-field-uid: 2 + network_type: + description: "The type of network link. " type: string - default: internal + default: broadcast + x-field-uid: 3 x-enum: - internal: + broadcast: x-field-uid: 1 - external: + point_to_point: x-field-uid: 2 enum: - - internal - - external - redistribution_type: - x-field-uid: 4 - description: "Defines the Up/Down (Redistribution) bit defined for TLVs\ - \ 128 and 130 by RFC 2966. It is used for domain-wide advertisement of\ - \ prefix information.\n\n Up (0)-used when a prefix is initially advertised\ - \ within the ISIS L3\nhierarchy, \n and for all other prefixes\ - \ in L1 and L2 LSPs. (default) \n Down (1)-used when an L1/L2 router\ - \ advertises L2 prefixes in L1 LSPs.\n\nThe prefixes are being advertised\ - \ from a higher level (L2) down to a lower level (L1). " + - broadcast + - point_to_point + level_type: + description: "This indicates whether this router is participating in Level-1\ + \ (L1), \nLevel-2 (L2) or both L1 and L2 domains on this interface." type: string - default: up + default: level_2 + x-field-uid: 4 x-enum: - up: + level_1: x-field-uid: 1 - down: + level_2: x-field-uid: 2 + level_1_2: + x-field-uid: 3 enum: - - up - - down - name: + - level_1 + - level_2 + - level_1_2 + l1_settings: + description: |- + Settings of Level 1 Hello. + $ref: '#/components/schemas/IsisInterface.Level' x-field-uid: 5 + l2_settings: description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - prefix_attr_enabled: + Settings of Level 2 Hello. + $ref: '#/components/schemas/IsisInterface.Level' x-field-uid: 6 - description: "Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability\ - \ Attribute Flags\nwill be advertised or not. " - type: boolean - default: false - x_flag: + multi_topology_ids: + description: |- + Contains the properties of multiple topologies. + type: array + items: + $ref: '#/components/schemas/Isis.MT' x-field-uid: 7 + traffic_engineering: description: |- - External Prefix Flag (Bit 0) - type: boolean - default: false - r_flag: + Contains a list of Traffic Engineering attributes. + type: array + items: + $ref: '#/components/schemas/LinkState.TE' x-field-uid: 8 + authentication: description: |- - Re-advertisement Flag (Bit 1) - type: boolean - default: false - n_flag: + The Circuit authentication method used for the interfaces on this emulated ISIS v4/v6 router. + $ref: '#/components/schemas/IsisInterface.Authentication' x-field-uid: 9 + advanced: description: |- - Node Flag (Bit 2) - type: boolean - default: false - required: - - name - V4RouteAddress: + Optional container for advanced interface properties. + $ref: '#/components/schemas/IsisInterface.Advanced' + x-field-uid: 10 + link_protection: + description: |- + Link protection on the ISIS link between two interfaces. + $ref: '#/components/schemas/IsisInterface.LinkProtection' + x-field-uid: 11 + srlg_values: + description: |- + This contains list of SRLG values for the link between two interfaces. + type: array + items: + type: integer + format: uint32 + maximum: 16777215 + default: 0 + x-field-uid: 12 + name: + x-field-uid: 13 + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + IsisInterface.Level: description: |- - A container for IPv4 route addresses. + Configuration for the properties of Level 1 Hello. type: object - required: - - address properties: - address: + priority: description: |- - The starting address of the network. - type: string - format: ipv4 + The Priority setting in Level 1 LAN Hellos for Designated Router election. + type: integer + format: uint32 + default: 0 x-field-uid: 1 - prefix: - description: "The IPv4 network prefix length to be applied to the address. " + hello_interval: + description: |- + The Hello interval for Level 1 Hello messages, in seconds. type: integer format: uint32 - default: 24 - maximum: 32 + default: 10 x-field-uid: 2 - count: + dead_interval: description: |- - The total number of addresses in the range. + The Dead (Holding Time) interval for Level 1 Hello messages, in seconds. type: integer format: uint32 - default: 1 - minimum: 1 + default: 30 x-field-uid: 3 - step: + Isis.MT: + description: |- + Configuration of properties per interface per topology when multiple topologies are configured in an ISIS router. + in a ISIS router. + type: object + properties: + mt_id: description: |- - Increments the network address prefixes within a route range where multiple routes are present. The value is incremented according to the Prefix Length and Step. + The Multi Topology ID for one of the topologies supported on the ISIS interface. type: integer format: uint32 - default: 1 - minimum: 1 - x-field-uid: 4 - V6RouteAddress: + maximum: 65535 + default: 0 + x-field-uid: 1 + link_metric: + description: |- + Specifies the link metric for this topology on the ISIS interface. + type: integer + format: uint32 + default: 10 + maximum: 16777215 + x-field-uid: 2 + LinkState.TE: description: |- - A container for IPv6 route addresses. + A container for Traffic Engineering properties on a interface. type: object - required: - - address properties: - address: - description: |- - The starting address of the network. + administrative_group: + description: "The Administrative group sub-TLV (sub-TLV 3). It is a 4-octet\ + \ \nuser-defined bit mask used to assign administrative group numbers\ + \ \nto the interface, for use in assigning colors and resource classes.\ + \ \nEach set bit corresponds to a single administrative group for this\ + \ \ninterface. The settings translate into Group numbers, which range\ + \ \nfrom 0 to 31 (integers)." type: string - format: ipv6 + format: hex + default: '00000000' x-field-uid: 1 - prefix: + metric_level: description: |- - The IPv6 network prefix length to be applied to the address. + The user-assigned link metric for Traffic Engineering. type: integer format: uint32 - default: 64 - maximum: 128 + default: 0 x-field-uid: 2 - count: - description: |- - The total number of addresses in the range. + max_bandwith: + description: "The maximum link bandwidth (sub-TLV 9) in bytes/sec allowed\ + \ for this \nlink for a direction." type: integer format: uint32 - default: 1 - minimum: 1 + default: 125000000 x-field-uid: 3 - step: - description: |- - Increments the network address prefixes within a route range where multiple routes are present. The value is incremented according to the Prefix Length and Step. + max_reservable_bandwidth: + description: "The maximum link bandwidth (sub-TLV 10) in bytes/sec allowed\ + \ for this \nlink in a direction." type: integer format: uint32 - default: 1 - minimum: 1 + default: 125000000 x-field-uid: 4 - MACRouteAddress: - description: |- - A container for MAC route addresses. + priority_bandwidths: + description: |- + Configuration of bandwidths of priority 0 through priority 7. + $ref: '#/components/schemas/LinkState.priorityBandwidths' + x-field-uid: 5 + LinkState.priorityBandwidths: + description: "Specifies the amount of bandwidth that can be reserved with a\ + \ setup priority of 0 \nthrough 7, arranged in increasing order with priority\ + \ 0 having highest priority. \nIn ISIS, this is sent in sub-TLV (11) of Extended\ + \ IS Reachability TLV. " type: object - required: - - address properties: - address: + pb0: description: |- - The starting address of the MAC Range. - type: string - format: mac + Specifies the amount of bandwidth that can be reserved for the Priority 0. + type: integer + format: uint32 + default: 125000000 x-field-uid: 1 - prefix: - description: "The MAC prefix length to be applied to the address. " + pb1: + description: |- + Specifies the amount of bandwidth that can be reserved for the Priority 1. type: integer format: uint32 - default: 48 - minimum: 0 - maximum: 48 + default: 125000000 x-field-uid: 2 - count: + pb2: description: |- - The total number of mac addresses in the range. + Specify the amount of bandwidth that can be reserved for the Priority 2. type: integer format: uint32 - default: 1 - minimum: 1 + default: 125000000 x-field-uid: 3 - step: + pb3: description: |- - Increments the mac address prefixes within a mac range where multiple routes are present. The value is incremented according to the mac prefix Length and Step. + Specifies the amount of bandwidth that can be reserved for the Priority 3. type: integer format: uint32 - default: 1 - minimum: 1 + default: 125000000 x-field-uid: 4 - Isis.V6RouteRange: - description: |- - Emulated ISIS IPv6 routes. - type: object - properties: - addresses: - description: |- - A list of group of IPv6 route addresses. - type: array - items: - $ref: '#/components/schemas/V6RouteAddress' - x-field-uid: 1 - link_metric: - x-field-uid: 2 + pb4: description: |- - The user-defined metric associated with this route range. + Specifies the amount of bandwidth that can be reserved for the Priority 4. type: integer format: uint32 - default: 0 - minimum: 0 - maximum: 16777215 - origin_type: - x-field-uid: 3 - description: "The origin of the advertised route-internal or external to\ - \ the ISIS area. Options include the following: \n Internal-for intra-area\ - \ routes, through Level 1 LSPs. \n External-for inter-area routes redistributed\ - \ within L1, through Level\n1 LSPs." - type: string - default: internal - x-enum: - internal: - x-field-uid: 1 - external: - x-field-uid: 2 - enum: - - internal - - external - redistribution_type: - x-field-uid: 4 - description: "Defines the Up/Down (Redistribution) bit defined for TLVs\ - \ 128 and 130 by RFC 2966. It is used for domain-wide advertisement of\ - \ prefix information.\n\n Up (0)-used when a prefix is initially advertised\ - \ within the ISIS L3\nhierarchy, \n and for all other prefixes\ - \ in L1 and L2 LSPs. (default) \n Down (1)-used when an L1/L2 router\ - \ advertises L2 prefixes in L1 LSPs.\n\nThe prefixes are being advertised\ - \ from a higher level (L2) down to a lower level (L1). " - type: string - default: up - x-enum: - up: - x-field-uid: 1 - down: - x-field-uid: 2 - enum: - - up - - down - name: + default: 125000000 x-field-uid: 5 + pb5: description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - prefix_attr_enabled: + Specifies the amount of bandwidth that can be reserved for the Priority 5. + type: integer + format: uint32 + default: 125000000 x-field-uid: 6 - description: "Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability\ - \ Attribute Flags\nwill be advertised or not. " - type: boolean - default: false - x_flag: + pb6: + description: |- + Specifies the amount of bandwidth that can be reserved for the Priority 6. + type: integer + format: uint32 + default: 125000000 x-field-uid: 7 + pb7: description: |- - External Prefix Flag (Bit 0) - type: boolean - default: false - r_flag: + Specifies the amount of bandwidth that can be reserved for the Priority 7. + type: integer + format: uint32 + default: 125000000 x-field-uid: 8 - description: |- - Re-advertisement Flag (Bit 1) - type: boolean - default: false - n_flag: - x-field-uid: 9 - description: |- - Node Flag (Bit 2) - type: boolean - default: false - required: - - name - Device.BgpRouter: + IsisInterface.Authentication: description: |- - Configuration for one or more IPv4 or IPv6 BGP peers. + Optional container for circuit authentication properties. type: object required: - - router_id + - auth_type properties: - router_id: + auth_type: description: |- - The BGP router ID is a unique identifier used by BGP. It is a 32-bit value that is often represented by an IPv4 address. + The circuit authentication method. type: string - format: ipv4 x-field-uid: 1 - ipv4_interfaces: - description: "This contains an array of references to IPv4 interfaces, \ - \ each of which will have list of peers to different destinations. " - type: array - items: - $ref: '#/components/schemas/Bgp.V4Interface' + x-enum: + md5: + x-field-uid: 1 + password: + x-field-uid: 2 + enum: + - md5 + - password + md5: + description: |- + MD5 key to be used for authentication. + type: string + minLength: 0 + maxLength: 255 x-field-uid: 2 - ipv6_interfaces: + password: description: |- - This contains an array of references to IPv6 interfaces, each of which will have list of peers to different destinations. - type: array - items: - $ref: '#/components/schemas/Bgp.V6Interface' + The password, in clear text, to be used for Authentication. + type: string + minLength: 0 + maxLength: 255 x-field-uid: 3 - Device.Bgp.MessageHeaderError: + IsisInterface.Advanced: description: |- - All errors detected while processing the Message Header are indicated by sending the NOTIFICATION message with the Error Code-Message Header Error. The Error Subcode elaborates on the specific nature of the error. + Optional container for advanced interface properties. type: object properties: - subcode: - description: |- - The Error Subcode indicates the specific type of error encountered during Message Header processing. - type: string - default: connection_not_synchronized_code1_subcode1 + auto_adjust_mtu: + description: "If a padded Hello message is received on the interface, the\ + \ length of \nthe Hello packets sent out on that interface is adjusted\ + \ to match." + type: boolean + default: true x-field-uid: 1 - x-enum: - connection_not_synchronized_code1_subcode1: - x-field-uid: 1 - bad_message_length_code1_subcode2: - x-field-uid: 2 - bad_message_type_code1_subcode3: - x-field-uid: 3 - enum: - - connection_not_synchronized_code1_subcode1 - - bad_message_length_code1_subcode2 - - bad_message_type_code1_subcode3 - Device.Bgp.OpenMessageError: + auto_adjust_area: + description: "If a Level 1 Hello is received on this emulated router for\ + \ an area \nnot currently in its area list, an area from the received\ + \ Hello is \nadded to that list. This ensures an area match for all future\ + \ \nLevel 1 Hellos from the source L1 router." + type: boolean + default: true + x-field-uid: 2 + auto_adjust_supported_protocols: + description: "If a Hello message listing supported protocols is received\ + \ on this \nemulated router, the supported protocols advertised by this\ + \ router \nare changed to match exactly." + type: boolean + default: false + x-field-uid: 3 + enable_3way_handshake: + description: |- + If it is true, the Point-to-Point circuit will include 3-way TLV in its Point-to-Point IIH and attempt to establish the adjacency as specified in RFC 5303. This field is not applicable if network_type is set to 'broadcast' type in ISIS interface. + type: boolean + default: true + x-field-uid: 4 + p2p_hellos_to_unicast_mac: + description: "If it is true, the Point-to-Point Hello messages will be sent\ + \ to the unicast MAC address. " + type: boolean + default: false + x-field-uid: 5 + IsisInterface.LinkProtection: description: |- - All errors detected while processing the OPEN message are indicated by sending the NOTIFICATION message with the Error Code-Open Message Error. The Error Subcode elaborates on the specific nature of the error. + Optional container for the link protection sub TLV (type 20). type: object properties: - subcode: + extra_traffic: description: |- - The Error Subcode indicates the specific type of error encountered during OPEN message processing. - type: string - default: unsupported_version_number_code2_subcode1 + Enable this to protect other link or links. LSPs on a link of this type are lost + if any of the links fail. + type: boolean + default: false x-field-uid: 1 - x-enum: - unsupported_version_number_code2_subcode1: - x-field-uid: 1 - error_peer_as_code2_subcode2: - x-field-uid: 2 - error_bgp_id_code2_subcode3: - x-field-uid: 3 - unsupported_optional_parameter_code2_subcode4: - x-field-uid: 4 - auth_failed_code2_subcode5: - x-field-uid: 5 - unsupported_hold_time_code2_subcode6: - x-field-uid: 6 - unsupported_capability_code2_subcode7: - x-field-uid: 7 - enum: - - unsupported_version_number_code2_subcode1 - - error_peer_as_code2_subcode2 - - error_bgp_id_code2_subcode3 - - unsupported_optional_parameter_code2_subcode4 - - auth_failed_code2_subcode5 - - unsupported_hold_time_code2_subcode6 - - unsupported_capability_code2_subcode7 - Device.Bgp.UpdateMessageError: + unprotected: + description: "Enabling this signifies that there is no other link protecting\ + \ this \nlink. LSPs on a link of this type are lost if the link fails." + type: boolean + default: false + x-field-uid: 2 + shared: + description: "Enable this to share the Extra Traffic links between one or\ + \ more \nlinks of type Shared.There are one or more disjoint links of\ + \ type \nExtra Traffic that are protecting this link." + type: boolean + default: false + x-field-uid: 3 + dedicated_1_to_1: + description: "Enabling this signifies that there is one dedicated disjoint\ + \ link \nof type Extra Traffic that is protecting this link." + type: boolean + default: false + x-field-uid: 4 + dedicated_1_plus_1: + description: "Enabling this signifies that a dedicated disjoint link is\ + \ protecting \nthis link. However, the protecting link is not advertised\ + \ in the \nlink state database and is therefore not available for the\ + \ routing \nof LSPs." + type: boolean + default: false + x-field-uid: 5 + enhanced: + description: "Enabling this signifies that a protection scheme that is more\ + \ \nreliable than Dedicated 1+1." + type: boolean + default: false + x-field-uid: 6 + reserved_40: + description: "This is a Protection Scheme with value 0x40. " + type: boolean + default: false + x-field-uid: 7 + reserved_80: + description: "This is a Protection Scheme with value 0x80. " + type: boolean + default: false + x-field-uid: 8 + Isis.Basic: description: |- - All errors detected while processing the UPDATE message are indicated by sending the NOTIFICATION message with the Error Code-Update Message Error. The Error Subcode elaborates on the specific nature of the error. + This contains ISIS router basic properties. type: object properties: - subcode: - description: |- - The Error Subcode, the specific type of error encountered during UPDATE processing. + ipv4_te_router_id: + description: "IPv4 Traffic Engineering(TE) router id. This address should\ + \ be configured as an IPv4 Loopback address in 'ipv4_loopbacks' in the\ + \ Device. " type: string - default: malformed_attrib_list_code3_subcode1 + format: ipv4 x-field-uid: 1 - x-enum: - malformed_attrib_list_code3_subcode1: - x-field-uid: 1 - unrecognized_wellknown_attrib_code3_subcode2: - x-field-uid: 2 - wellknown_attrib_missing_code3_subcode3: - x-field-uid: 3 - attrib_flags_error_code3_subcode4: - x-field-uid: 4 - attrib_length_error_code3_subcode5: - x-field-uid: 5 - invalid_origin_attrib_code3_subcode6: - x-field-uid: 6 - as_routing_loop_code3_subcode7: - x-field-uid: 7 - invalid_nhop_attrib_code3_subcode8: - x-field-uid: 8 - error_optional_attrib_code3_subcode9: - x-field-uid: 9 - invalid_network_field_code3_subcode10: - x-field-uid: 10 - abnormal_aspath_code3_subcode11: - x-field-uid: 11 - enum: - - malformed_attrib_list_code3_subcode1 - - unrecognized_wellknown_attrib_code3_subcode2 - - wellknown_attrib_missing_code3_subcode3 - - attrib_flags_error_code3_subcode4 - - attrib_length_error_code3_subcode5 - - invalid_origin_attrib_code3_subcode6 - - as_routing_loop_code3_subcode7 - - invalid_nhop_attrib_code3_subcode8 - - error_optional_attrib_code3_subcode9 - - invalid_network_field_code3_subcode10 - - abnormal_aspath_code3_subcode11 - Device.Bgp.HoldTimerExpired: - description: |- - If a system does not receive successive KEEPALIVE, UPDATE, and/or NOTIFICATION messages within the period specified in the Hold Time field of the OPEN message, then the NOTIFICATION message with the Hold Timer Expired Error Code(Error Code 4) is sent and the BGP connection is closed. The Sub Code used is 0. If a user wants to use non zero Sub Code then CustomError can be used. - Device.Bgp.FiniteStateMachineError: - description: |- - Any error detected by the BGP Finite State Machine (e.g., receipt of an unexpected event) is indicated by sending the NOTIFICATION message with the Error Code-Finite State Machine Error(Error Code 5). The Sub Code used is 0. If a user wants to use non zero Sub Code then CustomError can be used. - Device.Bgp.CeaseError: - description: |- - In the absence of any fatal errors, a BGP peer can close its BGP connection by sending the NOTIFICATION message with the Error Code Cease. - type: object - properties: - subcode: + hostname: description: |- - The Error Subcode to be sent to the peer in the Cease NOTIFICATION. + Host name for the router. The host name is transmitted in all the packets sent from the router. type: string - default: admin_shutdown_code6_subcode2 - x-field-uid: 1 - x-enum: - max_number_prefix_reached_code6_subcode1: - x-field-uid: 1 - admin_shutdown_code6_subcode2: - x-field-uid: 2 - peer_deleted_code6_subcode3: - x-field-uid: 3 - admin_reset_code6_subcode4: - x-field-uid: 4 - connection_reject_code6_subcode5: - x-field-uid: 5 - other_config_changes_code6_subcode6: - x-field-uid: 6 - connection_collision_resolution_code6_subcode7: - x-field-uid: 7 - out_of_resources_code6_subcode8: - x-field-uid: 8 - bfd_session_down_code6_subcode9: - x-field-uid: 9 - enum: - - max_number_prefix_reached_code6_subcode1 - - admin_shutdown_code6_subcode2 - - peer_deleted_code6_subcode3 - - admin_reset_code6_subcode4 - - connection_reject_code6_subcode5 - - other_config_changes_code6_subcode6 - - connection_collision_resolution_code6_subcode7 - - out_of_resources_code6_subcode8 - - bfd_session_down_code6_subcode9 - Device.Bgp.CustomError: + x-field-uid: 2 + enable_wide_metric: + description: |- + When set to true, it allows sending of more detailed metric information for the routes using 32-bit wide values using TLV 135 IP reachability and more detailed reachability information for IS reachability by using TLV 22. The detailed usage is described in RFC3784. + type: boolean + default: true + x-field-uid: 3 + learned_lsp_filter: + description: |- + Configuration for controlling storage of ISIS learned LSPs are received from the neighbors. + type: boolean + default: false + x-field-uid: 4 + Isis.Advanced: description: |- - A BGP peer can send NOTIFICATION message with user defined Error Code and Error Subcode. + Contains ISIS router advanced properties. type: object properties: - code: + enable_hello_padding: description: |- - The Error code to be sent in the NOTIFICATION message to peer. - type: integer - format: uint32 + It enables padding of Hello message to MTU size. + type: boolean + default: true x-field-uid: 1 - subcode: - description: |- - The Error Subcode to be sent in the NOTIFICATION message to peer. + max_area_addresses: + description: "The Number of Area Addresses permitted, with a valid range\ + \ from 0 to 254. A zero indicates a maximum of 3 addresses. " type: integer format: uint32 + maximum: 254 + default: 3 x-field-uid: 2 - Bgp.V4Peer: - description: |- - Configuration for emulated BGPv4 peers and routes. - type: object - required: - - peer_address - - as_type - - as_number - - name - properties: - peer_address: + area_addresses: description: |- - IPv4 address of the BGP peer for the session. - type: string - format: ipv4 - x-field-uid: 1 - evpn_ethernet_segments: - description: "This contains the list of Ethernet Virtual Private Network\ - \ (EVPN) Ethernet Segments (ES) Per BGP Peer for IPv4 Address Family Identifier\ - \ (AFI).\n\nEach Ethernet Segment contains a list of EVPN Instances (EVIs)\ - \ . \nEach EVI contains a list of Broadcast Domains. \nEach Broadcast\ - \ Domain contains a list of MAC/IP Ranges. \n\n is responsible for advertising Ethernet Auto-discovery\ - \ Route Per EVI (Type 1).\n\n is responsible for\ - \ advertising Ethernet Auto-discovery Route Per Ethernet Segment (Type\ - \ 1).\n\n is responsible\ - \ for advertising MAC/IP Advertisement Route (Type 2).\n\n is responsible for advertising Inclusive Multicast\ - \ Ethernet Tag Route (Type 3).\n\nEthernet Segment is responsible for\ - \ advertising Ethernet Segment Route (Type 4)." + Its combination of the ISP and HO-DSP.Usually all nodes within an area have the same area address. If no area addresses are configured, a default area of "490001" will be advertised. type: array items: - $ref: '#/components/schemas/BgpV4.EthernetSegment' - x-field-uid: 2 - as_type: + type: string + format: hex x-field-uid: 3 + lsp_refresh_rate: description: |- - The type of BGP autonomous system. External BGP is used for BGP links between two or more autonomous systems (ebgp). Internal BGP is used within a single autonomous system (ibgp). BGP property defaults are aligned with this object defined as an internal BGP peer. If the as_type is specified as 'ebgp' then other properties will need to be specified as per an external BGP peer. Specifically, for 'ebgp', 'as_set_mode' attribute in 'as_path' field in any Route Range should be changed from default value 'do_not_include_local_as' to any other value. - type: string - x-enum: - ibgp: - x-field-uid: 1 - ebgp: - x-field-uid: 2 - enum: - - ibgp - - ebgp - as_number: + The rate at which LSPs are re-sent in seconds. + type: integer + format: uint32 + default: 600 + maximum: 65535 x-field-uid: 4 + lsp_lifetime: description: |- - Autonomous System Number (AS number or ASN) + The MaxAge for retaining a learned LSP on this router in seconds. type: integer format: uint32 - as_number_width: + default: 1200 + maximum: 65535 x-field-uid: 5 + psnp_interval: description: |- - The width in bytes of the as_number values. Any as_number values that exceeds the width MUST result in an error. - type: string - default: four - x-enum: - two: - x-field-uid: 1 - four: - x-field-uid: 2 - enum: - - two - - four - advanced: + The number of milliseconds between transmissions of Partial Sequence Number PDU. + type: integer + format: uint32 + maximum: 60000 + default: 2000 x-field-uid: 6 - $ref: '#/components/schemas/Bgp.Advanced' - capability: + csnp_interval: + description: |- + The number of milliseconds between transmissions of Partial Sequence Number PDU. + type: integer + format: uint32 + minimum: 1 + maximum: 65535000 + default: 10000 x-field-uid: 7 - $ref: '#/components/schemas/Bgp.Capability' - learned_information_filter: + max_lsp_size: + description: |- + The maximum size in bytes of any LSP that can be transmitted over a link of equal or less than maximum MTU size. + type: integer + format: uint32 + minimum: 64 + maximum: 9216 + default: 1492 x-field-uid: 8 - $ref: '#/components/schemas/Bgp.LearnedInformationFilter' - v4_routes: + lsp_mgroup_min_trans_interval: + description: |- + The number of seconds between transmissions of LSPs/MGROUP-PDUs. + type: integer + format: uint32 + minimum: 1 + maximum: 60000 + default: 5000 x-field-uid: 9 + enable_attached_bit: description: |- - Emulated BGPv4 route ranges. - type: array - items: - $ref: '#/components/schemas/Bgp.V4RouteRange' - v6_routes: + If the Attached bit is enabled, it indicates that the ISIS router is attached to another area or the Level 2 backbone. The purpose of an Attached-Bit is to accomplish Inter-Area Routing. When an L1/L2 router is connected to more than one area, it sets the Attached-bit on its L1 LSP. This can cause a default route ( 0.0.0.0/0 ) to be installed by the receiving router. + type: boolean + default: true x-field-uid: 10 + Isis.Authentication: + description: |- + This contains ISIS Area/Domain authentication properties. + type: object + properties: + ignore_receive_md5: description: |- - Emulated BGPv6 route ranges. - type: array - items: - $ref: '#/components/schemas/Bgp.V6RouteRange' - v4_srte_policies: - x-field-uid: 11 - description: |- - Segment Routing Traffic Engineering (SR TE) Policies for IPv4 Address Family Identifier (AFI). - type: array - items: - $ref: '#/components/schemas/BgpSrte.V4Policy' - v6_srte_policies: - x-field-uid: 12 + Do not verify MD5 checksum in received LSPs. + type: boolean + default: true + x-field-uid: 1 + area_auth: description: |- - Segment Routing Traffic Engineering (SR TE) Policies for IPv6 Address Family Identifier (AFI). - type: array - items: - $ref: '#/components/schemas/BgpSrte.V6Policy' - name: - x-field-uid: 13 + The Area authentication method used for the emulated ISIS router. + This is used for L1 LSPs. + $ref: '#/components/schemas/Isis.AuthenticationBase' + x-field-uid: 2 + domain_auth: description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - Globally unique name of an object. It also serves as the primary key for arrays of objects. - type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - graceful_restart: - x-field-uid: 14 - $ref: '#/components/schemas/Bgp.GracefulRestart' - replay_updates: - description: "BGP Updates to be sent to the peer as specified after the\ - \ session is established. " - $ref: '#/components/schemas/Bgp.UpdateReplay' - x-field-uid: 15 - Bgp.V4Interface: + The Domain authentication method used for the emulated ISIS router. + This is used for L2 LSPs. + $ref: '#/components/schemas/Isis.AuthenticationBase' + x-field-uid: 3 + Isis.AuthenticationBase: description: |- - Configuration for emulated BGPv4 peers and routes on a single IPv4 interface. + Optional container for ISIS authentication properties. type: object required: - - ipv4_name + - auth_type properties: - ipv4_name: - description: | - The unique name of the IPv4 or Loopback IPv4 interface used as the source IP for this list of BGP peers. - - x-constraint: - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv4Loopback/properties/name - - - x-constraint: - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv4Loopback/properties/name + auth_type: + description: |- + The authentication method. type: string - x-constraint: - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv4Loopback/properties/name x-field-uid: 1 - peers: + x-enum: + md5: + x-field-uid: 1 + password: + x-field-uid: 2 + enum: + - md5 + - password + md5: description: |- - This contains the list of BGPv4 peers configured on this interface. - type: array - items: - $ref: '#/components/schemas/Bgp.V4Peer' + Authentication as an MD5 key. + type: string + minLength: 0 + maxLength: 255 x-field-uid: 2 - BgpV4.EthernetSegment: - description: "Configuration for BGP Ethernet Segment ranges. Advertises following\ - \ routes - \n\nType 4 - Ethernet Segment Route" + password: + description: |- + Authentication as a clear text password. + type: string + minLength: 0 + maxLength: 255 + x-field-uid: 3 + Isis.V4RouteRange: + description: |- + Emulated ISIS IPv4 routes. type: object properties: - df_election: - description: |- - Designated Forwarder (DF) election configuration. - $ref: '#/components/schemas/Bgp.EthernetSegment.DfElection' - x-field-uid: 1 - evis: + addresses: description: |- - This contains the list of EVIs. + A list of group of IPv4 route addresses. type: array items: - $ref: '#/components/schemas/BgpV4.EvpnEvis' + $ref: '#/components/schemas/V4RouteAddress' + x-field-uid: 1 + link_metric: x-field-uid: 2 - esi: - x-field-uid: 3 - description: |- - 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero ESI is '10000000000000000000' . - type: string - format: hex - default: '00000000000000000000' - active_mode: - x-field-uid: 4 description: |- - Single Active or All Active mode Redundancy mode selection for Multi-home. + The user-defined metric associated with this route range. + type: integer + format: uint32 + default: 0 + minimum: 0 + maximum: 16777215 + origin_type: + x-field-uid: 3 + description: "The origin of the advertised route-internal or external to\ + \ the ISIS area. Options include the following: \n Internal-for intra-area\ + \ routes, through Level 1 LSPs. \n External-for inter-area routes redistributed\ + \ within L1, through Level\n1 LSPs." type: string - default: all_active + default: internal x-enum: - single_active: + internal: x-field-uid: 1 - all_active: + external: x-field-uid: 2 enum: - - single_active - - all_active - esi_label: + - internal + - external + redistribution_type: + x-field-uid: 4 + description: "Defines the Up/Down (Redistribution) bit defined for TLVs\ + \ 128 and 130 by RFC 2966. It is used for domain-wide advertisement of\ + \ prefix information.\n\n Up (0)-used when a prefix is initially advertised\ + \ within the ISIS L3\nhierarchy, \n and for all other prefixes\ + \ in L1 and L2 LSPs. (default) \n Down (1)-used when an L1/L2 router\ + \ advertises L2 prefixes in L1 LSPs.\n\nThe prefixes are being advertised\ + \ from a higher level (L2) down to a lower level (L1). " + type: string + default: up + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + enum: + - up + - down + name: x-field-uid: 5 - description: "The label value to be advertised as ESI Label in ESI Label\ - \ Extended Community. This is included in Ethernet Auto-discovery per\ - \ ES Routes advertised by a router. " - type: integer - format: uint32 - maximum: 16777215 - default: 0 - advanced: + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + prefix_attr_enabled: x-field-uid: 6 - $ref: '#/components/schemas/Bgp.RouteAdvanced' - communities: + description: "Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability\ + \ Attribute Flags\nwill be advertised or not. " + type: boolean + default: false + x_flag: x-field-uid: 7 description: |- - Optional community settings. - type: array - items: - $ref: '#/components/schemas/Bgp.Community' - ext_communities: + External Prefix Flag (Bit 0) + type: boolean + default: false + r_flag: x-field-uid: 8 description: |- - Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. - type: array - items: - $ref: '#/components/schemas/Bgp.ExtCommunity' - as_path: + Re-advertisement Flag (Bit 1) + type: boolean + default: false + n_flag: x-field-uid: 9 description: |- - Optional AS PATH settings. - $ref: '#/components/schemas/Bgp.AsPath' - Bgp.EthernetSegment.DfElection: + Node Flag (Bit 2) + type: boolean + default: false + required: + - name + V4RouteAddress: description: |- - Configuration for Designated Forwarder (DF) election among the Provider Edge (PE) routers on the same Ethernet Segment. + A container for IPv4 route addresses. type: object + required: + - address properties: - election_timer: + address: description: |- - The DF election timer in seconds. + The starting address of the network. + type: string + format: ipv4 + x-field-uid: 1 + prefix: + description: "The IPv4 network prefix length to be applied to the address. " type: integer format: uint32 - maximum: 300 - default: 3 - x-field-uid: 1 - Bgp.RouteAdvanced: - description: |- - Configuration for advanced BGP route range settings. - type: object - properties: - include_multi_exit_discriminator: + default: 24 + maximum: 32 + x-field-uid: 2 + count: description: |- - BGP Multi Exit Discriminator attribute sent to the peer to help in the route selection process. If set to true, the Multi Exit Discriminator attribute will be included in the route advertisement. - type: boolean - default: true + The total number of addresses in the range. + type: integer + format: uint32 + default: 1 + minimum: 1 x-field-uid: 3 - multi_exit_discriminator: + step: description: |- - The multi exit discriminator (MED) value used for route selection sent to the peer. + Increments the network address prefixes within a route range where multiple routes are present. The value is incremented according to the Prefix Length and Step. type: integer format: uint32 - x-field-uid: 1 - include_origin: - description: |- - If set to true, the Origin attribute will be included in the route advertisement. - type: boolean - default: true + default: 1 + minimum: 1 x-field-uid: 4 - origin: + V6RouteAddress: + description: |- + A container for IPv6 route addresses. + type: object + required: + - address + properties: + address: description: |- - The origin attribute of a prefix can take three values: the prefix originates from an interior routing protocol 'igp', it originates from 'egp' or the origin is 'incomplete', if the prefix is learned through other means. + The starting address of the network. type: string - default: igp + format: ipv6 + x-field-uid: 1 + prefix: + description: |- + The IPv6 network prefix length to be applied to the address. + type: integer + format: uint32 + default: 64 + maximum: 128 x-field-uid: 2 - x-enum: - igp: - x-field-uid: 1 - egp: - x-field-uid: 2 - incomplete: - x-field-uid: 3 - enum: - - igp - - egp - - incomplete - include_local_preference: + count: description: |- - BGP Local Preference attribute sent to the peer to indicate the degree of preference for externally learned routes. If set to true, the Local Preference attribute will be included in the route advertisement. This should be included only for internal peers. - type: boolean - default: true - x-field-uid: 5 - local_preference: + The total number of addresses in the range. + type: integer + format: uint32 + default: 1 + minimum: 1 + x-field-uid: 3 + step: description: |- - Value to be set in Local Preference attribute if include_local_preference is set to true. It is used for the selection of the path for the traffic leaving the AS. The route with the highest local preference value is preferred. + Increments the network address prefixes within a route range where multiple routes are present. The value is incremented according to the Prefix Length and Step. type: integer format: uint32 - default: 100 - x-field-uid: 6 - Bgp.Community: + default: 1 + minimum: 1 + x-field-uid: 4 + MACRouteAddress: description: |- - BGP communities provide additional capability for tagging routes and for modifying BGP routing policy on upstream and downstream routers. BGP community is a 32-bit number which is broken into 16-bit AS number and a 16-bit custom value. + A container for MAC route addresses. type: object + required: + - address properties: - type: + address: description: |- - The type of community AS number. + The starting address of the MAC Range. type: string + format: mac x-field-uid: 1 - x-enum: - manual_as_number: - x-field-uid: 1 - no_export: - x-field-uid: 2 - no_advertised: - x-field-uid: 3 - no_export_subconfed: - x-field-uid: 4 - llgr_stale: - x-field-uid: 5 - no_llgr: - x-field-uid: 6 - enum: - - manual_as_number - - no_export - - no_advertised - - no_export_subconfed - - llgr_stale - - no_llgr - as_number: - description: |- - First two octets of 32 bit community AS number. + prefix: + description: "The MAC prefix length to be applied to the address. " type: integer format: uint32 - maximum: 65535 - default: 0 + default: 48 + minimum: 0 + maximum: 48 x-field-uid: 2 - as_custom: - description: "Last two octets of the community value. " + count: + description: |- + The total number of mac addresses in the range. type: integer format: uint32 - maximum: 65535 - default: 0 + default: 1 + minimum: 1 x-field-uid: 3 - Bgp.ExtCommunity: + step: + description: |- + Increments the mac address prefixes within a mac range where multiple routes are present. The value is incremented according to the mac prefix Length and Step. + type: integer + format: uint32 + default: 1 + minimum: 1 + x-field-uid: 4 + Isis.V6RouteRange: description: |- - The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. + Emulated ISIS IPv6 routes. type: object properties: - type: - description: "Extended Community Type field of 1 Byte.\n - administrator_as_2octet:\ - \ Two-Octet AS Specific Extended Community (RFC 4360).\n - administrator_ipv4_address:\ - \ IPv4 Address Specific Extended Community (RFC 4360).\n - administrator_as_4octet:\ - \ 4-Octet AS Specific Extended Community (RFC 5668).\n - opaque: Opaque\ - \ Extended Community (RFC 7432).\n - evpn: EVPN Extended Community (RFC\ - \ 7153). \n - administrator_as_2octet_link_bandwidth : Link Bandwidth\ - \ Extended Community (RFC 7153)." - type: string + addresses: + description: |- + A list of group of IPv6 route addresses. + type: array + items: + $ref: '#/components/schemas/V6RouteAddress' x-field-uid: 1 - x-enum: - administrator_as_2octet: - x-field-uid: 1 - administrator_ipv4_address: - x-field-uid: 2 - administrator_as_4octet: - x-field-uid: 3 - opaque: - x-field-uid: 4 - evpn: - x-field-uid: 5 - administrator_as_2octet_link_bandwidth: - x-field-uid: 6 - enum: - - administrator_as_2octet - - administrator_ipv4_address - - administrator_as_4octet - - opaque - - evpn - - administrator_as_2octet_link_bandwidth - subtype: + link_metric: + x-field-uid: 2 description: |- - Extended Community Sub Type field of 1 Byte. - - route_target: Route Target. - - origin: Origin. - - extended_bandwidth: Specifies the link bandwidth. - - color: Specifies the color value. - - encapsulation: Specifies the Encapsulation Extended Community. - - mac_address: Specifies the Extended community MAC address. + The user-defined metric associated with this route range. + type: integer + format: uint32 + default: 0 + minimum: 0 + maximum: 16777215 + origin_type: + x-field-uid: 3 + description: "The origin of the advertised route-internal or external to\ + \ the ISIS area. Options include the following: \n Internal-for intra-area\ + \ routes, through Level 1 LSPs. \n External-for inter-area routes redistributed\ + \ within L1, through Level\n1 LSPs." type: string - x-field-uid: 2 + default: internal x-enum: - route_target: + internal: x-field-uid: 1 - origin: + external: x-field-uid: 2 - extended_bandwidth: - x-field-uid: 3 - color: - x-field-uid: 4 - encapsulation: - x-field-uid: 5 - mac_address: - x-field-uid: 6 enum: - - route_target - - origin - - extended_bandwidth - - color - - encapsulation - - mac_address - value: + - internal + - external + redistribution_type: + x-field-uid: 4 + description: "Defines the Up/Down (Redistribution) bit defined for TLVs\ + \ 128 and 130 by RFC 2966. It is used for domain-wide advertisement of\ + \ prefix information.\n\n Up (0)-used when a prefix is initially advertised\ + \ within the ISIS L3\nhierarchy, \n and for all other prefixes\ + \ in L1 and L2 LSPs. (default) \n Down (1)-used when an L1/L2 router\ + \ advertises L2 prefixes in L1 LSPs.\n\nThe prefixes are being advertised\ + \ from a higher level (L2) down to a lower level (L1). " + type: string + default: up + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + enum: + - up + - down + name: + x-field-uid: 5 description: |- - Extended Community value of 6 Bytes. Example - for the Opaque type and Color subtype value can be '0000000000c8' for the color value 200. + Globally unique name of an object. It also serves as the primary key for arrays of objects. type: string - format: hex - x-field-uid: 3 - Bgp.AsPath: + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + prefix_attr_enabled: + x-field-uid: 6 + description: "Specifies whether the sub-TLV for IPv4/IPv6 Extended Reachability\ + \ Attribute Flags\nwill be advertised or not. " + type: boolean + default: false + x_flag: + x-field-uid: 7 + description: |- + External Prefix Flag (Bit 0) + type: boolean + default: false + r_flag: + x-field-uid: 8 + description: |- + Re-advertisement Flag (Bit 1) + type: boolean + default: false + n_flag: + x-field-uid: 9 + description: |- + Node Flag (Bit 2) + type: boolean + default: false + required: + - name + Device.BgpRouter: description: |- - This attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. + Configuration for one or more IPv4 or IPv6 BGP peers. type: object + required: + - router_id properties: - as_set_mode: + router_id: description: |- - Defines how the Local AS should be included in the MP REACH NLRI. For iBGP sessions, "Do Not Include Local AS" must be chosen. For eBGP sessions, any choice other than "Do Not Include Local AS" can be chosen. + The BGP router ID is a unique identifier used by BGP. It is a 32-bit value that is often represented by an IPv4 address. type: string - default: do_not_include_local_as + format: ipv4 x-field-uid: 1 - x-enum: - do_not_include_local_as: - x-field-uid: 1 - include_as_seq: - x-field-uid: 2 - include_as_set: - x-field-uid: 3 - include_as_confed_seq: - x-field-uid: 4 - include_as_confed_set: - x-field-uid: 5 - prepend_to_first_segment: - x-field-uid: 6 - enum: - - do_not_include_local_as - - include_as_seq - - include_as_set - - include_as_confed_seq - - include_as_confed_set - - prepend_to_first_segment - segments: - description: "The additional AS path segments to be added in the NLRI. \ - \ By default, an empty AS path is always included and the local AS is\ - \ added to it as per the value of 'as_set_mode' attribute. " + ipv4_interfaces: + description: "This contains an array of references to IPv4 interfaces, \ + \ each of which will have list of peers to different destinations. " type: array items: - $ref: '#/components/schemas/Bgp.AsPathSegment' + $ref: '#/components/schemas/Bgp.V4Interface' x-field-uid: 2 - Bgp.AsPathSegment: + ipv6_interfaces: + description: |- + This contains an array of references to IPv6 interfaces, each of which will have list of peers to different destinations. + type: array + items: + $ref: '#/components/schemas/Bgp.V6Interface' + x-field-uid: 3 + Device.Bgp.MessageHeaderError: description: |- - Configuration for a single BGP AS path segment + All errors detected while processing the Message Header are indicated by sending the NOTIFICATION message with the Error Code-Message Header Error. The Error Subcode elaborates on the specific nature of the error. type: object properties: - type: + subcode: description: |- - AS sequence is the most common type of AS_PATH, it contains the list of ASNs starting with the most recent ASN being added read from left to right. - The other three AS_PATH types are used for Confederations - AS_SET is the type of AS_PATH attribute that summarizes routes using using the aggregate-address command, allowing AS_PATHs to be summarized in the update as well. - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most recent ASN to be added reading left to right - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent in BGP Updates. + The Error Subcode indicates the specific type of error encountered during Message Header processing. type: string - default: as_seq + default: connection_not_synchronized_code1_subcode1 x-field-uid: 1 x-enum: - as_seq: + connection_not_synchronized_code1_subcode1: x-field-uid: 1 - as_set: + bad_message_length_code1_subcode2: x-field-uid: 2 - as_confed_seq: + bad_message_type_code1_subcode3: x-field-uid: 3 - as_confed_set: - x-field-uid: 4 enum: - - as_seq - - as_set - - as_confed_seq - - as_confed_set - as_numbers: - description: |- - The AS numbers in this AS path segment. - type: array - items: - type: integer - format: uint32 - default: 1 - x-field-uid: 2 - BgpV4.EvpnEvis: - description: "This contains a list of different flavors of EVPN. \nFor example\ - \ EVPN over VXLAN or EVPN over MPLS etc to be configured per Ethernet segment.\ - \ \nNeed to instantiate correct type of EVPN instance as per requirement." + - connection_not_synchronized_code1_subcode1 + - bad_message_length_code1_subcode2 + - bad_message_type_code1_subcode3 + Device.Bgp.OpenMessageError: + description: |- + All errors detected while processing the OPEN message are indicated by sending the NOTIFICATION message with the Error Code-Open Message Error. The Error Subcode elaborates on the specific nature of the error. type: object properties: - choice: + subcode: + description: |- + The Error Subcode indicates the specific type of error encountered during OPEN message processing. type: string - default: evi_vxlan + default: unsupported_version_number_code2_subcode1 x-field-uid: 1 x-enum: - evi_vxlan: + unsupported_version_number_code2_subcode1: x-field-uid: 1 + error_peer_as_code2_subcode2: + x-field-uid: 2 + error_bgp_id_code2_subcode3: + x-field-uid: 3 + unsupported_optional_parameter_code2_subcode4: + x-field-uid: 4 + auth_failed_code2_subcode5: + x-field-uid: 5 + unsupported_hold_time_code2_subcode6: + x-field-uid: 6 + unsupported_capability_code2_subcode7: + x-field-uid: 7 enum: - - evi_vxlan - evi_vxlan: - description: "EVPN VXLAN instance to be configured per Ethernet Segment.\ - \ " - $ref: '#/components/schemas/BgpV4.EviVxlan' - x-field-uid: 2 - BgpV4.EviVxlan: - description: "Configuration for BGP EVPN EVI. Advertises following routes -\ - \ \n\nType 3 - Inclusive Multicast Ethernet Tag Route\n\nType 1 - Ethernet\ - \ Auto-discovery Route (Per EVI)\n\nType 1 - Ethernet Auto-discovery Route\ - \ (Per ES)" + - unsupported_version_number_code2_subcode1 + - error_peer_as_code2_subcode2 + - error_bgp_id_code2_subcode3 + - unsupported_optional_parameter_code2_subcode4 + - auth_failed_code2_subcode5 + - unsupported_hold_time_code2_subcode6 + - unsupported_capability_code2_subcode7 + Device.Bgp.UpdateMessageError: + description: |- + All errors detected while processing the UPDATE message are indicated by sending the NOTIFICATION message with the Error Code-Update Message Error. The Error Subcode elaborates on the specific nature of the error. type: object properties: - broadcast_domains: - description: |- - This contains the list of Broadcast Domains to be configured per EVI. - type: array - items: - $ref: '#/components/schemas/BgpV4.EviVxlan.BroadcastDomain' - x-field-uid: 1 - replication_type: - x-field-uid: 2 + subcode: description: |- - This model only supports Ingress Replication + The Error Subcode, the specific type of error encountered during UPDATE processing. type: string - default: ingress_replication + default: malformed_attrib_list_code3_subcode1 + x-field-uid: 1 x-enum: - ingress_replication: + malformed_attrib_list_code3_subcode1: x-field-uid: 1 + unrecognized_wellknown_attrib_code3_subcode2: + x-field-uid: 2 + wellknown_attrib_missing_code3_subcode3: + x-field-uid: 3 + attrib_flags_error_code3_subcode4: + x-field-uid: 4 + attrib_length_error_code3_subcode5: + x-field-uid: 5 + invalid_origin_attrib_code3_subcode6: + x-field-uid: 6 + as_routing_loop_code3_subcode7: + x-field-uid: 7 + invalid_nhop_attrib_code3_subcode8: + x-field-uid: 8 + error_optional_attrib_code3_subcode9: + x-field-uid: 9 + invalid_network_field_code3_subcode10: + x-field-uid: 10 + abnormal_aspath_code3_subcode11: + x-field-uid: 11 enum: - - ingress_replication - pmsi_label: - x-field-uid: 3 + - malformed_attrib_list_code3_subcode1 + - unrecognized_wellknown_attrib_code3_subcode2 + - wellknown_attrib_missing_code3_subcode3 + - attrib_flags_error_code3_subcode4 + - attrib_length_error_code3_subcode5 + - invalid_origin_attrib_code3_subcode6 + - as_routing_loop_code3_subcode7 + - invalid_nhop_attrib_code3_subcode8 + - error_optional_attrib_code3_subcode9 + - invalid_network_field_code3_subcode10 + - abnormal_aspath_code3_subcode11 + Device.Bgp.HoldTimerExpired: + description: |- + If a system does not receive successive KEEPALIVE, UPDATE, and/or NOTIFICATION messages within the period specified in the Hold Time field of the OPEN message, then the NOTIFICATION message with the Hold Timer Expired Error Code(Error Code 4) is sent and the BGP connection is closed. The Sub Code used is 0. If a user wants to use non zero Sub Code then CustomError can be used. + Device.Bgp.FiniteStateMachineError: + description: |- + Any error detected by the BGP Finite State Machine (e.g., receipt of an unexpected event) is indicated by sending the NOTIFICATION message with the Error Code-Finite State Machine Error(Error Code 5). The Sub Code used is 0. If a user wants to use non zero Sub Code then CustomError can be used. + Device.Bgp.CeaseError: + description: |- + In the absence of any fatal errors, a BGP peer can close its BGP connection by sending the NOTIFICATION message with the Error Code Cease. The 'hard_reset_code6_subcode9' subcode for Cease Notification can be used to signal a hard reset that will indicate that Graceful Restart cannot be performed, even when Notification extensions to Graceful Restart procedure is supported. + type: object + properties: + subcode: description: |- - Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. + The Error Subcode to be sent to the peer in the Cease NOTIFICATION. + type: string + default: admin_shutdown_code6_subcode2 + x-field-uid: 1 + x-enum: + max_number_prefix_reached_code6_subcode1: + x-field-uid: 1 + admin_shutdown_code6_subcode2: + x-field-uid: 2 + peer_deleted_code6_subcode3: + x-field-uid: 3 + admin_reset_code6_subcode4: + x-field-uid: 4 + connection_reject_code6_subcode5: + x-field-uid: 5 + other_config_changes_code6_subcode6: + x-field-uid: 6 + connection_collision_resolution_code6_subcode7: + x-field-uid: 7 + out_of_resources_code6_subcode8: + x-field-uid: 8 + bfd_session_down_code6_subcode10: + x-field-uid: 9 + hard_reset_code6_subcode9: + x-field-uid: 10 + enum: + - max_number_prefix_reached_code6_subcode1 + - admin_shutdown_code6_subcode2 + - peer_deleted_code6_subcode3 + - admin_reset_code6_subcode4 + - connection_reject_code6_subcode5 + - other_config_changes_code6_subcode6 + - connection_collision_resolution_code6_subcode7 + - out_of_resources_code6_subcode8 + - bfd_session_down_code6_subcode10 + - hard_reset_code6_subcode9 + Device.Bgp.CustomError: + description: |- + A BGP peer can send NOTIFICATION message with user defined Error Code and Error Subcode. + type: object + properties: + code: + description: |- + The Error code to be sent in the NOTIFICATION message to peer. type: integer format: uint32 - maximum: 16777215 - default: 16 - ad_label: + x-field-uid: 1 + subcode: + description: |- + The Error Subcode to be sent in the NOTIFICATION message to peer. + type: integer + format: uint32 + x-field-uid: 2 + Bgp.V4Peer: + description: |- + Configuration for emulated BGPv4 peers and routes. + type: object + required: + - peer_address + - as_type + - as_number + - name + properties: + peer_address: + description: |- + IPv4 address of the BGP peer for the session. + type: string + format: ipv4 + x-field-uid: 1 + evpn_ethernet_segments: + description: "This contains the list of Ethernet Virtual Private Network\ + \ (EVPN) Ethernet Segments (ES) Per BGP Peer for IPv4 Address Family Identifier\ + \ (AFI).\n\nEach Ethernet Segment contains a list of EVPN Instances (EVIs)\ + \ . \nEach EVI contains a list of Broadcast Domains. \nEach Broadcast\ + \ Domain contains a list of MAC/IP Ranges. \n\n is responsible for advertising Ethernet Auto-discovery\ + \ Route Per EVI (Type 1).\n\n is responsible for\ + \ advertising Ethernet Auto-discovery Route Per Ethernet Segment (Type\ + \ 1).\n\n is responsible\ + \ for advertising MAC/IP Advertisement Route (Type 2).\n\n is responsible for advertising Inclusive Multicast\ + \ Ethernet Tag Route (Type 3).\n\nEthernet Segment is responsible for\ + \ advertising Ethernet Segment Route (Type 4)." + type: array + items: + $ref: '#/components/schemas/BgpV4.EthernetSegment' + x-field-uid: 2 + as_type: + x-field-uid: 3 + description: |- + The type of BGP autonomous system. External BGP is used for BGP links between two or more autonomous systems (ebgp). Internal BGP is used within a single autonomous system (ibgp). BGP property defaults are aligned with this object defined as an internal BGP peer. If the as_type is specified as 'ebgp' then other properties will need to be specified as per an external BGP peer. Specifically, for 'ebgp', 'as_set_mode' attribute in 'as_path' field in any Route Range should be changed from default value 'do_not_include_local_as' to any other value. + type: string + x-enum: + ibgp: + x-field-uid: 1 + ebgp: + x-field-uid: 2 + enum: + - ibgp + - ebgp + as_number: x-field-uid: 4 description: |- - The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet Auto-discovery Route per + Autonomous System Number (AS number or ASN) type: integer format: uint32 - maximum: 16777215 - default: 0 - route_distinguisher: + as_number_width: x-field-uid: 5 description: |- - Colon separated Extended Community value of 6 Bytes - "AS number: Value" identifying an EVI. Example - for the as_2octet "60005:100". - $ref: '#/components/schemas/Bgp.RouteDistinguisher' - route_target_export: + The width in bytes of the as_number values. Any as_number values that exceeds the width MUST result in an error. + type: string + default: four + x-enum: + two: + x-field-uid: 1 + four: + x-field-uid: 2 + enum: + - two + - four + advanced: x-field-uid: 6 - description: "List of Layer 2 Virtual Network Identifier (L2VNI) export\ - \ targets associated with this EVI. " - type: array - items: - $ref: '#/components/schemas/Bgp.RouteTarget' - route_target_import: + $ref: '#/components/schemas/Bgp.Advanced' + capability: x-field-uid: 7 - description: "List of L2VNI import targets associated with this EVI. " - type: array - items: - $ref: '#/components/schemas/Bgp.RouteTarget' - l3_route_target_export: + $ref: '#/components/schemas/Bgp.Capability' + learned_information_filter: x-field-uid: 8 + $ref: '#/components/schemas/Bgp.LearnedInformationFilter' + v4_routes: + x-field-uid: 9 description: |- - List of Layer 3 Virtual Network Identifier (L3VNI) Export Route Targets. + Emulated BGPv4 route ranges. type: array items: - $ref: '#/components/schemas/Bgp.RouteTarget' - l3_route_target_import: - x-field-uid: 9 + $ref: '#/components/schemas/Bgp.V4RouteRange' + v6_routes: + x-field-uid: 10 description: |- - List of L3VNI Import Route Targets. + Emulated BGPv6 route ranges. type: array items: - $ref: '#/components/schemas/Bgp.RouteTarget' - advanced: - x-field-uid: 10 - $ref: '#/components/schemas/Bgp.RouteAdvanced' - communities: + $ref: '#/components/schemas/Bgp.V6RouteRange' + v4_srte_policies: x-field-uid: 11 description: |- - Optional community settings. + Segment Routing Traffic Engineering (SR TE) Policies for IPv4 Address Family Identifier (AFI). type: array items: - $ref: '#/components/schemas/Bgp.Community' - ext_communities: + $ref: '#/components/schemas/BgpSrte.V4Policy' + v6_srte_policies: x-field-uid: 12 description: |- - Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. + Segment Routing Traffic Engineering (SR TE) Policies for IPv6 Address Family Identifier (AFI). type: array items: - $ref: '#/components/schemas/Bgp.ExtCommunity' - as_path: + $ref: '#/components/schemas/BgpSrte.V6Policy' + name: x-field-uid: 13 description: |- - Optional AS PATH settings. - $ref: '#/components/schemas/Bgp.AsPath' - BgpV4.EviVxlan.BroadcastDomain: + Globally unique name of an object. It also serves as the primary key for arrays of objects. + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + graceful_restart: + x-field-uid: 14 + $ref: '#/components/schemas/Bgp.GracefulRestart' + replay_updates: + description: "BGP Updates to be sent to the peer as specified after the\ + \ session is established. " + $ref: '#/components/schemas/Bgp.UpdateReplay' + x-field-uid: 15 + Bgp.V4Interface: description: |- - Configuration for Broadcast Domains per EVI. + Configuration for emulated BGPv4 peers and routes on a single IPv4 interface. type: object + required: + - ipv4_name properties: - cmac_ip_range: - description: "This contains the list of Customer MAC/IP Ranges to be configured\ - \ per Broadcast Domain. \n\nAdvertises following route - \nType 2 - MAC/IP\ - \ Advertisement Route." - type: array - items: - $ref: '#/components/schemas/Bgp.CMacIpRange' + ipv4_name: + description: | + The unique name of the IPv4, Loopback IPv4 interface or DHCPv4 client used as the source IP for this list of BGP peers. + + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv4Loopback/properties/name + - /components/schemas/Device.Dhcpv4client/properties/name + + + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv4Loopback/properties/name + - /components/schemas/Device.Dhcpv4client/properties/name + type: string + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv4Loopback/properties/name + - /components/schemas/Device.Dhcpv4client/properties/name x-field-uid: 1 - ethernet_tag_id: - x-field-uid: 2 - description: |- - The Ethernet Tag ID of the Broadcast Domain. - type: integer - format: uint32 - default: 0 - vlan_aware_service: - x-field-uid: 3 + peers: description: |- - VLAN-Aware service to be enabled or disabled. - type: boolean - default: false - Bgp.CMacIpRange: - description: "Configuration for MAC/IP Ranges per Broadcast Domain. \n\nAdvertises\ - \ following route -\n\nType 2 - MAC/IP Advertisement Route." + This contains the list of BGPv4 peers configured on this interface. + type: array + items: + $ref: '#/components/schemas/Bgp.V4Peer' + x-field-uid: 2 + BgpV4.EthernetSegment: + description: "Configuration for BGP Ethernet Segment ranges. Advertises following\ + \ routes - \n\nType 4 - Ethernet Segment Route" type: object properties: - mac_addresses: - description: "Host MAC address range per Broadcast Domain. " - $ref: '#/components/schemas/MACRouteAddress' + df_election: + description: |- + Designated Forwarder (DF) election configuration. + $ref: '#/components/schemas/Bgp.EthernetSegment.DfElection' x-field-uid: 1 - l2vni: + evis: description: |- - Layer 2 Virtual Network Identifier (L2VNI) to be advertised with MAC/IP Advertisement Route (Type 2) - type: integer - format: uint32 - maximum: 16777215 - default: 0 + This contains the list of EVIs. + type: array + items: + $ref: '#/components/schemas/BgpV4.EvpnEvis' x-field-uid: 2 - ipv4_addresses: - description: "Host IPv4 address range per Broadcast Domain. " - $ref: '#/components/schemas/V4RouteAddress' + esi: x-field-uid: 3 - ipv6_addresses: - description: "Host IPv6 address range per Broadcast Domain. \ - \ " - $ref: '#/components/schemas/V6RouteAddress' + description: |- + 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero ESI is '10000000000000000000' . + type: string + format: hex + default: '00000000000000000000' + active_mode: x-field-uid: 4 - l3vni: description: |- - Layer 3 Virtual Network Identifier (L3VNI) to be advertised with MAC/IP Advertisement Route (Type 2). + Single Active or All Active mode Redundancy mode selection for Multi-home. + type: string + default: all_active + x-enum: + single_active: + x-field-uid: 1 + all_active: + x-field-uid: 2 + enum: + - single_active + - all_active + esi_label: + x-field-uid: 5 + description: "The label value to be advertised as ESI Label in ESI Label\ + \ Extended Community. This is included in Ethernet Auto-discovery per\ + \ ES Routes advertised by a router. " type: integer format: uint32 maximum: 16777215 default: 0 - x-field-uid: 5 - include_default_gateway: - description: |- - Include default Gateway Extended Community in MAC/IP Advertisement Route (Type 2). - type: boolean - default: false - x-field-uid: 6 advanced: + x-field-uid: 6 $ref: '#/components/schemas/Bgp.RouteAdvanced' - x-field-uid: 7 communities: + x-field-uid: 7 description: |- Optional community settings. type: array items: $ref: '#/components/schemas/Bgp.Community' - x-field-uid: 8 ext_communities: + x-field-uid: 8 description: |- Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. type: array items: $ref: '#/components/schemas/Bgp.ExtCommunity' - x-field-uid: 9 as_path: + x-field-uid: 9 description: |- Optional AS PATH settings. $ref: '#/components/schemas/Bgp.AsPath' - x-field-uid: 10 - name: - x-field-uid: 11 + Bgp.EthernetSegment.DfElection: + description: |- + Configuration for Designated Forwarder (DF) election among the Provider Edge (PE) routers on the same Ethernet Segment. + type: object + properties: + election_timer: description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - required: - - name - Bgp.RouteDistinguisher: + The DF election timer in seconds. + type: integer + format: uint32 + maximum: 300 + default: 3 + x-field-uid: 1 + Bgp.RouteAdvanced: description: |- - BGP Route Distinguisher. + Configuration for advanced BGP route range settings. type: object properties: - rd_type: - description: "Route Distinguisher Type field of 2 Byte.\n - as_2octet: Two-Octet\ - \ AS Specific Extended Community (RFC 4360).\n - ipv4_address: IPv4 Address\ - \ Specific Extended Community (RFC 4360).\n - as_4octet: 4-Octet AS Specific\ - \ Extended Community (RFC 5668). " - type: string - default: as_2octet + include_multi_exit_discriminator: + description: |- + BGP Multi Exit Discriminator attribute sent to the peer to help in the route selection process. If set to true, the Multi Exit Discriminator attribute will be included in the route advertisement. + type: boolean + default: true + x-field-uid: 3 + multi_exit_discriminator: + description: |- + The multi exit discriminator (MED) value used for route selection sent to the peer. + type: integer + format: uint32 x-field-uid: 1 + include_origin: + description: |- + If set to true, the Origin attribute will be included in the route advertisement. + type: boolean + default: true + x-field-uid: 4 + origin: + description: |- + The origin attribute of a prefix can take three values: the prefix originates from an interior routing protocol 'igp', it originates from 'egp' or the origin is 'incomplete', if the prefix is learned through other means. + type: string + default: igp + x-field-uid: 2 x-enum: - as_2octet: + igp: x-field-uid: 1 - ipv4_address: + egp: x-field-uid: 2 - as_4octet: + incomplete: x-field-uid: 3 enum: - - as_2octet - - ipv4_address - - as_4octet - auto_config_rd_ip_addr: + - igp + - egp + - incomplete + include_local_preference: description: |- - Allow to automatically configure RD IP address from local ip. + BGP Local Preference attribute sent to the peer to indicate the degree of preference for externally learned routes. If set to true, the Local Preference attribute will be included in the route advertisement. This should be included only for internal peers. type: boolean - default: false - x-field-uid: 2 - rd_value: + default: true + x-field-uid: 5 + local_preference: description: |- - Colon separated Extended Community value of 6 Bytes - "AS number: Value". Example - for the as_2octet or as_4octet "60005:100", for ipv4_address "1.1.1.1:100" - type: string - x-field-uid: 3 - Bgp.RouteTarget: + Value to be set in Local Preference attribute if include_local_preference is set to true. It is used for the selection of the path for the traffic leaving the AS. The route with the highest local preference value is preferred. + type: integer + format: uint32 + default: 100 + x-field-uid: 6 + Bgp.Community: description: |- - BGP Route Target. + BGP communities provide additional capability for tagging routes and for modifying BGP routing policy on upstream and downstream routers. BGP community is a 32-bit number which is broken into 16-bit AS number and a 16-bit custom value. type: object properties: - rt_type: - description: "Extended Community Type field of 2 Byte.\n - as_2octet: Two-Octet\ - \ AS Specific Extended Community (RFC 4360).\n - ipv4_address: IPv4 Address\ - \ Specific Extended Community (RFC 4360).\n - as_4octet: 4-Octet AS Specific\ - \ Extended Community (RFC 5668). " + type: + description: |- + The type of community AS number. type: string x-field-uid: 1 x-enum: - as_2octet: + manual_as_number: x-field-uid: 1 - ipv4_address: + no_export: x-field-uid: 2 - as_4octet: + no_advertised: x-field-uid: 3 + no_export_subconfed: + x-field-uid: 4 + llgr_stale: + x-field-uid: 5 + no_llgr: + x-field-uid: 6 enum: - - as_2octet - - ipv4_address - - as_4octet - rt_value: - description: |- - Colon separated Extended Community value of 6 Bytes - AS number: Assigned Number. Example - for the as_2octet or as_4octet "60005:100", for ipv4_address "1.1.1.1:100" - type: string - x-field-uid: 2 - Bgp.Advanced: - description: |- - Configuration for BGP advanced settings. - type: object - properties: - hold_time_interval: - description: |- - Number of seconds the sender proposes for the value of the Hold Timer. - type: integer - format: uint32 - default: 90 - x-field-uid: 1 - keep_alive_interval: + - manual_as_number + - no_export + - no_advertised + - no_export_subconfed + - llgr_stale + - no_llgr + as_number: description: |- - Number of seconds between transmissions of Keepalive messages by this peer. + First two octets of 32 bit community AS number. type: integer format: uint32 - default: 30 + maximum: 65535 + default: 0 x-field-uid: 2 - update_interval: - description: |- - The time interval at which Update messages are sent to the DUT, expressed as the number of milliseconds between Update messages. The update interval 0 implies to send all the updates as fast as possible. + as_custom: + description: "Last two octets of the community value. " type: integer format: uint32 + maximum: 65535 default: 0 x-field-uid: 3 - time_to_live: - description: |- - The limited number of iterations that a unit of data can experience before the data is discarded. This is placed in the TTL field in the IP header of the transmitted packets. - type: integer - format: uint32 - default: 64 - maximum: 255 - x-field-uid: 4 - md5_key: - description: |- - The value to be used as a secret MD5 key for authentication. If not configured, MD5 authentication will not be enabled. - type: string - x-field-uid: 5 - passive_mode: - description: |- - If set to true, the local BGP peer will wait for the remote peer to initiate the BGP session - by establishing the TCP connection, rather than initiating sessions from the local peer. - type: boolean - default: false - x-field-uid: 6 - listen_port: + Bgp.ExtCommunity: + description: |- + The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. + type: object + properties: + type: + description: "Extended Community Type field of 1 Byte.\n - administrator_as_2octet:\ + \ Two-Octet AS Specific Extended Community (RFC 4360).\n - administrator_ipv4_address:\ + \ IPv4 Address Specific Extended Community (RFC 4360).\n - administrator_as_4octet:\ + \ 4-Octet AS Specific Extended Community (RFC 5668).\n - opaque: Opaque\ + \ Extended Community (RFC 7432).\n - evpn: EVPN Extended Community (RFC\ + \ 7153). \n - administrator_as_2octet_link_bandwidth : Link Bandwidth\ + \ Extended Community (RFC 7153)." + type: string + x-field-uid: 1 + x-enum: + administrator_as_2octet: + x-field-uid: 1 + administrator_ipv4_address: + x-field-uid: 2 + administrator_as_4octet: + x-field-uid: 3 + opaque: + x-field-uid: 4 + evpn: + x-field-uid: 5 + administrator_as_2octet_link_bandwidth: + x-field-uid: 6 + enum: + - administrator_as_2octet + - administrator_ipv4_address + - administrator_as_4octet + - opaque + - evpn + - administrator_as_2octet_link_bandwidth + subtype: description: |- - The TCP port number on which to accept BGP connections from the remote peer. - type: integer - format: uint32 - default: 179 - maximum: 65535 - x-field-uid: 7 - neighbor_port: + Extended Community Sub Type field of 1 Byte. + - route_target: Route Target. + - origin: Origin. + - extended_bandwidth: Specifies the link bandwidth. + - color: Specifies the color value. + - encapsulation: Specifies the Encapsulation Extended Community. + - mac_address: Specifies the Extended community MAC address. + type: string + x-field-uid: 2 + x-enum: + route_target: + x-field-uid: 1 + origin: + x-field-uid: 2 + extended_bandwidth: + x-field-uid: 3 + color: + x-field-uid: 4 + encapsulation: + x-field-uid: 5 + mac_address: + x-field-uid: 6 + enum: + - route_target + - origin + - extended_bandwidth + - color + - encapsulation + - mac_address + value: description: |- - Destination TCP port number of the BGP peer when initiating a - session from the local BGP peer. - type: integer - format: uint32 - default: 179 - maximum: 65535 - x-field-uid: 8 - Bgp.Capability: + Extended Community value of 6 Bytes. Example - for the Opaque type and Color subtype value can be '0000000000c8' for the color value 200. + type: string + format: hex + x-field-uid: 3 + Bgp.AsPath: description: |- - Configuration for BGP capability settings. + This attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. This contains the configuration of how to include the Local AS in the AS path attribute of the MP REACH NLRI. It also contains optional configuration of additional AS Path Segments that can be included in the AS Path attribute. The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that a routing information passes through to reach the destination. type: object properties: - ipv4_unicast: + as_set_mode: description: |- - Support for the IPv4 Unicast address family. - type: boolean - default: true + Defines how the Local AS should be included in the MP REACH NLRI. For iBGP sessions, "Do Not Include Local AS" must be chosen. For eBGP sessions, any choice other than "Do Not Include Local AS" can be chosen. + type: string + default: do_not_include_local_as x-field-uid: 1 - ipv4_multicast: - description: "Support for the IPv4 Multicast address family. " - type: boolean - default: false + x-enum: + do_not_include_local_as: + x-field-uid: 1 + include_as_seq: + x-field-uid: 2 + include_as_set: + x-field-uid: 3 + include_as_confed_seq: + x-field-uid: 4 + include_as_confed_set: + x-field-uid: 5 + prepend_to_first_segment: + x-field-uid: 6 + enum: + - do_not_include_local_as + - include_as_seq + - include_as_set + - include_as_confed_seq + - include_as_confed_set + - prepend_to_first_segment + segments: + description: "The additional AS path segments to be added in the NLRI. \ + \ By default, an empty AS path is always included and the local AS is\ + \ added to it as per the value of 'as_set_mode' attribute. " + type: array + items: + $ref: '#/components/schemas/Bgp.AsPathSegment' x-field-uid: 2 - ipv6_unicast: + Bgp.AsPathSegment: + description: |- + Configuration for a single BGP AS path segment + type: object + properties: + type: description: |- - Support for the IPv4 Unicast address family. - type: boolean - default: true + AS sequence is the most common type of AS_PATH, it contains the list of ASNs starting with the most recent ASN being added read from left to right. + The other three AS_PATH types are used for Confederations - AS_SET is the type of AS_PATH attribute that summarizes routes using using the aggregate-address command, allowing AS_PATHs to be summarized in the update as well. - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most recent ASN to be added reading left to right - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent in BGP Updates. + type: string + default: as_seq + x-field-uid: 1 + x-enum: + as_seq: + x-field-uid: 1 + as_set: + x-field-uid: 2 + as_confed_seq: + x-field-uid: 3 + as_confed_set: + x-field-uid: 4 + enum: + - as_seq + - as_set + - as_confed_seq + - as_confed_set + as_numbers: + description: |- + The AS numbers in this AS path segment. + type: array + items: + type: integer + format: uint32 + default: 1 + x-field-uid: 2 + BgpV4.EvpnEvis: + description: "This contains a list of different flavors of EVPN. \nFor example\ + \ EVPN over VXLAN or EVPN over MPLS etc to be configured per Ethernet segment.\ + \ \nNeed to instantiate correct type of EVPN instance as per requirement." + type: object + properties: + choice: + type: string + default: evi_vxlan + x-field-uid: 1 + x-enum: + evi_vxlan: + x-field-uid: 1 + enum: + - evi_vxlan + evi_vxlan: + description: "EVPN VXLAN instance to be configured per Ethernet Segment.\ + \ " + $ref: '#/components/schemas/BgpV4.EviVxlan' + x-field-uid: 2 + BgpV4.EviVxlan: + description: "Configuration for BGP EVPN EVI. Advertises following routes -\ + \ \n\nType 3 - Inclusive Multicast Ethernet Tag Route\n\nType 1 - Ethernet\ + \ Auto-discovery Route (Per EVI)\n\nType 1 - Ethernet Auto-discovery Route\ + \ (Per ES)" + type: object + properties: + broadcast_domains: + description: |- + This contains the list of Broadcast Domains to be configured per EVI. + type: array + items: + $ref: '#/components/schemas/BgpV4.EviVxlan.BroadcastDomain' + x-field-uid: 1 + replication_type: + x-field-uid: 2 + description: |- + This model only supports Ingress Replication + type: string + default: ingress_replication + x-enum: + ingress_replication: + x-field-uid: 1 + enum: + - ingress_replication + pmsi_label: x-field-uid: 3 - ipv6_multicast: description: |- - Support for the IPv6 Multicast address family. - type: boolean - default: false + Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. + type: integer + format: uint32 + maximum: 16777215 + default: 16 + ad_label: x-field-uid: 4 - vpls: - description: "Support for VPLS as below. \nRFC4761 - Virtual Private LAN\ - \ Service (VPLS) using BGP for Auto-Discovery\nand Signaling. \nRFC6624\ - \ - Layer 2 Virtual Private Networks using BGP for Auto-Discovery \nand\ - \ Signaling." - type: boolean - default: false + description: |- + The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet Auto-discovery Route per + type: integer + format: uint32 + maximum: 16777215 + default: 0 + route_distinguisher: x-field-uid: 5 - route_refresh: description: |- - Support for the route refresh capabilities. Route Refresh allows the dynamic exchange of route refresh requests and routing information between BGP peers and the subsequent re-advertisement of the outbound or inbound routing table. - type: boolean - default: true + Colon separated Extended Community value of 6 Bytes - "AS number: Value" identifying an EVI. Example - for the as_2octet "60005:100". + $ref: '#/components/schemas/Bgp.RouteDistinguisher' + route_target_export: x-field-uid: 6 - route_constraint: - description: |- - Supports for the route constraint capabilities. Route Constraint allows the advertisement of Route Target Membership information. The BGP peers exchange Route Target Reachability Information, which is used to build a route distribution graph. This limits the propagation of VPN Network Layer Reachability Information (NLRI) between different autonomous systems or distinct clusters of the same autonomous system. This is supported for Layer 3 Virtual Private Network scenario. - type: boolean - default: false + description: "List of Layer 2 Virtual Network Identifier (L2VNI) export\ + \ targets associated with this EVI. " + type: array + items: + $ref: '#/components/schemas/Bgp.RouteTarget' + route_target_import: x-field-uid: 7 - link_state_non_vpn: - description: |- - Support for BGP Link State for ISIS and OSPF. - type: boolean - default: false + description: "List of L2VNI import targets associated with this EVI. " + type: array + items: + $ref: '#/components/schemas/Bgp.RouteTarget' + l3_route_target_export: x-field-uid: 8 - link_state_vpn: description: |- - Capability advertisement of BGP Link State for VPNs. - type: boolean - default: false + List of Layer 3 Virtual Network Identifier (L3VNI) Export Route Targets. + type: array + items: + $ref: '#/components/schemas/Bgp.RouteTarget' + l3_route_target_import: x-field-uid: 9 - evpn: description: |- - Support for the EVPN address family. - type: boolean - default: false + List of L3VNI Import Route Targets. + type: array + items: + $ref: '#/components/schemas/Bgp.RouteTarget' + advanced: x-field-uid: 10 - extended_next_hop_encoding: - description: |- - Support for extended Next Hop Encoding for Nexthop field in IPv4 routes advertisement. This allows IPv4 routes being advertised by IPv6 peers to include an IPv6 Nexthop. - type: boolean - default: false + $ref: '#/components/schemas/Bgp.RouteAdvanced' + communities: x-field-uid: 11 - ipv4_multicast_vpn: description: |- - Support for the IPv4 Multicast VPN address family. - type: boolean - default: false + Optional community settings. + type: array + items: + $ref: '#/components/schemas/Bgp.Community' + ext_communities: x-field-uid: 12 - ipv4_mpls_vpn: description: |- - Support for the IPv4 MPLS L3VPN address family. - type: boolean - default: false + Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. + type: array + items: + $ref: '#/components/schemas/Bgp.ExtCommunity' + as_path: x-field-uid: 13 - ipv4_mdt: - description: |- - Supports for IPv4 MDT address family messages. - type: boolean - default: false - x-field-uid: 14 - ipv4_multicast_mpls_vpn: - description: |- - Support for the IPv4 Multicast VPN address family. - type: boolean - default: false - x-field-uid: 15 - ipv4_unicast_flow_spec: description: |- - Support for propagation of IPv4 unicast flow specification rules. - type: boolean - default: false - x-field-uid: 16 - ipv4_sr_te_policy: - description: |- - Support for IPv4 SRTE policy. - type: boolean - default: false - x-field-uid: 17 - ipv4_unicast_add_path: - description: |- - Support for IPv4 Unicast Add Path Capability. - type: boolean - default: false - x-field-uid: 18 - ipv6_multicast_vpn: - description: |- - Support for the IPv6 Multicast VPN address family. - type: boolean - default: false - x-field-uid: 19 - ipv6_mpls_vpn: - description: |- - Support for the IPv6 MPLS L3VPN address family. - type: boolean - default: false - x-field-uid: 20 - ipv6_mdt: - description: |- - Support for IPv6 MDT address family messages. - type: boolean - default: false - x-field-uid: 21 - ipv6_multicast_mpls_vpn: - description: |- - Support for the IPv6 Multicast VPN address family. - type: boolean - default: false - x-field-uid: 22 - ipv6_unicast_flow_spec: - description: |- - Support for propagation of IPv6 unicast flow specification rules. - type: boolean - default: false - x-field-uid: 23 - ipv6_sr_te_policy: - description: |- - Support for IPv6 SRTE policy. - type: boolean - default: false - x-field-uid: 24 - ipv6_unicast_add_path: - description: |- - Support for IPv6 Unicast Add Path Capability. - type: boolean - default: false - x-field-uid: 25 - Bgp.LearnedInformationFilter: + Optional AS PATH settings. + $ref: '#/components/schemas/Bgp.AsPath' + BgpV4.EviVxlan.BroadcastDomain: description: |- - Configuration for controlling storage of BGP learned information recieved from the peer. + Configuration for Broadcast Domains per EVI. type: object properties: - unicast_ipv4_prefix: - description: |- - If enabled, will store the information related to Unicast IPv4 Prefixes recieved from the peer. - type: boolean - default: false + cmac_ip_range: + description: "This contains the list of Customer MAC/IP Ranges to be configured\ + \ per Broadcast Domain. \n\nAdvertises following route - \nType 2 - MAC/IP\ + \ Advertisement Route." + type: array + items: + $ref: '#/components/schemas/Bgp.CMacIpRange' x-field-uid: 1 - unicast_ipv6_prefix: + ethernet_tag_id: + x-field-uid: 2 description: |- - If enabled, will store the information related to Unicast IPv6 Prefixes recieved from the peer. + The Ethernet Tag ID of the Broadcast Domain. + type: integer + format: uint32 + default: 0 + vlan_aware_service: + x-field-uid: 3 + description: |- + VLAN-Aware service to be enabled or disabled. type: boolean default: false - x-field-uid: 2 - Bgp.V4RouteRange: - description: |- - Emulated BGPv4 route range. + Bgp.CMacIpRange: + description: "Configuration for MAC/IP Ranges per Broadcast Domain. \n\nAdvertises\ + \ following route -\n\nType 2 - MAC/IP Advertisement Route." type: object properties: - addresses: - description: |- - A list of group of IPv4 route addresses. - type: array - items: - $ref: '#/components/schemas/V4RouteAddress' + mac_addresses: + description: "Host MAC address range per Broadcast Domain. " + $ref: '#/components/schemas/MACRouteAddress' x-field-uid: 1 - next_hop_mode: - description: "Specify the NextHop in MP REACH NLRI. The mode for setting\ - \ the IP address of the NextHop in the MP REACH NLRI can be one of the\ - \ following:\n Local IP: Automatically fills the Nexthop with the Local\ - \ IP of the BGP\npeer.\n If BGP peer is of type IPv6, Nexthop Encoding\ - \ capability should be enabled.\n Manual: Override the Nexthop with any\ - \ arbitrary IPv4/IPv6 address. " - type: string - default: local_ip - x-field-uid: 2 - x-enum: - local_ip: - x-field-uid: 1 - manual: - x-field-uid: 2 - enum: - - local_ip - - manual - next_hop_address_type: + l2vni: description: |- - If the Nexthop Mode is Manual, it sets the type of the NextHop IP address. - type: string - default: ipv4 + Layer 2 Virtual Network Identifier (L2VNI) to be advertised with MAC/IP Advertisement Route (Type 2) + type: integer + format: uint32 + maximum: 16777215 + default: 0 + x-field-uid: 2 + ipv4_addresses: + description: "Host IPv4 address range per Broadcast Domain. " + $ref: '#/components/schemas/V4RouteAddress' x-field-uid: 3 - x-enum: - ipv4: - x-field-uid: 1 - ipv6: - x-field-uid: 2 - enum: - - ipv4 - - ipv6 - next_hop_ipv4_address: - description: |- - The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. - type: string - format: ipv4 - default: 0.0.0.0 + ipv6_addresses: + description: "Host IPv6 address range per Broadcast Domain. \ + \ " + $ref: '#/components/schemas/V6RouteAddress' x-field-uid: 4 - next_hop_ipv6_address: - description: "The IPv6 address of the next hop if the Nexthop Mode is manual\ - \ and the Nexthop type is IPv6. " - type: string - format: ipv6 - default: ::0 + l3vni: + description: |- + Layer 3 Virtual Network Identifier (L3VNI) to be advertised with MAC/IP Advertisement Route (Type 2). + type: integer + format: uint32 + maximum: 16777215 + default: 0 x-field-uid: 5 - advanced: + include_default_gateway: + description: |- + Include default Gateway Extended Community in MAC/IP Advertisement Route (Type 2). + type: boolean + default: false x-field-uid: 6 + advanced: $ref: '#/components/schemas/Bgp.RouteAdvanced' - communities: x-field-uid: 7 + communities: description: |- Optional community settings. type: array items: $ref: '#/components/schemas/Bgp.Community' - as_path: x-field-uid: 8 - $ref: '#/components/schemas/Bgp.AsPath' - add_path: - x-field-uid: 9 - $ref: '#/components/schemas/Bgp.AddPath' - name: - x-field-uid: 10 - description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global ext_communities: - x-status: - status: deprecated - information: This property is deprecated in favor of property extended_communities - x-field-uid: 11 description: |- - Deprecated: This property is deprecated in favor of property extended_communities - - Deprecated: This property is deprecated in favor of property extended_communities - - Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. Note evpn type is defined mainly for use with evpn route updates and not for IPv4 and IPv6 route updates. + Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. type: array items: $ref: '#/components/schemas/Bgp.ExtCommunity' - extended_communities: - x-field-uid: 12 - description: "Optional Extended Community settings. The Extended Communities\ - \ Attribute is a transitive optional BGP attribute, with the Type Code\ - \ 16. Community and Extended Communities attributes are utilized to trigger\ - \ routing decisions, such as acceptance, rejection, preference, or redistribution.\ - \ An extended community is an eight byte value. It is divided into two\ - \ main parts. The first two bytes of the community encode a type and sub-type\ - \ fields and the last six bytes carry a unique set of data in a format\ - \ defined by the type and sub-type field. Extended communities provide\ - \ a larger range for grouping or categorizing communities. " - type: array - items: - $ref: '#/components/schemas/Bgp.ExtendedCommunity' + x-field-uid: 9 + as_path: + description: |- + Optional AS PATH settings. + $ref: '#/components/schemas/Bgp.AsPath' + x-field-uid: 10 + name: + x-field-uid: 11 + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global required: - name - Bgp.AddPath: + Bgp.RouteDistinguisher: description: |- - The BGP Additional Paths feature is a BGP extension that allows the advertisement of multiple paths for the same prefix without the new paths implicitly replacing any previous paths. + BGP Route Distinguisher. type: object properties: - path_id: - description: |- - The id of the additional path. - type: integer - format: uint32 - default: 1 + rd_type: + description: "Route Distinguisher Type field of 2 Byte.\n - as_2octet: Two-Octet\ + \ AS Specific Extended Community (RFC 4360).\n - ipv4_address: IPv4 Address\ + \ Specific Extended Community (RFC 4360).\n - as_4octet: 4-Octet AS Specific\ + \ Extended Community (RFC 5668). " + type: string + default: as_2octet x-field-uid: 1 - Bgp.ExtendedCommunity: + x-enum: + as_2octet: + x-field-uid: 1 + ipv4_address: + x-field-uid: 2 + as_4octet: + x-field-uid: 3 + enum: + - as_2octet + - ipv4_address + - as_4octet + auto_config_rd_ip_addr: + description: |- + Allow to automatically configure RD IP address from local ip. + type: boolean + default: false + x-field-uid: 2 + rd_value: + description: |- + Colon separated Extended Community value of 6 Bytes - "AS number: Value". Example - for the as_2octet or as_4octet "60005:100", for ipv4_address "1.1.1.1:100" + type: string + x-field-uid: 3 + Bgp.RouteTarget: description: |- - The Extended Communities Attribute is a optional BGP attribute,defined in RFC4360 with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value.It is divided into two main parts. The first 2 Bytes of the community encode a type and optonal sub-type field. The last 6 bytes (or 7 bytes for types without a sub-type) carry a unique set of data in a format defined by the type and optional sub-type field. Extended communities provide a larger range for grouping or categorizing communities. + BGP Route Target. type: object properties: - choice: + rt_type: + description: "Extended Community Type field of 2 Byte.\n - as_2octet: Two-Octet\ + \ AS Specific Extended Community (RFC 4360).\n - ipv4_address: IPv4 Address\ + \ Specific Extended Community (RFC 4360).\n - as_4octet: 4-Octet AS Specific\ + \ Extended Community (RFC 5668). " type: string - default: transitive_2octet_as_type + x-field-uid: 1 x-enum: - transitive_2octet_as_type: + as_2octet: x-field-uid: 1 - transitive_ipv4_address_type: + ipv4_address: x-field-uid: 2 - transitive_4octet_as_type: + as_4octet: x-field-uid: 3 - transitive_opaque_type: - x-field-uid: 4 - transitive_evpn_type: - x-field-uid: 5 - non_transitive_2octet_as_type: - x-field-uid: 6 - custom: - x-field-uid: 7 - x-field-uid: 1 enum: - - transitive_2octet_as_type - - transitive_ipv4_address_type - - transitive_4octet_as_type - - transitive_opaque_type - - transitive_evpn_type - - non_transitive_2octet_as_type - - custom - transitive_2octet_as_type: + - as_2octet + - ipv4_address + - as_4octet + rt_value: + description: |- + Colon separated Extended Community value of 6 Bytes - AS number: Assigned Number. Example - for the as_2octet or as_4octet "60005:100", for ipv4_address "1.1.1.1:100" + type: string x-field-uid: 2 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.Transitive2OctetAsType' - transitive_ipv4_address_type: - x-field-uid: 3 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveIpv4AddressType' - transitive_4octet_as_type: - x-field-uid: 4 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.Transitive4OctetAsType' - transitive_opaque_type: - x-field-uid: 5 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveOpaqueType' - transitive_evpn_type: - x-field-uid: 6 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveEvpnType' - non_transitive_2octet_as_type: - x-field-uid: 7 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.NonTransitive2OctetAsType' - custom: - x-field-uid: 8 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.CustomType' - Bgp.ExtendedCommunity.Transitive2OctetAsType.RouteTarget: - description: "The Route Target Community identifies one or more routers that\ - \ may receive a set of routes (that carry this Community) carried by BGP.\ - \ It is sent with sub-type as 0x02. " + Bgp.Advanced: + description: |- + Configuration for BGP advanced settings. type: object properties: - global_2byte_as: + hold_time_interval: description: |- - The two octet IANA assigned AS value assigned to the Autonomous System. + Number of seconds the sender proposes for the value of the Hold Timer. type: integer format: uint32 - maximum: 65535 - default: 100 + default: 90 x-field-uid: 1 - local_4byte_admin: + keep_alive_interval: + description: |- + Number of seconds between transmissions of Keepalive messages by this peer. type: integer format: uint32 - default: 1 - description: |- - The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. + default: 30 x-field-uid: 2 - Bgp.ExtendedCommunity.Transitive2OctetAsType.RouteOrigin: - description: |- - The Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03 . - type: object - properties: - global_2byte_as: + update_interval: description: |- - The two octet IANA assigned AS value assigned to the Autonomous System. + The time interval at which Update messages are sent to the DUT, expressed as the number of milliseconds between Update messages. The update interval 0 implies to send all the updates as fast as possible. type: integer format: uint32 - maximum: 65535 - default: 100 - x-field-uid: 1 - local_4byte_admin: + default: 0 + x-field-uid: 3 + time_to_live: description: |- - The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. + The limited number of iterations that a unit of data can experience before the data is discarded. This is placed in the TTL field in the IP header of the transmitted packets. type: integer format: uint32 - default: 1 - x-field-uid: 2 - Bgp.ExtendedCommunity.Transitive2OctetAsType: - description: "The Transitive Two-Octet AS-Specific Extended Community is sent\ - \ as type 0x00 . " - type: object - properties: - choice: - type: string - default: route_target_subtype - x-enum: - route_target_subtype: - x-field-uid: 1 - route_origin_subtype: - x-field-uid: 2 - x-field-uid: 1 - enum: - - route_target_subtype - - route_origin_subtype - route_target_subtype: - x-field-uid: 2 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.Transitive2OctetAsType.RouteTarget' - route_origin_subtype: - x-field-uid: 3 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.Transitive2OctetAsType.RouteOrigin' - Bgp.ExtendedCommunity.TransitiveIpv4AddressType.RouteOrigin: - description: |- - The Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP It is sent with sub-type as 0x03. - type: object - properties: - global_ipv4_admin: - description: "An IPv4 unicast address assigned by one of the Internet registries.\ - \ " + default: 64 + maximum: 255 + x-field-uid: 4 + md5_key: + description: |- + The value to be used as a secret MD5 key for authentication. If not configured, MD5 authentication will not be enabled. type: string - format: ipv4 - default: 0.0.0.0 - x-field-uid: 1 - local_2byte_admin: + x-field-uid: 5 + passive_mode: description: |- - The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. + If set to true, the local BGP peer will wait for the remote peer to initiate the BGP session + by establishing the TCP connection, rather than initiating sessions from the local peer. + type: boolean + default: false + x-field-uid: 6 + listen_port: + description: |- + The TCP port number on which to accept BGP connections from the remote peer. type: integer format: uint32 - default: 1 + default: 179 maximum: 65535 - x-field-uid: 2 - Bgp.ExtendedCommunity.TransitiveIpv4AddressType.RouteTarget: - description: "The Route Target Community identifies one or more routers that\ - \ may receive a set of routes (that carry this Community) carried by BGP.\ - \ It is sent with sub-type as 0x02. " - type: object - properties: - global_ipv4_admin: - description: "An IPv4 unicast address assigned by one of the Internet registries. " - type: string - format: ipv4 - default: 0.0.0.0 - x-field-uid: 1 - local_2byte_admin: + x-field-uid: 7 + neighbor_port: + description: |- + Destination TCP port number of the BGP peer when initiating a + session from the local BGP peer. type: integer format: uint32 + default: 179 maximum: 65535 - default: 1 - description: |- - The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. - x-field-uid: 2 - Bgp.ExtendedCommunity.TransitiveIpv4AddressType: + x-field-uid: 8 + Bgp.Capability: description: |- - The Transitive IPv4 Address Specific Extended Community is sent as type 0x01. + Configuration for BGP capability settings. type: object properties: - choice: - type: string - default: route_target_subtype - x-enum: - route_target_subtype: - x-field-uid: 1 - route_origin_subtype: - x-field-uid: 2 + ipv4_unicast: + description: |- + Support for the IPv4 Unicast address family. + type: boolean + default: true x-field-uid: 1 - enum: - - route_target_subtype - - route_origin_subtype - route_target_subtype: + ipv4_multicast: + description: "Support for the IPv4 Multicast address family. " + type: boolean + default: false x-field-uid: 2 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveIpv4AddressType.RouteTarget' - route_origin_subtype: + ipv6_unicast: + description: |- + Support for the IPv4 Unicast address family. + type: boolean + default: true x-field-uid: 3 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveIpv4AddressType.RouteOrigin' - Bgp.ExtendedCommunity.Transitive4OctetAsType.RouteTarget: - description: "The Route Target Community identifies one or more routers that\ - \ may receive a set of routes (that carry this Community) carried by BGP.\ - \ It is sent with sub-type as 0x02 " - type: object - properties: - global_4byte_as: + ipv6_multicast: description: |- - The four octet IANA assigned AS value assigned to the Autonomous System. - type: integer - format: uint32 - default: 100 - x-field-uid: 1 - local_2byte_admin: - type: integer - format: uint32 - default: 1 - maximum: 65535 + Support for the IPv6 Multicast address family. + type: boolean + default: false + x-field-uid: 4 + vpls: + description: "Support for VPLS as below. \nRFC4761 - Virtual Private LAN\ + \ Service (VPLS) using BGP for Auto-Discovery\nand Signaling. \nRFC6624\ + \ - Layer 2 Virtual Private Networks using BGP for Auto-Discovery \nand\ + \ Signaling." + type: boolean + default: false + x-field-uid: 5 + route_refresh: description: |- - The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. - x-field-uid: 2 - Bgp.ExtendedCommunity.Transitive4OctetAsType.RouteOrigin: + Support for the route refresh capabilities. Route Refresh allows the dynamic exchange of route refresh requests and routing information between BGP peers and the subsequent re-advertisement of the outbound or inbound routing table. + type: boolean + default: true + x-field-uid: 6 + route_constraint: + description: |- + Supports for the route constraint capabilities. Route Constraint allows the advertisement of Route Target Membership information. The BGP peers exchange Route Target Reachability Information, which is used to build a route distribution graph. This limits the propagation of VPN Network Layer Reachability Information (NLRI) between different autonomous systems or distinct clusters of the same autonomous system. This is supported for Layer 3 Virtual Private Network scenario. + type: boolean + default: false + x-field-uid: 7 + link_state_non_vpn: + description: |- + Support for BGP Link State for ISIS and OSPF. + type: boolean + default: false + x-field-uid: 8 + link_state_vpn: + description: |- + Capability advertisement of BGP Link State for VPNs. + type: boolean + default: false + x-field-uid: 9 + evpn: + description: |- + Support for the EVPN address family. + type: boolean + default: false + x-field-uid: 10 + extended_next_hop_encoding: + description: |- + Support for extended Next Hop Encoding for Nexthop field in IPv4 routes advertisement. This allows IPv4 routes being advertised by IPv6 peers to include an IPv6 Nexthop. + type: boolean + default: false + x-field-uid: 11 + ipv4_multicast_vpn: + description: |- + Support for the IPv4 Multicast VPN address family. + type: boolean + default: false + x-field-uid: 12 + ipv4_mpls_vpn: + description: |- + Support for the IPv4 MPLS L3VPN address family. + type: boolean + default: false + x-field-uid: 13 + ipv4_mdt: + description: |- + Supports for IPv4 MDT address family messages. + type: boolean + default: false + x-field-uid: 14 + ipv4_multicast_mpls_vpn: + description: |- + Support for the IPv4 Multicast VPN address family. + type: boolean + default: false + x-field-uid: 15 + ipv4_unicast_flow_spec: + description: |- + Support for propagation of IPv4 unicast flow specification rules. + type: boolean + default: false + x-field-uid: 16 + ipv4_sr_te_policy: + description: |- + Support for IPv4 SRTE policy. + type: boolean + default: false + x-field-uid: 17 + ipv4_unicast_add_path: + description: |- + Support for IPv4 Unicast Add Path Capability. + type: boolean + default: false + x-field-uid: 18 + ipv6_multicast_vpn: + description: |- + Support for the IPv6 Multicast VPN address family. + type: boolean + default: false + x-field-uid: 19 + ipv6_mpls_vpn: + description: |- + Support for the IPv6 MPLS L3VPN address family. + type: boolean + default: false + x-field-uid: 20 + ipv6_mdt: + description: |- + Support for IPv6 MDT address family messages. + type: boolean + default: false + x-field-uid: 21 + ipv6_multicast_mpls_vpn: + description: |- + Support for the IPv6 Multicast VPN address family. + type: boolean + default: false + x-field-uid: 22 + ipv6_unicast_flow_spec: + description: |- + Support for propagation of IPv6 unicast flow specification rules. + type: boolean + default: false + x-field-uid: 23 + ipv6_sr_te_policy: + description: |- + Support for IPv6 SRTE policy. + type: boolean + default: false + x-field-uid: 24 + ipv6_unicast_add_path: + description: |- + Support for IPv6 Unicast Add Path Capability. + type: boolean + default: false + x-field-uid: 25 + Bgp.LearnedInformationFilter: description: |- - The Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03. + Configuration for controlling storage of BGP learned information recieved from the peer. type: object properties: - global_4byte_as: + unicast_ipv4_prefix: description: |- - The four octet IANA assigned AS value assigned to the Autonomous System. - type: integer - format: uint32 - default: 100 + If enabled, will store the information related to Unicast IPv4 Prefixes recieved from the peer. + type: boolean + default: false x-field-uid: 1 - local_2byte_admin: + unicast_ipv6_prefix: description: |- - The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. - type: integer - format: uint32 - default: 1 - maximum: 65535 + If enabled, will store the information related to Unicast IPv6 Prefixes recieved from the peer. + type: boolean + default: false x-field-uid: 2 - Bgp.ExtendedCommunity.Transitive4OctetAsType: - description: "The Transitive Four-Octet AS-Specific Extended Community is sent\ - \ as type 0x02. It is defined in RFC 5668. " + Bgp.V4RouteRange: + description: |- + Emulated BGPv4 route range. type: object properties: - choice: + addresses: + description: |- + A list of group of IPv4 route addresses. + type: array + items: + $ref: '#/components/schemas/V4RouteAddress' + x-field-uid: 1 + next_hop_mode: + description: "Specify the NextHop in MP REACH NLRI. The mode for setting\ + \ the IP address of the NextHop in the MP REACH NLRI can be one of the\ + \ following:\n Local IP: Automatically fills the Nexthop with the Local\ + \ IP of the BGP\npeer.\n If BGP peer is of type IPv6, Nexthop Encoding\ + \ capability should be enabled.\n Manual: Override the Nexthop with any\ + \ arbitrary IPv4/IPv6 address. " type: string - default: route_target_subtype + default: local_ip + x-field-uid: 2 x-enum: - route_target_subtype: + local_ip: x-field-uid: 1 - route_origin_subtype: + manual: x-field-uid: 2 - x-field-uid: 1 enum: - - route_target_subtype - - route_origin_subtype - route_target_subtype: - x-field-uid: 2 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.Transitive4OctetAsType.RouteTarget' - route_origin_subtype: - x-field-uid: 3 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.Transitive4OctetAsType.RouteOrigin' - Bgp.ExtendedCommunity.TransitiveOpaqueType.Color: - description: "The Color Community contains locally administrator defined 'color'\ - \ value which is used in conjunction with Encapsulation attribute to decide\ - \ whether a data packet can be transmitted on a certain tunnel or not. It\ - \ is defined in RFC9012 and sent with sub-type as 0x0b. " - type: object - properties: - flags: - description: "Two octet flag values. " - type: integer - format: uint32 - maximum: 65535 - default: 0 - x-field-uid: 1 - color: - type: integer - format: uint32 - default: 0 - description: "The color value is user defined and configured locally and\ - \ used to determine whether a data packet can be transmitted on a certain\ - \ tunnel or not in conjunction with the Encapsulation attribute. It is\ - \ defined in RFC9012. " - x-field-uid: 2 - Bgp.ExtendedCommunity.TransitiveOpaqueType.Encapsulation: - description: |- - This identifies the type of tunneling technology being signalled. It is defined in RFC9012 and sent with sub-type as 0x0c. - type: object - properties: - reserved: - description: "Four bytes of reserved values. Normally set to 0 on transmit\ - \ and ignored on receive. " - type: integer - format: uint32 - default: 0 - x-field-uid: 1 - tunnel_type: - description: "Identifies the type of tunneling technology being signalled.\ - \ Initially defined in RFC5512 and extended in RFC9012. Some of the important\ - \ tunnel types include 1 L2TPv3 over IP\t[RFC9012], \n2\tGRE\t[RFC9012]\n\ - 7\tIP in IP\t[RFC9012]\n8\tVXLAN Encapsulation\t[RFC8365]\n9\tNVGRE Encapsulation\t\ - [RFC8365]\n10\tMPLS Encapsulation\t[RFC8365]\n15\tSR TE Policy Type\t\ - [draft-ietf-idr-segment-routing-te-policy]\n19\tGeneve Encapsulation\t\ - [RFC8926]" - type: integer - format: uint32 - maximum: 65535 - default: 1 - x-field-uid: 2 - Bgp.ExtendedCommunity.TransitiveOpaqueType: - description: |- - The Transitive Opaque Extended Community is sent as type 0x03. - type: object - properties: - choice: - type: string - default: color_subtype - x-enum: - color_subtype: - x-field-uid: 1 - encapsulation_subtype: - x-field-uid: 2 - x-field-uid: 1 - enum: - - color_subtype - - encapsulation_subtype - color_subtype: - x-field-uid: 2 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveOpaqueType.Color' - encapsulation_subtype: - x-field-uid: 3 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveOpaqueType.Encapsulation' - Bgp.ExtendedCommunity.TransitiveEvpnType.RouterMac: - description: |- - The Router MAC EVPN Community is defined in RFC9135 and normally sent only for EVPN Type-2 Routes . It is sent with sub-type 0x03. - type: object - properties: - router_mac: - description: "MAC Address of the PE Router. " - type: string - format: mac - default: 0:0:0:0:0:0 - x-field-uid: 1 - Bgp.ExtendedCommunity.TransitiveEvpnType: - description: "The Transitive EVPN Extended Community is sent as type 0x06 .\ - \ " - type: object - properties: - choice: - type: string - default: router_mac_subtype - x-enum: - router_mac_subtype: - x-field-uid: 1 - x-field-uid: 1 - enum: - - router_mac_subtype - router_mac_subtype: - x-field-uid: 2 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveEvpnType.RouterMac' - Bgp.ExtendedCommunity.NonTransitive2OctetAsType.LinkBandwidth: - description: |- - The Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. It is sent with sub-type as 0x04. - type: object - properties: - global_2byte_as: - description: |- - The value of the Global Administrator subfield should represent the Autonomous System of the router that attaches the Link Bandwidth Community. If four octet AS numbering scheme is used, AS_TRANS (23456) should be used. - type: integer - format: uint32 - default: 100 - maximum: 65535 - x-field-uid: 1 - bandwidth: - description: |- - Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and 1 Mbps is 1000 Kbps per second ) - type: number - format: float - default: 0 - x-field-uid: 2 - Bgp.ExtendedCommunity.NonTransitive2OctetAsType: - description: "The Non-Transitive Two-Octet AS-Specific Extended Community is\ - \ sent as type 0x40. " - type: object - properties: - choice: - type: string - default: link_bandwidth_subtype - x-enum: - link_bandwidth_subtype: - x-field-uid: 1 - x-field-uid: 1 - enum: - - link_bandwidth_subtype - link_bandwidth_subtype: - x-field-uid: 2 - $ref: '#/components/schemas/Bgp.ExtendedCommunity.NonTransitive2OctetAsType.LinkBandwidth' - Bgp.ExtendedCommunity.CustomType: - description: "Add a custom Extended Community with a combination of types ,\ - \ sub-types and values not explicitly specified above or not defined yet.\ - \ " - type: object - properties: - community_type: - description: "The type to be set in the Extended Community attribute. Accepts\ - \ hexadecimal input upto ff . " - type: string - format: hex - maxLength: 2 - default: '00' - x-field-uid: 1 - community_subtype: - description: |- - The sub-type to be set in the Extended Community attribute. For certain types with no sub-type this byte can also be used as part of an extended value field. Accepts hexadecimal input upto ff. - type: string - format: hex - maxLength: 2 - default: '00' - x-field-uid: 2 - value: - description: "6 byte hex value to be carried in the last 6 bytes of the\ - \ Extended Community. Accepts hexadecimal input upto ffffffffffff. \ - \ " - type: string - format: hex - maxLength: 12 - default: '000000000000' - x-field-uid: 3 - Bgp.V6RouteRange: - description: |- - Emulated BGPv6 route range. - type: object - properties: - addresses: - description: |- - A list of group of IPv6 route addresses. - type: array - items: - $ref: '#/components/schemas/V6RouteAddress' - x-field-uid: 1 - next_hop_mode: - description: "Specify the NextHop in MP REACH NLRI. The mode for setting\ - \ the IP address of the NextHop in the MP REACH NLRI can be one of the\ - \ following:\n Local IP: Automatically fills the Nexthop with the Local\ - \ IP of the BGP\npeer.\n If BGP peer is of type IPv6, Nexthop Encoding\ - \ capability should be enabled.\n Manual: Override the Nexthop with any\ - \ arbitrary IPv4/IPv6 address. " - type: string - default: local_ip - x-field-uid: 2 - x-enum: - local_ip: - x-field-uid: 1 - manual: - x-field-uid: 2 - enum: - - local_ip - - manual - next_hop_address_type: - description: |- - If the Nexthop Mode is Manual, it sets the type of the NextHop IP address. - type: string - default: ipv6 + - local_ip + - manual + next_hop_address_type: + description: |- + If the Nexthop Mode is Manual, it sets the type of the NextHop IP address. + type: string + default: ipv4 x-field-uid: 3 x-enum: ipv4: @@ -4358,6870 +4744,7549 @@ components: $ref: '#/components/schemas/Bgp.ExtendedCommunity' required: - name - BgpSrte.V4Policy: - description: "Configuration for BGP Segment Routing Traffic Engineering(SRTE)\ - \ \npolicy.\n" + Bgp.AddPath: + description: |- + The BGP Additional Paths feature is a BGP extension that allows the advertisement of multiple paths for the same prefix without the new paths implicitly replacing any previous paths. type: object - required: - - ipv4_endpoint - - name properties: - distinguisher: + path_id: description: |- - 4-octet value uniquely identifying the policy in the context of (color, endpoint) tuple. It is used by the SR Policy originator to make unique (from an NLRI perspective) both for multiple candidate paths of the same SR Policy as well as candidate paths of different SR Policies (i.e. with different segment list) with the same Color and Endpoint but meant for different head-ends. + The id of the additional path. type: integer format: uint32 default: 1 x-field-uid: 1 - color: - description: |- - Policy color is used to match the color of the destination prefixes to steer traffic into the SR Policy. - type: integer - format: uint32 - default: 100 - x-field-uid: 2 - ipv4_endpoint: - description: |- - Specifies a single node or a set of nodes (e.g. an anycast address). It is selected on the basis of the SR Policy type (AFI). - type: string - format: ipv4 - x-field-uid: 3 - next_hop_mode: - description: |- - Mode for choosing the NextHop in MP REACH NLRI. Available modes are : Local IP: Automatically fills the Nexthop with the Local IP of the BGP peer. For IPv6 BGP peer the Nexthop Encoding capability should be enabled. Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. + Bgp.ExtendedCommunity: + description: |- + The Extended Communities Attribute is a optional BGP attribute,defined in RFC4360 with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value.It is divided into two main parts. The first 2 Bytes of the community encode a type and optonal sub-type field. The last 6 bytes (or 7 bytes for types without a sub-type) carry a unique set of data in a format defined by the type and optional sub-type field. Extended communities provide a larger range for grouping or categorizing communities. + type: object + properties: + choice: type: string - default: local_ip - x-field-uid: 4 + default: transitive_2octet_as_type x-enum: - local_ip: + transitive_2octet_as_type: x-field-uid: 1 - manual: + transitive_ipv4_address_type: x-field-uid: 2 + transitive_4octet_as_type: + x-field-uid: 3 + transitive_opaque_type: + x-field-uid: 4 + transitive_evpn_type: + x-field-uid: 5 + non_transitive_2octet_as_type: + x-field-uid: 6 + custom: + x-field-uid: 7 + x-field-uid: 1 enum: - - local_ip - - manual - next_hop_address_type: - description: "Type of next hop IP address to be used when 'next_hop_mode'\ - \ is set to 'manual'. " - type: string - default: ipv4 - x-field-uid: 5 - x-enum: - ipv4: - x-field-uid: 1 - ipv6: - x-field-uid: 2 - enum: - - ipv4 - - ipv6 - next_hop_ipv4_address: - description: |- - The IPv4 address of the next hop if the Nexthop type 'next_hop_mode' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability extended_next_hop_encoding should be enabled. - type: string - format: ipv4 - x-field-uid: 6 - next_hop_ipv6_address: - description: "The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type'\ - \ is 'manual' and the Nexthop type 'next_hop_address_type' is IPv6. " - type: string - format: ipv6 - x-field-uid: 7 - advanced: - $ref: '#/components/schemas/Bgp.RouteAdvanced' - x-field-uid: 8 - add_path: - $ref: '#/components/schemas/Bgp.AddPath' - x-field-uid: 9 - as_path: - $ref: '#/components/schemas/Bgp.AsPath' - x-field-uid: 10 - communities: - description: |- - Optional Community settings. - type: array - items: - $ref: '#/components/schemas/Bgp.Community' - x-field-uid: 11 - ext_communities: - description: |- - Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. - type: array - items: - $ref: '#/components/schemas/Bgp.ExtCommunity' - x-field-uid: 12 - tunnel_tlvs: - description: |- - List Tunnel Encapsulation Attributes. - type: array - items: - $ref: '#/components/schemas/BgpSrte.V4TunnelTlv' - x-field-uid: 13 - name: - x-field-uid: 14 - description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - active: - x-field-uid: 15 - description: |- - If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. - type: boolean - default: true - BgpSrte.V4TunnelTlv: - description: |- - Configuration for BGP SRTE Tunnel TLV. - type: object - properties: - remote_endpoint_sub_tlv: - $ref: '#/components/schemas/BgpSrte.RemoteEndpointSubTlv' - x-field-uid: 1 - color_sub_tlv: - $ref: '#/components/schemas/BgpSrte.ColorSubTlv' + - transitive_2octet_as_type + - transitive_ipv4_address_type + - transitive_4octet_as_type + - transitive_opaque_type + - transitive_evpn_type + - non_transitive_2octet_as_type + - custom + transitive_2octet_as_type: x-field-uid: 2 - binding_sub_tlv: - $ref: '#/components/schemas/BgpSrte.BindingSubTlv' + $ref: '#/components/schemas/Bgp.ExtendedCommunity.Transitive2OctetAsType' + transitive_ipv4_address_type: x-field-uid: 3 - preference_sub_tlv: - $ref: '#/components/schemas/BgpSrte.PreferenceSubTlv' + $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveIpv4AddressType' + transitive_4octet_as_type: x-field-uid: 4 - policy_priority_sub_tlv: - $ref: '#/components/schemas/BgpSrte.PolicyPrioritySubTlv' + $ref: '#/components/schemas/Bgp.ExtendedCommunity.Transitive4OctetAsType' + transitive_opaque_type: x-field-uid: 5 - policy_name_sub_tlv: - $ref: '#/components/schemas/BgpSrte.PolicyNameSubTlv' + $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveOpaqueType' + transitive_evpn_type: x-field-uid: 6 - explicit_null_label_policy_sub_tlv: - $ref: '#/components/schemas/BgpSrte.ExplicitNullLabelPolicySubTlv' + $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveEvpnType' + non_transitive_2octet_as_type: x-field-uid: 7 - segment_lists: - type: array - items: - $ref: '#/components/schemas/BgpSrte.SegmentList' + $ref: '#/components/schemas/Bgp.ExtendedCommunity.NonTransitive2OctetAsType' + custom: x-field-uid: 8 - name: - x-field-uid: 9 + $ref: '#/components/schemas/Bgp.ExtendedCommunity.CustomType' + Bgp.ExtendedCommunity.Transitive2OctetAsType.RouteTarget: + description: "The Route Target Community identifies one or more routers that\ + \ may receive a set of routes (that carry this Community) carried by BGP.\ + \ It is sent with sub-type as 0x02. " + type: object + properties: + global_2byte_as: description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - active: - x-field-uid: 10 + The two octet IANA assigned AS value assigned to the Autonomous System. + type: integer + format: uint32 + maximum: 65535 + default: 100 + x-field-uid: 1 + local_4byte_admin: + type: integer + format: uint32 + default: 1 description: |- - If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. - type: boolean - default: true - required: - - name - BgpSrte.RemoteEndpointSubTlv: + The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. + x-field-uid: 2 + Bgp.ExtendedCommunity.Transitive2OctetAsType.RouteOrigin: description: |- - Configuration for the BGP remote endpoint sub TLV. + The Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03 . type: object properties: - as_number: + global_2byte_as: description: |- - Autonomous system (AS) number + The two octet IANA assigned AS value assigned to the Autonomous System. type: integer format: uint32 - default: 0 + maximum: 65535 + default: 100 x-field-uid: 1 - address_family: + local_4byte_admin: description: |- - Determines the address type - type: string - default: ipv4 + The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. + type: integer + format: uint32 + default: 1 x-field-uid: 2 + Bgp.ExtendedCommunity.Transitive2OctetAsType: + description: "The Transitive Two-Octet AS-Specific Extended Community is sent\ + \ as type 0x00 . " + type: object + properties: + choice: + type: string + default: route_target_subtype x-enum: - ipv4: + route_target_subtype: x-field-uid: 1 - ipv6: + route_origin_subtype: x-field-uid: 2 + x-field-uid: 1 enum: - - ipv4 - - ipv6 - ipv4_address: - description: |- - The IPv4 address of the Remote Endpoint. + - route_target_subtype + - route_origin_subtype + route_target_subtype: + x-field-uid: 2 + $ref: '#/components/schemas/Bgp.ExtendedCommunity.Transitive2OctetAsType.RouteTarget' + route_origin_subtype: + x-field-uid: 3 + $ref: '#/components/schemas/Bgp.ExtendedCommunity.Transitive2OctetAsType.RouteOrigin' + Bgp.ExtendedCommunity.TransitiveIpv4AddressType.RouteOrigin: + description: |- + The Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP It is sent with sub-type as 0x03. + type: object + properties: + global_ipv4_admin: + description: "An IPv4 unicast address assigned by one of the Internet registries.\ + \ " type: string format: ipv4 default: 0.0.0.0 - x-field-uid: 3 - ipv6_address: + x-field-uid: 1 + local_2byte_admin: description: |- - The IPv6 address of the Remote Endpoint. - type: string - format: ipv6 - default: ::0 - x-field-uid: 4 - BgpSrte.ColorSubTlv: - description: "Configuration for the Policy Color attribute sub-TLV. The Color\ - \ sub-TLV MAY be used as a way to \"color\" the corresponding Tunnel TLV.\ - \ The Value field of the sub-TLV is eight octets long and consists of a Color\ - \ Extended Community. First two octets of its Value field are 0x030b as type\ - \ and subtype of extended community. Remaining six octets are are exposed\ - \ to configure. " + The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. + type: integer + format: uint32 + default: 1 + maximum: 65535 + x-field-uid: 2 + Bgp.ExtendedCommunity.TransitiveIpv4AddressType.RouteTarget: + description: "The Route Target Community identifies one or more routers that\ + \ may receive a set of routes (that carry this Community) carried by BGP.\ + \ It is sent with sub-type as 0x02. " type: object properties: - color: - description: |- - Six octet values. Example: 000000000064 for color value 100. + global_ipv4_admin: + description: "An IPv4 unicast address assigned by one of the Internet registries. " type: string - format: hex + format: ipv4 + default: 0.0.0.0 x-field-uid: 1 - BgpSrte.BindingSubTlv: + local_2byte_admin: + type: integer + format: uint32 + maximum: 65535 + default: 1 + description: |- + The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. + x-field-uid: 2 + Bgp.ExtendedCommunity.TransitiveIpv4AddressType: description: |- - Configuration for the binding SID sub-TLV. This is used to signal the binding SID related information of the SR Policy candidate path. + The Transitive IPv4 Address Specific Extended Community is sent as type 0x01. type: object properties: - binding_sid_type: - description: |- - Type of the binding SID. Supported types are "No Binding SID" or "Four Octets Sid" or "IPv6 SID". + choice: type: string - default: no_binding - x-field-uid: 1 + default: route_target_subtype x-enum: - no_binding: + route_target_subtype: x-field-uid: 1 - four_octet_sid: + route_origin_subtype: x-field-uid: 2 - ipv6_sid: - x-field-uid: 3 + x-field-uid: 1 enum: - - no_binding - - four_octet_sid - - ipv6_sid - four_octet_sid: - description: "Binding SID is encoded in 4 octets. " - type: integer - format: uint32 + - route_target_subtype + - route_origin_subtype + route_target_subtype: x-field-uid: 2 - ipv6_sid: - description: |- - IPv6 SID value. - type: string - format: ipv6 + $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveIpv4AddressType.RouteTarget' + route_origin_subtype: x-field-uid: 3 - s_flag: + $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveIpv4AddressType.RouteOrigin' + Bgp.ExtendedCommunity.Transitive4OctetAsType.RouteTarget: + description: "The Route Target Community identifies one or more routers that\ + \ may receive a set of routes (that carry this Community) carried by BGP.\ + \ It is sent with sub-type as 0x02 " + type: object + properties: + global_4byte_as: description: |- - S-Flag encodes the "Specified-BSID-only" behavior. - type: boolean - default: false - x-field-uid: 4 - i_flag: + The four octet IANA assigned AS value assigned to the Autonomous System. + type: integer + format: uint32 + default: 100 + x-field-uid: 1 + local_2byte_admin: + type: integer + format: uint32 + default: 1 + maximum: 65535 description: |- - I-Flag encodes the "Drop Upon Invalid" behavior. - type: boolean - default: false - x-field-uid: 5 - BgpSrte.PreferenceSubTlv: + The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. + x-field-uid: 2 + Bgp.ExtendedCommunity.Transitive4OctetAsType.RouteOrigin: description: |- - Configuration for BGP preference sub TLV of the SR Policy candidate path. + The Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03. type: object properties: - preference: + global_4byte_as: description: |- - The preference value of the SR Policy candidate path. + The four octet IANA assigned AS value assigned to the Autonomous System. + type: integer + format: uint32 + default: 100 + x-field-uid: 1 + local_2byte_admin: + description: |- + The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. + type: integer + format: uint32 + default: 1 + maximum: 65535 + x-field-uid: 2 + Bgp.ExtendedCommunity.Transitive4OctetAsType: + description: "The Transitive Four-Octet AS-Specific Extended Community is sent\ + \ as type 0x02. It is defined in RFC 5668. " + type: object + properties: + choice: + type: string + default: route_target_subtype + x-enum: + route_target_subtype: + x-field-uid: 1 + route_origin_subtype: + x-field-uid: 2 + x-field-uid: 1 + enum: + - route_target_subtype + - route_origin_subtype + route_target_subtype: + x-field-uid: 2 + $ref: '#/components/schemas/Bgp.ExtendedCommunity.Transitive4OctetAsType.RouteTarget' + route_origin_subtype: + x-field-uid: 3 + $ref: '#/components/schemas/Bgp.ExtendedCommunity.Transitive4OctetAsType.RouteOrigin' + Bgp.ExtendedCommunity.TransitiveOpaqueType.Color: + description: "The Color Community contains locally administrator defined 'color'\ + \ value which is used in conjunction with Encapsulation attribute to decide\ + \ whether a data packet can be transmitted on a certain tunnel or not. It\ + \ is defined in RFC9012 and sent with sub-type as 0x0b. " + type: object + properties: + flags: + description: "Two octet flag values. " type: integer format: uint32 + maximum: 65535 default: 0 x-field-uid: 1 - BgpSrte.PolicyPrioritySubTlv: + color: + type: integer + format: uint32 + default: 0 + description: "The color value is user defined and configured locally and\ + \ used to determine whether a data packet can be transmitted on a certain\ + \ tunnel or not in conjunction with the Encapsulation attribute. It is\ + \ defined in RFC9012. " + x-field-uid: 2 + Bgp.ExtendedCommunity.TransitiveOpaqueType.Encapsulation: description: |- - Configuration for the Policy Priority sub-TLV. The Policy Priority to indicate the order in which the SR policies are re-computed upon topological change. + This identifies the type of tunneling technology being signalled. It is defined in RFC9012 and sent with sub-type as 0x0c. type: object properties: - policy_priority: - description: |- - One-octet Priority value. + reserved: + description: "Four bytes of reserved values. Normally set to 0 on transmit\ + \ and ignored on receive. " type: integer format: uint32 - maximum: 255 + default: 0 x-field-uid: 1 - BgpSrte.PolicyNameSubTlv: + tunnel_type: + description: "Identifies the type of tunneling technology being signalled.\ + \ Initially defined in RFC5512 and extended in RFC9012. Some of the important\ + \ tunnel types include 1 L2TPv3 over IP\t[RFC9012], \n2\tGRE\t[RFC9012]\n\ + 7\tIP in IP\t[RFC9012]\n8\tVXLAN Encapsulation\t[RFC8365]\n9\tNVGRE Encapsulation\t\ + [RFC8365]\n10\tMPLS Encapsulation\t[RFC8365]\n15\tSR TE Policy Type\t\ + [draft-ietf-idr-segment-routing-te-policy]\n19\tGeneve Encapsulation\t\ + [RFC8926]" + type: integer + format: uint32 + maximum: 65535 + default: 1 + x-field-uid: 2 + Bgp.ExtendedCommunity.TransitiveOpaqueType: description: |- - Configuration for the Policy Name sub-TLV. The Policy Name sub-TLV is used to attach a symbolic name to the SR Policy candidate path. + The Transitive Opaque Extended Community is sent as type 0x03. type: object properties: - policy_name: - description: |- - Symbolic name for the policy that should be a string of printable ASCII characters, without a NULL terminator. + choice: type: string - minLength: 1 - maxLength: 32 + default: color_subtype + x-enum: + color_subtype: + x-field-uid: 1 + encapsulation_subtype: + x-field-uid: 2 x-field-uid: 1 - BgpSrte.ExplicitNullLabelPolicySubTlv: + enum: + - color_subtype + - encapsulation_subtype + color_subtype: + x-field-uid: 2 + $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveOpaqueType.Color' + encapsulation_subtype: + x-field-uid: 3 + $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveOpaqueType.Encapsulation' + Bgp.ExtendedCommunity.TransitiveEvpnType.RouterMac: description: |- - Configuration for BGP explicit null label policy sub TLV settings. + The Router MAC EVPN Community is defined in RFC9135 and normally sent only for EVPN Type-2 Routes . It is sent with sub-type 0x03. type: object properties: - explicit_null_label_policy: - description: "The value of the explicit null label policy " + router_mac: + description: "MAC Address of the PE Router. " type: string - default: do_not_push_enlp + format: mac + default: 0:0:0:0:0:0 x-field-uid: 1 + Bgp.ExtendedCommunity.TransitiveEvpnType: + description: "The Transitive EVPN Extended Community is sent as type 0x06 .\ + \ " + type: object + properties: + choice: + type: string + default: router_mac_subtype x-enum: - reserved_enlp: + router_mac_subtype: x-field-uid: 1 - push_ipv4_enlp: - x-field-uid: 2 - push_ipv6_enlp: - x-field-uid: 3 - push_ipv4_ipv6_enlp: - x-field-uid: 4 - do_not_push_enlp: - x-field-uid: 5 + x-field-uid: 1 enum: - - reserved_enlp - - push_ipv4_enlp - - push_ipv6_enlp - - push_ipv4_ipv6_enlp - - do_not_push_enlp - BgpSrte.SegmentList: + - router_mac_subtype + router_mac_subtype: + x-field-uid: 2 + $ref: '#/components/schemas/Bgp.ExtendedCommunity.TransitiveEvpnType.RouterMac' + Bgp.ExtendedCommunity.NonTransitive2OctetAsType.LinkBandwidth: description: |- - Optional configuration for BGP SR TE Policy segment list. The Segment List sub-TLV encodes a single explicit path towards the Endpoint. + The Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. It is sent with sub-type as 0x04. type: object properties: - weight: + global_2byte_as: description: |- - The Weight associated with a given path and the sub-TLV is optional. + The value of the Global Administrator subfield should represent the Autonomous System of the router that attaches the Link Bandwidth Community. If four octet AS numbering scheme is used, AS_TRANS (23456) should be used. type: integer format: uint32 + default: 100 + maximum: 65535 + x-field-uid: 1 + bandwidth: + description: |- + Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and 1 Mbps is 1000 Kbps per second ) + type: number + format: float default: 0 + x-field-uid: 2 + Bgp.ExtendedCommunity.NonTransitive2OctetAsType: + description: "The Non-Transitive Two-Octet AS-Specific Extended Community is\ + \ sent as type 0x40. " + type: object + properties: + choice: + type: string + default: link_bandwidth_subtype + x-enum: + link_bandwidth_subtype: + x-field-uid: 1 x-field-uid: 1 - segments: - type: array - items: - $ref: '#/components/schemas/BgpSrte.Segment' + enum: + - link_bandwidth_subtype + link_bandwidth_subtype: x-field-uid: 2 - name: - x-field-uid: 3 - description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. + $ref: '#/components/schemas/Bgp.ExtendedCommunity.NonTransitive2OctetAsType.LinkBandwidth' + Bgp.ExtendedCommunity.CustomType: + description: "Add a custom Extended Community with a combination of types ,\ + \ sub-types and values not explicitly specified above or not defined yet.\ + \ " + type: object + properties: + community_type: + description: "The type to be set in the Extended Community attribute. Accepts\ + \ hexadecimal input upto ff . " type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - active: - x-field-uid: 4 + format: hex + maxLength: 2 + default: '00' + x-field-uid: 1 + community_subtype: description: |- - If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. - type: boolean - default: true - required: - - name - BgpSrte.Segment: + The sub-type to be set in the Extended Community attribute. For certain types with no sub-type this byte can also be used as part of an extended value field. Accepts hexadecimal input upto ff. + type: string + format: hex + maxLength: 2 + default: '00' + x-field-uid: 2 + value: + description: "6 byte hex value to be carried in the last 6 bytes of the\ + \ Extended Community. Accepts hexadecimal input upto ffffffffffff. \ + \ " + type: string + format: hex + maxLength: 12 + default: '000000000000' + x-field-uid: 3 + Bgp.V6RouteRange: description: |- - A Segment sub-TLV describes a single segment in a segment list i.e., a single element of the explicit path. The Segment sub-TLVs are optional. + Emulated BGPv6 route range. type: object - required: - - segment_type - - name properties: - segment_type: + addresses: description: |- - Specify one of the segment type. - https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13 - Type A: SID only, in the form of MPLS Label. - Type B: SID only, in the form of IPv6 Address. - Type C: IPv4 Node Address with optional SID. - Type D: IPv6 Node Address with optional SID for SR MPLS. - Type E: IPv4 Address and index with optional SID. - Type F: IPv4 Local and Remote addresses with optional SID. - Type G: IPv6 Address and index for local and remote pair with optional - SID for SR MPLS. - Type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. - Type I: IPv6 Node Address with optional SID for SRv6. - Type J: IPv6 Address and index for local and remote pair with optional - SID for SRv6. - Type K: IPv6 Local and Remote addresses for SRv6. - type: string + A list of group of IPv6 route addresses. + type: array + items: + $ref: '#/components/schemas/V6RouteAddress' x-field-uid: 1 + next_hop_mode: + description: "Specify the NextHop in MP REACH NLRI. The mode for setting\ + \ the IP address of the NextHop in the MP REACH NLRI can be one of the\ + \ following:\n Local IP: Automatically fills the Nexthop with the Local\ + \ IP of the BGP\npeer.\n If BGP peer is of type IPv6, Nexthop Encoding\ + \ capability should be enabled.\n Manual: Override the Nexthop with any\ + \ arbitrary IPv4/IPv6 address. " + type: string + default: local_ip + x-field-uid: 2 x-enum: - type_a: + local_ip: x-field-uid: 1 - type_b: + manual: x-field-uid: 2 - type_c: - x-field-uid: 3 - type_d: - x-field-uid: 4 - type_e: - x-field-uid: 5 - type_f: - x-field-uid: 6 - type_g: - x-field-uid: 7 - type_h: - x-field-uid: 8 - type_i: - x-field-uid: 9 - type_j: - x-field-uid: 10 - type_k: - x-field-uid: 11 enum: - - type_a - - type_b - - type_c - - type_d - - type_e - - type_f - - type_g - - type_h - - type_i - - type_j - - type_k - type_a: - $ref: '#/components/schemas/BgpSrte.SegmentATypeSubTlv' - x-field-uid: 2 - type_b: - $ref: '#/components/schemas/BgpSrte.SegmentBTypeSubTlv' + - local_ip + - manual + next_hop_address_type: + description: |- + If the Nexthop Mode is Manual, it sets the type of the NextHop IP address. + type: string + default: ipv6 x-field-uid: 3 - type_c: - $ref: '#/components/schemas/BgpSrte.SegmentCTypeSubTlv' + x-enum: + ipv4: + x-field-uid: 1 + ipv6: + x-field-uid: 2 + enum: + - ipv4 + - ipv6 + next_hop_ipv4_address: + description: |- + The IPv4 address of the next hop if the Nexthop Mode is manual and the Nexthop type is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability should be enabled. + type: string + format: ipv4 + default: 0.0.0.0 x-field-uid: 4 - type_d: - $ref: '#/components/schemas/BgpSrte.SegmentDTypeSubTlv' + next_hop_ipv6_address: + description: "The IPv6 address of the next hop if the Nexthop Mode is manual\ + \ and the Nexthop type is IPv6. " + type: string + format: ipv6 + default: ::0 x-field-uid: 5 - type_e: - $ref: '#/components/schemas/BgpSrte.SegmentETypeSubTlv' + advanced: x-field-uid: 6 - type_f: - $ref: '#/components/schemas/BgpSrte.SegmentFTypeSubTlv' + $ref: '#/components/schemas/Bgp.RouteAdvanced' + communities: x-field-uid: 7 - type_g: - $ref: '#/components/schemas/BgpSrte.SegmentGTypeSubTlv' + description: |- + Optional community settings. + type: array + items: + $ref: '#/components/schemas/Bgp.Community' + as_path: x-field-uid: 8 - type_h: - $ref: '#/components/schemas/BgpSrte.SegmentHTypeSubTlv' + $ref: '#/components/schemas/Bgp.AsPath' + add_path: x-field-uid: 9 - type_i: - $ref: '#/components/schemas/BgpSrte.SegmentITypeSubTlv' - x-field-uid: 10 - type_j: - $ref: '#/components/schemas/BgpSrte.SegmentJTypeSubTlv' - x-field-uid: 11 - type_k: - $ref: '#/components/schemas/BgpSrte.SegmentKTypeSubTlv' - x-field-uid: 12 + $ref: '#/components/schemas/Bgp.AddPath' name: - x-field-uid: 13 + x-field-uid: 10 description: |- Globally unique name of an object. It also serves as the primary key for arrays of objects. type: string pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ x-unique: global - active: - x-field-uid: 14 - description: |- - If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. - type: boolean - default: true - BgpSrte.SrMplsSid: - description: |- - Configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. - type: object - properties: - label: - description: |- - Label value in [0, 2^20 -1]. - type: integer - format: uint32 - maximum: 1048575 - x-field-uid: 1 - tc: - description: |- - Traffic class in bits. - type: integer - format: uint32 - maximum: 7 - x-field-uid: 2 - s_bit: + ext_communities: + x-status: + status: deprecated + information: This property is deprecated in favor of property extended_communities + x-field-uid: 11 description: |- - Bottom-of-Stack bit. - type: boolean - x-field-uid: 3 - ttl: - description: "Time To Live. " - type: integer - format: uint32 - maximum: 225 - x-field-uid: 4 - BgpSrte.SRv6SIDEndpointBehaviorAndStructure: - description: |- - Configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. + Deprecated: This property is deprecated in favor of property extended_communities + + Deprecated: This property is deprecated in favor of property extended_communities + + Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. Note evpn type is defined mainly for use with evpn route updates and not for IPv4 and IPv6 route updates. + type: array + items: + $ref: '#/components/schemas/Bgp.ExtCommunity' + extended_communities: + x-field-uid: 12 + description: "Optional Extended Community settings. The Extended Communities\ + \ Attribute is a transitive optional BGP attribute, with the Type Code\ + \ 16. Community and Extended Communities attributes are utilized to trigger\ + \ routing decisions, such as acceptance, rejection, preference, or redistribution.\ + \ An extended community is an eight byte value. It is divided into two\ + \ main parts. The first two bytes of the community encode a type and sub-type\ + \ fields and the last six bytes carry a unique set of data in a format\ + \ defined by the type and sub-type field. Extended communities provide\ + \ a larger range for grouping or categorizing communities. " + type: array + items: + $ref: '#/components/schemas/Bgp.ExtendedCommunity' + required: + - name + BgpSrte.V4Policy: + description: "Configuration for BGP Segment Routing Traffic Engineering(SRTE)\ + \ \npolicy.\n" type: object + required: + - ipv4_endpoint + - name properties: - lb_length: + distinguisher: description: |- - SRv6 SID Locator Block length in bits. + 4-octet value uniquely identifying the policy in the context of (color, endpoint) tuple. It is used by the SR Policy originator to make unique (from an NLRI perspective) both for multiple candidate paths of the same SR Policy as well as candidate paths of different SR Policies (i.e. with different segment list) with the same Color and Endpoint but meant for different head-ends. type: integer format: uint32 - maximum: 128 - default: 0 + default: 1 x-field-uid: 1 - ln_length: + color: description: |- - SRv6 SID Locator Node length in bits. + Policy color is used to match the color of the destination prefixes to steer traffic into the SR Policy. type: integer format: uint32 - maximum: 128 - default: 0 + default: 100 x-field-uid: 2 - func_length: + ipv4_endpoint: description: |- - SRv6 SID Function length in bits. - type: integer - format: uint32 - maximum: 128 - default: 0 + Specifies a single node or a set of nodes (e.g. an anycast address). It is selected on the basis of the SR Policy type (AFI). + type: string + format: ipv4 x-field-uid: 3 - arg_length: + next_hop_mode: description: |- - SRv6 SID Arguments length in bits. - type: integer - format: uint32 - maximum: 128 - default: 0 + Mode for choosing the NextHop in MP REACH NLRI. Available modes are : Local IP: Automatically fills the Nexthop with the Local IP of the BGP peer. For IPv6 BGP peer the Nexthop Encoding capability should be enabled. Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. + type: string + default: local_ip x-field-uid: 4 - BgpSrte.SegmentATypeSubTlv: - description: |- - Type A: SID only, in the form of MPLS Label. - type: object - properties: - flags: + x-enum: + local_ip: + x-field-uid: 1 + manual: + x-field-uid: 2 + enum: + - local_ip + - manual + next_hop_address_type: + description: "Type of next hop IP address to be used when 'next_hop_mode'\ + \ is set to 'manual'. " + type: string + default: ipv4 + x-field-uid: 5 + x-enum: + ipv4: + x-field-uid: 1 + ipv6: + x-field-uid: 2 + enum: + - ipv4 + - ipv6 + next_hop_ipv4_address: description: |- - One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + The IPv4 address of the next hop if the Nexthop type 'next_hop_mode' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability extended_next_hop_encoding should be enabled. type: string - format: hex - x-field-uid: 1 - label: - x-field-uid: 2 + format: ipv4 + x-field-uid: 6 + next_hop_ipv6_address: + description: "The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type'\ + \ is 'manual' and the Nexthop type 'next_hop_address_type' is IPv6. " + type: string + format: ipv6 + x-field-uid: 7 + advanced: + $ref: '#/components/schemas/Bgp.RouteAdvanced' + x-field-uid: 8 + add_path: + $ref: '#/components/schemas/Bgp.AddPath' + x-field-uid: 9 + as_path: + $ref: '#/components/schemas/Bgp.AsPath' + x-field-uid: 10 + communities: description: |- - Label value in [0, 2^20 -1]. - type: integer - format: uint32 - maximum: 1048575 - tc: - x-field-uid: 3 + Optional Community settings. + type: array + items: + $ref: '#/components/schemas/Bgp.Community' + x-field-uid: 11 + ext_communities: description: |- - Traffic class in bits. - type: integer - format: uint32 - maximum: 7 - s_bit: - x-field-uid: 4 + Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. + type: array + items: + $ref: '#/components/schemas/Bgp.ExtCommunity' + x-field-uid: 12 + tunnel_tlvs: description: |- - Bottom-of-Stack bit. + List Tunnel Encapsulation Attributes. + type: array + items: + $ref: '#/components/schemas/BgpSrte.V4TunnelTlv' + x-field-uid: 13 + name: + x-field-uid: 14 + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + active: + x-field-uid: 15 + description: |- + If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. type: boolean - ttl: - x-field-uid: 5 - description: "Time To Live. " - type: integer - format: uint32 - maximum: 225 - BgpSrte.SegmentBTypeSubTlv: + default: true + BgpSrte.V4TunnelTlv: description: |- - Type B: SID only, in the form of IPv6 address. + Configuration for BGP SRTE Tunnel TLV. type: object - required: - - srv6_sid properties: - flags: - description: |- - One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - type: string - format: hex + remote_endpoint_sub_tlv: + $ref: '#/components/schemas/BgpSrte.RemoteEndpointSubTlv' x-field-uid: 1 - srv6_sid: + color_sub_tlv: + $ref: '#/components/schemas/BgpSrte.ColorSubTlv' + x-field-uid: 2 + binding_sub_tlv: + $ref: '#/components/schemas/BgpSrte.BindingSubTlv' + x-field-uid: 3 + preference_sub_tlv: + $ref: '#/components/schemas/BgpSrte.PreferenceSubTlv' + x-field-uid: 4 + policy_priority_sub_tlv: + $ref: '#/components/schemas/BgpSrte.PolicyPrioritySubTlv' + x-field-uid: 5 + policy_name_sub_tlv: + $ref: '#/components/schemas/BgpSrte.PolicyNameSubTlv' + x-field-uid: 6 + explicit_null_label_policy_sub_tlv: + $ref: '#/components/schemas/BgpSrte.ExplicitNullLabelPolicySubTlv' + x-field-uid: 7 + segment_lists: + type: array + items: + $ref: '#/components/schemas/BgpSrte.SegmentList' + x-field-uid: 8 + name: + x-field-uid: 9 description: |- - SRv6 SID. + Globally unique name of an object. It also serves as the primary key for arrays of objects. type: string - format: ipv6 - x-field-uid: 2 - srv6_sid_endpoint_behavior: + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + active: + x-field-uid: 10 description: |- - Optional SRv6 Endpoint Behavior and SID Structure. - $ref: '#/components/schemas/BgpSrte.SRv6SIDEndpointBehaviorAndStructure' - x-field-uid: 3 - BgpSrte.SegmentCTypeSubTlv: + If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. + type: boolean + default: true + required: + - name + BgpSrte.RemoteEndpointSubTlv: description: |- - Type C: IPv4 Node Address with optional SID. + Configuration for the BGP remote endpoint sub TLV. type: object - required: - - ipv4_node_address properties: - flags: - description: |- - One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - type: string - format: hex - x-field-uid: 1 - sr_algorithm: + as_number: description: |- - SR Algorithm identifier when A-Flag in on. + Autonomous system (AS) number type: integer format: uint32 - maximum: 255 default: 0 + x-field-uid: 1 + address_family: + description: |- + Determines the address type + type: string + default: ipv4 x-field-uid: 2 - ipv4_node_address: + x-enum: + ipv4: + x-field-uid: 1 + ipv6: + x-field-uid: 2 + enum: + - ipv4 + - ipv6 + ipv4_address: description: |- - IPv4 address representing a node. + The IPv4 address of the Remote Endpoint. type: string format: ipv4 + default: 0.0.0.0 x-field-uid: 3 - sr_mpls_sid: + ipv6_address: description: |- - Optional SR-MPLS SID. - $ref: '#/components/schemas/BgpSrte.SrMplsSid' + The IPv6 address of the Remote Endpoint. + type: string + format: ipv6 + default: ::0 x-field-uid: 4 - BgpSrte.SegmentDTypeSubTlv: - description: |- - Type D: IPv6 Node Address with optional SID for SR MPLS. + BgpSrte.ColorSubTlv: + description: "Configuration for the Policy Color attribute sub-TLV. The Color\ + \ sub-TLV MAY be used as a way to \"color\" the corresponding Tunnel TLV.\ + \ The Value field of the sub-TLV is eight octets long and consists of a Color\ + \ Extended Community. First two octets of its Value field are 0x030b as type\ + \ and subtype of extended community. Remaining six octets are are exposed\ + \ to configure. " type: object - required: - - ipv6_node_address properties: - flags: + color: description: |- - One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + Six octet values. Example: 000000000064 for color value 100. type: string format: hex x-field-uid: 1 - sr_algorithm: + BgpSrte.BindingSubTlv: + description: |- + Configuration for the binding SID sub-TLV. This is used to signal the binding SID related information of the SR Policy candidate path. + type: object + properties: + binding_sid_type: description: |- - specifying SR Algorithm when when A-Flag as defined in above flags. + Type of the binding SID. Supported types are "No Binding SID" or "Four Octets Sid" or "IPv6 SID". + type: string + default: no_binding + x-field-uid: 1 + x-enum: + no_binding: + x-field-uid: 1 + four_octet_sid: + x-field-uid: 2 + ipv6_sid: + x-field-uid: 3 + enum: + - no_binding + - four_octet_sid + - ipv6_sid + four_octet_sid: + description: "Binding SID is encoded in 4 octets. " type: integer format: uint32 - maximum: 255 - default: 0 x-field-uid: 2 - ipv6_node_address: + ipv6_sid: description: |- - IPv6 address representing a node. + IPv6 SID value. type: string format: ipv6 x-field-uid: 3 - sr_mpls_sid: + s_flag: description: |- - Optional SR-MPLS SID. - $ref: '#/components/schemas/BgpSrte.SrMplsSid' + S-Flag encodes the "Specified-BSID-only" behavior. + type: boolean + default: false x-field-uid: 4 - BgpSrte.SegmentETypeSubTlv: + i_flag: + description: |- + I-Flag encodes the "Drop Upon Invalid" behavior. + type: boolean + default: false + x-field-uid: 5 + BgpSrte.PreferenceSubTlv: description: |- - Type E: IPv4 Address and Local Interface ID with optional SID + Configuration for BGP preference sub TLV of the SR Policy candidate path. type: object - required: - - ipv4_node_address properties: - flags: - description: |- - One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - type: string - format: hex - x-field-uid: 1 - local_interface_id: + preference: description: |- - Local Interface ID: The Interface Index as defined in [RFC8664]. + The preference value of the SR Policy candidate path. type: integer format: uint32 default: 0 - x-field-uid: 2 - ipv4_node_address: - description: |- - IPv4 address representing a node. - type: string - format: ipv4 - x-field-uid: 3 - sr_mpls_sid: - description: |- - Optional SR-MPLS SID. - $ref: '#/components/schemas/BgpSrte.SrMplsSid' - x-field-uid: 4 - BgpSrte.SegmentFTypeSubTlv: - description: |- - Type F: IPv4 Local and Remote addresses with optional SID. - type: object - required: - - local_ipv4_address - - remote_ipv4_address - properties: - flags: - description: |- - One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - type: string - format: hex x-field-uid: 1 - local_ipv4_address: - description: |- - Local IPv4 Address. - type: string - format: ipv4 - x-field-uid: 2 - remote_ipv4_address: - description: |- - Remote IPv4 Address. - type: string - format: ipv4 - x-field-uid: 3 - sr_mpls_sid: - description: |- - Optional SR-MPLS SID. - $ref: '#/components/schemas/BgpSrte.SrMplsSid' - x-field-uid: 4 - BgpSrte.SegmentGTypeSubTlv: + BgpSrte.PolicyPrioritySubTlv: description: |- - Type G: IPv6 Address, Interface ID for local and remote pair with optional SID for SR MPLS. + Configuration for the Policy Priority sub-TLV. The Policy Priority to indicate the order in which the SR policies are re-computed upon topological change. type: object - required: - - local_ipv6_node_address - - remote_ipv6_node_address properties: - flags: - description: |- - One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - type: string - format: hex - x-field-uid: 1 - local_interface_id: - description: |- - Local Interface ID: The Interface Index as defined in [RFC8664]. - type: integer - format: uint32 - default: 0 - x-field-uid: 2 - local_ipv6_node_address: - description: |- - IPv6 address representing a node. - type: string - format: ipv6 - x-field-uid: 3 - remote_interface_id: + policy_priority: description: |- - Local Interface ID: The Interface Index as defined in [RFC8664]. + One-octet Priority value. type: integer format: uint32 - default: 0 - x-field-uid: 4 - remote_ipv6_node_address: - description: |- - IPv6 address representing a node. - type: string - format: ipv6 - x-field-uid: 5 - sr_mpls_sid: - description: |- - Optional SR-MPLS SID. - $ref: '#/components/schemas/BgpSrte.SrMplsSid' - x-field-uid: 6 - BgpSrte.SegmentHTypeSubTlv: + maximum: 255 + x-field-uid: 1 + BgpSrte.PolicyNameSubTlv: description: |- - Type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. + Configuration for the Policy Name sub-TLV. The Policy Name sub-TLV is used to attach a symbolic name to the SR Policy candidate path. type: object - required: - - local_ipv6_address - - remote_ipv6_address properties: - flags: + policy_name: description: |- - One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + Symbolic name for the policy that should be a string of printable ASCII characters, without a NULL terminator. type: string - format: hex + minLength: 1 + maxLength: 32 x-field-uid: 1 - local_ipv6_address: - description: |- - Local IPv6 Address. - type: string - format: ipv6 - x-field-uid: 2 - remote_ipv6_address: - description: |- - Remote IPv6 Address. - type: string - format: ipv6 - x-field-uid: 3 - sr_mpls_sid: - description: |- - Optional SR-MPLS SID. - $ref: '#/components/schemas/BgpSrte.SrMplsSid' - x-field-uid: 4 - BgpSrte.SegmentITypeSubTlv: + BgpSrte.ExplicitNullLabelPolicySubTlv: description: |- - Type I: IPv6 Node Address with optional SRv6 SID. + Configuration for BGP explicit null label policy sub TLV settings. type: object - required: - - ipv6_node_address properties: - flags: - description: |- - One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + explicit_null_label_policy: + description: "The value of the explicit null label policy " type: string - format: hex + default: do_not_push_enlp x-field-uid: 1 - ipv6_node_address: - description: |- - IPv6 address representing a node. - type: string - format: ipv6 - x-field-uid: 2 - srv6_sid: - description: |- - Optional SRv6 SID. - type: string - format: ipv6 - x-field-uid: 3 - srv6_sid_endpoint_behavior: - description: |- - Optional SRv6 Endpoint Behavior and SID Structure. - $ref: '#/components/schemas/BgpSrte.SRv6SIDEndpointBehaviorAndStructure' - x-field-uid: 4 - BgpSrte.SegmentJTypeSubTlv: + x-enum: + reserved_enlp: + x-field-uid: 1 + push_ipv4_enlp: + x-field-uid: 2 + push_ipv6_enlp: + x-field-uid: 3 + push_ipv4_ipv6_enlp: + x-field-uid: 4 + do_not_push_enlp: + x-field-uid: 5 + enum: + - reserved_enlp + - push_ipv4_enlp + - push_ipv6_enlp + - push_ipv4_ipv6_enlp + - do_not_push_enlp + BgpSrte.SegmentList: description: |- - Type J: IPv6 Address, Interface ID for local and remote pair for SRv6 with optional SID. + Optional configuration for BGP SR TE Policy segment list. The Segment List sub-TLV encodes a single explicit path towards the Endpoint. type: object - required: - - local_ipv6_node_address - - remote_ipv6_node_address properties: - flags: - description: |- - One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - type: string - format: hex - x-field-uid: 1 - sr_algorithm: + weight: description: |- - SR Algorithm identifier when A-Flag in on. + The Weight associated with a given path and the sub-TLV is optional. type: integer format: uint32 default: 0 + x-field-uid: 1 + segments: + type: array + items: + $ref: '#/components/schemas/BgpSrte.Segment' x-field-uid: 2 - local_interface_id: - description: |- - Local Interface ID: The Interface Index as defined in [RFC8664]. - type: integer - format: uint32 - default: 0 + name: x-field-uid: 3 - local_ipv6_node_address: description: |- - IPv6 address representing a node. + Globally unique name of an object. It also serves as the primary key for arrays of objects. type: string - format: ipv6 + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + active: x-field-uid: 4 - remote_interface_id: description: |- - Local Interface ID: The Interface Index as defined in [RFC8664]. - type: integer - format: uint32 - default: 0 - x-field-uid: 5 - remote_ipv6_node_address: + If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. + type: boolean + default: true + required: + - name + BgpSrte.Segment: + description: |- + A Segment sub-TLV describes a single segment in a segment list i.e., a single element of the explicit path. The Segment sub-TLVs are optional. + type: object + required: + - segment_type + - name + properties: + segment_type: description: |- - IPv6 address representing a node. - type: string - format: ipv6 - x-field-uid: 6 - srv6_sid: - description: |- - Optional SRv6 SID. + Specify one of the segment type. + https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13 + Type A: SID only, in the form of MPLS Label. + Type B: SID only, in the form of IPv6 Address. + Type C: IPv4 Node Address with optional SID. + Type D: IPv6 Node Address with optional SID for SR MPLS. + Type E: IPv4 Address and index with optional SID. + Type F: IPv4 Local and Remote addresses with optional SID. + Type G: IPv6 Address and index for local and remote pair with optional + SID for SR MPLS. + Type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. + Type I: IPv6 Node Address with optional SID for SRv6. + Type J: IPv6 Address and index for local and remote pair with optional + SID for SRv6. + Type K: IPv6 Local and Remote addresses for SRv6. type: string - format: ipv6 + x-field-uid: 1 + x-enum: + type_a: + x-field-uid: 1 + type_b: + x-field-uid: 2 + type_c: + x-field-uid: 3 + type_d: + x-field-uid: 4 + type_e: + x-field-uid: 5 + type_f: + x-field-uid: 6 + type_g: + x-field-uid: 7 + type_h: + x-field-uid: 8 + type_i: + x-field-uid: 9 + type_j: + x-field-uid: 10 + type_k: + x-field-uid: 11 + enum: + - type_a + - type_b + - type_c + - type_d + - type_e + - type_f + - type_g + - type_h + - type_i + - type_j + - type_k + type_a: + $ref: '#/components/schemas/BgpSrte.SegmentATypeSubTlv' + x-field-uid: 2 + type_b: + $ref: '#/components/schemas/BgpSrte.SegmentBTypeSubTlv' + x-field-uid: 3 + type_c: + $ref: '#/components/schemas/BgpSrte.SegmentCTypeSubTlv' + x-field-uid: 4 + type_d: + $ref: '#/components/schemas/BgpSrte.SegmentDTypeSubTlv' + x-field-uid: 5 + type_e: + $ref: '#/components/schemas/BgpSrte.SegmentETypeSubTlv' + x-field-uid: 6 + type_f: + $ref: '#/components/schemas/BgpSrte.SegmentFTypeSubTlv' x-field-uid: 7 - srv6_sid_endpoint_behavior: - description: |- - Optional SRv6 Endpoint Behavior and SID Structure. - $ref: '#/components/schemas/BgpSrte.SRv6SIDEndpointBehaviorAndStructure' + type_g: + $ref: '#/components/schemas/BgpSrte.SegmentGTypeSubTlv' x-field-uid: 8 - BgpSrte.SegmentKTypeSubTlv: + type_h: + $ref: '#/components/schemas/BgpSrte.SegmentHTypeSubTlv' + x-field-uid: 9 + type_i: + $ref: '#/components/schemas/BgpSrte.SegmentITypeSubTlv' + x-field-uid: 10 + type_j: + $ref: '#/components/schemas/BgpSrte.SegmentJTypeSubTlv' + x-field-uid: 11 + type_k: + $ref: '#/components/schemas/BgpSrte.SegmentKTypeSubTlv' + x-field-uid: 12 + name: + x-field-uid: 13 + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + active: + x-field-uid: 14 + description: |- + If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. + type: boolean + default: true + BgpSrte.SrMplsSid: description: |- - Type K: IPv6 Local and Remote addresses for SRv6 with optional SID. + Configuration for SR-MPLS with Label, TC, Bottom-of-Stack and TTL. type: object - required: - - local_ipv6_address - - remote_ipv6_address properties: - flags: + label: description: |- - One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 - type: string - format: hex + Label value in [0, 2^20 -1]. + type: integer + format: uint32 + maximum: 1048575 x-field-uid: 1 - sr_algorithm: + tc: description: |- - SR Algorithm identifier when A-Flag in on. + Traffic class in bits. + type: integer + format: uint32 + maximum: 7 + x-field-uid: 2 + s_bit: + description: |- + Bottom-of-Stack bit. + type: boolean + x-field-uid: 3 + ttl: + description: "Time To Live. " + type: integer + format: uint32 + maximum: 225 + x-field-uid: 4 + BgpSrte.SRv6SIDEndpointBehaviorAndStructure: + description: |- + Configuration for SRv6 Endpoint Behavior and SID Structure. Its optional. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. + type: object + properties: + lb_length: + description: |- + SRv6 SID Locator Block length in bits. + type: integer + format: uint32 + maximum: 128 + default: 0 + x-field-uid: 1 + ln_length: + description: |- + SRv6 SID Locator Node length in bits. type: integer format: uint32 + maximum: 128 default: 0 x-field-uid: 2 - local_ipv6_address: + func_length: description: |- - IPv6 address representing a node. - type: string - format: ipv6 + SRv6 SID Function length in bits. + type: integer + format: uint32 + maximum: 128 + default: 0 x-field-uid: 3 - remote_ipv6_address: + arg_length: description: |- - IPv6 address representing a node. + SRv6 SID Arguments length in bits. + type: integer + format: uint32 + maximum: 128 + default: 0 + x-field-uid: 4 + BgpSrte.SegmentATypeSubTlv: + description: |- + Type A: SID only, in the form of MPLS Label. + type: object + properties: + flags: + description: |- + One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 type: string - format: ipv6 + format: hex + x-field-uid: 1 + label: + x-field-uid: 2 + description: |- + Label value in [0, 2^20 -1]. + type: integer + format: uint32 + maximum: 1048575 + tc: + x-field-uid: 3 + description: |- + Traffic class in bits. + type: integer + format: uint32 + maximum: 7 + s_bit: x-field-uid: 4 + description: |- + Bottom-of-Stack bit. + type: boolean + ttl: + x-field-uid: 5 + description: "Time To Live. " + type: integer + format: uint32 + maximum: 225 + BgpSrte.SegmentBTypeSubTlv: + description: |- + Type B: SID only, in the form of IPv6 address. + type: object + required: + - srv6_sid + properties: + flags: + description: |- + One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + type: string + format: hex + x-field-uid: 1 srv6_sid: description: |- - Optional SRv6 SID. + SRv6 SID. type: string format: ipv6 - x-field-uid: 5 + x-field-uid: 2 srv6_sid_endpoint_behavior: description: |- Optional SRv6 Endpoint Behavior and SID Structure. $ref: '#/components/schemas/BgpSrte.SRv6SIDEndpointBehaviorAndStructure' - x-field-uid: 6 - BgpSrte.V6Policy: - description: | - Configuration for BGP Segment Routing Traffic Engineering policy. + x-field-uid: 3 + BgpSrte.SegmentCTypeSubTlv: + description: |- + Type C: IPv4 Node Address with optional SID. type: object required: - - ipv6_endpoint - - name + - ipv4_node_address properties: - distinguisher: + flags: description: |- - Identifies the policy in the context of (color and endpoint) tuple. It is used by the SR Policy originator to make unique multiple occurrences of the same SR Policy. - type: integer - format: uint32 - default: 1 + One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + type: string + format: hex x-field-uid: 1 - color: - description: "Identifies the policy. It is used to match the color of the\ - \ destination prefixes to steer traffic into the SR Policy. " + sr_algorithm: + description: |- + SR Algorithm identifier when A-Flag in on. type: integer format: uint32 - default: 100 + maximum: 255 + default: 0 x-field-uid: 2 - ipv6_endpoint: + ipv4_node_address: description: |- - Specifies a single node or a set of nodes (e.g., an anycast address). It is selected on the basis of the SR Policy type (AFI). + IPv4 address representing a node. type: string - format: ipv6 + format: ipv4 x-field-uid: 3 - next_hop_mode: + sr_mpls_sid: description: |- - Mode for choosing the NextHop in MP REACH NLRI. Available modes are : Local IP: Automatically fills the Nexthop with the Local IP of the BGP peer. For IPv6 BGP peer the Nexthop Encoding capability should be enabled. Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. - type: string - default: local_ip + Optional SR-MPLS SID. + $ref: '#/components/schemas/BgpSrte.SrMplsSid' x-field-uid: 4 - x-enum: - local_ip: - x-field-uid: 1 - manual: - x-field-uid: 2 - enum: - - local_ip - - manual - next_hop_address_type: - description: "Type of next hop IP address to be used when 'next_hop_mode'\ - \ is set to 'manual'. " - type: string - default: ipv6 - x-field-uid: 5 - x-enum: - ipv4: - x-field-uid: 1 - ipv6: - x-field-uid: 2 - enum: - - ipv4 - - ipv6 - next_hop_ipv4_address: + BgpSrte.SegmentDTypeSubTlv: + description: |- + Type D: IPv6 Node Address with optional SID for SR MPLS. + type: object + required: + - ipv6_node_address + properties: + flags: description: |- - The IPv4 address of the Nexthop if the 'next_hop_mode' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability extended_next_hop_encoding should be enabled. + One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 type: string - format: ipv4 - default: 0.0.0.0 - x-field-uid: 6 - next_hop_ipv6_address: - description: "The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type'\ - \ is 'manual' and the Nexthop type 'next_hop_address_type' is IPv6. " + format: hex + x-field-uid: 1 + sr_algorithm: + description: |- + specifying SR Algorithm when when A-Flag as defined in above flags. + type: integer + format: uint32 + maximum: 255 + default: 0 + x-field-uid: 2 + ipv6_node_address: + description: |- + IPv6 address representing a node. type: string format: ipv6 - default: ::0 - x-field-uid: 7 - advanced: - $ref: '#/components/schemas/Bgp.RouteAdvanced' - x-field-uid: 8 - add_path: - $ref: '#/components/schemas/Bgp.AddPath' - x-field-uid: 9 - as_path: - $ref: '#/components/schemas/Bgp.AsPath' - x-field-uid: 10 - communities: + x-field-uid: 3 + sr_mpls_sid: description: |- - Optional community settings. - type: array - items: - $ref: '#/components/schemas/Bgp.Community' - x-field-uid: 11 - extcommunities: + Optional SR-MPLS SID. + $ref: '#/components/schemas/BgpSrte.SrMplsSid' + x-field-uid: 4 + BgpSrte.SegmentETypeSubTlv: + description: |- + Type E: IPv4 Address and Local Interface ID with optional SID + type: object + required: + - ipv4_node_address + properties: + flags: description: |- - Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. - type: array - items: - $ref: '#/components/schemas/Bgp.ExtCommunity' - x-field-uid: 12 - tunnel_tlvs: + One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + type: string + format: hex + x-field-uid: 1 + local_interface_id: description: |- - List of optional tunnel TLV settings. - type: array - items: - $ref: '#/components/schemas/BgpSrte.V6TunnelTlv' - x-field-uid: 13 - name: - x-field-uid: 14 + Local Interface ID: The Interface Index as defined in [RFC8664]. + type: integer + format: uint32 + default: 0 + x-field-uid: 2 + ipv4_node_address: description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. + IPv4 address representing a node. type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - active: - x-field-uid: 15 + format: ipv4 + x-field-uid: 3 + sr_mpls_sid: description: |- - If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. - type: boolean - default: true - BgpSrte.V6TunnelTlv: + Optional SR-MPLS SID. + $ref: '#/components/schemas/BgpSrte.SrMplsSid' + x-field-uid: 4 + BgpSrte.SegmentFTypeSubTlv: description: |- - Configuration for BGP SRTE Tunnel TLV. + Type F: IPv4 Local and Remote addresses with optional SID. type: object + required: + - local_ipv4_address + - remote_ipv4_address properties: - remote_endpoint_sub_tlv: - $ref: '#/components/schemas/BgpSrte.RemoteEndpointSubTlv' + flags: + description: |- + One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + type: string + format: hex x-field-uid: 1 - color_sub_tlv: - $ref: '#/components/schemas/BgpSrte.ColorSubTlv' + local_ipv4_address: + description: |- + Local IPv4 Address. + type: string + format: ipv4 x-field-uid: 2 - binding_sub_tlv: - $ref: '#/components/schemas/BgpSrte.BindingSubTlv' - x-field-uid: 3 - preference_sub_tlv: - $ref: '#/components/schemas/BgpSrte.PreferenceSubTlv' - x-field-uid: 4 - policy_priority_sub_tlv: - $ref: '#/components/schemas/BgpSrte.PolicyPrioritySubTlv' - x-field-uid: 5 - policy_name_sub_tlv: - $ref: '#/components/schemas/BgpSrte.PolicyNameSubTlv' - x-field-uid: 6 - explicit_null_label_policy_sub_tlv: - $ref: '#/components/schemas/BgpSrte.ExplicitNullLabelPolicySubTlv' - x-field-uid: 7 - segment_lists: - type: array - items: - $ref: '#/components/schemas/BgpSrte.SegmentList' - x-field-uid: 8 - name: - x-field-uid: 9 + remote_ipv4_address: description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. + Remote IPv4 Address. type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - active: - x-field-uid: 10 + format: ipv4 + x-field-uid: 3 + sr_mpls_sid: description: |- - If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. - type: boolean - default: true - required: - - name - Bgp.GracefulRestart: + Optional SR-MPLS SID. + $ref: '#/components/schemas/BgpSrte.SrMplsSid' + x-field-uid: 4 + BgpSrte.SegmentGTypeSubTlv: description: |- - The Graceful Restart Capability (RFC 4724) is a BGP capability that can be used by a BGP speaker to indicate its ability to preserve its forwarding state during BGP restart. The Graceful Restart (GR) capability is advertised in OPEN messages sent between BGP peers. After a BGP session has been established, and the initial routing update has been completed, an End-of-RIB (Routing Information Base) marker is sent in an UPDATE message to convey information about routing convergence. + Type G: IPv6 Address, Interface ID for local and remote pair with optional SID for SR MPLS. type: object + required: + - local_ipv6_node_address + - remote_ipv6_node_address properties: - enable_gr: + flags: description: |- - If enabled, Graceful Restart capability is advertised in BGP OPEN messages. - type: boolean - default: false + One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + type: string + format: hex x-field-uid: 1 - restart_time: + local_interface_id: description: |- - This is the estimated duration (in seconds) it will take for the BGP session to be re-established after a restart. This can be used to speed up routing convergence by its peer in case the BGP speaker does not come back after a restart. + Local Interface ID: The Interface Index as defined in [RFC8664]. type: integer format: uint32 - maximum: 4096 - default: 45 + default: 0 x-field-uid: 2 - enable_llgr: - description: "If enabled, the \"Long-lived Graceful Restart Capability\"\ - , or \"LLGR Capability\"\nwill be advertised.\nThis capability MUST be\ - \ advertised in conjunction with the Graceful Restart \ncapability." - type: boolean - default: false + local_ipv6_node_address: + description: |- + IPv6 address representing a node. + type: string + format: ipv6 x-field-uid: 3 - stale_time: - description: "Duration (in seconds) specifying how long stale information\ - \ (for the AFI/SAFI) \nmay be retained. This is a three byte field and\ - \ is applicable \nonly if 'enable_llgr' is set to 'true'." + remote_interface_id: + description: |- + Local Interface ID: The Interface Index as defined in [RFC8664]. type: integer format: uint32 - maximum: 16777215 - default: 10 + default: 0 x-field-uid: 4 - Bgp.UpdateReplay: + remote_ipv6_node_address: + description: |- + IPv6 address representing a node. + type: string + format: ipv6 + x-field-uid: 5 + sr_mpls_sid: + description: |- + Optional SR-MPLS SID. + $ref: '#/components/schemas/BgpSrte.SrMplsSid' + x-field-uid: 6 + BgpSrte.SegmentHTypeSubTlv: description: |- - Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. + Type H: IPv6 Local and Remote addresses with optional SID for SR MPLS. type: object + required: + - local_ipv6_address + - remote_ipv6_address properties: - choice: + flags: + description: |- + One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 type: string - default: structured_pdus - x-enum: - structured_pdus: - x-field-uid: 1 - raw_bytes: - x-field-uid: 2 + format: hex x-field-uid: 1 - enum: - - structured_pdus - - raw_bytes - structured_pdus: + local_ipv6_address: + description: |- + Local IPv6 Address. + type: string + format: ipv6 x-field-uid: 2 - $ref: '#/components/schemas/Bgp.StructuredPdus' - raw_bytes: + remote_ipv6_address: + description: |- + Remote IPv6 Address. + type: string + format: ipv6 x-field-uid: 3 - $ref: '#/components/schemas/Bgp.RawBytes' - Bgp.RawBytes: + sr_mpls_sid: + description: |- + Optional SR-MPLS SID. + $ref: '#/components/schemas/BgpSrte.SrMplsSid' + x-field-uid: 4 + BgpSrte.SegmentITypeSubTlv: description: |- - Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. - type: object - properties: - updates: - description: "Array of ordered BGP Updates ( including both Advertise and\ - \ Withdraws ) to be sent in the order given in the input to the peer after\ - \ the BGP session is established. " - type: array - items: - $ref: '#/components/schemas/Bgp.OneUpdateReplay' - x-field-uid: 1 - Bgp.OneUpdateReplay: - description: "Specification of one BGP Update to be sent to the BGP peer. \ - \ " + Type I: IPv6 Node Address with optional SRv6 SID. type: object required: - - update_bytes + - ipv6_node_address properties: - time_gap: + flags: description: |- - Minimum time interval in milliseconds from previous Update from the sequence of BGP Updates to be replayed. - type: integer - format: uint32 - default: 0 + One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + type: string + format: hex x-field-uid: 1 - update_bytes: + ipv6_node_address: description: |- - Bytes specified in hex format to be sent to peer after the BGP Update Header. The Update Header will always have the initial 16 bytes containing Marker bytes, 2 bytes containing the Length and 1 byte containing the Type.The string MUST contain sequence of valid hex bytes. The bytes specified in hex format should be appended to the Update message to be sent to the peer after the fixed 19 bytes described above. This byte stream can be of any length from 1 to 4077 bytes.The value 4077 is derived from the maximum length allowed for a BGP message in RFC4271 which is 4096 minus mandatory 19 bytes described above. In the imported byte stream, one byte is represented as string of 2 characters, for example 2 character string (0x)AB represents value of a single byte. So the maximum length of this attribute is 8154 (4077 * 2 hex characters per byte). + IPv6 address representing a node. type: string - format: hex - minLength: 1 - maxLength: 8154 + format: ipv6 x-field-uid: 2 - Bgp.StructuredPdus: + srv6_sid: + description: |- + Optional SRv6 SID. + type: string + format: ipv6 + x-field-uid: 3 + srv6_sid_endpoint_behavior: + description: |- + Optional SRv6 Endpoint Behavior and SID Structure. + $ref: '#/components/schemas/BgpSrte.SRv6SIDEndpointBehaviorAndStructure' + x-field-uid: 4 + BgpSrte.SegmentJTypeSubTlv: description: |- - Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. + Type J: IPv6 Address, Interface ID for local and remote pair for SRv6 with optional SID. type: object + required: + - local_ipv6_node_address + - remote_ipv6_node_address properties: - updates: - description: "Array of ordered BGP Updates ( including both Advertise and\ - \ Withdraws ) to be sent in the order given in the input to the peer after\ - \ the BGP session is established. " - type: array - items: - $ref: '#/components/schemas/Bgp.OneStructuredUpdateReplay' + flags: + description: |- + One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 + type: string + format: hex x-field-uid: 1 - Bgp.OneStructuredUpdateReplay: - description: "One structured BGP Update. " - type: object - properties: - time_gap: + sr_algorithm: description: |- - Minimum time interval in milliseconds from previous Update from the sequence of BGP Updates to be replayed. + SR Algorithm identifier when A-Flag in on. type: integer format: uint32 default: 0 - x-field-uid: 1 - path_attributes: - description: "Attributes carried in the Update packet alongwith the reach/unreach\ - \ prefixes. " - $ref: '#/components/schemas/Bgp.Attributes' x-field-uid: 2 - traditional_unreach_nlris: - description: "The IPv4 prefixes to be included in the traditional UNREACH_NLRI. " - type: array - items: - $ref: '#/components/schemas/Bgp.OneTraditionalNlriPrefix' - x-field-uid: 3 - traditional_reach_nlris: - description: "The IPv4 prefixes to be included in the traditional REACH_NLRI. " - type: array - items: - $ref: '#/components/schemas/Bgp.OneTraditionalNlriPrefix' - x-field-uid: 4 - Bgp.OneTraditionalNlriPrefix: - description: "TRADITIONAL_NLRI is an optional part of the the BGP Update which\ - \ can carry only IPv4 prefix information as defined in https://www.rfc-editor.org/rfc/rfc4271.html#section-4.3\ - \ \nand extended by https://datatracker.ietf.org/doc/html/rfc7911#section-3\ - \ to carry additional Path Id information per prefix." - type: object - properties: - address: + local_interface_id: description: |- - The IPv4 address of the network. - type: string - format: ipv4 - default: 0.0.0.0 - x-field-uid: 1 - prefix: - description: "The IPv4 network prefix length to be applied to the address. " + Local Interface ID: The Interface Index as defined in [RFC8664]. type: integer format: uint32 - default: 24 - maximum: 32 - x-field-uid: 2 - path_id: - $ref: '#/components/schemas/Bgp.NLRIPrefixPathId' + default: 0 x-field-uid: 3 - Bgp.OneIpv4NLRIPrefix: - description: |- - One IPv4 NLRI Prefix. - type: object - properties: - address: + local_ipv6_node_address: description: |- - The IPv4 address of the network. + IPv6 address representing a node. type: string - format: ipv4 - default: 0.0.0.0 - x-field-uid: 1 - prefix: - description: "The IPv4 network prefix length to be applied to the address. " + format: ipv6 + x-field-uid: 4 + remote_interface_id: + description: |- + Local Interface ID: The Interface Index as defined in [RFC8664]. type: integer format: uint32 - default: 24 - maximum: 32 - x-field-uid: 2 - path_id: - $ref: '#/components/schemas/Bgp.NLRIPrefixPathId' - x-field-uid: 3 - Bgp.OneIpv6NLRIPrefix: + default: 0 + x-field-uid: 5 + remote_ipv6_node_address: + description: |- + IPv6 address representing a node. + type: string + format: ipv6 + x-field-uid: 6 + srv6_sid: + description: |- + Optional SRv6 SID. + type: string + format: ipv6 + x-field-uid: 7 + srv6_sid_endpoint_behavior: + description: |- + Optional SRv6 Endpoint Behavior and SID Structure. + $ref: '#/components/schemas/BgpSrte.SRv6SIDEndpointBehaviorAndStructure' + x-field-uid: 8 + BgpSrte.SegmentKTypeSubTlv: description: |- - One IPv6 NLRI Prefix. + Type K: IPv6 Local and Remote addresses for SRv6 with optional SID. type: object + required: + - local_ipv6_address + - remote_ipv6_address properties: - address: + flags: description: |- - The IPv6 address of the network. + One octet bitmap for flags including V-Flag, A-Flag, S-Flag, B-Flag etc. as defined in https://datatracker.ietf.org/doc/html/draft-ietf-idr-segment-routing-te-policy-13#section-2.4.4.2.12 type: string - format: ipv6 - default: 0::0 + format: hex x-field-uid: 1 - prefix: - description: "The IPv6 network prefix length to be applied to the address. " + sr_algorithm: + description: |- + SR Algorithm identifier when A-Flag in on. type: integer format: uint32 - default: 64 - maximum: 128 + default: 0 x-field-uid: 2 - path_id: - $ref: '#/components/schemas/Bgp.NLRIPrefixPathId' + local_ipv6_address: + description: |- + IPv6 address representing a node. + type: string + format: ipv6 x-field-uid: 3 - Bgp.NLRIPrefixPathId: - description: |- - Optional field in the NLRI carrying Path Id of the prefix. + remote_ipv6_address: + description: |- + IPv6 address representing a node. + type: string + format: ipv6 + x-field-uid: 4 + srv6_sid: + description: |- + Optional SRv6 SID. + type: string + format: ipv6 + x-field-uid: 5 + srv6_sid_endpoint_behavior: + description: |- + Optional SRv6 Endpoint Behavior and SID Structure. + $ref: '#/components/schemas/BgpSrte.SRv6SIDEndpointBehaviorAndStructure' + x-field-uid: 6 + BgpSrte.V6Policy: + description: | + Configuration for BGP Segment Routing Traffic Engineering policy. type: object + required: + - ipv6_endpoint + - name properties: - value: - description: "The value of the optional Path ID of the prefix. " + distinguisher: + description: |- + Identifies the policy in the context of (color and endpoint) tuple. It is used by the SR Policy originator to make unique multiple occurrences of the same SR Policy. type: integer format: uint32 default: 1 x-field-uid: 1 - Bgp.Attributes: - description: |- - Attributes carried in the Update packet alongwith the reach/unreach prefixes. - type: object - properties: - other_attributes: - description: "Any attributes not present in the list of configurable attributes\ - \ should be added to the list of unknown attributes. " - type: array - items: - $ref: '#/components/schemas/Bgp.Attributes.OtherAttribute' - x-field-uid: 1 - origin: - description: "The ORIGIN attribute is a mandatory attribute which can take\ - \ three values: \nthe prefix originates from an interior routing protocol\ - \ 'igp', it originates from 'egp' \nor the origin is 'incomplete',if the\ - \ prefix is learned through other means. " - type: string - default: incomplete + color: + description: "Identifies the policy. It is used to match the color of the\ + \ destination prefixes to steer traffic into the SR Policy. " + type: integer + format: uint32 + default: 100 x-field-uid: 2 + ipv6_endpoint: + description: |- + Specifies a single node or a set of nodes (e.g., an anycast address). It is selected on the basis of the SR Policy type (AFI). + type: string + format: ipv6 + x-field-uid: 3 + next_hop_mode: + description: |- + Mode for choosing the NextHop in MP REACH NLRI. Available modes are : Local IP: Automatically fills the Nexthop with the Local IP of the BGP peer. For IPv6 BGP peer the Nexthop Encoding capability should be enabled. Manual: Override the Nexthop with any arbitrary IPv4/IPv6 address. + type: string + default: local_ip + x-field-uid: 4 x-enum: - igp: + local_ip: x-field-uid: 1 - egp: + manual: x-field-uid: 2 - incomplete: - x-field-uid: 3 enum: - - igp - - egp - - incomplete - as_path: - description: "AS_PATH attribute to be included in the Update. " - $ref: '#/components/schemas/Bgp.Attributes.AsPath' - x-field-uid: 3 - as4_path: - description: "AS4_PATH attribute to be included in the Update. \ - \ " - $ref: '#/components/schemas/Bgp.Attributes.As4Path' - x-field-uid: 4 - next_hop: - $ref: '#/components/schemas/Bgp.Attributes.NextHop' + - local_ip + - manual + next_hop_address_type: + description: "Type of next hop IP address to be used when 'next_hop_mode'\ + \ is set to 'manual'. " + type: string + default: ipv6 x-field-uid: 5 - multi_exit_discriminator: - $ref: '#/components/schemas/Bgp.Attributes.MultiExitDiscriminator' + x-enum: + ipv4: + x-field-uid: 1 + ipv6: + x-field-uid: 2 + enum: + - ipv4 + - ipv6 + next_hop_ipv4_address: + description: |- + The IPv4 address of the Nexthop if the 'next_hop_mode' is 'manual' and the Nexthop type 'next_hop_address_type' is IPv4. If BGP peer is of type IPv6, Nexthop Encoding capability extended_next_hop_encoding should be enabled. + type: string + format: ipv4 + default: 0.0.0.0 x-field-uid: 6 - local_preference: - $ref: '#/components/schemas/Bgp.Attributes.LocalPreference' + next_hop_ipv6_address: + description: "The IPv6 address of the next hop if the Nexthop Mode 'next_hop_address_type'\ + \ is 'manual' and the Nexthop type 'next_hop_address_type' is IPv6. " + type: string + format: ipv6 + default: ::0 x-field-uid: 7 - include_atomic_aggregator: - description: "If enabled, it indicates that the ATOMIC_AGGREGATOR attribute\ - \ should be included in the Update.\nPresence of this attribute Indicates\ - \ that this route might not be getting sent on a fully optimized path\ - \ \nsince some intermediate BGP speaker has aggregated the route. \ - \ " - type: boolean - default: false + advanced: + $ref: '#/components/schemas/Bgp.RouteAdvanced' x-field-uid: 8 - aggregator: - $ref: '#/components/schemas/Bgp.Attributes.Aggregator' + add_path: + $ref: '#/components/schemas/Bgp.AddPath' x-field-uid: 9 - as4_aggregator: - $ref: '#/components/schemas/Bgp.Attributes.As4Aggregator' + as_path: + $ref: '#/components/schemas/Bgp.AsPath' x-field-uid: 10 - community: + communities: + description: |- + Optional community settings. type: array items: - $ref: '#/components/schemas/Bgp.Attributes.Community' + $ref: '#/components/schemas/Bgp.Community' x-field-uid: 11 - originator_id: - $ref: '#/components/schemas/Bgp.Attributes.OriginatorId' - x-field-uid: 12 - cluster_ids: - description: "When a Route Reflector reflects a route, it prepends the local\ - \ CLUSTER_ID to the CLUSTER_LIST as defined in RFC4456. " + extcommunities: + description: |- + Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. type: array items: - type: string - format: ipv4 - default: 0.0.0.0 - x-field-uid: 13 - extended_communities: - description: "Optional EXTENDED_COMMUNITY attribute settings.\nThe EXTENDED_COMMUNITY\ - \ Attribute is a transitive optional BGP attribute, with the Type Code\ - \ 16. Community and Extended Communities attributes\nare utilized to\ - \ trigger routing decisions, such as acceptance, rejection, preference,\ - \ or redistribution. An extended community is an eight byte value.\nIt\ - \ is divided into two main parts. The first two bytes of the community\ - \ encode a type and sub-type fields and the last six bytes carry a unique\ - \ set\nof data in a format defined by the type and sub-type field. Extended\ - \ communities provide a larger range for grouping or categorizing communities.\ - \ " + $ref: '#/components/schemas/Bgp.ExtCommunity' + x-field-uid: 12 + tunnel_tlvs: + description: |- + List of optional tunnel TLV settings. type: array items: - $ref: '#/components/schemas/Bgp.ExtendedCommunity' + $ref: '#/components/schemas/BgpSrte.V6TunnelTlv' + x-field-uid: 13 + name: x-field-uid: 14 - mp_reach: - $ref: '#/components/schemas/Bgp.Attributes.MpReachNlri' - x-field-uid: 16 - mp_unreach: - $ref: '#/components/schemas/Bgp.Attributes.MpUnreachNlri' - x-field-uid: 17 - Bgp.Attributes.OtherAttribute: + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + active: + x-field-uid: 15 + description: |- + If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. + type: boolean + default: true + BgpSrte.V6TunnelTlv: description: |- - One unknown attribute stored as hex bytes. + Configuration for BGP SRTE Tunnel TLV. type: object + properties: + remote_endpoint_sub_tlv: + $ref: '#/components/schemas/BgpSrte.RemoteEndpointSubTlv' + x-field-uid: 1 + color_sub_tlv: + $ref: '#/components/schemas/BgpSrte.ColorSubTlv' + x-field-uid: 2 + binding_sub_tlv: + $ref: '#/components/schemas/BgpSrte.BindingSubTlv' + x-field-uid: 3 + preference_sub_tlv: + $ref: '#/components/schemas/BgpSrte.PreferenceSubTlv' + x-field-uid: 4 + policy_priority_sub_tlv: + $ref: '#/components/schemas/BgpSrte.PolicyPrioritySubTlv' + x-field-uid: 5 + policy_name_sub_tlv: + $ref: '#/components/schemas/BgpSrte.PolicyNameSubTlv' + x-field-uid: 6 + explicit_null_label_policy_sub_tlv: + $ref: '#/components/schemas/BgpSrte.ExplicitNullLabelPolicySubTlv' + x-field-uid: 7 + segment_lists: + type: array + items: + $ref: '#/components/schemas/BgpSrte.SegmentList' + x-field-uid: 8 + name: + x-field-uid: 9 + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + active: + x-field-uid: 10 + description: |- + If enabled means that this part of the configuration including any active 'children' nodes will be advertised to peer. If disabled, this means that though config is present, it is not taking any part of the test but can be activated at run-time to advertise just this part of the configuration to the peer. + type: boolean + default: true required: - - type - - raw_value + - name + Bgp.GracefulRestart: + description: |- + The Graceful Restart Capability (RFC 4724) is a BGP capability that can be used by a BGP speaker to indicate its ability to preserve its forwarding state during BGP restart. The Graceful Restart (GR) capability is advertised in OPEN messages sent between BGP peers. After a BGP session has been established, and the initial routing update has been completed, an End-of-RIB (Routing Information Base) marker is sent in an UPDATE message to convey information about routing convergence. + type: object properties: - flag_optional: + enable_gr: description: |- - Optional flag in the BGP attribute. + If enabled, Graceful Restart capability is advertised in BGP OPEN messages. type: boolean default: false x-field-uid: 1 - flag_transitive: + restart_time: description: |- - Transitive flag in the BGP attribute. - type: boolean - default: false + This is the estimated duration (in seconds) it will take for the BGP session to be re-established after a restart. This can be used to speed up routing convergence by its peer in case the BGP speaker does not come back after a restart. + type: integer + format: uint32 + maximum: 4096 + default: 45 x-field-uid: 2 - flag_partial: - description: |- - Partial flag in the BGP attribute. + enable_llgr: + description: "If enabled, the \"Long-lived Graceful Restart Capability\"\ + , or \"LLGR Capability\"\nwill be advertised.\nThis capability MUST be\ + \ advertised in conjunction with the Graceful Restart \ncapability." type: boolean default: false x-field-uid: 3 - flag_extended_length: - description: |- - Extended length flag in the BGP attribute. - type: boolean - default: false - x-field-uid: 4 - type: - description: |- - The value of the Type field in the attribute. + stale_time: + description: "Duration (in seconds) specifying how long stale information\ + \ (for the AFI/SAFI) \nmay be retained. This is a three byte field and\ + \ is applicable \nonly if 'enable_llgr' is set to 'true'." type: integer format: uint32 + maximum: 16777215 + default: 10 + x-field-uid: 4 + enable_notification: + description: "If enabled, the N flag will be set in the Graceful Restart\ + \ capability in the Open message. \nIf both peers in a BGP connection\ + \ has this enabled, Graceful Restart procedures are performed\neven if\ + \ the peer goes down due to sending of a Notification Message as per RFC8538." + type: boolean + default: true x-field-uid: 5 - raw_value: - description: "Contents of the value field ( the contents after the initial\ - \ two bytes containing the Flags and Type field ) of the attribute in\ - \ hex bytes. \nIt includes the contents of length of the extended length\ - \ field if included." - type: string - format: hex - x-field-uid: 6 - Bgp.Attributes.AsPath: + Bgp.UpdateReplay: description: |- - The AS_PATH attribute identifies the autonomous systems through which routing information - carried in this UPDATE message has passed. - This contains the configuration of how to include the Local AS in the AS path - attribute of the MP REACH NLRI. It also contains optional configuration of - additional AS Path Segments that can be included in the AS Path attribute. - The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that - a routing information passes through to reach the destination. - There are two modes in which AS numbers can be encoded in the AS Path Segments - - When the AS Path is being exchanged between old and new BGP speakers or between two old BGP speakers , the AS numbers are encoded as 2 byte values. - - When the AS Path is being exchanged between two new BGP speakers supporting 4 byte AS , the AS numbers are encoded as 4 byte values. + Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. type: object properties: choice: type: string - default: four_byte_as_path + default: structured_pdus x-enum: - four_byte_as_path: + structured_pdus: x-field-uid: 1 - two_byte_as_path: + raw_bytes: x-field-uid: 2 x-field-uid: 1 enum: - - four_byte_as_path - - two_byte_as_path - four_byte_as_path: + - structured_pdus + - raw_bytes + structured_pdus: x-field-uid: 2 - $ref: '#/components/schemas/Bgp.Attributes.AsPath.FourByteAsPath' - two_byte_as_path: + $ref: '#/components/schemas/Bgp.StructuredPdus' + raw_bytes: x-field-uid: 3 - $ref: '#/components/schemas/Bgp.Attributes.AsPath.TwoByteAsPath' - Bgp.Attributes.AsPath.FourByteAsPath: + $ref: '#/components/schemas/Bgp.RawBytes' + Bgp.RawBytes: description: |- - AS Paths with 4 byte AS numbers can be exchanged only if both BGP speakers support 4 byte AS number extensions. + Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. type: object properties: - segments: - description: "The AS path segments containing 4 byte AS numbers to be added\ - \ in the AS Path attribute. By default, an empty AS path should always\ - \ be included and for EBGP at minimum the local AS number should be present\ - \ in the AS Path. " + updates: + description: "Array of ordered BGP Updates ( including both Advertise and\ + \ Withdraws ) to be sent in the order given in the input to the peer after\ + \ the BGP session is established. " type: array items: - $ref: '#/components/schemas/Bgp.Attributes.FourByteAsPathSegment' + $ref: '#/components/schemas/Bgp.OneUpdateReplay' x-field-uid: 1 - Bgp.Attributes.FourByteAsPathSegment: - description: |- - Configuration for a single BGP AS path segment containing 4 byte AS numbers. + Bgp.OneUpdateReplay: + description: "Specification of one BGP Update to be sent to the BGP peer. \ + \ " type: object + required: + - update_bytes properties: - type: + time_gap: description: |- - AS sequence is the most common type of AS_PATH, it contains the list - of ASNs starting with the most recent ASN being added read from left - to right. - The other three AS_PATH types are used for Confederations - - AS_SET is the type of AS_PATH attribute that summarizes routes using - using the aggregate-address command, allowing AS_PATHs to be summarized - in the update as well. - - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most - recent ASN to be added reading left to right - - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent - in BGP Updates. - type: string - default: as_seq + Minimum time interval in milliseconds from previous Update from the sequence of BGP Updates to be replayed. + type: integer + format: uint32 + default: 0 x-field-uid: 1 - x-enum: - as_seq: - x-field-uid: 1 - as_set: - x-field-uid: 2 - as_confed_seq: - x-field-uid: 3 - as_confed_set: - x-field-uid: 4 - enum: - - as_seq - - as_set - - as_confed_seq - - as_confed_set - as_numbers: + update_bytes: description: |- - The 4 byte AS numbers in this AS path segment. - type: array - items: - type: integer - format: uint32 - default: 1 + Bytes specified in hex format to be sent to peer after the BGP Update Header. The Update Header will always have the initial 16 bytes containing Marker bytes, 2 bytes containing the Length and 1 byte containing the Type.The string MUST contain sequence of valid hex bytes. The bytes specified in hex format should be appended to the Update message to be sent to the peer after the fixed 19 bytes described above. This byte stream can be of any length from 1 to 4077 bytes.The value 4077 is derived from the maximum length allowed for a BGP message in RFC4271 which is 4096 minus mandatory 19 bytes described above. In the imported byte stream, one byte is represented as string of 2 characters, for example 2 character string (0x)AB represents value of a single byte. So the maximum length of this attribute is 8154 (4077 * 2 hex characters per byte). + type: string + format: hex + minLength: 1 + maxLength: 8154 x-field-uid: 2 - Bgp.Attributes.AsPath.TwoByteAsPath: + Bgp.StructuredPdus: description: |- - AS Paths with 2 byte AS numbers is used when any of the two scenarios occur : - - An old BGP speaker and new BGP speaker are sending BGP Updates to one another. - - Two old BGP speakers are sending BGP Updates to one another. + Ordered BGP Updates ( including both Advertise and Withdraws ) to be sent in the order given in the input to the peer after the BGP session is established. type: object properties: - segments: - description: "The AS path segments containing 2 byte AS numbers to be added\ - \ in the AS Path attribute. By default, an empty AS path should always\ - \ be included and for EBGP the sender's AS number should be prepended\ - \ to the AS Path. " + updates: + description: "Array of ordered BGP Updates ( including both Advertise and\ + \ Withdraws ) to be sent in the order given in the input to the peer after\ + \ the BGP session is established. " type: array items: - $ref: '#/components/schemas/Bgp.Attributes.TwoByteAsPathSegment' + $ref: '#/components/schemas/Bgp.OneStructuredUpdateReplay' x-field-uid: 1 - Bgp.Attributes.TwoByteAsPathSegment: - description: |- - Configuration for a single BGP AS path segment containing 2 byte AS numbers. + Bgp.OneStructuredUpdateReplay: + description: "One structured BGP Update. " type: object properties: - type: + time_gap: description: |- - AS sequence is the most common type of AS_PATH, it contains the list - of ASNs starting with the most recent ASN being added read from left - to right. - The other three AS_PATH types are used for Confederations - - AS_SET is the type of AS_PATH attribute that summarizes routes using - using the aggregate-address command, allowing AS_PATHs to be summarized - in the update as well. - - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most - recent ASN to be added reading left to right - - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent - in BGP Updates. - type: string - default: as_seq + Minimum time interval in milliseconds from previous Update from the sequence of BGP Updates to be replayed. + type: integer + format: uint32 + default: 0 x-field-uid: 1 - x-enum: - as_seq: - x-field-uid: 1 - as_set: - x-field-uid: 2 - as_confed_seq: - x-field-uid: 3 - as_confed_set: - x-field-uid: 4 - enum: - - as_seq - - as_set - - as_confed_seq - - as_confed_set - as_numbers: - description: |- - The 2 byte AS numbers in this AS path segment. + path_attributes: + description: "Attributes carried in the Update packet alongwith the reach/unreach\ + \ prefixes. " + $ref: '#/components/schemas/Bgp.Attributes' + x-field-uid: 2 + traditional_unreach_nlris: + description: "The IPv4 prefixes to be included in the traditional UNREACH_NLRI. " type: array items: - type: integer - format: uint32 - default: 1 - maximum: 65535 - x-field-uid: 2 - Bgp.Attributes.As4Path: - description: |- - The AS4_PATH attribute identifies the autonomous systems through which routing information - carried in this UPDATE message has passed. - This contains the configuration of how to include the Local AS in the AS path - attribute of the MP REACH NLRI. It also contains optional configuration of - additional AS Path Segments that can be included in the AS Path attribute. - The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that - a routing information passes through to reach the destination. - AS4_PATH is only exchanged in two scenarios: - - When an old BGP speaker has to forward a received AS4_PATH containing 4 byte AS numbers to new BGP speaker. - - When a new BGP speaker is connected to an old BGP speaker and has to propagate 4 byte AS numbers via the old BGP speaker. - Its usage is described in RFC4893. - type: object - properties: - segments: - description: |- - The AS path segments containing 4 byte AS numbers to be added in the AS4_PATH attribute. + $ref: '#/components/schemas/Bgp.OneTraditionalNlriPrefix' + x-field-uid: 3 + traditional_reach_nlris: + description: "The IPv4 prefixes to be included in the traditional REACH_NLRI. " type: array items: - $ref: '#/components/schemas/Bgp.Attributes.FourByteAsPathSegment' - x-field-uid: 1 - Bgp.Attributes.Aggregator: - description: "Optional AGGREGATOR attribute which maybe be added by a BGP speaker\ - \ which performs route aggregation.\nWhen AGGREGATOR attribute is being sent\ - \ to a new BGP speaker , the AS number is encoded as a 4 byte value.\nWhen\ - \ AGGREGATOR attribute is being exchanged between a new and an old BGP speaker\ - \ or between two old BGP speakers, \nthe AS number is encoded as a 2 byte\ - \ value.\nIt contain the AS number and IP address of the speaker performing\ - \ the aggregation. " + $ref: '#/components/schemas/Bgp.OneTraditionalNlriPrefix' + x-field-uid: 4 + Bgp.OneTraditionalNlriPrefix: + description: "TRADITIONAL_NLRI is an optional part of the the BGP Update which\ + \ can carry only IPv4 prefix information as defined in https://www.rfc-editor.org/rfc/rfc4271.html#section-4.3\ + \ \nand extended by https://datatracker.ietf.org/doc/html/rfc7911#section-3\ + \ to carry additional Path Id information per prefix." type: object properties: - choice: + address: + description: |- + The IPv4 address of the network. type: string - default: four_byte_as - x-enum: - four_byte_as: - x-field-uid: 1 - two_byte_as: - x-field-uid: 2 + format: ipv4 + default: 0.0.0.0 x-field-uid: 1 - enum: - - four_byte_as - - two_byte_as - four_byte_as: - description: |- - The value of the 4 byte AS number of the BGP speaker which aggregated the route. If the value of the AS number is less than 2 octets ( 65535 or less), the AS4_AGGREGATOR object should not be sent. + prefix: + description: "The IPv4 network prefix length to be applied to the address. " type: integer format: uint32 - default: 65536 + default: 24 + maximum: 32 x-field-uid: 2 - two_byte_as: - description: "The value of the 2 byte AS number of the BGP speaker which\ - \ aggregated the route. " - type: integer - format: uint32 - default: 1 - maximum: 65535 + path_id: + $ref: '#/components/schemas/Bgp.NLRIPrefixPathId' x-field-uid: 3 - ipv4_address: - description: "The IPv4 address of the BGP speaker which aggregated the route.\ - \ " + Bgp.OneIpv4NLRIPrefix: + description: |- + One IPv4 NLRI Prefix. + type: object + properties: + address: + description: |- + The IPv4 address of the network. type: string format: ipv4 default: 0.0.0.0 - x-field-uid: 4 - Bgp.Attributes.As4Aggregator: - description: "Optional AS4_AGGREGATOR attribute which maybe be added by a BGP\ - \ speaker in one of two cases:\n- If it is a new BGP speaker speaking to an\ - \ old BGP speaker and needs to send a 4 byte value for the AS number of the\ - \ BGP route aggregator.\n- If it is a old BGP speaker speaking to a new BGP\ - \ speaker and has to transparently forward a received AS4_AGGREGATOR from\ - \ some other peer.\nIts usage is described in RFC4893. " - type: object - properties: - as_num: - description: "The value of the 4 byte AS number of the BGP speaker which\ - \ aggregated the route. " + x-field-uid: 1 + prefix: + description: "The IPv4 network prefix length to be applied to the address. " type: integer format: uint32 - x-field-uid: 1 - ipv4_address: - description: "The IPv4 address of the BGP speaker which aggregated the route.\ - \ " - type: string - format: ipv4 - default: 0.0.0.0 + default: 24 + maximum: 32 x-field-uid: 2 - Bgp.Attributes.Community: - description: "The COMMUNITY attribute provide additional capability for tagging\ - \ routes and for modifying BGP routing policy on \nupstream and downstream\ - \ routers. BGP community is a 32-bit number which is broken into 16-bit AS\ - \ number and a \n16-bit custom value or it contains some pre-defined well\ - \ known values. " + path_id: + $ref: '#/components/schemas/Bgp.NLRIPrefixPathId' + x-field-uid: 3 + Bgp.OneIpv6NLRIPrefix: + description: |- + One IPv6 NLRI Prefix. type: object - required: - - choice properties: - choice: - description: "The type of community AS number. " + address: + description: |- + The IPv6 address of the network. type: string + format: ipv6 + default: 0::0 x-field-uid: 1 - x-enum: - custom_community: - x-field-uid: 1 - no_export: - x-field-uid: 2 - no_advertised: - x-field-uid: 3 - no_export_subconfed: - x-field-uid: 4 - llgr_stale: - x-field-uid: 5 - no_llgr: - x-field-uid: 6 - enum: - - custom_community - - no_export - - no_advertised - - no_export_subconfed - - llgr_stale - - no_llgr - custom_community: - $ref: '#/components/schemas/Bgp.Attributes.CustomCommunity' + prefix: + description: "The IPv6 network prefix length to be applied to the address. " + type: integer + format: uint32 + default: 64 + maximum: 128 x-field-uid: 2 - Bgp.Attributes.CustomCommunity: - description: "User defined COMMUNITY attribute containing 2 byte AS and custom\ - \ 2 byte value defined by the administrator of the domain. " + path_id: + $ref: '#/components/schemas/Bgp.NLRIPrefixPathId' + x-field-uid: 3 + Bgp.NLRIPrefixPathId: + description: |- + Optional field in the NLRI carrying Path Id of the prefix. type: object properties: - as_number: - description: |- - First two octets of the community value containing a 2 byte AS number. + value: + description: "The value of the optional Path ID of the prefix. " type: integer format: uint32 - maximum: 65535 - default: 0 + default: 1 x-field-uid: 1 - custom: - description: |- - Last two octets of the community value in hex. If user provides less than 4 hex bytes, it should be left-padded with 0s. - type: string - format: hex - default: '0000' - maxLength: 4 - x-field-uid: 2 - Bgp.Attributes.NextHop: - description: "Next hop to be sent inside MP_REACH NLRI or as the NEXT_HOP attribute\ - \ if advertised as traditional NLRI. " + Bgp.Ipv4SrPolicyNLRIPrefix: + description: |- + IPv4 Segment Routing Policy NLRI Prefix. type: object - required: - - choice properties: - choice: - description: "The type of the next HOP. " - type: string + distinguisher: + description: "The 4-octet value uniquely identifying the policy in the context\ + \ of tuple. The distinguisher has no semantic value\ + \ and is solely used by the SR Policy originator to make unique (from\ + \ an NLRI perspective) both for multiple candidate paths of the same\ + \ SR Policy as well as candidate paths of different SR Policies (i.e.\ + \ with different segment lists) with the same Color and Endpoint but meant\ + \ for different headends. " + type: integer + format: uint32 + default: 1 x-field-uid: 1 - x-enum: - ipv4: - x-field-uid: 1 - ipv6: - x-field-uid: 2 - ipv6_two_addresses: - x-field-uid: 3 - enum: - - ipv4 - - ipv6 - - ipv6_two_addresses - ipv4: + color: description: |- - The 4 byte IPv4 address of the next-hop from which the route was received. - type: string - format: ipv4 - default: 0.0.0.0 + 4-octet value identifying (with the endpoint) the policy. The color is used to match the color of the destination prefixes to steer traffic into the SR Policy as specified in section 8 of RFC9256. + type: integer + format: uint32 + default: 1 x-field-uid: 2 - ipv6: + endpoint: description: |- - The 16 byte IPv6 address of the next-hop from which the route was received. + Identifies the endpoint of a policy. The Endpoint is an IPv4 address and can be either a unicast or an unspecified address (0.0.0.0) as specified in section 2.1 of RFC9256. type: string - format: ipv6 - default: 0::0 + format: ipv4 + default: 0.0.0.0 x-field-uid: 3 - ipv6_two_addresses: - x-field-uid: 4 - $ref: '#/components/schemas/Bgp.Attributes.NextHop.Ipv6TwoAddresses' - Bgp.Attributes.NextHop.Ipv6TwoAddresses: - description: "There is a specific scenario in which it is possible to receive\ - \ a Global and Link Local address in the Next Hop \nfield in a MP_REACH attribute\ - \ or in the NEXT_HOP attribute(RFC2545: Section 3). " + Bgp.Ipv6SrPolicyNLRIPrefix: + description: |- + One IPv6 Segment Routing Policy NLRI Prefix. type: object properties: - first: - description: |- - The first IPv6 next hop in the 32 byte IPv6 Next Hop. - type: string - format: ipv6 - default: 0::0 + distinguisher: + description: "The 4-octet value uniquely identifying the policy in the context\ + \ of tuple. The distinguisher has no semantic value\ + \ and is solely used by the SR Policy originator to make unique (from\ + \ an NLRI perspective) both for multiple candidate paths of the same\ + \ SR Policy as well as candidate paths of different SR Policies (i.e.\ + \ with different segment lists) with the same Color and Endpoint but meant\ + \ for different headends. " + type: integer + format: uint32 + default: 1 x-field-uid: 1 - second: + color: description: |- - The second IPv6 next hop in the 32 byte IPv6 Next Hop. + 4-octet value identifying (with the endpoint) the policy. The color is used to match the color of the destination prefixes to steer traffic into the SR Policy as specified in section 8 of RFC9256. + type: integer + format: uint32 + default: 1 + x-field-uid: 2 + endpoint: + description: |- + Identifies the endpoint of a policy. The Endpoint may represent a single node or a set of nodes (e.g., an anycast address). The Endpoint is an IPv6 address and can be either a unicast or an unspecified address (0::0) as specified in section 2.1 of RFC9256. type: string format: ipv6 default: 0::0 - x-field-uid: 2 - Bgp.Attributes.MpReachNlri: - description: "The MP_REACH attribute is an optional attribute which can be included\ - \ in the attributes of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3.\n\ - The following AFI / SAFI combinations are supported:\n- IPv4 Unicast with\ - \ AFI as 1 and SAFI as 1 \n- IPv6 Unicast with AFI as 2 and SAFI as 1 " + x-field-uid: 3 + Bgp.Attributes: + description: |- + Attributes carried in the Update packet alongwith the reach/unreach prefixes. type: object - required: - - choice properties: - next_hop: - $ref: '#/components/schemas/Bgp.Attributes.NextHop' + other_attributes: + description: "Any attributes not present in the list of configurable attributes\ + \ should be added to the list of unknown attributes. " + type: array + items: + $ref: '#/components/schemas/Bgp.Attributes.OtherAttribute' x-field-uid: 1 - choice: - description: "The AFI and SAFI to be sent in the MPREACH_NLRI in the Update.\ - \ " + origin: + description: "The ORIGIN attribute is a mandatory attribute which can take\ + \ three values: \nthe prefix originates from an interior routing protocol\ + \ 'igp', it originates from 'egp' \nor the origin is 'incomplete',if the\ + \ prefix is learned through other means. " type: string + default: incomplete x-field-uid: 2 x-enum: - ipv4_unicast: + igp: x-field-uid: 1 - ipv6_unicast: + egp: x-field-uid: 2 + incomplete: + x-field-uid: 3 enum: - - ipv4_unicast - - ipv6_unicast - ipv4_unicast: - description: |- - List of IPv4 prefixes being sent in the IPv4 Unicast MPREACH_NLRI . + - igp + - egp + - incomplete + as_path: + description: "AS_PATH attribute to be included in the Update. " + $ref: '#/components/schemas/Bgp.Attributes.AsPath' + x-field-uid: 3 + as4_path: + description: "AS4_PATH attribute to be included in the Update. \ + \ " + $ref: '#/components/schemas/Bgp.Attributes.As4Path' + x-field-uid: 4 + next_hop: + $ref: '#/components/schemas/Bgp.Attributes.NextHop' + x-field-uid: 5 + multi_exit_discriminator: + $ref: '#/components/schemas/Bgp.Attributes.MultiExitDiscriminator' + x-field-uid: 6 + local_preference: + $ref: '#/components/schemas/Bgp.Attributes.LocalPreference' + x-field-uid: 7 + include_atomic_aggregator: + description: "If enabled, it indicates that the ATOMIC_AGGREGATOR attribute\ + \ should be included in the Update.\nPresence of this attribute Indicates\ + \ that this route might not be getting sent on a fully optimized path\ + \ \nsince some intermediate BGP speaker has aggregated the route. \ + \ " + type: boolean + default: false + x-field-uid: 8 + aggregator: + $ref: '#/components/schemas/Bgp.Attributes.Aggregator' + x-field-uid: 9 + as4_aggregator: + $ref: '#/components/schemas/Bgp.Attributes.As4Aggregator' + x-field-uid: 10 + community: type: array items: - $ref: '#/components/schemas/Bgp.OneIpv4NLRIPrefix' - x-field-uid: 3 - ipv6_unicast: - description: |- - SAFI of the NLRI being sent in the Update. - description: >- - List of IPv6 prefixes being sent in the IPv6 Unicast MPREACH_NLRI . + $ref: '#/components/schemas/Bgp.Attributes.Community' + x-field-uid: 11 + originator_id: + $ref: '#/components/schemas/Bgp.Attributes.OriginatorId' + x-field-uid: 12 + cluster_ids: + description: "When a Route Reflector reflects a route, it prepends the local\ + \ CLUSTER_ID to the CLUSTER_LIST as defined in RFC4456. " type: array items: - $ref: '#/components/schemas/Bgp.OneIpv6NLRIPrefix' - x-field-uid: 4 - Bgp.Attributes.MpUnreachNlri: - description: "The MP_UNREACH attribute is an optional attribute which can be\ - \ included in the attributes of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3.\n\ - The following AFI / SAFI combinations are supported:\n- IPv4 Unicast with\ - \ AFI as 1 and SAFI as 1 \n- IPv6 Unicast with AFI as 2 and SAFI as 1 " - type: object - properties: - choice: - description: "The AFI and SAFI to be sent in the MPUNREACH_NLRI in the Update.\ - \ " - type: string - x-field-uid: 1 - x-enum: - ipv4_unicast: - x-field-uid: 1 - ipv6_unicast: - x-field-uid: 2 - enum: - - ipv4_unicast - - ipv6_unicast - ipv4_unicast: - description: |- - List of IPv4 prefixes being sent in the IPv4 Unicast MPUNREACH_NLRI . - type: array - items: - $ref: '#/components/schemas/Bgp.OneIpv4NLRIPrefix' - x-field-uid: 2 - ipv6_unicast: - description: |- - SAFI of the NLRI being sent in the Update. - description: >- - List of IPv6 prefixes being sent in the IPv6 Unicast MPUNREACH_NLRI . + type: string + format: ipv4 + default: 0.0.0.0 + x-field-uid: 13 + extended_communities: + description: "Optional EXTENDED_COMMUNITY attribute settings.\nThe EXTENDED_COMMUNITY\ + \ Attribute is a transitive optional BGP attribute, with the Type Code\ + \ 16. Community and Extended Communities attributes\nare utilized to\ + \ trigger routing decisions, such as acceptance, rejection, preference,\ + \ or redistribution. An extended community is an eight byte value.\nIt\ + \ is divided into two main parts. The first two bytes of the community\ + \ encode a type and sub-type fields and the last six bytes carry a unique\ + \ set\nof data in a format defined by the type and sub-type field. Extended\ + \ communities provide a larger range for grouping or categorizing communities.\ + \ " type: array items: - $ref: '#/components/schemas/Bgp.OneIpv6NLRIPrefix' - x-field-uid: 3 - Bgp.Attributes.MultiExitDiscriminator: - description: "Optional MULTI_EXIT_DISCRIMINATOR attribute sent to the peer to\ - \ help in the route selection process. " - properties: - value: - description: "The multi exit discriminator (MED) value used for route selection\ - \ sent to the peer. " - type: integer - format: uint32 - default: 0 - x-field-uid: 1 - Bgp.Attributes.LocalPreference: - description: "Optional LOCAL_PREFERENCE attribute sent to the peer to indicate\ - \ the degree of preference \nfor externally learned routes.This should be\ - \ included only for internal peers.It is \nused for the selection of the path\ - \ for the traffic leaving the AS.The route with the \nhighest local preference\ - \ value is preferred." - properties: - value: - description: "Value to be set in the LOCAL_PREFERENCE attribute The multi\ - \ exit discriminator (MED) value used for route selection sent to the\ - \ peer. " - type: integer - format: uint32 - default: 100 - x-field-uid: 1 - Bgp.Attributes.OriginatorId: - description: |- - Optional ORIGINATOR_ID attribute (type code 9) carries the Router Id of the route's originator in the local AS. - properties: - value: - description: "The value of the originator's Router Id. " - type: string - format: ipv4 - default: 0.0.0.0 - x-field-uid: 1 - Bgp.V6Peer: + $ref: '#/components/schemas/Bgp.ExtendedCommunity' + x-field-uid: 14 + tunnel_encapsulation: + $ref: '#/components/schemas/Bgp.Attributes.TunnelEncapsulation' + x-field-uid: 15 + mp_reach: + $ref: '#/components/schemas/Bgp.Attributes.MpReachNlri' + x-field-uid: 16 + mp_unreach: + $ref: '#/components/schemas/Bgp.Attributes.MpUnreachNlri' + x-field-uid: 17 + Bgp.Attributes.OtherAttribute: description: |- - Configuration for BGPv6 peer settings and routes. + One unknown attribute stored as hex bytes. type: object required: - - peer_address - - as_type - - as_number - - name + - type + - raw_value properties: - peer_address: + flag_optional: description: |- - IPv6 address of the BGP peer for the session - type: string - format: ipv6 + Optional flag in the BGP attribute. + type: boolean + default: false x-field-uid: 1 - segment_routing: - $ref: '#/components/schemas/Bgp.V6SegmentRouting' + flag_transitive: + description: |- + Transitive flag in the BGP attribute. + type: boolean + default: false x-field-uid: 2 - evpn_ethernet_segments: - description: "This contains the list of Ethernet Virtual Private Network\ - \ (EVPN) Ethernet Segments (ES) Per BGP Peer for IPv6 Address Family Identifier\ - \ (AFI).\n\nEach Ethernet Segment contains a list of EVPN Instances (EVIs)\ - \ . \nEach EVI contains a list of Broadcast Domains. \nEach Broadcast\ - \ Domain contains a list of MAC/IP Ranges. \n\n is responsible for advertising Ethernet Auto-discovery\ - \ Route Per EVI (Type 1).\n\n is responsible for\ - \ advertising Ethernet Auto-discovery Route Per Ethernet Segment (Type\ - \ 1).\n\n is responsible\ - \ for advertising MAC/IP Advertisement Route (Type 2).\n\n is responsible for advertising Inclusive Multicast\ - \ Ethernet Tag Route (Type 3).\n\nEthernet Segment is responsible for\ - \ advertising Ethernet Segment Route (Type 4)." - type: array - items: - $ref: '#/components/schemas/BgpV6.EthernetSegment' + flag_partial: + description: |- + Partial flag in the BGP attribute. + type: boolean + default: false x-field-uid: 3 - as_type: + flag_extended_length: + description: |- + Extended length flag in the BGP attribute. + type: boolean + default: false x-field-uid: 4 + type: description: |- - The type of BGP autonomous system. External BGP is used for BGP links between two or more autonomous systems (ebgp). Internal BGP is used within a single autonomous system (ibgp). BGP property defaults are aligned with this object defined as an internal BGP peer. If the as_type is specified as 'ebgp' then other properties will need to be specified as per an external BGP peer. Specifically, for 'ebgp', 'as_set_mode' attribute in 'as_path' field in any Route Range should be changed from default value 'do_not_include_local_as' to any other value. + The value of the Type field in the attribute. + type: integer + format: uint32 + x-field-uid: 5 + raw_value: + description: "Contents of the value field ( the contents after the initial\ + \ two bytes containing the Flags and Type field ) of the attribute in\ + \ hex bytes. \nIt includes the contents of length of the extended length\ + \ field if included." + type: string + format: hex + x-field-uid: 6 + Bgp.Attributes.AsPath: + description: |- + The AS_PATH attribute identifies the autonomous systems through which routing information + carried in this UPDATE message has passed. + This contains the configuration of how to include the Local AS in the AS path + attribute of the MP REACH NLRI. It also contains optional configuration of + additional AS Path Segments that can be included in the AS Path attribute. + The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that + a routing information passes through to reach the destination. + There are two modes in which AS numbers can be encoded in the AS Path Segments + - When the AS Path is being exchanged between old and new BGP speakers or between two old BGP speakers , the AS numbers are encoded as 2 byte values. + - When the AS Path is being exchanged between two new BGP speakers supporting 4 byte AS , the AS numbers are encoded as 4 byte values. + type: object + properties: + choice: type: string + default: four_byte_as_path x-enum: - ibgp: + four_byte_as_path: x-field-uid: 1 - ebgp: + two_byte_as_path: x-field-uid: 2 + x-field-uid: 1 enum: - - ibgp - - ebgp - as_number: - x-field-uid: 5 - description: |- - Autonomous System Number (AS number or ASN) - type: integer - format: uint32 - as_number_width: - x-field-uid: 6 + - four_byte_as_path + - two_byte_as_path + four_byte_as_path: + x-field-uid: 2 + $ref: '#/components/schemas/Bgp.Attributes.AsPath.FourByteAsPath' + two_byte_as_path: + x-field-uid: 3 + $ref: '#/components/schemas/Bgp.Attributes.AsPath.TwoByteAsPath' + Bgp.Attributes.AsPath.FourByteAsPath: + description: |- + AS Paths with 4 byte AS numbers can be exchanged only if both BGP speakers support 4 byte AS number extensions. + type: object + properties: + segments: + description: "The AS path segments containing 4 byte AS numbers to be added\ + \ in the AS Path attribute. By default, an empty AS path should always\ + \ be included and for EBGP at minimum the local AS number should be present\ + \ in the AS Path. " + type: array + items: + $ref: '#/components/schemas/Bgp.Attributes.FourByteAsPathSegment' + x-field-uid: 1 + Bgp.Attributes.FourByteAsPathSegment: + description: |- + Configuration for a single BGP AS path segment containing 4 byte AS numbers. + type: object + properties: + type: description: |- - The width in bytes of the as_number values. Any as_number values that exceeds the width MUST result in an error. + AS sequence is the most common type of AS_PATH, it contains the list + of ASNs starting with the most recent ASN being added read from left + to right. + The other three AS_PATH types are used for Confederations + - AS_SET is the type of AS_PATH attribute that summarizes routes using + using the aggregate-address command, allowing AS_PATHs to be summarized + in the update as well. + - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most + recent ASN to be added reading left to right + - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent + in BGP Updates. type: string - default: four + default: as_seq + x-field-uid: 1 x-enum: - two: + as_seq: x-field-uid: 1 - four: + as_set: x-field-uid: 2 + as_confed_seq: + x-field-uid: 3 + as_confed_set: + x-field-uid: 4 enum: - - two - - four - advanced: - x-field-uid: 7 - $ref: '#/components/schemas/Bgp.Advanced' - capability: - x-field-uid: 8 - $ref: '#/components/schemas/Bgp.Capability' - learned_information_filter: - x-field-uid: 9 - $ref: '#/components/schemas/Bgp.LearnedInformationFilter' - v4_routes: - x-field-uid: 10 + - as_seq + - as_set + - as_confed_seq + - as_confed_set + as_numbers: description: |- - Emulated BGPv4 route ranges. + The 4 byte AS numbers in this AS path segment. type: array items: - $ref: '#/components/schemas/Bgp.V4RouteRange' - v6_routes: - x-field-uid: 11 - description: |- - Emulated BGPv6 route ranges. - type: array - items: - $ref: '#/components/schemas/Bgp.V6RouteRange' - v4_srte_policies: - x-field-uid: 12 - description: |- - Segment Routing Traffic Engineering (SR TE) Policies for IPv4 Address Family Identifier (AFI). - type: array - items: - $ref: '#/components/schemas/BgpSrte.V4Policy' - v6_srte_policies: - x-field-uid: 13 - description: |- - Segment Routing Traffic Engineering (SR TE) Policies for IPv6 Address Family Identifier (AFI). - type: array - items: - $ref: '#/components/schemas/BgpSrte.V6Policy' - name: - x-field-uid: 14 - description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - Globally unique name of an object. It also serves as the primary key for arrays of objects. - type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - graceful_restart: - x-field-uid: 15 - $ref: '#/components/schemas/Bgp.GracefulRestart' - replay_updates: - description: "BGP Updates to be sent to the peer as specified after the\ - \ session is established. " - $ref: '#/components/schemas/Bgp.UpdateReplay' - x-field-uid: 16 - Bgp.V6Interface: + type: integer + format: uint32 + default: 1 + x-field-uid: 2 + Bgp.Attributes.AsPath.TwoByteAsPath: description: |- - Configuration for emulated BGPv6 peers and routes on a single IPv6 interface. + AS Paths with 2 byte AS numbers is used when any of the two scenarios occur : + - An old BGP speaker and new BGP speaker are sending BGP Updates to one another. + - Two old BGP speakers are sending BGP Updates to one another. type: object - required: - - ipv6_name properties: - ipv6_name: - description: | - The unique name of IPv6 or Loopback IPv6 interface used as the source IP for this list of BGP peers. - - x-constraint: - - /components/schemas/Device.Ipv6/properties/name - - /components/schemas/Device.Ipv6Loopback/properties/name - - - x-constraint: - - /components/schemas/Device.Ipv6/properties/name - - /components/schemas/Device.Ipv6Loopback/properties/name - type: string - x-constraint: - - /components/schemas/Device.Ipv6/properties/name - - /components/schemas/Device.Ipv6Loopback/properties/name - x-field-uid: 1 - peers: - description: |- - This contains the list of BGPv6 peers configured on this interface. + segments: + description: "The AS path segments containing 2 byte AS numbers to be added\ + \ in the AS Path attribute. By default, an empty AS path should always\ + \ be included and for EBGP the sender's AS number should be prepended\ + \ to the AS Path. " type: array items: - $ref: '#/components/schemas/Bgp.V6Peer' - x-field-uid: 2 - Bgp.V6SegmentRouting: - description: |- - Configuration for BGPv6 segment routing settings. - type: object - properties: - ingress_supports_vpn: - description: |- - TBD - type: boolean - default: false + $ref: '#/components/schemas/Bgp.Attributes.TwoByteAsPathSegment' x-field-uid: 1 - reduced_encapsulation: - description: |- - TBD - type: boolean - default: false - x-field-uid: 2 - copy_time_to_live: - description: |- - TBD - type: boolean - default: false - x-field-uid: 3 - time_to_live: - description: |- - TBD - type: integer - format: uint32 - default: 0 - x-field-uid: 4 - max_sids_per_srh: - description: |- - TBD - type: integer - format: uint32 - default: 0 - maximum: 255 - x-field-uid: 5 - auto_generate_segment_left_value: - description: |- - TBD - type: boolean - default: false - x-field-uid: 6 - segment_left_value: - description: |- - TBD - type: integer - format: uint32 - default: 0 - x-field-uid: 7 - advertise_sr_te_policy: - description: |- - TBD - type: boolean - default: false - x-field-uid: 8 - BgpV6.EthernetSegment: + Bgp.Attributes.TwoByteAsPathSegment: description: |- - Configuration for BGP Ethernet Segment ranges. Advertises following routes - - - Type 4 - Ethernet Segment Route + Configuration for a single BGP AS path segment containing 2 byte AS numbers. type: object properties: - df_election: - description: |- - Designated Forwarder (DF) election configuration. - $ref: '#/components/schemas/Bgp.EthernetSegment.DfElection' - x-field-uid: 1 - evis: - description: |- - This contains the list of EVIs. - type: array - items: - $ref: '#/components/schemas/BgpV6.EvpnEvis' - x-field-uid: 2 - esi: - x-field-uid: 3 - description: |- - 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero ESI is '10000000000000000000' . - type: string - format: hex - default: '00000000000000000000' - active_mode: - x-field-uid: 4 + type: description: |- - Single Active or All Active mode Redundancy mode selection for Multi-home. + AS sequence is the most common type of AS_PATH, it contains the list + of ASNs starting with the most recent ASN being added read from left + to right. + The other three AS_PATH types are used for Confederations + - AS_SET is the type of AS_PATH attribute that summarizes routes using + using the aggregate-address command, allowing AS_PATHs to be summarized + in the update as well. + - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most + recent ASN to be added reading left to right + - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent + in BGP Updates. type: string - default: all_active + default: as_seq + x-field-uid: 1 x-enum: - single_active: + as_seq: x-field-uid: 1 - all_active: + as_set: x-field-uid: 2 + as_confed_seq: + x-field-uid: 3 + as_confed_set: + x-field-uid: 4 enum: - - single_active - - all_active - esi_label: - x-field-uid: 5 - description: "The label value to be advertised as ESI Label in ESI Label\ - \ Extended Community. This is included in Ethernet Auto-discovery per\ - \ ES Routes advertised by a router. " - type: integer - format: uint32 - maximum: 16777215 - default: 0 - advanced: - x-field-uid: 6 - $ref: '#/components/schemas/Bgp.RouteAdvanced' - communities: - x-field-uid: 7 + - as_seq + - as_set + - as_confed_seq + - as_confed_set + as_numbers: description: |- - Optional community settings. + The 2 byte AS numbers in this AS path segment. type: array items: - $ref: '#/components/schemas/Bgp.Community' - ext_communities: - x-field-uid: 8 + type: integer + format: uint32 + default: 1 + maximum: 65535 + x-field-uid: 2 + Bgp.Attributes.As4Path: + description: |- + The AS4_PATH attribute identifies the autonomous systems through which routing information + carried in this UPDATE message has passed. + This contains the configuration of how to include the Local AS in the AS path + attribute of the MP REACH NLRI. It also contains optional configuration of + additional AS Path Segments that can be included in the AS Path attribute. + The AS Path consists of a Set or Sequence of Autonomous Systems (AS) numbers that + a routing information passes through to reach the destination. + AS4_PATH is only exchanged in two scenarios: + - When an old BGP speaker has to forward a received AS4_PATH containing 4 byte AS numbers to new BGP speaker. + - When a new BGP speaker is connected to an old BGP speaker and has to propagate 4 byte AS numbers via the old BGP speaker. + Its usage is described in RFC4893. + type: object + properties: + segments: description: |- - Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. + The AS path segments containing 4 byte AS numbers to be added in the AS4_PATH attribute. type: array items: - $ref: '#/components/schemas/Bgp.ExtCommunity' - as_path: - x-field-uid: 9 - description: |- - Optional AS PATH settings. - $ref: '#/components/schemas/Bgp.AsPath' - BgpV6.EvpnEvis: - description: "This contains a list of different flavors of EVPN. \nFor example\ - \ EVPN over VXLAN or EVPN over MPLS etc to be configured per Ethernet segment.\ - \ \nNeed to instantiate correct type of EVPN instance as per requirement." + $ref: '#/components/schemas/Bgp.Attributes.FourByteAsPathSegment' + x-field-uid: 1 + Bgp.Attributes.Aggregator: + description: "Optional AGGREGATOR attribute which maybe be added by a BGP speaker\ + \ which performs route aggregation.\nWhen AGGREGATOR attribute is being sent\ + \ to a new BGP speaker , the AS number is encoded as a 4 byte value.\nWhen\ + \ AGGREGATOR attribute is being exchanged between a new and an old BGP speaker\ + \ or between two old BGP speakers, \nthe AS number is encoded as a 2 byte\ + \ value.\nIt contain the AS number and IP address of the speaker performing\ + \ the aggregation. " type: object properties: choice: type: string - default: evi_vxlan - x-field-uid: 1 + default: four_byte_as x-enum: - evi_vxlan: + four_byte_as: x-field-uid: 1 - enum: - - evi_vxlan - evi_vxlan: - description: "EVPN VXLAN instance to be configured per Ethernet Segment.\ - \ " - $ref: '#/components/schemas/BgpV6.EviVxlan' - x-field-uid: 2 - BgpV6.EviVxlan: - description: |- - Configuration for BGP EVPN EVI. Advertises following routes - - - Type 3 - Inclusive Multicast Ethernet Tag Route - - Type 1 - Ethernet Auto-discovery Route (Per EVI) - - Type 1 - Ethernet Auto-discovery Route (Per ES) - type: object - properties: - broadcast_domains: - description: |- - This contains the list of Broadcast Domains to be configured per EVI. - type: array - items: - $ref: '#/components/schemas/BgpV6.EviVxlan.BroadcastDomain' + two_byte_as: + x-field-uid: 2 x-field-uid: 1 - replication_type: - x-field-uid: 2 - description: |- - This model only supports Ingress Replication - type: string - default: ingress_replication - x-enum: - ingress_replication: - x-field-uid: 1 enum: - - ingress_replication - pmsi_label: - x-field-uid: 3 + - four_byte_as + - two_byte_as + four_byte_as: description: |- - Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. + The value of the 4 byte AS number of the BGP speaker which aggregated the route. If the value of the AS number is less than 2 octets ( 65535 or less), the AS4_AGGREGATOR object should not be sent. type: integer format: uint32 - maximum: 16777215 - default: 16 - ad_label: - x-field-uid: 4 - description: |- - The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet Auto-discovery Route per + default: 65536 + x-field-uid: 2 + two_byte_as: + description: "The value of the 2 byte AS number of the BGP speaker which\ + \ aggregated the route. " type: integer format: uint32 - maximum: 16777215 - default: 0 - route_distinguisher: - x-field-uid: 5 - description: |- - Colon separated Extended Community value of 6 Bytes - "AS number: Value" identifying an EVI. Example - for the as_2octet "60005:100". - $ref: '#/components/schemas/Bgp.RouteDistinguisher' - route_target_export: - x-field-uid: 6 - description: "List of Layer 2 Virtual Network Identifier (L2VNI) export\ - \ targets associated with this EVI. " - type: array - items: - $ref: '#/components/schemas/Bgp.RouteTarget' - route_target_import: - x-field-uid: 7 - description: "List of L2VNI import targets associated with this EVI. " - type: array - items: - $ref: '#/components/schemas/Bgp.RouteTarget' - l3_route_target_export: - x-field-uid: 8 - description: |- - List of Layer 3 Virtual Network Identifier (L3VNI) Export Route Targets. - type: array - items: - $ref: '#/components/schemas/Bgp.RouteTarget' - l3_route_target_import: - x-field-uid: 9 - description: |- - List of L3VNI Import Route Targets. - type: array - items: - $ref: '#/components/schemas/Bgp.RouteTarget' - advanced: - x-field-uid: 10 - $ref: '#/components/schemas/Bgp.RouteAdvanced' - communities: - x-field-uid: 11 - description: |- - Optional community settings. - type: array - items: - $ref: '#/components/schemas/Bgp.Community' - ext_communities: - x-field-uid: 12 - description: |- - Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. - type: array - items: - $ref: '#/components/schemas/Bgp.ExtCommunity' - as_path: - x-field-uid: 13 - description: |- - Optional AS PATH settings. - $ref: '#/components/schemas/Bgp.AsPath' - BgpV6.EviVxlan.BroadcastDomain: - description: |- - Configuration for Broadcast Domains per EVI. + default: 1 + maximum: 65535 + x-field-uid: 3 + ipv4_address: + description: "The IPv4 address of the BGP speaker which aggregated the route.\ + \ " + type: string + format: ipv4 + default: 0.0.0.0 + x-field-uid: 4 + Bgp.Attributes.As4Aggregator: + description: "Optional AS4_AGGREGATOR attribute which maybe be added by a BGP\ + \ speaker in one of two cases:\n- If it is a new BGP speaker speaking to an\ + \ old BGP speaker and needs to send a 4 byte value for the AS number of the\ + \ BGP route aggregator.\n- If it is a old BGP speaker speaking to a new BGP\ + \ speaker and has to transparently forward a received AS4_AGGREGATOR from\ + \ some other peer.\nIts usage is described in RFC4893. " type: object properties: - cmac_ip_range: - description: "This contains the list of Customer MAC/IP Ranges to be configured\ - \ per Broadcast Domain. \n\nAdvertises following route - \nType 2 - MAC/IP\ - \ Advertisement Route." - type: array - items: - $ref: '#/components/schemas/Bgp.CMacIpRange' - x-field-uid: 1 - ethernet_tag_id: - x-field-uid: 2 - description: |- - The Ethernet Tag ID of the Broadcast Domain. + as_num: + description: "The value of the 4 byte AS number of the BGP speaker which\ + \ aggregated the route. " type: integer format: uint32 - default: 0 - vlan_aware_service: - x-field-uid: 3 - description: |- - VLAN-Aware service to be enabled or disabled. - type: boolean - default: false - Device.Vxlan: - properties: - v4_tunnels: - description: |- - IPv4 VXLAN Tunnels - type: array - items: - $ref: '#/components/schemas/Vxlan.V4Tunnel' x-field-uid: 1 - v6_tunnels: - description: |- - IPv6 VXLAN Tunnels - type: array - items: - $ref: '#/components/schemas/Vxlan.V6Tunnel' + ipv4_address: + description: "The IPv4 address of the BGP speaker which aggregated the route.\ + \ " + type: string + format: ipv4 + default: 0.0.0.0 x-field-uid: 2 - Vxlan.V4Tunnel: - description: |- - Configuration and operational state parameters relating to IPv4 VXLAN tunnel end-point interface. + Bgp.Attributes.Community: + description: "The COMMUNITY attribute provide additional capability for tagging\ + \ routes and for modifying BGP routing policy on \nupstream and downstream\ + \ routers. BGP community is a 32-bit number which is broken into 16-bit AS\ + \ number and a \n16-bit custom value or it contains some pre-defined well\ + \ known values. " type: object required: - - source_interface - - vni - - name + - choice properties: - source_interface: - description: | - Determines the source interface. - - x-constraint: - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv4Loopback/properties/name - - - x-constraint: - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv4Loopback/properties/name + choice: + description: "The type of community AS number. " type: string - x-constraint: - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv4Loopback/properties/name x-field-uid: 1 - destination_ip_mode: - $ref: '#/components/schemas/Vxlan.V4Tunnel.DestinationIPMode' + x-enum: + custom_community: + x-field-uid: 1 + no_export: + x-field-uid: 2 + no_advertised: + x-field-uid: 3 + no_export_subconfed: + x-field-uid: 4 + llgr_stale: + x-field-uid: 5 + no_llgr: + x-field-uid: 6 + enum: + - custom_community + - no_export + - no_advertised + - no_export_subconfed + - llgr_stale + - no_llgr + custom_community: + $ref: '#/components/schemas/Bgp.Attributes.CustomCommunity' x-field-uid: 2 - vni: - x-field-uid: 3 + Bgp.Attributes.CustomCommunity: + description: "User defined COMMUNITY attribute containing 2 byte AS and custom\ + \ 2 byte value defined by the administrator of the domain. " + type: object + properties: + as_number: description: |- - VXLAN Network Identifier (VNI) to distinguish network instances on the wire + First two octets of the community value containing a 2 byte AS number. type: integer format: uint32 - minimum: 1 - maximum: 16777215 - name: - x-field-uid: 4 + maximum: 65535 + default: 0 + x-field-uid: 1 + custom: description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - Globally unique name of an object. It also serves as the primary key for arrays of objects. + Last two octets of the community value in hex. If user provides less than 4 hex bytes, it should be left-padded with 0s. type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - Vxlan.V6Tunnel: - description: |- - Configuration and operational state parameters relating to IPv6 VXLAN tunnel end-point interface. - type: object - required: - - source_interface - - vni - - name + format: hex + default: '0000' + maxLength: 4 + x-field-uid: 2 + Bgp.Attributes.NextHop: + description: "Next hop to be sent inside MP_REACH NLRI or as the NEXT_HOP attribute\ + \ if advertised as traditional NLRI. " + type: object + required: + - choice properties: - source_interface: - description: | - Determines the source interface. - - x-constraint: - - /components/schemas/Device.Ipv6/properties/name - - /components/schemas/Device.Ipv6Loopback/properties/name - - - x-constraint: - - /components/schemas/Device.Ipv6/properties/name - - /components/schemas/Device.Ipv6Loopback/properties/name + choice: + description: "The type of the next HOP. " type: string - x-constraint: - - /components/schemas/Device.Ipv6/properties/name - - /components/schemas/Device.Ipv6Loopback/properties/name x-field-uid: 1 - destination_ip_mode: - $ref: '#/components/schemas/Vxlan.V6Tunnel.DestinationIPMode' + x-enum: + ipv4: + x-field-uid: 1 + ipv6: + x-field-uid: 2 + ipv6_two_addresses: + x-field-uid: 3 + enum: + - ipv4 + - ipv6 + - ipv6_two_addresses + ipv4: + description: |- + The 4 byte IPv4 address of the next-hop from which the route was received. + type: string + format: ipv4 + default: 0.0.0.0 x-field-uid: 2 - vni: - x-field-uid: 3 + ipv6: description: |- - VXLAN Network Identifier (VNI) to distinguish network instances on the wire - type: integer - format: uint32 - minimum: 1 - maximum: 16777215 - name: + The 16 byte IPv6 address of the next-hop from which the route was received. + type: string + format: ipv6 + default: 0::0 + x-field-uid: 3 + ipv6_two_addresses: x-field-uid: 4 + $ref: '#/components/schemas/Bgp.Attributes.NextHop.Ipv6TwoAddresses' + Bgp.Attributes.NextHop.Ipv6TwoAddresses: + description: "There is a specific scenario in which it is possible to receive\ + \ a Global and Link Local address in the Next Hop \nfield in a MP_REACH attribute\ + \ or in the NEXT_HOP attribute(RFC2545: Section 3). " + type: object + properties: + first: description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - Globally unique name of an object. It also serves as the primary key for arrays of objects. + The first IPv6 next hop in the 32 byte IPv6 Next Hop. type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - Vxlan.V4Tunnel.DestinationIPMode: - description: |- - Communication mode between the VTEPs, either unicast or multicast. + format: ipv6 + default: 0::0 + x-field-uid: 1 + second: + description: |- + The second IPv6 next hop in the 32 byte IPv6 Next Hop. + type: string + format: ipv6 + default: 0::0 + x-field-uid: 2 + Bgp.Attributes.MpReachNlri: + description: "The MP_REACH attribute is an optional attribute which can be included\ + \ in the attributes of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3.\n\ + The following AFI / SAFI combinations are supported:\n- IPv4 Unicast with\ + \ AFI as 1 and SAFI as 1 \n- IPv6 Unicast with AFI as 2 and SAFI as 1 \n-\ + \ Segment Routing Policy for IPv4 Unicast with AFI as 1 and SAFI as 73 ( draft-ietf-idr-sr-policy-safi-02\ + \ Section 2.1 )\n- Segment Routing Policy for IPv6 Unicast with AFI as 2 and\ + \ SAFI as 73" type: object + required: + - choice properties: + next_hop: + $ref: '#/components/schemas/Bgp.Attributes.NextHop' + x-field-uid: 1 choice: - description: |- - unicast or multicast + description: "The AFI and SAFI to be sent in the MPREACH_NLRI in the Update.\ + \ " type: string - default: multicast - x-field-uid: 1 + x-field-uid: 2 x-enum: - unicast: + ipv4_unicast: x-field-uid: 1 - multicast: + ipv6_unicast: x-field-uid: 2 + ipv4_srpolicy: + x-field-uid: 3 + ipv6_srpolicy: + x-field-uid: 4 enum: - - unicast - - multicast - unicast: - $ref: '#/components/schemas/Vxlan.V4Tunnel.DestinationIPMode.Unicast' - x-field-uid: 2 - multicast: - $ref: '#/components/schemas/Vxlan.V4Tunnel.DestinationIPMode.Multicast' + - ipv4_unicast + - ipv6_unicast + - ipv4_srpolicy + - ipv6_srpolicy + ipv4_unicast: + description: |- + List of IPv4 prefixes being sent in the IPv4 Unicast MPREACH_NLRI . + type: array + items: + $ref: '#/components/schemas/Bgp.OneIpv4NLRIPrefix' x-field-uid: 3 - Vxlan.V6Tunnel.DestinationIPMode: - description: |- - Communication mode between the VTEPs, either unicast or multicast. + ipv6_unicast: + description: |- + List of IPv6 prefixes being sent in the IPv6 Unicast MPREACH_NLRI . + type: array + items: + $ref: '#/components/schemas/Bgp.OneIpv6NLRIPrefix' + x-field-uid: 4 + ipv4_srpolicy: + description: |- + IPv4 endpoint with Segment Routing Policy being sent in the IPv4 MPREACH_NLRI . + $ref: '#/components/schemas/Bgp.Ipv4SrPolicyNLRIPrefix' + x-field-uid: 5 + ipv6_srpolicy: + description: "IPv6 endpoint with Segment Routing Policy being sent in the\ + \ IPv6 MPREACH_NLRI . " + $ref: '#/components/schemas/Bgp.Ipv6SrPolicyNLRIPrefix' + x-field-uid: 6 + Bgp.Attributes.MpUnreachNlri: + description: "The MP_UNREACH attribute is an optional attribute which can be\ + \ included in the attributes of a BGP Update message as defined in https://datatracker.ietf.org/doc/html/rfc4760#section-3.\n\ + The following AFI / SAFI combinations are supported:\n- IPv4 Unicast with\ + \ AFI as 1 and SAFI as 1 \n- IPv6 Unicast with AFI as 2 and SAFI as 1 \n-\ + \ Segment Routing Policy for IPv4 Unicast with AFI as 1 and SAFI as 73 (draft-ietf-idr-sr-policy-safi-02\ + \ Section 2.1)\n- Segment Routing Policy for IPv6 Unicast with AFI as 2 and\ + \ SAFI as 73" type: object properties: choice: - description: |- - unicast or multicast + description: "The AFI and SAFI to be sent in the MPUNREACH_NLRI in the Update.\ + \ " type: string - default: multicast x-field-uid: 1 x-enum: - unicast: + ipv4_unicast: x-field-uid: 1 - multicast: + ipv6_unicast: x-field-uid: 2 + ipv4_srpolicy: + x-field-uid: 3 + ipv6_srpolicy: + x-field-uid: 4 enum: - - unicast - - multicast - unicast: - $ref: '#/components/schemas/Vxlan.V6Tunnel.DestinationIPMode.Unicast' - x-field-uid: 2 - multicast: - $ref: '#/components/schemas/Vxlan.V6Tunnel.DestinationIPMode.Multicast' - x-field-uid: 3 - Vxlan.V4Tunnel.DestinationIPMode.Unicast: - properties: - vteps: + - ipv4_unicast + - ipv6_unicast + - ipv4_srpolicy + - ipv6_srpolicy + ipv4_unicast: description: |- - List of VTEPs for member VNI(VXLAN Network Identifier) + List of IPv4 prefixes being sent in the IPv4 Unicast MPUNREACH_NLRI . type: array items: - $ref: '#/components/schemas/Vxlan.V4Tunnel.DestinationIPMode.Unicast.Vtep' - x-field-uid: 1 - Vxlan.V6Tunnel.DestinationIPMode.Unicast: - properties: - vteps: + $ref: '#/components/schemas/Bgp.OneIpv4NLRIPrefix' + x-field-uid: 2 + ipv6_unicast: description: |- - List of VTEPs for member VNI(VXLAN Network Identifier) + List of IPv6 prefixes being sent in the IPv6 Unicast MPUNREACH_NLRI . type: array items: - $ref: '#/components/schemas/Vxlan.V6Tunnel.DestinationIPMode.Unicast.Vtep' + $ref: '#/components/schemas/Bgp.OneIpv6NLRIPrefix' + x-field-uid: 3 + ipv4_srpolicy: + description: |- + IPv4 endpoint with Segment Routing Policy being sent in the IPv4 MPUNREACH_NLRI . + $ref: '#/components/schemas/Bgp.Ipv4SrPolicyNLRIPrefix' + x-field-uid: 4 + ipv6_srpolicy: + description: "IPv6 endpoint with Segment Routing Policy being sent in the\ + \ IPv4 MPUNREACH_NLRI . " + $ref: '#/components/schemas/Bgp.Ipv6SrPolicyNLRIPrefix' + x-field-uid: 5 + Bgp.Attributes.MultiExitDiscriminator: + description: "Optional MULTI_EXIT_DISCRIMINATOR attribute sent to the peer to\ + \ help in the route selection process. " + properties: + value: + description: "The multi exit discriminator (MED) value used for route selection\ + \ sent to the peer. " + type: integer + format: uint32 + default: 0 x-field-uid: 1 - Vxlan.Tunnel.DestinationIPMode.Unicast.ArpSuppressionCache: - description: |- - Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request for another end-host IP address, its local VTEP intercepts the ARP request and checks for the ARP-resolved IP address in its ARP suppression cache table. If it finds a match, the local VTEP sends an ARP response on behalf of the remote end host. - type: object + Bgp.Attributes.LocalPreference: + description: "Optional LOCAL_PREFERENCE attribute sent to the peer to indicate\ + \ the degree of preference \nfor externally learned routes.This should be\ + \ included only for internal peers.It is \nused for the selection of the path\ + \ for the traffic leaving the AS.The route with the \nhighest local preference\ + \ value is preferred." properties: - remote_vm_mac: - description: |- - Remote VM MAC address bound to Remote VM IPv4 address - type: string - format: mac + value: + description: "Value to be set in the LOCAL_PREFERENCE attribute The multi\ + \ exit discriminator (MED) value used for route selection sent to the\ + \ peer. " + type: integer + format: uint32 + default: 100 x-field-uid: 1 - remote_vm_ipv4: - description: |- - Remote VM IPv4 address - type: string - format: ipv4 - x-field-uid: 2 - Vxlan.V4Tunnel.DestinationIPMode.Unicast.Vtep: + Bgp.Attributes.OriginatorId: description: |- - VTEP (VXLAN Tunnel End Point (VTEP)) parameters - type: object + Optional ORIGINATOR_ID attribute (type code 9) carries the Router Id of the route's originator in the local AS. properties: - remote_vtep_address: - description: |- - Remote VXLAN Tunnel End Point address + value: + description: "The value of the originator's Router Id. " type: string format: ipv4 + default: 0.0.0.0 x-field-uid: 1 - arp_suppression_cache: - x-field-uid: 2 - description: |- - Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request for another end-host IP address, its local VTEP intercepts the ARP request and checks for the ARP-resolved IP address in its ARP suppression cache table. If it finds a match, the local VTEP sends an ARP response on behalf of the remote end host. - type: array - items: - $ref: '#/components/schemas/Vxlan.Tunnel.DestinationIPMode.Unicast.ArpSuppressionCache' - Vxlan.V6Tunnel.DestinationIPMode.Unicast.Vtep: + Bgp.Attributes.TunnelEncapsulation: description: |- - VTEP (VXLAN Tunnel End Point (VTEP)) parameters - type: object + The TUNNEL_ENCAPSULATION attribute is used by a BGP speaker to inform other BGP speakers how to encapsulate packets that need to be sent to it. + It is defined in RFC9012 and is assigned a Type code of 23. properties: - remote_vtep_address: + choice: description: |- - Remote VXLAN Tunnel End Point address + Identifies a type of tunnel. The field contains values from the IANA registry "BGP Tunnel Encapsulation Attribute Tunnel Types". type: string - format: ipv6 x-field-uid: 1 - arp_suppression_cache: + x-enum: + sr_policy: + x-field-uid: 1 + default: sr_policy + enum: + - sr_policy + sr_policy: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy' x-field-uid: 2 - description: |- - Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request for another end-host IP address, its local VTEP intercepts the ARP request and checks for the ARP-resolved IP address in its ARP suppression cache table. If it finds a match, the local VTEP sends an ARP response on behalf of the remote end host. + Bgp.Attributes.SegmentRoutingPolicy: + description: "Optional Segment Routing Policy information as defined in draft-ietf-idr-sr-policy-safi-02.\n\ + This information is carried in TUNNEL_ENCAPSULATION attribute with type set\ + \ to SR Policy (15). " + type: object + properties: + binding_segment_identifier: + $ref: '#/components/schemas/Bgp.Attributes.Bsid' + x-field-uid: 1 + srv6_binding_segment_identifier: + description: "The SRv6 Binding SID sub-TLV is an optional sub-TLV of type\ + \ 20 that is used to signal the SRv6 Binding SID\nrelated information\ + \ of an SR Policy candidate path. \n - More than one SRv6 Binding SID\ + \ sub-TLVs MAY be signaled in the same SR Policy encoding to indicate\ + \ one\n or more SRv6 SIDs, each with potentially different SRv6 Endpoint\ + \ Behaviors to be instantiated.\n - The format of the sub-TLV is defined\ + \ in draft-ietf-idr-sr-policy-safi-02 Section 2.4.3 . " type: array items: - $ref: '#/components/schemas/Vxlan.Tunnel.DestinationIPMode.Unicast.ArpSuppressionCache' - Vxlan.V4Tunnel.DestinationIPMode.Multicast: - description: |- - Multicast Group address for member VNI(VXLAN Network Identifier) + $ref: '#/components/schemas/Bgp.Attributes.Srv6Bsid' + x-field-uid: 2 + preference: + $ref: '#/components/schemas/Bgp.Attributes.SrPolicy.Preference' + x-field-uid: 3 + priority: + $ref: '#/components/schemas/Bgp.Attributes.SrPolicy.Priority' + x-field-uid: 4 + policy_name: + $ref: '#/components/schemas/Bgp.Attributes.SrPolicy.PolicyName' + x-field-uid: 5 + policy_candidate_name: + $ref: '#/components/schemas/Bgp.Attributes.SrPolicy.PolicyCandidateName' + x-field-uid: 6 + explicit_null_label_policy: + $ref: '#/components/schemas/Bgp.Attributes.SrPolicy.ExplicitNullPolicy' + x-field-uid: 7 + segment_list: + type: array + items: + $ref: '#/components/schemas/Bgp.Attributes.SrPolicy.SegmentList' + x-field-uid: 8 + Bgp.Attributes.Bsid: + description: "The Binding Segment Identifier is an optional sub-tlv of type\ + \ 13 that can be sent with a SR Policy \nTunnel Encapsulation attribute.\n\ + When the active candidate path has a specified Binding Segment Identifier,\ + \ the SR Policy uses that \nBSID if this value (label in MPLS, IPv6 address\ + \ in SRv6) is available.\n- The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02\ + \ Section 2.4.2 . \n- It is recommended that if SRv6 Binding SID is desired\ + \ to be signalled, the SRv6 Binding SID sub-TLV that enables \n the specification\ + \ of the SRv6 Endpoint Behavior should be used." type: object + required: + - choice properties: - address: - description: |- - IPv4 Multicast address + choice: + description: "The type of Segment Identifier. " type: string - format: ipv4 x-field-uid: 1 - Vxlan.V6Tunnel.DestinationIPMode.Multicast: - description: |- - Multicast Group address for member VNI(VXLAN Network Identifier) + x-enum: + mpls: + x-field-uid: 1 + srv6: + x-field-uid: 2 + enum: + - mpls + - srv6 + mpls: + $ref: '#/components/schemas/Bgp.Attributes.Bsid.Mpls' + x-field-uid: 2 + srv6: + $ref: '#/components/schemas/Bgp.Attributes.Bsid.Srv6' + x-field-uid: 3 + Bgp.Attributes.Bsid.Mpls: + description: "When the active candidate path has a specified Binding Segment\ + \ Identifier, the SR Policy uses that BSID defined \nas a MPLS label.The format\ + \ of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section 2.4.2\ + \ ." type: object properties: - address: - description: |- - IPv6 Multicast address - type: string - format: ipv6 + flag_specified_bsid_only: + description: "S-Flag: This flag encodes the \"Specified-BSID-only\" behavior.\ + \ It's usage is \ndescribed in section 6.2.3 in [RFC9256]." + type: boolean + default: false x-field-uid: 1 - Device.Rsvp: - description: |- - Configuration for one or more RSVP interfaces, ingress and egress LSPs. In this model, currently IPv4 RSVP and point-to-point LSPs are supported as per RFC3209 and related specifications. + flag_drop_upon_invalid: + description: "I-Flag: This flag encodes the \"Drop Upon Invalid\" behavior.\ + \ \nIt's usage is described in section 8.2 in [RFC9256]." + type: boolean + default: false + x-field-uid: 2 + mpls_sid: + $ref: '#/components/schemas/Bgp.Attributes.Sid.Mpls' + x-field-uid: 3 + Bgp.Attributes.Bsid.Srv6: + description: "When the active candidate path has a specified Binding Segment\ + \ Identifier, the SR Policy uses that BSID defined \nas an IPv6 Address.The\ + \ format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02 Section\ + \ 2.4.2 ." type: object properties: - ipv4_interfaces: - description: |- - List of IPv4 RSVP connected interfaces. At least one interface should be present for device connected to the DUT. For unconnected devices, this array must be empty. - type: array - items: - $ref: '#/components/schemas/Rsvp.Ipv4Interface' + flag_specified_bsid_only: + description: "S-Flag: This flag encodes the \"Specified-BSID-only\" behavior.\ + \ It's usage is \ndescribed in section 6.2.3 in [RFC9256]." + type: boolean + default: false x-field-uid: 1 - lsp_ipv4_interfaces: - description: |- - List of IPv4 Loopback or IPv4 connected interfaces acting as RSVP ingress and egress endpoints. - type: array - items: - $ref: '#/components/schemas/Rsvp.LspIpv4Interface' + flag_drop_upon_invalid: + description: "I-Flag: This flag encodes the \"Drop Upon Invalid\" behavior.\ + \ \nIt's usage is described in section 8.2 in [RFC9256]." + type: boolean + default: false x-field-uid: 2 - name: - x-field-uid: 3 + ipv6_addr: description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. + IPv6 address denoting the SRv6 SID. type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - Rsvp.Ipv4Interface: - description: |- - Configuration for RSVP Interface. + format: ipv6 + default: 0::0 + x-field-uid: 3 + Bgp.Attributes.Srv6Bsid: + description: "The SRv6 Binding SID sub-TLV is an optional sub-TLV of type 20\ + \ that is used to signal the SRv6 Binding SID\nrelated information of an SR\ + \ Policy candidate path. \n - More than one SRv6 Binding SID sub-TLVs MAY\ + \ be signaled in the same SR Policy encoding to indicate one or\n more\ + \ SRv6 SIDs, each with potentially different SRv6 Endpoint Behaviors to be\ + \ instantiated.\n - The format of the sub-TLV is defined in draft-ietf-idr-sr-policy-safi-02\ + \ Section 2.4.3 ." type: object - required: - - ipv4_name - - neighbor_ip properties: - ipv4_name: - description: "The globally unique name of the IPv4 interface connected to\ - \ the DUT. This name must match the \"name\" field of the \"ipv4_addresses\"\ - \ on top which this RSVP interface is configured. \n\nx-constraint:\n\ - - /components/schemas/Device.Ipv4/properties/name\n\n\nx-constraint:\n\ - - /components/schemas/Device.Ipv4/properties/name\n" - type: string - x-constraint: - - /components/schemas/Device.Ipv4/properties/name + flag_specified_bsid_only: + description: "S-Flag: This flag encodes the \"Specified-BSID-only\" behavior.\ + \ It's usage is \ndescribed in section 6.2.3 in [RFC9256]." + type: boolean + default: false x-field-uid: 1 - neighbor_ip: - description: |- - IPv4 address of the RSVP neighbor on this interface. - type: string - format: ipv4 + flag_drop_upon_invalid: + description: "I-Flag: This flag encodes the \"Drop Upon Invalid\" behavior.\ + \ \nIt's usage is described in section 8.2 in [RFC9256]." + type: boolean + default: false x-field-uid: 2 - label_space_start: - description: "The user-defined label space start value. The LSPs for which\ - \ this router acts as a egress are assigned labels from this label pool.The\"\ - label_space_start\" and \"label_space_end\" together defines this label-pool. " - type: integer - format: uint32 - default: 1000 - maximum: 1048575 + flag_srv6_endpoint_behavior: + description: "B-Flag: This flag, when set, indicates the presence of the\ + \ SRv6 Endpoint Behavior \nand SID Structure encoding specified in Section\ + \ 2.4.4.2.4 of draft-ietf-idr-sr-policy-safi-02." + type: boolean + default: false x-field-uid: 3 - label_space_end: + ipv6_addr: description: |- - The user-defined label space end value.The last label value that can be assigned to the LSPs for which this router acts as egress. - type: integer - format: uint32 - default: 100000 - maximum: 1048575 + IPv6 address denoting the SRv6 SID. + type: string + format: ipv6 + default: 0::0 x-field-uid: 4 - enable_refresh_reduction: - description: |- - Enables sending of Refresh Reduction as described in RFC2961. - type: boolean - default: false + srv6_endpoint_behavior: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.SRv6SIDEndpointBehaviorAndStructure' x-field-uid: 5 - summary_refresh_interval: + Bgp.Attributes.Sid.Mpls: + description: "This carries a 20 bit Multi Protocol Label Switching alongwith\ + \ 3 bits traffic class, 1 bit indicating presence\nor absence of Bottom-Of-Stack\ + \ and 8 bits carrying the Time to Live value. " + type: object + properties: + label: description: |- - The number of seconds between transmissions of successive Summary Refreshes. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. + 20 bit MPLS Label value. type: integer format: uint32 - default: 30 - maximum: 3600 - x-field-uid: 6 - send_bundle: - description: |- - Enables aggregration of different RSVP messages within a single PDU. - type: boolean - default: false - x-field-uid: 7 - bundle_threshold: + default: 16 + maximum: 1048576 + x-field-uid: 1 + traffic_class: description: |- - The number of milliseconds to wait after which RSVP will bundle different RSVP messages and transmit Bundle messages. + 3 bits of Traffic Class. type: integer format: uint32 - default: 50 - maximum: 1000 - x-field-uid: 8 - enable_hello: - description: "Enables sending of Hello Messages as per RFC3209. \ - \ " + default: 0 + maximum: 7 + x-field-uid: 2 + flag_bos: + description: |- + Bottom of Stack type: boolean - default: false - x-field-uid: 9 - hello_interval: + default: true + x-field-uid: 3 + ttl: description: |- - If enable_hello is set to 'true', this specifies the minimum hello interval in seconds at which successive Hello Messages are sent as per RFC3209. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. + 8 bits Time to Live type: integer format: uint32 - default: 9 - maximum: 3600 - x-field-uid: 10 - timeout_multiplier: + default: 63 + maximum: 63 + x-field-uid: 4 + Bgp.Attributes.Sid.Srv6: + description: |- + An IPv6 address denoting a SRv6 SID. + type: object + properties: + ip: + type: string + format: ipv6 + default: 0::0 + x-field-uid: 1 + Bgp.Attributes.SrPolicy.Preference: + description: | + Optional Preference sub-tlv (Type 12) is used to select the best candidate path for an SR Policy. + It is defined in Section 2.4.1 of draft-ietf-idr-sr-policy-safi-02 . + type: object + properties: + value: description: |- - The number of missed hellos after which the node should consider RSVP Neighbor to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. + Value to be carried in the Preference sub-tlv. type: integer format: uint32 - default: 3 - maximum: 10 - x-field-uid: 11 - Rsvp.LspIpv4Interface: + default: 0 + x-field-uid: 1 + Bgp.Attributes.SrPolicy.Priority: description: |- - Configuration for RSVP LSP IPv4 Interface. + Optional Priority sub-tlv (Type 15) used to select the order in which policies should be re-computed. + - It is defined in Section 2.4.6 of draft-ietf-idr-sr-policy-safi-02 . + type: object + properties: + value: + description: "Value to be carried in the Priority sub-tlv. " + type: integer + format: uint32 + maximum: 255 + default: 0 + x-field-uid: 1 + Bgp.Attributes.SrPolicy.PolicyCandidateName: + description: "Optional Policy Candidate Path Name sub-tlv (Type 129) which carries\ + \ the symbolic name for the SR Policy candidate path \nfor debugging. \n\ + - It is defined in Section 2.4.7 of draft-ietf-idr-sr-policy-safi-02 ." type: object required: - - ipv4_name + - value properties: - ipv4_name: - description: | - The globally unique name of the IPv4 or Loopback IPv4 interface acting as the RSVP ingress and egress endpoint for the LSPs configured on this interface. This must match the "name" field of either "ipv4_addresses" or "ipv4_loopbacks" on which this LSP interface is configured. - - x-constraint: - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv4Loopback/properties/name - - - x-constraint: - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv4Loopback/properties/name + value: + description: |- + Value of the symbolic Policy Candidate Path Name carried in the Policy Candidate Path Name sub-tlv. + It is recommended that the size of the name is limited to 255 bytes. type: string - x-constraint: - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv4Loopback/properties/name + maxLength: 500 x-field-uid: 1 - p2p_egress_ipv4_lsps: - description: "Contains properties of Tail(Egress) LSPs. " - $ref: '#/components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp' - x-field-uid: 2 - p2p_ingress_ipv4_lsps: - description: |- - Array of point-to-point RSVP-TE P2P LSPs originating from this interface. - type: array - items: - $ref: '#/components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp' - x-field-uid: 3 - Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp: - description: |- - Configuration for RSVP Egress Point-to-Point(P2P) IPv4 LSPs. + Bgp.Attributes.SrPolicy.PolicyName: + description: "Optional Policy Name sub-tlv (Type 130) which carries the symbolic\ + \ name for the SR Policy for which the \ncandidate path is being advertised\ + \ for debugging. \n- It is defined in Section 2.4.8 of draft-ietf-idr-sr-policy-safi-02\ + \ ." type: object required: - - name + - value properties: - name: - x-field-uid: 1 + value: description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. + Value of the symbolic policy name carried in the Policy Name sub-tlv. + It is recommended that the size of the name is limited to 255 bytes. type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - refresh_interval: - description: "The time in seconds between successive transmissions of RESV\ - \ Refreshes. The actual refresh interval is jittered by upto 50%. There\ - \ is no specification specified maximum value. For clarity, setting the\ - \ maximum to 1 hour. " - type: integer - format: uint32 - default: 30 - maximum: 3600 - x-field-uid: 2 - timeout_multiplier: - description: |- - The number of missed PATH refreshes after which a recieving node should consider the LSP state to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. - type: integer - format: uint32 - default: 3 - maximum: 10 - x-field-uid: 3 - reservation_style: + maxLength: 500 + x-field-uid: 1 + Bgp.Attributes.SrPolicy.ExplicitNullPolicy: + description: |- + This is an optional sub-tlv (Type 14) which indicates whether an Explicit NULL Label must be pushed on an unlabeled IP + packet before other labels for IPv4 or IPv6 flows. + - It is defined in Section 2.4.5 of draft-ietf-idr-sr-policy-safi-02. + properties: + choice: description: |- - It determines how RSVP-TE enabled network devices set up reservations along the path between an end-to-end QOS-enabled connection. If 'auto' is enabled, the style is chosen based on whether the incoming Path has 'SE Desired' flag set. Otherwise, the style is chosen based on the value selected for this attribute. + The Explicit NULL Label policy. type: string + x-field-uid: 1 x-enum: - shared_explicit: + unknown: x-field-uid: 1 - fixed_filter: + push_ipv4: x-field-uid: 2 - auto: + push_ipv6: x-field-uid: 3 - default: shared_explicit - x-field-uid: 4 + push_ipv4_and_ipv6: + x-field-uid: 4 + donot_push: + x-field-uid: 5 + default: push_ipv4_and_ipv6 enum: - - shared_explicit - - fixed_filter - - auto - enable_fixed_label: - description: "If enabled, a specific fixed label will be advertised by the\ - \ egress or tail end for all Path messages received by this egress. This\ - \ can be leveraged to advertise Explicit or Implicit null labels. \ - \ " - type: boolean - default: false - x-field-uid: 5 - fixed_label_value: + - unknown + - push_ipv4 + - push_ipv6 + - push_ipv4_and_ipv6 + - donot_push + Bgp.Attributes.SrPolicy.SegmentList: + description: "One optional SEGMENT_LIST sub-tlv encoded with type of 128.\n\ + One sub-tlv (Type 128) encodes a single explicit path towards the endpoint\ + \ as described in \nsection 5.1 of [RFC9256]. \nThe Segment List sub-TLV includes\ + \ the elements of the paths (i.e., segments) as well \nas an optional Weight\ + \ sub-TLV." + type: object + properties: + weight: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.SegmentList.Weight' + x-field-uid: 1 + segments: + type: array + items: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.SegmentList.Segment' + x-field-uid: 2 + Bgp.Attributes.SegmentRoutingPolicy.SegmentList.Weight: + description: |- + The optional Weight sub-TLV (Type 9) specifies the weight associated with a given segment list. The weight is used for weighted multipath. + type: object + properties: + value: description: |- - The fixed label value as advertised by egress in RESV message. Applicable only if 'fixed_label' is set to 'true'. Special values are '0 - IPv4 Explicit NULL', '2 - IPv6 Explicit NULL' and '3 - Implicit NULL'. Outside of this, labels are expected to have a minimum value of 16. + Value of the weight. type: integer format: uint32 default: 0 - maximum: 1048575 - x-field-uid: 6 - Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp: - description: |- - Configuration for an RSVP Ingress point-to-point LSP. + x-field-uid: 1 + Bgp.Attributes.SegmentRoutingPolicy.SegmentList.Segment: + description: "A Segment sub-TLV describes a single segment in a segment list\ + \ i.e., a single\nelement of the explicit path. The Segment sub-TLVs are\ + \ optional.\nSegment Types A and B are defined as described in 2.4.4.2.\n\ + Segment Types C upto K are defined as described in in draft-ietf-idr-bgp-sr-segtypes-ext-03\ + \ . " type: object required: - - remote_address - - name + - choice properties: - name: - x-field-uid: 1 - description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - remote_address: + choice: description: |- - IPv4 address of the remote endpoint of the LSP. + Specify one of the segment types as defined in ietf-idr-segment-routing-te-policy + - Type A: SID only, in the form of MPLS Label. + - Type B: SID only, in the form of IPv6 Address. + - Type C: IPv4 Prefix with optional SR Algorithm. + - Type D: IPv6 Global Prefix with optional SR Algorithm for SR-MPLS. + - Type E: IPv4 Prefix with Local Interface ID. + - Type F: IPv4 Addresses for link endpoints as Local, Remote pair. + - Type G: IPv6 Prefix and Interface ID for link endpoints as Local, Remote pair for SR-MPLS. + - Type H: IPv6 Addresses for link endpoints as Local, Remote pair for SR-MPLS. + - Type I: IPv6 Global Prefix with optional SR Algorithm for SRv6. + - Type J: IPv6 Prefix and Interface ID for link endpoints as Local, Remote pair for SRv6. + - Type K: IPv6 Addresses for link endpoints as Local, Remote pair for SRv6. type: string - format: ipv4 + x-field-uid: 1 + x-enum: + type_a: + x-field-uid: 1 + type_b: + x-field-uid: 2 + type_c: + x-field-uid: 3 + type_d: + x-field-uid: 4 + type_e: + x-field-uid: 5 + type_f: + x-field-uid: 6 + type_g: + x-field-uid: 7 + type_h: + x-field-uid: 8 + type_i: + x-field-uid: 9 + type_j: + x-field-uid: 10 + type_k: + x-field-uid: 11 + enum: + - type_a + - type_b + - type_c + - type_d + - type_e + - type_f + - type_g + - type_h + - type_i + - type_j + - type_k + type_a: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeA' x-field-uid: 2 - tunnel_id: - description: |- - The Tunnel ID of the RSVP LSP. Carried in the SESSION object in Path Messages. - type: integer - format: uint32 - default: 1 - minimum: 1 - maximum: 65535 + type_b: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeB' x-field-uid: 3 - lsp_id: - description: |- - The LSP ID of the RSVP LSP. Carried in the SENDER_TEMPLATE object in Path Messages. - type: integer - format: uint32 - default: 1 - minimum: 1 - maximum: 65535 + type_c: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeC' x-field-uid: 4 - refresh_interval: - description: "The time in seconds between successive transmissions of PATH\ - \ Refreshes. The actual refresh interval is jittered by upto 50%. There\ - \ is no specification specified maximum value. For clarity, setting the\ - \ maximum to 1 hour. " - type: integer - format: uint32 - default: 30 - minimum: 1 - maximum: 3600 + type_d: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeD' x-field-uid: 5 - timeout_multiplier: - description: |- - The number of missed RESV refreshes after which a recieving node should consider the LSP state to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. - type: integer - format: uint32 - default: 3 - minimum: 1 - maximum: 10 + type_e: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeE' x-field-uid: 6 - backup_lsp_id: - description: |- - The LSP id that will be used when creating a Make-Before-Break LSP when the active LSP is using lsp_id. If the active LSP on which Make-Before-Break is being done is using the backup_lsp_id, the new LSP created will toggle to use the lsp_id instead. - type: integer - format: uint32 - default: 2 - minimum: 1 - maximum: 65535 + type_f: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeF' x-field-uid: 7 - lsp_switchover_delay: - description: |- - The amount of delay in milliseconds that an implementation should wait for before switching traffic to the new LSP created after a Make-Before-Break is done on an LSP. The default value is 0 which means to switch immediately. An implementation should support a minimum delay value of at least 50ms . There is no specification specified maximum value. Setting maximum allowed value to 1 minute. If a delay value is supplied which is lesser than the minimum delay value supported, a warning should be provided indicating that the minimum value of LSP switchover delay is automatically increased to the supported minimum value. This warning should be included in the list of warnings in the 'Response.Warning' attribute sent in the SetConfig 'Success' Response. - type: integer - format: uint32 - default: 0 - minimum: 0 - maximum: 60000 + type_g: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeG' x-field-uid: 8 - session_attribute: - description: "This contains the values of the fields to be included in the\ - \ SESSION_ATTRIBUTE object in the Path Message sent for the LSP. \ - \ " - $ref: '#/components/schemas/Rsvp.SessionAttribute' + type_h: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeH' x-field-uid: 9 - tspec: - description: "This contains the values of the fields to be included in the\ - \ TSPEC object in the Path Message sent for the LSP. " - $ref: '#/components/schemas/Rsvp.Tspec' + type_i: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeI' x-field-uid: 10 - fast_reroute: - description: "This contains the values of the fields to be included in the\ - \ FAST_REROUTE object in the Path Message sent for the LSP. \nThis is\ - \ an optional object . If this attribute is not included , the FAST_REROUTE\ - \ object will not be included. " - $ref: '#/components/schemas/Rsvp.FastReroute' + type_j: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeJ' x-field-uid: 11 - ero: - description: "This contains the values of the fields to be included in the\ - \ ERO object in the Path Message sent for the LSP. \nThis is an optional\ - \ object . If this attribute is not included , the ERO object will not\ - \ be included. " - $ref: '#/components/schemas/Rsvp.Ero' + type_k: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeK' x-field-uid: 12 - Rsvp.SessionAttribute: + Bgp.Attributes.SegmentRoutingPolicy.TypeA: description: |- - Configuration for RSVP-TE SESSION_ATTRIBUTE object included in Path Messages as defined in RFC3209. The bandwidth_protection_desired and node_protection_desired flags are defined in RFC4090 (Fast Reroute). + Type A: SID only, in the form of MPLS Label. + It is encoded as a Segment of Type 1 in the SEGMENT_LIST sub-tlv. type: object properties: - auto_generate_session_name: - description: |- - If this is enabled, an auto-generated Session Name is included in the SESSION_ATTRIBUTE object in the Path Message for this LSP. - type: boolean - default: true + flags: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeFlags' x-field-uid: 1 - session_name: - description: "If auto_generate_session_name is set to 'false', then the\ - \ value of this field is used to fill the Session Name field of the SESSION_ATTRIBUTE\ - \ object in the Path Message for this LSP. It is suggested to include\ - \ the Local IP, Remote IP, Tunnel ID and LSP ID in the auto-generated\ - \ Session Name to ensure uniqueness of the name in the test. The maximum\ - \ length of session name is 254 bytes. " + mpls_sid: + $ref: '#/components/schemas/Bgp.Attributes.Sid.Mpls' + x-field-uid: 2 + Bgp.Attributes.SegmentRoutingPolicy.TypeB: + description: |- + Type B: SID only, in the form of IPv6 address. + It is encoded as a Segment of Type 13 in the SEGMENT_LIST sub-tlv. + type: object + properties: + flags: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeFlags' + x-field-uid: 1 + srv6_sid: + description: |- + SRv6 SID. type: string - minLength: 0 - maxLength: 254 + format: ipv6 + default: 0::0 x-field-uid: 2 - setup_priority: + srv6_endpoint_behavior: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.SRv6SIDEndpointBehaviorAndStructure' + x-field-uid: 3 + Bgp.Attributes.SegmentRoutingPolicy.TypeC: + description: |- + Type C: IPv4 Node Address with optional SID. + It is encoded as a Segment of Type 3 in the SEGMENT_LIST sub-tlv. + type: object + properties: + flags: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeFlags' + x-field-uid: 1 + sr_algorithm: description: |- - Specifies the value of the Setup Priority field. This controls whether the LSP should pre-empt existing LSP setup with certain Holding Priority if resource limitation is encountered when setting up the LSP. (e.g. bandwidth availability). The value 0 is the highest priority while 7 is the lowest. + SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. type: integer format: uint32 - default: 7 - maximum: 7 + maximum: 255 + default: 0 + x-field-uid: 2 + ipv4_node_address: + description: |- + IPv4 address representing a node. + type: string + format: ipv4 + default: 0.0.0.0 x-field-uid: 3 - holding_priority: + sr_mpls_sid: description: |- - Specifies the value of the Holding Priority field. This controls whether a new LSP being created with certain Setup Priority should pre-empt this LSP if resource limitation is encountered when setting up the LSP. (e.g. bandwidth availability). The value 0 is the highest priority while 7 is the lowest. - type: integer - format: uint32 - default: 7 - maximum: 7 + Optional SR-MPLS SID. + $ref: '#/components/schemas/Bgp.Attributes.Sid.Mpls' x-field-uid: 4 - local_protection_desired: + Bgp.Attributes.SegmentRoutingPolicy.TypeD: + description: "Type D: IPv6 Node Address with optional SID for SR MPLS.\nIt is\ + \ encoded as a Segment of Type 4 in the SEGMENT_LIST sub-tlv. " + type: object + properties: + flags: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeFlags' + x-field-uid: 1 + sr_algorithm: description: |- - This flag permits transit routers to use a local repair mechanism which may result in violation of the explicit route object. When a fault is detected on an adjacent downstream link or node, a transit router can reroute traffic for fast service restoration. - type: boolean - default: false - x-field-uid: 5 - label_recording_desired: + SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. + type: integer + format: uint32 + maximum: 255 + default: 0 + x-field-uid: 2 + ipv6_node_address: description: |- - This flag indicates that label information should be included when doing a route record. - type: boolean - default: false - x-field-uid: 6 - se_style_desired: + IPv6 address representing a node. + type: string + format: ipv6 + default: 0::0 + x-field-uid: 3 + sr_mpls_sid: description: |- - This flag indicates that the tunnel ingress node may choose to reroute this tunnel without tearing it down. A tunnel egress node SHOULD use the Shared Explicit(SE) Style when responding with a Resv message. - type: boolean - default: false - x-field-uid: 7 - bandwidth_protection_desired: + Optional SR-MPLS SID. + $ref: '#/components/schemas/Bgp.Attributes.Sid.Mpls' + x-field-uid: 4 + Bgp.Attributes.SegmentRoutingPolicy.TypeE: + description: "Type E: IPv4 Address and Local Interface ID with optional SID\n\ + It is encoded as a Segment of Type 5 in the SEGMENT_LIST sub-tlv. " + type: object + properties: + flags: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeFlags' + x-field-uid: 1 + local_interface_id: description: |- - This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs along the protected LSP path that a backup path with a bandwidth guarantee is desired. This bandwidth has to be guaranteed for the protected LSP, if no FAST_REROUTE object is included in the PATH message. If a FAST_REROUTE object is present in the Path message, then the bandwidth specified therein is to be guaranteed. - type: boolean - default: false - x-field-uid: 8 - node_protection_desired: + The Interface Index as defined in [RFC8664]. + type: integer + format: uint32 + default: 0 + x-field-uid: 2 + ipv4_node_address: description: |- - This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs along a protected LSP path that it is desired to have a backup path that bypasses at least the next node of the protected LSP. - type: boolean - default: false - x-field-uid: 9 - resource_affinities: - description: "This is an optional object. If included the extended SESSION_ATTRIBUTE\ - \ object is sent in the Path message containing \nthe additional fields\ - \ included in this object. This contains a set of three bitmaps using\ - \ which further constraints can be\nset on the path calculated for the\ - \ LSP based on the Admin Group settings in the IGP (e.g ISIS or OSPF interface).\ - \ " - $ref: '#/components/schemas/Rsvp.ResourceAffinities' - x-field-uid: 10 - Rsvp.ResourceAffinities: - description: "This is an optional object. If included, the extended SESSION_ATTRIBUTE\ - \ object is sent in the Path message containing \nthe additional fields included\ - \ in this object. This contains a set of three bitmaps using which further\ - \ constraints can be\nset on the path calculated for the LSP based on the\ - \ Admin Group settings in the IGP (e.g ISIS or OSPF interface)." + IPv4 address representing a node. + type: string + format: ipv4 + default: 0.0.0.0 + x-field-uid: 3 + sr_mpls_sid: + description: |- + Optional SR-MPLS SID. + $ref: '#/components/schemas/Bgp.Attributes.Sid.Mpls' + x-field-uid: 4 + Bgp.Attributes.SegmentRoutingPolicy.TypeF: + description: "Type F: IPv4 Local and Remote addresses with optional SR-MPLS\ + \ SID.\nIt is encoded as a Segment of Type 6 in the SEGMENT_LIST sub-tlv. " type: object properties: - exclude_any: - description: "A 32-bit vector representing a set of attribute filters associated\ - \ with a tunnel any of which renders a link unacceptable. A null set\ - \ (all bits set to zero) doesn't render the link unacceptable. The most\ - \ significant byte in the hex-string is the farthest to the left in the\ - \ byte sequence. Leading zero bytes in the configured value may be omitted\ - \ for brevity. " - type: string - format: hex - default: '0' - minLength: 0 - maxLength: 8 + flags: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeFlags' x-field-uid: 1 - include_any: - description: "A 32-bit vector representing a set of attribute filters associated\ - \ with a tunnel any of which renders a link acceptable. A null set (all\ - \ bits set to zero) automatically passes. The most significant byte in\ - \ the hex-string is the farthest to the left in the byte sequence. Leading\ - \ zero bytes in the configured value may be omitted for brevity. \ - \ " + local_ipv4_address: + description: |- + Local IPv4 Address. type: string - format: hex - default: '0' - minLength: 0 - maxLength: 8 + format: ipv4 + default: 0.0.0.0 x-field-uid: 2 - include_all: - description: "A 32-bit vector representing a set of attribute filters associated\ - \ with a tunnel all of which must be present for a link to be acceptable.\ - \ A null set (all bits set to zero) automatically passes. The most significant\ - \ byte in the hex-string is the farthest to the left in the byte sequence.\ - \ Leading zero bytes in the configured value may be omitted for brevity.\ - \ " + remote_ipv4_address: + description: |- + Remote IPv4 Address. type: string - format: hex - default: '0' - minLength: 0 - maxLength: 8 + format: ipv4 + default: 0.0.0.0 x-field-uid: 3 - Rsvp.Tspec: - description: |- - Configuration for RSVP-TE TSPEC object included in Path Messages. The usage of these parameters is defined in RFC2215. + sr_mpls_sid: + description: |- + Optional SR-MPLS SID. + $ref: '#/components/schemas/Bgp.Attributes.Sid.Mpls' + x-field-uid: 4 + Bgp.Attributes.SegmentRoutingPolicy.TypeG: + description: "Type G: IPv6 Address, Interface ID for local and remote pair with\ + \ optional SID for SR MPLS.\nIt is encoded as a Segment of Type 7 in the SEGMENT_LIST\ + \ sub-tlv. " type: object properties: - token_bucket_rate: - description: |- - The rate of the traffic to be carried in this LSP in bytes per second. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. - type: number - format: float - default: 0 + flags: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeFlags' x-field-uid: 1 - token_bucket_size: + local_interface_id: description: |- - The depth of the token bucket in bytes used to specify the Token Bucket characteristics of the traffic to be carried in the LSP. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. - type: number - format: float + The local Interface Index as defined in [RFC8664]. + type: integer + format: uint32 default: 0 x-field-uid: 2 - peak_data_rate: + local_ipv6_node_address: description: |- - The peak data rate of the traffic in bytes per second used to specify the Token Bucket characteristics of the traffic to be carried in the LSP. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. - type: number - format: float - default: 0 + The IPv6 address representing the local node. + type: string + format: ipv6 + default: 0::0 x-field-uid: 3 - minimum_policed_unit: - description: "Specifies the minium length of packet frames that will be\ - \ policed. " + remote_interface_id: + description: |- + The remote Interface Index as defined in [RFC8664]. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. type: integer format: uint32 default: 0 - maximum: 65535 x-field-uid: 4 - maximum_policed_unit: - description: "Specifies the maximum length of packet frames that will be\ - \ policed. " - type: integer - format: uint32 - default: 0 - maximum: 65535 + remote_ipv6_node_address: + description: |- + IPv6 address representing the remote node. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. + type: string + format: ipv6 + default: 0::0 x-field-uid: 5 - Rsvp.FastReroute: - description: "Configuration for the optional RSVP-TE FAST_REROUTE object included\ - \ in Path Messages as defined in RFC4090. " + sr_mpls_sid: + description: |- + Optional SR-MPLS SID. + $ref: '#/components/schemas/Bgp.Attributes.Sid.Mpls' + x-field-uid: 6 + Bgp.Attributes.SegmentRoutingPolicy.TypeH: + description: "Type H: IPv6 Local and Remote addresses with optional SID for\ + \ SR MPLS.\nIt is encoded as a Segment of Type 8 in the SEGMENT_LIST sub-tlv. " type: object properties: - setup_priority: + flags: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeFlags' + x-field-uid: 1 + local_ipv6_address: description: |- - Specifies the value of the Setup Priority field. This controls whether the backup LSP should pre-empt existing LSP that is setup with certain Holding Priority. While setting up a backup LSP, preemption of existing LSP can happen if resource limitation is encountered (e.g bandwidth availability). + Local IPv6 Address. + type: string + format: ipv6 + default: 0::0 + x-field-uid: 2 + remote_ipv6_address: + description: |- + Remote IPv6 Address. + type: string + format: ipv6 + default: 0::0 + x-field-uid: 3 + sr_mpls_sid: + description: |- + Optional SR-MPLS SID. + $ref: '#/components/schemas/Bgp.Attributes.Sid.Mpls' + x-field-uid: 6 + Bgp.Attributes.SegmentRoutingPolicy.TypeI: + description: "Type I: IPv6 Node Address with optional SR Algorithm and optional\ + \ SRv6 SID.\nIt is encoded as a Segment of Type 14 in the SEGMENT_LIST sub-tlv. " + type: object + properties: + flags: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeFlags' + x-field-uid: 1 + sr_algorithm: + description: |- + SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. type: integer format: uint32 - default: 7 - maximum: 7 + maximum: 255 + default: 0 + x-field-uid: 2 + ipv6_node_address: + description: |- + IPv6 address representing a node. + type: string + format: ipv6 + default: 0::0 + x-field-uid: 3 + srv6_sid: + $ref: '#/components/schemas/Bgp.Attributes.Sid.Srv6' + x-field-uid: 4 + srv6_endpoint_behavior: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.SRv6SIDEndpointBehaviorAndStructure' + x-field-uid: 5 + Bgp.Attributes.SegmentRoutingPolicy.TypeJ: + description: "Type J: IPv6 Address, Interface ID for local and remote pair for\ + \ SRv6 with optional SID.\nIt is encoded as a Segment of Type 15 in the SEGMENT_LIST\ + \ sub-tlv. " + type: object + properties: + flags: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeFlags' x-field-uid: 1 - holding_priority: - description: "Specifies the value of the Holding Priority field. This controls\ - \ whether a new LSP being created with certain Setup Priority should pre-empt\ - \ this LSP set up with this Holding Priority. While setting up a new LSP,\ - \ preemption of existing LSP can happen if resource limitation is encountered\ - \ (e.g bandwidth availability). " + sr_algorithm: + description: |- + SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. type: integer format: uint32 - default: 7 - maximum: 7 + maximum: 255 + default: 0 x-field-uid: 2 - hop_limit: + local_interface_id: description: |- - Specifies the value of the Hop Limit field. This controls the maximum number of hops the LSP should traverse to reach the LSP end-point. + The local Interface Index as defined in [RFC8664]. type: integer format: uint32 - default: 3 - maximum: 255 - x-field-uid: 3 - bandwidth: - description: "Specifies the value of the Bandwidth field as a 32-bit IEEE\ - \ floating point integer, in bytes per second, as desired for the LSP. " - type: number - format: float default: 0 - x-field-uid: 4 - exclude_any: - description: "A 32-bit vector representing a set of attribute filters associated\ - \ with a tunnel any of which renders a link unacceptable. A null set (all\ - \ bits set to zero) doesn't render the link unacceptable. The most significant\ - \ byte in the hex-string is the farthest to the left in the byte sequence.\ - \ Leading zero bytes in the configured value may be omitted for brevity.\ - \ " + x-field-uid: 3 + local_ipv6_node_address: + description: |- + The IPv6 address representing the local node. type: string - format: hex - default: '0' - minLength: 0 - maxLength: 8 + format: ipv6 + default: 0::0 + x-field-uid: 4 + remote_interface_id: + description: |- + The remote Interface Index as defined in [RFC8664]. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. + type: integer + format: uint32 + default: 0 x-field-uid: 5 - include_any: - description: "A 32-bit vector representing a set of attribute filters associated\ - \ with a tunnel any of which renders a link acceptable. A null set (all\ - \ bits set to zero) automatically passes. The most significant byte in\ - \ the hex-string is the farthest to the left in the byte sequence. Leading\ - \ zero bytes in the configured value may be omitted for brevity. " + remote_ipv6_node_address: + description: |- + IPv6 address representing the remote node. The value MAY be set to zero when the local node address and interface identifiers are sufficient to describe the link. type: string - format: hex - default: '0' - minLength: 0 - maxLength: 8 + format: ipv6 + default: 0::0 x-field-uid: 6 - include_all: - description: "A 32-bit vector representing a set of attribute filters associated\ - \ with a tunnel all of which must be present for a link to be acceptable.\ - \ A null set (all bits set to zero) automatically passes. The most significant\ - \ byte in the hex-string is the farthest to the left in the byte sequence.\ - \ Leading zero bytes in the configured value may be omitted for brevity.\ - \ " - type: string - format: hex - default: '0' - minLength: 0 - maxLength: 8 + srv6_sid: + $ref: '#/components/schemas/Bgp.Attributes.Sid.Srv6' x-field-uid: 7 - one_to_one_backup_desired: - description: "Requests protection via the one-to-one backup method. \ - \ " - type: boolean - default: false + srv6_endpoint_behavior: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.SRv6SIDEndpointBehaviorAndStructure' x-field-uid: 8 - facility_backup_desired: - description: "Requests protection via the facility backup method. \ - \ " - type: boolean - default: false - x-field-uid: 9 - Rsvp.Ero: - description: "Configuration for the optional RSVP-TE explicit route object(ERO)\ - \ object included in Path Messages. " + Bgp.Attributes.SegmentRoutingPolicy.TypeK: + description: "Type K: IPv6 Local and Remote addresses for SRv6 with optional\ + \ SID.\nIt is encoded as a Segment of Type 16 in the SEGMENT_LIST sub-tlv. " type: object properties: - prepend_neighbor_ip: - description: |- - Determines whether the IP address of the RSVP neighbor should be added as an ERO sub-object. If it is to be included, it can be included as a Loose hop or as a Strict hop. - type: string - x-enum: - dont_prepend: - x-field-uid: 1 - prepend_loose: - x-field-uid: 2 - prepend_strict: - x-field-uid: 3 - default: prepend_loose + flags: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.TypeFlags' x-field-uid: 1 - enum: - - dont_prepend - - prepend_loose - - prepend_strict - prefix_length: - description: "If prepend_egress_ip is set to one of 'prepend_loose' or 'prepend_strict',\ - \ then set this value as the prefix length of the ERO sub-object containing\ - \ egress IP address. " + sr_algorithm: + description: |- + SR Algorithm identifier when A-Flag in on. If A-flag is not enabled, it should be set to 0 on transmission and ignored on receipt. type: integer format: uint32 - default: 32 - maximum: 32 + maximum: 255 + default: 0 x-field-uid: 2 - subobjects: + local_ipv6_address: description: |- - Array of sub-objects to be included in the ERO. These sub-objects contain the intermediate hops to be traversed by the LSP while being forwarded towards the egress endpoint. These sub-objects are included after the optional sub-object containing IP address of egress endpoint of the LSP (when present). - type: array - items: - $ref: '#/components/schemas/Rsvp.Ero.Subobject' + Local IPv6 Address. + type: string + format: ipv6 + default: 0::0 x-field-uid: 3 - Rsvp.Ero.Subobject: + remote_ipv6_address: + description: |- + Remote IPv6 Address. + type: string + format: ipv6 + default: 0::0 + x-field-uid: 4 + srv6_sid: + $ref: '#/components/schemas/Bgp.Attributes.Sid.Srv6' + x-field-uid: 5 + srv6_endpoint_behavior: + $ref: '#/components/schemas/Bgp.Attributes.SegmentRoutingPolicy.SRv6SIDEndpointBehaviorAndStructure' + x-field-uid: 6 + Bgp.Attributes.SegmentRoutingPolicy.TypeFlags: description: |- - Configuration for the ERO sub-object. + Flags for each Segment in SEGMENT_LIST sub-tlv. + - V-flag. Indicates verification is enabled. See section 5, of https://datatracker.ietf.org/doc/html/rfc9256 + - A-flag. Indicates presence of SR Algorithm field applicable to Segment Types C, D , I , J and K . + - B-Flag. Indicates presence of SRv6 Endpoint Behavior and SID Structure encoding applicable to Segment Types B , I , J and K . + - S-Flag: This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. (draft-ietf-idr-bgp-sr-segtypes-ext-03 Section 2.10). + This flag is applicable for Segment Types C, D, E, F, G, H, I, J, and K. type: object properties: - type: + v_flag: + description: "Indicates verification of segment data in is enabled. \ + \ " + type: boolean + default: false + x-field-uid: 1 + a_flag: + description: "Indicates presence of SR Algorithm field applicable to Segment\ + \ Types 3, 4, and 9. " + type: boolean + default: false + x-field-uid: 2 + s_flag: description: |- - The type of the ERO sub-object, one of IPv4 Address or AS Number. + This flag, when set, indicates the presence of the SR-MPLS or SRv6 SID depending on the segment type. + type: boolean + default: false + x-field-uid: 3 + b_flag: + description: "Indicates presence of SRv6 Endpoint Behavior and SID Structure\ + \ encoding specified in Section 2.4.4.2.4\nof draft-ietf-idr-sr-policy-safi-02.\ + \ " + type: boolean + default: false + x-field-uid: 4 + Bgp.Attributes.SegmentRoutingPolicy.SRv6SIDEndpointBehaviorAndStructure: + description: |- + Configuration for optional SRv6 Endpoint Behavior and SID Structure. Summation of lengths for Locator Block, Locator Node, Function, and Argument MUST be less than or equal to 128. - This is specified in draft-ietf-idr-sr-policy-safi-02 Section 2.4.4.2.4 + type: object + properties: + endpoint_behaviour: + description: "This is a 2-octet field that is used to specify the SRv6 Endpoint\ + \ Behavior code point for the SRv6 SID as defined \nin section 9.2 of\ + \ [RFC8986]. When set with the value 0xFFFF (i.e., Opaque), the choice\ + \ of SRv6 Endpoint Behavior is \nleft to the headend. Well known 16-bit\ + \ values for this field are available at \nhttps://www.iana.org/assignments/segment-routing/segment-routing.xhtml\ + \ ." type: string - x-enum: - ipv4: - x-field-uid: 1 - as_number: - x-field-uid: 2 - default: ipv4 + format: hex + default: ffff + maxLength: 4 x-field-uid: 1 - enum: - - ipv4 - - as_number - ipv4_address: + lb_length: description: |- - IPv4 address that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'ipv4'. - type: string - format: ipv4 - default: 0.0.0.0 + SRv6 SID Locator Block length in bits. + type: integer + format: uint32 + maximum: 128 + default: 0 x-field-uid: 2 - prefix_length: + ln_length: description: |- - Prefix length for the IPv4 address in the ERO sub-object. This field is applicable only if the value of 'type' is set to 'ipv4'. + SRv6 SID Locator Node length in bits. type: integer format: uint32 - default: 32 - maximum: 32 + maximum: 128 + default: 0 x-field-uid: 3 - as_number: + func_length: description: |- - Autonomous System number to be set in the ERO sub-object that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'as_number'. Note that as per RFC3209, 4-byte AS encoding is not supported. + SRv6 SID Function length in bits. type: integer format: uint32 + maximum: 128 default: 0 - maximum: 65535 x-field-uid: 4 - hop_type: + arg_length: description: |- - The hop type of the ERO sub-object, one of Strict or Loose. - type: string - x-enum: - strict: - x-field-uid: 1 - loose: - x-field-uid: 2 - default: loose + SRv6 SID Arguments length in bits. + type: integer + format: uint32 + maximum: 128 + default: 0 x-field-uid: 5 - enum: - - strict - - loose - Flow: + Bgp.NLRIPrefixSegmentRoutingDistinguisher: description: |- - A high level data plane traffic flow. + Optional field in the NLRI carrying the distinguisher for Segment Routing Policy NLRI with SAFI 73. + type: object + properties: + value: + description: "The value of the optional Segment Routing distinguisher of\ + \ the prefix. " + type: integer + format: uint32 + default: 1 + x-field-uid: 1 + Bgp.V6Peer: + description: |- + Configuration for BGPv6 peer settings and routes. type: object required: - - tx_rx + - peer_address + - as_type + - as_number - name properties: - tx_rx: + peer_address: description: |- - The transmit and receive endpoints. - $ref: '#/components/schemas/Flow.TxRx' + IPv6 address of the BGP peer for the session + type: string + format: ipv6 x-field-uid: 1 - packet: - description: "The list of protocol headers defining the shape of all \n\ - intended packets in corresponding flow as it is transmitted\nby traffic-generator\ - \ port.\n\nThe order of protocol headers assigned to the list is the\n\ - order they will appear on the wire.\n\nIn the case of an empty list the\ - \ keyword/value of minItems: 1 \nindicates that an implementation MUST\ - \ provide at least one \nFlow.Header object.\n\nThe default value for\ - \ the Flow.Header choice property is ethernet \nwhich will result in an\ - \ implementation by default providing at least \none ethernet packet header." - type: array - minItems: 1 - items: - $ref: '#/components/schemas/Flow.Header' + segment_routing: + $ref: '#/components/schemas/Bgp.V6SegmentRouting' x-field-uid: 2 - egress_packet: - description: "Under Review: The packet header schema for egress tracking\ - \ currently exposes unwanted fields. The query structure for tagged metrics\ - \ inside flows metrics requires documenting expected response format.\n\ - \nUnder Review: The packet header schema for egress tracking currently\ - \ exposes unwanted fields. The query structure for tagged metrics inside\ - \ flows metrics requires documenting expected response format.\n\nThe\ - \ list of protocol headers defining the shape of all \nintended packets\ - \ in corresponding flow as it is received\nby traffic-generator port.\n\ - \nFor all protocol headers, only the `metric_tags` property is configurable." + evpn_ethernet_segments: + description: "This contains the list of Ethernet Virtual Private Network\ + \ (EVPN) Ethernet Segments (ES) Per BGP Peer for IPv6 Address Family Identifier\ + \ (AFI).\n\nEach Ethernet Segment contains a list of EVPN Instances (EVIs)\ + \ . \nEach EVI contains a list of Broadcast Domains. \nEach Broadcast\ + \ Domain contains a list of MAC/IP Ranges. \n\n is responsible for advertising Ethernet Auto-discovery\ + \ Route Per EVI (Type 1).\n\n is responsible for\ + \ advertising Ethernet Auto-discovery Route Per Ethernet Segment (Type\ + \ 1).\n\n is responsible\ + \ for advertising MAC/IP Advertisement Route (Type 2).\n\n is responsible for advertising Inclusive Multicast\ + \ Ethernet Tag Route (Type 3).\n\nEthernet Segment is responsible for\ + \ advertising Ethernet Segment Route (Type 4)." type: array items: - $ref: '#/components/schemas/Flow.Header' - x-status: - status: under-review - information: The packet header schema for egress tracking currently exposes - unwanted fields. The query structure for tagged metrics inside flows - metrics requires documenting expected response format. - x-field-uid: 9 - size: - description: |- - The size of the packets. - $ref: '#/components/schemas/Flow.Size' + $ref: '#/components/schemas/BgpV6.EthernetSegment' x-field-uid: 3 - rate: - description: |- - The transmit rate of the packets. - $ref: '#/components/schemas/Flow.Rate' + as_type: x-field-uid: 4 - duration: - description: |- - The transmit duration of the packets. - $ref: '#/components/schemas/Flow.Duration' - x-field-uid: 5 - metrics: - description: "Flow metrics. " - $ref: '#/components/schemas/Flow.Metrics' - x-field-uid: 6 - name: - x-field-uid: 7 - description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - Flow.TxRx: - description: "A container for different types of transmit and receive \nendpoint\ - \ containers." - type: object - properties: - choice: description: |- - The type of transmit and receive container used by the flow. + The type of BGP autonomous system. External BGP is used for BGP links between two or more autonomous systems (ebgp). Internal BGP is used within a single autonomous system (ibgp). BGP property defaults are aligned with this object defined as an internal BGP peer. If the as_type is specified as 'ebgp' then other properties will need to be specified as per an external BGP peer. Specifically, for 'ebgp', 'as_set_mode' attribute in 'as_path' field in any Route Range should be changed from default value 'do_not_include_local_as' to any other value. type: string - default: port - x-field-uid: 1 x-enum: - port: + ibgp: x-field-uid: 1 - device: + ebgp: x-field-uid: 2 enum: - - port - - device - port: - $ref: '#/components/schemas/Flow.Port' - x-field-uid: 2 - device: - $ref: '#/components/schemas/Flow.Router' - x-field-uid: 3 - Flow.Port: - description: "A container for a transmit port and 0..n intended receive ports.\n\ - When assigning this container to a flow the flows's \npacket headers will\ - \ not be populated with any address resolution \ninformation such as source\ - \ and/or destination addresses. \nFor example Flow.Ethernet dst mac address\ - \ values will be defaulted to 0. \nFor full control over the Flow.properties.packet\ - \ header contents use this \ncontainer. " + - ibgp + - ebgp + as_number: + x-field-uid: 5 + description: |- + Autonomous System Number (AS number or ASN) + type: integer + format: uint32 + as_number_width: + x-field-uid: 6 + description: |- + The width in bytes of the as_number values. Any as_number values that exceeds the width MUST result in an error. + type: string + default: four + x-enum: + two: + x-field-uid: 1 + four: + x-field-uid: 2 + enum: + - two + - four + advanced: + x-field-uid: 7 + $ref: '#/components/schemas/Bgp.Advanced' + capability: + x-field-uid: 8 + $ref: '#/components/schemas/Bgp.Capability' + learned_information_filter: + x-field-uid: 9 + $ref: '#/components/schemas/Bgp.LearnedInformationFilter' + v4_routes: + x-field-uid: 10 + description: |- + Emulated BGPv4 route ranges. + type: array + items: + $ref: '#/components/schemas/Bgp.V4RouteRange' + v6_routes: + x-field-uid: 11 + description: |- + Emulated BGPv6 route ranges. + type: array + items: + $ref: '#/components/schemas/Bgp.V6RouteRange' + v4_srte_policies: + x-field-uid: 12 + description: |- + Segment Routing Traffic Engineering (SR TE) Policies for IPv4 Address Family Identifier (AFI). + type: array + items: + $ref: '#/components/schemas/BgpSrte.V4Policy' + v6_srte_policies: + x-field-uid: 13 + description: |- + Segment Routing Traffic Engineering (SR TE) Policies for IPv6 Address Family Identifier (AFI). + type: array + items: + $ref: '#/components/schemas/BgpSrte.V6Policy' + name: + x-field-uid: 14 + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + graceful_restart: + x-field-uid: 15 + $ref: '#/components/schemas/Bgp.GracefulRestart' + replay_updates: + description: "BGP Updates to be sent to the peer as specified after the\ + \ session is established. " + $ref: '#/components/schemas/Bgp.UpdateReplay' + x-field-uid: 16 + Bgp.V6Interface: + description: |- + Configuration for emulated BGPv6 peers and routes on a single IPv6 interface. type: object required: - - tx_name + - ipv6_name properties: - tx_name: + ipv6_name: description: | - The unique name of a port that is the transmit port. + The unique name of IPv6 Loopback IPv6 interface or DHCPv4 client used as the source IP for this list of BGP peers. x-constraint: - - /components/schemas/Port/properties/name - - /components/schemas/Lag/properties/name + - /components/schemas/Device.Ipv6/properties/name + - /components/schemas/Device.Ipv6Loopback/properties/name + - /components/schemas/Device.Dhcpv6client/properties/name x-constraint: - - /components/schemas/Port/properties/name - - /components/schemas/Lag/properties/name + - /components/schemas/Device.Ipv6/properties/name + - /components/schemas/Device.Ipv6Loopback/properties/name + - /components/schemas/Device.Dhcpv6client/properties/name type: string x-constraint: - - /components/schemas/Port/properties/name - - /components/schemas/Lag/properties/name + - /components/schemas/Device.Ipv6/properties/name + - /components/schemas/Device.Ipv6Loopback/properties/name + - /components/schemas/Device.Dhcpv6client/properties/name x-field-uid: 1 - rx_name: - description: | - Deprecated: This property is deprecated in favor of property rx_names - - Deprecated: This property is deprecated in favor of property rx_names - - The unique name of a port that is the intended receive port. - - x-constraint: - - /components/schemas/Port/properties/name - - /components/schemas/Lag/properties/name - - - x-constraint: - - /components/schemas/Port/properties/name - - /components/schemas/Lag/properties/name - x-status: - status: deprecated - information: This property is deprecated in favor of property rx_names - type: string - x-constraint: - - /components/schemas/Port/properties/name - - /components/schemas/Lag/properties/name - x-field-uid: 2 - rx_names: - description: | - Unique name of ports or lags that are intended receive endpoints. - - x-constraint: - - /components/schemas/Port/properties/name - - /components/schemas/Lag/properties/name - - - x-constraint: - - /components/schemas/Port/properties/name - - /components/schemas/Lag/properties/name + peers: + description: |- + This contains the list of BGPv6 peers configured on this interface. type: array items: - description: |- - The unique name of a port or lag that is the intended receive port. - type: string - x-constraint: - - /components/schemas/Port/properties/name - - /components/schemas/Lag/properties/name - x-field-uid: 3 - Flow.Router: + $ref: '#/components/schemas/Bgp.V6Peer' + x-field-uid: 2 + Bgp.V6SegmentRouting: description: |- - A container for declaring a map of 1..n transmit devices to 1..n receive devices. This allows for a single flow to have different tx to rx device flows such as a single one to one map or a many to many map. + Configuration for BGPv6 segment routing settings. type: object - required: - - tx_names - - rx_names properties: - mode: - description: "Determines the intent of creating traffic sub-flow(s) between\ - \ the device \nendpoints, from the entities of tx_names to the\ - \ entities of rx_names \nto derive how auto packet fields\ - \ can be populated with \nthe actual value(s) by the implementation.\n\ - \nThe one_to_one mode creates traffic sub-flow(s) between each\ - \ device endpoint pair in \ntx_names to rx_names by index.\nThe length\ - \ of tx_names and rx_names MUST be the same.\nThe same device name can\ - \ be repeated multiple times in tx_names or rx_names, in any order to\ - \ create desired meshing between device(s).\nFor 2 values in tx_names\ - \ and 2 values in rx_names, 2 device endpoint pairs would be generated\ - \ (each pair representing a traffic sub-flow).\n\nThe mesh mode\ - \ creates traffic sub-flow(s) between each value in tx_names to\nevery\ - \ value in rx_names, forming the device endpoint pair(s).\nFor 2 values\ - \ in tx_names and 3 values in rx_names, generated device endpoint pairs\ - \ would be 2x3=6. \n\nA generated device endpoint pair with same device\ - \ endpoint name for both transmit & receive device endpoint MUST raise\ - \ an error.\n\nPacket fields of type auto would be populated with\ - \ one value for each device endpoint pair (representing the traffic sub-flow).\ - \ \nThe value would be determined considering transmit & receive device\ - \ of the sub-flow. And the sequence of the populated value(s) \nwould\ - \ be in the order of generated device endpoint pair(s).\nIf 2 device endpoint\ - \ pairs are generated (based on mode, tx_names and rx_names), say (d1\ - \ to d3) and (d2 to d3), and ethernet.dst is set as auto, then\ - \ \nthe auto field would be replaced by the implementation with\ - \ a sequence of 2 values, [v1,v2] where \nv1 is determined using context\ - \ (d1,d3) and v2 using context (d2,d3).\nThe final outcome is that packets\ - \ generated on the wire will contain the values v1,v2,v1,... for ethernet.dst\ - \ field. Any non-auto packet fields \nshould be configured accordingly.\ - \ For example, non-auto packet field ethernet.src can be configured with\ - \ values [u1, u2], where \nu1 & u2 are source MAC of the connected interface\ - \ of device d1 and d2 respectively. Then packets on the wire will contain\ - \ correct value pairs \n(u1,v1),(u2,v2),(u1,v1),... for (ethernet.src,ethernet.dst)\ - \ fields." - type: string - default: mesh + ingress_supports_vpn: + description: |- + TBD + type: boolean + default: false x-field-uid: 1 - x-enum: - mesh: - x-field-uid: 1 - one_to_one: - x-field-uid: 2 - enum: - - mesh - - one_to_one - tx_names: - type: array - items: - description: |- - The unique name of an emulated device that will be transmitting. - type: string - x-constraint: - - /components/schemas/Device.Ethernet/properties/name - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv6/properties/name - - /components/schemas/Bgp.V4RouteRange/properties/name - - /components/schemas/Bgp.V6RouteRange/properties/name - - /components/schemas/Bgp.CMacIpRange/properties/name - - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name - - /components/schemas/Isis.V4RouteRange/properties/name - - /components/schemas/Isis.V6RouteRange/properties/name - example: - - Eth 1 - - Eth 2 - - Eth 3 - - IPv4 1 - - IPv6 1 - - Bgp V4RouteRange 1 - - Bgp V6RouteRange 1 + reduced_encapsulation: + description: |- + TBD + type: boolean + default: false x-field-uid: 2 - description: | + copy_time_to_live: + description: |- TBD - - x-constraint: - - /components/schemas/Device.Ethernet/properties/name - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv6/properties/name - - /components/schemas/Bgp.V4RouteRange/properties/name - - /components/schemas/Bgp.V6RouteRange/properties/name - - /components/schemas/Bgp.CMacIpRange/properties/name - - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name - - /components/schemas/Isis.V4RouteRange/properties/name - - /components/schemas/Isis.V6RouteRange/properties/name - - - x-constraint: - - /components/schemas/Device.Ethernet/properties/name - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv6/properties/name - - /components/schemas/Bgp.V4RouteRange/properties/name - - /components/schemas/Bgp.V6RouteRange/properties/name - - /components/schemas/Bgp.CMacIpRange/properties/name - - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name - - /components/schemas/Isis.V4RouteRange/properties/name - - /components/schemas/Isis.V6RouteRange/properties/name - rx_names: - type: array - items: - description: |- - The unique name of an emulated device that will be receiving. - type: string - x-constraint: - - /components/schemas/Device.Ethernet/properties/name - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv6/properties/name - - /components/schemas/Bgp.V4RouteRange/properties/name - - /components/schemas/Bgp.V6RouteRange/properties/name - - /components/schemas/Bgp.CMacIpRange/properties/name - - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name - - /components/schemas/Isis.V4RouteRange/properties/name - - /components/schemas/Isis.V6RouteRange/properties/name - example: - - Eth 1 - - Eth 2 - - Eth 3 - - IPv4 1 - - IPv6 1 - - Bgp V4RouteRange 1 - - Bgp V6RouteRange 1 + type: boolean + default: false x-field-uid: 3 - description: | + time_to_live: + description: |- TBD - - x-constraint: - - /components/schemas/Device.Ethernet/properties/name - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv6/properties/name - - /components/schemas/Bgp.V4RouteRange/properties/name - - /components/schemas/Bgp.V6RouteRange/properties/name - - /components/schemas/Bgp.CMacIpRange/properties/name - - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name - - /components/schemas/Isis.V4RouteRange/properties/name - - /components/schemas/Isis.V6RouteRange/properties/name - - - x-constraint: - - /components/schemas/Device.Ethernet/properties/name - - /components/schemas/Device.Ipv4/properties/name - - /components/schemas/Device.Ipv6/properties/name - - /components/schemas/Bgp.V4RouteRange/properties/name - - /components/schemas/Bgp.V6RouteRange/properties/name - - /components/schemas/Bgp.CMacIpRange/properties/name - - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name - - /components/schemas/Isis.V4RouteRange/properties/name - - /components/schemas/Isis.V6RouteRange/properties/name - Flow.Header: - description: |- - Configuration for all traffic packet headers - type: object - properties: - choice: - description: "The available types of flow headers. If one is not provided\ - \ the \ndefault ethernet packet header MUST be provided." - type: string - default: ethernet - x-field-uid: 1 - x-enum: - custom: - x-field-uid: 1 - ethernet: - x-field-uid: 2 - vlan: - x-field-uid: 3 - vxlan: - x-field-uid: 4 - ipv4: - x-field-uid: 5 - ipv6: - x-field-uid: 6 - pfcpause: - x-field-uid: 7 - ethernetpause: - x-field-uid: 8 - tcp: - x-field-uid: 9 - udp: - x-field-uid: 10 - gre: - x-field-uid: 11 - gtpv1: - x-field-uid: 12 - gtpv2: - x-field-uid: 13 - arp: - x-field-uid: 14 - icmp: - x-field-uid: 15 - icmpv6: - x-field-uid: 16 - ppp: - x-field-uid: 17 - igmpv1: - x-field-uid: 18 - mpls: - x-field-uid: 19 - snmpv2c: - x-field-uid: 20 - rsvp: - x-field-uid: 21 - enum: - - custom - - ethernet - - vlan - - vxlan - - ipv4 - - ipv6 - - pfcpause - - ethernetpause - - tcp - - udp - - gre - - gtpv1 - - gtpv2 - - arp - - icmp - - icmpv6 - - ppp - - igmpv1 - - mpls - - snmpv2c - - rsvp - custom: - $ref: '#/components/schemas/Flow.Custom' - x-field-uid: 2 - ethernet: - $ref: '#/components/schemas/Flow.Ethernet' - x-field-uid: 3 - vlan: - $ref: '#/components/schemas/Flow.Vlan' + type: integer + format: uint32 + default: 0 x-field-uid: 4 - vxlan: - $ref: '#/components/schemas/Flow.Vxlan' + max_sids_per_srh: + description: |- + TBD + type: integer + format: uint32 + default: 0 + maximum: 255 x-field-uid: 5 - ipv4: - $ref: '#/components/schemas/Flow.Ipv4' + auto_generate_segment_left_value: + description: |- + TBD + type: boolean + default: false x-field-uid: 6 - ipv6: - $ref: '#/components/schemas/Flow.Ipv6' + segment_left_value: + description: |- + TBD + type: integer + format: uint32 + default: 0 x-field-uid: 7 - pfcpause: - $ref: '#/components/schemas/Flow.PfcPause' + advertise_sr_te_policy: + description: |- + TBD + type: boolean + default: false x-field-uid: 8 - ethernetpause: - $ref: '#/components/schemas/Flow.EthernetPause' - x-field-uid: 9 - tcp: - $ref: '#/components/schemas/Flow.Tcp' - x-field-uid: 10 - udp: - $ref: '#/components/schemas/Flow.Udp' - x-field-uid: 11 - gre: - $ref: '#/components/schemas/Flow.Gre' - x-field-uid: 12 - gtpv1: - $ref: '#/components/schemas/Flow.Gtpv1' - x-field-uid: 13 - gtpv2: - $ref: '#/components/schemas/Flow.Gtpv2' - x-field-uid: 14 - arp: - $ref: '#/components/schemas/Flow.Arp' - x-field-uid: 15 - icmp: - $ref: '#/components/schemas/Flow.Icmp' - x-field-uid: 16 - icmpv6: - $ref: '#/components/schemas/Flow.Icmpv6' - x-field-uid: 17 - ppp: - $ref: '#/components/schemas/Flow.Ppp' - x-field-uid: 18 - igmpv1: - $ref: '#/components/schemas/Flow.Igmpv1' - x-field-uid: 19 - mpls: - $ref: '#/components/schemas/Flow.Mpls' - x-field-uid: 20 - snmpv2c: - $ref: '#/components/schemas/Flow.Snmpv2c' - x-field-uid: 21 - rsvp: - $ref: '#/components/schemas/Flow.Rsvp' - x-field-uid: 22 - Flow.Custom: - type: object + BgpV6.EthernetSegment: description: |- - Custom packet header - required: - - bytes + Configuration for BGP Ethernet Segment ranges. Advertises following routes - + + Type 4 - Ethernet Segment Route + type: object properties: - bytes: + df_election: description: |- - A custom packet header defined as a string of hex bytes. The string MUST contain sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be discarded. This packet header can be used in multiple places in the packet. - type: string - pattern: '^[A-Fa-f0-9: ]+$' + Designated Forwarder (DF) election configuration. + $ref: '#/components/schemas/Bgp.EthernetSegment.DfElection' x-field-uid: 1 - metric_tags: + evis: description: |- - One or more metric tags can be used to enable tracking portion of or all bits - in a corresponding header field for metrics per each applicable value. - These would appear as tagged metrics in corresponding flow metrics. + This contains the list of EVIs. type: array items: - $ref: '#/components/schemas/Flow.Custom.MetricTag' + $ref: '#/components/schemas/BgpV6.EvpnEvis' x-field-uid: 2 - Flow.Custom.MetricTag: - description: |- - Metric Tag can be used to enable tracking portion of or all bits - in a corresponding header field for metrics per each applicable value. - These would appear as tagged metrics in corresponding flow metrics. - type: object - required: - - name - properties: - name: + esi: + x-field-uid: 3 description: |- - Name used to identify the metrics associated with the values applicable - for configured offset and length inside corresponding header field + 10-octet Ethernet Segment Identifier (ESI) Example - For multi-home scenario nonZero ESI is '10000000000000000000' . type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-field-uid: 1 - offset: + format: hex + default: '00000000000000000000' + active_mode: + x-field-uid: 4 description: |- - Offset in bits relative to start of corresponding header field + Single Active or All Active mode Redundancy mode selection for Multi-home. + type: string + default: all_active + x-enum: + single_active: + x-field-uid: 1 + all_active: + x-field-uid: 2 + enum: + - single_active + - all_active + esi_label: + x-field-uid: 5 + description: "The label value to be advertised as ESI Label in ESI Label\ + \ Extended Community. This is included in Ethernet Auto-discovery per\ + \ ES Routes advertised by a router. " type: integer format: uint32 + maximum: 16777215 default: 0 - x-field-uid: 2 - length: - description: |- - Number of bits to track for metrics starting from configured offset - of corresponding header field - type: integer - format: uint32 - default: 1 - minimum: 1 - x-field-uid: 3 - Flow.Ethernet: - description: |- - Ethernet packet header - type: object - properties: - dst: - x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Ethernet.Dst' - src: - x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Ethernet.Src' - ether_type: - x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Ethernet.EtherType' - pfc_queue: - x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Ethernet.PfcQueue' - Flow.Vlan: - description: |- - VLAN packet header - type: object - properties: - priority: - x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Vlan.Priority' - cfi: - x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Vlan.Cfi' - id: - x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Vlan.Id' - tpid: - x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Vlan.Tpid' - Flow.Vxlan: - description: |- - VXLAN packet header - type: object - properties: - flags: - x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Vxlan.Flags' - reserved0: - x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Vxlan.Reserved0' - vni: - x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Vxlan.Vni' - reserved1: - x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Vxlan.Reserved1' - Flow.Ipv4: - description: |- - IPv4 packet header - type: object - properties: - version: - x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Version' - header_length: - x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.HeaderLength' - priority: - $ref: '#/components/schemas/Flow.Ipv4.Priority' - x-field-uid: 3 - total_length: - x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.TotalLength' - identification: - x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Identification' - reserved: + advanced: x-field-uid: 6 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Reserved' - dont_fragment: + $ref: '#/components/schemas/Bgp.RouteAdvanced' + communities: x-field-uid: 7 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.DontFragment' - more_fragments: + description: |- + Optional community settings. + type: array + items: + $ref: '#/components/schemas/Bgp.Community' + ext_communities: x-field-uid: 8 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.MoreFragments' - fragment_offset: - x-field-uid: 9 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.FragmentOffset' - time_to_live: - x-field-uid: 10 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.TimeToLive' - protocol: - x-field-uid: 11 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Protocol' - header_checksum: - x-field-uid: 12 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.HeaderChecksum' - src: - x-field-uid: 13 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Src' - dst: - x-field-uid: 14 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Dst' - options: + description: |- + Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. type: array - minItems: 0 items: - $ref: '#/components/schemas/Flow.Ipv4.Options' - x-field-uid: 15 - Flow.Ipv4.Options: - description: "IPv4 options are optional extensions for the IPv4 header that\ - \ can be utilised to provide additional information about the IPv4 datagram.\ - \ It is encoded as a series of type, length and value attributes. The IP\ - \ header length MUST be increased to accommodate the extra bytes needed to\ - \ encode the IP options. The length of the all options included to a IPv4\ - \ header should not exceed 40 bytes since IPv4 Header length (4 bits) can\ - \ at max specify 15 4-word octets for a total of 60 bytes which includes 20\ - \ bytes needed for mandatory attributes of the IPv4 header. If the user adds\ - \ multiples IPv4 options that exceeds 40 bytes and specify header length as\ - \ \"auto\", implementation should throw error. Currently IP options supported\ - \ are: 1. router_alert option allows devices to intercept packets not addressed\ - \ to them directly as defined in RFC2113. 2. custom option is provided to\ - \ configure user defined IP options as needed. " + $ref: '#/components/schemas/Bgp.ExtCommunity' + as_path: + x-field-uid: 9 + description: |- + Optional AS PATH settings. + $ref: '#/components/schemas/Bgp.AsPath' + BgpV6.EvpnEvis: + description: "This contains a list of different flavors of EVPN. \nFor example\ + \ EVPN over VXLAN or EVPN over MPLS etc to be configured per Ethernet segment.\ + \ \nNeed to instantiate correct type of EVPN instance as per requirement." type: object properties: choice: type: string - default: router_alert + default: evi_vxlan x-field-uid: 1 x-enum: - router_alert: + evi_vxlan: x-field-uid: 1 - custom: - x-field-uid: 2 enum: - - router_alert - - custom - custom: - $ref: '#/components/schemas/Flow.Ipv4Options.Custom' + - evi_vxlan + evi_vxlan: + description: "EVPN VXLAN instance to be configured per Ethernet Segment.\ + \ " + $ref: '#/components/schemas/BgpV6.EviVxlan' x-field-uid: 2 - Flow.Ipv4Options.Custom: + BgpV6.EviVxlan: description: |- - User defined IP options to be appended to the IPv4 header. + Configuration for BGP EVPN EVI. Advertises following routes - + + Type 3 - Inclusive Multicast Ethernet Tag Route + + Type 1 - Ethernet Auto-discovery Route (Per EVI) + + Type 1 - Ethernet Auto-discovery Route (Per ES) type: object properties: - type: - $ref: '#/components/schemas/Flow.Ipv4Options.Custom.Type' - x-field-uid: 1 - length: - $ref: '#/components/schemas/Flow.Ipv4Options.Custom.Length' - x-field-uid: 2 - value: + broadcast_domains: description: |- - Value of the option field should not excced 38 bytes since maximum 40 bytes can be added as options in IPv4 header. For type and length requires 2 bytes, hence maximum of 38 bytes are expected. Maximum length of this attribute is 76 (38 * 2 hex character per byte). - type: string - format: hex - minLength: 0 - maxLength: 76 - default: '0000' - x-field-uid: 3 - Flow.Ipv4Options.Custom.Type: - description: |- - Type options for custom options. - type: object - properties: - copied_flag: + This contains the list of Broadcast Domains to be configured per EVI. + type: array + items: + $ref: '#/components/schemas/BgpV6.EviVxlan.BroadcastDomain' x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Ipv4Options.Custom.Type.CopiedFlag' - option_class: + replication_type: x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Ipv4Options.Custom.Type.OptionClass' - option_number: - x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Ipv4Options.Custom.Type.OptionNumber' - Flow.Ipv4Options.Custom.Length: - description: |- - Length for custom options. - type: object - properties: - choice: description: |- - auto or configured value. + This model only supports Ingress Replication type: string - default: auto - x-field-uid: 1 + default: ingress_replication x-enum: - auto: + ingress_replication: x-field-uid: 1 - value: - x-field-uid: 2 enum: - - auto - - value - auto: + - ingress_replication + pmsi_label: + x-field-uid: 3 description: |- - The OTG implementation can provide a system generated value for this property. If the OTG is unable to generate a value the default value must be used. + Downstream assigned VNI to be carried as Part of P-Multicast Service Interface Tunnel attribute (PMSI Tunnel Attribute) in Type 3 Inclusive Multicast Ethernet Tag Route. type: integer format: uint32 - default: 0 - x-field-uid: 2 - value: + maximum: 16777215 + default: 16 + ad_label: + x-field-uid: 4 + description: |- + The Auto-discovery Route label (AD label) value, which gets advertised in the Ethernet Auto-discovery Route per type: integer format: uint32 + maximum: 16777215 default: 0 - x-field-uid: 3 - Flow.Ipv4.Priority: + route_distinguisher: + x-field-uid: 5 + description: |- + Colon separated Extended Community value of 6 Bytes - "AS number: Value" identifying an EVI. Example - for the as_2octet "60005:100". + $ref: '#/components/schemas/Bgp.RouteDistinguisher' + route_target_export: + x-field-uid: 6 + description: "List of Layer 2 Virtual Network Identifier (L2VNI) export\ + \ targets associated with this EVI. " + type: array + items: + $ref: '#/components/schemas/Bgp.RouteTarget' + route_target_import: + x-field-uid: 7 + description: "List of L2VNI import targets associated with this EVI. " + type: array + items: + $ref: '#/components/schemas/Bgp.RouteTarget' + l3_route_target_export: + x-field-uid: 8 + description: |- + List of Layer 3 Virtual Network Identifier (L3VNI) Export Route Targets. + type: array + items: + $ref: '#/components/schemas/Bgp.RouteTarget' + l3_route_target_import: + x-field-uid: 9 + description: |- + List of L3VNI Import Route Targets. + type: array + items: + $ref: '#/components/schemas/Bgp.RouteTarget' + advanced: + x-field-uid: 10 + $ref: '#/components/schemas/Bgp.RouteAdvanced' + communities: + x-field-uid: 11 + description: |- + Optional community settings. + type: array + items: + $ref: '#/components/schemas/Bgp.Community' + ext_communities: + x-field-uid: 12 + description: |- + Optional Extended Community settings. The Extended Communities Attribute is a transitive optional BGP attribute, with the Type Code 16. Community and Extended Communities attributes are utilized to trigger routing decisions, such as acceptance, rejection, preference, or redistribution. An extended community is an 8-Bytes value. It is divided into two main parts. The first 2 Bytes of the community encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a format defined by the type and sub-type field. Extended communities provide a larger range for grouping or categorizing communities. When type is administrator_as_2octet or administrator_as_4octet, the valid sub types are route target and origin. The valid value for administrator_as_2octet and administrator_as_4octet type is either two byte AS followed by four byte local administrator id or four byte AS followed by two byte local administrator id. When type is administrator_ipv4_address the valid sub types are route target and origin. The valid value for administrator_ipv4_address is a four byte IPv4 address followed by a two byte local administrator id. When type is opaque, valid sub types are color and encapsulation. When sub type is color, first two bytes of the value field contain flags and last four bytes contains the value of the color. When sub type is encapsulation the first four bytes of value field are reserved and last two bytes carries the tunnel type from IANA's "ETHER TYPES" registry e.g IPv4 (protocol type = 0x0800), IPv6 (protocol type = 0x86dd), and MPLS (protocol type = 0x8847). When type is administrator_as_2octet_link_bandwidth the valid sub type is extended_bandwidth. The first two bytes of the value field contains the AS number and the last four bytes contains the bandwidth in IEEE floating point format. When type is evpn the valid subtype is mac_address. In the value field the low-order bit of the first byte(Flags) is defined as the "Sticky/static" flag and may be set to 1, indicating the MAC address is static and cannot move. The second byte is reserved and the last four bytes contain the sequence number which is used to ensure that PEs retain the correct MAC/IP Advertisement route when multiple updates occur for the same MAC address. + type: array + items: + $ref: '#/components/schemas/Bgp.ExtCommunity' + as_path: + x-field-uid: 13 + description: |- + Optional AS PATH settings. + $ref: '#/components/schemas/Bgp.AsPath' + BgpV6.EviVxlan.BroadcastDomain: description: |- - A container for ipv4 raw, tos, dscp ip priorities. + Configuration for Broadcast Domains per EVI. type: object properties: - choice: - type: string - default: dscp + cmac_ip_range: + description: "This contains the list of Customer MAC/IP Ranges to be configured\ + \ per Broadcast Domain. \n\nAdvertises following route - \nType 2 - MAC/IP\ + \ Advertisement Route." + type: array + items: + $ref: '#/components/schemas/Bgp.CMacIpRange' x-field-uid: 1 - x-enum: - raw: - x-field-uid: 1 - tos: - x-field-uid: 2 - dscp: - x-field-uid: 3 - enum: - - raw - - tos - - dscp - raw: + ethernet_tag_id: x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Priority.Raw' - tos: - $ref: '#/components/schemas/Flow.Ipv4.Tos' + description: |- + The Ethernet Tag ID of the Broadcast Domain. + type: integer + format: uint32 + default: 0 + vlan_aware_service: x-field-uid: 3 - dscp: - $ref: '#/components/schemas/Flow.Ipv4.Dscp' - x-field-uid: 4 - Flow.Ipv4.Dscp: - description: |- - Differentiated services code point (DSCP) packet field. - type: object + description: |- + VLAN-Aware service to be enabled or disabled. + type: boolean + default: false + Device.Vxlan: properties: - phb: + v4_tunnels: + description: |- + IPv4 VXLAN Tunnels + type: array + items: + $ref: '#/components/schemas/Vxlan.V4Tunnel' x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Dscp.Phb' - ecn: + v6_tunnels: + description: |- + IPv6 VXLAN Tunnels + type: array + items: + $ref: '#/components/schemas/Vxlan.V6Tunnel' x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Dscp.Ecn' - Flow.Ipv4.Tos: + Vxlan.V4Tunnel: description: |- - Type of service (TOS) packet field. + Configuration and operational state parameters relating to IPv4 VXLAN tunnel end-point interface. type: object + required: + - source_interface + - vni + - name properties: - precedence: + source_interface: + description: | + Determines the source interface. + + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv4Loopback/properties/name + + + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv4Loopback/properties/name + type: string + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv4Loopback/properties/name x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Tos.Precedence' - delay: + destination_ip_mode: + $ref: '#/components/schemas/Vxlan.V4Tunnel.DestinationIPMode' x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Tos.Delay' - throughput: + vni: x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Tos.Throughput' - reliability: + description: |- + VXLAN Network Identifier (VNI) to distinguish network instances on the wire + type: integer + format: uint32 + minimum: 1 + maximum: 16777215 + name: x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Tos.Reliability' - monetary: - x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Tos.Monetary' - unused: - x-field-uid: 6 - $ref: '#/components/schemas/Pattern.Flow.Ipv4.Tos.Unused' - Flow.Ipv6: + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + Vxlan.V6Tunnel: description: |- - IPv6 packet header + Configuration and operational state parameters relating to IPv6 VXLAN tunnel end-point interface. type: object + required: + - source_interface + - vni + - name properties: - version: + source_interface: + description: | + Determines the source interface. + + x-constraint: + - /components/schemas/Device.Ipv6/properties/name + - /components/schemas/Device.Ipv6Loopback/properties/name + + + x-constraint: + - /components/schemas/Device.Ipv6/properties/name + - /components/schemas/Device.Ipv6Loopback/properties/name + type: string + x-constraint: + - /components/schemas/Device.Ipv6/properties/name + - /components/schemas/Device.Ipv6Loopback/properties/name x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Ipv6.Version' - traffic_class: + destination_ip_mode: + $ref: '#/components/schemas/Vxlan.V6Tunnel.DestinationIPMode' x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Ipv6.TrafficClass' - flow_label: + vni: x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Ipv6.FlowLabel' - payload_length: + description: |- + VXLAN Network Identifier (VNI) to distinguish network instances on the wire + type: integer + format: uint32 + minimum: 1 + maximum: 16777215 + name: x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Ipv6.PayloadLength' - next_header: - x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.Ipv6.NextHeader' - hop_limit: - x-field-uid: 6 - $ref: '#/components/schemas/Pattern.Flow.Ipv6.HopLimit' - src: - x-field-uid: 7 - $ref: '#/components/schemas/Pattern.Flow.Ipv6.Src' - dst: - x-field-uid: 8 - $ref: '#/components/schemas/Pattern.Flow.Ipv6.Dst' - Flow.PfcPause: + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + Vxlan.V4Tunnel.DestinationIPMode: description: |- - IEEE 802.1Qbb PFC Pause packet header. + Communication mode between the VTEPs, either unicast or multicast. type: object properties: - dst: + choice: + description: |- + unicast or multicast + type: string + default: multicast x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.PfcPause.Dst' - src: + x-enum: + unicast: + x-field-uid: 1 + multicast: + x-field-uid: 2 + enum: + - unicast + - multicast + unicast: + $ref: '#/components/schemas/Vxlan.V4Tunnel.DestinationIPMode.Unicast' x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.PfcPause.Src' - ether_type: + multicast: + $ref: '#/components/schemas/Vxlan.V4Tunnel.DestinationIPMode.Multicast' x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.PfcPause.EtherType' - control_op_code: - x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.PfcPause.ControlOpCode' - class_enable_vector: - x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.PfcPause.ClassEnableVector' - pause_class_0: - x-field-uid: 6 - $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass0' - pause_class_1: - x-field-uid: 7 - $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass1' - pause_class_2: - x-field-uid: 8 - $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass2' - pause_class_3: - x-field-uid: 9 - $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass3' - pause_class_4: - x-field-uid: 10 - $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass4' - pause_class_5: - x-field-uid: 11 - $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass5' - pause_class_6: - x-field-uid: 12 - $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass6' - pause_class_7: - x-field-uid: 13 - $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass7' - Flow.EthernetPause: + Vxlan.V6Tunnel.DestinationIPMode: description: |- - IEEE 802.3x global ethernet pause packet header + Communication mode between the VTEPs, either unicast or multicast. type: object properties: - dst: + choice: + description: |- + unicast or multicast + type: string + default: multicast x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.EthernetPause.Dst' - src: + x-enum: + unicast: + x-field-uid: 1 + multicast: + x-field-uid: 2 + enum: + - unicast + - multicast + unicast: + $ref: '#/components/schemas/Vxlan.V6Tunnel.DestinationIPMode.Unicast' x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.EthernetPause.Src' - ether_type: + multicast: + $ref: '#/components/schemas/Vxlan.V6Tunnel.DestinationIPMode.Multicast' x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.EthernetPause.EtherType' - control_op_code: - x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.EthernetPause.ControlOpCode' - time: - x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.EthernetPause.Time' - Flow.Tcp: - description: |- - TCP packet header - type: object + Vxlan.V4Tunnel.DestinationIPMode.Unicast: properties: - src_port: + vteps: + description: |- + List of VTEPs for member VNI(VXLAN Network Identifier) + type: array + items: + $ref: '#/components/schemas/Vxlan.V4Tunnel.DestinationIPMode.Unicast.Vtep' x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Tcp.SrcPort' - dst_port: - x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Tcp.DstPort' - seq_num: - x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Tcp.SeqNum' - ack_num: - x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Tcp.AckNum' - data_offset: - x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.Tcp.DataOffset' - ecn_ns: - x-field-uid: 6 - $ref: '#/components/schemas/Pattern.Flow.Tcp.EcnNs' - ecn_cwr: - x-field-uid: 7 - $ref: '#/components/schemas/Pattern.Flow.Tcp.EcnCwr' - ecn_echo: - x-field-uid: 8 - $ref: '#/components/schemas/Pattern.Flow.Tcp.EcnEcho' - ctl_urg: - x-field-uid: 9 - $ref: '#/components/schemas/Pattern.Flow.Tcp.CtlUrg' - ctl_ack: - x-field-uid: 10 - $ref: '#/components/schemas/Pattern.Flow.Tcp.CtlAck' - ctl_psh: - x-field-uid: 11 - $ref: '#/components/schemas/Pattern.Flow.Tcp.CtlPsh' - ctl_rst: - x-field-uid: 12 - $ref: '#/components/schemas/Pattern.Flow.Tcp.CtlRst' - ctl_syn: - x-field-uid: 13 - $ref: '#/components/schemas/Pattern.Flow.Tcp.CtlSyn' - ctl_fin: - x-field-uid: 14 - $ref: '#/components/schemas/Pattern.Flow.Tcp.CtlFin' - window: - x-field-uid: 15 - $ref: '#/components/schemas/Pattern.Flow.Tcp.Window' - Flow.Udp: + Vxlan.V6Tunnel.DestinationIPMode.Unicast: + properties: + vteps: + description: |- + List of VTEPs for member VNI(VXLAN Network Identifier) + type: array + items: + $ref: '#/components/schemas/Vxlan.V6Tunnel.DestinationIPMode.Unicast.Vtep' + x-field-uid: 1 + Vxlan.Tunnel.DestinationIPMode.Unicast.ArpSuppressionCache: description: |- - UDP packet header + Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request for another end-host IP address, its local VTEP intercepts the ARP request and checks for the ARP-resolved IP address in its ARP suppression cache table. If it finds a match, the local VTEP sends an ARP response on behalf of the remote end host. type: object properties: - src_port: + remote_vm_mac: + description: |- + Remote VM MAC address bound to Remote VM IPv4 address + type: string + format: mac x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Udp.SrcPort' - dst_port: + remote_vm_ipv4: + description: |- + Remote VM IPv4 address + type: string + format: ipv4 x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Udp.DstPort' - length: - x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Udp.Length' - checksum: - x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Udp.Checksum' - Flow.Gre: + Vxlan.V4Tunnel.DestinationIPMode.Unicast.Vtep: description: |- - Standard GRE packet header (RFC2784) + VTEP (VXLAN Tunnel End Point (VTEP)) parameters type: object properties: - checksum_present: + remote_vtep_address: + description: |- + Remote VXLAN Tunnel End Point address + type: string + format: ipv4 x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Gre.ChecksumPresent' - reserved0: + arp_suppression_cache: x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Gre.Reserved0' - version: - x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Gre.Version' - protocol: - x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Gre.Protocol' - checksum: - x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.Gre.Checksum' - reserved1: - x-field-uid: 6 - $ref: '#/components/schemas/Pattern.Flow.Gre.Reserved1' - Flow.Gtpv1: + description: |- + Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request for another end-host IP address, its local VTEP intercepts the ARP request and checks for the ARP-resolved IP address in its ARP suppression cache table. If it finds a match, the local VTEP sends an ARP response on behalf of the remote end host. + type: array + items: + $ref: '#/components/schemas/Vxlan.Tunnel.DestinationIPMode.Unicast.ArpSuppressionCache' + Vxlan.V6Tunnel.DestinationIPMode.Unicast.Vtep: description: |- - GTPv1 packet header + VTEP (VXLAN Tunnel End Point (VTEP)) parameters type: object properties: - version: + remote_vtep_address: + description: |- + Remote VXLAN Tunnel End Point address + type: string + format: ipv6 x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Gtpv1.Version' - protocol_type: + arp_suppression_cache: x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Gtpv1.ProtocolType' - reserved: - x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Gtpv1.Reserved' - e_flag: - x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Gtpv1.EFlag' - s_flag: - x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.Gtpv1.SFlag' - pn_flag: - x-field-uid: 6 - $ref: '#/components/schemas/Pattern.Flow.Gtpv1.PnFlag' - message_type: - x-field-uid: 7 - $ref: '#/components/schemas/Pattern.Flow.Gtpv1.MessageType' - message_length: - x-field-uid: 8 - $ref: '#/components/schemas/Pattern.Flow.Gtpv1.MessageLength' - teid: - x-field-uid: 9 - $ref: '#/components/schemas/Pattern.Flow.Gtpv1.Teid' - squence_number: - x-field-uid: 10 - $ref: '#/components/schemas/Pattern.Flow.Gtpv1.SquenceNumber' - n_pdu_number: - x-field-uid: 11 - $ref: '#/components/schemas/Pattern.Flow.Gtpv1.NPduNumber' - next_extension_header_type: - x-field-uid: 12 - $ref: '#/components/schemas/Pattern.Flow.Gtpv1.NextExtensionHeaderType' - extension_headers: description: |- - A list of optional extension headers. + Each VTEP maintains an ARP suppression cache table for known IP hosts and their associated MAC addresses in the VNI segment. When an end host in the VNI sends an ARP request for another end-host IP address, its local VTEP intercepts the ARP request and checks for the ARP-resolved IP address in its ARP suppression cache table. If it finds a match, the local VTEP sends an ARP response on behalf of the remote end host. type: array items: - $ref: '#/components/schemas/Flow.GtpExtension' - x-field-uid: 13 - Flow.GtpExtension: + $ref: '#/components/schemas/Vxlan.Tunnel.DestinationIPMode.Unicast.ArpSuppressionCache' + Vxlan.V4Tunnel.DestinationIPMode.Multicast: + description: |- + Multicast Group address for member VNI(VXLAN Network Identifier) type: object properties: - extension_length: - x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.GtpExtension.ExtensionLength' - contents: - x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.GtpExtension.Contents' - next_extension_header: - x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.GtpExtension.NextExtensionHeader' - Flow.Gtpv2: + address: + description: |- + IPv4 Multicast address + type: string + format: ipv4 + x-field-uid: 1 + Vxlan.V6Tunnel.DestinationIPMode.Multicast: description: |- - GTPv2 packet header + Multicast Group address for member VNI(VXLAN Network Identifier) type: object properties: - version: + address: + description: |- + IPv6 Multicast address + type: string + format: ipv6 x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Gtpv2.Version' - piggybacking_flag: + Device.Rsvp: + description: |- + Configuration for one or more RSVP interfaces, ingress and egress LSPs. In this model, currently IPv4 RSVP and point-to-point LSPs are supported as per RFC3209 and related specifications. + type: object + properties: + ipv4_interfaces: + description: |- + List of IPv4 RSVP connected interfaces. At least one interface should be present for device connected to the DUT. For unconnected devices, this array must be empty. + type: array + items: + $ref: '#/components/schemas/Rsvp.Ipv4Interface' + x-field-uid: 1 + lsp_ipv4_interfaces: + description: |- + List of IPv4 Loopback or IPv4 connected interfaces acting as RSVP ingress and egress endpoints. + type: array + items: + $ref: '#/components/schemas/Rsvp.LspIpv4Interface' x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Gtpv2.PiggybackingFlag' - teid_flag: + name: x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Gtpv2.TeidFlag' - spare1: - x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Gtpv2.Spare1' - message_type: - x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.Gtpv2.MessageType' - message_length: - x-field-uid: 6 - $ref: '#/components/schemas/Pattern.Flow.Gtpv2.MessageLength' - teid: - x-field-uid: 7 - $ref: '#/components/schemas/Pattern.Flow.Gtpv2.Teid' - sequence_number: - x-field-uid: 8 - $ref: '#/components/schemas/Pattern.Flow.Gtpv2.SequenceNumber' - spare2: - x-field-uid: 9 - $ref: '#/components/schemas/Pattern.Flow.Gtpv2.Spare2' - Flow.Arp: + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + Rsvp.Ipv4Interface: description: |- - ARP packet header + Configuration for RSVP Interface. type: object + required: + - ipv4_name + - neighbor_ip properties: - hardware_type: + ipv4_name: + description: "The globally unique name of the IPv4 interface connected to\ + \ the DUT. This name must match the \"name\" field of the \"ipv4_addresses\"\ + \ on top which this RSVP interface is configured. \n\nx-constraint:\n\ + - /components/schemas/Device.Ipv4/properties/name\n\n\nx-constraint:\n\ + - /components/schemas/Device.Ipv4/properties/name\n" + type: string + x-constraint: + - /components/schemas/Device.Ipv4/properties/name x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Arp.HardwareType' - protocol_type: + neighbor_ip: + description: |- + IPv4 address of the RSVP neighbor on this interface. + type: string + format: ipv4 x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Arp.ProtocolType' - hardware_length: + label_space_start: + description: "The user-defined label space start value. The LSPs for which\ + \ this router acts as a egress are assigned labels from this label pool.The\"\ + label_space_start\" and \"label_space_end\" together defines this label-pool. " + type: integer + format: uint32 + default: 1000 + maximum: 1048575 x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Arp.HardwareLength' - protocol_length: + label_space_end: + description: |- + The user-defined label space end value.The last label value that can be assigned to the LSPs for which this router acts as egress. + type: integer + format: uint32 + default: 100000 + maximum: 1048575 x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Arp.ProtocolLength' - operation: + enable_refresh_reduction: + description: |- + Enables sending of Refresh Reduction as described in RFC2961. + type: boolean + default: false x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.Arp.Operation' - sender_hardware_addr: + summary_refresh_interval: + description: |- + The number of seconds between transmissions of successive Summary Refreshes. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. + type: integer + format: uint32 + default: 30 + maximum: 3600 x-field-uid: 6 - $ref: '#/components/schemas/Pattern.Flow.Arp.SenderHardwareAddr' - sender_protocol_addr: + send_bundle: + description: |- + Enables aggregration of different RSVP messages within a single PDU. + type: boolean + default: false x-field-uid: 7 - $ref: '#/components/schemas/Pattern.Flow.Arp.SenderProtocolAddr' - target_hardware_addr: + bundle_threshold: + description: |- + The number of milliseconds to wait after which RSVP will bundle different RSVP messages and transmit Bundle messages. + type: integer + format: uint32 + default: 50 + maximum: 1000 x-field-uid: 8 - $ref: '#/components/schemas/Pattern.Flow.Arp.TargetHardwareAddr' - target_protocol_addr: + enable_hello: + description: "Enables sending of Hello Messages as per RFC3209. \ + \ " + type: boolean + default: false x-field-uid: 9 - $ref: '#/components/schemas/Pattern.Flow.Arp.TargetProtocolAddr' - Flow.Icmp: + hello_interval: + description: |- + If enable_hello is set to 'true', this specifies the minimum hello interval in seconds at which successive Hello Messages are sent as per RFC3209. There is no specification specified maximum value. For clarity, setting the maximum to 1 hour. + type: integer + format: uint32 + default: 9 + maximum: 3600 + x-field-uid: 10 + timeout_multiplier: + description: |- + The number of missed hellos after which the node should consider RSVP Neighbor to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. + type: integer + format: uint32 + default: 3 + maximum: 10 + x-field-uid: 11 + Rsvp.LspIpv4Interface: description: |- - ICMP packet header + Configuration for RSVP LSP IPv4 Interface. type: object + required: + - ipv4_name properties: - choice: + ipv4_name: + description: | + The globally unique name of the IPv4 or Loopback IPv4 interface acting as the RSVP ingress and egress endpoint for the LSPs configured on this interface. This must match the "name" field of either "ipv4_addresses" or "ipv4_loopbacks" on which this LSP interface is configured. + + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv4Loopback/properties/name + + + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv4Loopback/properties/name type: string - default: echo + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv4Loopback/properties/name x-field-uid: 1 - x-enum: - echo: - x-field-uid: 1 - enum: - - echo - echo: - $ref: '#/components/schemas/Flow.Icmp.Echo' + p2p_egress_ipv4_lsps: + description: "Contains properties of Tail(Egress) LSPs. " + $ref: '#/components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp' x-field-uid: 2 - Flow.Icmp.Echo: + p2p_ingress_ipv4_lsps: + description: |- + Array of point-to-point RSVP-TE P2P LSPs originating from this interface. + type: array + items: + $ref: '#/components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp' + x-field-uid: 3 + Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp: description: |- - Packet Header for ICMP echo request + Configuration for RSVP Egress Point-to-Point(P2P) IPv4 LSPs. type: object + required: + - name properties: - type: + name: x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Icmp.Echo.Type' - code: + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + refresh_interval: + description: "The time in seconds between successive transmissions of RESV\ + \ Refreshes. The actual refresh interval is jittered by upto 50%. There\ + \ is no specification specified maximum value. For clarity, setting the\ + \ maximum to 1 hour. " + type: integer + format: uint32 + default: 30 + maximum: 3600 x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Icmp.Echo.Code' - checksum: + timeout_multiplier: + description: |- + The number of missed PATH refreshes after which a recieving node should consider the LSP state to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. + type: integer + format: uint32 + default: 3 + maximum: 10 x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Icmp.Echo.Checksum' - identifier: - x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Icmp.Echo.Identifier' - sequence_number: - x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.Icmp.Echo.SequenceNumber' - Flow.Icmpv6: - description: |- - ICMPv6 packet header - type: object - properties: - choice: + reservation_style: + description: |- + It determines how RSVP-TE enabled network devices set up reservations along the path between an end-to-end QOS-enabled connection. If 'auto' is enabled, the style is chosen based on whether the incoming Path has 'SE Desired' flag set. Otherwise, the style is chosen based on the value selected for this attribute. type: string - default: echo - x-field-uid: 1 x-enum: - echo: + shared_explicit: x-field-uid: 1 + fixed_filter: + x-field-uid: 2 + auto: + x-field-uid: 3 + default: shared_explicit + x-field-uid: 4 enum: - - echo - echo: - $ref: '#/components/schemas/Flow.Icmpv6.Echo' - x-field-uid: 2 - Flow.Icmpv6.Echo: + - shared_explicit + - fixed_filter + - auto + enable_fixed_label: + description: "If enabled, a specific fixed label will be advertised by the\ + \ egress or tail end for all Path messages received by this egress. This\ + \ can be leveraged to advertise Explicit or Implicit null labels. \ + \ " + type: boolean + default: false + x-field-uid: 5 + fixed_label_value: + description: |- + The fixed label value as advertised by egress in RESV message. Applicable only if 'fixed_label' is set to 'true'. Special values are '0 - IPv4 Explicit NULL', '2 - IPv6 Explicit NULL' and '3 - Implicit NULL'. Outside of this, labels are expected to have a minimum value of 16. + type: integer + format: uint32 + default: 0 + maximum: 1048575 + x-field-uid: 6 + Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp: description: |- - Packet Header for ICMPv6 Echo + Configuration for an RSVP Ingress point-to-point LSP. type: object + required: + - remote_address + - name properties: - type: + name: x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Icmpv6.Echo.Type' - code: + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + remote_address: + description: |- + IPv4 address of the remote endpoint of the LSP. + type: string + format: ipv4 x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Icmpv6.Echo.Code' - identifier: + tunnel_id: + description: |- + The Tunnel ID of the RSVP LSP. Carried in the SESSION object in Path Messages. + type: integer + format: uint32 + default: 1 + minimum: 1 + maximum: 65535 x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Icmpv6.Echo.Identifier' - sequence_number: + lsp_id: + description: |- + The LSP ID of the RSVP LSP. Carried in the SENDER_TEMPLATE object in Path Messages. + type: integer + format: uint32 + default: 1 + minimum: 1 + maximum: 65535 x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Icmpv6.Echo.SequenceNumber' - checksum: + refresh_interval: + description: "The time in seconds between successive transmissions of PATH\ + \ Refreshes. The actual refresh interval is jittered by upto 50%. There\ + \ is no specification specified maximum value. For clarity, setting the\ + \ maximum to 1 hour. " + type: integer + format: uint32 + default: 30 + minimum: 1 + maximum: 3600 x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.Icmpv6.Echo.Checksum' - Flow.Ppp: - description: |- - PPP packet header - type: object - properties: - address: - x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Ppp.Address' - control: - x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Ppp.Control' - protocol_type: - x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Ppp.ProtocolType' - Flow.Igmpv1: + timeout_multiplier: + description: |- + The number of missed RESV refreshes after which a recieving node should consider the LSP state to have timed out. There is no specification specified maximum value. Setting the maximum allowed value to 10. + type: integer + format: uint32 + default: 3 + minimum: 1 + maximum: 10 + x-field-uid: 6 + backup_lsp_id: + description: |- + The LSP id that will be used when creating a Make-Before-Break LSP when the active LSP is using lsp_id. If the active LSP on which Make-Before-Break is being done is using the backup_lsp_id, the new LSP created will toggle to use the lsp_id instead. + type: integer + format: uint32 + default: 2 + minimum: 1 + maximum: 65535 + x-field-uid: 7 + lsp_switchover_delay: + description: |- + The amount of delay in milliseconds that an implementation should wait for before switching traffic to the new LSP created after a Make-Before-Break is done on an LSP. The default value is 0 which means to switch immediately. An implementation should support a minimum delay value of at least 50ms . There is no specification specified maximum value. Setting maximum allowed value to 1 minute. If a delay value is supplied which is lesser than the minimum delay value supported, a warning should be provided indicating that the minimum value of LSP switchover delay is automatically increased to the supported minimum value. This warning should be included in the list of warnings in the 'Response.Warning' attribute sent in the SetConfig 'Success' Response. + type: integer + format: uint32 + default: 0 + minimum: 0 + maximum: 60000 + x-field-uid: 8 + session_attribute: + description: "This contains the values of the fields to be included in the\ + \ SESSION_ATTRIBUTE object in the Path Message sent for the LSP. \ + \ " + $ref: '#/components/schemas/Rsvp.SessionAttribute' + x-field-uid: 9 + tspec: + description: "This contains the values of the fields to be included in the\ + \ TSPEC object in the Path Message sent for the LSP. " + $ref: '#/components/schemas/Rsvp.Tspec' + x-field-uid: 10 + fast_reroute: + description: "This contains the values of the fields to be included in the\ + \ FAST_REROUTE object in the Path Message sent for the LSP. \nThis is\ + \ an optional object . If this attribute is not included , the FAST_REROUTE\ + \ object will not be included. " + $ref: '#/components/schemas/Rsvp.FastReroute' + x-field-uid: 11 + ero: + description: "This contains the values of the fields to be included in the\ + \ ERO object in the Path Message sent for the LSP. \nThis is an optional\ + \ object . If this attribute is not included , the ERO object will not\ + \ be included. " + $ref: '#/components/schemas/Rsvp.Ero' + x-field-uid: 12 + Rsvp.SessionAttribute: description: |- - IGMPv1 packet header + Configuration for RSVP-TE SESSION_ATTRIBUTE object included in Path Messages as defined in RFC3209. The bandwidth_protection_desired and node_protection_desired flags are defined in RFC4090 (Fast Reroute). type: object properties: - version: + auto_generate_session_name: + description: |- + If this is enabled, an auto-generated Session Name is included in the SESSION_ATTRIBUTE object in the Path Message for this LSP. + type: boolean + default: true x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Igmpv1.Version' - type: + session_name: + description: "If auto_generate_session_name is set to 'false', then the\ + \ value of this field is used to fill the Session Name field of the SESSION_ATTRIBUTE\ + \ object in the Path Message for this LSP. It is suggested to include\ + \ the Local IP, Remote IP, Tunnel ID and LSP ID in the auto-generated\ + \ Session Name to ensure uniqueness of the name in the test. The maximum\ + \ length of session name is 254 bytes. " + type: string + minLength: 0 + maxLength: 254 x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Igmpv1.Type' - unused: + setup_priority: + description: |- + Specifies the value of the Setup Priority field. This controls whether the LSP should pre-empt existing LSP setup with certain Holding Priority if resource limitation is encountered when setting up the LSP. (e.g. bandwidth availability). The value 0 is the highest priority while 7 is the lowest. + type: integer + format: uint32 + default: 7 + maximum: 7 x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Igmpv1.Unused' - checksum: + holding_priority: + description: |- + Specifies the value of the Holding Priority field. This controls whether a new LSP being created with certain Setup Priority should pre-empt this LSP if resource limitation is encountered when setting up the LSP. (e.g. bandwidth availability). The value 0 is the highest priority while 7 is the lowest. + type: integer + format: uint32 + default: 7 + maximum: 7 x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Igmpv1.Checksum' - group_address: + local_protection_desired: + description: |- + This flag permits transit routers to use a local repair mechanism which may result in violation of the explicit route object. When a fault is detected on an adjacent downstream link or node, a transit router can reroute traffic for fast service restoration. + type: boolean + default: false x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.Igmpv1.GroupAddress' - Flow.Mpls: - description: |- - MPLS packet header; When configuring multiple such headers, the count shall not exceed 20. + label_recording_desired: + description: |- + This flag indicates that label information should be included when doing a route record. + type: boolean + default: false + x-field-uid: 6 + se_style_desired: + description: |- + This flag indicates that the tunnel ingress node may choose to reroute this tunnel without tearing it down. A tunnel egress node SHOULD use the Shared Explicit(SE) Style when responding with a Resv message. + type: boolean + default: false + x-field-uid: 7 + bandwidth_protection_desired: + description: |- + This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs along the protected LSP path that a backup path with a bandwidth guarantee is desired. This bandwidth has to be guaranteed for the protected LSP, if no FAST_REROUTE object is included in the PATH message. If a FAST_REROUTE object is present in the Path message, then the bandwidth specified therein is to be guaranteed. + type: boolean + default: false + x-field-uid: 8 + node_protection_desired: + description: |- + This flag in the SESSION_ATTRIBUTE object in the Path Message indicates to the PLRs along a protected LSP path that it is desired to have a backup path that bypasses at least the next node of the protected LSP. + type: boolean + default: false + x-field-uid: 9 + resource_affinities: + description: "This is an optional object. If included the extended SESSION_ATTRIBUTE\ + \ object is sent in the Path message containing \nthe additional fields\ + \ included in this object. This contains a set of three bitmaps using\ + \ which further constraints can be\nset on the path calculated for the\ + \ LSP based on the Admin Group settings in the IGP (e.g ISIS or OSPF interface).\ + \ " + $ref: '#/components/schemas/Rsvp.ResourceAffinities' + x-field-uid: 10 + Rsvp.ResourceAffinities: + description: "This is an optional object. If included, the extended SESSION_ATTRIBUTE\ + \ object is sent in the Path message containing \nthe additional fields included\ + \ in this object. This contains a set of three bitmaps using which further\ + \ constraints can be\nset on the path calculated for the LSP based on the\ + \ Admin Group settings in the IGP (e.g ISIS or OSPF interface)." type: object properties: - label: + exclude_any: + description: "A 32-bit vector representing a set of attribute filters associated\ + \ with a tunnel any of which renders a link unacceptable. A null set\ + \ (all bits set to zero) doesn't render the link unacceptable. The most\ + \ significant byte in the hex-string is the farthest to the left in the\ + \ byte sequence. Leading zero bytes in the configured value may be omitted\ + \ for brevity. " + type: string + format: hex + default: '0' + minLength: 0 + maxLength: 8 x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Mpls.Label' - traffic_class: + include_any: + description: "A 32-bit vector representing a set of attribute filters associated\ + \ with a tunnel any of which renders a link acceptable. A null set (all\ + \ bits set to zero) automatically passes. The most significant byte in\ + \ the hex-string is the farthest to the left in the byte sequence. Leading\ + \ zero bytes in the configured value may be omitted for brevity. \ + \ " + type: string + format: hex + default: '0' + minLength: 0 + maxLength: 8 x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Mpls.TrafficClass' - bottom_of_stack: + include_all: + description: "A 32-bit vector representing a set of attribute filters associated\ + \ with a tunnel all of which must be present for a link to be acceptable.\ + \ A null set (all bits set to zero) automatically passes. The most significant\ + \ byte in the hex-string is the farthest to the left in the byte sequence.\ + \ Leading zero bytes in the configured value may be omitted for brevity.\ + \ " + type: string + format: hex + default: '0' + minLength: 0 + maxLength: 8 x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Mpls.BottomOfStack' - time_to_live: - x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Mpls.TimeToLive' - Flow.Snmpv2c: + Rsvp.Tspec: description: |- - SNMPv2C packet header as defined in RFC1901 and RFC3416. + Configuration for RSVP-TE TSPEC object included in Path Messages. The usage of these parameters is defined in RFC2215. type: object - required: - - data properties: - version: + token_bucket_rate: + description: |- + The rate of the traffic to be carried in this LSP in bytes per second. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. + type: number + format: float + default: 0 x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.Version' - community: + token_bucket_size: description: |- - It is an ASCII based octet string which identifies the SNMP community in which the sender and recipient of this message are located. It should match the read-only or read-write community string configured on the recipient for the PDU to be accepted. - type: string - maxLength: 10000 - default: community + The depth of the token bucket in bytes used to specify the Token Bucket characteristics of the traffic to be carried in the LSP. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. + type: number + format: float + default: 0 x-field-uid: 2 - data: - $ref: '#/components/schemas/Flow.Snmpv2c.Data' + peak_data_rate: + description: |- + The peak data rate of the traffic in bytes per second used to specify the Token Bucket characteristics of the traffic to be carried in the LSP. This is part of the Token Bucket specification defined for a traffic flow defined in RFC2215. + type: number + format: float + default: 0 x-field-uid: 3 - Flow.Snmpv2c.Data: - description: |- - This contains the body of the SNMPv2C message. - - - Encoding of subsequent fields follow ASN.1 specification. - Refer: http://www.itu.int/ITU-T/asn1/ + minimum_policed_unit: + description: "Specifies the minium length of packet frames that will be\ + \ policed. " + type: integer + format: uint32 + default: 0 + maximum: 65535 + x-field-uid: 4 + maximum_policed_unit: + description: "Specifies the maximum length of packet frames that will be\ + \ policed. " + type: integer + format: uint32 + default: 0 + maximum: 65535 + x-field-uid: 5 + Rsvp.FastReroute: + description: "Configuration for the optional RSVP-TE FAST_REROUTE object included\ + \ in Path Messages as defined in RFC4090. " type: object - required: - - choice properties: - choice: - type: string + setup_priority: + description: |- + Specifies the value of the Setup Priority field. This controls whether the backup LSP should pre-empt existing LSP that is setup with certain Holding Priority. While setting up a backup LSP, preemption of existing LSP can happen if resource limitation is encountered (e.g bandwidth availability). + type: integer + format: uint32 + default: 7 + maximum: 7 x-field-uid: 1 - x-enum: - get_request: - x-field-uid: 1 - get_next_request: - x-field-uid: 2 - response: - x-field-uid: 3 - set_request: - x-field-uid: 4 - get_bulk_request: - x-field-uid: 5 - inform_request: - x-field-uid: 6 - snmpv2_trap: - x-field-uid: 7 - report: - x-field-uid: 8 - enum: - - get_request - - get_next_request - - response - - set_request - - get_bulk_request - - inform_request - - snmpv2_trap - - report - get_request: - $ref: '#/components/schemas/Flow.Snmpv2c.PDU' + holding_priority: + description: "Specifies the value of the Holding Priority field. This controls\ + \ whether a new LSP being created with certain Setup Priority should pre-empt\ + \ this LSP set up with this Holding Priority. While setting up a new LSP,\ + \ preemption of existing LSP can happen if resource limitation is encountered\ + \ (e.g bandwidth availability). " + type: integer + format: uint32 + default: 7 + maximum: 7 x-field-uid: 2 - get_next_request: - $ref: '#/components/schemas/Flow.Snmpv2c.PDU' + hop_limit: + description: |- + Specifies the value of the Hop Limit field. This controls the maximum number of hops the LSP should traverse to reach the LSP end-point. + type: integer + format: uint32 + default: 3 + maximum: 255 x-field-uid: 3 - response: - $ref: '#/components/schemas/Flow.Snmpv2c.PDU' + bandwidth: + description: "Specifies the value of the Bandwidth field as a 32-bit IEEE\ + \ floating point integer, in bytes per second, as desired for the LSP. " + type: number + format: float + default: 0 x-field-uid: 4 - set_request: - $ref: '#/components/schemas/Flow.Snmpv2c.PDU' + exclude_any: + description: "A 32-bit vector representing a set of attribute filters associated\ + \ with a tunnel any of which renders a link unacceptable. A null set (all\ + \ bits set to zero) doesn't render the link unacceptable. The most significant\ + \ byte in the hex-string is the farthest to the left in the byte sequence.\ + \ Leading zero bytes in the configured value may be omitted for brevity.\ + \ " + type: string + format: hex + default: '0' + minLength: 0 + maxLength: 8 x-field-uid: 5 - get_bulk_request: - $ref: '#/components/schemas/Flow.Snmpv2c.BulkPDU' + include_any: + description: "A 32-bit vector representing a set of attribute filters associated\ + \ with a tunnel any of which renders a link acceptable. A null set (all\ + \ bits set to zero) automatically passes. The most significant byte in\ + \ the hex-string is the farthest to the left in the byte sequence. Leading\ + \ zero bytes in the configured value may be omitted for brevity. " + type: string + format: hex + default: '0' + minLength: 0 + maxLength: 8 x-field-uid: 6 - inform_request: - $ref: '#/components/schemas/Flow.Snmpv2c.PDU' + include_all: + description: "A 32-bit vector representing a set of attribute filters associated\ + \ with a tunnel all of which must be present for a link to be acceptable.\ + \ A null set (all bits set to zero) automatically passes. The most significant\ + \ byte in the hex-string is the farthest to the left in the byte sequence.\ + \ Leading zero bytes in the configured value may be omitted for brevity.\ + \ " + type: string + format: hex + default: '0' + minLength: 0 + maxLength: 8 x-field-uid: 7 - snmpv2_trap: - $ref: '#/components/schemas/Flow.Snmpv2c.PDU' + one_to_one_backup_desired: + description: "Requests protection via the one-to-one backup method. \ + \ " + type: boolean + default: false x-field-uid: 8 - report: - $ref: '#/components/schemas/Flow.Snmpv2c.PDU' + facility_backup_desired: + description: "Requests protection via the facility backup method. \ + \ " + type: boolean + default: false x-field-uid: 9 - Flow.Snmpv2c.PDU: - description: |- - This contains the body of the SNMPv2C PDU. + Rsvp.Ero: + description: "Configuration for the optional RSVP-TE explicit route object(ERO)\ + \ object included in Path Messages. " type: object properties: - request_id: - x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.PDU.RequestId' - error_status: + prepend_neighbor_ip: description: |- - The SNMP agent places an error code in this field in the response message if an error occurred processing the request. + Determines whether the IP address of the RSVP neighbor should be added as an ERO sub-object. If it is to be included, it can be included as a Loose hop or as a Strict hop. type: string - default: no_error x-enum: - no_error: + dont_prepend: x-field-uid: 1 - too_big: + prepend_loose: x-field-uid: 2 - no_such_name: + prepend_strict: x-field-uid: 3 - bad_value: - x-field-uid: 4 - read_only: - x-field-uid: 5 - gen_err: - x-field-uid: 6 - no_access: - x-field-uid: 7 - wrong_type: - x-field-uid: 8 - wrong_length: - x-field-uid: 9 - wrong_encoding: - x-field-uid: 10 - wrong_value: - x-field-uid: 11 - no_creation: - x-field-uid: 12 - inconsistent_value: - x-field-uid: 13 - resource_unavailable: - x-field-uid: 14 - commit_failed: - x-field-uid: 15 - undo_failed: - x-field-uid: 16 - authorization_error: - x-field-uid: 17 - not_writable: - x-field-uid: 18 - inconsistent_name: - x-field-uid: 19 - x-field-uid: 2 + default: prepend_loose + x-field-uid: 1 enum: - - no_error - - too_big - - no_such_name - - bad_value - - read_only - - gen_err - - no_access - - wrong_type - - wrong_length - - wrong_encoding - - wrong_value - - no_creation - - inconsistent_value - - resource_unavailable - - commit_failed - - undo_failed - - authorization_error - - not_writable - - inconsistent_name - error_index: - x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.PDU.ErrorIndex' - variable_bindings: + - dont_prepend + - prepend_loose + - prepend_strict + prefix_length: + description: "If prepend_egress_ip is set to one of 'prepend_loose' or 'prepend_strict',\ + \ then set this value as the prefix length of the ERO sub-object containing\ + \ egress IP address. " + type: integer + format: uint32 + default: 32 + maximum: 32 + x-field-uid: 2 + subobjects: description: |- - A Sequence of variable_bindings. + Array of sub-objects to be included in the ERO. These sub-objects contain the intermediate hops to be traversed by the LSP while being forwarded towards the egress endpoint. These sub-objects are included after the optional sub-object containing IP address of egress endpoint of the LSP (when present). type: array items: - $ref: '#/components/schemas/Flow.Snmpv2c.VariableBinding' - x-field-uid: 4 - Flow.Snmpv2c.BulkPDU: + $ref: '#/components/schemas/Rsvp.Ero.Subobject' + x-field-uid: 3 + Rsvp.Ero.Subobject: description: |- - The purpose of the GetBulkRequest-PDU is to request the transfer of a potentially large amount of data, including, but not limited to, the efficient and rapid retrieval of large tables. + Configuration for the ERO sub-object. type: object properties: - request_id: + type: + description: |- + The type of the ERO sub-object, one of IPv4 Address or AS Number. + type: string + x-enum: + ipv4: + x-field-uid: 1 + as_number: + x-field-uid: 2 + default: ipv4 x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.BulkPDU.RequestId' - non_repeaters: + enum: + - ipv4 + - as_number + ipv4_address: + description: |- + IPv4 address that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'ipv4'. + type: string + format: ipv4 + default: 0.0.0.0 x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.BulkPDU.NonRepeaters' - max_repetitions: + prefix_length: + description: |- + Prefix length for the IPv4 address in the ERO sub-object. This field is applicable only if the value of 'type' is set to 'ipv4'. + type: integer + format: uint32 + default: 32 + maximum: 32 x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.BulkPDU.MaxRepetitions' - variable_bindings: + as_number: description: |- - A Sequence of variable_bindings. + Autonomous System number to be set in the ERO sub-object that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'as_number'. Note that as per RFC3209, 4-byte AS encoding is not supported. + type: integer + format: uint32 + default: 0 + maximum: 65535 + x-field-uid: 4 + hop_type: + description: |- + The hop type of the ERO sub-object, one of Strict or Loose. + type: string + x-enum: + strict: + x-field-uid: 1 + loose: + x-field-uid: 2 + default: loose + x-field-uid: 5 + enum: + - strict + - loose + Device.DhcpServer: + description: |- + Configuration for one or more IPv4 or IPv6 DHCP servers. + type: object + properties: + ipv4_interfaces: + description: "This contains an array of references to IPv4 interfaces, each\ + \ of which will contain one DHCPv4 server. " type: array items: - $ref: '#/components/schemas/Flow.Snmpv2c.VariableBinding' - x-field-uid: 4 - Flow.Snmpv2c.VariableBinding: + $ref: '#/components/schemas/DhcpServer.V4' + x-field-uid: 2 + ipv6_interfaces: + description: |- + This contains an array of references to IPv6 interfaces, each of which will contain one DHCPv6 server. + type: array + items: + $ref: '#/components/schemas/DhcpServer.V6' + x-field-uid: 3 + DhcpServer.V4: description: |- - A Sequence of two fields, an object_identifier and the value for/from that object_identifier. + Configuration for emulated DHCPv4 Server. type: object + required: + - name + - ipv4_name + - address_pools properties: - object_identifier: + name: x-field-uid: 1 - description: "The Object Identifier points to a particular parameter in\ - \ the SNMP agent. \n- Encoding of this field follows RFC2578(section 3.5)\ - \ and ASN.1 X.690(section 8.1.3.6) specification.\n Refer: http://www.itu.int/ITU-T/asn1/\n\ - - According to BER, the first two numbers of any OID (x.y) are encoded\ - \ as one value using the formula (40*x)+y. \n Example, the first two\ - \ numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, because (40*1)+3\ - \ = 43. \n- After the first two numbers are encoded, the subsequent numbers\ - \ in the OID are each encoded as a byte. \n- However, a special rule is\ - \ required for large numbers because one byte can only represent a number\ - \ from 0-127. \n- The rule for large numbers states that only the lower\ - \ 7 bits in the byte are used for holding the value (0-127). \n- The highest\ - \ order bit(8th) is used as a flag to indicate that this number spans\ - \ more than one byte. Therefore, any number over 127 must be encoded using\ - \ more than one byte. \n - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0'\ - \ cannot be encoded using a single byte. \n According to this rule,\ - \ the number 2680 must be encoded as 0x94 0x78. \n Since the most significant\ - \ bit is set in the first byte (0x94), it indicates that number spans\ - \ to the next byte.\n Since the most significant bit is not set in\ - \ the next byte (0x78), it indicates that the number ends at the second\ - \ byte.\n The value is derived by appending 7 bits from each of the\ - \ concatenated bytes i.e (0x14 *128^1) + (0x78 * 128^0) = 2680." + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. type: string - format: oid - default: '0.1' - value: - $ref: '#/components/schemas/Flow.Snmpv2c.VariableBindingValue' + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + ipv4_name: + description: | + The unique name of the IPv4 on which DHCPv4 server will run. + + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + + + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + type: string + x-constraint: + - /components/schemas/Device.Ipv4/properties/name x-field-uid: 2 - Flow.Snmpv2c.VariableBindingValue: + address_pools: + description: |- + List of DHCPv4 Server Lease parameters + type: array + items: + $ref: '#/components/schemas/DhcpServerV4.Pool' + x-field-uid: 3 + DhcpServerV4.Pool: description: |- - The value for the object_identifier as per RFC2578. + Configuration for DHCPv4 address pool for a lease. type: object + required: + - start_address properties: - choice: - type: string - default: no_value + name: x-field-uid: 1 - x-enum: - no_value: - x-field-uid: 1 - integer_value: - x-field-uid: 2 - string_value: - x-field-uid: 3 - object_identifier_value: - x-field-uid: 4 - ip_address_value: - x-field-uid: 5 - counter_value: - x-field-uid: 6 - timeticks_value: - x-field-uid: 7 - arbitrary_value: - x-field-uid: 8 - big_counter_value: - x-field-uid: 9 - unsigned_integer_value: - x-field-uid: 10 - enum: - - no_value - - integer_value - - string_value - - object_identifier_value - - ip_address_value - - counter_value - - timeticks_value - - arbitrary_value - - big_counter_value - - unsigned_integer_value - integer_value: + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + lease_time: + description: |- + The duration of time in seconds that is assigned to a lease. + type: integer + format: uint32 + minimum: 10 + default: 86400 x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.VariableBindingValue.IntegerValue' - string_value: - $ref: '#/components/schemas/Flow.Snmpv2c.VariableBindingStringValue' + start_address: + description: |- + The IPv4 address of the first lease pool. + type: string + format: ipv4 x-field-uid: 3 - object_identifier_value: + prefix_length: + description: "The IPv4 network prefix length to be applied to the address. " + type: integer + format: uint32 + default: 24 + maximum: 32 x-field-uid: 4 - description: "The Object Identifier points to a particular parameter in\ - \ the SNMP agent. \n- Encoding of this field follows RFC2578(section 3.5)\ - \ and ASN.1 X.690(section 8.1.3.6) specification.\n Refer: http://www.itu.int/ITU-T/asn1/\n\ - - According to BER, the first two numbers of any OID (x.y) are encoded\ - \ as one value using the formula (40*x)+y. \n Example, the first two\ - \ numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, because (40*1)+3\ - \ = 43. \n- After the first two numbers are encoded, the subsequent numbers\ - \ in the OID are each encoded as a byte. \n- However, a special rule is\ - \ required for large numbers because one byte can only represent a number\ - \ from 0-127. \n- The rule for large numbers states that only the lower\ - \ 7 bits in the byte are used for holding the value (0-127). \n- The highest\ - \ order bit(8th) is used as a flag to indicate that this number spans\ - \ more than one byte. Therefore, any number over 127 must be encoded using\ - \ more than one byte. \n - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0'\ - \ cannot be encoded using a single byte. \n According to this rule,\ - \ the number 2680 must be encoded as 0x94 0x78. \n Since the most significant\ - \ bit is set in the first byte (0x94), it indicates that number spans\ - \ to the next byte.\n Since the most significant bit is not set in\ - \ the next byte (0x78), it indicates that the number ends at the second\ - \ byte.\n The value is derived by appending 7 bits from each of the\ - \ concatenated bytes i.e (0x14 *128^1) + (0x78 * 128^0) = 2680." - type: string - format: oid - default: '0.1' - ip_address_value: + count: + description: |- + The total number of addresses in the pool. + type: integer + format: uint32 + default: 1 + minimum: 1 + maximum: 1000000 x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.VariableBindingValue.IpAddressValue' - counter_value: + step: + description: |- + The increment value for the lease address within the lease pool. The value is incremented according to the prefix_length and step. + type: integer + format: uint32 + default: 1 + minimum: 1 x-field-uid: 6 - $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.VariableBindingValue.CounterValue' - timeticks_value: - x-field-uid: 7 - $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.VariableBindingValue.TimeticksValue' - arbitrary_value: + options: description: |- - It contains the hex bytes of the value to be sent. As of now it is restricted to 10000 bytes. - type: string - format: hex - maxLength: 10000 - default: '00' - x-field-uid: 8 - big_counter_value: - x-field-uid: 9 - $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.VariableBindingValue.BigCounterValue' - unsigned_integer_value: - x-field-uid: 10 - $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.VariableBindingValue.UnsignedIntegerValue' - Flow.Snmpv2c.VariableBindingStringValue: - type: object + Optional configuration for DHCPv4 address pool for the lease. + $ref: '#/components/schemas/DhcpServerV4.PoolOption' + x-field-uid: 7 + DhcpServerV4.PoolOption: description: |- - It contains the raw/ascii string value to be sent. + Optional configuration for DHCPv4 address pool for the lease. + type: object properties: - choice: + router_address: + description: |- + The Router address advertised by the DHCPv4 server in Offer and Ack messages. type: string - default: ascii + format: ipv4 + default: 0.0.0.0 x-field-uid: 1 - x-enum: - ascii: - x-field-uid: 1 - raw: - x-field-uid: 2 - enum: - - ascii - - raw - ascii: + primary_dns_server: description: |- - It contains the ASCII string to be sent. As of now it is restricted to 10000 bytes. + The primary DNS server address that is offered to DHCP clients that request this information through a TLV option. type: string - maxLength: 10000 - default: ascii + format: ipv4 + default: 0.0.0.0 x-field-uid: 2 - raw: + secondary_dns_server: description: |- - It contains the hex string to be sent. As of now it is restricted to 10000 bytes. + The primary DNS server address that is offered to DHCP clients that request this information through a TLV option. type: string - format: hex - maxLength: 10000 - default: '00' + format: ipv4 + default: 0.0.0.0 x-field-uid: 3 - Flow.Rsvp: + echo_relay_with_tlv_82: + description: |- + If selected, the DHCP server includes in its replies the TLV information for the DHCPv4 Relay Agent Option 82 and the corresponding sub-TLVs that it receives from a DHCP relay agent, otherwise it replies without including this TLV. + type: boolean + default: true + x-field-uid: 4 + DhcpServer.V6: description: |- - RSVP packet header as defined in RFC2205 and RFC3209. Currently only supported message type is "Path" with mandatory objects and sub-objects. + Configuration for emulated DHCPv6 Server. type: object + required: + - name + - ipv6_name + - leases properties: - version: - description: |- - RSVP Protocol Version. - type: integer - format: uint32 - default: 1 - maximum: 15 + name: x-field-uid: 1 - flag: description: |- - Flag, 0x01-0x08: Reserved. + Globally unique name of an object. It also serves as the primary key for arrays of objects. type: string - default: not_refresh_reduction_capable - x-enum: - not_refresh_reduction_capable: - x-field-uid: 1 - refresh_reduction_capable: - x-field-uid: 2 + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + ipv6_name: + description: | + The unique name of the IPv6 on which DHCPv6 server will run. + + x-constraint: + - /components/schemas/Device.Ipv6/properties/name + + + x-constraint: + - /components/schemas/Device.Ipv6/properties/name + type: string + x-constraint: + - /components/schemas/Device.Ipv6/properties/name x-field-uid: 2 - enum: - - not_refresh_reduction_capable - - refresh_reduction_capable - rsvp_checksum: + rapid_commit: + description: |- + If Rapid Commit is set, server responds to client initiated Rapid Commit two-message exchanges. + type: boolean + default: false x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.Rsvp.RsvpChecksum' - time_to_live: + reconfigure_via_relay_agent: + description: |- + If the server does not have an address to which it can send the Reconfigure message directly to the client, the server uses a Relay-reply message to send the Reconfigure message to a relay agent that will relay the message to the client. + type: boolean + default: false x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.Rsvp.TimeToLive' - reserved: + leases: + description: "Array of DHCP pools configured on a server. " + type: array + items: + $ref: '#/components/schemas/DhcpV6Server.Lease' x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.Rsvp.Reserved' - rsvp_length: + options: description: |- - The sum of the lengths of the common header and all objects included in the message. - $ref: '#/components/schemas/Flow.RSVP.Length' + Optional DHCPv4 Server options that are sent in Dhcp server messages. + $ref: '#/components/schemas/Dhcpv6Server.Options' x-field-uid: 6 - message_type: + Dhcpv6Server.Options: + description: |- + DHCP server options, these configured options are sent in Dhcp server messages. + type: object + properties: + dns: + description: "Additional DHCP server primary dns and other configuration\ + \ options. " + $ref: '#/components/schemas/DhcpV6Server.Dns' + x-field-uid: 1 + vendor_info: description: |- - An 8-bit number that identifies the function of the RSVP message. There are aound 20 message types defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-2 . Among these presently supported is "Path"(value: 1) message type. - $ref: '#/components/schemas/Flow.RSVP.Message' - x-field-uid: 7 - Flow.RSVP.Length: + This option is used by servers to exchange vendor-specific information with clients. + $ref: '#/components/schemas/Dhcpv6ServerOptions.VendorInfo' + x-field-uid: 2 + bootfile_url: + description: |- + The server sends this option to inform the client about a URL to a boot file which client will use for + network boots. + $ref: '#/components/schemas/Dhcpv6ServerOptions.BootfileUrl' + x-field-uid: 3 + DhcpV6Server.Lease: + description: "One DHCP pool configuration on a server. " + type: object + required: + - ia_type + properties: + lease_time: + description: |- + The Life Time length in seconds that is assigned to a lease if the requesting DHCP client does not specify a specific expiration time. + type: integer + format: uint32 + minimum: 300 + maximum: 30000000 + default: 86400 + x-field-uid: 1 + ia_type: + $ref: '#/components/schemas/Dhcpv6Server.IaType' + x-field-uid: 5 + Dhcpv6Server.IaType: type: object properties: choice: description: |- - auto or configured value. + Identity Association: a collection of leases assigned to a client. Each IA has an associated IAID. Each IA holds one type of lease, like an identity association for temporary addresses (IA_TA) holds temporary addresses, and an identity association for prefix delegation (IA_PD). type: string - default: auto + default: iana x-field-uid: 1 x-enum: - auto: + iana: x-field-uid: 1 - value: + iata: x-field-uid: 2 + iapd: + x-field-uid: 3 + ianapd: + x-field-uid: 4 enum: - - auto - - value - auto: + - iana + - iata + - iapd + - ianapd + iana: + $ref: '#/components/schemas/Dhcpv6Server.PoolInfo' + x-field-uid: 2 + iata: + $ref: '#/components/schemas/Dhcpv6Server.PoolInfo' + x-field-uid: 3 + iapd: + $ref: '#/components/schemas/Dhcpv6Server.IapdPoolInfo' + x-field-uid: 4 + ianapd: + $ref: '#/components/schemas/Dhcpv6Server.IanapdPoolInfo' + x-field-uid: 5 + Dhcpv6Server.PoolInfo: + description: |- + The container for pool configurations for IA types iana and iata. + type: object + properties: + start_address: description: |- - The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. + The first IP address of the lease pool. + type: string + format: ipv6 + x-field-uid: 1 + prefix_len: + description: |- + The IPv6 network prefix length is used for incrementing the lease address within the lease pool where multiple addresses are configured by using the size field. The address is incremented using the configured Prefix Length and Step. type: integer format: uint32 - default: 0 + default: 64 + maximum: 128 x-field-uid: 2 - value: + size: + description: |- + The total number of addresses in the pool. type: integer format: uint32 - maximum: 65535 - default: 0 + default: 1 + minimum: 1 + maximum: 1000000 x-field-uid: 3 - Flow.RSVP.Message: + step: + description: |- + The increment value for the lease address within the lease pool where multiple addresses are present. The value is incremented according to the configured Prefix Length and Step. + type: integer + format: uint32 + default: 1 + minimum: 1 + x-field-uid: 4 + Dhcpv6Server.IapdPoolInfo: + description: |- + The container for prefix pool configurations for IA type iapd. type: object properties: - choice: + start_prefix_address: + description: |- + The first IP address of the prefix pool. type: string - default: path - x-enum: - path: - x-field-uid: 1 + format: ipv6 x-field-uid: 1 - enum: - - path - path: - $ref: '#/components/schemas/Flow.RSVP.PathMessage' + configured_prefix_len: + description: "The IPv6 network prefix length is used for incrementing the\ + \ lease address within the lease pool where multiple addresses are configured\ + \ by using the size field. The address is incremented using the configured\ + \ Prefix Length and Step. " + type: integer + format: uint32 + default: 64 + maximum: 128 x-field-uid: 2 - Flow.RSVP.PathMessage: + prefix_size: + description: |- + The total number of addresses in the pool. + type: integer + format: uint32 + default: 10 + minimum: 1 + maximum: 1000000 + x-field-uid: 3 + prefix_step: + description: |- + The increment value for the lease address within the lease pool where multiple addresses are present. The value is incremented according to the Prefix Length and Step. + type: integer + format: uint32 + default: 1 + minimum: 1 + x-field-uid: 4 + advertised_prefix_len: + description: "The prefix length of the IPv6 prefix that the Dhcpv6 server\ + \ offers to the Dhcpv6 client. " + type: integer + format: uint32 + default: 64 + maximum: 128 + x-field-uid: 5 + Dhcpv6Server.IanapdPoolInfo: description: |- - "Path" message requires the following list of objects in order as defined in https://www.rfc-editor.org/rfc/rfc3209.html#page-15: 1. SESSION 2. RSVP_HOP 3. TIME_VALUES 4. EXPLICIT_ROUTE [optional] 5. LABEL_REQUEST 6. SESSION_ATTRIBUTE [optional] 7. SENDER_TEMPLATE 8. SENDER_TSPEC 9. RECORD_ROUTE [optional] + The container for pool configurations for IA type ianapd. type: object properties: - objects: + iana: description: |- - "Path" message requires atleast SESSION, RSVP_HOP, TIME_VALUES, LABEL_REQUEST, SENDER_TEMPLATE and SENDER_TSPEC objects in order. - type: array - items: - $ref: '#/components/schemas/Flow.RSVP.PathObjects' + The pool configurations for IA types iana in ianapd. + $ref: '#/components/schemas/Dhcpv6Server.PoolInfo' x-field-uid: 1 - Flow.RSVP.PathObjects: + iapd: + description: |- + The pool configurations for IA types iapd in ianapd. + $ref: '#/components/schemas/Dhcpv6Server.IapdPoolInfo' + x-field-uid: 2 + DhcpV6Server.Dns: description: |- - Every RSVP object encapsulated in an RSVP message consists of a 32-bit word header and the object's contents. + Optional Dns configuration for DHCPv6 server. type: object + required: + - primary properties: - class_num: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsClass' + primary: + description: |- + The primary DNS server address that is offered to DHCP clients that request this information through a TLV option. + type: string + format: ipv6 x-field-uid: 1 - Flow.RSVPObject.Length: + secondary_dns: + description: "DHCP server secondary dns configuration options. If included\ + \ secondary DNS server address will be offered to \nDHCP clients that\ + \ request this information through a TLV option." + type: array + items: + $ref: '#/components/schemas/DhcpV6Server.SecondaryDns' + x-field-uid: 2 + DhcpV6Server.SecondaryDns: + description: |- + Advanced Dns configuration for DHCPv6 server. type: object properties: - choice: + ip: description: |- - auto or configured value. + The secondary DNS server address that is offered to DHCP clients that request this information through a TLV option. type: string - default: auto + format: ipv6 + x-field-uid: 1 + Device.Ospfv2Router: + description: |- + Under Review: OSPFv2 is currently under review for pending exploration on use cases. + + Under Review: OSPFv2 is currently under review for pending exploration on use cases. + + A container of properties for an OSPFv2 router and its interfaces & Route Ranges. + x-status: + status: under_review + information: OSPFv2 is currently under review for pending exploration on use + cases. + type: object + required: + - interfaces + - name + properties: + name: x-field-uid: 1 - x-enum: - auto: - x-field-uid: 1 - value: - x-field-uid: 2 - enum: - - auto - - value - auto: description: |- - The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. - type: integer - format: uint32 - default: 4 + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + router_id: + description: |- + OSPFv2 Router Id. + $ref: '#/components/schemas/Ospfv2.RouterId' x-field-uid: 2 - value: + lsa_retransmit_time: + description: |- + The time in seconds for LSA retransmission. type: integer format: uint32 - minimum: 4 - maximum: 65535 - default: 4 + default: 5 + minimum: 1 x-field-uid: 3 - Flow.RSVP.PathObjectsClass: + lsa_refresh_time: + description: |- + The time in seconds required for LSA refresh. + type: integer + format: uint32 + default: 1800 + minimum: 5 + x-field-uid: 4 + inter_burst_lsu_interval: + description: "The gap in miliseconds between each Flood Link State Update\ + \ Burst " + type: integer + format: uint32 + default: 33 + x-field-uid: 5 + max_flood_lsu_per_burst: + description: "The maximum number of Flood LSUpdates for each burst " + type: integer + format: uint32 + default: 1 + minimum: 1 + x-field-uid: 6 + graceful_restart: + $ref: '#/components/schemas/Ospfv2.GracefulRestart' + x-field-uid: 7 + store_lsa: + description: |- + Configuration for controlling storage of OSPFv2 learned LSAs received from the neighbors. + type: boolean + default: false + x-field-uid: 8 + capabilities: + description: |- + A router indicates the optional capabilities that it supports in its OSPF Hello packets, Database Description packets and in its LSAs. + $ref: '#/components/schemas/Ospfv2.Options' + x-field-uid: 9 + interfaces: + description: |- + List of OSPFv2 interfaces for this router. + type: array + items: + $ref: '#/components/schemas/Ospfv2.Interface' + x-field-uid: 10 + v4_routes: + description: |- + Emulated OSPFv4 IPv4 routes. + type: array + items: + $ref: '#/components/schemas/Ospfv2.V4RouteRange' + x-field-uid: 11 + Ospfv2.RouterId: description: |- - The class number is used to identify the class of an object. Defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-4 . Curently supported class numbers are for "Path" message type. "Path" message: Supported Class numbers and it's value: SESSION: 1, RSVP_HOP: 3, TIME_VALUES: 5, EXPLICIT_ROUTE: 20, LABEL_REQUEST: 19, SESSION_ATTRIBUTE: 207, SENDER_TEMPLATE: 11, SENDER_TSPEC: 12, RECORD_ROUTE: 21, Custom: User defined bytes based on class and c-types not supported in above options. + Container for OSPFv2 Router ID configuration. type: object - required: - - choice properties: choice: + description: |- + IP address of Router ID for this emulated OSPFv2 router. + - interface_ip: When IPv4 interface address to be assigned as Router ID. + - custom: When, Router ID needs to be configured different from Interface IPv4 address. type: string + default: interface_ip x-field-uid: 1 x-enum: - session: + interface_ip: x-field-uid: 1 - rsvp_hop: - x-field-uid: 2 - time_values: - x-field-uid: 3 - explicit_route: - x-field-uid: 4 - label_request: - x-field-uid: 5 - session_attribute: - x-field-uid: 6 - sender_template: - x-field-uid: 7 - sender_tspec: - x-field-uid: 8 - record_route: - x-field-uid: 9 custom: - x-field-uid: 10 + x-field-uid: 2 enum: - - session - - rsvp_hop - - time_values - - explicit_route - - label_request - - session_attribute - - sender_template - - sender_tspec - - record_route + - interface_ip - custom - session: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassSession' + custom: + description: |- + Router ID in IPv4 address format. + type: string + format: ipv4 + x-field-uid: 3 + Ospfv2.Options: + description: "The OSPFv2 Options field is present Database Description packets\ + \ and all LSAs. \nThis enables OSPF routers to support (or not support) optional\ + \ capabilities, \nand to communicate their capability level to other OSPF\ + \ routers.\nWhen capabilities are exchanged in Database Description packets\ + \ a\nrouter can choose not to forward certain LSAs to a neighbor because\n\ + of its reduced functionality.\nReference: A.2 The Options field: https://www.rfc-editor.org/rfc/rfc2328#page-46." + type: object + properties: + t_bit: + description: |- + Type of Service: 0th-bit: describes OSPFv2's TOS capability. + type: boolean + default: false + x-field-uid: 1 + e_bit: + description: |- + External Capability: 1st-bit: describes the way AS-external-LSAs are flooded. + type: boolean + default: false x-field-uid: 2 - rsvp_hop: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassRsvpHop' + mc_bit: + description: |- + Multicast Capability: 2nd-bit: describes whether IP multicast datagrams are forwarded according to the specifications in [Ref18], rfc2328. + type: boolean + default: false x-field-uid: 3 - time_values: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassTimeValues' + np_bit: + description: |- + NSSA Capability: 3rd-bit: describes the handling of Type-7 LSAs, as specified in [Ref19], rfc2328. + type: boolean + default: false x-field-uid: 4 - explicit_route: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassExplicitRoute' + ea_bit: + description: |- + External Attribute: 4th-bit: describes the router's willingness to receive and forward External-Attributes-LSAs, as specified in [Ref20], rfc2328. + type: boolean + default: false x-field-uid: 5 - label_request: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassLabelRequest' + dc_bit: + description: |- + Demand Circuit: 5th-bit: describes the router's handling of demand circuits, as specified in [Ref21], rfc2328. + type: boolean + default: false x-field-uid: 6 - session_attribute: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassSessionAttribute' + o_bit: + description: |- + Opaque LSA's Forwarded: 6th-bit: describes the router's willingness to receive and forward Opaque-LSAs, rfc2370. + type: boolean + default: false x-field-uid: 7 - sender_template: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassSenderTemplate' + unused_bit: + description: |- + Opaque LSA's Forwarded: 7th-bit: unused bit. + type: boolean + default: false x-field-uid: 8 - sender_tspec: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassSenderTspec' + lsa_b_bit: + description: |- + Set to indicate that the router acts as an Area Border Router. + type: boolean + default: false x-field-uid: 9 - record_route: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassRecordRoute' + lsa_e_bit: + description: |- + Set to indicate that the router acts as an AS Boundary Router. + type: boolean + default: false x-field-uid: 10 - custom: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsCustom' - x-field-uid: 11 - Flow.RSVP.PathObjectsClassSession: + Ospfv2.GracefulRestart: description: |- - C-Type is specific to a class num. + Container of properties of OSPFv2 Graceful Retstart. type: object properties: - length: + helper_mode: description: |- - A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. - $ref: '#/components/schemas/Flow.RSVPObject.Length' - x-field-uid: 1 - c_type: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsSessionCType' - x-field-uid: 2 - Flow.RSVP.PathObjectsSessionCType: - description: |- - The body of an object corresponding to the class number and c-type. Currently supported c-type for SESSION object is LSP Tunnel IPv4 (7). - type: object - properties: - choice: - type: string + Support of Graceful Restart in Helper Mode. + type: boolean + default: false x-field-uid: 1 - default: lsp_tunnel_ipv4 - x-enum: - lsp_tunnel_ipv4: - x-field-uid: 1 - enum: - - lsp_tunnel_ipv4 - lsp_tunnel_ipv4: - $ref: '#/components/schemas/Flow.RSVP.PathSessionLspTunnelIpv4' - x-field-uid: 2 - Flow.RSVP.PathSessionLspTunnelIpv4: + Ospfv2.Interface: description: |- - Class = SESSION, LSP_TUNNEL_IPv4 C-Type = 7. + Configuration for single OSPFv2 interface. type: object + required: + - name + - ipv4_name properties: - ipv4_tunnel_end_point_address: + name: x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSessionLspTunnelIpv4.Ipv4TunnelEndPointAddress' - reserved: + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + ipv4_name: + description: "The globally unique name of the IPv4 interface connected to\ + \ the DUT. \n\nx-constraint:\n- /components/schemas/Device.Ipv4/properties/name\n\ + \n\nx-constraint:\n- /components/schemas/Device.Ipv4/properties/name\n" + type: string + x-constraint: + - /components/schemas/Device.Ipv4/properties/name x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSessionLspTunnelIpv4.Reserved' - tunnel_id: + area: + description: "The Area ID of the area to which the attached network belongs.\n\ + All routing protocol packets originating from the interface are\nlabelled\ + \ with this Area ID. " + $ref: '#/components/schemas/Ospfv2Interface.Area' x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSessionLspTunnelIpv4.TunnelId' - extended_tunnel_id: + network_type: description: |- - A 32-bit identifier used in the SESSION that remains constant over the life of the tunnel. Normally set to all zeros. Ingress nodes that wish to narrow the scope of a SESSION to the ingress-egress pair may place their IPv4 address here as a globally unique identifier. - $ref: '#/components/schemas/Flow.RSVP.PathSessionExtTunnelId' + The OSPF network link type. + $ref: '#/components/schemas/Ospfv2Interface.NetworkType' x-field-uid: 4 - Flow.RSVP.PathSessionExtTunnelId: + traffic_engineering: + description: |- + Contains a list of Traffic Engineering attributes. + type: array + items: + $ref: '#/components/schemas/LinkState.TE' + x-field-uid: 5 + authentication: + description: |- + OSPFv2 authentication properties. + If the authentication is not configured, none OSPF packet exchange is authenticated. + $ref: '#/components/schemas/Ospfv2Interface.Authentication' + x-field-uid: 6 + advanced: + description: |- + Optional container for advanced interface properties. + $ref: '#/components/schemas/Ospfv2Interface.Advanced' + x-field-uid: 7 + link_protection: + description: |- + Link protection on the OSPFv2 link between two interfaces. + $ref: '#/components/schemas/Ospfv2Interface.LinkProtection' + x-field-uid: 8 + srlg_values: + description: |- + A Shared Risk Link Group (SRLG) is represented by a 32-bit number unique within an IGP (OSPFv2 and IS-IS) domain. + An SRLG is a set of links sharing a common resource, which affects all links in the set if the common resource fails. + Links share the same risk of failure and are therefore considered to belong to the same SRLG. + type: array + items: + type: integer + format: uint32 + maximum: 16777215 + default: 0 + x-field-uid: 9 + Ospfv2Interface.Area: + description: "Container for OSPF Area ID identifies the routing area to which\ + \ the host belongs.. " type: object properties: choice: description: |- - 32 bit integer or IPv4 address. + The OSPF Area ID identifies the routing area to which the host belongs. Area ID type can be following format. + - id: A 32-bit number identifying the area. + - ip: The Area ID in IPv4 address format. type: string - default: as_integer + default: id x-field-uid: 1 x-enum: - as_integer: + id: x-field-uid: 1 - as_ipv4: + ip: x-field-uid: 2 enum: - - as_integer - - as_ipv4 - as_integer: + - id + - ip + id: + description: |- + The Area ID. + type: integer + format: uint32 + default: 0 x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSessionExtTunnelId.AsInteger' - as_ipv4: + ip: + description: |- + The Area ID in IPv4 address format. + type: string + format: ipv4 x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSessionExtTunnelId.AsIpv4' - Flow.RSVP.PathObjectsClassRsvpHop: - description: |- - C-Type is specific to a class num. - type: object - properties: - length: - description: |- - A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. - $ref: '#/components/schemas/Flow.RSVPObject.Length' - x-field-uid: 1 - c_type: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsRsvpHopCType' - x-field-uid: 2 - Flow.RSVP.PathObjectsRsvpHopCType: - description: |- - Object for RSVP_HOP class. Currently supported c-type is IPv4 (1). + Ospfv2Interface.NetworkType: + description: "The OSPF network link type options.\n - Point to Point: \n -\ + \ Broadcast: \n - Point to Multipoint: In this case, at least a neigbor to\ + \ be configured. " type: object properties: choice: type: string + default: broadcast x-field-uid: 1 - default: ipv4 x-enum: - ipv4: + broadcast: x-field-uid: 1 + point_to_point: + x-field-uid: 2 + point_to_multipoint: + x-field-uid: 3 enum: - - ipv4 - ipv4: - $ref: '#/components/schemas/Flow.RSVP.PathRsvpHopIpv4' + - broadcast + - point_to_point + - point_to_multipoint + point_to_multipoint: + description: |- + List of Neigbhors. + type: array + items: + $ref: '#/components/schemas/Ospfv2Interface.Neighbor' x-field-uid: 2 - Flow.RSVP.PathRsvpHopIpv4: + Ospfv2Interface.Neighbor: description: |- - IPv4 RSVP_HOP object: Class = 3, C-Type = 1 + Configuration of a neighbor. type: object properties: - ipv4_address: + neighbor_ip: + type: string + format: ipv4 x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathRsvpHopIpv4.Ipv4Address' - logical_interface_handle: + Ospfv2Interface.Advanced: + description: |- + Contains OSPFv2 advanced properties. + type: object + properties: + hello_interval: + description: |- + The time interval, in seconds, between the Hello packets that + the router sends on the interface. Advertised in Hello packets + sent out this interface. + type: integer + format: uint32 + default: 10 + x-field-uid: 1 + dead_interval: + description: |- + The time interval in seconds before the router's neighbors will declare + it down, when they stop hearing the router's Hello Packets. + Advertised in Hello packets sent out this interface. + type: integer + format: uint32 + default: 40 x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathRsvpHopIpv4.LogicalInterfaceHandle' - Flow.RSVP.PathObjectsClassTimeValues: + routing_metric: + description: |- + Routing metric associated with the interface.. + type: integer + format: uint32 + default: 0 + x-field-uid: 3 + priority: + description: "The Priority for (Backup) Designated Router election. \ + \ \t\nThis value is used in Hello packets for the Designated Router\ + \ (DR) election process.\nThe default is 0, which indicates that the router\ + \ will not participate in the DR election process." + type: integer + format: uint32 + default: 0 + x-field-uid: 4 + validate_received_mtu: + description: "If this is set to true, then the MTU received from the neighbor\ + \ during Database (DB) Exchange \nwill be validated, otherwise it will\ + \ be ignored.\n" + type: boolean + default: true + x-field-uid: 5 + Ospfv2Interface.Options: description: |- - C-Type is specific to a class num. + The OSPF Options field is present in OSPF Hello packets, Database Description packets and all LSAs. + The Options field enables OSPF routers to support (or not support) optional capabilities, and to + communicate their capability level to other OSPF routers https://datatracker.ietf.org/doc/html/rfc2328#page-46. + When used in Hello packets, the Options field allows a router to reject a neighbor because of a capability mismatch. type: object properties: - length: + t_bit: description: |- - A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. - $ref: '#/components/schemas/Flow.RSVPObject.Length' + Type of Service: 0th-bit: describes OSPFv2's TOS capability. + type: boolean + default: false x-field-uid: 1 - c_type: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsTimeValuesCType' + e_bit: + description: |- + External Capability: This bit describes the way AS-external-LSAs are flooded. + type: boolean + default: false x-field-uid: 2 - Flow.RSVP.PathObjectsTimeValuesCType: + mc_bit: + description: |- + Multicast Capability: This bit describes whether IP multicast datagrams are forwarded according to the specifications in [Ref18], rfc2328. + type: boolean + default: false + x-field-uid: 3 + np_bit: + description: |- + NSSA Capability: This bit describes the handling of Type-7 LSAs, as specified in [Ref19], rfc2328. + type: boolean + default: false + x-field-uid: 4 + ea_bit: + description: |- + External Attribute: This bit describes the router's willingness to receive and forward External-Attributes-LSAs, as specified in [Ref20], rfc2328. + type: boolean + default: false + x-field-uid: 5 + dc_bit: + description: |- + Demand Circuit: This bit describes the router's handling of demand circuits, as specified in [Ref21], rfc2328. + type: boolean + default: false + x-field-uid: 6 + o_bit: + description: |- + Opaque LSA's Forwarded: This bit describes the router's willingness to receive and forward Opaque-LSAs, rfc2370. + type: boolean + default: false + x-field-uid: 7 + unused_bit: + description: |- + Opaque LSA's Forwarded: 7th-bit: unused bit. + type: boolean + default: false + x-field-uid: 8 + Ospfv2Interface.Authentication: description: |- - Object for TIME_VALUES class. Currently supported c-type is Type 1 Time Value (1). + This contains OSPFv2 authentication properties. + Reference: https://www.rfc-editor.org/rfc/rfc2328#appendix-D type: object properties: choice: + description: "The authentication method.\n- md5 - Cryptographic authentication.\n\ + - clear_text - Simple password authentication. A 64-bit field is configured\ + \ on a per-network basis. \n All packets sent on a particular network\ + \ must have this configured value (in clear text) \n in their OSPF header\ + \ 64-bit authentication field." type: string + default: clear_text x-field-uid: 1 - default: type_1 x-enum: - type_1: + md5s: x-field-uid: 1 + clear_text: + x-field-uid: 2 enum: - - type_1 - type_1: - $ref: '#/components/schemas/Flow.RSVP.PathTimeValuesType1' + - md5s + - clear_text + md5s: + description: |- + List of MD5 Key IDs and MD5 Keys. + type: array + items: + $ref: '#/components/schemas/Ospfv2Authentication.Md5' x-field-uid: 2 - Flow.RSVP.PathTimeValuesType1: - description: |- - TIME_VALUES Object: Class = 5, C-Type = 1 + clear_text: + description: |- + The 8 Byte authentication field in the OSPF packet. + type: string + minLength: 1 + maxLength: 8 + default: otg + x-field-uid: 4 + Ospfv2Authentication.Md5: + description: "Container of Cryptographic authentication. \nIf the authentication\ + \ type is of 'md5' then 'md5_key_id' and 'md5_key' \nboth are to be configured.\ + \ A shared secret key is configured in all routers attached to a common network/subnet.\n\ + For each OSPF protocol packet, the key is used to generate/verify a \"message\ + \ digest\" that is appended to the end\nof the OSPF packet." type: object properties: - refresh_period_r: + key_id: + description: |- + The unique MD5 Key Identifier per-interface. + type: integer + format: uint32 + minimum: 1 + maximum: 255 x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathTimeValuesType1.RefreshPeriodR' - Flow.RSVP.PathObjectsClassExplicitRoute: + key: + description: "An alphanumeric secret used to generate the 16 byte MD5 hash\ + \ value added \nto the OSPFv2 PDU in the Authentication TLV." + type: string + minLength: 1 + maxLength: 16 + x-field-uid: 2 + Ospfv2Interface.LinkProtection: description: |- - C-Type is specific to a class num. + Optional container for the link protection sub TLV (type 20). type: object properties: - length: + extra_traffic: description: |- - A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. - $ref: '#/components/schemas/Flow.RSVPObject.Length' + Enable this to protect other link or links. LSAs on a link of this type are lost + if any of the links fail. + type: boolean + default: false x-field-uid: 1 - c_type: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassExplicitRouteCType' + unprotected: + description: "Enabling this signifies that there is no other link protecting\ + \ this \nlink. LSAs on a link of this type are lost if the link fails." + type: boolean + default: false x-field-uid: 2 - Flow.RSVP.PathObjectsClassExplicitRouteCType: + shared: + description: "Enable this to share the Extra Traffic links between one or\ + \ more \nlinks of type Shared.There are one or more disjoint links of\ + \ type \nExtra Traffic that are protecting this link." + type: boolean + default: false + x-field-uid: 3 + dedicated_1_to_1: + description: "Enabling this signifies that there is one dedicated disjoint\ + \ link \nof type Extra Traffic that is protecting this link." + type: boolean + default: false + x-field-uid: 4 + dedicated_1_plus_1: + description: "Enabling this signifies that a dedicated disjoint link is\ + \ protecting \nthis link. However, the protecting link is not advertised\ + \ in the \nlink state database and is therefore not available for the\ + \ routing \nof LSAs." + type: boolean + default: false + x-field-uid: 5 + enhanced: + description: "Enabling this signifies that a protection scheme that is more\ + \ \nreliable than Dedicated 1+1." + type: boolean + default: false + x-field-uid: 6 + reserved_40: + description: "This is a Protection Scheme with value 0x40. " + type: boolean + default: false + x-field-uid: 7 + reserved_80: + description: "This is a Protection Scheme with value 0x80. " + type: boolean + default: false + x-field-uid: 8 + Ospfv2.V4RouteRange: description: |- - Object for EXPLICIT_ROUTE class and c-type is Type 1 Explicit Route (1). + Emulated OSPFv2 IPv4 routes. + type: object + properties: + name: + x-field-uid: 1 + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + addresses: + description: |- + A list of group of IPv4 route addresses. + type: array + items: + $ref: '#/components/schemas/V4RouteAddress' + x-field-uid: 2 + metric: + description: |- + The user-defined metric associated with this route range. + type: integer + format: uint32 + default: 0 + minimum: 0 + maximum: 16777215 + x-field-uid: 3 + route_origin: + description: |- + The type of the OSPFv2 routes. + $ref: '#/components/schemas/Ospfv2V4RR.RouteOrigin' + x-field-uid: 4 + required: + - name + Ospfv2V4RR.RouteOrigin: + description: "Container of type of the OSPFv2 types correspond directly to the\ + \ OSPFv2 LSAs types as\ndefined in the \"OSPFv2 Link State (LS) Type - http://www.iana.org/assignments/ospfv2-parameters.\ + \ " type: object properties: choice: + description: |- + Supported types are: - intra_area: for Intra-Area. - inter_area: for Inter Area. - external_type_1: for Autonomous System (AS) External with internal AS meteric. - external_type_2: for Autonomous System (AS) External with internal and external AS meteric. - nssa_external: for 7 Not-So-Stubby Area (NSSA) External. type: string - default: type_1 + default: inter_area x-field-uid: 1 x-enum: - type_1: + intra_area: x-field-uid: 1 + inter_area: + x-field-uid: 2 + external_type_1: + x-field-uid: 3 + external_type_2: + x-field-uid: 4 + nssa_external: + x-field-uid: 5 enum: - - type_1 - type_1: - $ref: '#/components/schemas/Flow.RSVP.PathExplicitRouteType1' + - intra_area + - inter_area + - external_type_1 + - external_type_2 + - nssa_external + intra_area: + description: |- + Configuration for the Intra-Area. + $ref: '#/components/schemas/Ospfv2V4RR.IntraArea' x-field-uid: 2 - Flow.RSVP.PathExplicitRouteType1: + inter_area: + description: |- + Configuration for the Intra-Area. + $ref: '#/components/schemas/Ospfv2V4RR.InterArea' + x-field-uid: 3 + external_type_1: + description: |- + Configuration for the External Type 1. + $ref: '#/components/schemas/Ospfv2V4RR.ExternalType1' + x-field-uid: 4 + external_type_2: + description: |- + Configuration for the External Type 2. + $ref: '#/components/schemas/Ospfv2V4RR.ExternalType2' + x-field-uid: 5 + nssa_external: + description: |- + Configuration for the External Type 2. + $ref: '#/components/schemas/Ospfv2V4RR.NssaExternal' + x-field-uid: 6 + Ospfv2V4RR.IntraArea: description: |- - Type1 Explicit Route has subobjects. Currently supported subobjects are IPv4 prefix and Autonomous system number. + Container for Intra-Area. type: object properties: - subobjects: - type: array - minItems: 1 - items: - $ref: '#/components/schemas/Flow.RSVP.Type1ExplicitRouteSubobjects' + flags: + description: |- + One-octet field contains flags applicable to the prefix. + $ref: '#/components/schemas/Ospfv2V4RR.ExtdPrefixFlags' x-field-uid: 1 - Flow.RSVP.Type1ExplicitRouteSubobjects: + Ospfv2V4RR.InterArea: description: |- - Type is specific to a subobject. + Container for Intra-Area. type: object properties: - type: - $ref: '#/components/schemas/Flow.RSVP.Type1ExplicitRouteSubobjectsType' + flags: + description: |- + One-octet field contains flags applicable to the prefix. + $ref: '#/components/schemas/Ospfv2V4RR.ExtdPrefixFlags' x-field-uid: 1 - Flow.RSVP.Type1ExplicitRouteSubobjectsType: + Ospfv2V4RR.ExternalType1: description: |- - Currently supported subobjects are IPv4 address(1) and Autonomous system number(32). + Container for Intra-Area. type: object properties: - choice: - type: string + flags: + description: |- + One-octet field contains flags applicable to the prefix. + $ref: '#/components/schemas/Ospfv2V4RR.ExtdPrefixFlags' x-field-uid: 1 - default: ipv4_prefix - x-enum: - ipv4_prefix: - x-field-uid: 1 - as_number: - x-field-uid: 2 - enum: - - ipv4_prefix - - as_number - ipv4_prefix: - $ref: '#/components/schemas/Flow.RSVP.PathExplicitRouteType1Ipv4Prefix' - x-field-uid: 2 - as_number: - $ref: '#/components/schemas/Flow.RSVP.PathExplicitRouteType1ASNumber' - x-field-uid: 3 - Flow.RSVP.PathExplicitRouteType1Ipv4Prefix: + Ospfv2V4RR.ExternalType2: description: |- - Class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Prefix, C-Type: 1 + Container for Intra-Area. type: object properties: - l_bit: + flags: + description: |- + One-octet field contains flags applicable to the prefix. + $ref: '#/components/schemas/Ospfv2V4RR.ExtdPrefixFlags' x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathExplicitRouteType1Ipv4Prefix.LBit' - length: + Ospfv2V4RR.NssaExternal: + description: |- + Container for Intra-Area. + type: object + properties: + flags: description: |- - The Length contains the total length of the subobject in bytes,including L,Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. - $ref: '#/components/schemas/Flow.RSVPExplicitRoute.Length' - x-field-uid: 2 - ipv4_address: - x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathExplicitRouteType1Ipv4Prefix.Ipv4Address' - prefix: + One-octet field contains flags applicable to the prefix. + $ref: '#/components/schemas/Ospfv2V4RR.ExtdPrefixFlags' + x-field-uid: 1 + propagation: description: |- - The prefix length of the IPv4 address. - type: integer - format: uint32 - minimum: 1 - maximum: 32 - default: 32 - x-field-uid: 4 - Flow.RSVP.PathExplicitRouteType1ASNumber: + The flag is set True if LSA will be propagated between Areas. + type: boolean + default: false + x-field-uid: 2 + Ospfv2V4RR.ExtdPrefixFlags: description: |- - Class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Autonomous system number, C-Type: 32 + One-octet field contains flags applicable to the prefix. https://datatracker.ietf.org/doc/html/rfc7684. type: object properties: - l_bit: + a_flag: + description: |- + 0x80 - (Attach Flag): An Area Border Router (ABR) + generating an OSPFv2 Extended Prefix TLV for an inter-area + prefix that is locally connected or attached in another + connected area SHOULD set this flag. + type: boolean + default: false x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathExplicitRouteType1ASNumber.LBit' - length: + n_flag: description: |- - The Length contains the total length of the subobject in bytes,including L, Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. - $ref: '#/components/schemas/Flow.RSVPExplicitRouteASNumber.Length' + N-Flag (Node Flag): Set when the prefix identifies the + advertising router, i.e., the prefix is a host prefix + advertising a globally reachable address typically associated + with a loopback address. + type: boolean + default: false x-field-uid: 2 - as_number: - description: |- - Autonomous System number to be set in the ERO sub-object that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'as_number'. - type: integer - format: uint32 - default: 0 - maximum: 65535 - x-field-uid: 3 - Flow.RSVPExplicitRoute.Length: + Flow: + description: |- + A high level data plane traffic flow. type: object + required: + - tx_rx + - name properties: - choice: + tx_rx: description: |- - auto or configured value. - type: string - default: auto + The transmit and receive endpoints. + $ref: '#/components/schemas/Flow.TxRx' x-field-uid: 1 - x-enum: - auto: - x-field-uid: 1 - value: - x-field-uid: 2 - enum: - - auto - - value - auto: - description: "The OTG implementation will provide a system generated value\ - \ for this property. If the OTG implementation is unable to generate\ - \ a value the default value must be used. " - type: integer - format: uint32 - default: 8 + packet: + description: "The list of protocol headers defining the shape of all \n\ + intended packets in corresponding flow as it is transmitted\nby traffic-generator\ + \ port.\n\nThe order of protocol headers assigned to the list is the\n\ + order they will appear on the wire.\n\nIn the case of an empty list the\ + \ keyword/value of minItems: 1 \nindicates that an implementation MUST\ + \ provide at least one \nFlow.Header object.\n\nThe default value for\ + \ the Flow.Header choice property is ethernet \nwhich will result in an\ + \ implementation by default providing at least \none ethernet packet header." + type: array + minItems: 1 + items: + $ref: '#/components/schemas/Flow.Header' x-field-uid: 2 - value: - type: integer - format: uint32 - maximum: 255 - default: 8 + egress_packet: + description: "Under Review: The packet header schema for egress tracking\ + \ currently exposes unwanted fields. The query structure for tagged metrics\ + \ inside flows metrics requires documenting expected response format.\n\ + \nUnder Review: The packet header schema for egress tracking currently\ + \ exposes unwanted fields. The query structure for tagged metrics inside\ + \ flows metrics requires documenting expected response format.\n\nThe\ + \ list of protocol headers defining the shape of all \nintended packets\ + \ in corresponding flow as it is received\nby traffic-generator port.\n\ + \nFor all protocol headers, only the `metric_tags` property is configurable." + type: array + items: + $ref: '#/components/schemas/Flow.Header' + x-status: + status: under-review + information: The packet header schema for egress tracking currently exposes + unwanted fields. The query structure for tagged metrics inside flows + metrics requires documenting expected response format. + x-field-uid: 9 + size: + description: |- + The size of the packets. + $ref: '#/components/schemas/Flow.Size' x-field-uid: 3 - Flow.RSVPExplicitRouteASNumber.Length: + rate: + description: |- + The transmit rate of the packets. + $ref: '#/components/schemas/Flow.Rate' + x-field-uid: 4 + duration: + description: |- + The transmit duration of the packets. + $ref: '#/components/schemas/Flow.Duration' + x-field-uid: 5 + metrics: + description: "Flow metrics. " + $ref: '#/components/schemas/Flow.Metrics' + x-field-uid: 6 + name: + x-field-uid: 7 + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + Flow.TxRx: + description: "A container for different types of transmit and receive \nendpoint\ + \ containers." type: object properties: choice: description: |- - auto or configured value. + The type of transmit and receive container used by the flow. type: string - default: auto + default: port x-field-uid: 1 x-enum: - auto: + port: x-field-uid: 1 - value: + device: x-field-uid: 2 enum: - - auto - - value - auto: - description: "The OTG implementation will provide a system generated value\ - \ for this property. If the OTG implementation is unable to generate\ - \ a value the default value must be used. " - type: integer - format: uint32 - default: 4 + - port + - device + port: + $ref: '#/components/schemas/Flow.Port' x-field-uid: 2 - value: - type: integer - format: uint32 - maximum: 255 - default: 4 + device: + $ref: '#/components/schemas/Flow.Router' x-field-uid: 3 - Flow.RSVP.PathObjectsClassLabelRequest: - description: |- - C-Type is specific to a class num. - type: object - properties: - length: - description: |- - A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. - $ref: '#/components/schemas/Flow.RSVPObject.Length' - x-field-uid: 1 - c_type: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsLabelRequestCType' - x-field-uid: 2 - Flow.RSVP.PathObjectsLabelRequestCType: - description: |- - Object for LABEL_REQUEST class. Currently supported c-type is Without Label Range (1). + Flow.Port: + description: "A container for a transmit port and 0..n intended receive ports.\n\ + When assigning this container to a flow the flows's \npacket headers will\ + \ not be populated with any address resolution \ninformation such as source\ + \ and/or destination addresses. \nFor example Flow.Ethernet dst mac address\ + \ values will be defaulted to 0. \nFor full control over the Flow.properties.packet\ + \ header contents use this \ncontainer. " type: object + required: + - tx_name properties: - choice: + tx_name: + description: | + The unique name of a port that is the transmit port. + + x-constraint: + - /components/schemas/Port/properties/name + - /components/schemas/Lag/properties/name + + + x-constraint: + - /components/schemas/Port/properties/name + - /components/schemas/Lag/properties/name type: string + x-constraint: + - /components/schemas/Port/properties/name + - /components/schemas/Lag/properties/name x-field-uid: 1 - default: without_label_range - x-enum: - without_label_range: - x-field-uid: 1 - enum: - - without_label_range - without_label_range: - $ref: '#/components/schemas/Flow.RSVP.PathLabelRequestWithoutLabelRange' + rx_name: + description: | + Deprecated: This property is deprecated in favor of property rx_names + + Deprecated: This property is deprecated in favor of property rx_names + + The unique name of a port that is the intended receive port. + + x-constraint: + - /components/schemas/Port/properties/name + - /components/schemas/Lag/properties/name + + + x-constraint: + - /components/schemas/Port/properties/name + - /components/schemas/Lag/properties/name + x-status: + status: deprecated + information: This property is deprecated in favor of property rx_names + type: string + x-constraint: + - /components/schemas/Port/properties/name + - /components/schemas/Lag/properties/name x-field-uid: 2 - Flow.RSVP.PathLabelRequestWithoutLabelRange: - description: |- - Class = LABEL_REQUEST, Without Label Range C-Type = 1 - type: object - properties: - reserved: - x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathLabelRequestWithoutLabelRange.Reserved' - l3pid: - x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathLabelRequestWithoutLabelRange.L3pid' - Flow.RSVP.PathObjectsClassSessionAttribute: - description: |- - C-Type is specific to a class num. - type: object - properties: - length: - description: |- - A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. - $ref: '#/components/schemas/Flow.RSVPObject.Length' - x-field-uid: 1 - c_type: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsSessionAttributeCType' - x-field-uid: 2 - Flow.RSVP.PathObjectsSessionAttributeCType: + rx_names: + description: | + Unique name of ports or lags that are intended receive endpoints. + + x-constraint: + - /components/schemas/Port/properties/name + - /components/schemas/Lag/properties/name + + + x-constraint: + - /components/schemas/Port/properties/name + - /components/schemas/Lag/properties/name + type: array + items: + description: |- + The unique name of a port or lag that is the intended receive port. + type: string + x-constraint: + - /components/schemas/Port/properties/name + - /components/schemas/Lag/properties/name + x-field-uid: 3 + Flow.Router: description: |- - Object for SESSION_ATTRIBUTE class. Currently supported c-type is LSP_Tunnel_RA (1) and LSP_Tunnel (7). + A container for declaring a map of 1..n transmit devices to 1..n receive devices. This allows for a single flow to have different tx to rx device flows such as a single one to one map or a many to many map. type: object + required: + - tx_names + - rx_names properties: - choice: + mode: + description: "Determines the intent of creating traffic sub-flow(s) between\ + \ the device \nendpoints, from the entities of tx_names to the\ + \ entities of rx_names \nto derive how auto packet fields\ + \ can be populated with \nthe actual value(s) by the implementation.\n\ + \nThe one_to_one mode creates traffic sub-flow(s) between each\ + \ device endpoint pair in \ntx_names to rx_names by index.\nThe length\ + \ of tx_names and rx_names MUST be the same.\nThe same device name can\ + \ be repeated multiple times in tx_names or rx_names, in any order to\ + \ create desired meshing between device(s).\nFor 2 values in tx_names\ + \ and 2 values in rx_names, 2 device endpoint pairs would be generated\ + \ (each pair representing a traffic sub-flow).\n\nThe mesh mode\ + \ creates traffic sub-flow(s) between each value in tx_names to\nevery\ + \ value in rx_names, forming the device endpoint pair(s).\nFor 2 values\ + \ in tx_names and 3 values in rx_names, generated device endpoint pairs\ + \ would be 2x3=6. \n\nA generated device endpoint pair with same device\ + \ endpoint name for both transmit & receive device endpoint MUST raise\ + \ an error.\n\nPacket fields of type auto would be populated with\ + \ one value for each device endpoint pair (representing the traffic sub-flow).\ + \ \nThe value would be determined considering transmit & receive device\ + \ of the sub-flow. And the sequence of the populated value(s) \nwould\ + \ be in the order of generated device endpoint pair(s).\nIf 2 device endpoint\ + \ pairs are generated (based on mode, tx_names and rx_names), say (d1\ + \ to d3) and (d2 to d3), and ethernet.dst is set as auto, then\ + \ \nthe auto field would be replaced by the implementation with\ + \ a sequence of 2 values, [v1,v2] where \nv1 is determined using context\ + \ (d1,d3) and v2 using context (d2,d3).\nThe final outcome is that packets\ + \ generated on the wire will contain the values v1,v2,v1,... for ethernet.dst\ + \ field. Any non-auto packet fields \nshould be configured accordingly.\ + \ For example, non-auto packet field ethernet.src can be configured with\ + \ values [u1, u2], where \nu1 & u2 are source MAC of the connected interface\ + \ of device d1 and d2 respectively. Then packets on the wire will contain\ + \ correct value pairs \n(u1,v1),(u2,v2),(u1,v1),... for (ethernet.src,ethernet.dst)\ + \ fields." type: string + default: mesh x-field-uid: 1 - default: lsp_tunnel x-enum: - lsp_tunnel: + mesh: x-field-uid: 1 - lsp_tunnel_ra: + one_to_one: x-field-uid: 2 enum: - - lsp_tunnel - - lsp_tunnel_ra - lsp_tunnel: - $ref: '#/components/schemas/Flow.RSVP.PathSessionAttributeLspTunnel' - x-field-uid: 2 - lsp_tunnel_ra: - $ref: '#/components/schemas/Flow.RSVP.PathSessionAttributeLspTunnelRa' - x-field-uid: 3 - Flow.RSVP.PathSessionAttributeLspTunnel: - description: |- - SESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 7, resource affinity information. - type: object - properties: - setup_priority: - description: |- - The priority of the session with respect to taking resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. - type: integer - format: uint32 - default: 7 - maximum: 7 - x-field-uid: 1 - holding_priority: - description: |- - The priority of the session with respect to holding resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. - type: integer - format: uint32 - default: 7 - maximum: 7 + - mesh + - one_to_one + tx_names: + type: array + items: + description: |- + The unique name of an emulated device that will be transmitting. + type: string + x-constraint: + - /components/schemas/Device.Ethernet/properties/name + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv6/properties/name + - /components/schemas/Bgp.V4RouteRange/properties/name + - /components/schemas/Bgp.V6RouteRange/properties/name + - /components/schemas/Bgp.CMacIpRange/properties/name + - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name + - /components/schemas/Isis.V4RouteRange/properties/name + - /components/schemas/Isis.V6RouteRange/properties/name + - /components/schemas/Ospfv2.V4RouteRange/properties/name + - /components/schemas/Device.Dhcpv4client/properties/name + - /components/schemas/Device.Dhcpv6client/properties/name + example: + - Eth 1 + - Eth 2 + - Eth 3 + - IPv4 1 + - IPv6 1 + - Bgp V4RouteRange 1 + - Bgp V6RouteRange 1 x-field-uid: 2 - flags: - description: |- - 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired - $ref: '#/components/schemas/Flow.RSVPLspTunnel.Flag' + description: | + TBD + + x-constraint: + - /components/schemas/Device.Ethernet/properties/name + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv6/properties/name + - /components/schemas/Bgp.V4RouteRange/properties/name + - /components/schemas/Bgp.V6RouteRange/properties/name + - /components/schemas/Bgp.CMacIpRange/properties/name + - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name + - /components/schemas/Isis.V4RouteRange/properties/name + - /components/schemas/Isis.V6RouteRange/properties/name + - /components/schemas/Ospfv2.V4RouteRange/properties/name + - /components/schemas/Device.Dhcpv4client/properties/name + - /components/schemas/Device.Dhcpv6client/properties/name + + + x-constraint: + - /components/schemas/Device.Ethernet/properties/name + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv6/properties/name + - /components/schemas/Bgp.V4RouteRange/properties/name + - /components/schemas/Bgp.V6RouteRange/properties/name + - /components/schemas/Bgp.CMacIpRange/properties/name + - /components/schemas/Rsvp.LspIpv4Interface.P2PIngressIpv4Lsp/properties/name + - /components/schemas/Isis.V4RouteRange/properties/name + - /components/schemas/Isis.V6RouteRange/properties/name + - /components/schemas/Ospfv2.V4RouteRange/properties/name + - /components/schemas/Device.Dhcpv4client/properties/name + - /components/schemas/Device.Dhcpv6client/properties/name + rx_names: + type: array + items: + description: |- + The unique name of an emulated device that will be receiving. + type: string + x-constraint: + - /components/schemas/Device.Ethernet/properties/name + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv6/properties/name + - /components/schemas/Bgp.V4RouteRange/properties/name + - /components/schemas/Bgp.V6RouteRange/properties/name + - /components/schemas/Bgp.CMacIpRange/properties/name + - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name + - /components/schemas/Isis.V4RouteRange/properties/name + - /components/schemas/Isis.V6RouteRange/properties/name + - /components/schemas/Device.Dhcpv4client/properties/name + - /components/schemas/Ospfv2.V4RouteRange/properties/name + - /components/schemas/Device.Dhcpv6client/properties/name + example: + - Eth 1 + - Eth 2 + - Eth 3 + - IPv4 1 + - IPv6 1 + - Bgp V4RouteRange 1 + - Bgp V6RouteRange 1 x-field-uid: 3 - name_length: - description: "The length of the display string before padding, in bytes.\ - \ " - $ref: '#/components/schemas/Flow.RSVPSessionAttributeName.Length' - x-field-uid: 4 - session_name: - description: "A null padded string of characters. " - type: string - default: '' - minLength: 0 - maxLength: 254 - x-field-uid: 5 - Flow.RSVP.PathSessionAttributeLspTunnelRa: + description: | + TBD + + x-constraint: + - /components/schemas/Device.Ethernet/properties/name + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv6/properties/name + - /components/schemas/Bgp.V4RouteRange/properties/name + - /components/schemas/Bgp.V6RouteRange/properties/name + - /components/schemas/Bgp.CMacIpRange/properties/name + - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name + - /components/schemas/Isis.V4RouteRange/properties/name + - /components/schemas/Isis.V6RouteRange/properties/name + - /components/schemas/Device.Dhcpv4client/properties/name + - /components/schemas/Ospfv2.V4RouteRange/properties/name + - /components/schemas/Device.Dhcpv6client/properties/name + + + x-constraint: + - /components/schemas/Device.Ethernet/properties/name + - /components/schemas/Device.Ipv4/properties/name + - /components/schemas/Device.Ipv6/properties/name + - /components/schemas/Bgp.V4RouteRange/properties/name + - /components/schemas/Bgp.V6RouteRange/properties/name + - /components/schemas/Bgp.CMacIpRange/properties/name + - /components/schemas/Rsvp.LspIpv4Interface.P2PEgressIpv4Lsp/properties/name + - /components/schemas/Isis.V4RouteRange/properties/name + - /components/schemas/Isis.V6RouteRange/properties/name + - /components/schemas/Device.Dhcpv4client/properties/name + - /components/schemas/Ospfv2.V4RouteRange/properties/name + - /components/schemas/Device.Dhcpv6client/properties/name + Flow.Header: description: |- - SESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 1, it carries resource affinity information. + Configuration for all traffic packet headers type: object properties: - exclude_any: - description: "A 32-bit vector representing a set of attribute filters associated\ - \ with a tunnel any of which renders a link unacceptable. A null set (all\ - \ bits set to zero) doesn't render the link unacceptable. The most significant\ - \ byte in the hex-string is the farthest to the left in the byte sequence.\ - \ Leading zero bytes in the configured value may be omitted for brevity.\ - \ " + choice: + description: "The available types of flow headers. If one is not provided\ + \ the \ndefault ethernet packet header MUST be provided." type: string - format: hex - default: '00' - minLength: 0 - maxLength: 8 + default: ethernet x-field-uid: 1 - include_any: - description: "A 32-bit vector representing a set of attribute filters associated\ - \ with a tunnel any of which renders a link acceptable. A null set (all\ - \ bits set to zero) automatically passes. The most significant byte in\ - \ the hex-string is the farthest to the left in the byte sequence. Leading\ - \ zero bytes in the configured value may be omitted for brevity. " - type: string - format: hex - default: '00' - minLength: 0 - maxLength: 8 + x-enum: + custom: + x-field-uid: 1 + ethernet: + x-field-uid: 2 + vlan: + x-field-uid: 3 + vxlan: + x-field-uid: 4 + ipv4: + x-field-uid: 5 + ipv6: + x-field-uid: 6 + pfcpause: + x-field-uid: 7 + ethernetpause: + x-field-uid: 8 + tcp: + x-field-uid: 9 + udp: + x-field-uid: 10 + gre: + x-field-uid: 11 + gtpv1: + x-field-uid: 12 + gtpv2: + x-field-uid: 13 + arp: + x-field-uid: 14 + icmp: + x-field-uid: 15 + icmpv6: + x-field-uid: 16 + ppp: + x-field-uid: 17 + igmpv1: + x-field-uid: 18 + mpls: + x-field-uid: 19 + snmpv2c: + x-field-uid: 20 + rsvp: + x-field-uid: 21 + enum: + - custom + - ethernet + - vlan + - vxlan + - ipv4 + - ipv6 + - pfcpause + - ethernetpause + - tcp + - udp + - gre + - gtpv1 + - gtpv2 + - arp + - icmp + - icmpv6 + - ppp + - igmpv1 + - mpls + - snmpv2c + - rsvp + custom: + $ref: '#/components/schemas/Flow.Custom' x-field-uid: 2 - include_all: - description: "A 32-bit vector representing a set of attribute filters associated\ - \ with a tunnel all of which must be present for a link to be acceptable.\ - \ A null set (all bits set to zero) automatically passes. The most significant\ - \ byte in the hex-string is the farthest to the left in the byte sequence.\ - \ Leading zero bytes in the configured value may be omitted for brevity.\ - \ " - type: string - format: hex - default: '00' - minLength: 0 - maxLength: 8 + ethernet: + $ref: '#/components/schemas/Flow.Ethernet' x-field-uid: 3 - setup_priority: - description: |- - The priority of the session with respect to taking resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. - type: integer - format: uint32 - default: 7 - maximum: 7 + vlan: + $ref: '#/components/schemas/Flow.Vlan' x-field-uid: 4 - holding_priority: - description: |- - The priority of the session with respect to holding resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. - type: integer - format: uint32 - default: 7 - maximum: 7 + vxlan: + $ref: '#/components/schemas/Flow.Vxlan' x-field-uid: 5 - flags: - description: |- - 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired - $ref: '#/components/schemas/Flow.RSVPLspTunnel.Flag' + ipv4: + $ref: '#/components/schemas/Flow.Ipv4' x-field-uid: 6 - name_length: - description: "The length of the display string before padding, in bytes.\ - \ " - $ref: '#/components/schemas/Flow.RSVPSessionAttributeName.Length' + ipv6: + $ref: '#/components/schemas/Flow.Ipv6' x-field-uid: 7 - session_name: - description: "A null padded string of characters. " - type: string - default: '' - minLength: 0 - maxLength: 254 + pfcpause: + $ref: '#/components/schemas/Flow.PfcPause' x-field-uid: 8 - Flow.RSVPLspTunnel.Flag: + ethernetpause: + $ref: '#/components/schemas/Flow.EthernetPause' + x-field-uid: 9 + tcp: + $ref: '#/components/schemas/Flow.Tcp' + x-field-uid: 10 + udp: + $ref: '#/components/schemas/Flow.Udp' + x-field-uid: 11 + gre: + $ref: '#/components/schemas/Flow.Gre' + x-field-uid: 12 + gtpv1: + $ref: '#/components/schemas/Flow.Gtpv1' + x-field-uid: 13 + gtpv2: + $ref: '#/components/schemas/Flow.Gtpv2' + x-field-uid: 14 + arp: + $ref: '#/components/schemas/Flow.Arp' + x-field-uid: 15 + icmp: + $ref: '#/components/schemas/Flow.Icmp' + x-field-uid: 16 + icmpv6: + $ref: '#/components/schemas/Flow.Icmpv6' + x-field-uid: 17 + ppp: + $ref: '#/components/schemas/Flow.Ppp' + x-field-uid: 18 + igmpv1: + $ref: '#/components/schemas/Flow.Igmpv1' + x-field-uid: 19 + mpls: + $ref: '#/components/schemas/Flow.Mpls' + x-field-uid: 20 + snmpv2c: + $ref: '#/components/schemas/Flow.Snmpv2c' + x-field-uid: 21 + rsvp: + $ref: '#/components/schemas/Flow.Rsvp' + x-field-uid: 22 + Flow.Custom: type: object + description: |- + Custom packet header + required: + - bytes properties: - choice: + bytes: + description: |- + A custom packet header defined as a string of hex bytes. The string MUST contain sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be discarded. This packet header can be used in multiple places in the packet. type: string - default: local_protection_desired - x-enum: - local_protection_desired: - x-field-uid: 1 - label_recording_desired: - x-field-uid: 2 - se_style_desired: - x-field-uid: 3 + pattern: '^[A-Fa-f0-9: ]+$' x-field-uid: 1 - enum: - - local_protection_desired - - label_recording_desired - - se_style_desired - Flow.RSVPSessionAttributeName.Length: + metric_tags: + description: |- + One or more metric tags can be used to enable tracking portion of or all bits + in a corresponding header field for metrics per each applicable value. + These would appear as tagged metrics in corresponding flow metrics. + type: array + items: + $ref: '#/components/schemas/Flow.Custom.MetricTag' + x-field-uid: 2 + Flow.Custom.MetricTag: + description: |- + Metric Tag can be used to enable tracking portion of or all bits + in a corresponding header field for metrics per each applicable value. + These would appear as tagged metrics in corresponding flow metrics. type: object + required: + - name properties: - choice: + name: description: |- - auto or configured value. + Name used to identify the metrics associated with the values applicable + for configured offset and length inside corresponding header field type: string - default: auto + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ x-field-uid: 1 - x-enum: - auto: - x-field-uid: 1 - value: - x-field-uid: 2 - enum: - - auto - - value - auto: + offset: description: |- - The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. + Offset in bits relative to start of corresponding header field type: integer format: uint32 default: 0 x-field-uid: 2 - value: + length: + description: |- + Number of bits to track for metrics starting from configured offset + of corresponding header field type: integer format: uint32 - maximum: 255 - default: 0 + default: 1 + minimum: 1 x-field-uid: 3 - Flow.RSVP.PathObjectsClassSenderTemplate: + Flow.Ethernet: description: |- - C-Type is specific to a class num. + Ethernet packet header type: object properties: - length: - description: |- - A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. - $ref: '#/components/schemas/Flow.RSVPObject.Length' + dst: x-field-uid: 1 - c_type: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsSenderTemplateCType' + $ref: '#/components/schemas/Pattern.Flow.Ethernet.Dst' + src: x-field-uid: 2 - Flow.RSVP.PathObjectsSenderTemplateCType: - description: |- - Object for SENDER_TEMPLATE class. Currently supported c-type is LSP Tunnel IPv4 (7). - type: object - properties: - choice: - type: string - x-field-uid: 1 - default: lsp_tunnel_ipv4 - x-enum: - lsp_tunnel_ipv4: - x-field-uid: 1 - enum: - - lsp_tunnel_ipv4 - lsp_tunnel_ipv4: - $ref: '#/components/schemas/Flow.RSVP.PathSenderTemplateLspTunnelIpv4' - x-field-uid: 2 - Flow.RSVP.PathSenderTemplateLspTunnelIpv4: - description: |- - Class = SENDER_TEMPLATE, LSP_TUNNEL_IPv4 C-Type = 7 - type: object - properties: - ipv4_tunnel_sender_address: - x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTemplateLspTunnelIpv4.Ipv4TunnelSenderAddress' - reserved: - x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTemplateLspTunnelIpv4.Reserved' - lsp_id: + $ref: '#/components/schemas/Pattern.Flow.Ethernet.Src' + ether_type: x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTemplateLspTunnelIpv4.LspId' - Flow.RSVP.PathObjectsClassSenderTspec: + $ref: '#/components/schemas/Pattern.Flow.Ethernet.EtherType' + pfc_queue: + x-field-uid: 4 + $ref: '#/components/schemas/Pattern.Flow.Ethernet.PfcQueue' + Flow.Vlan: description: |- - C-Type is specific to a class num. + VLAN packet header type: object properties: - length: - description: |- - A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. - $ref: '#/components/schemas/Flow.RSVPObject.Length' + priority: x-field-uid: 1 - c_type: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsSenderTspecCType' + $ref: '#/components/schemas/Pattern.Flow.Vlan.Priority' + cfi: x-field-uid: 2 - Flow.RSVP.PathObjectsSenderTspecCType: + $ref: '#/components/schemas/Pattern.Flow.Vlan.Cfi' + id: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.Vlan.Id' + tpid: + x-field-uid: 4 + $ref: '#/components/schemas/Pattern.Flow.Vlan.Tpid' + Flow.Vxlan: description: |- - Object for SENDER_TSPEC class. Currently supported c-type is int-serv (2). + VXLAN packet header type: object properties: - choice: - type: string + flags: x-field-uid: 1 - default: int_serv - x-enum: - int_serv: - x-field-uid: 1 - enum: - - int_serv - int_serv: - $ref: '#/components/schemas/Flow.RSVP.PathSenderTspecIntServ' + $ref: '#/components/schemas/Pattern.Flow.Vxlan.Flags' + reserved0: x-field-uid: 2 - Flow.RSVP.PathSenderTspecIntServ: + $ref: '#/components/schemas/Pattern.Flow.Vxlan.Reserved0' + vni: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.Vxlan.Vni' + reserved1: + x-field-uid: 4 + $ref: '#/components/schemas/Pattern.Flow.Vxlan.Reserved1' + Flow.Ipv4: description: |- - int-serv SENDER_TSPEC object: Class = 12, C-Type = 2 + IPv4 packet header type: object properties: version: x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.Version' - reserved1: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Version' + header_length: x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.Reserved1' - overall_length: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.HeaderLength' + priority: + $ref: '#/components/schemas/Flow.Ipv4.Priority' x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.OverallLength' - service_header: + total_length: x-field-uid: 4 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.ServiceHeader' - zero_bit: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.TotalLength' + identification: x-field-uid: 5 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.ZeroBit' - reserved2: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Identification' + reserved: x-field-uid: 6 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.Reserved2' - length_of_service_data: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Reserved' + dont_fragment: x-field-uid: 7 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.LengthOfServiceData' - parameter_id_token_bucket_tspec: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.DontFragment' + more_fragments: x-field-uid: 8 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.ParameterIdTokenBucketTspec' - parameter_127_flag: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.MoreFragments' + fragment_offset: x-field-uid: 9 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.Parameter127Flag' - parameter_127_length: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.FragmentOffset' + time_to_live: x-field-uid: 10 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.Parameter127Length' - token_bucket_rate: - description: |- - Token bucket rate is set to sender's view of its generated traffic. - type: number - format: float - default: 0 + $ref: '#/components/schemas/Pattern.Flow.Ipv4.TimeToLive' + protocol: x-field-uid: 11 - token_bucket_size: - description: |- - Token bucket size is set to sender's view of its generated traffic. - type: number - format: float - default: 0 + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Protocol' + header_checksum: x-field-uid: 12 - peak_data_rate: - description: |- - The peak rate may be set to the sender's peak traffic generation rate (if known and controlled), the physical interface line rate (if known), or positive infinity (if no better value is available). - type: number - format: float - default: 0 + $ref: '#/components/schemas/Pattern.Flow.Ipv4.HeaderChecksum' + src: x-field-uid: 13 - minimum_policed_unit: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Src' + dst: x-field-uid: 14 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.MinimumPolicedUnit' - maximum_packet_size: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Dst' + options: + type: array + minItems: 0 + items: + $ref: '#/components/schemas/Flow.Ipv4.Options' x-field-uid: 15 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.MaximumPacketSize' - Flow.RSVP.PathObjectsClassRecordRoute: - description: |- - C-Type is specific to a class num. - type: object - properties: - length: - description: |- - A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. - $ref: '#/components/schemas/Flow.RSVPObject.Length' - x-field-uid: 1 - c_type: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsRecordRouteCType' - x-field-uid: 2 - Flow.RSVP.PathObjectsRecordRouteCType: - description: |- - Object for RECORD_ROUTE class. c-type is Type 1 Route Record (1). + Flow.Ipv4.Options: + description: "IPv4 options are optional extensions for the IPv4 header that\ + \ can be utilised to provide additional information about the IPv4 datagram.\ + \ It is encoded as a series of type, length and value attributes. The IP\ + \ header length MUST be increased to accommodate the extra bytes needed to\ + \ encode the IP options. The length of the all options included to a IPv4\ + \ header should not exceed 40 bytes since IPv4 Header length (4 bits) can\ + \ at max specify 15 4-word octets for a total of 60 bytes which includes 20\ + \ bytes needed for mandatory attributes of the IPv4 header. If the user adds\ + \ multiples IPv4 options that exceeds 40 bytes and specify header length as\ + \ \"auto\", implementation should throw error. Currently IP options supported\ + \ are: 1. router_alert option allows devices to intercept packets not addressed\ + \ to them directly as defined in RFC2113. 2. custom option is provided to\ + \ configure user defined IP options as needed. " type: object properties: choice: type: string - default: type_1 + default: router_alert x-field-uid: 1 x-enum: - type_1: + router_alert: x-field-uid: 1 + custom: + x-field-uid: 2 enum: - - type_1 - type_1: - $ref: '#/components/schemas/Flow.RSVP.PathRecordRouteType1' + - router_alert + - custom + custom: + $ref: '#/components/schemas/Flow.Ipv4Options.Custom' x-field-uid: 2 - Flow.RSVP.PathRecordRouteType1: + Flow.Ipv4Options.Custom: description: |- - Type1 record route has list of subobjects. Currently supported subobjects are IPv4 address(1) and Label(3). + User defined IP options to be appended to the IPv4 header. type: object properties: - subobjects: - type: array - minItems: 1 - items: - $ref: '#/components/schemas/Flow.RSVP.Type1RecordRouteSubobjects' + type: + $ref: '#/components/schemas/Flow.Ipv4Options.Custom.Type' x-field-uid: 1 - Flow.RSVP.Type1RecordRouteSubobjects: + length: + $ref: '#/components/schemas/Flow.Ipv4Options.Custom.Length' + x-field-uid: 2 + value: + description: |- + Value of the option field should not excced 38 bytes since maximum 40 bytes can be added as options in IPv4 header. For type and length requires 2 bytes, hence maximum of 38 bytes are expected. Maximum length of this attribute is 76 (38 * 2 hex character per byte). + type: string + format: hex + minLength: 0 + maxLength: 76 + default: '0000' + x-field-uid: 3 + Flow.Ipv4Options.Custom.Type: description: |- - Type is specific to a subobject. + Type options for custom options. type: object properties: - type: - $ref: '#/components/schemas/Flow.RSVP.PathObjectsRecordRouteSubObjectType' + copied_flag: x-field-uid: 1 - Flow.RSVP.PathObjectsRecordRouteSubObjectType: + $ref: '#/components/schemas/Pattern.Flow.Ipv4Options.Custom.Type.CopiedFlag' + option_class: + x-field-uid: 2 + $ref: '#/components/schemas/Pattern.Flow.Ipv4Options.Custom.Type.OptionClass' + option_number: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.Ipv4Options.Custom.Type.OptionNumber' + Flow.Ipv4Options.Custom.Length: description: |- - Currently supported subobjects are IPv4 address(1) and Label(3). + Length for custom options. type: object properties: choice: + description: |- + auto or configured value. type: string + default: auto x-field-uid: 1 - default: ipv4_address x-enum: - ipv4_address: + auto: x-field-uid: 1 - label: + value: x-field-uid: 2 enum: - - ipv4_address - - label - ipv4_address: - $ref: '#/components/schemas/Flow.RSVP.PathRecordRouteType1Ipv4Address' + - auto + - value + auto: + description: |- + The OTG implementation can provide a system generated value for this property. If the OTG is unable to generate a value the default value must be used. + type: integer + format: uint32 + default: 0 x-field-uid: 2 - label: - $ref: '#/components/schemas/Flow.RSVP.PathRecordRouteType1Label' + value: + type: integer + format: uint32 + default: 0 x-field-uid: 3 - Flow.RSVP.PathRecordRouteType1Ipv4Address: + Flow.Ipv4.Priority: description: |- - Class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Address, C-Type: 1 - type: object - properties: - length: - description: |- - The Length contains the total length of the subobject in bytes, including the Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. - $ref: '#/components/schemas/Flow.RSVPRouteRecord.Length' - x-field-uid: 1 - ipv4_address: - x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathRecordRouteType1Ipv4Address.Ipv4Address' - prefix_length: - x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathRecordRouteType1Ipv4Address.PrefixLength' - flags: - description: |- - 0x01 local_protection_available, 0x02 local_protection_in_use - $ref: '#/components/schemas/Flow.RSVPRecordRouteIPv4.Flag' - x-field-uid: 4 - Flow.RSVPRecordRouteIPv4.Flag: + A container for ipv4 raw, tos, dscp ip priorities. type: object properties: choice: type: string - default: local_protection_available + default: dscp + x-field-uid: 1 x-enum: - local_protection_available: + raw: x-field-uid: 1 - local_protection_in_use: + tos: x-field-uid: 2 - x-field-uid: 1 + dscp: + x-field-uid: 3 enum: - - local_protection_available - - local_protection_in_use - Flow.RSVP.PathRecordRouteType1Label: + - raw + - tos + - dscp + raw: + x-field-uid: 2 + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Priority.Raw' + tos: + $ref: '#/components/schemas/Flow.Ipv4.Tos' + x-field-uid: 3 + dscp: + $ref: '#/components/schemas/Flow.Ipv4.Dscp' + x-field-uid: 4 + Flow.Ipv4.Dscp: description: |- - Class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Label, C-Type: 3 + Differentiated services code point (DSCP) packet field. type: object properties: - length: - description: |- - The Length contains the total length of the subobject in bytes, including the Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. - $ref: '#/components/schemas/Flow.RSVPRouteRecord.Length' + phb: x-field-uid: 1 - flags: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Dscp.Phb' + ecn: x-field-uid: 2 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathRecordRouteType1Label.Flags' - c_type: - x-field-uid: 3 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathRecordRouteType1Label.CType' - label: - description: |- - The contents of the Label Object. Copied from the Label Object. - $ref: '#/components/schemas/Flow.RSVP.PathRecordRouteLabel' - x-field-uid: 4 - Flow.RSVP.PathRecordRouteLabel: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Dscp.Ecn' + Flow.Ipv4.Tos: + description: |- + Type of service (TOS) packet field. type: object properties: - choice: - description: |- - 32 bit integer or hex value. - type: string - default: as_integer + precedence: x-field-uid: 1 - x-enum: - as_integer: - x-field-uid: 1 - as_hex: - x-field-uid: 2 - enum: - - as_integer - - as_hex - as_integer: - type: integer - format: uint32 - default: 16 - maximum: 1048575 + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Tos.Precedence' + delay: x-field-uid: 2 - as_hex: - description: |- - Value of the this field should not excced 4 bytes. Maximum length of this attribute is 8 (4 * 2 hex character per byte). - type: string - format: hex - default: '10' - maxLength: 8 + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Tos.Delay' + throughput: x-field-uid: 3 - Flow.RSVPRouteRecord.Length: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Tos.Throughput' + reliability: + x-field-uid: 4 + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Tos.Reliability' + monetary: + x-field-uid: 5 + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Tos.Monetary' + unused: + x-field-uid: 6 + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Tos.Unused' + Flow.Ipv4.Auto: + description: |- + The OTG implementation can provide a system generated, value for this property. type: object + required: + - choice properties: choice: description: |- - auto or configured value. + The method to be used to provide the system generated value. + + The dhcp option populates the field based on the dynamic IPv4 address that has been assigned to the DHCPv4 client by a DHCPv4 server. type: string - default: auto - x-field-uid: 1 x-enum: - auto: + dhcp: x-field-uid: 1 - value: - x-field-uid: 2 + x-field-uid: 1 enum: - - auto - - value - auto: - description: |- - The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. - type: integer - format: uint32 - default: 8 - x-field-uid: 2 - value: - type: integer - format: uint32 - maximum: 255 - default: 8 - x-field-uid: 3 - Flow.RSVP.PathObjectsCustom: - type: object + - dhcp + Flow.Ipv6: description: |- - Custom packet header + IPv6 packet header + type: object properties: - type: + version: x-field-uid: 1 - $ref: '#/components/schemas/Pattern.Flow.RSVP.PathObjectsCustom.Type' - length: - $ref: '#/components/schemas/Flow.RSVPObject.Length' + $ref: '#/components/schemas/Pattern.Flow.Ipv6.Version' + traffic_class: x-field-uid: 2 - bytes: - description: |- - A custom packet header defined as a string of hex bytes. The string MUST contain sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be discarded. Value of the this field should not excced 65525 bytes since maximum 65528 bytes can be added as object-contents in RSVP header. For type and length requires 3 bytes, hence maximum of 65524 bytes are expected. Maximum length of this attribute is 131050 (65525 * 2 hex character per byte). - type: string - format: hex - minLength: 1 - maxLength: 131050 - default: '0000' + $ref: '#/components/schemas/Pattern.Flow.Ipv6.TrafficClass' + flow_label: x-field-uid: 3 - Flow.Size: + $ref: '#/components/schemas/Pattern.Flow.Ipv6.FlowLabel' + payload_length: + x-field-uid: 4 + $ref: '#/components/schemas/Pattern.Flow.Ipv6.PayloadLength' + next_header: + x-field-uid: 5 + $ref: '#/components/schemas/Pattern.Flow.Ipv6.NextHeader' + hop_limit: + x-field-uid: 6 + $ref: '#/components/schemas/Pattern.Flow.Ipv6.HopLimit' + src: + x-field-uid: 7 + $ref: '#/components/schemas/Pattern.Flow.Ipv6.Src' + dst: + x-field-uid: 8 + $ref: '#/components/schemas/Pattern.Flow.Ipv6.Dst' + Flow.Ipv6.Auto: description: |- - The frame size which overrides the total length of the packet + The OTG implementation can provide a system generated, value for this property. type: object + required: + - choice properties: choice: + description: "The method to be used to provide the system generated value.\n\ + The dhcp option populates the field based on the dynamic IPv6 address\ + \ that has been assigned to the DHCPv6 client \nby a DHCPv6 server." type: string - default: fixed - x-field-uid: 1 x-enum: - fixed: + dhcp: x-field-uid: 1 - increment: - x-field-uid: 2 - random: - x-field-uid: 3 - weight_pairs: - x-field-uid: 4 + x-field-uid: 1 enum: - - fixed - - increment - - random - - weight_pairs - fixed: - type: integer - format: uint32 - default: 64 - x-field-uid: 2 - increment: - $ref: '#/components/schemas/Flow.SizeIncrement' - x-field-uid: 3 - random: - $ref: '#/components/schemas/Flow.SizeRandom' - x-field-uid: 4 - weight_pairs: - $ref: '#/components/schemas/Flow.SizeWeightPairs' - x-field-uid: 5 - Flow.SizeIncrement: + - dhcp + Flow.PfcPause: + description: |- + IEEE 802.1Qbb PFC Pause packet header. type: object - description: "Frame size that increments from a starting size to \nan ending\ - \ size incrementing by a step size." properties: - start: - description: |- - Starting frame size in bytes - type: integer - format: uint32 - minimum: 1 - default: 64 + dst: x-field-uid: 1 - end: - description: |- - Ending frame size in bytes - type: integer - format: uint32 - minimum: 64 - default: 1518 + $ref: '#/components/schemas/Pattern.Flow.PfcPause.Dst' + src: x-field-uid: 2 - step: - description: |- - Step frame size in bytes - type: integer - format: uint32 - default: 1 + $ref: '#/components/schemas/Pattern.Flow.PfcPause.Src' + ether_type: x-field-uid: 3 - Flow.SizeRandom: - type: object - description: |- - Random frame size from a min value to a max value. - properties: - min: - type: integer - format: uint32 - default: 64 - x-field-uid: 1 - max: - type: integer - format: uint32 - default: 1518 - x-field-uid: 2 - Flow.SizeWeightPairs: + $ref: '#/components/schemas/Pattern.Flow.PfcPause.EtherType' + control_op_code: + x-field-uid: 4 + $ref: '#/components/schemas/Pattern.Flow.PfcPause.ControlOpCode' + class_enable_vector: + x-field-uid: 5 + $ref: '#/components/schemas/Pattern.Flow.PfcPause.ClassEnableVector' + pause_class_0: + x-field-uid: 6 + $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass0' + pause_class_1: + x-field-uid: 7 + $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass1' + pause_class_2: + x-field-uid: 8 + $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass2' + pause_class_3: + x-field-uid: 9 + $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass3' + pause_class_4: + x-field-uid: 10 + $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass4' + pause_class_5: + x-field-uid: 11 + $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass5' + pause_class_6: + x-field-uid: 12 + $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass6' + pause_class_7: + x-field-uid: 13 + $ref: '#/components/schemas/Pattern.Flow.PfcPause.PauseClass7' + Flow.EthernetPause: + description: |- + IEEE 802.3x global ethernet pause packet header type: object - description: "Frame size distribution, defined as pairs (including\ - \ IMIX distribution).\nFrames are randomly generated such that the proportion\ - \ of each frame size out of the total number of frames \nare matching with\ - \ the weight value of the pair. However, as with any other\ - \ probability \ndistribution, the sample distribution is close to theoretical\ - \ value only if the size of the sample is reasonably large. \nWhen the number\ - \ of frames is very low the transmitted frames may not come close to the ratio\ - \ described in the weight." properties: - choice: - type: string - default: predefined + dst: x-field-uid: 1 - x-enum: - predefined: - x-field-uid: 1 - custom: - x-field-uid: 2 - enum: - - predefined - - custom - predefined: - type: string - default: imix - description: "Specify predefined frame size distribution \ - \ pairs (including IMIX distribution). \nThe available predefined distribution\ - \ pairs are:\n- IMIX (64:7, 570:4, and 1518:1) \n- IPSec IMIX (90:58.67,\ - \ 92:2, 594:23.66 and 1418:15.67) \n- IPv6 IMIX (60:58.67, 496:2, 594:23.66\ - \ and 1518:15.67) \n- Standard IMIX (58:58.67, 62:2, 594:23.66 and 1518:15.67)\ - \ \n- TCP IMIX (90:58.67, 92:2, 594:23.66 and 1518:15.67) " + $ref: '#/components/schemas/Pattern.Flow.EthernetPause.Dst' + src: x-field-uid: 2 - x-enum: - imix: - x-field-uid: 1 - ipsec_imix: - x-field-uid: 2 - ipv6_imix: - x-field-uid: 3 - standard_imix: - x-field-uid: 4 - tcp_imix: - x-field-uid: 5 - enum: - - imix - - ipsec_imix - - ipv6_imix - - standard_imix - - tcp_imix - custom: - type: array - items: - $ref: '#/components/schemas/Flow.SizeWeightPairs.Custom' + $ref: '#/components/schemas/Pattern.Flow.EthernetPause.Src' + ether_type: x-field-uid: 3 - Flow.SizeWeightPairs.Custom: - type: object + $ref: '#/components/schemas/Pattern.Flow.EthernetPause.EtherType' + control_op_code: + x-field-uid: 4 + $ref: '#/components/schemas/Pattern.Flow.EthernetPause.ControlOpCode' + time: + x-field-uid: 5 + $ref: '#/components/schemas/Pattern.Flow.EthernetPause.Time' + Flow.Tcp: description: |- - Custom frame size distribution pair. - properties: - size: - description: |- - The size of the frame (in bytes) for this weight pair. - type: integer - format: uint32 - minimum: 12 - maximum: 65535 - default: 64 - x-field-uid: 1 - weight: - description: "Weight assigned to the corresponding frame size in this weight\ - \ pair. \nHigher weight means more packets." - type: number - format: float - default: 1 - x-field-uid: 2 - Flow.Rate: + TCP packet header type: object - description: |- - The rate of packet transmission properties: - choice: - description: |- - The available types of flow rate. - type: string - default: pps + src_port: x-field-uid: 1 - x-enum: - pps: - x-field-uid: 1 - bps: - x-field-uid: 2 - kbps: - x-field-uid: 3 - mbps: - x-field-uid: 4 - gbps: - x-field-uid: 5 - percentage: - x-field-uid: 6 - enum: - - pps - - bps - - kbps - - mbps - - gbps - - percentage - pps: - description: |- - Packets per second. - type: integer - format: uint64 - minimum: 1 - default: 1000 + $ref: '#/components/schemas/Pattern.Flow.Tcp.SrcPort' + dst_port: x-field-uid: 2 - bps: - description: |- - Bits per second. - type: integer - format: uint64 - minimum: 672 - default: 1000000000 + $ref: '#/components/schemas/Pattern.Flow.Tcp.DstPort' + seq_num: x-field-uid: 3 - kbps: - description: |- - Kilobits per second. - type: integer - format: uint64 - minimum: 1 - default: 1000000 + $ref: '#/components/schemas/Pattern.Flow.Tcp.SeqNum' + ack_num: x-field-uid: 4 - mbps: - description: "Megabits per second. " - type: integer - format: uint64 - minimum: 1 - default: 1000 + $ref: '#/components/schemas/Pattern.Flow.Tcp.AckNum' + data_offset: x-field-uid: 5 - gbps: - description: |- - Gigabits per second. - type: integer - format: uint32 - minimum: 1 - default: 1 + $ref: '#/components/schemas/Pattern.Flow.Tcp.DataOffset' + ecn_ns: x-field-uid: 6 - percentage: - description: |- - The percentage of a port location's available bandwidth. - type: number - format: float - minimum: 0 - maximum: 100 - default: 100 + $ref: '#/components/schemas/Pattern.Flow.Tcp.EcnNs' + ecn_cwr: x-field-uid: 7 - Flow.Duration: - description: "A container for different transmit durations. " + $ref: '#/components/schemas/Pattern.Flow.Tcp.EcnCwr' + ecn_echo: + x-field-uid: 8 + $ref: '#/components/schemas/Pattern.Flow.Tcp.EcnEcho' + ctl_urg: + x-field-uid: 9 + $ref: '#/components/schemas/Pattern.Flow.Tcp.CtlUrg' + ctl_ack: + x-field-uid: 10 + $ref: '#/components/schemas/Pattern.Flow.Tcp.CtlAck' + ctl_psh: + x-field-uid: 11 + $ref: '#/components/schemas/Pattern.Flow.Tcp.CtlPsh' + ctl_rst: + x-field-uid: 12 + $ref: '#/components/schemas/Pattern.Flow.Tcp.CtlRst' + ctl_syn: + x-field-uid: 13 + $ref: '#/components/schemas/Pattern.Flow.Tcp.CtlSyn' + ctl_fin: + x-field-uid: 14 + $ref: '#/components/schemas/Pattern.Flow.Tcp.CtlFin' + window: + x-field-uid: 15 + $ref: '#/components/schemas/Pattern.Flow.Tcp.Window' + checksum: + x-field-uid: 16 + $ref: '#/components/schemas/Pattern.Flow.Tcp.Checksum' + Flow.Udp: + description: |- + UDP packet header type: object properties: - choice: - description: |- - A choice used to determine the type of duration. - type: string - default: continuous + src_port: x-field-uid: 1 - x-enum: - fixed_packets: - x-field-uid: 1 - fixed_seconds: - x-field-uid: 2 - burst: - x-field-uid: 3 - continuous: - x-field-uid: 4 - enum: - - fixed_packets - - fixed_seconds - - burst - - continuous - fixed_packets: - $ref: '#/components/schemas/Flow.FixedPackets' + $ref: '#/components/schemas/Pattern.Flow.Udp.SrcPort' + dst_port: x-field-uid: 2 - fixed_seconds: - $ref: '#/components/schemas/Flow.FixedSeconds' + $ref: '#/components/schemas/Pattern.Flow.Udp.DstPort' + length: x-field-uid: 3 - burst: - $ref: '#/components/schemas/Flow.Burst' + $ref: '#/components/schemas/Pattern.Flow.Udp.Length' + checksum: x-field-uid: 4 - continuous: - $ref: '#/components/schemas/Flow.Continuous' - x-field-uid: 5 - Flow.Continuous: - description: "Transmit will be continuous and will not stop automatically. " + $ref: '#/components/schemas/Pattern.Flow.Udp.Checksum' + Flow.Gre: + description: |- + Standard GRE packet header (RFC2784) type: object properties: - gap: - description: |- - The minimum gap between packets expressed as bytes. - type: integer - format: uint32 - default: 12 + checksum_present: x-field-uid: 1 - delay: - $ref: '#/components/schemas/Flow.Delay' + $ref: '#/components/schemas/Pattern.Flow.Gre.ChecksumPresent' + reserved0: x-field-uid: 2 - Flow.Delay: - description: "The optional container to specify the delay before starting \n\ - transmission of packets." + $ref: '#/components/schemas/Pattern.Flow.Gre.Reserved0' + version: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.Gre.Version' + protocol: + x-field-uid: 4 + $ref: '#/components/schemas/Pattern.Flow.Gre.Protocol' + checksum: + x-field-uid: 5 + $ref: '#/components/schemas/Pattern.Flow.Gre.Checksum' + reserved1: + x-field-uid: 6 + $ref: '#/components/schemas/Pattern.Flow.Gre.Reserved1' + Flow.Gtpv1: + description: |- + GTPv1 packet header type: object properties: - choice: - type: string - default: bytes + version: x-field-uid: 1 - x-enum: - bytes: - x-field-uid: 1 - nanoseconds: - x-field-uid: 2 - microseconds: - x-field-uid: 3 - enum: - - bytes - - nanoseconds - - microseconds - bytes: - description: |- - The delay before starting transmission of packets. - A value of 0 indicates no delay. - type: number - format: float - minimum: 0 - default: 0 + $ref: '#/components/schemas/Pattern.Flow.Gtpv1.Version' + protocol_type: x-field-uid: 2 - nanoseconds: - description: |- - The delay before starting transmission of packets. - A value of 0 indicates no delay. - type: number - format: float - minimum: 0 - default: 0 + $ref: '#/components/schemas/Pattern.Flow.Gtpv1.ProtocolType' + reserved: x-field-uid: 3 - microseconds: - description: |- - The delay before starting transmission of packets. - A value of 0 indicates no delay. - type: number - format: float - minimum: 0 - default: 0 + $ref: '#/components/schemas/Pattern.Flow.Gtpv1.Reserved' + e_flag: x-field-uid: 4 - Flow.FixedPackets: - description: |- - Transmit a fixed number of packets after which the flow will stop. + $ref: '#/components/schemas/Pattern.Flow.Gtpv1.EFlag' + s_flag: + x-field-uid: 5 + $ref: '#/components/schemas/Pattern.Flow.Gtpv1.SFlag' + pn_flag: + x-field-uid: 6 + $ref: '#/components/schemas/Pattern.Flow.Gtpv1.PnFlag' + message_type: + x-field-uid: 7 + $ref: '#/components/schemas/Pattern.Flow.Gtpv1.MessageType' + message_length: + x-field-uid: 8 + $ref: '#/components/schemas/Pattern.Flow.Gtpv1.MessageLength' + teid: + x-field-uid: 9 + $ref: '#/components/schemas/Pattern.Flow.Gtpv1.Teid' + squence_number: + x-field-uid: 10 + $ref: '#/components/schemas/Pattern.Flow.Gtpv1.SquenceNumber' + n_pdu_number: + x-field-uid: 11 + $ref: '#/components/schemas/Pattern.Flow.Gtpv1.NPduNumber' + next_extension_header_type: + x-field-uid: 12 + $ref: '#/components/schemas/Pattern.Flow.Gtpv1.NextExtensionHeaderType' + extension_headers: + description: |- + A list of optional extension headers. + type: array + items: + $ref: '#/components/schemas/Flow.GtpExtension' + x-field-uid: 13 + Flow.GtpExtension: type: object properties: - packets: - description: |- - Stop transmit of the flow after this number of packets. - type: integer - format: uint32 - minimum: 1 - default: 1 + extension_length: x-field-uid: 1 - gap: - description: |- - The minimum gap between packets expressed as bytes. - type: integer - format: uint32 - default: 12 + $ref: '#/components/schemas/Pattern.Flow.GtpExtension.ExtensionLength' + contents: x-field-uid: 2 - delay: - $ref: '#/components/schemas/Flow.Delay' + $ref: '#/components/schemas/Pattern.Flow.GtpExtension.Contents' + next_extension_header: x-field-uid: 3 - Flow.FixedSeconds: + $ref: '#/components/schemas/Pattern.Flow.GtpExtension.NextExtensionHeader' + Flow.Gtpv2: description: |- - Transmit for a fixed number of seconds after which the flow will stop. + GTPv2 packet header type: object properties: - seconds: - description: |- - Stop transmit of the flow after this number of seconds. - type: number - minimum: 0 - default: 1 + version: x-field-uid: 1 - gap: - description: |- - The minimum gap between packets expressed as bytes. - type: integer - format: uint32 - default: 12 + $ref: '#/components/schemas/Pattern.Flow.Gtpv2.Version' + piggybacking_flag: x-field-uid: 2 - delay: - $ref: '#/components/schemas/Flow.Delay' + $ref: '#/components/schemas/Pattern.Flow.Gtpv2.PiggybackingFlag' + teid_flag: x-field-uid: 3 - Flow.Burst: - description: "Transmits continuous or fixed burst of packets. \nFor continuous\ - \ burst of packets, it will not automatically stop.\nFor fixed burst of packets,\ - \ it will stop after transmitting fixed number of bursts. " + $ref: '#/components/schemas/Pattern.Flow.Gtpv2.TeidFlag' + spare1: + x-field-uid: 4 + $ref: '#/components/schemas/Pattern.Flow.Gtpv2.Spare1' + message_type: + x-field-uid: 5 + $ref: '#/components/schemas/Pattern.Flow.Gtpv2.MessageType' + message_length: + x-field-uid: 6 + $ref: '#/components/schemas/Pattern.Flow.Gtpv2.MessageLength' + teid: + x-field-uid: 7 + $ref: '#/components/schemas/Pattern.Flow.Gtpv2.Teid' + sequence_number: + x-field-uid: 8 + $ref: '#/components/schemas/Pattern.Flow.Gtpv2.SequenceNumber' + spare2: + x-field-uid: 9 + $ref: '#/components/schemas/Pattern.Flow.Gtpv2.Spare2' + Flow.Arp: + description: |- + ARP packet header type: object properties: - bursts: - description: |- - The number of packet bursts transmitted per flow. - A value of 0 implies continuous burst of packets. - type: integer - format: uint32 - default: 0 + hardware_type: x-field-uid: 1 - packets: - description: |- - The number of packets transmitted per burst. - type: integer - format: uint32 - minimum: 1 - default: 1 + $ref: '#/components/schemas/Pattern.Flow.Arp.HardwareType' + protocol_type: x-field-uid: 2 - gap: - description: |- - The minimum gap between packets expressed as bytes. - type: integer - format: uint32 - default: 12 + $ref: '#/components/schemas/Pattern.Flow.Arp.ProtocolType' + hardware_length: x-field-uid: 3 - inter_burst_gap: - $ref: '#/components/schemas/Flow.Duration.InterBurstGap' + $ref: '#/components/schemas/Pattern.Flow.Arp.HardwareLength' + protocol_length: x-field-uid: 4 - Flow.Duration.InterBurstGap: - type: object + $ref: '#/components/schemas/Pattern.Flow.Arp.ProtocolLength' + operation: + x-field-uid: 5 + $ref: '#/components/schemas/Pattern.Flow.Arp.Operation' + sender_hardware_addr: + x-field-uid: 6 + $ref: '#/components/schemas/Pattern.Flow.Arp.SenderHardwareAddr' + sender_protocol_addr: + x-field-uid: 7 + $ref: '#/components/schemas/Pattern.Flow.Arp.SenderProtocolAddr' + target_hardware_addr: + x-field-uid: 8 + $ref: '#/components/schemas/Pattern.Flow.Arp.TargetHardwareAddr' + target_protocol_addr: + x-field-uid: 9 + $ref: '#/components/schemas/Pattern.Flow.Arp.TargetProtocolAddr' + Flow.Icmp: description: |- - The optional container for specifying a gap between bursts. - properties: + ICMP packet header + type: object + properties: choice: - description: |- - The type of inter burst gap units. type: string - default: bytes + default: echo x-field-uid: 1 x-enum: - bytes: + echo: x-field-uid: 1 - nanoseconds: - x-field-uid: 2 - microseconds: - x-field-uid: 3 enum: - - bytes - - nanoseconds - - microseconds - bytes: - description: |- - The amount of time between bursts expressed in bytes. - A value of 0 indicates no gap between bursts. - type: number - format: double - minimum: 0 - default: 12 + - echo + echo: + $ref: '#/components/schemas/Flow.Icmp.Echo' x-field-uid: 2 - nanoseconds: - description: |- - The amount of time between bursts expressed in nanoseconds. - A value of 0 indicates no gap between bursts. - type: number - format: double - minimum: 0 - default: 96 - x-field-uid: 3 - microseconds: - description: |- - The amount of time between bursts expressed in microseconds. - A value of 0 indicates no gap between bursts. - type: number - format: double - minimum: 0 - default: 0.096 - x-field-uid: 4 - Flow.Metrics: + Flow.Icmp.Echo: description: |- - The optional container for configuring flow metrics. + Packet Header for ICMP echo request type: object properties: - enable: - description: "Enables flow metrics.\nEnabling this option may affect the\ - \ resultant packet payload due to \nadditional instrumentation data." - type: boolean - default: false + type: x-field-uid: 1 - loss: - description: |- - Enables additional flow metric loss calculation. - type: boolean - default: false + $ref: '#/components/schemas/Pattern.Flow.Icmp.Echo.Type' + code: x-field-uid: 2 - rx_tx_ratio: - description: |- - Rx Tx ratio. - $ref: '#/components/schemas/Flow.RxTxRatio' - x-field-uid: 6 - timestamps: - description: |- - Enables additional flow metric first and last timestamps. - type: boolean - default: false + $ref: '#/components/schemas/Pattern.Flow.Icmp.Echo.Code' + checksum: x-field-uid: 3 - latency: - description: |- - Latency metrics. - $ref: '#/components/schemas/Flow.Latency.Metrics' + $ref: '#/components/schemas/Pattern.Flow.Icmp.Echo.Checksum' + identifier: x-field-uid: 4 - predefined_metric_tags: - description: |- - Predefined metric tags - $ref: '#/components/schemas/Flow.Predefined.Tags' + $ref: '#/components/schemas/Pattern.Flow.Icmp.Echo.Identifier' + sequence_number: x-field-uid: 5 - Flow.Latency.Metrics: + $ref: '#/components/schemas/Pattern.Flow.Icmp.Echo.SequenceNumber' + Flow.Icmpv6: description: |- - The optional container for per flow latency metric configuration. + ICMPv6 packet header type: object properties: - enable: - description: "True to enable latency metrics using timestamps.\n\nEnabling\ - \ this option may affect the resultant packet payload due to \nadditional\ - \ instrumentation data." - type: boolean - default: false - x-field-uid: 1 - mode: - description: "Select the type of latency measurement. The different types\ - \ of \nlatency measurements are:\n\n\nstore_forward:\nThe time interval\ - \ starting when the last bit of the frame leaves the\nsending port and\ - \ ending when the first bit of the frame is seen on\nthe receiving port\ - \ (LIFO). This is based on the RFC 1242 standard.\n\n\ncut_through:\n\ - The time interval starting when the first bit of the frame leaves\nthe\ - \ sending port and ending when the first bit of the frame is seen\non\ - \ the receiving port (FIFO). This is based on the RFC 1242 \nstandard." + choice: type: string - default: store_forward - x-field-uid: 2 + default: echo + x-field-uid: 1 x-enum: - store_forward: + echo: x-field-uid: 1 - cut_through: - x-field-uid: 2 enum: - - store_forward - - cut_through - Flow.Predefined.Tags: + - echo + echo: + $ref: '#/components/schemas/Flow.Icmpv6.Echo' + x-field-uid: 2 + Flow.Icmpv6.Echo: description: |- - List of predefined flow tracking options, outside packet fields, that can be enabled. + Packet Header for ICMPv6 Echo type: object properties: - rx_name: - description: |- - Enables Rx port or lag level disaggregation with predefined metrics tag name set as "rx_name". - The Rx port / lag names can be found under tagged_metrics tag names in flow metrics response. - type: boolean - default: false + type: x-field-uid: 1 - Flow.RxTxRatio: + $ref: '#/components/schemas/Pattern.Flow.Icmpv6.Echo.Type' + code: + x-field-uid: 2 + $ref: '#/components/schemas/Pattern.Flow.Icmpv6.Echo.Code' + identifier: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.Icmpv6.Echo.Identifier' + sequence_number: + x-field-uid: 4 + $ref: '#/components/schemas/Pattern.Flow.Icmpv6.Echo.SequenceNumber' + checksum: + x-field-uid: 5 + $ref: '#/components/schemas/Pattern.Flow.Icmpv6.Echo.Checksum' + Flow.Ppp: description: |- - Rx Tx ratio is the ratio of expected number of Rx packets across all Rx ports to the Tx packets - for the configured flow. It is a factor by which the Tx packet count is multiplied to calculate - the sum of expected Rx packet count, across all Rx ports. This will be used to calculate loss - percentage of flow at aggregate level. + PPP packet header type: object properties: - choice: - type: string - default: value + address: x-field-uid: 1 - x-enum: - rx_count: - x-field-uid: 1 - value: - x-field-uid: 2 - enum: - - rx_count - - value - rx_count: - $ref: '#/components/schemas/Flow.RxTxRatio.RxCount' + $ref: '#/components/schemas/Pattern.Flow.Ppp.Address' + control: x-field-uid: 2 - value: - description: |- - Should be a positive, non-zero value. The default value of 1, is when the Rx packet count across - all ports is expected to match the Tx packet count. A custom integer value (>1) can be specified for - loss calculation for cases when there are multiple destination addresses configured within one flow, - but DUT is configured to replicate only to a subset of Rx ports. For cases when Tx side generates two - packets from each source in 1:1 protection mode but only one of the two packets are received by the - Rx port, we may need to specify a fractional value instead. - type: number - format: float - default: 1.0 + $ref: '#/components/schemas/Pattern.Flow.Ppp.Control' + protocol_type: x-field-uid: 3 - Flow.RxTxRatio.RxCount: - description: |- - This is for cases where one copy of Tx packet is received on all Rx ports and so the sum total of Rx packets - received across all Rx ports is a multiple of Rx port count and Tx packets. - Event: + $ref: '#/components/schemas/Pattern.Flow.Ppp.ProtocolType' + Flow.Igmpv1: description: |- - The optional container for event configuration. + IGMPv1 packet header type: object properties: - enable: - description: "True to enable all events. \nEnabling this option may affect\ - \ the resultant packet payload due to \nadditional instrumentation data." - type: boolean - default: false + version: x-field-uid: 1 - link: - $ref: '#/components/schemas/Event.Link' + $ref: '#/components/schemas/Pattern.Flow.Igmpv1.Version' + type: x-field-uid: 2 - rx_rate_threshold: - $ref: '#/components/schemas/Event.RxRateThreshold' + $ref: '#/components/schemas/Pattern.Flow.Igmpv1.Type' + unused: x-field-uid: 3 - route_advertise_withdraw: - $ref: '#/components/schemas/Event.RouteAdvertiseWithdraw' + $ref: '#/components/schemas/Pattern.Flow.Igmpv1.Unused' + checksum: x-field-uid: 4 - Event.RxRateThreshold: + $ref: '#/components/schemas/Pattern.Flow.Igmpv1.Checksum' + group_address: + x-field-uid: 5 + $ref: '#/components/schemas/Pattern.Flow.Igmpv1.GroupAddress' + Flow.Mpls: description: |- - The optional container for rx rate threshold event configuration. + MPLS packet header; When configuring multiple such headers, the count shall not exceed 20. type: object properties: - enable: - description: "True to enable the rx_rate_threshold event. \nEnabling this\ - \ option may affect the resultant packet payload due to \nadditional instrumentation\ - \ data." - type: boolean - default: false + label: x-field-uid: 1 - threshold: - description: "True to enable notifications when the rx rate of a flow passes\ - \ above \nor below the threshold value. " - type: number - format: float - maximum: 100 - minimum: 0 - default: 95 + $ref: '#/components/schemas/Pattern.Flow.Mpls.Label' + traffic_class: x-field-uid: 2 - Event.Link: + $ref: '#/components/schemas/Pattern.Flow.Mpls.TrafficClass' + bottom_of_stack: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.Mpls.BottomOfStack' + time_to_live: + x-field-uid: 4 + $ref: '#/components/schemas/Pattern.Flow.Mpls.TimeToLive' + Flow.Snmpv2c: description: |- - The optional container for link up/down event configuration. + SNMPv2C packet header as defined in RFC1901 and RFC3416. type: object + required: + - data properties: - enable: - description: "True to enable notifications when a link up/down event occurs. " - type: boolean - default: false + version: x-field-uid: 1 - Event.RouteAdvertiseWithdraw: - description: |- - The optional container for route advertise/withdraw event configuration. - type: object - properties: - enable: - description: "True to enable notifications when a route advertise/withdraw\ - \ \nevent occurs. " - type: boolean - default: false - x-field-uid: 1 - Event.Request: - type: object - properties: - type: - description: "Constrain the events being returned by specifying event types.\n\ - If the list is empty then all event types will be returned. " - type: array - items: - type: string - example: route_withdraw - x-enum: - link_down: - x-field-uid: 1 - link_up: - x-field-uid: 2 - route_withdraw: - x-field-uid: 3 - route_advertise: - x-field-uid: 4 - flow_rx_rate_above_threshold: - x-field-uid: 5 - flow_rx_rate_below_threshold: - x-field-uid: 6 - enum: - - link_down - - link_up - - route_withdraw - - route_advertise - - flow_rx_rate_above_threshold - - flow_rx_rate_below_threshold - x-field-uid: 1 - source: - description: "Constrain the events being returned by specifying event sources.\ - \ \nIf the list is empty then all event sources will be returned. \n\n\ - x-constraint:\n- /components/schemas/Port/properties/name\n- /components/schemas/Bgp.V4RouteRange/name\n\ - - /components/schemas/Bgp.V6RouteRange/name\n\n\nx-constraint:\n- /components/schemas/Port/properties/name\n\ - - /components/schemas/Bgp.V4RouteRange/name\n- /components/schemas/Bgp.V6RouteRange/name\n" - type: array - items: - type: string - x-constraint: - - /components/schemas/Port/properties/name - - /components/schemas/Bgp.V4RouteRange/name - - /components/schemas/Bgp.V6RouteRange/name - x-field-uid: 2 - Event.Subscription: - description: "A container that describes what events a system should provide\ - \ and \noptionally where to publish them. " - type: object - properties: - events: - $ref: '#/components/schemas/Event.Request' - x-field-uid: 1 - callback_url: + $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.Version' + community: description: |- - Indicates where a client wants to be notified of the events set in - the events property. - If this property is empty or null then no event notifications will - be forwarded. + It is an ASCII based octet string which identifies the SNMP community in which the sender and recipient of this message are located. It should match the read-only or read-write community string configured on the recipient for the PDU to be accepted. type: string - format: uri - example: https://127.0.0.1/event/notification - x-field-uid: 2 - Lldp: - description: |- - Configuration of LLDP protocol IEEE Ref: https://www.ieee802.org/1/files/public/docs2002/lldp-protocol-00.pdf - type: object - required: - - connection - - name - properties: - connection: - description: "The unique name of the object on which LLDP is running. " - $ref: '#/components/schemas/Lldp.Connection' - x-field-uid: 1 - chassis_id: - description: |- - The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. If mac address is specified it should be in colon seperated mac address format. - $ref: '#/components/schemas/Lldp.ChassisId' + maxLength: 10000 + default: community x-field-uid: 2 - port_id: - description: |- - The Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater port, then this TLV is optional. - $ref: '#/components/schemas/Lldp.PortId' + data: + $ref: '#/components/schemas/Flow.Snmpv2c.Data' x-field-uid: 3 - system_name: - description: |- - The system name field shall contain an alpha-numeric string that indicates the system's administratively assigned name. The system name should be the system's fully qualified domain name. If implementations support IETF RFC 3418, the sysName object should be used for this field. - $ref: '#/components/schemas/Lldp.SystemName' - x-field-uid: 4 - hold_time: - description: |- - Specifies the amount of time in seconds a receiving device should maintain LLDP information sent by the device before discarding it. - type: integer - format: uint32 - minimum: 10 - maximum: 65535 - default: 120 - x-field-uid: 5 - advertisement_interval: - description: |- - Set the transmission frequency of LLDP updates in seconds. - type: integer - format: uint32 - minimum: 5 - maximum: 65534 - default: 30 - x-field-uid: 6 - name: - x-field-uid: 7 - description: |- - Globally unique name of an object. It also serves as the primary key for arrays of objects. - type: string - pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ - x-unique: global - Lldp.Connection: - description: "LLDP connection to a test port. In future if more connection options\ - \ arise LLDP connection object will be enhanced. " - type: object - properties: - choice: - description: |- - The name of the test port or other connection objects on which LLDP is configured. - type: string - x-field-uid: 1 - x-enum: - port_name: - x-field-uid: 1 - enum: - - port_name - port_name: - description: | - Name of the test port on which LLDP is configured on. - - x-constraint: - - /components/schemas/Port/properties/name - - - x-constraint: - - /components/schemas/Port/properties/name - type: string - x-constraint: - - /components/schemas/Port/properties/name - x-field-uid: 2 - Lldp.ChassisId: + Flow.Snmpv2c.Data: description: |- - The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. This field identifies the format and source of the chassis identifier string. It is based on the enumerator defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. + This contains the body of the SNMPv2C message. + + - Encoding of subsequent fields follow ASN.1 specification. + Refer: http://www.itu.int/ITU-T/asn1/ type: object + required: + - choice properties: choice: - description: |- - Chassis ID subtype to be used in Chassis ID TLV. type: string - default: mac_address_subtype x-field-uid: 1 x-enum: - mac_address_subtype: + get_request: x-field-uid: 1 - interface_name_subtype: + get_next_request: x-field-uid: 2 - local_subtype: + response: x-field-uid: 3 + set_request: + x-field-uid: 4 + get_bulk_request: + x-field-uid: 5 + inform_request: + x-field-uid: 6 + snmpv2_trap: + x-field-uid: 7 + report: + x-field-uid: 8 enum: - - mac_address_subtype - - interface_name_subtype - - local_subtype - mac_address_subtype: - $ref: '#/components/schemas/Lldp.ChassisMacSubType' + - get_request + - get_next_request + - response + - set_request + - get_bulk_request + - inform_request + - snmpv2_trap + - report + get_request: + $ref: '#/components/schemas/Flow.Snmpv2c.PDU' x-field-uid: 2 - interface_name_subtype: - description: |- - Name of an interface of the chassis that uniquely identifies the chassis. - type: string + get_next_request: + $ref: '#/components/schemas/Flow.Snmpv2c.PDU' x-field-uid: 3 - local_subtype: - description: |- - Locally assigned name of the chassis. - type: string + response: + $ref: '#/components/schemas/Flow.Snmpv2c.PDU' x-field-uid: 4 - Lldp.PortId: + set_request: + $ref: '#/components/schemas/Flow.Snmpv2c.PDU' + x-field-uid: 5 + get_bulk_request: + $ref: '#/components/schemas/Flow.Snmpv2c.BulkPDU' + x-field-uid: 6 + inform_request: + $ref: '#/components/schemas/Flow.Snmpv2c.PDU' + x-field-uid: 7 + snmpv2_trap: + $ref: '#/components/schemas/Flow.Snmpv2c.PDU' + x-field-uid: 8 + report: + $ref: '#/components/schemas/Flow.Snmpv2c.PDU' + x-field-uid: 9 + Flow.Snmpv2c.PDU: description: |- - The Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent.This field identifies the format and source of the port identifier string. It is based on the enumerator defined by the PtopoPortIdType object from RFC2922. + This contains the body of the SNMPv2C PDU. type: object properties: - choice: + request_id: + x-field-uid: 1 + $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.PDU.RequestId' + error_status: description: |- - Port ID subtype to be used in Port ID TLV. + The SNMP agent places an error code in this field in the response message if an error occurred processing the request. type: string - default: interface_name_subtype - x-field-uid: 1 + default: no_error x-enum: - mac_address_subtype: + no_error: x-field-uid: 1 - interface_name_subtype: + too_big: x-field-uid: 2 - local_subtype: + no_such_name: x-field-uid: 3 - enum: - - mac_address_subtype - - interface_name_subtype - - local_subtype - mac_address_subtype: - description: |- - The MAC Address configured in the Port ID TLV. - type: string - x-field-uid: 2 - interface_name_subtype: - $ref: '#/components/schemas/Lldp.PortInterfaceNameSubType' - x-field-uid: 3 - local_subtype: + bad_value: + x-field-uid: 4 + read_only: + x-field-uid: 5 + gen_err: + x-field-uid: 6 + no_access: + x-field-uid: 7 + wrong_type: + x-field-uid: 8 + wrong_length: + x-field-uid: 9 + wrong_encoding: + x-field-uid: 10 + wrong_value: + x-field-uid: 11 + no_creation: + x-field-uid: 12 + inconsistent_value: + x-field-uid: 13 + resource_unavailable: + x-field-uid: 14 + commit_failed: + x-field-uid: 15 + undo_failed: + x-field-uid: 16 + authorization_error: + x-field-uid: 17 + not_writable: + x-field-uid: 18 + inconsistent_name: + x-field-uid: 19 + x-field-uid: 2 + enum: + - no_error + - too_big + - no_such_name + - bad_value + - read_only + - gen_err + - no_access + - wrong_type + - wrong_length + - wrong_encoding + - wrong_value + - no_creation + - inconsistent_value + - resource_unavailable + - commit_failed + - undo_failed + - authorization_error + - not_writable + - inconsistent_name + error_index: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.PDU.ErrorIndex' + variable_bindings: description: |- - The Locally assigned name configured in the Port ID TLV. - type: string + A Sequence of variable_bindings. + type: array + items: + $ref: '#/components/schemas/Flow.Snmpv2c.VariableBinding' x-field-uid: 4 - Lldp.ChassisMacSubType: - description: "The MAC address configured in the Chassis ID TLV. " + Flow.Snmpv2c.BulkPDU: + description: |- + The purpose of the GetBulkRequest-PDU is to request the transfer of a potentially large amount of data, including, but not limited to, the efficient and rapid retrieval of large tables. type: object properties: - choice: + request_id: + x-field-uid: 1 + $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.BulkPDU.RequestId' + non_repeaters: + x-field-uid: 2 + $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.BulkPDU.NonRepeaters' + max_repetitions: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.BulkPDU.MaxRepetitions' + variable_bindings: description: |- - In auto mode the system generated value is set for this property, while if the choice is selected as value, a user configured value will be used for this property. + A Sequence of variable_bindings. + type: array + items: + $ref: '#/components/schemas/Flow.Snmpv2c.VariableBinding' + x-field-uid: 4 + Flow.Snmpv2c.VariableBinding: + description: |- + A Sequence of two fields, an object_identifier and the value for/from that object_identifier. + type: object + properties: + object_identifier: + x-field-uid: 1 + description: "The Object Identifier points to a particular parameter in\ + \ the SNMP agent. \n- Encoding of this field follows RFC2578(section 3.5)\ + \ and ASN.1 X.690(section 8.1.3.6) specification.\n Refer: http://www.itu.int/ITU-T/asn1/\n\ + - According to BER, the first two numbers of any OID (x.y) are encoded\ + \ as one value using the formula (40*x)+y. \n Example, the first two\ + \ numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, because (40*1)+3\ + \ = 43. \n- After the first two numbers are encoded, the subsequent numbers\ + \ in the OID are each encoded as a byte. \n- However, a special rule is\ + \ required for large numbers because one byte can only represent a number\ + \ from 0-127. \n- The rule for large numbers states that only the lower\ + \ 7 bits in the byte are used for holding the value (0-127). \n- The highest\ + \ order bit(8th) is used as a flag to indicate that this number spans\ + \ more than one byte. Therefore, any number over 127 must be encoded using\ + \ more than one byte. \n - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0'\ + \ cannot be encoded using a single byte. \n According to this rule,\ + \ the number 2680 must be encoded as 0x94 0x78. \n Since the most significant\ + \ bit is set in the first byte (0x94), it indicates that number spans\ + \ to the next byte.\n Since the most significant bit is not set in\ + \ the next byte (0x78), it indicates that the number ends at the second\ + \ byte.\n The value is derived by appending 7 bits from each of the\ + \ concatenated bytes i.e (0x14 *128^1) + (0x78 * 128^0) = 2680." type: string - default: auto + format: oid + default: '0.1' + value: + $ref: '#/components/schemas/Flow.Snmpv2c.VariableBindingValue' + x-field-uid: 2 + Flow.Snmpv2c.VariableBindingValue: + description: |- + The value for the object_identifier as per RFC2578. + type: object + properties: + choice: + type: string + default: no_value x-field-uid: 1 x-enum: - auto: + no_value: x-field-uid: 1 - value: + integer_value: x-field-uid: 2 + string_value: + x-field-uid: 3 + object_identifier_value: + x-field-uid: 4 + ip_address_value: + x-field-uid: 5 + counter_value: + x-field-uid: 6 + timeticks_value: + x-field-uid: 7 + arbitrary_value: + x-field-uid: 8 + big_counter_value: + x-field-uid: 9 + unsigned_integer_value: + x-field-uid: 10 enum: - - auto - - value - auto: - description: |- - The OTG implementation must provide a system generated value for this property. - type: string - format: mac + - no_value + - integer_value + - string_value + - object_identifier_value + - ip_address_value + - counter_value + - timeticks_value + - arbitrary_value + - big_counter_value + - unsigned_integer_value + integer_value: x-field-uid: 2 - value: + $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.VariableBindingValue.IntegerValue' + string_value: + $ref: '#/components/schemas/Flow.Snmpv2c.VariableBindingStringValue' + x-field-uid: 3 + object_identifier_value: + x-field-uid: 4 + description: "The Object Identifier points to a particular parameter in\ + \ the SNMP agent. \n- Encoding of this field follows RFC2578(section 3.5)\ + \ and ASN.1 X.690(section 8.1.3.6) specification.\n Refer: http://www.itu.int/ITU-T/asn1/\n\ + - According to BER, the first two numbers of any OID (x.y) are encoded\ + \ as one value using the formula (40*x)+y. \n Example, the first two\ + \ numbers of an SNMP OID 1.3... are encoded as 43 or 0x2B, because (40*1)+3\ + \ = 43. \n- After the first two numbers are encoded, the subsequent numbers\ + \ in the OID are each encoded as a byte. \n- However, a special rule is\ + \ required for large numbers because one byte can only represent a number\ + \ from 0-127. \n- The rule for large numbers states that only the lower\ + \ 7 bits in the byte are used for holding the value (0-127). \n- The highest\ + \ order bit(8th) is used as a flag to indicate that this number spans\ + \ more than one byte. Therefore, any number over 127 must be encoded using\ + \ more than one byte. \n - Example, the number 2680 in the OID '1.3.6.1.4.1.2680.1.2.7.3.2.0'\ + \ cannot be encoded using a single byte. \n According to this rule,\ + \ the number 2680 must be encoded as 0x94 0x78. \n Since the most significant\ + \ bit is set in the first byte (0x94), it indicates that number spans\ + \ to the next byte.\n Since the most significant bit is not set in\ + \ the next byte (0x78), it indicates that the number ends at the second\ + \ byte.\n The value is derived by appending 7 bits from each of the\ + \ concatenated bytes i.e (0x14 *128^1) + (0x78 * 128^0) = 2680." + type: string + format: oid + default: '0.1' + ip_address_value: + x-field-uid: 5 + $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.VariableBindingValue.IpAddressValue' + counter_value: + x-field-uid: 6 + $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.VariableBindingValue.CounterValue' + timeticks_value: + x-field-uid: 7 + $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.VariableBindingValue.TimeticksValue' + arbitrary_value: description: |- - User must specify a value if mode is not auto. + It contains the hex bytes of the value to be sent. As of now it is restricted to 10000 bytes. type: string - format: mac - x-field-uid: 3 - Lldp.PortInterfaceNameSubType: - description: "The interface name configured in the Port ID TLV. " + format: hex + maxLength: 10000 + default: '00' + x-field-uid: 8 + big_counter_value: + x-field-uid: 9 + $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.VariableBindingValue.BigCounterValue' + unsigned_integer_value: + x-field-uid: 10 + $ref: '#/components/schemas/Pattern.Flow.Snmpv2c.VariableBindingValue.UnsignedIntegerValue' + Flow.Snmpv2c.VariableBindingStringValue: type: object + description: |- + It contains the raw/ascii string value to be sent. properties: choice: - description: |- - In auto mode the system generated value is set for this property, while if the choice is selected as value, a user configured value will be used for this property. type: string - default: auto + default: ascii x-field-uid: 1 x-enum: - auto: + ascii: x-field-uid: 1 - value: + raw: x-field-uid: 2 enum: - - auto - - value - auto: + - ascii + - raw + ascii: description: |- - The OTG implementation must provide a system generated value for this property. + It contains the ASCII string to be sent. As of now it is restricted to 10000 bytes. type: string + maxLength: 10000 + default: ascii x-field-uid: 2 - value: + raw: description: |- - User must specify a value if mode is not auto. + It contains the hex string to be sent. As of now it is restricted to 10000 bytes. type: string + format: hex + maxLength: 10000 + default: '00' x-field-uid: 3 - Lldp.SystemName: - description: "The system Name configured in the System Name TLV. " + Flow.Rsvp: + description: |- + RSVP packet header as defined in RFC2205 and RFC3209. Currently only supported message type is "Path" with mandatory objects and sub-objects. + type: object + properties: + version: + description: |- + RSVP Protocol Version. + type: integer + format: uint32 + default: 1 + maximum: 15 + x-field-uid: 1 + flag: + description: |- + Flag, 0x01-0x08: Reserved. + type: string + default: not_refresh_reduction_capable + x-enum: + not_refresh_reduction_capable: + x-field-uid: 1 + refresh_reduction_capable: + x-field-uid: 2 + x-field-uid: 2 + enum: + - not_refresh_reduction_capable + - refresh_reduction_capable + rsvp_checksum: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.Rsvp.RsvpChecksum' + time_to_live: + x-field-uid: 4 + $ref: '#/components/schemas/Pattern.Flow.Rsvp.TimeToLive' + reserved: + x-field-uid: 5 + $ref: '#/components/schemas/Pattern.Flow.Rsvp.Reserved' + rsvp_length: + description: |- + The sum of the lengths of the common header and all objects included in the message. + $ref: '#/components/schemas/Flow.RSVP.Length' + x-field-uid: 6 + message_type: + description: |- + An 8-bit number that identifies the function of the RSVP message. There are aound 20 message types defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-2 . Among these presently supported is "Path"(value: 1) message type. + $ref: '#/components/schemas/Flow.RSVP.Message' + x-field-uid: 7 + Flow.RSVP.Length: type: object properties: choice: description: |- - In auto mode the system generated value is set for this property, while if the choice is selected as value, a user configured value will be used for this property. + auto or configured value. type: string default: auto x-field-uid: 1 @@ -11235,4738 +12300,8978 @@ components: - value auto: description: |- - The OTG implementation must provide a system generated value for this property. - type: string + The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. + type: integer + format: uint32 + default: 0 x-field-uid: 2 value: - description: |- - User must specify a value if mode is not auto. - type: string - x-field-uid: 3 - Error: - description: |- - Error response generated while serving API request. - type: object - required: - - code - - errors - properties: - code: - description: |- - Numeric status code based on the underlying transport being used. - The API server MUST set this code explicitly based on following references: - - HTTP 4xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.5 - - HTTP 5xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.6 - - gRPC errors: https://grpc.github.io/grpc/core/md_doc_statuscodes.html type: integer - format: int32 - x-field-uid: 1 - kind: - description: |- - Classification of error originating from within API server that may not be mapped to the value in `code`. - Absence of this field may indicate that the error did not originate from within API server. - type: string - x-enum: - validation: - x-field-uid: 1 - internal: - x-field-uid: 2 - x-field-uid: 2 - enum: - - validation - - internal - errors: - description: |- - List of error messages generated while executing the request. - type: array - items: - type: string + format: uint32 + maximum: 65535 + default: 0 x-field-uid: 3 - Warning: - description: |- - A list of warnings that have occurred while executing the request. - type: object - properties: - warnings: - description: "A list of any system specific warnings that have occurred\ - \ while \nexecuting the request." - type: array - items: - type: string - x-field-uid: 1 - Config.Update: - description: |- - Request for updating specific attributes of resources in traffic generator + Flow.RSVP.Message: type: object properties: choice: type: string + default: path x-enum: - flows: + path: x-field-uid: 1 x-field-uid: 1 enum: - - flows - flows: - $ref: '#/components/schemas/Flows.Update' + - path + path: + $ref: '#/components/schemas/Flow.RSVP.PathMessage' x-field-uid: 2 - Flows.Update: + Flow.RSVP.PathMessage: description: |- - A container of flows with associated properties to be updated without affecting the flows current transmit state. + "Path" message requires the following list of objects in order as defined in https://www.rfc-editor.org/rfc/rfc3209.html#page-15: 1. SESSION 2. RSVP_HOP 3. TIME_VALUES 4. EXPLICIT_ROUTE [optional] 5. LABEL_REQUEST 6. SESSION_ATTRIBUTE [optional] 7. SENDER_TEMPLATE 8. SENDER_TSPEC 9. RECORD_ROUTE [optional] type: object - required: - - property_names - - flows properties: - property_names: + objects: description: |- - Flow properties to be updated without affecting the transmit state. + "Path" message requires atleast SESSION, RSVP_HOP, TIME_VALUES, LABEL_REQUEST, SENDER_TEMPLATE and SENDER_TSPEC objects in order. type: array items: - type: string - x-enum: - rate: - x-field-uid: 1 - size: - x-field-uid: 2 - enum: - - rate - - size + $ref: '#/components/schemas/Flow.RSVP.PathObjects' x-field-uid: 1 - flows: - description: |- - The list of configured flows for which given property will be updated. - type: array - items: - $ref: '#/components/schemas/Flow' - x-field-uid: 2 - Control.State: + Flow.RSVP.PathObjects: description: |- - Request for setting operational state of configured resources. + Every RSVP object encapsulated in an RSVP message consists of a 32-bit word header and the object's contents. type: object - required: - - choice properties: - choice: - type: string - x-enum: - port: - x-field-uid: 1 - protocol: - x-field-uid: 2 - traffic: - x-field-uid: 3 + class_num: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsClass' x-field-uid: 1 - enum: - - port - - protocol - - traffic - port: - $ref: '#/components/schemas/State.Port' - x-field-uid: 2 - protocol: - $ref: '#/components/schemas/State.Protocol' - x-field-uid: 3 - traffic: - $ref: '#/components/schemas/State.Traffic' - x-field-uid: 4 - State.Port: - description: |- - States associated with configured ports. + Flow.RSVPObject.Length: type: object - required: - - choice properties: choice: + description: |- + auto or configured value. type: string + default: auto + x-field-uid: 1 x-enum: - link: + auto: x-field-uid: 1 - capture: + value: x-field-uid: 2 - x-field-uid: 1 enum: - - link - - capture - link: - $ref: '#/components/schemas/State.Port.Link' + - auto + - value + auto: + description: |- + The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. + type: integer + format: uint32 + default: 4 x-field-uid: 2 - capture: - $ref: '#/components/schemas/State.Port.Capture' + value: + type: integer + format: uint32 + minimum: 4 + maximum: 65535 + default: 4 x-field-uid: 3 - State.Traffic: + Flow.RSVP.PathObjectsClass: description: |- - States associated with configured flows + The class number is used to identify the class of an object. Defined in https://www.iana.org/assignments/rsvp-parameters/rsvp-parameters.xhtml#rsvp-parameters-4 . Curently supported class numbers are for "Path" message type. "Path" message: Supported Class numbers and it's value: SESSION: 1, RSVP_HOP: 3, TIME_VALUES: 5, EXPLICIT_ROUTE: 20, LABEL_REQUEST: 19, SESSION_ATTRIBUTE: 207, SENDER_TEMPLATE: 11, SENDER_TSPEC: 12, RECORD_ROUTE: 21, Custom: User defined bytes based on class and c-types not supported in above options. type: object required: - choice properties: choice: type: string - x-enum: - flow_transmit: - x-field-uid: 1 x-field-uid: 1 - enum: - - flow_transmit - flow_transmit: - $ref: '#/components/schemas/State.Traffic.FlowTransmit' - x-field-uid: 2 - State.Protocol: - description: |- - States associated with protocols on configured resources. - type: object - required: - - choice - properties: - choice: - type: string x-enum: - all: + session: x-field-uid: 1 - route: + rsvp_hop: x-field-uid: 2 - lacp: + time_values: x-field-uid: 3 - bgp: + explicit_route: x-field-uid: 4 - isis: + label_request: x-field-uid: 5 - x-field-uid: 1 + session_attribute: + x-field-uid: 6 + sender_template: + x-field-uid: 7 + sender_tspec: + x-field-uid: 8 + record_route: + x-field-uid: 9 + custom: + x-field-uid: 10 enum: - - all - - route - - lacp - - bgp - - isis - all: - $ref: '#/components/schemas/State.Protocol.All' + - session + - rsvp_hop + - time_values + - explicit_route + - label_request + - session_attribute + - sender_template + - sender_tspec + - record_route + - custom + session: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassSession' x-field-uid: 2 - route: - $ref: '#/components/schemas/State.Protocol.Route' + rsvp_hop: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassRsvpHop' x-field-uid: 3 - lacp: - $ref: '#/components/schemas/State.Protocol.Lacp' + time_values: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassTimeValues' x-field-uid: 4 - bgp: - $ref: '#/components/schemas/State.Protocol.Bgp' + explicit_route: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassExplicitRoute' x-field-uid: 5 - isis: - $ref: '#/components/schemas/State.Protocol.Isis' + label_request: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassLabelRequest' x-field-uid: 6 - State.Port.Link: + session_attribute: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassSessionAttribute' + x-field-uid: 7 + sender_template: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassSenderTemplate' + x-field-uid: 8 + sender_tspec: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassSenderTspec' + x-field-uid: 9 + record_route: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassRecordRoute' + x-field-uid: 10 + custom: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsCustom' + x-field-uid: 11 + Flow.RSVP.PathObjectsClassSession: description: |- - Sets the link of configured ports. + C-Type is specific to a class num. type: object - required: - - state properties: - port_names: - description: | - The names of target ports. An empty or null list will target all ports. - - x-constraint: - - /components/schemas/Port/properties/name - - - x-constraint: - - /components/schemas/Port/properties/name - type: array - items: - type: string - x-constraint: - - /components/schemas/Port/properties/name - x-field-uid: 1 - state: + length: description: |- - The link state. - type: string + A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. + $ref: '#/components/schemas/Flow.RSVPObject.Length' + x-field-uid: 1 + c_type: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsSessionCType' x-field-uid: 2 - x-enum: - up: - x-field-uid: 1 - down: - x-field-uid: 2 - enum: - - up - - down - State.Port.Capture: + Flow.RSVP.PathObjectsSessionCType: description: |- - Sets the capture state of configured ports + The body of an object corresponding to the class number and c-type. Currently supported c-type for SESSION object is LSP Tunnel IPv4 (7). type: object - required: - - state properties: - port_names: - description: | - The names of ports to which the capture state will be applied to. If the list of port_names is empty or null the state will be applied to all configured ports. - If the list is not empty any port that is not included in the list of port_names MUST be ignored and not included in the state change. - - x-constraint: - - /components/schemas/Port/properties/name - - - x-constraint: - - /components/schemas/Port/properties/name - type: array - items: - type: string - x-constraint: - - /components/schemas/Port/properties/name - x-field-uid: 1 - state: - description: |- - The capture state. + choice: type: string - x-field-uid: 2 + x-field-uid: 1 + default: lsp_tunnel_ipv4 x-enum: - start: + lsp_tunnel_ipv4: x-field-uid: 1 - stop: - x-field-uid: 2 enum: - - start - - stop - State.Traffic.FlowTransmit: + - lsp_tunnel_ipv4 + lsp_tunnel_ipv4: + $ref: '#/components/schemas/Flow.RSVP.PathSessionLspTunnelIpv4' + x-field-uid: 2 + Flow.RSVP.PathSessionLspTunnelIpv4: description: |- - Provides state control of flow transmission. + Class = SESSION, LSP_TUNNEL_IPv4 C-Type = 7. type: object - required: - - state properties: - flow_names: - description: | - The names of flows to which the transmit state will be applied to. If the list of flow_names is empty or null the state will be applied to all configured flows. - If the list is not empty any flow that is not included in the list of flow_names MUST be ignored and not included in the state change. - - x-constraint: - - /components/schemas/Flow/properties/name - - - x-constraint: - - /components/schemas/Flow/properties/name - type: array - items: - type: string - x-constraint: - - /components/schemas/Flow/properties/name + ipv4_tunnel_end_point_address: x-field-uid: 1 - state: + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSessionLspTunnelIpv4.Ipv4TunnelEndPointAddress' + reserved: + x-field-uid: 2 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSessionLspTunnelIpv4.Reserved' + tunnel_id: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSessionLspTunnelIpv4.TunnelId' + extended_tunnel_id: description: |- - The transmit state. - If the value of the state property is 'start' then all flows defined by the 'flow_names' property will be started and the metric counters MUST be cleared prior to starting the flow(s). - If the value of the state property is 'stop' then all flows defined by the 'flow_names' property will be stopped and the metric counters MUST NOT be cleared. - If the value of the state property is 'pause' then all flows defined by the 'flow_names' property will be paused and the metric counters MUST NOT be cleared. - If the value of the state property is 'resume' then any paused flows defined by the 'flow_names' property will start transmit at the point at which they were paused. Any flow that is stopped will start transmit at the beginning of the flow. The flow(s) MUST NOT have their metric counters cleared. + A 32-bit identifier used in the SESSION that remains constant over the life of the tunnel. Normally set to all zeros. Ingress nodes that wish to narrow the scope of a SESSION to the ingress-egress pair may place their IPv4 address here as a globally unique identifier. + $ref: '#/components/schemas/Flow.RSVP.PathSessionExtTunnelId' + x-field-uid: 4 + Flow.RSVP.PathSessionExtTunnelId: + type: object + properties: + choice: + description: |- + 32 bit integer or IPv4 address. type: string - x-field-uid: 2 + default: as_integer + x-field-uid: 1 x-enum: - start: + as_integer: x-field-uid: 1 - stop: + as_ipv4: x-field-uid: 2 - pause: - x-field-uid: 3 - resume: - x-field-uid: 4 enum: - - start - - stop - - pause - - resume - State.Protocol.All: + - as_integer + - as_ipv4 + as_integer: + x-field-uid: 2 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSessionExtTunnelId.AsInteger' + as_ipv4: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSessionExtTunnelId.AsIpv4' + Flow.RSVP.PathObjectsClassRsvpHop: description: |- - Sets all configured protocols to `start` or `stop` state. - Setting protocol state to `start` shall be a no-op if preceding `set_config` API call was made with `config.options.protocol_options.auto_start_all` set to `true` or if all the configured protocols are already started. + C-Type is specific to a class num. type: object - required: - - state properties: - state: + length: description: |- - Protocol states + A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. + $ref: '#/components/schemas/Flow.RSVPObject.Length' + x-field-uid: 1 + c_type: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsRsvpHopCType' + x-field-uid: 2 + Flow.RSVP.PathObjectsRsvpHopCType: + description: |- + Object for RSVP_HOP class. Currently supported c-type is IPv4 (1). + type: object + properties: + choice: type: string x-field-uid: 1 + default: ipv4 x-enum: - start: + ipv4: x-field-uid: 1 - stop: - x-field-uid: 2 enum: - - start - - stop - State.Protocol.Route: + - ipv4 + ipv4: + $ref: '#/components/schemas/Flow.RSVP.PathRsvpHopIpv4' + x-field-uid: 2 + Flow.RSVP.PathRsvpHopIpv4: description: |- - Sets the state of configured routes + IPv4 RSVP_HOP object: Class = 3, C-Type = 1 type: object - required: - - state properties: - names: - description: | - The names of device route objects to control. If no names are specified then all route objects that match the x-constraint will be affected. - - x-constraint: - - /components/schemas/Bgp.V4RouteRange/properties/name - - /components/schemas/Bgp.V6RouteRange/properties/name - - /components/schemas/Isis.V4RouteRange/properties/name - - /components/schemas/Isis.V6RouteRange/properties/name - - - x-constraint: - - /components/schemas/Bgp.V4RouteRange/properties/name - - /components/schemas/Bgp.V6RouteRange/properties/name - - /components/schemas/Isis.V4RouteRange/properties/name - - /components/schemas/Isis.V6RouteRange/properties/name - type: array - items: - type: string - x-constraint: - - /components/schemas/Bgp.V4RouteRange/properties/name - - /components/schemas/Bgp.V6RouteRange/properties/name - - /components/schemas/Isis.V4RouteRange/properties/name - - /components/schemas/Isis.V6RouteRange/properties/name + ipv4_address: x-field-uid: 1 - state: + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathRsvpHopIpv4.Ipv4Address' + logical_interface_handle: + x-field-uid: 2 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathRsvpHopIpv4.LogicalInterfaceHandle' + Flow.RSVP.PathObjectsClassTimeValues: + description: |- + C-Type is specific to a class num. + type: object + properties: + length: description: |- - Route states - type: string + A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. + $ref: '#/components/schemas/Flow.RSVPObject.Length' + x-field-uid: 1 + c_type: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsTimeValuesCType' x-field-uid: 2 - x-enum: - withdraw: - x-field-uid: 1 - advertise: - x-field-uid: 2 - enum: - - withdraw - - advertise - State.Protocol.Lacp: + Flow.RSVP.PathObjectsTimeValuesCType: description: |- - Sets state of configured LACP + Object for TIME_VALUES class. Currently supported c-type is Type 1 Time Value (1). type: object - required: - - choice properties: choice: type: string + x-field-uid: 1 + default: type_1 x-enum: - admin: + type_1: x-field-uid: 1 - member_ports: - x-field-uid: 2 - x-field-uid: 1 enum: - - admin - - member_ports - admin: - $ref: '#/components/schemas/State.Protocol.Lacp.Admin' + - type_1 + type_1: + $ref: '#/components/schemas/Flow.RSVP.PathTimeValuesType1' x-field-uid: 2 - member_ports: - $ref: '#/components/schemas/State.Protocol.Lacp.MemberPorts' - x-field-uid: 3 - State.Protocol.Lacp.Admin: + Flow.RSVP.PathTimeValuesType1: description: |- - Sets admin state of LACP configured on LAG members - required: - - state + TIME_VALUES Object: Class = 5, C-Type = 1 + type: object properties: - lag_member_names: - description: | - The names of LAG members (ports) for which the state has to be applied. An empty or null list will control all LAG members. - - x-constraint: - - /components/schemas/Port/properties/name - - - x-constraint: - - /components/schemas/Port/properties/name - type: array - items: - type: string - x-constraint: - - /components/schemas/Port/properties/name + refresh_period_r: x-field-uid: 1 - state: - description: |- - The LACP Member admin state. 'up' will send LACPDUs with 'sync' flag set on selected member ports. 'down' will send LACPDUs with 'sync' flag unset on selected member ports. - type: string - x-field-uid: 2 - x-enum: - up: - x-field-uid: 1 - down: - x-field-uid: 2 - enum: - - up - - down - State.Protocol.Lacp.MemberPorts: + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathTimeValuesType1.RefreshPeriodR' + Flow.RSVP.PathObjectsClassExplicitRoute: description: |- - Sets state of LACP member ports configured on LAG. - required: - - state + C-Type is specific to a class num. + type: object properties: - lag_member_names: - description: | - The names of LAG members (ports) for which the state has to be applied. An empty or null list will control all LAG members. - - x-constraint: - - /components/schemas/Port/properties/name - - - x-constraint: - - /components/schemas/Port/properties/name - type: array - items: - type: string - x-constraint: - - /components/schemas/Port/properties/name - x-field-uid: 1 - state: + length: description: |- - The desired LACP member port state. - type: string + A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. + $ref: '#/components/schemas/Flow.RSVPObject.Length' + x-field-uid: 1 + c_type: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsClassExplicitRouteCType' x-field-uid: 2 - x-enum: - up: - x-field-uid: 1 - down: - x-field-uid: 2 - enum: - - up - - down - State.Protocol.Bgp: + Flow.RSVP.PathObjectsClassExplicitRouteCType: description: |- - Sets state of configured BGP peers. + Object for EXPLICIT_ROUTE class and c-type is Type 1 Explicit Route (1). type: object - required: - - choice properties: choice: type: string + default: type_1 + x-field-uid: 1 x-enum: - peers: + type_1: x-field-uid: 1 - x-field-uid: 1 enum: - - peers - peers: - $ref: '#/components/schemas/State.Protocol.Bgp.Peers' + - type_1 + type_1: + $ref: '#/components/schemas/Flow.RSVP.PathExplicitRouteType1' x-field-uid: 2 - State.Protocol.Bgp.Peers: + Flow.RSVP.PathExplicitRouteType1: description: |- - Sets state of configured BGP peers. - required: - - state + Type1 Explicit Route has subobjects. Currently supported subobjects are IPv4 prefix and Autonomous system number. + type: object properties: - peer_names: - description: | - The names of BGP peers for which the state has to be applied. An empty or null list will control all BGP peers. - - x-constraint: - - /components/schemas/Bgp.V4Peer/properties/name - - /components/schemas/Bgp.V6Peer/properties/name - - - x-constraint: - - /components/schemas/Bgp.V4Peer/properties/name - - /components/schemas/Bgp.V6Peer/properties/name + subobjects: type: array + minItems: 1 items: - type: string - x-constraint: - - /components/schemas/Bgp.V4Peer/properties/name - - /components/schemas/Bgp.V6Peer/properties/name + $ref: '#/components/schemas/Flow.RSVP.Type1ExplicitRouteSubobjects' x-field-uid: 1 - state: - description: "The desired state of BGP peer. If the desired state is 'up',\ - \ underlying IP interface(s) would be brought up automatically (if not\ - \ already up), would attempt to bring up the BGP session(s) and advertise\ - \ route(s), if configured. If the desired state is 'down', BGP session(s)\ - \ would be brought down. " - type: string - x-field-uid: 2 - x-enum: - up: - x-field-uid: 1 - down: - x-field-uid: 2 - enum: - - up - - down - State.Protocol.Isis: + Flow.RSVP.Type1ExplicitRouteSubobjects: description: |- - Sets state of configured ISIS routers. + Type is specific to a subobject. + type: object + properties: + type: + $ref: '#/components/schemas/Flow.RSVP.Type1ExplicitRouteSubobjectsType' + x-field-uid: 1 + Flow.RSVP.Type1ExplicitRouteSubobjectsType: + description: |- + Currently supported subobjects are IPv4 address(1) and Autonomous system number(32). type: object - required: - - choice properties: choice: type: string + x-field-uid: 1 + default: ipv4_prefix x-enum: - routers: + ipv4_prefix: x-field-uid: 1 - x-field-uid: 1 + as_number: + x-field-uid: 2 enum: - - routers - routers: - $ref: '#/components/schemas/State.Protocol.Isis.Routers' + - ipv4_prefix + - as_number + ipv4_prefix: + $ref: '#/components/schemas/Flow.RSVP.PathExplicitRouteType1Ipv4Prefix' x-field-uid: 2 - State.Protocol.Isis.Routers: + as_number: + $ref: '#/components/schemas/Flow.RSVP.PathExplicitRouteType1ASNumber' + x-field-uid: 3 + Flow.RSVP.PathExplicitRouteType1Ipv4Prefix: description: |- - Sets state of configured ISIS routers. - required: - - state + Class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Prefix, C-Type: 1 + type: object properties: - router_names: - description: | - The names of ISIS routers for which the state has to be applied. An empty or null list will control all ISIS routers. - - x-constraint: - - /components/schemas/Device.IsisRouter/properties/name - - - x-constraint: - - /components/schemas/Device.IsisRouter/properties/name - type: array - items: - type: string - x-constraint: - - /components/schemas/Device.IsisRouter/properties/name + l_bit: x-field-uid: 1 - state: - description: "The desired state of ISIS router. If the desired state is\ - \ 'up', would attempt to bring up the ISIS session(s) with respective\ - \ peer(s) and advertise route(s), if configured. If the desired state\ - \ is 'down', would bring down ISIS session(s) with respective peer(s). " - type: string + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathExplicitRouteType1Ipv4Prefix.LBit' + length: + description: |- + The Length contains the total length of the subobject in bytes,including L,Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. + $ref: '#/components/schemas/Flow.RSVPExplicitRoute.Length' x-field-uid: 2 - x-enum: - up: - x-field-uid: 1 - down: - x-field-uid: 2 - enum: - - up - - down - Control.Action: + ipv4_address: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathExplicitRouteType1Ipv4Prefix.Ipv4Address' + prefix: + description: |- + The prefix length of the IPv4 address. + type: integer + format: uint32 + minimum: 1 + maximum: 32 + default: 32 + x-field-uid: 4 + Flow.RSVP.PathExplicitRouteType1ASNumber: description: |- - Request for triggering action against configured resources. + Class = EXPLICIT_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Autonomous system number, C-Type: 32 type: object - required: - - choice properties: - choice: - type: string - x-enum: - protocol: - x-field-uid: 1 + l_bit: x-field-uid: 1 - enum: - - protocol - protocol: - $ref: '#/components/schemas/Action.Protocol' - x-field-uid: 2 - Control.Action.Response: - description: |- - Response for action triggered against configured resources along with warnings. - type: object - properties: - warnings: + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathExplicitRouteType1ASNumber.LBit' + length: description: |- - List of warnings generated while triggering specified action - type: array - items: - type: string - x-field-uid: 1 - response: - $ref: '#/components/schemas/Action.Response' + The Length contains the total length of the subobject in bytes,including L, Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. + $ref: '#/components/schemas/Flow.RSVPExplicitRouteASNumber.Length' x-field-uid: 2 - Action.Response: - description: |- - Response for action triggered against configured resources. + as_number: + description: |- + Autonomous System number to be set in the ERO sub-object that this LSP should traverse through. This field is applicable only if the value of 'type' is set to 'as_number'. + type: integer + format: uint32 + default: 0 + maximum: 65535 + x-field-uid: 3 + Flow.RSVPExplicitRoute.Length: type: object - required: - - choice properties: choice: + description: |- + auto or configured value. type: string - x-enum: - protocol: - x-field-uid: 1 + default: auto x-field-uid: 1 - enum: - - protocol - protocol: - $ref: '#/components/schemas/Action.Response.Protocol' - x-field-uid: 2 - Action.Protocol: - description: |- - Actions associated with protocols on configured resources. - type: object - required: - - choice - properties: - choice: - type: string x-enum: - ipv4: + auto: x-field-uid: 1 - ipv6: + value: x-field-uid: 2 - bgp: - x-field-uid: 3 - x-field-uid: 1 enum: - - ipv4 - - ipv6 - - bgp - ipv4: - $ref: '#/components/schemas/Action.Protocol.Ipv4' + - auto + - value + auto: + description: "The OTG implementation will provide a system generated value\ + \ for this property. If the OTG implementation is unable to generate\ + \ a value the default value must be used. " + type: integer + format: uint32 + default: 8 x-field-uid: 2 - ipv6: - $ref: '#/components/schemas/Action.Protocol.Ipv6' + value: + type: integer + format: uint32 + maximum: 255 + default: 8 x-field-uid: 3 - bgp: - $ref: '#/components/schemas/Action.Protocol.Bgp' - x-field-uid: 4 - Action.Response.Protocol: - description: |- - Response for actions associated with protocols on configured resources. + Flow.RSVPExplicitRouteASNumber.Length: type: object - required: - - choice properties: choice: + description: |- + auto or configured value. type: string + default: auto + x-field-uid: 1 x-enum: - ipv4: + auto: x-field-uid: 1 - ipv6: + value: x-field-uid: 2 - x-field-uid: 1 enum: - - ipv4 - - ipv6 - ipv4: - $ref: '#/components/schemas/Action.Response.Protocol.Ipv4' + - auto + - value + auto: + description: "The OTG implementation will provide a system generated value\ + \ for this property. If the OTG implementation is unable to generate\ + \ a value the default value must be used. " + type: integer + format: uint32 + default: 4 x-field-uid: 2 - ipv6: - $ref: '#/components/schemas/Action.Response.Protocol.Ipv6' + value: + type: integer + format: uint32 + maximum: 255 + default: 4 x-field-uid: 3 - Action.Protocol.Ipv4: + Flow.RSVP.PathObjectsClassLabelRequest: description: |- - Actions associated with IPv4 on configured resources. + C-Type is specific to a class num. type: object - required: - - choice properties: - choice: - type: string - x-enum: - ping: - x-field-uid: 1 + length: + description: |- + A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. + $ref: '#/components/schemas/Flow.RSVPObject.Length' x-field-uid: 1 - enum: - - ping - ping: - $ref: '#/components/schemas/Action.Protocol.Ipv4.Ping' + c_type: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsLabelRequestCType' x-field-uid: 2 - Action.Response.Protocol.Ipv4: + Flow.RSVP.PathObjectsLabelRequestCType: description: |- - Response for actions associated with IPv4 on configured resources. + Object for LABEL_REQUEST class. Currently supported c-type is Without Label Range (1). type: object - required: - - choice properties: choice: type: string + x-field-uid: 1 + default: without_label_range x-enum: - ping: + without_label_range: x-field-uid: 1 - x-field-uid: 1 enum: - - ping - ping: - $ref: '#/components/schemas/Action.Response.Protocol.Ipv4.Ping' + - without_label_range + without_label_range: + $ref: '#/components/schemas/Flow.RSVP.PathLabelRequestWithoutLabelRange' x-field-uid: 2 - Action.Protocol.Ipv4.Ping: + Flow.RSVP.PathLabelRequestWithoutLabelRange: description: |- - Request for initiating ping between multiple source and destination pairs. + Class = LABEL_REQUEST, Without Label Range C-Type = 1 type: object properties: - requests: - description: |- - List of IPv4 ping requests. - type: array - items: - $ref: '#/components/schemas/Action.Protocol.Ipv4.PingRequest' + reserved: x-field-uid: 1 - Action.Protocol.Ipv4.PingRequest: + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathLabelRequestWithoutLabelRange.Reserved' + l3pid: + x-field-uid: 2 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathLabelRequestWithoutLabelRange.L3pid' + Flow.RSVP.PathObjectsClassSessionAttribute: description: |- - Under Review: Most ping request parameters are still TBD. - - Under Review: Most ping request parameters are still TBD. - - Request for initiating ping between a single source and destination pair. - For ping request, 1 IPv4 ICMP Echo Request shall be sent and wait for ping response to either succeed or time out. The API wait timeout for each request shall be 300ms. + C-Type is specific to a class num. type: object - x-status: - status: under_review - information: Most ping request parameters are still TBD. properties: - src_name: - description: | - Name of source IPv4 interface to be used. - - x-constraint: - - /components/schemas/Device.Ipv4/properties/name - - - x-constraint: - - /components/schemas/Device.Ipv4/properties/name - type: string - x-constraint: - - /components/schemas/Device.Ipv4/properties/name - x-field-uid: 1 - dst_ip: + length: description: |- - Destination IPv4 address to ping. - type: string - format: ipv4 + A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. + $ref: '#/components/schemas/Flow.RSVPObject.Length' + x-field-uid: 1 + c_type: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsSessionAttributeCType' x-field-uid: 2 - Action.Response.Protocol.Ipv4.Ping: + Flow.RSVP.PathObjectsSessionAttributeCType: description: |- - Response for ping initiated between multiple source and destination pairs. + Object for SESSION_ATTRIBUTE class. Currently supported c-type is LSP_Tunnel_RA (1) and LSP_Tunnel (7). type: object properties: - responses: - description: |- - List of responses for IPv4 ping responses. - type: array - items: - $ref: '#/components/schemas/Action.Response.Protocol.Ipv4.PingResponse' + choice: + type: string x-field-uid: 1 - Action.Response.Protocol.Ipv4.PingResponse: + default: lsp_tunnel + x-enum: + lsp_tunnel: + x-field-uid: 1 + lsp_tunnel_ra: + x-field-uid: 2 + enum: + - lsp_tunnel + - lsp_tunnel_ra + lsp_tunnel: + $ref: '#/components/schemas/Flow.RSVP.PathSessionAttributeLspTunnel' + x-field-uid: 2 + lsp_tunnel_ra: + $ref: '#/components/schemas/Flow.RSVP.PathSessionAttributeLspTunnelRa' + x-field-uid: 3 + Flow.RSVP.PathSessionAttributeLspTunnel: description: |- - Response for ping initiated between a single source and destination pair. + SESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 7, resource affinity information. type: object - required: - - src_name - - dst_ip - - result properties: - src_name: - description: | - Name of source IPv4 interface used for ping. - - x-constraint: - - /components/schemas/Device.Ipv4/properties/name - - - x-constraint: - - /components/schemas/Device.Ipv4/properties/name - type: string - x-constraint: - - /components/schemas/Device.Ipv4/properties/name + setup_priority: + description: |- + The priority of the session with respect to taking resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. + type: integer + format: uint32 + default: 7 + maximum: 7 x-field-uid: 1 - dst_ip: + holding_priority: description: |- - Destination IPv4 address used for ping. - type: string - format: ipv4 + The priority of the session with respect to holding resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. + type: integer + format: uint32 + default: 7 + maximum: 7 x-field-uid: 2 - result: + flags: description: |- - Result of the ping request. + 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired + $ref: '#/components/schemas/Flow.RSVPLspTunnel.Flag' + x-field-uid: 3 + name_length: + description: "The length of the display string before padding, in bytes.\ + \ " + $ref: '#/components/schemas/Flow.RSVPSessionAttributeName.Length' + x-field-uid: 4 + session_name: + description: "A null padded string of characters. " + type: string + default: '' + minLength: 0 + maxLength: 254 + x-field-uid: 5 + Flow.RSVP.PathSessionAttributeLspTunnelRa: + description: |- + SESSION_ATTRIBUTE class = 207, LSP_TUNNEL_RA C-Type = 1, it carries resource affinity information. + type: object + properties: + exclude_any: + description: "A 32-bit vector representing a set of attribute filters associated\ + \ with a tunnel any of which renders a link unacceptable. A null set (all\ + \ bits set to zero) doesn't render the link unacceptable. The most significant\ + \ byte in the hex-string is the farthest to the left in the byte sequence.\ + \ Leading zero bytes in the configured value may be omitted for brevity.\ + \ " + type: string + format: hex + default: '00' + minLength: 0 + maxLength: 8 + x-field-uid: 1 + include_any: + description: "A 32-bit vector representing a set of attribute filters associated\ + \ with a tunnel any of which renders a link acceptable. A null set (all\ + \ bits set to zero) automatically passes. The most significant byte in\ + \ the hex-string is the farthest to the left in the byte sequence. Leading\ + \ zero bytes in the configured value may be omitted for brevity. " + type: string + format: hex + default: '00' + minLength: 0 + maxLength: 8 + x-field-uid: 2 + include_all: + description: "A 32-bit vector representing a set of attribute filters associated\ + \ with a tunnel all of which must be present for a link to be acceptable.\ + \ A null set (all bits set to zero) automatically passes. The most significant\ + \ byte in the hex-string is the farthest to the left in the byte sequence.\ + \ Leading zero bytes in the configured value may be omitted for brevity.\ + \ " type: string + format: hex + default: '00' + minLength: 0 + maxLength: 8 x-field-uid: 3 + setup_priority: + description: |- + The priority of the session with respect to taking resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. + type: integer + format: uint32 + default: 7 + maximum: 7 + x-field-uid: 4 + holding_priority: + description: |- + The priority of the session with respect to holding resources,in the range of 0 to 7. The value 0 is the highest priority. The Setup Priority is used in deciding whether this session can preempt another session. + type: integer + format: uint32 + default: 7 + maximum: 7 + x-field-uid: 5 + flags: + description: |- + 0x01 Local protection desired, 0x02 Label recording desired, 0x04 SE Style desired + $ref: '#/components/schemas/Flow.RSVPLspTunnel.Flag' + x-field-uid: 6 + name_length: + description: "The length of the display string before padding, in bytes.\ + \ " + $ref: '#/components/schemas/Flow.RSVPSessionAttributeName.Length' + x-field-uid: 7 + session_name: + description: "A null padded string of characters. " + type: string + default: '' + minLength: 0 + maxLength: 254 + x-field-uid: 8 + Flow.RSVPLspTunnel.Flag: + type: object + properties: + choice: + type: string + default: local_protection_desired x-enum: - succeeded: + local_protection_desired: x-field-uid: 1 - failed: + label_recording_desired: x-field-uid: 2 + se_style_desired: + x-field-uid: 3 + x-field-uid: 1 enum: - - succeeded - - failed - Action.Protocol.Ipv6: - description: |- - Actions associated with IPv6 on configured resources. + - local_protection_desired + - label_recording_desired + - se_style_desired + Flow.RSVPSessionAttributeName.Length: type: object - required: - - choice properties: choice: + description: |- + auto or configured value. type: string + default: auto + x-field-uid: 1 x-enum: - ping: + auto: x-field-uid: 1 - x-field-uid: 1 + value: + x-field-uid: 2 enum: - - ping - ping: - $ref: '#/components/schemas/Action.Protocol.Ipv6.Ping' + - auto + - value + auto: + description: |- + The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. + type: integer + format: uint32 + default: 0 x-field-uid: 2 - Action.Response.Protocol.Ipv6: + value: + type: integer + format: uint32 + maximum: 255 + default: 0 + x-field-uid: 3 + Flow.RSVP.PathObjectsClassSenderTemplate: description: |- - Response for actions associated with IPv6 on configured resources. + C-Type is specific to a class num. + type: object + properties: + length: + description: |- + A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. + $ref: '#/components/schemas/Flow.RSVPObject.Length' + x-field-uid: 1 + c_type: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsSenderTemplateCType' + x-field-uid: 2 + Flow.RSVP.PathObjectsSenderTemplateCType: + description: |- + Object for SENDER_TEMPLATE class. Currently supported c-type is LSP Tunnel IPv4 (7). type: object - required: - - choice properties: choice: type: string + x-field-uid: 1 + default: lsp_tunnel_ipv4 x-enum: - ping: + lsp_tunnel_ipv4: x-field-uid: 1 - x-field-uid: 1 enum: - - ping - ping: - $ref: '#/components/schemas/Action.Response.Protocol.Ipv6.Ping' + - lsp_tunnel_ipv4 + lsp_tunnel_ipv4: + $ref: '#/components/schemas/Flow.RSVP.PathSenderTemplateLspTunnelIpv4' x-field-uid: 2 - Action.Protocol.Ipv6.Ping: + Flow.RSVP.PathSenderTemplateLspTunnelIpv4: description: |- - Request for initiating ping between multiple source and destination pairs. + Class = SENDER_TEMPLATE, LSP_TUNNEL_IPv4 C-Type = 7 type: object properties: - requests: - description: |- - List of IPv6 ping requests. - type: array - items: - $ref: '#/components/schemas/Action.Protocol.Ipv6.PingRequest' + ipv4_tunnel_sender_address: x-field-uid: 1 - Action.Protocol.Ipv6.PingRequest: + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTemplateLspTunnelIpv4.Ipv4TunnelSenderAddress' + reserved: + x-field-uid: 2 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTemplateLspTunnelIpv4.Reserved' + lsp_id: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTemplateLspTunnelIpv4.LspId' + Flow.RSVP.PathObjectsClassSenderTspec: description: |- - Under Review: Most ping request parameters are still TBD. - - Under Review: Most ping request parameters are still TBD. - - Request for initiating ping between a single source and destination pair. - For ping request, 1 IPv6 ICMP Echo Request shall be sent and wait for ping response to either succeed or time out. The API wait timeout for each request shall be 300ms. + C-Type is specific to a class num. type: object - x-status: - status: under_review - information: Most ping request parameters are still TBD. properties: - src_name: - description: | - Name of source IPv6 interface to be used. - - x-constraint: - - /components/schemas/Device.Ipv6/properties/name - - - x-constraint: - - /components/schemas/Device.Ipv6/properties/name - type: string - x-constraint: - - /components/schemas/Device.Ipv6/properties/name - x-field-uid: 1 - dst_ip: - description: |- - Destination IPv6 address to ping. - type: string - format: ipv6 - x-field-uid: 2 - Action.Response.Protocol.Ipv6.Ping: - description: |- - Response for ping initiated between multiple source and destination pairs. - type: object - properties: - responses: + length: description: |- - List of responses for IPv6 ping responses. - type: array - items: - $ref: '#/components/schemas/Action.Response.Protocol.Ipv6.PingResponse' - x-field-uid: 1 - Action.Response.Protocol.Ipv6.PingResponse: - description: |- - Response for ping initiated between a single source and destination pair. - type: object - required: - - src_name - - dst_ip - - result - properties: - src_name: - description: | - Name of source IPv6 interface used for ping. - - x-constraint: - - /components/schemas/Device.Ipv6/properties/name - - - x-constraint: - - /components/schemas/Device.Ipv6/properties/name - type: string - x-constraint: - - /components/schemas/Device.Ipv6/properties/name + A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. + $ref: '#/components/schemas/Flow.RSVPObject.Length' x-field-uid: 1 - dst_ip: - description: |- - Destination IPv6 address used for ping. - type: string - format: ipv6 + c_type: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsSenderTspecCType' x-field-uid: 2 - result: - description: |- - Result of the ping request. - type: string - x-field-uid: 3 - x-enum: - succeeded: - x-field-uid: 1 - failed: - x-field-uid: 2 - enum: - - succeeded - - failed - Action.Protocol.Bgp: + Flow.RSVP.PathObjectsSenderTspecCType: description: |- - Actions associated with BGP on configured resources. + Object for SENDER_TSPEC class. Currently supported c-type is int-serv (2). type: object - required: - - choice properties: choice: type: string + x-field-uid: 1 + default: int_serv x-enum: - notification: + int_serv: x-field-uid: 1 - initiate_graceful_restart: - x-field-uid: 2 - x-field-uid: 1 enum: - - notification - - initiate_graceful_restart - notification: - $ref: '#/components/schemas/Action.Protocol.Bgp.Notification' + - int_serv + int_serv: + $ref: '#/components/schemas/Flow.RSVP.PathSenderTspecIntServ' x-field-uid: 2 - initiate_graceful_restart: - $ref: '#/components/schemas/Action.Protocol.Bgp.InitiateGracefulRestart' - x-field-uid: 3 - Action.Protocol.Bgp.Notification: - description: "A NOTIFICATION message is sent when an error is detected with\ - \ the BGP session, such as hold timer expiring, misconfigured AS number or\ - \ a BGP session reset is requested. This causes the BGP connection to close.\ - \ Send explicit NOTIFICATIONs for list of specified BGP peers. If a user\ - \ wants to send custom Error Code and Error Subcode the custom object should\ - \ be configured. A user can send IANA defined BGP NOTIFICATIONs according\ - \ to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. " + Flow.RSVP.PathSenderTspecIntServ: + description: |- + int-serv SENDER_TSPEC object: Class = 12, C-Type = 2 type: object properties: - names: - description: | - The names of BGP Peers to send NOTIFICATION to. If no name is specified then NOTIFICATION will be sent to all configured BGP peers. - - x-constraint: - - /components/schemas/Device.Bgp/properties/name - - - x-constraint: - - /components/schemas/Device.Bgp/properties/name - type: array - items: - type: string - x-constraint: - - /components/schemas/Device.Bgp/properties/name + version: x-field-uid: 1 - choice: - description: |- - Each BGP NOTIFICATION message includes an Error Code field indicating what type of problem occurred. For certain Error Codes, an Error Subcode field provides additional details about the specific nature of the problem. The choice value will provide the Error Code used in NOTIFICATION message. The Subcode can be set for each of the corresponding errors except for Hold Timer Expired error and BGP Finite State Machine error. In both of these cases Subcode 0 will be sent. If a user wants to use non zero Sub Code then custom choice can be used. - type: string + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.Version' + reserved1: x-field-uid: 2 - default: cease - x-enum: - cease: - x-field-uid: 1 - message_header_error: - x-field-uid: 2 - open_message_error: - x-field-uid: 3 - update_message_error: - x-field-uid: 4 - hold_timer_expired: - x-field-uid: 5 - finite_state_machine_error: - x-field-uid: 6 - custom: - x-field-uid: 7 - enum: - - cease - - message_header_error - - open_message_error - - update_message_error - - hold_timer_expired - - finite_state_machine_error - - custom - cease: - $ref: '#/components/schemas/Device.Bgp.CeaseError' + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.Reserved1' + overall_length: x-field-uid: 3 - message_header_error: - $ref: '#/components/schemas/Device.Bgp.MessageHeaderError' + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.OverallLength' + service_header: x-field-uid: 4 - open_message_error: - $ref: '#/components/schemas/Device.Bgp.OpenMessageError' + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.ServiceHeader' + zero_bit: x-field-uid: 5 - update_message_error: - $ref: '#/components/schemas/Device.Bgp.UpdateMessageError' + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.ZeroBit' + reserved2: x-field-uid: 6 - hold_timer_expired: - $ref: '#/components/schemas/Device.Bgp.HoldTimerExpired' + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.Reserved2' + length_of_service_data: x-field-uid: 7 - finite_state_machine_error: - $ref: '#/components/schemas/Device.Bgp.FiniteStateMachineError' + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.LengthOfServiceData' + parameter_id_token_bucket_tspec: x-field-uid: 8 - custom: - $ref: '#/components/schemas/Device.Bgp.CustomError' + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.ParameterIdTokenBucketTspec' + parameter_127_flag: x-field-uid: 9 - Action.Protocol.Bgp.InitiateGracefulRestart: + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.Parameter127Flag' + parameter_127_length: + x-field-uid: 10 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.Parameter127Length' + token_bucket_rate: + description: |- + Token bucket rate is set to sender's view of its generated traffic. + type: number + format: float + default: 0 + x-field-uid: 11 + token_bucket_size: + description: |- + Token bucket size is set to sender's view of its generated traffic. + type: number + format: float + default: 0 + x-field-uid: 12 + peak_data_rate: + description: |- + The peak rate may be set to the sender's peak traffic generation rate (if known and controlled), the physical interface line rate (if known), or positive infinity (if no better value is available). + type: number + format: float + default: 0 + x-field-uid: 13 + minimum_policed_unit: + x-field-uid: 14 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.MinimumPolicedUnit' + maximum_packet_size: + x-field-uid: 15 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathSenderTspecIntServ.MaximumPacketSize' + Flow.RSVP.PathObjectsClassRecordRoute: description: |- - Initiates BGP Graceful Restart process for the selected BGP peers. If no name is specified then Graceful Restart will be sent to all configured BGP peers. + C-Type is specific to a class num. type: object properties: - peer_names: - description: | - The names of device BGP peers objects to control. - - x-constraint: - - /components/schemas/Device.Bgp/properties/name - - - x-constraint: - - /components/schemas/Device.Bgp/properties/name - type: array - items: - type: string - x-constraint: - - /components/schemas/Device.Bgp/properties/name + length: + description: |- + A 16-bit field containing the total object length in bytes. Must always be a multiple of 4 or at least 4. + $ref: '#/components/schemas/Flow.RSVPObject.Length' x-field-uid: 1 - restart_delay: - description: "Duration (in seconds) after which selected BGP peers will\ - \ initiate \nGraceful restart by sending the Open Message with Restart\ - \ State bit set in the Graceful Restart capability." - type: integer - format: uint32 - maximum: 3600 - default: 30 + c_type: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsRecordRouteCType' x-field-uid: 2 - Metrics.Request: + Flow.RSVP.PathObjectsRecordRouteCType: description: |- - Request to traffic generator for metrics of choice. + Object for RECORD_ROUTE class. c-type is Type 1 Route Record (1). type: object properties: choice: type: string - default: port + default: type_1 x-field-uid: 1 x-enum: - port: + type_1: x-field-uid: 1 - flow: - x-field-uid: 2 - bgpv4: - x-field-uid: 3 - bgpv6: - x-field-uid: 4 - isis: - x-field-uid: 5 - lag: - x-field-uid: 6 - lacp: - x-field-uid: 7 - lldp: - x-field-uid: 8 - rsvp: - x-field-uid: 9 enum: - - port - - flow - - bgpv4 - - bgpv6 - - isis - - lag - - lacp - - lldp - - rsvp - port: - $ref: '#/components/schemas/Port.Metrics.Request' + - type_1 + type_1: + $ref: '#/components/schemas/Flow.RSVP.PathRecordRouteType1' x-field-uid: 2 - flow: - $ref: '#/components/schemas/Flow.Metrics.Request' - x-field-uid: 3 - bgpv4: - $ref: '#/components/schemas/Bgpv4.Metrics.Request' - x-field-uid: 4 - bgpv6: - $ref: '#/components/schemas/Bgpv6.Metrics.Request' - x-field-uid: 5 - isis: - $ref: '#/components/schemas/Isis.Metrics.Request' - x-field-uid: 6 - lag: - $ref: '#/components/schemas/Lag.Metrics.Request' - x-field-uid: 7 - lacp: - $ref: '#/components/schemas/Lacp.Metrics.Request' - x-field-uid: 8 - lldp: - $ref: '#/components/schemas/Lldp.Metrics.Request' - x-field-uid: 9 - rsvp: - $ref: '#/components/schemas/Rsvp.Metrics.Request' - x-field-uid: 10 - Metrics.Response: + Flow.RSVP.PathRecordRouteType1: description: |- - Response containing chosen traffic generator metrics. + Type1 record route has list of subobjects. Currently supported subobjects are IPv4 address(1) and Label(3). + type: object + properties: + subobjects: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/Flow.RSVP.Type1RecordRouteSubobjects' + x-field-uid: 1 + Flow.RSVP.Type1RecordRouteSubobjects: + description: |- + Type is specific to a subobject. + type: object + properties: + type: + $ref: '#/components/schemas/Flow.RSVP.PathObjectsRecordRouteSubObjectType' + x-field-uid: 1 + Flow.RSVP.PathObjectsRecordRouteSubObjectType: + description: |- + Currently supported subobjects are IPv4 address(1) and Label(3). type: object properties: choice: type: string - default: port_metrics x-field-uid: 1 + default: ipv4_address x-enum: - flow_metrics: + ipv4_address: x-field-uid: 1 - port_metrics: + label: x-field-uid: 2 - bgpv4_metrics: - x-field-uid: 3 - bgpv6_metrics: - x-field-uid: 4 - isis_metrics: - x-field-uid: 5 - lag_metrics: - x-field-uid: 6 - lacp_metrics: - x-field-uid: 7 - lldp_metrics: - x-field-uid: 8 - rsvp_metrics: - x-field-uid: 9 enum: - - flow_metrics - - port_metrics - - bgpv4_metrics - - bgpv6_metrics - - isis_metrics - - lag_metrics - - lacp_metrics - - lldp_metrics - - rsvp_metrics - port_metrics: - type: array - items: - $ref: '#/components/schemas/Port.Metric' + - ipv4_address + - label + ipv4_address: + $ref: '#/components/schemas/Flow.RSVP.PathRecordRouteType1Ipv4Address' x-field-uid: 2 - flow_metrics: - type: array - items: - $ref: '#/components/schemas/Flow.Metric' + label: + $ref: '#/components/schemas/Flow.RSVP.PathRecordRouteType1Label' x-field-uid: 3 - bgpv4_metrics: - type: array - items: - $ref: '#/components/schemas/Bgpv4.Metric' - x-field-uid: 4 - bgpv6_metrics: - type: array - items: - $ref: '#/components/schemas/Bgpv6.Metric' - x-field-uid: 5 - isis_metrics: - type: array - items: - $ref: '#/components/schemas/Isis.Metric' - x-field-uid: 6 - lag_metrics: - type: array - items: - $ref: '#/components/schemas/Lag.Metric' - x-field-uid: 7 - lacp_metrics: - type: array - items: - $ref: '#/components/schemas/Lacp.Metric' - x-field-uid: 8 - lldp_metrics: - type: array - items: - $ref: '#/components/schemas/Lldp.Metric' - x-field-uid: 9 - rsvp_metrics: - type: array - items: - $ref: '#/components/schemas/Rsvp.Metric' - x-field-uid: 10 - Port.Metrics.Request: + Flow.RSVP.PathRecordRouteType1Ipv4Address: description: |- - The port result request to the traffic generator + Class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: IPv4 Address, C-Type: 1 type: object properties: - port_names: - description: | - The names of objects to return results for. An empty list will return all port row results. - - x-constraint: - - /components/schemas/Port/properties/name - - - x-constraint: - - /components/schemas/Port/properties/name - type: array - items: - type: string - x-constraint: - - /components/schemas/Port/properties/name - x-field-uid: 1 - column_names: + length: description: |- - The list of column names that the returned result set will contain. If the list is empty then all columns will be returned. The name of the port cannot be excluded. - type: array - items: - type: string - x-enum: - transmit: - x-field-uid: 1 - location: - x-field-uid: 2 - link: - x-field-uid: 3 - capture: - x-field-uid: 4 - frames_tx: - x-field-uid: 5 - frames_rx: - x-field-uid: 6 - bytes_tx: - x-field-uid: 7 - bytes_rx: - x-field-uid: 8 - frames_tx_rate: - x-field-uid: 9 - frames_rx_rate: - x-field-uid: 10 - bytes_tx_rate: - x-field-uid: 11 - bytes_rx_rate: - x-field-uid: 12 - enum: - - transmit - - location - - link - - capture - - frames_tx - - frames_rx - - bytes_tx - - bytes_rx - - frames_tx_rate - - frames_rx_rate - - bytes_tx_rate - - bytes_rx_rate - x-field-uid: 2 - Port.Metric: - type: object - properties: - name: - description: | - The name of a configured port - - x-constraint: - - /components/schemas/Port/properties/name - - - x-constraint: - - /components/schemas/Port/properties/name - type: string - x-constraint: - - /components/schemas/Port/properties/name + The Length contains the total length of the subobject in bytes, including the Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. + $ref: '#/components/schemas/Flow.RSVPRouteRecord.Length' x-field-uid: 1 - location: - description: |- - The state of the connection to the test port location. The format should be the configured port location along with any custom connection state message. - type: string + ipv4_address: x-field-uid: 2 - link: + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathRecordRouteType1Ipv4Address.Ipv4Address' + prefix_length: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathRecordRouteType1Ipv4Address.PrefixLength' + flags: description: |- - The state of the test port link The string can be up, down or a custom error message. + 0x01 local_protection_available, 0x02 local_protection_in_use + $ref: '#/components/schemas/Flow.RSVPRecordRouteIPv4.Flag' + x-field-uid: 4 + Flow.RSVPRecordRouteIPv4.Flag: + type: object + properties: + choice: type: string - x-field-uid: 3 + default: local_protection_available x-enum: - up: + local_protection_available: x-field-uid: 1 - down: + local_protection_in_use: x-field-uid: 2 + x-field-uid: 1 enum: - - up - - down - capture: + - local_protection_available + - local_protection_in_use + Flow.RSVP.PathRecordRouteType1Label: + description: |- + Class = RECORD_ROUTE, Type1 ROUTE_RECORD C-Type = 1 Subobject: Label, C-Type: 3 + type: object + properties: + length: description: |- - The state of the test port capture infrastructure. The string can be started, stopped or a custom error message. + The Length contains the total length of the subobject in bytes, including the Type and Length fields. The Length MUST be atleast 4, and MUST be a multiple of 4. + $ref: '#/components/schemas/Flow.RSVPRouteRecord.Length' + x-field-uid: 1 + flags: + x-field-uid: 2 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathRecordRouteType1Label.Flags' + c_type: + x-field-uid: 3 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathRecordRouteType1Label.CType' + label: + description: |- + The contents of the Label Object. Copied from the Label Object. + $ref: '#/components/schemas/Flow.RSVP.PathRecordRouteLabel' + x-field-uid: 4 + Flow.RSVP.PathRecordRouteLabel: + type: object + properties: + choice: + description: |- + 32 bit integer or hex value. + type: string + default: as_integer + x-field-uid: 1 + x-enum: + as_integer: + x-field-uid: 1 + as_hex: + x-field-uid: 2 + enum: + - as_integer + - as_hex + as_integer: + type: integer + format: uint32 + default: 16 + maximum: 1048575 + x-field-uid: 2 + as_hex: + description: |- + Value of the this field should not excced 4 bytes. Maximum length of this attribute is 8 (4 * 2 hex character per byte). + type: string + format: hex + default: '10' + maxLength: 8 + x-field-uid: 3 + Flow.RSVPRouteRecord.Length: + type: object + properties: + choice: + description: |- + auto or configured value. + type: string + default: auto + x-field-uid: 1 + x-enum: + auto: + x-field-uid: 1 + value: + x-field-uid: 2 + enum: + - auto + - value + auto: + description: |- + The OTG implementation will provide a system generated value for this property. If the OTG implementation is unable to generate a value the default value must be used. + type: integer + format: uint32 + default: 8 + x-field-uid: 2 + value: + type: integer + format: uint32 + maximum: 255 + default: 8 + x-field-uid: 3 + Flow.RSVP.PathObjectsCustom: + type: object + description: |- + Custom packet header + properties: + type: + x-field-uid: 1 + $ref: '#/components/schemas/Pattern.Flow.RSVP.PathObjectsCustom.Type' + length: + $ref: '#/components/schemas/Flow.RSVPObject.Length' + x-field-uid: 2 + bytes: + description: |- + A custom packet header defined as a string of hex bytes. The string MUST contain sequence of valid hex bytes. Spaces or colons can be part of the bytes but will be discarded. Value of the this field should not excced 65525 bytes since maximum 65528 bytes can be added as object-contents in RSVP header. For type and length requires 3 bytes, hence maximum of 65524 bytes are expected. Maximum length of this attribute is 131050 (65525 * 2 hex character per byte). + type: string + format: hex + minLength: 1 + maxLength: 131050 + default: '0000' + x-field-uid: 3 + Flow.Size: + description: |- + The frame size which overrides the total length of the packet + type: object + properties: + choice: type: string + default: fixed + x-field-uid: 1 + x-enum: + fixed: + x-field-uid: 1 + increment: + x-field-uid: 2 + random: + x-field-uid: 3 + weight_pairs: + x-field-uid: 4 + enum: + - fixed + - increment + - random + - weight_pairs + fixed: + type: integer + format: uint32 + default: 64 + x-field-uid: 2 + increment: + $ref: '#/components/schemas/Flow.SizeIncrement' + x-field-uid: 3 + random: + $ref: '#/components/schemas/Flow.SizeRandom' x-field-uid: 4 + weight_pairs: + $ref: '#/components/schemas/Flow.SizeWeightPairs' + x-field-uid: 5 + Flow.SizeIncrement: + type: object + description: "Frame size that increments from a starting size to \nan ending\ + \ size incrementing by a step size." + properties: + start: + description: |- + Starting frame size in bytes + type: integer + format: uint32 + minimum: 1 + default: 64 + x-field-uid: 1 + end: + description: |- + Ending frame size in bytes + type: integer + format: uint32 + minimum: 64 + default: 1518 + x-field-uid: 2 + step: + description: |- + Step frame size in bytes + type: integer + format: uint32 + default: 1 + x-field-uid: 3 + Flow.SizeRandom: + type: object + description: |- + Random frame size from a min value to a max value. + properties: + min: + type: integer + format: uint32 + default: 64 + x-field-uid: 1 + max: + type: integer + format: uint32 + default: 1518 + x-field-uid: 2 + Flow.SizeWeightPairs: + type: object + description: "Frame size distribution, defined as pairs (including\ + \ IMIX distribution).\nFrames are randomly generated such that the proportion\ + \ of each frame size out of the total number of frames \nare matching with\ + \ the weight value of the pair. However, as with any other\ + \ probability \ndistribution, the sample distribution is close to theoretical\ + \ value only if the size of the sample is reasonably large. \nWhen the number\ + \ of frames is very low the transmitted frames may not come close to the ratio\ + \ described in the weight." + properties: + choice: + type: string + default: predefined + x-field-uid: 1 x-enum: - started: + predefined: x-field-uid: 1 - stopped: + custom: x-field-uid: 2 enum: - - started - - stopped - frames_tx: + - predefined + - custom + predefined: + type: string + default: imix + description: "Specify predefined frame size distribution \ + \ pairs (including IMIX distribution). \nThe available predefined distribution\ + \ pairs are:\n- IMIX (64:7, 570:4, and 1518:1) \n- IPSec IMIX (90:58.67,\ + \ 92:2, 594:23.66 and 1418:15.67) \n- IPv6 IMIX (60:58.67, 496:2, 594:23.66\ + \ and 1518:15.67) \n- Standard IMIX (58:58.67, 62:2, 594:23.66 and 1518:15.67)\ + \ \n- TCP IMIX (90:58.67, 92:2, 594:23.66 and 1518:15.67) " + x-field-uid: 2 + x-enum: + imix: + x-field-uid: 1 + ipsec_imix: + x-field-uid: 2 + ipv6_imix: + x-field-uid: 3 + standard_imix: + x-field-uid: 4 + tcp_imix: + x-field-uid: 5 + enum: + - imix + - ipsec_imix + - ipv6_imix + - standard_imix + - tcp_imix + custom: + type: array + items: + $ref: '#/components/schemas/Flow.SizeWeightPairs.Custom' + x-field-uid: 3 + Flow.SizeWeightPairs.Custom: + type: object + description: |- + Custom frame size distribution pair. + properties: + size: description: |- - The current total number of frames transmitted + The size of the frame (in bytes) for this weight pair. + type: integer + format: uint32 + minimum: 12 + maximum: 65535 + default: 64 + x-field-uid: 1 + weight: + description: "Weight assigned to the corresponding frame size in this weight\ + \ pair. \nHigher weight means more packets." + type: number + format: float + default: 1 + x-field-uid: 2 + Flow.Rate: + type: object + description: |- + The rate of packet transmission + properties: + choice: + description: |- + The available types of flow rate. + type: string + default: pps + x-field-uid: 1 + x-enum: + pps: + x-field-uid: 1 + bps: + x-field-uid: 2 + kbps: + x-field-uid: 3 + mbps: + x-field-uid: 4 + gbps: + x-field-uid: 5 + percentage: + x-field-uid: 6 + enum: + - pps + - bps + - kbps + - mbps + - gbps + - percentage + pps: + description: |- + Packets per second. + type: integer + format: uint64 + minimum: 1 + default: 1000 + x-field-uid: 2 + bps: + description: |- + Bits per second. + type: integer + format: uint64 + minimum: 672 + default: 1000000000 + x-field-uid: 3 + kbps: + description: |- + Kilobits per second. + type: integer + format: uint64 + minimum: 1 + default: 1000000 + x-field-uid: 4 + mbps: + description: "Megabits per second. " + type: integer + format: uint64 + minimum: 1 + default: 1000 + x-field-uid: 5 + gbps: + description: |- + Gigabits per second. + type: integer + format: uint32 + minimum: 1 + default: 1 + x-field-uid: 6 + percentage: + description: |- + The percentage of a port location's available bandwidth. + type: number + format: float + minimum: 0 + maximum: 100 + default: 100 + x-field-uid: 7 + Flow.Duration: + description: "A container for different transmit durations. " + type: object + properties: + choice: + description: |- + A choice used to determine the type of duration. + type: string + default: continuous + x-field-uid: 1 + x-enum: + fixed_packets: + x-field-uid: 1 + fixed_seconds: + x-field-uid: 2 + burst: + x-field-uid: 3 + continuous: + x-field-uid: 4 + enum: + - fixed_packets + - fixed_seconds + - burst + - continuous + fixed_packets: + $ref: '#/components/schemas/Flow.FixedPackets' + x-field-uid: 2 + fixed_seconds: + $ref: '#/components/schemas/Flow.FixedSeconds' + x-field-uid: 3 + burst: + $ref: '#/components/schemas/Flow.Burst' + x-field-uid: 4 + continuous: + $ref: '#/components/schemas/Flow.Continuous' + x-field-uid: 5 + Flow.Continuous: + description: "Transmit will be continuous and will not stop automatically. " + type: object + properties: + gap: + description: |- + The minimum gap between packets expressed as bytes. + type: integer + format: uint32 + default: 12 + x-field-uid: 1 + delay: + $ref: '#/components/schemas/Flow.Delay' + x-field-uid: 2 + Flow.Delay: + description: "The optional container to specify the delay before starting \n\ + transmission of packets." + type: object + properties: + choice: + type: string + default: bytes + x-field-uid: 1 + x-enum: + bytes: + x-field-uid: 1 + nanoseconds: + x-field-uid: 2 + microseconds: + x-field-uid: 3 + enum: + - bytes + - nanoseconds + - microseconds + bytes: + description: |- + The delay before starting transmission of packets. + A value of 0 indicates no delay. + type: number + format: float + minimum: 0 + default: 0 + x-field-uid: 2 + nanoseconds: + description: |- + The delay before starting transmission of packets. + A value of 0 indicates no delay. + type: number + format: float + minimum: 0 + default: 0 + x-field-uid: 3 + microseconds: + description: |- + The delay before starting transmission of packets. + A value of 0 indicates no delay. + type: number + format: float + minimum: 0 + default: 0 + x-field-uid: 4 + Flow.FixedPackets: + description: |- + Transmit a fixed number of packets after which the flow will stop. + type: object + properties: + packets: + description: |- + Stop transmit of the flow after this number of packets. + type: integer + format: uint32 + minimum: 1 + default: 1 + x-field-uid: 1 + gap: + description: |- + The minimum gap between packets expressed as bytes. + type: integer + format: uint32 + default: 12 + x-field-uid: 2 + delay: + $ref: '#/components/schemas/Flow.Delay' + x-field-uid: 3 + Flow.FixedSeconds: + description: |- + Transmit for a fixed number of seconds after which the flow will stop. + type: object + properties: + seconds: + description: |- + Stop transmit of the flow after this number of seconds. + type: number + minimum: 0 + default: 1 + x-field-uid: 1 + gap: + description: |- + The minimum gap between packets expressed as bytes. + type: integer + format: uint32 + default: 12 + x-field-uid: 2 + delay: + $ref: '#/components/schemas/Flow.Delay' + x-field-uid: 3 + Flow.Burst: + description: "Transmits continuous or fixed burst of packets. \nFor continuous\ + \ burst of packets, it will not automatically stop.\nFor fixed burst of packets,\ + \ it will stop after transmitting fixed number of bursts. " + type: object + properties: + bursts: + description: |- + The number of packet bursts transmitted per flow. + A value of 0 implies continuous burst of packets. + type: integer + format: uint32 + default: 0 + x-field-uid: 1 + packets: + description: |- + The number of packets transmitted per burst. + type: integer + format: uint32 + minimum: 1 + default: 1 + x-field-uid: 2 + gap: + description: |- + The minimum gap between packets expressed as bytes. + type: integer + format: uint32 + default: 12 + x-field-uid: 3 + inter_burst_gap: + $ref: '#/components/schemas/Flow.Duration.InterBurstGap' + x-field-uid: 4 + Flow.Duration.InterBurstGap: + type: object + description: |- + The optional container for specifying a gap between bursts. + properties: + choice: + description: |- + The type of inter burst gap units. + type: string + default: bytes + x-field-uid: 1 + x-enum: + bytes: + x-field-uid: 1 + nanoseconds: + x-field-uid: 2 + microseconds: + x-field-uid: 3 + enum: + - bytes + - nanoseconds + - microseconds + bytes: + description: |- + The amount of time between bursts expressed in bytes. + A value of 0 indicates no gap between bursts. + type: number + format: double + minimum: 0 + default: 12 + x-field-uid: 2 + nanoseconds: + description: |- + The amount of time between bursts expressed in nanoseconds. + A value of 0 indicates no gap between bursts. + type: number + format: double + minimum: 0 + default: 96 + x-field-uid: 3 + microseconds: + description: |- + The amount of time between bursts expressed in microseconds. + A value of 0 indicates no gap between bursts. + type: number + format: double + minimum: 0 + default: 0.096 + x-field-uid: 4 + Flow.Metrics: + description: |- + The optional container for configuring flow metrics. + type: object + properties: + enable: + description: "Enables flow metrics.\nEnabling this option may affect the\ + \ resultant packet payload due to \nadditional instrumentation data." + type: boolean + default: false + x-field-uid: 1 + loss: + description: |- + Enables additional flow metric loss calculation. + type: boolean + default: false + x-field-uid: 2 + rx_tx_ratio: + description: |- + Rx Tx ratio. + $ref: '#/components/schemas/Flow.RxTxRatio' + x-field-uid: 6 + timestamps: + description: |- + Enables additional flow metric first and last timestamps. + type: boolean + default: false + x-field-uid: 3 + latency: + description: |- + Latency metrics. + $ref: '#/components/schemas/Flow.Latency.Metrics' + x-field-uid: 4 + predefined_metric_tags: + description: |- + Predefined metric tags + $ref: '#/components/schemas/Flow.Predefined.Tags' + x-field-uid: 5 + Flow.Latency.Metrics: + description: |- + The optional container for per flow latency metric configuration. + type: object + properties: + enable: + description: "True to enable latency metrics using timestamps.\n\nEnabling\ + \ this option may affect the resultant packet payload due to \nadditional\ + \ instrumentation data." + type: boolean + default: false + x-field-uid: 1 + mode: + description: "Select the type of latency measurement. The different types\ + \ of \nlatency measurements are:\n\n\nstore_forward:\nThe time interval\ + \ starting when the last bit of the frame leaves the\nsending port and\ + \ ending when the first bit of the frame is seen on\nthe receiving port\ + \ (LIFO). This is based on the RFC 1242 standard.\n\n\ncut_through:\n\ + The time interval starting when the first bit of the frame leaves\nthe\ + \ sending port and ending when the first bit of the frame is seen\non\ + \ the receiving port (FIFO). This is based on the RFC 1242 \nstandard." + type: string + default: store_forward + x-field-uid: 2 + x-enum: + store_forward: + x-field-uid: 1 + cut_through: + x-field-uid: 2 + enum: + - store_forward + - cut_through + Flow.Predefined.Tags: + description: |- + List of predefined flow tracking options, outside packet fields, that can be enabled. + type: object + properties: + rx_name: + description: |- + Enables Rx port or lag level disaggregation with predefined metrics tag name set as "rx_name". + The Rx port / lag names can be found under tagged_metrics tag names in flow metrics response. + type: boolean + default: false + x-field-uid: 1 + Flow.RxTxRatio: + description: |- + Rx Tx ratio is the ratio of expected number of Rx packets across all Rx ports to the Tx packets + for the configured flow. It is a factor by which the Tx packet count is multiplied to calculate + the sum of expected Rx packet count, across all Rx ports. This will be used to calculate loss + percentage of flow at aggregate level. + type: object + properties: + choice: + type: string + default: value + x-field-uid: 1 + x-enum: + rx_count: + x-field-uid: 1 + value: + x-field-uid: 2 + enum: + - rx_count + - value + rx_count: + $ref: '#/components/schemas/Flow.RxTxRatio.RxCount' + x-field-uid: 2 + value: + description: |- + Should be a positive, non-zero value. The default value of 1, is when the Rx packet count across + all ports is expected to match the Tx packet count. A custom integer value (>1) can be specified for + loss calculation for cases when there are multiple destination addresses configured within one flow, + but DUT is configured to replicate only to a subset of Rx ports. For cases when Tx side generates two + packets from each source in 1:1 protection mode but only one of the two packets are received by the + Rx port, we may need to specify a fractional value instead. + type: number + format: float + default: 1.0 + x-field-uid: 3 + Flow.RxTxRatio.RxCount: + description: |- + This is for cases where one copy of Tx packet is received on all Rx ports and so the sum total of Rx packets + received across all Rx ports is a multiple of Rx port count and Tx packets. + Event: + description: |- + The optional container for event configuration. + type: object + properties: + enable: + description: "True to enable all events. \nEnabling this option may affect\ + \ the resultant packet payload due to \nadditional instrumentation data." + type: boolean + default: false + x-field-uid: 1 + link: + $ref: '#/components/schemas/Event.Link' + x-field-uid: 2 + rx_rate_threshold: + $ref: '#/components/schemas/Event.RxRateThreshold' + x-field-uid: 3 + route_advertise_withdraw: + $ref: '#/components/schemas/Event.RouteAdvertiseWithdraw' + x-field-uid: 4 + Event.RxRateThreshold: + description: |- + The optional container for rx rate threshold event configuration. + type: object + properties: + enable: + description: "True to enable the rx_rate_threshold event. \nEnabling this\ + \ option may affect the resultant packet payload due to \nadditional instrumentation\ + \ data." + type: boolean + default: false + x-field-uid: 1 + threshold: + description: "True to enable notifications when the rx rate of a flow passes\ + \ above \nor below the threshold value. " + type: number + format: float + maximum: 100 + minimum: 0 + default: 95 + x-field-uid: 2 + Event.Link: + description: |- + The optional container for link up/down event configuration. + type: object + properties: + enable: + description: "True to enable notifications when a link up/down event occurs. " + type: boolean + default: false + x-field-uid: 1 + Event.RouteAdvertiseWithdraw: + description: |- + The optional container for route advertise/withdraw event configuration. + type: object + properties: + enable: + description: "True to enable notifications when a route advertise/withdraw\ + \ \nevent occurs. " + type: boolean + default: false + x-field-uid: 1 + Event.Request: + type: object + properties: + type: + description: "Constrain the events being returned by specifying event types.\n\ + If the list is empty then all event types will be returned. " + type: array + items: + type: string + example: route_withdraw + x-enum: + link_down: + x-field-uid: 1 + link_up: + x-field-uid: 2 + route_withdraw: + x-field-uid: 3 + route_advertise: + x-field-uid: 4 + flow_rx_rate_above_threshold: + x-field-uid: 5 + flow_rx_rate_below_threshold: + x-field-uid: 6 + enum: + - link_down + - link_up + - route_withdraw + - route_advertise + - flow_rx_rate_above_threshold + - flow_rx_rate_below_threshold + x-field-uid: 1 + source: + description: "Constrain the events being returned by specifying event sources.\ + \ \nIf the list is empty then all event sources will be returned. \n\n\ + x-constraint:\n- /components/schemas/Port/properties/name\n- /components/schemas/Bgp.V4RouteRange/name\n\ + - /components/schemas/Bgp.V6RouteRange/name\n\n\nx-constraint:\n- /components/schemas/Port/properties/name\n\ + - /components/schemas/Bgp.V4RouteRange/name\n- /components/schemas/Bgp.V6RouteRange/name\n" + type: array + items: + type: string + x-constraint: + - /components/schemas/Port/properties/name + - /components/schemas/Bgp.V4RouteRange/name + - /components/schemas/Bgp.V6RouteRange/name + x-field-uid: 2 + Event.Subscription: + description: "A container that describes what events a system should provide\ + \ and \noptionally where to publish them. " + type: object + properties: + events: + $ref: '#/components/schemas/Event.Request' + x-field-uid: 1 + callback_url: + description: |- + Indicates where a client wants to be notified of the events set in + the events property. + If this property is empty or null then no event notifications will + be forwarded. + type: string + format: uri + example: https://127.0.0.1/event/notification + x-field-uid: 2 + Lldp: + description: |- + Configuration of LLDP protocol IEEE Ref: https://www.ieee802.org/1/files/public/docs2002/lldp-protocol-00.pdf + type: object + required: + - connection + - name + properties: + connection: + description: "The unique name of the object on which LLDP is running. " + $ref: '#/components/schemas/Lldp.Connection' + x-field-uid: 1 + chassis_id: + description: |- + The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. If mac address is specified it should be in colon seperated mac address format. + $ref: '#/components/schemas/Lldp.ChassisId' + x-field-uid: 2 + port_id: + description: |- + The Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater port, then this TLV is optional. + $ref: '#/components/schemas/Lldp.PortId' + x-field-uid: 3 + system_name: + description: |- + The system name field shall contain an alpha-numeric string that indicates the system's administratively assigned name. The system name should be the system's fully qualified domain name. If implementations support IETF RFC 3418, the sysName object should be used for this field. + $ref: '#/components/schemas/Lldp.SystemName' + x-field-uid: 4 + hold_time: + description: |- + Specifies the amount of time in seconds a receiving device should maintain LLDP information sent by the device before discarding it. + type: integer + format: uint32 + minimum: 10 + maximum: 65535 + default: 120 + x-field-uid: 5 + advertisement_interval: + description: |- + Set the transmission frequency of LLDP updates in seconds. + type: integer + format: uint32 + minimum: 5 + maximum: 65534 + default: 30 + x-field-uid: 6 + name: + x-field-uid: 7 + description: |- + Globally unique name of an object. It also serves as the primary key for arrays of objects. + type: string + pattern: ^[\sa-zA-Z0-9-_()><\[\]]+$ + x-unique: global + org_infos: + description: |- + The Organization Information is used to define the organization specific TLVs. The organization specific TLV is defined in IEEE 802.1AB-2016 specification. This category is provided to allow different organizations, such as IEEE 802.1, IEEE 802.3, IETF, as well as individual software and equipment vendors, to define TLVs that advertise information to remote entities attached to the same media. + type: array + items: + $ref: '#/components/schemas/Lldp.OrgInfo' + x-field-uid: 8 + Lldp.Connection: + description: "LLDP connection to a test port. In future if more connection options\ + \ arise LLDP connection object will be enhanced. " + type: object + properties: + choice: + description: |- + The name of the test port or other connection objects on which LLDP is configured. + type: string + x-field-uid: 1 + x-enum: + port_name: + x-field-uid: 1 + enum: + - port_name + port_name: + description: | + Name of the test port on which LLDP is configured on. + + x-constraint: + - /components/schemas/Port/properties/name + + + x-constraint: + - /components/schemas/Port/properties/name + type: string + x-constraint: + - /components/schemas/Port/properties/name + x-field-uid: 2 + Lldp.ChassisId: + description: |- + The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. This field identifies the format and source of the chassis identifier string. It is based on the enumerator defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. + type: object + properties: + choice: + description: |- + Chassis ID subtype to be used in Chassis ID TLV. + type: string + default: mac_address_subtype + x-field-uid: 1 + x-enum: + mac_address_subtype: + x-field-uid: 1 + interface_name_subtype: + x-field-uid: 2 + local_subtype: + x-field-uid: 3 + enum: + - mac_address_subtype + - interface_name_subtype + - local_subtype + mac_address_subtype: + $ref: '#/components/schemas/Lldp.ChassisMacSubType' + x-field-uid: 2 + interface_name_subtype: + description: |- + Name of an interface of the chassis that uniquely identifies the chassis. + type: string + x-field-uid: 3 + local_subtype: + description: |- + Locally assigned name of the chassis. + type: string + x-field-uid: 4 + Lldp.PortId: + description: |- + The Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent.This field identifies the format and source of the port identifier string. It is based on the enumerator defined by the PtopoPortIdType object from RFC2922. + type: object + properties: + choice: + description: |- + Port ID subtype to be used in Port ID TLV. + type: string + default: interface_name_subtype + x-field-uid: 1 + x-enum: + mac_address_subtype: + x-field-uid: 1 + interface_name_subtype: + x-field-uid: 2 + local_subtype: + x-field-uid: 3 + enum: + - mac_address_subtype + - interface_name_subtype + - local_subtype + mac_address_subtype: + description: |- + The MAC Address configured in the Port ID TLV. + type: string + x-field-uid: 2 + interface_name_subtype: + $ref: '#/components/schemas/Lldp.PortInterfaceNameSubType' + x-field-uid: 3 + local_subtype: + description: |- + The Locally assigned name configured in the Port ID TLV. + type: string + x-field-uid: 4 + Lldp.ChassisMacSubType: + description: "The MAC address configured in the Chassis ID TLV. " + type: object + properties: + choice: + description: |- + In auto mode the system generated value is set for this property, while if the choice is selected as value, a user configured value will be used for this property. + type: string + default: auto + x-field-uid: 1 + x-enum: + auto: + x-field-uid: 1 + value: + x-field-uid: 2 + enum: + - auto + - value + auto: + description: |- + The OTG implementation must provide a system generated value for this property. + type: string + format: mac + x-field-uid: 2 + value: + description: |- + User must specify a value if mode is not auto. + type: string + format: mac + x-field-uid: 3 + Lldp.PortInterfaceNameSubType: + description: "The interface name configured in the Port ID TLV. " + type: object + properties: + choice: + description: |- + In auto mode the system generated value is set for this property, while if the choice is selected as value, a user configured value will be used for this property. + type: string + default: auto + x-field-uid: 1 + x-enum: + auto: + x-field-uid: 1 + value: + x-field-uid: 2 + enum: + - auto + - value + auto: + description: |- + The OTG implementation must provide a system generated value for this property. + type: string + x-field-uid: 2 + value: + description: |- + User must specify a value if mode is not auto. + type: string + x-field-uid: 3 + Lldp.SystemName: + description: "The system Name configured in the System Name TLV. " + type: object + properties: + choice: + description: |- + In auto mode the system generated value is set for this property, while if the choice is selected as value, a user configured value will be used for this property. + type: string + default: auto + x-field-uid: 1 + x-enum: + auto: + x-field-uid: 1 + value: + x-field-uid: 2 + enum: + - auto + - value + auto: + description: |- + The OTG implementation must provide a system generated value for this property. + type: string + x-field-uid: 2 + value: + description: |- + User must specify a value if mode is not auto. + type: string + x-field-uid: 3 + Lldp.OrgInfo: + description: "The organization specific information configured in the Organization\ + \ Specific TLV. " + type: object + properties: + oui: + description: "The organizationally unique identifier field shall contain\ + \ the organization's OUI as defined in Clause 9 of IEEE Std 802. It is\ + \ a 24 bit number that uniquely identifies a vendor, manufacturer, or\ + \ other organizations. " + type: string + format: hex + maxLength: 6 + minLength: 6 + default: 0080C2 + x-field-uid: 1 + subtype: + description: |- + The organizationally defined subtype field shall contain a unique subtype value assigned by the defining organization. + type: integer + format: uint32 + minimum: 1 + maximum: 127 + default: 1 + x-field-uid: 2 + information: + description: |- + Contains the organizationally defined information. The actual format of the organizationally defined information string field is organizationally specific and can contain either binary or alpha-numeric information that is instance specific for the particular TLV type and subtype. Alpha-numeric information are encoded in UTF-8 (as specified in IETF RFC 3629). Or include one or more information fields with their associated field-type identifiers, designators similar to those in the Management Address TLV. + $ref: '#/components/schemas/Lldp.OrgInfoType' + x-field-uid: 3 + Lldp.OrgInfoType: + description: |- + Contains either the Alpha-numeric information encoded in UTF-8 (as specified in IETF RFC 3629) or include one or more information fields with their associated field-type identifiers designators, similar to those in the Management Address TLV. Currently only one choice as info is given in future if required it can be extended to define sub tlvs. + type: object + properties: + choice: + description: |- + In info mode the organizationally defined information contain either binary or alpha-numeric information encoded in UTF-8 (as specified in IETF RFC 3629). + type: string + default: info + x-field-uid: 1 + x-enum: + info: + x-field-uid: 1 + enum: + - info + info: + description: |- + The organizationally defined information encoded in UTF-8 (as specified in IETF RFC 3629). This byte stream can be of any length from 1 to 507 bytes. In the info byte stream, one byte is represented as string of 2 characters, for example 2 character string (0x)AB represents value of a single byte. So the maximum length of this attribute is 1014 (507 * 2 hex characters per byte). + type: string + format: hex + minLength: 1 + maxLength: 1014 + x-field-uid: 2 + Error: + description: |- + Error response generated while serving API request. + type: object + required: + - code + - errors + properties: + code: + description: |- + Numeric status code based on the underlying transport being used. + The API server MUST set this code explicitly based on following references: + - HTTP 4xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.5 + - HTTP 5xx errors: https://datatracker.ietf.org/doc/html/rfc9110#section-15.6 + - gRPC errors: https://grpc.github.io/grpc/core/md_doc_statuscodes.html + type: integer + format: int32 + x-field-uid: 1 + kind: + description: |- + Classification of error originating from within API server that may not be mapped to the value in `code`. + Absence of this field may indicate that the error did not originate from within API server. + type: string + x-enum: + validation: + x-field-uid: 1 + internal: + x-field-uid: 2 + x-field-uid: 2 + enum: + - validation + - internal + errors: + description: |- + List of error messages generated while executing the request. + type: array + items: + type: string + x-field-uid: 3 + Warning: + description: |- + A list of warnings that have occurred while executing the request. + type: object + properties: + warnings: + description: "A list of any system specific warnings that have occurred\ + \ while \nexecuting the request." + type: array + items: + type: string + x-field-uid: 1 + Config.Update: + description: |- + Request for updating specific attributes of resources in traffic generator + type: object + properties: + choice: + type: string + x-enum: + flows: + x-field-uid: 1 + x-field-uid: 1 + enum: + - flows + flows: + $ref: '#/components/schemas/Flows.Update' + x-field-uid: 2 + Flows.Update: + description: |- + A container of flows with associated properties to be updated without affecting the flows current transmit state. + type: object + required: + - property_names + - flows + properties: + property_names: + description: |- + Flow properties to be updated without affecting the transmit state. + type: array + items: + type: string + x-enum: + rate: + x-field-uid: 1 + size: + x-field-uid: 2 + enum: + - rate + - size + x-field-uid: 1 + flows: + description: |- + The list of configured flows for which given property will be updated. + type: array + items: + $ref: '#/components/schemas/Flow' + x-field-uid: 2 + Control.State: + description: |- + Request for setting operational state of configured resources. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + port: + x-field-uid: 1 + protocol: + x-field-uid: 2 + traffic: + x-field-uid: 3 + x-field-uid: 1 + enum: + - port + - protocol + - traffic + port: + $ref: '#/components/schemas/State.Port' + x-field-uid: 2 + protocol: + $ref: '#/components/schemas/State.Protocol' + x-field-uid: 3 + traffic: + $ref: '#/components/schemas/State.Traffic' + x-field-uid: 4 + State.Port: + description: |- + States associated with configured ports. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + link: + x-field-uid: 1 + capture: + x-field-uid: 2 + x-field-uid: 1 + enum: + - link + - capture + link: + $ref: '#/components/schemas/State.Port.Link' + x-field-uid: 2 + capture: + $ref: '#/components/schemas/State.Port.Capture' + x-field-uid: 3 + State.Traffic: + description: |- + States associated with configured flows + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + flow_transmit: + x-field-uid: 1 + x-field-uid: 1 + enum: + - flow_transmit + flow_transmit: + $ref: '#/components/schemas/State.Traffic.FlowTransmit' + x-field-uid: 2 + State.Protocol: + description: |- + States associated with protocols on configured resources. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + all: + x-field-uid: 1 + route: + x-field-uid: 2 + lacp: + x-field-uid: 3 + bgp: + x-field-uid: 4 + isis: + x-field-uid: 5 + ospfv2: + x-field-uid: 6 + x-field-uid: 1 + enum: + - all + - route + - lacp + - bgp + - isis + - ospfv2 + all: + $ref: '#/components/schemas/State.Protocol.All' + x-field-uid: 2 + route: + $ref: '#/components/schemas/State.Protocol.Route' + x-field-uid: 3 + lacp: + $ref: '#/components/schemas/State.Protocol.Lacp' + x-field-uid: 4 + bgp: + $ref: '#/components/schemas/State.Protocol.Bgp' + x-field-uid: 5 + isis: + $ref: '#/components/schemas/State.Protocol.Isis' + x-field-uid: 6 + ospfv2: + $ref: '#/components/schemas/State.Protocol.Ospfv2' + x-field-uid: 7 + State.Port.Link: + description: |- + Sets the link of configured ports. + type: object + required: + - state + properties: + port_names: + description: | + The names of target ports. An empty or null list will target all ports. + + x-constraint: + - /components/schemas/Port/properties/name + + + x-constraint: + - /components/schemas/Port/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Port/properties/name + x-field-uid: 1 + state: + description: |- + The link state. + type: string + x-field-uid: 2 + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + enum: + - up + - down + State.Port.Capture: + description: |- + Sets the capture state of configured ports + type: object + required: + - state + properties: + port_names: + description: | + The names of ports to which the capture state will be applied to. If the list of port_names is empty or null the state will be applied to all configured ports. + If the list is not empty any port that is not included in the list of port_names MUST be ignored and not included in the state change. + + x-constraint: + - /components/schemas/Port/properties/name + + + x-constraint: + - /components/schemas/Port/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Port/properties/name + x-field-uid: 1 + state: + description: |- + The capture state. + type: string + x-field-uid: 2 + x-enum: + start: + x-field-uid: 1 + stop: + x-field-uid: 2 + enum: + - start + - stop + State.Traffic.FlowTransmit: + description: |- + Provides state control of flow transmission. + type: object + required: + - state + properties: + flow_names: + description: | + The names of flows to which the transmit state will be applied to. If the list of flow_names is empty or null the state will be applied to all configured flows. + If the list is not empty any flow that is not included in the list of flow_names MUST be ignored and not included in the state change. + + x-constraint: + - /components/schemas/Flow/properties/name + + + x-constraint: + - /components/schemas/Flow/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Flow/properties/name + x-field-uid: 1 + state: + description: |- + The transmit state. + If the value of the state property is 'start' then all flows defined by the 'flow_names' property will be started and the metric counters MUST be cleared prior to starting the flow(s). + If the value of the state property is 'stop' then all flows defined by the 'flow_names' property will be stopped and the metric counters MUST NOT be cleared. + If the value of the state property is 'pause' then all flows defined by the 'flow_names' property will be paused and the metric counters MUST NOT be cleared. + If the value of the state property is 'resume' then any paused flows defined by the 'flow_names' property will start transmit at the point at which they were paused. Any flow that is stopped will start transmit at the beginning of the flow. The flow(s) MUST NOT have their metric counters cleared. + type: string + x-field-uid: 2 + x-enum: + start: + x-field-uid: 1 + stop: + x-field-uid: 2 + pause: + x-field-uid: 3 + resume: + x-field-uid: 4 + enum: + - start + - stop + - pause + - resume + State.Protocol.All: + description: |- + Sets all configured protocols to `start` or `stop` state. + Setting protocol state to `start` shall be a no-op if preceding `set_config` API call was made with `config.options.protocol_options.auto_start_all` set to `true` or if all the configured protocols are already started. + type: object + required: + - state + properties: + state: + description: |- + Protocol states + type: string + x-field-uid: 1 + x-enum: + start: + x-field-uid: 1 + stop: + x-field-uid: 2 + enum: + - start + - stop + State.Protocol.Route: + description: |- + Sets the state of configured routes + type: object + required: + - state + properties: + names: + description: | + The names of device route objects to control. If no names are specified then all route objects that match the x-constraint will be affected. + + x-constraint: + - /components/schemas/Bgp.V4RouteRange/properties/name + - /components/schemas/Bgp.V6RouteRange/properties/name + - /components/schemas/Isis.V4RouteRange/properties/name + - /components/schemas/Isis.V6RouteRange/properties/name + - /components/schemas/Ospfv2.V4RouteRange/properties/name + + + x-constraint: + - /components/schemas/Bgp.V4RouteRange/properties/name + - /components/schemas/Bgp.V6RouteRange/properties/name + - /components/schemas/Isis.V4RouteRange/properties/name + - /components/schemas/Isis.V6RouteRange/properties/name + - /components/schemas/Ospfv2.V4RouteRange/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Bgp.V4RouteRange/properties/name + - /components/schemas/Bgp.V6RouteRange/properties/name + - /components/schemas/Isis.V4RouteRange/properties/name + - /components/schemas/Isis.V6RouteRange/properties/name + - /components/schemas/Ospfv2.V4RouteRange/properties/name + x-field-uid: 1 + state: + description: |- + Route states + type: string + x-field-uid: 2 + x-enum: + withdraw: + x-field-uid: 1 + advertise: + x-field-uid: 2 + enum: + - withdraw + - advertise + State.Protocol.Lacp: + description: |- + Sets state of configured LACP + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + admin: + x-field-uid: 1 + member_ports: + x-field-uid: 2 + x-field-uid: 1 + enum: + - admin + - member_ports + admin: + $ref: '#/components/schemas/State.Protocol.Lacp.Admin' + x-field-uid: 2 + member_ports: + $ref: '#/components/schemas/State.Protocol.Lacp.MemberPorts' + x-field-uid: 3 + State.Protocol.Lacp.Admin: + description: |- + Sets admin state of LACP configured on LAG members + required: + - state + properties: + lag_member_names: + description: | + The names of LAG members (ports) for which the state has to be applied. An empty or null list will control all LAG members. + + x-constraint: + - /components/schemas/Port/properties/name + + + x-constraint: + - /components/schemas/Port/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Port/properties/name + x-field-uid: 1 + state: + description: |- + The LACP Member admin state. 'up' will send LACPDUs with 'sync' flag set on selected member ports. 'down' will send LACPDUs with 'sync' flag unset on selected member ports. + type: string + x-field-uid: 2 + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + enum: + - up + - down + State.Protocol.Lacp.MemberPorts: + description: |- + Sets state of LACP member ports configured on LAG. + required: + - state + properties: + lag_member_names: + description: | + The names of LAG members (ports) for which the state has to be applied. An empty or null list will control all LAG members. + + x-constraint: + - /components/schemas/Port/properties/name + + + x-constraint: + - /components/schemas/Port/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Port/properties/name + x-field-uid: 1 + state: + description: |- + The desired LACP member port state. + type: string + x-field-uid: 2 + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + enum: + - up + - down + State.Protocol.Bgp: + description: |- + Sets state of configured BGP peers. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + peers: + x-field-uid: 1 + x-field-uid: 1 + enum: + - peers + peers: + $ref: '#/components/schemas/State.Protocol.Bgp.Peers' + x-field-uid: 2 + State.Protocol.Bgp.Peers: + description: |- + Sets state of configured BGP peers. + required: + - state + properties: + peer_names: + description: | + The names of BGP peers for which the state has to be applied. An empty or null list will control all BGP peers. + + x-constraint: + - /components/schemas/Bgp.V4Peer/properties/name + - /components/schemas/Bgp.V6Peer/properties/name + + + x-constraint: + - /components/schemas/Bgp.V4Peer/properties/name + - /components/schemas/Bgp.V6Peer/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Bgp.V4Peer/properties/name + - /components/schemas/Bgp.V6Peer/properties/name + x-field-uid: 1 + state: + description: "The desired state of BGP peer. If the desired state is 'up',\ + \ underlying IP interface(s) would be brought up automatically (if not\ + \ already up), would attempt to bring up the BGP session(s) and advertise\ + \ route(s), if configured. If the desired state is 'down', BGP session(s)\ + \ would be brought down. " + type: string + x-field-uid: 2 + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + enum: + - up + - down + State.Protocol.Isis: + description: |- + Sets state of configured ISIS routers. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + routers: + x-field-uid: 1 + x-field-uid: 1 + enum: + - routers + routers: + $ref: '#/components/schemas/State.Protocol.Isis.Routers' + x-field-uid: 2 + State.Protocol.Isis.Routers: + description: |- + Sets state of configured ISIS routers. + required: + - state + properties: + router_names: + description: | + The names of ISIS routers for which the state has to be applied. An empty or null list will control all ISIS routers. + + x-constraint: + - /components/schemas/Device.IsisRouter/properties/name + + + x-constraint: + - /components/schemas/Device.IsisRouter/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Device.IsisRouter/properties/name + x-field-uid: 1 + state: + description: "The desired state of ISIS router. If the desired state is\ + \ 'up', would attempt to bring up the ISIS session(s) with respective\ + \ peer(s) and advertise route(s), if configured. If the desired state\ + \ is 'down', would bring down ISIS session(s) with respective peer(s). " + type: string + x-field-uid: 2 + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + enum: + - up + - down + State.Protocol.Ospfv2: + description: |- + Sets state of configured OSPFv2 routers. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + routers: + x-field-uid: 1 + x-field-uid: 1 + enum: + - routers + routers: + $ref: '#/components/schemas/State.Protocol.Ospfv2.Routers' + x-field-uid: 2 + State.Protocol.Ospfv2.Routers: + description: |- + Sets state of configured OSPFv2 routers. + required: + - state + properties: + router_names: + description: | + The names of OSPFv2 routers for which the state has to be applied. An empty or null list will control all OSPFv2 routers. + + x-constraint: + - /components/schemas/Device.Ospfv2/properties/name + + + x-constraint: + - /components/schemas/Device.Ospfv2/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Device.Ospfv2/properties/name + x-field-uid: 1 + state: + description: "The desired state of OSPFv2 router. If the desired state is\ + \ 'up', would attempt to bring up the OSPFv2 session(s) with respective\ + \ peer(s) and advertise route(s), if configured. If the desired state\ + \ is 'down', would bring down OSPFv2 session(s) with respective peer(s). " + type: string + x-field-uid: 2 + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + enum: + - up + - down + Control.Action: + description: |- + Request for triggering action against configured resources. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + protocol: + x-field-uid: 1 + x-field-uid: 1 + enum: + - protocol + protocol: + $ref: '#/components/schemas/Action.Protocol' + x-field-uid: 2 + Control.Action.Response: + description: |- + Response for action triggered against configured resources along with warnings. + type: object + properties: + warnings: + description: |- + List of warnings generated while triggering specified action + type: array + items: + type: string + x-field-uid: 1 + response: + $ref: '#/components/schemas/Action.Response' + x-field-uid: 2 + Action.Response: + description: |- + Response for action triggered against configured resources. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + protocol: + x-field-uid: 1 + x-field-uid: 1 + enum: + - protocol + protocol: + $ref: '#/components/schemas/Action.Response.Protocol' + x-field-uid: 2 + Action.Protocol: + description: |- + Actions associated with protocols on configured resources. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + ipv4: + x-field-uid: 1 + ipv6: + x-field-uid: 2 + bgp: + x-field-uid: 3 + x-field-uid: 1 + enum: + - ipv4 + - ipv6 + - bgp + ipv4: + $ref: '#/components/schemas/Action.Protocol.Ipv4' + x-field-uid: 2 + ipv6: + $ref: '#/components/schemas/Action.Protocol.Ipv6' + x-field-uid: 3 + bgp: + $ref: '#/components/schemas/Action.Protocol.Bgp' + x-field-uid: 4 + Action.Response.Protocol: + description: |- + Response for actions associated with protocols on configured resources. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + ipv4: + x-field-uid: 1 + ipv6: + x-field-uid: 2 + x-field-uid: 1 + enum: + - ipv4 + - ipv6 + ipv4: + $ref: '#/components/schemas/Action.Response.Protocol.Ipv4' + x-field-uid: 2 + ipv6: + $ref: '#/components/schemas/Action.Response.Protocol.Ipv6' + x-field-uid: 3 + Action.Protocol.Ipv4: + description: |- + Actions associated with IPv4 on configured resources. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + ping: + x-field-uid: 1 + x-field-uid: 1 + enum: + - ping + ping: + $ref: '#/components/schemas/Action.Protocol.Ipv4.Ping' + x-field-uid: 2 + Action.Response.Protocol.Ipv4: + description: |- + Response for actions associated with IPv4 on configured resources. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + ping: + x-field-uid: 1 + x-field-uid: 1 + enum: + - ping + ping: + $ref: '#/components/schemas/Action.Response.Protocol.Ipv4.Ping' + x-field-uid: 2 + Action.Protocol.Ipv4.Ping: + description: |- + Request for initiating ping between multiple source and destination pairs. + type: object + properties: + requests: + description: |- + List of IPv4 ping requests. + type: array + items: + $ref: '#/components/schemas/Action.Protocol.Ipv4.PingRequest' + x-field-uid: 1 + Action.Protocol.Ipv4.PingRequest: + description: |- + Under Review: Most ping request parameters are still TBD. + + Under Review: Most ping request parameters are still TBD. + + Request for initiating ping between a single source and destination pair. + For ping request, 1 IPv4 ICMP Echo Request shall be sent and wait for ping response to either succeed or time out. The API wait timeout for each request shall be 300ms. + type: object + x-status: + status: under_review + information: Most ping request parameters are still TBD. + properties: + src_name: + description: | + Name of source IPv4 interface to be used. + + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + + + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + type: string + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + x-field-uid: 1 + dst_ip: + description: |- + Destination IPv4 address to ping. + type: string + format: ipv4 + x-field-uid: 2 + Action.Response.Protocol.Ipv4.Ping: + description: |- + Response for ping initiated between multiple source and destination pairs. + type: object + properties: + responses: + description: |- + List of responses for IPv4 ping responses. + type: array + items: + $ref: '#/components/schemas/Action.Response.Protocol.Ipv4.PingResponse' + x-field-uid: 1 + Action.Response.Protocol.Ipv4.PingResponse: + description: |- + Response for ping initiated between a single source and destination pair. + type: object + required: + - src_name + - dst_ip + - result + properties: + src_name: + description: | + Name of source IPv4 interface used for ping. + + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + + + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + type: string + x-constraint: + - /components/schemas/Device.Ipv4/properties/name + x-field-uid: 1 + dst_ip: + description: |- + Destination IPv4 address used for ping. + type: string + format: ipv4 + x-field-uid: 2 + result: + description: |- + Result of the ping request. + type: string + x-field-uid: 3 + x-enum: + succeeded: + x-field-uid: 1 + failed: + x-field-uid: 2 + enum: + - succeeded + - failed + Action.Protocol.Ipv6: + description: |- + Actions associated with IPv6 on configured resources. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + ping: + x-field-uid: 1 + x-field-uid: 1 + enum: + - ping + ping: + $ref: '#/components/schemas/Action.Protocol.Ipv6.Ping' + x-field-uid: 2 + Action.Response.Protocol.Ipv6: + description: |- + Response for actions associated with IPv6 on configured resources. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + ping: + x-field-uid: 1 + x-field-uid: 1 + enum: + - ping + ping: + $ref: '#/components/schemas/Action.Response.Protocol.Ipv6.Ping' + x-field-uid: 2 + Action.Protocol.Ipv6.Ping: + description: |- + Request for initiating ping between multiple source and destination pairs. + type: object + properties: + requests: + description: |- + List of IPv6 ping requests. + type: array + items: + $ref: '#/components/schemas/Action.Protocol.Ipv6.PingRequest' + x-field-uid: 1 + Action.Protocol.Ipv6.PingRequest: + description: |- + Under Review: Most ping request parameters are still TBD. + + Under Review: Most ping request parameters are still TBD. + + Request for initiating ping between a single source and destination pair. + For ping request, 1 IPv6 ICMP Echo Request shall be sent and wait for ping response to either succeed or time out. The API wait timeout for each request shall be 300ms. + type: object + x-status: + status: under_review + information: Most ping request parameters are still TBD. + properties: + src_name: + description: | + Name of source IPv6 interface to be used. + + x-constraint: + - /components/schemas/Device.Ipv6/properties/name + + + x-constraint: + - /components/schemas/Device.Ipv6/properties/name + type: string + x-constraint: + - /components/schemas/Device.Ipv6/properties/name + x-field-uid: 1 + dst_ip: + description: |- + Destination IPv6 address to ping. + type: string + format: ipv6 + x-field-uid: 2 + Action.Response.Protocol.Ipv6.Ping: + description: |- + Response for ping initiated between multiple source and destination pairs. + type: object + properties: + responses: + description: |- + List of responses for IPv6 ping responses. + type: array + items: + $ref: '#/components/schemas/Action.Response.Protocol.Ipv6.PingResponse' + x-field-uid: 1 + Action.Response.Protocol.Ipv6.PingResponse: + description: |- + Response for ping initiated between a single source and destination pair. + type: object + required: + - src_name + - dst_ip + - result + properties: + src_name: + description: | + Name of source IPv6 interface used for ping. + + x-constraint: + - /components/schemas/Device.Ipv6/properties/name + + + x-constraint: + - /components/schemas/Device.Ipv6/properties/name + type: string + x-constraint: + - /components/schemas/Device.Ipv6/properties/name + x-field-uid: 1 + dst_ip: + description: |- + Destination IPv6 address used for ping. + type: string + format: ipv6 + x-field-uid: 2 + result: + description: |- + Result of the ping request. + type: string + x-field-uid: 3 + x-enum: + succeeded: + x-field-uid: 1 + failed: + x-field-uid: 2 + enum: + - succeeded + - failed + Action.Protocol.Bgp: + description: |- + Actions associated with BGP on configured resources. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + notification: + x-field-uid: 1 + initiate_graceful_restart: + x-field-uid: 2 + x-field-uid: 1 + enum: + - notification + - initiate_graceful_restart + notification: + $ref: '#/components/schemas/Action.Protocol.Bgp.Notification' + x-field-uid: 2 + initiate_graceful_restart: + $ref: '#/components/schemas/Action.Protocol.Bgp.InitiateGracefulRestart' + x-field-uid: 3 + Action.Protocol.Bgp.Notification: + description: "A NOTIFICATION message is sent when an error is detected with\ + \ the BGP session, such as hold timer expiring, misconfigured AS number or\ + \ a BGP session reset is requested. This causes the BGP connection to close.\ + \ Send explicit NOTIFICATIONs for list of specified BGP peers. If a user\ + \ wants to send custom Error Code and Error Subcode the custom object should\ + \ be configured. A user can send IANA defined BGP NOTIFICATIONs according\ + \ to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. " + type: object + properties: + names: + description: | + The names of BGP Peers to send NOTIFICATION to. If no name is specified then NOTIFICATION will be sent to all configured BGP peers. + + x-constraint: + - /components/schemas/Bgp.V4Peer/properties/name + - /components/schemas/Bgp.V6Peer/properties/name + + + x-constraint: + - /components/schemas/Bgp.V4Peer/properties/name + - /components/schemas/Bgp.V6Peer/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Bgp.V4Peer/properties/name + - /components/schemas/Bgp.V6Peer/properties/name + x-field-uid: 1 + choice: + description: |- + Each BGP NOTIFICATION message includes an Error Code field indicating what type of problem occurred. For certain Error Codes, an Error Subcode field provides additional details about the specific nature of the problem. The choice value will provide the Error Code used in NOTIFICATION message. The Subcode can be set for each of the corresponding errors except for Hold Timer Expired error and BGP Finite State Machine error. In both of these cases Subcode 0 will be sent. If a user wants to use non zero Sub Code then custom choice can be used. + type: string + x-field-uid: 2 + default: cease + x-enum: + cease: + x-field-uid: 1 + message_header_error: + x-field-uid: 2 + open_message_error: + x-field-uid: 3 + update_message_error: + x-field-uid: 4 + hold_timer_expired: + x-field-uid: 5 + finite_state_machine_error: + x-field-uid: 6 + custom: + x-field-uid: 7 + enum: + - cease + - message_header_error + - open_message_error + - update_message_error + - hold_timer_expired + - finite_state_machine_error + - custom + cease: + $ref: '#/components/schemas/Device.Bgp.CeaseError' + x-field-uid: 3 + message_header_error: + $ref: '#/components/schemas/Device.Bgp.MessageHeaderError' + x-field-uid: 4 + open_message_error: + $ref: '#/components/schemas/Device.Bgp.OpenMessageError' + x-field-uid: 5 + update_message_error: + $ref: '#/components/schemas/Device.Bgp.UpdateMessageError' + x-field-uid: 6 + hold_timer_expired: + $ref: '#/components/schemas/Device.Bgp.HoldTimerExpired' + x-field-uid: 7 + finite_state_machine_error: + $ref: '#/components/schemas/Device.Bgp.FiniteStateMachineError' + x-field-uid: 8 + custom: + $ref: '#/components/schemas/Device.Bgp.CustomError' + x-field-uid: 9 + Action.Protocol.Bgp.InitiateGracefulRestart: + description: |- + Initiates BGP Graceful Restart process for the selected BGP peers. If no name is specified then Graceful Restart will be sent to all configured BGP peers. To emulate scenarios where a peer sends a Notification and stops the session, an optional Notification object is included. If the remote peer and the local peer are both configured to perform Graceful Restart for Notification triggered session , this will result in Graceful Restart scenario to be triggered as per RFC8538. + type: object + properties: + peer_names: + description: | + The names of device BGP peers objects to control. + + x-constraint: + - /components/schemas/Bgp.V4Peer/properties/name + - /components/schemas/Bgp.V6Peer/properties/name + + + x-constraint: + - /components/schemas/Bgp.V4Peer/properties/name + - /components/schemas/Bgp.V6Peer/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Bgp.V4Peer/properties/name + - /components/schemas/Bgp.V6Peer/properties/name + x-field-uid: 1 + restart_delay: + description: "Duration (in seconds) after which selected BGP peers will\ + \ initiate \nGraceful restart by sending the Open Message with Restart\ + \ State bit set in the Graceful Restart capability." + type: integer + format: uint32 + maximum: 3600 + default: 30 + x-field-uid: 2 + notification: + description: |- + Send a Notification to the peer as per configured parameters when initially bringing down a session as per + configured parameters. + $ref: '#/components/schemas/Action.Protocol.BgpGracefulRestart.Notification' + x-field-uid: 3 + Action.Protocol.BgpGracefulRestart.Notification: + description: "Defines the explicit contents of the NOTIFICATION message to be\ + \ sent when executing InitiateGracefulRestart trigger. This causes the BGP\ + \ connection to close.If a user wants to send custom Error Code and Error\ + \ Subcode the custom object should be configured. A user can send IANA defined\ + \ BGP NOTIFICATIONs according to https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml. " + type: object + properties: + choice: + description: |- + Each BGP NOTIFICATION message includes an Error Code field indicating what type of problem occurred. For certain Error Codes, an Error Subcode field provides additional details about the specific nature of the problem. The choice value will provide the Error Code used in NOTIFICATION message. The Subcode can be set for each of the corresponding errors except for Hold Timer Expired error and BGP Finite State Machine error. In both of these cases Subcode 0 will be sent. If a user wants to use non zero Sub Code then custom choice can be used. + type: string + x-field-uid: 2 + default: cease + x-enum: + cease: + x-field-uid: 1 + message_header_error: + x-field-uid: 2 + open_message_error: + x-field-uid: 3 + update_message_error: + x-field-uid: 4 + hold_timer_expired: + x-field-uid: 5 + finite_state_machine_error: + x-field-uid: 6 + custom: + x-field-uid: 7 + enum: + - cease + - message_header_error + - open_message_error + - update_message_error + - hold_timer_expired + - finite_state_machine_error + - custom + cease: + $ref: '#/components/schemas/Device.Bgp.CeaseError' + x-field-uid: 3 + message_header_error: + $ref: '#/components/schemas/Device.Bgp.MessageHeaderError' + x-field-uid: 4 + open_message_error: + $ref: '#/components/schemas/Device.Bgp.OpenMessageError' + x-field-uid: 5 + update_message_error: + $ref: '#/components/schemas/Device.Bgp.UpdateMessageError' + x-field-uid: 6 + hold_timer_expired: + $ref: '#/components/schemas/Device.Bgp.HoldTimerExpired' + x-field-uid: 7 + finite_state_machine_error: + $ref: '#/components/schemas/Device.Bgp.FiniteStateMachineError' + x-field-uid: 8 + custom: + $ref: '#/components/schemas/Device.Bgp.CustomError' + x-field-uid: 9 + Metrics.Request: + description: |- + Request to traffic generator for metrics of choice. + type: object + properties: + choice: + type: string + default: port + x-field-uid: 1 + x-enum: + port: + x-field-uid: 1 + flow: + x-field-uid: 2 + bgpv4: + x-field-uid: 3 + bgpv6: + x-field-uid: 4 + isis: + x-field-uid: 5 + lag: + x-field-uid: 6 + lacp: + x-field-uid: 7 + lldp: + x-field-uid: 8 + rsvp: + x-field-uid: 9 + dhcpv4_client: + x-field-uid: 10 + dhcpv4_server: + x-field-uid: 11 + dhcpv6_client: + x-field-uid: 12 + dhcpv6_server: + x-field-uid: 13 + ospfv2: + x-field-uid: 14 + enum: + - port + - flow + - bgpv4 + - bgpv6 + - isis + - lag + - lacp + - lldp + - rsvp + - dhcpv4_client + - dhcpv4_server + - dhcpv6_client + - dhcpv6_server + - ospfv2 + port: + $ref: '#/components/schemas/Port.Metrics.Request' + x-field-uid: 2 + flow: + $ref: '#/components/schemas/Flow.Metrics.Request' + x-field-uid: 3 + bgpv4: + $ref: '#/components/schemas/Bgpv4.Metrics.Request' + x-field-uid: 4 + bgpv6: + $ref: '#/components/schemas/Bgpv6.Metrics.Request' + x-field-uid: 5 + isis: + $ref: '#/components/schemas/Isis.Metrics.Request' + x-field-uid: 6 + lag: + $ref: '#/components/schemas/Lag.Metrics.Request' + x-field-uid: 7 + lacp: + $ref: '#/components/schemas/Lacp.Metrics.Request' + x-field-uid: 8 + lldp: + $ref: '#/components/schemas/Lldp.Metrics.Request' + x-field-uid: 9 + rsvp: + $ref: '#/components/schemas/Rsvp.Metrics.Request' + x-field-uid: 10 + dhcpv4_client: + $ref: '#/components/schemas/Dhcpv4Client.Metrics.Request' + x-field-uid: 11 + dhcpv4_server: + $ref: '#/components/schemas/Dhcpv4Server.Metrics.Request' + x-field-uid: 12 + dhcpv6_client: + $ref: '#/components/schemas/Dhcpv6Client.Metrics.Request' + x-field-uid: 13 + dhcpv6_server: + $ref: '#/components/schemas/Dhcpv6Server.Metrics.Request' + x-field-uid: 14 + ospfv2: + $ref: '#/components/schemas/Ospfv2.Metrics.Request' + x-field-uid: 15 + Metrics.Response: + description: |- + Response containing chosen traffic generator metrics. + type: object + properties: + choice: + type: string + default: port_metrics + x-field-uid: 1 + x-enum: + flow_metrics: + x-field-uid: 1 + port_metrics: + x-field-uid: 2 + bgpv4_metrics: + x-field-uid: 3 + bgpv6_metrics: + x-field-uid: 4 + isis_metrics: + x-field-uid: 5 + lag_metrics: + x-field-uid: 6 + lacp_metrics: + x-field-uid: 7 + lldp_metrics: + x-field-uid: 8 + rsvp_metrics: + x-field-uid: 9 + dhcpv4_client: + x-field-uid: 10 + dhcpv4_server: + x-field-uid: 11 + dhcpv6_client: + x-field-uid: 12 + dhcpv6_server: + x-field-uid: 13 + ospfv2_metrics: + x-field-uid: 14 + enum: + - flow_metrics + - port_metrics + - bgpv4_metrics + - bgpv6_metrics + - isis_metrics + - lag_metrics + - lacp_metrics + - lldp_metrics + - rsvp_metrics + - dhcpv4_client + - dhcpv4_server + - dhcpv6_client + - dhcpv6_server + - ospfv2_metrics + port_metrics: + type: array + items: + $ref: '#/components/schemas/Port.Metric' + x-field-uid: 2 + flow_metrics: + type: array + items: + $ref: '#/components/schemas/Flow.Metric' + x-field-uid: 3 + bgpv4_metrics: + type: array + items: + $ref: '#/components/schemas/Bgpv4.Metric' + x-field-uid: 4 + bgpv6_metrics: + type: array + items: + $ref: '#/components/schemas/Bgpv6.Metric' + x-field-uid: 5 + isis_metrics: + type: array + items: + $ref: '#/components/schemas/Isis.Metric' + x-field-uid: 6 + lag_metrics: + type: array + items: + $ref: '#/components/schemas/Lag.Metric' + x-field-uid: 7 + lacp_metrics: + type: array + items: + $ref: '#/components/schemas/Lacp.Metric' + x-field-uid: 8 + lldp_metrics: + type: array + items: + $ref: '#/components/schemas/Lldp.Metric' + x-field-uid: 9 + rsvp_metrics: + type: array + items: + $ref: '#/components/schemas/Rsvp.Metric' + x-field-uid: 10 + dhcpv4client_metrics: + type: array + items: + $ref: '#/components/schemas/Dhcpv4Client.Metric' + x-field-uid: 11 + dhcpv4server_metrics: + type: array + items: + $ref: '#/components/schemas/Dhcpv4Server.Metric' + x-field-uid: 12 + dhcpv6client_metrics: + type: array + items: + $ref: '#/components/schemas/Dhcpv6Client.Metric' + x-field-uid: 13 + dhcpv6server_metrics: + type: array + items: + $ref: '#/components/schemas/Dhcpv6Server.Metric' + x-field-uid: 14 + ospfv2_metrics: + type: array + items: + $ref: '#/components/schemas/Ospfv2.Metric' + x-field-uid: 15 + Port.Metrics.Request: + description: |- + The port result request to the traffic generator + type: object + properties: + port_names: + description: | + The names of objects to return results for. An empty list will return all port row results. + + x-constraint: + - /components/schemas/Port/properties/name + + + x-constraint: + - /components/schemas/Port/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Port/properties/name + x-field-uid: 1 + column_names: + description: |- + The list of column names that the returned result set will contain. If the list is empty then all columns will be returned. The name of the port cannot be excluded. + type: array + items: + type: string + x-enum: + transmit: + x-field-uid: 1 + location: + x-field-uid: 2 + link: + x-field-uid: 3 + capture: + x-field-uid: 4 + frames_tx: + x-field-uid: 5 + frames_rx: + x-field-uid: 6 + bytes_tx: + x-field-uid: 7 + bytes_rx: + x-field-uid: 8 + frames_tx_rate: + x-field-uid: 9 + frames_rx_rate: + x-field-uid: 10 + bytes_tx_rate: + x-field-uid: 11 + bytes_rx_rate: + x-field-uid: 12 + enum: + - transmit + - location + - link + - capture + - frames_tx + - frames_rx + - bytes_tx + - bytes_rx + - frames_tx_rate + - frames_rx_rate + - bytes_tx_rate + - bytes_rx_rate + x-field-uid: 2 + Port.Metric: + type: object + properties: + name: + description: | + The name of a configured port + + x-constraint: + - /components/schemas/Port/properties/name + + + x-constraint: + - /components/schemas/Port/properties/name + type: string + x-constraint: + - /components/schemas/Port/properties/name + x-field-uid: 1 + location: + description: |- + The state of the connection to the test port location. The format should be the configured port location along with any custom connection state message. + type: string + x-field-uid: 2 + link: + description: |- + The state of the test port link The string can be up, down or a custom error message. + type: string + x-field-uid: 3 + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + enum: + - up + - down + capture: + description: |- + The state of the test port capture infrastructure. The string can be started, stopped or a custom error message. + type: string + x-field-uid: 4 + x-enum: + started: + x-field-uid: 1 + stopped: + x-field-uid: 2 + enum: + - started + - stopped + frames_tx: + description: |- + The current total number of frames transmitted + type: integer + format: uint64 + x-field-uid: 5 + frames_rx: + description: |- + The current total number of valid frames received + type: integer + format: uint64 + x-field-uid: 6 + bytes_tx: + description: |- + The current total number of bytes transmitted + type: integer + format: uint64 + x-field-uid: 7 + bytes_rx: + description: |- + The current total number of valid bytes received + type: integer + format: uint64 + x-field-uid: 8 + frames_tx_rate: + description: |- + The current rate of frames transmitted + type: number + x-field-uid: 9 + frames_rx_rate: + description: |- + The current rate of valid frames received + type: number + x-field-uid: 10 + bytes_tx_rate: + description: |- + The current rate of bytes transmitted + type: number + x-field-uid: 11 + bytes_rx_rate: + description: |- + The current rate of bytes received + type: number + x-field-uid: 12 + transmit: + description: |- + The transmit state of the flow. + type: string + x-field-uid: 13 + x-enum: + started: + x-field-uid: 1 + stopped: + x-field-uid: 2 + enum: + - started + - stopped + Flow.Metrics.Request: + description: |- + The container for a flow metric request. + type: object + properties: + flow_names: + description: | + Flow metrics will be retrieved for these flow names. + If no flow names are specified then all flows will be returned. + + x-constraint: + - /components/schemas/Flow/properties/name + + + x-constraint: + - /components/schemas/Flow/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Flow/properties/name + x-field-uid: 1 + metric_names: + description: |- + The list of metric names that the returned result set will contain. If the list is empty then all metrics will be returned. + type: array + items: + type: string + x-enum: + transmit: + x-field-uid: 1 + frames_tx: + x-field-uid: 2 + frames_rx: + x-field-uid: 3 + bytes_tx: + x-field-uid: 4 + bytes_rx: + x-field-uid: 5 + frames_tx_rate: + x-field-uid: 6 + frames_rx_rate: + x-field-uid: 7 + enum: + - transmit + - frames_tx + - frames_rx + - bytes_tx + - bytes_rx + - frames_tx_rate + - frames_rx_rate + x-field-uid: 3 + tagged_metrics: + $ref: '#/components/schemas/Flow.TaggedMetrics.Filter' + x-field-uid: 4 + Flow.TaggedMetrics.Filter: + description: |- + Filter for tagged metrics + type: object + properties: + include: + description: |- + Controls inclusion/exclusion of tagged metrics when fetching flow metrics. + type: boolean + default: true + x-field-uid: 1 + include_empty_metrics: + description: |- + Controls inclusion/exclusion of tagged metrics where each underlying attributes has zero value or absent value. + type: boolean + default: false + x-field-uid: 2 + metric_names: + description: |- + The list of metric names that the returned result set will contain. If the list is empty then all metrics will be returned. + type: array + items: + type: string + x-enum: + frames_tx: + x-field-uid: 1 + frames_rx: + x-field-uid: 2 + bytes_tx: + x-field-uid: 3 + bytes_rx: + x-field-uid: 4 + frames_tx_rate: + x-field-uid: 5 + frames_rx_rate: + x-field-uid: 6 + enum: + - frames_tx + - frames_rx + - bytes_tx + - bytes_rx + - frames_tx_rate + - frames_rx_rate + x-field-uid: 3 + filters: + description: |- + List of filters to selectively fetch tagged metrics with certain tag and corresponding value. + type: array + items: + $ref: '#/components/schemas/Flow.MetricTag.Filter' + x-field-uid: 4 + Flow.MetricTag.Filter: + description: |- + A container for filtering ingress and/or egress metric tags. + The Tx stats may not be applicable in both the request and response filter. + type: object + properties: + name: + description: |- + A metric tag name that MUST exist in a flow packet or + flow egress_packet configuration + type: string + x-field-uid: 1 + values: + description: |- + A list of filters that can be applied to the metric tag name. + By default all values will be included in the flow metric results. + type: array + items: + type: string + x-field-uid: 2 + Flow.Metric: + description: |- + A container for flow metrics. + The container is keyed by the name, port_tx and port_rx. + type: object + properties: + name: + description: |- + The name of the flow + type: string + example: Tx -> Rx + x-field-uid: 1 + port_tx: + description: |- + The name of the transmit port + type: string + x-field-uid: 2 + port_rx: + description: |- + The name of the receive port + type: string + x-field-uid: 3 + transmit: + description: |- + The transmit state of the flow. + type: string + x-field-uid: 5 + x-enum: + started: + x-field-uid: 1 + stopped: + x-field-uid: 2 + paused: + x-field-uid: 3 + enum: + - started + - stopped + - paused + frames_tx: + description: |- + The current total number of frames transmitted + type: integer + format: uint64 + x-field-uid: 6 + frames_rx: + description: |- + The current total number of valid frames received + type: integer + format: uint64 + x-field-uid: 7 + bytes_tx: + description: |- + The current total number of bytes transmitted + type: integer + format: uint64 + x-field-uid: 8 + bytes_rx: + description: |- + The current total number of bytes received + type: integer + format: uint64 + x-field-uid: 9 + frames_tx_rate: + description: |- + The current rate of frames transmitted + type: number + x-field-uid: 10 + frames_rx_rate: + description: |- + The current rate of valid frames received + type: number + x-field-uid: 11 + loss: + description: |- + The percentage of lost frames + type: number + x-field-uid: 12 + timestamps: + $ref: '#/components/schemas/Metric.Timestamp' + x-field-uid: 13 + latency: + $ref: '#/components/schemas/Metric.Latency' + x-field-uid: 14 + tagged_metrics: + description: |- + List of metrics corresponding to a set of values applicable + for configured metric tags in ingress or egress packet header fields of corresponding flow. + The container is keyed by list of tag-value pairs. + type: array + items: + $ref: '#/components/schemas/Flow.TaggedMetric' + x-field-uid: 15 + Flow.TaggedMetric: + description: |- + Metrics for each set of values applicable for configured + metric tags in ingress or egress packet header fields of corresponding flow. + The container is keyed by list of tag-value pairs. + type: object + properties: + tags: + description: |- + List of tag and value pairs + type: array + items: + $ref: '#/components/schemas/Flow.MetricTag' + x-field-uid: 1 + frames_tx: + description: |- + The current total number of frames transmitted + type: integer + format: uint64 + x-field-uid: 2 + frames_rx: + description: |- + The current total number of valid frames received + type: integer + format: uint64 + x-field-uid: 3 + bytes_tx: + description: |- + The current total number of bytes transmitted + type: integer + format: uint64 + x-field-uid: 4 + bytes_rx: + description: |- + The current total number of bytes received + type: integer + format: uint64 + x-field-uid: 5 + frames_tx_rate: + description: |- + The current rate of frames transmitted + type: number + x-field-uid: 6 + frames_rx_rate: + description: |- + The current rate of valid frames received + type: number + x-field-uid: 7 + loss: + description: |- + The percentage of lost frames + type: number + x-field-uid: 8 + timestamps: + $ref: '#/components/schemas/Metric.Timestamp' + x-field-uid: 9 + latency: + $ref: '#/components/schemas/Metric.Latency' + x-field-uid: 10 + Flow.MetricTag: + type: object + properties: + name: + description: |- + Name of packet field metric tag + type: string + x-field-uid: 1 + value: + $ref: '#/components/schemas/Flow.MetricTag.Value' + x-field-uid: 2 + Flow.MetricTag.Value: + description: |- + A container for metric tag value + type: object + properties: + choice: + description: |- + Available formats for metric tag value + type: string + default: hex + x-enum: + hex: + x-field-uid: 1 + str: + x-field-uid: 2 + x-field-uid: 1 + enum: + - hex + - str + hex: + description: |- + Value represented in hexadecimal format + type: string + format: hex + x-field-uid: 2 + str: + description: |- + Value represented in string format + type: string + x-field-uid: 3 + Metric.Timestamp: + description: |- + The container for timestamp metrics. + The container will be empty if the timestamp has not been configured for + the flow. + type: object + properties: + first_timestamp_ns: + description: |- + First timestamp in nanoseconds + type: number + format: double + x-field-uid: 1 + last_timestamp_ns: + description: |- + Last timestamp in nanoseconds + type: number + format: double + x-field-uid: 2 + Metric.Latency: + description: "The container for latency metrics. \nThe min/max/avg values are\ + \ dependent on the type of latency measurement \nmode that is configured.\n\ + The container will be empty if the latency has not been configured for\nthe\ + \ flow." + type: object + properties: + minimum_ns: + description: |- + Minimum latency in nanoseconds + type: number + format: double + x-field-uid: 1 + maximum_ns: + description: |- + Maximum latency in nanoseconds + type: number + format: double + x-field-uid: 2 + average_ns: + description: |- + Average latency in nanoseconds + type: number + format: double + x-field-uid: 3 + Bgpv4.Metrics.Request: + description: |- + The request to retrieve BGPv4 per peer metrics/statistics. + type: object + properties: + peer_names: + description: | + The names of BGPv4 peers to return results for. An empty list will return results for all BGPv4 peers. + + x-constraint: + - /components/schemas/Bgp.V4peer/properties/name + + + x-constraint: + - /components/schemas/Bgp.V4peer/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Bgp.V4peer/properties/name + x-field-uid: 1 + column_names: + description: |- + The list of column names that the returned result set will contain. If the list is empty then all columns will be returned except for any result_groups. The name of the BGPv4 peer cannot be excluded. + type: array + items: + type: string + x-enum: + session_state: + x-field-uid: 1 + session_flap_count: + x-field-uid: 2 + routes_advertised: + x-field-uid: 3 + routes_received: + x-field-uid: 4 + route_withdraws_sent: + x-field-uid: 5 + route_withdraws_received: + x-field-uid: 6 + updates_sent: + x-field-uid: 7 + updates_received: + x-field-uid: 8 + opens_sent: + x-field-uid: 9 + opens_received: + x-field-uid: 10 + keepalives_sent: + x-field-uid: 11 + keepalives_received: + x-field-uid: 12 + notifications_sent: + x-field-uid: 13 + notifications_received: + x-field-uid: 14 + fsm_state: + x-field-uid: 15 + end_of_rib_received: + x-field-uid: 16 + enum: + - session_state + - session_flap_count + - routes_advertised + - routes_received + - route_withdraws_sent + - route_withdraws_received + - updates_sent + - updates_received + - opens_sent + - opens_received + - keepalives_sent + - keepalives_received + - notifications_sent + - notifications_received + - fsm_state + - end_of_rib_received + x-field-uid: 2 + Bgpv4.Metric: + description: |- + BGPv4 per peer statistics information. + type: object + properties: + name: + description: |- + The name of a configured BGPv4 peer. + type: string + x-field-uid: 1 + session_state: + description: |- + Session state as up or down. Up refers to an Established state and Down refers to any other state. + type: string + x-field-uid: 2 + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + enum: + - up + - down + session_flap_count: + description: |- + Number of times the session went from Up to Down state. + type: integer + format: uint64 + x-field-uid: 3 + routes_advertised: + description: |- + Number of routes advertised. + type: integer + format: uint64 + x-field-uid: 4 + routes_received: + description: |- + Number of routes received. + type: integer + format: uint64 + x-field-uid: 5 + route_withdraws_sent: + description: |- + Number of route withdraws sent. + type: integer + format: uint64 + x-field-uid: 6 + route_withdraws_received: + description: |- + Number of route withdraws received. + type: integer + format: uint64 + x-field-uid: 7 + updates_sent: + description: |- + Number of Update messages sent. + type: integer + format: uint64 + x-field-uid: 8 + updates_received: + description: |- + Number of Update messages received. + type: integer + format: uint64 + x-field-uid: 9 + opens_sent: + description: |- + Number of Open messages sent. + type: integer + format: uint64 + x-field-uid: 10 + opens_received: + description: |- + Number of Open messages received. + type: integer + format: uint64 + x-field-uid: 11 + keepalives_sent: + description: |- + Number of Keepalive messages sent. + type: integer + format: uint64 + x-field-uid: 12 + keepalives_received: + description: |- + Number of Keepalive messages received. + type: integer + format: uint64 + x-field-uid: 13 + notifications_sent: + description: |- + Number of Notification messages sent. + type: integer + format: uint64 + x-field-uid: 14 + notifications_received: + description: |- + Number of Notification messages received. + type: integer + format: uint64 + x-field-uid: 15 + fsm_state: + description: |- + BGP peer FSM (Finite State Machine) state as Idle, Connect, Active, OpenSent, OpenConfirm and Established. In all the states except Established the BGP session is down. Idle refers to the Idle state of the FSM. Connect refers to the state where the session is waiting for the underlying transport session to be established. Active refers to the state where the session is awaiting for a connection from the remote peer. OpenSent refers to the state where the session is in the process of being established. The local system has sent an OPEN message. OpenConfirm refers to the state where the session is in the process of being established. The local system has sent and received an OPEN message and is awaiting a NOTIFICATION or KEEPALIVE message from remote peer. Established refers to the state where the BGP session with the peer is established. + type: string + x-field-uid: 16 + x-enum: + idle: + x-field-uid: 1 + connect: + x-field-uid: 2 + active: + x-field-uid: 3 + opensent: + x-field-uid: 4 + openconfirm: + x-field-uid: 5 + established: + x-field-uid: 6 + enum: + - idle + - connect + - active + - opensent + - openconfirm + - established + end_of_rib_received: + description: |- + Number of End-of-RIB markers received indicating the completion of the initial routing update for a particular address family after the session is established. For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with the minimum length. For any other address family, it is an UPDATE message that contains only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . + type: integer + format: uint64 + x-field-uid: 17 + Bgpv6.Metrics.Request: + description: |- + The request to retrieve BGPv6 per peer metrics/statistics. + type: object + properties: + peer_names: + description: | + The names of BGPv6 peers to return results for. An empty list will return results for all BGPv6 peers. + + x-constraint: + - /components/schemas/Bgp.V6peer/properties/name + + + x-constraint: + - /components/schemas/Bgp.V6peer/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Bgp.V6peer/properties/name + x-field-uid: 1 + column_names: + description: |- + The list of column names that the returned result set will contain. If the list is empty then all columns will be returned except for any result_groups. The name of the BGPv6 peer cannot be excluded. + type: array + items: + type: string + x-enum: + session_state: + x-field-uid: 1 + session_flap_count: + x-field-uid: 2 + routes_advertised: + x-field-uid: 3 + routes_received: + x-field-uid: 4 + route_withdraws_sent: + x-field-uid: 5 + route_withdraws_received: + x-field-uid: 6 + updates_sent: + x-field-uid: 7 + updates_received: + x-field-uid: 8 + opens_sent: + x-field-uid: 9 + opens_received: + x-field-uid: 10 + keepalives_sent: + x-field-uid: 11 + keepalives_received: + x-field-uid: 12 + notifications_sent: + x-field-uid: 13 + notifications_received: + x-field-uid: 14 + fsm_state: + x-field-uid: 15 + end_of_rib_received: + x-field-uid: 16 + enum: + - session_state + - session_flap_count + - routes_advertised + - routes_received + - route_withdraws_sent + - route_withdraws_received + - updates_sent + - updates_received + - opens_sent + - opens_received + - keepalives_sent + - keepalives_received + - notifications_sent + - notifications_received + - fsm_state + - end_of_rib_received + x-field-uid: 2 + Bgpv6.Metric: + description: |- + BGPv6 per peer statistics information. + type: object + properties: + name: + description: |- + The name of a configured BGPv6 peer. + type: string + x-field-uid: 1 + session_state: + description: |- + Session state as up or down. Up refers to an Established state and Down refers to any other state. + type: string + x-field-uid: 2 + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + enum: + - up + - down + session_flap_count: + description: |- + Number of times the session went from Up to Down state. + type: integer + format: uint64 + x-field-uid: 3 + routes_advertised: + description: |- + Number of routes advertised. + type: integer + format: uint64 + x-field-uid: 4 + routes_received: + description: |- + Number of routes received. + type: integer + format: uint64 + x-field-uid: 5 + route_withdraws_sent: + description: |- + Number of route withdraws sent. + type: integer + format: uint64 + x-field-uid: 6 + route_withdraws_received: + description: |- + Number of route withdraws received. + type: integer + format: uint64 + x-field-uid: 7 + updates_sent: + description: |- + Number of Update messages sent. + type: integer + format: uint64 + x-field-uid: 8 + updates_received: + description: |- + Number of Update messages received. + type: integer + format: uint64 + x-field-uid: 9 + opens_sent: + description: |- + Number of Open messages sent. + type: integer + format: uint64 + x-field-uid: 10 + opens_received: + description: |- + Number of Open messages received. + type: integer + format: uint64 + x-field-uid: 11 + keepalives_sent: + description: |- + Number of Keepalive messages sent. + type: integer + format: uint64 + x-field-uid: 12 + keepalives_received: + description: |- + Number of Keepalive messages received. + type: integer + format: uint64 + x-field-uid: 13 + notifications_sent: + description: |- + Number of Notification messages sent. + type: integer + format: uint64 + x-field-uid: 14 + notifications_received: + description: |- + Number of Notification messages received. + type: integer + format: uint64 + x-field-uid: 15 + fsm_state: + description: |- + BGP peer FSM (Finite State Machine) state as Idle, Connect, Active, OpenSent, OpenConfirm and Established. In all the states except Established the BGP session is down. Idle refers to the Idle state of the FSM. Connect refers to the state where the session is waiting for the underlying transport session to be established. Active refers to the state where the session is awaiting for a connection from the remote peer. OpenSent refers to the state where the session is in the process of being established. The local system has sent an OPEN message. OpenConfirm refers to the state where the session is in the process of being established. The local system has sent and received an OPEN message and is awaiting a NOTIFICATION or KEEPALIVE message from remote peer. Established refers to the state where the BGP session with the peer is established. + type: string + x-field-uid: 16 + x-enum: + idle: + x-field-uid: 1 + connect: + x-field-uid: 2 + active: + x-field-uid: 3 + opensent: + x-field-uid: 4 + openconfirm: + x-field-uid: 5 + established: + x-field-uid: 6 + enum: + - idle + - connect + - active + - opensent + - openconfirm + - established + end_of_rib_received: + description: |- + Number of End-of-RIB markers received indicating the completion of the initial routing update for a particular address family after the session is established. For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with the minimum length. For any other address family, it is an UPDATE message that contains only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . + type: integer + format: uint64 + x-field-uid: 17 + Isis.Metrics.Request: + description: |- + The request to retrieve ISIS per Router metrics/statistics. + type: object + properties: + router_names: + description: | + The names of ISIS Routers to return results for. An empty list will return results for all ISIS router. + + x-constraint: + - /components/schemas/Device.IsisRouter/properties/name + + + x-constraint: + - /components/schemas/Device.IsisRouter/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Device.IsisRouter/properties/name + x-field-uid: 1 + column_names: + description: |- + The list of column names that the returned result set will contain. If the list is empty then all columns will be returned except for any result_groups. The name of the ISIS Router cannot be excluded. + type: array + items: + type: string + x-enum: + l1_sessions_up: + x-field-uid: 1 + l1_session_flap: + x-field-uid: 2 + l1_database_size: + x-field-uid: 3 + l1_broadcast_hellos_sent: + x-field-uid: 4 + l1_broadcast_hellos_received: + x-field-uid: 5 + l1_point_to_point_hellos_sent: + x-field-uid: 6 + l1_point_to_point_hellos_received: + x-field-uid: 7 + l1_psnp_sent: + x-field-uid: 8 + l1_psnp_received: + x-field-uid: 9 + l1_csnp_sent: + x-field-uid: 10 + l1_csnp_received: + x-field-uid: 11 + l1_lsp_sent: + x-field-uid: 12 + l1_lsp_received: + x-field-uid: 13 + l2_sessions_up: + x-field-uid: 14 + l2_session_flap: + x-field-uid: 15 + l2_database_size: + x-field-uid: 16 + l2_broadcast_hellos_sent: + x-field-uid: 17 + l2_broadcast_hellos_received: + x-field-uid: 18 + l2_point_to_point_hellos_sent: + x-field-uid: 19 + l2_point_to_point_hellos_received: + x-field-uid: 20 + l2_psnp_sent: + x-field-uid: 21 + l2_psnp_received: + x-field-uid: 22 + l2_csnp_sent: + x-field-uid: 23 + l2_csnp_received: + x-field-uid: 24 + l2_lsp_sent: + x-field-uid: 25 + l2_lsp_received: + x-field-uid: 26 + enum: + - l1_sessions_up + - l1_session_flap + - l1_database_size + - l1_broadcast_hellos_sent + - l1_broadcast_hellos_received + - l1_point_to_point_hellos_sent + - l1_point_to_point_hellos_received + - l1_psnp_sent + - l1_psnp_received + - l1_csnp_sent + - l1_csnp_received + - l1_lsp_sent + - l1_lsp_received + - l2_sessions_up + - l2_session_flap + - l2_database_size + - l2_broadcast_hellos_sent + - l2_broadcast_hellos_received + - l2_point_to_point_hellos_sent + - l2_point_to_point_hellos_received + - l2_psnp_sent + - l2_psnp_received + - l2_csnp_sent + - l2_csnp_received + - l2_lsp_sent + - l2_lsp_received + x-field-uid: 2 + Isis.Metric: + description: |- + ISIS per router statistics information. + type: object + properties: + name: + description: |- + The name of a configured ISIS router. + type: string + x-field-uid: 1 + l1_sessions_up: + description: |- + The number of Level 1 (L1) sessions that are fully up. + type: integer + format: uint32 + x-field-uid: 2 + l1_session_flap: + description: |- + The number of Level 1 Sessions Flap. + type: integer + format: uint64 + x-field-uid: 3 + l1_broadcast_hellos_sent: + description: |- + Number of Level 1 Hello messages sent. + type: integer + format: uint64 + x-field-uid: 4 + l1_broadcast_hellos_received: + description: |- + Number of Level 1 Hello messages received. + type: integer + format: uint64 + x-field-uid: 5 + l1_point_to_point_hellos_sent: + description: |- + Number of Level 1 Point-to-Point(P2P) Hello messages sent. + type: integer + format: uint64 + x-field-uid: 6 + l1_point_to_point_hellos_received: + description: |- + Number of Level 1 Point-to-Point(P2P) Hello messages received. + type: integer + format: uint64 + x-field-uid: 7 + l1_database_size: + description: |- + Number of Link State Updates (LSPs) in the Level 1 LSP Databases. + type: integer + format: uint64 + x-field-uid: 8 + l1_psnp_sent: + description: |- + Number of Level 1 (L1) Partial Sequence Number Packet (PSNPs) sent. + type: integer + format: uint64 + x-field-uid: 9 + l1_psnp_received: + description: |- + Number of Level 1 (L1) Complete Sequence Number Packet (PSNPs) received. + type: integer + format: uint64 + x-field-uid: 10 + l1_csnp_sent: + description: |- + Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) sent. + type: integer + format: uint64 + x-field-uid: 11 + l1_csnp_received: + description: |- + Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) received. + type: integer + format: uint64 + x-field-uid: 12 + l1_lsp_sent: + description: |- + Number of Level 1 (L1) Link State Protocol Data Units (LSPs) sent. + type: integer + format: uint64 + x-field-uid: 13 + l1_lsp_received: + description: |- + Number of Level 1 (L1) Link State Protocol Data Units (LSPs) received. + type: integer + format: uint64 + x-field-uid: 14 + l2_sessions_up: + description: |- + The number of Level 2 (L2) sessions that are fully up. + type: integer + format: uint32 + x-field-uid: 15 + l2_session_flap: + description: |- + The number of Level 2 Sessions Flap. + type: integer + format: uint64 + x-field-uid: 16 + l2_broadcast_hellos_sent: + description: |- + Number of Level 2 Hello messages sent. + type: integer + format: uint64 + x-field-uid: 17 + l2_broadcast_hellos_received: + description: |- + Number of Level 2 Hello messages received. + type: integer + format: uint64 + x-field-uid: 18 + l2_point_to_point_hellos_sent: + description: |- + Number of Level 2 Point-to-Point(P2P) Hello messages sent. + type: integer + format: uint64 + x-field-uid: 19 + l2_point_to_point_hellos_received: + description: |- + Number of Level 2 Point-to-Point(P2P) Hello messages received. + type: integer + format: uint64 + x-field-uid: 20 + l2_database_size: + description: |- + Number of Link State Updates (LSPs) in the Level 2 LSP Databases. + type: integer + format: uint64 + x-field-uid: 21 + l2_psnp_sent: + description: |- + Number of Level 2 (L2) Partial Sequence Number Packet (PSNPs) sent. + type: integer + format: uint64 + x-field-uid: 22 + l2_psnp_received: + description: |- + Number of Level 2 (L2) Complete Sequence Number Packet (PSNPs) received. + type: integer + format: uint64 + x-field-uid: 23 + l2_csnp_sent: + description: |- + Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) sent. + type: integer + format: uint64 + x-field-uid: 24 + l2_csnp_received: + description: |- + Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) received. + type: integer + format: uint64 + x-field-uid: 25 + l2_lsp_sent: + description: |- + Number of Level 2 (L2) Link State Protocol Data Units (LSPs) sent. + type: integer + format: uint64 + x-field-uid: 26 + l2_lsp_received: + description: |- + Number of Level 2 (L2) Link State Protocol Data Units (LSPs) received. + type: integer + format: uint64 + x-field-uid: 27 + Lag.Metrics.Request: + description: |- + The request to retrieve per LAG metrics/statistics. + type: object + properties: + lag_names: + description: | + The names of LAGs to return results for. An empty list will return results for all LAGs. + + x-constraint: + - /components/schemas/Lag/properties/name + + + x-constraint: + - /components/schemas/Lag/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Lag/properties/name + x-field-uid: 1 + column_names: + description: |- + The list of column names that the returned result set will contain. If the list is empty then all columns will be returned. The name of the LAG cannot be excluded. + type: array + items: + type: string + x-enum: + oper_status: + x-field-uid: 1 + member_ports_up: + x-field-uid: 2 + frames_tx: + x-field-uid: 3 + frames_rx: + x-field-uid: 4 + bytes_tx: + x-field-uid: 5 + bytes_rx: + x-field-uid: 6 + frames_tx_rate: + x-field-uid: 7 + frames_rx_rate: + x-field-uid: 8 + bytes_tx_rate: + x-field-uid: 9 + bytes_rx_rate: + x-field-uid: 10 + enum: + - oper_status + - member_ports_up + - frames_tx + - frames_rx + - bytes_tx + - bytes_rx + - frames_tx_rate + - frames_rx_rate + - bytes_tx_rate + - bytes_rx_rate + x-field-uid: 2 + Lag.Metric: + type: object + properties: + name: + description: | + The name of a configured LAG + + x-constraint: + - /components/schemas/Lag/properties/name + + + x-constraint: + - /components/schemas/Lag/properties/name + type: string + x-constraint: + - /components/schemas/Lag/properties/name + x-field-uid: 1 + oper_status: + description: |- + The current operational state of the LAG. The state can be up or down. State 'up' indicates member_ports_up >= min_links. + type: string + x-field-uid: 2 + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + enum: + - up + - down + member_ports_up: + description: |- + The number of LAG member ports up. + type: integer + format: uint32 + x-field-uid: 3 + frames_tx: + description: |- + The current total number of frames transmitted. + type: integer + format: uint64 + x-field-uid: 4 + frames_rx: + description: |- + The current total number of valid frames received. + type: integer + format: uint64 + x-field-uid: 5 + bytes_tx: + description: |- + The current total number of bytes transmitted. + type: integer + format: uint64 + x-field-uid: 6 + bytes_rx: + description: |- + The current total number of valid bytes received. + type: integer + format: uint64 + minimum: 0 + x-field-uid: 7 + frames_tx_rate: + description: |- + The current rate of frames transmitted. + type: number + x-field-uid: 8 + frames_rx_rate: + description: |- + The current rate of valid frames received. + type: number + x-field-uid: 9 + bytes_tx_rate: + description: |- + The current rate of bytes transmitted. + type: number + x-field-uid: 10 + bytes_rx_rate: + description: |- + The current rate of bytes received. + type: number + x-field-uid: 11 + Lacp.Metrics.Request: + description: |- + The request to retrieve LACP per LAG member metrics/statistics. + type: object + properties: + lag_names: + description: | + The names of LAG (ports group) for which LACP metrics to be returned. An empty list will return metrics for all LAGs. + + x-constraint: + - /components/schemas/Lag/properties/name + + + x-constraint: + - /components/schemas/Lag/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Lag/properties/name + x-field-uid: 1 + lag_member_port_names: + description: | + The names of LAG members (ports) for which LACP metrics to be returned. An empty list will return metrics for all LAG members. + + x-constraint: + - /components/schemas/Port/properties/name + + + x-constraint: + - /components/schemas/Port/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Port/properties/name + x-field-uid: 2 + column_names: + description: |- + The list of column names that the returned result set will contain. If the list is empty then all columns will be returned. The name of LAG and LAG member can not be excluded. + type: array + items: + type: string + x-enum: + lacp_packets_rx: + x-field-uid: 1 + lacp_packets_tx: + x-field-uid: 2 + lacp_rx_errors: + x-field-uid: 3 + activity: + x-field-uid: 4 + timeout: + x-field-uid: 5 + synchronization: + x-field-uid: 6 + aggregatable: + x-field-uid: 7 + collecting: + x-field-uid: 8 + distributing: + x-field-uid: 9 + system_id: + x-field-uid: 10 + oper_key: + x-field-uid: 11 + partner_id: + x-field-uid: 12 + partner_key: + x-field-uid: 13 + port_num: + x-field-uid: 14 + partner_port_num: + x-field-uid: 15 + enum: + - lacp_packets_rx + - lacp_packets_tx + - lacp_rx_errors + - activity + - timeout + - synchronization + - aggregatable + - collecting + - distributing + - system_id + - oper_key + - partner_id + - partner_key + - port_num + - partner_port_num + x-field-uid: 3 + Lacp.Metric: + description: |- + LACP metrics (statistics) per LAG member. + type: object + properties: + lag_name: + description: |- + The name of a LAG (ports group) configured with LACP. + type: string + x-field-uid: 1 + lag_member_port_name: + description: |- + The name of a LAG member (port) configured with LACP. + type: string + x-field-uid: 2 + lacp_packets_rx: + description: |- + Number of LACPDUs received. + type: integer + format: uint64 + x-field-uid: 3 + lacp_packets_tx: + description: |- + Number of LACPDUs transmitted. + type: integer + format: uint64 + x-field-uid: 4 + lacp_rx_errors: + description: |- + Number of LACPDUs receive packet errors. + type: integer + format: uint64 + x-field-uid: 5 + activity: + description: |- + Indicates participant is active or passive. + type: string + x-field-uid: 6 + x-enum: + active: + x-field-uid: 1 + passive: + x-field-uid: 2 + enum: + - active + - passive + timeout: + description: |- + The timeout type (short or long) used by the participant. + type: string + x-field-uid: 7 + x-enum: + short: + x-field-uid: 1 + long: + x-field-uid: 2 + enum: + - short + - long + synchronization: + description: |- + Indicates whether the participant is in-sync or out-of-sync. + type: string + x-field-uid: 8 + x-enum: + in_sync: + x-field-uid: 1 + out_sync: + x-field-uid: 2 + enum: + - in_sync + - out_sync + aggregatable: + description: |- + A true value indicates that the participant will allow the link to be used as part of the aggregate. A false value indicates the link should be used as an individual link. + type: boolean + x-field-uid: 9 + collecting: + description: |- + If true, the participant is collecting incoming frames on the link, otherwise false. + type: boolean + x-field-uid: 10 + distributing: + description: |- + When true, the participant is distributing outgoing frames; when false, distribution is disabled. + type: boolean + x-field-uid: 11 + system_id: + description: |- + MAC address that defines the local system ID for the aggregate interface. + type: string + format: mac + x-field-uid: 12 + oper_key: + description: |- + Current operational value of the key for the aggregate interface. + type: integer + format: uint32 + x-field-uid: 13 + partner_id: + description: |- + MAC address representing the protocol partner's interface system ID. + type: string + format: mac + x-field-uid: 14 + partner_key: + description: |- + Operational value of the protocol partner's key. + type: integer + format: uint32 + x-field-uid: 15 + port_num: + description: |- + Port number of the local (actor) aggregation member. + type: integer + format: uint32 + x-field-uid: 16 + partner_port_num: + description: |- + Port number of the partner (remote) port for this member port. + type: integer + format: uint32 + x-field-uid: 17 + Lldp.Metrics.Request: + description: |- + The request to retrieve LLDP per instance metrics/statistics. + type: object + properties: + lldp_names: + description: | + The names of LLDP instances to return results for. An empty list will return results for all LLDP instances. + + x-constraint: + - /components/schemas/Lldp/properties/name + + + x-constraint: + - /components/schemas/Lldp/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Lldp/properties/name + x-field-uid: 1 + column_names: + description: |- + The requested list of column names for the result set. If the list is empty then metrics for all columns will be returned. The name of LLDP instance can not be excluded. + type: array + items: + type: string + x-enum: + frames_rx: + x-field-uid: 1 + frames_tx: + x-field-uid: 2 + frames_error_rx: + x-field-uid: 3 + frames_discard: + x-field-uid: 4 + tlvs_discard: + x-field-uid: 5 + tlvs_unknown: + x-field-uid: 6 + enum: + - frames_rx + - frames_tx + - frames_error_rx + - frames_discard + - tlvs_discard + - tlvs_unknown + x-field-uid: 2 + Lldp.Metric: + description: |- + LLDP per instance statistics information. + type: object + properties: + name: + description: |- + The name of the configured LLDP instance. + type: string + x-field-uid: 1 + frames_rx: + description: |- + Number of LLDP frames received. + type: integer + format: uint64 + x-field-uid: 2 + frames_tx: + description: |- + Number of LLDP frames transmitted. + type: integer + format: uint64 + x-field-uid: 3 + frames_error_rx: + description: |- + Number of LLDP frames received with packet errors. This stat should be incremented based on statsFramesInErrorsTotal increment rule in section 10.3.2 of IEEE Std 802.1 AB-2005. + type: integer + format: uint64 + x-field-uid: 4 + frames_discard: + description: |- + Number of LLDP frames received that are discarded. This stat should be incremented when one or more of the three mandatory TLVs at the beginning of the LLDPDU is missing, out of order or contains an out of range information string length. This stat should follow the validation rules in section 10.3.2 of IEEE Std 802.1 AB-2005. + type: integer + format: uint64 + x-field-uid: 5 + tlvs_discard: + description: |- + Number of LLDP tlvs received that are discarded. If any TLV contains an error condition specific for that particular TLV or if any TLV extends past the physical end of the frame then these TLVs will be discarded. + type: integer + format: uint64 + x-field-uid: 6 + tlvs_unknown: + description: |- + Number of LLDP unknown tlvs received. If the OUI of the organizationlly specific TLV and/or organizationally defined subtype are not recognized,or if TLV type value is in the range of reserved TLV types then these TLVs will be considered as unknown TLVs. + type: integer + format: uint64 + x-field-uid: 7 + Rsvp.Metrics.Request: + description: |- + The request to retrieve RSVP-TE per Router metrics/statistics. + type: object + properties: + router_names: + description: | + The names of RSVP-TE Routers to return results for. An empty list as input will return results for all RSVP-TE routers. + + x-constraint: + - /components/schemas/Device.Rsvp/properties/name + + + x-constraint: + - /components/schemas/Device.Rsvp/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Device.Rsvp/properties/name + x-field-uid: 1 + column_names: + description: "The list of column names that the returned result set will\ + \ contain. If the input list is empty then all columns will be returned\ + \ except for any result_groups. " + type: array + items: + type: string + x-enum: + ingress_p2p_lsps_configured: + x-field-uid: 1 + ingress_p2p_lsps_up: + x-field-uid: 2 + egress_p2p_lsps_up: + x-field-uid: 3 + lsp_flap_count: + x-field-uid: 4 + paths_tx: + x-field-uid: 5 + paths_rx: + x-field-uid: 6 + resvs_tx: + x-field-uid: 7 + resvs_rx: + x-field-uid: 8 + path_tears_tx: + x-field-uid: 9 + path_tears_rx: + x-field-uid: 10 + resv_tears_tx: + x-field-uid: 11 + resv_tears_rx: + x-field-uid: 12 + path_errors_tx: + x-field-uid: 13 + path_errors_rx: + x-field-uid: 14 + resv_errors_tx: + x-field-uid: 15 + resv_errors_rx: + x-field-uid: 16 + resv_conf_tx: + x-field-uid: 17 + resv_conf_rx: + x-field-uid: 18 + hellos_tx: + x-field-uid: 19 + hellos_rx: + x-field-uid: 20 + acks_tx: + x-field-uid: 21 + acks_rx: + x-field-uid: 22 + nacks_tx: + x-field-uid: 23 + nacks_rx: + x-field-uid: 24 + srefresh_tx: + x-field-uid: 25 + srefresh_rx: + x-field-uid: 26 + bundle_tx: + x-field-uid: 27 + bundle_rx: + x-field-uid: 28 + path_reevaluation_request_tx: + x-field-uid: 29 + path_reoptimizations: + x-field-uid: 30 + enum: + - ingress_p2p_lsps_configured + - ingress_p2p_lsps_up + - egress_p2p_lsps_up + - lsp_flap_count + - paths_tx + - paths_rx + - resvs_tx + - resvs_rx + - path_tears_tx + - path_tears_rx + - resv_tears_tx + - resv_tears_rx + - path_errors_tx + - path_errors_rx + - resv_errors_tx + - resv_errors_rx + - resv_conf_tx + - resv_conf_rx + - hellos_tx + - hellos_rx + - acks_tx + - acks_rx + - nacks_tx + - nacks_rx + - srefresh_tx + - srefresh_rx + - bundle_tx + - bundle_rx + - path_reevaluation_request_tx + - path_reoptimizations + x-field-uid: 2 + Rsvp.Metric: + description: |- + RSVP-TE per router statistics information. + type: object + properties: + name: + description: |- + The name of a configured RSVP router. + type: string + x-field-uid: 1 + ingress_p2p_lsps_configured: + description: |- + The number of ingress point-to-point LSPs configured or transiting through the RSVP router which have been initated from the test port. + type: integer + format: uint32 + x-field-uid: 2 + ingress_p2p_lsps_up: + description: "The number of ingress point-to-point LSPs for which Resv has\ + \ been received and is currently up. " + type: integer + format: uint32 + x-field-uid: 3 + egress_p2p_lsps_up: + description: |- + The number of egress point-to-point LSPs for which Path requests were successfully processed and is currently up. + type: integer + format: uint32 + x-field-uid: 4 + lsp_flap_count: + description: |- + The number of times an LSP went from up to down state either because it timed out while waiting for Refreshes or a PathTear or ResvTear message was received which caused the LSP to flap. + type: integer + format: uint64 + x-field-uid: 5 + paths_tx: + description: |- + The number of Path messages sent by this RSVP router. + type: integer + format: uint64 + x-field-uid: 6 + paths_rx: + description: |- + The number of Path messages received by this RSVP router. + type: integer + format: uint64 + x-field-uid: 7 + resvs_tx: + description: |- + The number of Resv messages sent by this RSVP router. + type: integer + format: uint64 + x-field-uid: 8 + resvs_rx: + description: |- + The number of Resv messages received by this RSVP router. + type: integer + format: uint64 + x-field-uid: 9 + path_tears_tx: + description: |- + The number of Path Tear messages sent by this RSVP router. + type: integer + format: uint64 + x-field-uid: 10 + path_tears_rx: + description: "The number of Path Tear messages received by this RSVP router. " + type: integer + format: uint64 + x-field-uid: 11 + resv_tears_tx: + description: |- + The number of Resv Tear messages sent by this RSVP router. + type: integer + format: uint64 + x-field-uid: 12 + resv_tears_rx: + description: "The number of Resv Tear messages received by this RSVP router. " + type: integer + format: uint64 + x-field-uid: 13 + path_errors_tx: + description: |- + The number of Path Error messages sent by this RSVP router. + type: integer + format: uint64 + x-field-uid: 14 + path_errors_rx: + description: "The number of Path Error messages received by this RSVP router. " + type: integer + format: uint64 + x-field-uid: 15 + resv_errors_tx: + description: |- + The number of Resv Error messages sent by this RSVP router. + type: integer + format: uint64 + x-field-uid: 16 + resv_errors_rx: + description: "The number of Resv Error messages received by this RSVP router. " + type: integer + format: uint64 + x-field-uid: 17 + resv_conf_tx: + description: |- + The number of ResvConf messages sent by this RSVP router. + type: integer + format: uint64 + x-field-uid: 18 + resv_conf_rx: + description: "The number of ResvConf messages received by this RSVP router. " + type: integer + format: uint64 + x-field-uid: 19 + hellos_tx: + description: |- + The number of Hello messages sent by this RSVP router. + type: integer + format: uint64 + x-field-uid: 20 + hellos_rx: + description: "The number of Hello messages received by this RSVP router. " + type: integer + format: uint64 + x-field-uid: 21 + acks_tx: + description: |- + The number of Ack messages sent by this RSVP router. + type: integer + format: uint64 + x-field-uid: 22 + acks_rx: + description: "The number of Ack messages received by this RSVP router. " + type: integer + format: uint64 + x-field-uid: 23 + nacks_tx: + description: |- + The number of Nack messages sent by this RSVP router. + type: integer + format: uint64 + x-field-uid: 24 + nacks_rx: + description: "The number of Nack messages received by this RSVP router. " + type: integer + format: uint64 + x-field-uid: 25 + srefresh_tx: + description: |- + The number of SRefresh messages sent by this RSVP router. + type: integer + format: uint64 + x-field-uid: 26 + srefresh_rx: + description: "The number of SRefresh messages received by this RSVP router. " type: integer format: uint64 - x-field-uid: 5 - frames_rx: + x-field-uid: 27 + bundle_tx: description: |- - The current total number of valid frames received + The number of Bundle messages sent by this RSVP router. type: integer format: uint64 - x-field-uid: 6 - bytes_tx: - description: |- - The current total number of bytes transmitted + x-field-uid: 28 + bundle_rx: + description: "The number of Bundle messages received by this RSVP router. " type: integer format: uint64 - x-field-uid: 7 - bytes_rx: + x-field-uid: 29 + path_reevaluation_request_tx: description: |- - The current total number of valid bytes received + The number of Path messages with Path Re-evaluation Request enabled sent by this RSVP router. type: integer format: uint64 - x-field-uid: 8 - frames_tx_rate: - description: |- - The current rate of frames transmitted - type: number - x-field-uid: 9 - frames_rx_rate: - description: |- - The current rate of valid frames received - type: number - x-field-uid: 10 - bytes_tx_rate: - description: |- - The current rate of bytes transmitted - type: number - x-field-uid: 11 - bytes_rx_rate: - description: |- - The current rate of bytes received - type: number - x-field-uid: 12 - transmit: + x-field-uid: 30 + path_reoptimizations: description: |- - The transmit state of the flow. - type: string - x-field-uid: 13 - x-enum: - started: - x-field-uid: 1 - stopped: - x-field-uid: 2 - enum: - - started - - stopped - Flow.Metrics.Request: + The number of successfully completed Make-Before-Break operations on LSPs on this RSVP router. + type: integer + format: uint64 + x-field-uid: 31 + Dhcpv4Client.Metrics.Request: description: |- - The container for a flow metric request. + The request to retrieve DHCPv4 per client metrics/statistics. type: object properties: - flow_names: + client_names: description: | - Flow metrics will be retrieved for these flow names. - If no flow names are specified then all flows will be returned. + The names of DHCPv4 clients to return results for. An empty list will return results for all DHCPv4 client. x-constraint: - - /components/schemas/Flow/properties/name + - /components/schemas/Device.Dhcpv4client/properties/name x-constraint: - - /components/schemas/Flow/properties/name + - /components/schemas/Device.Dhcpv4client/properties/name type: array items: type: string x-constraint: - - /components/schemas/Flow/properties/name + - /components/schemas/Device.Dhcpv4client/properties/name x-field-uid: 1 - metric_names: + column_names: description: |- - The list of metric names that the returned result set will contain. If the list is empty then all metrics will be returned. + The list of column names that the returned result set will contain. If the list is empty then all columns will be returned. The name of the DHCPv4 client cannot be excluded. type: array items: type: string x-enum: - transmit: + discovers_sent: x-field-uid: 1 - frames_tx: + offers_received: x-field-uid: 2 - frames_rx: + requests_sent: x-field-uid: 3 - bytes_tx: + acks_received: x-field-uid: 4 - bytes_rx: + nacks_received: x-field-uid: 5 - frames_tx_rate: + releases_sent: x-field-uid: 6 - frames_rx_rate: + declines_sent: x-field-uid: 7 enum: - - transmit - - frames_tx - - frames_rx - - bytes_tx - - bytes_rx - - frames_tx_rate - - frames_rx_rate - x-field-uid: 3 - tagged_metrics: - $ref: '#/components/schemas/Flow.TaggedMetrics.Filter' - x-field-uid: 4 - Flow.TaggedMetrics.Filter: - description: |- - Filter for tagged metrics - type: object - properties: - include: - description: |- - Controls inclusion/exclusion of tagged metrics when fetching flow metrics. - type: boolean - default: true - x-field-uid: 1 - include_empty_metrics: - description: |- - Controls inclusion/exclusion of tagged metrics where each underlying attributes has zero value or absent value. - type: boolean - default: false - x-field-uid: 2 - metric_names: - description: |- - The list of metric names that the returned result set will contain. If the list is empty then all metrics will be returned. - type: array - items: - type: string - x-enum: - frames_tx: - x-field-uid: 1 - frames_rx: - x-field-uid: 2 - bytes_tx: - x-field-uid: 3 - bytes_rx: - x-field-uid: 4 - frames_tx_rate: - x-field-uid: 5 - frames_rx_rate: - x-field-uid: 6 - enum: - - frames_tx - - frames_rx - - bytes_tx - - bytes_rx - - frames_tx_rate - - frames_rx_rate - x-field-uid: 3 - filters: - description: |- - List of filters to selectively fetch tagged metrics with certain tag and corresponding value. - type: array - items: - $ref: '#/components/schemas/Flow.MetricTag.Filter' - x-field-uid: 4 - Flow.MetricTag.Filter: - description: |- - A container for filtering ingress and/or egress metric tags. - The Tx stats may not be applicable in both the request and response filter. - type: object - properties: - name: - description: |- - A metric tag name that MUST exist in a flow packet or - flow egress_packet configuration - type: string - x-field-uid: 1 - values: - description: |- - A list of filters that can be applied to the metric tag name. - By default all values will be included in the flow metric results. - type: array - items: - type: string + - discovers_sent + - offers_received + - requests_sent + - acks_received + - nacks_received + - releases_sent + - declines_sent x-field-uid: 2 - Flow.Metric: + Dhcpv4Client.Metric: description: |- - A container for flow metrics. - The container is keyed by the name, port_tx and port_rx. + DHCPv4 per peer statistics information. type: object properties: name: description: |- - The name of the flow + The name of a configured DHCPv4 client. type: string - example: Tx -> Rx x-field-uid: 1 - port_tx: + discovers_sent: description: |- - The name of the transmit port - type: string + Number of DHCPDISCOVER messages sent. + type: integer + format: uint64 x-field-uid: 2 - port_rx: + offers_received: description: |- - The name of the receive port - type: string + Number of DHCPOFFER messages received. + type: integer + format: uint64 x-field-uid: 3 - transmit: + requests_sent: description: |- - The transmit state of the flow. - type: string + Number of DHCPREQUEST messages sent. + type: integer + format: uint64 + x-field-uid: 4 + acks_received: + description: |- + Number of lease DHCPACK messages received. + type: integer + format: uint64 x-field-uid: 5 - x-enum: - started: - x-field-uid: 1 - stopped: - x-field-uid: 2 - paused: - x-field-uid: 3 - enum: - - started - - stopped - - paused - frames_tx: + nacks_received: description: |- - The current total number of frames transmitted + Number of negative lease DHCPNACK messages received. type: integer format: uint64 x-field-uid: 6 - frames_rx: + releases_sent: description: |- - The current total number of valid frames received + Number of DHCPRELEASE messages sent. type: integer format: uint64 x-field-uid: 7 - bytes_tx: + declines_sent: description: |- - The current total number of bytes transmitted + Number of DHCPDECLINE messages sent. type: integer format: uint64 x-field-uid: 8 - bytes_rx: - description: |- - The current total number of bytes received - type: integer - format: uint64 - x-field-uid: 9 - frames_tx_rate: - description: |- - The current rate of frames transmitted - type: number - x-field-uid: 10 - frames_rx_rate: - description: |- - The current rate of valid frames received - type: number - x-field-uid: 11 - loss: - description: |- - The percentage of lost frames - type: number - x-field-uid: 12 - timestamps: - $ref: '#/components/schemas/Metric.Timestamp' - x-field-uid: 13 - latency: - $ref: '#/components/schemas/Metric.Latency' - x-field-uid: 14 - tagged_metrics: + Dhcpv4Server.Metrics.Request: + description: |- + The request to retrieve DHCPv4 per Server metrics/statistics. + type: object + properties: + server_names: + description: | + The names of DHCPv4 Servers to return results for. An empty list will return results for all DHCPv4 Server. + + x-constraint: + - /components/schemas/Device.Dhcpv4Server/properties/name + + + x-constraint: + - /components/schemas/Device.Dhcpv4Server/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Device.Dhcpv4Server/properties/name + x-field-uid: 1 + column_names: description: |- - List of metrics corresponding to a set of values applicable - for configured metric tags in ingress or egress packet header fields of corresponding flow. - The container is keyed by list of tag-value pairs. + The list of column names that the returned result set will contain. If the list is empty then all columns will be returned. The name of the DHCPv4 server cannot be excluded. type: array items: - $ref: '#/components/schemas/Flow.TaggedMetric' - x-field-uid: 15 - Flow.TaggedMetric: + type: string + x-enum: + discovers_received: + x-field-uid: 1 + offers_sent: + x-field-uid: 2 + requests_received: + x-field-uid: 3 + acks_sent: + x-field-uid: 4 + nacks_sent: + x-field-uid: 5 + releases_received: + x-field-uid: 6 + declines_received: + x-field-uid: 7 + enum: + - discovers_received + - offers_sent + - requests_received + - acks_sent + - nacks_sent + - releases_received + - declines_received + x-field-uid: 2 + Dhcpv4Server.Metric: description: |- - Metrics for each set of values applicable for configured - metric tags in ingress or egress packet header fields of corresponding flow. - The container is keyed by list of tag-value pairs. + DHCPv4 per peer statistics information. type: object properties: - tags: + name: description: |- - List of tag and value pairs - type: array - items: - $ref: '#/components/schemas/Flow.MetricTag' + The name of a configured DHCPv4 Server. + type: string x-field-uid: 1 - frames_tx: + discovers_received: description: |- - The current total number of frames transmitted + Number of DHCPDISCOVER messages received. type: integer format: uint64 x-field-uid: 2 - frames_rx: + offers_sent: description: |- - The current total number of valid frames received + Number of DHCPOFFER messages sent. type: integer format: uint64 x-field-uid: 3 - bytes_tx: + requests_received: description: |- - The current total number of bytes transmitted + Number of DHCPOFFER messages received. type: integer format: uint64 x-field-uid: 4 - bytes_rx: + acks_sent: description: |- - The current total number of bytes received + Number of lease DHCPACK messages sent. type: integer format: uint64 x-field-uid: 5 - frames_tx_rate: + nacks_sent: description: |- - The current rate of frames transmitted - type: number + Number of negative lease DHCPNACK messages sent. + type: integer + format: uint64 x-field-uid: 6 - frames_rx_rate: + releases_received: description: |- - The current rate of valid frames received - type: number + Number of DHCPRELEASE messages received. + type: integer + format: uint64 x-field-uid: 7 - loss: + declines_received: description: |- - The percentage of lost frames - type: number + Number of DHCPDECLINE messages received. + type: integer + format: uint64 x-field-uid: 8 - timestamps: - $ref: '#/components/schemas/Metric.Timestamp' - x-field-uid: 9 - latency: - $ref: '#/components/schemas/Metric.Latency' - x-field-uid: 10 - Flow.MetricTag: - type: object - properties: - name: - description: |- - Name of packet field metric tag - type: string - x-field-uid: 1 - value: - $ref: '#/components/schemas/Flow.MetricTag.Value' - x-field-uid: 2 - Flow.MetricTag.Value: - description: |- - A container for metric tag value - type: object - properties: - choice: - description: |- - Available formats for metric tag value - type: string - default: hex - x-enum: - hex: - x-field-uid: 1 - str: - x-field-uid: 2 - x-field-uid: 1 - enum: - - hex - - str - hex: - description: |- - Value represented in hexadecimal format - type: string - format: hex - x-field-uid: 2 - str: - description: |- - Value represented in string format - type: string - x-field-uid: 3 - Metric.Timestamp: - description: |- - The container for timestamp metrics. - The container will be empty if the timestamp has not been configured for - the flow. - type: object - properties: - first_timestamp_ns: - description: |- - First timestamp in nanoseconds - type: number - format: double - x-field-uid: 1 - last_timestamp_ns: - description: |- - Last timestamp in nanoseconds - type: number - format: double - x-field-uid: 2 - Metric.Latency: - description: "The container for latency metrics. \nThe min/max/avg values are\ - \ dependent on the type of latency measurement \nmode that is configured.\n\ - The container will be empty if the latency has not been configured for\nthe\ - \ flow." - type: object - properties: - minimum_ns: - description: |- - Minimum latency in nanoseconds - type: number - format: double - x-field-uid: 1 - maximum_ns: - description: |- - Maximum latency in nanoseconds - type: number - format: double - x-field-uid: 2 - average_ns: - description: |- - Average latency in nanoseconds - type: number - format: double - x-field-uid: 3 - Bgpv4.Metrics.Request: + Dhcpv6Client.Metrics.Request: description: |- - The request to retrieve BGPv4 per peer metrics/statistics. + The request to retrieve DHCPv6 per client metrics/statistics. type: object properties: - peer_names: + client_names: description: | - The names of BGPv4 peers to return results for. An empty list will return results for all BGPv4 peers. + The names of DHCPv6 clients to return results for. An empty list will return results for all DHCPv6 client. x-constraint: - - /components/schemas/Bgp.V4peer/properties/name + - /components/schemas/Device.Dhcpv6client/properties/name x-constraint: - - /components/schemas/Bgp.V4peer/properties/name + - /components/schemas/Device.Dhcpv6client/properties/name type: array items: type: string x-constraint: - - /components/schemas/Bgp.V4peer/properties/name + - /components/schemas/Device.Dhcpv6client/properties/name x-field-uid: 1 column_names: description: |- - The list of column names that the returned result set will contain. If the list is empty then all columns will be returned except for any result_groups. The name of the BGPv4 peer cannot be excluded. + The list of column names that the returned result set will contain. If the list is empty then all columns will be returned except for any result_groups. The name of the DHCPv6 client cannot be excluded. type: array items: type: string x-enum: - session_state: + solicits_sent: x-field-uid: 1 - session_flap_count: + advertisements_received: x-field-uid: 2 - routes_advertised: + advertisements_ignored: x-field-uid: 3 - routes_received: + requests_sent: x-field-uid: 4 - route_withdraws_sent: + nacks_received: x-field-uid: 5 - route_withdraws_received: + replies_received: x-field-uid: 6 - updates_sent: + information_requests_sent: x-field-uid: 7 - updates_received: + renews_sent: x-field-uid: 8 - opens_sent: + rebinds_sent: x-field-uid: 9 - opens_received: + releases_sent: x-field-uid: 10 - keepalives_sent: + reconfigures_received: x-field-uid: 11 - keepalives_received: + rapid_commit_solicits_sent: x-field-uid: 12 - notifications_sent: + rapid_commit_replies_received: x-field-uid: 13 - notifications_received: - x-field-uid: 14 - fsm_state: - x-field-uid: 15 - end_of_rib_received: - x-field-uid: 16 enum: - - session_state - - session_flap_count - - routes_advertised - - routes_received - - route_withdraws_sent - - route_withdraws_received - - updates_sent - - updates_received - - opens_sent - - opens_received - - keepalives_sent - - keepalives_received - - notifications_sent - - notifications_received - - fsm_state - - end_of_rib_received + - solicits_sent + - advertisements_received + - advertisements_ignored + - requests_sent + - nacks_received + - replies_received + - information_requests_sent + - renews_sent + - rebinds_sent + - releases_sent + - reconfigures_received + - rapid_commit_solicits_sent + - rapid_commit_replies_received x-field-uid: 2 - Bgpv4.Metric: + Dhcpv6Client.Metric: description: |- - BGPv4 per peer statistics information. + DHCPv6 per peer statistics information. type: object properties: name: description: |- - The name of a configured BGPv4 peer. + The name of a configured DHCPv6 client. type: string x-field-uid: 1 - session_state: + solicits_sent: description: |- - Session state as up or down. Up refers to an Established state and Down refers to any other state. - type: string + Number of DHCPSOLICIT messages sent. + type: integer + format: uint64 x-field-uid: 2 - x-enum: - up: - x-field-uid: 1 - down: - x-field-uid: 2 - enum: - - up - - down - session_flap_count: + advertisements_received: description: |- - Number of times the session went from Up to Down state. + Number of DHCPADVERTISE messages received. type: integer format: uint64 x-field-uid: 3 - routes_advertised: + advertisements_ignored: description: |- - Number of routes advertised. + Number of DHCPADVERTISE messages ignored. type: integer format: uint64 x-field-uid: 4 - routes_received: + requests_sent: description: |- - Number of routes received. + Number of DHCPREQUEST messages sent. type: integer format: uint64 x-field-uid: 5 - route_withdraws_sent: + nacks_received: description: |- - Number of route withdraws sent. + Number of negative lease DHCPNACK messages received. type: integer format: uint64 x-field-uid: 6 - route_withdraws_received: + replies_received: description: |- - Number of route withdraws received. + Number of DHCPOFFER messages received. type: integer format: uint64 x-field-uid: 7 - updates_sent: + information_requests_sent: description: |- - Number of Update messages sent. + Number of DHCP Inform requests sent. type: integer format: uint64 x-field-uid: 8 - updates_received: + renews_sent: description: |- - Number of Update messages received. + Number of DHCP renew messages sent. type: integer format: uint64 x-field-uid: 9 - opens_sent: + rebinds_sent: description: |- - Number of Open messages sent. + Number of DHCP rebind messages sent. type: integer format: uint64 x-field-uid: 10 - opens_received: + releases_sent: description: |- - Number of Open messages received. + Number of DHCP Release messages sent. type: integer format: uint64 x-field-uid: 11 - keepalives_sent: - description: |- - Number of Keepalive messages sent. - type: integer - format: uint64 - x-field-uid: 12 - keepalives_received: - description: |- - Number of Keepalive messages received. - type: integer - format: uint64 - x-field-uid: 13 - notifications_sent: - description: |- - Number of Notification messages sent. - type: integer - format: uint64 - x-field-uid: 14 - notifications_received: - description: |- - Number of Notification messages received. - type: integer - format: uint64 - x-field-uid: 15 - fsm_state: - description: |- - BGP peer FSM (Finite State Machine) state as Idle, Connect, Active, OpenSent, OpenConfirm and Established. In all the states except Established the BGP session is down. Idle refers to the Idle state of the FSM. Connect refers to the state where the session is waiting for the underlying transport session to be established. Active refers to the state where the session is awaiting for a connection from the remote peer. OpenSent refers to the state where the session is in the process of being established. The local system has sent an OPEN message. OpenConfirm refers to the state where the session is in the process of being established. The local system has sent and received an OPEN message and is awaiting a NOTIFICATION or KEEPALIVE message from remote peer. Established refers to the state where the BGP session with the peer is established. - type: string - x-field-uid: 16 - x-enum: - idle: - x-field-uid: 1 - connect: - x-field-uid: 2 - active: - x-field-uid: 3 - opensent: - x-field-uid: 4 - openconfirm: - x-field-uid: 5 - established: - x-field-uid: 6 - enum: - - idle - - connect - - active - - opensent - - openconfirm - - established - end_of_rib_received: + reconfigures_received: description: |- - Number of End-of-RIB markers received indicating the completion of the initial routing update for a particular address family after the session is established. For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with the minimum length. For any other address family, it is an UPDATE message that contains only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . + Number of DHCP Reconfigure messages received. type: integer format: uint64 - x-field-uid: 17 - Bgpv6.Metrics.Request: + x-field-uid: 12 + rapid_commit_solicits_sent: + description: |- + Number of rapid commit DHCPSOLICIT messages sent. + type: integer + format: uint64 + x-field-uid: 13 + rapid_commit_replies_received: + description: |- + Number of rapid commit DHCP Reply messages received. + type: integer + format: uint64 + x-field-uid: 14 + Dhcpv6Server.Metrics.Request: description: |- - The request to retrieve BGPv6 per peer metrics/statistics. + The request to retrieve DHCPv6 per Server metrics/statistics. type: object properties: - peer_names: + server_names: description: | - The names of BGPv6 peers to return results for. An empty list will return results for all BGPv6 peers. + The names of DHCPv6 Servers to return results for. An empty list will return results for all DHCPv6 Server. x-constraint: - - /components/schemas/Bgp.V6peer/properties/name + - /components/schemas/Device.Dhcpv6Server/properties/name x-constraint: - - /components/schemas/Bgp.V6peer/properties/name + - /components/schemas/Device.Dhcpv6Server/properties/name type: array items: type: string x-constraint: - - /components/schemas/Bgp.V6peer/properties/name + - /components/schemas/Device.Dhcpv6Server/properties/name x-field-uid: 1 column_names: description: |- - The list of column names that the returned result set will contain. If the list is empty then all columns will be returned except for any result_groups. The name of the BGPv6 peer cannot be excluded. + The list of column names that the returned result set will contain. If the list is empty then all columns will be returned except for any result_groups. The name of the DHCPv6 server cannot be excluded. type: array items: type: string x-enum: - session_state: + solicits_received: x-field-uid: 1 - session_flap_count: + solicits_ignored: x-field-uid: 2 - routes_advertised: + advertisements_sent: x-field-uid: 3 - routes_received: + requests_received: x-field-uid: 4 - route_withdraws_sent: + nacks_sent: x-field-uid: 5 - route_withdraws_received: + confirms_received: x-field-uid: 6 - updates_sent: + renewals_received: x-field-uid: 7 - updates_received: + rebinds_received: x-field-uid: 8 - opens_sent: + replies_sent: x-field-uid: 9 - opens_received: + releases_received: x-field-uid: 10 - keepalives_sent: + declines_received: x-field-uid: 11 - keepalives_received: + information_requests_received: x-field-uid: 12 - notifications_sent: + relay_forwards_received: x-field-uid: 13 - notifications_received: + relay_replies_sent: x-field-uid: 14 - fsm_state: + reconfigures_sent: x-field-uid: 15 - end_of_rib_received: - x-field-uid: 16 enum: - - session_state - - session_flap_count - - routes_advertised - - routes_received - - route_withdraws_sent - - route_withdraws_received - - updates_sent - - updates_received - - opens_sent - - opens_received - - keepalives_sent - - keepalives_received - - notifications_sent - - notifications_received - - fsm_state - - end_of_rib_received - x-field-uid: 2 - Bgpv6.Metric: - description: |- - BGPv6 per peer statistics information. + - solicits_received + - solicits_ignored + - advertisements_sent + - requests_received + - nacks_sent + - confirms_received + - renewals_received + - rebinds_received + - replies_sent + - releases_received + - declines_received + - information_requests_received + - relay_forwards_received + - relay_replies_sent + - reconfigures_sent + x-field-uid: 2 + Dhcpv6Server.Metric: + description: |- + DHCPv6 per server statistics information. type: object properties: name: description: |- - The name of a configured BGPv6 peer. + The name of a configured DHCPv6 Server. type: string x-field-uid: 1 - session_state: + solicits_received: description: |- - Session state as up or down. Up refers to an Established state and Down refers to any other state. - type: string + Number of DHCPSOLICIT messages received. + type: integer + format: uint64 x-field-uid: 2 - x-enum: - up: - x-field-uid: 1 - down: - x-field-uid: 2 - enum: - - up - - down - session_flap_count: + solicits_ignored: description: |- - Number of times the session went from Up to Down state. + Number of DHCPSOLICIT messages ignored. type: integer format: uint64 x-field-uid: 3 - routes_advertised: + advertisements_sent: description: |- - Number of routes advertised. + Number of DHCP Advertise messages sent. type: integer format: uint64 x-field-uid: 4 - routes_received: + requests_received: description: |- - Number of routes received. + Number of DHCPREQUEST messages received. type: integer format: uint64 x-field-uid: 5 - route_withdraws_sent: + nacks_sent: description: |- - Number of route withdraws sent. + Number of naks sent for DHCPREQUEST messages. type: integer format: uint64 x-field-uid: 6 - route_withdraws_received: + confirms_received: description: |- - Number of route withdraws received. + Number of DHCP Confirm messages received. type: integer format: uint64 x-field-uid: 7 - updates_sent: + renewals_received: description: |- - Number of Update messages sent. + Number of DHCP Renewal messages received. type: integer format: uint64 x-field-uid: 8 - updates_received: + rebinds_received: description: |- - Number of Update messages received. + Number of DHCP Rebind messages received. type: integer format: uint64 x-field-uid: 9 - opens_sent: + replies_sent: description: |- - Number of Open messages sent. + Number of DHCP Reply messages sent. type: integer format: uint64 x-field-uid: 10 - opens_received: + releases_received: description: |- - Number of Open messages received. + Number of DHCP Release messages received. type: integer format: uint64 x-field-uid: 11 - keepalives_sent: + declines_received: description: |- - Number of Keepalive messages sent. + Number of DHCP Decline messages received. type: integer format: uint64 x-field-uid: 12 - keepalives_received: + information_requests_received: description: |- - Number of Keepalive messages received. + Number of DHCP Information Request messages received. type: integer format: uint64 x-field-uid: 13 - notifications_sent: + relay_forwards_received: description: |- - Number of Notification messages sent. + Number of DHCP Relay agent forward messages received. type: integer format: uint64 x-field-uid: 14 - notifications_received: + relay_replies_sent: description: |- - Number of Notification messages received. + Number of DHCP reply messages sent to Relay agent. type: integer format: uint64 x-field-uid: 15 - fsm_state: - description: |- - BGP peer FSM (Finite State Machine) state as Idle, Connect, Active, OpenSent, OpenConfirm and Established. In all the states except Established the BGP session is down. Idle refers to the Idle state of the FSM. Connect refers to the state where the session is waiting for the underlying transport session to be established. Active refers to the state where the session is awaiting for a connection from the remote peer. OpenSent refers to the state where the session is in the process of being established. The local system has sent an OPEN message. OpenConfirm refers to the state where the session is in the process of being established. The local system has sent and received an OPEN message and is awaiting a NOTIFICATION or KEEPALIVE message from remote peer. Established refers to the state where the BGP session with the peer is established. - type: string - x-field-uid: 16 - x-enum: - idle: - x-field-uid: 1 - connect: - x-field-uid: 2 - active: - x-field-uid: 3 - opensent: - x-field-uid: 4 - openconfirm: - x-field-uid: 5 - established: - x-field-uid: 6 - enum: - - idle - - connect - - active - - opensent - - openconfirm - - established - end_of_rib_received: + reconfigures_sent: description: |- - Number of End-of-RIB markers received indicating the completion of the initial routing update for a particular address family after the session is established. For the IPv4 unicast address family, the End-of-RIB marker is an UPDATE message with the minimum length. For any other address family, it is an UPDATE message that contains only the MP_UNREACH_NLRI attribute with no withdrawn routes for that . + Number of DHCP Reconfigure messages sent. type: integer format: uint64 - x-field-uid: 17 - Isis.Metrics.Request: + x-field-uid: 16 + Ospfv2.Metrics.Request: description: |- - The request to retrieve ISIS per Router metrics/statistics. + The request to retrieve OSPFv2 per Router metrics/statistics. type: object properties: router_names: description: | - The names of ISIS Routers to return results for. An empty list will return results for all ISIS router. + The names of OSPFv2 routers to return results for. An empty list will return results for all OSPFv2 router. x-constraint: - - /components/schemas/Device.IsisRouter/properties/name + - /components/schemas/Device.Ospfv2/properties/name x-constraint: - - /components/schemas/Device.IsisRouter/properties/name + - /components/schemas/Device.Ospfv2/properties/name type: array items: type: string x-constraint: - - /components/schemas/Device.IsisRouter/properties/name + - /components/schemas/Device.Ospfv2/properties/name x-field-uid: 1 column_names: description: |- - The list of column names that the returned result set will contain. If the list is empty then all columns will be returned except for any result_groups. The name of the ISIS Router cannot be excluded. + The list of column names that the returned result set will contain. + If the list is empty then all columns will be returned except for + any result_groups. + The name of the OSPFv2 Router cannot be excluded. type: array items: type: string x-enum: - l1_sessions_up: + full_state_count: x-field-uid: 1 - l1_session_flap: + down_state_count: x-field-uid: 2 - l1_database_size: + sessions_flap: x-field-uid: 3 - l1_broadcast_hellos_sent: + hellos_sent: x-field-uid: 4 - l1_broadcast_hellos_received: + hellos_received: x-field-uid: 5 - l1_point_to_point_hellos_sent: + dbd_sent: x-field-uid: 6 - l1_point_to_point_hellos_received: + dbd_received: x-field-uid: 7 - l1_psnp_sent: + ls_request_sent: x-field-uid: 8 - l1_psnp_received: + ls_request_received: x-field-uid: 9 - l1_csnp_sent: + ls_update_sent: x-field-uid: 10 - l1_csnp_received: + ls_update_received: x-field-uid: 11 - l1_lsp_sent: + ls_ack_sent: x-field-uid: 12 - l1_lsp_received: + ls_ack_received: x-field-uid: 13 - l2_sessions_up: + lsa_sent: x-field-uid: 14 - l2_session_flap: + lsa_received: x-field-uid: 15 - l2_database_size: + lsa_ack_sent: x-field-uid: 16 - l2_broadcast_hellos_sent: + lsa_ack_received: x-field-uid: 17 - l2_broadcast_hellos_received: + router_lsa_sent: x-field-uid: 18 - l2_point_to_point_hellos_sent: + router_lsa_received: x-field-uid: 19 - l2_point_to_point_hellos_received: + network_lsa_sent: x-field-uid: 20 - l2_psnp_sent: + network_lsa_received: x-field-uid: 21 - l2_psnp_received: + summary_lsa_sent: x-field-uid: 22 - l2_csnp_sent: + summary_lsa_received: x-field-uid: 23 - l2_csnp_received: + external_lsa_sent: x-field-uid: 24 - l2_lsp_sent: + external_lsa_received: x-field-uid: 25 - l2_lsp_received: + nssa_lsa_sent: x-field-uid: 26 + nssa_lsa_received: + x-field-uid: 27 + opaque_local_sent: + x-field-uid: 28 + opaque_local_received: + x-field-uid: 29 + opaque_area_sent: + x-field-uid: 30 + opaque_area_received: + x-field-uid: 31 + opaque_domain_sent: + x-field-uid: 32 + opaque_domain_received: + x-field-uid: 33 enum: - - l1_sessions_up - - l1_session_flap - - l1_database_size - - l1_broadcast_hellos_sent - - l1_broadcast_hellos_received - - l1_point_to_point_hellos_sent - - l1_point_to_point_hellos_received - - l1_psnp_sent - - l1_psnp_received - - l1_csnp_sent - - l1_csnp_received - - l1_lsp_sent - - l1_lsp_received - - l2_sessions_up - - l2_session_flap - - l2_database_size - - l2_broadcast_hellos_sent - - l2_broadcast_hellos_received - - l2_point_to_point_hellos_sent - - l2_point_to_point_hellos_received - - l2_psnp_sent - - l2_psnp_received - - l2_csnp_sent - - l2_csnp_received - - l2_lsp_sent - - l2_lsp_received - x-field-uid: 2 - Isis.Metric: - description: |- - ISIS per router statistics information. + - full_state_count + - down_state_count + - sessions_flap + - hellos_sent + - hellos_received + - dbd_sent + - dbd_received + - ls_request_sent + - ls_request_received + - ls_update_sent + - ls_update_received + - ls_ack_sent + - ls_ack_received + - lsa_sent + - lsa_received + - lsa_ack_sent + - lsa_ack_received + - router_lsa_sent + - router_lsa_received + - network_lsa_sent + - network_lsa_received + - summary_lsa_sent + - summary_lsa_received + - external_lsa_sent + - external_lsa_received + - nssa_lsa_sent + - nssa_lsa_received + - opaque_local_sent + - opaque_local_received + - opaque_area_sent + - opaque_area_received + - opaque_domain_sent + - opaque_domain_received + x-field-uid: 2 + Ospfv2.Metric: + description: |- + OSPFv2 per router statistics information. type: object properties: name: description: |- - The name of a configured ISIS router. + The name of a configured OSPFv2 router. type: string x-field-uid: 1 - l1_sessions_up: + full_state_count: description: |- - The number of Level 1 (L1) sessions that are fully up. + The number of OSPFv2 sessions in up state. type: integer - format: uint32 + format: uint64 x-field-uid: 2 - l1_session_flap: + down_state_count: description: |- - The number of Level 1 Sessions Flap. + The number of OSPFv2 sessions in down state. type: integer format: uint64 x-field-uid: 3 - l1_broadcast_hellos_sent: + sessions_flap: description: |- - Number of Level 1 Hello messages sent. + The number of change of OSPFv2 sessions from up to down state. type: integer format: uint64 x-field-uid: 4 - l1_broadcast_hellos_received: + hellos_sent: description: |- - Number of Level 1 Hello messages received. + The number of OSPFv2 Hello messages transmitted. type: integer format: uint64 x-field-uid: 5 - l1_point_to_point_hellos_sent: + hellos_received: description: |- - Number of Level 1 Point-to-Point(P2P) Hello messages sent. + The number of OSPFv2 Hello messages received. type: integer format: uint64 x-field-uid: 6 - l1_point_to_point_hellos_received: + dbd_sent: description: |- - Number of Level 1 Point-to-Point(P2P) Hello messages received. + The number of OSPFv2 Database Description (DBD) messages transmitted. type: integer format: uint64 x-field-uid: 7 - l1_database_size: + dbd_received: description: |- - Number of Link State Updates (LSPs) in the Level 1 LSP Databases. + The number of OSPFv2 Database Description (DBD) messages received. type: integer format: uint64 x-field-uid: 8 - l1_psnp_sent: + ls_request_sent: description: |- - Number of Level 1 (L1) Partial Sequence Number Packet (PSNPs) sent. + The number of OSPFv2 LinkState (LS) Request messages transmitted. type: integer format: uint64 x-field-uid: 9 - l1_psnp_received: + ls_request_received: description: |- - Number of Level 1 (L1) Complete Sequence Number Packet (PSNPs) received. + The number of OSPFv2 LinkState (LS) Request messages received. type: integer format: uint64 x-field-uid: 10 - l1_csnp_sent: + ls_update_sent: description: |- - Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) sent. + The number of OSPFv2 LinkState (LS) Update messages transmitted. type: integer format: uint64 x-field-uid: 11 - l1_csnp_received: + ls_update_received: description: |- - Number of Level 1 (L1) Complete Sequence Number Packet (CSNPs) received. + The number of OSPFv2 LinkState (LS) Update messages received. type: integer format: uint64 x-field-uid: 12 - l1_lsp_sent: + ls_ack_sent: description: |- - Number of Level 1 (L1) Link State Protocol Data Units (LSPs) sent. + The number of OSPFv2 LinkState (LS) Acknowledgement messages transmitted. type: integer format: uint64 x-field-uid: 13 - l1_lsp_received: + ls_ack_received: description: |- - Number of Level 1 (L1) Link State Protocol Data Units (LSPs) received. + The number of OSPFv2 LinkState (LS) Acknowledgement messages received. type: integer format: uint64 x-field-uid: 14 - l2_sessions_up: + lsa_sent: description: |- - The number of Level 2 (L2) sessions that are fully up. + The total number of OSPFv2 LinkState Advertisement (LSA) messages transmitted. type: integer - format: uint32 + format: uint64 x-field-uid: 15 - l2_session_flap: + lsa_received: description: |- - The number of Level 2 Sessions Flap. + The total number of OSPFv2 LinkState Advertisement (LSA) messages received. type: integer format: uint64 x-field-uid: 16 - l2_broadcast_hellos_sent: + lsa_ack_sent: + description: |- + The total number of OSPFv2 LinkState Advertisement (LSA) messages acknowledged. + type: integer + format: uint64 + x-field-uid: 17 + lsa_ack_received: + description: |- + The total number of OSPFv2 LinkState Advertisement (LSA) acknowledge messages received . + type: integer + format: uint64 + x-field-uid: 18 + router_lsa_sent: + description: |- + The number of OSPFv2 Router (Type 1) LSAs transmitted. + type: integer + format: uint64 + x-field-uid: 19 + router_lsa_received: + description: |- + The number of OSPFv2 Router (Type 1) LSAs received. + type: integer + format: uint64 + x-field-uid: 20 + network_lsa_sent: + description: |- + The number of OSPFv2 Network (Type 2) LSAs transmitted. + type: integer + format: uint64 + x-field-uid: 21 + network_lsa_received: + description: |- + The number of OSPFv2 Network (Type 2) LSAs transmitted. + type: integer + format: uint64 + x-field-uid: 22 + summary_lsa_sent: + description: "The number of OSPFv2 Summary IP (Type 3) LSAs transmitted.\ + \ " + type: integer + format: uint64 + x-field-uid: 23 + summary_lsa_received: description: |- - Number of Level 2 Hello messages sent. + The number of OSPFv2 Summary IP (Type 3) LSA received. type: integer format: uint64 - x-field-uid: 17 - l2_broadcast_hellos_received: + x-field-uid: 24 + external_lsa_sent: description: |- - Number of Level 2 Hello messages received. + The number of OSPFv2 External (Type 5) LSAs transmitted. type: integer format: uint64 - x-field-uid: 18 - l2_point_to_point_hellos_sent: + x-field-uid: 25 + external_lsa_received: description: |- - Number of Level 2 Point-to-Point(P2P) Hello messages sent. + The number of OSPFv2 External (Type 5) LSAs received. type: integer format: uint64 - x-field-uid: 19 - l2_point_to_point_hellos_received: + x-field-uid: 26 + nssa_lsa_sent: description: |- - Number of Level 2 Point-to-Point(P2P) Hello messages received. + The number of OSPFv2 NSSA (Type 7) LSAs transmitted. type: integer format: uint64 - x-field-uid: 20 - l2_database_size: + x-field-uid: 27 + nssa_lsa_received: description: |- - Number of Link State Updates (LSPs) in the Level 2 LSP Databases. + The number of OSPFv2 NSSA (Type 7) LSAs received. type: integer format: uint64 - x-field-uid: 21 - l2_psnp_sent: + x-field-uid: 28 + opaque_local_sent: description: |- - Number of Level 2 (L2) Partial Sequence Number Packet (PSNPs) sent. + The number of OSPFv2 Opaque Local (Type 9) LSAs transmitted. type: integer format: uint64 - x-field-uid: 22 - l2_psnp_received: - description: |- - Number of Level 2 (L2) Complete Sequence Number Packet (PSNPs) received. + x-field-uid: 29 + opaque_local_received: + description: "The number of OSPFv2 Opaque Local (Type 9) LSAs received. " type: integer format: uint64 - x-field-uid: 23 - l2_csnp_sent: + x-field-uid: 30 + opaque_area_sent: description: |- - Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) sent. + The number of OSPF Opaque Area (Type 10) LSAs transmitted. type: integer format: uint64 - x-field-uid: 24 - l2_csnp_received: + x-field-uid: 31 + opaque_area_received: description: |- - Number of Level 2 (L2) Complete Sequence Number Packet (CSNPs) received. + The number of OSPFv2 Opaque Area (Type 10) LSAs received. type: integer format: uint64 - x-field-uid: 25 - l2_lsp_sent: + x-field-uid: 32 + opaque_domain_sent: description: |- - Number of Level 2 (L2) Link State Protocol Data Units (LSPs) sent. + The number of OSPFv2 Opaque Domain (Type 11) LSAs transmitted. type: integer format: uint64 - x-field-uid: 26 - l2_lsp_received: + x-field-uid: 33 + opaque_domain_received: description: |- - Number of Level 2 (L2) Link State Protocol Data Units (LSPs) received. + The number of OSPFv2 Opaque Domain (Type 11) LSAs received. type: integer format: uint64 - x-field-uid: 27 - Lag.Metrics.Request: + x-field-uid: 34 + States.Request: description: |- - The request to retrieve per LAG metrics/statistics. + Request to traffic generator for states of choice type: object properties: - lag_names: - description: | - The names of LAGs to return results for. An empty list will return results for all LAGs. - - x-constraint: - - /components/schemas/Lag/properties/name - - - x-constraint: - - /components/schemas/Lag/properties/name - type: array - items: - type: string - x-constraint: - - /components/schemas/Lag/properties/name + choice: + type: string + default: ipv4_neighbors x-field-uid: 1 - column_names: - description: |- - The list of column names that the returned result set will contain. If the list is empty then all columns will be returned. The name of the LAG cannot be excluded. - type: array - items: - type: string - x-enum: - oper_status: - x-field-uid: 1 - member_ports_up: - x-field-uid: 2 - frames_tx: - x-field-uid: 3 - frames_rx: - x-field-uid: 4 - bytes_tx: - x-field-uid: 5 - bytes_rx: - x-field-uid: 6 - frames_tx_rate: - x-field-uid: 7 - frames_rx_rate: - x-field-uid: 8 - bytes_tx_rate: - x-field-uid: 9 - bytes_rx_rate: - x-field-uid: 10 - enum: - - oper_status - - member_ports_up - - frames_tx - - frames_rx - - bytes_tx - - bytes_rx - - frames_tx_rate - - frames_rx_rate - - bytes_tx_rate - - bytes_rx_rate + x-enum: + ipv4_neighbors: + x-field-uid: 1 + ipv6_neighbors: + x-field-uid: 2 + bgp_prefixes: + x-field-uid: 3 + isis_lsps: + x-field-uid: 4 + lldp_neighbors: + x-field-uid: 5 + rsvp_lsps: + x-field-uid: 6 + dhcpv4_interfaces: + x-field-uid: 7 + dhcpv4_leases: + x-field-uid: 8 + dhcpv6_interfaces: + x-field-uid: 9 + dhcpv6_leases: + x-field-uid: 10 + ospfv2_lsas: + x-field-uid: 11 + enum: + - ipv4_neighbors + - ipv6_neighbors + - bgp_prefixes + - isis_lsps + - lldp_neighbors + - rsvp_lsps + - dhcpv4_interfaces + - dhcpv4_leases + - dhcpv6_interfaces + - dhcpv6_leases + - ospfv2_lsas + ipv4_neighbors: + $ref: '#/components/schemas/Neighborsv4.States.Request' x-field-uid: 2 - Lag.Metric: + ipv6_neighbors: + $ref: '#/components/schemas/Neighborsv6.States.Request' + x-field-uid: 3 + bgp_prefixes: + $ref: '#/components/schemas/BgpPrefix.State.Request' + x-field-uid: 4 + isis_lsps: + $ref: '#/components/schemas/IsisLsps.State.Request' + x-field-uid: 5 + lldp_neighbors: + $ref: '#/components/schemas/LldpNeighbors.State.Request' + x-field-uid: 6 + rsvp_lsps: + $ref: '#/components/schemas/RsvpLsps.State.Request' + x-field-uid: 7 + dhcpv4_interfaces: + $ref: '#/components/schemas/Dhcpv4Interface.State.Request' + x-field-uid: 8 + dhcpv4_leases: + $ref: '#/components/schemas/Dhcpv4Lease.State.Request' + x-field-uid: 9 + dhcpv6_interfaces: + $ref: '#/components/schemas/Dhcpv6Interface.State.Request' + x-field-uid: 10 + dhcpv6_leases: + $ref: '#/components/schemas/Dhcpv6Lease.State.Request' + x-field-uid: 11 + ospfv2_lsas: + $ref: '#/components/schemas/Ospfv2Lsas.State.Request' + x-field-uid: 12 + States.Response: + description: |- + Response containing chosen traffic generator states type: object properties: - name: - description: | - The name of a configured LAG - - x-constraint: - - /components/schemas/Lag/properties/name - - - x-constraint: - - /components/schemas/Lag/properties/name + choice: type: string - x-constraint: - - /components/schemas/Lag/properties/name + default: ipv4_neighbors x-field-uid: 1 - oper_status: - description: |- - The current operational state of the LAG. The state can be up or down. State 'up' indicates member_ports_up >= min_links. - type: string - x-field-uid: 2 x-enum: - up: + ipv4_neighbors: x-field-uid: 1 - down: + ipv6_neighbors: x-field-uid: 2 + bgp_prefixes: + x-field-uid: 3 + isis_lsps: + x-field-uid: 4 + lldp_neighbors: + x-field-uid: 5 + rsvp_lsps: + x-field-uid: 6 + dhcpv4_interfaces: + x-field-uid: 7 + dhcpv4_leases: + x-field-uid: 8 + dhcpv6_interfaces: + x-field-uid: 9 + dhcpv6_leases: + x-field-uid: 10 + ospfv2_lsas: + x-field-uid: 11 enum: - - up - - down - member_ports_up: - description: |- - The number of LAG member ports up. - type: integer - format: uint32 + - ipv4_neighbors + - ipv6_neighbors + - bgp_prefixes + - isis_lsps + - lldp_neighbors + - rsvp_lsps + - dhcpv4_interfaces + - dhcpv4_leases + - dhcpv6_interfaces + - dhcpv6_leases + - ospfv2_lsas + ipv4_neighbors: + type: array + items: + $ref: '#/components/schemas/Neighborsv4.State' + x-field-uid: 2 + ipv6_neighbors: + type: array + items: + $ref: '#/components/schemas/Neighborsv6.State' x-field-uid: 3 - frames_tx: - description: |- - The current total number of frames transmitted. - type: integer - format: uint64 + bgp_prefixes: + type: array + items: + $ref: '#/components/schemas/BgpPrefixes.State' x-field-uid: 4 - frames_rx: - description: |- - The current total number of valid frames received. - type: integer - format: uint64 + isis_lsps: + type: array + items: + $ref: '#/components/schemas/IsisLsps.State' x-field-uid: 5 - bytes_tx: - description: |- - The current total number of bytes transmitted. - type: integer - format: uint64 + lldp_neighbors: + type: array + items: + $ref: '#/components/schemas/LldpNeighbors.State' x-field-uid: 6 - bytes_rx: - description: |- - The current total number of valid bytes received. - type: integer - format: uint64 - minimum: 0 + rsvp_lsps: + type: array + items: + $ref: '#/components/schemas/RsvpLsps.State' x-field-uid: 7 - frames_tx_rate: - description: |- - The current rate of frames transmitted. - type: number - x-field-uid: 8 - frames_rx_rate: - description: |- - The current rate of valid frames received. - type: number + dhcpv4_interfaces: + type: array + items: + $ref: '#/components/schemas/Dhcpv4Interface.State' + x-field-uid: 8 + dhcpv4_leases: + type: array + items: + $ref: '#/components/schemas/Dhcpv4Leases.State' x-field-uid: 9 - bytes_tx_rate: - description: |- - The current rate of bytes transmitted. - type: number + dhcpv6_interfaces: + type: array + items: + $ref: '#/components/schemas/Dhcpv6Interface.State' x-field-uid: 10 - bytes_rx_rate: - description: |- - The current rate of bytes received. - type: number + dhcpv6_leases: + type: array + items: + $ref: '#/components/schemas/Dhcpv6Leases.State' x-field-uid: 11 - Lacp.Metrics.Request: + ospfv2_lsas: + type: array + items: + $ref: '#/components/schemas/Ospfv2Lsa.State' + x-field-uid: 12 + Neighborsv4.States.Request: description: |- - The request to retrieve LACP per LAG member metrics/statistics. + The request to retrieve IPv4 Neighbor state (ARP cache entries) of a network interface(s). type: object properties: - lag_names: + ethernet_names: description: | - The names of LAG (ports group) for which LACP metrics to be returned. An empty list will return metrics for all LAGs. + The names of Ethernet interfaces for which Neighbor state (ARP cache entries) will be retrieved. If no names are specified then the results will contain Neighbor state (ARP cache entries) for all available Ethernet interfaces. x-constraint: - - /components/schemas/Lag/properties/name + - /components/schemas/Device.Ethernet/properties/name x-constraint: - - /components/schemas/Lag/properties/name + - /components/schemas/Device.Ethernet/properties/name type: array items: type: string x-constraint: - - /components/schemas/Lag/properties/name + - /components/schemas/Device.Ethernet/properties/name x-field-uid: 1 - lag_member_port_names: + Neighborsv4.State: + description: |- + IPv4 Neighbor state (ARP cache entry). + type: object + required: + - ethernet_name + - ipv4_address + properties: + ethernet_name: + description: |- + The name of the Ethernet interface associated with the Neighbor state (ARP cache entry). + type: string + x-field-uid: 1 + ipv4_address: + description: |- + The IPv4 address of the neighbor. + type: string + format: ipv4 + x-field-uid: 2 + link_layer_address: + description: |- + The link-layer address (MAC) of the neighbor. + type: string + format: mac + x-field-uid: 3 + Neighborsv6.States.Request: + description: |- + The request to retrieve IPv6 Neighbor state (NDISC cache entries) of a network interface(s). + type: object + properties: + ethernet_names: description: | - The names of LAG members (ports) for which LACP metrics to be returned. An empty list will return metrics for all LAG members. + The names of Ethernet interfaces for which Neighbor state (NDISC cache entries) will be retrieved. If no names are specified then the results will contain Neighbor state (NDISC cache entries) for all available Ethernet interfaces. x-constraint: - - /components/schemas/Port/properties/name + - /components/schemas/Device.Ethernet/properties/name x-constraint: - - /components/schemas/Port/properties/name + - /components/schemas/Device.Ethernet/properties/name type: array items: type: string x-constraint: - - /components/schemas/Port/properties/name - x-field-uid: 2 - column_names: - description: |- - The list of column names that the returned result set will contain. If the list is empty then all columns will be returned. The name of LAG and LAG member can not be excluded. - type: array - items: - type: string - x-enum: - lacp_packets_rx: - x-field-uid: 1 - lacp_packets_tx: - x-field-uid: 2 - lacp_rx_errors: - x-field-uid: 3 - activity: - x-field-uid: 4 - timeout: - x-field-uid: 5 - synchronization: - x-field-uid: 6 - aggregatable: - x-field-uid: 7 - collecting: - x-field-uid: 8 - distributing: - x-field-uid: 9 - system_id: - x-field-uid: 10 - oper_key: - x-field-uid: 11 - partner_id: - x-field-uid: 12 - partner_key: - x-field-uid: 13 - port_num: - x-field-uid: 14 - partner_port_num: - x-field-uid: 15 - enum: - - lacp_packets_rx - - lacp_packets_tx - - lacp_rx_errors - - activity - - timeout - - synchronization - - aggregatable - - collecting - - distributing - - system_id - - oper_key - - partner_id - - partner_key - - port_num - - partner_port_num - x-field-uid: 3 - Lacp.Metric: + - /components/schemas/Device.Ethernet/properties/name + x-field-uid: 1 + Neighborsv6.State: description: |- - LACP metrics (statistics) per LAG member. + IPv6 Neighbor state (NDISC cache entry). type: object + required: + - ethernet_name + - ipv6_address properties: - lag_name: + ethernet_name: description: |- - The name of a LAG (ports group) configured with LACP. + The name of the Ethernet interface associated with the Neighbor state (NDISC cache entry). type: string x-field-uid: 1 - lag_member_port_name: - description: |- - The name of a LAG member (port) configured with LACP. - type: string - x-field-uid: 2 - lacp_packets_rx: - description: |- - Number of LACPDUs received. - type: integer - format: uint64 - x-field-uid: 3 - lacp_packets_tx: - description: |- - Number of LACPDUs transmitted. - type: integer - format: uint64 - x-field-uid: 4 - lacp_rx_errors: - description: |- - Number of LACPDUs receive packet errors. - type: integer - format: uint64 - x-field-uid: 5 - activity: - description: |- - Indicates participant is active or passive. - type: string - x-field-uid: 6 - x-enum: - active: - x-field-uid: 1 - passive: - x-field-uid: 2 - enum: - - active - - passive - timeout: - description: |- - The timeout type (short or long) used by the participant. - type: string - x-field-uid: 7 - x-enum: - short: - x-field-uid: 1 - long: - x-field-uid: 2 - enum: - - short - - long - synchronization: - description: |- - Indicates whether the participant is in-sync or out-of-sync. - type: string - x-field-uid: 8 - x-enum: - in_sync: - x-field-uid: 1 - out_sync: - x-field-uid: 2 - enum: - - in_sync - - out_sync - aggregatable: - description: |- - A true value indicates that the participant will allow the link to be used as part of the aggregate. A false value indicates the link should be used as an individual link. - type: boolean - x-field-uid: 9 - collecting: - description: |- - If true, the participant is collecting incoming frames on the link, otherwise false. - type: boolean - x-field-uid: 10 - distributing: - description: |- - When true, the participant is distributing outgoing frames; when false, distribution is disabled. - type: boolean - x-field-uid: 11 - system_id: - description: |- - MAC address that defines the local system ID for the aggregate interface. - type: string - format: mac - x-field-uid: 12 - oper_key: - description: |- - Current operational value of the key for the aggregate interface. - type: integer - format: uint32 - x-field-uid: 13 - partner_id: + ipv6_address: description: |- - MAC address representing the protocol partner's interface system ID. + The IPv6 address of the neighbor. type: string - format: mac - x-field-uid: 14 - partner_key: - description: |- - Operational value of the protocol partner's key. - type: integer - format: uint32 - x-field-uid: 15 - port_num: - description: |- - Port number of the local (actor) aggregation member. - type: integer - format: uint32 - x-field-uid: 16 - partner_port_num: - description: |- - Port number of the partner (remote) port for this member port. - type: integer - format: uint32 - x-field-uid: 17 - Lldp.Metrics.Request: + format: ipv6 + x-field-uid: 2 + link_layer_address: + description: |- + The link-layer address (MAC) of the neighbor. + type: string + format: mac + x-field-uid: 3 + BgpPrefix.State.Request: description: |- - The request to retrieve LLDP per instance metrics/statistics. + The request to retrieve BGP peer prefix information. type: object properties: - lldp_names: + bgp_peer_names: description: | - The names of LLDP instances to return results for. An empty list will return results for all LLDP instances. + The names of BGP peers for which prefix information will be retrieved. If no names are specified then the results will contain prefix information for all configured BGP peers. x-constraint: - - /components/schemas/Lldp/properties/name + - /components/schemas/Bgp.V4Peer/properties/name + - /components/schemas/Bgp.V6Peer/properties/name x-constraint: - - /components/schemas/Lldp/properties/name + - /components/schemas/Bgp.V4Peer/properties/name + - /components/schemas/Bgp.V6Peer/properties/name type: array items: type: string x-constraint: - - /components/schemas/Lldp/properties/name + - /components/schemas/Bgp.V4Peer/properties/name + - /components/schemas/Bgp.V6Peer/properties/name x-field-uid: 1 - column_names: + prefix_filters: description: |- - The requested list of column names for the result set. If the list is empty then metrics for all columns will be returned. The name of LLDP instance can not be excluded. + Specify which prefixes to return. If the list is empty or missing then all prefixes will be returned. type: array items: type: string x-enum: - frames_rx: + ipv4_unicast: x-field-uid: 1 - frames_tx: + ipv6_unicast: x-field-uid: 2 - frames_error_rx: - x-field-uid: 3 - frames_discard: - x-field-uid: 4 - tlvs_discard: - x-field-uid: 5 - tlvs_unknown: - x-field-uid: 6 enum: - - frames_rx - - frames_tx - - frames_error_rx - - frames_discard - - tlvs_discard - - tlvs_unknown + - ipv4_unicast + - ipv6_unicast x-field-uid: 2 - Lldp.Metric: - description: |- - LLDP per instance statistics information. + ipv4_unicast_filters: + description: |- + The IPv4 unicast results can be filtered by specifying additional prefix search criteria. If the ipv4_unicast_filters property is missing or empty then all IPv4 prefixes will be returned. + type: array + items: + $ref: '#/components/schemas/BgpPrefix.Ipv4Unicast.Filter' + x-field-uid: 3 + ipv6_unicast_filters: + description: |- + The IPv6 unicast results can be filtered by specifying additional prefix search criteria. If the ipv6_unicast_filters property is missing or empty then all IPv6 prefixes will be returned. + type: array + items: + $ref: '#/components/schemas/BgpPrefix.Ipv6Unicast.Filter' + x-field-uid: 4 + BgpPrefix.Ipv4Unicast.Filter: type: object properties: - name: + addresses: description: |- - The name of the configured LLDP instance. - type: string + The addresses to match. If the addresses property is missing or empty then all addresses will match. + type: array + items: + type: string + format: ipv4 x-field-uid: 1 - frames_rx: - description: |- - Number of LLDP frames received. - type: integer - format: uint64 + prefix_length: x-field-uid: 2 - frames_tx: description: |- - Number of LLDP frames transmitted. + The prefix length to match. If the prefix length is missing then all prefix lengths will match. type: integer - format: uint64 + format: uint32 + maximum: 128 + origin: x-field-uid: 3 - frames_error_rx: description: |- - Number of LLDP frames received with packet errors. This stat should be incremented based on statsFramesInErrorsTotal increment rule in section 10.3.2 of IEEE Std 802.1 AB-2005. - type: integer - format: uint64 + The origin to match. If the origin is missing then all origins will match. + type: string + x-enum: + igp: + x-field-uid: 1 + egp: + x-field-uid: 2 + incomplete: + x-field-uid: 3 + enum: + - igp + - egp + - incomplete + path_id: x-field-uid: 4 - frames_discard: - description: |- - Number of LLDP frames received that are discarded. This stat should be incremented when one or more of the three mandatory TLVs at the beginning of the LLDPDU is missing, out of order or contains an out of range information string length. This stat should follow the validation rules in section 10.3.2 of IEEE Std 802.1 AB-2005. - type: integer - format: uint64 - x-field-uid: 5 - tlvs_discard: description: |- - Number of LLDP tlvs received that are discarded. If any TLV contains an error condition specific for that particular TLV or if any TLV extends past the physical end of the frame then these TLVs will be discarded. - type: integer - format: uint64 - x-field-uid: 6 - tlvs_unknown: - description: |- - Number of LLDP unknown tlvs received. If the OUI of the organizationlly specific TLV and/or organizationally defined subtype are not recognized,or if TLV type value is in the range of reserved TLV types then these TLVs will be considered as unknown TLVs. + The path id to match. If the path id is missing then all path ids will match. type: integer - format: uint64 - x-field-uid: 7 - Rsvp.Metrics.Request: - description: |- - The request to retrieve RSVP-TE per Router metrics/statistics. + format: uint32 + BgpPrefix.Ipv6Unicast.Filter: type: object properties: - router_names: - description: | - The names of RSVP-TE Routers to return results for. An empty list as input will return results for all RSVP-TE routers. - - x-constraint: - - /components/schemas/Device.Rsvp/properties/name - - - x-constraint: - - /components/schemas/Device.Rsvp/properties/name + addresses: + description: |- + The addresses to match. If the addresses property is missing or empty then all addresses will match. type: array items: type: string - x-constraint: - - /components/schemas/Device.Rsvp/properties/name + format: ipv6 x-field-uid: 1 - column_names: - description: "The list of column names that the returned result set will\ - \ contain. If the input list is empty then all columns will be returned\ - \ except for any result_groups. " - type: array - items: - type: string - x-enum: - ingress_p2p_lsps_configured: - x-field-uid: 1 - ingress_p2p_lsps_up: - x-field-uid: 2 - egress_p2p_lsps_up: - x-field-uid: 3 - lsp_flap_count: - x-field-uid: 4 - paths_tx: - x-field-uid: 5 - paths_rx: - x-field-uid: 6 - resvs_tx: - x-field-uid: 7 - resvs_rx: - x-field-uid: 8 - path_tears_tx: - x-field-uid: 9 - path_tears_rx: - x-field-uid: 10 - resv_tears_tx: - x-field-uid: 11 - resv_tears_rx: - x-field-uid: 12 - path_errors_tx: - x-field-uid: 13 - path_errors_rx: - x-field-uid: 14 - resv_errors_tx: - x-field-uid: 15 - resv_errors_rx: - x-field-uid: 16 - resv_conf_tx: - x-field-uid: 17 - resv_conf_rx: - x-field-uid: 18 - hellos_tx: - x-field-uid: 19 - hellos_rx: - x-field-uid: 20 - acks_tx: - x-field-uid: 21 - acks_rx: - x-field-uid: 22 - nacks_tx: - x-field-uid: 23 - nacks_rx: - x-field-uid: 24 - srefresh_tx: - x-field-uid: 25 - srefresh_rx: - x-field-uid: 26 - bundle_tx: - x-field-uid: 27 - bundle_rx: - x-field-uid: 28 - path_reevaluation_request_tx: - x-field-uid: 29 - path_reoptimizations: - x-field-uid: 30 - enum: - - ingress_p2p_lsps_configured - - ingress_p2p_lsps_up - - egress_p2p_lsps_up - - lsp_flap_count - - paths_tx - - paths_rx - - resvs_tx - - resvs_rx - - path_tears_tx - - path_tears_rx - - resv_tears_tx - - resv_tears_rx - - path_errors_tx - - path_errors_rx - - resv_errors_tx - - resv_errors_rx - - resv_conf_tx - - resv_conf_rx - - hellos_tx - - hellos_rx - - acks_tx - - acks_rx - - nacks_tx - - nacks_rx - - srefresh_tx - - srefresh_rx - - bundle_tx - - bundle_rx - - path_reevaluation_request_tx - - path_reoptimizations + prefix_length: x-field-uid: 2 - Rsvp.Metric: + description: |- + The prefix length to match. If the prefix length is missing then all prefix lengths will match. + type: integer + format: uint32 + maximum: 128 + origin: + x-field-uid: 3 + description: |- + The origin to match. If the origin is missing then all origins will match. + type: string + x-enum: + igp: + x-field-uid: 1 + egp: + x-field-uid: 2 + incomplete: + x-field-uid: 3 + enum: + - igp + - egp + - incomplete + path_id: + x-field-uid: 4 + description: |- + The path id to match. If the path id is missing then all path ids will match. + type: integer + format: uint32 + BgpPrefixes.State: description: |- - RSVP-TE per router statistics information. + BGP peer prefixes. type: object properties: - name: + bgp_peer_name: description: |- - The name of a configured RSVP router. + The name of a BGP peer. type: string x-field-uid: 1 - ingress_p2p_lsps_configured: + ipv4_unicast_prefixes: + type: array + items: + $ref: '#/components/schemas/BgpPrefixIpv4Unicast.State' + x-field-uid: 2 + ipv6_unicast_prefixes: + type: array + items: + $ref: '#/components/schemas/BgpPrefixIpv6Unicast.State' + x-field-uid: 3 + BgpPrefixIpv4Unicast.State: + description: |- + IPv4 unicast prefix. + type: object + properties: + ipv4_address: description: |- - The number of ingress point-to-point LSPs configured or transiting through the RSVP router which have been initated from the test port. - type: integer - format: uint32 + An IPv4 unicast address + type: string + x-field-uid: 1 + prefix_length: x-field-uid: 2 - ingress_p2p_lsps_up: - description: "The number of ingress point-to-point LSPs for which Resv has\ - \ been received and is currently up. " + description: |- + The length of the prefix. type: integer format: uint32 + maximum: 128 + origin: x-field-uid: 3 - egress_p2p_lsps_up: description: |- - The number of egress point-to-point LSPs for which Path requests were successfully processed and is currently up. - type: integer - format: uint32 + The origin of the prefix. + type: string + x-enum: + igp: + x-field-uid: 1 + egp: + x-field-uid: 2 + incomplete: + x-field-uid: 3 + enum: + - igp + - egp + - incomplete + path_id: x-field-uid: 4 - lsp_flap_count: description: |- - The number of times an LSP went from up to down state either because it timed out while waiting for Refreshes or a PathTear or ResvTear message was received which caused the LSP to flap. + The path id. type: integer - format: uint64 + format: uint32 + ipv4_next_hop: x-field-uid: 5 - paths_tx: description: |- - The number of Path messages sent by this RSVP router. - type: integer - format: uint64 + The IPv4 address of the egress interface. + type: string + format: ipv4 + ipv6_next_hop: x-field-uid: 6 - paths_rx: description: |- - The number of Path messages received by this RSVP router. - type: integer - format: uint64 + The IPv6 address of the egress interface. + type: string + format: ipv6 + communities: x-field-uid: 7 - resvs_tx: description: |- - The number of Resv messages sent by this RSVP router. - type: integer - format: uint64 - x-field-uid: 8 - resvs_rx: + Optional community attributes. + type: array + items: + $ref: '#/components/schemas/Result.BgpCommunity' + extended_communities: description: |- - The number of Resv messages received by this RSVP router. - type: integer - format: uint64 + Optional received Extended Community attributes. Each received Extended Community attribute is available for retrieval in two forms. Support of the 'raw' format in which all 8 bytes (16 hex characters) is always present and available for use. In addition, if supported by the implementation, the Extended Community attribute may also be retrieved in the 'structured' format which is an optional field. + type: array + items: + $ref: '#/components/schemas/Result.ExtendedCommunity' + x-field-uid: 11 + as_path: + x-field-uid: 8 + $ref: '#/components/schemas/Result.BgpAsPath' + local_preference: x-field-uid: 9 - path_tears_tx: description: |- - The number of Path Tear messages sent by this RSVP router. + The local preference is a well-known attribute and the value is used for route selection. The route with the highest local preference value is preferred. type: integer - format: uint64 + format: uint32 + multi_exit_discriminator: x-field-uid: 10 - path_tears_rx: - description: "The number of Path Tear messages received by this RSVP router. " + description: |- + The multi exit discriminator (MED) is an optional non-transitive attribute and the value is used for route selection. The route with the lowest MED value is preferred. type: integer - format: uint64 - x-field-uid: 11 - resv_tears_tx: + format: uint32 + BgpPrefixIpv6Unicast.State: + description: |- + IPv6 unicast prefix. + type: object + properties: + ipv6_address: description: |- - The number of Resv Tear messages sent by this RSVP router. + An IPv6 unicast address + type: string + x-field-uid: 1 + prefix_length: + x-field-uid: 2 + description: |- + The length of the prefix. type: integer - format: uint64 - x-field-uid: 12 - resv_tears_rx: - description: "The number of Resv Tear messages received by this RSVP router. " + format: uint32 + maximum: 128 + origin: + x-field-uid: 3 + description: |- + The origin of the prefix. + type: string + x-enum: + igp: + x-field-uid: 1 + egp: + x-field-uid: 2 + incomplete: + x-field-uid: 3 + enum: + - igp + - egp + - incomplete + path_id: + x-field-uid: 4 + description: |- + The path id. type: integer - format: uint64 - x-field-uid: 13 - path_errors_tx: + format: uint32 + ipv4_next_hop: + x-field-uid: 5 description: |- - The number of Path Error messages sent by this RSVP router. + The IPv4 address of the egress interface. + type: string + format: ipv4 + ipv6_next_hop: + x-field-uid: 6 + description: |- + The IPv6 address of the egress interface. + type: string + format: ipv6 + communities: + x-field-uid: 7 + description: |- + Optional community attributes. + type: array + items: + $ref: '#/components/schemas/Result.BgpCommunity' + extended_communities: + description: |- + Optional received Extended Community attributes. Each received Extended Community attribute is available for retrieval in two forms. Support of the 'raw' format in which all 8 bytes (16 hex characters) is always present and available for use. In addition, if supported by the implementation, the Extended Community attribute may also be retrieved in the 'structured' format which is an optional field. + type: array + items: + $ref: '#/components/schemas/Result.ExtendedCommunity' + x-field-uid: 11 + as_path: + x-field-uid: 8 + $ref: '#/components/schemas/Result.BgpAsPath' + local_preference: + x-field-uid: 9 + description: |- + The local preference is a well-known attribute and the value is used for route selection. The route with the highest local preference value is preferred. type: integer - format: uint64 - x-field-uid: 14 - path_errors_rx: - description: "The number of Path Error messages received by this RSVP router. " + format: uint32 + multi_exit_discriminator: + x-field-uid: 10 + description: |- + The multi exit discriminator (MED) is an optional non-transitive attribute and the value is used for route selection. The route with the lowest MED value is preferred. type: integer - format: uint64 - x-field-uid: 15 - resv_errors_tx: + format: uint32 + Result.ExtendedCommunity: + description: |- + Each received Extended Community attribute is available for retrieval in two forms. Support of the 'raw' format in which all 8 bytes (16 hex characters) is always present and available for use. In addition, if supported by the implementation, the Extended Community attribute may also be retrieved in the 'structured' format which is an optional field. + type: object + properties: + raw: + description: "The raw byte contents of the 8 bytes received in the Extended\ + \ Community as 16 hex characters. " + type: string + format: hex + maxLength: 16 + x-field-uid: 1 + structured: + x-field-uid: 2 + $ref: '#/components/schemas/Result.ExtendedCommunityStructured' + Result.ExtendedCommunityStructured: + description: "The Extended Communities Attribute is a optional BGP attribute,defined\ + \ in RFC4360 with the Type Code 16. \nCommunity and Extended Communities \ + \ attributes are utilized to trigger routing decisions, such as acceptance,\ + \ rejection, preference, or redistribution. \nAn extended community is an\ + \ 8-bytes value. It is divided into two main parts. The first 2 bytes of the\ + \ community encode a type and optonal sub-type field.\nThe last 6 bytes (or\ + \ 7 bytes for types without a sub-type) carry a unique set of data in a format\ + \ defined by the type and optional sub-type field. \nExtended communities\ + \ provide a larger range for grouping or categorizing communities." + type: object + properties: + choice: + type: string + x-enum: + transitive_2octet_as_type: + x-field-uid: 1 + transitive_ipv4_address_type: + x-field-uid: 2 + transitive_4octet_as_type: + x-field-uid: 3 + transitive_opaque_type: + x-field-uid: 4 + non_transitive_2octet_as_type: + x-field-uid: 5 + x-field-uid: 1 + enum: + - transitive_2octet_as_type + - transitive_ipv4_address_type + - transitive_4octet_as_type + - transitive_opaque_type + - non_transitive_2octet_as_type + transitive_2octet_as_type: + x-field-uid: 2 + $ref: '#/components/schemas/Result.ExtendedCommunity.Transitive2OctetAsType' + transitive_ipv4_address_type: + x-field-uid: 3 + $ref: '#/components/schemas/Result.ExtendedCommunity.TransitiveIpv4AddressType' + transitive_4octet_as_type: + x-field-uid: 4 + $ref: '#/components/schemas/Result.ExtendedCommunity.Transitive4OctetAsType' + transitive_opaque_type: + x-field-uid: 5 + $ref: '#/components/schemas/Result.ExtendedCommunity.TransitiveOpaqueType' + non_transitive_2octet_as_type: + x-field-uid: 6 + $ref: '#/components/schemas/Result.ExtendedCommunity.NonTransitive2OctetAsType' + Result.ExtendedCommunity.Transitive2OctetAsType.RouteTarget: + description: "The Route Target Community identifies one or more routers that\ + \ may receive a set of routes (that carry this Community) carried by BGP Update\ + \ message. It is sent with sub-type as 0x02. " + type: object + properties: + global_2byte_as: description: |- - The number of Resv Error messages sent by this RSVP router. + The two octet IANA assigned AS value assigned to the Autonomous System. type: integer - format: uint64 - x-field-uid: 16 - resv_errors_rx: - description: "The number of Resv Error messages received by this RSVP router. " + format: uint32 + maximum: 65535 + x-field-uid: 1 + local_4byte_admin: type: integer - format: uint64 - x-field-uid: 17 - resv_conf_tx: + format: uint32 description: |- - The number of ResvConf messages sent by this RSVP router. + The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. + x-field-uid: 2 + Result.ExtendedCommunity.Transitive2OctetAsType.RouteOrigin: + description: |- + The Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03 . + type: object + properties: + global_2byte_as: + description: |- + The two octet IANA assigned AS value assigned to the Autonomous System. type: integer - format: uint64 - x-field-uid: 18 - resv_conf_rx: - description: "The number of ResvConf messages received by this RSVP router. " + format: uint32 + maximum: 65535 + x-field-uid: 1 + local_4byte_admin: + description: |- + The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. type: integer - format: uint64 - x-field-uid: 19 - hellos_tx: + format: uint32 + x-field-uid: 2 + Result.ExtendedCommunity.Transitive2OctetAsType: + description: "The Transitive Two-Octet AS-Specific Extended Community is sent\ + \ as type 0x00 . " + type: object + properties: + choice: + type: string + x-enum: + route_target_subtype: + x-field-uid: 1 + route_origin_subtype: + x-field-uid: 2 + x-field-uid: 1 + enum: + - route_target_subtype + - route_origin_subtype + route_target_subtype: + x-field-uid: 2 + $ref: '#/components/schemas/Result.ExtendedCommunity.Transitive2OctetAsType.RouteTarget' + route_origin_subtype: + x-field-uid: 3 + $ref: '#/components/schemas/Result.ExtendedCommunity.Transitive2OctetAsType.RouteOrigin' + Result.ExtendedCommunity.TransitiveIpv4AddressType.RouteOrigin: + description: |- + The Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP It is sent with sub-type as 0x03. + type: object + properties: + global_ipv4_admin: + description: "An IPv4 unicast address assigned by one of the Internet registries.\ + \ " + type: string + format: ipv4 + x-field-uid: 1 + local_2byte_admin: description: |- - The number of Hello messages sent by this RSVP router. + The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. type: integer - format: uint64 - x-field-uid: 20 - hellos_rx: - description: "The number of Hello messages received by this RSVP router. " + format: uint32 + maximum: 65535 + x-field-uid: 2 + Result.ExtendedCommunity.TransitiveIpv4AddressType.RouteTarget: + description: "The Route Target Community identifies one or more routers that\ + \ may receive a set of routes (that carry this Community) carried by BGP.\ + \ It is sent with sub-type as 0x02. " + type: object + properties: + global_ipv4_admin: + description: "An IPv4 unicast address assigned by one of the Internet registries. " + type: string + format: ipv4 + x-field-uid: 1 + local_2byte_admin: type: integer - format: uint64 - x-field-uid: 21 - acks_tx: + format: uint32 + maximum: 65535 description: |- - The number of Ack messages sent by this RSVP router. + The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the IP address carried in the Global Administrator sub-field has been assigned by an appropriate authority. + x-field-uid: 2 + Result.ExtendedCommunity.TransitiveIpv4AddressType: + description: |- + The Transitive IPv4 Address Specific Extended Community is sent as type 0x01. + type: object + properties: + choice: + type: string + x-enum: + route_target_subtype: + x-field-uid: 1 + route_origin_subtype: + x-field-uid: 2 + x-field-uid: 1 + enum: + - route_target_subtype + - route_origin_subtype + route_target_subtype: + x-field-uid: 2 + $ref: '#/components/schemas/Result.ExtendedCommunity.TransitiveIpv4AddressType.RouteTarget' + route_origin_subtype: + x-field-uid: 3 + $ref: '#/components/schemas/Result.ExtendedCommunity.TransitiveIpv4AddressType.RouteOrigin' + Result.ExtendedCommunity.Transitive4OctetAsType.RouteTarget: + description: "The Route Target Community identifies one or more routers that\ + \ may receive a set of routes (that carry this Community) carried by BGP.\ + \ It is sent with sub-type as 0x02 " + type: object + properties: + global_4byte_as: + description: |- + The four octet IANA assigned AS value assigned to the Autonomous System. type: integer - format: uint64 - x-field-uid: 22 - acks_rx: - description: "The number of Ack messages received by this RSVP router. " + format: uint32 + x-field-uid: 1 + local_2byte_admin: type: integer - format: uint64 - x-field-uid: 23 - nacks_tx: + format: uint32 + maximum: 65535 description: |- - The number of Nack messages sent by this RSVP router. - type: integer - format: uint64 - x-field-uid: 24 - nacks_rx: - description: "The number of Nack messages received by this RSVP router. " + The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. + x-field-uid: 2 + Result.ExtendedCommunity.Transitive4OctetAsType.RouteOrigin: + description: |- + The Route Origin Community identifies one or more routers that inject a set of routes (that carry this Community) into BGP. It is sent with sub-type as 0x03. + type: object + properties: + global_4byte_as: + description: |- + The four octet IANA assigned AS value assigned to the Autonomous System. type: integer - format: uint64 - x-field-uid: 25 - srefresh_tx: + format: uint32 + x-field-uid: 1 + local_2byte_admin: description: |- - The number of SRefresh messages sent by this RSVP router. + The Local Administrator sub-field contains a number from a numbering space that is administered by the organization to which the Autonomous System number carried in the Global Administrator sub-field has been assigned by an appropriate authority. type: integer - format: uint64 - x-field-uid: 26 - srefresh_rx: - description: "The number of SRefresh messages received by this RSVP router. " + format: uint32 + maximum: 65535 + x-field-uid: 2 + Result.ExtendedCommunity.Transitive4OctetAsType: + description: "The Transitive Four-Octet AS-Specific Extended Community is sent\ + \ as type 0x02. It is defined in RFC 5668. " + type: object + properties: + choice: + type: string + x-enum: + route_target_subtype: + x-field-uid: 1 + route_origin_subtype: + x-field-uid: 2 + x-field-uid: 1 + enum: + - route_target_subtype + - route_origin_subtype + route_target_subtype: + x-field-uid: 2 + $ref: '#/components/schemas/Result.ExtendedCommunity.Transitive4OctetAsType.RouteTarget' + route_origin_subtype: + x-field-uid: 3 + $ref: '#/components/schemas/Result.ExtendedCommunity.Transitive4OctetAsType.RouteOrigin' + Result.ExtendedCommunity.TransitiveOpaqueType.Color: + description: "The Color Community contains locally administrator defined 'color'\ + \ value which is used in conjunction with Encapsulation attribute to decide\ + \ whether a data packet can be transmitted on a certain tunnel or not. It\ + \ is defined in RFC9012 and sent with sub-type as 0x0b. " + type: object + properties: + flags: + description: "Two octet flag values. " type: integer - format: uint64 - x-field-uid: 27 - bundle_tx: - description: |- - The number of Bundle messages sent by this RSVP router. + format: uint32 + maximum: 65535 + x-field-uid: 1 + color: type: integer - format: uint64 - x-field-uid: 28 - bundle_rx: - description: "The number of Bundle messages received by this RSVP router. " + format: uint32 + description: "The color value is user defined and configured locally and\ + \ used to determine whether a data packet can be transmitted on a certain\ + \ tunnel or not\nin conjunction with the Encapsulation attribute. It is\ + \ defined in RFC9012. " + x-field-uid: 2 + Result.ExtendedCommunity.TransitiveOpaqueType.Encapsulation: + description: |- + This identifies the type of tunneling technology being signalled. It is defined in RFC9012 and sent with sub-type as 0x0c. + type: object + properties: + reserved: + description: "Four bytes of reserved values. Normally set to 0 on transmit\ + \ and ignored on receive. " type: integer - format: uint64 - x-field-uid: 29 - path_reevaluation_request_tx: + format: uint32 + x-field-uid: 1 + tunnel_type: + description: "Identifies the type of tunneling technology being signalled.\ + \ Initially defined in RFC5512 and extended in RFC9012.\nSome of the important\ + \ tunnel types include \n- 1 L2TPv3 over IP\t[RFC9012], \n-\ + \ 2\tGRE\t[RFC9012], \n- 7\tIP in IP\t[RFC9012],\n- 8\tVXLAN\ + \ Encapsulation\t[RFC8365],\n- 9\tNVGRE Encapsulation\t[RFC8365],\n- 10\t\ + MPLS Encapsulation\t[RFC8365],\n- 15\tSR TE Policy Type\t[draft-ietf-idr-segment-routing-te-policy],\n\ + - 19\tGeneve Encapsulation\t[RFC8926]" + type: integer + format: uint32 + maximum: 65535 + x-field-uid: 2 + Result.ExtendedCommunity.TransitiveOpaqueType: + description: |- + The Transitive Opaque Extended Community is sent as type 0x03. + type: object + properties: + choice: + type: string + x-enum: + color_subtype: + x-field-uid: 1 + encapsulation_subtype: + x-field-uid: 2 + x-field-uid: 1 + enum: + - color_subtype + - encapsulation_subtype + color_subtype: + x-field-uid: 2 + $ref: '#/components/schemas/Result.ExtendedCommunity.TransitiveOpaqueType.Color' + encapsulation_subtype: + x-field-uid: 3 + $ref: '#/components/schemas/Result.ExtendedCommunity.TransitiveOpaqueType.Encapsulation' + Result.ExtendedCommunity.NonTransitive2OctetAsType.LinkBandwidth: + description: |- + The Link Bandwidth Extended Community attribute is defined in draft-ietf-idr-link-bandwidth. It is sent with sub-type as 0x04. + type: object + properties: + global_2byte_as: description: |- - The number of Path messages with Path Re-evaluation Request enabled sent by this RSVP router. + The value of the Global Administrator subfield should represent the Autonomous System of the router that attaches the Link Bandwidth Community. If four octet AS numbering scheme is used, AS_TRANS (23456) should be used. type: integer - format: uint64 - x-field-uid: 30 - path_reoptimizations: + format: uint32 + maximum: 65535 + x-field-uid: 1 + bandwidth: description: |- - The number of successfully completed Make-Before-Break operations on LSPs on this RSVP router. - type: integer - format: uint64 - x-field-uid: 31 - States.Request: - description: |- - Request to traffic generator for states of choice + Bandwidth of the link in bytes per second. ( 1 Kbps is 1000 bytes per second and 1 Mbps is 1000 Kbps per second ) + type: number + format: float + x-field-uid: 2 + Result.ExtendedCommunity.NonTransitive2OctetAsType: + description: "The Non-Transitive Two-Octet AS-Specific Extended Community is\ + \ sent as type 0x40. " type: object properties: choice: type: string - default: ipv4_neighbors + x-enum: + link_bandwidth_subtype: + x-field-uid: 1 + x-field-uid: 1 + enum: + - link_bandwidth_subtype + link_bandwidth_subtype: + x-field-uid: 2 + $ref: '#/components/schemas/Result.ExtendedCommunity.NonTransitive2OctetAsType.LinkBandwidth' + Result.BgpCommunity: + description: |- + BGP communities provide additional capability for tagging routes and for modifying BGP routing policy on upstream and downstream routers. BGP community is a 32-bit number which is broken into 16-bit AS number and a 16-bit custom value. + type: object + properties: + type: + description: |- + The type of community AS number. If community type is manual_as_number then as_number and as_custom will be available. + type: string x-field-uid: 1 x-enum: - ipv4_neighbors: + manual_as_number: x-field-uid: 1 - ipv6_neighbors: + no_export: x-field-uid: 2 - bgp_prefixes: + no_advertised: x-field-uid: 3 - isis_lsps: + no_export_subconfed: x-field-uid: 4 - lldp_neighbors: + llgr_stale: x-field-uid: 5 - rsvp_lsps: + no_llgr: x-field-uid: 6 enum: - - ipv4_neighbors - - ipv6_neighbors - - bgp_prefixes - - isis_lsps - - lldp_neighbors - - rsvp_lsps - ipv4_neighbors: - $ref: '#/components/schemas/Neighborsv4.States.Request' + - manual_as_number + - no_export + - no_advertised + - no_export_subconfed + - llgr_stale + - no_llgr + as_number: + description: |- + First two octets of 32 bit community AS number. + type: integer + format: uint32 + maximum: 65535 x-field-uid: 2 - ipv6_neighbors: - $ref: '#/components/schemas/Neighborsv6.States.Request' + as_custom: + description: "Last two octets of the community value. " + type: integer + format: uint32 + maximum: 65535 x-field-uid: 3 - bgp_prefixes: - $ref: '#/components/schemas/BgpPrefix.State.Request' - x-field-uid: 4 - isis_lsps: - $ref: '#/components/schemas/IsisLsps.State.Request' - x-field-uid: 5 - lldp_neighbors: - $ref: '#/components/schemas/LldpNeighbors.State.Request' - x-field-uid: 6 - rsvp_lsps: - $ref: '#/components/schemas/RsvpLsps.State.Request' - x-field-uid: 7 - States.Response: + Result.BgpAsPath: description: |- - Response containing chosen traffic generator states + This attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. type: object properties: - choice: + segments: + description: "AS Path segments present in the received AS Path attribute. " + type: array + items: + $ref: '#/components/schemas/Result.BgpAsPathSegment' + x-field-uid: 1 + Result.BgpAsPathSegment: + description: |- + Configuration for a single BGP AS path segment + type: object + properties: + type: + description: |- + AS sequence is the most common type of AS_PATH, it contains the list of ASNs starting with the most recent ASN being added read from left to right. + The other three AS_PATH types are used for Confederations - AS_SET is the type of AS_PATH attribute that summarizes routes using using the aggregate-address command, allowing AS_PATHs to be summarized in the update as well. - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most recent ASN to be added reading left to right - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent in BGP Updates. type: string - default: ipv4_neighbors x-field-uid: 1 x-enum: - ipv4_neighbors: + as_seq: x-field-uid: 1 - ipv6_neighbors: + as_set: x-field-uid: 2 - bgp_prefixes: + as_confed_seq: x-field-uid: 3 - isis_lsps: + as_confed_set: x-field-uid: 4 - lldp_neighbors: - x-field-uid: 5 - rsvp_lsps: - x-field-uid: 6 enum: - - ipv4_neighbors - - ipv6_neighbors - - bgp_prefixes - - isis_lsps - - lldp_neighbors - - rsvp_lsps - ipv4_neighbors: + - as_seq + - as_set + - as_confed_seq + - as_confed_set + as_numbers: + description: |- + The AS numbers in this AS path segment. + type: array + items: + type: integer + format: uint32 + x-field-uid: 2 + IsisLsps.State.Request: + description: |- + The request to retrieve ISIS Link State PDU (LSP) information learned by the router. + type: object + properties: + isis_router_names: + description: | + The names of ISIS routers for which learned information is requested. An empty list will return results for all ISIS routers. + + x-constraint: + - /components/schemas/Device.IsisRouter/properties/name + + + x-constraint: + - /components/schemas/Device.IsisRouter/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Device.IsisRouter/properties/name + x-field-uid: 1 + IsisLsps.State: + description: |- + The result of ISIS LSP information that are retrieved. + type: object + properties: + isis_router_name: + description: |- + The name of the ISIS Router. + type: string + x-field-uid: 1 + lsps: + description: |- + One or more LSPs that are learned by this ISIS router. + type: array + items: + $ref: '#/components/schemas/IsisLsp.State' + x-field-uid: 2 + IsisLsp.State: + description: |- + ISIS LSP. + type: object + required: + - lsp_id + properties: + lsp_id: + description: |- + LSP ID in the format, e.g. '640000000001-00-00'. LSP ID consists of the System ID of a neighbor, the Pseudonode ID, and the LSP number. The last two bytes represent Pseudonode ID and LSP number respectively. A pseudonode is a logical representation of the LAN which is generated by a Designated Intermediate System (DIS) on a LAN segment. If one LSP exceeds the maximum LSP size then it is sent in another LSP with the LSP number incremented by one. A router's learned LSP gets refreshed by 'remaining_lifetime'. Then the sequence number is incremented by 1. + type: string + x-field-uid: 1 + pdu_type: + description: |- + Link State PDU type. + type: string + x-field-uid: 2 + x-enum: + level_1: + x-field-uid: 1 + level_2: + x-field-uid: 2 + enum: + - level_1 + - level_2 + remaining_lifetime: + description: |- + Remaining lifetime in seconds before LSP expires. + type: integer + format: uint32 + x-field-uid: 3 + sequence_number: + description: |- + Sequence number of the LSP. + type: integer + format: uint64 + x-field-uid: 4 + pdu_length: + description: |- + Total length of the LSP. + type: integer + format: uint32 + maximum: 65535 + x-field-uid: 5 + flags: + description: |- + LSP Type-Block flags. + $ref: '#/components/schemas/IsisLsp.Flags' + x-field-uid: 6 + is_type: + description: "IS Type - bits 1 and 2 indicate the type of Intermediate System.\n\ + 1 - ( i.e. bit 1 set) Level 1 Intermediate system.\n2 - Unused value.\n\ + 3 - (i.e. bits 1 and 2 set) Level 2 Intermediate system. " + type: integer + format: uint32 + maximum: 3 + x-field-uid: 7 + tlvs: + description: |- + It refers to Link State PDU State TLVs container. + $ref: '#/components/schemas/IsisLsp.Tlvs' + x-field-uid: 8 + IsisLsp.Tlvs: + description: |- + This contains the list of TLVs present in one LSP. + type: object + properties: + hostname_tlvs: + description: |- + Array of Hostname TLVs ( type 137) present in this LSP. + type: array + items: + $ref: '#/components/schemas/IsisLsp.Hostname' + x-field-uid: 1 + is_reachability_tlvs: + description: |- + Array of IS-Reachability TLVs (type 2) present in this LSP. type: array items: - $ref: '#/components/schemas/Neighborsv4.State' + $ref: '#/components/schemas/IsisLsp.IsReachabilityTlv' x-field-uid: 2 - ipv6_neighbors: + extended_is_reachability_tlvs: + description: |- + Array of Extended IS-Reachability TLVs (type 22) present in this LSP. type: array items: - $ref: '#/components/schemas/Neighborsv6.State' + $ref: '#/components/schemas/IsisLsp.ExtendedIsReachabilityTlv' x-field-uid: 3 - bgp_prefixes: + ipv4_internal_reachability_tlvs: + description: |- + Array of IPv4 Internal Reachability TLVs (type 128) present in this LSP. type: array items: - $ref: '#/components/schemas/BgpPrefixes.State' + $ref: '#/components/schemas/IsisLsp.Ipv4InternalReachabilityTlv' x-field-uid: 4 - isis_lsps: + ipv4_external_reachability_tlvs: + description: |- + Array of IPv4 External Reachability TLVs (type 130) present in this LSP. type: array items: - $ref: '#/components/schemas/IsisLsps.State' + $ref: '#/components/schemas/IsisLsp.Ipv4ExternalReachabilityTlv' x-field-uid: 5 - lldp_neighbors: + extended_ipv4_reachability_tlvs: + description: |- + Array of IPv4 Extended Reachability TLVs (type 135) present in this LSP. type: array items: - $ref: '#/components/schemas/LldpNeighbors.State' + $ref: '#/components/schemas/IsisLsp.ExtendedIpv4ReachabilityTlv' x-field-uid: 6 - rsvp_lsps: + ipv6_reachability_tlvs: + description: |- + Array of IPv6 Reachability TLVs (type 236) present in this LSP. type: array items: - $ref: '#/components/schemas/RsvpLsps.State' + $ref: '#/components/schemas/IsisLsp.Ipv6ReachabilityTlv' x-field-uid: 7 - Neighborsv4.States.Request: + IsisLsp.Hostname: description: |- - The request to retrieve IPv4 Neighbor state (ARP cache entries) of a network interface(s). + It contains Hostname for the TLV 137. type: object properties: - ethernet_names: - description: | - The names of Ethernet interfaces for which Neighbor state (ARP cache entries) will be retrieved. If no names are specified then the results will contain Neighbor state (ARP cache entries) for all available Ethernet interfaces. - - x-constraint: - - /components/schemas/Device.Ethernet/properties/name - - - x-constraint: - - /components/schemas/Device.Ethernet/properties/name - type: array - items: - type: string - x-constraint: - - /components/schemas/Device.Ethernet/properties/name + hostname: + description: |- + Hostname for an ISIS router. + type: string x-field-uid: 1 - Neighborsv4.State: + IsisLsp.Flags: description: |- - IPv4 Neighbor state (ARP cache entry). + LSP Type flags. type: object - required: - - ethernet_name - - ipv4_address properties: - ethernet_name: + partition_repair: description: |- - The name of the Ethernet interface associated with the Neighbor state (ARP cache entry). - type: string + When set, the originator supports partition repair. + type: boolean x-field-uid: 1 - ipv4_address: + attached_error: description: |- - The IPv4 address of the neighbor. - type: string - format: ipv4 + When set, the originator is attached to another area using the referred metric. + type: boolean x-field-uid: 2 - link_layer_address: + attached_expense: description: |- - The link-layer address (MAC) of the neighbor. - type: string - format: mac + When set, the originator is attached to another + area using the referred metric. + type: boolean x-field-uid: 3 - Neighborsv6.States.Request: + attached_delay: + description: |- + Delay Metric - when set, the originator is attached to another + area using the referred metric. + type: boolean + x-field-uid: 4 + attached_default: + description: |- + Default Metric - when set, the originator is attached to another + area using the referred metric. + type: boolean + x-field-uid: 5 + overload: + description: |- + Overload bit - when set, the originator is overloaded, and must + be avoided in path calculation. + type: boolean + x-field-uid: 6 + IsisLsp.IsReachabilityTlv: description: |- - The request to retrieve IPv6 Neighbor state (NDISC cache entries) of a network interface(s). + This container describes list of ISIS neighbors and attributes in IS-Reachability TLV (type 2). type: object properties: - ethernet_names: - description: | - The names of Ethernet interfaces for which Neighbor state (NDISC cache entries) will be retrieved. If no names are specified then the results will contain Neighbor state (NDISC cache entries) for all available Ethernet interfaces. - - x-constraint: - - /components/schemas/Device.Ethernet/properties/name - - - x-constraint: - - /components/schemas/Device.Ethernet/properties/name + neighbors: + description: |- + This container describes Intermediate System (IS) neighbors. type: array items: - type: string - x-constraint: - - /components/schemas/Device.Ethernet/properties/name + $ref: '#/components/schemas/IsisLsp.neighbor' x-field-uid: 1 - Neighborsv6.State: + IsisLsp.ExtendedIsReachabilityTlv: description: |- - IPv6 Neighbor state (NDISC cache entry). + This is list of ISIS neighbors and attributes in Extended-IS-Reachability TLV (type 22). type: object - required: - - ethernet_name - - ipv6_address properties: - ethernet_name: + neighbors: description: |- - The name of the Ethernet interface associated with the Neighbor state (NDISC cache entry). - type: string + This container describes IS neighbors. + type: array + items: + $ref: '#/components/schemas/IsisLsp.neighbor' x-field-uid: 1 - ipv6_address: - description: |- - The IPv6 address of the neighbor. - type: string - format: ipv6 - x-field-uid: 2 - link_layer_address: + IsisLsp.neighbor: + description: |- + This contains IS neighbors. + type: object + properties: + system_id: description: |- - The link-layer address (MAC) of the neighbor. + The System ID for this emulated ISIS router, e.g. "640100010000". type: string - format: mac - x-field-uid: 3 - BgpPrefix.State.Request: + format: hex + x-field-uid: 1 + IsisLsp.Ipv4InternalReachabilityTlv: description: |- - The request to retrieve BGP peer prefix information. + This container defines list of IPv4 internal reachability information in one IPv4 internal reachability TLV. + This is advertised when the origin-type is set 'internal' in route range configurations. type: object properties: - bgp_peer_names: - description: | - The names of BGP peers for which prefix information will be retrieved. If no names are specified then the results will contain prefix information for all configured BGP peers. - - x-constraint: - - /components/schemas/Bgp.V4Peer/properties/name - - /components/schemas/Bgp.V6Peer/properties/name - - - x-constraint: - - /components/schemas/Bgp.V4Peer/properties/name - - /components/schemas/Bgp.V6Peer/properties/name - type: array - items: - type: string - x-constraint: - - /components/schemas/Bgp.V4Peer/properties/name - - /components/schemas/Bgp.V6Peer/properties/name - x-field-uid: 1 - prefix_filters: - description: |- - Specify which prefixes to return. If the list is empty or missing then all prefixes will be returned. - type: array - items: - type: string - x-enum: - ipv4_unicast: - x-field-uid: 1 - ipv6_unicast: - x-field-uid: 2 - enum: - - ipv4_unicast - - ipv6_unicast - x-field-uid: 2 - ipv4_unicast_filters: + prefixes: description: |- - The IPv4 unicast results can be filtered by specifying additional prefix search criteria. If the ipv4_unicast_filters property is missing or empty then all IPv4 prefixes will be returned. + Describes list of IPv4 prefixes in this TLV. type: array items: - $ref: '#/components/schemas/BgpPrefix.Ipv4Unicast.Filter' - x-field-uid: 3 - ipv6_unicast_filters: + $ref: '#/components/schemas/IsisLsp.V4Prefix' + x-field-uid: 1 + IsisLsp.Ipv4ExternalReachabilityTlv: + description: |- + This container defines list of IPv4 external reachability information in one IPv4 external reachability TLV. + This is advertised when the origin-type is set 'external' in route range configurations. + type: object + properties: + prefixes: description: |- - The IPv6 unicast results can be filtered by specifying additional prefix search criteria. If the ipv6_unicast_filters property is missing or empty then all IPv6 prefixes will be returned. + Describes list of IPv4 prefixes in this TLV.. type: array items: - $ref: '#/components/schemas/BgpPrefix.Ipv6Unicast.Filter' - x-field-uid: 4 - BgpPrefix.Ipv4Unicast.Filter: + $ref: '#/components/schemas/IsisLsp.V4Prefix' + x-field-uid: 1 + IsisLsp.V4Prefix: + description: |- + This group defines attributes of an IPv4 standard prefix. type: object properties: - addresses: + ipv4_address: description: |- - The addresses to match. If the addresses property is missing or empty then all addresses will match. - type: array - items: - type: string - format: ipv4 + An IPv4 unicast prefix reachable via the originator of this LSP. + type: string x-field-uid: 1 prefix_length: + description: |- + The length of the IPv4 prefix. + type: integer + format: uint32 + maximum: 32 x-field-uid: 2 + redistribution_type: + description: "Up (0)-used when a prefix is initially advertised within the\ + \ ISIS L3 hierarchy, \n and for all other prefixes in L1 and L2 LSPs.\ + \ (default) \nDown (1)-used when an L1/L2 router advertises L2 prefixes\ + \ in L1 LSPs. \nThe prefixes are being advertised from a higher level\ + \ (L2) down to a lower level (L1). " + type: string + x-field-uid: 3 + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + enum: + - up + - down + default_metric: description: |- - The prefix length to match. If the prefix length is missing then all prefix lengths will match. + ISIS default metric value. type: integer format: uint32 - maximum: 128 - origin: - x-field-uid: 3 - description: |- - The origin to match. If the origin is missing then all origins will match. + x-field-uid: 4 + origin_type: + description: "The origin of the advertised route-internal or external to\ + \ the ISIS area. Options include the following: \n Internal-for intra-area\ + \ routes, through Level 1 LSPs. \n External-for inter-area routes redistributed\ + \ within L1, through Level\n1 LSPs." type: string + x-field-uid: 5 x-enum: - igp: + internal: x-field-uid: 1 - egp: + external: x-field-uid: 2 - incomplete: - x-field-uid: 3 enum: - - igp - - egp - - incomplete - path_id: - x-field-uid: 4 - description: |- - The path id to match. If the path id is missing then all path ids will match. - type: integer - format: uint32 - BgpPrefix.Ipv6Unicast.Filter: + - internal + - external + IsisLsp.ExtendedIpv4ReachabilityTlv: + description: |- + This container defines list of IPv4 extended reachability information in one Extended IPv4 External Reachability TLV. + It is advertised when the 'wide metric' is enabled. type: object properties: - addresses: + prefixes: description: |- - The addresses to match. If the addresses property is missing or empty then all addresses will match. + IPv4 prefix contained within extended reachability TLVs. type: array items: - type: string - format: ipv6 + $ref: '#/components/schemas/IsisLsp.ExtendedV4Prefix' + x-field-uid: 1 + IsisLsp.ExtendedV4Prefix: + description: |- + This group defines attributes of an IPv4 standard prefix. + type: object + properties: + ipv4_address: + description: |- + An IPv4 unicast prefix reachable via the originator of this LSP. + type: string + format: ipv4 x-field-uid: 1 prefix_length: + description: |- + The length of the IPv4 prefix. + type: integer + format: uint32 + maximum: 32 x-field-uid: 2 + metric: description: |- - The prefix length to match. If the prefix length is missing then all prefix lengths will match. + ISIS wide metric. type: integer format: uint32 - maximum: 128 - origin: x-field-uid: 3 - description: |- - The origin to match. If the origin is missing then all origins will match. + redistribution_type: + description: "Up (0)-used when a prefix is initially advertised within the\ + \ ISIS L3 hierarchy, \n and for all other prefixes in L1 and L2 LSPs.\ + \ (default) \nDown (1)-used when an L1/L2 router advertises L2 prefixes\ + \ in L1 LSPs. \nThe prefixes are being advertised from a higher level\ + \ (L2) down to a lower level (L1). " type: string + x-field-uid: 4 x-enum: - igp: + up: x-field-uid: 1 - egp: + down: x-field-uid: 2 - incomplete: - x-field-uid: 3 enum: - - igp - - egp - - incomplete - path_id: - x-field-uid: 4 - description: |- - The path id to match. If the path id is missing then all path ids will match. - type: integer - format: uint32 - BgpPrefixes.State: + - up + - down + prefix_attributes: + $ref: '#/components/schemas/IsisLsp.PrefixAttributes' + x-field-uid: 5 + IsisLsp.Ipv6ReachabilityTlv: description: |- - BGP peer prefixes. + It defines list of IPv6 extended reachability information in one IPv6 Reachability TLV. type: object properties: - bgp_peer_name: + prefixes: description: |- - The name of a BGP peer. - type: string - x-field-uid: 1 - ipv4_unicast_prefixes: - type: array - items: - $ref: '#/components/schemas/BgpPrefixIpv4Unicast.State' - x-field-uid: 2 - ipv6_unicast_prefixes: + IPv6 prefix contained within reachability TLVs. type: array items: - $ref: '#/components/schemas/BgpPrefixIpv6Unicast.State' - x-field-uid: 3 - BgpPrefixIpv4Unicast.State: + $ref: '#/components/schemas/IsisLsp.V6Prefix' + x-field-uid: 1 + IsisLsp.V6Prefix: description: |- - IPv4 unicast prefix. + It defines attributes of an IPv6 standard prefix. type: object properties: - ipv4_address: + ipv6_address: description: |- - An IPv4 unicast address + An IPv6 unicast prefix reachable via the originator of this LSP. type: string + format: ipv6 x-field-uid: 1 prefix_length: - x-field-uid: 2 description: |- - The length of the prefix. + The length of the IPv6 prefix. type: integer format: uint32 maximum: 128 - origin: - x-field-uid: 3 + x-field-uid: 2 + metric: description: |- - The origin of the prefix. + ISIS wide metric. + type: integer + format: uint32 + x-field-uid: 3 + redistribution_type: + description: "Up (0)-used when a prefix is initially advertised within the\ + \ ISIS L3 hierarchy, \n and for all other prefixes in L1 and L2 LSPs.\ + \ (default) \nDown (1)-used when an L1/L2 router advertises L2 prefixes\ + \ in L1 LSPs. \nThe prefixes are being advertised from a higher level\ + \ (L2) down to a lower level (L1). " type: string + x-field-uid: 4 x-enum: - igp: + up: x-field-uid: 1 - egp: + down: x-field-uid: 2 - incomplete: - x-field-uid: 3 enum: - - igp - - egp - - incomplete - path_id: - x-field-uid: 4 - description: |- - The path id. - type: integer - format: uint32 - ipv4_next_hop: - x-field-uid: 5 - description: |- - The IPv4 address of the egress interface. + - up + - down + origin_type: + description: "The origin of the advertised route-internal or external to\ + \ the ISIS area. Options include the following: \n Internal-for intra-area\ + \ routes, through Level 1 LSPs. \n External-for inter-area routes redistributed\ + \ within L1, through Level\n1 LSPs." type: string - format: ipv4 - ipv6_next_hop: + x-field-uid: 5 + x-enum: + internal: + x-field-uid: 1 + external: + x-field-uid: 2 + enum: + - internal + - external + prefix_attributes: + $ref: '#/components/schemas/IsisLsp.PrefixAttributes' x-field-uid: 6 + IsisLsp.PrefixAttributes: + description: |- + This contains the properties of ISIS Prefix attributes for the extended IPv4 and IPv6 reachability. https://www.rfc-editor.org/rfc/rfc7794.html + type: object + properties: + x_flag: description: |- - The IPv6 address of the egress interface. - type: string - format: ipv6 - communities: - x-field-uid: 7 + External Prefix Flag (Bit 0) + type: boolean + x-field-uid: 1 + r_flag: description: |- - Optional community attributes. + Re-advertisement Flag (Bit 1) + type: boolean + x-field-uid: 2 + n_flag: + description: |- + Node Flag (Bit 2) + type: boolean + x-field-uid: 3 + LldpNeighbors.State.Request: + description: |- + The request to retrieve LLDP neighbor information for a given instance. + type: object + properties: + lldp_names: + description: | + The names of LLDP instances for which neighbor information will be retrieved. If no names are specified then the results will contain neighbor information for all configured LLDP instances. + + x-constraint: + - /components/schemas/Lldp/properties/name + + + x-constraint: + - /components/schemas/Lldp/properties/name type: array items: - $ref: '#/components/schemas/Result.BgpCommunity' - as_path: - x-field-uid: 8 - $ref: '#/components/schemas/Result.BgpAsPath' - local_preference: - x-field-uid: 9 - description: |- - The local preference is a well-known attribute and the value is used for route selection. The route with the highest local preference value is preferred. - type: integer - format: uint32 - multi_exit_discriminator: - x-field-uid: 10 + type: string + x-constraint: + - /components/schemas/Lldp/properties/name + x-field-uid: 1 + neighbor_id_filters: description: |- - The multi exit discriminator (MED) is an optional non-transitive attribute and the value is used for route selection. The route with the lowest MED value is preferred. - type: integer - format: uint32 - BgpPrefixIpv6Unicast.State: + Specify the neighbors for which information will be returned. If empty or missing then information for all neighbors will be returned. + type: array + items: + type: string + x-field-uid: 2 + LldpNeighbors.State: description: |- - IPv6 unicast prefix. + LLDP neighbor information. type: object properties: - ipv6_address: + lldp_name: description: |- - An IPv6 unicast address + The name of the LLDP instance. type: string x-field-uid: 1 - prefix_length: + system_name: + description: |- + The system name field shall contain an alpha-numeric string that indicates the system's administratively assigned name. The system name should be the system's fully qualified domain name. If implementations support IETF RFC 3418, the sysName object should be used for this field. + type: string x-field-uid: 2 + system_description: description: |- - The length of the prefix. - type: integer - format: uint32 - maximum: 128 - origin: + The system description field shall contain an alpha-numeric string that is the textual description of the network entity. The system description should include the full name and version identification of the system's hardware type, software operating system, and networking software. If implementations support IETF RFC 3418, the sysDescr object should be used for this field. + type: string x-field-uid: 3 + chassis_id: description: |- - The origin of the prefix. + The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. + type: string + x-field-uid: 4 + chassis_id_type: + description: |- + This field identifies the format and source of the chassis identifier string. It is an enumerator defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. type: string x-enum: - igp: + port_component: x-field-uid: 1 - egp: + network_address: x-field-uid: 2 - incomplete: + chassis_component: x-field-uid: 3 - enum: - - igp - - egp - - incomplete - path_id: - x-field-uid: 4 - description: |- - The path id. - type: integer - format: uint32 - ipv4_next_hop: + mac_address: + x-field-uid: 4 + interface_name: + x-field-uid: 5 + local: + x-field-uid: 6 + interface_alias: + x-field-uid: 7 x-field-uid: 5 + enum: + - port_component + - network_address + - chassis_component + - mac_address + - interface_name + - local + - interface_alias + neighbor_id: description: |- - The IPv4 address of the egress interface. + System generated identifier for the neighbor on the LLDP instance. type: string - format: ipv4 - ipv6_next_hop: x-field-uid: 6 + age: description: |- - The IPv6 address of the egress interface. - type: string - format: ipv6 - communities: + Age since discovery in seconds. + type: integer + format: uint32 x-field-uid: 7 + last_update: description: |- - Optional community attributes. - type: array - items: - $ref: '#/components/schemas/Result.BgpCommunity' - as_path: - x-field-uid: 8 - $ref: '#/components/schemas/Result.BgpAsPath' - local_preference: - x-field-uid: 9 - description: |- - The local preference is a well-known attribute and the value is used for route selection. The route with the highest local preference value is preferred. + Seconds since last update received. type: integer format: uint32 - multi_exit_discriminator: - x-field-uid: 10 + x-field-uid: 8 + ttl: description: |- - The multi exit discriminator (MED) is an optional non-transitive attribute and the value is used for route selection. The route with the lowest MED value is preferred. + The time-to-live (TTL) in seconds is a mandatory TLV which indicates how long information from the neighbor should be considered valid. type: integer format: uint32 - Result.BgpCommunity: - description: |- - BGP communities provide additional capability for tagging routes and for modifying BGP routing policy on upstream and downstream routers. BGP community is a 32-bit number which is broken into 16-bit AS number and a 16-bit custom value. - type: object - properties: - type: + x-field-uid: 9 + port_id: description: |- - The type of community AS number. If community type is manual_as_number then as_number and as_custom will be available. + The Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater port, then this TLV is optional. + type: string + x-field-uid: 10 + port_id_type: + description: |- + This field identifies the format and source of the port identifier string. It is an enumerator defined by the PtopoPortIdType object from RFC2922. type: string - x-field-uid: 1 x-enum: - manual_as_number: + port_component: x-field-uid: 1 - no_export: + network_address: x-field-uid: 2 - no_advertised: + agent_circuit_id: x-field-uid: 3 - no_export_subconfed: + mac_address: x-field-uid: 4 - llgr_stale: + interface_name: x-field-uid: 5 - no_llgr: + local: x-field-uid: 6 + interface_alias: + x-field-uid: 7 + x-field-uid: 11 enum: - - manual_as_number - - no_export - - no_advertised - - no_export_subconfed - - llgr_stale - - no_llgr - as_number: + - port_component + - network_address + - agent_circuit_id + - mac_address + - interface_name + - local + - interface_alias + port_description: description: |- - First two octets of 32 bit community AS number. + The binary string containing the actual port identifier for the port which this LLDP PDU was transmitted. The source and format of this field is defined by PtopoPortId from RFC2922. + type: string + x-field-uid: 12 + management_address: + description: |- + The Management Address is a mandatory TLV which identifies a network address associated with the local LLDP agent, which can be used to reach the agent on the port identified in the Port ID TLV. + type: string + x-field-uid: 13 + management_address_type: + description: |- + The enumerated value for the network address type identified in this TLV. This enumeration is defined in the 'Assigned Numbers' RFC [RFC3232] and the ianaAddressFamilyNumbers object. + type: string + x-field-uid: 14 + custom_tlvs: + type: array + items: + $ref: '#/components/schemas/LldpCustomTLV.State' + x-field-uid: 15 + capabilities: + type: array + items: + $ref: '#/components/schemas/LldpCapability.State' + x-field-uid: 16 + LldpCustomTLV.State: + description: |- + Custom TLV received from a neighbor.Custom TLVs are organization specific TLVs advertised with TLV type 127. + type: object + properties: + custom_type: + description: |- + The integer value identifying the type of information contained in the value field. type: integer format: uint32 - maximum: 65535 + x-field-uid: 1 + oui: + description: |- + The organizationally unique identifier field shall contain the organization's OUI as defined in Clause 9 of IEEE Std 802. The high-order octet is 0 and the low-order 3 octets are the SMI Network Management Private Enterprise Code of the Vendor in network byte order, as defined in the 'Assigned Numbers' RFC [RFC3232]. + type: string x-field-uid: 2 - as_custom: - description: "Last two octets of the community value. " + oui_subtype: + description: |- + The organizationally defined subtype field shall contain a unique subtype value assigned by the defining organization. type: integer format: uint32 - maximum: 65535 x-field-uid: 3 - Result.BgpAsPath: - description: |- - This attribute identifies the autonomous systems through which routing information carried in this UPDATE message has passed. - type: object - properties: - segments: - description: "AS Path segments present in the received AS Path attribute. " - type: array - items: - $ref: '#/components/schemas/Result.BgpAsPathSegment' - x-field-uid: 1 - Result.BgpAsPathSegment: + information: + description: |- + Contains information on the remaining bytes of the received Organization-Specific TLV after the sub-type field. The value must be returned in lowercase hexadecimal format. + type: string + x-field-uid: 4 + LldpCapability.State: description: |- - Configuration for a single BGP AS path segment + LLDP system capability advertised by the neighbor type: object properties: - type: + capability_name: description: |- - AS sequence is the most common type of AS_PATH, it contains the list of ASNs starting with the most recent ASN being added read from left to right. - The other three AS_PATH types are used for Confederations - AS_SET is the type of AS_PATH attribute that summarizes routes using using the aggregate-address command, allowing AS_PATHs to be summarized in the update as well. - AS_CONFED_SEQ gives the list of ASNs in the path starting with the most recent ASN to be added reading left to right - AS_CONFED_SET will allow summarization of multiple AS PATHs to be sent in BGP Updates. + Name of the system capability advertised by the neighbor. Capabilities are represented in a bitmap that defines the primary functions of the system. The capabilities are defined in IEEE 802.1AB. type: string - x-field-uid: 1 x-enum: - as_seq: + mac_bridge: x-field-uid: 1 - as_set: + two_port_mac_relay: x-field-uid: 2 - as_confed_seq: + repeater: x-field-uid: 3 - as_confed_set: + docsis_cable_device: x-field-uid: 4 + s_vlan: + x-field-uid: 5 + telephone: + x-field-uid: 6 + other: + x-field-uid: 7 + router: + x-field-uid: 8 + c_vlan: + x-field-uid: 9 + station_only: + x-field-uid: 10 + wlan_access_point: + x-field-uid: 11 + x-field-uid: 1 enum: - - as_seq - - as_set - - as_confed_seq - - as_confed_set - as_numbers: + - mac_bridge + - two_port_mac_relay + - repeater + - docsis_cable_device + - s_vlan + - telephone + - other + - router + - c_vlan + - station_only + - wlan_access_point + capability_enabled: description: |- - The AS numbers in this AS path segment. - type: array - items: - type: integer - format: uint32 + Indicates whether the corresponding system capability is enabled on the neighbor. + type: boolean x-field-uid: 2 - IsisLsps.State.Request: + RsvpLsps.State.Request: description: |- - The request to retrieve ISIS Link State PDU (LSP) information learned by the router. + The request to retrieve RSVP Label Switched Path (LSP) information learned by the router. type: object properties: - isis_router_names: + rsvp_router_names: description: | - The names of ISIS routers for which learned information is requested. An empty list will return results for all ISIS routers. + The names of RSVP-TE routers for which learned information is requested. An empty list will return results for all RSVP=TE routers. x-constraint: - - /components/schemas/Device.IsisRouter/properties/name + - /components/schemas/Device.Rsvp/properties/name x-constraint: - - /components/schemas/Device.IsisRouter/properties/name + - /components/schemas/Device.Rsvp/properties/name type: array items: type: string x-constraint: - - /components/schemas/Device.IsisRouter/properties/name + - /components/schemas/Device.Rsvp/properties/name x-field-uid: 1 - IsisLsps.State: + RsvpLsps.State: description: |- - The result of ISIS LSP information that are retrieved. + Discovered IPv4 Point-to-Point LSPs of a RSVP-TE router. type: object properties: - isis_router_name: + rsvp_router_name: description: |- - The name of the ISIS Router. + The name of the RSVP-TE Router. type: string x-field-uid: 1 - lsps: + ipv4_lsps: description: |- - One or more LSPs that are learned by this ISIS router. + IPv4 Point-to-Point RSVP-TE Discovered LSPs. type: array items: - $ref: '#/components/schemas/IsisLsp.State' + $ref: '#/components/schemas/RsvpIPv4Lsp.State' x-field-uid: 2 - IsisLsp.State: + RsvpIPv4Lsp.State: description: |- - ISIS LSP. + IPv4 RSVP-TE Discovered LSPs. type: object - required: - - lsp_id properties: - lsp_id: + source_address: description: |- - LSP ID in the format, e.g. '640000000001-00-00'. LSP ID consists of the System ID of a neighbor, the Pseudonode ID, and the LSP number. The last two bytes represent Pseudonode ID and LSP number respectively. A pseudonode is a logical representation of the LAN which is generated by a Designated Intermediate System (DIS) on a LAN segment. If one LSP exceeds the maximum LSP size then it is sent in another LSP with the LSP number incremented by one. A router's learned LSP gets refreshed by 'remaining_lifetime'. Then the sequence number is incremented by 1. + The origin IPv4 address of RSVP session. type: string + format: ipv4 x-field-uid: 1 - pdu_type: + destination_address: description: |- - Link State PDU type. + The IPv4 destination address of RSVP session. type: string + format: ipv4 x-field-uid: 2 - x-enum: - level_1: - x-field-uid: 1 - level_2: - x-field-uid: 2 - enum: - - level_1 - - level_2 - remaining_lifetime: + lsp: description: |- - Remaining lifetime in seconds before LSP expires. - type: integer - format: uint32 + It refers to the RSVP LSP properties. + $ref: '#/components/schemas/RsvpLsp.State' x-field-uid: 3 - sequence_number: + rros: description: |- - Sequence number of the LSP. - type: integer - format: uint64 + It refers to RSVP RRO objects container. + items: + $ref: '#/components/schemas/RsvpLsp.Ipv4Rro' + type: array x-field-uid: 4 - pdu_length: + eros: description: |- - Total length of the LSP. - type: integer - format: uint32 - maximum: 65535 + It refers to RSVP ERO objects container. + items: + $ref: '#/components/schemas/RsvpLsp.Ipv4Ero' + type: array x-field-uid: 5 - flags: - description: |- - LSP Type-Block flags. - $ref: '#/components/schemas/IsisLsp.Flags' - x-field-uid: 6 - is_type: - description: "IS Type - bits 1 and 2 indicate the type of Intermediate System.\n\ - 1 - ( i.e. bit 1 set) Level 1 Intermediate system.\n2 - Unused value.\n\ - 3 - (i.e. bits 1 and 2 set) Level 2 Intermediate system. " - type: integer - format: uint32 - maximum: 3 - x-field-uid: 7 - tlvs: - description: |- - It refers to Link State PDU State TLVs container. - $ref: '#/components/schemas/IsisLsp.Tlvs' - x-field-uid: 8 - IsisLsp.Tlvs: + RsvpLsp.State: description: |- - This contains the list of TLVs present in one LSP. + IPv4 RSVP-TE Discovered LSPs. type: object properties: - hostname_tlvs: + tunnel_id: description: |- - Array of Hostname TLVs ( type 137) present in this LSP. - type: array - items: - $ref: '#/components/schemas/IsisLsp.Hostname' + The tunnel id of RSVP session which acts as an identifier that remains constant over the life of the tunnel. + type: integer + format: uint32 x-field-uid: 1 - is_reachability_tlvs: + lsp_id: description: |- - Array of IS-Reachability TLVs (type 2) present in this LSP. - type: array - items: - $ref: '#/components/schemas/IsisLsp.IsReachabilityTlv' + The lsp-id of RSVP session which acts as a differentiator for two lsps originating from the same headend, commonly used to distinguish RSVP sessions during make before break operations. + type: integer + format: uint32 x-field-uid: 2 - extended_is_reachability_tlvs: + session_name: description: |- - Array of Extended IS-Reachability TLVs (type 22) present in this LSP. - type: array - items: - $ref: '#/components/schemas/IsisLsp.ExtendedIsReachabilityTlv' + The value of RSVP-TE Session Name field of the Session Attribute object. + type: string x-field-uid: 3 - ipv4_internal_reachability_tlvs: + label_in: description: |- - Array of IPv4 Internal Reachability TLVs (type 128) present in this LSP. - type: array - items: - $ref: '#/components/schemas/IsisLsp.Ipv4InternalReachabilityTlv' + The label received by RSVP-TE ingress. + type: integer + format: uint32 x-field-uid: 4 - ipv4_external_reachability_tlvs: + label_out: description: |- - Array of IPv4 External Reachability TLVs (type 130) present in this LSP. - type: array - items: - $ref: '#/components/schemas/IsisLsp.Ipv4ExternalReachabilityTlv' + The label assigned by RSVP-TE egress. + type: integer + format: uint32 x-field-uid: 5 - extended_ipv4_reachability_tlvs: + session_status: description: |- - Array of IPv4 Extended Reachability TLVs (type 135) present in this LSP. - type: array - items: - $ref: '#/components/schemas/IsisLsp.ExtendedIpv4ReachabilityTlv' + Operational state of the RSVP LSP. + type: string x-field-uid: 6 - ipv6_reachability_tlvs: + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + enum: + - up + - down + last_flap_reason: description: |- - Array of IPv6 Reachability TLVs (type 236) present in this LSP. - type: array - items: - $ref: '#/components/schemas/IsisLsp.Ipv6ReachabilityTlv' + The reason for the last flap of this RSVP session. + type: string x-field-uid: 7 - IsisLsp.Hostname: - description: |- - It contains Hostname for the TLV 137. - type: object + x-enum: + resv_tear: + x-field-uid: 1 + path_tear: + x-field-uid: 2 + path_timeout: + x-field-uid: 3 + enum: + - resv_tear + - path_tear + - path_timeout + up_time: + description: |- + The tunnel UP time in milli seconds. If the tunnel is DOWN the UP time will be zero. + type: integer + format: uint64 + x-field-uid: 8 + RsvpLsp.Ipv4Rro: + description: "This contains the list of Record Route Object(RRO) objects associated\ + \ with the traffic engineering tunnel. The Record Route Object(RRO) is used\ + \ in RSVP-TE to record the route traversed by the LSP. The RRO might be present\ + \ in both Path message and Resv message, the RRO stores the IP addresses\ + \ of the routers that the traffic engineering tunnel traversed and also the\ + \ label generated and distributed by the routers. The RROs in the Resv message\ + \ mirrors that of the Path message, the only difference is that the RRO in\ + \ a Resv message records the path information in the reverse direction. " properties: - hostname: + address: description: |- - Hostname for an ISIS router. + The IPv4 addresses of the routers that the traffic engineering tunnel traversed. type: string + format: ipv4 x-field-uid: 1 - IsisLsp.Flags: + reported_label: + description: "Label reported for RRO hop. When the Label_Recording flag\ + \ is set in the Session Attribute object, nodes doing route recording\ + \ should include the Label Record subobject containing the reported label. " + type: integer + format: uint32 + x-field-uid: 2 + RsvpLsp.Ipv4Ero: description: |- - LSP Type flags. + This contains the list of sub-objects included in the Explicit Route Object(ERO) object send in the PATH message from the ingress. These sub-objects contain the intermediate hops to be traversed by the LSP while being forwarded towards the egress endpoint. type: object properties: - partition_repair: + prefix: description: |- - When set, the originator supports partition repair. - type: boolean + The IPv4 prefix indicated by the ERO. Specified only when the ERO hop is an IPv4 prefix. + type: string + format: ipv4 x-field-uid: 1 - attached_error: + asn: description: |- - When set, the originator is attached to another area using the referred metric. - type: boolean + The autonomous system number indicated by the ERO. Specified only when the ERO hop is an 2 or 4-byte AS number. + type: integer + format: uint32 x-field-uid: 2 - attached_expense: + type: description: |- - When set, the originator is attached to another - area using the referred metric. - type: boolean + The type indicated by the ERO. + type: string x-field-uid: 3 - attached_delay: - description: |- - Delay Metric - when set, the originator is attached to another - area using the referred metric. - type: boolean - x-field-uid: 4 - attached_default: - description: |- - Default Metric - when set, the originator is attached to another - area using the referred metric. - type: boolean - x-field-uid: 5 - overload: - description: |- - Overload bit - when set, the originator is overloaded, and must - be avoided in path calculation. - type: boolean - x-field-uid: 6 - IsisLsp.IsReachabilityTlv: + x-enum: + ipv4: + x-field-uid: 1 + ipv6: + x-field-uid: 2 + asn: + x-field-uid: 3 + asn4: + x-field-uid: 4 + label: + x-field-uid: 5 + unnumbered_interface: + x-field-uid: 6 + enum: + - ipv4 + - ipv6 + - asn + - asn4 + - label + - unnumbered_interface + Dhcpv4Interface.State.Request: description: |- - This container describes list of ISIS neighbors and attributes in IS-Reachability TLV (type 2). + The request for assigned IPv4 address information associated with DHCP Client sessions. type: object properties: - neighbors: - description: |- - This container describes Intermediate System (IS) neighbors. + dhcp_client_names: + description: | + The names of DHCPv4 client to return results for. An empty list will return results for all DHCPv4 Client address information. + + x-constraint: + - /components/schemas/Device.Dhcpv4client/properties/name + + + x-constraint: + - /components/schemas/Device.Dhcpv4client/properties/name type: array items: - $ref: '#/components/schemas/IsisLsp.neighbor' + type: string + x-constraint: + - /components/schemas/Device.Dhcpv4client/properties/name x-field-uid: 1 - IsisLsp.ExtendedIsReachabilityTlv: + Dhcpv4Interface.State: description: |- - This is list of ISIS neighbors and attributes in Extended-IS-Reachability TLV (type 22). + The IPv4 address associated with this DHCP Client session. type: object properties: - neighbors: + dhcp_client_name: description: |- - This container describes IS neighbors. - type: array - items: - $ref: '#/components/schemas/IsisLsp.neighbor' + The name of a DHCPv4 Client. + type: string x-field-uid: 1 - IsisLsp.neighbor: - description: |- - This contains IS neighbors. - type: object - properties: - system_id: + ipv4_address: description: |- - The System ID for this emulated ISIS router, e.g. "640100010000". + The IPv4 address associated with this DHCP Client session. type: string - format: hex - x-field-uid: 1 - IsisLsp.Ipv4InternalReachabilityTlv: + x-field-uid: 2 + prefix_length: + description: |- + The length of the prefix. + type: integer + format: uint32 + maximum: 32 + x-field-uid: 3 + gateway_address: + description: |- + The Gateway Ipv4 address associated with this DHCP Client session. + type: string + x-field-uid: 4 + lease_time: + description: |- + The duration of the IPv4 address lease, in seconds. + type: integer + format: uint32 + x-field-uid: 5 + renew_time: + description: |- + Time in seconds until the DHCPv4 client starts renewing the lease. + type: integer + format: uint32 + x-field-uid: 6 + rebind_time: + description: |- + Time in seconds until the DHCPv4 client starts rebinding. + type: integer + format: uint32 + x-field-uid: 7 + Dhcpv4Lease.State.Request: description: |- - This container defines list of IPv4 internal reachability information in one IPv4 internal reachability TLV. - This is advertised when the origin-type is set 'internal' in route range configurations. + The request to retrieve DHCP Server host allocated status. type: object properties: - prefixes: - description: |- - Describes list of IPv4 prefixes in this TLV. + dhcp_server_names: + description: | + The names of DHCPv4 server to return results for. An empty list will return results for all DHCPv4 servers. + + x-constraint: + - /components/schemas/Device.Dhcpv4server/properties/name + + + x-constraint: + - /components/schemas/Device.Dhcpv4server/properties/name type: array items: - $ref: '#/components/schemas/IsisLsp.V4Prefix' + type: string + x-constraint: + - /components/schemas/Device.Dhcpv4server/properties/name x-field-uid: 1 - IsisLsp.Ipv4ExternalReachabilityTlv: + Dhcpv4Leases.State: description: |- - This container defines list of IPv4 external reachability information in one IPv4 external reachability TLV. - This is advertised when the origin-type is set 'external' in route range configurations. + Lease information of DHCP Server. type: object properties: - prefixes: + dhcp_server_name: description: |- - Describes list of IPv4 prefixes in this TLV.. + The name of a DHCP Server. + type: string + x-field-uid: 1 + leases: type: array items: - $ref: '#/components/schemas/IsisLsp.V4Prefix' - x-field-uid: 1 - IsisLsp.V4Prefix: + $ref: '#/components/schemas/Dhcpv4Lease.State' + x-field-uid: 2 + Dhcpv4Lease.State: description: |- - This group defines attributes of an IPv4 standard prefix. + IPv4 address lease state. type: object properties: - ipv4_address: + address: description: |- - An IPv4 unicast prefix reachable via the originator of this LSP. + The IPv4 address associated with this lease. type: string x-field-uid: 1 - prefix_length: + valid_time: description: |- - The length of the IPv4 prefix. + The time in seconds after which the IPv4 address lease will expire. type: integer format: uint32 - maximum: 32 x-field-uid: 2 - redistribution_type: - description: "Up (0)-used when a prefix is initially advertised within the\ - \ ISIS L3 hierarchy, \n and for all other prefixes in L1 and L2 LSPs.\ - \ (default) \nDown (1)-used when an L1/L2 router advertises L2 prefixes\ - \ in L1 LSPs. \nThe prefixes are being advertised from a higher level\ - \ (L2) down to a lower level (L1). " - type: string + preferred_time: + description: |- + The elapsed time in seconds since the address has been renewed. + type: integer + format: uint32 x-field-uid: 3 - x-enum: - up: - x-field-uid: 1 - down: - x-field-uid: 2 - enum: - - up - - down - default_metric: + renew_time: description: |- - ISIS default metric value. + Time in seconds until the DHCPv4 client starts renewing the lease. type: integer format: uint32 x-field-uid: 4 - origin_type: - description: "The origin of the advertised route-internal or external to\ - \ the ISIS area. Options include the following: \n Internal-for intra-area\ - \ routes, through Level 1 LSPs. \n External-for inter-area routes redistributed\ - \ within L1, through Level\n1 LSPs." - type: string + rebind_time: + description: |- + Time in seconds until the DHCPv4 client starts rebinding. + type: integer + format: uint32 x-field-uid: 5 - x-enum: - internal: - x-field-uid: 1 - external: - x-field-uid: 2 - enum: - - internal - - external - IsisLsp.ExtendedIpv4ReachabilityTlv: + client_id: + description: |- + The ID of the DHCPv4 client holding this lease. + type: string + x-field-uid: 6 + circuit_id: + description: |- + The Circuit ID option found in the last request message. + type: string + x-field-uid: 7 + remote_id: + description: |- + The Remote ID option found in the last request message. + type: string + x-field-uid: 8 + Dhcpv6Interface.State.Request: description: |- - This container defines list of IPv4 extended reachability information in one Extended IPv4 External Reachability TLV. - It is advertised when the 'wide metric' is enabled. + The request for assigned IPv6 address information associated with DHCP Client sessions. type: object properties: - prefixes: - description: |- - IPv4 prefix contained within extended reachability TLVs. + dhcp_client_names: + description: | + The names of DHCPv6 client to return results for. An empty list will return results for all DHCPv6 Client address information. + + x-constraint: + - /components/schemas/Device.Dhcpv6client/properties/name + + + x-constraint: + - /components/schemas/Device.Dhcpv6client/properties/name type: array items: - $ref: '#/components/schemas/IsisLsp.ExtendedV4Prefix' + type: string + x-constraint: + - /components/schemas/Device.Dhcpv6client/properties/name x-field-uid: 1 - IsisLsp.ExtendedV4Prefix: + Dhcpv6Interface.State: description: |- - This group defines attributes of an IPv4 standard prefix. + The IPv6 address associated with this DHCP Client session. type: object properties: - ipv4_address: + dhcp_client_name: description: |- - An IPv4 unicast prefix reachable via the originator of this LSP. + The name of a DHCPv6 Client. type: string - format: ipv4 x-field-uid: 1 - prefix_length: + iapd_addresses: description: |- - The length of the IPv4 prefix. - type: integer - format: uint32 - maximum: 32 + The IPv6 IAPD addresses and prefixes associated with this DHCP Client session. + type: array + items: + $ref: '#/components/schemas/Dhcpv6Interface.Iapd' x-field-uid: 2 - metric: - description: |- - ISIS wide metric. - type: integer - format: uint32 - x-field-uid: 3 - redistribution_type: - description: "Up (0)-used when a prefix is initially advertised within the\ - \ ISIS L3 hierarchy, \n and for all other prefixes in L1 and L2 LSPs.\ - \ (default) \nDown (1)-used when an L1/L2 router advertises L2 prefixes\ - \ in L1 LSPs. \nThe prefixes are being advertised from a higher level\ - \ (L2) down to a lower level (L1). " - type: string - x-field-uid: 4 - x-enum: - up: - x-field-uid: 1 - down: - x-field-uid: 2 - enum: - - up - - down - prefix_attributes: - $ref: '#/components/schemas/IsisLsp.PrefixAttributes' - x-field-uid: 5 - IsisLsp.Ipv6ReachabilityTlv: - description: |- - It defines list of IPv6 extended reachability information in one IPv6 Reachability TLV. - type: object - properties: - prefixes: + ia_addresses: description: |- - IPv6 prefix contained within reachability TLVs. + The IPv6 IATA/IANA addresses and gateways associated with this DHCP Client session. type: array items: - $ref: '#/components/schemas/IsisLsp.V6Prefix' - x-field-uid: 1 - IsisLsp.V6Prefix: + $ref: '#/components/schemas/Dhcpv6Interface.Ia' + x-field-uid: 3 + Dhcpv6Interface.Iapd: description: |- - It defines attributes of an IPv6 standard prefix. + The IPv6 IAPD address and prefix length associated with this DHCP Client session. type: object properties: - ipv6_address: + address: description: |- - An IPv6 unicast prefix reachable via the originator of this LSP. + The IAPD address associated with this DHCPv6 Client session. type: string format: ipv6 x-field-uid: 1 prefix_length: description: |- - The length of the IPv6 prefix. + The prefix length of the IAPD address associated with this DHCPv6 Client session. type: integer format: uint32 maximum: 128 x-field-uid: 2 - metric: + lease_time: description: |- - ISIS wide metric. + The duration of the IPv6 address lease, in seconds. type: integer format: uint32 x-field-uid: 3 - redistribution_type: - description: "Up (0)-used when a prefix is initially advertised within the\ - \ ISIS L3 hierarchy, \n and for all other prefixes in L1 and L2 LSPs.\ - \ (default) \nDown (1)-used when an L1/L2 router advertises L2 prefixes\ - \ in L1 LSPs. \nThe prefixes are being advertised from a higher level\ - \ (L2) down to a lower level (L1). " - type: string - x-field-uid: 4 - x-enum: - up: - x-field-uid: 1 - down: - x-field-uid: 2 - enum: - - up - - down - origin_type: - description: "The origin of the advertised route-internal or external to\ - \ the ISIS area. Options include the following: \n Internal-for intra-area\ - \ routes, through Level 1 LSPs. \n External-for inter-area routes redistributed\ - \ within L1, through Level\n1 LSPs." - type: string - x-field-uid: 5 - x-enum: - internal: - x-field-uid: 1 - external: - x-field-uid: 2 - enum: - - internal - - external - prefix_attributes: - $ref: '#/components/schemas/IsisLsp.PrefixAttributes' - x-field-uid: 6 - IsisLsp.PrefixAttributes: + Dhcpv6Interface.Ia: description: |- - This contains the properties of ISIS Prefix attributes for the extended IPv4 and IPv6 reachability. https://www.rfc-editor.org/rfc/rfc7794.html + The IPv6 IATA/IANA address and gateway associated with this DHCP Client session. type: object properties: - x_flag: + address: description: |- - External Prefix Flag (Bit 0) - type: boolean + The address associated with this DHCPv6 Client session. + type: string + format: ipv6 x-field-uid: 1 - r_flag: + gateway: description: |- - Re-advertisement Flag (Bit 1) - type: boolean + The Gateway address associated with this DHCPv6 Client session. + type: string + format: ipv6 x-field-uid: 2 - n_flag: + lease_time: description: |- - Node Flag (Bit 2) - type: boolean + The duration of the IPv6 address lease, in seconds. + type: integer + format: uint32 x-field-uid: 3 - LldpNeighbors.State.Request: + Dhcpv6Lease.State.Request: description: |- - The request to retrieve LLDP neighbor information for a given instance. + The request to retrieve DHCP Server host allocated status. type: object properties: - lldp_names: + dhcp_server_names: description: | - The names of LLDP instances for which neighbor information will be retrieved. If no names are specified then the results will contain neighbor information for all configured LLDP instances. + The names of DHCPv6 server to return results for. An empty list will return results for all DHCPv6 servers. x-constraint: - - /components/schemas/Lldp/properties/name + - /components/schemas/Device.Dhcpv6server/properties/name x-constraint: - - /components/schemas/Lldp/properties/name + - /components/schemas/Device.Dhcpv6server/properties/name type: array items: type: string x-constraint: - - /components/schemas/Lldp/properties/name + - /components/schemas/Device.Dhcpv6server/properties/name x-field-uid: 1 - neighbor_id_filters: + Dhcpv6Leases.State: + description: |- + Lease information of DHCP Server. + type: object + properties: + dhcp_server_name: description: |- - Specify the neighbors for which information will be returned. If empty or missing then information for all neighbors will be returned. + The name of a DHCP Server. + type: string + x-field-uid: 1 + leases: type: array items: - type: string + $ref: '#/components/schemas/Dhcpv6ServerLease.State' x-field-uid: 2 - LldpNeighbors.State: + Dhcpv6ServerLease.State: description: |- - LLDP neighbor information. + IPv6 unicast prefix. type: object properties: - lldp_name: + address: description: |- - The name of the LLDP instance. + The IPv6 address associated with this lease. type: string x-field-uid: 1 - system_name: + valid_time: description: |- - The system name field shall contain an alpha-numeric string that indicates the system's administratively assigned name. The system name should be the system's fully qualified domain name. If implementations support IETF RFC 3418, the sysName object should be used for this field. - type: string + The time in seconds, IP address lease will expire. + type: integer + format: uint32 x-field-uid: 2 - system_description: + preferred_time: description: |- - The system description field shall contain an alpha-numeric string that is the textual description of the network entity. The system description should include the full name and version identification of the system's hardware type, software operating system, and networking software. If implementations support IETF RFC 3418, the sysDescr object should be used for this field. - type: string + The time in seconds, elapsed time since address has been renewed. + type: integer + format: uint32 x-field-uid: 3 - chassis_id: + renew_time: description: |- - The Chassis ID is a mandatory TLV which identifies the chassis component of the endpoint identifier associated with the transmitting LLDP agent. - type: string + Time in seconds until the DHCPv6 client starts renewing the lease. + type: integer + format: uint32 x-field-uid: 4 - chassis_id_type: + rebind_time: description: |- - This field identifies the format and source of the chassis identifier string. It is an enumerator defined by the LldpChassisIdSubtype object from IEEE 802.1AB MIB. - type: string - x-enum: - port_component: - x-field-uid: 1 - network_address: - x-field-uid: 2 - chassis_component: - x-field-uid: 3 - mac_address: - x-field-uid: 4 - interface_name: - x-field-uid: 5 - local: - x-field-uid: 6 - interface_alias: - x-field-uid: 7 + Time in seconds until the DHCPv6 client starts rebinding. + type: integer + format: uint32 x-field-uid: 5 - enum: - - port_component - - network_address - - chassis_component - - mac_address - - interface_name - - local - - interface_alias - neighbor_id: + client_id: description: |- - System generated identifier for the neighbor on the LLDP instance. + The ID of the DHCPv6 client holding this lease. type: string x-field-uid: 6 - age: + remote_id: description: |- - Age since discovery in seconds. - type: integer - format: uint32 + The Remote ID option found in the last request message. + type: string x-field-uid: 7 - last_update: + interface_id: description: |- - Seconds since last update received. - type: integer - format: uint32 + The Interface ID option found in the last request message. + type: string x-field-uid: 8 - ttl: - description: |- - The time-to-live (TTL) in seconds is a mandatory TLV which indicates how long information from the neighbor should be considered valid. - type: integer - format: uint32 - x-field-uid: 9 - port_id: + Ospfv2Lsas.State.Request: + description: |- + The request to retrieve OSPFv2 Link State Advertisements (LSA) information learned by the routers. + type: object + properties: + router_names: + description: | + The names of OSPFv2 routers for which learned information is requested. An empty list will return results for all OSPFv2 routers. + + x-constraint: + - /components/schemas/Device.Ospfv2Router/properties/name + + + x-constraint: + - /components/schemas/Device.Ospfv2Router/properties/name + type: array + items: + type: string + x-constraint: + - /components/schemas/Device.Ospfv2Router/properties/name + x-field-uid: 1 + Ospfv2Lsa.State: + description: |- + The result of OSPFv2 LSA information that are retrieved. + type: object + properties: + router_name: description: |- - The Port ID is a mandatory TLV which identifies the port component of the endpoint identifier associated with the transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater port, then this TLV is optional. + The name of the OSPFv2 Router that learned the LSA information. type: string - x-field-uid: 10 - port_id_type: + x-field-uid: 1 + router_lsas: description: |- - This field identifies the format and source of the port identifier string. It is an enumerator defined by the PtopoPortIdType object from RFC2922. - type: string - x-enum: - port_component: - x-field-uid: 1 - network_address: - x-field-uid: 2 - agent_circuit_id: - x-field-uid: 3 - mac_address: - x-field-uid: 4 - interface_name: - x-field-uid: 5 - local: - x-field-uid: 6 - interface_alias: - x-field-uid: 7 - x-field-uid: 11 - enum: - - port_component - - network_address - - agent_circuit_id - - mac_address - - interface_name - - local - - interface_alias - port_description: + One or more OSPFv2 Router-LSA - Type 1. + type: array + items: + $ref: '#/components/schemas/Ospfv2.RouterLsa' + x-field-uid: 2 + network_lsas: description: |- - The binary string containing the actual port identifier for the port which this LLDP PDU was transmitted. The source and format of this field is defined by PtopoPortId from RFC2922. - type: string - x-field-uid: 12 - management_address: + One or more OSPFv2 Network-LSA - Type 2. + type: array + items: + $ref: '#/components/schemas/Ospfv2.NetworkLsa' + x-field-uid: 3 + network_summary_lsas: description: |- - The Management Address is a mandatory TLV which identifies a network address associated with the local LLDP agent, which can be used to reach the agent on the port identified in the Port ID TLV. - type: string - x-field-uid: 13 - management_address_type: + One or more OSPFv2 Network summary LSA - Type 3. + type: array + items: + $ref: '#/components/schemas/Ospfv2.NetworkSummaryLsa' + x-field-uid: 4 + summary_as_lsas: description: |- - The enumerated value for the network address type identified in this TLV. This enumeration is defined in the 'Assigned Numbers' RFC [RFC3232] and the ianaAddressFamilyNumbers object. - type: string - x-field-uid: 14 - custom_tlvs: + One or more OSPFv2 Autonomous System Boundary Router (ASBR) summary LSA - Type 4. type: array items: - $ref: '#/components/schemas/LldpCustomTLV.State' - x-field-uid: 15 - capabilities: + $ref: '#/components/schemas/Ospfv2.SummaryAsLsa' + x-field-uid: 5 + external_as_lsas: + description: |- + OSPFv2 AS-External-LSA - Type 5. type: array items: - $ref: '#/components/schemas/LldpCapability.State' - x-field-uid: 16 - LldpCustomTLV.State: + $ref: '#/components/schemas/Ospfv2.ExternalAsLsa' + x-field-uid: 6 + nssa_lsas: + description: |- + One or more OSPFv2 NSSA-LSA - Type 7. + type: array + items: + $ref: '#/components/schemas/Ospfv2.NssaLsa' + x-field-uid: 7 + opaque_lsas: + description: |- + One or more OSPFv2 Link-Scope Opaque-LSA - Type 9. + type: array + items: + $ref: '#/components/schemas/Ospfv2.OpaqueLsa' + x-field-uid: 8 + Ospfv2.RouterLsa: description: |- - Custom TLV received from a neighbor.Custom TLVs are organization specific TLVs advertised with TLV type 127. + Contents of the router LSA. type: object properties: - custom_type: + header: description: |- - The integer value identifying the type of information contained in the value field. - type: integer - format: uint32 + Contents of the LSA header. + $ref: '#/components/schemas/Ospfv2.LsaHeader' x-field-uid: 1 - oui: + links: description: |- - The organizationally unique identifier field shall contain the organization's OUI as defined in Clause 9 of IEEE Std 802. The high-order octet is 0 and the low-order 3 octets are the SMI Network Management Private Enterprise Code of the Vendor in network byte order, as defined in the 'Assigned Numbers' RFC [RFC3232]. - type: string + Links that are described within the LSA. + type: array + items: + $ref: '#/components/schemas/Ospfv2.Link' x-field-uid: 2 - oui_subtype: - description: |- - The organizationally defined subtype field shall contain a unique subtype value assigned by the defining organization. - type: string - x-field-uid: 3 - LldpCapability.State: + Ospfv2.NetworkLsa: description: |- - LLDP system capability advertised by the neighbor + Contents of the Network LSA. type: object properties: - capability_name: + header: description: |- - Name of the system capability advertised by the neighbor. Capabilities are represented in a bitmap that defines the primary functions of the system. The capabilities are defined in IEEE 802.1AB. - type: string - x-enum: - mac_bridge: - x-field-uid: 1 - two_port_mac_relay: - x-field-uid: 2 - repeater: - x-field-uid: 3 - docsis_cable_device: - x-field-uid: 4 - s_vlan: - x-field-uid: 5 - telephone: - x-field-uid: 6 - other: - x-field-uid: 7 - router: - x-field-uid: 8 - c_vlan: - x-field-uid: 9 - station_only: - x-field-uid: 10 - wlan_access_point: - x-field-uid: 11 + Contents of the LSA header. + $ref: '#/components/schemas/Ospfv2.LsaHeader' x-field-uid: 1 - enum: - - mac_bridge - - two_port_mac_relay - - repeater - - docsis_cable_device - - s_vlan - - telephone - - other - - router - - c_vlan - - station_only - - wlan_access_point - capability_enabled: + network_mask: description: |- - Indicates whether the corresponding system capability is enabled on the neighbor. - type: boolean + The IPv4 address mask for the network. + type: string + format: ipv4 x-field-uid: 2 - RsvpLsps.State.Request: - description: |- - The request to retrieve RSVP Label Switched Path (LSP) information learned by the router. - type: object - properties: - rsvp_router_names: - description: | - The names of RSVP-TE routers for which learned information is requested. An empty list will return results for all RSVP=TE routers. - - x-constraint: - - /components/schemas/Device.Rsvp/properties/name - - - x-constraint: - - /components/schemas/Device.Rsvp/properties/name + neighbor_router_ids: + description: |- + Neighbor router ids that are described within the LSA. type: array items: type: string - x-constraint: - - /components/schemas/Device.Rsvp/properties/name - x-field-uid: 1 - RsvpLsps.State: + format: ipv4 + x-field-uid: 3 + Ospfv2.NetworkSummaryLsa: description: |- - Discovered IPv4 Point-to-Point LSPs of a RSVP-TE router. + Contents of the Network Summary LSA - Type 3. + The value of the IPv4 prefix that was received is present in header.lsa_id. type: object properties: - rsvp_router_name: + header: description: |- - The name of the RSVP-TE Router. - type: string + Contents of the LSA header. + $ref: '#/components/schemas/Ospfv2.LsaHeader' x-field-uid: 1 - ipv4_lsps: + network_mask: description: |- - IPv4 Point-to-Point RSVP-TE Discovered LSPs. - type: array - items: - $ref: '#/components/schemas/RsvpIPv4Lsp.State' + The IPv4 address mask for the network. + type: string + format: ipv4 x-field-uid: 2 - RsvpIPv4Lsp.State: + metric: + description: |- + The cost of the summary route TOS level 0 and all unspecified levels. + type: integer + format: uint32 + x-field-uid: 3 + Ospfv2.SummaryAsLsa: description: |- - IPv4 RSVP-TE Discovered LSPs. + Contents of OSPFv2 Autonomous System Boundary Router (ASBR) summary LSA - Type 4. type: object properties: - source_address: + header: description: |- - The origin IPv4 address of RSVP session. + Contents of the LSA header. + $ref: '#/components/schemas/Ospfv2.LsaHeader' + x-field-uid: 1 + network_mask: + description: |- + The IPv4 address mask for the network. type: string format: ipv4 + x-field-uid: 2 + metric: + description: |- + The cost of the summary route TOS level 0 and all unspecified levels. + type: integer + format: uint32 + x-field-uid: 3 + Ospfv2.ExternalAsLsa: + description: |- + Contents of OSPFv2 AS-External-LSA - Type 5. + The value of the IPv4 prefix that was received is present in header.lsa_id. + type: object + properties: + header: + description: |- + Contents of the LSA header. + $ref: '#/components/schemas/Ospfv2.LsaHeader' x-field-uid: 1 - destination_address: + network_mask: description: |- - The IPv4 destination address of RSVP session. + The IPv4 address mask for the network. type: string format: ipv4 x-field-uid: 2 - lsp: + metric: description: |- - It refers to the RSVP LSP properties. - $ref: '#/components/schemas/RsvpLsp.State' + The cost of the summary route TOS level 0 and all unspecified levels. + type: integer + format: uint32 x-field-uid: 3 - rros: + metric_type: description: |- - It refers to RSVP RRO objects container. - items: - $ref: '#/components/schemas/RsvpLsp.Ipv4Rro' - type: array + The type of metric associated with the route range. + type: integer + format: uint32 x-field-uid: 4 - eros: - description: |- - It refers to RSVP ERO objects container. - items: - $ref: '#/components/schemas/RsvpLsp.Ipv4Ero' - type: array - x-field-uid: 5 - RsvpLsp.State: + Ospfv2.NssaLsa: description: |- - IPv4 RSVP-TE Discovered LSPs. + Contents of OSPFv2 NSSA LSA - Type 7. + The value of the IPv4 prefix that was received is present in header.lsa_id. type: object properties: - tunnel_id: + header: description: |- - The tunnel id of RSVP session which acts as an identifier that remains constant over the life of the tunnel. - type: integer - format: uint32 + Contents of the LSA header. + $ref: '#/components/schemas/Ospfv2.LsaHeader' x-field-uid: 1 - lsp_id: + network_mask: description: |- - The lsp-id of RSVP session which acts as a differentiator for two lsps originating from the same headend, commonly used to distinguish RSVP sessions during make before break operations. - type: integer - format: uint32 + The IPv4 address mask for the network. + type: string + format: ipv4 x-field-uid: 2 - session_name: + metric: description: |- - The value of RSVP-TE Session Name field of the Session Attribute object. - type: string + The cost of the summary route TOS level 0 and all unspecified levels. + type: integer + format: uint32 x-field-uid: 3 - label_in: + metric_type: description: |- - The label received by RSVP-TE ingress. + The type of metric associated with the route range. type: integer format: uint32 x-field-uid: 4 - label_out: + forwarding_address: description: |- - The label assigned by RSVP-TE egress. - type: integer - format: uint32 + IPv4 Forwarding address. + type: string + format: ipv4 x-field-uid: 5 - session_status: + Ospfv2.OpaqueLsa: + description: |- + Contents of OSPFv2 Opaque LSA - Type 7. + type: object + properties: + header: description: |- - Operational state of the RSVP LSP. - type: string - x-field-uid: 6 - x-enum: - up: - x-field-uid: 1 - down: - x-field-uid: 2 - enum: - - up - - down - last_flap_reason: + Contents of the LSA header. + $ref: '#/components/schemas/Ospfv2.LsaHeader' + x-field-uid: 1 + type: description: |- - The reason for the last flap of this RSVP session. + The type of Opaque TE LSAs. The LSA type. type: string - x-field-uid: 7 + x-field-uid: 2 x-enum: - resv_tear: + local: x-field-uid: 1 - path_tear: + area: x-field-uid: 2 - path_timeout: + domain: x-field-uid: 3 enum: - - resv_tear - - path_tear - - path_timeout - up_time: - description: |- - The tunnel UP time in milli seconds. If the tunnel is DOWN the UP time will be zero. - type: integer - format: uint64 - x-field-uid: 8 - RsvpLsp.Ipv4Rro: - description: "This contains the list of Record Route Object(RRO) objects associated\ - \ with the traffic engineering tunnel. The Record Route Object(RRO) is used\ - \ in RSVP-TE to record the route traversed by the LSP. The RRO might be present\ - \ in both Path message and Resv message, the RRO stores the IP addresses\ - \ of the routers that the traffic engineering tunnel traversed and also the\ - \ label generated and distributed by the routers. The RROs in the Resv message\ - \ mirrors that of the Path message, the only difference is that the RRO in\ - \ a Resv message records the path information in the reverse direction. " + - local + - area + - domain + Ospfv2.LsaHeader: + description: |- + Attributes in LSA Header. + type: object properties: - address: + lsa_id: description: |- - The IPv4 addresses of the routers that the traffic engineering tunnel traversed. + LSA ID in the IPv4 format. The Link State ID for the specified LSA type. type: string format: ipv4 x-field-uid: 1 - reported_label: - description: "Label reported for RRO hop. When the Label_Recording flag\ - \ is set in the Session Attribute object, nodes doing route recording\ - \ should include the Label Record subobject containing the reported label. " - type: integer - format: uint32 - x-field-uid: 2 - RsvpLsp.Ipv4Ero: - description: |- - This contains the list of sub-objects included in the Explicit Route Object(ERO) object send in the PATH message from the ingress. These sub-objects contain the intermediate hops to be traversed by the LSP while being forwarded towards the egress endpoint. - type: object - properties: - prefix: + advertising_router_id: description: |- - The IPv4 prefix indicated by the ERO. Specified only when the ERO hop is an IPv4 prefix. + The router ID (in the IPv4 format) of the router that originated the LSA. type: string format: ipv4 - x-field-uid: 1 - asn: + x-field-uid: 2 + sequence_number: description: |- - The autonomous system number indicated by the ERO. Specified only when the ERO hop is an 2 or 4-byte AS number. + Sequence number to detect old and duplicate LSAs. The greater the sequence number the more recent the LSA. type: integer format: uint32 - x-field-uid: 2 + x-field-uid: 3 + age: + description: |- + The time since the LSA's generation in seconds. + type: integer + format: uint32 + x-field-uid: 4 + option_bits: + description: |- + The optional bits. + type: integer + format: uint32 + x-field-uid: 5 + Ospfv2.Link: + description: |- + Generic attributes used to identify links within OSPFv2. + type: object + properties: type: description: |- - The type indicated by the ERO. + The data associated with the link type. The value is dependent upon the subtype of the LSA. - point_to_point: The LSA represents a point-to-point connection to another router. - transit: The LSA represents a connection to a transit network. - stub: The LSA represents a connection to a stub network. - virtual: The LSA represents a virtual link connection. type: string - x-field-uid: 3 x-enum: - ipv4: + point_to_point: x-field-uid: 1 - ipv6: + transit: x-field-uid: 2 - asn: + stub: x-field-uid: 3 - asn4: + virtual: x-field-uid: 4 - label: - x-field-uid: 5 - unnumbered_interface: - x-field-uid: 6 + x-field-uid: 1 enum: - - ipv4 - - ipv6 - - asn - - asn4 - - label - - unnumbered_interface + - point_to_point + - transit + - stub + - virtual + id: + description: |- + The identifier for the link specified. The value of the link + identifier is dependent upon the type of the LSA. + type: string + format: ipv4 + x-field-uid: 2 + data: + description: |- + The data associated with the link type. The value is + dependent upon the subtype of the LSA. When the connection is + to a stub network it represents the mask; for p2p connections + that are unnumbered it represents the ifIndex value of the + router's interface; for all other connections it represents + the local system's IP address. + type: string + format: ipv4 + x-field-uid: 3 + metric: + description: |- + The data associated with the link type. The value is + dependent upon the subtype of the LSA. When the connection is + to a stub network it represents the mask; for p2p connections + that are unnumbered it represents the ifIndex value of the + router's interface; for all other connections it represents + the local system's IP address. + type: integer + format: uint32 + x-field-uid: 4 Capture.Request: description: |- The capture result request to the traffic generator. Stops the port capture on the port_name and returns the capture. @@ -18457,6 +23762,39 @@ components: minimum: 1 maximum: 32 x-field-uid: 3 + Pattern.Flow.Ipv4.Src.Random: + description: |- + ipv4 random pattern + type: object + properties: + min: + description: |- + The minimum possible value generated by the random value generator. + type: string + x-field-uid: 1 + default: 0.0.0.0 + format: ipv4 + max: + description: |- + The maximum possible value generated by the random value generator. + type: string + x-field-uid: 2 + default: 255.255.255.255 + format: ipv4 + seed: + description: |- + The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). + type: integer + default: 1 + format: uint32 + x-field-uid: 3 + count: + description: |- + The total number of values to be generated by the random value generator. + type: integer + default: 1 + format: uint32 + x-field-uid: 4 Pattern.Flow.Ipv4.Src: description: |- Source address @@ -18473,6 +23811,10 @@ components: x-field-uid: 4 decrement: x-field-uid: 5 + auto: + x-field-uid: 1 + random: + x-field-uid: 6 default: value x-field-uid: 1 enum: @@ -18480,6 +23822,8 @@ components: - values - increment - decrement + - auto + - random value: type: string x-field-uid: 2 @@ -18506,6 +23850,12 @@ components: items: $ref: '#/components/schemas/Pattern.Flow.Ipv4.Src.MetricTag' x-field-uid: 7 + auto: + $ref: '#/components/schemas/Flow.Ipv4.Auto' + x-field-uid: 8 + random: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Src.Random' + x-field-uid: 9 Pattern.Flow.Ipv4.Dst.Counter: description: |- ipv4 counter pattern @@ -18541,21 +23891,54 @@ components: x-field-uid: 1 offset: description: |- - Offset in bits relative to start of corresponding header field - type: integer - format: uint32 - default: 0 - maximum: 31 + Offset in bits relative to start of corresponding header field + type: integer + format: uint32 + default: 0 + maximum: 31 + x-field-uid: 2 + length: + description: |- + Number of bits to track for metrics starting from configured offset of corresponding header field + type: integer + format: uint32 + default: 32 + minimum: 1 + maximum: 32 + x-field-uid: 3 + Pattern.Flow.Ipv4.Dst.Random: + description: |- + ipv4 random pattern + type: object + properties: + min: + description: |- + The minimum possible value generated by the random value generator. + type: string + x-field-uid: 1 + default: 0.0.0.0 + format: ipv4 + max: + description: |- + The maximum possible value generated by the random value generator. + type: string x-field-uid: 2 - length: + default: 255.255.255.255 + format: ipv4 + seed: description: |- - Number of bits to track for metrics starting from configured offset of corresponding header field + The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). type: integer + default: 1 format: uint32 - default: 32 - minimum: 1 - maximum: 32 x-field-uid: 3 + count: + description: |- + The total number of values to be generated by the random value generator. + type: integer + default: 1 + format: uint32 + x-field-uid: 4 Pattern.Flow.Ipv4.Dst: description: |- Destination address @@ -18572,6 +23955,10 @@ components: x-field-uid: 4 decrement: x-field-uid: 5 + auto: + x-field-uid: 1 + random: + x-field-uid: 6 default: value x-field-uid: 1 enum: @@ -18579,6 +23966,8 @@ components: - values - increment - decrement + - auto + - random value: type: string x-field-uid: 2 @@ -18605,6 +23994,12 @@ components: items: $ref: '#/components/schemas/Pattern.Flow.Ipv4.Dst.MetricTag' x-field-uid: 7 + auto: + $ref: '#/components/schemas/Flow.Ipv4.Auto' + x-field-uid: 8 + random: + $ref: '#/components/schemas/Pattern.Flow.Ipv4.Dst.Random' + x-field-uid: 9 Pattern.Flow.Ipv4Options.Custom.Type.CopiedFlag.Counter: description: |- integer counter pattern @@ -20113,6 +25508,41 @@ components: minimum: 1 maximum: 20 x-field-uid: 3 + Pattern.Flow.Ipv6.FlowLabel.Random: + description: |- + integer random pattern + type: object + properties: + min: + description: |- + The minimum possible value generated by the random value generator. + type: integer + x-field-uid: 1 + default: 0 + format: uint32 + maximum: 1048575 + max: + description: |- + The maximum possible value generated by the random value generator. + type: integer + x-field-uid: 2 + default: 1048575 + format: uint32 + maximum: 1048575 + seed: + description: |- + The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). + type: integer + default: 1 + format: uint32 + x-field-uid: 3 + count: + description: |- + The total number of values to be generated by the random value generator. + type: integer + default: 1 + format: uint32 + x-field-uid: 4 Pattern.Flow.Ipv6.FlowLabel: description: |- Flow label @@ -20129,6 +25559,8 @@ components: x-field-uid: 4 decrement: x-field-uid: 5 + random: + x-field-uid: 6 default: value x-field-uid: 1 enum: @@ -20136,6 +25568,7 @@ components: - values - increment - decrement + - random value: type: integer x-field-uid: 2 @@ -20164,6 +25597,9 @@ components: items: $ref: '#/components/schemas/Pattern.Flow.Ipv6.FlowLabel.MetricTag' x-field-uid: 7 + random: + $ref: '#/components/schemas/Pattern.Flow.Ipv6.FlowLabel.Random' + x-field-uid: 8 Pattern.Flow.Ipv6.PayloadLength.Counter: description: |- integer counter pattern @@ -20592,6 +26028,8 @@ components: x-field-uid: 4 decrement: x-field-uid: 5 + auto: + x-field-uid: 1 default: value x-field-uid: 1 enum: @@ -20599,6 +26037,7 @@ components: - values - increment - decrement + - auto value: type: string x-field-uid: 2 @@ -20625,6 +26064,9 @@ components: items: $ref: '#/components/schemas/Pattern.Flow.Ipv6.Src.MetricTag' x-field-uid: 7 + auto: + $ref: '#/components/schemas/Flow.Ipv6.Auto' + x-field-uid: 8 Pattern.Flow.Ipv6.Dst.Counter: description: |- ipv6 counter pattern @@ -20691,6 +26133,8 @@ components: x-field-uid: 4 decrement: x-field-uid: 5 + auto: + x-field-uid: 1 default: value x-field-uid: 1 enum: @@ -20698,6 +26142,7 @@ components: - values - increment - decrement + - auto value: type: string x-field-uid: 2 @@ -20724,6 +26169,9 @@ components: items: $ref: '#/components/schemas/Pattern.Flow.Ipv6.Dst.MetricTag' x-field-uid: 7 + auto: + $ref: '#/components/schemas/Flow.Ipv6.Auto' + x-field-uid: 8 Pattern.Flow.PfcPause.Dst.Counter: description: |- mac counter pattern @@ -22637,6 +28085,41 @@ components: minimum: 1 maximum: 16 x-field-uid: 3 + Pattern.Flow.Tcp.SrcPort.Random: + description: |- + integer random pattern + type: object + properties: + min: + description: |- + The minimum possible value generated by the random value generator. + type: integer + x-field-uid: 1 + default: 0 + format: uint32 + maximum: 65535 + max: + description: |- + The maximum possible value generated by the random value generator. + type: integer + x-field-uid: 2 + default: 65535 + format: uint32 + maximum: 65535 + seed: + description: |- + The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). + type: integer + default: 1 + format: uint32 + x-field-uid: 3 + count: + description: |- + The total number of values to be generated by the random value generator. + type: integer + default: 1 + format: uint32 + x-field-uid: 4 Pattern.Flow.Tcp.SrcPort: description: |- Source port @@ -22653,6 +28136,8 @@ components: x-field-uid: 4 decrement: x-field-uid: 5 + random: + x-field-uid: 6 default: value x-field-uid: 1 enum: @@ -22660,6 +28145,7 @@ components: - values - increment - decrement + - random value: type: integer x-field-uid: 2 @@ -22688,6 +28174,9 @@ components: items: $ref: '#/components/schemas/Pattern.Flow.Tcp.SrcPort.MetricTag' x-field-uid: 7 + random: + $ref: '#/components/schemas/Pattern.Flow.Tcp.SrcPort.Random' + x-field-uid: 8 Pattern.Flow.Tcp.DstPort.Counter: description: |- integer counter pattern @@ -22741,6 +28230,41 @@ components: minimum: 1 maximum: 16 x-field-uid: 3 + Pattern.Flow.Tcp.DstPort.Random: + description: |- + integer random pattern + type: object + properties: + min: + description: |- + The minimum possible value generated by the random value generator. + type: integer + x-field-uid: 1 + default: 0 + format: uint32 + maximum: 65535 + max: + description: |- + The maximum possible value generated by the random value generator. + type: integer + x-field-uid: 2 + default: 65535 + format: uint32 + maximum: 65535 + seed: + description: |- + The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). + type: integer + default: 1 + format: uint32 + x-field-uid: 3 + count: + description: |- + The total number of values to be generated by the random value generator. + type: integer + default: 1 + format: uint32 + x-field-uid: 4 Pattern.Flow.Tcp.DstPort: description: |- Destination port @@ -22757,6 +28281,8 @@ components: x-field-uid: 4 decrement: x-field-uid: 5 + random: + x-field-uid: 6 default: value x-field-uid: 1 enum: @@ -22764,6 +28290,7 @@ components: - values - increment - decrement + - random value: type: integer x-field-uid: 2 @@ -22792,6 +28319,9 @@ components: items: $ref: '#/components/schemas/Pattern.Flow.Tcp.DstPort.MetricTag' x-field-uid: 7 + random: + $ref: '#/components/schemas/Pattern.Flow.Tcp.DstPort.Random' + x-field-uid: 8 Pattern.Flow.Tcp.SeqNum.Counter: description: |- integer counter pattern @@ -24130,6 +29660,46 @@ components: items: $ref: '#/components/schemas/Pattern.Flow.Tcp.Window.MetricTag' x-field-uid: 7 + Pattern.Flow.Tcp.Checksum: + description: |- + The one's complement of the one's complement sum of all 16 bit words in header and text. An all-zero value means that no checksum will be transmitted. While computing the checksum, the checksum field itself is replaced with zeros. + type: object + properties: + choice: + description: |- + The type of checksum + type: string + x-enum: + generated: + x-field-uid: 1 + custom: + x-field-uid: 2 + default: generated + x-field-uid: 1 + enum: + - generated + - custom + generated: + description: |- + A system generated checksum value + type: string + x-enum: + good: + x-field-uid: 1 + bad: + x-field-uid: 2 + default: good + x-field-uid: 2 + enum: + - good + - bad + custom: + description: |- + A custom checksum value + type: integer + format: uint32 + maximum: 65535 + x-field-uid: 3 Pattern.Flow.Udp.SrcPort.Counter: description: |- integer counter pattern @@ -24183,6 +29753,41 @@ components: minimum: 1 maximum: 16 x-field-uid: 3 + Pattern.Flow.Udp.SrcPort.Random: + description: |- + integer random pattern + type: object + properties: + min: + description: |- + The minimum possible value generated by the random value generator. + type: integer + x-field-uid: 1 + default: 0 + format: uint32 + maximum: 65535 + max: + description: |- + The maximum possible value generated by the random value generator. + type: integer + x-field-uid: 2 + default: 65535 + format: uint32 + maximum: 65535 + seed: + description: |- + The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). + type: integer + default: 1 + format: uint32 + x-field-uid: 3 + count: + description: |- + The total number of values to be generated by the random value generator. + type: integer + default: 1 + format: uint32 + x-field-uid: 4 Pattern.Flow.Udp.SrcPort: description: |- Source port @@ -24199,6 +29804,8 @@ components: x-field-uid: 4 decrement: x-field-uid: 5 + random: + x-field-uid: 6 default: value x-field-uid: 1 enum: @@ -24206,6 +29813,7 @@ components: - values - increment - decrement + - random value: type: integer x-field-uid: 2 @@ -24234,6 +29842,9 @@ components: items: $ref: '#/components/schemas/Pattern.Flow.Udp.SrcPort.MetricTag' x-field-uid: 7 + random: + $ref: '#/components/schemas/Pattern.Flow.Udp.SrcPort.Random' + x-field-uid: 8 Pattern.Flow.Udp.DstPort.Counter: description: |- integer counter pattern @@ -24287,6 +29898,41 @@ components: minimum: 1 maximum: 16 x-field-uid: 3 + Pattern.Flow.Udp.DstPort.Random: + description: |- + integer random pattern + type: object + properties: + min: + description: |- + The minimum possible value generated by the random value generator. + type: integer + x-field-uid: 1 + default: 0 + format: uint32 + maximum: 65535 + max: + description: |- + The maximum possible value generated by the random value generator. + type: integer + x-field-uid: 2 + default: 65535 + format: uint32 + maximum: 65535 + seed: + description: |- + The seed value is used to initialize the random number generator to a deterministic state. If the user provides a seed value of 0, the implementation will generate a sequence of non-deterministic random values. For any other seed value, the sequence of random numbers will be generated in a deterministic manner (specific to the implementation). + type: integer + default: 1 + format: uint32 + x-field-uid: 3 + count: + description: |- + The total number of values to be generated by the random value generator. + type: integer + default: 1 + format: uint32 + x-field-uid: 4 Pattern.Flow.Udp.DstPort: description: |- Destination port @@ -24303,6 +29949,8 @@ components: x-field-uid: 4 decrement: x-field-uid: 5 + random: + x-field-uid: 6 default: value x-field-uid: 1 enum: @@ -24310,6 +29958,7 @@ components: - values - increment - decrement + - random value: type: integer x-field-uid: 2 @@ -24338,6 +29987,9 @@ components: items: $ref: '#/components/schemas/Pattern.Flow.Udp.DstPort.MetricTag' x-field-uid: 7 + random: + $ref: '#/components/schemas/Pattern.Flow.Udp.DstPort.Random' + x-field-uid: 8 Pattern.Flow.Udp.Length.Counter: description: |- integer counter pattern @@ -24866,13 +30518,16 @@ components: x-field-uid: 4 decrement: x-field-uid: 5 - default: value + auto: + x-field-uid: 1 + default: auto x-field-uid: 1 enum: - value - values - increment - decrement + - auto value: type: integer x-field-uid: 2 @@ -24901,6 +30556,16 @@ components: items: $ref: '#/components/schemas/Pattern.Flow.Gre.Protocol.MetricTag' x-field-uid: 7 + auto: + description: |- + The OTG implementation can provide a system generated + value for this property. If the OTG is unable to generate a value + the default value must be used. + type: integer + x-field-uid: 8 + default: 2048 + format: uint32 + maximum: 65535 x-constants: ipv4: 2048 ipv6: 34525 diff --git a/snappi/otg_pb2.py b/snappi/otg_pb2.py index 2c7d90f9..c9f2fc4a 100644 --- a/snappi/otg_pb2.py +++ b/snappi/otg_pb2.py @@ -2,10 +2,10 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: otg.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -15,3566 +15,4062 @@ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\totg.proto\x12\x03otg\x1a google/protobuf/descriptor.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x89\x02\n\x06\x43onfig\x12\x18\n\x05ports\x18\x01 \x03(\x0b\x32\t.otg.Port\x12\x16\n\x04lags\x18\x02 \x03(\x0b\x32\x08.otg.Lag\x12\x1b\n\x06layer1\x18\x03 \x03(\x0b\x32\x0b.otg.Layer1\x12\x1e\n\x08\x63\x61ptures\x18\x04 \x03(\x0b\x32\x0c.otg.Capture\x12\x1c\n\x07\x64\x65vices\x18\x05 \x03(\x0b\x32\x0b.otg.Device\x12\x18\n\x05\x66lows\x18\x06 \x03(\x0b\x32\t.otg.Flow\x12\x1a\n\x06\x65vents\x18\x07 \x01(\x0b\x32\n.otg.Event\x12#\n\x07options\x18\x08 \x01(\x0b\x32\x12.otg.ConfigOptions\x12\x17\n\x04lldp\x18\t \x03(\x0b\x32\t.otg.Lldp\"g\n\rConfigOptions\x12&\n\x0cport_options\x18\x01 \x01(\x0b\x32\x10.otg.PortOptions\x12.\n\x10protocol_options\x18\x02 \x01(\x0b\x32\x14.otg.ProtocolOptions\"F\n\x04Port\x12\x15\n\x08location\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04name\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_locationB\x07\n\x05_name\"G\n\x0bPortOptions\x12 \n\x13location_preemption\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x16\n\x14_location_preemption\"\x88\x01\n\x03Lag\x12\x1b\n\x05ports\x18\x01 \x03(\x0b\x32\x0c.otg.LagPort\x12\"\n\x08protocol\x18\x02 \x01(\x0b\x32\x10.otg.LagProtocol\x12\x16\n\tmin_links\x18\x03 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04name\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x0c\n\n_min_linksB\x07\n\x05_name\"z\n\x07LagPort\x12\x16\n\tport_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x04lacp\x18\x02 \x01(\x0b\x32\x10.otg.LagPortLacp\x12)\n\x08\x65thernet\x18\x03 \x01(\x0b\x32\x17.otg.DeviceEthernetBaseB\x0c\n\n_port_name\"\xd0\x01\n\x0bLagProtocol\x12\x31\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1c.otg.LagProtocol.Choice.EnumH\x00\x88\x01\x01\x12\"\n\x04lacp\x18\x02 \x01(\x0b\x32\x14.otg.LagProtocolLacp\x12&\n\x06static\x18\x03 \x01(\x0b\x32\x16.otg.LagProtocolStatic\x1a\x37\n\x06\x43hoice\"-\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04lacp\x10\x01\x12\n\n\x06static\x10\x02\x42\t\n\x07_choice\"3\n\x11LagProtocolStatic\x12\x13\n\x06lag_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\t\n\x07_lag_id\"\xa7\x01\n\x0fLagProtocolLacp\x12\x1c\n\x0f\x61\x63tor_system_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x15\x61\x63tor_system_priority\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x16\n\tactor_key\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x12\n\x10_actor_system_idB\x18\n\x16_actor_system_priorityB\x0c\n\n_actor_key\"\x93\x03\n\x0bLagPortLacp\x12\x1e\n\x11\x61\x63tor_port_number\x18\x01 \x01(\rH\x00\x88\x01\x01\x12 \n\x13\x61\x63tor_port_priority\x18\x02 \x01(\rH\x01\x88\x01\x01\x12@\n\x0e\x61\x63tor_activity\x18\x03 \x01(\x0e\x32#.otg.LagPortLacp.ActorActivity.EnumH\x02\x88\x01\x01\x12*\n\x1dlacpdu_periodic_time_interval\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1b\n\x0elacpdu_timeout\x18\x05 \x01(\rH\x04\x88\x01\x01\x1a\x41\n\rActorActivity\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07passive\x10\x01\x12\n\n\x06\x61\x63tive\x10\x02\x42\x14\n\x12_actor_port_numberB\x16\n\x14_actor_port_priorityB\x11\n\x0f_actor_activityB \n\x1e_lacpdu_periodic_time_intervalB\x11\n\x0f_lacpdu_timeout\"\x84\x01\n\x12\x44\x65viceEthernetBase\x12\x10\n\x03mac\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03mtu\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1e\n\x05vlans\x18\x03 \x03(\x0b\x32\x0f.otg.DeviceVlan\x12\x11\n\x04name\x18\x04 \x01(\tH\x02\x88\x01\x01\x42\x06\n\x04_macB\x06\n\x04_mtuB\x07\n\x05_name\"\xff\x01\n\x0e\x44\x65viceEthernet\x12+\n\nconnection\x18\x02 \x01(\x0b\x32\x17.otg.EthernetConnection\x12\'\n\x0eipv4_addresses\x18\x03 \x03(\x0b\x32\x0f.otg.DeviceIpv4\x12\'\n\x0eipv6_addresses\x18\x04 \x03(\x0b\x32\x0f.otg.DeviceIpv6\x12\x10\n\x03mac\x18\x05 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03mtu\x18\x06 \x01(\rH\x01\x88\x01\x01\x12\x1e\n\x05vlans\x18\x07 \x03(\x0b\x32\x0f.otg.DeviceVlan\x12\x11\n\x04name\x18\x08 \x01(\tH\x02\x88\x01\x01\x42\x06\n\x04_macB\x06\n\x04_mtuB\x07\n\x05_name\"\x9b\x02\n\x12\x45thernetConnection\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.EthernetConnection.Choice.EnumH\x00\x88\x01\x01\x12\x16\n\tport_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08lag_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nvxlan_name\x18\x04 \x01(\tH\x03\x88\x01\x01\x1aN\n\x06\x43hoice\"D\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tport_name\x10\x01\x12\x0c\n\x08lag_name\x10\x02\x12\x0e\n\nvxlan_name\x10\x03\x42\t\n\x07_choiceB\x0c\n\n_port_nameB\x0b\n\t_lag_nameB\r\n\x0b_vxlan_name\"\xf3\x01\n\nDeviceVlan\x12,\n\x04tpid\x18\x01 \x01(\x0e\x32\x19.otg.DeviceVlan.Tpid.EnumH\x00\x88\x01\x01\x12\x15\n\x08priority\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0f\n\x02id\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x11\n\x04name\x18\x04 \x01(\tH\x03\x88\x01\x01\x1aV\n\x04Tpid\"N\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05x8100\x10\x01\x12\t\n\x05x88A8\x10\x02\x12\t\n\x05x9100\x10\x03\x12\t\n\x05x9200\x10\x04\x12\t\n\x05x9300\x10\x05\x42\x07\n\x05_tpidB\x0b\n\t_priorityB\x05\n\x03_idB\x07\n\x05_name\"\xbc\x01\n\nDeviceIpv4\x12\x14\n\x07gateway\x18\x01 \x01(\tH\x00\x88\x01\x01\x12.\n\x0bgateway_mac\x18\x02 \x01(\x0b\x32\x19.otg.DeviceIpv4GatewayMAC\x12\x14\n\x07\x61\x64\x64ress\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06prefix\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x11\n\x04name\x18\x05 \x01(\tH\x03\x88\x01\x01\x42\n\n\x08_gatewayB\n\n\x08_addressB\t\n\x07_prefixB\x07\n\x05_name\"v\n\x12\x44\x65viceIpv4Loopback\x12\x15\n\x08\x65th_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x61\x64\x64ress\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x0b\n\t_eth_nameB\n\n\x08_addressB\x07\n\x05_name\"\xcf\x01\n\x14\x44\x65viceIpv4GatewayMAC\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.DeviceIpv4GatewayMAC.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xbc\x01\n\nDeviceIpv6\x12\x14\n\x07gateway\x18\x01 \x01(\tH\x00\x88\x01\x01\x12.\n\x0bgateway_mac\x18\x02 \x01(\x0b\x32\x19.otg.DeviceIpv6GatewayMAC\x12\x14\n\x07\x61\x64\x64ress\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06prefix\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x11\n\x04name\x18\x05 \x01(\tH\x03\x88\x01\x01\x42\n\n\x08_gatewayB\n\n\x08_addressB\t\n\x07_prefixB\x07\n\x05_name\"v\n\x12\x44\x65viceIpv6Loopback\x12\x15\n\x08\x65th_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x61\x64\x64ress\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x0b\n\t_eth_nameB\n\n\x08_addressB\x07\n\x05_name\"\xcf\x01\n\x14\x44\x65viceIpv6GatewayMAC\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.DeviceIpv6GatewayMAC.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xa6\x06\n\x06Layer1\x12\x12\n\nport_names\x18\x01 \x03(\t\x12*\n\x05speed\x18\x02 \x01(\x0e\x32\x16.otg.Layer1.Speed.EnumH\x00\x88\x01\x01\x12*\n\x05media\x18\x03 \x01(\x0e\x32\x16.otg.Layer1.Media.EnumH\x01\x88\x01\x01\x12\x18\n\x0bpromiscuous\x18\x04 \x01(\x08H\x02\x88\x01\x01\x12\x10\n\x03mtu\x18\x05 \x01(\rH\x03\x88\x01\x01\x12 \n\x13ieee_media_defaults\x18\x06 \x01(\x08H\x04\x88\x01\x01\x12\x1b\n\x0e\x61uto_negotiate\x18\x07 \x01(\x08H\x05\x88\x01\x01\x12\x34\n\x10\x61uto_negotiation\x18\x08 \x01(\x0b\x32\x1a.otg.Layer1AutoNegotiation\x12,\n\x0c\x66low_control\x18\t \x01(\x0b\x32\x16.otg.Layer1FlowControl\x12\x11\n\x04name\x18\n \x01(\tH\x06\x88\x01\x01\x1a\xa9\x02\n\x05Speed\"\x9f\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x14\n\x10speed_10_fd_mbps\x10\x01\x12\x14\n\x10speed_10_hd_mbps\x10\x02\x12\x15\n\x11speed_100_fd_mbps\x10\x03\x12\x15\n\x11speed_100_hd_mbps\x10\x04\x12\x10\n\x0cspeed_1_gbps\x10\x05\x12\x11\n\rspeed_10_gbps\x10\x06\x12\x11\n\rspeed_25_gbps\x10\x07\x12\x11\n\rspeed_40_gbps\x10\x08\x12\x11\n\rspeed_50_gbps\x10\t\x12\x12\n\x0espeed_100_gbps\x10\n\x12\x12\n\x0espeed_200_gbps\x10\x0b\x12\x12\n\x0espeed_400_gbps\x10\x0c\x12\x12\n\x0espeed_800_gbps\x10\r\x1a\x42\n\x05Media\"9\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x63opper\x10\x01\x12\t\n\x05\x66iber\x10\x02\x12\t\n\x05sgmii\x10\x03\x42\x08\n\x06_speedB\x08\n\x06_mediaB\x0e\n\x0c_promiscuousB\x06\n\x04_mtuB\x16\n\x14_ieee_media_defaultsB\x11\n\x0f_auto_negotiateB\x07\n\x05_name\"\x93\x03\n\x15Layer1AutoNegotiation\x12 \n\x13\x61\x64vertise_1000_mbps\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x15\x61\x64vertise_100_fd_mbps\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\"\n\x15\x61\x64vertise_100_hd_mbps\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12!\n\x14\x61\x64vertise_10_fd_mbps\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12!\n\x14\x61\x64vertise_10_hd_mbps\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x1a\n\rlink_training\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x13\n\x06rs_fec\x18\x07 \x01(\x08H\x06\x88\x01\x01\x42\x16\n\x14_advertise_1000_mbpsB\x18\n\x16_advertise_100_fd_mbpsB\x18\n\x16_advertise_100_hd_mbpsB\x17\n\x15_advertise_10_fd_mbpsB\x17\n\x15_advertise_10_hd_mbpsB\x10\n\x0e_link_trainingB\t\n\x07_rs_fec\"\xac\x02\n\x11Layer1FlowControl\x12\x1d\n\x10\x64irected_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x06\x63hoice\x18\x02 \x01(\x0e\x32\".otg.Layer1FlowControl.Choice.EnumH\x01\x88\x01\x01\x12-\n\rieee_802_1qbb\x18\x03 \x01(\x0b\x32\x16.otg.Layer1Ieee8021qbb\x12)\n\x0bieee_802_3x\x18\x04 \x01(\x0b\x32\x14.otg.Layer1Ieee8023x\x1a\x45\n\x06\x43hoice\";\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rieee_802_1qbb\x10\x01\x12\x0f\n\x0bieee_802_3x\x10\x02\x42\x13\n\x11_directed_addressB\t\n\x07_choice\"\x11\n\x0fLayer1Ieee8023x\"\x89\x03\n\x11Layer1Ieee8021qbb\x12\x16\n\tpfc_delay\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x18\n\x0bpfc_class_0\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x18\n\x0bpfc_class_1\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x18\n\x0bpfc_class_2\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x18\n\x0bpfc_class_3\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x18\n\x0bpfc_class_4\x18\x06 \x01(\rH\x05\x88\x01\x01\x12\x18\n\x0bpfc_class_5\x18\x07 \x01(\rH\x06\x88\x01\x01\x12\x18\n\x0bpfc_class_6\x18\x08 \x01(\rH\x07\x88\x01\x01\x12\x18\n\x0bpfc_class_7\x18\t \x01(\rH\x08\x88\x01\x01\x42\x0c\n\n_pfc_delayB\x0e\n\x0c_pfc_class_0B\x0e\n\x0c_pfc_class_1B\x0e\n\x0c_pfc_class_2B\x0e\n\x0c_pfc_class_3B\x0e\n\x0c_pfc_class_4B\x0e\n\x0c_pfc_class_5B\x0e\n\x0c_pfc_class_6B\x0e\n\x0c_pfc_class_7\"\xa1\x02\n\x07\x43\x61pture\x12\x12\n\nport_names\x18\x01 \x03(\t\x12#\n\x07\x66ilters\x18\x02 \x03(\x0b\x32\x12.otg.CaptureFilter\x12\x16\n\toverwrite\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x0bpacket_size\x18\x04 \x01(\rH\x01\x88\x01\x01\x12-\n\x06\x66ormat\x18\x05 \x01(\x0e\x32\x18.otg.Capture.Format.EnumH\x02\x88\x01\x01\x12\x11\n\x04name\x18\x06 \x01(\tH\x03\x88\x01\x01\x1a\x37\n\x06\x46ormat\"-\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04pcap\x10\x01\x12\n\n\x06pcapng\x10\x02\x42\x0c\n\n_overwriteB\x0e\n\x0c_packet_sizeB\t\n\x07_formatB\x07\n\x05_name\"\xd6\x02\n\rCaptureFilter\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.CaptureFilter.Choice.EnumH\x00\x88\x01\x01\x12\"\n\x06\x63ustom\x18\x02 \x01(\x0b\x32\x12.otg.CaptureCustom\x12&\n\x08\x65thernet\x18\x03 \x01(\x0b\x32\x14.otg.CaptureEthernet\x12\x1e\n\x04vlan\x18\x04 \x01(\x0b\x32\x10.otg.CaptureVlan\x12\x1e\n\x04ipv4\x18\x05 \x01(\x0b\x32\x10.otg.CaptureIpv4\x12\x1e\n\x04ipv6\x18\x06 \x01(\x0b\x32\x10.otg.CaptureIpv6\x1aY\n\x06\x43hoice\"O\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x63ustom\x10\x01\x12\x0c\n\x08\x65thernet\x10\x02\x12\x08\n\x04vlan\x10\x03\x12\x08\n\x04ipv4\x10\x04\x12\x08\n\x04ipv6\x10\x05\x42\t\n\x07_choice\"\xb1\x01\n\rCaptureCustom\x12\x13\n\x06offset\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x17\n\nbit_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x11\n\x04mask\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x13\n\x06negate\x18\x05 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_offsetB\r\n\x0b_bit_lengthB\x08\n\x06_valueB\x07\n\x05_maskB\t\n\x07_negate\"h\n\x0c\x43\x61ptureField\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04mask\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06negate\x18\x03 \x01(\x08H\x02\x88\x01\x01\x42\x08\n\x06_valueB\x07\n\x05_maskB\t\n\x07_negate\"\x9e\x01\n\x0f\x43\x61ptureEthernet\x12\x1e\n\x03src\x18\x01 \x01(\x0b\x32\x11.otg.CaptureField\x12\x1e\n\x03\x64st\x18\x02 \x01(\x0b\x32\x11.otg.CaptureField\x12%\n\nether_type\x18\x03 \x01(\x0b\x32\x11.otg.CaptureField\x12$\n\tpfc_queue\x18\x04 \x01(\x0b\x32\x11.otg.CaptureField\"\x96\x01\n\x0b\x43\x61ptureVlan\x12#\n\x08priority\x18\x01 \x01(\x0b\x32\x11.otg.CaptureField\x12\x1e\n\x03\x63\x66i\x18\x02 \x01(\x0b\x32\x11.otg.CaptureField\x12\x1d\n\x02id\x18\x03 \x01(\x0b\x32\x11.otg.CaptureField\x12#\n\x08protocol\x18\x04 \x01(\x0b\x32\x11.otg.CaptureField\"\xb4\x04\n\x0b\x43\x61ptureIpv4\x12\"\n\x07version\x18\x01 \x01(\x0b\x32\x11.otg.CaptureField\x12(\n\rheader_length\x18\x02 \x01(\x0b\x32\x11.otg.CaptureField\x12#\n\x08priority\x18\x03 \x01(\x0b\x32\x11.otg.CaptureField\x12\'\n\x0ctotal_length\x18\x04 \x01(\x0b\x32\x11.otg.CaptureField\x12)\n\x0eidentification\x18\x05 \x01(\x0b\x32\x11.otg.CaptureField\x12#\n\x08reserved\x18\x06 \x01(\x0b\x32\x11.otg.CaptureField\x12(\n\rdont_fragment\x18\x07 \x01(\x0b\x32\x11.otg.CaptureField\x12)\n\x0emore_fragments\x18\x08 \x01(\x0b\x32\x11.otg.CaptureField\x12*\n\x0f\x66ragment_offset\x18\t \x01(\x0b\x32\x11.otg.CaptureField\x12\'\n\x0ctime_to_live\x18\n \x01(\x0b\x32\x11.otg.CaptureField\x12#\n\x08protocol\x18\x0b \x01(\x0b\x32\x11.otg.CaptureField\x12*\n\x0fheader_checksum\x18\x0c \x01(\x0b\x32\x11.otg.CaptureField\x12\x1e\n\x03src\x18\r \x01(\x0b\x32\x11.otg.CaptureField\x12\x1e\n\x03\x64st\x18\x0e \x01(\x0b\x32\x11.otg.CaptureField\"\xbb\x02\n\x0b\x43\x61ptureIpv6\x12\"\n\x07version\x18\x01 \x01(\x0b\x32\x11.otg.CaptureField\x12(\n\rtraffic_class\x18\x02 \x01(\x0b\x32\x11.otg.CaptureField\x12%\n\nflow_label\x18\x03 \x01(\x0b\x32\x11.otg.CaptureField\x12)\n\x0epayload_length\x18\x04 \x01(\x0b\x32\x11.otg.CaptureField\x12&\n\x0bnext_header\x18\x05 \x01(\x0b\x32\x11.otg.CaptureField\x12$\n\thop_limit\x18\x06 \x01(\x0b\x32\x11.otg.CaptureField\x12\x1e\n\x03src\x18\x07 \x01(\x0b\x32\x11.otg.CaptureField\x12\x1e\n\x03\x64st\x18\x08 \x01(\x0b\x32\x11.otg.CaptureField\"\xb6\x02\n\x06\x44\x65vice\x12&\n\tethernets\x18\x01 \x03(\x0b\x32\x13.otg.DeviceEthernet\x12/\n\x0eipv4_loopbacks\x18\x02 \x03(\x0b\x32\x17.otg.DeviceIpv4Loopback\x12/\n\x0eipv6_loopbacks\x18\x03 \x03(\x0b\x32\x17.otg.DeviceIpv6Loopback\x12#\n\x04isis\x18\x04 \x01(\x0b\x32\x15.otg.DeviceIsisRouter\x12!\n\x03\x62gp\x18\x05 \x01(\x0b\x32\x14.otg.DeviceBgpRouter\x12\x1f\n\x05vxlan\x18\x06 \x01(\x0b\x32\x10.otg.DeviceVxlan\x12\x11\n\x04name\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x04rsvp\x18\x08 \x01(\x0b\x32\x0f.otg.DeviceRsvpB\x07\n\x05_name\"A\n\x0fProtocolOptions\x12\x1b\n\x0e\x61uto_start_all\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x11\n\x0f_auto_start_all\"\xf2\x02\n\x10\x44\x65viceIsisRouter\x12.\n\x08instance\x18\x01 \x01(\x0b\x32\x1c.otg.DeviceIsisMultiInstance\x12\x16\n\tsystem_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x12&\n\ninterfaces\x18\x03 \x03(\x0b\x32\x12.otg.IsisInterface\x12\x1d\n\x05\x62\x61sic\x18\x04 \x01(\x0b\x32\x0e.otg.IsisBasic\x12#\n\x08\x61\x64vanced\x18\x05 \x01(\x0b\x32\x11.otg.IsisAdvanced\x12,\n\x0brouter_auth\x18\x06 \x01(\x0b\x32\x17.otg.IsisAuthentication\x12(\n\tv4_routes\x18\x07 \x03(\x0b\x32\x15.otg.IsisV4RouteRange\x12(\n\tv6_routes\x18\x08 \x03(\x0b\x32\x15.otg.IsisV6RouteRange\x12\x11\n\x04name\x18\t \x01(\tH\x01\x88\x01\x01\x42\x0c\n\n_system_idB\x07\n\x05_name\"B\n\x17\x44\x65viceIsisMultiInstance\x12\x10\n\x03iid\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\r\n\x05itids\x18\x02 \x03(\rB\x06\n\x04_iid\"\x91\x06\n\rIsisInterface\x12\x15\n\x08\x65th_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06metric\x18\x02 \x01(\rH\x01\x88\x01\x01\x12>\n\x0cnetwork_type\x18\x03 \x01(\x0e\x32#.otg.IsisInterface.NetworkType.EnumH\x02\x88\x01\x01\x12:\n\nlevel_type\x18\x04 \x01(\x0e\x32!.otg.IsisInterface.LevelType.EnumH\x03\x88\x01\x01\x12,\n\x0bl1_settings\x18\x05 \x01(\x0b\x32\x17.otg.IsisInterfaceLevel\x12,\n\x0bl2_settings\x18\x06 \x01(\x0b\x32\x17.otg.IsisInterfaceLevel\x12\'\n\x12multi_topology_ids\x18\x07 \x03(\x0b\x32\x0b.otg.IsisMT\x12-\n\x13traffic_engineering\x18\x08 \x03(\x0b\x32\x10.otg.LinkStateTE\x12\x38\n\x0e\x61uthentication\x18\t \x01(\x0b\x32 .otg.IsisInterfaceAuthentication\x12,\n\x08\x61\x64vanced\x18\n \x01(\x0b\x32\x1a.otg.IsisInterfaceAdvanced\x12\x39\n\x0flink_protection\x18\x0b \x01(\x0b\x32 .otg.IsisInterfaceLinkProtection\x12\x13\n\x0bsrlg_values\x18\x0c \x03(\r\x12\x11\n\x04name\x18\r \x01(\tH\x04\x88\x01\x01\x1aI\n\x0bNetworkType\":\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tbroadcast\x10\x01\x12\x12\n\x0epoint_to_point\x10\x02\x1aM\n\tLevelType\"@\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07level_1\x10\x01\x12\x0b\n\x07level_2\x10\x02\x12\r\n\tlevel_1_2\x10\x03\x42\x0b\n\t_eth_nameB\t\n\x07_metricB\x0f\n\r_network_typeB\r\n\x0b_level_typeB\x07\n\x05_name\"\x96\x01\n\x12IsisInterfaceLevel\x12\x15\n\x08priority\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1b\n\x0ehello_interval\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\rdead_interval\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x0b\n\t_priorityB\x11\n\x0f_hello_intervalB\x10\n\x0e_dead_interval\"P\n\x06IsisMT\x12\x12\n\x05mt_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x18\n\x0blink_metric\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x08\n\x06_mt_idB\x0e\n\x0c_link_metric\"\xa4\x02\n\x0bLinkStateTE\x12!\n\x14\x61\x64ministrative_group\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0cmetric_level\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x19\n\x0cmax_bandwith\x18\x03 \x01(\rH\x02\x88\x01\x01\x12%\n\x18max_reservable_bandwidth\x18\x04 \x01(\rH\x03\x88\x01\x01\x12=\n\x13priority_bandwidths\x18\x05 \x01(\x0b\x32 .otg.LinkStatepriorityBandwidthsB\x17\n\x15_administrative_groupB\x0f\n\r_metric_levelB\x0f\n\r_max_bandwithB\x1b\n\x19_max_reservable_bandwidth\"\xed\x01\n\x1bLinkStatepriorityBandwidths\x12\x10\n\x03pb0\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03pb1\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x10\n\x03pb2\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x10\n\x03pb3\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x10\n\x03pb4\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x10\n\x03pb5\x18\x06 \x01(\rH\x05\x88\x01\x01\x12\x10\n\x03pb6\x18\x07 \x01(\rH\x06\x88\x01\x01\x12\x10\n\x03pb7\x18\x08 \x01(\rH\x07\x88\x01\x01\x42\x06\n\x04_pb0B\x06\n\x04_pb1B\x06\n\x04_pb2B\x06\n\x04_pb3B\x06\n\x04_pb4B\x06\n\x04_pb5B\x06\n\x04_pb6B\x06\n\x04_pb7\"\xed\x01\n\x1bIsisInterfaceAuthentication\x12\x46\n\tauth_type\x18\x01 \x01(\x0e\x32..otg.IsisInterfaceAuthentication.AuthType.EnumH\x00\x88\x01\x01\x12\x10\n\x03md5\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08password\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a:\n\x08\x41uthType\".\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03md5\x10\x01\x12\x0c\n\x08password\x10\x02\x42\x0c\n\n_auth_typeB\x06\n\x04_md5B\x0b\n\t_password\"\xd3\x02\n\x15IsisInterfaceAdvanced\x12\x1c\n\x0f\x61uto_adjust_mtu\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1d\n\x10\x61uto_adjust_area\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12,\n\x1f\x61uto_adjust_supported_protocols\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\"\n\x15\x65nable_3way_handshake\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12&\n\x19p2p_hellos_to_unicast_mac\x18\x05 \x01(\x08H\x04\x88\x01\x01\x42\x12\n\x10_auto_adjust_mtuB\x13\n\x11_auto_adjust_areaB\"\n _auto_adjust_supported_protocolsB\x18\n\x16_enable_3way_handshakeB\x1c\n\x1a_p2p_hellos_to_unicast_mac\"\xf9\x02\n\x1bIsisInterfaceLinkProtection\x12\x1a\n\rextra_traffic\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x0bunprotected\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x13\n\x06shared\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x1d\n\x10\x64\x65\x64icated_1_to_1\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x1f\n\x12\x64\x65\x64icated_1_plus_1\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x15\n\x08\x65nhanced\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x18\n\x0breserved_40\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12\x18\n\x0breserved_80\x18\x08 \x01(\x08H\x07\x88\x01\x01\x42\x10\n\x0e_extra_trafficB\x0e\n\x0c_unprotectedB\t\n\x07_sharedB\x13\n\x11_dedicated_1_to_1B\x15\n\x13_dedicated_1_plus_1B\x0b\n\t_enhancedB\x0e\n\x0c_reserved_40B\x0e\n\x0c_reserved_80\"\xd5\x01\n\tIsisBasic\x12\x1e\n\x11ipv4_te_router_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08hostname\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12\x65nable_wide_metric\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x1f\n\x12learned_lsp_filter\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\x14\n\x12_ipv4_te_router_idB\x0b\n\t_hostnameB\x15\n\x13_enable_wide_metricB\x15\n\x13_learned_lsp_filter\"\x8a\x04\n\x0cIsisAdvanced\x12!\n\x14\x65nable_hello_padding\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1f\n\x12max_area_addresses\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x16\n\x0e\x61rea_addresses\x18\x03 \x03(\t\x12\x1d\n\x10lsp_refresh_rate\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x19\n\x0clsp_lifetime\x18\x05 \x01(\rH\x03\x88\x01\x01\x12\x1a\n\rpsnp_interval\x18\x06 \x01(\rH\x04\x88\x01\x01\x12\x1a\n\rcsnp_interval\x18\x07 \x01(\rH\x05\x88\x01\x01\x12\x19\n\x0cmax_lsp_size\x18\x08 \x01(\rH\x06\x88\x01\x01\x12*\n\x1dlsp_mgroup_min_trans_interval\x18\t \x01(\rH\x07\x88\x01\x01\x12 \n\x13\x65nable_attached_bit\x18\n \x01(\x08H\x08\x88\x01\x01\x42\x17\n\x15_enable_hello_paddingB\x15\n\x13_max_area_addressesB\x13\n\x11_lsp_refresh_rateB\x0f\n\r_lsp_lifetimeB\x10\n\x0e_psnp_intervalB\x10\n\x0e_csnp_intervalB\x0f\n\r_max_lsp_sizeB \n\x1e_lsp_mgroup_min_trans_intervalB\x16\n\x14_enable_attached_bit\"\xae\x01\n\x12IsisAuthentication\x12\x1f\n\x12ignore_receive_md5\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12.\n\tarea_auth\x18\x02 \x01(\x0b\x32\x1b.otg.IsisAuthenticationBase\x12\x30\n\x0b\x64omain_auth\x18\x03 \x01(\x0b\x32\x1b.otg.IsisAuthenticationBaseB\x15\n\x13_ignore_receive_md5\"\xe3\x01\n\x16IsisAuthenticationBase\x12\x41\n\tauth_type\x18\x01 \x01(\x0e\x32).otg.IsisAuthenticationBase.AuthType.EnumH\x00\x88\x01\x01\x12\x10\n\x03md5\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08password\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a:\n\x08\x41uthType\".\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03md5\x10\x01\x12\x0c\n\x08password\x10\x02\x42\x0c\n\n_auth_typeB\x06\n\x04_md5B\x0b\n\t_password\"\xd8\x04\n\x10IsisV4RouteRange\x12&\n\taddresses\x18\x01 \x03(\x0b\x32\x13.otg.V4RouteAddress\x12\x18\n\x0blink_metric\x18\x02 \x01(\rH\x00\x88\x01\x01\x12?\n\x0borigin_type\x18\x03 \x01(\x0e\x32%.otg.IsisV4RouteRange.OriginType.EnumH\x01\x88\x01\x01\x12O\n\x13redistribution_type\x18\x04 \x01(\x0e\x32-.otg.IsisV4RouteRange.RedistributionType.EnumH\x02\x88\x01\x01\x12\x11\n\x04name\x18\x05 \x01(\tH\x03\x88\x01\x01\x12 \n\x13prefix_attr_enabled\x18\x06 \x01(\x08H\x04\x88\x01\x01\x12\x13\n\x06x_flag\x18\x07 \x01(\x08H\x05\x88\x01\x01\x12\x13\n\x06r_flag\x18\x08 \x01(\x08H\x06\x88\x01\x01\x12\x13\n\x06n_flag\x18\t \x01(\x08H\x07\x88\x01\x01\x1a\x41\n\nOriginType\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08internal\x10\x01\x12\x0c\n\x08\x65xternal\x10\x02\x1a?\n\x12RedistributionType\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x0e\n\x0c_link_metricB\x0e\n\x0c_origin_typeB\x16\n\x14_redistribution_typeB\x07\n\x05_nameB\x16\n\x14_prefix_attr_enabledB\t\n\x07_x_flagB\t\n\x07_r_flagB\t\n\x07_n_flag\"\x8c\x01\n\x0eV4RouteAddress\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06prefix\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x11\n\x04step\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\n\n\x08_addressB\t\n\x07_prefixB\x08\n\x06_countB\x07\n\x05_step\"\x8c\x01\n\x0eV6RouteAddress\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06prefix\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x11\n\x04step\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\n\n\x08_addressB\t\n\x07_prefixB\x08\n\x06_countB\x07\n\x05_step\"\x8d\x01\n\x0fMACRouteAddress\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06prefix\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x11\n\x04step\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\n\n\x08_addressB\t\n\x07_prefixB\x08\n\x06_countB\x07\n\x05_step\"\xd8\x04\n\x10IsisV6RouteRange\x12&\n\taddresses\x18\x01 \x03(\x0b\x32\x13.otg.V6RouteAddress\x12\x18\n\x0blink_metric\x18\x02 \x01(\rH\x00\x88\x01\x01\x12?\n\x0borigin_type\x18\x03 \x01(\x0e\x32%.otg.IsisV6RouteRange.OriginType.EnumH\x01\x88\x01\x01\x12O\n\x13redistribution_type\x18\x04 \x01(\x0e\x32-.otg.IsisV6RouteRange.RedistributionType.EnumH\x02\x88\x01\x01\x12\x11\n\x04name\x18\x05 \x01(\tH\x03\x88\x01\x01\x12 \n\x13prefix_attr_enabled\x18\x06 \x01(\x08H\x04\x88\x01\x01\x12\x13\n\x06x_flag\x18\x07 \x01(\x08H\x05\x88\x01\x01\x12\x13\n\x06r_flag\x18\x08 \x01(\x08H\x06\x88\x01\x01\x12\x13\n\x06n_flag\x18\t \x01(\x08H\x07\x88\x01\x01\x1a\x41\n\nOriginType\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08internal\x10\x01\x12\x0c\n\x08\x65xternal\x10\x02\x1a?\n\x12RedistributionType\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x0e\n\x0c_link_metricB\x0e\n\x0c_origin_typeB\x16\n\x14_redistribution_typeB\x07\n\x05_nameB\x16\n\x14_prefix_attr_enabledB\t\n\x07_x_flagB\t\n\x07_r_flagB\t\n\x07_n_flag\"\x93\x01\n\x0f\x44\x65viceBgpRouter\x12\x16\n\trouter_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12,\n\x0fipv4_interfaces\x18\x02 \x03(\x0b\x32\x13.otg.BgpV4Interface\x12,\n\x0fipv6_interfaces\x18\x03 \x03(\x0b\x32\x13.otg.BgpV6InterfaceB\x0c\n\n_router_id\"\x90\x02\n\x1b\x44\x65viceBgpMessageHeaderError\x12\x43\n\x07subcode\x18\x01 \x01(\x0e\x32-.otg.DeviceBgpMessageHeaderError.Subcode.EnumH\x00\x88\x01\x01\x1a\x9f\x01\n\x07Subcode\"\x93\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12.\n*connection_not_synchronized_code1_subcode1\x10\x01\x12%\n!bad_message_length_code1_subcode2\x10\x02\x12#\n\x1f\x62\x61\x64_message_type_code1_subcode3\x10\x03\x42\n\n\x08_subcode\"\xaa\x03\n\x19\x44\x65viceBgpOpenMessageError\x12\x41\n\x07subcode\x18\x01 \x01(\x0e\x32+.otg.DeviceBgpOpenMessageError.Subcode.EnumH\x00\x88\x01\x01\x1a\xbd\x02\n\x07Subcode\"\xb1\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12-\n)unsupported_version_number_code2_subcode1\x10\x01\x12 \n\x1c\x65rror_peer_as_code2_subcode2\x10\x02\x12\x1f\n\x1b\x65rror_bgp_id_code2_subcode3\x10\x03\x12\x31\n-unsupported_optional_parameter_code2_subcode4\x10\x04\x12\x1e\n\x1a\x61uth_failed_code2_subcode5\x10\x05\x12(\n$unsupported_hold_time_code2_subcode6\x10\x06\x12)\n%unsupported_capability_code2_subcode7\x10\x07\x42\n\n\x08_subcode\"\xdc\x04\n\x1b\x44\x65viceBgpUpdateMessageError\x12\x43\n\x07subcode\x18\x01 \x01(\x0e\x32-.otg.DeviceBgpUpdateMessageError.Subcode.EnumH\x00\x88\x01\x01\x1a\xeb\x03\n\x07Subcode\"\xdf\x03\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12(\n$malformed_attrib_list_code3_subcode1\x10\x01\x12\x30\n,unrecognized_wellknown_attrib_code3_subcode2\x10\x02\x12+\n\'wellknown_attrib_missing_code3_subcode3\x10\x03\x12%\n!attrib_flags_error_code3_subcode4\x10\x04\x12&\n\"attrib_length_error_code3_subcode5\x10\x05\x12(\n$invalid_origin_attrib_code3_subcode6\x10\x06\x12\"\n\x1e\x61s_routing_loop_code3_subcode7\x10\x07\x12&\n\"invalid_nhop_attrib_code3_subcode8\x10\x08\x12(\n$error_optional_attrib_code3_subcode9\x10\t\x12)\n%invalid_network_field_code3_subcode10\x10\n\x12#\n\x1f\x61\x62normal_aspath_code3_subcode11\x10\x0b\x42\n\n\x08_subcode\"\x1b\n\x19\x44\x65viceBgpHoldTimerExpired\"\"\n DeviceBgpFiniteStateMachineError\"\xe3\x03\n\x13\x44\x65viceBgpCeaseError\x12;\n\x07subcode\x18\x01 \x01(\x0e\x32%.otg.DeviceBgpCeaseError.Subcode.EnumH\x00\x88\x01\x01\x1a\x82\x03\n\x07Subcode\"\xf6\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12,\n(max_number_prefix_reached_code6_subcode1\x10\x01\x12!\n\x1d\x61\x64min_shutdown_code6_subcode2\x10\x02\x12\x1f\n\x1bpeer_deleted_code6_subcode3\x10\x03\x12\x1e\n\x1a\x61\x64min_reset_code6_subcode4\x10\x04\x12$\n connection_reject_code6_subcode5\x10\x05\x12\'\n#other_config_changes_code6_subcode6\x10\x06\x12\x32\n.connection_collision_resolution_code6_subcode7\x10\x07\x12#\n\x1fout_of_resources_code6_subcode8\x10\x08\x12#\n\x1f\x62\x66\x64_session_down_code6_subcode9\x10\tB\n\n\x08_subcode\"T\n\x14\x44\x65viceBgpCustomError\x12\x11\n\x04\x63ode\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x14\n\x07subcode\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x07\n\x05_codeB\n\n\x08_subcode\"\xe0\x06\n\tBgpV4Peer\x12\x19\n\x0cpeer_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x16\x65vpn_ethernet_segments\x18\x02 \x03(\x0b\x32\x19.otg.BgpV4EthernetSegment\x12\x30\n\x07\x61s_type\x18\x03 \x01(\x0e\x32\x1a.otg.BgpV4Peer.AsType.EnumH\x01\x88\x01\x01\x12\x16\n\tas_number\x18\x04 \x01(\rH\x02\x88\x01\x01\x12?\n\x0f\x61s_number_width\x18\x05 \x01(\x0e\x32!.otg.BgpV4Peer.AsNumberWidth.EnumH\x03\x88\x01\x01\x12\"\n\x08\x61\x64vanced\x18\x06 \x01(\x0b\x32\x10.otg.BgpAdvanced\x12&\n\ncapability\x18\x07 \x01(\x0b\x32\x12.otg.BgpCapability\x12\x44\n\x1alearned_information_filter\x18\x08 \x01(\x0b\x32 .otg.BgpLearnedInformationFilter\x12\'\n\tv4_routes\x18\t \x03(\x0b\x32\x14.otg.BgpV4RouteRange\x12\'\n\tv6_routes\x18\n \x03(\x0b\x32\x14.otg.BgpV6RouteRange\x12.\n\x10v4_srte_policies\x18\x0b \x03(\x0b\x32\x14.otg.BgpSrteV4Policy\x12.\n\x10v6_srte_policies\x18\x0c \x03(\x0b\x32\x14.otg.BgpSrteV6Policy\x12\x11\n\x04name\x18\r \x01(\tH\x04\x88\x01\x01\x12\x31\n\x10graceful_restart\x18\x0e \x01(\x0b\x32\x17.otg.BgpGracefulRestart\x12,\n\x0ereplay_updates\x18\x0f \x01(\x0b\x32\x14.otg.BgpUpdateReplay\x1a\x35\n\x06\x41sType\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ibgp\x10\x01\x12\x08\n\x04\x65\x62gp\x10\x02\x1a;\n\rAsNumberWidth\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03two\x10\x01\x12\x08\n\x04\x66our\x10\x02\x42\x0f\n\r_peer_addressB\n\n\x08_as_typeB\x0c\n\n_as_numberB\x12\n\x10_as_number_widthB\x07\n\x05_name\"U\n\x0e\x42gpV4Interface\x12\x16\n\tipv4_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x05peers\x18\x02 \x03(\x0b\x32\x0e.otg.BgpV4PeerB\x0c\n\n_ipv4_name\"\xf0\x03\n\x14\x42gpV4EthernetSegment\x12\x36\n\x0b\x64\x66_election\x18\x01 \x01(\x0b\x32!.otg.BgpEthernetSegmentDfElection\x12 \n\x04\x65vis\x18\x02 \x03(\x0b\x32\x12.otg.BgpV4EvpnEvis\x12\x10\n\x03\x65si\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x43\n\x0b\x61\x63tive_mode\x18\x04 \x01(\x0e\x32).otg.BgpV4EthernetSegment.ActiveMode.EnumH\x01\x88\x01\x01\x12\x16\n\tesi_label\x18\x05 \x01(\rH\x02\x88\x01\x01\x12\'\n\x08\x61\x64vanced\x18\x06 \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12&\n\x0b\x63ommunities\x18\x07 \x03(\x0b\x32\x11.otg.BgpCommunity\x12-\n\x0f\x65xt_communities\x18\x08 \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12\x1f\n\x07\x61s_path\x18\t \x01(\x0b\x32\x0e.otg.BgpAsPath\x1aH\n\nActiveMode\":\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rsingle_active\x10\x01\x12\x0e\n\nall_active\x10\x02\x42\x06\n\x04_esiB\x0e\n\x0c_active_modeB\x0c\n\n_esi_label\"N\n\x1c\x42gpEthernetSegmentDfElection\x12\x1b\n\x0e\x65lection_timer\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x11\n\x0f_election_timer\"\xda\x03\n\x10\x42gpRouteAdvanced\x12-\n include_multi_exit_discriminator\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12%\n\x18multi_exit_discriminator\x18\x01 \x01(\rH\x01\x88\x01\x01\x12\x1b\n\x0einclude_origin\x18\x04 \x01(\x08H\x02\x88\x01\x01\x12\x36\n\x06origin\x18\x02 \x01(\x0e\x32!.otg.BgpRouteAdvanced.Origin.EnumH\x03\x88\x01\x01\x12%\n\x18include_local_preference\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x1d\n\x10local_preference\x18\x06 \x01(\rH\x05\x88\x01\x01\x1a\x43\n\x06Origin\"9\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03igp\x10\x01\x12\x07\n\x03\x65gp\x10\x02\x12\x0e\n\nincomplete\x10\x03\x42#\n!_include_multi_exit_discriminatorB\x1b\n\x19_multi_exit_discriminatorB\x11\n\x0f_include_originB\t\n\x07_originB\x1b\n\x19_include_local_preferenceB\x13\n\x11_local_preference\"\xa4\x02\n\x0c\x42gpCommunity\x12.\n\x04type\x18\x01 \x01(\x0e\x32\x1b.otg.BgpCommunity.Type.EnumH\x00\x88\x01\x01\x12\x16\n\tas_number\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x16\n\tas_custom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x8e\x01\n\x04Type\"\x85\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x14\n\x10manual_as_number\x10\x01\x12\r\n\tno_export\x10\x02\x12\x11\n\rno_advertised\x10\x03\x12\x17\n\x13no_export_subconfed\x10\x04\x12\x0e\n\nllgr_stale\x10\x05\x12\x0b\n\x07no_llgr\x10\x06\x42\x07\n\x05_typeB\x0c\n\n_as_numberB\x0c\n\n_as_custom\"\xf9\x03\n\x0f\x42gpExtCommunity\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32\x1e.otg.BgpExtCommunity.Type.EnumH\x00\x88\x01\x01\x12\x37\n\x07subtype\x18\x02 \x01(\x0e\x32!.otg.BgpExtCommunity.Subtype.EnumH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\xbc\x01\n\x04Type\"\xb3\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1b\n\x17\x61\x64ministrator_as_2octet\x10\x01\x12\x1e\n\x1a\x61\x64ministrator_ipv4_address\x10\x02\x12\x1b\n\x17\x61\x64ministrator_as_4octet\x10\x03\x12\n\n\x06opaque\x10\x04\x12\x08\n\x04\x65vpn\x10\x05\x12*\n&administrator_as_2octet_link_bandwidth\x10\x06\x1a\x87\x01\n\x07Subtype\"|\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0croute_target\x10\x01\x12\n\n\x06origin\x10\x02\x12\x16\n\x12\x65xtended_bandwidth\x10\x03\x12\t\n\x05\x63olor\x10\x04\x12\x11\n\rencapsulation\x10\x05\x12\x0f\n\x0bmac_address\x10\x06\x42\x07\n\x05_typeB\n\n\x08_subtypeB\x08\n\x06_value\"\xbe\x02\n\tBgpAsPath\x12\x37\n\x0b\x61s_set_mode\x18\x01 \x01(\x0e\x32\x1d.otg.BgpAsPath.AsSetMode.EnumH\x00\x88\x01\x01\x12\'\n\x08segments\x18\x02 \x03(\x0b\x32\x15.otg.BgpAsPathSegment\x1a\xbe\x01\n\tAsSetMode\"\xb0\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1b\n\x17\x64o_not_include_local_as\x10\x01\x12\x12\n\x0einclude_as_seq\x10\x02\x12\x12\n\x0einclude_as_set\x10\x03\x12\x19\n\x15include_as_confed_seq\x10\x04\x12\x19\n\x15include_as_confed_set\x10\x05\x12\x1c\n\x18prepend_to_first_segment\x10\x06\x42\x0e\n\x0c_as_set_mode\"\xc2\x01\n\x10\x42gpAsPathSegment\x12\x32\n\x04type\x18\x01 \x01(\x0e\x32\x1f.otg.BgpAsPathSegment.Type.EnumH\x00\x88\x01\x01\x12\x12\n\nas_numbers\x18\x02 \x03(\r\x1a]\n\x04Type\"U\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x61s_seq\x10\x01\x12\n\n\x06\x61s_set\x10\x02\x12\x11\n\ras_confed_seq\x10\x03\x12\x11\n\ras_confed_set\x10\x04\x42\x07\n\x05_type\"\xa8\x01\n\rBgpV4EvpnEvis\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.BgpV4EvpnEvis.Choice.EnumH\x00\x88\x01\x01\x12%\n\tevi_vxlan\x18\x02 \x01(\x0b\x32\x12.otg.BgpV4EviVxlan\x1a\x30\n\x06\x43hoice\"&\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tevi_vxlan\x10\x01\x42\t\n\x07_choice\"\xe3\x05\n\rBgpV4EviVxlan\x12<\n\x11\x62roadcast_domains\x18\x01 \x03(\x0b\x32!.otg.BgpV4EviVxlanBroadcastDomain\x12\x46\n\x10replication_type\x18\x02 \x01(\x0e\x32\'.otg.BgpV4EviVxlan.ReplicationType.EnumH\x00\x88\x01\x01\x12\x17\n\npmsi_label\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x15\n\x08\x61\x64_label\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x37\n\x13route_distinguisher\x18\x05 \x01(\x0b\x32\x1a.otg.BgpRouteDistinguisher\x12\x30\n\x13route_target_export\x18\x06 \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\x30\n\x13route_target_import\x18\x07 \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\x33\n\x16l3_route_target_export\x18\x08 \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\x33\n\x16l3_route_target_import\x18\t \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\'\n\x08\x61\x64vanced\x18\n \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12&\n\x0b\x63ommunities\x18\x0b \x03(\x0b\x32\x11.otg.BgpCommunity\x12-\n\x0f\x65xt_communities\x18\x0c \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12\x1f\n\x07\x61s_path\x18\r \x01(\x0b\x32\x0e.otg.BgpAsPath\x1a\x43\n\x0fReplicationType\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x17\n\x13ingress_replication\x10\x01\x42\x13\n\x11_replication_typeB\r\n\x0b_pmsi_labelB\x0b\n\t_ad_label\"\xb4\x01\n\x1c\x42gpV4EviVxlanBroadcastDomain\x12*\n\rcmac_ip_range\x18\x01 \x03(\x0b\x32\x13.otg.BgpCMacIpRange\x12\x1c\n\x0f\x65thernet_tag_id\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1f\n\x12vlan_aware_service\x18\x03 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_ethernet_tag_idB\x15\n\x13_vlan_aware_service\"\xd2\x03\n\x0e\x42gpCMacIpRange\x12+\n\rmac_addresses\x18\x01 \x01(\x0b\x32\x14.otg.MACRouteAddress\x12\x12\n\x05l2vni\x18\x02 \x01(\rH\x00\x88\x01\x01\x12+\n\x0eipv4_addresses\x18\x03 \x01(\x0b\x32\x13.otg.V4RouteAddress\x12+\n\x0eipv6_addresses\x18\x04 \x01(\x0b\x32\x13.otg.V6RouteAddress\x12\x12\n\x05l3vni\x18\x05 \x01(\rH\x01\x88\x01\x01\x12$\n\x17include_default_gateway\x18\x06 \x01(\x08H\x02\x88\x01\x01\x12\'\n\x08\x61\x64vanced\x18\x07 \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12&\n\x0b\x63ommunities\x18\x08 \x03(\x0b\x32\x11.otg.BgpCommunity\x12-\n\x0f\x65xt_communities\x18\t \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12\x1f\n\x07\x61s_path\x18\n \x01(\x0b\x32\x0e.otg.BgpAsPath\x12\x11\n\x04name\x18\x0b \x01(\tH\x03\x88\x01\x01\x42\x08\n\x06_l2vniB\x08\n\x06_l3vniB\x1a\n\x18_include_default_gatewayB\x07\n\x05_name\"\x98\x02\n\x15\x42gpRouteDistinguisher\x12<\n\x07rd_type\x18\x01 \x01(\x0e\x32&.otg.BgpRouteDistinguisher.RdType.EnumH\x00\x88\x01\x01\x12#\n\x16\x61uto_config_rd_ip_addr\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x15\n\x08rd_value\x18\x03 \x01(\tH\x02\x88\x01\x01\x1aQ\n\x06RdType\"G\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tas_2octet\x10\x01\x12\x10\n\x0cipv4_address\x10\x02\x12\r\n\tas_4octet\x10\x03\x42\n\n\x08_rd_typeB\x19\n\x17_auto_config_rd_ip_addrB\x0b\n\t_rd_value\"\xca\x01\n\x0e\x42gpRouteTarget\x12\x35\n\x07rt_type\x18\x01 \x01(\x0e\x32\x1f.otg.BgpRouteTarget.RtType.EnumH\x00\x88\x01\x01\x12\x15\n\x08rt_value\x18\x02 \x01(\tH\x01\x88\x01\x01\x1aQ\n\x06RtType\"G\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tas_2octet\x10\x01\x12\x10\n\x0cipv4_address\x10\x02\x12\r\n\tas_4octet\x10\x03\x42\n\n\x08_rt_typeB\x0b\n\t_rt_value\"\x83\x03\n\x0b\x42gpAdvanced\x12\x1f\n\x12hold_time_interval\x18\x01 \x01(\rH\x00\x88\x01\x01\x12 \n\x13keep_alive_interval\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1c\n\x0fupdate_interval\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x19\n\x0ctime_to_live\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x14\n\x07md5_key\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x19\n\x0cpassive_mode\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x18\n\x0blisten_port\x18\x07 \x01(\rH\x06\x88\x01\x01\x12\x1a\n\rneighbor_port\x18\x08 \x01(\rH\x07\x88\x01\x01\x42\x15\n\x13_hold_time_intervalB\x16\n\x14_keep_alive_intervalB\x12\n\x10_update_intervalB\x0f\n\r_time_to_liveB\n\n\x08_md5_keyB\x0f\n\r_passive_modeB\x0e\n\x0c_listen_portB\x10\n\x0e_neighbor_port\"\x91\n\n\rBgpCapability\x12\x19\n\x0cipv4_unicast\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1b\n\x0eipv4_multicast\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x19\n\x0cipv6_unicast\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x1b\n\x0eipv6_multicast\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x11\n\x04vpls\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x1a\n\rroute_refresh\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x1d\n\x10route_constraint\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12\x1f\n\x12link_state_non_vpn\x18\x08 \x01(\x08H\x07\x88\x01\x01\x12\x1b\n\x0elink_state_vpn\x18\t \x01(\x08H\x08\x88\x01\x01\x12\x11\n\x04\x65vpn\x18\n \x01(\x08H\t\x88\x01\x01\x12\'\n\x1a\x65xtended_next_hop_encoding\x18\x0b \x01(\x08H\n\x88\x01\x01\x12\x1f\n\x12ipv4_multicast_vpn\x18\x0c \x01(\x08H\x0b\x88\x01\x01\x12\x1a\n\ripv4_mpls_vpn\x18\r \x01(\x08H\x0c\x88\x01\x01\x12\x15\n\x08ipv4_mdt\x18\x0e \x01(\x08H\r\x88\x01\x01\x12$\n\x17ipv4_multicast_mpls_vpn\x18\x0f \x01(\x08H\x0e\x88\x01\x01\x12#\n\x16ipv4_unicast_flow_spec\x18\x10 \x01(\x08H\x0f\x88\x01\x01\x12\x1e\n\x11ipv4_sr_te_policy\x18\x11 \x01(\x08H\x10\x88\x01\x01\x12\"\n\x15ipv4_unicast_add_path\x18\x12 \x01(\x08H\x11\x88\x01\x01\x12\x1f\n\x12ipv6_multicast_vpn\x18\x13 \x01(\x08H\x12\x88\x01\x01\x12\x1a\n\ripv6_mpls_vpn\x18\x14 \x01(\x08H\x13\x88\x01\x01\x12\x15\n\x08ipv6_mdt\x18\x15 \x01(\x08H\x14\x88\x01\x01\x12$\n\x17ipv6_multicast_mpls_vpn\x18\x16 \x01(\x08H\x15\x88\x01\x01\x12#\n\x16ipv6_unicast_flow_spec\x18\x17 \x01(\x08H\x16\x88\x01\x01\x12\x1e\n\x11ipv6_sr_te_policy\x18\x18 \x01(\x08H\x17\x88\x01\x01\x12\"\n\x15ipv6_unicast_add_path\x18\x19 \x01(\x08H\x18\x88\x01\x01\x42\x0f\n\r_ipv4_unicastB\x11\n\x0f_ipv4_multicastB\x0f\n\r_ipv6_unicastB\x11\n\x0f_ipv6_multicastB\x07\n\x05_vplsB\x10\n\x0e_route_refreshB\x13\n\x11_route_constraintB\x15\n\x13_link_state_non_vpnB\x11\n\x0f_link_state_vpnB\x07\n\x05_evpnB\x1d\n\x1b_extended_next_hop_encodingB\x15\n\x13_ipv4_multicast_vpnB\x10\n\x0e_ipv4_mpls_vpnB\x0b\n\t_ipv4_mdtB\x1a\n\x18_ipv4_multicast_mpls_vpnB\x19\n\x17_ipv4_unicast_flow_specB\x14\n\x12_ipv4_sr_te_policyB\x18\n\x16_ipv4_unicast_add_pathB\x15\n\x13_ipv6_multicast_vpnB\x10\n\x0e_ipv6_mpls_vpnB\x0b\n\t_ipv6_mdtB\x1a\n\x18_ipv6_multicast_mpls_vpnB\x19\n\x17_ipv6_unicast_flow_specB\x14\n\x12_ipv6_sr_te_policyB\x18\n\x16_ipv6_unicast_add_path\"\x91\x01\n\x1b\x42gpLearnedInformationFilter\x12 \n\x13unicast_ipv4_prefix\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12 \n\x13unicast_ipv6_prefix\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x16\n\x14_unicast_ipv4_prefixB\x16\n\x14_unicast_ipv6_prefix\"\x94\x06\n\x0f\x42gpV4RouteRange\x12&\n\taddresses\x18\x01 \x03(\x0b\x32\x13.otg.V4RouteAddress\x12\x41\n\rnext_hop_mode\x18\x02 \x01(\x0e\x32%.otg.BgpV4RouteRange.NextHopMode.EnumH\x00\x88\x01\x01\x12P\n\x15next_hop_address_type\x18\x03 \x01(\x0e\x32,.otg.BgpV4RouteRange.NextHopAddressType.EnumH\x01\x88\x01\x01\x12\"\n\x15next_hop_ipv4_address\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\"\n\x15next_hop_ipv6_address\x18\x05 \x01(\tH\x03\x88\x01\x01\x12\'\n\x08\x61\x64vanced\x18\x06 \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12&\n\x0b\x63ommunities\x18\x07 \x03(\x0b\x32\x11.otg.BgpCommunity\x12\x1f\n\x07\x61s_path\x18\x08 \x01(\x0b\x32\x0e.otg.BgpAsPath\x12!\n\x08\x61\x64\x64_path\x18\t \x01(\x0b\x32\x0f.otg.BgpAddPath\x12\x11\n\x04name\x18\n \x01(\tH\x04\x88\x01\x01\x12-\n\x0f\x65xt_communities\x18\x0b \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12\x37\n\x14\x65xtended_communities\x18\x0c \x03(\x0b\x32\x19.otg.BgpExtendedCommunity\x1a@\n\x0bNextHopMode\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08local_ip\x10\x01\x12\n\n\x06manual\x10\x02\x1a\x41\n\x12NextHopAddressType\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x42\x10\n\x0e_next_hop_modeB\x18\n\x16_next_hop_address_typeB\x18\n\x16_next_hop_ipv4_addressB\x18\n\x16_next_hop_ipv6_addressB\x07\n\x05_name\".\n\nBgpAddPath\x12\x14\n\x07path_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\n\n\x08_path_id\"\xf3\x06\n\x14\x42gpExtendedCommunity\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.BgpExtendedCommunity.Choice.EnumH\x00\x88\x01\x01\x12R\n\x19transitive_2octet_as_type\x18\x02 \x01(\x0b\x32/.otg.BgpExtendedCommunityTransitive2OctetAsType\x12X\n\x1ctransitive_ipv4_address_type\x18\x03 \x01(\x0b\x32\x32.otg.BgpExtendedCommunityTransitiveIpv4AddressType\x12R\n\x19transitive_4octet_as_type\x18\x04 \x01(\x0b\x32/.otg.BgpExtendedCommunityTransitive4OctetAsType\x12M\n\x16transitive_opaque_type\x18\x05 \x01(\x0b\x32-.otg.BgpExtendedCommunityTransitiveOpaqueType\x12I\n\x14transitive_evpn_type\x18\x06 \x01(\x0b\x32+.otg.BgpExtendedCommunityTransitiveEvpnType\x12Y\n\x1dnon_transitive_2octet_as_type\x18\x07 \x01(\x0b\x32\x32.otg.BgpExtendedCommunityNonTransitive2OctetAsType\x12\x33\n\x06\x63ustom\x18\x08 \x01(\x0b\x32#.otg.BgpExtendedCommunityCustomType\x1a\xe7\x01\n\x06\x43hoice\"\xdc\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1d\n\x19transitive_2octet_as_type\x10\x01\x12 \n\x1ctransitive_ipv4_address_type\x10\x02\x12\x1d\n\x19transitive_4octet_as_type\x10\x03\x12\x1a\n\x16transitive_opaque_type\x10\x04\x12\x18\n\x14transitive_evpn_type\x10\x05\x12!\n\x1dnon_transitive_2octet_as_type\x10\x06\x12\n\n\x06\x63ustom\x10\x07\x42\t\n\x07_choice\"\x9f\x01\n5BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget\x12\x1c\n\x0fglobal_2byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11local_4byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x12\n\x10_global_2byte_asB\x14\n\x12_local_4byte_admin\"\x9f\x01\n5BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin\x12\x1c\n\x0fglobal_2byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11local_4byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x12\n\x10_global_2byte_asB\x14\n\x12_local_4byte_admin\"\x94\x03\n*BgpExtendedCommunityTransitive2OctetAsType\x12P\n\x06\x63hoice\x18\x01 \x01(\x0e\x32;.otg.BgpExtendedCommunityTransitive2OctetAsType.Choice.EnumH\x00\x88\x01\x01\x12X\n\x14route_target_subtype\x18\x02 \x01(\x0b\x32:.otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget\x12X\n\x14route_origin_subtype\x18\x03 \x01(\x0b\x32:.otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin\x1aU\n\x06\x43hoice\"K\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x18\n\x14route_target_subtype\x10\x01\x12\x18\n\x14route_origin_subtype\x10\x02\x42\t\n\x07_choice\"\xa6\x01\n8BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin\x12\x1e\n\x11global_ipv4_admin\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11local_2byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x14\n\x12_global_ipv4_adminB\x14\n\x12_local_2byte_admin\"\xa6\x01\n8BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget\x12\x1e\n\x11global_ipv4_admin\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11local_2byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x14\n\x12_global_ipv4_adminB\x14\n\x12_local_2byte_admin\"\xa0\x03\n-BgpExtendedCommunityTransitiveIpv4AddressType\x12S\n\x06\x63hoice\x18\x01 \x01(\x0e\x32>.otg.BgpExtendedCommunityTransitiveIpv4AddressType.Choice.EnumH\x00\x88\x01\x01\x12[\n\x14route_target_subtype\x18\x02 \x01(\x0b\x32=.otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget\x12[\n\x14route_origin_subtype\x18\x03 \x01(\x0b\x32=.otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin\x1aU\n\x06\x43hoice\"K\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x18\n\x14route_target_subtype\x10\x01\x12\x18\n\x14route_origin_subtype\x10\x02\x42\t\n\x07_choice\"\x9f\x01\n5BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget\x12\x1c\n\x0fglobal_4byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11local_2byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x12\n\x10_global_4byte_asB\x14\n\x12_local_2byte_admin\"\x9f\x01\n5BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin\x12\x1c\n\x0fglobal_4byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11local_2byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x12\n\x10_global_4byte_asB\x14\n\x12_local_2byte_admin\"\x94\x03\n*BgpExtendedCommunityTransitive4OctetAsType\x12P\n\x06\x63hoice\x18\x01 \x01(\x0e\x32;.otg.BgpExtendedCommunityTransitive4OctetAsType.Choice.EnumH\x00\x88\x01\x01\x12X\n\x14route_target_subtype\x18\x02 \x01(\x0b\x32:.otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget\x12X\n\x14route_origin_subtype\x18\x03 \x01(\x0b\x32:.otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin\x1aU\n\x06\x43hoice\"K\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x18\n\x14route_target_subtype\x10\x01\x12\x18\n\x14route_origin_subtype\x10\x02\x42\t\n\x07_choice\"k\n-BgpExtendedCommunityTransitiveOpaqueTypeColor\x12\x12\n\x05\x66lags\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x08\n\x06_flagsB\x08\n\x06_color\"\x85\x01\n5BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation\x12\x15\n\x08reserved\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x18\n\x0btunnel_type\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x0b\n\t_reservedB\x0e\n\x0c_tunnel_type\"\xfc\x02\n(BgpExtendedCommunityTransitiveOpaqueType\x12N\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x39.otg.BgpExtendedCommunityTransitiveOpaqueType.Choice.EnumH\x00\x88\x01\x01\x12I\n\rcolor_subtype\x18\x02 \x01(\x0b\x32\x32.otg.BgpExtendedCommunityTransitiveOpaqueTypeColor\x12Y\n\x15\x65ncapsulation_subtype\x18\x03 \x01(\x0b\x32:.otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation\x1aO\n\x06\x43hoice\"E\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rcolor_subtype\x10\x01\x12\x19\n\x15\x65ncapsulation_subtype\x10\x02\x42\t\n\x07_choice\"Y\n/BgpExtendedCommunityTransitiveEvpnTypeRouterMac\x12\x17\n\nrouter_mac\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_router_mac\"\x8e\x02\n&BgpExtendedCommunityTransitiveEvpnType\x12L\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x37.otg.BgpExtendedCommunityTransitiveEvpnType.Choice.EnumH\x00\x88\x01\x01\x12P\n\x12router_mac_subtype\x18\x02 \x01(\x0b\x32\x34.otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac\x1a\x39\n\x06\x43hoice\"/\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x16\n\x12router_mac_subtype\x10\x01\x42\t\n\x07_choice\"\x94\x01\n:BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth\x12\x1c\n\x0fglobal_2byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x16\n\tbandwidth\x18\x02 \x01(\x02H\x01\x88\x01\x01\x42\x12\n\x10_global_2byte_asB\x0c\n\n_bandwidth\"\xaf\x02\n-BgpExtendedCommunityNonTransitive2OctetAsType\x12S\n\x06\x63hoice\x18\x01 \x01(\x0e\x32>.otg.BgpExtendedCommunityNonTransitive2OctetAsType.Choice.EnumH\x00\x88\x01\x01\x12_\n\x16link_bandwidth_subtype\x18\x02 \x01(\x0b\x32?.otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth\x1a=\n\x06\x43hoice\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1a\n\x16link_bandwidth_subtype\x10\x01\x42\t\n\x07_choice\"\xa4\x01\n\x1e\x42gpExtendedCommunityCustomType\x12\x1b\n\x0e\x63ommunity_type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11\x63ommunity_subtype\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x11\n\x0f_community_typeB\x14\n\x12_community_subtypeB\x08\n\x06_value\"\x94\x06\n\x0f\x42gpV6RouteRange\x12&\n\taddresses\x18\x01 \x03(\x0b\x32\x13.otg.V6RouteAddress\x12\x41\n\rnext_hop_mode\x18\x02 \x01(\x0e\x32%.otg.BgpV6RouteRange.NextHopMode.EnumH\x00\x88\x01\x01\x12P\n\x15next_hop_address_type\x18\x03 \x01(\x0e\x32,.otg.BgpV6RouteRange.NextHopAddressType.EnumH\x01\x88\x01\x01\x12\"\n\x15next_hop_ipv4_address\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\"\n\x15next_hop_ipv6_address\x18\x05 \x01(\tH\x03\x88\x01\x01\x12\'\n\x08\x61\x64vanced\x18\x06 \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12&\n\x0b\x63ommunities\x18\x07 \x03(\x0b\x32\x11.otg.BgpCommunity\x12\x1f\n\x07\x61s_path\x18\x08 \x01(\x0b\x32\x0e.otg.BgpAsPath\x12!\n\x08\x61\x64\x64_path\x18\t \x01(\x0b\x32\x0f.otg.BgpAddPath\x12\x11\n\x04name\x18\n \x01(\tH\x04\x88\x01\x01\x12-\n\x0f\x65xt_communities\x18\x0b \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12\x37\n\x14\x65xtended_communities\x18\x0c \x03(\x0b\x32\x19.otg.BgpExtendedCommunity\x1a@\n\x0bNextHopMode\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08local_ip\x10\x01\x12\n\n\x06manual\x10\x02\x1a\x41\n\x12NextHopAddressType\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x42\x10\n\x0e_next_hop_modeB\x18\n\x16_next_hop_address_typeB\x18\n\x16_next_hop_ipv4_addressB\x18\n\x16_next_hop_ipv6_addressB\x07\n\x05_name\"\xfb\x06\n\x0f\x42gpSrteV4Policy\x12\x1a\n\rdistinguisher\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\ripv4_endpoint\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x41\n\rnext_hop_mode\x18\x04 \x01(\x0e\x32%.otg.BgpSrteV4Policy.NextHopMode.EnumH\x03\x88\x01\x01\x12P\n\x15next_hop_address_type\x18\x05 \x01(\x0e\x32,.otg.BgpSrteV4Policy.NextHopAddressType.EnumH\x04\x88\x01\x01\x12\"\n\x15next_hop_ipv4_address\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\"\n\x15next_hop_ipv6_address\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\'\n\x08\x61\x64vanced\x18\x08 \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12!\n\x08\x61\x64\x64_path\x18\t \x01(\x0b\x32\x0f.otg.BgpAddPath\x12\x1f\n\x07\x61s_path\x18\n \x01(\x0b\x32\x0e.otg.BgpAsPath\x12&\n\x0b\x63ommunities\x18\x0b \x03(\x0b\x32\x11.otg.BgpCommunity\x12-\n\x0f\x65xt_communities\x18\x0c \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12,\n\x0btunnel_tlvs\x18\r \x03(\x0b\x32\x17.otg.BgpSrteV4TunnelTlv\x12\x11\n\x04name\x18\x0e \x01(\tH\x07\x88\x01\x01\x12\x13\n\x06\x61\x63tive\x18\x0f \x01(\x08H\x08\x88\x01\x01\x1a@\n\x0bNextHopMode\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08local_ip\x10\x01\x12\n\n\x06manual\x10\x02\x1a\x41\n\x12NextHopAddressType\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x42\x10\n\x0e_distinguisherB\x08\n\x06_colorB\x10\n\x0e_ipv4_endpointB\x10\n\x0e_next_hop_modeB\x18\n\x16_next_hop_address_typeB\x18\n\x16_next_hop_ipv4_addressB\x18\n\x16_next_hop_ipv6_addressB\x07\n\x05_nameB\t\n\x07_active\"\xb6\x04\n\x12\x42gpSrteV4TunnelTlv\x12\x41\n\x17remote_endpoint_sub_tlv\x18\x01 \x01(\x0b\x32 .otg.BgpSrteRemoteEndpointSubTlv\x12.\n\rcolor_sub_tlv\x18\x02 \x01(\x0b\x32\x17.otg.BgpSrteColorSubTlv\x12\x32\n\x0f\x62inding_sub_tlv\x18\x03 \x01(\x0b\x32\x19.otg.BgpSrteBindingSubTlv\x12\x38\n\x12preference_sub_tlv\x18\x04 \x01(\x0b\x32\x1c.otg.BgpSrtePreferenceSubTlv\x12\x41\n\x17policy_priority_sub_tlv\x18\x05 \x01(\x0b\x32 .otg.BgpSrtePolicyPrioritySubTlv\x12\x39\n\x13policy_name_sub_tlv\x18\x06 \x01(\x0b\x32\x1c.otg.BgpSrtePolicyNameSubTlv\x12U\n\"explicit_null_label_policy_sub_tlv\x18\x07 \x01(\x0b\x32).otg.BgpSrteExplicitNullLabelPolicySubTlv\x12.\n\rsegment_lists\x18\x08 \x03(\x0b\x32\x17.otg.BgpSrteSegmentList\x12\x11\n\x04name\x18\t \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x61\x63tive\x18\n \x01(\x08H\x01\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_active\"\xbe\x02\n\x1b\x42gpSrteRemoteEndpointSubTlv\x12\x16\n\tas_number\x18\x01 \x01(\rH\x00\x88\x01\x01\x12P\n\x0e\x61\x64\x64ress_family\x18\x02 \x01(\x0e\x32\x33.otg.BgpSrteRemoteEndpointSubTlv.AddressFamily.EnumH\x01\x88\x01\x01\x12\x19\n\x0cipv4_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0cipv6_address\x18\x04 \x01(\tH\x03\x88\x01\x01\x1a<\n\rAddressFamily\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x42\x0c\n\n_as_numberB\x11\n\x0f_address_familyB\x0f\n\r_ipv4_addressB\x0f\n\r_ipv6_address\"2\n\x12\x42gpSrteColorSubTlv\x12\x12\n\x05\x63olor\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_color\"\xea\x02\n\x14\x42gpSrteBindingSubTlv\x12L\n\x10\x62inding_sid_type\x18\x01 \x01(\x0e\x32-.otg.BgpSrteBindingSubTlv.BindingSidType.EnumH\x00\x88\x01\x01\x12\x1b\n\x0e\x66our_octet_sid\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x15\n\x08ipv6_sid\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x13\n\x06s_flag\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x13\n\x06i_flag\x18\x05 \x01(\x08H\x04\x88\x01\x01\x1a[\n\x0e\x42indingSidType\"I\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\nno_binding\x10\x01\x12\x12\n\x0e\x66our_octet_sid\x10\x02\x12\x0c\n\x08ipv6_sid\x10\x03\x42\x13\n\x11_binding_sid_typeB\x11\n\x0f_four_octet_sidB\x0b\n\t_ipv6_sidB\t\n\x07_s_flagB\t\n\x07_i_flag\"A\n\x17\x42gpSrtePreferenceSubTlv\x12\x17\n\npreference\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\r\n\x0b_preference\"O\n\x1b\x42gpSrtePolicyPrioritySubTlv\x12\x1c\n\x0fpolicy_priority\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x12\n\x10_policy_priority\"C\n\x17\x42gpSrtePolicyNameSubTlv\x12\x18\n\x0bpolicy_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_policy_name\"\xd6\x02\n$BgpSrteExplicitNullLabelPolicySubTlv\x12o\n\x1a\x65xplicit_null_label_policy\x18\x01 \x01(\x0e\x32\x46.otg.BgpSrteExplicitNullLabelPolicySubTlv.ExplicitNullLabelPolicy.EnumH\x00\x88\x01\x01\x1a\x9d\x01\n\x17\x45xplicitNullLabelPolicy\"\x81\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rreserved_enlp\x10\x01\x12\x12\n\x0epush_ipv4_enlp\x10\x02\x12\x12\n\x0epush_ipv6_enlp\x10\x03\x12\x17\n\x13push_ipv4_ipv6_enlp\x10\x04\x12\x14\n\x10\x64o_not_push_enlp\x10\x05\x42\x1d\n\x1b_explicit_null_label_policy\"\x97\x01\n\x12\x42gpSrteSegmentList\x12\x13\n\x06weight\x18\x01 \x01(\rH\x00\x88\x01\x01\x12%\n\x08segments\x18\x02 \x03(\x0b\x32\x13.otg.BgpSrteSegment\x12\x11\n\x04name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06\x61\x63tive\x18\x04 \x01(\x08H\x02\x88\x01\x01\x42\t\n\x07_weightB\x07\n\x05_nameB\t\n\x07_active\"\xdc\x06\n\x0e\x42gpSrteSegment\x12?\n\x0csegment_type\x18\x01 \x01(\x0e\x32$.otg.BgpSrteSegment.SegmentType.EnumH\x00\x88\x01\x01\x12.\n\x06type_a\x18\x02 \x01(\x0b\x32\x1e.otg.BgpSrteSegmentATypeSubTlv\x12.\n\x06type_b\x18\x03 \x01(\x0b\x32\x1e.otg.BgpSrteSegmentBTypeSubTlv\x12.\n\x06type_c\x18\x04 \x01(\x0b\x32\x1e.otg.BgpSrteSegmentCTypeSubTlv\x12.\n\x06type_d\x18\x05 \x01(\x0b\x32\x1e.otg.BgpSrteSegmentDTypeSubTlv\x12.\n\x06type_e\x18\x06 \x01(\x0b\x32\x1e.otg.BgpSrteSegmentETypeSubTlv\x12.\n\x06type_f\x18\x07 \x01(\x0b\x32\x1e.otg.BgpSrteSegmentFTypeSubTlv\x12.\n\x06type_g\x18\x08 \x01(\x0b\x32\x1e.otg.BgpSrteSegmentGTypeSubTlv\x12.\n\x06type_h\x18\t \x01(\x0b\x32\x1e.otg.BgpSrteSegmentHTypeSubTlv\x12.\n\x06type_i\x18\n \x01(\x0b\x32\x1e.otg.BgpSrteSegmentITypeSubTlv\x12.\n\x06type_j\x18\x0b \x01(\x0b\x32\x1e.otg.BgpSrteSegmentJTypeSubTlv\x12.\n\x06type_k\x18\x0c \x01(\x0b\x32\x1e.otg.BgpSrteSegmentKTypeSubTlv\x12\x11\n\x04name\x18\r \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06\x61\x63tive\x18\x0e \x01(\x08H\x02\x88\x01\x01\x1a\xab\x01\n\x0bSegmentType\"\x9b\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06type_a\x10\x01\x12\n\n\x06type_b\x10\x02\x12\n\n\x06type_c\x10\x03\x12\n\n\x06type_d\x10\x04\x12\n\n\x06type_e\x10\x05\x12\n\n\x06type_f\x10\x06\x12\n\n\x06type_g\x10\x07\x12\n\n\x06type_h\x10\x08\x12\n\n\x06type_i\x10\t\x12\n\n\x06type_j\x10\n\x12\n\n\x06type_k\x10\x0b\x42\x0f\n\r_segment_typeB\x07\n\x05_nameB\t\n\x07_active\"\x80\x01\n\x10\x42gpSrteSrMplsSid\x12\x12\n\x05label\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x0f\n\x02tc\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05s_bit\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x10\n\x03ttl\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x08\n\x06_labelB\x05\n\x03_tcB\x08\n\x06_s_bitB\x06\n\x04_ttl\"\xca\x01\n*BgpSrteSRv6SIDEndpointBehaviorAndStructure\x12\x16\n\tlb_length\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x16\n\tln_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x18\n\x0b\x66unc_length\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x17\n\narg_length\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x0c\n\n_lb_lengthB\x0c\n\n_ln_lengthB\x0e\n\x0c_func_lengthB\r\n\x0b_arg_length\"\xa7\x01\n\x19\x42gpSrteSegmentATypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0f\n\x02tc\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x12\n\x05s_bit\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x10\n\x03ttl\x18\x05 \x01(\rH\x04\x88\x01\x01\x42\x08\n\x06_flagsB\x08\n\x06_labelB\x05\n\x03_tcB\x08\n\x06_s_bitB\x06\n\x04_ttl\"\xb2\x01\n\x19\x42gpSrteSegmentBTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08srv6_sid\x18\x02 \x01(\tH\x01\x88\x01\x01\x12S\n\x1asrv6_sid_endpoint_behavior\x18\x03 \x01(\x0b\x32/.otg.BgpSrteSRv6SIDEndpointBehaviorAndStructureB\x08\n\x06_flagsB\x0b\n\t_srv6_sid\"\xc7\x01\n\x19\x42gpSrteSegmentCTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0csr_algorithm\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1e\n\x11ipv4_node_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12*\n\x0bsr_mpls_sid\x18\x04 \x01(\x0b\x32\x15.otg.BgpSrteSrMplsSidB\x08\n\x06_flagsB\x0f\n\r_sr_algorithmB\x14\n\x12_ipv4_node_address\"\xc7\x01\n\x19\x42gpSrteSegmentDTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0csr_algorithm\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1e\n\x11ipv6_node_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12*\n\x0bsr_mpls_sid\x18\x04 \x01(\x0b\x32\x15.otg.BgpSrteSrMplsSidB\x08\n\x06_flagsB\x0f\n\r_sr_algorithmB\x14\n\x12_ipv6_node_address\"\xd3\x01\n\x19\x42gpSrteSegmentETypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12local_interface_id\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1e\n\x11ipv4_node_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12*\n\x0bsr_mpls_sid\x18\x04 \x01(\x0b\x32\x15.otg.BgpSrteSrMplsSidB\x08\n\x06_flagsB\x15\n\x13_local_interface_idB\x14\n\x12_ipv4_node_address\"\xd7\x01\n\x19\x42gpSrteSegmentFTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12local_ipv4_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12 \n\x13remote_ipv4_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12*\n\x0bsr_mpls_sid\x18\x04 \x01(\x0b\x32\x15.otg.BgpSrteSrMplsSidB\x08\n\x06_flagsB\x15\n\x13_local_ipv4_addressB\x16\n\x14_remote_ipv4_address\"\xdd\x02\n\x19\x42gpSrteSegmentGTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12local_interface_id\x18\x02 \x01(\rH\x01\x88\x01\x01\x12$\n\x17local_ipv6_node_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13remote_interface_id\x18\x04 \x01(\rH\x03\x88\x01\x01\x12%\n\x18remote_ipv6_node_address\x18\x05 \x01(\tH\x04\x88\x01\x01\x12*\n\x0bsr_mpls_sid\x18\x06 \x01(\x0b\x32\x15.otg.BgpSrteSrMplsSidB\x08\n\x06_flagsB\x15\n\x13_local_interface_idB\x1a\n\x18_local_ipv6_node_addressB\x16\n\x14_remote_interface_idB\x1b\n\x19_remote_ipv6_node_address\"\xd7\x01\n\x19\x42gpSrteSegmentHTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12local_ipv6_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12 \n\x13remote_ipv6_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12*\n\x0bsr_mpls_sid\x18\x04 \x01(\x0b\x32\x15.otg.BgpSrteSrMplsSidB\x08\n\x06_flagsB\x15\n\x13_local_ipv6_addressB\x16\n\x14_remote_ipv6_address\"\xe8\x01\n\x19\x42gpSrteSegmentITypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11ipv6_node_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08srv6_sid\x18\x03 \x01(\tH\x02\x88\x01\x01\x12S\n\x1asrv6_sid_endpoint_behavior\x18\x04 \x01(\x0b\x32/.otg.BgpSrteSRv6SIDEndpointBehaviorAndStructureB\x08\n\x06_flagsB\x14\n\x12_ipv6_node_addressB\x0b\n\t_srv6_sid\"\xd6\x03\n\x19\x42gpSrteSegmentJTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0csr_algorithm\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1f\n\x12local_interface_id\x18\x03 \x01(\rH\x02\x88\x01\x01\x12$\n\x17local_ipv6_node_address\x18\x04 \x01(\tH\x03\x88\x01\x01\x12 \n\x13remote_interface_id\x18\x05 \x01(\rH\x04\x88\x01\x01\x12%\n\x18remote_ipv6_node_address\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x15\n\x08srv6_sid\x18\x07 \x01(\tH\x06\x88\x01\x01\x12S\n\x1asrv6_sid_endpoint_behavior\x18\x08 \x01(\x0b\x32/.otg.BgpSrteSRv6SIDEndpointBehaviorAndStructureB\x08\n\x06_flagsB\x0f\n\r_sr_algorithmB\x15\n\x13_local_interface_idB\x1a\n\x18_local_ipv6_node_addressB\x16\n\x14_remote_interface_idB\x1b\n\x19_remote_ipv6_node_addressB\x0b\n\t_srv6_sid\"\xd0\x02\n\x19\x42gpSrteSegmentKTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0csr_algorithm\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1f\n\x12local_ipv6_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13remote_ipv6_address\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08srv6_sid\x18\x05 \x01(\tH\x04\x88\x01\x01\x12S\n\x1asrv6_sid_endpoint_behavior\x18\x06 \x01(\x0b\x32/.otg.BgpSrteSRv6SIDEndpointBehaviorAndStructureB\x08\n\x06_flagsB\x0f\n\r_sr_algorithmB\x15\n\x13_local_ipv6_addressB\x16\n\x14_remote_ipv6_addressB\x0b\n\t_srv6_sid\"\xfa\x06\n\x0f\x42gpSrteV6Policy\x12\x1a\n\rdistinguisher\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\ripv6_endpoint\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x41\n\rnext_hop_mode\x18\x04 \x01(\x0e\x32%.otg.BgpSrteV6Policy.NextHopMode.EnumH\x03\x88\x01\x01\x12P\n\x15next_hop_address_type\x18\x05 \x01(\x0e\x32,.otg.BgpSrteV6Policy.NextHopAddressType.EnumH\x04\x88\x01\x01\x12\"\n\x15next_hop_ipv4_address\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\"\n\x15next_hop_ipv6_address\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\'\n\x08\x61\x64vanced\x18\x08 \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12!\n\x08\x61\x64\x64_path\x18\t \x01(\x0b\x32\x0f.otg.BgpAddPath\x12\x1f\n\x07\x61s_path\x18\n \x01(\x0b\x32\x0e.otg.BgpAsPath\x12&\n\x0b\x63ommunities\x18\x0b \x03(\x0b\x32\x11.otg.BgpCommunity\x12,\n\x0e\x65xtcommunities\x18\x0c \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12,\n\x0btunnel_tlvs\x18\r \x03(\x0b\x32\x17.otg.BgpSrteV6TunnelTlv\x12\x11\n\x04name\x18\x0e \x01(\tH\x07\x88\x01\x01\x12\x13\n\x06\x61\x63tive\x18\x0f \x01(\x08H\x08\x88\x01\x01\x1a@\n\x0bNextHopMode\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08local_ip\x10\x01\x12\n\n\x06manual\x10\x02\x1a\x41\n\x12NextHopAddressType\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x42\x10\n\x0e_distinguisherB\x08\n\x06_colorB\x10\n\x0e_ipv6_endpointB\x10\n\x0e_next_hop_modeB\x18\n\x16_next_hop_address_typeB\x18\n\x16_next_hop_ipv4_addressB\x18\n\x16_next_hop_ipv6_addressB\x07\n\x05_nameB\t\n\x07_active\"\xb6\x04\n\x12\x42gpSrteV6TunnelTlv\x12\x41\n\x17remote_endpoint_sub_tlv\x18\x01 \x01(\x0b\x32 .otg.BgpSrteRemoteEndpointSubTlv\x12.\n\rcolor_sub_tlv\x18\x02 \x01(\x0b\x32\x17.otg.BgpSrteColorSubTlv\x12\x32\n\x0f\x62inding_sub_tlv\x18\x03 \x01(\x0b\x32\x19.otg.BgpSrteBindingSubTlv\x12\x38\n\x12preference_sub_tlv\x18\x04 \x01(\x0b\x32\x1c.otg.BgpSrtePreferenceSubTlv\x12\x41\n\x17policy_priority_sub_tlv\x18\x05 \x01(\x0b\x32 .otg.BgpSrtePolicyPrioritySubTlv\x12\x39\n\x13policy_name_sub_tlv\x18\x06 \x01(\x0b\x32\x1c.otg.BgpSrtePolicyNameSubTlv\x12U\n\"explicit_null_label_policy_sub_tlv\x18\x07 \x01(\x0b\x32).otg.BgpSrteExplicitNullLabelPolicySubTlv\x12.\n\rsegment_lists\x18\x08 \x03(\x0b\x32\x17.otg.BgpSrteSegmentList\x12\x11\n\x04name\x18\t \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x61\x63tive\x18\n \x01(\x08H\x01\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_active\"\xb8\x01\n\x12\x42gpGracefulRestart\x12\x16\n\tenable_gr\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x0crestart_time\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x18\n\x0b\x65nable_llgr\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x17\n\nstale_time\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x0c\n\n_enable_grB\x0f\n\r_restart_timeB\x0e\n\x0c_enable_llgrB\r\n\x0b_stale_time\"\xf0\x01\n\x0f\x42gpUpdateReplay\x12\x35\n\x06\x63hoice\x18\x01 \x01(\x0e\x32 .otg.BgpUpdateReplay.Choice.EnumH\x00\x88\x01\x01\x12/\n\x0fstructured_pdus\x18\x02 \x01(\x0b\x32\x16.otg.BgpStructuredPdus\x12#\n\traw_bytes\x18\x03 \x01(\x0b\x32\x10.otg.BgpRawBytes\x1a\x45\n\x06\x43hoice\";\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x13\n\x0fstructured_pdus\x10\x01\x12\r\n\traw_bytes\x10\x02\x42\t\n\x07_choice\"7\n\x0b\x42gpRawBytes\x12(\n\x07updates\x18\x01 \x03(\x0b\x32\x17.otg.BgpOneUpdateReplay\"d\n\x12\x42gpOneUpdateReplay\x12\x15\n\x08time_gap\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x19\n\x0cupdate_bytes\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_time_gapB\x0f\n\r_update_bytes\"G\n\x11\x42gpStructuredPdus\x12\x32\n\x07updates\x18\x01 \x03(\x0b\x32!.otg.BgpOneStructuredUpdateReplay\"\xf7\x01\n\x1c\x42gpOneStructuredUpdateReplay\x12\x15\n\x08time_gap\x18\x01 \x01(\rH\x00\x88\x01\x01\x12+\n\x0fpath_attributes\x18\x02 \x01(\x0b\x32\x12.otg.BgpAttributes\x12\x43\n\x19traditional_unreach_nlris\x18\x03 \x03(\x0b\x32 .otg.BgpOneTraditionalNlriPrefix\x12\x41\n\x17traditional_reach_nlris\x18\x04 \x03(\x0b\x32 .otg.BgpOneTraditionalNlriPrefixB\x0b\n\t_time_gap\"\x8a\x01\n\x1b\x42gpOneTraditionalNlriPrefix\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06prefix\x18\x02 \x01(\rH\x01\x88\x01\x01\x12)\n\x07path_id\x18\x03 \x01(\x0b\x32\x18.otg.BgpNLRIPrefixPathIdB\n\n\x08_addressB\t\n\x07_prefix\"\x83\x01\n\x14\x42gpOneIpv4NLRIPrefix\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06prefix\x18\x02 \x01(\rH\x01\x88\x01\x01\x12)\n\x07path_id\x18\x03 \x01(\x0b\x32\x18.otg.BgpNLRIPrefixPathIdB\n\n\x08_addressB\t\n\x07_prefix\"\x83\x01\n\x14\x42gpOneIpv6NLRIPrefix\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06prefix\x18\x02 \x01(\rH\x01\x88\x01\x01\x12)\n\x07path_id\x18\x03 \x01(\x0b\x32\x18.otg.BgpNLRIPrefixPathIdB\n\n\x08_addressB\t\n\x07_prefix\"3\n\x13\x42gpNLRIPrefixPathId\x12\x12\n\x05value\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x08\n\x06_value\"\xaa\x07\n\rBgpAttributes\x12:\n\x10other_attributes\x18\x01 \x03(\x0b\x32 .otg.BgpAttributesOtherAttribute\x12\x33\n\x06origin\x18\x02 \x01(\x0e\x32\x1e.otg.BgpAttributes.Origin.EnumH\x00\x88\x01\x01\x12)\n\x07\x61s_path\x18\x03 \x01(\x0b\x32\x18.otg.BgpAttributesAsPath\x12+\n\x08\x61s4_path\x18\x04 \x01(\x0b\x32\x19.otg.BgpAttributesAs4Path\x12+\n\x08next_hop\x18\x05 \x01(\x0b\x32\x19.otg.BgpAttributesNextHop\x12J\n\x18multi_exit_discriminator\x18\x06 \x01(\x0b\x32(.otg.BgpAttributesMultiExitDiscriminator\x12;\n\x10local_preference\x18\x07 \x01(\x0b\x32!.otg.BgpAttributesLocalPreference\x12&\n\x19include_atomic_aggregator\x18\x08 \x01(\x08H\x01\x88\x01\x01\x12\x30\n\naggregator\x18\t \x01(\x0b\x32\x1c.otg.BgpAttributesAggregator\x12\x37\n\x0e\x61s4_aggregator\x18\n \x01(\x0b\x32\x1f.otg.BgpAttributesAs4Aggregator\x12.\n\tcommunity\x18\x0b \x03(\x0b\x32\x1b.otg.BgpAttributesCommunity\x12\x35\n\roriginator_id\x18\x0c \x01(\x0b\x32\x1e.otg.BgpAttributesOriginatorId\x12\x13\n\x0b\x63luster_ids\x18\r \x03(\t\x12\x37\n\x14\x65xtended_communities\x18\x0e \x03(\x0b\x32\x19.otg.BgpExtendedCommunity\x12/\n\x08mp_reach\x18\x10 \x01(\x0b\x32\x1d.otg.BgpAttributesMpReachNlri\x12\x33\n\nmp_unreach\x18\x11 \x01(\x0b\x32\x1f.otg.BgpAttributesMpUnreachNlri\x1a\x43\n\x06Origin\"9\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03igp\x10\x01\x12\x07\n\x03\x65gp\x10\x02\x12\x0e\n\nincomplete\x10\x03\x42\t\n\x07_originB\x1c\n\x1a_include_atomic_aggregator\"\xa7\x02\n\x1b\x42gpAttributesOtherAttribute\x12\x1a\n\rflag_optional\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x0f\x66lag_transitive\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x19\n\x0c\x66lag_partial\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12!\n\x14\x66lag_extended_length\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x11\n\x04type\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x16\n\traw_value\x18\x06 \x01(\tH\x05\x88\x01\x01\x42\x10\n\x0e_flag_optionalB\x12\n\x10_flag_transitiveB\x0f\n\r_flag_partialB\x17\n\x15_flag_extended_lengthB\x07\n\x05_typeB\x0c\n\n_raw_value\"\xaf\x02\n\x13\x42gpAttributesAsPath\x12\x39\n\x06\x63hoice\x18\x01 \x01(\x0e\x32$.otg.BgpAttributesAsPath.Choice.EnumH\x00\x88\x01\x01\x12\x41\n\x11\x66our_byte_as_path\x18\x02 \x01(\x0b\x32&.otg.BgpAttributesAsPathFourByteAsPath\x12?\n\x10two_byte_as_path\x18\x03 \x01(\x0b\x32%.otg.BgpAttributesAsPathTwoByteAsPath\x1aN\n\x06\x43hoice\"D\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x15\n\x11\x66our_byte_as_path\x10\x01\x12\x14\n\x10two_byte_as_path\x10\x02\x42\t\n\x07_choice\"^\n!BgpAttributesAsPathFourByteAsPath\x12\x39\n\x08segments\x18\x01 \x03(\x0b\x32\'.otg.BgpAttributesFourByteAsPathSegment\"\xe6\x01\n\"BgpAttributesFourByteAsPathSegment\x12\x44\n\x04type\x18\x01 \x01(\x0e\x32\x31.otg.BgpAttributesFourByteAsPathSegment.Type.EnumH\x00\x88\x01\x01\x12\x12\n\nas_numbers\x18\x02 \x03(\r\x1a]\n\x04Type\"U\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x61s_seq\x10\x01\x12\n\n\x06\x61s_set\x10\x02\x12\x11\n\ras_confed_seq\x10\x03\x12\x11\n\ras_confed_set\x10\x04\x42\x07\n\x05_type\"\\\n BgpAttributesAsPathTwoByteAsPath\x12\x38\n\x08segments\x18\x01 \x03(\x0b\x32&.otg.BgpAttributesTwoByteAsPathSegment\"\xe4\x01\n!BgpAttributesTwoByteAsPathSegment\x12\x43\n\x04type\x18\x01 \x01(\x0e\x32\x30.otg.BgpAttributesTwoByteAsPathSegment.Type.EnumH\x00\x88\x01\x01\x12\x12\n\nas_numbers\x18\x02 \x03(\r\x1a]\n\x04Type\"U\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x61s_seq\x10\x01\x12\n\n\x06\x61s_set\x10\x02\x12\x11\n\ras_confed_seq\x10\x03\x12\x11\n\ras_confed_set\x10\x04\x42\x07\n\x05_type\"Q\n\x14\x42gpAttributesAs4Path\x12\x39\n\x08segments\x18\x01 \x03(\x0b\x32\'.otg.BgpAttributesFourByteAsPathSegment\"\xab\x02\n\x17\x42gpAttributesAggregator\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.BgpAttributesAggregator.Choice.EnumH\x00\x88\x01\x01\x12\x19\n\x0c\x66our_byte_as\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x18\n\x0btwo_byte_as\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x19\n\x0cipv4_address\x18\x04 \x01(\tH\x03\x88\x01\x01\x1a\x44\n\x06\x43hoice\":\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0c\x66our_byte_as\x10\x01\x12\x0f\n\x0btwo_byte_as\x10\x02\x42\t\n\x07_choiceB\x0f\n\r_four_byte_asB\x0e\n\x0c_two_byte_asB\x0f\n\r_ipv4_address\"h\n\x1a\x42gpAttributesAs4Aggregator\x12\x13\n\x06\x61s_num\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x19\n\x0cipv4_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\t\n\x07_as_numB\x0f\n\r_ipv4_address\"\xb1\x02\n\x16\x42gpAttributesCommunity\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.BgpAttributesCommunity.Choice.EnumH\x00\x88\x01\x01\x12;\n\x10\x63ustom_community\x18\x02 \x01(\x0b\x32!.otg.BgpAttributesCustomCommunity\x1a\x90\x01\n\x06\x43hoice\"\x85\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x14\n\x10\x63ustom_community\x10\x01\x12\r\n\tno_export\x10\x02\x12\x11\n\rno_advertised\x10\x03\x12\x17\n\x13no_export_subconfed\x10\x04\x12\x0e\n\nllgr_stale\x10\x05\x12\x0b\n\x07no_llgr\x10\x06\x42\t\n\x07_choice\"d\n\x1c\x42gpAttributesCustomCommunity\x12\x16\n\tas_number\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0c\n\n_as_numberB\t\n\x07_custom\"\xab\x02\n\x14\x42gpAttributesNextHop\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.BgpAttributesNextHop.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04ipv4\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04ipv6\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x45\n\x12ipv6_two_addresses\x18\x04 \x01(\x0b\x32).otg.BgpAttributesNextHopIpv6TwoAddresses\x1aM\n\x06\x43hoice\"C\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x12\x16\n\x12ipv6_two_addresses\x10\x03\x42\t\n\x07_choiceB\x07\n\x05_ipv4B\x07\n\x05_ipv6\"d\n$BgpAttributesNextHopIpv6TwoAddresses\x12\x12\n\x05\x66irst\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06second\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_firstB\t\n\x07_second\"\xbb\x02\n\x18\x42gpAttributesMpReachNlri\x12+\n\x08next_hop\x18\x01 \x01(\x0b\x32\x19.otg.BgpAttributesNextHop\x12>\n\x06\x63hoice\x18\x02 \x01(\x0e\x32).otg.BgpAttributesMpReachNlri.Choice.EnumH\x00\x88\x01\x01\x12/\n\x0cipv4_unicast\x18\x03 \x03(\x0b\x32\x19.otg.BgpOneIpv4NLRIPrefix\x12/\n\x0cipv6_unicast\x18\x04 \x03(\x0b\x32\x19.otg.BgpOneIpv6NLRIPrefix\x1a\x45\n\x06\x43hoice\";\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0cipv4_unicast\x10\x01\x12\x10\n\x0cipv6_unicast\x10\x02\x42\t\n\x07_choice\"\x92\x02\n\x1a\x42gpAttributesMpUnreachNlri\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.BgpAttributesMpUnreachNlri.Choice.EnumH\x00\x88\x01\x01\x12/\n\x0cipv4_unicast\x18\x02 \x03(\x0b\x32\x19.otg.BgpOneIpv4NLRIPrefix\x12/\n\x0cipv6_unicast\x18\x03 \x03(\x0b\x32\x19.otg.BgpOneIpv6NLRIPrefix\x1a\x45\n\x06\x43hoice\";\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0cipv4_unicast\x10\x01\x12\x10\n\x0cipv6_unicast\x10\x02\x42\t\n\x07_choice\"C\n#BgpAttributesMultiExitDiscriminator\x12\x12\n\x05value\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x08\n\x06_value\"<\n\x1c\x42gpAttributesLocalPreference\x12\x12\n\x05value\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x08\n\x06_value\"9\n\x19\x42gpAttributesOriginatorId\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"\x93\x07\n\tBgpV6Peer\x12\x19\n\x0cpeer_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x0fsegment_routing\x18\x02 \x01(\x0b\x32\x18.otg.BgpV6SegmentRouting\x12\x39\n\x16\x65vpn_ethernet_segments\x18\x03 \x03(\x0b\x32\x19.otg.BgpV6EthernetSegment\x12\x30\n\x07\x61s_type\x18\x04 \x01(\x0e\x32\x1a.otg.BgpV6Peer.AsType.EnumH\x01\x88\x01\x01\x12\x16\n\tas_number\x18\x05 \x01(\rH\x02\x88\x01\x01\x12?\n\x0f\x61s_number_width\x18\x06 \x01(\x0e\x32!.otg.BgpV6Peer.AsNumberWidth.EnumH\x03\x88\x01\x01\x12\"\n\x08\x61\x64vanced\x18\x07 \x01(\x0b\x32\x10.otg.BgpAdvanced\x12&\n\ncapability\x18\x08 \x01(\x0b\x32\x12.otg.BgpCapability\x12\x44\n\x1alearned_information_filter\x18\t \x01(\x0b\x32 .otg.BgpLearnedInformationFilter\x12\'\n\tv4_routes\x18\n \x03(\x0b\x32\x14.otg.BgpV4RouteRange\x12\'\n\tv6_routes\x18\x0b \x03(\x0b\x32\x14.otg.BgpV6RouteRange\x12.\n\x10v4_srte_policies\x18\x0c \x03(\x0b\x32\x14.otg.BgpSrteV4Policy\x12.\n\x10v6_srte_policies\x18\r \x03(\x0b\x32\x14.otg.BgpSrteV6Policy\x12\x11\n\x04name\x18\x0e \x01(\tH\x04\x88\x01\x01\x12\x31\n\x10graceful_restart\x18\x0f \x01(\x0b\x32\x17.otg.BgpGracefulRestart\x12,\n\x0ereplay_updates\x18\x10 \x01(\x0b\x32\x14.otg.BgpUpdateReplay\x1a\x35\n\x06\x41sType\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ibgp\x10\x01\x12\x08\n\x04\x65\x62gp\x10\x02\x1a;\n\rAsNumberWidth\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03two\x10\x01\x12\x08\n\x04\x66our\x10\x02\x42\x0f\n\r_peer_addressB\n\n\x08_as_typeB\x0c\n\n_as_numberB\x12\n\x10_as_number_widthB\x07\n\x05_name\"U\n\x0e\x42gpV6Interface\x12\x16\n\tipv6_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x05peers\x18\x02 \x03(\x0b\x32\x0e.otg.BgpV6PeerB\x0c\n\n_ipv6_name\"\xf1\x03\n\x13\x42gpV6SegmentRouting\x12!\n\x14ingress_supports_vpn\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x15reduced_encapsulation\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1e\n\x11\x63opy_time_to_live\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x19\n\x0ctime_to_live\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1d\n\x10max_sids_per_srh\x18\x05 \x01(\rH\x04\x88\x01\x01\x12-\n auto_generate_segment_left_value\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x1f\n\x12segment_left_value\x18\x07 \x01(\rH\x06\x88\x01\x01\x12#\n\x16\x61\x64vertise_sr_te_policy\x18\x08 \x01(\x08H\x07\x88\x01\x01\x42\x17\n\x15_ingress_supports_vpnB\x18\n\x16_reduced_encapsulationB\x14\n\x12_copy_time_to_liveB\x0f\n\r_time_to_liveB\x13\n\x11_max_sids_per_srhB#\n!_auto_generate_segment_left_valueB\x15\n\x13_segment_left_valueB\x19\n\x17_advertise_sr_te_policy\"\xf0\x03\n\x14\x42gpV6EthernetSegment\x12\x36\n\x0b\x64\x66_election\x18\x01 \x01(\x0b\x32!.otg.BgpEthernetSegmentDfElection\x12 \n\x04\x65vis\x18\x02 \x03(\x0b\x32\x12.otg.BgpV6EvpnEvis\x12\x10\n\x03\x65si\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x43\n\x0b\x61\x63tive_mode\x18\x04 \x01(\x0e\x32).otg.BgpV6EthernetSegment.ActiveMode.EnumH\x01\x88\x01\x01\x12\x16\n\tesi_label\x18\x05 \x01(\rH\x02\x88\x01\x01\x12\'\n\x08\x61\x64vanced\x18\x06 \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12&\n\x0b\x63ommunities\x18\x07 \x03(\x0b\x32\x11.otg.BgpCommunity\x12-\n\x0f\x65xt_communities\x18\x08 \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12\x1f\n\x07\x61s_path\x18\t \x01(\x0b\x32\x0e.otg.BgpAsPath\x1aH\n\nActiveMode\":\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rsingle_active\x10\x01\x12\x0e\n\nall_active\x10\x02\x42\x06\n\x04_esiB\x0e\n\x0c_active_modeB\x0c\n\n_esi_label\"\xa8\x01\n\rBgpV6EvpnEvis\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.BgpV6EvpnEvis.Choice.EnumH\x00\x88\x01\x01\x12%\n\tevi_vxlan\x18\x02 \x01(\x0b\x32\x12.otg.BgpV6EviVxlan\x1a\x30\n\x06\x43hoice\"&\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tevi_vxlan\x10\x01\x42\t\n\x07_choice\"\xe3\x05\n\rBgpV6EviVxlan\x12<\n\x11\x62roadcast_domains\x18\x01 \x03(\x0b\x32!.otg.BgpV6EviVxlanBroadcastDomain\x12\x46\n\x10replication_type\x18\x02 \x01(\x0e\x32\'.otg.BgpV6EviVxlan.ReplicationType.EnumH\x00\x88\x01\x01\x12\x17\n\npmsi_label\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x15\n\x08\x61\x64_label\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x37\n\x13route_distinguisher\x18\x05 \x01(\x0b\x32\x1a.otg.BgpRouteDistinguisher\x12\x30\n\x13route_target_export\x18\x06 \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\x30\n\x13route_target_import\x18\x07 \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\x33\n\x16l3_route_target_export\x18\x08 \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\x33\n\x16l3_route_target_import\x18\t \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\'\n\x08\x61\x64vanced\x18\n \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12&\n\x0b\x63ommunities\x18\x0b \x03(\x0b\x32\x11.otg.BgpCommunity\x12-\n\x0f\x65xt_communities\x18\x0c \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12\x1f\n\x07\x61s_path\x18\r \x01(\x0b\x32\x0e.otg.BgpAsPath\x1a\x43\n\x0fReplicationType\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x17\n\x13ingress_replication\x10\x01\x42\x13\n\x11_replication_typeB\r\n\x0b_pmsi_labelB\x0b\n\t_ad_label\"\xb4\x01\n\x1c\x42gpV6EviVxlanBroadcastDomain\x12*\n\rcmac_ip_range\x18\x01 \x03(\x0b\x32\x13.otg.BgpCMacIpRange\x12\x1c\n\x0f\x65thernet_tag_id\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1f\n\x12vlan_aware_service\x18\x03 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_ethernet_tag_idB\x15\n\x13_vlan_aware_service\"]\n\x0b\x44\x65viceVxlan\x12&\n\nv4_tunnels\x18\x01 \x03(\x0b\x32\x12.otg.VxlanV4Tunnel\x12&\n\nv6_tunnels\x18\x02 \x03(\x0b\x32\x12.otg.VxlanV6Tunnel\"\xbb\x01\n\rVxlanV4Tunnel\x12\x1d\n\x10source_interface\x18\x01 \x01(\tH\x00\x88\x01\x01\x12@\n\x13\x64\x65stination_ip_mode\x18\x02 \x01(\x0b\x32#.otg.VxlanV4TunnelDestinationIPMode\x12\x10\n\x03vni\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x04 \x01(\tH\x02\x88\x01\x01\x42\x13\n\x11_source_interfaceB\x06\n\x04_vniB\x07\n\x05_name\"\xbb\x01\n\rVxlanV6Tunnel\x12\x1d\n\x10source_interface\x18\x01 \x01(\tH\x00\x88\x01\x01\x12@\n\x13\x64\x65stination_ip_mode\x18\x02 \x01(\x0b\x32#.otg.VxlanV6TunnelDestinationIPMode\x12\x10\n\x03vni\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x04 \x01(\tH\x02\x88\x01\x01\x42\x13\n\x11_source_interfaceB\x06\n\x04_vniB\x07\n\x05_name\"\xae\x02\n\x1eVxlanV4TunnelDestinationIPMode\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.VxlanV4TunnelDestinationIPMode.Choice.EnumH\x00\x88\x01\x01\x12;\n\x07unicast\x18\x02 \x01(\x0b\x32*.otg.VxlanV4TunnelDestinationIPModeUnicast\x12?\n\tmulticast\x18\x03 \x01(\x0b\x32,.otg.VxlanV4TunnelDestinationIPModeMulticast\x1a=\n\x06\x43hoice\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07unicast\x10\x01\x12\r\n\tmulticast\x10\x02\x42\t\n\x07_choice\"\xae\x02\n\x1eVxlanV6TunnelDestinationIPMode\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.VxlanV6TunnelDestinationIPMode.Choice.EnumH\x00\x88\x01\x01\x12;\n\x07unicast\x18\x02 \x01(\x0b\x32*.otg.VxlanV6TunnelDestinationIPModeUnicast\x12?\n\tmulticast\x18\x03 \x01(\x0b\x32,.otg.VxlanV6TunnelDestinationIPModeMulticast\x1a=\n\x06\x43hoice\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07unicast\x10\x01\x12\r\n\tmulticast\x10\x02\x42\t\n\x07_choice\"f\n%VxlanV4TunnelDestinationIPModeUnicast\x12=\n\x05vteps\x18\x01 \x03(\x0b\x32..otg.VxlanV4TunnelDestinationIPModeUnicastVtep\"f\n%VxlanV6TunnelDestinationIPModeUnicast\x12=\n\x05vteps\x18\x01 \x03(\x0b\x32..otg.VxlanV6TunnelDestinationIPModeUnicastVtep\"\x96\x01\n6VxlanTunnelDestinationIPModeUnicastArpSuppressionCache\x12\x1a\n\rremote_vm_mac\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eremote_vm_ipv4\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_remote_vm_macB\x11\n\x0f_remote_vm_ipv4\"\xc1\x01\n)VxlanV4TunnelDestinationIPModeUnicastVtep\x12 \n\x13remote_vtep_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12Z\n\x15\x61rp_suppression_cache\x18\x02 \x03(\x0b\x32;.otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCacheB\x16\n\x14_remote_vtep_address\"\xc1\x01\n)VxlanV6TunnelDestinationIPModeUnicastVtep\x12 \n\x13remote_vtep_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12Z\n\x15\x61rp_suppression_cache\x18\x02 \x03(\x0b\x32;.otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCacheB\x16\n\x14_remote_vtep_address\"K\n\'VxlanV4TunnelDestinationIPModeMulticast\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_address\"K\n\'VxlanV6TunnelDestinationIPModeMulticast\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_address\"\x91\x01\n\nDeviceRsvp\x12/\n\x0fipv4_interfaces\x18\x01 \x03(\x0b\x32\x16.otg.RsvpIpv4Interface\x12\x36\n\x13lsp_ipv4_interfaces\x18\x02 \x03(\x0b\x32\x19.otg.RsvpLspIpv4Interface\x12\x11\n\x04name\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_name\"\xc5\x04\n\x11RsvpIpv4Interface\x12\x16\n\tipv4_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bneighbor_ip\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1e\n\x11label_space_start\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x1c\n\x0flabel_space_end\x18\x04 \x01(\rH\x03\x88\x01\x01\x12%\n\x18\x65nable_refresh_reduction\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12%\n\x18summary_refresh_interval\x18\x06 \x01(\rH\x05\x88\x01\x01\x12\x18\n\x0bsend_bundle\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12\x1d\n\x10\x62undle_threshold\x18\x08 \x01(\rH\x07\x88\x01\x01\x12\x19\n\x0c\x65nable_hello\x18\t \x01(\x08H\x08\x88\x01\x01\x12\x1b\n\x0ehello_interval\x18\n \x01(\rH\t\x88\x01\x01\x12\x1f\n\x12timeout_multiplier\x18\x0b \x01(\rH\n\x88\x01\x01\x42\x0c\n\n_ipv4_nameB\x0e\n\x0c_neighbor_ipB\x14\n\x12_label_space_startB\x12\n\x10_label_space_endB\x1b\n\x19_enable_refresh_reductionB\x1b\n\x19_summary_refresh_intervalB\x0e\n\x0c_send_bundleB\x13\n\x11_bundle_thresholdB\x0f\n\r_enable_helloB\x11\n\x0f_hello_intervalB\x15\n\x13_timeout_multiplier\"\xd0\x01\n\x14RsvpLspIpv4Interface\x12\x16\n\tipv4_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12G\n\x14p2p_egress_ipv4_lsps\x18\x02 \x01(\x0b\x32).otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp\x12I\n\x15p2p_ingress_ipv4_lsps\x18\x03 \x03(\x0b\x32*.otg.RsvpLspIpv4InterfaceP2PIngressIpv4LspB\x0c\n\n_ipv4_name\"\xf1\x03\n$RsvpLspIpv4InterfaceP2PEgressIpv4Lsp\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10refresh_interval\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1f\n\x12timeout_multiplier\x18\x03 \x01(\rH\x02\x88\x01\x01\x12_\n\x11reservation_style\x18\x04 \x01(\x0e\x32?.otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.ReservationStyle.EnumH\x03\x88\x01\x01\x12\x1f\n\x12\x65nable_fixed_label\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x1e\n\x11\x66ixed_label_value\x18\x06 \x01(\rH\x05\x88\x01\x01\x1a\\\n\x10ReservationStyle\"H\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x13\n\x0fshared_explicit\x10\x01\x12\x10\n\x0c\x66ixed_filter\x10\x02\x12\x08\n\x04\x61uto\x10\x03\x42\x07\n\x05_nameB\x13\n\x11_refresh_intervalB\x15\n\x13_timeout_multiplierB\x14\n\x12_reservation_styleB\x15\n\x13_enable_fixed_labelB\x14\n\x12_fixed_label_value\"\xab\x04\n%RsvpLspIpv4InterfaceP2PIngressIpv4Lsp\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eremote_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x16\n\ttunnel_id\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x13\n\x06lsp_id\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1d\n\x10refresh_interval\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x1f\n\x12timeout_multiplier\x18\x06 \x01(\rH\x05\x88\x01\x01\x12\x1a\n\rbackup_lsp_id\x18\x07 \x01(\rH\x06\x88\x01\x01\x12!\n\x14lsp_switchover_delay\x18\x08 \x01(\rH\x07\x88\x01\x01\x12\x34\n\x11session_attribute\x18\t \x01(\x0b\x32\x19.otg.RsvpSessionAttribute\x12\x1d\n\x05tspec\x18\n \x01(\x0b\x32\x0e.otg.RsvpTspec\x12*\n\x0c\x66\x61st_reroute\x18\x0b \x01(\x0b\x32\x14.otg.RsvpFastReroute\x12\x19\n\x03\x65ro\x18\x0c \x01(\x0b\x32\x0c.otg.RsvpEroB\x07\n\x05_nameB\x11\n\x0f_remote_addressB\x0c\n\n_tunnel_idB\t\n\x07_lsp_idB\x13\n\x11_refresh_intervalB\x15\n\x13_timeout_multiplierB\x10\n\x0e_backup_lsp_idB\x17\n\x15_lsp_switchover_delay\"\xf0\x04\n\x14RsvpSessionAttribute\x12\'\n\x1a\x61uto_generate_session_name\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x0csession_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0esetup_priority\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x1d\n\x10holding_priority\x18\x04 \x01(\rH\x03\x88\x01\x01\x12%\n\x18local_protection_desired\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12$\n\x17label_recording_desired\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x1d\n\x10se_style_desired\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12)\n\x1c\x62\x61ndwidth_protection_desired\x18\x08 \x01(\x08H\x07\x88\x01\x01\x12$\n\x17node_protection_desired\x18\t \x01(\x08H\x08\x88\x01\x01\x12\x38\n\x13resource_affinities\x18\n \x01(\x0b\x32\x1b.otg.RsvpResourceAffinitiesB\x1d\n\x1b_auto_generate_session_nameB\x0f\n\r_session_nameB\x11\n\x0f_setup_priorityB\x13\n\x11_holding_priorityB\x1b\n\x19_local_protection_desiredB\x1a\n\x18_label_recording_desiredB\x13\n\x11_se_style_desiredB\x1f\n\x1d_bandwidth_protection_desiredB\x1a\n\x18_node_protection_desired\"\x96\x01\n\x16RsvpResourceAffinities\x12\x18\n\x0b\x65xclude_any\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0binclude_any\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0binclude_all\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x0e\n\x0c_exclude_anyB\x0e\n\x0c_include_anyB\x0e\n\x0c_include_all\"\x9f\x02\n\tRsvpTspec\x12\x1e\n\x11token_bucket_rate\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x1e\n\x11token_bucket_size\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12\x1b\n\x0epeak_data_rate\x18\x03 \x01(\x02H\x02\x88\x01\x01\x12!\n\x14minimum_policed_unit\x18\x04 \x01(\rH\x03\x88\x01\x01\x12!\n\x14maximum_policed_unit\x18\x05 \x01(\rH\x04\x88\x01\x01\x42\x14\n\x12_token_bucket_rateB\x14\n\x12_token_bucket_sizeB\x11\n\x0f_peak_data_rateB\x17\n\x15_minimum_policed_unitB\x17\n\x15_maximum_policed_unit\"\xc7\x03\n\x0fRsvpFastReroute\x12\x1b\n\x0esetup_priority\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1d\n\x10holding_priority\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x16\n\thop_limit\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x16\n\tbandwidth\x18\x04 \x01(\x02H\x03\x88\x01\x01\x12\x18\n\x0b\x65xclude_any\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0binclude_any\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0binclude_all\x18\x07 \x01(\tH\x06\x88\x01\x01\x12&\n\x19one_to_one_backup_desired\x18\x08 \x01(\x08H\x07\x88\x01\x01\x12$\n\x17\x66\x61\x63ility_backup_desired\x18\t \x01(\x08H\x08\x88\x01\x01\x42\x11\n\x0f_setup_priorityB\x13\n\x11_holding_priorityB\x0c\n\n_hop_limitB\x0c\n\n_bandwidthB\x0e\n\x0c_exclude_anyB\x0e\n\x0c_include_anyB\x0e\n\x0c_include_allB\x1c\n\x1a_one_to_one_backup_desiredB\x1a\n\x18_facility_backup_desired\"\xa8\x02\n\x07RsvpEro\x12\x45\n\x13prepend_neighbor_ip\x18\x01 \x01(\x0e\x32#.otg.RsvpEro.PrependNeighborIp.EnumH\x00\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12)\n\nsubobjects\x18\x03 \x03(\x0b\x32\x15.otg.RsvpEroSubobject\x1a\x65\n\x11PrependNeighborIp\"P\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0c\x64ont_prepend\x10\x01\x12\x11\n\rprepend_loose\x10\x02\x12\x12\n\x0eprepend_strict\x10\x03\x42\x16\n\x14_prepend_neighbor_ipB\x10\n\x0e_prefix_length\"\x8c\x03\n\x10RsvpEroSubobject\x12\x32\n\x04type\x18\x01 \x01(\x0e\x32\x1f.otg.RsvpEroSubobject.Type.EnumH\x00\x88\x01\x01\x12\x19\n\x0cipv4_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x16\n\tas_number\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x39\n\x08hop_type\x18\x05 \x01(\x0e\x32\".otg.RsvpEroSubobject.HopType.EnumH\x04\x88\x01\x01\x1a\x38\n\x04Type\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\r\n\tas_number\x10\x02\x1a\x39\n\x07HopType\".\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06strict\x10\x01\x12\t\n\x05loose\x10\x02\x42\x07\n\x05_typeB\x0f\n\r_ipv4_addressB\x10\n\x0e_prefix_lengthB\x0c\n\n_as_numberB\x0b\n\t_hop_type\"\x8b\x02\n\x04\x46low\x12\x1c\n\x05tx_rx\x18\x01 \x01(\x0b\x32\r.otg.FlowTxRx\x12\x1f\n\x06packet\x18\x02 \x03(\x0b\x32\x0f.otg.FlowHeader\x12&\n\regress_packet\x18\t \x03(\x0b\x32\x0f.otg.FlowHeader\x12\x1b\n\x04size\x18\x03 \x01(\x0b\x32\r.otg.FlowSize\x12\x1b\n\x04rate\x18\x04 \x01(\x0b\x32\r.otg.FlowRate\x12#\n\x08\x64uration\x18\x05 \x01(\x0b\x32\x11.otg.FlowDuration\x12!\n\x07metrics\x18\x06 \x01(\x0b\x32\x10.otg.FlowMetrics\x12\x11\n\x04name\x18\x07 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_name\"\xbc\x01\n\x08\x46lowTxRx\x12.\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x19.otg.FlowTxRx.Choice.EnumH\x00\x88\x01\x01\x12\x1b\n\x04port\x18\x02 \x01(\x0b\x32\r.otg.FlowPort\x12\x1f\n\x06\x64\x65vice\x18\x03 \x01(\x0b\x32\x0f.otg.FlowRouter\x1a\x37\n\x06\x43hoice\"-\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04port\x10\x01\x12\n\n\x06\x64\x65vice\x10\x02\x42\t\n\x07_choice\"`\n\x08\x46lowPort\x12\x14\n\x07tx_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07rx_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x08rx_names\x18\x03 \x03(\tB\n\n\x08_tx_nameB\n\n\x08_rx_name\"\xa2\x01\n\nFlowRouter\x12,\n\x04mode\x18\x01 \x01(\x0e\x32\x19.otg.FlowRouter.Mode.EnumH\x00\x88\x01\x01\x12\x10\n\x08tx_names\x18\x02 \x03(\t\x12\x10\n\x08rx_names\x18\x03 \x03(\t\x1a\x39\n\x04Mode\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04mesh\x10\x01\x12\x0e\n\none_to_one\x10\x02\x42\x07\n\x05_mode\"\xe9\x07\n\nFlowHeader\x12\x30\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1b.otg.FlowHeader.Choice.EnumH\x00\x88\x01\x01\x12\x1f\n\x06\x63ustom\x18\x02 \x01(\x0b\x32\x0f.otg.FlowCustom\x12#\n\x08\x65thernet\x18\x03 \x01(\x0b\x32\x11.otg.FlowEthernet\x12\x1b\n\x04vlan\x18\x04 \x01(\x0b\x32\r.otg.FlowVlan\x12\x1d\n\x05vxlan\x18\x05 \x01(\x0b\x32\x0e.otg.FlowVxlan\x12\x1b\n\x04ipv4\x18\x06 \x01(\x0b\x32\r.otg.FlowIpv4\x12\x1b\n\x04ipv6\x18\x07 \x01(\x0b\x32\r.otg.FlowIpv6\x12#\n\x08pfcpause\x18\x08 \x01(\x0b\x32\x11.otg.FlowPfcPause\x12-\n\rethernetpause\x18\t \x01(\x0b\x32\x16.otg.FlowEthernetPause\x12\x19\n\x03tcp\x18\n \x01(\x0b\x32\x0c.otg.FlowTcp\x12\x19\n\x03udp\x18\x0b \x01(\x0b\x32\x0c.otg.FlowUdp\x12\x19\n\x03gre\x18\x0c \x01(\x0b\x32\x0c.otg.FlowGre\x12\x1d\n\x05gtpv1\x18\r \x01(\x0b\x32\x0e.otg.FlowGtpv1\x12\x1d\n\x05gtpv2\x18\x0e \x01(\x0b\x32\x0e.otg.FlowGtpv2\x12\x19\n\x03\x61rp\x18\x0f \x01(\x0b\x32\x0c.otg.FlowArp\x12\x1b\n\x04icmp\x18\x10 \x01(\x0b\x32\r.otg.FlowIcmp\x12\x1f\n\x06icmpv6\x18\x11 \x01(\x0b\x32\x0f.otg.FlowIcmpv6\x12\x19\n\x03ppp\x18\x12 \x01(\x0b\x32\x0c.otg.FlowPpp\x12\x1f\n\x06igmpv1\x18\x13 \x01(\x0b\x32\x0f.otg.FlowIgmpv1\x12\x1b\n\x04mpls\x18\x14 \x01(\x0b\x32\r.otg.FlowMpls\x12!\n\x07snmpv2c\x18\x15 \x01(\x0b\x32\x10.otg.FlowSnmpv2c\x12\x1b\n\x04rsvp\x18\x16 \x01(\x0b\x32\r.otg.FlowRsvp\x1a\x8c\x02\n\x06\x43hoice\"\x81\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x63ustom\x10\x01\x12\x0c\n\x08\x65thernet\x10\x02\x12\x08\n\x04vlan\x10\x03\x12\t\n\x05vxlan\x10\x04\x12\x08\n\x04ipv4\x10\x05\x12\x08\n\x04ipv6\x10\x06\x12\x0c\n\x08pfcpause\x10\x07\x12\x11\n\rethernetpause\x10\x08\x12\x07\n\x03tcp\x10\t\x12\x07\n\x03udp\x10\n\x12\x07\n\x03gre\x10\x0b\x12\t\n\x05gtpv1\x10\x0c\x12\t\n\x05gtpv2\x10\r\x12\x07\n\x03\x61rp\x10\x0e\x12\x08\n\x04icmp\x10\x0f\x12\n\n\x06icmpv6\x10\x10\x12\x07\n\x03ppp\x10\x11\x12\n\n\x06igmpv1\x10\x12\x12\x08\n\x04mpls\x10\x13\x12\x0b\n\x07snmpv2c\x10\x14\x12\x08\n\x04rsvp\x10\x15\x42\t\n\x07_choice\"Y\n\nFlowCustom\x12\x12\n\x05\x62ytes\x18\x01 \x01(\tH\x00\x88\x01\x01\x12-\n\x0bmetric_tags\x18\x02 \x03(\x0b\x32\x18.otg.FlowCustomMetricTagB\x08\n\x06_bytes\"q\n\x13\x46lowCustomMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xce\x01\n\x0c\x46lowEthernet\x12(\n\x03\x64st\x18\x01 \x01(\x0b\x32\x1b.otg.PatternFlowEthernetDst\x12(\n\x03src\x18\x02 \x01(\x0b\x32\x1b.otg.PatternFlowEthernetSrc\x12\x35\n\nether_type\x18\x03 \x01(\x0b\x32!.otg.PatternFlowEthernetEtherType\x12\x33\n\tpfc_queue\x18\x04 \x01(\x0b\x32 .otg.PatternFlowEthernetPfcQueue\"\xac\x01\n\x08\x46lowVlan\x12.\n\x08priority\x18\x01 \x01(\x0b\x32\x1c.otg.PatternFlowVlanPriority\x12$\n\x03\x63\x66i\x18\x02 \x01(\x0b\x32\x17.otg.PatternFlowVlanCfi\x12\"\n\x02id\x18\x03 \x01(\x0b\x32\x16.otg.PatternFlowVlanId\x12&\n\x04tpid\x18\x04 \x01(\x0b\x32\x18.otg.PatternFlowVlanTpid\"\xc3\x01\n\tFlowVxlan\x12)\n\x05\x66lags\x18\x01 \x01(\x0b\x32\x1a.otg.PatternFlowVxlanFlags\x12\x31\n\treserved0\x18\x02 \x01(\x0b\x32\x1e.otg.PatternFlowVxlanReserved0\x12%\n\x03vni\x18\x03 \x01(\x0b\x32\x18.otg.PatternFlowVxlanVni\x12\x31\n\treserved1\x18\x04 \x01(\x0b\x32\x1e.otg.PatternFlowVxlanReserved1\"\x84\x06\n\x08\x46lowIpv4\x12,\n\x07version\x18\x01 \x01(\x0b\x32\x1b.otg.PatternFlowIpv4Version\x12\x37\n\rheader_length\x18\x02 \x01(\x0b\x32 .otg.PatternFlowIpv4HeaderLength\x12\'\n\x08priority\x18\x03 \x01(\x0b\x32\x15.otg.FlowIpv4Priority\x12\x35\n\x0ctotal_length\x18\x04 \x01(\x0b\x32\x1f.otg.PatternFlowIpv4TotalLength\x12:\n\x0eidentification\x18\x05 \x01(\x0b\x32\".otg.PatternFlowIpv4Identification\x12.\n\x08reserved\x18\x06 \x01(\x0b\x32\x1c.otg.PatternFlowIpv4Reserved\x12\x37\n\rdont_fragment\x18\x07 \x01(\x0b\x32 .otg.PatternFlowIpv4DontFragment\x12\x39\n\x0emore_fragments\x18\x08 \x01(\x0b\x32!.otg.PatternFlowIpv4MoreFragments\x12;\n\x0f\x66ragment_offset\x18\t \x01(\x0b\x32\".otg.PatternFlowIpv4FragmentOffset\x12\x34\n\x0ctime_to_live\x18\n \x01(\x0b\x32\x1e.otg.PatternFlowIpv4TimeToLive\x12.\n\x08protocol\x18\x0b \x01(\x0b\x32\x1c.otg.PatternFlowIpv4Protocol\x12;\n\x0fheader_checksum\x18\x0c \x01(\x0b\x32\".otg.PatternFlowIpv4HeaderChecksum\x12$\n\x03src\x18\r \x01(\x0b\x32\x17.otg.PatternFlowIpv4Src\x12$\n\x03\x64st\x18\x0e \x01(\x0b\x32\x17.otg.PatternFlowIpv4Dst\x12%\n\x07options\x18\x0f \x03(\x0b\x32\x14.otg.FlowIpv4Options\"\xc0\x01\n\x0f\x46lowIpv4Options\x12\x35\n\x06\x63hoice\x18\x01 \x01(\x0e\x32 .otg.FlowIpv4Options.Choice.EnumH\x00\x88\x01\x01\x12*\n\x06\x63ustom\x18\x02 \x01(\x0b\x32\x1a.otg.FlowIpv4OptionsCustom\x1a?\n\x06\x43hoice\"5\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0crouter_alert\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x42\t\n\x07_choice\"\x95\x01\n\x15\x46lowIpv4OptionsCustom\x12,\n\x04type\x18\x01 \x01(\x0b\x32\x1e.otg.FlowIpv4OptionsCustomType\x12\x30\n\x06length\x18\x02 \x01(\x0b\x32 .otg.FlowIpv4OptionsCustomLength\x12\x12\n\x05value\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"\xf3\x01\n\x19\x46lowIpv4OptionsCustomType\x12\x44\n\x0b\x63opied_flag\x18\x01 \x01(\x0b\x32/.otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag\x12\x46\n\x0coption_class\x18\x02 \x01(\x0b\x32\x30.otg.PatternFlowIpv4OptionsCustomTypeOptionClass\x12H\n\roption_number\x18\x03 \x01(\x0b\x32\x31.otg.PatternFlowIpv4OptionsCustomTypeOptionNumber\"\xdd\x01\n\x1b\x46lowIpv4OptionsCustomLength\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.FlowIpv4OptionsCustomLength.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\x82\x02\n\x10\x46lowIpv4Priority\x12\x36\n\x06\x63hoice\x18\x01 \x01(\x0e\x32!.otg.FlowIpv4Priority.Choice.EnumH\x00\x88\x01\x01\x12,\n\x03raw\x18\x02 \x01(\x0b\x32\x1f.otg.PatternFlowIpv4PriorityRaw\x12\x1d\n\x03tos\x18\x03 \x01(\x0b\x32\x10.otg.FlowIpv4Tos\x12\x1f\n\x04\x64scp\x18\x04 \x01(\x0b\x32\x11.otg.FlowIpv4Dscp\x1a=\n\x06\x43hoice\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03raw\x10\x01\x12\x07\n\x03tos\x10\x02\x12\x08\n\x04\x64scp\x10\x03\x42\t\n\x07_choice\"b\n\x0c\x46lowIpv4Dscp\x12(\n\x03phb\x18\x01 \x01(\x0b\x32\x1b.otg.PatternFlowIpv4DscpPhb\x12(\n\x03\x65\x63n\x18\x02 \x01(\x0b\x32\x1b.otg.PatternFlowIpv4DscpEcn\"\xc3\x02\n\x0b\x46lowIpv4Tos\x12\x35\n\nprecedence\x18\x01 \x01(\x0b\x32!.otg.PatternFlowIpv4TosPrecedence\x12+\n\x05\x64\x65lay\x18\x02 \x01(\x0b\x32\x1c.otg.PatternFlowIpv4TosDelay\x12\x35\n\nthroughput\x18\x03 \x01(\x0b\x32!.otg.PatternFlowIpv4TosThroughput\x12\x37\n\x0breliability\x18\x04 \x01(\x0b\x32\".otg.PatternFlowIpv4TosReliability\x12\x31\n\x08monetary\x18\x05 \x01(\x0b\x32\x1f.otg.PatternFlowIpv4TosMonetary\x12-\n\x06unused\x18\x06 \x01(\x0b\x32\x1d.otg.PatternFlowIpv4TosUnused\"\x91\x03\n\x08\x46lowIpv6\x12,\n\x07version\x18\x01 \x01(\x0b\x32\x1b.otg.PatternFlowIpv6Version\x12\x37\n\rtraffic_class\x18\x02 \x01(\x0b\x32 .otg.PatternFlowIpv6TrafficClass\x12\x31\n\nflow_label\x18\x03 \x01(\x0b\x32\x1d.otg.PatternFlowIpv6FlowLabel\x12\x39\n\x0epayload_length\x18\x04 \x01(\x0b\x32!.otg.PatternFlowIpv6PayloadLength\x12\x33\n\x0bnext_header\x18\x05 \x01(\x0b\x32\x1e.otg.PatternFlowIpv6NextHeader\x12/\n\thop_limit\x18\x06 \x01(\x0b\x32\x1c.otg.PatternFlowIpv6HopLimit\x12$\n\x03src\x18\x07 \x01(\x0b\x32\x17.otg.PatternFlowIpv6Src\x12$\n\x03\x64st\x18\x08 \x01(\x0b\x32\x17.otg.PatternFlowIpv6Dst\"\x81\x06\n\x0c\x46lowPfcPause\x12(\n\x03\x64st\x18\x01 \x01(\x0b\x32\x1b.otg.PatternFlowPfcPauseDst\x12(\n\x03src\x18\x02 \x01(\x0b\x32\x1b.otg.PatternFlowPfcPauseSrc\x12\x35\n\nether_type\x18\x03 \x01(\x0b\x32!.otg.PatternFlowPfcPauseEtherType\x12>\n\x0f\x63ontrol_op_code\x18\x04 \x01(\x0b\x32%.otg.PatternFlowPfcPauseControlOpCode\x12\x46\n\x13\x63lass_enable_vector\x18\x05 \x01(\x0b\x32).otg.PatternFlowPfcPauseClassEnableVector\x12:\n\rpause_class_0\x18\x06 \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass0\x12:\n\rpause_class_1\x18\x07 \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass1\x12:\n\rpause_class_2\x18\x08 \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass2\x12:\n\rpause_class_3\x18\t \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass3\x12:\n\rpause_class_4\x18\n \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass4\x12:\n\rpause_class_5\x18\x0b \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass5\x12:\n\rpause_class_6\x18\x0c \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass6\x12:\n\rpause_class_7\x18\r \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass7\"\xa3\x02\n\x11\x46lowEthernetPause\x12-\n\x03\x64st\x18\x01 \x01(\x0b\x32 .otg.PatternFlowEthernetPauseDst\x12-\n\x03src\x18\x02 \x01(\x0b\x32 .otg.PatternFlowEthernetPauseSrc\x12:\n\nether_type\x18\x03 \x01(\x0b\x32&.otg.PatternFlowEthernetPauseEtherType\x12\x43\n\x0f\x63ontrol_op_code\x18\x04 \x01(\x0b\x32*.otg.PatternFlowEthernetPauseControlOpCode\x12/\n\x04time\x18\x05 \x01(\x0b\x32!.otg.PatternFlowEthernetPauseTime\"\xa8\x05\n\x07\x46lowTcp\x12,\n\x08src_port\x18\x01 \x01(\x0b\x32\x1a.otg.PatternFlowTcpSrcPort\x12,\n\x08\x64st_port\x18\x02 \x01(\x0b\x32\x1a.otg.PatternFlowTcpDstPort\x12*\n\x07seq_num\x18\x03 \x01(\x0b\x32\x19.otg.PatternFlowTcpSeqNum\x12*\n\x07\x61\x63k_num\x18\x04 \x01(\x0b\x32\x19.otg.PatternFlowTcpAckNum\x12\x32\n\x0b\x64\x61ta_offset\x18\x05 \x01(\x0b\x32\x1d.otg.PatternFlowTcpDataOffset\x12(\n\x06\x65\x63n_ns\x18\x06 \x01(\x0b\x32\x18.otg.PatternFlowTcpEcnNs\x12*\n\x07\x65\x63n_cwr\x18\x07 \x01(\x0b\x32\x19.otg.PatternFlowTcpEcnCwr\x12,\n\x08\x65\x63n_echo\x18\x08 \x01(\x0b\x32\x1a.otg.PatternFlowTcpEcnEcho\x12*\n\x07\x63tl_urg\x18\t \x01(\x0b\x32\x19.otg.PatternFlowTcpCtlUrg\x12*\n\x07\x63tl_ack\x18\n \x01(\x0b\x32\x19.otg.PatternFlowTcpCtlAck\x12*\n\x07\x63tl_psh\x18\x0b \x01(\x0b\x32\x19.otg.PatternFlowTcpCtlPsh\x12*\n\x07\x63tl_rst\x18\x0c \x01(\x0b\x32\x19.otg.PatternFlowTcpCtlRst\x12*\n\x07\x63tl_syn\x18\r \x01(\x0b\x32\x19.otg.PatternFlowTcpCtlSyn\x12*\n\x07\x63tl_fin\x18\x0e \x01(\x0b\x32\x19.otg.PatternFlowTcpCtlFin\x12)\n\x06window\x18\x0f \x01(\x0b\x32\x19.otg.PatternFlowTcpWindow\"\xbf\x01\n\x07\x46lowUdp\x12,\n\x08src_port\x18\x01 \x01(\x0b\x32\x1a.otg.PatternFlowUdpSrcPort\x12,\n\x08\x64st_port\x18\x02 \x01(\x0b\x32\x1a.otg.PatternFlowUdpDstPort\x12)\n\x06length\x18\x03 \x01(\x0b\x32\x19.otg.PatternFlowUdpLength\x12-\n\x08\x63hecksum\x18\x04 \x01(\x0b\x32\x1b.otg.PatternFlowUdpChecksum\"\xb4\x02\n\x07\x46lowGre\x12<\n\x10\x63hecksum_present\x18\x01 \x01(\x0b\x32\".otg.PatternFlowGreChecksumPresent\x12/\n\treserved0\x18\x02 \x01(\x0b\x32\x1c.otg.PatternFlowGreReserved0\x12+\n\x07version\x18\x03 \x01(\x0b\x32\x1a.otg.PatternFlowGreVersion\x12-\n\x08protocol\x18\x04 \x01(\x0b\x32\x1b.otg.PatternFlowGreProtocol\x12-\n\x08\x63hecksum\x18\x05 \x01(\x0b\x32\x1b.otg.PatternFlowGreChecksum\x12/\n\treserved1\x18\x06 \x01(\x0b\x32\x1c.otg.PatternFlowGreReserved1\"\xbf\x05\n\tFlowGtpv1\x12-\n\x07version\x18\x01 \x01(\x0b\x32\x1c.otg.PatternFlowGtpv1Version\x12\x38\n\rprotocol_type\x18\x02 \x01(\x0b\x32!.otg.PatternFlowGtpv1ProtocolType\x12/\n\x08reserved\x18\x03 \x01(\x0b\x32\x1d.otg.PatternFlowGtpv1Reserved\x12*\n\x06\x65_flag\x18\x04 \x01(\x0b\x32\x1a.otg.PatternFlowGtpv1EFlag\x12*\n\x06s_flag\x18\x05 \x01(\x0b\x32\x1a.otg.PatternFlowGtpv1SFlag\x12,\n\x07pn_flag\x18\x06 \x01(\x0b\x32\x1b.otg.PatternFlowGtpv1PnFlag\x12\x36\n\x0cmessage_type\x18\x07 \x01(\x0b\x32 .otg.PatternFlowGtpv1MessageType\x12:\n\x0emessage_length\x18\x08 \x01(\x0b\x32\".otg.PatternFlowGtpv1MessageLength\x12\'\n\x04teid\x18\t \x01(\x0b\x32\x19.otg.PatternFlowGtpv1Teid\x12:\n\x0esquence_number\x18\n \x01(\x0b\x32\".otg.PatternFlowGtpv1SquenceNumber\x12\x35\n\x0cn_pdu_number\x18\x0b \x01(\x0b\x32\x1f.otg.PatternFlowGtpv1NPduNumber\x12P\n\x1anext_extension_header_type\x18\x0c \x01(\x0b\x32,.otg.PatternFlowGtpv1NextExtensionHeaderType\x12\x30\n\x11\x65xtension_headers\x18\r \x03(\x0b\x32\x15.otg.FlowGtpExtension\"\xe1\x01\n\x10\x46lowGtpExtension\x12\x45\n\x10\x65xtension_length\x18\x01 \x01(\x0b\x32+.otg.PatternFlowGtpExtensionExtensionLength\x12\x36\n\x08\x63ontents\x18\x02 \x01(\x0b\x32$.otg.PatternFlowGtpExtensionContents\x12N\n\x15next_extension_header\x18\x03 \x01(\x0b\x32/.otg.PatternFlowGtpExtensionNextExtensionHeader\"\xe3\x03\n\tFlowGtpv2\x12-\n\x07version\x18\x01 \x01(\x0b\x32\x1c.otg.PatternFlowGtpv2Version\x12@\n\x11piggybacking_flag\x18\x02 \x01(\x0b\x32%.otg.PatternFlowGtpv2PiggybackingFlag\x12\x30\n\tteid_flag\x18\x03 \x01(\x0b\x32\x1d.otg.PatternFlowGtpv2TeidFlag\x12+\n\x06spare1\x18\x04 \x01(\x0b\x32\x1b.otg.PatternFlowGtpv2Spare1\x12\x36\n\x0cmessage_type\x18\x05 \x01(\x0b\x32 .otg.PatternFlowGtpv2MessageType\x12:\n\x0emessage_length\x18\x06 \x01(\x0b\x32\".otg.PatternFlowGtpv2MessageLength\x12\'\n\x04teid\x18\x07 \x01(\x0b\x32\x19.otg.PatternFlowGtpv2Teid\x12<\n\x0fsequence_number\x18\x08 \x01(\x0b\x32#.otg.PatternFlowGtpv2SequenceNumber\x12+\n\x06spare2\x18\t \x01(\x0b\x32\x1b.otg.PatternFlowGtpv2Spare2\"\xb6\x04\n\x07\x46lowArp\x12\x36\n\rhardware_type\x18\x01 \x01(\x0b\x32\x1f.otg.PatternFlowArpHardwareType\x12\x36\n\rprotocol_type\x18\x02 \x01(\x0b\x32\x1f.otg.PatternFlowArpProtocolType\x12:\n\x0fhardware_length\x18\x03 \x01(\x0b\x32!.otg.PatternFlowArpHardwareLength\x12:\n\x0fprotocol_length\x18\x04 \x01(\x0b\x32!.otg.PatternFlowArpProtocolLength\x12/\n\toperation\x18\x05 \x01(\x0b\x32\x1c.otg.PatternFlowArpOperation\x12\x43\n\x14sender_hardware_addr\x18\x06 \x01(\x0b\x32%.otg.PatternFlowArpSenderHardwareAddr\x12\x43\n\x14sender_protocol_addr\x18\x07 \x01(\x0b\x32%.otg.PatternFlowArpSenderProtocolAddr\x12\x43\n\x14target_hardware_addr\x18\x08 \x01(\x0b\x32%.otg.PatternFlowArpTargetHardwareAddr\x12\x43\n\x14target_protocol_addr\x18\t \x01(\x0b\x32%.otg.PatternFlowArpTargetProtocolAddr\"\x93\x01\n\x08\x46lowIcmp\x12.\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x19.otg.FlowIcmp.Choice.EnumH\x00\x88\x01\x01\x12\x1f\n\x04\x65\x63ho\x18\x02 \x01(\x0b\x32\x11.otg.FlowIcmpEcho\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x65\x63ho\x10\x01\x42\t\n\x07_choice\"\x93\x02\n\x0c\x46lowIcmpEcho\x12*\n\x04type\x18\x01 \x01(\x0b\x32\x1c.otg.PatternFlowIcmpEchoType\x12*\n\x04\x63ode\x18\x02 \x01(\x0b\x32\x1c.otg.PatternFlowIcmpEchoCode\x12\x32\n\x08\x63hecksum\x18\x03 \x01(\x0b\x32 .otg.PatternFlowIcmpEchoChecksum\x12\x36\n\nidentifier\x18\x04 \x01(\x0b\x32\".otg.PatternFlowIcmpEchoIdentifier\x12?\n\x0fsequence_number\x18\x05 \x01(\x0b\x32&.otg.PatternFlowIcmpEchoSequenceNumber\"\x99\x01\n\nFlowIcmpv6\x12\x30\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1b.otg.FlowIcmpv6.Choice.EnumH\x00\x88\x01\x01\x12!\n\x04\x65\x63ho\x18\x02 \x01(\x0b\x32\x13.otg.FlowIcmpv6Echo\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x65\x63ho\x10\x01\x42\t\n\x07_choice\"\x9f\x02\n\x0e\x46lowIcmpv6Echo\x12,\n\x04type\x18\x01 \x01(\x0b\x32\x1e.otg.PatternFlowIcmpv6EchoType\x12,\n\x04\x63ode\x18\x02 \x01(\x0b\x32\x1e.otg.PatternFlowIcmpv6EchoCode\x12\x38\n\nidentifier\x18\x03 \x01(\x0b\x32$.otg.PatternFlowIcmpv6EchoIdentifier\x12\x41\n\x0fsequence_number\x18\x04 \x01(\x0b\x32(.otg.PatternFlowIcmpv6EchoSequenceNumber\x12\x34\n\x08\x63hecksum\x18\x05 \x01(\x0b\x32\".otg.PatternFlowIcmpv6EchoChecksum\"\x9b\x01\n\x07\x46lowPpp\x12+\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x1a.otg.PatternFlowPppAddress\x12+\n\x07\x63ontrol\x18\x02 \x01(\x0b\x32\x1a.otg.PatternFlowPppControl\x12\x36\n\rprotocol_type\x18\x03 \x01(\x0b\x32\x1f.otg.PatternFlowPppProtocolType\"\x81\x02\n\nFlowIgmpv1\x12.\n\x07version\x18\x01 \x01(\x0b\x32\x1d.otg.PatternFlowIgmpv1Version\x12(\n\x04type\x18\x02 \x01(\x0b\x32\x1a.otg.PatternFlowIgmpv1Type\x12,\n\x06unused\x18\x03 \x01(\x0b\x32\x1c.otg.PatternFlowIgmpv1Unused\x12\x30\n\x08\x63hecksum\x18\x04 \x01(\x0b\x32\x1e.otg.PatternFlowIgmpv1Checksum\x12\x39\n\rgroup_address\x18\x05 \x01(\x0b\x32\".otg.PatternFlowIgmpv1GroupAddress\"\xdf\x01\n\x08\x46lowMpls\x12(\n\x05label\x18\x01 \x01(\x0b\x32\x19.otg.PatternFlowMplsLabel\x12\x37\n\rtraffic_class\x18\x02 \x01(\x0b\x32 .otg.PatternFlowMplsTrafficClass\x12:\n\x0f\x62ottom_of_stack\x18\x03 \x01(\x0b\x32!.otg.PatternFlowMplsBottomOfStack\x12\x34\n\x0ctime_to_live\x18\x04 \x01(\x0b\x32\x1e.otg.PatternFlowMplsTimeToLive\"\x88\x01\n\x0b\x46lowSnmpv2c\x12/\n\x07version\x18\x01 \x01(\x0b\x32\x1e.otg.PatternFlowSnmpv2cVersion\x12\x16\n\tcommunity\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\"\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x14.otg.FlowSnmpv2cDataB\x0c\n\n_community\"\xde\x04\n\x0f\x46lowSnmpv2cData\x12\x35\n\x06\x63hoice\x18\x01 \x01(\x0e\x32 .otg.FlowSnmpv2cData.Choice.EnumH\x00\x88\x01\x01\x12(\n\x0bget_request\x18\x02 \x01(\x0b\x32\x13.otg.FlowSnmpv2cPDU\x12-\n\x10get_next_request\x18\x03 \x01(\x0b\x32\x13.otg.FlowSnmpv2cPDU\x12%\n\x08response\x18\x04 \x01(\x0b\x32\x13.otg.FlowSnmpv2cPDU\x12(\n\x0bset_request\x18\x05 \x01(\x0b\x32\x13.otg.FlowSnmpv2cPDU\x12\x31\n\x10get_bulk_request\x18\x06 \x01(\x0b\x32\x17.otg.FlowSnmpv2cBulkPDU\x12+\n\x0einform_request\x18\x07 \x01(\x0b\x32\x13.otg.FlowSnmpv2cPDU\x12(\n\x0bsnmpv2_trap\x18\x08 \x01(\x0b\x32\x13.otg.FlowSnmpv2cPDU\x12#\n\x06report\x18\t \x01(\x0b\x32\x13.otg.FlowSnmpv2cPDU\x1a\xaf\x01\n\x06\x43hoice\"\xa4\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0f\n\x0bget_request\x10\x01\x12\x14\n\x10get_next_request\x10\x02\x12\x0c\n\x08response\x10\x03\x12\x0f\n\x0bset_request\x10\x04\x12\x14\n\x10get_bulk_request\x10\x05\x12\x12\n\x0einform_request\x10\x06\x12\x0f\n\x0bsnmpv2_trap\x10\x07\x12\n\n\x06report\x10\x08\x42\t\n\x07_choice\"\x93\x05\n\x0e\x46lowSnmpv2cPDU\x12\x37\n\nrequest_id\x18\x01 \x01(\x0b\x32#.otg.PatternFlowSnmpv2cPDURequestId\x12?\n\x0c\x65rror_status\x18\x02 \x01(\x0e\x32$.otg.FlowSnmpv2cPDU.ErrorStatus.EnumH\x00\x88\x01\x01\x12\x39\n\x0b\x65rror_index\x18\x03 \x01(\x0b\x32$.otg.PatternFlowSnmpv2cPDUErrorIndex\x12:\n\x11variable_bindings\x18\x04 \x03(\x0b\x32\x1f.otg.FlowSnmpv2cVariableBinding\x1a\xfe\x02\n\x0b\x45rrorStatus\"\xee\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08no_error\x10\x01\x12\x0b\n\x07too_big\x10\x02\x12\x10\n\x0cno_such_name\x10\x03\x12\r\n\tbad_value\x10\x04\x12\r\n\tread_only\x10\x05\x12\x0b\n\x07gen_err\x10\x06\x12\r\n\tno_access\x10\x07\x12\x0e\n\nwrong_type\x10\x08\x12\x10\n\x0cwrong_length\x10\t\x12\x12\n\x0ewrong_encoding\x10\n\x12\x0f\n\x0bwrong_value\x10\x0b\x12\x0f\n\x0bno_creation\x10\x0c\x12\x16\n\x12inconsistent_value\x10\r\x12\x18\n\x14resource_unavailable\x10\x0e\x12\x11\n\rcommit_failed\x10\x0f\x12\x0f\n\x0bundo_failed\x10\x10\x12\x17\n\x13\x61uthorization_error\x10\x11\x12\x10\n\x0cnot_writable\x10\x12\x12\x15\n\x11inconsistent_name\x10\x13\x42\x0f\n\r_error_status\"\x97\x02\n\x12\x46lowSnmpv2cBulkPDU\x12;\n\nrequest_id\x18\x01 \x01(\x0b\x32\'.otg.PatternFlowSnmpv2cBulkPDURequestId\x12\x41\n\rnon_repeaters\x18\x02 \x01(\x0b\x32*.otg.PatternFlowSnmpv2cBulkPDUNonRepeaters\x12\x45\n\x0fmax_repetitions\x18\x03 \x01(\x0b\x32,.otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions\x12:\n\x11variable_bindings\x18\x04 \x03(\x0b\x32\x1f.otg.FlowSnmpv2cVariableBinding\"\x87\x01\n\x1a\x46lowSnmpv2cVariableBinding\x12\x1e\n\x11object_identifier\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.otg.FlowSnmpv2cVariableBindingValueB\x14\n\x12_object_identifier\"\xa5\x08\n\x1f\x46lowSnmpv2cVariableBindingValue\x12\x45\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x30.otg.FlowSnmpv2cVariableBindingValue.Choice.EnumH\x00\x88\x01\x01\x12N\n\rinteger_value\x18\x02 \x01(\x0b\x32\x37.otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue\x12@\n\x0cstring_value\x18\x03 \x01(\x0b\x32*.otg.FlowSnmpv2cVariableBindingStringValue\x12$\n\x17object_identifier_value\x18\x04 \x01(\tH\x01\x88\x01\x01\x12S\n\x10ip_address_value\x18\x05 \x01(\x0b\x32\x39.otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue\x12N\n\rcounter_value\x18\x06 \x01(\x0b\x32\x37.otg.PatternFlowSnmpv2cVariableBindingValueCounterValue\x12R\n\x0ftimeticks_value\x18\x07 \x01(\x0b\x32\x39.otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue\x12\x1c\n\x0f\x61rbitrary_value\x18\x08 \x01(\tH\x02\x88\x01\x01\x12U\n\x11\x62ig_counter_value\x18\t \x01(\x0b\x32:.otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue\x12_\n\x16unsigned_integer_value\x18\n \x01(\x0b\x32?.otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue\x1a\xf8\x01\n\x06\x43hoice\"\xed\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08no_value\x10\x01\x12\x11\n\rinteger_value\x10\x02\x12\x10\n\x0cstring_value\x10\x03\x12\x1b\n\x17object_identifier_value\x10\x04\x12\x14\n\x10ip_address_value\x10\x05\x12\x11\n\rcounter_value\x10\x06\x12\x13\n\x0ftimeticks_value\x10\x07\x12\x13\n\x0f\x61rbitrary_value\x10\x08\x12\x15\n\x11\x62ig_counter_value\x10\t\x12\x1a\n\x16unsigned_integer_value\x10\nB\t\n\x07_choiceB\x1a\n\x18_object_identifier_valueB\x12\n\x10_arbitrary_value\"\xee\x01\n%FlowSnmpv2cVariableBindingStringValue\x12K\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x36.otg.FlowSnmpv2cVariableBindingStringValue.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05\x61scii\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x03raw\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x35\n\x06\x43hoice\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x61scii\x10\x01\x12\x07\n\x03raw\x10\x02\x42\t\n\x07_choiceB\x08\n\x06_asciiB\x06\n\x04_raw\"\xb9\x03\n\x08\x46lowRsvp\x12\x14\n\x07version\x18\x01 \x01(\rH\x00\x88\x01\x01\x12*\n\x04\x66lag\x18\x02 \x01(\x0e\x32\x17.otg.FlowRsvp.Flag.EnumH\x01\x88\x01\x01\x12\x37\n\rrsvp_checksum\x18\x03 \x01(\x0b\x32 .otg.PatternFlowRsvpRsvpChecksum\x12\x34\n\x0ctime_to_live\x18\x04 \x01(\x0b\x32\x1e.otg.PatternFlowRsvpTimeToLive\x12.\n\x08reserved\x18\x05 \x01(\x0b\x32\x1c.otg.PatternFlowRsvpReserved\x12(\n\x0brsvp_length\x18\x06 \x01(\x0b\x32\x13.otg.FlowRSVPLength\x12*\n\x0cmessage_type\x18\x07 \x01(\x0b\x32\x14.otg.FlowRSVPMessage\x1a\x61\n\x04\x46lag\"Y\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12!\n\x1dnot_refresh_reduction_capable\x10\x01\x12\x1d\n\x19refresh_reduction_capable\x10\x02\x42\n\n\x08_versionB\x07\n\x05_flag\"\xc3\x01\n\x0e\x46lowRSVPLength\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.FlowRSVPLength.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xa8\x01\n\x0f\x46lowRSVPMessage\x12\x35\n\x06\x63hoice\x18\x01 \x01(\x0e\x32 .otg.FlowRSVPMessage.Choice.EnumH\x00\x88\x01\x01\x12&\n\x04path\x18\x02 \x01(\x0b\x32\x18.otg.FlowRSVPPathMessage\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04path\x10\x01\x42\t\n\x07_choice\"@\n\x13\x46lowRSVPPathMessage\x12)\n\x07objects\x18\x01 \x03(\x0b\x32\x18.otg.FlowRSVPPathObjects\"G\n\x13\x46lowRSVPPathObjects\x12\x30\n\tclass_num\x18\x01 \x01(\x0b\x32\x1d.otg.FlowRSVPPathObjectsClass\"\xcf\x01\n\x14\x46lowRSVPObjectLength\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.FlowRSVPObjectLength.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xac\x07\n\x18\x46lowRSVPPathObjectsClass\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.FlowRSVPPathObjectsClass.Choice.EnumH\x00\x88\x01\x01\x12\x35\n\x07session\x18\x02 \x01(\x0b\x32$.otg.FlowRSVPPathObjectsClassSession\x12\x36\n\x08rsvp_hop\x18\x03 \x01(\x0b\x32$.otg.FlowRSVPPathObjectsClassRsvpHop\x12<\n\x0btime_values\x18\x04 \x01(\x0b\x32\'.otg.FlowRSVPPathObjectsClassTimeValues\x12\x42\n\x0e\x65xplicit_route\x18\x05 \x01(\x0b\x32*.otg.FlowRSVPPathObjectsClassExplicitRoute\x12@\n\rlabel_request\x18\x06 \x01(\x0b\x32).otg.FlowRSVPPathObjectsClassLabelRequest\x12H\n\x11session_attribute\x18\x07 \x01(\x0b\x32-.otg.FlowRSVPPathObjectsClassSessionAttribute\x12\x44\n\x0fsender_template\x18\x08 \x01(\x0b\x32+.otg.FlowRSVPPathObjectsClassSenderTemplate\x12>\n\x0csender_tspec\x18\t \x01(\x0b\x32(.otg.FlowRSVPPathObjectsClassSenderTspec\x12>\n\x0crecord_route\x18\n \x01(\x0b\x32(.otg.FlowRSVPPathObjectsClassRecordRoute\x12.\n\x06\x63ustom\x18\x0b \x01(\x0b\x32\x1e.otg.FlowRSVPPathObjectsCustom\x1a\xd1\x01\n\x06\x43hoice\"\xc6\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07session\x10\x01\x12\x0c\n\x08rsvp_hop\x10\x02\x12\x0f\n\x0btime_values\x10\x03\x12\x12\n\x0e\x65xplicit_route\x10\x04\x12\x11\n\rlabel_request\x10\x05\x12\x15\n\x11session_attribute\x10\x06\x12\x13\n\x0fsender_template\x10\x07\x12\x10\n\x0csender_tspec\x10\x08\x12\x10\n\x0crecord_route\x10\t\x12\n\n\x06\x63ustom\x10\nB\t\n\x07_choice\"\x82\x01\n\x1f\x46lowRSVPPathObjectsClassSession\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12\x34\n\x06\x63_type\x18\x02 \x01(\x0b\x32$.otg.FlowRSVPPathObjectsSessionCType\"\xeb\x01\n\x1f\x46lowRSVPPathObjectsSessionCType\x12\x45\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x30.otg.FlowRSVPPathObjectsSessionCType.Choice.EnumH\x00\x88\x01\x01\x12>\n\x0flsp_tunnel_ipv4\x18\x02 \x01(\x0b\x32%.otg.FlowRSVPPathSessionLspTunnelIpv4\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x13\n\x0flsp_tunnel_ipv4\x10\x01\x42\t\n\x07_choice\"\xe2\x02\n FlowRSVPPathSessionLspTunnelIpv4\x12l\n\x1dipv4_tunnel_end_point_address\x18\x01 \x01(\x0b\x32\x45.otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress\x12\x46\n\x08reserved\x18\x02 \x01(\x0b\x32\x34.otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved\x12G\n\ttunnel_id\x18\x03 \x01(\x0b\x32\x34.otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId\x12?\n\x12\x65xtended_tunnel_id\x18\x04 \x01(\x0b\x32#.otg.FlowRSVPPathSessionExtTunnelId\"\xbd\x02\n\x1e\x46lowRSVPPathSessionExtTunnelId\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.FlowRSVPPathSessionExtTunnelId.Choice.EnumH\x00\x88\x01\x01\x12G\n\nas_integer\x18\x02 \x01(\x0b\x32\x33.otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger\x12\x41\n\x07\x61s_ipv4\x18\x03 \x01(\x0b\x32\x30.otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4\x1a>\n\x06\x43hoice\"4\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\nas_integer\x10\x01\x12\x0b\n\x07\x61s_ipv4\x10\x02\x42\t\n\x07_choice\"\x82\x01\n\x1f\x46lowRSVPPathObjectsClassRsvpHop\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12\x34\n\x06\x63_type\x18\x02 \x01(\x0b\x32$.otg.FlowRSVPPathObjectsRsvpHopCType\"\xcc\x01\n\x1f\x46lowRSVPPathObjectsRsvpHopCType\x12\x45\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x30.otg.FlowRSVPPathObjectsRsvpHopCType.Choice.EnumH\x00\x88\x01\x01\x12*\n\x04ipv4\x18\x02 \x01(\x0b\x32\x1c.otg.FlowRSVPPathRsvpHopIpv4\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x42\t\n\x07_choice\"\xbc\x01\n\x17\x46lowRSVPPathRsvpHopIpv4\x12\x44\n\x0cipv4_address\x18\x01 \x01(\x0b\x32..otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address\x12[\n\x18logical_interface_handle\x18\x02 \x01(\x0b\x32\x39.otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle\"\x88\x01\n\"FlowRSVPPathObjectsClassTimeValues\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12\x37\n\x06\x63_type\x18\x02 \x01(\x0b\x32\'.otg.FlowRSVPPathObjectsTimeValuesCType\"\xda\x01\n\"FlowRSVPPathObjectsTimeValuesCType\x12H\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x33.otg.FlowRSVPPathObjectsTimeValuesCType.Choice.EnumH\x00\x88\x01\x01\x12\x30\n\x06type_1\x18\x02 \x01(\x0b\x32 .otg.FlowRSVPPathTimeValuesType1\x1a-\n\x06\x43hoice\"#\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06type_1\x10\x01\x42\t\n\x07_choice\"n\n\x1b\x46lowRSVPPathTimeValuesType1\x12O\n\x10refresh_period_r\x18\x01 \x01(\x0b\x32\x35.otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR\"\x93\x01\n%FlowRSVPPathObjectsClassExplicitRoute\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12?\n\x06\x63_type\x18\x02 \x01(\x0b\x32/.otg.FlowRSVPPathObjectsClassExplicitRouteCType\"\xed\x01\n*FlowRSVPPathObjectsClassExplicitRouteCType\x12P\n\x06\x63hoice\x18\x01 \x01(\x0e\x32;.otg.FlowRSVPPathObjectsClassExplicitRouteCType.Choice.EnumH\x00\x88\x01\x01\x12\x33\n\x06type_1\x18\x02 \x01(\x0b\x32#.otg.FlowRSVPPathExplicitRouteType1\x1a-\n\x06\x43hoice\"#\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06type_1\x10\x01\x42\t\n\x07_choice\"_\n\x1e\x46lowRSVPPathExplicitRouteType1\x12=\n\nsubobjects\x18\x01 \x03(\x0b\x32).otg.FlowRSVPType1ExplicitRouteSubobjects\"c\n$FlowRSVPType1ExplicitRouteSubobjects\x12;\n\x04type\x18\x01 \x01(\x0b\x32-.otg.FlowRSVPType1ExplicitRouteSubobjectsType\"\xcc\x02\n(FlowRSVPType1ExplicitRouteSubobjectsType\x12N\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x39.otg.FlowRSVPType1ExplicitRouteSubobjectsType.Choice.EnumH\x00\x88\x01\x01\x12\x42\n\x0bipv4_prefix\x18\x02 \x01(\x0b\x32-.otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix\x12>\n\tas_number\x18\x03 \x01(\x0b\x32+.otg.FlowRSVPPathExplicitRouteType1ASNumber\x1a\x41\n\x06\x43hoice\"7\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0f\n\x0bipv4_prefix\x10\x01\x12\r\n\tas_number\x10\x02\x42\t\n\x07_choice\"\x9c\x02\n(FlowRSVPPathExplicitRouteType1Ipv4Prefix\x12G\n\x05l_bit\x18\x01 \x01(\x0b\x32\x38.otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit\x12\x30\n\x06length\x18\x02 \x01(\x0b\x32 .otg.FlowRSVPExplicitRouteLength\x12U\n\x0cipv4_address\x18\x03 \x01(\x0b\x32?.otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address\x12\x13\n\x06prefix\x18\x04 \x01(\rH\x00\x88\x01\x01\x42\t\n\x07_prefix\"\xcf\x01\n&FlowRSVPPathExplicitRouteType1ASNumber\x12\x45\n\x05l_bit\x18\x01 \x01(\x0b\x32\x36.otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit\x12\x38\n\x06length\x18\x02 \x01(\x0b\x32(.otg.FlowRSVPExplicitRouteASNumberLength\x12\x16\n\tas_number\x18\x03 \x01(\rH\x00\x88\x01\x01\x42\x0c\n\n_as_number\"\xdd\x01\n\x1b\x46lowRSVPExplicitRouteLength\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.FlowRSVPExplicitRouteLength.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xed\x01\n#FlowRSVPExplicitRouteASNumberLength\x12I\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x34.otg.FlowRSVPExplicitRouteASNumberLength.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\x8c\x01\n$FlowRSVPPathObjectsClassLabelRequest\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12\x39\n\x06\x63_type\x18\x02 \x01(\x0b\x32).otg.FlowRSVPPathObjectsLabelRequestCType\"\x86\x02\n$FlowRSVPPathObjectsLabelRequestCType\x12J\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x35.otg.FlowRSVPPathObjectsLabelRequestCType.Choice.EnumH\x00\x88\x01\x01\x12K\n\x13without_label_range\x18\x02 \x01(\x0b\x32..otg.FlowRSVPPathLabelRequestWithoutLabelRange\x1a:\n\x06\x43hoice\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x17\n\x13without_label_range\x10\x01\x42\t\n\x07_choice\"\xc7\x01\n)FlowRSVPPathLabelRequestWithoutLabelRange\x12O\n\x08reserved\x18\x01 \x01(\x0b\x32=.otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved\x12I\n\x05l3pid\x18\x02 \x01(\x0b\x32:.otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid\"\x94\x01\n(FlowRSVPPathObjectsClassSessionAttribute\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12=\n\x06\x63_type\x18\x02 \x01(\x0b\x32-.otg.FlowRSVPPathObjectsSessionAttributeCType\"\xd0\x02\n(FlowRSVPPathObjectsSessionAttributeCType\x12N\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x39.otg.FlowRSVPPathObjectsSessionAttributeCType.Choice.EnumH\x00\x88\x01\x01\x12>\n\nlsp_tunnel\x18\x02 \x01(\x0b\x32*.otg.FlowRSVPPathSessionAttributeLspTunnel\x12\x43\n\rlsp_tunnel_ra\x18\x03 \x01(\x0b\x32,.otg.FlowRSVPPathSessionAttributeLspTunnelRa\x1a\x44\n\x06\x43hoice\":\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\nlsp_tunnel\x10\x01\x12\x11\n\rlsp_tunnel_ra\x10\x02\x42\t\n\x07_choice\"\xa0\x02\n%FlowRSVPPathSessionAttributeLspTunnel\x12\x1b\n\x0esetup_priority\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1d\n\x10holding_priority\x18\x02 \x01(\rH\x01\x88\x01\x01\x12)\n\x05\x66lags\x18\x03 \x01(\x0b\x32\x1a.otg.FlowRSVPLspTunnelFlag\x12<\n\x0bname_length\x18\x04 \x01(\x0b\x32\'.otg.FlowRSVPSessionAttributeNameLength\x12\x19\n\x0csession_name\x18\x05 \x01(\tH\x02\x88\x01\x01\x42\x11\n\x0f_setup_priorityB\x13\n\x11_holding_priorityB\x0f\n\r_session_name\"\xa0\x03\n\'FlowRSVPPathSessionAttributeLspTunnelRa\x12\x18\n\x0b\x65xclude_any\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0binclude_any\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0binclude_all\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0esetup_priority\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1d\n\x10holding_priority\x18\x05 \x01(\rH\x04\x88\x01\x01\x12)\n\x05\x66lags\x18\x06 \x01(\x0b\x32\x1a.otg.FlowRSVPLspTunnelFlag\x12<\n\x0bname_length\x18\x07 \x01(\x0b\x32\'.otg.FlowRSVPSessionAttributeNameLength\x12\x19\n\x0csession_name\x18\x08 \x01(\tH\x05\x88\x01\x01\x42\x0e\n\x0c_exclude_anyB\x0e\n\x0c_include_anyB\x0e\n\x0c_include_allB\x11\n\x0f_setup_priorityB\x13\n\x11_holding_priorityB\x0f\n\r_session_name\"\xd3\x01\n\x15\x46lowRSVPLspTunnelFlag\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.FlowRSVPLspTunnelFlag.Choice.EnumH\x00\x88\x01\x01\x1ar\n\x06\x43hoice\"h\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1c\n\x18local_protection_desired\x10\x01\x12\x1b\n\x17label_recording_desired\x10\x02\x12\x14\n\x10se_style_desired\x10\x03\x42\t\n\x07_choice\"\xeb\x01\n\"FlowRSVPSessionAttributeNameLength\x12H\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x33.otg.FlowRSVPSessionAttributeNameLength.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\x90\x01\n&FlowRSVPPathObjectsClassSenderTemplate\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12;\n\x06\x63_type\x18\x02 \x01(\x0b\x32+.otg.FlowRSVPPathObjectsSenderTemplateCType\"\x80\x02\n&FlowRSVPPathObjectsSenderTemplateCType\x12L\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x37.otg.FlowRSVPPathObjectsSenderTemplateCType.Choice.EnumH\x00\x88\x01\x01\x12\x45\n\x0flsp_tunnel_ipv4\x18\x02 \x01(\x0b\x32,.otg.FlowRSVPPathSenderTemplateLspTunnelIpv4\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x13\n\x0flsp_tunnel_ipv4\x10\x01\x42\t\n\x07_choice\"\xb2\x02\n\'FlowRSVPPathSenderTemplateLspTunnelIpv4\x12n\n\x1aipv4_tunnel_sender_address\x18\x01 \x01(\x0b\x32J.otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress\x12M\n\x08reserved\x18\x02 \x01(\x0b\x32;.otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved\x12H\n\x06lsp_id\x18\x03 \x01(\x0b\x32\x38.otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId\"\x8a\x01\n#FlowRSVPPathObjectsClassSenderTspec\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12\x38\n\x06\x63_type\x18\x02 \x01(\x0b\x32(.otg.FlowRSVPPathObjectsSenderTspecCType\"\xe3\x01\n#FlowRSVPPathObjectsSenderTspecCType\x12I\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x34.otg.FlowRSVPPathObjectsSenderTspecCType.Choice.EnumH\x00\x88\x01\x01\x12\x35\n\x08int_serv\x18\x02 \x01(\x0b\x32#.otg.FlowRSVPPathSenderTspecIntServ\x1a/\n\x06\x43hoice\"%\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08int_serv\x10\x01\x42\t\n\x07_choice\"\xb0\t\n\x1e\x46lowRSVPPathSenderTspecIntServ\x12\x42\n\x07version\x18\x01 \x01(\x0b\x32\x31.otg.PatternFlowRSVPPathSenderTspecIntServVersion\x12\x46\n\treserved1\x18\x02 \x01(\x0b\x32\x33.otg.PatternFlowRSVPPathSenderTspecIntServReserved1\x12O\n\x0eoverall_length\x18\x03 \x01(\x0b\x32\x37.otg.PatternFlowRSVPPathSenderTspecIntServOverallLength\x12O\n\x0eservice_header\x18\x04 \x01(\x0b\x32\x37.otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader\x12\x43\n\x08zero_bit\x18\x05 \x01(\x0b\x32\x31.otg.PatternFlowRSVPPathSenderTspecIntServZeroBit\x12\x46\n\treserved2\x18\x06 \x01(\x0b\x32\x33.otg.PatternFlowRSVPPathSenderTspecIntServReserved2\x12]\n\x16length_of_service_data\x18\x07 \x01(\x0b\x32=.otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData\x12n\n\x1fparameter_id_token_bucket_tspec\x18\x08 \x01(\x0b\x32\x45.otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec\x12V\n\x12parameter_127_flag\x18\t \x01(\x0b\x32:.otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag\x12Z\n\x14parameter_127_length\x18\n \x01(\x0b\x32<.otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length\x12\x1e\n\x11token_bucket_rate\x18\x0b \x01(\x02H\x00\x88\x01\x01\x12\x1e\n\x11token_bucket_size\x18\x0c \x01(\x02H\x01\x88\x01\x01\x12\x1b\n\x0epeak_data_rate\x18\r \x01(\x02H\x02\x88\x01\x01\x12Z\n\x14minimum_policed_unit\x18\x0e \x01(\x0b\x32<.otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit\x12X\n\x13maximum_packet_size\x18\x0f \x01(\x0b\x32;.otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeB\x14\n\x12_token_bucket_rateB\x14\n\x12_token_bucket_sizeB\x11\n\x0f_peak_data_rate\"\x8a\x01\n#FlowRSVPPathObjectsClassRecordRoute\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12\x38\n\x06\x63_type\x18\x02 \x01(\x0b\x32(.otg.FlowRSVPPathObjectsRecordRouteCType\"\xdd\x01\n#FlowRSVPPathObjectsRecordRouteCType\x12I\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x34.otg.FlowRSVPPathObjectsRecordRouteCType.Choice.EnumH\x00\x88\x01\x01\x12\x31\n\x06type_1\x18\x02 \x01(\x0b\x32!.otg.FlowRSVPPathRecordRouteType1\x1a-\n\x06\x43hoice\"#\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06type_1\x10\x01\x42\t\n\x07_choice\"[\n\x1c\x46lowRSVPPathRecordRouteType1\x12;\n\nsubobjects\x18\x01 \x03(\x0b\x32\'.otg.FlowRSVPType1RecordRouteSubobjects\"d\n\"FlowRSVPType1RecordRouteSubobjects\x12>\n\x04type\x18\x01 \x01(\x0b\x32\x30.otg.FlowRSVPPathObjectsRecordRouteSubObjectType\"\xc6\x02\n+FlowRSVPPathObjectsRecordRouteSubObjectType\x12Q\n\x06\x63hoice\x18\x01 \x01(\x0e\x32<.otg.FlowRSVPPathObjectsRecordRouteSubObjectType.Choice.EnumH\x00\x88\x01\x01\x12\x42\n\x0cipv4_address\x18\x02 \x01(\x0b\x32,.otg.FlowRSVPPathRecordRouteType1Ipv4Address\x12\x35\n\x05label\x18\x03 \x01(\x0b\x32&.otg.FlowRSVPPathRecordRouteType1Label\x1a>\n\x06\x43hoice\"4\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0cipv4_address\x10\x01\x12\t\n\x05label\x10\x02\x42\t\n\x07_choice\"\xb8\x02\n\'FlowRSVPPathRecordRouteType1Ipv4Address\x12.\n\x06length\x18\x01 \x01(\x0b\x32\x1e.otg.FlowRSVPRouteRecordLength\x12T\n\x0cipv4_address\x18\x02 \x01(\x0b\x32>.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address\x12V\n\rprefix_length\x18\x03 \x01(\x0b\x32?.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength\x12/\n\x05\x66lags\x18\x04 \x01(\x0b\x32 .otg.FlowRSVPRecordRouteIPv4Flag\"\xcb\x01\n\x1b\x46lowRSVPRecordRouteIPv4Flag\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.FlowRSVPRecordRouteIPv4Flag.Choice.EnumH\x00\x88\x01\x01\x1a^\n\x06\x43hoice\"T\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1e\n\x1alocal_protection_available\x10\x01\x12\x1b\n\x17local_protection_in_use\x10\x02\x42\t\n\x07_choice\"\x8c\x02\n!FlowRSVPPathRecordRouteType1Label\x12.\n\x06length\x18\x01 \x01(\x0b\x32\x1e.otg.FlowRSVPRouteRecordLength\x12\x41\n\x05\x66lags\x18\x02 \x01(\x0b\x32\x32.otg.PatternFlowRSVPPathRecordRouteType1LabelFlags\x12\x42\n\x06\x63_type\x18\x03 \x01(\x0b\x32\x32.otg.PatternFlowRSVPPathRecordRouteType1LabelCType\x12\x30\n\x05label\x18\x04 \x01(\x0b\x32!.otg.FlowRSVPPathRecordRouteLabel\"\xf4\x01\n\x1c\x46lowRSVPPathRecordRouteLabel\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.FlowRSVPPathRecordRouteLabel.Choice.EnumH\x00\x88\x01\x01\x12\x17\n\nas_integer\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06\x61s_hex\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a=\n\x06\x43hoice\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\nas_integer\x10\x01\x12\n\n\x06\x61s_hex\x10\x02\x42\t\n\x07_choiceB\r\n\x0b_as_integerB\t\n\x07_as_hex\"\xd9\x01\n\x19\x46lowRSVPRouteRecordLength\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.FlowRSVPRouteRecordLength.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\x9d\x01\n\x19\x46lowRSVPPathObjectsCustom\x12\x37\n\x04type\x18\x01 \x01(\x0b\x32).otg.PatternFlowRSVPPathObjectsCustomType\x12)\n\x06length\x18\x02 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12\x12\n\x05\x62ytes\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_bytes\"\xbe\x02\n\x08\x46lowSize\x12.\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x19.otg.FlowSize.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05\x66ixed\x18\x02 \x01(\rH\x01\x88\x01\x01\x12)\n\tincrement\x18\x03 \x01(\x0b\x32\x16.otg.FlowSizeIncrement\x12#\n\x06random\x18\x04 \x01(\x0b\x32\x13.otg.FlowSizeRandom\x12.\n\x0cweight_pairs\x18\x05 \x01(\x0b\x32\x18.otg.FlowSizeWeightPairs\x1aY\n\x06\x43hoice\"O\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x66ixed\x10\x01\x12\r\n\tincrement\x10\x02\x12\n\n\x06random\x10\x03\x12\x10\n\x0cweight_pairs\x10\x04\x42\t\n\x07_choiceB\x08\n\x06_fixed\"g\n\x11\x46lowSizeIncrement\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03\x65nd\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x11\n\x04step\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_endB\x07\n\x05_step\"D\n\x0e\x46lowSizeRandom\x12\x10\n\x03min\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03max\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\"\x8d\x03\n\x13\x46lowSizeWeightPairs\x12\x39\n\x06\x63hoice\x18\x01 \x01(\x0e\x32$.otg.FlowSizeWeightPairs.Choice.EnumH\x00\x88\x01\x01\x12\x41\n\npredefined\x18\x02 \x01(\x0e\x32(.otg.FlowSizeWeightPairs.Predefined.EnumH\x01\x88\x01\x01\x12.\n\x06\x63ustom\x18\x03 \x03(\x0b\x32\x1e.otg.FlowSizeWeightPairsCustom\x1a=\n\x06\x43hoice\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\npredefined\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1ao\n\nPredefined\"a\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04imix\x10\x01\x12\x0e\n\nipsec_imix\x10\x02\x12\r\n\tipv6_imix\x10\x03\x12\x11\n\rstandard_imix\x10\x04\x12\x0c\n\x08tcp_imix\x10\x05\x42\t\n\x07_choiceB\r\n\x0b_predefined\"W\n\x19\x46lowSizeWeightPairsCustom\x12\x11\n\x04size\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x13\n\x06weight\x18\x02 \x01(\x02H\x01\x88\x01\x01\x42\x07\n\x05_sizeB\t\n\x07_weight\"\xd8\x02\n\x08\x46lowRate\x12.\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x19.otg.FlowRate.Choice.EnumH\x00\x88\x01\x01\x12\x10\n\x03pps\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x10\n\x03\x62ps\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x11\n\x04kbps\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x11\n\x04mbps\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x11\n\x04gbps\x18\x06 \x01(\rH\x05\x88\x01\x01\x12\x17\n\npercentage\x18\x07 \x01(\x02H\x06\x88\x01\x01\x1a\x61\n\x06\x43hoice\"W\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03pps\x10\x01\x12\x07\n\x03\x62ps\x10\x02\x12\x08\n\x04kbps\x10\x03\x12\x08\n\x04mbps\x10\x04\x12\x08\n\x04gbps\x10\x05\x12\x0e\n\npercentage\x10\x06\x42\t\n\x07_choiceB\x06\n\x04_ppsB\x06\n\x04_bpsB\x07\n\x05_kbpsB\x07\n\x05_mbpsB\x07\n\x05_gbpsB\r\n\x0b_percentage\"\xd5\x02\n\x0c\x46lowDuration\x12\x32\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1d.otg.FlowDuration.Choice.EnumH\x00\x88\x01\x01\x12,\n\rfixed_packets\x18\x02 \x01(\x0b\x32\x15.otg.FlowFixedPackets\x12,\n\rfixed_seconds\x18\x03 \x01(\x0b\x32\x15.otg.FlowFixedSeconds\x12\x1d\n\x05\x62urst\x18\x04 \x01(\x0b\x32\x0e.otg.FlowBurst\x12\'\n\ncontinuous\x18\x05 \x01(\x0b\x32\x13.otg.FlowContinuous\x1a\x62\n\x06\x43hoice\"X\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rfixed_packets\x10\x01\x12\x11\n\rfixed_seconds\x10\x02\x12\t\n\x05\x62urst\x10\x03\x12\x0e\n\ncontinuous\x10\x04\x42\t\n\x07_choice\"I\n\x0e\x46lowContinuous\x12\x10\n\x03gap\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1d\n\x05\x64\x65lay\x18\x02 \x01(\x0b\x32\x0e.otg.FlowDelayB\x06\n\x04_gap\"\x8c\x02\n\tFlowDelay\x12/\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1a.otg.FlowDelay.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05\x62ytes\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12\x18\n\x0bnanoseconds\x18\x03 \x01(\x02H\x02\x88\x01\x01\x12\x19\n\x0cmicroseconds\x18\x04 \x01(\x02H\x03\x88\x01\x01\x1aO\n\x06\x43hoice\"E\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x62ytes\x10\x01\x12\x0f\n\x0bnanoseconds\x10\x02\x12\x10\n\x0cmicroseconds\x10\x03\x42\t\n\x07_choiceB\x08\n\x06_bytesB\x0e\n\x0c_nanosecondsB\x0f\n\r_microseconds\"m\n\x10\x46lowFixedPackets\x12\x14\n\x07packets\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03gap\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1d\n\x05\x64\x65lay\x18\x03 \x01(\x0b\x32\x0e.otg.FlowDelayB\n\n\x08_packetsB\x06\n\x04_gap\"m\n\x10\x46lowFixedSeconds\x12\x14\n\x07seconds\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x10\n\x03gap\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1d\n\x05\x64\x65lay\x18\x03 \x01(\x0b\x32\x0e.otg.FlowDelayB\n\n\x08_secondsB\x06\n\x04_gap\"\xa0\x01\n\tFlowBurst\x12\x13\n\x06\x62ursts\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x14\n\x07packets\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x10\n\x03gap\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x37\n\x0finter_burst_gap\x18\x04 \x01(\x0b\x32\x1e.otg.FlowDurationInterBurstGapB\t\n\x07_burstsB\n\n\x08_packetsB\x06\n\x04_gap\"\xac\x02\n\x19\x46lowDurationInterBurstGap\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.FlowDurationInterBurstGap.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05\x62ytes\x18\x02 \x01(\x01H\x01\x88\x01\x01\x12\x18\n\x0bnanoseconds\x18\x03 \x01(\x01H\x02\x88\x01\x01\x12\x19\n\x0cmicroseconds\x18\x04 \x01(\x01H\x03\x88\x01\x01\x1aO\n\x06\x43hoice\"E\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x62ytes\x10\x01\x12\x0f\n\x0bnanoseconds\x10\x02\x12\x10\n\x0cmicroseconds\x10\x03\x42\t\n\x07_choiceB\x08\n\x06_bytesB\x0e\n\x0c_nanosecondsB\x0f\n\r_microseconds\"\xfd\x01\n\x0b\x46lowMetrics\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x11\n\x04loss\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\'\n\x0brx_tx_ratio\x18\x06 \x01(\x0b\x32\x12.otg.FlowRxTxRatio\x12\x17\n\ntimestamps\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12(\n\x07latency\x18\x04 \x01(\x0b\x32\x17.otg.FlowLatencyMetrics\x12\x37\n\x16predefined_metric_tags\x18\x05 \x01(\x0b\x32\x17.otg.FlowPredefinedTagsB\t\n\x07_enableB\x07\n\x05_lossB\r\n\x0b_timestamps\"\xb8\x01\n\x12\x46lowLatencyMetrics\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x34\n\x04mode\x18\x02 \x01(\x0e\x32!.otg.FlowLatencyMetrics.Mode.EnumH\x01\x88\x01\x01\x1a\x43\n\x04Mode\";\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rstore_forward\x10\x01\x12\x0f\n\x0b\x63ut_through\x10\x02\x42\t\n\x07_enableB\x07\n\x05_mode\"6\n\x12\x46lowPredefinedTags\x12\x14\n\x07rx_name\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\n\n\x08_rx_name\"\xd6\x01\n\rFlowRxTxRatio\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.FlowRxTxRatio.Choice.EnumH\x00\x88\x01\x01\x12+\n\x08rx_count\x18\x02 \x01(\x0b\x32\x19.otg.FlowRxTxRatioRxCount\x12\x12\n\x05value\x18\x03 \x01(\x02H\x01\x88\x01\x01\x1a:\n\x06\x43hoice\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08rx_count\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x08\n\x06_value\"\x16\n\x14\x46lowRxTxRatioRxCount\"\xbf\x01\n\x05\x45vent\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x04link\x18\x02 \x01(\x0b\x32\x0e.otg.EventLink\x12\x34\n\x11rx_rate_threshold\x18\x03 \x01(\x0b\x32\x19.otg.EventRxRateThreshold\x12\x42\n\x18route_advertise_withdraw\x18\x04 \x01(\x0b\x32 .otg.EventRouteAdvertiseWithdrawB\t\n\x07_enable\"\\\n\x14\x45ventRxRateThreshold\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x16\n\tthreshold\x18\x02 \x01(\x02H\x01\x88\x01\x01\x42\t\n\x07_enableB\x0c\n\n_threshold\"+\n\tEventLink\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\t\n\x07_enable\"=\n\x1b\x45ventRouteAdvertiseWithdraw\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\t\n\x07_enable\"\xf5\x01\n\x0c\x45ventRequest\x12)\n\x04type\x18\x01 \x03(\x0e\x32\x1b.otg.EventRequest.Type.Enum\x12\x0e\n\x06source\x18\x02 \x03(\t\x1a\xa9\x01\n\x04Type\"\xa0\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tlink_down\x10\x01\x12\x0b\n\x07link_up\x10\x02\x12\x12\n\x0eroute_withdraw\x10\x03\x12\x13\n\x0froute_advertise\x10\x04\x12 \n\x1c\x66low_rx_rate_above_threshold\x10\x05\x12 \n\x1c\x66low_rx_rate_below_threshold\x10\x06\"b\n\x11\x45ventSubscription\x12!\n\x06\x65vents\x18\x01 \x01(\x0b\x32\x11.otg.EventRequest\x12\x19\n\x0c\x63\x61llback_url\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_callback_url\"\xa5\x02\n\x04Lldp\x12\'\n\nconnection\x18\x01 \x01(\x0b\x32\x13.otg.LldpConnection\x12&\n\nchassis_id\x18\x02 \x01(\x0b\x32\x12.otg.LldpChassisId\x12 \n\x07port_id\x18\x03 \x01(\x0b\x32\x0f.otg.LldpPortId\x12(\n\x0bsystem_name\x18\x04 \x01(\x0b\x32\x13.otg.LldpSystemName\x12\x16\n\thold_time\x18\x05 \x01(\rH\x00\x88\x01\x01\x12#\n\x16\x61\x64vertisement_interval\x18\x06 \x01(\rH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x07 \x01(\tH\x02\x88\x01\x01\x42\x0c\n\n_hold_timeB\x19\n\x17_advertisement_intervalB\x07\n\x05_name\"\xa9\x01\n\x0eLldpConnection\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.LldpConnection.Choice.EnumH\x00\x88\x01\x01\x12\x16\n\tport_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x1a\x30\n\x06\x43hoice\"&\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tport_name\x10\x01\x42\t\n\x07_choiceB\x0c\n\n_port_name\"\xe1\x02\n\rLldpChassisId\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.LldpChassisId.Choice.EnumH\x00\x88\x01\x01\x12\x37\n\x13mac_address_subtype\x18\x02 \x01(\x0b\x32\x1a.otg.LldpChassisMacSubType\x12#\n\x16interface_name_subtype\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\rlocal_subtype\x18\x04 \x01(\tH\x02\x88\x01\x01\x1ai\n\x06\x43hoice\"_\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x17\n\x13mac_address_subtype\x10\x01\x12\x1a\n\x16interface_name_subtype\x10\x02\x12\x11\n\rlocal_subtype\x10\x03\x42\t\n\x07_choiceB\x19\n\x17_interface_name_subtypeB\x10\n\x0e_local_subtype\"\xdf\x02\n\nLldpPortId\x12\x30\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1b.otg.LldpPortId.Choice.EnumH\x00\x88\x01\x01\x12 \n\x13mac_address_subtype\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x41\n\x16interface_name_subtype\x18\x03 \x01(\x0b\x32!.otg.LldpPortInterfaceNameSubType\x12\x1a\n\rlocal_subtype\x18\x04 \x01(\tH\x02\x88\x01\x01\x1ai\n\x06\x43hoice\"_\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x17\n\x13mac_address_subtype\x10\x01\x12\x1a\n\x16interface_name_subtype\x10\x02\x12\x11\n\rlocal_subtype\x10\x03\x42\t\n\x07_choiceB\x16\n\x14_mac_address_subtypeB\x10\n\x0e_local_subtype\"\xd1\x01\n\x15LldpChassisMacSubType\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.LldpChassisMacSubType.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xdf\x01\n\x1cLldpPortInterfaceNameSubType\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.LldpPortInterfaceNameSubType.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xc3\x01\n\x0eLldpSystemName\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.LldpSystemName.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xa4\x01\n\x05\x45rror\x12\x11\n\x04\x63ode\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\'\n\x04kind\x18\x02 \x01(\x0e\x32\x14.otg.Error.Kind.EnumH\x01\x88\x01\x01\x12\x0e\n\x06\x65rrors\x18\x03 \x03(\t\x1a=\n\x04Kind\"5\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\nvalidation\x10\x01\x12\x0c\n\x08internal\x10\x02\x42\x07\n\x05_codeB\x07\n\x05_kind\"\x1b\n\x07Warning\x12\x10\n\x08warnings\x18\x01 \x03(\t\"\x9c\x01\n\x0c\x43onfigUpdate\x12\x32\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1d.otg.ConfigUpdate.Choice.EnumH\x00\x88\x01\x01\x12\x1f\n\x05\x66lows\x18\x02 \x01(\x0b\x32\x10.otg.FlowsUpdate\x1a,\n\x06\x43hoice\"\"\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x66lows\x10\x01\x42\t\n\x07_choice\"\xa2\x01\n\x0b\x46lowsUpdate\x12;\n\x0eproperty_names\x18\x01 \x03(\x0e\x32#.otg.FlowsUpdate.PropertyNames.Enum\x12\x18\n\x05\x66lows\x18\x02 \x03(\x0b\x32\t.otg.Flow\x1a<\n\rPropertyNames\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04rate\x10\x01\x12\x08\n\x04size\x10\x02\"\xfd\x01\n\x0c\x43ontrolState\x12\x32\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1d.otg.ControlState.Choice.EnumH\x00\x88\x01\x01\x12\x1c\n\x04port\x18\x02 \x01(\x0b\x32\x0e.otg.StatePort\x12$\n\x08protocol\x18\x03 \x01(\x0b\x32\x12.otg.StateProtocol\x12\"\n\x07traffic\x18\x04 \x01(\x0b\x32\x11.otg.StateTraffic\x1a\x46\n\x06\x43hoice\"<\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04port\x10\x01\x12\x0c\n\x08protocol\x10\x02\x12\x0b\n\x07traffic\x10\x03\x42\t\n\x07_choice\"\xcb\x01\n\tStatePort\x12/\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1a.otg.StatePort.Choice.EnumH\x00\x88\x01\x01\x12 \n\x04link\x18\x02 \x01(\x0b\x32\x12.otg.StatePortLink\x12&\n\x07\x63\x61pture\x18\x03 \x01(\x0b\x32\x15.otg.StatePortCapture\x1a\x38\n\x06\x43hoice\".\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04link\x10\x01\x12\x0b\n\x07\x63\x61pture\x10\x02\x42\t\n\x07_choice\"\xb9\x01\n\x0cStateTraffic\x12\x32\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1d.otg.StateTraffic.Choice.EnumH\x00\x88\x01\x01\x12\x34\n\rflow_transmit\x18\x02 \x01(\x0b\x32\x1d.otg.StateTrafficFlowTransmit\x1a\x34\n\x06\x43hoice\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rflow_transmit\x10\x01\x42\t\n\x07_choice\"\xdf\x02\n\rStateProtocol\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.StateProtocol.Choice.EnumH\x00\x88\x01\x01\x12\"\n\x03\x61ll\x18\x02 \x01(\x0b\x32\x15.otg.StateProtocolAll\x12&\n\x05route\x18\x03 \x01(\x0b\x32\x17.otg.StateProtocolRoute\x12$\n\x04lacp\x18\x04 \x01(\x0b\x32\x16.otg.StateProtocolLacp\x12\"\n\x03\x62gp\x18\x05 \x01(\x0b\x32\x15.otg.StateProtocolBgp\x12$\n\x04isis\x18\x06 \x01(\x0b\x32\x16.otg.StateProtocolIsis\x1aR\n\x06\x43hoice\"H\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03\x61ll\x10\x01\x12\t\n\x05route\x10\x02\x12\x08\n\x04lacp\x10\x03\x12\x07\n\x03\x62gp\x10\x04\x12\x08\n\x04isis\x10\x05\x42\t\n\x07_choice\"\x94\x01\n\rStatePortLink\x12\x12\n\nport_names\x18\x01 \x03(\t\x12\x31\n\x05state\x18\x02 \x01(\x0e\x32\x1d.otg.StatePortLink.State.EnumH\x00\x88\x01\x01\x1a\x32\n\x05State\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x08\n\x06_state\"\x9d\x01\n\x10StatePortCapture\x12\x12\n\nport_names\x18\x01 \x03(\t\x12\x34\n\x05state\x18\x02 \x01(\x0e\x32 .otg.StatePortCapture.State.EnumH\x00\x88\x01\x01\x1a\x35\n\x05State\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05start\x10\x01\x12\x08\n\x04stop\x10\x02\x42\x08\n\x06_state\"\xc4\x01\n\x18StateTrafficFlowTransmit\x12\x12\n\nflow_names\x18\x01 \x03(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32(.otg.StateTrafficFlowTransmit.State.EnumH\x00\x88\x01\x01\x1aL\n\x05State\"C\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05start\x10\x01\x12\x08\n\x04stop\x10\x02\x12\t\n\x05pause\x10\x03\x12\n\n\x06resume\x10\x04\x42\x08\n\x06_state\"\x89\x01\n\x10StateProtocolAll\x12\x34\n\x05state\x18\x01 \x01(\x0e\x32 .otg.StateProtocolAll.State.EnumH\x00\x88\x01\x01\x1a\x35\n\x05State\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05start\x10\x01\x12\x08\n\x04stop\x10\x02\x42\x08\n\x06_state\"\xa4\x01\n\x12StateProtocolRoute\x12\r\n\x05names\x18\x01 \x03(\t\x12\x36\n\x05state\x18\x02 \x01(\x0e\x32\".otg.StateProtocolRoute.State.EnumH\x00\x88\x01\x01\x1a=\n\x05State\"4\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08withdraw\x10\x01\x12\r\n\tadvertise\x10\x02\x42\x08\n\x06_state\"\xfc\x01\n\x11StateProtocolLacp\x12\x37\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\".otg.StateProtocolLacp.Choice.EnumH\x00\x88\x01\x01\x12*\n\x05\x61\x64min\x18\x02 \x01(\x0b\x32\x1b.otg.StateProtocolLacpAdmin\x12\x37\n\x0cmember_ports\x18\x03 \x01(\x0b\x32!.otg.StateProtocolLacpMemberPorts\x1a>\n\x06\x43hoice\"4\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x61\x64min\x10\x01\x12\x10\n\x0cmember_ports\x10\x02\x42\t\n\x07_choice\"\xac\x01\n\x16StateProtocolLacpAdmin\x12\x18\n\x10lag_member_names\x18\x01 \x03(\t\x12:\n\x05state\x18\x02 \x01(\x0e\x32&.otg.StateProtocolLacpAdmin.State.EnumH\x00\x88\x01\x01\x1a\x32\n\x05State\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x08\n\x06_state\"\xb8\x01\n\x1cStateProtocolLacpMemberPorts\x12\x18\n\x10lag_member_names\x18\x01 \x03(\t\x12@\n\x05state\x18\x02 \x01(\x0e\x32,.otg.StateProtocolLacpMemberPorts.State.EnumH\x00\x88\x01\x01\x1a\x32\n\x05State\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x08\n\x06_state\"\xae\x01\n\x10StateProtocolBgp\x12\x36\n\x06\x63hoice\x18\x01 \x01(\x0e\x32!.otg.StateProtocolBgp.Choice.EnumH\x00\x88\x01\x01\x12)\n\x05peers\x18\x02 \x01(\x0b\x32\x1a.otg.StateProtocolBgpPeers\x1a,\n\x06\x43hoice\"\"\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05peers\x10\x01\x42\t\n\x07_choice\"\xa4\x01\n\x15StateProtocolBgpPeers\x12\x12\n\npeer_names\x18\x01 \x03(\t\x12\x39\n\x05state\x18\x02 \x01(\x0e\x32%.otg.StateProtocolBgpPeers.State.EnumH\x00\x88\x01\x01\x1a\x32\n\x05State\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x08\n\x06_state\"\xb7\x01\n\x11StateProtocolIsis\x12\x37\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\".otg.StateProtocolIsis.Choice.EnumH\x00\x88\x01\x01\x12.\n\x07routers\x18\x02 \x01(\x0b\x32\x1d.otg.StateProtocolIsisRouters\x1a.\n\x06\x43hoice\"$\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07routers\x10\x01\x42\t\n\x07_choice\"\xac\x01\n\x18StateProtocolIsisRouters\x12\x14\n\x0crouter_names\x18\x01 \x03(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32(.otg.StateProtocolIsisRouters.State.EnumH\x00\x88\x01\x01\x1a\x32\n\x05State\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x08\n\x06_state\"\xa7\x01\n\rControlAction\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.ControlAction.Choice.EnumH\x00\x88\x01\x01\x12%\n\x08protocol\x18\x02 \x01(\x0b\x32\x13.otg.ActionProtocol\x1a/\n\x06\x43hoice\"%\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08protocol\x10\x01\x42\t\n\x07_choice\"P\n\x15\x43ontrolActionResponse\x12\x10\n\x08warnings\x18\x01 \x03(\t\x12%\n\x08response\x18\x02 \x01(\x0b\x32\x13.otg.ActionResponse\"\xb1\x01\n\x0e\x41\x63tionResponse\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.ActionResponse.Choice.EnumH\x00\x88\x01\x01\x12-\n\x08protocol\x18\x02 \x01(\x0b\x32\x1b.otg.ActionResponseProtocol\x1a/\n\x06\x43hoice\"%\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08protocol\x10\x01\x42\t\n\x07_choice\"\x84\x02\n\x0e\x41\x63tionProtocol\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.ActionProtocol.Choice.EnumH\x00\x88\x01\x01\x12%\n\x04ipv4\x18\x02 \x01(\x0b\x32\x17.otg.ActionProtocolIpv4\x12%\n\x04ipv6\x18\x03 \x01(\x0b\x32\x17.otg.ActionProtocolIpv6\x12#\n\x03\x62gp\x18\x04 \x01(\x0b\x32\x16.otg.ActionProtocolBgp\x1a>\n\x06\x43hoice\"4\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x12\x07\n\x03\x62gp\x10\x03\x42\t\n\x07_choice\"\xf6\x01\n\x16\x41\x63tionResponseProtocol\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.ActionResponseProtocol.Choice.EnumH\x00\x88\x01\x01\x12-\n\x04ipv4\x18\x02 \x01(\x0b\x32\x1f.otg.ActionResponseProtocolIpv4\x12-\n\x04ipv6\x18\x03 \x01(\x0b\x32\x1f.otg.ActionResponseProtocolIpv6\x1a\x35\n\x06\x43hoice\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x42\t\n\x07_choice\"\xb1\x01\n\x12\x41\x63tionProtocolIpv4\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.ActionProtocolIpv4.Choice.EnumH\x00\x88\x01\x01\x12)\n\x04ping\x18\x02 \x01(\x0b\x32\x1b.otg.ActionProtocolIpv4Ping\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ping\x10\x01\x42\t\n\x07_choice\"\xc9\x01\n\x1a\x41\x63tionResponseProtocolIpv4\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.ActionResponseProtocolIpv4.Choice.EnumH\x00\x88\x01\x01\x12\x31\n\x04ping\x18\x02 \x01(\x0b\x32#.otg.ActionResponseProtocolIpv4Ping\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ping\x10\x01\x42\t\n\x07_choice\"N\n\x16\x41\x63tionProtocolIpv4Ping\x12\x34\n\x08requests\x18\x01 \x03(\x0b\x32\".otg.ActionProtocolIpv4PingRequest\"c\n\x1d\x41\x63tionProtocolIpv4PingRequest\x12\x15\n\x08src_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x64st_ip\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_src_nameB\t\n\x07_dst_ip\"`\n\x1e\x41\x63tionResponseProtocolIpv4Ping\x12>\n\tresponses\x18\x01 \x03(\x0b\x32+.otg.ActionResponseProtocolIpv4PingResponse\"\x83\x02\n&ActionResponseProtocolIpv4PingResponse\x12\x15\n\x08src_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x64st_ip\x18\x02 \x01(\tH\x01\x88\x01\x01\x12L\n\x06result\x18\x03 \x01(\x0e\x32\x37.otg.ActionResponseProtocolIpv4PingResponse.Result.EnumH\x02\x88\x01\x01\x1a<\n\x06Result\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tsucceeded\x10\x01\x12\n\n\x06\x66\x61iled\x10\x02\x42\x0b\n\t_src_nameB\t\n\x07_dst_ipB\t\n\x07_result\"\xb1\x01\n\x12\x41\x63tionProtocolIpv6\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.ActionProtocolIpv6.Choice.EnumH\x00\x88\x01\x01\x12)\n\x04ping\x18\x02 \x01(\x0b\x32\x1b.otg.ActionProtocolIpv6Ping\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ping\x10\x01\x42\t\n\x07_choice\"\xc9\x01\n\x1a\x41\x63tionResponseProtocolIpv6\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.ActionResponseProtocolIpv6.Choice.EnumH\x00\x88\x01\x01\x12\x31\n\x04ping\x18\x02 \x01(\x0b\x32#.otg.ActionResponseProtocolIpv6Ping\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ping\x10\x01\x42\t\n\x07_choice\"N\n\x16\x41\x63tionProtocolIpv6Ping\x12\x34\n\x08requests\x18\x01 \x03(\x0b\x32\".otg.ActionProtocolIpv6PingRequest\"c\n\x1d\x41\x63tionProtocolIpv6PingRequest\x12\x15\n\x08src_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x64st_ip\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_src_nameB\t\n\x07_dst_ip\"`\n\x1e\x41\x63tionResponseProtocolIpv6Ping\x12>\n\tresponses\x18\x01 \x03(\x0b\x32+.otg.ActionResponseProtocolIpv6PingResponse\"\x83\x02\n&ActionResponseProtocolIpv6PingResponse\x12\x15\n\x08src_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x64st_ip\x18\x02 \x01(\tH\x01\x88\x01\x01\x12L\n\x06result\x18\x03 \x01(\x0e\x32\x37.otg.ActionResponseProtocolIpv6PingResponse.Result.EnumH\x02\x88\x01\x01\x1a<\n\x06Result\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tsucceeded\x10\x01\x12\n\n\x06\x66\x61iled\x10\x02\x42\x0b\n\t_src_nameB\t\n\x07_dst_ipB\t\n\x07_result\"\xb7\x02\n\x11\x41\x63tionProtocolBgp\x12\x37\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\".otg.ActionProtocolBgp.Choice.EnumH\x00\x88\x01\x01\x12\x38\n\x0cnotification\x18\x02 \x01(\x0b\x32\".otg.ActionProtocolBgpNotification\x12P\n\x19initiate_graceful_restart\x18\x03 \x01(\x0b\x32-.otg.ActionProtocolBgpInitiateGracefulRestart\x1aR\n\x06\x43hoice\"H\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0cnotification\x10\x01\x12\x1d\n\x19initiate_graceful_restart\x10\x02\x42\t\n\x07_choice\"\xd5\x05\n\x1d\x41\x63tionProtocolBgpNotification\x12\r\n\x05names\x18\x01 \x03(\t\x12\x43\n\x06\x63hoice\x18\x02 \x01(\x0e\x32..otg.ActionProtocolBgpNotification.Choice.EnumH\x00\x88\x01\x01\x12\'\n\x05\x63\x65\x61se\x18\x03 \x01(\x0b\x32\x18.otg.DeviceBgpCeaseError\x12>\n\x14message_header_error\x18\x04 \x01(\x0b\x32 .otg.DeviceBgpMessageHeaderError\x12:\n\x12open_message_error\x18\x05 \x01(\x0b\x32\x1e.otg.DeviceBgpOpenMessageError\x12>\n\x14update_message_error\x18\x06 \x01(\x0b\x32 .otg.DeviceBgpUpdateMessageError\x12:\n\x12hold_timer_expired\x18\x07 \x01(\x0b\x32\x1e.otg.DeviceBgpHoldTimerExpired\x12I\n\x1a\x66inite_state_machine_error\x18\x08 \x01(\x0b\x32%.otg.DeviceBgpFiniteStateMachineError\x12)\n\x06\x63ustom\x18\t \x01(\x0b\x32\x19.otg.DeviceBgpCustomError\x1a\xbd\x01\n\x06\x43hoice\"\xb2\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x63\x65\x61se\x10\x01\x12\x18\n\x14message_header_error\x10\x02\x12\x16\n\x12open_message_error\x10\x03\x12\x18\n\x14update_message_error\x10\x04\x12\x16\n\x12hold_timer_expired\x10\x05\x12\x1e\n\x1a\x66inite_state_machine_error\x10\x06\x12\n\n\x06\x63ustom\x10\x07\x42\t\n\x07_choice\"l\n(ActionProtocolBgpInitiateGracefulRestart\x12\x12\n\npeer_names\x18\x01 \x03(\t\x12\x1a\n\rrestart_delay\x18\x02 \x01(\rH\x00\x88\x01\x01\x42\x10\n\x0e_restart_delay\"\xb0\x04\n\x0eMetricsRequest\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.MetricsRequest.Choice.EnumH\x00\x88\x01\x01\x12%\n\x04port\x18\x02 \x01(\x0b\x32\x17.otg.PortMetricsRequest\x12%\n\x04\x66low\x18\x03 \x01(\x0b\x32\x17.otg.FlowMetricsRequest\x12\'\n\x05\x62gpv4\x18\x04 \x01(\x0b\x32\x18.otg.Bgpv4MetricsRequest\x12\'\n\x05\x62gpv6\x18\x05 \x01(\x0b\x32\x18.otg.Bgpv6MetricsRequest\x12%\n\x04isis\x18\x06 \x01(\x0b\x32\x17.otg.IsisMetricsRequest\x12#\n\x03lag\x18\x07 \x01(\x0b\x32\x16.otg.LagMetricsRequest\x12%\n\x04lacp\x18\x08 \x01(\x0b\x32\x17.otg.LacpMetricsRequest\x12%\n\x04lldp\x18\t \x01(\x0b\x32\x17.otg.LldpMetricsRequest\x12%\n\x04rsvp\x18\n \x01(\x0b\x32\x17.otg.RsvpMetricsRequest\x1a|\n\x06\x43hoice\"r\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04port\x10\x01\x12\x08\n\x04\x66low\x10\x02\x12\t\n\x05\x62gpv4\x10\x03\x12\t\n\x05\x62gpv6\x10\x04\x12\x08\n\x04isis\x10\x05\x12\x07\n\x03lag\x10\x06\x12\x08\n\x04lacp\x10\x07\x12\x08\n\x04lldp\x10\x08\x12\x08\n\x04rsvp\x10\tB\t\n\x07_choice\"\xfc\x04\n\x0fMetricsResponse\x12\x35\n\x06\x63hoice\x18\x01 \x01(\x0e\x32 .otg.MetricsResponse.Choice.EnumH\x00\x88\x01\x01\x12%\n\x0cport_metrics\x18\x02 \x03(\x0b\x32\x0f.otg.PortMetric\x12%\n\x0c\x66low_metrics\x18\x03 \x03(\x0b\x32\x0f.otg.FlowMetric\x12\'\n\rbgpv4_metrics\x18\x04 \x03(\x0b\x32\x10.otg.Bgpv4Metric\x12\'\n\rbgpv6_metrics\x18\x05 \x03(\x0b\x32\x10.otg.Bgpv6Metric\x12%\n\x0cisis_metrics\x18\x06 \x03(\x0b\x32\x0f.otg.IsisMetric\x12#\n\x0blag_metrics\x18\x07 \x03(\x0b\x32\x0e.otg.LagMetric\x12%\n\x0clacp_metrics\x18\x08 \x03(\x0b\x32\x0f.otg.LacpMetric\x12%\n\x0clldp_metrics\x18\t \x03(\x0b\x32\x0f.otg.LldpMetric\x12%\n\x0crsvp_metrics\x18\n \x03(\x0b\x32\x0f.otg.RsvpMetric\x1a\xc5\x01\n\x06\x43hoice\"\xba\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0c\x66low_metrics\x10\x01\x12\x10\n\x0cport_metrics\x10\x02\x12\x11\n\rbgpv4_metrics\x10\x03\x12\x11\n\rbgpv6_metrics\x10\x04\x12\x10\n\x0cisis_metrics\x10\x05\x12\x0f\n\x0blag_metrics\x10\x06\x12\x10\n\x0clacp_metrics\x10\x07\x12\x10\n\x0clldp_metrics\x10\x08\x12\x10\n\x0crsvp_metrics\x10\tB\t\n\x07_choice\"\xcd\x02\n\x12PortMetricsRequest\x12\x12\n\nport_names\x18\x01 \x03(\t\x12>\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32(.otg.PortMetricsRequest.ColumnNames.Enum\x1a\xe2\x01\n\x0b\x43olumnNames\"\xd2\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08transmit\x10\x01\x12\x0c\n\x08location\x10\x02\x12\x08\n\x04link\x10\x03\x12\x0b\n\x07\x63\x61pture\x10\x04\x12\r\n\tframes_tx\x10\x05\x12\r\n\tframes_rx\x10\x06\x12\x0c\n\x08\x62ytes_tx\x10\x07\x12\x0c\n\x08\x62ytes_rx\x10\x08\x12\x12\n\x0e\x66rames_tx_rate\x10\t\x12\x12\n\x0e\x66rames_rx_rate\x10\n\x12\x11\n\rbytes_tx_rate\x10\x0b\x12\x11\n\rbytes_rx_rate\x10\x0c\"\x86\x06\n\nPortMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08location\x18\x02 \x01(\tH\x01\x88\x01\x01\x12,\n\x04link\x18\x03 \x01(\x0e\x32\x19.otg.PortMetric.Link.EnumH\x02\x88\x01\x01\x12\x32\n\x07\x63\x61pture\x18\x04 \x01(\x0e\x32\x1c.otg.PortMetric.Capture.EnumH\x03\x88\x01\x01\x12\x16\n\tframes_tx\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x16\n\tframes_rx\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x15\n\x08\x62ytes_tx\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x15\n\x08\x62ytes_rx\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x1b\n\x0e\x66rames_tx_rate\x18\t \x01(\x02H\x08\x88\x01\x01\x12\x1b\n\x0e\x66rames_rx_rate\x18\n \x01(\x02H\t\x88\x01\x01\x12\x1a\n\rbytes_tx_rate\x18\x0b \x01(\x02H\n\x88\x01\x01\x12\x1a\n\rbytes_rx_rate\x18\x0c \x01(\x02H\x0b\x88\x01\x01\x12\x34\n\x08transmit\x18\r \x01(\x0e\x32\x1d.otg.PortMetric.Transmit.EnumH\x0c\x88\x01\x01\x1a\x31\n\x04Link\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x1a<\n\x07\x43\x61pture\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07started\x10\x01\x12\x0b\n\x07stopped\x10\x02\x1a=\n\x08Transmit\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07started\x10\x01\x12\x0b\n\x07stopped\x10\x02\x42\x07\n\x05_nameB\x0b\n\t_locationB\x07\n\x05_linkB\n\n\x08_captureB\x0c\n\n_frames_txB\x0c\n\n_frames_rxB\x0b\n\t_bytes_txB\x0b\n\t_bytes_rxB\x11\n\x0f_frames_tx_rateB\x11\n\x0f_frames_rx_rateB\x10\n\x0e_bytes_tx_rateB\x10\n\x0e_bytes_rx_rateB\x0b\n\t_transmit\"\xb8\x02\n\x12\x46lowMetricsRequest\x12\x12\n\nflow_names\x18\x01 \x03(\t\x12>\n\x0cmetric_names\x18\x03 \x03(\x0e\x32(.otg.FlowMetricsRequest.MetricNames.Enum\x12\x34\n\x0etagged_metrics\x18\x04 \x01(\x0b\x32\x1c.otg.FlowTaggedMetricsFilter\x1a\x97\x01\n\x0bMetricNames\"\x87\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08transmit\x10\x01\x12\r\n\tframes_tx\x10\x02\x12\r\n\tframes_rx\x10\x03\x12\x0c\n\x08\x62ytes_tx\x10\x04\x12\x0c\n\x08\x62ytes_rx\x10\x05\x12\x12\n\x0e\x66rames_tx_rate\x10\x06\x12\x12\n\x0e\x66rames_rx_rate\x10\x07\"\xf4\x02\n\x17\x46lowTaggedMetricsFilter\x12\x14\n\x07include\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x15include_empty_metrics\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x43\n\x0cmetric_names\x18\x03 \x03(\x0e\x32-.otg.FlowTaggedMetricsFilter.MetricNames.Enum\x12)\n\x07\x66ilters\x18\x04 \x03(\x0b\x32\x18.otg.FlowMetricTagFilter\x1a\x88\x01\n\x0bMetricNames\"y\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tframes_tx\x10\x01\x12\r\n\tframes_rx\x10\x02\x12\x0c\n\x08\x62ytes_tx\x10\x03\x12\x0c\n\x08\x62ytes_rx\x10\x04\x12\x12\n\x0e\x66rames_tx_rate\x10\x05\x12\x12\n\x0e\x66rames_rx_rate\x10\x06\x42\n\n\x08_includeB\x18\n\x16_include_empty_metrics\"A\n\x13\x46lowMetricTagFilter\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0e\n\x06values\x18\x02 \x03(\tB\x07\n\x05_name\"\x88\x05\n\nFlowMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07port_tx\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07port_rx\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x34\n\x08transmit\x18\x05 \x01(\x0e\x32\x1d.otg.FlowMetric.Transmit.EnumH\x03\x88\x01\x01\x12\x16\n\tframes_tx\x18\x06 \x01(\x04H\x04\x88\x01\x01\x12\x16\n\tframes_rx\x18\x07 \x01(\x04H\x05\x88\x01\x01\x12\x15\n\x08\x62ytes_tx\x18\x08 \x01(\x04H\x06\x88\x01\x01\x12\x15\n\x08\x62ytes_rx\x18\t \x01(\x04H\x07\x88\x01\x01\x12\x1b\n\x0e\x66rames_tx_rate\x18\n \x01(\x02H\x08\x88\x01\x01\x12\x1b\n\x0e\x66rames_rx_rate\x18\x0b \x01(\x02H\t\x88\x01\x01\x12\x11\n\x04loss\x18\x0c \x01(\x02H\n\x88\x01\x01\x12(\n\ntimestamps\x18\r \x01(\x0b\x32\x14.otg.MetricTimestamp\x12#\n\x07latency\x18\x0e \x01(\x0b\x32\x12.otg.MetricLatency\x12-\n\x0etagged_metrics\x18\x0f \x03(\x0b\x32\x15.otg.FlowTaggedMetric\x1aI\n\x08Transmit\"=\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07started\x10\x01\x12\x0b\n\x07stopped\x10\x02\x12\n\n\x06paused\x10\x03\x42\x07\n\x05_nameB\n\n\x08_port_txB\n\n\x08_port_rxB\x0b\n\t_transmitB\x0c\n\n_frames_txB\x0c\n\n_frames_rxB\x0b\n\t_bytes_txB\x0b\n\t_bytes_rxB\x11\n\x0f_frames_tx_rateB\x11\n\x0f_frames_rx_rateB\x07\n\x05_loss\"\x93\x03\n\x10\x46lowTaggedMetric\x12 \n\x04tags\x18\x01 \x03(\x0b\x32\x12.otg.FlowMetricTag\x12\x16\n\tframes_tx\x18\x02 \x01(\x04H\x00\x88\x01\x01\x12\x16\n\tframes_rx\x18\x03 \x01(\x04H\x01\x88\x01\x01\x12\x15\n\x08\x62ytes_tx\x18\x04 \x01(\x04H\x02\x88\x01\x01\x12\x15\n\x08\x62ytes_rx\x18\x05 \x01(\x04H\x03\x88\x01\x01\x12\x1b\n\x0e\x66rames_tx_rate\x18\x06 \x01(\x02H\x04\x88\x01\x01\x12\x1b\n\x0e\x66rames_rx_rate\x18\x07 \x01(\x02H\x05\x88\x01\x01\x12\x11\n\x04loss\x18\x08 \x01(\x02H\x06\x88\x01\x01\x12(\n\ntimestamps\x18\t \x01(\x0b\x32\x14.otg.MetricTimestamp\x12#\n\x07latency\x18\n \x01(\x0b\x32\x12.otg.MetricLatencyB\x0c\n\n_frames_txB\x0c\n\n_frames_rxB\x0b\n\t_bytes_txB\x0b\n\t_bytes_rxB\x11\n\x0f_frames_tx_rateB\x11\n\x0f_frames_rx_rateB\x07\n\x05_loss\"S\n\rFlowMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.otg.FlowMetricTagValueB\x07\n\x05_name\"\xc2\x01\n\x12\x46lowMetricTagValue\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.FlowMetricTagValue.Choice.EnumH\x00\x88\x01\x01\x12\x10\n\x03hex\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x03str\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x33\n\x06\x43hoice\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03hex\x10\x01\x12\x07\n\x03str\x10\x02\x42\t\n\x07_choiceB\x06\n\x04_hexB\x06\n\x04_str\"\x7f\n\x0fMetricTimestamp\x12\x1f\n\x12\x66irst_timestamp_ns\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12\x1e\n\x11last_timestamp_ns\x18\x02 \x01(\x01H\x01\x88\x01\x01\x42\x15\n\x13_first_timestamp_nsB\x14\n\x12_last_timestamp_ns\"\x87\x01\n\rMetricLatency\x12\x17\n\nminimum_ns\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12\x17\n\nmaximum_ns\x18\x02 \x01(\x01H\x01\x88\x01\x01\x12\x17\n\naverage_ns\x18\x03 \x01(\x01H\x02\x88\x01\x01\x42\r\n\x0b_minimum_nsB\r\n\x0b_maximum_nsB\r\n\x0b_average_ns\"\xf9\x03\n\x13\x42gpv4MetricsRequest\x12\x12\n\npeer_names\x18\x01 \x03(\t\x12?\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32).otg.Bgpv4MetricsRequest.ColumnNames.Enum\x1a\x8c\x03\n\x0b\x43olumnNames\"\xfc\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rsession_state\x10\x01\x12\x16\n\x12session_flap_count\x10\x02\x12\x15\n\x11routes_advertised\x10\x03\x12\x13\n\x0froutes_received\x10\x04\x12\x18\n\x14route_withdraws_sent\x10\x05\x12\x1c\n\x18route_withdraws_received\x10\x06\x12\x10\n\x0cupdates_sent\x10\x07\x12\x14\n\x10updates_received\x10\x08\x12\x0e\n\nopens_sent\x10\t\x12\x12\n\x0eopens_received\x10\n\x12\x13\n\x0fkeepalives_sent\x10\x0b\x12\x17\n\x13keepalives_received\x10\x0c\x12\x16\n\x12notifications_sent\x10\r\x12\x1a\n\x16notifications_received\x10\x0e\x12\r\n\tfsm_state\x10\x0f\x12\x17\n\x13\x65nd_of_rib_received\x10\x10\"\xea\x08\n\x0b\x42gpv4Metric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12>\n\rsession_state\x18\x02 \x01(\x0e\x32\".otg.Bgpv4Metric.SessionState.EnumH\x01\x88\x01\x01\x12\x1f\n\x12session_flap_count\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x1e\n\x11routes_advertised\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1c\n\x0froutes_received\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12!\n\x14route_withdraws_sent\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12%\n\x18route_withdraws_received\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x19\n\x0cupdates_sent\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x1d\n\x10updates_received\x18\t \x01(\x04H\x08\x88\x01\x01\x12\x17\n\nopens_sent\x18\n \x01(\x04H\t\x88\x01\x01\x12\x1b\n\x0eopens_received\x18\x0b \x01(\x04H\n\x88\x01\x01\x12\x1c\n\x0fkeepalives_sent\x18\x0c \x01(\x04H\x0b\x88\x01\x01\x12 \n\x13keepalives_received\x18\r \x01(\x04H\x0c\x88\x01\x01\x12\x1f\n\x12notifications_sent\x18\x0e \x01(\x04H\r\x88\x01\x01\x12#\n\x16notifications_received\x18\x0f \x01(\x04H\x0e\x88\x01\x01\x12\x36\n\tfsm_state\x18\x10 \x01(\x0e\x32\x1e.otg.Bgpv4Metric.FsmState.EnumH\x0f\x88\x01\x01\x12 \n\x13\x65nd_of_rib_received\x18\x11 \x01(\x04H\x10\x88\x01\x01\x1a\x39\n\x0cSessionState\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x1av\n\x08\x46smState\"j\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04idle\x10\x01\x12\x0b\n\x07\x63onnect\x10\x02\x12\n\n\x06\x61\x63tive\x10\x03\x12\x0c\n\x08opensent\x10\x04\x12\x0f\n\x0bopenconfirm\x10\x05\x12\x0f\n\x0b\x65stablished\x10\x06\x42\x07\n\x05_nameB\x10\n\x0e_session_stateB\x15\n\x13_session_flap_countB\x14\n\x12_routes_advertisedB\x12\n\x10_routes_receivedB\x17\n\x15_route_withdraws_sentB\x1b\n\x19_route_withdraws_receivedB\x0f\n\r_updates_sentB\x13\n\x11_updates_receivedB\r\n\x0b_opens_sentB\x11\n\x0f_opens_receivedB\x12\n\x10_keepalives_sentB\x16\n\x14_keepalives_receivedB\x15\n\x13_notifications_sentB\x19\n\x17_notifications_receivedB\x0c\n\n_fsm_stateB\x16\n\x14_end_of_rib_received\"\xf9\x03\n\x13\x42gpv6MetricsRequest\x12\x12\n\npeer_names\x18\x01 \x03(\t\x12?\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32).otg.Bgpv6MetricsRequest.ColumnNames.Enum\x1a\x8c\x03\n\x0b\x43olumnNames\"\xfc\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rsession_state\x10\x01\x12\x16\n\x12session_flap_count\x10\x02\x12\x15\n\x11routes_advertised\x10\x03\x12\x13\n\x0froutes_received\x10\x04\x12\x18\n\x14route_withdraws_sent\x10\x05\x12\x1c\n\x18route_withdraws_received\x10\x06\x12\x10\n\x0cupdates_sent\x10\x07\x12\x14\n\x10updates_received\x10\x08\x12\x0e\n\nopens_sent\x10\t\x12\x12\n\x0eopens_received\x10\n\x12\x13\n\x0fkeepalives_sent\x10\x0b\x12\x17\n\x13keepalives_received\x10\x0c\x12\x16\n\x12notifications_sent\x10\r\x12\x1a\n\x16notifications_received\x10\x0e\x12\r\n\tfsm_state\x10\x0f\x12\x17\n\x13\x65nd_of_rib_received\x10\x10\"\xea\x08\n\x0b\x42gpv6Metric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12>\n\rsession_state\x18\x02 \x01(\x0e\x32\".otg.Bgpv6Metric.SessionState.EnumH\x01\x88\x01\x01\x12\x1f\n\x12session_flap_count\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x1e\n\x11routes_advertised\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1c\n\x0froutes_received\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12!\n\x14route_withdraws_sent\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12%\n\x18route_withdraws_received\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x19\n\x0cupdates_sent\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x1d\n\x10updates_received\x18\t \x01(\x04H\x08\x88\x01\x01\x12\x17\n\nopens_sent\x18\n \x01(\x04H\t\x88\x01\x01\x12\x1b\n\x0eopens_received\x18\x0b \x01(\x04H\n\x88\x01\x01\x12\x1c\n\x0fkeepalives_sent\x18\x0c \x01(\x04H\x0b\x88\x01\x01\x12 \n\x13keepalives_received\x18\r \x01(\x04H\x0c\x88\x01\x01\x12\x1f\n\x12notifications_sent\x18\x0e \x01(\x04H\r\x88\x01\x01\x12#\n\x16notifications_received\x18\x0f \x01(\x04H\x0e\x88\x01\x01\x12\x36\n\tfsm_state\x18\x10 \x01(\x0e\x32\x1e.otg.Bgpv6Metric.FsmState.EnumH\x0f\x88\x01\x01\x12 \n\x13\x65nd_of_rib_received\x18\x11 \x01(\x04H\x10\x88\x01\x01\x1a\x39\n\x0cSessionState\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x1av\n\x08\x46smState\"j\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04idle\x10\x01\x12\x0b\n\x07\x63onnect\x10\x02\x12\n\n\x06\x61\x63tive\x10\x03\x12\x0c\n\x08opensent\x10\x04\x12\x0f\n\x0bopenconfirm\x10\x05\x12\x0f\n\x0b\x65stablished\x10\x06\x42\x07\n\x05_nameB\x10\n\x0e_session_stateB\x15\n\x13_session_flap_countB\x14\n\x12_routes_advertisedB\x12\n\x10_routes_receivedB\x17\n\x15_route_withdraws_sentB\x1b\n\x19_route_withdraws_receivedB\x0f\n\r_updates_sentB\x13\n\x11_updates_receivedB\r\n\x0b_opens_sentB\x11\n\x0f_opens_receivedB\x12\n\x10_keepalives_sentB\x16\n\x14_keepalives_receivedB\x15\n\x13_notifications_sentB\x19\n\x17_notifications_receivedB\x0c\n\n_fsm_stateB\x16\n\x14_end_of_rib_received\"\x92\x06\n\x12IsisMetricsRequest\x12\x14\n\x0crouter_names\x18\x01 \x03(\t\x12>\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32(.otg.IsisMetricsRequest.ColumnNames.Enum\x1a\xa5\x05\n\x0b\x43olumnNames\"\x95\x05\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x12\n\x0el1_sessions_up\x10\x01\x12\x13\n\x0fl1_session_flap\x10\x02\x12\x14\n\x10l1_database_size\x10\x03\x12\x1c\n\x18l1_broadcast_hellos_sent\x10\x04\x12 \n\x1cl1_broadcast_hellos_received\x10\x05\x12!\n\x1dl1_point_to_point_hellos_sent\x10\x06\x12%\n!l1_point_to_point_hellos_received\x10\x07\x12\x10\n\x0cl1_psnp_sent\x10\x08\x12\x14\n\x10l1_psnp_received\x10\t\x12\x10\n\x0cl1_csnp_sent\x10\n\x12\x14\n\x10l1_csnp_received\x10\x0b\x12\x0f\n\x0bl1_lsp_sent\x10\x0c\x12\x13\n\x0fl1_lsp_received\x10\r\x12\x12\n\x0el2_sessions_up\x10\x0e\x12\x13\n\x0fl2_session_flap\x10\x0f\x12\x14\n\x10l2_database_size\x10\x10\x12\x1c\n\x18l2_broadcast_hellos_sent\x10\x11\x12 \n\x1cl2_broadcast_hellos_received\x10\x12\x12!\n\x1dl2_point_to_point_hellos_sent\x10\x13\x12%\n!l2_point_to_point_hellos_received\x10\x14\x12\x10\n\x0cl2_psnp_sent\x10\x15\x12\x14\n\x10l2_psnp_received\x10\x16\x12\x10\n\x0cl2_csnp_sent\x10\x17\x12\x14\n\x10l2_csnp_received\x10\x18\x12\x0f\n\x0bl2_lsp_sent\x10\x19\x12\x13\n\x0fl2_lsp_received\x10\x1a\"\xf4\x0b\n\nIsisMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0el1_sessions_up\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1c\n\x0fl1_session_flap\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12%\n\x18l1_broadcast_hellos_sent\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12)\n\x1cl1_broadcast_hellos_received\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12*\n\x1dl1_point_to_point_hellos_sent\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12.\n!l1_point_to_point_hellos_received\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x1d\n\x10l1_database_size\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x19\n\x0cl1_psnp_sent\x18\t \x01(\x04H\x08\x88\x01\x01\x12\x1d\n\x10l1_psnp_received\x18\n \x01(\x04H\t\x88\x01\x01\x12\x19\n\x0cl1_csnp_sent\x18\x0b \x01(\x04H\n\x88\x01\x01\x12\x1d\n\x10l1_csnp_received\x18\x0c \x01(\x04H\x0b\x88\x01\x01\x12\x18\n\x0bl1_lsp_sent\x18\r \x01(\x04H\x0c\x88\x01\x01\x12\x1c\n\x0fl1_lsp_received\x18\x0e \x01(\x04H\r\x88\x01\x01\x12\x1b\n\x0el2_sessions_up\x18\x0f \x01(\rH\x0e\x88\x01\x01\x12\x1c\n\x0fl2_session_flap\x18\x10 \x01(\x04H\x0f\x88\x01\x01\x12%\n\x18l2_broadcast_hellos_sent\x18\x11 \x01(\x04H\x10\x88\x01\x01\x12)\n\x1cl2_broadcast_hellos_received\x18\x12 \x01(\x04H\x11\x88\x01\x01\x12*\n\x1dl2_point_to_point_hellos_sent\x18\x13 \x01(\x04H\x12\x88\x01\x01\x12.\n!l2_point_to_point_hellos_received\x18\x14 \x01(\x04H\x13\x88\x01\x01\x12\x1d\n\x10l2_database_size\x18\x15 \x01(\x04H\x14\x88\x01\x01\x12\x19\n\x0cl2_psnp_sent\x18\x16 \x01(\x04H\x15\x88\x01\x01\x12\x1d\n\x10l2_psnp_received\x18\x17 \x01(\x04H\x16\x88\x01\x01\x12\x19\n\x0cl2_csnp_sent\x18\x18 \x01(\x04H\x17\x88\x01\x01\x12\x1d\n\x10l2_csnp_received\x18\x19 \x01(\x04H\x18\x88\x01\x01\x12\x18\n\x0bl2_lsp_sent\x18\x1a \x01(\x04H\x19\x88\x01\x01\x12\x1c\n\x0fl2_lsp_received\x18\x1b \x01(\x04H\x1a\x88\x01\x01\x42\x07\n\x05_nameB\x11\n\x0f_l1_sessions_upB\x12\n\x10_l1_session_flapB\x1b\n\x19_l1_broadcast_hellos_sentB\x1f\n\x1d_l1_broadcast_hellos_receivedB \n\x1e_l1_point_to_point_hellos_sentB$\n\"_l1_point_to_point_hellos_receivedB\x13\n\x11_l1_database_sizeB\x0f\n\r_l1_psnp_sentB\x13\n\x11_l1_psnp_receivedB\x0f\n\r_l1_csnp_sentB\x13\n\x11_l1_csnp_receivedB\x0e\n\x0c_l1_lsp_sentB\x12\n\x10_l1_lsp_receivedB\x11\n\x0f_l2_sessions_upB\x12\n\x10_l2_session_flapB\x1b\n\x19_l2_broadcast_hellos_sentB\x1f\n\x1d_l2_broadcast_hellos_receivedB \n\x1e_l2_point_to_point_hellos_sentB$\n\"_l2_point_to_point_hellos_receivedB\x13\n\x11_l2_database_sizeB\x0f\n\r_l2_psnp_sentB\x13\n\x11_l2_psnp_receivedB\x0f\n\r_l2_csnp_sentB\x13\n\x11_l2_csnp_receivedB\x0e\n\x0c_l2_lsp_sentB\x12\n\x10_l2_lsp_received\"\xbd\x02\n\x11LagMetricsRequest\x12\x11\n\tlag_names\x18\x01 \x03(\t\x12=\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32\'.otg.LagMetricsRequest.ColumnNames.Enum\x1a\xd5\x01\n\x0b\x43olumnNames\"\xc5\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0f\n\x0boper_status\x10\x01\x12\x13\n\x0fmember_ports_up\x10\x02\x12\r\n\tframes_tx\x10\x03\x12\r\n\tframes_rx\x10\x04\x12\x0c\n\x08\x62ytes_tx\x10\x05\x12\x0c\n\x08\x62ytes_rx\x10\x06\x12\x12\n\x0e\x66rames_tx_rate\x10\x07\x12\x12\n\x0e\x66rames_rx_rate\x10\x08\x12\x11\n\rbytes_tx_rate\x10\t\x12\x11\n\rbytes_rx_rate\x10\n\"\xac\x04\n\tLagMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x38\n\x0boper_status\x18\x02 \x01(\x0e\x32\x1e.otg.LagMetric.OperStatus.EnumH\x01\x88\x01\x01\x12\x1c\n\x0fmember_ports_up\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x16\n\tframes_tx\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x16\n\tframes_rx\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x15\n\x08\x62ytes_tx\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x15\n\x08\x62ytes_rx\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x1b\n\x0e\x66rames_tx_rate\x18\x08 \x01(\x02H\x07\x88\x01\x01\x12\x1b\n\x0e\x66rames_rx_rate\x18\t \x01(\x02H\x08\x88\x01\x01\x12\x1a\n\rbytes_tx_rate\x18\n \x01(\x02H\t\x88\x01\x01\x12\x1a\n\rbytes_rx_rate\x18\x0b \x01(\x02H\n\x88\x01\x01\x1a\x37\n\nOperStatus\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x07\n\x05_nameB\x0e\n\x0c_oper_statusB\x12\n\x10_member_ports_upB\x0c\n\n_frames_txB\x0c\n\n_frames_rxB\x0b\n\t_bytes_txB\x0b\n\t_bytes_rxB\x11\n\x0f_frames_tx_rateB\x11\n\x0f_frames_rx_rateB\x10\n\x0e_bytes_tx_rateB\x10\n\x0e_bytes_rx_rate\"\xb4\x03\n\x12LacpMetricsRequest\x12\x11\n\tlag_names\x18\x01 \x03(\t\x12\x1d\n\x15lag_member_port_names\x18\x02 \x03(\t\x12>\n\x0c\x63olumn_names\x18\x03 \x03(\x0e\x32(.otg.LacpMetricsRequest.ColumnNames.Enum\x1a\xab\x02\n\x0b\x43olumnNames\"\x9b\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x13\n\x0flacp_packets_rx\x10\x01\x12\x13\n\x0flacp_packets_tx\x10\x02\x12\x12\n\x0elacp_rx_errors\x10\x03\x12\x0c\n\x08\x61\x63tivity\x10\x04\x12\x0b\n\x07timeout\x10\x05\x12\x13\n\x0fsynchronization\x10\x06\x12\x10\n\x0c\x61ggregatable\x10\x07\x12\x0e\n\ncollecting\x10\x08\x12\x10\n\x0c\x64istributing\x10\t\x12\r\n\tsystem_id\x10\n\x12\x0c\n\x08oper_key\x10\x0b\x12\x0e\n\npartner_id\x10\x0c\x12\x0f\n\x0bpartner_key\x10\r\x12\x0c\n\x08port_num\x10\x0e\x12\x14\n\x10partner_port_num\x10\x0f\"\x8d\x08\n\nLacpMetric\x12\x15\n\x08lag_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x14lag_member_port_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0flacp_packets_rx\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x1c\n\x0flacp_packets_tx\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1b\n\x0elacp_rx_errors\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x34\n\x08\x61\x63tivity\x18\x06 \x01(\x0e\x32\x1d.otg.LacpMetric.Activity.EnumH\x05\x88\x01\x01\x12\x32\n\x07timeout\x18\x07 \x01(\x0e\x32\x1c.otg.LacpMetric.Timeout.EnumH\x06\x88\x01\x01\x12\x42\n\x0fsynchronization\x18\x08 \x01(\x0e\x32$.otg.LacpMetric.Synchronization.EnumH\x07\x88\x01\x01\x12\x19\n\x0c\x61ggregatable\x18\t \x01(\x08H\x08\x88\x01\x01\x12\x17\n\ncollecting\x18\n \x01(\x08H\t\x88\x01\x01\x12\x19\n\x0c\x64istributing\x18\x0b \x01(\x08H\n\x88\x01\x01\x12\x16\n\tsystem_id\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x15\n\x08oper_key\x18\r \x01(\rH\x0c\x88\x01\x01\x12\x17\n\npartner_id\x18\x0e \x01(\tH\r\x88\x01\x01\x12\x18\n\x0bpartner_key\x18\x0f \x01(\rH\x0e\x88\x01\x01\x12\x15\n\x08port_num\x18\x10 \x01(\rH\x0f\x88\x01\x01\x12\x1d\n\x10partner_port_num\x18\x11 \x01(\rH\x10\x88\x01\x01\x1a<\n\x08\x41\x63tivity\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x61\x63tive\x10\x01\x12\x0b\n\x07passive\x10\x02\x1a\x37\n\x07Timeout\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05short\x10\x01\x12\x08\n\x04long\x10\x02\x1a\x45\n\x0fSynchronization\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07in_sync\x10\x01\x12\x0c\n\x08out_sync\x10\x02\x42\x0b\n\t_lag_nameB\x17\n\x15_lag_member_port_nameB\x12\n\x10_lacp_packets_rxB\x12\n\x10_lacp_packets_txB\x11\n\x0f_lacp_rx_errorsB\x0b\n\t_activityB\n\n\x08_timeoutB\x12\n\x10_synchronizationB\x0f\n\r_aggregatableB\r\n\x0b_collectingB\x0f\n\r_distributingB\x0c\n\n_system_idB\x0b\n\t_oper_keyB\r\n\x0b_partner_idB\x0e\n\x0c_partner_keyB\x0b\n\t_port_numB\x13\n\x11_partner_port_num\"\xfd\x01\n\x12LldpMetricsRequest\x12\x12\n\nlldp_names\x18\x01 \x03(\t\x12>\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32(.otg.LldpMetricsRequest.ColumnNames.Enum\x1a\x92\x01\n\x0b\x43olumnNames\"\x82\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tframes_rx\x10\x01\x12\r\n\tframes_tx\x10\x02\x12\x13\n\x0f\x66rames_error_rx\x10\x03\x12\x12\n\x0e\x66rames_discard\x10\x04\x12\x10\n\x0ctlvs_discard\x10\x05\x12\x10\n\x0ctlvs_unknown\x10\x06\"\xae\x02\n\nLldpMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tframes_rx\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x16\n\tframes_tx\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x1c\n\x0f\x66rames_error_rx\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1b\n\x0e\x66rames_discard\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x19\n\x0ctlvs_discard\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x19\n\x0ctlvs_unknown\x18\x07 \x01(\x04H\x06\x88\x01\x01\x42\x07\n\x05_nameB\x0c\n\n_frames_rxB\x0c\n\n_frames_txB\x12\n\x10_frames_error_rxB\x11\n\x0f_frames_discardB\x0f\n\r_tlvs_discardB\x0f\n\r_tlvs_unknown\"\xc2\x05\n\x12RsvpMetricsRequest\x12\x14\n\x0crouter_names\x18\x01 \x03(\t\x12>\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32(.otg.RsvpMetricsRequest.ColumnNames.Enum\x1a\xd5\x04\n\x0b\x43olumnNames\"\xc5\x04\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1f\n\x1bingress_p2p_lsps_configured\x10\x01\x12\x17\n\x13ingress_p2p_lsps_up\x10\x02\x12\x16\n\x12\x65gress_p2p_lsps_up\x10\x03\x12\x12\n\x0elsp_flap_count\x10\x04\x12\x0c\n\x08paths_tx\x10\x05\x12\x0c\n\x08paths_rx\x10\x06\x12\x0c\n\x08resvs_tx\x10\x07\x12\x0c\n\x08resvs_rx\x10\x08\x12\x11\n\rpath_tears_tx\x10\t\x12\x11\n\rpath_tears_rx\x10\n\x12\x11\n\rresv_tears_tx\x10\x0b\x12\x11\n\rresv_tears_rx\x10\x0c\x12\x12\n\x0epath_errors_tx\x10\r\x12\x12\n\x0epath_errors_rx\x10\x0e\x12\x12\n\x0eresv_errors_tx\x10\x0f\x12\x12\n\x0eresv_errors_rx\x10\x10\x12\x10\n\x0cresv_conf_tx\x10\x11\x12\x10\n\x0cresv_conf_rx\x10\x12\x12\r\n\thellos_tx\x10\x13\x12\r\n\thellos_rx\x10\x14\x12\x0b\n\x07\x61\x63ks_tx\x10\x15\x12\x0b\n\x07\x61\x63ks_rx\x10\x16\x12\x0c\n\x08nacks_tx\x10\x17\x12\x0c\n\x08nacks_rx\x10\x18\x12\x0f\n\x0bsrefresh_tx\x10\x19\x12\x0f\n\x0bsrefresh_rx\x10\x1a\x12\r\n\tbundle_tx\x10\x1b\x12\r\n\tbundle_rx\x10\x1c\x12 \n\x1cpath_reevaluation_request_tx\x10\x1d\x12\x18\n\x14path_reoptimizations\x10\x1e\"\xf4\n\n\nRsvpMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12(\n\x1bingress_p2p_lsps_configured\x18\x02 \x01(\rH\x01\x88\x01\x01\x12 \n\x13ingress_p2p_lsps_up\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x1f\n\x12\x65gress_p2p_lsps_up\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1b\n\x0elsp_flap_count\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x15\n\x08paths_tx\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x15\n\x08paths_rx\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x15\n\x08resvs_tx\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x15\n\x08resvs_rx\x18\t \x01(\x04H\x08\x88\x01\x01\x12\x1a\n\rpath_tears_tx\x18\n \x01(\x04H\t\x88\x01\x01\x12\x1a\n\rpath_tears_rx\x18\x0b \x01(\x04H\n\x88\x01\x01\x12\x1a\n\rresv_tears_tx\x18\x0c \x01(\x04H\x0b\x88\x01\x01\x12\x1a\n\rresv_tears_rx\x18\r \x01(\x04H\x0c\x88\x01\x01\x12\x1b\n\x0epath_errors_tx\x18\x0e \x01(\x04H\r\x88\x01\x01\x12\x1b\n\x0epath_errors_rx\x18\x0f \x01(\x04H\x0e\x88\x01\x01\x12\x1b\n\x0eresv_errors_tx\x18\x10 \x01(\x04H\x0f\x88\x01\x01\x12\x1b\n\x0eresv_errors_rx\x18\x11 \x01(\x04H\x10\x88\x01\x01\x12\x19\n\x0cresv_conf_tx\x18\x12 \x01(\x04H\x11\x88\x01\x01\x12\x19\n\x0cresv_conf_rx\x18\x13 \x01(\x04H\x12\x88\x01\x01\x12\x16\n\thellos_tx\x18\x14 \x01(\x04H\x13\x88\x01\x01\x12\x16\n\thellos_rx\x18\x15 \x01(\x04H\x14\x88\x01\x01\x12\x14\n\x07\x61\x63ks_tx\x18\x16 \x01(\x04H\x15\x88\x01\x01\x12\x14\n\x07\x61\x63ks_rx\x18\x17 \x01(\x04H\x16\x88\x01\x01\x12\x15\n\x08nacks_tx\x18\x18 \x01(\x04H\x17\x88\x01\x01\x12\x15\n\x08nacks_rx\x18\x19 \x01(\x04H\x18\x88\x01\x01\x12\x18\n\x0bsrefresh_tx\x18\x1a \x01(\x04H\x19\x88\x01\x01\x12\x18\n\x0bsrefresh_rx\x18\x1b \x01(\x04H\x1a\x88\x01\x01\x12\x16\n\tbundle_tx\x18\x1c \x01(\x04H\x1b\x88\x01\x01\x12\x16\n\tbundle_rx\x18\x1d \x01(\x04H\x1c\x88\x01\x01\x12)\n\x1cpath_reevaluation_request_tx\x18\x1e \x01(\x04H\x1d\x88\x01\x01\x12!\n\x14path_reoptimizations\x18\x1f \x01(\x04H\x1e\x88\x01\x01\x42\x07\n\x05_nameB\x1e\n\x1c_ingress_p2p_lsps_configuredB\x16\n\x14_ingress_p2p_lsps_upB\x15\n\x13_egress_p2p_lsps_upB\x11\n\x0f_lsp_flap_countB\x0b\n\t_paths_txB\x0b\n\t_paths_rxB\x0b\n\t_resvs_txB\x0b\n\t_resvs_rxB\x10\n\x0e_path_tears_txB\x10\n\x0e_path_tears_rxB\x10\n\x0e_resv_tears_txB\x10\n\x0e_resv_tears_rxB\x11\n\x0f_path_errors_txB\x11\n\x0f_path_errors_rxB\x11\n\x0f_resv_errors_txB\x11\n\x0f_resv_errors_rxB\x0f\n\r_resv_conf_txB\x0f\n\r_resv_conf_rxB\x0c\n\n_hellos_txB\x0c\n\n_hellos_rxB\n\n\x08_acks_txB\n\n\x08_acks_rxB\x0b\n\t_nacks_txB\x0b\n\t_nacks_rxB\x0e\n\x0c_srefresh_txB\x0e\n\x0c_srefresh_rxB\x0c\n\n_bundle_txB\x0c\n\n_bundle_rxB\x1f\n\x1d_path_reevaluation_request_txB\x17\n\x15_path_reoptimizations\"\x94\x04\n\rStatesRequest\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.StatesRequest.Choice.EnumH\x00\x88\x01\x01\x12\x35\n\x0eipv4_neighbors\x18\x02 \x01(\x0b\x32\x1d.otg.Neighborsv4StatesRequest\x12\x35\n\x0eipv6_neighbors\x18\x03 \x01(\x0b\x32\x1d.otg.Neighborsv6StatesRequest\x12\x30\n\x0c\x62gp_prefixes\x18\x04 \x01(\x0b\x32\x1a.otg.BgpPrefixStateRequest\x12,\n\tisis_lsps\x18\x05 \x01(\x0b\x32\x19.otg.IsisLspsStateRequest\x12\x36\n\x0elldp_neighbors\x18\x06 \x01(\x0b\x32\x1e.otg.LldpNeighborsStateRequest\x12,\n\trsvp_lsps\x18\x07 \x01(\x0b\x32\x19.otg.RsvpLspsStateRequest\x1a\x8e\x01\n\x06\x43hoice\"\x83\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x12\n\x0eipv4_neighbors\x10\x01\x12\x12\n\x0eipv6_neighbors\x10\x02\x12\x10\n\x0c\x62gp_prefixes\x10\x03\x12\r\n\tisis_lsps\x10\x04\x12\x12\n\x0elldp_neighbors\x10\x05\x12\r\n\trsvp_lsps\x10\x06\x42\t\n\x07_choice\"\xec\x03\n\x0eStatesResponse\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.StatesResponse.Choice.EnumH\x00\x88\x01\x01\x12-\n\x0eipv4_neighbors\x18\x02 \x03(\x0b\x32\x15.otg.Neighborsv4State\x12-\n\x0eipv6_neighbors\x18\x03 \x03(\x0b\x32\x15.otg.Neighborsv6State\x12+\n\x0c\x62gp_prefixes\x18\x04 \x03(\x0b\x32\x15.otg.BgpPrefixesState\x12%\n\tisis_lsps\x18\x05 \x03(\x0b\x32\x12.otg.IsisLspsState\x12/\n\x0elldp_neighbors\x18\x06 \x03(\x0b\x32\x17.otg.LldpNeighborsState\x12%\n\trsvp_lsps\x18\x07 \x03(\x0b\x32\x12.otg.RsvpLspsState\x1a\x8e\x01\n\x06\x43hoice\"\x83\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x12\n\x0eipv4_neighbors\x10\x01\x12\x12\n\x0eipv6_neighbors\x10\x02\x12\x10\n\x0c\x62gp_prefixes\x10\x03\x12\r\n\tisis_lsps\x10\x04\x12\x12\n\x0elldp_neighbors\x10\x05\x12\r\n\trsvp_lsps\x10\x06\x42\t\n\x07_choice\"2\n\x18Neighborsv4StatesRequest\x12\x16\n\x0e\x65thernet_names\x18\x01 \x03(\t\"\xa4\x01\n\x10Neighborsv4State\x12\x1a\n\rethernet_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0cipv4_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12link_layer_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x10\n\x0e_ethernet_nameB\x0f\n\r_ipv4_addressB\x15\n\x13_link_layer_address\"2\n\x18Neighborsv6StatesRequest\x12\x16\n\x0e\x65thernet_names\x18\x01 \x03(\t\"\xa4\x01\n\x10Neighborsv6State\x12\x1a\n\rethernet_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0cipv6_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12link_layer_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x10\n\x0e_ethernet_nameB\x0f\n\r_ipv6_addressB\x15\n\x13_link_layer_address\"\xc2\x02\n\x15\x42gpPrefixStateRequest\x12\x16\n\x0e\x62gp_peer_names\x18\x01 \x03(\t\x12\x45\n\x0eprefix_filters\x18\x02 \x03(\x0e\x32-.otg.BgpPrefixStateRequest.PrefixFilters.Enum\x12=\n\x14ipv4_unicast_filters\x18\x03 \x03(\x0b\x32\x1f.otg.BgpPrefixIpv4UnicastFilter\x12=\n\x14ipv6_unicast_filters\x18\x04 \x03(\x0b\x32\x1f.otg.BgpPrefixIpv6UnicastFilter\x1aL\n\rPrefixFilters\";\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0cipv4_unicast\x10\x01\x12\x10\n\x0cipv6_unicast\x10\x02\"\x91\x02\n\x1a\x42gpPrefixIpv4UnicastFilter\x12\x11\n\taddresses\x18\x01 \x03(\t\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x00\x88\x01\x01\x12@\n\x06origin\x18\x03 \x01(\x0e\x32+.otg.BgpPrefixIpv4UnicastFilter.Origin.EnumH\x01\x88\x01\x01\x12\x14\n\x07path_id\x18\x04 \x01(\rH\x02\x88\x01\x01\x1a\x43\n\x06Origin\"9\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03igp\x10\x01\x12\x07\n\x03\x65gp\x10\x02\x12\x0e\n\nincomplete\x10\x03\x42\x10\n\x0e_prefix_lengthB\t\n\x07_originB\n\n\x08_path_id\"\x91\x02\n\x1a\x42gpPrefixIpv6UnicastFilter\x12\x11\n\taddresses\x18\x01 \x03(\t\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x00\x88\x01\x01\x12@\n\x06origin\x18\x03 \x01(\x0e\x32+.otg.BgpPrefixIpv6UnicastFilter.Origin.EnumH\x01\x88\x01\x01\x12\x14\n\x07path_id\x18\x04 \x01(\rH\x02\x88\x01\x01\x1a\x43\n\x06Origin\"9\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03igp\x10\x01\x12\x07\n\x03\x65gp\x10\x02\x12\x0e\n\nincomplete\x10\x03\x42\x10\n\x0e_prefix_lengthB\t\n\x07_originB\n\n\x08_path_id\"\xbe\x01\n\x10\x42gpPrefixesState\x12\x1a\n\rbgp_peer_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12=\n\x15ipv4_unicast_prefixes\x18\x02 \x03(\x0b\x32\x1e.otg.BgpPrefixIpv4UnicastState\x12=\n\x15ipv6_unicast_prefixes\x18\x03 \x03(\x0b\x32\x1e.otg.BgpPrefixIpv6UnicastStateB\x10\n\x0e_bgp_peer_name\"\xd1\x04\n\x19\x42gpPrefixIpv4UnicastState\x12\x19\n\x0cipv4_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12?\n\x06origin\x18\x03 \x01(\x0e\x32*.otg.BgpPrefixIpv4UnicastState.Origin.EnumH\x02\x88\x01\x01\x12\x14\n\x07path_id\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1a\n\ripv4_next_hop\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x1a\n\ripv6_next_hop\x18\x06 \x01(\tH\x05\x88\x01\x01\x12,\n\x0b\x63ommunities\x18\x07 \x03(\x0b\x32\x17.otg.ResultBgpCommunity\x12%\n\x07\x61s_path\x18\x08 \x01(\x0b\x32\x14.otg.ResultBgpAsPath\x12\x1d\n\x10local_preference\x18\t \x01(\rH\x06\x88\x01\x01\x12%\n\x18multi_exit_discriminator\x18\n \x01(\rH\x07\x88\x01\x01\x1a\x43\n\x06Origin\"9\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03igp\x10\x01\x12\x07\n\x03\x65gp\x10\x02\x12\x0e\n\nincomplete\x10\x03\x42\x0f\n\r_ipv4_addressB\x10\n\x0e_prefix_lengthB\t\n\x07_originB\n\n\x08_path_idB\x10\n\x0e_ipv4_next_hopB\x10\n\x0e_ipv6_next_hopB\x13\n\x11_local_preferenceB\x1b\n\x19_multi_exit_discriminator\"\xd1\x04\n\x19\x42gpPrefixIpv6UnicastState\x12\x19\n\x0cipv6_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12?\n\x06origin\x18\x03 \x01(\x0e\x32*.otg.BgpPrefixIpv6UnicastState.Origin.EnumH\x02\x88\x01\x01\x12\x14\n\x07path_id\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1a\n\ripv4_next_hop\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x1a\n\ripv6_next_hop\x18\x06 \x01(\tH\x05\x88\x01\x01\x12,\n\x0b\x63ommunities\x18\x07 \x03(\x0b\x32\x17.otg.ResultBgpCommunity\x12%\n\x07\x61s_path\x18\x08 \x01(\x0b\x32\x14.otg.ResultBgpAsPath\x12\x1d\n\x10local_preference\x18\t \x01(\rH\x06\x88\x01\x01\x12%\n\x18multi_exit_discriminator\x18\n \x01(\rH\x07\x88\x01\x01\x1a\x43\n\x06Origin\"9\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03igp\x10\x01\x12\x07\n\x03\x65gp\x10\x02\x12\x0e\n\nincomplete\x10\x03\x42\x0f\n\r_ipv6_addressB\x10\n\x0e_prefix_lengthB\t\n\x07_originB\n\n\x08_path_idB\x10\n\x0e_ipv4_next_hopB\x10\n\x0e_ipv6_next_hopB\x13\n\x11_local_preferenceB\x1b\n\x19_multi_exit_discriminator\"\xb0\x02\n\x12ResultBgpCommunity\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32!.otg.ResultBgpCommunity.Type.EnumH\x00\x88\x01\x01\x12\x16\n\tas_number\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x16\n\tas_custom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x8e\x01\n\x04Type\"\x85\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x14\n\x10manual_as_number\x10\x01\x12\r\n\tno_export\x10\x02\x12\x11\n\rno_advertised\x10\x03\x12\x17\n\x13no_export_subconfed\x10\x04\x12\x0e\n\nllgr_stale\x10\x05\x12\x0b\n\x07no_llgr\x10\x06\x42\x07\n\x05_typeB\x0c\n\n_as_numberB\x0c\n\n_as_custom\"@\n\x0fResultBgpAsPath\x12-\n\x08segments\x18\x01 \x03(\x0b\x32\x1b.otg.ResultBgpAsPathSegment\"\xce\x01\n\x16ResultBgpAsPathSegment\x12\x38\n\x04type\x18\x01 \x01(\x0e\x32%.otg.ResultBgpAsPathSegment.Type.EnumH\x00\x88\x01\x01\x12\x12\n\nas_numbers\x18\x02 \x03(\r\x1a]\n\x04Type\"U\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x61s_seq\x10\x01\x12\n\n\x06\x61s_set\x10\x02\x12\x11\n\ras_confed_seq\x10\x03\x12\x11\n\ras_confed_set\x10\x04\x42\x07\n\x05_type\"1\n\x14IsisLspsStateRequest\x12\x19\n\x11isis_router_names\x18\x01 \x03(\t\"d\n\rIsisLspsState\x12\x1d\n\x10isis_router_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x04lsps\x18\x02 \x03(\x0b\x32\x11.otg.IsisLspStateB\x13\n\x11_isis_router_name\"\xa6\x03\n\x0cIsisLspState\x12\x13\n\x06lsp_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x35\n\x08pdu_type\x18\x02 \x01(\x0e\x32\x1e.otg.IsisLspState.PduType.EnumH\x01\x88\x01\x01\x12\x1f\n\x12remaining_lifetime\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x1c\n\x0fsequence_number\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x17\n\npdu_length\x18\x05 \x01(\rH\x04\x88\x01\x01\x12 \n\x05\x66lags\x18\x06 \x01(\x0b\x32\x11.otg.IsisLspFlags\x12\x14\n\x07is_type\x18\x07 \x01(\rH\x05\x88\x01\x01\x12\x1e\n\x04tlvs\x18\x08 \x01(\x0b\x32\x10.otg.IsisLspTlvs\x1a<\n\x07PduType\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07level_1\x10\x01\x12\x0b\n\x07level_2\x10\x02\x42\t\n\x07_lsp_idB\x0b\n\t_pdu_typeB\x15\n\x13_remaining_lifetimeB\x12\n\x10_sequence_numberB\r\n\x0b_pdu_lengthB\n\n\x08_is_type\"\xfc\x03\n\x0bIsisLspTlvs\x12+\n\rhostname_tlvs\x18\x01 \x03(\x0b\x32\x14.otg.IsisLspHostname\x12;\n\x14is_reachability_tlvs\x18\x02 \x03(\x0b\x32\x1d.otg.IsisLspIsReachabilityTlv\x12L\n\x1d\x65xtended_is_reachability_tlvs\x18\x03 \x03(\x0b\x32%.otg.IsisLspExtendedIsReachabilityTlv\x12P\n\x1fipv4_internal_reachability_tlvs\x18\x04 \x03(\x0b\x32\'.otg.IsisLspIpv4InternalReachabilityTlv\x12P\n\x1fipv4_external_reachability_tlvs\x18\x05 \x03(\x0b\x32\'.otg.IsisLspIpv4ExternalReachabilityTlv\x12P\n\x1f\x65xtended_ipv4_reachability_tlvs\x18\x06 \x03(\x0b\x32\'.otg.IsisLspExtendedIpv4ReachabilityTlv\x12?\n\x16ipv6_reachability_tlvs\x18\x07 \x03(\x0b\x32\x1f.otg.IsisLspIpv6ReachabilityTlv\"5\n\x0fIsisLspHostname\x12\x15\n\x08hostname\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_hostname\"\xae\x02\n\x0cIsisLspFlags\x12\x1d\n\x10partition_repair\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1b\n\x0e\x61ttached_error\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1d\n\x10\x61ttached_expense\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x1b\n\x0e\x61ttached_delay\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x1d\n\x10\x61ttached_default\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x15\n\x08overload\x18\x06 \x01(\x08H\x05\x88\x01\x01\x42\x13\n\x11_partition_repairB\x11\n\x0f_attached_errorB\x13\n\x11_attached_expenseB\x11\n\x0f_attached_delayB\x13\n\x11_attached_defaultB\x0b\n\t_overload\"C\n\x18IsisLspIsReachabilityTlv\x12\'\n\tneighbors\x18\x01 \x03(\x0b\x32\x14.otg.IsisLspneighbor\"K\n IsisLspExtendedIsReachabilityTlv\x12\'\n\tneighbors\x18\x01 \x03(\x0b\x32\x14.otg.IsisLspneighbor\"7\n\x0fIsisLspneighbor\x12\x16\n\tsystem_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_system_id\"L\n\"IsisLspIpv4InternalReachabilityTlv\x12&\n\x08prefixes\x18\x01 \x03(\x0b\x32\x14.otg.IsisLspV4Prefix\"L\n\"IsisLspIpv4ExternalReachabilityTlv\x12&\n\x08prefixes\x18\x01 \x03(\x0b\x32\x14.otg.IsisLspV4Prefix\"\xd7\x03\n\x0fIsisLspV4Prefix\x12\x19\n\x0cipv4_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12N\n\x13redistribution_type\x18\x03 \x01(\x0e\x32,.otg.IsisLspV4Prefix.RedistributionType.EnumH\x02\x88\x01\x01\x12\x1b\n\x0e\x64\x65\x66\x61ult_metric\x18\x04 \x01(\rH\x03\x88\x01\x01\x12>\n\x0borigin_type\x18\x05 \x01(\x0e\x32$.otg.IsisLspV4Prefix.OriginType.EnumH\x04\x88\x01\x01\x1a?\n\x12RedistributionType\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x1a\x41\n\nOriginType\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08internal\x10\x01\x12\x0c\n\x08\x65xternal\x10\x02\x42\x0f\n\r_ipv4_addressB\x10\n\x0e_prefix_lengthB\x16\n\x14_redistribution_typeB\x11\n\x0f_default_metricB\x0e\n\x0c_origin_type\"T\n\"IsisLspExtendedIpv4ReachabilityTlv\x12.\n\x08prefixes\x18\x01 \x03(\x0b\x32\x1c.otg.IsisLspExtendedV4Prefix\"\xfd\x02\n\x17IsisLspExtendedV4Prefix\x12\x19\n\x0cipv4_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06metric\x18\x03 \x01(\rH\x02\x88\x01\x01\x12V\n\x13redistribution_type\x18\x04 \x01(\x0e\x32\x34.otg.IsisLspExtendedV4Prefix.RedistributionType.EnumH\x03\x88\x01\x01\x12\x37\n\x11prefix_attributes\x18\x05 \x01(\x0b\x32\x1c.otg.IsisLspPrefixAttributes\x1a?\n\x12RedistributionType\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x0f\n\r_ipv4_addressB\x10\n\x0e_prefix_lengthB\t\n\x07_metricB\x16\n\x14_redistribution_type\"D\n\x1aIsisLspIpv6ReachabilityTlv\x12&\n\x08prefixes\x18\x01 \x03(\x0b\x32\x14.otg.IsisLspV6Prefix\"\x80\x04\n\x0fIsisLspV6Prefix\x12\x19\n\x0cipv6_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06metric\x18\x03 \x01(\rH\x02\x88\x01\x01\x12N\n\x13redistribution_type\x18\x04 \x01(\x0e\x32,.otg.IsisLspV6Prefix.RedistributionType.EnumH\x03\x88\x01\x01\x12>\n\x0borigin_type\x18\x05 \x01(\x0e\x32$.otg.IsisLspV6Prefix.OriginType.EnumH\x04\x88\x01\x01\x12\x37\n\x11prefix_attributes\x18\x06 \x01(\x0b\x32\x1c.otg.IsisLspPrefixAttributes\x1a?\n\x12RedistributionType\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x1a\x41\n\nOriginType\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08internal\x10\x01\x12\x0c\n\x08\x65xternal\x10\x02\x42\x0f\n\r_ipv6_addressB\x10\n\x0e_prefix_lengthB\t\n\x07_metricB\x16\n\x14_redistribution_typeB\x0e\n\x0c_origin_type\"y\n\x17IsisLspPrefixAttributes\x12\x13\n\x06x_flag\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x13\n\x06r_flag\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x13\n\x06n_flag\x18\x03 \x01(\x08H\x02\x88\x01\x01\x42\t\n\x07_x_flagB\t\n\x07_r_flagB\t\n\x07_n_flag\"L\n\x19LldpNeighborsStateRequest\x12\x12\n\nlldp_names\x18\x01 \x03(\t\x12\x1b\n\x13neighbor_id_filters\x18\x02 \x03(\t\"\x8b\t\n\x12LldpNeighborsState\x12\x16\n\tlldp_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bsystem_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12system_description\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nchassis_id\x18\x04 \x01(\tH\x03\x88\x01\x01\x12H\n\x0f\x63hassis_id_type\x18\x05 \x01(\x0e\x32*.otg.LldpNeighborsState.ChassisIdType.EnumH\x04\x88\x01\x01\x12\x18\n\x0bneighbor_id\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x10\n\x03\x61ge\x18\x07 \x01(\rH\x06\x88\x01\x01\x12\x18\n\x0blast_update\x18\x08 \x01(\rH\x07\x88\x01\x01\x12\x10\n\x03ttl\x18\t \x01(\rH\x08\x88\x01\x01\x12\x14\n\x07port_id\x18\n \x01(\tH\t\x88\x01\x01\x12\x42\n\x0cport_id_type\x18\x0b \x01(\x0e\x32\'.otg.LldpNeighborsState.PortIdType.EnumH\n\x88\x01\x01\x12\x1d\n\x10port_description\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x1f\n\x12management_address\x18\r \x01(\tH\x0c\x88\x01\x01\x12$\n\x17management_address_type\x18\x0e \x01(\tH\r\x88\x01\x01\x12,\n\x0b\x63ustom_tlvs\x18\x0f \x03(\x0b\x32\x17.otg.LldpCustomTLVState\x12.\n\x0c\x63\x61pabilities\x18\x10 \x03(\x0b\x32\x18.otg.LldpCapabilityState\x1a\xae\x01\n\rChassisIdType\"\x9c\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x12\n\x0eport_component\x10\x01\x12\x13\n\x0fnetwork_address\x10\x02\x12\x15\n\x11\x63hassis_component\x10\x03\x12\x0f\n\x0bmac_address\x10\x04\x12\x12\n\x0einterface_name\x10\x05\x12\t\n\x05local\x10\x06\x12\x13\n\x0finterface_alias\x10\x07\x1a\xaa\x01\n\nPortIdType\"\x9b\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x12\n\x0eport_component\x10\x01\x12\x13\n\x0fnetwork_address\x10\x02\x12\x14\n\x10\x61gent_circuit_id\x10\x03\x12\x0f\n\x0bmac_address\x10\x04\x12\x12\n\x0einterface_name\x10\x05\x12\t\n\x05local\x10\x06\x12\x13\n\x0finterface_alias\x10\x07\x42\x0c\n\n_lldp_nameB\x0e\n\x0c_system_nameB\x15\n\x13_system_descriptionB\r\n\x0b_chassis_idB\x12\n\x10_chassis_id_typeB\x0e\n\x0c_neighbor_idB\x06\n\x04_ageB\x0e\n\x0c_last_updateB\x06\n\x04_ttlB\n\n\x08_port_idB\x0f\n\r_port_id_typeB\x13\n\x11_port_descriptionB\x15\n\x13_management_addressB\x1a\n\x18_management_address_type\"\x82\x01\n\x12LldpCustomTLVState\x12\x18\n\x0b\x63ustom_type\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03oui\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0boui_subtype\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x0e\n\x0c_custom_typeB\x06\n\x04_ouiB\x0e\n\x0c_oui_subtype\"\x90\x03\n\x13LldpCapabilityState\x12J\n\x0f\x63\x61pability_name\x18\x01 \x01(\x0e\x32,.otg.LldpCapabilityState.CapabilityName.EnumH\x00\x88\x01\x01\x12\x1f\n\x12\x63\x61pability_enabled\x18\x02 \x01(\x08H\x01\x88\x01\x01\x1a\xe0\x01\n\x0e\x43\x61pabilityName\"\xcd\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\nmac_bridge\x10\x01\x12\x16\n\x12two_port_mac_relay\x10\x02\x12\x0c\n\x08repeater\x10\x03\x12\x17\n\x13\x64ocsis_cable_device\x10\x04\x12\n\n\x06s_vlan\x10\x05\x12\r\n\ttelephone\x10\x06\x12\t\n\x05other\x10\x07\x12\n\n\x06router\x10\x08\x12\n\n\x06\x63_vlan\x10\t\x12\x10\n\x0cstation_only\x10\n\x12\x15\n\x11wlan_access_point\x10\x0b\x42\x12\n\x10_capability_nameB\x15\n\x13_capability_enabled\"1\n\x14RsvpLspsStateRequest\x12\x19\n\x11rsvp_router_names\x18\x01 \x03(\t\"m\n\rRsvpLspsState\x12\x1d\n\x10rsvp_router_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12(\n\tipv4_lsps\x18\x02 \x03(\x0b\x32\x15.otg.RsvpIPv4LspStateB\x13\n\x11_rsvp_router_name\"\xe2\x01\n\x10RsvpIPv4LspState\x12\x1b\n\x0esource_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12 \n\x13\x64\x65stination_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1e\n\x03lsp\x18\x03 \x01(\x0b\x32\x11.otg.RsvpLspState\x12!\n\x04rros\x18\x04 \x03(\x0b\x32\x13.otg.RsvpLspIpv4Rro\x12!\n\x04\x65ros\x18\x05 \x03(\x0b\x32\x13.otg.RsvpLspIpv4EroB\x11\n\x0f_source_addressB\x16\n\x14_destination_address\"\xb4\x04\n\x0cRsvpLspState\x12\x16\n\ttunnel_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x13\n\x06lsp_id\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x19\n\x0csession_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x15\n\x08label_in\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x16\n\tlabel_out\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x41\n\x0esession_status\x18\x06 \x01(\x0e\x32$.otg.RsvpLspState.SessionStatus.EnumH\x05\x88\x01\x01\x12\x44\n\x10last_flap_reason\x18\x07 \x01(\x0e\x32%.otg.RsvpLspState.LastFlapReason.EnumH\x06\x88\x01\x01\x12\x14\n\x07up_time\x18\x08 \x01(\x04H\x07\x88\x01\x01\x1a:\n\rSessionStatus\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x1aY\n\x0eLastFlapReason\"G\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tresv_tear\x10\x01\x12\r\n\tpath_tear\x10\x02\x12\x10\n\x0cpath_timeout\x10\x03\x42\x0c\n\n_tunnel_idB\t\n\x07_lsp_idB\x0f\n\r_session_nameB\x0b\n\t_label_inB\x0c\n\n_label_outB\x11\n\x0f_session_statusB\x13\n\x11_last_flap_reasonB\n\n\x08_up_time\"b\n\x0eRsvpLspIpv4Rro\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0ereported_label\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\n\n\x08_addressB\x11\n\x0f_reported_label\"\xf2\x01\n\x0eRsvpLspIpv4Ero\x12\x13\n\x06prefix\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03\x61sn\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x30\n\x04type\x18\x03 \x01(\x0e\x32\x1d.otg.RsvpLspIpv4Ero.Type.EnumH\x02\x88\x01\x01\x1ak\n\x04Type\"c\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x12\x07\n\x03\x61sn\x10\x03\x12\x08\n\x04\x61sn4\x10\x04\x12\t\n\x05label\x10\x05\x12\x18\n\x14unnumbered_interface\x10\x06\x42\t\n\x07_prefixB\x06\n\x04_asnB\x07\n\x05_type\"6\n\x0e\x43\x61ptureRequest\x12\x16\n\tport_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_port_name\"w\n\x1dPatternFlowEthernetDstCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowEthernetDstMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb6\x03\n\x16PatternFlowEthernetDst\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowEthernetDst.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x11\n\x04\x61uto\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x35\n\tincrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowEthernetDstCounter\x12\x35\n\tdecrement\x18\x07 \x01(\x0b\x32\".otg.PatternFlowEthernetDstCounter\x12\x39\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32$.otg.PatternFlowEthernetDstMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"w\n\x1dPatternFlowEthernetSrcCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowEthernetSrcMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowEthernetSrc\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowEthernetSrc.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowEthernetSrcCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowEthernetSrcCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowEthernetSrcMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowEthernetEtherTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowEthernetEtherTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xd4\x03\n\x1cPatternFlowEthernetEtherType\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowEthernetEtherType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12;\n\tincrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowEthernetEtherTypeCounter\x12;\n\tdecrement\x18\x07 \x01(\x0b\x32(.otg.PatternFlowEthernetEtherTypeCounter\x12?\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32*.otg.PatternFlowEthernetEtherTypeMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"|\n\"PatternFlowEthernetPfcQueueCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowEthernetPfcQueueMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowEthernetPfcQueue\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowEthernetPfcQueue.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowEthernetPfcQueueCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowEthernetPfcQueueCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowEthernetPfcQueueMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowVlanPriorityCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowVlanPriorityMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowVlanPriority\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowVlanPriority.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowVlanPriorityCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowVlanPriorityCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowVlanPriorityMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"s\n\x19PatternFlowVlanCfiCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"y\n\x1bPatternFlowVlanCfiMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xfc\x02\n\x12PatternFlowVlanCfi\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.PatternFlowVlanCfi.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x31\n\tincrement\x18\x05 \x01(\x0b\x32\x1e.otg.PatternFlowVlanCfiCounter\x12\x31\n\tdecrement\x18\x06 \x01(\x0b\x32\x1e.otg.PatternFlowVlanCfiCounter\x12\x35\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32 .otg.PatternFlowVlanCfiMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"r\n\x18PatternFlowVlanIdCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"x\n\x1aPatternFlowVlanIdMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xf7\x02\n\x11PatternFlowVlanId\x12\x37\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\".otg.PatternFlowVlanId.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x30\n\tincrement\x18\x05 \x01(\x0b\x32\x1d.otg.PatternFlowVlanIdCounter\x12\x30\n\tdecrement\x18\x06 \x01(\x0b\x32\x1d.otg.PatternFlowVlanIdCounter\x12\x34\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x1f.otg.PatternFlowVlanIdMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"t\n\x1aPatternFlowVlanTpidCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"z\n\x1cPatternFlowVlanTpidMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x81\x03\n\x13PatternFlowVlanTpid\x12\x39\n\x06\x63hoice\x18\x01 \x01(\x0e\x32$.otg.PatternFlowVlanTpid.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x32\n\tincrement\x18\x05 \x01(\x0b\x32\x1f.otg.PatternFlowVlanTpidCounter\x12\x32\n\tdecrement\x18\x06 \x01(\x0b\x32\x1f.otg.PatternFlowVlanTpidCounter\x12\x36\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32!.otg.PatternFlowVlanTpidMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowVxlanFlagsCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowVxlanFlagsMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowVxlanFlags\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowVxlanFlags.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowVxlanFlagsCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowVxlanFlagsCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowVxlanFlagsMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"z\n PatternFlowVxlanReserved0Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x80\x01\n\"PatternFlowVxlanReserved0MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9f\x03\n\x19PatternFlowVxlanReserved0\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowVxlanReserved0.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x38\n\tincrement\x18\x05 \x01(\x0b\x32%.otg.PatternFlowVxlanReserved0Counter\x12\x38\n\tdecrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowVxlanReserved0Counter\x12<\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\'.otg.PatternFlowVxlanReserved0MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"t\n\x1aPatternFlowVxlanVniCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"z\n\x1cPatternFlowVxlanVniMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa7\x03\n\x13PatternFlowVxlanVni\x12\x39\n\x06\x63hoice\x18\x01 \x01(\x0e\x32$.otg.PatternFlowVxlanVni.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x32\n\tincrement\x18\x06 \x01(\x0b\x32\x1f.otg.PatternFlowVxlanVniCounter\x12\x32\n\tdecrement\x18\x07 \x01(\x0b\x32\x1f.otg.PatternFlowVxlanVniCounter\x12\x36\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32!.otg.PatternFlowVxlanVniMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"z\n PatternFlowVxlanReserved1Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x80\x01\n\"PatternFlowVxlanReserved1MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9f\x03\n\x19PatternFlowVxlanReserved1\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowVxlanReserved1.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x38\n\tincrement\x18\x05 \x01(\x0b\x32%.otg.PatternFlowVxlanReserved1Counter\x12\x38\n\tdecrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowVxlanReserved1Counter\x12<\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\'.otg.PatternFlowVxlanReserved1MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowIpv4VersionCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowIpv4VersionMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowIpv4Version\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowIpv4Version.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowIpv4VersionCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowIpv4VersionCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowIpv4VersionMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"|\n\"PatternFlowIpv4HeaderLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowIpv4HeaderLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xcf\x03\n\x1bPatternFlowIpv4HeaderLength\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowIpv4HeaderLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12:\n\tincrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowIpv4HeaderLengthCounter\x12:\n\tdecrement\x18\x07 \x01(\x0b\x32\'.otg.PatternFlowIpv4HeaderLengthCounter\x12>\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32).otg.PatternFlowIpv4HeaderLengthMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"{\n!PatternFlowIpv4TotalLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x81\x01\n#PatternFlowIpv4TotalLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xca\x03\n\x1aPatternFlowIpv4TotalLength\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.PatternFlowIpv4TotalLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x39\n\tincrement\x18\x06 \x01(\x0b\x32&.otg.PatternFlowIpv4TotalLengthCounter\x12\x39\n\tdecrement\x18\x07 \x01(\x0b\x32&.otg.PatternFlowIpv4TotalLengthCounter\x12=\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32(.otg.PatternFlowIpv4TotalLengthMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"~\n$PatternFlowIpv4IdentificationCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowIpv4IdentificationMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowIpv4Identification\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIpv4Identification.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowIpv4IdentificationCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowIpv4IdentificationCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowIpv4IdentificationMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowIpv4ReservedCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowIpv4ReservedMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowIpv4Reserved\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowIpv4Reserved.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowIpv4ReservedCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowIpv4ReservedCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowIpv4ReservedMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"|\n\"PatternFlowIpv4DontFragmentCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowIpv4DontFragmentMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowIpv4DontFragment\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowIpv4DontFragment.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowIpv4DontFragmentCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowIpv4DontFragmentCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowIpv4DontFragmentMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowIpv4MoreFragmentsCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowIpv4MoreFragmentsMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowIpv4MoreFragments\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowIpv4MoreFragments.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowIpv4MoreFragmentsCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowIpv4MoreFragmentsCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowIpv4MoreFragmentsMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"~\n$PatternFlowIpv4FragmentOffsetCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowIpv4FragmentOffsetMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowIpv4FragmentOffset\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIpv4FragmentOffset.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowIpv4FragmentOffsetCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowIpv4FragmentOffsetCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowIpv4FragmentOffsetMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"z\n PatternFlowIpv4TimeToLiveCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x80\x01\n\"PatternFlowIpv4TimeToLiveMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9f\x03\n\x19PatternFlowIpv4TimeToLive\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowIpv4TimeToLive.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x38\n\tincrement\x18\x05 \x01(\x0b\x32%.otg.PatternFlowIpv4TimeToLiveCounter\x12\x38\n\tdecrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowIpv4TimeToLiveCounter\x12<\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\'.otg.PatternFlowIpv4TimeToLiveMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowIpv4ProtocolCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowIpv4ProtocolMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xbb\x03\n\x17PatternFlowIpv4Protocol\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowIpv4Protocol.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x36\n\tincrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowIpv4ProtocolCounter\x12\x36\n\tdecrement\x18\x07 \x01(\x0b\x32#.otg.PatternFlowIpv4ProtocolCounter\x12:\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32%.otg.PatternFlowIpv4ProtocolMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"\xdf\x02\n\x1dPatternFlowIpv4HeaderChecksum\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIpv4HeaderChecksum.Choice.EnumH\x00\x88\x01\x01\x12I\n\tgenerated\x18\x02 \x01(\x0e\x32\x31.otg.PatternFlowIpv4HeaderChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"s\n\x19PatternFlowIpv4SrcCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"y\n\x1bPatternFlowIpv4SrcMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xfc\x02\n\x12PatternFlowIpv4Src\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.PatternFlowIpv4Src.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x31\n\tincrement\x18\x05 \x01(\x0b\x32\x1e.otg.PatternFlowIpv4SrcCounter\x12\x31\n\tdecrement\x18\x06 \x01(\x0b\x32\x1e.otg.PatternFlowIpv4SrcCounter\x12\x35\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32 .otg.PatternFlowIpv4SrcMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"s\n\x19PatternFlowIpv4DstCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"y\n\x1bPatternFlowIpv4DstMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xfc\x02\n\x12PatternFlowIpv4Dst\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.PatternFlowIpv4Dst.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x31\n\tincrement\x18\x05 \x01(\x0b\x32\x1e.otg.PatternFlowIpv4DstCounter\x12\x31\n\tdecrement\x18\x06 \x01(\x0b\x32\x1e.otg.PatternFlowIpv4DstCounter\x12\x35\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32 .otg.PatternFlowIpv4DstMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x8b\x01\n1PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xa5\x03\n*PatternFlowIpv4OptionsCustomTypeCopiedFlag\x12P\n\x06\x63hoice\x18\x01 \x01(\x0e\x32;.otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12I\n\tincrement\x18\x05 \x01(\x0b\x32\x36.otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter\x12I\n\tdecrement\x18\x06 \x01(\x0b\x32\x36.otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x8c\x01\n2PatternFlowIpv4OptionsCustomTypeOptionClassCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xa9\x03\n+PatternFlowIpv4OptionsCustomTypeOptionClass\x12Q\n\x06\x63hoice\x18\x01 \x01(\x0e\x32<.otg.PatternFlowIpv4OptionsCustomTypeOptionClass.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12J\n\tincrement\x18\x05 \x01(\x0b\x32\x37.otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter\x12J\n\tdecrement\x18\x06 \x01(\x0b\x32\x37.otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x8d\x01\n3PatternFlowIpv4OptionsCustomTypeOptionNumberCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xad\x03\n,PatternFlowIpv4OptionsCustomTypeOptionNumber\x12R\n\x06\x63hoice\x18\x01 \x01(\x0e\x32=.otg.PatternFlowIpv4OptionsCustomTypeOptionNumber.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12K\n\tincrement\x18\x05 \x01(\x0b\x32\x38.otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter\x12K\n\tdecrement\x18\x06 \x01(\x0b\x32\x38.otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"{\n!PatternFlowIpv4PriorityRawCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x81\x01\n#PatternFlowIpv4PriorityRawMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa4\x03\n\x1aPatternFlowIpv4PriorityRaw\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.PatternFlowIpv4PriorityRaw.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x39\n\tincrement\x18\x05 \x01(\x0b\x32&.otg.PatternFlowIpv4PriorityRawCounter\x12\x39\n\tdecrement\x18\x06 \x01(\x0b\x32&.otg.PatternFlowIpv4PriorityRawCounter\x12=\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32(.otg.PatternFlowIpv4PriorityRawMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowIpv4DscpPhbCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowIpv4DscpPhbMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowIpv4DscpPhb\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowIpv4DscpPhb.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowIpv4DscpPhbCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowIpv4DscpPhbCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowIpv4DscpPhbMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowIpv4DscpEcnCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowIpv4DscpEcnMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowIpv4DscpEcn\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowIpv4DscpEcn.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowIpv4DscpEcnCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowIpv4DscpEcnCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowIpv4DscpEcnMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowIpv4TosPrecedenceCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowIpv4TosPrecedenceMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowIpv4TosPrecedence\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowIpv4TosPrecedence.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowIpv4TosPrecedenceCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowIpv4TosPrecedenceCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowIpv4TosPrecedenceMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowIpv4TosDelayCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowIpv4TosDelayMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowIpv4TosDelay\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowIpv4TosDelay.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowIpv4TosDelayCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowIpv4TosDelayCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowIpv4TosDelayMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowIpv4TosThroughputCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowIpv4TosThroughputMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowIpv4TosThroughput\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowIpv4TosThroughput.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowIpv4TosThroughputCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowIpv4TosThroughputCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowIpv4TosThroughputMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"~\n$PatternFlowIpv4TosReliabilityCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowIpv4TosReliabilityMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowIpv4TosReliability\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIpv4TosReliability.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowIpv4TosReliabilityCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowIpv4TosReliabilityCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowIpv4TosReliabilityMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"{\n!PatternFlowIpv4TosMonetaryCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x81\x01\n#PatternFlowIpv4TosMonetaryMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa4\x03\n\x1aPatternFlowIpv4TosMonetary\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.PatternFlowIpv4TosMonetary.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x39\n\tincrement\x18\x05 \x01(\x0b\x32&.otg.PatternFlowIpv4TosMonetaryCounter\x12\x39\n\tdecrement\x18\x06 \x01(\x0b\x32&.otg.PatternFlowIpv4TosMonetaryCounter\x12=\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32(.otg.PatternFlowIpv4TosMonetaryMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"y\n\x1fPatternFlowIpv4TosUnusedCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x7f\n!PatternFlowIpv4TosUnusedMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9a\x03\n\x18PatternFlowIpv4TosUnused\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.PatternFlowIpv4TosUnused.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x37\n\tincrement\x18\x05 \x01(\x0b\x32$.otg.PatternFlowIpv4TosUnusedCounter\x12\x37\n\tdecrement\x18\x06 \x01(\x0b\x32$.otg.PatternFlowIpv4TosUnusedCounter\x12;\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32&.otg.PatternFlowIpv4TosUnusedMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowIpv6VersionCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowIpv6VersionMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowIpv6Version\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowIpv6Version.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowIpv6VersionCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowIpv6VersionCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowIpv6VersionMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"|\n\"PatternFlowIpv6TrafficClassCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowIpv6TrafficClassMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowIpv6TrafficClass\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowIpv6TrafficClass.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowIpv6TrafficClassCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowIpv6TrafficClassCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowIpv6TrafficClassMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"y\n\x1fPatternFlowIpv6FlowLabelCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x7f\n!PatternFlowIpv6FlowLabelMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9a\x03\n\x18PatternFlowIpv6FlowLabel\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.PatternFlowIpv6FlowLabel.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x37\n\tincrement\x18\x05 \x01(\x0b\x32$.otg.PatternFlowIpv6FlowLabelCounter\x12\x37\n\tdecrement\x18\x06 \x01(\x0b\x32$.otg.PatternFlowIpv6FlowLabelCounter\x12;\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32&.otg.PatternFlowIpv6FlowLabelMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowIpv6PayloadLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowIpv6PayloadLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xd4\x03\n\x1cPatternFlowIpv6PayloadLength\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowIpv6PayloadLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12;\n\tincrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowIpv6PayloadLengthCounter\x12;\n\tdecrement\x18\x07 \x01(\x0b\x32(.otg.PatternFlowIpv6PayloadLengthCounter\x12?\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32*.otg.PatternFlowIpv6PayloadLengthMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"z\n PatternFlowIpv6NextHeaderCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x80\x01\n\"PatternFlowIpv6NextHeaderMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc5\x03\n\x19PatternFlowIpv6NextHeader\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowIpv6NextHeader.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x38\n\tincrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowIpv6NextHeaderCounter\x12\x38\n\tdecrement\x18\x07 \x01(\x0b\x32%.otg.PatternFlowIpv6NextHeaderCounter\x12<\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32\'.otg.PatternFlowIpv6NextHeaderMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"x\n\x1ePatternFlowIpv6HopLimitCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowIpv6HopLimitMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowIpv6HopLimit\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowIpv6HopLimit.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowIpv6HopLimitCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowIpv6HopLimitCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowIpv6HopLimitMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"s\n\x19PatternFlowIpv6SrcCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"y\n\x1bPatternFlowIpv6SrcMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xfc\x02\n\x12PatternFlowIpv6Src\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.PatternFlowIpv6Src.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x31\n\tincrement\x18\x05 \x01(\x0b\x32\x1e.otg.PatternFlowIpv6SrcCounter\x12\x31\n\tdecrement\x18\x06 \x01(\x0b\x32\x1e.otg.PatternFlowIpv6SrcCounter\x12\x35\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32 .otg.PatternFlowIpv6SrcMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"s\n\x19PatternFlowIpv6DstCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"y\n\x1bPatternFlowIpv6DstMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xfc\x02\n\x12PatternFlowIpv6Dst\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.PatternFlowIpv6Dst.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x31\n\tincrement\x18\x05 \x01(\x0b\x32\x1e.otg.PatternFlowIpv6DstCounter\x12\x31\n\tdecrement\x18\x06 \x01(\x0b\x32\x1e.otg.PatternFlowIpv6DstCounter\x12\x35\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32 .otg.PatternFlowIpv6DstMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowPfcPauseDstCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowPfcPauseDstMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowPfcPauseDst\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowPfcPauseDst.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowPfcPauseDstCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowPfcPauseDstCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowPfcPauseDstMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowPfcPauseSrcCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowPfcPauseSrcMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowPfcPauseSrc\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowPfcPauseSrc.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowPfcPauseSrcCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowPfcPauseSrcCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowPfcPauseSrcMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowPfcPauseEtherTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowPfcPauseEtherTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowPfcPauseEtherType\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowPfcPauseEtherType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowPfcPauseEtherTypeCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowPfcPauseEtherTypeCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowPfcPauseEtherTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x81\x01\n\'PatternFlowPfcPauseControlOpCodeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x87\x01\n)PatternFlowPfcPauseControlOpCodeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc2\x03\n PatternFlowPfcPauseControlOpCode\x12\x46\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x31.otg.PatternFlowPfcPauseControlOpCode.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12?\n\tincrement\x18\x05 \x01(\x0b\x32,.otg.PatternFlowPfcPauseControlOpCodeCounter\x12?\n\tdecrement\x18\x06 \x01(\x0b\x32,.otg.PatternFlowPfcPauseControlOpCodeCounter\x12\x43\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32..otg.PatternFlowPfcPauseControlOpCodeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x85\x01\n+PatternFlowPfcPauseClassEnableVectorCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8b\x01\n-PatternFlowPfcPauseClassEnableVectorMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xd6\x03\n$PatternFlowPfcPauseClassEnableVector\x12J\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x35.otg.PatternFlowPfcPauseClassEnableVector.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x43\n\tincrement\x18\x05 \x01(\x0b\x32\x30.otg.PatternFlowPfcPauseClassEnableVectorCounter\x12\x43\n\tdecrement\x18\x06 \x01(\x0b\x32\x30.otg.PatternFlowPfcPauseClassEnableVectorCounter\x12G\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x32.otg.PatternFlowPfcPauseClassEnableVectorMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass0Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass0MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass0\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass0.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass0Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass0Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass0MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass1Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass1MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass1\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass1.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass1Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass1Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass1MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass2Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass2MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass2\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass2.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass2Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass2Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass2MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass3Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass3MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass3\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass3.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass3Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass3Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass3MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass4Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass4MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass4\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass4.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass4Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass4Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass4MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass5Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass5MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass5\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass5.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass5Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass5Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass5MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass6Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass6MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass6\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass6.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass6Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass6Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass6MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass7Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass7MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass7\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass7.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass7Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass7Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass7MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"|\n\"PatternFlowEthernetPauseDstCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowEthernetPauseDstMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowEthernetPauseDst\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowEthernetPauseDst.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowEthernetPauseDstCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowEthernetPauseDstCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowEthernetPauseDstMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"|\n\"PatternFlowEthernetPauseSrcCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowEthernetPauseSrcMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowEthernetPauseSrc\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowEthernetPauseSrc.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowEthernetPauseSrcCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowEthernetPauseSrcCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowEthernetPauseSrcMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x82\x01\n(PatternFlowEthernetPauseEtherTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x88\x01\n*PatternFlowEthernetPauseEtherTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc7\x03\n!PatternFlowEthernetPauseEtherType\x12G\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x32.otg.PatternFlowEthernetPauseEtherType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12@\n\tincrement\x18\x05 \x01(\x0b\x32-.otg.PatternFlowEthernetPauseEtherTypeCounter\x12@\n\tdecrement\x18\x06 \x01(\x0b\x32-.otg.PatternFlowEthernetPauseEtherTypeCounter\x12\x44\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32/.otg.PatternFlowEthernetPauseEtherTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x86\x01\n,PatternFlowEthernetPauseControlOpCodeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8c\x01\n.PatternFlowEthernetPauseControlOpCodeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xdb\x03\n%PatternFlowEthernetPauseControlOpCode\x12K\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x36.otg.PatternFlowEthernetPauseControlOpCode.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x44\n\tincrement\x18\x05 \x01(\x0b\x32\x31.otg.PatternFlowEthernetPauseControlOpCodeCounter\x12\x44\n\tdecrement\x18\x06 \x01(\x0b\x32\x31.otg.PatternFlowEthernetPauseControlOpCodeCounter\x12H\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x33.otg.PatternFlowEthernetPauseControlOpCodeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowEthernetPauseTimeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowEthernetPauseTimeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowEthernetPauseTime\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowEthernetPauseTime.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowEthernetPauseTimeCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowEthernetPauseTimeCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowEthernetPauseTimeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowTcpSrcPortCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowTcpSrcPortMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowTcpSrcPort\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowTcpSrcPort.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowTcpSrcPortCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowTcpSrcPortCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowTcpSrcPortMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowTcpDstPortCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowTcpDstPortMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowTcpDstPort\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowTcpDstPort.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowTcpDstPortCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowTcpDstPortCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowTcpDstPortMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpSeqNumCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpSeqNumMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpSeqNum\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpSeqNum.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpSeqNumCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpSeqNumCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpSeqNumMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpAckNumCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpAckNumMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpAckNum\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpAckNum.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpAckNumCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpAckNumCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpAckNumMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"y\n\x1fPatternFlowTcpDataOffsetCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x7f\n!PatternFlowTcpDataOffsetMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9a\x03\n\x18PatternFlowTcpDataOffset\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.PatternFlowTcpDataOffset.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x37\n\tincrement\x18\x05 \x01(\x0b\x32$.otg.PatternFlowTcpDataOffsetCounter\x12\x37\n\tdecrement\x18\x06 \x01(\x0b\x32$.otg.PatternFlowTcpDataOffsetCounter\x12;\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32&.otg.PatternFlowTcpDataOffsetMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"t\n\x1aPatternFlowTcpEcnNsCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"z\n\x1cPatternFlowTcpEcnNsMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x81\x03\n\x13PatternFlowTcpEcnNs\x12\x39\n\x06\x63hoice\x18\x01 \x01(\x0e\x32$.otg.PatternFlowTcpEcnNs.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x32\n\tincrement\x18\x05 \x01(\x0b\x32\x1f.otg.PatternFlowTcpEcnNsCounter\x12\x32\n\tdecrement\x18\x06 \x01(\x0b\x32\x1f.otg.PatternFlowTcpEcnNsCounter\x12\x36\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32!.otg.PatternFlowTcpEcnNsMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpEcnCwrCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpEcnCwrMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpEcnCwr\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpEcnCwr.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpEcnCwrCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpEcnCwrCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpEcnCwrMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowTcpEcnEchoCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowTcpEcnEchoMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowTcpEcnEcho\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowTcpEcnEcho.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowTcpEcnEchoCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowTcpEcnEchoCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowTcpEcnEchoMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpCtlUrgCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpCtlUrgMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpCtlUrg\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpCtlUrg.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpCtlUrgCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpCtlUrgCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpCtlUrgMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpCtlAckCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpCtlAckMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpCtlAck\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpCtlAck.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpCtlAckCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpCtlAckCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpCtlAckMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpCtlPshCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpCtlPshMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpCtlPsh\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpCtlPsh.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpCtlPshCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpCtlPshCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpCtlPshMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpCtlRstCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpCtlRstMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpCtlRst\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpCtlRst.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpCtlRstCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpCtlRstCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpCtlRstMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpCtlSynCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpCtlSynMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpCtlSyn\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpCtlSyn.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpCtlSynCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpCtlSynCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpCtlSynMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpCtlFinCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpCtlFinMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpCtlFin\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpCtlFin.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpCtlFinCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpCtlFinCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpCtlFinMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpWindowCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpWindowMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpWindow\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpWindow.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpWindowCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpWindowCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpWindowMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowUdpSrcPortCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowUdpSrcPortMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowUdpSrcPort\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowUdpSrcPort.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowUdpSrcPortCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowUdpSrcPortCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowUdpSrcPortMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowUdpDstPortCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowUdpDstPortMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowUdpDstPort\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowUdpDstPort.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowUdpDstPortCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowUdpDstPortCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowUdpDstPortMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowUdpLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowUdpLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowUdpLength\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowUdpLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowUdpLengthCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowUdpLengthCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowUdpLengthMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xca\x02\n\x16PatternFlowUdpChecksum\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowUdpChecksum.Choice.EnumH\x00\x88\x01\x01\x12\x42\n\tgenerated\x18\x02 \x01(\x0e\x32*.otg.PatternFlowUdpChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"~\n$PatternFlowGreChecksumPresentCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowGreChecksumPresentMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowGreChecksumPresent\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowGreChecksumPresent.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowGreChecksumPresentCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowGreChecksumPresentCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowGreChecksumPresentMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowGreReserved0Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowGreReserved0MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowGreReserved0\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowGreReserved0.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowGreReserved0Counter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowGreReserved0Counter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowGreReserved0MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowGreVersionCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowGreVersionMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowGreVersion\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowGreVersion.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowGreVersionCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowGreVersionCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowGreVersionMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowGreProtocolCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowGreProtocolMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowGreProtocol\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowGreProtocol.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowGreProtocolCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowGreProtocolCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowGreProtocolMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xca\x02\n\x16PatternFlowGreChecksum\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowGreChecksum.Choice.EnumH\x00\x88\x01\x01\x12\x42\n\tgenerated\x18\x02 \x01(\x0e\x32*.otg.PatternFlowGreChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"x\n\x1ePatternFlowGreReserved1Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowGreReserved1MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowGreReserved1\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowGreReserved1.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowGreReserved1Counter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowGreReserved1Counter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowGreReserved1MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowGtpv1VersionCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowGtpv1VersionMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowGtpv1Version\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowGtpv1Version.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowGtpv1VersionCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowGtpv1VersionCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowGtpv1VersionMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowGtpv1ProtocolTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowGtpv1ProtocolTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowGtpv1ProtocolType\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowGtpv1ProtocolType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowGtpv1ProtocolTypeCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowGtpv1ProtocolTypeCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowGtpv1ProtocolTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"y\n\x1fPatternFlowGtpv1ReservedCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x7f\n!PatternFlowGtpv1ReservedMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9a\x03\n\x18PatternFlowGtpv1Reserved\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.PatternFlowGtpv1Reserved.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x37\n\tincrement\x18\x05 \x01(\x0b\x32$.otg.PatternFlowGtpv1ReservedCounter\x12\x37\n\tdecrement\x18\x06 \x01(\x0b\x32$.otg.PatternFlowGtpv1ReservedCounter\x12;\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32&.otg.PatternFlowGtpv1ReservedMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowGtpv1EFlagCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowGtpv1EFlagMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowGtpv1EFlag\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowGtpv1EFlag.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowGtpv1EFlagCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowGtpv1EFlagCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowGtpv1EFlagMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowGtpv1SFlagCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowGtpv1SFlagMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowGtpv1SFlag\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowGtpv1SFlag.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowGtpv1SFlagCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowGtpv1SFlagCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowGtpv1SFlagMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowGtpv1PnFlagCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowGtpv1PnFlagMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowGtpv1PnFlag\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowGtpv1PnFlag.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowGtpv1PnFlagCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowGtpv1PnFlagCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowGtpv1PnFlagMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"|\n\"PatternFlowGtpv1MessageTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowGtpv1MessageTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowGtpv1MessageType\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowGtpv1MessageType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowGtpv1MessageTypeCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowGtpv1MessageTypeCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowGtpv1MessageTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"~\n$PatternFlowGtpv1MessageLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowGtpv1MessageLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowGtpv1MessageLength\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowGtpv1MessageLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowGtpv1MessageLengthCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowGtpv1MessageLengthCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowGtpv1MessageLengthMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowGtpv1TeidCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowGtpv1TeidMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowGtpv1Teid\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowGtpv1Teid.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowGtpv1TeidCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowGtpv1TeidCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowGtpv1TeidMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"~\n$PatternFlowGtpv1SquenceNumberCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowGtpv1SquenceNumberMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowGtpv1SquenceNumber\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowGtpv1SquenceNumber.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowGtpv1SquenceNumberCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowGtpv1SquenceNumberCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowGtpv1SquenceNumberMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"{\n!PatternFlowGtpv1NPduNumberCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x81\x01\n#PatternFlowGtpv1NPduNumberMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa4\x03\n\x1aPatternFlowGtpv1NPduNumber\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.PatternFlowGtpv1NPduNumber.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x39\n\tincrement\x18\x05 \x01(\x0b\x32&.otg.PatternFlowGtpv1NPduNumberCounter\x12\x39\n\tdecrement\x18\x06 \x01(\x0b\x32&.otg.PatternFlowGtpv1NPduNumberCounter\x12=\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32(.otg.PatternFlowGtpv1NPduNumberMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x88\x01\n.PatternFlowGtpv1NextExtensionHeaderTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8e\x01\n0PatternFlowGtpv1NextExtensionHeaderTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xe5\x03\n\'PatternFlowGtpv1NextExtensionHeaderType\x12M\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x38.otg.PatternFlowGtpv1NextExtensionHeaderType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x46\n\tincrement\x18\x05 \x01(\x0b\x32\x33.otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter\x12\x46\n\tdecrement\x18\x06 \x01(\x0b\x32\x33.otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter\x12J\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x35.otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x87\x01\n-PatternFlowGtpExtensionExtensionLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8d\x01\n/PatternFlowGtpExtensionExtensionLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xe0\x03\n&PatternFlowGtpExtensionExtensionLength\x12L\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x37.otg.PatternFlowGtpExtensionExtensionLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x45\n\tincrement\x18\x05 \x01(\x0b\x32\x32.otg.PatternFlowGtpExtensionExtensionLengthCounter\x12\x45\n\tdecrement\x18\x06 \x01(\x0b\x32\x32.otg.PatternFlowGtpExtensionExtensionLengthCounter\x12I\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x34.otg.PatternFlowGtpExtensionExtensionLengthMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x80\x01\n&PatternFlowGtpExtensionContentsCounter\x12\x12\n\x05start\x18\x01 \x01(\x04H\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\x04H\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x86\x01\n(PatternFlowGtpExtensionContentsMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\x04H\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xbd\x03\n\x1fPatternFlowGtpExtensionContents\x12\x45\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x30.otg.PatternFlowGtpExtensionContents.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\x04\x12>\n\tincrement\x18\x05 \x01(\x0b\x32+.otg.PatternFlowGtpExtensionContentsCounter\x12>\n\tdecrement\x18\x06 \x01(\x0b\x32+.otg.PatternFlowGtpExtensionContentsCounter\x12\x42\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32-.otg.PatternFlowGtpExtensionContentsMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x8b\x01\n1PatternFlowGtpExtensionNextExtensionHeaderCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x91\x01\n3PatternFlowGtpExtensionNextExtensionHeaderMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xf4\x03\n*PatternFlowGtpExtensionNextExtensionHeader\x12P\n\x06\x63hoice\x18\x01 \x01(\x0e\x32;.otg.PatternFlowGtpExtensionNextExtensionHeader.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12I\n\tincrement\x18\x05 \x01(\x0b\x32\x36.otg.PatternFlowGtpExtensionNextExtensionHeaderCounter\x12I\n\tdecrement\x18\x06 \x01(\x0b\x32\x36.otg.PatternFlowGtpExtensionNextExtensionHeaderCounter\x12M\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x38.otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowGtpv2VersionCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowGtpv2VersionMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowGtpv2Version\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowGtpv2Version.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowGtpv2VersionCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowGtpv2VersionCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowGtpv2VersionMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x81\x01\n\'PatternFlowGtpv2PiggybackingFlagCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x87\x01\n)PatternFlowGtpv2PiggybackingFlagMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc2\x03\n PatternFlowGtpv2PiggybackingFlag\x12\x46\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x31.otg.PatternFlowGtpv2PiggybackingFlag.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12?\n\tincrement\x18\x05 \x01(\x0b\x32,.otg.PatternFlowGtpv2PiggybackingFlagCounter\x12?\n\tdecrement\x18\x06 \x01(\x0b\x32,.otg.PatternFlowGtpv2PiggybackingFlagCounter\x12\x43\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32..otg.PatternFlowGtpv2PiggybackingFlagMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"y\n\x1fPatternFlowGtpv2TeidFlagCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x7f\n!PatternFlowGtpv2TeidFlagMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9a\x03\n\x18PatternFlowGtpv2TeidFlag\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.PatternFlowGtpv2TeidFlag.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x37\n\tincrement\x18\x05 \x01(\x0b\x32$.otg.PatternFlowGtpv2TeidFlagCounter\x12\x37\n\tdecrement\x18\x06 \x01(\x0b\x32$.otg.PatternFlowGtpv2TeidFlagCounter\x12;\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32&.otg.PatternFlowGtpv2TeidFlagMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowGtpv2Spare1Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowGtpv2Spare1MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowGtpv2Spare1\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowGtpv2Spare1.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowGtpv2Spare1Counter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowGtpv2Spare1Counter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowGtpv2Spare1MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"|\n\"PatternFlowGtpv2MessageTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowGtpv2MessageTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowGtpv2MessageType\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowGtpv2MessageType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowGtpv2MessageTypeCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowGtpv2MessageTypeCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowGtpv2MessageTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"~\n$PatternFlowGtpv2MessageLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowGtpv2MessageLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowGtpv2MessageLength\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowGtpv2MessageLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowGtpv2MessageLengthCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowGtpv2MessageLengthCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowGtpv2MessageLengthMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowGtpv2TeidCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowGtpv2TeidMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowGtpv2Teid\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowGtpv2Teid.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowGtpv2TeidCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowGtpv2TeidCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowGtpv2TeidMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowGtpv2SequenceNumberCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowGtpv2SequenceNumberMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowGtpv2SequenceNumber\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowGtpv2SequenceNumber.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowGtpv2SequenceNumberCounter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowGtpv2SequenceNumberCounter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowGtpv2SequenceNumberMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowGtpv2Spare2Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowGtpv2Spare2MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowGtpv2Spare2\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowGtpv2Spare2.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowGtpv2Spare2Counter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowGtpv2Spare2Counter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowGtpv2Spare2MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"{\n!PatternFlowArpHardwareTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x81\x01\n#PatternFlowArpHardwareTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa4\x03\n\x1aPatternFlowArpHardwareType\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.PatternFlowArpHardwareType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x39\n\tincrement\x18\x05 \x01(\x0b\x32&.otg.PatternFlowArpHardwareTypeCounter\x12\x39\n\tdecrement\x18\x06 \x01(\x0b\x32&.otg.PatternFlowArpHardwareTypeCounter\x12=\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32(.otg.PatternFlowArpHardwareTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"{\n!PatternFlowArpProtocolTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x81\x01\n#PatternFlowArpProtocolTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa4\x03\n\x1aPatternFlowArpProtocolType\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.PatternFlowArpProtocolType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x39\n\tincrement\x18\x05 \x01(\x0b\x32&.otg.PatternFlowArpProtocolTypeCounter\x12\x39\n\tdecrement\x18\x06 \x01(\x0b\x32&.otg.PatternFlowArpProtocolTypeCounter\x12=\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32(.otg.PatternFlowArpProtocolTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowArpHardwareLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowArpHardwareLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowArpHardwareLength\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowArpHardwareLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowArpHardwareLengthCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowArpHardwareLengthCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowArpHardwareLengthMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowArpProtocolLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowArpProtocolLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowArpProtocolLength\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowArpProtocolLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowArpProtocolLengthCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowArpProtocolLengthCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowArpProtocolLengthMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowArpOperationCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowArpOperationMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowArpOperation\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowArpOperation.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowArpOperationCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowArpOperationCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowArpOperationMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x81\x01\n\'PatternFlowArpSenderHardwareAddrCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x87\x01\n)PatternFlowArpSenderHardwareAddrMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc2\x03\n PatternFlowArpSenderHardwareAddr\x12\x46\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x31.otg.PatternFlowArpSenderHardwareAddr.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12?\n\tincrement\x18\x05 \x01(\x0b\x32,.otg.PatternFlowArpSenderHardwareAddrCounter\x12?\n\tdecrement\x18\x06 \x01(\x0b\x32,.otg.PatternFlowArpSenderHardwareAddrCounter\x12\x43\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32..otg.PatternFlowArpSenderHardwareAddrMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x81\x01\n\'PatternFlowArpSenderProtocolAddrCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x87\x01\n)PatternFlowArpSenderProtocolAddrMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc2\x03\n PatternFlowArpSenderProtocolAddr\x12\x46\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x31.otg.PatternFlowArpSenderProtocolAddr.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12?\n\tincrement\x18\x05 \x01(\x0b\x32,.otg.PatternFlowArpSenderProtocolAddrCounter\x12?\n\tdecrement\x18\x06 \x01(\x0b\x32,.otg.PatternFlowArpSenderProtocolAddrCounter\x12\x43\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32..otg.PatternFlowArpSenderProtocolAddrMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x81\x01\n\'PatternFlowArpTargetHardwareAddrCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x87\x01\n)PatternFlowArpTargetHardwareAddrMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc2\x03\n PatternFlowArpTargetHardwareAddr\x12\x46\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x31.otg.PatternFlowArpTargetHardwareAddr.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12?\n\tincrement\x18\x05 \x01(\x0b\x32,.otg.PatternFlowArpTargetHardwareAddrCounter\x12?\n\tdecrement\x18\x06 \x01(\x0b\x32,.otg.PatternFlowArpTargetHardwareAddrCounter\x12\x43\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32..otg.PatternFlowArpTargetHardwareAddrMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x81\x01\n\'PatternFlowArpTargetProtocolAddrCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x87\x01\n)PatternFlowArpTargetProtocolAddrMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc2\x03\n PatternFlowArpTargetProtocolAddr\x12\x46\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x31.otg.PatternFlowArpTargetProtocolAddr.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12?\n\tincrement\x18\x05 \x01(\x0b\x32,.otg.PatternFlowArpTargetProtocolAddrCounter\x12?\n\tdecrement\x18\x06 \x01(\x0b\x32,.otg.PatternFlowArpTargetProtocolAddrCounter\x12\x43\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32..otg.PatternFlowArpTargetProtocolAddrMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowIcmpEchoTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowIcmpEchoTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowIcmpEchoType\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowIcmpEchoType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowIcmpEchoTypeCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowIcmpEchoTypeCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowIcmpEchoTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowIcmpEchoCodeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowIcmpEchoCodeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowIcmpEchoCode\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowIcmpEchoCode.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowIcmpEchoCodeCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowIcmpEchoCodeCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowIcmpEchoCodeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xd9\x02\n\x1bPatternFlowIcmpEchoChecksum\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowIcmpEchoChecksum.Choice.EnumH\x00\x88\x01\x01\x12G\n\tgenerated\x18\x02 \x01(\x0e\x32/.otg.PatternFlowIcmpEchoChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"~\n$PatternFlowIcmpEchoIdentifierCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowIcmpEchoIdentifierMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowIcmpEchoIdentifier\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIcmpEchoIdentifier.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowIcmpEchoIdentifierCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowIcmpEchoIdentifierCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowIcmpEchoIdentifierMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x82\x01\n(PatternFlowIcmpEchoSequenceNumberCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x88\x01\n*PatternFlowIcmpEchoSequenceNumberMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc7\x03\n!PatternFlowIcmpEchoSequenceNumber\x12G\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x32.otg.PatternFlowIcmpEchoSequenceNumber.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12@\n\tincrement\x18\x05 \x01(\x0b\x32-.otg.PatternFlowIcmpEchoSequenceNumberCounter\x12@\n\tdecrement\x18\x06 \x01(\x0b\x32-.otg.PatternFlowIcmpEchoSequenceNumberCounter\x12\x44\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32/.otg.PatternFlowIcmpEchoSequenceNumberMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xdf\x02\n\x1dPatternFlowIcmpCommonChecksum\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIcmpCommonChecksum.Choice.EnumH\x00\x88\x01\x01\x12I\n\tgenerated\x18\x02 \x01(\x0e\x32\x31.otg.PatternFlowIcmpCommonChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"\x84\x01\n*PatternFlowIcmpNextFieldsIdentifierCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8a\x01\n,PatternFlowIcmpNextFieldsIdentifierMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xd1\x03\n#PatternFlowIcmpNextFieldsIdentifier\x12I\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x34.otg.PatternFlowIcmpNextFieldsIdentifier.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x42\n\tincrement\x18\x05 \x01(\x0b\x32/.otg.PatternFlowIcmpNextFieldsIdentifierCounter\x12\x42\n\tdecrement\x18\x06 \x01(\x0b\x32/.otg.PatternFlowIcmpNextFieldsIdentifierCounter\x12\x46\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x31.otg.PatternFlowIcmpNextFieldsIdentifierMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x88\x01\n.PatternFlowIcmpNextFieldsSequenceNumberCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8e\x01\n0PatternFlowIcmpNextFieldsSequenceNumberMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xe5\x03\n\'PatternFlowIcmpNextFieldsSequenceNumber\x12M\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x38.otg.PatternFlowIcmpNextFieldsSequenceNumber.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x46\n\tincrement\x18\x05 \x01(\x0b\x32\x33.otg.PatternFlowIcmpNextFieldsSequenceNumberCounter\x12\x46\n\tdecrement\x18\x06 \x01(\x0b\x32\x33.otg.PatternFlowIcmpNextFieldsSequenceNumberCounter\x12J\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x35.otg.PatternFlowIcmpNextFieldsSequenceNumberMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"z\n PatternFlowIcmpv6EchoTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x80\x01\n\"PatternFlowIcmpv6EchoTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9f\x03\n\x19PatternFlowIcmpv6EchoType\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowIcmpv6EchoType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x38\n\tincrement\x18\x05 \x01(\x0b\x32%.otg.PatternFlowIcmpv6EchoTypeCounter\x12\x38\n\tdecrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowIcmpv6EchoTypeCounter\x12<\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\'.otg.PatternFlowIcmpv6EchoTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"z\n PatternFlowIcmpv6EchoCodeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x80\x01\n\"PatternFlowIcmpv6EchoCodeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9f\x03\n\x19PatternFlowIcmpv6EchoCode\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowIcmpv6EchoCode.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x38\n\tincrement\x18\x05 \x01(\x0b\x32%.otg.PatternFlowIcmpv6EchoCodeCounter\x12\x38\n\tdecrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowIcmpv6EchoCodeCounter\x12<\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\'.otg.PatternFlowIcmpv6EchoCodeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x80\x01\n&PatternFlowIcmpv6EchoIdentifierCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x86\x01\n(PatternFlowIcmpv6EchoIdentifierMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xbd\x03\n\x1fPatternFlowIcmpv6EchoIdentifier\x12\x45\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x30.otg.PatternFlowIcmpv6EchoIdentifier.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12>\n\tincrement\x18\x05 \x01(\x0b\x32+.otg.PatternFlowIcmpv6EchoIdentifierCounter\x12>\n\tdecrement\x18\x06 \x01(\x0b\x32+.otg.PatternFlowIcmpv6EchoIdentifierCounter\x12\x42\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32-.otg.PatternFlowIcmpv6EchoIdentifierMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x84\x01\n*PatternFlowIcmpv6EchoSequenceNumberCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8a\x01\n,PatternFlowIcmpv6EchoSequenceNumberMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xd1\x03\n#PatternFlowIcmpv6EchoSequenceNumber\x12I\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x34.otg.PatternFlowIcmpv6EchoSequenceNumber.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x42\n\tincrement\x18\x05 \x01(\x0b\x32/.otg.PatternFlowIcmpv6EchoSequenceNumberCounter\x12\x42\n\tdecrement\x18\x06 \x01(\x0b\x32/.otg.PatternFlowIcmpv6EchoSequenceNumberCounter\x12\x46\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x31.otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xdf\x02\n\x1dPatternFlowIcmpv6EchoChecksum\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIcmpv6EchoChecksum.Choice.EnumH\x00\x88\x01\x01\x12I\n\tgenerated\x18\x02 \x01(\x0e\x32\x31.otg.PatternFlowIcmpv6EchoChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"\xe5\x02\n\x1fPatternFlowIcmpv6CommonChecksum\x12\x45\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x30.otg.PatternFlowIcmpv6CommonChecksum.Choice.EnumH\x00\x88\x01\x01\x12K\n\tgenerated\x18\x02 \x01(\x0e\x32\x33.otg.PatternFlowIcmpv6CommonChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"v\n\x1cPatternFlowPppAddressCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowPppAddressMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowPppAddress\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowPppAddress.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowPppAddressCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowPppAddressCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowPppAddressMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowPppControlCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowPppControlMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowPppControl\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowPppControl.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowPppControlCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowPppControlCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowPppControlMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"{\n!PatternFlowPppProtocolTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x81\x01\n#PatternFlowPppProtocolTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xca\x03\n\x1aPatternFlowPppProtocolType\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.PatternFlowPppProtocolType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x39\n\tincrement\x18\x06 \x01(\x0b\x32&.otg.PatternFlowPppProtocolTypeCounter\x12\x39\n\tdecrement\x18\x07 \x01(\x0b\x32&.otg.PatternFlowPppProtocolTypeCounter\x12=\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32(.otg.PatternFlowPppProtocolTypeMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"y\n\x1fPatternFlowIgmpv1VersionCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x7f\n!PatternFlowIgmpv1VersionMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9a\x03\n\x18PatternFlowIgmpv1Version\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.PatternFlowIgmpv1Version.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x37\n\tincrement\x18\x05 \x01(\x0b\x32$.otg.PatternFlowIgmpv1VersionCounter\x12\x37\n\tdecrement\x18\x06 \x01(\x0b\x32$.otg.PatternFlowIgmpv1VersionCounter\x12;\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32&.otg.PatternFlowIgmpv1VersionMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowIgmpv1TypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowIgmpv1TypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowIgmpv1Type\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowIgmpv1Type.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowIgmpv1TypeCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowIgmpv1TypeCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowIgmpv1TypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowIgmpv1UnusedCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowIgmpv1UnusedMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowIgmpv1Unused\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowIgmpv1Unused.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowIgmpv1UnusedCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowIgmpv1UnusedCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowIgmpv1UnusedMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xd3\x02\n\x19PatternFlowIgmpv1Checksum\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowIgmpv1Checksum.Choice.EnumH\x00\x88\x01\x01\x12\x45\n\tgenerated\x18\x02 \x01(\x0e\x32-.otg.PatternFlowIgmpv1Checksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"~\n$PatternFlowIgmpv1GroupAddressCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowIgmpv1GroupAddressMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowIgmpv1GroupAddress\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIgmpv1GroupAddress.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowIgmpv1GroupAddressCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowIgmpv1GroupAddressCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowIgmpv1GroupAddressMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowMplsLabelCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowMplsLabelMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xac\x03\n\x14PatternFlowMplsLabel\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowMplsLabel.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x33\n\tincrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowMplsLabelCounter\x12\x33\n\tdecrement\x18\x07 \x01(\x0b\x32 .otg.PatternFlowMplsLabelCounter\x12\x37\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32\".otg.PatternFlowMplsLabelMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"|\n\"PatternFlowMplsTrafficClassCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowMplsTrafficClassMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowMplsTrafficClass\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowMplsTrafficClass.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowMplsTrafficClassCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowMplsTrafficClassCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowMplsTrafficClassMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowMplsBottomOfStackCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowMplsBottomOfStackMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xd4\x03\n\x1cPatternFlowMplsBottomOfStack\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowMplsBottomOfStack.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12;\n\tincrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowMplsBottomOfStackCounter\x12;\n\tdecrement\x18\x07 \x01(\x0b\x32(.otg.PatternFlowMplsBottomOfStackCounter\x12?\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32*.otg.PatternFlowMplsBottomOfStackMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"z\n PatternFlowMplsTimeToLiveCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x80\x01\n\"PatternFlowMplsTimeToLiveMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9f\x03\n\x19PatternFlowMplsTimeToLive\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowMplsTimeToLive.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x38\n\tincrement\x18\x05 \x01(\x0b\x32%.otg.PatternFlowMplsTimeToLiveCounter\x12\x38\n\tdecrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowMplsTimeToLiveCounter\x12<\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\'.otg.PatternFlowMplsTimeToLiveMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"z\n PatternFlowSnmpv2cVersionCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xe1\x02\n\x19PatternFlowSnmpv2cVersion\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowSnmpv2cVersion.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x38\n\tincrement\x18\x05 \x01(\x0b\x32%.otg.PatternFlowSnmpv2cVersionCounter\x12\x38\n\tdecrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowSnmpv2cVersionCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowSnmpv2cPDURequestIdCounter\x12\x12\n\x05start\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\x05H\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xf5\x02\n\x1ePatternFlowSnmpv2cPDURequestId\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowSnmpv2cPDURequestId.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\x05\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowSnmpv2cPDURequestIdCounter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowSnmpv2cPDURequestIdCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x80\x01\n&PatternFlowSnmpv2cPDUErrorIndexCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xf9\x02\n\x1fPatternFlowSnmpv2cPDUErrorIndex\x12\x45\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x30.otg.PatternFlowSnmpv2cPDUErrorIndex.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12>\n\tincrement\x18\x05 \x01(\x0b\x32+.otg.PatternFlowSnmpv2cPDUErrorIndexCounter\x12>\n\tdecrement\x18\x06 \x01(\x0b\x32+.otg.PatternFlowSnmpv2cPDUErrorIndexCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x83\x01\n)PatternFlowSnmpv2cBulkPDURequestIdCounter\x12\x12\n\x05start\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\x05H\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x03\n\"PatternFlowSnmpv2cBulkPDURequestId\x12H\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x33.otg.PatternFlowSnmpv2cBulkPDURequestId.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\x05\x12\x41\n\tincrement\x18\x05 \x01(\x0b\x32..otg.PatternFlowSnmpv2cBulkPDURequestIdCounter\x12\x41\n\tdecrement\x18\x06 \x01(\x0b\x32..otg.PatternFlowSnmpv2cBulkPDURequestIdCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xe7\x01\n%PatternFlowSnmpv2cBulkPDUNonRepeaters\x12K\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x36.otg.PatternFlowSnmpv2cBulkPDUNonRepeaters.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x1a\x38\n\x06\x43hoice\".\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x42\t\n\x07_choiceB\x08\n\x06_value\"\x88\x01\n.PatternFlowSnmpv2cBulkPDUMaxRepetitionsCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x99\x03\n\'PatternFlowSnmpv2cBulkPDUMaxRepetitions\x12M\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x38.otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x46\n\tincrement\x18\x05 \x01(\x0b\x32\x33.otg.PatternFlowSnmpv2cBulkPDUMaxRepetitionsCounter\x12\x46\n\tdecrement\x18\x06 \x01(\x0b\x32\x33.otg.PatternFlowSnmpv2cBulkPDUMaxRepetitionsCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x93\x01\n9PatternFlowSnmpv2cVariableBindingValueIntegerValueCounter\x12\x12\n\x05start\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\x05H\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xc5\x03\n2PatternFlowSnmpv2cVariableBindingValueIntegerValue\x12X\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x43.otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\x05\x12Q\n\tincrement\x18\x05 \x01(\x0b\x32>.otg.PatternFlowSnmpv2cVariableBindingValueIntegerValueCounter\x12Q\n\tdecrement\x18\x06 \x01(\x0b\x32>.otg.PatternFlowSnmpv2cVariableBindingValueIntegerValueCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x95\x01\n;PatternFlowSnmpv2cVariableBindingValueIpAddressValueCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xcd\x03\n4PatternFlowSnmpv2cVariableBindingValueIpAddressValue\x12Z\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x45.otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12S\n\tincrement\x18\x05 \x01(\x0b\x32@.otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValueCounter\x12S\n\tdecrement\x18\x06 \x01(\x0b\x32@.otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValueCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x93\x01\n9PatternFlowSnmpv2cVariableBindingValueCounterValueCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xc5\x03\n2PatternFlowSnmpv2cVariableBindingValueCounterValue\x12X\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x43.otg.PatternFlowSnmpv2cVariableBindingValueCounterValue.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12Q\n\tincrement\x18\x05 \x01(\x0b\x32>.otg.PatternFlowSnmpv2cVariableBindingValueCounterValueCounter\x12Q\n\tdecrement\x18\x06 \x01(\x0b\x32>.otg.PatternFlowSnmpv2cVariableBindingValueCounterValueCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x95\x01\n;PatternFlowSnmpv2cVariableBindingValueTimeticksValueCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xcd\x03\n4PatternFlowSnmpv2cVariableBindingValueTimeticksValue\x12Z\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x45.otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12S\n\tincrement\x18\x05 \x01(\x0b\x32@.otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValueCounter\x12S\n\tdecrement\x18\x06 \x01(\x0b\x32@.otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValueCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x96\x01\n.otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter\x12Q\n\tdecrement\x18\x06 \x01(\x0b\x32>.otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x93\x01\n9PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xc5\x03\n2PatternFlowRSVPPathSenderTspecIntServServiceHeader\x12X\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x43.otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12Q\n\tincrement\x18\x05 \x01(\x0b\x32>.otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter\x12Q\n\tdecrement\x18\x06 \x01(\x0b\x32>.otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x8d\x01\n3PatternFlowRSVPPathSenderTspecIntServZeroBitCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xad\x03\n,PatternFlowRSVPPathSenderTspecIntServZeroBit\x12R\n\x06\x63hoice\x18\x01 \x01(\x0e\x32=.otg.PatternFlowRSVPPathSenderTspecIntServZeroBit.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12K\n\tincrement\x18\x05 \x01(\x0b\x32\x38.otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter\x12K\n\tdecrement\x18\x06 \x01(\x0b\x32\x38.otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x8f\x01\n5PatternFlowRSVPPathSenderTspecIntServReserved2Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xb5\x03\n.PatternFlowRSVPPathSenderTspecIntServReserved2\x12T\n\x06\x63hoice\x18\x01 \x01(\x0e\x32?.otg.PatternFlowRSVPPathSenderTspecIntServReserved2.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12M\n\tincrement\x18\x05 \x01(\x0b\x32:.otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter\x12M\n\tdecrement\x18\x06 \x01(\x0b\x32:.otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x99\x01\n?PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xdd\x03\n8PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData\x12^\n\x06\x63hoice\x18\x01 \x01(\x0e\x32I.otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12W\n\tincrement\x18\x05 \x01(\x0b\x32\x44.otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter\x12W\n\tdecrement\x18\x06 \x01(\x0b\x32\x44.otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xa1\x01\nGPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xfd\x03\n@PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec\x12\x66\n\x06\x63hoice\x18\x01 \x01(\x0e\x32Q.otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12_\n\tincrement\x18\x05 \x01(\x0b\x32L.otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter\x12_\n\tdecrement\x18\x06 \x01(\x0b\x32L.otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x96\x01\nPatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xd9\x03\n7PatternFlowRSVPPathSenderTspecIntServParameter127Length\x12]\n\x06\x63hoice\x18\x01 \x01(\x0e\x32H.otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12V\n\tincrement\x18\x05 \x01(\x0b\x32\x43.otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter\x12V\n\tdecrement\x18\x06 \x01(\x0b\x32\x43.otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x98\x01\n>PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xd9\x03\n7PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit\x12]\n\x06\x63hoice\x18\x01 \x01(\x0e\x32H.otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12V\n\tincrement\x18\x05 \x01(\x0b\x32\x43.otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter\x12V\n\tdecrement\x18\x06 \x01(\x0b\x32\x43.otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x97\x01\n=PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xd5\x03\n6PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize\x12\\\n\x06\x63hoice\x18\x01 \x01(\x0e\x32G.otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12U\n\tincrement\x18\x05 \x01(\x0b\x32\x42.otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter\x12U\n\tdecrement\x18\x06 \x01(\x0b\x32\x42.otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x9a\x01\n@PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xe1\x03\n9PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address\x12_\n\x06\x63hoice\x18\x01 \x01(\x0e\x32J.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12X\n\tincrement\x18\x05 \x01(\x0b\x32\x45.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter\x12X\n\tdecrement\x18\x06 \x01(\x0b\x32\x45.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x9b\x01\nAPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xe5\x03\n:PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength\x12`\n\x06\x63hoice\x18\x01 \x01(\x0e\x32K.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12Y\n\tincrement\x18\x05 \x01(\x0b\x32\x46.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter\x12Y\n\tdecrement\x18\x06 \x01(\x0b\x32\x46.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xf7\x01\n-PatternFlowRSVPPathRecordRouteType1LabelFlags\x12S\n\x06\x63hoice\x18\x01 \x01(\x0e\x32>.otg.PatternFlowRSVPPathRecordRouteType1LabelFlags.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x1a\x38\n\x06\x43hoice\".\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x42\t\n\x07_choiceB\x08\n\x06_value\"\xf7\x01\n-PatternFlowRSVPPathRecordRouteType1LabelCType\x12S\n\x06\x63hoice\x18\x01 \x01(\x0e\x32>.otg.PatternFlowRSVPPathRecordRouteType1LabelCType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x1a\x38\n\x06\x43hoice\".\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x42\t\n\x07_choiceB\x08\n\x06_value\"\x85\x01\n+PatternFlowRSVPPathObjectsCustomTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8d\x03\n$PatternFlowRSVPPathObjectsCustomType\x12J\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x35.otg.PatternFlowRSVPPathObjectsCustomType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x43\n\tincrement\x18\x05 \x01(\x0b\x32\x30.otg.PatternFlowRSVPPathObjectsCustomTypeCounter\x12\x43\n\tdecrement\x18\x06 \x01(\x0b\x32\x30.otg.PatternFlowRSVPPathObjectsCustomTypeCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x91\x01\n\x07Version\x12\x1d\n\x10\x61pi_spec_version\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bsdk_version\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0b\x61pp_version\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x13\n\x11_api_spec_versionB\x0e\n\x0c_sdk_versionB\x0e\n\x0c_app_version\"(\n\x07Success\x12\x1d\n\x07warning\x18\x01 \x01(\x0b\x32\x0c.otg.Warning\"$\n\x07\x46\x61ilure\x12\x19\n\x05\x65rror\x18\x01 \x01(\x0b\x32\n.otg.Error\"/\n\x10SetConfigRequest\x12\x1b\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x0b.otg.Config\"?\n\x13UpdateConfigRequest\x12(\n\rconfig_update\x18\x01 \x01(\x0b\x32\x11.otg.ConfigUpdate\"2\n\x11SetConfigResponse\x12\x1d\n\x07warning\x18\x01 \x01(\x0b\x32\x0c.otg.Warning\"0\n\x11GetConfigResponse\x12\x1b\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x0b.otg.Config\"5\n\x14UpdateConfigResponse\x12\x1d\n\x07warning\x18\x01 \x01(\x0b\x32\x0c.otg.Warning\"B\n\x16SetControlStateRequest\x12(\n\rcontrol_state\x18\x01 \x01(\x0b\x32\x11.otg.ControlState\"8\n\x17SetControlStateResponse\x12\x1d\n\x07warning\x18\x01 \x01(\x0b\x32\x0c.otg.Warning\"E\n\x17SetControlActionRequest\x12*\n\x0e\x63ontrol_action\x18\x01 \x01(\x0b\x32\x12.otg.ControlAction\"W\n\x18SetControlActionResponse\x12;\n\x17\x63ontrol_action_response\x18\x01 \x01(\x0b\x32\x1a.otg.ControlActionResponse\"A\n\x11GetMetricsRequest\x12,\n\x0fmetrics_request\x18\x01 \x01(\x0b\x32\x13.otg.MetricsRequest\"D\n\x12GetMetricsResponse\x12.\n\x10metrics_response\x18\x01 \x01(\x0b\x32\x14.otg.MetricsResponse\">\n\x10GetStatesRequest\x12*\n\x0estates_request\x18\x01 \x01(\x0b\x32\x12.otg.StatesRequest\"A\n\x11GetStatesResponse\x12,\n\x0fstates_response\x18\x01 \x01(\x0b\x32\x13.otg.StatesResponse\"A\n\x11GetCaptureRequest\x12,\n\x0f\x63\x61pture_request\x18\x01 \x01(\x0b\x32\x13.otg.CaptureRequest\",\n\x12GetCaptureResponse\x12\x16\n\x0eresponse_bytes\x18\x01 \x01(\x0c\"3\n\x12GetVersionResponse\x12\x1d\n\x07version\x18\x01 \x01(\x0b\x32\x0c.otg.Version2\xdf\x04\n\x07Openapi\x12:\n\tSetConfig\x12\x15.otg.SetConfigRequest\x1a\x16.otg.SetConfigResponse\x12;\n\tGetConfig\x12\x16.google.protobuf.Empty\x1a\x16.otg.GetConfigResponse\x12\x43\n\x0cUpdateConfig\x12\x18.otg.UpdateConfigRequest\x1a\x19.otg.UpdateConfigResponse\x12L\n\x0fSetControlState\x12\x1b.otg.SetControlStateRequest\x1a\x1c.otg.SetControlStateResponse\x12O\n\x10SetControlAction\x12\x1c.otg.SetControlActionRequest\x1a\x1d.otg.SetControlActionResponse\x12=\n\nGetMetrics\x12\x16.otg.GetMetricsRequest\x1a\x17.otg.GetMetricsResponse\x12:\n\tGetStates\x12\x15.otg.GetStatesRequest\x1a\x16.otg.GetStatesResponse\x12=\n\nGetCapture\x12\x16.otg.GetCaptureRequest\x1a\x17.otg.GetCaptureResponse\x12=\n\nGetVersion\x12\x16.google.protobuf.Empty\x1a\x17.otg.GetVersionResponseB\x0bZ\t./otg;otgb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\totg.proto\x12\x03otg\x1a google/protobuf/descriptor.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x89\x02\n\x06\x43onfig\x12\x18\n\x05ports\x18\x01 \x03(\x0b\x32\t.otg.Port\x12\x16\n\x04lags\x18\x02 \x03(\x0b\x32\x08.otg.Lag\x12\x1b\n\x06layer1\x18\x03 \x03(\x0b\x32\x0b.otg.Layer1\x12\x1e\n\x08\x63\x61ptures\x18\x04 \x03(\x0b\x32\x0c.otg.Capture\x12\x1c\n\x07\x64\x65vices\x18\x05 \x03(\x0b\x32\x0b.otg.Device\x12\x18\n\x05\x66lows\x18\x06 \x03(\x0b\x32\t.otg.Flow\x12\x1a\n\x06\x65vents\x18\x07 \x01(\x0b\x32\n.otg.Event\x12#\n\x07options\x18\x08 \x01(\x0b\x32\x12.otg.ConfigOptions\x12\x17\n\x04lldp\x18\t \x03(\x0b\x32\t.otg.Lldp\"g\n\rConfigOptions\x12&\n\x0cport_options\x18\x01 \x01(\x0b\x32\x10.otg.PortOptions\x12.\n\x10protocol_options\x18\x02 \x01(\x0b\x32\x14.otg.ProtocolOptions\"F\n\x04Port\x12\x15\n\x08location\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04name\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_locationB\x07\n\x05_name\"G\n\x0bPortOptions\x12 \n\x13location_preemption\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x16\n\x14_location_preemption\"\x88\x01\n\x03Lag\x12\x1b\n\x05ports\x18\x01 \x03(\x0b\x32\x0c.otg.LagPort\x12\"\n\x08protocol\x18\x02 \x01(\x0b\x32\x10.otg.LagProtocol\x12\x16\n\tmin_links\x18\x03 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04name\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x0c\n\n_min_linksB\x07\n\x05_name\"z\n\x07LagPort\x12\x16\n\tport_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x04lacp\x18\x02 \x01(\x0b\x32\x10.otg.LagPortLacp\x12)\n\x08\x65thernet\x18\x03 \x01(\x0b\x32\x17.otg.DeviceEthernetBaseB\x0c\n\n_port_name\"\xd0\x01\n\x0bLagProtocol\x12\x31\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1c.otg.LagProtocol.Choice.EnumH\x00\x88\x01\x01\x12\"\n\x04lacp\x18\x02 \x01(\x0b\x32\x14.otg.LagProtocolLacp\x12&\n\x06static\x18\x03 \x01(\x0b\x32\x16.otg.LagProtocolStatic\x1a\x37\n\x06\x43hoice\"-\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04lacp\x10\x01\x12\n\n\x06static\x10\x02\x42\t\n\x07_choice\"3\n\x11LagProtocolStatic\x12\x13\n\x06lag_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\t\n\x07_lag_id\"\xa7\x01\n\x0fLagProtocolLacp\x12\x1c\n\x0f\x61\x63tor_system_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x15\x61\x63tor_system_priority\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x16\n\tactor_key\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x12\n\x10_actor_system_idB\x18\n\x16_actor_system_priorityB\x0c\n\n_actor_key\"\x93\x03\n\x0bLagPortLacp\x12\x1e\n\x11\x61\x63tor_port_number\x18\x01 \x01(\rH\x00\x88\x01\x01\x12 \n\x13\x61\x63tor_port_priority\x18\x02 \x01(\rH\x01\x88\x01\x01\x12@\n\x0e\x61\x63tor_activity\x18\x03 \x01(\x0e\x32#.otg.LagPortLacp.ActorActivity.EnumH\x02\x88\x01\x01\x12*\n\x1dlacpdu_periodic_time_interval\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1b\n\x0elacpdu_timeout\x18\x05 \x01(\rH\x04\x88\x01\x01\x1a\x41\n\rActorActivity\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07passive\x10\x01\x12\n\n\x06\x61\x63tive\x10\x02\x42\x14\n\x12_actor_port_numberB\x16\n\x14_actor_port_priorityB\x11\n\x0f_actor_activityB \n\x1e_lacpdu_periodic_time_intervalB\x11\n\x0f_lacpdu_timeout\"\x84\x01\n\x12\x44\x65viceEthernetBase\x12\x10\n\x03mac\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03mtu\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1e\n\x05vlans\x18\x03 \x03(\x0b\x32\x0f.otg.DeviceVlan\x12\x11\n\x04name\x18\x04 \x01(\tH\x02\x88\x01\x01\x42\x06\n\x04_macB\x06\n\x04_mtuB\x07\n\x05_name\"\xe7\x02\n\x0e\x44\x65viceEthernet\x12+\n\nconnection\x18\x02 \x01(\x0b\x32\x17.otg.EthernetConnection\x12\'\n\x0eipv4_addresses\x18\x03 \x03(\x0b\x32\x0f.otg.DeviceIpv4\x12\'\n\x0eipv6_addresses\x18\x04 \x03(\x0b\x32\x0f.otg.DeviceIpv6\x12\x10\n\x03mac\x18\x05 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03mtu\x18\x06 \x01(\rH\x01\x88\x01\x01\x12\x1e\n\x05vlans\x18\x07 \x03(\x0b\x32\x0f.otg.DeviceVlan\x12\x11\n\x04name\x18\x08 \x01(\tH\x02\x88\x01\x01\x12\x32\n\x11\x64hcpv4_interfaces\x18\t \x03(\x0b\x32\x17.otg.DeviceDhcpv4client\x12\x32\n\x11\x64hcpv6_interfaces\x18\n \x03(\x0b\x32\x17.otg.DeviceDhcpv6clientB\x06\n\x04_macB\x06\n\x04_mtuB\x07\n\x05_name\"\xe3\x02\n\x12\x45thernetConnection\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.EthernetConnection.Choice.EnumH\x00\x88\x01\x01\x12\x16\n\tport_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08lag_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nvxlan_name\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x32\n\x0esimulated_link\x18\x05 \x01(\x0b\x32\x1a.otg.EthernetSimulatedLink\x1a\x62\n\x06\x43hoice\"X\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tport_name\x10\x01\x12\x0c\n\x08lag_name\x10\x02\x12\x0e\n\nvxlan_name\x10\x03\x12\x12\n\x0esimulated_link\x10\x04\x42\t\n\x07_choiceB\x0c\n\n_port_nameB\x0b\n\t_lag_nameB\r\n\x0b_vxlan_name\"\xe6\x01\n\x15\x45thernetSimulatedLink\x12\"\n\x15remote_simulated_link\x18\x01 \x01(\tH\x00\x88\x01\x01\x12@\n\tlink_type\x18\x02 \x01(\x0e\x32(.otg.EthernetSimulatedLink.LinkType.EnumH\x01\x88\x01\x01\x1a?\n\x08LinkType\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07primary\x10\x01\x12\r\n\tsecondary\x10\x02\x42\x18\n\x16_remote_simulated_linkB\x0c\n\n_link_type\"\xf3\x01\n\nDeviceVlan\x12,\n\x04tpid\x18\x01 \x01(\x0e\x32\x19.otg.DeviceVlan.Tpid.EnumH\x00\x88\x01\x01\x12\x15\n\x08priority\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0f\n\x02id\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x11\n\x04name\x18\x04 \x01(\tH\x03\x88\x01\x01\x1aV\n\x04Tpid\"N\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05x8100\x10\x01\x12\t\n\x05x88A8\x10\x02\x12\t\n\x05x9100\x10\x03\x12\t\n\x05x9200\x10\x04\x12\t\n\x05x9300\x10\x05\x42\x07\n\x05_tpidB\x0b\n\t_priorityB\x05\n\x03_idB\x07\n\x05_name\"\xbc\x01\n\nDeviceIpv4\x12\x14\n\x07gateway\x18\x01 \x01(\tH\x00\x88\x01\x01\x12.\n\x0bgateway_mac\x18\x02 \x01(\x0b\x32\x19.otg.DeviceIpv4GatewayMAC\x12\x14\n\x07\x61\x64\x64ress\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06prefix\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x11\n\x04name\x18\x05 \x01(\tH\x03\x88\x01\x01\x42\n\n\x08_gatewayB\n\n\x08_addressB\t\n\x07_prefixB\x07\n\x05_name\"v\n\x12\x44\x65viceIpv4Loopback\x12\x15\n\x08\x65th_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x61\x64\x64ress\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x0b\n\t_eth_nameB\n\n\x08_addressB\x07\n\x05_name\"\xcf\x01\n\x14\x44\x65viceIpv4GatewayMAC\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.DeviceIpv4GatewayMAC.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xbc\x01\n\nDeviceIpv6\x12\x14\n\x07gateway\x18\x01 \x01(\tH\x00\x88\x01\x01\x12.\n\x0bgateway_mac\x18\x02 \x01(\x0b\x32\x19.otg.DeviceIpv6GatewayMAC\x12\x14\n\x07\x61\x64\x64ress\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06prefix\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x11\n\x04name\x18\x05 \x01(\tH\x03\x88\x01\x01\x42\n\n\x08_gatewayB\n\n\x08_addressB\t\n\x07_prefixB\x07\n\x05_name\"v\n\x12\x44\x65viceIpv6Loopback\x12\x15\n\x08\x65th_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x61\x64\x64ress\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x0b\n\t_eth_nameB\n\n\x08_addressB\x07\n\x05_name\"\xcf\x01\n\x14\x44\x65viceIpv6GatewayMAC\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.DeviceIpv6GatewayMAC.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xce\x02\n\x12\x44\x65viceDhcpv4client\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x38\n\x06\x63hoice\x18\x02 \x01(\x0e\x32#.otg.DeviceDhcpv4client.Choice.EnumH\x01\x88\x01\x01\x12\x1b\n\x0eserver_address\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x16\n\tbroadcast\x18\x05 \x01(\x08H\x03\x88\x01\x01\x12\x38\n\x17parameters_request_list\x18\x06 \x01(\x0b\x32\x17.otg.Dhcpv4ClientParams\x1aG\n\x06\x43hoice\"=\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0c\x66irst_server\x10\x01\x12\x12\n\x0eserver_address\x10\x02\x42\x07\n\x05_nameB\t\n\x07_choiceB\x11\n\x0f_server_addressB\x0c\n\n_broadcast\"\xbe\x01\n\x12\x44hcpv4ClientParams\x12\x18\n\x0bsubnet_mask\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x13\n\x06router\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1a\n\rrenewal_timer\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x1c\n\x0frebinding_timer\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\x0e\n\x0c_subnet_maskB\t\n\x07_routerB\x10\n\x0e_renewal_timerB\x12\n\x10_rebinding_timer\"\xb1\x02\n\x12\x44\x65viceDhcpv6client\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0crapid_commit\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12.\n\x07ia_type\x18\x03 \x01(\x0b\x32\x1d.otg.DeviceDhcpv6clientIaType\x12\x32\n\tduid_type\x18\x04 \x01(\x0b\x32\x1f.otg.DeviceDhcpv6clientDuidType\x12>\n\x0foptions_request\x18\x05 \x01(\x0b\x32%.otg.DeviceDhcpv6ClientOptionsRequest\x12/\n\x07options\x18\x06 \x01(\x0b\x32\x1e.otg.DeviceDhcpv6ClientOptionsB\x07\n\x05_nameB\x0f\n\r_rapid_commit\"\xa7\x01\n DeviceDhcpv6ClientOptionsRequest\x12\x37\n\x07request\x18\x01 \x03(\x0b\x32&.otg.Dhcpv6ClientOptionsOptionsRequest\x12J\n\x18\x61ssociated_dhcp_messages\x18\x02 \x01(\x0b\x32(.otg.Dhcpv6ClientOptionsIncludedMessages\"\x80\x02\n\x19\x44\x65viceDhcpv6ClientOptions\x12\x43\n\x11server_identifier\x18\x01 \x01(\x0b\x32(.otg.Dhcpv6ClientOptionsServerIdentifier\x12\x39\n\x0cvendor_class\x18\x02 \x01(\x0b\x32#.otg.Dhcpv6ClientOptionsVendorClass\x12\x37\n\x0bvendor_info\x18\x03 \x01(\x0b\x32\".otg.Dhcpv6ClientOptionsVendorInfo\x12*\n\x04\x66qdn\x18\x04 \x01(\x0b\x32\x1c.otg.Dhcpv6ClientOptionsFqdn\"\xca\x02\n\x18\x44\x65viceDhcpv6clientIaType\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.DeviceDhcpv6clientIaType.Choice.EnumH\x00\x88\x01\x01\x12\x30\n\x04iana\x18\x02 \x01(\x0b\x32\".otg.DeviceDhcpv6clientIaTimeValue\x12\x30\n\x04iapd\x18\x03 \x01(\x0b\x32\".otg.DeviceDhcpv6clientIaTimeValue\x12\x32\n\x06ianapd\x18\x04 \x01(\x0b\x32\".otg.DeviceDhcpv6clientIaTimeValue\x1aK\n\x06\x43hoice\"A\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04iana\x10\x01\x12\x08\n\x04iata\x10\x02\x12\x08\n\x04iapd\x10\x03\x12\n\n\x06ianapd\x10\x04\x42\t\n\x07_choice\"O\n\x1d\x44\x65viceDhcpv6clientIaTimeValue\x12\x0f\n\x02t1\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x0f\n\x02t2\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x05\n\x03_t1B\x05\n\x03_t2\"\xaa\x02\n\x1a\x44\x65viceDhcpv6clientDuidType\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.DeviceDhcpv6clientDuidType.Choice.EnumH\x00\x88\x01\x01\x12*\n\x03llt\x18\x02 \x01(\x0b\x32\x1d.otg.DeviceDhcpv6clientNoDuid\x12,\n\x02\x65n\x18\x03 \x01(\x0b\x32 .otg.DeviceDhcpv6clientDuidValue\x12)\n\x02ll\x18\x04 \x01(\x0b\x32\x1d.otg.DeviceDhcpv6clientNoDuid\x1a:\n\x06\x43hoice\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03llt\x10\x01\x12\x06\n\x02\x65n\x10\x02\x12\x06\n\x02ll\x10\x03\x42\t\n\x07_choice\"q\n\x1b\x44\x65viceDhcpv6clientDuidValue\x12\x1a\n\renterprise_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x16\n\tvendor_id\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x10\n\x0e_enterprise_idB\x0c\n\n_vendor_id\"\x1a\n\x18\x44\x65viceDhcpv6clientNoDuid\"\x9f\x03\n#Dhcpv6ClientOptionsServerIdentifier\x12I\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x34.otg.Dhcpv6ClientOptionsServerIdentifier.Choice.EnumH\x00\x88\x01\x01\x12\x31\n\x08\x64uid_llt\x18\x02 \x01(\x0b\x32\x1f.otg.Dhcpv6ClientOptionsDuidLlt\x12/\n\x07\x64uid_en\x18\x03 \x01(\x0b\x32\x1e.otg.Dhcpv6ClientOptionsDuidEn\x12/\n\x07\x64uid_ll\x18\x04 \x01(\x0b\x32\x1e.otg.Dhcpv6ClientOptionsDuidLl\x12\x33\n\tduid_uuid\x18\x05 \x01(\x0b\x32 .otg.Dhcpv6ClientOptionsDuidUuid\x1aX\n\x06\x43hoice\"N\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08\x64uid_llt\x10\x01\x12\x0b\n\x07\x64uid_en\x10\x02\x12\x0b\n\x07\x64uid_ll\x10\x03\x12\r\n\tduid_uuid\x10\x04\x42\t\n\x07_choice\"~\n\x1a\x44hcpv6ClientOptionsDuidLlt\x12\x11\n\x04time\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x44\n\x12link_layer_address\x18\x02 \x01(\x0b\x32(.otg.Dhcpv6ClientOptionsLinkLayerAddressB\x07\n\x05_time\"y\n\x19\x44hcpv6ClientOptionsDuidEn\x12\x1e\n\x11\x65nterprise_number\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x17\n\nidentifier\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x14\n\x12_enterprise_numberB\r\n\x0b_identifier\"a\n\x19\x44hcpv6ClientOptionsDuidLl\x12\x44\n\x12link_layer_address\x18\x01 \x01(\x0b\x32(.otg.Dhcpv6ClientOptionsLinkLayerAddress\"\xa3\x03\n\x1b\x44hcpv6ClientOptionsDuidUuid\x12\x38\n\x07version\x18\x01 \x01(\x0b\x32\'.otg.Dhcpv6ClientOptionsDuidUuidVersion\x12\x38\n\x07variant\x18\x02 \x01(\x0b\x32\'.otg.Dhcpv6ClientOptionsDuidUuidVariant\x12\x15\n\x08time_low\x18\x03 \x01(\rH\x00\x88\x01\x01\x12\x15\n\x08time_mid\x18\x04 \x01(\rH\x01\x88\x01\x01\x12 \n\x13time_hi_and_version\x18\x05 \x01(\rH\x02\x88\x01\x01\x12&\n\x19\x63lock_seq_hi_and_reserved\x18\x06 \x01(\rH\x03\x88\x01\x01\x12\x1a\n\rclock_seq_low\x18\x07 \x01(\rH\x04\x88\x01\x01\x12\x11\n\x04node\x18\x08 \x01(\tH\x05\x88\x01\x01\x42\x0b\n\t_time_lowB\x0b\n\t_time_midB\x16\n\x14_time_hi_and_versionB\x1c\n\x1a_clock_seq_hi_and_reservedB\x10\n\x0e_clock_seq_lowB\x07\n\x05_node\"\xc9\x01\n\"Dhcpv6ClientOptionsDuidUuidVersion\x12H\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x33.otg.Dhcpv6ClientOptionsDuidUuidVersion.Choice.EnumH\x00\x88\x01\x01\x1aN\n\x06\x43hoice\"D\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03v_1\x10\x01\x12\x07\n\x03v_2\x10\x02\x12\x07\n\x03v_3\x10\x03\x12\x07\n\x03v_4\x10\x04\x12\x07\n\x03v_5\x10\x05\x42\t\n\x07_choice\"\xca\x01\n\"Dhcpv6ClientOptionsDuidUuidVariant\x12H\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x33.otg.Dhcpv6ClientOptionsDuidUuidVariant.Choice.EnumH\x00\x88\x01\x01\x1aO\n\x06\x43hoice\"E\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03ncs\x10\x01\x12\x07\n\x03\x64\x63\x65\x10\x02\x12\x08\n\x04guid\x10\x03\x12\x10\n\x0cvar_reserved\x10\x04\x42\t\n\x07_choice\"C\n#Dhcpv6ClientOptionsLinkLayerAddress\x12\x12\n\x05value\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"\xa6\x02\n!Dhcpv6ClientOptionsOptionsRequest\x12G\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x32.otg.Dhcpv6ClientOptionsOptionsRequest.Choice.EnumH\x00\x88\x01\x01\x12.\n\x06\x63ustom\x18\x02 \x01(\x0b\x32\x1e.otg.Dhcpv6ClientOptionsCustom\x1a}\n\x06\x43hoice\"s\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x16\n\x12vendor_information\x10\x01\x12\x10\n\x0cname_servers\x10\x02\x12\x08\n\x04\x66qdn\x10\x03\x12\x10\n\x0c\x62ootfile_url\x10\x04\x12\x08\n\x04sztp\x10\x05\x12\n\n\x06\x63ustom\x10\x06\x42\t\n\x07_choice\"7\n\x19\x44hcpv6ClientOptionsCustom\x12\x11\n\x04type\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x07\n\x05_type\"\xb6\x01\n\x1e\x44hcpv6ClientOptionsVendorClass\x12\x1e\n\x11\x65nterprise_number\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x12\n\nclass_data\x18\x02 \x03(\t\x12J\n\x18\x61ssociated_dhcp_messages\x18\x03 \x01(\x0b\x32(.otg.Dhcpv6ClientOptionsIncludedMessagesB\x14\n\x12_enterprise_number\"\xee\x01\n#Dhcpv6ClientOptionsIncludedMessages\x12I\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x34.otg.Dhcpv6ClientOptionsIncludedMessages.Choice.EnumH\x00\x88\x01\x01\x12\x36\n\tmsg_types\x18\x02 \x03(\x0b\x32#.otg.Dhcpv6ClientOptionsMessageType\x1a\x39\n\x06\x43hoice\"/\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03\x61ll\x10\x01\x12\r\n\tmsg_types\x10\x02\x42\t\n\x07_choice\"\xe6\x01\n\x1e\x44hcpv6ClientOptionsMessageType\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.Dhcpv6ClientOptionsMessageType.Choice.EnumH\x00\x88\x01\x01\x1as\n\x06\x43hoice\"i\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07solicit\x10\x01\x12\x0b\n\x07request\x10\x02\x12\x12\n\x0einform_request\x10\x03\x12\x0b\n\x07release\x10\x04\x12\t\n\x05renew\x10\x05\x12\n\n\x06rebind\x10\x06\x42\t\n\x07_choice\"\xdf\x01\n\x1d\x44hcpv6ClientOptionsVendorInfo\x12\x1e\n\x11\x65nterprise_number\x18\x01 \x01(\rH\x00\x88\x01\x01\x12<\n\x0boption_data\x18\x02 \x03(\x0b\x32\'.otg.Dhcpv6OptionsVendorSpecificOptions\x12J\n\x18\x61ssociated_dhcp_messages\x18\x03 \x01(\x0b\x32(.otg.Dhcpv6ClientOptionsIncludedMessagesB\x14\n\x12_enterprise_number\"\xdf\x01\n\x1d\x44hcpv6ServerOptionsVendorInfo\x12\x1e\n\x11\x65nterprise_number\x18\x01 \x01(\rH\x00\x88\x01\x01\x12<\n\x0boption_data\x18\x02 \x03(\x0b\x32\'.otg.Dhcpv6OptionsVendorSpecificOptions\x12J\n\x18\x61ssociated_dhcp_messages\x18\x03 \x01(\x0b\x32(.otg.Dhcpv6ServerOptionsIncludedMessagesB\x14\n\x12_enterprise_number\"\xee\x01\n#Dhcpv6ServerOptionsIncludedMessages\x12I\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x34.otg.Dhcpv6ServerOptionsIncludedMessages.Choice.EnumH\x00\x88\x01\x01\x12\x36\n\tmsg_types\x18\x02 \x03(\x0b\x32#.otg.Dhcpv6ServerOptionsMessageType\x1a\x39\n\x06\x43hoice\"/\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03\x61ll\x10\x01\x12\r\n\tmsg_types\x10\x02\x42\t\n\x07_choice\"\xc0\x01\n\x1e\x44hcpv6ServerOptionsMessageType\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.Dhcpv6ServerOptionsMessageType.Choice.EnumH\x00\x88\x01\x01\x1aM\n\x06\x43hoice\"C\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tadvertise\x10\x01\x12\t\n\x05reply\x10\x02\x12\x10\n\x0cre_configure\x10\x03\x42\t\n\x07_choice\"\\\n\"Dhcpv6OptionsVendorSpecificOptions\x12\x11\n\x04\x63ode\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04\x64\x61ta\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_codeB\x07\n\x05_data\"\xef\x01\n\x17\x44hcpv6ClientOptionsFqdn\x12\x13\n\x06\x66lag_s\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x13\n\x06\x66lag_o\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x13\n\x06\x66lag_n\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x18\n\x0b\x64omain_name\x18\x04 \x01(\tH\x03\x88\x01\x01\x12J\n\x18\x61ssociated_dhcp_messages\x18\x05 \x01(\x0b\x32(.otg.Dhcpv6ClientOptionsIncludedMessagesB\t\n\x07_flag_sB\t\n\x07_flag_oB\t\n\x07_flag_nB\x0e\n\x0c_domain_name\"\xc7\x01\n\x1e\x44hcpv6ServerOptionsBootfileUrl\x12\x10\n\x03url\x18\x01 \x01(\tH\x00\x88\x01\x01\x12?\n\x0f\x62ootfile_params\x18\x02 \x03(\x0b\x32&.otg.Dhcpv6ServerOptionsBootFileParams\x12J\n\x18\x61ssociated_dhcp_messages\x18\x03 \x01(\x0b\x32(.otg.Dhcpv6ServerOptionsIncludedMessagesB\x06\n\x04_url\"I\n!Dhcpv6ServerOptionsBootFileParams\x12\x16\n\tparameter\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_parameter\"\xa6\x06\n\x06Layer1\x12\x12\n\nport_names\x18\x01 \x03(\t\x12*\n\x05speed\x18\x02 \x01(\x0e\x32\x16.otg.Layer1.Speed.EnumH\x00\x88\x01\x01\x12*\n\x05media\x18\x03 \x01(\x0e\x32\x16.otg.Layer1.Media.EnumH\x01\x88\x01\x01\x12\x18\n\x0bpromiscuous\x18\x04 \x01(\x08H\x02\x88\x01\x01\x12\x10\n\x03mtu\x18\x05 \x01(\rH\x03\x88\x01\x01\x12 \n\x13ieee_media_defaults\x18\x06 \x01(\x08H\x04\x88\x01\x01\x12\x1b\n\x0e\x61uto_negotiate\x18\x07 \x01(\x08H\x05\x88\x01\x01\x12\x34\n\x10\x61uto_negotiation\x18\x08 \x01(\x0b\x32\x1a.otg.Layer1AutoNegotiation\x12,\n\x0c\x66low_control\x18\t \x01(\x0b\x32\x16.otg.Layer1FlowControl\x12\x11\n\x04name\x18\n \x01(\tH\x06\x88\x01\x01\x1a\xa9\x02\n\x05Speed\"\x9f\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x14\n\x10speed_10_fd_mbps\x10\x01\x12\x14\n\x10speed_10_hd_mbps\x10\x02\x12\x15\n\x11speed_100_fd_mbps\x10\x03\x12\x15\n\x11speed_100_hd_mbps\x10\x04\x12\x10\n\x0cspeed_1_gbps\x10\x05\x12\x11\n\rspeed_10_gbps\x10\x06\x12\x11\n\rspeed_25_gbps\x10\x07\x12\x11\n\rspeed_40_gbps\x10\x08\x12\x11\n\rspeed_50_gbps\x10\t\x12\x12\n\x0espeed_100_gbps\x10\n\x12\x12\n\x0espeed_200_gbps\x10\x0b\x12\x12\n\x0espeed_400_gbps\x10\x0c\x12\x12\n\x0espeed_800_gbps\x10\r\x1a\x42\n\x05Media\"9\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x63opper\x10\x01\x12\t\n\x05\x66iber\x10\x02\x12\t\n\x05sgmii\x10\x03\x42\x08\n\x06_speedB\x08\n\x06_mediaB\x0e\n\x0c_promiscuousB\x06\n\x04_mtuB\x16\n\x14_ieee_media_defaultsB\x11\n\x0f_auto_negotiateB\x07\n\x05_name\"\x93\x03\n\x15Layer1AutoNegotiation\x12 \n\x13\x61\x64vertise_1000_mbps\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x15\x61\x64vertise_100_fd_mbps\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\"\n\x15\x61\x64vertise_100_hd_mbps\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12!\n\x14\x61\x64vertise_10_fd_mbps\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12!\n\x14\x61\x64vertise_10_hd_mbps\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x1a\n\rlink_training\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x13\n\x06rs_fec\x18\x07 \x01(\x08H\x06\x88\x01\x01\x42\x16\n\x14_advertise_1000_mbpsB\x18\n\x16_advertise_100_fd_mbpsB\x18\n\x16_advertise_100_hd_mbpsB\x17\n\x15_advertise_10_fd_mbpsB\x17\n\x15_advertise_10_hd_mbpsB\x10\n\x0e_link_trainingB\t\n\x07_rs_fec\"\xac\x02\n\x11Layer1FlowControl\x12\x1d\n\x10\x64irected_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x06\x63hoice\x18\x02 \x01(\x0e\x32\".otg.Layer1FlowControl.Choice.EnumH\x01\x88\x01\x01\x12-\n\rieee_802_1qbb\x18\x03 \x01(\x0b\x32\x16.otg.Layer1Ieee8021qbb\x12)\n\x0bieee_802_3x\x18\x04 \x01(\x0b\x32\x14.otg.Layer1Ieee8023x\x1a\x45\n\x06\x43hoice\";\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rieee_802_1qbb\x10\x01\x12\x0f\n\x0bieee_802_3x\x10\x02\x42\x13\n\x11_directed_addressB\t\n\x07_choice\"\x11\n\x0fLayer1Ieee8023x\"\x89\x03\n\x11Layer1Ieee8021qbb\x12\x16\n\tpfc_delay\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x18\n\x0bpfc_class_0\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x18\n\x0bpfc_class_1\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x18\n\x0bpfc_class_2\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x18\n\x0bpfc_class_3\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x18\n\x0bpfc_class_4\x18\x06 \x01(\rH\x05\x88\x01\x01\x12\x18\n\x0bpfc_class_5\x18\x07 \x01(\rH\x06\x88\x01\x01\x12\x18\n\x0bpfc_class_6\x18\x08 \x01(\rH\x07\x88\x01\x01\x12\x18\n\x0bpfc_class_7\x18\t \x01(\rH\x08\x88\x01\x01\x42\x0c\n\n_pfc_delayB\x0e\n\x0c_pfc_class_0B\x0e\n\x0c_pfc_class_1B\x0e\n\x0c_pfc_class_2B\x0e\n\x0c_pfc_class_3B\x0e\n\x0c_pfc_class_4B\x0e\n\x0c_pfc_class_5B\x0e\n\x0c_pfc_class_6B\x0e\n\x0c_pfc_class_7\"\xa1\x02\n\x07\x43\x61pture\x12\x12\n\nport_names\x18\x01 \x03(\t\x12#\n\x07\x66ilters\x18\x02 \x03(\x0b\x32\x12.otg.CaptureFilter\x12\x16\n\toverwrite\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x0bpacket_size\x18\x04 \x01(\rH\x01\x88\x01\x01\x12-\n\x06\x66ormat\x18\x05 \x01(\x0e\x32\x18.otg.Capture.Format.EnumH\x02\x88\x01\x01\x12\x11\n\x04name\x18\x06 \x01(\tH\x03\x88\x01\x01\x1a\x37\n\x06\x46ormat\"-\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04pcap\x10\x01\x12\n\n\x06pcapng\x10\x02\x42\x0c\n\n_overwriteB\x0e\n\x0c_packet_sizeB\t\n\x07_formatB\x07\n\x05_name\"\xd6\x02\n\rCaptureFilter\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.CaptureFilter.Choice.EnumH\x00\x88\x01\x01\x12\"\n\x06\x63ustom\x18\x02 \x01(\x0b\x32\x12.otg.CaptureCustom\x12&\n\x08\x65thernet\x18\x03 \x01(\x0b\x32\x14.otg.CaptureEthernet\x12\x1e\n\x04vlan\x18\x04 \x01(\x0b\x32\x10.otg.CaptureVlan\x12\x1e\n\x04ipv4\x18\x05 \x01(\x0b\x32\x10.otg.CaptureIpv4\x12\x1e\n\x04ipv6\x18\x06 \x01(\x0b\x32\x10.otg.CaptureIpv6\x1aY\n\x06\x43hoice\"O\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x63ustom\x10\x01\x12\x0c\n\x08\x65thernet\x10\x02\x12\x08\n\x04vlan\x10\x03\x12\x08\n\x04ipv4\x10\x04\x12\x08\n\x04ipv6\x10\x05\x42\t\n\x07_choice\"\xb1\x01\n\rCaptureCustom\x12\x13\n\x06offset\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x17\n\nbit_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x11\n\x04mask\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x13\n\x06negate\x18\x05 \x01(\x08H\x04\x88\x01\x01\x42\t\n\x07_offsetB\r\n\x0b_bit_lengthB\x08\n\x06_valueB\x07\n\x05_maskB\t\n\x07_negate\"h\n\x0c\x43\x61ptureField\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04mask\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06negate\x18\x03 \x01(\x08H\x02\x88\x01\x01\x42\x08\n\x06_valueB\x07\n\x05_maskB\t\n\x07_negate\"\x9e\x01\n\x0f\x43\x61ptureEthernet\x12\x1e\n\x03src\x18\x01 \x01(\x0b\x32\x11.otg.CaptureField\x12\x1e\n\x03\x64st\x18\x02 \x01(\x0b\x32\x11.otg.CaptureField\x12%\n\nether_type\x18\x03 \x01(\x0b\x32\x11.otg.CaptureField\x12$\n\tpfc_queue\x18\x04 \x01(\x0b\x32\x11.otg.CaptureField\"\x96\x01\n\x0b\x43\x61ptureVlan\x12#\n\x08priority\x18\x01 \x01(\x0b\x32\x11.otg.CaptureField\x12\x1e\n\x03\x63\x66i\x18\x02 \x01(\x0b\x32\x11.otg.CaptureField\x12\x1d\n\x02id\x18\x03 \x01(\x0b\x32\x11.otg.CaptureField\x12#\n\x08protocol\x18\x04 \x01(\x0b\x32\x11.otg.CaptureField\"\xb4\x04\n\x0b\x43\x61ptureIpv4\x12\"\n\x07version\x18\x01 \x01(\x0b\x32\x11.otg.CaptureField\x12(\n\rheader_length\x18\x02 \x01(\x0b\x32\x11.otg.CaptureField\x12#\n\x08priority\x18\x03 \x01(\x0b\x32\x11.otg.CaptureField\x12\'\n\x0ctotal_length\x18\x04 \x01(\x0b\x32\x11.otg.CaptureField\x12)\n\x0eidentification\x18\x05 \x01(\x0b\x32\x11.otg.CaptureField\x12#\n\x08reserved\x18\x06 \x01(\x0b\x32\x11.otg.CaptureField\x12(\n\rdont_fragment\x18\x07 \x01(\x0b\x32\x11.otg.CaptureField\x12)\n\x0emore_fragments\x18\x08 \x01(\x0b\x32\x11.otg.CaptureField\x12*\n\x0f\x66ragment_offset\x18\t \x01(\x0b\x32\x11.otg.CaptureField\x12\'\n\x0ctime_to_live\x18\n \x01(\x0b\x32\x11.otg.CaptureField\x12#\n\x08protocol\x18\x0b \x01(\x0b\x32\x11.otg.CaptureField\x12*\n\x0fheader_checksum\x18\x0c \x01(\x0b\x32\x11.otg.CaptureField\x12\x1e\n\x03src\x18\r \x01(\x0b\x32\x11.otg.CaptureField\x12\x1e\n\x03\x64st\x18\x0e \x01(\x0b\x32\x11.otg.CaptureField\"\xbb\x02\n\x0b\x43\x61ptureIpv6\x12\"\n\x07version\x18\x01 \x01(\x0b\x32\x11.otg.CaptureField\x12(\n\rtraffic_class\x18\x02 \x01(\x0b\x32\x11.otg.CaptureField\x12%\n\nflow_label\x18\x03 \x01(\x0b\x32\x11.otg.CaptureField\x12)\n\x0epayload_length\x18\x04 \x01(\x0b\x32\x11.otg.CaptureField\x12&\n\x0bnext_header\x18\x05 \x01(\x0b\x32\x11.otg.CaptureField\x12$\n\thop_limit\x18\x06 \x01(\x0b\x32\x11.otg.CaptureField\x12\x1e\n\x03src\x18\x07 \x01(\x0b\x32\x11.otg.CaptureField\x12\x1e\n\x03\x64st\x18\x08 \x01(\x0b\x32\x11.otg.CaptureField\"\x8b\x03\n\x06\x44\x65vice\x12&\n\tethernets\x18\x01 \x03(\x0b\x32\x13.otg.DeviceEthernet\x12/\n\x0eipv4_loopbacks\x18\x02 \x03(\x0b\x32\x17.otg.DeviceIpv4Loopback\x12/\n\x0eipv6_loopbacks\x18\x03 \x03(\x0b\x32\x17.otg.DeviceIpv6Loopback\x12#\n\x04isis\x18\x04 \x01(\x0b\x32\x15.otg.DeviceIsisRouter\x12!\n\x03\x62gp\x18\x05 \x01(\x0b\x32\x14.otg.DeviceBgpRouter\x12\x1f\n\x05vxlan\x18\x06 \x01(\x0b\x32\x10.otg.DeviceVxlan\x12\x11\n\x04name\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x04rsvp\x18\x08 \x01(\x0b\x32\x0f.otg.DeviceRsvp\x12*\n\x0b\x64hcp_server\x18\t \x01(\x0b\x32\x15.otg.DeviceDhcpServer\x12\'\n\x06ospfv2\x18\n \x01(\x0b\x32\x17.otg.DeviceOspfv2RouterB\x07\n\x05_name\"A\n\x0fProtocolOptions\x12\x1b\n\x0e\x61uto_start_all\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x11\n\x0f_auto_start_all\"\xf2\x02\n\x10\x44\x65viceIsisRouter\x12.\n\x08instance\x18\x01 \x01(\x0b\x32\x1c.otg.DeviceIsisMultiInstance\x12\x16\n\tsystem_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x12&\n\ninterfaces\x18\x03 \x03(\x0b\x32\x12.otg.IsisInterface\x12\x1d\n\x05\x62\x61sic\x18\x04 \x01(\x0b\x32\x0e.otg.IsisBasic\x12#\n\x08\x61\x64vanced\x18\x05 \x01(\x0b\x32\x11.otg.IsisAdvanced\x12,\n\x0brouter_auth\x18\x06 \x01(\x0b\x32\x17.otg.IsisAuthentication\x12(\n\tv4_routes\x18\x07 \x03(\x0b\x32\x15.otg.IsisV4RouteRange\x12(\n\tv6_routes\x18\x08 \x03(\x0b\x32\x15.otg.IsisV6RouteRange\x12\x11\n\x04name\x18\t \x01(\tH\x01\x88\x01\x01\x42\x0c\n\n_system_idB\x07\n\x05_name\"B\n\x17\x44\x65viceIsisMultiInstance\x12\x10\n\x03iid\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\r\n\x05itids\x18\x02 \x03(\rB\x06\n\x04_iid\"\x91\x06\n\rIsisInterface\x12\x15\n\x08\x65th_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06metric\x18\x02 \x01(\rH\x01\x88\x01\x01\x12>\n\x0cnetwork_type\x18\x03 \x01(\x0e\x32#.otg.IsisInterface.NetworkType.EnumH\x02\x88\x01\x01\x12:\n\nlevel_type\x18\x04 \x01(\x0e\x32!.otg.IsisInterface.LevelType.EnumH\x03\x88\x01\x01\x12,\n\x0bl1_settings\x18\x05 \x01(\x0b\x32\x17.otg.IsisInterfaceLevel\x12,\n\x0bl2_settings\x18\x06 \x01(\x0b\x32\x17.otg.IsisInterfaceLevel\x12\'\n\x12multi_topology_ids\x18\x07 \x03(\x0b\x32\x0b.otg.IsisMT\x12-\n\x13traffic_engineering\x18\x08 \x03(\x0b\x32\x10.otg.LinkStateTE\x12\x38\n\x0e\x61uthentication\x18\t \x01(\x0b\x32 .otg.IsisInterfaceAuthentication\x12,\n\x08\x61\x64vanced\x18\n \x01(\x0b\x32\x1a.otg.IsisInterfaceAdvanced\x12\x39\n\x0flink_protection\x18\x0b \x01(\x0b\x32 .otg.IsisInterfaceLinkProtection\x12\x13\n\x0bsrlg_values\x18\x0c \x03(\r\x12\x11\n\x04name\x18\r \x01(\tH\x04\x88\x01\x01\x1aI\n\x0bNetworkType\":\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tbroadcast\x10\x01\x12\x12\n\x0epoint_to_point\x10\x02\x1aM\n\tLevelType\"@\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07level_1\x10\x01\x12\x0b\n\x07level_2\x10\x02\x12\r\n\tlevel_1_2\x10\x03\x42\x0b\n\t_eth_nameB\t\n\x07_metricB\x0f\n\r_network_typeB\r\n\x0b_level_typeB\x07\n\x05_name\"\x96\x01\n\x12IsisInterfaceLevel\x12\x15\n\x08priority\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1b\n\x0ehello_interval\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\rdead_interval\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x0b\n\t_priorityB\x11\n\x0f_hello_intervalB\x10\n\x0e_dead_interval\"P\n\x06IsisMT\x12\x12\n\x05mt_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x18\n\x0blink_metric\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x08\n\x06_mt_idB\x0e\n\x0c_link_metric\"\xa4\x02\n\x0bLinkStateTE\x12!\n\x14\x61\x64ministrative_group\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0cmetric_level\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x19\n\x0cmax_bandwith\x18\x03 \x01(\rH\x02\x88\x01\x01\x12%\n\x18max_reservable_bandwidth\x18\x04 \x01(\rH\x03\x88\x01\x01\x12=\n\x13priority_bandwidths\x18\x05 \x01(\x0b\x32 .otg.LinkStatepriorityBandwidthsB\x17\n\x15_administrative_groupB\x0f\n\r_metric_levelB\x0f\n\r_max_bandwithB\x1b\n\x19_max_reservable_bandwidth\"\xed\x01\n\x1bLinkStatepriorityBandwidths\x12\x10\n\x03pb0\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03pb1\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x10\n\x03pb2\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x10\n\x03pb3\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x10\n\x03pb4\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x10\n\x03pb5\x18\x06 \x01(\rH\x05\x88\x01\x01\x12\x10\n\x03pb6\x18\x07 \x01(\rH\x06\x88\x01\x01\x12\x10\n\x03pb7\x18\x08 \x01(\rH\x07\x88\x01\x01\x42\x06\n\x04_pb0B\x06\n\x04_pb1B\x06\n\x04_pb2B\x06\n\x04_pb3B\x06\n\x04_pb4B\x06\n\x04_pb5B\x06\n\x04_pb6B\x06\n\x04_pb7\"\xed\x01\n\x1bIsisInterfaceAuthentication\x12\x46\n\tauth_type\x18\x01 \x01(\x0e\x32..otg.IsisInterfaceAuthentication.AuthType.EnumH\x00\x88\x01\x01\x12\x10\n\x03md5\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08password\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a:\n\x08\x41uthType\".\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03md5\x10\x01\x12\x0c\n\x08password\x10\x02\x42\x0c\n\n_auth_typeB\x06\n\x04_md5B\x0b\n\t_password\"\xd3\x02\n\x15IsisInterfaceAdvanced\x12\x1c\n\x0f\x61uto_adjust_mtu\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1d\n\x10\x61uto_adjust_area\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12,\n\x1f\x61uto_adjust_supported_protocols\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\"\n\x15\x65nable_3way_handshake\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12&\n\x19p2p_hellos_to_unicast_mac\x18\x05 \x01(\x08H\x04\x88\x01\x01\x42\x12\n\x10_auto_adjust_mtuB\x13\n\x11_auto_adjust_areaB\"\n _auto_adjust_supported_protocolsB\x18\n\x16_enable_3way_handshakeB\x1c\n\x1a_p2p_hellos_to_unicast_mac\"\xf9\x02\n\x1bIsisInterfaceLinkProtection\x12\x1a\n\rextra_traffic\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x0bunprotected\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x13\n\x06shared\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x1d\n\x10\x64\x65\x64icated_1_to_1\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x1f\n\x12\x64\x65\x64icated_1_plus_1\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x15\n\x08\x65nhanced\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x18\n\x0breserved_40\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12\x18\n\x0breserved_80\x18\x08 \x01(\x08H\x07\x88\x01\x01\x42\x10\n\x0e_extra_trafficB\x0e\n\x0c_unprotectedB\t\n\x07_sharedB\x13\n\x11_dedicated_1_to_1B\x15\n\x13_dedicated_1_plus_1B\x0b\n\t_enhancedB\x0e\n\x0c_reserved_40B\x0e\n\x0c_reserved_80\"\xd5\x01\n\tIsisBasic\x12\x1e\n\x11ipv4_te_router_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08hostname\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12\x65nable_wide_metric\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x1f\n\x12learned_lsp_filter\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\x14\n\x12_ipv4_te_router_idB\x0b\n\t_hostnameB\x15\n\x13_enable_wide_metricB\x15\n\x13_learned_lsp_filter\"\x8a\x04\n\x0cIsisAdvanced\x12!\n\x14\x65nable_hello_padding\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1f\n\x12max_area_addresses\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x16\n\x0e\x61rea_addresses\x18\x03 \x03(\t\x12\x1d\n\x10lsp_refresh_rate\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x19\n\x0clsp_lifetime\x18\x05 \x01(\rH\x03\x88\x01\x01\x12\x1a\n\rpsnp_interval\x18\x06 \x01(\rH\x04\x88\x01\x01\x12\x1a\n\rcsnp_interval\x18\x07 \x01(\rH\x05\x88\x01\x01\x12\x19\n\x0cmax_lsp_size\x18\x08 \x01(\rH\x06\x88\x01\x01\x12*\n\x1dlsp_mgroup_min_trans_interval\x18\t \x01(\rH\x07\x88\x01\x01\x12 \n\x13\x65nable_attached_bit\x18\n \x01(\x08H\x08\x88\x01\x01\x42\x17\n\x15_enable_hello_paddingB\x15\n\x13_max_area_addressesB\x13\n\x11_lsp_refresh_rateB\x0f\n\r_lsp_lifetimeB\x10\n\x0e_psnp_intervalB\x10\n\x0e_csnp_intervalB\x0f\n\r_max_lsp_sizeB \n\x1e_lsp_mgroup_min_trans_intervalB\x16\n\x14_enable_attached_bit\"\xae\x01\n\x12IsisAuthentication\x12\x1f\n\x12ignore_receive_md5\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12.\n\tarea_auth\x18\x02 \x01(\x0b\x32\x1b.otg.IsisAuthenticationBase\x12\x30\n\x0b\x64omain_auth\x18\x03 \x01(\x0b\x32\x1b.otg.IsisAuthenticationBaseB\x15\n\x13_ignore_receive_md5\"\xe3\x01\n\x16IsisAuthenticationBase\x12\x41\n\tauth_type\x18\x01 \x01(\x0e\x32).otg.IsisAuthenticationBase.AuthType.EnumH\x00\x88\x01\x01\x12\x10\n\x03md5\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08password\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a:\n\x08\x41uthType\".\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03md5\x10\x01\x12\x0c\n\x08password\x10\x02\x42\x0c\n\n_auth_typeB\x06\n\x04_md5B\x0b\n\t_password\"\xd8\x04\n\x10IsisV4RouteRange\x12&\n\taddresses\x18\x01 \x03(\x0b\x32\x13.otg.V4RouteAddress\x12\x18\n\x0blink_metric\x18\x02 \x01(\rH\x00\x88\x01\x01\x12?\n\x0borigin_type\x18\x03 \x01(\x0e\x32%.otg.IsisV4RouteRange.OriginType.EnumH\x01\x88\x01\x01\x12O\n\x13redistribution_type\x18\x04 \x01(\x0e\x32-.otg.IsisV4RouteRange.RedistributionType.EnumH\x02\x88\x01\x01\x12\x11\n\x04name\x18\x05 \x01(\tH\x03\x88\x01\x01\x12 \n\x13prefix_attr_enabled\x18\x06 \x01(\x08H\x04\x88\x01\x01\x12\x13\n\x06x_flag\x18\x07 \x01(\x08H\x05\x88\x01\x01\x12\x13\n\x06r_flag\x18\x08 \x01(\x08H\x06\x88\x01\x01\x12\x13\n\x06n_flag\x18\t \x01(\x08H\x07\x88\x01\x01\x1a\x41\n\nOriginType\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08internal\x10\x01\x12\x0c\n\x08\x65xternal\x10\x02\x1a?\n\x12RedistributionType\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x0e\n\x0c_link_metricB\x0e\n\x0c_origin_typeB\x16\n\x14_redistribution_typeB\x07\n\x05_nameB\x16\n\x14_prefix_attr_enabledB\t\n\x07_x_flagB\t\n\x07_r_flagB\t\n\x07_n_flag\"\x8c\x01\n\x0eV4RouteAddress\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06prefix\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x11\n\x04step\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\n\n\x08_addressB\t\n\x07_prefixB\x08\n\x06_countB\x07\n\x05_step\"\x8c\x01\n\x0eV6RouteAddress\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06prefix\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x11\n\x04step\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\n\n\x08_addressB\t\n\x07_prefixB\x08\n\x06_countB\x07\n\x05_step\"\x8d\x01\n\x0fMACRouteAddress\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06prefix\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x11\n\x04step\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\n\n\x08_addressB\t\n\x07_prefixB\x08\n\x06_countB\x07\n\x05_step\"\xd8\x04\n\x10IsisV6RouteRange\x12&\n\taddresses\x18\x01 \x03(\x0b\x32\x13.otg.V6RouteAddress\x12\x18\n\x0blink_metric\x18\x02 \x01(\rH\x00\x88\x01\x01\x12?\n\x0borigin_type\x18\x03 \x01(\x0e\x32%.otg.IsisV6RouteRange.OriginType.EnumH\x01\x88\x01\x01\x12O\n\x13redistribution_type\x18\x04 \x01(\x0e\x32-.otg.IsisV6RouteRange.RedistributionType.EnumH\x02\x88\x01\x01\x12\x11\n\x04name\x18\x05 \x01(\tH\x03\x88\x01\x01\x12 \n\x13prefix_attr_enabled\x18\x06 \x01(\x08H\x04\x88\x01\x01\x12\x13\n\x06x_flag\x18\x07 \x01(\x08H\x05\x88\x01\x01\x12\x13\n\x06r_flag\x18\x08 \x01(\x08H\x06\x88\x01\x01\x12\x13\n\x06n_flag\x18\t \x01(\x08H\x07\x88\x01\x01\x1a\x41\n\nOriginType\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08internal\x10\x01\x12\x0c\n\x08\x65xternal\x10\x02\x1a?\n\x12RedistributionType\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x0e\n\x0c_link_metricB\x0e\n\x0c_origin_typeB\x16\n\x14_redistribution_typeB\x07\n\x05_nameB\x16\n\x14_prefix_attr_enabledB\t\n\x07_x_flagB\t\n\x07_r_flagB\t\n\x07_n_flag\"\x93\x01\n\x0f\x44\x65viceBgpRouter\x12\x16\n\trouter_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12,\n\x0fipv4_interfaces\x18\x02 \x03(\x0b\x32\x13.otg.BgpV4Interface\x12,\n\x0fipv6_interfaces\x18\x03 \x03(\x0b\x32\x13.otg.BgpV6InterfaceB\x0c\n\n_router_id\"\x90\x02\n\x1b\x44\x65viceBgpMessageHeaderError\x12\x43\n\x07subcode\x18\x01 \x01(\x0e\x32-.otg.DeviceBgpMessageHeaderError.Subcode.EnumH\x00\x88\x01\x01\x1a\x9f\x01\n\x07Subcode\"\x93\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12.\n*connection_not_synchronized_code1_subcode1\x10\x01\x12%\n!bad_message_length_code1_subcode2\x10\x02\x12#\n\x1f\x62\x61\x64_message_type_code1_subcode3\x10\x03\x42\n\n\x08_subcode\"\xaa\x03\n\x19\x44\x65viceBgpOpenMessageError\x12\x41\n\x07subcode\x18\x01 \x01(\x0e\x32+.otg.DeviceBgpOpenMessageError.Subcode.EnumH\x00\x88\x01\x01\x1a\xbd\x02\n\x07Subcode\"\xb1\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12-\n)unsupported_version_number_code2_subcode1\x10\x01\x12 \n\x1c\x65rror_peer_as_code2_subcode2\x10\x02\x12\x1f\n\x1b\x65rror_bgp_id_code2_subcode3\x10\x03\x12\x31\n-unsupported_optional_parameter_code2_subcode4\x10\x04\x12\x1e\n\x1a\x61uth_failed_code2_subcode5\x10\x05\x12(\n$unsupported_hold_time_code2_subcode6\x10\x06\x12)\n%unsupported_capability_code2_subcode7\x10\x07\x42\n\n\x08_subcode\"\xdc\x04\n\x1b\x44\x65viceBgpUpdateMessageError\x12\x43\n\x07subcode\x18\x01 \x01(\x0e\x32-.otg.DeviceBgpUpdateMessageError.Subcode.EnumH\x00\x88\x01\x01\x1a\xeb\x03\n\x07Subcode\"\xdf\x03\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12(\n$malformed_attrib_list_code3_subcode1\x10\x01\x12\x30\n,unrecognized_wellknown_attrib_code3_subcode2\x10\x02\x12+\n\'wellknown_attrib_missing_code3_subcode3\x10\x03\x12%\n!attrib_flags_error_code3_subcode4\x10\x04\x12&\n\"attrib_length_error_code3_subcode5\x10\x05\x12(\n$invalid_origin_attrib_code3_subcode6\x10\x06\x12\"\n\x1e\x61s_routing_loop_code3_subcode7\x10\x07\x12&\n\"invalid_nhop_attrib_code3_subcode8\x10\x08\x12(\n$error_optional_attrib_code3_subcode9\x10\t\x12)\n%invalid_network_field_code3_subcode10\x10\n\x12#\n\x1f\x61\x62normal_aspath_code3_subcode11\x10\x0b\x42\n\n\x08_subcode\"\x1b\n\x19\x44\x65viceBgpHoldTimerExpired\"\"\n DeviceBgpFiniteStateMachineError\"\x83\x04\n\x13\x44\x65viceBgpCeaseError\x12;\n\x07subcode\x18\x01 \x01(\x0e\x32%.otg.DeviceBgpCeaseError.Subcode.EnumH\x00\x88\x01\x01\x1a\xa2\x03\n\x07Subcode\"\x96\x03\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12,\n(max_number_prefix_reached_code6_subcode1\x10\x01\x12!\n\x1d\x61\x64min_shutdown_code6_subcode2\x10\x02\x12\x1f\n\x1bpeer_deleted_code6_subcode3\x10\x03\x12\x1e\n\x1a\x61\x64min_reset_code6_subcode4\x10\x04\x12$\n connection_reject_code6_subcode5\x10\x05\x12\'\n#other_config_changes_code6_subcode6\x10\x06\x12\x32\n.connection_collision_resolution_code6_subcode7\x10\x07\x12#\n\x1fout_of_resources_code6_subcode8\x10\x08\x12$\n bfd_session_down_code6_subcode10\x10\t\x12\x1d\n\x19hard_reset_code6_subcode9\x10\nB\n\n\x08_subcode\"T\n\x14\x44\x65viceBgpCustomError\x12\x11\n\x04\x63ode\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x14\n\x07subcode\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x07\n\x05_codeB\n\n\x08_subcode\"\xe0\x06\n\tBgpV4Peer\x12\x19\n\x0cpeer_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x16\x65vpn_ethernet_segments\x18\x02 \x03(\x0b\x32\x19.otg.BgpV4EthernetSegment\x12\x30\n\x07\x61s_type\x18\x03 \x01(\x0e\x32\x1a.otg.BgpV4Peer.AsType.EnumH\x01\x88\x01\x01\x12\x16\n\tas_number\x18\x04 \x01(\rH\x02\x88\x01\x01\x12?\n\x0f\x61s_number_width\x18\x05 \x01(\x0e\x32!.otg.BgpV4Peer.AsNumberWidth.EnumH\x03\x88\x01\x01\x12\"\n\x08\x61\x64vanced\x18\x06 \x01(\x0b\x32\x10.otg.BgpAdvanced\x12&\n\ncapability\x18\x07 \x01(\x0b\x32\x12.otg.BgpCapability\x12\x44\n\x1alearned_information_filter\x18\x08 \x01(\x0b\x32 .otg.BgpLearnedInformationFilter\x12\'\n\tv4_routes\x18\t \x03(\x0b\x32\x14.otg.BgpV4RouteRange\x12\'\n\tv6_routes\x18\n \x03(\x0b\x32\x14.otg.BgpV6RouteRange\x12.\n\x10v4_srte_policies\x18\x0b \x03(\x0b\x32\x14.otg.BgpSrteV4Policy\x12.\n\x10v6_srte_policies\x18\x0c \x03(\x0b\x32\x14.otg.BgpSrteV6Policy\x12\x11\n\x04name\x18\r \x01(\tH\x04\x88\x01\x01\x12\x31\n\x10graceful_restart\x18\x0e \x01(\x0b\x32\x17.otg.BgpGracefulRestart\x12,\n\x0ereplay_updates\x18\x0f \x01(\x0b\x32\x14.otg.BgpUpdateReplay\x1a\x35\n\x06\x41sType\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ibgp\x10\x01\x12\x08\n\x04\x65\x62gp\x10\x02\x1a;\n\rAsNumberWidth\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03two\x10\x01\x12\x08\n\x04\x66our\x10\x02\x42\x0f\n\r_peer_addressB\n\n\x08_as_typeB\x0c\n\n_as_numberB\x12\n\x10_as_number_widthB\x07\n\x05_name\"U\n\x0e\x42gpV4Interface\x12\x16\n\tipv4_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x05peers\x18\x02 \x03(\x0b\x32\x0e.otg.BgpV4PeerB\x0c\n\n_ipv4_name\"\xf0\x03\n\x14\x42gpV4EthernetSegment\x12\x36\n\x0b\x64\x66_election\x18\x01 \x01(\x0b\x32!.otg.BgpEthernetSegmentDfElection\x12 \n\x04\x65vis\x18\x02 \x03(\x0b\x32\x12.otg.BgpV4EvpnEvis\x12\x10\n\x03\x65si\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x43\n\x0b\x61\x63tive_mode\x18\x04 \x01(\x0e\x32).otg.BgpV4EthernetSegment.ActiveMode.EnumH\x01\x88\x01\x01\x12\x16\n\tesi_label\x18\x05 \x01(\rH\x02\x88\x01\x01\x12\'\n\x08\x61\x64vanced\x18\x06 \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12&\n\x0b\x63ommunities\x18\x07 \x03(\x0b\x32\x11.otg.BgpCommunity\x12-\n\x0f\x65xt_communities\x18\x08 \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12\x1f\n\x07\x61s_path\x18\t \x01(\x0b\x32\x0e.otg.BgpAsPath\x1aH\n\nActiveMode\":\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rsingle_active\x10\x01\x12\x0e\n\nall_active\x10\x02\x42\x06\n\x04_esiB\x0e\n\x0c_active_modeB\x0c\n\n_esi_label\"N\n\x1c\x42gpEthernetSegmentDfElection\x12\x1b\n\x0e\x65lection_timer\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x11\n\x0f_election_timer\"\xda\x03\n\x10\x42gpRouteAdvanced\x12-\n include_multi_exit_discriminator\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12%\n\x18multi_exit_discriminator\x18\x01 \x01(\rH\x01\x88\x01\x01\x12\x1b\n\x0einclude_origin\x18\x04 \x01(\x08H\x02\x88\x01\x01\x12\x36\n\x06origin\x18\x02 \x01(\x0e\x32!.otg.BgpRouteAdvanced.Origin.EnumH\x03\x88\x01\x01\x12%\n\x18include_local_preference\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x1d\n\x10local_preference\x18\x06 \x01(\rH\x05\x88\x01\x01\x1a\x43\n\x06Origin\"9\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03igp\x10\x01\x12\x07\n\x03\x65gp\x10\x02\x12\x0e\n\nincomplete\x10\x03\x42#\n!_include_multi_exit_discriminatorB\x1b\n\x19_multi_exit_discriminatorB\x11\n\x0f_include_originB\t\n\x07_originB\x1b\n\x19_include_local_preferenceB\x13\n\x11_local_preference\"\xa4\x02\n\x0c\x42gpCommunity\x12.\n\x04type\x18\x01 \x01(\x0e\x32\x1b.otg.BgpCommunity.Type.EnumH\x00\x88\x01\x01\x12\x16\n\tas_number\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x16\n\tas_custom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x8e\x01\n\x04Type\"\x85\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x14\n\x10manual_as_number\x10\x01\x12\r\n\tno_export\x10\x02\x12\x11\n\rno_advertised\x10\x03\x12\x17\n\x13no_export_subconfed\x10\x04\x12\x0e\n\nllgr_stale\x10\x05\x12\x0b\n\x07no_llgr\x10\x06\x42\x07\n\x05_typeB\x0c\n\n_as_numberB\x0c\n\n_as_custom\"\xf9\x03\n\x0f\x42gpExtCommunity\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32\x1e.otg.BgpExtCommunity.Type.EnumH\x00\x88\x01\x01\x12\x37\n\x07subtype\x18\x02 \x01(\x0e\x32!.otg.BgpExtCommunity.Subtype.EnumH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\xbc\x01\n\x04Type\"\xb3\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1b\n\x17\x61\x64ministrator_as_2octet\x10\x01\x12\x1e\n\x1a\x61\x64ministrator_ipv4_address\x10\x02\x12\x1b\n\x17\x61\x64ministrator_as_4octet\x10\x03\x12\n\n\x06opaque\x10\x04\x12\x08\n\x04\x65vpn\x10\x05\x12*\n&administrator_as_2octet_link_bandwidth\x10\x06\x1a\x87\x01\n\x07Subtype\"|\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0croute_target\x10\x01\x12\n\n\x06origin\x10\x02\x12\x16\n\x12\x65xtended_bandwidth\x10\x03\x12\t\n\x05\x63olor\x10\x04\x12\x11\n\rencapsulation\x10\x05\x12\x0f\n\x0bmac_address\x10\x06\x42\x07\n\x05_typeB\n\n\x08_subtypeB\x08\n\x06_value\"\xbe\x02\n\tBgpAsPath\x12\x37\n\x0b\x61s_set_mode\x18\x01 \x01(\x0e\x32\x1d.otg.BgpAsPath.AsSetMode.EnumH\x00\x88\x01\x01\x12\'\n\x08segments\x18\x02 \x03(\x0b\x32\x15.otg.BgpAsPathSegment\x1a\xbe\x01\n\tAsSetMode\"\xb0\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1b\n\x17\x64o_not_include_local_as\x10\x01\x12\x12\n\x0einclude_as_seq\x10\x02\x12\x12\n\x0einclude_as_set\x10\x03\x12\x19\n\x15include_as_confed_seq\x10\x04\x12\x19\n\x15include_as_confed_set\x10\x05\x12\x1c\n\x18prepend_to_first_segment\x10\x06\x42\x0e\n\x0c_as_set_mode\"\xc2\x01\n\x10\x42gpAsPathSegment\x12\x32\n\x04type\x18\x01 \x01(\x0e\x32\x1f.otg.BgpAsPathSegment.Type.EnumH\x00\x88\x01\x01\x12\x12\n\nas_numbers\x18\x02 \x03(\r\x1a]\n\x04Type\"U\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x61s_seq\x10\x01\x12\n\n\x06\x61s_set\x10\x02\x12\x11\n\ras_confed_seq\x10\x03\x12\x11\n\ras_confed_set\x10\x04\x42\x07\n\x05_type\"\xa8\x01\n\rBgpV4EvpnEvis\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.BgpV4EvpnEvis.Choice.EnumH\x00\x88\x01\x01\x12%\n\tevi_vxlan\x18\x02 \x01(\x0b\x32\x12.otg.BgpV4EviVxlan\x1a\x30\n\x06\x43hoice\"&\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tevi_vxlan\x10\x01\x42\t\n\x07_choice\"\xe3\x05\n\rBgpV4EviVxlan\x12<\n\x11\x62roadcast_domains\x18\x01 \x03(\x0b\x32!.otg.BgpV4EviVxlanBroadcastDomain\x12\x46\n\x10replication_type\x18\x02 \x01(\x0e\x32\'.otg.BgpV4EviVxlan.ReplicationType.EnumH\x00\x88\x01\x01\x12\x17\n\npmsi_label\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x15\n\x08\x61\x64_label\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x37\n\x13route_distinguisher\x18\x05 \x01(\x0b\x32\x1a.otg.BgpRouteDistinguisher\x12\x30\n\x13route_target_export\x18\x06 \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\x30\n\x13route_target_import\x18\x07 \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\x33\n\x16l3_route_target_export\x18\x08 \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\x33\n\x16l3_route_target_import\x18\t \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\'\n\x08\x61\x64vanced\x18\n \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12&\n\x0b\x63ommunities\x18\x0b \x03(\x0b\x32\x11.otg.BgpCommunity\x12-\n\x0f\x65xt_communities\x18\x0c \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12\x1f\n\x07\x61s_path\x18\r \x01(\x0b\x32\x0e.otg.BgpAsPath\x1a\x43\n\x0fReplicationType\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x17\n\x13ingress_replication\x10\x01\x42\x13\n\x11_replication_typeB\r\n\x0b_pmsi_labelB\x0b\n\t_ad_label\"\xb4\x01\n\x1c\x42gpV4EviVxlanBroadcastDomain\x12*\n\rcmac_ip_range\x18\x01 \x03(\x0b\x32\x13.otg.BgpCMacIpRange\x12\x1c\n\x0f\x65thernet_tag_id\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1f\n\x12vlan_aware_service\x18\x03 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_ethernet_tag_idB\x15\n\x13_vlan_aware_service\"\xd2\x03\n\x0e\x42gpCMacIpRange\x12+\n\rmac_addresses\x18\x01 \x01(\x0b\x32\x14.otg.MACRouteAddress\x12\x12\n\x05l2vni\x18\x02 \x01(\rH\x00\x88\x01\x01\x12+\n\x0eipv4_addresses\x18\x03 \x01(\x0b\x32\x13.otg.V4RouteAddress\x12+\n\x0eipv6_addresses\x18\x04 \x01(\x0b\x32\x13.otg.V6RouteAddress\x12\x12\n\x05l3vni\x18\x05 \x01(\rH\x01\x88\x01\x01\x12$\n\x17include_default_gateway\x18\x06 \x01(\x08H\x02\x88\x01\x01\x12\'\n\x08\x61\x64vanced\x18\x07 \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12&\n\x0b\x63ommunities\x18\x08 \x03(\x0b\x32\x11.otg.BgpCommunity\x12-\n\x0f\x65xt_communities\x18\t \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12\x1f\n\x07\x61s_path\x18\n \x01(\x0b\x32\x0e.otg.BgpAsPath\x12\x11\n\x04name\x18\x0b \x01(\tH\x03\x88\x01\x01\x42\x08\n\x06_l2vniB\x08\n\x06_l3vniB\x1a\n\x18_include_default_gatewayB\x07\n\x05_name\"\x98\x02\n\x15\x42gpRouteDistinguisher\x12<\n\x07rd_type\x18\x01 \x01(\x0e\x32&.otg.BgpRouteDistinguisher.RdType.EnumH\x00\x88\x01\x01\x12#\n\x16\x61uto_config_rd_ip_addr\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x15\n\x08rd_value\x18\x03 \x01(\tH\x02\x88\x01\x01\x1aQ\n\x06RdType\"G\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tas_2octet\x10\x01\x12\x10\n\x0cipv4_address\x10\x02\x12\r\n\tas_4octet\x10\x03\x42\n\n\x08_rd_typeB\x19\n\x17_auto_config_rd_ip_addrB\x0b\n\t_rd_value\"\xca\x01\n\x0e\x42gpRouteTarget\x12\x35\n\x07rt_type\x18\x01 \x01(\x0e\x32\x1f.otg.BgpRouteTarget.RtType.EnumH\x00\x88\x01\x01\x12\x15\n\x08rt_value\x18\x02 \x01(\tH\x01\x88\x01\x01\x1aQ\n\x06RtType\"G\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tas_2octet\x10\x01\x12\x10\n\x0cipv4_address\x10\x02\x12\r\n\tas_4octet\x10\x03\x42\n\n\x08_rt_typeB\x0b\n\t_rt_value\"\x83\x03\n\x0b\x42gpAdvanced\x12\x1f\n\x12hold_time_interval\x18\x01 \x01(\rH\x00\x88\x01\x01\x12 \n\x13keep_alive_interval\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1c\n\x0fupdate_interval\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x19\n\x0ctime_to_live\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x14\n\x07md5_key\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x19\n\x0cpassive_mode\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x18\n\x0blisten_port\x18\x07 \x01(\rH\x06\x88\x01\x01\x12\x1a\n\rneighbor_port\x18\x08 \x01(\rH\x07\x88\x01\x01\x42\x15\n\x13_hold_time_intervalB\x16\n\x14_keep_alive_intervalB\x12\n\x10_update_intervalB\x0f\n\r_time_to_liveB\n\n\x08_md5_keyB\x0f\n\r_passive_modeB\x0e\n\x0c_listen_portB\x10\n\x0e_neighbor_port\"\x91\n\n\rBgpCapability\x12\x19\n\x0cipv4_unicast\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1b\n\x0eipv4_multicast\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x19\n\x0cipv6_unicast\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x1b\n\x0eipv6_multicast\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x11\n\x04vpls\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x1a\n\rroute_refresh\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x1d\n\x10route_constraint\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12\x1f\n\x12link_state_non_vpn\x18\x08 \x01(\x08H\x07\x88\x01\x01\x12\x1b\n\x0elink_state_vpn\x18\t \x01(\x08H\x08\x88\x01\x01\x12\x11\n\x04\x65vpn\x18\n \x01(\x08H\t\x88\x01\x01\x12\'\n\x1a\x65xtended_next_hop_encoding\x18\x0b \x01(\x08H\n\x88\x01\x01\x12\x1f\n\x12ipv4_multicast_vpn\x18\x0c \x01(\x08H\x0b\x88\x01\x01\x12\x1a\n\ripv4_mpls_vpn\x18\r \x01(\x08H\x0c\x88\x01\x01\x12\x15\n\x08ipv4_mdt\x18\x0e \x01(\x08H\r\x88\x01\x01\x12$\n\x17ipv4_multicast_mpls_vpn\x18\x0f \x01(\x08H\x0e\x88\x01\x01\x12#\n\x16ipv4_unicast_flow_spec\x18\x10 \x01(\x08H\x0f\x88\x01\x01\x12\x1e\n\x11ipv4_sr_te_policy\x18\x11 \x01(\x08H\x10\x88\x01\x01\x12\"\n\x15ipv4_unicast_add_path\x18\x12 \x01(\x08H\x11\x88\x01\x01\x12\x1f\n\x12ipv6_multicast_vpn\x18\x13 \x01(\x08H\x12\x88\x01\x01\x12\x1a\n\ripv6_mpls_vpn\x18\x14 \x01(\x08H\x13\x88\x01\x01\x12\x15\n\x08ipv6_mdt\x18\x15 \x01(\x08H\x14\x88\x01\x01\x12$\n\x17ipv6_multicast_mpls_vpn\x18\x16 \x01(\x08H\x15\x88\x01\x01\x12#\n\x16ipv6_unicast_flow_spec\x18\x17 \x01(\x08H\x16\x88\x01\x01\x12\x1e\n\x11ipv6_sr_te_policy\x18\x18 \x01(\x08H\x17\x88\x01\x01\x12\"\n\x15ipv6_unicast_add_path\x18\x19 \x01(\x08H\x18\x88\x01\x01\x42\x0f\n\r_ipv4_unicastB\x11\n\x0f_ipv4_multicastB\x0f\n\r_ipv6_unicastB\x11\n\x0f_ipv6_multicastB\x07\n\x05_vplsB\x10\n\x0e_route_refreshB\x13\n\x11_route_constraintB\x15\n\x13_link_state_non_vpnB\x11\n\x0f_link_state_vpnB\x07\n\x05_evpnB\x1d\n\x1b_extended_next_hop_encodingB\x15\n\x13_ipv4_multicast_vpnB\x10\n\x0e_ipv4_mpls_vpnB\x0b\n\t_ipv4_mdtB\x1a\n\x18_ipv4_multicast_mpls_vpnB\x19\n\x17_ipv4_unicast_flow_specB\x14\n\x12_ipv4_sr_te_policyB\x18\n\x16_ipv4_unicast_add_pathB\x15\n\x13_ipv6_multicast_vpnB\x10\n\x0e_ipv6_mpls_vpnB\x0b\n\t_ipv6_mdtB\x1a\n\x18_ipv6_multicast_mpls_vpnB\x19\n\x17_ipv6_unicast_flow_specB\x14\n\x12_ipv6_sr_te_policyB\x18\n\x16_ipv6_unicast_add_path\"\x91\x01\n\x1b\x42gpLearnedInformationFilter\x12 \n\x13unicast_ipv4_prefix\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12 \n\x13unicast_ipv6_prefix\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x16\n\x14_unicast_ipv4_prefixB\x16\n\x14_unicast_ipv6_prefix\"\x94\x06\n\x0f\x42gpV4RouteRange\x12&\n\taddresses\x18\x01 \x03(\x0b\x32\x13.otg.V4RouteAddress\x12\x41\n\rnext_hop_mode\x18\x02 \x01(\x0e\x32%.otg.BgpV4RouteRange.NextHopMode.EnumH\x00\x88\x01\x01\x12P\n\x15next_hop_address_type\x18\x03 \x01(\x0e\x32,.otg.BgpV4RouteRange.NextHopAddressType.EnumH\x01\x88\x01\x01\x12\"\n\x15next_hop_ipv4_address\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\"\n\x15next_hop_ipv6_address\x18\x05 \x01(\tH\x03\x88\x01\x01\x12\'\n\x08\x61\x64vanced\x18\x06 \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12&\n\x0b\x63ommunities\x18\x07 \x03(\x0b\x32\x11.otg.BgpCommunity\x12\x1f\n\x07\x61s_path\x18\x08 \x01(\x0b\x32\x0e.otg.BgpAsPath\x12!\n\x08\x61\x64\x64_path\x18\t \x01(\x0b\x32\x0f.otg.BgpAddPath\x12\x11\n\x04name\x18\n \x01(\tH\x04\x88\x01\x01\x12-\n\x0f\x65xt_communities\x18\x0b \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12\x37\n\x14\x65xtended_communities\x18\x0c \x03(\x0b\x32\x19.otg.BgpExtendedCommunity\x1a@\n\x0bNextHopMode\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08local_ip\x10\x01\x12\n\n\x06manual\x10\x02\x1a\x41\n\x12NextHopAddressType\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x42\x10\n\x0e_next_hop_modeB\x18\n\x16_next_hop_address_typeB\x18\n\x16_next_hop_ipv4_addressB\x18\n\x16_next_hop_ipv6_addressB\x07\n\x05_name\".\n\nBgpAddPath\x12\x14\n\x07path_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\n\n\x08_path_id\"\xf3\x06\n\x14\x42gpExtendedCommunity\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.BgpExtendedCommunity.Choice.EnumH\x00\x88\x01\x01\x12R\n\x19transitive_2octet_as_type\x18\x02 \x01(\x0b\x32/.otg.BgpExtendedCommunityTransitive2OctetAsType\x12X\n\x1ctransitive_ipv4_address_type\x18\x03 \x01(\x0b\x32\x32.otg.BgpExtendedCommunityTransitiveIpv4AddressType\x12R\n\x19transitive_4octet_as_type\x18\x04 \x01(\x0b\x32/.otg.BgpExtendedCommunityTransitive4OctetAsType\x12M\n\x16transitive_opaque_type\x18\x05 \x01(\x0b\x32-.otg.BgpExtendedCommunityTransitiveOpaqueType\x12I\n\x14transitive_evpn_type\x18\x06 \x01(\x0b\x32+.otg.BgpExtendedCommunityTransitiveEvpnType\x12Y\n\x1dnon_transitive_2octet_as_type\x18\x07 \x01(\x0b\x32\x32.otg.BgpExtendedCommunityNonTransitive2OctetAsType\x12\x33\n\x06\x63ustom\x18\x08 \x01(\x0b\x32#.otg.BgpExtendedCommunityCustomType\x1a\xe7\x01\n\x06\x43hoice\"\xdc\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1d\n\x19transitive_2octet_as_type\x10\x01\x12 \n\x1ctransitive_ipv4_address_type\x10\x02\x12\x1d\n\x19transitive_4octet_as_type\x10\x03\x12\x1a\n\x16transitive_opaque_type\x10\x04\x12\x18\n\x14transitive_evpn_type\x10\x05\x12!\n\x1dnon_transitive_2octet_as_type\x10\x06\x12\n\n\x06\x63ustom\x10\x07\x42\t\n\x07_choice\"\x9f\x01\n5BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget\x12\x1c\n\x0fglobal_2byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11local_4byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x12\n\x10_global_2byte_asB\x14\n\x12_local_4byte_admin\"\x9f\x01\n5BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin\x12\x1c\n\x0fglobal_2byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11local_4byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x12\n\x10_global_2byte_asB\x14\n\x12_local_4byte_admin\"\x94\x03\n*BgpExtendedCommunityTransitive2OctetAsType\x12P\n\x06\x63hoice\x18\x01 \x01(\x0e\x32;.otg.BgpExtendedCommunityTransitive2OctetAsType.Choice.EnumH\x00\x88\x01\x01\x12X\n\x14route_target_subtype\x18\x02 \x01(\x0b\x32:.otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteTarget\x12X\n\x14route_origin_subtype\x18\x03 \x01(\x0b\x32:.otg.BgpExtendedCommunityTransitive2OctetAsTypeRouteOrigin\x1aU\n\x06\x43hoice\"K\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x18\n\x14route_target_subtype\x10\x01\x12\x18\n\x14route_origin_subtype\x10\x02\x42\t\n\x07_choice\"\xa6\x01\n8BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin\x12\x1e\n\x11global_ipv4_admin\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11local_2byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x14\n\x12_global_ipv4_adminB\x14\n\x12_local_2byte_admin\"\xa6\x01\n8BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget\x12\x1e\n\x11global_ipv4_admin\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11local_2byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x14\n\x12_global_ipv4_adminB\x14\n\x12_local_2byte_admin\"\xa0\x03\n-BgpExtendedCommunityTransitiveIpv4AddressType\x12S\n\x06\x63hoice\x18\x01 \x01(\x0e\x32>.otg.BgpExtendedCommunityTransitiveIpv4AddressType.Choice.EnumH\x00\x88\x01\x01\x12[\n\x14route_target_subtype\x18\x02 \x01(\x0b\x32=.otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteTarget\x12[\n\x14route_origin_subtype\x18\x03 \x01(\x0b\x32=.otg.BgpExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin\x1aU\n\x06\x43hoice\"K\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x18\n\x14route_target_subtype\x10\x01\x12\x18\n\x14route_origin_subtype\x10\x02\x42\t\n\x07_choice\"\x9f\x01\n5BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget\x12\x1c\n\x0fglobal_4byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11local_2byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x12\n\x10_global_4byte_asB\x14\n\x12_local_2byte_admin\"\x9f\x01\n5BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin\x12\x1c\n\x0fglobal_4byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11local_2byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x12\n\x10_global_4byte_asB\x14\n\x12_local_2byte_admin\"\x94\x03\n*BgpExtendedCommunityTransitive4OctetAsType\x12P\n\x06\x63hoice\x18\x01 \x01(\x0e\x32;.otg.BgpExtendedCommunityTransitive4OctetAsType.Choice.EnumH\x00\x88\x01\x01\x12X\n\x14route_target_subtype\x18\x02 \x01(\x0b\x32:.otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteTarget\x12X\n\x14route_origin_subtype\x18\x03 \x01(\x0b\x32:.otg.BgpExtendedCommunityTransitive4OctetAsTypeRouteOrigin\x1aU\n\x06\x43hoice\"K\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x18\n\x14route_target_subtype\x10\x01\x12\x18\n\x14route_origin_subtype\x10\x02\x42\t\n\x07_choice\"k\n-BgpExtendedCommunityTransitiveOpaqueTypeColor\x12\x12\n\x05\x66lags\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x08\n\x06_flagsB\x08\n\x06_color\"\x85\x01\n5BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation\x12\x15\n\x08reserved\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x18\n\x0btunnel_type\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x0b\n\t_reservedB\x0e\n\x0c_tunnel_type\"\xfc\x02\n(BgpExtendedCommunityTransitiveOpaqueType\x12N\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x39.otg.BgpExtendedCommunityTransitiveOpaqueType.Choice.EnumH\x00\x88\x01\x01\x12I\n\rcolor_subtype\x18\x02 \x01(\x0b\x32\x32.otg.BgpExtendedCommunityTransitiveOpaqueTypeColor\x12Y\n\x15\x65ncapsulation_subtype\x18\x03 \x01(\x0b\x32:.otg.BgpExtendedCommunityTransitiveOpaqueTypeEncapsulation\x1aO\n\x06\x43hoice\"E\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rcolor_subtype\x10\x01\x12\x19\n\x15\x65ncapsulation_subtype\x10\x02\x42\t\n\x07_choice\"Y\n/BgpExtendedCommunityTransitiveEvpnTypeRouterMac\x12\x17\n\nrouter_mac\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_router_mac\"\x8e\x02\n&BgpExtendedCommunityTransitiveEvpnType\x12L\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x37.otg.BgpExtendedCommunityTransitiveEvpnType.Choice.EnumH\x00\x88\x01\x01\x12P\n\x12router_mac_subtype\x18\x02 \x01(\x0b\x32\x34.otg.BgpExtendedCommunityTransitiveEvpnTypeRouterMac\x1a\x39\n\x06\x43hoice\"/\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x16\n\x12router_mac_subtype\x10\x01\x42\t\n\x07_choice\"\x94\x01\n:BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth\x12\x1c\n\x0fglobal_2byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x16\n\tbandwidth\x18\x02 \x01(\x02H\x01\x88\x01\x01\x42\x12\n\x10_global_2byte_asB\x0c\n\n_bandwidth\"\xaf\x02\n-BgpExtendedCommunityNonTransitive2OctetAsType\x12S\n\x06\x63hoice\x18\x01 \x01(\x0e\x32>.otg.BgpExtendedCommunityNonTransitive2OctetAsType.Choice.EnumH\x00\x88\x01\x01\x12_\n\x16link_bandwidth_subtype\x18\x02 \x01(\x0b\x32?.otg.BgpExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth\x1a=\n\x06\x43hoice\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1a\n\x16link_bandwidth_subtype\x10\x01\x42\t\n\x07_choice\"\xa4\x01\n\x1e\x42gpExtendedCommunityCustomType\x12\x1b\n\x0e\x63ommunity_type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11\x63ommunity_subtype\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x11\n\x0f_community_typeB\x14\n\x12_community_subtypeB\x08\n\x06_value\"\x94\x06\n\x0f\x42gpV6RouteRange\x12&\n\taddresses\x18\x01 \x03(\x0b\x32\x13.otg.V6RouteAddress\x12\x41\n\rnext_hop_mode\x18\x02 \x01(\x0e\x32%.otg.BgpV6RouteRange.NextHopMode.EnumH\x00\x88\x01\x01\x12P\n\x15next_hop_address_type\x18\x03 \x01(\x0e\x32,.otg.BgpV6RouteRange.NextHopAddressType.EnumH\x01\x88\x01\x01\x12\"\n\x15next_hop_ipv4_address\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\"\n\x15next_hop_ipv6_address\x18\x05 \x01(\tH\x03\x88\x01\x01\x12\'\n\x08\x61\x64vanced\x18\x06 \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12&\n\x0b\x63ommunities\x18\x07 \x03(\x0b\x32\x11.otg.BgpCommunity\x12\x1f\n\x07\x61s_path\x18\x08 \x01(\x0b\x32\x0e.otg.BgpAsPath\x12!\n\x08\x61\x64\x64_path\x18\t \x01(\x0b\x32\x0f.otg.BgpAddPath\x12\x11\n\x04name\x18\n \x01(\tH\x04\x88\x01\x01\x12-\n\x0f\x65xt_communities\x18\x0b \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12\x37\n\x14\x65xtended_communities\x18\x0c \x03(\x0b\x32\x19.otg.BgpExtendedCommunity\x1a@\n\x0bNextHopMode\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08local_ip\x10\x01\x12\n\n\x06manual\x10\x02\x1a\x41\n\x12NextHopAddressType\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x42\x10\n\x0e_next_hop_modeB\x18\n\x16_next_hop_address_typeB\x18\n\x16_next_hop_ipv4_addressB\x18\n\x16_next_hop_ipv6_addressB\x07\n\x05_name\"\xfb\x06\n\x0f\x42gpSrteV4Policy\x12\x1a\n\rdistinguisher\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\ripv4_endpoint\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x41\n\rnext_hop_mode\x18\x04 \x01(\x0e\x32%.otg.BgpSrteV4Policy.NextHopMode.EnumH\x03\x88\x01\x01\x12P\n\x15next_hop_address_type\x18\x05 \x01(\x0e\x32,.otg.BgpSrteV4Policy.NextHopAddressType.EnumH\x04\x88\x01\x01\x12\"\n\x15next_hop_ipv4_address\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\"\n\x15next_hop_ipv6_address\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\'\n\x08\x61\x64vanced\x18\x08 \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12!\n\x08\x61\x64\x64_path\x18\t \x01(\x0b\x32\x0f.otg.BgpAddPath\x12\x1f\n\x07\x61s_path\x18\n \x01(\x0b\x32\x0e.otg.BgpAsPath\x12&\n\x0b\x63ommunities\x18\x0b \x03(\x0b\x32\x11.otg.BgpCommunity\x12-\n\x0f\x65xt_communities\x18\x0c \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12,\n\x0btunnel_tlvs\x18\r \x03(\x0b\x32\x17.otg.BgpSrteV4TunnelTlv\x12\x11\n\x04name\x18\x0e \x01(\tH\x07\x88\x01\x01\x12\x13\n\x06\x61\x63tive\x18\x0f \x01(\x08H\x08\x88\x01\x01\x1a@\n\x0bNextHopMode\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08local_ip\x10\x01\x12\n\n\x06manual\x10\x02\x1a\x41\n\x12NextHopAddressType\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x42\x10\n\x0e_distinguisherB\x08\n\x06_colorB\x10\n\x0e_ipv4_endpointB\x10\n\x0e_next_hop_modeB\x18\n\x16_next_hop_address_typeB\x18\n\x16_next_hop_ipv4_addressB\x18\n\x16_next_hop_ipv6_addressB\x07\n\x05_nameB\t\n\x07_active\"\xb6\x04\n\x12\x42gpSrteV4TunnelTlv\x12\x41\n\x17remote_endpoint_sub_tlv\x18\x01 \x01(\x0b\x32 .otg.BgpSrteRemoteEndpointSubTlv\x12.\n\rcolor_sub_tlv\x18\x02 \x01(\x0b\x32\x17.otg.BgpSrteColorSubTlv\x12\x32\n\x0f\x62inding_sub_tlv\x18\x03 \x01(\x0b\x32\x19.otg.BgpSrteBindingSubTlv\x12\x38\n\x12preference_sub_tlv\x18\x04 \x01(\x0b\x32\x1c.otg.BgpSrtePreferenceSubTlv\x12\x41\n\x17policy_priority_sub_tlv\x18\x05 \x01(\x0b\x32 .otg.BgpSrtePolicyPrioritySubTlv\x12\x39\n\x13policy_name_sub_tlv\x18\x06 \x01(\x0b\x32\x1c.otg.BgpSrtePolicyNameSubTlv\x12U\n\"explicit_null_label_policy_sub_tlv\x18\x07 \x01(\x0b\x32).otg.BgpSrteExplicitNullLabelPolicySubTlv\x12.\n\rsegment_lists\x18\x08 \x03(\x0b\x32\x17.otg.BgpSrteSegmentList\x12\x11\n\x04name\x18\t \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x61\x63tive\x18\n \x01(\x08H\x01\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_active\"\xbe\x02\n\x1b\x42gpSrteRemoteEndpointSubTlv\x12\x16\n\tas_number\x18\x01 \x01(\rH\x00\x88\x01\x01\x12P\n\x0e\x61\x64\x64ress_family\x18\x02 \x01(\x0e\x32\x33.otg.BgpSrteRemoteEndpointSubTlv.AddressFamily.EnumH\x01\x88\x01\x01\x12\x19\n\x0cipv4_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0cipv6_address\x18\x04 \x01(\tH\x03\x88\x01\x01\x1a<\n\rAddressFamily\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x42\x0c\n\n_as_numberB\x11\n\x0f_address_familyB\x0f\n\r_ipv4_addressB\x0f\n\r_ipv6_address\"2\n\x12\x42gpSrteColorSubTlv\x12\x12\n\x05\x63olor\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_color\"\xea\x02\n\x14\x42gpSrteBindingSubTlv\x12L\n\x10\x62inding_sid_type\x18\x01 \x01(\x0e\x32-.otg.BgpSrteBindingSubTlv.BindingSidType.EnumH\x00\x88\x01\x01\x12\x1b\n\x0e\x66our_octet_sid\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x15\n\x08ipv6_sid\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x13\n\x06s_flag\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x13\n\x06i_flag\x18\x05 \x01(\x08H\x04\x88\x01\x01\x1a[\n\x0e\x42indingSidType\"I\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\nno_binding\x10\x01\x12\x12\n\x0e\x66our_octet_sid\x10\x02\x12\x0c\n\x08ipv6_sid\x10\x03\x42\x13\n\x11_binding_sid_typeB\x11\n\x0f_four_octet_sidB\x0b\n\t_ipv6_sidB\t\n\x07_s_flagB\t\n\x07_i_flag\"A\n\x17\x42gpSrtePreferenceSubTlv\x12\x17\n\npreference\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\r\n\x0b_preference\"O\n\x1b\x42gpSrtePolicyPrioritySubTlv\x12\x1c\n\x0fpolicy_priority\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x12\n\x10_policy_priority\"C\n\x17\x42gpSrtePolicyNameSubTlv\x12\x18\n\x0bpolicy_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_policy_name\"\xd6\x02\n$BgpSrteExplicitNullLabelPolicySubTlv\x12o\n\x1a\x65xplicit_null_label_policy\x18\x01 \x01(\x0e\x32\x46.otg.BgpSrteExplicitNullLabelPolicySubTlv.ExplicitNullLabelPolicy.EnumH\x00\x88\x01\x01\x1a\x9d\x01\n\x17\x45xplicitNullLabelPolicy\"\x81\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rreserved_enlp\x10\x01\x12\x12\n\x0epush_ipv4_enlp\x10\x02\x12\x12\n\x0epush_ipv6_enlp\x10\x03\x12\x17\n\x13push_ipv4_ipv6_enlp\x10\x04\x12\x14\n\x10\x64o_not_push_enlp\x10\x05\x42\x1d\n\x1b_explicit_null_label_policy\"\x97\x01\n\x12\x42gpSrteSegmentList\x12\x13\n\x06weight\x18\x01 \x01(\rH\x00\x88\x01\x01\x12%\n\x08segments\x18\x02 \x03(\x0b\x32\x13.otg.BgpSrteSegment\x12\x11\n\x04name\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06\x61\x63tive\x18\x04 \x01(\x08H\x02\x88\x01\x01\x42\t\n\x07_weightB\x07\n\x05_nameB\t\n\x07_active\"\xdc\x06\n\x0e\x42gpSrteSegment\x12?\n\x0csegment_type\x18\x01 \x01(\x0e\x32$.otg.BgpSrteSegment.SegmentType.EnumH\x00\x88\x01\x01\x12.\n\x06type_a\x18\x02 \x01(\x0b\x32\x1e.otg.BgpSrteSegmentATypeSubTlv\x12.\n\x06type_b\x18\x03 \x01(\x0b\x32\x1e.otg.BgpSrteSegmentBTypeSubTlv\x12.\n\x06type_c\x18\x04 \x01(\x0b\x32\x1e.otg.BgpSrteSegmentCTypeSubTlv\x12.\n\x06type_d\x18\x05 \x01(\x0b\x32\x1e.otg.BgpSrteSegmentDTypeSubTlv\x12.\n\x06type_e\x18\x06 \x01(\x0b\x32\x1e.otg.BgpSrteSegmentETypeSubTlv\x12.\n\x06type_f\x18\x07 \x01(\x0b\x32\x1e.otg.BgpSrteSegmentFTypeSubTlv\x12.\n\x06type_g\x18\x08 \x01(\x0b\x32\x1e.otg.BgpSrteSegmentGTypeSubTlv\x12.\n\x06type_h\x18\t \x01(\x0b\x32\x1e.otg.BgpSrteSegmentHTypeSubTlv\x12.\n\x06type_i\x18\n \x01(\x0b\x32\x1e.otg.BgpSrteSegmentITypeSubTlv\x12.\n\x06type_j\x18\x0b \x01(\x0b\x32\x1e.otg.BgpSrteSegmentJTypeSubTlv\x12.\n\x06type_k\x18\x0c \x01(\x0b\x32\x1e.otg.BgpSrteSegmentKTypeSubTlv\x12\x11\n\x04name\x18\r \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06\x61\x63tive\x18\x0e \x01(\x08H\x02\x88\x01\x01\x1a\xab\x01\n\x0bSegmentType\"\x9b\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06type_a\x10\x01\x12\n\n\x06type_b\x10\x02\x12\n\n\x06type_c\x10\x03\x12\n\n\x06type_d\x10\x04\x12\n\n\x06type_e\x10\x05\x12\n\n\x06type_f\x10\x06\x12\n\n\x06type_g\x10\x07\x12\n\n\x06type_h\x10\x08\x12\n\n\x06type_i\x10\t\x12\n\n\x06type_j\x10\n\x12\n\n\x06type_k\x10\x0b\x42\x0f\n\r_segment_typeB\x07\n\x05_nameB\t\n\x07_active\"\x80\x01\n\x10\x42gpSrteSrMplsSid\x12\x12\n\x05label\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x0f\n\x02tc\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05s_bit\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x10\n\x03ttl\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x08\n\x06_labelB\x05\n\x03_tcB\x08\n\x06_s_bitB\x06\n\x04_ttl\"\xca\x01\n*BgpSrteSRv6SIDEndpointBehaviorAndStructure\x12\x16\n\tlb_length\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x16\n\tln_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x18\n\x0b\x66unc_length\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x17\n\narg_length\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x0c\n\n_lb_lengthB\x0c\n\n_ln_lengthB\x0e\n\x0c_func_lengthB\r\n\x0b_arg_length\"\xa7\x01\n\x19\x42gpSrteSegmentATypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05label\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0f\n\x02tc\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x12\n\x05s_bit\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x10\n\x03ttl\x18\x05 \x01(\rH\x04\x88\x01\x01\x42\x08\n\x06_flagsB\x08\n\x06_labelB\x05\n\x03_tcB\x08\n\x06_s_bitB\x06\n\x04_ttl\"\xb2\x01\n\x19\x42gpSrteSegmentBTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08srv6_sid\x18\x02 \x01(\tH\x01\x88\x01\x01\x12S\n\x1asrv6_sid_endpoint_behavior\x18\x03 \x01(\x0b\x32/.otg.BgpSrteSRv6SIDEndpointBehaviorAndStructureB\x08\n\x06_flagsB\x0b\n\t_srv6_sid\"\xc7\x01\n\x19\x42gpSrteSegmentCTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0csr_algorithm\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1e\n\x11ipv4_node_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12*\n\x0bsr_mpls_sid\x18\x04 \x01(\x0b\x32\x15.otg.BgpSrteSrMplsSidB\x08\n\x06_flagsB\x0f\n\r_sr_algorithmB\x14\n\x12_ipv4_node_address\"\xc7\x01\n\x19\x42gpSrteSegmentDTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0csr_algorithm\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1e\n\x11ipv6_node_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12*\n\x0bsr_mpls_sid\x18\x04 \x01(\x0b\x32\x15.otg.BgpSrteSrMplsSidB\x08\n\x06_flagsB\x0f\n\r_sr_algorithmB\x14\n\x12_ipv6_node_address\"\xd3\x01\n\x19\x42gpSrteSegmentETypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12local_interface_id\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1e\n\x11ipv4_node_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12*\n\x0bsr_mpls_sid\x18\x04 \x01(\x0b\x32\x15.otg.BgpSrteSrMplsSidB\x08\n\x06_flagsB\x15\n\x13_local_interface_idB\x14\n\x12_ipv4_node_address\"\xd7\x01\n\x19\x42gpSrteSegmentFTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12local_ipv4_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12 \n\x13remote_ipv4_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12*\n\x0bsr_mpls_sid\x18\x04 \x01(\x0b\x32\x15.otg.BgpSrteSrMplsSidB\x08\n\x06_flagsB\x15\n\x13_local_ipv4_addressB\x16\n\x14_remote_ipv4_address\"\xdd\x02\n\x19\x42gpSrteSegmentGTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12local_interface_id\x18\x02 \x01(\rH\x01\x88\x01\x01\x12$\n\x17local_ipv6_node_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13remote_interface_id\x18\x04 \x01(\rH\x03\x88\x01\x01\x12%\n\x18remote_ipv6_node_address\x18\x05 \x01(\tH\x04\x88\x01\x01\x12*\n\x0bsr_mpls_sid\x18\x06 \x01(\x0b\x32\x15.otg.BgpSrteSrMplsSidB\x08\n\x06_flagsB\x15\n\x13_local_interface_idB\x1a\n\x18_local_ipv6_node_addressB\x16\n\x14_remote_interface_idB\x1b\n\x19_remote_ipv6_node_address\"\xd7\x01\n\x19\x42gpSrteSegmentHTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12local_ipv6_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12 \n\x13remote_ipv6_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12*\n\x0bsr_mpls_sid\x18\x04 \x01(\x0b\x32\x15.otg.BgpSrteSrMplsSidB\x08\n\x06_flagsB\x15\n\x13_local_ipv6_addressB\x16\n\x14_remote_ipv6_address\"\xe8\x01\n\x19\x42gpSrteSegmentITypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11ipv6_node_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08srv6_sid\x18\x03 \x01(\tH\x02\x88\x01\x01\x12S\n\x1asrv6_sid_endpoint_behavior\x18\x04 \x01(\x0b\x32/.otg.BgpSrteSRv6SIDEndpointBehaviorAndStructureB\x08\n\x06_flagsB\x14\n\x12_ipv6_node_addressB\x0b\n\t_srv6_sid\"\xd6\x03\n\x19\x42gpSrteSegmentJTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0csr_algorithm\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1f\n\x12local_interface_id\x18\x03 \x01(\rH\x02\x88\x01\x01\x12$\n\x17local_ipv6_node_address\x18\x04 \x01(\tH\x03\x88\x01\x01\x12 \n\x13remote_interface_id\x18\x05 \x01(\rH\x04\x88\x01\x01\x12%\n\x18remote_ipv6_node_address\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x15\n\x08srv6_sid\x18\x07 \x01(\tH\x06\x88\x01\x01\x12S\n\x1asrv6_sid_endpoint_behavior\x18\x08 \x01(\x0b\x32/.otg.BgpSrteSRv6SIDEndpointBehaviorAndStructureB\x08\n\x06_flagsB\x0f\n\r_sr_algorithmB\x15\n\x13_local_interface_idB\x1a\n\x18_local_ipv6_node_addressB\x16\n\x14_remote_interface_idB\x1b\n\x19_remote_ipv6_node_addressB\x0b\n\t_srv6_sid\"\xd0\x02\n\x19\x42gpSrteSegmentKTypeSubTlv\x12\x12\n\x05\x66lags\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0csr_algorithm\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1f\n\x12local_ipv6_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13remote_ipv6_address\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08srv6_sid\x18\x05 \x01(\tH\x04\x88\x01\x01\x12S\n\x1asrv6_sid_endpoint_behavior\x18\x06 \x01(\x0b\x32/.otg.BgpSrteSRv6SIDEndpointBehaviorAndStructureB\x08\n\x06_flagsB\x0f\n\r_sr_algorithmB\x15\n\x13_local_ipv6_addressB\x16\n\x14_remote_ipv6_addressB\x0b\n\t_srv6_sid\"\xfa\x06\n\x0f\x42gpSrteV6Policy\x12\x1a\n\rdistinguisher\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\ripv6_endpoint\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x41\n\rnext_hop_mode\x18\x04 \x01(\x0e\x32%.otg.BgpSrteV6Policy.NextHopMode.EnumH\x03\x88\x01\x01\x12P\n\x15next_hop_address_type\x18\x05 \x01(\x0e\x32,.otg.BgpSrteV6Policy.NextHopAddressType.EnumH\x04\x88\x01\x01\x12\"\n\x15next_hop_ipv4_address\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\"\n\x15next_hop_ipv6_address\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\'\n\x08\x61\x64vanced\x18\x08 \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12!\n\x08\x61\x64\x64_path\x18\t \x01(\x0b\x32\x0f.otg.BgpAddPath\x12\x1f\n\x07\x61s_path\x18\n \x01(\x0b\x32\x0e.otg.BgpAsPath\x12&\n\x0b\x63ommunities\x18\x0b \x03(\x0b\x32\x11.otg.BgpCommunity\x12,\n\x0e\x65xtcommunities\x18\x0c \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12,\n\x0btunnel_tlvs\x18\r \x03(\x0b\x32\x17.otg.BgpSrteV6TunnelTlv\x12\x11\n\x04name\x18\x0e \x01(\tH\x07\x88\x01\x01\x12\x13\n\x06\x61\x63tive\x18\x0f \x01(\x08H\x08\x88\x01\x01\x1a@\n\x0bNextHopMode\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08local_ip\x10\x01\x12\n\n\x06manual\x10\x02\x1a\x41\n\x12NextHopAddressType\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x42\x10\n\x0e_distinguisherB\x08\n\x06_colorB\x10\n\x0e_ipv6_endpointB\x10\n\x0e_next_hop_modeB\x18\n\x16_next_hop_address_typeB\x18\n\x16_next_hop_ipv4_addressB\x18\n\x16_next_hop_ipv6_addressB\x07\n\x05_nameB\t\n\x07_active\"\xb6\x04\n\x12\x42gpSrteV6TunnelTlv\x12\x41\n\x17remote_endpoint_sub_tlv\x18\x01 \x01(\x0b\x32 .otg.BgpSrteRemoteEndpointSubTlv\x12.\n\rcolor_sub_tlv\x18\x02 \x01(\x0b\x32\x17.otg.BgpSrteColorSubTlv\x12\x32\n\x0f\x62inding_sub_tlv\x18\x03 \x01(\x0b\x32\x19.otg.BgpSrteBindingSubTlv\x12\x38\n\x12preference_sub_tlv\x18\x04 \x01(\x0b\x32\x1c.otg.BgpSrtePreferenceSubTlv\x12\x41\n\x17policy_priority_sub_tlv\x18\x05 \x01(\x0b\x32 .otg.BgpSrtePolicyPrioritySubTlv\x12\x39\n\x13policy_name_sub_tlv\x18\x06 \x01(\x0b\x32\x1c.otg.BgpSrtePolicyNameSubTlv\x12U\n\"explicit_null_label_policy_sub_tlv\x18\x07 \x01(\x0b\x32).otg.BgpSrteExplicitNullLabelPolicySubTlv\x12.\n\rsegment_lists\x18\x08 \x03(\x0b\x32\x17.otg.BgpSrteSegmentList\x12\x11\n\x04name\x18\t \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x61\x63tive\x18\n \x01(\x08H\x01\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_active\"\xf2\x01\n\x12\x42gpGracefulRestart\x12\x16\n\tenable_gr\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x0crestart_time\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x18\n\x0b\x65nable_llgr\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x17\n\nstale_time\x18\x04 \x01(\rH\x03\x88\x01\x01\x12 \n\x13\x65nable_notification\x18\x05 \x01(\x08H\x04\x88\x01\x01\x42\x0c\n\n_enable_grB\x0f\n\r_restart_timeB\x0e\n\x0c_enable_llgrB\r\n\x0b_stale_timeB\x16\n\x14_enable_notification\"\xf0\x01\n\x0f\x42gpUpdateReplay\x12\x35\n\x06\x63hoice\x18\x01 \x01(\x0e\x32 .otg.BgpUpdateReplay.Choice.EnumH\x00\x88\x01\x01\x12/\n\x0fstructured_pdus\x18\x02 \x01(\x0b\x32\x16.otg.BgpStructuredPdus\x12#\n\traw_bytes\x18\x03 \x01(\x0b\x32\x10.otg.BgpRawBytes\x1a\x45\n\x06\x43hoice\";\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x13\n\x0fstructured_pdus\x10\x01\x12\r\n\traw_bytes\x10\x02\x42\t\n\x07_choice\"7\n\x0b\x42gpRawBytes\x12(\n\x07updates\x18\x01 \x03(\x0b\x32\x17.otg.BgpOneUpdateReplay\"d\n\x12\x42gpOneUpdateReplay\x12\x15\n\x08time_gap\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x19\n\x0cupdate_bytes\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_time_gapB\x0f\n\r_update_bytes\"G\n\x11\x42gpStructuredPdus\x12\x32\n\x07updates\x18\x01 \x03(\x0b\x32!.otg.BgpOneStructuredUpdateReplay\"\xf7\x01\n\x1c\x42gpOneStructuredUpdateReplay\x12\x15\n\x08time_gap\x18\x01 \x01(\rH\x00\x88\x01\x01\x12+\n\x0fpath_attributes\x18\x02 \x01(\x0b\x32\x12.otg.BgpAttributes\x12\x43\n\x19traditional_unreach_nlris\x18\x03 \x03(\x0b\x32 .otg.BgpOneTraditionalNlriPrefix\x12\x41\n\x17traditional_reach_nlris\x18\x04 \x03(\x0b\x32 .otg.BgpOneTraditionalNlriPrefixB\x0b\n\t_time_gap\"\x8a\x01\n\x1b\x42gpOneTraditionalNlriPrefix\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06prefix\x18\x02 \x01(\rH\x01\x88\x01\x01\x12)\n\x07path_id\x18\x03 \x01(\x0b\x32\x18.otg.BgpNLRIPrefixPathIdB\n\n\x08_addressB\t\n\x07_prefix\"\x83\x01\n\x14\x42gpOneIpv4NLRIPrefix\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06prefix\x18\x02 \x01(\rH\x01\x88\x01\x01\x12)\n\x07path_id\x18\x03 \x01(\x0b\x32\x18.otg.BgpNLRIPrefixPathIdB\n\n\x08_addressB\t\n\x07_prefix\"\x83\x01\n\x14\x42gpOneIpv6NLRIPrefix\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06prefix\x18\x02 \x01(\rH\x01\x88\x01\x01\x12)\n\x07path_id\x18\x03 \x01(\x0b\x32\x18.otg.BgpNLRIPrefixPathIdB\n\n\x08_addressB\t\n\x07_prefix\"3\n\x13\x42gpNLRIPrefixPathId\x12\x12\n\x05value\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x08\n\x06_value\"\x8b\x01\n\x19\x42gpIpv4SrPolicyNLRIPrefix\x12\x1a\n\rdistinguisher\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x15\n\x08\x65ndpoint\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x10\n\x0e_distinguisherB\x08\n\x06_colorB\x0b\n\t_endpoint\"\x8b\x01\n\x19\x42gpIpv6SrPolicyNLRIPrefix\x12\x1a\n\rdistinguisher\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x15\n\x08\x65ndpoint\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x10\n\x0e_distinguisherB\x08\n\x06_colorB\x0b\n\t_endpoint\"\xef\x07\n\rBgpAttributes\x12:\n\x10other_attributes\x18\x01 \x03(\x0b\x32 .otg.BgpAttributesOtherAttribute\x12\x33\n\x06origin\x18\x02 \x01(\x0e\x32\x1e.otg.BgpAttributes.Origin.EnumH\x00\x88\x01\x01\x12)\n\x07\x61s_path\x18\x03 \x01(\x0b\x32\x18.otg.BgpAttributesAsPath\x12+\n\x08\x61s4_path\x18\x04 \x01(\x0b\x32\x19.otg.BgpAttributesAs4Path\x12+\n\x08next_hop\x18\x05 \x01(\x0b\x32\x19.otg.BgpAttributesNextHop\x12J\n\x18multi_exit_discriminator\x18\x06 \x01(\x0b\x32(.otg.BgpAttributesMultiExitDiscriminator\x12;\n\x10local_preference\x18\x07 \x01(\x0b\x32!.otg.BgpAttributesLocalPreference\x12&\n\x19include_atomic_aggregator\x18\x08 \x01(\x08H\x01\x88\x01\x01\x12\x30\n\naggregator\x18\t \x01(\x0b\x32\x1c.otg.BgpAttributesAggregator\x12\x37\n\x0e\x61s4_aggregator\x18\n \x01(\x0b\x32\x1f.otg.BgpAttributesAs4Aggregator\x12.\n\tcommunity\x18\x0b \x03(\x0b\x32\x1b.otg.BgpAttributesCommunity\x12\x35\n\roriginator_id\x18\x0c \x01(\x0b\x32\x1e.otg.BgpAttributesOriginatorId\x12\x13\n\x0b\x63luster_ids\x18\r \x03(\t\x12\x37\n\x14\x65xtended_communities\x18\x0e \x03(\x0b\x32\x19.otg.BgpExtendedCommunity\x12\x43\n\x14tunnel_encapsulation\x18\x0f \x01(\x0b\x32%.otg.BgpAttributesTunnelEncapsulation\x12/\n\x08mp_reach\x18\x10 \x01(\x0b\x32\x1d.otg.BgpAttributesMpReachNlri\x12\x33\n\nmp_unreach\x18\x11 \x01(\x0b\x32\x1f.otg.BgpAttributesMpUnreachNlri\x1a\x43\n\x06Origin\"9\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03igp\x10\x01\x12\x07\n\x03\x65gp\x10\x02\x12\x0e\n\nincomplete\x10\x03\x42\t\n\x07_originB\x1c\n\x1a_include_atomic_aggregator\"\xa7\x02\n\x1b\x42gpAttributesOtherAttribute\x12\x1a\n\rflag_optional\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x0f\x66lag_transitive\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x19\n\x0c\x66lag_partial\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12!\n\x14\x66lag_extended_length\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x11\n\x04type\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x16\n\traw_value\x18\x06 \x01(\tH\x05\x88\x01\x01\x42\x10\n\x0e_flag_optionalB\x12\n\x10_flag_transitiveB\x0f\n\r_flag_partialB\x17\n\x15_flag_extended_lengthB\x07\n\x05_typeB\x0c\n\n_raw_value\"\xaf\x02\n\x13\x42gpAttributesAsPath\x12\x39\n\x06\x63hoice\x18\x01 \x01(\x0e\x32$.otg.BgpAttributesAsPath.Choice.EnumH\x00\x88\x01\x01\x12\x41\n\x11\x66our_byte_as_path\x18\x02 \x01(\x0b\x32&.otg.BgpAttributesAsPathFourByteAsPath\x12?\n\x10two_byte_as_path\x18\x03 \x01(\x0b\x32%.otg.BgpAttributesAsPathTwoByteAsPath\x1aN\n\x06\x43hoice\"D\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x15\n\x11\x66our_byte_as_path\x10\x01\x12\x14\n\x10two_byte_as_path\x10\x02\x42\t\n\x07_choice\"^\n!BgpAttributesAsPathFourByteAsPath\x12\x39\n\x08segments\x18\x01 \x03(\x0b\x32\'.otg.BgpAttributesFourByteAsPathSegment\"\xe6\x01\n\"BgpAttributesFourByteAsPathSegment\x12\x44\n\x04type\x18\x01 \x01(\x0e\x32\x31.otg.BgpAttributesFourByteAsPathSegment.Type.EnumH\x00\x88\x01\x01\x12\x12\n\nas_numbers\x18\x02 \x03(\r\x1a]\n\x04Type\"U\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x61s_seq\x10\x01\x12\n\n\x06\x61s_set\x10\x02\x12\x11\n\ras_confed_seq\x10\x03\x12\x11\n\ras_confed_set\x10\x04\x42\x07\n\x05_type\"\\\n BgpAttributesAsPathTwoByteAsPath\x12\x38\n\x08segments\x18\x01 \x03(\x0b\x32&.otg.BgpAttributesTwoByteAsPathSegment\"\xe4\x01\n!BgpAttributesTwoByteAsPathSegment\x12\x43\n\x04type\x18\x01 \x01(\x0e\x32\x30.otg.BgpAttributesTwoByteAsPathSegment.Type.EnumH\x00\x88\x01\x01\x12\x12\n\nas_numbers\x18\x02 \x03(\r\x1a]\n\x04Type\"U\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x61s_seq\x10\x01\x12\n\n\x06\x61s_set\x10\x02\x12\x11\n\ras_confed_seq\x10\x03\x12\x11\n\ras_confed_set\x10\x04\x42\x07\n\x05_type\"Q\n\x14\x42gpAttributesAs4Path\x12\x39\n\x08segments\x18\x01 \x03(\x0b\x32\'.otg.BgpAttributesFourByteAsPathSegment\"\xab\x02\n\x17\x42gpAttributesAggregator\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.BgpAttributesAggregator.Choice.EnumH\x00\x88\x01\x01\x12\x19\n\x0c\x66our_byte_as\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x18\n\x0btwo_byte_as\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x19\n\x0cipv4_address\x18\x04 \x01(\tH\x03\x88\x01\x01\x1a\x44\n\x06\x43hoice\":\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0c\x66our_byte_as\x10\x01\x12\x0f\n\x0btwo_byte_as\x10\x02\x42\t\n\x07_choiceB\x0f\n\r_four_byte_asB\x0e\n\x0c_two_byte_asB\x0f\n\r_ipv4_address\"h\n\x1a\x42gpAttributesAs4Aggregator\x12\x13\n\x06\x61s_num\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x19\n\x0cipv4_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\t\n\x07_as_numB\x0f\n\r_ipv4_address\"\xb1\x02\n\x16\x42gpAttributesCommunity\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.BgpAttributesCommunity.Choice.EnumH\x00\x88\x01\x01\x12;\n\x10\x63ustom_community\x18\x02 \x01(\x0b\x32!.otg.BgpAttributesCustomCommunity\x1a\x90\x01\n\x06\x43hoice\"\x85\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x14\n\x10\x63ustom_community\x10\x01\x12\r\n\tno_export\x10\x02\x12\x11\n\rno_advertised\x10\x03\x12\x17\n\x13no_export_subconfed\x10\x04\x12\x0e\n\nllgr_stale\x10\x05\x12\x0b\n\x07no_llgr\x10\x06\x42\t\n\x07_choice\"d\n\x1c\x42gpAttributesCustomCommunity\x12\x16\n\tas_number\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0c\n\n_as_numberB\t\n\x07_custom\"\xab\x02\n\x14\x42gpAttributesNextHop\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.BgpAttributesNextHop.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04ipv4\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04ipv6\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x45\n\x12ipv6_two_addresses\x18\x04 \x01(\x0b\x32).otg.BgpAttributesNextHopIpv6TwoAddresses\x1aM\n\x06\x43hoice\"C\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x12\x16\n\x12ipv6_two_addresses\x10\x03\x42\t\n\x07_choiceB\x07\n\x05_ipv4B\x07\n\x05_ipv6\"d\n$BgpAttributesNextHopIpv6TwoAddresses\x12\x12\n\x05\x66irst\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06second\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_firstB\t\n\x07_second\"\xcf\x03\n\x18\x42gpAttributesMpReachNlri\x12+\n\x08next_hop\x18\x01 \x01(\x0b\x32\x19.otg.BgpAttributesNextHop\x12>\n\x06\x63hoice\x18\x02 \x01(\x0e\x32).otg.BgpAttributesMpReachNlri.Choice.EnumH\x00\x88\x01\x01\x12/\n\x0cipv4_unicast\x18\x03 \x03(\x0b\x32\x19.otg.BgpOneIpv4NLRIPrefix\x12/\n\x0cipv6_unicast\x18\x04 \x03(\x0b\x32\x19.otg.BgpOneIpv6NLRIPrefix\x12\x35\n\ripv4_srpolicy\x18\x05 \x01(\x0b\x32\x1e.otg.BgpIpv4SrPolicyNLRIPrefix\x12\x35\n\ripv6_srpolicy\x18\x06 \x01(\x0b\x32\x1e.otg.BgpIpv6SrPolicyNLRIPrefix\x1ak\n\x06\x43hoice\"a\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0cipv4_unicast\x10\x01\x12\x10\n\x0cipv6_unicast\x10\x02\x12\x11\n\ripv4_srpolicy\x10\x03\x12\x11\n\ripv6_srpolicy\x10\x04\x42\t\n\x07_choice\"\xa6\x03\n\x1a\x42gpAttributesMpUnreachNlri\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.BgpAttributesMpUnreachNlri.Choice.EnumH\x00\x88\x01\x01\x12/\n\x0cipv4_unicast\x18\x02 \x03(\x0b\x32\x19.otg.BgpOneIpv4NLRIPrefix\x12/\n\x0cipv6_unicast\x18\x03 \x03(\x0b\x32\x19.otg.BgpOneIpv6NLRIPrefix\x12\x35\n\ripv4_srpolicy\x18\x04 \x01(\x0b\x32\x1e.otg.BgpIpv4SrPolicyNLRIPrefix\x12\x35\n\ripv6_srpolicy\x18\x05 \x01(\x0b\x32\x1e.otg.BgpIpv6SrPolicyNLRIPrefix\x1ak\n\x06\x43hoice\"a\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0cipv4_unicast\x10\x01\x12\x10\n\x0cipv6_unicast\x10\x02\x12\x11\n\ripv4_srpolicy\x10\x03\x12\x11\n\ripv6_srpolicy\x10\x04\x42\t\n\x07_choice\"C\n#BgpAttributesMultiExitDiscriminator\x12\x12\n\x05value\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x08\n\x06_value\"<\n\x1c\x42gpAttributesLocalPreference\x12\x12\n\x05value\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x08\n\x06_value\"9\n\x19\x42gpAttributesOriginatorId\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"\xe2\x01\n BgpAttributesTunnelEncapsulation\x12\x46\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x31.otg.BgpAttributesTunnelEncapsulation.Choice.EnumH\x00\x88\x01\x01\x12\x39\n\tsr_policy\x18\x02 \x01(\x0b\x32&.otg.BgpAttributesSegmentRoutingPolicy\x1a\x30\n\x06\x43hoice\"&\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tsr_policy\x10\x01\x42\t\n\x07_choice\"\xac\x04\n!BgpAttributesSegmentRoutingPolicy\x12:\n\x1a\x62inding_segment_identifier\x18\x01 \x01(\x0b\x32\x16.otg.BgpAttributesBsid\x12\x43\n\x1fsrv6_binding_segment_identifier\x18\x02 \x03(\x0b\x32\x1a.otg.BgpAttributesSrv6Bsid\x12\x38\n\npreference\x18\x03 \x01(\x0b\x32$.otg.BgpAttributesSrPolicyPreference\x12\x34\n\x08priority\x18\x04 \x01(\x0b\x32\".otg.BgpAttributesSrPolicyPriority\x12\x39\n\x0bpolicy_name\x18\x05 \x01(\x0b\x32$.otg.BgpAttributesSrPolicyPolicyName\x12L\n\x15policy_candidate_name\x18\x06 \x01(\x0b\x32-.otg.BgpAttributesSrPolicyPolicyCandidateName\x12P\n\x1a\x65xplicit_null_label_policy\x18\x07 \x01(\x0b\x32,.otg.BgpAttributesSrPolicyExplicitNullPolicy\x12;\n\x0csegment_list\x18\x08 \x03(\x0b\x32%.otg.BgpAttributesSrPolicySegmentList\"\xe2\x01\n\x11\x42gpAttributesBsid\x12\x37\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\".otg.BgpAttributesBsid.Choice.EnumH\x00\x88\x01\x01\x12(\n\x04mpls\x18\x02 \x01(\x0b\x32\x1a.otg.BgpAttributesBsidMpls\x12(\n\x04srv6\x18\x03 \x01(\x0b\x32\x1a.otg.BgpAttributesBsidSrv6\x1a\x35\n\x06\x43hoice\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04mpls\x10\x01\x12\x08\n\x04srv6\x10\x02\x42\t\n\x07_choice\"\xc8\x01\n\x15\x42gpAttributesBsidMpls\x12%\n\x18\x66lag_specified_bsid_only\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12#\n\x16\x66lag_drop_upon_invalid\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12+\n\x08mpls_sid\x18\x03 \x01(\x0b\x32\x19.otg.BgpAttributesSidMplsB\x1b\n\x19_flag_specified_bsid_onlyB\x19\n\x17_flag_drop_upon_invalid\"\xc1\x01\n\x15\x42gpAttributesBsidSrv6\x12%\n\x18\x66lag_specified_bsid_only\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12#\n\x16\x66lag_drop_upon_invalid\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x16\n\tipv6_addr\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x1b\n\x19_flag_specified_bsid_onlyB\x19\n\x17_flag_drop_upon_invalidB\x0c\n\n_ipv6_addr\"\xf6\x02\n\x15\x42gpAttributesSrv6Bsid\x12%\n\x18\x66lag_specified_bsid_only\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12#\n\x16\x66lag_drop_upon_invalid\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12(\n\x1b\x66lag_srv6_endpoint_behavior\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x16\n\tipv6_addr\x18\x04 \x01(\tH\x03\x88\x01\x01\x12i\n\x16srv6_endpoint_behavior\x18\x05 \x01(\x0b\x32I.otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructureB\x1b\n\x19_flag_specified_bsid_onlyB\x19\n\x17_flag_drop_upon_invalidB\x1e\n\x1c_flag_srv6_endpoint_behaviorB\x0c\n\n_ipv6_addr\"\xa0\x01\n\x14\x42gpAttributesSidMpls\x12\x12\n\x05label\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1a\n\rtraffic_class\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x15\n\x08\x66lag_bos\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x10\n\x03ttl\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x08\n\x06_labelB\x10\n\x0e_traffic_classB\x0b\n\t_flag_bosB\x06\n\x04_ttl\".\n\x14\x42gpAttributesSidSrv6\x12\x0f\n\x02ip\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x05\n\x03_ip\"?\n\x1f\x42gpAttributesSrPolicyPreference\x12\x12\n\x05value\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x08\n\x06_value\"=\n\x1d\x42gpAttributesSrPolicyPriority\x12\x12\n\x05value\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x08\n\x06_value\"H\n(BgpAttributesSrPolicyPolicyCandidateName\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"?\n\x1f\x42gpAttributesSrPolicyPolicyName\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"\xf9\x01\n\'BgpAttributesSrPolicyExplicitNullPolicy\x12M\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x38.otg.BgpAttributesSrPolicyExplicitNullPolicy.Choice.EnumH\x00\x88\x01\x01\x1at\n\x06\x43hoice\"j\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07unknown\x10\x01\x12\r\n\tpush_ipv4\x10\x02\x12\r\n\tpush_ipv6\x10\x03\x12\x16\n\x12push_ipv4_and_ipv6\x10\x04\x12\x0e\n\ndonot_push\x10\x05\x42\t\n\x07_choice\"\xb7\x01\n BgpAttributesSrPolicySegmentList\x12G\n\x06weight\x18\x01 \x01(\x0b\x32\x37.otg.BgpAttributesSegmentRoutingPolicySegmentListWeight\x12J\n\x08segments\x18\x02 \x03(\x0b\x32\x38.otg.BgpAttributesSegmentRoutingPolicySegmentListSegment\"R\n2BgpAttributesSegmentRoutingPolicySegmentListWeight\x12\x12\n\x05value\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x08\n\x06_value\"\xe3\x07\n3BgpAttributesSegmentRoutingPolicySegmentListSegment\x12Y\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x44.otg.BgpAttributesSegmentRoutingPolicySegmentListSegment.Choice.EnumH\x00\x88\x01\x01\x12;\n\x06type_a\x18\x02 \x01(\x0b\x32+.otg.BgpAttributesSegmentRoutingPolicyTypeA\x12;\n\x06type_b\x18\x03 \x01(\x0b\x32+.otg.BgpAttributesSegmentRoutingPolicyTypeB\x12;\n\x06type_c\x18\x04 \x01(\x0b\x32+.otg.BgpAttributesSegmentRoutingPolicyTypeC\x12;\n\x06type_d\x18\x05 \x01(\x0b\x32+.otg.BgpAttributesSegmentRoutingPolicyTypeD\x12;\n\x06type_e\x18\x06 \x01(\x0b\x32+.otg.BgpAttributesSegmentRoutingPolicyTypeE\x12;\n\x06type_f\x18\x07 \x01(\x0b\x32+.otg.BgpAttributesSegmentRoutingPolicyTypeF\x12;\n\x06type_g\x18\x08 \x01(\x0b\x32+.otg.BgpAttributesSegmentRoutingPolicyTypeG\x12;\n\x06type_h\x18\t \x01(\x0b\x32+.otg.BgpAttributesSegmentRoutingPolicyTypeH\x12;\n\x06type_i\x18\n \x01(\x0b\x32+.otg.BgpAttributesSegmentRoutingPolicyTypeI\x12;\n\x06type_j\x18\x0b \x01(\x0b\x32+.otg.BgpAttributesSegmentRoutingPolicyTypeJ\x12;\n\x06type_k\x18\x0c \x01(\x0b\x32+.otg.BgpAttributesSegmentRoutingPolicyTypeK\x1a\xa6\x01\n\x06\x43hoice\"\x9b\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06type_a\x10\x01\x12\n\n\x06type_b\x10\x02\x12\n\n\x06type_c\x10\x03\x12\n\n\x06type_d\x10\x04\x12\n\n\x06type_e\x10\x05\x12\n\n\x06type_f\x10\x06\x12\n\n\x06type_g\x10\x07\x12\n\n\x06type_h\x10\x08\x12\n\n\x06type_i\x10\t\x12\n\n\x06type_j\x10\n\x12\n\n\x06type_k\x10\x0b\x42\t\n\x07_choice\"\x95\x01\n&BgpAttributesSegmentRoutingPolicyTypeA\x12>\n\x05\x66lags\x18\x01 \x01(\x0b\x32/.otg.BgpAttributesSegmentRoutingPolicyTypeFlags\x12+\n\x08mpls_sid\x18\x02 \x01(\x0b\x32\x19.otg.BgpAttributesSidMpls\"\xf7\x01\n&BgpAttributesSegmentRoutingPolicyTypeB\x12>\n\x05\x66lags\x18\x01 \x01(\x0b\x32/.otg.BgpAttributesSegmentRoutingPolicyTypeFlags\x12\x15\n\x08srv6_sid\x18\x02 \x01(\tH\x00\x88\x01\x01\x12i\n\x16srv6_endpoint_behavior\x18\x03 \x01(\x0b\x32I.otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructureB\x0b\n\t_srv6_sid\"\xfa\x01\n&BgpAttributesSegmentRoutingPolicyTypeC\x12>\n\x05\x66lags\x18\x01 \x01(\x0b\x32/.otg.BgpAttributesSegmentRoutingPolicyTypeFlags\x12\x19\n\x0csr_algorithm\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11ipv4_node_address\x18\x03 \x01(\tH\x01\x88\x01\x01\x12.\n\x0bsr_mpls_sid\x18\x04 \x01(\x0b\x32\x19.otg.BgpAttributesSidMplsB\x0f\n\r_sr_algorithmB\x14\n\x12_ipv4_node_address\"\xfa\x01\n&BgpAttributesSegmentRoutingPolicyTypeD\x12>\n\x05\x66lags\x18\x01 \x01(\x0b\x32/.otg.BgpAttributesSegmentRoutingPolicyTypeFlags\x12\x19\n\x0csr_algorithm\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11ipv6_node_address\x18\x03 \x01(\tH\x01\x88\x01\x01\x12.\n\x0bsr_mpls_sid\x18\x04 \x01(\x0b\x32\x19.otg.BgpAttributesSidMplsB\x0f\n\r_sr_algorithmB\x14\n\x12_ipv6_node_address\"\x86\x02\n&BgpAttributesSegmentRoutingPolicyTypeE\x12>\n\x05\x66lags\x18\x01 \x01(\x0b\x32/.otg.BgpAttributesSegmentRoutingPolicyTypeFlags\x12\x1f\n\x12local_interface_id\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11ipv4_node_address\x18\x03 \x01(\tH\x01\x88\x01\x01\x12.\n\x0bsr_mpls_sid\x18\x04 \x01(\x0b\x32\x19.otg.BgpAttributesSidMplsB\x15\n\x13_local_interface_idB\x14\n\x12_ipv4_node_address\"\x8a\x02\n&BgpAttributesSegmentRoutingPolicyTypeF\x12>\n\x05\x66lags\x18\x01 \x01(\x0b\x32/.otg.BgpAttributesSegmentRoutingPolicyTypeFlags\x12\x1f\n\x12local_ipv4_address\x18\x02 \x01(\tH\x00\x88\x01\x01\x12 \n\x13remote_ipv4_address\x18\x03 \x01(\tH\x01\x88\x01\x01\x12.\n\x0bsr_mpls_sid\x18\x04 \x01(\x0b\x32\x19.otg.BgpAttributesSidMplsB\x15\n\x13_local_ipv4_addressB\x16\n\x14_remote_ipv4_address\"\x90\x03\n&BgpAttributesSegmentRoutingPolicyTypeG\x12>\n\x05\x66lags\x18\x01 \x01(\x0b\x32/.otg.BgpAttributesSegmentRoutingPolicyTypeFlags\x12\x1f\n\x12local_interface_id\x18\x02 \x01(\rH\x00\x88\x01\x01\x12$\n\x17local_ipv6_node_address\x18\x03 \x01(\tH\x01\x88\x01\x01\x12 \n\x13remote_interface_id\x18\x04 \x01(\rH\x02\x88\x01\x01\x12%\n\x18remote_ipv6_node_address\x18\x05 \x01(\tH\x03\x88\x01\x01\x12.\n\x0bsr_mpls_sid\x18\x06 \x01(\x0b\x32\x19.otg.BgpAttributesSidMplsB\x15\n\x13_local_interface_idB\x1a\n\x18_local_ipv6_node_addressB\x16\n\x14_remote_interface_idB\x1b\n\x19_remote_ipv6_node_address\"\x8a\x02\n&BgpAttributesSegmentRoutingPolicyTypeH\x12>\n\x05\x66lags\x18\x01 \x01(\x0b\x32/.otg.BgpAttributesSegmentRoutingPolicyTypeFlags\x12\x1f\n\x12local_ipv6_address\x18\x02 \x01(\tH\x00\x88\x01\x01\x12 \n\x13remote_ipv6_address\x18\x03 \x01(\tH\x01\x88\x01\x01\x12.\n\x0bsr_mpls_sid\x18\x06 \x01(\x0b\x32\x19.otg.BgpAttributesSidMplsB\x15\n\x13_local_ipv6_addressB\x16\n\x14_remote_ipv6_address\"\xe2\x02\n&BgpAttributesSegmentRoutingPolicyTypeI\x12>\n\x05\x66lags\x18\x01 \x01(\x0b\x32/.otg.BgpAttributesSegmentRoutingPolicyTypeFlags\x12\x19\n\x0csr_algorithm\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11ipv6_node_address\x18\x03 \x01(\tH\x01\x88\x01\x01\x12+\n\x08srv6_sid\x18\x04 \x01(\x0b\x32\x19.otg.BgpAttributesSidSrv6\x12i\n\x16srv6_endpoint_behavior\x18\x05 \x01(\x0b\x32I.otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructureB\x0f\n\r_sr_algorithmB\x14\n\x12_ipv6_node_address\"\xa4\x04\n&BgpAttributesSegmentRoutingPolicyTypeJ\x12>\n\x05\x66lags\x18\x01 \x01(\x0b\x32/.otg.BgpAttributesSegmentRoutingPolicyTypeFlags\x12\x19\n\x0csr_algorithm\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1f\n\x12local_interface_id\x18\x03 \x01(\rH\x01\x88\x01\x01\x12$\n\x17local_ipv6_node_address\x18\x04 \x01(\tH\x02\x88\x01\x01\x12 \n\x13remote_interface_id\x18\x05 \x01(\rH\x03\x88\x01\x01\x12%\n\x18remote_ipv6_node_address\x18\x06 \x01(\tH\x04\x88\x01\x01\x12+\n\x08srv6_sid\x18\x07 \x01(\x0b\x32\x19.otg.BgpAttributesSidSrv6\x12i\n\x16srv6_endpoint_behavior\x18\x08 \x01(\x0b\x32I.otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructureB\x0f\n\r_sr_algorithmB\x15\n\x13_local_interface_idB\x1a\n\x18_local_ipv6_node_addressB\x16\n\x14_remote_interface_idB\x1b\n\x19_remote_ipv6_node_address\"\x9e\x03\n&BgpAttributesSegmentRoutingPolicyTypeK\x12>\n\x05\x66lags\x18\x01 \x01(\x0b\x32/.otg.BgpAttributesSegmentRoutingPolicyTypeFlags\x12\x19\n\x0csr_algorithm\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1f\n\x12local_ipv6_address\x18\x03 \x01(\tH\x01\x88\x01\x01\x12 \n\x13remote_ipv6_address\x18\x04 \x01(\tH\x02\x88\x01\x01\x12+\n\x08srv6_sid\x18\x05 \x01(\x0b\x32\x19.otg.BgpAttributesSidSrv6\x12i\n\x16srv6_endpoint_behavior\x18\x06 \x01(\x0b\x32I.otg.BgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructureB\x0f\n\r_sr_algorithmB\x15\n\x13_local_ipv6_addressB\x16\n\x14_remote_ipv6_address\"\xac\x01\n*BgpAttributesSegmentRoutingPolicyTypeFlags\x12\x13\n\x06v_flag\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x13\n\x06\x61_flag\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x13\n\x06s_flag\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x13\n\x06\x62_flag\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\t\n\x07_v_flagB\t\n\x07_a_flagB\t\n\x07_s_flagB\t\n\x07_b_flag\"\x9c\x02\nDBgpAttributesSegmentRoutingPolicySRv6SIDEndpointBehaviorAndStructure\x12\x1f\n\x12\x65ndpoint_behaviour\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tlb_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x16\n\tln_length\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x18\n\x0b\x66unc_length\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x17\n\narg_length\x18\x05 \x01(\rH\x04\x88\x01\x01\x42\x15\n\x13_endpoint_behaviourB\x0c\n\n_lb_lengthB\x0c\n\n_ln_lengthB\x0e\n\x0c_func_lengthB\r\n\x0b_arg_length\"H\n(BgpNLRIPrefixSegmentRoutingDistinguisher\x12\x12\n\x05value\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x08\n\x06_value\"\x93\x07\n\tBgpV6Peer\x12\x19\n\x0cpeer_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x0fsegment_routing\x18\x02 \x01(\x0b\x32\x18.otg.BgpV6SegmentRouting\x12\x39\n\x16\x65vpn_ethernet_segments\x18\x03 \x03(\x0b\x32\x19.otg.BgpV6EthernetSegment\x12\x30\n\x07\x61s_type\x18\x04 \x01(\x0e\x32\x1a.otg.BgpV6Peer.AsType.EnumH\x01\x88\x01\x01\x12\x16\n\tas_number\x18\x05 \x01(\rH\x02\x88\x01\x01\x12?\n\x0f\x61s_number_width\x18\x06 \x01(\x0e\x32!.otg.BgpV6Peer.AsNumberWidth.EnumH\x03\x88\x01\x01\x12\"\n\x08\x61\x64vanced\x18\x07 \x01(\x0b\x32\x10.otg.BgpAdvanced\x12&\n\ncapability\x18\x08 \x01(\x0b\x32\x12.otg.BgpCapability\x12\x44\n\x1alearned_information_filter\x18\t \x01(\x0b\x32 .otg.BgpLearnedInformationFilter\x12\'\n\tv4_routes\x18\n \x03(\x0b\x32\x14.otg.BgpV4RouteRange\x12\'\n\tv6_routes\x18\x0b \x03(\x0b\x32\x14.otg.BgpV6RouteRange\x12.\n\x10v4_srte_policies\x18\x0c \x03(\x0b\x32\x14.otg.BgpSrteV4Policy\x12.\n\x10v6_srte_policies\x18\r \x03(\x0b\x32\x14.otg.BgpSrteV6Policy\x12\x11\n\x04name\x18\x0e \x01(\tH\x04\x88\x01\x01\x12\x31\n\x10graceful_restart\x18\x0f \x01(\x0b\x32\x17.otg.BgpGracefulRestart\x12,\n\x0ereplay_updates\x18\x10 \x01(\x0b\x32\x14.otg.BgpUpdateReplay\x1a\x35\n\x06\x41sType\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ibgp\x10\x01\x12\x08\n\x04\x65\x62gp\x10\x02\x1a;\n\rAsNumberWidth\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03two\x10\x01\x12\x08\n\x04\x66our\x10\x02\x42\x0f\n\r_peer_addressB\n\n\x08_as_typeB\x0c\n\n_as_numberB\x12\n\x10_as_number_widthB\x07\n\x05_name\"U\n\x0e\x42gpV6Interface\x12\x16\n\tipv6_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x05peers\x18\x02 \x03(\x0b\x32\x0e.otg.BgpV6PeerB\x0c\n\n_ipv6_name\"\xf1\x03\n\x13\x42gpV6SegmentRouting\x12!\n\x14ingress_supports_vpn\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x15reduced_encapsulation\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1e\n\x11\x63opy_time_to_live\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x19\n\x0ctime_to_live\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1d\n\x10max_sids_per_srh\x18\x05 \x01(\rH\x04\x88\x01\x01\x12-\n auto_generate_segment_left_value\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x1f\n\x12segment_left_value\x18\x07 \x01(\rH\x06\x88\x01\x01\x12#\n\x16\x61\x64vertise_sr_te_policy\x18\x08 \x01(\x08H\x07\x88\x01\x01\x42\x17\n\x15_ingress_supports_vpnB\x18\n\x16_reduced_encapsulationB\x14\n\x12_copy_time_to_liveB\x0f\n\r_time_to_liveB\x13\n\x11_max_sids_per_srhB#\n!_auto_generate_segment_left_valueB\x15\n\x13_segment_left_valueB\x19\n\x17_advertise_sr_te_policy\"\xf0\x03\n\x14\x42gpV6EthernetSegment\x12\x36\n\x0b\x64\x66_election\x18\x01 \x01(\x0b\x32!.otg.BgpEthernetSegmentDfElection\x12 \n\x04\x65vis\x18\x02 \x03(\x0b\x32\x12.otg.BgpV6EvpnEvis\x12\x10\n\x03\x65si\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x43\n\x0b\x61\x63tive_mode\x18\x04 \x01(\x0e\x32).otg.BgpV6EthernetSegment.ActiveMode.EnumH\x01\x88\x01\x01\x12\x16\n\tesi_label\x18\x05 \x01(\rH\x02\x88\x01\x01\x12\'\n\x08\x61\x64vanced\x18\x06 \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12&\n\x0b\x63ommunities\x18\x07 \x03(\x0b\x32\x11.otg.BgpCommunity\x12-\n\x0f\x65xt_communities\x18\x08 \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12\x1f\n\x07\x61s_path\x18\t \x01(\x0b\x32\x0e.otg.BgpAsPath\x1aH\n\nActiveMode\":\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rsingle_active\x10\x01\x12\x0e\n\nall_active\x10\x02\x42\x06\n\x04_esiB\x0e\n\x0c_active_modeB\x0c\n\n_esi_label\"\xa8\x01\n\rBgpV6EvpnEvis\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.BgpV6EvpnEvis.Choice.EnumH\x00\x88\x01\x01\x12%\n\tevi_vxlan\x18\x02 \x01(\x0b\x32\x12.otg.BgpV6EviVxlan\x1a\x30\n\x06\x43hoice\"&\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tevi_vxlan\x10\x01\x42\t\n\x07_choice\"\xe3\x05\n\rBgpV6EviVxlan\x12<\n\x11\x62roadcast_domains\x18\x01 \x03(\x0b\x32!.otg.BgpV6EviVxlanBroadcastDomain\x12\x46\n\x10replication_type\x18\x02 \x01(\x0e\x32\'.otg.BgpV6EviVxlan.ReplicationType.EnumH\x00\x88\x01\x01\x12\x17\n\npmsi_label\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x15\n\x08\x61\x64_label\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x37\n\x13route_distinguisher\x18\x05 \x01(\x0b\x32\x1a.otg.BgpRouteDistinguisher\x12\x30\n\x13route_target_export\x18\x06 \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\x30\n\x13route_target_import\x18\x07 \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\x33\n\x16l3_route_target_export\x18\x08 \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\x33\n\x16l3_route_target_import\x18\t \x03(\x0b\x32\x13.otg.BgpRouteTarget\x12\'\n\x08\x61\x64vanced\x18\n \x01(\x0b\x32\x15.otg.BgpRouteAdvanced\x12&\n\x0b\x63ommunities\x18\x0b \x03(\x0b\x32\x11.otg.BgpCommunity\x12-\n\x0f\x65xt_communities\x18\x0c \x03(\x0b\x32\x14.otg.BgpExtCommunity\x12\x1f\n\x07\x61s_path\x18\r \x01(\x0b\x32\x0e.otg.BgpAsPath\x1a\x43\n\x0fReplicationType\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x17\n\x13ingress_replication\x10\x01\x42\x13\n\x11_replication_typeB\r\n\x0b_pmsi_labelB\x0b\n\t_ad_label\"\xb4\x01\n\x1c\x42gpV6EviVxlanBroadcastDomain\x12*\n\rcmac_ip_range\x18\x01 \x03(\x0b\x32\x13.otg.BgpCMacIpRange\x12\x1c\n\x0f\x65thernet_tag_id\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1f\n\x12vlan_aware_service\x18\x03 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_ethernet_tag_idB\x15\n\x13_vlan_aware_service\"]\n\x0b\x44\x65viceVxlan\x12&\n\nv4_tunnels\x18\x01 \x03(\x0b\x32\x12.otg.VxlanV4Tunnel\x12&\n\nv6_tunnels\x18\x02 \x03(\x0b\x32\x12.otg.VxlanV6Tunnel\"\xbb\x01\n\rVxlanV4Tunnel\x12\x1d\n\x10source_interface\x18\x01 \x01(\tH\x00\x88\x01\x01\x12@\n\x13\x64\x65stination_ip_mode\x18\x02 \x01(\x0b\x32#.otg.VxlanV4TunnelDestinationIPMode\x12\x10\n\x03vni\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x04 \x01(\tH\x02\x88\x01\x01\x42\x13\n\x11_source_interfaceB\x06\n\x04_vniB\x07\n\x05_name\"\xbb\x01\n\rVxlanV6Tunnel\x12\x1d\n\x10source_interface\x18\x01 \x01(\tH\x00\x88\x01\x01\x12@\n\x13\x64\x65stination_ip_mode\x18\x02 \x01(\x0b\x32#.otg.VxlanV6TunnelDestinationIPMode\x12\x10\n\x03vni\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x04 \x01(\tH\x02\x88\x01\x01\x42\x13\n\x11_source_interfaceB\x06\n\x04_vniB\x07\n\x05_name\"\xae\x02\n\x1eVxlanV4TunnelDestinationIPMode\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.VxlanV4TunnelDestinationIPMode.Choice.EnumH\x00\x88\x01\x01\x12;\n\x07unicast\x18\x02 \x01(\x0b\x32*.otg.VxlanV4TunnelDestinationIPModeUnicast\x12?\n\tmulticast\x18\x03 \x01(\x0b\x32,.otg.VxlanV4TunnelDestinationIPModeMulticast\x1a=\n\x06\x43hoice\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07unicast\x10\x01\x12\r\n\tmulticast\x10\x02\x42\t\n\x07_choice\"\xae\x02\n\x1eVxlanV6TunnelDestinationIPMode\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.VxlanV6TunnelDestinationIPMode.Choice.EnumH\x00\x88\x01\x01\x12;\n\x07unicast\x18\x02 \x01(\x0b\x32*.otg.VxlanV6TunnelDestinationIPModeUnicast\x12?\n\tmulticast\x18\x03 \x01(\x0b\x32,.otg.VxlanV6TunnelDestinationIPModeMulticast\x1a=\n\x06\x43hoice\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07unicast\x10\x01\x12\r\n\tmulticast\x10\x02\x42\t\n\x07_choice\"f\n%VxlanV4TunnelDestinationIPModeUnicast\x12=\n\x05vteps\x18\x01 \x03(\x0b\x32..otg.VxlanV4TunnelDestinationIPModeUnicastVtep\"f\n%VxlanV6TunnelDestinationIPModeUnicast\x12=\n\x05vteps\x18\x01 \x03(\x0b\x32..otg.VxlanV6TunnelDestinationIPModeUnicastVtep\"\x96\x01\n6VxlanTunnelDestinationIPModeUnicastArpSuppressionCache\x12\x1a\n\rremote_vm_mac\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eremote_vm_ipv4\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_remote_vm_macB\x11\n\x0f_remote_vm_ipv4\"\xc1\x01\n)VxlanV4TunnelDestinationIPModeUnicastVtep\x12 \n\x13remote_vtep_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12Z\n\x15\x61rp_suppression_cache\x18\x02 \x03(\x0b\x32;.otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCacheB\x16\n\x14_remote_vtep_address\"\xc1\x01\n)VxlanV6TunnelDestinationIPModeUnicastVtep\x12 \n\x13remote_vtep_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12Z\n\x15\x61rp_suppression_cache\x18\x02 \x03(\x0b\x32;.otg.VxlanTunnelDestinationIPModeUnicastArpSuppressionCacheB\x16\n\x14_remote_vtep_address\"K\n\'VxlanV4TunnelDestinationIPModeMulticast\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_address\"K\n\'VxlanV6TunnelDestinationIPModeMulticast\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_address\"\x91\x01\n\nDeviceRsvp\x12/\n\x0fipv4_interfaces\x18\x01 \x03(\x0b\x32\x16.otg.RsvpIpv4Interface\x12\x36\n\x13lsp_ipv4_interfaces\x18\x02 \x03(\x0b\x32\x19.otg.RsvpLspIpv4Interface\x12\x11\n\x04name\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_name\"\xc5\x04\n\x11RsvpIpv4Interface\x12\x16\n\tipv4_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bneighbor_ip\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1e\n\x11label_space_start\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x1c\n\x0flabel_space_end\x18\x04 \x01(\rH\x03\x88\x01\x01\x12%\n\x18\x65nable_refresh_reduction\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12%\n\x18summary_refresh_interval\x18\x06 \x01(\rH\x05\x88\x01\x01\x12\x18\n\x0bsend_bundle\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12\x1d\n\x10\x62undle_threshold\x18\x08 \x01(\rH\x07\x88\x01\x01\x12\x19\n\x0c\x65nable_hello\x18\t \x01(\x08H\x08\x88\x01\x01\x12\x1b\n\x0ehello_interval\x18\n \x01(\rH\t\x88\x01\x01\x12\x1f\n\x12timeout_multiplier\x18\x0b \x01(\rH\n\x88\x01\x01\x42\x0c\n\n_ipv4_nameB\x0e\n\x0c_neighbor_ipB\x14\n\x12_label_space_startB\x12\n\x10_label_space_endB\x1b\n\x19_enable_refresh_reductionB\x1b\n\x19_summary_refresh_intervalB\x0e\n\x0c_send_bundleB\x13\n\x11_bundle_thresholdB\x0f\n\r_enable_helloB\x11\n\x0f_hello_intervalB\x15\n\x13_timeout_multiplier\"\xd0\x01\n\x14RsvpLspIpv4Interface\x12\x16\n\tipv4_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12G\n\x14p2p_egress_ipv4_lsps\x18\x02 \x01(\x0b\x32).otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp\x12I\n\x15p2p_ingress_ipv4_lsps\x18\x03 \x03(\x0b\x32*.otg.RsvpLspIpv4InterfaceP2PIngressIpv4LspB\x0c\n\n_ipv4_name\"\xf1\x03\n$RsvpLspIpv4InterfaceP2PEgressIpv4Lsp\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10refresh_interval\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1f\n\x12timeout_multiplier\x18\x03 \x01(\rH\x02\x88\x01\x01\x12_\n\x11reservation_style\x18\x04 \x01(\x0e\x32?.otg.RsvpLspIpv4InterfaceP2PEgressIpv4Lsp.ReservationStyle.EnumH\x03\x88\x01\x01\x12\x1f\n\x12\x65nable_fixed_label\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x1e\n\x11\x66ixed_label_value\x18\x06 \x01(\rH\x05\x88\x01\x01\x1a\\\n\x10ReservationStyle\"H\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x13\n\x0fshared_explicit\x10\x01\x12\x10\n\x0c\x66ixed_filter\x10\x02\x12\x08\n\x04\x61uto\x10\x03\x42\x07\n\x05_nameB\x13\n\x11_refresh_intervalB\x15\n\x13_timeout_multiplierB\x14\n\x12_reservation_styleB\x15\n\x13_enable_fixed_labelB\x14\n\x12_fixed_label_value\"\xab\x04\n%RsvpLspIpv4InterfaceP2PIngressIpv4Lsp\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eremote_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x16\n\ttunnel_id\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x13\n\x06lsp_id\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1d\n\x10refresh_interval\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x1f\n\x12timeout_multiplier\x18\x06 \x01(\rH\x05\x88\x01\x01\x12\x1a\n\rbackup_lsp_id\x18\x07 \x01(\rH\x06\x88\x01\x01\x12!\n\x14lsp_switchover_delay\x18\x08 \x01(\rH\x07\x88\x01\x01\x12\x34\n\x11session_attribute\x18\t \x01(\x0b\x32\x19.otg.RsvpSessionAttribute\x12\x1d\n\x05tspec\x18\n \x01(\x0b\x32\x0e.otg.RsvpTspec\x12*\n\x0c\x66\x61st_reroute\x18\x0b \x01(\x0b\x32\x14.otg.RsvpFastReroute\x12\x19\n\x03\x65ro\x18\x0c \x01(\x0b\x32\x0c.otg.RsvpEroB\x07\n\x05_nameB\x11\n\x0f_remote_addressB\x0c\n\n_tunnel_idB\t\n\x07_lsp_idB\x13\n\x11_refresh_intervalB\x15\n\x13_timeout_multiplierB\x10\n\x0e_backup_lsp_idB\x17\n\x15_lsp_switchover_delay\"\xf0\x04\n\x14RsvpSessionAttribute\x12\'\n\x1a\x61uto_generate_session_name\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x0csession_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0esetup_priority\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x1d\n\x10holding_priority\x18\x04 \x01(\rH\x03\x88\x01\x01\x12%\n\x18local_protection_desired\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12$\n\x17label_recording_desired\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x1d\n\x10se_style_desired\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12)\n\x1c\x62\x61ndwidth_protection_desired\x18\x08 \x01(\x08H\x07\x88\x01\x01\x12$\n\x17node_protection_desired\x18\t \x01(\x08H\x08\x88\x01\x01\x12\x38\n\x13resource_affinities\x18\n \x01(\x0b\x32\x1b.otg.RsvpResourceAffinitiesB\x1d\n\x1b_auto_generate_session_nameB\x0f\n\r_session_nameB\x11\n\x0f_setup_priorityB\x13\n\x11_holding_priorityB\x1b\n\x19_local_protection_desiredB\x1a\n\x18_label_recording_desiredB\x13\n\x11_se_style_desiredB\x1f\n\x1d_bandwidth_protection_desiredB\x1a\n\x18_node_protection_desired\"\x96\x01\n\x16RsvpResourceAffinities\x12\x18\n\x0b\x65xclude_any\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0binclude_any\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0binclude_all\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x0e\n\x0c_exclude_anyB\x0e\n\x0c_include_anyB\x0e\n\x0c_include_all\"\x9f\x02\n\tRsvpTspec\x12\x1e\n\x11token_bucket_rate\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x1e\n\x11token_bucket_size\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12\x1b\n\x0epeak_data_rate\x18\x03 \x01(\x02H\x02\x88\x01\x01\x12!\n\x14minimum_policed_unit\x18\x04 \x01(\rH\x03\x88\x01\x01\x12!\n\x14maximum_policed_unit\x18\x05 \x01(\rH\x04\x88\x01\x01\x42\x14\n\x12_token_bucket_rateB\x14\n\x12_token_bucket_sizeB\x11\n\x0f_peak_data_rateB\x17\n\x15_minimum_policed_unitB\x17\n\x15_maximum_policed_unit\"\xc7\x03\n\x0fRsvpFastReroute\x12\x1b\n\x0esetup_priority\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1d\n\x10holding_priority\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x16\n\thop_limit\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x16\n\tbandwidth\x18\x04 \x01(\x02H\x03\x88\x01\x01\x12\x18\n\x0b\x65xclude_any\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0binclude_any\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0binclude_all\x18\x07 \x01(\tH\x06\x88\x01\x01\x12&\n\x19one_to_one_backup_desired\x18\x08 \x01(\x08H\x07\x88\x01\x01\x12$\n\x17\x66\x61\x63ility_backup_desired\x18\t \x01(\x08H\x08\x88\x01\x01\x42\x11\n\x0f_setup_priorityB\x13\n\x11_holding_priorityB\x0c\n\n_hop_limitB\x0c\n\n_bandwidthB\x0e\n\x0c_exclude_anyB\x0e\n\x0c_include_anyB\x0e\n\x0c_include_allB\x1c\n\x1a_one_to_one_backup_desiredB\x1a\n\x18_facility_backup_desired\"\xa8\x02\n\x07RsvpEro\x12\x45\n\x13prepend_neighbor_ip\x18\x01 \x01(\x0e\x32#.otg.RsvpEro.PrependNeighborIp.EnumH\x00\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12)\n\nsubobjects\x18\x03 \x03(\x0b\x32\x15.otg.RsvpEroSubobject\x1a\x65\n\x11PrependNeighborIp\"P\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0c\x64ont_prepend\x10\x01\x12\x11\n\rprepend_loose\x10\x02\x12\x12\n\x0eprepend_strict\x10\x03\x42\x16\n\x14_prepend_neighbor_ipB\x10\n\x0e_prefix_length\"\x8c\x03\n\x10RsvpEroSubobject\x12\x32\n\x04type\x18\x01 \x01(\x0e\x32\x1f.otg.RsvpEroSubobject.Type.EnumH\x00\x88\x01\x01\x12\x19\n\x0cipv4_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x16\n\tas_number\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x39\n\x08hop_type\x18\x05 \x01(\x0e\x32\".otg.RsvpEroSubobject.HopType.EnumH\x04\x88\x01\x01\x1a\x38\n\x04Type\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\r\n\tas_number\x10\x02\x1a\x39\n\x07HopType\".\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06strict\x10\x01\x12\t\n\x05loose\x10\x02\x42\x07\n\x05_typeB\x0f\n\r_ipv4_addressB\x10\n\x0e_prefix_lengthB\x0c\n\n_as_numberB\x0b\n\t_hop_type\"j\n\x10\x44\x65viceDhcpServer\x12*\n\x0fipv4_interfaces\x18\x02 \x03(\x0b\x32\x11.otg.DhcpServerV4\x12*\n\x0fipv6_interfaces\x18\x03 \x03(\x0b\x32\x11.otg.DhcpServerV6\"~\n\x0c\x44hcpServerV4\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tipv4_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12,\n\raddress_pools\x18\x03 \x03(\x0b\x32\x15.otg.DhcpServerV4PoolB\x07\n\x05_nameB\x0c\n\n_ipv4_name\"\x9a\x02\n\x10\x44hcpServerV4Pool\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nlease_time\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1a\n\rstart_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x11\n\x04step\x18\x06 \x01(\rH\x05\x88\x01\x01\x12,\n\x07options\x18\x07 \x01(\x0b\x32\x1b.otg.DhcpServerV4PoolOptionB\x07\n\x05_nameB\r\n\x0b_lease_timeB\x10\n\x0e_start_addressB\x10\n\x0e_prefix_lengthB\x08\n\x06_countB\x07\n\x05_step\"\xfc\x01\n\x16\x44hcpServerV4PoolOption\x12\x1b\n\x0erouter_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12primary_dns_server\x18\x02 \x01(\tH\x01\x88\x01\x01\x12!\n\x14secondary_dns_server\x18\x03 \x01(\tH\x02\x88\x01\x01\x12#\n\x16\x65\x63ho_relay_with_tlv_82\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\x11\n\x0f_router_addressB\x15\n\x13_primary_dns_serverB\x17\n\x15_secondary_dns_serverB\x19\n\x17_echo_relay_with_tlv_82\"\x99\x02\n\x0c\x44hcpServerV6\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tipv6_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x19\n\x0crapid_commit\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12(\n\x1breconfigure_via_relay_agent\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12&\n\x06leases\x18\x05 \x03(\x0b\x32\x16.otg.DhcpV6ServerLease\x12)\n\x07options\x18\x06 \x01(\x0b\x32\x18.otg.Dhcpv6ServerOptionsB\x07\n\x05_nameB\x0c\n\n_ipv6_nameB\x0f\n\r_rapid_commitB\x1e\n\x1c_reconfigure_via_relay_agent\"\xac\x01\n\x13\x44hcpv6ServerOptions\x12!\n\x03\x64ns\x18\x01 \x01(\x0b\x32\x14.otg.DhcpV6ServerDns\x12\x37\n\x0bvendor_info\x18\x02 \x01(\x0b\x32\".otg.Dhcpv6ServerOptionsVendorInfo\x12\x39\n\x0c\x62ootfile_url\x18\x03 \x01(\x0b\x32#.otg.Dhcpv6ServerOptionsBootfileUrl\"e\n\x11\x44hcpV6ServerLease\x12\x17\n\nlease_time\x18\x01 \x01(\rH\x00\x88\x01\x01\x12(\n\x07ia_type\x18\x05 \x01(\x0b\x32\x17.otg.Dhcpv6ServerIaTypeB\r\n\x0b_lease_time\"\xd6\x02\n\x12\x44hcpv6ServerIaType\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.Dhcpv6ServerIaType.Choice.EnumH\x00\x88\x01\x01\x12\'\n\x04iana\x18\x02 \x01(\x0b\x32\x19.otg.Dhcpv6ServerPoolInfo\x12\'\n\x04iata\x18\x03 \x01(\x0b\x32\x19.otg.Dhcpv6ServerPoolInfo\x12+\n\x04iapd\x18\x04 \x01(\x0b\x32\x1d.otg.Dhcpv6ServerIapdPoolInfo\x12/\n\x06ianapd\x18\x05 \x01(\x0b\x32\x1f.otg.Dhcpv6ServerIanapdPoolInfo\x1aK\n\x06\x43hoice\"A\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04iana\x10\x01\x12\x08\n\x04iata\x10\x02\x12\x08\n\x04iapd\x10\x03\x12\n\n\x06ianapd\x10\x04\x42\t\n\x07_choice\"\xa4\x01\n\x14\x44hcpv6ServerPoolInfo\x12\x1a\n\rstart_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nprefix_len\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x11\n\x04size\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x11\n\x04step\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x10\n\x0e_start_addressB\r\n\x0b_prefix_lenB\x07\n\x05_sizeB\x07\n\x05_step\"\xa6\x02\n\x18\x44hcpv6ServerIapdPoolInfo\x12!\n\x14start_prefix_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x15\x63onfigured_prefix_len\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x18\n\x0bprefix_size\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x18\n\x0bprefix_step\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\"\n\x15\x61\x64vertised_prefix_len\x18\x05 \x01(\rH\x04\x88\x01\x01\x42\x17\n\x15_start_prefix_addressB\x18\n\x16_configured_prefix_lenB\x0e\n\x0c_prefix_sizeB\x0e\n\x0c_prefix_stepB\x18\n\x16_advertised_prefix_len\"r\n\x1a\x44hcpv6ServerIanapdPoolInfo\x12\'\n\x04iana\x18\x01 \x01(\x0b\x32\x19.otg.Dhcpv6ServerPoolInfo\x12+\n\x04iapd\x18\x02 \x01(\x0b\x32\x1d.otg.Dhcpv6ServerIapdPoolInfo\"i\n\x0f\x44hcpV6ServerDns\x12\x14\n\x07primary\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x34\n\rsecondary_dns\x18\x02 \x03(\x0b\x32\x1d.otg.DhcpV6ServerSecondaryDnsB\n\n\x08_primary\"2\n\x18\x44hcpV6ServerSecondaryDns\x12\x0f\n\x02ip\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x05\n\x03_ip\"\xa8\x04\n\x12\x44\x65viceOspfv2Router\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\trouter_id\x18\x02 \x01(\x0b\x32\x13.otg.Ospfv2RouterId\x12 \n\x13lsa_retransmit_time\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x1d\n\x10lsa_refresh_time\x18\x04 \x01(\rH\x02\x88\x01\x01\x12%\n\x18inter_burst_lsu_interval\x18\x05 \x01(\rH\x03\x88\x01\x01\x12$\n\x17max_flood_lsu_per_burst\x18\x06 \x01(\rH\x04\x88\x01\x01\x12\x34\n\x10graceful_restart\x18\x07 \x01(\x0b\x32\x1a.otg.Ospfv2GracefulRestart\x12\x16\n\tstore_lsa\x18\x08 \x01(\x08H\x05\x88\x01\x01\x12(\n\x0c\x63\x61pabilities\x18\t \x01(\x0b\x32\x12.otg.Ospfv2Options\x12(\n\ninterfaces\x18\n \x03(\x0b\x32\x14.otg.Ospfv2Interface\x12*\n\tv4_routes\x18\x0b \x03(\x0b\x32\x17.otg.Ospfv2V4RouteRangeB\x07\n\x05_nameB\x16\n\x14_lsa_retransmit_timeB\x13\n\x11_lsa_refresh_timeB\x1b\n\x19_inter_burst_lsu_intervalB\x1a\n\x18_max_flood_lsu_per_burstB\x0c\n\n_store_lsa\"\xb2\x01\n\x0eOspfv2RouterId\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.Ospfv2RouterId.Choice.EnumH\x00\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\tH\x01\x88\x01\x01\x1a?\n\x06\x43hoice\"5\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0cinterface_ip\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x42\t\n\x07_choiceB\t\n\x07_custom\"\xdd\x02\n\rOspfv2Options\x12\x12\n\x05t_bit\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x12\n\x05\x65_bit\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x13\n\x06mc_bit\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x13\n\x06np_bit\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x13\n\x06\x65\x61_bit\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x13\n\x06\x64\x63_bit\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x12\n\x05o_bit\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12\x17\n\nunused_bit\x18\x08 \x01(\x08H\x07\x88\x01\x01\x12\x16\n\tlsa_b_bit\x18\t \x01(\x08H\x08\x88\x01\x01\x12\x16\n\tlsa_e_bit\x18\n \x01(\x08H\t\x88\x01\x01\x42\x08\n\x06_t_bitB\x08\n\x06_e_bitB\t\n\x07_mc_bitB\t\n\x07_np_bitB\t\n\x07_ea_bitB\t\n\x07_dc_bitB\x08\n\x06_o_bitB\r\n\x0b_unused_bitB\x0c\n\n_lsa_b_bitB\x0c\n\n_lsa_e_bit\"A\n\x15Ospfv2GracefulRestart\x12\x18\n\x0bhelper_mode\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x0e\n\x0c_helper_mode\"\x9f\x03\n\x0fOspfv2Interface\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tipv4_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12&\n\x04\x61rea\x18\x03 \x01(\x0b\x32\x18.otg.Ospfv2InterfaceArea\x12\x35\n\x0cnetwork_type\x18\x04 \x01(\x0b\x32\x1f.otg.Ospfv2InterfaceNetworkType\x12-\n\x13traffic_engineering\x18\x05 \x03(\x0b\x32\x10.otg.LinkStateTE\x12:\n\x0e\x61uthentication\x18\x06 \x01(\x0b\x32\".otg.Ospfv2InterfaceAuthentication\x12.\n\x08\x61\x64vanced\x18\x07 \x01(\x0b\x32\x1c.otg.Ospfv2InterfaceAdvanced\x12;\n\x0flink_protection\x18\x08 \x01(\x0b\x32\".otg.Ospfv2InterfaceLinkProtection\x12\x13\n\x0bsrlg_values\x18\t \x03(\rB\x07\n\x05_nameB\x0c\n\n_ipv4_name\"\xbe\x01\n\x13Ospfv2InterfaceArea\x12\x39\n\x06\x63hoice\x18\x01 \x01(\x0e\x32$.otg.Ospfv2InterfaceArea.Choice.EnumH\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0f\n\x02ip\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x31\n\x06\x43hoice\"\'\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02id\x10\x01\x12\x06\n\x02ip\x10\x02\x42\t\n\x07_choiceB\x05\n\x03_idB\x05\n\x03_ip\"\x83\x02\n\x1aOspfv2InterfaceNetworkType\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.Ospfv2InterfaceNetworkType.Choice.EnumH\x00\x88\x01\x01\x12\x39\n\x13point_to_multipoint\x18\x02 \x03(\x0b\x32\x1c.otg.Ospfv2InterfaceNeighbor\x1a]\n\x06\x43hoice\"S\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tbroadcast\x10\x01\x12\x12\n\x0epoint_to_point\x10\x02\x12\x17\n\x13point_to_multipoint\x10\x03\x42\t\n\x07_choice\"C\n\x17Ospfv2InterfaceNeighbor\x12\x18\n\x0bneighbor_ip\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_neighbor_ip\"\x89\x02\n\x17Ospfv2InterfaceAdvanced\x12\x1b\n\x0ehello_interval\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1a\n\rdead_interval\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1b\n\x0erouting_metric\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x15\n\x08priority\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\"\n\x15validate_received_mtu\x18\x05 \x01(\x08H\x04\x88\x01\x01\x42\x11\n\x0f_hello_intervalB\x10\n\x0e_dead_intervalB\x11\n\x0f_routing_metricB\x0b\n\t_priorityB\x18\n\x16_validate_received_mtu\"\x9a\x02\n\x16Ospfv2InterfaceOptions\x12\x12\n\x05t_bit\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x12\n\x05\x65_bit\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x13\n\x06mc_bit\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x13\n\x06np_bit\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x13\n\x06\x65\x61_bit\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x13\n\x06\x64\x63_bit\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x12\n\x05o_bit\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12\x17\n\nunused_bit\x18\x08 \x01(\x08H\x07\x88\x01\x01\x42\x08\n\x06_t_bitB\x08\n\x06_e_bitB\t\n\x07_mc_bitB\t\n\x07_np_bitB\t\n\x07_ea_bitB\t\n\x07_dc_bitB\x08\n\x06_o_bitB\r\n\x0b_unused_bit\"\x80\x02\n\x1dOspfv2InterfaceAuthentication\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.Ospfv2InterfaceAuthentication.Choice.EnumH\x00\x88\x01\x01\x12*\n\x04md5s\x18\x02 \x03(\x0b\x32\x1c.otg.Ospfv2AuthenticationMd5\x12\x17\n\nclear_text\x18\x04 \x01(\tH\x01\x88\x01\x01\x1a;\n\x06\x43hoice\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04md5s\x10\x01\x12\x0e\n\nclear_text\x10\x02\x42\t\n\x07_choiceB\r\n\x0b_clear_text\"S\n\x17Ospfv2AuthenticationMd5\x12\x13\n\x06key_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03key\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\t\n\x07_key_idB\x06\n\x04_key\"\xfb\x02\n\x1dOspfv2InterfaceLinkProtection\x12\x1a\n\rextra_traffic\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x18\n\x0bunprotected\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x13\n\x06shared\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x1d\n\x10\x64\x65\x64icated_1_to_1\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x1f\n\x12\x64\x65\x64icated_1_plus_1\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x15\n\x08\x65nhanced\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12\x18\n\x0breserved_40\x18\x07 \x01(\x08H\x06\x88\x01\x01\x12\x18\n\x0breserved_80\x18\x08 \x01(\x08H\x07\x88\x01\x01\x42\x10\n\x0e_extra_trafficB\x0e\n\x0c_unprotectedB\t\n\x07_sharedB\x13\n\x11_dedicated_1_to_1B\x15\n\x13_dedicated_1_plus_1B\x0b\n\t_enhancedB\x0e\n\x0c_reserved_40B\x0e\n\x0c_reserved_80\"\xaa\x01\n\x12Ospfv2V4RouteRange\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\taddresses\x18\x02 \x03(\x0b\x32\x13.otg.V4RouteAddress\x12\x13\n\x06metric\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x30\n\x0croute_origin\x18\x04 \x01(\x0b\x32\x1a.otg.Ospfv2V4RRRouteOriginB\x07\n\x05_nameB\t\n\x07_metric\"\xdd\x03\n\x15Ospfv2V4RRRouteOrigin\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.Ospfv2V4RRRouteOrigin.Choice.EnumH\x00\x88\x01\x01\x12,\n\nintra_area\x18\x02 \x01(\x0b\x32\x18.otg.Ospfv2V4RRIntraArea\x12,\n\ninter_area\x18\x03 \x01(\x0b\x32\x18.otg.Ospfv2V4RRInterArea\x12\x35\n\x0f\x65xternal_type_1\x18\x04 \x01(\x0b\x32\x1c.otg.Ospfv2V4RRExternalType1\x12\x35\n\x0f\x65xternal_type_2\x18\x05 \x01(\x0b\x32\x1c.otg.Ospfv2V4RRExternalType2\x12\x32\n\rnssa_external\x18\x06 \x01(\x0b\x32\x1b.otg.Ospfv2V4RRNssaExternal\x1a~\n\x06\x43hoice\"t\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\nintra_area\x10\x01\x12\x0e\n\ninter_area\x10\x02\x12\x13\n\x0f\x65xternal_type_1\x10\x03\x12\x13\n\x0f\x65xternal_type_2\x10\x04\x12\x11\n\rnssa_external\x10\x05\x42\t\n\x07_choice\"D\n\x13Ospfv2V4RRIntraArea\x12-\n\x05\x66lags\x18\x01 \x01(\x0b\x32\x1e.otg.Ospfv2V4RRExtdPrefixFlags\"D\n\x13Ospfv2V4RRInterArea\x12-\n\x05\x66lags\x18\x01 \x01(\x0b\x32\x1e.otg.Ospfv2V4RRExtdPrefixFlags\"H\n\x17Ospfv2V4RRExternalType1\x12-\n\x05\x66lags\x18\x01 \x01(\x0b\x32\x1e.otg.Ospfv2V4RRExtdPrefixFlags\"H\n\x17Ospfv2V4RRExternalType2\x12-\n\x05\x66lags\x18\x01 \x01(\x0b\x32\x1e.otg.Ospfv2V4RRExtdPrefixFlags\"q\n\x16Ospfv2V4RRNssaExternal\x12-\n\x05\x66lags\x18\x01 \x01(\x0b\x32\x1e.otg.Ospfv2V4RRExtdPrefixFlags\x12\x18\n\x0bpropagation\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\x0e\n\x0c_propagation\"[\n\x19Ospfv2V4RRExtdPrefixFlags\x12\x13\n\x06\x61_flag\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x13\n\x06n_flag\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\t\n\x07_a_flagB\t\n\x07_n_flag\"\x8b\x02\n\x04\x46low\x12\x1c\n\x05tx_rx\x18\x01 \x01(\x0b\x32\r.otg.FlowTxRx\x12\x1f\n\x06packet\x18\x02 \x03(\x0b\x32\x0f.otg.FlowHeader\x12&\n\regress_packet\x18\t \x03(\x0b\x32\x0f.otg.FlowHeader\x12\x1b\n\x04size\x18\x03 \x01(\x0b\x32\r.otg.FlowSize\x12\x1b\n\x04rate\x18\x04 \x01(\x0b\x32\r.otg.FlowRate\x12#\n\x08\x64uration\x18\x05 \x01(\x0b\x32\x11.otg.FlowDuration\x12!\n\x07metrics\x18\x06 \x01(\x0b\x32\x10.otg.FlowMetrics\x12\x11\n\x04name\x18\x07 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_name\"\xbc\x01\n\x08\x46lowTxRx\x12.\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x19.otg.FlowTxRx.Choice.EnumH\x00\x88\x01\x01\x12\x1b\n\x04port\x18\x02 \x01(\x0b\x32\r.otg.FlowPort\x12\x1f\n\x06\x64\x65vice\x18\x03 \x01(\x0b\x32\x0f.otg.FlowRouter\x1a\x37\n\x06\x43hoice\"-\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04port\x10\x01\x12\n\n\x06\x64\x65vice\x10\x02\x42\t\n\x07_choice\"`\n\x08\x46lowPort\x12\x14\n\x07tx_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07rx_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x08rx_names\x18\x03 \x03(\tB\n\n\x08_tx_nameB\n\n\x08_rx_name\"\xa2\x01\n\nFlowRouter\x12,\n\x04mode\x18\x01 \x01(\x0e\x32\x19.otg.FlowRouter.Mode.EnumH\x00\x88\x01\x01\x12\x10\n\x08tx_names\x18\x02 \x03(\t\x12\x10\n\x08rx_names\x18\x03 \x03(\t\x1a\x39\n\x04Mode\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04mesh\x10\x01\x12\x0e\n\none_to_one\x10\x02\x42\x07\n\x05_mode\"\xe9\x07\n\nFlowHeader\x12\x30\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1b.otg.FlowHeader.Choice.EnumH\x00\x88\x01\x01\x12\x1f\n\x06\x63ustom\x18\x02 \x01(\x0b\x32\x0f.otg.FlowCustom\x12#\n\x08\x65thernet\x18\x03 \x01(\x0b\x32\x11.otg.FlowEthernet\x12\x1b\n\x04vlan\x18\x04 \x01(\x0b\x32\r.otg.FlowVlan\x12\x1d\n\x05vxlan\x18\x05 \x01(\x0b\x32\x0e.otg.FlowVxlan\x12\x1b\n\x04ipv4\x18\x06 \x01(\x0b\x32\r.otg.FlowIpv4\x12\x1b\n\x04ipv6\x18\x07 \x01(\x0b\x32\r.otg.FlowIpv6\x12#\n\x08pfcpause\x18\x08 \x01(\x0b\x32\x11.otg.FlowPfcPause\x12-\n\rethernetpause\x18\t \x01(\x0b\x32\x16.otg.FlowEthernetPause\x12\x19\n\x03tcp\x18\n \x01(\x0b\x32\x0c.otg.FlowTcp\x12\x19\n\x03udp\x18\x0b \x01(\x0b\x32\x0c.otg.FlowUdp\x12\x19\n\x03gre\x18\x0c \x01(\x0b\x32\x0c.otg.FlowGre\x12\x1d\n\x05gtpv1\x18\r \x01(\x0b\x32\x0e.otg.FlowGtpv1\x12\x1d\n\x05gtpv2\x18\x0e \x01(\x0b\x32\x0e.otg.FlowGtpv2\x12\x19\n\x03\x61rp\x18\x0f \x01(\x0b\x32\x0c.otg.FlowArp\x12\x1b\n\x04icmp\x18\x10 \x01(\x0b\x32\r.otg.FlowIcmp\x12\x1f\n\x06icmpv6\x18\x11 \x01(\x0b\x32\x0f.otg.FlowIcmpv6\x12\x19\n\x03ppp\x18\x12 \x01(\x0b\x32\x0c.otg.FlowPpp\x12\x1f\n\x06igmpv1\x18\x13 \x01(\x0b\x32\x0f.otg.FlowIgmpv1\x12\x1b\n\x04mpls\x18\x14 \x01(\x0b\x32\r.otg.FlowMpls\x12!\n\x07snmpv2c\x18\x15 \x01(\x0b\x32\x10.otg.FlowSnmpv2c\x12\x1b\n\x04rsvp\x18\x16 \x01(\x0b\x32\r.otg.FlowRsvp\x1a\x8c\x02\n\x06\x43hoice\"\x81\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x63ustom\x10\x01\x12\x0c\n\x08\x65thernet\x10\x02\x12\x08\n\x04vlan\x10\x03\x12\t\n\x05vxlan\x10\x04\x12\x08\n\x04ipv4\x10\x05\x12\x08\n\x04ipv6\x10\x06\x12\x0c\n\x08pfcpause\x10\x07\x12\x11\n\rethernetpause\x10\x08\x12\x07\n\x03tcp\x10\t\x12\x07\n\x03udp\x10\n\x12\x07\n\x03gre\x10\x0b\x12\t\n\x05gtpv1\x10\x0c\x12\t\n\x05gtpv2\x10\r\x12\x07\n\x03\x61rp\x10\x0e\x12\x08\n\x04icmp\x10\x0f\x12\n\n\x06icmpv6\x10\x10\x12\x07\n\x03ppp\x10\x11\x12\n\n\x06igmpv1\x10\x12\x12\x08\n\x04mpls\x10\x13\x12\x0b\n\x07snmpv2c\x10\x14\x12\x08\n\x04rsvp\x10\x15\x42\t\n\x07_choice\"Y\n\nFlowCustom\x12\x12\n\x05\x62ytes\x18\x01 \x01(\tH\x00\x88\x01\x01\x12-\n\x0bmetric_tags\x18\x02 \x03(\x0b\x32\x18.otg.FlowCustomMetricTagB\x08\n\x06_bytes\"q\n\x13\x46lowCustomMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xce\x01\n\x0c\x46lowEthernet\x12(\n\x03\x64st\x18\x01 \x01(\x0b\x32\x1b.otg.PatternFlowEthernetDst\x12(\n\x03src\x18\x02 \x01(\x0b\x32\x1b.otg.PatternFlowEthernetSrc\x12\x35\n\nether_type\x18\x03 \x01(\x0b\x32!.otg.PatternFlowEthernetEtherType\x12\x33\n\tpfc_queue\x18\x04 \x01(\x0b\x32 .otg.PatternFlowEthernetPfcQueue\"\xac\x01\n\x08\x46lowVlan\x12.\n\x08priority\x18\x01 \x01(\x0b\x32\x1c.otg.PatternFlowVlanPriority\x12$\n\x03\x63\x66i\x18\x02 \x01(\x0b\x32\x17.otg.PatternFlowVlanCfi\x12\"\n\x02id\x18\x03 \x01(\x0b\x32\x16.otg.PatternFlowVlanId\x12&\n\x04tpid\x18\x04 \x01(\x0b\x32\x18.otg.PatternFlowVlanTpid\"\xc3\x01\n\tFlowVxlan\x12)\n\x05\x66lags\x18\x01 \x01(\x0b\x32\x1a.otg.PatternFlowVxlanFlags\x12\x31\n\treserved0\x18\x02 \x01(\x0b\x32\x1e.otg.PatternFlowVxlanReserved0\x12%\n\x03vni\x18\x03 \x01(\x0b\x32\x18.otg.PatternFlowVxlanVni\x12\x31\n\treserved1\x18\x04 \x01(\x0b\x32\x1e.otg.PatternFlowVxlanReserved1\"\x84\x06\n\x08\x46lowIpv4\x12,\n\x07version\x18\x01 \x01(\x0b\x32\x1b.otg.PatternFlowIpv4Version\x12\x37\n\rheader_length\x18\x02 \x01(\x0b\x32 .otg.PatternFlowIpv4HeaderLength\x12\'\n\x08priority\x18\x03 \x01(\x0b\x32\x15.otg.FlowIpv4Priority\x12\x35\n\x0ctotal_length\x18\x04 \x01(\x0b\x32\x1f.otg.PatternFlowIpv4TotalLength\x12:\n\x0eidentification\x18\x05 \x01(\x0b\x32\".otg.PatternFlowIpv4Identification\x12.\n\x08reserved\x18\x06 \x01(\x0b\x32\x1c.otg.PatternFlowIpv4Reserved\x12\x37\n\rdont_fragment\x18\x07 \x01(\x0b\x32 .otg.PatternFlowIpv4DontFragment\x12\x39\n\x0emore_fragments\x18\x08 \x01(\x0b\x32!.otg.PatternFlowIpv4MoreFragments\x12;\n\x0f\x66ragment_offset\x18\t \x01(\x0b\x32\".otg.PatternFlowIpv4FragmentOffset\x12\x34\n\x0ctime_to_live\x18\n \x01(\x0b\x32\x1e.otg.PatternFlowIpv4TimeToLive\x12.\n\x08protocol\x18\x0b \x01(\x0b\x32\x1c.otg.PatternFlowIpv4Protocol\x12;\n\x0fheader_checksum\x18\x0c \x01(\x0b\x32\".otg.PatternFlowIpv4HeaderChecksum\x12$\n\x03src\x18\r \x01(\x0b\x32\x17.otg.PatternFlowIpv4Src\x12$\n\x03\x64st\x18\x0e \x01(\x0b\x32\x17.otg.PatternFlowIpv4Dst\x12%\n\x07options\x18\x0f \x03(\x0b\x32\x14.otg.FlowIpv4Options\"\xc0\x01\n\x0f\x46lowIpv4Options\x12\x35\n\x06\x63hoice\x18\x01 \x01(\x0e\x32 .otg.FlowIpv4Options.Choice.EnumH\x00\x88\x01\x01\x12*\n\x06\x63ustom\x18\x02 \x01(\x0b\x32\x1a.otg.FlowIpv4OptionsCustom\x1a?\n\x06\x43hoice\"5\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0crouter_alert\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x42\t\n\x07_choice\"\x95\x01\n\x15\x46lowIpv4OptionsCustom\x12,\n\x04type\x18\x01 \x01(\x0b\x32\x1e.otg.FlowIpv4OptionsCustomType\x12\x30\n\x06length\x18\x02 \x01(\x0b\x32 .otg.FlowIpv4OptionsCustomLength\x12\x12\n\x05value\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"\xf3\x01\n\x19\x46lowIpv4OptionsCustomType\x12\x44\n\x0b\x63opied_flag\x18\x01 \x01(\x0b\x32/.otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag\x12\x46\n\x0coption_class\x18\x02 \x01(\x0b\x32\x30.otg.PatternFlowIpv4OptionsCustomTypeOptionClass\x12H\n\roption_number\x18\x03 \x01(\x0b\x32\x31.otg.PatternFlowIpv4OptionsCustomTypeOptionNumber\"\xdd\x01\n\x1b\x46lowIpv4OptionsCustomLength\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.FlowIpv4OptionsCustomLength.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\x82\x02\n\x10\x46lowIpv4Priority\x12\x36\n\x06\x63hoice\x18\x01 \x01(\x0e\x32!.otg.FlowIpv4Priority.Choice.EnumH\x00\x88\x01\x01\x12,\n\x03raw\x18\x02 \x01(\x0b\x32\x1f.otg.PatternFlowIpv4PriorityRaw\x12\x1d\n\x03tos\x18\x03 \x01(\x0b\x32\x10.otg.FlowIpv4Tos\x12\x1f\n\x04\x64scp\x18\x04 \x01(\x0b\x32\x11.otg.FlowIpv4Dscp\x1a=\n\x06\x43hoice\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03raw\x10\x01\x12\x07\n\x03tos\x10\x02\x12\x08\n\x04\x64scp\x10\x03\x42\t\n\x07_choice\"b\n\x0c\x46lowIpv4Dscp\x12(\n\x03phb\x18\x01 \x01(\x0b\x32\x1b.otg.PatternFlowIpv4DscpPhb\x12(\n\x03\x65\x63n\x18\x02 \x01(\x0b\x32\x1b.otg.PatternFlowIpv4DscpEcn\"\xc3\x02\n\x0b\x46lowIpv4Tos\x12\x35\n\nprecedence\x18\x01 \x01(\x0b\x32!.otg.PatternFlowIpv4TosPrecedence\x12+\n\x05\x64\x65lay\x18\x02 \x01(\x0b\x32\x1c.otg.PatternFlowIpv4TosDelay\x12\x35\n\nthroughput\x18\x03 \x01(\x0b\x32!.otg.PatternFlowIpv4TosThroughput\x12\x37\n\x0breliability\x18\x04 \x01(\x0b\x32\".otg.PatternFlowIpv4TosReliability\x12\x31\n\x08monetary\x18\x05 \x01(\x0b\x32\x1f.otg.PatternFlowIpv4TosMonetary\x12-\n\x06unused\x18\x06 \x01(\x0b\x32\x1d.otg.PatternFlowIpv4TosUnused\"z\n\x0c\x46lowIpv4Auto\x12\x32\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1d.otg.FlowIpv4Auto.Choice.EnumH\x00\x88\x01\x01\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x64hcp\x10\x01\x42\t\n\x07_choice\"\x91\x03\n\x08\x46lowIpv6\x12,\n\x07version\x18\x01 \x01(\x0b\x32\x1b.otg.PatternFlowIpv6Version\x12\x37\n\rtraffic_class\x18\x02 \x01(\x0b\x32 .otg.PatternFlowIpv6TrafficClass\x12\x31\n\nflow_label\x18\x03 \x01(\x0b\x32\x1d.otg.PatternFlowIpv6FlowLabel\x12\x39\n\x0epayload_length\x18\x04 \x01(\x0b\x32!.otg.PatternFlowIpv6PayloadLength\x12\x33\n\x0bnext_header\x18\x05 \x01(\x0b\x32\x1e.otg.PatternFlowIpv6NextHeader\x12/\n\thop_limit\x18\x06 \x01(\x0b\x32\x1c.otg.PatternFlowIpv6HopLimit\x12$\n\x03src\x18\x07 \x01(\x0b\x32\x17.otg.PatternFlowIpv6Src\x12$\n\x03\x64st\x18\x08 \x01(\x0b\x32\x17.otg.PatternFlowIpv6Dst\"z\n\x0c\x46lowIpv6Auto\x12\x32\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1d.otg.FlowIpv6Auto.Choice.EnumH\x00\x88\x01\x01\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x64hcp\x10\x01\x42\t\n\x07_choice\"\x81\x06\n\x0c\x46lowPfcPause\x12(\n\x03\x64st\x18\x01 \x01(\x0b\x32\x1b.otg.PatternFlowPfcPauseDst\x12(\n\x03src\x18\x02 \x01(\x0b\x32\x1b.otg.PatternFlowPfcPauseSrc\x12\x35\n\nether_type\x18\x03 \x01(\x0b\x32!.otg.PatternFlowPfcPauseEtherType\x12>\n\x0f\x63ontrol_op_code\x18\x04 \x01(\x0b\x32%.otg.PatternFlowPfcPauseControlOpCode\x12\x46\n\x13\x63lass_enable_vector\x18\x05 \x01(\x0b\x32).otg.PatternFlowPfcPauseClassEnableVector\x12:\n\rpause_class_0\x18\x06 \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass0\x12:\n\rpause_class_1\x18\x07 \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass1\x12:\n\rpause_class_2\x18\x08 \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass2\x12:\n\rpause_class_3\x18\t \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass3\x12:\n\rpause_class_4\x18\n \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass4\x12:\n\rpause_class_5\x18\x0b \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass5\x12:\n\rpause_class_6\x18\x0c \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass6\x12:\n\rpause_class_7\x18\r \x01(\x0b\x32#.otg.PatternFlowPfcPausePauseClass7\"\xa3\x02\n\x11\x46lowEthernetPause\x12-\n\x03\x64st\x18\x01 \x01(\x0b\x32 .otg.PatternFlowEthernetPauseDst\x12-\n\x03src\x18\x02 \x01(\x0b\x32 .otg.PatternFlowEthernetPauseSrc\x12:\n\nether_type\x18\x03 \x01(\x0b\x32&.otg.PatternFlowEthernetPauseEtherType\x12\x43\n\x0f\x63ontrol_op_code\x18\x04 \x01(\x0b\x32*.otg.PatternFlowEthernetPauseControlOpCode\x12/\n\x04time\x18\x05 \x01(\x0b\x32!.otg.PatternFlowEthernetPauseTime\"\xd7\x05\n\x07\x46lowTcp\x12,\n\x08src_port\x18\x01 \x01(\x0b\x32\x1a.otg.PatternFlowTcpSrcPort\x12,\n\x08\x64st_port\x18\x02 \x01(\x0b\x32\x1a.otg.PatternFlowTcpDstPort\x12*\n\x07seq_num\x18\x03 \x01(\x0b\x32\x19.otg.PatternFlowTcpSeqNum\x12*\n\x07\x61\x63k_num\x18\x04 \x01(\x0b\x32\x19.otg.PatternFlowTcpAckNum\x12\x32\n\x0b\x64\x61ta_offset\x18\x05 \x01(\x0b\x32\x1d.otg.PatternFlowTcpDataOffset\x12(\n\x06\x65\x63n_ns\x18\x06 \x01(\x0b\x32\x18.otg.PatternFlowTcpEcnNs\x12*\n\x07\x65\x63n_cwr\x18\x07 \x01(\x0b\x32\x19.otg.PatternFlowTcpEcnCwr\x12,\n\x08\x65\x63n_echo\x18\x08 \x01(\x0b\x32\x1a.otg.PatternFlowTcpEcnEcho\x12*\n\x07\x63tl_urg\x18\t \x01(\x0b\x32\x19.otg.PatternFlowTcpCtlUrg\x12*\n\x07\x63tl_ack\x18\n \x01(\x0b\x32\x19.otg.PatternFlowTcpCtlAck\x12*\n\x07\x63tl_psh\x18\x0b \x01(\x0b\x32\x19.otg.PatternFlowTcpCtlPsh\x12*\n\x07\x63tl_rst\x18\x0c \x01(\x0b\x32\x19.otg.PatternFlowTcpCtlRst\x12*\n\x07\x63tl_syn\x18\r \x01(\x0b\x32\x19.otg.PatternFlowTcpCtlSyn\x12*\n\x07\x63tl_fin\x18\x0e \x01(\x0b\x32\x19.otg.PatternFlowTcpCtlFin\x12)\n\x06window\x18\x0f \x01(\x0b\x32\x19.otg.PatternFlowTcpWindow\x12-\n\x08\x63hecksum\x18\x10 \x01(\x0b\x32\x1b.otg.PatternFlowTcpChecksum\"\xbf\x01\n\x07\x46lowUdp\x12,\n\x08src_port\x18\x01 \x01(\x0b\x32\x1a.otg.PatternFlowUdpSrcPort\x12,\n\x08\x64st_port\x18\x02 \x01(\x0b\x32\x1a.otg.PatternFlowUdpDstPort\x12)\n\x06length\x18\x03 \x01(\x0b\x32\x19.otg.PatternFlowUdpLength\x12-\n\x08\x63hecksum\x18\x04 \x01(\x0b\x32\x1b.otg.PatternFlowUdpChecksum\"\xb4\x02\n\x07\x46lowGre\x12<\n\x10\x63hecksum_present\x18\x01 \x01(\x0b\x32\".otg.PatternFlowGreChecksumPresent\x12/\n\treserved0\x18\x02 \x01(\x0b\x32\x1c.otg.PatternFlowGreReserved0\x12+\n\x07version\x18\x03 \x01(\x0b\x32\x1a.otg.PatternFlowGreVersion\x12-\n\x08protocol\x18\x04 \x01(\x0b\x32\x1b.otg.PatternFlowGreProtocol\x12-\n\x08\x63hecksum\x18\x05 \x01(\x0b\x32\x1b.otg.PatternFlowGreChecksum\x12/\n\treserved1\x18\x06 \x01(\x0b\x32\x1c.otg.PatternFlowGreReserved1\"\xbf\x05\n\tFlowGtpv1\x12-\n\x07version\x18\x01 \x01(\x0b\x32\x1c.otg.PatternFlowGtpv1Version\x12\x38\n\rprotocol_type\x18\x02 \x01(\x0b\x32!.otg.PatternFlowGtpv1ProtocolType\x12/\n\x08reserved\x18\x03 \x01(\x0b\x32\x1d.otg.PatternFlowGtpv1Reserved\x12*\n\x06\x65_flag\x18\x04 \x01(\x0b\x32\x1a.otg.PatternFlowGtpv1EFlag\x12*\n\x06s_flag\x18\x05 \x01(\x0b\x32\x1a.otg.PatternFlowGtpv1SFlag\x12,\n\x07pn_flag\x18\x06 \x01(\x0b\x32\x1b.otg.PatternFlowGtpv1PnFlag\x12\x36\n\x0cmessage_type\x18\x07 \x01(\x0b\x32 .otg.PatternFlowGtpv1MessageType\x12:\n\x0emessage_length\x18\x08 \x01(\x0b\x32\".otg.PatternFlowGtpv1MessageLength\x12\'\n\x04teid\x18\t \x01(\x0b\x32\x19.otg.PatternFlowGtpv1Teid\x12:\n\x0esquence_number\x18\n \x01(\x0b\x32\".otg.PatternFlowGtpv1SquenceNumber\x12\x35\n\x0cn_pdu_number\x18\x0b \x01(\x0b\x32\x1f.otg.PatternFlowGtpv1NPduNumber\x12P\n\x1anext_extension_header_type\x18\x0c \x01(\x0b\x32,.otg.PatternFlowGtpv1NextExtensionHeaderType\x12\x30\n\x11\x65xtension_headers\x18\r \x03(\x0b\x32\x15.otg.FlowGtpExtension\"\xe1\x01\n\x10\x46lowGtpExtension\x12\x45\n\x10\x65xtension_length\x18\x01 \x01(\x0b\x32+.otg.PatternFlowGtpExtensionExtensionLength\x12\x36\n\x08\x63ontents\x18\x02 \x01(\x0b\x32$.otg.PatternFlowGtpExtensionContents\x12N\n\x15next_extension_header\x18\x03 \x01(\x0b\x32/.otg.PatternFlowGtpExtensionNextExtensionHeader\"\xe3\x03\n\tFlowGtpv2\x12-\n\x07version\x18\x01 \x01(\x0b\x32\x1c.otg.PatternFlowGtpv2Version\x12@\n\x11piggybacking_flag\x18\x02 \x01(\x0b\x32%.otg.PatternFlowGtpv2PiggybackingFlag\x12\x30\n\tteid_flag\x18\x03 \x01(\x0b\x32\x1d.otg.PatternFlowGtpv2TeidFlag\x12+\n\x06spare1\x18\x04 \x01(\x0b\x32\x1b.otg.PatternFlowGtpv2Spare1\x12\x36\n\x0cmessage_type\x18\x05 \x01(\x0b\x32 .otg.PatternFlowGtpv2MessageType\x12:\n\x0emessage_length\x18\x06 \x01(\x0b\x32\".otg.PatternFlowGtpv2MessageLength\x12\'\n\x04teid\x18\x07 \x01(\x0b\x32\x19.otg.PatternFlowGtpv2Teid\x12<\n\x0fsequence_number\x18\x08 \x01(\x0b\x32#.otg.PatternFlowGtpv2SequenceNumber\x12+\n\x06spare2\x18\t \x01(\x0b\x32\x1b.otg.PatternFlowGtpv2Spare2\"\xb6\x04\n\x07\x46lowArp\x12\x36\n\rhardware_type\x18\x01 \x01(\x0b\x32\x1f.otg.PatternFlowArpHardwareType\x12\x36\n\rprotocol_type\x18\x02 \x01(\x0b\x32\x1f.otg.PatternFlowArpProtocolType\x12:\n\x0fhardware_length\x18\x03 \x01(\x0b\x32!.otg.PatternFlowArpHardwareLength\x12:\n\x0fprotocol_length\x18\x04 \x01(\x0b\x32!.otg.PatternFlowArpProtocolLength\x12/\n\toperation\x18\x05 \x01(\x0b\x32\x1c.otg.PatternFlowArpOperation\x12\x43\n\x14sender_hardware_addr\x18\x06 \x01(\x0b\x32%.otg.PatternFlowArpSenderHardwareAddr\x12\x43\n\x14sender_protocol_addr\x18\x07 \x01(\x0b\x32%.otg.PatternFlowArpSenderProtocolAddr\x12\x43\n\x14target_hardware_addr\x18\x08 \x01(\x0b\x32%.otg.PatternFlowArpTargetHardwareAddr\x12\x43\n\x14target_protocol_addr\x18\t \x01(\x0b\x32%.otg.PatternFlowArpTargetProtocolAddr\"\x93\x01\n\x08\x46lowIcmp\x12.\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x19.otg.FlowIcmp.Choice.EnumH\x00\x88\x01\x01\x12\x1f\n\x04\x65\x63ho\x18\x02 \x01(\x0b\x32\x11.otg.FlowIcmpEcho\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x65\x63ho\x10\x01\x42\t\n\x07_choice\"\x93\x02\n\x0c\x46lowIcmpEcho\x12*\n\x04type\x18\x01 \x01(\x0b\x32\x1c.otg.PatternFlowIcmpEchoType\x12*\n\x04\x63ode\x18\x02 \x01(\x0b\x32\x1c.otg.PatternFlowIcmpEchoCode\x12\x32\n\x08\x63hecksum\x18\x03 \x01(\x0b\x32 .otg.PatternFlowIcmpEchoChecksum\x12\x36\n\nidentifier\x18\x04 \x01(\x0b\x32\".otg.PatternFlowIcmpEchoIdentifier\x12?\n\x0fsequence_number\x18\x05 \x01(\x0b\x32&.otg.PatternFlowIcmpEchoSequenceNumber\"\x99\x01\n\nFlowIcmpv6\x12\x30\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1b.otg.FlowIcmpv6.Choice.EnumH\x00\x88\x01\x01\x12!\n\x04\x65\x63ho\x18\x02 \x01(\x0b\x32\x13.otg.FlowIcmpv6Echo\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x65\x63ho\x10\x01\x42\t\n\x07_choice\"\x9f\x02\n\x0e\x46lowIcmpv6Echo\x12,\n\x04type\x18\x01 \x01(\x0b\x32\x1e.otg.PatternFlowIcmpv6EchoType\x12,\n\x04\x63ode\x18\x02 \x01(\x0b\x32\x1e.otg.PatternFlowIcmpv6EchoCode\x12\x38\n\nidentifier\x18\x03 \x01(\x0b\x32$.otg.PatternFlowIcmpv6EchoIdentifier\x12\x41\n\x0fsequence_number\x18\x04 \x01(\x0b\x32(.otg.PatternFlowIcmpv6EchoSequenceNumber\x12\x34\n\x08\x63hecksum\x18\x05 \x01(\x0b\x32\".otg.PatternFlowIcmpv6EchoChecksum\"\x9b\x01\n\x07\x46lowPpp\x12+\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x1a.otg.PatternFlowPppAddress\x12+\n\x07\x63ontrol\x18\x02 \x01(\x0b\x32\x1a.otg.PatternFlowPppControl\x12\x36\n\rprotocol_type\x18\x03 \x01(\x0b\x32\x1f.otg.PatternFlowPppProtocolType\"\x81\x02\n\nFlowIgmpv1\x12.\n\x07version\x18\x01 \x01(\x0b\x32\x1d.otg.PatternFlowIgmpv1Version\x12(\n\x04type\x18\x02 \x01(\x0b\x32\x1a.otg.PatternFlowIgmpv1Type\x12,\n\x06unused\x18\x03 \x01(\x0b\x32\x1c.otg.PatternFlowIgmpv1Unused\x12\x30\n\x08\x63hecksum\x18\x04 \x01(\x0b\x32\x1e.otg.PatternFlowIgmpv1Checksum\x12\x39\n\rgroup_address\x18\x05 \x01(\x0b\x32\".otg.PatternFlowIgmpv1GroupAddress\"\xdf\x01\n\x08\x46lowMpls\x12(\n\x05label\x18\x01 \x01(\x0b\x32\x19.otg.PatternFlowMplsLabel\x12\x37\n\rtraffic_class\x18\x02 \x01(\x0b\x32 .otg.PatternFlowMplsTrafficClass\x12:\n\x0f\x62ottom_of_stack\x18\x03 \x01(\x0b\x32!.otg.PatternFlowMplsBottomOfStack\x12\x34\n\x0ctime_to_live\x18\x04 \x01(\x0b\x32\x1e.otg.PatternFlowMplsTimeToLive\"\x88\x01\n\x0b\x46lowSnmpv2c\x12/\n\x07version\x18\x01 \x01(\x0b\x32\x1e.otg.PatternFlowSnmpv2cVersion\x12\x16\n\tcommunity\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\"\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x14.otg.FlowSnmpv2cDataB\x0c\n\n_community\"\xde\x04\n\x0f\x46lowSnmpv2cData\x12\x35\n\x06\x63hoice\x18\x01 \x01(\x0e\x32 .otg.FlowSnmpv2cData.Choice.EnumH\x00\x88\x01\x01\x12(\n\x0bget_request\x18\x02 \x01(\x0b\x32\x13.otg.FlowSnmpv2cPDU\x12-\n\x10get_next_request\x18\x03 \x01(\x0b\x32\x13.otg.FlowSnmpv2cPDU\x12%\n\x08response\x18\x04 \x01(\x0b\x32\x13.otg.FlowSnmpv2cPDU\x12(\n\x0bset_request\x18\x05 \x01(\x0b\x32\x13.otg.FlowSnmpv2cPDU\x12\x31\n\x10get_bulk_request\x18\x06 \x01(\x0b\x32\x17.otg.FlowSnmpv2cBulkPDU\x12+\n\x0einform_request\x18\x07 \x01(\x0b\x32\x13.otg.FlowSnmpv2cPDU\x12(\n\x0bsnmpv2_trap\x18\x08 \x01(\x0b\x32\x13.otg.FlowSnmpv2cPDU\x12#\n\x06report\x18\t \x01(\x0b\x32\x13.otg.FlowSnmpv2cPDU\x1a\xaf\x01\n\x06\x43hoice\"\xa4\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0f\n\x0bget_request\x10\x01\x12\x14\n\x10get_next_request\x10\x02\x12\x0c\n\x08response\x10\x03\x12\x0f\n\x0bset_request\x10\x04\x12\x14\n\x10get_bulk_request\x10\x05\x12\x12\n\x0einform_request\x10\x06\x12\x0f\n\x0bsnmpv2_trap\x10\x07\x12\n\n\x06report\x10\x08\x42\t\n\x07_choice\"\x93\x05\n\x0e\x46lowSnmpv2cPDU\x12\x37\n\nrequest_id\x18\x01 \x01(\x0b\x32#.otg.PatternFlowSnmpv2cPDURequestId\x12?\n\x0c\x65rror_status\x18\x02 \x01(\x0e\x32$.otg.FlowSnmpv2cPDU.ErrorStatus.EnumH\x00\x88\x01\x01\x12\x39\n\x0b\x65rror_index\x18\x03 \x01(\x0b\x32$.otg.PatternFlowSnmpv2cPDUErrorIndex\x12:\n\x11variable_bindings\x18\x04 \x03(\x0b\x32\x1f.otg.FlowSnmpv2cVariableBinding\x1a\xfe\x02\n\x0b\x45rrorStatus\"\xee\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08no_error\x10\x01\x12\x0b\n\x07too_big\x10\x02\x12\x10\n\x0cno_such_name\x10\x03\x12\r\n\tbad_value\x10\x04\x12\r\n\tread_only\x10\x05\x12\x0b\n\x07gen_err\x10\x06\x12\r\n\tno_access\x10\x07\x12\x0e\n\nwrong_type\x10\x08\x12\x10\n\x0cwrong_length\x10\t\x12\x12\n\x0ewrong_encoding\x10\n\x12\x0f\n\x0bwrong_value\x10\x0b\x12\x0f\n\x0bno_creation\x10\x0c\x12\x16\n\x12inconsistent_value\x10\r\x12\x18\n\x14resource_unavailable\x10\x0e\x12\x11\n\rcommit_failed\x10\x0f\x12\x0f\n\x0bundo_failed\x10\x10\x12\x17\n\x13\x61uthorization_error\x10\x11\x12\x10\n\x0cnot_writable\x10\x12\x12\x15\n\x11inconsistent_name\x10\x13\x42\x0f\n\r_error_status\"\x97\x02\n\x12\x46lowSnmpv2cBulkPDU\x12;\n\nrequest_id\x18\x01 \x01(\x0b\x32\'.otg.PatternFlowSnmpv2cBulkPDURequestId\x12\x41\n\rnon_repeaters\x18\x02 \x01(\x0b\x32*.otg.PatternFlowSnmpv2cBulkPDUNonRepeaters\x12\x45\n\x0fmax_repetitions\x18\x03 \x01(\x0b\x32,.otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions\x12:\n\x11variable_bindings\x18\x04 \x03(\x0b\x32\x1f.otg.FlowSnmpv2cVariableBinding\"\x87\x01\n\x1a\x46lowSnmpv2cVariableBinding\x12\x1e\n\x11object_identifier\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.otg.FlowSnmpv2cVariableBindingValueB\x14\n\x12_object_identifier\"\xa5\x08\n\x1f\x46lowSnmpv2cVariableBindingValue\x12\x45\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x30.otg.FlowSnmpv2cVariableBindingValue.Choice.EnumH\x00\x88\x01\x01\x12N\n\rinteger_value\x18\x02 \x01(\x0b\x32\x37.otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue\x12@\n\x0cstring_value\x18\x03 \x01(\x0b\x32*.otg.FlowSnmpv2cVariableBindingStringValue\x12$\n\x17object_identifier_value\x18\x04 \x01(\tH\x01\x88\x01\x01\x12S\n\x10ip_address_value\x18\x05 \x01(\x0b\x32\x39.otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue\x12N\n\rcounter_value\x18\x06 \x01(\x0b\x32\x37.otg.PatternFlowSnmpv2cVariableBindingValueCounterValue\x12R\n\x0ftimeticks_value\x18\x07 \x01(\x0b\x32\x39.otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue\x12\x1c\n\x0f\x61rbitrary_value\x18\x08 \x01(\tH\x02\x88\x01\x01\x12U\n\x11\x62ig_counter_value\x18\t \x01(\x0b\x32:.otg.PatternFlowSnmpv2cVariableBindingValueBigCounterValue\x12_\n\x16unsigned_integer_value\x18\n \x01(\x0b\x32?.otg.PatternFlowSnmpv2cVariableBindingValueUnsignedIntegerValue\x1a\xf8\x01\n\x06\x43hoice\"\xed\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08no_value\x10\x01\x12\x11\n\rinteger_value\x10\x02\x12\x10\n\x0cstring_value\x10\x03\x12\x1b\n\x17object_identifier_value\x10\x04\x12\x14\n\x10ip_address_value\x10\x05\x12\x11\n\rcounter_value\x10\x06\x12\x13\n\x0ftimeticks_value\x10\x07\x12\x13\n\x0f\x61rbitrary_value\x10\x08\x12\x15\n\x11\x62ig_counter_value\x10\t\x12\x1a\n\x16unsigned_integer_value\x10\nB\t\n\x07_choiceB\x1a\n\x18_object_identifier_valueB\x12\n\x10_arbitrary_value\"\xee\x01\n%FlowSnmpv2cVariableBindingStringValue\x12K\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x36.otg.FlowSnmpv2cVariableBindingStringValue.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05\x61scii\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x03raw\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x35\n\x06\x43hoice\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x61scii\x10\x01\x12\x07\n\x03raw\x10\x02\x42\t\n\x07_choiceB\x08\n\x06_asciiB\x06\n\x04_raw\"\xb9\x03\n\x08\x46lowRsvp\x12\x14\n\x07version\x18\x01 \x01(\rH\x00\x88\x01\x01\x12*\n\x04\x66lag\x18\x02 \x01(\x0e\x32\x17.otg.FlowRsvp.Flag.EnumH\x01\x88\x01\x01\x12\x37\n\rrsvp_checksum\x18\x03 \x01(\x0b\x32 .otg.PatternFlowRsvpRsvpChecksum\x12\x34\n\x0ctime_to_live\x18\x04 \x01(\x0b\x32\x1e.otg.PatternFlowRsvpTimeToLive\x12.\n\x08reserved\x18\x05 \x01(\x0b\x32\x1c.otg.PatternFlowRsvpReserved\x12(\n\x0brsvp_length\x18\x06 \x01(\x0b\x32\x13.otg.FlowRSVPLength\x12*\n\x0cmessage_type\x18\x07 \x01(\x0b\x32\x14.otg.FlowRSVPMessage\x1a\x61\n\x04\x46lag\"Y\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12!\n\x1dnot_refresh_reduction_capable\x10\x01\x12\x1d\n\x19refresh_reduction_capable\x10\x02\x42\n\n\x08_versionB\x07\n\x05_flag\"\xc3\x01\n\x0e\x46lowRSVPLength\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.FlowRSVPLength.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xa8\x01\n\x0f\x46lowRSVPMessage\x12\x35\n\x06\x63hoice\x18\x01 \x01(\x0e\x32 .otg.FlowRSVPMessage.Choice.EnumH\x00\x88\x01\x01\x12&\n\x04path\x18\x02 \x01(\x0b\x32\x18.otg.FlowRSVPPathMessage\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04path\x10\x01\x42\t\n\x07_choice\"@\n\x13\x46lowRSVPPathMessage\x12)\n\x07objects\x18\x01 \x03(\x0b\x32\x18.otg.FlowRSVPPathObjects\"G\n\x13\x46lowRSVPPathObjects\x12\x30\n\tclass_num\x18\x01 \x01(\x0b\x32\x1d.otg.FlowRSVPPathObjectsClass\"\xcf\x01\n\x14\x46lowRSVPObjectLength\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.FlowRSVPObjectLength.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xac\x07\n\x18\x46lowRSVPPathObjectsClass\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.FlowRSVPPathObjectsClass.Choice.EnumH\x00\x88\x01\x01\x12\x35\n\x07session\x18\x02 \x01(\x0b\x32$.otg.FlowRSVPPathObjectsClassSession\x12\x36\n\x08rsvp_hop\x18\x03 \x01(\x0b\x32$.otg.FlowRSVPPathObjectsClassRsvpHop\x12<\n\x0btime_values\x18\x04 \x01(\x0b\x32\'.otg.FlowRSVPPathObjectsClassTimeValues\x12\x42\n\x0e\x65xplicit_route\x18\x05 \x01(\x0b\x32*.otg.FlowRSVPPathObjectsClassExplicitRoute\x12@\n\rlabel_request\x18\x06 \x01(\x0b\x32).otg.FlowRSVPPathObjectsClassLabelRequest\x12H\n\x11session_attribute\x18\x07 \x01(\x0b\x32-.otg.FlowRSVPPathObjectsClassSessionAttribute\x12\x44\n\x0fsender_template\x18\x08 \x01(\x0b\x32+.otg.FlowRSVPPathObjectsClassSenderTemplate\x12>\n\x0csender_tspec\x18\t \x01(\x0b\x32(.otg.FlowRSVPPathObjectsClassSenderTspec\x12>\n\x0crecord_route\x18\n \x01(\x0b\x32(.otg.FlowRSVPPathObjectsClassRecordRoute\x12.\n\x06\x63ustom\x18\x0b \x01(\x0b\x32\x1e.otg.FlowRSVPPathObjectsCustom\x1a\xd1\x01\n\x06\x43hoice\"\xc6\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07session\x10\x01\x12\x0c\n\x08rsvp_hop\x10\x02\x12\x0f\n\x0btime_values\x10\x03\x12\x12\n\x0e\x65xplicit_route\x10\x04\x12\x11\n\rlabel_request\x10\x05\x12\x15\n\x11session_attribute\x10\x06\x12\x13\n\x0fsender_template\x10\x07\x12\x10\n\x0csender_tspec\x10\x08\x12\x10\n\x0crecord_route\x10\t\x12\n\n\x06\x63ustom\x10\nB\t\n\x07_choice\"\x82\x01\n\x1f\x46lowRSVPPathObjectsClassSession\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12\x34\n\x06\x63_type\x18\x02 \x01(\x0b\x32$.otg.FlowRSVPPathObjectsSessionCType\"\xeb\x01\n\x1f\x46lowRSVPPathObjectsSessionCType\x12\x45\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x30.otg.FlowRSVPPathObjectsSessionCType.Choice.EnumH\x00\x88\x01\x01\x12>\n\x0flsp_tunnel_ipv4\x18\x02 \x01(\x0b\x32%.otg.FlowRSVPPathSessionLspTunnelIpv4\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x13\n\x0flsp_tunnel_ipv4\x10\x01\x42\t\n\x07_choice\"\xe2\x02\n FlowRSVPPathSessionLspTunnelIpv4\x12l\n\x1dipv4_tunnel_end_point_address\x18\x01 \x01(\x0b\x32\x45.otg.PatternFlowRSVPPathSessionLspTunnelIpv4Ipv4TunnelEndPointAddress\x12\x46\n\x08reserved\x18\x02 \x01(\x0b\x32\x34.otg.PatternFlowRSVPPathSessionLspTunnelIpv4Reserved\x12G\n\ttunnel_id\x18\x03 \x01(\x0b\x32\x34.otg.PatternFlowRSVPPathSessionLspTunnelIpv4TunnelId\x12?\n\x12\x65xtended_tunnel_id\x18\x04 \x01(\x0b\x32#.otg.FlowRSVPPathSessionExtTunnelId\"\xbd\x02\n\x1e\x46lowRSVPPathSessionExtTunnelId\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.FlowRSVPPathSessionExtTunnelId.Choice.EnumH\x00\x88\x01\x01\x12G\n\nas_integer\x18\x02 \x01(\x0b\x32\x33.otg.PatternFlowRSVPPathSessionExtTunnelIdAsInteger\x12\x41\n\x07\x61s_ipv4\x18\x03 \x01(\x0b\x32\x30.otg.PatternFlowRSVPPathSessionExtTunnelIdAsIpv4\x1a>\n\x06\x43hoice\"4\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\nas_integer\x10\x01\x12\x0b\n\x07\x61s_ipv4\x10\x02\x42\t\n\x07_choice\"\x82\x01\n\x1f\x46lowRSVPPathObjectsClassRsvpHop\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12\x34\n\x06\x63_type\x18\x02 \x01(\x0b\x32$.otg.FlowRSVPPathObjectsRsvpHopCType\"\xcc\x01\n\x1f\x46lowRSVPPathObjectsRsvpHopCType\x12\x45\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x30.otg.FlowRSVPPathObjectsRsvpHopCType.Choice.EnumH\x00\x88\x01\x01\x12*\n\x04ipv4\x18\x02 \x01(\x0b\x32\x1c.otg.FlowRSVPPathRsvpHopIpv4\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x42\t\n\x07_choice\"\xbc\x01\n\x17\x46lowRSVPPathRsvpHopIpv4\x12\x44\n\x0cipv4_address\x18\x01 \x01(\x0b\x32..otg.PatternFlowRSVPPathRsvpHopIpv4Ipv4Address\x12[\n\x18logical_interface_handle\x18\x02 \x01(\x0b\x32\x39.otg.PatternFlowRSVPPathRsvpHopIpv4LogicalInterfaceHandle\"\x88\x01\n\"FlowRSVPPathObjectsClassTimeValues\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12\x37\n\x06\x63_type\x18\x02 \x01(\x0b\x32\'.otg.FlowRSVPPathObjectsTimeValuesCType\"\xda\x01\n\"FlowRSVPPathObjectsTimeValuesCType\x12H\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x33.otg.FlowRSVPPathObjectsTimeValuesCType.Choice.EnumH\x00\x88\x01\x01\x12\x30\n\x06type_1\x18\x02 \x01(\x0b\x32 .otg.FlowRSVPPathTimeValuesType1\x1a-\n\x06\x43hoice\"#\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06type_1\x10\x01\x42\t\n\x07_choice\"n\n\x1b\x46lowRSVPPathTimeValuesType1\x12O\n\x10refresh_period_r\x18\x01 \x01(\x0b\x32\x35.otg.PatternFlowRSVPPathTimeValuesType1RefreshPeriodR\"\x93\x01\n%FlowRSVPPathObjectsClassExplicitRoute\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12?\n\x06\x63_type\x18\x02 \x01(\x0b\x32/.otg.FlowRSVPPathObjectsClassExplicitRouteCType\"\xed\x01\n*FlowRSVPPathObjectsClassExplicitRouteCType\x12P\n\x06\x63hoice\x18\x01 \x01(\x0e\x32;.otg.FlowRSVPPathObjectsClassExplicitRouteCType.Choice.EnumH\x00\x88\x01\x01\x12\x33\n\x06type_1\x18\x02 \x01(\x0b\x32#.otg.FlowRSVPPathExplicitRouteType1\x1a-\n\x06\x43hoice\"#\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06type_1\x10\x01\x42\t\n\x07_choice\"_\n\x1e\x46lowRSVPPathExplicitRouteType1\x12=\n\nsubobjects\x18\x01 \x03(\x0b\x32).otg.FlowRSVPType1ExplicitRouteSubobjects\"c\n$FlowRSVPType1ExplicitRouteSubobjects\x12;\n\x04type\x18\x01 \x01(\x0b\x32-.otg.FlowRSVPType1ExplicitRouteSubobjectsType\"\xcc\x02\n(FlowRSVPType1ExplicitRouteSubobjectsType\x12N\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x39.otg.FlowRSVPType1ExplicitRouteSubobjectsType.Choice.EnumH\x00\x88\x01\x01\x12\x42\n\x0bipv4_prefix\x18\x02 \x01(\x0b\x32-.otg.FlowRSVPPathExplicitRouteType1Ipv4Prefix\x12>\n\tas_number\x18\x03 \x01(\x0b\x32+.otg.FlowRSVPPathExplicitRouteType1ASNumber\x1a\x41\n\x06\x43hoice\"7\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0f\n\x0bipv4_prefix\x10\x01\x12\r\n\tas_number\x10\x02\x42\t\n\x07_choice\"\x9c\x02\n(FlowRSVPPathExplicitRouteType1Ipv4Prefix\x12G\n\x05l_bit\x18\x01 \x01(\x0b\x32\x38.otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixLBit\x12\x30\n\x06length\x18\x02 \x01(\x0b\x32 .otg.FlowRSVPExplicitRouteLength\x12U\n\x0cipv4_address\x18\x03 \x01(\x0b\x32?.otg.PatternFlowRSVPPathExplicitRouteType1Ipv4PrefixIpv4Address\x12\x13\n\x06prefix\x18\x04 \x01(\rH\x00\x88\x01\x01\x42\t\n\x07_prefix\"\xcf\x01\n&FlowRSVPPathExplicitRouteType1ASNumber\x12\x45\n\x05l_bit\x18\x01 \x01(\x0b\x32\x36.otg.PatternFlowRSVPPathExplicitRouteType1ASNumberLBit\x12\x38\n\x06length\x18\x02 \x01(\x0b\x32(.otg.FlowRSVPExplicitRouteASNumberLength\x12\x16\n\tas_number\x18\x03 \x01(\rH\x00\x88\x01\x01\x42\x0c\n\n_as_number\"\xdd\x01\n\x1b\x46lowRSVPExplicitRouteLength\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.FlowRSVPExplicitRouteLength.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xed\x01\n#FlowRSVPExplicitRouteASNumberLength\x12I\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x34.otg.FlowRSVPExplicitRouteASNumberLength.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\x8c\x01\n$FlowRSVPPathObjectsClassLabelRequest\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12\x39\n\x06\x63_type\x18\x02 \x01(\x0b\x32).otg.FlowRSVPPathObjectsLabelRequestCType\"\x86\x02\n$FlowRSVPPathObjectsLabelRequestCType\x12J\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x35.otg.FlowRSVPPathObjectsLabelRequestCType.Choice.EnumH\x00\x88\x01\x01\x12K\n\x13without_label_range\x18\x02 \x01(\x0b\x32..otg.FlowRSVPPathLabelRequestWithoutLabelRange\x1a:\n\x06\x43hoice\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x17\n\x13without_label_range\x10\x01\x42\t\n\x07_choice\"\xc7\x01\n)FlowRSVPPathLabelRequestWithoutLabelRange\x12O\n\x08reserved\x18\x01 \x01(\x0b\x32=.otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeReserved\x12I\n\x05l3pid\x18\x02 \x01(\x0b\x32:.otg.PatternFlowRSVPPathLabelRequestWithoutLabelRangeL3pid\"\x94\x01\n(FlowRSVPPathObjectsClassSessionAttribute\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12=\n\x06\x63_type\x18\x02 \x01(\x0b\x32-.otg.FlowRSVPPathObjectsSessionAttributeCType\"\xd0\x02\n(FlowRSVPPathObjectsSessionAttributeCType\x12N\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x39.otg.FlowRSVPPathObjectsSessionAttributeCType.Choice.EnumH\x00\x88\x01\x01\x12>\n\nlsp_tunnel\x18\x02 \x01(\x0b\x32*.otg.FlowRSVPPathSessionAttributeLspTunnel\x12\x43\n\rlsp_tunnel_ra\x18\x03 \x01(\x0b\x32,.otg.FlowRSVPPathSessionAttributeLspTunnelRa\x1a\x44\n\x06\x43hoice\":\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\nlsp_tunnel\x10\x01\x12\x11\n\rlsp_tunnel_ra\x10\x02\x42\t\n\x07_choice\"\xa0\x02\n%FlowRSVPPathSessionAttributeLspTunnel\x12\x1b\n\x0esetup_priority\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1d\n\x10holding_priority\x18\x02 \x01(\rH\x01\x88\x01\x01\x12)\n\x05\x66lags\x18\x03 \x01(\x0b\x32\x1a.otg.FlowRSVPLspTunnelFlag\x12<\n\x0bname_length\x18\x04 \x01(\x0b\x32\'.otg.FlowRSVPSessionAttributeNameLength\x12\x19\n\x0csession_name\x18\x05 \x01(\tH\x02\x88\x01\x01\x42\x11\n\x0f_setup_priorityB\x13\n\x11_holding_priorityB\x0f\n\r_session_name\"\xa0\x03\n\'FlowRSVPPathSessionAttributeLspTunnelRa\x12\x18\n\x0b\x65xclude_any\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0binclude_any\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0binclude_all\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0esetup_priority\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1d\n\x10holding_priority\x18\x05 \x01(\rH\x04\x88\x01\x01\x12)\n\x05\x66lags\x18\x06 \x01(\x0b\x32\x1a.otg.FlowRSVPLspTunnelFlag\x12<\n\x0bname_length\x18\x07 \x01(\x0b\x32\'.otg.FlowRSVPSessionAttributeNameLength\x12\x19\n\x0csession_name\x18\x08 \x01(\tH\x05\x88\x01\x01\x42\x0e\n\x0c_exclude_anyB\x0e\n\x0c_include_anyB\x0e\n\x0c_include_allB\x11\n\x0f_setup_priorityB\x13\n\x11_holding_priorityB\x0f\n\r_session_name\"\xd3\x01\n\x15\x46lowRSVPLspTunnelFlag\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.FlowRSVPLspTunnelFlag.Choice.EnumH\x00\x88\x01\x01\x1ar\n\x06\x43hoice\"h\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1c\n\x18local_protection_desired\x10\x01\x12\x1b\n\x17label_recording_desired\x10\x02\x12\x14\n\x10se_style_desired\x10\x03\x42\t\n\x07_choice\"\xeb\x01\n\"FlowRSVPSessionAttributeNameLength\x12H\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x33.otg.FlowRSVPSessionAttributeNameLength.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\x90\x01\n&FlowRSVPPathObjectsClassSenderTemplate\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12;\n\x06\x63_type\x18\x02 \x01(\x0b\x32+.otg.FlowRSVPPathObjectsSenderTemplateCType\"\x80\x02\n&FlowRSVPPathObjectsSenderTemplateCType\x12L\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x37.otg.FlowRSVPPathObjectsSenderTemplateCType.Choice.EnumH\x00\x88\x01\x01\x12\x45\n\x0flsp_tunnel_ipv4\x18\x02 \x01(\x0b\x32,.otg.FlowRSVPPathSenderTemplateLspTunnelIpv4\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x13\n\x0flsp_tunnel_ipv4\x10\x01\x42\t\n\x07_choice\"\xb2\x02\n\'FlowRSVPPathSenderTemplateLspTunnelIpv4\x12n\n\x1aipv4_tunnel_sender_address\x18\x01 \x01(\x0b\x32J.otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Ipv4TunnelSenderAddress\x12M\n\x08reserved\x18\x02 \x01(\x0b\x32;.otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4Reserved\x12H\n\x06lsp_id\x18\x03 \x01(\x0b\x32\x38.otg.PatternFlowRSVPPathSenderTemplateLspTunnelIpv4LspId\"\x8a\x01\n#FlowRSVPPathObjectsClassSenderTspec\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12\x38\n\x06\x63_type\x18\x02 \x01(\x0b\x32(.otg.FlowRSVPPathObjectsSenderTspecCType\"\xe3\x01\n#FlowRSVPPathObjectsSenderTspecCType\x12I\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x34.otg.FlowRSVPPathObjectsSenderTspecCType.Choice.EnumH\x00\x88\x01\x01\x12\x35\n\x08int_serv\x18\x02 \x01(\x0b\x32#.otg.FlowRSVPPathSenderTspecIntServ\x1a/\n\x06\x43hoice\"%\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08int_serv\x10\x01\x42\t\n\x07_choice\"\xb0\t\n\x1e\x46lowRSVPPathSenderTspecIntServ\x12\x42\n\x07version\x18\x01 \x01(\x0b\x32\x31.otg.PatternFlowRSVPPathSenderTspecIntServVersion\x12\x46\n\treserved1\x18\x02 \x01(\x0b\x32\x33.otg.PatternFlowRSVPPathSenderTspecIntServReserved1\x12O\n\x0eoverall_length\x18\x03 \x01(\x0b\x32\x37.otg.PatternFlowRSVPPathSenderTspecIntServOverallLength\x12O\n\x0eservice_header\x18\x04 \x01(\x0b\x32\x37.otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader\x12\x43\n\x08zero_bit\x18\x05 \x01(\x0b\x32\x31.otg.PatternFlowRSVPPathSenderTspecIntServZeroBit\x12\x46\n\treserved2\x18\x06 \x01(\x0b\x32\x33.otg.PatternFlowRSVPPathSenderTspecIntServReserved2\x12]\n\x16length_of_service_data\x18\x07 \x01(\x0b\x32=.otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData\x12n\n\x1fparameter_id_token_bucket_tspec\x18\x08 \x01(\x0b\x32\x45.otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec\x12V\n\x12parameter_127_flag\x18\t \x01(\x0b\x32:.otg.PatternFlowRSVPPathSenderTspecIntServParameter127Flag\x12Z\n\x14parameter_127_length\x18\n \x01(\x0b\x32<.otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length\x12\x1e\n\x11token_bucket_rate\x18\x0b \x01(\x02H\x00\x88\x01\x01\x12\x1e\n\x11token_bucket_size\x18\x0c \x01(\x02H\x01\x88\x01\x01\x12\x1b\n\x0epeak_data_rate\x18\r \x01(\x02H\x02\x88\x01\x01\x12Z\n\x14minimum_policed_unit\x18\x0e \x01(\x0b\x32<.otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit\x12X\n\x13maximum_packet_size\x18\x0f \x01(\x0b\x32;.otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeB\x14\n\x12_token_bucket_rateB\x14\n\x12_token_bucket_sizeB\x11\n\x0f_peak_data_rate\"\x8a\x01\n#FlowRSVPPathObjectsClassRecordRoute\x12)\n\x06length\x18\x01 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12\x38\n\x06\x63_type\x18\x02 \x01(\x0b\x32(.otg.FlowRSVPPathObjectsRecordRouteCType\"\xdd\x01\n#FlowRSVPPathObjectsRecordRouteCType\x12I\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x34.otg.FlowRSVPPathObjectsRecordRouteCType.Choice.EnumH\x00\x88\x01\x01\x12\x31\n\x06type_1\x18\x02 \x01(\x0b\x32!.otg.FlowRSVPPathRecordRouteType1\x1a-\n\x06\x43hoice\"#\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06type_1\x10\x01\x42\t\n\x07_choice\"[\n\x1c\x46lowRSVPPathRecordRouteType1\x12;\n\nsubobjects\x18\x01 \x03(\x0b\x32\'.otg.FlowRSVPType1RecordRouteSubobjects\"d\n\"FlowRSVPType1RecordRouteSubobjects\x12>\n\x04type\x18\x01 \x01(\x0b\x32\x30.otg.FlowRSVPPathObjectsRecordRouteSubObjectType\"\xc6\x02\n+FlowRSVPPathObjectsRecordRouteSubObjectType\x12Q\n\x06\x63hoice\x18\x01 \x01(\x0e\x32<.otg.FlowRSVPPathObjectsRecordRouteSubObjectType.Choice.EnumH\x00\x88\x01\x01\x12\x42\n\x0cipv4_address\x18\x02 \x01(\x0b\x32,.otg.FlowRSVPPathRecordRouteType1Ipv4Address\x12\x35\n\x05label\x18\x03 \x01(\x0b\x32&.otg.FlowRSVPPathRecordRouteType1Label\x1a>\n\x06\x43hoice\"4\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0cipv4_address\x10\x01\x12\t\n\x05label\x10\x02\x42\t\n\x07_choice\"\xb8\x02\n\'FlowRSVPPathRecordRouteType1Ipv4Address\x12.\n\x06length\x18\x01 \x01(\x0b\x32\x1e.otg.FlowRSVPRouteRecordLength\x12T\n\x0cipv4_address\x18\x02 \x01(\x0b\x32>.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address\x12V\n\rprefix_length\x18\x03 \x01(\x0b\x32?.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength\x12/\n\x05\x66lags\x18\x04 \x01(\x0b\x32 .otg.FlowRSVPRecordRouteIPv4Flag\"\xcb\x01\n\x1b\x46lowRSVPRecordRouteIPv4Flag\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.FlowRSVPRecordRouteIPv4Flag.Choice.EnumH\x00\x88\x01\x01\x1a^\n\x06\x43hoice\"T\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1e\n\x1alocal_protection_available\x10\x01\x12\x1b\n\x17local_protection_in_use\x10\x02\x42\t\n\x07_choice\"\x8c\x02\n!FlowRSVPPathRecordRouteType1Label\x12.\n\x06length\x18\x01 \x01(\x0b\x32\x1e.otg.FlowRSVPRouteRecordLength\x12\x41\n\x05\x66lags\x18\x02 \x01(\x0b\x32\x32.otg.PatternFlowRSVPPathRecordRouteType1LabelFlags\x12\x42\n\x06\x63_type\x18\x03 \x01(\x0b\x32\x32.otg.PatternFlowRSVPPathRecordRouteType1LabelCType\x12\x30\n\x05label\x18\x04 \x01(\x0b\x32!.otg.FlowRSVPPathRecordRouteLabel\"\xf4\x01\n\x1c\x46lowRSVPPathRecordRouteLabel\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.FlowRSVPPathRecordRouteLabel.Choice.EnumH\x00\x88\x01\x01\x12\x17\n\nas_integer\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06\x61s_hex\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a=\n\x06\x43hoice\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\nas_integer\x10\x01\x12\n\n\x06\x61s_hex\x10\x02\x42\t\n\x07_choiceB\r\n\x0b_as_integerB\t\n\x07_as_hex\"\xd9\x01\n\x19\x46lowRSVPRouteRecordLength\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.FlowRSVPRouteRecordLength.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\x9d\x01\n\x19\x46lowRSVPPathObjectsCustom\x12\x37\n\x04type\x18\x01 \x01(\x0b\x32).otg.PatternFlowRSVPPathObjectsCustomType\x12)\n\x06length\x18\x02 \x01(\x0b\x32\x19.otg.FlowRSVPObjectLength\x12\x12\n\x05\x62ytes\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_bytes\"\xbe\x02\n\x08\x46lowSize\x12.\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x19.otg.FlowSize.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05\x66ixed\x18\x02 \x01(\rH\x01\x88\x01\x01\x12)\n\tincrement\x18\x03 \x01(\x0b\x32\x16.otg.FlowSizeIncrement\x12#\n\x06random\x18\x04 \x01(\x0b\x32\x13.otg.FlowSizeRandom\x12.\n\x0cweight_pairs\x18\x05 \x01(\x0b\x32\x18.otg.FlowSizeWeightPairs\x1aY\n\x06\x43hoice\"O\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x66ixed\x10\x01\x12\r\n\tincrement\x10\x02\x12\n\n\x06random\x10\x03\x12\x10\n\x0cweight_pairs\x10\x04\x42\t\n\x07_choiceB\x08\n\x06_fixed\"g\n\x11\x46lowSizeIncrement\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03\x65nd\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x11\n\x04step\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_endB\x07\n\x05_step\"D\n\x0e\x46lowSizeRandom\x12\x10\n\x03min\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03max\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\"\x8d\x03\n\x13\x46lowSizeWeightPairs\x12\x39\n\x06\x63hoice\x18\x01 \x01(\x0e\x32$.otg.FlowSizeWeightPairs.Choice.EnumH\x00\x88\x01\x01\x12\x41\n\npredefined\x18\x02 \x01(\x0e\x32(.otg.FlowSizeWeightPairs.Predefined.EnumH\x01\x88\x01\x01\x12.\n\x06\x63ustom\x18\x03 \x03(\x0b\x32\x1e.otg.FlowSizeWeightPairsCustom\x1a=\n\x06\x43hoice\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\npredefined\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1ao\n\nPredefined\"a\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04imix\x10\x01\x12\x0e\n\nipsec_imix\x10\x02\x12\r\n\tipv6_imix\x10\x03\x12\x11\n\rstandard_imix\x10\x04\x12\x0c\n\x08tcp_imix\x10\x05\x42\t\n\x07_choiceB\r\n\x0b_predefined\"W\n\x19\x46lowSizeWeightPairsCustom\x12\x11\n\x04size\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x13\n\x06weight\x18\x02 \x01(\x02H\x01\x88\x01\x01\x42\x07\n\x05_sizeB\t\n\x07_weight\"\xd8\x02\n\x08\x46lowRate\x12.\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x19.otg.FlowRate.Choice.EnumH\x00\x88\x01\x01\x12\x10\n\x03pps\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x10\n\x03\x62ps\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x11\n\x04kbps\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x11\n\x04mbps\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x11\n\x04gbps\x18\x06 \x01(\rH\x05\x88\x01\x01\x12\x17\n\npercentage\x18\x07 \x01(\x02H\x06\x88\x01\x01\x1a\x61\n\x06\x43hoice\"W\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03pps\x10\x01\x12\x07\n\x03\x62ps\x10\x02\x12\x08\n\x04kbps\x10\x03\x12\x08\n\x04mbps\x10\x04\x12\x08\n\x04gbps\x10\x05\x12\x0e\n\npercentage\x10\x06\x42\t\n\x07_choiceB\x06\n\x04_ppsB\x06\n\x04_bpsB\x07\n\x05_kbpsB\x07\n\x05_mbpsB\x07\n\x05_gbpsB\r\n\x0b_percentage\"\xd5\x02\n\x0c\x46lowDuration\x12\x32\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1d.otg.FlowDuration.Choice.EnumH\x00\x88\x01\x01\x12,\n\rfixed_packets\x18\x02 \x01(\x0b\x32\x15.otg.FlowFixedPackets\x12,\n\rfixed_seconds\x18\x03 \x01(\x0b\x32\x15.otg.FlowFixedSeconds\x12\x1d\n\x05\x62urst\x18\x04 \x01(\x0b\x32\x0e.otg.FlowBurst\x12\'\n\ncontinuous\x18\x05 \x01(\x0b\x32\x13.otg.FlowContinuous\x1a\x62\n\x06\x43hoice\"X\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rfixed_packets\x10\x01\x12\x11\n\rfixed_seconds\x10\x02\x12\t\n\x05\x62urst\x10\x03\x12\x0e\n\ncontinuous\x10\x04\x42\t\n\x07_choice\"I\n\x0e\x46lowContinuous\x12\x10\n\x03gap\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1d\n\x05\x64\x65lay\x18\x02 \x01(\x0b\x32\x0e.otg.FlowDelayB\x06\n\x04_gap\"\x8c\x02\n\tFlowDelay\x12/\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1a.otg.FlowDelay.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05\x62ytes\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12\x18\n\x0bnanoseconds\x18\x03 \x01(\x02H\x02\x88\x01\x01\x12\x19\n\x0cmicroseconds\x18\x04 \x01(\x02H\x03\x88\x01\x01\x1aO\n\x06\x43hoice\"E\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x62ytes\x10\x01\x12\x0f\n\x0bnanoseconds\x10\x02\x12\x10\n\x0cmicroseconds\x10\x03\x42\t\n\x07_choiceB\x08\n\x06_bytesB\x0e\n\x0c_nanosecondsB\x0f\n\r_microseconds\"m\n\x10\x46lowFixedPackets\x12\x14\n\x07packets\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03gap\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1d\n\x05\x64\x65lay\x18\x03 \x01(\x0b\x32\x0e.otg.FlowDelayB\n\n\x08_packetsB\x06\n\x04_gap\"m\n\x10\x46lowFixedSeconds\x12\x14\n\x07seconds\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x10\n\x03gap\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1d\n\x05\x64\x65lay\x18\x03 \x01(\x0b\x32\x0e.otg.FlowDelayB\n\n\x08_secondsB\x06\n\x04_gap\"\xa0\x01\n\tFlowBurst\x12\x13\n\x06\x62ursts\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x14\n\x07packets\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x10\n\x03gap\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x37\n\x0finter_burst_gap\x18\x04 \x01(\x0b\x32\x1e.otg.FlowDurationInterBurstGapB\t\n\x07_burstsB\n\n\x08_packetsB\x06\n\x04_gap\"\xac\x02\n\x19\x46lowDurationInterBurstGap\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.FlowDurationInterBurstGap.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05\x62ytes\x18\x02 \x01(\x01H\x01\x88\x01\x01\x12\x18\n\x0bnanoseconds\x18\x03 \x01(\x01H\x02\x88\x01\x01\x12\x19\n\x0cmicroseconds\x18\x04 \x01(\x01H\x03\x88\x01\x01\x1aO\n\x06\x43hoice\"E\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x62ytes\x10\x01\x12\x0f\n\x0bnanoseconds\x10\x02\x12\x10\n\x0cmicroseconds\x10\x03\x42\t\n\x07_choiceB\x08\n\x06_bytesB\x0e\n\x0c_nanosecondsB\x0f\n\r_microseconds\"\xfd\x01\n\x0b\x46lowMetrics\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x11\n\x04loss\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\'\n\x0brx_tx_ratio\x18\x06 \x01(\x0b\x32\x12.otg.FlowRxTxRatio\x12\x17\n\ntimestamps\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12(\n\x07latency\x18\x04 \x01(\x0b\x32\x17.otg.FlowLatencyMetrics\x12\x37\n\x16predefined_metric_tags\x18\x05 \x01(\x0b\x32\x17.otg.FlowPredefinedTagsB\t\n\x07_enableB\x07\n\x05_lossB\r\n\x0b_timestamps\"\xb8\x01\n\x12\x46lowLatencyMetrics\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x34\n\x04mode\x18\x02 \x01(\x0e\x32!.otg.FlowLatencyMetrics.Mode.EnumH\x01\x88\x01\x01\x1a\x43\n\x04Mode\";\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rstore_forward\x10\x01\x12\x0f\n\x0b\x63ut_through\x10\x02\x42\t\n\x07_enableB\x07\n\x05_mode\"6\n\x12\x46lowPredefinedTags\x12\x14\n\x07rx_name\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\n\n\x08_rx_name\"\xd6\x01\n\rFlowRxTxRatio\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.FlowRxTxRatio.Choice.EnumH\x00\x88\x01\x01\x12+\n\x08rx_count\x18\x02 \x01(\x0b\x32\x19.otg.FlowRxTxRatioRxCount\x12\x12\n\x05value\x18\x03 \x01(\x02H\x01\x88\x01\x01\x1a:\n\x06\x43hoice\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08rx_count\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x08\n\x06_value\"\x16\n\x14\x46lowRxTxRatioRxCount\"\xbf\x01\n\x05\x45vent\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x04link\x18\x02 \x01(\x0b\x32\x0e.otg.EventLink\x12\x34\n\x11rx_rate_threshold\x18\x03 \x01(\x0b\x32\x19.otg.EventRxRateThreshold\x12\x42\n\x18route_advertise_withdraw\x18\x04 \x01(\x0b\x32 .otg.EventRouteAdvertiseWithdrawB\t\n\x07_enable\"\\\n\x14\x45ventRxRateThreshold\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x16\n\tthreshold\x18\x02 \x01(\x02H\x01\x88\x01\x01\x42\t\n\x07_enableB\x0c\n\n_threshold\"+\n\tEventLink\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\t\n\x07_enable\"=\n\x1b\x45ventRouteAdvertiseWithdraw\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\t\n\x07_enable\"\xf5\x01\n\x0c\x45ventRequest\x12)\n\x04type\x18\x01 \x03(\x0e\x32\x1b.otg.EventRequest.Type.Enum\x12\x0e\n\x06source\x18\x02 \x03(\t\x1a\xa9\x01\n\x04Type\"\xa0\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tlink_down\x10\x01\x12\x0b\n\x07link_up\x10\x02\x12\x12\n\x0eroute_withdraw\x10\x03\x12\x13\n\x0froute_advertise\x10\x04\x12 \n\x1c\x66low_rx_rate_above_threshold\x10\x05\x12 \n\x1c\x66low_rx_rate_below_threshold\x10\x06\"b\n\x11\x45ventSubscription\x12!\n\x06\x65vents\x18\x01 \x01(\x0b\x32\x11.otg.EventRequest\x12\x19\n\x0c\x63\x61llback_url\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_callback_url\"\xca\x02\n\x04Lldp\x12\'\n\nconnection\x18\x01 \x01(\x0b\x32\x13.otg.LldpConnection\x12&\n\nchassis_id\x18\x02 \x01(\x0b\x32\x12.otg.LldpChassisId\x12 \n\x07port_id\x18\x03 \x01(\x0b\x32\x0f.otg.LldpPortId\x12(\n\x0bsystem_name\x18\x04 \x01(\x0b\x32\x13.otg.LldpSystemName\x12\x16\n\thold_time\x18\x05 \x01(\rH\x00\x88\x01\x01\x12#\n\x16\x61\x64vertisement_interval\x18\x06 \x01(\rH\x01\x88\x01\x01\x12\x11\n\x04name\x18\x07 \x01(\tH\x02\x88\x01\x01\x12#\n\torg_infos\x18\x08 \x03(\x0b\x32\x10.otg.LldpOrgInfoB\x0c\n\n_hold_timeB\x19\n\x17_advertisement_intervalB\x07\n\x05_name\"\xa9\x01\n\x0eLldpConnection\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.LldpConnection.Choice.EnumH\x00\x88\x01\x01\x12\x16\n\tport_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x1a\x30\n\x06\x43hoice\"&\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tport_name\x10\x01\x42\t\n\x07_choiceB\x0c\n\n_port_name\"\xe1\x02\n\rLldpChassisId\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.LldpChassisId.Choice.EnumH\x00\x88\x01\x01\x12\x37\n\x13mac_address_subtype\x18\x02 \x01(\x0b\x32\x1a.otg.LldpChassisMacSubType\x12#\n\x16interface_name_subtype\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\rlocal_subtype\x18\x04 \x01(\tH\x02\x88\x01\x01\x1ai\n\x06\x43hoice\"_\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x17\n\x13mac_address_subtype\x10\x01\x12\x1a\n\x16interface_name_subtype\x10\x02\x12\x11\n\rlocal_subtype\x10\x03\x42\t\n\x07_choiceB\x19\n\x17_interface_name_subtypeB\x10\n\x0e_local_subtype\"\xdf\x02\n\nLldpPortId\x12\x30\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1b.otg.LldpPortId.Choice.EnumH\x00\x88\x01\x01\x12 \n\x13mac_address_subtype\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x41\n\x16interface_name_subtype\x18\x03 \x01(\x0b\x32!.otg.LldpPortInterfaceNameSubType\x12\x1a\n\rlocal_subtype\x18\x04 \x01(\tH\x02\x88\x01\x01\x1ai\n\x06\x43hoice\"_\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x17\n\x13mac_address_subtype\x10\x01\x12\x1a\n\x16interface_name_subtype\x10\x02\x12\x11\n\rlocal_subtype\x10\x03\x42\t\n\x07_choiceB\x16\n\x14_mac_address_subtypeB\x10\n\x0e_local_subtype\"\xd1\x01\n\x15LldpChassisMacSubType\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.LldpChassisMacSubType.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xdf\x01\n\x1cLldpPortInterfaceNameSubType\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.LldpPortInterfaceNameSubType.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"\xc3\x01\n\x0eLldpSystemName\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.LldpSystemName.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04\x61uto\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x36\n\x06\x43hoice\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04\x61uto\x10\x01\x12\t\n\x05value\x10\x02\x42\t\n\x07_choiceB\x07\n\x05_autoB\x08\n\x06_value\"t\n\x0bLldpOrgInfo\x12\x10\n\x03oui\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07subtype\x18\x02 \x01(\rH\x01\x88\x01\x01\x12)\n\x0binformation\x18\x03 \x01(\x0b\x32\x14.otg.LldpOrgInfoTypeB\x06\n\x04_ouiB\n\n\x08_subtype\"\x9c\x01\n\x0fLldpOrgInfoType\x12\x35\n\x06\x63hoice\x18\x01 \x01(\x0e\x32 .otg.LldpOrgInfoType.Choice.EnumH\x00\x88\x01\x01\x12\x11\n\x04info\x18\x02 \x01(\tH\x01\x88\x01\x01\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04info\x10\x01\x42\t\n\x07_choiceB\x07\n\x05_info\"\xa4\x01\n\x05\x45rror\x12\x11\n\x04\x63ode\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\'\n\x04kind\x18\x02 \x01(\x0e\x32\x14.otg.Error.Kind.EnumH\x01\x88\x01\x01\x12\x0e\n\x06\x65rrors\x18\x03 \x03(\t\x1a=\n\x04Kind\"5\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\nvalidation\x10\x01\x12\x0c\n\x08internal\x10\x02\x42\x07\n\x05_codeB\x07\n\x05_kind\"\x1b\n\x07Warning\x12\x10\n\x08warnings\x18\x01 \x03(\t\"\x9c\x01\n\x0c\x43onfigUpdate\x12\x32\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1d.otg.ConfigUpdate.Choice.EnumH\x00\x88\x01\x01\x12\x1f\n\x05\x66lows\x18\x02 \x01(\x0b\x32\x10.otg.FlowsUpdate\x1a,\n\x06\x43hoice\"\"\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x66lows\x10\x01\x42\t\n\x07_choice\"\xa2\x01\n\x0b\x46lowsUpdate\x12;\n\x0eproperty_names\x18\x01 \x03(\x0e\x32#.otg.FlowsUpdate.PropertyNames.Enum\x12\x18\n\x05\x66lows\x18\x02 \x03(\x0b\x32\t.otg.Flow\x1a<\n\rPropertyNames\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04rate\x10\x01\x12\x08\n\x04size\x10\x02\"\xfd\x01\n\x0c\x43ontrolState\x12\x32\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1d.otg.ControlState.Choice.EnumH\x00\x88\x01\x01\x12\x1c\n\x04port\x18\x02 \x01(\x0b\x32\x0e.otg.StatePort\x12$\n\x08protocol\x18\x03 \x01(\x0b\x32\x12.otg.StateProtocol\x12\"\n\x07traffic\x18\x04 \x01(\x0b\x32\x11.otg.StateTraffic\x1a\x46\n\x06\x43hoice\"<\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04port\x10\x01\x12\x0c\n\x08protocol\x10\x02\x12\x0b\n\x07traffic\x10\x03\x42\t\n\x07_choice\"\xcb\x01\n\tStatePort\x12/\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1a.otg.StatePort.Choice.EnumH\x00\x88\x01\x01\x12 \n\x04link\x18\x02 \x01(\x0b\x32\x12.otg.StatePortLink\x12&\n\x07\x63\x61pture\x18\x03 \x01(\x0b\x32\x15.otg.StatePortCapture\x1a\x38\n\x06\x43hoice\".\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04link\x10\x01\x12\x0b\n\x07\x63\x61pture\x10\x02\x42\t\n\x07_choice\"\xb9\x01\n\x0cStateTraffic\x12\x32\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1d.otg.StateTraffic.Choice.EnumH\x00\x88\x01\x01\x12\x34\n\rflow_transmit\x18\x02 \x01(\x0b\x32\x1d.otg.StateTrafficFlowTransmit\x1a\x34\n\x06\x43hoice\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rflow_transmit\x10\x01\x42\t\n\x07_choice\"\x95\x03\n\rStateProtocol\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.StateProtocol.Choice.EnumH\x00\x88\x01\x01\x12\"\n\x03\x61ll\x18\x02 \x01(\x0b\x32\x15.otg.StateProtocolAll\x12&\n\x05route\x18\x03 \x01(\x0b\x32\x17.otg.StateProtocolRoute\x12$\n\x04lacp\x18\x04 \x01(\x0b\x32\x16.otg.StateProtocolLacp\x12\"\n\x03\x62gp\x18\x05 \x01(\x0b\x32\x15.otg.StateProtocolBgp\x12$\n\x04isis\x18\x06 \x01(\x0b\x32\x16.otg.StateProtocolIsis\x12(\n\x06ospfv2\x18\x07 \x01(\x0b\x32\x18.otg.StateProtocolOspfv2\x1a^\n\x06\x43hoice\"T\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03\x61ll\x10\x01\x12\t\n\x05route\x10\x02\x12\x08\n\x04lacp\x10\x03\x12\x07\n\x03\x62gp\x10\x04\x12\x08\n\x04isis\x10\x05\x12\n\n\x06ospfv2\x10\x06\x42\t\n\x07_choice\"\x94\x01\n\rStatePortLink\x12\x12\n\nport_names\x18\x01 \x03(\t\x12\x31\n\x05state\x18\x02 \x01(\x0e\x32\x1d.otg.StatePortLink.State.EnumH\x00\x88\x01\x01\x1a\x32\n\x05State\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x08\n\x06_state\"\x9d\x01\n\x10StatePortCapture\x12\x12\n\nport_names\x18\x01 \x03(\t\x12\x34\n\x05state\x18\x02 \x01(\x0e\x32 .otg.StatePortCapture.State.EnumH\x00\x88\x01\x01\x1a\x35\n\x05State\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05start\x10\x01\x12\x08\n\x04stop\x10\x02\x42\x08\n\x06_state\"\xc4\x01\n\x18StateTrafficFlowTransmit\x12\x12\n\nflow_names\x18\x01 \x03(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32(.otg.StateTrafficFlowTransmit.State.EnumH\x00\x88\x01\x01\x1aL\n\x05State\"C\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05start\x10\x01\x12\x08\n\x04stop\x10\x02\x12\t\n\x05pause\x10\x03\x12\n\n\x06resume\x10\x04\x42\x08\n\x06_state\"\x89\x01\n\x10StateProtocolAll\x12\x34\n\x05state\x18\x01 \x01(\x0e\x32 .otg.StateProtocolAll.State.EnumH\x00\x88\x01\x01\x1a\x35\n\x05State\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05start\x10\x01\x12\x08\n\x04stop\x10\x02\x42\x08\n\x06_state\"\xa4\x01\n\x12StateProtocolRoute\x12\r\n\x05names\x18\x01 \x03(\t\x12\x36\n\x05state\x18\x02 \x01(\x0e\x32\".otg.StateProtocolRoute.State.EnumH\x00\x88\x01\x01\x1a=\n\x05State\"4\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08withdraw\x10\x01\x12\r\n\tadvertise\x10\x02\x42\x08\n\x06_state\"\xfc\x01\n\x11StateProtocolLacp\x12\x37\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\".otg.StateProtocolLacp.Choice.EnumH\x00\x88\x01\x01\x12*\n\x05\x61\x64min\x18\x02 \x01(\x0b\x32\x1b.otg.StateProtocolLacpAdmin\x12\x37\n\x0cmember_ports\x18\x03 \x01(\x0b\x32!.otg.StateProtocolLacpMemberPorts\x1a>\n\x06\x43hoice\"4\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x61\x64min\x10\x01\x12\x10\n\x0cmember_ports\x10\x02\x42\t\n\x07_choice\"\xac\x01\n\x16StateProtocolLacpAdmin\x12\x18\n\x10lag_member_names\x18\x01 \x03(\t\x12:\n\x05state\x18\x02 \x01(\x0e\x32&.otg.StateProtocolLacpAdmin.State.EnumH\x00\x88\x01\x01\x1a\x32\n\x05State\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x08\n\x06_state\"\xb8\x01\n\x1cStateProtocolLacpMemberPorts\x12\x18\n\x10lag_member_names\x18\x01 \x03(\t\x12@\n\x05state\x18\x02 \x01(\x0e\x32,.otg.StateProtocolLacpMemberPorts.State.EnumH\x00\x88\x01\x01\x1a\x32\n\x05State\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x08\n\x06_state\"\xae\x01\n\x10StateProtocolBgp\x12\x36\n\x06\x63hoice\x18\x01 \x01(\x0e\x32!.otg.StateProtocolBgp.Choice.EnumH\x00\x88\x01\x01\x12)\n\x05peers\x18\x02 \x01(\x0b\x32\x1a.otg.StateProtocolBgpPeers\x1a,\n\x06\x43hoice\"\"\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05peers\x10\x01\x42\t\n\x07_choice\"\xa4\x01\n\x15StateProtocolBgpPeers\x12\x12\n\npeer_names\x18\x01 \x03(\t\x12\x39\n\x05state\x18\x02 \x01(\x0e\x32%.otg.StateProtocolBgpPeers.State.EnumH\x00\x88\x01\x01\x1a\x32\n\x05State\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x08\n\x06_state\"\xb7\x01\n\x11StateProtocolIsis\x12\x37\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\".otg.StateProtocolIsis.Choice.EnumH\x00\x88\x01\x01\x12.\n\x07routers\x18\x02 \x01(\x0b\x32\x1d.otg.StateProtocolIsisRouters\x1a.\n\x06\x43hoice\"$\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07routers\x10\x01\x42\t\n\x07_choice\"\xac\x01\n\x18StateProtocolIsisRouters\x12\x14\n\x0crouter_names\x18\x01 \x03(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32(.otg.StateProtocolIsisRouters.State.EnumH\x00\x88\x01\x01\x1a\x32\n\x05State\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x08\n\x06_state\"\xbd\x01\n\x13StateProtocolOspfv2\x12\x39\n\x06\x63hoice\x18\x01 \x01(\x0e\x32$.otg.StateProtocolOspfv2.Choice.EnumH\x00\x88\x01\x01\x12\x30\n\x07routers\x18\x02 \x01(\x0b\x32\x1f.otg.StateProtocolOspfv2Routers\x1a.\n\x06\x43hoice\"$\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07routers\x10\x01\x42\t\n\x07_choice\"\xb0\x01\n\x1aStateProtocolOspfv2Routers\x12\x14\n\x0crouter_names\x18\x01 \x03(\t\x12>\n\x05state\x18\x02 \x01(\x0e\x32*.otg.StateProtocolOspfv2Routers.State.EnumH\x00\x88\x01\x01\x1a\x32\n\x05State\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x08\n\x06_state\"\xa7\x01\n\rControlAction\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.ControlAction.Choice.EnumH\x00\x88\x01\x01\x12%\n\x08protocol\x18\x02 \x01(\x0b\x32\x13.otg.ActionProtocol\x1a/\n\x06\x43hoice\"%\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08protocol\x10\x01\x42\t\n\x07_choice\"P\n\x15\x43ontrolActionResponse\x12\x10\n\x08warnings\x18\x01 \x03(\t\x12%\n\x08response\x18\x02 \x01(\x0b\x32\x13.otg.ActionResponse\"\xb1\x01\n\x0e\x41\x63tionResponse\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.ActionResponse.Choice.EnumH\x00\x88\x01\x01\x12-\n\x08protocol\x18\x02 \x01(\x0b\x32\x1b.otg.ActionResponseProtocol\x1a/\n\x06\x43hoice\"%\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08protocol\x10\x01\x42\t\n\x07_choice\"\x84\x02\n\x0e\x41\x63tionProtocol\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.ActionProtocol.Choice.EnumH\x00\x88\x01\x01\x12%\n\x04ipv4\x18\x02 \x01(\x0b\x32\x17.otg.ActionProtocolIpv4\x12%\n\x04ipv6\x18\x03 \x01(\x0b\x32\x17.otg.ActionProtocolIpv6\x12#\n\x03\x62gp\x18\x04 \x01(\x0b\x32\x16.otg.ActionProtocolBgp\x1a>\n\x06\x43hoice\"4\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x12\x07\n\x03\x62gp\x10\x03\x42\t\n\x07_choice\"\xf6\x01\n\x16\x41\x63tionResponseProtocol\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.ActionResponseProtocol.Choice.EnumH\x00\x88\x01\x01\x12-\n\x04ipv4\x18\x02 \x01(\x0b\x32\x1f.otg.ActionResponseProtocolIpv4\x12-\n\x04ipv6\x18\x03 \x01(\x0b\x32\x1f.otg.ActionResponseProtocolIpv6\x1a\x35\n\x06\x43hoice\"+\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x42\t\n\x07_choice\"\xb1\x01\n\x12\x41\x63tionProtocolIpv4\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.ActionProtocolIpv4.Choice.EnumH\x00\x88\x01\x01\x12)\n\x04ping\x18\x02 \x01(\x0b\x32\x1b.otg.ActionProtocolIpv4Ping\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ping\x10\x01\x42\t\n\x07_choice\"\xc9\x01\n\x1a\x41\x63tionResponseProtocolIpv4\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.ActionResponseProtocolIpv4.Choice.EnumH\x00\x88\x01\x01\x12\x31\n\x04ping\x18\x02 \x01(\x0b\x32#.otg.ActionResponseProtocolIpv4Ping\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ping\x10\x01\x42\t\n\x07_choice\"N\n\x16\x41\x63tionProtocolIpv4Ping\x12\x34\n\x08requests\x18\x01 \x03(\x0b\x32\".otg.ActionProtocolIpv4PingRequest\"c\n\x1d\x41\x63tionProtocolIpv4PingRequest\x12\x15\n\x08src_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x64st_ip\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_src_nameB\t\n\x07_dst_ip\"`\n\x1e\x41\x63tionResponseProtocolIpv4Ping\x12>\n\tresponses\x18\x01 \x03(\x0b\x32+.otg.ActionResponseProtocolIpv4PingResponse\"\x83\x02\n&ActionResponseProtocolIpv4PingResponse\x12\x15\n\x08src_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x64st_ip\x18\x02 \x01(\tH\x01\x88\x01\x01\x12L\n\x06result\x18\x03 \x01(\x0e\x32\x37.otg.ActionResponseProtocolIpv4PingResponse.Result.EnumH\x02\x88\x01\x01\x1a<\n\x06Result\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tsucceeded\x10\x01\x12\n\n\x06\x66\x61iled\x10\x02\x42\x0b\n\t_src_nameB\t\n\x07_dst_ipB\t\n\x07_result\"\xb1\x01\n\x12\x41\x63tionProtocolIpv6\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.ActionProtocolIpv6.Choice.EnumH\x00\x88\x01\x01\x12)\n\x04ping\x18\x02 \x01(\x0b\x32\x1b.otg.ActionProtocolIpv6Ping\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ping\x10\x01\x42\t\n\x07_choice\"\xc9\x01\n\x1a\x41\x63tionResponseProtocolIpv6\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.ActionResponseProtocolIpv6.Choice.EnumH\x00\x88\x01\x01\x12\x31\n\x04ping\x18\x02 \x01(\x0b\x32#.otg.ActionResponseProtocolIpv6Ping\x1a+\n\x06\x43hoice\"!\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ping\x10\x01\x42\t\n\x07_choice\"N\n\x16\x41\x63tionProtocolIpv6Ping\x12\x34\n\x08requests\x18\x01 \x03(\x0b\x32\".otg.ActionProtocolIpv6PingRequest\"c\n\x1d\x41\x63tionProtocolIpv6PingRequest\x12\x15\n\x08src_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x64st_ip\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0b\n\t_src_nameB\t\n\x07_dst_ip\"`\n\x1e\x41\x63tionResponseProtocolIpv6Ping\x12>\n\tresponses\x18\x01 \x03(\x0b\x32+.otg.ActionResponseProtocolIpv6PingResponse\"\x83\x02\n&ActionResponseProtocolIpv6PingResponse\x12\x15\n\x08src_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x64st_ip\x18\x02 \x01(\tH\x01\x88\x01\x01\x12L\n\x06result\x18\x03 \x01(\x0e\x32\x37.otg.ActionResponseProtocolIpv6PingResponse.Result.EnumH\x02\x88\x01\x01\x1a<\n\x06Result\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tsucceeded\x10\x01\x12\n\n\x06\x66\x61iled\x10\x02\x42\x0b\n\t_src_nameB\t\n\x07_dst_ipB\t\n\x07_result\"\xb7\x02\n\x11\x41\x63tionProtocolBgp\x12\x37\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\".otg.ActionProtocolBgp.Choice.EnumH\x00\x88\x01\x01\x12\x38\n\x0cnotification\x18\x02 \x01(\x0b\x32\".otg.ActionProtocolBgpNotification\x12P\n\x19initiate_graceful_restart\x18\x03 \x01(\x0b\x32-.otg.ActionProtocolBgpInitiateGracefulRestart\x1aR\n\x06\x43hoice\"H\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0cnotification\x10\x01\x12\x1d\n\x19initiate_graceful_restart\x10\x02\x42\t\n\x07_choice\"\xd5\x05\n\x1d\x41\x63tionProtocolBgpNotification\x12\r\n\x05names\x18\x01 \x03(\t\x12\x43\n\x06\x63hoice\x18\x02 \x01(\x0e\x32..otg.ActionProtocolBgpNotification.Choice.EnumH\x00\x88\x01\x01\x12\'\n\x05\x63\x65\x61se\x18\x03 \x01(\x0b\x32\x18.otg.DeviceBgpCeaseError\x12>\n\x14message_header_error\x18\x04 \x01(\x0b\x32 .otg.DeviceBgpMessageHeaderError\x12:\n\x12open_message_error\x18\x05 \x01(\x0b\x32\x1e.otg.DeviceBgpOpenMessageError\x12>\n\x14update_message_error\x18\x06 \x01(\x0b\x32 .otg.DeviceBgpUpdateMessageError\x12:\n\x12hold_timer_expired\x18\x07 \x01(\x0b\x32\x1e.otg.DeviceBgpHoldTimerExpired\x12I\n\x1a\x66inite_state_machine_error\x18\x08 \x01(\x0b\x32%.otg.DeviceBgpFiniteStateMachineError\x12)\n\x06\x63ustom\x18\t \x01(\x0b\x32\x19.otg.DeviceBgpCustomError\x1a\xbd\x01\n\x06\x43hoice\"\xb2\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x63\x65\x61se\x10\x01\x12\x18\n\x14message_header_error\x10\x02\x12\x16\n\x12open_message_error\x10\x03\x12\x18\n\x14update_message_error\x10\x04\x12\x16\n\x12hold_timer_expired\x10\x05\x12\x1e\n\x1a\x66inite_state_machine_error\x10\x06\x12\n\n\x06\x63ustom\x10\x07\x42\t\n\x07_choice\"\xb5\x01\n(ActionProtocolBgpInitiateGracefulRestart\x12\x12\n\npeer_names\x18\x01 \x03(\t\x12\x1a\n\rrestart_delay\x18\x02 \x01(\rH\x00\x88\x01\x01\x12G\n\x0cnotification\x18\x03 \x01(\x0b\x32\x31.otg.ActionProtocolBgpGracefulRestartNotificationB\x10\n\x0e_restart_delay\"\xe4\x05\n,ActionProtocolBgpGracefulRestartNotification\x12R\n\x06\x63hoice\x18\x02 \x01(\x0e\x32=.otg.ActionProtocolBgpGracefulRestartNotification.Choice.EnumH\x00\x88\x01\x01\x12\'\n\x05\x63\x65\x61se\x18\x03 \x01(\x0b\x32\x18.otg.DeviceBgpCeaseError\x12>\n\x14message_header_error\x18\x04 \x01(\x0b\x32 .otg.DeviceBgpMessageHeaderError\x12:\n\x12open_message_error\x18\x05 \x01(\x0b\x32\x1e.otg.DeviceBgpOpenMessageError\x12>\n\x14update_message_error\x18\x06 \x01(\x0b\x32 .otg.DeviceBgpUpdateMessageError\x12:\n\x12hold_timer_expired\x18\x07 \x01(\x0b\x32\x1e.otg.DeviceBgpHoldTimerExpired\x12I\n\x1a\x66inite_state_machine_error\x18\x08 \x01(\x0b\x32%.otg.DeviceBgpFiniteStateMachineError\x12)\n\x06\x63ustom\x18\t \x01(\x0b\x32\x19.otg.DeviceBgpCustomError\x1a\xbd\x01\n\x06\x43hoice\"\xb2\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05\x63\x65\x61se\x10\x01\x12\x18\n\x14message_header_error\x10\x02\x12\x16\n\x12open_message_error\x10\x03\x12\x18\n\x14update_message_error\x10\x04\x12\x16\n\x12hold_timer_expired\x10\x05\x12\x1e\n\x1a\x66inite_state_machine_error\x10\x06\x12\n\n\x06\x63ustom\x10\x07\x42\t\n\x07_choice\"\x95\x07\n\x0eMetricsRequest\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.MetricsRequest.Choice.EnumH\x00\x88\x01\x01\x12%\n\x04port\x18\x02 \x01(\x0b\x32\x17.otg.PortMetricsRequest\x12%\n\x04\x66low\x18\x03 \x01(\x0b\x32\x17.otg.FlowMetricsRequest\x12\'\n\x05\x62gpv4\x18\x04 \x01(\x0b\x32\x18.otg.Bgpv4MetricsRequest\x12\'\n\x05\x62gpv6\x18\x05 \x01(\x0b\x32\x18.otg.Bgpv6MetricsRequest\x12%\n\x04isis\x18\x06 \x01(\x0b\x32\x17.otg.IsisMetricsRequest\x12#\n\x03lag\x18\x07 \x01(\x0b\x32\x16.otg.LagMetricsRequest\x12%\n\x04lacp\x18\x08 \x01(\x0b\x32\x17.otg.LacpMetricsRequest\x12%\n\x04lldp\x18\t \x01(\x0b\x32\x17.otg.LldpMetricsRequest\x12%\n\x04rsvp\x18\n \x01(\x0b\x32\x17.otg.RsvpMetricsRequest\x12\x36\n\rdhcpv4_client\x18\x0b \x01(\x0b\x32\x1f.otg.Dhcpv4ClientMetricsRequest\x12\x36\n\rdhcpv4_server\x18\x0c \x01(\x0b\x32\x1f.otg.Dhcpv4ServerMetricsRequest\x12\x36\n\rdhcpv6_client\x18\r \x01(\x0b\x32\x1f.otg.Dhcpv6ClientMetricsRequest\x12\x36\n\rdhcpv6_server\x18\x0e \x01(\x0b\x32\x1f.otg.Dhcpv6ServerMetricsRequest\x12)\n\x06ospfv2\x18\x0f \x01(\x0b\x32\x19.otg.Ospfv2MetricsRequest\x1a\xd5\x01\n\x06\x43hoice\"\xca\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04port\x10\x01\x12\x08\n\x04\x66low\x10\x02\x12\t\n\x05\x62gpv4\x10\x03\x12\t\n\x05\x62gpv6\x10\x04\x12\x08\n\x04isis\x10\x05\x12\x07\n\x03lag\x10\x06\x12\x08\n\x04lacp\x10\x07\x12\x08\n\x04lldp\x10\x08\x12\x08\n\x04rsvp\x10\t\x12\x11\n\rdhcpv4_client\x10\n\x12\x11\n\rdhcpv4_server\x10\x0b\x12\x11\n\rdhcpv6_client\x10\x0c\x12\x11\n\rdhcpv6_server\x10\r\x12\n\n\x06ospfv2\x10\x0e\x42\t\n\x07_choice\"\xe3\x07\n\x0fMetricsResponse\x12\x35\n\x06\x63hoice\x18\x01 \x01(\x0e\x32 .otg.MetricsResponse.Choice.EnumH\x00\x88\x01\x01\x12%\n\x0cport_metrics\x18\x02 \x03(\x0b\x32\x0f.otg.PortMetric\x12%\n\x0c\x66low_metrics\x18\x03 \x03(\x0b\x32\x0f.otg.FlowMetric\x12\'\n\rbgpv4_metrics\x18\x04 \x03(\x0b\x32\x10.otg.Bgpv4Metric\x12\'\n\rbgpv6_metrics\x18\x05 \x03(\x0b\x32\x10.otg.Bgpv6Metric\x12%\n\x0cisis_metrics\x18\x06 \x03(\x0b\x32\x0f.otg.IsisMetric\x12#\n\x0blag_metrics\x18\x07 \x03(\x0b\x32\x0e.otg.LagMetric\x12%\n\x0clacp_metrics\x18\x08 \x03(\x0b\x32\x0f.otg.LacpMetric\x12%\n\x0clldp_metrics\x18\t \x03(\x0b\x32\x0f.otg.LldpMetric\x12%\n\x0crsvp_metrics\x18\n \x03(\x0b\x32\x0f.otg.RsvpMetric\x12\x35\n\x14\x64hcpv4client_metrics\x18\x0b \x03(\x0b\x32\x17.otg.Dhcpv4ClientMetric\x12\x35\n\x14\x64hcpv4server_metrics\x18\x0c \x03(\x0b\x32\x17.otg.Dhcpv4ServerMetric\x12\x35\n\x14\x64hcpv6client_metrics\x18\r \x03(\x0b\x32\x17.otg.Dhcpv6ClientMetric\x12\x35\n\x14\x64hcpv6server_metrics\x18\x0e \x03(\x0b\x32\x17.otg.Dhcpv6ServerMetric\x12)\n\x0eospfv2_metrics\x18\x0f \x03(\x0b\x32\x11.otg.Ospfv2Metric\x1a\xa5\x02\n\x06\x43hoice\"\x9a\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0c\x66low_metrics\x10\x01\x12\x10\n\x0cport_metrics\x10\x02\x12\x11\n\rbgpv4_metrics\x10\x03\x12\x11\n\rbgpv6_metrics\x10\x04\x12\x10\n\x0cisis_metrics\x10\x05\x12\x0f\n\x0blag_metrics\x10\x06\x12\x10\n\x0clacp_metrics\x10\x07\x12\x10\n\x0clldp_metrics\x10\x08\x12\x10\n\x0crsvp_metrics\x10\t\x12\x11\n\rdhcpv4_client\x10\n\x12\x11\n\rdhcpv4_server\x10\x0b\x12\x11\n\rdhcpv6_client\x10\x0c\x12\x11\n\rdhcpv6_server\x10\r\x12\x12\n\x0eospfv2_metrics\x10\x0e\x42\t\n\x07_choice\"\xcd\x02\n\x12PortMetricsRequest\x12\x12\n\nport_names\x18\x01 \x03(\t\x12>\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32(.otg.PortMetricsRequest.ColumnNames.Enum\x1a\xe2\x01\n\x0b\x43olumnNames\"\xd2\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08transmit\x10\x01\x12\x0c\n\x08location\x10\x02\x12\x08\n\x04link\x10\x03\x12\x0b\n\x07\x63\x61pture\x10\x04\x12\r\n\tframes_tx\x10\x05\x12\r\n\tframes_rx\x10\x06\x12\x0c\n\x08\x62ytes_tx\x10\x07\x12\x0c\n\x08\x62ytes_rx\x10\x08\x12\x12\n\x0e\x66rames_tx_rate\x10\t\x12\x12\n\x0e\x66rames_rx_rate\x10\n\x12\x11\n\rbytes_tx_rate\x10\x0b\x12\x11\n\rbytes_rx_rate\x10\x0c\"\x86\x06\n\nPortMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08location\x18\x02 \x01(\tH\x01\x88\x01\x01\x12,\n\x04link\x18\x03 \x01(\x0e\x32\x19.otg.PortMetric.Link.EnumH\x02\x88\x01\x01\x12\x32\n\x07\x63\x61pture\x18\x04 \x01(\x0e\x32\x1c.otg.PortMetric.Capture.EnumH\x03\x88\x01\x01\x12\x16\n\tframes_tx\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x16\n\tframes_rx\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x15\n\x08\x62ytes_tx\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x15\n\x08\x62ytes_rx\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x1b\n\x0e\x66rames_tx_rate\x18\t \x01(\x02H\x08\x88\x01\x01\x12\x1b\n\x0e\x66rames_rx_rate\x18\n \x01(\x02H\t\x88\x01\x01\x12\x1a\n\rbytes_tx_rate\x18\x0b \x01(\x02H\n\x88\x01\x01\x12\x1a\n\rbytes_rx_rate\x18\x0c \x01(\x02H\x0b\x88\x01\x01\x12\x34\n\x08transmit\x18\r \x01(\x0e\x32\x1d.otg.PortMetric.Transmit.EnumH\x0c\x88\x01\x01\x1a\x31\n\x04Link\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x1a<\n\x07\x43\x61pture\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07started\x10\x01\x12\x0b\n\x07stopped\x10\x02\x1a=\n\x08Transmit\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07started\x10\x01\x12\x0b\n\x07stopped\x10\x02\x42\x07\n\x05_nameB\x0b\n\t_locationB\x07\n\x05_linkB\n\n\x08_captureB\x0c\n\n_frames_txB\x0c\n\n_frames_rxB\x0b\n\t_bytes_txB\x0b\n\t_bytes_rxB\x11\n\x0f_frames_tx_rateB\x11\n\x0f_frames_rx_rateB\x10\n\x0e_bytes_tx_rateB\x10\n\x0e_bytes_rx_rateB\x0b\n\t_transmit\"\xb8\x02\n\x12\x46lowMetricsRequest\x12\x12\n\nflow_names\x18\x01 \x03(\t\x12>\n\x0cmetric_names\x18\x03 \x03(\x0e\x32(.otg.FlowMetricsRequest.MetricNames.Enum\x12\x34\n\x0etagged_metrics\x18\x04 \x01(\x0b\x32\x1c.otg.FlowTaggedMetricsFilter\x1a\x97\x01\n\x0bMetricNames\"\x87\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08transmit\x10\x01\x12\r\n\tframes_tx\x10\x02\x12\r\n\tframes_rx\x10\x03\x12\x0c\n\x08\x62ytes_tx\x10\x04\x12\x0c\n\x08\x62ytes_rx\x10\x05\x12\x12\n\x0e\x66rames_tx_rate\x10\x06\x12\x12\n\x0e\x66rames_rx_rate\x10\x07\"\xf4\x02\n\x17\x46lowTaggedMetricsFilter\x12\x14\n\x07include\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x15include_empty_metrics\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x43\n\x0cmetric_names\x18\x03 \x03(\x0e\x32-.otg.FlowTaggedMetricsFilter.MetricNames.Enum\x12)\n\x07\x66ilters\x18\x04 \x03(\x0b\x32\x18.otg.FlowMetricTagFilter\x1a\x88\x01\n\x0bMetricNames\"y\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tframes_tx\x10\x01\x12\r\n\tframes_rx\x10\x02\x12\x0c\n\x08\x62ytes_tx\x10\x03\x12\x0c\n\x08\x62ytes_rx\x10\x04\x12\x12\n\x0e\x66rames_tx_rate\x10\x05\x12\x12\n\x0e\x66rames_rx_rate\x10\x06\x42\n\n\x08_includeB\x18\n\x16_include_empty_metrics\"A\n\x13\x46lowMetricTagFilter\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0e\n\x06values\x18\x02 \x03(\tB\x07\n\x05_name\"\x88\x05\n\nFlowMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07port_tx\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07port_rx\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x34\n\x08transmit\x18\x05 \x01(\x0e\x32\x1d.otg.FlowMetric.Transmit.EnumH\x03\x88\x01\x01\x12\x16\n\tframes_tx\x18\x06 \x01(\x04H\x04\x88\x01\x01\x12\x16\n\tframes_rx\x18\x07 \x01(\x04H\x05\x88\x01\x01\x12\x15\n\x08\x62ytes_tx\x18\x08 \x01(\x04H\x06\x88\x01\x01\x12\x15\n\x08\x62ytes_rx\x18\t \x01(\x04H\x07\x88\x01\x01\x12\x1b\n\x0e\x66rames_tx_rate\x18\n \x01(\x02H\x08\x88\x01\x01\x12\x1b\n\x0e\x66rames_rx_rate\x18\x0b \x01(\x02H\t\x88\x01\x01\x12\x11\n\x04loss\x18\x0c \x01(\x02H\n\x88\x01\x01\x12(\n\ntimestamps\x18\r \x01(\x0b\x32\x14.otg.MetricTimestamp\x12#\n\x07latency\x18\x0e \x01(\x0b\x32\x12.otg.MetricLatency\x12-\n\x0etagged_metrics\x18\x0f \x03(\x0b\x32\x15.otg.FlowTaggedMetric\x1aI\n\x08Transmit\"=\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07started\x10\x01\x12\x0b\n\x07stopped\x10\x02\x12\n\n\x06paused\x10\x03\x42\x07\n\x05_nameB\n\n\x08_port_txB\n\n\x08_port_rxB\x0b\n\t_transmitB\x0c\n\n_frames_txB\x0c\n\n_frames_rxB\x0b\n\t_bytes_txB\x0b\n\t_bytes_rxB\x11\n\x0f_frames_tx_rateB\x11\n\x0f_frames_rx_rateB\x07\n\x05_loss\"\x93\x03\n\x10\x46lowTaggedMetric\x12 \n\x04tags\x18\x01 \x03(\x0b\x32\x12.otg.FlowMetricTag\x12\x16\n\tframes_tx\x18\x02 \x01(\x04H\x00\x88\x01\x01\x12\x16\n\tframes_rx\x18\x03 \x01(\x04H\x01\x88\x01\x01\x12\x15\n\x08\x62ytes_tx\x18\x04 \x01(\x04H\x02\x88\x01\x01\x12\x15\n\x08\x62ytes_rx\x18\x05 \x01(\x04H\x03\x88\x01\x01\x12\x1b\n\x0e\x66rames_tx_rate\x18\x06 \x01(\x02H\x04\x88\x01\x01\x12\x1b\n\x0e\x66rames_rx_rate\x18\x07 \x01(\x02H\x05\x88\x01\x01\x12\x11\n\x04loss\x18\x08 \x01(\x02H\x06\x88\x01\x01\x12(\n\ntimestamps\x18\t \x01(\x0b\x32\x14.otg.MetricTimestamp\x12#\n\x07latency\x18\n \x01(\x0b\x32\x12.otg.MetricLatencyB\x0c\n\n_frames_txB\x0c\n\n_frames_rxB\x0b\n\t_bytes_txB\x0b\n\t_bytes_rxB\x11\n\x0f_frames_tx_rateB\x11\n\x0f_frames_rx_rateB\x07\n\x05_loss\"S\n\rFlowMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.otg.FlowMetricTagValueB\x07\n\x05_name\"\xc2\x01\n\x12\x46lowMetricTagValue\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.FlowMetricTagValue.Choice.EnumH\x00\x88\x01\x01\x12\x10\n\x03hex\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x03str\x18\x03 \x01(\tH\x02\x88\x01\x01\x1a\x33\n\x06\x43hoice\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03hex\x10\x01\x12\x07\n\x03str\x10\x02\x42\t\n\x07_choiceB\x06\n\x04_hexB\x06\n\x04_str\"\x7f\n\x0fMetricTimestamp\x12\x1f\n\x12\x66irst_timestamp_ns\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12\x1e\n\x11last_timestamp_ns\x18\x02 \x01(\x01H\x01\x88\x01\x01\x42\x15\n\x13_first_timestamp_nsB\x14\n\x12_last_timestamp_ns\"\x87\x01\n\rMetricLatency\x12\x17\n\nminimum_ns\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12\x17\n\nmaximum_ns\x18\x02 \x01(\x01H\x01\x88\x01\x01\x12\x17\n\naverage_ns\x18\x03 \x01(\x01H\x02\x88\x01\x01\x42\r\n\x0b_minimum_nsB\r\n\x0b_maximum_nsB\r\n\x0b_average_ns\"\xf9\x03\n\x13\x42gpv4MetricsRequest\x12\x12\n\npeer_names\x18\x01 \x03(\t\x12?\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32).otg.Bgpv4MetricsRequest.ColumnNames.Enum\x1a\x8c\x03\n\x0b\x43olumnNames\"\xfc\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rsession_state\x10\x01\x12\x16\n\x12session_flap_count\x10\x02\x12\x15\n\x11routes_advertised\x10\x03\x12\x13\n\x0froutes_received\x10\x04\x12\x18\n\x14route_withdraws_sent\x10\x05\x12\x1c\n\x18route_withdraws_received\x10\x06\x12\x10\n\x0cupdates_sent\x10\x07\x12\x14\n\x10updates_received\x10\x08\x12\x0e\n\nopens_sent\x10\t\x12\x12\n\x0eopens_received\x10\n\x12\x13\n\x0fkeepalives_sent\x10\x0b\x12\x17\n\x13keepalives_received\x10\x0c\x12\x16\n\x12notifications_sent\x10\r\x12\x1a\n\x16notifications_received\x10\x0e\x12\r\n\tfsm_state\x10\x0f\x12\x17\n\x13\x65nd_of_rib_received\x10\x10\"\xea\x08\n\x0b\x42gpv4Metric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12>\n\rsession_state\x18\x02 \x01(\x0e\x32\".otg.Bgpv4Metric.SessionState.EnumH\x01\x88\x01\x01\x12\x1f\n\x12session_flap_count\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x1e\n\x11routes_advertised\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1c\n\x0froutes_received\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12!\n\x14route_withdraws_sent\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12%\n\x18route_withdraws_received\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x19\n\x0cupdates_sent\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x1d\n\x10updates_received\x18\t \x01(\x04H\x08\x88\x01\x01\x12\x17\n\nopens_sent\x18\n \x01(\x04H\t\x88\x01\x01\x12\x1b\n\x0eopens_received\x18\x0b \x01(\x04H\n\x88\x01\x01\x12\x1c\n\x0fkeepalives_sent\x18\x0c \x01(\x04H\x0b\x88\x01\x01\x12 \n\x13keepalives_received\x18\r \x01(\x04H\x0c\x88\x01\x01\x12\x1f\n\x12notifications_sent\x18\x0e \x01(\x04H\r\x88\x01\x01\x12#\n\x16notifications_received\x18\x0f \x01(\x04H\x0e\x88\x01\x01\x12\x36\n\tfsm_state\x18\x10 \x01(\x0e\x32\x1e.otg.Bgpv4Metric.FsmState.EnumH\x0f\x88\x01\x01\x12 \n\x13\x65nd_of_rib_received\x18\x11 \x01(\x04H\x10\x88\x01\x01\x1a\x39\n\x0cSessionState\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x1av\n\x08\x46smState\"j\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04idle\x10\x01\x12\x0b\n\x07\x63onnect\x10\x02\x12\n\n\x06\x61\x63tive\x10\x03\x12\x0c\n\x08opensent\x10\x04\x12\x0f\n\x0bopenconfirm\x10\x05\x12\x0f\n\x0b\x65stablished\x10\x06\x42\x07\n\x05_nameB\x10\n\x0e_session_stateB\x15\n\x13_session_flap_countB\x14\n\x12_routes_advertisedB\x12\n\x10_routes_receivedB\x17\n\x15_route_withdraws_sentB\x1b\n\x19_route_withdraws_receivedB\x0f\n\r_updates_sentB\x13\n\x11_updates_receivedB\r\n\x0b_opens_sentB\x11\n\x0f_opens_receivedB\x12\n\x10_keepalives_sentB\x16\n\x14_keepalives_receivedB\x15\n\x13_notifications_sentB\x19\n\x17_notifications_receivedB\x0c\n\n_fsm_stateB\x16\n\x14_end_of_rib_received\"\xf9\x03\n\x13\x42gpv6MetricsRequest\x12\x12\n\npeer_names\x18\x01 \x03(\t\x12?\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32).otg.Bgpv6MetricsRequest.ColumnNames.Enum\x1a\x8c\x03\n\x0b\x43olumnNames\"\xfc\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rsession_state\x10\x01\x12\x16\n\x12session_flap_count\x10\x02\x12\x15\n\x11routes_advertised\x10\x03\x12\x13\n\x0froutes_received\x10\x04\x12\x18\n\x14route_withdraws_sent\x10\x05\x12\x1c\n\x18route_withdraws_received\x10\x06\x12\x10\n\x0cupdates_sent\x10\x07\x12\x14\n\x10updates_received\x10\x08\x12\x0e\n\nopens_sent\x10\t\x12\x12\n\x0eopens_received\x10\n\x12\x13\n\x0fkeepalives_sent\x10\x0b\x12\x17\n\x13keepalives_received\x10\x0c\x12\x16\n\x12notifications_sent\x10\r\x12\x1a\n\x16notifications_received\x10\x0e\x12\r\n\tfsm_state\x10\x0f\x12\x17\n\x13\x65nd_of_rib_received\x10\x10\"\xea\x08\n\x0b\x42gpv6Metric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12>\n\rsession_state\x18\x02 \x01(\x0e\x32\".otg.Bgpv6Metric.SessionState.EnumH\x01\x88\x01\x01\x12\x1f\n\x12session_flap_count\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x1e\n\x11routes_advertised\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1c\n\x0froutes_received\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12!\n\x14route_withdraws_sent\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12%\n\x18route_withdraws_received\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x19\n\x0cupdates_sent\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x1d\n\x10updates_received\x18\t \x01(\x04H\x08\x88\x01\x01\x12\x17\n\nopens_sent\x18\n \x01(\x04H\t\x88\x01\x01\x12\x1b\n\x0eopens_received\x18\x0b \x01(\x04H\n\x88\x01\x01\x12\x1c\n\x0fkeepalives_sent\x18\x0c \x01(\x04H\x0b\x88\x01\x01\x12 \n\x13keepalives_received\x18\r \x01(\x04H\x0c\x88\x01\x01\x12\x1f\n\x12notifications_sent\x18\x0e \x01(\x04H\r\x88\x01\x01\x12#\n\x16notifications_received\x18\x0f \x01(\x04H\x0e\x88\x01\x01\x12\x36\n\tfsm_state\x18\x10 \x01(\x0e\x32\x1e.otg.Bgpv6Metric.FsmState.EnumH\x0f\x88\x01\x01\x12 \n\x13\x65nd_of_rib_received\x18\x11 \x01(\x04H\x10\x88\x01\x01\x1a\x39\n\x0cSessionState\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x1av\n\x08\x46smState\"j\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04idle\x10\x01\x12\x0b\n\x07\x63onnect\x10\x02\x12\n\n\x06\x61\x63tive\x10\x03\x12\x0c\n\x08opensent\x10\x04\x12\x0f\n\x0bopenconfirm\x10\x05\x12\x0f\n\x0b\x65stablished\x10\x06\x42\x07\n\x05_nameB\x10\n\x0e_session_stateB\x15\n\x13_session_flap_countB\x14\n\x12_routes_advertisedB\x12\n\x10_routes_receivedB\x17\n\x15_route_withdraws_sentB\x1b\n\x19_route_withdraws_receivedB\x0f\n\r_updates_sentB\x13\n\x11_updates_receivedB\r\n\x0b_opens_sentB\x11\n\x0f_opens_receivedB\x12\n\x10_keepalives_sentB\x16\n\x14_keepalives_receivedB\x15\n\x13_notifications_sentB\x19\n\x17_notifications_receivedB\x0c\n\n_fsm_stateB\x16\n\x14_end_of_rib_received\"\x92\x06\n\x12IsisMetricsRequest\x12\x14\n\x0crouter_names\x18\x01 \x03(\t\x12>\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32(.otg.IsisMetricsRequest.ColumnNames.Enum\x1a\xa5\x05\n\x0b\x43olumnNames\"\x95\x05\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x12\n\x0el1_sessions_up\x10\x01\x12\x13\n\x0fl1_session_flap\x10\x02\x12\x14\n\x10l1_database_size\x10\x03\x12\x1c\n\x18l1_broadcast_hellos_sent\x10\x04\x12 \n\x1cl1_broadcast_hellos_received\x10\x05\x12!\n\x1dl1_point_to_point_hellos_sent\x10\x06\x12%\n!l1_point_to_point_hellos_received\x10\x07\x12\x10\n\x0cl1_psnp_sent\x10\x08\x12\x14\n\x10l1_psnp_received\x10\t\x12\x10\n\x0cl1_csnp_sent\x10\n\x12\x14\n\x10l1_csnp_received\x10\x0b\x12\x0f\n\x0bl1_lsp_sent\x10\x0c\x12\x13\n\x0fl1_lsp_received\x10\r\x12\x12\n\x0el2_sessions_up\x10\x0e\x12\x13\n\x0fl2_session_flap\x10\x0f\x12\x14\n\x10l2_database_size\x10\x10\x12\x1c\n\x18l2_broadcast_hellos_sent\x10\x11\x12 \n\x1cl2_broadcast_hellos_received\x10\x12\x12!\n\x1dl2_point_to_point_hellos_sent\x10\x13\x12%\n!l2_point_to_point_hellos_received\x10\x14\x12\x10\n\x0cl2_psnp_sent\x10\x15\x12\x14\n\x10l2_psnp_received\x10\x16\x12\x10\n\x0cl2_csnp_sent\x10\x17\x12\x14\n\x10l2_csnp_received\x10\x18\x12\x0f\n\x0bl2_lsp_sent\x10\x19\x12\x13\n\x0fl2_lsp_received\x10\x1a\"\xf4\x0b\n\nIsisMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0el1_sessions_up\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1c\n\x0fl1_session_flap\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12%\n\x18l1_broadcast_hellos_sent\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12)\n\x1cl1_broadcast_hellos_received\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12*\n\x1dl1_point_to_point_hellos_sent\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12.\n!l1_point_to_point_hellos_received\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x1d\n\x10l1_database_size\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x19\n\x0cl1_psnp_sent\x18\t \x01(\x04H\x08\x88\x01\x01\x12\x1d\n\x10l1_psnp_received\x18\n \x01(\x04H\t\x88\x01\x01\x12\x19\n\x0cl1_csnp_sent\x18\x0b \x01(\x04H\n\x88\x01\x01\x12\x1d\n\x10l1_csnp_received\x18\x0c \x01(\x04H\x0b\x88\x01\x01\x12\x18\n\x0bl1_lsp_sent\x18\r \x01(\x04H\x0c\x88\x01\x01\x12\x1c\n\x0fl1_lsp_received\x18\x0e \x01(\x04H\r\x88\x01\x01\x12\x1b\n\x0el2_sessions_up\x18\x0f \x01(\rH\x0e\x88\x01\x01\x12\x1c\n\x0fl2_session_flap\x18\x10 \x01(\x04H\x0f\x88\x01\x01\x12%\n\x18l2_broadcast_hellos_sent\x18\x11 \x01(\x04H\x10\x88\x01\x01\x12)\n\x1cl2_broadcast_hellos_received\x18\x12 \x01(\x04H\x11\x88\x01\x01\x12*\n\x1dl2_point_to_point_hellos_sent\x18\x13 \x01(\x04H\x12\x88\x01\x01\x12.\n!l2_point_to_point_hellos_received\x18\x14 \x01(\x04H\x13\x88\x01\x01\x12\x1d\n\x10l2_database_size\x18\x15 \x01(\x04H\x14\x88\x01\x01\x12\x19\n\x0cl2_psnp_sent\x18\x16 \x01(\x04H\x15\x88\x01\x01\x12\x1d\n\x10l2_psnp_received\x18\x17 \x01(\x04H\x16\x88\x01\x01\x12\x19\n\x0cl2_csnp_sent\x18\x18 \x01(\x04H\x17\x88\x01\x01\x12\x1d\n\x10l2_csnp_received\x18\x19 \x01(\x04H\x18\x88\x01\x01\x12\x18\n\x0bl2_lsp_sent\x18\x1a \x01(\x04H\x19\x88\x01\x01\x12\x1c\n\x0fl2_lsp_received\x18\x1b \x01(\x04H\x1a\x88\x01\x01\x42\x07\n\x05_nameB\x11\n\x0f_l1_sessions_upB\x12\n\x10_l1_session_flapB\x1b\n\x19_l1_broadcast_hellos_sentB\x1f\n\x1d_l1_broadcast_hellos_receivedB \n\x1e_l1_point_to_point_hellos_sentB$\n\"_l1_point_to_point_hellos_receivedB\x13\n\x11_l1_database_sizeB\x0f\n\r_l1_psnp_sentB\x13\n\x11_l1_psnp_receivedB\x0f\n\r_l1_csnp_sentB\x13\n\x11_l1_csnp_receivedB\x0e\n\x0c_l1_lsp_sentB\x12\n\x10_l1_lsp_receivedB\x11\n\x0f_l2_sessions_upB\x12\n\x10_l2_session_flapB\x1b\n\x19_l2_broadcast_hellos_sentB\x1f\n\x1d_l2_broadcast_hellos_receivedB \n\x1e_l2_point_to_point_hellos_sentB$\n\"_l2_point_to_point_hellos_receivedB\x13\n\x11_l2_database_sizeB\x0f\n\r_l2_psnp_sentB\x13\n\x11_l2_psnp_receivedB\x0f\n\r_l2_csnp_sentB\x13\n\x11_l2_csnp_receivedB\x0e\n\x0c_l2_lsp_sentB\x12\n\x10_l2_lsp_received\"\xbd\x02\n\x11LagMetricsRequest\x12\x11\n\tlag_names\x18\x01 \x03(\t\x12=\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32\'.otg.LagMetricsRequest.ColumnNames.Enum\x1a\xd5\x01\n\x0b\x43olumnNames\"\xc5\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0f\n\x0boper_status\x10\x01\x12\x13\n\x0fmember_ports_up\x10\x02\x12\r\n\tframes_tx\x10\x03\x12\r\n\tframes_rx\x10\x04\x12\x0c\n\x08\x62ytes_tx\x10\x05\x12\x0c\n\x08\x62ytes_rx\x10\x06\x12\x12\n\x0e\x66rames_tx_rate\x10\x07\x12\x12\n\x0e\x66rames_rx_rate\x10\x08\x12\x11\n\rbytes_tx_rate\x10\t\x12\x11\n\rbytes_rx_rate\x10\n\"\xac\x04\n\tLagMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x38\n\x0boper_status\x18\x02 \x01(\x0e\x32\x1e.otg.LagMetric.OperStatus.EnumH\x01\x88\x01\x01\x12\x1c\n\x0fmember_ports_up\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x16\n\tframes_tx\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x16\n\tframes_rx\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x15\n\x08\x62ytes_tx\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x15\n\x08\x62ytes_rx\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x1b\n\x0e\x66rames_tx_rate\x18\x08 \x01(\x02H\x07\x88\x01\x01\x12\x1b\n\x0e\x66rames_rx_rate\x18\t \x01(\x02H\x08\x88\x01\x01\x12\x1a\n\rbytes_tx_rate\x18\n \x01(\x02H\t\x88\x01\x01\x12\x1a\n\rbytes_rx_rate\x18\x0b \x01(\x02H\n\x88\x01\x01\x1a\x37\n\nOperStatus\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x07\n\x05_nameB\x0e\n\x0c_oper_statusB\x12\n\x10_member_ports_upB\x0c\n\n_frames_txB\x0c\n\n_frames_rxB\x0b\n\t_bytes_txB\x0b\n\t_bytes_rxB\x11\n\x0f_frames_tx_rateB\x11\n\x0f_frames_rx_rateB\x10\n\x0e_bytes_tx_rateB\x10\n\x0e_bytes_rx_rate\"\xb4\x03\n\x12LacpMetricsRequest\x12\x11\n\tlag_names\x18\x01 \x03(\t\x12\x1d\n\x15lag_member_port_names\x18\x02 \x03(\t\x12>\n\x0c\x63olumn_names\x18\x03 \x03(\x0e\x32(.otg.LacpMetricsRequest.ColumnNames.Enum\x1a\xab\x02\n\x0b\x43olumnNames\"\x9b\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x13\n\x0flacp_packets_rx\x10\x01\x12\x13\n\x0flacp_packets_tx\x10\x02\x12\x12\n\x0elacp_rx_errors\x10\x03\x12\x0c\n\x08\x61\x63tivity\x10\x04\x12\x0b\n\x07timeout\x10\x05\x12\x13\n\x0fsynchronization\x10\x06\x12\x10\n\x0c\x61ggregatable\x10\x07\x12\x0e\n\ncollecting\x10\x08\x12\x10\n\x0c\x64istributing\x10\t\x12\r\n\tsystem_id\x10\n\x12\x0c\n\x08oper_key\x10\x0b\x12\x0e\n\npartner_id\x10\x0c\x12\x0f\n\x0bpartner_key\x10\r\x12\x0c\n\x08port_num\x10\x0e\x12\x14\n\x10partner_port_num\x10\x0f\"\x8d\x08\n\nLacpMetric\x12\x15\n\x08lag_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x14lag_member_port_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0flacp_packets_rx\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x1c\n\x0flacp_packets_tx\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1b\n\x0elacp_rx_errors\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x34\n\x08\x61\x63tivity\x18\x06 \x01(\x0e\x32\x1d.otg.LacpMetric.Activity.EnumH\x05\x88\x01\x01\x12\x32\n\x07timeout\x18\x07 \x01(\x0e\x32\x1c.otg.LacpMetric.Timeout.EnumH\x06\x88\x01\x01\x12\x42\n\x0fsynchronization\x18\x08 \x01(\x0e\x32$.otg.LacpMetric.Synchronization.EnumH\x07\x88\x01\x01\x12\x19\n\x0c\x61ggregatable\x18\t \x01(\x08H\x08\x88\x01\x01\x12\x17\n\ncollecting\x18\n \x01(\x08H\t\x88\x01\x01\x12\x19\n\x0c\x64istributing\x18\x0b \x01(\x08H\n\x88\x01\x01\x12\x16\n\tsystem_id\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x15\n\x08oper_key\x18\r \x01(\rH\x0c\x88\x01\x01\x12\x17\n\npartner_id\x18\x0e \x01(\tH\r\x88\x01\x01\x12\x18\n\x0bpartner_key\x18\x0f \x01(\rH\x0e\x88\x01\x01\x12\x15\n\x08port_num\x18\x10 \x01(\rH\x0f\x88\x01\x01\x12\x1d\n\x10partner_port_num\x18\x11 \x01(\rH\x10\x88\x01\x01\x1a<\n\x08\x41\x63tivity\"0\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x61\x63tive\x10\x01\x12\x0b\n\x07passive\x10\x02\x1a\x37\n\x07Timeout\",\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05short\x10\x01\x12\x08\n\x04long\x10\x02\x1a\x45\n\x0fSynchronization\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07in_sync\x10\x01\x12\x0c\n\x08out_sync\x10\x02\x42\x0b\n\t_lag_nameB\x17\n\x15_lag_member_port_nameB\x12\n\x10_lacp_packets_rxB\x12\n\x10_lacp_packets_txB\x11\n\x0f_lacp_rx_errorsB\x0b\n\t_activityB\n\n\x08_timeoutB\x12\n\x10_synchronizationB\x0f\n\r_aggregatableB\r\n\x0b_collectingB\x0f\n\r_distributingB\x0c\n\n_system_idB\x0b\n\t_oper_keyB\r\n\x0b_partner_idB\x0e\n\x0c_partner_keyB\x0b\n\t_port_numB\x13\n\x11_partner_port_num\"\xfd\x01\n\x12LldpMetricsRequest\x12\x12\n\nlldp_names\x18\x01 \x03(\t\x12>\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32(.otg.LldpMetricsRequest.ColumnNames.Enum\x1a\x92\x01\n\x0b\x43olumnNames\"\x82\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tframes_rx\x10\x01\x12\r\n\tframes_tx\x10\x02\x12\x13\n\x0f\x66rames_error_rx\x10\x03\x12\x12\n\x0e\x66rames_discard\x10\x04\x12\x10\n\x0ctlvs_discard\x10\x05\x12\x10\n\x0ctlvs_unknown\x10\x06\"\xae\x02\n\nLldpMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tframes_rx\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x16\n\tframes_tx\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x1c\n\x0f\x66rames_error_rx\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1b\n\x0e\x66rames_discard\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x19\n\x0ctlvs_discard\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x19\n\x0ctlvs_unknown\x18\x07 \x01(\x04H\x06\x88\x01\x01\x42\x07\n\x05_nameB\x0c\n\n_frames_rxB\x0c\n\n_frames_txB\x12\n\x10_frames_error_rxB\x11\n\x0f_frames_discardB\x0f\n\r_tlvs_discardB\x0f\n\r_tlvs_unknown\"\xc2\x05\n\x12RsvpMetricsRequest\x12\x14\n\x0crouter_names\x18\x01 \x03(\t\x12>\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32(.otg.RsvpMetricsRequest.ColumnNames.Enum\x1a\xd5\x04\n\x0b\x43olumnNames\"\xc5\x04\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1f\n\x1bingress_p2p_lsps_configured\x10\x01\x12\x17\n\x13ingress_p2p_lsps_up\x10\x02\x12\x16\n\x12\x65gress_p2p_lsps_up\x10\x03\x12\x12\n\x0elsp_flap_count\x10\x04\x12\x0c\n\x08paths_tx\x10\x05\x12\x0c\n\x08paths_rx\x10\x06\x12\x0c\n\x08resvs_tx\x10\x07\x12\x0c\n\x08resvs_rx\x10\x08\x12\x11\n\rpath_tears_tx\x10\t\x12\x11\n\rpath_tears_rx\x10\n\x12\x11\n\rresv_tears_tx\x10\x0b\x12\x11\n\rresv_tears_rx\x10\x0c\x12\x12\n\x0epath_errors_tx\x10\r\x12\x12\n\x0epath_errors_rx\x10\x0e\x12\x12\n\x0eresv_errors_tx\x10\x0f\x12\x12\n\x0eresv_errors_rx\x10\x10\x12\x10\n\x0cresv_conf_tx\x10\x11\x12\x10\n\x0cresv_conf_rx\x10\x12\x12\r\n\thellos_tx\x10\x13\x12\r\n\thellos_rx\x10\x14\x12\x0b\n\x07\x61\x63ks_tx\x10\x15\x12\x0b\n\x07\x61\x63ks_rx\x10\x16\x12\x0c\n\x08nacks_tx\x10\x17\x12\x0c\n\x08nacks_rx\x10\x18\x12\x0f\n\x0bsrefresh_tx\x10\x19\x12\x0f\n\x0bsrefresh_rx\x10\x1a\x12\r\n\tbundle_tx\x10\x1b\x12\r\n\tbundle_rx\x10\x1c\x12 \n\x1cpath_reevaluation_request_tx\x10\x1d\x12\x18\n\x14path_reoptimizations\x10\x1e\"\xf4\n\n\nRsvpMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12(\n\x1bingress_p2p_lsps_configured\x18\x02 \x01(\rH\x01\x88\x01\x01\x12 \n\x13ingress_p2p_lsps_up\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x1f\n\x12\x65gress_p2p_lsps_up\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1b\n\x0elsp_flap_count\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x15\n\x08paths_tx\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x15\n\x08paths_rx\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x15\n\x08resvs_tx\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x15\n\x08resvs_rx\x18\t \x01(\x04H\x08\x88\x01\x01\x12\x1a\n\rpath_tears_tx\x18\n \x01(\x04H\t\x88\x01\x01\x12\x1a\n\rpath_tears_rx\x18\x0b \x01(\x04H\n\x88\x01\x01\x12\x1a\n\rresv_tears_tx\x18\x0c \x01(\x04H\x0b\x88\x01\x01\x12\x1a\n\rresv_tears_rx\x18\r \x01(\x04H\x0c\x88\x01\x01\x12\x1b\n\x0epath_errors_tx\x18\x0e \x01(\x04H\r\x88\x01\x01\x12\x1b\n\x0epath_errors_rx\x18\x0f \x01(\x04H\x0e\x88\x01\x01\x12\x1b\n\x0eresv_errors_tx\x18\x10 \x01(\x04H\x0f\x88\x01\x01\x12\x1b\n\x0eresv_errors_rx\x18\x11 \x01(\x04H\x10\x88\x01\x01\x12\x19\n\x0cresv_conf_tx\x18\x12 \x01(\x04H\x11\x88\x01\x01\x12\x19\n\x0cresv_conf_rx\x18\x13 \x01(\x04H\x12\x88\x01\x01\x12\x16\n\thellos_tx\x18\x14 \x01(\x04H\x13\x88\x01\x01\x12\x16\n\thellos_rx\x18\x15 \x01(\x04H\x14\x88\x01\x01\x12\x14\n\x07\x61\x63ks_tx\x18\x16 \x01(\x04H\x15\x88\x01\x01\x12\x14\n\x07\x61\x63ks_rx\x18\x17 \x01(\x04H\x16\x88\x01\x01\x12\x15\n\x08nacks_tx\x18\x18 \x01(\x04H\x17\x88\x01\x01\x12\x15\n\x08nacks_rx\x18\x19 \x01(\x04H\x18\x88\x01\x01\x12\x18\n\x0bsrefresh_tx\x18\x1a \x01(\x04H\x19\x88\x01\x01\x12\x18\n\x0bsrefresh_rx\x18\x1b \x01(\x04H\x1a\x88\x01\x01\x12\x16\n\tbundle_tx\x18\x1c \x01(\x04H\x1b\x88\x01\x01\x12\x16\n\tbundle_rx\x18\x1d \x01(\x04H\x1c\x88\x01\x01\x12)\n\x1cpath_reevaluation_request_tx\x18\x1e \x01(\x04H\x1d\x88\x01\x01\x12!\n\x14path_reoptimizations\x18\x1f \x01(\x04H\x1e\x88\x01\x01\x42\x07\n\x05_nameB\x1e\n\x1c_ingress_p2p_lsps_configuredB\x16\n\x14_ingress_p2p_lsps_upB\x15\n\x13_egress_p2p_lsps_upB\x11\n\x0f_lsp_flap_countB\x0b\n\t_paths_txB\x0b\n\t_paths_rxB\x0b\n\t_resvs_txB\x0b\n\t_resvs_rxB\x10\n\x0e_path_tears_txB\x10\n\x0e_path_tears_rxB\x10\n\x0e_resv_tears_txB\x10\n\x0e_resv_tears_rxB\x11\n\x0f_path_errors_txB\x11\n\x0f_path_errors_rxB\x11\n\x0f_resv_errors_txB\x11\n\x0f_resv_errors_rxB\x0f\n\r_resv_conf_txB\x0f\n\r_resv_conf_rxB\x0c\n\n_hellos_txB\x0c\n\n_hellos_rxB\n\n\x08_acks_txB\n\n\x08_acks_rxB\x0b\n\t_nacks_txB\x0b\n\t_nacks_rxB\x0e\n\x0c_srefresh_txB\x0e\n\x0c_srefresh_rxB\x0c\n\n_bundle_txB\x0c\n\n_bundle_rxB\x1f\n\x1d_path_reevaluation_request_txB\x17\n\x15_path_reoptimizations\"\xad\x02\n\x1a\x44hcpv4ClientMetricsRequest\x12\x14\n\x0c\x63lient_names\x18\x01 \x03(\t\x12\x46\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32\x30.otg.Dhcpv4ClientMetricsRequest.ColumnNames.Enum\x1a\xb0\x01\n\x0b\x43olumnNames\"\xa0\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x12\n\x0e\x64iscovers_sent\x10\x01\x12\x13\n\x0foffers_received\x10\x02\x12\x11\n\rrequests_sent\x10\x03\x12\x11\n\racks_received\x10\x04\x12\x12\n\x0enacks_received\x10\x05\x12\x11\n\rreleases_sent\x10\x06\x12\x11\n\rdeclines_sent\x10\x07\"\xfa\x02\n\x12\x44hcpv4ClientMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0e\x64iscovers_sent\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x1c\n\x0foffers_received\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x1a\n\rrequests_sent\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1a\n\racks_received\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x1b\n\x0enacks_received\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x1a\n\rreleases_sent\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x1a\n\rdeclines_sent\x18\x08 \x01(\x04H\x07\x88\x01\x01\x42\x07\n\x05_nameB\x11\n\x0f_discovers_sentB\x12\n\x10_offers_receivedB\x10\n\x0e_requests_sentB\x10\n\x0e_acks_receivedB\x11\n\x0f_nacks_receivedB\x10\n\x0e_releases_sentB\x10\n\x0e_declines_sent\"\xb1\x02\n\x1a\x44hcpv4ServerMetricsRequest\x12\x14\n\x0cserver_names\x18\x01 \x03(\t\x12\x46\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32\x30.otg.Dhcpv4ServerMetricsRequest.ColumnNames.Enum\x1a\xb4\x01\n\x0b\x43olumnNames\"\xa4\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x16\n\x12\x64iscovers_received\x10\x01\x12\x0f\n\x0boffers_sent\x10\x02\x12\x15\n\x11requests_received\x10\x03\x12\r\n\tacks_sent\x10\x04\x12\x0e\n\nnacks_sent\x10\x05\x12\x15\n\x11releases_received\x10\x06\x12\x15\n\x11\x64\x65\x63lines_received\x10\x07\"\x82\x03\n\x12\x44hcpv4ServerMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12\x64iscovers_received\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x18\n\x0boffers_sent\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x1e\n\x11requests_received\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x16\n\tacks_sent\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x17\n\nnacks_sent\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x1e\n\x11releases_received\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x1e\n\x11\x64\x65\x63lines_received\x18\x08 \x01(\x04H\x07\x88\x01\x01\x42\x07\n\x05_nameB\x15\n\x13_discovers_receivedB\x0e\n\x0c_offers_sentB\x14\n\x12_requests_receivedB\x0c\n\n_acks_sentB\r\n\x0b_nacks_sentB\x14\n\x12_releases_receivedB\x14\n\x12_declines_received\"\xe0\x03\n\x1a\x44hcpv6ClientMetricsRequest\x12\x14\n\x0c\x63lient_names\x18\x01 \x03(\t\x12\x46\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32\x30.otg.Dhcpv6ClientMetricsRequest.ColumnNames.Enum\x1a\xe3\x02\n\x0b\x43olumnNames\"\xd3\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rsolicits_sent\x10\x01\x12\x1b\n\x17\x61\x64vertisements_received\x10\x02\x12\x1a\n\x16\x61\x64vertisements_ignored\x10\x03\x12\x11\n\rrequests_sent\x10\x04\x12\x12\n\x0enacks_received\x10\x05\x12\x14\n\x10replies_received\x10\x06\x12\x1d\n\x19information_requests_sent\x10\x07\x12\x0f\n\x0brenews_sent\x10\x08\x12\x10\n\x0crebinds_sent\x10\t\x12\x11\n\rreleases_sent\x10\n\x12\x19\n\x15reconfigures_received\x10\x0b\x12\x1e\n\x1arapid_commit_solicits_sent\x10\x0c\x12!\n\x1drapid_commit_replies_received\x10\r\"\x90\x06\n\x12\x44hcpv6ClientMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rsolicits_sent\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12$\n\x17\x61\x64vertisements_received\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12#\n\x16\x61\x64vertisements_ignored\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1a\n\rrequests_sent\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x1b\n\x0enacks_received\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x1d\n\x10replies_received\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12&\n\x19information_requests_sent\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x18\n\x0brenews_sent\x18\t \x01(\x04H\x08\x88\x01\x01\x12\x19\n\x0crebinds_sent\x18\n \x01(\x04H\t\x88\x01\x01\x12\x1a\n\rreleases_sent\x18\x0b \x01(\x04H\n\x88\x01\x01\x12\"\n\x15reconfigures_received\x18\x0c \x01(\x04H\x0b\x88\x01\x01\x12\'\n\x1arapid_commit_solicits_sent\x18\r \x01(\x04H\x0c\x88\x01\x01\x12*\n\x1drapid_commit_replies_received\x18\x0e \x01(\x04H\r\x88\x01\x01\x42\x07\n\x05_nameB\x10\n\x0e_solicits_sentB\x1a\n\x18_advertisements_receivedB\x19\n\x17_advertisements_ignoredB\x10\n\x0e_requests_sentB\x11\n\x0f_nacks_receivedB\x13\n\x11_replies_receivedB\x1c\n\x1a_information_requests_sentB\x0e\n\x0c_renews_sentB\x0f\n\r_rebinds_sentB\x10\n\x0e_releases_sentB\x18\n\x16_reconfigures_receivedB\x1d\n\x1b_rapid_commit_solicits_sentB \n\x1e_rapid_commit_replies_received\"\x84\x04\n\x1a\x44hcpv6ServerMetricsRequest\x12\x14\n\x0cserver_names\x18\x01 \x03(\t\x12\x46\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32\x30.otg.Dhcpv6ServerMetricsRequest.ColumnNames.Enum\x1a\x87\x03\n\x0b\x43olumnNames\"\xf7\x02\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x15\n\x11solicits_received\x10\x01\x12\x14\n\x10solicits_ignored\x10\x02\x12\x17\n\x13\x61\x64vertisements_sent\x10\x03\x12\x15\n\x11requests_received\x10\x04\x12\x0e\n\nnacks_sent\x10\x05\x12\x15\n\x11\x63onfirms_received\x10\x06\x12\x15\n\x11renewals_received\x10\x07\x12\x14\n\x10rebinds_received\x10\x08\x12\x10\n\x0creplies_sent\x10\t\x12\x15\n\x11releases_received\x10\n\x12\x15\n\x11\x64\x65\x63lines_received\x10\x0b\x12!\n\x1dinformation_requests_received\x10\x0c\x12\x1b\n\x17relay_forwards_received\x10\r\x12\x16\n\x12relay_replies_sent\x10\x0e\x12\x15\n\x11reconfigures_sent\x10\x0f\"\xe8\x06\n\x12\x44hcpv6ServerMetric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11solicits_received\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x1d\n\x10solicits_ignored\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12 \n\x13\x61\x64vertisements_sent\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x1e\n\x11requests_received\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x17\n\nnacks_sent\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x1e\n\x11\x63onfirms_received\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x1e\n\x11renewals_received\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x1d\n\x10rebinds_received\x18\t \x01(\x04H\x08\x88\x01\x01\x12\x19\n\x0creplies_sent\x18\n \x01(\x04H\t\x88\x01\x01\x12\x1e\n\x11releases_received\x18\x0b \x01(\x04H\n\x88\x01\x01\x12\x1e\n\x11\x64\x65\x63lines_received\x18\x0c \x01(\x04H\x0b\x88\x01\x01\x12*\n\x1dinformation_requests_received\x18\r \x01(\x04H\x0c\x88\x01\x01\x12$\n\x17relay_forwards_received\x18\x0e \x01(\x04H\r\x88\x01\x01\x12\x1f\n\x12relay_replies_sent\x18\x0f \x01(\x04H\x0e\x88\x01\x01\x12\x1e\n\x11reconfigures_sent\x18\x10 \x01(\x04H\x0f\x88\x01\x01\x42\x07\n\x05_nameB\x14\n\x12_solicits_receivedB\x13\n\x11_solicits_ignoredB\x16\n\x14_advertisements_sentB\x14\n\x12_requests_receivedB\r\n\x0b_nacks_sentB\x14\n\x12_confirms_receivedB\x14\n\x12_renewals_receivedB\x13\n\x11_rebinds_receivedB\x0f\n\r_replies_sentB\x14\n\x12_releases_receivedB\x14\n\x12_declines_receivedB \n\x1e_information_requests_receivedB\x1a\n\x18_relay_forwards_receivedB\x15\n\x13_relay_replies_sentB\x14\n\x12_reconfigures_sent\"\xe5\x06\n\x14Ospfv2MetricsRequest\x12\x14\n\x0crouter_names\x18\x01 \x03(\t\x12@\n\x0c\x63olumn_names\x18\x02 \x03(\x0e\x32*.otg.Ospfv2MetricsRequest.ColumnNames.Enum\x1a\xf4\x05\n\x0b\x43olumnNames\"\xe4\x05\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x14\n\x10\x66ull_state_count\x10\x01\x12\x14\n\x10\x64own_state_count\x10\x02\x12\x11\n\rsessions_flap\x10\x03\x12\x0f\n\x0bhellos_sent\x10\x04\x12\x13\n\x0fhellos_received\x10\x05\x12\x0c\n\x08\x64\x62\x64_sent\x10\x06\x12\x10\n\x0c\x64\x62\x64_received\x10\x07\x12\x13\n\x0fls_request_sent\x10\x08\x12\x17\n\x13ls_request_received\x10\t\x12\x12\n\x0els_update_sent\x10\n\x12\x16\n\x12ls_update_received\x10\x0b\x12\x0f\n\x0bls_ack_sent\x10\x0c\x12\x13\n\x0fls_ack_received\x10\r\x12\x0c\n\x08lsa_sent\x10\x0e\x12\x10\n\x0clsa_received\x10\x0f\x12\x10\n\x0clsa_ack_sent\x10\x10\x12\x14\n\x10lsa_ack_received\x10\x11\x12\x13\n\x0frouter_lsa_sent\x10\x12\x12\x17\n\x13router_lsa_received\x10\x13\x12\x14\n\x10network_lsa_sent\x10\x14\x12\x18\n\x14network_lsa_received\x10\x15\x12\x14\n\x10summary_lsa_sent\x10\x16\x12\x18\n\x14summary_lsa_received\x10\x17\x12\x15\n\x11\x65xternal_lsa_sent\x10\x18\x12\x19\n\x15\x65xternal_lsa_received\x10\x19\x12\x11\n\rnssa_lsa_sent\x10\x1a\x12\x15\n\x11nssa_lsa_received\x10\x1b\x12\x15\n\x11opaque_local_sent\x10\x1c\x12\x19\n\x15opaque_local_received\x10\x1d\x12\x14\n\x10opaque_area_sent\x10\x1e\x12\x18\n\x14opaque_area_received\x10\x1f\x12\x16\n\x12opaque_domain_sent\x10 \x12\x1a\n\x16opaque_domain_received\x10!\"\xcc\r\n\x0cOspfv2Metric\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10\x66ull_state_count\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x1d\n\x10\x64own_state_count\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x1a\n\rsessions_flap\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x18\n\x0bhellos_sent\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x1c\n\x0fhellos_received\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x15\n\x08\x64\x62\x64_sent\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x19\n\x0c\x64\x62\x64_received\x18\x08 \x01(\x04H\x07\x88\x01\x01\x12\x1c\n\x0fls_request_sent\x18\t \x01(\x04H\x08\x88\x01\x01\x12 \n\x13ls_request_received\x18\n \x01(\x04H\t\x88\x01\x01\x12\x1b\n\x0els_update_sent\x18\x0b \x01(\x04H\n\x88\x01\x01\x12\x1f\n\x12ls_update_received\x18\x0c \x01(\x04H\x0b\x88\x01\x01\x12\x18\n\x0bls_ack_sent\x18\r \x01(\x04H\x0c\x88\x01\x01\x12\x1c\n\x0fls_ack_received\x18\x0e \x01(\x04H\r\x88\x01\x01\x12\x15\n\x08lsa_sent\x18\x0f \x01(\x04H\x0e\x88\x01\x01\x12\x19\n\x0clsa_received\x18\x10 \x01(\x04H\x0f\x88\x01\x01\x12\x19\n\x0clsa_ack_sent\x18\x11 \x01(\x04H\x10\x88\x01\x01\x12\x1d\n\x10lsa_ack_received\x18\x12 \x01(\x04H\x11\x88\x01\x01\x12\x1c\n\x0frouter_lsa_sent\x18\x13 \x01(\x04H\x12\x88\x01\x01\x12 \n\x13router_lsa_received\x18\x14 \x01(\x04H\x13\x88\x01\x01\x12\x1d\n\x10network_lsa_sent\x18\x15 \x01(\x04H\x14\x88\x01\x01\x12!\n\x14network_lsa_received\x18\x16 \x01(\x04H\x15\x88\x01\x01\x12\x1d\n\x10summary_lsa_sent\x18\x17 \x01(\x04H\x16\x88\x01\x01\x12!\n\x14summary_lsa_received\x18\x18 \x01(\x04H\x17\x88\x01\x01\x12\x1e\n\x11\x65xternal_lsa_sent\x18\x19 \x01(\x04H\x18\x88\x01\x01\x12\"\n\x15\x65xternal_lsa_received\x18\x1a \x01(\x04H\x19\x88\x01\x01\x12\x1a\n\rnssa_lsa_sent\x18\x1b \x01(\x04H\x1a\x88\x01\x01\x12\x1e\n\x11nssa_lsa_received\x18\x1c \x01(\x04H\x1b\x88\x01\x01\x12\x1e\n\x11opaque_local_sent\x18\x1d \x01(\x04H\x1c\x88\x01\x01\x12\"\n\x15opaque_local_received\x18\x1e \x01(\x04H\x1d\x88\x01\x01\x12\x1d\n\x10opaque_area_sent\x18\x1f \x01(\x04H\x1e\x88\x01\x01\x12!\n\x14opaque_area_received\x18 \x01(\x04H\x1f\x88\x01\x01\x12\x1f\n\x12opaque_domain_sent\x18! \x01(\x04H \x88\x01\x01\x12#\n\x16opaque_domain_received\x18\" \x01(\x04H!\x88\x01\x01\x42\x07\n\x05_nameB\x13\n\x11_full_state_countB\x13\n\x11_down_state_countB\x10\n\x0e_sessions_flapB\x0e\n\x0c_hellos_sentB\x12\n\x10_hellos_receivedB\x0b\n\t_dbd_sentB\x0f\n\r_dbd_receivedB\x12\n\x10_ls_request_sentB\x16\n\x14_ls_request_receivedB\x11\n\x0f_ls_update_sentB\x15\n\x13_ls_update_receivedB\x0e\n\x0c_ls_ack_sentB\x12\n\x10_ls_ack_receivedB\x0b\n\t_lsa_sentB\x0f\n\r_lsa_receivedB\x0f\n\r_lsa_ack_sentB\x13\n\x11_lsa_ack_receivedB\x12\n\x10_router_lsa_sentB\x16\n\x14_router_lsa_receivedB\x13\n\x11_network_lsa_sentB\x17\n\x15_network_lsa_receivedB\x13\n\x11_summary_lsa_sentB\x17\n\x15_summary_lsa_receivedB\x14\n\x12_external_lsa_sentB\x18\n\x16_external_lsa_receivedB\x10\n\x0e_nssa_lsa_sentB\x14\n\x12_nssa_lsa_receivedB\x14\n\x12_opaque_local_sentB\x18\n\x16_opaque_local_receivedB\x13\n\x11_opaque_area_sentB\x17\n\x15_opaque_area_receivedB\x15\n\x13_opaque_domain_sentB\x19\n\x17_opaque_domain_received\"\x8f\x07\n\rStatesRequest\x12\x33\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1e.otg.StatesRequest.Choice.EnumH\x00\x88\x01\x01\x12\x35\n\x0eipv4_neighbors\x18\x02 \x01(\x0b\x32\x1d.otg.Neighborsv4StatesRequest\x12\x35\n\x0eipv6_neighbors\x18\x03 \x01(\x0b\x32\x1d.otg.Neighborsv6StatesRequest\x12\x30\n\x0c\x62gp_prefixes\x18\x04 \x01(\x0b\x32\x1a.otg.BgpPrefixStateRequest\x12,\n\tisis_lsps\x18\x05 \x01(\x0b\x32\x19.otg.IsisLspsStateRequest\x12\x36\n\x0elldp_neighbors\x18\x06 \x01(\x0b\x32\x1e.otg.LldpNeighborsStateRequest\x12,\n\trsvp_lsps\x18\x07 \x01(\x0b\x32\x19.otg.RsvpLspsStateRequest\x12;\n\x11\x64hcpv4_interfaces\x18\x08 \x01(\x0b\x32 .otg.Dhcpv4InterfaceStateRequest\x12\x33\n\rdhcpv4_leases\x18\t \x01(\x0b\x32\x1c.otg.Dhcpv4LeaseStateRequest\x12;\n\x11\x64hcpv6_interfaces\x18\n \x01(\x0b\x32 .otg.Dhcpv6InterfaceStateRequest\x12\x33\n\rdhcpv6_leases\x18\x0b \x01(\x0b\x32\x1c.otg.Dhcpv6LeaseStateRequest\x12\x30\n\x0bospfv2_lsas\x18\x0c \x01(\x0b\x32\x1b.otg.Ospfv2LsasStateRequest\x1a\xf3\x01\n\x06\x43hoice\"\xe8\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x12\n\x0eipv4_neighbors\x10\x01\x12\x12\n\x0eipv6_neighbors\x10\x02\x12\x10\n\x0c\x62gp_prefixes\x10\x03\x12\r\n\tisis_lsps\x10\x04\x12\x12\n\x0elldp_neighbors\x10\x05\x12\r\n\trsvp_lsps\x10\x06\x12\x15\n\x11\x64hcpv4_interfaces\x10\x07\x12\x11\n\rdhcpv4_leases\x10\x08\x12\x15\n\x11\x64hcpv6_interfaces\x10\t\x12\x11\n\rdhcpv6_leases\x10\n\x12\x0f\n\x0bospfv2_lsas\x10\x0b\x42\t\n\x07_choice\"\xc5\x06\n\x0eStatesResponse\x12\x34\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x1f.otg.StatesResponse.Choice.EnumH\x00\x88\x01\x01\x12-\n\x0eipv4_neighbors\x18\x02 \x03(\x0b\x32\x15.otg.Neighborsv4State\x12-\n\x0eipv6_neighbors\x18\x03 \x03(\x0b\x32\x15.otg.Neighborsv6State\x12+\n\x0c\x62gp_prefixes\x18\x04 \x03(\x0b\x32\x15.otg.BgpPrefixesState\x12%\n\tisis_lsps\x18\x05 \x03(\x0b\x32\x12.otg.IsisLspsState\x12/\n\x0elldp_neighbors\x18\x06 \x03(\x0b\x32\x17.otg.LldpNeighborsState\x12%\n\trsvp_lsps\x18\x07 \x03(\x0b\x32\x12.otg.RsvpLspsState\x12\x34\n\x11\x64hcpv4_interfaces\x18\x08 \x03(\x0b\x32\x19.otg.Dhcpv4InterfaceState\x12-\n\rdhcpv4_leases\x18\t \x03(\x0b\x32\x16.otg.Dhcpv4LeasesState\x12\x34\n\x11\x64hcpv6_interfaces\x18\n \x03(\x0b\x32\x19.otg.Dhcpv6InterfaceState\x12-\n\rdhcpv6_leases\x18\x0b \x03(\x0b\x32\x16.otg.Dhcpv6LeasesState\x12(\n\x0bospfv2_lsas\x18\x0c \x03(\x0b\x32\x13.otg.Ospfv2LsaState\x1a\xf3\x01\n\x06\x43hoice\"\xe8\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x12\n\x0eipv4_neighbors\x10\x01\x12\x12\n\x0eipv6_neighbors\x10\x02\x12\x10\n\x0c\x62gp_prefixes\x10\x03\x12\r\n\tisis_lsps\x10\x04\x12\x12\n\x0elldp_neighbors\x10\x05\x12\r\n\trsvp_lsps\x10\x06\x12\x15\n\x11\x64hcpv4_interfaces\x10\x07\x12\x11\n\rdhcpv4_leases\x10\x08\x12\x15\n\x11\x64hcpv6_interfaces\x10\t\x12\x11\n\rdhcpv6_leases\x10\n\x12\x0f\n\x0bospfv2_lsas\x10\x0b\x42\t\n\x07_choice\"2\n\x18Neighborsv4StatesRequest\x12\x16\n\x0e\x65thernet_names\x18\x01 \x03(\t\"\xa4\x01\n\x10Neighborsv4State\x12\x1a\n\rethernet_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0cipv4_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12link_layer_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x10\n\x0e_ethernet_nameB\x0f\n\r_ipv4_addressB\x15\n\x13_link_layer_address\"2\n\x18Neighborsv6StatesRequest\x12\x16\n\x0e\x65thernet_names\x18\x01 \x03(\t\"\xa4\x01\n\x10Neighborsv6State\x12\x1a\n\rethernet_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0cipv6_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12link_layer_address\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x10\n\x0e_ethernet_nameB\x0f\n\r_ipv6_addressB\x15\n\x13_link_layer_address\"\xc2\x02\n\x15\x42gpPrefixStateRequest\x12\x16\n\x0e\x62gp_peer_names\x18\x01 \x03(\t\x12\x45\n\x0eprefix_filters\x18\x02 \x03(\x0e\x32-.otg.BgpPrefixStateRequest.PrefixFilters.Enum\x12=\n\x14ipv4_unicast_filters\x18\x03 \x03(\x0b\x32\x1f.otg.BgpPrefixIpv4UnicastFilter\x12=\n\x14ipv6_unicast_filters\x18\x04 \x03(\x0b\x32\x1f.otg.BgpPrefixIpv6UnicastFilter\x1aL\n\rPrefixFilters\";\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x10\n\x0cipv4_unicast\x10\x01\x12\x10\n\x0cipv6_unicast\x10\x02\"\x91\x02\n\x1a\x42gpPrefixIpv4UnicastFilter\x12\x11\n\taddresses\x18\x01 \x03(\t\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x00\x88\x01\x01\x12@\n\x06origin\x18\x03 \x01(\x0e\x32+.otg.BgpPrefixIpv4UnicastFilter.Origin.EnumH\x01\x88\x01\x01\x12\x14\n\x07path_id\x18\x04 \x01(\rH\x02\x88\x01\x01\x1a\x43\n\x06Origin\"9\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03igp\x10\x01\x12\x07\n\x03\x65gp\x10\x02\x12\x0e\n\nincomplete\x10\x03\x42\x10\n\x0e_prefix_lengthB\t\n\x07_originB\n\n\x08_path_id\"\x91\x02\n\x1a\x42gpPrefixIpv6UnicastFilter\x12\x11\n\taddresses\x18\x01 \x03(\t\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x00\x88\x01\x01\x12@\n\x06origin\x18\x03 \x01(\x0e\x32+.otg.BgpPrefixIpv6UnicastFilter.Origin.EnumH\x01\x88\x01\x01\x12\x14\n\x07path_id\x18\x04 \x01(\rH\x02\x88\x01\x01\x1a\x43\n\x06Origin\"9\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03igp\x10\x01\x12\x07\n\x03\x65gp\x10\x02\x12\x0e\n\nincomplete\x10\x03\x42\x10\n\x0e_prefix_lengthB\t\n\x07_originB\n\n\x08_path_id\"\xbe\x01\n\x10\x42gpPrefixesState\x12\x1a\n\rbgp_peer_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12=\n\x15ipv4_unicast_prefixes\x18\x02 \x03(\x0b\x32\x1e.otg.BgpPrefixIpv4UnicastState\x12=\n\x15ipv6_unicast_prefixes\x18\x03 \x03(\x0b\x32\x1e.otg.BgpPrefixIpv6UnicastStateB\x10\n\x0e_bgp_peer_name\"\x8d\x05\n\x19\x42gpPrefixIpv4UnicastState\x12\x19\n\x0cipv4_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12?\n\x06origin\x18\x03 \x01(\x0e\x32*.otg.BgpPrefixIpv4UnicastState.Origin.EnumH\x02\x88\x01\x01\x12\x14\n\x07path_id\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1a\n\ripv4_next_hop\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x1a\n\ripv6_next_hop\x18\x06 \x01(\tH\x05\x88\x01\x01\x12,\n\x0b\x63ommunities\x18\x07 \x03(\x0b\x32\x17.otg.ResultBgpCommunity\x12:\n\x14\x65xtended_communities\x18\x0b \x03(\x0b\x32\x1c.otg.ResultExtendedCommunity\x12%\n\x07\x61s_path\x18\x08 \x01(\x0b\x32\x14.otg.ResultBgpAsPath\x12\x1d\n\x10local_preference\x18\t \x01(\rH\x06\x88\x01\x01\x12%\n\x18multi_exit_discriminator\x18\n \x01(\rH\x07\x88\x01\x01\x1a\x43\n\x06Origin\"9\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03igp\x10\x01\x12\x07\n\x03\x65gp\x10\x02\x12\x0e\n\nincomplete\x10\x03\x42\x0f\n\r_ipv4_addressB\x10\n\x0e_prefix_lengthB\t\n\x07_originB\n\n\x08_path_idB\x10\n\x0e_ipv4_next_hopB\x10\n\x0e_ipv6_next_hopB\x13\n\x11_local_preferenceB\x1b\n\x19_multi_exit_discriminator\"\x8d\x05\n\x19\x42gpPrefixIpv6UnicastState\x12\x19\n\x0cipv6_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12?\n\x06origin\x18\x03 \x01(\x0e\x32*.otg.BgpPrefixIpv6UnicastState.Origin.EnumH\x02\x88\x01\x01\x12\x14\n\x07path_id\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1a\n\ripv4_next_hop\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x1a\n\ripv6_next_hop\x18\x06 \x01(\tH\x05\x88\x01\x01\x12,\n\x0b\x63ommunities\x18\x07 \x03(\x0b\x32\x17.otg.ResultBgpCommunity\x12:\n\x14\x65xtended_communities\x18\x0b \x03(\x0b\x32\x1c.otg.ResultExtendedCommunity\x12%\n\x07\x61s_path\x18\x08 \x01(\x0b\x32\x14.otg.ResultBgpAsPath\x12\x1d\n\x10local_preference\x18\t \x01(\rH\x06\x88\x01\x01\x12%\n\x18multi_exit_discriminator\x18\n \x01(\rH\x07\x88\x01\x01\x1a\x43\n\x06Origin\"9\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x07\n\x03igp\x10\x01\x12\x07\n\x03\x65gp\x10\x02\x12\x0e\n\nincomplete\x10\x03\x42\x0f\n\r_ipv6_addressB\x10\n\x0e_prefix_lengthB\t\n\x07_originB\n\n\x08_path_idB\x10\n\x0e_ipv4_next_hopB\x10\n\x0e_ipv6_next_hopB\x13\n\x11_local_preferenceB\x1b\n\x19_multi_exit_discriminator\"o\n\x17ResultExtendedCommunity\x12\x10\n\x03raw\x18\x01 \x01(\tH\x00\x88\x01\x01\x12:\n\nstructured\x18\x02 \x01(\x0b\x32&.otg.ResultExtendedCommunityStructuredB\x06\n\x04_raw\"\xf6\x05\n!ResultExtendedCommunityStructured\x12G\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x32.otg.ResultExtendedCommunityStructured.Choice.EnumH\x00\x88\x01\x01\x12U\n\x19transitive_2octet_as_type\x18\x02 \x01(\x0b\x32\x32.otg.ResultExtendedCommunityTransitive2OctetAsType\x12[\n\x1ctransitive_ipv4_address_type\x18\x03 \x01(\x0b\x32\x35.otg.ResultExtendedCommunityTransitiveIpv4AddressType\x12U\n\x19transitive_4octet_as_type\x18\x04 \x01(\x0b\x32\x32.otg.ResultExtendedCommunityTransitive4OctetAsType\x12P\n\x16transitive_opaque_type\x18\x05 \x01(\x0b\x32\x30.otg.ResultExtendedCommunityTransitiveOpaqueType\x12\\\n\x1dnon_transitive_2octet_as_type\x18\x06 \x01(\x0b\x32\x35.otg.ResultExtendedCommunityNonTransitive2OctetAsType\x1a\xc1\x01\n\x06\x43hoice\"\xb6\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1d\n\x19transitive_2octet_as_type\x10\x01\x12 \n\x1ctransitive_ipv4_address_type\x10\x02\x12\x1d\n\x19transitive_4octet_as_type\x10\x03\x12\x1a\n\x16transitive_opaque_type\x10\x04\x12!\n\x1dnon_transitive_2octet_as_type\x10\x05\x42\t\n\x07_choice\"\xa2\x01\n8ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget\x12\x1c\n\x0fglobal_2byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11local_4byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x12\n\x10_global_2byte_asB\x14\n\x12_local_4byte_admin\"\xa2\x01\n8ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin\x12\x1c\n\x0fglobal_2byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11local_4byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x12\n\x10_global_2byte_asB\x14\n\x12_local_4byte_admin\"\xa0\x03\n-ResultExtendedCommunityTransitive2OctetAsType\x12S\n\x06\x63hoice\x18\x01 \x01(\x0e\x32>.otg.ResultExtendedCommunityTransitive2OctetAsType.Choice.EnumH\x00\x88\x01\x01\x12[\n\x14route_target_subtype\x18\x02 \x01(\x0b\x32=.otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteTarget\x12[\n\x14route_origin_subtype\x18\x03 \x01(\x0b\x32=.otg.ResultExtendedCommunityTransitive2OctetAsTypeRouteOrigin\x1aU\n\x06\x43hoice\"K\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x18\n\x14route_target_subtype\x10\x01\x12\x18\n\x14route_origin_subtype\x10\x02\x42\t\n\x07_choice\"\xa9\x01\n;ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin\x12\x1e\n\x11global_ipv4_admin\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11local_2byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x14\n\x12_global_ipv4_adminB\x14\n\x12_local_2byte_admin\"\xa9\x01\n;ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget\x12\x1e\n\x11global_ipv4_admin\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11local_2byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x14\n\x12_global_ipv4_adminB\x14\n\x12_local_2byte_admin\"\xac\x03\n0ResultExtendedCommunityTransitiveIpv4AddressType\x12V\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x41.otg.ResultExtendedCommunityTransitiveIpv4AddressType.Choice.EnumH\x00\x88\x01\x01\x12^\n\x14route_target_subtype\x18\x02 \x01(\x0b\x32@.otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteTarget\x12^\n\x14route_origin_subtype\x18\x03 \x01(\x0b\x32@.otg.ResultExtendedCommunityTransitiveIpv4AddressTypeRouteOrigin\x1aU\n\x06\x43hoice\"K\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x18\n\x14route_target_subtype\x10\x01\x12\x18\n\x14route_origin_subtype\x10\x02\x42\t\n\x07_choice\"\xa2\x01\n8ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget\x12\x1c\n\x0fglobal_4byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11local_2byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x12\n\x10_global_4byte_asB\x14\n\x12_local_2byte_admin\"\xa2\x01\n8ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin\x12\x1c\n\x0fglobal_4byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1e\n\x11local_2byte_admin\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x12\n\x10_global_4byte_asB\x14\n\x12_local_2byte_admin\"\xa0\x03\n-ResultExtendedCommunityTransitive4OctetAsType\x12S\n\x06\x63hoice\x18\x01 \x01(\x0e\x32>.otg.ResultExtendedCommunityTransitive4OctetAsType.Choice.EnumH\x00\x88\x01\x01\x12[\n\x14route_target_subtype\x18\x02 \x01(\x0b\x32=.otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteTarget\x12[\n\x14route_origin_subtype\x18\x03 \x01(\x0b\x32=.otg.ResultExtendedCommunityTransitive4OctetAsTypeRouteOrigin\x1aU\n\x06\x43hoice\"K\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x18\n\x14route_target_subtype\x10\x01\x12\x18\n\x14route_origin_subtype\x10\x02\x42\t\n\x07_choice\"n\n0ResultExtendedCommunityTransitiveOpaqueTypeColor\x12\x12\n\x05\x66lags\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x08\n\x06_flagsB\x08\n\x06_color\"\x88\x01\n8ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation\x12\x15\n\x08reserved\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x18\n\x0btunnel_type\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x0b\n\t_reservedB\x0e\n\x0c_tunnel_type\"\x88\x03\n+ResultExtendedCommunityTransitiveOpaqueType\x12Q\n\x06\x63hoice\x18\x01 \x01(\x0e\x32<.otg.ResultExtendedCommunityTransitiveOpaqueType.Choice.EnumH\x00\x88\x01\x01\x12L\n\rcolor_subtype\x18\x02 \x01(\x0b\x32\x35.otg.ResultExtendedCommunityTransitiveOpaqueTypeColor\x12\\\n\x15\x65ncapsulation_subtype\x18\x03 \x01(\x0b\x32=.otg.ResultExtendedCommunityTransitiveOpaqueTypeEncapsulation\x1aO\n\x06\x43hoice\"E\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x11\n\rcolor_subtype\x10\x01\x12\x19\n\x15\x65ncapsulation_subtype\x10\x02\x42\t\n\x07_choice\"\x97\x01\n=ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth\x12\x1c\n\x0fglobal_2byte_as\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x16\n\tbandwidth\x18\x02 \x01(\x02H\x01\x88\x01\x01\x42\x12\n\x10_global_2byte_asB\x0c\n\n_bandwidth\"\xb8\x02\n0ResultExtendedCommunityNonTransitive2OctetAsType\x12V\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x41.otg.ResultExtendedCommunityNonTransitive2OctetAsType.Choice.EnumH\x00\x88\x01\x01\x12\x62\n\x16link_bandwidth_subtype\x18\x02 \x01(\x0b\x32\x42.otg.ResultExtendedCommunityNonTransitive2OctetAsTypeLinkBandwidth\x1a=\n\x06\x43hoice\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x1a\n\x16link_bandwidth_subtype\x10\x01\x42\t\n\x07_choice\"\xb0\x02\n\x12ResultBgpCommunity\x12\x34\n\x04type\x18\x01 \x01(\x0e\x32!.otg.ResultBgpCommunity.Type.EnumH\x00\x88\x01\x01\x12\x16\n\tas_number\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x16\n\tas_custom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a\x8e\x01\n\x04Type\"\x85\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x14\n\x10manual_as_number\x10\x01\x12\r\n\tno_export\x10\x02\x12\x11\n\rno_advertised\x10\x03\x12\x17\n\x13no_export_subconfed\x10\x04\x12\x0e\n\nllgr_stale\x10\x05\x12\x0b\n\x07no_llgr\x10\x06\x42\x07\n\x05_typeB\x0c\n\n_as_numberB\x0c\n\n_as_custom\"@\n\x0fResultBgpAsPath\x12-\n\x08segments\x18\x01 \x03(\x0b\x32\x1b.otg.ResultBgpAsPathSegment\"\xce\x01\n\x16ResultBgpAsPathSegment\x12\x38\n\x04type\x18\x01 \x01(\x0e\x32%.otg.ResultBgpAsPathSegment.Type.EnumH\x00\x88\x01\x01\x12\x12\n\nas_numbers\x18\x02 \x03(\r\x1a]\n\x04Type\"U\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\n\n\x06\x61s_seq\x10\x01\x12\n\n\x06\x61s_set\x10\x02\x12\x11\n\ras_confed_seq\x10\x03\x12\x11\n\ras_confed_set\x10\x04\x42\x07\n\x05_type\"1\n\x14IsisLspsStateRequest\x12\x19\n\x11isis_router_names\x18\x01 \x03(\t\"d\n\rIsisLspsState\x12\x1d\n\x10isis_router_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x04lsps\x18\x02 \x03(\x0b\x32\x11.otg.IsisLspStateB\x13\n\x11_isis_router_name\"\xa6\x03\n\x0cIsisLspState\x12\x13\n\x06lsp_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x35\n\x08pdu_type\x18\x02 \x01(\x0e\x32\x1e.otg.IsisLspState.PduType.EnumH\x01\x88\x01\x01\x12\x1f\n\x12remaining_lifetime\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x1c\n\x0fsequence_number\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x17\n\npdu_length\x18\x05 \x01(\rH\x04\x88\x01\x01\x12 \n\x05\x66lags\x18\x06 \x01(\x0b\x32\x11.otg.IsisLspFlags\x12\x14\n\x07is_type\x18\x07 \x01(\rH\x05\x88\x01\x01\x12\x1e\n\x04tlvs\x18\x08 \x01(\x0b\x32\x10.otg.IsisLspTlvs\x1a<\n\x07PduType\"1\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0b\n\x07level_1\x10\x01\x12\x0b\n\x07level_2\x10\x02\x42\t\n\x07_lsp_idB\x0b\n\t_pdu_typeB\x15\n\x13_remaining_lifetimeB\x12\n\x10_sequence_numberB\r\n\x0b_pdu_lengthB\n\n\x08_is_type\"\xfc\x03\n\x0bIsisLspTlvs\x12+\n\rhostname_tlvs\x18\x01 \x03(\x0b\x32\x14.otg.IsisLspHostname\x12;\n\x14is_reachability_tlvs\x18\x02 \x03(\x0b\x32\x1d.otg.IsisLspIsReachabilityTlv\x12L\n\x1d\x65xtended_is_reachability_tlvs\x18\x03 \x03(\x0b\x32%.otg.IsisLspExtendedIsReachabilityTlv\x12P\n\x1fipv4_internal_reachability_tlvs\x18\x04 \x03(\x0b\x32\'.otg.IsisLspIpv4InternalReachabilityTlv\x12P\n\x1fipv4_external_reachability_tlvs\x18\x05 \x03(\x0b\x32\'.otg.IsisLspIpv4ExternalReachabilityTlv\x12P\n\x1f\x65xtended_ipv4_reachability_tlvs\x18\x06 \x03(\x0b\x32\'.otg.IsisLspExtendedIpv4ReachabilityTlv\x12?\n\x16ipv6_reachability_tlvs\x18\x07 \x03(\x0b\x32\x1f.otg.IsisLspIpv6ReachabilityTlv\"5\n\x0fIsisLspHostname\x12\x15\n\x08hostname\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_hostname\"\xae\x02\n\x0cIsisLspFlags\x12\x1d\n\x10partition_repair\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1b\n\x0e\x61ttached_error\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1d\n\x10\x61ttached_expense\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x1b\n\x0e\x61ttached_delay\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x1d\n\x10\x61ttached_default\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\x15\n\x08overload\x18\x06 \x01(\x08H\x05\x88\x01\x01\x42\x13\n\x11_partition_repairB\x11\n\x0f_attached_errorB\x13\n\x11_attached_expenseB\x11\n\x0f_attached_delayB\x13\n\x11_attached_defaultB\x0b\n\t_overload\"C\n\x18IsisLspIsReachabilityTlv\x12\'\n\tneighbors\x18\x01 \x03(\x0b\x32\x14.otg.IsisLspneighbor\"K\n IsisLspExtendedIsReachabilityTlv\x12\'\n\tneighbors\x18\x01 \x03(\x0b\x32\x14.otg.IsisLspneighbor\"7\n\x0fIsisLspneighbor\x12\x16\n\tsystem_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_system_id\"L\n\"IsisLspIpv4InternalReachabilityTlv\x12&\n\x08prefixes\x18\x01 \x03(\x0b\x32\x14.otg.IsisLspV4Prefix\"L\n\"IsisLspIpv4ExternalReachabilityTlv\x12&\n\x08prefixes\x18\x01 \x03(\x0b\x32\x14.otg.IsisLspV4Prefix\"\xd7\x03\n\x0fIsisLspV4Prefix\x12\x19\n\x0cipv4_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12N\n\x13redistribution_type\x18\x03 \x01(\x0e\x32,.otg.IsisLspV4Prefix.RedistributionType.EnumH\x02\x88\x01\x01\x12\x1b\n\x0e\x64\x65\x66\x61ult_metric\x18\x04 \x01(\rH\x03\x88\x01\x01\x12>\n\x0borigin_type\x18\x05 \x01(\x0e\x32$.otg.IsisLspV4Prefix.OriginType.EnumH\x04\x88\x01\x01\x1a?\n\x12RedistributionType\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x1a\x41\n\nOriginType\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08internal\x10\x01\x12\x0c\n\x08\x65xternal\x10\x02\x42\x0f\n\r_ipv4_addressB\x10\n\x0e_prefix_lengthB\x16\n\x14_redistribution_typeB\x11\n\x0f_default_metricB\x0e\n\x0c_origin_type\"T\n\"IsisLspExtendedIpv4ReachabilityTlv\x12.\n\x08prefixes\x18\x01 \x03(\x0b\x32\x1c.otg.IsisLspExtendedV4Prefix\"\xfd\x02\n\x17IsisLspExtendedV4Prefix\x12\x19\n\x0cipv4_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06metric\x18\x03 \x01(\rH\x02\x88\x01\x01\x12V\n\x13redistribution_type\x18\x04 \x01(\x0e\x32\x34.otg.IsisLspExtendedV4Prefix.RedistributionType.EnumH\x03\x88\x01\x01\x12\x37\n\x11prefix_attributes\x18\x05 \x01(\x0b\x32\x1c.otg.IsisLspPrefixAttributes\x1a?\n\x12RedistributionType\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x42\x0f\n\r_ipv4_addressB\x10\n\x0e_prefix_lengthB\t\n\x07_metricB\x16\n\x14_redistribution_type\"D\n\x1aIsisLspIpv6ReachabilityTlv\x12&\n\x08prefixes\x18\x01 \x03(\x0b\x32\x14.otg.IsisLspV6Prefix\"\x80\x04\n\x0fIsisLspV6Prefix\x12\x19\n\x0cipv6_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06metric\x18\x03 \x01(\rH\x02\x88\x01\x01\x12N\n\x13redistribution_type\x18\x04 \x01(\x0e\x32,.otg.IsisLspV6Prefix.RedistributionType.EnumH\x03\x88\x01\x01\x12>\n\x0borigin_type\x18\x05 \x01(\x0e\x32$.otg.IsisLspV6Prefix.OriginType.EnumH\x04\x88\x01\x01\x12\x37\n\x11prefix_attributes\x18\x06 \x01(\x0b\x32\x1c.otg.IsisLspPrefixAttributes\x1a?\n\x12RedistributionType\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x1a\x41\n\nOriginType\"3\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0c\n\x08internal\x10\x01\x12\x0c\n\x08\x65xternal\x10\x02\x42\x0f\n\r_ipv6_addressB\x10\n\x0e_prefix_lengthB\t\n\x07_metricB\x16\n\x14_redistribution_typeB\x0e\n\x0c_origin_type\"y\n\x17IsisLspPrefixAttributes\x12\x13\n\x06x_flag\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x13\n\x06r_flag\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x13\n\x06n_flag\x18\x03 \x01(\x08H\x02\x88\x01\x01\x42\t\n\x07_x_flagB\t\n\x07_r_flagB\t\n\x07_n_flag\"L\n\x19LldpNeighborsStateRequest\x12\x12\n\nlldp_names\x18\x01 \x03(\t\x12\x1b\n\x13neighbor_id_filters\x18\x02 \x03(\t\"\x8b\t\n\x12LldpNeighborsState\x12\x16\n\tlldp_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bsystem_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12system_description\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nchassis_id\x18\x04 \x01(\tH\x03\x88\x01\x01\x12H\n\x0f\x63hassis_id_type\x18\x05 \x01(\x0e\x32*.otg.LldpNeighborsState.ChassisIdType.EnumH\x04\x88\x01\x01\x12\x18\n\x0bneighbor_id\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x10\n\x03\x61ge\x18\x07 \x01(\rH\x06\x88\x01\x01\x12\x18\n\x0blast_update\x18\x08 \x01(\rH\x07\x88\x01\x01\x12\x10\n\x03ttl\x18\t \x01(\rH\x08\x88\x01\x01\x12\x14\n\x07port_id\x18\n \x01(\tH\t\x88\x01\x01\x12\x42\n\x0cport_id_type\x18\x0b \x01(\x0e\x32\'.otg.LldpNeighborsState.PortIdType.EnumH\n\x88\x01\x01\x12\x1d\n\x10port_description\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x1f\n\x12management_address\x18\r \x01(\tH\x0c\x88\x01\x01\x12$\n\x17management_address_type\x18\x0e \x01(\tH\r\x88\x01\x01\x12,\n\x0b\x63ustom_tlvs\x18\x0f \x03(\x0b\x32\x17.otg.LldpCustomTLVState\x12.\n\x0c\x63\x61pabilities\x18\x10 \x03(\x0b\x32\x18.otg.LldpCapabilityState\x1a\xae\x01\n\rChassisIdType\"\x9c\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x12\n\x0eport_component\x10\x01\x12\x13\n\x0fnetwork_address\x10\x02\x12\x15\n\x11\x63hassis_component\x10\x03\x12\x0f\n\x0bmac_address\x10\x04\x12\x12\n\x0einterface_name\x10\x05\x12\t\n\x05local\x10\x06\x12\x13\n\x0finterface_alias\x10\x07\x1a\xaa\x01\n\nPortIdType\"\x9b\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x12\n\x0eport_component\x10\x01\x12\x13\n\x0fnetwork_address\x10\x02\x12\x14\n\x10\x61gent_circuit_id\x10\x03\x12\x0f\n\x0bmac_address\x10\x04\x12\x12\n\x0einterface_name\x10\x05\x12\t\n\x05local\x10\x06\x12\x13\n\x0finterface_alias\x10\x07\x42\x0c\n\n_lldp_nameB\x0e\n\x0c_system_nameB\x15\n\x13_system_descriptionB\r\n\x0b_chassis_idB\x12\n\x10_chassis_id_typeB\x0e\n\x0c_neighbor_idB\x06\n\x04_ageB\x0e\n\x0c_last_updateB\x06\n\x04_ttlB\n\n\x08_port_idB\x0f\n\r_port_id_typeB\x13\n\x11_port_descriptionB\x15\n\x13_management_addressB\x1a\n\x18_management_address_type\"\xac\x01\n\x12LldpCustomTLVState\x12\x18\n\x0b\x63ustom_type\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03oui\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0boui_subtype\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x18\n\x0binformation\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x0e\n\x0c_custom_typeB\x06\n\x04_ouiB\x0e\n\x0c_oui_subtypeB\x0e\n\x0c_information\"\x90\x03\n\x13LldpCapabilityState\x12J\n\x0f\x63\x61pability_name\x18\x01 \x01(\x0e\x32,.otg.LldpCapabilityState.CapabilityName.EnumH\x00\x88\x01\x01\x12\x1f\n\x12\x63\x61pability_enabled\x18\x02 \x01(\x08H\x01\x88\x01\x01\x1a\xe0\x01\n\x0e\x43\x61pabilityName\"\xcd\x01\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x0e\n\nmac_bridge\x10\x01\x12\x16\n\x12two_port_mac_relay\x10\x02\x12\x0c\n\x08repeater\x10\x03\x12\x17\n\x13\x64ocsis_cable_device\x10\x04\x12\n\n\x06s_vlan\x10\x05\x12\r\n\ttelephone\x10\x06\x12\t\n\x05other\x10\x07\x12\n\n\x06router\x10\x08\x12\n\n\x06\x63_vlan\x10\t\x12\x10\n\x0cstation_only\x10\n\x12\x15\n\x11wlan_access_point\x10\x0b\x42\x12\n\x10_capability_nameB\x15\n\x13_capability_enabled\"1\n\x14RsvpLspsStateRequest\x12\x19\n\x11rsvp_router_names\x18\x01 \x03(\t\"m\n\rRsvpLspsState\x12\x1d\n\x10rsvp_router_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12(\n\tipv4_lsps\x18\x02 \x03(\x0b\x32\x15.otg.RsvpIPv4LspStateB\x13\n\x11_rsvp_router_name\"\xe2\x01\n\x10RsvpIPv4LspState\x12\x1b\n\x0esource_address\x18\x01 \x01(\tH\x00\x88\x01\x01\x12 \n\x13\x64\x65stination_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1e\n\x03lsp\x18\x03 \x01(\x0b\x32\x11.otg.RsvpLspState\x12!\n\x04rros\x18\x04 \x03(\x0b\x32\x13.otg.RsvpLspIpv4Rro\x12!\n\x04\x65ros\x18\x05 \x03(\x0b\x32\x13.otg.RsvpLspIpv4EroB\x11\n\x0f_source_addressB\x16\n\x14_destination_address\"\xb4\x04\n\x0cRsvpLspState\x12\x16\n\ttunnel_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x13\n\x06lsp_id\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x19\n\x0csession_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x15\n\x08label_in\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x16\n\tlabel_out\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x41\n\x0esession_status\x18\x06 \x01(\x0e\x32$.otg.RsvpLspState.SessionStatus.EnumH\x05\x88\x01\x01\x12\x44\n\x10last_flap_reason\x18\x07 \x01(\x0e\x32%.otg.RsvpLspState.LastFlapReason.EnumH\x06\x88\x01\x01\x12\x14\n\x07up_time\x18\x08 \x01(\x04H\x07\x88\x01\x01\x1a:\n\rSessionStatus\")\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x06\n\x02up\x10\x01\x12\x08\n\x04\x64own\x10\x02\x1aY\n\x0eLastFlapReason\"G\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tresv_tear\x10\x01\x12\r\n\tpath_tear\x10\x02\x12\x10\n\x0cpath_timeout\x10\x03\x42\x0c\n\n_tunnel_idB\t\n\x07_lsp_idB\x0f\n\r_session_nameB\x0b\n\t_label_inB\x0c\n\n_label_outB\x11\n\x0f_session_statusB\x13\n\x11_last_flap_reasonB\n\n\x08_up_time\"b\n\x0eRsvpLspIpv4Rro\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0ereported_label\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\n\n\x08_addressB\x11\n\x0f_reported_label\"\xf2\x01\n\x0eRsvpLspIpv4Ero\x12\x13\n\x06prefix\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03\x61sn\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x30\n\x04type\x18\x03 \x01(\x0e\x32\x1d.otg.RsvpLspIpv4Ero.Type.EnumH\x02\x88\x01\x01\x1ak\n\x04Type\"c\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04ipv4\x10\x01\x12\x08\n\x04ipv6\x10\x02\x12\x07\n\x03\x61sn\x10\x03\x12\x08\n\x04\x61sn4\x10\x04\x12\t\n\x05label\x10\x05\x12\x18\n\x14unnumbered_interface\x10\x06\x42\t\n\x07_prefixB\x06\n\x04_asnB\x07\n\x05_type\"8\n\x1b\x44hcpv4InterfaceStateRequest\x12\x19\n\x11\x64hcp_client_names\x18\x01 \x03(\t\"\xd0\x02\n\x14\x44hcpv4InterfaceState\x12\x1d\n\x10\x64hcp_client_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0cipv4_address\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x1c\n\x0fgateway_address\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x17\n\nlease_time\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x17\n\nrenew_time\x18\x06 \x01(\rH\x05\x88\x01\x01\x12\x18\n\x0brebind_time\x18\x07 \x01(\rH\x06\x88\x01\x01\x42\x13\n\x11_dhcp_client_nameB\x0f\n\r_ipv4_addressB\x10\n\x0e_prefix_lengthB\x12\n\x10_gateway_addressB\r\n\x0b_lease_timeB\r\n\x0b_renew_timeB\x0e\n\x0c_rebind_time\"4\n\x17\x44hcpv4LeaseStateRequest\x12\x19\n\x11\x64hcp_server_names\x18\x01 \x03(\t\"n\n\x11\x44hcpv4LeasesState\x12\x1d\n\x10\x64hcp_server_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12%\n\x06leases\x18\x02 \x03(\x0b\x32\x15.otg.Dhcpv4LeaseStateB\x13\n\x11_dhcp_server_name\"\xd2\x02\n\x10\x44hcpv4LeaseState\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nvalid_time\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1b\n\x0epreferred_time\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x17\n\nrenew_time\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x18\n\x0brebind_time\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x16\n\tclient_id\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x17\n\ncircuit_id\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x16\n\tremote_id\x18\x08 \x01(\tH\x07\x88\x01\x01\x42\n\n\x08_addressB\r\n\x0b_valid_timeB\x11\n\x0f_preferred_timeB\r\n\x0b_renew_timeB\x0e\n\x0c_rebind_timeB\x0c\n\n_client_idB\r\n\x0b_circuit_idB\x0c\n\n_remote_id\"8\n\x1b\x44hcpv6InterfaceStateRequest\x12\x19\n\x11\x64hcp_client_names\x18\x01 \x03(\t\"\xaa\x01\n\x14\x44hcpv6InterfaceState\x12\x1d\n\x10\x64hcp_client_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x30\n\x0eiapd_addresses\x18\x02 \x03(\x0b\x32\x18.otg.Dhcpv6InterfaceIapd\x12,\n\x0cia_addresses\x18\x03 \x03(\x0b\x32\x16.otg.Dhcpv6InterfaceIaB\x13\n\x11_dhcp_client_name\"\x8d\x01\n\x13\x44hcpv6InterfaceIapd\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rprefix_length\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x17\n\nlease_time\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\n\n\x08_addressB\x10\n\x0e_prefix_lengthB\r\n\x0b_lease_time\"\x7f\n\x11\x44hcpv6InterfaceIa\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07gateway\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nlease_time\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\n\n\x08_addressB\n\n\x08_gatewayB\r\n\x0b_lease_time\"4\n\x17\x44hcpv6LeaseStateRequest\x12\x19\n\x11\x64hcp_server_names\x18\x01 \x03(\t\"t\n\x11\x44hcpv6LeasesState\x12\x1d\n\x10\x64hcp_server_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12+\n\x06leases\x18\x02 \x03(\x0b\x32\x1b.otg.Dhcpv6ServerLeaseStateB\x13\n\x11_dhcp_server_name\"\xdc\x02\n\x16\x44hcpv6ServerLeaseState\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nvalid_time\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x1b\n\x0epreferred_time\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x17\n\nrenew_time\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x18\n\x0brebind_time\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x16\n\tclient_id\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x16\n\tremote_id\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x19\n\x0cinterface_id\x18\x08 \x01(\tH\x07\x88\x01\x01\x42\n\n\x08_addressB\r\n\x0b_valid_timeB\x11\n\x0f_preferred_timeB\r\n\x0b_renew_timeB\x0e\n\x0c_rebind_timeB\x0c\n\n_client_idB\x0c\n\n_remote_idB\x0f\n\r_interface_id\".\n\x16Ospfv2LsasStateRequest\x12\x14\n\x0crouter_names\x18\x01 \x03(\t\"\x86\x03\n\x0eOspfv2LsaState\x12\x18\n\x0brouter_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12)\n\x0brouter_lsas\x18\x02 \x03(\x0b\x32\x14.otg.Ospfv2RouterLsa\x12+\n\x0cnetwork_lsas\x18\x03 \x03(\x0b\x32\x15.otg.Ospfv2NetworkLsa\x12:\n\x14network_summary_lsas\x18\x04 \x03(\x0b\x32\x1c.otg.Ospfv2NetworkSummaryLsa\x12\x30\n\x0fsummary_as_lsas\x18\x05 \x03(\x0b\x32\x17.otg.Ospfv2SummaryAsLsa\x12\x32\n\x10\x65xternal_as_lsas\x18\x06 \x03(\x0b\x32\x18.otg.Ospfv2ExternalAsLsa\x12%\n\tnssa_lsas\x18\x07 \x03(\x0b\x32\x12.otg.Ospfv2NssaLsa\x12)\n\x0bopaque_lsas\x18\x08 \x03(\x0b\x32\x14.otg.Ospfv2OpaqueLsaB\x0e\n\x0c_router_name\"W\n\x0fOspfv2RouterLsa\x12$\n\x06header\x18\x01 \x01(\x0b\x32\x14.otg.Ospfv2LsaHeader\x12\x1e\n\x05links\x18\x02 \x03(\x0b\x32\x0f.otg.Ospfv2Link\"\x81\x01\n\x10Ospfv2NetworkLsa\x12$\n\x06header\x18\x01 \x01(\x0b\x32\x14.otg.Ospfv2LsaHeader\x12\x19\n\x0cnetwork_mask\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x13neighbor_router_ids\x18\x03 \x03(\tB\x0f\n\r_network_mask\"\x8b\x01\n\x17Ospfv2NetworkSummaryLsa\x12$\n\x06header\x18\x01 \x01(\x0b\x32\x14.otg.Ospfv2LsaHeader\x12\x19\n\x0cnetwork_mask\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06metric\x18\x03 \x01(\rH\x01\x88\x01\x01\x42\x0f\n\r_network_maskB\t\n\x07_metric\"\x86\x01\n\x12Ospfv2SummaryAsLsa\x12$\n\x06header\x18\x01 \x01(\x0b\x32\x14.otg.Ospfv2LsaHeader\x12\x19\n\x0cnetwork_mask\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06metric\x18\x03 \x01(\rH\x01\x88\x01\x01\x42\x0f\n\r_network_maskB\t\n\x07_metric\"\xb1\x01\n\x13Ospfv2ExternalAsLsa\x12$\n\x06header\x18\x01 \x01(\x0b\x32\x14.otg.Ospfv2LsaHeader\x12\x19\n\x0cnetwork_mask\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06metric\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x18\n\x0bmetric_type\x18\x04 \x01(\rH\x02\x88\x01\x01\x42\x0f\n\r_network_maskB\t\n\x07_metricB\x0e\n\x0c_metric_type\"\xe3\x01\n\rOspfv2NssaLsa\x12$\n\x06header\x18\x01 \x01(\x0b\x32\x14.otg.Ospfv2LsaHeader\x12\x19\n\x0cnetwork_mask\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06metric\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x18\n\x0bmetric_type\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x1f\n\x12\x66orwarding_address\x18\x05 \x01(\tH\x03\x88\x01\x01\x42\x0f\n\r_network_maskB\t\n\x07_metricB\x0e\n\x0c_metric_typeB\x15\n\x13_forwarding_address\"\xb5\x01\n\x0fOspfv2OpaqueLsa\x12$\n\x06header\x18\x01 \x01(\x0b\x32\x14.otg.Ospfv2LsaHeader\x12\x31\n\x04type\x18\x02 \x01(\x0e\x32\x1e.otg.Ospfv2OpaqueLsa.Type.EnumH\x00\x88\x01\x01\x1a@\n\x04Type\"8\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05local\x10\x01\x12\x08\n\x04\x61rea\x10\x02\x12\n\n\x06\x64omain\x10\x03\x42\x07\n\x05_type\"\xe5\x01\n\x0fOspfv2LsaHeader\x12\x13\n\x06lsa_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x15\x61\x64vertising_router_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0fsequence_number\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x10\n\x03\x61ge\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x18\n\x0boption_bits\x18\x05 \x01(\rH\x04\x88\x01\x01\x42\t\n\x07_lsa_idB\x18\n\x16_advertising_router_idB\x12\n\x10_sequence_numberB\x06\n\x04_ageB\x0e\n\x0c_option_bits\"\xf0\x01\n\nOspfv2Link\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x19.otg.Ospfv2Link.Type.EnumH\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04\x64\x61ta\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x13\n\x06metric\x18\x04 \x01(\rH\x03\x88\x01\x01\x1aW\n\x04Type\"O\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x12\n\x0epoint_to_point\x10\x01\x12\x0b\n\x07transit\x10\x02\x12\x08\n\x04stub\x10\x03\x12\x0b\n\x07virtual\x10\x04\x42\x07\n\x05_typeB\x05\n\x03_idB\x07\n\x05_dataB\t\n\x07_metric\"6\n\x0e\x43\x61ptureRequest\x12\x16\n\tport_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_port_name\"w\n\x1dPatternFlowEthernetDstCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowEthernetDstMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb6\x03\n\x16PatternFlowEthernetDst\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowEthernetDst.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x11\n\x04\x61uto\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x35\n\tincrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowEthernetDstCounter\x12\x35\n\tdecrement\x18\x07 \x01(\x0b\x32\".otg.PatternFlowEthernetDstCounter\x12\x39\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32$.otg.PatternFlowEthernetDstMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"w\n\x1dPatternFlowEthernetSrcCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowEthernetSrcMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowEthernetSrc\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowEthernetSrc.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowEthernetSrcCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowEthernetSrcCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowEthernetSrcMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowEthernetEtherTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowEthernetEtherTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xd4\x03\n\x1cPatternFlowEthernetEtherType\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowEthernetEtherType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12;\n\tincrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowEthernetEtherTypeCounter\x12;\n\tdecrement\x18\x07 \x01(\x0b\x32(.otg.PatternFlowEthernetEtherTypeCounter\x12?\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32*.otg.PatternFlowEthernetEtherTypeMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"|\n\"PatternFlowEthernetPfcQueueCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowEthernetPfcQueueMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowEthernetPfcQueue\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowEthernetPfcQueue.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowEthernetPfcQueueCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowEthernetPfcQueueCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowEthernetPfcQueueMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowVlanPriorityCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowVlanPriorityMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowVlanPriority\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowVlanPriority.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowVlanPriorityCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowVlanPriorityCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowVlanPriorityMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"s\n\x19PatternFlowVlanCfiCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"y\n\x1bPatternFlowVlanCfiMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xfc\x02\n\x12PatternFlowVlanCfi\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.PatternFlowVlanCfi.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x31\n\tincrement\x18\x05 \x01(\x0b\x32\x1e.otg.PatternFlowVlanCfiCounter\x12\x31\n\tdecrement\x18\x06 \x01(\x0b\x32\x1e.otg.PatternFlowVlanCfiCounter\x12\x35\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32 .otg.PatternFlowVlanCfiMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"r\n\x18PatternFlowVlanIdCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"x\n\x1aPatternFlowVlanIdMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xf7\x02\n\x11PatternFlowVlanId\x12\x37\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\".otg.PatternFlowVlanId.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x30\n\tincrement\x18\x05 \x01(\x0b\x32\x1d.otg.PatternFlowVlanIdCounter\x12\x30\n\tdecrement\x18\x06 \x01(\x0b\x32\x1d.otg.PatternFlowVlanIdCounter\x12\x34\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x1f.otg.PatternFlowVlanIdMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"t\n\x1aPatternFlowVlanTpidCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"z\n\x1cPatternFlowVlanTpidMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x81\x03\n\x13PatternFlowVlanTpid\x12\x39\n\x06\x63hoice\x18\x01 \x01(\x0e\x32$.otg.PatternFlowVlanTpid.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x32\n\tincrement\x18\x05 \x01(\x0b\x32\x1f.otg.PatternFlowVlanTpidCounter\x12\x32\n\tdecrement\x18\x06 \x01(\x0b\x32\x1f.otg.PatternFlowVlanTpidCounter\x12\x36\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32!.otg.PatternFlowVlanTpidMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowVxlanFlagsCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowVxlanFlagsMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowVxlanFlags\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowVxlanFlags.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowVxlanFlagsCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowVxlanFlagsCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowVxlanFlagsMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"z\n PatternFlowVxlanReserved0Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x80\x01\n\"PatternFlowVxlanReserved0MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9f\x03\n\x19PatternFlowVxlanReserved0\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowVxlanReserved0.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x38\n\tincrement\x18\x05 \x01(\x0b\x32%.otg.PatternFlowVxlanReserved0Counter\x12\x38\n\tdecrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowVxlanReserved0Counter\x12<\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\'.otg.PatternFlowVxlanReserved0MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"t\n\x1aPatternFlowVxlanVniCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"z\n\x1cPatternFlowVxlanVniMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa7\x03\n\x13PatternFlowVxlanVni\x12\x39\n\x06\x63hoice\x18\x01 \x01(\x0e\x32$.otg.PatternFlowVxlanVni.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x32\n\tincrement\x18\x06 \x01(\x0b\x32\x1f.otg.PatternFlowVxlanVniCounter\x12\x32\n\tdecrement\x18\x07 \x01(\x0b\x32\x1f.otg.PatternFlowVxlanVniCounter\x12\x36\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32!.otg.PatternFlowVxlanVniMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"z\n PatternFlowVxlanReserved1Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x80\x01\n\"PatternFlowVxlanReserved1MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9f\x03\n\x19PatternFlowVxlanReserved1\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowVxlanReserved1.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x38\n\tincrement\x18\x05 \x01(\x0b\x32%.otg.PatternFlowVxlanReserved1Counter\x12\x38\n\tdecrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowVxlanReserved1Counter\x12<\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\'.otg.PatternFlowVxlanReserved1MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowIpv4VersionCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowIpv4VersionMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowIpv4Version\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowIpv4Version.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowIpv4VersionCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowIpv4VersionCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowIpv4VersionMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"|\n\"PatternFlowIpv4HeaderLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowIpv4HeaderLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xcf\x03\n\x1bPatternFlowIpv4HeaderLength\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowIpv4HeaderLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12:\n\tincrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowIpv4HeaderLengthCounter\x12:\n\tdecrement\x18\x07 \x01(\x0b\x32\'.otg.PatternFlowIpv4HeaderLengthCounter\x12>\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32).otg.PatternFlowIpv4HeaderLengthMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"{\n!PatternFlowIpv4TotalLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x81\x01\n#PatternFlowIpv4TotalLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xca\x03\n\x1aPatternFlowIpv4TotalLength\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.PatternFlowIpv4TotalLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x39\n\tincrement\x18\x06 \x01(\x0b\x32&.otg.PatternFlowIpv4TotalLengthCounter\x12\x39\n\tdecrement\x18\x07 \x01(\x0b\x32&.otg.PatternFlowIpv4TotalLengthCounter\x12=\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32(.otg.PatternFlowIpv4TotalLengthMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"~\n$PatternFlowIpv4IdentificationCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowIpv4IdentificationMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowIpv4Identification\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIpv4Identification.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowIpv4IdentificationCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowIpv4IdentificationCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowIpv4IdentificationMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowIpv4ReservedCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowIpv4ReservedMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowIpv4Reserved\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowIpv4Reserved.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowIpv4ReservedCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowIpv4ReservedCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowIpv4ReservedMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"|\n\"PatternFlowIpv4DontFragmentCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowIpv4DontFragmentMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowIpv4DontFragment\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowIpv4DontFragment.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowIpv4DontFragmentCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowIpv4DontFragmentCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowIpv4DontFragmentMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowIpv4MoreFragmentsCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowIpv4MoreFragmentsMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowIpv4MoreFragments\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowIpv4MoreFragments.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowIpv4MoreFragmentsCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowIpv4MoreFragmentsCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowIpv4MoreFragmentsMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"~\n$PatternFlowIpv4FragmentOffsetCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowIpv4FragmentOffsetMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowIpv4FragmentOffset\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIpv4FragmentOffset.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowIpv4FragmentOffsetCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowIpv4FragmentOffsetCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowIpv4FragmentOffsetMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"z\n PatternFlowIpv4TimeToLiveCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x80\x01\n\"PatternFlowIpv4TimeToLiveMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9f\x03\n\x19PatternFlowIpv4TimeToLive\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowIpv4TimeToLive.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x38\n\tincrement\x18\x05 \x01(\x0b\x32%.otg.PatternFlowIpv4TimeToLiveCounter\x12\x38\n\tdecrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowIpv4TimeToLiveCounter\x12<\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\'.otg.PatternFlowIpv4TimeToLiveMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowIpv4ProtocolCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowIpv4ProtocolMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xbb\x03\n\x17PatternFlowIpv4Protocol\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowIpv4Protocol.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x36\n\tincrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowIpv4ProtocolCounter\x12\x36\n\tdecrement\x18\x07 \x01(\x0b\x32#.otg.PatternFlowIpv4ProtocolCounter\x12:\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32%.otg.PatternFlowIpv4ProtocolMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"\xdf\x02\n\x1dPatternFlowIpv4HeaderChecksum\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIpv4HeaderChecksum.Choice.EnumH\x00\x88\x01\x01\x12I\n\tgenerated\x18\x02 \x01(\x0e\x32\x31.otg.PatternFlowIpv4HeaderChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"s\n\x19PatternFlowIpv4SrcCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"y\n\x1bPatternFlowIpv4SrcMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x88\x01\n\x18PatternFlowIpv4SrcRandom\x12\x10\n\x03min\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03max\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04seed\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_maxB\x07\n\x05_seedB\x08\n\x06_count\"\xe2\x03\n\x12PatternFlowIpv4Src\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.PatternFlowIpv4Src.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x31\n\tincrement\x18\x05 \x01(\x0b\x32\x1e.otg.PatternFlowIpv4SrcCounter\x12\x31\n\tdecrement\x18\x06 \x01(\x0b\x32\x1e.otg.PatternFlowIpv4SrcCounter\x12\x35\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32 .otg.PatternFlowIpv4SrcMetricTag\x12\x1f\n\x04\x61uto\x18\x08 \x01(\x0b\x32\x11.otg.FlowIpv4Auto\x12-\n\x06random\x18\t \x01(\x0b\x32\x1d.otg.PatternFlowIpv4SrcRandom\x1al\n\x06\x43hoice\"b\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x12\x08\n\x04\x61uto\x10\x01\x12\n\n\x06random\x10\x06\x42\t\n\x07_choiceB\x08\n\x06_value\"s\n\x19PatternFlowIpv4DstCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"y\n\x1bPatternFlowIpv4DstMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x88\x01\n\x18PatternFlowIpv4DstRandom\x12\x10\n\x03min\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x03max\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04seed\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_maxB\x07\n\x05_seedB\x08\n\x06_count\"\xe2\x03\n\x12PatternFlowIpv4Dst\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.PatternFlowIpv4Dst.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x31\n\tincrement\x18\x05 \x01(\x0b\x32\x1e.otg.PatternFlowIpv4DstCounter\x12\x31\n\tdecrement\x18\x06 \x01(\x0b\x32\x1e.otg.PatternFlowIpv4DstCounter\x12\x35\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32 .otg.PatternFlowIpv4DstMetricTag\x12\x1f\n\x04\x61uto\x18\x08 \x01(\x0b\x32\x11.otg.FlowIpv4Auto\x12-\n\x06random\x18\t \x01(\x0b\x32\x1d.otg.PatternFlowIpv4DstRandom\x1al\n\x06\x43hoice\"b\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x12\x08\n\x04\x61uto\x10\x01\x12\n\n\x06random\x10\x06\x42\t\n\x07_choiceB\x08\n\x06_value\"\x8b\x01\n1PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xa5\x03\n*PatternFlowIpv4OptionsCustomTypeCopiedFlag\x12P\n\x06\x63hoice\x18\x01 \x01(\x0e\x32;.otg.PatternFlowIpv4OptionsCustomTypeCopiedFlag.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12I\n\tincrement\x18\x05 \x01(\x0b\x32\x36.otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter\x12I\n\tdecrement\x18\x06 \x01(\x0b\x32\x36.otg.PatternFlowIpv4OptionsCustomTypeCopiedFlagCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x8c\x01\n2PatternFlowIpv4OptionsCustomTypeOptionClassCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xa9\x03\n+PatternFlowIpv4OptionsCustomTypeOptionClass\x12Q\n\x06\x63hoice\x18\x01 \x01(\x0e\x32<.otg.PatternFlowIpv4OptionsCustomTypeOptionClass.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12J\n\tincrement\x18\x05 \x01(\x0b\x32\x37.otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter\x12J\n\tdecrement\x18\x06 \x01(\x0b\x32\x37.otg.PatternFlowIpv4OptionsCustomTypeOptionClassCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x8d\x01\n3PatternFlowIpv4OptionsCustomTypeOptionNumberCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xad\x03\n,PatternFlowIpv4OptionsCustomTypeOptionNumber\x12R\n\x06\x63hoice\x18\x01 \x01(\x0e\x32=.otg.PatternFlowIpv4OptionsCustomTypeOptionNumber.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12K\n\tincrement\x18\x05 \x01(\x0b\x32\x38.otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter\x12K\n\tdecrement\x18\x06 \x01(\x0b\x32\x38.otg.PatternFlowIpv4OptionsCustomTypeOptionNumberCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"{\n!PatternFlowIpv4PriorityRawCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x81\x01\n#PatternFlowIpv4PriorityRawMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa4\x03\n\x1aPatternFlowIpv4PriorityRaw\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.PatternFlowIpv4PriorityRaw.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x39\n\tincrement\x18\x05 \x01(\x0b\x32&.otg.PatternFlowIpv4PriorityRawCounter\x12\x39\n\tdecrement\x18\x06 \x01(\x0b\x32&.otg.PatternFlowIpv4PriorityRawCounter\x12=\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32(.otg.PatternFlowIpv4PriorityRawMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowIpv4DscpPhbCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowIpv4DscpPhbMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowIpv4DscpPhb\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowIpv4DscpPhb.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowIpv4DscpPhbCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowIpv4DscpPhbCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowIpv4DscpPhbMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowIpv4DscpEcnCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowIpv4DscpEcnMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowIpv4DscpEcn\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowIpv4DscpEcn.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowIpv4DscpEcnCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowIpv4DscpEcnCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowIpv4DscpEcnMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowIpv4TosPrecedenceCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowIpv4TosPrecedenceMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowIpv4TosPrecedence\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowIpv4TosPrecedence.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowIpv4TosPrecedenceCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowIpv4TosPrecedenceCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowIpv4TosPrecedenceMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowIpv4TosDelayCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowIpv4TosDelayMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowIpv4TosDelay\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowIpv4TosDelay.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowIpv4TosDelayCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowIpv4TosDelayCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowIpv4TosDelayMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowIpv4TosThroughputCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowIpv4TosThroughputMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowIpv4TosThroughput\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowIpv4TosThroughput.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowIpv4TosThroughputCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowIpv4TosThroughputCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowIpv4TosThroughputMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"~\n$PatternFlowIpv4TosReliabilityCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowIpv4TosReliabilityMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowIpv4TosReliability\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIpv4TosReliability.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowIpv4TosReliabilityCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowIpv4TosReliabilityCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowIpv4TosReliabilityMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"{\n!PatternFlowIpv4TosMonetaryCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x81\x01\n#PatternFlowIpv4TosMonetaryMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa4\x03\n\x1aPatternFlowIpv4TosMonetary\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.PatternFlowIpv4TosMonetary.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x39\n\tincrement\x18\x05 \x01(\x0b\x32&.otg.PatternFlowIpv4TosMonetaryCounter\x12\x39\n\tdecrement\x18\x06 \x01(\x0b\x32&.otg.PatternFlowIpv4TosMonetaryCounter\x12=\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32(.otg.PatternFlowIpv4TosMonetaryMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"y\n\x1fPatternFlowIpv4TosUnusedCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x7f\n!PatternFlowIpv4TosUnusedMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9a\x03\n\x18PatternFlowIpv4TosUnused\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.PatternFlowIpv4TosUnused.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x37\n\tincrement\x18\x05 \x01(\x0b\x32$.otg.PatternFlowIpv4TosUnusedCounter\x12\x37\n\tdecrement\x18\x06 \x01(\x0b\x32$.otg.PatternFlowIpv4TosUnusedCounter\x12;\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32&.otg.PatternFlowIpv4TosUnusedMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowIpv6VersionCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowIpv6VersionMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowIpv6Version\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowIpv6Version.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowIpv6VersionCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowIpv6VersionCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowIpv6VersionMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"|\n\"PatternFlowIpv6TrafficClassCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowIpv6TrafficClassMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowIpv6TrafficClass\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowIpv6TrafficClass.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowIpv6TrafficClassCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowIpv6TrafficClassCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowIpv6TrafficClassMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"y\n\x1fPatternFlowIpv6FlowLabelCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x7f\n!PatternFlowIpv6FlowLabelMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8e\x01\n\x1ePatternFlowIpv6FlowLabelRandom\x12\x10\n\x03min\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03max\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x11\n\x04seed\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_maxB\x07\n\x05_seedB\x08\n\x06_count\"\xdb\x03\n\x18PatternFlowIpv6FlowLabel\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.PatternFlowIpv6FlowLabel.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x37\n\tincrement\x18\x05 \x01(\x0b\x32$.otg.PatternFlowIpv6FlowLabelCounter\x12\x37\n\tdecrement\x18\x06 \x01(\x0b\x32$.otg.PatternFlowIpv6FlowLabelCounter\x12;\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32&.otg.PatternFlowIpv6FlowLabelMetricTag\x12\x33\n\x06random\x18\x08 \x01(\x0b\x32#.otg.PatternFlowIpv6FlowLabelRandom\x1a\x62\n\x06\x43hoice\"X\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x12\n\n\x06random\x10\x06\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowIpv6PayloadLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowIpv6PayloadLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xd4\x03\n\x1cPatternFlowIpv6PayloadLength\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowIpv6PayloadLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12;\n\tincrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowIpv6PayloadLengthCounter\x12;\n\tdecrement\x18\x07 \x01(\x0b\x32(.otg.PatternFlowIpv6PayloadLengthCounter\x12?\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32*.otg.PatternFlowIpv6PayloadLengthMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"z\n PatternFlowIpv6NextHeaderCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x80\x01\n\"PatternFlowIpv6NextHeaderMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc5\x03\n\x19PatternFlowIpv6NextHeader\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowIpv6NextHeader.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x38\n\tincrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowIpv6NextHeaderCounter\x12\x38\n\tdecrement\x18\x07 \x01(\x0b\x32%.otg.PatternFlowIpv6NextHeaderCounter\x12<\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32\'.otg.PatternFlowIpv6NextHeaderMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"x\n\x1ePatternFlowIpv6HopLimitCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowIpv6HopLimitMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowIpv6HopLimit\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowIpv6HopLimit.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowIpv6HopLimitCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowIpv6HopLimitCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowIpv6HopLimitMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"s\n\x19PatternFlowIpv6SrcCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"y\n\x1bPatternFlowIpv6SrcMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa7\x03\n\x12PatternFlowIpv6Src\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.PatternFlowIpv6Src.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x31\n\tincrement\x18\x05 \x01(\x0b\x32\x1e.otg.PatternFlowIpv6SrcCounter\x12\x31\n\tdecrement\x18\x06 \x01(\x0b\x32\x1e.otg.PatternFlowIpv6SrcCounter\x12\x35\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32 .otg.PatternFlowIpv6SrcMetricTag\x12\x1f\n\x04\x61uto\x18\x08 \x01(\x0b\x32\x11.otg.FlowIpv6Auto\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x12\x08\n\x04\x61uto\x10\x01\x42\t\n\x07_choiceB\x08\n\x06_value\"s\n\x19PatternFlowIpv6DstCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"y\n\x1bPatternFlowIpv6DstMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa7\x03\n\x12PatternFlowIpv6Dst\x12\x38\n\x06\x63hoice\x18\x01 \x01(\x0e\x32#.otg.PatternFlowIpv6Dst.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x31\n\tincrement\x18\x05 \x01(\x0b\x32\x1e.otg.PatternFlowIpv6DstCounter\x12\x31\n\tdecrement\x18\x06 \x01(\x0b\x32\x1e.otg.PatternFlowIpv6DstCounter\x12\x35\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32 .otg.PatternFlowIpv6DstMetricTag\x12\x1f\n\x04\x61uto\x18\x08 \x01(\x0b\x32\x11.otg.FlowIpv6Auto\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x12\x08\n\x04\x61uto\x10\x01\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowPfcPauseDstCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowPfcPauseDstMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowPfcPauseDst\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowPfcPauseDst.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowPfcPauseDstCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowPfcPauseDstCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowPfcPauseDstMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowPfcPauseSrcCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowPfcPauseSrcMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowPfcPauseSrc\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowPfcPauseSrc.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowPfcPauseSrcCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowPfcPauseSrcCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowPfcPauseSrcMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowPfcPauseEtherTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowPfcPauseEtherTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowPfcPauseEtherType\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowPfcPauseEtherType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowPfcPauseEtherTypeCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowPfcPauseEtherTypeCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowPfcPauseEtherTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x81\x01\n\'PatternFlowPfcPauseControlOpCodeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x87\x01\n)PatternFlowPfcPauseControlOpCodeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc2\x03\n PatternFlowPfcPauseControlOpCode\x12\x46\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x31.otg.PatternFlowPfcPauseControlOpCode.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12?\n\tincrement\x18\x05 \x01(\x0b\x32,.otg.PatternFlowPfcPauseControlOpCodeCounter\x12?\n\tdecrement\x18\x06 \x01(\x0b\x32,.otg.PatternFlowPfcPauseControlOpCodeCounter\x12\x43\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32..otg.PatternFlowPfcPauseControlOpCodeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x85\x01\n+PatternFlowPfcPauseClassEnableVectorCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8b\x01\n-PatternFlowPfcPauseClassEnableVectorMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xd6\x03\n$PatternFlowPfcPauseClassEnableVector\x12J\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x35.otg.PatternFlowPfcPauseClassEnableVector.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x43\n\tincrement\x18\x05 \x01(\x0b\x32\x30.otg.PatternFlowPfcPauseClassEnableVectorCounter\x12\x43\n\tdecrement\x18\x06 \x01(\x0b\x32\x30.otg.PatternFlowPfcPauseClassEnableVectorCounter\x12G\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x32.otg.PatternFlowPfcPauseClassEnableVectorMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass0Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass0MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass0\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass0.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass0Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass0Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass0MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass1Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass1MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass1\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass1.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass1Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass1Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass1MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass2Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass2MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass2\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass2.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass2Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass2Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass2MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass3Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass3MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass3\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass3.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass3Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass3Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass3MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass4Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass4MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass4\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass4.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass4Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass4Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass4MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass5Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass5MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass5\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass5.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass5Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass5Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass5MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass6Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass6MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass6\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass6.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass6Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass6Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass6MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowPfcPausePauseClass7Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowPfcPausePauseClass7MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowPfcPausePauseClass7\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowPfcPausePauseClass7.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass7Counter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowPfcPausePauseClass7Counter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowPfcPausePauseClass7MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"|\n\"PatternFlowEthernetPauseDstCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowEthernetPauseDstMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowEthernetPauseDst\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowEthernetPauseDst.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowEthernetPauseDstCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowEthernetPauseDstCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowEthernetPauseDstMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"|\n\"PatternFlowEthernetPauseSrcCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowEthernetPauseSrcMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowEthernetPauseSrc\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowEthernetPauseSrc.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowEthernetPauseSrcCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowEthernetPauseSrcCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowEthernetPauseSrcMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x82\x01\n(PatternFlowEthernetPauseEtherTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x88\x01\n*PatternFlowEthernetPauseEtherTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc7\x03\n!PatternFlowEthernetPauseEtherType\x12G\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x32.otg.PatternFlowEthernetPauseEtherType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12@\n\tincrement\x18\x05 \x01(\x0b\x32-.otg.PatternFlowEthernetPauseEtherTypeCounter\x12@\n\tdecrement\x18\x06 \x01(\x0b\x32-.otg.PatternFlowEthernetPauseEtherTypeCounter\x12\x44\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32/.otg.PatternFlowEthernetPauseEtherTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x86\x01\n,PatternFlowEthernetPauseControlOpCodeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8c\x01\n.PatternFlowEthernetPauseControlOpCodeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xdb\x03\n%PatternFlowEthernetPauseControlOpCode\x12K\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x36.otg.PatternFlowEthernetPauseControlOpCode.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x44\n\tincrement\x18\x05 \x01(\x0b\x32\x31.otg.PatternFlowEthernetPauseControlOpCodeCounter\x12\x44\n\tdecrement\x18\x06 \x01(\x0b\x32\x31.otg.PatternFlowEthernetPauseControlOpCodeCounter\x12H\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x33.otg.PatternFlowEthernetPauseControlOpCodeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowEthernetPauseTimeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowEthernetPauseTimeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowEthernetPauseTime\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowEthernetPauseTime.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowEthernetPauseTimeCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowEthernetPauseTimeCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowEthernetPauseTimeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowTcpSrcPortCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowTcpSrcPortMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x01\n\x1bPatternFlowTcpSrcPortRandom\x12\x10\n\x03min\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03max\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x11\n\x04seed\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_maxB\x07\n\x05_seedB\x08\n\x06_count\"\xc9\x03\n\x15PatternFlowTcpSrcPort\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowTcpSrcPort.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowTcpSrcPortCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowTcpSrcPortCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowTcpSrcPortMetricTag\x12\x30\n\x06random\x18\x08 \x01(\x0b\x32 .otg.PatternFlowTcpSrcPortRandom\x1a\x62\n\x06\x43hoice\"X\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x12\n\n\x06random\x10\x06\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowTcpDstPortCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowTcpDstPortMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x01\n\x1bPatternFlowTcpDstPortRandom\x12\x10\n\x03min\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03max\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x11\n\x04seed\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_maxB\x07\n\x05_seedB\x08\n\x06_count\"\xc9\x03\n\x15PatternFlowTcpDstPort\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowTcpDstPort.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowTcpDstPortCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowTcpDstPortCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowTcpDstPortMetricTag\x12\x30\n\x06random\x18\x08 \x01(\x0b\x32 .otg.PatternFlowTcpDstPortRandom\x1a\x62\n\x06\x43hoice\"X\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x12\n\n\x06random\x10\x06\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpSeqNumCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpSeqNumMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpSeqNum\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpSeqNum.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpSeqNumCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpSeqNumCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpSeqNumMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpAckNumCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpAckNumMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpAckNum\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpAckNum.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpAckNumCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpAckNumCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpAckNumMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"y\n\x1fPatternFlowTcpDataOffsetCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x7f\n!PatternFlowTcpDataOffsetMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9a\x03\n\x18PatternFlowTcpDataOffset\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.PatternFlowTcpDataOffset.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x37\n\tincrement\x18\x05 \x01(\x0b\x32$.otg.PatternFlowTcpDataOffsetCounter\x12\x37\n\tdecrement\x18\x06 \x01(\x0b\x32$.otg.PatternFlowTcpDataOffsetCounter\x12;\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32&.otg.PatternFlowTcpDataOffsetMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"t\n\x1aPatternFlowTcpEcnNsCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"z\n\x1cPatternFlowTcpEcnNsMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x81\x03\n\x13PatternFlowTcpEcnNs\x12\x39\n\x06\x63hoice\x18\x01 \x01(\x0e\x32$.otg.PatternFlowTcpEcnNs.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x32\n\tincrement\x18\x05 \x01(\x0b\x32\x1f.otg.PatternFlowTcpEcnNsCounter\x12\x32\n\tdecrement\x18\x06 \x01(\x0b\x32\x1f.otg.PatternFlowTcpEcnNsCounter\x12\x36\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32!.otg.PatternFlowTcpEcnNsMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpEcnCwrCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpEcnCwrMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpEcnCwr\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpEcnCwr.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpEcnCwrCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpEcnCwrCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpEcnCwrMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowTcpEcnEchoCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowTcpEcnEchoMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowTcpEcnEcho\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowTcpEcnEcho.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowTcpEcnEchoCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowTcpEcnEchoCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowTcpEcnEchoMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpCtlUrgCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpCtlUrgMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpCtlUrg\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpCtlUrg.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpCtlUrgCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpCtlUrgCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpCtlUrgMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpCtlAckCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpCtlAckMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpCtlAck\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpCtlAck.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpCtlAckCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpCtlAckCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpCtlAckMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpCtlPshCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpCtlPshMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpCtlPsh\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpCtlPsh.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpCtlPshCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpCtlPshCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpCtlPshMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpCtlRstCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpCtlRstMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpCtlRst\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpCtlRst.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpCtlRstCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpCtlRstCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpCtlRstMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpCtlSynCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpCtlSynMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpCtlSyn\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpCtlSyn.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpCtlSynCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpCtlSynCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpCtlSynMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpCtlFinCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpCtlFinMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpCtlFin\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpCtlFin.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpCtlFinCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpCtlFinCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpCtlFinMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowTcpWindowCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowTcpWindowMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowTcpWindow\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowTcpWindow.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowTcpWindowCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowTcpWindowCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowTcpWindowMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xca\x02\n\x16PatternFlowTcpChecksum\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowTcpChecksum.Choice.EnumH\x00\x88\x01\x01\x12\x42\n\tgenerated\x18\x02 \x01(\x0e\x32*.otg.PatternFlowTcpChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"v\n\x1cPatternFlowUdpSrcPortCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowUdpSrcPortMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x01\n\x1bPatternFlowUdpSrcPortRandom\x12\x10\n\x03min\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03max\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x11\n\x04seed\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_maxB\x07\n\x05_seedB\x08\n\x06_count\"\xc9\x03\n\x15PatternFlowUdpSrcPort\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowUdpSrcPort.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowUdpSrcPortCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowUdpSrcPortCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowUdpSrcPortMetricTag\x12\x30\n\x06random\x18\x08 \x01(\x0b\x32 .otg.PatternFlowUdpSrcPortRandom\x1a\x62\n\x06\x43hoice\"X\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x12\n\n\x06random\x10\x06\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowUdpDstPortCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowUdpDstPortMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x01\n\x1bPatternFlowUdpDstPortRandom\x12\x10\n\x03min\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x10\n\x03max\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x11\n\x04seed\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_maxB\x07\n\x05_seedB\x08\n\x06_count\"\xc9\x03\n\x15PatternFlowUdpDstPort\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowUdpDstPort.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowUdpDstPortCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowUdpDstPortCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowUdpDstPortMetricTag\x12\x30\n\x06random\x18\x08 \x01(\x0b\x32 .otg.PatternFlowUdpDstPortRandom\x1a\x62\n\x06\x43hoice\"X\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x12\n\n\x06random\x10\x06\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowUdpLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowUdpLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowUdpLength\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowUdpLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowUdpLengthCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowUdpLengthCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowUdpLengthMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xca\x02\n\x16PatternFlowUdpChecksum\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowUdpChecksum.Choice.EnumH\x00\x88\x01\x01\x12\x42\n\tgenerated\x18\x02 \x01(\x0e\x32*.otg.PatternFlowUdpChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"~\n$PatternFlowGreChecksumPresentCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowGreChecksumPresentMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowGreChecksumPresent\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowGreChecksumPresent.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowGreChecksumPresentCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowGreChecksumPresentCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowGreChecksumPresentMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowGreReserved0Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowGreReserved0MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowGreReserved0\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowGreReserved0.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowGreReserved0Counter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowGreReserved0Counter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowGreReserved0MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowGreVersionCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowGreVersionMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowGreVersion\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowGreVersion.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowGreVersionCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowGreVersionCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowGreVersionMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowGreProtocolCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowGreProtocolMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb6\x03\n\x16PatternFlowGreProtocol\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowGreProtocol.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowGreProtocolCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowGreProtocolCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowGreProtocolMetricTag\x12\x11\n\x04\x61uto\x18\x08 \x01(\rH\x02\x88\x01\x01\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x12\x08\n\x04\x61uto\x10\x01\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"\xca\x02\n\x16PatternFlowGreChecksum\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowGreChecksum.Choice.EnumH\x00\x88\x01\x01\x12\x42\n\tgenerated\x18\x02 \x01(\x0e\x32*.otg.PatternFlowGreChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"x\n\x1ePatternFlowGreReserved1Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowGreReserved1MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowGreReserved1\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowGreReserved1.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowGreReserved1Counter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowGreReserved1Counter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowGreReserved1MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowGtpv1VersionCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowGtpv1VersionMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowGtpv1Version\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowGtpv1Version.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowGtpv1VersionCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowGtpv1VersionCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowGtpv1VersionMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowGtpv1ProtocolTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowGtpv1ProtocolTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowGtpv1ProtocolType\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowGtpv1ProtocolType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowGtpv1ProtocolTypeCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowGtpv1ProtocolTypeCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowGtpv1ProtocolTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"y\n\x1fPatternFlowGtpv1ReservedCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x7f\n!PatternFlowGtpv1ReservedMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9a\x03\n\x18PatternFlowGtpv1Reserved\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.PatternFlowGtpv1Reserved.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x37\n\tincrement\x18\x05 \x01(\x0b\x32$.otg.PatternFlowGtpv1ReservedCounter\x12\x37\n\tdecrement\x18\x06 \x01(\x0b\x32$.otg.PatternFlowGtpv1ReservedCounter\x12;\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32&.otg.PatternFlowGtpv1ReservedMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowGtpv1EFlagCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowGtpv1EFlagMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowGtpv1EFlag\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowGtpv1EFlag.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowGtpv1EFlagCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowGtpv1EFlagCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowGtpv1EFlagMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowGtpv1SFlagCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowGtpv1SFlagMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowGtpv1SFlag\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowGtpv1SFlag.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowGtpv1SFlagCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowGtpv1SFlagCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowGtpv1SFlagMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowGtpv1PnFlagCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowGtpv1PnFlagMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowGtpv1PnFlag\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowGtpv1PnFlag.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowGtpv1PnFlagCounter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowGtpv1PnFlagCounter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowGtpv1PnFlagMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"|\n\"PatternFlowGtpv1MessageTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowGtpv1MessageTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowGtpv1MessageType\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowGtpv1MessageType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowGtpv1MessageTypeCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowGtpv1MessageTypeCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowGtpv1MessageTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"~\n$PatternFlowGtpv1MessageLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowGtpv1MessageLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowGtpv1MessageLength\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowGtpv1MessageLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowGtpv1MessageLengthCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowGtpv1MessageLengthCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowGtpv1MessageLengthMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowGtpv1TeidCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowGtpv1TeidMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowGtpv1Teid\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowGtpv1Teid.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowGtpv1TeidCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowGtpv1TeidCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowGtpv1TeidMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"~\n$PatternFlowGtpv1SquenceNumberCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowGtpv1SquenceNumberMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowGtpv1SquenceNumber\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowGtpv1SquenceNumber.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowGtpv1SquenceNumberCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowGtpv1SquenceNumberCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowGtpv1SquenceNumberMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"{\n!PatternFlowGtpv1NPduNumberCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x81\x01\n#PatternFlowGtpv1NPduNumberMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa4\x03\n\x1aPatternFlowGtpv1NPduNumber\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.PatternFlowGtpv1NPduNumber.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x39\n\tincrement\x18\x05 \x01(\x0b\x32&.otg.PatternFlowGtpv1NPduNumberCounter\x12\x39\n\tdecrement\x18\x06 \x01(\x0b\x32&.otg.PatternFlowGtpv1NPduNumberCounter\x12=\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32(.otg.PatternFlowGtpv1NPduNumberMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x88\x01\n.PatternFlowGtpv1NextExtensionHeaderTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8e\x01\n0PatternFlowGtpv1NextExtensionHeaderTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xe5\x03\n\'PatternFlowGtpv1NextExtensionHeaderType\x12M\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x38.otg.PatternFlowGtpv1NextExtensionHeaderType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x46\n\tincrement\x18\x05 \x01(\x0b\x32\x33.otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter\x12\x46\n\tdecrement\x18\x06 \x01(\x0b\x32\x33.otg.PatternFlowGtpv1NextExtensionHeaderTypeCounter\x12J\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x35.otg.PatternFlowGtpv1NextExtensionHeaderTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x87\x01\n-PatternFlowGtpExtensionExtensionLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8d\x01\n/PatternFlowGtpExtensionExtensionLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xe0\x03\n&PatternFlowGtpExtensionExtensionLength\x12L\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x37.otg.PatternFlowGtpExtensionExtensionLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x45\n\tincrement\x18\x05 \x01(\x0b\x32\x32.otg.PatternFlowGtpExtensionExtensionLengthCounter\x12\x45\n\tdecrement\x18\x06 \x01(\x0b\x32\x32.otg.PatternFlowGtpExtensionExtensionLengthCounter\x12I\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x34.otg.PatternFlowGtpExtensionExtensionLengthMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x80\x01\n&PatternFlowGtpExtensionContentsCounter\x12\x12\n\x05start\x18\x01 \x01(\x04H\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\x04H\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x86\x01\n(PatternFlowGtpExtensionContentsMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\x04H\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xbd\x03\n\x1fPatternFlowGtpExtensionContents\x12\x45\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x30.otg.PatternFlowGtpExtensionContents.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\x04\x12>\n\tincrement\x18\x05 \x01(\x0b\x32+.otg.PatternFlowGtpExtensionContentsCounter\x12>\n\tdecrement\x18\x06 \x01(\x0b\x32+.otg.PatternFlowGtpExtensionContentsCounter\x12\x42\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32-.otg.PatternFlowGtpExtensionContentsMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x8b\x01\n1PatternFlowGtpExtensionNextExtensionHeaderCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x91\x01\n3PatternFlowGtpExtensionNextExtensionHeaderMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xf4\x03\n*PatternFlowGtpExtensionNextExtensionHeader\x12P\n\x06\x63hoice\x18\x01 \x01(\x0e\x32;.otg.PatternFlowGtpExtensionNextExtensionHeader.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12I\n\tincrement\x18\x05 \x01(\x0b\x32\x36.otg.PatternFlowGtpExtensionNextExtensionHeaderCounter\x12I\n\tdecrement\x18\x06 \x01(\x0b\x32\x36.otg.PatternFlowGtpExtensionNextExtensionHeaderCounter\x12M\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x38.otg.PatternFlowGtpExtensionNextExtensionHeaderMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowGtpv2VersionCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowGtpv2VersionMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowGtpv2Version\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowGtpv2Version.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowGtpv2VersionCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowGtpv2VersionCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowGtpv2VersionMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x81\x01\n\'PatternFlowGtpv2PiggybackingFlagCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x87\x01\n)PatternFlowGtpv2PiggybackingFlagMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc2\x03\n PatternFlowGtpv2PiggybackingFlag\x12\x46\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x31.otg.PatternFlowGtpv2PiggybackingFlag.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12?\n\tincrement\x18\x05 \x01(\x0b\x32,.otg.PatternFlowGtpv2PiggybackingFlagCounter\x12?\n\tdecrement\x18\x06 \x01(\x0b\x32,.otg.PatternFlowGtpv2PiggybackingFlagCounter\x12\x43\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32..otg.PatternFlowGtpv2PiggybackingFlagMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"y\n\x1fPatternFlowGtpv2TeidFlagCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x7f\n!PatternFlowGtpv2TeidFlagMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9a\x03\n\x18PatternFlowGtpv2TeidFlag\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.PatternFlowGtpv2TeidFlag.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x37\n\tincrement\x18\x05 \x01(\x0b\x32$.otg.PatternFlowGtpv2TeidFlagCounter\x12\x37\n\tdecrement\x18\x06 \x01(\x0b\x32$.otg.PatternFlowGtpv2TeidFlagCounter\x12;\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32&.otg.PatternFlowGtpv2TeidFlagMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowGtpv2Spare1Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowGtpv2Spare1MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowGtpv2Spare1\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowGtpv2Spare1.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowGtpv2Spare1Counter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowGtpv2Spare1Counter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowGtpv2Spare1MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"|\n\"PatternFlowGtpv2MessageTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowGtpv2MessageTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowGtpv2MessageType\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowGtpv2MessageType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowGtpv2MessageTypeCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowGtpv2MessageTypeCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowGtpv2MessageTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"~\n$PatternFlowGtpv2MessageLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowGtpv2MessageLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowGtpv2MessageLength\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowGtpv2MessageLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowGtpv2MessageLengthCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowGtpv2MessageLengthCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowGtpv2MessageLengthMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowGtpv2TeidCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowGtpv2TeidMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x86\x03\n\x14PatternFlowGtpv2Teid\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowGtpv2Teid.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x33\n\tincrement\x18\x05 \x01(\x0b\x32 .otg.PatternFlowGtpv2TeidCounter\x12\x33\n\tdecrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowGtpv2TeidCounter\x12\x37\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\".otg.PatternFlowGtpv2TeidMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowGtpv2SequenceNumberCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x01\n\'PatternFlowGtpv2SequenceNumberMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb8\x03\n\x1ePatternFlowGtpv2SequenceNumber\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowGtpv2SequenceNumber.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowGtpv2SequenceNumberCounter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowGtpv2SequenceNumberCounter\x12\x41\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32,.otg.PatternFlowGtpv2SequenceNumberMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"w\n\x1dPatternFlowGtpv2Spare2Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"}\n\x1fPatternFlowGtpv2Spare2MetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x90\x03\n\x16PatternFlowGtpv2Spare2\x12<\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\'.otg.PatternFlowGtpv2Spare2.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x35\n\tincrement\x18\x05 \x01(\x0b\x32\".otg.PatternFlowGtpv2Spare2Counter\x12\x35\n\tdecrement\x18\x06 \x01(\x0b\x32\".otg.PatternFlowGtpv2Spare2Counter\x12\x39\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32$.otg.PatternFlowGtpv2Spare2MetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"{\n!PatternFlowArpHardwareTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x81\x01\n#PatternFlowArpHardwareTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa4\x03\n\x1aPatternFlowArpHardwareType\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.PatternFlowArpHardwareType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x39\n\tincrement\x18\x05 \x01(\x0b\x32&.otg.PatternFlowArpHardwareTypeCounter\x12\x39\n\tdecrement\x18\x06 \x01(\x0b\x32&.otg.PatternFlowArpHardwareTypeCounter\x12=\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32(.otg.PatternFlowArpHardwareTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"{\n!PatternFlowArpProtocolTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x81\x01\n#PatternFlowArpProtocolTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa4\x03\n\x1aPatternFlowArpProtocolType\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.PatternFlowArpProtocolType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x39\n\tincrement\x18\x05 \x01(\x0b\x32&.otg.PatternFlowArpProtocolTypeCounter\x12\x39\n\tdecrement\x18\x06 \x01(\x0b\x32&.otg.PatternFlowArpProtocolTypeCounter\x12=\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32(.otg.PatternFlowArpProtocolTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowArpHardwareLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowArpHardwareLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowArpHardwareLength\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowArpHardwareLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowArpHardwareLengthCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowArpHardwareLengthCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowArpHardwareLengthMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowArpProtocolLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowArpProtocolLengthMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xae\x03\n\x1cPatternFlowArpProtocolLength\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowArpProtocolLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12;\n\tincrement\x18\x05 \x01(\x0b\x32(.otg.PatternFlowArpProtocolLengthCounter\x12;\n\tdecrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowArpProtocolLengthCounter\x12?\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32*.otg.PatternFlowArpProtocolLengthMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowArpOperationCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowArpOperationMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowArpOperation\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowArpOperation.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowArpOperationCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowArpOperationCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowArpOperationMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x81\x01\n\'PatternFlowArpSenderHardwareAddrCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x87\x01\n)PatternFlowArpSenderHardwareAddrMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc2\x03\n PatternFlowArpSenderHardwareAddr\x12\x46\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x31.otg.PatternFlowArpSenderHardwareAddr.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12?\n\tincrement\x18\x05 \x01(\x0b\x32,.otg.PatternFlowArpSenderHardwareAddrCounter\x12?\n\tdecrement\x18\x06 \x01(\x0b\x32,.otg.PatternFlowArpSenderHardwareAddrCounter\x12\x43\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32..otg.PatternFlowArpSenderHardwareAddrMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x81\x01\n\'PatternFlowArpSenderProtocolAddrCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x87\x01\n)PatternFlowArpSenderProtocolAddrMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc2\x03\n PatternFlowArpSenderProtocolAddr\x12\x46\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x31.otg.PatternFlowArpSenderProtocolAddr.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12?\n\tincrement\x18\x05 \x01(\x0b\x32,.otg.PatternFlowArpSenderProtocolAddrCounter\x12?\n\tdecrement\x18\x06 \x01(\x0b\x32,.otg.PatternFlowArpSenderProtocolAddrCounter\x12\x43\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32..otg.PatternFlowArpSenderProtocolAddrMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x81\x01\n\'PatternFlowArpTargetHardwareAddrCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x87\x01\n)PatternFlowArpTargetHardwareAddrMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc2\x03\n PatternFlowArpTargetHardwareAddr\x12\x46\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x31.otg.PatternFlowArpTargetHardwareAddr.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12?\n\tincrement\x18\x05 \x01(\x0b\x32,.otg.PatternFlowArpTargetHardwareAddrCounter\x12?\n\tdecrement\x18\x06 \x01(\x0b\x32,.otg.PatternFlowArpTargetHardwareAddrCounter\x12\x43\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32..otg.PatternFlowArpTargetHardwareAddrMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x81\x01\n\'PatternFlowArpTargetProtocolAddrCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x87\x01\n)PatternFlowArpTargetProtocolAddrMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc2\x03\n PatternFlowArpTargetProtocolAddr\x12\x46\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x31.otg.PatternFlowArpTargetProtocolAddr.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12?\n\tincrement\x18\x05 \x01(\x0b\x32,.otg.PatternFlowArpTargetProtocolAddrCounter\x12?\n\tdecrement\x18\x06 \x01(\x0b\x32,.otg.PatternFlowArpTargetProtocolAddrCounter\x12\x43\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32..otg.PatternFlowArpTargetProtocolAddrMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowIcmpEchoTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowIcmpEchoTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowIcmpEchoType\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowIcmpEchoType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowIcmpEchoTypeCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowIcmpEchoTypeCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowIcmpEchoTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowIcmpEchoCodeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowIcmpEchoCodeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowIcmpEchoCode\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowIcmpEchoCode.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowIcmpEchoCodeCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowIcmpEchoCodeCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowIcmpEchoCodeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xd9\x02\n\x1bPatternFlowIcmpEchoChecksum\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowIcmpEchoChecksum.Choice.EnumH\x00\x88\x01\x01\x12G\n\tgenerated\x18\x02 \x01(\x0e\x32/.otg.PatternFlowIcmpEchoChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"~\n$PatternFlowIcmpEchoIdentifierCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowIcmpEchoIdentifierMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowIcmpEchoIdentifier\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIcmpEchoIdentifier.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowIcmpEchoIdentifierCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowIcmpEchoIdentifierCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowIcmpEchoIdentifierMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x82\x01\n(PatternFlowIcmpEchoSequenceNumberCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x88\x01\n*PatternFlowIcmpEchoSequenceNumberMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xc7\x03\n!PatternFlowIcmpEchoSequenceNumber\x12G\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x32.otg.PatternFlowIcmpEchoSequenceNumber.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12@\n\tincrement\x18\x05 \x01(\x0b\x32-.otg.PatternFlowIcmpEchoSequenceNumberCounter\x12@\n\tdecrement\x18\x06 \x01(\x0b\x32-.otg.PatternFlowIcmpEchoSequenceNumberCounter\x12\x44\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32/.otg.PatternFlowIcmpEchoSequenceNumberMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xdf\x02\n\x1dPatternFlowIcmpCommonChecksum\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIcmpCommonChecksum.Choice.EnumH\x00\x88\x01\x01\x12I\n\tgenerated\x18\x02 \x01(\x0e\x32\x31.otg.PatternFlowIcmpCommonChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"\x84\x01\n*PatternFlowIcmpNextFieldsIdentifierCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8a\x01\n,PatternFlowIcmpNextFieldsIdentifierMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xd1\x03\n#PatternFlowIcmpNextFieldsIdentifier\x12I\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x34.otg.PatternFlowIcmpNextFieldsIdentifier.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x42\n\tincrement\x18\x05 \x01(\x0b\x32/.otg.PatternFlowIcmpNextFieldsIdentifierCounter\x12\x42\n\tdecrement\x18\x06 \x01(\x0b\x32/.otg.PatternFlowIcmpNextFieldsIdentifierCounter\x12\x46\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x31.otg.PatternFlowIcmpNextFieldsIdentifierMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x88\x01\n.PatternFlowIcmpNextFieldsSequenceNumberCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8e\x01\n0PatternFlowIcmpNextFieldsSequenceNumberMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xe5\x03\n\'PatternFlowIcmpNextFieldsSequenceNumber\x12M\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x38.otg.PatternFlowIcmpNextFieldsSequenceNumber.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x46\n\tincrement\x18\x05 \x01(\x0b\x32\x33.otg.PatternFlowIcmpNextFieldsSequenceNumberCounter\x12\x46\n\tdecrement\x18\x06 \x01(\x0b\x32\x33.otg.PatternFlowIcmpNextFieldsSequenceNumberCounter\x12J\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x35.otg.PatternFlowIcmpNextFieldsSequenceNumberMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"z\n PatternFlowIcmpv6EchoTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x80\x01\n\"PatternFlowIcmpv6EchoTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9f\x03\n\x19PatternFlowIcmpv6EchoType\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowIcmpv6EchoType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x38\n\tincrement\x18\x05 \x01(\x0b\x32%.otg.PatternFlowIcmpv6EchoTypeCounter\x12\x38\n\tdecrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowIcmpv6EchoTypeCounter\x12<\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\'.otg.PatternFlowIcmpv6EchoTypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"z\n PatternFlowIcmpv6EchoCodeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x80\x01\n\"PatternFlowIcmpv6EchoCodeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9f\x03\n\x19PatternFlowIcmpv6EchoCode\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowIcmpv6EchoCode.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x38\n\tincrement\x18\x05 \x01(\x0b\x32%.otg.PatternFlowIcmpv6EchoCodeCounter\x12\x38\n\tdecrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowIcmpv6EchoCodeCounter\x12<\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\'.otg.PatternFlowIcmpv6EchoCodeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x80\x01\n&PatternFlowIcmpv6EchoIdentifierCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x86\x01\n(PatternFlowIcmpv6EchoIdentifierMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xbd\x03\n\x1fPatternFlowIcmpv6EchoIdentifier\x12\x45\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x30.otg.PatternFlowIcmpv6EchoIdentifier.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12>\n\tincrement\x18\x05 \x01(\x0b\x32+.otg.PatternFlowIcmpv6EchoIdentifierCounter\x12>\n\tdecrement\x18\x06 \x01(\x0b\x32+.otg.PatternFlowIcmpv6EchoIdentifierCounter\x12\x42\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32-.otg.PatternFlowIcmpv6EchoIdentifierMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x84\x01\n*PatternFlowIcmpv6EchoSequenceNumberCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8a\x01\n,PatternFlowIcmpv6EchoSequenceNumberMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xd1\x03\n#PatternFlowIcmpv6EchoSequenceNumber\x12I\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x34.otg.PatternFlowIcmpv6EchoSequenceNumber.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x42\n\tincrement\x18\x05 \x01(\x0b\x32/.otg.PatternFlowIcmpv6EchoSequenceNumberCounter\x12\x42\n\tdecrement\x18\x06 \x01(\x0b\x32/.otg.PatternFlowIcmpv6EchoSequenceNumberCounter\x12\x46\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\x31.otg.PatternFlowIcmpv6EchoSequenceNumberMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xdf\x02\n\x1dPatternFlowIcmpv6EchoChecksum\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIcmpv6EchoChecksum.Choice.EnumH\x00\x88\x01\x01\x12I\n\tgenerated\x18\x02 \x01(\x0e\x32\x31.otg.PatternFlowIcmpv6EchoChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"\xe5\x02\n\x1fPatternFlowIcmpv6CommonChecksum\x12\x45\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x30.otg.PatternFlowIcmpv6CommonChecksum.Choice.EnumH\x00\x88\x01\x01\x12K\n\tgenerated\x18\x02 \x01(\x0e\x32\x33.otg.PatternFlowIcmpv6CommonChecksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"v\n\x1cPatternFlowPppAddressCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowPppAddressMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowPppAddress\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowPppAddress.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowPppAddressCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowPppAddressCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowPppAddressMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowPppControlCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowPppControlMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowPppControl\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowPppControl.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowPppControlCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowPppControlCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowPppControlMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"{\n!PatternFlowPppProtocolTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x81\x01\n#PatternFlowPppProtocolTypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xca\x03\n\x1aPatternFlowPppProtocolType\x12@\n\x06\x63hoice\x18\x01 \x01(\x0e\x32+.otg.PatternFlowPppProtocolType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x39\n\tincrement\x18\x06 \x01(\x0b\x32&.otg.PatternFlowPppProtocolTypeCounter\x12\x39\n\tdecrement\x18\x07 \x01(\x0b\x32&.otg.PatternFlowPppProtocolTypeCounter\x12=\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32(.otg.PatternFlowPppProtocolTypeMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"y\n\x1fPatternFlowIgmpv1VersionCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x7f\n!PatternFlowIgmpv1VersionMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9a\x03\n\x18PatternFlowIgmpv1Version\x12>\n\x06\x63hoice\x18\x01 \x01(\x0e\x32).otg.PatternFlowIgmpv1Version.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x37\n\tincrement\x18\x05 \x01(\x0b\x32$.otg.PatternFlowIgmpv1VersionCounter\x12\x37\n\tdecrement\x18\x06 \x01(\x0b\x32$.otg.PatternFlowIgmpv1VersionCounter\x12;\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32&.otg.PatternFlowIgmpv1VersionMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"v\n\x1cPatternFlowIgmpv1TypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"|\n\x1ePatternFlowIgmpv1TypeMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x8b\x03\n\x15PatternFlowIgmpv1Type\x12;\n\x06\x63hoice\x18\x01 \x01(\x0e\x32&.otg.PatternFlowIgmpv1Type.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x34\n\tincrement\x18\x05 \x01(\x0b\x32!.otg.PatternFlowIgmpv1TypeCounter\x12\x34\n\tdecrement\x18\x06 \x01(\x0b\x32!.otg.PatternFlowIgmpv1TypeCounter\x12\x38\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32#.otg.PatternFlowIgmpv1TypeMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"x\n\x1ePatternFlowIgmpv1UnusedCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"~\n PatternFlowIgmpv1UnusedMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x95\x03\n\x17PatternFlowIgmpv1Unused\x12=\n\x06\x63hoice\x18\x01 \x01(\x0e\x32(.otg.PatternFlowIgmpv1Unused.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x36\n\tincrement\x18\x05 \x01(\x0b\x32#.otg.PatternFlowIgmpv1UnusedCounter\x12\x36\n\tdecrement\x18\x06 \x01(\x0b\x32#.otg.PatternFlowIgmpv1UnusedCounter\x12:\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32%.otg.PatternFlowIgmpv1UnusedMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xd3\x02\n\x19PatternFlowIgmpv1Checksum\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowIgmpv1Checksum.Choice.EnumH\x00\x88\x01\x01\x12\x45\n\tgenerated\x18\x02 \x01(\x0e\x32-.otg.PatternFlowIgmpv1Checksum.Generated.EnumH\x01\x88\x01\x01\x12\x13\n\x06\x63ustom\x18\x03 \x01(\rH\x02\x88\x01\x01\x1a<\n\x06\x43hoice\"2\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\r\n\tgenerated\x10\x01\x12\n\n\x06\x63ustom\x10\x02\x1a\x37\n\tGenerated\"*\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\x08\n\x04good\x10\x01\x12\x07\n\x03\x62\x61\x64\x10\x02\x42\t\n\x07_choiceB\x0c\n\n_generatedB\t\n\x07_custom\"~\n$PatternFlowIgmpv1GroupAddressCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x84\x01\n&PatternFlowIgmpv1GroupAddressMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xb3\x03\n\x1dPatternFlowIgmpv1GroupAddress\x12\x43\n\x06\x63hoice\x18\x01 \x01(\x0e\x32..otg.PatternFlowIgmpv1GroupAddress.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12<\n\tincrement\x18\x05 \x01(\x0b\x32).otg.PatternFlowIgmpv1GroupAddressCounter\x12<\n\tdecrement\x18\x06 \x01(\x0b\x32).otg.PatternFlowIgmpv1GroupAddressCounter\x12@\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32+.otg.PatternFlowIgmpv1GroupAddressMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"u\n\x1bPatternFlowMplsLabelCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"{\n\x1dPatternFlowMplsLabelMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xac\x03\n\x14PatternFlowMplsLabel\x12:\n\x06\x63hoice\x18\x01 \x01(\x0e\x32%.otg.PatternFlowMplsLabel.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x33\n\tincrement\x18\x06 \x01(\x0b\x32 .otg.PatternFlowMplsLabelCounter\x12\x33\n\tdecrement\x18\x07 \x01(\x0b\x32 .otg.PatternFlowMplsLabelCounter\x12\x37\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32\".otg.PatternFlowMplsLabelMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"|\n\"PatternFlowMplsTrafficClassCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x82\x01\n$PatternFlowMplsTrafficClassMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xa9\x03\n\x1bPatternFlowMplsTrafficClass\x12\x41\n\x06\x63hoice\x18\x01 \x01(\x0e\x32,.otg.PatternFlowMplsTrafficClass.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12:\n\tincrement\x18\x05 \x01(\x0b\x32\'.otg.PatternFlowMplsTrafficClassCounter\x12:\n\tdecrement\x18\x06 \x01(\x0b\x32\'.otg.PatternFlowMplsTrafficClassCounter\x12>\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32).otg.PatternFlowMplsTrafficClassMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"}\n#PatternFlowMplsBottomOfStackCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x83\x01\n%PatternFlowMplsBottomOfStackMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\xd4\x03\n\x1cPatternFlowMplsBottomOfStack\x12\x42\n\x06\x63hoice\x18\x01 \x01(\x0e\x32-.otg.PatternFlowMplsBottomOfStack.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x11\n\x04\x61uto\x18\x04 \x01(\rH\x02\x88\x01\x01\x12;\n\tincrement\x18\x06 \x01(\x0b\x32(.otg.PatternFlowMplsBottomOfStackCounter\x12;\n\tdecrement\x18\x07 \x01(\x0b\x32(.otg.PatternFlowMplsBottomOfStackCounter\x12?\n\x0bmetric_tags\x18\x08 \x03(\x0b\x32*.otg.PatternFlowMplsBottomOfStackMetricTag\x1a`\n\x06\x43hoice\"V\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\x08\n\x04\x61uto\x10\x01\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_valueB\x07\n\x05_auto\"z\n PatternFlowMplsTimeToLiveCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x80\x01\n\"PatternFlowMplsTimeToLiveMetricTag\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06offset\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06length\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_offsetB\t\n\x07_length\"\x9f\x03\n\x19PatternFlowMplsTimeToLive\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowMplsTimeToLive.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x38\n\tincrement\x18\x05 \x01(\x0b\x32%.otg.PatternFlowMplsTimeToLiveCounter\x12\x38\n\tdecrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowMplsTimeToLiveCounter\x12<\n\x0bmetric_tags\x18\x07 \x03(\x0b\x32\'.otg.PatternFlowMplsTimeToLiveMetricTag\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"z\n PatternFlowSnmpv2cVersionCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xe1\x02\n\x19PatternFlowSnmpv2cVersion\x12?\n\x06\x63hoice\x18\x01 \x01(\x0e\x32*.otg.PatternFlowSnmpv2cVersion.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x38\n\tincrement\x18\x05 \x01(\x0b\x32%.otg.PatternFlowSnmpv2cVersionCounter\x12\x38\n\tdecrement\x18\x06 \x01(\x0b\x32%.otg.PatternFlowSnmpv2cVersionCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x7f\n%PatternFlowSnmpv2cPDURequestIdCounter\x12\x12\n\x05start\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\x05H\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xf5\x02\n\x1ePatternFlowSnmpv2cPDURequestId\x12\x44\n\x06\x63hoice\x18\x01 \x01(\x0e\x32/.otg.PatternFlowSnmpv2cPDURequestId.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\x05\x12=\n\tincrement\x18\x05 \x01(\x0b\x32*.otg.PatternFlowSnmpv2cPDURequestIdCounter\x12=\n\tdecrement\x18\x06 \x01(\x0b\x32*.otg.PatternFlowSnmpv2cPDURequestIdCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x80\x01\n&PatternFlowSnmpv2cPDUErrorIndexCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xf9\x02\n\x1fPatternFlowSnmpv2cPDUErrorIndex\x12\x45\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x30.otg.PatternFlowSnmpv2cPDUErrorIndex.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12>\n\tincrement\x18\x05 \x01(\x0b\x32+.otg.PatternFlowSnmpv2cPDUErrorIndexCounter\x12>\n\tdecrement\x18\x06 \x01(\x0b\x32+.otg.PatternFlowSnmpv2cPDUErrorIndexCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x83\x01\n)PatternFlowSnmpv2cBulkPDURequestIdCounter\x12\x12\n\x05start\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\x05H\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x85\x03\n\"PatternFlowSnmpv2cBulkPDURequestId\x12H\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x33.otg.PatternFlowSnmpv2cBulkPDURequestId.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\x05\x12\x41\n\tincrement\x18\x05 \x01(\x0b\x32..otg.PatternFlowSnmpv2cBulkPDURequestIdCounter\x12\x41\n\tdecrement\x18\x06 \x01(\x0b\x32..otg.PatternFlowSnmpv2cBulkPDURequestIdCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xe7\x01\n%PatternFlowSnmpv2cBulkPDUNonRepeaters\x12K\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x36.otg.PatternFlowSnmpv2cBulkPDUNonRepeaters.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x1a\x38\n\x06\x43hoice\".\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x42\t\n\x07_choiceB\x08\n\x06_value\"\x88\x01\n.PatternFlowSnmpv2cBulkPDUMaxRepetitionsCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x99\x03\n\'PatternFlowSnmpv2cBulkPDUMaxRepetitions\x12M\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x38.otg.PatternFlowSnmpv2cBulkPDUMaxRepetitions.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x46\n\tincrement\x18\x05 \x01(\x0b\x32\x33.otg.PatternFlowSnmpv2cBulkPDUMaxRepetitionsCounter\x12\x46\n\tdecrement\x18\x06 \x01(\x0b\x32\x33.otg.PatternFlowSnmpv2cBulkPDUMaxRepetitionsCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x93\x01\n9PatternFlowSnmpv2cVariableBindingValueIntegerValueCounter\x12\x12\n\x05start\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\x05H\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xc5\x03\n2PatternFlowSnmpv2cVariableBindingValueIntegerValue\x12X\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x43.otg.PatternFlowSnmpv2cVariableBindingValueIntegerValue.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\x05\x12Q\n\tincrement\x18\x05 \x01(\x0b\x32>.otg.PatternFlowSnmpv2cVariableBindingValueIntegerValueCounter\x12Q\n\tdecrement\x18\x06 \x01(\x0b\x32>.otg.PatternFlowSnmpv2cVariableBindingValueIntegerValueCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x95\x01\n;PatternFlowSnmpv2cVariableBindingValueIpAddressValueCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xcd\x03\n4PatternFlowSnmpv2cVariableBindingValueIpAddressValue\x12Z\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x45.otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValue.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12S\n\tincrement\x18\x05 \x01(\x0b\x32@.otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValueCounter\x12S\n\tdecrement\x18\x06 \x01(\x0b\x32@.otg.PatternFlowSnmpv2cVariableBindingValueIpAddressValueCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x93\x01\n9PatternFlowSnmpv2cVariableBindingValueCounterValueCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xc5\x03\n2PatternFlowSnmpv2cVariableBindingValueCounterValue\x12X\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x43.otg.PatternFlowSnmpv2cVariableBindingValueCounterValue.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12Q\n\tincrement\x18\x05 \x01(\x0b\x32>.otg.PatternFlowSnmpv2cVariableBindingValueCounterValueCounter\x12Q\n\tdecrement\x18\x06 \x01(\x0b\x32>.otg.PatternFlowSnmpv2cVariableBindingValueCounterValueCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x95\x01\n;PatternFlowSnmpv2cVariableBindingValueTimeticksValueCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xcd\x03\n4PatternFlowSnmpv2cVariableBindingValueTimeticksValue\x12Z\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x45.otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValue.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12S\n\tincrement\x18\x05 \x01(\x0b\x32@.otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValueCounter\x12S\n\tdecrement\x18\x06 \x01(\x0b\x32@.otg.PatternFlowSnmpv2cVariableBindingValueTimeticksValueCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x96\x01\n.otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter\x12Q\n\tdecrement\x18\x06 \x01(\x0b\x32>.otg.PatternFlowRSVPPathSenderTspecIntServOverallLengthCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x93\x01\n9PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xc5\x03\n2PatternFlowRSVPPathSenderTspecIntServServiceHeader\x12X\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x43.otg.PatternFlowRSVPPathSenderTspecIntServServiceHeader.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12Q\n\tincrement\x18\x05 \x01(\x0b\x32>.otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter\x12Q\n\tdecrement\x18\x06 \x01(\x0b\x32>.otg.PatternFlowRSVPPathSenderTspecIntServServiceHeaderCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x8d\x01\n3PatternFlowRSVPPathSenderTspecIntServZeroBitCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xad\x03\n,PatternFlowRSVPPathSenderTspecIntServZeroBit\x12R\n\x06\x63hoice\x18\x01 \x01(\x0e\x32=.otg.PatternFlowRSVPPathSenderTspecIntServZeroBit.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12K\n\tincrement\x18\x05 \x01(\x0b\x32\x38.otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter\x12K\n\tdecrement\x18\x06 \x01(\x0b\x32\x38.otg.PatternFlowRSVPPathSenderTspecIntServZeroBitCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x8f\x01\n5PatternFlowRSVPPathSenderTspecIntServReserved2Counter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xb5\x03\n.PatternFlowRSVPPathSenderTspecIntServReserved2\x12T\n\x06\x63hoice\x18\x01 \x01(\x0e\x32?.otg.PatternFlowRSVPPathSenderTspecIntServReserved2.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12M\n\tincrement\x18\x05 \x01(\x0b\x32:.otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter\x12M\n\tdecrement\x18\x06 \x01(\x0b\x32:.otg.PatternFlowRSVPPathSenderTspecIntServReserved2Counter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x99\x01\n?PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xdd\x03\n8PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData\x12^\n\x06\x63hoice\x18\x01 \x01(\x0e\x32I.otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceData.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12W\n\tincrement\x18\x05 \x01(\x0b\x32\x44.otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter\x12W\n\tdecrement\x18\x06 \x01(\x0b\x32\x44.otg.PatternFlowRSVPPathSenderTspecIntServLengthOfServiceDataCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xa1\x01\nGPatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xfd\x03\n@PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec\x12\x66\n\x06\x63hoice\x18\x01 \x01(\x0e\x32Q.otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspec.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12_\n\tincrement\x18\x05 \x01(\x0b\x32L.otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter\x12_\n\tdecrement\x18\x06 \x01(\x0b\x32L.otg.PatternFlowRSVPPathSenderTspecIntServParameterIdTokenBucketTspecCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x96\x01\nPatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xd9\x03\n7PatternFlowRSVPPathSenderTspecIntServParameter127Length\x12]\n\x06\x63hoice\x18\x01 \x01(\x0e\x32H.otg.PatternFlowRSVPPathSenderTspecIntServParameter127Length.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12V\n\tincrement\x18\x05 \x01(\x0b\x32\x43.otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter\x12V\n\tdecrement\x18\x06 \x01(\x0b\x32\x43.otg.PatternFlowRSVPPathSenderTspecIntServParameter127LengthCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x98\x01\n>PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xd9\x03\n7PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit\x12]\n\x06\x63hoice\x18\x01 \x01(\x0e\x32H.otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnit.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12V\n\tincrement\x18\x05 \x01(\x0b\x32\x43.otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter\x12V\n\tdecrement\x18\x06 \x01(\x0b\x32\x43.otg.PatternFlowRSVPPathSenderTspecIntServMinimumPolicedUnitCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x97\x01\n=PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xd5\x03\n6PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize\x12\\\n\x06\x63hoice\x18\x01 \x01(\x0e\x32G.otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSize.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12U\n\tincrement\x18\x05 \x01(\x0b\x32\x42.otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter\x12U\n\tdecrement\x18\x06 \x01(\x0b\x32\x42.otg.PatternFlowRSVPPathSenderTspecIntServMaximumPacketSizeCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x9a\x01\n@PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter\x12\x12\n\x05start\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xe1\x03\n9PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address\x12_\n\x06\x63hoice\x18\x01 \x01(\x0e\x32J.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4Address.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\t\x12X\n\tincrement\x18\x05 \x01(\x0b\x32\x45.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter\x12X\n\tdecrement\x18\x06 \x01(\x0b\x32\x45.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressIpv4AddressCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x9b\x01\nAPatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\xe5\x03\n:PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength\x12`\n\x06\x63hoice\x18\x01 \x01(\x0e\x32K.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLength.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12Y\n\tincrement\x18\x05 \x01(\x0b\x32\x46.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter\x12Y\n\tdecrement\x18\x06 \x01(\x0b\x32\x46.otg.PatternFlowRSVPPathRecordRouteType1Ipv4AddressPrefixLengthCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\xf7\x01\n-PatternFlowRSVPPathRecordRouteType1LabelFlags\x12S\n\x06\x63hoice\x18\x01 \x01(\x0e\x32>.otg.PatternFlowRSVPPathRecordRouteType1LabelFlags.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x1a\x38\n\x06\x43hoice\".\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x42\t\n\x07_choiceB\x08\n\x06_value\"\xf7\x01\n-PatternFlowRSVPPathRecordRouteType1LabelCType\x12S\n\x06\x63hoice\x18\x01 \x01(\x0e\x32>.otg.PatternFlowRSVPPathRecordRouteType1LabelCType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x1a\x38\n\x06\x43hoice\".\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x42\t\n\x07_choiceB\x08\n\x06_value\"\x85\x01\n+PatternFlowRSVPPathObjectsCustomTypeCounter\x12\x12\n\x05start\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04step\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_startB\x07\n\x05_stepB\x08\n\x06_count\"\x8d\x03\n$PatternFlowRSVPPathObjectsCustomType\x12J\n\x06\x63hoice\x18\x01 \x01(\x0e\x32\x35.otg.PatternFlowRSVPPathObjectsCustomType.Choice.EnumH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x0e\n\x06values\x18\x03 \x03(\r\x12\x43\n\tincrement\x18\x05 \x01(\x0b\x32\x30.otg.PatternFlowRSVPPathObjectsCustomTypeCounter\x12\x43\n\tdecrement\x18\x06 \x01(\x0b\x32\x30.otg.PatternFlowRSVPPathObjectsCustomTypeCounter\x1aV\n\x06\x43hoice\"L\n\x04\x45num\x12\x0f\n\x0bunspecified\x10\x00\x12\t\n\x05value\x10\x02\x12\n\n\x06values\x10\x03\x12\r\n\tincrement\x10\x04\x12\r\n\tdecrement\x10\x05\x42\t\n\x07_choiceB\x08\n\x06_value\"\x91\x01\n\x07Version\x12\x1d\n\x10\x61pi_spec_version\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bsdk_version\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0b\x61pp_version\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x13\n\x11_api_spec_versionB\x0e\n\x0c_sdk_versionB\x0e\n\x0c_app_version\"(\n\x07Success\x12\x1d\n\x07warning\x18\x01 \x01(\x0b\x32\x0c.otg.Warning\"$\n\x07\x46\x61ilure\x12\x19\n\x05\x65rror\x18\x01 \x01(\x0b\x32\n.otg.Error\"/\n\x10SetConfigRequest\x12\x1b\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x0b.otg.Config\"?\n\x13UpdateConfigRequest\x12(\n\rconfig_update\x18\x01 \x01(\x0b\x32\x11.otg.ConfigUpdate\"2\n\x11SetConfigResponse\x12\x1d\n\x07warning\x18\x01 \x01(\x0b\x32\x0c.otg.Warning\"0\n\x11GetConfigResponse\x12\x1b\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x0b.otg.Config\"5\n\x14UpdateConfigResponse\x12\x1d\n\x07warning\x18\x01 \x01(\x0b\x32\x0c.otg.Warning\"B\n\x16SetControlStateRequest\x12(\n\rcontrol_state\x18\x01 \x01(\x0b\x32\x11.otg.ControlState\"8\n\x17SetControlStateResponse\x12\x1d\n\x07warning\x18\x01 \x01(\x0b\x32\x0c.otg.Warning\"E\n\x17SetControlActionRequest\x12*\n\x0e\x63ontrol_action\x18\x01 \x01(\x0b\x32\x12.otg.ControlAction\"W\n\x18SetControlActionResponse\x12;\n\x17\x63ontrol_action_response\x18\x01 \x01(\x0b\x32\x1a.otg.ControlActionResponse\"A\n\x11GetMetricsRequest\x12,\n\x0fmetrics_request\x18\x01 \x01(\x0b\x32\x13.otg.MetricsRequest\"D\n\x12GetMetricsResponse\x12.\n\x10metrics_response\x18\x01 \x01(\x0b\x32\x14.otg.MetricsResponse\">\n\x10GetStatesRequest\x12*\n\x0estates_request\x18\x01 \x01(\x0b\x32\x12.otg.StatesRequest\"A\n\x11GetStatesResponse\x12,\n\x0fstates_response\x18\x01 \x01(\x0b\x32\x13.otg.StatesResponse\"A\n\x11GetCaptureRequest\x12,\n\x0f\x63\x61pture_request\x18\x01 \x01(\x0b\x32\x13.otg.CaptureRequest\",\n\x12GetCaptureResponse\x12\x16\n\x0eresponse_bytes\x18\x01 \x01(\x0c\"3\n\x12GetVersionResponse\x12\x1d\n\x07version\x18\x01 \x01(\x0b\x32\x0c.otg.Version2\xdf\x04\n\x07Openapi\x12:\n\tSetConfig\x12\x15.otg.SetConfigRequest\x1a\x16.otg.SetConfigResponse\x12;\n\tGetConfig\x12\x16.google.protobuf.Empty\x1a\x16.otg.GetConfigResponse\x12\x43\n\x0cUpdateConfig\x12\x18.otg.UpdateConfigRequest\x1a\x19.otg.UpdateConfigResponse\x12L\n\x0fSetControlState\x12\x1b.otg.SetControlStateRequest\x1a\x1c.otg.SetControlStateResponse\x12O\n\x10SetControlAction\x12\x1c.otg.SetControlActionRequest\x1a\x1d.otg.SetControlActionResponse\x12=\n\nGetMetrics\x12\x16.otg.GetMetricsRequest\x1a\x17.otg.GetMetricsResponse\x12:\n\tGetStates\x12\x15.otg.GetStatesRequest\x1a\x16.otg.GetStatesResponse\x12=\n\nGetCapture\x12\x16.otg.GetCaptureRequest\x1a\x17.otg.GetCaptureResponse\x12=\n\nGetVersion\x12\x16.google.protobuf.Empty\x1a\x17.otg.GetVersionResponseB\x0bZ\t./otg;otgb\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'otg_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'otg_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'Z\t./otg;otg' - _CONFIG._serialized_start=82 - _CONFIG._serialized_end=347 - _CONFIGOPTIONS._serialized_start=349 - _CONFIGOPTIONS._serialized_end=452 - _PORT._serialized_start=454 - _PORT._serialized_end=524 - _PORTOPTIONS._serialized_start=526 - _PORTOPTIONS._serialized_end=597 - _LAG._serialized_start=600 - _LAG._serialized_end=736 - _LAGPORT._serialized_start=738 - _LAGPORT._serialized_end=860 - _LAGPROTOCOL._serialized_start=863 - _LAGPROTOCOL._serialized_end=1071 - _LAGPROTOCOL_CHOICE._serialized_start=1005 - _LAGPROTOCOL_CHOICE._serialized_end=1060 - _LAGPROTOCOL_CHOICE_ENUM._serialized_start=1015 - _LAGPROTOCOL_CHOICE_ENUM._serialized_end=1060 - _LAGPROTOCOLSTATIC._serialized_start=1073 - _LAGPROTOCOLSTATIC._serialized_end=1124 - _LAGPROTOCOLLACP._serialized_start=1127 - _LAGPROTOCOLLACP._serialized_end=1294 - _LAGPORTLACP._serialized_start=1297 - _LAGPORTLACP._serialized_end=1700 - _LAGPORTLACP_ACTORACTIVITY._serialized_start=1517 - _LAGPORTLACP_ACTORACTIVITY._serialized_end=1582 - _LAGPORTLACP_ACTORACTIVITY_ENUM._serialized_start=1534 - _LAGPORTLACP_ACTORACTIVITY_ENUM._serialized_end=1582 - _DEVICEETHERNETBASE._serialized_start=1703 - _DEVICEETHERNETBASE._serialized_end=1835 - _DEVICEETHERNET._serialized_start=1838 - _DEVICEETHERNET._serialized_end=2093 - _ETHERNETCONNECTION._serialized_start=2096 - _ETHERNETCONNECTION._serialized_end=2379 - _ETHERNETCONNECTION_CHOICE._serialized_start=2248 - _ETHERNETCONNECTION_CHOICE._serialized_end=2326 - _ETHERNETCONNECTION_CHOICE_ENUM._serialized_start=2258 - _ETHERNETCONNECTION_CHOICE_ENUM._serialized_end=2326 - _DEVICEVLAN._serialized_start=2382 - _DEVICEVLAN._serialized_end=2625 - _DEVICEVLAN_TPID._serialized_start=2501 - _DEVICEVLAN_TPID._serialized_end=2587 - _DEVICEVLAN_TPID_ENUM._serialized_start=2509 - _DEVICEVLAN_TPID_ENUM._serialized_end=2587 - _DEVICEIPV4._serialized_start=2628 - _DEVICEIPV4._serialized_end=2816 - _DEVICEIPV4LOOPBACK._serialized_start=2818 - _DEVICEIPV4LOOPBACK._serialized_end=2936 - _DEVICEIPV4GATEWAYMAC._serialized_start=2939 - _DEVICEIPV4GATEWAYMAC._serialized_end=3146 - _DEVICEIPV4GATEWAYMAC_CHOICE._serialized_start=3062 - _DEVICEIPV4GATEWAYMAC_CHOICE._serialized_end=3116 - _DEVICEIPV4GATEWAYMAC_CHOICE_ENUM._serialized_start=3072 - _DEVICEIPV4GATEWAYMAC_CHOICE_ENUM._serialized_end=3116 - _DEVICEIPV6._serialized_start=3149 - _DEVICEIPV6._serialized_end=3337 - _DEVICEIPV6LOOPBACK._serialized_start=3339 - _DEVICEIPV6LOOPBACK._serialized_end=3457 - _DEVICEIPV6GATEWAYMAC._serialized_start=3460 - _DEVICEIPV6GATEWAYMAC._serialized_end=3667 - _DEVICEIPV6GATEWAYMAC_CHOICE._serialized_start=3062 - _DEVICEIPV6GATEWAYMAC_CHOICE._serialized_end=3116 - _DEVICEIPV6GATEWAYMAC_CHOICE_ENUM._serialized_start=3072 - _DEVICEIPV6GATEWAYMAC_CHOICE_ENUM._serialized_end=3116 - _LAYER1._serialized_start=3670 - _LAYER1._serialized_end=4476 - _LAYER1_SPEED._serialized_start=4015 - _LAYER1_SPEED._serialized_end=4312 - _LAYER1_SPEED_ENUM._serialized_start=4025 - _LAYER1_SPEED_ENUM._serialized_end=4312 - _LAYER1_MEDIA._serialized_start=4314 - _LAYER1_MEDIA._serialized_end=4380 - _LAYER1_MEDIA_ENUM._serialized_start=4323 - _LAYER1_MEDIA_ENUM._serialized_end=4380 - _LAYER1AUTONEGOTIATION._serialized_start=4479 - _LAYER1AUTONEGOTIATION._serialized_end=4882 - _LAYER1FLOWCONTROL._serialized_start=4885 - _LAYER1FLOWCONTROL._serialized_end=5185 - _LAYER1FLOWCONTROL_CHOICE._serialized_start=5084 - _LAYER1FLOWCONTROL_CHOICE._serialized_end=5153 - _LAYER1FLOWCONTROL_CHOICE_ENUM._serialized_start=5094 - _LAYER1FLOWCONTROL_CHOICE_ENUM._serialized_end=5153 - _LAYER1IEEE8023X._serialized_start=5187 - _LAYER1IEEE8023X._serialized_end=5204 - _LAYER1IEEE8021QBB._serialized_start=5207 - _LAYER1IEEE8021QBB._serialized_end=5600 - _CAPTURE._serialized_start=5603 - _CAPTURE._serialized_end=5892 - _CAPTURE_FORMAT._serialized_start=5787 - _CAPTURE_FORMAT._serialized_end=5842 - _CAPTURE_FORMAT_ENUM._serialized_start=5797 - _CAPTURE_FORMAT_ENUM._serialized_end=5842 - _CAPTUREFILTER._serialized_start=5895 - _CAPTUREFILTER._serialized_end=6237 - _CAPTUREFILTER_CHOICE._serialized_start=6137 - _CAPTUREFILTER_CHOICE._serialized_end=6226 - _CAPTUREFILTER_CHOICE_ENUM._serialized_start=6147 - _CAPTUREFILTER_CHOICE_ENUM._serialized_end=6226 - _CAPTURECUSTOM._serialized_start=6240 - _CAPTURECUSTOM._serialized_end=6417 - _CAPTUREFIELD._serialized_start=6419 - _CAPTUREFIELD._serialized_end=6523 - _CAPTUREETHERNET._serialized_start=6526 - _CAPTUREETHERNET._serialized_end=6684 - _CAPTUREVLAN._serialized_start=6687 - _CAPTUREVLAN._serialized_end=6837 - _CAPTUREIPV4._serialized_start=6840 - _CAPTUREIPV4._serialized_end=7404 - _CAPTUREIPV6._serialized_start=7407 - _CAPTUREIPV6._serialized_end=7722 - _DEVICE._serialized_start=7725 - _DEVICE._serialized_end=8035 - _PROTOCOLOPTIONS._serialized_start=8037 - _PROTOCOLOPTIONS._serialized_end=8102 - _DEVICEISISROUTER._serialized_start=8105 - _DEVICEISISROUTER._serialized_end=8475 - _DEVICEISISMULTIINSTANCE._serialized_start=8477 - _DEVICEISISMULTIINSTANCE._serialized_end=8543 - _ISISINTERFACE._serialized_start=8546 - _ISISINTERFACE._serialized_end=9331 - _ISISINTERFACE_NETWORKTYPE._serialized_start=9114 - _ISISINTERFACE_NETWORKTYPE._serialized_end=9187 - _ISISINTERFACE_NETWORKTYPE_ENUM._serialized_start=9129 - _ISISINTERFACE_NETWORKTYPE_ENUM._serialized_end=9187 - _ISISINTERFACE_LEVELTYPE._serialized_start=9189 - _ISISINTERFACE_LEVELTYPE._serialized_end=9266 - _ISISINTERFACE_LEVELTYPE_ENUM._serialized_start=9202 - _ISISINTERFACE_LEVELTYPE_ENUM._serialized_end=9266 - _ISISINTERFACELEVEL._serialized_start=9334 - _ISISINTERFACELEVEL._serialized_end=9484 - _ISISMT._serialized_start=9486 - _ISISMT._serialized_end=9566 - _LINKSTATETE._serialized_start=9569 - _LINKSTATETE._serialized_end=9861 - _LINKSTATEPRIORITYBANDWIDTHS._serialized_start=9864 - _LINKSTATEPRIORITYBANDWIDTHS._serialized_end=10101 - _ISISINTERFACEAUTHENTICATION._serialized_start=10104 - _ISISINTERFACEAUTHENTICATION._serialized_end=10341 - _ISISINTERFACEAUTHENTICATION_AUTHTYPE._serialized_start=10248 - _ISISINTERFACEAUTHENTICATION_AUTHTYPE._serialized_end=10306 - _ISISINTERFACEAUTHENTICATION_AUTHTYPE_ENUM._serialized_start=10260 - _ISISINTERFACEAUTHENTICATION_AUTHTYPE_ENUM._serialized_end=10306 - _ISISINTERFACEADVANCED._serialized_start=10344 - _ISISINTERFACEADVANCED._serialized_end=10683 - _ISISINTERFACELINKPROTECTION._serialized_start=10686 - _ISISINTERFACELINKPROTECTION._serialized_end=11063 - _ISISBASIC._serialized_start=11066 - _ISISBASIC._serialized_end=11279 - _ISISADVANCED._serialized_start=11282 - _ISISADVANCED._serialized_end=11804 - _ISISAUTHENTICATION._serialized_start=11807 - _ISISAUTHENTICATION._serialized_end=11981 - _ISISAUTHENTICATIONBASE._serialized_start=11984 - _ISISAUTHENTICATIONBASE._serialized_end=12211 - _ISISAUTHENTICATIONBASE_AUTHTYPE._serialized_start=10248 - _ISISAUTHENTICATIONBASE_AUTHTYPE._serialized_end=10306 - _ISISAUTHENTICATIONBASE_AUTHTYPE_ENUM._serialized_start=10260 - _ISISAUTHENTICATIONBASE_AUTHTYPE_ENUM._serialized_end=10306 - _ISISV4ROUTERANGE._serialized_start=12214 - _ISISV4ROUTERANGE._serialized_end=12814 - _ISISV4ROUTERANGE_ORIGINTYPE._serialized_start=12562 - _ISISV4ROUTERANGE_ORIGINTYPE._serialized_end=12627 - _ISISV4ROUTERANGE_ORIGINTYPE_ENUM._serialized_start=12576 - _ISISV4ROUTERANGE_ORIGINTYPE_ENUM._serialized_end=12627 - _ISISV4ROUTERANGE_REDISTRIBUTIONTYPE._serialized_start=12629 - _ISISV4ROUTERANGE_REDISTRIBUTIONTYPE._serialized_end=12692 - _ISISV4ROUTERANGE_REDISTRIBUTIONTYPE_ENUM._serialized_start=12651 - _ISISV4ROUTERANGE_REDISTRIBUTIONTYPE_ENUM._serialized_end=12692 - _V4ROUTEADDRESS._serialized_start=12817 - _V4ROUTEADDRESS._serialized_end=12957 - _V6ROUTEADDRESS._serialized_start=12960 - _V6ROUTEADDRESS._serialized_end=13100 - _MACROUTEADDRESS._serialized_start=13103 - _MACROUTEADDRESS._serialized_end=13244 - _ISISV6ROUTERANGE._serialized_start=13247 - _ISISV6ROUTERANGE._serialized_end=13847 - _ISISV6ROUTERANGE_ORIGINTYPE._serialized_start=12562 - _ISISV6ROUTERANGE_ORIGINTYPE._serialized_end=12627 - _ISISV6ROUTERANGE_ORIGINTYPE_ENUM._serialized_start=12576 - _ISISV6ROUTERANGE_ORIGINTYPE_ENUM._serialized_end=12627 - _ISISV6ROUTERANGE_REDISTRIBUTIONTYPE._serialized_start=12629 - _ISISV6ROUTERANGE_REDISTRIBUTIONTYPE._serialized_end=12692 - _ISISV6ROUTERANGE_REDISTRIBUTIONTYPE_ENUM._serialized_start=12651 - _ISISV6ROUTERANGE_REDISTRIBUTIONTYPE_ENUM._serialized_end=12692 - _DEVICEBGPROUTER._serialized_start=13850 - _DEVICEBGPROUTER._serialized_end=13997 - _DEVICEBGPMESSAGEHEADERERROR._serialized_start=14000 - _DEVICEBGPMESSAGEHEADERERROR._serialized_end=14272 - _DEVICEBGPMESSAGEHEADERERROR_SUBCODE._serialized_start=14101 - _DEVICEBGPMESSAGEHEADERERROR_SUBCODE._serialized_end=14260 - _DEVICEBGPMESSAGEHEADERERROR_SUBCODE_ENUM._serialized_start=14113 - _DEVICEBGPMESSAGEHEADERERROR_SUBCODE_ENUM._serialized_end=14260 - _DEVICEBGPOPENMESSAGEERROR._serialized_start=14275 - _DEVICEBGPOPENMESSAGEERROR._serialized_end=14701 - _DEVICEBGPOPENMESSAGEERROR_SUBCODE._serialized_start=14372 - _DEVICEBGPOPENMESSAGEERROR_SUBCODE._serialized_end=14689 - _DEVICEBGPOPENMESSAGEERROR_SUBCODE_ENUM._serialized_start=14384 - _DEVICEBGPOPENMESSAGEERROR_SUBCODE_ENUM._serialized_end=14689 - _DEVICEBGPUPDATEMESSAGEERROR._serialized_start=14704 - _DEVICEBGPUPDATEMESSAGEERROR._serialized_end=15308 - _DEVICEBGPUPDATEMESSAGEERROR_SUBCODE._serialized_start=14805 - _DEVICEBGPUPDATEMESSAGEERROR_SUBCODE._serialized_end=15296 - _DEVICEBGPUPDATEMESSAGEERROR_SUBCODE_ENUM._serialized_start=14817 - _DEVICEBGPUPDATEMESSAGEERROR_SUBCODE_ENUM._serialized_end=15296 - _DEVICEBGPHOLDTIMEREXPIRED._serialized_start=15310 - _DEVICEBGPHOLDTIMEREXPIRED._serialized_end=15337 - _DEVICEBGPFINITESTATEMACHINEERROR._serialized_start=15339 - _DEVICEBGPFINITESTATEMACHINEERROR._serialized_end=15373 - _DEVICEBGPCEASEERROR._serialized_start=15376 - _DEVICEBGPCEASEERROR._serialized_end=15859 - _DEVICEBGPCEASEERROR_SUBCODE._serialized_start=15461 - _DEVICEBGPCEASEERROR_SUBCODE._serialized_end=15847 - _DEVICEBGPCEASEERROR_SUBCODE_ENUM._serialized_start=15473 - _DEVICEBGPCEASEERROR_SUBCODE_ENUM._serialized_end=15847 - _DEVICEBGPCUSTOMERROR._serialized_start=15861 - _DEVICEBGPCUSTOMERROR._serialized_end=15945 - _BGPV4PEER._serialized_start=15948 - _BGPV4PEER._serialized_end=16812 - _BGPV4PEER_ASTYPE._serialized_start=16626 - _BGPV4PEER_ASTYPE._serialized_end=16679 - _BGPV4PEER_ASTYPE_ENUM._serialized_start=16636 - _BGPV4PEER_ASTYPE_ENUM._serialized_end=16679 - _BGPV4PEER_ASNUMBERWIDTH._serialized_start=16681 - _BGPV4PEER_ASNUMBERWIDTH._serialized_end=16740 - _BGPV4PEER_ASNUMBERWIDTH_ENUM._serialized_start=16698 - _BGPV4PEER_ASNUMBERWIDTH_ENUM._serialized_end=16740 - _BGPV4INTERFACE._serialized_start=16814 - _BGPV4INTERFACE._serialized_end=16899 - _BGPV4ETHERNETSEGMENT._serialized_start=16902 - _BGPV4ETHERNETSEGMENT._serialized_end=17398 - _BGPV4ETHERNETSEGMENT_ACTIVEMODE._serialized_start=17288 - _BGPV4ETHERNETSEGMENT_ACTIVEMODE._serialized_end=17360 - _BGPV4ETHERNETSEGMENT_ACTIVEMODE_ENUM._serialized_start=17302 - _BGPV4ETHERNETSEGMENT_ACTIVEMODE_ENUM._serialized_end=17360 - _BGPETHERNETSEGMENTDFELECTION._serialized_start=17400 - _BGPETHERNETSEGMENTDFELECTION._serialized_end=17478 - _BGPROUTEADVANCED._serialized_start=17481 - _BGPROUTEADVANCED._serialized_end=17955 - _BGPROUTEADVANCED_ORIGIN._serialized_start=17742 - _BGPROUTEADVANCED_ORIGIN._serialized_end=17809 - _BGPROUTEADVANCED_ORIGIN_ENUM._serialized_start=17752 - _BGPROUTEADVANCED_ORIGIN_ENUM._serialized_end=17809 - _BGPCOMMUNITY._serialized_start=17958 - _BGPCOMMUNITY._serialized_end=18250 - _BGPCOMMUNITY_TYPE._serialized_start=18071 - _BGPCOMMUNITY_TYPE._serialized_end=18213 - _BGPCOMMUNITY_TYPE_ENUM._serialized_start=18080 - _BGPCOMMUNITY_TYPE_ENUM._serialized_end=18213 - _BGPEXTCOMMUNITY._serialized_start=18253 - _BGPEXTCOMMUNITY._serialized_end=18758 - _BGPEXTCOMMUNITY_TYPE._serialized_start=18401 - _BGPEXTCOMMUNITY_TYPE._serialized_end=18589 - _BGPEXTCOMMUNITY_TYPE_ENUM._serialized_start=18410 - _BGPEXTCOMMUNITY_TYPE_ENUM._serialized_end=18589 - _BGPEXTCOMMUNITY_SUBTYPE._serialized_start=18592 - _BGPEXTCOMMUNITY_SUBTYPE._serialized_end=18727 - _BGPEXTCOMMUNITY_SUBTYPE_ENUM._serialized_start=18603 - _BGPEXTCOMMUNITY_SUBTYPE_ENUM._serialized_end=18727 - _BGPASPATH._serialized_start=18761 - _BGPASPATH._serialized_end=19079 - _BGPASPATH_ASSETMODE._serialized_start=18873 - _BGPASPATH_ASSETMODE._serialized_end=19063 - _BGPASPATH_ASSETMODE_ENUM._serialized_start=18887 - _BGPASPATH_ASSETMODE_ENUM._serialized_end=19063 - _BGPASPATHSEGMENT._serialized_start=19082 - _BGPASPATHSEGMENT._serialized_end=19276 - _BGPASPATHSEGMENT_TYPE._serialized_start=19174 - _BGPASPATHSEGMENT_TYPE._serialized_end=19267 - _BGPASPATHSEGMENT_TYPE_ENUM._serialized_start=19182 - _BGPASPATHSEGMENT_TYPE_ENUM._serialized_end=19267 - _BGPV4EVPNEVIS._serialized_start=19279 - _BGPV4EVPNEVIS._serialized_end=19447 - _BGPV4EVPNEVIS_CHOICE._serialized_start=19388 - _BGPV4EVPNEVIS_CHOICE._serialized_end=19436 - _BGPV4EVPNEVIS_CHOICE_ENUM._serialized_start=19398 - _BGPV4EVPNEVIS_CHOICE_ENUM._serialized_end=19436 - _BGPV4EVIVXLAN._serialized_start=19450 - _BGPV4EVIVXLAN._serialized_end=20189 - _BGPV4EVIVXLAN_REPLICATIONTYPE._serialized_start=20073 - _BGPV4EVIVXLAN_REPLICATIONTYPE._serialized_end=20140 - _BGPV4EVIVXLAN_REPLICATIONTYPE_ENUM._serialized_start=20092 - _BGPV4EVIVXLAN_REPLICATIONTYPE_ENUM._serialized_end=20140 - _BGPV4EVIVXLANBROADCASTDOMAIN._serialized_start=20192 - _BGPV4EVIVXLANBROADCASTDOMAIN._serialized_end=20372 - _BGPCMACIPRANGE._serialized_start=20375 - _BGPCMACIPRANGE._serialized_end=20841 - _BGPROUTEDISTINGUISHER._serialized_start=20844 - _BGPROUTEDISTINGUISHER._serialized_end=21124 - _BGPROUTEDISTINGUISHER_RDTYPE._serialized_start=20991 - _BGPROUTEDISTINGUISHER_RDTYPE._serialized_end=21072 - _BGPROUTEDISTINGUISHER_RDTYPE_ENUM._serialized_start=21001 - _BGPROUTEDISTINGUISHER_RDTYPE_ENUM._serialized_end=21072 - _BGPROUTETARGET._serialized_start=21127 - _BGPROUTETARGET._serialized_end=21329 - _BGPROUTETARGET_RTTYPE._serialized_start=21223 - _BGPROUTETARGET_RTTYPE._serialized_end=21304 - _BGPROUTETARGET_RTTYPE_ENUM._serialized_start=21001 - _BGPROUTETARGET_RTTYPE_ENUM._serialized_end=21072 - _BGPADVANCED._serialized_start=21332 - _BGPADVANCED._serialized_end=21719 - _BGPCAPABILITY._serialized_start=21722 - _BGPCAPABILITY._serialized_end=23019 - _BGPLEARNEDINFORMATIONFILTER._serialized_start=23022 - _BGPLEARNEDINFORMATIONFILTER._serialized_end=23167 - _BGPV4ROUTERANGE._serialized_start=23170 - _BGPV4ROUTERANGE._serialized_end=23958 - _BGPV4ROUTERANGE_NEXTHOPMODE._serialized_start=23722 - _BGPV4ROUTERANGE_NEXTHOPMODE._serialized_end=23786 - _BGPV4ROUTERANGE_NEXTHOPMODE_ENUM._serialized_start=23737 - _BGPV4ROUTERANGE_NEXTHOPMODE_ENUM._serialized_end=23786 - _BGPV4ROUTERANGE_NEXTHOPADDRESSTYPE._serialized_start=23788 - _BGPV4ROUTERANGE_NEXTHOPADDRESSTYPE._serialized_end=23853 - _BGPV4ROUTERANGE_NEXTHOPADDRESSTYPE_ENUM._serialized_start=23810 - _BGPV4ROUTERANGE_NEXTHOPADDRESSTYPE_ENUM._serialized_end=23853 - _BGPADDPATH._serialized_start=23960 - _BGPADDPATH._serialized_end=24006 - _BGPEXTENDEDCOMMUNITY._serialized_start=24009 - _BGPEXTENDEDCOMMUNITY._serialized_end=24892 - _BGPEXTENDEDCOMMUNITY_CHOICE._serialized_start=24650 - _BGPEXTENDEDCOMMUNITY_CHOICE._serialized_end=24881 - _BGPEXTENDEDCOMMUNITY_CHOICE_ENUM._serialized_start=24661 - _BGPEXTENDEDCOMMUNITY_CHOICE_ENUM._serialized_end=24881 - _BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPEROUTETARGET._serialized_start=24895 - _BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPEROUTETARGET._serialized_end=25054 - _BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPEROUTEORIGIN._serialized_start=25057 - _BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPEROUTEORIGIN._serialized_end=25216 - _BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE._serialized_start=25219 - _BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE._serialized_end=25623 - _BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE_CHOICE._serialized_start=25527 - _BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE_CHOICE._serialized_end=25612 - _BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE_CHOICE_ENUM._serialized_start=25537 - _BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE_CHOICE_ENUM._serialized_end=25612 - _BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPEROUTEORIGIN._serialized_start=25626 - _BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPEROUTEORIGIN._serialized_end=25792 - _BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPEROUTETARGET._serialized_start=25795 - _BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPEROUTETARGET._serialized_end=25961 - _BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE._serialized_start=25964 - _BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE._serialized_end=26380 - _BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE_CHOICE._serialized_start=25527 - _BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE_CHOICE._serialized_end=25612 - _BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE_CHOICE_ENUM._serialized_start=25537 - _BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE_CHOICE_ENUM._serialized_end=25612 - _BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPEROUTETARGET._serialized_start=26383 - _BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPEROUTETARGET._serialized_end=26542 - _BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPEROUTEORIGIN._serialized_start=26545 - _BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPEROUTEORIGIN._serialized_end=26704 - _BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE._serialized_start=26707 - _BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE._serialized_end=27111 - _BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE_CHOICE._serialized_start=25527 - _BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE_CHOICE._serialized_end=25612 - _BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE_CHOICE_ENUM._serialized_start=25537 - _BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE_CHOICE_ENUM._serialized_end=25612 - _BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPECOLOR._serialized_start=27113 - _BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPECOLOR._serialized_end=27220 - _BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPEENCAPSULATION._serialized_start=27223 - _BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPEENCAPSULATION._serialized_end=27356 - _BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE._serialized_start=27359 - _BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE._serialized_end=27739 - _BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE_CHOICE._serialized_start=27649 - _BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE_CHOICE._serialized_end=27728 - _BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE_CHOICE_ENUM._serialized_start=27659 - _BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE_CHOICE_ENUM._serialized_end=27728 - _BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPEROUTERMAC._serialized_start=27741 - _BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPEROUTERMAC._serialized_end=27830 - _BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPE._serialized_start=27833 - _BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPE._serialized_end=28103 - _BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPE_CHOICE._serialized_start=28035 - _BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPE_CHOICE._serialized_end=28092 - _BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPE_CHOICE_ENUM._serialized_start=28045 - _BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPE_CHOICE_ENUM._serialized_end=28092 - _BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPELINKBANDWIDTH._serialized_start=28106 - _BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPELINKBANDWIDTH._serialized_end=28254 - _BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE._serialized_start=28257 - _BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE._serialized_end=28560 - _BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE_CHOICE._serialized_start=28488 - _BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE_CHOICE._serialized_end=28549 - _BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE_CHOICE_ENUM._serialized_start=28498 - _BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE_CHOICE_ENUM._serialized_end=28549 - _BGPEXTENDEDCOMMUNITYCUSTOMTYPE._serialized_start=28563 - _BGPEXTENDEDCOMMUNITYCUSTOMTYPE._serialized_end=28727 - _BGPV6ROUTERANGE._serialized_start=28730 - _BGPV6ROUTERANGE._serialized_end=29518 - _BGPV6ROUTERANGE_NEXTHOPMODE._serialized_start=23722 - _BGPV6ROUTERANGE_NEXTHOPMODE._serialized_end=23786 - _BGPV6ROUTERANGE_NEXTHOPMODE_ENUM._serialized_start=23737 - _BGPV6ROUTERANGE_NEXTHOPMODE_ENUM._serialized_end=23786 - _BGPV6ROUTERANGE_NEXTHOPADDRESSTYPE._serialized_start=23788 - _BGPV6ROUTERANGE_NEXTHOPADDRESSTYPE._serialized_end=23853 - _BGPV6ROUTERANGE_NEXTHOPADDRESSTYPE_ENUM._serialized_start=23810 - _BGPV6ROUTERANGE_NEXTHOPADDRESSTYPE_ENUM._serialized_end=23853 - _BGPSRTEV4POLICY._serialized_start=29521 - _BGPSRTEV4POLICY._serialized_end=30412 - _BGPSRTEV4POLICY_NEXTHOPMODE._serialized_start=23722 - _BGPSRTEV4POLICY_NEXTHOPMODE._serialized_end=23786 - _BGPSRTEV4POLICY_NEXTHOPMODE_ENUM._serialized_start=23737 - _BGPSRTEV4POLICY_NEXTHOPMODE_ENUM._serialized_end=23786 - _BGPSRTEV4POLICY_NEXTHOPADDRESSTYPE._serialized_start=23788 - _BGPSRTEV4POLICY_NEXTHOPADDRESSTYPE._serialized_end=23853 - _BGPSRTEV4POLICY_NEXTHOPADDRESSTYPE_ENUM._serialized_start=23810 - _BGPSRTEV4POLICY_NEXTHOPADDRESSTYPE_ENUM._serialized_end=23853 - _BGPSRTEV4TUNNELTLV._serialized_start=30415 - _BGPSRTEV4TUNNELTLV._serialized_end=30981 - _BGPSRTEREMOTEENDPOINTSUBTLV._serialized_start=30984 - _BGPSRTEREMOTEENDPOINTSUBTLV._serialized_end=31302 - _BGPSRTEREMOTEENDPOINTSUBTLV_ADDRESSFAMILY._serialized_start=31175 - _BGPSRTEREMOTEENDPOINTSUBTLV_ADDRESSFAMILY._serialized_end=31235 - _BGPSRTEREMOTEENDPOINTSUBTLV_ADDRESSFAMILY_ENUM._serialized_start=23810 - _BGPSRTEREMOTEENDPOINTSUBTLV_ADDRESSFAMILY_ENUM._serialized_end=23853 - _BGPSRTECOLORSUBTLV._serialized_start=31304 - _BGPSRTECOLORSUBTLV._serialized_end=31354 - _BGPSRTEBINDINGSUBTLV._serialized_start=31357 - _BGPSRTEBINDINGSUBTLV._serialized_end=31719 - _BGPSRTEBINDINGSUBTLV_BINDINGSIDTYPE._serialized_start=31553 - _BGPSRTEBINDINGSUBTLV_BINDINGSIDTYPE._serialized_end=31644 - _BGPSRTEBINDINGSUBTLV_BINDINGSIDTYPE_ENUM._serialized_start=31571 - _BGPSRTEBINDINGSUBTLV_BINDINGSIDTYPE_ENUM._serialized_end=31644 - _BGPSRTEPREFERENCESUBTLV._serialized_start=31721 - _BGPSRTEPREFERENCESUBTLV._serialized_end=31786 - _BGPSRTEPOLICYPRIORITYSUBTLV._serialized_start=31788 - _BGPSRTEPOLICYPRIORITYSUBTLV._serialized_end=31867 - _BGPSRTEPOLICYNAMESUBTLV._serialized_start=31869 - _BGPSRTEPOLICYNAMESUBTLV._serialized_end=31936 - _BGPSRTEEXPLICITNULLLABELPOLICYSUBTLV._serialized_start=31939 - _BGPSRTEEXPLICITNULLLABELPOLICYSUBTLV._serialized_end=32281 - _BGPSRTEEXPLICITNULLLABELPOLICYSUBTLV_EXPLICITNULLLABELPOLICY._serialized_start=32093 - _BGPSRTEEXPLICITNULLLABELPOLICYSUBTLV_EXPLICITNULLLABELPOLICY._serialized_end=32250 - _BGPSRTEEXPLICITNULLLABELPOLICYSUBTLV_EXPLICITNULLLABELPOLICY_ENUM._serialized_start=32121 - _BGPSRTEEXPLICITNULLLABELPOLICYSUBTLV_EXPLICITNULLLABELPOLICY_ENUM._serialized_end=32250 - _BGPSRTESEGMENTLIST._serialized_start=32284 - _BGPSRTESEGMENTLIST._serialized_end=32435 - _BGPSRTESEGMENT._serialized_start=32438 - _BGPSRTESEGMENT._serialized_end=33298 - _BGPSRTESEGMENT_SEGMENTTYPE._serialized_start=33090 - _BGPSRTESEGMENT_SEGMENTTYPE._serialized_end=33261 - _BGPSRTESEGMENT_SEGMENTTYPE_ENUM._serialized_start=33106 - _BGPSRTESEGMENT_SEGMENTTYPE_ENUM._serialized_end=33261 - _BGPSRTESRMPLSSID._serialized_start=33301 - _BGPSRTESRMPLSSID._serialized_end=33429 - _BGPSRTESRV6SIDENDPOINTBEHAVIORANDSTRUCTURE._serialized_start=33432 - _BGPSRTESRV6SIDENDPOINTBEHAVIORANDSTRUCTURE._serialized_end=33634 - _BGPSRTESEGMENTATYPESUBTLV._serialized_start=33637 - _BGPSRTESEGMENTATYPESUBTLV._serialized_end=33804 - _BGPSRTESEGMENTBTYPESUBTLV._serialized_start=33807 - _BGPSRTESEGMENTBTYPESUBTLV._serialized_end=33985 - _BGPSRTESEGMENTCTYPESUBTLV._serialized_start=33988 - _BGPSRTESEGMENTCTYPESUBTLV._serialized_end=34187 - _BGPSRTESEGMENTDTYPESUBTLV._serialized_start=34190 - _BGPSRTESEGMENTDTYPESUBTLV._serialized_end=34389 - _BGPSRTESEGMENTETYPESUBTLV._serialized_start=34392 - _BGPSRTESEGMENTETYPESUBTLV._serialized_end=34603 - _BGPSRTESEGMENTFTYPESUBTLV._serialized_start=34606 - _BGPSRTESEGMENTFTYPESUBTLV._serialized_end=34821 - _BGPSRTESEGMENTGTYPESUBTLV._serialized_start=34824 - _BGPSRTESEGMENTGTYPESUBTLV._serialized_end=35173 - _BGPSRTESEGMENTHTYPESUBTLV._serialized_start=35176 - _BGPSRTESEGMENTHTYPESUBTLV._serialized_end=35391 - _BGPSRTESEGMENTITYPESUBTLV._serialized_start=35394 - _BGPSRTESEGMENTITYPESUBTLV._serialized_end=35626 - _BGPSRTESEGMENTJTYPESUBTLV._serialized_start=35629 - _BGPSRTESEGMENTJTYPESUBTLV._serialized_end=36099 - _BGPSRTESEGMENTKTYPESUBTLV._serialized_start=36102 - _BGPSRTESEGMENTKTYPESUBTLV._serialized_end=36438 - _BGPSRTEV6POLICY._serialized_start=36441 - _BGPSRTEV6POLICY._serialized_end=37331 - _BGPSRTEV6POLICY_NEXTHOPMODE._serialized_start=23722 - _BGPSRTEV6POLICY_NEXTHOPMODE._serialized_end=23786 - _BGPSRTEV6POLICY_NEXTHOPMODE_ENUM._serialized_start=23737 - _BGPSRTEV6POLICY_NEXTHOPMODE_ENUM._serialized_end=23786 - _BGPSRTEV6POLICY_NEXTHOPADDRESSTYPE._serialized_start=23788 - _BGPSRTEV6POLICY_NEXTHOPADDRESSTYPE._serialized_end=23853 - _BGPSRTEV6POLICY_NEXTHOPADDRESSTYPE_ENUM._serialized_start=23810 - _BGPSRTEV6POLICY_NEXTHOPADDRESSTYPE_ENUM._serialized_end=23853 - _BGPSRTEV6TUNNELTLV._serialized_start=37334 - _BGPSRTEV6TUNNELTLV._serialized_end=37900 - _BGPGRACEFULRESTART._serialized_start=37903 - _BGPGRACEFULRESTART._serialized_end=38087 - _BGPUPDATEREPLAY._serialized_start=38090 - _BGPUPDATEREPLAY._serialized_end=38330 - _BGPUPDATEREPLAY_CHOICE._serialized_start=38250 - _BGPUPDATEREPLAY_CHOICE._serialized_end=38319 - _BGPUPDATEREPLAY_CHOICE_ENUM._serialized_start=38260 - _BGPUPDATEREPLAY_CHOICE_ENUM._serialized_end=38319 - _BGPRAWBYTES._serialized_start=38332 - _BGPRAWBYTES._serialized_end=38387 - _BGPONEUPDATEREPLAY._serialized_start=38389 - _BGPONEUPDATEREPLAY._serialized_end=38489 - _BGPSTRUCTUREDPDUS._serialized_start=38491 - _BGPSTRUCTUREDPDUS._serialized_end=38562 - _BGPONESTRUCTUREDUPDATEREPLAY._serialized_start=38565 - _BGPONESTRUCTUREDUPDATEREPLAY._serialized_end=38812 - _BGPONETRADITIONALNLRIPREFIX._serialized_start=38815 - _BGPONETRADITIONALNLRIPREFIX._serialized_end=38953 - _BGPONEIPV4NLRIPREFIX._serialized_start=38956 - _BGPONEIPV4NLRIPREFIX._serialized_end=39087 - _BGPONEIPV6NLRIPREFIX._serialized_start=39090 - _BGPONEIPV6NLRIPREFIX._serialized_end=39221 - _BGPNLRIPREFIXPATHID._serialized_start=39223 - _BGPNLRIPREFIXPATHID._serialized_end=39274 - _BGPATTRIBUTES._serialized_start=39277 - _BGPATTRIBUTES._serialized_end=40215 - _BGPATTRIBUTES_ORIGIN._serialized_start=17742 - _BGPATTRIBUTES_ORIGIN._serialized_end=17809 - _BGPATTRIBUTES_ORIGIN_ENUM._serialized_start=17752 - _BGPATTRIBUTES_ORIGIN_ENUM._serialized_end=17809 - _BGPATTRIBUTESOTHERATTRIBUTE._serialized_start=40218 - _BGPATTRIBUTESOTHERATTRIBUTE._serialized_end=40513 - _BGPATTRIBUTESASPATH._serialized_start=40516 - _BGPATTRIBUTESASPATH._serialized_end=40819 - _BGPATTRIBUTESASPATH_CHOICE._serialized_start=40730 - _BGPATTRIBUTESASPATH_CHOICE._serialized_end=40808 - _BGPATTRIBUTESASPATH_CHOICE_ENUM._serialized_start=40740 - _BGPATTRIBUTESASPATH_CHOICE_ENUM._serialized_end=40808 - _BGPATTRIBUTESASPATHFOURBYTEASPATH._serialized_start=40821 - _BGPATTRIBUTESASPATHFOURBYTEASPATH._serialized_end=40915 - _BGPATTRIBUTESFOURBYTEASPATHSEGMENT._serialized_start=40918 - _BGPATTRIBUTESFOURBYTEASPATHSEGMENT._serialized_end=41148 - _BGPATTRIBUTESFOURBYTEASPATHSEGMENT_TYPE._serialized_start=19174 - _BGPATTRIBUTESFOURBYTEASPATHSEGMENT_TYPE._serialized_end=19267 - _BGPATTRIBUTESFOURBYTEASPATHSEGMENT_TYPE_ENUM._serialized_start=19182 - _BGPATTRIBUTESFOURBYTEASPATHSEGMENT_TYPE_ENUM._serialized_end=19267 - _BGPATTRIBUTESASPATHTWOBYTEASPATH._serialized_start=41150 - _BGPATTRIBUTESASPATHTWOBYTEASPATH._serialized_end=41242 - _BGPATTRIBUTESTWOBYTEASPATHSEGMENT._serialized_start=41245 - _BGPATTRIBUTESTWOBYTEASPATHSEGMENT._serialized_end=41473 - _BGPATTRIBUTESTWOBYTEASPATHSEGMENT_TYPE._serialized_start=19174 - _BGPATTRIBUTESTWOBYTEASPATHSEGMENT_TYPE._serialized_end=19267 - _BGPATTRIBUTESTWOBYTEASPATHSEGMENT_TYPE_ENUM._serialized_start=19182 - _BGPATTRIBUTESTWOBYTEASPATHSEGMENT_TYPE_ENUM._serialized_end=19267 - _BGPATTRIBUTESAS4PATH._serialized_start=41475 - _BGPATTRIBUTESAS4PATH._serialized_end=41556 - _BGPATTRIBUTESAGGREGATOR._serialized_start=41559 - _BGPATTRIBUTESAGGREGATOR._serialized_end=41858 - _BGPATTRIBUTESAGGREGATOR_CHOICE._serialized_start=41729 - _BGPATTRIBUTESAGGREGATOR_CHOICE._serialized_end=41797 - _BGPATTRIBUTESAGGREGATOR_CHOICE_ENUM._serialized_start=41739 - _BGPATTRIBUTESAGGREGATOR_CHOICE_ENUM._serialized_end=41797 - _BGPATTRIBUTESAS4AGGREGATOR._serialized_start=41860 - _BGPATTRIBUTESAS4AGGREGATOR._serialized_end=41964 - _BGPATTRIBUTESCOMMUNITY._serialized_start=41967 - _BGPATTRIBUTESCOMMUNITY._serialized_end=42272 - _BGPATTRIBUTESCOMMUNITY_CHOICE._serialized_start=42117 - _BGPATTRIBUTESCOMMUNITY_CHOICE._serialized_end=42261 - _BGPATTRIBUTESCOMMUNITY_CHOICE_ENUM._serialized_start=42128 - _BGPATTRIBUTESCOMMUNITY_CHOICE_ENUM._serialized_end=42261 - _BGPATTRIBUTESCUSTOMCOMMUNITY._serialized_start=42274 - _BGPATTRIBUTESCUSTOMCOMMUNITY._serialized_end=42374 - _BGPATTRIBUTESNEXTHOP._serialized_start=42377 - _BGPATTRIBUTESNEXTHOP._serialized_end=42676 - _BGPATTRIBUTESNEXTHOP_CHOICE._serialized_start=42570 - _BGPATTRIBUTESNEXTHOP_CHOICE._serialized_end=42647 - _BGPATTRIBUTESNEXTHOP_CHOICE_ENUM._serialized_start=42580 - _BGPATTRIBUTESNEXTHOP_CHOICE_ENUM._serialized_end=42647 - _BGPATTRIBUTESNEXTHOPIPV6TWOADDRESSES._serialized_start=42678 - _BGPATTRIBUTESNEXTHOPIPV6TWOADDRESSES._serialized_end=42778 - _BGPATTRIBUTESMPREACHNLRI._serialized_start=42781 - _BGPATTRIBUTESMPREACHNLRI._serialized_end=43096 - _BGPATTRIBUTESMPREACHNLRI_CHOICE._serialized_start=43016 - _BGPATTRIBUTESMPREACHNLRI_CHOICE._serialized_end=43085 - _BGPATTRIBUTESMPREACHNLRI_CHOICE_ENUM._serialized_start=43026 - _BGPATTRIBUTESMPREACHNLRI_CHOICE_ENUM._serialized_end=43085 - _BGPATTRIBUTESMPUNREACHNLRI._serialized_start=43099 - _BGPATTRIBUTESMPUNREACHNLRI._serialized_end=43373 - _BGPATTRIBUTESMPUNREACHNLRI_CHOICE._serialized_start=43016 - _BGPATTRIBUTESMPUNREACHNLRI_CHOICE._serialized_end=43085 - _BGPATTRIBUTESMPUNREACHNLRI_CHOICE_ENUM._serialized_start=43026 - _BGPATTRIBUTESMPUNREACHNLRI_CHOICE_ENUM._serialized_end=43085 - _BGPATTRIBUTESMULTIEXITDISCRIMINATOR._serialized_start=43375 - _BGPATTRIBUTESMULTIEXITDISCRIMINATOR._serialized_end=43442 - _BGPATTRIBUTESLOCALPREFERENCE._serialized_start=43444 - _BGPATTRIBUTESLOCALPREFERENCE._serialized_end=43504 - _BGPATTRIBUTESORIGINATORID._serialized_start=43506 - _BGPATTRIBUTESORIGINATORID._serialized_end=43563 - _BGPV6PEER._serialized_start=43566 - _BGPV6PEER._serialized_end=44481 - _BGPV6PEER_ASTYPE._serialized_start=16626 - _BGPV6PEER_ASTYPE._serialized_end=16679 - _BGPV6PEER_ASTYPE_ENUM._serialized_start=16636 - _BGPV6PEER_ASTYPE_ENUM._serialized_end=16679 - _BGPV6PEER_ASNUMBERWIDTH._serialized_start=16681 - _BGPV6PEER_ASNUMBERWIDTH._serialized_end=16740 - _BGPV6PEER_ASNUMBERWIDTH_ENUM._serialized_start=16698 - _BGPV6PEER_ASNUMBERWIDTH_ENUM._serialized_end=16740 - _BGPV6INTERFACE._serialized_start=44483 - _BGPV6INTERFACE._serialized_end=44568 - _BGPV6SEGMENTROUTING._serialized_start=44571 - _BGPV6SEGMENTROUTING._serialized_end=45068 - _BGPV6ETHERNETSEGMENT._serialized_start=45071 - _BGPV6ETHERNETSEGMENT._serialized_end=45567 - _BGPV6ETHERNETSEGMENT_ACTIVEMODE._serialized_start=17288 - _BGPV6ETHERNETSEGMENT_ACTIVEMODE._serialized_end=17360 - _BGPV6ETHERNETSEGMENT_ACTIVEMODE_ENUM._serialized_start=17302 - _BGPV6ETHERNETSEGMENT_ACTIVEMODE_ENUM._serialized_end=17360 - _BGPV6EVPNEVIS._serialized_start=45570 - _BGPV6EVPNEVIS._serialized_end=45738 - _BGPV6EVPNEVIS_CHOICE._serialized_start=19388 - _BGPV6EVPNEVIS_CHOICE._serialized_end=19436 - _BGPV6EVPNEVIS_CHOICE_ENUM._serialized_start=19398 - _BGPV6EVPNEVIS_CHOICE_ENUM._serialized_end=19436 - _BGPV6EVIVXLAN._serialized_start=45741 - _BGPV6EVIVXLAN._serialized_end=46480 - _BGPV6EVIVXLAN_REPLICATIONTYPE._serialized_start=20073 - _BGPV6EVIVXLAN_REPLICATIONTYPE._serialized_end=20140 - _BGPV6EVIVXLAN_REPLICATIONTYPE_ENUM._serialized_start=20092 - _BGPV6EVIVXLAN_REPLICATIONTYPE_ENUM._serialized_end=20140 - _BGPV6EVIVXLANBROADCASTDOMAIN._serialized_start=46483 - _BGPV6EVIVXLANBROADCASTDOMAIN._serialized_end=46663 - _DEVICEVXLAN._serialized_start=46665 - _DEVICEVXLAN._serialized_end=46758 - _VXLANV4TUNNEL._serialized_start=46761 - _VXLANV4TUNNEL._serialized_end=46948 - _VXLANV6TUNNEL._serialized_start=46951 - _VXLANV6TUNNEL._serialized_end=47138 - _VXLANV4TUNNELDESTINATIONIPMODE._serialized_start=47141 - _VXLANV4TUNNELDESTINATIONIPMODE._serialized_end=47443 - _VXLANV4TUNNELDESTINATIONIPMODE_CHOICE._serialized_start=47371 - _VXLANV4TUNNELDESTINATIONIPMODE_CHOICE._serialized_end=47432 - _VXLANV4TUNNELDESTINATIONIPMODE_CHOICE_ENUM._serialized_start=47381 - _VXLANV4TUNNELDESTINATIONIPMODE_CHOICE_ENUM._serialized_end=47432 - _VXLANV6TUNNELDESTINATIONIPMODE._serialized_start=47446 - _VXLANV6TUNNELDESTINATIONIPMODE._serialized_end=47748 - _VXLANV6TUNNELDESTINATIONIPMODE_CHOICE._serialized_start=47371 - _VXLANV6TUNNELDESTINATIONIPMODE_CHOICE._serialized_end=47432 - _VXLANV6TUNNELDESTINATIONIPMODE_CHOICE_ENUM._serialized_start=47381 - _VXLANV6TUNNELDESTINATIONIPMODE_CHOICE_ENUM._serialized_end=47432 - _VXLANV4TUNNELDESTINATIONIPMODEUNICAST._serialized_start=47750 - _VXLANV4TUNNELDESTINATIONIPMODEUNICAST._serialized_end=47852 - _VXLANV6TUNNELDESTINATIONIPMODEUNICAST._serialized_start=47854 - _VXLANV6TUNNELDESTINATIONIPMODEUNICAST._serialized_end=47956 - _VXLANTUNNELDESTINATIONIPMODEUNICASTARPSUPPRESSIONCACHE._serialized_start=47959 - _VXLANTUNNELDESTINATIONIPMODEUNICASTARPSUPPRESSIONCACHE._serialized_end=48109 - _VXLANV4TUNNELDESTINATIONIPMODEUNICASTVTEP._serialized_start=48112 - _VXLANV4TUNNELDESTINATIONIPMODEUNICASTVTEP._serialized_end=48305 - _VXLANV6TUNNELDESTINATIONIPMODEUNICASTVTEP._serialized_start=48308 - _VXLANV6TUNNELDESTINATIONIPMODEUNICASTVTEP._serialized_end=48501 - _VXLANV4TUNNELDESTINATIONIPMODEMULTICAST._serialized_start=48503 - _VXLANV4TUNNELDESTINATIONIPMODEMULTICAST._serialized_end=48578 - _VXLANV6TUNNELDESTINATIONIPMODEMULTICAST._serialized_start=48580 - _VXLANV6TUNNELDESTINATIONIPMODEMULTICAST._serialized_end=48655 - _DEVICERSVP._serialized_start=48658 - _DEVICERSVP._serialized_end=48803 - _RSVPIPV4INTERFACE._serialized_start=48806 - _RSVPIPV4INTERFACE._serialized_end=49387 - _RSVPLSPIPV4INTERFACE._serialized_start=49390 - _RSVPLSPIPV4INTERFACE._serialized_end=49598 - _RSVPLSPIPV4INTERFACEP2PEGRESSIPV4LSP._serialized_start=49601 - _RSVPLSPIPV4INTERFACEP2PEGRESSIPV4LSP._serialized_end=50098 - _RSVPLSPIPV4INTERFACEP2PEGRESSIPV4LSP_RESERVATIONSTYLE._serialized_start=49886 - _RSVPLSPIPV4INTERFACEP2PEGRESSIPV4LSP_RESERVATIONSTYLE._serialized_end=49978 - _RSVPLSPIPV4INTERFACEP2PEGRESSIPV4LSP_RESERVATIONSTYLE_ENUM._serialized_start=49906 - _RSVPLSPIPV4INTERFACEP2PEGRESSIPV4LSP_RESERVATIONSTYLE_ENUM._serialized_end=49978 - _RSVPLSPIPV4INTERFACEP2PINGRESSIPV4LSP._serialized_start=50101 - _RSVPLSPIPV4INTERFACEP2PINGRESSIPV4LSP._serialized_end=50656 - _RSVPSESSIONATTRIBUTE._serialized_start=50659 - _RSVPSESSIONATTRIBUTE._serialized_end=51283 - _RSVPRESOURCEAFFINITIES._serialized_start=51286 - _RSVPRESOURCEAFFINITIES._serialized_end=51436 - _RSVPTSPEC._serialized_start=51439 - _RSVPTSPEC._serialized_end=51726 - _RSVPFASTREROUTE._serialized_start=51729 - _RSVPFASTREROUTE._serialized_end=52184 - _RSVPERO._serialized_start=52187 - _RSVPERO._serialized_end=52483 - _RSVPERO_PREPENDNEIGHBORIP._serialized_start=52340 - _RSVPERO_PREPENDNEIGHBORIP._serialized_end=52441 - _RSVPERO_PREPENDNEIGHBORIP_ENUM._serialized_start=52361 - _RSVPERO_PREPENDNEIGHBORIP_ENUM._serialized_end=52441 - _RSVPEROSUBOBJECT._serialized_start=52486 - _RSVPEROSUBOBJECT._serialized_end=52882 - _RSVPEROSUBOBJECT_TYPE._serialized_start=52696 - _RSVPEROSUBOBJECT_TYPE._serialized_end=52752 - _RSVPEROSUBOBJECT_TYPE_ENUM._serialized_start=52704 - _RSVPEROSUBOBJECT_TYPE_ENUM._serialized_end=52752 - _RSVPEROSUBOBJECT_HOPTYPE._serialized_start=52754 - _RSVPEROSUBOBJECT_HOPTYPE._serialized_end=52811 - _RSVPEROSUBOBJECT_HOPTYPE_ENUM._serialized_start=52765 - _RSVPEROSUBOBJECT_HOPTYPE_ENUM._serialized_end=52811 - _FLOW._serialized_start=52885 - _FLOW._serialized_end=53152 - _FLOWTXRX._serialized_start=53155 - _FLOWTXRX._serialized_end=53343 - _FLOWTXRX_CHOICE._serialized_start=53277 - _FLOWTXRX_CHOICE._serialized_end=53332 - _FLOWTXRX_CHOICE_ENUM._serialized_start=53287 - _FLOWTXRX_CHOICE_ENUM._serialized_end=53332 - _FLOWPORT._serialized_start=53345 - _FLOWPORT._serialized_end=53441 - _FLOWROUTER._serialized_start=53444 - _FLOWROUTER._serialized_end=53606 - _FLOWROUTER_MODE._serialized_start=53540 - _FLOWROUTER_MODE._serialized_end=53597 - _FLOWROUTER_MODE_ENUM._serialized_start=53548 - _FLOWROUTER_MODE_ENUM._serialized_end=53597 - _FLOWHEADER._serialized_start=53609 - _FLOWHEADER._serialized_end=54610 - _FLOWHEADER_CHOICE._serialized_start=54331 - _FLOWHEADER_CHOICE._serialized_end=54599 - _FLOWHEADER_CHOICE_ENUM._serialized_start=54342 - _FLOWHEADER_CHOICE_ENUM._serialized_end=54599 - _FLOWCUSTOM._serialized_start=54612 - _FLOWCUSTOM._serialized_end=54701 - _FLOWCUSTOMMETRICTAG._serialized_start=54703 - _FLOWCUSTOMMETRICTAG._serialized_end=54816 - _FLOWETHERNET._serialized_start=54819 - _FLOWETHERNET._serialized_end=55025 - _FLOWVLAN._serialized_start=55028 - _FLOWVLAN._serialized_end=55200 - _FLOWVXLAN._serialized_start=55203 - _FLOWVXLAN._serialized_end=55398 - _FLOWIPV4._serialized_start=55401 - _FLOWIPV4._serialized_end=56173 - _FLOWIPV4OPTIONS._serialized_start=56176 - _FLOWIPV4OPTIONS._serialized_end=56368 - _FLOWIPV4OPTIONS_CHOICE._serialized_start=56294 - _FLOWIPV4OPTIONS_CHOICE._serialized_end=56357 - _FLOWIPV4OPTIONS_CHOICE_ENUM._serialized_start=56304 - _FLOWIPV4OPTIONS_CHOICE_ENUM._serialized_end=56357 - _FLOWIPV4OPTIONSCUSTOM._serialized_start=56371 - _FLOWIPV4OPTIONSCUSTOM._serialized_end=56520 - _FLOWIPV4OPTIONSCUSTOMTYPE._serialized_start=56523 - _FLOWIPV4OPTIONSCUSTOMTYPE._serialized_end=56766 - _FLOWIPV4OPTIONSCUSTOMLENGTH._serialized_start=56769 - _FLOWIPV4OPTIONSCUSTOMLENGTH._serialized_end=56990 - _FLOWIPV4OPTIONSCUSTOMLENGTH_CHOICE._serialized_start=3062 - _FLOWIPV4OPTIONSCUSTOMLENGTH_CHOICE._serialized_end=3116 - _FLOWIPV4OPTIONSCUSTOMLENGTH_CHOICE_ENUM._serialized_start=3072 - _FLOWIPV4OPTIONSCUSTOMLENGTH_CHOICE_ENUM._serialized_end=3116 - _FLOWIPV4PRIORITY._serialized_start=56993 - _FLOWIPV4PRIORITY._serialized_end=57251 - _FLOWIPV4PRIORITY_CHOICE._serialized_start=57179 - _FLOWIPV4PRIORITY_CHOICE._serialized_end=57240 - _FLOWIPV4PRIORITY_CHOICE_ENUM._serialized_start=57189 - _FLOWIPV4PRIORITY_CHOICE_ENUM._serialized_end=57240 - _FLOWIPV4DSCP._serialized_start=57253 - _FLOWIPV4DSCP._serialized_end=57351 - _FLOWIPV4TOS._serialized_start=57354 - _FLOWIPV4TOS._serialized_end=57677 - _FLOWIPV6._serialized_start=57680 - _FLOWIPV6._serialized_end=58081 - _FLOWPFCPAUSE._serialized_start=58084 - _FLOWPFCPAUSE._serialized_end=58853 - _FLOWETHERNETPAUSE._serialized_start=58856 - _FLOWETHERNETPAUSE._serialized_end=59147 - _FLOWTCP._serialized_start=59150 - _FLOWTCP._serialized_end=59830 - _FLOWUDP._serialized_start=59833 - _FLOWUDP._serialized_end=60024 - _FLOWGRE._serialized_start=60027 - _FLOWGRE._serialized_end=60335 - _FLOWGTPV1._serialized_start=60338 - _FLOWGTPV1._serialized_end=61041 - _FLOWGTPEXTENSION._serialized_start=61044 - _FLOWGTPEXTENSION._serialized_end=61269 - _FLOWGTPV2._serialized_start=61272 - _FLOWGTPV2._serialized_end=61755 - _FLOWARP._serialized_start=61758 - _FLOWARP._serialized_end=62324 - _FLOWICMP._serialized_start=62327 - _FLOWICMP._serialized_end=62474 - _FLOWICMP_CHOICE._serialized_start=62420 - _FLOWICMP_CHOICE._serialized_end=62463 - _FLOWICMP_CHOICE_ENUM._serialized_start=62430 - _FLOWICMP_CHOICE_ENUM._serialized_end=62463 - _FLOWICMPECHO._serialized_start=62477 - _FLOWICMPECHO._serialized_end=62752 - _FLOWICMPV6._serialized_start=62755 - _FLOWICMPV6._serialized_end=62908 - _FLOWICMPV6_CHOICE._serialized_start=62420 - _FLOWICMPV6_CHOICE._serialized_end=62463 - _FLOWICMPV6_CHOICE_ENUM._serialized_start=62430 - _FLOWICMPV6_CHOICE_ENUM._serialized_end=62463 - _FLOWICMPV6ECHO._serialized_start=62911 - _FLOWICMPV6ECHO._serialized_end=63198 - _FLOWPPP._serialized_start=63201 - _FLOWPPP._serialized_end=63356 - _FLOWIGMPV1._serialized_start=63359 - _FLOWIGMPV1._serialized_end=63616 - _FLOWMPLS._serialized_start=63619 - _FLOWMPLS._serialized_end=63842 - _FLOWSNMPV2C._serialized_start=63845 - _FLOWSNMPV2C._serialized_end=63981 - _FLOWSNMPV2CDATA._serialized_start=63984 - _FLOWSNMPV2CDATA._serialized_end=64590 - _FLOWSNMPV2CDATA_CHOICE._serialized_start=64404 - _FLOWSNMPV2CDATA_CHOICE._serialized_end=64579 - _FLOWSNMPV2CDATA_CHOICE_ENUM._serialized_start=64415 - _FLOWSNMPV2CDATA_CHOICE_ENUM._serialized_end=64579 - _FLOWSNMPV2CPDU._serialized_start=64593 - _FLOWSNMPV2CPDU._serialized_end=65252 - _FLOWSNMPV2CPDU_ERRORSTATUS._serialized_start=64853 - _FLOWSNMPV2CPDU_ERRORSTATUS._serialized_end=65235 - _FLOWSNMPV2CPDU_ERRORSTATUS_ENUM._serialized_start=64869 - _FLOWSNMPV2CPDU_ERRORSTATUS_ENUM._serialized_end=65235 - _FLOWSNMPV2CBULKPDU._serialized_start=65255 - _FLOWSNMPV2CBULKPDU._serialized_end=65534 - _FLOWSNMPV2CVARIABLEBINDING._serialized_start=65537 - _FLOWSNMPV2CVARIABLEBINDING._serialized_end=65672 - _FLOWSNMPV2CVARIABLEBINDINGVALUE._serialized_start=65675 - _FLOWSNMPV2CVARIABLEBINDINGVALUE._serialized_end=66736 - _FLOWSNMPV2CVARIABLEBINDINGVALUE_CHOICE._serialized_start=66429 - _FLOWSNMPV2CVARIABLEBINDINGVALUE_CHOICE._serialized_end=66677 - _FLOWSNMPV2CVARIABLEBINDINGVALUE_CHOICE_ENUM._serialized_start=66440 - _FLOWSNMPV2CVARIABLEBINDINGVALUE_CHOICE_ENUM._serialized_end=66677 - _FLOWSNMPV2CVARIABLEBINDINGSTRINGVALUE._serialized_start=66739 - _FLOWSNMPV2CVARIABLEBINDINGSTRINGVALUE._serialized_end=66977 - _FLOWSNMPV2CVARIABLEBINDINGSTRINGVALUE_CHOICE._serialized_start=66895 - _FLOWSNMPV2CVARIABLEBINDINGSTRINGVALUE_CHOICE._serialized_end=66948 - _FLOWSNMPV2CVARIABLEBINDINGSTRINGVALUE_CHOICE_ENUM._serialized_start=66905 - _FLOWSNMPV2CVARIABLEBINDINGSTRINGVALUE_CHOICE_ENUM._serialized_end=66948 - _FLOWRSVP._serialized_start=66980 - _FLOWRSVP._serialized_end=67421 - _FLOWRSVP_FLAG._serialized_start=67303 - _FLOWRSVP_FLAG._serialized_end=67400 - _FLOWRSVP_FLAG_ENUM._serialized_start=67311 - _FLOWRSVP_FLAG_ENUM._serialized_end=67400 - _FLOWRSVPLENGTH._serialized_start=67424 - _FLOWRSVPLENGTH._serialized_end=67619 - _FLOWRSVPLENGTH_CHOICE._serialized_start=3062 - _FLOWRSVPLENGTH_CHOICE._serialized_end=3116 - _FLOWRSVPLENGTH_CHOICE_ENUM._serialized_start=3072 - _FLOWRSVPLENGTH_CHOICE_ENUM._serialized_end=3116 - _FLOWRSVPMESSAGE._serialized_start=67622 - _FLOWRSVPMESSAGE._serialized_end=67790 - _FLOWRSVPMESSAGE_CHOICE._serialized_start=67736 - _FLOWRSVPMESSAGE_CHOICE._serialized_end=67779 - _FLOWRSVPMESSAGE_CHOICE_ENUM._serialized_start=67746 - _FLOWRSVPMESSAGE_CHOICE_ENUM._serialized_end=67779 - _FLOWRSVPPATHMESSAGE._serialized_start=67792 - _FLOWRSVPPATHMESSAGE._serialized_end=67856 - _FLOWRSVPPATHOBJECTS._serialized_start=67858 - _FLOWRSVPPATHOBJECTS._serialized_end=67929 - _FLOWRSVPOBJECTLENGTH._serialized_start=67932 - _FLOWRSVPOBJECTLENGTH._serialized_end=68139 - _FLOWRSVPOBJECTLENGTH_CHOICE._serialized_start=3062 - _FLOWRSVPOBJECTLENGTH_CHOICE._serialized_end=3116 - _FLOWRSVPOBJECTLENGTH_CHOICE_ENUM._serialized_start=3072 - _FLOWRSVPOBJECTLENGTH_CHOICE_ENUM._serialized_end=3116 - _FLOWRSVPPATHOBJECTSCLASS._serialized_start=68142 - _FLOWRSVPPATHOBJECTSCLASS._serialized_end=69082 - _FLOWRSVPPATHOBJECTSCLASS_CHOICE._serialized_start=68862 - _FLOWRSVPPATHOBJECTSCLASS_CHOICE._serialized_end=69071 - _FLOWRSVPPATHOBJECTSCLASS_CHOICE_ENUM._serialized_start=68873 - _FLOWRSVPPATHOBJECTSCLASS_CHOICE_ENUM._serialized_end=69071 - _FLOWRSVPPATHOBJECTSCLASSSESSION._serialized_start=69085 - _FLOWRSVPPATHOBJECTSCLASSSESSION._serialized_end=69215 - _FLOWRSVPPATHOBJECTSSESSIONCTYPE._serialized_start=69218 - _FLOWRSVPPATHOBJECTSSESSIONCTYPE._serialized_end=69453 - _FLOWRSVPPATHOBJECTSSESSIONCTYPE_CHOICE._serialized_start=69388 - _FLOWRSVPPATHOBJECTSSESSIONCTYPE_CHOICE._serialized_end=69442 - _FLOWRSVPPATHOBJECTSSESSIONCTYPE_CHOICE_ENUM._serialized_start=69398 - _FLOWRSVPPATHOBJECTSSESSIONCTYPE_CHOICE_ENUM._serialized_end=69442 - _FLOWRSVPPATHSESSIONLSPTUNNELIPV4._serialized_start=69456 - _FLOWRSVPPATHSESSIONLSPTUNNELIPV4._serialized_end=69810 - _FLOWRSVPPATHSESSIONEXTTUNNELID._serialized_start=69813 - _FLOWRSVPPATHSESSIONEXTTUNNELID._serialized_end=70130 - _FLOWRSVPPATHSESSIONEXTTUNNELID_CHOICE._serialized_start=70057 - _FLOWRSVPPATHSESSIONEXTTUNNELID_CHOICE._serialized_end=70119 - _FLOWRSVPPATHSESSIONEXTTUNNELID_CHOICE_ENUM._serialized_start=70067 - _FLOWRSVPPATHSESSIONEXTTUNNELID_CHOICE_ENUM._serialized_end=70119 - _FLOWRSVPPATHOBJECTSCLASSRSVPHOP._serialized_start=70133 - _FLOWRSVPPATHOBJECTSCLASSRSVPHOP._serialized_end=70263 - _FLOWRSVPPATHOBJECTSRSVPHOPCTYPE._serialized_start=70266 - _FLOWRSVPPATHOBJECTSRSVPHOPCTYPE._serialized_end=70470 - _FLOWRSVPPATHOBJECTSRSVPHOPCTYPE_CHOICE._serialized_start=70416 - _FLOWRSVPPATHOBJECTSRSVPHOPCTYPE_CHOICE._serialized_end=70459 - _FLOWRSVPPATHOBJECTSRSVPHOPCTYPE_CHOICE_ENUM._serialized_start=23810 - _FLOWRSVPPATHOBJECTSRSVPHOPCTYPE_CHOICE_ENUM._serialized_end=23843 - _FLOWRSVPPATHRSVPHOPIPV4._serialized_start=70473 - _FLOWRSVPPATHRSVPHOPIPV4._serialized_end=70661 - _FLOWRSVPPATHOBJECTSCLASSTIMEVALUES._serialized_start=70664 - _FLOWRSVPPATHOBJECTSCLASSTIMEVALUES._serialized_end=70800 - _FLOWRSVPPATHOBJECTSTIMEVALUESCTYPE._serialized_start=70803 - _FLOWRSVPPATHOBJECTSTIMEVALUESCTYPE._serialized_end=71021 - _FLOWRSVPPATHOBJECTSTIMEVALUESCTYPE_CHOICE._serialized_start=70965 - _FLOWRSVPPATHOBJECTSTIMEVALUESCTYPE_CHOICE._serialized_end=71010 - _FLOWRSVPPATHOBJECTSTIMEVALUESCTYPE_CHOICE_ENUM._serialized_start=70975 - _FLOWRSVPPATHOBJECTSTIMEVALUESCTYPE_CHOICE_ENUM._serialized_end=71010 - _FLOWRSVPPATHTIMEVALUESTYPE1._serialized_start=71023 - _FLOWRSVPPATHTIMEVALUESTYPE1._serialized_end=71133 - _FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTE._serialized_start=71136 - _FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTE._serialized_end=71283 - _FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTECTYPE._serialized_start=71286 - _FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTECTYPE._serialized_end=71523 - _FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTECTYPE_CHOICE._serialized_start=70965 - _FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTECTYPE_CHOICE._serialized_end=71010 - _FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTECTYPE_CHOICE_ENUM._serialized_start=70975 - _FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTECTYPE_CHOICE_ENUM._serialized_end=71010 - _FLOWRSVPPATHEXPLICITROUTETYPE1._serialized_start=71525 - _FLOWRSVPPATHEXPLICITROUTETYPE1._serialized_end=71620 - _FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTS._serialized_start=71622 - _FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTS._serialized_end=71721 - _FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTSTYPE._serialized_start=71724 - _FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTSTYPE._serialized_end=72056 - _FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTSTYPE_CHOICE._serialized_start=71980 - _FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTSTYPE_CHOICE._serialized_end=72045 - _FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTSTYPE_CHOICE_ENUM._serialized_start=71990 - _FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTSTYPE_CHOICE_ENUM._serialized_end=72045 - _FLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIX._serialized_start=72059 - _FLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIX._serialized_end=72343 - _FLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBER._serialized_start=72346 - _FLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBER._serialized_end=72553 - _FLOWRSVPEXPLICITROUTELENGTH._serialized_start=72556 - _FLOWRSVPEXPLICITROUTELENGTH._serialized_end=72777 - _FLOWRSVPEXPLICITROUTELENGTH_CHOICE._serialized_start=3062 - _FLOWRSVPEXPLICITROUTELENGTH_CHOICE._serialized_end=3116 - _FLOWRSVPEXPLICITROUTELENGTH_CHOICE_ENUM._serialized_start=3072 - _FLOWRSVPEXPLICITROUTELENGTH_CHOICE_ENUM._serialized_end=3116 - _FLOWRSVPEXPLICITROUTEASNUMBERLENGTH._serialized_start=72780 - _FLOWRSVPEXPLICITROUTEASNUMBERLENGTH._serialized_end=73017 - _FLOWRSVPEXPLICITROUTEASNUMBERLENGTH_CHOICE._serialized_start=3062 - _FLOWRSVPEXPLICITROUTEASNUMBERLENGTH_CHOICE._serialized_end=3116 - _FLOWRSVPEXPLICITROUTEASNUMBERLENGTH_CHOICE_ENUM._serialized_start=3072 - _FLOWRSVPEXPLICITROUTEASNUMBERLENGTH_CHOICE_ENUM._serialized_end=3116 - _FLOWRSVPPATHOBJECTSCLASSLABELREQUEST._serialized_start=73020 - _FLOWRSVPPATHOBJECTSCLASSLABELREQUEST._serialized_end=73160 - _FLOWRSVPPATHOBJECTSLABELREQUESTCTYPE._serialized_start=73163 - _FLOWRSVPPATHOBJECTSLABELREQUESTCTYPE._serialized_end=73425 - _FLOWRSVPPATHOBJECTSLABELREQUESTCTYPE_CHOICE._serialized_start=73356 - _FLOWRSVPPATHOBJECTSLABELREQUESTCTYPE_CHOICE._serialized_end=73414 - _FLOWRSVPPATHOBJECTSLABELREQUESTCTYPE_CHOICE_ENUM._serialized_start=73366 - _FLOWRSVPPATHOBJECTSLABELREQUESTCTYPE_CHOICE_ENUM._serialized_end=73414 - _FLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGE._serialized_start=73428 - _FLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGE._serialized_end=73627 - _FLOWRSVPPATHOBJECTSCLASSSESSIONATTRIBUTE._serialized_start=73630 - _FLOWRSVPPATHOBJECTSCLASSSESSIONATTRIBUTE._serialized_end=73778 - _FLOWRSVPPATHOBJECTSSESSIONATTRIBUTECTYPE._serialized_start=73781 - _FLOWRSVPPATHOBJECTSSESSIONATTRIBUTECTYPE._serialized_end=74117 - _FLOWRSVPPATHOBJECTSSESSIONATTRIBUTECTYPE_CHOICE._serialized_start=74038 - _FLOWRSVPPATHOBJECTSSESSIONATTRIBUTECTYPE_CHOICE._serialized_end=74106 - _FLOWRSVPPATHOBJECTSSESSIONATTRIBUTECTYPE_CHOICE_ENUM._serialized_start=74048 - _FLOWRSVPPATHOBJECTSSESSIONATTRIBUTECTYPE_CHOICE_ENUM._serialized_end=74106 - _FLOWRSVPPATHSESSIONATTRIBUTELSPTUNNEL._serialized_start=74120 - _FLOWRSVPPATHSESSIONATTRIBUTELSPTUNNEL._serialized_end=74408 - _FLOWRSVPPATHSESSIONATTRIBUTELSPTUNNELRA._serialized_start=74411 - _FLOWRSVPPATHSESSIONATTRIBUTELSPTUNNELRA._serialized_end=74827 - _FLOWRSVPLSPTUNNELFLAG._serialized_start=74830 - _FLOWRSVPLSPTUNNELFLAG._serialized_end=75041 - _FLOWRSVPLSPTUNNELFLAG_CHOICE._serialized_start=74916 - _FLOWRSVPLSPTUNNELFLAG_CHOICE._serialized_end=75030 - _FLOWRSVPLSPTUNNELFLAG_CHOICE_ENUM._serialized_start=74926 - _FLOWRSVPLSPTUNNELFLAG_CHOICE_ENUM._serialized_end=75030 - _FLOWRSVPSESSIONATTRIBUTENAMELENGTH._serialized_start=75044 - _FLOWRSVPSESSIONATTRIBUTENAMELENGTH._serialized_end=75279 - _FLOWRSVPSESSIONATTRIBUTENAMELENGTH_CHOICE._serialized_start=3062 - _FLOWRSVPSESSIONATTRIBUTENAMELENGTH_CHOICE._serialized_end=3116 - _FLOWRSVPSESSIONATTRIBUTENAMELENGTH_CHOICE_ENUM._serialized_start=3072 - _FLOWRSVPSESSIONATTRIBUTENAMELENGTH_CHOICE_ENUM._serialized_end=3116 - _FLOWRSVPPATHOBJECTSCLASSSENDERTEMPLATE._serialized_start=75282 - _FLOWRSVPPATHOBJECTSCLASSSENDERTEMPLATE._serialized_end=75426 - _FLOWRSVPPATHOBJECTSSENDERTEMPLATECTYPE._serialized_start=75429 - _FLOWRSVPPATHOBJECTSSENDERTEMPLATECTYPE._serialized_end=75685 - _FLOWRSVPPATHOBJECTSSENDERTEMPLATECTYPE_CHOICE._serialized_start=69388 - _FLOWRSVPPATHOBJECTSSENDERTEMPLATECTYPE_CHOICE._serialized_end=69442 - _FLOWRSVPPATHOBJECTSSENDERTEMPLATECTYPE_CHOICE_ENUM._serialized_start=69398 - _FLOWRSVPPATHOBJECTSSENDERTEMPLATECTYPE_CHOICE_ENUM._serialized_end=69442 - _FLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4._serialized_start=75688 - _FLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4._serialized_end=75994 - _FLOWRSVPPATHOBJECTSCLASSSENDERTSPEC._serialized_start=75997 - _FLOWRSVPPATHOBJECTSCLASSSENDERTSPEC._serialized_end=76135 - _FLOWRSVPPATHOBJECTSSENDERTSPECCTYPE._serialized_start=76138 - _FLOWRSVPPATHOBJECTSSENDERTSPECCTYPE._serialized_end=76365 - _FLOWRSVPPATHOBJECTSSENDERTSPECCTYPE_CHOICE._serialized_start=76307 - _FLOWRSVPPATHOBJECTSSENDERTSPECCTYPE_CHOICE._serialized_end=76354 - _FLOWRSVPPATHOBJECTSSENDERTSPECCTYPE_CHOICE_ENUM._serialized_start=76317 - _FLOWRSVPPATHOBJECTSSENDERTSPECCTYPE_CHOICE_ENUM._serialized_end=76354 - _FLOWRSVPPATHSENDERTSPECINTSERV._serialized_start=76368 - _FLOWRSVPPATHSENDERTSPECINTSERV._serialized_end=77568 - _FLOWRSVPPATHOBJECTSCLASSRECORDROUTE._serialized_start=77571 - _FLOWRSVPPATHOBJECTSCLASSRECORDROUTE._serialized_end=77709 - _FLOWRSVPPATHOBJECTSRECORDROUTECTYPE._serialized_start=77712 - _FLOWRSVPPATHOBJECTSRECORDROUTECTYPE._serialized_end=77933 - _FLOWRSVPPATHOBJECTSRECORDROUTECTYPE_CHOICE._serialized_start=70965 - _FLOWRSVPPATHOBJECTSRECORDROUTECTYPE_CHOICE._serialized_end=71010 - _FLOWRSVPPATHOBJECTSRECORDROUTECTYPE_CHOICE_ENUM._serialized_start=70975 - _FLOWRSVPPATHOBJECTSRECORDROUTECTYPE_CHOICE_ENUM._serialized_end=71010 - _FLOWRSVPPATHRECORDROUTETYPE1._serialized_start=77935 - _FLOWRSVPPATHRECORDROUTETYPE1._serialized_end=78026 - _FLOWRSVPTYPE1RECORDROUTESUBOBJECTS._serialized_start=78028 - _FLOWRSVPTYPE1RECORDROUTESUBOBJECTS._serialized_end=78128 - _FLOWRSVPPATHOBJECTSRECORDROUTESUBOBJECTTYPE._serialized_start=78131 - _FLOWRSVPPATHOBJECTSRECORDROUTESUBOBJECTTYPE._serialized_end=78457 - _FLOWRSVPPATHOBJECTSRECORDROUTESUBOBJECTTYPE_CHOICE._serialized_start=78384 - _FLOWRSVPPATHOBJECTSRECORDROUTESUBOBJECTTYPE_CHOICE._serialized_end=78446 - _FLOWRSVPPATHOBJECTSRECORDROUTESUBOBJECTTYPE_CHOICE_ENUM._serialized_start=78394 - _FLOWRSVPPATHOBJECTSRECORDROUTESUBOBJECTTYPE_CHOICE_ENUM._serialized_end=78446 - _FLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESS._serialized_start=78460 - _FLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESS._serialized_end=78772 - _FLOWRSVPRECORDROUTEIPV4FLAG._serialized_start=78775 - _FLOWRSVPRECORDROUTEIPV4FLAG._serialized_end=78978 - _FLOWRSVPRECORDROUTEIPV4FLAG_CHOICE._serialized_start=78873 - _FLOWRSVPRECORDROUTEIPV4FLAG_CHOICE._serialized_end=78967 - _FLOWRSVPRECORDROUTEIPV4FLAG_CHOICE_ENUM._serialized_start=78883 - _FLOWRSVPRECORDROUTEIPV4FLAG_CHOICE_ENUM._serialized_end=78967 - _FLOWRSVPPATHRECORDROUTETYPE1LABEL._serialized_start=78981 - _FLOWRSVPPATHRECORDROUTETYPE1LABEL._serialized_end=79249 - _FLOWRSVPPATHRECORDROUTELABEL._serialized_start=79252 - _FLOWRSVPPATHRECORDROUTELABEL._serialized_end=79496 - _FLOWRSVPPATHRECORDROUTELABEL_CHOICE._serialized_start=79398 - _FLOWRSVPPATHRECORDROUTELABEL_CHOICE._serialized_end=79459 - _FLOWRSVPPATHRECORDROUTELABEL_CHOICE_ENUM._serialized_start=79408 - _FLOWRSVPPATHRECORDROUTELABEL_CHOICE_ENUM._serialized_end=79459 - _FLOWRSVPROUTERECORDLENGTH._serialized_start=79499 - _FLOWRSVPROUTERECORDLENGTH._serialized_end=79716 - _FLOWRSVPROUTERECORDLENGTH_CHOICE._serialized_start=3062 - _FLOWRSVPROUTERECORDLENGTH_CHOICE._serialized_end=3116 - _FLOWRSVPROUTERECORDLENGTH_CHOICE_ENUM._serialized_start=3072 - _FLOWRSVPROUTERECORDLENGTH_CHOICE_ENUM._serialized_end=3116 - _FLOWRSVPPATHOBJECTSCUSTOM._serialized_start=79719 - _FLOWRSVPPATHOBJECTSCUSTOM._serialized_end=79876 - _FLOWSIZE._serialized_start=79879 - _FLOWSIZE._serialized_end=80197 - _FLOWSIZE_CHOICE._serialized_start=80087 - _FLOWSIZE_CHOICE._serialized_end=80176 - _FLOWSIZE_CHOICE_ENUM._serialized_start=80097 - _FLOWSIZE_CHOICE_ENUM._serialized_end=80176 - _FLOWSIZEINCREMENT._serialized_start=80199 - _FLOWSIZEINCREMENT._serialized_end=80302 - _FLOWSIZERANDOM._serialized_start=80304 - _FLOWSIZERANDOM._serialized_end=80372 - _FLOWSIZEWEIGHTPAIRS._serialized_start=80375 - _FLOWSIZEWEIGHTPAIRS._serialized_end=80772 - _FLOWSIZEWEIGHTPAIRS_CHOICE._serialized_start=80572 - _FLOWSIZEWEIGHTPAIRS_CHOICE._serialized_end=80633 - _FLOWSIZEWEIGHTPAIRS_CHOICE_ENUM._serialized_start=80582 - _FLOWSIZEWEIGHTPAIRS_CHOICE_ENUM._serialized_end=80633 - _FLOWSIZEWEIGHTPAIRS_PREDEFINED._serialized_start=80635 - _FLOWSIZEWEIGHTPAIRS_PREDEFINED._serialized_end=80746 - _FLOWSIZEWEIGHTPAIRS_PREDEFINED_ENUM._serialized_start=80649 - _FLOWSIZEWEIGHTPAIRS_PREDEFINED_ENUM._serialized_end=80746 - _FLOWSIZEWEIGHTPAIRSCUSTOM._serialized_start=80774 - _FLOWSIZEWEIGHTPAIRSCUSTOM._serialized_end=80861 - _FLOWRATE._serialized_start=80864 - _FLOWRATE._serialized_end=81208 - _FLOWRATE_CHOICE._serialized_start=81042 - _FLOWRATE_CHOICE._serialized_end=81139 - _FLOWRATE_CHOICE_ENUM._serialized_start=81052 - _FLOWRATE_CHOICE_ENUM._serialized_end=81139 - _FLOWDURATION._serialized_start=81211 - _FLOWDURATION._serialized_end=81552 - _FLOWDURATION_CHOICE._serialized_start=81443 - _FLOWDURATION_CHOICE._serialized_end=81541 - _FLOWDURATION_CHOICE_ENUM._serialized_start=81453 - _FLOWDURATION_CHOICE_ENUM._serialized_end=81541 - _FLOWCONTINUOUS._serialized_start=81554 - _FLOWCONTINUOUS._serialized_end=81627 - _FLOWDELAY._serialized_start=81630 - _FLOWDELAY._serialized_end=81898 - _FLOWDELAY_CHOICE._serialized_start=81765 - _FLOWDELAY_CHOICE._serialized_end=81844 - _FLOWDELAY_CHOICE_ENUM._serialized_start=81775 - _FLOWDELAY_CHOICE_ENUM._serialized_end=81844 - _FLOWFIXEDPACKETS._serialized_start=81900 - _FLOWFIXEDPACKETS._serialized_end=82009 - _FLOWFIXEDSECONDS._serialized_start=82011 - _FLOWFIXEDSECONDS._serialized_end=82120 - _FLOWBURST._serialized_start=82123 - _FLOWBURST._serialized_end=82283 - _FLOWDURATIONINTERBURSTGAP._serialized_start=82286 - _FLOWDURATIONINTERBURSTGAP._serialized_end=82586 - _FLOWDURATIONINTERBURSTGAP_CHOICE._serialized_start=81765 - _FLOWDURATIONINTERBURSTGAP_CHOICE._serialized_end=81844 - _FLOWDURATIONINTERBURSTGAP_CHOICE_ENUM._serialized_start=81775 - _FLOWDURATIONINTERBURSTGAP_CHOICE_ENUM._serialized_end=81844 - _FLOWMETRICS._serialized_start=82589 - _FLOWMETRICS._serialized_end=82842 - _FLOWLATENCYMETRICS._serialized_start=82845 - _FLOWLATENCYMETRICS._serialized_end=83029 - _FLOWLATENCYMETRICS_MODE._serialized_start=82942 - _FLOWLATENCYMETRICS_MODE._serialized_end=83009 - _FLOWLATENCYMETRICS_MODE_ENUM._serialized_start=82950 - _FLOWLATENCYMETRICS_MODE_ENUM._serialized_end=83009 - _FLOWPREDEFINEDTAGS._serialized_start=83031 - _FLOWPREDEFINEDTAGS._serialized_end=83085 - _FLOWRXTXRATIO._serialized_start=83088 - _FLOWRXTXRATIO._serialized_end=83302 - _FLOWRXTXRATIO_CHOICE._serialized_start=83223 - _FLOWRXTXRATIO_CHOICE._serialized_end=83281 - _FLOWRXTXRATIO_CHOICE_ENUM._serialized_start=83233 - _FLOWRXTXRATIO_CHOICE_ENUM._serialized_end=83281 - _FLOWRXTXRATIORXCOUNT._serialized_start=83304 - _FLOWRXTXRATIORXCOUNT._serialized_end=83326 - _EVENT._serialized_start=83329 - _EVENT._serialized_end=83520 - _EVENTRXRATETHRESHOLD._serialized_start=83522 - _EVENTRXRATETHRESHOLD._serialized_end=83614 - _EVENTLINK._serialized_start=83616 - _EVENTLINK._serialized_end=83659 - _EVENTROUTEADVERTISEWITHDRAW._serialized_start=83661 - _EVENTROUTEADVERTISEWITHDRAW._serialized_end=83722 - _EVENTREQUEST._serialized_start=83725 - _EVENTREQUEST._serialized_end=83970 - _EVENTREQUEST_TYPE._serialized_start=83801 - _EVENTREQUEST_TYPE._serialized_end=83970 - _EVENTREQUEST_TYPE_ENUM._serialized_start=83810 - _EVENTREQUEST_TYPE_ENUM._serialized_end=83970 - _EVENTSUBSCRIPTION._serialized_start=83972 - _EVENTSUBSCRIPTION._serialized_end=84070 - _LLDP._serialized_start=84073 - _LLDP._serialized_end=84366 - _LLDPCONNECTION._serialized_start=84369 - _LLDPCONNECTION._serialized_end=84538 - _LLDPCONNECTION_CHOICE._serialized_start=84465 - _LLDPCONNECTION_CHOICE._serialized_end=84513 - _LLDPCONNECTION_CHOICE_ENUM._serialized_start=2258 - _LLDPCONNECTION_CHOICE_ENUM._serialized_end=2296 - _LLDPCHASSISID._serialized_start=84541 - _LLDPCHASSISID._serialized_end=84894 - _LLDPCHASSISID_CHOICE._serialized_start=84733 - _LLDPCHASSISID_CHOICE._serialized_end=84838 - _LLDPCHASSISID_CHOICE_ENUM._serialized_start=84743 - _LLDPCHASSISID_CHOICE_ENUM._serialized_end=84838 - _LLDPPORTID._serialized_start=84897 - _LLDPPORTID._serialized_end=85248 - _LLDPPORTID_CHOICE._serialized_start=84733 - _LLDPPORTID_CHOICE._serialized_end=84838 - _LLDPPORTID_CHOICE_ENUM._serialized_start=84743 - _LLDPPORTID_CHOICE_ENUM._serialized_end=84838 - _LLDPCHASSISMACSUBTYPE._serialized_start=85251 - _LLDPCHASSISMACSUBTYPE._serialized_end=85460 - _LLDPCHASSISMACSUBTYPE_CHOICE._serialized_start=3062 - _LLDPCHASSISMACSUBTYPE_CHOICE._serialized_end=3116 - _LLDPCHASSISMACSUBTYPE_CHOICE_ENUM._serialized_start=3072 - _LLDPCHASSISMACSUBTYPE_CHOICE_ENUM._serialized_end=3116 - _LLDPPORTINTERFACENAMESUBTYPE._serialized_start=85463 - _LLDPPORTINTERFACENAMESUBTYPE._serialized_end=85686 - _LLDPPORTINTERFACENAMESUBTYPE_CHOICE._serialized_start=3062 - _LLDPPORTINTERFACENAMESUBTYPE_CHOICE._serialized_end=3116 - _LLDPPORTINTERFACENAMESUBTYPE_CHOICE_ENUM._serialized_start=3072 - _LLDPPORTINTERFACENAMESUBTYPE_CHOICE_ENUM._serialized_end=3116 - _LLDPSYSTEMNAME._serialized_start=85689 - _LLDPSYSTEMNAME._serialized_end=85884 - _LLDPSYSTEMNAME_CHOICE._serialized_start=3062 - _LLDPSYSTEMNAME_CHOICE._serialized_end=3116 - _LLDPSYSTEMNAME_CHOICE_ENUM._serialized_start=3072 - _LLDPSYSTEMNAME_CHOICE_ENUM._serialized_end=3116 - _ERROR._serialized_start=85887 - _ERROR._serialized_end=86051 - _ERROR_KIND._serialized_start=85972 - _ERROR_KIND._serialized_end=86033 - _ERROR_KIND_ENUM._serialized_start=85980 - _ERROR_KIND_ENUM._serialized_end=86033 - _WARNING._serialized_start=86053 - _WARNING._serialized_end=86080 - _CONFIGUPDATE._serialized_start=86083 - _CONFIGUPDATE._serialized_end=86239 - _CONFIGUPDATE_CHOICE._serialized_start=86184 - _CONFIGUPDATE_CHOICE._serialized_end=86228 - _CONFIGUPDATE_CHOICE_ENUM._serialized_start=86194 - _CONFIGUPDATE_CHOICE_ENUM._serialized_end=86228 - _FLOWSUPDATE._serialized_start=86242 - _FLOWSUPDATE._serialized_end=86404 - _FLOWSUPDATE_PROPERTYNAMES._serialized_start=86344 - _FLOWSUPDATE_PROPERTYNAMES._serialized_end=86404 - _FLOWSUPDATE_PROPERTYNAMES_ENUM._serialized_start=86361 - _FLOWSUPDATE_PROPERTYNAMES_ENUM._serialized_end=86404 - _CONTROLSTATE._serialized_start=86407 - _CONTROLSTATE._serialized_end=86660 - _CONTROLSTATE_CHOICE._serialized_start=86579 - _CONTROLSTATE_CHOICE._serialized_end=86649 - _CONTROLSTATE_CHOICE_ENUM._serialized_start=86589 - _CONTROLSTATE_CHOICE_ENUM._serialized_end=86649 - _STATEPORT._serialized_start=86663 - _STATEPORT._serialized_end=86866 - _STATEPORT_CHOICE._serialized_start=86799 - _STATEPORT_CHOICE._serialized_end=86855 - _STATEPORT_CHOICE_ENUM._serialized_start=86809 - _STATEPORT_CHOICE_ENUM._serialized_end=86855 - _STATETRAFFIC._serialized_start=86869 - _STATETRAFFIC._serialized_end=87054 - _STATETRAFFIC_CHOICE._serialized_start=86991 - _STATETRAFFIC_CHOICE._serialized_end=87043 - _STATETRAFFIC_CHOICE_ENUM._serialized_start=87001 - _STATETRAFFIC_CHOICE_ENUM._serialized_end=87043 - _STATEPROTOCOL._serialized_start=87057 - _STATEPROTOCOL._serialized_end=87408 - _STATEPROTOCOL_CHOICE._serialized_start=87315 - _STATEPROTOCOL_CHOICE._serialized_end=87397 - _STATEPROTOCOL_CHOICE_ENUM._serialized_start=87325 - _STATEPROTOCOL_CHOICE_ENUM._serialized_end=87397 - _STATEPORTLINK._serialized_start=87411 - _STATEPORTLINK._serialized_end=87559 - _STATEPORTLINK_STATE._serialized_start=87499 - _STATEPORTLINK_STATE._serialized_end=87549 - _STATEPORTLINK_STATE_ENUM._serialized_start=12651 - _STATEPORTLINK_STATE_ENUM._serialized_end=12692 - _STATEPORTCAPTURE._serialized_start=87562 - _STATEPORTCAPTURE._serialized_end=87719 - _STATEPORTCAPTURE_STATE._serialized_start=87656 - _STATEPORTCAPTURE_STATE._serialized_end=87709 - _STATEPORTCAPTURE_STATE_ENUM._serialized_start=87665 - _STATEPORTCAPTURE_STATE_ENUM._serialized_end=87709 - _STATETRAFFICFLOWTRANSMIT._serialized_start=87722 - _STATETRAFFICFLOWTRANSMIT._serialized_end=87918 - _STATETRAFFICFLOWTRANSMIT_STATE._serialized_start=87832 - _STATETRAFFICFLOWTRANSMIT_STATE._serialized_end=87908 - _STATETRAFFICFLOWTRANSMIT_STATE_ENUM._serialized_start=87841 - _STATETRAFFICFLOWTRANSMIT_STATE_ENUM._serialized_end=87908 - _STATEPROTOCOLALL._serialized_start=87921 - _STATEPROTOCOLALL._serialized_end=88058 - _STATEPROTOCOLALL_STATE._serialized_start=87656 - _STATEPROTOCOLALL_STATE._serialized_end=87709 - _STATEPROTOCOLALL_STATE_ENUM._serialized_start=87665 - _STATEPROTOCOLALL_STATE_ENUM._serialized_end=87709 - _STATEPROTOCOLROUTE._serialized_start=88061 - _STATEPROTOCOLROUTE._serialized_end=88225 - _STATEPROTOCOLROUTE_STATE._serialized_start=88154 - _STATEPROTOCOLROUTE_STATE._serialized_end=88215 - _STATEPROTOCOLROUTE_STATE_ENUM._serialized_start=88163 - _STATEPROTOCOLROUTE_STATE_ENUM._serialized_end=88215 - _STATEPROTOCOLLACP._serialized_start=88228 - _STATEPROTOCOLLACP._serialized_end=88480 - _STATEPROTOCOLLACP_CHOICE._serialized_start=88407 - _STATEPROTOCOLLACP_CHOICE._serialized_end=88469 - _STATEPROTOCOLLACP_CHOICE_ENUM._serialized_start=88417 - _STATEPROTOCOLLACP_CHOICE_ENUM._serialized_end=88469 - _STATEPROTOCOLLACPADMIN._serialized_start=88483 - _STATEPROTOCOLLACPADMIN._serialized_end=88655 - _STATEPROTOCOLLACPADMIN_STATE._serialized_start=87499 - _STATEPROTOCOLLACPADMIN_STATE._serialized_end=87549 - _STATEPROTOCOLLACPADMIN_STATE_ENUM._serialized_start=12651 - _STATEPROTOCOLLACPADMIN_STATE_ENUM._serialized_end=12692 - _STATEPROTOCOLLACPMEMBERPORTS._serialized_start=88658 - _STATEPROTOCOLLACPMEMBERPORTS._serialized_end=88842 - _STATEPROTOCOLLACPMEMBERPORTS_STATE._serialized_start=87499 - _STATEPROTOCOLLACPMEMBERPORTS_STATE._serialized_end=87549 - _STATEPROTOCOLLACPMEMBERPORTS_STATE_ENUM._serialized_start=12651 - _STATEPROTOCOLLACPMEMBERPORTS_STATE_ENUM._serialized_end=12692 - _STATEPROTOCOLBGP._serialized_start=88845 - _STATEPROTOCOLBGP._serialized_end=89019 - _STATEPROTOCOLBGP_CHOICE._serialized_start=88964 - _STATEPROTOCOLBGP_CHOICE._serialized_end=89008 - _STATEPROTOCOLBGP_CHOICE_ENUM._serialized_start=88974 - _STATEPROTOCOLBGP_CHOICE_ENUM._serialized_end=89008 - _STATEPROTOCOLBGPPEERS._serialized_start=89022 - _STATEPROTOCOLBGPPEERS._serialized_end=89186 - _STATEPROTOCOLBGPPEERS_STATE._serialized_start=87499 - _STATEPROTOCOLBGPPEERS_STATE._serialized_end=87549 - _STATEPROTOCOLBGPPEERS_STATE_ENUM._serialized_start=12651 - _STATEPROTOCOLBGPPEERS_STATE_ENUM._serialized_end=12692 - _STATEPROTOCOLISIS._serialized_start=89189 - _STATEPROTOCOLISIS._serialized_end=89372 - _STATEPROTOCOLISIS_CHOICE._serialized_start=89315 - _STATEPROTOCOLISIS_CHOICE._serialized_end=89361 - _STATEPROTOCOLISIS_CHOICE_ENUM._serialized_start=89325 - _STATEPROTOCOLISIS_CHOICE_ENUM._serialized_end=89361 - _STATEPROTOCOLISISROUTERS._serialized_start=89375 - _STATEPROTOCOLISISROUTERS._serialized_end=89547 - _STATEPROTOCOLISISROUTERS_STATE._serialized_start=87499 - _STATEPROTOCOLISISROUTERS_STATE._serialized_end=87549 - _STATEPROTOCOLISISROUTERS_STATE_ENUM._serialized_start=12651 - _STATEPROTOCOLISISROUTERS_STATE_ENUM._serialized_end=12692 - _CONTROLACTION._serialized_start=89550 - _CONTROLACTION._serialized_end=89717 - _CONTROLACTION_CHOICE._serialized_start=89659 - _CONTROLACTION_CHOICE._serialized_end=89706 - _CONTROLACTION_CHOICE_ENUM._serialized_start=89669 - _CONTROLACTION_CHOICE_ENUM._serialized_end=89706 - _CONTROLACTIONRESPONSE._serialized_start=89719 - _CONTROLACTIONRESPONSE._serialized_end=89799 - _ACTIONRESPONSE._serialized_start=89802 - _ACTIONRESPONSE._serialized_end=89979 - _ACTIONRESPONSE_CHOICE._serialized_start=89659 - _ACTIONRESPONSE_CHOICE._serialized_end=89706 - _ACTIONRESPONSE_CHOICE_ENUM._serialized_start=89669 - _ACTIONRESPONSE_CHOICE_ENUM._serialized_end=89706 - _ACTIONPROTOCOL._serialized_start=89982 - _ACTIONPROTOCOL._serialized_end=90242 - _ACTIONPROTOCOL_CHOICE._serialized_start=90169 - _ACTIONPROTOCOL_CHOICE._serialized_end=90231 - _ACTIONPROTOCOL_CHOICE_ENUM._serialized_start=90179 - _ACTIONPROTOCOL_CHOICE_ENUM._serialized_end=90231 - _ACTIONRESPONSEPROTOCOL._serialized_start=90245 - _ACTIONRESPONSEPROTOCOL._serialized_end=90491 - _ACTIONRESPONSEPROTOCOL_CHOICE._serialized_start=90427 - _ACTIONRESPONSEPROTOCOL_CHOICE._serialized_end=90480 - _ACTIONRESPONSEPROTOCOL_CHOICE_ENUM._serialized_start=23810 - _ACTIONRESPONSEPROTOCOL_CHOICE_ENUM._serialized_end=23853 - _ACTIONPROTOCOLIPV4._serialized_start=90494 - _ACTIONPROTOCOLIPV4._serialized_end=90671 - _ACTIONPROTOCOLIPV4_CHOICE._serialized_start=90617 - _ACTIONPROTOCOLIPV4_CHOICE._serialized_end=90660 - _ACTIONPROTOCOLIPV4_CHOICE_ENUM._serialized_start=90627 - _ACTIONPROTOCOLIPV4_CHOICE_ENUM._serialized_end=90660 - _ACTIONRESPONSEPROTOCOLIPV4._serialized_start=90674 - _ACTIONRESPONSEPROTOCOLIPV4._serialized_end=90875 - _ACTIONRESPONSEPROTOCOLIPV4_CHOICE._serialized_start=90617 - _ACTIONRESPONSEPROTOCOLIPV4_CHOICE._serialized_end=90660 - _ACTIONRESPONSEPROTOCOLIPV4_CHOICE_ENUM._serialized_start=90627 - _ACTIONRESPONSEPROTOCOLIPV4_CHOICE_ENUM._serialized_end=90660 - _ACTIONPROTOCOLIPV4PING._serialized_start=90877 - _ACTIONPROTOCOLIPV4PING._serialized_end=90955 - _ACTIONPROTOCOLIPV4PINGREQUEST._serialized_start=90957 - _ACTIONPROTOCOLIPV4PINGREQUEST._serialized_end=91056 - _ACTIONRESPONSEPROTOCOLIPV4PING._serialized_start=91058 - _ACTIONRESPONSEPROTOCOLIPV4PING._serialized_end=91154 - _ACTIONRESPONSEPROTOCOLIPV4PINGRESPONSE._serialized_start=91157 - _ACTIONRESPONSEPROTOCOLIPV4PINGRESPONSE._serialized_end=91416 - _ACTIONRESPONSEPROTOCOLIPV4PINGRESPONSE_RESULT._serialized_start=91321 - _ACTIONRESPONSEPROTOCOLIPV4PINGRESPONSE_RESULT._serialized_end=91381 - _ACTIONRESPONSEPROTOCOLIPV4PINGRESPONSE_RESULT_ENUM._serialized_start=91331 - _ACTIONRESPONSEPROTOCOLIPV4PINGRESPONSE_RESULT_ENUM._serialized_end=91381 - _ACTIONPROTOCOLIPV6._serialized_start=91419 - _ACTIONPROTOCOLIPV6._serialized_end=91596 - _ACTIONPROTOCOLIPV6_CHOICE._serialized_start=90617 - _ACTIONPROTOCOLIPV6_CHOICE._serialized_end=90660 - _ACTIONPROTOCOLIPV6_CHOICE_ENUM._serialized_start=90627 - _ACTIONPROTOCOLIPV6_CHOICE_ENUM._serialized_end=90660 - _ACTIONRESPONSEPROTOCOLIPV6._serialized_start=91599 - _ACTIONRESPONSEPROTOCOLIPV6._serialized_end=91800 - _ACTIONRESPONSEPROTOCOLIPV6_CHOICE._serialized_start=90617 - _ACTIONRESPONSEPROTOCOLIPV6_CHOICE._serialized_end=90660 - _ACTIONRESPONSEPROTOCOLIPV6_CHOICE_ENUM._serialized_start=90627 - _ACTIONRESPONSEPROTOCOLIPV6_CHOICE_ENUM._serialized_end=90660 - _ACTIONPROTOCOLIPV6PING._serialized_start=91802 - _ACTIONPROTOCOLIPV6PING._serialized_end=91880 - _ACTIONPROTOCOLIPV6PINGREQUEST._serialized_start=91882 - _ACTIONPROTOCOLIPV6PINGREQUEST._serialized_end=91981 - _ACTIONRESPONSEPROTOCOLIPV6PING._serialized_start=91983 - _ACTIONRESPONSEPROTOCOLIPV6PING._serialized_end=92079 - _ACTIONRESPONSEPROTOCOLIPV6PINGRESPONSE._serialized_start=92082 - _ACTIONRESPONSEPROTOCOLIPV6PINGRESPONSE._serialized_end=92341 - _ACTIONRESPONSEPROTOCOLIPV6PINGRESPONSE_RESULT._serialized_start=91321 - _ACTIONRESPONSEPROTOCOLIPV6PINGRESPONSE_RESULT._serialized_end=91381 - _ACTIONRESPONSEPROTOCOLIPV6PINGRESPONSE_RESULT_ENUM._serialized_start=91331 - _ACTIONRESPONSEPROTOCOLIPV6PINGRESPONSE_RESULT_ENUM._serialized_end=91381 - _ACTIONPROTOCOLBGP._serialized_start=92344 - _ACTIONPROTOCOLBGP._serialized_end=92655 - _ACTIONPROTOCOLBGP_CHOICE._serialized_start=92562 - _ACTIONPROTOCOLBGP_CHOICE._serialized_end=92644 - _ACTIONPROTOCOLBGP_CHOICE_ENUM._serialized_start=92572 - _ACTIONPROTOCOLBGP_CHOICE_ENUM._serialized_end=92644 - _ACTIONPROTOCOLBGPNOTIFICATION._serialized_start=92658 - _ACTIONPROTOCOLBGPNOTIFICATION._serialized_end=93383 - _ACTIONPROTOCOLBGPNOTIFICATION_CHOICE._serialized_start=93183 - _ACTIONPROTOCOLBGPNOTIFICATION_CHOICE._serialized_end=93372 - _ACTIONPROTOCOLBGPNOTIFICATION_CHOICE_ENUM._serialized_start=93194 - _ACTIONPROTOCOLBGPNOTIFICATION_CHOICE_ENUM._serialized_end=93372 - _ACTIONPROTOCOLBGPINITIATEGRACEFULRESTART._serialized_start=93385 - _ACTIONPROTOCOLBGPINITIATEGRACEFULRESTART._serialized_end=93493 - _METRICSREQUEST._serialized_start=93496 - _METRICSREQUEST._serialized_end=94056 - _METRICSREQUEST_CHOICE._serialized_start=93921 - _METRICSREQUEST_CHOICE._serialized_end=94045 - _METRICSREQUEST_CHOICE_ENUM._serialized_start=93931 - _METRICSREQUEST_CHOICE_ENUM._serialized_end=94045 - _METRICSRESPONSE._serialized_start=94059 - _METRICSRESPONSE._serialized_end=94695 - _METRICSRESPONSE_CHOICE._serialized_start=94487 - _METRICSRESPONSE_CHOICE._serialized_end=94684 - _METRICSRESPONSE_CHOICE_ENUM._serialized_start=94498 - _METRICSRESPONSE_CHOICE_ENUM._serialized_end=94684 - _PORTMETRICSREQUEST._serialized_start=94698 - _PORTMETRICSREQUEST._serialized_end=95031 - _PORTMETRICSREQUEST_COLUMNNAMES._serialized_start=94805 - _PORTMETRICSREQUEST_COLUMNNAMES._serialized_end=95031 - _PORTMETRICSREQUEST_COLUMNNAMES_ENUM._serialized_start=94821 - _PORTMETRICSREQUEST_COLUMNNAMES_ENUM._serialized_end=95031 - _PORTMETRIC._serialized_start=95034 - _PORTMETRIC._serialized_end=95808 - _PORTMETRIC_LINK._serialized_start=95450 - _PORTMETRIC_LINK._serialized_end=95499 - _PORTMETRIC_LINK_ENUM._serialized_start=12651 - _PORTMETRIC_LINK_ENUM._serialized_end=12692 - _PORTMETRIC_CAPTURE._serialized_start=95501 - _PORTMETRIC_CAPTURE._serialized_end=95561 - _PORTMETRIC_CAPTURE_ENUM._serialized_start=95512 - _PORTMETRIC_CAPTURE_ENUM._serialized_end=95561 - _PORTMETRIC_TRANSMIT._serialized_start=95563 - _PORTMETRIC_TRANSMIT._serialized_end=95624 - _PORTMETRIC_TRANSMIT_ENUM._serialized_start=95512 - _PORTMETRIC_TRANSMIT_ENUM._serialized_end=95561 - _FLOWMETRICSREQUEST._serialized_start=95811 - _FLOWMETRICSREQUEST._serialized_end=96123 - _FLOWMETRICSREQUEST_METRICNAMES._serialized_start=95972 - _FLOWMETRICSREQUEST_METRICNAMES._serialized_end=96123 - _FLOWMETRICSREQUEST_METRICNAMES_ENUM._serialized_start=95988 - _FLOWMETRICSREQUEST_METRICNAMES_ENUM._serialized_end=96123 - _FLOWTAGGEDMETRICSFILTER._serialized_start=96126 - _FLOWTAGGEDMETRICSFILTER._serialized_end=96498 - _FLOWTAGGEDMETRICSFILTER_METRICNAMES._serialized_start=96324 - _FLOWTAGGEDMETRICSFILTER_METRICNAMES._serialized_end=96460 - _FLOWTAGGEDMETRICSFILTER_METRICNAMES_ENUM._serialized_start=96339 - _FLOWTAGGEDMETRICSFILTER_METRICNAMES_ENUM._serialized_end=96460 - _FLOWMETRICTAGFILTER._serialized_start=96500 - _FLOWMETRICTAGFILTER._serialized_end=96565 - _FLOWMETRIC._serialized_start=96568 - _FLOWMETRIC._serialized_end=97216 - _FLOWMETRIC_TRANSMIT._serialized_start=96996 - _FLOWMETRIC_TRANSMIT._serialized_end=97069 - _FLOWMETRIC_TRANSMIT_ENUM._serialized_start=97008 - _FLOWMETRIC_TRANSMIT_ENUM._serialized_end=97069 - _FLOWTAGGEDMETRIC._serialized_start=97219 - _FLOWTAGGEDMETRIC._serialized_end=97622 - _FLOWMETRICTAG._serialized_start=97624 - _FLOWMETRICTAG._serialized_end=97707 - _FLOWMETRICTAGVALUE._serialized_start=97710 - _FLOWMETRICTAGVALUE._serialized_end=97904 - _FLOWMETRICTAGVALUE_CHOICE._serialized_start=97826 - _FLOWMETRICTAGVALUE_CHOICE._serialized_end=97877 - _FLOWMETRICTAGVALUE_CHOICE_ENUM._serialized_start=97836 - _FLOWMETRICTAGVALUE_CHOICE_ENUM._serialized_end=97877 - _METRICTIMESTAMP._serialized_start=97906 - _METRICTIMESTAMP._serialized_end=98033 - _METRICLATENCY._serialized_start=98036 - _METRICLATENCY._serialized_end=98171 - _BGPV4METRICSREQUEST._serialized_start=98174 - _BGPV4METRICSREQUEST._serialized_end=98679 - _BGPV4METRICSREQUEST_COLUMNNAMES._serialized_start=98283 - _BGPV4METRICSREQUEST_COLUMNNAMES._serialized_end=98679 - _BGPV4METRICSREQUEST_COLUMNNAMES_ENUM._serialized_start=98299 - _BGPV4METRICSREQUEST_COLUMNNAMES_ENUM._serialized_end=98679 - _BGPV4METRIC._serialized_start=98682 - _BGPV4METRIC._serialized_end=99812 - _BGPV4METRIC_SESSIONSTATE._serialized_start=99285 - _BGPV4METRIC_SESSIONSTATE._serialized_end=99342 - _BGPV4METRIC_SESSIONSTATE_ENUM._serialized_start=12651 - _BGPV4METRIC_SESSIONSTATE_ENUM._serialized_end=12692 - _BGPV4METRIC_FSMSTATE._serialized_start=99344 - _BGPV4METRIC_FSMSTATE._serialized_end=99462 - _BGPV4METRIC_FSMSTATE_ENUM._serialized_start=99356 - _BGPV4METRIC_FSMSTATE_ENUM._serialized_end=99462 - _BGPV6METRICSREQUEST._serialized_start=99815 - _BGPV6METRICSREQUEST._serialized_end=100320 - _BGPV6METRICSREQUEST_COLUMNNAMES._serialized_start=98283 - _BGPV6METRICSREQUEST_COLUMNNAMES._serialized_end=98679 - _BGPV6METRICSREQUEST_COLUMNNAMES_ENUM._serialized_start=98299 - _BGPV6METRICSREQUEST_COLUMNNAMES_ENUM._serialized_end=98679 - _BGPV6METRIC._serialized_start=100323 - _BGPV6METRIC._serialized_end=101453 - _BGPV6METRIC_SESSIONSTATE._serialized_start=99285 - _BGPV6METRIC_SESSIONSTATE._serialized_end=99342 - _BGPV6METRIC_SESSIONSTATE_ENUM._serialized_start=12651 - _BGPV6METRIC_SESSIONSTATE_ENUM._serialized_end=12692 - _BGPV6METRIC_FSMSTATE._serialized_start=99344 - _BGPV6METRIC_FSMSTATE._serialized_end=99462 - _BGPV6METRIC_FSMSTATE_ENUM._serialized_start=99356 - _BGPV6METRIC_FSMSTATE_ENUM._serialized_end=99462 - _ISISMETRICSREQUEST._serialized_start=101456 - _ISISMETRICSREQUEST._serialized_end=102242 - _ISISMETRICSREQUEST_COLUMNNAMES._serialized_start=101565 - _ISISMETRICSREQUEST_COLUMNNAMES._serialized_end=102242 - _ISISMETRICSREQUEST_COLUMNNAMES_ENUM._serialized_start=101581 - _ISISMETRICSREQUEST_COLUMNNAMES_ENUM._serialized_end=102242 - _ISISMETRIC._serialized_start=102245 - _ISISMETRIC._serialized_end=103769 - _LAGMETRICSREQUEST._serialized_start=103772 - _LAGMETRICSREQUEST._serialized_end=104089 - _LAGMETRICSREQUEST_COLUMNNAMES._serialized_start=103876 - _LAGMETRICSREQUEST_COLUMNNAMES._serialized_end=104089 - _LAGMETRICSREQUEST_COLUMNNAMES_ENUM._serialized_start=103892 - _LAGMETRICSREQUEST_COLUMNNAMES_ENUM._serialized_end=104089 - _LAGMETRIC._serialized_start=104092 - _LAGMETRIC._serialized_end=104648 - _LAGMETRIC_OPERSTATUS._serialized_start=104420 - _LAGMETRIC_OPERSTATUS._serialized_end=104475 - _LAGMETRIC_OPERSTATUS_ENUM._serialized_start=12651 - _LAGMETRIC_OPERSTATUS_ENUM._serialized_end=12692 - _LACPMETRICSREQUEST._serialized_start=104651 - _LACPMETRICSREQUEST._serialized_end=105087 - _LACPMETRICSREQUEST_COLUMNNAMES._serialized_start=104788 - _LACPMETRICSREQUEST_COLUMNNAMES._serialized_end=105087 - _LACPMETRICSREQUEST_COLUMNNAMES_ENUM._serialized_start=104804 - _LACPMETRICSREQUEST_COLUMNNAMES_ENUM._serialized_end=105087 - _LACPMETRIC._serialized_start=105090 - _LACPMETRIC._serialized_end=106127 - _LACPMETRIC_ACTIVITY._serialized_start=105656 - _LACPMETRIC_ACTIVITY._serialized_end=105716 - _LACPMETRIC_ACTIVITY_ENUM._serialized_start=105668 - _LACPMETRIC_ACTIVITY_ENUM._serialized_end=105716 - _LACPMETRIC_TIMEOUT._serialized_start=105718 - _LACPMETRIC_TIMEOUT._serialized_end=105773 - _LACPMETRIC_TIMEOUT_ENUM._serialized_start=105729 - _LACPMETRIC_TIMEOUT_ENUM._serialized_end=105773 - _LACPMETRIC_SYNCHRONIZATION._serialized_start=105775 - _LACPMETRIC_SYNCHRONIZATION._serialized_end=105844 - _LACPMETRIC_SYNCHRONIZATION_ENUM._serialized_start=105794 - _LACPMETRIC_SYNCHRONIZATION_ENUM._serialized_end=105844 - _LLDPMETRICSREQUEST._serialized_start=106130 - _LLDPMETRICSREQUEST._serialized_end=106383 - _LLDPMETRICSREQUEST_COLUMNNAMES._serialized_start=106237 - _LLDPMETRICSREQUEST_COLUMNNAMES._serialized_end=106383 - _LLDPMETRICSREQUEST_COLUMNNAMES_ENUM._serialized_start=106253 - _LLDPMETRICSREQUEST_COLUMNNAMES_ENUM._serialized_end=106383 - _LLDPMETRIC._serialized_start=106386 - _LLDPMETRIC._serialized_end=106688 - _RSVPMETRICSREQUEST._serialized_start=106691 - _RSVPMETRICSREQUEST._serialized_end=107397 - _RSVPMETRICSREQUEST_COLUMNNAMES._serialized_start=106800 - _RSVPMETRICSREQUEST_COLUMNNAMES._serialized_end=107397 - _RSVPMETRICSREQUEST_COLUMNNAMES_ENUM._serialized_start=106816 - _RSVPMETRICSREQUEST_COLUMNNAMES_ENUM._serialized_end=107397 - _RSVPMETRIC._serialized_start=107400 - _RSVPMETRIC._serialized_end=108796 - _STATESREQUEST._serialized_start=108799 - _STATESREQUEST._serialized_end=109331 - _STATESREQUEST_CHOICE._serialized_start=109178 - _STATESREQUEST_CHOICE._serialized_end=109320 - _STATESREQUEST_CHOICE_ENUM._serialized_start=109189 - _STATESREQUEST_CHOICE_ENUM._serialized_end=109320 - _STATESRESPONSE._serialized_start=109334 - _STATESRESPONSE._serialized_end=109826 - _STATESRESPONSE_CHOICE._serialized_start=109178 - _STATESRESPONSE_CHOICE._serialized_end=109320 - _STATESRESPONSE_CHOICE_ENUM._serialized_start=109189 - _STATESRESPONSE_CHOICE_ENUM._serialized_end=109320 - _NEIGHBORSV4STATESREQUEST._serialized_start=109828 - _NEIGHBORSV4STATESREQUEST._serialized_end=109878 - _NEIGHBORSV4STATE._serialized_start=109881 - _NEIGHBORSV4STATE._serialized_end=110045 - _NEIGHBORSV6STATESREQUEST._serialized_start=110047 - _NEIGHBORSV6STATESREQUEST._serialized_end=110097 - _NEIGHBORSV6STATE._serialized_start=110100 - _NEIGHBORSV6STATE._serialized_end=110264 - _BGPPREFIXSTATEREQUEST._serialized_start=110267 - _BGPPREFIXSTATEREQUEST._serialized_end=110589 - _BGPPREFIXSTATEREQUEST_PREFIXFILTERS._serialized_start=110513 - _BGPPREFIXSTATEREQUEST_PREFIXFILTERS._serialized_end=110589 - _BGPPREFIXSTATEREQUEST_PREFIXFILTERS_ENUM._serialized_start=43026 - _BGPPREFIXSTATEREQUEST_PREFIXFILTERS_ENUM._serialized_end=43085 - _BGPPREFIXIPV4UNICASTFILTER._serialized_start=110592 - _BGPPREFIXIPV4UNICASTFILTER._serialized_end=110865 - _BGPPREFIXIPV4UNICASTFILTER_ORIGIN._serialized_start=17742 - _BGPPREFIXIPV4UNICASTFILTER_ORIGIN._serialized_end=17809 - _BGPPREFIXIPV4UNICASTFILTER_ORIGIN_ENUM._serialized_start=17752 - _BGPPREFIXIPV4UNICASTFILTER_ORIGIN_ENUM._serialized_end=17809 - _BGPPREFIXIPV6UNICASTFILTER._serialized_start=110868 - _BGPPREFIXIPV6UNICASTFILTER._serialized_end=111141 - _BGPPREFIXIPV6UNICASTFILTER_ORIGIN._serialized_start=17742 - _BGPPREFIXIPV6UNICASTFILTER_ORIGIN._serialized_end=17809 - _BGPPREFIXIPV6UNICASTFILTER_ORIGIN_ENUM._serialized_start=17752 - _BGPPREFIXIPV6UNICASTFILTER_ORIGIN_ENUM._serialized_end=17809 - _BGPPREFIXESSTATE._serialized_start=111144 - _BGPPREFIXESSTATE._serialized_end=111334 - _BGPPREFIXIPV4UNICASTSTATE._serialized_start=111337 - _BGPPREFIXIPV4UNICASTSTATE._serialized_end=111930 - _BGPPREFIXIPV4UNICASTSTATE_ORIGIN._serialized_start=17742 - _BGPPREFIXIPV4UNICASTSTATE_ORIGIN._serialized_end=17809 - _BGPPREFIXIPV4UNICASTSTATE_ORIGIN_ENUM._serialized_start=17752 - _BGPPREFIXIPV4UNICASTSTATE_ORIGIN_ENUM._serialized_end=17809 - _BGPPREFIXIPV6UNICASTSTATE._serialized_start=111933 - _BGPPREFIXIPV6UNICASTSTATE._serialized_end=112526 - _BGPPREFIXIPV6UNICASTSTATE_ORIGIN._serialized_start=17742 - _BGPPREFIXIPV6UNICASTSTATE_ORIGIN._serialized_end=17809 - _BGPPREFIXIPV6UNICASTSTATE_ORIGIN_ENUM._serialized_start=17752 - _BGPPREFIXIPV6UNICASTSTATE_ORIGIN_ENUM._serialized_end=17809 - _RESULTBGPCOMMUNITY._serialized_start=112529 - _RESULTBGPCOMMUNITY._serialized_end=112833 - _RESULTBGPCOMMUNITY_TYPE._serialized_start=18071 - _RESULTBGPCOMMUNITY_TYPE._serialized_end=18213 - _RESULTBGPCOMMUNITY_TYPE_ENUM._serialized_start=18080 - _RESULTBGPCOMMUNITY_TYPE_ENUM._serialized_end=18213 - _RESULTBGPASPATH._serialized_start=112835 - _RESULTBGPASPATH._serialized_end=112899 - _RESULTBGPASPATHSEGMENT._serialized_start=112902 - _RESULTBGPASPATHSEGMENT._serialized_end=113108 - _RESULTBGPASPATHSEGMENT_TYPE._serialized_start=19174 - _RESULTBGPASPATHSEGMENT_TYPE._serialized_end=19267 - _RESULTBGPASPATHSEGMENT_TYPE_ENUM._serialized_start=19182 - _RESULTBGPASPATHSEGMENT_TYPE_ENUM._serialized_end=19267 - _ISISLSPSSTATEREQUEST._serialized_start=113110 - _ISISLSPSSTATEREQUEST._serialized_end=113159 - _ISISLSPSSTATE._serialized_start=113161 - _ISISLSPSSTATE._serialized_end=113261 - _ISISLSPSTATE._serialized_start=113264 - _ISISLSPSTATE._serialized_end=113686 - _ISISLSPSTATE_PDUTYPE._serialized_start=113532 - _ISISLSPSTATE_PDUTYPE._serialized_end=113592 - _ISISLSPSTATE_PDUTYPE_ENUM._serialized_start=9202 - _ISISLSPSTATE_PDUTYPE_ENUM._serialized_end=9251 - _ISISLSPTLVS._serialized_start=113689 - _ISISLSPTLVS._serialized_end=114197 - _ISISLSPHOSTNAME._serialized_start=114199 - _ISISLSPHOSTNAME._serialized_end=114252 - _ISISLSPFLAGS._serialized_start=114255 - _ISISLSPFLAGS._serialized_end=114557 - _ISISLSPISREACHABILITYTLV._serialized_start=114559 - _ISISLSPISREACHABILITYTLV._serialized_end=114626 - _ISISLSPEXTENDEDISREACHABILITYTLV._serialized_start=114628 - _ISISLSPEXTENDEDISREACHABILITYTLV._serialized_end=114703 - _ISISLSPNEIGHBOR._serialized_start=114705 - _ISISLSPNEIGHBOR._serialized_end=114760 - _ISISLSPIPV4INTERNALREACHABILITYTLV._serialized_start=114762 - _ISISLSPIPV4INTERNALREACHABILITYTLV._serialized_end=114838 - _ISISLSPIPV4EXTERNALREACHABILITYTLV._serialized_start=114840 - _ISISLSPIPV4EXTERNALREACHABILITYTLV._serialized_end=114916 - _ISISLSPV4PREFIX._serialized_start=114919 - _ISISLSPV4PREFIX._serialized_end=115390 - _ISISLSPV4PREFIX_REDISTRIBUTIONTYPE._serialized_start=12629 - _ISISLSPV4PREFIX_REDISTRIBUTIONTYPE._serialized_end=12692 - _ISISLSPV4PREFIX_REDISTRIBUTIONTYPE_ENUM._serialized_start=12651 - _ISISLSPV4PREFIX_REDISTRIBUTIONTYPE_ENUM._serialized_end=12692 - _ISISLSPV4PREFIX_ORIGINTYPE._serialized_start=12562 - _ISISLSPV4PREFIX_ORIGINTYPE._serialized_end=12627 - _ISISLSPV4PREFIX_ORIGINTYPE_ENUM._serialized_start=12576 - _ISISLSPV4PREFIX_ORIGINTYPE_ENUM._serialized_end=12627 - _ISISLSPEXTENDEDIPV4REACHABILITYTLV._serialized_start=115392 - _ISISLSPEXTENDEDIPV4REACHABILITYTLV._serialized_end=115476 - _ISISLSPEXTENDEDV4PREFIX._serialized_start=115479 - _ISISLSPEXTENDEDV4PREFIX._serialized_end=115860 - _ISISLSPEXTENDEDV4PREFIX_REDISTRIBUTIONTYPE._serialized_start=12629 - _ISISLSPEXTENDEDV4PREFIX_REDISTRIBUTIONTYPE._serialized_end=12692 - _ISISLSPEXTENDEDV4PREFIX_REDISTRIBUTIONTYPE_ENUM._serialized_start=12651 - _ISISLSPEXTENDEDV4PREFIX_REDISTRIBUTIONTYPE_ENUM._serialized_end=12692 - _ISISLSPIPV6REACHABILITYTLV._serialized_start=115862 - _ISISLSPIPV6REACHABILITYTLV._serialized_end=115930 - _ISISLSPV6PREFIX._serialized_start=115933 - _ISISLSPV6PREFIX._serialized_end=116445 - _ISISLSPV6PREFIX_REDISTRIBUTIONTYPE._serialized_start=12629 - _ISISLSPV6PREFIX_REDISTRIBUTIONTYPE._serialized_end=12692 - _ISISLSPV6PREFIX_REDISTRIBUTIONTYPE_ENUM._serialized_start=12651 - _ISISLSPV6PREFIX_REDISTRIBUTIONTYPE_ENUM._serialized_end=12692 - _ISISLSPV6PREFIX_ORIGINTYPE._serialized_start=12562 - _ISISLSPV6PREFIX_ORIGINTYPE._serialized_end=12627 - _ISISLSPV6PREFIX_ORIGINTYPE_ENUM._serialized_start=12576 - _ISISLSPV6PREFIX_ORIGINTYPE_ENUM._serialized_end=12627 - _ISISLSPPREFIXATTRIBUTES._serialized_start=116447 - _ISISLSPPREFIXATTRIBUTES._serialized_end=116568 - _LLDPNEIGHBORSSTATEREQUEST._serialized_start=116570 - _LLDPNEIGHBORSSTATEREQUEST._serialized_end=116646 - _LLDPNEIGHBORSSTATE._serialized_start=116649 - _LLDPNEIGHBORSSTATE._serialized_end=117812 - _LLDPNEIGHBORSSTATE_CHASSISIDTYPE._serialized_start=117228 - _LLDPNEIGHBORSSTATE_CHASSISIDTYPE._serialized_end=117402 - _LLDPNEIGHBORSSTATE_CHASSISIDTYPE_ENUM._serialized_start=117246 - _LLDPNEIGHBORSSTATE_CHASSISIDTYPE_ENUM._serialized_end=117402 - _LLDPNEIGHBORSSTATE_PORTIDTYPE._serialized_start=117405 - _LLDPNEIGHBORSSTATE_PORTIDTYPE._serialized_end=117575 - _LLDPNEIGHBORSSTATE_PORTIDTYPE_ENUM._serialized_start=117420 - _LLDPNEIGHBORSSTATE_PORTIDTYPE_ENUM._serialized_end=117575 - _LLDPCUSTOMTLVSTATE._serialized_start=117815 - _LLDPCUSTOMTLVSTATE._serialized_end=117945 - _LLDPCAPABILITYSTATE._serialized_start=117948 - _LLDPCAPABILITYSTATE._serialized_end=118348 - _LLDPCAPABILITYSTATE_CAPABILITYNAME._serialized_start=118081 - _LLDPCAPABILITYSTATE_CAPABILITYNAME._serialized_end=118305 - _LLDPCAPABILITYSTATE_CAPABILITYNAME_ENUM._serialized_start=118100 - _LLDPCAPABILITYSTATE_CAPABILITYNAME_ENUM._serialized_end=118305 - _RSVPLSPSSTATEREQUEST._serialized_start=118350 - _RSVPLSPSSTATEREQUEST._serialized_end=118399 - _RSVPLSPSSTATE._serialized_start=118401 - _RSVPLSPSSTATE._serialized_end=118510 - _RSVPIPV4LSPSTATE._serialized_start=118513 - _RSVPIPV4LSPSTATE._serialized_end=118739 - _RSVPLSPSTATE._serialized_start=118742 - _RSVPLSPSTATE._serialized_end=119306 - _RSVPLSPSTATE_SESSIONSTATUS._serialized_start=119036 - _RSVPLSPSTATE_SESSIONSTATUS._serialized_end=119094 - _RSVPLSPSTATE_SESSIONSTATUS_ENUM._serialized_start=12651 - _RSVPLSPSTATE_SESSIONSTATUS_ENUM._serialized_end=12692 - _RSVPLSPSTATE_LASTFLAPREASON._serialized_start=119096 - _RSVPLSPSTATE_LASTFLAPREASON._serialized_end=119185 - _RSVPLSPSTATE_LASTFLAPREASON_ENUM._serialized_start=119114 - _RSVPLSPSTATE_LASTFLAPREASON_ENUM._serialized_end=119185 - _RSVPLSPIPV4RRO._serialized_start=119308 - _RSVPLSPIPV4RRO._serialized_end=119406 - _RSVPLSPIPV4ERO._serialized_start=119409 - _RSVPLSPIPV4ERO._serialized_end=119651 - _RSVPLSPIPV4ERO_TYPE._serialized_start=119516 - _RSVPLSPIPV4ERO_TYPE._serialized_end=119623 - _RSVPLSPIPV4ERO_TYPE_ENUM._serialized_start=119524 - _RSVPLSPIPV4ERO_TYPE_ENUM._serialized_end=119623 - _CAPTUREREQUEST._serialized_start=119653 - _CAPTUREREQUEST._serialized_end=119707 - _PATTERNFLOWETHERNETDSTCOUNTER._serialized_start=119709 - _PATTERNFLOWETHERNETDSTCOUNTER._serialized_end=119828 - _PATTERNFLOWETHERNETDSTMETRICTAG._serialized_start=119830 - _PATTERNFLOWETHERNETDSTMETRICTAG._serialized_end=119955 - _PATTERNFLOWETHERNETDST._serialized_start=119958 - _PATTERNFLOWETHERNETDST._serialized_end=120396 - _PATTERNFLOWETHERNETDST_CHOICE._serialized_start=120270 - _PATTERNFLOWETHERNETDST_CHOICE._serialized_end=120366 - _PATTERNFLOWETHERNETDST_CHOICE_ENUM._serialized_start=120280 - _PATTERNFLOWETHERNETDST_CHOICE_ENUM._serialized_end=120366 - _PATTERNFLOWETHERNETSRCCOUNTER._serialized_start=120398 - _PATTERNFLOWETHERNETSRCCOUNTER._serialized_end=120517 - _PATTERNFLOWETHERNETSRCMETRICTAG._serialized_start=120519 - _PATTERNFLOWETHERNETSRCMETRICTAG._serialized_end=120644 - _PATTERNFLOWETHERNETSRC._serialized_start=120647 - _PATTERNFLOWETHERNETSRC._serialized_end=121047 - _PATTERNFLOWETHERNETSRC_CHOICE._serialized_start=120940 - _PATTERNFLOWETHERNETSRC_CHOICE._serialized_end=121026 - _PATTERNFLOWETHERNETSRC_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWETHERNETSRC_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWETHERNETETHERTYPECOUNTER._serialized_start=121049 - _PATTERNFLOWETHERNETETHERTYPECOUNTER._serialized_end=121174 - _PATTERNFLOWETHERNETETHERTYPEMETRICTAG._serialized_start=121177 - _PATTERNFLOWETHERNETETHERTYPEMETRICTAG._serialized_end=121308 - _PATTERNFLOWETHERNETETHERTYPE._serialized_start=121311 - _PATTERNFLOWETHERNETETHERTYPE._serialized_end=121779 - _PATTERNFLOWETHERNETETHERTYPE_CHOICE._serialized_start=120270 - _PATTERNFLOWETHERNETETHERTYPE_CHOICE._serialized_end=120366 - _PATTERNFLOWETHERNETETHERTYPE_CHOICE_ENUM._serialized_start=120280 - _PATTERNFLOWETHERNETETHERTYPE_CHOICE_ENUM._serialized_end=120366 - _PATTERNFLOWETHERNETPFCQUEUECOUNTER._serialized_start=121781 - _PATTERNFLOWETHERNETPFCQUEUECOUNTER._serialized_end=121905 - _PATTERNFLOWETHERNETPFCQUEUEMETRICTAG._serialized_start=121908 - _PATTERNFLOWETHERNETPFCQUEUEMETRICTAG._serialized_end=122038 - _PATTERNFLOWETHERNETPFCQUEUE._serialized_start=122041 - _PATTERNFLOWETHERNETPFCQUEUE._serialized_end=122466 - _PATTERNFLOWETHERNETPFCQUEUE_CHOICE._serialized_start=120940 - _PATTERNFLOWETHERNETPFCQUEUE_CHOICE._serialized_end=121026 - _PATTERNFLOWETHERNETPFCQUEUE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWETHERNETPFCQUEUE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWVLANPRIORITYCOUNTER._serialized_start=122468 - _PATTERNFLOWVLANPRIORITYCOUNTER._serialized_end=122588 - _PATTERNFLOWVLANPRIORITYMETRICTAG._serialized_start=122590 - _PATTERNFLOWVLANPRIORITYMETRICTAG._serialized_end=122716 - _PATTERNFLOWVLANPRIORITY._serialized_start=122719 - _PATTERNFLOWVLANPRIORITY._serialized_end=123124 - _PATTERNFLOWVLANPRIORITY_CHOICE._serialized_start=120940 - _PATTERNFLOWVLANPRIORITY_CHOICE._serialized_end=121026 - _PATTERNFLOWVLANPRIORITY_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWVLANPRIORITY_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWVLANCFICOUNTER._serialized_start=123126 - _PATTERNFLOWVLANCFICOUNTER._serialized_end=123241 - _PATTERNFLOWVLANCFIMETRICTAG._serialized_start=123243 - _PATTERNFLOWVLANCFIMETRICTAG._serialized_end=123364 - _PATTERNFLOWVLANCFI._serialized_start=123367 - _PATTERNFLOWVLANCFI._serialized_end=123747 - _PATTERNFLOWVLANCFI_CHOICE._serialized_start=120940 - _PATTERNFLOWVLANCFI_CHOICE._serialized_end=121026 - _PATTERNFLOWVLANCFI_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWVLANCFI_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWVLANIDCOUNTER._serialized_start=123749 - _PATTERNFLOWVLANIDCOUNTER._serialized_end=123863 - _PATTERNFLOWVLANIDMETRICTAG._serialized_start=123865 - _PATTERNFLOWVLANIDMETRICTAG._serialized_end=123985 - _PATTERNFLOWVLANID._serialized_start=123988 - _PATTERNFLOWVLANID._serialized_end=124363 - _PATTERNFLOWVLANID_CHOICE._serialized_start=120940 - _PATTERNFLOWVLANID_CHOICE._serialized_end=121026 - _PATTERNFLOWVLANID_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWVLANID_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWVLANTPIDCOUNTER._serialized_start=124365 - _PATTERNFLOWVLANTPIDCOUNTER._serialized_end=124481 - _PATTERNFLOWVLANTPIDMETRICTAG._serialized_start=124483 - _PATTERNFLOWVLANTPIDMETRICTAG._serialized_end=124605 - _PATTERNFLOWVLANTPID._serialized_start=124608 - _PATTERNFLOWVLANTPID._serialized_end=124993 - _PATTERNFLOWVLANTPID_CHOICE._serialized_start=120940 - _PATTERNFLOWVLANTPID_CHOICE._serialized_end=121026 - _PATTERNFLOWVLANTPID_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWVLANTPID_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWVXLANFLAGSCOUNTER._serialized_start=124995 - _PATTERNFLOWVXLANFLAGSCOUNTER._serialized_end=125113 - _PATTERNFLOWVXLANFLAGSMETRICTAG._serialized_start=125115 - _PATTERNFLOWVXLANFLAGSMETRICTAG._serialized_end=125239 - _PATTERNFLOWVXLANFLAGS._serialized_start=125242 - _PATTERNFLOWVXLANFLAGS._serialized_end=125637 - _PATTERNFLOWVXLANFLAGS_CHOICE._serialized_start=120940 - _PATTERNFLOWVXLANFLAGS_CHOICE._serialized_end=121026 - _PATTERNFLOWVXLANFLAGS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWVXLANFLAGS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWVXLANRESERVED0COUNTER._serialized_start=125639 - _PATTERNFLOWVXLANRESERVED0COUNTER._serialized_end=125761 - _PATTERNFLOWVXLANRESERVED0METRICTAG._serialized_start=125764 - _PATTERNFLOWVXLANRESERVED0METRICTAG._serialized_end=125892 - _PATTERNFLOWVXLANRESERVED0._serialized_start=125895 - _PATTERNFLOWVXLANRESERVED0._serialized_end=126310 - _PATTERNFLOWVXLANRESERVED0_CHOICE._serialized_start=120940 - _PATTERNFLOWVXLANRESERVED0_CHOICE._serialized_end=121026 - _PATTERNFLOWVXLANRESERVED0_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWVXLANRESERVED0_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWVXLANVNICOUNTER._serialized_start=126312 - _PATTERNFLOWVXLANVNICOUNTER._serialized_end=126428 - _PATTERNFLOWVXLANVNIMETRICTAG._serialized_start=126430 - _PATTERNFLOWVXLANVNIMETRICTAG._serialized_end=126552 - _PATTERNFLOWVXLANVNI._serialized_start=126555 - _PATTERNFLOWVXLANVNI._serialized_end=126978 - _PATTERNFLOWVXLANVNI_CHOICE._serialized_start=120270 - _PATTERNFLOWVXLANVNI_CHOICE._serialized_end=120366 - _PATTERNFLOWVXLANVNI_CHOICE_ENUM._serialized_start=120280 - _PATTERNFLOWVXLANVNI_CHOICE_ENUM._serialized_end=120366 - _PATTERNFLOWVXLANRESERVED1COUNTER._serialized_start=126980 - _PATTERNFLOWVXLANRESERVED1COUNTER._serialized_end=127102 - _PATTERNFLOWVXLANRESERVED1METRICTAG._serialized_start=127105 - _PATTERNFLOWVXLANRESERVED1METRICTAG._serialized_end=127233 - _PATTERNFLOWVXLANRESERVED1._serialized_start=127236 - _PATTERNFLOWVXLANRESERVED1._serialized_end=127651 - _PATTERNFLOWVXLANRESERVED1_CHOICE._serialized_start=120940 - _PATTERNFLOWVXLANRESERVED1_CHOICE._serialized_end=121026 - _PATTERNFLOWVXLANRESERVED1_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWVXLANRESERVED1_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4VERSIONCOUNTER._serialized_start=127653 - _PATTERNFLOWIPV4VERSIONCOUNTER._serialized_end=127772 - _PATTERNFLOWIPV4VERSIONMETRICTAG._serialized_start=127774 - _PATTERNFLOWIPV4VERSIONMETRICTAG._serialized_end=127899 - _PATTERNFLOWIPV4VERSION._serialized_start=127902 - _PATTERNFLOWIPV4VERSION._serialized_end=128302 - _PATTERNFLOWIPV4VERSION_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4VERSION_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4VERSION_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4VERSION_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4HEADERLENGTHCOUNTER._serialized_start=128304 - _PATTERNFLOWIPV4HEADERLENGTHCOUNTER._serialized_end=128428 - _PATTERNFLOWIPV4HEADERLENGTHMETRICTAG._serialized_start=128431 - _PATTERNFLOWIPV4HEADERLENGTHMETRICTAG._serialized_end=128561 - _PATTERNFLOWIPV4HEADERLENGTH._serialized_start=128564 - _PATTERNFLOWIPV4HEADERLENGTH._serialized_end=129027 - _PATTERNFLOWIPV4HEADERLENGTH_CHOICE._serialized_start=120270 - _PATTERNFLOWIPV4HEADERLENGTH_CHOICE._serialized_end=120366 - _PATTERNFLOWIPV4HEADERLENGTH_CHOICE_ENUM._serialized_start=120280 - _PATTERNFLOWIPV4HEADERLENGTH_CHOICE_ENUM._serialized_end=120366 - _PATTERNFLOWIPV4TOTALLENGTHCOUNTER._serialized_start=129029 - _PATTERNFLOWIPV4TOTALLENGTHCOUNTER._serialized_end=129152 - _PATTERNFLOWIPV4TOTALLENGTHMETRICTAG._serialized_start=129155 - _PATTERNFLOWIPV4TOTALLENGTHMETRICTAG._serialized_end=129284 - _PATTERNFLOWIPV4TOTALLENGTH._serialized_start=129287 - _PATTERNFLOWIPV4TOTALLENGTH._serialized_end=129745 - _PATTERNFLOWIPV4TOTALLENGTH_CHOICE._serialized_start=120270 - _PATTERNFLOWIPV4TOTALLENGTH_CHOICE._serialized_end=120366 - _PATTERNFLOWIPV4TOTALLENGTH_CHOICE_ENUM._serialized_start=120280 - _PATTERNFLOWIPV4TOTALLENGTH_CHOICE_ENUM._serialized_end=120366 - _PATTERNFLOWIPV4IDENTIFICATIONCOUNTER._serialized_start=129747 - _PATTERNFLOWIPV4IDENTIFICATIONCOUNTER._serialized_end=129873 - _PATTERNFLOWIPV4IDENTIFICATIONMETRICTAG._serialized_start=129876 - _PATTERNFLOWIPV4IDENTIFICATIONMETRICTAG._serialized_end=130008 - _PATTERNFLOWIPV4IDENTIFICATION._serialized_start=130011 - _PATTERNFLOWIPV4IDENTIFICATION._serialized_end=130446 - _PATTERNFLOWIPV4IDENTIFICATION_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4IDENTIFICATION_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4IDENTIFICATION_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4IDENTIFICATION_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4RESERVEDCOUNTER._serialized_start=130448 - _PATTERNFLOWIPV4RESERVEDCOUNTER._serialized_end=130568 - _PATTERNFLOWIPV4RESERVEDMETRICTAG._serialized_start=130570 - _PATTERNFLOWIPV4RESERVEDMETRICTAG._serialized_end=130696 - _PATTERNFLOWIPV4RESERVED._serialized_start=130699 - _PATTERNFLOWIPV4RESERVED._serialized_end=131104 - _PATTERNFLOWIPV4RESERVED_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4RESERVED_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4RESERVED_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4RESERVED_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4DONTFRAGMENTCOUNTER._serialized_start=131106 - _PATTERNFLOWIPV4DONTFRAGMENTCOUNTER._serialized_end=131230 - _PATTERNFLOWIPV4DONTFRAGMENTMETRICTAG._serialized_start=131233 - _PATTERNFLOWIPV4DONTFRAGMENTMETRICTAG._serialized_end=131363 - _PATTERNFLOWIPV4DONTFRAGMENT._serialized_start=131366 - _PATTERNFLOWIPV4DONTFRAGMENT._serialized_end=131791 - _PATTERNFLOWIPV4DONTFRAGMENT_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4DONTFRAGMENT_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4DONTFRAGMENT_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4DONTFRAGMENT_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4MOREFRAGMENTSCOUNTER._serialized_start=131793 - _PATTERNFLOWIPV4MOREFRAGMENTSCOUNTER._serialized_end=131918 - _PATTERNFLOWIPV4MOREFRAGMENTSMETRICTAG._serialized_start=131921 - _PATTERNFLOWIPV4MOREFRAGMENTSMETRICTAG._serialized_end=132052 - _PATTERNFLOWIPV4MOREFRAGMENTS._serialized_start=132055 - _PATTERNFLOWIPV4MOREFRAGMENTS._serialized_end=132485 - _PATTERNFLOWIPV4MOREFRAGMENTS_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4MOREFRAGMENTS_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4MOREFRAGMENTS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4MOREFRAGMENTS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4FRAGMENTOFFSETCOUNTER._serialized_start=132487 - _PATTERNFLOWIPV4FRAGMENTOFFSETCOUNTER._serialized_end=132613 - _PATTERNFLOWIPV4FRAGMENTOFFSETMETRICTAG._serialized_start=132616 - _PATTERNFLOWIPV4FRAGMENTOFFSETMETRICTAG._serialized_end=132748 - _PATTERNFLOWIPV4FRAGMENTOFFSET._serialized_start=132751 - _PATTERNFLOWIPV4FRAGMENTOFFSET._serialized_end=133186 - _PATTERNFLOWIPV4FRAGMENTOFFSET_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4FRAGMENTOFFSET_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4FRAGMENTOFFSET_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4FRAGMENTOFFSET_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4TIMETOLIVECOUNTER._serialized_start=133188 - _PATTERNFLOWIPV4TIMETOLIVECOUNTER._serialized_end=133310 - _PATTERNFLOWIPV4TIMETOLIVEMETRICTAG._serialized_start=133313 - _PATTERNFLOWIPV4TIMETOLIVEMETRICTAG._serialized_end=133441 - _PATTERNFLOWIPV4TIMETOLIVE._serialized_start=133444 - _PATTERNFLOWIPV4TIMETOLIVE._serialized_end=133859 - _PATTERNFLOWIPV4TIMETOLIVE_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4TIMETOLIVE_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4TIMETOLIVE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4TIMETOLIVE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4PROTOCOLCOUNTER._serialized_start=133861 - _PATTERNFLOWIPV4PROTOCOLCOUNTER._serialized_end=133981 - _PATTERNFLOWIPV4PROTOCOLMETRICTAG._serialized_start=133983 - _PATTERNFLOWIPV4PROTOCOLMETRICTAG._serialized_end=134109 - _PATTERNFLOWIPV4PROTOCOL._serialized_start=134112 - _PATTERNFLOWIPV4PROTOCOL._serialized_end=134555 - _PATTERNFLOWIPV4PROTOCOL_CHOICE._serialized_start=120270 - _PATTERNFLOWIPV4PROTOCOL_CHOICE._serialized_end=120366 - _PATTERNFLOWIPV4PROTOCOL_CHOICE_ENUM._serialized_start=120280 - _PATTERNFLOWIPV4PROTOCOL_CHOICE_ENUM._serialized_end=120366 - _PATTERNFLOWIPV4HEADERCHECKSUM._serialized_start=134558 - _PATTERNFLOWIPV4HEADERCHECKSUM._serialized_end=134909 - _PATTERNFLOWIPV4HEADERCHECKSUM_CHOICE._serialized_start=134756 - _PATTERNFLOWIPV4HEADERCHECKSUM_CHOICE._serialized_end=134816 - _PATTERNFLOWIPV4HEADERCHECKSUM_CHOICE_ENUM._serialized_start=134766 - _PATTERNFLOWIPV4HEADERCHECKSUM_CHOICE_ENUM._serialized_end=134816 - _PATTERNFLOWIPV4HEADERCHECKSUM_GENERATED._serialized_start=134818 - _PATTERNFLOWIPV4HEADERCHECKSUM_GENERATED._serialized_end=134873 - _PATTERNFLOWIPV4HEADERCHECKSUM_GENERATED_ENUM._serialized_start=134831 - _PATTERNFLOWIPV4HEADERCHECKSUM_GENERATED_ENUM._serialized_end=134873 - _PATTERNFLOWIPV4SRCCOUNTER._serialized_start=134911 - _PATTERNFLOWIPV4SRCCOUNTER._serialized_end=135026 - _PATTERNFLOWIPV4SRCMETRICTAG._serialized_start=135028 - _PATTERNFLOWIPV4SRCMETRICTAG._serialized_end=135149 - _PATTERNFLOWIPV4SRC._serialized_start=135152 - _PATTERNFLOWIPV4SRC._serialized_end=135532 - _PATTERNFLOWIPV4SRC_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4SRC_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4SRC_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4SRC_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4DSTCOUNTER._serialized_start=135534 - _PATTERNFLOWIPV4DSTCOUNTER._serialized_end=135649 - _PATTERNFLOWIPV4DSTMETRICTAG._serialized_start=135651 - _PATTERNFLOWIPV4DSTMETRICTAG._serialized_end=135772 - _PATTERNFLOWIPV4DST._serialized_start=135775 - _PATTERNFLOWIPV4DST._serialized_end=136155 - _PATTERNFLOWIPV4DST_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4DST_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4DST_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4DST_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAGCOUNTER._serialized_start=136158 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAGCOUNTER._serialized_end=136297 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAG._serialized_start=136300 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAG._serialized_end=136721 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAG_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAG_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAG_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAG_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASSCOUNTER._serialized_start=136724 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASSCOUNTER._serialized_end=136864 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASS._serialized_start=136867 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASS._serialized_end=137292 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASS_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASS_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBERCOUNTER._serialized_start=137295 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBERCOUNTER._serialized_end=137436 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBER._serialized_start=137439 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBER._serialized_end=137868 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBER_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBER_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBER_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBER_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4PRIORITYRAWCOUNTER._serialized_start=137870 - _PATTERNFLOWIPV4PRIORITYRAWCOUNTER._serialized_end=137993 - _PATTERNFLOWIPV4PRIORITYRAWMETRICTAG._serialized_start=137996 - _PATTERNFLOWIPV4PRIORITYRAWMETRICTAG._serialized_end=138125 - _PATTERNFLOWIPV4PRIORITYRAW._serialized_start=138128 - _PATTERNFLOWIPV4PRIORITYRAW._serialized_end=138548 - _PATTERNFLOWIPV4PRIORITYRAW_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4PRIORITYRAW_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4PRIORITYRAW_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4PRIORITYRAW_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4DSCPPHBCOUNTER._serialized_start=138550 - _PATTERNFLOWIPV4DSCPPHBCOUNTER._serialized_end=138669 - _PATTERNFLOWIPV4DSCPPHBMETRICTAG._serialized_start=138671 - _PATTERNFLOWIPV4DSCPPHBMETRICTAG._serialized_end=138796 - _PATTERNFLOWIPV4DSCPPHB._serialized_start=138799 - _PATTERNFLOWIPV4DSCPPHB._serialized_end=139199 - _PATTERNFLOWIPV4DSCPPHB_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4DSCPPHB_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4DSCPPHB_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4DSCPPHB_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4DSCPECNCOUNTER._serialized_start=139201 - _PATTERNFLOWIPV4DSCPECNCOUNTER._serialized_end=139320 - _PATTERNFLOWIPV4DSCPECNMETRICTAG._serialized_start=139322 - _PATTERNFLOWIPV4DSCPECNMETRICTAG._serialized_end=139447 - _PATTERNFLOWIPV4DSCPECN._serialized_start=139450 - _PATTERNFLOWIPV4DSCPECN._serialized_end=139850 - _PATTERNFLOWIPV4DSCPECN_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4DSCPECN_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4DSCPECN_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4DSCPECN_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4TOSPRECEDENCECOUNTER._serialized_start=139852 - _PATTERNFLOWIPV4TOSPRECEDENCECOUNTER._serialized_end=139977 - _PATTERNFLOWIPV4TOSPRECEDENCEMETRICTAG._serialized_start=139980 - _PATTERNFLOWIPV4TOSPRECEDENCEMETRICTAG._serialized_end=140111 - _PATTERNFLOWIPV4TOSPRECEDENCE._serialized_start=140114 - _PATTERNFLOWIPV4TOSPRECEDENCE._serialized_end=140544 - _PATTERNFLOWIPV4TOSPRECEDENCE_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4TOSPRECEDENCE_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4TOSPRECEDENCE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4TOSPRECEDENCE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4TOSDELAYCOUNTER._serialized_start=140546 - _PATTERNFLOWIPV4TOSDELAYCOUNTER._serialized_end=140666 - _PATTERNFLOWIPV4TOSDELAYMETRICTAG._serialized_start=140668 - _PATTERNFLOWIPV4TOSDELAYMETRICTAG._serialized_end=140794 - _PATTERNFLOWIPV4TOSDELAY._serialized_start=140797 - _PATTERNFLOWIPV4TOSDELAY._serialized_end=141202 - _PATTERNFLOWIPV4TOSDELAY_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4TOSDELAY_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4TOSDELAY_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4TOSDELAY_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4TOSTHROUGHPUTCOUNTER._serialized_start=141204 - _PATTERNFLOWIPV4TOSTHROUGHPUTCOUNTER._serialized_end=141329 - _PATTERNFLOWIPV4TOSTHROUGHPUTMETRICTAG._serialized_start=141332 - _PATTERNFLOWIPV4TOSTHROUGHPUTMETRICTAG._serialized_end=141463 - _PATTERNFLOWIPV4TOSTHROUGHPUT._serialized_start=141466 - _PATTERNFLOWIPV4TOSTHROUGHPUT._serialized_end=141896 - _PATTERNFLOWIPV4TOSTHROUGHPUT_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4TOSTHROUGHPUT_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4TOSTHROUGHPUT_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4TOSTHROUGHPUT_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4TOSRELIABILITYCOUNTER._serialized_start=141898 - _PATTERNFLOWIPV4TOSRELIABILITYCOUNTER._serialized_end=142024 - _PATTERNFLOWIPV4TOSRELIABILITYMETRICTAG._serialized_start=142027 - _PATTERNFLOWIPV4TOSRELIABILITYMETRICTAG._serialized_end=142159 - _PATTERNFLOWIPV4TOSRELIABILITY._serialized_start=142162 - _PATTERNFLOWIPV4TOSRELIABILITY._serialized_end=142597 - _PATTERNFLOWIPV4TOSRELIABILITY_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4TOSRELIABILITY_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4TOSRELIABILITY_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4TOSRELIABILITY_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4TOSMONETARYCOUNTER._serialized_start=142599 - _PATTERNFLOWIPV4TOSMONETARYCOUNTER._serialized_end=142722 - _PATTERNFLOWIPV4TOSMONETARYMETRICTAG._serialized_start=142725 - _PATTERNFLOWIPV4TOSMONETARYMETRICTAG._serialized_end=142854 - _PATTERNFLOWIPV4TOSMONETARY._serialized_start=142857 - _PATTERNFLOWIPV4TOSMONETARY._serialized_end=143277 - _PATTERNFLOWIPV4TOSMONETARY_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4TOSMONETARY_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4TOSMONETARY_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4TOSMONETARY_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV4TOSUNUSEDCOUNTER._serialized_start=143279 - _PATTERNFLOWIPV4TOSUNUSEDCOUNTER._serialized_end=143400 - _PATTERNFLOWIPV4TOSUNUSEDMETRICTAG._serialized_start=143402 - _PATTERNFLOWIPV4TOSUNUSEDMETRICTAG._serialized_end=143529 - _PATTERNFLOWIPV4TOSUNUSED._serialized_start=143532 - _PATTERNFLOWIPV4TOSUNUSED._serialized_end=143942 - _PATTERNFLOWIPV4TOSUNUSED_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV4TOSUNUSED_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV4TOSUNUSED_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV4TOSUNUSED_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV6VERSIONCOUNTER._serialized_start=143944 - _PATTERNFLOWIPV6VERSIONCOUNTER._serialized_end=144063 - _PATTERNFLOWIPV6VERSIONMETRICTAG._serialized_start=144065 - _PATTERNFLOWIPV6VERSIONMETRICTAG._serialized_end=144190 - _PATTERNFLOWIPV6VERSION._serialized_start=144193 - _PATTERNFLOWIPV6VERSION._serialized_end=144593 - _PATTERNFLOWIPV6VERSION_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV6VERSION_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV6VERSION_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV6VERSION_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV6TRAFFICCLASSCOUNTER._serialized_start=144595 - _PATTERNFLOWIPV6TRAFFICCLASSCOUNTER._serialized_end=144719 - _PATTERNFLOWIPV6TRAFFICCLASSMETRICTAG._serialized_start=144722 - _PATTERNFLOWIPV6TRAFFICCLASSMETRICTAG._serialized_end=144852 - _PATTERNFLOWIPV6TRAFFICCLASS._serialized_start=144855 - _PATTERNFLOWIPV6TRAFFICCLASS._serialized_end=145280 - _PATTERNFLOWIPV6TRAFFICCLASS_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV6TRAFFICCLASS_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV6TRAFFICCLASS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV6TRAFFICCLASS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV6FLOWLABELCOUNTER._serialized_start=145282 - _PATTERNFLOWIPV6FLOWLABELCOUNTER._serialized_end=145403 - _PATTERNFLOWIPV6FLOWLABELMETRICTAG._serialized_start=145405 - _PATTERNFLOWIPV6FLOWLABELMETRICTAG._serialized_end=145532 - _PATTERNFLOWIPV6FLOWLABEL._serialized_start=145535 - _PATTERNFLOWIPV6FLOWLABEL._serialized_end=145945 - _PATTERNFLOWIPV6FLOWLABEL_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV6FLOWLABEL_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV6FLOWLABEL_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV6FLOWLABEL_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV6PAYLOADLENGTHCOUNTER._serialized_start=145947 - _PATTERNFLOWIPV6PAYLOADLENGTHCOUNTER._serialized_end=146072 - _PATTERNFLOWIPV6PAYLOADLENGTHMETRICTAG._serialized_start=146075 - _PATTERNFLOWIPV6PAYLOADLENGTHMETRICTAG._serialized_end=146206 - _PATTERNFLOWIPV6PAYLOADLENGTH._serialized_start=146209 - _PATTERNFLOWIPV6PAYLOADLENGTH._serialized_end=146677 - _PATTERNFLOWIPV6PAYLOADLENGTH_CHOICE._serialized_start=120270 - _PATTERNFLOWIPV6PAYLOADLENGTH_CHOICE._serialized_end=120366 - _PATTERNFLOWIPV6PAYLOADLENGTH_CHOICE_ENUM._serialized_start=120280 - _PATTERNFLOWIPV6PAYLOADLENGTH_CHOICE_ENUM._serialized_end=120366 - _PATTERNFLOWIPV6NEXTHEADERCOUNTER._serialized_start=146679 - _PATTERNFLOWIPV6NEXTHEADERCOUNTER._serialized_end=146801 - _PATTERNFLOWIPV6NEXTHEADERMETRICTAG._serialized_start=146804 - _PATTERNFLOWIPV6NEXTHEADERMETRICTAG._serialized_end=146932 - _PATTERNFLOWIPV6NEXTHEADER._serialized_start=146935 - _PATTERNFLOWIPV6NEXTHEADER._serialized_end=147388 - _PATTERNFLOWIPV6NEXTHEADER_CHOICE._serialized_start=120270 - _PATTERNFLOWIPV6NEXTHEADER_CHOICE._serialized_end=120366 - _PATTERNFLOWIPV6NEXTHEADER_CHOICE_ENUM._serialized_start=120280 - _PATTERNFLOWIPV6NEXTHEADER_CHOICE_ENUM._serialized_end=120366 - _PATTERNFLOWIPV6HOPLIMITCOUNTER._serialized_start=147390 - _PATTERNFLOWIPV6HOPLIMITCOUNTER._serialized_end=147510 - _PATTERNFLOWIPV6HOPLIMITMETRICTAG._serialized_start=147512 - _PATTERNFLOWIPV6HOPLIMITMETRICTAG._serialized_end=147638 - _PATTERNFLOWIPV6HOPLIMIT._serialized_start=147641 - _PATTERNFLOWIPV6HOPLIMIT._serialized_end=148046 - _PATTERNFLOWIPV6HOPLIMIT_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV6HOPLIMIT_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV6HOPLIMIT_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV6HOPLIMIT_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV6SRCCOUNTER._serialized_start=148048 - _PATTERNFLOWIPV6SRCCOUNTER._serialized_end=148163 - _PATTERNFLOWIPV6SRCMETRICTAG._serialized_start=148165 - _PATTERNFLOWIPV6SRCMETRICTAG._serialized_end=148286 - _PATTERNFLOWIPV6SRC._serialized_start=148289 - _PATTERNFLOWIPV6SRC._serialized_end=148669 - _PATTERNFLOWIPV6SRC_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV6SRC_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV6SRC_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV6SRC_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIPV6DSTCOUNTER._serialized_start=148671 - _PATTERNFLOWIPV6DSTCOUNTER._serialized_end=148786 - _PATTERNFLOWIPV6DSTMETRICTAG._serialized_start=148788 - _PATTERNFLOWIPV6DSTMETRICTAG._serialized_end=148909 - _PATTERNFLOWIPV6DST._serialized_start=148912 - _PATTERNFLOWIPV6DST._serialized_end=149292 - _PATTERNFLOWIPV6DST_CHOICE._serialized_start=120940 - _PATTERNFLOWIPV6DST_CHOICE._serialized_end=121026 - _PATTERNFLOWIPV6DST_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIPV6DST_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPFCPAUSEDSTCOUNTER._serialized_start=149294 - _PATTERNFLOWPFCPAUSEDSTCOUNTER._serialized_end=149413 - _PATTERNFLOWPFCPAUSEDSTMETRICTAG._serialized_start=149415 - _PATTERNFLOWPFCPAUSEDSTMETRICTAG._serialized_end=149540 - _PATTERNFLOWPFCPAUSEDST._serialized_start=149543 - _PATTERNFLOWPFCPAUSEDST._serialized_end=149943 - _PATTERNFLOWPFCPAUSEDST_CHOICE._serialized_start=120940 - _PATTERNFLOWPFCPAUSEDST_CHOICE._serialized_end=121026 - _PATTERNFLOWPFCPAUSEDST_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPFCPAUSEDST_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPFCPAUSESRCCOUNTER._serialized_start=149945 - _PATTERNFLOWPFCPAUSESRCCOUNTER._serialized_end=150064 - _PATTERNFLOWPFCPAUSESRCMETRICTAG._serialized_start=150066 - _PATTERNFLOWPFCPAUSESRCMETRICTAG._serialized_end=150191 - _PATTERNFLOWPFCPAUSESRC._serialized_start=150194 - _PATTERNFLOWPFCPAUSESRC._serialized_end=150594 - _PATTERNFLOWPFCPAUSESRC_CHOICE._serialized_start=120940 - _PATTERNFLOWPFCPAUSESRC_CHOICE._serialized_end=121026 - _PATTERNFLOWPFCPAUSESRC_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPFCPAUSESRC_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPFCPAUSEETHERTYPECOUNTER._serialized_start=150596 - _PATTERNFLOWPFCPAUSEETHERTYPECOUNTER._serialized_end=150721 - _PATTERNFLOWPFCPAUSEETHERTYPEMETRICTAG._serialized_start=150724 - _PATTERNFLOWPFCPAUSEETHERTYPEMETRICTAG._serialized_end=150855 - _PATTERNFLOWPFCPAUSEETHERTYPE._serialized_start=150858 - _PATTERNFLOWPFCPAUSEETHERTYPE._serialized_end=151288 - _PATTERNFLOWPFCPAUSEETHERTYPE_CHOICE._serialized_start=120940 - _PATTERNFLOWPFCPAUSEETHERTYPE_CHOICE._serialized_end=121026 - _PATTERNFLOWPFCPAUSEETHERTYPE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPFCPAUSEETHERTYPE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPFCPAUSECONTROLOPCODECOUNTER._serialized_start=151291 - _PATTERNFLOWPFCPAUSECONTROLOPCODECOUNTER._serialized_end=151420 - _PATTERNFLOWPFCPAUSECONTROLOPCODEMETRICTAG._serialized_start=151423 - _PATTERNFLOWPFCPAUSECONTROLOPCODEMETRICTAG._serialized_end=151558 - _PATTERNFLOWPFCPAUSECONTROLOPCODE._serialized_start=151561 - _PATTERNFLOWPFCPAUSECONTROLOPCODE._serialized_end=152011 - _PATTERNFLOWPFCPAUSECONTROLOPCODE_CHOICE._serialized_start=120940 - _PATTERNFLOWPFCPAUSECONTROLOPCODE_CHOICE._serialized_end=121026 - _PATTERNFLOWPFCPAUSECONTROLOPCODE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPFCPAUSECONTROLOPCODE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPFCPAUSECLASSENABLEVECTORCOUNTER._serialized_start=152014 - _PATTERNFLOWPFCPAUSECLASSENABLEVECTORCOUNTER._serialized_end=152147 - _PATTERNFLOWPFCPAUSECLASSENABLEVECTORMETRICTAG._serialized_start=152150 - _PATTERNFLOWPFCPAUSECLASSENABLEVECTORMETRICTAG._serialized_end=152289 - _PATTERNFLOWPFCPAUSECLASSENABLEVECTOR._serialized_start=152292 - _PATTERNFLOWPFCPAUSECLASSENABLEVECTOR._serialized_end=152762 - _PATTERNFLOWPFCPAUSECLASSENABLEVECTOR_CHOICE._serialized_start=120940 - _PATTERNFLOWPFCPAUSECLASSENABLEVECTOR_CHOICE._serialized_end=121026 - _PATTERNFLOWPFCPAUSECLASSENABLEVECTOR_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPFCPAUSECLASSENABLEVECTOR_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS0COUNTER._serialized_start=152764 - _PATTERNFLOWPFCPAUSEPAUSECLASS0COUNTER._serialized_end=152891 - _PATTERNFLOWPFCPAUSEPAUSECLASS0METRICTAG._serialized_start=152894 - _PATTERNFLOWPFCPAUSEPAUSECLASS0METRICTAG._serialized_end=153027 - _PATTERNFLOWPFCPAUSEPAUSECLASS0._serialized_start=153030 - _PATTERNFLOWPFCPAUSEPAUSECLASS0._serialized_end=153470 - _PATTERNFLOWPFCPAUSEPAUSECLASS0_CHOICE._serialized_start=120940 - _PATTERNFLOWPFCPAUSEPAUSECLASS0_CHOICE._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS0_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPFCPAUSEPAUSECLASS0_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS1COUNTER._serialized_start=153472 - _PATTERNFLOWPFCPAUSEPAUSECLASS1COUNTER._serialized_end=153599 - _PATTERNFLOWPFCPAUSEPAUSECLASS1METRICTAG._serialized_start=153602 - _PATTERNFLOWPFCPAUSEPAUSECLASS1METRICTAG._serialized_end=153735 - _PATTERNFLOWPFCPAUSEPAUSECLASS1._serialized_start=153738 - _PATTERNFLOWPFCPAUSEPAUSECLASS1._serialized_end=154178 - _PATTERNFLOWPFCPAUSEPAUSECLASS1_CHOICE._serialized_start=120940 - _PATTERNFLOWPFCPAUSEPAUSECLASS1_CHOICE._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS1_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPFCPAUSEPAUSECLASS1_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS2COUNTER._serialized_start=154180 - _PATTERNFLOWPFCPAUSEPAUSECLASS2COUNTER._serialized_end=154307 - _PATTERNFLOWPFCPAUSEPAUSECLASS2METRICTAG._serialized_start=154310 - _PATTERNFLOWPFCPAUSEPAUSECLASS2METRICTAG._serialized_end=154443 - _PATTERNFLOWPFCPAUSEPAUSECLASS2._serialized_start=154446 - _PATTERNFLOWPFCPAUSEPAUSECLASS2._serialized_end=154886 - _PATTERNFLOWPFCPAUSEPAUSECLASS2_CHOICE._serialized_start=120940 - _PATTERNFLOWPFCPAUSEPAUSECLASS2_CHOICE._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS2_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPFCPAUSEPAUSECLASS2_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS3COUNTER._serialized_start=154888 - _PATTERNFLOWPFCPAUSEPAUSECLASS3COUNTER._serialized_end=155015 - _PATTERNFLOWPFCPAUSEPAUSECLASS3METRICTAG._serialized_start=155018 - _PATTERNFLOWPFCPAUSEPAUSECLASS3METRICTAG._serialized_end=155151 - _PATTERNFLOWPFCPAUSEPAUSECLASS3._serialized_start=155154 - _PATTERNFLOWPFCPAUSEPAUSECLASS3._serialized_end=155594 - _PATTERNFLOWPFCPAUSEPAUSECLASS3_CHOICE._serialized_start=120940 - _PATTERNFLOWPFCPAUSEPAUSECLASS3_CHOICE._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS3_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPFCPAUSEPAUSECLASS3_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS4COUNTER._serialized_start=155596 - _PATTERNFLOWPFCPAUSEPAUSECLASS4COUNTER._serialized_end=155723 - _PATTERNFLOWPFCPAUSEPAUSECLASS4METRICTAG._serialized_start=155726 - _PATTERNFLOWPFCPAUSEPAUSECLASS4METRICTAG._serialized_end=155859 - _PATTERNFLOWPFCPAUSEPAUSECLASS4._serialized_start=155862 - _PATTERNFLOWPFCPAUSEPAUSECLASS4._serialized_end=156302 - _PATTERNFLOWPFCPAUSEPAUSECLASS4_CHOICE._serialized_start=120940 - _PATTERNFLOWPFCPAUSEPAUSECLASS4_CHOICE._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS4_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPFCPAUSEPAUSECLASS4_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS5COUNTER._serialized_start=156304 - _PATTERNFLOWPFCPAUSEPAUSECLASS5COUNTER._serialized_end=156431 - _PATTERNFLOWPFCPAUSEPAUSECLASS5METRICTAG._serialized_start=156434 - _PATTERNFLOWPFCPAUSEPAUSECLASS5METRICTAG._serialized_end=156567 - _PATTERNFLOWPFCPAUSEPAUSECLASS5._serialized_start=156570 - _PATTERNFLOWPFCPAUSEPAUSECLASS5._serialized_end=157010 - _PATTERNFLOWPFCPAUSEPAUSECLASS5_CHOICE._serialized_start=120940 - _PATTERNFLOWPFCPAUSEPAUSECLASS5_CHOICE._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS5_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPFCPAUSEPAUSECLASS5_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS6COUNTER._serialized_start=157012 - _PATTERNFLOWPFCPAUSEPAUSECLASS6COUNTER._serialized_end=157139 - _PATTERNFLOWPFCPAUSEPAUSECLASS6METRICTAG._serialized_start=157142 - _PATTERNFLOWPFCPAUSEPAUSECLASS6METRICTAG._serialized_end=157275 - _PATTERNFLOWPFCPAUSEPAUSECLASS6._serialized_start=157278 - _PATTERNFLOWPFCPAUSEPAUSECLASS6._serialized_end=157718 - _PATTERNFLOWPFCPAUSEPAUSECLASS6_CHOICE._serialized_start=120940 - _PATTERNFLOWPFCPAUSEPAUSECLASS6_CHOICE._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS6_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPFCPAUSEPAUSECLASS6_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS7COUNTER._serialized_start=157720 - _PATTERNFLOWPFCPAUSEPAUSECLASS7COUNTER._serialized_end=157847 - _PATTERNFLOWPFCPAUSEPAUSECLASS7METRICTAG._serialized_start=157850 - _PATTERNFLOWPFCPAUSEPAUSECLASS7METRICTAG._serialized_end=157983 - _PATTERNFLOWPFCPAUSEPAUSECLASS7._serialized_start=157986 - _PATTERNFLOWPFCPAUSEPAUSECLASS7._serialized_end=158426 - _PATTERNFLOWPFCPAUSEPAUSECLASS7_CHOICE._serialized_start=120940 - _PATTERNFLOWPFCPAUSEPAUSECLASS7_CHOICE._serialized_end=121026 - _PATTERNFLOWPFCPAUSEPAUSECLASS7_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPFCPAUSEPAUSECLASS7_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWETHERNETPAUSEDSTCOUNTER._serialized_start=158428 - _PATTERNFLOWETHERNETPAUSEDSTCOUNTER._serialized_end=158552 - _PATTERNFLOWETHERNETPAUSEDSTMETRICTAG._serialized_start=158555 - _PATTERNFLOWETHERNETPAUSEDSTMETRICTAG._serialized_end=158685 - _PATTERNFLOWETHERNETPAUSEDST._serialized_start=158688 - _PATTERNFLOWETHERNETPAUSEDST._serialized_end=159113 - _PATTERNFLOWETHERNETPAUSEDST_CHOICE._serialized_start=120940 - _PATTERNFLOWETHERNETPAUSEDST_CHOICE._serialized_end=121026 - _PATTERNFLOWETHERNETPAUSEDST_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWETHERNETPAUSEDST_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWETHERNETPAUSESRCCOUNTER._serialized_start=159115 - _PATTERNFLOWETHERNETPAUSESRCCOUNTER._serialized_end=159239 - _PATTERNFLOWETHERNETPAUSESRCMETRICTAG._serialized_start=159242 - _PATTERNFLOWETHERNETPAUSESRCMETRICTAG._serialized_end=159372 - _PATTERNFLOWETHERNETPAUSESRC._serialized_start=159375 - _PATTERNFLOWETHERNETPAUSESRC._serialized_end=159800 - _PATTERNFLOWETHERNETPAUSESRC_CHOICE._serialized_start=120940 - _PATTERNFLOWETHERNETPAUSESRC_CHOICE._serialized_end=121026 - _PATTERNFLOWETHERNETPAUSESRC_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWETHERNETPAUSESRC_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWETHERNETPAUSEETHERTYPECOUNTER._serialized_start=159803 - _PATTERNFLOWETHERNETPAUSEETHERTYPECOUNTER._serialized_end=159933 - _PATTERNFLOWETHERNETPAUSEETHERTYPEMETRICTAG._serialized_start=159936 - _PATTERNFLOWETHERNETPAUSEETHERTYPEMETRICTAG._serialized_end=160072 - _PATTERNFLOWETHERNETPAUSEETHERTYPE._serialized_start=160075 - _PATTERNFLOWETHERNETPAUSEETHERTYPE._serialized_end=160530 - _PATTERNFLOWETHERNETPAUSEETHERTYPE_CHOICE._serialized_start=120940 - _PATTERNFLOWETHERNETPAUSEETHERTYPE_CHOICE._serialized_end=121026 - _PATTERNFLOWETHERNETPAUSEETHERTYPE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWETHERNETPAUSEETHERTYPE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWETHERNETPAUSECONTROLOPCODECOUNTER._serialized_start=160533 - _PATTERNFLOWETHERNETPAUSECONTROLOPCODECOUNTER._serialized_end=160667 - _PATTERNFLOWETHERNETPAUSECONTROLOPCODEMETRICTAG._serialized_start=160670 - _PATTERNFLOWETHERNETPAUSECONTROLOPCODEMETRICTAG._serialized_end=160810 - _PATTERNFLOWETHERNETPAUSECONTROLOPCODE._serialized_start=160813 - _PATTERNFLOWETHERNETPAUSECONTROLOPCODE._serialized_end=161288 - _PATTERNFLOWETHERNETPAUSECONTROLOPCODE_CHOICE._serialized_start=120940 - _PATTERNFLOWETHERNETPAUSECONTROLOPCODE_CHOICE._serialized_end=121026 - _PATTERNFLOWETHERNETPAUSECONTROLOPCODE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWETHERNETPAUSECONTROLOPCODE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWETHERNETPAUSETIMECOUNTER._serialized_start=161290 - _PATTERNFLOWETHERNETPAUSETIMECOUNTER._serialized_end=161415 - _PATTERNFLOWETHERNETPAUSETIMEMETRICTAG._serialized_start=161418 - _PATTERNFLOWETHERNETPAUSETIMEMETRICTAG._serialized_end=161549 - _PATTERNFLOWETHERNETPAUSETIME._serialized_start=161552 - _PATTERNFLOWETHERNETPAUSETIME._serialized_end=161982 - _PATTERNFLOWETHERNETPAUSETIME_CHOICE._serialized_start=120940 - _PATTERNFLOWETHERNETPAUSETIME_CHOICE._serialized_end=121026 - _PATTERNFLOWETHERNETPAUSETIME_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWETHERNETPAUSETIME_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPSRCPORTCOUNTER._serialized_start=161984 - _PATTERNFLOWTCPSRCPORTCOUNTER._serialized_end=162102 - _PATTERNFLOWTCPSRCPORTMETRICTAG._serialized_start=162104 - _PATTERNFLOWTCPSRCPORTMETRICTAG._serialized_end=162228 - _PATTERNFLOWTCPSRCPORT._serialized_start=162231 - _PATTERNFLOWTCPSRCPORT._serialized_end=162626 - _PATTERNFLOWTCPSRCPORT_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPSRCPORT_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPSRCPORT_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPSRCPORT_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPDSTPORTCOUNTER._serialized_start=162628 - _PATTERNFLOWTCPDSTPORTCOUNTER._serialized_end=162746 - _PATTERNFLOWTCPDSTPORTMETRICTAG._serialized_start=162748 - _PATTERNFLOWTCPDSTPORTMETRICTAG._serialized_end=162872 - _PATTERNFLOWTCPDSTPORT._serialized_start=162875 - _PATTERNFLOWTCPDSTPORT._serialized_end=163270 - _PATTERNFLOWTCPDSTPORT_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPDSTPORT_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPDSTPORT_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPDSTPORT_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPSEQNUMCOUNTER._serialized_start=163272 - _PATTERNFLOWTCPSEQNUMCOUNTER._serialized_end=163389 - _PATTERNFLOWTCPSEQNUMMETRICTAG._serialized_start=163391 - _PATTERNFLOWTCPSEQNUMMETRICTAG._serialized_end=163514 - _PATTERNFLOWTCPSEQNUM._serialized_start=163517 - _PATTERNFLOWTCPSEQNUM._serialized_end=163907 - _PATTERNFLOWTCPSEQNUM_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPSEQNUM_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPSEQNUM_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPSEQNUM_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPACKNUMCOUNTER._serialized_start=163909 - _PATTERNFLOWTCPACKNUMCOUNTER._serialized_end=164026 - _PATTERNFLOWTCPACKNUMMETRICTAG._serialized_start=164028 - _PATTERNFLOWTCPACKNUMMETRICTAG._serialized_end=164151 - _PATTERNFLOWTCPACKNUM._serialized_start=164154 - _PATTERNFLOWTCPACKNUM._serialized_end=164544 - _PATTERNFLOWTCPACKNUM_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPACKNUM_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPACKNUM_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPACKNUM_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPDATAOFFSETCOUNTER._serialized_start=164546 - _PATTERNFLOWTCPDATAOFFSETCOUNTER._serialized_end=164667 - _PATTERNFLOWTCPDATAOFFSETMETRICTAG._serialized_start=164669 - _PATTERNFLOWTCPDATAOFFSETMETRICTAG._serialized_end=164796 - _PATTERNFLOWTCPDATAOFFSET._serialized_start=164799 - _PATTERNFLOWTCPDATAOFFSET._serialized_end=165209 - _PATTERNFLOWTCPDATAOFFSET_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPDATAOFFSET_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPDATAOFFSET_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPDATAOFFSET_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPECNNSCOUNTER._serialized_start=165211 - _PATTERNFLOWTCPECNNSCOUNTER._serialized_end=165327 - _PATTERNFLOWTCPECNNSMETRICTAG._serialized_start=165329 - _PATTERNFLOWTCPECNNSMETRICTAG._serialized_end=165451 - _PATTERNFLOWTCPECNNS._serialized_start=165454 - _PATTERNFLOWTCPECNNS._serialized_end=165839 - _PATTERNFLOWTCPECNNS_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPECNNS_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPECNNS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPECNNS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPECNCWRCOUNTER._serialized_start=165841 - _PATTERNFLOWTCPECNCWRCOUNTER._serialized_end=165958 - _PATTERNFLOWTCPECNCWRMETRICTAG._serialized_start=165960 - _PATTERNFLOWTCPECNCWRMETRICTAG._serialized_end=166083 - _PATTERNFLOWTCPECNCWR._serialized_start=166086 - _PATTERNFLOWTCPECNCWR._serialized_end=166476 - _PATTERNFLOWTCPECNCWR_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPECNCWR_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPECNCWR_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPECNCWR_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPECNECHOCOUNTER._serialized_start=166478 - _PATTERNFLOWTCPECNECHOCOUNTER._serialized_end=166596 - _PATTERNFLOWTCPECNECHOMETRICTAG._serialized_start=166598 - _PATTERNFLOWTCPECNECHOMETRICTAG._serialized_end=166722 - _PATTERNFLOWTCPECNECHO._serialized_start=166725 - _PATTERNFLOWTCPECNECHO._serialized_end=167120 - _PATTERNFLOWTCPECNECHO_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPECNECHO_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPECNECHO_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPECNECHO_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPCTLURGCOUNTER._serialized_start=167122 - _PATTERNFLOWTCPCTLURGCOUNTER._serialized_end=167239 - _PATTERNFLOWTCPCTLURGMETRICTAG._serialized_start=167241 - _PATTERNFLOWTCPCTLURGMETRICTAG._serialized_end=167364 - _PATTERNFLOWTCPCTLURG._serialized_start=167367 - _PATTERNFLOWTCPCTLURG._serialized_end=167757 - _PATTERNFLOWTCPCTLURG_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPCTLURG_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPCTLURG_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPCTLURG_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPCTLACKCOUNTER._serialized_start=167759 - _PATTERNFLOWTCPCTLACKCOUNTER._serialized_end=167876 - _PATTERNFLOWTCPCTLACKMETRICTAG._serialized_start=167878 - _PATTERNFLOWTCPCTLACKMETRICTAG._serialized_end=168001 - _PATTERNFLOWTCPCTLACK._serialized_start=168004 - _PATTERNFLOWTCPCTLACK._serialized_end=168394 - _PATTERNFLOWTCPCTLACK_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPCTLACK_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPCTLACK_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPCTLACK_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPCTLPSHCOUNTER._serialized_start=168396 - _PATTERNFLOWTCPCTLPSHCOUNTER._serialized_end=168513 - _PATTERNFLOWTCPCTLPSHMETRICTAG._serialized_start=168515 - _PATTERNFLOWTCPCTLPSHMETRICTAG._serialized_end=168638 - _PATTERNFLOWTCPCTLPSH._serialized_start=168641 - _PATTERNFLOWTCPCTLPSH._serialized_end=169031 - _PATTERNFLOWTCPCTLPSH_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPCTLPSH_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPCTLPSH_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPCTLPSH_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPCTLRSTCOUNTER._serialized_start=169033 - _PATTERNFLOWTCPCTLRSTCOUNTER._serialized_end=169150 - _PATTERNFLOWTCPCTLRSTMETRICTAG._serialized_start=169152 - _PATTERNFLOWTCPCTLRSTMETRICTAG._serialized_end=169275 - _PATTERNFLOWTCPCTLRST._serialized_start=169278 - _PATTERNFLOWTCPCTLRST._serialized_end=169668 - _PATTERNFLOWTCPCTLRST_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPCTLRST_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPCTLRST_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPCTLRST_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPCTLSYNCOUNTER._serialized_start=169670 - _PATTERNFLOWTCPCTLSYNCOUNTER._serialized_end=169787 - _PATTERNFLOWTCPCTLSYNMETRICTAG._serialized_start=169789 - _PATTERNFLOWTCPCTLSYNMETRICTAG._serialized_end=169912 - _PATTERNFLOWTCPCTLSYN._serialized_start=169915 - _PATTERNFLOWTCPCTLSYN._serialized_end=170305 - _PATTERNFLOWTCPCTLSYN_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPCTLSYN_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPCTLSYN_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPCTLSYN_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPCTLFINCOUNTER._serialized_start=170307 - _PATTERNFLOWTCPCTLFINCOUNTER._serialized_end=170424 - _PATTERNFLOWTCPCTLFINMETRICTAG._serialized_start=170426 - _PATTERNFLOWTCPCTLFINMETRICTAG._serialized_end=170549 - _PATTERNFLOWTCPCTLFIN._serialized_start=170552 - _PATTERNFLOWTCPCTLFIN._serialized_end=170942 - _PATTERNFLOWTCPCTLFIN_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPCTLFIN_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPCTLFIN_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPCTLFIN_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWTCPWINDOWCOUNTER._serialized_start=170944 - _PATTERNFLOWTCPWINDOWCOUNTER._serialized_end=171061 - _PATTERNFLOWTCPWINDOWMETRICTAG._serialized_start=171063 - _PATTERNFLOWTCPWINDOWMETRICTAG._serialized_end=171186 - _PATTERNFLOWTCPWINDOW._serialized_start=171189 - _PATTERNFLOWTCPWINDOW._serialized_end=171579 - _PATTERNFLOWTCPWINDOW_CHOICE._serialized_start=120940 - _PATTERNFLOWTCPWINDOW_CHOICE._serialized_end=121026 - _PATTERNFLOWTCPWINDOW_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWTCPWINDOW_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWUDPSRCPORTCOUNTER._serialized_start=171581 - _PATTERNFLOWUDPSRCPORTCOUNTER._serialized_end=171699 - _PATTERNFLOWUDPSRCPORTMETRICTAG._serialized_start=171701 - _PATTERNFLOWUDPSRCPORTMETRICTAG._serialized_end=171825 - _PATTERNFLOWUDPSRCPORT._serialized_start=171828 - _PATTERNFLOWUDPSRCPORT._serialized_end=172223 - _PATTERNFLOWUDPSRCPORT_CHOICE._serialized_start=120940 - _PATTERNFLOWUDPSRCPORT_CHOICE._serialized_end=121026 - _PATTERNFLOWUDPSRCPORT_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWUDPSRCPORT_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWUDPDSTPORTCOUNTER._serialized_start=172225 - _PATTERNFLOWUDPDSTPORTCOUNTER._serialized_end=172343 - _PATTERNFLOWUDPDSTPORTMETRICTAG._serialized_start=172345 - _PATTERNFLOWUDPDSTPORTMETRICTAG._serialized_end=172469 - _PATTERNFLOWUDPDSTPORT._serialized_start=172472 - _PATTERNFLOWUDPDSTPORT._serialized_end=172867 - _PATTERNFLOWUDPDSTPORT_CHOICE._serialized_start=120940 - _PATTERNFLOWUDPDSTPORT_CHOICE._serialized_end=121026 - _PATTERNFLOWUDPDSTPORT_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWUDPDSTPORT_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWUDPLENGTHCOUNTER._serialized_start=172869 - _PATTERNFLOWUDPLENGTHCOUNTER._serialized_end=172986 - _PATTERNFLOWUDPLENGTHMETRICTAG._serialized_start=172988 - _PATTERNFLOWUDPLENGTHMETRICTAG._serialized_end=173111 - _PATTERNFLOWUDPLENGTH._serialized_start=173114 - _PATTERNFLOWUDPLENGTH._serialized_end=173504 - _PATTERNFLOWUDPLENGTH_CHOICE._serialized_start=120940 - _PATTERNFLOWUDPLENGTH_CHOICE._serialized_end=121026 - _PATTERNFLOWUDPLENGTH_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWUDPLENGTH_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWUDPCHECKSUM._serialized_start=173507 - _PATTERNFLOWUDPCHECKSUM._serialized_end=173837 - _PATTERNFLOWUDPCHECKSUM_CHOICE._serialized_start=134756 - _PATTERNFLOWUDPCHECKSUM_CHOICE._serialized_end=134816 - _PATTERNFLOWUDPCHECKSUM_CHOICE_ENUM._serialized_start=134766 - _PATTERNFLOWUDPCHECKSUM_CHOICE_ENUM._serialized_end=134816 - _PATTERNFLOWUDPCHECKSUM_GENERATED._serialized_start=134818 - _PATTERNFLOWUDPCHECKSUM_GENERATED._serialized_end=134873 - _PATTERNFLOWUDPCHECKSUM_GENERATED_ENUM._serialized_start=134831 - _PATTERNFLOWUDPCHECKSUM_GENERATED_ENUM._serialized_end=134873 - _PATTERNFLOWGRECHECKSUMPRESENTCOUNTER._serialized_start=173839 - _PATTERNFLOWGRECHECKSUMPRESENTCOUNTER._serialized_end=173965 - _PATTERNFLOWGRECHECKSUMPRESENTMETRICTAG._serialized_start=173968 - _PATTERNFLOWGRECHECKSUMPRESENTMETRICTAG._serialized_end=174100 - _PATTERNFLOWGRECHECKSUMPRESENT._serialized_start=174103 - _PATTERNFLOWGRECHECKSUMPRESENT._serialized_end=174538 - _PATTERNFLOWGRECHECKSUMPRESENT_CHOICE._serialized_start=120940 - _PATTERNFLOWGRECHECKSUMPRESENT_CHOICE._serialized_end=121026 - _PATTERNFLOWGRECHECKSUMPRESENT_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGRECHECKSUMPRESENT_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGRERESERVED0COUNTER._serialized_start=174540 - _PATTERNFLOWGRERESERVED0COUNTER._serialized_end=174660 - _PATTERNFLOWGRERESERVED0METRICTAG._serialized_start=174662 - _PATTERNFLOWGRERESERVED0METRICTAG._serialized_end=174788 - _PATTERNFLOWGRERESERVED0._serialized_start=174791 - _PATTERNFLOWGRERESERVED0._serialized_end=175196 - _PATTERNFLOWGRERESERVED0_CHOICE._serialized_start=120940 - _PATTERNFLOWGRERESERVED0_CHOICE._serialized_end=121026 - _PATTERNFLOWGRERESERVED0_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGRERESERVED0_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGREVERSIONCOUNTER._serialized_start=175198 - _PATTERNFLOWGREVERSIONCOUNTER._serialized_end=175316 - _PATTERNFLOWGREVERSIONMETRICTAG._serialized_start=175318 - _PATTERNFLOWGREVERSIONMETRICTAG._serialized_end=175442 - _PATTERNFLOWGREVERSION._serialized_start=175445 - _PATTERNFLOWGREVERSION._serialized_end=175840 - _PATTERNFLOWGREVERSION_CHOICE._serialized_start=120940 - _PATTERNFLOWGREVERSION_CHOICE._serialized_end=121026 - _PATTERNFLOWGREVERSION_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGREVERSION_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGREPROTOCOLCOUNTER._serialized_start=175842 - _PATTERNFLOWGREPROTOCOLCOUNTER._serialized_end=175961 - _PATTERNFLOWGREPROTOCOLMETRICTAG._serialized_start=175963 - _PATTERNFLOWGREPROTOCOLMETRICTAG._serialized_end=176088 - _PATTERNFLOWGREPROTOCOL._serialized_start=176091 - _PATTERNFLOWGREPROTOCOL._serialized_end=176491 - _PATTERNFLOWGREPROTOCOL_CHOICE._serialized_start=120940 - _PATTERNFLOWGREPROTOCOL_CHOICE._serialized_end=121026 - _PATTERNFLOWGREPROTOCOL_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGREPROTOCOL_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGRECHECKSUM._serialized_start=176494 - _PATTERNFLOWGRECHECKSUM._serialized_end=176824 - _PATTERNFLOWGRECHECKSUM_CHOICE._serialized_start=134756 - _PATTERNFLOWGRECHECKSUM_CHOICE._serialized_end=134816 - _PATTERNFLOWGRECHECKSUM_CHOICE_ENUM._serialized_start=134766 - _PATTERNFLOWGRECHECKSUM_CHOICE_ENUM._serialized_end=134816 - _PATTERNFLOWGRECHECKSUM_GENERATED._serialized_start=134818 - _PATTERNFLOWGRECHECKSUM_GENERATED._serialized_end=134873 - _PATTERNFLOWGRECHECKSUM_GENERATED_ENUM._serialized_start=134831 - _PATTERNFLOWGRECHECKSUM_GENERATED_ENUM._serialized_end=134873 - _PATTERNFLOWGRERESERVED1COUNTER._serialized_start=176826 - _PATTERNFLOWGRERESERVED1COUNTER._serialized_end=176946 - _PATTERNFLOWGRERESERVED1METRICTAG._serialized_start=176948 - _PATTERNFLOWGRERESERVED1METRICTAG._serialized_end=177074 - _PATTERNFLOWGRERESERVED1._serialized_start=177077 - _PATTERNFLOWGRERESERVED1._serialized_end=177482 - _PATTERNFLOWGRERESERVED1_CHOICE._serialized_start=120940 - _PATTERNFLOWGRERESERVED1_CHOICE._serialized_end=121026 - _PATTERNFLOWGRERESERVED1_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGRERESERVED1_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV1VERSIONCOUNTER._serialized_start=177484 - _PATTERNFLOWGTPV1VERSIONCOUNTER._serialized_end=177604 - _PATTERNFLOWGTPV1VERSIONMETRICTAG._serialized_start=177606 - _PATTERNFLOWGTPV1VERSIONMETRICTAG._serialized_end=177732 - _PATTERNFLOWGTPV1VERSION._serialized_start=177735 - _PATTERNFLOWGTPV1VERSION._serialized_end=178140 - _PATTERNFLOWGTPV1VERSION_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV1VERSION_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV1VERSION_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV1VERSION_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV1PROTOCOLTYPECOUNTER._serialized_start=178142 - _PATTERNFLOWGTPV1PROTOCOLTYPECOUNTER._serialized_end=178267 - _PATTERNFLOWGTPV1PROTOCOLTYPEMETRICTAG._serialized_start=178270 - _PATTERNFLOWGTPV1PROTOCOLTYPEMETRICTAG._serialized_end=178401 - _PATTERNFLOWGTPV1PROTOCOLTYPE._serialized_start=178404 - _PATTERNFLOWGTPV1PROTOCOLTYPE._serialized_end=178834 - _PATTERNFLOWGTPV1PROTOCOLTYPE_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV1PROTOCOLTYPE_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV1PROTOCOLTYPE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV1PROTOCOLTYPE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV1RESERVEDCOUNTER._serialized_start=178836 - _PATTERNFLOWGTPV1RESERVEDCOUNTER._serialized_end=178957 - _PATTERNFLOWGTPV1RESERVEDMETRICTAG._serialized_start=178959 - _PATTERNFLOWGTPV1RESERVEDMETRICTAG._serialized_end=179086 - _PATTERNFLOWGTPV1RESERVED._serialized_start=179089 - _PATTERNFLOWGTPV1RESERVED._serialized_end=179499 - _PATTERNFLOWGTPV1RESERVED_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV1RESERVED_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV1RESERVED_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV1RESERVED_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV1EFLAGCOUNTER._serialized_start=179501 - _PATTERNFLOWGTPV1EFLAGCOUNTER._serialized_end=179619 - _PATTERNFLOWGTPV1EFLAGMETRICTAG._serialized_start=179621 - _PATTERNFLOWGTPV1EFLAGMETRICTAG._serialized_end=179745 - _PATTERNFLOWGTPV1EFLAG._serialized_start=179748 - _PATTERNFLOWGTPV1EFLAG._serialized_end=180143 - _PATTERNFLOWGTPV1EFLAG_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV1EFLAG_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV1EFLAG_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV1EFLAG_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV1SFLAGCOUNTER._serialized_start=180145 - _PATTERNFLOWGTPV1SFLAGCOUNTER._serialized_end=180263 - _PATTERNFLOWGTPV1SFLAGMETRICTAG._serialized_start=180265 - _PATTERNFLOWGTPV1SFLAGMETRICTAG._serialized_end=180389 - _PATTERNFLOWGTPV1SFLAG._serialized_start=180392 - _PATTERNFLOWGTPV1SFLAG._serialized_end=180787 - _PATTERNFLOWGTPV1SFLAG_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV1SFLAG_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV1SFLAG_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV1SFLAG_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV1PNFLAGCOUNTER._serialized_start=180789 - _PATTERNFLOWGTPV1PNFLAGCOUNTER._serialized_end=180908 - _PATTERNFLOWGTPV1PNFLAGMETRICTAG._serialized_start=180910 - _PATTERNFLOWGTPV1PNFLAGMETRICTAG._serialized_end=181035 - _PATTERNFLOWGTPV1PNFLAG._serialized_start=181038 - _PATTERNFLOWGTPV1PNFLAG._serialized_end=181438 - _PATTERNFLOWGTPV1PNFLAG_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV1PNFLAG_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV1PNFLAG_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV1PNFLAG_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV1MESSAGETYPECOUNTER._serialized_start=181440 - _PATTERNFLOWGTPV1MESSAGETYPECOUNTER._serialized_end=181564 - _PATTERNFLOWGTPV1MESSAGETYPEMETRICTAG._serialized_start=181567 - _PATTERNFLOWGTPV1MESSAGETYPEMETRICTAG._serialized_end=181697 - _PATTERNFLOWGTPV1MESSAGETYPE._serialized_start=181700 - _PATTERNFLOWGTPV1MESSAGETYPE._serialized_end=182125 - _PATTERNFLOWGTPV1MESSAGETYPE_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV1MESSAGETYPE_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV1MESSAGETYPE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV1MESSAGETYPE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV1MESSAGELENGTHCOUNTER._serialized_start=182127 - _PATTERNFLOWGTPV1MESSAGELENGTHCOUNTER._serialized_end=182253 - _PATTERNFLOWGTPV1MESSAGELENGTHMETRICTAG._serialized_start=182256 - _PATTERNFLOWGTPV1MESSAGELENGTHMETRICTAG._serialized_end=182388 - _PATTERNFLOWGTPV1MESSAGELENGTH._serialized_start=182391 - _PATTERNFLOWGTPV1MESSAGELENGTH._serialized_end=182826 - _PATTERNFLOWGTPV1MESSAGELENGTH_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV1MESSAGELENGTH_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV1MESSAGELENGTH_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV1MESSAGELENGTH_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV1TEIDCOUNTER._serialized_start=182828 - _PATTERNFLOWGTPV1TEIDCOUNTER._serialized_end=182945 - _PATTERNFLOWGTPV1TEIDMETRICTAG._serialized_start=182947 - _PATTERNFLOWGTPV1TEIDMETRICTAG._serialized_end=183070 - _PATTERNFLOWGTPV1TEID._serialized_start=183073 - _PATTERNFLOWGTPV1TEID._serialized_end=183463 - _PATTERNFLOWGTPV1TEID_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV1TEID_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV1TEID_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV1TEID_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV1SQUENCENUMBERCOUNTER._serialized_start=183465 - _PATTERNFLOWGTPV1SQUENCENUMBERCOUNTER._serialized_end=183591 - _PATTERNFLOWGTPV1SQUENCENUMBERMETRICTAG._serialized_start=183594 - _PATTERNFLOWGTPV1SQUENCENUMBERMETRICTAG._serialized_end=183726 - _PATTERNFLOWGTPV1SQUENCENUMBER._serialized_start=183729 - _PATTERNFLOWGTPV1SQUENCENUMBER._serialized_end=184164 - _PATTERNFLOWGTPV1SQUENCENUMBER_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV1SQUENCENUMBER_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV1SQUENCENUMBER_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV1SQUENCENUMBER_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV1NPDUNUMBERCOUNTER._serialized_start=184166 - _PATTERNFLOWGTPV1NPDUNUMBERCOUNTER._serialized_end=184289 - _PATTERNFLOWGTPV1NPDUNUMBERMETRICTAG._serialized_start=184292 - _PATTERNFLOWGTPV1NPDUNUMBERMETRICTAG._serialized_end=184421 - _PATTERNFLOWGTPV1NPDUNUMBER._serialized_start=184424 - _PATTERNFLOWGTPV1NPDUNUMBER._serialized_end=184844 - _PATTERNFLOWGTPV1NPDUNUMBER_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV1NPDUNUMBER_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV1NPDUNUMBER_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV1NPDUNUMBER_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPECOUNTER._serialized_start=184847 - _PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPECOUNTER._serialized_end=184983 - _PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPEMETRICTAG._serialized_start=184986 - _PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPEMETRICTAG._serialized_end=185128 - _PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPE._serialized_start=185131 - _PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPE._serialized_end=185616 - _PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPE_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPE_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTHCOUNTER._serialized_start=185619 - _PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTHCOUNTER._serialized_end=185754 - _PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTHMETRICTAG._serialized_start=185757 - _PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTHMETRICTAG._serialized_end=185898 - _PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTH._serialized_start=185901 - _PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTH._serialized_end=186381 - _PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTH_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTH_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTH_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTH_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPEXTENSIONCONTENTSCOUNTER._serialized_start=186384 - _PATTERNFLOWGTPEXTENSIONCONTENTSCOUNTER._serialized_end=186512 - _PATTERNFLOWGTPEXTENSIONCONTENTSMETRICTAG._serialized_start=186515 - _PATTERNFLOWGTPEXTENSIONCONTENTSMETRICTAG._serialized_end=186649 - _PATTERNFLOWGTPEXTENSIONCONTENTS._serialized_start=186652 - _PATTERNFLOWGTPEXTENSIONCONTENTS._serialized_end=187097 - _PATTERNFLOWGTPEXTENSIONCONTENTS_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPEXTENSIONCONTENTS_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPEXTENSIONCONTENTS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPEXTENSIONCONTENTS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADERCOUNTER._serialized_start=187100 - _PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADERCOUNTER._serialized_end=187239 - _PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADERMETRICTAG._serialized_start=187242 - _PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADERMETRICTAG._serialized_end=187387 - _PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADER._serialized_start=187390 - _PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADER._serialized_end=187890 - _PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADER_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADER_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADER_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADER_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV2VERSIONCOUNTER._serialized_start=187892 - _PATTERNFLOWGTPV2VERSIONCOUNTER._serialized_end=188012 - _PATTERNFLOWGTPV2VERSIONMETRICTAG._serialized_start=188014 - _PATTERNFLOWGTPV2VERSIONMETRICTAG._serialized_end=188140 - _PATTERNFLOWGTPV2VERSION._serialized_start=188143 - _PATTERNFLOWGTPV2VERSION._serialized_end=188548 - _PATTERNFLOWGTPV2VERSION_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV2VERSION_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV2VERSION_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV2VERSION_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV2PIGGYBACKINGFLAGCOUNTER._serialized_start=188551 - _PATTERNFLOWGTPV2PIGGYBACKINGFLAGCOUNTER._serialized_end=188680 - _PATTERNFLOWGTPV2PIGGYBACKINGFLAGMETRICTAG._serialized_start=188683 - _PATTERNFLOWGTPV2PIGGYBACKINGFLAGMETRICTAG._serialized_end=188818 - _PATTERNFLOWGTPV2PIGGYBACKINGFLAG._serialized_start=188821 - _PATTERNFLOWGTPV2PIGGYBACKINGFLAG._serialized_end=189271 - _PATTERNFLOWGTPV2PIGGYBACKINGFLAG_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV2PIGGYBACKINGFLAG_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV2PIGGYBACKINGFLAG_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV2PIGGYBACKINGFLAG_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV2TEIDFLAGCOUNTER._serialized_start=189273 - _PATTERNFLOWGTPV2TEIDFLAGCOUNTER._serialized_end=189394 - _PATTERNFLOWGTPV2TEIDFLAGMETRICTAG._serialized_start=189396 - _PATTERNFLOWGTPV2TEIDFLAGMETRICTAG._serialized_end=189523 - _PATTERNFLOWGTPV2TEIDFLAG._serialized_start=189526 - _PATTERNFLOWGTPV2TEIDFLAG._serialized_end=189936 - _PATTERNFLOWGTPV2TEIDFLAG_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV2TEIDFLAG_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV2TEIDFLAG_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV2TEIDFLAG_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV2SPARE1COUNTER._serialized_start=189938 - _PATTERNFLOWGTPV2SPARE1COUNTER._serialized_end=190057 - _PATTERNFLOWGTPV2SPARE1METRICTAG._serialized_start=190059 - _PATTERNFLOWGTPV2SPARE1METRICTAG._serialized_end=190184 - _PATTERNFLOWGTPV2SPARE1._serialized_start=190187 - _PATTERNFLOWGTPV2SPARE1._serialized_end=190587 - _PATTERNFLOWGTPV2SPARE1_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV2SPARE1_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV2SPARE1_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV2SPARE1_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV2MESSAGETYPECOUNTER._serialized_start=190589 - _PATTERNFLOWGTPV2MESSAGETYPECOUNTER._serialized_end=190713 - _PATTERNFLOWGTPV2MESSAGETYPEMETRICTAG._serialized_start=190716 - _PATTERNFLOWGTPV2MESSAGETYPEMETRICTAG._serialized_end=190846 - _PATTERNFLOWGTPV2MESSAGETYPE._serialized_start=190849 - _PATTERNFLOWGTPV2MESSAGETYPE._serialized_end=191274 - _PATTERNFLOWGTPV2MESSAGETYPE_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV2MESSAGETYPE_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV2MESSAGETYPE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV2MESSAGETYPE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV2MESSAGELENGTHCOUNTER._serialized_start=191276 - _PATTERNFLOWGTPV2MESSAGELENGTHCOUNTER._serialized_end=191402 - _PATTERNFLOWGTPV2MESSAGELENGTHMETRICTAG._serialized_start=191405 - _PATTERNFLOWGTPV2MESSAGELENGTHMETRICTAG._serialized_end=191537 - _PATTERNFLOWGTPV2MESSAGELENGTH._serialized_start=191540 - _PATTERNFLOWGTPV2MESSAGELENGTH._serialized_end=191975 - _PATTERNFLOWGTPV2MESSAGELENGTH_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV2MESSAGELENGTH_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV2MESSAGELENGTH_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV2MESSAGELENGTH_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV2TEIDCOUNTER._serialized_start=191977 - _PATTERNFLOWGTPV2TEIDCOUNTER._serialized_end=192094 - _PATTERNFLOWGTPV2TEIDMETRICTAG._serialized_start=192096 - _PATTERNFLOWGTPV2TEIDMETRICTAG._serialized_end=192219 - _PATTERNFLOWGTPV2TEID._serialized_start=192222 - _PATTERNFLOWGTPV2TEID._serialized_end=192612 - _PATTERNFLOWGTPV2TEID_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV2TEID_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV2TEID_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV2TEID_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV2SEQUENCENUMBERCOUNTER._serialized_start=192614 - _PATTERNFLOWGTPV2SEQUENCENUMBERCOUNTER._serialized_end=192741 - _PATTERNFLOWGTPV2SEQUENCENUMBERMETRICTAG._serialized_start=192744 - _PATTERNFLOWGTPV2SEQUENCENUMBERMETRICTAG._serialized_end=192877 - _PATTERNFLOWGTPV2SEQUENCENUMBER._serialized_start=192880 - _PATTERNFLOWGTPV2SEQUENCENUMBER._serialized_end=193320 - _PATTERNFLOWGTPV2SEQUENCENUMBER_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV2SEQUENCENUMBER_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV2SEQUENCENUMBER_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV2SEQUENCENUMBER_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWGTPV2SPARE2COUNTER._serialized_start=193322 - _PATTERNFLOWGTPV2SPARE2COUNTER._serialized_end=193441 - _PATTERNFLOWGTPV2SPARE2METRICTAG._serialized_start=193443 - _PATTERNFLOWGTPV2SPARE2METRICTAG._serialized_end=193568 - _PATTERNFLOWGTPV2SPARE2._serialized_start=193571 - _PATTERNFLOWGTPV2SPARE2._serialized_end=193971 - _PATTERNFLOWGTPV2SPARE2_CHOICE._serialized_start=120940 - _PATTERNFLOWGTPV2SPARE2_CHOICE._serialized_end=121026 - _PATTERNFLOWGTPV2SPARE2_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWGTPV2SPARE2_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWARPHARDWARETYPECOUNTER._serialized_start=193973 - _PATTERNFLOWARPHARDWARETYPECOUNTER._serialized_end=194096 - _PATTERNFLOWARPHARDWARETYPEMETRICTAG._serialized_start=194099 - _PATTERNFLOWARPHARDWARETYPEMETRICTAG._serialized_end=194228 - _PATTERNFLOWARPHARDWARETYPE._serialized_start=194231 - _PATTERNFLOWARPHARDWARETYPE._serialized_end=194651 - _PATTERNFLOWARPHARDWARETYPE_CHOICE._serialized_start=120940 - _PATTERNFLOWARPHARDWARETYPE_CHOICE._serialized_end=121026 - _PATTERNFLOWARPHARDWARETYPE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWARPHARDWARETYPE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWARPPROTOCOLTYPECOUNTER._serialized_start=194653 - _PATTERNFLOWARPPROTOCOLTYPECOUNTER._serialized_end=194776 - _PATTERNFLOWARPPROTOCOLTYPEMETRICTAG._serialized_start=194779 - _PATTERNFLOWARPPROTOCOLTYPEMETRICTAG._serialized_end=194908 - _PATTERNFLOWARPPROTOCOLTYPE._serialized_start=194911 - _PATTERNFLOWARPPROTOCOLTYPE._serialized_end=195331 - _PATTERNFLOWARPPROTOCOLTYPE_CHOICE._serialized_start=120940 - _PATTERNFLOWARPPROTOCOLTYPE_CHOICE._serialized_end=121026 - _PATTERNFLOWARPPROTOCOLTYPE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWARPPROTOCOLTYPE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWARPHARDWARELENGTHCOUNTER._serialized_start=195333 - _PATTERNFLOWARPHARDWARELENGTHCOUNTER._serialized_end=195458 - _PATTERNFLOWARPHARDWARELENGTHMETRICTAG._serialized_start=195461 - _PATTERNFLOWARPHARDWARELENGTHMETRICTAG._serialized_end=195592 - _PATTERNFLOWARPHARDWARELENGTH._serialized_start=195595 - _PATTERNFLOWARPHARDWARELENGTH._serialized_end=196025 - _PATTERNFLOWARPHARDWARELENGTH_CHOICE._serialized_start=120940 - _PATTERNFLOWARPHARDWARELENGTH_CHOICE._serialized_end=121026 - _PATTERNFLOWARPHARDWARELENGTH_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWARPHARDWARELENGTH_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWARPPROTOCOLLENGTHCOUNTER._serialized_start=196027 - _PATTERNFLOWARPPROTOCOLLENGTHCOUNTER._serialized_end=196152 - _PATTERNFLOWARPPROTOCOLLENGTHMETRICTAG._serialized_start=196155 - _PATTERNFLOWARPPROTOCOLLENGTHMETRICTAG._serialized_end=196286 - _PATTERNFLOWARPPROTOCOLLENGTH._serialized_start=196289 - _PATTERNFLOWARPPROTOCOLLENGTH._serialized_end=196719 - _PATTERNFLOWARPPROTOCOLLENGTH_CHOICE._serialized_start=120940 - _PATTERNFLOWARPPROTOCOLLENGTH_CHOICE._serialized_end=121026 - _PATTERNFLOWARPPROTOCOLLENGTH_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWARPPROTOCOLLENGTH_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWARPOPERATIONCOUNTER._serialized_start=196721 - _PATTERNFLOWARPOPERATIONCOUNTER._serialized_end=196841 - _PATTERNFLOWARPOPERATIONMETRICTAG._serialized_start=196843 - _PATTERNFLOWARPOPERATIONMETRICTAG._serialized_end=196969 - _PATTERNFLOWARPOPERATION._serialized_start=196972 - _PATTERNFLOWARPOPERATION._serialized_end=197377 - _PATTERNFLOWARPOPERATION_CHOICE._serialized_start=120940 - _PATTERNFLOWARPOPERATION_CHOICE._serialized_end=121026 - _PATTERNFLOWARPOPERATION_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWARPOPERATION_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWARPSENDERHARDWAREADDRCOUNTER._serialized_start=197380 - _PATTERNFLOWARPSENDERHARDWAREADDRCOUNTER._serialized_end=197509 - _PATTERNFLOWARPSENDERHARDWAREADDRMETRICTAG._serialized_start=197512 - _PATTERNFLOWARPSENDERHARDWAREADDRMETRICTAG._serialized_end=197647 - _PATTERNFLOWARPSENDERHARDWAREADDR._serialized_start=197650 - _PATTERNFLOWARPSENDERHARDWAREADDR._serialized_end=198100 - _PATTERNFLOWARPSENDERHARDWAREADDR_CHOICE._serialized_start=120940 - _PATTERNFLOWARPSENDERHARDWAREADDR_CHOICE._serialized_end=121026 - _PATTERNFLOWARPSENDERHARDWAREADDR_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWARPSENDERHARDWAREADDR_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWARPSENDERPROTOCOLADDRCOUNTER._serialized_start=198103 - _PATTERNFLOWARPSENDERPROTOCOLADDRCOUNTER._serialized_end=198232 - _PATTERNFLOWARPSENDERPROTOCOLADDRMETRICTAG._serialized_start=198235 - _PATTERNFLOWARPSENDERPROTOCOLADDRMETRICTAG._serialized_end=198370 - _PATTERNFLOWARPSENDERPROTOCOLADDR._serialized_start=198373 - _PATTERNFLOWARPSENDERPROTOCOLADDR._serialized_end=198823 - _PATTERNFLOWARPSENDERPROTOCOLADDR_CHOICE._serialized_start=120940 - _PATTERNFLOWARPSENDERPROTOCOLADDR_CHOICE._serialized_end=121026 - _PATTERNFLOWARPSENDERPROTOCOLADDR_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWARPSENDERPROTOCOLADDR_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWARPTARGETHARDWAREADDRCOUNTER._serialized_start=198826 - _PATTERNFLOWARPTARGETHARDWAREADDRCOUNTER._serialized_end=198955 - _PATTERNFLOWARPTARGETHARDWAREADDRMETRICTAG._serialized_start=198958 - _PATTERNFLOWARPTARGETHARDWAREADDRMETRICTAG._serialized_end=199093 - _PATTERNFLOWARPTARGETHARDWAREADDR._serialized_start=199096 - _PATTERNFLOWARPTARGETHARDWAREADDR._serialized_end=199546 - _PATTERNFLOWARPTARGETHARDWAREADDR_CHOICE._serialized_start=120940 - _PATTERNFLOWARPTARGETHARDWAREADDR_CHOICE._serialized_end=121026 - _PATTERNFLOWARPTARGETHARDWAREADDR_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWARPTARGETHARDWAREADDR_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWARPTARGETPROTOCOLADDRCOUNTER._serialized_start=199549 - _PATTERNFLOWARPTARGETPROTOCOLADDRCOUNTER._serialized_end=199678 - _PATTERNFLOWARPTARGETPROTOCOLADDRMETRICTAG._serialized_start=199681 - _PATTERNFLOWARPTARGETPROTOCOLADDRMETRICTAG._serialized_end=199816 - _PATTERNFLOWARPTARGETPROTOCOLADDR._serialized_start=199819 - _PATTERNFLOWARPTARGETPROTOCOLADDR._serialized_end=200269 - _PATTERNFLOWARPTARGETPROTOCOLADDR_CHOICE._serialized_start=120940 - _PATTERNFLOWARPTARGETPROTOCOLADDR_CHOICE._serialized_end=121026 - _PATTERNFLOWARPTARGETPROTOCOLADDR_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWARPTARGETPROTOCOLADDR_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWICMPECHOTYPECOUNTER._serialized_start=200271 - _PATTERNFLOWICMPECHOTYPECOUNTER._serialized_end=200391 - _PATTERNFLOWICMPECHOTYPEMETRICTAG._serialized_start=200393 - _PATTERNFLOWICMPECHOTYPEMETRICTAG._serialized_end=200519 - _PATTERNFLOWICMPECHOTYPE._serialized_start=200522 - _PATTERNFLOWICMPECHOTYPE._serialized_end=200927 - _PATTERNFLOWICMPECHOTYPE_CHOICE._serialized_start=120940 - _PATTERNFLOWICMPECHOTYPE_CHOICE._serialized_end=121026 - _PATTERNFLOWICMPECHOTYPE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWICMPECHOTYPE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWICMPECHOCODECOUNTER._serialized_start=200929 - _PATTERNFLOWICMPECHOCODECOUNTER._serialized_end=201049 - _PATTERNFLOWICMPECHOCODEMETRICTAG._serialized_start=201051 - _PATTERNFLOWICMPECHOCODEMETRICTAG._serialized_end=201177 - _PATTERNFLOWICMPECHOCODE._serialized_start=201180 - _PATTERNFLOWICMPECHOCODE._serialized_end=201585 - _PATTERNFLOWICMPECHOCODE_CHOICE._serialized_start=120940 - _PATTERNFLOWICMPECHOCODE_CHOICE._serialized_end=121026 - _PATTERNFLOWICMPECHOCODE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWICMPECHOCODE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWICMPECHOCHECKSUM._serialized_start=201588 - _PATTERNFLOWICMPECHOCHECKSUM._serialized_end=201933 - _PATTERNFLOWICMPECHOCHECKSUM_CHOICE._serialized_start=134756 - _PATTERNFLOWICMPECHOCHECKSUM_CHOICE._serialized_end=134816 - _PATTERNFLOWICMPECHOCHECKSUM_CHOICE_ENUM._serialized_start=134766 - _PATTERNFLOWICMPECHOCHECKSUM_CHOICE_ENUM._serialized_end=134816 - _PATTERNFLOWICMPECHOCHECKSUM_GENERATED._serialized_start=134818 - _PATTERNFLOWICMPECHOCHECKSUM_GENERATED._serialized_end=134873 - _PATTERNFLOWICMPECHOCHECKSUM_GENERATED_ENUM._serialized_start=134831 - _PATTERNFLOWICMPECHOCHECKSUM_GENERATED_ENUM._serialized_end=134873 - _PATTERNFLOWICMPECHOIDENTIFIERCOUNTER._serialized_start=201935 - _PATTERNFLOWICMPECHOIDENTIFIERCOUNTER._serialized_end=202061 - _PATTERNFLOWICMPECHOIDENTIFIERMETRICTAG._serialized_start=202064 - _PATTERNFLOWICMPECHOIDENTIFIERMETRICTAG._serialized_end=202196 - _PATTERNFLOWICMPECHOIDENTIFIER._serialized_start=202199 - _PATTERNFLOWICMPECHOIDENTIFIER._serialized_end=202634 - _PATTERNFLOWICMPECHOIDENTIFIER_CHOICE._serialized_start=120940 - _PATTERNFLOWICMPECHOIDENTIFIER_CHOICE._serialized_end=121026 - _PATTERNFLOWICMPECHOIDENTIFIER_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWICMPECHOIDENTIFIER_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWICMPECHOSEQUENCENUMBERCOUNTER._serialized_start=202637 - _PATTERNFLOWICMPECHOSEQUENCENUMBERCOUNTER._serialized_end=202767 - _PATTERNFLOWICMPECHOSEQUENCENUMBERMETRICTAG._serialized_start=202770 - _PATTERNFLOWICMPECHOSEQUENCENUMBERMETRICTAG._serialized_end=202906 - _PATTERNFLOWICMPECHOSEQUENCENUMBER._serialized_start=202909 - _PATTERNFLOWICMPECHOSEQUENCENUMBER._serialized_end=203364 - _PATTERNFLOWICMPECHOSEQUENCENUMBER_CHOICE._serialized_start=120940 - _PATTERNFLOWICMPECHOSEQUENCENUMBER_CHOICE._serialized_end=121026 - _PATTERNFLOWICMPECHOSEQUENCENUMBER_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWICMPECHOSEQUENCENUMBER_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWICMPCOMMONCHECKSUM._serialized_start=203367 - _PATTERNFLOWICMPCOMMONCHECKSUM._serialized_end=203718 - _PATTERNFLOWICMPCOMMONCHECKSUM_CHOICE._serialized_start=134756 - _PATTERNFLOWICMPCOMMONCHECKSUM_CHOICE._serialized_end=134816 - _PATTERNFLOWICMPCOMMONCHECKSUM_CHOICE_ENUM._serialized_start=134766 - _PATTERNFLOWICMPCOMMONCHECKSUM_CHOICE_ENUM._serialized_end=134816 - _PATTERNFLOWICMPCOMMONCHECKSUM_GENERATED._serialized_start=134818 - _PATTERNFLOWICMPCOMMONCHECKSUM_GENERATED._serialized_end=134873 - _PATTERNFLOWICMPCOMMONCHECKSUM_GENERATED_ENUM._serialized_start=134831 - _PATTERNFLOWICMPCOMMONCHECKSUM_GENERATED_ENUM._serialized_end=134873 - _PATTERNFLOWICMPNEXTFIELDSIDENTIFIERCOUNTER._serialized_start=203721 - _PATTERNFLOWICMPNEXTFIELDSIDENTIFIERCOUNTER._serialized_end=203853 - _PATTERNFLOWICMPNEXTFIELDSIDENTIFIERMETRICTAG._serialized_start=203856 - _PATTERNFLOWICMPNEXTFIELDSIDENTIFIERMETRICTAG._serialized_end=203994 - _PATTERNFLOWICMPNEXTFIELDSIDENTIFIER._serialized_start=203997 - _PATTERNFLOWICMPNEXTFIELDSIDENTIFIER._serialized_end=204462 - _PATTERNFLOWICMPNEXTFIELDSIDENTIFIER_CHOICE._serialized_start=120940 - _PATTERNFLOWICMPNEXTFIELDSIDENTIFIER_CHOICE._serialized_end=121026 - _PATTERNFLOWICMPNEXTFIELDSIDENTIFIER_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWICMPNEXTFIELDSIDENTIFIER_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBERCOUNTER._serialized_start=204465 - _PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBERCOUNTER._serialized_end=204601 - _PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBERMETRICTAG._serialized_start=204604 - _PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBERMETRICTAG._serialized_end=204746 - _PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBER._serialized_start=204749 - _PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBER._serialized_end=205234 - _PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBER_CHOICE._serialized_start=120940 - _PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBER_CHOICE._serialized_end=121026 - _PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBER_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBER_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWICMPV6ECHOTYPECOUNTER._serialized_start=205236 - _PATTERNFLOWICMPV6ECHOTYPECOUNTER._serialized_end=205358 - _PATTERNFLOWICMPV6ECHOTYPEMETRICTAG._serialized_start=205361 - _PATTERNFLOWICMPV6ECHOTYPEMETRICTAG._serialized_end=205489 - _PATTERNFLOWICMPV6ECHOTYPE._serialized_start=205492 - _PATTERNFLOWICMPV6ECHOTYPE._serialized_end=205907 - _PATTERNFLOWICMPV6ECHOTYPE_CHOICE._serialized_start=120940 - _PATTERNFLOWICMPV6ECHOTYPE_CHOICE._serialized_end=121026 - _PATTERNFLOWICMPV6ECHOTYPE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWICMPV6ECHOTYPE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWICMPV6ECHOCODECOUNTER._serialized_start=205909 - _PATTERNFLOWICMPV6ECHOCODECOUNTER._serialized_end=206031 - _PATTERNFLOWICMPV6ECHOCODEMETRICTAG._serialized_start=206034 - _PATTERNFLOWICMPV6ECHOCODEMETRICTAG._serialized_end=206162 - _PATTERNFLOWICMPV6ECHOCODE._serialized_start=206165 - _PATTERNFLOWICMPV6ECHOCODE._serialized_end=206580 - _PATTERNFLOWICMPV6ECHOCODE_CHOICE._serialized_start=120940 - _PATTERNFLOWICMPV6ECHOCODE_CHOICE._serialized_end=121026 - _PATTERNFLOWICMPV6ECHOCODE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWICMPV6ECHOCODE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWICMPV6ECHOIDENTIFIERCOUNTER._serialized_start=206583 - _PATTERNFLOWICMPV6ECHOIDENTIFIERCOUNTER._serialized_end=206711 - _PATTERNFLOWICMPV6ECHOIDENTIFIERMETRICTAG._serialized_start=206714 - _PATTERNFLOWICMPV6ECHOIDENTIFIERMETRICTAG._serialized_end=206848 - _PATTERNFLOWICMPV6ECHOIDENTIFIER._serialized_start=206851 - _PATTERNFLOWICMPV6ECHOIDENTIFIER._serialized_end=207296 - _PATTERNFLOWICMPV6ECHOIDENTIFIER_CHOICE._serialized_start=120940 - _PATTERNFLOWICMPV6ECHOIDENTIFIER_CHOICE._serialized_end=121026 - _PATTERNFLOWICMPV6ECHOIDENTIFIER_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWICMPV6ECHOIDENTIFIER_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWICMPV6ECHOSEQUENCENUMBERCOUNTER._serialized_start=207299 - _PATTERNFLOWICMPV6ECHOSEQUENCENUMBERCOUNTER._serialized_end=207431 - _PATTERNFLOWICMPV6ECHOSEQUENCENUMBERMETRICTAG._serialized_start=207434 - _PATTERNFLOWICMPV6ECHOSEQUENCENUMBERMETRICTAG._serialized_end=207572 - _PATTERNFLOWICMPV6ECHOSEQUENCENUMBER._serialized_start=207575 - _PATTERNFLOWICMPV6ECHOSEQUENCENUMBER._serialized_end=208040 - _PATTERNFLOWICMPV6ECHOSEQUENCENUMBER_CHOICE._serialized_start=120940 - _PATTERNFLOWICMPV6ECHOSEQUENCENUMBER_CHOICE._serialized_end=121026 - _PATTERNFLOWICMPV6ECHOSEQUENCENUMBER_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWICMPV6ECHOSEQUENCENUMBER_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWICMPV6ECHOCHECKSUM._serialized_start=208043 - _PATTERNFLOWICMPV6ECHOCHECKSUM._serialized_end=208394 - _PATTERNFLOWICMPV6ECHOCHECKSUM_CHOICE._serialized_start=134756 - _PATTERNFLOWICMPV6ECHOCHECKSUM_CHOICE._serialized_end=134816 - _PATTERNFLOWICMPV6ECHOCHECKSUM_CHOICE_ENUM._serialized_start=134766 - _PATTERNFLOWICMPV6ECHOCHECKSUM_CHOICE_ENUM._serialized_end=134816 - _PATTERNFLOWICMPV6ECHOCHECKSUM_GENERATED._serialized_start=134818 - _PATTERNFLOWICMPV6ECHOCHECKSUM_GENERATED._serialized_end=134873 - _PATTERNFLOWICMPV6ECHOCHECKSUM_GENERATED_ENUM._serialized_start=134831 - _PATTERNFLOWICMPV6ECHOCHECKSUM_GENERATED_ENUM._serialized_end=134873 - _PATTERNFLOWICMPV6COMMONCHECKSUM._serialized_start=208397 - _PATTERNFLOWICMPV6COMMONCHECKSUM._serialized_end=208754 - _PATTERNFLOWICMPV6COMMONCHECKSUM_CHOICE._serialized_start=134756 - _PATTERNFLOWICMPV6COMMONCHECKSUM_CHOICE._serialized_end=134816 - _PATTERNFLOWICMPV6COMMONCHECKSUM_CHOICE_ENUM._serialized_start=134766 - _PATTERNFLOWICMPV6COMMONCHECKSUM_CHOICE_ENUM._serialized_end=134816 - _PATTERNFLOWICMPV6COMMONCHECKSUM_GENERATED._serialized_start=134818 - _PATTERNFLOWICMPV6COMMONCHECKSUM_GENERATED._serialized_end=134873 - _PATTERNFLOWICMPV6COMMONCHECKSUM_GENERATED_ENUM._serialized_start=134831 - _PATTERNFLOWICMPV6COMMONCHECKSUM_GENERATED_ENUM._serialized_end=134873 - _PATTERNFLOWPPPADDRESSCOUNTER._serialized_start=208756 - _PATTERNFLOWPPPADDRESSCOUNTER._serialized_end=208874 - _PATTERNFLOWPPPADDRESSMETRICTAG._serialized_start=208876 - _PATTERNFLOWPPPADDRESSMETRICTAG._serialized_end=209000 - _PATTERNFLOWPPPADDRESS._serialized_start=209003 - _PATTERNFLOWPPPADDRESS._serialized_end=209398 - _PATTERNFLOWPPPADDRESS_CHOICE._serialized_start=120940 - _PATTERNFLOWPPPADDRESS_CHOICE._serialized_end=121026 - _PATTERNFLOWPPPADDRESS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPPPADDRESS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPPPCONTROLCOUNTER._serialized_start=209400 - _PATTERNFLOWPPPCONTROLCOUNTER._serialized_end=209518 - _PATTERNFLOWPPPCONTROLMETRICTAG._serialized_start=209520 - _PATTERNFLOWPPPCONTROLMETRICTAG._serialized_end=209644 - _PATTERNFLOWPPPCONTROL._serialized_start=209647 - _PATTERNFLOWPPPCONTROL._serialized_end=210042 - _PATTERNFLOWPPPCONTROL_CHOICE._serialized_start=120940 - _PATTERNFLOWPPPCONTROL_CHOICE._serialized_end=121026 - _PATTERNFLOWPPPCONTROL_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWPPPCONTROL_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWPPPPROTOCOLTYPECOUNTER._serialized_start=210044 - _PATTERNFLOWPPPPROTOCOLTYPECOUNTER._serialized_end=210167 - _PATTERNFLOWPPPPROTOCOLTYPEMETRICTAG._serialized_start=210170 - _PATTERNFLOWPPPPROTOCOLTYPEMETRICTAG._serialized_end=210299 - _PATTERNFLOWPPPPROTOCOLTYPE._serialized_start=210302 - _PATTERNFLOWPPPPROTOCOLTYPE._serialized_end=210760 - _PATTERNFLOWPPPPROTOCOLTYPE_CHOICE._serialized_start=120270 - _PATTERNFLOWPPPPROTOCOLTYPE_CHOICE._serialized_end=120366 - _PATTERNFLOWPPPPROTOCOLTYPE_CHOICE_ENUM._serialized_start=120280 - _PATTERNFLOWPPPPROTOCOLTYPE_CHOICE_ENUM._serialized_end=120366 - _PATTERNFLOWIGMPV1VERSIONCOUNTER._serialized_start=210762 - _PATTERNFLOWIGMPV1VERSIONCOUNTER._serialized_end=210883 - _PATTERNFLOWIGMPV1VERSIONMETRICTAG._serialized_start=210885 - _PATTERNFLOWIGMPV1VERSIONMETRICTAG._serialized_end=211012 - _PATTERNFLOWIGMPV1VERSION._serialized_start=211015 - _PATTERNFLOWIGMPV1VERSION._serialized_end=211425 - _PATTERNFLOWIGMPV1VERSION_CHOICE._serialized_start=120940 - _PATTERNFLOWIGMPV1VERSION_CHOICE._serialized_end=121026 - _PATTERNFLOWIGMPV1VERSION_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIGMPV1VERSION_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIGMPV1TYPECOUNTER._serialized_start=211427 - _PATTERNFLOWIGMPV1TYPECOUNTER._serialized_end=211545 - _PATTERNFLOWIGMPV1TYPEMETRICTAG._serialized_start=211547 - _PATTERNFLOWIGMPV1TYPEMETRICTAG._serialized_end=211671 - _PATTERNFLOWIGMPV1TYPE._serialized_start=211674 - _PATTERNFLOWIGMPV1TYPE._serialized_end=212069 - _PATTERNFLOWIGMPV1TYPE_CHOICE._serialized_start=120940 - _PATTERNFLOWIGMPV1TYPE_CHOICE._serialized_end=121026 - _PATTERNFLOWIGMPV1TYPE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIGMPV1TYPE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIGMPV1UNUSEDCOUNTER._serialized_start=212071 - _PATTERNFLOWIGMPV1UNUSEDCOUNTER._serialized_end=212191 - _PATTERNFLOWIGMPV1UNUSEDMETRICTAG._serialized_start=212193 - _PATTERNFLOWIGMPV1UNUSEDMETRICTAG._serialized_end=212319 - _PATTERNFLOWIGMPV1UNUSED._serialized_start=212322 - _PATTERNFLOWIGMPV1UNUSED._serialized_end=212727 - _PATTERNFLOWIGMPV1UNUSED_CHOICE._serialized_start=120940 - _PATTERNFLOWIGMPV1UNUSED_CHOICE._serialized_end=121026 - _PATTERNFLOWIGMPV1UNUSED_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIGMPV1UNUSED_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWIGMPV1CHECKSUM._serialized_start=212730 - _PATTERNFLOWIGMPV1CHECKSUM._serialized_end=213069 - _PATTERNFLOWIGMPV1CHECKSUM_CHOICE._serialized_start=134756 - _PATTERNFLOWIGMPV1CHECKSUM_CHOICE._serialized_end=134816 - _PATTERNFLOWIGMPV1CHECKSUM_CHOICE_ENUM._serialized_start=134766 - _PATTERNFLOWIGMPV1CHECKSUM_CHOICE_ENUM._serialized_end=134816 - _PATTERNFLOWIGMPV1CHECKSUM_GENERATED._serialized_start=134818 - _PATTERNFLOWIGMPV1CHECKSUM_GENERATED._serialized_end=134873 - _PATTERNFLOWIGMPV1CHECKSUM_GENERATED_ENUM._serialized_start=134831 - _PATTERNFLOWIGMPV1CHECKSUM_GENERATED_ENUM._serialized_end=134873 - _PATTERNFLOWIGMPV1GROUPADDRESSCOUNTER._serialized_start=213071 - _PATTERNFLOWIGMPV1GROUPADDRESSCOUNTER._serialized_end=213197 - _PATTERNFLOWIGMPV1GROUPADDRESSMETRICTAG._serialized_start=213200 - _PATTERNFLOWIGMPV1GROUPADDRESSMETRICTAG._serialized_end=213332 - _PATTERNFLOWIGMPV1GROUPADDRESS._serialized_start=213335 - _PATTERNFLOWIGMPV1GROUPADDRESS._serialized_end=213770 - _PATTERNFLOWIGMPV1GROUPADDRESS_CHOICE._serialized_start=120940 - _PATTERNFLOWIGMPV1GROUPADDRESS_CHOICE._serialized_end=121026 - _PATTERNFLOWIGMPV1GROUPADDRESS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWIGMPV1GROUPADDRESS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWMPLSLABELCOUNTER._serialized_start=213772 - _PATTERNFLOWMPLSLABELCOUNTER._serialized_end=213889 - _PATTERNFLOWMPLSLABELMETRICTAG._serialized_start=213891 - _PATTERNFLOWMPLSLABELMETRICTAG._serialized_end=214014 - _PATTERNFLOWMPLSLABEL._serialized_start=214017 - _PATTERNFLOWMPLSLABEL._serialized_end=214445 - _PATTERNFLOWMPLSLABEL_CHOICE._serialized_start=120270 - _PATTERNFLOWMPLSLABEL_CHOICE._serialized_end=120366 - _PATTERNFLOWMPLSLABEL_CHOICE_ENUM._serialized_start=120280 - _PATTERNFLOWMPLSLABEL_CHOICE_ENUM._serialized_end=120366 - _PATTERNFLOWMPLSTRAFFICCLASSCOUNTER._serialized_start=214447 - _PATTERNFLOWMPLSTRAFFICCLASSCOUNTER._serialized_end=214571 - _PATTERNFLOWMPLSTRAFFICCLASSMETRICTAG._serialized_start=214574 - _PATTERNFLOWMPLSTRAFFICCLASSMETRICTAG._serialized_end=214704 - _PATTERNFLOWMPLSTRAFFICCLASS._serialized_start=214707 - _PATTERNFLOWMPLSTRAFFICCLASS._serialized_end=215132 - _PATTERNFLOWMPLSTRAFFICCLASS_CHOICE._serialized_start=120940 - _PATTERNFLOWMPLSTRAFFICCLASS_CHOICE._serialized_end=121026 - _PATTERNFLOWMPLSTRAFFICCLASS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWMPLSTRAFFICCLASS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWMPLSBOTTOMOFSTACKCOUNTER._serialized_start=215134 - _PATTERNFLOWMPLSBOTTOMOFSTACKCOUNTER._serialized_end=215259 - _PATTERNFLOWMPLSBOTTOMOFSTACKMETRICTAG._serialized_start=215262 - _PATTERNFLOWMPLSBOTTOMOFSTACKMETRICTAG._serialized_end=215393 - _PATTERNFLOWMPLSBOTTOMOFSTACK._serialized_start=215396 - _PATTERNFLOWMPLSBOTTOMOFSTACK._serialized_end=215864 - _PATTERNFLOWMPLSBOTTOMOFSTACK_CHOICE._serialized_start=120270 - _PATTERNFLOWMPLSBOTTOMOFSTACK_CHOICE._serialized_end=120366 - _PATTERNFLOWMPLSBOTTOMOFSTACK_CHOICE_ENUM._serialized_start=120280 - _PATTERNFLOWMPLSBOTTOMOFSTACK_CHOICE_ENUM._serialized_end=120366 - _PATTERNFLOWMPLSTIMETOLIVECOUNTER._serialized_start=215866 - _PATTERNFLOWMPLSTIMETOLIVECOUNTER._serialized_end=215988 - _PATTERNFLOWMPLSTIMETOLIVEMETRICTAG._serialized_start=215991 - _PATTERNFLOWMPLSTIMETOLIVEMETRICTAG._serialized_end=216119 - _PATTERNFLOWMPLSTIMETOLIVE._serialized_start=216122 - _PATTERNFLOWMPLSTIMETOLIVE._serialized_end=216537 - _PATTERNFLOWMPLSTIMETOLIVE_CHOICE._serialized_start=120940 - _PATTERNFLOWMPLSTIMETOLIVE_CHOICE._serialized_end=121026 - _PATTERNFLOWMPLSTIMETOLIVE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWMPLSTIMETOLIVE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWSNMPV2CVERSIONCOUNTER._serialized_start=216539 - _PATTERNFLOWSNMPV2CVERSIONCOUNTER._serialized_end=216661 - _PATTERNFLOWSNMPV2CVERSION._serialized_start=216664 - _PATTERNFLOWSNMPV2CVERSION._serialized_end=217017 - _PATTERNFLOWSNMPV2CVERSION_CHOICE._serialized_start=120940 - _PATTERNFLOWSNMPV2CVERSION_CHOICE._serialized_end=121026 - _PATTERNFLOWSNMPV2CVERSION_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWSNMPV2CVERSION_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWSNMPV2CPDUREQUESTIDCOUNTER._serialized_start=217019 - _PATTERNFLOWSNMPV2CPDUREQUESTIDCOUNTER._serialized_end=217146 - _PATTERNFLOWSNMPV2CPDUREQUESTID._serialized_start=217149 - _PATTERNFLOWSNMPV2CPDUREQUESTID._serialized_end=217522 - _PATTERNFLOWSNMPV2CPDUREQUESTID_CHOICE._serialized_start=120940 - _PATTERNFLOWSNMPV2CPDUREQUESTID_CHOICE._serialized_end=121026 - _PATTERNFLOWSNMPV2CPDUREQUESTID_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWSNMPV2CPDUREQUESTID_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWSNMPV2CPDUERRORINDEXCOUNTER._serialized_start=217525 - _PATTERNFLOWSNMPV2CPDUERRORINDEXCOUNTER._serialized_end=217653 - _PATTERNFLOWSNMPV2CPDUERRORINDEX._serialized_start=217656 - _PATTERNFLOWSNMPV2CPDUERRORINDEX._serialized_end=218033 - _PATTERNFLOWSNMPV2CPDUERRORINDEX_CHOICE._serialized_start=120940 - _PATTERNFLOWSNMPV2CPDUERRORINDEX_CHOICE._serialized_end=121026 - _PATTERNFLOWSNMPV2CPDUERRORINDEX_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWSNMPV2CPDUERRORINDEX_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWSNMPV2CBULKPDUREQUESTIDCOUNTER._serialized_start=218036 - _PATTERNFLOWSNMPV2CBULKPDUREQUESTIDCOUNTER._serialized_end=218167 - _PATTERNFLOWSNMPV2CBULKPDUREQUESTID._serialized_start=218170 - _PATTERNFLOWSNMPV2CBULKPDUREQUESTID._serialized_end=218559 - _PATTERNFLOWSNMPV2CBULKPDUREQUESTID_CHOICE._serialized_start=120940 - _PATTERNFLOWSNMPV2CBULKPDUREQUESTID_CHOICE._serialized_end=121026 - _PATTERNFLOWSNMPV2CBULKPDUREQUESTID_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWSNMPV2CBULKPDUREQUESTID_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWSNMPV2CBULKPDUNONREPEATERS._serialized_start=218562 - _PATTERNFLOWSNMPV2CBULKPDUNONREPEATERS._serialized_end=218793 - _PATTERNFLOWSNMPV2CBULKPDUNONREPEATERS_CHOICE._serialized_start=218716 - _PATTERNFLOWSNMPV2CBULKPDUNONREPEATERS_CHOICE._serialized_end=218772 - _PATTERNFLOWSNMPV2CBULKPDUNONREPEATERS_CHOICE_ENUM._serialized_start=120280 - _PATTERNFLOWSNMPV2CBULKPDUNONREPEATERS_CHOICE_ENUM._serialized_end=120326 - _PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONSCOUNTER._serialized_start=218796 - _PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONSCOUNTER._serialized_end=218932 - _PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONS._serialized_start=218935 - _PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONS._serialized_end=219344 - _PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONS_CHOICE._serialized_start=120940 - _PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONS_CHOICE._serialized_end=121026 - _PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUECOUNTER._serialized_start=219347 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUECOUNTER._serialized_end=219494 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUE._serialized_start=219497 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUE._serialized_end=219950 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUE_CHOICE._serialized_start=120940 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUE_CHOICE._serialized_end=121026 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUECOUNTER._serialized_start=219953 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUECOUNTER._serialized_end=220102 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUE._serialized_start=220105 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUE._serialized_end=220566 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUE_CHOICE._serialized_start=120940 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUE_CHOICE._serialized_end=121026 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUECOUNTER._serialized_start=220569 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUECOUNTER._serialized_end=220716 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUE._serialized_start=220719 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUE._serialized_end=221172 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUE_CHOICE._serialized_start=120940 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUE_CHOICE._serialized_end=121026 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUECOUNTER._serialized_start=221175 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUECOUNTER._serialized_end=221324 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUE._serialized_start=221327 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUE._serialized_end=221788 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUE_CHOICE._serialized_start=120940 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUE_CHOICE._serialized_end=121026 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUECOUNTER._serialized_start=221791 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUECOUNTER._serialized_end=221941 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUE._serialized_start=221944 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUE._serialized_end=222409 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUE_CHOICE._serialized_start=120940 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUE_CHOICE._serialized_end=121026 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUECOUNTER._serialized_start=222412 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUECOUNTER._serialized_end=222567 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUE._serialized_start=222570 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUE._serialized_end=223055 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUE_CHOICE._serialized_start=120940 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUE_CHOICE._serialized_end=121026 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWSNMPV2CCOMMONREQUESTIDCOUNTER._serialized_start=223058 - _PATTERNFLOWSNMPV2CCOMMONREQUESTIDCOUNTER._serialized_end=223188 - _PATTERNFLOWSNMPV2CCOMMONREQUESTID._serialized_start=223191 - _PATTERNFLOWSNMPV2CCOMMONREQUESTID._serialized_end=223576 - _PATTERNFLOWSNMPV2CCOMMONREQUESTID_CHOICE._serialized_start=120940 - _PATTERNFLOWSNMPV2CCOMMONREQUESTID_CHOICE._serialized_end=121026 - _PATTERNFLOWSNMPV2CCOMMONREQUESTID_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWSNMPV2CCOMMONREQUESTID_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPRSVPCHECKSUM._serialized_start=223579 - _PATTERNFLOWRSVPRSVPCHECKSUM._serialized_end=223924 - _PATTERNFLOWRSVPRSVPCHECKSUM_CHOICE._serialized_start=134756 - _PATTERNFLOWRSVPRSVPCHECKSUM_CHOICE._serialized_end=134816 - _PATTERNFLOWRSVPRSVPCHECKSUM_CHOICE_ENUM._serialized_start=134766 - _PATTERNFLOWRSVPRSVPCHECKSUM_CHOICE_ENUM._serialized_end=134816 - _PATTERNFLOWRSVPRSVPCHECKSUM_GENERATED._serialized_start=134818 - _PATTERNFLOWRSVPRSVPCHECKSUM_GENERATED._serialized_end=134873 - _PATTERNFLOWRSVPRSVPCHECKSUM_GENERATED_ENUM._serialized_start=134831 - _PATTERNFLOWRSVPRSVPCHECKSUM_GENERATED_ENUM._serialized_end=134873 - _PATTERNFLOWRSVPTIMETOLIVECOUNTER._serialized_start=223926 - _PATTERNFLOWRSVPTIMETOLIVECOUNTER._serialized_end=224048 - _PATTERNFLOWRSVPTIMETOLIVE._serialized_start=224051 - _PATTERNFLOWRSVPTIMETOLIVE._serialized_end=224404 - _PATTERNFLOWRSVPTIMETOLIVE_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPTIMETOLIVE_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPTIMETOLIVE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPTIMETOLIVE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPRESERVEDCOUNTER._serialized_start=224406 - _PATTERNFLOWRSVPRESERVEDCOUNTER._serialized_end=224526 - _PATTERNFLOWRSVPRESERVED._serialized_start=224529 - _PATTERNFLOWRSVPRESERVED._serialized_end=224874 - _PATTERNFLOWRSVPRESERVED_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPRESERVED_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPRESERVED_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPRESERVED_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESSCOUNTER._serialized_start=224877 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESSCOUNTER._serialized_end=225038 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESS._serialized_start=225041 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESS._serialized_end=225550 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESS_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESS_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVEDCOUNTER._serialized_start=225553 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVEDCOUNTER._serialized_end=225697 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVED._serialized_start=225700 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVED._serialized_end=226141 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVED_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVED_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVED_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVED_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELIDCOUNTER._serialized_start=226144 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELIDCOUNTER._serialized_end=226288 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELID._serialized_start=226291 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELID._serialized_end=226732 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELID_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELID_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELID_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELID_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGERCOUNTER._serialized_start=226735 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGERCOUNTER._serialized_end=226878 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGER._serialized_start=226881 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGER._serialized_end=227318 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGER_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGER_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGER_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGER_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4COUNTER._serialized_start=227321 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4COUNTER._serialized_end=227461 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4._serialized_start=227464 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4._serialized_end=227889 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESSCOUNTER._serialized_start=227892 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESSCOUNTER._serialized_end=228030 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESS._serialized_start=228033 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESS._serialized_end=228450 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESS_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESS_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLECOUNTER._serialized_start=228453 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLECOUNTER._serialized_end=228602 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLE._serialized_start=228605 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLE._serialized_end=229066 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLE_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLE_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODRCOUNTER._serialized_start=229069 - _PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODRCOUNTER._serialized_end=229214 - _PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODR._serialized_start=229217 - _PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODR._serialized_end=229662 - _PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODR_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODR_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODR_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODR_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBITCOUNTER._serialized_start=229665 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBITCOUNTER._serialized_end=229813 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBIT._serialized_start=229816 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBIT._serialized_end=230273 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBIT_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBIT_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBIT_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBIT_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESSCOUNTER._serialized_start=230276 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESSCOUNTER._serialized_end=230431 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESS._serialized_start=230434 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESS._serialized_end=230919 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESS_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESS_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBITCOUNTER._serialized_start=230922 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBITCOUNTER._serialized_end=231068 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBIT._serialized_start=231071 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBIT._serialized_end=231520 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBIT_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBIT_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBIT_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBIT_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVEDCOUNTER._serialized_start=231523 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVEDCOUNTER._serialized_end=231676 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVED._serialized_start=231679 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVED._serialized_end=232156 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVED_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVED_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVED_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVED_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PIDCOUNTER._serialized_start=232159 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PIDCOUNTER._serialized_end=232309 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PID._serialized_start=232312 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PID._serialized_end=232777 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PID_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PID_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PID_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PID_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESSCOUNTER._serialized_start=232780 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESSCOUNTER._serialized_end=232946 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESS._serialized_start=232949 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESS._serialized_end=233478 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESS_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESS_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVEDCOUNTER._serialized_start=233481 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVEDCOUNTER._serialized_end=233632 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVED._serialized_start=233635 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVED._serialized_end=234104 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVED_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVED_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVED_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVED_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPIDCOUNTER._serialized_start=234107 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPIDCOUNTER._serialized_end=234255 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPID._serialized_start=234258 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPID._serialized_end=234715 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPID_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPID_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPID_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPID_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSIONCOUNTER._serialized_start=234718 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSIONCOUNTER._serialized_end=234859 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSION._serialized_start=234862 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSION._serialized_end=235291 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSION_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSION_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSION_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSION_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1COUNTER._serialized_start=235294 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1COUNTER._serialized_end=235437 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1._serialized_start=235440 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1._serialized_end=235877 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTHCOUNTER._serialized_start=235880 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTHCOUNTER._serialized_end=236027 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTH._serialized_start=236030 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTH._serialized_end=236483 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTH_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTH_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTH_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTH_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADERCOUNTER._serialized_start=236486 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADERCOUNTER._serialized_end=236633 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADER._serialized_start=236636 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADER._serialized_end=237089 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADER_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADER_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADER_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADER_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBITCOUNTER._serialized_start=237092 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBITCOUNTER._serialized_end=237233 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBIT._serialized_start=237236 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBIT._serialized_end=237665 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBIT_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBIT_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBIT_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBIT_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2COUNTER._serialized_start=237668 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2COUNTER._serialized_end=237811 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2._serialized_start=237814 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2._serialized_end=238251 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATACOUNTER._serialized_start=238254 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATACOUNTER._serialized_end=238407 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATA._serialized_start=238410 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATA._serialized_end=238887 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATA_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATA_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATA_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATA_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPECCOUNTER._serialized_start=238890 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPECCOUNTER._serialized_end=239051 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPEC._serialized_start=239054 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPEC._serialized_end=239563 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPEC_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPEC_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPEC_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPEC_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAGCOUNTER._serialized_start=239566 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAGCOUNTER._serialized_end=239716 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAG._serialized_start=239719 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAG._serialized_end=240184 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAG_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAG_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAG_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAG_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTHCOUNTER._serialized_start=240187 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTHCOUNTER._serialized_end=240339 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTH._serialized_start=240342 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTH._serialized_end=240815 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTH_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTH_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTH_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTH_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNITCOUNTER._serialized_start=240818 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNITCOUNTER._serialized_end=240970 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNIT._serialized_start=240973 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNIT._serialized_end=241446 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNIT_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNIT_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNIT_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNIT_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZECOUNTER._serialized_start=241449 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZECOUNTER._serialized_end=241600 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZE._serialized_start=241603 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZE._serialized_end=242072 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZE_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZE_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZE_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESSCOUNTER._serialized_start=242075 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESSCOUNTER._serialized_end=242229 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESS._serialized_start=242232 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESS._serialized_end=242713 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESS_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESS_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESS_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESS_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTHCOUNTER._serialized_start=242716 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTHCOUNTER._serialized_end=242871 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTH._serialized_start=242874 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTH._serialized_end=243359 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTH_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTH_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTH_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTH_CHOICE_ENUM._serialized_end=121026 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELFLAGS._serialized_start=243362 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELFLAGS._serialized_end=243609 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELFLAGS_CHOICE._serialized_start=218716 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELFLAGS_CHOICE._serialized_end=218772 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELFLAGS_CHOICE_ENUM._serialized_start=120280 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELFLAGS_CHOICE_ENUM._serialized_end=120326 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELCTYPE._serialized_start=243612 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELCTYPE._serialized_end=243859 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELCTYPE_CHOICE._serialized_start=218716 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELCTYPE_CHOICE._serialized_end=218772 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELCTYPE_CHOICE_ENUM._serialized_start=120280 - _PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELCTYPE_CHOICE_ENUM._serialized_end=120326 - _PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPECOUNTER._serialized_start=243862 - _PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPECOUNTER._serialized_end=243995 - _PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPE._serialized_start=243998 - _PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPE._serialized_end=244395 - _PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPE_CHOICE._serialized_start=120940 - _PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPE_CHOICE._serialized_end=121026 - _PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPE_CHOICE_ENUM._serialized_start=120950 - _PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPE_CHOICE_ENUM._serialized_end=121026 - _VERSION._serialized_start=244398 - _VERSION._serialized_end=244543 - _SUCCESS._serialized_start=244545 - _SUCCESS._serialized_end=244585 - _FAILURE._serialized_start=244587 - _FAILURE._serialized_end=244623 - _SETCONFIGREQUEST._serialized_start=244625 - _SETCONFIGREQUEST._serialized_end=244672 - _UPDATECONFIGREQUEST._serialized_start=244674 - _UPDATECONFIGREQUEST._serialized_end=244737 - _SETCONFIGRESPONSE._serialized_start=244739 - _SETCONFIGRESPONSE._serialized_end=244789 - _GETCONFIGRESPONSE._serialized_start=244791 - _GETCONFIGRESPONSE._serialized_end=244839 - _UPDATECONFIGRESPONSE._serialized_start=244841 - _UPDATECONFIGRESPONSE._serialized_end=244894 - _SETCONTROLSTATEREQUEST._serialized_start=244896 - _SETCONTROLSTATEREQUEST._serialized_end=244962 - _SETCONTROLSTATERESPONSE._serialized_start=244964 - _SETCONTROLSTATERESPONSE._serialized_end=245020 - _SETCONTROLACTIONREQUEST._serialized_start=245022 - _SETCONTROLACTIONREQUEST._serialized_end=245091 - _SETCONTROLACTIONRESPONSE._serialized_start=245093 - _SETCONTROLACTIONRESPONSE._serialized_end=245180 - _GETMETRICSREQUEST._serialized_start=245182 - _GETMETRICSREQUEST._serialized_end=245247 - _GETMETRICSRESPONSE._serialized_start=245249 - _GETMETRICSRESPONSE._serialized_end=245317 - _GETSTATESREQUEST._serialized_start=245319 - _GETSTATESREQUEST._serialized_end=245381 - _GETSTATESRESPONSE._serialized_start=245383 - _GETSTATESRESPONSE._serialized_end=245448 - _GETCAPTUREREQUEST._serialized_start=245450 - _GETCAPTUREREQUEST._serialized_end=245515 - _GETCAPTURERESPONSE._serialized_start=245517 - _GETCAPTURERESPONSE._serialized_end=245561 - _GETVERSIONRESPONSE._serialized_start=245563 - _GETVERSIONRESPONSE._serialized_end=245614 - _OPENAPI._serialized_start=245617 - _OPENAPI._serialized_end=246224 + _globals['_CONFIG']._serialized_start=82 + _globals['_CONFIG']._serialized_end=347 + _globals['_CONFIGOPTIONS']._serialized_start=349 + _globals['_CONFIGOPTIONS']._serialized_end=452 + _globals['_PORT']._serialized_start=454 + _globals['_PORT']._serialized_end=524 + _globals['_PORTOPTIONS']._serialized_start=526 + _globals['_PORTOPTIONS']._serialized_end=597 + _globals['_LAG']._serialized_start=600 + _globals['_LAG']._serialized_end=736 + _globals['_LAGPORT']._serialized_start=738 + _globals['_LAGPORT']._serialized_end=860 + _globals['_LAGPROTOCOL']._serialized_start=863 + _globals['_LAGPROTOCOL']._serialized_end=1071 + _globals['_LAGPROTOCOL_CHOICE']._serialized_start=1005 + _globals['_LAGPROTOCOL_CHOICE']._serialized_end=1060 + _globals['_LAGPROTOCOL_CHOICE_ENUM']._serialized_start=1015 + _globals['_LAGPROTOCOL_CHOICE_ENUM']._serialized_end=1060 + _globals['_LAGPROTOCOLSTATIC']._serialized_start=1073 + _globals['_LAGPROTOCOLSTATIC']._serialized_end=1124 + _globals['_LAGPROTOCOLLACP']._serialized_start=1127 + _globals['_LAGPROTOCOLLACP']._serialized_end=1294 + _globals['_LAGPORTLACP']._serialized_start=1297 + _globals['_LAGPORTLACP']._serialized_end=1700 + _globals['_LAGPORTLACP_ACTORACTIVITY']._serialized_start=1517 + _globals['_LAGPORTLACP_ACTORACTIVITY']._serialized_end=1582 + _globals['_LAGPORTLACP_ACTORACTIVITY_ENUM']._serialized_start=1534 + _globals['_LAGPORTLACP_ACTORACTIVITY_ENUM']._serialized_end=1582 + _globals['_DEVICEETHERNETBASE']._serialized_start=1703 + _globals['_DEVICEETHERNETBASE']._serialized_end=1835 + _globals['_DEVICEETHERNET']._serialized_start=1838 + _globals['_DEVICEETHERNET']._serialized_end=2197 + _globals['_ETHERNETCONNECTION']._serialized_start=2200 + _globals['_ETHERNETCONNECTION']._serialized_end=2555 + _globals['_ETHERNETCONNECTION_CHOICE']._serialized_start=2404 + _globals['_ETHERNETCONNECTION_CHOICE']._serialized_end=2502 + _globals['_ETHERNETCONNECTION_CHOICE_ENUM']._serialized_start=2414 + _globals['_ETHERNETCONNECTION_CHOICE_ENUM']._serialized_end=2502 + _globals['_ETHERNETSIMULATEDLINK']._serialized_start=2558 + _globals['_ETHERNETSIMULATEDLINK']._serialized_end=2788 + _globals['_ETHERNETSIMULATEDLINK_LINKTYPE']._serialized_start=2685 + _globals['_ETHERNETSIMULATEDLINK_LINKTYPE']._serialized_end=2748 + _globals['_ETHERNETSIMULATEDLINK_LINKTYPE_ENUM']._serialized_start=2697 + _globals['_ETHERNETSIMULATEDLINK_LINKTYPE_ENUM']._serialized_end=2748 + _globals['_DEVICEVLAN']._serialized_start=2791 + _globals['_DEVICEVLAN']._serialized_end=3034 + _globals['_DEVICEVLAN_TPID']._serialized_start=2910 + _globals['_DEVICEVLAN_TPID']._serialized_end=2996 + _globals['_DEVICEVLAN_TPID_ENUM']._serialized_start=2918 + _globals['_DEVICEVLAN_TPID_ENUM']._serialized_end=2996 + _globals['_DEVICEIPV4']._serialized_start=3037 + _globals['_DEVICEIPV4']._serialized_end=3225 + _globals['_DEVICEIPV4LOOPBACK']._serialized_start=3227 + _globals['_DEVICEIPV4LOOPBACK']._serialized_end=3345 + _globals['_DEVICEIPV4GATEWAYMAC']._serialized_start=3348 + _globals['_DEVICEIPV4GATEWAYMAC']._serialized_end=3555 + _globals['_DEVICEIPV4GATEWAYMAC_CHOICE']._serialized_start=3471 + _globals['_DEVICEIPV4GATEWAYMAC_CHOICE']._serialized_end=3525 + _globals['_DEVICEIPV4GATEWAYMAC_CHOICE_ENUM']._serialized_start=3481 + _globals['_DEVICEIPV4GATEWAYMAC_CHOICE_ENUM']._serialized_end=3525 + _globals['_DEVICEIPV6']._serialized_start=3558 + _globals['_DEVICEIPV6']._serialized_end=3746 + _globals['_DEVICEIPV6LOOPBACK']._serialized_start=3748 + _globals['_DEVICEIPV6LOOPBACK']._serialized_end=3866 + _globals['_DEVICEIPV6GATEWAYMAC']._serialized_start=3869 + _globals['_DEVICEIPV6GATEWAYMAC']._serialized_end=4076 + _globals['_DEVICEIPV6GATEWAYMAC_CHOICE']._serialized_start=3471 + _globals['_DEVICEIPV6GATEWAYMAC_CHOICE']._serialized_end=3525 + _globals['_DEVICEIPV6GATEWAYMAC_CHOICE_ENUM']._serialized_start=3481 + _globals['_DEVICEIPV6GATEWAYMAC_CHOICE_ENUM']._serialized_end=3525 + _globals['_DEVICEDHCPV4CLIENT']._serialized_start=4079 + _globals['_DEVICEDHCPV4CLIENT']._serialized_end=4413 + _globals['_DEVICEDHCPV4CLIENT_CHOICE']._serialized_start=4289 + _globals['_DEVICEDHCPV4CLIENT_CHOICE']._serialized_end=4360 + _globals['_DEVICEDHCPV4CLIENT_CHOICE_ENUM']._serialized_start=4299 + _globals['_DEVICEDHCPV4CLIENT_CHOICE_ENUM']._serialized_end=4360 + _globals['_DHCPV4CLIENTPARAMS']._serialized_start=4416 + _globals['_DHCPV4CLIENTPARAMS']._serialized_end=4606 + _globals['_DEVICEDHCPV6CLIENT']._serialized_start=4609 + _globals['_DEVICEDHCPV6CLIENT']._serialized_end=4914 + _globals['_DEVICEDHCPV6CLIENTOPTIONSREQUEST']._serialized_start=4917 + _globals['_DEVICEDHCPV6CLIENTOPTIONSREQUEST']._serialized_end=5084 + _globals['_DEVICEDHCPV6CLIENTOPTIONS']._serialized_start=5087 + _globals['_DEVICEDHCPV6CLIENTOPTIONS']._serialized_end=5343 + _globals['_DEVICEDHCPV6CLIENTIATYPE']._serialized_start=5346 + _globals['_DEVICEDHCPV6CLIENTIATYPE']._serialized_end=5676 + _globals['_DEVICEDHCPV6CLIENTIATYPE_CHOICE']._serialized_start=5590 + _globals['_DEVICEDHCPV6CLIENTIATYPE_CHOICE']._serialized_end=5665 + _globals['_DEVICEDHCPV6CLIENTIATYPE_CHOICE_ENUM']._serialized_start=5600 + _globals['_DEVICEDHCPV6CLIENTIATYPE_CHOICE_ENUM']._serialized_end=5665 + _globals['_DEVICEDHCPV6CLIENTIATIMEVALUE']._serialized_start=5678 + _globals['_DEVICEDHCPV6CLIENTIATIMEVALUE']._serialized_end=5757 + _globals['_DEVICEDHCPV6CLIENTDUIDTYPE']._serialized_start=5760 + _globals['_DEVICEDHCPV6CLIENTDUIDTYPE']._serialized_end=6058 + _globals['_DEVICEDHCPV6CLIENTDUIDTYPE_CHOICE']._serialized_start=5989 + _globals['_DEVICEDHCPV6CLIENTDUIDTYPE_CHOICE']._serialized_end=6047 + _globals['_DEVICEDHCPV6CLIENTDUIDTYPE_CHOICE_ENUM']._serialized_start=5999 + _globals['_DEVICEDHCPV6CLIENTDUIDTYPE_CHOICE_ENUM']._serialized_end=6047 + _globals['_DEVICEDHCPV6CLIENTDUIDVALUE']._serialized_start=6060 + _globals['_DEVICEDHCPV6CLIENTDUIDVALUE']._serialized_end=6173 + _globals['_DEVICEDHCPV6CLIENTNODUID']._serialized_start=6175 + _globals['_DEVICEDHCPV6CLIENTNODUID']._serialized_end=6201 + _globals['_DHCPV6CLIENTOPTIONSSERVERIDENTIFIER']._serialized_start=6204 + _globals['_DHCPV6CLIENTOPTIONSSERVERIDENTIFIER']._serialized_end=6619 + _globals['_DHCPV6CLIENTOPTIONSSERVERIDENTIFIER_CHOICE']._serialized_start=6520 + _globals['_DHCPV6CLIENTOPTIONSSERVERIDENTIFIER_CHOICE']._serialized_end=6608 + _globals['_DHCPV6CLIENTOPTIONSSERVERIDENTIFIER_CHOICE_ENUM']._serialized_start=6530 + _globals['_DHCPV6CLIENTOPTIONSSERVERIDENTIFIER_CHOICE_ENUM']._serialized_end=6608 + _globals['_DHCPV6CLIENTOPTIONSDUIDLLT']._serialized_start=6621 + _globals['_DHCPV6CLIENTOPTIONSDUIDLLT']._serialized_end=6747 + _globals['_DHCPV6CLIENTOPTIONSDUIDEN']._serialized_start=6749 + _globals['_DHCPV6CLIENTOPTIONSDUIDEN']._serialized_end=6870 + _globals['_DHCPV6CLIENTOPTIONSDUIDLL']._serialized_start=6872 + _globals['_DHCPV6CLIENTOPTIONSDUIDLL']._serialized_end=6969 + _globals['_DHCPV6CLIENTOPTIONSDUIDUUID']._serialized_start=6972 + _globals['_DHCPV6CLIENTOPTIONSDUIDUUID']._serialized_end=7391 + _globals['_DHCPV6CLIENTOPTIONSDUIDUUIDVERSION']._serialized_start=7394 + _globals['_DHCPV6CLIENTOPTIONSDUIDUUIDVERSION']._serialized_end=7595 + _globals['_DHCPV6CLIENTOPTIONSDUIDUUIDVERSION_CHOICE']._serialized_start=7506 + _globals['_DHCPV6CLIENTOPTIONSDUIDUUIDVERSION_CHOICE']._serialized_end=7584 + _globals['_DHCPV6CLIENTOPTIONSDUIDUUIDVERSION_CHOICE_ENUM']._serialized_start=7516 + _globals['_DHCPV6CLIENTOPTIONSDUIDUUIDVERSION_CHOICE_ENUM']._serialized_end=7584 + _globals['_DHCPV6CLIENTOPTIONSDUIDUUIDVARIANT']._serialized_start=7598 + _globals['_DHCPV6CLIENTOPTIONSDUIDUUIDVARIANT']._serialized_end=7800 + _globals['_DHCPV6CLIENTOPTIONSDUIDUUIDVARIANT_CHOICE']._serialized_start=7710 + _globals['_DHCPV6CLIENTOPTIONSDUIDUUIDVARIANT_CHOICE']._serialized_end=7789 + _globals['_DHCPV6CLIENTOPTIONSDUIDUUIDVARIANT_CHOICE_ENUM']._serialized_start=7720 + _globals['_DHCPV6CLIENTOPTIONSDUIDUUIDVARIANT_CHOICE_ENUM']._serialized_end=7789 + _globals['_DHCPV6CLIENTOPTIONSLINKLAYERADDRESS']._serialized_start=7802 + _globals['_DHCPV6CLIENTOPTIONSLINKLAYERADDRESS']._serialized_end=7869 + _globals['_DHCPV6CLIENTOPTIONSOPTIONSREQUEST']._serialized_start=7872 + _globals['_DHCPV6CLIENTOPTIONSOPTIONSREQUEST']._serialized_end=8166 + _globals['_DHCPV6CLIENTOPTIONSOPTIONSREQUEST_CHOICE']._serialized_start=8030 + _globals['_DHCPV6CLIENTOPTIONSOPTIONSREQUEST_CHOICE']._serialized_end=8155 + _globals['_DHCPV6CLIENTOPTIONSOPTIONSREQUEST_CHOICE_ENUM']._serialized_start=8040 + _globals['_DHCPV6CLIENTOPTIONSOPTIONSREQUEST_CHOICE_ENUM']._serialized_end=8155 + _globals['_DHCPV6CLIENTOPTIONSCUSTOM']._serialized_start=8168 + _globals['_DHCPV6CLIENTOPTIONSCUSTOM']._serialized_end=8223 + _globals['_DHCPV6CLIENTOPTIONSVENDORCLASS']._serialized_start=8226 + _globals['_DHCPV6CLIENTOPTIONSVENDORCLASS']._serialized_end=8408 + _globals['_DHCPV6CLIENTOPTIONSINCLUDEDMESSAGES']._serialized_start=8411 + _globals['_DHCPV6CLIENTOPTIONSINCLUDEDMESSAGES']._serialized_end=8649 + _globals['_DHCPV6CLIENTOPTIONSINCLUDEDMESSAGES_CHOICE']._serialized_start=8581 + _globals['_DHCPV6CLIENTOPTIONSINCLUDEDMESSAGES_CHOICE']._serialized_end=8638 + _globals['_DHCPV6CLIENTOPTIONSINCLUDEDMESSAGES_CHOICE_ENUM']._serialized_start=8591 + _globals['_DHCPV6CLIENTOPTIONSINCLUDEDMESSAGES_CHOICE_ENUM']._serialized_end=8638 + _globals['_DHCPV6CLIENTOPTIONSMESSAGETYPE']._serialized_start=8652 + _globals['_DHCPV6CLIENTOPTIONSMESSAGETYPE']._serialized_end=8882 + _globals['_DHCPV6CLIENTOPTIONSMESSAGETYPE_CHOICE']._serialized_start=8756 + _globals['_DHCPV6CLIENTOPTIONSMESSAGETYPE_CHOICE']._serialized_end=8871 + _globals['_DHCPV6CLIENTOPTIONSMESSAGETYPE_CHOICE_ENUM']._serialized_start=8766 + _globals['_DHCPV6CLIENTOPTIONSMESSAGETYPE_CHOICE_ENUM']._serialized_end=8871 + _globals['_DHCPV6CLIENTOPTIONSVENDORINFO']._serialized_start=8885 + _globals['_DHCPV6CLIENTOPTIONSVENDORINFO']._serialized_end=9108 + _globals['_DHCPV6SERVEROPTIONSVENDORINFO']._serialized_start=9111 + _globals['_DHCPV6SERVEROPTIONSVENDORINFO']._serialized_end=9334 + _globals['_DHCPV6SERVEROPTIONSINCLUDEDMESSAGES']._serialized_start=9337 + _globals['_DHCPV6SERVEROPTIONSINCLUDEDMESSAGES']._serialized_end=9575 + _globals['_DHCPV6SERVEROPTIONSINCLUDEDMESSAGES_CHOICE']._serialized_start=8581 + _globals['_DHCPV6SERVEROPTIONSINCLUDEDMESSAGES_CHOICE']._serialized_end=8638 + _globals['_DHCPV6SERVEROPTIONSINCLUDEDMESSAGES_CHOICE_ENUM']._serialized_start=8591 + _globals['_DHCPV6SERVEROPTIONSINCLUDEDMESSAGES_CHOICE_ENUM']._serialized_end=8638 + _globals['_DHCPV6SERVEROPTIONSMESSAGETYPE']._serialized_start=9578 + _globals['_DHCPV6SERVEROPTIONSMESSAGETYPE']._serialized_end=9770 + _globals['_DHCPV6SERVEROPTIONSMESSAGETYPE_CHOICE']._serialized_start=9682 + _globals['_DHCPV6SERVEROPTIONSMESSAGETYPE_CHOICE']._serialized_end=9759 + _globals['_DHCPV6SERVEROPTIONSMESSAGETYPE_CHOICE_ENUM']._serialized_start=9692 + _globals['_DHCPV6SERVEROPTIONSMESSAGETYPE_CHOICE_ENUM']._serialized_end=9759 + _globals['_DHCPV6OPTIONSVENDORSPECIFICOPTIONS']._serialized_start=9772 + _globals['_DHCPV6OPTIONSVENDORSPECIFICOPTIONS']._serialized_end=9864 + _globals['_DHCPV6CLIENTOPTIONSFQDN']._serialized_start=9867 + _globals['_DHCPV6CLIENTOPTIONSFQDN']._serialized_end=10106 + _globals['_DHCPV6SERVEROPTIONSBOOTFILEURL']._serialized_start=10109 + _globals['_DHCPV6SERVEROPTIONSBOOTFILEURL']._serialized_end=10308 + _globals['_DHCPV6SERVEROPTIONSBOOTFILEPARAMS']._serialized_start=10310 + _globals['_DHCPV6SERVEROPTIONSBOOTFILEPARAMS']._serialized_end=10383 + _globals['_LAYER1']._serialized_start=10386 + _globals['_LAYER1']._serialized_end=11192 + _globals['_LAYER1_SPEED']._serialized_start=10731 + _globals['_LAYER1_SPEED']._serialized_end=11028 + _globals['_LAYER1_SPEED_ENUM']._serialized_start=10741 + _globals['_LAYER1_SPEED_ENUM']._serialized_end=11028 + _globals['_LAYER1_MEDIA']._serialized_start=11030 + _globals['_LAYER1_MEDIA']._serialized_end=11096 + _globals['_LAYER1_MEDIA_ENUM']._serialized_start=11039 + _globals['_LAYER1_MEDIA_ENUM']._serialized_end=11096 + _globals['_LAYER1AUTONEGOTIATION']._serialized_start=11195 + _globals['_LAYER1AUTONEGOTIATION']._serialized_end=11598 + _globals['_LAYER1FLOWCONTROL']._serialized_start=11601 + _globals['_LAYER1FLOWCONTROL']._serialized_end=11901 + _globals['_LAYER1FLOWCONTROL_CHOICE']._serialized_start=11800 + _globals['_LAYER1FLOWCONTROL_CHOICE']._serialized_end=11869 + _globals['_LAYER1FLOWCONTROL_CHOICE_ENUM']._serialized_start=11810 + _globals['_LAYER1FLOWCONTROL_CHOICE_ENUM']._serialized_end=11869 + _globals['_LAYER1IEEE8023X']._serialized_start=11903 + _globals['_LAYER1IEEE8023X']._serialized_end=11920 + _globals['_LAYER1IEEE8021QBB']._serialized_start=11923 + _globals['_LAYER1IEEE8021QBB']._serialized_end=12316 + _globals['_CAPTURE']._serialized_start=12319 + _globals['_CAPTURE']._serialized_end=12608 + _globals['_CAPTURE_FORMAT']._serialized_start=12503 + _globals['_CAPTURE_FORMAT']._serialized_end=12558 + _globals['_CAPTURE_FORMAT_ENUM']._serialized_start=12513 + _globals['_CAPTURE_FORMAT_ENUM']._serialized_end=12558 + _globals['_CAPTUREFILTER']._serialized_start=12611 + _globals['_CAPTUREFILTER']._serialized_end=12953 + _globals['_CAPTUREFILTER_CHOICE']._serialized_start=12853 + _globals['_CAPTUREFILTER_CHOICE']._serialized_end=12942 + _globals['_CAPTUREFILTER_CHOICE_ENUM']._serialized_start=12863 + _globals['_CAPTUREFILTER_CHOICE_ENUM']._serialized_end=12942 + _globals['_CAPTURECUSTOM']._serialized_start=12956 + _globals['_CAPTURECUSTOM']._serialized_end=13133 + _globals['_CAPTUREFIELD']._serialized_start=13135 + _globals['_CAPTUREFIELD']._serialized_end=13239 + _globals['_CAPTUREETHERNET']._serialized_start=13242 + _globals['_CAPTUREETHERNET']._serialized_end=13400 + _globals['_CAPTUREVLAN']._serialized_start=13403 + _globals['_CAPTUREVLAN']._serialized_end=13553 + _globals['_CAPTUREIPV4']._serialized_start=13556 + _globals['_CAPTUREIPV4']._serialized_end=14120 + _globals['_CAPTUREIPV6']._serialized_start=14123 + _globals['_CAPTUREIPV6']._serialized_end=14438 + _globals['_DEVICE']._serialized_start=14441 + _globals['_DEVICE']._serialized_end=14836 + _globals['_PROTOCOLOPTIONS']._serialized_start=14838 + _globals['_PROTOCOLOPTIONS']._serialized_end=14903 + _globals['_DEVICEISISROUTER']._serialized_start=14906 + _globals['_DEVICEISISROUTER']._serialized_end=15276 + _globals['_DEVICEISISMULTIINSTANCE']._serialized_start=15278 + _globals['_DEVICEISISMULTIINSTANCE']._serialized_end=15344 + _globals['_ISISINTERFACE']._serialized_start=15347 + _globals['_ISISINTERFACE']._serialized_end=16132 + _globals['_ISISINTERFACE_NETWORKTYPE']._serialized_start=15915 + _globals['_ISISINTERFACE_NETWORKTYPE']._serialized_end=15988 + _globals['_ISISINTERFACE_NETWORKTYPE_ENUM']._serialized_start=15930 + _globals['_ISISINTERFACE_NETWORKTYPE_ENUM']._serialized_end=15988 + _globals['_ISISINTERFACE_LEVELTYPE']._serialized_start=15990 + _globals['_ISISINTERFACE_LEVELTYPE']._serialized_end=16067 + _globals['_ISISINTERFACE_LEVELTYPE_ENUM']._serialized_start=16003 + _globals['_ISISINTERFACE_LEVELTYPE_ENUM']._serialized_end=16067 + _globals['_ISISINTERFACELEVEL']._serialized_start=16135 + _globals['_ISISINTERFACELEVEL']._serialized_end=16285 + _globals['_ISISMT']._serialized_start=16287 + _globals['_ISISMT']._serialized_end=16367 + _globals['_LINKSTATETE']._serialized_start=16370 + _globals['_LINKSTATETE']._serialized_end=16662 + _globals['_LINKSTATEPRIORITYBANDWIDTHS']._serialized_start=16665 + _globals['_LINKSTATEPRIORITYBANDWIDTHS']._serialized_end=16902 + _globals['_ISISINTERFACEAUTHENTICATION']._serialized_start=16905 + _globals['_ISISINTERFACEAUTHENTICATION']._serialized_end=17142 + _globals['_ISISINTERFACEAUTHENTICATION_AUTHTYPE']._serialized_start=17049 + _globals['_ISISINTERFACEAUTHENTICATION_AUTHTYPE']._serialized_end=17107 + _globals['_ISISINTERFACEAUTHENTICATION_AUTHTYPE_ENUM']._serialized_start=17061 + _globals['_ISISINTERFACEAUTHENTICATION_AUTHTYPE_ENUM']._serialized_end=17107 + _globals['_ISISINTERFACEADVANCED']._serialized_start=17145 + _globals['_ISISINTERFACEADVANCED']._serialized_end=17484 + _globals['_ISISINTERFACELINKPROTECTION']._serialized_start=17487 + _globals['_ISISINTERFACELINKPROTECTION']._serialized_end=17864 + _globals['_ISISBASIC']._serialized_start=17867 + _globals['_ISISBASIC']._serialized_end=18080 + _globals['_ISISADVANCED']._serialized_start=18083 + _globals['_ISISADVANCED']._serialized_end=18605 + _globals['_ISISAUTHENTICATION']._serialized_start=18608 + _globals['_ISISAUTHENTICATION']._serialized_end=18782 + _globals['_ISISAUTHENTICATIONBASE']._serialized_start=18785 + _globals['_ISISAUTHENTICATIONBASE']._serialized_end=19012 + _globals['_ISISAUTHENTICATIONBASE_AUTHTYPE']._serialized_start=17049 + _globals['_ISISAUTHENTICATIONBASE_AUTHTYPE']._serialized_end=17107 + _globals['_ISISAUTHENTICATIONBASE_AUTHTYPE_ENUM']._serialized_start=17061 + _globals['_ISISAUTHENTICATIONBASE_AUTHTYPE_ENUM']._serialized_end=17107 + _globals['_ISISV4ROUTERANGE']._serialized_start=19015 + _globals['_ISISV4ROUTERANGE']._serialized_end=19615 + _globals['_ISISV4ROUTERANGE_ORIGINTYPE']._serialized_start=19363 + _globals['_ISISV4ROUTERANGE_ORIGINTYPE']._serialized_end=19428 + _globals['_ISISV4ROUTERANGE_ORIGINTYPE_ENUM']._serialized_start=19377 + _globals['_ISISV4ROUTERANGE_ORIGINTYPE_ENUM']._serialized_end=19428 + _globals['_ISISV4ROUTERANGE_REDISTRIBUTIONTYPE']._serialized_start=19430 + _globals['_ISISV4ROUTERANGE_REDISTRIBUTIONTYPE']._serialized_end=19493 + _globals['_ISISV4ROUTERANGE_REDISTRIBUTIONTYPE_ENUM']._serialized_start=19452 + _globals['_ISISV4ROUTERANGE_REDISTRIBUTIONTYPE_ENUM']._serialized_end=19493 + _globals['_V4ROUTEADDRESS']._serialized_start=19618 + _globals['_V4ROUTEADDRESS']._serialized_end=19758 + _globals['_V6ROUTEADDRESS']._serialized_start=19761 + _globals['_V6ROUTEADDRESS']._serialized_end=19901 + _globals['_MACROUTEADDRESS']._serialized_start=19904 + _globals['_MACROUTEADDRESS']._serialized_end=20045 + _globals['_ISISV6ROUTERANGE']._serialized_start=20048 + _globals['_ISISV6ROUTERANGE']._serialized_end=20648 + _globals['_ISISV6ROUTERANGE_ORIGINTYPE']._serialized_start=19363 + _globals['_ISISV6ROUTERANGE_ORIGINTYPE']._serialized_end=19428 + _globals['_ISISV6ROUTERANGE_ORIGINTYPE_ENUM']._serialized_start=19377 + _globals['_ISISV6ROUTERANGE_ORIGINTYPE_ENUM']._serialized_end=19428 + _globals['_ISISV6ROUTERANGE_REDISTRIBUTIONTYPE']._serialized_start=19430 + _globals['_ISISV6ROUTERANGE_REDISTRIBUTIONTYPE']._serialized_end=19493 + _globals['_ISISV6ROUTERANGE_REDISTRIBUTIONTYPE_ENUM']._serialized_start=19452 + _globals['_ISISV6ROUTERANGE_REDISTRIBUTIONTYPE_ENUM']._serialized_end=19493 + _globals['_DEVICEBGPROUTER']._serialized_start=20651 + _globals['_DEVICEBGPROUTER']._serialized_end=20798 + _globals['_DEVICEBGPMESSAGEHEADERERROR']._serialized_start=20801 + _globals['_DEVICEBGPMESSAGEHEADERERROR']._serialized_end=21073 + _globals['_DEVICEBGPMESSAGEHEADERERROR_SUBCODE']._serialized_start=20902 + _globals['_DEVICEBGPMESSAGEHEADERERROR_SUBCODE']._serialized_end=21061 + _globals['_DEVICEBGPMESSAGEHEADERERROR_SUBCODE_ENUM']._serialized_start=20914 + _globals['_DEVICEBGPMESSAGEHEADERERROR_SUBCODE_ENUM']._serialized_end=21061 + _globals['_DEVICEBGPOPENMESSAGEERROR']._serialized_start=21076 + _globals['_DEVICEBGPOPENMESSAGEERROR']._serialized_end=21502 + _globals['_DEVICEBGPOPENMESSAGEERROR_SUBCODE']._serialized_start=21173 + _globals['_DEVICEBGPOPENMESSAGEERROR_SUBCODE']._serialized_end=21490 + _globals['_DEVICEBGPOPENMESSAGEERROR_SUBCODE_ENUM']._serialized_start=21185 + _globals['_DEVICEBGPOPENMESSAGEERROR_SUBCODE_ENUM']._serialized_end=21490 + _globals['_DEVICEBGPUPDATEMESSAGEERROR']._serialized_start=21505 + _globals['_DEVICEBGPUPDATEMESSAGEERROR']._serialized_end=22109 + _globals['_DEVICEBGPUPDATEMESSAGEERROR_SUBCODE']._serialized_start=21606 + _globals['_DEVICEBGPUPDATEMESSAGEERROR_SUBCODE']._serialized_end=22097 + _globals['_DEVICEBGPUPDATEMESSAGEERROR_SUBCODE_ENUM']._serialized_start=21618 + _globals['_DEVICEBGPUPDATEMESSAGEERROR_SUBCODE_ENUM']._serialized_end=22097 + _globals['_DEVICEBGPHOLDTIMEREXPIRED']._serialized_start=22111 + _globals['_DEVICEBGPHOLDTIMEREXPIRED']._serialized_end=22138 + _globals['_DEVICEBGPFINITESTATEMACHINEERROR']._serialized_start=22140 + _globals['_DEVICEBGPFINITESTATEMACHINEERROR']._serialized_end=22174 + _globals['_DEVICEBGPCEASEERROR']._serialized_start=22177 + _globals['_DEVICEBGPCEASEERROR']._serialized_end=22692 + _globals['_DEVICEBGPCEASEERROR_SUBCODE']._serialized_start=22262 + _globals['_DEVICEBGPCEASEERROR_SUBCODE']._serialized_end=22680 + _globals['_DEVICEBGPCEASEERROR_SUBCODE_ENUM']._serialized_start=22274 + _globals['_DEVICEBGPCEASEERROR_SUBCODE_ENUM']._serialized_end=22680 + _globals['_DEVICEBGPCUSTOMERROR']._serialized_start=22694 + _globals['_DEVICEBGPCUSTOMERROR']._serialized_end=22778 + _globals['_BGPV4PEER']._serialized_start=22781 + _globals['_BGPV4PEER']._serialized_end=23645 + _globals['_BGPV4PEER_ASTYPE']._serialized_start=23459 + _globals['_BGPV4PEER_ASTYPE']._serialized_end=23512 + _globals['_BGPV4PEER_ASTYPE_ENUM']._serialized_start=23469 + _globals['_BGPV4PEER_ASTYPE_ENUM']._serialized_end=23512 + _globals['_BGPV4PEER_ASNUMBERWIDTH']._serialized_start=23514 + _globals['_BGPV4PEER_ASNUMBERWIDTH']._serialized_end=23573 + _globals['_BGPV4PEER_ASNUMBERWIDTH_ENUM']._serialized_start=23531 + _globals['_BGPV4PEER_ASNUMBERWIDTH_ENUM']._serialized_end=23573 + _globals['_BGPV4INTERFACE']._serialized_start=23647 + _globals['_BGPV4INTERFACE']._serialized_end=23732 + _globals['_BGPV4ETHERNETSEGMENT']._serialized_start=23735 + _globals['_BGPV4ETHERNETSEGMENT']._serialized_end=24231 + _globals['_BGPV4ETHERNETSEGMENT_ACTIVEMODE']._serialized_start=24121 + _globals['_BGPV4ETHERNETSEGMENT_ACTIVEMODE']._serialized_end=24193 + _globals['_BGPV4ETHERNETSEGMENT_ACTIVEMODE_ENUM']._serialized_start=24135 + _globals['_BGPV4ETHERNETSEGMENT_ACTIVEMODE_ENUM']._serialized_end=24193 + _globals['_BGPETHERNETSEGMENTDFELECTION']._serialized_start=24233 + _globals['_BGPETHERNETSEGMENTDFELECTION']._serialized_end=24311 + _globals['_BGPROUTEADVANCED']._serialized_start=24314 + _globals['_BGPROUTEADVANCED']._serialized_end=24788 + _globals['_BGPROUTEADVANCED_ORIGIN']._serialized_start=24575 + _globals['_BGPROUTEADVANCED_ORIGIN']._serialized_end=24642 + _globals['_BGPROUTEADVANCED_ORIGIN_ENUM']._serialized_start=24585 + _globals['_BGPROUTEADVANCED_ORIGIN_ENUM']._serialized_end=24642 + _globals['_BGPCOMMUNITY']._serialized_start=24791 + _globals['_BGPCOMMUNITY']._serialized_end=25083 + _globals['_BGPCOMMUNITY_TYPE']._serialized_start=24904 + _globals['_BGPCOMMUNITY_TYPE']._serialized_end=25046 + _globals['_BGPCOMMUNITY_TYPE_ENUM']._serialized_start=24913 + _globals['_BGPCOMMUNITY_TYPE_ENUM']._serialized_end=25046 + _globals['_BGPEXTCOMMUNITY']._serialized_start=25086 + _globals['_BGPEXTCOMMUNITY']._serialized_end=25591 + _globals['_BGPEXTCOMMUNITY_TYPE']._serialized_start=25234 + _globals['_BGPEXTCOMMUNITY_TYPE']._serialized_end=25422 + _globals['_BGPEXTCOMMUNITY_TYPE_ENUM']._serialized_start=25243 + _globals['_BGPEXTCOMMUNITY_TYPE_ENUM']._serialized_end=25422 + _globals['_BGPEXTCOMMUNITY_SUBTYPE']._serialized_start=25425 + _globals['_BGPEXTCOMMUNITY_SUBTYPE']._serialized_end=25560 + _globals['_BGPEXTCOMMUNITY_SUBTYPE_ENUM']._serialized_start=25436 + _globals['_BGPEXTCOMMUNITY_SUBTYPE_ENUM']._serialized_end=25560 + _globals['_BGPASPATH']._serialized_start=25594 + _globals['_BGPASPATH']._serialized_end=25912 + _globals['_BGPASPATH_ASSETMODE']._serialized_start=25706 + _globals['_BGPASPATH_ASSETMODE']._serialized_end=25896 + _globals['_BGPASPATH_ASSETMODE_ENUM']._serialized_start=25720 + _globals['_BGPASPATH_ASSETMODE_ENUM']._serialized_end=25896 + _globals['_BGPASPATHSEGMENT']._serialized_start=25915 + _globals['_BGPASPATHSEGMENT']._serialized_end=26109 + _globals['_BGPASPATHSEGMENT_TYPE']._serialized_start=26007 + _globals['_BGPASPATHSEGMENT_TYPE']._serialized_end=26100 + _globals['_BGPASPATHSEGMENT_TYPE_ENUM']._serialized_start=26015 + _globals['_BGPASPATHSEGMENT_TYPE_ENUM']._serialized_end=26100 + _globals['_BGPV4EVPNEVIS']._serialized_start=26112 + _globals['_BGPV4EVPNEVIS']._serialized_end=26280 + _globals['_BGPV4EVPNEVIS_CHOICE']._serialized_start=26221 + _globals['_BGPV4EVPNEVIS_CHOICE']._serialized_end=26269 + _globals['_BGPV4EVPNEVIS_CHOICE_ENUM']._serialized_start=26231 + _globals['_BGPV4EVPNEVIS_CHOICE_ENUM']._serialized_end=26269 + _globals['_BGPV4EVIVXLAN']._serialized_start=26283 + _globals['_BGPV4EVIVXLAN']._serialized_end=27022 + _globals['_BGPV4EVIVXLAN_REPLICATIONTYPE']._serialized_start=26906 + _globals['_BGPV4EVIVXLAN_REPLICATIONTYPE']._serialized_end=26973 + _globals['_BGPV4EVIVXLAN_REPLICATIONTYPE_ENUM']._serialized_start=26925 + _globals['_BGPV4EVIVXLAN_REPLICATIONTYPE_ENUM']._serialized_end=26973 + _globals['_BGPV4EVIVXLANBROADCASTDOMAIN']._serialized_start=27025 + _globals['_BGPV4EVIVXLANBROADCASTDOMAIN']._serialized_end=27205 + _globals['_BGPCMACIPRANGE']._serialized_start=27208 + _globals['_BGPCMACIPRANGE']._serialized_end=27674 + _globals['_BGPROUTEDISTINGUISHER']._serialized_start=27677 + _globals['_BGPROUTEDISTINGUISHER']._serialized_end=27957 + _globals['_BGPROUTEDISTINGUISHER_RDTYPE']._serialized_start=27824 + _globals['_BGPROUTEDISTINGUISHER_RDTYPE']._serialized_end=27905 + _globals['_BGPROUTEDISTINGUISHER_RDTYPE_ENUM']._serialized_start=27834 + _globals['_BGPROUTEDISTINGUISHER_RDTYPE_ENUM']._serialized_end=27905 + _globals['_BGPROUTETARGET']._serialized_start=27960 + _globals['_BGPROUTETARGET']._serialized_end=28162 + _globals['_BGPROUTETARGET_RTTYPE']._serialized_start=28056 + _globals['_BGPROUTETARGET_RTTYPE']._serialized_end=28137 + _globals['_BGPROUTETARGET_RTTYPE_ENUM']._serialized_start=27834 + _globals['_BGPROUTETARGET_RTTYPE_ENUM']._serialized_end=27905 + _globals['_BGPADVANCED']._serialized_start=28165 + _globals['_BGPADVANCED']._serialized_end=28552 + _globals['_BGPCAPABILITY']._serialized_start=28555 + _globals['_BGPCAPABILITY']._serialized_end=29852 + _globals['_BGPLEARNEDINFORMATIONFILTER']._serialized_start=29855 + _globals['_BGPLEARNEDINFORMATIONFILTER']._serialized_end=30000 + _globals['_BGPV4ROUTERANGE']._serialized_start=30003 + _globals['_BGPV4ROUTERANGE']._serialized_end=30791 + _globals['_BGPV4ROUTERANGE_NEXTHOPMODE']._serialized_start=30555 + _globals['_BGPV4ROUTERANGE_NEXTHOPMODE']._serialized_end=30619 + _globals['_BGPV4ROUTERANGE_NEXTHOPMODE_ENUM']._serialized_start=30570 + _globals['_BGPV4ROUTERANGE_NEXTHOPMODE_ENUM']._serialized_end=30619 + _globals['_BGPV4ROUTERANGE_NEXTHOPADDRESSTYPE']._serialized_start=30621 + _globals['_BGPV4ROUTERANGE_NEXTHOPADDRESSTYPE']._serialized_end=30686 + _globals['_BGPV4ROUTERANGE_NEXTHOPADDRESSTYPE_ENUM']._serialized_start=30643 + _globals['_BGPV4ROUTERANGE_NEXTHOPADDRESSTYPE_ENUM']._serialized_end=30686 + _globals['_BGPADDPATH']._serialized_start=30793 + _globals['_BGPADDPATH']._serialized_end=30839 + _globals['_BGPEXTENDEDCOMMUNITY']._serialized_start=30842 + _globals['_BGPEXTENDEDCOMMUNITY']._serialized_end=31725 + _globals['_BGPEXTENDEDCOMMUNITY_CHOICE']._serialized_start=31483 + _globals['_BGPEXTENDEDCOMMUNITY_CHOICE']._serialized_end=31714 + _globals['_BGPEXTENDEDCOMMUNITY_CHOICE_ENUM']._serialized_start=31494 + _globals['_BGPEXTENDEDCOMMUNITY_CHOICE_ENUM']._serialized_end=31714 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPEROUTETARGET']._serialized_start=31728 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPEROUTETARGET']._serialized_end=31887 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPEROUTEORIGIN']._serialized_start=31890 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPEROUTEORIGIN']._serialized_end=32049 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE']._serialized_start=32052 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE']._serialized_end=32456 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE_CHOICE']._serialized_start=32360 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE_CHOICE']._serialized_end=32445 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE_CHOICE_ENUM']._serialized_start=32370 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE_CHOICE_ENUM']._serialized_end=32445 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPEROUTEORIGIN']._serialized_start=32459 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPEROUTEORIGIN']._serialized_end=32625 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPEROUTETARGET']._serialized_start=32628 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPEROUTETARGET']._serialized_end=32794 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE']._serialized_start=32797 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE']._serialized_end=33213 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE_CHOICE']._serialized_start=32360 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE_CHOICE']._serialized_end=32445 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE_CHOICE_ENUM']._serialized_start=32370 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE_CHOICE_ENUM']._serialized_end=32445 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPEROUTETARGET']._serialized_start=33216 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPEROUTETARGET']._serialized_end=33375 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPEROUTEORIGIN']._serialized_start=33378 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPEROUTEORIGIN']._serialized_end=33537 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE']._serialized_start=33540 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE']._serialized_end=33944 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE_CHOICE']._serialized_start=32360 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE_CHOICE']._serialized_end=32445 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE_CHOICE_ENUM']._serialized_start=32370 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE_CHOICE_ENUM']._serialized_end=32445 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPECOLOR']._serialized_start=33946 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPECOLOR']._serialized_end=34053 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPEENCAPSULATION']._serialized_start=34056 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPEENCAPSULATION']._serialized_end=34189 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE']._serialized_start=34192 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE']._serialized_end=34572 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE_CHOICE']._serialized_start=34482 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE_CHOICE']._serialized_end=34561 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE_CHOICE_ENUM']._serialized_start=34492 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE_CHOICE_ENUM']._serialized_end=34561 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPEROUTERMAC']._serialized_start=34574 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPEROUTERMAC']._serialized_end=34663 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPE']._serialized_start=34666 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPE']._serialized_end=34936 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPE_CHOICE']._serialized_start=34868 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPE_CHOICE']._serialized_end=34925 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPE_CHOICE_ENUM']._serialized_start=34878 + _globals['_BGPEXTENDEDCOMMUNITYTRANSITIVEEVPNTYPE_CHOICE_ENUM']._serialized_end=34925 + _globals['_BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPELINKBANDWIDTH']._serialized_start=34939 + _globals['_BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPELINKBANDWIDTH']._serialized_end=35087 + _globals['_BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE']._serialized_start=35090 + _globals['_BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE']._serialized_end=35393 + _globals['_BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE_CHOICE']._serialized_start=35321 + _globals['_BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE_CHOICE']._serialized_end=35382 + _globals['_BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE_CHOICE_ENUM']._serialized_start=35331 + _globals['_BGPEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE_CHOICE_ENUM']._serialized_end=35382 + _globals['_BGPEXTENDEDCOMMUNITYCUSTOMTYPE']._serialized_start=35396 + _globals['_BGPEXTENDEDCOMMUNITYCUSTOMTYPE']._serialized_end=35560 + _globals['_BGPV6ROUTERANGE']._serialized_start=35563 + _globals['_BGPV6ROUTERANGE']._serialized_end=36351 + _globals['_BGPV6ROUTERANGE_NEXTHOPMODE']._serialized_start=30555 + _globals['_BGPV6ROUTERANGE_NEXTHOPMODE']._serialized_end=30619 + _globals['_BGPV6ROUTERANGE_NEXTHOPMODE_ENUM']._serialized_start=30570 + _globals['_BGPV6ROUTERANGE_NEXTHOPMODE_ENUM']._serialized_end=30619 + _globals['_BGPV6ROUTERANGE_NEXTHOPADDRESSTYPE']._serialized_start=30621 + _globals['_BGPV6ROUTERANGE_NEXTHOPADDRESSTYPE']._serialized_end=30686 + _globals['_BGPV6ROUTERANGE_NEXTHOPADDRESSTYPE_ENUM']._serialized_start=30643 + _globals['_BGPV6ROUTERANGE_NEXTHOPADDRESSTYPE_ENUM']._serialized_end=30686 + _globals['_BGPSRTEV4POLICY']._serialized_start=36354 + _globals['_BGPSRTEV4POLICY']._serialized_end=37245 + _globals['_BGPSRTEV4POLICY_NEXTHOPMODE']._serialized_start=30555 + _globals['_BGPSRTEV4POLICY_NEXTHOPMODE']._serialized_end=30619 + _globals['_BGPSRTEV4POLICY_NEXTHOPMODE_ENUM']._serialized_start=30570 + _globals['_BGPSRTEV4POLICY_NEXTHOPMODE_ENUM']._serialized_end=30619 + _globals['_BGPSRTEV4POLICY_NEXTHOPADDRESSTYPE']._serialized_start=30621 + _globals['_BGPSRTEV4POLICY_NEXTHOPADDRESSTYPE']._serialized_end=30686 + _globals['_BGPSRTEV4POLICY_NEXTHOPADDRESSTYPE_ENUM']._serialized_start=30643 + _globals['_BGPSRTEV4POLICY_NEXTHOPADDRESSTYPE_ENUM']._serialized_end=30686 + _globals['_BGPSRTEV4TUNNELTLV']._serialized_start=37248 + _globals['_BGPSRTEV4TUNNELTLV']._serialized_end=37814 + _globals['_BGPSRTEREMOTEENDPOINTSUBTLV']._serialized_start=37817 + _globals['_BGPSRTEREMOTEENDPOINTSUBTLV']._serialized_end=38135 + _globals['_BGPSRTEREMOTEENDPOINTSUBTLV_ADDRESSFAMILY']._serialized_start=38008 + _globals['_BGPSRTEREMOTEENDPOINTSUBTLV_ADDRESSFAMILY']._serialized_end=38068 + _globals['_BGPSRTEREMOTEENDPOINTSUBTLV_ADDRESSFAMILY_ENUM']._serialized_start=30643 + _globals['_BGPSRTEREMOTEENDPOINTSUBTLV_ADDRESSFAMILY_ENUM']._serialized_end=30686 + _globals['_BGPSRTECOLORSUBTLV']._serialized_start=38137 + _globals['_BGPSRTECOLORSUBTLV']._serialized_end=38187 + _globals['_BGPSRTEBINDINGSUBTLV']._serialized_start=38190 + _globals['_BGPSRTEBINDINGSUBTLV']._serialized_end=38552 + _globals['_BGPSRTEBINDINGSUBTLV_BINDINGSIDTYPE']._serialized_start=38386 + _globals['_BGPSRTEBINDINGSUBTLV_BINDINGSIDTYPE']._serialized_end=38477 + _globals['_BGPSRTEBINDINGSUBTLV_BINDINGSIDTYPE_ENUM']._serialized_start=38404 + _globals['_BGPSRTEBINDINGSUBTLV_BINDINGSIDTYPE_ENUM']._serialized_end=38477 + _globals['_BGPSRTEPREFERENCESUBTLV']._serialized_start=38554 + _globals['_BGPSRTEPREFERENCESUBTLV']._serialized_end=38619 + _globals['_BGPSRTEPOLICYPRIORITYSUBTLV']._serialized_start=38621 + _globals['_BGPSRTEPOLICYPRIORITYSUBTLV']._serialized_end=38700 + _globals['_BGPSRTEPOLICYNAMESUBTLV']._serialized_start=38702 + _globals['_BGPSRTEPOLICYNAMESUBTLV']._serialized_end=38769 + _globals['_BGPSRTEEXPLICITNULLLABELPOLICYSUBTLV']._serialized_start=38772 + _globals['_BGPSRTEEXPLICITNULLLABELPOLICYSUBTLV']._serialized_end=39114 + _globals['_BGPSRTEEXPLICITNULLLABELPOLICYSUBTLV_EXPLICITNULLLABELPOLICY']._serialized_start=38926 + _globals['_BGPSRTEEXPLICITNULLLABELPOLICYSUBTLV_EXPLICITNULLLABELPOLICY']._serialized_end=39083 + _globals['_BGPSRTEEXPLICITNULLLABELPOLICYSUBTLV_EXPLICITNULLLABELPOLICY_ENUM']._serialized_start=38954 + _globals['_BGPSRTEEXPLICITNULLLABELPOLICYSUBTLV_EXPLICITNULLLABELPOLICY_ENUM']._serialized_end=39083 + _globals['_BGPSRTESEGMENTLIST']._serialized_start=39117 + _globals['_BGPSRTESEGMENTLIST']._serialized_end=39268 + _globals['_BGPSRTESEGMENT']._serialized_start=39271 + _globals['_BGPSRTESEGMENT']._serialized_end=40131 + _globals['_BGPSRTESEGMENT_SEGMENTTYPE']._serialized_start=39923 + _globals['_BGPSRTESEGMENT_SEGMENTTYPE']._serialized_end=40094 + _globals['_BGPSRTESEGMENT_SEGMENTTYPE_ENUM']._serialized_start=39939 + _globals['_BGPSRTESEGMENT_SEGMENTTYPE_ENUM']._serialized_end=40094 + _globals['_BGPSRTESRMPLSSID']._serialized_start=40134 + _globals['_BGPSRTESRMPLSSID']._serialized_end=40262 + _globals['_BGPSRTESRV6SIDENDPOINTBEHAVIORANDSTRUCTURE']._serialized_start=40265 + _globals['_BGPSRTESRV6SIDENDPOINTBEHAVIORANDSTRUCTURE']._serialized_end=40467 + _globals['_BGPSRTESEGMENTATYPESUBTLV']._serialized_start=40470 + _globals['_BGPSRTESEGMENTATYPESUBTLV']._serialized_end=40637 + _globals['_BGPSRTESEGMENTBTYPESUBTLV']._serialized_start=40640 + _globals['_BGPSRTESEGMENTBTYPESUBTLV']._serialized_end=40818 + _globals['_BGPSRTESEGMENTCTYPESUBTLV']._serialized_start=40821 + _globals['_BGPSRTESEGMENTCTYPESUBTLV']._serialized_end=41020 + _globals['_BGPSRTESEGMENTDTYPESUBTLV']._serialized_start=41023 + _globals['_BGPSRTESEGMENTDTYPESUBTLV']._serialized_end=41222 + _globals['_BGPSRTESEGMENTETYPESUBTLV']._serialized_start=41225 + _globals['_BGPSRTESEGMENTETYPESUBTLV']._serialized_end=41436 + _globals['_BGPSRTESEGMENTFTYPESUBTLV']._serialized_start=41439 + _globals['_BGPSRTESEGMENTFTYPESUBTLV']._serialized_end=41654 + _globals['_BGPSRTESEGMENTGTYPESUBTLV']._serialized_start=41657 + _globals['_BGPSRTESEGMENTGTYPESUBTLV']._serialized_end=42006 + _globals['_BGPSRTESEGMENTHTYPESUBTLV']._serialized_start=42009 + _globals['_BGPSRTESEGMENTHTYPESUBTLV']._serialized_end=42224 + _globals['_BGPSRTESEGMENTITYPESUBTLV']._serialized_start=42227 + _globals['_BGPSRTESEGMENTITYPESUBTLV']._serialized_end=42459 + _globals['_BGPSRTESEGMENTJTYPESUBTLV']._serialized_start=42462 + _globals['_BGPSRTESEGMENTJTYPESUBTLV']._serialized_end=42932 + _globals['_BGPSRTESEGMENTKTYPESUBTLV']._serialized_start=42935 + _globals['_BGPSRTESEGMENTKTYPESUBTLV']._serialized_end=43271 + _globals['_BGPSRTEV6POLICY']._serialized_start=43274 + _globals['_BGPSRTEV6POLICY']._serialized_end=44164 + _globals['_BGPSRTEV6POLICY_NEXTHOPMODE']._serialized_start=30555 + _globals['_BGPSRTEV6POLICY_NEXTHOPMODE']._serialized_end=30619 + _globals['_BGPSRTEV6POLICY_NEXTHOPMODE_ENUM']._serialized_start=30570 + _globals['_BGPSRTEV6POLICY_NEXTHOPMODE_ENUM']._serialized_end=30619 + _globals['_BGPSRTEV6POLICY_NEXTHOPADDRESSTYPE']._serialized_start=30621 + _globals['_BGPSRTEV6POLICY_NEXTHOPADDRESSTYPE']._serialized_end=30686 + _globals['_BGPSRTEV6POLICY_NEXTHOPADDRESSTYPE_ENUM']._serialized_start=30643 + _globals['_BGPSRTEV6POLICY_NEXTHOPADDRESSTYPE_ENUM']._serialized_end=30686 + _globals['_BGPSRTEV6TUNNELTLV']._serialized_start=44167 + _globals['_BGPSRTEV6TUNNELTLV']._serialized_end=44733 + _globals['_BGPGRACEFULRESTART']._serialized_start=44736 + _globals['_BGPGRACEFULRESTART']._serialized_end=44978 + _globals['_BGPUPDATEREPLAY']._serialized_start=44981 + _globals['_BGPUPDATEREPLAY']._serialized_end=45221 + _globals['_BGPUPDATEREPLAY_CHOICE']._serialized_start=45141 + _globals['_BGPUPDATEREPLAY_CHOICE']._serialized_end=45210 + _globals['_BGPUPDATEREPLAY_CHOICE_ENUM']._serialized_start=45151 + _globals['_BGPUPDATEREPLAY_CHOICE_ENUM']._serialized_end=45210 + _globals['_BGPRAWBYTES']._serialized_start=45223 + _globals['_BGPRAWBYTES']._serialized_end=45278 + _globals['_BGPONEUPDATEREPLAY']._serialized_start=45280 + _globals['_BGPONEUPDATEREPLAY']._serialized_end=45380 + _globals['_BGPSTRUCTUREDPDUS']._serialized_start=45382 + _globals['_BGPSTRUCTUREDPDUS']._serialized_end=45453 + _globals['_BGPONESTRUCTUREDUPDATEREPLAY']._serialized_start=45456 + _globals['_BGPONESTRUCTUREDUPDATEREPLAY']._serialized_end=45703 + _globals['_BGPONETRADITIONALNLRIPREFIX']._serialized_start=45706 + _globals['_BGPONETRADITIONALNLRIPREFIX']._serialized_end=45844 + _globals['_BGPONEIPV4NLRIPREFIX']._serialized_start=45847 + _globals['_BGPONEIPV4NLRIPREFIX']._serialized_end=45978 + _globals['_BGPONEIPV6NLRIPREFIX']._serialized_start=45981 + _globals['_BGPONEIPV6NLRIPREFIX']._serialized_end=46112 + _globals['_BGPNLRIPREFIXPATHID']._serialized_start=46114 + _globals['_BGPNLRIPREFIXPATHID']._serialized_end=46165 + _globals['_BGPIPV4SRPOLICYNLRIPREFIX']._serialized_start=46168 + _globals['_BGPIPV4SRPOLICYNLRIPREFIX']._serialized_end=46307 + _globals['_BGPIPV6SRPOLICYNLRIPREFIX']._serialized_start=46310 + _globals['_BGPIPV6SRPOLICYNLRIPREFIX']._serialized_end=46449 + _globals['_BGPATTRIBUTES']._serialized_start=46452 + _globals['_BGPATTRIBUTES']._serialized_end=47459 + _globals['_BGPATTRIBUTES_ORIGIN']._serialized_start=24575 + _globals['_BGPATTRIBUTES_ORIGIN']._serialized_end=24642 + _globals['_BGPATTRIBUTES_ORIGIN_ENUM']._serialized_start=24585 + _globals['_BGPATTRIBUTES_ORIGIN_ENUM']._serialized_end=24642 + _globals['_BGPATTRIBUTESOTHERATTRIBUTE']._serialized_start=47462 + _globals['_BGPATTRIBUTESOTHERATTRIBUTE']._serialized_end=47757 + _globals['_BGPATTRIBUTESASPATH']._serialized_start=47760 + _globals['_BGPATTRIBUTESASPATH']._serialized_end=48063 + _globals['_BGPATTRIBUTESASPATH_CHOICE']._serialized_start=47974 + _globals['_BGPATTRIBUTESASPATH_CHOICE']._serialized_end=48052 + _globals['_BGPATTRIBUTESASPATH_CHOICE_ENUM']._serialized_start=47984 + _globals['_BGPATTRIBUTESASPATH_CHOICE_ENUM']._serialized_end=48052 + _globals['_BGPATTRIBUTESASPATHFOURBYTEASPATH']._serialized_start=48065 + _globals['_BGPATTRIBUTESASPATHFOURBYTEASPATH']._serialized_end=48159 + _globals['_BGPATTRIBUTESFOURBYTEASPATHSEGMENT']._serialized_start=48162 + _globals['_BGPATTRIBUTESFOURBYTEASPATHSEGMENT']._serialized_end=48392 + _globals['_BGPATTRIBUTESFOURBYTEASPATHSEGMENT_TYPE']._serialized_start=26007 + _globals['_BGPATTRIBUTESFOURBYTEASPATHSEGMENT_TYPE']._serialized_end=26100 + _globals['_BGPATTRIBUTESFOURBYTEASPATHSEGMENT_TYPE_ENUM']._serialized_start=26015 + _globals['_BGPATTRIBUTESFOURBYTEASPATHSEGMENT_TYPE_ENUM']._serialized_end=26100 + _globals['_BGPATTRIBUTESASPATHTWOBYTEASPATH']._serialized_start=48394 + _globals['_BGPATTRIBUTESASPATHTWOBYTEASPATH']._serialized_end=48486 + _globals['_BGPATTRIBUTESTWOBYTEASPATHSEGMENT']._serialized_start=48489 + _globals['_BGPATTRIBUTESTWOBYTEASPATHSEGMENT']._serialized_end=48717 + _globals['_BGPATTRIBUTESTWOBYTEASPATHSEGMENT_TYPE']._serialized_start=26007 + _globals['_BGPATTRIBUTESTWOBYTEASPATHSEGMENT_TYPE']._serialized_end=26100 + _globals['_BGPATTRIBUTESTWOBYTEASPATHSEGMENT_TYPE_ENUM']._serialized_start=26015 + _globals['_BGPATTRIBUTESTWOBYTEASPATHSEGMENT_TYPE_ENUM']._serialized_end=26100 + _globals['_BGPATTRIBUTESAS4PATH']._serialized_start=48719 + _globals['_BGPATTRIBUTESAS4PATH']._serialized_end=48800 + _globals['_BGPATTRIBUTESAGGREGATOR']._serialized_start=48803 + _globals['_BGPATTRIBUTESAGGREGATOR']._serialized_end=49102 + _globals['_BGPATTRIBUTESAGGREGATOR_CHOICE']._serialized_start=48973 + _globals['_BGPATTRIBUTESAGGREGATOR_CHOICE']._serialized_end=49041 + _globals['_BGPATTRIBUTESAGGREGATOR_CHOICE_ENUM']._serialized_start=48983 + _globals['_BGPATTRIBUTESAGGREGATOR_CHOICE_ENUM']._serialized_end=49041 + _globals['_BGPATTRIBUTESAS4AGGREGATOR']._serialized_start=49104 + _globals['_BGPATTRIBUTESAS4AGGREGATOR']._serialized_end=49208 + _globals['_BGPATTRIBUTESCOMMUNITY']._serialized_start=49211 + _globals['_BGPATTRIBUTESCOMMUNITY']._serialized_end=49516 + _globals['_BGPATTRIBUTESCOMMUNITY_CHOICE']._serialized_start=49361 + _globals['_BGPATTRIBUTESCOMMUNITY_CHOICE']._serialized_end=49505 + _globals['_BGPATTRIBUTESCOMMUNITY_CHOICE_ENUM']._serialized_start=49372 + _globals['_BGPATTRIBUTESCOMMUNITY_CHOICE_ENUM']._serialized_end=49505 + _globals['_BGPATTRIBUTESCUSTOMCOMMUNITY']._serialized_start=49518 + _globals['_BGPATTRIBUTESCUSTOMCOMMUNITY']._serialized_end=49618 + _globals['_BGPATTRIBUTESNEXTHOP']._serialized_start=49621 + _globals['_BGPATTRIBUTESNEXTHOP']._serialized_end=49920 + _globals['_BGPATTRIBUTESNEXTHOP_CHOICE']._serialized_start=49814 + _globals['_BGPATTRIBUTESNEXTHOP_CHOICE']._serialized_end=49891 + _globals['_BGPATTRIBUTESNEXTHOP_CHOICE_ENUM']._serialized_start=49824 + _globals['_BGPATTRIBUTESNEXTHOP_CHOICE_ENUM']._serialized_end=49891 + _globals['_BGPATTRIBUTESNEXTHOPIPV6TWOADDRESSES']._serialized_start=49922 + _globals['_BGPATTRIBUTESNEXTHOPIPV6TWOADDRESSES']._serialized_end=50022 + _globals['_BGPATTRIBUTESMPREACHNLRI']._serialized_start=50025 + _globals['_BGPATTRIBUTESMPREACHNLRI']._serialized_end=50488 + _globals['_BGPATTRIBUTESMPREACHNLRI_CHOICE']._serialized_start=50370 + _globals['_BGPATTRIBUTESMPREACHNLRI_CHOICE']._serialized_end=50477 + _globals['_BGPATTRIBUTESMPREACHNLRI_CHOICE_ENUM']._serialized_start=50380 + _globals['_BGPATTRIBUTESMPREACHNLRI_CHOICE_ENUM']._serialized_end=50477 + _globals['_BGPATTRIBUTESMPUNREACHNLRI']._serialized_start=50491 + _globals['_BGPATTRIBUTESMPUNREACHNLRI']._serialized_end=50913 + _globals['_BGPATTRIBUTESMPUNREACHNLRI_CHOICE']._serialized_start=50370 + _globals['_BGPATTRIBUTESMPUNREACHNLRI_CHOICE']._serialized_end=50477 + _globals['_BGPATTRIBUTESMPUNREACHNLRI_CHOICE_ENUM']._serialized_start=50380 + _globals['_BGPATTRIBUTESMPUNREACHNLRI_CHOICE_ENUM']._serialized_end=50477 + _globals['_BGPATTRIBUTESMULTIEXITDISCRIMINATOR']._serialized_start=50915 + _globals['_BGPATTRIBUTESMULTIEXITDISCRIMINATOR']._serialized_end=50982 + _globals['_BGPATTRIBUTESLOCALPREFERENCE']._serialized_start=50984 + _globals['_BGPATTRIBUTESLOCALPREFERENCE']._serialized_end=51044 + _globals['_BGPATTRIBUTESORIGINATORID']._serialized_start=51046 + _globals['_BGPATTRIBUTESORIGINATORID']._serialized_end=51103 + _globals['_BGPATTRIBUTESTUNNELENCAPSULATION']._serialized_start=51106 + _globals['_BGPATTRIBUTESTUNNELENCAPSULATION']._serialized_end=51332 + _globals['_BGPATTRIBUTESTUNNELENCAPSULATION_CHOICE']._serialized_start=51273 + _globals['_BGPATTRIBUTESTUNNELENCAPSULATION_CHOICE']._serialized_end=51321 + _globals['_BGPATTRIBUTESTUNNELENCAPSULATION_CHOICE_ENUM']._serialized_start=51283 + _globals['_BGPATTRIBUTESTUNNELENCAPSULATION_CHOICE_ENUM']._serialized_end=51321 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICY']._serialized_start=51335 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICY']._serialized_end=51891 + _globals['_BGPATTRIBUTESBSID']._serialized_start=51894 + _globals['_BGPATTRIBUTESBSID']._serialized_end=52120 + _globals['_BGPATTRIBUTESBSID_CHOICE']._serialized_start=52056 + _globals['_BGPATTRIBUTESBSID_CHOICE']._serialized_end=52109 + _globals['_BGPATTRIBUTESBSID_CHOICE_ENUM']._serialized_start=52066 + _globals['_BGPATTRIBUTESBSID_CHOICE_ENUM']._serialized_end=52109 + _globals['_BGPATTRIBUTESBSIDMPLS']._serialized_start=52123 + _globals['_BGPATTRIBUTESBSIDMPLS']._serialized_end=52323 + _globals['_BGPATTRIBUTESBSIDSRV6']._serialized_start=52326 + _globals['_BGPATTRIBUTESBSIDSRV6']._serialized_end=52519 + _globals['_BGPATTRIBUTESSRV6BSID']._serialized_start=52522 + _globals['_BGPATTRIBUTESSRV6BSID']._serialized_end=52896 + _globals['_BGPATTRIBUTESSIDMPLS']._serialized_start=52899 + _globals['_BGPATTRIBUTESSIDMPLS']._serialized_end=53059 + _globals['_BGPATTRIBUTESSIDSRV6']._serialized_start=53061 + _globals['_BGPATTRIBUTESSIDSRV6']._serialized_end=53107 + _globals['_BGPATTRIBUTESSRPOLICYPREFERENCE']._serialized_start=53109 + _globals['_BGPATTRIBUTESSRPOLICYPREFERENCE']._serialized_end=53172 + _globals['_BGPATTRIBUTESSRPOLICYPRIORITY']._serialized_start=53174 + _globals['_BGPATTRIBUTESSRPOLICYPRIORITY']._serialized_end=53235 + _globals['_BGPATTRIBUTESSRPOLICYPOLICYCANDIDATENAME']._serialized_start=53237 + _globals['_BGPATTRIBUTESSRPOLICYPOLICYCANDIDATENAME']._serialized_end=53309 + _globals['_BGPATTRIBUTESSRPOLICYPOLICYNAME']._serialized_start=53311 + _globals['_BGPATTRIBUTESSRPOLICYPOLICYNAME']._serialized_end=53374 + _globals['_BGPATTRIBUTESSRPOLICYEXPLICITNULLPOLICY']._serialized_start=53377 + _globals['_BGPATTRIBUTESSRPOLICYEXPLICITNULLPOLICY']._serialized_end=53626 + _globals['_BGPATTRIBUTESSRPOLICYEXPLICITNULLPOLICY_CHOICE']._serialized_start=53499 + _globals['_BGPATTRIBUTESSRPOLICYEXPLICITNULLPOLICY_CHOICE']._serialized_end=53615 + _globals['_BGPATTRIBUTESSRPOLICYEXPLICITNULLPOLICY_CHOICE_ENUM']._serialized_start=53509 + _globals['_BGPATTRIBUTESSRPOLICYEXPLICITNULLPOLICY_CHOICE_ENUM']._serialized_end=53615 + _globals['_BGPATTRIBUTESSRPOLICYSEGMENTLIST']._serialized_start=53629 + _globals['_BGPATTRIBUTESSRPOLICYSEGMENTLIST']._serialized_end=53812 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYSEGMENTLISTWEIGHT']._serialized_start=53814 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYSEGMENTLISTWEIGHT']._serialized_end=53896 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYSEGMENTLISTSEGMENT']._serialized_start=53899 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYSEGMENTLISTSEGMENT']._serialized_end=54894 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYSEGMENTLISTSEGMENT_CHOICE']._serialized_start=54717 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYSEGMENTLISTSEGMENT_CHOICE']._serialized_end=54883 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYSEGMENTLISTSEGMENT_CHOICE_ENUM']._serialized_start=39939 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYSEGMENTLISTSEGMENT_CHOICE_ENUM']._serialized_end=40094 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEA']._serialized_start=54897 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEA']._serialized_end=55046 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEB']._serialized_start=55049 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEB']._serialized_end=55296 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEC']._serialized_start=55299 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEC']._serialized_end=55549 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPED']._serialized_start=55552 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPED']._serialized_end=55802 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEE']._serialized_start=55805 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEE']._serialized_end=56067 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEF']._serialized_start=56070 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEF']._serialized_end=56336 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEG']._serialized_start=56339 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEG']._serialized_end=56739 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEH']._serialized_start=56742 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEH']._serialized_end=57008 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEI']._serialized_start=57011 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEI']._serialized_end=57365 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEJ']._serialized_start=57368 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEJ']._serialized_end=57916 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEK']._serialized_start=57919 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEK']._serialized_end=58333 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEFLAGS']._serialized_start=58336 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYTYPEFLAGS']._serialized_end=58508 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYSRV6SIDENDPOINTBEHAVIORANDSTRUCTURE']._serialized_start=58511 + _globals['_BGPATTRIBUTESSEGMENTROUTINGPOLICYSRV6SIDENDPOINTBEHAVIORANDSTRUCTURE']._serialized_end=58795 + _globals['_BGPNLRIPREFIXSEGMENTROUTINGDISTINGUISHER']._serialized_start=58797 + _globals['_BGPNLRIPREFIXSEGMENTROUTINGDISTINGUISHER']._serialized_end=58869 + _globals['_BGPV6PEER']._serialized_start=58872 + _globals['_BGPV6PEER']._serialized_end=59787 + _globals['_BGPV6PEER_ASTYPE']._serialized_start=23459 + _globals['_BGPV6PEER_ASTYPE']._serialized_end=23512 + _globals['_BGPV6PEER_ASTYPE_ENUM']._serialized_start=23469 + _globals['_BGPV6PEER_ASTYPE_ENUM']._serialized_end=23512 + _globals['_BGPV6PEER_ASNUMBERWIDTH']._serialized_start=23514 + _globals['_BGPV6PEER_ASNUMBERWIDTH']._serialized_end=23573 + _globals['_BGPV6PEER_ASNUMBERWIDTH_ENUM']._serialized_start=23531 + _globals['_BGPV6PEER_ASNUMBERWIDTH_ENUM']._serialized_end=23573 + _globals['_BGPV6INTERFACE']._serialized_start=59789 + _globals['_BGPV6INTERFACE']._serialized_end=59874 + _globals['_BGPV6SEGMENTROUTING']._serialized_start=59877 + _globals['_BGPV6SEGMENTROUTING']._serialized_end=60374 + _globals['_BGPV6ETHERNETSEGMENT']._serialized_start=60377 + _globals['_BGPV6ETHERNETSEGMENT']._serialized_end=60873 + _globals['_BGPV6ETHERNETSEGMENT_ACTIVEMODE']._serialized_start=24121 + _globals['_BGPV6ETHERNETSEGMENT_ACTIVEMODE']._serialized_end=24193 + _globals['_BGPV6ETHERNETSEGMENT_ACTIVEMODE_ENUM']._serialized_start=24135 + _globals['_BGPV6ETHERNETSEGMENT_ACTIVEMODE_ENUM']._serialized_end=24193 + _globals['_BGPV6EVPNEVIS']._serialized_start=60876 + _globals['_BGPV6EVPNEVIS']._serialized_end=61044 + _globals['_BGPV6EVPNEVIS_CHOICE']._serialized_start=26221 + _globals['_BGPV6EVPNEVIS_CHOICE']._serialized_end=26269 + _globals['_BGPV6EVPNEVIS_CHOICE_ENUM']._serialized_start=26231 + _globals['_BGPV6EVPNEVIS_CHOICE_ENUM']._serialized_end=26269 + _globals['_BGPV6EVIVXLAN']._serialized_start=61047 + _globals['_BGPV6EVIVXLAN']._serialized_end=61786 + _globals['_BGPV6EVIVXLAN_REPLICATIONTYPE']._serialized_start=26906 + _globals['_BGPV6EVIVXLAN_REPLICATIONTYPE']._serialized_end=26973 + _globals['_BGPV6EVIVXLAN_REPLICATIONTYPE_ENUM']._serialized_start=26925 + _globals['_BGPV6EVIVXLAN_REPLICATIONTYPE_ENUM']._serialized_end=26973 + _globals['_BGPV6EVIVXLANBROADCASTDOMAIN']._serialized_start=61789 + _globals['_BGPV6EVIVXLANBROADCASTDOMAIN']._serialized_end=61969 + _globals['_DEVICEVXLAN']._serialized_start=61971 + _globals['_DEVICEVXLAN']._serialized_end=62064 + _globals['_VXLANV4TUNNEL']._serialized_start=62067 + _globals['_VXLANV4TUNNEL']._serialized_end=62254 + _globals['_VXLANV6TUNNEL']._serialized_start=62257 + _globals['_VXLANV6TUNNEL']._serialized_end=62444 + _globals['_VXLANV4TUNNELDESTINATIONIPMODE']._serialized_start=62447 + _globals['_VXLANV4TUNNELDESTINATIONIPMODE']._serialized_end=62749 + _globals['_VXLANV4TUNNELDESTINATIONIPMODE_CHOICE']._serialized_start=62677 + _globals['_VXLANV4TUNNELDESTINATIONIPMODE_CHOICE']._serialized_end=62738 + _globals['_VXLANV4TUNNELDESTINATIONIPMODE_CHOICE_ENUM']._serialized_start=62687 + _globals['_VXLANV4TUNNELDESTINATIONIPMODE_CHOICE_ENUM']._serialized_end=62738 + _globals['_VXLANV6TUNNELDESTINATIONIPMODE']._serialized_start=62752 + _globals['_VXLANV6TUNNELDESTINATIONIPMODE']._serialized_end=63054 + _globals['_VXLANV6TUNNELDESTINATIONIPMODE_CHOICE']._serialized_start=62677 + _globals['_VXLANV6TUNNELDESTINATIONIPMODE_CHOICE']._serialized_end=62738 + _globals['_VXLANV6TUNNELDESTINATIONIPMODE_CHOICE_ENUM']._serialized_start=62687 + _globals['_VXLANV6TUNNELDESTINATIONIPMODE_CHOICE_ENUM']._serialized_end=62738 + _globals['_VXLANV4TUNNELDESTINATIONIPMODEUNICAST']._serialized_start=63056 + _globals['_VXLANV4TUNNELDESTINATIONIPMODEUNICAST']._serialized_end=63158 + _globals['_VXLANV6TUNNELDESTINATIONIPMODEUNICAST']._serialized_start=63160 + _globals['_VXLANV6TUNNELDESTINATIONIPMODEUNICAST']._serialized_end=63262 + _globals['_VXLANTUNNELDESTINATIONIPMODEUNICASTARPSUPPRESSIONCACHE']._serialized_start=63265 + _globals['_VXLANTUNNELDESTINATIONIPMODEUNICASTARPSUPPRESSIONCACHE']._serialized_end=63415 + _globals['_VXLANV4TUNNELDESTINATIONIPMODEUNICASTVTEP']._serialized_start=63418 + _globals['_VXLANV4TUNNELDESTINATIONIPMODEUNICASTVTEP']._serialized_end=63611 + _globals['_VXLANV6TUNNELDESTINATIONIPMODEUNICASTVTEP']._serialized_start=63614 + _globals['_VXLANV6TUNNELDESTINATIONIPMODEUNICASTVTEP']._serialized_end=63807 + _globals['_VXLANV4TUNNELDESTINATIONIPMODEMULTICAST']._serialized_start=63809 + _globals['_VXLANV4TUNNELDESTINATIONIPMODEMULTICAST']._serialized_end=63884 + _globals['_VXLANV6TUNNELDESTINATIONIPMODEMULTICAST']._serialized_start=63886 + _globals['_VXLANV6TUNNELDESTINATIONIPMODEMULTICAST']._serialized_end=63961 + _globals['_DEVICERSVP']._serialized_start=63964 + _globals['_DEVICERSVP']._serialized_end=64109 + _globals['_RSVPIPV4INTERFACE']._serialized_start=64112 + _globals['_RSVPIPV4INTERFACE']._serialized_end=64693 + _globals['_RSVPLSPIPV4INTERFACE']._serialized_start=64696 + _globals['_RSVPLSPIPV4INTERFACE']._serialized_end=64904 + _globals['_RSVPLSPIPV4INTERFACEP2PEGRESSIPV4LSP']._serialized_start=64907 + _globals['_RSVPLSPIPV4INTERFACEP2PEGRESSIPV4LSP']._serialized_end=65404 + _globals['_RSVPLSPIPV4INTERFACEP2PEGRESSIPV4LSP_RESERVATIONSTYLE']._serialized_start=65192 + _globals['_RSVPLSPIPV4INTERFACEP2PEGRESSIPV4LSP_RESERVATIONSTYLE']._serialized_end=65284 + _globals['_RSVPLSPIPV4INTERFACEP2PEGRESSIPV4LSP_RESERVATIONSTYLE_ENUM']._serialized_start=65212 + _globals['_RSVPLSPIPV4INTERFACEP2PEGRESSIPV4LSP_RESERVATIONSTYLE_ENUM']._serialized_end=65284 + _globals['_RSVPLSPIPV4INTERFACEP2PINGRESSIPV4LSP']._serialized_start=65407 + _globals['_RSVPLSPIPV4INTERFACEP2PINGRESSIPV4LSP']._serialized_end=65962 + _globals['_RSVPSESSIONATTRIBUTE']._serialized_start=65965 + _globals['_RSVPSESSIONATTRIBUTE']._serialized_end=66589 + _globals['_RSVPRESOURCEAFFINITIES']._serialized_start=66592 + _globals['_RSVPRESOURCEAFFINITIES']._serialized_end=66742 + _globals['_RSVPTSPEC']._serialized_start=66745 + _globals['_RSVPTSPEC']._serialized_end=67032 + _globals['_RSVPFASTREROUTE']._serialized_start=67035 + _globals['_RSVPFASTREROUTE']._serialized_end=67490 + _globals['_RSVPERO']._serialized_start=67493 + _globals['_RSVPERO']._serialized_end=67789 + _globals['_RSVPERO_PREPENDNEIGHBORIP']._serialized_start=67646 + _globals['_RSVPERO_PREPENDNEIGHBORIP']._serialized_end=67747 + _globals['_RSVPERO_PREPENDNEIGHBORIP_ENUM']._serialized_start=67667 + _globals['_RSVPERO_PREPENDNEIGHBORIP_ENUM']._serialized_end=67747 + _globals['_RSVPEROSUBOBJECT']._serialized_start=67792 + _globals['_RSVPEROSUBOBJECT']._serialized_end=68188 + _globals['_RSVPEROSUBOBJECT_TYPE']._serialized_start=68002 + _globals['_RSVPEROSUBOBJECT_TYPE']._serialized_end=68058 + _globals['_RSVPEROSUBOBJECT_TYPE_ENUM']._serialized_start=68010 + _globals['_RSVPEROSUBOBJECT_TYPE_ENUM']._serialized_end=68058 + _globals['_RSVPEROSUBOBJECT_HOPTYPE']._serialized_start=68060 + _globals['_RSVPEROSUBOBJECT_HOPTYPE']._serialized_end=68117 + _globals['_RSVPEROSUBOBJECT_HOPTYPE_ENUM']._serialized_start=68071 + _globals['_RSVPEROSUBOBJECT_HOPTYPE_ENUM']._serialized_end=68117 + _globals['_DEVICEDHCPSERVER']._serialized_start=68190 + _globals['_DEVICEDHCPSERVER']._serialized_end=68296 + _globals['_DHCPSERVERV4']._serialized_start=68298 + _globals['_DHCPSERVERV4']._serialized_end=68424 + _globals['_DHCPSERVERV4POOL']._serialized_start=68427 + _globals['_DHCPSERVERV4POOL']._serialized_end=68709 + _globals['_DHCPSERVERV4POOLOPTION']._serialized_start=68712 + _globals['_DHCPSERVERV4POOLOPTION']._serialized_end=68964 + _globals['_DHCPSERVERV6']._serialized_start=68967 + _globals['_DHCPSERVERV6']._serialized_end=69248 + _globals['_DHCPV6SERVEROPTIONS']._serialized_start=69251 + _globals['_DHCPV6SERVEROPTIONS']._serialized_end=69423 + _globals['_DHCPV6SERVERLEASE']._serialized_start=69425 + _globals['_DHCPV6SERVERLEASE']._serialized_end=69526 + _globals['_DHCPV6SERVERIATYPE']._serialized_start=69529 + _globals['_DHCPV6SERVERIATYPE']._serialized_end=69871 + _globals['_DHCPV6SERVERIATYPE_CHOICE']._serialized_start=5590 + _globals['_DHCPV6SERVERIATYPE_CHOICE']._serialized_end=5665 + _globals['_DHCPV6SERVERIATYPE_CHOICE_ENUM']._serialized_start=5600 + _globals['_DHCPV6SERVERIATYPE_CHOICE_ENUM']._serialized_end=5665 + _globals['_DHCPV6SERVERPOOLINFO']._serialized_start=69874 + _globals['_DHCPV6SERVERPOOLINFO']._serialized_end=70038 + _globals['_DHCPV6SERVERIAPDPOOLINFO']._serialized_start=70041 + _globals['_DHCPV6SERVERIAPDPOOLINFO']._serialized_end=70335 + _globals['_DHCPV6SERVERIANAPDPOOLINFO']._serialized_start=70337 + _globals['_DHCPV6SERVERIANAPDPOOLINFO']._serialized_end=70451 + _globals['_DHCPV6SERVERDNS']._serialized_start=70453 + _globals['_DHCPV6SERVERDNS']._serialized_end=70558 + _globals['_DHCPV6SERVERSECONDARYDNS']._serialized_start=70560 + _globals['_DHCPV6SERVERSECONDARYDNS']._serialized_end=70610 + _globals['_DEVICEOSPFV2ROUTER']._serialized_start=70613 + _globals['_DEVICEOSPFV2ROUTER']._serialized_end=71165 + _globals['_OSPFV2ROUTERID']._serialized_start=71168 + _globals['_OSPFV2ROUTERID']._serialized_end=71346 + _globals['_OSPFV2ROUTERID_CHOICE']._serialized_start=71261 + _globals['_OSPFV2ROUTERID_CHOICE']._serialized_end=71324 + _globals['_OSPFV2ROUTERID_CHOICE_ENUM']._serialized_start=71271 + _globals['_OSPFV2ROUTERID_CHOICE_ENUM']._serialized_end=71324 + _globals['_OSPFV2OPTIONS']._serialized_start=71349 + _globals['_OSPFV2OPTIONS']._serialized_end=71698 + _globals['_OSPFV2GRACEFULRESTART']._serialized_start=71700 + _globals['_OSPFV2GRACEFULRESTART']._serialized_end=71765 + _globals['_OSPFV2INTERFACE']._serialized_start=71768 + _globals['_OSPFV2INTERFACE']._serialized_end=72183 + _globals['_OSPFV2INTERFACEAREA']._serialized_start=72186 + _globals['_OSPFV2INTERFACEAREA']._serialized_end=72376 + _globals['_OSPFV2INTERFACEAREA_CHOICE']._serialized_start=72302 + _globals['_OSPFV2INTERFACEAREA_CHOICE']._serialized_end=72351 + _globals['_OSPFV2INTERFACEAREA_CHOICE_ENUM']._serialized_start=72312 + _globals['_OSPFV2INTERFACEAREA_CHOICE_ENUM']._serialized_end=72351 + _globals['_OSPFV2INTERFACENETWORKTYPE']._serialized_start=72379 + _globals['_OSPFV2INTERFACENETWORKTYPE']._serialized_end=72638 + _globals['_OSPFV2INTERFACENETWORKTYPE_CHOICE']._serialized_start=72534 + _globals['_OSPFV2INTERFACENETWORKTYPE_CHOICE']._serialized_end=72627 + _globals['_OSPFV2INTERFACENETWORKTYPE_CHOICE_ENUM']._serialized_start=72544 + _globals['_OSPFV2INTERFACENETWORKTYPE_CHOICE_ENUM']._serialized_end=72627 + _globals['_OSPFV2INTERFACENEIGHBOR']._serialized_start=72640 + _globals['_OSPFV2INTERFACENEIGHBOR']._serialized_end=72707 + _globals['_OSPFV2INTERFACEADVANCED']._serialized_start=72710 + _globals['_OSPFV2INTERFACEADVANCED']._serialized_end=72975 + _globals['_OSPFV2INTERFACEOPTIONS']._serialized_start=72978 + _globals['_OSPFV2INTERFACEOPTIONS']._serialized_end=73260 + _globals['_OSPFV2INTERFACEAUTHENTICATION']._serialized_start=73263 + _globals['_OSPFV2INTERFACEAUTHENTICATION']._serialized_end=73519 + _globals['_OSPFV2INTERFACEAUTHENTICATION_CHOICE']._serialized_start=73434 + _globals['_OSPFV2INTERFACEAUTHENTICATION_CHOICE']._serialized_end=73493 + _globals['_OSPFV2INTERFACEAUTHENTICATION_CHOICE_ENUM']._serialized_start=73444 + _globals['_OSPFV2INTERFACEAUTHENTICATION_CHOICE_ENUM']._serialized_end=73493 + _globals['_OSPFV2AUTHENTICATIONMD5']._serialized_start=73521 + _globals['_OSPFV2AUTHENTICATIONMD5']._serialized_end=73604 + _globals['_OSPFV2INTERFACELINKPROTECTION']._serialized_start=73607 + _globals['_OSPFV2INTERFACELINKPROTECTION']._serialized_end=73986 + _globals['_OSPFV2V4ROUTERANGE']._serialized_start=73989 + _globals['_OSPFV2V4ROUTERANGE']._serialized_end=74159 + _globals['_OSPFV2V4RRROUTEORIGIN']._serialized_start=74162 + _globals['_OSPFV2V4RRROUTEORIGIN']._serialized_end=74639 + _globals['_OSPFV2V4RRROUTEORIGIN_CHOICE']._serialized_start=74502 + _globals['_OSPFV2V4RRROUTEORIGIN_CHOICE']._serialized_end=74628 + _globals['_OSPFV2V4RRROUTEORIGIN_CHOICE_ENUM']._serialized_start=74512 + _globals['_OSPFV2V4RRROUTEORIGIN_CHOICE_ENUM']._serialized_end=74628 + _globals['_OSPFV2V4RRINTRAAREA']._serialized_start=74641 + _globals['_OSPFV2V4RRINTRAAREA']._serialized_end=74709 + _globals['_OSPFV2V4RRINTERAREA']._serialized_start=74711 + _globals['_OSPFV2V4RRINTERAREA']._serialized_end=74779 + _globals['_OSPFV2V4RREXTERNALTYPE1']._serialized_start=74781 + _globals['_OSPFV2V4RREXTERNALTYPE1']._serialized_end=74853 + _globals['_OSPFV2V4RREXTERNALTYPE2']._serialized_start=74855 + _globals['_OSPFV2V4RREXTERNALTYPE2']._serialized_end=74927 + _globals['_OSPFV2V4RRNSSAEXTERNAL']._serialized_start=74929 + _globals['_OSPFV2V4RRNSSAEXTERNAL']._serialized_end=75042 + _globals['_OSPFV2V4RREXTDPREFIXFLAGS']._serialized_start=75044 + _globals['_OSPFV2V4RREXTDPREFIXFLAGS']._serialized_end=75135 + _globals['_FLOW']._serialized_start=75138 + _globals['_FLOW']._serialized_end=75405 + _globals['_FLOWTXRX']._serialized_start=75408 + _globals['_FLOWTXRX']._serialized_end=75596 + _globals['_FLOWTXRX_CHOICE']._serialized_start=75530 + _globals['_FLOWTXRX_CHOICE']._serialized_end=75585 + _globals['_FLOWTXRX_CHOICE_ENUM']._serialized_start=75540 + _globals['_FLOWTXRX_CHOICE_ENUM']._serialized_end=75585 + _globals['_FLOWPORT']._serialized_start=75598 + _globals['_FLOWPORT']._serialized_end=75694 + _globals['_FLOWROUTER']._serialized_start=75697 + _globals['_FLOWROUTER']._serialized_end=75859 + _globals['_FLOWROUTER_MODE']._serialized_start=75793 + _globals['_FLOWROUTER_MODE']._serialized_end=75850 + _globals['_FLOWROUTER_MODE_ENUM']._serialized_start=75801 + _globals['_FLOWROUTER_MODE_ENUM']._serialized_end=75850 + _globals['_FLOWHEADER']._serialized_start=75862 + _globals['_FLOWHEADER']._serialized_end=76863 + _globals['_FLOWHEADER_CHOICE']._serialized_start=76584 + _globals['_FLOWHEADER_CHOICE']._serialized_end=76852 + _globals['_FLOWHEADER_CHOICE_ENUM']._serialized_start=76595 + _globals['_FLOWHEADER_CHOICE_ENUM']._serialized_end=76852 + _globals['_FLOWCUSTOM']._serialized_start=76865 + _globals['_FLOWCUSTOM']._serialized_end=76954 + _globals['_FLOWCUSTOMMETRICTAG']._serialized_start=76956 + _globals['_FLOWCUSTOMMETRICTAG']._serialized_end=77069 + _globals['_FLOWETHERNET']._serialized_start=77072 + _globals['_FLOWETHERNET']._serialized_end=77278 + _globals['_FLOWVLAN']._serialized_start=77281 + _globals['_FLOWVLAN']._serialized_end=77453 + _globals['_FLOWVXLAN']._serialized_start=77456 + _globals['_FLOWVXLAN']._serialized_end=77651 + _globals['_FLOWIPV4']._serialized_start=77654 + _globals['_FLOWIPV4']._serialized_end=78426 + _globals['_FLOWIPV4OPTIONS']._serialized_start=78429 + _globals['_FLOWIPV4OPTIONS']._serialized_end=78621 + _globals['_FLOWIPV4OPTIONS_CHOICE']._serialized_start=78547 + _globals['_FLOWIPV4OPTIONS_CHOICE']._serialized_end=78610 + _globals['_FLOWIPV4OPTIONS_CHOICE_ENUM']._serialized_start=78557 + _globals['_FLOWIPV4OPTIONS_CHOICE_ENUM']._serialized_end=78610 + _globals['_FLOWIPV4OPTIONSCUSTOM']._serialized_start=78624 + _globals['_FLOWIPV4OPTIONSCUSTOM']._serialized_end=78773 + _globals['_FLOWIPV4OPTIONSCUSTOMTYPE']._serialized_start=78776 + _globals['_FLOWIPV4OPTIONSCUSTOMTYPE']._serialized_end=79019 + _globals['_FLOWIPV4OPTIONSCUSTOMLENGTH']._serialized_start=79022 + _globals['_FLOWIPV4OPTIONSCUSTOMLENGTH']._serialized_end=79243 + _globals['_FLOWIPV4OPTIONSCUSTOMLENGTH_CHOICE']._serialized_start=3471 + _globals['_FLOWIPV4OPTIONSCUSTOMLENGTH_CHOICE']._serialized_end=3525 + _globals['_FLOWIPV4OPTIONSCUSTOMLENGTH_CHOICE_ENUM']._serialized_start=3481 + _globals['_FLOWIPV4OPTIONSCUSTOMLENGTH_CHOICE_ENUM']._serialized_end=3525 + _globals['_FLOWIPV4PRIORITY']._serialized_start=79246 + _globals['_FLOWIPV4PRIORITY']._serialized_end=79504 + _globals['_FLOWIPV4PRIORITY_CHOICE']._serialized_start=79432 + _globals['_FLOWIPV4PRIORITY_CHOICE']._serialized_end=79493 + _globals['_FLOWIPV4PRIORITY_CHOICE_ENUM']._serialized_start=79442 + _globals['_FLOWIPV4PRIORITY_CHOICE_ENUM']._serialized_end=79493 + _globals['_FLOWIPV4DSCP']._serialized_start=79506 + _globals['_FLOWIPV4DSCP']._serialized_end=79604 + _globals['_FLOWIPV4TOS']._serialized_start=79607 + _globals['_FLOWIPV4TOS']._serialized_end=79930 + _globals['_FLOWIPV4AUTO']._serialized_start=79932 + _globals['_FLOWIPV4AUTO']._serialized_end=80054 + _globals['_FLOWIPV4AUTO_CHOICE']._serialized_start=80000 + _globals['_FLOWIPV4AUTO_CHOICE']._serialized_end=80043 + _globals['_FLOWIPV4AUTO_CHOICE_ENUM']._serialized_start=80010 + _globals['_FLOWIPV4AUTO_CHOICE_ENUM']._serialized_end=80043 + _globals['_FLOWIPV6']._serialized_start=80057 + _globals['_FLOWIPV6']._serialized_end=80458 + _globals['_FLOWIPV6AUTO']._serialized_start=80460 + _globals['_FLOWIPV6AUTO']._serialized_end=80582 + _globals['_FLOWIPV6AUTO_CHOICE']._serialized_start=80000 + _globals['_FLOWIPV6AUTO_CHOICE']._serialized_end=80043 + _globals['_FLOWIPV6AUTO_CHOICE_ENUM']._serialized_start=80010 + _globals['_FLOWIPV6AUTO_CHOICE_ENUM']._serialized_end=80043 + _globals['_FLOWPFCPAUSE']._serialized_start=80585 + _globals['_FLOWPFCPAUSE']._serialized_end=81354 + _globals['_FLOWETHERNETPAUSE']._serialized_start=81357 + _globals['_FLOWETHERNETPAUSE']._serialized_end=81648 + _globals['_FLOWTCP']._serialized_start=81651 + _globals['_FLOWTCP']._serialized_end=82378 + _globals['_FLOWUDP']._serialized_start=82381 + _globals['_FLOWUDP']._serialized_end=82572 + _globals['_FLOWGRE']._serialized_start=82575 + _globals['_FLOWGRE']._serialized_end=82883 + _globals['_FLOWGTPV1']._serialized_start=82886 + _globals['_FLOWGTPV1']._serialized_end=83589 + _globals['_FLOWGTPEXTENSION']._serialized_start=83592 + _globals['_FLOWGTPEXTENSION']._serialized_end=83817 + _globals['_FLOWGTPV2']._serialized_start=83820 + _globals['_FLOWGTPV2']._serialized_end=84303 + _globals['_FLOWARP']._serialized_start=84306 + _globals['_FLOWARP']._serialized_end=84872 + _globals['_FLOWICMP']._serialized_start=84875 + _globals['_FLOWICMP']._serialized_end=85022 + _globals['_FLOWICMP_CHOICE']._serialized_start=84968 + _globals['_FLOWICMP_CHOICE']._serialized_end=85011 + _globals['_FLOWICMP_CHOICE_ENUM']._serialized_start=84978 + _globals['_FLOWICMP_CHOICE_ENUM']._serialized_end=85011 + _globals['_FLOWICMPECHO']._serialized_start=85025 + _globals['_FLOWICMPECHO']._serialized_end=85300 + _globals['_FLOWICMPV6']._serialized_start=85303 + _globals['_FLOWICMPV6']._serialized_end=85456 + _globals['_FLOWICMPV6_CHOICE']._serialized_start=84968 + _globals['_FLOWICMPV6_CHOICE']._serialized_end=85011 + _globals['_FLOWICMPV6_CHOICE_ENUM']._serialized_start=84978 + _globals['_FLOWICMPV6_CHOICE_ENUM']._serialized_end=85011 + _globals['_FLOWICMPV6ECHO']._serialized_start=85459 + _globals['_FLOWICMPV6ECHO']._serialized_end=85746 + _globals['_FLOWPPP']._serialized_start=85749 + _globals['_FLOWPPP']._serialized_end=85904 + _globals['_FLOWIGMPV1']._serialized_start=85907 + _globals['_FLOWIGMPV1']._serialized_end=86164 + _globals['_FLOWMPLS']._serialized_start=86167 + _globals['_FLOWMPLS']._serialized_end=86390 + _globals['_FLOWSNMPV2C']._serialized_start=86393 + _globals['_FLOWSNMPV2C']._serialized_end=86529 + _globals['_FLOWSNMPV2CDATA']._serialized_start=86532 + _globals['_FLOWSNMPV2CDATA']._serialized_end=87138 + _globals['_FLOWSNMPV2CDATA_CHOICE']._serialized_start=86952 + _globals['_FLOWSNMPV2CDATA_CHOICE']._serialized_end=87127 + _globals['_FLOWSNMPV2CDATA_CHOICE_ENUM']._serialized_start=86963 + _globals['_FLOWSNMPV2CDATA_CHOICE_ENUM']._serialized_end=87127 + _globals['_FLOWSNMPV2CPDU']._serialized_start=87141 + _globals['_FLOWSNMPV2CPDU']._serialized_end=87800 + _globals['_FLOWSNMPV2CPDU_ERRORSTATUS']._serialized_start=87401 + _globals['_FLOWSNMPV2CPDU_ERRORSTATUS']._serialized_end=87783 + _globals['_FLOWSNMPV2CPDU_ERRORSTATUS_ENUM']._serialized_start=87417 + _globals['_FLOWSNMPV2CPDU_ERRORSTATUS_ENUM']._serialized_end=87783 + _globals['_FLOWSNMPV2CBULKPDU']._serialized_start=87803 + _globals['_FLOWSNMPV2CBULKPDU']._serialized_end=88082 + _globals['_FLOWSNMPV2CVARIABLEBINDING']._serialized_start=88085 + _globals['_FLOWSNMPV2CVARIABLEBINDING']._serialized_end=88220 + _globals['_FLOWSNMPV2CVARIABLEBINDINGVALUE']._serialized_start=88223 + _globals['_FLOWSNMPV2CVARIABLEBINDINGVALUE']._serialized_end=89284 + _globals['_FLOWSNMPV2CVARIABLEBINDINGVALUE_CHOICE']._serialized_start=88977 + _globals['_FLOWSNMPV2CVARIABLEBINDINGVALUE_CHOICE']._serialized_end=89225 + _globals['_FLOWSNMPV2CVARIABLEBINDINGVALUE_CHOICE_ENUM']._serialized_start=88988 + _globals['_FLOWSNMPV2CVARIABLEBINDINGVALUE_CHOICE_ENUM']._serialized_end=89225 + _globals['_FLOWSNMPV2CVARIABLEBINDINGSTRINGVALUE']._serialized_start=89287 + _globals['_FLOWSNMPV2CVARIABLEBINDINGSTRINGVALUE']._serialized_end=89525 + _globals['_FLOWSNMPV2CVARIABLEBINDINGSTRINGVALUE_CHOICE']._serialized_start=89443 + _globals['_FLOWSNMPV2CVARIABLEBINDINGSTRINGVALUE_CHOICE']._serialized_end=89496 + _globals['_FLOWSNMPV2CVARIABLEBINDINGSTRINGVALUE_CHOICE_ENUM']._serialized_start=89453 + _globals['_FLOWSNMPV2CVARIABLEBINDINGSTRINGVALUE_CHOICE_ENUM']._serialized_end=89496 + _globals['_FLOWRSVP']._serialized_start=89528 + _globals['_FLOWRSVP']._serialized_end=89969 + _globals['_FLOWRSVP_FLAG']._serialized_start=89851 + _globals['_FLOWRSVP_FLAG']._serialized_end=89948 + _globals['_FLOWRSVP_FLAG_ENUM']._serialized_start=89859 + _globals['_FLOWRSVP_FLAG_ENUM']._serialized_end=89948 + _globals['_FLOWRSVPLENGTH']._serialized_start=89972 + _globals['_FLOWRSVPLENGTH']._serialized_end=90167 + _globals['_FLOWRSVPLENGTH_CHOICE']._serialized_start=3471 + _globals['_FLOWRSVPLENGTH_CHOICE']._serialized_end=3525 + _globals['_FLOWRSVPLENGTH_CHOICE_ENUM']._serialized_start=3481 + _globals['_FLOWRSVPLENGTH_CHOICE_ENUM']._serialized_end=3525 + _globals['_FLOWRSVPMESSAGE']._serialized_start=90170 + _globals['_FLOWRSVPMESSAGE']._serialized_end=90338 + _globals['_FLOWRSVPMESSAGE_CHOICE']._serialized_start=90284 + _globals['_FLOWRSVPMESSAGE_CHOICE']._serialized_end=90327 + _globals['_FLOWRSVPMESSAGE_CHOICE_ENUM']._serialized_start=90294 + _globals['_FLOWRSVPMESSAGE_CHOICE_ENUM']._serialized_end=90327 + _globals['_FLOWRSVPPATHMESSAGE']._serialized_start=90340 + _globals['_FLOWRSVPPATHMESSAGE']._serialized_end=90404 + _globals['_FLOWRSVPPATHOBJECTS']._serialized_start=90406 + _globals['_FLOWRSVPPATHOBJECTS']._serialized_end=90477 + _globals['_FLOWRSVPOBJECTLENGTH']._serialized_start=90480 + _globals['_FLOWRSVPOBJECTLENGTH']._serialized_end=90687 + _globals['_FLOWRSVPOBJECTLENGTH_CHOICE']._serialized_start=3471 + _globals['_FLOWRSVPOBJECTLENGTH_CHOICE']._serialized_end=3525 + _globals['_FLOWRSVPOBJECTLENGTH_CHOICE_ENUM']._serialized_start=3481 + _globals['_FLOWRSVPOBJECTLENGTH_CHOICE_ENUM']._serialized_end=3525 + _globals['_FLOWRSVPPATHOBJECTSCLASS']._serialized_start=90690 + _globals['_FLOWRSVPPATHOBJECTSCLASS']._serialized_end=91630 + _globals['_FLOWRSVPPATHOBJECTSCLASS_CHOICE']._serialized_start=91410 + _globals['_FLOWRSVPPATHOBJECTSCLASS_CHOICE']._serialized_end=91619 + _globals['_FLOWRSVPPATHOBJECTSCLASS_CHOICE_ENUM']._serialized_start=91421 + _globals['_FLOWRSVPPATHOBJECTSCLASS_CHOICE_ENUM']._serialized_end=91619 + _globals['_FLOWRSVPPATHOBJECTSCLASSSESSION']._serialized_start=91633 + _globals['_FLOWRSVPPATHOBJECTSCLASSSESSION']._serialized_end=91763 + _globals['_FLOWRSVPPATHOBJECTSSESSIONCTYPE']._serialized_start=91766 + _globals['_FLOWRSVPPATHOBJECTSSESSIONCTYPE']._serialized_end=92001 + _globals['_FLOWRSVPPATHOBJECTSSESSIONCTYPE_CHOICE']._serialized_start=91936 + _globals['_FLOWRSVPPATHOBJECTSSESSIONCTYPE_CHOICE']._serialized_end=91990 + _globals['_FLOWRSVPPATHOBJECTSSESSIONCTYPE_CHOICE_ENUM']._serialized_start=91946 + _globals['_FLOWRSVPPATHOBJECTSSESSIONCTYPE_CHOICE_ENUM']._serialized_end=91990 + _globals['_FLOWRSVPPATHSESSIONLSPTUNNELIPV4']._serialized_start=92004 + _globals['_FLOWRSVPPATHSESSIONLSPTUNNELIPV4']._serialized_end=92358 + _globals['_FLOWRSVPPATHSESSIONEXTTUNNELID']._serialized_start=92361 + _globals['_FLOWRSVPPATHSESSIONEXTTUNNELID']._serialized_end=92678 + _globals['_FLOWRSVPPATHSESSIONEXTTUNNELID_CHOICE']._serialized_start=92605 + _globals['_FLOWRSVPPATHSESSIONEXTTUNNELID_CHOICE']._serialized_end=92667 + _globals['_FLOWRSVPPATHSESSIONEXTTUNNELID_CHOICE_ENUM']._serialized_start=92615 + _globals['_FLOWRSVPPATHSESSIONEXTTUNNELID_CHOICE_ENUM']._serialized_end=92667 + _globals['_FLOWRSVPPATHOBJECTSCLASSRSVPHOP']._serialized_start=92681 + _globals['_FLOWRSVPPATHOBJECTSCLASSRSVPHOP']._serialized_end=92811 + _globals['_FLOWRSVPPATHOBJECTSRSVPHOPCTYPE']._serialized_start=92814 + _globals['_FLOWRSVPPATHOBJECTSRSVPHOPCTYPE']._serialized_end=93018 + _globals['_FLOWRSVPPATHOBJECTSRSVPHOPCTYPE_CHOICE']._serialized_start=92964 + _globals['_FLOWRSVPPATHOBJECTSRSVPHOPCTYPE_CHOICE']._serialized_end=93007 + _globals['_FLOWRSVPPATHOBJECTSRSVPHOPCTYPE_CHOICE_ENUM']._serialized_start=30643 + _globals['_FLOWRSVPPATHOBJECTSRSVPHOPCTYPE_CHOICE_ENUM']._serialized_end=30676 + _globals['_FLOWRSVPPATHRSVPHOPIPV4']._serialized_start=93021 + _globals['_FLOWRSVPPATHRSVPHOPIPV4']._serialized_end=93209 + _globals['_FLOWRSVPPATHOBJECTSCLASSTIMEVALUES']._serialized_start=93212 + _globals['_FLOWRSVPPATHOBJECTSCLASSTIMEVALUES']._serialized_end=93348 + _globals['_FLOWRSVPPATHOBJECTSTIMEVALUESCTYPE']._serialized_start=93351 + _globals['_FLOWRSVPPATHOBJECTSTIMEVALUESCTYPE']._serialized_end=93569 + _globals['_FLOWRSVPPATHOBJECTSTIMEVALUESCTYPE_CHOICE']._serialized_start=93513 + _globals['_FLOWRSVPPATHOBJECTSTIMEVALUESCTYPE_CHOICE']._serialized_end=93558 + _globals['_FLOWRSVPPATHOBJECTSTIMEVALUESCTYPE_CHOICE_ENUM']._serialized_start=93523 + _globals['_FLOWRSVPPATHOBJECTSTIMEVALUESCTYPE_CHOICE_ENUM']._serialized_end=93558 + _globals['_FLOWRSVPPATHTIMEVALUESTYPE1']._serialized_start=93571 + _globals['_FLOWRSVPPATHTIMEVALUESTYPE1']._serialized_end=93681 + _globals['_FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTE']._serialized_start=93684 + _globals['_FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTE']._serialized_end=93831 + _globals['_FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTECTYPE']._serialized_start=93834 + _globals['_FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTECTYPE']._serialized_end=94071 + _globals['_FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTECTYPE_CHOICE']._serialized_start=93513 + _globals['_FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTECTYPE_CHOICE']._serialized_end=93558 + _globals['_FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTECTYPE_CHOICE_ENUM']._serialized_start=93523 + _globals['_FLOWRSVPPATHOBJECTSCLASSEXPLICITROUTECTYPE_CHOICE_ENUM']._serialized_end=93558 + _globals['_FLOWRSVPPATHEXPLICITROUTETYPE1']._serialized_start=94073 + _globals['_FLOWRSVPPATHEXPLICITROUTETYPE1']._serialized_end=94168 + _globals['_FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTS']._serialized_start=94170 + _globals['_FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTS']._serialized_end=94269 + _globals['_FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTSTYPE']._serialized_start=94272 + _globals['_FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTSTYPE']._serialized_end=94604 + _globals['_FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTSTYPE_CHOICE']._serialized_start=94528 + _globals['_FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTSTYPE_CHOICE']._serialized_end=94593 + _globals['_FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTSTYPE_CHOICE_ENUM']._serialized_start=94538 + _globals['_FLOWRSVPTYPE1EXPLICITROUTESUBOBJECTSTYPE_CHOICE_ENUM']._serialized_end=94593 + _globals['_FLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIX']._serialized_start=94607 + _globals['_FLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIX']._serialized_end=94891 + _globals['_FLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBER']._serialized_start=94894 + _globals['_FLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBER']._serialized_end=95101 + _globals['_FLOWRSVPEXPLICITROUTELENGTH']._serialized_start=95104 + _globals['_FLOWRSVPEXPLICITROUTELENGTH']._serialized_end=95325 + _globals['_FLOWRSVPEXPLICITROUTELENGTH_CHOICE']._serialized_start=3471 + _globals['_FLOWRSVPEXPLICITROUTELENGTH_CHOICE']._serialized_end=3525 + _globals['_FLOWRSVPEXPLICITROUTELENGTH_CHOICE_ENUM']._serialized_start=3481 + _globals['_FLOWRSVPEXPLICITROUTELENGTH_CHOICE_ENUM']._serialized_end=3525 + _globals['_FLOWRSVPEXPLICITROUTEASNUMBERLENGTH']._serialized_start=95328 + _globals['_FLOWRSVPEXPLICITROUTEASNUMBERLENGTH']._serialized_end=95565 + _globals['_FLOWRSVPEXPLICITROUTEASNUMBERLENGTH_CHOICE']._serialized_start=3471 + _globals['_FLOWRSVPEXPLICITROUTEASNUMBERLENGTH_CHOICE']._serialized_end=3525 + _globals['_FLOWRSVPEXPLICITROUTEASNUMBERLENGTH_CHOICE_ENUM']._serialized_start=3481 + _globals['_FLOWRSVPEXPLICITROUTEASNUMBERLENGTH_CHOICE_ENUM']._serialized_end=3525 + _globals['_FLOWRSVPPATHOBJECTSCLASSLABELREQUEST']._serialized_start=95568 + _globals['_FLOWRSVPPATHOBJECTSCLASSLABELREQUEST']._serialized_end=95708 + _globals['_FLOWRSVPPATHOBJECTSLABELREQUESTCTYPE']._serialized_start=95711 + _globals['_FLOWRSVPPATHOBJECTSLABELREQUESTCTYPE']._serialized_end=95973 + _globals['_FLOWRSVPPATHOBJECTSLABELREQUESTCTYPE_CHOICE']._serialized_start=95904 + _globals['_FLOWRSVPPATHOBJECTSLABELREQUESTCTYPE_CHOICE']._serialized_end=95962 + _globals['_FLOWRSVPPATHOBJECTSLABELREQUESTCTYPE_CHOICE_ENUM']._serialized_start=95914 + _globals['_FLOWRSVPPATHOBJECTSLABELREQUESTCTYPE_CHOICE_ENUM']._serialized_end=95962 + _globals['_FLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGE']._serialized_start=95976 + _globals['_FLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGE']._serialized_end=96175 + _globals['_FLOWRSVPPATHOBJECTSCLASSSESSIONATTRIBUTE']._serialized_start=96178 + _globals['_FLOWRSVPPATHOBJECTSCLASSSESSIONATTRIBUTE']._serialized_end=96326 + _globals['_FLOWRSVPPATHOBJECTSSESSIONATTRIBUTECTYPE']._serialized_start=96329 + _globals['_FLOWRSVPPATHOBJECTSSESSIONATTRIBUTECTYPE']._serialized_end=96665 + _globals['_FLOWRSVPPATHOBJECTSSESSIONATTRIBUTECTYPE_CHOICE']._serialized_start=96586 + _globals['_FLOWRSVPPATHOBJECTSSESSIONATTRIBUTECTYPE_CHOICE']._serialized_end=96654 + _globals['_FLOWRSVPPATHOBJECTSSESSIONATTRIBUTECTYPE_CHOICE_ENUM']._serialized_start=96596 + _globals['_FLOWRSVPPATHOBJECTSSESSIONATTRIBUTECTYPE_CHOICE_ENUM']._serialized_end=96654 + _globals['_FLOWRSVPPATHSESSIONATTRIBUTELSPTUNNEL']._serialized_start=96668 + _globals['_FLOWRSVPPATHSESSIONATTRIBUTELSPTUNNEL']._serialized_end=96956 + _globals['_FLOWRSVPPATHSESSIONATTRIBUTELSPTUNNELRA']._serialized_start=96959 + _globals['_FLOWRSVPPATHSESSIONATTRIBUTELSPTUNNELRA']._serialized_end=97375 + _globals['_FLOWRSVPLSPTUNNELFLAG']._serialized_start=97378 + _globals['_FLOWRSVPLSPTUNNELFLAG']._serialized_end=97589 + _globals['_FLOWRSVPLSPTUNNELFLAG_CHOICE']._serialized_start=97464 + _globals['_FLOWRSVPLSPTUNNELFLAG_CHOICE']._serialized_end=97578 + _globals['_FLOWRSVPLSPTUNNELFLAG_CHOICE_ENUM']._serialized_start=97474 + _globals['_FLOWRSVPLSPTUNNELFLAG_CHOICE_ENUM']._serialized_end=97578 + _globals['_FLOWRSVPSESSIONATTRIBUTENAMELENGTH']._serialized_start=97592 + _globals['_FLOWRSVPSESSIONATTRIBUTENAMELENGTH']._serialized_end=97827 + _globals['_FLOWRSVPSESSIONATTRIBUTENAMELENGTH_CHOICE']._serialized_start=3471 + _globals['_FLOWRSVPSESSIONATTRIBUTENAMELENGTH_CHOICE']._serialized_end=3525 + _globals['_FLOWRSVPSESSIONATTRIBUTENAMELENGTH_CHOICE_ENUM']._serialized_start=3481 + _globals['_FLOWRSVPSESSIONATTRIBUTENAMELENGTH_CHOICE_ENUM']._serialized_end=3525 + _globals['_FLOWRSVPPATHOBJECTSCLASSSENDERTEMPLATE']._serialized_start=97830 + _globals['_FLOWRSVPPATHOBJECTSCLASSSENDERTEMPLATE']._serialized_end=97974 + _globals['_FLOWRSVPPATHOBJECTSSENDERTEMPLATECTYPE']._serialized_start=97977 + _globals['_FLOWRSVPPATHOBJECTSSENDERTEMPLATECTYPE']._serialized_end=98233 + _globals['_FLOWRSVPPATHOBJECTSSENDERTEMPLATECTYPE_CHOICE']._serialized_start=91936 + _globals['_FLOWRSVPPATHOBJECTSSENDERTEMPLATECTYPE_CHOICE']._serialized_end=91990 + _globals['_FLOWRSVPPATHOBJECTSSENDERTEMPLATECTYPE_CHOICE_ENUM']._serialized_start=91946 + _globals['_FLOWRSVPPATHOBJECTSSENDERTEMPLATECTYPE_CHOICE_ENUM']._serialized_end=91990 + _globals['_FLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4']._serialized_start=98236 + _globals['_FLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4']._serialized_end=98542 + _globals['_FLOWRSVPPATHOBJECTSCLASSSENDERTSPEC']._serialized_start=98545 + _globals['_FLOWRSVPPATHOBJECTSCLASSSENDERTSPEC']._serialized_end=98683 + _globals['_FLOWRSVPPATHOBJECTSSENDERTSPECCTYPE']._serialized_start=98686 + _globals['_FLOWRSVPPATHOBJECTSSENDERTSPECCTYPE']._serialized_end=98913 + _globals['_FLOWRSVPPATHOBJECTSSENDERTSPECCTYPE_CHOICE']._serialized_start=98855 + _globals['_FLOWRSVPPATHOBJECTSSENDERTSPECCTYPE_CHOICE']._serialized_end=98902 + _globals['_FLOWRSVPPATHOBJECTSSENDERTSPECCTYPE_CHOICE_ENUM']._serialized_start=98865 + _globals['_FLOWRSVPPATHOBJECTSSENDERTSPECCTYPE_CHOICE_ENUM']._serialized_end=98902 + _globals['_FLOWRSVPPATHSENDERTSPECINTSERV']._serialized_start=98916 + _globals['_FLOWRSVPPATHSENDERTSPECINTSERV']._serialized_end=100116 + _globals['_FLOWRSVPPATHOBJECTSCLASSRECORDROUTE']._serialized_start=100119 + _globals['_FLOWRSVPPATHOBJECTSCLASSRECORDROUTE']._serialized_end=100257 + _globals['_FLOWRSVPPATHOBJECTSRECORDROUTECTYPE']._serialized_start=100260 + _globals['_FLOWRSVPPATHOBJECTSRECORDROUTECTYPE']._serialized_end=100481 + _globals['_FLOWRSVPPATHOBJECTSRECORDROUTECTYPE_CHOICE']._serialized_start=93513 + _globals['_FLOWRSVPPATHOBJECTSRECORDROUTECTYPE_CHOICE']._serialized_end=93558 + _globals['_FLOWRSVPPATHOBJECTSRECORDROUTECTYPE_CHOICE_ENUM']._serialized_start=93523 + _globals['_FLOWRSVPPATHOBJECTSRECORDROUTECTYPE_CHOICE_ENUM']._serialized_end=93558 + _globals['_FLOWRSVPPATHRECORDROUTETYPE1']._serialized_start=100483 + _globals['_FLOWRSVPPATHRECORDROUTETYPE1']._serialized_end=100574 + _globals['_FLOWRSVPTYPE1RECORDROUTESUBOBJECTS']._serialized_start=100576 + _globals['_FLOWRSVPTYPE1RECORDROUTESUBOBJECTS']._serialized_end=100676 + _globals['_FLOWRSVPPATHOBJECTSRECORDROUTESUBOBJECTTYPE']._serialized_start=100679 + _globals['_FLOWRSVPPATHOBJECTSRECORDROUTESUBOBJECTTYPE']._serialized_end=101005 + _globals['_FLOWRSVPPATHOBJECTSRECORDROUTESUBOBJECTTYPE_CHOICE']._serialized_start=100932 + _globals['_FLOWRSVPPATHOBJECTSRECORDROUTESUBOBJECTTYPE_CHOICE']._serialized_end=100994 + _globals['_FLOWRSVPPATHOBJECTSRECORDROUTESUBOBJECTTYPE_CHOICE_ENUM']._serialized_start=100942 + _globals['_FLOWRSVPPATHOBJECTSRECORDROUTESUBOBJECTTYPE_CHOICE_ENUM']._serialized_end=100994 + _globals['_FLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESS']._serialized_start=101008 + _globals['_FLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESS']._serialized_end=101320 + _globals['_FLOWRSVPRECORDROUTEIPV4FLAG']._serialized_start=101323 + _globals['_FLOWRSVPRECORDROUTEIPV4FLAG']._serialized_end=101526 + _globals['_FLOWRSVPRECORDROUTEIPV4FLAG_CHOICE']._serialized_start=101421 + _globals['_FLOWRSVPRECORDROUTEIPV4FLAG_CHOICE']._serialized_end=101515 + _globals['_FLOWRSVPRECORDROUTEIPV4FLAG_CHOICE_ENUM']._serialized_start=101431 + _globals['_FLOWRSVPRECORDROUTEIPV4FLAG_CHOICE_ENUM']._serialized_end=101515 + _globals['_FLOWRSVPPATHRECORDROUTETYPE1LABEL']._serialized_start=101529 + _globals['_FLOWRSVPPATHRECORDROUTETYPE1LABEL']._serialized_end=101797 + _globals['_FLOWRSVPPATHRECORDROUTELABEL']._serialized_start=101800 + _globals['_FLOWRSVPPATHRECORDROUTELABEL']._serialized_end=102044 + _globals['_FLOWRSVPPATHRECORDROUTELABEL_CHOICE']._serialized_start=101946 + _globals['_FLOWRSVPPATHRECORDROUTELABEL_CHOICE']._serialized_end=102007 + _globals['_FLOWRSVPPATHRECORDROUTELABEL_CHOICE_ENUM']._serialized_start=101956 + _globals['_FLOWRSVPPATHRECORDROUTELABEL_CHOICE_ENUM']._serialized_end=102007 + _globals['_FLOWRSVPROUTERECORDLENGTH']._serialized_start=102047 + _globals['_FLOWRSVPROUTERECORDLENGTH']._serialized_end=102264 + _globals['_FLOWRSVPROUTERECORDLENGTH_CHOICE']._serialized_start=3471 + _globals['_FLOWRSVPROUTERECORDLENGTH_CHOICE']._serialized_end=3525 + _globals['_FLOWRSVPROUTERECORDLENGTH_CHOICE_ENUM']._serialized_start=3481 + _globals['_FLOWRSVPROUTERECORDLENGTH_CHOICE_ENUM']._serialized_end=3525 + _globals['_FLOWRSVPPATHOBJECTSCUSTOM']._serialized_start=102267 + _globals['_FLOWRSVPPATHOBJECTSCUSTOM']._serialized_end=102424 + _globals['_FLOWSIZE']._serialized_start=102427 + _globals['_FLOWSIZE']._serialized_end=102745 + _globals['_FLOWSIZE_CHOICE']._serialized_start=102635 + _globals['_FLOWSIZE_CHOICE']._serialized_end=102724 + _globals['_FLOWSIZE_CHOICE_ENUM']._serialized_start=102645 + _globals['_FLOWSIZE_CHOICE_ENUM']._serialized_end=102724 + _globals['_FLOWSIZEINCREMENT']._serialized_start=102747 + _globals['_FLOWSIZEINCREMENT']._serialized_end=102850 + _globals['_FLOWSIZERANDOM']._serialized_start=102852 + _globals['_FLOWSIZERANDOM']._serialized_end=102920 + _globals['_FLOWSIZEWEIGHTPAIRS']._serialized_start=102923 + _globals['_FLOWSIZEWEIGHTPAIRS']._serialized_end=103320 + _globals['_FLOWSIZEWEIGHTPAIRS_CHOICE']._serialized_start=103120 + _globals['_FLOWSIZEWEIGHTPAIRS_CHOICE']._serialized_end=103181 + _globals['_FLOWSIZEWEIGHTPAIRS_CHOICE_ENUM']._serialized_start=103130 + _globals['_FLOWSIZEWEIGHTPAIRS_CHOICE_ENUM']._serialized_end=103181 + _globals['_FLOWSIZEWEIGHTPAIRS_PREDEFINED']._serialized_start=103183 + _globals['_FLOWSIZEWEIGHTPAIRS_PREDEFINED']._serialized_end=103294 + _globals['_FLOWSIZEWEIGHTPAIRS_PREDEFINED_ENUM']._serialized_start=103197 + _globals['_FLOWSIZEWEIGHTPAIRS_PREDEFINED_ENUM']._serialized_end=103294 + _globals['_FLOWSIZEWEIGHTPAIRSCUSTOM']._serialized_start=103322 + _globals['_FLOWSIZEWEIGHTPAIRSCUSTOM']._serialized_end=103409 + _globals['_FLOWRATE']._serialized_start=103412 + _globals['_FLOWRATE']._serialized_end=103756 + _globals['_FLOWRATE_CHOICE']._serialized_start=103590 + _globals['_FLOWRATE_CHOICE']._serialized_end=103687 + _globals['_FLOWRATE_CHOICE_ENUM']._serialized_start=103600 + _globals['_FLOWRATE_CHOICE_ENUM']._serialized_end=103687 + _globals['_FLOWDURATION']._serialized_start=103759 + _globals['_FLOWDURATION']._serialized_end=104100 + _globals['_FLOWDURATION_CHOICE']._serialized_start=103991 + _globals['_FLOWDURATION_CHOICE']._serialized_end=104089 + _globals['_FLOWDURATION_CHOICE_ENUM']._serialized_start=104001 + _globals['_FLOWDURATION_CHOICE_ENUM']._serialized_end=104089 + _globals['_FLOWCONTINUOUS']._serialized_start=104102 + _globals['_FLOWCONTINUOUS']._serialized_end=104175 + _globals['_FLOWDELAY']._serialized_start=104178 + _globals['_FLOWDELAY']._serialized_end=104446 + _globals['_FLOWDELAY_CHOICE']._serialized_start=104313 + _globals['_FLOWDELAY_CHOICE']._serialized_end=104392 + _globals['_FLOWDELAY_CHOICE_ENUM']._serialized_start=104323 + _globals['_FLOWDELAY_CHOICE_ENUM']._serialized_end=104392 + _globals['_FLOWFIXEDPACKETS']._serialized_start=104448 + _globals['_FLOWFIXEDPACKETS']._serialized_end=104557 + _globals['_FLOWFIXEDSECONDS']._serialized_start=104559 + _globals['_FLOWFIXEDSECONDS']._serialized_end=104668 + _globals['_FLOWBURST']._serialized_start=104671 + _globals['_FLOWBURST']._serialized_end=104831 + _globals['_FLOWDURATIONINTERBURSTGAP']._serialized_start=104834 + _globals['_FLOWDURATIONINTERBURSTGAP']._serialized_end=105134 + _globals['_FLOWDURATIONINTERBURSTGAP_CHOICE']._serialized_start=104313 + _globals['_FLOWDURATIONINTERBURSTGAP_CHOICE']._serialized_end=104392 + _globals['_FLOWDURATIONINTERBURSTGAP_CHOICE_ENUM']._serialized_start=104323 + _globals['_FLOWDURATIONINTERBURSTGAP_CHOICE_ENUM']._serialized_end=104392 + _globals['_FLOWMETRICS']._serialized_start=105137 + _globals['_FLOWMETRICS']._serialized_end=105390 + _globals['_FLOWLATENCYMETRICS']._serialized_start=105393 + _globals['_FLOWLATENCYMETRICS']._serialized_end=105577 + _globals['_FLOWLATENCYMETRICS_MODE']._serialized_start=105490 + _globals['_FLOWLATENCYMETRICS_MODE']._serialized_end=105557 + _globals['_FLOWLATENCYMETRICS_MODE_ENUM']._serialized_start=105498 + _globals['_FLOWLATENCYMETRICS_MODE_ENUM']._serialized_end=105557 + _globals['_FLOWPREDEFINEDTAGS']._serialized_start=105579 + _globals['_FLOWPREDEFINEDTAGS']._serialized_end=105633 + _globals['_FLOWRXTXRATIO']._serialized_start=105636 + _globals['_FLOWRXTXRATIO']._serialized_end=105850 + _globals['_FLOWRXTXRATIO_CHOICE']._serialized_start=105771 + _globals['_FLOWRXTXRATIO_CHOICE']._serialized_end=105829 + _globals['_FLOWRXTXRATIO_CHOICE_ENUM']._serialized_start=105781 + _globals['_FLOWRXTXRATIO_CHOICE_ENUM']._serialized_end=105829 + _globals['_FLOWRXTXRATIORXCOUNT']._serialized_start=105852 + _globals['_FLOWRXTXRATIORXCOUNT']._serialized_end=105874 + _globals['_EVENT']._serialized_start=105877 + _globals['_EVENT']._serialized_end=106068 + _globals['_EVENTRXRATETHRESHOLD']._serialized_start=106070 + _globals['_EVENTRXRATETHRESHOLD']._serialized_end=106162 + _globals['_EVENTLINK']._serialized_start=106164 + _globals['_EVENTLINK']._serialized_end=106207 + _globals['_EVENTROUTEADVERTISEWITHDRAW']._serialized_start=106209 + _globals['_EVENTROUTEADVERTISEWITHDRAW']._serialized_end=106270 + _globals['_EVENTREQUEST']._serialized_start=106273 + _globals['_EVENTREQUEST']._serialized_end=106518 + _globals['_EVENTREQUEST_TYPE']._serialized_start=106349 + _globals['_EVENTREQUEST_TYPE']._serialized_end=106518 + _globals['_EVENTREQUEST_TYPE_ENUM']._serialized_start=106358 + _globals['_EVENTREQUEST_TYPE_ENUM']._serialized_end=106518 + _globals['_EVENTSUBSCRIPTION']._serialized_start=106520 + _globals['_EVENTSUBSCRIPTION']._serialized_end=106618 + _globals['_LLDP']._serialized_start=106621 + _globals['_LLDP']._serialized_end=106951 + _globals['_LLDPCONNECTION']._serialized_start=106954 + _globals['_LLDPCONNECTION']._serialized_end=107123 + _globals['_LLDPCONNECTION_CHOICE']._serialized_start=107050 + _globals['_LLDPCONNECTION_CHOICE']._serialized_end=107098 + _globals['_LLDPCONNECTION_CHOICE_ENUM']._serialized_start=2414 + _globals['_LLDPCONNECTION_CHOICE_ENUM']._serialized_end=2452 + _globals['_LLDPCHASSISID']._serialized_start=107126 + _globals['_LLDPCHASSISID']._serialized_end=107479 + _globals['_LLDPCHASSISID_CHOICE']._serialized_start=107318 + _globals['_LLDPCHASSISID_CHOICE']._serialized_end=107423 + _globals['_LLDPCHASSISID_CHOICE_ENUM']._serialized_start=107328 + _globals['_LLDPCHASSISID_CHOICE_ENUM']._serialized_end=107423 + _globals['_LLDPPORTID']._serialized_start=107482 + _globals['_LLDPPORTID']._serialized_end=107833 + _globals['_LLDPPORTID_CHOICE']._serialized_start=107318 + _globals['_LLDPPORTID_CHOICE']._serialized_end=107423 + _globals['_LLDPPORTID_CHOICE_ENUM']._serialized_start=107328 + _globals['_LLDPPORTID_CHOICE_ENUM']._serialized_end=107423 + _globals['_LLDPCHASSISMACSUBTYPE']._serialized_start=107836 + _globals['_LLDPCHASSISMACSUBTYPE']._serialized_end=108045 + _globals['_LLDPCHASSISMACSUBTYPE_CHOICE']._serialized_start=3471 + _globals['_LLDPCHASSISMACSUBTYPE_CHOICE']._serialized_end=3525 + _globals['_LLDPCHASSISMACSUBTYPE_CHOICE_ENUM']._serialized_start=3481 + _globals['_LLDPCHASSISMACSUBTYPE_CHOICE_ENUM']._serialized_end=3525 + _globals['_LLDPPORTINTERFACENAMESUBTYPE']._serialized_start=108048 + _globals['_LLDPPORTINTERFACENAMESUBTYPE']._serialized_end=108271 + _globals['_LLDPPORTINTERFACENAMESUBTYPE_CHOICE']._serialized_start=3471 + _globals['_LLDPPORTINTERFACENAMESUBTYPE_CHOICE']._serialized_end=3525 + _globals['_LLDPPORTINTERFACENAMESUBTYPE_CHOICE_ENUM']._serialized_start=3481 + _globals['_LLDPPORTINTERFACENAMESUBTYPE_CHOICE_ENUM']._serialized_end=3525 + _globals['_LLDPSYSTEMNAME']._serialized_start=108274 + _globals['_LLDPSYSTEMNAME']._serialized_end=108469 + _globals['_LLDPSYSTEMNAME_CHOICE']._serialized_start=3471 + _globals['_LLDPSYSTEMNAME_CHOICE']._serialized_end=3525 + _globals['_LLDPSYSTEMNAME_CHOICE_ENUM']._serialized_start=3481 + _globals['_LLDPSYSTEMNAME_CHOICE_ENUM']._serialized_end=3525 + _globals['_LLDPORGINFO']._serialized_start=108471 + _globals['_LLDPORGINFO']._serialized_end=108587 + _globals['_LLDPORGINFOTYPE']._serialized_start=108590 + _globals['_LLDPORGINFOTYPE']._serialized_end=108746 + _globals['_LLDPORGINFOTYPE_CHOICE']._serialized_start=108683 + _globals['_LLDPORGINFOTYPE_CHOICE']._serialized_end=108726 + _globals['_LLDPORGINFOTYPE_CHOICE_ENUM']._serialized_start=108693 + _globals['_LLDPORGINFOTYPE_CHOICE_ENUM']._serialized_end=108726 + _globals['_ERROR']._serialized_start=108749 + _globals['_ERROR']._serialized_end=108913 + _globals['_ERROR_KIND']._serialized_start=108834 + _globals['_ERROR_KIND']._serialized_end=108895 + _globals['_ERROR_KIND_ENUM']._serialized_start=108842 + _globals['_ERROR_KIND_ENUM']._serialized_end=108895 + _globals['_WARNING']._serialized_start=108915 + _globals['_WARNING']._serialized_end=108942 + _globals['_CONFIGUPDATE']._serialized_start=108945 + _globals['_CONFIGUPDATE']._serialized_end=109101 + _globals['_CONFIGUPDATE_CHOICE']._serialized_start=109046 + _globals['_CONFIGUPDATE_CHOICE']._serialized_end=109090 + _globals['_CONFIGUPDATE_CHOICE_ENUM']._serialized_start=109056 + _globals['_CONFIGUPDATE_CHOICE_ENUM']._serialized_end=109090 + _globals['_FLOWSUPDATE']._serialized_start=109104 + _globals['_FLOWSUPDATE']._serialized_end=109266 + _globals['_FLOWSUPDATE_PROPERTYNAMES']._serialized_start=109206 + _globals['_FLOWSUPDATE_PROPERTYNAMES']._serialized_end=109266 + _globals['_FLOWSUPDATE_PROPERTYNAMES_ENUM']._serialized_start=109223 + _globals['_FLOWSUPDATE_PROPERTYNAMES_ENUM']._serialized_end=109266 + _globals['_CONTROLSTATE']._serialized_start=109269 + _globals['_CONTROLSTATE']._serialized_end=109522 + _globals['_CONTROLSTATE_CHOICE']._serialized_start=109441 + _globals['_CONTROLSTATE_CHOICE']._serialized_end=109511 + _globals['_CONTROLSTATE_CHOICE_ENUM']._serialized_start=109451 + _globals['_CONTROLSTATE_CHOICE_ENUM']._serialized_end=109511 + _globals['_STATEPORT']._serialized_start=109525 + _globals['_STATEPORT']._serialized_end=109728 + _globals['_STATEPORT_CHOICE']._serialized_start=109661 + _globals['_STATEPORT_CHOICE']._serialized_end=109717 + _globals['_STATEPORT_CHOICE_ENUM']._serialized_start=109671 + _globals['_STATEPORT_CHOICE_ENUM']._serialized_end=109717 + _globals['_STATETRAFFIC']._serialized_start=109731 + _globals['_STATETRAFFIC']._serialized_end=109916 + _globals['_STATETRAFFIC_CHOICE']._serialized_start=109853 + _globals['_STATETRAFFIC_CHOICE']._serialized_end=109905 + _globals['_STATETRAFFIC_CHOICE_ENUM']._serialized_start=109863 + _globals['_STATETRAFFIC_CHOICE_ENUM']._serialized_end=109905 + _globals['_STATEPROTOCOL']._serialized_start=109919 + _globals['_STATEPROTOCOL']._serialized_end=110324 + _globals['_STATEPROTOCOL_CHOICE']._serialized_start=110219 + _globals['_STATEPROTOCOL_CHOICE']._serialized_end=110313 + _globals['_STATEPROTOCOL_CHOICE_ENUM']._serialized_start=110229 + _globals['_STATEPROTOCOL_CHOICE_ENUM']._serialized_end=110313 + _globals['_STATEPORTLINK']._serialized_start=110327 + _globals['_STATEPORTLINK']._serialized_end=110475 + _globals['_STATEPORTLINK_STATE']._serialized_start=110415 + _globals['_STATEPORTLINK_STATE']._serialized_end=110465 + _globals['_STATEPORTLINK_STATE_ENUM']._serialized_start=19452 + _globals['_STATEPORTLINK_STATE_ENUM']._serialized_end=19493 + _globals['_STATEPORTCAPTURE']._serialized_start=110478 + _globals['_STATEPORTCAPTURE']._serialized_end=110635 + _globals['_STATEPORTCAPTURE_STATE']._serialized_start=110572 + _globals['_STATEPORTCAPTURE_STATE']._serialized_end=110625 + _globals['_STATEPORTCAPTURE_STATE_ENUM']._serialized_start=110581 + _globals['_STATEPORTCAPTURE_STATE_ENUM']._serialized_end=110625 + _globals['_STATETRAFFICFLOWTRANSMIT']._serialized_start=110638 + _globals['_STATETRAFFICFLOWTRANSMIT']._serialized_end=110834 + _globals['_STATETRAFFICFLOWTRANSMIT_STATE']._serialized_start=110748 + _globals['_STATETRAFFICFLOWTRANSMIT_STATE']._serialized_end=110824 + _globals['_STATETRAFFICFLOWTRANSMIT_STATE_ENUM']._serialized_start=110757 + _globals['_STATETRAFFICFLOWTRANSMIT_STATE_ENUM']._serialized_end=110824 + _globals['_STATEPROTOCOLALL']._serialized_start=110837 + _globals['_STATEPROTOCOLALL']._serialized_end=110974 + _globals['_STATEPROTOCOLALL_STATE']._serialized_start=110572 + _globals['_STATEPROTOCOLALL_STATE']._serialized_end=110625 + _globals['_STATEPROTOCOLALL_STATE_ENUM']._serialized_start=110581 + _globals['_STATEPROTOCOLALL_STATE_ENUM']._serialized_end=110625 + _globals['_STATEPROTOCOLROUTE']._serialized_start=110977 + _globals['_STATEPROTOCOLROUTE']._serialized_end=111141 + _globals['_STATEPROTOCOLROUTE_STATE']._serialized_start=111070 + _globals['_STATEPROTOCOLROUTE_STATE']._serialized_end=111131 + _globals['_STATEPROTOCOLROUTE_STATE_ENUM']._serialized_start=111079 + _globals['_STATEPROTOCOLROUTE_STATE_ENUM']._serialized_end=111131 + _globals['_STATEPROTOCOLLACP']._serialized_start=111144 + _globals['_STATEPROTOCOLLACP']._serialized_end=111396 + _globals['_STATEPROTOCOLLACP_CHOICE']._serialized_start=111323 + _globals['_STATEPROTOCOLLACP_CHOICE']._serialized_end=111385 + _globals['_STATEPROTOCOLLACP_CHOICE_ENUM']._serialized_start=111333 + _globals['_STATEPROTOCOLLACP_CHOICE_ENUM']._serialized_end=111385 + _globals['_STATEPROTOCOLLACPADMIN']._serialized_start=111399 + _globals['_STATEPROTOCOLLACPADMIN']._serialized_end=111571 + _globals['_STATEPROTOCOLLACPADMIN_STATE']._serialized_start=110415 + _globals['_STATEPROTOCOLLACPADMIN_STATE']._serialized_end=110465 + _globals['_STATEPROTOCOLLACPADMIN_STATE_ENUM']._serialized_start=19452 + _globals['_STATEPROTOCOLLACPADMIN_STATE_ENUM']._serialized_end=19493 + _globals['_STATEPROTOCOLLACPMEMBERPORTS']._serialized_start=111574 + _globals['_STATEPROTOCOLLACPMEMBERPORTS']._serialized_end=111758 + _globals['_STATEPROTOCOLLACPMEMBERPORTS_STATE']._serialized_start=110415 + _globals['_STATEPROTOCOLLACPMEMBERPORTS_STATE']._serialized_end=110465 + _globals['_STATEPROTOCOLLACPMEMBERPORTS_STATE_ENUM']._serialized_start=19452 + _globals['_STATEPROTOCOLLACPMEMBERPORTS_STATE_ENUM']._serialized_end=19493 + _globals['_STATEPROTOCOLBGP']._serialized_start=111761 + _globals['_STATEPROTOCOLBGP']._serialized_end=111935 + _globals['_STATEPROTOCOLBGP_CHOICE']._serialized_start=111880 + _globals['_STATEPROTOCOLBGP_CHOICE']._serialized_end=111924 + _globals['_STATEPROTOCOLBGP_CHOICE_ENUM']._serialized_start=111890 + _globals['_STATEPROTOCOLBGP_CHOICE_ENUM']._serialized_end=111924 + _globals['_STATEPROTOCOLBGPPEERS']._serialized_start=111938 + _globals['_STATEPROTOCOLBGPPEERS']._serialized_end=112102 + _globals['_STATEPROTOCOLBGPPEERS_STATE']._serialized_start=110415 + _globals['_STATEPROTOCOLBGPPEERS_STATE']._serialized_end=110465 + _globals['_STATEPROTOCOLBGPPEERS_STATE_ENUM']._serialized_start=19452 + _globals['_STATEPROTOCOLBGPPEERS_STATE_ENUM']._serialized_end=19493 + _globals['_STATEPROTOCOLISIS']._serialized_start=112105 + _globals['_STATEPROTOCOLISIS']._serialized_end=112288 + _globals['_STATEPROTOCOLISIS_CHOICE']._serialized_start=112231 + _globals['_STATEPROTOCOLISIS_CHOICE']._serialized_end=112277 + _globals['_STATEPROTOCOLISIS_CHOICE_ENUM']._serialized_start=112241 + _globals['_STATEPROTOCOLISIS_CHOICE_ENUM']._serialized_end=112277 + _globals['_STATEPROTOCOLISISROUTERS']._serialized_start=112291 + _globals['_STATEPROTOCOLISISROUTERS']._serialized_end=112463 + _globals['_STATEPROTOCOLISISROUTERS_STATE']._serialized_start=110415 + _globals['_STATEPROTOCOLISISROUTERS_STATE']._serialized_end=110465 + _globals['_STATEPROTOCOLISISROUTERS_STATE_ENUM']._serialized_start=19452 + _globals['_STATEPROTOCOLISISROUTERS_STATE_ENUM']._serialized_end=19493 + _globals['_STATEPROTOCOLOSPFV2']._serialized_start=112466 + _globals['_STATEPROTOCOLOSPFV2']._serialized_end=112655 + _globals['_STATEPROTOCOLOSPFV2_CHOICE']._serialized_start=112231 + _globals['_STATEPROTOCOLOSPFV2_CHOICE']._serialized_end=112277 + _globals['_STATEPROTOCOLOSPFV2_CHOICE_ENUM']._serialized_start=112241 + _globals['_STATEPROTOCOLOSPFV2_CHOICE_ENUM']._serialized_end=112277 + _globals['_STATEPROTOCOLOSPFV2ROUTERS']._serialized_start=112658 + _globals['_STATEPROTOCOLOSPFV2ROUTERS']._serialized_end=112834 + _globals['_STATEPROTOCOLOSPFV2ROUTERS_STATE']._serialized_start=110415 + _globals['_STATEPROTOCOLOSPFV2ROUTERS_STATE']._serialized_end=110465 + _globals['_STATEPROTOCOLOSPFV2ROUTERS_STATE_ENUM']._serialized_start=19452 + _globals['_STATEPROTOCOLOSPFV2ROUTERS_STATE_ENUM']._serialized_end=19493 + _globals['_CONTROLACTION']._serialized_start=112837 + _globals['_CONTROLACTION']._serialized_end=113004 + _globals['_CONTROLACTION_CHOICE']._serialized_start=112946 + _globals['_CONTROLACTION_CHOICE']._serialized_end=112993 + _globals['_CONTROLACTION_CHOICE_ENUM']._serialized_start=112956 + _globals['_CONTROLACTION_CHOICE_ENUM']._serialized_end=112993 + _globals['_CONTROLACTIONRESPONSE']._serialized_start=113006 + _globals['_CONTROLACTIONRESPONSE']._serialized_end=113086 + _globals['_ACTIONRESPONSE']._serialized_start=113089 + _globals['_ACTIONRESPONSE']._serialized_end=113266 + _globals['_ACTIONRESPONSE_CHOICE']._serialized_start=112946 + _globals['_ACTIONRESPONSE_CHOICE']._serialized_end=112993 + _globals['_ACTIONRESPONSE_CHOICE_ENUM']._serialized_start=112956 + _globals['_ACTIONRESPONSE_CHOICE_ENUM']._serialized_end=112993 + _globals['_ACTIONPROTOCOL']._serialized_start=113269 + _globals['_ACTIONPROTOCOL']._serialized_end=113529 + _globals['_ACTIONPROTOCOL_CHOICE']._serialized_start=113456 + _globals['_ACTIONPROTOCOL_CHOICE']._serialized_end=113518 + _globals['_ACTIONPROTOCOL_CHOICE_ENUM']._serialized_start=113466 + _globals['_ACTIONPROTOCOL_CHOICE_ENUM']._serialized_end=113518 + _globals['_ACTIONRESPONSEPROTOCOL']._serialized_start=113532 + _globals['_ACTIONRESPONSEPROTOCOL']._serialized_end=113778 + _globals['_ACTIONRESPONSEPROTOCOL_CHOICE']._serialized_start=113714 + _globals['_ACTIONRESPONSEPROTOCOL_CHOICE']._serialized_end=113767 + _globals['_ACTIONRESPONSEPROTOCOL_CHOICE_ENUM']._serialized_start=30643 + _globals['_ACTIONRESPONSEPROTOCOL_CHOICE_ENUM']._serialized_end=30686 + _globals['_ACTIONPROTOCOLIPV4']._serialized_start=113781 + _globals['_ACTIONPROTOCOLIPV4']._serialized_end=113958 + _globals['_ACTIONPROTOCOLIPV4_CHOICE']._serialized_start=113904 + _globals['_ACTIONPROTOCOLIPV4_CHOICE']._serialized_end=113947 + _globals['_ACTIONPROTOCOLIPV4_CHOICE_ENUM']._serialized_start=113914 + _globals['_ACTIONPROTOCOLIPV4_CHOICE_ENUM']._serialized_end=113947 + _globals['_ACTIONRESPONSEPROTOCOLIPV4']._serialized_start=113961 + _globals['_ACTIONRESPONSEPROTOCOLIPV4']._serialized_end=114162 + _globals['_ACTIONRESPONSEPROTOCOLIPV4_CHOICE']._serialized_start=113904 + _globals['_ACTIONRESPONSEPROTOCOLIPV4_CHOICE']._serialized_end=113947 + _globals['_ACTIONRESPONSEPROTOCOLIPV4_CHOICE_ENUM']._serialized_start=113914 + _globals['_ACTIONRESPONSEPROTOCOLIPV4_CHOICE_ENUM']._serialized_end=113947 + _globals['_ACTIONPROTOCOLIPV4PING']._serialized_start=114164 + _globals['_ACTIONPROTOCOLIPV4PING']._serialized_end=114242 + _globals['_ACTIONPROTOCOLIPV4PINGREQUEST']._serialized_start=114244 + _globals['_ACTIONPROTOCOLIPV4PINGREQUEST']._serialized_end=114343 + _globals['_ACTIONRESPONSEPROTOCOLIPV4PING']._serialized_start=114345 + _globals['_ACTIONRESPONSEPROTOCOLIPV4PING']._serialized_end=114441 + _globals['_ACTIONRESPONSEPROTOCOLIPV4PINGRESPONSE']._serialized_start=114444 + _globals['_ACTIONRESPONSEPROTOCOLIPV4PINGRESPONSE']._serialized_end=114703 + _globals['_ACTIONRESPONSEPROTOCOLIPV4PINGRESPONSE_RESULT']._serialized_start=114608 + _globals['_ACTIONRESPONSEPROTOCOLIPV4PINGRESPONSE_RESULT']._serialized_end=114668 + _globals['_ACTIONRESPONSEPROTOCOLIPV4PINGRESPONSE_RESULT_ENUM']._serialized_start=114618 + _globals['_ACTIONRESPONSEPROTOCOLIPV4PINGRESPONSE_RESULT_ENUM']._serialized_end=114668 + _globals['_ACTIONPROTOCOLIPV6']._serialized_start=114706 + _globals['_ACTIONPROTOCOLIPV6']._serialized_end=114883 + _globals['_ACTIONPROTOCOLIPV6_CHOICE']._serialized_start=113904 + _globals['_ACTIONPROTOCOLIPV6_CHOICE']._serialized_end=113947 + _globals['_ACTIONPROTOCOLIPV6_CHOICE_ENUM']._serialized_start=113914 + _globals['_ACTIONPROTOCOLIPV6_CHOICE_ENUM']._serialized_end=113947 + _globals['_ACTIONRESPONSEPROTOCOLIPV6']._serialized_start=114886 + _globals['_ACTIONRESPONSEPROTOCOLIPV6']._serialized_end=115087 + _globals['_ACTIONRESPONSEPROTOCOLIPV6_CHOICE']._serialized_start=113904 + _globals['_ACTIONRESPONSEPROTOCOLIPV6_CHOICE']._serialized_end=113947 + _globals['_ACTIONRESPONSEPROTOCOLIPV6_CHOICE_ENUM']._serialized_start=113914 + _globals['_ACTIONRESPONSEPROTOCOLIPV6_CHOICE_ENUM']._serialized_end=113947 + _globals['_ACTIONPROTOCOLIPV6PING']._serialized_start=115089 + _globals['_ACTIONPROTOCOLIPV6PING']._serialized_end=115167 + _globals['_ACTIONPROTOCOLIPV6PINGREQUEST']._serialized_start=115169 + _globals['_ACTIONPROTOCOLIPV6PINGREQUEST']._serialized_end=115268 + _globals['_ACTIONRESPONSEPROTOCOLIPV6PING']._serialized_start=115270 + _globals['_ACTIONRESPONSEPROTOCOLIPV6PING']._serialized_end=115366 + _globals['_ACTIONRESPONSEPROTOCOLIPV6PINGRESPONSE']._serialized_start=115369 + _globals['_ACTIONRESPONSEPROTOCOLIPV6PINGRESPONSE']._serialized_end=115628 + _globals['_ACTIONRESPONSEPROTOCOLIPV6PINGRESPONSE_RESULT']._serialized_start=114608 + _globals['_ACTIONRESPONSEPROTOCOLIPV6PINGRESPONSE_RESULT']._serialized_end=114668 + _globals['_ACTIONRESPONSEPROTOCOLIPV6PINGRESPONSE_RESULT_ENUM']._serialized_start=114618 + _globals['_ACTIONRESPONSEPROTOCOLIPV6PINGRESPONSE_RESULT_ENUM']._serialized_end=114668 + _globals['_ACTIONPROTOCOLBGP']._serialized_start=115631 + _globals['_ACTIONPROTOCOLBGP']._serialized_end=115942 + _globals['_ACTIONPROTOCOLBGP_CHOICE']._serialized_start=115849 + _globals['_ACTIONPROTOCOLBGP_CHOICE']._serialized_end=115931 + _globals['_ACTIONPROTOCOLBGP_CHOICE_ENUM']._serialized_start=115859 + _globals['_ACTIONPROTOCOLBGP_CHOICE_ENUM']._serialized_end=115931 + _globals['_ACTIONPROTOCOLBGPNOTIFICATION']._serialized_start=115945 + _globals['_ACTIONPROTOCOLBGPNOTIFICATION']._serialized_end=116670 + _globals['_ACTIONPROTOCOLBGPNOTIFICATION_CHOICE']._serialized_start=116470 + _globals['_ACTIONPROTOCOLBGPNOTIFICATION_CHOICE']._serialized_end=116659 + _globals['_ACTIONPROTOCOLBGPNOTIFICATION_CHOICE_ENUM']._serialized_start=116481 + _globals['_ACTIONPROTOCOLBGPNOTIFICATION_CHOICE_ENUM']._serialized_end=116659 + _globals['_ACTIONPROTOCOLBGPINITIATEGRACEFULRESTART']._serialized_start=116673 + _globals['_ACTIONPROTOCOLBGPINITIATEGRACEFULRESTART']._serialized_end=116854 + _globals['_ACTIONPROTOCOLBGPGRACEFULRESTARTNOTIFICATION']._serialized_start=116857 + _globals['_ACTIONPROTOCOLBGPGRACEFULRESTARTNOTIFICATION']._serialized_end=117597 + _globals['_ACTIONPROTOCOLBGPGRACEFULRESTARTNOTIFICATION_CHOICE']._serialized_start=116470 + _globals['_ACTIONPROTOCOLBGPGRACEFULRESTARTNOTIFICATION_CHOICE']._serialized_end=116659 + _globals['_ACTIONPROTOCOLBGPGRACEFULRESTARTNOTIFICATION_CHOICE_ENUM']._serialized_start=116481 + _globals['_ACTIONPROTOCOLBGPGRACEFULRESTARTNOTIFICATION_CHOICE_ENUM']._serialized_end=116659 + _globals['_METRICSREQUEST']._serialized_start=117600 + _globals['_METRICSREQUEST']._serialized_end=118517 + _globals['_METRICSREQUEST_CHOICE']._serialized_start=118293 + _globals['_METRICSREQUEST_CHOICE']._serialized_end=118506 + _globals['_METRICSREQUEST_CHOICE_ENUM']._serialized_start=118304 + _globals['_METRICSREQUEST_CHOICE_ENUM']._serialized_end=118506 + _globals['_METRICSRESPONSE']._serialized_start=118520 + _globals['_METRICSRESPONSE']._serialized_end=119515 + _globals['_METRICSRESPONSE_CHOICE']._serialized_start=119211 + _globals['_METRICSRESPONSE_CHOICE']._serialized_end=119504 + _globals['_METRICSRESPONSE_CHOICE_ENUM']._serialized_start=119222 + _globals['_METRICSRESPONSE_CHOICE_ENUM']._serialized_end=119504 + _globals['_PORTMETRICSREQUEST']._serialized_start=119518 + _globals['_PORTMETRICSREQUEST']._serialized_end=119851 + _globals['_PORTMETRICSREQUEST_COLUMNNAMES']._serialized_start=119625 + _globals['_PORTMETRICSREQUEST_COLUMNNAMES']._serialized_end=119851 + _globals['_PORTMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_start=119641 + _globals['_PORTMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_end=119851 + _globals['_PORTMETRIC']._serialized_start=119854 + _globals['_PORTMETRIC']._serialized_end=120628 + _globals['_PORTMETRIC_LINK']._serialized_start=120270 + _globals['_PORTMETRIC_LINK']._serialized_end=120319 + _globals['_PORTMETRIC_LINK_ENUM']._serialized_start=19452 + _globals['_PORTMETRIC_LINK_ENUM']._serialized_end=19493 + _globals['_PORTMETRIC_CAPTURE']._serialized_start=120321 + _globals['_PORTMETRIC_CAPTURE']._serialized_end=120381 + _globals['_PORTMETRIC_CAPTURE_ENUM']._serialized_start=120332 + _globals['_PORTMETRIC_CAPTURE_ENUM']._serialized_end=120381 + _globals['_PORTMETRIC_TRANSMIT']._serialized_start=120383 + _globals['_PORTMETRIC_TRANSMIT']._serialized_end=120444 + _globals['_PORTMETRIC_TRANSMIT_ENUM']._serialized_start=120332 + _globals['_PORTMETRIC_TRANSMIT_ENUM']._serialized_end=120381 + _globals['_FLOWMETRICSREQUEST']._serialized_start=120631 + _globals['_FLOWMETRICSREQUEST']._serialized_end=120943 + _globals['_FLOWMETRICSREQUEST_METRICNAMES']._serialized_start=120792 + _globals['_FLOWMETRICSREQUEST_METRICNAMES']._serialized_end=120943 + _globals['_FLOWMETRICSREQUEST_METRICNAMES_ENUM']._serialized_start=120808 + _globals['_FLOWMETRICSREQUEST_METRICNAMES_ENUM']._serialized_end=120943 + _globals['_FLOWTAGGEDMETRICSFILTER']._serialized_start=120946 + _globals['_FLOWTAGGEDMETRICSFILTER']._serialized_end=121318 + _globals['_FLOWTAGGEDMETRICSFILTER_METRICNAMES']._serialized_start=121144 + _globals['_FLOWTAGGEDMETRICSFILTER_METRICNAMES']._serialized_end=121280 + _globals['_FLOWTAGGEDMETRICSFILTER_METRICNAMES_ENUM']._serialized_start=121159 + _globals['_FLOWTAGGEDMETRICSFILTER_METRICNAMES_ENUM']._serialized_end=121280 + _globals['_FLOWMETRICTAGFILTER']._serialized_start=121320 + _globals['_FLOWMETRICTAGFILTER']._serialized_end=121385 + _globals['_FLOWMETRIC']._serialized_start=121388 + _globals['_FLOWMETRIC']._serialized_end=122036 + _globals['_FLOWMETRIC_TRANSMIT']._serialized_start=121816 + _globals['_FLOWMETRIC_TRANSMIT']._serialized_end=121889 + _globals['_FLOWMETRIC_TRANSMIT_ENUM']._serialized_start=121828 + _globals['_FLOWMETRIC_TRANSMIT_ENUM']._serialized_end=121889 + _globals['_FLOWTAGGEDMETRIC']._serialized_start=122039 + _globals['_FLOWTAGGEDMETRIC']._serialized_end=122442 + _globals['_FLOWMETRICTAG']._serialized_start=122444 + _globals['_FLOWMETRICTAG']._serialized_end=122527 + _globals['_FLOWMETRICTAGVALUE']._serialized_start=122530 + _globals['_FLOWMETRICTAGVALUE']._serialized_end=122724 + _globals['_FLOWMETRICTAGVALUE_CHOICE']._serialized_start=122646 + _globals['_FLOWMETRICTAGVALUE_CHOICE']._serialized_end=122697 + _globals['_FLOWMETRICTAGVALUE_CHOICE_ENUM']._serialized_start=122656 + _globals['_FLOWMETRICTAGVALUE_CHOICE_ENUM']._serialized_end=122697 + _globals['_METRICTIMESTAMP']._serialized_start=122726 + _globals['_METRICTIMESTAMP']._serialized_end=122853 + _globals['_METRICLATENCY']._serialized_start=122856 + _globals['_METRICLATENCY']._serialized_end=122991 + _globals['_BGPV4METRICSREQUEST']._serialized_start=122994 + _globals['_BGPV4METRICSREQUEST']._serialized_end=123499 + _globals['_BGPV4METRICSREQUEST_COLUMNNAMES']._serialized_start=123103 + _globals['_BGPV4METRICSREQUEST_COLUMNNAMES']._serialized_end=123499 + _globals['_BGPV4METRICSREQUEST_COLUMNNAMES_ENUM']._serialized_start=123119 + _globals['_BGPV4METRICSREQUEST_COLUMNNAMES_ENUM']._serialized_end=123499 + _globals['_BGPV4METRIC']._serialized_start=123502 + _globals['_BGPV4METRIC']._serialized_end=124632 + _globals['_BGPV4METRIC_SESSIONSTATE']._serialized_start=124105 + _globals['_BGPV4METRIC_SESSIONSTATE']._serialized_end=124162 + _globals['_BGPV4METRIC_SESSIONSTATE_ENUM']._serialized_start=19452 + _globals['_BGPV4METRIC_SESSIONSTATE_ENUM']._serialized_end=19493 + _globals['_BGPV4METRIC_FSMSTATE']._serialized_start=124164 + _globals['_BGPV4METRIC_FSMSTATE']._serialized_end=124282 + _globals['_BGPV4METRIC_FSMSTATE_ENUM']._serialized_start=124176 + _globals['_BGPV4METRIC_FSMSTATE_ENUM']._serialized_end=124282 + _globals['_BGPV6METRICSREQUEST']._serialized_start=124635 + _globals['_BGPV6METRICSREQUEST']._serialized_end=125140 + _globals['_BGPV6METRICSREQUEST_COLUMNNAMES']._serialized_start=123103 + _globals['_BGPV6METRICSREQUEST_COLUMNNAMES']._serialized_end=123499 + _globals['_BGPV6METRICSREQUEST_COLUMNNAMES_ENUM']._serialized_start=123119 + _globals['_BGPV6METRICSREQUEST_COLUMNNAMES_ENUM']._serialized_end=123499 + _globals['_BGPV6METRIC']._serialized_start=125143 + _globals['_BGPV6METRIC']._serialized_end=126273 + _globals['_BGPV6METRIC_SESSIONSTATE']._serialized_start=124105 + _globals['_BGPV6METRIC_SESSIONSTATE']._serialized_end=124162 + _globals['_BGPV6METRIC_SESSIONSTATE_ENUM']._serialized_start=19452 + _globals['_BGPV6METRIC_SESSIONSTATE_ENUM']._serialized_end=19493 + _globals['_BGPV6METRIC_FSMSTATE']._serialized_start=124164 + _globals['_BGPV6METRIC_FSMSTATE']._serialized_end=124282 + _globals['_BGPV6METRIC_FSMSTATE_ENUM']._serialized_start=124176 + _globals['_BGPV6METRIC_FSMSTATE_ENUM']._serialized_end=124282 + _globals['_ISISMETRICSREQUEST']._serialized_start=126276 + _globals['_ISISMETRICSREQUEST']._serialized_end=127062 + _globals['_ISISMETRICSREQUEST_COLUMNNAMES']._serialized_start=126385 + _globals['_ISISMETRICSREQUEST_COLUMNNAMES']._serialized_end=127062 + _globals['_ISISMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_start=126401 + _globals['_ISISMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_end=127062 + _globals['_ISISMETRIC']._serialized_start=127065 + _globals['_ISISMETRIC']._serialized_end=128589 + _globals['_LAGMETRICSREQUEST']._serialized_start=128592 + _globals['_LAGMETRICSREQUEST']._serialized_end=128909 + _globals['_LAGMETRICSREQUEST_COLUMNNAMES']._serialized_start=128696 + _globals['_LAGMETRICSREQUEST_COLUMNNAMES']._serialized_end=128909 + _globals['_LAGMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_start=128712 + _globals['_LAGMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_end=128909 + _globals['_LAGMETRIC']._serialized_start=128912 + _globals['_LAGMETRIC']._serialized_end=129468 + _globals['_LAGMETRIC_OPERSTATUS']._serialized_start=129240 + _globals['_LAGMETRIC_OPERSTATUS']._serialized_end=129295 + _globals['_LAGMETRIC_OPERSTATUS_ENUM']._serialized_start=19452 + _globals['_LAGMETRIC_OPERSTATUS_ENUM']._serialized_end=19493 + _globals['_LACPMETRICSREQUEST']._serialized_start=129471 + _globals['_LACPMETRICSREQUEST']._serialized_end=129907 + _globals['_LACPMETRICSREQUEST_COLUMNNAMES']._serialized_start=129608 + _globals['_LACPMETRICSREQUEST_COLUMNNAMES']._serialized_end=129907 + _globals['_LACPMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_start=129624 + _globals['_LACPMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_end=129907 + _globals['_LACPMETRIC']._serialized_start=129910 + _globals['_LACPMETRIC']._serialized_end=130947 + _globals['_LACPMETRIC_ACTIVITY']._serialized_start=130476 + _globals['_LACPMETRIC_ACTIVITY']._serialized_end=130536 + _globals['_LACPMETRIC_ACTIVITY_ENUM']._serialized_start=130488 + _globals['_LACPMETRIC_ACTIVITY_ENUM']._serialized_end=130536 + _globals['_LACPMETRIC_TIMEOUT']._serialized_start=130538 + _globals['_LACPMETRIC_TIMEOUT']._serialized_end=130593 + _globals['_LACPMETRIC_TIMEOUT_ENUM']._serialized_start=130549 + _globals['_LACPMETRIC_TIMEOUT_ENUM']._serialized_end=130593 + _globals['_LACPMETRIC_SYNCHRONIZATION']._serialized_start=130595 + _globals['_LACPMETRIC_SYNCHRONIZATION']._serialized_end=130664 + _globals['_LACPMETRIC_SYNCHRONIZATION_ENUM']._serialized_start=130614 + _globals['_LACPMETRIC_SYNCHRONIZATION_ENUM']._serialized_end=130664 + _globals['_LLDPMETRICSREQUEST']._serialized_start=130950 + _globals['_LLDPMETRICSREQUEST']._serialized_end=131203 + _globals['_LLDPMETRICSREQUEST_COLUMNNAMES']._serialized_start=131057 + _globals['_LLDPMETRICSREQUEST_COLUMNNAMES']._serialized_end=131203 + _globals['_LLDPMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_start=131073 + _globals['_LLDPMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_end=131203 + _globals['_LLDPMETRIC']._serialized_start=131206 + _globals['_LLDPMETRIC']._serialized_end=131508 + _globals['_RSVPMETRICSREQUEST']._serialized_start=131511 + _globals['_RSVPMETRICSREQUEST']._serialized_end=132217 + _globals['_RSVPMETRICSREQUEST_COLUMNNAMES']._serialized_start=131620 + _globals['_RSVPMETRICSREQUEST_COLUMNNAMES']._serialized_end=132217 + _globals['_RSVPMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_start=131636 + _globals['_RSVPMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_end=132217 + _globals['_RSVPMETRIC']._serialized_start=132220 + _globals['_RSVPMETRIC']._serialized_end=133616 + _globals['_DHCPV4CLIENTMETRICSREQUEST']._serialized_start=133619 + _globals['_DHCPV4CLIENTMETRICSREQUEST']._serialized_end=133920 + _globals['_DHCPV4CLIENTMETRICSREQUEST_COLUMNNAMES']._serialized_start=133744 + _globals['_DHCPV4CLIENTMETRICSREQUEST_COLUMNNAMES']._serialized_end=133920 + _globals['_DHCPV4CLIENTMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_start=133760 + _globals['_DHCPV4CLIENTMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_end=133920 + _globals['_DHCPV4CLIENTMETRIC']._serialized_start=133923 + _globals['_DHCPV4CLIENTMETRIC']._serialized_end=134301 + _globals['_DHCPV4SERVERMETRICSREQUEST']._serialized_start=134304 + _globals['_DHCPV4SERVERMETRICSREQUEST']._serialized_end=134609 + _globals['_DHCPV4SERVERMETRICSREQUEST_COLUMNNAMES']._serialized_start=134429 + _globals['_DHCPV4SERVERMETRICSREQUEST_COLUMNNAMES']._serialized_end=134609 + _globals['_DHCPV4SERVERMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_start=134445 + _globals['_DHCPV4SERVERMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_end=134609 + _globals['_DHCPV4SERVERMETRIC']._serialized_start=134612 + _globals['_DHCPV4SERVERMETRIC']._serialized_end=134998 + _globals['_DHCPV6CLIENTMETRICSREQUEST']._serialized_start=135001 + _globals['_DHCPV6CLIENTMETRICSREQUEST']._serialized_end=135481 + _globals['_DHCPV6CLIENTMETRICSREQUEST_COLUMNNAMES']._serialized_start=135126 + _globals['_DHCPV6CLIENTMETRICSREQUEST_COLUMNNAMES']._serialized_end=135481 + _globals['_DHCPV6CLIENTMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_start=135142 + _globals['_DHCPV6CLIENTMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_end=135481 + _globals['_DHCPV6CLIENTMETRIC']._serialized_start=135484 + _globals['_DHCPV6CLIENTMETRIC']._serialized_end=136268 + _globals['_DHCPV6SERVERMETRICSREQUEST']._serialized_start=136271 + _globals['_DHCPV6SERVERMETRICSREQUEST']._serialized_end=136787 + _globals['_DHCPV6SERVERMETRICSREQUEST_COLUMNNAMES']._serialized_start=136396 + _globals['_DHCPV6SERVERMETRICSREQUEST_COLUMNNAMES']._serialized_end=136787 + _globals['_DHCPV6SERVERMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_start=136412 + _globals['_DHCPV6SERVERMETRICSREQUEST_COLUMNNAMES_ENUM']._serialized_end=136787 + _globals['_DHCPV6SERVERMETRIC']._serialized_start=136790 + _globals['_DHCPV6SERVERMETRIC']._serialized_end=137662 + _globals['_OSPFV2METRICSREQUEST']._serialized_start=137665 + _globals['_OSPFV2METRICSREQUEST']._serialized_end=138534 + _globals['_OSPFV2METRICSREQUEST_COLUMNNAMES']._serialized_start=137778 + _globals['_OSPFV2METRICSREQUEST_COLUMNNAMES']._serialized_end=138534 + _globals['_OSPFV2METRICSREQUEST_COLUMNNAMES_ENUM']._serialized_start=137794 + _globals['_OSPFV2METRICSREQUEST_COLUMNNAMES_ENUM']._serialized_end=138534 + _globals['_OSPFV2METRIC']._serialized_start=138537 + _globals['_OSPFV2METRIC']._serialized_end=140277 + _globals['_STATESREQUEST']._serialized_start=140280 + _globals['_STATESREQUEST']._serialized_end=141191 + _globals['_STATESREQUEST_CHOICE']._serialized_start=140937 + _globals['_STATESREQUEST_CHOICE']._serialized_end=141180 + _globals['_STATESREQUEST_CHOICE_ENUM']._serialized_start=140948 + _globals['_STATESREQUEST_CHOICE_ENUM']._serialized_end=141180 + _globals['_STATESRESPONSE']._serialized_start=141194 + _globals['_STATESRESPONSE']._serialized_end=142031 + _globals['_STATESRESPONSE_CHOICE']._serialized_start=140937 + _globals['_STATESRESPONSE_CHOICE']._serialized_end=141180 + _globals['_STATESRESPONSE_CHOICE_ENUM']._serialized_start=140948 + _globals['_STATESRESPONSE_CHOICE_ENUM']._serialized_end=141180 + _globals['_NEIGHBORSV4STATESREQUEST']._serialized_start=142033 + _globals['_NEIGHBORSV4STATESREQUEST']._serialized_end=142083 + _globals['_NEIGHBORSV4STATE']._serialized_start=142086 + _globals['_NEIGHBORSV4STATE']._serialized_end=142250 + _globals['_NEIGHBORSV6STATESREQUEST']._serialized_start=142252 + _globals['_NEIGHBORSV6STATESREQUEST']._serialized_end=142302 + _globals['_NEIGHBORSV6STATE']._serialized_start=142305 + _globals['_NEIGHBORSV6STATE']._serialized_end=142469 + _globals['_BGPPREFIXSTATEREQUEST']._serialized_start=142472 + _globals['_BGPPREFIXSTATEREQUEST']._serialized_end=142794 + _globals['_BGPPREFIXSTATEREQUEST_PREFIXFILTERS']._serialized_start=142718 + _globals['_BGPPREFIXSTATEREQUEST_PREFIXFILTERS']._serialized_end=142794 + _globals['_BGPPREFIXSTATEREQUEST_PREFIXFILTERS_ENUM']._serialized_start=50380 + _globals['_BGPPREFIXSTATEREQUEST_PREFIXFILTERS_ENUM']._serialized_end=50439 + _globals['_BGPPREFIXIPV4UNICASTFILTER']._serialized_start=142797 + _globals['_BGPPREFIXIPV4UNICASTFILTER']._serialized_end=143070 + _globals['_BGPPREFIXIPV4UNICASTFILTER_ORIGIN']._serialized_start=24575 + _globals['_BGPPREFIXIPV4UNICASTFILTER_ORIGIN']._serialized_end=24642 + _globals['_BGPPREFIXIPV4UNICASTFILTER_ORIGIN_ENUM']._serialized_start=24585 + _globals['_BGPPREFIXIPV4UNICASTFILTER_ORIGIN_ENUM']._serialized_end=24642 + _globals['_BGPPREFIXIPV6UNICASTFILTER']._serialized_start=143073 + _globals['_BGPPREFIXIPV6UNICASTFILTER']._serialized_end=143346 + _globals['_BGPPREFIXIPV6UNICASTFILTER_ORIGIN']._serialized_start=24575 + _globals['_BGPPREFIXIPV6UNICASTFILTER_ORIGIN']._serialized_end=24642 + _globals['_BGPPREFIXIPV6UNICASTFILTER_ORIGIN_ENUM']._serialized_start=24585 + _globals['_BGPPREFIXIPV6UNICASTFILTER_ORIGIN_ENUM']._serialized_end=24642 + _globals['_BGPPREFIXESSTATE']._serialized_start=143349 + _globals['_BGPPREFIXESSTATE']._serialized_end=143539 + _globals['_BGPPREFIXIPV4UNICASTSTATE']._serialized_start=143542 + _globals['_BGPPREFIXIPV4UNICASTSTATE']._serialized_end=144195 + _globals['_BGPPREFIXIPV4UNICASTSTATE_ORIGIN']._serialized_start=24575 + _globals['_BGPPREFIXIPV4UNICASTSTATE_ORIGIN']._serialized_end=24642 + _globals['_BGPPREFIXIPV4UNICASTSTATE_ORIGIN_ENUM']._serialized_start=24585 + _globals['_BGPPREFIXIPV4UNICASTSTATE_ORIGIN_ENUM']._serialized_end=24642 + _globals['_BGPPREFIXIPV6UNICASTSTATE']._serialized_start=144198 + _globals['_BGPPREFIXIPV6UNICASTSTATE']._serialized_end=144851 + _globals['_BGPPREFIXIPV6UNICASTSTATE_ORIGIN']._serialized_start=24575 + _globals['_BGPPREFIXIPV6UNICASTSTATE_ORIGIN']._serialized_end=24642 + _globals['_BGPPREFIXIPV6UNICASTSTATE_ORIGIN_ENUM']._serialized_start=24585 + _globals['_BGPPREFIXIPV6UNICASTSTATE_ORIGIN_ENUM']._serialized_end=24642 + _globals['_RESULTEXTENDEDCOMMUNITY']._serialized_start=144853 + _globals['_RESULTEXTENDEDCOMMUNITY']._serialized_end=144964 + _globals['_RESULTEXTENDEDCOMMUNITYSTRUCTURED']._serialized_start=144967 + _globals['_RESULTEXTENDEDCOMMUNITYSTRUCTURED']._serialized_end=145725 + _globals['_RESULTEXTENDEDCOMMUNITYSTRUCTURED_CHOICE']._serialized_start=145521 + _globals['_RESULTEXTENDEDCOMMUNITYSTRUCTURED_CHOICE']._serialized_end=145714 + _globals['_RESULTEXTENDEDCOMMUNITYSTRUCTURED_CHOICE_ENUM']._serialized_start=145532 + _globals['_RESULTEXTENDEDCOMMUNITYSTRUCTURED_CHOICE_ENUM']._serialized_end=145714 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPEROUTETARGET']._serialized_start=145728 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPEROUTETARGET']._serialized_end=145890 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPEROUTEORIGIN']._serialized_start=145893 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPEROUTEORIGIN']._serialized_end=146055 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE']._serialized_start=146058 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE']._serialized_end=146474 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE_CHOICE']._serialized_start=32360 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE_CHOICE']._serialized_end=32445 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE_CHOICE_ENUM']._serialized_start=32370 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE2OCTETASTYPE_CHOICE_ENUM']._serialized_end=32445 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPEROUTEORIGIN']._serialized_start=146477 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPEROUTEORIGIN']._serialized_end=146646 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPEROUTETARGET']._serialized_start=146649 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPEROUTETARGET']._serialized_end=146818 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE']._serialized_start=146821 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE']._serialized_end=147249 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE_CHOICE']._serialized_start=32360 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE_CHOICE']._serialized_end=32445 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE_CHOICE_ENUM']._serialized_start=32370 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEIPV4ADDRESSTYPE_CHOICE_ENUM']._serialized_end=32445 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPEROUTETARGET']._serialized_start=147252 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPEROUTETARGET']._serialized_end=147414 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPEROUTEORIGIN']._serialized_start=147417 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPEROUTEORIGIN']._serialized_end=147579 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE']._serialized_start=147582 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE']._serialized_end=147998 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE_CHOICE']._serialized_start=32360 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE_CHOICE']._serialized_end=32445 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE_CHOICE_ENUM']._serialized_start=32370 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVE4OCTETASTYPE_CHOICE_ENUM']._serialized_end=32445 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPECOLOR']._serialized_start=148000 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPECOLOR']._serialized_end=148110 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPEENCAPSULATION']._serialized_start=148113 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPEENCAPSULATION']._serialized_end=148249 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE']._serialized_start=148252 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE']._serialized_end=148644 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE_CHOICE']._serialized_start=34482 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE_CHOICE']._serialized_end=34561 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE_CHOICE_ENUM']._serialized_start=34492 + _globals['_RESULTEXTENDEDCOMMUNITYTRANSITIVEOPAQUETYPE_CHOICE_ENUM']._serialized_end=34561 + _globals['_RESULTEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPELINKBANDWIDTH']._serialized_start=148647 + _globals['_RESULTEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPELINKBANDWIDTH']._serialized_end=148798 + _globals['_RESULTEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE']._serialized_start=148801 + _globals['_RESULTEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE']._serialized_end=149113 + _globals['_RESULTEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE_CHOICE']._serialized_start=35321 + _globals['_RESULTEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE_CHOICE']._serialized_end=35382 + _globals['_RESULTEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE_CHOICE_ENUM']._serialized_start=35331 + _globals['_RESULTEXTENDEDCOMMUNITYNONTRANSITIVE2OCTETASTYPE_CHOICE_ENUM']._serialized_end=35382 + _globals['_RESULTBGPCOMMUNITY']._serialized_start=149116 + _globals['_RESULTBGPCOMMUNITY']._serialized_end=149420 + _globals['_RESULTBGPCOMMUNITY_TYPE']._serialized_start=24904 + _globals['_RESULTBGPCOMMUNITY_TYPE']._serialized_end=25046 + _globals['_RESULTBGPCOMMUNITY_TYPE_ENUM']._serialized_start=24913 + _globals['_RESULTBGPCOMMUNITY_TYPE_ENUM']._serialized_end=25046 + _globals['_RESULTBGPASPATH']._serialized_start=149422 + _globals['_RESULTBGPASPATH']._serialized_end=149486 + _globals['_RESULTBGPASPATHSEGMENT']._serialized_start=149489 + _globals['_RESULTBGPASPATHSEGMENT']._serialized_end=149695 + _globals['_RESULTBGPASPATHSEGMENT_TYPE']._serialized_start=26007 + _globals['_RESULTBGPASPATHSEGMENT_TYPE']._serialized_end=26100 + _globals['_RESULTBGPASPATHSEGMENT_TYPE_ENUM']._serialized_start=26015 + _globals['_RESULTBGPASPATHSEGMENT_TYPE_ENUM']._serialized_end=26100 + _globals['_ISISLSPSSTATEREQUEST']._serialized_start=149697 + _globals['_ISISLSPSSTATEREQUEST']._serialized_end=149746 + _globals['_ISISLSPSSTATE']._serialized_start=149748 + _globals['_ISISLSPSSTATE']._serialized_end=149848 + _globals['_ISISLSPSTATE']._serialized_start=149851 + _globals['_ISISLSPSTATE']._serialized_end=150273 + _globals['_ISISLSPSTATE_PDUTYPE']._serialized_start=150119 + _globals['_ISISLSPSTATE_PDUTYPE']._serialized_end=150179 + _globals['_ISISLSPSTATE_PDUTYPE_ENUM']._serialized_start=16003 + _globals['_ISISLSPSTATE_PDUTYPE_ENUM']._serialized_end=16052 + _globals['_ISISLSPTLVS']._serialized_start=150276 + _globals['_ISISLSPTLVS']._serialized_end=150784 + _globals['_ISISLSPHOSTNAME']._serialized_start=150786 + _globals['_ISISLSPHOSTNAME']._serialized_end=150839 + _globals['_ISISLSPFLAGS']._serialized_start=150842 + _globals['_ISISLSPFLAGS']._serialized_end=151144 + _globals['_ISISLSPISREACHABILITYTLV']._serialized_start=151146 + _globals['_ISISLSPISREACHABILITYTLV']._serialized_end=151213 + _globals['_ISISLSPEXTENDEDISREACHABILITYTLV']._serialized_start=151215 + _globals['_ISISLSPEXTENDEDISREACHABILITYTLV']._serialized_end=151290 + _globals['_ISISLSPNEIGHBOR']._serialized_start=151292 + _globals['_ISISLSPNEIGHBOR']._serialized_end=151347 + _globals['_ISISLSPIPV4INTERNALREACHABILITYTLV']._serialized_start=151349 + _globals['_ISISLSPIPV4INTERNALREACHABILITYTLV']._serialized_end=151425 + _globals['_ISISLSPIPV4EXTERNALREACHABILITYTLV']._serialized_start=151427 + _globals['_ISISLSPIPV4EXTERNALREACHABILITYTLV']._serialized_end=151503 + _globals['_ISISLSPV4PREFIX']._serialized_start=151506 + _globals['_ISISLSPV4PREFIX']._serialized_end=151977 + _globals['_ISISLSPV4PREFIX_REDISTRIBUTIONTYPE']._serialized_start=19430 + _globals['_ISISLSPV4PREFIX_REDISTRIBUTIONTYPE']._serialized_end=19493 + _globals['_ISISLSPV4PREFIX_REDISTRIBUTIONTYPE_ENUM']._serialized_start=19452 + _globals['_ISISLSPV4PREFIX_REDISTRIBUTIONTYPE_ENUM']._serialized_end=19493 + _globals['_ISISLSPV4PREFIX_ORIGINTYPE']._serialized_start=19363 + _globals['_ISISLSPV4PREFIX_ORIGINTYPE']._serialized_end=19428 + _globals['_ISISLSPV4PREFIX_ORIGINTYPE_ENUM']._serialized_start=19377 + _globals['_ISISLSPV4PREFIX_ORIGINTYPE_ENUM']._serialized_end=19428 + _globals['_ISISLSPEXTENDEDIPV4REACHABILITYTLV']._serialized_start=151979 + _globals['_ISISLSPEXTENDEDIPV4REACHABILITYTLV']._serialized_end=152063 + _globals['_ISISLSPEXTENDEDV4PREFIX']._serialized_start=152066 + _globals['_ISISLSPEXTENDEDV4PREFIX']._serialized_end=152447 + _globals['_ISISLSPEXTENDEDV4PREFIX_REDISTRIBUTIONTYPE']._serialized_start=19430 + _globals['_ISISLSPEXTENDEDV4PREFIX_REDISTRIBUTIONTYPE']._serialized_end=19493 + _globals['_ISISLSPEXTENDEDV4PREFIX_REDISTRIBUTIONTYPE_ENUM']._serialized_start=19452 + _globals['_ISISLSPEXTENDEDV4PREFIX_REDISTRIBUTIONTYPE_ENUM']._serialized_end=19493 + _globals['_ISISLSPIPV6REACHABILITYTLV']._serialized_start=152449 + _globals['_ISISLSPIPV6REACHABILITYTLV']._serialized_end=152517 + _globals['_ISISLSPV6PREFIX']._serialized_start=152520 + _globals['_ISISLSPV6PREFIX']._serialized_end=153032 + _globals['_ISISLSPV6PREFIX_REDISTRIBUTIONTYPE']._serialized_start=19430 + _globals['_ISISLSPV6PREFIX_REDISTRIBUTIONTYPE']._serialized_end=19493 + _globals['_ISISLSPV6PREFIX_REDISTRIBUTIONTYPE_ENUM']._serialized_start=19452 + _globals['_ISISLSPV6PREFIX_REDISTRIBUTIONTYPE_ENUM']._serialized_end=19493 + _globals['_ISISLSPV6PREFIX_ORIGINTYPE']._serialized_start=19363 + _globals['_ISISLSPV6PREFIX_ORIGINTYPE']._serialized_end=19428 + _globals['_ISISLSPV6PREFIX_ORIGINTYPE_ENUM']._serialized_start=19377 + _globals['_ISISLSPV6PREFIX_ORIGINTYPE_ENUM']._serialized_end=19428 + _globals['_ISISLSPPREFIXATTRIBUTES']._serialized_start=153034 + _globals['_ISISLSPPREFIXATTRIBUTES']._serialized_end=153155 + _globals['_LLDPNEIGHBORSSTATEREQUEST']._serialized_start=153157 + _globals['_LLDPNEIGHBORSSTATEREQUEST']._serialized_end=153233 + _globals['_LLDPNEIGHBORSSTATE']._serialized_start=153236 + _globals['_LLDPNEIGHBORSSTATE']._serialized_end=154399 + _globals['_LLDPNEIGHBORSSTATE_CHASSISIDTYPE']._serialized_start=153815 + _globals['_LLDPNEIGHBORSSTATE_CHASSISIDTYPE']._serialized_end=153989 + _globals['_LLDPNEIGHBORSSTATE_CHASSISIDTYPE_ENUM']._serialized_start=153833 + _globals['_LLDPNEIGHBORSSTATE_CHASSISIDTYPE_ENUM']._serialized_end=153989 + _globals['_LLDPNEIGHBORSSTATE_PORTIDTYPE']._serialized_start=153992 + _globals['_LLDPNEIGHBORSSTATE_PORTIDTYPE']._serialized_end=154162 + _globals['_LLDPNEIGHBORSSTATE_PORTIDTYPE_ENUM']._serialized_start=154007 + _globals['_LLDPNEIGHBORSSTATE_PORTIDTYPE_ENUM']._serialized_end=154162 + _globals['_LLDPCUSTOMTLVSTATE']._serialized_start=154402 + _globals['_LLDPCUSTOMTLVSTATE']._serialized_end=154574 + _globals['_LLDPCAPABILITYSTATE']._serialized_start=154577 + _globals['_LLDPCAPABILITYSTATE']._serialized_end=154977 + _globals['_LLDPCAPABILITYSTATE_CAPABILITYNAME']._serialized_start=154710 + _globals['_LLDPCAPABILITYSTATE_CAPABILITYNAME']._serialized_end=154934 + _globals['_LLDPCAPABILITYSTATE_CAPABILITYNAME_ENUM']._serialized_start=154729 + _globals['_LLDPCAPABILITYSTATE_CAPABILITYNAME_ENUM']._serialized_end=154934 + _globals['_RSVPLSPSSTATEREQUEST']._serialized_start=154979 + _globals['_RSVPLSPSSTATEREQUEST']._serialized_end=155028 + _globals['_RSVPLSPSSTATE']._serialized_start=155030 + _globals['_RSVPLSPSSTATE']._serialized_end=155139 + _globals['_RSVPIPV4LSPSTATE']._serialized_start=155142 + _globals['_RSVPIPV4LSPSTATE']._serialized_end=155368 + _globals['_RSVPLSPSTATE']._serialized_start=155371 + _globals['_RSVPLSPSTATE']._serialized_end=155935 + _globals['_RSVPLSPSTATE_SESSIONSTATUS']._serialized_start=155665 + _globals['_RSVPLSPSTATE_SESSIONSTATUS']._serialized_end=155723 + _globals['_RSVPLSPSTATE_SESSIONSTATUS_ENUM']._serialized_start=19452 + _globals['_RSVPLSPSTATE_SESSIONSTATUS_ENUM']._serialized_end=19493 + _globals['_RSVPLSPSTATE_LASTFLAPREASON']._serialized_start=155725 + _globals['_RSVPLSPSTATE_LASTFLAPREASON']._serialized_end=155814 + _globals['_RSVPLSPSTATE_LASTFLAPREASON_ENUM']._serialized_start=155743 + _globals['_RSVPLSPSTATE_LASTFLAPREASON_ENUM']._serialized_end=155814 + _globals['_RSVPLSPIPV4RRO']._serialized_start=155937 + _globals['_RSVPLSPIPV4RRO']._serialized_end=156035 + _globals['_RSVPLSPIPV4ERO']._serialized_start=156038 + _globals['_RSVPLSPIPV4ERO']._serialized_end=156280 + _globals['_RSVPLSPIPV4ERO_TYPE']._serialized_start=156145 + _globals['_RSVPLSPIPV4ERO_TYPE']._serialized_end=156252 + _globals['_RSVPLSPIPV4ERO_TYPE_ENUM']._serialized_start=156153 + _globals['_RSVPLSPIPV4ERO_TYPE_ENUM']._serialized_end=156252 + _globals['_DHCPV4INTERFACESTATEREQUEST']._serialized_start=156282 + _globals['_DHCPV4INTERFACESTATEREQUEST']._serialized_end=156338 + _globals['_DHCPV4INTERFACESTATE']._serialized_start=156341 + _globals['_DHCPV4INTERFACESTATE']._serialized_end=156677 + _globals['_DHCPV4LEASESTATEREQUEST']._serialized_start=156679 + _globals['_DHCPV4LEASESTATEREQUEST']._serialized_end=156731 + _globals['_DHCPV4LEASESSTATE']._serialized_start=156733 + _globals['_DHCPV4LEASESSTATE']._serialized_end=156843 + _globals['_DHCPV4LEASESTATE']._serialized_start=156846 + _globals['_DHCPV4LEASESTATE']._serialized_end=157184 + _globals['_DHCPV6INTERFACESTATEREQUEST']._serialized_start=157186 + _globals['_DHCPV6INTERFACESTATEREQUEST']._serialized_end=157242 + _globals['_DHCPV6INTERFACESTATE']._serialized_start=157245 + _globals['_DHCPV6INTERFACESTATE']._serialized_end=157415 + _globals['_DHCPV6INTERFACEIAPD']._serialized_start=157418 + _globals['_DHCPV6INTERFACEIAPD']._serialized_end=157559 + _globals['_DHCPV6INTERFACEIA']._serialized_start=157561 + _globals['_DHCPV6INTERFACEIA']._serialized_end=157688 + _globals['_DHCPV6LEASESTATEREQUEST']._serialized_start=157690 + _globals['_DHCPV6LEASESTATEREQUEST']._serialized_end=157742 + _globals['_DHCPV6LEASESSTATE']._serialized_start=157744 + _globals['_DHCPV6LEASESSTATE']._serialized_end=157860 + _globals['_DHCPV6SERVERLEASESTATE']._serialized_start=157863 + _globals['_DHCPV6SERVERLEASESTATE']._serialized_end=158211 + _globals['_OSPFV2LSASSTATEREQUEST']._serialized_start=158213 + _globals['_OSPFV2LSASSTATEREQUEST']._serialized_end=158259 + _globals['_OSPFV2LSASTATE']._serialized_start=158262 + _globals['_OSPFV2LSASTATE']._serialized_end=158652 + _globals['_OSPFV2ROUTERLSA']._serialized_start=158654 + _globals['_OSPFV2ROUTERLSA']._serialized_end=158741 + _globals['_OSPFV2NETWORKLSA']._serialized_start=158744 + _globals['_OSPFV2NETWORKLSA']._serialized_end=158873 + _globals['_OSPFV2NETWORKSUMMARYLSA']._serialized_start=158876 + _globals['_OSPFV2NETWORKSUMMARYLSA']._serialized_end=159015 + _globals['_OSPFV2SUMMARYASLSA']._serialized_start=159018 + _globals['_OSPFV2SUMMARYASLSA']._serialized_end=159152 + _globals['_OSPFV2EXTERNALASLSA']._serialized_start=159155 + _globals['_OSPFV2EXTERNALASLSA']._serialized_end=159332 + _globals['_OSPFV2NSSALSA']._serialized_start=159335 + _globals['_OSPFV2NSSALSA']._serialized_end=159562 + _globals['_OSPFV2OPAQUELSA']._serialized_start=159565 + _globals['_OSPFV2OPAQUELSA']._serialized_end=159746 + _globals['_OSPFV2OPAQUELSA_TYPE']._serialized_start=159673 + _globals['_OSPFV2OPAQUELSA_TYPE']._serialized_end=159737 + _globals['_OSPFV2OPAQUELSA_TYPE_ENUM']._serialized_start=159681 + _globals['_OSPFV2OPAQUELSA_TYPE_ENUM']._serialized_end=159737 + _globals['_OSPFV2LSAHEADER']._serialized_start=159749 + _globals['_OSPFV2LSAHEADER']._serialized_end=159978 + _globals['_OSPFV2LINK']._serialized_start=159981 + _globals['_OSPFV2LINK']._serialized_end=160221 + _globals['_OSPFV2LINK_TYPE']._serialized_start=160098 + _globals['_OSPFV2LINK_TYPE']._serialized_end=160185 + _globals['_OSPFV2LINK_TYPE_ENUM']._serialized_start=160106 + _globals['_OSPFV2LINK_TYPE_ENUM']._serialized_end=160185 + _globals['_CAPTUREREQUEST']._serialized_start=160223 + _globals['_CAPTUREREQUEST']._serialized_end=160277 + _globals['_PATTERNFLOWETHERNETDSTCOUNTER']._serialized_start=160279 + _globals['_PATTERNFLOWETHERNETDSTCOUNTER']._serialized_end=160398 + _globals['_PATTERNFLOWETHERNETDSTMETRICTAG']._serialized_start=160400 + _globals['_PATTERNFLOWETHERNETDSTMETRICTAG']._serialized_end=160525 + _globals['_PATTERNFLOWETHERNETDST']._serialized_start=160528 + _globals['_PATTERNFLOWETHERNETDST']._serialized_end=160966 + _globals['_PATTERNFLOWETHERNETDST_CHOICE']._serialized_start=160840 + _globals['_PATTERNFLOWETHERNETDST_CHOICE']._serialized_end=160936 + _globals['_PATTERNFLOWETHERNETDST_CHOICE_ENUM']._serialized_start=160850 + _globals['_PATTERNFLOWETHERNETDST_CHOICE_ENUM']._serialized_end=160936 + _globals['_PATTERNFLOWETHERNETSRCCOUNTER']._serialized_start=160968 + _globals['_PATTERNFLOWETHERNETSRCCOUNTER']._serialized_end=161087 + _globals['_PATTERNFLOWETHERNETSRCMETRICTAG']._serialized_start=161089 + _globals['_PATTERNFLOWETHERNETSRCMETRICTAG']._serialized_end=161214 + _globals['_PATTERNFLOWETHERNETSRC']._serialized_start=161217 + _globals['_PATTERNFLOWETHERNETSRC']._serialized_end=161617 + _globals['_PATTERNFLOWETHERNETSRC_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWETHERNETSRC_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWETHERNETSRC_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWETHERNETSRC_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWETHERNETETHERTYPECOUNTER']._serialized_start=161619 + _globals['_PATTERNFLOWETHERNETETHERTYPECOUNTER']._serialized_end=161744 + _globals['_PATTERNFLOWETHERNETETHERTYPEMETRICTAG']._serialized_start=161747 + _globals['_PATTERNFLOWETHERNETETHERTYPEMETRICTAG']._serialized_end=161878 + _globals['_PATTERNFLOWETHERNETETHERTYPE']._serialized_start=161881 + _globals['_PATTERNFLOWETHERNETETHERTYPE']._serialized_end=162349 + _globals['_PATTERNFLOWETHERNETETHERTYPE_CHOICE']._serialized_start=160840 + _globals['_PATTERNFLOWETHERNETETHERTYPE_CHOICE']._serialized_end=160936 + _globals['_PATTERNFLOWETHERNETETHERTYPE_CHOICE_ENUM']._serialized_start=160850 + _globals['_PATTERNFLOWETHERNETETHERTYPE_CHOICE_ENUM']._serialized_end=160936 + _globals['_PATTERNFLOWETHERNETPFCQUEUECOUNTER']._serialized_start=162351 + _globals['_PATTERNFLOWETHERNETPFCQUEUECOUNTER']._serialized_end=162475 + _globals['_PATTERNFLOWETHERNETPFCQUEUEMETRICTAG']._serialized_start=162478 + _globals['_PATTERNFLOWETHERNETPFCQUEUEMETRICTAG']._serialized_end=162608 + _globals['_PATTERNFLOWETHERNETPFCQUEUE']._serialized_start=162611 + _globals['_PATTERNFLOWETHERNETPFCQUEUE']._serialized_end=163036 + _globals['_PATTERNFLOWETHERNETPFCQUEUE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWETHERNETPFCQUEUE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWETHERNETPFCQUEUE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWETHERNETPFCQUEUE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWVLANPRIORITYCOUNTER']._serialized_start=163038 + _globals['_PATTERNFLOWVLANPRIORITYCOUNTER']._serialized_end=163158 + _globals['_PATTERNFLOWVLANPRIORITYMETRICTAG']._serialized_start=163160 + _globals['_PATTERNFLOWVLANPRIORITYMETRICTAG']._serialized_end=163286 + _globals['_PATTERNFLOWVLANPRIORITY']._serialized_start=163289 + _globals['_PATTERNFLOWVLANPRIORITY']._serialized_end=163694 + _globals['_PATTERNFLOWVLANPRIORITY_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWVLANPRIORITY_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWVLANPRIORITY_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWVLANPRIORITY_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWVLANCFICOUNTER']._serialized_start=163696 + _globals['_PATTERNFLOWVLANCFICOUNTER']._serialized_end=163811 + _globals['_PATTERNFLOWVLANCFIMETRICTAG']._serialized_start=163813 + _globals['_PATTERNFLOWVLANCFIMETRICTAG']._serialized_end=163934 + _globals['_PATTERNFLOWVLANCFI']._serialized_start=163937 + _globals['_PATTERNFLOWVLANCFI']._serialized_end=164317 + _globals['_PATTERNFLOWVLANCFI_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWVLANCFI_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWVLANCFI_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWVLANCFI_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWVLANIDCOUNTER']._serialized_start=164319 + _globals['_PATTERNFLOWVLANIDCOUNTER']._serialized_end=164433 + _globals['_PATTERNFLOWVLANIDMETRICTAG']._serialized_start=164435 + _globals['_PATTERNFLOWVLANIDMETRICTAG']._serialized_end=164555 + _globals['_PATTERNFLOWVLANID']._serialized_start=164558 + _globals['_PATTERNFLOWVLANID']._serialized_end=164933 + _globals['_PATTERNFLOWVLANID_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWVLANID_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWVLANID_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWVLANID_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWVLANTPIDCOUNTER']._serialized_start=164935 + _globals['_PATTERNFLOWVLANTPIDCOUNTER']._serialized_end=165051 + _globals['_PATTERNFLOWVLANTPIDMETRICTAG']._serialized_start=165053 + _globals['_PATTERNFLOWVLANTPIDMETRICTAG']._serialized_end=165175 + _globals['_PATTERNFLOWVLANTPID']._serialized_start=165178 + _globals['_PATTERNFLOWVLANTPID']._serialized_end=165563 + _globals['_PATTERNFLOWVLANTPID_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWVLANTPID_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWVLANTPID_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWVLANTPID_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWVXLANFLAGSCOUNTER']._serialized_start=165565 + _globals['_PATTERNFLOWVXLANFLAGSCOUNTER']._serialized_end=165683 + _globals['_PATTERNFLOWVXLANFLAGSMETRICTAG']._serialized_start=165685 + _globals['_PATTERNFLOWVXLANFLAGSMETRICTAG']._serialized_end=165809 + _globals['_PATTERNFLOWVXLANFLAGS']._serialized_start=165812 + _globals['_PATTERNFLOWVXLANFLAGS']._serialized_end=166207 + _globals['_PATTERNFLOWVXLANFLAGS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWVXLANFLAGS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWVXLANFLAGS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWVXLANFLAGS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWVXLANRESERVED0COUNTER']._serialized_start=166209 + _globals['_PATTERNFLOWVXLANRESERVED0COUNTER']._serialized_end=166331 + _globals['_PATTERNFLOWVXLANRESERVED0METRICTAG']._serialized_start=166334 + _globals['_PATTERNFLOWVXLANRESERVED0METRICTAG']._serialized_end=166462 + _globals['_PATTERNFLOWVXLANRESERVED0']._serialized_start=166465 + _globals['_PATTERNFLOWVXLANRESERVED0']._serialized_end=166880 + _globals['_PATTERNFLOWVXLANRESERVED0_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWVXLANRESERVED0_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWVXLANRESERVED0_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWVXLANRESERVED0_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWVXLANVNICOUNTER']._serialized_start=166882 + _globals['_PATTERNFLOWVXLANVNICOUNTER']._serialized_end=166998 + _globals['_PATTERNFLOWVXLANVNIMETRICTAG']._serialized_start=167000 + _globals['_PATTERNFLOWVXLANVNIMETRICTAG']._serialized_end=167122 + _globals['_PATTERNFLOWVXLANVNI']._serialized_start=167125 + _globals['_PATTERNFLOWVXLANVNI']._serialized_end=167548 + _globals['_PATTERNFLOWVXLANVNI_CHOICE']._serialized_start=160840 + _globals['_PATTERNFLOWVXLANVNI_CHOICE']._serialized_end=160936 + _globals['_PATTERNFLOWVXLANVNI_CHOICE_ENUM']._serialized_start=160850 + _globals['_PATTERNFLOWVXLANVNI_CHOICE_ENUM']._serialized_end=160936 + _globals['_PATTERNFLOWVXLANRESERVED1COUNTER']._serialized_start=167550 + _globals['_PATTERNFLOWVXLANRESERVED1COUNTER']._serialized_end=167672 + _globals['_PATTERNFLOWVXLANRESERVED1METRICTAG']._serialized_start=167675 + _globals['_PATTERNFLOWVXLANRESERVED1METRICTAG']._serialized_end=167803 + _globals['_PATTERNFLOWVXLANRESERVED1']._serialized_start=167806 + _globals['_PATTERNFLOWVXLANRESERVED1']._serialized_end=168221 + _globals['_PATTERNFLOWVXLANRESERVED1_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWVXLANRESERVED1_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWVXLANRESERVED1_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWVXLANRESERVED1_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4VERSIONCOUNTER']._serialized_start=168223 + _globals['_PATTERNFLOWIPV4VERSIONCOUNTER']._serialized_end=168342 + _globals['_PATTERNFLOWIPV4VERSIONMETRICTAG']._serialized_start=168344 + _globals['_PATTERNFLOWIPV4VERSIONMETRICTAG']._serialized_end=168469 + _globals['_PATTERNFLOWIPV4VERSION']._serialized_start=168472 + _globals['_PATTERNFLOWIPV4VERSION']._serialized_end=168872 + _globals['_PATTERNFLOWIPV4VERSION_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4VERSION_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4VERSION_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4VERSION_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4HEADERLENGTHCOUNTER']._serialized_start=168874 + _globals['_PATTERNFLOWIPV4HEADERLENGTHCOUNTER']._serialized_end=168998 + _globals['_PATTERNFLOWIPV4HEADERLENGTHMETRICTAG']._serialized_start=169001 + _globals['_PATTERNFLOWIPV4HEADERLENGTHMETRICTAG']._serialized_end=169131 + _globals['_PATTERNFLOWIPV4HEADERLENGTH']._serialized_start=169134 + _globals['_PATTERNFLOWIPV4HEADERLENGTH']._serialized_end=169597 + _globals['_PATTERNFLOWIPV4HEADERLENGTH_CHOICE']._serialized_start=160840 + _globals['_PATTERNFLOWIPV4HEADERLENGTH_CHOICE']._serialized_end=160936 + _globals['_PATTERNFLOWIPV4HEADERLENGTH_CHOICE_ENUM']._serialized_start=160850 + _globals['_PATTERNFLOWIPV4HEADERLENGTH_CHOICE_ENUM']._serialized_end=160936 + _globals['_PATTERNFLOWIPV4TOTALLENGTHCOUNTER']._serialized_start=169599 + _globals['_PATTERNFLOWIPV4TOTALLENGTHCOUNTER']._serialized_end=169722 + _globals['_PATTERNFLOWIPV4TOTALLENGTHMETRICTAG']._serialized_start=169725 + _globals['_PATTERNFLOWIPV4TOTALLENGTHMETRICTAG']._serialized_end=169854 + _globals['_PATTERNFLOWIPV4TOTALLENGTH']._serialized_start=169857 + _globals['_PATTERNFLOWIPV4TOTALLENGTH']._serialized_end=170315 + _globals['_PATTERNFLOWIPV4TOTALLENGTH_CHOICE']._serialized_start=160840 + _globals['_PATTERNFLOWIPV4TOTALLENGTH_CHOICE']._serialized_end=160936 + _globals['_PATTERNFLOWIPV4TOTALLENGTH_CHOICE_ENUM']._serialized_start=160850 + _globals['_PATTERNFLOWIPV4TOTALLENGTH_CHOICE_ENUM']._serialized_end=160936 + _globals['_PATTERNFLOWIPV4IDENTIFICATIONCOUNTER']._serialized_start=170317 + _globals['_PATTERNFLOWIPV4IDENTIFICATIONCOUNTER']._serialized_end=170443 + _globals['_PATTERNFLOWIPV4IDENTIFICATIONMETRICTAG']._serialized_start=170446 + _globals['_PATTERNFLOWIPV4IDENTIFICATIONMETRICTAG']._serialized_end=170578 + _globals['_PATTERNFLOWIPV4IDENTIFICATION']._serialized_start=170581 + _globals['_PATTERNFLOWIPV4IDENTIFICATION']._serialized_end=171016 + _globals['_PATTERNFLOWIPV4IDENTIFICATION_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4IDENTIFICATION_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4IDENTIFICATION_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4IDENTIFICATION_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4RESERVEDCOUNTER']._serialized_start=171018 + _globals['_PATTERNFLOWIPV4RESERVEDCOUNTER']._serialized_end=171138 + _globals['_PATTERNFLOWIPV4RESERVEDMETRICTAG']._serialized_start=171140 + _globals['_PATTERNFLOWIPV4RESERVEDMETRICTAG']._serialized_end=171266 + _globals['_PATTERNFLOWIPV4RESERVED']._serialized_start=171269 + _globals['_PATTERNFLOWIPV4RESERVED']._serialized_end=171674 + _globals['_PATTERNFLOWIPV4RESERVED_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4RESERVED_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4RESERVED_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4RESERVED_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4DONTFRAGMENTCOUNTER']._serialized_start=171676 + _globals['_PATTERNFLOWIPV4DONTFRAGMENTCOUNTER']._serialized_end=171800 + _globals['_PATTERNFLOWIPV4DONTFRAGMENTMETRICTAG']._serialized_start=171803 + _globals['_PATTERNFLOWIPV4DONTFRAGMENTMETRICTAG']._serialized_end=171933 + _globals['_PATTERNFLOWIPV4DONTFRAGMENT']._serialized_start=171936 + _globals['_PATTERNFLOWIPV4DONTFRAGMENT']._serialized_end=172361 + _globals['_PATTERNFLOWIPV4DONTFRAGMENT_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4DONTFRAGMENT_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4DONTFRAGMENT_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4DONTFRAGMENT_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4MOREFRAGMENTSCOUNTER']._serialized_start=172363 + _globals['_PATTERNFLOWIPV4MOREFRAGMENTSCOUNTER']._serialized_end=172488 + _globals['_PATTERNFLOWIPV4MOREFRAGMENTSMETRICTAG']._serialized_start=172491 + _globals['_PATTERNFLOWIPV4MOREFRAGMENTSMETRICTAG']._serialized_end=172622 + _globals['_PATTERNFLOWIPV4MOREFRAGMENTS']._serialized_start=172625 + _globals['_PATTERNFLOWIPV4MOREFRAGMENTS']._serialized_end=173055 + _globals['_PATTERNFLOWIPV4MOREFRAGMENTS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4MOREFRAGMENTS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4MOREFRAGMENTS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4MOREFRAGMENTS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4FRAGMENTOFFSETCOUNTER']._serialized_start=173057 + _globals['_PATTERNFLOWIPV4FRAGMENTOFFSETCOUNTER']._serialized_end=173183 + _globals['_PATTERNFLOWIPV4FRAGMENTOFFSETMETRICTAG']._serialized_start=173186 + _globals['_PATTERNFLOWIPV4FRAGMENTOFFSETMETRICTAG']._serialized_end=173318 + _globals['_PATTERNFLOWIPV4FRAGMENTOFFSET']._serialized_start=173321 + _globals['_PATTERNFLOWIPV4FRAGMENTOFFSET']._serialized_end=173756 + _globals['_PATTERNFLOWIPV4FRAGMENTOFFSET_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4FRAGMENTOFFSET_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4FRAGMENTOFFSET_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4FRAGMENTOFFSET_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4TIMETOLIVECOUNTER']._serialized_start=173758 + _globals['_PATTERNFLOWIPV4TIMETOLIVECOUNTER']._serialized_end=173880 + _globals['_PATTERNFLOWIPV4TIMETOLIVEMETRICTAG']._serialized_start=173883 + _globals['_PATTERNFLOWIPV4TIMETOLIVEMETRICTAG']._serialized_end=174011 + _globals['_PATTERNFLOWIPV4TIMETOLIVE']._serialized_start=174014 + _globals['_PATTERNFLOWIPV4TIMETOLIVE']._serialized_end=174429 + _globals['_PATTERNFLOWIPV4TIMETOLIVE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4TIMETOLIVE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4TIMETOLIVE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4TIMETOLIVE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4PROTOCOLCOUNTER']._serialized_start=174431 + _globals['_PATTERNFLOWIPV4PROTOCOLCOUNTER']._serialized_end=174551 + _globals['_PATTERNFLOWIPV4PROTOCOLMETRICTAG']._serialized_start=174553 + _globals['_PATTERNFLOWIPV4PROTOCOLMETRICTAG']._serialized_end=174679 + _globals['_PATTERNFLOWIPV4PROTOCOL']._serialized_start=174682 + _globals['_PATTERNFLOWIPV4PROTOCOL']._serialized_end=175125 + _globals['_PATTERNFLOWIPV4PROTOCOL_CHOICE']._serialized_start=160840 + _globals['_PATTERNFLOWIPV4PROTOCOL_CHOICE']._serialized_end=160936 + _globals['_PATTERNFLOWIPV4PROTOCOL_CHOICE_ENUM']._serialized_start=160850 + _globals['_PATTERNFLOWIPV4PROTOCOL_CHOICE_ENUM']._serialized_end=160936 + _globals['_PATTERNFLOWIPV4HEADERCHECKSUM']._serialized_start=175128 + _globals['_PATTERNFLOWIPV4HEADERCHECKSUM']._serialized_end=175479 + _globals['_PATTERNFLOWIPV4HEADERCHECKSUM_CHOICE']._serialized_start=175326 + _globals['_PATTERNFLOWIPV4HEADERCHECKSUM_CHOICE']._serialized_end=175386 + _globals['_PATTERNFLOWIPV4HEADERCHECKSUM_CHOICE_ENUM']._serialized_start=175336 + _globals['_PATTERNFLOWIPV4HEADERCHECKSUM_CHOICE_ENUM']._serialized_end=175386 + _globals['_PATTERNFLOWIPV4HEADERCHECKSUM_GENERATED']._serialized_start=175388 + _globals['_PATTERNFLOWIPV4HEADERCHECKSUM_GENERATED']._serialized_end=175443 + _globals['_PATTERNFLOWIPV4HEADERCHECKSUM_GENERATED_ENUM']._serialized_start=175401 + _globals['_PATTERNFLOWIPV4HEADERCHECKSUM_GENERATED_ENUM']._serialized_end=175443 + _globals['_PATTERNFLOWIPV4SRCCOUNTER']._serialized_start=175481 + _globals['_PATTERNFLOWIPV4SRCCOUNTER']._serialized_end=175596 + _globals['_PATTERNFLOWIPV4SRCMETRICTAG']._serialized_start=175598 + _globals['_PATTERNFLOWIPV4SRCMETRICTAG']._serialized_end=175719 + _globals['_PATTERNFLOWIPV4SRCRANDOM']._serialized_start=175722 + _globals['_PATTERNFLOWIPV4SRCRANDOM']._serialized_end=175858 + _globals['_PATTERNFLOWIPV4SRC']._serialized_start=175861 + _globals['_PATTERNFLOWIPV4SRC']._serialized_end=176343 + _globals['_PATTERNFLOWIPV4SRC_CHOICE']._serialized_start=176214 + _globals['_PATTERNFLOWIPV4SRC_CHOICE']._serialized_end=176322 + _globals['_PATTERNFLOWIPV4SRC_CHOICE_ENUM']._serialized_start=176224 + _globals['_PATTERNFLOWIPV4SRC_CHOICE_ENUM']._serialized_end=176322 + _globals['_PATTERNFLOWIPV4DSTCOUNTER']._serialized_start=176345 + _globals['_PATTERNFLOWIPV4DSTCOUNTER']._serialized_end=176460 + _globals['_PATTERNFLOWIPV4DSTMETRICTAG']._serialized_start=176462 + _globals['_PATTERNFLOWIPV4DSTMETRICTAG']._serialized_end=176583 + _globals['_PATTERNFLOWIPV4DSTRANDOM']._serialized_start=176586 + _globals['_PATTERNFLOWIPV4DSTRANDOM']._serialized_end=176722 + _globals['_PATTERNFLOWIPV4DST']._serialized_start=176725 + _globals['_PATTERNFLOWIPV4DST']._serialized_end=177207 + _globals['_PATTERNFLOWIPV4DST_CHOICE']._serialized_start=176214 + _globals['_PATTERNFLOWIPV4DST_CHOICE']._serialized_end=176322 + _globals['_PATTERNFLOWIPV4DST_CHOICE_ENUM']._serialized_start=176224 + _globals['_PATTERNFLOWIPV4DST_CHOICE_ENUM']._serialized_end=176322 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAGCOUNTER']._serialized_start=177210 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAGCOUNTER']._serialized_end=177349 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAG']._serialized_start=177352 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAG']._serialized_end=177773 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAG_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAG_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAG_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPECOPIEDFLAG_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASSCOUNTER']._serialized_start=177776 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASSCOUNTER']._serialized_end=177916 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASS']._serialized_start=177919 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASS']._serialized_end=178344 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONCLASS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBERCOUNTER']._serialized_start=178347 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBERCOUNTER']._serialized_end=178488 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBER']._serialized_start=178491 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBER']._serialized_end=178920 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBER_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBER_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBER_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4OPTIONSCUSTOMTYPEOPTIONNUMBER_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4PRIORITYRAWCOUNTER']._serialized_start=178922 + _globals['_PATTERNFLOWIPV4PRIORITYRAWCOUNTER']._serialized_end=179045 + _globals['_PATTERNFLOWIPV4PRIORITYRAWMETRICTAG']._serialized_start=179048 + _globals['_PATTERNFLOWIPV4PRIORITYRAWMETRICTAG']._serialized_end=179177 + _globals['_PATTERNFLOWIPV4PRIORITYRAW']._serialized_start=179180 + _globals['_PATTERNFLOWIPV4PRIORITYRAW']._serialized_end=179600 + _globals['_PATTERNFLOWIPV4PRIORITYRAW_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4PRIORITYRAW_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4PRIORITYRAW_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4PRIORITYRAW_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4DSCPPHBCOUNTER']._serialized_start=179602 + _globals['_PATTERNFLOWIPV4DSCPPHBCOUNTER']._serialized_end=179721 + _globals['_PATTERNFLOWIPV4DSCPPHBMETRICTAG']._serialized_start=179723 + _globals['_PATTERNFLOWIPV4DSCPPHBMETRICTAG']._serialized_end=179848 + _globals['_PATTERNFLOWIPV4DSCPPHB']._serialized_start=179851 + _globals['_PATTERNFLOWIPV4DSCPPHB']._serialized_end=180251 + _globals['_PATTERNFLOWIPV4DSCPPHB_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4DSCPPHB_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4DSCPPHB_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4DSCPPHB_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4DSCPECNCOUNTER']._serialized_start=180253 + _globals['_PATTERNFLOWIPV4DSCPECNCOUNTER']._serialized_end=180372 + _globals['_PATTERNFLOWIPV4DSCPECNMETRICTAG']._serialized_start=180374 + _globals['_PATTERNFLOWIPV4DSCPECNMETRICTAG']._serialized_end=180499 + _globals['_PATTERNFLOWIPV4DSCPECN']._serialized_start=180502 + _globals['_PATTERNFLOWIPV4DSCPECN']._serialized_end=180902 + _globals['_PATTERNFLOWIPV4DSCPECN_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4DSCPECN_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4DSCPECN_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4DSCPECN_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4TOSPRECEDENCECOUNTER']._serialized_start=180904 + _globals['_PATTERNFLOWIPV4TOSPRECEDENCECOUNTER']._serialized_end=181029 + _globals['_PATTERNFLOWIPV4TOSPRECEDENCEMETRICTAG']._serialized_start=181032 + _globals['_PATTERNFLOWIPV4TOSPRECEDENCEMETRICTAG']._serialized_end=181163 + _globals['_PATTERNFLOWIPV4TOSPRECEDENCE']._serialized_start=181166 + _globals['_PATTERNFLOWIPV4TOSPRECEDENCE']._serialized_end=181596 + _globals['_PATTERNFLOWIPV4TOSPRECEDENCE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4TOSPRECEDENCE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4TOSPRECEDENCE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4TOSPRECEDENCE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4TOSDELAYCOUNTER']._serialized_start=181598 + _globals['_PATTERNFLOWIPV4TOSDELAYCOUNTER']._serialized_end=181718 + _globals['_PATTERNFLOWIPV4TOSDELAYMETRICTAG']._serialized_start=181720 + _globals['_PATTERNFLOWIPV4TOSDELAYMETRICTAG']._serialized_end=181846 + _globals['_PATTERNFLOWIPV4TOSDELAY']._serialized_start=181849 + _globals['_PATTERNFLOWIPV4TOSDELAY']._serialized_end=182254 + _globals['_PATTERNFLOWIPV4TOSDELAY_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4TOSDELAY_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4TOSDELAY_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4TOSDELAY_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4TOSTHROUGHPUTCOUNTER']._serialized_start=182256 + _globals['_PATTERNFLOWIPV4TOSTHROUGHPUTCOUNTER']._serialized_end=182381 + _globals['_PATTERNFLOWIPV4TOSTHROUGHPUTMETRICTAG']._serialized_start=182384 + _globals['_PATTERNFLOWIPV4TOSTHROUGHPUTMETRICTAG']._serialized_end=182515 + _globals['_PATTERNFLOWIPV4TOSTHROUGHPUT']._serialized_start=182518 + _globals['_PATTERNFLOWIPV4TOSTHROUGHPUT']._serialized_end=182948 + _globals['_PATTERNFLOWIPV4TOSTHROUGHPUT_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4TOSTHROUGHPUT_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4TOSTHROUGHPUT_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4TOSTHROUGHPUT_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4TOSRELIABILITYCOUNTER']._serialized_start=182950 + _globals['_PATTERNFLOWIPV4TOSRELIABILITYCOUNTER']._serialized_end=183076 + _globals['_PATTERNFLOWIPV4TOSRELIABILITYMETRICTAG']._serialized_start=183079 + _globals['_PATTERNFLOWIPV4TOSRELIABILITYMETRICTAG']._serialized_end=183211 + _globals['_PATTERNFLOWIPV4TOSRELIABILITY']._serialized_start=183214 + _globals['_PATTERNFLOWIPV4TOSRELIABILITY']._serialized_end=183649 + _globals['_PATTERNFLOWIPV4TOSRELIABILITY_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4TOSRELIABILITY_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4TOSRELIABILITY_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4TOSRELIABILITY_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4TOSMONETARYCOUNTER']._serialized_start=183651 + _globals['_PATTERNFLOWIPV4TOSMONETARYCOUNTER']._serialized_end=183774 + _globals['_PATTERNFLOWIPV4TOSMONETARYMETRICTAG']._serialized_start=183777 + _globals['_PATTERNFLOWIPV4TOSMONETARYMETRICTAG']._serialized_end=183906 + _globals['_PATTERNFLOWIPV4TOSMONETARY']._serialized_start=183909 + _globals['_PATTERNFLOWIPV4TOSMONETARY']._serialized_end=184329 + _globals['_PATTERNFLOWIPV4TOSMONETARY_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4TOSMONETARY_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4TOSMONETARY_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4TOSMONETARY_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4TOSUNUSEDCOUNTER']._serialized_start=184331 + _globals['_PATTERNFLOWIPV4TOSUNUSEDCOUNTER']._serialized_end=184452 + _globals['_PATTERNFLOWIPV4TOSUNUSEDMETRICTAG']._serialized_start=184454 + _globals['_PATTERNFLOWIPV4TOSUNUSEDMETRICTAG']._serialized_end=184581 + _globals['_PATTERNFLOWIPV4TOSUNUSED']._serialized_start=184584 + _globals['_PATTERNFLOWIPV4TOSUNUSED']._serialized_end=184994 + _globals['_PATTERNFLOWIPV4TOSUNUSED_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV4TOSUNUSED_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV4TOSUNUSED_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV4TOSUNUSED_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV6VERSIONCOUNTER']._serialized_start=184996 + _globals['_PATTERNFLOWIPV6VERSIONCOUNTER']._serialized_end=185115 + _globals['_PATTERNFLOWIPV6VERSIONMETRICTAG']._serialized_start=185117 + _globals['_PATTERNFLOWIPV6VERSIONMETRICTAG']._serialized_end=185242 + _globals['_PATTERNFLOWIPV6VERSION']._serialized_start=185245 + _globals['_PATTERNFLOWIPV6VERSION']._serialized_end=185645 + _globals['_PATTERNFLOWIPV6VERSION_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV6VERSION_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV6VERSION_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV6VERSION_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV6TRAFFICCLASSCOUNTER']._serialized_start=185647 + _globals['_PATTERNFLOWIPV6TRAFFICCLASSCOUNTER']._serialized_end=185771 + _globals['_PATTERNFLOWIPV6TRAFFICCLASSMETRICTAG']._serialized_start=185774 + _globals['_PATTERNFLOWIPV6TRAFFICCLASSMETRICTAG']._serialized_end=185904 + _globals['_PATTERNFLOWIPV6TRAFFICCLASS']._serialized_start=185907 + _globals['_PATTERNFLOWIPV6TRAFFICCLASS']._serialized_end=186332 + _globals['_PATTERNFLOWIPV6TRAFFICCLASS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV6TRAFFICCLASS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV6TRAFFICCLASS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV6TRAFFICCLASS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV6FLOWLABELCOUNTER']._serialized_start=186334 + _globals['_PATTERNFLOWIPV6FLOWLABELCOUNTER']._serialized_end=186455 + _globals['_PATTERNFLOWIPV6FLOWLABELMETRICTAG']._serialized_start=186457 + _globals['_PATTERNFLOWIPV6FLOWLABELMETRICTAG']._serialized_end=186584 + _globals['_PATTERNFLOWIPV6FLOWLABELRANDOM']._serialized_start=186587 + _globals['_PATTERNFLOWIPV6FLOWLABELRANDOM']._serialized_end=186729 + _globals['_PATTERNFLOWIPV6FLOWLABEL']._serialized_start=186732 + _globals['_PATTERNFLOWIPV6FLOWLABEL']._serialized_end=187207 + _globals['_PATTERNFLOWIPV6FLOWLABEL_CHOICE']._serialized_start=187088 + _globals['_PATTERNFLOWIPV6FLOWLABEL_CHOICE']._serialized_end=187186 + _globals['_PATTERNFLOWIPV6FLOWLABEL_CHOICE_ENUM']._serialized_start=187098 + _globals['_PATTERNFLOWIPV6FLOWLABEL_CHOICE_ENUM']._serialized_end=187186 + _globals['_PATTERNFLOWIPV6PAYLOADLENGTHCOUNTER']._serialized_start=187209 + _globals['_PATTERNFLOWIPV6PAYLOADLENGTHCOUNTER']._serialized_end=187334 + _globals['_PATTERNFLOWIPV6PAYLOADLENGTHMETRICTAG']._serialized_start=187337 + _globals['_PATTERNFLOWIPV6PAYLOADLENGTHMETRICTAG']._serialized_end=187468 + _globals['_PATTERNFLOWIPV6PAYLOADLENGTH']._serialized_start=187471 + _globals['_PATTERNFLOWIPV6PAYLOADLENGTH']._serialized_end=187939 + _globals['_PATTERNFLOWIPV6PAYLOADLENGTH_CHOICE']._serialized_start=160840 + _globals['_PATTERNFLOWIPV6PAYLOADLENGTH_CHOICE']._serialized_end=160936 + _globals['_PATTERNFLOWIPV6PAYLOADLENGTH_CHOICE_ENUM']._serialized_start=160850 + _globals['_PATTERNFLOWIPV6PAYLOADLENGTH_CHOICE_ENUM']._serialized_end=160936 + _globals['_PATTERNFLOWIPV6NEXTHEADERCOUNTER']._serialized_start=187941 + _globals['_PATTERNFLOWIPV6NEXTHEADERCOUNTER']._serialized_end=188063 + _globals['_PATTERNFLOWIPV6NEXTHEADERMETRICTAG']._serialized_start=188066 + _globals['_PATTERNFLOWIPV6NEXTHEADERMETRICTAG']._serialized_end=188194 + _globals['_PATTERNFLOWIPV6NEXTHEADER']._serialized_start=188197 + _globals['_PATTERNFLOWIPV6NEXTHEADER']._serialized_end=188650 + _globals['_PATTERNFLOWIPV6NEXTHEADER_CHOICE']._serialized_start=160840 + _globals['_PATTERNFLOWIPV6NEXTHEADER_CHOICE']._serialized_end=160936 + _globals['_PATTERNFLOWIPV6NEXTHEADER_CHOICE_ENUM']._serialized_start=160850 + _globals['_PATTERNFLOWIPV6NEXTHEADER_CHOICE_ENUM']._serialized_end=160936 + _globals['_PATTERNFLOWIPV6HOPLIMITCOUNTER']._serialized_start=188652 + _globals['_PATTERNFLOWIPV6HOPLIMITCOUNTER']._serialized_end=188772 + _globals['_PATTERNFLOWIPV6HOPLIMITMETRICTAG']._serialized_start=188774 + _globals['_PATTERNFLOWIPV6HOPLIMITMETRICTAG']._serialized_end=188900 + _globals['_PATTERNFLOWIPV6HOPLIMIT']._serialized_start=188903 + _globals['_PATTERNFLOWIPV6HOPLIMIT']._serialized_end=189308 + _globals['_PATTERNFLOWIPV6HOPLIMIT_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIPV6HOPLIMIT_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIPV6HOPLIMIT_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIPV6HOPLIMIT_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIPV6SRCCOUNTER']._serialized_start=189310 + _globals['_PATTERNFLOWIPV6SRCCOUNTER']._serialized_end=189425 + _globals['_PATTERNFLOWIPV6SRCMETRICTAG']._serialized_start=189427 + _globals['_PATTERNFLOWIPV6SRCMETRICTAG']._serialized_end=189548 + _globals['_PATTERNFLOWIPV6SRC']._serialized_start=189551 + _globals['_PATTERNFLOWIPV6SRC']._serialized_end=189974 + _globals['_PATTERNFLOWIPV6SRC_CHOICE']._serialized_start=189857 + _globals['_PATTERNFLOWIPV6SRC_CHOICE']._serialized_end=189953 + _globals['_PATTERNFLOWIPV6SRC_CHOICE_ENUM']._serialized_start=176224 + _globals['_PATTERNFLOWIPV6SRC_CHOICE_ENUM']._serialized_end=176310 + _globals['_PATTERNFLOWIPV6DSTCOUNTER']._serialized_start=189976 + _globals['_PATTERNFLOWIPV6DSTCOUNTER']._serialized_end=190091 + _globals['_PATTERNFLOWIPV6DSTMETRICTAG']._serialized_start=190093 + _globals['_PATTERNFLOWIPV6DSTMETRICTAG']._serialized_end=190214 + _globals['_PATTERNFLOWIPV6DST']._serialized_start=190217 + _globals['_PATTERNFLOWIPV6DST']._serialized_end=190640 + _globals['_PATTERNFLOWIPV6DST_CHOICE']._serialized_start=189857 + _globals['_PATTERNFLOWIPV6DST_CHOICE']._serialized_end=189953 + _globals['_PATTERNFLOWIPV6DST_CHOICE_ENUM']._serialized_start=176224 + _globals['_PATTERNFLOWIPV6DST_CHOICE_ENUM']._serialized_end=176310 + _globals['_PATTERNFLOWPFCPAUSEDSTCOUNTER']._serialized_start=190642 + _globals['_PATTERNFLOWPFCPAUSEDSTCOUNTER']._serialized_end=190761 + _globals['_PATTERNFLOWPFCPAUSEDSTMETRICTAG']._serialized_start=190763 + _globals['_PATTERNFLOWPFCPAUSEDSTMETRICTAG']._serialized_end=190888 + _globals['_PATTERNFLOWPFCPAUSEDST']._serialized_start=190891 + _globals['_PATTERNFLOWPFCPAUSEDST']._serialized_end=191291 + _globals['_PATTERNFLOWPFCPAUSEDST_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPFCPAUSEDST_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEDST_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPFCPAUSEDST_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSESRCCOUNTER']._serialized_start=191293 + _globals['_PATTERNFLOWPFCPAUSESRCCOUNTER']._serialized_end=191412 + _globals['_PATTERNFLOWPFCPAUSESRCMETRICTAG']._serialized_start=191414 + _globals['_PATTERNFLOWPFCPAUSESRCMETRICTAG']._serialized_end=191539 + _globals['_PATTERNFLOWPFCPAUSESRC']._serialized_start=191542 + _globals['_PATTERNFLOWPFCPAUSESRC']._serialized_end=191942 + _globals['_PATTERNFLOWPFCPAUSESRC_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPFCPAUSESRC_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSESRC_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPFCPAUSESRC_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEETHERTYPECOUNTER']._serialized_start=191944 + _globals['_PATTERNFLOWPFCPAUSEETHERTYPECOUNTER']._serialized_end=192069 + _globals['_PATTERNFLOWPFCPAUSEETHERTYPEMETRICTAG']._serialized_start=192072 + _globals['_PATTERNFLOWPFCPAUSEETHERTYPEMETRICTAG']._serialized_end=192203 + _globals['_PATTERNFLOWPFCPAUSEETHERTYPE']._serialized_start=192206 + _globals['_PATTERNFLOWPFCPAUSEETHERTYPE']._serialized_end=192636 + _globals['_PATTERNFLOWPFCPAUSEETHERTYPE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPFCPAUSEETHERTYPE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEETHERTYPE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPFCPAUSEETHERTYPE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSECONTROLOPCODECOUNTER']._serialized_start=192639 + _globals['_PATTERNFLOWPFCPAUSECONTROLOPCODECOUNTER']._serialized_end=192768 + _globals['_PATTERNFLOWPFCPAUSECONTROLOPCODEMETRICTAG']._serialized_start=192771 + _globals['_PATTERNFLOWPFCPAUSECONTROLOPCODEMETRICTAG']._serialized_end=192906 + _globals['_PATTERNFLOWPFCPAUSECONTROLOPCODE']._serialized_start=192909 + _globals['_PATTERNFLOWPFCPAUSECONTROLOPCODE']._serialized_end=193359 + _globals['_PATTERNFLOWPFCPAUSECONTROLOPCODE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPFCPAUSECONTROLOPCODE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSECONTROLOPCODE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPFCPAUSECONTROLOPCODE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSECLASSENABLEVECTORCOUNTER']._serialized_start=193362 + _globals['_PATTERNFLOWPFCPAUSECLASSENABLEVECTORCOUNTER']._serialized_end=193495 + _globals['_PATTERNFLOWPFCPAUSECLASSENABLEVECTORMETRICTAG']._serialized_start=193498 + _globals['_PATTERNFLOWPFCPAUSECLASSENABLEVECTORMETRICTAG']._serialized_end=193637 + _globals['_PATTERNFLOWPFCPAUSECLASSENABLEVECTOR']._serialized_start=193640 + _globals['_PATTERNFLOWPFCPAUSECLASSENABLEVECTOR']._serialized_end=194110 + _globals['_PATTERNFLOWPFCPAUSECLASSENABLEVECTOR_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPFCPAUSECLASSENABLEVECTOR_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSECLASSENABLEVECTOR_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPFCPAUSECLASSENABLEVECTOR_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS0COUNTER']._serialized_start=194112 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS0COUNTER']._serialized_end=194239 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS0METRICTAG']._serialized_start=194242 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS0METRICTAG']._serialized_end=194375 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS0']._serialized_start=194378 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS0']._serialized_end=194818 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS0_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS0_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS0_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS0_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS1COUNTER']._serialized_start=194820 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS1COUNTER']._serialized_end=194947 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS1METRICTAG']._serialized_start=194950 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS1METRICTAG']._serialized_end=195083 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS1']._serialized_start=195086 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS1']._serialized_end=195526 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS1_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS1_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS1_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS1_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS2COUNTER']._serialized_start=195528 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS2COUNTER']._serialized_end=195655 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS2METRICTAG']._serialized_start=195658 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS2METRICTAG']._serialized_end=195791 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS2']._serialized_start=195794 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS2']._serialized_end=196234 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS2_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS2_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS2_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS2_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS3COUNTER']._serialized_start=196236 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS3COUNTER']._serialized_end=196363 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS3METRICTAG']._serialized_start=196366 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS3METRICTAG']._serialized_end=196499 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS3']._serialized_start=196502 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS3']._serialized_end=196942 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS3_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS3_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS3_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS3_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS4COUNTER']._serialized_start=196944 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS4COUNTER']._serialized_end=197071 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS4METRICTAG']._serialized_start=197074 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS4METRICTAG']._serialized_end=197207 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS4']._serialized_start=197210 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS4']._serialized_end=197650 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS4_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS4_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS4_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS4_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS5COUNTER']._serialized_start=197652 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS5COUNTER']._serialized_end=197779 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS5METRICTAG']._serialized_start=197782 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS5METRICTAG']._serialized_end=197915 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS5']._serialized_start=197918 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS5']._serialized_end=198358 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS5_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS5_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS5_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS5_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS6COUNTER']._serialized_start=198360 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS6COUNTER']._serialized_end=198487 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS6METRICTAG']._serialized_start=198490 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS6METRICTAG']._serialized_end=198623 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS6']._serialized_start=198626 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS6']._serialized_end=199066 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS6_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS6_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS6_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS6_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS7COUNTER']._serialized_start=199068 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS7COUNTER']._serialized_end=199195 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS7METRICTAG']._serialized_start=199198 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS7METRICTAG']._serialized_end=199331 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS7']._serialized_start=199334 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS7']._serialized_end=199774 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS7_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS7_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS7_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPFCPAUSEPAUSECLASS7_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWETHERNETPAUSEDSTCOUNTER']._serialized_start=199776 + _globals['_PATTERNFLOWETHERNETPAUSEDSTCOUNTER']._serialized_end=199900 + _globals['_PATTERNFLOWETHERNETPAUSEDSTMETRICTAG']._serialized_start=199903 + _globals['_PATTERNFLOWETHERNETPAUSEDSTMETRICTAG']._serialized_end=200033 + _globals['_PATTERNFLOWETHERNETPAUSEDST']._serialized_start=200036 + _globals['_PATTERNFLOWETHERNETPAUSEDST']._serialized_end=200461 + _globals['_PATTERNFLOWETHERNETPAUSEDST_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWETHERNETPAUSEDST_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWETHERNETPAUSEDST_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWETHERNETPAUSEDST_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWETHERNETPAUSESRCCOUNTER']._serialized_start=200463 + _globals['_PATTERNFLOWETHERNETPAUSESRCCOUNTER']._serialized_end=200587 + _globals['_PATTERNFLOWETHERNETPAUSESRCMETRICTAG']._serialized_start=200590 + _globals['_PATTERNFLOWETHERNETPAUSESRCMETRICTAG']._serialized_end=200720 + _globals['_PATTERNFLOWETHERNETPAUSESRC']._serialized_start=200723 + _globals['_PATTERNFLOWETHERNETPAUSESRC']._serialized_end=201148 + _globals['_PATTERNFLOWETHERNETPAUSESRC_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWETHERNETPAUSESRC_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWETHERNETPAUSESRC_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWETHERNETPAUSESRC_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWETHERNETPAUSEETHERTYPECOUNTER']._serialized_start=201151 + _globals['_PATTERNFLOWETHERNETPAUSEETHERTYPECOUNTER']._serialized_end=201281 + _globals['_PATTERNFLOWETHERNETPAUSEETHERTYPEMETRICTAG']._serialized_start=201284 + _globals['_PATTERNFLOWETHERNETPAUSEETHERTYPEMETRICTAG']._serialized_end=201420 + _globals['_PATTERNFLOWETHERNETPAUSEETHERTYPE']._serialized_start=201423 + _globals['_PATTERNFLOWETHERNETPAUSEETHERTYPE']._serialized_end=201878 + _globals['_PATTERNFLOWETHERNETPAUSEETHERTYPE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWETHERNETPAUSEETHERTYPE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWETHERNETPAUSEETHERTYPE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWETHERNETPAUSEETHERTYPE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWETHERNETPAUSECONTROLOPCODECOUNTER']._serialized_start=201881 + _globals['_PATTERNFLOWETHERNETPAUSECONTROLOPCODECOUNTER']._serialized_end=202015 + _globals['_PATTERNFLOWETHERNETPAUSECONTROLOPCODEMETRICTAG']._serialized_start=202018 + _globals['_PATTERNFLOWETHERNETPAUSECONTROLOPCODEMETRICTAG']._serialized_end=202158 + _globals['_PATTERNFLOWETHERNETPAUSECONTROLOPCODE']._serialized_start=202161 + _globals['_PATTERNFLOWETHERNETPAUSECONTROLOPCODE']._serialized_end=202636 + _globals['_PATTERNFLOWETHERNETPAUSECONTROLOPCODE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWETHERNETPAUSECONTROLOPCODE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWETHERNETPAUSECONTROLOPCODE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWETHERNETPAUSECONTROLOPCODE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWETHERNETPAUSETIMECOUNTER']._serialized_start=202638 + _globals['_PATTERNFLOWETHERNETPAUSETIMECOUNTER']._serialized_end=202763 + _globals['_PATTERNFLOWETHERNETPAUSETIMEMETRICTAG']._serialized_start=202766 + _globals['_PATTERNFLOWETHERNETPAUSETIMEMETRICTAG']._serialized_end=202897 + _globals['_PATTERNFLOWETHERNETPAUSETIME']._serialized_start=202900 + _globals['_PATTERNFLOWETHERNETPAUSETIME']._serialized_end=203330 + _globals['_PATTERNFLOWETHERNETPAUSETIME_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWETHERNETPAUSETIME_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWETHERNETPAUSETIME_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWETHERNETPAUSETIME_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWTCPSRCPORTCOUNTER']._serialized_start=203332 + _globals['_PATTERNFLOWTCPSRCPORTCOUNTER']._serialized_end=203450 + _globals['_PATTERNFLOWTCPSRCPORTMETRICTAG']._serialized_start=203452 + _globals['_PATTERNFLOWTCPSRCPORTMETRICTAG']._serialized_end=203576 + _globals['_PATTERNFLOWTCPSRCPORTRANDOM']._serialized_start=203579 + _globals['_PATTERNFLOWTCPSRCPORTRANDOM']._serialized_end=203718 + _globals['_PATTERNFLOWTCPSRCPORT']._serialized_start=203721 + _globals['_PATTERNFLOWTCPSRCPORT']._serialized_end=204178 + _globals['_PATTERNFLOWTCPSRCPORT_CHOICE']._serialized_start=187088 + _globals['_PATTERNFLOWTCPSRCPORT_CHOICE']._serialized_end=187186 + _globals['_PATTERNFLOWTCPSRCPORT_CHOICE_ENUM']._serialized_start=187098 + _globals['_PATTERNFLOWTCPSRCPORT_CHOICE_ENUM']._serialized_end=187186 + _globals['_PATTERNFLOWTCPDSTPORTCOUNTER']._serialized_start=204180 + _globals['_PATTERNFLOWTCPDSTPORTCOUNTER']._serialized_end=204298 + _globals['_PATTERNFLOWTCPDSTPORTMETRICTAG']._serialized_start=204300 + _globals['_PATTERNFLOWTCPDSTPORTMETRICTAG']._serialized_end=204424 + _globals['_PATTERNFLOWTCPDSTPORTRANDOM']._serialized_start=204427 + _globals['_PATTERNFLOWTCPDSTPORTRANDOM']._serialized_end=204566 + _globals['_PATTERNFLOWTCPDSTPORT']._serialized_start=204569 + _globals['_PATTERNFLOWTCPDSTPORT']._serialized_end=205026 + _globals['_PATTERNFLOWTCPDSTPORT_CHOICE']._serialized_start=187088 + _globals['_PATTERNFLOWTCPDSTPORT_CHOICE']._serialized_end=187186 + _globals['_PATTERNFLOWTCPDSTPORT_CHOICE_ENUM']._serialized_start=187098 + _globals['_PATTERNFLOWTCPDSTPORT_CHOICE_ENUM']._serialized_end=187186 + _globals['_PATTERNFLOWTCPSEQNUMCOUNTER']._serialized_start=205028 + _globals['_PATTERNFLOWTCPSEQNUMCOUNTER']._serialized_end=205145 + _globals['_PATTERNFLOWTCPSEQNUMMETRICTAG']._serialized_start=205147 + _globals['_PATTERNFLOWTCPSEQNUMMETRICTAG']._serialized_end=205270 + _globals['_PATTERNFLOWTCPSEQNUM']._serialized_start=205273 + _globals['_PATTERNFLOWTCPSEQNUM']._serialized_end=205663 + _globals['_PATTERNFLOWTCPSEQNUM_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWTCPSEQNUM_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWTCPSEQNUM_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWTCPSEQNUM_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWTCPACKNUMCOUNTER']._serialized_start=205665 + _globals['_PATTERNFLOWTCPACKNUMCOUNTER']._serialized_end=205782 + _globals['_PATTERNFLOWTCPACKNUMMETRICTAG']._serialized_start=205784 + _globals['_PATTERNFLOWTCPACKNUMMETRICTAG']._serialized_end=205907 + _globals['_PATTERNFLOWTCPACKNUM']._serialized_start=205910 + _globals['_PATTERNFLOWTCPACKNUM']._serialized_end=206300 + _globals['_PATTERNFLOWTCPACKNUM_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWTCPACKNUM_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWTCPACKNUM_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWTCPACKNUM_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWTCPDATAOFFSETCOUNTER']._serialized_start=206302 + _globals['_PATTERNFLOWTCPDATAOFFSETCOUNTER']._serialized_end=206423 + _globals['_PATTERNFLOWTCPDATAOFFSETMETRICTAG']._serialized_start=206425 + _globals['_PATTERNFLOWTCPDATAOFFSETMETRICTAG']._serialized_end=206552 + _globals['_PATTERNFLOWTCPDATAOFFSET']._serialized_start=206555 + _globals['_PATTERNFLOWTCPDATAOFFSET']._serialized_end=206965 + _globals['_PATTERNFLOWTCPDATAOFFSET_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWTCPDATAOFFSET_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWTCPDATAOFFSET_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWTCPDATAOFFSET_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWTCPECNNSCOUNTER']._serialized_start=206967 + _globals['_PATTERNFLOWTCPECNNSCOUNTER']._serialized_end=207083 + _globals['_PATTERNFLOWTCPECNNSMETRICTAG']._serialized_start=207085 + _globals['_PATTERNFLOWTCPECNNSMETRICTAG']._serialized_end=207207 + _globals['_PATTERNFLOWTCPECNNS']._serialized_start=207210 + _globals['_PATTERNFLOWTCPECNNS']._serialized_end=207595 + _globals['_PATTERNFLOWTCPECNNS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWTCPECNNS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWTCPECNNS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWTCPECNNS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWTCPECNCWRCOUNTER']._serialized_start=207597 + _globals['_PATTERNFLOWTCPECNCWRCOUNTER']._serialized_end=207714 + _globals['_PATTERNFLOWTCPECNCWRMETRICTAG']._serialized_start=207716 + _globals['_PATTERNFLOWTCPECNCWRMETRICTAG']._serialized_end=207839 + _globals['_PATTERNFLOWTCPECNCWR']._serialized_start=207842 + _globals['_PATTERNFLOWTCPECNCWR']._serialized_end=208232 + _globals['_PATTERNFLOWTCPECNCWR_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWTCPECNCWR_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWTCPECNCWR_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWTCPECNCWR_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWTCPECNECHOCOUNTER']._serialized_start=208234 + _globals['_PATTERNFLOWTCPECNECHOCOUNTER']._serialized_end=208352 + _globals['_PATTERNFLOWTCPECNECHOMETRICTAG']._serialized_start=208354 + _globals['_PATTERNFLOWTCPECNECHOMETRICTAG']._serialized_end=208478 + _globals['_PATTERNFLOWTCPECNECHO']._serialized_start=208481 + _globals['_PATTERNFLOWTCPECNECHO']._serialized_end=208876 + _globals['_PATTERNFLOWTCPECNECHO_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWTCPECNECHO_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWTCPECNECHO_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWTCPECNECHO_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWTCPCTLURGCOUNTER']._serialized_start=208878 + _globals['_PATTERNFLOWTCPCTLURGCOUNTER']._serialized_end=208995 + _globals['_PATTERNFLOWTCPCTLURGMETRICTAG']._serialized_start=208997 + _globals['_PATTERNFLOWTCPCTLURGMETRICTAG']._serialized_end=209120 + _globals['_PATTERNFLOWTCPCTLURG']._serialized_start=209123 + _globals['_PATTERNFLOWTCPCTLURG']._serialized_end=209513 + _globals['_PATTERNFLOWTCPCTLURG_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWTCPCTLURG_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWTCPCTLURG_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWTCPCTLURG_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWTCPCTLACKCOUNTER']._serialized_start=209515 + _globals['_PATTERNFLOWTCPCTLACKCOUNTER']._serialized_end=209632 + _globals['_PATTERNFLOWTCPCTLACKMETRICTAG']._serialized_start=209634 + _globals['_PATTERNFLOWTCPCTLACKMETRICTAG']._serialized_end=209757 + _globals['_PATTERNFLOWTCPCTLACK']._serialized_start=209760 + _globals['_PATTERNFLOWTCPCTLACK']._serialized_end=210150 + _globals['_PATTERNFLOWTCPCTLACK_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWTCPCTLACK_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWTCPCTLACK_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWTCPCTLACK_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWTCPCTLPSHCOUNTER']._serialized_start=210152 + _globals['_PATTERNFLOWTCPCTLPSHCOUNTER']._serialized_end=210269 + _globals['_PATTERNFLOWTCPCTLPSHMETRICTAG']._serialized_start=210271 + _globals['_PATTERNFLOWTCPCTLPSHMETRICTAG']._serialized_end=210394 + _globals['_PATTERNFLOWTCPCTLPSH']._serialized_start=210397 + _globals['_PATTERNFLOWTCPCTLPSH']._serialized_end=210787 + _globals['_PATTERNFLOWTCPCTLPSH_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWTCPCTLPSH_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWTCPCTLPSH_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWTCPCTLPSH_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWTCPCTLRSTCOUNTER']._serialized_start=210789 + _globals['_PATTERNFLOWTCPCTLRSTCOUNTER']._serialized_end=210906 + _globals['_PATTERNFLOWTCPCTLRSTMETRICTAG']._serialized_start=210908 + _globals['_PATTERNFLOWTCPCTLRSTMETRICTAG']._serialized_end=211031 + _globals['_PATTERNFLOWTCPCTLRST']._serialized_start=211034 + _globals['_PATTERNFLOWTCPCTLRST']._serialized_end=211424 + _globals['_PATTERNFLOWTCPCTLRST_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWTCPCTLRST_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWTCPCTLRST_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWTCPCTLRST_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWTCPCTLSYNCOUNTER']._serialized_start=211426 + _globals['_PATTERNFLOWTCPCTLSYNCOUNTER']._serialized_end=211543 + _globals['_PATTERNFLOWTCPCTLSYNMETRICTAG']._serialized_start=211545 + _globals['_PATTERNFLOWTCPCTLSYNMETRICTAG']._serialized_end=211668 + _globals['_PATTERNFLOWTCPCTLSYN']._serialized_start=211671 + _globals['_PATTERNFLOWTCPCTLSYN']._serialized_end=212061 + _globals['_PATTERNFLOWTCPCTLSYN_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWTCPCTLSYN_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWTCPCTLSYN_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWTCPCTLSYN_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWTCPCTLFINCOUNTER']._serialized_start=212063 + _globals['_PATTERNFLOWTCPCTLFINCOUNTER']._serialized_end=212180 + _globals['_PATTERNFLOWTCPCTLFINMETRICTAG']._serialized_start=212182 + _globals['_PATTERNFLOWTCPCTLFINMETRICTAG']._serialized_end=212305 + _globals['_PATTERNFLOWTCPCTLFIN']._serialized_start=212308 + _globals['_PATTERNFLOWTCPCTLFIN']._serialized_end=212698 + _globals['_PATTERNFLOWTCPCTLFIN_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWTCPCTLFIN_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWTCPCTLFIN_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWTCPCTLFIN_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWTCPWINDOWCOUNTER']._serialized_start=212700 + _globals['_PATTERNFLOWTCPWINDOWCOUNTER']._serialized_end=212817 + _globals['_PATTERNFLOWTCPWINDOWMETRICTAG']._serialized_start=212819 + _globals['_PATTERNFLOWTCPWINDOWMETRICTAG']._serialized_end=212942 + _globals['_PATTERNFLOWTCPWINDOW']._serialized_start=212945 + _globals['_PATTERNFLOWTCPWINDOW']._serialized_end=213335 + _globals['_PATTERNFLOWTCPWINDOW_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWTCPWINDOW_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWTCPWINDOW_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWTCPWINDOW_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWTCPCHECKSUM']._serialized_start=213338 + _globals['_PATTERNFLOWTCPCHECKSUM']._serialized_end=213668 + _globals['_PATTERNFLOWTCPCHECKSUM_CHOICE']._serialized_start=175326 + _globals['_PATTERNFLOWTCPCHECKSUM_CHOICE']._serialized_end=175386 + _globals['_PATTERNFLOWTCPCHECKSUM_CHOICE_ENUM']._serialized_start=175336 + _globals['_PATTERNFLOWTCPCHECKSUM_CHOICE_ENUM']._serialized_end=175386 + _globals['_PATTERNFLOWTCPCHECKSUM_GENERATED']._serialized_start=175388 + _globals['_PATTERNFLOWTCPCHECKSUM_GENERATED']._serialized_end=175443 + _globals['_PATTERNFLOWTCPCHECKSUM_GENERATED_ENUM']._serialized_start=175401 + _globals['_PATTERNFLOWTCPCHECKSUM_GENERATED_ENUM']._serialized_end=175443 + _globals['_PATTERNFLOWUDPSRCPORTCOUNTER']._serialized_start=213670 + _globals['_PATTERNFLOWUDPSRCPORTCOUNTER']._serialized_end=213788 + _globals['_PATTERNFLOWUDPSRCPORTMETRICTAG']._serialized_start=213790 + _globals['_PATTERNFLOWUDPSRCPORTMETRICTAG']._serialized_end=213914 + _globals['_PATTERNFLOWUDPSRCPORTRANDOM']._serialized_start=213917 + _globals['_PATTERNFLOWUDPSRCPORTRANDOM']._serialized_end=214056 + _globals['_PATTERNFLOWUDPSRCPORT']._serialized_start=214059 + _globals['_PATTERNFLOWUDPSRCPORT']._serialized_end=214516 + _globals['_PATTERNFLOWUDPSRCPORT_CHOICE']._serialized_start=187088 + _globals['_PATTERNFLOWUDPSRCPORT_CHOICE']._serialized_end=187186 + _globals['_PATTERNFLOWUDPSRCPORT_CHOICE_ENUM']._serialized_start=187098 + _globals['_PATTERNFLOWUDPSRCPORT_CHOICE_ENUM']._serialized_end=187186 + _globals['_PATTERNFLOWUDPDSTPORTCOUNTER']._serialized_start=214518 + _globals['_PATTERNFLOWUDPDSTPORTCOUNTER']._serialized_end=214636 + _globals['_PATTERNFLOWUDPDSTPORTMETRICTAG']._serialized_start=214638 + _globals['_PATTERNFLOWUDPDSTPORTMETRICTAG']._serialized_end=214762 + _globals['_PATTERNFLOWUDPDSTPORTRANDOM']._serialized_start=214765 + _globals['_PATTERNFLOWUDPDSTPORTRANDOM']._serialized_end=214904 + _globals['_PATTERNFLOWUDPDSTPORT']._serialized_start=214907 + _globals['_PATTERNFLOWUDPDSTPORT']._serialized_end=215364 + _globals['_PATTERNFLOWUDPDSTPORT_CHOICE']._serialized_start=187088 + _globals['_PATTERNFLOWUDPDSTPORT_CHOICE']._serialized_end=187186 + _globals['_PATTERNFLOWUDPDSTPORT_CHOICE_ENUM']._serialized_start=187098 + _globals['_PATTERNFLOWUDPDSTPORT_CHOICE_ENUM']._serialized_end=187186 + _globals['_PATTERNFLOWUDPLENGTHCOUNTER']._serialized_start=215366 + _globals['_PATTERNFLOWUDPLENGTHCOUNTER']._serialized_end=215483 + _globals['_PATTERNFLOWUDPLENGTHMETRICTAG']._serialized_start=215485 + _globals['_PATTERNFLOWUDPLENGTHMETRICTAG']._serialized_end=215608 + _globals['_PATTERNFLOWUDPLENGTH']._serialized_start=215611 + _globals['_PATTERNFLOWUDPLENGTH']._serialized_end=216001 + _globals['_PATTERNFLOWUDPLENGTH_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWUDPLENGTH_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWUDPLENGTH_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWUDPLENGTH_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWUDPCHECKSUM']._serialized_start=216004 + _globals['_PATTERNFLOWUDPCHECKSUM']._serialized_end=216334 + _globals['_PATTERNFLOWUDPCHECKSUM_CHOICE']._serialized_start=175326 + _globals['_PATTERNFLOWUDPCHECKSUM_CHOICE']._serialized_end=175386 + _globals['_PATTERNFLOWUDPCHECKSUM_CHOICE_ENUM']._serialized_start=175336 + _globals['_PATTERNFLOWUDPCHECKSUM_CHOICE_ENUM']._serialized_end=175386 + _globals['_PATTERNFLOWUDPCHECKSUM_GENERATED']._serialized_start=175388 + _globals['_PATTERNFLOWUDPCHECKSUM_GENERATED']._serialized_end=175443 + _globals['_PATTERNFLOWUDPCHECKSUM_GENERATED_ENUM']._serialized_start=175401 + _globals['_PATTERNFLOWUDPCHECKSUM_GENERATED_ENUM']._serialized_end=175443 + _globals['_PATTERNFLOWGRECHECKSUMPRESENTCOUNTER']._serialized_start=216336 + _globals['_PATTERNFLOWGRECHECKSUMPRESENTCOUNTER']._serialized_end=216462 + _globals['_PATTERNFLOWGRECHECKSUMPRESENTMETRICTAG']._serialized_start=216465 + _globals['_PATTERNFLOWGRECHECKSUMPRESENTMETRICTAG']._serialized_end=216597 + _globals['_PATTERNFLOWGRECHECKSUMPRESENT']._serialized_start=216600 + _globals['_PATTERNFLOWGRECHECKSUMPRESENT']._serialized_end=217035 + _globals['_PATTERNFLOWGRECHECKSUMPRESENT_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGRECHECKSUMPRESENT_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGRECHECKSUMPRESENT_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGRECHECKSUMPRESENT_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGRERESERVED0COUNTER']._serialized_start=217037 + _globals['_PATTERNFLOWGRERESERVED0COUNTER']._serialized_end=217157 + _globals['_PATTERNFLOWGRERESERVED0METRICTAG']._serialized_start=217159 + _globals['_PATTERNFLOWGRERESERVED0METRICTAG']._serialized_end=217285 + _globals['_PATTERNFLOWGRERESERVED0']._serialized_start=217288 + _globals['_PATTERNFLOWGRERESERVED0']._serialized_end=217693 + _globals['_PATTERNFLOWGRERESERVED0_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGRERESERVED0_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGRERESERVED0_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGRERESERVED0_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGREVERSIONCOUNTER']._serialized_start=217695 + _globals['_PATTERNFLOWGREVERSIONCOUNTER']._serialized_end=217813 + _globals['_PATTERNFLOWGREVERSIONMETRICTAG']._serialized_start=217815 + _globals['_PATTERNFLOWGREVERSIONMETRICTAG']._serialized_end=217939 + _globals['_PATTERNFLOWGREVERSION']._serialized_start=217942 + _globals['_PATTERNFLOWGREVERSION']._serialized_end=218337 + _globals['_PATTERNFLOWGREVERSION_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGREVERSION_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGREVERSION_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGREVERSION_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGREPROTOCOLCOUNTER']._serialized_start=218339 + _globals['_PATTERNFLOWGREPROTOCOLCOUNTER']._serialized_end=218458 + _globals['_PATTERNFLOWGREPROTOCOLMETRICTAG']._serialized_start=218460 + _globals['_PATTERNFLOWGREPROTOCOLMETRICTAG']._serialized_end=218585 + _globals['_PATTERNFLOWGREPROTOCOL']._serialized_start=218588 + _globals['_PATTERNFLOWGREPROTOCOL']._serialized_end=219026 + _globals['_PATTERNFLOWGREPROTOCOL_CHOICE']._serialized_start=189857 + _globals['_PATTERNFLOWGREPROTOCOL_CHOICE']._serialized_end=189953 + _globals['_PATTERNFLOWGREPROTOCOL_CHOICE_ENUM']._serialized_start=176224 + _globals['_PATTERNFLOWGREPROTOCOL_CHOICE_ENUM']._serialized_end=176310 + _globals['_PATTERNFLOWGRECHECKSUM']._serialized_start=219029 + _globals['_PATTERNFLOWGRECHECKSUM']._serialized_end=219359 + _globals['_PATTERNFLOWGRECHECKSUM_CHOICE']._serialized_start=175326 + _globals['_PATTERNFLOWGRECHECKSUM_CHOICE']._serialized_end=175386 + _globals['_PATTERNFLOWGRECHECKSUM_CHOICE_ENUM']._serialized_start=175336 + _globals['_PATTERNFLOWGRECHECKSUM_CHOICE_ENUM']._serialized_end=175386 + _globals['_PATTERNFLOWGRECHECKSUM_GENERATED']._serialized_start=175388 + _globals['_PATTERNFLOWGRECHECKSUM_GENERATED']._serialized_end=175443 + _globals['_PATTERNFLOWGRECHECKSUM_GENERATED_ENUM']._serialized_start=175401 + _globals['_PATTERNFLOWGRECHECKSUM_GENERATED_ENUM']._serialized_end=175443 + _globals['_PATTERNFLOWGRERESERVED1COUNTER']._serialized_start=219361 + _globals['_PATTERNFLOWGRERESERVED1COUNTER']._serialized_end=219481 + _globals['_PATTERNFLOWGRERESERVED1METRICTAG']._serialized_start=219483 + _globals['_PATTERNFLOWGRERESERVED1METRICTAG']._serialized_end=219609 + _globals['_PATTERNFLOWGRERESERVED1']._serialized_start=219612 + _globals['_PATTERNFLOWGRERESERVED1']._serialized_end=220017 + _globals['_PATTERNFLOWGRERESERVED1_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGRERESERVED1_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGRERESERVED1_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGRERESERVED1_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1VERSIONCOUNTER']._serialized_start=220019 + _globals['_PATTERNFLOWGTPV1VERSIONCOUNTER']._serialized_end=220139 + _globals['_PATTERNFLOWGTPV1VERSIONMETRICTAG']._serialized_start=220141 + _globals['_PATTERNFLOWGTPV1VERSIONMETRICTAG']._serialized_end=220267 + _globals['_PATTERNFLOWGTPV1VERSION']._serialized_start=220270 + _globals['_PATTERNFLOWGTPV1VERSION']._serialized_end=220675 + _globals['_PATTERNFLOWGTPV1VERSION_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV1VERSION_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1VERSION_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV1VERSION_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1PROTOCOLTYPECOUNTER']._serialized_start=220677 + _globals['_PATTERNFLOWGTPV1PROTOCOLTYPECOUNTER']._serialized_end=220802 + _globals['_PATTERNFLOWGTPV1PROTOCOLTYPEMETRICTAG']._serialized_start=220805 + _globals['_PATTERNFLOWGTPV1PROTOCOLTYPEMETRICTAG']._serialized_end=220936 + _globals['_PATTERNFLOWGTPV1PROTOCOLTYPE']._serialized_start=220939 + _globals['_PATTERNFLOWGTPV1PROTOCOLTYPE']._serialized_end=221369 + _globals['_PATTERNFLOWGTPV1PROTOCOLTYPE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV1PROTOCOLTYPE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1PROTOCOLTYPE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV1PROTOCOLTYPE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1RESERVEDCOUNTER']._serialized_start=221371 + _globals['_PATTERNFLOWGTPV1RESERVEDCOUNTER']._serialized_end=221492 + _globals['_PATTERNFLOWGTPV1RESERVEDMETRICTAG']._serialized_start=221494 + _globals['_PATTERNFLOWGTPV1RESERVEDMETRICTAG']._serialized_end=221621 + _globals['_PATTERNFLOWGTPV1RESERVED']._serialized_start=221624 + _globals['_PATTERNFLOWGTPV1RESERVED']._serialized_end=222034 + _globals['_PATTERNFLOWGTPV1RESERVED_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV1RESERVED_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1RESERVED_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV1RESERVED_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1EFLAGCOUNTER']._serialized_start=222036 + _globals['_PATTERNFLOWGTPV1EFLAGCOUNTER']._serialized_end=222154 + _globals['_PATTERNFLOWGTPV1EFLAGMETRICTAG']._serialized_start=222156 + _globals['_PATTERNFLOWGTPV1EFLAGMETRICTAG']._serialized_end=222280 + _globals['_PATTERNFLOWGTPV1EFLAG']._serialized_start=222283 + _globals['_PATTERNFLOWGTPV1EFLAG']._serialized_end=222678 + _globals['_PATTERNFLOWGTPV1EFLAG_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV1EFLAG_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1EFLAG_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV1EFLAG_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1SFLAGCOUNTER']._serialized_start=222680 + _globals['_PATTERNFLOWGTPV1SFLAGCOUNTER']._serialized_end=222798 + _globals['_PATTERNFLOWGTPV1SFLAGMETRICTAG']._serialized_start=222800 + _globals['_PATTERNFLOWGTPV1SFLAGMETRICTAG']._serialized_end=222924 + _globals['_PATTERNFLOWGTPV1SFLAG']._serialized_start=222927 + _globals['_PATTERNFLOWGTPV1SFLAG']._serialized_end=223322 + _globals['_PATTERNFLOWGTPV1SFLAG_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV1SFLAG_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1SFLAG_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV1SFLAG_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1PNFLAGCOUNTER']._serialized_start=223324 + _globals['_PATTERNFLOWGTPV1PNFLAGCOUNTER']._serialized_end=223443 + _globals['_PATTERNFLOWGTPV1PNFLAGMETRICTAG']._serialized_start=223445 + _globals['_PATTERNFLOWGTPV1PNFLAGMETRICTAG']._serialized_end=223570 + _globals['_PATTERNFLOWGTPV1PNFLAG']._serialized_start=223573 + _globals['_PATTERNFLOWGTPV1PNFLAG']._serialized_end=223973 + _globals['_PATTERNFLOWGTPV1PNFLAG_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV1PNFLAG_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1PNFLAG_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV1PNFLAG_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1MESSAGETYPECOUNTER']._serialized_start=223975 + _globals['_PATTERNFLOWGTPV1MESSAGETYPECOUNTER']._serialized_end=224099 + _globals['_PATTERNFLOWGTPV1MESSAGETYPEMETRICTAG']._serialized_start=224102 + _globals['_PATTERNFLOWGTPV1MESSAGETYPEMETRICTAG']._serialized_end=224232 + _globals['_PATTERNFLOWGTPV1MESSAGETYPE']._serialized_start=224235 + _globals['_PATTERNFLOWGTPV1MESSAGETYPE']._serialized_end=224660 + _globals['_PATTERNFLOWGTPV1MESSAGETYPE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV1MESSAGETYPE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1MESSAGETYPE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV1MESSAGETYPE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1MESSAGELENGTHCOUNTER']._serialized_start=224662 + _globals['_PATTERNFLOWGTPV1MESSAGELENGTHCOUNTER']._serialized_end=224788 + _globals['_PATTERNFLOWGTPV1MESSAGELENGTHMETRICTAG']._serialized_start=224791 + _globals['_PATTERNFLOWGTPV1MESSAGELENGTHMETRICTAG']._serialized_end=224923 + _globals['_PATTERNFLOWGTPV1MESSAGELENGTH']._serialized_start=224926 + _globals['_PATTERNFLOWGTPV1MESSAGELENGTH']._serialized_end=225361 + _globals['_PATTERNFLOWGTPV1MESSAGELENGTH_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV1MESSAGELENGTH_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1MESSAGELENGTH_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV1MESSAGELENGTH_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1TEIDCOUNTER']._serialized_start=225363 + _globals['_PATTERNFLOWGTPV1TEIDCOUNTER']._serialized_end=225480 + _globals['_PATTERNFLOWGTPV1TEIDMETRICTAG']._serialized_start=225482 + _globals['_PATTERNFLOWGTPV1TEIDMETRICTAG']._serialized_end=225605 + _globals['_PATTERNFLOWGTPV1TEID']._serialized_start=225608 + _globals['_PATTERNFLOWGTPV1TEID']._serialized_end=225998 + _globals['_PATTERNFLOWGTPV1TEID_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV1TEID_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1TEID_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV1TEID_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1SQUENCENUMBERCOUNTER']._serialized_start=226000 + _globals['_PATTERNFLOWGTPV1SQUENCENUMBERCOUNTER']._serialized_end=226126 + _globals['_PATTERNFLOWGTPV1SQUENCENUMBERMETRICTAG']._serialized_start=226129 + _globals['_PATTERNFLOWGTPV1SQUENCENUMBERMETRICTAG']._serialized_end=226261 + _globals['_PATTERNFLOWGTPV1SQUENCENUMBER']._serialized_start=226264 + _globals['_PATTERNFLOWGTPV1SQUENCENUMBER']._serialized_end=226699 + _globals['_PATTERNFLOWGTPV1SQUENCENUMBER_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV1SQUENCENUMBER_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1SQUENCENUMBER_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV1SQUENCENUMBER_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1NPDUNUMBERCOUNTER']._serialized_start=226701 + _globals['_PATTERNFLOWGTPV1NPDUNUMBERCOUNTER']._serialized_end=226824 + _globals['_PATTERNFLOWGTPV1NPDUNUMBERMETRICTAG']._serialized_start=226827 + _globals['_PATTERNFLOWGTPV1NPDUNUMBERMETRICTAG']._serialized_end=226956 + _globals['_PATTERNFLOWGTPV1NPDUNUMBER']._serialized_start=226959 + _globals['_PATTERNFLOWGTPV1NPDUNUMBER']._serialized_end=227379 + _globals['_PATTERNFLOWGTPV1NPDUNUMBER_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV1NPDUNUMBER_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1NPDUNUMBER_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV1NPDUNUMBER_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPECOUNTER']._serialized_start=227382 + _globals['_PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPECOUNTER']._serialized_end=227518 + _globals['_PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPEMETRICTAG']._serialized_start=227521 + _globals['_PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPEMETRICTAG']._serialized_end=227663 + _globals['_PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPE']._serialized_start=227666 + _globals['_PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPE']._serialized_end=228151 + _globals['_PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV1NEXTEXTENSIONHEADERTYPE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTHCOUNTER']._serialized_start=228154 + _globals['_PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTHCOUNTER']._serialized_end=228289 + _globals['_PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTHMETRICTAG']._serialized_start=228292 + _globals['_PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTHMETRICTAG']._serialized_end=228433 + _globals['_PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTH']._serialized_start=228436 + _globals['_PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTH']._serialized_end=228916 + _globals['_PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTH_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTH_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTH_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPEXTENSIONEXTENSIONLENGTH_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPEXTENSIONCONTENTSCOUNTER']._serialized_start=228919 + _globals['_PATTERNFLOWGTPEXTENSIONCONTENTSCOUNTER']._serialized_end=229047 + _globals['_PATTERNFLOWGTPEXTENSIONCONTENTSMETRICTAG']._serialized_start=229050 + _globals['_PATTERNFLOWGTPEXTENSIONCONTENTSMETRICTAG']._serialized_end=229184 + _globals['_PATTERNFLOWGTPEXTENSIONCONTENTS']._serialized_start=229187 + _globals['_PATTERNFLOWGTPEXTENSIONCONTENTS']._serialized_end=229632 + _globals['_PATTERNFLOWGTPEXTENSIONCONTENTS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPEXTENSIONCONTENTS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPEXTENSIONCONTENTS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPEXTENSIONCONTENTS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADERCOUNTER']._serialized_start=229635 + _globals['_PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADERCOUNTER']._serialized_end=229774 + _globals['_PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADERMETRICTAG']._serialized_start=229777 + _globals['_PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADERMETRICTAG']._serialized_end=229922 + _globals['_PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADER']._serialized_start=229925 + _globals['_PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADER']._serialized_end=230425 + _globals['_PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADER_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADER_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADER_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPEXTENSIONNEXTEXTENSIONHEADER_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2VERSIONCOUNTER']._serialized_start=230427 + _globals['_PATTERNFLOWGTPV2VERSIONCOUNTER']._serialized_end=230547 + _globals['_PATTERNFLOWGTPV2VERSIONMETRICTAG']._serialized_start=230549 + _globals['_PATTERNFLOWGTPV2VERSIONMETRICTAG']._serialized_end=230675 + _globals['_PATTERNFLOWGTPV2VERSION']._serialized_start=230678 + _globals['_PATTERNFLOWGTPV2VERSION']._serialized_end=231083 + _globals['_PATTERNFLOWGTPV2VERSION_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV2VERSION_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2VERSION_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV2VERSION_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2PIGGYBACKINGFLAGCOUNTER']._serialized_start=231086 + _globals['_PATTERNFLOWGTPV2PIGGYBACKINGFLAGCOUNTER']._serialized_end=231215 + _globals['_PATTERNFLOWGTPV2PIGGYBACKINGFLAGMETRICTAG']._serialized_start=231218 + _globals['_PATTERNFLOWGTPV2PIGGYBACKINGFLAGMETRICTAG']._serialized_end=231353 + _globals['_PATTERNFLOWGTPV2PIGGYBACKINGFLAG']._serialized_start=231356 + _globals['_PATTERNFLOWGTPV2PIGGYBACKINGFLAG']._serialized_end=231806 + _globals['_PATTERNFLOWGTPV2PIGGYBACKINGFLAG_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV2PIGGYBACKINGFLAG_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2PIGGYBACKINGFLAG_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV2PIGGYBACKINGFLAG_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2TEIDFLAGCOUNTER']._serialized_start=231808 + _globals['_PATTERNFLOWGTPV2TEIDFLAGCOUNTER']._serialized_end=231929 + _globals['_PATTERNFLOWGTPV2TEIDFLAGMETRICTAG']._serialized_start=231931 + _globals['_PATTERNFLOWGTPV2TEIDFLAGMETRICTAG']._serialized_end=232058 + _globals['_PATTERNFLOWGTPV2TEIDFLAG']._serialized_start=232061 + _globals['_PATTERNFLOWGTPV2TEIDFLAG']._serialized_end=232471 + _globals['_PATTERNFLOWGTPV2TEIDFLAG_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV2TEIDFLAG_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2TEIDFLAG_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV2TEIDFLAG_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2SPARE1COUNTER']._serialized_start=232473 + _globals['_PATTERNFLOWGTPV2SPARE1COUNTER']._serialized_end=232592 + _globals['_PATTERNFLOWGTPV2SPARE1METRICTAG']._serialized_start=232594 + _globals['_PATTERNFLOWGTPV2SPARE1METRICTAG']._serialized_end=232719 + _globals['_PATTERNFLOWGTPV2SPARE1']._serialized_start=232722 + _globals['_PATTERNFLOWGTPV2SPARE1']._serialized_end=233122 + _globals['_PATTERNFLOWGTPV2SPARE1_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV2SPARE1_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2SPARE1_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV2SPARE1_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2MESSAGETYPECOUNTER']._serialized_start=233124 + _globals['_PATTERNFLOWGTPV2MESSAGETYPECOUNTER']._serialized_end=233248 + _globals['_PATTERNFLOWGTPV2MESSAGETYPEMETRICTAG']._serialized_start=233251 + _globals['_PATTERNFLOWGTPV2MESSAGETYPEMETRICTAG']._serialized_end=233381 + _globals['_PATTERNFLOWGTPV2MESSAGETYPE']._serialized_start=233384 + _globals['_PATTERNFLOWGTPV2MESSAGETYPE']._serialized_end=233809 + _globals['_PATTERNFLOWGTPV2MESSAGETYPE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV2MESSAGETYPE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2MESSAGETYPE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV2MESSAGETYPE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2MESSAGELENGTHCOUNTER']._serialized_start=233811 + _globals['_PATTERNFLOWGTPV2MESSAGELENGTHCOUNTER']._serialized_end=233937 + _globals['_PATTERNFLOWGTPV2MESSAGELENGTHMETRICTAG']._serialized_start=233940 + _globals['_PATTERNFLOWGTPV2MESSAGELENGTHMETRICTAG']._serialized_end=234072 + _globals['_PATTERNFLOWGTPV2MESSAGELENGTH']._serialized_start=234075 + _globals['_PATTERNFLOWGTPV2MESSAGELENGTH']._serialized_end=234510 + _globals['_PATTERNFLOWGTPV2MESSAGELENGTH_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV2MESSAGELENGTH_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2MESSAGELENGTH_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV2MESSAGELENGTH_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2TEIDCOUNTER']._serialized_start=234512 + _globals['_PATTERNFLOWGTPV2TEIDCOUNTER']._serialized_end=234629 + _globals['_PATTERNFLOWGTPV2TEIDMETRICTAG']._serialized_start=234631 + _globals['_PATTERNFLOWGTPV2TEIDMETRICTAG']._serialized_end=234754 + _globals['_PATTERNFLOWGTPV2TEID']._serialized_start=234757 + _globals['_PATTERNFLOWGTPV2TEID']._serialized_end=235147 + _globals['_PATTERNFLOWGTPV2TEID_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV2TEID_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2TEID_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV2TEID_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2SEQUENCENUMBERCOUNTER']._serialized_start=235149 + _globals['_PATTERNFLOWGTPV2SEQUENCENUMBERCOUNTER']._serialized_end=235276 + _globals['_PATTERNFLOWGTPV2SEQUENCENUMBERMETRICTAG']._serialized_start=235279 + _globals['_PATTERNFLOWGTPV2SEQUENCENUMBERMETRICTAG']._serialized_end=235412 + _globals['_PATTERNFLOWGTPV2SEQUENCENUMBER']._serialized_start=235415 + _globals['_PATTERNFLOWGTPV2SEQUENCENUMBER']._serialized_end=235855 + _globals['_PATTERNFLOWGTPV2SEQUENCENUMBER_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV2SEQUENCENUMBER_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2SEQUENCENUMBER_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV2SEQUENCENUMBER_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2SPARE2COUNTER']._serialized_start=235857 + _globals['_PATTERNFLOWGTPV2SPARE2COUNTER']._serialized_end=235976 + _globals['_PATTERNFLOWGTPV2SPARE2METRICTAG']._serialized_start=235978 + _globals['_PATTERNFLOWGTPV2SPARE2METRICTAG']._serialized_end=236103 + _globals['_PATTERNFLOWGTPV2SPARE2']._serialized_start=236106 + _globals['_PATTERNFLOWGTPV2SPARE2']._serialized_end=236506 + _globals['_PATTERNFLOWGTPV2SPARE2_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWGTPV2SPARE2_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWGTPV2SPARE2_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWGTPV2SPARE2_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWARPHARDWARETYPECOUNTER']._serialized_start=236508 + _globals['_PATTERNFLOWARPHARDWARETYPECOUNTER']._serialized_end=236631 + _globals['_PATTERNFLOWARPHARDWARETYPEMETRICTAG']._serialized_start=236634 + _globals['_PATTERNFLOWARPHARDWARETYPEMETRICTAG']._serialized_end=236763 + _globals['_PATTERNFLOWARPHARDWARETYPE']._serialized_start=236766 + _globals['_PATTERNFLOWARPHARDWARETYPE']._serialized_end=237186 + _globals['_PATTERNFLOWARPHARDWARETYPE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWARPHARDWARETYPE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWARPHARDWARETYPE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWARPHARDWARETYPE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWARPPROTOCOLTYPECOUNTER']._serialized_start=237188 + _globals['_PATTERNFLOWARPPROTOCOLTYPECOUNTER']._serialized_end=237311 + _globals['_PATTERNFLOWARPPROTOCOLTYPEMETRICTAG']._serialized_start=237314 + _globals['_PATTERNFLOWARPPROTOCOLTYPEMETRICTAG']._serialized_end=237443 + _globals['_PATTERNFLOWARPPROTOCOLTYPE']._serialized_start=237446 + _globals['_PATTERNFLOWARPPROTOCOLTYPE']._serialized_end=237866 + _globals['_PATTERNFLOWARPPROTOCOLTYPE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWARPPROTOCOLTYPE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWARPPROTOCOLTYPE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWARPPROTOCOLTYPE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWARPHARDWARELENGTHCOUNTER']._serialized_start=237868 + _globals['_PATTERNFLOWARPHARDWARELENGTHCOUNTER']._serialized_end=237993 + _globals['_PATTERNFLOWARPHARDWARELENGTHMETRICTAG']._serialized_start=237996 + _globals['_PATTERNFLOWARPHARDWARELENGTHMETRICTAG']._serialized_end=238127 + _globals['_PATTERNFLOWARPHARDWARELENGTH']._serialized_start=238130 + _globals['_PATTERNFLOWARPHARDWARELENGTH']._serialized_end=238560 + _globals['_PATTERNFLOWARPHARDWARELENGTH_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWARPHARDWARELENGTH_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWARPHARDWARELENGTH_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWARPHARDWARELENGTH_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWARPPROTOCOLLENGTHCOUNTER']._serialized_start=238562 + _globals['_PATTERNFLOWARPPROTOCOLLENGTHCOUNTER']._serialized_end=238687 + _globals['_PATTERNFLOWARPPROTOCOLLENGTHMETRICTAG']._serialized_start=238690 + _globals['_PATTERNFLOWARPPROTOCOLLENGTHMETRICTAG']._serialized_end=238821 + _globals['_PATTERNFLOWARPPROTOCOLLENGTH']._serialized_start=238824 + _globals['_PATTERNFLOWARPPROTOCOLLENGTH']._serialized_end=239254 + _globals['_PATTERNFLOWARPPROTOCOLLENGTH_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWARPPROTOCOLLENGTH_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWARPPROTOCOLLENGTH_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWARPPROTOCOLLENGTH_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWARPOPERATIONCOUNTER']._serialized_start=239256 + _globals['_PATTERNFLOWARPOPERATIONCOUNTER']._serialized_end=239376 + _globals['_PATTERNFLOWARPOPERATIONMETRICTAG']._serialized_start=239378 + _globals['_PATTERNFLOWARPOPERATIONMETRICTAG']._serialized_end=239504 + _globals['_PATTERNFLOWARPOPERATION']._serialized_start=239507 + _globals['_PATTERNFLOWARPOPERATION']._serialized_end=239912 + _globals['_PATTERNFLOWARPOPERATION_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWARPOPERATION_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWARPOPERATION_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWARPOPERATION_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWARPSENDERHARDWAREADDRCOUNTER']._serialized_start=239915 + _globals['_PATTERNFLOWARPSENDERHARDWAREADDRCOUNTER']._serialized_end=240044 + _globals['_PATTERNFLOWARPSENDERHARDWAREADDRMETRICTAG']._serialized_start=240047 + _globals['_PATTERNFLOWARPSENDERHARDWAREADDRMETRICTAG']._serialized_end=240182 + _globals['_PATTERNFLOWARPSENDERHARDWAREADDR']._serialized_start=240185 + _globals['_PATTERNFLOWARPSENDERHARDWAREADDR']._serialized_end=240635 + _globals['_PATTERNFLOWARPSENDERHARDWAREADDR_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWARPSENDERHARDWAREADDR_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWARPSENDERHARDWAREADDR_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWARPSENDERHARDWAREADDR_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWARPSENDERPROTOCOLADDRCOUNTER']._serialized_start=240638 + _globals['_PATTERNFLOWARPSENDERPROTOCOLADDRCOUNTER']._serialized_end=240767 + _globals['_PATTERNFLOWARPSENDERPROTOCOLADDRMETRICTAG']._serialized_start=240770 + _globals['_PATTERNFLOWARPSENDERPROTOCOLADDRMETRICTAG']._serialized_end=240905 + _globals['_PATTERNFLOWARPSENDERPROTOCOLADDR']._serialized_start=240908 + _globals['_PATTERNFLOWARPSENDERPROTOCOLADDR']._serialized_end=241358 + _globals['_PATTERNFLOWARPSENDERPROTOCOLADDR_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWARPSENDERPROTOCOLADDR_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWARPSENDERPROTOCOLADDR_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWARPSENDERPROTOCOLADDR_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWARPTARGETHARDWAREADDRCOUNTER']._serialized_start=241361 + _globals['_PATTERNFLOWARPTARGETHARDWAREADDRCOUNTER']._serialized_end=241490 + _globals['_PATTERNFLOWARPTARGETHARDWAREADDRMETRICTAG']._serialized_start=241493 + _globals['_PATTERNFLOWARPTARGETHARDWAREADDRMETRICTAG']._serialized_end=241628 + _globals['_PATTERNFLOWARPTARGETHARDWAREADDR']._serialized_start=241631 + _globals['_PATTERNFLOWARPTARGETHARDWAREADDR']._serialized_end=242081 + _globals['_PATTERNFLOWARPTARGETHARDWAREADDR_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWARPTARGETHARDWAREADDR_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWARPTARGETHARDWAREADDR_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWARPTARGETHARDWAREADDR_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWARPTARGETPROTOCOLADDRCOUNTER']._serialized_start=242084 + _globals['_PATTERNFLOWARPTARGETPROTOCOLADDRCOUNTER']._serialized_end=242213 + _globals['_PATTERNFLOWARPTARGETPROTOCOLADDRMETRICTAG']._serialized_start=242216 + _globals['_PATTERNFLOWARPTARGETPROTOCOLADDRMETRICTAG']._serialized_end=242351 + _globals['_PATTERNFLOWARPTARGETPROTOCOLADDR']._serialized_start=242354 + _globals['_PATTERNFLOWARPTARGETPROTOCOLADDR']._serialized_end=242804 + _globals['_PATTERNFLOWARPTARGETPROTOCOLADDR_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWARPTARGETPROTOCOLADDR_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWARPTARGETPROTOCOLADDR_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWARPTARGETPROTOCOLADDR_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWICMPECHOTYPECOUNTER']._serialized_start=242806 + _globals['_PATTERNFLOWICMPECHOTYPECOUNTER']._serialized_end=242926 + _globals['_PATTERNFLOWICMPECHOTYPEMETRICTAG']._serialized_start=242928 + _globals['_PATTERNFLOWICMPECHOTYPEMETRICTAG']._serialized_end=243054 + _globals['_PATTERNFLOWICMPECHOTYPE']._serialized_start=243057 + _globals['_PATTERNFLOWICMPECHOTYPE']._serialized_end=243462 + _globals['_PATTERNFLOWICMPECHOTYPE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWICMPECHOTYPE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWICMPECHOTYPE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWICMPECHOTYPE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWICMPECHOCODECOUNTER']._serialized_start=243464 + _globals['_PATTERNFLOWICMPECHOCODECOUNTER']._serialized_end=243584 + _globals['_PATTERNFLOWICMPECHOCODEMETRICTAG']._serialized_start=243586 + _globals['_PATTERNFLOWICMPECHOCODEMETRICTAG']._serialized_end=243712 + _globals['_PATTERNFLOWICMPECHOCODE']._serialized_start=243715 + _globals['_PATTERNFLOWICMPECHOCODE']._serialized_end=244120 + _globals['_PATTERNFLOWICMPECHOCODE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWICMPECHOCODE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWICMPECHOCODE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWICMPECHOCODE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWICMPECHOCHECKSUM']._serialized_start=244123 + _globals['_PATTERNFLOWICMPECHOCHECKSUM']._serialized_end=244468 + _globals['_PATTERNFLOWICMPECHOCHECKSUM_CHOICE']._serialized_start=175326 + _globals['_PATTERNFLOWICMPECHOCHECKSUM_CHOICE']._serialized_end=175386 + _globals['_PATTERNFLOWICMPECHOCHECKSUM_CHOICE_ENUM']._serialized_start=175336 + _globals['_PATTERNFLOWICMPECHOCHECKSUM_CHOICE_ENUM']._serialized_end=175386 + _globals['_PATTERNFLOWICMPECHOCHECKSUM_GENERATED']._serialized_start=175388 + _globals['_PATTERNFLOWICMPECHOCHECKSUM_GENERATED']._serialized_end=175443 + _globals['_PATTERNFLOWICMPECHOCHECKSUM_GENERATED_ENUM']._serialized_start=175401 + _globals['_PATTERNFLOWICMPECHOCHECKSUM_GENERATED_ENUM']._serialized_end=175443 + _globals['_PATTERNFLOWICMPECHOIDENTIFIERCOUNTER']._serialized_start=244470 + _globals['_PATTERNFLOWICMPECHOIDENTIFIERCOUNTER']._serialized_end=244596 + _globals['_PATTERNFLOWICMPECHOIDENTIFIERMETRICTAG']._serialized_start=244599 + _globals['_PATTERNFLOWICMPECHOIDENTIFIERMETRICTAG']._serialized_end=244731 + _globals['_PATTERNFLOWICMPECHOIDENTIFIER']._serialized_start=244734 + _globals['_PATTERNFLOWICMPECHOIDENTIFIER']._serialized_end=245169 + _globals['_PATTERNFLOWICMPECHOIDENTIFIER_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWICMPECHOIDENTIFIER_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWICMPECHOIDENTIFIER_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWICMPECHOIDENTIFIER_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWICMPECHOSEQUENCENUMBERCOUNTER']._serialized_start=245172 + _globals['_PATTERNFLOWICMPECHOSEQUENCENUMBERCOUNTER']._serialized_end=245302 + _globals['_PATTERNFLOWICMPECHOSEQUENCENUMBERMETRICTAG']._serialized_start=245305 + _globals['_PATTERNFLOWICMPECHOSEQUENCENUMBERMETRICTAG']._serialized_end=245441 + _globals['_PATTERNFLOWICMPECHOSEQUENCENUMBER']._serialized_start=245444 + _globals['_PATTERNFLOWICMPECHOSEQUENCENUMBER']._serialized_end=245899 + _globals['_PATTERNFLOWICMPECHOSEQUENCENUMBER_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWICMPECHOSEQUENCENUMBER_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWICMPECHOSEQUENCENUMBER_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWICMPECHOSEQUENCENUMBER_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWICMPCOMMONCHECKSUM']._serialized_start=245902 + _globals['_PATTERNFLOWICMPCOMMONCHECKSUM']._serialized_end=246253 + _globals['_PATTERNFLOWICMPCOMMONCHECKSUM_CHOICE']._serialized_start=175326 + _globals['_PATTERNFLOWICMPCOMMONCHECKSUM_CHOICE']._serialized_end=175386 + _globals['_PATTERNFLOWICMPCOMMONCHECKSUM_CHOICE_ENUM']._serialized_start=175336 + _globals['_PATTERNFLOWICMPCOMMONCHECKSUM_CHOICE_ENUM']._serialized_end=175386 + _globals['_PATTERNFLOWICMPCOMMONCHECKSUM_GENERATED']._serialized_start=175388 + _globals['_PATTERNFLOWICMPCOMMONCHECKSUM_GENERATED']._serialized_end=175443 + _globals['_PATTERNFLOWICMPCOMMONCHECKSUM_GENERATED_ENUM']._serialized_start=175401 + _globals['_PATTERNFLOWICMPCOMMONCHECKSUM_GENERATED_ENUM']._serialized_end=175443 + _globals['_PATTERNFLOWICMPNEXTFIELDSIDENTIFIERCOUNTER']._serialized_start=246256 + _globals['_PATTERNFLOWICMPNEXTFIELDSIDENTIFIERCOUNTER']._serialized_end=246388 + _globals['_PATTERNFLOWICMPNEXTFIELDSIDENTIFIERMETRICTAG']._serialized_start=246391 + _globals['_PATTERNFLOWICMPNEXTFIELDSIDENTIFIERMETRICTAG']._serialized_end=246529 + _globals['_PATTERNFLOWICMPNEXTFIELDSIDENTIFIER']._serialized_start=246532 + _globals['_PATTERNFLOWICMPNEXTFIELDSIDENTIFIER']._serialized_end=246997 + _globals['_PATTERNFLOWICMPNEXTFIELDSIDENTIFIER_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWICMPNEXTFIELDSIDENTIFIER_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWICMPNEXTFIELDSIDENTIFIER_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWICMPNEXTFIELDSIDENTIFIER_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBERCOUNTER']._serialized_start=247000 + _globals['_PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBERCOUNTER']._serialized_end=247136 + _globals['_PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBERMETRICTAG']._serialized_start=247139 + _globals['_PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBERMETRICTAG']._serialized_end=247281 + _globals['_PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBER']._serialized_start=247284 + _globals['_PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBER']._serialized_end=247769 + _globals['_PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBER_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBER_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBER_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWICMPNEXTFIELDSSEQUENCENUMBER_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWICMPV6ECHOTYPECOUNTER']._serialized_start=247771 + _globals['_PATTERNFLOWICMPV6ECHOTYPECOUNTER']._serialized_end=247893 + _globals['_PATTERNFLOWICMPV6ECHOTYPEMETRICTAG']._serialized_start=247896 + _globals['_PATTERNFLOWICMPV6ECHOTYPEMETRICTAG']._serialized_end=248024 + _globals['_PATTERNFLOWICMPV6ECHOTYPE']._serialized_start=248027 + _globals['_PATTERNFLOWICMPV6ECHOTYPE']._serialized_end=248442 + _globals['_PATTERNFLOWICMPV6ECHOTYPE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWICMPV6ECHOTYPE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWICMPV6ECHOTYPE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWICMPV6ECHOTYPE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWICMPV6ECHOCODECOUNTER']._serialized_start=248444 + _globals['_PATTERNFLOWICMPV6ECHOCODECOUNTER']._serialized_end=248566 + _globals['_PATTERNFLOWICMPV6ECHOCODEMETRICTAG']._serialized_start=248569 + _globals['_PATTERNFLOWICMPV6ECHOCODEMETRICTAG']._serialized_end=248697 + _globals['_PATTERNFLOWICMPV6ECHOCODE']._serialized_start=248700 + _globals['_PATTERNFLOWICMPV6ECHOCODE']._serialized_end=249115 + _globals['_PATTERNFLOWICMPV6ECHOCODE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWICMPV6ECHOCODE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWICMPV6ECHOCODE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWICMPV6ECHOCODE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWICMPV6ECHOIDENTIFIERCOUNTER']._serialized_start=249118 + _globals['_PATTERNFLOWICMPV6ECHOIDENTIFIERCOUNTER']._serialized_end=249246 + _globals['_PATTERNFLOWICMPV6ECHOIDENTIFIERMETRICTAG']._serialized_start=249249 + _globals['_PATTERNFLOWICMPV6ECHOIDENTIFIERMETRICTAG']._serialized_end=249383 + _globals['_PATTERNFLOWICMPV6ECHOIDENTIFIER']._serialized_start=249386 + _globals['_PATTERNFLOWICMPV6ECHOIDENTIFIER']._serialized_end=249831 + _globals['_PATTERNFLOWICMPV6ECHOIDENTIFIER_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWICMPV6ECHOIDENTIFIER_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWICMPV6ECHOIDENTIFIER_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWICMPV6ECHOIDENTIFIER_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWICMPV6ECHOSEQUENCENUMBERCOUNTER']._serialized_start=249834 + _globals['_PATTERNFLOWICMPV6ECHOSEQUENCENUMBERCOUNTER']._serialized_end=249966 + _globals['_PATTERNFLOWICMPV6ECHOSEQUENCENUMBERMETRICTAG']._serialized_start=249969 + _globals['_PATTERNFLOWICMPV6ECHOSEQUENCENUMBERMETRICTAG']._serialized_end=250107 + _globals['_PATTERNFLOWICMPV6ECHOSEQUENCENUMBER']._serialized_start=250110 + _globals['_PATTERNFLOWICMPV6ECHOSEQUENCENUMBER']._serialized_end=250575 + _globals['_PATTERNFLOWICMPV6ECHOSEQUENCENUMBER_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWICMPV6ECHOSEQUENCENUMBER_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWICMPV6ECHOSEQUENCENUMBER_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWICMPV6ECHOSEQUENCENUMBER_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWICMPV6ECHOCHECKSUM']._serialized_start=250578 + _globals['_PATTERNFLOWICMPV6ECHOCHECKSUM']._serialized_end=250929 + _globals['_PATTERNFLOWICMPV6ECHOCHECKSUM_CHOICE']._serialized_start=175326 + _globals['_PATTERNFLOWICMPV6ECHOCHECKSUM_CHOICE']._serialized_end=175386 + _globals['_PATTERNFLOWICMPV6ECHOCHECKSUM_CHOICE_ENUM']._serialized_start=175336 + _globals['_PATTERNFLOWICMPV6ECHOCHECKSUM_CHOICE_ENUM']._serialized_end=175386 + _globals['_PATTERNFLOWICMPV6ECHOCHECKSUM_GENERATED']._serialized_start=175388 + _globals['_PATTERNFLOWICMPV6ECHOCHECKSUM_GENERATED']._serialized_end=175443 + _globals['_PATTERNFLOWICMPV6ECHOCHECKSUM_GENERATED_ENUM']._serialized_start=175401 + _globals['_PATTERNFLOWICMPV6ECHOCHECKSUM_GENERATED_ENUM']._serialized_end=175443 + _globals['_PATTERNFLOWICMPV6COMMONCHECKSUM']._serialized_start=250932 + _globals['_PATTERNFLOWICMPV6COMMONCHECKSUM']._serialized_end=251289 + _globals['_PATTERNFLOWICMPV6COMMONCHECKSUM_CHOICE']._serialized_start=175326 + _globals['_PATTERNFLOWICMPV6COMMONCHECKSUM_CHOICE']._serialized_end=175386 + _globals['_PATTERNFLOWICMPV6COMMONCHECKSUM_CHOICE_ENUM']._serialized_start=175336 + _globals['_PATTERNFLOWICMPV6COMMONCHECKSUM_CHOICE_ENUM']._serialized_end=175386 + _globals['_PATTERNFLOWICMPV6COMMONCHECKSUM_GENERATED']._serialized_start=175388 + _globals['_PATTERNFLOWICMPV6COMMONCHECKSUM_GENERATED']._serialized_end=175443 + _globals['_PATTERNFLOWICMPV6COMMONCHECKSUM_GENERATED_ENUM']._serialized_start=175401 + _globals['_PATTERNFLOWICMPV6COMMONCHECKSUM_GENERATED_ENUM']._serialized_end=175443 + _globals['_PATTERNFLOWPPPADDRESSCOUNTER']._serialized_start=251291 + _globals['_PATTERNFLOWPPPADDRESSCOUNTER']._serialized_end=251409 + _globals['_PATTERNFLOWPPPADDRESSMETRICTAG']._serialized_start=251411 + _globals['_PATTERNFLOWPPPADDRESSMETRICTAG']._serialized_end=251535 + _globals['_PATTERNFLOWPPPADDRESS']._serialized_start=251538 + _globals['_PATTERNFLOWPPPADDRESS']._serialized_end=251933 + _globals['_PATTERNFLOWPPPADDRESS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPPPADDRESS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPPPADDRESS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPPPADDRESS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWPPPCONTROLCOUNTER']._serialized_start=251935 + _globals['_PATTERNFLOWPPPCONTROLCOUNTER']._serialized_end=252053 + _globals['_PATTERNFLOWPPPCONTROLMETRICTAG']._serialized_start=252055 + _globals['_PATTERNFLOWPPPCONTROLMETRICTAG']._serialized_end=252179 + _globals['_PATTERNFLOWPPPCONTROL']._serialized_start=252182 + _globals['_PATTERNFLOWPPPCONTROL']._serialized_end=252577 + _globals['_PATTERNFLOWPPPCONTROL_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWPPPCONTROL_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWPPPCONTROL_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWPPPCONTROL_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWPPPPROTOCOLTYPECOUNTER']._serialized_start=252579 + _globals['_PATTERNFLOWPPPPROTOCOLTYPECOUNTER']._serialized_end=252702 + _globals['_PATTERNFLOWPPPPROTOCOLTYPEMETRICTAG']._serialized_start=252705 + _globals['_PATTERNFLOWPPPPROTOCOLTYPEMETRICTAG']._serialized_end=252834 + _globals['_PATTERNFLOWPPPPROTOCOLTYPE']._serialized_start=252837 + _globals['_PATTERNFLOWPPPPROTOCOLTYPE']._serialized_end=253295 + _globals['_PATTERNFLOWPPPPROTOCOLTYPE_CHOICE']._serialized_start=160840 + _globals['_PATTERNFLOWPPPPROTOCOLTYPE_CHOICE']._serialized_end=160936 + _globals['_PATTERNFLOWPPPPROTOCOLTYPE_CHOICE_ENUM']._serialized_start=160850 + _globals['_PATTERNFLOWPPPPROTOCOLTYPE_CHOICE_ENUM']._serialized_end=160936 + _globals['_PATTERNFLOWIGMPV1VERSIONCOUNTER']._serialized_start=253297 + _globals['_PATTERNFLOWIGMPV1VERSIONCOUNTER']._serialized_end=253418 + _globals['_PATTERNFLOWIGMPV1VERSIONMETRICTAG']._serialized_start=253420 + _globals['_PATTERNFLOWIGMPV1VERSIONMETRICTAG']._serialized_end=253547 + _globals['_PATTERNFLOWIGMPV1VERSION']._serialized_start=253550 + _globals['_PATTERNFLOWIGMPV1VERSION']._serialized_end=253960 + _globals['_PATTERNFLOWIGMPV1VERSION_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIGMPV1VERSION_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIGMPV1VERSION_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIGMPV1VERSION_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIGMPV1TYPECOUNTER']._serialized_start=253962 + _globals['_PATTERNFLOWIGMPV1TYPECOUNTER']._serialized_end=254080 + _globals['_PATTERNFLOWIGMPV1TYPEMETRICTAG']._serialized_start=254082 + _globals['_PATTERNFLOWIGMPV1TYPEMETRICTAG']._serialized_end=254206 + _globals['_PATTERNFLOWIGMPV1TYPE']._serialized_start=254209 + _globals['_PATTERNFLOWIGMPV1TYPE']._serialized_end=254604 + _globals['_PATTERNFLOWIGMPV1TYPE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIGMPV1TYPE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIGMPV1TYPE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIGMPV1TYPE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIGMPV1UNUSEDCOUNTER']._serialized_start=254606 + _globals['_PATTERNFLOWIGMPV1UNUSEDCOUNTER']._serialized_end=254726 + _globals['_PATTERNFLOWIGMPV1UNUSEDMETRICTAG']._serialized_start=254728 + _globals['_PATTERNFLOWIGMPV1UNUSEDMETRICTAG']._serialized_end=254854 + _globals['_PATTERNFLOWIGMPV1UNUSED']._serialized_start=254857 + _globals['_PATTERNFLOWIGMPV1UNUSED']._serialized_end=255262 + _globals['_PATTERNFLOWIGMPV1UNUSED_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIGMPV1UNUSED_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIGMPV1UNUSED_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIGMPV1UNUSED_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWIGMPV1CHECKSUM']._serialized_start=255265 + _globals['_PATTERNFLOWIGMPV1CHECKSUM']._serialized_end=255604 + _globals['_PATTERNFLOWIGMPV1CHECKSUM_CHOICE']._serialized_start=175326 + _globals['_PATTERNFLOWIGMPV1CHECKSUM_CHOICE']._serialized_end=175386 + _globals['_PATTERNFLOWIGMPV1CHECKSUM_CHOICE_ENUM']._serialized_start=175336 + _globals['_PATTERNFLOWIGMPV1CHECKSUM_CHOICE_ENUM']._serialized_end=175386 + _globals['_PATTERNFLOWIGMPV1CHECKSUM_GENERATED']._serialized_start=175388 + _globals['_PATTERNFLOWIGMPV1CHECKSUM_GENERATED']._serialized_end=175443 + _globals['_PATTERNFLOWIGMPV1CHECKSUM_GENERATED_ENUM']._serialized_start=175401 + _globals['_PATTERNFLOWIGMPV1CHECKSUM_GENERATED_ENUM']._serialized_end=175443 + _globals['_PATTERNFLOWIGMPV1GROUPADDRESSCOUNTER']._serialized_start=255606 + _globals['_PATTERNFLOWIGMPV1GROUPADDRESSCOUNTER']._serialized_end=255732 + _globals['_PATTERNFLOWIGMPV1GROUPADDRESSMETRICTAG']._serialized_start=255735 + _globals['_PATTERNFLOWIGMPV1GROUPADDRESSMETRICTAG']._serialized_end=255867 + _globals['_PATTERNFLOWIGMPV1GROUPADDRESS']._serialized_start=255870 + _globals['_PATTERNFLOWIGMPV1GROUPADDRESS']._serialized_end=256305 + _globals['_PATTERNFLOWIGMPV1GROUPADDRESS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWIGMPV1GROUPADDRESS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWIGMPV1GROUPADDRESS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWIGMPV1GROUPADDRESS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWMPLSLABELCOUNTER']._serialized_start=256307 + _globals['_PATTERNFLOWMPLSLABELCOUNTER']._serialized_end=256424 + _globals['_PATTERNFLOWMPLSLABELMETRICTAG']._serialized_start=256426 + _globals['_PATTERNFLOWMPLSLABELMETRICTAG']._serialized_end=256549 + _globals['_PATTERNFLOWMPLSLABEL']._serialized_start=256552 + _globals['_PATTERNFLOWMPLSLABEL']._serialized_end=256980 + _globals['_PATTERNFLOWMPLSLABEL_CHOICE']._serialized_start=160840 + _globals['_PATTERNFLOWMPLSLABEL_CHOICE']._serialized_end=160936 + _globals['_PATTERNFLOWMPLSLABEL_CHOICE_ENUM']._serialized_start=160850 + _globals['_PATTERNFLOWMPLSLABEL_CHOICE_ENUM']._serialized_end=160936 + _globals['_PATTERNFLOWMPLSTRAFFICCLASSCOUNTER']._serialized_start=256982 + _globals['_PATTERNFLOWMPLSTRAFFICCLASSCOUNTER']._serialized_end=257106 + _globals['_PATTERNFLOWMPLSTRAFFICCLASSMETRICTAG']._serialized_start=257109 + _globals['_PATTERNFLOWMPLSTRAFFICCLASSMETRICTAG']._serialized_end=257239 + _globals['_PATTERNFLOWMPLSTRAFFICCLASS']._serialized_start=257242 + _globals['_PATTERNFLOWMPLSTRAFFICCLASS']._serialized_end=257667 + _globals['_PATTERNFLOWMPLSTRAFFICCLASS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWMPLSTRAFFICCLASS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWMPLSTRAFFICCLASS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWMPLSTRAFFICCLASS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWMPLSBOTTOMOFSTACKCOUNTER']._serialized_start=257669 + _globals['_PATTERNFLOWMPLSBOTTOMOFSTACKCOUNTER']._serialized_end=257794 + _globals['_PATTERNFLOWMPLSBOTTOMOFSTACKMETRICTAG']._serialized_start=257797 + _globals['_PATTERNFLOWMPLSBOTTOMOFSTACKMETRICTAG']._serialized_end=257928 + _globals['_PATTERNFLOWMPLSBOTTOMOFSTACK']._serialized_start=257931 + _globals['_PATTERNFLOWMPLSBOTTOMOFSTACK']._serialized_end=258399 + _globals['_PATTERNFLOWMPLSBOTTOMOFSTACK_CHOICE']._serialized_start=160840 + _globals['_PATTERNFLOWMPLSBOTTOMOFSTACK_CHOICE']._serialized_end=160936 + _globals['_PATTERNFLOWMPLSBOTTOMOFSTACK_CHOICE_ENUM']._serialized_start=160850 + _globals['_PATTERNFLOWMPLSBOTTOMOFSTACK_CHOICE_ENUM']._serialized_end=160936 + _globals['_PATTERNFLOWMPLSTIMETOLIVECOUNTER']._serialized_start=258401 + _globals['_PATTERNFLOWMPLSTIMETOLIVECOUNTER']._serialized_end=258523 + _globals['_PATTERNFLOWMPLSTIMETOLIVEMETRICTAG']._serialized_start=258526 + _globals['_PATTERNFLOWMPLSTIMETOLIVEMETRICTAG']._serialized_end=258654 + _globals['_PATTERNFLOWMPLSTIMETOLIVE']._serialized_start=258657 + _globals['_PATTERNFLOWMPLSTIMETOLIVE']._serialized_end=259072 + _globals['_PATTERNFLOWMPLSTIMETOLIVE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWMPLSTIMETOLIVE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWMPLSTIMETOLIVE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWMPLSTIMETOLIVE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CVERSIONCOUNTER']._serialized_start=259074 + _globals['_PATTERNFLOWSNMPV2CVERSIONCOUNTER']._serialized_end=259196 + _globals['_PATTERNFLOWSNMPV2CVERSION']._serialized_start=259199 + _globals['_PATTERNFLOWSNMPV2CVERSION']._serialized_end=259552 + _globals['_PATTERNFLOWSNMPV2CVERSION_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWSNMPV2CVERSION_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CVERSION_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWSNMPV2CVERSION_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CPDUREQUESTIDCOUNTER']._serialized_start=259554 + _globals['_PATTERNFLOWSNMPV2CPDUREQUESTIDCOUNTER']._serialized_end=259681 + _globals['_PATTERNFLOWSNMPV2CPDUREQUESTID']._serialized_start=259684 + _globals['_PATTERNFLOWSNMPV2CPDUREQUESTID']._serialized_end=260057 + _globals['_PATTERNFLOWSNMPV2CPDUREQUESTID_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWSNMPV2CPDUREQUESTID_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CPDUREQUESTID_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWSNMPV2CPDUREQUESTID_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CPDUERRORINDEXCOUNTER']._serialized_start=260060 + _globals['_PATTERNFLOWSNMPV2CPDUERRORINDEXCOUNTER']._serialized_end=260188 + _globals['_PATTERNFLOWSNMPV2CPDUERRORINDEX']._serialized_start=260191 + _globals['_PATTERNFLOWSNMPV2CPDUERRORINDEX']._serialized_end=260568 + _globals['_PATTERNFLOWSNMPV2CPDUERRORINDEX_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWSNMPV2CPDUERRORINDEX_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CPDUERRORINDEX_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWSNMPV2CPDUERRORINDEX_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CBULKPDUREQUESTIDCOUNTER']._serialized_start=260571 + _globals['_PATTERNFLOWSNMPV2CBULKPDUREQUESTIDCOUNTER']._serialized_end=260702 + _globals['_PATTERNFLOWSNMPV2CBULKPDUREQUESTID']._serialized_start=260705 + _globals['_PATTERNFLOWSNMPV2CBULKPDUREQUESTID']._serialized_end=261094 + _globals['_PATTERNFLOWSNMPV2CBULKPDUREQUESTID_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWSNMPV2CBULKPDUREQUESTID_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CBULKPDUREQUESTID_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWSNMPV2CBULKPDUREQUESTID_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CBULKPDUNONREPEATERS']._serialized_start=261097 + _globals['_PATTERNFLOWSNMPV2CBULKPDUNONREPEATERS']._serialized_end=261328 + _globals['_PATTERNFLOWSNMPV2CBULKPDUNONREPEATERS_CHOICE']._serialized_start=261251 + _globals['_PATTERNFLOWSNMPV2CBULKPDUNONREPEATERS_CHOICE']._serialized_end=261307 + _globals['_PATTERNFLOWSNMPV2CBULKPDUNONREPEATERS_CHOICE_ENUM']._serialized_start=160850 + _globals['_PATTERNFLOWSNMPV2CBULKPDUNONREPEATERS_CHOICE_ENUM']._serialized_end=160896 + _globals['_PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONSCOUNTER']._serialized_start=261331 + _globals['_PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONSCOUNTER']._serialized_end=261467 + _globals['_PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONS']._serialized_start=261470 + _globals['_PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONS']._serialized_end=261879 + _globals['_PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWSNMPV2CBULKPDUMAXREPETITIONS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUECOUNTER']._serialized_start=261882 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUECOUNTER']._serialized_end=262029 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUE']._serialized_start=262032 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUE']._serialized_end=262485 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEINTEGERVALUE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUECOUNTER']._serialized_start=262488 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUECOUNTER']._serialized_end=262637 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUE']._serialized_start=262640 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUE']._serialized_end=263101 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEIPADDRESSVALUE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUECOUNTER']._serialized_start=263104 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUECOUNTER']._serialized_end=263251 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUE']._serialized_start=263254 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUE']._serialized_end=263707 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUECOUNTERVALUE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUECOUNTER']._serialized_start=263710 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUECOUNTER']._serialized_end=263859 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUE']._serialized_start=263862 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUE']._serialized_end=264323 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUETIMETICKSVALUE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUECOUNTER']._serialized_start=264326 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUECOUNTER']._serialized_end=264476 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUE']._serialized_start=264479 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUE']._serialized_end=264944 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEBIGCOUNTERVALUE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUECOUNTER']._serialized_start=264947 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUECOUNTER']._serialized_end=265102 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUE']._serialized_start=265105 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUE']._serialized_end=265590 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWSNMPV2CVARIABLEBINDINGVALUEUNSIGNEDINTEGERVALUE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CCOMMONREQUESTIDCOUNTER']._serialized_start=265593 + _globals['_PATTERNFLOWSNMPV2CCOMMONREQUESTIDCOUNTER']._serialized_end=265723 + _globals['_PATTERNFLOWSNMPV2CCOMMONREQUESTID']._serialized_start=265726 + _globals['_PATTERNFLOWSNMPV2CCOMMONREQUESTID']._serialized_end=266111 + _globals['_PATTERNFLOWSNMPV2CCOMMONREQUESTID_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWSNMPV2CCOMMONREQUESTID_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWSNMPV2CCOMMONREQUESTID_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWSNMPV2CCOMMONREQUESTID_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPRSVPCHECKSUM']._serialized_start=266114 + _globals['_PATTERNFLOWRSVPRSVPCHECKSUM']._serialized_end=266459 + _globals['_PATTERNFLOWRSVPRSVPCHECKSUM_CHOICE']._serialized_start=175326 + _globals['_PATTERNFLOWRSVPRSVPCHECKSUM_CHOICE']._serialized_end=175386 + _globals['_PATTERNFLOWRSVPRSVPCHECKSUM_CHOICE_ENUM']._serialized_start=175336 + _globals['_PATTERNFLOWRSVPRSVPCHECKSUM_CHOICE_ENUM']._serialized_end=175386 + _globals['_PATTERNFLOWRSVPRSVPCHECKSUM_GENERATED']._serialized_start=175388 + _globals['_PATTERNFLOWRSVPRSVPCHECKSUM_GENERATED']._serialized_end=175443 + _globals['_PATTERNFLOWRSVPRSVPCHECKSUM_GENERATED_ENUM']._serialized_start=175401 + _globals['_PATTERNFLOWRSVPRSVPCHECKSUM_GENERATED_ENUM']._serialized_end=175443 + _globals['_PATTERNFLOWRSVPTIMETOLIVECOUNTER']._serialized_start=266461 + _globals['_PATTERNFLOWRSVPTIMETOLIVECOUNTER']._serialized_end=266583 + _globals['_PATTERNFLOWRSVPTIMETOLIVE']._serialized_start=266586 + _globals['_PATTERNFLOWRSVPTIMETOLIVE']._serialized_end=266939 + _globals['_PATTERNFLOWRSVPTIMETOLIVE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPTIMETOLIVE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPTIMETOLIVE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPTIMETOLIVE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPRESERVEDCOUNTER']._serialized_start=266941 + _globals['_PATTERNFLOWRSVPRESERVEDCOUNTER']._serialized_end=267061 + _globals['_PATTERNFLOWRSVPRESERVED']._serialized_start=267064 + _globals['_PATTERNFLOWRSVPRESERVED']._serialized_end=267409 + _globals['_PATTERNFLOWRSVPRESERVED_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPRESERVED_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPRESERVED_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPRESERVED_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESSCOUNTER']._serialized_start=267412 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESSCOUNTER']._serialized_end=267573 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESS']._serialized_start=267576 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESS']._serialized_end=268085 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4IPV4TUNNELENDPOINTADDRESS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVEDCOUNTER']._serialized_start=268088 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVEDCOUNTER']._serialized_end=268232 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVED']._serialized_start=268235 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVED']._serialized_end=268676 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVED_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVED_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVED_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4RESERVED_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELIDCOUNTER']._serialized_start=268679 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELIDCOUNTER']._serialized_end=268823 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELID']._serialized_start=268826 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELID']._serialized_end=269267 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELID_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELID_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELID_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSESSIONLSPTUNNELIPV4TUNNELID_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGERCOUNTER']._serialized_start=269270 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGERCOUNTER']._serialized_end=269413 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGER']._serialized_start=269416 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGER']._serialized_end=269853 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGER_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGER_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGER_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASINTEGER_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4COUNTER']._serialized_start=269856 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4COUNTER']._serialized_end=269996 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4']._serialized_start=269999 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4']._serialized_end=270424 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSESSIONEXTTUNNELIDASIPV4_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESSCOUNTER']._serialized_start=270427 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESSCOUNTER']._serialized_end=270565 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESS']._serialized_start=270568 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESS']._serialized_end=270985 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4IPV4ADDRESS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLECOUNTER']._serialized_start=270988 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLECOUNTER']._serialized_end=271137 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLE']._serialized_start=271140 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLE']._serialized_end=271601 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHRSVPHOPIPV4LOGICALINTERFACEHANDLE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODRCOUNTER']._serialized_start=271604 + _globals['_PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODRCOUNTER']._serialized_end=271749 + _globals['_PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODR']._serialized_start=271752 + _globals['_PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODR']._serialized_end=272197 + _globals['_PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODR_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODR_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODR_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHTIMEVALUESTYPE1REFRESHPERIODR_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBITCOUNTER']._serialized_start=272200 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBITCOUNTER']._serialized_end=272348 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBIT']._serialized_start=272351 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBIT']._serialized_end=272808 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBIT_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBIT_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBIT_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXLBIT_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESSCOUNTER']._serialized_start=272811 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESSCOUNTER']._serialized_end=272966 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESS']._serialized_start=272969 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESS']._serialized_end=273454 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1IPV4PREFIXIPV4ADDRESS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBITCOUNTER']._serialized_start=273457 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBITCOUNTER']._serialized_end=273603 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBIT']._serialized_start=273606 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBIT']._serialized_end=274055 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBIT_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBIT_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBIT_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHEXPLICITROUTETYPE1ASNUMBERLBIT_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVEDCOUNTER']._serialized_start=274058 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVEDCOUNTER']._serialized_end=274211 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVED']._serialized_start=274214 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVED']._serialized_end=274691 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVED_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVED_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVED_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGERESERVED_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PIDCOUNTER']._serialized_start=274694 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PIDCOUNTER']._serialized_end=274844 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PID']._serialized_start=274847 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PID']._serialized_end=275312 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PID_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PID_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PID_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHLABELREQUESTWITHOUTLABELRANGEL3PID_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESSCOUNTER']._serialized_start=275315 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESSCOUNTER']._serialized_end=275481 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESS']._serialized_start=275484 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESS']._serialized_end=276013 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4IPV4TUNNELSENDERADDRESS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVEDCOUNTER']._serialized_start=276016 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVEDCOUNTER']._serialized_end=276167 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVED']._serialized_start=276170 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVED']._serialized_end=276639 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVED_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVED_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVED_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4RESERVED_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPIDCOUNTER']._serialized_start=276642 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPIDCOUNTER']._serialized_end=276790 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPID']._serialized_start=276793 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPID']._serialized_end=277250 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPID_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPID_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPID_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTEMPLATELSPTUNNELIPV4LSPID_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSIONCOUNTER']._serialized_start=277253 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSIONCOUNTER']._serialized_end=277394 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSION']._serialized_start=277397 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSION']._serialized_end=277826 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSION_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSION_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSION_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVVERSION_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1COUNTER']._serialized_start=277829 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1COUNTER']._serialized_end=277972 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1']._serialized_start=277975 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1']._serialized_end=278412 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED1_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTHCOUNTER']._serialized_start=278415 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTHCOUNTER']._serialized_end=278562 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTH']._serialized_start=278565 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTH']._serialized_end=279018 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTH_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTH_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTH_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVOVERALLLENGTH_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADERCOUNTER']._serialized_start=279021 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADERCOUNTER']._serialized_end=279168 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADER']._serialized_start=279171 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADER']._serialized_end=279624 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADER_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADER_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADER_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVSERVICEHEADER_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBITCOUNTER']._serialized_start=279627 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBITCOUNTER']._serialized_end=279768 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBIT']._serialized_start=279771 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBIT']._serialized_end=280200 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBIT_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBIT_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBIT_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVZEROBIT_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2COUNTER']._serialized_start=280203 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2COUNTER']._serialized_end=280346 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2']._serialized_start=280349 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2']._serialized_end=280786 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVRESERVED2_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATACOUNTER']._serialized_start=280789 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATACOUNTER']._serialized_end=280942 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATA']._serialized_start=280945 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATA']._serialized_end=281422 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATA_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATA_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATA_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVLENGTHOFSERVICEDATA_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPECCOUNTER']._serialized_start=281425 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPECCOUNTER']._serialized_end=281586 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPEC']._serialized_start=281589 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPEC']._serialized_end=282098 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPEC_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPEC_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPEC_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETERIDTOKENBUCKETTSPEC_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAGCOUNTER']._serialized_start=282101 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAGCOUNTER']._serialized_end=282251 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAG']._serialized_start=282254 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAG']._serialized_end=282719 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAG_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAG_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAG_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127FLAG_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTHCOUNTER']._serialized_start=282722 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTHCOUNTER']._serialized_end=282874 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTH']._serialized_start=282877 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTH']._serialized_end=283350 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTH_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTH_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTH_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVPARAMETER127LENGTH_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNITCOUNTER']._serialized_start=283353 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNITCOUNTER']._serialized_end=283505 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNIT']._serialized_start=283508 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNIT']._serialized_end=283981 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNIT_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNIT_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNIT_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMINIMUMPOLICEDUNIT_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZECOUNTER']._serialized_start=283984 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZECOUNTER']._serialized_end=284135 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZE']._serialized_start=284138 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZE']._serialized_end=284607 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHSENDERTSPECINTSERVMAXIMUMPACKETSIZE_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESSCOUNTER']._serialized_start=284610 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESSCOUNTER']._serialized_end=284764 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESS']._serialized_start=284767 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESS']._serialized_end=285248 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESS_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESS_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESS_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSIPV4ADDRESS_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTHCOUNTER']._serialized_start=285251 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTHCOUNTER']._serialized_end=285406 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTH']._serialized_start=285409 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTH']._serialized_end=285894 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTH_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTH_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTH_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1IPV4ADDRESSPREFIXLENGTH_CHOICE_ENUM']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELFLAGS']._serialized_start=285897 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELFLAGS']._serialized_end=286144 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELFLAGS_CHOICE']._serialized_start=261251 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELFLAGS_CHOICE']._serialized_end=261307 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELFLAGS_CHOICE_ENUM']._serialized_start=160850 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELFLAGS_CHOICE_ENUM']._serialized_end=160896 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELCTYPE']._serialized_start=286147 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELCTYPE']._serialized_end=286394 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELCTYPE_CHOICE']._serialized_start=261251 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELCTYPE_CHOICE']._serialized_end=261307 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELCTYPE_CHOICE_ENUM']._serialized_start=160850 + _globals['_PATTERNFLOWRSVPPATHRECORDROUTETYPE1LABELCTYPE_CHOICE_ENUM']._serialized_end=160896 + _globals['_PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPECOUNTER']._serialized_start=286397 + _globals['_PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPECOUNTER']._serialized_end=286530 + _globals['_PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPE']._serialized_start=286533 + _globals['_PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPE']._serialized_end=286930 + _globals['_PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPE_CHOICE']._serialized_start=161510 + _globals['_PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPE_CHOICE']._serialized_end=161596 + _globals['_PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPE_CHOICE_ENUM']._serialized_start=161520 + _globals['_PATTERNFLOWRSVPPATHOBJECTSCUSTOMTYPE_CHOICE_ENUM']._serialized_end=161596 + _globals['_VERSION']._serialized_start=286933 + _globals['_VERSION']._serialized_end=287078 + _globals['_SUCCESS']._serialized_start=287080 + _globals['_SUCCESS']._serialized_end=287120 + _globals['_FAILURE']._serialized_start=287122 + _globals['_FAILURE']._serialized_end=287158 + _globals['_SETCONFIGREQUEST']._serialized_start=287160 + _globals['_SETCONFIGREQUEST']._serialized_end=287207 + _globals['_UPDATECONFIGREQUEST']._serialized_start=287209 + _globals['_UPDATECONFIGREQUEST']._serialized_end=287272 + _globals['_SETCONFIGRESPONSE']._serialized_start=287274 + _globals['_SETCONFIGRESPONSE']._serialized_end=287324 + _globals['_GETCONFIGRESPONSE']._serialized_start=287326 + _globals['_GETCONFIGRESPONSE']._serialized_end=287374 + _globals['_UPDATECONFIGRESPONSE']._serialized_start=287376 + _globals['_UPDATECONFIGRESPONSE']._serialized_end=287429 + _globals['_SETCONTROLSTATEREQUEST']._serialized_start=287431 + _globals['_SETCONTROLSTATEREQUEST']._serialized_end=287497 + _globals['_SETCONTROLSTATERESPONSE']._serialized_start=287499 + _globals['_SETCONTROLSTATERESPONSE']._serialized_end=287555 + _globals['_SETCONTROLACTIONREQUEST']._serialized_start=287557 + _globals['_SETCONTROLACTIONREQUEST']._serialized_end=287626 + _globals['_SETCONTROLACTIONRESPONSE']._serialized_start=287628 + _globals['_SETCONTROLACTIONRESPONSE']._serialized_end=287715 + _globals['_GETMETRICSREQUEST']._serialized_start=287717 + _globals['_GETMETRICSREQUEST']._serialized_end=287782 + _globals['_GETMETRICSRESPONSE']._serialized_start=287784 + _globals['_GETMETRICSRESPONSE']._serialized_end=287852 + _globals['_GETSTATESREQUEST']._serialized_start=287854 + _globals['_GETSTATESREQUEST']._serialized_end=287916 + _globals['_GETSTATESRESPONSE']._serialized_start=287918 + _globals['_GETSTATESRESPONSE']._serialized_end=287983 + _globals['_GETCAPTUREREQUEST']._serialized_start=287985 + _globals['_GETCAPTUREREQUEST']._serialized_end=288050 + _globals['_GETCAPTURERESPONSE']._serialized_start=288052 + _globals['_GETCAPTURERESPONSE']._serialized_end=288096 + _globals['_GETVERSIONRESPONSE']._serialized_start=288098 + _globals['_GETVERSIONRESPONSE']._serialized_end=288149 + _globals['_OPENAPI']._serialized_start=288152 + _globals['_OPENAPI']._serialized_end=288759 # @@protoc_insertion_point(module_scope) diff --git a/version.py b/version.py index 4ef9165a..ec00a39d 100644 --- a/version.py +++ b/version.py @@ -2,8 +2,8 @@ class Version: - models_version = "1.1.0" - version = "1.1.0" + models_version = "1.17.0" + version = "1.17.0" package_name = "snappi" protobuf_name = "otg" go_package_name = "gosnappi"